aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/Kconfig1
-rw-r--r--arch/alpha/Kconfig8
-rw-r--r--arch/alpha/boot/tools/objstrip.c2
-rw-r--r--arch/alpha/include/asm/fcntl.h2
-rw-r--r--arch/alpha/include/asm/hardirq.h14
-rw-r--r--arch/alpha/include/asm/mman.h5
-rw-r--r--arch/alpha/include/asm/pci.h1
-rw-r--r--arch/alpha/include/asm/smp.h2
-rw-r--r--arch/alpha/include/asm/topology.h18
-rw-r--r--arch/alpha/kernel/core_marvel.c2
-rw-r--r--arch/alpha/kernel/core_titan.c2
-rw-r--r--arch/alpha/kernel/init_task.c5
-rw-r--r--arch/alpha/kernel/pci_impl.h2
-rw-r--r--arch/alpha/kernel/pci_iommu.c10
-rw-r--r--arch/alpha/kernel/process.c1
-rw-r--r--arch/alpha/kernel/smp.c14
-rw-r--r--arch/alpha/kernel/time.c79
-rw-r--r--arch/alpha/kernel/vmlinux.lds.S95
-rw-r--r--arch/alpha/mm/init.c2
-rw-r--r--arch/alpha/mm/numa.c2
-rw-r--r--arch/arm/Kconfig5
-rw-r--r--arch/arm/Makefile8
-rw-r--r--arch/arm/boot/install.sh4
-rw-r--r--arch/arm/common/locomo.c17
-rw-r--r--arch/arm/common/vic.c1
-rw-r--r--arch/arm/configs/da830_omapl137_defconfig1254
-rw-r--r--arch/arm/configs/da850_omapl138_defconfig1229
-rw-r--r--arch/arm/configs/davinci_all_defconfig173
-rw-r--r--arch/arm/configs/littleton_defconfig783
-rw-r--r--arch/arm/configs/n770_defconfig2
-rw-r--r--arch/arm/configs/n8x0_defconfig1104
-rw-r--r--arch/arm/configs/nhk8815_defconfig2
-rw-r--r--arch/arm/configs/omap3_beagle_defconfig88
-rw-r--r--arch/arm/configs/omap_3430sdp_defconfig59
-rw-r--r--arch/arm/configs/omap_ldp_defconfig54
-rw-r--r--arch/arm/configs/omap_zoom2_defconfig484
-rw-r--r--arch/arm/configs/pxa3xx_defconfig1332
-rw-r--r--arch/arm/configs/rx51_defconfig1
-rw-r--r--arch/arm/configs/xcep_defconfig1129
-rw-r--r--arch/arm/include/asm/atomic.h26
-rw-r--r--arch/arm/include/asm/cache.h2
-rw-r--r--arch/arm/include/asm/cacheflush.h8
-rw-r--r--arch/arm/include/asm/cputype.h10
-rw-r--r--arch/arm/include/asm/hardware/iop3xx-adma.h81
-rw-r--r--arch/arm/include/asm/hardware/iop_adma.h3
-rw-r--r--arch/arm/include/asm/mach/mmc.h17
-rw-r--r--arch/arm/include/asm/mman.h18
-rw-r--r--arch/arm/include/asm/mmu_context.h7
-rw-r--r--arch/arm/include/asm/pci.h2
-rw-r--r--arch/arm/include/asm/smp.h1
-rw-r--r--arch/arm/include/asm/tcm.h31
-rw-r--r--arch/arm/include/asm/tlbflush.h4
-rw-r--r--arch/arm/include/asm/unified.h4
-rw-r--r--arch/arm/include/asm/unistd.h2
-rw-r--r--arch/arm/kernel/Makefile4
-rw-r--r--arch/arm/kernel/calls.S2
-rw-r--r--arch/arm/kernel/entry-armv.S19
-rw-r--r--arch/arm/kernel/entry-header.S16
-rw-r--r--arch/arm/kernel/init_task.c5
-rw-r--r--arch/arm/kernel/kprobes.c19
-rw-r--r--arch/arm/kernel/setup.c2
-rw-r--r--arch/arm/kernel/smp.c10
-rw-r--r--arch/arm/kernel/sys_arm.c1
-rw-r--r--arch/arm/kernel/tcm.c246
-rw-r--r--arch/arm/kernel/tcm.h17
-rw-r--r--arch/arm/kernel/vmlinux.lds.S57
-rw-r--r--arch/arm/lib/copy_page.S16
-rw-r--r--arch/arm/mach-at91/Kconfig7
-rw-r--r--arch/arm/mach-at91/Makefile1
-rw-r--r--arch/arm/mach-at91/at91cap9_devices.c10
-rw-r--r--arch/arm/mach-at91/at91sam9260_devices.c96
-rw-r--r--arch/arm/mach-at91/at91sam9263_devices.c36
-rw-r--r--arch/arm/mach-at91/at91sam9g45_devices.c104
-rw-r--r--arch/arm/mach-at91/at91sam9rl_devices.c102
-rw-r--r--arch/arm/mach-at91/board-afeb-9260v1.c2
-rw-r--r--arch/arm/mach-at91/board-cam60.c2
-rw-r--r--arch/arm/mach-at91/board-cap9adk.c2
-rw-r--r--arch/arm/mach-at91/board-neocore926.c4
-rw-r--r--arch/arm/mach-at91/board-qil-a9260.c2
-rw-r--r--arch/arm/mach-at91/board-sam9260ek.c2
-rw-r--r--arch/arm/mach-at91/board-sam9261ek.c2
-rw-r--r--arch/arm/mach-at91/board-sam9263ek.c21
-rw-r--r--arch/arm/mach-at91/board-sam9g20ek-2slot-mmc.c277
-rw-r--r--arch/arm/mach-at91/board-sam9g20ek.c2
-rw-r--r--arch/arm/mach-at91/board-sam9m10g45ek.c10
-rw-r--r--arch/arm/mach-at91/board-sam9rlek.c12
-rw-r--r--arch/arm/mach-at91/board-usb-a9260.c2
-rw-r--r--arch/arm/mach-at91/board-usb-a9263.c2
-rw-r--r--arch/arm/mach-at91/include/mach/board.h11
-rw-r--r--arch/arm/mach-davinci/Kconfig49
-rw-r--r--arch/arm/mach-davinci/Makefile14
-rw-r--r--arch/arm/mach-davinci/Makefile.boot10
-rw-r--r--arch/arm/mach-davinci/board-da830-evm.c157
-rw-r--r--arch/arm/mach-davinci/board-da850-evm.c415
-rw-r--r--arch/arm/mach-davinci/board-dm355-evm.c83
-rw-r--r--arch/arm/mach-davinci/board-dm365-evm.c492
-rw-r--r--arch/arm/mach-davinci/board-dm644x-evm.c81
-rw-r--r--arch/arm/mach-davinci/board-dm646x-evm.c410
-rw-r--r--arch/arm/mach-davinci/clock.c5
-rw-r--r--arch/arm/mach-davinci/da830.c1205
-rw-r--r--arch/arm/mach-davinci/da850.c820
-rw-r--r--arch/arm/mach-davinci/devices-da8xx.c450
-rw-r--r--arch/arm/mach-davinci/devices.c60
-rw-r--r--arch/arm/mach-davinci/dm355.c174
-rw-r--r--arch/arm/mach-davinci/dm365.c926
-rw-r--r--arch/arm/mach-davinci/dm644x.c141
-rw-r--r--arch/arm/mach-davinci/dm646x.c321
-rw-r--r--arch/arm/mach-davinci/dma.c955
-rw-r--r--arch/arm/mach-davinci/gpio.c105
-rw-r--r--arch/arm/mach-davinci/include/mach/asp.h56
-rw-r--r--arch/arm/mach-davinci/include/mach/common.h2
-rw-r--r--arch/arm/mach-davinci/include/mach/cputype.h24
-rw-r--r--arch/arm/mach-davinci/include/mach/da8xx.h121
-rw-r--r--arch/arm/mach-davinci/include/mach/debug-macro.S8
-rw-r--r--arch/arm/mach-davinci/include/mach/dm355.h7
-rw-r--r--arch/arm/mach-davinci/include/mach/dm365.h29
-rw-r--r--arch/arm/mach-davinci/include/mach/dm644x.h4
-rw-r--r--arch/arm/mach-davinci/include/mach/dm646x.h65
-rw-r--r--arch/arm/mach-davinci/include/mach/edma.h67
-rw-r--r--arch/arm/mach-davinci/include/mach/gpio.h13
-rw-r--r--arch/arm/mach-davinci/include/mach/hardware.h17
-rw-r--r--arch/arm/mach-davinci/include/mach/io.h23
-rw-r--r--arch/arm/mach-davinci/include/mach/irqs.h205
-rw-r--r--arch/arm/mach-davinci/include/mach/memory.h9
-rw-r--r--arch/arm/mach-davinci/include/mach/mux.h731
-rw-r--r--arch/arm/mach-davinci/include/mach/psc.h62
-rw-r--r--arch/arm/mach-davinci/include/mach/serial.h6
-rw-r--r--arch/arm/mach-davinci/include/mach/system.h4
-rw-r--r--arch/arm/mach-davinci/include/mach/uncompress.h7
-rw-r--r--arch/arm/mach-davinci/include/mach/vmalloc.h2
-rw-r--r--arch/arm/mach-davinci/mux.c14
-rw-r--r--arch/arm/mach-davinci/sram.c2
-rw-r--r--arch/arm/mach-davinci/time.c16
-rw-r--r--arch/arm/mach-davinci/usb.c13
-rw-r--r--arch/arm/mach-ep93xx/clock.c88
-rw-r--r--arch/arm/mach-ep93xx/core.c32
-rw-r--r--arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h6
-rw-r--r--arch/arm/mach-ep93xx/include/mach/fb.h56
-rw-r--r--arch/arm/mach-ep93xx/include/mach/platform.h2
-rw-r--r--arch/arm/mach-integrator/integrator_cp.c4
-rw-r--r--arch/arm/mach-iop13xx/include/mach/adma.h119
-rw-r--r--arch/arm/mach-iop13xx/setup.c17
-rw-r--r--arch/arm/mach-ixp4xx/common.c16
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/system.h6
-rw-r--r--arch/arm/mach-nomadik/board-nhk8815.c155
-rw-r--r--arch/arm/mach-nomadik/include/mach/fsmc.h29
-rw-r--r--arch/arm/mach-nomadik/include/mach/nand.h16
-rw-r--r--arch/arm/mach-omap1/board-ams-delta.c43
-rw-r--r--arch/arm/mach-omap1/board-fsample.c5
-rw-r--r--arch/arm/mach-omap1/board-generic.c5
-rw-r--r--arch/arm/mach-omap1/board-h2.c5
-rw-r--r--arch/arm/mach-omap1/board-h3.c5
-rw-r--r--arch/arm/mach-omap1/board-innovator.c5
-rw-r--r--arch/arm/mach-omap1/board-osk.c5
-rw-r--r--arch/arm/mach-omap1/board-palmte.c5
-rw-r--r--arch/arm/mach-omap1/board-palmtt.c5
-rw-r--r--arch/arm/mach-omap1/board-palmz71.c5
-rw-r--r--arch/arm/mach-omap1/board-perseus2.c5
-rw-r--r--arch/arm/mach-omap1/board-sx1.c5
-rw-r--r--arch/arm/mach-omap1/board-voiceblue.c5
-rw-r--r--arch/arm/mach-omap1/devices.c2
-rw-r--r--arch/arm/mach-omap1/io.c6
-rw-r--r--arch/arm/mach-omap1/pm.h4
-rw-r--r--arch/arm/mach-omap1/serial.c17
-rw-r--r--arch/arm/mach-omap1/sram.S12
-rw-r--r--arch/arm/mach-omap1/time.c4
-rw-r--r--arch/arm/mach-omap2/Kconfig9
-rw-r--r--arch/arm/mach-omap2/Makefile10
-rw-r--r--arch/arm/mach-omap2/board-2430sdp.c18
-rw-r--r--arch/arm/mach-omap2/board-3430sdp.c29
-rw-r--r--arch/arm/mach-omap2/board-4430sdp.c5
-rw-r--r--arch/arm/mach-omap2/board-apollon.c29
-rw-r--r--arch/arm/mach-omap2/board-generic.c15
-rw-r--r--arch/arm/mach-omap2/board-h4.c25
-rw-r--r--arch/arm/mach-omap2/board-ldp.c25
-rw-r--r--arch/arm/mach-omap2/board-n8x0.c150
-rw-r--r--arch/arm/mach-omap2/board-omap3beagle.c36
-rw-r--r--arch/arm/mach-omap2/board-omap3evm.c17
-rw-r--r--arch/arm/mach-omap2/board-omap3pandora.c25
-rw-r--r--arch/arm/mach-omap2/board-overo.c24
-rw-r--r--arch/arm/mach-omap2/board-rx51-peripherals.c126
-rw-r--r--arch/arm/mach-omap2/board-rx51.c9
-rw-r--r--arch/arm/mach-omap2/board-zoom-debugboard.c11
-rw-r--r--arch/arm/mach-omap2/board-zoom2.c218
-rw-r--r--arch/arm/mach-omap2/clock.c2
-rw-r--r--arch/arm/mach-omap2/clock34xx.c17
-rw-r--r--arch/arm/mach-omap2/clock34xx.h21
-rw-r--r--arch/arm/mach-omap2/clockdomain.c10
-rw-r--r--arch/arm/mach-omap2/cm.c70
-rw-r--r--arch/arm/mach-omap2/cm.h10
-rw-r--r--arch/arm/mach-omap2/cm4xxx.c68
-rw-r--r--arch/arm/mach-omap2/devices.c112
-rw-r--r--arch/arm/mach-omap2/gpmc.c63
-rw-r--r--arch/arm/mach-omap2/io.c23
-rw-r--r--arch/arm/mach-omap2/iommu2.c19
-rw-r--r--arch/arm/mach-omap2/mmc-twl4030.c78
-rw-r--r--arch/arm/mach-omap2/mmc-twl4030.h2
-rw-r--r--arch/arm/mach-omap2/mux.c55
-rw-r--r--arch/arm/mach-omap2/omap-smp.c2
-rw-r--r--arch/arm/mach-omap2/omap_hwmod.c1554
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2420.h141
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2430.h143
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_34xx.h168
-rw-r--r--arch/arm/mach-omap2/pm-debug.c431
-rw-r--r--arch/arm/mach-omap2/pm.h11
-rw-r--r--arch/arm/mach-omap2/pm24xx.c4
-rw-r--r--arch/arm/mach-omap2/pm34xx.c40
-rw-r--r--arch/arm/mach-omap2/powerdomain.c114
-rw-r--r--arch/arm/mach-omap2/prm.h6
-rw-r--r--arch/arm/mach-omap2/sdrc.h6
-rw-r--r--arch/arm/mach-omap2/serial.c67
-rw-r--r--arch/arm/mach-omap2/sram242x.S4
-rw-r--r--arch/arm/mach-omap2/sram243x.S4
-rw-r--r--arch/arm/mach-omap2/timer-gp.c2
-rw-r--r--arch/arm/mach-omap2/usb-musb.c12
-rw-r--r--arch/arm/mach-pxa/Kconfig36
-rw-r--r--arch/arm/mach-pxa/Makefile4
-rw-r--r--arch/arm/mach-pxa/balloon3.c361
-rw-r--r--arch/arm/mach-pxa/clock.h1
-rw-r--r--arch/arm/mach-pxa/cm-x270.c146
-rw-r--r--arch/arm/mach-pxa/cm-x300.c71
-rw-r--r--arch/arm/mach-pxa/colibri-pxa300.c1
-rw-r--r--arch/arm/mach-pxa/colibri-pxa320.c33
-rw-r--r--arch/arm/mach-pxa/colibri-pxa3xx.c52
-rw-r--r--arch/arm/mach-pxa/corgi.c233
-rw-r--r--arch/arm/mach-pxa/csb726.c54
-rw-r--r--arch/arm/mach-pxa/devices.c27
-rw-r--r--arch/arm/mach-pxa/devices.h2
-rw-r--r--arch/arm/mach-pxa/e740.c1
-rw-r--r--arch/arm/mach-pxa/e750.c1
-rw-r--r--arch/arm/mach-pxa/em-x270.c45
-rw-r--r--arch/arm/mach-pxa/eseries.c39
-rw-r--r--arch/arm/mach-pxa/gumstix.c5
-rw-r--r--arch/arm/mach-pxa/hx4700.c65
-rw-r--r--arch/arm/mach-pxa/idp.c5
-rw-r--r--arch/arm/mach-pxa/imote2.c3
-rw-r--r--arch/arm/mach-pxa/include/mach/balloon3.h134
-rw-r--r--arch/arm/mach-pxa/include/mach/colibri.h6
-rw-r--r--arch/arm/mach-pxa/include/mach/entry-macro.S25
-rw-r--r--arch/arm/mach-pxa/include/mach/hardware.h17
-rw-r--r--arch/arm/mach-pxa/include/mach/irda.h2
-rw-r--r--arch/arm/mach-pxa/include/mach/irqs.h42
-rw-r--r--arch/arm/mach-pxa/include/mach/mfp.h301
-rw-r--r--arch/arm/mach-pxa/include/mach/mmc.h5
-rw-r--r--arch/arm/mach-pxa/include/mach/palmtc.h86
-rw-r--r--arch/arm/mach-pxa/include/mach/palmtx.h5
-rw-r--r--arch/arm/mach-pxa/include/mach/pxa3xx-regs.h4
-rw-r--r--arch/arm/mach-pxa/include/mach/pxafb.h3
-rw-r--r--arch/arm/mach-pxa/include/mach/regs-intc.h11
-rw-r--r--arch/arm/mach-pxa/include/mach/uncompress.h2
-rw-r--r--arch/arm/mach-pxa/irq.c8
-rw-r--r--arch/arm/mach-pxa/littleton.c43
-rw-r--r--arch/arm/mach-pxa/lubbock.c18
-rw-r--r--arch/arm/mach-pxa/magician.c59
-rw-r--r--arch/arm/mach-pxa/mainstone.c16
-rw-r--r--arch/arm/mach-pxa/mioa701.c84
-rw-r--r--arch/arm/mach-pxa/palmld.c143
-rw-r--r--arch/arm/mach-pxa/palmt5.c111
-rw-r--r--arch/arm/mach-pxa/palmtc.c436
-rw-r--r--arch/arm/mach-pxa/palmte2.c110
-rw-r--r--arch/arm/mach-pxa/palmtx.c225
-rw-r--r--arch/arm/mach-pxa/palmz72.c116
-rw-r--r--arch/arm/mach-pxa/pcm990-baseboard.c67
-rw-r--r--arch/arm/mach-pxa/poodle.c80
-rw-r--r--arch/arm/mach-pxa/pxa2xx.c1
-rw-r--r--arch/arm/mach-pxa/pxa300.c2
-rw-r--r--arch/arm/mach-pxa/pxa320.c2
-rw-r--r--arch/arm/mach-pxa/pxa930.c19
-rw-r--r--arch/arm/mach-pxa/spitz.c238
-rw-r--r--arch/arm/mach-pxa/tosa.c91
-rw-r--r--arch/arm/mach-pxa/treo680.c159
-rw-r--r--arch/arm/mach-pxa/trizeps4.c4
-rw-r--r--arch/arm/mach-pxa/xcep.c187
-rw-r--r--arch/arm/mach-pxa/zylonite.c3
-rw-r--r--arch/arm/mach-realview/core.c24
-rw-r--r--arch/arm/mach-realview/core.h4
-rw-r--r--arch/arm/mach-realview/realview_eb.c40
-rw-r--r--arch/arm/mach-realview/realview_pb1176.c40
-rw-r--r--arch/arm/mach-realview/realview_pb11mp.c40
-rw-r--r--arch/arm/mach-realview/realview_pba8.c40
-rw-r--r--arch/arm/mach-realview/realview_pbx.c40
-rw-r--r--arch/arm/mach-s3c2410/Kconfig5
-rw-r--r--arch/arm/mach-s3c2412/Kconfig3
-rw-r--r--arch/arm/mach-s3c2440/Kconfig6
-rw-r--r--arch/arm/mach-s3c6400/Kconfig1
-rw-r--r--arch/arm/mach-s3c6410/Kconfig1
-rw-r--r--arch/arm/mach-sa1100/dma.c2
-rw-r--r--arch/arm/mach-u300/Kconfig12
-rw-r--r--arch/arm/mach-u300/Makefile3
-rw-r--r--arch/arm/mach-u300/core.c14
-rw-r--r--arch/arm/mach-u300/dummyspichip.c290
-rw-r--r--arch/arm/mach-u300/gpio.c13
-rw-r--r--arch/arm/mach-u300/i2c.c43
-rw-r--r--arch/arm/mach-u300/i2c.h23
-rw-r--r--arch/arm/mach-u300/include/mach/memory.h8
-rw-r--r--arch/arm/mach-u300/include/mach/syscon.h120
-rw-r--r--arch/arm/mach-u300/mmc.c22
-rw-r--r--arch/arm/mach-u300/padmux.c395
-rw-r--r--arch/arm/mach-u300/padmux.h28
-rw-r--r--arch/arm/mach-u300/spi.c124
-rw-r--r--arch/arm/mach-u300/spi.h26
-rw-r--r--arch/arm/mach-u300/timer.c15
-rw-r--r--arch/arm/mach-versatile/core.c4
-rw-r--r--arch/arm/mach-versatile/versatile_pb.c4
-rw-r--r--arch/arm/mm/Kconfig5
-rw-r--r--arch/arm/mm/context.c2
-rw-r--r--arch/arm/mm/fault.c110
-rw-r--r--arch/arm/mm/flush.c10
-rw-r--r--arch/arm/mm/init.c12
-rw-r--r--arch/arm/plat-iop/adma.c4
-rw-r--r--arch/arm/plat-mxc/include/mach/spi.h27
-rw-r--r--arch/arm/plat-omap/Kconfig17
-rw-r--r--arch/arm/plat-omap/Makefile6
-rw-r--r--arch/arm/plat-omap/clock.c2
-rw-r--r--arch/arm/plat-omap/common.c95
-rw-r--r--arch/arm/plat-omap/dma.c8
-rw-r--r--arch/arm/plat-omap/dmtimer.c5
-rw-r--r--arch/arm/plat-omap/gpio.c115
-rw-r--r--arch/arm/plat-omap/include/mach/board.h2
-rw-r--r--arch/arm/plat-omap/include/mach/clockdomain.h3
-rw-r--r--arch/arm/plat-omap/include/mach/control.h12
-rw-r--r--arch/arm/plat-omap/include/mach/entry-macro.S8
-rw-r--r--arch/arm/plat-omap/include/mach/gpio.h2
-rw-r--r--arch/arm/plat-omap/include/mach/gpmc.h4
-rw-r--r--arch/arm/plat-omap/include/mach/io.h97
-rw-r--r--arch/arm/plat-omap/include/mach/iommu.h6
-rw-r--r--arch/arm/plat-omap/include/mach/irqs.h2
-rw-r--r--arch/arm/plat-omap/include/mach/lcd_mipid.h5
-rw-r--r--arch/arm/plat-omap/include/mach/mmc.h20
-rw-r--r--arch/arm/plat-omap/include/mach/mtd-xip.h2
-rw-r--r--arch/arm/plat-omap/include/mach/mux.h31
-rw-r--r--arch/arm/plat-omap/include/mach/omap-pm.h301
-rw-r--r--arch/arm/plat-omap/include/mach/omap44xx.h8
-rw-r--r--arch/arm/plat-omap/include/mach/omap_device.h141
-rw-r--r--arch/arm/plat-omap/include/mach/omap_hwmod.h447
-rw-r--r--arch/arm/plat-omap/include/mach/omapfb.h4
-rw-r--r--arch/arm/plat-omap/include/mach/powerdomain.h15
-rw-r--r--arch/arm/plat-omap/include/mach/sdrc.h15
-rw-r--r--arch/arm/plat-omap/include/mach/serial.h3
-rw-r--r--arch/arm/plat-omap/io.c62
-rw-r--r--arch/arm/plat-omap/iommu-debug.c415
-rw-r--r--arch/arm/plat-omap/iommu.c23
-rw-r--r--arch/arm/plat-omap/iovmm.c2
-rw-r--r--arch/arm/plat-omap/omap-pm-noop.c296
-rw-r--r--arch/arm/plat-omap/omap_device.c687
-rw-r--r--arch/arm/plat-omap/sram.c20
-rw-r--r--arch/arm/plat-pxa/dma.c281
-rw-r--r--arch/arm/plat-pxa/include/plat/mfp.h73
-rw-r--r--arch/arm/plat-pxa/mfp.c3
-rw-r--r--arch/arm/plat-s3c/gpio.c2
-rw-r--r--arch/arm/plat-s3c64xx/dma.c6
-rw-r--r--arch/arm/plat-s3c64xx/include/plat/dma-plat.h2
-rw-r--r--arch/arm/plat-s3c64xx/include/plat/irqs.h10
-rw-r--r--arch/arm/plat-s3c64xx/s3c6400-clock.c8
-rw-r--r--arch/arm/plat-stmp3xxx/dma.c2
-rw-r--r--arch/arm/tools/mach-types20
-rw-r--r--arch/avr32/include/asm/mman.h18
-rw-r--r--arch/avr32/kernel/init_task.c5
-rw-r--r--arch/avr32/mm/init.c6
-rw-r--r--arch/blackfin/Kconfig25
-rw-r--r--arch/blackfin/Kconfig.debug6
-rw-r--r--arch/blackfin/Makefile4
-rw-r--r--arch/blackfin/boot/install.sh6
-rw-r--r--arch/blackfin/configs/BF518F-EZBRD_defconfig4
-rw-r--r--arch/blackfin/configs/BF526-EZBRD_defconfig4
-rw-r--r--arch/blackfin/configs/BF527-EZKIT_defconfig4
-rw-r--r--arch/blackfin/configs/BF548-EZKIT_defconfig2
-rw-r--r--arch/blackfin/include/asm/bfin-global.h6
-rw-r--r--arch/blackfin/include/asm/bfin5xx_spi.h1
-rw-r--r--arch/blackfin/include/asm/cplb.h46
-rw-r--r--arch/blackfin/include/asm/early_printk.h24
-rw-r--r--arch/blackfin/include/asm/elf.h2
-rw-r--r--arch/blackfin/include/asm/entry.h30
-rw-r--r--arch/blackfin/include/asm/ftrace.h2
-rw-r--r--arch/blackfin/include/asm/ipipe.h7
-rw-r--r--arch/blackfin/include/asm/irq_handler.h1
-rw-r--r--arch/blackfin/include/asm/mmu_context.h6
-rw-r--r--arch/blackfin/include/asm/pda.h7
-rw-r--r--arch/blackfin/include/asm/sections.h38
-rw-r--r--arch/blackfin/include/asm/unistd.h2
-rw-r--r--arch/blackfin/kernel/Makefile1
-rw-r--r--arch/blackfin/kernel/asm-offsets.c7
-rw-r--r--arch/blackfin/kernel/bfin_dma_5xx.c14
-rw-r--r--arch/blackfin/kernel/bfin_gpio.c1
-rw-r--r--arch/blackfin/kernel/cplb-mpu/Makefile2
-rw-r--r--arch/blackfin/kernel/cplb-mpu/cacheinit.c69
-rw-r--r--arch/blackfin/kernel/cplb-mpu/cplbmgr.c63
-rw-r--r--arch/blackfin/kernel/cplb-nompu/Makefile2
-rw-r--r--arch/blackfin/kernel/cplb-nompu/cacheinit.c69
-rw-r--r--arch/blackfin/kernel/cplb-nompu/cplbinit.c11
-rw-r--r--arch/blackfin/kernel/cplb-nompu/cplbmgr.c35
-rw-r--r--arch/blackfin/kernel/early_printk.c74
-rw-r--r--arch/blackfin/kernel/entry.S24
-rw-r--r--arch/blackfin/kernel/ftrace-entry.S23
-rw-r--r--arch/blackfin/kernel/ftrace.c2
-rw-r--r--arch/blackfin/kernel/ipipe.c83
-rw-r--r--arch/blackfin/kernel/kgdb_test.c2
-rw-r--r--arch/blackfin/kernel/module.c266
-rw-r--r--arch/blackfin/kernel/process.c10
-rw-r--r--arch/blackfin/kernel/ptrace.c155
-rw-r--r--arch/blackfin/kernel/setup.c120
-rw-r--r--arch/blackfin/kernel/shadow_console.c113
-rw-r--r--arch/blackfin/kernel/time-ts.c4
-rw-r--r--arch/blackfin/kernel/traps.c88
-rw-r--r--arch/blackfin/kernel/vmlinux.lds.S60
-rw-r--r--arch/blackfin/lib/ins.S4
-rw-r--r--arch/blackfin/mach-bf518/boards/ezbrd.c29
-rw-r--r--arch/blackfin/mach-bf518/include/mach/anomaly.h1
-rw-r--r--arch/blackfin/mach-bf518/include/mach/blackfin.h10
-rw-r--r--arch/blackfin/mach-bf527/boards/cm_bf527.c164
-rw-r--r--arch/blackfin/mach-bf527/boards/ezbrd.c29
-rw-r--r--arch/blackfin/mach-bf527/boards/ezkit.c58
-rw-r--r--arch/blackfin/mach-bf527/include/mach/anomaly.h13
-rw-r--r--arch/blackfin/mach-bf527/include/mach/blackfin.h10
-rw-r--r--arch/blackfin/mach-bf533/boards/H8606.c39
-rw-r--r--arch/blackfin/mach-bf533/boards/blackstamp.c11
-rw-r--r--arch/blackfin/mach-bf533/boards/cm_bf533.c127
-rw-r--r--arch/blackfin/mach-bf533/boards/ezkit.c13
-rw-r--r--arch/blackfin/mach-bf533/boards/stamp.c83
-rw-r--r--arch/blackfin/mach-bf533/dma.c8
-rw-r--r--arch/blackfin/mach-bf533/include/mach/bfin_serial_5xx.h8
-rw-r--r--arch/blackfin/mach-bf533/include/mach/blackfin.h7
-rw-r--r--arch/blackfin/mach-bf537/boards/Kconfig12
-rw-r--r--arch/blackfin/mach-bf537/boards/Makefile3
-rw-r--r--arch/blackfin/mach-bf537/boards/cm_bf537e.c727
-rw-r--r--arch/blackfin/mach-bf537/boards/cm_bf537u.c (renamed from arch/blackfin/mach-bf537/boards/cm_bf537.c)47
-rw-r--r--arch/blackfin/mach-bf537/boards/pnav10.c29
-rw-r--r--arch/blackfin/mach-bf537/boards/stamp.c249
-rw-r--r--arch/blackfin/mach-bf537/boards/tcm_bf537.c43
-rw-r--r--arch/blackfin/mach-bf537/dma.c8
-rw-r--r--arch/blackfin/mach-bf537/include/mach/anomaly.h2
-rw-r--r--arch/blackfin/mach-bf537/include/mach/blackfin.h90
-rw-r--r--arch/blackfin/mach-bf538/boards/ezkit.c65
-rw-r--r--arch/blackfin/mach-bf538/include/mach/anomaly.h2
-rw-r--r--arch/blackfin/mach-bf538/include/mach/blackfin.h10
-rw-r--r--arch/blackfin/mach-bf538/include/mach/cdefBF538.h1
-rw-r--r--arch/blackfin/mach-bf538/include/mach/defBF539.h2
-rw-r--r--arch/blackfin/mach-bf548/boards/cm_bf548.c19
-rw-r--r--arch/blackfin/mach-bf548/boards/ezkit.c12
-rw-r--r--arch/blackfin/mach-bf548/dma.c8
-rw-r--r--arch/blackfin/mach-bf548/include/mach/anomaly.h21
-rw-r--r--arch/blackfin/mach-bf548/include/mach/blackfin.h89
-rw-r--r--arch/blackfin/mach-bf561/boards/cm_bf561.c141
-rw-r--r--arch/blackfin/mach-bf561/boards/ezkit.c13
-rw-r--r--arch/blackfin/mach-bf561/include/mach/anomaly.h2
-rw-r--r--arch/blackfin/mach-bf561/secondary.S28
-rw-r--r--arch/blackfin/mach-common/Makefile1
-rw-r--r--arch/blackfin/mach-common/cache-c.c44
-rw-r--r--arch/blackfin/mach-common/entry.S193
-rw-r--r--arch/blackfin/mach-common/head.S19
-rw-r--r--arch/blackfin/mach-common/interrupt.S78
-rw-r--r--arch/blackfin/mach-common/ints-priority.c19
-rw-r--r--arch/blackfin/mach-common/lock.S223
-rw-r--r--arch/blackfin/mach-common/pm.c64
-rw-r--r--arch/blackfin/mm/init.c3
-rw-r--r--arch/blackfin/mm/isram-driver.c222
-rw-r--r--arch/blackfin/mm/sram-alloc.c30
-rw-r--r--arch/cris/Makefile2
-rw-r--r--arch/cris/arch-v10/kernel/time.c1
-rw-r--r--arch/cris/arch-v32/kernel/smp.c2
-rw-r--r--arch/cris/arch-v32/kernel/time.c1
-rw-r--r--arch/cris/arch-v32/mach-a3/io.c2
-rw-r--r--arch/cris/arch-v32/mach-fs/io.c2
-rw-r--r--arch/cris/include/arch-v10/arch/mmu.h9
-rw-r--r--arch/cris/include/arch-v32/arch/mmu.h10
-rw-r--r--arch/cris/include/asm/hardirq.h12
-rw-r--r--arch/cris/include/asm/mman.h20
-rw-r--r--arch/cris/include/asm/pgtable.h2
-rw-r--r--arch/cris/kernel/Makefile1
-rw-r--r--arch/cris/kernel/irq.c5
-rw-r--r--arch/cris/kernel/process.c5
-rw-r--r--arch/cris/kernel/vmlinux.lds.S37
-rw-r--r--arch/cris/mm/init.c2
-rw-r--r--arch/frv/Kconfig2
-rw-r--r--arch/frv/include/asm/gdb-stub.h1
-rw-r--r--arch/frv/include/asm/hardirq.h17
-rw-r--r--arch/frv/include/asm/mman.h19
-rw-r--r--arch/frv/include/asm/perf_event.h (renamed from arch/frv/include/asm/perf_counter.h)10
-rw-r--r--arch/frv/include/asm/unistd.h2
-rw-r--r--arch/frv/kernel/debug-stub.c1
-rw-r--r--arch/frv/kernel/entry.S2
-rw-r--r--arch/frv/kernel/init_task.c5
-rw-r--r--arch/frv/kernel/pm.c14
-rw-r--r--arch/frv/kernel/process.c4
-rw-r--r--arch/frv/kernel/sys_frv.c1
-rw-r--r--arch/frv/kernel/vmlinux.lds.S66
-rw-r--r--arch/frv/lib/Makefile2
-rw-r--r--arch/frv/lib/cache.S2
-rw-r--r--arch/frv/lib/perf_event.c (renamed from arch/frv/lib/perf_counter.c)8
-rw-r--r--arch/frv/mb93090-mb00/Makefile2
-rw-r--r--arch/frv/mb93090-mb00/flash.c90
-rw-r--r--arch/frv/mb93090-mb00/pci-frv.c10
-rw-r--r--arch/h8300/include/asm/hardirq.h15
-rw-r--r--arch/h8300/include/asm/mman.h18
-rw-r--r--arch/h8300/include/asm/pci.h1
-rw-r--r--arch/h8300/kernel/init_task.c5
-rw-r--r--arch/h8300/kernel/irq.c5
-rw-r--r--arch/h8300/kernel/sys_h8300.c1
-rw-r--r--arch/h8300/kernel/timer/tpu.c1
-rw-r--r--arch/h8300/kernel/vmlinux.lds.S25
-rw-r--r--arch/ia64/Kconfig4
-rw-r--r--arch/ia64/hp/common/sba_iommu.c7
-rw-r--r--arch/ia64/ia32/sys_ia32.c2
-rw-r--r--arch/ia64/include/asm/cputime.h1
-rw-r--r--arch/ia64/include/asm/mca.h2
-rw-r--r--arch/ia64/include/asm/mman.h14
-rw-r--r--arch/ia64/include/asm/pci.h14
-rw-r--r--arch/ia64/include/asm/smp.h1
-rw-r--r--arch/ia64/include/asm/topology.h20
-rw-r--r--arch/ia64/install.sh4
-rw-r--r--arch/ia64/kernel/Makefile.gate2
-rw-r--r--arch/ia64/kernel/crash.c83
-rw-r--r--arch/ia64/kernel/head.S7
-rw-r--r--arch/ia64/kernel/head.h1
-rw-r--r--arch/ia64/kernel/init_task.c3
-rw-r--r--arch/ia64/kernel/machine_kexec.c15
-rw-r--r--arch/ia64/kernel/mca.c15
-rw-r--r--arch/ia64/kernel/mca_asm.S47
-rw-r--r--arch/ia64/kernel/pci-swiotlb.c2
-rw-r--r--arch/ia64/kernel/relocate_kernel.S2
-rw-r--r--arch/ia64/kernel/smp.c2
-rw-r--r--arch/ia64/kernel/vmlinux.lds.S113
-rw-r--r--arch/ia64/mm/init.c7
-rw-r--r--arch/ia64/sn/pci/pcibr/pcibr_ate.c2
-rw-r--r--arch/m32r/Kconfig6
-rw-r--r--arch/m32r/boot/compressed/install.sh4
-rw-r--r--arch/m32r/include/asm/hardirq.h15
-rw-r--r--arch/m32r/include/asm/mman.h18
-rw-r--r--arch/m32r/include/asm/mmu_context.h4
-rw-r--r--arch/m32r/include/asm/page.h4
-rw-r--r--arch/m32r/include/asm/processor.h2
-rw-r--r--arch/m32r/include/asm/smp.h2
-rw-r--r--arch/m32r/include/asm/thread_info.h15
-rw-r--r--arch/m32r/kernel/entry.S7
-rw-r--r--arch/m32r/kernel/head.S4
-rw-r--r--arch/m32r/kernel/init_task.c5
-rw-r--r--arch/m32r/kernel/ptrace.c5
-rw-r--r--arch/m32r/kernel/smp.c30
-rw-r--r--arch/m32r/kernel/smpboot.c4
-rw-r--r--arch/m32r/kernel/time.c74
-rw-r--r--arch/m32r/kernel/vmlinux.lds.S78
-rw-r--r--arch/m32r/mm/init.c2
-rw-r--r--arch/m68k/Kconfig6
-rw-r--r--arch/m68k/include/asm/checksum.h173
-rw-r--r--arch/m68k/include/asm/checksum_mm.h148
-rw-r--r--arch/m68k/include/asm/checksum_no.h132
-rw-r--r--arch/m68k/include/asm/dma.h492
-rw-r--r--arch/m68k/include/asm/dma_mm.h16
-rw-r--r--arch/m68k/include/asm/dma_no.h494
-rw-r--r--arch/m68k/include/asm/elia.h41
-rw-r--r--arch/m68k/include/asm/gpio.h238
-rw-r--r--arch/m68k/include/asm/hardirq_mm.h12
-rw-r--r--arch/m68k/include/asm/hardirq_no.h10
-rw-r--r--arch/m68k/include/asm/io_no.h2
-rw-r--r--arch/m68k/include/asm/irq.h135
-rw-r--r--arch/m68k/include/asm/irq_mm.h126
-rw-r--r--arch/m68k/include/asm/irq_no.h26
-rw-r--r--arch/m68k/include/asm/m5206sim.h33
-rw-r--r--arch/m68k/include/asm/m520xsim.h77
-rw-r--r--arch/m68k/include/asm/m523xsim.h77
-rw-r--r--arch/m68k/include/asm/m5249sim.h54
-rw-r--r--arch/m68k/include/asm/m5272sim.h62
-rw-r--r--arch/m68k/include/asm/m527xsim.h169
-rw-r--r--arch/m68k/include/asm/m528xsim.h151
-rw-r--r--arch/m68k/include/asm/m5307sim.h32
-rw-r--r--arch/m68k/include/asm/m532xsim.h198
-rw-r--r--arch/m68k/include/asm/m5407sim.h28
-rw-r--r--arch/m68k/include/asm/mcfgpio.h40
-rw-r--r--arch/m68k/include/asm/mcfintc.h89
-rw-r--r--arch/m68k/include/asm/mcfne.h83
-rw-r--r--arch/m68k/include/asm/mcfsim.h95
-rw-r--r--arch/m68k/include/asm/mcfsmc.h6
-rw-r--r--arch/m68k/include/asm/mman.h18
-rw-r--r--arch/m68k/include/asm/nettel.h4
-rw-r--r--arch/m68k/include/asm/page_no.h4
-rw-r--r--arch/m68k/include/asm/pinmux.h30
-rw-r--r--arch/m68k/include/asm/processor.h171
-rw-r--r--arch/m68k/include/asm/processor_mm.h130
-rw-r--r--arch/m68k/include/asm/processor_no.h143
-rw-r--r--arch/m68k/include/asm/timex.h17
-rw-r--r--arch/m68k/include/asm/unistd.h2
-rw-r--r--arch/m68k/install.sh4
-rw-r--r--arch/m68k/kernel/entry.S2
-rw-r--r--arch/m68k/kernel/process.c6
-rw-r--r--arch/m68k/kernel/sys_m68k.c1
-rw-r--r--arch/m68k/kernel/time.c70
-rw-r--r--arch/m68k/mm/init.c2
-rw-r--r--arch/m68knommu/Kconfig6
-rw-r--r--arch/m68knommu/kernel/init_task.c5
-rw-r--r--arch/m68knommu/kernel/irq.c26
-rw-r--r--arch/m68knommu/kernel/sys_m68k.c1
-rw-r--r--arch/m68knommu/kernel/syscalltable.S2
-rw-r--r--arch/m68knommu/kernel/time.c7
-rw-r--r--arch/m68knommu/lib/checksum.c11
-rw-r--r--arch/m68knommu/platform/5206/Makefile2
-rw-r--r--arch/m68knommu/platform/5206/config.c56
-rw-r--r--arch/m68knommu/platform/5206/gpio.c49
-rw-r--r--arch/m68knommu/platform/5206e/Makefile2
-rw-r--r--arch/m68knommu/platform/5206e/config.c58
-rw-r--r--arch/m68knommu/platform/5206e/gpio.c49
-rw-r--r--arch/m68knommu/platform/520x/Makefile2
-rw-r--r--arch/m68knommu/platform/520x/config.c30
-rw-r--r--arch/m68knommu/platform/520x/gpio.c211
-rw-r--r--arch/m68knommu/platform/523x/Makefile2
-rw-r--r--arch/m68knommu/platform/523x/config.c66
-rw-r--r--arch/m68knommu/platform/523x/gpio.c283
-rw-r--r--arch/m68knommu/platform/5249/Makefile2
-rw-r--r--arch/m68knommu/platform/5249/config.c49
-rw-r--r--arch/m68knommu/platform/5249/gpio.c65
-rw-r--r--arch/m68knommu/platform/5249/intc2.c59
-rw-r--r--arch/m68knommu/platform/5272/Makefile2
-rw-r--r--arch/m68knommu/platform/5272/config.c78
-rw-r--r--arch/m68knommu/platform/5272/gpio.c81
-rw-r--r--arch/m68knommu/platform/5272/intc.c138
-rw-r--r--arch/m68knommu/platform/527x/Makefile2
-rw-r--r--arch/m68knommu/platform/527x/config.c49
-rw-r--r--arch/m68knommu/platform/527x/gpio.c607
-rw-r--r--arch/m68knommu/platform/528x/Makefile2
-rw-r--r--arch/m68knommu/platform/528x/config.c51
-rw-r--r--arch/m68knommu/platform/528x/gpio.c438
-rw-r--r--arch/m68knommu/platform/5307/Makefile2
-rw-r--r--arch/m68knommu/platform/5307/config.c65
-rw-r--r--arch/m68knommu/platform/5307/gpio.c49
-rw-r--r--arch/m68knommu/platform/532x/Makefile2
-rw-r--r--arch/m68knommu/platform/532x/config.c53
-rw-r--r--arch/m68knommu/platform/532x/gpio.c337
-rw-r--r--arch/m68knommu/platform/5407/Makefile2
-rw-r--r--arch/m68knommu/platform/5407/config.c68
-rw-r--r--arch/m68knommu/platform/5407/gpio.c49
-rw-r--r--arch/m68knommu/platform/68328/ints.c72
-rw-r--r--arch/m68knommu/platform/68360/ints.c44
-rw-r--r--arch/m68knommu/platform/coldfire/Makefile21
-rw-r--r--arch/m68knommu/platform/coldfire/gpio.c127
-rw-r--r--arch/m68knommu/platform/coldfire/intc-2.c93
-rw-r--r--arch/m68knommu/platform/coldfire/intc-simr.c78
-rw-r--r--arch/m68knommu/platform/coldfire/intc.c153
-rw-r--r--arch/m68knommu/platform/coldfire/pinmux.c28
-rw-r--r--arch/m68knommu/platform/coldfire/pit.c8
-rw-r--r--arch/m68knommu/platform/coldfire/timers.c18
-rw-r--r--arch/m68knommu/platform/coldfire/vectors.c20
-rw-r--r--arch/microblaze/Kconfig1
-rw-r--r--arch/microblaze/Makefile31
-rw-r--r--arch/microblaze/boot/Makefile41
l---------arch/microblaze/boot/dts/system.dts1
-rw-r--r--arch/microblaze/boot/linked_dtb.S3
-rw-r--r--arch/microblaze/configs/mmu_defconfig30
-rw-r--r--arch/microblaze/configs/nommu_defconfig35
-rw-r--r--arch/microblaze/include/asm/asm-compat.h17
-rw-r--r--arch/microblaze/include/asm/io.h3
-rw-r--r--arch/microblaze/include/asm/ipc.h1
-rw-r--r--arch/microblaze/include/asm/page.h3
-rw-r--r--arch/microblaze/include/asm/setup.h2
-rw-r--r--arch/microblaze/include/asm/syscall.h99
-rw-r--r--arch/microblaze/include/asm/unistd.h2
-rw-r--r--arch/microblaze/kernel/cpu/cpuinfo.c3
-rw-r--r--arch/microblaze/kernel/entry.S72
-rw-r--r--arch/microblaze/kernel/exceptions.c33
-rw-r--r--arch/microblaze/kernel/head.S14
-rw-r--r--arch/microblaze/kernel/hw_exception_handler.S10
-rw-r--r--arch/microblaze/kernel/init_task.c5
-rw-r--r--arch/microblaze/kernel/process.c1
-rw-r--r--arch/microblaze/kernel/ptrace.c62
-rw-r--r--arch/microblaze/kernel/setup.c12
-rw-r--r--arch/microblaze/kernel/sys_microblaze.c1
-rw-r--r--arch/microblaze/kernel/syscall_table.S2
-rw-r--r--arch/microblaze/kernel/vmlinux.lds.S72
-rw-r--r--arch/microblaze/mm/init.c5
-rw-r--r--arch/mips/Kconfig88
-rw-r--r--arch/mips/Makefile49
-rw-r--r--arch/mips/alchemy/common/setup.c4
-rw-r--r--arch/mips/alchemy/common/time.c17
-rw-r--r--arch/mips/ar7/platform.c32
-rw-r--r--arch/mips/bcm63xx/Kconfig25
-rw-r--r--arch/mips/bcm63xx/Makefile7
-rw-r--r--arch/mips/bcm63xx/boards/Kconfig11
-rw-r--r--arch/mips/bcm63xx/boards/Makefile3
-rw-r--r--arch/mips/bcm63xx/boards/board_bcm963xx.c837
-rw-r--r--arch/mips/bcm63xx/clk.c226
-rw-r--r--arch/mips/bcm63xx/cpu.c345
-rw-r--r--arch/mips/bcm63xx/cs.c144
-rw-r--r--arch/mips/bcm63xx/dev-dsp.c56
-rw-r--r--arch/mips/bcm63xx/dev-enet.c159
-rw-r--r--arch/mips/bcm63xx/early_printk.c30
-rw-r--r--arch/mips/bcm63xx/gpio.c134
-rw-r--r--arch/mips/bcm63xx/irq.c253
-rw-r--r--arch/mips/bcm63xx/prom.c55
-rw-r--r--arch/mips/bcm63xx/setup.c125
-rw-r--r--arch/mips/bcm63xx/timer.c205
-rw-r--r--arch/mips/boot/elf2ecoff.c4
-rw-r--r--arch/mips/cavium-octeon/Makefile4
-rw-r--r--arch/mips/cavium-octeon/octeon-platform.c164
-rw-r--r--arch/mips/cavium-octeon/setup.c103
-rw-r--r--arch/mips/configs/ar7_defconfig1
-rw-r--r--arch/mips/configs/bcm47xx_defconfig1
-rw-r--r--arch/mips/configs/bcm63xx_defconfig972
-rw-r--r--arch/mips/configs/bigsur_defconfig1
-rw-r--r--arch/mips/configs/cobalt_defconfig1
-rw-r--r--arch/mips/configs/db1000_defconfig1
-rw-r--r--arch/mips/configs/db1100_defconfig1
-rw-r--r--arch/mips/configs/db1200_defconfig1
-rw-r--r--arch/mips/configs/db1500_defconfig1
-rw-r--r--arch/mips/configs/db1550_defconfig1
-rw-r--r--arch/mips/configs/excite_defconfig1
-rw-r--r--arch/mips/configs/fuloong2e_defconfig (renamed from arch/mips/configs/fulong_defconfig)473
-rw-r--r--arch/mips/configs/ip22_defconfig1
-rw-r--r--arch/mips/configs/ip27_defconfig1
-rw-r--r--arch/mips/configs/ip28_defconfig1
-rw-r--r--arch/mips/configs/ip32_defconfig1
-rw-r--r--arch/mips/configs/jazz_defconfig1
-rw-r--r--arch/mips/configs/lasat_defconfig1
-rw-r--r--arch/mips/configs/malta_defconfig1
-rw-r--r--arch/mips/configs/markeins_defconfig1
-rw-r--r--arch/mips/configs/mipssim_defconfig1
-rw-r--r--arch/mips/configs/msp71xx_defconfig1
-rw-r--r--arch/mips/configs/mtx1_defconfig1
-rw-r--r--arch/mips/configs/pb1100_defconfig1
-rw-r--r--arch/mips/configs/pb1500_defconfig1
-rw-r--r--arch/mips/configs/pb1550_defconfig1
-rw-r--r--arch/mips/configs/pnx8335-stb225_defconfig1
-rw-r--r--arch/mips/configs/pnx8550-jbs_defconfig1
-rw-r--r--arch/mips/configs/pnx8550-stb810_defconfig1
-rw-r--r--arch/mips/configs/rb532_defconfig1
-rw-r--r--arch/mips/configs/rbtx49xx_defconfig1
-rw-r--r--arch/mips/configs/rm200_defconfig1
-rw-r--r--arch/mips/configs/sb1250-swarm_defconfig1
-rw-r--r--arch/mips/configs/wrppmc_defconfig1
-rw-r--r--arch/mips/configs/yosemite_defconfig1
-rw-r--r--arch/mips/dec/prom/memory.c2
-rw-r--r--arch/mips/dec/time.c5
-rw-r--r--arch/mips/emma/markeins/setup.c2
-rw-r--r--arch/mips/fw/arc/Makefile2
-rw-r--r--arch/mips/fw/cfe/cfe_api.c4
-rw-r--r--arch/mips/include/asm/atomic.h40
-rw-r--r--arch/mips/include/asm/bitops.h34
-rw-r--r--arch/mips/include/asm/bootinfo.h12
-rw-r--r--arch/mips/include/asm/cmpxchg.h4
-rw-r--r--arch/mips/include/asm/cpu-features.h3
-rw-r--r--arch/mips/include/asm/cpu.h7
-rw-r--r--arch/mips/include/asm/delay.h2
-rw-r--r--arch/mips/include/asm/fixmap.h4
-rw-r--r--arch/mips/include/asm/hardirq.h12
-rw-r--r--arch/mips/include/asm/lasat/lasat.h1
-rw-r--r--arch/mips/include/asm/local.h8
-rw-r--r--arch/mips/include/asm/mach-au1x00/gpio-au1000.h9
-rw-r--r--arch/mips/include/asm/mach-bcm63xx/bcm63xx_board.h12
-rw-r--r--arch/mips/include/asm/mach-bcm63xx/bcm63xx_clk.h11
-rw-r--r--arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h538
-rw-r--r--arch/mips/include/asm/mach-bcm63xx/bcm63xx_cs.h10
-rw-r--r--arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_dsp.h13
-rw-r--r--arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_enet.h45
-rw-r--r--arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_pci.h6
-rw-r--r--arch/mips/include/asm/mach-bcm63xx/bcm63xx_gpio.h22
-rw-r--r--arch/mips/include/asm/mach-bcm63xx/bcm63xx_io.h93
-rw-r--r--arch/mips/include/asm/mach-bcm63xx/bcm63xx_irq.h15
-rw-r--r--arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h773
-rw-r--r--arch/mips/include/asm/mach-bcm63xx/bcm63xx_timer.h11
-rw-r--r--arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h60
-rw-r--r--arch/mips/include/asm/mach-bcm63xx/cpu-feature-overrides.h51
-rw-r--r--arch/mips/include/asm/mach-bcm63xx/gpio.h15
-rw-r--r--arch/mips/include/asm/mach-bcm63xx/war.h25
-rw-r--r--arch/mips/include/asm/mach-cavium-octeon/cpu-feature-overrides.h12
-rw-r--r--arch/mips/include/asm/mach-ip27/topology.h3
-rw-r--r--arch/mips/include/asm/mach-loongson/cpu-feature-overrides.h (renamed from arch/mips/include/asm/mach-lemote/cpu-feature-overrides.h)6
-rw-r--r--arch/mips/include/asm/mach-loongson/dma-coherence.h (renamed from arch/mips/include/asm/mach-lemote/dma-coherence.h)6
-rw-r--r--arch/mips/include/asm/mach-loongson/loongson.h64
-rw-r--r--arch/mips/include/asm/mach-loongson/machine.h22
-rw-r--r--arch/mips/include/asm/mach-loongson/mc146818rtc.h (renamed from arch/mips/include/asm/mach-lemote/mc146818rtc.h)6
-rw-r--r--arch/mips/include/asm/mach-loongson/mem.h30
-rw-r--r--arch/mips/include/asm/mach-loongson/pci.h (renamed from arch/mips/include/asm/mach-lemote/pci.h)21
-rw-r--r--arch/mips/include/asm/mach-loongson/war.h (renamed from arch/mips/include/asm/mach-lemote/war.h)6
-rw-r--r--arch/mips/include/asm/mach-malta/cpu-feature-overrides.h4
-rw-r--r--arch/mips/include/asm/mips-boards/bonito64.h2
-rw-r--r--arch/mips/include/asm/mips-boards/generic.h2
-rw-r--r--arch/mips/include/asm/mman.h5
-rw-r--r--arch/mips/include/asm/mmu_context.h10
-rw-r--r--arch/mips/include/asm/octeon/cvmx-rnm-defs.h88
-rw-r--r--arch/mips/include/asm/octeon/cvmx.h2
-rw-r--r--arch/mips/include/asm/page.h5
-rw-r--r--arch/mips/include/asm/pci.h2
-rw-r--r--arch/mips/include/asm/pgtable-64.h11
-rw-r--r--arch/mips/include/asm/pgtable.h10
-rw-r--r--arch/mips/include/asm/smp-ops.h2
-rw-r--r--arch/mips/include/asm/smp.h2
-rw-r--r--arch/mips/include/asm/system.h18
-rw-r--r--arch/mips/include/asm/unistd.h6
-rw-r--r--arch/mips/kernel/asm-offsets.c3
-rw-r--r--arch/mips/kernel/cpu-bugs64.c2
-rw-r--r--arch/mips/kernel/cpu-probe.c40
-rw-r--r--arch/mips/kernel/init_task.c5
-rw-r--r--arch/mips/kernel/kspd.c6
-rw-r--r--arch/mips/kernel/mips-mt-fpaff.c2
-rw-r--r--arch/mips/kernel/mips-mt.c10
-rw-r--r--arch/mips/kernel/octeon_switch.S3
-rw-r--r--arch/mips/kernel/r2300_switch.S3
-rw-r--r--arch/mips/kernel/r4k_switch.S3
-rw-r--r--arch/mips/kernel/rtlx.c2
-rw-r--r--arch/mips/kernel/scall32-o32.S74
-rw-r--r--arch/mips/kernel/scall64-64.S74
-rw-r--r--arch/mips/kernel/scall64-n32.S2
-rw-r--r--arch/mips/kernel/scall64-o32.S2
-rw-r--r--arch/mips/kernel/setup.c2
-rw-r--r--arch/mips/kernel/smp-cmp.c6
-rw-r--r--arch/mips/kernel/smp-mt.c6
-rw-r--r--arch/mips/kernel/smp-up.c3
-rw-r--r--arch/mips/kernel/smp.c11
-rw-r--r--arch/mips/kernel/smtc.c16
-rw-r--r--arch/mips/kernel/syscall.c112
-rw-r--r--arch/mips/kernel/traps.c5
-rw-r--r--arch/mips/kernel/vmlinux.lds.S106
-rw-r--r--arch/mips/kernel/vpe.c2
-rw-r--r--arch/mips/lasat/ds1603.c5
-rw-r--r--arch/mips/lasat/sysctl.c26
-rw-r--r--arch/mips/lemote/lm2e/Makefile7
-rw-r--r--arch/mips/lemote/lm2e/dbg_io.c146
-rw-r--r--arch/mips/lemote/lm2e/irq.c143
-rw-r--r--arch/mips/lemote/lm2e/pci.c97
-rw-r--r--arch/mips/lemote/lm2e/prom.c97
-rw-r--r--arch/mips/lemote/lm2e/reset.c41
-rw-r--r--arch/mips/lemote/lm2e/setup.c111
-rw-r--r--arch/mips/loongson/Kconfig31
-rw-r--r--arch/mips/loongson/Makefile11
-rw-r--r--arch/mips/loongson/common/Makefile11
-rw-r--r--arch/mips/loongson/common/bonito-irq.c (renamed from arch/mips/lemote/lm2e/bonito-irq.c)27
-rw-r--r--arch/mips/loongson/common/cmdline.c52
-rw-r--r--arch/mips/loongson/common/early_printk.c38
-rw-r--r--arch/mips/loongson/common/env.c58
-rw-r--r--arch/mips/loongson/common/init.c30
-rw-r--r--arch/mips/loongson/common/irq.c74
-rw-r--r--arch/mips/loongson/common/machtype.c50
-rw-r--r--arch/mips/loongson/common/mem.c (renamed from arch/mips/lemote/lm2e/mem.c)22
-rw-r--r--arch/mips/loongson/common/pci.c83
-rw-r--r--arch/mips/loongson/common/reset.c44
-rw-r--r--arch/mips/loongson/common/setup.c58
-rw-r--r--arch/mips/loongson/common/time.c28
-rw-r--r--arch/mips/loongson/fuloong-2e/Makefile7
-rw-r--r--arch/mips/loongson/fuloong-2e/irq.c71
-rw-r--r--arch/mips/loongson/fuloong-2e/reset.c23
-rw-r--r--arch/mips/mipssim/sim_setup.c2
-rw-r--r--arch/mips/mipssim/sim_smtc.c5
-rw-r--r--arch/mips/mm/c-octeon.c2
-rw-r--r--arch/mips/mm/fault.c12
-rw-r--r--arch/mips/mm/init.c12
-rw-r--r--arch/mips/mm/pgtable-64.c3
-rw-r--r--arch/mips/mm/tlb-r4k.c2
-rw-r--r--arch/mips/mm/tlbex.c53
-rw-r--r--arch/mips/mti-malta/malta-init.c2
-rw-r--r--arch/mips/mti-malta/malta-reset.c7
-rw-r--r--arch/mips/mti-malta/malta-setup.c1
-rw-r--r--arch/mips/mti-malta/malta-smtc.c4
-rw-r--r--arch/mips/mti-malta/malta-time.c5
-rw-r--r--arch/mips/nxp/pnx833x/stb22x/board.c2
-rw-r--r--arch/mips/nxp/pnx8550/common/proc.c6
-rw-r--r--arch/mips/oprofile/Makefile1
-rw-r--r--arch/mips/oprofile/common.c4
-rw-r--r--arch/mips/oprofile/op_model_loongson2.c177
-rw-r--r--arch/mips/pci/Makefile4
-rw-r--r--arch/mips/pci/fixup-bcm63xx.c21
-rw-r--r--arch/mips/pci/fixup-fuloong2e.c (renamed from arch/mips/pci/fixup-lm2e.c)18
-rw-r--r--arch/mips/pci/ops-bcm63xx.c467
-rw-r--r--arch/mips/pci/ops-bonito64.c4
-rw-r--r--arch/mips/pci/pci-bcm1480.c2
-rw-r--r--arch/mips/pci/pci-bcm1480ht.c2
-rw-r--r--arch/mips/pci/pci-bcm63xx.c224
-rw-r--r--arch/mips/pci/pci-bcm63xx.h27
-rw-r--r--arch/mips/pci/pci-sb1250.c2
-rw-r--r--arch/mips/pci/pci.c4
-rw-r--r--arch/mips/pmc-sierra/yosemite/setup.c5
-rw-r--r--arch/mips/pmc-sierra/yosemite/smp.c4
-rw-r--r--arch/mips/power/hibernate.S3
-rw-r--r--arch/mips/sgi-ip22/Makefile2
-rw-r--r--arch/mips/sgi-ip27/ip27-memory.c2
-rw-r--r--arch/mips/sgi-ip27/ip27-smp.c4
-rw-r--r--arch/mips/sibyte/bcm1480/smp.c5
-rw-r--r--arch/mips/sibyte/sb1250/smp.c5
-rw-r--r--arch/mips/sibyte/swarm/setup.c15
-rw-r--r--arch/mips/sni/time.c5
-rw-r--r--arch/mips/txx9/generic/pci.c13
-rw-r--r--arch/mips/txx9/generic/setup.c17
-rw-r--r--arch/mn10300/include/asm/cacheflush.h4
-rw-r--r--arch/mn10300/include/asm/gdb-stub.h1
-rw-r--r--arch/mn10300/include/asm/mman.h29
-rw-r--r--arch/mn10300/include/asm/mmu_context.h12
-rw-r--r--arch/mn10300/include/asm/pci.h13
-rw-r--r--arch/mn10300/include/asm/unistd.h2
-rw-r--r--arch/mn10300/kernel/asm-offsets.c8
-rw-r--r--arch/mn10300/kernel/entry.S2
-rw-r--r--arch/mn10300/kernel/init_task.c5
-rw-r--r--arch/mn10300/kernel/mn10300-serial-low.S2
-rw-r--r--arch/mn10300/kernel/mn10300-serial.c14
-rw-r--r--arch/mn10300/kernel/setup.c2
-rw-r--r--arch/mn10300/kernel/sys_mn10300.c1
-rw-r--r--arch/mn10300/kernel/vmlinux.lds.S40
-rw-r--r--arch/mn10300/mm/init.c2
-rw-r--r--arch/parisc/Kconfig2
-rw-r--r--arch/parisc/Makefile4
-rw-r--r--arch/parisc/include/asm/fcntl.h2
-rw-r--r--arch/parisc/include/asm/mman.h5
-rw-r--r--arch/parisc/include/asm/pci.h1
-rw-r--r--arch/parisc/include/asm/perf_counter.h7
-rw-r--r--arch/parisc/include/asm/perf_event.h7
-rw-r--r--arch/parisc/include/asm/smp.h1
-rw-r--r--arch/parisc/include/asm/unistd.h4
-rw-r--r--arch/parisc/install.sh4
-rw-r--r--arch/parisc/kernel/init_task.c4
-rw-r--r--arch/parisc/kernel/sys_parisc32.c1
-rw-r--r--arch/parisc/kernel/syscall_table.S2
-rw-r--r--arch/parisc/kernel/vmlinux.lds.S104
-rw-r--r--arch/parisc/mm/init.c2
-rw-r--r--arch/powerpc/Kconfig8
-rw-r--r--arch/powerpc/Makefile17
-rw-r--r--arch/powerpc/boot/dts/mpc8377_mds.dts1
-rw-r--r--arch/powerpc/boot/dts/mpc8377_rdb.dts1
-rw-r--r--arch/powerpc/boot/dts/mpc8377_wlan.dts1
-rw-r--r--arch/powerpc/boot/dts/mpc8378_mds.dts1
-rw-r--r--arch/powerpc/boot/dts/mpc8378_rdb.dts1
-rw-r--r--arch/powerpc/boot/dts/mpc8379_mds.dts1
-rw-r--r--arch/powerpc/boot/dts/mpc8379_rdb.dts1
-rw-r--r--arch/powerpc/boot/install.sh4
-rw-r--r--arch/powerpc/include/asm/cputime.h13
-rw-r--r--arch/powerpc/include/asm/device.h11
-rw-r--r--arch/powerpc/include/asm/dma-mapping.h27
-rw-r--r--arch/powerpc/include/asm/fsldma.h136
-rw-r--r--arch/powerpc/include/asm/hw_irq.h22
-rw-r--r--arch/powerpc/include/asm/iommu.h10
-rw-r--r--arch/powerpc/include/asm/mman.h2
-rw-r--r--arch/powerpc/include/asm/paca.h2
-rw-r--r--arch/powerpc/include/asm/pci.h1
-rw-r--r--arch/powerpc/include/asm/perf_event.h (renamed from arch/powerpc/include/asm/perf_counter.h)22
-rw-r--r--arch/powerpc/include/asm/pmc.h2
-rw-r--r--arch/powerpc/include/asm/pte-40x.h1
-rw-r--r--arch/powerpc/include/asm/pte-8xx.h1
-rw-r--r--arch/powerpc/include/asm/pte-common.h5
-rw-r--r--arch/powerpc/include/asm/smp.h2
-rw-r--r--arch/powerpc/include/asm/systbl.h2
-rw-r--r--arch/powerpc/include/asm/topology.h21
-rw-r--r--arch/powerpc/include/asm/unistd.h2
-rw-r--r--arch/powerpc/kernel/Makefile2
-rw-r--r--arch/powerpc/kernel/asm-offsets.c2
-rw-r--r--arch/powerpc/kernel/dma-iommu.c16
-rw-r--r--arch/powerpc/kernel/dma.c15
-rw-r--r--arch/powerpc/kernel/entry_64.S8
-rw-r--r--arch/powerpc/kernel/exceptions-64e.S1
-rw-r--r--arch/powerpc/kernel/init_task.c5
-rw-r--r--arch/powerpc/kernel/irq.c8
-rw-r--r--arch/powerpc/kernel/machine_kexec_64.c5
-rw-r--r--arch/powerpc/kernel/mpc7450-pmu.c2
-rw-r--r--arch/powerpc/kernel/pci-common.c2
-rw-r--r--arch/powerpc/kernel/pci_of_scan.c1
-rw-r--r--arch/powerpc/kernel/perf_callchain.c2
-rw-r--r--arch/powerpc/kernel/perf_event.c (renamed from arch/powerpc/kernel/perf_counter.c)567
-rw-r--r--arch/powerpc/kernel/power4-pmu.c2
-rw-r--r--arch/powerpc/kernel/power5+-pmu.c2
-rw-r--r--arch/powerpc/kernel/power5-pmu.c2
-rw-r--r--arch/powerpc/kernel/power6-pmu.c2
-rw-r--r--arch/powerpc/kernel/power7-pmu.c2
-rw-r--r--arch/powerpc/kernel/ppc970-pmu.c2
-rw-r--r--arch/powerpc/kernel/process.c17
-rw-r--r--arch/powerpc/kernel/prom_init.c3
-rw-r--r--arch/powerpc/kernel/setup-common.c9
-rw-r--r--arch/powerpc/kernel/smp.c12
-rw-r--r--arch/powerpc/kernel/sys_ppc32.c1
-rw-r--r--arch/powerpc/kernel/time.c53
-rw-r--r--arch/powerpc/kernel/udbg_16550.c2
-rw-r--r--arch/powerpc/kernel/vdso.c17
-rw-r--r--arch/powerpc/kernel/vdso32/Makefile2
-rw-r--r--arch/powerpc/kernel/vdso32/vdso32_wrapper.S3
-rw-r--r--arch/powerpc/kernel/vdso64/Makefile2
-rw-r--r--arch/powerpc/kernel/vdso64/vdso64_wrapper.S3
-rw-r--r--arch/powerpc/kernel/vio.c4
-rw-r--r--arch/powerpc/kernel/vmlinux.lds.S69
-rw-r--r--arch/powerpc/mm/fault.c8
-rw-r--r--arch/powerpc/mm/init_32.c36
-rw-r--r--arch/powerpc/mm/init_64.c29
-rw-r--r--arch/powerpc/mm/mem.c8
-rw-r--r--arch/powerpc/mm/pgtable.c19
-rw-r--r--arch/powerpc/mm/tlb_low_64e.S1
-rw-r--r--arch/powerpc/platforms/Kconfig.cputype4
-rw-r--r--arch/powerpc/platforms/cell/beat_iommu.c2
-rw-r--r--arch/powerpc/platforms/cell/iommu.c9
-rw-r--r--arch/powerpc/platforms/cell/spufs/file.c1
-rw-r--r--arch/powerpc/platforms/cell/spufs/inode.c4
-rw-r--r--arch/powerpc/platforms/cell/spufs/sched.c1
-rw-r--r--arch/powerpc/platforms/iseries/iommu.c2
-rw-r--r--arch/powerpc/platforms/pasemi/iommu.c2
-rw-r--r--arch/powerpc/platforms/powermac/smp.c6
-rw-r--r--arch/powerpc/platforms/powermac/udbg_scc.c2
-rw-r--r--arch/powerpc/platforms/pseries/eeh.c10
-rw-r--r--arch/powerpc/platforms/pseries/hotplug-cpu.c6
-rw-r--r--arch/powerpc/platforms/pseries/hvCall_inst.c2
-rw-r--r--arch/powerpc/platforms/pseries/iommu.c8
-rwxr-xr-xarch/powerpc/relocs_check.pl56
-rw-r--r--arch/powerpc/sysdev/axonram.c2
-rw-r--r--arch/powerpc/sysdev/dart_iommu.c2
-rw-r--r--arch/powerpc/xmon/xmon.c16
-rw-r--r--arch/s390/Kconfig2
-rw-r--r--arch/s390/appldata/appldata_base.c9
-rw-r--r--arch/s390/boot/install.sh4
-rw-r--r--arch/s390/defconfig37
-rw-r--r--arch/s390/hypfs/inode.c6
-rw-r--r--arch/s390/include/asm/cputime.h1
-rw-r--r--arch/s390/include/asm/lowcore.h9
-rw-r--r--arch/s390/include/asm/mman.h13
-rw-r--r--arch/s390/include/asm/perf_counter.h10
-rw-r--r--arch/s390/include/asm/perf_event.h10
-rw-r--r--arch/s390/include/asm/processor.h2
-rw-r--r--arch/s390/include/asm/smp.h2
-rw-r--r--arch/s390/include/asm/topology.h1
-rw-r--r--arch/s390/include/asm/unistd.h2
-rw-r--r--arch/s390/kernel/asm-offsets.c7
-rw-r--r--arch/s390/kernel/compat_linux.c84
-rw-r--r--arch/s390/kernel/compat_linux.h4
-rw-r--r--arch/s390/kernel/compat_wrapper.S35
-rw-r--r--arch/s390/kernel/debug.c4
-rw-r--r--arch/s390/kernel/entry.h6
-rw-r--r--arch/s390/kernel/init_task.c5
-rw-r--r--arch/s390/kernel/process.c41
-rw-r--r--arch/s390/kernel/ptrace.c19
-rw-r--r--arch/s390/kernel/sclp.S5
-rw-r--r--arch/s390/kernel/smp.c54
-rw-r--r--arch/s390/kernel/suspend.c24
-rw-r--r--arch/s390/kernel/swsusp_asm64.S102
-rw-r--r--arch/s390/kernel/sys_s390.c1
-rw-r--r--arch/s390/kernel/syscalls.S10
-rw-r--r--arch/s390/kernel/time.c38
-rw-r--r--arch/s390/kernel/vdso.c2
-rw-r--r--arch/s390/kernel/vdso32/Makefile2
-rw-r--r--arch/s390/kernel/vdso32/vdso32_wrapper.S3
-rw-r--r--arch/s390/kernel/vdso64/Makefile2
-rw-r--r--arch/s390/kernel/vdso64/vdso64_wrapper.S3
-rw-r--r--arch/s390/kvm/interrupt.c2
-rw-r--r--arch/s390/mm/cmm.c4
-rw-r--r--arch/s390/mm/fault.c8
-rw-r--r--arch/s390/mm/init.c2
-rw-r--r--arch/s390/mm/page-states.c52
-rw-r--r--arch/s390/mm/pgtable.c17
-rw-r--r--arch/score/Kconfig141
-rw-r--r--arch/score/Kconfig.debug37
-rw-r--r--arch/score/Makefile43
-rw-r--r--arch/score/boot/Makefile15
-rw-r--r--arch/score/configs/spct6600_defconfig (renamed from arch/arm/configs/zylonite_defconfig)719
-rw-r--r--arch/score/include/asm/Kbuild3
-rw-r--r--arch/score/include/asm/asmmacro.h161
-rw-r--r--arch/score/include/asm/atomic.h6
-rw-r--r--arch/score/include/asm/auxvec.h4
-rw-r--r--arch/score/include/asm/bitops.h16
-rw-r--r--arch/score/include/asm/bitsperlong.h6
-rw-r--r--arch/score/include/asm/bug.h6
-rw-r--r--arch/score/include/asm/bugs.h6
-rw-r--r--arch/score/include/asm/byteorder.h6
-rw-r--r--arch/score/include/asm/cache.h7
-rw-r--r--arch/score/include/asm/cacheflush.h45
-rw-r--r--arch/score/include/asm/checksum.h235
-rw-r--r--arch/score/include/asm/cputime.h6
-rw-r--r--arch/score/include/asm/current.h6
-rw-r--r--arch/score/include/asm/delay.h26
-rw-r--r--arch/score/include/asm/device.h6
-rw-r--r--arch/score/include/asm/div64.h6
-rw-r--r--arch/score/include/asm/dma-mapping.h6
-rw-r--r--arch/score/include/asm/dma.h8
-rw-r--r--arch/score/include/asm/elf.h103
-rw-r--r--arch/score/include/asm/emergency-restart.h6
-rw-r--r--arch/score/include/asm/errno.h6
-rw-r--r--arch/score/include/asm/fcntl.h6
-rw-r--r--arch/score/include/asm/fixmap.h82
-rw-r--r--arch/score/include/asm/ftrace.h4
-rw-r--r--arch/score/include/asm/futex.h6
-rw-r--r--arch/score/include/asm/hardirq.h6
-rw-r--r--arch/score/include/asm/hw_irq.h4
-rw-r--r--arch/score/include/asm/io.h9
-rw-r--r--arch/score/include/asm/ioctl.h6
-rw-r--r--arch/score/include/asm/ioctls.h6
-rw-r--r--arch/score/include/asm/ipcbuf.h6
-rw-r--r--arch/score/include/asm/irq.h25
-rw-r--r--arch/score/include/asm/irq_regs.h11
-rw-r--r--arch/score/include/asm/irqflags.h109
-rw-r--r--arch/score/include/asm/kdebug.h6
-rw-r--r--arch/score/include/asm/kmap_types.h6
-rw-r--r--arch/score/include/asm/linkage.h7
-rw-r--r--arch/score/include/asm/local.h6
-rw-r--r--arch/score/include/asm/mman.h6
-rw-r--r--arch/score/include/asm/mmu.h6
-rw-r--r--arch/score/include/asm/mmu_context.h113
-rw-r--r--arch/score/include/asm/module.h39
-rw-r--r--arch/score/include/asm/msgbuf.h6
-rw-r--r--arch/score/include/asm/mutex.h6
-rw-r--r--arch/score/include/asm/page.h93
-rw-r--r--arch/score/include/asm/param.h6
-rw-r--r--arch/score/include/asm/pci.h4
-rw-r--r--arch/score/include/asm/percpu.h6
-rw-r--r--arch/score/include/asm/pgalloc.h83
-rw-r--r--arch/score/include/asm/pgtable-bits.h25
-rw-r--r--arch/score/include/asm/pgtable.h287
-rw-r--r--arch/score/include/asm/poll.h6
-rw-r--r--arch/score/include/asm/posix_types.h6
-rw-r--r--arch/score/include/asm/processor.h106
-rw-r--r--arch/score/include/asm/ptrace.h97
-rw-r--r--arch/score/include/asm/resource.h6
-rw-r--r--arch/score/include/asm/scatterlist.h6
-rw-r--r--arch/score/include/asm/scoreregs.h51
-rw-r--r--arch/score/include/asm/sections.h6
-rw-r--r--arch/score/include/asm/segment.h21
-rw-r--r--arch/score/include/asm/sembuf.h6
-rw-r--r--arch/score/include/asm/setup.h41
-rw-r--r--arch/score/include/asm/shmbuf.h6
-rw-r--r--arch/score/include/asm/shmparam.h6
-rw-r--r--arch/score/include/asm/sigcontext.h22
-rw-r--r--arch/score/include/asm/siginfo.h6
-rw-r--r--arch/score/include/asm/signal.h6
-rw-r--r--arch/score/include/asm/socket.h6
-rw-r--r--arch/score/include/asm/sockios.h6
-rw-r--r--arch/score/include/asm/stat.h6
-rw-r--r--arch/score/include/asm/statfs.h6
-rw-r--r--arch/score/include/asm/string.h8
-rw-r--r--arch/score/include/asm/swab.h6
-rw-r--r--arch/score/include/asm/syscalls.h11
-rw-r--r--arch/score/include/asm/system.h90
-rw-r--r--arch/score/include/asm/termbits.h6
-rw-r--r--arch/score/include/asm/termios.h6
-rw-r--r--arch/score/include/asm/thread_info.h108
-rw-r--r--arch/score/include/asm/timex.h8
-rw-r--r--arch/score/include/asm/tlb.h17
-rw-r--r--arch/score/include/asm/tlbflush.h142
-rw-r--r--arch/score/include/asm/topology.h6
-rw-r--r--arch/score/include/asm/types.h6
-rw-r--r--arch/score/include/asm/uaccess.h424
-rw-r--r--arch/score/include/asm/ucontext.h1
-rw-r--r--arch/score/include/asm/unaligned.h6
-rw-r--r--arch/score/include/asm/unistd.h13
-rw-r--r--arch/score/include/asm/user.h21
-rw-r--r--arch/score/kernel/Makefile11
-rw-r--r--arch/score/kernel/asm-offsets.c216
-rw-r--r--arch/score/kernel/entry.S514
-rw-r--r--arch/score/kernel/head.S70
-rw-r--r--arch/score/kernel/init_task.c46
-rw-r--r--arch/score/kernel/irq.c148
-rw-r--r--arch/score/kernel/module.c165
-rw-r--r--arch/score/kernel/process.c168
-rw-r--r--arch/score/kernel/ptrace.c382
-rw-r--r--arch/score/kernel/setup.c159
-rw-r--r--arch/score/kernel/signal.c361
-rw-r--r--arch/score/kernel/sys_call_table.c12
-rw-r--r--arch/score/kernel/sys_score.c151
-rw-r--r--arch/score/kernel/time.c99
-rw-r--r--arch/score/kernel/traps.c349
-rw-r--r--arch/score/kernel/vmlinux.lds.S89
-rw-r--r--arch/score/lib/Makefile8
-rw-r--r--arch/score/lib/ashldi3.c46
-rw-r--r--arch/score/lib/ashrdi3.c48
-rw-r--r--arch/score/lib/checksum.S255
-rw-r--r--arch/score/lib/checksum_copy.c52
-rw-r--r--arch/score/lib/cmpdi2.c44
-rw-r--r--arch/score/lib/libgcc.h37
-rw-r--r--arch/score/lib/lshrdi3.c47
-rw-r--r--arch/score/lib/string.S184
-rw-r--r--arch/score/lib/ucmpdi2.c38
-rw-r--r--arch/score/mm/Makefile6
-rw-r--r--arch/score/mm/cache.c257
-rw-r--r--arch/score/mm/extable.c38
-rw-r--r--arch/score/mm/fault.c235
-rw-r--r--arch/score/mm/init.c161
-rw-r--r--arch/score/mm/pgtable.c52
-rw-r--r--arch/score/mm/tlb-miss.S199
-rw-r--r--arch/score/mm/tlb-score.c251
-rw-r--r--arch/sh/Kconfig46
-rw-r--r--arch/sh/Kconfig.debug23
-rw-r--r--arch/sh/Makefile26
-rw-r--r--arch/sh/boards/Kconfig22
-rw-r--r--arch/sh/boards/board-ap325rxa.c68
-rw-r--r--arch/sh/boards/board-sh7785lcr.c18
-rw-r--r--arch/sh/boards/mach-ecovec24/Makefile9
-rw-r--r--arch/sh/boards/mach-ecovec24/setup.c671
-rw-r--r--arch/sh/boards/mach-highlander/setup.c7
-rw-r--r--arch/sh/boards/mach-kfr2r09/Makefile2
-rw-r--r--arch/sh/boards/mach-kfr2r09/lcd_wqvga.c332
-rw-r--r--arch/sh/boards/mach-kfr2r09/setup.c386
-rw-r--r--arch/sh/boards/mach-migor/setup.c11
-rw-r--r--arch/sh/boards/mach-se/7722/setup.c4
-rw-r--r--arch/sh/boards/mach-se/7724/setup.c199
-rw-r--r--arch/sh/boards/mach-x3proto/setup.c7
-rw-r--r--arch/sh/boot/.gitignore5
-rw-r--r--arch/sh/boot/Makefile48
-rw-r--r--arch/sh/boot/compressed/.gitignore1
-rw-r--r--arch/sh/boot/compressed/Makefile21
-rw-r--r--arch/sh/boot/compressed/head_32.S2
-rw-r--r--arch/sh/boot/compressed/install.sh4
-rw-r--r--arch/sh/boot/compressed/misc.c149
-rw-r--r--arch/sh/boot/compressed/misc_32.c206
-rw-r--r--arch/sh/boot/compressed/misc_64.c210
-rw-r--r--arch/sh/boot/compressed/piggy.S8
-rw-r--r--arch/sh/boot/compressed/vmlinux.scr10
-rw-r--r--arch/sh/boot/romimage/Makefile19
-rw-r--r--arch/sh/boot/romimage/head.S10
-rw-r--r--arch/sh/boot/romimage/vmlinux.scr6
-rw-r--r--arch/sh/configs/ap325rxa_defconfig100
-rw-r--r--arch/sh/configs/dreamcast_defconfig82
-rw-r--r--arch/sh/configs/ecovec24-romimage_defconfig1032
-rw-r--r--arch/sh/configs/ecovec24_defconfig1576
-rw-r--r--arch/sh/configs/edosk7705_defconfig50
-rw-r--r--arch/sh/configs/edosk7760_defconfig82
-rw-r--r--arch/sh/configs/espt_defconfig75
-rw-r--r--arch/sh/configs/hp6xx_defconfig69
-rw-r--r--arch/sh/configs/kfr2r09-romimage_defconfig777
-rw-r--r--arch/sh/configs/kfr2r09_defconfig1080
-rw-r--r--arch/sh/configs/landisk_defconfig86
-rw-r--r--arch/sh/configs/lboxre2_defconfig86
-rw-r--r--arch/sh/configs/magicpanelr2_defconfig85
-rw-r--r--arch/sh/configs/microdev_defconfig74
-rw-r--r--arch/sh/configs/migor_defconfig111
-rw-r--r--arch/sh/configs/polaris_defconfig73
-rw-r--r--arch/sh/configs/r7780mp_defconfig116
-rw-r--r--arch/sh/configs/r7785rp_defconfig125
-rw-r--r--arch/sh/configs/rsk7201_defconfig60
-rw-r--r--arch/sh/configs/rsk7203_defconfig81
-rw-r--r--arch/sh/configs/rts7751r2d1_defconfig97
-rw-r--r--arch/sh/configs/rts7751r2dplus_defconfig100
-rw-r--r--arch/sh/configs/sdk7780_defconfig93
-rw-r--r--arch/sh/configs/se7206_defconfig80
-rw-r--r--arch/sh/configs/se7343_defconfig91
-rw-r--r--arch/sh/configs/se7619_defconfig56
-rw-r--r--arch/sh/configs/se7705_defconfig75
-rw-r--r--arch/sh/configs/se7712_defconfig79
-rw-r--r--arch/sh/configs/se7721_defconfig86
-rw-r--r--arch/sh/configs/se7722_defconfig92
-rw-r--r--arch/sh/configs/se7724_defconfig264
-rw-r--r--arch/sh/configs/se7750_defconfig75
-rw-r--r--arch/sh/configs/se7751_defconfig74
-rw-r--r--arch/sh/configs/se7780_defconfig89
-rw-r--r--arch/sh/configs/sh03_defconfig87
-rw-r--r--arch/sh/configs/sh7710voipgw_defconfig71
-rw-r--r--arch/sh/configs/sh7724_generic_defconfig64
-rw-r--r--arch/sh/configs/sh7763rdp_defconfig79
-rw-r--r--arch/sh/configs/sh7770_generic_defconfig62
-rw-r--r--arch/sh/configs/sh7785lcr_32bit_defconfig559
-rw-r--r--arch/sh/configs/sh7785lcr_defconfig107
-rw-r--r--arch/sh/configs/shmin_defconfig68
-rw-r--r--arch/sh/configs/shx3_defconfig95
-rw-r--r--arch/sh/configs/snapgear_defconfig109
-rw-r--r--arch/sh/configs/systemh_defconfig61
-rw-r--r--arch/sh/configs/titan_defconfig93
-rw-r--r--arch/sh/configs/ul2_defconfig104
-rw-r--r--arch/sh/configs/urquell_defconfig125
-rw-r--r--arch/sh/drivers/dma/Kconfig18
-rw-r--r--arch/sh/drivers/dma/Makefile3
-rw-r--r--arch/sh/drivers/heartbeat.c10
-rw-r--r--arch/sh/drivers/pci/pci.c4
-rw-r--r--arch/sh/include/asm/Kbuild2
-rw-r--r--arch/sh/include/asm/bug.h31
-rw-r--r--arch/sh/include/asm/bugs.h24
-rw-r--r--arch/sh/include/asm/cachectl.h19
-rw-r--r--arch/sh/include/asm/cacheflush.h114
-rw-r--r--arch/sh/include/asm/device.h16
-rw-r--r--arch/sh/include/asm/dma-sh.h14
-rw-r--r--arch/sh/include/asm/dwarf.h398
-rw-r--r--arch/sh/include/asm/entry-macros.S86
-rw-r--r--arch/sh/include/asm/ftrace.h8
-rw-r--r--arch/sh/include/asm/hardirq.h13
-rw-r--r--arch/sh/include/asm/heartbeat.h1
-rw-r--r--arch/sh/include/asm/hwblk.h72
-rw-r--r--arch/sh/include/asm/io.h16
-rw-r--r--arch/sh/include/asm/kdebug.h1
-rw-r--r--arch/sh/include/asm/kgdb.h3
-rw-r--r--arch/sh/include/asm/lmb.h6
-rw-r--r--arch/sh/include/asm/mmu_context.h2
-rw-r--r--arch/sh/include/asm/page.h24
-rw-r--r--arch/sh/include/asm/pci.h1
-rw-r--r--arch/sh/include/asm/perf_counter.h9
-rw-r--r--arch/sh/include/asm/perf_event.h9
-rw-r--r--arch/sh/include/asm/pgtable.h34
-rw-r--r--arch/sh/include/asm/pgtable_32.h30
-rw-r--r--arch/sh/include/asm/pgtable_64.h5
-rw-r--r--arch/sh/include/asm/processor.h15
-rw-r--r--arch/sh/include/asm/romimage-macros.h73
-rw-r--r--arch/sh/include/asm/sections.h1
-rw-r--r--arch/sh/include/asm/sh_keysc.h1
-rw-r--r--arch/sh/include/asm/smp.h1
-rw-r--r--arch/sh/include/asm/stacktrace.h25
-rw-r--r--arch/sh/include/asm/suspend.h9
-rw-r--r--arch/sh/include/asm/syscall_32.h1
-rw-r--r--arch/sh/include/asm/system.h19
-rw-r--r--arch/sh/include/asm/system_32.h43
-rw-r--r--arch/sh/include/asm/system_64.h10
-rw-r--r--arch/sh/include/asm/thread_info.h11
-rw-r--r--arch/sh/include/asm/topology.h11
-rw-r--r--arch/sh/include/asm/types.h2
-rw-r--r--arch/sh/include/asm/unistd_32.h4
-rw-r--r--arch/sh/include/asm/unistd_64.h4
-rw-r--r--arch/sh/include/asm/unwinder.h31
-rw-r--r--arch/sh/include/asm/vmlinux.lds.h17
-rw-r--r--arch/sh/include/asm/watchdog.h19
-rw-r--r--arch/sh/include/cpu-common/cpu/cacheflush.h44
-rw-r--r--arch/sh/include/cpu-sh2a/cpu/cacheflush.h34
-rw-r--r--arch/sh/include/cpu-sh3/cpu/cacheflush.h46
-rw-r--r--arch/sh/include/cpu-sh4/cpu/cacheflush.h43
-rw-r--r--arch/sh/include/cpu-sh4/cpu/dma-sh4a.h3
-rw-r--r--arch/sh/include/cpu-sh4/cpu/freq.h4
-rw-r--r--arch/sh/include/cpu-sh4/cpu/sh7722.h14
-rw-r--r--arch/sh/include/cpu-sh4/cpu/sh7723.h17
-rw-r--r--arch/sh/include/cpu-sh4/cpu/sh7724.h17
-rw-r--r--arch/sh/include/cpu-sh4/cpu/sh7757.h243
-rw-r--r--arch/sh/include/cpu-sh5/cpu/cacheflush.h33
-rw-r--r--arch/sh/include/mach-common/mach/migor.h64
-rw-r--r--arch/sh/include/mach-common/mach/romimage.h1
-rw-r--r--arch/sh/include/mach-common/mach/sh7785lcr.h2
-rw-r--r--arch/sh/include/mach-ecovec24/mach/partner-jet-setup.txt82
-rw-r--r--arch/sh/include/mach-ecovec24/mach/romimage.h20
-rw-r--r--arch/sh/include/mach-kfr2r09/mach/kfr2r09.h21
-rw-r--r--arch/sh/include/mach-kfr2r09/mach/partner-jet-setup.txt143
-rw-r--r--arch/sh/include/mach-kfr2r09/mach/romimage.h20
-rw-r--r--arch/sh/include/mach-migor/mach/migor.h14
-rw-r--r--arch/sh/kernel/Makefile44
-rw-r--r--arch/sh/kernel/Makefile_3237
-rw-r--r--arch/sh/kernel/Makefile_6419
-rw-r--r--arch/sh/kernel/asm-offsets.c1
-rw-r--r--arch/sh/kernel/cpu/Makefile2
-rw-r--r--arch/sh/kernel/cpu/hwblk.c155
-rw-r--r--arch/sh/kernel/cpu/init.c36
-rw-r--r--arch/sh/kernel/cpu/irq/ipr.c1
-rw-r--r--arch/sh/kernel/cpu/sh2/entry.S3
-rw-r--r--arch/sh/kernel/cpu/sh2/probe.c1
-rw-r--r--arch/sh/kernel/cpu/sh2a/entry.S3
-rw-r--r--arch/sh/kernel/cpu/sh2a/probe.c2
-rw-r--r--arch/sh/kernel/cpu/sh3/clock-sh7709.c11
-rw-r--r--arch/sh/kernel/cpu/sh3/entry.S102
-rw-r--r--arch/sh/kernel/cpu/sh3/ex.S4
-rw-r--r--arch/sh/kernel/cpu/sh3/probe.c2
-rw-r--r--arch/sh/kernel/cpu/sh4/probe.c21
-rw-r--r--arch/sh/kernel/cpu/sh4a/Makefile9
-rw-r--r--arch/sh/kernel/cpu/sh4a/clock-sh7722.c63
-rw-r--r--arch/sh/kernel/cpu/sh4a/clock-sh7723.c113
-rw-r--r--arch/sh/kernel/cpu/sh4a/clock-sh7724.c124
-rw-r--r--arch/sh/kernel/cpu/sh4a/clock-sh7757.c130
-rw-r--r--arch/sh/kernel/cpu/sh4a/hwblk-sh7722.c106
-rw-r--r--arch/sh/kernel/cpu/sh4a/hwblk-sh7723.c117
-rw-r--r--arch/sh/kernel/cpu/sh4a/hwblk-sh7724.c121
-rw-r--r--arch/sh/kernel/cpu/sh4a/pinmux-sh7757.c2019
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7366.c2
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7722.c53
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7723.c42
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7724.c43
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7757.c513
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7780.c14
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-shx3.c55
-rw-r--r--arch/sh/kernel/cpu/sh4a/smp-shx3.c2
-rw-r--r--arch/sh/kernel/cpu/sh5/probe.c2
-rw-r--r--arch/sh/kernel/cpu/shmobile/Makefile2
-rw-r--r--arch/sh/kernel/cpu/shmobile/cpuidle.c113
-rw-r--r--arch/sh/kernel/cpu/shmobile/pm.c42
-rw-r--r--arch/sh/kernel/cpu/shmobile/pm_runtime.c303
-rw-r--r--arch/sh/kernel/cpu/shmobile/sleep.S155
-rw-r--r--arch/sh/kernel/cpufreq.c10
-rw-r--r--arch/sh/kernel/dumpstack.c123
-rw-r--r--arch/sh/kernel/dwarf.c971
-rw-r--r--arch/sh/kernel/early_printk.c5
-rw-r--r--arch/sh/kernel/entry-common.S103
-rw-r--r--arch/sh/kernel/ftrace.c188
-rw-r--r--arch/sh/kernel/init_task.c5
-rw-r--r--arch/sh/kernel/io.c97
-rw-r--r--arch/sh/kernel/io_generic.c50
-rw-r--r--arch/sh/kernel/io_trapped.c10
-rw-r--r--arch/sh/kernel/irq.c25
-rw-r--r--arch/sh/kernel/kgdb.c4
-rw-r--r--arch/sh/kernel/localtimer.c9
-rw-r--r--arch/sh/kernel/nmi_debug.c77
-rw-r--r--arch/sh/kernel/process_32.c25
-rw-r--r--arch/sh/kernel/process_64.c24
-rw-r--r--arch/sh/kernel/ptrace_32.c9
-rw-r--r--arch/sh/kernel/ptrace_64.c9
-rw-r--r--arch/sh/kernel/setup.c80
-rw-r--r--arch/sh/kernel/sh_ksyms_32.c10
-rw-r--r--arch/sh/kernel/sh_ksyms_64.c9
-rw-r--r--arch/sh/kernel/signal_32.c12
-rw-r--r--arch/sh/kernel/signal_64.c38
-rw-r--r--arch/sh/kernel/stacktrace.c98
-rw-r--r--arch/sh/kernel/sys_sh.c43
-rw-r--r--arch/sh/kernel/sys_sh32.c1
-rw-r--r--arch/sh/kernel/sys_sh64.c1
-rw-r--r--arch/sh/kernel/syscalls_32.S4
-rw-r--r--arch/sh/kernel/syscalls_64.S4
-rw-r--r--arch/sh/kernel/time.c37
-rw-r--r--arch/sh/kernel/traps.c45
-rw-r--r--arch/sh/kernel/traps_32.c223
-rw-r--r--arch/sh/kernel/unwinder.c164
-rw-r--r--arch/sh/kernel/vmlinux.lds.S94
-rw-r--r--arch/sh/kernel/vsyscall/Makefile2
-rw-r--r--arch/sh/lib/Makefile4
-rw-r--r--arch/sh/lib/__clear_user.S (renamed from arch/sh/lib/clear_page.S)48
-rw-r--r--arch/sh/lib/copy_page.S11
-rw-r--r--arch/sh/lib/delay.c5
-rw-r--r--arch/sh/lib/mcount.S228
-rw-r--r--arch/sh/lib64/Makefile2
-rw-r--r--arch/sh/lib64/clear_page.S54
-rw-r--r--arch/sh/mm/Kconfig7
-rw-r--r--arch/sh/mm/Makefile68
-rw-r--r--arch/sh/mm/Makefile_3243
-rw-r--r--arch/sh/mm/Makefile_6446
-rw-r--r--arch/sh/mm/cache-sh2.c13
-rw-r--r--arch/sh/mm/cache-sh2a.c23
-rw-r--r--arch/sh/mm/cache-sh3.c25
-rw-r--r--arch/sh/mm/cache-sh4.c362
-rw-r--r--arch/sh/mm/cache-sh5.c307
-rw-r--r--arch/sh/mm/cache-sh7705.c72
-rw-r--r--arch/sh/mm/cache.c316
-rw-r--r--arch/sh/mm/fault_32.c204
-rw-r--r--arch/sh/mm/fault_64.c11
-rw-r--r--arch/sh/mm/flush-sh4.c108
-rw-r--r--arch/sh/mm/init.c58
-rw-r--r--arch/sh/mm/ioremap_32.c8
-rw-r--r--arch/sh/mm/ioremap_64.c6
-rw-r--r--arch/sh/mm/kmap.c65
-rw-r--r--arch/sh/mm/mmap.c2
-rw-r--r--arch/sh/mm/nommu.c (renamed from arch/sh/mm/tlb-nommu.c)44
-rw-r--r--arch/sh/mm/numa.c36
-rw-r--r--arch/sh/mm/pg-nommu.c38
-rw-r--r--arch/sh/mm/pg-sh4.c146
-rw-r--r--arch/sh/mm/pg-sh7705.c138
-rw-r--r--arch/sh/mm/tlb-pteaex.c28
-rw-r--r--arch/sh/mm/tlb-sh3.c27
-rw-r--r--arch/sh/mm/tlb-sh4.c37
-rw-r--r--arch/sh/mm/tlb-sh5.c21
-rw-r--r--arch/sh/mm/tlbflush_64.c30
-rw-r--r--arch/sh/oprofile/backtrace.c84
-rw-r--r--arch/sh/tools/mach-types3
-rw-r--r--arch/sparc/Kconfig4
-rw-r--r--arch/sparc/Makefile4
-rw-r--r--arch/sparc/include/asm/mman.h2
-rw-r--r--arch/sparc/include/asm/pci_32.h1
-rw-r--r--arch/sparc/include/asm/pci_64.h1
-rw-r--r--arch/sparc/include/asm/perf_counter.h14
-rw-r--r--arch/sparc/include/asm/perf_event.h14
-rw-r--r--arch/sparc/include/asm/smp_64.h1
-rw-r--r--arch/sparc/include/asm/topology_64.h23
-rw-r--r--arch/sparc/include/asm/unistd.h2
-rw-r--r--arch/sparc/kernel/Makefile8
-rw-r--r--arch/sparc/kernel/init_task.c5
-rw-r--r--arch/sparc/kernel/irq_64.c2
-rw-r--r--arch/sparc/kernel/nmi.c4
-rw-r--r--arch/sparc/kernel/pcr.c10
-rw-r--r--arch/sparc/kernel/perf_event.c (renamed from arch/sparc/kernel/perf_counter.c)179
-rw-r--r--arch/sparc/kernel/sys_sparc32.c1
-rw-r--r--arch/sparc/kernel/systbls.h3
-rw-r--r--arch/sparc/kernel/systbls_32.S2
-rw-r--r--arch/sparc/kernel/systbls_64.S4
-rw-r--r--arch/sparc/kernel/vmlinux.lds.S75
-rw-r--r--arch/sparc/mm/init_32.c2
-rw-r--r--arch/um/Makefile9
-rw-r--r--arch/um/drivers/net_kern.c2
-rw-r--r--arch/um/drivers/ubd_kern.c2
-rw-r--r--arch/um/include/asm/common.lds.S29
-rw-r--r--arch/um/include/asm/hardirq.h26
-rw-r--r--arch/um/include/asm/mmu_context.h4
-rw-r--r--arch/um/include/asm/pci.h1
-rw-r--r--arch/um/include/shared/ptrace_user.h2
-rw-r--r--arch/um/kernel/Makefile3
-rw-r--r--arch/um/kernel/dyn.lds.S9
-rw-r--r--arch/um/kernel/init_task.c5
-rw-r--r--arch/um/kernel/mem.c2
-rw-r--r--arch/um/kernel/skas/mmu.c4
-rw-r--r--arch/um/kernel/smp.c2
-rw-r--r--arch/um/kernel/uml.lds.S26
-rw-r--r--arch/um/kernel/vmlinux.lds.S3
-rw-r--r--arch/um/os-Linux/helper.c1
-rw-r--r--arch/x86/Kconfig87
-rw-r--r--arch/x86/Makefile4
-rw-r--r--arch/x86/boot/install.sh4
-rw-r--r--arch/x86/ia32/ia32entry.S2
-rw-r--r--arch/x86/include/asm/acpi.h1
-rw-r--r--arch/x86/include/asm/apic.h32
-rw-r--r--arch/x86/include/asm/bootparam.h10
-rw-r--r--arch/x86/include/asm/cache.h4
-rw-r--r--arch/x86/include/asm/cpufeature.h1
-rw-r--r--arch/x86/include/asm/do_timer.h16
-rw-r--r--arch/x86/include/asm/e820.h2
-rw-r--r--arch/x86/include/asm/elf.h2
-rw-r--r--arch/x86/include/asm/entry_arch.h4
-rw-r--r--arch/x86/include/asm/hypervisor.h2
-rw-r--r--arch/x86/include/asm/io_apic.h7
-rw-r--r--arch/x86/include/asm/irq.h3
-rw-r--r--arch/x86/include/asm/mce.h32
-rw-r--r--arch/x86/include/asm/mmu_context.h6
-rw-r--r--arch/x86/include/asm/mpspec.h47
-rw-r--r--arch/x86/include/asm/msr-index.h11
-rw-r--r--arch/x86/include/asm/nmi.h3
-rw-r--r--arch/x86/include/asm/nops.h2
-rw-r--r--arch/x86/include/asm/paravirt.h51
-rw-r--r--arch/x86/include/asm/paravirt_types.h28
-rw-r--r--arch/x86/include/asm/pci.h7
-rw-r--r--arch/x86/include/asm/perf_event.h (renamed from arch/x86/include/asm/perf_counter.h)30
-rw-r--r--arch/x86/include/asm/pgtable.h10
-rw-r--r--arch/x86/include/asm/pgtable_types.h4
-rw-r--r--arch/x86/include/asm/processor.h32
-rw-r--r--arch/x86/include/asm/setup.h49
-rw-r--r--arch/x86/include/asm/smp.h1
-rw-r--r--arch/x86/include/asm/string_32.h1
-rw-r--r--arch/x86/include/asm/syscall.h14
-rw-r--r--arch/x86/include/asm/time.h53
-rw-r--r--arch/x86/include/asm/timer.h14
-rw-r--r--arch/x86/include/asm/topology.h14
-rw-r--r--arch/x86/include/asm/tsc.h3
-rw-r--r--arch/x86/include/asm/uaccess_32.h2
-rw-r--r--arch/x86/include/asm/unistd_32.h2
-rw-r--r--arch/x86/include/asm/unistd_64.h4
-rw-r--r--arch/x86/include/asm/uv/uv_hub.h19
-rw-r--r--arch/x86/include/asm/vgtod.h1
-rw-r--r--arch/x86/include/asm/vmware.h2
-rw-r--r--arch/x86/include/asm/x86_init.h133
-rw-r--r--arch/x86/kernel/Makefile6
-rw-r--r--arch/x86/kernel/apic/apic.c40
-rw-r--r--arch/x86/kernel/apic/bigsmp_32.c2
-rw-r--r--arch/x86/kernel/apic/io_apic.c63
-rw-r--r--arch/x86/kernel/apic/nmi.c6
-rw-r--r--arch/x86/kernel/apic/numaq_32.c57
-rw-r--r--arch/x86/kernel/apic/probe_64.c15
-rw-r--r--arch/x86/kernel/apic/summit_32.c2
-rw-r--r--arch/x86/kernel/apic/x2apic_uv_x.c11
-rw-r--r--arch/x86/kernel/cpu/Makefile4
-rw-r--r--arch/x86/kernel/cpu/amd.c12
-rw-r--r--arch/x86/kernel/cpu/common.c5
-rw-r--r--arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c116
-rw-r--r--arch/x86/kernel/cpu/cpufreq/powernow-k8.c44
-rw-r--r--arch/x86/kernel/cpu/hypervisor.c14
-rw-r--r--arch/x86/kernel/cpu/intel.c6
-rw-r--r--arch/x86/kernel/cpu/mcheck/Makefile5
-rw-r--r--arch/x86/kernel/cpu/mcheck/k7.c116
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce-inject.c158
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce-internal.h15
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce-severity.c8
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce.c304
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce_amd.c3
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce_intel.c10
-rw-r--r--arch/x86/kernel/cpu/mcheck/non-fatal.c94
-rw-r--r--arch/x86/kernel/cpu/mcheck/p4.c163
-rw-r--r--arch/x86/kernel/cpu/mcheck/p6.c127
-rw-r--r--arch/x86/kernel/cpu/mcheck/therm_throt.c13
-rw-r--r--arch/x86/kernel/cpu/mtrr/if.c12
-rw-r--r--arch/x86/kernel/cpu/perf_event.c (renamed from arch/x86/kernel/cpu/perf_counter.c)601
-rw-r--r--arch/x86/kernel/cpu/perfctr-watchdog.c2
-rw-r--r--arch/x86/kernel/cpu/sched.c55
-rw-r--r--arch/x86/kernel/cpu/vmware.c27
-rw-r--r--arch/x86/kernel/cpuid.c4
-rw-r--r--arch/x86/kernel/dumpstack_32.c1
-rw-r--r--arch/x86/kernel/dumpstack_64.c1
-rw-r--r--arch/x86/kernel/e820.c21
-rw-r--r--arch/x86/kernel/early_printk.c780
-rw-r--r--arch/x86/kernel/efi.c4
-rw-r--r--arch/x86/kernel/entry_64.S30
-rw-r--r--arch/x86/kernel/head32.c26
-rw-r--r--arch/x86/kernel/head64.c2
-rw-r--r--arch/x86/kernel/head_32.S5
-rw-r--r--arch/x86/kernel/head_64.S2
-rw-r--r--arch/x86/kernel/i8253.c19
-rw-r--r--arch/x86/kernel/init_task.c5
-rw-r--r--arch/x86/kernel/irq.c4
-rw-r--r--arch/x86/kernel/irqinit.c40
-rw-r--r--arch/x86/kernel/kvmclock.c11
-rw-r--r--arch/x86/kernel/ldt.c4
-rw-r--r--arch/x86/kernel/microcode_core.c6
-rw-r--r--arch/x86/kernel/mpparse.c75
-rw-r--r--arch/x86/kernel/mrst.c24
-rw-r--r--arch/x86/kernel/msr.c4
-rw-r--r--arch/x86/kernel/paravirt.c36
-rw-r--r--arch/x86/kernel/pci-dma.c4
-rw-r--r--arch/x86/kernel/pci-swiotlb.c5
-rw-r--r--arch/x86/kernel/process.c31
-rw-r--r--arch/x86/kernel/ptrace.c21
-rw-r--r--arch/x86/kernel/quirks.c2
-rw-r--r--arch/x86/kernel/rtc.c17
-rw-r--r--arch/x86/kernel/setup.c148
-rw-r--r--arch/x86/kernel/sfi.c122
-rw-r--r--arch/x86/kernel/signal.c2
-rw-r--r--arch/x86/kernel/smpboot.c13
-rw-r--r--arch/x86/kernel/syscall_table_32.S2
-rw-r--r--arch/x86/kernel/time.c120
-rw-r--r--arch/x86/kernel/time_32.c137
-rw-r--r--arch/x86/kernel/time_64.c135
-rw-r--r--arch/x86/kernel/trampoline.c4
-rw-r--r--arch/x86/kernel/trampoline_32.S8
-rw-r--r--arch/x86/kernel/trampoline_64.S5
-rw-r--r--arch/x86/kernel/traps.c7
-rw-r--r--arch/x86/kernel/tsc.c88
-rw-r--r--arch/x86/kernel/visws_quirks.c54
-rw-r--r--arch/x86/kernel/vmi_32.c12
-rw-r--r--arch/x86/kernel/vmiclock_32.c2
-rw-r--r--arch/x86/kernel/vmlinux.lds.S4
-rw-r--r--arch/x86/kernel/vsyscall_64.c11
-rw-r--r--arch/x86/kernel/x86_init.c75
-rw-r--r--arch/x86/lguest/boot.c21
-rw-r--r--arch/x86/mm/fault.c27
-rw-r--r--arch/x86/mm/init_32.c12
-rw-r--r--arch/x86/mm/init_64.c12
-rw-r--r--arch/x86/mm/kmemcheck/kmemcheck.c3
-rw-r--r--arch/x86/mm/kmemcheck/shadow.c1
-rw-r--r--arch/x86/mm/mmap.c17
-rw-r--r--arch/x86/mm/pageattr.c1
-rw-r--r--arch/x86/mm/pat.c12
-rw-r--r--arch/x86/mm/tlb.c15
-rw-r--r--arch/x86/oprofile/op_model_ppro.c4
-rw-r--r--arch/x86/oprofile/op_x86_model.h2
-rw-r--r--arch/x86/pci/amd_bus.c64
-rw-r--r--arch/x86/pci/common.c69
-rw-r--r--arch/x86/pci/mmconfig-shared.c8
-rw-r--r--arch/x86/pci/mmconfig_32.c2
-rw-r--r--arch/x86/power/cpu.c4
-rw-r--r--arch/x86/vdso/Makefile2
-rw-r--r--arch/x86/vdso/vclock_gettime.c39
-rw-r--r--arch/x86/xen/enlighten.c26
-rw-r--r--arch/x86/xen/irq.c5
-rw-r--r--arch/x86/xen/mmu.c20
-rw-r--r--arch/x86/xen/mmu.h2
-rw-r--r--arch/x86/xen/xen-ops.h2
-rw-r--r--arch/xtensa/include/asm/mman.h5
-rw-r--r--arch/xtensa/kernel/Makefile3
-rw-r--r--arch/xtensa/kernel/head.S2
-rw-r--r--arch/xtensa/kernel/init_task.c5
-rw-r--r--arch/xtensa/kernel/time.c5
-rw-r--r--arch/xtensa/kernel/vmlinux.lds.S75
-rw-r--r--arch/xtensa/mm/init.c2
1616 files changed, 75036 insertions, 20635 deletions
diff --git a/arch/Kconfig b/arch/Kconfig
index beea3ccebb5e..7f418bbc261a 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -9,6 +9,7 @@ config OPROFILE
9 depends on TRACING_SUPPORT 9 depends on TRACING_SUPPORT
10 select TRACING 10 select TRACING
11 select RING_BUFFER 11 select RING_BUFFER
12 select RING_BUFFER_ALLOW_SWAP
12 help 13 help
13 OProfile is a profiling system capable of profiling the 14 OProfile is a profiling system capable of profiling the
14 whole system, include the kernel, kernel modules, libraries, 15 whole system, include the kernel, kernel modules, libraries,
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index 9fb8aae5c391..443448154f32 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -45,6 +45,14 @@ config GENERIC_CALIBRATE_DELAY
45 bool 45 bool
46 default y 46 default y
47 47
48config GENERIC_TIME
49 bool
50 default y
51
52config ARCH_USES_GETTIMEOFFSET
53 bool
54 default y
55
48config ZONE_DMA 56config ZONE_DMA
49 bool 57 bool
50 default y 58 default y
diff --git a/arch/alpha/boot/tools/objstrip.c b/arch/alpha/boot/tools/objstrip.c
index ef1838230291..9d0727d18aee 100644
--- a/arch/alpha/boot/tools/objstrip.c
+++ b/arch/alpha/boot/tools/objstrip.c
@@ -93,7 +93,7 @@ main (int argc, char *argv[])
93 ofd = 1; 93 ofd = 1;
94 if (i < argc) { 94 if (i < argc) {
95 ofd = open(argv[i++], O_WRONLY | O_CREAT | O_TRUNC, 0666); 95 ofd = open(argv[i++], O_WRONLY | O_CREAT | O_TRUNC, 0666);
96 if (fd == -1) { 96 if (ofd == -1) {
97 perror("open"); 97 perror("open");
98 exit(1); 98 exit(1);
99 } 99 }
diff --git a/arch/alpha/include/asm/fcntl.h b/arch/alpha/include/asm/fcntl.h
index 25da0017ec87..e42823e954aa 100644
--- a/arch/alpha/include/asm/fcntl.h
+++ b/arch/alpha/include/asm/fcntl.h
@@ -26,6 +26,8 @@
26#define F_GETOWN 6 /* for sockets. */ 26#define F_GETOWN 6 /* for sockets. */
27#define F_SETSIG 10 /* for sockets. */ 27#define F_SETSIG 10 /* for sockets. */
28#define F_GETSIG 11 /* for sockets. */ 28#define F_GETSIG 11 /* for sockets. */
29#define F_SETOWN_EX 12
30#define F_GETOWN_EX 13
29 31
30/* for posix fcntl() and lockf() */ 32/* for posix fcntl() and lockf() */
31#define F_RDLCK 1 33#define F_RDLCK 1
diff --git a/arch/alpha/include/asm/hardirq.h b/arch/alpha/include/asm/hardirq.h
index 88971460fa6c..242c09ba98c4 100644
--- a/arch/alpha/include/asm/hardirq.h
+++ b/arch/alpha/include/asm/hardirq.h
@@ -1,17 +1,9 @@
1#ifndef _ALPHA_HARDIRQ_H 1#ifndef _ALPHA_HARDIRQ_H
2#define _ALPHA_HARDIRQ_H 2#define _ALPHA_HARDIRQ_H
3 3
4#include <linux/threads.h>
5#include <linux/cache.h>
6
7
8/* entry.S is sensitive to the offsets of these fields */
9typedef struct {
10 unsigned long __softirq_pending;
11} ____cacheline_aligned irq_cpustat_t;
12
13#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
14
15void ack_bad_irq(unsigned int irq); 4void ack_bad_irq(unsigned int irq);
5#define ack_bad_irq ack_bad_irq
6
7#include <asm-generic/hardirq.h>
16 8
17#endif /* _ALPHA_HARDIRQ_H */ 9#endif /* _ALPHA_HARDIRQ_H */
diff --git a/arch/alpha/include/asm/mman.h b/arch/alpha/include/asm/mman.h
index 90d7c35d2867..99c56d47879d 100644
--- a/arch/alpha/include/asm/mman.h
+++ b/arch/alpha/include/asm/mman.h
@@ -28,6 +28,8 @@
28#define MAP_NORESERVE 0x10000 /* don't check for reservations */ 28#define MAP_NORESERVE 0x10000 /* don't check for reservations */
29#define MAP_POPULATE 0x20000 /* populate (prefault) pagetables */ 29#define MAP_POPULATE 0x20000 /* populate (prefault) pagetables */
30#define MAP_NONBLOCK 0x40000 /* do not block on IO */ 30#define MAP_NONBLOCK 0x40000 /* do not block on IO */
31#define MAP_STACK 0x80000 /* give out an address that is best suited for process/thread stacks */
32#define MAP_HUGETLB 0x100000 /* create a huge page mapping */
31 33
32#define MS_ASYNC 1 /* sync memory asynchronously */ 34#define MS_ASYNC 1 /* sync memory asynchronously */
33#define MS_SYNC 2 /* synchronous memory sync */ 35#define MS_SYNC 2 /* synchronous memory sync */
@@ -48,6 +50,9 @@
48#define MADV_DONTFORK 10 /* don't inherit across fork */ 50#define MADV_DONTFORK 10 /* don't inherit across fork */
49#define MADV_DOFORK 11 /* do inherit across fork */ 51#define MADV_DOFORK 11 /* do inherit across fork */
50 52
53#define MADV_MERGEABLE 12 /* KSM may merge identical pages */
54#define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages */
55
51/* compatibility flags */ 56/* compatibility flags */
52#define MAP_FILE 0 57#define MAP_FILE 0
53 58
diff --git a/arch/alpha/include/asm/pci.h b/arch/alpha/include/asm/pci.h
index d22ace99d13d..dd8dcabf160f 100644
--- a/arch/alpha/include/asm/pci.h
+++ b/arch/alpha/include/asm/pci.h
@@ -52,7 +52,6 @@ struct pci_controller {
52 bus numbers. */ 52 bus numbers. */
53 53
54#define pcibios_assign_all_busses() 1 54#define pcibios_assign_all_busses() 1
55#define pcibios_scan_all_fns(a, b) 0
56 55
57#define PCIBIOS_MIN_IO alpha_mv.min_io_address 56#define PCIBIOS_MIN_IO alpha_mv.min_io_address
58#define PCIBIOS_MIN_MEM alpha_mv.min_mem_address 57#define PCIBIOS_MIN_MEM alpha_mv.min_mem_address
diff --git a/arch/alpha/include/asm/smp.h b/arch/alpha/include/asm/smp.h
index 547e90951cec..3f390e8cc0b3 100644
--- a/arch/alpha/include/asm/smp.h
+++ b/arch/alpha/include/asm/smp.h
@@ -47,7 +47,7 @@ extern struct cpuinfo_alpha cpu_data[NR_CPUS];
47extern int smp_num_cpus; 47extern int smp_num_cpus;
48 48
49extern void arch_send_call_function_single_ipi(int cpu); 49extern void arch_send_call_function_single_ipi(int cpu);
50extern void arch_send_call_function_ipi(cpumask_t mask); 50extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
51 51
52#else /* CONFIG_SMP */ 52#else /* CONFIG_SMP */
53 53
diff --git a/arch/alpha/include/asm/topology.h b/arch/alpha/include/asm/topology.h
index b4f284c72ff3..36b3a30ba0e5 100644
--- a/arch/alpha/include/asm/topology.h
+++ b/arch/alpha/include/asm/topology.h
@@ -22,23 +22,6 @@ static inline int cpu_to_node(int cpu)
22 return node; 22 return node;
23} 23}
24 24
25static inline cpumask_t node_to_cpumask(int node)
26{
27 cpumask_t node_cpu_mask = CPU_MASK_NONE;
28 int cpu;
29
30 for_each_online_cpu(cpu) {
31 if (cpu_to_node(cpu) == node)
32 cpu_set(cpu, node_cpu_mask);
33 }
34
35#ifdef DEBUG_NUMA
36 printk("node %d: cpu_mask: %016lx\n", node, node_cpu_mask);
37#endif
38
39 return node_cpu_mask;
40}
41
42extern struct cpumask node_to_cpumask_map[]; 25extern struct cpumask node_to_cpumask_map[];
43/* FIXME: This is dumb, recalculating every time. But simple. */ 26/* FIXME: This is dumb, recalculating every time. But simple. */
44static const struct cpumask *cpumask_of_node(int node) 27static const struct cpumask *cpumask_of_node(int node)
@@ -55,7 +38,6 @@ static const struct cpumask *cpumask_of_node(int node)
55 return &node_to_cpumask_map[node]; 38 return &node_to_cpumask_map[node];
56} 39}
57 40
58#define pcibus_to_cpumask(bus) (cpu_online_map)
59#define cpumask_of_pcibus(bus) (cpu_online_mask) 41#define cpumask_of_pcibus(bus) (cpu_online_mask)
60 42
61#endif /* !CONFIG_NUMA */ 43#endif /* !CONFIG_NUMA */
diff --git a/arch/alpha/kernel/core_marvel.c b/arch/alpha/kernel/core_marvel.c
index e302daecbe56..8e059e58b0ac 100644
--- a/arch/alpha/kernel/core_marvel.c
+++ b/arch/alpha/kernel/core_marvel.c
@@ -1016,7 +1016,7 @@ marvel_agp_bind_memory(alpha_agp_info *agp, off_t pg_start, struct agp_memory *m
1016{ 1016{
1017 struct marvel_agp_aperture *aper = agp->aperture.sysdata; 1017 struct marvel_agp_aperture *aper = agp->aperture.sysdata;
1018 return iommu_bind(aper->arena, aper->pg_start + pg_start, 1018 return iommu_bind(aper->arena, aper->pg_start + pg_start,
1019 mem->page_count, mem->memory); 1019 mem->page_count, mem->pages);
1020} 1020}
1021 1021
1022static int 1022static int
diff --git a/arch/alpha/kernel/core_titan.c b/arch/alpha/kernel/core_titan.c
index 319fcb74611e..76686497b1e2 100644
--- a/arch/alpha/kernel/core_titan.c
+++ b/arch/alpha/kernel/core_titan.c
@@ -680,7 +680,7 @@ titan_agp_bind_memory(alpha_agp_info *agp, off_t pg_start, struct agp_memory *me
680{ 680{
681 struct titan_agp_aperture *aper = agp->aperture.sysdata; 681 struct titan_agp_aperture *aper = agp->aperture.sysdata;
682 return iommu_bind(aper->arena, aper->pg_start + pg_start, 682 return iommu_bind(aper->arena, aper->pg_start + pg_start,
683 mem->page_count, mem->memory); 683 mem->page_count, mem->pages);
684} 684}
685 685
686static int 686static int
diff --git a/arch/alpha/kernel/init_task.c b/arch/alpha/kernel/init_task.c
index 19b86328ffd7..6f80ca4f9766 100644
--- a/arch/alpha/kernel/init_task.c
+++ b/arch/alpha/kernel/init_task.c
@@ -13,6 +13,5 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
13struct task_struct init_task = INIT_TASK(init_task); 13struct task_struct init_task = INIT_TASK(init_task);
14EXPORT_SYMBOL(init_task); 14EXPORT_SYMBOL(init_task);
15 15
16union thread_union init_thread_union 16union thread_union init_thread_union __init_task_data =
17 __attribute__((section(".data.init_thread"))) 17 { INIT_THREAD_INFO(init_task) };
18 = { INIT_THREAD_INFO(init_task) };
diff --git a/arch/alpha/kernel/pci_impl.h b/arch/alpha/kernel/pci_impl.h
index 00edd04b585e..85457b2d4516 100644
--- a/arch/alpha/kernel/pci_impl.h
+++ b/arch/alpha/kernel/pci_impl.h
@@ -198,7 +198,7 @@ extern unsigned long size_for_memory(unsigned long max);
198 198
199extern int iommu_reserve(struct pci_iommu_arena *, long, long); 199extern int iommu_reserve(struct pci_iommu_arena *, long, long);
200extern int iommu_release(struct pci_iommu_arena *, long, long); 200extern int iommu_release(struct pci_iommu_arena *, long, long);
201extern int iommu_bind(struct pci_iommu_arena *, long, long, unsigned long *); 201extern int iommu_bind(struct pci_iommu_arena *, long, long, struct page **);
202extern int iommu_unbind(struct pci_iommu_arena *, long, long); 202extern int iommu_unbind(struct pci_iommu_arena *, long, long);
203 203
204 204
diff --git a/arch/alpha/kernel/pci_iommu.c b/arch/alpha/kernel/pci_iommu.c
index bfb880af959d..8449504f5e0b 100644
--- a/arch/alpha/kernel/pci_iommu.c
+++ b/arch/alpha/kernel/pci_iommu.c
@@ -268,11 +268,7 @@ pci_map_single_1(struct pci_dev *pdev, void *cpu_addr, size_t size,
268 assume it doesn't support sg mapping, and, since we tried to 268 assume it doesn't support sg mapping, and, since we tried to
269 use direct_map above, it now must be considered an error. */ 269 use direct_map above, it now must be considered an error. */
270 if (! alpha_mv.mv_pci_tbi) { 270 if (! alpha_mv.mv_pci_tbi) {
271 static int been_here = 0; /* Only print the message once. */ 271 printk_once(KERN_WARNING "pci_map_single: no HW sg\n");
272 if (!been_here) {
273 printk(KERN_WARNING "pci_map_single: no HW sg\n");
274 been_here = 1;
275 }
276 return 0; 272 return 0;
277 } 273 }
278 274
@@ -880,7 +876,7 @@ iommu_release(struct pci_iommu_arena *arena, long pg_start, long pg_count)
880 876
881int 877int
882iommu_bind(struct pci_iommu_arena *arena, long pg_start, long pg_count, 878iommu_bind(struct pci_iommu_arena *arena, long pg_start, long pg_count,
883 unsigned long *physaddrs) 879 struct page **pages)
884{ 880{
885 unsigned long flags; 881 unsigned long flags;
886 unsigned long *ptes; 882 unsigned long *ptes;
@@ -900,7 +896,7 @@ iommu_bind(struct pci_iommu_arena *arena, long pg_start, long pg_count,
900 } 896 }
901 897
902 for(i = 0, j = pg_start; i < pg_count; i++, j++) 898 for(i = 0, j = pg_start; i < pg_count; i++, j++)
903 ptes[j] = mk_iommu_pte(physaddrs[i]); 899 ptes[j] = mk_iommu_pte(page_to_phys(pages[i]));
904 900
905 spin_unlock_irqrestore(&arena->lock, flags); 901 spin_unlock_irqrestore(&arena->lock, flags);
906 902
diff --git a/arch/alpha/kernel/process.c b/arch/alpha/kernel/process.c
index 3a2fb7a02db4..289039bb6bb2 100644
--- a/arch/alpha/kernel/process.c
+++ b/arch/alpha/kernel/process.c
@@ -19,7 +19,6 @@
19#include <linux/ptrace.h> 19#include <linux/ptrace.h>
20#include <linux/slab.h> 20#include <linux/slab.h>
21#include <linux/user.h> 21#include <linux/user.h>
22#include <linux/utsname.h>
23#include <linux/time.h> 22#include <linux/time.h>
24#include <linux/major.h> 23#include <linux/major.h>
25#include <linux/stat.h> 24#include <linux/stat.h>
diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c
index b1fe5674c3a1..42aa078a5e4d 100644
--- a/arch/alpha/kernel/smp.c
+++ b/arch/alpha/kernel/smp.c
@@ -548,16 +548,16 @@ setup_profiling_timer(unsigned int multiplier)
548 548
549 549
550static void 550static void
551send_ipi_message(cpumask_t to_whom, enum ipi_message_type operation) 551send_ipi_message(const struct cpumask *to_whom, enum ipi_message_type operation)
552{ 552{
553 int i; 553 int i;
554 554
555 mb(); 555 mb();
556 for_each_cpu_mask(i, to_whom) 556 for_each_cpu(i, to_whom)
557 set_bit(operation, &ipi_data[i].bits); 557 set_bit(operation, &ipi_data[i].bits);
558 558
559 mb(); 559 mb();
560 for_each_cpu_mask(i, to_whom) 560 for_each_cpu(i, to_whom)
561 wripir(i); 561 wripir(i);
562} 562}
563 563
@@ -624,7 +624,7 @@ smp_send_reschedule(int cpu)
624 printk(KERN_WARNING 624 printk(KERN_WARNING
625 "smp_send_reschedule: Sending IPI to self.\n"); 625 "smp_send_reschedule: Sending IPI to self.\n");
626#endif 626#endif
627 send_ipi_message(cpumask_of_cpu(cpu), IPI_RESCHEDULE); 627 send_ipi_message(cpumask_of(cpu), IPI_RESCHEDULE);
628} 628}
629 629
630void 630void
@@ -636,17 +636,17 @@ smp_send_stop(void)
636 if (hard_smp_processor_id() != boot_cpu_id) 636 if (hard_smp_processor_id() != boot_cpu_id)
637 printk(KERN_WARNING "smp_send_stop: Not on boot cpu.\n"); 637 printk(KERN_WARNING "smp_send_stop: Not on boot cpu.\n");
638#endif 638#endif
639 send_ipi_message(to_whom, IPI_CPU_STOP); 639 send_ipi_message(&to_whom, IPI_CPU_STOP);
640} 640}
641 641
642void arch_send_call_function_ipi(cpumask_t mask) 642void arch_send_call_function_ipi_mask(const struct cpumask *mask)
643{ 643{
644 send_ipi_message(mask, IPI_CALL_FUNC); 644 send_ipi_message(mask, IPI_CALL_FUNC);
645} 645}
646 646
647void arch_send_call_function_single_ipi(int cpu) 647void arch_send_call_function_single_ipi(int cpu)
648{ 648{
649 send_ipi_message(cpumask_of_cpu(cpu), IPI_CALL_FUNC_SINGLE); 649 send_ipi_message(cpumask_of(cpu), IPI_CALL_FUNC_SINGLE);
650} 650}
651 651
652static void 652static void
diff --git a/arch/alpha/kernel/time.c b/arch/alpha/kernel/time.c
index b04e2cbf23a4..5d0826654c61 100644
--- a/arch/alpha/kernel/time.c
+++ b/arch/alpha/kernel/time.c
@@ -408,28 +408,17 @@ time_init(void)
408 * part. So we can't do the "find absolute time in terms of cycles" thing 408 * part. So we can't do the "find absolute time in terms of cycles" thing
409 * that the other ports do. 409 * that the other ports do.
410 */ 410 */
411void 411u32 arch_gettimeoffset(void)
412do_gettimeofday(struct timeval *tv)
413{ 412{
414 unsigned long flags;
415 unsigned long sec, usec, seq;
416 unsigned long delta_cycles, delta_usec, partial_tick;
417
418 do {
419 seq = read_seqbegin_irqsave(&xtime_lock, flags);
420
421 delta_cycles = rpcc() - state.last_time;
422 sec = xtime.tv_sec;
423 usec = (xtime.tv_nsec / 1000);
424 partial_tick = state.partial_tick;
425
426 } while (read_seqretry_irqrestore(&xtime_lock, seq, flags));
427
428#ifdef CONFIG_SMP 413#ifdef CONFIG_SMP
429 /* Until and unless we figure out how to get cpu cycle counters 414 /* Until and unless we figure out how to get cpu cycle counters
430 in sync and keep them there, we can't use the rpcc tricks. */ 415 in sync and keep them there, we can't use the rpcc tricks. */
431 delta_usec = 0; 416 return 0;
432#else 417#else
418 unsigned long delta_cycles, delta_usec, partial_tick;
419
420 delta_cycles = rpcc() - state.last_time;
421 partial_tick = state.partial_tick;
433 /* 422 /*
434 * usec = cycles * ticks_per_cycle * 2**48 * 1e6 / (2**48 * ticks) 423 * usec = cycles * ticks_per_cycle * 2**48 * 1e6 / (2**48 * ticks)
435 * = cycles * (s_t_p_c) * 1e6 / (2**48 * ticks) 424 * = cycles * (s_t_p_c) * 1e6 / (2**48 * ticks)
@@ -446,64 +435,10 @@ do_gettimeofday(struct timeval *tv)
446 delta_usec = (delta_cycles * state.scaled_ticks_per_cycle 435 delta_usec = (delta_cycles * state.scaled_ticks_per_cycle
447 + partial_tick) * 15625; 436 + partial_tick) * 15625;
448 delta_usec = ((delta_usec / ((1UL << (FIX_SHIFT-6-1)) * HZ)) + 1) / 2; 437 delta_usec = ((delta_usec / ((1UL << (FIX_SHIFT-6-1)) * HZ)) + 1) / 2;
438 return delta_usec * 1000;
449#endif 439#endif
450
451 usec += delta_usec;
452 if (usec >= 1000000) {
453 sec += 1;
454 usec -= 1000000;
455 }
456
457 tv->tv_sec = sec;
458 tv->tv_usec = usec;
459} 440}
460 441
461EXPORT_SYMBOL(do_gettimeofday);
462
463int
464do_settimeofday(struct timespec *tv)
465{
466 time_t wtm_sec, sec = tv->tv_sec;
467 long wtm_nsec, nsec = tv->tv_nsec;
468 unsigned long delta_nsec;
469
470 if ((unsigned long)tv->tv_nsec >= NSEC_PER_SEC)
471 return -EINVAL;
472
473 write_seqlock_irq(&xtime_lock);
474
475 /* The offset that is added into time in do_gettimeofday above
476 must be subtracted out here to keep a coherent view of the
477 time. Without this, a full-tick error is possible. */
478
479#ifdef CONFIG_SMP
480 delta_nsec = 0;
481#else
482 delta_nsec = rpcc() - state.last_time;
483 delta_nsec = (delta_nsec * state.scaled_ticks_per_cycle
484 + state.partial_tick) * 15625;
485 delta_nsec = ((delta_nsec / ((1UL << (FIX_SHIFT-6-1)) * HZ)) + 1) / 2;
486 delta_nsec *= 1000;
487#endif
488
489 nsec -= delta_nsec;
490
491 wtm_sec = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec);
492 wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec);
493
494 set_normalized_timespec(&xtime, sec, nsec);
495 set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec);
496
497 ntp_clear();
498
499 write_sequnlock_irq(&xtime_lock);
500 clock_was_set();
501 return 0;
502}
503
504EXPORT_SYMBOL(do_settimeofday);
505
506
507/* 442/*
508 * In order to set the CMOS clock precisely, set_rtc_mmss has to be 443 * In order to set the CMOS clock precisely, set_rtc_mmss has to be
509 * called 500 ms after the second nowtime has started, because when 444 * called 500 ms after the second nowtime has started, because when
diff --git a/arch/alpha/kernel/vmlinux.lds.S b/arch/alpha/kernel/vmlinux.lds.S
index 6dc03c35caa0..2906665b1c10 100644
--- a/arch/alpha/kernel/vmlinux.lds.S
+++ b/arch/alpha/kernel/vmlinux.lds.S
@@ -1,5 +1,6 @@
1#include <asm-generic/vmlinux.lds.h> 1#include <asm-generic/vmlinux.lds.h>
2#include <asm/page.h> 2#include <asm/page.h>
3#include <asm/thread_info.h>
3 4
4OUTPUT_FORMAT("elf64-alpha") 5OUTPUT_FORMAT("elf64-alpha")
5OUTPUT_ARCH(alpha) 6OUTPUT_ARCH(alpha)
@@ -31,88 +32,21 @@ SECTIONS
31 } :kernel 32 } :kernel
32 33
33 RODATA 34 RODATA
34 35 EXCEPTION_TABLE(16)
35 /* Exception table */
36 . = ALIGN(16);
37 __ex_table : {
38 __start___ex_table = .;
39 *(__ex_table)
40 __stop___ex_table = .;
41 }
42 36
43 /* Will be freed after init */ 37 /* Will be freed after init */
44 . = ALIGN(PAGE_SIZE); 38 __init_begin = ALIGN(PAGE_SIZE);
45 /* Init code and data */ 39 INIT_TEXT_SECTION(PAGE_SIZE)
46 __init_begin = .; 40 INIT_DATA_SECTION(16)
47 .init.text : {
48 _sinittext = .;
49 INIT_TEXT
50 _einittext = .;
51 }
52 .init.data : {
53 INIT_DATA
54 }
55
56 . = ALIGN(16);
57 .init.setup : {
58 __setup_start = .;
59 *(.init.setup)
60 __setup_end = .;
61 }
62
63 . = ALIGN(8);
64 .initcall.init : {
65 __initcall_start = .;
66 INITCALLS
67 __initcall_end = .;
68 }
69
70#ifdef CONFIG_BLK_DEV_INITRD
71 . = ALIGN(PAGE_SIZE);
72 .init.ramfs : {
73 __initramfs_start = .;
74 *(.init.ramfs)
75 __initramfs_end = .;
76 }
77#endif
78
79 . = ALIGN(8);
80 .con_initcall.init : {
81 __con_initcall_start = .;
82 *(.con_initcall.init)
83 __con_initcall_end = .;
84 }
85
86 . = ALIGN(8);
87 SECURITY_INIT
88
89 PERCPU(PAGE_SIZE) 41 PERCPU(PAGE_SIZE)
90 42 /* Align to THREAD_SIZE rather than PAGE_SIZE here so any padding page
91 . = ALIGN(2 * PAGE_SIZE); 43 needed for the THREAD_SIZE aligned init_task gets freed after init */
44 . = ALIGN(THREAD_SIZE);
92 __init_end = .; 45 __init_end = .;
93 /* Freed after init ends here */ 46 /* Freed after init ends here */
94 47
95 /* Note 2 page alignment above. */
96 .data.init_thread : {
97 *(.data.init_thread)
98 }
99
100 . = ALIGN(PAGE_SIZE);
101 .data.page_aligned : {
102 *(.data.page_aligned)
103 }
104
105 . = ALIGN(64);
106 .data.cacheline_aligned : {
107 *(.data.cacheline_aligned)
108 }
109
110 _data = .; 48 _data = .;
111 /* Data */ 49 RW_DATA_SECTION(64, PAGE_SIZE, THREAD_SIZE)
112 .data : {
113 DATA_DATA
114 CONSTRUCTORS
115 }
116 50
117 .got : { 51 .got : {
118 *(.got) 52 *(.got)
@@ -122,16 +56,7 @@ SECTIONS
122 } 56 }
123 _edata = .; /* End of data section */ 57 _edata = .; /* End of data section */
124 58
125 __bss_start = .; 59 BSS_SECTION(0, 0, 0)
126 .sbss : {
127 *(.sbss)
128 *(.scommon)
129 }
130 .bss : {
131 *(.bss)
132 *(COMMON)
133 }
134 __bss_stop = .;
135 _end = .; 60 _end = .;
136 61
137 .mdebug 0 : { 62 .mdebug 0 : {
diff --git a/arch/alpha/mm/init.c b/arch/alpha/mm/init.c
index af71d38c8e41..a0902c20d677 100644
--- a/arch/alpha/mm/init.c
+++ b/arch/alpha/mm/init.c
@@ -299,7 +299,7 @@ printk_memory_info(void)
299 initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin; 299 initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin;
300 300
301 printk("Memory: %luk/%luk available (%luk kernel code, %luk reserved, %luk data, %luk init)\n", 301 printk("Memory: %luk/%luk available (%luk kernel code, %luk reserved, %luk data, %luk init)\n",
302 (unsigned long) nr_free_pages() << (PAGE_SHIFT-10), 302 nr_free_pages() << (PAGE_SHIFT-10),
303 max_mapnr << (PAGE_SHIFT-10), 303 max_mapnr << (PAGE_SHIFT-10),
304 codesize >> 10, 304 codesize >> 10,
305 reservedpages << (PAGE_SHIFT-10), 305 reservedpages << (PAGE_SHIFT-10),
diff --git a/arch/alpha/mm/numa.c b/arch/alpha/mm/numa.c
index 0eab55749423..10b403554b65 100644
--- a/arch/alpha/mm/numa.c
+++ b/arch/alpha/mm/numa.c
@@ -349,7 +349,7 @@ void __init mem_init(void)
349 349
350 printk("Memory: %luk/%luk available (%luk kernel code, %luk reserved, " 350 printk("Memory: %luk/%luk available (%luk kernel code, %luk reserved, "
351 "%luk data, %luk init)\n", 351 "%luk data, %luk init)\n",
352 (unsigned long)nr_free_pages() << (PAGE_SHIFT-10), 352 nr_free_pages() << (PAGE_SHIFT-10),
353 num_physpages << (PAGE_SHIFT-10), 353 num_physpages << (PAGE_SHIFT-10),
354 codesize >> 10, 354 codesize >> 10,
355 reservedpages << (PAGE_SHIFT-10), 355 reservedpages << (PAGE_SHIFT-10),
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index d778a699f577..1c4119c60040 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -46,6 +46,10 @@ config GENERIC_CLOCKEVENTS_BROADCAST
46 depends on GENERIC_CLOCKEVENTS 46 depends on GENERIC_CLOCKEVENTS
47 default y if SMP && !LOCAL_TIMERS 47 default y if SMP && !LOCAL_TIMERS
48 48
49config HAVE_TCM
50 bool
51 select GENERIC_ALLOCATOR
52
49config NO_IOPORT 53config NO_IOPORT
50 bool 54 bool
51 55
@@ -649,6 +653,7 @@ config ARCH_U300
649 bool "ST-Ericsson U300 Series" 653 bool "ST-Ericsson U300 Series"
650 depends on MMU 654 depends on MMU
651 select CPU_ARM926T 655 select CPU_ARM926T
656 select HAVE_TCM
652 select ARM_AMBA 657 select ARM_AMBA
653 select ARM_VIC 658 select ARM_VIC
654 select GENERIC_TIME 659 select GENERIC_TIME
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 7350557a81e0..a73caaf66763 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -14,7 +14,7 @@ LDFLAGS_vmlinux :=-p --no-undefined -X
14ifeq ($(CONFIG_CPU_ENDIAN_BE8),y) 14ifeq ($(CONFIG_CPU_ENDIAN_BE8),y)
15LDFLAGS_vmlinux += --be8 15LDFLAGS_vmlinux += --be8
16endif 16endif
17CPPFLAGS_vmlinux.lds = -DTEXT_OFFSET=$(TEXT_OFFSET) 17
18OBJCOPYFLAGS :=-O binary -R .note -R .note.gnu.build-id -R .comment -S 18OBJCOPYFLAGS :=-O binary -R .note -R .note.gnu.build-id -R .comment -S
19GZFLAGS :=-9 19GZFLAGS :=-9
20#KBUILD_CFLAGS +=-pipe 20#KBUILD_CFLAGS +=-pipe
@@ -25,7 +25,7 @@ KBUILD_CFLAGS +=$(call cc-option,-marm,)
25# Select a platform tht is kept up-to-date 25# Select a platform tht is kept up-to-date
26KBUILD_DEFCONFIG := versatile_defconfig 26KBUILD_DEFCONFIG := versatile_defconfig
27 27
28# defines filename extension depending memory manement type. 28# defines filename extension depending memory management type.
29ifeq ($(CONFIG_MMU),) 29ifeq ($(CONFIG_MMU),)
30MMUEXT := -nommu 30MMUEXT := -nommu
31endif 31endif
@@ -279,7 +279,7 @@ define archhelp
279 echo ' (supply initrd image via make variable INITRD=<path>)' 279 echo ' (supply initrd image via make variable INITRD=<path>)'
280 echo ' install - Install uncompressed kernel' 280 echo ' install - Install uncompressed kernel'
281 echo ' zinstall - Install compressed kernel' 281 echo ' zinstall - Install compressed kernel'
282 echo ' Install using (your) ~/bin/installkernel or' 282 echo ' Install using (your) ~/bin/$(INSTALLKERNEL) or'
283 echo ' (distribution) /sbin/installkernel or' 283 echo ' (distribution) /sbin/$(INSTALLKERNEL) or'
284 echo ' install to $$(INSTALL_PATH) and run lilo' 284 echo ' install to $$(INSTALL_PATH) and run lilo'
285endef 285endef
diff --git a/arch/arm/boot/install.sh b/arch/arm/boot/install.sh
index 9f9bed207345..06ea7d42ce8e 100644
--- a/arch/arm/boot/install.sh
+++ b/arch/arm/boot/install.sh
@@ -21,8 +21,8 @@
21# 21#
22 22
23# User may have a custom install script 23# User may have a custom install script
24if [ -x ~/bin/${CROSS_COMPILE}installkernel ]; then exec ~/bin/${CROSS_COMPILE}installkernel "$@"; fi 24if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi
25if [ -x /sbin/${CROSS_COMPILE}installkernel ]; then exec /sbin/${CROSS_COMPILE}installkernel "$@"; fi 25if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi
26 26
27if [ "$(basename $2)" = "zImage" ]; then 27if [ "$(basename $2)" = "zImage" ]; then
28# Compressed install 28# Compressed install
diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c
index 2293f0ce061e..bd36c778c819 100644
--- a/arch/arm/common/locomo.c
+++ b/arch/arm/common/locomo.c
@@ -865,6 +865,7 @@ void locomo_gpio_set_dir(struct device *dev, unsigned int bits, unsigned int dir
865 865
866 spin_unlock_irqrestore(&lchip->lock, flags); 866 spin_unlock_irqrestore(&lchip->lock, flags);
867} 867}
868EXPORT_SYMBOL(locomo_gpio_set_dir);
868 869
869int locomo_gpio_read_level(struct device *dev, unsigned int bits) 870int locomo_gpio_read_level(struct device *dev, unsigned int bits)
870{ 871{
@@ -882,6 +883,7 @@ int locomo_gpio_read_level(struct device *dev, unsigned int bits)
882 ret &= bits; 883 ret &= bits;
883 return ret; 884 return ret;
884} 885}
886EXPORT_SYMBOL(locomo_gpio_read_level);
885 887
886int locomo_gpio_read_output(struct device *dev, unsigned int bits) 888int locomo_gpio_read_output(struct device *dev, unsigned int bits)
887{ 889{
@@ -899,6 +901,7 @@ int locomo_gpio_read_output(struct device *dev, unsigned int bits)
899 ret &= bits; 901 ret &= bits;
900 return ret; 902 return ret;
901} 903}
904EXPORT_SYMBOL(locomo_gpio_read_output);
902 905
903void locomo_gpio_write(struct device *dev, unsigned int bits, unsigned int set) 906void locomo_gpio_write(struct device *dev, unsigned int bits, unsigned int set)
904{ 907{
@@ -920,6 +923,7 @@ void locomo_gpio_write(struct device *dev, unsigned int bits, unsigned int set)
920 923
921 spin_unlock_irqrestore(&lchip->lock, flags); 924 spin_unlock_irqrestore(&lchip->lock, flags);
922} 925}
926EXPORT_SYMBOL(locomo_gpio_write);
923 927
924static void locomo_m62332_sendbit(void *mapbase, int bit) 928static void locomo_m62332_sendbit(void *mapbase, int bit)
925{ 929{
@@ -1084,13 +1088,12 @@ void locomo_m62332_senddata(struct locomo_dev *ldev, unsigned int dac_data, int
1084 1088
1085 spin_unlock_irqrestore(&lchip->lock, flags); 1089 spin_unlock_irqrestore(&lchip->lock, flags);
1086} 1090}
1091EXPORT_SYMBOL(locomo_m62332_senddata);
1087 1092
1088/* 1093/*
1089 * Frontlight control 1094 * Frontlight control
1090 */ 1095 */
1091 1096
1092static struct locomo *locomo_chip_driver(struct locomo_dev *ldev);
1093
1094void locomo_frontlight_set(struct locomo_dev *dev, int duty, int vr, int bpwf) 1097void locomo_frontlight_set(struct locomo_dev *dev, int duty, int vr, int bpwf)
1095{ 1098{
1096 unsigned long flags; 1099 unsigned long flags;
@@ -1182,11 +1185,13 @@ int locomo_driver_register(struct locomo_driver *driver)
1182 driver->drv.bus = &locomo_bus_type; 1185 driver->drv.bus = &locomo_bus_type;
1183 return driver_register(&driver->drv); 1186 return driver_register(&driver->drv);
1184} 1187}
1188EXPORT_SYMBOL(locomo_driver_register);
1185 1189
1186void locomo_driver_unregister(struct locomo_driver *driver) 1190void locomo_driver_unregister(struct locomo_driver *driver)
1187{ 1191{
1188 driver_unregister(&driver->drv); 1192 driver_unregister(&driver->drv);
1189} 1193}
1194EXPORT_SYMBOL(locomo_driver_unregister);
1190 1195
1191static int __init locomo_init(void) 1196static int __init locomo_init(void)
1192{ 1197{
@@ -1208,11 +1213,3 @@ module_exit(locomo_exit);
1208MODULE_DESCRIPTION("Sharp LoCoMo core driver"); 1213MODULE_DESCRIPTION("Sharp LoCoMo core driver");
1209MODULE_LICENSE("GPL"); 1214MODULE_LICENSE("GPL");
1210MODULE_AUTHOR("John Lenz <lenz@cs.wisc.edu>"); 1215MODULE_AUTHOR("John Lenz <lenz@cs.wisc.edu>");
1211
1212EXPORT_SYMBOL(locomo_driver_register);
1213EXPORT_SYMBOL(locomo_driver_unregister);
1214EXPORT_SYMBOL(locomo_gpio_set_dir);
1215EXPORT_SYMBOL(locomo_gpio_read_level);
1216EXPORT_SYMBOL(locomo_gpio_read_output);
1217EXPORT_SYMBOL(locomo_gpio_write);
1218EXPORT_SYMBOL(locomo_m62332_senddata);
diff --git a/arch/arm/common/vic.c b/arch/arm/common/vic.c
index 920ced0b73c5..f232941de8ab 100644
--- a/arch/arm/common/vic.c
+++ b/arch/arm/common/vic.c
@@ -22,6 +22,7 @@
22#include <linux/list.h> 22#include <linux/list.h>
23#include <linux/io.h> 23#include <linux/io.h>
24#include <linux/sysdev.h> 24#include <linux/sysdev.h>
25#include <linux/device.h>
25#include <linux/amba/bus.h> 26#include <linux/amba/bus.h>
26 27
27#include <asm/mach/irq.h> 28#include <asm/mach/irq.h>
diff --git a/arch/arm/configs/da830_omapl137_defconfig b/arch/arm/configs/da830_omapl137_defconfig
new file mode 100644
index 000000000000..7c8e38f5c5ab
--- /dev/null
+++ b/arch/arm/configs/da830_omapl137_defconfig
@@ -0,0 +1,1254 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc2-davinci1
4# Wed May 13 15:33:29 2009
5#
6CONFIG_ARM=y
7CONFIG_SYS_SUPPORTS_APM_EMULATION=y
8CONFIG_GENERIC_GPIO=y
9CONFIG_GENERIC_TIME=y
10CONFIG_GENERIC_CLOCKEVENTS=y
11CONFIG_MMU=y
12# CONFIG_NO_IOPORT is not set
13CONFIG_GENERIC_HARDIRQS=y
14CONFIG_STACKTRACE_SUPPORT=y
15CONFIG_HAVE_LATENCYTOP_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_ZONE_DMA=y
26CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
27CONFIG_VECTORS_BASE=0xffff0000
28CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
29
30#
31# General setup
32#
33CONFIG_EXPERIMENTAL=y
34CONFIG_BROKEN_ON_SMP=y
35CONFIG_LOCK_KERNEL=y
36CONFIG_INIT_ENV_ARG_LIMIT=32
37CONFIG_LOCALVERSION=""
38CONFIG_LOCALVERSION_AUTO=y
39# CONFIG_SWAP is not set
40CONFIG_SYSVIPC=y
41CONFIG_SYSVIPC_SYSCTL=y
42CONFIG_POSIX_MQUEUE=y
43CONFIG_POSIX_MQUEUE_SYSCTL=y
44# CONFIG_BSD_PROCESS_ACCT is not set
45# CONFIG_TASKSTATS is not set
46# CONFIG_AUDIT is not set
47
48#
49# RCU Subsystem
50#
51CONFIG_CLASSIC_RCU=y
52# CONFIG_TREE_RCU is not set
53# CONFIG_PREEMPT_RCU is not set
54# CONFIG_TREE_RCU_TRACE is not set
55# CONFIG_PREEMPT_RCU_TRACE is not set
56CONFIG_IKCONFIG=y
57CONFIG_IKCONFIG_PROC=y
58CONFIG_LOG_BUF_SHIFT=14
59CONFIG_GROUP_SCHED=y
60CONFIG_FAIR_GROUP_SCHED=y
61# CONFIG_RT_GROUP_SCHED is not set
62CONFIG_USER_SCHED=y
63# CONFIG_CGROUP_SCHED is not set
64# CONFIG_CGROUPS is not set
65CONFIG_SYSFS_DEPRECATED=y
66CONFIG_SYSFS_DEPRECATED_V2=y
67# CONFIG_RELAY is not set
68# CONFIG_NAMESPACES is not set
69CONFIG_BLK_DEV_INITRD=y
70CONFIG_INITRAMFS_SOURCE=""
71CONFIG_RD_GZIP=y
72# CONFIG_RD_BZIP2 is not set
73# CONFIG_RD_LZMA is not set
74CONFIG_CC_OPTIMIZE_FOR_SIZE=y
75CONFIG_SYSCTL=y
76CONFIG_ANON_INODES=y
77CONFIG_EMBEDDED=y
78CONFIG_UID16=y
79CONFIG_SYSCTL_SYSCALL=y
80CONFIG_KALLSYMS=y
81# CONFIG_KALLSYMS_ALL is not set
82# CONFIG_KALLSYMS_EXTRA_PASS is not set
83# CONFIG_STRIP_ASM_SYMS is not set
84CONFIG_HOTPLUG=y
85CONFIG_PRINTK=y
86CONFIG_BUG=y
87CONFIG_ELF_CORE=y
88CONFIG_BASE_FULL=y
89CONFIG_FUTEX=y
90CONFIG_EPOLL=y
91CONFIG_SIGNALFD=y
92CONFIG_TIMERFD=y
93CONFIG_EVENTFD=y
94CONFIG_SHMEM=y
95CONFIG_AIO=y
96CONFIG_VM_EVENT_COUNTERS=y
97CONFIG_SLUB_DEBUG=y
98CONFIG_COMPAT_BRK=y
99# CONFIG_SLAB is not set
100CONFIG_SLUB=y
101# CONFIG_SLOB is not set
102# CONFIG_PROFILING is not set
103# CONFIG_MARKERS is not set
104CONFIG_HAVE_OPROFILE=y
105# CONFIG_KPROBES is not set
106CONFIG_HAVE_KPROBES=y
107CONFIG_HAVE_KRETPROBES=y
108CONFIG_HAVE_CLK=y
109# CONFIG_SLOW_WORK is not set
110CONFIG_HAVE_GENERIC_DMA_COHERENT=y
111CONFIG_SLABINFO=y
112CONFIG_RT_MUTEXES=y
113CONFIG_BASE_SMALL=0
114CONFIG_MODULES=y
115# CONFIG_MODULE_FORCE_LOAD is not set
116CONFIG_MODULE_UNLOAD=y
117CONFIG_MODULE_FORCE_UNLOAD=y
118CONFIG_MODVERSIONS=y
119# CONFIG_MODULE_SRCVERSION_ALL is not set
120CONFIG_BLOCK=y
121# CONFIG_LBD is not set
122# CONFIG_BLK_DEV_BSG is not set
123# CONFIG_BLK_DEV_INTEGRITY is not set
124
125#
126# IO Schedulers
127#
128CONFIG_IOSCHED_NOOP=y
129CONFIG_IOSCHED_AS=y
130# CONFIG_IOSCHED_DEADLINE is not set
131# CONFIG_IOSCHED_CFQ is not set
132CONFIG_DEFAULT_AS=y
133# CONFIG_DEFAULT_DEADLINE is not set
134# CONFIG_DEFAULT_CFQ is not set
135# CONFIG_DEFAULT_NOOP is not set
136CONFIG_DEFAULT_IOSCHED="anticipatory"
137# CONFIG_FREEZER is not set
138
139#
140# System Type
141#
142# CONFIG_ARCH_AAEC2000 is not set
143# CONFIG_ARCH_INTEGRATOR is not set
144# CONFIG_ARCH_REALVIEW is not set
145# CONFIG_ARCH_VERSATILE is not set
146# CONFIG_ARCH_AT91 is not set
147# CONFIG_ARCH_CLPS711X is not set
148# CONFIG_ARCH_EBSA110 is not set
149# CONFIG_ARCH_EP93XX is not set
150# CONFIG_ARCH_GEMINI is not set
151# CONFIG_ARCH_FOOTBRIDGE is not set
152# CONFIG_ARCH_NETX is not set
153# CONFIG_ARCH_H720X is not set
154# CONFIG_ARCH_IMX is not set
155# CONFIG_ARCH_IOP13XX is not set
156# CONFIG_ARCH_IOP32X is not set
157# CONFIG_ARCH_IOP33X is not set
158# CONFIG_ARCH_IXP23XX is not set
159# CONFIG_ARCH_IXP2000 is not set
160# CONFIG_ARCH_IXP4XX is not set
161# CONFIG_ARCH_L7200 is not set
162# CONFIG_ARCH_KIRKWOOD is not set
163# CONFIG_ARCH_KS8695 is not set
164# CONFIG_ARCH_NS9XXX is not set
165# CONFIG_ARCH_LOKI is not set
166# CONFIG_ARCH_MV78XX0 is not set
167# CONFIG_ARCH_MXC is not set
168# CONFIG_ARCH_ORION5X is not set
169# CONFIG_ARCH_PNX4008 is not set
170# CONFIG_ARCH_PXA is not set
171# CONFIG_ARCH_MMP is not set
172# CONFIG_ARCH_RPC is not set
173# CONFIG_ARCH_SA1100 is not set
174# CONFIG_ARCH_S3C2410 is not set
175# CONFIG_ARCH_S3C64XX is not set
176# CONFIG_ARCH_SHARK is not set
177# CONFIG_ARCH_LH7A40X is not set
178CONFIG_ARCH_DAVINCI=y
179# CONFIG_ARCH_OMAP is not set
180# CONFIG_ARCH_MSM is not set
181# CONFIG_ARCH_W90X900 is not set
182CONFIG_CP_INTC=y
183
184#
185# TI DaVinci Implementations
186#
187
188#
189# DaVinci Core Type
190#
191# CONFIG_ARCH_DAVINCI_DM644x is not set
192# CONFIG_ARCH_DAVINCI_DM646x is not set
193# CONFIG_ARCH_DAVINCI_DM355 is not set
194CONFIG_ARCH_DAVINCI_DA830=y
195
196#
197# DaVinci Board Type
198#
199CONFIG_MACH_DAVINCI_DA830_EVM=y
200CONFIG_DAVINCI_MUX=y
201# CONFIG_DAVINCI_MUX_DEBUG is not set
202# CONFIG_DAVINCI_MUX_WARNINGS is not set
203CONFIG_DAVINCI_RESET_CLOCKS=y
204
205#
206# Processor Type
207#
208CONFIG_CPU_32=y
209CONFIG_CPU_ARM926T=y
210CONFIG_CPU_32v5=y
211CONFIG_CPU_ABRT_EV5TJ=y
212CONFIG_CPU_PABRT_NOIFAR=y
213CONFIG_CPU_CACHE_VIVT=y
214CONFIG_CPU_COPY_V4WB=y
215CONFIG_CPU_TLB_V4WBI=y
216CONFIG_CPU_CP15=y
217CONFIG_CPU_CP15_MMU=y
218
219#
220# Processor Features
221#
222CONFIG_ARM_THUMB=y
223# CONFIG_CPU_ICACHE_DISABLE is not set
224# CONFIG_CPU_DCACHE_DISABLE is not set
225CONFIG_CPU_DCACHE_WRITETHROUGH=y
226# CONFIG_CPU_CACHE_ROUND_ROBIN is not set
227# CONFIG_OUTER_CACHE is not set
228CONFIG_COMMON_CLKDEV=y
229
230#
231# Bus support
232#
233# CONFIG_PCI_SYSCALL is not set
234# CONFIG_ARCH_SUPPORTS_MSI is not set
235# CONFIG_PCCARD is not set
236
237#
238# Kernel Features
239#
240CONFIG_TICK_ONESHOT=y
241CONFIG_NO_HZ=y
242CONFIG_HIGH_RES_TIMERS=y
243CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
244CONFIG_VMSPLIT_3G=y
245# CONFIG_VMSPLIT_2G is not set
246# CONFIG_VMSPLIT_1G is not set
247CONFIG_PAGE_OFFSET=0xC0000000
248CONFIG_PREEMPT=y
249CONFIG_HZ=100
250CONFIG_AEABI=y
251# CONFIG_OABI_COMPAT is not set
252CONFIG_ARCH_FLATMEM_HAS_HOLES=y
253# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
254# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
255# CONFIG_HIGHMEM is not set
256CONFIG_SELECT_MEMORY_MODEL=y
257CONFIG_FLATMEM_MANUAL=y
258# CONFIG_DISCONTIGMEM_MANUAL is not set
259# CONFIG_SPARSEMEM_MANUAL is not set
260CONFIG_FLATMEM=y
261CONFIG_FLAT_NODE_MEM_MAP=y
262CONFIG_PAGEFLAGS_EXTENDED=y
263CONFIG_SPLIT_PTLOCK_CPUS=4096
264# CONFIG_PHYS_ADDR_T_64BIT is not set
265CONFIG_ZONE_DMA_FLAG=1
266CONFIG_BOUNCE=y
267CONFIG_VIRT_TO_BUS=y
268CONFIG_UNEVICTABLE_LRU=y
269CONFIG_HAVE_MLOCK=y
270CONFIG_HAVE_MLOCKED_PAGE_BIT=y
271CONFIG_LEDS=y
272# CONFIG_LEDS_CPU is not set
273CONFIG_ALIGNMENT_TRAP=y
274
275#
276# Boot options
277#
278CONFIG_ZBOOT_ROM_TEXT=0x0
279CONFIG_ZBOOT_ROM_BSS=0x0
280CONFIG_CMDLINE=""
281# CONFIG_XIP_KERNEL is not set
282# CONFIG_KEXEC is not set
283
284#
285# CPU Power Management
286#
287# CONFIG_CPU_IDLE is not set
288
289#
290# Floating point emulation
291#
292
293#
294# At least one emulation must be selected
295#
296# CONFIG_VFP is not set
297
298#
299# Userspace binary formats
300#
301CONFIG_BINFMT_ELF=y
302# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
303CONFIG_HAVE_AOUT=y
304# CONFIG_BINFMT_AOUT is not set
305# CONFIG_BINFMT_MISC is not set
306
307#
308# Power management options
309#
310# CONFIG_PM is not set
311CONFIG_ARCH_SUSPEND_POSSIBLE=y
312CONFIG_NET=y
313
314#
315# Networking options
316#
317CONFIG_PACKET=y
318# CONFIG_PACKET_MMAP is not set
319CONFIG_UNIX=y
320CONFIG_XFRM=y
321# CONFIG_XFRM_USER is not set
322# CONFIG_XFRM_SUB_POLICY is not set
323# CONFIG_XFRM_MIGRATE is not set
324# CONFIG_XFRM_STATISTICS is not set
325# CONFIG_NET_KEY is not set
326CONFIG_INET=y
327# CONFIG_IP_MULTICAST is not set
328# CONFIG_IP_ADVANCED_ROUTER is not set
329CONFIG_IP_FIB_HASH=y
330CONFIG_IP_PNP=y
331CONFIG_IP_PNP_DHCP=y
332# CONFIG_IP_PNP_BOOTP is not set
333# CONFIG_IP_PNP_RARP is not set
334# CONFIG_NET_IPIP is not set
335# CONFIG_NET_IPGRE is not set
336# CONFIG_ARPD is not set
337# CONFIG_SYN_COOKIES is not set
338# CONFIG_INET_AH is not set
339# CONFIG_INET_ESP is not set
340# CONFIG_INET_IPCOMP is not set
341# CONFIG_INET_XFRM_TUNNEL is not set
342CONFIG_INET_TUNNEL=m
343CONFIG_INET_XFRM_MODE_TRANSPORT=y
344CONFIG_INET_XFRM_MODE_TUNNEL=y
345CONFIG_INET_XFRM_MODE_BEET=y
346# CONFIG_INET_LRO is not set
347CONFIG_INET_DIAG=y
348CONFIG_INET_TCP_DIAG=y
349# CONFIG_TCP_CONG_ADVANCED is not set
350CONFIG_TCP_CONG_CUBIC=y
351CONFIG_DEFAULT_TCP_CONG="cubic"
352# CONFIG_TCP_MD5SIG is not set
353CONFIG_IPV6=m
354# CONFIG_IPV6_PRIVACY is not set
355# CONFIG_IPV6_ROUTER_PREF is not set
356# CONFIG_IPV6_OPTIMISTIC_DAD is not set
357# CONFIG_INET6_AH is not set
358# CONFIG_INET6_ESP is not set
359# CONFIG_INET6_IPCOMP is not set
360# CONFIG_IPV6_MIP6 is not set
361# CONFIG_INET6_XFRM_TUNNEL is not set
362# CONFIG_INET6_TUNNEL is not set
363CONFIG_INET6_XFRM_MODE_TRANSPORT=m
364CONFIG_INET6_XFRM_MODE_TUNNEL=m
365CONFIG_INET6_XFRM_MODE_BEET=m
366# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
367CONFIG_IPV6_SIT=m
368CONFIG_IPV6_NDISC_NODETYPE=y
369# CONFIG_IPV6_TUNNEL is not set
370# CONFIG_IPV6_MULTIPLE_TABLES is not set
371# CONFIG_IPV6_MROUTE is not set
372# CONFIG_NETWORK_SECMARK is not set
373CONFIG_NETFILTER=y
374# CONFIG_NETFILTER_DEBUG is not set
375CONFIG_NETFILTER_ADVANCED=y
376
377#
378# Core Netfilter Configuration
379#
380# CONFIG_NETFILTER_NETLINK_QUEUE is not set
381# CONFIG_NETFILTER_NETLINK_LOG is not set
382# CONFIG_NF_CONNTRACK is not set
383# CONFIG_NETFILTER_XTABLES is not set
384# CONFIG_IP_VS is not set
385
386#
387# IP: Netfilter Configuration
388#
389# CONFIG_NF_DEFRAG_IPV4 is not set
390# CONFIG_IP_NF_QUEUE is not set
391# CONFIG_IP_NF_IPTABLES is not set
392# CONFIG_IP_NF_ARPTABLES is not set
393
394#
395# IPv6: Netfilter Configuration
396#
397# CONFIG_IP6_NF_QUEUE is not set
398# CONFIG_IP6_NF_IPTABLES is not set
399# CONFIG_IP_DCCP is not set
400# CONFIG_IP_SCTP is not set
401# CONFIG_TIPC is not set
402# CONFIG_ATM is not set
403# CONFIG_BRIDGE is not set
404# CONFIG_NET_DSA is not set
405# CONFIG_VLAN_8021Q is not set
406# CONFIG_DECNET is not set
407# CONFIG_LLC2 is not set
408# CONFIG_IPX is not set
409# CONFIG_ATALK is not set
410# CONFIG_X25 is not set
411# CONFIG_LAPB is not set
412# CONFIG_ECONET is not set
413# CONFIG_WAN_ROUTER is not set
414# CONFIG_PHONET is not set
415# CONFIG_NET_SCHED is not set
416# CONFIG_DCB is not set
417
418#
419# Network testing
420#
421# CONFIG_NET_PKTGEN is not set
422# CONFIG_HAMRADIO is not set
423# CONFIG_CAN is not set
424# CONFIG_IRDA is not set
425# CONFIG_BT is not set
426# CONFIG_AF_RXRPC is not set
427# CONFIG_WIRELESS is not set
428# CONFIG_WIMAX is not set
429# CONFIG_RFKILL is not set
430# CONFIG_NET_9P is not set
431
432#
433# Device Drivers
434#
435
436#
437# Generic Driver Options
438#
439CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
440CONFIG_STANDALONE=y
441CONFIG_PREVENT_FIRMWARE_BUILD=y
442# CONFIG_FW_LOADER is not set
443# CONFIG_DEBUG_DRIVER is not set
444# CONFIG_DEBUG_DEVRES is not set
445# CONFIG_SYS_HYPERVISOR is not set
446# CONFIG_CONNECTOR is not set
447# CONFIG_MTD is not set
448# CONFIG_PARPORT is not set
449CONFIG_BLK_DEV=y
450# CONFIG_BLK_DEV_COW_COMMON is not set
451CONFIG_BLK_DEV_LOOP=m
452# CONFIG_BLK_DEV_CRYPTOLOOP is not set
453# CONFIG_BLK_DEV_NBD is not set
454CONFIG_BLK_DEV_RAM=y
455CONFIG_BLK_DEV_RAM_COUNT=1
456CONFIG_BLK_DEV_RAM_SIZE=32768
457# CONFIG_BLK_DEV_XIP is not set
458# CONFIG_CDROM_PKTCDVD is not set
459# CONFIG_ATA_OVER_ETH is not set
460CONFIG_MISC_DEVICES=y
461# CONFIG_ICS932S401 is not set
462# CONFIG_ENCLOSURE_SERVICES is not set
463# CONFIG_ISL29003 is not set
464# CONFIG_C2PORT is not set
465
466#
467# EEPROM support
468#
469CONFIG_EEPROM_AT24=y
470# CONFIG_EEPROM_LEGACY is not set
471# CONFIG_EEPROM_93CX6 is not set
472CONFIG_HAVE_IDE=y
473# CONFIG_IDE is not set
474
475#
476# SCSI device support
477#
478# CONFIG_RAID_ATTRS is not set
479CONFIG_SCSI=m
480CONFIG_SCSI_DMA=y
481# CONFIG_SCSI_TGT is not set
482# CONFIG_SCSI_NETLINK is not set
483CONFIG_SCSI_PROC_FS=y
484
485#
486# SCSI support type (disk, tape, CD-ROM)
487#
488CONFIG_BLK_DEV_SD=m
489# CONFIG_CHR_DEV_ST is not set
490# CONFIG_CHR_DEV_OSST is not set
491# CONFIG_BLK_DEV_SR is not set
492# CONFIG_CHR_DEV_SG is not set
493# CONFIG_CHR_DEV_SCH is not set
494
495#
496# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
497#
498# CONFIG_SCSI_MULTI_LUN is not set
499# CONFIG_SCSI_CONSTANTS is not set
500# CONFIG_SCSI_LOGGING is not set
501# CONFIG_SCSI_SCAN_ASYNC is not set
502CONFIG_SCSI_WAIT_SCAN=m
503
504#
505# SCSI Transports
506#
507# CONFIG_SCSI_SPI_ATTRS is not set
508# CONFIG_SCSI_FC_ATTRS is not set
509# CONFIG_SCSI_ISCSI_ATTRS is not set
510# CONFIG_SCSI_SAS_LIBSAS is not set
511# CONFIG_SCSI_SRP_ATTRS is not set
512CONFIG_SCSI_LOWLEVEL=y
513# CONFIG_ISCSI_TCP is not set
514# CONFIG_LIBFC is not set
515# CONFIG_LIBFCOE is not set
516# CONFIG_SCSI_DEBUG is not set
517# CONFIG_SCSI_DH is not set
518# CONFIG_SCSI_OSD_INITIATOR is not set
519# CONFIG_ATA is not set
520# CONFIG_MD is not set
521CONFIG_NETDEVICES=y
522CONFIG_COMPAT_NET_DEV_OPS=y
523# CONFIG_DUMMY is not set
524# CONFIG_BONDING is not set
525# CONFIG_MACVLAN is not set
526# CONFIG_EQUALIZER is not set
527CONFIG_TUN=m
528# CONFIG_VETH is not set
529CONFIG_PHYLIB=y
530
531#
532# MII PHY device drivers
533#
534# CONFIG_MARVELL_PHY is not set
535# CONFIG_DAVICOM_PHY is not set
536# CONFIG_QSEMI_PHY is not set
537CONFIG_LXT_PHY=y
538# CONFIG_CICADA_PHY is not set
539# CONFIG_VITESSE_PHY is not set
540# CONFIG_SMSC_PHY is not set
541# CONFIG_BROADCOM_PHY is not set
542# CONFIG_ICPLUS_PHY is not set
543# CONFIG_REALTEK_PHY is not set
544# CONFIG_NATIONAL_PHY is not set
545# CONFIG_STE10XP is not set
546CONFIG_LSI_ET1011C_PHY=y
547# CONFIG_FIXED_PHY is not set
548# CONFIG_MDIO_BITBANG is not set
549CONFIG_NET_ETHERNET=y
550CONFIG_MII=y
551# CONFIG_AX88796 is not set
552# CONFIG_SMC91X is not set
553CONFIG_TI_DAVINCI_EMAC=y
554# CONFIG_DM9000 is not set
555# CONFIG_ETHOC is not set
556# CONFIG_SMC911X is not set
557# CONFIG_SMSC911X is not set
558# CONFIG_DNET is not set
559# CONFIG_IBM_NEW_EMAC_ZMII is not set
560# CONFIG_IBM_NEW_EMAC_RGMII is not set
561# CONFIG_IBM_NEW_EMAC_TAH is not set
562# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
563# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
564# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
565# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
566# CONFIG_B44 is not set
567# CONFIG_NETDEV_1000 is not set
568# CONFIG_NETDEV_10000 is not set
569
570#
571# Wireless LAN
572#
573# CONFIG_WLAN_PRE80211 is not set
574# CONFIG_WLAN_80211 is not set
575
576#
577# Enable WiMAX (Networking options) to see the WiMAX drivers
578#
579# CONFIG_WAN is not set
580# CONFIG_PPP is not set
581# CONFIG_SLIP is not set
582CONFIG_NETCONSOLE=y
583# CONFIG_NETCONSOLE_DYNAMIC is not set
584CONFIG_NETPOLL=y
585CONFIG_NETPOLL_TRAP=y
586CONFIG_NET_POLL_CONTROLLER=y
587# CONFIG_ISDN is not set
588
589#
590# Input device support
591#
592CONFIG_INPUT=y
593# CONFIG_INPUT_FF_MEMLESS is not set
594# CONFIG_INPUT_POLLDEV is not set
595
596#
597# Userland interfaces
598#
599CONFIG_INPUT_MOUSEDEV=m
600CONFIG_INPUT_MOUSEDEV_PSAUX=y
601CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
602CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
603# CONFIG_INPUT_JOYDEV is not set
604CONFIG_INPUT_EVDEV=m
605CONFIG_INPUT_EVBUG=m
606
607#
608# Input Device Drivers
609#
610CONFIG_INPUT_KEYBOARD=y
611CONFIG_KEYBOARD_ATKBD=m
612# CONFIG_KEYBOARD_SUNKBD is not set
613# CONFIG_KEYBOARD_LKKBD is not set
614CONFIG_KEYBOARD_XTKBD=m
615# CONFIG_KEYBOARD_NEWTON is not set
616# CONFIG_KEYBOARD_STOWAWAY is not set
617CONFIG_KEYBOARD_GPIO=y
618# CONFIG_INPUT_MOUSE is not set
619# CONFIG_INPUT_JOYSTICK is not set
620# CONFIG_INPUT_TABLET is not set
621CONFIG_INPUT_TOUCHSCREEN=y
622# CONFIG_TOUCHSCREEN_AD7879_I2C is not set
623# CONFIG_TOUCHSCREEN_AD7879 is not set
624# CONFIG_TOUCHSCREEN_FUJITSU is not set
625# CONFIG_TOUCHSCREEN_GUNZE is not set
626# CONFIG_TOUCHSCREEN_ELO is not set
627# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set
628# CONFIG_TOUCHSCREEN_MTOUCH is not set
629# CONFIG_TOUCHSCREEN_INEXIO is not set
630# CONFIG_TOUCHSCREEN_MK712 is not set
631# CONFIG_TOUCHSCREEN_PENMOUNT is not set
632# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
633# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
634# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
635# CONFIG_TOUCHSCREEN_TSC2007 is not set
636# CONFIG_INPUT_MISC is not set
637
638#
639# Hardware I/O ports
640#
641CONFIG_SERIO=y
642CONFIG_SERIO_SERPORT=y
643CONFIG_SERIO_LIBPS2=y
644# CONFIG_SERIO_RAW is not set
645# CONFIG_GAMEPORT is not set
646
647#
648# Character devices
649#
650CONFIG_VT=y
651CONFIG_CONSOLE_TRANSLATIONS=y
652# CONFIG_VT_CONSOLE is not set
653CONFIG_HW_CONSOLE=y
654# CONFIG_VT_HW_CONSOLE_BINDING is not set
655CONFIG_DEVKMEM=y
656# CONFIG_SERIAL_NONSTANDARD is not set
657
658#
659# Serial drivers
660#
661CONFIG_SERIAL_8250=y
662CONFIG_SERIAL_8250_CONSOLE=y
663CONFIG_SERIAL_8250_NR_UARTS=3
664CONFIG_SERIAL_8250_RUNTIME_UARTS=3
665# CONFIG_SERIAL_8250_EXTENDED is not set
666
667#
668# Non-8250 serial port support
669#
670CONFIG_SERIAL_CORE=y
671CONFIG_SERIAL_CORE_CONSOLE=y
672CONFIG_UNIX98_PTYS=y
673# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
674CONFIG_LEGACY_PTYS=y
675CONFIG_LEGACY_PTY_COUNT=256
676# CONFIG_IPMI_HANDLER is not set
677CONFIG_HW_RANDOM=m
678# CONFIG_HW_RANDOM_TIMERIOMEM is not set
679# CONFIG_R3964 is not set
680# CONFIG_RAW_DRIVER is not set
681# CONFIG_TCG_TPM is not set
682CONFIG_I2C=y
683CONFIG_I2C_BOARDINFO=y
684CONFIG_I2C_CHARDEV=y
685CONFIG_I2C_HELPER_AUTO=y
686
687#
688# I2C Hardware Bus support
689#
690
691#
692# I2C system bus drivers (mostly embedded / system-on-chip)
693#
694CONFIG_I2C_DAVINCI=y
695# CONFIG_I2C_GPIO is not set
696# CONFIG_I2C_OCORES is not set
697# CONFIG_I2C_SIMTEC is not set
698
699#
700# External I2C/SMBus adapter drivers
701#
702# CONFIG_I2C_PARPORT_LIGHT is not set
703# CONFIG_I2C_TAOS_EVM is not set
704
705#
706# Other I2C/SMBus bus drivers
707#
708# CONFIG_I2C_PCA_PLATFORM is not set
709# CONFIG_I2C_STUB is not set
710
711#
712# Miscellaneous I2C Chip support
713#
714# CONFIG_DS1682 is not set
715# CONFIG_SENSORS_PCA9539 is not set
716# CONFIG_SENSORS_MAX6875 is not set
717# CONFIG_SENSORS_TSL2550 is not set
718# CONFIG_I2C_DEBUG_CORE is not set
719# CONFIG_I2C_DEBUG_ALGO is not set
720# CONFIG_I2C_DEBUG_BUS is not set
721# CONFIG_I2C_DEBUG_CHIP is not set
722# CONFIG_SPI is not set
723CONFIG_ARCH_REQUIRE_GPIOLIB=y
724CONFIG_GPIOLIB=y
725# CONFIG_DEBUG_GPIO is not set
726# CONFIG_GPIO_SYSFS is not set
727
728#
729# Memory mapped GPIO expanders:
730#
731
732#
733# I2C GPIO expanders:
734#
735# CONFIG_GPIO_MAX732X is not set
736# CONFIG_GPIO_PCA953X is not set
737CONFIG_GPIO_PCF857X=m
738
739#
740# PCI GPIO expanders:
741#
742
743#
744# SPI GPIO expanders:
745#
746# CONFIG_W1 is not set
747# CONFIG_POWER_SUPPLY is not set
748# CONFIG_HWMON is not set
749# CONFIG_THERMAL is not set
750# CONFIG_THERMAL_HWMON is not set
751CONFIG_WATCHDOG=y
752# CONFIG_WATCHDOG_NOWAYOUT is not set
753
754#
755# Watchdog Device Drivers
756#
757# CONFIG_SOFT_WATCHDOG is not set
758# CONFIG_DAVINCI_WATCHDOG is not set
759CONFIG_SSB_POSSIBLE=y
760
761#
762# Sonics Silicon Backplane
763#
764# CONFIG_SSB is not set
765
766#
767# Multifunction device drivers
768#
769# CONFIG_MFD_CORE is not set
770# CONFIG_MFD_SM501 is not set
771# CONFIG_MFD_ASIC3 is not set
772# CONFIG_HTC_EGPIO is not set
773# CONFIG_HTC_PASIC3 is not set
774# CONFIG_TPS65010 is not set
775# CONFIG_TWL4030_CORE is not set
776# CONFIG_MFD_TMIO is not set
777# CONFIG_MFD_T7L66XB is not set
778# CONFIG_MFD_TC6387XB is not set
779# CONFIG_MFD_TC6393XB is not set
780# CONFIG_PMIC_DA903X is not set
781# CONFIG_MFD_WM8400 is not set
782# CONFIG_MFD_WM8350_I2C is not set
783# CONFIG_MFD_PCF50633 is not set
784
785#
786# Multimedia devices
787#
788
789#
790# Multimedia core support
791#
792# CONFIG_VIDEO_DEV is not set
793# CONFIG_DVB_CORE is not set
794# CONFIG_VIDEO_MEDIA is not set
795
796#
797# Multimedia drivers
798#
799# CONFIG_DAB is not set
800
801#
802# Graphics support
803#
804# CONFIG_VGASTATE is not set
805# CONFIG_VIDEO_OUTPUT_CONTROL is not set
806# CONFIG_FB is not set
807# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
808
809#
810# Display device support
811#
812# CONFIG_DISPLAY_SUPPORT is not set
813
814#
815# Console display driver support
816#
817# CONFIG_VGA_CONSOLE is not set
818CONFIG_DUMMY_CONSOLE=y
819CONFIG_SOUND=m
820# CONFIG_SOUND_OSS_CORE is not set
821CONFIG_SND=m
822CONFIG_SND_TIMER=m
823CONFIG_SND_PCM=m
824CONFIG_SND_JACK=y
825# CONFIG_SND_SEQUENCER is not set
826# CONFIG_SND_MIXER_OSS is not set
827# CONFIG_SND_PCM_OSS is not set
828# CONFIG_SND_HRTIMER is not set
829# CONFIG_SND_DYNAMIC_MINORS is not set
830CONFIG_SND_SUPPORT_OLD_API=y
831CONFIG_SND_VERBOSE_PROCFS=y
832# CONFIG_SND_VERBOSE_PRINTK is not set
833# CONFIG_SND_DEBUG is not set
834CONFIG_SND_DRIVERS=y
835# CONFIG_SND_DUMMY is not set
836# CONFIG_SND_MTPAV is not set
837# CONFIG_SND_SERIAL_U16550 is not set
838# CONFIG_SND_MPU401 is not set
839CONFIG_SND_ARM=y
840CONFIG_SND_SOC=m
841CONFIG_SND_DAVINCI_SOC=m
842CONFIG_SND_SOC_I2C_AND_SPI=m
843# CONFIG_SND_SOC_ALL_CODECS is not set
844# CONFIG_SOUND_PRIME is not set
845# CONFIG_HID_SUPPORT is not set
846# CONFIG_USB_SUPPORT is not set
847# CONFIG_USB_MUSB_HOST is not set
848# CONFIG_USB_MUSB_PERIPHERAL is not set
849# CONFIG_USB_MUSB_OTG is not set
850# CONFIG_USB_GADGET_MUSB_HDRC is not set
851# CONFIG_USB_GADGET_AT91 is not set
852# CONFIG_USB_GADGET_ATMEL_USBA is not set
853# CONFIG_USB_GADGET_FSL_USB2 is not set
854# CONFIG_USB_GADGET_LH7A40X is not set
855# CONFIG_USB_GADGET_OMAP is not set
856# CONFIG_USB_GADGET_PXA25X is not set
857# CONFIG_USB_GADGET_PXA27X is not set
858# CONFIG_USB_GADGET_S3C2410 is not set
859# CONFIG_USB_GADGET_IMX is not set
860# CONFIG_USB_GADGET_M66592 is not set
861# CONFIG_USB_GADGET_AMD5536UDC is not set
862# CONFIG_USB_GADGET_FSL_QE is not set
863# CONFIG_USB_GADGET_CI13XXX is not set
864# CONFIG_USB_GADGET_NET2280 is not set
865# CONFIG_USB_GADGET_GOKU is not set
866# CONFIG_USB_GADGET_DUMMY_HCD is not set
867# CONFIG_USB_ZERO is not set
868# CONFIG_USB_ETH is not set
869# CONFIG_USB_GADGETFS is not set
870# CONFIG_USB_FILE_STORAGE is not set
871# CONFIG_USB_G_SERIAL is not set
872# CONFIG_USB_MIDI_GADGET is not set
873# CONFIG_USB_G_PRINTER is not set
874# CONFIG_USB_CDC_COMPOSITE is not set
875# CONFIG_MMC is not set
876# CONFIG_MEMSTICK is not set
877# CONFIG_ACCESSIBILITY is not set
878# CONFIG_NEW_LEDS is not set
879CONFIG_RTC_LIB=y
880# CONFIG_RTC_CLASS is not set
881# CONFIG_DMADEVICES is not set
882# CONFIG_AUXDISPLAY is not set
883# CONFIG_REGULATOR is not set
884# CONFIG_UIO is not set
885# CONFIG_STAGING is not set
886
887#
888# File systems
889#
890CONFIG_EXT2_FS=y
891# CONFIG_EXT2_FS_XATTR is not set
892# CONFIG_EXT2_FS_XIP is not set
893CONFIG_EXT3_FS=y
894# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
895CONFIG_EXT3_FS_XATTR=y
896# CONFIG_EXT3_FS_POSIX_ACL is not set
897# CONFIG_EXT3_FS_SECURITY is not set
898# CONFIG_EXT4_FS is not set
899CONFIG_JBD=y
900# CONFIG_JBD_DEBUG is not set
901CONFIG_FS_MBCACHE=y
902# CONFIG_REISERFS_FS is not set
903# CONFIG_JFS_FS is not set
904# CONFIG_FS_POSIX_ACL is not set
905CONFIG_FILE_LOCKING=y
906CONFIG_XFS_FS=m
907# CONFIG_XFS_QUOTA is not set
908# CONFIG_XFS_POSIX_ACL is not set
909# CONFIG_XFS_RT is not set
910# CONFIG_XFS_DEBUG is not set
911# CONFIG_OCFS2_FS is not set
912# CONFIG_BTRFS_FS is not set
913CONFIG_DNOTIFY=y
914CONFIG_INOTIFY=y
915CONFIG_INOTIFY_USER=y
916# CONFIG_QUOTA is not set
917# CONFIG_AUTOFS_FS is not set
918CONFIG_AUTOFS4_FS=m
919# CONFIG_FUSE_FS is not set
920
921#
922# Caches
923#
924# CONFIG_FSCACHE is not set
925
926#
927# CD-ROM/DVD Filesystems
928#
929# CONFIG_ISO9660_FS is not set
930# CONFIG_UDF_FS is not set
931
932#
933# DOS/FAT/NT Filesystems
934#
935CONFIG_FAT_FS=y
936CONFIG_MSDOS_FS=y
937CONFIG_VFAT_FS=y
938CONFIG_FAT_DEFAULT_CODEPAGE=437
939CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
940# CONFIG_NTFS_FS is not set
941
942#
943# Pseudo filesystems
944#
945CONFIG_PROC_FS=y
946CONFIG_PROC_SYSCTL=y
947CONFIG_PROC_PAGE_MONITOR=y
948CONFIG_SYSFS=y
949CONFIG_TMPFS=y
950# CONFIG_TMPFS_POSIX_ACL is not set
951# CONFIG_HUGETLB_PAGE is not set
952# CONFIG_CONFIGFS_FS is not set
953CONFIG_MISC_FILESYSTEMS=y
954# CONFIG_ADFS_FS is not set
955# CONFIG_AFFS_FS is not set
956# CONFIG_HFS_FS is not set
957# CONFIG_HFSPLUS_FS is not set
958# CONFIG_BEFS_FS is not set
959# CONFIG_BFS_FS is not set
960# CONFIG_EFS_FS is not set
961CONFIG_CRAMFS=y
962# CONFIG_SQUASHFS is not set
963# CONFIG_VXFS_FS is not set
964CONFIG_MINIX_FS=m
965# CONFIG_OMFS_FS is not set
966# CONFIG_HPFS_FS is not set
967# CONFIG_QNX4FS_FS is not set
968# CONFIG_ROMFS_FS is not set
969# CONFIG_SYSV_FS is not set
970# CONFIG_UFS_FS is not set
971# CONFIG_NILFS2_FS is not set
972CONFIG_NETWORK_FILESYSTEMS=y
973CONFIG_NFS_FS=y
974CONFIG_NFS_V3=y
975# CONFIG_NFS_V3_ACL is not set
976# CONFIG_NFS_V4 is not set
977CONFIG_ROOT_NFS=y
978CONFIG_NFSD=m
979CONFIG_NFSD_V3=y
980# CONFIG_NFSD_V3_ACL is not set
981# CONFIG_NFSD_V4 is not set
982CONFIG_LOCKD=y
983CONFIG_LOCKD_V4=y
984CONFIG_EXPORTFS=m
985CONFIG_NFS_COMMON=y
986CONFIG_SUNRPC=y
987# CONFIG_RPCSEC_GSS_KRB5 is not set
988# CONFIG_RPCSEC_GSS_SPKM3 is not set
989CONFIG_SMB_FS=m
990# CONFIG_SMB_NLS_DEFAULT is not set
991# CONFIG_CIFS is not set
992# CONFIG_NCP_FS is not set
993# CONFIG_CODA_FS is not set
994# CONFIG_AFS_FS is not set
995
996#
997# Partition Types
998#
999CONFIG_PARTITION_ADVANCED=y
1000# CONFIG_ACORN_PARTITION is not set
1001# CONFIG_OSF_PARTITION is not set
1002# CONFIG_AMIGA_PARTITION is not set
1003# CONFIG_ATARI_PARTITION is not set
1004# CONFIG_MAC_PARTITION is not set
1005CONFIG_MSDOS_PARTITION=y
1006# CONFIG_BSD_DISKLABEL is not set
1007# CONFIG_MINIX_SUBPARTITION is not set
1008# CONFIG_SOLARIS_X86_PARTITION is not set
1009# CONFIG_UNIXWARE_DISKLABEL is not set
1010# CONFIG_LDM_PARTITION is not set
1011# CONFIG_SGI_PARTITION is not set
1012# CONFIG_ULTRIX_PARTITION is not set
1013# CONFIG_SUN_PARTITION is not set
1014# CONFIG_KARMA_PARTITION is not set
1015# CONFIG_EFI_PARTITION is not set
1016# CONFIG_SYSV68_PARTITION is not set
1017CONFIG_NLS=y
1018CONFIG_NLS_DEFAULT="iso8859-1"
1019CONFIG_NLS_CODEPAGE_437=y
1020# CONFIG_NLS_CODEPAGE_737 is not set
1021# CONFIG_NLS_CODEPAGE_775 is not set
1022# CONFIG_NLS_CODEPAGE_850 is not set
1023# CONFIG_NLS_CODEPAGE_852 is not set
1024# CONFIG_NLS_CODEPAGE_855 is not set
1025# CONFIG_NLS_CODEPAGE_857 is not set
1026# CONFIG_NLS_CODEPAGE_860 is not set
1027# CONFIG_NLS_CODEPAGE_861 is not set
1028# CONFIG_NLS_CODEPAGE_862 is not set
1029# CONFIG_NLS_CODEPAGE_863 is not set
1030# CONFIG_NLS_CODEPAGE_864 is not set
1031# CONFIG_NLS_CODEPAGE_865 is not set
1032# CONFIG_NLS_CODEPAGE_866 is not set
1033# CONFIG_NLS_CODEPAGE_869 is not set
1034# CONFIG_NLS_CODEPAGE_936 is not set
1035# CONFIG_NLS_CODEPAGE_950 is not set
1036# CONFIG_NLS_CODEPAGE_932 is not set
1037# CONFIG_NLS_CODEPAGE_949 is not set
1038# CONFIG_NLS_CODEPAGE_874 is not set
1039# CONFIG_NLS_ISO8859_8 is not set
1040# CONFIG_NLS_CODEPAGE_1250 is not set
1041# CONFIG_NLS_CODEPAGE_1251 is not set
1042CONFIG_NLS_ASCII=m
1043CONFIG_NLS_ISO8859_1=y
1044# CONFIG_NLS_ISO8859_2 is not set
1045# CONFIG_NLS_ISO8859_3 is not set
1046# CONFIG_NLS_ISO8859_4 is not set
1047# CONFIG_NLS_ISO8859_5 is not set
1048# CONFIG_NLS_ISO8859_6 is not set
1049# CONFIG_NLS_ISO8859_7 is not set
1050# CONFIG_NLS_ISO8859_9 is not set
1051# CONFIG_NLS_ISO8859_13 is not set
1052# CONFIG_NLS_ISO8859_14 is not set
1053# CONFIG_NLS_ISO8859_15 is not set
1054# CONFIG_NLS_KOI8_R is not set
1055# CONFIG_NLS_KOI8_U is not set
1056CONFIG_NLS_UTF8=m
1057# CONFIG_DLM is not set
1058
1059#
1060# Kernel hacking
1061#
1062# CONFIG_PRINTK_TIME is not set
1063CONFIG_ENABLE_WARN_DEPRECATED=y
1064CONFIG_ENABLE_MUST_CHECK=y
1065CONFIG_FRAME_WARN=1024
1066# CONFIG_MAGIC_SYSRQ is not set
1067# CONFIG_UNUSED_SYMBOLS is not set
1068CONFIG_DEBUG_FS=y
1069# CONFIG_HEADERS_CHECK is not set
1070CONFIG_DEBUG_KERNEL=y
1071# CONFIG_DEBUG_SHIRQ is not set
1072CONFIG_DETECT_SOFTLOCKUP=y
1073# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
1074CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
1075CONFIG_DETECT_HUNG_TASK=y
1076# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
1077CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
1078CONFIG_SCHED_DEBUG=y
1079# CONFIG_SCHEDSTATS is not set
1080CONFIG_TIMER_STATS=y
1081# CONFIG_DEBUG_OBJECTS is not set
1082# CONFIG_SLUB_DEBUG_ON is not set
1083# CONFIG_SLUB_STATS is not set
1084CONFIG_DEBUG_PREEMPT=y
1085CONFIG_DEBUG_RT_MUTEXES=y
1086CONFIG_DEBUG_PI_LIST=y
1087# CONFIG_RT_MUTEX_TESTER is not set
1088# CONFIG_DEBUG_SPINLOCK is not set
1089CONFIG_DEBUG_MUTEXES=y
1090# CONFIG_DEBUG_LOCK_ALLOC is not set
1091# CONFIG_PROVE_LOCKING is not set
1092# CONFIG_LOCK_STAT is not set
1093# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1094# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1095# CONFIG_DEBUG_KOBJECT is not set
1096CONFIG_DEBUG_BUGVERBOSE=y
1097# CONFIG_DEBUG_INFO is not set
1098# CONFIG_DEBUG_VM is not set
1099# CONFIG_DEBUG_WRITECOUNT is not set
1100# CONFIG_DEBUG_MEMORY_INIT is not set
1101# CONFIG_DEBUG_LIST is not set
1102# CONFIG_DEBUG_SG is not set
1103# CONFIG_DEBUG_NOTIFIERS is not set
1104# CONFIG_BOOT_PRINTK_DELAY is not set
1105# CONFIG_RCU_TORTURE_TEST is not set
1106# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1107# CONFIG_BACKTRACE_SELF_TEST is not set
1108# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
1109# CONFIG_FAULT_INJECTION is not set
1110# CONFIG_LATENCYTOP is not set
1111# CONFIG_SYSCTL_SYSCALL_CHECK is not set
1112# CONFIG_PAGE_POISONING is not set
1113CONFIG_HAVE_FUNCTION_TRACER=y
1114CONFIG_TRACING_SUPPORT=y
1115
1116#
1117# Tracers
1118#
1119# CONFIG_FUNCTION_TRACER is not set
1120# CONFIG_IRQSOFF_TRACER is not set
1121# CONFIG_PREEMPT_TRACER is not set
1122# CONFIG_SCHED_TRACER is not set
1123# CONFIG_CONTEXT_SWITCH_TRACER is not set
1124# CONFIG_EVENT_TRACER is not set
1125# CONFIG_BOOT_TRACER is not set
1126# CONFIG_TRACE_BRANCH_PROFILING is not set
1127# CONFIG_STACK_TRACER is not set
1128# CONFIG_KMEMTRACE is not set
1129# CONFIG_WORKQUEUE_TRACER is not set
1130# CONFIG_BLK_DEV_IO_TRACE is not set
1131# CONFIG_DYNAMIC_DEBUG is not set
1132# CONFIG_SAMPLES is not set
1133CONFIG_HAVE_ARCH_KGDB=y
1134# CONFIG_KGDB is not set
1135CONFIG_ARM_UNWIND=y
1136CONFIG_DEBUG_USER=y
1137CONFIG_DEBUG_ERRORS=y
1138# CONFIG_DEBUG_STACK_USAGE is not set
1139# CONFIG_DEBUG_LL is not set
1140
1141#
1142# Security options
1143#
1144# CONFIG_KEYS is not set
1145# CONFIG_SECURITY is not set
1146# CONFIG_SECURITYFS is not set
1147# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1148CONFIG_CRYPTO=y
1149
1150#
1151# Crypto core or helper
1152#
1153# CONFIG_CRYPTO_FIPS is not set
1154# CONFIG_CRYPTO_MANAGER is not set
1155# CONFIG_CRYPTO_MANAGER2 is not set
1156# CONFIG_CRYPTO_GF128MUL is not set
1157# CONFIG_CRYPTO_NULL is not set
1158# CONFIG_CRYPTO_CRYPTD is not set
1159# CONFIG_CRYPTO_AUTHENC is not set
1160# CONFIG_CRYPTO_TEST is not set
1161
1162#
1163# Authenticated Encryption with Associated Data
1164#
1165# CONFIG_CRYPTO_CCM is not set
1166# CONFIG_CRYPTO_GCM is not set
1167# CONFIG_CRYPTO_SEQIV is not set
1168
1169#
1170# Block modes
1171#
1172# CONFIG_CRYPTO_CBC is not set
1173# CONFIG_CRYPTO_CTR is not set
1174# CONFIG_CRYPTO_CTS is not set
1175# CONFIG_CRYPTO_ECB is not set
1176# CONFIG_CRYPTO_LRW is not set
1177# CONFIG_CRYPTO_PCBC is not set
1178# CONFIG_CRYPTO_XTS is not set
1179
1180#
1181# Hash modes
1182#
1183# CONFIG_CRYPTO_HMAC is not set
1184# CONFIG_CRYPTO_XCBC is not set
1185
1186#
1187# Digest
1188#
1189# CONFIG_CRYPTO_CRC32C is not set
1190# CONFIG_CRYPTO_MD4 is not set
1191# CONFIG_CRYPTO_MD5 is not set
1192# CONFIG_CRYPTO_MICHAEL_MIC is not set
1193# CONFIG_CRYPTO_RMD128 is not set
1194# CONFIG_CRYPTO_RMD160 is not set
1195# CONFIG_CRYPTO_RMD256 is not set
1196# CONFIG_CRYPTO_RMD320 is not set
1197# CONFIG_CRYPTO_SHA1 is not set
1198# CONFIG_CRYPTO_SHA256 is not set
1199# CONFIG_CRYPTO_SHA512 is not set
1200# CONFIG_CRYPTO_TGR192 is not set
1201# CONFIG_CRYPTO_WP512 is not set
1202
1203#
1204# Ciphers
1205#
1206# CONFIG_CRYPTO_AES is not set
1207# CONFIG_CRYPTO_ANUBIS is not set
1208# CONFIG_CRYPTO_ARC4 is not set
1209# CONFIG_CRYPTO_BLOWFISH is not set
1210# CONFIG_CRYPTO_CAMELLIA is not set
1211# CONFIG_CRYPTO_CAST5 is not set
1212# CONFIG_CRYPTO_CAST6 is not set
1213# CONFIG_CRYPTO_DES is not set
1214# CONFIG_CRYPTO_FCRYPT is not set
1215# CONFIG_CRYPTO_KHAZAD is not set
1216# CONFIG_CRYPTO_SALSA20 is not set
1217# CONFIG_CRYPTO_SEED is not set
1218# CONFIG_CRYPTO_SERPENT is not set
1219# CONFIG_CRYPTO_TEA is not set
1220# CONFIG_CRYPTO_TWOFISH is not set
1221
1222#
1223# Compression
1224#
1225# CONFIG_CRYPTO_DEFLATE is not set
1226# CONFIG_CRYPTO_ZLIB is not set
1227# CONFIG_CRYPTO_LZO is not set
1228
1229#
1230# Random Number Generation
1231#
1232# CONFIG_CRYPTO_ANSI_CPRNG is not set
1233# CONFIG_CRYPTO_HW is not set
1234# CONFIG_BINARY_PRINTF is not set
1235
1236#
1237# Library routines
1238#
1239CONFIG_BITREVERSE=y
1240CONFIG_GENERIC_FIND_LAST_BIT=y
1241CONFIG_CRC_CCITT=m
1242# CONFIG_CRC16 is not set
1243CONFIG_CRC_T10DIF=m
1244# CONFIG_CRC_ITU_T is not set
1245CONFIG_CRC32=y
1246# CONFIG_CRC7 is not set
1247# CONFIG_LIBCRC32C is not set
1248CONFIG_ZLIB_INFLATE=y
1249CONFIG_DECOMPRESS_GZIP=y
1250CONFIG_GENERIC_ALLOCATOR=y
1251CONFIG_HAS_IOMEM=y
1252CONFIG_HAS_IOPORT=y
1253CONFIG_HAS_DMA=y
1254CONFIG_NLATTR=y
diff --git a/arch/arm/configs/da850_omapl138_defconfig b/arch/arm/configs/da850_omapl138_defconfig
new file mode 100644
index 000000000000..842a70b079bf
--- /dev/null
+++ b/arch/arm/configs/da850_omapl138_defconfig
@@ -0,0 +1,1229 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-davinci1
4# Mon Jun 29 07:54:15 2009
5#
6CONFIG_ARM=y
7CONFIG_SYS_SUPPORTS_APM_EMULATION=y
8CONFIG_GENERIC_GPIO=y
9CONFIG_GENERIC_TIME=y
10CONFIG_GENERIC_CLOCKEVENTS=y
11CONFIG_MMU=y
12# CONFIG_NO_IOPORT is not set
13CONFIG_GENERIC_HARDIRQS=y
14CONFIG_STACKTRACE_SUPPORT=y
15CONFIG_HAVE_LATENCYTOP_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_ZONE_DMA=y
26CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
27CONFIG_VECTORS_BASE=0xffff0000
28CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
29
30#
31# General setup
32#
33CONFIG_EXPERIMENTAL=y
34CONFIG_BROKEN_ON_SMP=y
35CONFIG_LOCK_KERNEL=y
36CONFIG_INIT_ENV_ARG_LIMIT=32
37CONFIG_LOCALVERSION=""
38CONFIG_LOCALVERSION_AUTO=y
39# CONFIG_SWAP is not set
40CONFIG_SYSVIPC=y
41CONFIG_SYSVIPC_SYSCTL=y
42CONFIG_POSIX_MQUEUE=y
43CONFIG_POSIX_MQUEUE_SYSCTL=y
44# CONFIG_BSD_PROCESS_ACCT is not set
45# CONFIG_TASKSTATS is not set
46# CONFIG_AUDIT is not set
47
48#
49# RCU Subsystem
50#
51CONFIG_CLASSIC_RCU=y
52# CONFIG_TREE_RCU is not set
53# CONFIG_PREEMPT_RCU is not set
54# CONFIG_TREE_RCU_TRACE is not set
55# CONFIG_PREEMPT_RCU_TRACE is not set
56CONFIG_IKCONFIG=y
57CONFIG_IKCONFIG_PROC=y
58CONFIG_LOG_BUF_SHIFT=14
59CONFIG_GROUP_SCHED=y
60CONFIG_FAIR_GROUP_SCHED=y
61# CONFIG_RT_GROUP_SCHED is not set
62CONFIG_USER_SCHED=y
63# CONFIG_CGROUP_SCHED is not set
64# CONFIG_CGROUPS is not set
65CONFIG_SYSFS_DEPRECATED=y
66CONFIG_SYSFS_DEPRECATED_V2=y
67# CONFIG_RELAY is not set
68# CONFIG_NAMESPACES is not set
69CONFIG_BLK_DEV_INITRD=y
70CONFIG_INITRAMFS_SOURCE=""
71CONFIG_RD_GZIP=y
72# CONFIG_RD_BZIP2 is not set
73# CONFIG_RD_LZMA is not set
74CONFIG_CC_OPTIMIZE_FOR_SIZE=y
75CONFIG_SYSCTL=y
76CONFIG_ANON_INODES=y
77CONFIG_EMBEDDED=y
78CONFIG_UID16=y
79CONFIG_SYSCTL_SYSCALL=y
80CONFIG_KALLSYMS=y
81# CONFIG_KALLSYMS_ALL is not set
82# CONFIG_KALLSYMS_EXTRA_PASS is not set
83# CONFIG_STRIP_ASM_SYMS is not set
84CONFIG_HOTPLUG=y
85CONFIG_PRINTK=y
86CONFIG_BUG=y
87CONFIG_ELF_CORE=y
88CONFIG_BASE_FULL=y
89CONFIG_FUTEX=y
90CONFIG_EPOLL=y
91CONFIG_SIGNALFD=y
92CONFIG_TIMERFD=y
93CONFIG_EVENTFD=y
94CONFIG_SHMEM=y
95CONFIG_AIO=y
96CONFIG_VM_EVENT_COUNTERS=y
97CONFIG_SLUB_DEBUG=y
98CONFIG_COMPAT_BRK=y
99# CONFIG_SLAB is not set
100CONFIG_SLUB=y
101# CONFIG_SLOB is not set
102# CONFIG_PROFILING is not set
103# CONFIG_MARKERS is not set
104CONFIG_HAVE_OPROFILE=y
105# CONFIG_KPROBES is not set
106CONFIG_HAVE_KPROBES=y
107CONFIG_HAVE_KRETPROBES=y
108CONFIG_HAVE_CLK=y
109# CONFIG_SLOW_WORK is not set
110CONFIG_HAVE_GENERIC_DMA_COHERENT=y
111CONFIG_SLABINFO=y
112CONFIG_RT_MUTEXES=y
113CONFIG_BASE_SMALL=0
114CONFIG_MODULES=y
115# CONFIG_MODULE_FORCE_LOAD is not set
116CONFIG_MODULE_UNLOAD=y
117CONFIG_MODULE_FORCE_UNLOAD=y
118CONFIG_MODVERSIONS=y
119# CONFIG_MODULE_SRCVERSION_ALL is not set
120CONFIG_BLOCK=y
121# CONFIG_LBD is not set
122# CONFIG_BLK_DEV_BSG is not set
123# CONFIG_BLK_DEV_INTEGRITY is not set
124
125#
126# IO Schedulers
127#
128CONFIG_IOSCHED_NOOP=y
129CONFIG_IOSCHED_AS=y
130# CONFIG_IOSCHED_DEADLINE is not set
131# CONFIG_IOSCHED_CFQ is not set
132CONFIG_DEFAULT_AS=y
133# CONFIG_DEFAULT_DEADLINE is not set
134# CONFIG_DEFAULT_CFQ is not set
135# CONFIG_DEFAULT_NOOP is not set
136CONFIG_DEFAULT_IOSCHED="anticipatory"
137# CONFIG_FREEZER is not set
138
139#
140# System Type
141#
142# CONFIG_ARCH_AAEC2000 is not set
143# CONFIG_ARCH_INTEGRATOR is not set
144# CONFIG_ARCH_REALVIEW is not set
145# CONFIG_ARCH_VERSATILE is not set
146# CONFIG_ARCH_AT91 is not set
147# CONFIG_ARCH_CLPS711X is not set
148# CONFIG_ARCH_EBSA110 is not set
149# CONFIG_ARCH_EP93XX is not set
150# CONFIG_ARCH_GEMINI is not set
151# CONFIG_ARCH_FOOTBRIDGE is not set
152# CONFIG_ARCH_NETX is not set
153# CONFIG_ARCH_H720X is not set
154# CONFIG_ARCH_IMX is not set
155# CONFIG_ARCH_IOP13XX is not set
156# CONFIG_ARCH_IOP32X is not set
157# CONFIG_ARCH_IOP33X is not set
158# CONFIG_ARCH_IXP23XX is not set
159# CONFIG_ARCH_IXP2000 is not set
160# CONFIG_ARCH_IXP4XX is not set
161# CONFIG_ARCH_L7200 is not set
162# CONFIG_ARCH_KIRKWOOD is not set
163# CONFIG_ARCH_KS8695 is not set
164# CONFIG_ARCH_NS9XXX is not set
165# CONFIG_ARCH_LOKI is not set
166# CONFIG_ARCH_MV78XX0 is not set
167# CONFIG_ARCH_MXC is not set
168# CONFIG_ARCH_ORION5X is not set
169# CONFIG_ARCH_PNX4008 is not set
170# CONFIG_ARCH_PXA is not set
171# CONFIG_ARCH_MMP is not set
172# CONFIG_ARCH_RPC is not set
173# CONFIG_ARCH_SA1100 is not set
174# CONFIG_ARCH_S3C2410 is not set
175# CONFIG_ARCH_S3C64XX is not set
176# CONFIG_ARCH_SHARK is not set
177# CONFIG_ARCH_LH7A40X is not set
178CONFIG_ARCH_DAVINCI=y
179# CONFIG_ARCH_OMAP is not set
180# CONFIG_ARCH_MSM is not set
181# CONFIG_ARCH_W90X900 is not set
182CONFIG_CP_INTC=y
183
184#
185# TI DaVinci Implementations
186#
187
188#
189# DaVinci Core Type
190#
191# CONFIG_ARCH_DAVINCI_DM644x is not set
192# CONFIG_ARCH_DAVINCI_DM355 is not set
193# CONFIG_ARCH_DAVINCI_DM646x is not set
194# CONFIG_ARCH_DAVINCI_DA830 is not set
195CONFIG_ARCH_DAVINCI_DA850=y
196CONFIG_ARCH_DAVINCI_DA8XX=y
197# CONFIG_ARCH_DAVINCI_DM365 is not set
198
199#
200# DaVinci Board Type
201#
202CONFIG_MACH_DAVINCI_DA850_EVM=y
203CONFIG_DAVINCI_MUX=y
204# CONFIG_DAVINCI_MUX_DEBUG is not set
205# CONFIG_DAVINCI_MUX_WARNINGS is not set
206CONFIG_DAVINCI_RESET_CLOCKS=y
207
208#
209# Processor Type
210#
211CONFIG_CPU_32=y
212CONFIG_CPU_ARM926T=y
213CONFIG_CPU_32v5=y
214CONFIG_CPU_ABRT_EV5TJ=y
215CONFIG_CPU_PABRT_NOIFAR=y
216CONFIG_CPU_CACHE_VIVT=y
217CONFIG_CPU_COPY_V4WB=y
218CONFIG_CPU_TLB_V4WBI=y
219CONFIG_CPU_CP15=y
220CONFIG_CPU_CP15_MMU=y
221
222#
223# Processor Features
224#
225CONFIG_ARM_THUMB=y
226# CONFIG_CPU_ICACHE_DISABLE is not set
227# CONFIG_CPU_DCACHE_DISABLE is not set
228# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
229# CONFIG_CPU_CACHE_ROUND_ROBIN is not set
230# CONFIG_OUTER_CACHE is not set
231CONFIG_COMMON_CLKDEV=y
232
233#
234# Bus support
235#
236# CONFIG_PCI_SYSCALL is not set
237# CONFIG_ARCH_SUPPORTS_MSI is not set
238# CONFIG_PCCARD is not set
239
240#
241# Kernel Features
242#
243CONFIG_TICK_ONESHOT=y
244CONFIG_NO_HZ=y
245CONFIG_HIGH_RES_TIMERS=y
246CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
247CONFIG_VMSPLIT_3G=y
248# CONFIG_VMSPLIT_2G is not set
249# CONFIG_VMSPLIT_1G is not set
250CONFIG_PAGE_OFFSET=0xC0000000
251CONFIG_PREEMPT=y
252CONFIG_HZ=100
253CONFIG_AEABI=y
254# CONFIG_OABI_COMPAT is not set
255# CONFIG_ARCH_HAS_HOLES_MEMORYMODEL is not set
256# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
257# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
258# CONFIG_HIGHMEM is not set
259CONFIG_SELECT_MEMORY_MODEL=y
260CONFIG_FLATMEM_MANUAL=y
261# CONFIG_DISCONTIGMEM_MANUAL is not set
262# CONFIG_SPARSEMEM_MANUAL is not set
263CONFIG_FLATMEM=y
264CONFIG_FLAT_NODE_MEM_MAP=y
265CONFIG_PAGEFLAGS_EXTENDED=y
266CONFIG_SPLIT_PTLOCK_CPUS=4096
267# CONFIG_PHYS_ADDR_T_64BIT is not set
268CONFIG_ZONE_DMA_FLAG=1
269CONFIG_BOUNCE=y
270CONFIG_VIRT_TO_BUS=y
271CONFIG_UNEVICTABLE_LRU=y
272CONFIG_HAVE_MLOCK=y
273CONFIG_HAVE_MLOCKED_PAGE_BIT=y
274CONFIG_LEDS=y
275# CONFIG_LEDS_CPU is not set
276CONFIG_ALIGNMENT_TRAP=y
277
278#
279# Boot options
280#
281CONFIG_ZBOOT_ROM_TEXT=0x0
282CONFIG_ZBOOT_ROM_BSS=0x0
283CONFIG_CMDLINE=""
284# CONFIG_XIP_KERNEL is not set
285# CONFIG_KEXEC is not set
286
287#
288# CPU Power Management
289#
290# CONFIG_CPU_IDLE is not set
291
292#
293# Floating point emulation
294#
295
296#
297# At least one emulation must be selected
298#
299# CONFIG_VFP is not set
300
301#
302# Userspace binary formats
303#
304CONFIG_BINFMT_ELF=y
305# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
306CONFIG_HAVE_AOUT=y
307# CONFIG_BINFMT_AOUT is not set
308# CONFIG_BINFMT_MISC is not set
309
310#
311# Power management options
312#
313# CONFIG_PM is not set
314CONFIG_ARCH_SUSPEND_POSSIBLE=y
315CONFIG_NET=y
316
317#
318# Networking options
319#
320CONFIG_PACKET=y
321# CONFIG_PACKET_MMAP is not set
322CONFIG_UNIX=y
323CONFIG_XFRM=y
324# CONFIG_XFRM_USER is not set
325# CONFIG_XFRM_SUB_POLICY is not set
326# CONFIG_XFRM_MIGRATE is not set
327# CONFIG_XFRM_STATISTICS is not set
328# CONFIG_NET_KEY is not set
329CONFIG_INET=y
330# CONFIG_IP_MULTICAST is not set
331# CONFIG_IP_ADVANCED_ROUTER is not set
332CONFIG_IP_FIB_HASH=y
333CONFIG_IP_PNP=y
334CONFIG_IP_PNP_DHCP=y
335# CONFIG_IP_PNP_BOOTP is not set
336# CONFIG_IP_PNP_RARP is not set
337# CONFIG_NET_IPIP is not set
338# CONFIG_NET_IPGRE is not set
339# CONFIG_ARPD is not set
340# CONFIG_SYN_COOKIES is not set
341# CONFIG_INET_AH is not set
342# CONFIG_INET_ESP is not set
343# CONFIG_INET_IPCOMP is not set
344# CONFIG_INET_XFRM_TUNNEL is not set
345CONFIG_INET_TUNNEL=m
346CONFIG_INET_XFRM_MODE_TRANSPORT=y
347CONFIG_INET_XFRM_MODE_TUNNEL=y
348CONFIG_INET_XFRM_MODE_BEET=y
349# CONFIG_INET_LRO is not set
350CONFIG_INET_DIAG=y
351CONFIG_INET_TCP_DIAG=y
352# CONFIG_TCP_CONG_ADVANCED is not set
353CONFIG_TCP_CONG_CUBIC=y
354CONFIG_DEFAULT_TCP_CONG="cubic"
355# CONFIG_TCP_MD5SIG is not set
356CONFIG_IPV6=m
357# CONFIG_IPV6_PRIVACY is not set
358# CONFIG_IPV6_ROUTER_PREF is not set
359# CONFIG_IPV6_OPTIMISTIC_DAD is not set
360# CONFIG_INET6_AH is not set
361# CONFIG_INET6_ESP is not set
362# CONFIG_INET6_IPCOMP is not set
363# CONFIG_IPV6_MIP6 is not set
364# CONFIG_INET6_XFRM_TUNNEL is not set
365# CONFIG_INET6_TUNNEL is not set
366CONFIG_INET6_XFRM_MODE_TRANSPORT=m
367CONFIG_INET6_XFRM_MODE_TUNNEL=m
368CONFIG_INET6_XFRM_MODE_BEET=m
369# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
370CONFIG_IPV6_SIT=m
371CONFIG_IPV6_NDISC_NODETYPE=y
372# CONFIG_IPV6_TUNNEL is not set
373# CONFIG_IPV6_MULTIPLE_TABLES is not set
374# CONFIG_IPV6_MROUTE is not set
375# CONFIG_NETWORK_SECMARK is not set
376CONFIG_NETFILTER=y
377# CONFIG_NETFILTER_DEBUG is not set
378CONFIG_NETFILTER_ADVANCED=y
379
380#
381# Core Netfilter Configuration
382#
383# CONFIG_NETFILTER_NETLINK_QUEUE is not set
384# CONFIG_NETFILTER_NETLINK_LOG is not set
385# CONFIG_NF_CONNTRACK is not set
386# CONFIG_NETFILTER_XTABLES is not set
387# CONFIG_IP_VS is not set
388
389#
390# IP: Netfilter Configuration
391#
392# CONFIG_NF_DEFRAG_IPV4 is not set
393# CONFIG_IP_NF_QUEUE is not set
394# CONFIG_IP_NF_IPTABLES is not set
395# CONFIG_IP_NF_ARPTABLES is not set
396
397#
398# IPv6: Netfilter Configuration
399#
400# CONFIG_IP6_NF_QUEUE is not set
401# CONFIG_IP6_NF_IPTABLES is not set
402# CONFIG_IP_DCCP is not set
403# CONFIG_IP_SCTP is not set
404# CONFIG_TIPC is not set
405# CONFIG_ATM is not set
406# CONFIG_BRIDGE is not set
407# CONFIG_NET_DSA is not set
408# CONFIG_VLAN_8021Q is not set
409# CONFIG_DECNET is not set
410# CONFIG_LLC2 is not set
411# CONFIG_IPX is not set
412# CONFIG_ATALK is not set
413# CONFIG_X25 is not set
414# CONFIG_LAPB is not set
415# CONFIG_ECONET is not set
416# CONFIG_WAN_ROUTER is not set
417# CONFIG_PHONET is not set
418# CONFIG_NET_SCHED is not set
419# CONFIG_DCB is not set
420
421#
422# Network testing
423#
424# CONFIG_NET_PKTGEN is not set
425# CONFIG_HAMRADIO is not set
426# CONFIG_CAN is not set
427# CONFIG_IRDA is not set
428# CONFIG_BT is not set
429# CONFIG_AF_RXRPC is not set
430# CONFIG_WIRELESS is not set
431# CONFIG_WIMAX is not set
432# CONFIG_RFKILL is not set
433# CONFIG_NET_9P is not set
434
435#
436# Device Drivers
437#
438
439#
440# Generic Driver Options
441#
442CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
443CONFIG_STANDALONE=y
444CONFIG_PREVENT_FIRMWARE_BUILD=y
445# CONFIG_FW_LOADER is not set
446# CONFIG_DEBUG_DRIVER is not set
447# CONFIG_DEBUG_DEVRES is not set
448# CONFIG_SYS_HYPERVISOR is not set
449# CONFIG_CONNECTOR is not set
450# CONFIG_MTD is not set
451# CONFIG_PARPORT is not set
452CONFIG_BLK_DEV=y
453# CONFIG_BLK_DEV_COW_COMMON is not set
454CONFIG_BLK_DEV_LOOP=m
455# CONFIG_BLK_DEV_CRYPTOLOOP is not set
456# CONFIG_BLK_DEV_NBD is not set
457CONFIG_BLK_DEV_RAM=y
458CONFIG_BLK_DEV_RAM_COUNT=1
459CONFIG_BLK_DEV_RAM_SIZE=32768
460# CONFIG_BLK_DEV_XIP is not set
461# CONFIG_CDROM_PKTCDVD is not set
462# CONFIG_ATA_OVER_ETH is not set
463CONFIG_MISC_DEVICES=y
464# CONFIG_ICS932S401 is not set
465# CONFIG_ENCLOSURE_SERVICES is not set
466# CONFIG_ISL29003 is not set
467# CONFIG_C2PORT is not set
468
469#
470# EEPROM support
471#
472CONFIG_EEPROM_AT24=y
473# CONFIG_EEPROM_LEGACY is not set
474# CONFIG_EEPROM_93CX6 is not set
475CONFIG_HAVE_IDE=y
476# CONFIG_IDE is not set
477
478#
479# SCSI device support
480#
481# CONFIG_RAID_ATTRS is not set
482CONFIG_SCSI=m
483CONFIG_SCSI_DMA=y
484# CONFIG_SCSI_TGT is not set
485# CONFIG_SCSI_NETLINK is not set
486CONFIG_SCSI_PROC_FS=y
487
488#
489# SCSI support type (disk, tape, CD-ROM)
490#
491CONFIG_BLK_DEV_SD=m
492# CONFIG_CHR_DEV_ST is not set
493# CONFIG_CHR_DEV_OSST is not set
494# CONFIG_BLK_DEV_SR is not set
495# CONFIG_CHR_DEV_SG is not set
496# CONFIG_CHR_DEV_SCH is not set
497
498#
499# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
500#
501# CONFIG_SCSI_MULTI_LUN is not set
502# CONFIG_SCSI_CONSTANTS is not set
503# CONFIG_SCSI_LOGGING is not set
504# CONFIG_SCSI_SCAN_ASYNC is not set
505CONFIG_SCSI_WAIT_SCAN=m
506
507#
508# SCSI Transports
509#
510# CONFIG_SCSI_SPI_ATTRS is not set
511# CONFIG_SCSI_FC_ATTRS is not set
512# CONFIG_SCSI_ISCSI_ATTRS is not set
513# CONFIG_SCSI_SAS_LIBSAS is not set
514# CONFIG_SCSI_SRP_ATTRS is not set
515CONFIG_SCSI_LOWLEVEL=y
516# CONFIG_ISCSI_TCP is not set
517# CONFIG_LIBFC is not set
518# CONFIG_LIBFCOE is not set
519# CONFIG_SCSI_DEBUG is not set
520# CONFIG_SCSI_DH is not set
521# CONFIG_SCSI_OSD_INITIATOR is not set
522# CONFIG_ATA is not set
523# CONFIG_MD is not set
524CONFIG_NETDEVICES=y
525CONFIG_COMPAT_NET_DEV_OPS=y
526# CONFIG_DUMMY is not set
527# CONFIG_BONDING is not set
528# CONFIG_MACVLAN is not set
529# CONFIG_EQUALIZER is not set
530CONFIG_TUN=m
531# CONFIG_VETH is not set
532CONFIG_PHYLIB=y
533
534#
535# MII PHY device drivers
536#
537# CONFIG_MARVELL_PHY is not set
538# CONFIG_DAVICOM_PHY is not set
539# CONFIG_QSEMI_PHY is not set
540CONFIG_LXT_PHY=y
541# CONFIG_CICADA_PHY is not set
542# CONFIG_VITESSE_PHY is not set
543# CONFIG_SMSC_PHY is not set
544# CONFIG_BROADCOM_PHY is not set
545# CONFIG_ICPLUS_PHY is not set
546# CONFIG_REALTEK_PHY is not set
547# CONFIG_NATIONAL_PHY is not set
548# CONFIG_STE10XP is not set
549CONFIG_LSI_ET1011C_PHY=y
550# CONFIG_FIXED_PHY is not set
551# CONFIG_MDIO_BITBANG is not set
552CONFIG_NET_ETHERNET=y
553CONFIG_MII=y
554# CONFIG_AX88796 is not set
555# CONFIG_SMC91X is not set
556# CONFIG_TI_DAVINCI_EMAC is not set
557# CONFIG_DM9000 is not set
558# CONFIG_ETHOC is not set
559# CONFIG_SMC911X is not set
560# CONFIG_SMSC911X is not set
561# CONFIG_DNET is not set
562# CONFIG_IBM_NEW_EMAC_ZMII is not set
563# CONFIG_IBM_NEW_EMAC_RGMII is not set
564# CONFIG_IBM_NEW_EMAC_TAH is not set
565# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
566# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
567# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
568# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
569# CONFIG_B44 is not set
570# CONFIG_NETDEV_1000 is not set
571# CONFIG_NETDEV_10000 is not set
572
573#
574# Wireless LAN
575#
576# CONFIG_WLAN_PRE80211 is not set
577# CONFIG_WLAN_80211 is not set
578
579#
580# Enable WiMAX (Networking options) to see the WiMAX drivers
581#
582# CONFIG_WAN is not set
583# CONFIG_PPP is not set
584# CONFIG_SLIP is not set
585CONFIG_NETCONSOLE=y
586# CONFIG_NETCONSOLE_DYNAMIC is not set
587CONFIG_NETPOLL=y
588CONFIG_NETPOLL_TRAP=y
589CONFIG_NET_POLL_CONTROLLER=y
590# CONFIG_ISDN is not set
591
592#
593# Input device support
594#
595CONFIG_INPUT=y
596# CONFIG_INPUT_FF_MEMLESS is not set
597# CONFIG_INPUT_POLLDEV is not set
598
599#
600# Userland interfaces
601#
602CONFIG_INPUT_MOUSEDEV=m
603CONFIG_INPUT_MOUSEDEV_PSAUX=y
604CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
605CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
606# CONFIG_INPUT_JOYDEV is not set
607CONFIG_INPUT_EVDEV=m
608CONFIG_INPUT_EVBUG=m
609
610#
611# Input Device Drivers
612#
613CONFIG_INPUT_KEYBOARD=y
614CONFIG_KEYBOARD_ATKBD=m
615# CONFIG_KEYBOARD_SUNKBD is not set
616# CONFIG_KEYBOARD_LKKBD is not set
617CONFIG_KEYBOARD_XTKBD=m
618# CONFIG_KEYBOARD_NEWTON is not set
619# CONFIG_KEYBOARD_STOWAWAY is not set
620CONFIG_KEYBOARD_GPIO=y
621# CONFIG_INPUT_MOUSE is not set
622# CONFIG_INPUT_JOYSTICK is not set
623# CONFIG_INPUT_TABLET is not set
624CONFIG_INPUT_TOUCHSCREEN=y
625# CONFIG_TOUCHSCREEN_AD7879_I2C is not set
626# CONFIG_TOUCHSCREEN_AD7879 is not set
627# CONFIG_TOUCHSCREEN_FUJITSU is not set
628# CONFIG_TOUCHSCREEN_GUNZE is not set
629# CONFIG_TOUCHSCREEN_ELO is not set
630# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set
631# CONFIG_TOUCHSCREEN_MTOUCH is not set
632# CONFIG_TOUCHSCREEN_INEXIO is not set
633# CONFIG_TOUCHSCREEN_MK712 is not set
634# CONFIG_TOUCHSCREEN_PENMOUNT is not set
635# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
636# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
637# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
638# CONFIG_TOUCHSCREEN_TSC2007 is not set
639# CONFIG_INPUT_MISC is not set
640
641#
642# Hardware I/O ports
643#
644CONFIG_SERIO=y
645CONFIG_SERIO_SERPORT=y
646CONFIG_SERIO_LIBPS2=y
647# CONFIG_SERIO_RAW is not set
648# CONFIG_GAMEPORT is not set
649
650#
651# Character devices
652#
653CONFIG_VT=y
654CONFIG_CONSOLE_TRANSLATIONS=y
655# CONFIG_VT_CONSOLE is not set
656CONFIG_HW_CONSOLE=y
657# CONFIG_VT_HW_CONSOLE_BINDING is not set
658CONFIG_DEVKMEM=y
659# CONFIG_SERIAL_NONSTANDARD is not set
660
661#
662# Serial drivers
663#
664CONFIG_SERIAL_8250=y
665CONFIG_SERIAL_8250_CONSOLE=y
666CONFIG_SERIAL_8250_NR_UARTS=3
667CONFIG_SERIAL_8250_RUNTIME_UARTS=3
668# CONFIG_SERIAL_8250_EXTENDED is not set
669
670#
671# Non-8250 serial port support
672#
673CONFIG_SERIAL_CORE=y
674CONFIG_SERIAL_CORE_CONSOLE=y
675CONFIG_UNIX98_PTYS=y
676# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
677CONFIG_LEGACY_PTYS=y
678CONFIG_LEGACY_PTY_COUNT=256
679# CONFIG_IPMI_HANDLER is not set
680CONFIG_HW_RANDOM=m
681# CONFIG_HW_RANDOM_TIMERIOMEM is not set
682# CONFIG_R3964 is not set
683# CONFIG_RAW_DRIVER is not set
684# CONFIG_TCG_TPM is not set
685CONFIG_I2C=y
686CONFIG_I2C_BOARDINFO=y
687CONFIG_I2C_CHARDEV=y
688CONFIG_I2C_HELPER_AUTO=y
689
690#
691# I2C Hardware Bus support
692#
693
694#
695# I2C system bus drivers (mostly embedded / system-on-chip)
696#
697CONFIG_I2C_DAVINCI=y
698# CONFIG_I2C_GPIO is not set
699# CONFIG_I2C_OCORES is not set
700# CONFIG_I2C_SIMTEC is not set
701
702#
703# External I2C/SMBus adapter drivers
704#
705# CONFIG_I2C_PARPORT_LIGHT is not set
706# CONFIG_I2C_TAOS_EVM is not set
707
708#
709# Other I2C/SMBus bus drivers
710#
711# CONFIG_I2C_PCA_PLATFORM is not set
712# CONFIG_I2C_STUB is not set
713
714#
715# Miscellaneous I2C Chip support
716#
717# CONFIG_DS1682 is not set
718# CONFIG_SENSORS_PCA9539 is not set
719# CONFIG_SENSORS_MAX6875 is not set
720# CONFIG_SENSORS_TSL2550 is not set
721# CONFIG_I2C_DEBUG_CORE is not set
722# CONFIG_I2C_DEBUG_ALGO is not set
723# CONFIG_I2C_DEBUG_BUS is not set
724# CONFIG_I2C_DEBUG_CHIP is not set
725# CONFIG_SPI is not set
726CONFIG_ARCH_REQUIRE_GPIOLIB=y
727CONFIG_GPIOLIB=y
728# CONFIG_DEBUG_GPIO is not set
729# CONFIG_GPIO_SYSFS is not set
730
731#
732# Memory mapped GPIO expanders:
733#
734
735#
736# I2C GPIO expanders:
737#
738# CONFIG_GPIO_MAX732X is not set
739# CONFIG_GPIO_PCA953X is not set
740CONFIG_GPIO_PCF857X=m
741
742#
743# PCI GPIO expanders:
744#
745
746#
747# SPI GPIO expanders:
748#
749# CONFIG_W1 is not set
750# CONFIG_POWER_SUPPLY is not set
751# CONFIG_HWMON is not set
752# CONFIG_THERMAL is not set
753# CONFIG_THERMAL_HWMON is not set
754CONFIG_WATCHDOG=y
755# CONFIG_WATCHDOG_NOWAYOUT is not set
756
757#
758# Watchdog Device Drivers
759#
760# CONFIG_SOFT_WATCHDOG is not set
761# CONFIG_DAVINCI_WATCHDOG is not set
762CONFIG_SSB_POSSIBLE=y
763
764#
765# Sonics Silicon Backplane
766#
767# CONFIG_SSB is not set
768
769#
770# Multifunction device drivers
771#
772# CONFIG_MFD_CORE is not set
773# CONFIG_MFD_SM501 is not set
774# CONFIG_MFD_ASIC3 is not set
775# CONFIG_HTC_EGPIO is not set
776# CONFIG_HTC_PASIC3 is not set
777# CONFIG_TPS65010 is not set
778# CONFIG_TWL4030_CORE is not set
779# CONFIG_MFD_TMIO is not set
780# CONFIG_MFD_T7L66XB is not set
781# CONFIG_MFD_TC6387XB is not set
782# CONFIG_MFD_TC6393XB is not set
783# CONFIG_PMIC_DA903X is not set
784# CONFIG_MFD_WM8400 is not set
785# CONFIG_MFD_WM8350_I2C is not set
786# CONFIG_MFD_PCF50633 is not set
787
788#
789# Multimedia devices
790#
791
792#
793# Multimedia core support
794#
795# CONFIG_VIDEO_DEV is not set
796# CONFIG_DVB_CORE is not set
797# CONFIG_VIDEO_MEDIA is not set
798
799#
800# Multimedia drivers
801#
802# CONFIG_DAB is not set
803
804#
805# Graphics support
806#
807# CONFIG_VGASTATE is not set
808# CONFIG_VIDEO_OUTPUT_CONTROL is not set
809# CONFIG_FB is not set
810# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
811
812#
813# Display device support
814#
815# CONFIG_DISPLAY_SUPPORT is not set
816
817#
818# Console display driver support
819#
820# CONFIG_VGA_CONSOLE is not set
821CONFIG_DUMMY_CONSOLE=y
822CONFIG_SOUND=m
823# CONFIG_SOUND_OSS_CORE is not set
824CONFIG_SND=m
825CONFIG_SND_TIMER=m
826CONFIG_SND_PCM=m
827CONFIG_SND_JACK=y
828# CONFIG_SND_SEQUENCER is not set
829# CONFIG_SND_MIXER_OSS is not set
830# CONFIG_SND_PCM_OSS is not set
831# CONFIG_SND_HRTIMER is not set
832# CONFIG_SND_DYNAMIC_MINORS is not set
833CONFIG_SND_SUPPORT_OLD_API=y
834CONFIG_SND_VERBOSE_PROCFS=y
835# CONFIG_SND_VERBOSE_PRINTK is not set
836# CONFIG_SND_DEBUG is not set
837CONFIG_SND_DRIVERS=y
838# CONFIG_SND_DUMMY is not set
839# CONFIG_SND_MTPAV is not set
840# CONFIG_SND_SERIAL_U16550 is not set
841# CONFIG_SND_MPU401 is not set
842CONFIG_SND_ARM=y
843CONFIG_SND_SOC=m
844CONFIG_SND_DAVINCI_SOC=m
845CONFIG_SND_SOC_I2C_AND_SPI=m
846# CONFIG_SND_SOC_ALL_CODECS is not set
847# CONFIG_SOUND_PRIME is not set
848# CONFIG_HID_SUPPORT is not set
849# CONFIG_USB_SUPPORT is not set
850# CONFIG_MMC is not set
851# CONFIG_MEMSTICK is not set
852# CONFIG_ACCESSIBILITY is not set
853# CONFIG_NEW_LEDS is not set
854CONFIG_RTC_LIB=y
855# CONFIG_RTC_CLASS is not set
856# CONFIG_DMADEVICES is not set
857# CONFIG_AUXDISPLAY is not set
858# CONFIG_REGULATOR is not set
859# CONFIG_UIO is not set
860# CONFIG_STAGING is not set
861
862#
863# File systems
864#
865CONFIG_EXT2_FS=y
866# CONFIG_EXT2_FS_XATTR is not set
867# CONFIG_EXT2_FS_XIP is not set
868CONFIG_EXT3_FS=y
869# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
870CONFIG_EXT3_FS_XATTR=y
871# CONFIG_EXT3_FS_POSIX_ACL is not set
872# CONFIG_EXT3_FS_SECURITY is not set
873# CONFIG_EXT4_FS is not set
874CONFIG_JBD=y
875# CONFIG_JBD_DEBUG is not set
876CONFIG_FS_MBCACHE=y
877# CONFIG_REISERFS_FS is not set
878# CONFIG_JFS_FS is not set
879# CONFIG_FS_POSIX_ACL is not set
880CONFIG_FILE_LOCKING=y
881CONFIG_XFS_FS=m
882# CONFIG_XFS_QUOTA is not set
883# CONFIG_XFS_POSIX_ACL is not set
884# CONFIG_XFS_RT is not set
885# CONFIG_XFS_DEBUG is not set
886# CONFIG_OCFS2_FS is not set
887# CONFIG_BTRFS_FS is not set
888CONFIG_DNOTIFY=y
889CONFIG_INOTIFY=y
890CONFIG_INOTIFY_USER=y
891# CONFIG_QUOTA is not set
892# CONFIG_AUTOFS_FS is not set
893CONFIG_AUTOFS4_FS=m
894# CONFIG_FUSE_FS is not set
895
896#
897# Caches
898#
899# CONFIG_FSCACHE is not set
900
901#
902# CD-ROM/DVD Filesystems
903#
904# CONFIG_ISO9660_FS is not set
905# CONFIG_UDF_FS is not set
906
907#
908# DOS/FAT/NT Filesystems
909#
910CONFIG_FAT_FS=y
911CONFIG_MSDOS_FS=y
912CONFIG_VFAT_FS=y
913CONFIG_FAT_DEFAULT_CODEPAGE=437
914CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
915# CONFIG_NTFS_FS is not set
916
917#
918# Pseudo filesystems
919#
920CONFIG_PROC_FS=y
921CONFIG_PROC_SYSCTL=y
922CONFIG_PROC_PAGE_MONITOR=y
923CONFIG_SYSFS=y
924CONFIG_TMPFS=y
925# CONFIG_TMPFS_POSIX_ACL is not set
926# CONFIG_HUGETLB_PAGE is not set
927# CONFIG_CONFIGFS_FS is not set
928CONFIG_MISC_FILESYSTEMS=y
929# CONFIG_ADFS_FS is not set
930# CONFIG_AFFS_FS is not set
931# CONFIG_HFS_FS is not set
932# CONFIG_HFSPLUS_FS is not set
933# CONFIG_BEFS_FS is not set
934# CONFIG_BFS_FS is not set
935# CONFIG_EFS_FS is not set
936CONFIG_CRAMFS=y
937# CONFIG_SQUASHFS is not set
938# CONFIG_VXFS_FS is not set
939CONFIG_MINIX_FS=m
940# CONFIG_OMFS_FS is not set
941# CONFIG_HPFS_FS is not set
942# CONFIG_QNX4FS_FS is not set
943# CONFIG_ROMFS_FS is not set
944# CONFIG_SYSV_FS is not set
945# CONFIG_UFS_FS is not set
946# CONFIG_NILFS2_FS is not set
947CONFIG_NETWORK_FILESYSTEMS=y
948CONFIG_NFS_FS=y
949CONFIG_NFS_V3=y
950# CONFIG_NFS_V3_ACL is not set
951# CONFIG_NFS_V4 is not set
952CONFIG_ROOT_NFS=y
953CONFIG_NFSD=m
954CONFIG_NFSD_V3=y
955# CONFIG_NFSD_V3_ACL is not set
956# CONFIG_NFSD_V4 is not set
957CONFIG_LOCKD=y
958CONFIG_LOCKD_V4=y
959CONFIG_EXPORTFS=m
960CONFIG_NFS_COMMON=y
961CONFIG_SUNRPC=y
962# CONFIG_RPCSEC_GSS_KRB5 is not set
963# CONFIG_RPCSEC_GSS_SPKM3 is not set
964CONFIG_SMB_FS=m
965# CONFIG_SMB_NLS_DEFAULT is not set
966# CONFIG_CIFS is not set
967# CONFIG_NCP_FS is not set
968# CONFIG_CODA_FS is not set
969# CONFIG_AFS_FS is not set
970
971#
972# Partition Types
973#
974CONFIG_PARTITION_ADVANCED=y
975# CONFIG_ACORN_PARTITION is not set
976# CONFIG_OSF_PARTITION is not set
977# CONFIG_AMIGA_PARTITION is not set
978# CONFIG_ATARI_PARTITION is not set
979# CONFIG_MAC_PARTITION is not set
980CONFIG_MSDOS_PARTITION=y
981# CONFIG_BSD_DISKLABEL is not set
982# CONFIG_MINIX_SUBPARTITION is not set
983# CONFIG_SOLARIS_X86_PARTITION is not set
984# CONFIG_UNIXWARE_DISKLABEL is not set
985# CONFIG_LDM_PARTITION is not set
986# CONFIG_SGI_PARTITION is not set
987# CONFIG_ULTRIX_PARTITION is not set
988# CONFIG_SUN_PARTITION is not set
989# CONFIG_KARMA_PARTITION is not set
990# CONFIG_EFI_PARTITION is not set
991# CONFIG_SYSV68_PARTITION is not set
992CONFIG_NLS=y
993CONFIG_NLS_DEFAULT="iso8859-1"
994CONFIG_NLS_CODEPAGE_437=y
995# CONFIG_NLS_CODEPAGE_737 is not set
996# CONFIG_NLS_CODEPAGE_775 is not set
997# CONFIG_NLS_CODEPAGE_850 is not set
998# CONFIG_NLS_CODEPAGE_852 is not set
999# CONFIG_NLS_CODEPAGE_855 is not set
1000# CONFIG_NLS_CODEPAGE_857 is not set
1001# CONFIG_NLS_CODEPAGE_860 is not set
1002# CONFIG_NLS_CODEPAGE_861 is not set
1003# CONFIG_NLS_CODEPAGE_862 is not set
1004# CONFIG_NLS_CODEPAGE_863 is not set
1005# CONFIG_NLS_CODEPAGE_864 is not set
1006# CONFIG_NLS_CODEPAGE_865 is not set
1007# CONFIG_NLS_CODEPAGE_866 is not set
1008# CONFIG_NLS_CODEPAGE_869 is not set
1009# CONFIG_NLS_CODEPAGE_936 is not set
1010# CONFIG_NLS_CODEPAGE_950 is not set
1011# CONFIG_NLS_CODEPAGE_932 is not set
1012# CONFIG_NLS_CODEPAGE_949 is not set
1013# CONFIG_NLS_CODEPAGE_874 is not set
1014# CONFIG_NLS_ISO8859_8 is not set
1015# CONFIG_NLS_CODEPAGE_1250 is not set
1016# CONFIG_NLS_CODEPAGE_1251 is not set
1017CONFIG_NLS_ASCII=m
1018CONFIG_NLS_ISO8859_1=y
1019# CONFIG_NLS_ISO8859_2 is not set
1020# CONFIG_NLS_ISO8859_3 is not set
1021# CONFIG_NLS_ISO8859_4 is not set
1022# CONFIG_NLS_ISO8859_5 is not set
1023# CONFIG_NLS_ISO8859_6 is not set
1024# CONFIG_NLS_ISO8859_7 is not set
1025# CONFIG_NLS_ISO8859_9 is not set
1026# CONFIG_NLS_ISO8859_13 is not set
1027# CONFIG_NLS_ISO8859_14 is not set
1028# CONFIG_NLS_ISO8859_15 is not set
1029# CONFIG_NLS_KOI8_R is not set
1030# CONFIG_NLS_KOI8_U is not set
1031CONFIG_NLS_UTF8=m
1032# CONFIG_DLM is not set
1033
1034#
1035# Kernel hacking
1036#
1037# CONFIG_PRINTK_TIME is not set
1038CONFIG_ENABLE_WARN_DEPRECATED=y
1039CONFIG_ENABLE_MUST_CHECK=y
1040CONFIG_FRAME_WARN=1024
1041# CONFIG_MAGIC_SYSRQ is not set
1042# CONFIG_UNUSED_SYMBOLS is not set
1043CONFIG_DEBUG_FS=y
1044# CONFIG_HEADERS_CHECK is not set
1045CONFIG_DEBUG_KERNEL=y
1046# CONFIG_DEBUG_SHIRQ is not set
1047CONFIG_DETECT_SOFTLOCKUP=y
1048# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
1049CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
1050CONFIG_DETECT_HUNG_TASK=y
1051# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
1052CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
1053CONFIG_SCHED_DEBUG=y
1054# CONFIG_SCHEDSTATS is not set
1055CONFIG_TIMER_STATS=y
1056# CONFIG_DEBUG_OBJECTS is not set
1057# CONFIG_SLUB_DEBUG_ON is not set
1058# CONFIG_SLUB_STATS is not set
1059CONFIG_DEBUG_PREEMPT=y
1060CONFIG_DEBUG_RT_MUTEXES=y
1061CONFIG_DEBUG_PI_LIST=y
1062# CONFIG_RT_MUTEX_TESTER is not set
1063# CONFIG_DEBUG_SPINLOCK is not set
1064CONFIG_DEBUG_MUTEXES=y
1065# CONFIG_DEBUG_LOCK_ALLOC is not set
1066# CONFIG_PROVE_LOCKING is not set
1067# CONFIG_LOCK_STAT is not set
1068# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1069# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1070# CONFIG_DEBUG_KOBJECT is not set
1071CONFIG_DEBUG_BUGVERBOSE=y
1072# CONFIG_DEBUG_INFO is not set
1073# CONFIG_DEBUG_VM is not set
1074# CONFIG_DEBUG_WRITECOUNT is not set
1075# CONFIG_DEBUG_MEMORY_INIT is not set
1076# CONFIG_DEBUG_LIST is not set
1077# CONFIG_DEBUG_SG is not set
1078# CONFIG_DEBUG_NOTIFIERS is not set
1079# CONFIG_BOOT_PRINTK_DELAY is not set
1080# CONFIG_RCU_TORTURE_TEST is not set
1081# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1082# CONFIG_BACKTRACE_SELF_TEST is not set
1083# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
1084# CONFIG_FAULT_INJECTION is not set
1085# CONFIG_LATENCYTOP is not set
1086# CONFIG_SYSCTL_SYSCALL_CHECK is not set
1087# CONFIG_PAGE_POISONING is not set
1088CONFIG_HAVE_FUNCTION_TRACER=y
1089CONFIG_TRACING_SUPPORT=y
1090
1091#
1092# Tracers
1093#
1094# CONFIG_FUNCTION_TRACER is not set
1095# CONFIG_IRQSOFF_TRACER is not set
1096# CONFIG_PREEMPT_TRACER is not set
1097# CONFIG_SCHED_TRACER is not set
1098# CONFIG_CONTEXT_SWITCH_TRACER is not set
1099# CONFIG_EVENT_TRACER is not set
1100# CONFIG_BOOT_TRACER is not set
1101# CONFIG_TRACE_BRANCH_PROFILING is not set
1102# CONFIG_STACK_TRACER is not set
1103# CONFIG_KMEMTRACE is not set
1104# CONFIG_WORKQUEUE_TRACER is not set
1105# CONFIG_BLK_DEV_IO_TRACE is not set
1106# CONFIG_DYNAMIC_DEBUG is not set
1107# CONFIG_SAMPLES is not set
1108CONFIG_HAVE_ARCH_KGDB=y
1109# CONFIG_KGDB is not set
1110CONFIG_ARM_UNWIND=y
1111CONFIG_DEBUG_USER=y
1112CONFIG_DEBUG_ERRORS=y
1113# CONFIG_DEBUG_STACK_USAGE is not set
1114# CONFIG_DEBUG_LL is not set
1115
1116#
1117# Security options
1118#
1119# CONFIG_KEYS is not set
1120# CONFIG_SECURITY is not set
1121# CONFIG_SECURITYFS is not set
1122# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1123CONFIG_CRYPTO=y
1124
1125#
1126# Crypto core or helper
1127#
1128# CONFIG_CRYPTO_FIPS is not set
1129# CONFIG_CRYPTO_MANAGER is not set
1130# CONFIG_CRYPTO_MANAGER2 is not set
1131# CONFIG_CRYPTO_GF128MUL is not set
1132# CONFIG_CRYPTO_NULL is not set
1133# CONFIG_CRYPTO_CRYPTD is not set
1134# CONFIG_CRYPTO_AUTHENC is not set
1135# CONFIG_CRYPTO_TEST is not set
1136
1137#
1138# Authenticated Encryption with Associated Data
1139#
1140# CONFIG_CRYPTO_CCM is not set
1141# CONFIG_CRYPTO_GCM is not set
1142# CONFIG_CRYPTO_SEQIV is not set
1143
1144#
1145# Block modes
1146#
1147# CONFIG_CRYPTO_CBC is not set
1148# CONFIG_CRYPTO_CTR is not set
1149# CONFIG_CRYPTO_CTS is not set
1150# CONFIG_CRYPTO_ECB is not set
1151# CONFIG_CRYPTO_LRW is not set
1152# CONFIG_CRYPTO_PCBC is not set
1153# CONFIG_CRYPTO_XTS is not set
1154
1155#
1156# Hash modes
1157#
1158# CONFIG_CRYPTO_HMAC is not set
1159# CONFIG_CRYPTO_XCBC is not set
1160
1161#
1162# Digest
1163#
1164# CONFIG_CRYPTO_CRC32C is not set
1165# CONFIG_CRYPTO_MD4 is not set
1166# CONFIG_CRYPTO_MD5 is not set
1167# CONFIG_CRYPTO_MICHAEL_MIC is not set
1168# CONFIG_CRYPTO_RMD128 is not set
1169# CONFIG_CRYPTO_RMD160 is not set
1170# CONFIG_CRYPTO_RMD256 is not set
1171# CONFIG_CRYPTO_RMD320 is not set
1172# CONFIG_CRYPTO_SHA1 is not set
1173# CONFIG_CRYPTO_SHA256 is not set
1174# CONFIG_CRYPTO_SHA512 is not set
1175# CONFIG_CRYPTO_TGR192 is not set
1176# CONFIG_CRYPTO_WP512 is not set
1177
1178#
1179# Ciphers
1180#
1181# CONFIG_CRYPTO_AES is not set
1182# CONFIG_CRYPTO_ANUBIS is not set
1183# CONFIG_CRYPTO_ARC4 is not set
1184# CONFIG_CRYPTO_BLOWFISH is not set
1185# CONFIG_CRYPTO_CAMELLIA is not set
1186# CONFIG_CRYPTO_CAST5 is not set
1187# CONFIG_CRYPTO_CAST6 is not set
1188# CONFIG_CRYPTO_DES is not set
1189# CONFIG_CRYPTO_FCRYPT is not set
1190# CONFIG_CRYPTO_KHAZAD is not set
1191# CONFIG_CRYPTO_SALSA20 is not set
1192# CONFIG_CRYPTO_SEED is not set
1193# CONFIG_CRYPTO_SERPENT is not set
1194# CONFIG_CRYPTO_TEA is not set
1195# CONFIG_CRYPTO_TWOFISH is not set
1196
1197#
1198# Compression
1199#
1200# CONFIG_CRYPTO_DEFLATE is not set
1201# CONFIG_CRYPTO_ZLIB is not set
1202# CONFIG_CRYPTO_LZO is not set
1203
1204#
1205# Random Number Generation
1206#
1207# CONFIG_CRYPTO_ANSI_CPRNG is not set
1208# CONFIG_CRYPTO_HW is not set
1209# CONFIG_BINARY_PRINTF is not set
1210
1211#
1212# Library routines
1213#
1214CONFIG_BITREVERSE=y
1215CONFIG_GENERIC_FIND_LAST_BIT=y
1216CONFIG_CRC_CCITT=m
1217# CONFIG_CRC16 is not set
1218CONFIG_CRC_T10DIF=m
1219# CONFIG_CRC_ITU_T is not set
1220CONFIG_CRC32=y
1221# CONFIG_CRC7 is not set
1222# CONFIG_LIBCRC32C is not set
1223CONFIG_ZLIB_INFLATE=y
1224CONFIG_DECOMPRESS_GZIP=y
1225CONFIG_GENERIC_ALLOCATOR=y
1226CONFIG_HAS_IOMEM=y
1227CONFIG_HAS_IOPORT=y
1228CONFIG_HAS_DMA=y
1229CONFIG_NLATTR=y
diff --git a/arch/arm/configs/davinci_all_defconfig b/arch/arm/configs/davinci_all_defconfig
index ac18662f38cc..ddffe39d9f87 100644
--- a/arch/arm/configs/davinci_all_defconfig
+++ b/arch/arm/configs/davinci_all_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.30-rc7 3# Linux kernel version: 2.6.31-rc3-davinci1
4# Tue May 26 07:24:28 2009 4# Fri Jul 17 08:26:52 2009
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_SYS_SUPPORTS_APM_EMULATION=y 7CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -9,7 +9,6 @@ CONFIG_GENERIC_GPIO=y
9CONFIG_GENERIC_TIME=y 9CONFIG_GENERIC_TIME=y
10CONFIG_GENERIC_CLOCKEVENTS=y 10CONFIG_GENERIC_CLOCKEVENTS=y
11CONFIG_MMU=y 11CONFIG_MMU=y
12# CONFIG_NO_IOPORT is not set
13CONFIG_GENERIC_HARDIRQS=y 12CONFIG_GENERIC_HARDIRQS=y
14CONFIG_STACKTRACE_SUPPORT=y 13CONFIG_STACKTRACE_SUPPORT=y
15CONFIG_HAVE_LATENCYTOP_SUPPORT=y 14CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -18,14 +17,13 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y
18CONFIG_HARDIRQS_SW_RESEND=y 17CONFIG_HARDIRQS_SW_RESEND=y
19CONFIG_GENERIC_IRQ_PROBE=y 18CONFIG_GENERIC_IRQ_PROBE=y
20CONFIG_RWSEM_GENERIC_SPINLOCK=y 19CONFIG_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 20CONFIG_GENERIC_HWEIGHT=y
24CONFIG_GENERIC_CALIBRATE_DELAY=y 21CONFIG_GENERIC_CALIBRATE_DELAY=y
25CONFIG_ZONE_DMA=y 22CONFIG_ZONE_DMA=y
26CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 23CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
27CONFIG_VECTORS_BASE=0xffff0000 24CONFIG_VECTORS_BASE=0xffff0000
28CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 25CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
26CONFIG_CONSTRUCTORS=y
29 27
30# 28#
31# General setup 29# General setup
@@ -62,8 +60,7 @@ CONFIG_FAIR_GROUP_SCHED=y
62CONFIG_USER_SCHED=y 60CONFIG_USER_SCHED=y
63# CONFIG_CGROUP_SCHED is not set 61# CONFIG_CGROUP_SCHED is not set
64# CONFIG_CGROUPS is not set 62# CONFIG_CGROUPS is not set
65CONFIG_SYSFS_DEPRECATED=y 63# CONFIG_SYSFS_DEPRECATED_V2 is not set
66CONFIG_SYSFS_DEPRECATED_V2=y
67# CONFIG_RELAY is not set 64# CONFIG_RELAY is not set
68# CONFIG_NAMESPACES is not set 65# CONFIG_NAMESPACES is not set
69CONFIG_BLK_DEV_INITRD=y 66CONFIG_BLK_DEV_INITRD=y
@@ -80,7 +77,6 @@ CONFIG_SYSCTL_SYSCALL=y
80CONFIG_KALLSYMS=y 77CONFIG_KALLSYMS=y
81# CONFIG_KALLSYMS_ALL is not set 78# CONFIG_KALLSYMS_ALL is not set
82# CONFIG_KALLSYMS_EXTRA_PASS is not set 79# CONFIG_KALLSYMS_EXTRA_PASS is not set
83# CONFIG_STRIP_ASM_SYMS is not set
84CONFIG_HOTPLUG=y 80CONFIG_HOTPLUG=y
85CONFIG_PRINTK=y 81CONFIG_PRINTK=y
86CONFIG_BUG=y 82CONFIG_BUG=y
@@ -93,8 +89,13 @@ CONFIG_TIMERFD=y
93CONFIG_EVENTFD=y 89CONFIG_EVENTFD=y
94CONFIG_SHMEM=y 90CONFIG_SHMEM=y
95CONFIG_AIO=y 91CONFIG_AIO=y
92
93#
94# Performance Counters
95#
96CONFIG_VM_EVENT_COUNTERS=y 96CONFIG_VM_EVENT_COUNTERS=y
97CONFIG_SLUB_DEBUG=y 97CONFIG_SLUB_DEBUG=y
98# CONFIG_STRIP_ASM_SYMS is not set
98CONFIG_COMPAT_BRK=y 99CONFIG_COMPAT_BRK=y
99# CONFIG_SLAB is not set 100# CONFIG_SLAB is not set
100CONFIG_SLUB=y 101CONFIG_SLUB=y
@@ -106,6 +107,11 @@ CONFIG_HAVE_OPROFILE=y
106CONFIG_HAVE_KPROBES=y 107CONFIG_HAVE_KPROBES=y
107CONFIG_HAVE_KRETPROBES=y 108CONFIG_HAVE_KRETPROBES=y
108CONFIG_HAVE_CLK=y 109CONFIG_HAVE_CLK=y
110
111#
112# GCOV-based kernel profiling
113#
114# CONFIG_GCOV_KERNEL is not set
109# CONFIG_SLOW_WORK is not set 115# CONFIG_SLOW_WORK is not set
110CONFIG_HAVE_GENERIC_DMA_COHERENT=y 116CONFIG_HAVE_GENERIC_DMA_COHERENT=y
111CONFIG_SLABINFO=y 117CONFIG_SLABINFO=y
@@ -118,7 +124,7 @@ CONFIG_MODULE_FORCE_UNLOAD=y
118CONFIG_MODVERSIONS=y 124CONFIG_MODVERSIONS=y
119# CONFIG_MODULE_SRCVERSION_ALL is not set 125# CONFIG_MODULE_SRCVERSION_ALL is not set
120CONFIG_BLOCK=y 126CONFIG_BLOCK=y
121# CONFIG_LBD is not set 127CONFIG_LBDAF=y
122# CONFIG_BLK_DEV_BSG is not set 128# CONFIG_BLK_DEV_BSG is not set
123# CONFIG_BLK_DEV_INTEGRITY is not set 129# CONFIG_BLK_DEV_INTEGRITY is not set
124 130
@@ -145,13 +151,14 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
145# CONFIG_ARCH_VERSATILE is not set 151# CONFIG_ARCH_VERSATILE is not set
146# CONFIG_ARCH_AT91 is not set 152# CONFIG_ARCH_AT91 is not set
147# CONFIG_ARCH_CLPS711X is not set 153# CONFIG_ARCH_CLPS711X is not set
154# CONFIG_ARCH_GEMINI is not set
148# CONFIG_ARCH_EBSA110 is not set 155# CONFIG_ARCH_EBSA110 is not set
149# CONFIG_ARCH_EP93XX is not set 156# CONFIG_ARCH_EP93XX is not set
150# CONFIG_ARCH_GEMINI is not set
151# CONFIG_ARCH_FOOTBRIDGE is not set 157# CONFIG_ARCH_FOOTBRIDGE is not set
158# CONFIG_ARCH_MXC is not set
159# CONFIG_ARCH_STMP3XXX is not set
152# CONFIG_ARCH_NETX is not set 160# CONFIG_ARCH_NETX is not set
153# CONFIG_ARCH_H720X is not set 161# CONFIG_ARCH_H720X is not set
154# CONFIG_ARCH_IMX is not set
155# CONFIG_ARCH_IOP13XX is not set 162# CONFIG_ARCH_IOP13XX is not set
156# CONFIG_ARCH_IOP32X is not set 163# CONFIG_ARCH_IOP32X is not set
157# CONFIG_ARCH_IOP33X is not set 164# CONFIG_ARCH_IOP33X is not set
@@ -160,26 +167,27 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
160# CONFIG_ARCH_IXP4XX is not set 167# CONFIG_ARCH_IXP4XX is not set
161# CONFIG_ARCH_L7200 is not set 168# CONFIG_ARCH_L7200 is not set
162# CONFIG_ARCH_KIRKWOOD is not set 169# CONFIG_ARCH_KIRKWOOD is not set
163# CONFIG_ARCH_KS8695 is not set
164# CONFIG_ARCH_NS9XXX is not set
165# CONFIG_ARCH_LOKI is not set 170# CONFIG_ARCH_LOKI is not set
166# CONFIG_ARCH_MV78XX0 is not set 171# CONFIG_ARCH_MV78XX0 is not set
167# CONFIG_ARCH_MXC is not set
168# CONFIG_ARCH_ORION5X is not set 172# CONFIG_ARCH_ORION5X is not set
173# CONFIG_ARCH_MMP is not set
174# CONFIG_ARCH_KS8695 is not set
175# CONFIG_ARCH_NS9XXX is not set
176# CONFIG_ARCH_W90X900 is not set
169# CONFIG_ARCH_PNX4008 is not set 177# CONFIG_ARCH_PNX4008 is not set
170# CONFIG_ARCH_PXA is not set 178# CONFIG_ARCH_PXA is not set
171# CONFIG_ARCH_MMP is not set 179# CONFIG_ARCH_MSM is not set
172# CONFIG_ARCH_RPC is not set 180# CONFIG_ARCH_RPC is not set
173# CONFIG_ARCH_SA1100 is not set 181# CONFIG_ARCH_SA1100 is not set
174# CONFIG_ARCH_S3C2410 is not set 182# CONFIG_ARCH_S3C2410 is not set
175# CONFIG_ARCH_S3C64XX is not set 183# CONFIG_ARCH_S3C64XX is not set
176# CONFIG_ARCH_SHARK is not set 184# CONFIG_ARCH_SHARK is not set
177# CONFIG_ARCH_LH7A40X is not set 185# CONFIG_ARCH_LH7A40X is not set
186# CONFIG_ARCH_U300 is not set
178CONFIG_ARCH_DAVINCI=y 187CONFIG_ARCH_DAVINCI=y
179# CONFIG_ARCH_OMAP is not set 188# CONFIG_ARCH_OMAP is not set
180# CONFIG_ARCH_MSM is not set
181# CONFIG_ARCH_W90X900 is not set
182CONFIG_AINTC=y 189CONFIG_AINTC=y
190CONFIG_ARCH_DAVINCI_DMx=y
183 191
184# 192#
185# TI DaVinci Implementations 193# TI DaVinci Implementations
@@ -191,6 +199,9 @@ CONFIG_AINTC=y
191CONFIG_ARCH_DAVINCI_DM644x=y 199CONFIG_ARCH_DAVINCI_DM644x=y
192CONFIG_ARCH_DAVINCI_DM355=y 200CONFIG_ARCH_DAVINCI_DM355=y
193CONFIG_ARCH_DAVINCI_DM646x=y 201CONFIG_ARCH_DAVINCI_DM646x=y
202# CONFIG_ARCH_DAVINCI_DA830 is not set
203# CONFIG_ARCH_DAVINCI_DA850 is not set
204CONFIG_ARCH_DAVINCI_DM365=y
194 205
195# 206#
196# DaVinci Board Type 207# DaVinci Board Type
@@ -200,6 +211,7 @@ CONFIG_MACH_SFFSDR=y
200CONFIG_MACH_DAVINCI_DM355_EVM=y 211CONFIG_MACH_DAVINCI_DM355_EVM=y
201CONFIG_MACH_DM355_LEOPARD=y 212CONFIG_MACH_DM355_LEOPARD=y
202CONFIG_MACH_DAVINCI_DM6467_EVM=y 213CONFIG_MACH_DAVINCI_DM6467_EVM=y
214CONFIG_MACH_DAVINCI_DM365_EVM=y
203CONFIG_DAVINCI_MUX=y 215CONFIG_DAVINCI_MUX=y
204CONFIG_DAVINCI_MUX_DEBUG=y 216CONFIG_DAVINCI_MUX_DEBUG=y
205CONFIG_DAVINCI_MUX_WARNINGS=y 217CONFIG_DAVINCI_MUX_WARNINGS=y
@@ -227,7 +239,6 @@ CONFIG_ARM_THUMB=y
227# CONFIG_CPU_DCACHE_DISABLE is not set 239# CONFIG_CPU_DCACHE_DISABLE is not set
228# CONFIG_CPU_DCACHE_WRITETHROUGH is not set 240# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
229# CONFIG_CPU_CACHE_ROUND_ROBIN is not set 241# CONFIG_CPU_CACHE_ROUND_ROBIN is not set
230# CONFIG_OUTER_CACHE is not set
231CONFIG_COMMON_CLKDEV=y 242CONFIG_COMMON_CLKDEV=y
232 243
233# 244#
@@ -252,7 +263,6 @@ CONFIG_PREEMPT=y
252CONFIG_HZ=100 263CONFIG_HZ=100
253CONFIG_AEABI=y 264CONFIG_AEABI=y
254# CONFIG_OABI_COMPAT is not set 265# CONFIG_OABI_COMPAT is not set
255# CONFIG_ARCH_HAS_HOLES_MEMORYMODEL is not set
256# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set 266# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
257# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set 267# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
258# CONFIG_HIGHMEM is not set 268# CONFIG_HIGHMEM is not set
@@ -268,12 +278,13 @@ CONFIG_SPLIT_PTLOCK_CPUS=4096
268CONFIG_ZONE_DMA_FLAG=1 278CONFIG_ZONE_DMA_FLAG=1
269CONFIG_BOUNCE=y 279CONFIG_BOUNCE=y
270CONFIG_VIRT_TO_BUS=y 280CONFIG_VIRT_TO_BUS=y
271CONFIG_UNEVICTABLE_LRU=y
272CONFIG_HAVE_MLOCK=y 281CONFIG_HAVE_MLOCK=y
273CONFIG_HAVE_MLOCKED_PAGE_BIT=y 282CONFIG_HAVE_MLOCKED_PAGE_BIT=y
283CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
274CONFIG_LEDS=y 284CONFIG_LEDS=y
275# CONFIG_LEDS_CPU is not set 285# CONFIG_LEDS_CPU is not set
276CONFIG_ALIGNMENT_TRAP=y 286CONFIG_ALIGNMENT_TRAP=y
287# CONFIG_UACCESS_WITH_MEMCPY is not set
277 288
278# 289#
279# Boot options 290# Boot options
@@ -415,6 +426,7 @@ CONFIG_NETFILTER_ADVANCED=y
415# CONFIG_ECONET is not set 426# CONFIG_ECONET is not set
416# CONFIG_WAN_ROUTER is not set 427# CONFIG_WAN_ROUTER is not set
417# CONFIG_PHONET is not set 428# CONFIG_PHONET is not set
429# CONFIG_IEEE802154 is not set
418# CONFIG_NET_SCHED is not set 430# CONFIG_NET_SCHED is not set
419# CONFIG_DCB is not set 431# CONFIG_DCB is not set
420 432
@@ -553,6 +565,7 @@ CONFIG_BLK_DEV_RAM_SIZE=32768
553# CONFIG_BLK_DEV_XIP is not set 565# CONFIG_BLK_DEV_XIP is not set
554# CONFIG_CDROM_PKTCDVD is not set 566# CONFIG_CDROM_PKTCDVD is not set
555# CONFIG_ATA_OVER_ETH is not set 567# CONFIG_ATA_OVER_ETH is not set
568# CONFIG_MG_DISK is not set
556CONFIG_MISC_DEVICES=y 569CONFIG_MISC_DEVICES=y
557# CONFIG_ICS932S401 is not set 570# CONFIG_ICS932S401 is not set
558# CONFIG_ENCLOSURE_SERVICES is not set 571# CONFIG_ENCLOSURE_SERVICES is not set
@@ -564,6 +577,7 @@ CONFIG_MISC_DEVICES=y
564# 577#
565CONFIG_EEPROM_AT24=y 578CONFIG_EEPROM_AT24=y
566# CONFIG_EEPROM_LEGACY is not set 579# CONFIG_EEPROM_LEGACY is not set
580# CONFIG_EEPROM_MAX6875 is not set
567# CONFIG_EEPROM_93CX6 is not set 581# CONFIG_EEPROM_93CX6 is not set
568CONFIG_HAVE_IDE=y 582CONFIG_HAVE_IDE=y
569CONFIG_IDE=m 583CONFIG_IDE=m
@@ -609,10 +623,6 @@ CONFIG_BLK_DEV_SD=m
609# CONFIG_BLK_DEV_SR is not set 623# CONFIG_BLK_DEV_SR is not set
610# CONFIG_CHR_DEV_SG is not set 624# CONFIG_CHR_DEV_SG is not set
611# CONFIG_CHR_DEV_SCH is not set 625# CONFIG_CHR_DEV_SCH is not set
612
613#
614# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
615#
616# CONFIG_SCSI_MULTI_LUN is not set 626# CONFIG_SCSI_MULTI_LUN is not set
617# CONFIG_SCSI_CONSTANTS is not set 627# CONFIG_SCSI_CONSTANTS is not set
618# CONFIG_SCSI_LOGGING is not set 628# CONFIG_SCSI_LOGGING is not set
@@ -637,7 +647,6 @@ CONFIG_SCSI_LOWLEVEL=y
637# CONFIG_ATA is not set 647# CONFIG_ATA is not set
638# CONFIG_MD is not set 648# CONFIG_MD is not set
639CONFIG_NETDEVICES=y 649CONFIG_NETDEVICES=y
640CONFIG_COMPAT_NET_DEV_OPS=y
641# CONFIG_DUMMY is not set 650# CONFIG_DUMMY is not set
642# CONFIG_BONDING is not set 651# CONFIG_BONDING is not set
643# CONFIG_MACVLAN is not set 652# CONFIG_MACVLAN is not set
@@ -684,6 +693,7 @@ CONFIG_DM9000_DEBUGLEVEL=4
684# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set 693# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
685# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 694# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
686# CONFIG_B44 is not set 695# CONFIG_B44 is not set
696# CONFIG_KS8842 is not set
687# CONFIG_NETDEV_1000 is not set 697# CONFIG_NETDEV_1000 is not set
688# CONFIG_NETDEV_10000 is not set 698# CONFIG_NETDEV_10000 is not set
689 699
@@ -748,18 +758,21 @@ CONFIG_INPUT_EVBUG=m
748# 758#
749CONFIG_INPUT_KEYBOARD=y 759CONFIG_INPUT_KEYBOARD=y
750CONFIG_KEYBOARD_ATKBD=m 760CONFIG_KEYBOARD_ATKBD=m
751# CONFIG_KEYBOARD_SUNKBD is not set
752# CONFIG_KEYBOARD_LKKBD is not set 761# CONFIG_KEYBOARD_LKKBD is not set
753CONFIG_KEYBOARD_XTKBD=m 762CONFIG_KEYBOARD_GPIO=y
763# CONFIG_KEYBOARD_MATRIX is not set
764# CONFIG_KEYBOARD_LM8323 is not set
754# CONFIG_KEYBOARD_NEWTON is not set 765# CONFIG_KEYBOARD_NEWTON is not set
755# CONFIG_KEYBOARD_STOWAWAY is not set 766# CONFIG_KEYBOARD_STOWAWAY is not set
756CONFIG_KEYBOARD_GPIO=y 767# CONFIG_KEYBOARD_SUNKBD is not set
768CONFIG_KEYBOARD_XTKBD=m
757# CONFIG_INPUT_MOUSE is not set 769# CONFIG_INPUT_MOUSE is not set
758# CONFIG_INPUT_JOYSTICK is not set 770# CONFIG_INPUT_JOYSTICK is not set
759# CONFIG_INPUT_TABLET is not set 771# CONFIG_INPUT_TABLET is not set
760CONFIG_INPUT_TOUCHSCREEN=y 772CONFIG_INPUT_TOUCHSCREEN=y
761# CONFIG_TOUCHSCREEN_AD7879_I2C is not set 773# CONFIG_TOUCHSCREEN_AD7879_I2C is not set
762# CONFIG_TOUCHSCREEN_AD7879 is not set 774# CONFIG_TOUCHSCREEN_AD7879 is not set
775# CONFIG_TOUCHSCREEN_EETI is not set
763# CONFIG_TOUCHSCREEN_FUJITSU is not set 776# CONFIG_TOUCHSCREEN_FUJITSU is not set
764# CONFIG_TOUCHSCREEN_GUNZE is not set 777# CONFIG_TOUCHSCREEN_GUNZE is not set
765# CONFIG_TOUCHSCREEN_ELO is not set 778# CONFIG_TOUCHSCREEN_ELO is not set
@@ -773,6 +786,7 @@ CONFIG_INPUT_TOUCHSCREEN=y
773# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set 786# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
774# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set 787# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
775# CONFIG_TOUCHSCREEN_TSC2007 is not set 788# CONFIG_TOUCHSCREEN_TSC2007 is not set
789# CONFIG_TOUCHSCREEN_W90X900 is not set
776# CONFIG_INPUT_MISC is not set 790# CONFIG_INPUT_MISC is not set
777 791
778# 792#
@@ -832,6 +846,7 @@ CONFIG_I2C_HELPER_AUTO=y
832# I2C system bus drivers (mostly embedded / system-on-chip) 846# I2C system bus drivers (mostly embedded / system-on-chip)
833# 847#
834CONFIG_I2C_DAVINCI=y 848CONFIG_I2C_DAVINCI=y
849# CONFIG_I2C_DESIGNWARE is not set
835# CONFIG_I2C_GPIO is not set 850# CONFIG_I2C_GPIO is not set
836# CONFIG_I2C_OCORES is not set 851# CONFIG_I2C_OCORES is not set
837# CONFIG_I2C_SIMTEC is not set 852# CONFIG_I2C_SIMTEC is not set
@@ -854,7 +869,6 @@ CONFIG_I2C_DAVINCI=y
854# 869#
855# CONFIG_DS1682 is not set 870# CONFIG_DS1682 is not set
856# CONFIG_SENSORS_PCA9539 is not set 871# CONFIG_SENSORS_PCA9539 is not set
857# CONFIG_SENSORS_MAX6875 is not set
858# CONFIG_SENSORS_TSL2550 is not set 872# CONFIG_SENSORS_TSL2550 is not set
859# CONFIG_I2C_DEBUG_CORE is not set 873# CONFIG_I2C_DEBUG_CORE is not set
860# CONFIG_I2C_DEBUG_ALGO is not set 874# CONFIG_I2C_DEBUG_ALGO is not set
@@ -935,6 +949,7 @@ CONFIG_HWMON=y
935# CONFIG_SENSORS_SMSC47B397 is not set 949# CONFIG_SENSORS_SMSC47B397 is not set
936# CONFIG_SENSORS_ADS7828 is not set 950# CONFIG_SENSORS_ADS7828 is not set
937# CONFIG_SENSORS_THMC50 is not set 951# CONFIG_SENSORS_THMC50 is not set
952# CONFIG_SENSORS_TMP401 is not set
938# CONFIG_SENSORS_VT1211 is not set 953# CONFIG_SENSORS_VT1211 is not set
939# CONFIG_SENSORS_W83781D is not set 954# CONFIG_SENSORS_W83781D is not set
940# CONFIG_SENSORS_W83791D is not set 955# CONFIG_SENSORS_W83791D is not set
@@ -986,52 +1001,8 @@ CONFIG_SSB_POSSIBLE=y
986# CONFIG_MFD_WM8400 is not set 1001# CONFIG_MFD_WM8400 is not set
987# CONFIG_MFD_WM8350_I2C is not set 1002# CONFIG_MFD_WM8350_I2C is not set
988# CONFIG_MFD_PCF50633 is not set 1003# CONFIG_MFD_PCF50633 is not set
989 1004# CONFIG_AB3100_CORE is not set
990# 1005# CONFIG_MEDIA_SUPPORT is not set
991# Multimedia devices
992#
993
994#
995# Multimedia core support
996#
997CONFIG_VIDEO_DEV=y
998CONFIG_VIDEO_V4L2_COMMON=y
999CONFIG_VIDEO_ALLOW_V4L1=y
1000CONFIG_VIDEO_V4L1_COMPAT=y
1001# CONFIG_DVB_CORE is not set
1002CONFIG_VIDEO_MEDIA=y
1003
1004#
1005# Multimedia drivers
1006#
1007# CONFIG_MEDIA_ATTACH is not set
1008CONFIG_MEDIA_TUNER=y
1009# CONFIG_MEDIA_TUNER_CUSTOMISE is not set
1010CONFIG_MEDIA_TUNER_SIMPLE=y
1011CONFIG_MEDIA_TUNER_TDA8290=y
1012CONFIG_MEDIA_TUNER_TDA9887=y
1013CONFIG_MEDIA_TUNER_TEA5761=y
1014CONFIG_MEDIA_TUNER_TEA5767=y
1015CONFIG_MEDIA_TUNER_MT20XX=y
1016CONFIG_MEDIA_TUNER_XC2028=y
1017CONFIG_MEDIA_TUNER_XC5000=y
1018CONFIG_MEDIA_TUNER_MC44S803=y
1019CONFIG_VIDEO_V4L2=y
1020CONFIG_VIDEO_V4L1=y
1021CONFIG_VIDEO_CAPTURE_DRIVERS=y
1022# CONFIG_VIDEO_ADV_DEBUG is not set
1023# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
1024CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
1025# CONFIG_VIDEO_VIVI is not set
1026# CONFIG_VIDEO_CPIA is not set
1027# CONFIG_VIDEO_CPIA2 is not set
1028# CONFIG_VIDEO_SAA5246A is not set
1029# CONFIG_VIDEO_SAA5249 is not set
1030# CONFIG_SOC_CAMERA is not set
1031# CONFIG_V4L_USB_DRIVERS is not set
1032# CONFIG_RADIO_ADAPTERS is not set
1033CONFIG_DAB=y
1034# CONFIG_USB_DABUSB is not set
1035 1006
1036# 1007#
1037# Graphics support 1008# Graphics support
@@ -1102,6 +1073,11 @@ CONFIG_SND_SUPPORT_OLD_API=y
1102CONFIG_SND_VERBOSE_PROCFS=y 1073CONFIG_SND_VERBOSE_PROCFS=y
1103# CONFIG_SND_VERBOSE_PRINTK is not set 1074# CONFIG_SND_VERBOSE_PRINTK is not set
1104# CONFIG_SND_DEBUG is not set 1075# CONFIG_SND_DEBUG is not set
1076# CONFIG_SND_RAWMIDI_SEQ is not set
1077# CONFIG_SND_OPL3_LIB_SEQ is not set
1078# CONFIG_SND_OPL4_LIB_SEQ is not set
1079# CONFIG_SND_SBAWE_SEQ is not set
1080# CONFIG_SND_EMU10K1_SEQ is not set
1105CONFIG_SND_DRIVERS=y 1081CONFIG_SND_DRIVERS=y
1106# CONFIG_SND_DUMMY is not set 1082# CONFIG_SND_DUMMY is not set
1107# CONFIG_SND_MTPAV is not set 1083# CONFIG_SND_MTPAV is not set
@@ -1112,9 +1088,16 @@ CONFIG_SND_USB=y
1112# CONFIG_SND_USB_AUDIO is not set 1088# CONFIG_SND_USB_AUDIO is not set
1113# CONFIG_SND_USB_CAIAQ is not set 1089# CONFIG_SND_USB_CAIAQ is not set
1114CONFIG_SND_SOC=m 1090CONFIG_SND_SOC=m
1115# CONFIG_SND_DAVINCI_SOC is not set 1091CONFIG_SND_DAVINCI_SOC=m
1092CONFIG_SND_DAVINCI_SOC_I2S=m
1093CONFIG_SND_DAVINCI_SOC_MCASP=m
1094CONFIG_SND_DAVINCI_SOC_EVM=m
1095CONFIG_SND_DM6467_SOC_EVM=m
1096# CONFIG_SND_DAVINCI_SOC_SFFSDR is not set
1116CONFIG_SND_SOC_I2C_AND_SPI=m 1097CONFIG_SND_SOC_I2C_AND_SPI=m
1117# CONFIG_SND_SOC_ALL_CODECS is not set 1098# CONFIG_SND_SOC_ALL_CODECS is not set
1099CONFIG_SND_SOC_SPDIF=m
1100CONFIG_SND_SOC_TLV320AIC3X=m
1118# CONFIG_SOUND_PRIME is not set 1101# CONFIG_SOUND_PRIME is not set
1119CONFIG_HID_SUPPORT=y 1102CONFIG_HID_SUPPORT=y
1120CONFIG_HID=m 1103CONFIG_HID=m
@@ -1143,7 +1126,7 @@ CONFIG_HID_BELKIN=m
1143CONFIG_HID_CHERRY=m 1126CONFIG_HID_CHERRY=m
1144CONFIG_HID_CHICONY=m 1127CONFIG_HID_CHICONY=m
1145CONFIG_HID_CYPRESS=m 1128CONFIG_HID_CYPRESS=m
1146# CONFIG_DRAGONRISE_FF is not set 1129# CONFIG_HID_DRAGONRISE is not set
1147CONFIG_HID_EZKEY=m 1130CONFIG_HID_EZKEY=m
1148# CONFIG_HID_KYE is not set 1131# CONFIG_HID_KYE is not set
1149CONFIG_HID_GYRATION=m 1132CONFIG_HID_GYRATION=m
@@ -1160,10 +1143,11 @@ CONFIG_HID_PETALYNX=m
1160CONFIG_HID_SAMSUNG=m 1143CONFIG_HID_SAMSUNG=m
1161CONFIG_HID_SONY=m 1144CONFIG_HID_SONY=m
1162CONFIG_HID_SUNPLUS=m 1145CONFIG_HID_SUNPLUS=m
1163# CONFIG_GREENASIA_FF is not set 1146# CONFIG_HID_GREENASIA is not set
1147# CONFIG_HID_SMARTJOYPLUS is not set
1164# CONFIG_HID_TOPSEED is not set 1148# CONFIG_HID_TOPSEED is not set
1165# CONFIG_THRUSTMASTER_FF is not set 1149# CONFIG_HID_THRUSTMASTER is not set
1166# CONFIG_ZEROPLUS_FF is not set 1150# CONFIG_HID_ZEROPLUS is not set
1167CONFIG_USB_SUPPORT=y 1151CONFIG_USB_SUPPORT=y
1168CONFIG_USB_ARCH_HAS_HCD=y 1152CONFIG_USB_ARCH_HAS_HCD=y
1169# CONFIG_USB_ARCH_HAS_OHCI is not set 1153# CONFIG_USB_ARCH_HAS_OHCI is not set
@@ -1266,6 +1250,7 @@ CONFIG_USB_STORAGE=m
1266# CONFIG_USB_IDMOUSE is not set 1250# CONFIG_USB_IDMOUSE is not set
1267# CONFIG_USB_FTDI_ELAN is not set 1251# CONFIG_USB_FTDI_ELAN is not set
1268# CONFIG_USB_APPLEDISPLAY is not set 1252# CONFIG_USB_APPLEDISPLAY is not set
1253# CONFIG_USB_SISUSBVGA is not set
1269# CONFIG_USB_LD is not set 1254# CONFIG_USB_LD is not set
1270# CONFIG_USB_TRANCEVIBRATOR is not set 1255# CONFIG_USB_TRANCEVIBRATOR is not set
1271# CONFIG_USB_IOWARRIOR is not set 1256# CONFIG_USB_IOWARRIOR is not set
@@ -1285,17 +1270,20 @@ CONFIG_USB_GADGET_SELECTED=y
1285# CONFIG_USB_GADGET_OMAP is not set 1270# CONFIG_USB_GADGET_OMAP is not set
1286# CONFIG_USB_GADGET_PXA25X is not set 1271# CONFIG_USB_GADGET_PXA25X is not set
1287# CONFIG_USB_GADGET_PXA27X is not set 1272# CONFIG_USB_GADGET_PXA27X is not set
1288# CONFIG_USB_GADGET_S3C2410 is not set 1273# CONFIG_USB_GADGET_S3C_HSOTG is not set
1289# CONFIG_USB_GADGET_IMX is not set 1274# CONFIG_USB_GADGET_IMX is not set
1275# CONFIG_USB_GADGET_S3C2410 is not set
1290# CONFIG_USB_GADGET_M66592 is not set 1276# CONFIG_USB_GADGET_M66592 is not set
1291# CONFIG_USB_GADGET_AMD5536UDC is not set 1277# CONFIG_USB_GADGET_AMD5536UDC is not set
1292# CONFIG_USB_GADGET_FSL_QE is not set 1278# CONFIG_USB_GADGET_FSL_QE is not set
1293# CONFIG_USB_GADGET_CI13XXX is not set 1279# CONFIG_USB_GADGET_CI13XXX is not set
1294# CONFIG_USB_GADGET_NET2280 is not set 1280# CONFIG_USB_GADGET_NET2280 is not set
1295# CONFIG_USB_GADGET_GOKU is not set 1281# CONFIG_USB_GADGET_GOKU is not set
1282# CONFIG_USB_GADGET_LANGWELL is not set
1296# CONFIG_USB_GADGET_DUMMY_HCD is not set 1283# CONFIG_USB_GADGET_DUMMY_HCD is not set
1297CONFIG_USB_GADGET_DUALSPEED=y 1284CONFIG_USB_GADGET_DUALSPEED=y
1298CONFIG_USB_ZERO=m 1285CONFIG_USB_ZERO=m
1286# CONFIG_USB_AUDIO is not set
1299CONFIG_USB_ETH=m 1287CONFIG_USB_ETH=m
1300CONFIG_USB_ETH_RNDIS=y 1288CONFIG_USB_ETH_RNDIS=y
1301CONFIG_USB_GADGETFS=m 1289CONFIG_USB_GADGETFS=m
@@ -1311,7 +1299,7 @@ CONFIG_USB_CDC_COMPOSITE=m
1311# 1299#
1312CONFIG_USB_OTG_UTILS=y 1300CONFIG_USB_OTG_UTILS=y
1313# CONFIG_USB_GPIO_VBUS is not set 1301# CONFIG_USB_GPIO_VBUS is not set
1314# CONFIG_NOP_USB_XCEIV is not set 1302CONFIG_NOP_USB_XCEIV=m
1315CONFIG_MMC=m 1303CONFIG_MMC=m
1316# CONFIG_MMC_DEBUG is not set 1304# CONFIG_MMC_DEBUG is not set
1317# CONFIG_MMC_UNSAFE_RESUME is not set 1305# CONFIG_MMC_UNSAFE_RESUME is not set
@@ -1328,7 +1316,6 @@ CONFIG_MMC_BLOCK=m
1328# MMC/SD/SDIO Host Controller Drivers 1316# MMC/SD/SDIO Host Controller Drivers
1329# 1317#
1330# CONFIG_MMC_SDHCI is not set 1318# CONFIG_MMC_SDHCI is not set
1331# CONFIG_MMC_DAVINCI is not set
1332# CONFIG_MEMSTICK is not set 1319# CONFIG_MEMSTICK is not set
1333# CONFIG_ACCESSIBILITY is not set 1320# CONFIG_ACCESSIBILITY is not set
1334CONFIG_NEW_LEDS=y 1321CONFIG_NEW_LEDS=y
@@ -1340,7 +1327,7 @@ CONFIG_LEDS_CLASS=m
1340# CONFIG_LEDS_PCA9532 is not set 1327# CONFIG_LEDS_PCA9532 is not set
1341CONFIG_LEDS_GPIO=m 1328CONFIG_LEDS_GPIO=m
1342CONFIG_LEDS_GPIO_PLATFORM=y 1329CONFIG_LEDS_GPIO_PLATFORM=y
1343# CONFIG_LEDS_LP5521 is not set 1330# CONFIG_LEDS_LP3944 is not set
1344# CONFIG_LEDS_PCA955X is not set 1331# CONFIG_LEDS_PCA955X is not set
1345# CONFIG_LEDS_BD2802 is not set 1332# CONFIG_LEDS_BD2802 is not set
1346 1333
@@ -1386,6 +1373,7 @@ CONFIG_RTC_INTF_DEV=y
1386# CONFIG_RTC_DRV_S35390A is not set 1373# CONFIG_RTC_DRV_S35390A is not set
1387# CONFIG_RTC_DRV_FM3130 is not set 1374# CONFIG_RTC_DRV_FM3130 is not set
1388# CONFIG_RTC_DRV_RX8581 is not set 1375# CONFIG_RTC_DRV_RX8581 is not set
1376# CONFIG_RTC_DRV_RX8025 is not set
1389 1377
1390# 1378#
1391# SPI RTC drivers 1379# SPI RTC drivers
@@ -1433,14 +1421,16 @@ CONFIG_FS_MBCACHE=y
1433# CONFIG_REISERFS_FS is not set 1421# CONFIG_REISERFS_FS is not set
1434# CONFIG_JFS_FS is not set 1422# CONFIG_JFS_FS is not set
1435# CONFIG_FS_POSIX_ACL is not set 1423# CONFIG_FS_POSIX_ACL is not set
1436CONFIG_FILE_LOCKING=y
1437CONFIG_XFS_FS=m 1424CONFIG_XFS_FS=m
1438# CONFIG_XFS_QUOTA is not set 1425# CONFIG_XFS_QUOTA is not set
1439# CONFIG_XFS_POSIX_ACL is not set 1426# CONFIG_XFS_POSIX_ACL is not set
1440# CONFIG_XFS_RT is not set 1427# CONFIG_XFS_RT is not set
1441# CONFIG_XFS_DEBUG is not set 1428# CONFIG_XFS_DEBUG is not set
1429# CONFIG_GFS2_FS is not set
1442# CONFIG_OCFS2_FS is not set 1430# CONFIG_OCFS2_FS is not set
1443# CONFIG_BTRFS_FS is not set 1431# CONFIG_BTRFS_FS is not set
1432CONFIG_FILE_LOCKING=y
1433CONFIG_FSNOTIFY=y
1444CONFIG_DNOTIFY=y 1434CONFIG_DNOTIFY=y
1445CONFIG_INOTIFY=y 1435CONFIG_INOTIFY=y
1446CONFIG_INOTIFY_USER=y 1436CONFIG_INOTIFY_USER=y
@@ -1623,6 +1613,7 @@ CONFIG_TIMER_STATS=y
1623# CONFIG_DEBUG_OBJECTS is not set 1613# CONFIG_DEBUG_OBJECTS is not set
1624# CONFIG_SLUB_DEBUG_ON is not set 1614# CONFIG_SLUB_DEBUG_ON is not set
1625# CONFIG_SLUB_STATS is not set 1615# CONFIG_SLUB_STATS is not set
1616# CONFIG_DEBUG_KMEMLEAK is not set
1626CONFIG_DEBUG_PREEMPT=y 1617CONFIG_DEBUG_PREEMPT=y
1627CONFIG_DEBUG_RT_MUTEXES=y 1618CONFIG_DEBUG_RT_MUTEXES=y
1628CONFIG_DEBUG_PI_LIST=y 1619CONFIG_DEBUG_PI_LIST=y
@@ -1654,18 +1645,16 @@ CONFIG_DEBUG_BUGVERBOSE=y
1654# CONFIG_PAGE_POISONING is not set 1645# CONFIG_PAGE_POISONING is not set
1655CONFIG_HAVE_FUNCTION_TRACER=y 1646CONFIG_HAVE_FUNCTION_TRACER=y
1656CONFIG_TRACING_SUPPORT=y 1647CONFIG_TRACING_SUPPORT=y
1657 1648CONFIG_FTRACE=y
1658#
1659# Tracers
1660#
1661# CONFIG_FUNCTION_TRACER is not set 1649# CONFIG_FUNCTION_TRACER is not set
1662# CONFIG_IRQSOFF_TRACER is not set 1650# CONFIG_IRQSOFF_TRACER is not set
1663# CONFIG_PREEMPT_TRACER is not set 1651# CONFIG_PREEMPT_TRACER is not set
1664# CONFIG_SCHED_TRACER is not set 1652# CONFIG_SCHED_TRACER is not set
1665# CONFIG_CONTEXT_SWITCH_TRACER is not set 1653# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1666# CONFIG_EVENT_TRACER is not set
1667# CONFIG_BOOT_TRACER is not set 1654# CONFIG_BOOT_TRACER is not set
1668# CONFIG_TRACE_BRANCH_PROFILING is not set 1655CONFIG_BRANCH_PROFILE_NONE=y
1656# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1657# CONFIG_PROFILE_ALL_BRANCHES is not set
1669# CONFIG_STACK_TRACER is not set 1658# CONFIG_STACK_TRACER is not set
1670# CONFIG_KMEMTRACE is not set 1659# CONFIG_KMEMTRACE is not set
1671# CONFIG_WORKQUEUE_TRACER is not set 1660# CONFIG_WORKQUEUE_TRACER is not set
diff --git a/arch/arm/configs/littleton_defconfig b/arch/arm/configs/littleton_defconfig
deleted file mode 100644
index 1db496908052..000000000000
--- a/arch/arm/configs/littleton_defconfig
+++ /dev/null
@@ -1,783 +0,0 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.24-rc5
4# Fri Dec 21 11:06:19 2007
5#
6CONFIG_ARM=y
7CONFIG_SYS_SUPPORTS_APM_EMULATION=y
8CONFIG_GENERIC_GPIO=y
9CONFIG_GENERIC_TIME=y
10CONFIG_GENERIC_CLOCKEVENTS=y
11CONFIG_MMU=y
12# CONFIG_NO_IOPORT is not set
13CONFIG_GENERIC_HARDIRQS=y
14CONFIG_STACKTRACE_SUPPORT=y
15CONFIG_LOCKDEP_SUPPORT=y
16CONFIG_TRACE_IRQFLAGS_SUPPORT=y
17CONFIG_HARDIRQS_SW_RESEND=y
18CONFIG_GENERIC_IRQ_PROBE=y
19CONFIG_RWSEM_GENERIC_SPINLOCK=y
20# CONFIG_ARCH_HAS_ILOG2_U32 is not set
21# CONFIG_ARCH_HAS_ILOG2_U64 is not set
22CONFIG_GENERIC_HWEIGHT=y
23CONFIG_GENERIC_CALIBRATE_DELAY=y
24CONFIG_ZONE_DMA=y
25CONFIG_ARCH_MTD_XIP=y
26CONFIG_VECTORS_BASE=0xffff0000
27CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
28
29#
30# General setup
31#
32CONFIG_EXPERIMENTAL=y
33CONFIG_BROKEN_ON_SMP=y
34CONFIG_LOCK_KERNEL=y
35CONFIG_INIT_ENV_ARG_LIMIT=32
36CONFIG_LOCALVERSION=""
37CONFIG_LOCALVERSION_AUTO=y
38CONFIG_SWAP=y
39CONFIG_SYSVIPC=y
40CONFIG_SYSVIPC_SYSCTL=y
41# CONFIG_POSIX_MQUEUE is not set
42# CONFIG_BSD_PROCESS_ACCT is not set
43# CONFIG_TASKSTATS is not set
44# CONFIG_USER_NS is not set
45# CONFIG_PID_NS is not set
46# CONFIG_AUDIT is not set
47# CONFIG_IKCONFIG is not set
48CONFIG_LOG_BUF_SHIFT=14
49# CONFIG_CGROUPS is not set
50CONFIG_FAIR_GROUP_SCHED=y
51CONFIG_FAIR_USER_SCHED=y
52# CONFIG_FAIR_CGROUP_SCHED is not set
53CONFIG_SYSFS_DEPRECATED=y
54# CONFIG_RELAY is not set
55CONFIG_BLK_DEV_INITRD=y
56CONFIG_INITRAMFS_SOURCE=""
57CONFIG_CC_OPTIMIZE_FOR_SIZE=y
58CONFIG_SYSCTL=y
59# CONFIG_EMBEDDED is not set
60CONFIG_UID16=y
61CONFIG_SYSCTL_SYSCALL=y
62CONFIG_KALLSYMS=y
63# CONFIG_KALLSYMS_ALL is not set
64# CONFIG_KALLSYMS_EXTRA_PASS is not set
65CONFIG_HOTPLUG=y
66CONFIG_PRINTK=y
67CONFIG_BUG=y
68CONFIG_ELF_CORE=y
69CONFIG_BASE_FULL=y
70CONFIG_FUTEX=y
71CONFIG_ANON_INODES=y
72CONFIG_EPOLL=y
73CONFIG_SIGNALFD=y
74CONFIG_EVENTFD=y
75CONFIG_SHMEM=y
76CONFIG_VM_EVENT_COUNTERS=y
77CONFIG_SLAB=y
78# CONFIG_SLUB is not set
79# CONFIG_SLOB is not set
80CONFIG_RT_MUTEXES=y
81# CONFIG_TINY_SHMEM is not set
82CONFIG_BASE_SMALL=0
83CONFIG_MODULES=y
84CONFIG_MODULE_UNLOAD=y
85CONFIG_MODULE_FORCE_UNLOAD=y
86# CONFIG_MODVERSIONS is not set
87# CONFIG_MODULE_SRCVERSION_ALL is not set
88# CONFIG_KMOD is not set
89CONFIG_BLOCK=y
90# CONFIG_LBD is not set
91# CONFIG_BLK_DEV_IO_TRACE is not set
92# CONFIG_LSF is not set
93# CONFIG_BLK_DEV_BSG is not set
94
95#
96# IO Schedulers
97#
98CONFIG_IOSCHED_NOOP=y
99CONFIG_IOSCHED_AS=y
100CONFIG_IOSCHED_DEADLINE=y
101CONFIG_IOSCHED_CFQ=y
102# CONFIG_DEFAULT_AS is not set
103# CONFIG_DEFAULT_DEADLINE is not set
104CONFIG_DEFAULT_CFQ=y
105# CONFIG_DEFAULT_NOOP is not set
106CONFIG_DEFAULT_IOSCHED="cfq"
107
108#
109# System Type
110#
111# CONFIG_ARCH_AAEC2000 is not set
112# CONFIG_ARCH_INTEGRATOR is not set
113# CONFIG_ARCH_REALVIEW is not set
114# CONFIG_ARCH_VERSATILE is not set
115# CONFIG_ARCH_AT91 is not set
116# CONFIG_ARCH_CLPS7500 is not set
117# CONFIG_ARCH_CLPS711X is not set
118# CONFIG_ARCH_CO285 is not set
119# CONFIG_ARCH_EBSA110 is not set
120# CONFIG_ARCH_EP93XX is not set
121# CONFIG_ARCH_FOOTBRIDGE is not set
122# CONFIG_ARCH_NETX is not set
123# CONFIG_ARCH_H720X is not set
124# CONFIG_ARCH_IMX is not set
125# CONFIG_ARCH_IOP13XX is not set
126# CONFIG_ARCH_IOP32X is not set
127# CONFIG_ARCH_IOP33X is not set
128# CONFIG_ARCH_IXP23XX is not set
129# CONFIG_ARCH_IXP2000 is not set
130# CONFIG_ARCH_IXP4XX is not set
131# CONFIG_ARCH_L7200 is not set
132# CONFIG_ARCH_KS8695 is not set
133# CONFIG_ARCH_NS9XXX is not set
134# CONFIG_ARCH_MXC is not set
135# CONFIG_ARCH_PNX4008 is not set
136CONFIG_ARCH_PXA=y
137# CONFIG_ARCH_RPC is not set
138# CONFIG_ARCH_SA1100 is not set
139# CONFIG_ARCH_S3C2410 is not set
140# CONFIG_ARCH_SHARK is not set
141# CONFIG_ARCH_LH7A40X is not set
142# CONFIG_ARCH_DAVINCI is not set
143# CONFIG_ARCH_OMAP is not set
144
145#
146# Intel PXA2xx/PXA3xx Implementations
147#
148
149#
150# Supported PXA3xx Processor Variants
151#
152CONFIG_CPU_PXA300=y
153CONFIG_CPU_PXA310=y
154# CONFIG_CPU_PXA320 is not set
155# CONFIG_ARCH_LUBBOCK is not set
156# CONFIG_MACH_LOGICPD_PXA270 is not set
157# CONFIG_MACH_MAINSTONE is not set
158# CONFIG_ARCH_PXA_IDP is not set
159# CONFIG_PXA_SHARPSL is not set
160# CONFIG_MACH_TRIZEPS4 is not set
161# CONFIG_MACH_EM_X270 is not set
162# CONFIG_MACH_ZYLONITE is not set
163CONFIG_MACH_LITTLETON=y
164# CONFIG_MACH_ARMCORE is not set
165CONFIG_PXA3xx=y
166CONFIG_PXA_SSP=y
167
168#
169# Boot options
170#
171
172#
173# Power management
174#
175
176#
177# Processor Type
178#
179CONFIG_CPU_32=y
180CONFIG_CPU_XSC3=y
181CONFIG_CPU_32v5=y
182CONFIG_CPU_ABRT_EV5T=y
183CONFIG_CPU_CACHE_VIVT=y
184CONFIG_CPU_TLB_V4WBI=y
185CONFIG_CPU_CP15=y
186CONFIG_CPU_CP15_MMU=y
187CONFIG_IO_36=y
188
189#
190# Processor Features
191#
192# CONFIG_ARM_THUMB is not set
193# CONFIG_CPU_DCACHE_DISABLE is not set
194# CONFIG_CPU_BPREDICT_DISABLE is not set
195# CONFIG_OUTER_CACHE is not set
196CONFIG_IWMMXT=y
197
198#
199# Bus support
200#
201# CONFIG_PCI_SYSCALL is not set
202# CONFIG_ARCH_SUPPORTS_MSI is not set
203# CONFIG_PCCARD is not set
204
205#
206# Kernel Features
207#
208CONFIG_TICK_ONESHOT=y
209# CONFIG_NO_HZ is not set
210# CONFIG_HIGH_RES_TIMERS is not set
211CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
212CONFIG_PREEMPT=y
213CONFIG_HZ=100
214CONFIG_AEABI=y
215CONFIG_OABI_COMPAT=y
216# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
217CONFIG_SELECT_MEMORY_MODEL=y
218CONFIG_FLATMEM_MANUAL=y
219# CONFIG_DISCONTIGMEM_MANUAL is not set
220# CONFIG_SPARSEMEM_MANUAL is not set
221CONFIG_FLATMEM=y
222CONFIG_FLAT_NODE_MEM_MAP=y
223# CONFIG_SPARSEMEM_STATIC is not set
224# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
225CONFIG_SPLIT_PTLOCK_CPUS=4096
226# CONFIG_RESOURCES_64BIT is not set
227CONFIG_ZONE_DMA_FLAG=1
228CONFIG_BOUNCE=y
229CONFIG_VIRT_TO_BUS=y
230CONFIG_ALIGNMENT_TRAP=y
231
232#
233# Boot options
234#
235CONFIG_ZBOOT_ROM_TEXT=0x0
236CONFIG_ZBOOT_ROM_BSS=0x0
237CONFIG_CMDLINE="root=/dev/nfs rootfstype=nfs nfsroot=192.168.1.100:/nfsroot/ ip=192.168.1.101:192.168.1.100::255.255.255.0::eth0:on console=ttyS2,38400 mem=64M"
238# CONFIG_XIP_KERNEL is not set
239# CONFIG_KEXEC is not set
240
241#
242# CPU Frequency scaling
243#
244# CONFIG_CPU_FREQ is not set
245
246#
247# Floating point emulation
248#
249
250#
251# At least one emulation must be selected
252#
253CONFIG_FPE_NWFPE=y
254# CONFIG_FPE_NWFPE_XP is not set
255# CONFIG_FPE_FASTFPE is not set
256
257#
258# Userspace binary formats
259#
260CONFIG_BINFMT_ELF=y
261# CONFIG_BINFMT_AOUT is not set
262# CONFIG_BINFMT_MISC is not set
263
264#
265# Power management options
266#
267# CONFIG_PM is not set
268CONFIG_SUSPEND_UP_POSSIBLE=y
269
270#
271# Networking
272#
273CONFIG_NET=y
274
275#
276# Networking options
277#
278CONFIG_PACKET=y
279# CONFIG_PACKET_MMAP is not set
280CONFIG_UNIX=y
281CONFIG_XFRM=y
282# CONFIG_XFRM_USER is not set
283# CONFIG_XFRM_SUB_POLICY is not set
284# CONFIG_XFRM_MIGRATE is not set
285# CONFIG_NET_KEY is not set
286CONFIG_INET=y
287# CONFIG_IP_MULTICAST is not set
288# CONFIG_IP_ADVANCED_ROUTER is not set
289CONFIG_IP_FIB_HASH=y
290CONFIG_IP_PNP=y
291# CONFIG_IP_PNP_DHCP is not set
292# CONFIG_IP_PNP_BOOTP is not set
293# CONFIG_IP_PNP_RARP is not set
294# CONFIG_NET_IPIP is not set
295# CONFIG_NET_IPGRE is not set
296# CONFIG_ARPD is not set
297# CONFIG_SYN_COOKIES is not set
298# CONFIG_INET_AH is not set
299# CONFIG_INET_ESP is not set
300# CONFIG_INET_IPCOMP is not set
301# CONFIG_INET_XFRM_TUNNEL is not set
302# CONFIG_INET_TUNNEL is not set
303CONFIG_INET_XFRM_MODE_TRANSPORT=y
304CONFIG_INET_XFRM_MODE_TUNNEL=y
305CONFIG_INET_XFRM_MODE_BEET=y
306# CONFIG_INET_LRO is not set
307CONFIG_INET_DIAG=y
308CONFIG_INET_TCP_DIAG=y
309# CONFIG_TCP_CONG_ADVANCED is not set
310CONFIG_TCP_CONG_CUBIC=y
311CONFIG_DEFAULT_TCP_CONG="cubic"
312# CONFIG_TCP_MD5SIG is not set
313# CONFIG_IPV6 is not set
314# CONFIG_INET6_XFRM_TUNNEL is not set
315# CONFIG_INET6_TUNNEL is not set
316# CONFIG_NETWORK_SECMARK is not set
317# CONFIG_NETFILTER is not set
318# CONFIG_IP_DCCP is not set
319# CONFIG_IP_SCTP is not set
320# CONFIG_TIPC is not set
321# CONFIG_ATM is not set
322# CONFIG_BRIDGE is not set
323# CONFIG_VLAN_8021Q is not set
324# CONFIG_DECNET is not set
325# CONFIG_LLC2 is not set
326# CONFIG_IPX is not set
327# CONFIG_ATALK is not set
328# CONFIG_X25 is not set
329# CONFIG_LAPB is not set
330# CONFIG_ECONET is not set
331# CONFIG_WAN_ROUTER is not set
332# CONFIG_NET_SCHED is not set
333
334#
335# Network testing
336#
337# CONFIG_NET_PKTGEN is not set
338# CONFIG_HAMRADIO is not set
339# CONFIG_IRDA is not set
340# CONFIG_BT is not set
341# CONFIG_AF_RXRPC is not set
342
343#
344# Wireless
345#
346# CONFIG_CFG80211 is not set
347# CONFIG_WIRELESS_EXT is not set
348# CONFIG_MAC80211 is not set
349# CONFIG_IEEE80211 is not set
350# CONFIG_RFKILL is not set
351# CONFIG_NET_9P is not set
352
353#
354# Device Drivers
355#
356
357#
358# Generic Driver Options
359#
360CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
361# CONFIG_STANDALONE is not set
362# CONFIG_PREVENT_FIRMWARE_BUILD is not set
363CONFIG_FW_LOADER=y
364# CONFIG_DEBUG_DRIVER is not set
365# CONFIG_DEBUG_DEVRES is not set
366# CONFIG_SYS_HYPERVISOR is not set
367# CONFIG_CONNECTOR is not set
368# CONFIG_MTD is not set
369# CONFIG_PARPORT is not set
370# CONFIG_BLK_DEV is not set
371# CONFIG_MISC_DEVICES is not set
372# CONFIG_IDE is not set
373
374#
375# SCSI device support
376#
377# CONFIG_RAID_ATTRS is not set
378# CONFIG_SCSI is not set
379# CONFIG_SCSI_DMA is not set
380# CONFIG_SCSI_NETLINK is not set
381# CONFIG_ATA is not set
382# CONFIG_MD is not set
383CONFIG_NETDEVICES=y
384# CONFIG_NETDEVICES_MULTIQUEUE is not set
385# CONFIG_DUMMY is not set
386# CONFIG_BONDING is not set
387# CONFIG_MACVLAN is not set
388# CONFIG_EQUALIZER is not set
389# CONFIG_TUN is not set
390# CONFIG_VETH is not set
391# CONFIG_PHYLIB is not set
392CONFIG_NET_ETHERNET=y
393CONFIG_MII=y
394# CONFIG_AX88796 is not set
395CONFIG_SMC91X=y
396# CONFIG_DM9000 is not set
397# CONFIG_SMC911X is not set
398# CONFIG_IBM_NEW_EMAC_ZMII is not set
399# CONFIG_IBM_NEW_EMAC_RGMII is not set
400# CONFIG_IBM_NEW_EMAC_TAH is not set
401# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
402# CONFIG_B44 is not set
403# CONFIG_NETDEV_1000 is not set
404# CONFIG_NETDEV_10000 is not set
405
406#
407# Wireless LAN
408#
409# CONFIG_WLAN_PRE80211 is not set
410# CONFIG_WLAN_80211 is not set
411# CONFIG_WAN is not set
412# CONFIG_PPP is not set
413# CONFIG_SLIP is not set
414# CONFIG_SHAPER is not set
415# CONFIG_NETCONSOLE is not set
416# CONFIG_NETPOLL is not set
417# CONFIG_NET_POLL_CONTROLLER is not set
418# CONFIG_ISDN is not set
419
420#
421# Input device support
422#
423CONFIG_INPUT=y
424# CONFIG_INPUT_FF_MEMLESS is not set
425# CONFIG_INPUT_POLLDEV is not set
426
427#
428# Userland interfaces
429#
430CONFIG_INPUT_MOUSEDEV=y
431# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
432CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
433CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
434# CONFIG_INPUT_JOYDEV is not set
435# CONFIG_INPUT_EVDEV is not set
436# CONFIG_INPUT_EVBUG is not set
437
438#
439# Input Device Drivers
440#
441# CONFIG_INPUT_KEYBOARD is not set
442# CONFIG_INPUT_MOUSE is not set
443# CONFIG_INPUT_JOYSTICK is not set
444# CONFIG_INPUT_TABLET is not set
445# CONFIG_INPUT_TOUCHSCREEN is not set
446# CONFIG_INPUT_MISC is not set
447
448#
449# Hardware I/O ports
450#
451# CONFIG_SERIO is not set
452# CONFIG_GAMEPORT is not set
453
454#
455# Character devices
456#
457CONFIG_VT=y
458CONFIG_VT_CONSOLE=y
459CONFIG_HW_CONSOLE=y
460# CONFIG_VT_HW_CONSOLE_BINDING is not set
461# CONFIG_SERIAL_NONSTANDARD is not set
462
463#
464# Serial drivers
465#
466# CONFIG_SERIAL_8250 is not set
467
468#
469# Non-8250 serial port support
470#
471CONFIG_SERIAL_PXA=y
472CONFIG_SERIAL_PXA_CONSOLE=y
473CONFIG_SERIAL_CORE=y
474CONFIG_SERIAL_CORE_CONSOLE=y
475CONFIG_UNIX98_PTYS=y
476# CONFIG_LEGACY_PTYS is not set
477# CONFIG_IPMI_HANDLER is not set
478# CONFIG_HW_RANDOM is not set
479# CONFIG_NVRAM is not set
480# CONFIG_R3964 is not set
481# CONFIG_RAW_DRIVER is not set
482# CONFIG_TCG_TPM is not set
483# CONFIG_I2C is not set
484
485#
486# SPI support
487#
488# CONFIG_SPI is not set
489# CONFIG_SPI_MASTER is not set
490# CONFIG_W1 is not set
491# CONFIG_POWER_SUPPLY is not set
492# CONFIG_HWMON is not set
493# CONFIG_WATCHDOG is not set
494
495#
496# Sonics Silicon Backplane
497#
498CONFIG_SSB_POSSIBLE=y
499# CONFIG_SSB is not set
500
501#
502# Multifunction device drivers
503#
504# CONFIG_MFD_SM501 is not set
505
506#
507# Multimedia devices
508#
509# CONFIG_VIDEO_DEV is not set
510# CONFIG_DVB_CORE is not set
511# CONFIG_DAB is not set
512
513#
514# Graphics support
515#
516# CONFIG_VGASTATE is not set
517# CONFIG_VIDEO_OUTPUT_CONTROL is not set
518CONFIG_FB=y
519# CONFIG_FIRMWARE_EDID is not set
520# CONFIG_FB_DDC is not set
521CONFIG_FB_CFB_FILLRECT=y
522CONFIG_FB_CFB_COPYAREA=y
523CONFIG_FB_CFB_IMAGEBLIT=y
524# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
525# CONFIG_FB_SYS_FILLRECT is not set
526# CONFIG_FB_SYS_COPYAREA is not set
527# CONFIG_FB_SYS_IMAGEBLIT is not set
528# CONFIG_FB_SYS_FOPS is not set
529CONFIG_FB_DEFERRED_IO=y
530# CONFIG_FB_SVGALIB is not set
531# CONFIG_FB_MACMODES is not set
532# CONFIG_FB_BACKLIGHT is not set
533# CONFIG_FB_MODE_HELPERS is not set
534# CONFIG_FB_TILEBLITTING is not set
535
536#
537# Frame buffer hardware drivers
538#
539# CONFIG_FB_S1D13XXX is not set
540CONFIG_FB_PXA=y
541# CONFIG_FB_PXA_PARAMETERS is not set
542# CONFIG_FB_MBX is not set
543# CONFIG_FB_VIRTUAL is not set
544# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
545
546#
547# Display device support
548#
549# CONFIG_DISPLAY_SUPPORT is not set
550
551#
552# Console display driver support
553#
554# CONFIG_VGA_CONSOLE is not set
555CONFIG_DUMMY_CONSOLE=y
556CONFIG_FRAMEBUFFER_CONSOLE=y
557# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
558# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
559CONFIG_FONTS=y
560# CONFIG_FONT_8x8 is not set
561CONFIG_FONT_8x16=y
562# CONFIG_FONT_6x11 is not set
563# CONFIG_FONT_7x14 is not set
564# CONFIG_FONT_PEARL_8x8 is not set
565# CONFIG_FONT_ACORN_8x8 is not set
566# CONFIG_FONT_MINI_4x6 is not set
567# CONFIG_FONT_SUN8x16 is not set
568# CONFIG_FONT_SUN12x22 is not set
569# CONFIG_FONT_10x18 is not set
570CONFIG_LOGO=y
571CONFIG_LOGO_LINUX_MONO=y
572CONFIG_LOGO_LINUX_VGA16=y
573CONFIG_LOGO_LINUX_CLUT224=y
574
575#
576# Sound
577#
578# CONFIG_SOUND is not set
579# CONFIG_HID_SUPPORT is not set
580# CONFIG_USB_SUPPORT is not set
581# CONFIG_MMC is not set
582# CONFIG_NEW_LEDS is not set
583CONFIG_RTC_LIB=y
584# CONFIG_RTC_CLASS is not set
585
586#
587# File systems
588#
589# CONFIG_EXT2_FS is not set
590# CONFIG_EXT3_FS is not set
591# CONFIG_EXT4DEV_FS is not set
592# CONFIG_REISERFS_FS is not set
593# CONFIG_JFS_FS is not set
594CONFIG_FS_POSIX_ACL=y
595# CONFIG_XFS_FS is not set
596# CONFIG_GFS2_FS is not set
597# CONFIG_OCFS2_FS is not set
598# CONFIG_MINIX_FS is not set
599# CONFIG_ROMFS_FS is not set
600# CONFIG_INOTIFY is not set
601# CONFIG_QUOTA is not set
602# CONFIG_DNOTIFY is not set
603# CONFIG_AUTOFS_FS is not set
604# CONFIG_AUTOFS4_FS is not set
605# CONFIG_FUSE_FS is not set
606
607#
608# CD-ROM/DVD Filesystems
609#
610# CONFIG_ISO9660_FS is not set
611# CONFIG_UDF_FS is not set
612
613#
614# DOS/FAT/NT Filesystems
615#
616# CONFIG_MSDOS_FS is not set
617# CONFIG_VFAT_FS is not set
618# CONFIG_NTFS_FS is not set
619
620#
621# Pseudo filesystems
622#
623CONFIG_PROC_FS=y
624CONFIG_PROC_SYSCTL=y
625CONFIG_SYSFS=y
626# CONFIG_TMPFS is not set
627# CONFIG_HUGETLB_PAGE is not set
628# CONFIG_CONFIGFS_FS is not set
629
630#
631# Miscellaneous filesystems
632#
633# CONFIG_ADFS_FS is not set
634# CONFIG_AFFS_FS is not set
635# CONFIG_HFS_FS is not set
636# CONFIG_HFSPLUS_FS is not set
637# CONFIG_BEFS_FS is not set
638# CONFIG_BFS_FS is not set
639# CONFIG_EFS_FS is not set
640# CONFIG_CRAMFS is not set
641# CONFIG_VXFS_FS is not set
642# CONFIG_HPFS_FS is not set
643# CONFIG_QNX4FS_FS is not set
644# CONFIG_SYSV_FS is not set
645# CONFIG_UFS_FS is not set
646CONFIG_NETWORK_FILESYSTEMS=y
647CONFIG_NFS_FS=y
648CONFIG_NFS_V3=y
649CONFIG_NFS_V3_ACL=y
650CONFIG_NFS_V4=y
651CONFIG_NFS_DIRECTIO=y
652# CONFIG_NFSD is not set
653CONFIG_ROOT_NFS=y
654CONFIG_LOCKD=y
655CONFIG_LOCKD_V4=y
656CONFIG_NFS_ACL_SUPPORT=y
657CONFIG_NFS_COMMON=y
658CONFIG_SUNRPC=y
659CONFIG_SUNRPC_GSS=y
660# CONFIG_SUNRPC_BIND34 is not set
661CONFIG_RPCSEC_GSS_KRB5=y
662# CONFIG_RPCSEC_GSS_SPKM3 is not set
663# CONFIG_SMB_FS is not set
664# CONFIG_CIFS is not set
665# CONFIG_NCP_FS is not set
666# CONFIG_CODA_FS is not set
667# CONFIG_AFS_FS is not set
668
669#
670# Partition Types
671#
672# CONFIG_PARTITION_ADVANCED is not set
673CONFIG_MSDOS_PARTITION=y
674# CONFIG_NLS is not set
675# CONFIG_DLM is not set
676# CONFIG_INSTRUMENTATION is not set
677
678#
679# Kernel hacking
680#
681CONFIG_PRINTK_TIME=y
682CONFIG_ENABLE_WARN_DEPRECATED=y
683CONFIG_ENABLE_MUST_CHECK=y
684CONFIG_MAGIC_SYSRQ=y
685# CONFIG_UNUSED_SYMBOLS is not set
686# CONFIG_DEBUG_FS is not set
687# CONFIG_HEADERS_CHECK is not set
688CONFIG_DEBUG_KERNEL=y
689# CONFIG_DEBUG_SHIRQ is not set
690CONFIG_DETECT_SOFTLOCKUP=y
691CONFIG_SCHED_DEBUG=y
692# CONFIG_SCHEDSTATS is not set
693# CONFIG_TIMER_STATS is not set
694# CONFIG_DEBUG_SLAB is not set
695# CONFIG_DEBUG_PREEMPT is not set
696# CONFIG_DEBUG_RT_MUTEXES is not set
697# CONFIG_RT_MUTEX_TESTER is not set
698# CONFIG_DEBUG_SPINLOCK is not set
699# CONFIG_DEBUG_MUTEXES is not set
700# CONFIG_DEBUG_LOCK_ALLOC is not set
701# CONFIG_PROVE_LOCKING is not set
702# CONFIG_LOCK_STAT is not set
703# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
704# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
705# CONFIG_DEBUG_KOBJECT is not set
706CONFIG_DEBUG_BUGVERBOSE=y
707CONFIG_DEBUG_INFO=y
708# CONFIG_DEBUG_VM is not set
709# CONFIG_DEBUG_LIST is not set
710# CONFIG_DEBUG_SG is not set
711CONFIG_FRAME_POINTER=y
712CONFIG_FORCED_INLINING=y
713# CONFIG_BOOT_PRINTK_DELAY is not set
714# CONFIG_RCU_TORTURE_TEST is not set
715# CONFIG_FAULT_INJECTION is not set
716# CONFIG_SAMPLES is not set
717CONFIG_DEBUG_USER=y
718CONFIG_DEBUG_ERRORS=y
719CONFIG_DEBUG_LL=y
720# CONFIG_DEBUG_ICEDCC is not set
721
722#
723# Security options
724#
725# CONFIG_KEYS is not set
726# CONFIG_SECURITY is not set
727# CONFIG_SECURITY_FILE_CAPABILITIES is not set
728CONFIG_CRYPTO=y
729CONFIG_CRYPTO_ALGAPI=y
730CONFIG_CRYPTO_BLKCIPHER=y
731CONFIG_CRYPTO_MANAGER=y
732# CONFIG_CRYPTO_HMAC is not set
733# CONFIG_CRYPTO_XCBC is not set
734# CONFIG_CRYPTO_NULL is not set
735# CONFIG_CRYPTO_MD4 is not set
736CONFIG_CRYPTO_MD5=y
737# CONFIG_CRYPTO_SHA1 is not set
738# CONFIG_CRYPTO_SHA256 is not set
739# CONFIG_CRYPTO_SHA512 is not set
740# CONFIG_CRYPTO_WP512 is not set
741# CONFIG_CRYPTO_TGR192 is not set
742# CONFIG_CRYPTO_GF128MUL is not set
743# CONFIG_CRYPTO_ECB is not set
744CONFIG_CRYPTO_CBC=y
745# CONFIG_CRYPTO_PCBC is not set
746# CONFIG_CRYPTO_LRW is not set
747# CONFIG_CRYPTO_XTS is not set
748# CONFIG_CRYPTO_CRYPTD is not set
749CONFIG_CRYPTO_DES=y
750# CONFIG_CRYPTO_FCRYPT is not set
751# CONFIG_CRYPTO_BLOWFISH is not set
752# CONFIG_CRYPTO_TWOFISH is not set
753# CONFIG_CRYPTO_SERPENT is not set
754# CONFIG_CRYPTO_AES is not set
755# CONFIG_CRYPTO_CAST5 is not set
756# CONFIG_CRYPTO_CAST6 is not set
757# CONFIG_CRYPTO_TEA is not set
758# CONFIG_CRYPTO_ARC4 is not set
759# CONFIG_CRYPTO_KHAZAD is not set
760# CONFIG_CRYPTO_ANUBIS is not set
761# CONFIG_CRYPTO_SEED is not set
762# CONFIG_CRYPTO_DEFLATE is not set
763# CONFIG_CRYPTO_MICHAEL_MIC is not set
764# CONFIG_CRYPTO_CRC32C is not set
765# CONFIG_CRYPTO_CAMELLIA is not set
766# CONFIG_CRYPTO_TEST is not set
767# CONFIG_CRYPTO_AUTHENC is not set
768CONFIG_CRYPTO_HW=y
769
770#
771# Library routines
772#
773CONFIG_BITREVERSE=y
774CONFIG_CRC_CCITT=y
775# CONFIG_CRC16 is not set
776# CONFIG_CRC_ITU_T is not set
777CONFIG_CRC32=y
778# CONFIG_CRC7 is not set
779# CONFIG_LIBCRC32C is not set
780CONFIG_PLIST=y
781CONFIG_HAS_IOMEM=y
782CONFIG_HAS_IOPORT=y
783CONFIG_HAS_DMA=y
diff --git a/arch/arm/configs/n770_defconfig b/arch/arm/configs/n770_defconfig
index 672f6db06a52..a1657b73683f 100644
--- a/arch/arm/configs/n770_defconfig
+++ b/arch/arm/configs/n770_defconfig
@@ -875,7 +875,7 @@ CONFIG_FB_OMAP_LCDC_EXTERNAL=y
875CONFIG_FB_OMAP_LCDC_HWA742=y 875CONFIG_FB_OMAP_LCDC_HWA742=y
876# CONFIG_FB_OMAP_LCDC_BLIZZARD is not set 876# CONFIG_FB_OMAP_LCDC_BLIZZARD is not set
877CONFIG_FB_OMAP_MANUAL_UPDATE=y 877CONFIG_FB_OMAP_MANUAL_UPDATE=y
878# CONFIG_FB_OMAP_LCD_MIPID is not set 878CONFIG_FB_OMAP_LCD_MIPID=y
879# CONFIG_FB_OMAP_BOOTLOADER_INIT is not set 879# CONFIG_FB_OMAP_BOOTLOADER_INIT is not set
880CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE=2 880CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE=2
881# CONFIG_FB_OMAP_DMA_TUNE is not set 881# CONFIG_FB_OMAP_DMA_TUNE is not set
diff --git a/arch/arm/configs/n8x0_defconfig b/arch/arm/configs/n8x0_defconfig
new file mode 100644
index 000000000000..8da75dede52e
--- /dev/null
+++ b/arch/arm/configs/n8x0_defconfig
@@ -0,0 +1,1104 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.31-rc5
4# Thu Aug 6 22:17:23 2009
5#
6CONFIG_ARM=y
7CONFIG_SYS_SUPPORTS_APM_EMULATION=y
8CONFIG_GENERIC_GPIO=y
9CONFIG_GENERIC_TIME=y
10CONFIG_GENERIC_CLOCKEVENTS=y
11CONFIG_MMU=y
12CONFIG_GENERIC_HARDIRQS=y
13CONFIG_STACKTRACE_SUPPORT=y
14CONFIG_HAVE_LATENCYTOP_SUPPORT=y
15CONFIG_LOCKDEP_SUPPORT=y
16CONFIG_TRACE_IRQFLAGS_SUPPORT=y
17CONFIG_HARDIRQS_SW_RESEND=y
18CONFIG_GENERIC_IRQ_PROBE=y
19CONFIG_RWSEM_GENERIC_SPINLOCK=y
20CONFIG_GENERIC_HWEIGHT=y
21CONFIG_GENERIC_CALIBRATE_DELAY=y
22CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
23CONFIG_VECTORS_BASE=0xffff0000
24CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
25CONFIG_CONSTRUCTORS=y
26
27#
28# General setup
29#
30CONFIG_EXPERIMENTAL=y
31CONFIG_BROKEN_ON_SMP=y
32CONFIG_INIT_ENV_ARG_LIMIT=32
33CONFIG_LOCALVERSION=""
34CONFIG_LOCALVERSION_AUTO=y
35CONFIG_SWAP=y
36CONFIG_SYSVIPC=y
37CONFIG_SYSVIPC_SYSCTL=y
38# CONFIG_POSIX_MQUEUE is not set
39# CONFIG_BSD_PROCESS_ACCT is not set
40# CONFIG_TASKSTATS is not set
41# CONFIG_AUDIT is not set
42
43#
44# RCU Subsystem
45#
46# CONFIG_CLASSIC_RCU is not set
47CONFIG_TREE_RCU=y
48# CONFIG_PREEMPT_RCU is not set
49# CONFIG_RCU_TRACE is not set
50CONFIG_RCU_FANOUT=32
51# CONFIG_RCU_FANOUT_EXACT is not set
52# CONFIG_TREE_RCU_TRACE is not set
53# CONFIG_PREEMPT_RCU_TRACE is not set
54# CONFIG_IKCONFIG is not set
55CONFIG_LOG_BUF_SHIFT=14
56# CONFIG_GROUP_SCHED is not set
57# CONFIG_CGROUPS is not set
58# CONFIG_SYSFS_DEPRECATED_V2 is not set
59# CONFIG_RELAY is not set
60CONFIG_NAMESPACES=y
61# CONFIG_UTS_NS is not set
62# CONFIG_IPC_NS is not set
63# CONFIG_USER_NS is not set
64# CONFIG_PID_NS is not set
65# CONFIG_NET_NS is not set
66CONFIG_BLK_DEV_INITRD=y
67CONFIG_INITRAMFS_SOURCE=""
68CONFIG_RD_GZIP=y
69CONFIG_RD_BZIP2=y
70CONFIG_RD_LZMA=y
71CONFIG_CC_OPTIMIZE_FOR_SIZE=y
72CONFIG_SYSCTL=y
73CONFIG_ANON_INODES=y
74# CONFIG_EMBEDDED is not set
75CONFIG_UID16=y
76CONFIG_SYSCTL_SYSCALL=y
77CONFIG_KALLSYMS=y
78# CONFIG_KALLSYMS_ALL is not set
79# CONFIG_KALLSYMS_EXTRA_PASS is not set
80CONFIG_HOTPLUG=y
81CONFIG_PRINTK=y
82CONFIG_BUG=y
83CONFIG_ELF_CORE=y
84CONFIG_BASE_FULL=y
85CONFIG_FUTEX=y
86CONFIG_EPOLL=y
87CONFIG_SIGNALFD=y
88CONFIG_TIMERFD=y
89CONFIG_EVENTFD=y
90CONFIG_SHMEM=y
91CONFIG_AIO=y
92
93#
94# Performance Counters
95#
96CONFIG_VM_EVENT_COUNTERS=y
97CONFIG_SLUB_DEBUG=y
98# CONFIG_STRIP_ASM_SYMS is not set
99CONFIG_COMPAT_BRK=y
100# CONFIG_SLAB is not set
101CONFIG_SLUB=y
102# CONFIG_SLOB is not set
103# CONFIG_PROFILING is not set
104# CONFIG_MARKERS is not set
105CONFIG_HAVE_OPROFILE=y
106# CONFIG_KPROBES is not set
107CONFIG_HAVE_KPROBES=y
108CONFIG_HAVE_KRETPROBES=y
109CONFIG_HAVE_CLK=y
110
111#
112# GCOV-based kernel profiling
113#
114# CONFIG_SLOW_WORK is not set
115CONFIG_HAVE_GENERIC_DMA_COHERENT=y
116CONFIG_SLABINFO=y
117CONFIG_RT_MUTEXES=y
118CONFIG_BASE_SMALL=0
119CONFIG_MODULES=y
120# CONFIG_MODULE_FORCE_LOAD is not set
121CONFIG_MODULE_UNLOAD=y
122# CONFIG_MODULE_FORCE_UNLOAD is not set
123# CONFIG_MODVERSIONS is not set
124# CONFIG_MODULE_SRCVERSION_ALL is not set
125CONFIG_BLOCK=y
126# CONFIG_LBDAF is not set
127# CONFIG_BLK_DEV_BSG is not set
128# CONFIG_BLK_DEV_INTEGRITY is not set
129
130#
131# IO Schedulers
132#
133CONFIG_IOSCHED_NOOP=y
134# CONFIG_IOSCHED_AS is not set
135# CONFIG_IOSCHED_DEADLINE is not set
136CONFIG_IOSCHED_CFQ=y
137# CONFIG_DEFAULT_AS is not set
138# CONFIG_DEFAULT_DEADLINE is not set
139CONFIG_DEFAULT_CFQ=y
140# CONFIG_DEFAULT_NOOP is not set
141CONFIG_DEFAULT_IOSCHED="cfq"
142# CONFIG_FREEZER is not set
143
144#
145# System Type
146#
147# CONFIG_ARCH_AAEC2000 is not set
148# CONFIG_ARCH_INTEGRATOR is not set
149# CONFIG_ARCH_REALVIEW is not set
150# CONFIG_ARCH_VERSATILE is not set
151# CONFIG_ARCH_AT91 is not set
152# CONFIG_ARCH_CLPS711X is not set
153# CONFIG_ARCH_GEMINI is not set
154# CONFIG_ARCH_EBSA110 is not set
155# CONFIG_ARCH_EP93XX is not set
156# CONFIG_ARCH_FOOTBRIDGE is not set
157# CONFIG_ARCH_MXC is not set
158# CONFIG_ARCH_STMP3XXX is not set
159# CONFIG_ARCH_NETX is not set
160# CONFIG_ARCH_H720X is not set
161# CONFIG_ARCH_IOP13XX is not set
162# CONFIG_ARCH_IOP32X is not set
163# CONFIG_ARCH_IOP33X is not set
164# CONFIG_ARCH_IXP23XX is not set
165# CONFIG_ARCH_IXP2000 is not set
166# CONFIG_ARCH_IXP4XX is not set
167# CONFIG_ARCH_L7200 is not set
168# CONFIG_ARCH_KIRKWOOD is not set
169# CONFIG_ARCH_LOKI is not set
170# CONFIG_ARCH_MV78XX0 is not set
171# CONFIG_ARCH_ORION5X is not set
172# CONFIG_ARCH_MMP is not set
173# CONFIG_ARCH_KS8695 is not set
174# CONFIG_ARCH_NS9XXX is not set
175# CONFIG_ARCH_W90X900 is not set
176# CONFIG_ARCH_PNX4008 is not set
177# CONFIG_ARCH_PXA is not set
178# CONFIG_ARCH_MSM is not set
179# CONFIG_ARCH_RPC is not set
180# CONFIG_ARCH_SA1100 is not set
181# CONFIG_ARCH_S3C2410 is not set
182# CONFIG_ARCH_S3C64XX is not set
183# CONFIG_ARCH_SHARK is not set
184# CONFIG_ARCH_LH7A40X is not set
185# CONFIG_ARCH_U300 is not set
186# CONFIG_ARCH_DAVINCI is not set
187CONFIG_ARCH_OMAP=y
188
189#
190# TI OMAP Implementations
191#
192CONFIG_ARCH_OMAP_OTG=y
193# CONFIG_ARCH_OMAP1 is not set
194CONFIG_ARCH_OMAP2=y
195# CONFIG_ARCH_OMAP3 is not set
196# CONFIG_ARCH_OMAP4 is not set
197
198#
199# OMAP Feature Selections
200#
201# CONFIG_OMAP_DEBUG_POWERDOMAIN is not set
202# CONFIG_OMAP_DEBUG_CLOCKDOMAIN is not set
203CONFIG_OMAP_RESET_CLOCKS=y
204# CONFIG_OMAP_MUX is not set
205# CONFIG_OMAP_MCBSP is not set
206CONFIG_OMAP_MBOX_FWK=y
207# CONFIG_OMAP_MPU_TIMER is not set
208CONFIG_OMAP_32K_TIMER=y
209CONFIG_OMAP_32K_TIMER_HZ=128
210CONFIG_OMAP_DM_TIMER=y
211# CONFIG_OMAP_LL_DEBUG_UART1 is not set
212# CONFIG_OMAP_LL_DEBUG_UART2 is not set
213CONFIG_OMAP_LL_DEBUG_UART3=y
214# CONFIG_MACH_OMAP_GENERIC is not set
215
216#
217# OMAP Core Type
218#
219CONFIG_ARCH_OMAP24XX=y
220CONFIG_ARCH_OMAP2420=y
221# CONFIG_ARCH_OMAP2430 is not set
222
223#
224# OMAP Board Type
225#
226CONFIG_MACH_OMAP2_TUSB6010=y
227# CONFIG_MACH_OMAP_H4 is not set
228# CONFIG_MACH_OMAP_APOLLON is not set
229# CONFIG_MACH_OMAP_2430SDP is not set
230CONFIG_MACH_NOKIA_N8X0=y
231
232#
233# Processor Type
234#
235CONFIG_CPU_32=y
236CONFIG_CPU_V6=y
237# CONFIG_CPU_32v6K is not set
238CONFIG_CPU_32v6=y
239CONFIG_CPU_ABRT_EV6=y
240CONFIG_CPU_PABRT_NOIFAR=y
241CONFIG_CPU_CACHE_V6=y
242CONFIG_CPU_CACHE_VIPT=y
243CONFIG_CPU_COPY_V6=y
244CONFIG_CPU_TLB_V6=y
245CONFIG_CPU_HAS_ASID=y
246CONFIG_CPU_CP15=y
247CONFIG_CPU_CP15_MMU=y
248
249#
250# Processor Features
251#
252CONFIG_ARM_THUMB=y
253# CONFIG_CPU_ICACHE_DISABLE is not set
254# CONFIG_CPU_DCACHE_DISABLE is not set
255# CONFIG_CPU_BPREDICT_DISABLE is not set
256# CONFIG_ARM_ERRATA_411920 is not set
257CONFIG_COMMON_CLKDEV=y
258
259#
260# Bus support
261#
262# CONFIG_PCI_SYSCALL is not set
263# CONFIG_ARCH_SUPPORTS_MSI is not set
264# CONFIG_PCCARD is not set
265
266#
267# Kernel Features
268#
269# CONFIG_NO_HZ is not set
270# CONFIG_HIGH_RES_TIMERS is not set
271CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
272CONFIG_VMSPLIT_3G=y
273# CONFIG_VMSPLIT_2G is not set
274# CONFIG_VMSPLIT_1G is not set
275CONFIG_PAGE_OFFSET=0xC0000000
276# CONFIG_PREEMPT is not set
277CONFIG_HZ=128
278CONFIG_AEABI=y
279CONFIG_OABI_COMPAT=y
280# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
281# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
282# CONFIG_HIGHMEM is not set
283CONFIG_SELECT_MEMORY_MODEL=y
284CONFIG_FLATMEM_MANUAL=y
285# CONFIG_DISCONTIGMEM_MANUAL is not set
286# CONFIG_SPARSEMEM_MANUAL is not set
287CONFIG_FLATMEM=y
288CONFIG_FLAT_NODE_MEM_MAP=y
289CONFIG_PAGEFLAGS_EXTENDED=y
290CONFIG_SPLIT_PTLOCK_CPUS=4
291# CONFIG_PHYS_ADDR_T_64BIT is not set
292CONFIG_ZONE_DMA_FLAG=0
293CONFIG_VIRT_TO_BUS=y
294CONFIG_HAVE_MLOCK=y
295CONFIG_HAVE_MLOCKED_PAGE_BIT=y
296CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
297CONFIG_LEDS=y
298CONFIG_ALIGNMENT_TRAP=y
299# CONFIG_UACCESS_WITH_MEMCPY is not set
300
301#
302# Boot options
303#
304CONFIG_ZBOOT_ROM_TEXT=0x10C08000
305CONFIG_ZBOOT_ROM_BSS=0x10200000
306# CONFIG_ZBOOT_ROM is not set
307CONFIG_CMDLINE="root=1f03 rootfstype=jffs2 console=ttyS0,115200n8"
308# CONFIG_XIP_KERNEL is not set
309# CONFIG_KEXEC is not set
310
311#
312# CPU Power Management
313#
314# CONFIG_CPU_FREQ is not set
315# CONFIG_CPU_IDLE is not set
316
317#
318# Floating point emulation
319#
320
321#
322# At least one emulation must be selected
323#
324CONFIG_FPE_NWFPE=y
325# CONFIG_FPE_NWFPE_XP is not set
326# CONFIG_FPE_FASTFPE is not set
327CONFIG_VFP=y
328
329#
330# Userspace binary formats
331#
332CONFIG_BINFMT_ELF=y
333# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
334CONFIG_HAVE_AOUT=y
335# CONFIG_BINFMT_AOUT is not set
336# CONFIG_BINFMT_MISC is not set
337
338#
339# Power management options
340#
341# CONFIG_PM is not set
342CONFIG_ARCH_SUSPEND_POSSIBLE=y
343CONFIG_NET=y
344
345#
346# Networking options
347#
348# CONFIG_PACKET is not set
349CONFIG_UNIX=y
350# CONFIG_NET_KEY is not set
351CONFIG_INET=y
352# CONFIG_IP_MULTICAST is not set
353# CONFIG_IP_ADVANCED_ROUTER is not set
354CONFIG_IP_FIB_HASH=y
355# CONFIG_IP_PNP is not set
356# CONFIG_NET_IPIP is not set
357# CONFIG_NET_IPGRE is not set
358# CONFIG_ARPD is not set
359# CONFIG_SYN_COOKIES is not set
360# CONFIG_INET_AH is not set
361# CONFIG_INET_ESP is not set
362# CONFIG_INET_IPCOMP is not set
363# CONFIG_INET_XFRM_TUNNEL is not set
364# CONFIG_INET_TUNNEL is not set
365# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
366# CONFIG_INET_XFRM_MODE_TUNNEL is not set
367# CONFIG_INET_XFRM_MODE_BEET is not set
368# CONFIG_INET_LRO is not set
369CONFIG_INET_DIAG=y
370CONFIG_INET_TCP_DIAG=y
371# CONFIG_TCP_CONG_ADVANCED is not set
372CONFIG_TCP_CONG_CUBIC=y
373CONFIG_DEFAULT_TCP_CONG="cubic"
374# CONFIG_TCP_MD5SIG is not set
375# CONFIG_IPV6 is not set
376# CONFIG_NETWORK_SECMARK is not set
377# CONFIG_NETFILTER is not set
378# CONFIG_IP_DCCP is not set
379# CONFIG_IP_SCTP is not set
380# CONFIG_TIPC is not set
381# CONFIG_ATM is not set
382# CONFIG_BRIDGE is not set
383# CONFIG_NET_DSA is not set
384# CONFIG_VLAN_8021Q is not set
385# CONFIG_DECNET is not set
386# CONFIG_LLC2 is not set
387# CONFIG_IPX is not set
388# CONFIG_ATALK is not set
389# CONFIG_X25 is not set
390# CONFIG_LAPB is not set
391# CONFIG_ECONET is not set
392# CONFIG_WAN_ROUTER is not set
393# CONFIG_PHONET is not set
394# CONFIG_IEEE802154 is not set
395# CONFIG_NET_SCHED is not set
396# CONFIG_DCB is not set
397
398#
399# Network testing
400#
401# CONFIG_NET_PKTGEN is not set
402# CONFIG_HAMRADIO is not set
403# CONFIG_CAN is not set
404# CONFIG_IRDA is not set
405# CONFIG_BT is not set
406# CONFIG_AF_RXRPC is not set
407CONFIG_WIRELESS=y
408# CONFIG_CFG80211 is not set
409# CONFIG_WIRELESS_OLD_REGULATORY is not set
410# CONFIG_WIRELESS_EXT is not set
411# CONFIG_LIB80211 is not set
412
413#
414# CFG80211 needs to be enabled for MAC80211
415#
416CONFIG_MAC80211_DEFAULT_PS_VALUE=0
417# CONFIG_WIMAX is not set
418# CONFIG_RFKILL is not set
419# CONFIG_NET_9P is not set
420
421#
422# Device Drivers
423#
424
425#
426# Generic Driver Options
427#
428CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
429CONFIG_STANDALONE=y
430CONFIG_PREVENT_FIRMWARE_BUILD=y
431CONFIG_FW_LOADER=y
432CONFIG_FIRMWARE_IN_KERNEL=y
433CONFIG_EXTRA_FIRMWARE=""
434# CONFIG_DEBUG_DRIVER is not set
435# CONFIG_DEBUG_DEVRES is not set
436# CONFIG_SYS_HYPERVISOR is not set
437# CONFIG_CONNECTOR is not set
438CONFIG_MTD=y
439# CONFIG_MTD_DEBUG is not set
440# CONFIG_MTD_CONCAT is not set
441CONFIG_MTD_PARTITIONS=y
442# CONFIG_MTD_TESTS is not set
443# CONFIG_MTD_REDBOOT_PARTS is not set
444CONFIG_MTD_CMDLINE_PARTS=y
445# CONFIG_MTD_AFS_PARTS is not set
446# CONFIG_MTD_AR7_PARTS is not set
447
448#
449# User Modules And Translation Layers
450#
451# CONFIG_MTD_CHAR is not set
452CONFIG_HAVE_MTD_OTP=y
453# CONFIG_MTD_BLKDEVS is not set
454# CONFIG_MTD_BLOCK is not set
455# CONFIG_MTD_BLOCK_RO is not set
456# CONFIG_FTL is not set
457# CONFIG_NFTL is not set
458# CONFIG_INFTL is not set
459# CONFIG_RFD_FTL is not set
460# CONFIG_SSFDC is not set
461# CONFIG_MTD_OOPS is not set
462
463#
464# RAM/ROM/Flash chip drivers
465#
466# CONFIG_MTD_CFI is not set
467# CONFIG_MTD_JEDECPROBE is not set
468CONFIG_MTD_MAP_BANK_WIDTH_1=y
469CONFIG_MTD_MAP_BANK_WIDTH_2=y
470CONFIG_MTD_MAP_BANK_WIDTH_4=y
471# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
472# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
473# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
474CONFIG_MTD_CFI_I1=y
475CONFIG_MTD_CFI_I2=y
476# CONFIG_MTD_CFI_I4 is not set
477# CONFIG_MTD_CFI_I8 is not set
478# CONFIG_MTD_RAM is not set
479# CONFIG_MTD_ROM is not set
480# CONFIG_MTD_ABSENT is not set
481
482#
483# Mapping drivers for chip access
484#
485# CONFIG_MTD_COMPLEX_MAPPINGS is not set
486# CONFIG_MTD_PLATRAM is not set
487
488#
489# Self-contained MTD device drivers
490#
491# CONFIG_MTD_DATAFLASH is not set
492# CONFIG_MTD_M25P80 is not set
493# CONFIG_MTD_SLRAM is not set
494# CONFIG_MTD_PHRAM is not set
495# CONFIG_MTD_MTDRAM is not set
496# CONFIG_MTD_BLOCK2MTD is not set
497
498#
499# Disk-On-Chip Device Drivers
500#
501# CONFIG_MTD_DOC2000 is not set
502# CONFIG_MTD_DOC2001 is not set
503# CONFIG_MTD_DOC2001PLUS is not set
504# CONFIG_MTD_NAND is not set
505CONFIG_MTD_ONENAND=y
506# CONFIG_MTD_ONENAND_VERIFY_WRITE is not set
507# CONFIG_MTD_ONENAND_GENERIC is not set
508CONFIG_MTD_ONENAND_OMAP2=y
509CONFIG_MTD_ONENAND_OTP=y
510# CONFIG_MTD_ONENAND_2X_PROGRAM is not set
511# CONFIG_MTD_ONENAND_SIM is not set
512
513#
514# LPDDR flash memory drivers
515#
516# CONFIG_MTD_LPDDR is not set
517
518#
519# UBI - Unsorted block images
520#
521# CONFIG_MTD_UBI is not set
522# CONFIG_PARPORT is not set
523CONFIG_BLK_DEV=y
524# CONFIG_BLK_DEV_COW_COMMON is not set
525# CONFIG_BLK_DEV_LOOP is not set
526# CONFIG_BLK_DEV_NBD is not set
527# CONFIG_BLK_DEV_UB is not set
528CONFIG_BLK_DEV_RAM=y
529CONFIG_BLK_DEV_RAM_COUNT=16
530CONFIG_BLK_DEV_RAM_SIZE=4096
531# CONFIG_BLK_DEV_XIP is not set
532# CONFIG_CDROM_PKTCDVD is not set
533# CONFIG_ATA_OVER_ETH is not set
534# CONFIG_MG_DISK is not set
535# CONFIG_MISC_DEVICES is not set
536CONFIG_HAVE_IDE=y
537# CONFIG_IDE is not set
538
539#
540# SCSI device support
541#
542# CONFIG_RAID_ATTRS is not set
543# CONFIG_SCSI is not set
544# CONFIG_SCSI_DMA is not set
545# CONFIG_SCSI_NETLINK is not set
546# CONFIG_ATA is not set
547# CONFIG_MD is not set
548# CONFIG_NETDEVICES is not set
549# CONFIG_ISDN is not set
550
551#
552# Input device support
553#
554CONFIG_INPUT=y
555# CONFIG_INPUT_FF_MEMLESS is not set
556# CONFIG_INPUT_POLLDEV is not set
557
558#
559# Userland interfaces
560#
561CONFIG_INPUT_MOUSEDEV=y
562# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
563CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
564CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
565# CONFIG_INPUT_JOYDEV is not set
566# CONFIG_INPUT_EVDEV is not set
567# CONFIG_INPUT_EVBUG is not set
568
569#
570# Input Device Drivers
571#
572# CONFIG_INPUT_KEYBOARD is not set
573# CONFIG_INPUT_MOUSE is not set
574# CONFIG_INPUT_JOYSTICK is not set
575# CONFIG_INPUT_TABLET is not set
576# CONFIG_INPUT_TOUCHSCREEN is not set
577# CONFIG_INPUT_MISC is not set
578
579#
580# Hardware I/O ports
581#
582CONFIG_SERIO=y
583CONFIG_SERIO_SERPORT=y
584# CONFIG_SERIO_RAW is not set
585# CONFIG_GAMEPORT is not set
586
587#
588# Character devices
589#
590CONFIG_VT=y
591CONFIG_CONSOLE_TRANSLATIONS=y
592CONFIG_VT_CONSOLE=y
593CONFIG_HW_CONSOLE=y
594# CONFIG_VT_HW_CONSOLE_BINDING is not set
595CONFIG_DEVKMEM=y
596# CONFIG_SERIAL_NONSTANDARD is not set
597
598#
599# Serial drivers
600#
601CONFIG_SERIAL_8250=y
602CONFIG_SERIAL_8250_CONSOLE=y
603CONFIG_SERIAL_8250_NR_UARTS=4
604CONFIG_SERIAL_8250_RUNTIME_UARTS=4
605# CONFIG_SERIAL_8250_EXTENDED is not set
606
607#
608# Non-8250 serial port support
609#
610# CONFIG_SERIAL_MAX3100 is not set
611CONFIG_SERIAL_CORE=y
612CONFIG_SERIAL_CORE_CONSOLE=y
613CONFIG_UNIX98_PTYS=y
614# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
615# CONFIG_LEGACY_PTYS is not set
616# CONFIG_IPMI_HANDLER is not set
617# CONFIG_HW_RANDOM is not set
618# CONFIG_R3964 is not set
619# CONFIG_RAW_DRIVER is not set
620# CONFIG_TCG_TPM is not set
621# CONFIG_I2C is not set
622CONFIG_SPI=y
623# CONFIG_SPI_DEBUG is not set
624CONFIG_SPI_MASTER=y
625
626#
627# SPI Master Controller Drivers
628#
629# CONFIG_SPI_BITBANG is not set
630# CONFIG_SPI_GPIO is not set
631CONFIG_SPI_OMAP24XX=y
632
633#
634# SPI Protocol Masters
635#
636# CONFIG_SPI_SPIDEV is not set
637# CONFIG_SPI_TLE62X0 is not set
638CONFIG_ARCH_REQUIRE_GPIOLIB=y
639CONFIG_GPIOLIB=y
640# CONFIG_DEBUG_GPIO is not set
641# CONFIG_GPIO_SYSFS is not set
642
643#
644# Memory mapped GPIO expanders:
645#
646
647#
648# I2C GPIO expanders:
649#
650
651#
652# PCI GPIO expanders:
653#
654
655#
656# SPI GPIO expanders:
657#
658# CONFIG_GPIO_MAX7301 is not set
659# CONFIG_GPIO_MCP23S08 is not set
660# CONFIG_W1 is not set
661# CONFIG_POWER_SUPPLY is not set
662# CONFIG_HWMON is not set
663# CONFIG_THERMAL is not set
664# CONFIG_THERMAL_HWMON is not set
665# CONFIG_WATCHDOG is not set
666CONFIG_SSB_POSSIBLE=y
667
668#
669# Sonics Silicon Backplane
670#
671# CONFIG_SSB is not set
672
673#
674# Multifunction device drivers
675#
676# CONFIG_MFD_CORE is not set
677# CONFIG_MFD_SM501 is not set
678# CONFIG_MFD_ASIC3 is not set
679# CONFIG_HTC_EGPIO is not set
680# CONFIG_HTC_PASIC3 is not set
681# CONFIG_MFD_TMIO is not set
682# CONFIG_MFD_T7L66XB is not set
683# CONFIG_MFD_TC6387XB is not set
684# CONFIG_MFD_TC6393XB is not set
685# CONFIG_EZX_PCAP is not set
686# CONFIG_MEDIA_SUPPORT is not set
687
688#
689# Graphics support
690#
691# CONFIG_VGASTATE is not set
692# CONFIG_VIDEO_OUTPUT_CONTROL is not set
693# CONFIG_FB is not set
694# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
695
696#
697# Display device support
698#
699# CONFIG_DISPLAY_SUPPORT is not set
700
701#
702# Console display driver support
703#
704# CONFIG_VGA_CONSOLE is not set
705CONFIG_DUMMY_CONSOLE=y
706# CONFIG_SOUND is not set
707# CONFIG_HID_SUPPORT is not set
708CONFIG_USB_SUPPORT=y
709CONFIG_USB_ARCH_HAS_HCD=y
710CONFIG_USB_ARCH_HAS_OHCI=y
711# CONFIG_USB_ARCH_HAS_EHCI is not set
712CONFIG_USB=y
713CONFIG_USB_DEBUG=y
714CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
715
716#
717# Miscellaneous USB options
718#
719CONFIG_USB_DEVICEFS=y
720CONFIG_USB_DEVICE_CLASS=y
721# CONFIG_USB_DYNAMIC_MINORS is not set
722# CONFIG_USB_OTG is not set
723# CONFIG_USB_MON is not set
724# CONFIG_USB_WUSB is not set
725# CONFIG_USB_WUSB_CBAF is not set
726
727#
728# USB Host Controller Drivers
729#
730# CONFIG_USB_C67X00_HCD is not set
731# CONFIG_USB_OXU210HP_HCD is not set
732# CONFIG_USB_ISP116X_HCD is not set
733# CONFIG_USB_ISP1760_HCD is not set
734# CONFIG_USB_OHCI_HCD is not set
735# CONFIG_USB_SL811_HCD is not set
736# CONFIG_USB_R8A66597_HCD is not set
737# CONFIG_USB_HWA_HCD is not set
738CONFIG_USB_MUSB_HDRC=y
739CONFIG_USB_TUSB6010=y
740# CONFIG_USB_MUSB_HOST is not set
741CONFIG_USB_MUSB_PERIPHERAL=y
742# CONFIG_USB_MUSB_OTG is not set
743CONFIG_USB_GADGET_MUSB_HDRC=y
744# CONFIG_MUSB_PIO_ONLY is not set
745# CONFIG_USB_INVENTRA_DMA is not set
746# CONFIG_USB_TI_CPPI_DMA is not set
747CONFIG_USB_TUSB_OMAP_DMA=y
748CONFIG_USB_MUSB_DEBUG=y
749
750#
751# USB Device Class drivers
752#
753# CONFIG_USB_ACM is not set
754# CONFIG_USB_PRINTER is not set
755# CONFIG_USB_WDM is not set
756# CONFIG_USB_TMC is not set
757
758#
759# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
760#
761
762#
763# also be needed; see USB_STORAGE Help for more info
764#
765# CONFIG_USB_LIBUSUAL is not set
766
767#
768# USB Imaging devices
769#
770# CONFIG_USB_MDC800 is not set
771
772#
773# USB port drivers
774#
775# CONFIG_USB_SERIAL is not set
776
777#
778# USB Miscellaneous drivers
779#
780# CONFIG_USB_EMI62 is not set
781# CONFIG_USB_EMI26 is not set
782# CONFIG_USB_ADUTUX is not set
783# CONFIG_USB_SEVSEG is not set
784# CONFIG_USB_RIO500 is not set
785# CONFIG_USB_LEGOTOWER is not set
786# CONFIG_USB_LCD is not set
787# CONFIG_USB_BERRY_CHARGE is not set
788# CONFIG_USB_LED is not set
789# CONFIG_USB_CYPRESS_CY7C63 is not set
790# CONFIG_USB_CYTHERM is not set
791# CONFIG_USB_IDMOUSE is not set
792# CONFIG_USB_FTDI_ELAN is not set
793# CONFIG_USB_APPLEDISPLAY is not set
794# CONFIG_USB_SISUSBVGA is not set
795# CONFIG_USB_LD is not set
796# CONFIG_USB_TRANCEVIBRATOR is not set
797# CONFIG_USB_IOWARRIOR is not set
798# CONFIG_USB_TEST is not set
799# CONFIG_USB_ISIGHTFW is not set
800# CONFIG_USB_VST is not set
801CONFIG_USB_GADGET=y
802CONFIG_USB_GADGET_DEBUG=y
803CONFIG_USB_GADGET_DEBUG_FILES=y
804CONFIG_USB_GADGET_VBUS_DRAW=2
805CONFIG_USB_GADGET_SELECTED=y
806# CONFIG_USB_GADGET_AT91 is not set
807# CONFIG_USB_GADGET_ATMEL_USBA is not set
808# CONFIG_USB_GADGET_FSL_USB2 is not set
809# CONFIG_USB_GADGET_LH7A40X is not set
810# CONFIG_USB_GADGET_OMAP is not set
811# CONFIG_USB_GADGET_PXA25X is not set
812# CONFIG_USB_GADGET_PXA27X is not set
813# CONFIG_USB_GADGET_S3C_HSOTG is not set
814# CONFIG_USB_GADGET_IMX is not set
815# CONFIG_USB_GADGET_S3C2410 is not set
816# CONFIG_USB_GADGET_M66592 is not set
817# CONFIG_USB_GADGET_AMD5536UDC is not set
818# CONFIG_USB_GADGET_FSL_QE is not set
819# CONFIG_USB_GADGET_CI13XXX is not set
820# CONFIG_USB_GADGET_NET2280 is not set
821# CONFIG_USB_GADGET_GOKU is not set
822# CONFIG_USB_GADGET_LANGWELL is not set
823# CONFIG_USB_GADGET_DUMMY_HCD is not set
824CONFIG_USB_GADGET_DUALSPEED=y
825# CONFIG_USB_ZERO is not set
826# CONFIG_USB_AUDIO is not set
827CONFIG_USB_ETH=y
828# CONFIG_USB_ETH_RNDIS is not set
829# CONFIG_USB_GADGETFS is not set
830# CONFIG_USB_FILE_STORAGE is not set
831# CONFIG_USB_G_SERIAL is not set
832# CONFIG_USB_MIDI_GADGET is not set
833# CONFIG_USB_G_PRINTER is not set
834# CONFIG_USB_CDC_COMPOSITE is not set
835
836#
837# OTG and related infrastructure
838#
839CONFIG_USB_OTG_UTILS=y
840# CONFIG_USB_GPIO_VBUS is not set
841CONFIG_NOP_USB_XCEIV=y
842# CONFIG_MMC is not set
843# CONFIG_MEMSTICK is not set
844# CONFIG_ACCESSIBILITY is not set
845# CONFIG_NEW_LEDS is not set
846CONFIG_RTC_LIB=y
847# CONFIG_RTC_CLASS is not set
848# CONFIG_DMADEVICES is not set
849# CONFIG_AUXDISPLAY is not set
850# CONFIG_REGULATOR is not set
851# CONFIG_UIO is not set
852# CONFIG_STAGING is not set
853
854#
855# File systems
856#
857# CONFIG_EXT2_FS is not set
858# CONFIG_EXT3_FS is not set
859# CONFIG_EXT4_FS is not set
860# CONFIG_REISERFS_FS is not set
861# CONFIG_JFS_FS is not set
862# CONFIG_FS_POSIX_ACL is not set
863# CONFIG_XFS_FS is not set
864# CONFIG_OCFS2_FS is not set
865# CONFIG_BTRFS_FS is not set
866CONFIG_FILE_LOCKING=y
867CONFIG_FSNOTIFY=y
868CONFIG_DNOTIFY=y
869CONFIG_INOTIFY=y
870CONFIG_INOTIFY_USER=y
871# CONFIG_QUOTA is not set
872# CONFIG_AUTOFS_FS is not set
873# CONFIG_AUTOFS4_FS is not set
874# CONFIG_FUSE_FS is not set
875
876#
877# Caches
878#
879# CONFIG_FSCACHE is not set
880
881#
882# CD-ROM/DVD Filesystems
883#
884# CONFIG_ISO9660_FS is not set
885# CONFIG_UDF_FS is not set
886
887#
888# DOS/FAT/NT Filesystems
889#
890# CONFIG_MSDOS_FS is not set
891# CONFIG_VFAT_FS is not set
892# CONFIG_NTFS_FS is not set
893
894#
895# Pseudo filesystems
896#
897CONFIG_PROC_FS=y
898CONFIG_PROC_SYSCTL=y
899CONFIG_PROC_PAGE_MONITOR=y
900CONFIG_SYSFS=y
901CONFIG_TMPFS=y
902# CONFIG_TMPFS_POSIX_ACL is not set
903# CONFIG_HUGETLB_PAGE is not set
904# CONFIG_CONFIGFS_FS is not set
905CONFIG_MISC_FILESYSTEMS=y
906# CONFIG_ADFS_FS is not set
907# CONFIG_AFFS_FS is not set
908# CONFIG_HFS_FS is not set
909# CONFIG_HFSPLUS_FS is not set
910# CONFIG_BEFS_FS is not set
911# CONFIG_BFS_FS is not set
912# CONFIG_EFS_FS is not set
913CONFIG_JFFS2_FS=y
914CONFIG_JFFS2_FS_DEBUG=0
915CONFIG_JFFS2_FS_WRITEBUFFER=y
916# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
917CONFIG_JFFS2_SUMMARY=y
918# CONFIG_JFFS2_FS_XATTR is not set
919CONFIG_JFFS2_COMPRESSION_OPTIONS=y
920CONFIG_JFFS2_ZLIB=y
921CONFIG_JFFS2_LZO=y
922CONFIG_JFFS2_RTIME=y
923# CONFIG_JFFS2_RUBIN is not set
924# CONFIG_JFFS2_CMODE_NONE is not set
925CONFIG_JFFS2_CMODE_PRIORITY=y
926# CONFIG_JFFS2_CMODE_SIZE is not set
927# CONFIG_JFFS2_CMODE_FAVOURLZO is not set
928# CONFIG_CRAMFS is not set
929# CONFIG_SQUASHFS is not set
930# CONFIG_VXFS_FS is not set
931# CONFIG_MINIX_FS is not set
932# CONFIG_OMFS_FS is not set
933# CONFIG_HPFS_FS is not set
934# CONFIG_QNX4FS_FS is not set
935# CONFIG_ROMFS_FS is not set
936# CONFIG_SYSV_FS is not set
937# CONFIG_UFS_FS is not set
938# CONFIG_NILFS2_FS is not set
939CONFIG_NETWORK_FILESYSTEMS=y
940# CONFIG_NFS_FS is not set
941# CONFIG_NFSD is not set
942# CONFIG_SMB_FS is not set
943# CONFIG_CIFS is not set
944# CONFIG_NCP_FS is not set
945# CONFIG_CODA_FS is not set
946# CONFIG_AFS_FS is not set
947
948#
949# Partition Types
950#
951# CONFIG_PARTITION_ADVANCED is not set
952CONFIG_MSDOS_PARTITION=y
953CONFIG_NLS=y
954CONFIG_NLS_DEFAULT="iso8859-1"
955# CONFIG_NLS_CODEPAGE_437 is not set
956# CONFIG_NLS_CODEPAGE_737 is not set
957# CONFIG_NLS_CODEPAGE_775 is not set
958# CONFIG_NLS_CODEPAGE_850 is not set
959# CONFIG_NLS_CODEPAGE_852 is not set
960# CONFIG_NLS_CODEPAGE_855 is not set
961# CONFIG_NLS_CODEPAGE_857 is not set
962# CONFIG_NLS_CODEPAGE_860 is not set
963# CONFIG_NLS_CODEPAGE_861 is not set
964# CONFIG_NLS_CODEPAGE_862 is not set
965# CONFIG_NLS_CODEPAGE_863 is not set
966# CONFIG_NLS_CODEPAGE_864 is not set
967# CONFIG_NLS_CODEPAGE_865 is not set
968# CONFIG_NLS_CODEPAGE_866 is not set
969# CONFIG_NLS_CODEPAGE_869 is not set
970# CONFIG_NLS_CODEPAGE_936 is not set
971# CONFIG_NLS_CODEPAGE_950 is not set
972# CONFIG_NLS_CODEPAGE_932 is not set
973# CONFIG_NLS_CODEPAGE_949 is not set
974# CONFIG_NLS_CODEPAGE_874 is not set
975# CONFIG_NLS_ISO8859_8 is not set
976# CONFIG_NLS_CODEPAGE_1250 is not set
977# CONFIG_NLS_CODEPAGE_1251 is not set
978# CONFIG_NLS_ASCII is not set
979# CONFIG_NLS_ISO8859_1 is not set
980# CONFIG_NLS_ISO8859_2 is not set
981# CONFIG_NLS_ISO8859_3 is not set
982# CONFIG_NLS_ISO8859_4 is not set
983# CONFIG_NLS_ISO8859_5 is not set
984# CONFIG_NLS_ISO8859_6 is not set
985# CONFIG_NLS_ISO8859_7 is not set
986# CONFIG_NLS_ISO8859_9 is not set
987# CONFIG_NLS_ISO8859_13 is not set
988# CONFIG_NLS_ISO8859_14 is not set
989# CONFIG_NLS_ISO8859_15 is not set
990# CONFIG_NLS_KOI8_R is not set
991# CONFIG_NLS_KOI8_U is not set
992# CONFIG_NLS_UTF8 is not set
993# CONFIG_DLM is not set
994
995#
996# Kernel hacking
997#
998CONFIG_PRINTK_TIME=y
999CONFIG_ENABLE_WARN_DEPRECATED=y
1000CONFIG_ENABLE_MUST_CHECK=y
1001CONFIG_FRAME_WARN=1024
1002# CONFIG_MAGIC_SYSRQ is not set
1003# CONFIG_UNUSED_SYMBOLS is not set
1004# CONFIG_DEBUG_FS is not set
1005# CONFIG_HEADERS_CHECK is not set
1006CONFIG_DEBUG_KERNEL=y
1007# CONFIG_DEBUG_SHIRQ is not set
1008CONFIG_DETECT_SOFTLOCKUP=y
1009# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
1010CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
1011CONFIG_DETECT_HUNG_TASK=y
1012# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
1013CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
1014CONFIG_SCHED_DEBUG=y
1015# CONFIG_SCHEDSTATS is not set
1016# CONFIG_TIMER_STATS is not set
1017# CONFIG_DEBUG_OBJECTS is not set
1018# CONFIG_SLUB_DEBUG_ON is not set
1019# CONFIG_SLUB_STATS is not set
1020# CONFIG_DEBUG_KMEMLEAK is not set
1021# CONFIG_DEBUG_RT_MUTEXES is not set
1022# CONFIG_RT_MUTEX_TESTER is not set
1023# CONFIG_DEBUG_SPINLOCK is not set
1024# CONFIG_DEBUG_MUTEXES is not set
1025# CONFIG_DEBUG_LOCK_ALLOC is not set
1026# CONFIG_PROVE_LOCKING is not set
1027# CONFIG_LOCK_STAT is not set
1028# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1029# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1030# CONFIG_DEBUG_KOBJECT is not set
1031CONFIG_DEBUG_BUGVERBOSE=y
1032CONFIG_DEBUG_INFO=y
1033# CONFIG_DEBUG_VM is not set
1034# CONFIG_DEBUG_WRITECOUNT is not set
1035CONFIG_DEBUG_MEMORY_INIT=y
1036# CONFIG_DEBUG_LIST is not set
1037# CONFIG_DEBUG_SG is not set
1038# CONFIG_DEBUG_NOTIFIERS is not set
1039# CONFIG_BOOT_PRINTK_DELAY is not set
1040# CONFIG_RCU_TORTURE_TEST is not set
1041# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1042# CONFIG_BACKTRACE_SELF_TEST is not set
1043# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
1044# CONFIG_FAULT_INJECTION is not set
1045# CONFIG_LATENCYTOP is not set
1046# CONFIG_SYSCTL_SYSCALL_CHECK is not set
1047# CONFIG_PAGE_POISONING is not set
1048CONFIG_HAVE_FUNCTION_TRACER=y
1049CONFIG_TRACING_SUPPORT=y
1050CONFIG_FTRACE=y
1051# CONFIG_FUNCTION_TRACER is not set
1052# CONFIG_IRQSOFF_TRACER is not set
1053# CONFIG_SCHED_TRACER is not set
1054# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1055# CONFIG_BOOT_TRACER is not set
1056CONFIG_BRANCH_PROFILE_NONE=y
1057# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1058# CONFIG_PROFILE_ALL_BRANCHES is not set
1059# CONFIG_STACK_TRACER is not set
1060# CONFIG_KMEMTRACE is not set
1061# CONFIG_WORKQUEUE_TRACER is not set
1062# CONFIG_BLK_DEV_IO_TRACE is not set
1063# CONFIG_SAMPLES is not set
1064CONFIG_HAVE_ARCH_KGDB=y
1065# CONFIG_KGDB is not set
1066CONFIG_ARM_UNWIND=y
1067CONFIG_DEBUG_USER=y
1068CONFIG_DEBUG_ERRORS=y
1069# CONFIG_DEBUG_STACK_USAGE is not set
1070# CONFIG_DEBUG_LL is not set
1071
1072#
1073# Security options
1074#
1075# CONFIG_KEYS is not set
1076# CONFIG_SECURITY is not set
1077# CONFIG_SECURITYFS is not set
1078# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1079# CONFIG_CRYPTO is not set
1080# CONFIG_BINARY_PRINTF is not set
1081
1082#
1083# Library routines
1084#
1085CONFIG_BITREVERSE=y
1086CONFIG_GENERIC_FIND_LAST_BIT=y
1087CONFIG_CRC_CCITT=y
1088# CONFIG_CRC16 is not set
1089# CONFIG_CRC_T10DIF is not set
1090# CONFIG_CRC_ITU_T is not set
1091CONFIG_CRC32=y
1092# CONFIG_CRC7 is not set
1093# CONFIG_LIBCRC32C is not set
1094CONFIG_ZLIB_INFLATE=y
1095CONFIG_ZLIB_DEFLATE=y
1096CONFIG_LZO_COMPRESS=y
1097CONFIG_LZO_DECOMPRESS=y
1098CONFIG_DECOMPRESS_GZIP=y
1099CONFIG_DECOMPRESS_BZIP2=y
1100CONFIG_DECOMPRESS_LZMA=y
1101CONFIG_HAS_IOMEM=y
1102CONFIG_HAS_IOPORT=y
1103CONFIG_HAS_DMA=y
1104CONFIG_NLATTR=y
diff --git a/arch/arm/configs/nhk8815_defconfig b/arch/arm/configs/nhk8815_defconfig
index 9bb45b932f04..600cb270f2bf 100644
--- a/arch/arm/configs/nhk8815_defconfig
+++ b/arch/arm/configs/nhk8815_defconfig
@@ -498,7 +498,7 @@ CONFIG_MTD_CFI_I2=y
498# CONFIG_MTD_DOC2001PLUS is not set 498# CONFIG_MTD_DOC2001PLUS is not set
499CONFIG_MTD_NAND=y 499CONFIG_MTD_NAND=y
500CONFIG_MTD_NAND_VERIFY_WRITE=y 500CONFIG_MTD_NAND_VERIFY_WRITE=y
501# CONFIG_MTD_NAND_ECC_SMC is not set 501CONFIG_MTD_NAND_ECC_SMC=y
502# CONFIG_MTD_NAND_MUSEUM_IDS is not set 502# CONFIG_MTD_NAND_MUSEUM_IDS is not set
503# CONFIG_MTD_NAND_GPIO is not set 503# CONFIG_MTD_NAND_GPIO is not set
504CONFIG_MTD_NAND_IDS=y 504CONFIG_MTD_NAND_IDS=y
diff --git a/arch/arm/configs/omap3_beagle_defconfig b/arch/arm/configs/omap3_beagle_defconfig
index 4c6fb7e959df..357d4021e2d0 100644
--- a/arch/arm/configs/omap3_beagle_defconfig
+++ b/arch/arm/configs/omap3_beagle_defconfig
@@ -128,6 +128,7 @@ CONFIG_DEFAULT_AS=y
128# CONFIG_DEFAULT_NOOP is not set 128# CONFIG_DEFAULT_NOOP is not set
129CONFIG_DEFAULT_IOSCHED="anticipatory" 129CONFIG_DEFAULT_IOSCHED="anticipatory"
130CONFIG_CLASSIC_RCU=y 130CONFIG_CLASSIC_RCU=y
131CONFIG_FREEZER=y
131 132
132# 133#
133# System Type 134# System Type
@@ -236,6 +237,7 @@ CONFIG_ARM_THUMB=y
236# CONFIG_CPU_BPREDICT_DISABLE is not set 237# CONFIG_CPU_BPREDICT_DISABLE is not set
237CONFIG_HAS_TLS_REG=y 238CONFIG_HAS_TLS_REG=y
238# CONFIG_OUTER_CACHE is not set 239# CONFIG_OUTER_CACHE is not set
240CONFIG_COMMON_CLKDEV=y
239 241
240# 242#
241# Bus support 243# Bus support
@@ -317,7 +319,12 @@ CONFIG_BINFMT_MISC=y
317# 319#
318# Power management options 320# Power management options
319# 321#
320# CONFIG_PM is not set 322CONFIG_PM=y
323# CONFIG_PM_DEBUG is not set
324CONFIG_PM_SLEEP=y
325CONFIG_SUSPEND=y
326CONFIG_SUSPEND_FREEZER=y
327# CONFIG_APM_EMULATION is not set
321CONFIG_ARCH_SUSPEND_POSSIBLE=y 328CONFIG_ARCH_SUSPEND_POSSIBLE=y
322CONFIG_NET=y 329CONFIG_NET=y
323 330
@@ -713,6 +720,7 @@ CONFIG_GPIOLIB=y
713# CONFIG_GPIO_MAX732X is not set 720# CONFIG_GPIO_MAX732X is not set
714# CONFIG_GPIO_PCA953X is not set 721# CONFIG_GPIO_PCA953X is not set
715# CONFIG_GPIO_PCF857X is not set 722# CONFIG_GPIO_PCF857X is not set
723CONFIG_GPIO_TWL4030=y
716 724
717# 725#
718# PCI GPIO expanders: 726# PCI GPIO expanders:
@@ -741,6 +749,7 @@ CONFIG_SSB_POSSIBLE=y
741# CONFIG_MFD_SM501 is not set 749# CONFIG_MFD_SM501 is not set
742# CONFIG_HTC_EGPIO is not set 750# CONFIG_HTC_EGPIO is not set
743# CONFIG_HTC_PASIC3 is not set 751# CONFIG_HTC_PASIC3 is not set
752CONFIG_TWL4030_CORE=y
744# CONFIG_UCB1400_CORE is not set 753# CONFIG_UCB1400_CORE is not set
745# CONFIG_MFD_TMIO is not set 754# CONFIG_MFD_TMIO is not set
746# CONFIG_MFD_T7L66XB is not set 755# CONFIG_MFD_T7L66XB is not set
@@ -769,7 +778,33 @@ CONFIG_DAB=y
769# 778#
770# CONFIG_VGASTATE is not set 779# CONFIG_VGASTATE is not set
771# CONFIG_VIDEO_OUTPUT_CONTROL is not set 780# CONFIG_VIDEO_OUTPUT_CONTROL is not set
772# CONFIG_FB is not set 781CONFIG_FB=y
782# CONFIG_FIRMWARE_EDID is not set
783# CONFIG_FB_DDC is not set
784CONFIG_FB_CFB_FILLRECT=y
785CONFIG_FB_CFB_COPYAREA=y
786CONFIG_FB_CFB_IMAGEBLIT=y
787# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
788# CONFIG_FB_SYS_FILLRECT is not set
789# CONFIG_FB_SYS_COPYAREA is not set
790# CONFIG_FB_SYS_IMAGEBLIT is not set
791# CONFIG_FB_FOREIGN_ENDIAN is not set
792# CONFIG_FB_SYS_FOPS is not set
793# CONFIG_FB_SVGALIB is not set
794# CONFIG_FB_MACMODES is not set
795# CONFIG_FB_BACKLIGHT is not set
796# CONFIG_FB_MODE_HELPERS is not set
797# CONFIG_FB_TILEBLITTING is not set
798
799#
800# Frame buffer hardware drivers
801#
802# CONFIG_FB_S1D13XXX is not set
803# CONFIG_FB_VIRTUAL is not set
804CONFIG_FB_OMAP=y
805# CONFIG_FB_OMAP_LCDC_EXTERNAL is not set
806# CONFIG_FB_OMAP_BOOTLOADER_INIT is not set
807CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE=2
773# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 808# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
774 809
775# 810#
@@ -782,12 +817,31 @@ CONFIG_DAB=y
782# 817#
783# CONFIG_VGA_CONSOLE is not set 818# CONFIG_VGA_CONSOLE is not set
784CONFIG_DUMMY_CONSOLE=y 819CONFIG_DUMMY_CONSOLE=y
820CONFIG_FRAMEBUFFER_CONSOLE=y
821# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
822CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
823CONFIG_FONTS=y
824CONFIG_FONT_8x8=y
825CONFIG_FONT_8x16=y
826# CONFIG_FONT_6x11 is not set
827# CONFIG_FONT_7x14 is not set
828# CONFIG_FONT_PEARL_8x8 is not set
829# CONFIG_FONT_ACORN_8x8 is not set
830# CONFIG_FONT_MINI_4x6 is not set
831# CONFIG_FONT_SUN8x16 is not set
832# CONFIG_FONT_SUN12x22 is not set
833# CONFIG_FONT_10x18 is not set
834# CONFIG_LOGO is not set
835
836#
837# Sound
838#
785# CONFIG_SOUND is not set 839# CONFIG_SOUND is not set
786# CONFIG_HID_SUPPORT is not set 840# CONFIG_HID_SUPPORT is not set
787CONFIG_USB_SUPPORT=y 841CONFIG_USB_SUPPORT=y
788CONFIG_USB_ARCH_HAS_HCD=y 842CONFIG_USB_ARCH_HAS_HCD=y
789CONFIG_USB_ARCH_HAS_OHCI=y 843CONFIG_USB_ARCH_HAS_OHCI=y
790# CONFIG_USB_ARCH_HAS_EHCI is not set 844CONFIG_USB_ARCH_HAS_EHCI=y
791CONFIG_USB=y 845CONFIG_USB=y
792# CONFIG_USB_DEBUG is not set 846# CONFIG_USB_DEBUG is not set
793# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set 847# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
@@ -798,7 +852,8 @@ CONFIG_USB=y
798CONFIG_USB_DEVICEFS=y 852CONFIG_USB_DEVICEFS=y
799CONFIG_USB_DEVICE_CLASS=y 853CONFIG_USB_DEVICE_CLASS=y
800# CONFIG_USB_DYNAMIC_MINORS is not set 854# CONFIG_USB_DYNAMIC_MINORS is not set
801# CONFIG_USB_OTG is not set 855CONFIG_USB_SUSPEND=y
856CONFIG_USB_OTG=y
802# CONFIG_USB_OTG_WHITELIST is not set 857# CONFIG_USB_OTG_WHITELIST is not set
803# CONFIG_USB_OTG_BLACKLIST_HUB is not set 858# CONFIG_USB_OTG_BLACKLIST_HUB is not set
804CONFIG_USB_MON=y 859CONFIG_USB_MON=y
@@ -806,6 +861,8 @@ CONFIG_USB_MON=y
806# 861#
807# USB Host Controller Drivers 862# USB Host Controller Drivers
808# 863#
864CONFIG_USB_EHCI_HCD=y
865CONFIG_USB_EHCI_ROOT_HUB_TT=y
809# CONFIG_USB_C67X00_HCD is not set 866# CONFIG_USB_C67X00_HCD is not set
810# CONFIG_USB_ISP116X_HCD is not set 867# CONFIG_USB_ISP116X_HCD is not set
811# CONFIG_USB_ISP1760_HCD is not set 868# CONFIG_USB_ISP1760_HCD is not set
@@ -818,10 +875,10 @@ CONFIG_USB_MUSB_SOC=y
818# 875#
819# OMAP 343x high speed USB support 876# OMAP 343x high speed USB support
820# 877#
821CONFIG_USB_MUSB_HOST=y 878# CONFIG_USB_MUSB_HOST is not set
822# CONFIG_USB_MUSB_PERIPHERAL is not set 879# CONFIG_USB_MUSB_PERIPHERAL is not set
823# CONFIG_USB_MUSB_OTG is not set 880CONFIG_USB_MUSB_OTG=y
824# CONFIG_USB_GADGET_MUSB_HDRC is not set 881CONFIG_USB_GADGET_MUSB_HDRC=y
825CONFIG_USB_MUSB_HDRC_HCD=y 882CONFIG_USB_MUSB_HDRC_HCD=y
826# CONFIG_MUSB_PIO_ONLY is not set 883# CONFIG_MUSB_PIO_ONLY is not set
827CONFIG_USB_INVENTRA_DMA=y 884CONFIG_USB_INVENTRA_DMA=y
@@ -887,8 +944,8 @@ CONFIG_USB_GADGET_SELECTED=y
887# CONFIG_USB_GADGET_FSL_USB2 is not set 944# CONFIG_USB_GADGET_FSL_USB2 is not set
888# CONFIG_USB_GADGET_NET2280 is not set 945# CONFIG_USB_GADGET_NET2280 is not set
889# CONFIG_USB_GADGET_PXA25X is not set 946# CONFIG_USB_GADGET_PXA25X is not set
890CONFIG_USB_GADGET_M66592=y 947# CONFIG_USB_GADGET_M66592 is not set
891CONFIG_USB_M66592=y 948# CONFIG_USB_M66592 is not set
892# CONFIG_USB_GADGET_PXA27X is not set 949# CONFIG_USB_GADGET_PXA27X is not set
893# CONFIG_USB_GADGET_GOKU is not set 950# CONFIG_USB_GADGET_GOKU is not set
894# CONFIG_USB_GADGET_LH7A40X is not set 951# CONFIG_USB_GADGET_LH7A40X is not set
@@ -906,6 +963,15 @@ CONFIG_USB_ETH_RNDIS=y
906# CONFIG_USB_MIDI_GADGET is not set 963# CONFIG_USB_MIDI_GADGET is not set
907# CONFIG_USB_G_PRINTER is not set 964# CONFIG_USB_G_PRINTER is not set
908# CONFIG_USB_CDC_COMPOSITE is not set 965# CONFIG_USB_CDC_COMPOSITE is not set
966
967#
968# OTG and related infrastructure
969#
970CONFIG_USB_OTG_UTILS=y
971# CONFIG_USB_GPIO_VBUS is not set
972# CONFIG_ISP1301_OMAP is not set
973CONFIG_TWL4030_USB=y
974# CONFIG_NOP_USB_XCEIV is not set
909CONFIG_MMC=y 975CONFIG_MMC=y
910# CONFIG_MMC_DEBUG is not set 976# CONFIG_MMC_DEBUG is not set
911# CONFIG_MMC_UNSAFE_RESUME is not set 977# CONFIG_MMC_UNSAFE_RESUME is not set
@@ -923,6 +989,7 @@ CONFIG_MMC_BLOCK_BOUNCE=y
923# 989#
924# CONFIG_MMC_SDHCI is not set 990# CONFIG_MMC_SDHCI is not set
925# CONFIG_MMC_OMAP is not set 991# CONFIG_MMC_OMAP is not set
992CONFIG_MMC_OMAP_HS=y
926# CONFIG_MEMSTICK is not set 993# CONFIG_MEMSTICK is not set
927# CONFIG_ACCESSIBILITY is not set 994# CONFIG_ACCESSIBILITY is not set
928# CONFIG_NEW_LEDS is not set 995# CONFIG_NEW_LEDS is not set
@@ -981,10 +1048,11 @@ CONFIG_RTC_INTF_DEV=y
981# 1048#
982# Voltage and Current regulators 1049# Voltage and Current regulators
983# 1050#
984# CONFIG_REGULATOR is not set 1051CONFIG_REGULATOR=y
985# CONFIG_REGULATOR_FIXED_VOLTAGE is not set 1052# CONFIG_REGULATOR_FIXED_VOLTAGE is not set
986# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set 1053# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
987# CONFIG_REGULATOR_BQ24022 is not set 1054# CONFIG_REGULATOR_BQ24022 is not set
1055CONFIG_REGULATOR_TWL4030=y
988# CONFIG_UIO is not set 1056# CONFIG_UIO is not set
989 1057
990# 1058#
diff --git a/arch/arm/configs/omap_3430sdp_defconfig b/arch/arm/configs/omap_3430sdp_defconfig
index 8fb918d9ba65..8a4a7e2ba87b 100644
--- a/arch/arm/configs/omap_3430sdp_defconfig
+++ b/arch/arm/configs/omap_3430sdp_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.29-rc8 3# Linux kernel version: 2.6.30-omap1
4# Fri Mar 13 14:17:01 2009 4# Tue Jun 23 10:36:45 2009
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_SYS_SUPPORTS_APM_EMULATION=y 7CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -197,9 +197,9 @@ CONFIG_OMAP_MCBSP=y
197CONFIG_OMAP_32K_TIMER=y 197CONFIG_OMAP_32K_TIMER=y
198CONFIG_OMAP_32K_TIMER_HZ=128 198CONFIG_OMAP_32K_TIMER_HZ=128
199CONFIG_OMAP_DM_TIMER=y 199CONFIG_OMAP_DM_TIMER=y
200# CONFIG_OMAP_LL_DEBUG_UART1 is not set 200CONFIG_OMAP_LL_DEBUG_UART1=y
201# CONFIG_OMAP_LL_DEBUG_UART2 is not set 201# CONFIG_OMAP_LL_DEBUG_UART2 is not set
202CONFIG_OMAP_LL_DEBUG_UART3=y 202# CONFIG_OMAP_LL_DEBUG_UART3 is not set
203CONFIG_OMAP_SERIAL_WAKE=y 203CONFIG_OMAP_SERIAL_WAKE=y
204CONFIG_ARCH_OMAP34XX=y 204CONFIG_ARCH_OMAP34XX=y
205CONFIG_ARCH_OMAP3430=y 205CONFIG_ARCH_OMAP3430=y
@@ -207,10 +207,10 @@ CONFIG_ARCH_OMAP3430=y
207# 207#
208# OMAP Board Type 208# OMAP Board Type
209# 209#
210CONFIG_MACH_OMAP3_BEAGLE=y 210# CONFIG_MACH_OMAP3_BEAGLE is not set
211CONFIG_MACH_OMAP_LDP=y 211# CONFIG_MACH_OMAP_LDP is not set
212CONFIG_MACH_OVERO=y 212# CONFIG_MACH_OVERO is not set
213CONFIG_MACH_OMAP3_PANDORA=y 213# CONFIG_MACH_OMAP3_PANDORA is not set
214CONFIG_MACH_OMAP_3430SDP=y 214CONFIG_MACH_OMAP_3430SDP=y
215 215
216# 216#
@@ -950,7 +950,7 @@ CONFIG_SPI_OMAP24XX=y
950# CONFIG_SPI_TLE62X0 is not set 950# CONFIG_SPI_TLE62X0 is not set
951CONFIG_ARCH_REQUIRE_GPIOLIB=y 951CONFIG_ARCH_REQUIRE_GPIOLIB=y
952CONFIG_GPIOLIB=y 952CONFIG_GPIOLIB=y
953CONFIG_DEBUG_GPIO=y 953# CONFIG_DEBUG_GPIO is not set
954CONFIG_GPIO_SYSFS=y 954CONFIG_GPIO_SYSFS=y
955 955
956# 956#
@@ -1313,8 +1313,33 @@ CONFIG_DVB_ISL6421=m
1313# Graphics support 1313# Graphics support
1314# 1314#
1315# CONFIG_VGASTATE is not set 1315# CONFIG_VGASTATE is not set
1316# CONFIG_VIDEO_OUTPUT_CONTROL is not set 1316CONFIG_FB=y
1317# CONFIG_FB is not set 1317# CONFIG_FIRMWARE_EDID is not set
1318# CONFIG_FB_DDC is not set
1319CONFIG_FB_CFB_FILLRECT=y
1320CONFIG_FB_CFB_COPYAREA=y
1321CONFIG_FB_CFB_IMAGEBLIT=y
1322# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
1323# CONFIG_FB_SYS_FILLRECT is not set
1324# CONFIG_FB_SYS_COPYAREA is not set
1325# CONFIG_FB_SYS_IMAGEBLIT is not set
1326# CONFIG_FB_FOREIGN_ENDIAN is not set
1327# CONFIG_FB_SYS_FOPS is not set
1328# CONFIG_FB_SVGALIB is not set
1329# CONFIG_FB_MACMODES is not set
1330# CONFIG_FB_BACKLIGHT is not set
1331# CONFIG_FB_MODE_HELPERS is not set
1332# CONFIG_FB_TILEBLITTING is not set
1333
1334#
1335# Frame buffer hardware drivers
1336#
1337# CONFIG_FB_S1D13XXX is not set
1338# CONFIG_FB_VIRTUAL is not set
1339CONFIG_FB_OMAP=y
1340# CONFIG_FB_OMAP_LCDC_EXTERNAL is not set
1341# CONFIG_FB_OMAP_BOOTLOADER_INIT is not set
1342CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE=2
1318# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 1343# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1319 1344
1320# 1345#
@@ -1331,6 +1356,16 @@ CONFIG_DISPLAY_SUPPORT=y
1331# 1356#
1332# CONFIG_VGA_CONSOLE is not set 1357# CONFIG_VGA_CONSOLE is not set
1333CONFIG_DUMMY_CONSOLE=y 1358CONFIG_DUMMY_CONSOLE=y
1359CONFIG_FRAMEBUFFER_CONSOLE=y
1360# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
1361# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
1362# CONFIG_FONTS is not set
1363CONFIG_FONT_8x8=y
1364CONFIG_FONT_8x16=y
1365CONFIG_LOGO=y
1366CONFIG_LOGO_LINUX_MONO=y
1367CONFIG_LOGO_LINUX_VGA16=y
1368CONFIG_LOGO_LINUX_CLUT224=y
1334CONFIG_SOUND=y 1369CONFIG_SOUND=y
1335CONFIG_SOUND_OSS_CORE=y 1370CONFIG_SOUND_OSS_CORE=y
1336CONFIG_SND=y 1371CONFIG_SND=y
@@ -1370,7 +1405,7 @@ CONFIG_SND_OMAP_SOC=y
1370CONFIG_SND_OMAP_SOC_MCBSP=y 1405CONFIG_SND_OMAP_SOC_MCBSP=y
1371# CONFIG_SND_OMAP_SOC_OVERO is not set 1406# CONFIG_SND_OMAP_SOC_OVERO is not set
1372CONFIG_SND_OMAP_SOC_SDP3430=y 1407CONFIG_SND_OMAP_SOC_SDP3430=y
1373CONFIG_SND_OMAP_SOC_OMAP3_PANDORA=y 1408# CONFIG_SND_OMAP_SOC_OMAP3_PANDORA is not set
1374CONFIG_SND_SOC_I2C_AND_SPI=y 1409CONFIG_SND_SOC_I2C_AND_SPI=y
1375# CONFIG_SND_SOC_ALL_CODECS is not set 1410# CONFIG_SND_SOC_ALL_CODECS is not set
1376CONFIG_SND_SOC_TWL4030=y 1411CONFIG_SND_SOC_TWL4030=y
diff --git a/arch/arm/configs/omap_ldp_defconfig b/arch/arm/configs/omap_ldp_defconfig
index 679a4a3e265e..b9c48919a68c 100644
--- a/arch/arm/configs/omap_ldp_defconfig
+++ b/arch/arm/configs/omap_ldp_defconfig
@@ -690,6 +690,7 @@ CONFIG_GPIOLIB=y
690# CONFIG_GPIO_MAX732X is not set 690# CONFIG_GPIO_MAX732X is not set
691# CONFIG_GPIO_PCA953X is not set 691# CONFIG_GPIO_PCA953X is not set
692# CONFIG_GPIO_PCF857X is not set 692# CONFIG_GPIO_PCF857X is not set
693CONFIG_GPIO_TWL4030=y
693 694
694# 695#
695# PCI GPIO expanders: 696# PCI GPIO expanders:
@@ -742,6 +743,7 @@ CONFIG_SSB_POSSIBLE=y
742# CONFIG_MFD_SM501 is not set 743# CONFIG_MFD_SM501 is not set
743# CONFIG_HTC_EGPIO is not set 744# CONFIG_HTC_EGPIO is not set
744# CONFIG_HTC_PASIC3 is not set 745# CONFIG_HTC_PASIC3 is not set
746CONFIG_TWL4030_CORE=y
745# CONFIG_MFD_TMIO is not set 747# CONFIG_MFD_TMIO is not set
746# CONFIG_MFD_T7L66XB is not set 748# CONFIG_MFD_T7L66XB is not set
747# CONFIG_MFD_TC6387XB is not set 749# CONFIG_MFD_TC6387XB is not set
@@ -767,8 +769,46 @@ CONFIG_DAB=y
767# 769#
768# CONFIG_VGASTATE is not set 770# CONFIG_VGASTATE is not set
769CONFIG_VIDEO_OUTPUT_CONTROL=m 771CONFIG_VIDEO_OUTPUT_CONTROL=m
770# CONFIG_FB is not set 772CONFIG_FB=y
771# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 773CONFIG_FIRMWARE_EDID=y
774# CONFIG_FB_DDC is not set
775# CONFIG_FB_BOOT_VESA_SUPPORT is not set
776CONFIG_FB_CFB_FILLRECT=y
777CONFIG_FB_CFB_COPYAREA=y
778CONFIG_FB_CFB_IMAGEBLIT=y
779# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
780# CONFIG_FB_SYS_FILLRECT is not set
781# CONFIG_FB_SYS_COPYAREA is not set
782# CONFIG_FB_SYS_IMAGEBLIT is not set
783# CONFIG_FB_FOREIGN_ENDIAN is not set
784# CONFIG_FB_SYS_FOPS is not set
785# CONFIG_FB_SVGALIB is not set
786# CONFIG_FB_MACMODES is not set
787# CONFIG_FB_BACKLIGHT is not set
788CONFIG_FB_MODE_HELPERS=y
789CONFIG_FB_TILEBLITTING=y
790
791#
792# Frame buffer hardware drivers
793#
794# CONFIG_FB_S1D13XXX is not set
795# CONFIG_FB_VIRTUAL is not set
796# CONFIG_FB_METRONOME is not set
797CONFIG_FB_OMAP=y
798CONFIG_FB_OMAP_LCD_VGA=y
799# CONFIG_FB_OMAP_LCDC_EXTERNAL is not set
800# CONFIG_FB_OMAP_BOOTLOADER_INIT is not set
801CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE=4
802CONFIG_BACKLIGHT_LCD_SUPPORT=y
803CONFIG_LCD_CLASS_DEVICE=y
804# CONFIG_LCD_LTV350QV is not set
805# CONFIG_LCD_ILI9320 is not set
806# CONFIG_LCD_TDO24M is not set
807# CONFIG_LCD_VGG2432A4 is not set
808CONFIG_LCD_PLATFORM=y
809CONFIG_BACKLIGHT_CLASS_DEVICE=y
810# CONFIG_BACKLIGHT_CORGI is not set
811# CONFIG_BACKLIGHT_GENERIC is not set
772 812
773# 813#
774# Display device support 814# Display device support
@@ -780,6 +820,16 @@ CONFIG_VIDEO_OUTPUT_CONTROL=m
780# 820#
781# CONFIG_VGA_CONSOLE is not set 821# CONFIG_VGA_CONSOLE is not set
782CONFIG_DUMMY_CONSOLE=y 822CONFIG_DUMMY_CONSOLE=y
823CONFIG_FRAMEBUFFER_CONSOLE=y
824# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
825# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
826# CONFIG_FONTS is not set
827CONFIG_FONT_8x8=y
828CONFIG_FONT_8x16=y
829CONFIG_LOGO=y
830CONFIG_LOGO_LINUX_MONO=y
831CONFIG_LOGO_LINUX_VGA16=y
832CONFIG_LOGO_LINUX_CLUT224=y
783CONFIG_SOUND=y 833CONFIG_SOUND=y
784CONFIG_SND=y 834CONFIG_SND=y
785# CONFIG_SND_SEQUENCER is not set 835# CONFIG_SND_SEQUENCER is not set
diff --git a/arch/arm/configs/omap_zoom2_defconfig b/arch/arm/configs/omap_zoom2_defconfig
index 213fe9c5eaae..f1739fae7ed4 100644
--- a/arch/arm/configs/omap_zoom2_defconfig
+++ b/arch/arm/configs/omap_zoom2_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.27-rc5 3# Linux kernel version: 2.6.30-omap1
4# Fri Oct 10 11:49:41 2008 4# Fri Jun 12 17:25:46 2009
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_SYS_SUPPORTS_APM_EMULATION=y 7CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -22,8 +22,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
22# CONFIG_ARCH_HAS_ILOG2_U64 is not set 22# CONFIG_ARCH_HAS_ILOG2_U64 is not set
23CONFIG_GENERIC_HWEIGHT=y 23CONFIG_GENERIC_HWEIGHT=y
24CONFIG_GENERIC_CALIBRATE_DELAY=y 24CONFIG_GENERIC_CALIBRATE_DELAY=y
25CONFIG_ARCH_SUPPORTS_AOUT=y
26CONFIG_ZONE_DMA=y
27CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 25CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
28CONFIG_VECTORS_BASE=0xffff0000 26CONFIG_VECTORS_BASE=0xffff0000
29CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 27CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -39,44 +37,61 @@ CONFIG_LOCALVERSION_AUTO=y
39CONFIG_SWAP=y 37CONFIG_SWAP=y
40CONFIG_SYSVIPC=y 38CONFIG_SYSVIPC=y
41CONFIG_SYSVIPC_SYSCTL=y 39CONFIG_SYSVIPC_SYSCTL=y
40# CONFIG_POSIX_MQUEUE is not set
42CONFIG_BSD_PROCESS_ACCT=y 41CONFIG_BSD_PROCESS_ACCT=y
43# CONFIG_BSD_PROCESS_ACCT_V3 is not set 42# CONFIG_BSD_PROCESS_ACCT_V3 is not set
43# CONFIG_TASKSTATS is not set
44# CONFIG_AUDIT is not set
45
46#
47# RCU Subsystem
48#
49CONFIG_CLASSIC_RCU=y
50# CONFIG_TREE_RCU is not set
51# CONFIG_PREEMPT_RCU is not set
52# CONFIG_TREE_RCU_TRACE is not set
53# CONFIG_PREEMPT_RCU_TRACE is not set
44# CONFIG_IKCONFIG is not set 54# CONFIG_IKCONFIG is not set
45CONFIG_LOG_BUF_SHIFT=14 55CONFIG_LOG_BUF_SHIFT=14
46# CONFIG_CGROUPS is not set
47CONFIG_GROUP_SCHED=y 56CONFIG_GROUP_SCHED=y
48CONFIG_FAIR_GROUP_SCHED=y 57CONFIG_FAIR_GROUP_SCHED=y
49# CONFIG_RT_GROUP_SCHED is not set 58# CONFIG_RT_GROUP_SCHED is not set
50CONFIG_USER_SCHED=y 59CONFIG_USER_SCHED=y
51# CONFIG_CGROUP_SCHED is not set 60# CONFIG_CGROUP_SCHED is not set
61# CONFIG_CGROUPS is not set
52CONFIG_SYSFS_DEPRECATED=y 62CONFIG_SYSFS_DEPRECATED=y
53CONFIG_SYSFS_DEPRECATED_V2=y 63CONFIG_SYSFS_DEPRECATED_V2=y
54# CONFIG_RELAY is not set 64# CONFIG_RELAY is not set
55# CONFIG_NAMESPACES is not set 65# CONFIG_NAMESPACES is not set
56CONFIG_BLK_DEV_INITRD=y 66CONFIG_BLK_DEV_INITRD=y
57CONFIG_INITRAMFS_SOURCE="" 67CONFIG_INITRAMFS_SOURCE=""
68CONFIG_RD_GZIP=y
69# CONFIG_RD_BZIP2 is not set
70# CONFIG_RD_LZMA is not set
58CONFIG_CC_OPTIMIZE_FOR_SIZE=y 71CONFIG_CC_OPTIMIZE_FOR_SIZE=y
59CONFIG_SYSCTL=y 72CONFIG_SYSCTL=y
73CONFIG_ANON_INODES=y
60CONFIG_EMBEDDED=y 74CONFIG_EMBEDDED=y
61CONFIG_UID16=y 75CONFIG_UID16=y
62# CONFIG_SYSCTL_SYSCALL is not set 76# CONFIG_SYSCTL_SYSCALL is not set
63CONFIG_KALLSYMS=y 77CONFIG_KALLSYMS=y
64# CONFIG_KALLSYMS_ALL is not set 78# CONFIG_KALLSYMS_ALL is not set
65CONFIG_KALLSYMS_EXTRA_PASS=y 79CONFIG_KALLSYMS_EXTRA_PASS=y
80# CONFIG_STRIP_ASM_SYMS is not set
66CONFIG_HOTPLUG=y 81CONFIG_HOTPLUG=y
67CONFIG_PRINTK=y 82CONFIG_PRINTK=y
68CONFIG_BUG=y 83CONFIG_BUG=y
69CONFIG_ELF_CORE=y 84CONFIG_ELF_CORE=y
70CONFIG_COMPAT_BRK=y
71CONFIG_BASE_FULL=y 85CONFIG_BASE_FULL=y
72CONFIG_FUTEX=y 86CONFIG_FUTEX=y
73CONFIG_ANON_INODES=y
74CONFIG_EPOLL=y 87CONFIG_EPOLL=y
75CONFIG_SIGNALFD=y 88CONFIG_SIGNALFD=y
76CONFIG_TIMERFD=y 89CONFIG_TIMERFD=y
77CONFIG_EVENTFD=y 90CONFIG_EVENTFD=y
78CONFIG_SHMEM=y 91CONFIG_SHMEM=y
92CONFIG_AIO=y
79CONFIG_VM_EVENT_COUNTERS=y 93CONFIG_VM_EVENT_COUNTERS=y
94CONFIG_COMPAT_BRK=y
80CONFIG_SLAB=y 95CONFIG_SLAB=y
81# CONFIG_SLUB is not set 96# CONFIG_SLUB is not set
82# CONFIG_SLOB is not set 97# CONFIG_SLOB is not set
@@ -84,19 +99,13 @@ CONFIG_SLAB=y
84# CONFIG_MARKERS is not set 99# CONFIG_MARKERS is not set
85CONFIG_HAVE_OPROFILE=y 100CONFIG_HAVE_OPROFILE=y
86# CONFIG_KPROBES is not set 101# CONFIG_KPROBES is not set
87# CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set
88# CONFIG_HAVE_IOREMAP_PROT is not set
89CONFIG_HAVE_KPROBES=y 102CONFIG_HAVE_KPROBES=y
90CONFIG_HAVE_KRETPROBES=y 103CONFIG_HAVE_KRETPROBES=y
91# CONFIG_HAVE_ARCH_TRACEHOOK is not set
92# CONFIG_HAVE_DMA_ATTRS is not set
93# CONFIG_USE_GENERIC_SMP_HELPERS is not set
94CONFIG_HAVE_CLK=y 104CONFIG_HAVE_CLK=y
95CONFIG_PROC_PAGE_MONITOR=y 105# CONFIG_SLOW_WORK is not set
96CONFIG_HAVE_GENERIC_DMA_COHERENT=y 106CONFIG_HAVE_GENERIC_DMA_COHERENT=y
97CONFIG_SLABINFO=y 107CONFIG_SLABINFO=y
98CONFIG_RT_MUTEXES=y 108CONFIG_RT_MUTEXES=y
99# CONFIG_TINY_SHMEM is not set
100CONFIG_BASE_SMALL=0 109CONFIG_BASE_SMALL=0
101CONFIG_MODULES=y 110CONFIG_MODULES=y
102# CONFIG_MODULE_FORCE_LOAD is not set 111# CONFIG_MODULE_FORCE_LOAD is not set
@@ -104,11 +113,8 @@ CONFIG_MODULE_UNLOAD=y
104# CONFIG_MODULE_FORCE_UNLOAD is not set 113# CONFIG_MODULE_FORCE_UNLOAD is not set
105CONFIG_MODVERSIONS=y 114CONFIG_MODVERSIONS=y
106CONFIG_MODULE_SRCVERSION_ALL=y 115CONFIG_MODULE_SRCVERSION_ALL=y
107CONFIG_KMOD=y
108CONFIG_BLOCK=y 116CONFIG_BLOCK=y
109# CONFIG_LBD is not set 117# CONFIG_LBD is not set
110# CONFIG_BLK_DEV_IO_TRACE is not set
111# CONFIG_LSF is not set
112# CONFIG_BLK_DEV_BSG is not set 118# CONFIG_BLK_DEV_BSG is not set
113# CONFIG_BLK_DEV_INTEGRITY is not set 119# CONFIG_BLK_DEV_INTEGRITY is not set
114 120
@@ -124,7 +130,7 @@ CONFIG_DEFAULT_AS=y
124# CONFIG_DEFAULT_CFQ is not set 130# CONFIG_DEFAULT_CFQ is not set
125# CONFIG_DEFAULT_NOOP is not set 131# CONFIG_DEFAULT_NOOP is not set
126CONFIG_DEFAULT_IOSCHED="anticipatory" 132CONFIG_DEFAULT_IOSCHED="anticipatory"
127CONFIG_CLASSIC_RCU=y 133CONFIG_FREEZER=y
128 134
129# 135#
130# System Type 136# System Type
@@ -134,10 +140,10 @@ CONFIG_CLASSIC_RCU=y
134# CONFIG_ARCH_REALVIEW is not set 140# CONFIG_ARCH_REALVIEW is not set
135# CONFIG_ARCH_VERSATILE is not set 141# CONFIG_ARCH_VERSATILE is not set
136# CONFIG_ARCH_AT91 is not set 142# CONFIG_ARCH_AT91 is not set
137# CONFIG_ARCH_CLPS7500 is not set
138# CONFIG_ARCH_CLPS711X is not set 143# CONFIG_ARCH_CLPS711X is not set
139# CONFIG_ARCH_EBSA110 is not set 144# CONFIG_ARCH_EBSA110 is not set
140# CONFIG_ARCH_EP93XX is not set 145# CONFIG_ARCH_EP93XX is not set
146# CONFIG_ARCH_GEMINI is not set
141# CONFIG_ARCH_FOOTBRIDGE is not set 147# CONFIG_ARCH_FOOTBRIDGE is not set
142# CONFIG_ARCH_NETX is not set 148# CONFIG_ARCH_NETX is not set
143# CONFIG_ARCH_H720X is not set 149# CONFIG_ARCH_H720X is not set
@@ -158,14 +164,17 @@ CONFIG_CLASSIC_RCU=y
158# CONFIG_ARCH_ORION5X is not set 164# CONFIG_ARCH_ORION5X is not set
159# CONFIG_ARCH_PNX4008 is not set 165# CONFIG_ARCH_PNX4008 is not set
160# CONFIG_ARCH_PXA is not set 166# CONFIG_ARCH_PXA is not set
167# CONFIG_ARCH_MMP is not set
161# CONFIG_ARCH_RPC is not set 168# CONFIG_ARCH_RPC is not set
162# CONFIG_ARCH_SA1100 is not set 169# CONFIG_ARCH_SA1100 is not set
163# CONFIG_ARCH_S3C2410 is not set 170# CONFIG_ARCH_S3C2410 is not set
171# CONFIG_ARCH_S3C64XX is not set
164# CONFIG_ARCH_SHARK is not set 172# CONFIG_ARCH_SHARK is not set
165# CONFIG_ARCH_LH7A40X is not set 173# CONFIG_ARCH_LH7A40X is not set
166# CONFIG_ARCH_DAVINCI is not set 174# CONFIG_ARCH_DAVINCI is not set
167CONFIG_ARCH_OMAP=y 175CONFIG_ARCH_OMAP=y
168# CONFIG_ARCH_MSM7X00A is not set 176# CONFIG_ARCH_MSM is not set
177# CONFIG_ARCH_W90X900 is not set
169 178
170# 179#
171# TI OMAP Implementations 180# TI OMAP Implementations
@@ -174,6 +183,7 @@ CONFIG_ARCH_OMAP_OTG=y
174# CONFIG_ARCH_OMAP1 is not set 183# CONFIG_ARCH_OMAP1 is not set
175# CONFIG_ARCH_OMAP2 is not set 184# CONFIG_ARCH_OMAP2 is not set
176CONFIG_ARCH_OMAP3=y 185CONFIG_ARCH_OMAP3=y
186# CONFIG_ARCH_OMAP4 is not set
177 187
178# 188#
179# OMAP Feature Selections 189# OMAP Feature Selections
@@ -185,6 +195,7 @@ CONFIG_OMAP_MUX=y
185CONFIG_OMAP_MUX_DEBUG=y 195CONFIG_OMAP_MUX_DEBUG=y
186CONFIG_OMAP_MUX_WARNINGS=y 196CONFIG_OMAP_MUX_WARNINGS=y
187CONFIG_OMAP_MCBSP=y 197CONFIG_OMAP_MCBSP=y
198# CONFIG_OMAP_MBOX_FWK is not set
188# CONFIG_OMAP_MPU_TIMER is not set 199# CONFIG_OMAP_MPU_TIMER is not set
189CONFIG_OMAP_32K_TIMER=y 200CONFIG_OMAP_32K_TIMER=y
190CONFIG_OMAP_32K_TIMER_HZ=128 201CONFIG_OMAP_32K_TIMER_HZ=128
@@ -192,25 +203,20 @@ CONFIG_OMAP_DM_TIMER=y
192# CONFIG_OMAP_LL_DEBUG_UART1 is not set 203# CONFIG_OMAP_LL_DEBUG_UART1 is not set
193# CONFIG_OMAP_LL_DEBUG_UART2 is not set 204# CONFIG_OMAP_LL_DEBUG_UART2 is not set
194CONFIG_OMAP_LL_DEBUG_UART3=y 205CONFIG_OMAP_LL_DEBUG_UART3=y
195CONFIG_OMAP_SERIAL_WAKE=y
196CONFIG_ARCH_OMAP34XX=y 206CONFIG_ARCH_OMAP34XX=y
197CONFIG_ARCH_OMAP3430=y 207CONFIG_ARCH_OMAP3430=y
198 208
199# 209#
200# OMAP Board Type 210# OMAP Board Type
201# 211#
202# CONFIG_MACH_OMAP3_BEAGLE is not set 212# CONFIG_MACH_NOKIA_RX51 is not set
203# CONFIG_MACH_OMAP_LDP is not set 213# CONFIG_MACH_OMAP_LDP is not set
204CONFIG_MACH_OMAP_ZOOM2=y 214# CONFIG_MACH_OMAP_3430SDP is not set
215# CONFIG_MACH_OMAP3EVM is not set
216# CONFIG_MACH_OMAP3_BEAGLE is not set
205# CONFIG_MACH_OVERO is not set 217# CONFIG_MACH_OVERO is not set
206 218# CONFIG_MACH_OMAP3_PANDORA is not set
207# 219CONFIG_MACH_OMAP_ZOOM2=y
208# Boot options
209#
210
211#
212# Power management
213#
214 220
215# 221#
216# Processor Type 222# Processor Type
@@ -239,6 +245,10 @@ CONFIG_ARM_THUMB=y
239# CONFIG_CPU_BPREDICT_DISABLE is not set 245# CONFIG_CPU_BPREDICT_DISABLE is not set
240CONFIG_HAS_TLS_REG=y 246CONFIG_HAS_TLS_REG=y
241# CONFIG_OUTER_CACHE is not set 247# CONFIG_OUTER_CACHE is not set
248# CONFIG_ARM_ERRATA_430973 is not set
249# CONFIG_ARM_ERRATA_458693 is not set
250# CONFIG_ARM_ERRATA_460075 is not set
251CONFIG_COMMON_CLKDEV=y
242 252
243# 253#
244# Bus support 254# Bus support
@@ -254,26 +264,32 @@ CONFIG_TICK_ONESHOT=y
254CONFIG_NO_HZ=y 264CONFIG_NO_HZ=y
255CONFIG_HIGH_RES_TIMERS=y 265CONFIG_HIGH_RES_TIMERS=y
256CONFIG_GENERIC_CLOCKEVENTS_BUILD=y 266CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
267CONFIG_VMSPLIT_3G=y
268# CONFIG_VMSPLIT_2G is not set
269# CONFIG_VMSPLIT_1G is not set
270CONFIG_PAGE_OFFSET=0xC0000000
257# CONFIG_PREEMPT is not set 271# CONFIG_PREEMPT is not set
258CONFIG_HZ=128 272CONFIG_HZ=128
259CONFIG_AEABI=y 273CONFIG_AEABI=y
260CONFIG_OABI_COMPAT=y 274CONFIG_OABI_COMPAT=y
261CONFIG_ARCH_FLATMEM_HAS_HOLES=y 275# CONFIG_ARCH_HAS_HOLES_MEMORYMODEL is not set
262# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set 276# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
277# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
278# CONFIG_HIGHMEM is not set
263CONFIG_SELECT_MEMORY_MODEL=y 279CONFIG_SELECT_MEMORY_MODEL=y
264CONFIG_FLATMEM_MANUAL=y 280CONFIG_FLATMEM_MANUAL=y
265# CONFIG_DISCONTIGMEM_MANUAL is not set 281# CONFIG_DISCONTIGMEM_MANUAL is not set
266# CONFIG_SPARSEMEM_MANUAL is not set 282# CONFIG_SPARSEMEM_MANUAL is not set
267CONFIG_FLATMEM=y 283CONFIG_FLATMEM=y
268CONFIG_FLAT_NODE_MEM_MAP=y 284CONFIG_FLAT_NODE_MEM_MAP=y
269# CONFIG_SPARSEMEM_STATIC is not set
270# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
271CONFIG_PAGEFLAGS_EXTENDED=y 285CONFIG_PAGEFLAGS_EXTENDED=y
272CONFIG_SPLIT_PTLOCK_CPUS=4 286CONFIG_SPLIT_PTLOCK_CPUS=4
273# CONFIG_RESOURCES_64BIT is not set 287# CONFIG_PHYS_ADDR_T_64BIT is not set
274CONFIG_ZONE_DMA_FLAG=1 288CONFIG_ZONE_DMA_FLAG=0
275CONFIG_BOUNCE=y
276CONFIG_VIRT_TO_BUS=y 289CONFIG_VIRT_TO_BUS=y
290CONFIG_UNEVICTABLE_LRU=y
291CONFIG_HAVE_MLOCK=y
292CONFIG_HAVE_MLOCKED_PAGE_BIT=y
277# CONFIG_LEDS is not set 293# CONFIG_LEDS is not set
278CONFIG_ALIGNMENT_TRAP=y 294CONFIG_ALIGNMENT_TRAP=y
279 295
@@ -287,9 +303,10 @@ CONFIG_CMDLINE="root=/dev/nfs nfsroot=192.168.0.1:/home/user/buildroot ip=192.16
287# CONFIG_KEXEC is not set 303# CONFIG_KEXEC is not set
288 304
289# 305#
290# CPU Frequency scaling 306# CPU Power Management
291# 307#
292# CONFIG_CPU_FREQ is not set 308# CONFIG_CPU_FREQ is not set
309# CONFIG_CPU_IDLE is not set
293 310
294# 311#
295# Floating point emulation 312# Floating point emulation
@@ -309,13 +326,23 @@ CONFIG_VFPv3=y
309# Userspace binary formats 326# Userspace binary formats
310# 327#
311CONFIG_BINFMT_ELF=y 328CONFIG_BINFMT_ELF=y
329# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
330CONFIG_HAVE_AOUT=y
312# CONFIG_BINFMT_AOUT is not set 331# CONFIG_BINFMT_AOUT is not set
313CONFIG_BINFMT_MISC=y 332CONFIG_BINFMT_MISC=y
314 333
315# 334#
316# Power management options 335# Power management options
317# 336#
318# CONFIG_PM is not set 337CONFIG_PM=y
338CONFIG_PM_DEBUG=y
339CONFIG_PM_VERBOSE=y
340CONFIG_CAN_PM_TRACE=y
341CONFIG_PM_SLEEP=y
342CONFIG_SUSPEND=y
343# CONFIG_PM_TEST_SUSPEND is not set
344CONFIG_SUSPEND_FREEZER=y
345# CONFIG_APM_EMULATION is not set
319CONFIG_ARCH_SUSPEND_POSSIBLE=y 346CONFIG_ARCH_SUSPEND_POSSIBLE=y
320CONFIG_NET=y 347CONFIG_NET=y
321 348
@@ -378,7 +405,9 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
378# CONFIG_LAPB is not set 405# CONFIG_LAPB is not set
379# CONFIG_ECONET is not set 406# CONFIG_ECONET is not set
380# CONFIG_WAN_ROUTER is not set 407# CONFIG_WAN_ROUTER is not set
408# CONFIG_PHONET is not set
381# CONFIG_NET_SCHED is not set 409# CONFIG_NET_SCHED is not set
410# CONFIG_DCB is not set
382 411
383# 412#
384# Network testing 413# Network testing
@@ -389,8 +418,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
389# CONFIG_IRDA is not set 418# CONFIG_IRDA is not set
390# CONFIG_BT is not set 419# CONFIG_BT is not set
391# CONFIG_AF_RXRPC is not set 420# CONFIG_AF_RXRPC is not set
392# CONFIG_PHONET is not set
393# CONFIG_WIRELESS is not set 421# CONFIG_WIRELESS is not set
422# CONFIG_WIMAX is not set
394# CONFIG_RFKILL is not set 423# CONFIG_RFKILL is not set
395# CONFIG_NET_9P is not set 424# CONFIG_NET_9P is not set
396 425
@@ -416,14 +445,28 @@ CONFIG_BLK_DEV=y
416# CONFIG_BLK_DEV_COW_COMMON is not set 445# CONFIG_BLK_DEV_COW_COMMON is not set
417CONFIG_BLK_DEV_LOOP=y 446CONFIG_BLK_DEV_LOOP=y
418# CONFIG_BLK_DEV_CRYPTOLOOP is not set 447# CONFIG_BLK_DEV_CRYPTOLOOP is not set
448# CONFIG_BLK_DEV_NBD is not set
449# CONFIG_BLK_DEV_UB is not set
419CONFIG_BLK_DEV_RAM=y 450CONFIG_BLK_DEV_RAM=y
420CONFIG_BLK_DEV_RAM_COUNT=16 451CONFIG_BLK_DEV_RAM_COUNT=16
421CONFIG_BLK_DEV_RAM_SIZE=16384 452CONFIG_BLK_DEV_RAM_SIZE=16384
422# CONFIG_BLK_DEV_XIP is not set 453# CONFIG_BLK_DEV_XIP is not set
423# CONFIG_CDROM_PKTCDVD is not set 454# CONFIG_CDROM_PKTCDVD is not set
455# CONFIG_ATA_OVER_ETH is not set
424CONFIG_MISC_DEVICES=y 456CONFIG_MISC_DEVICES=y
425# CONFIG_EEPROM_93CX6 is not set 457# CONFIG_ICS932S401 is not set
458# CONFIG_OMAP_STI is not set
426# CONFIG_ENCLOSURE_SERVICES is not set 459# CONFIG_ENCLOSURE_SERVICES is not set
460# CONFIG_ISL29003 is not set
461# CONFIG_C2PORT is not set
462
463#
464# EEPROM support
465#
466# CONFIG_EEPROM_AT24 is not set
467# CONFIG_EEPROM_AT25 is not set
468# CONFIG_EEPROM_LEGACY is not set
469# CONFIG_EEPROM_93CX6 is not set
427CONFIG_HAVE_IDE=y 470CONFIG_HAVE_IDE=y
428# CONFIG_IDE is not set 471# CONFIG_IDE is not set
429 472
@@ -461,14 +504,20 @@ CONFIG_SCSI_WAIT_SCAN=m
461# 504#
462# CONFIG_SCSI_SPI_ATTRS is not set 505# CONFIG_SCSI_SPI_ATTRS is not set
463# CONFIG_SCSI_FC_ATTRS is not set 506# CONFIG_SCSI_FC_ATTRS is not set
507# CONFIG_SCSI_ISCSI_ATTRS is not set
464# CONFIG_SCSI_SAS_LIBSAS is not set 508# CONFIG_SCSI_SAS_LIBSAS is not set
465# CONFIG_SCSI_SRP_ATTRS is not set 509# CONFIG_SCSI_SRP_ATTRS is not set
466CONFIG_SCSI_LOWLEVEL=y 510CONFIG_SCSI_LOWLEVEL=y
511# CONFIG_ISCSI_TCP is not set
512# CONFIG_LIBFC is not set
513# CONFIG_LIBFCOE is not set
467# CONFIG_SCSI_DEBUG is not set 514# CONFIG_SCSI_DEBUG is not set
468# CONFIG_SCSI_DH is not set 515# CONFIG_SCSI_DH is not set
516# CONFIG_SCSI_OSD_INITIATOR is not set
469# CONFIG_ATA is not set 517# CONFIG_ATA is not set
470# CONFIG_MD is not set 518# CONFIG_MD is not set
471CONFIG_NETDEVICES=y 519CONFIG_NETDEVICES=y
520CONFIG_COMPAT_NET_DEV_OPS=y
472# CONFIG_DUMMY is not set 521# CONFIG_DUMMY is not set
473# CONFIG_BONDING is not set 522# CONFIG_BONDING is not set
474# CONFIG_MACVLAN is not set 523# CONFIG_MACVLAN is not set
@@ -501,8 +550,10 @@ CONFIG_MII=y
501# CONFIG_SMC91X is not set 550# CONFIG_SMC91X is not set
502# CONFIG_DM9000 is not set 551# CONFIG_DM9000 is not set
503# CONFIG_ENC28J60 is not set 552# CONFIG_ENC28J60 is not set
553# CONFIG_ETHOC is not set
504# CONFIG_SMC911X is not set 554# CONFIG_SMC911X is not set
505CONFIG_SMSC911X=y 555CONFIG_SMSC911X=y
556# CONFIG_DNET is not set
506# CONFIG_IBM_NEW_EMAC_ZMII is not set 557# CONFIG_IBM_NEW_EMAC_ZMII is not set
507# CONFIG_IBM_NEW_EMAC_RGMII is not set 558# CONFIG_IBM_NEW_EMAC_RGMII is not set
508# CONFIG_IBM_NEW_EMAC_TAH is not set 559# CONFIG_IBM_NEW_EMAC_TAH is not set
@@ -519,7 +570,10 @@ CONFIG_NETDEV_10000=y
519# 570#
520# CONFIG_WLAN_PRE80211 is not set 571# CONFIG_WLAN_PRE80211 is not set
521# CONFIG_WLAN_80211 is not set 572# CONFIG_WLAN_80211 is not set
522# CONFIG_IWLWIFI_LEDS is not set 573
574#
575# Enable WiMAX (Networking options) to see the WiMAX drivers
576#
523 577
524# 578#
525# USB Network Adapters 579# USB Network Adapters
@@ -561,17 +615,25 @@ CONFIG_INPUT_EVDEV=y
561# CONFIG_INPUT_TABLET is not set 615# CONFIG_INPUT_TABLET is not set
562CONFIG_INPUT_TOUCHSCREEN=y 616CONFIG_INPUT_TOUCHSCREEN=y
563CONFIG_TOUCHSCREEN_ADS7846=y 617CONFIG_TOUCHSCREEN_ADS7846=y
618# CONFIG_TOUCHSCREEN_AD7877 is not set
619# CONFIG_TOUCHSCREEN_AD7879_I2C is not set
620# CONFIG_TOUCHSCREEN_AD7879_SPI is not set
621# CONFIG_TOUCHSCREEN_AD7879 is not set
564# CONFIG_TOUCHSCREEN_FUJITSU is not set 622# CONFIG_TOUCHSCREEN_FUJITSU is not set
565# CONFIG_TOUCHSCREEN_GUNZE is not set 623# CONFIG_TOUCHSCREEN_GUNZE is not set
566# CONFIG_TOUCHSCREEN_ELO is not set 624# CONFIG_TOUCHSCREEN_ELO is not set
625# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set
567# CONFIG_TOUCHSCREEN_MTOUCH is not set 626# CONFIG_TOUCHSCREEN_MTOUCH is not set
568# CONFIG_TOUCHSCREEN_INEXIO is not set 627# CONFIG_TOUCHSCREEN_INEXIO is not set
569# CONFIG_TOUCHSCREEN_MK712 is not set 628# CONFIG_TOUCHSCREEN_MK712 is not set
570# CONFIG_TOUCHSCREEN_PENMOUNT is not set 629# CONFIG_TOUCHSCREEN_PENMOUNT is not set
571# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set 630# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
572# CONFIG_TOUCHSCREEN_TOUCHWIN is not set 631# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
573# CONFIG_TOUCHSCREEN_UCB1400 is not set 632# CONFIG_TOUCHSCREEN_TSC2005 is not set
633# CONFIG_TOUCHSCREEN_TSC210X is not set
634# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
574# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set 635# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
636# CONFIG_TOUCHSCREEN_TSC2007 is not set
575# CONFIG_INPUT_MISC is not set 637# CONFIG_INPUT_MISC is not set
576 638
577# 639#
@@ -607,13 +669,15 @@ CONFIG_SERIAL_8250_RSA=y
607# 669#
608# Non-8250 serial port support 670# Non-8250 serial port support
609# 671#
672# CONFIG_SERIAL_MAX3100 is not set
610CONFIG_SERIAL_CORE=y 673CONFIG_SERIAL_CORE=y
611CONFIG_SERIAL_CORE_CONSOLE=y 674CONFIG_SERIAL_CORE_CONSOLE=y
612CONFIG_UNIX98_PTYS=y 675CONFIG_UNIX98_PTYS=y
676# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
613# CONFIG_LEGACY_PTYS is not set 677# CONFIG_LEGACY_PTYS is not set
614# CONFIG_IPMI_HANDLER is not set 678# CONFIG_IPMI_HANDLER is not set
615CONFIG_HW_RANDOM=y 679CONFIG_HW_RANDOM=y
616# CONFIG_NVRAM is not set 680# CONFIG_HW_RANDOM_TIMERIOMEM is not set
617# CONFIG_R3964 is not set 681# CONFIG_R3964 is not set
618# CONFIG_RAW_DRIVER is not set 682# CONFIG_RAW_DRIVER is not set
619# CONFIG_TCG_TPM is not set 683# CONFIG_TCG_TPM is not set
@@ -639,6 +703,7 @@ CONFIG_I2C_OMAP=y
639# 703#
640# CONFIG_I2C_PARPORT_LIGHT is not set 704# CONFIG_I2C_PARPORT_LIGHT is not set
641# CONFIG_I2C_TAOS_EVM is not set 705# CONFIG_I2C_TAOS_EVM is not set
706# CONFIG_I2C_TINY_USB is not set
642 707
643# 708#
644# Other I2C/SMBus bus drivers 709# Other I2C/SMBus bus drivers
@@ -650,14 +715,11 @@ CONFIG_I2C_OMAP=y
650# Miscellaneous I2C Chip support 715# Miscellaneous I2C Chip support
651# 716#
652# CONFIG_DS1682 is not set 717# CONFIG_DS1682 is not set
653# CONFIG_EEPROM_AT24 is not set
654# CONFIG_EEPROM_LEGACY is not set
655# CONFIG_SENSORS_PCF8574 is not set 718# CONFIG_SENSORS_PCF8574 is not set
656# CONFIG_PCF8575 is not set 719# CONFIG_PCF8575 is not set
657# CONFIG_SENSORS_PCA9539 is not set 720# CONFIG_SENSORS_PCA9539 is not set
658# CONFIG_SENSORS_PCF8591 is not set 721# CONFIG_TWL4030_MADC is not set
659# CONFIG_ISP1301_OMAP is not set 722# CONFIG_TWL4030_POWEROFF is not set
660# CONFIG_TPS65010 is not set
661# CONFIG_SENSORS_MAX6875 is not set 723# CONFIG_SENSORS_MAX6875 is not set
662# CONFIG_SENSORS_TSL2550 is not set 724# CONFIG_SENSORS_TSL2550 is not set
663# CONFIG_I2C_DEBUG_CORE is not set 725# CONFIG_I2C_DEBUG_CORE is not set
@@ -672,12 +734,12 @@ CONFIG_SPI_MASTER=y
672# SPI Master Controller Drivers 734# SPI Master Controller Drivers
673# 735#
674# CONFIG_SPI_BITBANG is not set 736# CONFIG_SPI_BITBANG is not set
737# CONFIG_SPI_GPIO is not set
675CONFIG_SPI_OMAP24XX=y 738CONFIG_SPI_OMAP24XX=y
676 739
677# 740#
678# SPI Protocol Masters 741# SPI Protocol Masters
679# 742#
680# CONFIG_EEPROM_AT25 is not set
681# CONFIG_SPI_SPIDEV is not set 743# CONFIG_SPI_SPIDEV is not set
682# CONFIG_SPI_TLE62X0 is not set 744# CONFIG_SPI_TLE62X0 is not set
683CONFIG_ARCH_REQUIRE_GPIOLIB=y 745CONFIG_ARCH_REQUIRE_GPIOLIB=y
@@ -686,11 +748,16 @@ CONFIG_GPIOLIB=y
686# CONFIG_GPIO_SYSFS is not set 748# CONFIG_GPIO_SYSFS is not set
687 749
688# 750#
751# Memory mapped GPIO expanders:
752#
753
754#
689# I2C GPIO expanders: 755# I2C GPIO expanders:
690# 756#
691# CONFIG_GPIO_MAX732X is not set 757# CONFIG_GPIO_MAX732X is not set
692# CONFIG_GPIO_PCA953X is not set 758# CONFIG_GPIO_PCA953X is not set
693# CONFIG_GPIO_PCF857X is not set 759# CONFIG_GPIO_PCF857X is not set
760CONFIG_GPIO_TWL4030=y
694 761
695# 762#
696# PCI GPIO expanders: 763# PCI GPIO expanders:
@@ -702,26 +769,34 @@ CONFIG_GPIOLIB=y
702# CONFIG_GPIO_MAX7301 is not set 769# CONFIG_GPIO_MAX7301 is not set
703# CONFIG_GPIO_MCP23S08 is not set 770# CONFIG_GPIO_MCP23S08 is not set
704CONFIG_W1=y 771CONFIG_W1=y
772CONFIG_W1_CON=y
705 773
706# 774#
707# 1-wire Bus Masters 775# 1-wire Bus Masters
708# 776#
777# CONFIG_W1_MASTER_DS2490 is not set
709# CONFIG_W1_MASTER_DS2482 is not set 778# CONFIG_W1_MASTER_DS2482 is not set
710# CONFIG_W1_MASTER_DS1WM is not set 779# CONFIG_W1_MASTER_DS1WM is not set
711# CONFIG_W1_MASTER_GPIO is not set 780# CONFIG_W1_MASTER_GPIO is not set
781# CONFIG_HDQ_MASTER_OMAP is not set
712 782
713# 783#
714# 1-wire Slaves 784# 1-wire Slaves
715# 785#
716# CONFIG_W1_SLAVE_THERM is not set 786# CONFIG_W1_SLAVE_THERM is not set
717# CONFIG_W1_SLAVE_SMEM is not set 787# CONFIG_W1_SLAVE_SMEM is not set
788# CONFIG_W1_SLAVE_DS2431 is not set
718# CONFIG_W1_SLAVE_DS2433 is not set 789# CONFIG_W1_SLAVE_DS2433 is not set
719# CONFIG_W1_SLAVE_DS2760 is not set 790# CONFIG_W1_SLAVE_DS2760 is not set
791# CONFIG_W1_SLAVE_BQ27000 is not set
720CONFIG_POWER_SUPPLY=y 792CONFIG_POWER_SUPPLY=y
721# CONFIG_POWER_SUPPLY_DEBUG is not set 793# CONFIG_POWER_SUPPLY_DEBUG is not set
722# CONFIG_PDA_POWER is not set 794# CONFIG_PDA_POWER is not set
723# CONFIG_BATTERY_DS2760 is not set 795# CONFIG_BATTERY_DS2760 is not set
796# CONFIG_BATTERY_BQ27x00 is not set
724# CONFIG_HWMON is not set 797# CONFIG_HWMON is not set
798# CONFIG_THERMAL is not set
799# CONFIG_THERMAL_HWMON is not set
725CONFIG_WATCHDOG=y 800CONFIG_WATCHDOG=y
726CONFIG_WATCHDOG_NOWAYOUT=y 801CONFIG_WATCHDOG_NOWAYOUT=y
727 802
@@ -729,11 +804,17 @@ CONFIG_WATCHDOG_NOWAYOUT=y
729# Watchdog Device Drivers 804# Watchdog Device Drivers
730# 805#
731# CONFIG_SOFT_WATCHDOG is not set 806# CONFIG_SOFT_WATCHDOG is not set
807# CONFIG_OMAP_WATCHDOG is not set
732 808
733# 809#
734# Sonics Silicon Backplane 810# USB-based Watchdog Cards
735# 811#
812# CONFIG_USBPCWATCHDOG is not set
736CONFIG_SSB_POSSIBLE=y 813CONFIG_SSB_POSSIBLE=y
814
815#
816# Sonics Silicon Backplane
817#
737# CONFIG_SSB is not set 818# CONFIG_SSB is not set
738 819
739# 820#
@@ -741,12 +822,19 @@ CONFIG_SSB_POSSIBLE=y
741# 822#
742# CONFIG_MFD_CORE is not set 823# CONFIG_MFD_CORE is not set
743# CONFIG_MFD_SM501 is not set 824# CONFIG_MFD_SM501 is not set
825# CONFIG_MFD_ASIC3 is not set
744# CONFIG_HTC_EGPIO is not set 826# CONFIG_HTC_EGPIO is not set
745# CONFIG_HTC_PASIC3 is not set 827# CONFIG_HTC_PASIC3 is not set
828# CONFIG_TPS65010 is not set
829CONFIG_TWL4030_CORE=y
746# CONFIG_MFD_TMIO is not set 830# CONFIG_MFD_TMIO is not set
747# CONFIG_MFD_T7L66XB is not set 831# CONFIG_MFD_T7L66XB is not set
748# CONFIG_MFD_TC6387XB is not set 832# CONFIG_MFD_TC6387XB is not set
749# CONFIG_MFD_TC6393XB is not set 833# CONFIG_MFD_TC6393XB is not set
834# CONFIG_PMIC_DA903X is not set
835# CONFIG_MFD_WM8400 is not set
836# CONFIG_MFD_WM8350_I2C is not set
837# CONFIG_MFD_PCF50633 is not set
750 838
751# 839#
752# Multimedia devices 840# Multimedia devices
@@ -756,12 +844,14 @@ CONFIG_SSB_POSSIBLE=y
756# Multimedia core support 844# Multimedia core support
757# 845#
758# CONFIG_VIDEO_DEV is not set 846# CONFIG_VIDEO_DEV is not set
847# CONFIG_DVB_CORE is not set
759# CONFIG_VIDEO_MEDIA is not set 848# CONFIG_VIDEO_MEDIA is not set
760 849
761# 850#
762# Multimedia drivers 851# Multimedia drivers
763# 852#
764CONFIG_DAB=y 853CONFIG_DAB=y
854# CONFIG_USB_DABUSB is not set
765 855
766# 856#
767# Graphics support 857# Graphics support
@@ -782,10 +872,12 @@ CONFIG_VIDEO_OUTPUT_CONTROL=m
782# CONFIG_VGA_CONSOLE is not set 872# CONFIG_VGA_CONSOLE is not set
783CONFIG_DUMMY_CONSOLE=y 873CONFIG_DUMMY_CONSOLE=y
784CONFIG_SOUND=y 874CONFIG_SOUND=y
875# CONFIG_SOUND_OSS_CORE is not set
785CONFIG_SND=y 876CONFIG_SND=y
786# CONFIG_SND_SEQUENCER is not set 877# CONFIG_SND_SEQUENCER is not set
787# CONFIG_SND_MIXER_OSS is not set 878# CONFIG_SND_MIXER_OSS is not set
788# CONFIG_SND_PCM_OSS is not set 879# CONFIG_SND_PCM_OSS is not set
880# CONFIG_SND_HRTIMER is not set
789# CONFIG_SND_DYNAMIC_MINORS is not set 881# CONFIG_SND_DYNAMIC_MINORS is not set
790CONFIG_SND_SUPPORT_OLD_API=y 882CONFIG_SND_SUPPORT_OLD_API=y
791CONFIG_SND_VERBOSE_PROCFS=y 883CONFIG_SND_VERBOSE_PROCFS=y
@@ -798,19 +890,197 @@ CONFIG_SND_DRIVERS=y
798# CONFIG_SND_MPU401 is not set 890# CONFIG_SND_MPU401 is not set
799CONFIG_SND_ARM=y 891CONFIG_SND_ARM=y
800CONFIG_SND_SPI=y 892CONFIG_SND_SPI=y
893CONFIG_SND_USB=y
894# CONFIG_SND_USB_AUDIO is not set
895# CONFIG_SND_USB_CAIAQ is not set
801# CONFIG_SND_SOC is not set 896# CONFIG_SND_SOC is not set
802# CONFIG_SOUND_PRIME is not set 897# CONFIG_SOUND_PRIME is not set
803CONFIG_HID_SUPPORT=y 898CONFIG_HID_SUPPORT=y
804CONFIG_HID=y 899CONFIG_HID=y
805# CONFIG_HID_DEBUG is not set 900# CONFIG_HID_DEBUG is not set
806# CONFIG_HIDRAW is not set 901# CONFIG_HIDRAW is not set
807# CONFIG_USB_SUPPORT is not set 902
903#
904# USB Input Devices
905#
906CONFIG_USB_HID=y
907# CONFIG_HID_PID is not set
908# CONFIG_USB_HIDDEV is not set
909
910#
911# Special HID drivers
912#
913# CONFIG_HID_A4TECH is not set
914# CONFIG_HID_APPLE is not set
915# CONFIG_HID_BELKIN is not set
916# CONFIG_HID_CHERRY is not set
917# CONFIG_HID_CHICONY is not set
918# CONFIG_HID_CYPRESS is not set
919# CONFIG_DRAGONRISE_FF is not set
920# CONFIG_HID_EZKEY is not set
921# CONFIG_HID_KYE is not set
922# CONFIG_HID_GYRATION is not set
923# CONFIG_HID_KENSINGTON is not set
924# CONFIG_HID_LOGITECH is not set
925# CONFIG_HID_MICROSOFT is not set
926# CONFIG_HID_MONTEREY is not set
927# CONFIG_HID_NTRIG is not set
928# CONFIG_HID_PANTHERLORD is not set
929# CONFIG_HID_PETALYNX is not set
930# CONFIG_HID_SAMSUNG is not set
931# CONFIG_HID_SONY is not set
932# CONFIG_HID_SUNPLUS is not set
933# CONFIG_GREENASIA_FF is not set
934# CONFIG_HID_TOPSEED is not set
935# CONFIG_THRUSTMASTER_FF is not set
936# CONFIG_ZEROPLUS_FF is not set
937CONFIG_USB_SUPPORT=y
938CONFIG_USB_ARCH_HAS_HCD=y
939CONFIG_USB_ARCH_HAS_OHCI=y
940CONFIG_USB_ARCH_HAS_EHCI=y
941CONFIG_USB=y
942CONFIG_USB_DEBUG=y
943CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
944
945#
946# Miscellaneous USB options
947#
948# CONFIG_USB_DEVICEFS is not set
949CONFIG_USB_DEVICE_CLASS=y
950# CONFIG_USB_DYNAMIC_MINORS is not set
951CONFIG_USB_SUSPEND=y
952CONFIG_USB_OTG=y
953# CONFIG_USB_OTG_WHITELIST is not set
954# CONFIG_USB_OTG_BLACKLIST_HUB is not set
955CONFIG_USB_MON=y
956# CONFIG_USB_WUSB is not set
957# CONFIG_USB_WUSB_CBAF is not set
958
959#
960# USB Host Controller Drivers
961#
962# CONFIG_USB_C67X00_HCD is not set
963# CONFIG_USB_EHCI_HCD is not set
964# CONFIG_USB_OXU210HP_HCD is not set
965# CONFIG_USB_ISP116X_HCD is not set
966# CONFIG_USB_ISP1760_HCD is not set
967# CONFIG_USB_OHCI_HCD is not set
968# CONFIG_USB_SL811_HCD is not set
969# CONFIG_USB_R8A66597_HCD is not set
970# CONFIG_USB_HWA_HCD is not set
971CONFIG_USB_MUSB_HDRC=y
972CONFIG_USB_MUSB_SOC=y
973
974#
975# OMAP 343x high speed USB support
976#
977# CONFIG_USB_MUSB_HOST is not set
978# CONFIG_USB_MUSB_PERIPHERAL is not set
979CONFIG_USB_MUSB_OTG=y
980CONFIG_USB_GADGET_MUSB_HDRC=y
981CONFIG_USB_MUSB_HDRC_HCD=y
982# CONFIG_MUSB_PIO_ONLY is not set
983CONFIG_USB_INVENTRA_DMA=y
984# CONFIG_USB_TI_CPPI_DMA is not set
985CONFIG_USB_MUSB_DEBUG=y
986
987#
988# USB Device Class drivers
989#
990# CONFIG_USB_ACM is not set
991# CONFIG_USB_PRINTER is not set
992# CONFIG_USB_WDM is not set
993# CONFIG_USB_TMC is not set
994
995#
996# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
997#
998
999#
1000# also be needed; see USB_STORAGE Help for more info
1001#
1002# CONFIG_USB_STORAGE is not set
1003# CONFIG_USB_LIBUSUAL is not set
1004
1005#
1006# USB Imaging devices
1007#
1008# CONFIG_USB_MDC800 is not set
1009# CONFIG_USB_MICROTEK is not set
1010
1011#
1012# USB port drivers
1013#
1014# CONFIG_USB_SERIAL is not set
1015
1016#
1017# USB Miscellaneous drivers
1018#
1019# CONFIG_USB_EMI62 is not set
1020# CONFIG_USB_EMI26 is not set
1021# CONFIG_USB_ADUTUX is not set
1022# CONFIG_USB_SEVSEG is not set
1023# CONFIG_USB_RIO500 is not set
1024# CONFIG_USB_LEGOTOWER is not set
1025# CONFIG_USB_LCD is not set
1026# CONFIG_USB_BERRY_CHARGE is not set
1027# CONFIG_USB_LED is not set
1028# CONFIG_USB_CYPRESS_CY7C63 is not set
1029# CONFIG_USB_CYTHERM is not set
1030# CONFIG_USB_IDMOUSE is not set
1031# CONFIG_USB_FTDI_ELAN is not set
1032# CONFIG_USB_APPLEDISPLAY is not set
1033# CONFIG_USB_LD is not set
1034# CONFIG_USB_TRANCEVIBRATOR is not set
1035# CONFIG_USB_IOWARRIOR is not set
1036# CONFIG_USB_ISIGHTFW is not set
1037# CONFIG_USB_VST is not set
1038CONFIG_USB_GADGET=y
1039CONFIG_USB_GADGET_DEBUG=y
1040CONFIG_USB_GADGET_DEBUG_FILES=y
1041CONFIG_USB_GADGET_VBUS_DRAW=2
1042CONFIG_USB_GADGET_SELECTED=y
1043# CONFIG_USB_GADGET_AT91 is not set
1044# CONFIG_USB_GADGET_ATMEL_USBA is not set
1045# CONFIG_USB_GADGET_FSL_USB2 is not set
1046# CONFIG_USB_GADGET_LH7A40X is not set
1047# CONFIG_USB_GADGET_OMAP is not set
1048# CONFIG_USB_GADGET_PXA25X is not set
1049# CONFIG_USB_GADGET_PXA27X is not set
1050# CONFIG_USB_GADGET_S3C2410 is not set
1051# CONFIG_USB_GADGET_IMX is not set
1052# CONFIG_USB_GADGET_M66592 is not set
1053# CONFIG_USB_GADGET_AMD5536UDC is not set
1054# CONFIG_USB_GADGET_FSL_QE is not set
1055# CONFIG_USB_GADGET_CI13XXX is not set
1056# CONFIG_USB_GADGET_NET2280 is not set
1057# CONFIG_USB_GADGET_GOKU is not set
1058# CONFIG_USB_GADGET_DUMMY_HCD is not set
1059CONFIG_USB_GADGET_DUALSPEED=y
1060CONFIG_USB_ZERO=y
1061# CONFIG_USB_ZERO_HNPTEST is not set
1062# CONFIG_USB_ETH is not set
1063# CONFIG_USB_GADGETFS is not set
1064# CONFIG_USB_FILE_STORAGE is not set
1065# CONFIG_USB_G_SERIAL is not set
1066# CONFIG_USB_MIDI_GADGET is not set
1067# CONFIG_USB_G_PRINTER is not set
1068# CONFIG_USB_CDC_COMPOSITE is not set
1069
1070#
1071# OTG and related infrastructure
1072#
1073CONFIG_USB_OTG_UTILS=y
1074# CONFIG_USB_GPIO_VBUS is not set
1075# CONFIG_ISP1301_OMAP is not set
1076CONFIG_TWL4030_USB=y
1077# CONFIG_NOP_USB_XCEIV is not set
808CONFIG_MMC=y 1078CONFIG_MMC=y
809# CONFIG_MMC_DEBUG is not set 1079# CONFIG_MMC_DEBUG is not set
810# CONFIG_MMC_UNSAFE_RESUME is not set 1080# CONFIG_MMC_UNSAFE_RESUME is not set
811 1081
812# 1082#
813# MMC/SD Card Drivers 1083# MMC/SD/SDIO Card Drivers
814# 1084#
815CONFIG_MMC_BLOCK=y 1085CONFIG_MMC_BLOCK=y
816CONFIG_MMC_BLOCK_BOUNCE=y 1086CONFIG_MMC_BLOCK_BOUNCE=y
@@ -818,11 +1088,13 @@ CONFIG_MMC_BLOCK_BOUNCE=y
818# CONFIG_MMC_TEST is not set 1088# CONFIG_MMC_TEST is not set
819 1089
820# 1090#
821# MMC/SD Host Controller Drivers 1091# MMC/SD/SDIO Host Controller Drivers
822# 1092#
823# CONFIG_MMC_SDHCI is not set 1093# CONFIG_MMC_SDHCI is not set
824# CONFIG_MMC_OMAP is not set 1094CONFIG_MMC_OMAP_HS=y
825# CONFIG_MMC_SPI is not set 1095# CONFIG_MMC_SPI is not set
1096# CONFIG_MEMSTICK is not set
1097# CONFIG_ACCESSIBILITY is not set
826# CONFIG_NEW_LEDS is not set 1098# CONFIG_NEW_LEDS is not set
827CONFIG_RTC_LIB=y 1099CONFIG_RTC_LIB=y
828CONFIG_RTC_CLASS=y 1100CONFIG_RTC_CLASS=y
@@ -852,43 +1124,55 @@ CONFIG_RTC_INTF_DEV=y
852# CONFIG_RTC_DRV_PCF8563 is not set 1124# CONFIG_RTC_DRV_PCF8563 is not set
853# CONFIG_RTC_DRV_PCF8583 is not set 1125# CONFIG_RTC_DRV_PCF8583 is not set
854# CONFIG_RTC_DRV_M41T80 is not set 1126# CONFIG_RTC_DRV_M41T80 is not set
1127# CONFIG_RTC_DRV_TWL4030 is not set
855# CONFIG_RTC_DRV_S35390A is not set 1128# CONFIG_RTC_DRV_S35390A is not set
856# CONFIG_RTC_DRV_FM3130 is not set 1129# CONFIG_RTC_DRV_FM3130 is not set
1130# CONFIG_RTC_DRV_RX8581 is not set
857 1131
858# 1132#
859# SPI RTC drivers 1133# SPI RTC drivers
860# 1134#
861# CONFIG_RTC_DRV_M41T94 is not set 1135# CONFIG_RTC_DRV_M41T94 is not set
862# CONFIG_RTC_DRV_DS1305 is not set 1136# CONFIG_RTC_DRV_DS1305 is not set
1137# CONFIG_RTC_DRV_DS1390 is not set
863# CONFIG_RTC_DRV_MAX6902 is not set 1138# CONFIG_RTC_DRV_MAX6902 is not set
864# CONFIG_RTC_DRV_R9701 is not set 1139# CONFIG_RTC_DRV_R9701 is not set
865# CONFIG_RTC_DRV_RS5C348 is not set 1140# CONFIG_RTC_DRV_RS5C348 is not set
1141# CONFIG_RTC_DRV_DS3234 is not set
866 1142
867# 1143#
868# Platform RTC drivers 1144# Platform RTC drivers
869# 1145#
870# CONFIG_RTC_DRV_CMOS is not set 1146# CONFIG_RTC_DRV_CMOS is not set
1147# CONFIG_RTC_DRV_DS1286 is not set
871# CONFIG_RTC_DRV_DS1511 is not set 1148# CONFIG_RTC_DRV_DS1511 is not set
872# CONFIG_RTC_DRV_DS1553 is not set 1149# CONFIG_RTC_DRV_DS1553 is not set
873# CONFIG_RTC_DRV_DS1742 is not set 1150# CONFIG_RTC_DRV_DS1742 is not set
874# CONFIG_RTC_DRV_STK17TA8 is not set 1151# CONFIG_RTC_DRV_STK17TA8 is not set
875# CONFIG_RTC_DRV_M48T86 is not set 1152# CONFIG_RTC_DRV_M48T86 is not set
1153# CONFIG_RTC_DRV_M48T35 is not set
876# CONFIG_RTC_DRV_M48T59 is not set 1154# CONFIG_RTC_DRV_M48T59 is not set
1155# CONFIG_RTC_DRV_BQ4802 is not set
877# CONFIG_RTC_DRV_V3020 is not set 1156# CONFIG_RTC_DRV_V3020 is not set
878 1157
879# 1158#
880# on-CPU RTC drivers 1159# on-CPU RTC drivers
881# 1160#
882# CONFIG_DMADEVICES is not set 1161# CONFIG_DMADEVICES is not set
883 1162# CONFIG_AUXDISPLAY is not set
884# 1163CONFIG_REGULATOR=y
885# Voltage and Current regulators 1164# CONFIG_REGULATOR_DEBUG is not set
886#
887# CONFIG_REGULATOR is not set
888# CONFIG_REGULATOR_FIXED_VOLTAGE is not set 1165# CONFIG_REGULATOR_FIXED_VOLTAGE is not set
889# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set 1166# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
890# CONFIG_REGULATOR_BQ24022 is not set 1167# CONFIG_REGULATOR_BQ24022 is not set
1168CONFIG_REGULATOR_TWL4030=y
891# CONFIG_UIO is not set 1169# CONFIG_UIO is not set
1170# CONFIG_STAGING is not set
1171
1172#
1173# CBUS support
1174#
1175# CONFIG_CBUS is not set
892 1176
893# 1177#
894# File systems 1178# File systems
@@ -897,18 +1181,24 @@ CONFIG_EXT2_FS=y
897# CONFIG_EXT2_FS_XATTR is not set 1181# CONFIG_EXT2_FS_XATTR is not set
898# CONFIG_EXT2_FS_XIP is not set 1182# CONFIG_EXT2_FS_XIP is not set
899CONFIG_EXT3_FS=y 1183CONFIG_EXT3_FS=y
1184# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
900# CONFIG_EXT3_FS_XATTR is not set 1185# CONFIG_EXT3_FS_XATTR is not set
901# CONFIG_EXT4DEV_FS is not set 1186# CONFIG_EXT4_FS is not set
902CONFIG_JBD=y 1187CONFIG_JBD=y
903# CONFIG_REISERFS_FS is not set 1188# CONFIG_REISERFS_FS is not set
904# CONFIG_JFS_FS is not set 1189# CONFIG_JFS_FS is not set
905# CONFIG_FS_POSIX_ACL is not set 1190CONFIG_FS_POSIX_ACL=y
1191CONFIG_FILE_LOCKING=y
906# CONFIG_XFS_FS is not set 1192# CONFIG_XFS_FS is not set
1193# CONFIG_OCFS2_FS is not set
1194# CONFIG_BTRFS_FS is not set
907CONFIG_DNOTIFY=y 1195CONFIG_DNOTIFY=y
908CONFIG_INOTIFY=y 1196CONFIG_INOTIFY=y
909CONFIG_INOTIFY_USER=y 1197CONFIG_INOTIFY_USER=y
910CONFIG_QUOTA=y 1198CONFIG_QUOTA=y
1199# CONFIG_QUOTA_NETLINK_INTERFACE is not set
911CONFIG_PRINT_QUOTA_WARNING=y 1200CONFIG_PRINT_QUOTA_WARNING=y
1201CONFIG_QUOTA_TREE=y
912# CONFIG_QFMT_V1 is not set 1202# CONFIG_QFMT_V1 is not set
913CONFIG_QFMT_V2=y 1203CONFIG_QFMT_V2=y
914CONFIG_QUOTACTL=y 1204CONFIG_QUOTACTL=y
@@ -917,6 +1207,11 @@ CONFIG_QUOTACTL=y
917# CONFIG_FUSE_FS is not set 1207# CONFIG_FUSE_FS is not set
918 1208
919# 1209#
1210# Caches
1211#
1212# CONFIG_FSCACHE is not set
1213
1214#
920# CD-ROM/DVD Filesystems 1215# CD-ROM/DVD Filesystems
921# 1216#
922# CONFIG_ISO9660_FS is not set 1217# CONFIG_ISO9660_FS is not set
@@ -937,15 +1232,13 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
937# 1232#
938CONFIG_PROC_FS=y 1233CONFIG_PROC_FS=y
939CONFIG_PROC_SYSCTL=y 1234CONFIG_PROC_SYSCTL=y
1235CONFIG_PROC_PAGE_MONITOR=y
940CONFIG_SYSFS=y 1236CONFIG_SYSFS=y
941CONFIG_TMPFS=y 1237CONFIG_TMPFS=y
942# CONFIG_TMPFS_POSIX_ACL is not set 1238# CONFIG_TMPFS_POSIX_ACL is not set
943# CONFIG_HUGETLB_PAGE is not set 1239# CONFIG_HUGETLB_PAGE is not set
944# CONFIG_CONFIGFS_FS is not set 1240# CONFIG_CONFIGFS_FS is not set
945 1241CONFIG_MISC_FILESYSTEMS=y
946#
947# Miscellaneous filesystems
948#
949# CONFIG_ADFS_FS is not set 1242# CONFIG_ADFS_FS is not set
950# CONFIG_AFFS_FS is not set 1243# CONFIG_AFFS_FS is not set
951# CONFIG_HFS_FS is not set 1244# CONFIG_HFS_FS is not set
@@ -954,6 +1247,7 @@ CONFIG_TMPFS=y
954# CONFIG_BFS_FS is not set 1247# CONFIG_BFS_FS is not set
955# CONFIG_EFS_FS is not set 1248# CONFIG_EFS_FS is not set
956# CONFIG_CRAMFS is not set 1249# CONFIG_CRAMFS is not set
1250# CONFIG_SQUASHFS is not set
957# CONFIG_VXFS_FS is not set 1251# CONFIG_VXFS_FS is not set
958# CONFIG_MINIX_FS is not set 1252# CONFIG_MINIX_FS is not set
959# CONFIG_OMFS_FS is not set 1253# CONFIG_OMFS_FS is not set
@@ -962,6 +1256,7 @@ CONFIG_TMPFS=y
962# CONFIG_ROMFS_FS is not set 1256# CONFIG_ROMFS_FS is not set
963# CONFIG_SYSV_FS is not set 1257# CONFIG_SYSV_FS is not set
964# CONFIG_UFS_FS is not set 1258# CONFIG_UFS_FS is not set
1259# CONFIG_NILFS2_FS is not set
965CONFIG_NETWORK_FILESYSTEMS=y 1260CONFIG_NETWORK_FILESYSTEMS=y
966CONFIG_NFS_FS=y 1261CONFIG_NFS_FS=y
967CONFIG_NFS_V3=y 1262CONFIG_NFS_V3=y
@@ -975,7 +1270,6 @@ CONFIG_NFS_ACL_SUPPORT=y
975CONFIG_NFS_COMMON=y 1270CONFIG_NFS_COMMON=y
976CONFIG_SUNRPC=y 1271CONFIG_SUNRPC=y
977CONFIG_SUNRPC_GSS=y 1272CONFIG_SUNRPC_GSS=y
978# CONFIG_SUNRPC_REGISTER_V4 is not set
979CONFIG_RPCSEC_GSS_KRB5=y 1273CONFIG_RPCSEC_GSS_KRB5=y
980# CONFIG_RPCSEC_GSS_SPKM3 is not set 1274# CONFIG_RPCSEC_GSS_SPKM3 is not set
981# CONFIG_SMB_FS is not set 1275# CONFIG_SMB_FS is not set
@@ -1045,6 +1339,7 @@ CONFIG_NLS_ISO8859_1=y
1045# CONFIG_NLS_KOI8_R is not set 1339# CONFIG_NLS_KOI8_R is not set
1046# CONFIG_NLS_KOI8_U is not set 1340# CONFIG_NLS_KOI8_U is not set
1047# CONFIG_NLS_UTF8 is not set 1341# CONFIG_NLS_UTF8 is not set
1342# CONFIG_DLM is not set
1048 1343
1049# 1344#
1050# Kernel hacking 1345# Kernel hacking
@@ -1062,6 +1357,9 @@ CONFIG_DEBUG_KERNEL=y
1062CONFIG_DETECT_SOFTLOCKUP=y 1357CONFIG_DETECT_SOFTLOCKUP=y
1063# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set 1358# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
1064CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0 1359CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
1360CONFIG_DETECT_HUNG_TASK=y
1361# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
1362CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
1065CONFIG_SCHED_DEBUG=y 1363CONFIG_SCHED_DEBUG=y
1066# CONFIG_SCHEDSTATS is not set 1364# CONFIG_SCHEDSTATS is not set
1067# CONFIG_TIMER_STATS is not set 1365# CONFIG_TIMER_STATS is not set
@@ -1084,21 +1382,36 @@ CONFIG_DEBUG_INFO=y
1084# CONFIG_DEBUG_MEMORY_INIT is not set 1382# CONFIG_DEBUG_MEMORY_INIT is not set
1085# CONFIG_DEBUG_LIST is not set 1383# CONFIG_DEBUG_LIST is not set
1086# CONFIG_DEBUG_SG is not set 1384# CONFIG_DEBUG_SG is not set
1087CONFIG_FRAME_POINTER=y 1385# CONFIG_DEBUG_NOTIFIERS is not set
1088# CONFIG_BOOT_PRINTK_DELAY is not set 1386# CONFIG_BOOT_PRINTK_DELAY is not set
1089# CONFIG_RCU_TORTURE_TEST is not set 1387# CONFIG_RCU_TORTURE_TEST is not set
1388# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1090# CONFIG_BACKTRACE_SELF_TEST is not set 1389# CONFIG_BACKTRACE_SELF_TEST is not set
1390# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
1091# CONFIG_FAULT_INJECTION is not set 1391# CONFIG_FAULT_INJECTION is not set
1092# CONFIG_LATENCYTOP is not set 1392# CONFIG_LATENCYTOP is not set
1093CONFIG_HAVE_FTRACE=y 1393# CONFIG_PAGE_POISONING is not set
1094CONFIG_HAVE_DYNAMIC_FTRACE=y 1394CONFIG_HAVE_FUNCTION_TRACER=y
1095# CONFIG_FTRACE is not set 1395CONFIG_TRACING_SUPPORT=y
1396
1397#
1398# Tracers
1399#
1400# CONFIG_FUNCTION_TRACER is not set
1096# CONFIG_IRQSOFF_TRACER is not set 1401# CONFIG_IRQSOFF_TRACER is not set
1097# CONFIG_SCHED_TRACER is not set 1402# CONFIG_SCHED_TRACER is not set
1098# CONFIG_CONTEXT_SWITCH_TRACER is not set 1403# CONFIG_CONTEXT_SWITCH_TRACER is not set
1404# CONFIG_EVENT_TRACER is not set
1405# CONFIG_BOOT_TRACER is not set
1406# CONFIG_TRACE_BRANCH_PROFILING is not set
1407# CONFIG_STACK_TRACER is not set
1408# CONFIG_KMEMTRACE is not set
1409# CONFIG_WORKQUEUE_TRACER is not set
1410# CONFIG_BLK_DEV_IO_TRACE is not set
1099# CONFIG_SAMPLES is not set 1411# CONFIG_SAMPLES is not set
1100CONFIG_HAVE_ARCH_KGDB=y 1412CONFIG_HAVE_ARCH_KGDB=y
1101# CONFIG_KGDB is not set 1413# CONFIG_KGDB is not set
1414CONFIG_ARM_UNWIND=y
1102# CONFIG_DEBUG_USER is not set 1415# CONFIG_DEBUG_USER is not set
1103# CONFIG_DEBUG_ERRORS is not set 1416# CONFIG_DEBUG_ERRORS is not set
1104# CONFIG_DEBUG_STACK_USAGE is not set 1417# CONFIG_DEBUG_STACK_USAGE is not set
@@ -1110,17 +1423,28 @@ CONFIG_DEBUG_LL=y
1110# 1423#
1111# CONFIG_KEYS is not set 1424# CONFIG_KEYS is not set
1112# CONFIG_SECURITY is not set 1425# CONFIG_SECURITY is not set
1426# CONFIG_SECURITYFS is not set
1113# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1427# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1114CONFIG_CRYPTO=y 1428CONFIG_CRYPTO=y
1115 1429
1116# 1430#
1117# Crypto core or helper 1431# Crypto core or helper
1118# 1432#
1433# CONFIG_CRYPTO_FIPS is not set
1119CONFIG_CRYPTO_ALGAPI=y 1434CONFIG_CRYPTO_ALGAPI=y
1435CONFIG_CRYPTO_ALGAPI2=y
1436CONFIG_CRYPTO_AEAD2=y
1120CONFIG_CRYPTO_BLKCIPHER=y 1437CONFIG_CRYPTO_BLKCIPHER=y
1438CONFIG_CRYPTO_BLKCIPHER2=y
1439CONFIG_CRYPTO_HASH=y
1440CONFIG_CRYPTO_HASH2=y
1441CONFIG_CRYPTO_RNG2=y
1442CONFIG_CRYPTO_PCOMP=y
1121CONFIG_CRYPTO_MANAGER=y 1443CONFIG_CRYPTO_MANAGER=y
1444CONFIG_CRYPTO_MANAGER2=y
1122# CONFIG_CRYPTO_GF128MUL is not set 1445# CONFIG_CRYPTO_GF128MUL is not set
1123# CONFIG_CRYPTO_NULL is not set 1446# CONFIG_CRYPTO_NULL is not set
1447CONFIG_CRYPTO_WORKQUEUE=y
1124# CONFIG_CRYPTO_CRYPTD is not set 1448# CONFIG_CRYPTO_CRYPTD is not set
1125# CONFIG_CRYPTO_AUTHENC is not set 1449# CONFIG_CRYPTO_AUTHENC is not set
1126# CONFIG_CRYPTO_TEST is not set 1450# CONFIG_CRYPTO_TEST is not set
@@ -1152,7 +1476,7 @@ CONFIG_CRYPTO_PCBC=m
1152# 1476#
1153# Digest 1477# Digest
1154# 1478#
1155# CONFIG_CRYPTO_CRC32C is not set 1479CONFIG_CRYPTO_CRC32C=y
1156# CONFIG_CRYPTO_MD4 is not set 1480# CONFIG_CRYPTO_MD4 is not set
1157CONFIG_CRYPTO_MD5=y 1481CONFIG_CRYPTO_MD5=y
1158# CONFIG_CRYPTO_MICHAEL_MIC is not set 1482# CONFIG_CRYPTO_MICHAEL_MIC is not set
@@ -1189,15 +1513,21 @@ CONFIG_CRYPTO_DES=y
1189# Compression 1513# Compression
1190# 1514#
1191# CONFIG_CRYPTO_DEFLATE is not set 1515# CONFIG_CRYPTO_DEFLATE is not set
1516# CONFIG_CRYPTO_ZLIB is not set
1192# CONFIG_CRYPTO_LZO is not set 1517# CONFIG_CRYPTO_LZO is not set
1518
1519#
1520# Random Number Generation
1521#
1522# CONFIG_CRYPTO_ANSI_CPRNG is not set
1193CONFIG_CRYPTO_HW=y 1523CONFIG_CRYPTO_HW=y
1524# CONFIG_BINARY_PRINTF is not set
1194 1525
1195# 1526#
1196# Library routines 1527# Library routines
1197# 1528#
1198CONFIG_BITREVERSE=y 1529CONFIG_BITREVERSE=y
1199# CONFIG_GENERIC_FIND_FIRST_BIT is not set 1530CONFIG_GENERIC_FIND_LAST_BIT=y
1200# CONFIG_GENERIC_FIND_NEXT_BIT is not set
1201CONFIG_CRC_CCITT=y 1531CONFIG_CRC_CCITT=y
1202# CONFIG_CRC16 is not set 1532# CONFIG_CRC16 is not set
1203CONFIG_CRC_T10DIF=y 1533CONFIG_CRC_T10DIF=y
@@ -1205,7 +1535,9 @@ CONFIG_CRC_T10DIF=y
1205CONFIG_CRC32=y 1535CONFIG_CRC32=y
1206# CONFIG_CRC7 is not set 1536# CONFIG_CRC7 is not set
1207CONFIG_LIBCRC32C=y 1537CONFIG_LIBCRC32C=y
1208CONFIG_PLIST=y 1538CONFIG_ZLIB_INFLATE=y
1539CONFIG_DECOMPRESS_GZIP=y
1209CONFIG_HAS_IOMEM=y 1540CONFIG_HAS_IOMEM=y
1210CONFIG_HAS_IOPORT=y 1541CONFIG_HAS_IOPORT=y
1211CONFIG_HAS_DMA=y 1542CONFIG_HAS_DMA=y
1543CONFIG_NLATTR=y
diff --git a/arch/arm/configs/pxa3xx_defconfig b/arch/arm/configs/pxa3xx_defconfig
new file mode 100644
index 000000000000..733b851e5b7e
--- /dev/null
+++ b/arch/arm/configs/pxa3xx_defconfig
@@ -0,0 +1,1332 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.31-rc1
4# Mon Jul 13 22:48:49 2009
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
13CONFIG_GENERIC_HARDIRQS=y
14CONFIG_STACKTRACE_SUPPORT=y
15CONFIG_HAVE_LATENCYTOP_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
21CONFIG_GENERIC_HWEIGHT=y
22CONFIG_GENERIC_CALIBRATE_DELAY=y
23CONFIG_ARCH_MTD_XIP=y
24CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
25CONFIG_VECTORS_BASE=0xffff0000
26CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
27CONFIG_CONSTRUCTORS=y
28
29#
30# General setup
31#
32CONFIG_EXPERIMENTAL=y
33CONFIG_BROKEN_ON_SMP=y
34CONFIG_LOCK_KERNEL=y
35CONFIG_INIT_ENV_ARG_LIMIT=32
36CONFIG_LOCALVERSION=""
37CONFIG_LOCALVERSION_AUTO=y
38CONFIG_SWAP=y
39CONFIG_SYSVIPC=y
40CONFIG_SYSVIPC_SYSCTL=y
41# CONFIG_POSIX_MQUEUE is not set
42# CONFIG_BSD_PROCESS_ACCT is not set
43# CONFIG_TASKSTATS is not set
44# CONFIG_AUDIT is not set
45
46#
47# RCU Subsystem
48#
49# CONFIG_CLASSIC_RCU is not set
50CONFIG_TREE_RCU=y
51# CONFIG_PREEMPT_RCU is not set
52# CONFIG_RCU_TRACE is not set
53CONFIG_RCU_FANOUT=32
54# CONFIG_RCU_FANOUT_EXACT is not set
55# CONFIG_TREE_RCU_TRACE is not set
56# CONFIG_PREEMPT_RCU_TRACE is not set
57# CONFIG_IKCONFIG is not set
58CONFIG_LOG_BUF_SHIFT=18
59CONFIG_GROUP_SCHED=y
60CONFIG_FAIR_GROUP_SCHED=y
61# CONFIG_RT_GROUP_SCHED is not set
62CONFIG_USER_SCHED=y
63# CONFIG_CGROUP_SCHED is not set
64# CONFIG_CGROUPS is not set
65CONFIG_SYSFS_DEPRECATED=y
66CONFIG_SYSFS_DEPRECATED_V2=y
67# CONFIG_RELAY is not set
68CONFIG_NAMESPACES=y
69# CONFIG_UTS_NS is not set
70# CONFIG_IPC_NS is not set
71# CONFIG_USER_NS is not set
72# CONFIG_PID_NS is not set
73# CONFIG_NET_NS is not set
74# CONFIG_BLK_DEV_INITRD is not set
75# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
76CONFIG_SYSCTL=y
77CONFIG_ANON_INODES=y
78# CONFIG_EMBEDDED is not set
79CONFIG_UID16=y
80CONFIG_SYSCTL_SYSCALL=y
81CONFIG_KALLSYMS=y
82CONFIG_KALLSYMS_ALL=y
83# CONFIG_KALLSYMS_EXTRA_PASS is not set
84CONFIG_HOTPLUG=y
85CONFIG_PRINTK=y
86CONFIG_BUG=y
87CONFIG_ELF_CORE=y
88CONFIG_BASE_FULL=y
89CONFIG_FUTEX=y
90CONFIG_EPOLL=y
91CONFIG_SIGNALFD=y
92CONFIG_TIMERFD=y
93CONFIG_EVENTFD=y
94CONFIG_SHMEM=y
95CONFIG_AIO=y
96
97#
98# Performance Counters
99#
100CONFIG_VM_EVENT_COUNTERS=y
101# CONFIG_STRIP_ASM_SYMS is not set
102CONFIG_COMPAT_BRK=y
103CONFIG_SLAB=y
104# CONFIG_SLUB is not set
105# CONFIG_SLOB is not set
106# CONFIG_PROFILING is not set
107# CONFIG_MARKERS is not set
108CONFIG_HAVE_OPROFILE=y
109# CONFIG_KPROBES is not set
110CONFIG_HAVE_KPROBES=y
111CONFIG_HAVE_KRETPROBES=y
112CONFIG_HAVE_CLK=y
113
114#
115# GCOV-based kernel profiling
116#
117# CONFIG_SLOW_WORK is not set
118CONFIG_HAVE_GENERIC_DMA_COHERENT=y
119CONFIG_SLABINFO=y
120CONFIG_RT_MUTEXES=y
121CONFIG_BASE_SMALL=0
122CONFIG_MODULES=y
123# CONFIG_MODULE_FORCE_LOAD is not set
124# CONFIG_MODULE_UNLOAD is not set
125# CONFIG_MODVERSIONS is not set
126# CONFIG_MODULE_SRCVERSION_ALL is not set
127CONFIG_BLOCK=y
128CONFIG_LBDAF=y
129# CONFIG_BLK_DEV_BSG is not set
130# CONFIG_BLK_DEV_INTEGRITY is not set
131
132#
133# IO Schedulers
134#
135CONFIG_IOSCHED_NOOP=y
136CONFIG_IOSCHED_AS=y
137CONFIG_IOSCHED_DEADLINE=y
138CONFIG_IOSCHED_CFQ=y
139# CONFIG_DEFAULT_AS is not set
140# CONFIG_DEFAULT_DEADLINE is not set
141CONFIG_DEFAULT_CFQ=y
142# CONFIG_DEFAULT_NOOP is not set
143CONFIG_DEFAULT_IOSCHED="cfq"
144# CONFIG_FREEZER is not set
145
146#
147# System Type
148#
149# CONFIG_ARCH_AAEC2000 is not set
150# CONFIG_ARCH_INTEGRATOR is not set
151# CONFIG_ARCH_REALVIEW is not set
152# CONFIG_ARCH_VERSATILE is not set
153# CONFIG_ARCH_AT91 is not set
154# CONFIG_ARCH_CLPS711X is not set
155# CONFIG_ARCH_GEMINI is not set
156# CONFIG_ARCH_EBSA110 is not set
157# CONFIG_ARCH_EP93XX is not set
158# CONFIG_ARCH_FOOTBRIDGE is not set
159# CONFIG_ARCH_MXC is not set
160# CONFIG_ARCH_STMP3XXX is not set
161# CONFIG_ARCH_NETX is not set
162# CONFIG_ARCH_H720X is not set
163# CONFIG_ARCH_IOP13XX is not set
164# CONFIG_ARCH_IOP32X is not set
165# CONFIG_ARCH_IOP33X is not set
166# CONFIG_ARCH_IXP23XX is not set
167# CONFIG_ARCH_IXP2000 is not set
168# CONFIG_ARCH_IXP4XX is not set
169# CONFIG_ARCH_L7200 is not set
170# CONFIG_ARCH_KIRKWOOD is not set
171# CONFIG_ARCH_LOKI is not set
172# CONFIG_ARCH_MV78XX0 is not set
173# CONFIG_ARCH_ORION5X is not set
174# CONFIG_ARCH_MMP is not set
175# CONFIG_ARCH_KS8695 is not set
176# CONFIG_ARCH_NS9XXX is not set
177# CONFIG_ARCH_W90X900 is not set
178# CONFIG_ARCH_PNX4008 is not set
179CONFIG_ARCH_PXA=y
180# CONFIG_ARCH_MSM is not set
181# CONFIG_ARCH_RPC is not set
182# CONFIG_ARCH_SA1100 is not set
183# CONFIG_ARCH_S3C2410 is not set
184# CONFIG_ARCH_S3C64XX is not set
185# CONFIG_ARCH_SHARK is not set
186# CONFIG_ARCH_LH7A40X is not set
187# CONFIG_ARCH_U300 is not set
188# CONFIG_ARCH_DAVINCI is not set
189# CONFIG_ARCH_OMAP is not set
190
191#
192# Intel PXA2xx/PXA3xx Implementations
193#
194
195#
196# Supported PXA3xx Processor Variants
197#
198CONFIG_CPU_PXA300=y
199CONFIG_CPU_PXA310=y
200CONFIG_CPU_PXA320=y
201CONFIG_CPU_PXA930=y
202CONFIG_CPU_PXA935=y
203# CONFIG_ARCH_GUMSTIX is not set
204# CONFIG_MACH_INTELMOTE2 is not set
205# CONFIG_MACH_STARGATE2 is not set
206# CONFIG_ARCH_LUBBOCK is not set
207# CONFIG_MACH_LOGICPD_PXA270 is not set
208# CONFIG_MACH_MAINSTONE is not set
209# CONFIG_MACH_MP900C is not set
210# CONFIG_ARCH_PXA_IDP is not set
211# CONFIG_PXA_SHARPSL is not set
212# CONFIG_ARCH_VIPER is not set
213# CONFIG_ARCH_PXA_ESERIES is not set
214# CONFIG_TRIZEPS_PXA is not set
215# CONFIG_MACH_H5000 is not set
216# CONFIG_MACH_EM_X270 is not set
217# CONFIG_MACH_EXEDA is not set
218# CONFIG_MACH_COLIBRI is not set
219# CONFIG_MACH_COLIBRI300 is not set
220# CONFIG_MACH_COLIBRI320 is not set
221CONFIG_MACH_ZYLONITE=y
222CONFIG_MACH_LITTLETON=y
223CONFIG_MACH_TAVOREVB=y
224CONFIG_MACH_SAAR=y
225# CONFIG_MACH_ARMCORE is not set
226# CONFIG_MACH_CM_X300 is not set
227# CONFIG_MACH_H4700 is not set
228# CONFIG_MACH_MAGICIAN is not set
229# CONFIG_MACH_HIMALAYA is not set
230# CONFIG_MACH_MIOA701 is not set
231# CONFIG_MACH_PCM027 is not set
232# CONFIG_ARCH_PXA_PALM is not set
233# CONFIG_MACH_CSB726 is not set
234# CONFIG_PXA_EZX is not set
235CONFIG_PXA3xx=y
236CONFIG_PXA_SSP=y
237CONFIG_PXA_HAVE_BOARD_IRQS=y
238CONFIG_PLAT_PXA=y
239
240#
241# Processor Type
242#
243CONFIG_CPU_32=y
244CONFIG_CPU_XSC3=y
245CONFIG_CPU_32v5=y
246CONFIG_CPU_ABRT_EV5T=y
247CONFIG_CPU_PABRT_NOIFAR=y
248CONFIG_CPU_CACHE_VIVT=y
249CONFIG_CPU_TLB_V4WBI=y
250CONFIG_CPU_CP15=y
251CONFIG_CPU_CP15_MMU=y
252CONFIG_IO_36=y
253
254#
255# Processor Features
256#
257CONFIG_ARM_THUMB=y
258# CONFIG_CPU_DCACHE_DISABLE is not set
259# CONFIG_CPU_BPREDICT_DISABLE is not set
260CONFIG_OUTER_CACHE=y
261CONFIG_CACHE_XSC3L2=y
262CONFIG_IWMMXT=y
263CONFIG_COMMON_CLKDEV=y
264
265#
266# Bus support
267#
268# CONFIG_PCI_SYSCALL is not set
269# CONFIG_ARCH_SUPPORTS_MSI is not set
270# CONFIG_PCCARD is not set
271
272#
273# Kernel Features
274#
275CONFIG_TICK_ONESHOT=y
276# CONFIG_NO_HZ is not set
277# CONFIG_HIGH_RES_TIMERS is not set
278CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
279CONFIG_VMSPLIT_3G=y
280# CONFIG_VMSPLIT_2G is not set
281# CONFIG_VMSPLIT_1G is not set
282CONFIG_PAGE_OFFSET=0xC0000000
283CONFIG_PREEMPT=y
284CONFIG_HZ=100
285CONFIG_AEABI=y
286CONFIG_OABI_COMPAT=y
287# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
288# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
289# CONFIG_HIGHMEM is not set
290CONFIG_SELECT_MEMORY_MODEL=y
291CONFIG_FLATMEM_MANUAL=y
292# CONFIG_DISCONTIGMEM_MANUAL is not set
293# CONFIG_SPARSEMEM_MANUAL is not set
294CONFIG_FLATMEM=y
295CONFIG_FLAT_NODE_MEM_MAP=y
296CONFIG_PAGEFLAGS_EXTENDED=y
297CONFIG_SPLIT_PTLOCK_CPUS=4096
298# CONFIG_PHYS_ADDR_T_64BIT is not set
299CONFIG_ZONE_DMA_FLAG=0
300CONFIG_VIRT_TO_BUS=y
301CONFIG_HAVE_MLOCK=y
302CONFIG_HAVE_MLOCKED_PAGE_BIT=y
303CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
304CONFIG_ALIGNMENT_TRAP=y
305# CONFIG_UACCESS_WITH_MEMCPY is not set
306
307#
308# Boot options
309#
310CONFIG_ZBOOT_ROM_TEXT=0x0
311CONFIG_ZBOOT_ROM_BSS=0x0
312CONFIG_CMDLINE="root=/dev/nfs rootfstype=nfs nfsroot=192.168.1.100:/nfsroot/ ip=192.168.1.101:192.168.1.100::255.255.255.0::eth0:on console=ttyS0,115200 mem=64M debug"
313# CONFIG_XIP_KERNEL is not set
314# CONFIG_KEXEC is not set
315
316#
317# CPU Power Management
318#
319# CONFIG_CPU_FREQ is not set
320# CONFIG_CPU_IDLE is not set
321
322#
323# Floating point emulation
324#
325
326#
327# At least one emulation must be selected
328#
329CONFIG_FPE_NWFPE=y
330# CONFIG_FPE_NWFPE_XP is not set
331# CONFIG_FPE_FASTFPE is not set
332
333#
334# Userspace binary formats
335#
336CONFIG_BINFMT_ELF=y
337# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
338CONFIG_HAVE_AOUT=y
339# CONFIG_BINFMT_AOUT is not set
340# CONFIG_BINFMT_MISC is not set
341
342#
343# Power management options
344#
345# CONFIG_PM is not set
346CONFIG_ARCH_SUSPEND_POSSIBLE=y
347CONFIG_NET=y
348
349#
350# Networking options
351#
352CONFIG_PACKET=y
353# CONFIG_PACKET_MMAP is not set
354CONFIG_UNIX=y
355# CONFIG_NET_KEY is not set
356CONFIG_INET=y
357# CONFIG_IP_MULTICAST is not set
358# CONFIG_IP_ADVANCED_ROUTER is not set
359CONFIG_IP_FIB_HASH=y
360CONFIG_IP_PNP=y
361# CONFIG_IP_PNP_DHCP is not set
362# CONFIG_IP_PNP_BOOTP is not set
363# CONFIG_IP_PNP_RARP is not set
364# CONFIG_NET_IPIP is not set
365# CONFIG_NET_IPGRE is not set
366# CONFIG_ARPD is not set
367# CONFIG_SYN_COOKIES is not set
368# CONFIG_INET_AH is not set
369# CONFIG_INET_ESP is not set
370# CONFIG_INET_IPCOMP is not set
371# CONFIG_INET_XFRM_TUNNEL is not set
372# CONFIG_INET_TUNNEL is not set
373# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
374# CONFIG_INET_XFRM_MODE_TUNNEL is not set
375# CONFIG_INET_XFRM_MODE_BEET is not set
376# CONFIG_INET_LRO is not set
377# CONFIG_INET_DIAG is not set
378# CONFIG_TCP_CONG_ADVANCED is not set
379CONFIG_TCP_CONG_CUBIC=y
380CONFIG_DEFAULT_TCP_CONG="cubic"
381# CONFIG_TCP_MD5SIG is not set
382# CONFIG_IPV6 is not set
383# CONFIG_NETWORK_SECMARK is not set
384# CONFIG_NETFILTER is not set
385# CONFIG_IP_DCCP is not set
386# CONFIG_IP_SCTP is not set
387# CONFIG_TIPC is not set
388# CONFIG_ATM is not set
389# CONFIG_BRIDGE is not set
390# CONFIG_NET_DSA is not set
391# CONFIG_VLAN_8021Q is not set
392# CONFIG_DECNET is not set
393# CONFIG_LLC2 is not set
394# CONFIG_IPX is not set
395# CONFIG_ATALK is not set
396# CONFIG_X25 is not set
397# CONFIG_LAPB is not set
398# CONFIG_ECONET is not set
399# CONFIG_WAN_ROUTER is not set
400# CONFIG_PHONET is not set
401# CONFIG_IEEE802154 is not set
402# CONFIG_NET_SCHED is not set
403# CONFIG_DCB is not set
404
405#
406# Network testing
407#
408# CONFIG_NET_PKTGEN is not set
409# CONFIG_HAMRADIO is not set
410# CONFIG_CAN is not set
411# CONFIG_IRDA is not set
412# CONFIG_BT is not set
413# CONFIG_AF_RXRPC is not set
414# CONFIG_WIRELESS is not set
415# CONFIG_WIMAX is not set
416# CONFIG_RFKILL is not set
417# CONFIG_NET_9P is not set
418
419#
420# Device Drivers
421#
422
423#
424# Generic Driver Options
425#
426CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
427# CONFIG_STANDALONE is not set
428# CONFIG_PREVENT_FIRMWARE_BUILD is not set
429CONFIG_FW_LOADER=y
430CONFIG_FIRMWARE_IN_KERNEL=y
431CONFIG_EXTRA_FIRMWARE=""
432# CONFIG_DEBUG_DRIVER is not set
433# CONFIG_DEBUG_DEVRES is not set
434# CONFIG_SYS_HYPERVISOR is not set
435# CONFIG_CONNECTOR is not set
436CONFIG_MTD=y
437# CONFIG_MTD_DEBUG is not set
438CONFIG_MTD_CONCAT=y
439CONFIG_MTD_PARTITIONS=y
440# CONFIG_MTD_TESTS is not set
441# CONFIG_MTD_REDBOOT_PARTS is not set
442# CONFIG_MTD_CMDLINE_PARTS is not set
443# CONFIG_MTD_AFS_PARTS is not set
444# CONFIG_MTD_AR7_PARTS is not set
445
446#
447# User Modules And Translation Layers
448#
449CONFIG_MTD_CHAR=y
450CONFIG_MTD_BLKDEVS=y
451CONFIG_MTD_BLOCK=y
452# CONFIG_FTL is not set
453# CONFIG_NFTL is not set
454# CONFIG_INFTL is not set
455# CONFIG_RFD_FTL is not set
456# CONFIG_SSFDC is not set
457# CONFIG_MTD_OOPS is not set
458
459#
460# RAM/ROM/Flash chip drivers
461#
462# CONFIG_MTD_CFI is not set
463# CONFIG_MTD_JEDECPROBE is not set
464CONFIG_MTD_MAP_BANK_WIDTH_1=y
465CONFIG_MTD_MAP_BANK_WIDTH_2=y
466CONFIG_MTD_MAP_BANK_WIDTH_4=y
467# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
468# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
469# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
470CONFIG_MTD_CFI_I1=y
471CONFIG_MTD_CFI_I2=y
472# CONFIG_MTD_CFI_I4 is not set
473# CONFIG_MTD_CFI_I8 is not set
474# CONFIG_MTD_RAM is not set
475# CONFIG_MTD_ROM is not set
476# CONFIG_MTD_ABSENT is not set
477
478#
479# Mapping drivers for chip access
480#
481# CONFIG_MTD_COMPLEX_MAPPINGS is not set
482# CONFIG_MTD_PLATRAM is not set
483
484#
485# Self-contained MTD device drivers
486#
487# CONFIG_MTD_DATAFLASH is not set
488# CONFIG_MTD_M25P80 is not set
489# CONFIG_MTD_SLRAM is not set
490# CONFIG_MTD_PHRAM is not set
491# CONFIG_MTD_MTDRAM is not set
492# CONFIG_MTD_BLOCK2MTD is not set
493
494#
495# Disk-On-Chip Device Drivers
496#
497# CONFIG_MTD_DOC2000 is not set
498# CONFIG_MTD_DOC2001 is not set
499# CONFIG_MTD_DOC2001PLUS is not set
500CONFIG_MTD_NAND=y
501CONFIG_MTD_NAND_VERIFY_WRITE=y
502# CONFIG_MTD_NAND_ECC_SMC is not set
503# CONFIG_MTD_NAND_MUSEUM_IDS is not set
504# CONFIG_MTD_NAND_H1900 is not set
505# CONFIG_MTD_NAND_GPIO is not set
506CONFIG_MTD_NAND_IDS=y
507# CONFIG_MTD_NAND_DISKONCHIP is not set
508# CONFIG_MTD_NAND_SHARPSL is not set
509CONFIG_MTD_NAND_PXA3xx=y
510CONFIG_MTD_NAND_PXA3xx_BUILTIN=y
511# CONFIG_MTD_NAND_NANDSIM is not set
512# CONFIG_MTD_NAND_PLATFORM is not set
513CONFIG_MTD_ONENAND=y
514CONFIG_MTD_ONENAND_VERIFY_WRITE=y
515CONFIG_MTD_ONENAND_GENERIC=y
516# CONFIG_MTD_ONENAND_OTP is not set
517# CONFIG_MTD_ONENAND_2X_PROGRAM is not set
518# CONFIG_MTD_ONENAND_SIM is not set
519
520#
521# LPDDR flash memory drivers
522#
523# CONFIG_MTD_LPDDR is not set
524
525#
526# UBI - Unsorted block images
527#
528# CONFIG_MTD_UBI is not set
529# CONFIG_PARPORT is not set
530CONFIG_BLK_DEV=y
531# CONFIG_BLK_DEV_COW_COMMON is not set
532CONFIG_BLK_DEV_LOOP=y
533# CONFIG_BLK_DEV_CRYPTOLOOP is not set
534# CONFIG_BLK_DEV_NBD is not set
535CONFIG_BLK_DEV_RAM=y
536CONFIG_BLK_DEV_RAM_COUNT=16
537CONFIG_BLK_DEV_RAM_SIZE=4096
538# CONFIG_BLK_DEV_XIP is not set
539# CONFIG_CDROM_PKTCDVD is not set
540# CONFIG_ATA_OVER_ETH is not set
541# CONFIG_MG_DISK is not set
542# CONFIG_MISC_DEVICES is not set
543CONFIG_HAVE_IDE=y
544# CONFIG_IDE is not set
545
546#
547# SCSI device support
548#
549# CONFIG_RAID_ATTRS is not set
550# CONFIG_SCSI is not set
551# CONFIG_SCSI_DMA is not set
552# CONFIG_SCSI_NETLINK is not set
553# CONFIG_ATA is not set
554# CONFIG_MD is not set
555CONFIG_NETDEVICES=y
556# CONFIG_DUMMY is not set
557# CONFIG_BONDING is not set
558# CONFIG_MACVLAN is not set
559# CONFIG_EQUALIZER is not set
560# CONFIG_TUN is not set
561# CONFIG_VETH is not set
562# CONFIG_PHYLIB is not set
563CONFIG_NET_ETHERNET=y
564CONFIG_MII=y
565# CONFIG_AX88796 is not set
566CONFIG_SMC91X=y
567# CONFIG_DM9000 is not set
568# CONFIG_ENC28J60 is not set
569# CONFIG_ETHOC is not set
570# CONFIG_SMC911X is not set
571# CONFIG_SMSC911X is not set
572# CONFIG_DNET is not set
573# CONFIG_IBM_NEW_EMAC_ZMII is not set
574# CONFIG_IBM_NEW_EMAC_RGMII is not set
575# CONFIG_IBM_NEW_EMAC_TAH is not set
576# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
577# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
578# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
579# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
580# CONFIG_B44 is not set
581# CONFIG_KS8842 is not set
582# CONFIG_NETDEV_1000 is not set
583# CONFIG_NETDEV_10000 is not set
584
585#
586# Wireless LAN
587#
588# CONFIG_WLAN_PRE80211 is not set
589# CONFIG_WLAN_80211 is not set
590
591#
592# Enable WiMAX (Networking options) to see the WiMAX drivers
593#
594# CONFIG_WAN is not set
595# CONFIG_PPP is not set
596# CONFIG_SLIP is not set
597# CONFIG_NETCONSOLE is not set
598# CONFIG_NETPOLL is not set
599# CONFIG_NET_POLL_CONTROLLER is not set
600# CONFIG_ISDN is not set
601
602#
603# Input device support
604#
605CONFIG_INPUT=y
606# CONFIG_INPUT_FF_MEMLESS is not set
607# CONFIG_INPUT_POLLDEV is not set
608
609#
610# Userland interfaces
611#
612CONFIG_INPUT_MOUSEDEV=y
613# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
614CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
615CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
616# CONFIG_INPUT_JOYDEV is not set
617# CONFIG_INPUT_EVDEV is not set
618# CONFIG_INPUT_EVBUG is not set
619
620#
621# Input Device Drivers
622#
623CONFIG_INPUT_KEYBOARD=y
624# CONFIG_KEYBOARD_ATKBD is not set
625# CONFIG_KEYBOARD_SUNKBD is not set
626# CONFIG_KEYBOARD_LKKBD is not set
627# CONFIG_KEYBOARD_XTKBD is not set
628# CONFIG_KEYBOARD_NEWTON is not set
629# CONFIG_KEYBOARD_STOWAWAY is not set
630# CONFIG_KEYBOARD_LM8323 is not set
631CONFIG_KEYBOARD_PXA27x=y
632CONFIG_KEYBOARD_PXA930_ROTARY=y
633CONFIG_KEYBOARD_GPIO=y
634CONFIG_INPUT_MOUSE=y
635CONFIG_MOUSE_PS2=y
636CONFIG_MOUSE_PS2_ALPS=y
637CONFIG_MOUSE_PS2_LOGIPS2PP=y
638CONFIG_MOUSE_PS2_SYNAPTICS=y
639CONFIG_MOUSE_PS2_TRACKPOINT=y
640# CONFIG_MOUSE_PS2_ELANTECH is not set
641# CONFIG_MOUSE_PS2_TOUCHKIT is not set
642# CONFIG_MOUSE_SERIAL is not set
643# CONFIG_MOUSE_VSXXXAA is not set
644# CONFIG_MOUSE_GPIO is not set
645CONFIG_MOUSE_PXA930_TRKBALL=y
646# CONFIG_MOUSE_SYNAPTICS_I2C is not set
647# CONFIG_INPUT_JOYSTICK is not set
648# CONFIG_INPUT_TABLET is not set
649CONFIG_INPUT_TOUCHSCREEN=y
650# CONFIG_TOUCHSCREEN_ADS7846 is not set
651# CONFIG_TOUCHSCREEN_AD7877 is not set
652# CONFIG_TOUCHSCREEN_AD7879_I2C is not set
653# CONFIG_TOUCHSCREEN_AD7879_SPI is not set
654# CONFIG_TOUCHSCREEN_AD7879 is not set
655CONFIG_TOUCHSCREEN_DA9034=y
656# CONFIG_TOUCHSCREEN_EETI is not set
657# CONFIG_TOUCHSCREEN_FUJITSU is not set
658# CONFIG_TOUCHSCREEN_GUNZE is not set
659# CONFIG_TOUCHSCREEN_ELO is not set
660# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set
661# CONFIG_TOUCHSCREEN_MTOUCH is not set
662# CONFIG_TOUCHSCREEN_INEXIO is not set
663# CONFIG_TOUCHSCREEN_MK712 is not set
664# CONFIG_TOUCHSCREEN_PENMOUNT is not set
665# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
666# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
667# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
668# CONFIG_TOUCHSCREEN_TSC2007 is not set
669# CONFIG_TOUCHSCREEN_W90X900 is not set
670# CONFIG_INPUT_MISC is not set
671
672#
673# Hardware I/O ports
674#
675CONFIG_SERIO=y
676CONFIG_SERIO_SERPORT=y
677CONFIG_SERIO_LIBPS2=y
678# CONFIG_SERIO_RAW is not set
679# CONFIG_GAMEPORT is not set
680
681#
682# Character devices
683#
684CONFIG_VT=y
685CONFIG_CONSOLE_TRANSLATIONS=y
686CONFIG_VT_CONSOLE=y
687CONFIG_HW_CONSOLE=y
688# CONFIG_VT_HW_CONSOLE_BINDING is not set
689CONFIG_DEVKMEM=y
690# CONFIG_SERIAL_NONSTANDARD is not set
691
692#
693# Serial drivers
694#
695# CONFIG_SERIAL_8250 is not set
696
697#
698# Non-8250 serial port support
699#
700# CONFIG_SERIAL_MAX3100 is not set
701CONFIG_SERIAL_PXA=y
702CONFIG_SERIAL_PXA_CONSOLE=y
703CONFIG_SERIAL_CORE=y
704CONFIG_SERIAL_CORE_CONSOLE=y
705CONFIG_UNIX98_PTYS=y
706# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
707# CONFIG_LEGACY_PTYS is not set
708# CONFIG_IPMI_HANDLER is not set
709# CONFIG_HW_RANDOM is not set
710# CONFIG_R3964 is not set
711# CONFIG_RAW_DRIVER is not set
712# CONFIG_TCG_TPM is not set
713CONFIG_I2C=y
714CONFIG_I2C_BOARDINFO=y
715# CONFIG_I2C_CHARDEV is not set
716# CONFIG_I2C_HELPER_AUTO is not set
717
718#
719# I2C Algorithms
720#
721# CONFIG_I2C_ALGOBIT is not set
722# CONFIG_I2C_ALGOPCF is not set
723# CONFIG_I2C_ALGOPCA is not set
724
725#
726# I2C Hardware Bus support
727#
728
729#
730# I2C system bus drivers (mostly embedded / system-on-chip)
731#
732# CONFIG_I2C_DESIGNWARE is not set
733# CONFIG_I2C_GPIO is not set
734# CONFIG_I2C_OCORES is not set
735CONFIG_I2C_PXA=y
736# CONFIG_I2C_PXA_SLAVE is not set
737# CONFIG_I2C_SIMTEC is not set
738
739#
740# External I2C/SMBus adapter drivers
741#
742# CONFIG_I2C_PARPORT_LIGHT is not set
743# CONFIG_I2C_TAOS_EVM is not set
744
745#
746# Other I2C/SMBus bus drivers
747#
748# CONFIG_I2C_PCA_PLATFORM is not set
749# CONFIG_I2C_STUB is not set
750
751#
752# Miscellaneous I2C Chip support
753#
754# CONFIG_DS1682 is not set
755# CONFIG_SENSORS_TSL2550 is not set
756# CONFIG_I2C_DEBUG_CORE is not set
757# CONFIG_I2C_DEBUG_ALGO is not set
758# CONFIG_I2C_DEBUG_BUS is not set
759# CONFIG_I2C_DEBUG_CHIP is not set
760CONFIG_SPI=y
761# CONFIG_SPI_DEBUG is not set
762CONFIG_SPI_MASTER=y
763
764#
765# SPI Master Controller Drivers
766#
767# CONFIG_SPI_BITBANG is not set
768# CONFIG_SPI_GPIO is not set
769CONFIG_SPI_PXA2XX=y
770
771#
772# SPI Protocol Masters
773#
774# CONFIG_SPI_SPIDEV is not set
775# CONFIG_SPI_TLE62X0 is not set
776CONFIG_ARCH_REQUIRE_GPIOLIB=y
777CONFIG_GPIOLIB=y
778# CONFIG_DEBUG_GPIO is not set
779# CONFIG_GPIO_SYSFS is not set
780
781#
782# Memory mapped GPIO expanders:
783#
784
785#
786# I2C GPIO expanders:
787#
788CONFIG_GPIO_MAX732X=y
789CONFIG_GPIO_PCA953X=y
790CONFIG_GPIO_PCF857X=y
791
792#
793# PCI GPIO expanders:
794#
795
796#
797# SPI GPIO expanders:
798#
799CONFIG_GPIO_MAX7301=y
800# CONFIG_GPIO_MCP23S08 is not set
801# CONFIG_W1 is not set
802CONFIG_POWER_SUPPLY=y
803CONFIG_POWER_SUPPLY_DEBUG=y
804CONFIG_PDA_POWER=y
805# CONFIG_BATTERY_DS2760 is not set
806# CONFIG_BATTERY_BQ27x00 is not set
807CONFIG_BATTERY_DA9030=y
808# CONFIG_BATTERY_MAX17040 is not set
809# CONFIG_HWMON is not set
810# CONFIG_THERMAL is not set
811# CONFIG_THERMAL_HWMON is not set
812# CONFIG_WATCHDOG is not set
813CONFIG_SSB_POSSIBLE=y
814
815#
816# Sonics Silicon Backplane
817#
818# CONFIG_SSB is not set
819
820#
821# Multifunction device drivers
822#
823# CONFIG_MFD_CORE is not set
824# CONFIG_MFD_SM501 is not set
825# CONFIG_MFD_ASIC3 is not set
826# CONFIG_HTC_EGPIO is not set
827# CONFIG_HTC_PASIC3 is not set
828# CONFIG_TPS65010 is not set
829# CONFIG_TWL4030_CORE is not set
830# CONFIG_MFD_TMIO is not set
831# CONFIG_MFD_T7L66XB is not set
832# CONFIG_MFD_TC6387XB is not set
833# CONFIG_MFD_TC6393XB is not set
834CONFIG_PMIC_DA903X=y
835# CONFIG_MFD_WM8400 is not set
836# CONFIG_MFD_WM8350_I2C is not set
837# CONFIG_MFD_PCF50633 is not set
838# CONFIG_AB3100_CORE is not set
839# CONFIG_EZX_PCAP is not set
840# CONFIG_MEDIA_SUPPORT is not set
841
842#
843# Graphics support
844#
845# CONFIG_VGASTATE is not set
846# CONFIG_VIDEO_OUTPUT_CONTROL is not set
847CONFIG_FB=y
848# CONFIG_FIRMWARE_EDID is not set
849# CONFIG_FB_DDC is not set
850# CONFIG_FB_BOOT_VESA_SUPPORT is not set
851CONFIG_FB_CFB_FILLRECT=y
852CONFIG_FB_CFB_COPYAREA=y
853CONFIG_FB_CFB_IMAGEBLIT=y
854# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
855# CONFIG_FB_SYS_FILLRECT is not set
856# CONFIG_FB_SYS_COPYAREA is not set
857# CONFIG_FB_SYS_IMAGEBLIT is not set
858# CONFIG_FB_FOREIGN_ENDIAN is not set
859# CONFIG_FB_SYS_FOPS is not set
860# CONFIG_FB_SVGALIB is not set
861# CONFIG_FB_MACMODES is not set
862# CONFIG_FB_BACKLIGHT is not set
863# CONFIG_FB_MODE_HELPERS is not set
864# CONFIG_FB_TILEBLITTING is not set
865
866#
867# Frame buffer hardware drivers
868#
869# CONFIG_FB_S1D13XXX is not set
870CONFIG_FB_PXA=y
871# CONFIG_FB_PXA_OVERLAY is not set
872# CONFIG_FB_PXA_SMARTPANEL is not set
873# CONFIG_FB_PXA_PARAMETERS is not set
874# CONFIG_FB_MBX is not set
875# CONFIG_FB_W100 is not set
876# CONFIG_FB_VIRTUAL is not set
877# CONFIG_FB_METRONOME is not set
878# CONFIG_FB_MB862XX is not set
879# CONFIG_FB_BROADSHEET is not set
880CONFIG_BACKLIGHT_LCD_SUPPORT=y
881CONFIG_LCD_CLASS_DEVICE=y
882# CONFIG_LCD_LTV350QV is not set
883# CONFIG_LCD_ILI9320 is not set
884CONFIG_LCD_TDO24M=y
885# CONFIG_LCD_VGG2432A4 is not set
886# CONFIG_LCD_PLATFORM is not set
887CONFIG_BACKLIGHT_CLASS_DEVICE=y
888# CONFIG_BACKLIGHT_GENERIC is not set
889CONFIG_BACKLIGHT_PWM=y
890CONFIG_BACKLIGHT_DA903X=y
891
892#
893# Display device support
894#
895# CONFIG_DISPLAY_SUPPORT is not set
896
897#
898# Console display driver support
899#
900# CONFIG_VGA_CONSOLE is not set
901CONFIG_DUMMY_CONSOLE=y
902CONFIG_FRAMEBUFFER_CONSOLE=y
903CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
904# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
905CONFIG_FONTS=y
906# CONFIG_FONT_8x8 is not set
907# CONFIG_FONT_8x16 is not set
908CONFIG_FONT_6x11=y
909# CONFIG_FONT_7x14 is not set
910# CONFIG_FONT_PEARL_8x8 is not set
911# CONFIG_FONT_ACORN_8x8 is not set
912# CONFIG_FONT_MINI_4x6 is not set
913# CONFIG_FONT_SUN8x16 is not set
914# CONFIG_FONT_SUN12x22 is not set
915# CONFIG_FONT_10x18 is not set
916CONFIG_LOGO=y
917CONFIG_LOGO_LINUX_MONO=y
918CONFIG_LOGO_LINUX_VGA16=y
919CONFIG_LOGO_LINUX_CLUT224=y
920# CONFIG_SOUND is not set
921# CONFIG_HID_SUPPORT is not set
922# CONFIG_USB_SUPPORT is not set
923CONFIG_MMC=y
924# CONFIG_MMC_DEBUG is not set
925# CONFIG_MMC_UNSAFE_RESUME is not set
926
927#
928# MMC/SD/SDIO Card Drivers
929#
930CONFIG_MMC_BLOCK=y
931CONFIG_MMC_BLOCK_BOUNCE=y
932# CONFIG_SDIO_UART is not set
933# CONFIG_MMC_TEST is not set
934
935#
936# MMC/SD/SDIO Host Controller Drivers
937#
938CONFIG_MMC_PXA=y
939# CONFIG_MMC_SDHCI is not set
940# CONFIG_MMC_SPI is not set
941# CONFIG_MEMSTICK is not set
942# CONFIG_ACCESSIBILITY is not set
943CONFIG_NEW_LEDS=y
944CONFIG_LEDS_CLASS=m
945
946#
947# LED drivers
948#
949# CONFIG_LEDS_PCA9532 is not set
950CONFIG_LEDS_GPIO=m
951CONFIG_LEDS_GPIO_PLATFORM=y
952# CONFIG_LEDS_LP5521 is not set
953# CONFIG_LEDS_PCA955X is not set
954CONFIG_LEDS_DA903X=m
955# CONFIG_LEDS_DAC124S085 is not set
956# CONFIG_LEDS_PWM is not set
957# CONFIG_LEDS_BD2802 is not set
958
959#
960# LED Triggers
961#
962CONFIG_LEDS_TRIGGERS=y
963CONFIG_LEDS_TRIGGER_TIMER=m
964CONFIG_LEDS_TRIGGER_HEARTBEAT=m
965CONFIG_LEDS_TRIGGER_BACKLIGHT=m
966CONFIG_LEDS_TRIGGER_GPIO=m
967CONFIG_LEDS_TRIGGER_DEFAULT_ON=m
968
969#
970# iptables trigger is under Netfilter config (LED target)
971#
972CONFIG_RTC_LIB=y
973# CONFIG_RTC_CLASS is not set
974# CONFIG_DMADEVICES is not set
975# CONFIG_AUXDISPLAY is not set
976CONFIG_REGULATOR=y
977CONFIG_REGULATOR_DEBUG=y
978# CONFIG_REGULATOR_FIXED_VOLTAGE is not set
979CONFIG_REGULATOR_VIRTUAL_CONSUMER=y
980# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set
981# CONFIG_REGULATOR_BQ24022 is not set
982# CONFIG_REGULATOR_MAX1586 is not set
983CONFIG_REGULATOR_DA903X=y
984# CONFIG_REGULATOR_LP3971 is not set
985# CONFIG_UIO is not set
986# CONFIG_STAGING is not set
987
988#
989# File systems
990#
991# CONFIG_EXT2_FS is not set
992# CONFIG_EXT3_FS is not set
993# CONFIG_EXT4_FS is not set
994# CONFIG_REISERFS_FS is not set
995# CONFIG_JFS_FS is not set
996CONFIG_FS_POSIX_ACL=y
997# CONFIG_XFS_FS is not set
998# CONFIG_GFS2_FS is not set
999# CONFIG_OCFS2_FS is not set
1000# CONFIG_BTRFS_FS is not set
1001CONFIG_FILE_LOCKING=y
1002CONFIG_FSNOTIFY=y
1003CONFIG_DNOTIFY=y
1004# CONFIG_INOTIFY is not set
1005CONFIG_INOTIFY_USER=y
1006# CONFIG_QUOTA is not set
1007# CONFIG_AUTOFS_FS is not set
1008# CONFIG_AUTOFS4_FS is not set
1009# CONFIG_FUSE_FS is not set
1010
1011#
1012# Caches
1013#
1014# CONFIG_FSCACHE is not set
1015
1016#
1017# CD-ROM/DVD Filesystems
1018#
1019# CONFIG_ISO9660_FS is not set
1020# CONFIG_UDF_FS is not set
1021
1022#
1023# DOS/FAT/NT Filesystems
1024#
1025# CONFIG_MSDOS_FS is not set
1026# CONFIG_VFAT_FS is not set
1027# CONFIG_NTFS_FS is not set
1028
1029#
1030# Pseudo filesystems
1031#
1032CONFIG_PROC_FS=y
1033CONFIG_PROC_SYSCTL=y
1034CONFIG_PROC_PAGE_MONITOR=y
1035CONFIG_SYSFS=y
1036# CONFIG_TMPFS is not set
1037# CONFIG_HUGETLB_PAGE is not set
1038# CONFIG_CONFIGFS_FS is not set
1039CONFIG_MISC_FILESYSTEMS=y
1040# CONFIG_ADFS_FS is not set
1041# CONFIG_AFFS_FS is not set
1042# CONFIG_HFS_FS is not set
1043# CONFIG_HFSPLUS_FS is not set
1044# CONFIG_BEFS_FS is not set
1045# CONFIG_BFS_FS is not set
1046# CONFIG_EFS_FS is not set
1047CONFIG_JFFS2_FS=y
1048CONFIG_JFFS2_FS_DEBUG=0
1049CONFIG_JFFS2_FS_WRITEBUFFER=y
1050CONFIG_JFFS2_FS_WBUF_VERIFY=y
1051# CONFIG_JFFS2_SUMMARY is not set
1052# CONFIG_JFFS2_FS_XATTR is not set
1053CONFIG_JFFS2_COMPRESSION_OPTIONS=y
1054CONFIG_JFFS2_ZLIB=y
1055CONFIG_JFFS2_LZO=y
1056CONFIG_JFFS2_RTIME=y
1057CONFIG_JFFS2_RUBIN=y
1058# CONFIG_JFFS2_CMODE_NONE is not set
1059CONFIG_JFFS2_CMODE_PRIORITY=y
1060# CONFIG_JFFS2_CMODE_SIZE is not set
1061# CONFIG_JFFS2_CMODE_FAVOURLZO is not set
1062# CONFIG_CRAMFS is not set
1063# CONFIG_SQUASHFS is not set
1064# CONFIG_VXFS_FS is not set
1065# CONFIG_MINIX_FS is not set
1066# CONFIG_OMFS_FS is not set
1067# CONFIG_HPFS_FS is not set
1068# CONFIG_QNX4FS_FS is not set
1069# CONFIG_ROMFS_FS is not set
1070# CONFIG_SYSV_FS is not set
1071# CONFIG_UFS_FS is not set
1072# CONFIG_NILFS2_FS is not set
1073CONFIG_NETWORK_FILESYSTEMS=y
1074CONFIG_NFS_FS=y
1075CONFIG_NFS_V3=y
1076CONFIG_NFS_V3_ACL=y
1077CONFIG_NFS_V4=y
1078# CONFIG_NFS_V4_1 is not set
1079CONFIG_ROOT_NFS=y
1080# CONFIG_NFSD is not set
1081CONFIG_LOCKD=y
1082CONFIG_LOCKD_V4=y
1083CONFIG_NFS_ACL_SUPPORT=y
1084CONFIG_NFS_COMMON=y
1085CONFIG_SUNRPC=y
1086CONFIG_SUNRPC_GSS=y
1087CONFIG_RPCSEC_GSS_KRB5=y
1088# CONFIG_RPCSEC_GSS_SPKM3 is not set
1089# CONFIG_SMB_FS is not set
1090# CONFIG_CIFS is not set
1091# CONFIG_NCP_FS is not set
1092# CONFIG_CODA_FS is not set
1093# CONFIG_AFS_FS is not set
1094
1095#
1096# Partition Types
1097#
1098# CONFIG_PARTITION_ADVANCED is not set
1099CONFIG_MSDOS_PARTITION=y
1100CONFIG_NLS=y
1101CONFIG_NLS_DEFAULT="iso8859-1"
1102# CONFIG_NLS_CODEPAGE_437 is not set
1103# CONFIG_NLS_CODEPAGE_737 is not set
1104# CONFIG_NLS_CODEPAGE_775 is not set
1105# CONFIG_NLS_CODEPAGE_850 is not set
1106# CONFIG_NLS_CODEPAGE_852 is not set
1107# CONFIG_NLS_CODEPAGE_855 is not set
1108# CONFIG_NLS_CODEPAGE_857 is not set
1109# CONFIG_NLS_CODEPAGE_860 is not set
1110# CONFIG_NLS_CODEPAGE_861 is not set
1111# CONFIG_NLS_CODEPAGE_862 is not set
1112# CONFIG_NLS_CODEPAGE_863 is not set
1113# CONFIG_NLS_CODEPAGE_864 is not set
1114# CONFIG_NLS_CODEPAGE_865 is not set
1115# CONFIG_NLS_CODEPAGE_866 is not set
1116# CONFIG_NLS_CODEPAGE_869 is not set
1117# CONFIG_NLS_CODEPAGE_936 is not set
1118# CONFIG_NLS_CODEPAGE_950 is not set
1119# CONFIG_NLS_CODEPAGE_932 is not set
1120# CONFIG_NLS_CODEPAGE_949 is not set
1121# CONFIG_NLS_CODEPAGE_874 is not set
1122# CONFIG_NLS_ISO8859_8 is not set
1123# CONFIG_NLS_CODEPAGE_1250 is not set
1124# CONFIG_NLS_CODEPAGE_1251 is not set
1125# CONFIG_NLS_ASCII is not set
1126# CONFIG_NLS_ISO8859_1 is not set
1127# CONFIG_NLS_ISO8859_2 is not set
1128# CONFIG_NLS_ISO8859_3 is not set
1129# CONFIG_NLS_ISO8859_4 is not set
1130# CONFIG_NLS_ISO8859_5 is not set
1131# CONFIG_NLS_ISO8859_6 is not set
1132# CONFIG_NLS_ISO8859_7 is not set
1133# CONFIG_NLS_ISO8859_9 is not set
1134# CONFIG_NLS_ISO8859_13 is not set
1135# CONFIG_NLS_ISO8859_14 is not set
1136# CONFIG_NLS_ISO8859_15 is not set
1137# CONFIG_NLS_KOI8_R is not set
1138# CONFIG_NLS_KOI8_U is not set
1139# CONFIG_NLS_UTF8 is not set
1140# CONFIG_DLM is not set
1141
1142#
1143# Kernel hacking
1144#
1145CONFIG_PRINTK_TIME=y
1146CONFIG_ENABLE_WARN_DEPRECATED=y
1147CONFIG_ENABLE_MUST_CHECK=y
1148CONFIG_FRAME_WARN=1024
1149CONFIG_MAGIC_SYSRQ=y
1150# CONFIG_UNUSED_SYMBOLS is not set
1151# CONFIG_DEBUG_FS is not set
1152# CONFIG_HEADERS_CHECK is not set
1153CONFIG_DEBUG_KERNEL=y
1154CONFIG_DEBUG_SHIRQ=y
1155CONFIG_DETECT_SOFTLOCKUP=y
1156CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y
1157CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=1
1158CONFIG_DETECT_HUNG_TASK=y
1159# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
1160CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
1161# CONFIG_SCHED_DEBUG is not set
1162# CONFIG_SCHEDSTATS is not set
1163# CONFIG_TIMER_STATS is not set
1164# CONFIG_DEBUG_OBJECTS is not set
1165# CONFIG_DEBUG_SLAB is not set
1166# CONFIG_DEBUG_KMEMLEAK is not set
1167CONFIG_DEBUG_PREEMPT=y
1168# CONFIG_DEBUG_RT_MUTEXES is not set
1169# CONFIG_RT_MUTEX_TESTER is not set
1170CONFIG_DEBUG_SPINLOCK=y
1171# CONFIG_DEBUG_MUTEXES is not set
1172# CONFIG_DEBUG_LOCK_ALLOC is not set
1173# CONFIG_PROVE_LOCKING is not set
1174# CONFIG_LOCK_STAT is not set
1175CONFIG_DEBUG_SPINLOCK_SLEEP=y
1176# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1177# CONFIG_DEBUG_KOBJECT is not set
1178CONFIG_DEBUG_BUGVERBOSE=y
1179# CONFIG_DEBUG_INFO is not set
1180# CONFIG_DEBUG_VM is not set
1181# CONFIG_DEBUG_WRITECOUNT is not set
1182CONFIG_DEBUG_MEMORY_INIT=y
1183# CONFIG_DEBUG_LIST is not set
1184# CONFIG_DEBUG_SG is not set
1185# CONFIG_DEBUG_NOTIFIERS is not set
1186# CONFIG_BOOT_PRINTK_DELAY is not set
1187# CONFIG_RCU_TORTURE_TEST is not set
1188# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1189# CONFIG_BACKTRACE_SELF_TEST is not set
1190# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
1191# CONFIG_FAULT_INJECTION is not set
1192# CONFIG_LATENCYTOP is not set
1193# CONFIG_SYSCTL_SYSCALL_CHECK is not set
1194# CONFIG_PAGE_POISONING is not set
1195CONFIG_HAVE_FUNCTION_TRACER=y
1196CONFIG_TRACING_SUPPORT=y
1197# CONFIG_FTRACE is not set
1198# CONFIG_SAMPLES is not set
1199CONFIG_HAVE_ARCH_KGDB=y
1200# CONFIG_KGDB is not set
1201# CONFIG_KMEMCHECK is not set
1202CONFIG_ARM_UNWIND=y
1203CONFIG_DEBUG_USER=y
1204# CONFIG_DEBUG_ERRORS is not set
1205# CONFIG_DEBUG_STACK_USAGE is not set
1206# CONFIG_DEBUG_LL is not set
1207
1208#
1209# Security options
1210#
1211# CONFIG_KEYS is not set
1212# CONFIG_SECURITY is not set
1213# CONFIG_SECURITYFS is not set
1214# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1215CONFIG_CRYPTO=y
1216
1217#
1218# Crypto core or helper
1219#
1220# CONFIG_CRYPTO_FIPS is not set
1221CONFIG_CRYPTO_ALGAPI=y
1222CONFIG_CRYPTO_ALGAPI2=y
1223CONFIG_CRYPTO_AEAD2=y
1224CONFIG_CRYPTO_BLKCIPHER=y
1225CONFIG_CRYPTO_BLKCIPHER2=y
1226CONFIG_CRYPTO_HASH=y
1227CONFIG_CRYPTO_HASH2=y
1228CONFIG_CRYPTO_RNG2=y
1229CONFIG_CRYPTO_PCOMP=y
1230CONFIG_CRYPTO_MANAGER=y
1231CONFIG_CRYPTO_MANAGER2=y
1232# CONFIG_CRYPTO_GF128MUL is not set
1233# CONFIG_CRYPTO_NULL is not set
1234CONFIG_CRYPTO_WORKQUEUE=y
1235# CONFIG_CRYPTO_CRYPTD is not set
1236# CONFIG_CRYPTO_AUTHENC is not set
1237# CONFIG_CRYPTO_TEST is not set
1238
1239#
1240# Authenticated Encryption with Associated Data
1241#
1242# CONFIG_CRYPTO_CCM is not set
1243# CONFIG_CRYPTO_GCM is not set
1244# CONFIG_CRYPTO_SEQIV is not set
1245
1246#
1247# Block modes
1248#
1249CONFIG_CRYPTO_CBC=y
1250# CONFIG_CRYPTO_CTR is not set
1251# CONFIG_CRYPTO_CTS is not set
1252# CONFIG_CRYPTO_ECB is not set
1253# CONFIG_CRYPTO_LRW is not set
1254# CONFIG_CRYPTO_PCBC is not set
1255# CONFIG_CRYPTO_XTS is not set
1256
1257#
1258# Hash modes
1259#
1260# CONFIG_CRYPTO_HMAC is not set
1261# CONFIG_CRYPTO_XCBC is not set
1262
1263#
1264# Digest
1265#
1266# CONFIG_CRYPTO_CRC32C is not set
1267# CONFIG_CRYPTO_MD4 is not set
1268CONFIG_CRYPTO_MD5=y
1269# CONFIG_CRYPTO_MICHAEL_MIC is not set
1270# CONFIG_CRYPTO_RMD128 is not set
1271# CONFIG_CRYPTO_RMD160 is not set
1272# CONFIG_CRYPTO_RMD256 is not set
1273# CONFIG_CRYPTO_RMD320 is not set
1274# CONFIG_CRYPTO_SHA1 is not set
1275# CONFIG_CRYPTO_SHA256 is not set
1276# CONFIG_CRYPTO_SHA512 is not set
1277# CONFIG_CRYPTO_TGR192 is not set
1278# CONFIG_CRYPTO_WP512 is not set
1279
1280#
1281# Ciphers
1282#
1283# CONFIG_CRYPTO_AES is not set
1284# CONFIG_CRYPTO_ANUBIS is not set
1285# CONFIG_CRYPTO_ARC4 is not set
1286# CONFIG_CRYPTO_BLOWFISH is not set
1287# CONFIG_CRYPTO_CAMELLIA is not set
1288# CONFIG_CRYPTO_CAST5 is not set
1289# CONFIG_CRYPTO_CAST6 is not set
1290CONFIG_CRYPTO_DES=y
1291# CONFIG_CRYPTO_FCRYPT is not set
1292# CONFIG_CRYPTO_KHAZAD is not set
1293# CONFIG_CRYPTO_SALSA20 is not set
1294# CONFIG_CRYPTO_SEED is not set
1295# CONFIG_CRYPTO_SERPENT is not set
1296# CONFIG_CRYPTO_TEA is not set
1297# CONFIG_CRYPTO_TWOFISH is not set
1298
1299#
1300# Compression
1301#
1302# CONFIG_CRYPTO_DEFLATE is not set
1303# CONFIG_CRYPTO_ZLIB is not set
1304# CONFIG_CRYPTO_LZO is not set
1305
1306#
1307# Random Number Generation
1308#
1309# CONFIG_CRYPTO_ANSI_CPRNG is not set
1310# CONFIG_CRYPTO_HW is not set
1311# CONFIG_BINARY_PRINTF is not set
1312
1313#
1314# Library routines
1315#
1316CONFIG_BITREVERSE=y
1317CONFIG_GENERIC_FIND_LAST_BIT=y
1318# CONFIG_CRC_CCITT is not set
1319# CONFIG_CRC16 is not set
1320# CONFIG_CRC_T10DIF is not set
1321# CONFIG_CRC_ITU_T is not set
1322CONFIG_CRC32=y
1323# CONFIG_CRC7 is not set
1324# CONFIG_LIBCRC32C is not set
1325CONFIG_ZLIB_INFLATE=y
1326CONFIG_ZLIB_DEFLATE=y
1327CONFIG_LZO_COMPRESS=y
1328CONFIG_LZO_DECOMPRESS=y
1329CONFIG_HAS_IOMEM=y
1330CONFIG_HAS_IOPORT=y
1331CONFIG_HAS_DMA=y
1332CONFIG_NLATTR=y
diff --git a/arch/arm/configs/rx51_defconfig b/arch/arm/configs/rx51_defconfig
index f238df66efd4..e7e31332c62a 100644
--- a/arch/arm/configs/rx51_defconfig
+++ b/arch/arm/configs/rx51_defconfig
@@ -1006,6 +1006,7 @@ CONFIG_WATCHDOG=y
1006# 1006#
1007# CONFIG_SOFT_WATCHDOG is not set 1007# CONFIG_SOFT_WATCHDOG is not set
1008CONFIG_OMAP_WATCHDOG=m 1008CONFIG_OMAP_WATCHDOG=m
1009CONFIG_TWL4030_WATCHDOG=m
1009 1010
1010# 1011#
1011# USB-based Watchdog Cards 1012# USB-based Watchdog Cards
diff --git a/arch/arm/configs/xcep_defconfig b/arch/arm/configs/xcep_defconfig
new file mode 100644
index 000000000000..33bb7250946b
--- /dev/null
+++ b/arch/arm/configs/xcep_defconfig
@@ -0,0 +1,1129 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.31-rc6
4# Thu Aug 20 09:02:37 2009
5#
6CONFIG_ARM=y
7CONFIG_SYS_SUPPORTS_APM_EMULATION=y
8CONFIG_GENERIC_GPIO=y
9CONFIG_GENERIC_TIME=y
10CONFIG_GENERIC_CLOCKEVENTS=y
11CONFIG_MMU=y
12CONFIG_GENERIC_HARDIRQS=y
13CONFIG_STACKTRACE_SUPPORT=y
14CONFIG_HAVE_LATENCYTOP_SUPPORT=y
15CONFIG_LOCKDEP_SUPPORT=y
16CONFIG_TRACE_IRQFLAGS_SUPPORT=y
17CONFIG_HARDIRQS_SW_RESEND=y
18CONFIG_GENERIC_IRQ_PROBE=y
19CONFIG_RWSEM_GENERIC_SPINLOCK=y
20CONFIG_GENERIC_HWEIGHT=y
21CONFIG_GENERIC_CALIBRATE_DELAY=y
22CONFIG_ARCH_MTD_XIP=y
23CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
24CONFIG_VECTORS_BASE=0xffff0000
25CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
26CONFIG_CONSTRUCTORS=y
27
28#
29# General setup
30#
31CONFIG_EXPERIMENTAL=y
32CONFIG_BROKEN_ON_SMP=y
33CONFIG_INIT_ENV_ARG_LIMIT=32
34CONFIG_LOCALVERSION=".xcep-itech"
35# CONFIG_LOCALVERSION_AUTO is not set
36CONFIG_SYSVIPC=y
37CONFIG_SYSVIPC_SYSCTL=y
38# CONFIG_POSIX_MQUEUE is not set
39CONFIG_BSD_PROCESS_ACCT=y
40# CONFIG_BSD_PROCESS_ACCT_V3 is not set
41# CONFIG_TASKSTATS is not set
42# CONFIG_AUDIT is not set
43
44#
45# RCU Subsystem
46#
47CONFIG_CLASSIC_RCU=y
48# CONFIG_TREE_RCU is not set
49# CONFIG_PREEMPT_RCU is not set
50# CONFIG_TREE_RCU_TRACE is not set
51# CONFIG_PREEMPT_RCU_TRACE is not set
52CONFIG_IKCONFIG=y
53CONFIG_IKCONFIG_PROC=y
54CONFIG_LOG_BUF_SHIFT=16
55# CONFIG_GROUP_SCHED is not set
56# CONFIG_CGROUPS is not set
57CONFIG_SYSFS_DEPRECATED=y
58CONFIG_SYSFS_DEPRECATED_V2=y
59# CONFIG_RELAY is not set
60# CONFIG_NAMESPACES is not set
61CONFIG_BLK_DEV_INITRD=y
62CONFIG_INITRAMFS_SOURCE=""
63CONFIG_RD_GZIP=y
64# CONFIG_RD_BZIP2 is not set
65# CONFIG_RD_LZMA is not set
66CONFIG_CC_OPTIMIZE_FOR_SIZE=y
67CONFIG_SYSCTL=y
68CONFIG_ANON_INODES=y
69CONFIG_EMBEDDED=y
70# CONFIG_UID16 is not set
71CONFIG_SYSCTL_SYSCALL=y
72CONFIG_KALLSYMS=y
73# CONFIG_KALLSYMS_ALL is not set
74# CONFIG_KALLSYMS_EXTRA_PASS is not set
75CONFIG_HOTPLUG=y
76CONFIG_PRINTK=y
77CONFIG_BUG=y
78CONFIG_ELF_CORE=y
79CONFIG_BASE_FULL=y
80CONFIG_FUTEX=y
81CONFIG_EPOLL=y
82CONFIG_SIGNALFD=y
83CONFIG_TIMERFD=y
84CONFIG_EVENTFD=y
85# CONFIG_SHMEM is not set
86CONFIG_AIO=y
87
88#
89# Performance Counters
90#
91# CONFIG_VM_EVENT_COUNTERS is not set
92CONFIG_STRIP_ASM_SYMS=y
93# CONFIG_COMPAT_BRK is not set
94# CONFIG_SLAB is not set
95# CONFIG_SLUB is not set
96CONFIG_SLOB=y
97# CONFIG_PROFILING is not set
98CONFIG_TRACEPOINTS=y
99CONFIG_MARKERS=y
100CONFIG_HAVE_OPROFILE=y
101CONFIG_KPROBES=y
102CONFIG_KRETPROBES=y
103CONFIG_HAVE_KPROBES=y
104CONFIG_HAVE_KRETPROBES=y
105CONFIG_HAVE_CLK=y
106
107#
108# GCOV-based kernel profiling
109#
110# CONFIG_SLOW_WORK is not set
111CONFIG_HAVE_GENERIC_DMA_COHERENT=y
112CONFIG_RT_MUTEXES=y
113CONFIG_BASE_SMALL=0
114CONFIG_MODULES=y
115# CONFIG_MODULE_FORCE_LOAD is not set
116CONFIG_MODULE_UNLOAD=y
117# CONFIG_MODULE_FORCE_UNLOAD is not set
118CONFIG_MODVERSIONS=y
119CONFIG_MODULE_SRCVERSION_ALL=y
120# CONFIG_BLOCK is not set
121# CONFIG_FREEZER is not set
122
123#
124# System Type
125#
126# CONFIG_ARCH_AAEC2000 is not set
127# CONFIG_ARCH_INTEGRATOR is not set
128# CONFIG_ARCH_REALVIEW is not set
129# CONFIG_ARCH_VERSATILE is not set
130# CONFIG_ARCH_AT91 is not set
131# CONFIG_ARCH_CLPS711X is not set
132# CONFIG_ARCH_GEMINI is not set
133# CONFIG_ARCH_EBSA110 is not set
134# CONFIG_ARCH_EP93XX is not set
135# CONFIG_ARCH_FOOTBRIDGE is not set
136# CONFIG_ARCH_MXC is not set
137# CONFIG_ARCH_STMP3XXX is not set
138# CONFIG_ARCH_NETX is not set
139# CONFIG_ARCH_H720X is not set
140# CONFIG_ARCH_IOP13XX is not set
141# CONFIG_ARCH_IOP32X is not set
142# CONFIG_ARCH_IOP33X is not set
143# CONFIG_ARCH_IXP23XX is not set
144# CONFIG_ARCH_IXP2000 is not set
145# CONFIG_ARCH_IXP4XX is not set
146# CONFIG_ARCH_L7200 is not set
147# CONFIG_ARCH_KIRKWOOD is not set
148# CONFIG_ARCH_LOKI is not set
149# CONFIG_ARCH_MV78XX0 is not set
150# CONFIG_ARCH_ORION5X is not set
151# CONFIG_ARCH_MMP is not set
152# CONFIG_ARCH_KS8695 is not set
153# CONFIG_ARCH_NS9XXX is not set
154# CONFIG_ARCH_W90X900 is not set
155# CONFIG_ARCH_PNX4008 is not set
156CONFIG_ARCH_PXA=y
157# CONFIG_ARCH_MSM is not set
158# CONFIG_ARCH_RPC is not set
159# CONFIG_ARCH_SA1100 is not set
160# CONFIG_ARCH_S3C2410 is not set
161# CONFIG_ARCH_S3C64XX is not set
162# CONFIG_ARCH_SHARK is not set
163# CONFIG_ARCH_LH7A40X is not set
164# CONFIG_ARCH_U300 is not set
165# CONFIG_ARCH_DAVINCI is not set
166# CONFIG_ARCH_OMAP is not set
167
168#
169# Intel PXA2xx/PXA3xx Implementations
170#
171# CONFIG_ARCH_GUMSTIX is not set
172# CONFIG_MACH_INTELMOTE2 is not set
173# CONFIG_MACH_STARGATE2 is not set
174# CONFIG_ARCH_LUBBOCK is not set
175# CONFIG_MACH_LOGICPD_PXA270 is not set
176# CONFIG_MACH_MAINSTONE is not set
177# CONFIG_MACH_MP900C is not set
178# CONFIG_ARCH_PXA_IDP is not set
179# CONFIG_PXA_SHARPSL is not set
180# CONFIG_ARCH_VIPER is not set
181# CONFIG_ARCH_PXA_ESERIES is not set
182# CONFIG_TRIZEPS_PXA is not set
183# CONFIG_MACH_H5000 is not set
184# CONFIG_MACH_EM_X270 is not set
185# CONFIG_MACH_EXEDA is not set
186# CONFIG_MACH_COLIBRI is not set
187# CONFIG_MACH_COLIBRI300 is not set
188# CONFIG_MACH_COLIBRI320 is not set
189# CONFIG_MACH_ZYLONITE is not set
190# CONFIG_MACH_LITTLETON is not set
191# CONFIG_MACH_TAVOREVB is not set
192# CONFIG_MACH_SAAR is not set
193# CONFIG_MACH_ARMCORE is not set
194# CONFIG_MACH_CM_X300 is not set
195# CONFIG_MACH_H4700 is not set
196# CONFIG_MACH_MAGICIAN is not set
197# CONFIG_MACH_HIMALAYA is not set
198# CONFIG_MACH_MIOA701 is not set
199# CONFIG_MACH_PCM027 is not set
200# CONFIG_ARCH_PXA_PALM is not set
201# CONFIG_MACH_CSB726 is not set
202# CONFIG_PXA_EZX is not set
203CONFIG_MACH_XCEP=y
204CONFIG_PXA25x=y
205CONFIG_PXA_SSP=y
206CONFIG_PLAT_PXA=y
207
208#
209# Processor Type
210#
211CONFIG_CPU_32=y
212CONFIG_CPU_XSCALE=y
213CONFIG_CPU_32v5=y
214CONFIG_CPU_ABRT_EV5T=y
215CONFIG_CPU_PABRT_NOIFAR=y
216CONFIG_CPU_CACHE_VIVT=y
217CONFIG_CPU_TLB_V4WBI=y
218CONFIG_CPU_CP15=y
219CONFIG_CPU_CP15_MMU=y
220
221#
222# Processor Features
223#
224CONFIG_ARM_THUMB=y
225# CONFIG_CPU_DCACHE_DISABLE is not set
226CONFIG_IWMMXT=y
227CONFIG_XSCALE_PMU=y
228CONFIG_COMMON_CLKDEV=y
229
230#
231# Bus support
232#
233# CONFIG_PCI_SYSCALL is not set
234# CONFIG_ARCH_SUPPORTS_MSI is not set
235# CONFIG_PCCARD is not set
236
237#
238# Kernel Features
239#
240CONFIG_TICK_ONESHOT=y
241CONFIG_NO_HZ=y
242CONFIG_HIGH_RES_TIMERS=y
243CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
244CONFIG_VMSPLIT_3G=y
245# CONFIG_VMSPLIT_2G is not set
246# CONFIG_VMSPLIT_1G is not set
247CONFIG_PAGE_OFFSET=0xC0000000
248# CONFIG_PREEMPT is not set
249CONFIG_HZ=100
250CONFIG_AEABI=y
251CONFIG_OABI_COMPAT=y
252# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
253# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
254# CONFIG_HIGHMEM is not set
255CONFIG_SELECT_MEMORY_MODEL=y
256CONFIG_FLATMEM_MANUAL=y
257# CONFIG_DISCONTIGMEM_MANUAL is not set
258# CONFIG_SPARSEMEM_MANUAL is not set
259CONFIG_FLATMEM=y
260CONFIG_FLAT_NODE_MEM_MAP=y
261CONFIG_PAGEFLAGS_EXTENDED=y
262CONFIG_SPLIT_PTLOCK_CPUS=4096
263# CONFIG_PHYS_ADDR_T_64BIT is not set
264CONFIG_ZONE_DMA_FLAG=0
265CONFIG_VIRT_TO_BUS=y
266CONFIG_HAVE_MLOCK=y
267CONFIG_HAVE_MLOCKED_PAGE_BIT=y
268CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
269CONFIG_ALIGNMENT_TRAP=y
270# CONFIG_UACCESS_WITH_MEMCPY is not set
271
272#
273# Boot options
274#
275CONFIG_ZBOOT_ROM_TEXT=0x0
276CONFIG_ZBOOT_ROM_BSS=0x0
277CONFIG_CMDLINE="root=mtd4 rootfstype=jffs2 ro console=ttyS0,115200"
278# CONFIG_XIP_KERNEL is not set
279# CONFIG_KEXEC is not set
280
281#
282# CPU Power Management
283#
284# CONFIG_CPU_FREQ is not set
285# CONFIG_CPU_IDLE is not set
286
287#
288# Floating point emulation
289#
290
291#
292# At least one emulation must be selected
293#
294CONFIG_FPE_NWFPE=y
295# CONFIG_FPE_NWFPE_XP is not set
296# CONFIG_FPE_FASTFPE is not set
297
298#
299# Userspace binary formats
300#
301CONFIG_BINFMT_ELF=y
302# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
303CONFIG_HAVE_AOUT=y
304# CONFIG_BINFMT_AOUT is not set
305# CONFIG_BINFMT_MISC is not set
306
307#
308# Power management options
309#
310# CONFIG_PM is not set
311CONFIG_ARCH_SUSPEND_POSSIBLE=y
312CONFIG_NET=y
313
314#
315# Networking options
316#
317CONFIG_PACKET=m
318CONFIG_PACKET_MMAP=y
319CONFIG_UNIX=y
320CONFIG_XFRM=y
321# CONFIG_XFRM_USER is not set
322# CONFIG_XFRM_SUB_POLICY is not set
323# CONFIG_XFRM_MIGRATE is not set
324# CONFIG_XFRM_STATISTICS is not set
325CONFIG_NET_KEY=y
326# CONFIG_NET_KEY_MIGRATE is not set
327CONFIG_INET=y
328CONFIG_IP_MULTICAST=y
329# CONFIG_IP_ADVANCED_ROUTER is not set
330CONFIG_IP_FIB_HASH=y
331CONFIG_IP_PNP=y
332CONFIG_IP_PNP_DHCP=y
333CONFIG_IP_PNP_BOOTP=y
334# CONFIG_IP_PNP_RARP is not set
335# CONFIG_NET_IPIP is not set
336# CONFIG_NET_IPGRE is not set
337# CONFIG_IP_MROUTE is not set
338# CONFIG_ARPD is not set
339# CONFIG_SYN_COOKIES is not set
340# CONFIG_INET_AH is not set
341# CONFIG_INET_ESP is not set
342# CONFIG_INET_IPCOMP is not set
343# CONFIG_INET_XFRM_TUNNEL is not set
344# CONFIG_INET_TUNNEL is not set
345# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
346# CONFIG_INET_XFRM_MODE_TUNNEL is not set
347# CONFIG_INET_XFRM_MODE_BEET is not set
348CONFIG_INET_LRO=y
349# CONFIG_INET_DIAG is not set
350# CONFIG_TCP_CONG_ADVANCED is not set
351CONFIG_TCP_CONG_CUBIC=y
352CONFIG_DEFAULT_TCP_CONG="cubic"
353# CONFIG_TCP_MD5SIG is not set
354# CONFIG_IPV6 is not set
355# CONFIG_NETWORK_SECMARK is not set
356# CONFIG_NETFILTER is not set
357# CONFIG_IP_DCCP is not set
358# CONFIG_IP_SCTP is not set
359# CONFIG_TIPC is not set
360# CONFIG_ATM is not set
361# CONFIG_BRIDGE is not set
362# CONFIG_NET_DSA is not set
363# CONFIG_VLAN_8021Q is not set
364# CONFIG_DECNET is not set
365# CONFIG_LLC2 is not set
366# CONFIG_IPX is not set
367# CONFIG_ATALK is not set
368# CONFIG_X25 is not set
369# CONFIG_LAPB is not set
370# CONFIG_ECONET is not set
371# CONFIG_WAN_ROUTER is not set
372# CONFIG_PHONET is not set
373# CONFIG_IEEE802154 is not set
374# CONFIG_NET_SCHED is not set
375# CONFIG_DCB is not set
376
377#
378# Network testing
379#
380# CONFIG_NET_PKTGEN is not set
381# CONFIG_NET_TCPPROBE is not set
382# CONFIG_NET_DROP_MONITOR is not set
383# CONFIG_HAMRADIO is not set
384# CONFIG_CAN is not set
385# CONFIG_IRDA is not set
386# CONFIG_BT is not set
387# CONFIG_AF_RXRPC is not set
388# CONFIG_WIRELESS is not set
389# CONFIG_WIMAX is not set
390# CONFIG_RFKILL is not set
391# CONFIG_NET_9P is not set
392
393#
394# Device Drivers
395#
396
397#
398# Generic Driver Options
399#
400CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
401CONFIG_STANDALONE=y
402# CONFIG_PREVENT_FIRMWARE_BUILD is not set
403# CONFIG_FW_LOADER is not set
404# CONFIG_DEBUG_DRIVER is not set
405# CONFIG_DEBUG_DEVRES is not set
406# CONFIG_SYS_HYPERVISOR is not set
407# CONFIG_CONNECTOR is not set
408CONFIG_MTD=y
409# CONFIG_MTD_DEBUG is not set
410CONFIG_MTD_CONCAT=y
411CONFIG_MTD_PARTITIONS=y
412# CONFIG_MTD_TESTS is not set
413# CONFIG_MTD_REDBOOT_PARTS is not set
414# CONFIG_MTD_CMDLINE_PARTS is not set
415# CONFIG_MTD_AFS_PARTS is not set
416# CONFIG_MTD_AR7_PARTS is not set
417
418#
419# User Modules And Translation Layers
420#
421CONFIG_MTD_CHAR=y
422# CONFIG_MTD_OOPS is not set
423
424#
425# RAM/ROM/Flash chip drivers
426#
427CONFIG_MTD_CFI=y
428# CONFIG_MTD_JEDECPROBE is not set
429CONFIG_MTD_GEN_PROBE=y
430# CONFIG_MTD_CFI_ADV_OPTIONS is not set
431CONFIG_MTD_MAP_BANK_WIDTH_1=y
432CONFIG_MTD_MAP_BANK_WIDTH_2=y
433CONFIG_MTD_MAP_BANK_WIDTH_4=y
434# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
435# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
436# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
437CONFIG_MTD_CFI_I1=y
438CONFIG_MTD_CFI_I2=y
439# CONFIG_MTD_CFI_I4 is not set
440# CONFIG_MTD_CFI_I8 is not set
441CONFIG_MTD_CFI_INTELEXT=y
442# CONFIG_MTD_CFI_AMDSTD is not set
443# CONFIG_MTD_CFI_STAA is not set
444CONFIG_MTD_CFI_UTIL=y
445# CONFIG_MTD_RAM is not set
446# CONFIG_MTD_ROM is not set
447# CONFIG_MTD_ABSENT is not set
448# CONFIG_MTD_XIP is not set
449
450#
451# Mapping drivers for chip access
452#
453CONFIG_MTD_COMPLEX_MAPPINGS=y
454CONFIG_MTD_PHYSMAP=y
455# CONFIG_MTD_PHYSMAP_COMPAT is not set
456CONFIG_MTD_PXA2XX=y
457# CONFIG_MTD_ARM_INTEGRATOR is not set
458# CONFIG_MTD_PLATRAM is not set
459
460#
461# Self-contained MTD device drivers
462#
463# CONFIG_MTD_SLRAM is not set
464# CONFIG_MTD_PHRAM is not set
465# CONFIG_MTD_MTDRAM is not set
466
467#
468# Disk-On-Chip Device Drivers
469#
470# CONFIG_MTD_DOC2000 is not set
471# CONFIG_MTD_DOC2001 is not set
472# CONFIG_MTD_DOC2001PLUS is not set
473# CONFIG_MTD_NAND is not set
474# CONFIG_MTD_ONENAND is not set
475
476#
477# LPDDR flash memory drivers
478#
479# CONFIG_MTD_LPDDR is not set
480
481#
482# UBI - Unsorted block images
483#
484# CONFIG_MTD_UBI is not set
485# CONFIG_PARPORT is not set
486# CONFIG_MISC_DEVICES is not set
487CONFIG_HAVE_IDE=y
488
489#
490# SCSI device support
491#
492# CONFIG_SCSI_DMA is not set
493# CONFIG_SCSI_NETLINK is not set
494CONFIG_NETDEVICES=y
495# CONFIG_DUMMY is not set
496# CONFIG_BONDING is not set
497# CONFIG_MACVLAN is not set
498# CONFIG_EQUALIZER is not set
499# CONFIG_TUN is not set
500# CONFIG_VETH is not set
501# CONFIG_PHYLIB is not set
502CONFIG_NET_ETHERNET=y
503CONFIG_MII=y
504# CONFIG_AX88796 is not set
505CONFIG_SMC91X=y
506# CONFIG_DM9000 is not set
507# CONFIG_ETHOC is not set
508# CONFIG_SMC911X is not set
509# CONFIG_SMSC911X is not set
510# CONFIG_DNET is not set
511# CONFIG_IBM_NEW_EMAC_ZMII is not set
512# CONFIG_IBM_NEW_EMAC_RGMII is not set
513# CONFIG_IBM_NEW_EMAC_TAH is not set
514# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
515# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
516# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
517# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
518# CONFIG_B44 is not set
519# CONFIG_KS8842 is not set
520# CONFIG_NETDEV_1000 is not set
521# CONFIG_NETDEV_10000 is not set
522
523#
524# Wireless LAN
525#
526# CONFIG_WLAN_PRE80211 is not set
527# CONFIG_WLAN_80211 is not set
528
529#
530# Enable WiMAX (Networking options) to see the WiMAX drivers
531#
532# CONFIG_WAN is not set
533# CONFIG_PPP is not set
534# CONFIG_SLIP is not set
535# CONFIG_NETCONSOLE is not set
536# CONFIG_NETPOLL is not set
537# CONFIG_NET_POLL_CONTROLLER is not set
538# CONFIG_ISDN is not set
539
540#
541# Input device support
542#
543CONFIG_INPUT=y
544# CONFIG_INPUT_FF_MEMLESS is not set
545# CONFIG_INPUT_POLLDEV is not set
546
547#
548# Userland interfaces
549#
550# CONFIG_INPUT_MOUSEDEV is not set
551# CONFIG_INPUT_JOYDEV is not set
552# CONFIG_INPUT_EVDEV is not set
553# CONFIG_INPUT_EVBUG is not set
554
555#
556# Input Device Drivers
557#
558# CONFIG_INPUT_KEYBOARD is not set
559# CONFIG_INPUT_MOUSE is not set
560# CONFIG_INPUT_JOYSTICK is not set
561# CONFIG_INPUT_TABLET is not set
562# CONFIG_INPUT_TOUCHSCREEN is not set
563# CONFIG_INPUT_MISC is not set
564
565#
566# Hardware I/O ports
567#
568# CONFIG_SERIO is not set
569# CONFIG_GAMEPORT is not set
570
571#
572# Character devices
573#
574CONFIG_VT=y
575CONFIG_CONSOLE_TRANSLATIONS=y
576CONFIG_VT_CONSOLE=y
577CONFIG_HW_CONSOLE=y
578# CONFIG_VT_HW_CONSOLE_BINDING is not set
579# CONFIG_DEVKMEM is not set
580# CONFIG_SERIAL_NONSTANDARD is not set
581
582#
583# Serial drivers
584#
585# CONFIG_SERIAL_8250 is not set
586
587#
588# Non-8250 serial port support
589#
590CONFIG_SERIAL_PXA=y
591CONFIG_SERIAL_PXA_CONSOLE=y
592CONFIG_SERIAL_CORE=y
593CONFIG_SERIAL_CORE_CONSOLE=y
594CONFIG_UNIX98_PTYS=y
595# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
596# CONFIG_LEGACY_PTYS is not set
597# CONFIG_IPMI_HANDLER is not set
598# CONFIG_HW_RANDOM is not set
599# CONFIG_R3964 is not set
600# CONFIG_TCG_TPM is not set
601CONFIG_I2C=m
602CONFIG_I2C_BOARDINFO=y
603CONFIG_I2C_CHARDEV=m
604CONFIG_I2C_HELPER_AUTO=y
605
606#
607# I2C Hardware Bus support
608#
609
610#
611# I2C system bus drivers (mostly embedded / system-on-chip)
612#
613# CONFIG_I2C_DESIGNWARE is not set
614# CONFIG_I2C_GPIO is not set
615# CONFIG_I2C_OCORES is not set
616CONFIG_I2C_PXA=m
617# CONFIG_I2C_PXA_SLAVE is not set
618# CONFIG_I2C_SIMTEC is not set
619
620#
621# External I2C/SMBus adapter drivers
622#
623# CONFIG_I2C_PARPORT_LIGHT is not set
624# CONFIG_I2C_TAOS_EVM is not set
625
626#
627# Other I2C/SMBus bus drivers
628#
629# CONFIG_I2C_PCA_PLATFORM is not set
630# CONFIG_I2C_STUB is not set
631
632#
633# Miscellaneous I2C Chip support
634#
635# CONFIG_DS1682 is not set
636# CONFIG_SENSORS_PCF8574 is not set
637# CONFIG_PCF8575 is not set
638# CONFIG_SENSORS_PCA9539 is not set
639# CONFIG_SENSORS_TSL2550 is not set
640# CONFIG_I2C_DEBUG_CORE is not set
641# CONFIG_I2C_DEBUG_ALGO is not set
642# CONFIG_I2C_DEBUG_BUS is not set
643# CONFIG_I2C_DEBUG_CHIP is not set
644# CONFIG_SPI is not set
645CONFIG_ARCH_REQUIRE_GPIOLIB=y
646CONFIG_GPIOLIB=y
647# CONFIG_DEBUG_GPIO is not set
648# CONFIG_GPIO_SYSFS is not set
649
650#
651# Memory mapped GPIO expanders:
652#
653
654#
655# I2C GPIO expanders:
656#
657# CONFIG_GPIO_MAX732X is not set
658# CONFIG_GPIO_PCA953X is not set
659# CONFIG_GPIO_PCF857X is not set
660
661#
662# PCI GPIO expanders:
663#
664
665#
666# SPI GPIO expanders:
667#
668# CONFIG_W1 is not set
669# CONFIG_POWER_SUPPLY is not set
670CONFIG_HWMON=m
671# CONFIG_HWMON_VID is not set
672# CONFIG_SENSORS_AD7414 is not set
673# CONFIG_SENSORS_AD7418 is not set
674CONFIG_SENSORS_ADM1021=m
675# CONFIG_SENSORS_ADM1025 is not set
676# CONFIG_SENSORS_ADM1026 is not set
677# CONFIG_SENSORS_ADM1029 is not set
678# CONFIG_SENSORS_ADM1031 is not set
679# CONFIG_SENSORS_ADM9240 is not set
680# CONFIG_SENSORS_ADT7462 is not set
681# CONFIG_SENSORS_ADT7470 is not set
682# CONFIG_SENSORS_ADT7473 is not set
683# CONFIG_SENSORS_ADT7475 is not set
684# CONFIG_SENSORS_ATXP1 is not set
685# CONFIG_SENSORS_DS1621 is not set
686# CONFIG_SENSORS_F71805F is not set
687# CONFIG_SENSORS_F71882FG is not set
688# CONFIG_SENSORS_F75375S is not set
689# CONFIG_SENSORS_G760A is not set
690# CONFIG_SENSORS_GL518SM is not set
691# CONFIG_SENSORS_GL520SM is not set
692# CONFIG_SENSORS_IT87 is not set
693# CONFIG_SENSORS_LM63 is not set
694# CONFIG_SENSORS_LM75 is not set
695# CONFIG_SENSORS_LM77 is not set
696# CONFIG_SENSORS_LM78 is not set
697# CONFIG_SENSORS_LM80 is not set
698# CONFIG_SENSORS_LM83 is not set
699# CONFIG_SENSORS_LM85 is not set
700# CONFIG_SENSORS_LM87 is not set
701# CONFIG_SENSORS_LM90 is not set
702# CONFIG_SENSORS_LM92 is not set
703# CONFIG_SENSORS_LM93 is not set
704# CONFIG_SENSORS_LTC4215 is not set
705# CONFIG_SENSORS_LTC4245 is not set
706# CONFIG_SENSORS_LM95241 is not set
707# CONFIG_SENSORS_MAX1619 is not set
708CONFIG_SENSORS_MAX6650=m
709# CONFIG_SENSORS_PC87360 is not set
710# CONFIG_SENSORS_PC87427 is not set
711# CONFIG_SENSORS_PCF8591 is not set
712# CONFIG_SENSORS_SHT15 is not set
713# CONFIG_SENSORS_DME1737 is not set
714# CONFIG_SENSORS_SMSC47M1 is not set
715# CONFIG_SENSORS_SMSC47M192 is not set
716# CONFIG_SENSORS_SMSC47B397 is not set
717# CONFIG_SENSORS_ADS7828 is not set
718# CONFIG_SENSORS_THMC50 is not set
719# CONFIG_SENSORS_TMP401 is not set
720# CONFIG_SENSORS_VT1211 is not set
721# CONFIG_SENSORS_W83781D is not set
722# CONFIG_SENSORS_W83791D is not set
723# CONFIG_SENSORS_W83792D is not set
724# CONFIG_SENSORS_W83793 is not set
725# CONFIG_SENSORS_W83L785TS is not set
726# CONFIG_SENSORS_W83L786NG is not set
727# CONFIG_SENSORS_W83627HF is not set
728# CONFIG_SENSORS_W83627EHF is not set
729# CONFIG_HWMON_DEBUG_CHIP is not set
730# CONFIG_THERMAL is not set
731# CONFIG_WATCHDOG is not set
732CONFIG_SSB_POSSIBLE=y
733
734#
735# Sonics Silicon Backplane
736#
737# CONFIG_SSB is not set
738
739#
740# Multifunction device drivers
741#
742# CONFIG_MFD_CORE is not set
743# CONFIG_MFD_SM501 is not set
744# CONFIG_MFD_ASIC3 is not set
745# CONFIG_HTC_EGPIO is not set
746# CONFIG_HTC_PASIC3 is not set
747# CONFIG_TPS65010 is not set
748# CONFIG_MFD_TMIO is not set
749# CONFIG_MFD_T7L66XB is not set
750# CONFIG_MFD_TC6387XB is not set
751# CONFIG_MFD_TC6393XB is not set
752# CONFIG_MFD_WM8400 is not set
753# CONFIG_MFD_WM8350_I2C is not set
754# CONFIG_MFD_PCF50633 is not set
755# CONFIG_AB3100_CORE is not set
756# CONFIG_MEDIA_SUPPORT is not set
757
758#
759# Graphics support
760#
761# CONFIG_VGASTATE is not set
762# CONFIG_VIDEO_OUTPUT_CONTROL is not set
763# CONFIG_FB is not set
764# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
765
766#
767# Display device support
768#
769# CONFIG_DISPLAY_SUPPORT is not set
770
771#
772# Console display driver support
773#
774# CONFIG_VGA_CONSOLE is not set
775CONFIG_DUMMY_CONSOLE=y
776# CONFIG_SOUND is not set
777# CONFIG_HID_SUPPORT is not set
778# CONFIG_USB_SUPPORT is not set
779# CONFIG_MMC is not set
780# CONFIG_MEMSTICK is not set
781# CONFIG_ACCESSIBILITY is not set
782# CONFIG_NEW_LEDS is not set
783CONFIG_RTC_LIB=y
784CONFIG_RTC_CLASS=m
785
786#
787# RTC interfaces
788#
789CONFIG_RTC_INTF_SYSFS=y
790CONFIG_RTC_INTF_PROC=y
791CONFIG_RTC_INTF_DEV=y
792# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
793# CONFIG_RTC_DRV_TEST is not set
794
795#
796# I2C RTC drivers
797#
798# CONFIG_RTC_DRV_DS1307 is not set
799# CONFIG_RTC_DRV_DS1374 is not set
800# CONFIG_RTC_DRV_DS1672 is not set
801# CONFIG_RTC_DRV_MAX6900 is not set
802# CONFIG_RTC_DRV_RS5C372 is not set
803# CONFIG_RTC_DRV_ISL1208 is not set
804# CONFIG_RTC_DRV_X1205 is not set
805# CONFIG_RTC_DRV_PCF8563 is not set
806# CONFIG_RTC_DRV_PCF8583 is not set
807# CONFIG_RTC_DRV_M41T80 is not set
808# CONFIG_RTC_DRV_S35390A is not set
809# CONFIG_RTC_DRV_FM3130 is not set
810# CONFIG_RTC_DRV_RX8581 is not set
811# CONFIG_RTC_DRV_RX8025 is not set
812
813#
814# SPI RTC drivers
815#
816
817#
818# Platform RTC drivers
819#
820# CONFIG_RTC_DRV_CMOS is not set
821# CONFIG_RTC_DRV_DS1286 is not set
822# CONFIG_RTC_DRV_DS1511 is not set
823# CONFIG_RTC_DRV_DS1553 is not set
824# CONFIG_RTC_DRV_DS1742 is not set
825# CONFIG_RTC_DRV_STK17TA8 is not set
826# CONFIG_RTC_DRV_M48T86 is not set
827# CONFIG_RTC_DRV_M48T35 is not set
828# CONFIG_RTC_DRV_M48T59 is not set
829# CONFIG_RTC_DRV_BQ4802 is not set
830# CONFIG_RTC_DRV_V3020 is not set
831
832#
833# on-CPU RTC drivers
834#
835CONFIG_RTC_DRV_SA1100=m
836# CONFIG_RTC_DRV_PXA is not set
837CONFIG_DMADEVICES=y
838
839#
840# DMA Devices
841#
842# CONFIG_AUXDISPLAY is not set
843# CONFIG_REGULATOR is not set
844# CONFIG_UIO is not set
845# CONFIG_STAGING is not set
846
847#
848# File systems
849#
850CONFIG_FILE_LOCKING=y
851# CONFIG_FSNOTIFY is not set
852# CONFIG_DNOTIFY is not set
853# CONFIG_INOTIFY is not set
854# CONFIG_INOTIFY_USER is not set
855# CONFIG_QUOTA is not set
856# CONFIG_AUTOFS_FS is not set
857# CONFIG_AUTOFS4_FS is not set
858# CONFIG_FUSE_FS is not set
859
860#
861# Caches
862#
863# CONFIG_FSCACHE is not set
864
865#
866# Pseudo filesystems
867#
868CONFIG_PROC_FS=y
869CONFIG_PROC_SYSCTL=y
870CONFIG_PROC_PAGE_MONITOR=y
871CONFIG_SYSFS=y
872CONFIG_TMPFS=y
873# CONFIG_TMPFS_POSIX_ACL is not set
874# CONFIG_HUGETLB_PAGE is not set
875# CONFIG_CONFIGFS_FS is not set
876CONFIG_MISC_FILESYSTEMS=y
877CONFIG_JFFS2_FS=y
878CONFIG_JFFS2_FS_DEBUG=0
879CONFIG_JFFS2_FS_WRITEBUFFER=y
880CONFIG_JFFS2_FS_WBUF_VERIFY=y
881# CONFIG_JFFS2_SUMMARY is not set
882# CONFIG_JFFS2_FS_XATTR is not set
883# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
884CONFIG_JFFS2_ZLIB=y
885# CONFIG_JFFS2_LZO is not set
886CONFIG_JFFS2_RTIME=y
887# CONFIG_JFFS2_RUBIN is not set
888# CONFIG_ROMFS_FS is not set
889CONFIG_NETWORK_FILESYSTEMS=y
890CONFIG_NFS_FS=m
891CONFIG_NFS_V3=y
892# CONFIG_NFS_V3_ACL is not set
893# CONFIG_NFS_V4 is not set
894# CONFIG_NFSD is not set
895CONFIG_LOCKD=m
896CONFIG_LOCKD_V4=y
897CONFIG_NFS_COMMON=y
898CONFIG_SUNRPC=m
899# CONFIG_RPCSEC_GSS_KRB5 is not set
900# CONFIG_RPCSEC_GSS_SPKM3 is not set
901# CONFIG_SMB_FS is not set
902# CONFIG_CIFS is not set
903# CONFIG_NCP_FS is not set
904# CONFIG_CODA_FS is not set
905# CONFIG_AFS_FS is not set
906CONFIG_NLS=m
907CONFIG_NLS_DEFAULT="utf8"
908# CONFIG_NLS_CODEPAGE_437 is not set
909# CONFIG_NLS_CODEPAGE_737 is not set
910# CONFIG_NLS_CODEPAGE_775 is not set
911# CONFIG_NLS_CODEPAGE_850 is not set
912# CONFIG_NLS_CODEPAGE_852 is not set
913# CONFIG_NLS_CODEPAGE_855 is not set
914# CONFIG_NLS_CODEPAGE_857 is not set
915# CONFIG_NLS_CODEPAGE_860 is not set
916# CONFIG_NLS_CODEPAGE_861 is not set
917# CONFIG_NLS_CODEPAGE_862 is not set
918# CONFIG_NLS_CODEPAGE_863 is not set
919# CONFIG_NLS_CODEPAGE_864 is not set
920# CONFIG_NLS_CODEPAGE_865 is not set
921# CONFIG_NLS_CODEPAGE_866 is not set
922# CONFIG_NLS_CODEPAGE_869 is not set
923# CONFIG_NLS_CODEPAGE_936 is not set
924# CONFIG_NLS_CODEPAGE_950 is not set
925# CONFIG_NLS_CODEPAGE_932 is not set
926# CONFIG_NLS_CODEPAGE_949 is not set
927# CONFIG_NLS_CODEPAGE_874 is not set
928# CONFIG_NLS_ISO8859_8 is not set
929# CONFIG_NLS_CODEPAGE_1250 is not set
930# CONFIG_NLS_CODEPAGE_1251 is not set
931# CONFIG_NLS_ASCII is not set
932# CONFIG_NLS_ISO8859_1 is not set
933# CONFIG_NLS_ISO8859_2 is not set
934# CONFIG_NLS_ISO8859_3 is not set
935# CONFIG_NLS_ISO8859_4 is not set
936# CONFIG_NLS_ISO8859_5 is not set
937# CONFIG_NLS_ISO8859_6 is not set
938# CONFIG_NLS_ISO8859_7 is not set
939# CONFIG_NLS_ISO8859_9 is not set
940# CONFIG_NLS_ISO8859_13 is not set
941# CONFIG_NLS_ISO8859_14 is not set
942# CONFIG_NLS_ISO8859_15 is not set
943# CONFIG_NLS_KOI8_R is not set
944# CONFIG_NLS_KOI8_U is not set
945CONFIG_NLS_UTF8=m
946# CONFIG_DLM is not set
947
948#
949# Kernel hacking
950#
951CONFIG_PRINTK_TIME=y
952CONFIG_ENABLE_WARN_DEPRECATED=y
953CONFIG_ENABLE_MUST_CHECK=y
954CONFIG_FRAME_WARN=1024
955# CONFIG_MAGIC_SYSRQ is not set
956# CONFIG_UNUSED_SYMBOLS is not set
957# CONFIG_DEBUG_FS is not set
958# CONFIG_HEADERS_CHECK is not set
959CONFIG_DEBUG_KERNEL=y
960# CONFIG_DEBUG_SHIRQ is not set
961CONFIG_DETECT_SOFTLOCKUP=y
962# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
963CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
964CONFIG_DETECT_HUNG_TASK=y
965# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
966CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
967# CONFIG_SCHED_DEBUG is not set
968# CONFIG_SCHEDSTATS is not set
969# CONFIG_TIMER_STATS is not set
970# CONFIG_DEBUG_OBJECTS is not set
971# CONFIG_DEBUG_KMEMLEAK is not set
972# CONFIG_DEBUG_RT_MUTEXES is not set
973# CONFIG_RT_MUTEX_TESTER is not set
974# CONFIG_DEBUG_SPINLOCK is not set
975# CONFIG_DEBUG_MUTEXES is not set
976# CONFIG_DEBUG_LOCK_ALLOC is not set
977# CONFIG_PROVE_LOCKING is not set
978# CONFIG_LOCK_STAT is not set
979# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
980# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
981# CONFIG_DEBUG_KOBJECT is not set
982# CONFIG_DEBUG_BUGVERBOSE is not set
983# CONFIG_DEBUG_INFO is not set
984# CONFIG_DEBUG_VM is not set
985# CONFIG_DEBUG_WRITECOUNT is not set
986# CONFIG_DEBUG_MEMORY_INIT is not set
987# CONFIG_DEBUG_LIST is not set
988# CONFIG_DEBUG_SG is not set
989# CONFIG_DEBUG_NOTIFIERS is not set
990CONFIG_FRAME_POINTER=y
991# CONFIG_BOOT_PRINTK_DELAY is not set
992# CONFIG_RCU_TORTURE_TEST is not set
993# CONFIG_RCU_CPU_STALL_DETECTOR is not set
994# CONFIG_KPROBES_SANITY_TEST is not set
995# CONFIG_BACKTRACE_SELF_TEST is not set
996# CONFIG_FAULT_INJECTION is not set
997# CONFIG_LATENCYTOP is not set
998CONFIG_SYSCTL_SYSCALL_CHECK=y
999# CONFIG_PAGE_POISONING is not set
1000CONFIG_HAVE_FUNCTION_TRACER=y
1001CONFIG_TRACING_SUPPORT=y
1002# CONFIG_FTRACE is not set
1003# CONFIG_SAMPLES is not set
1004CONFIG_HAVE_ARCH_KGDB=y
1005# CONFIG_KGDB is not set
1006# CONFIG_ARM_UNWIND is not set
1007# CONFIG_DEBUG_USER is not set
1008# CONFIG_DEBUG_ERRORS is not set
1009# CONFIG_DEBUG_STACK_USAGE is not set
1010# CONFIG_DEBUG_LL is not set
1011
1012#
1013# Security options
1014#
1015# CONFIG_KEYS is not set
1016# CONFIG_SECURITY is not set
1017# CONFIG_SECURITYFS is not set
1018# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1019CONFIG_CRYPTO=y
1020
1021#
1022# Crypto core or helper
1023#
1024# CONFIG_CRYPTO_FIPS is not set
1025CONFIG_CRYPTO_ALGAPI=m
1026CONFIG_CRYPTO_ALGAPI2=m
1027CONFIG_CRYPTO_HASH=m
1028CONFIG_CRYPTO_HASH2=m
1029# CONFIG_CRYPTO_MANAGER is not set
1030# CONFIG_CRYPTO_MANAGER2 is not set
1031# CONFIG_CRYPTO_GF128MUL is not set
1032# CONFIG_CRYPTO_NULL is not set
1033# CONFIG_CRYPTO_CRYPTD is not set
1034# CONFIG_CRYPTO_AUTHENC is not set
1035# CONFIG_CRYPTO_TEST is not set
1036
1037#
1038# Authenticated Encryption with Associated Data
1039#
1040# CONFIG_CRYPTO_CCM is not set
1041# CONFIG_CRYPTO_GCM is not set
1042# CONFIG_CRYPTO_SEQIV is not set
1043
1044#
1045# Block modes
1046#
1047# CONFIG_CRYPTO_CBC is not set
1048# CONFIG_CRYPTO_CTR is not set
1049# CONFIG_CRYPTO_CTS is not set
1050# CONFIG_CRYPTO_ECB is not set
1051# CONFIG_CRYPTO_LRW is not set
1052# CONFIG_CRYPTO_PCBC is not set
1053# CONFIG_CRYPTO_XTS is not set
1054
1055#
1056# Hash modes
1057#
1058# CONFIG_CRYPTO_HMAC is not set
1059# CONFIG_CRYPTO_XCBC is not set
1060
1061#
1062# Digest
1063#
1064CONFIG_CRYPTO_CRC32C=m
1065# CONFIG_CRYPTO_MD4 is not set
1066# CONFIG_CRYPTO_MD5 is not set
1067# CONFIG_CRYPTO_MICHAEL_MIC is not set
1068# CONFIG_CRYPTO_RMD128 is not set
1069# CONFIG_CRYPTO_RMD160 is not set
1070# CONFIG_CRYPTO_RMD256 is not set
1071# CONFIG_CRYPTO_RMD320 is not set
1072# CONFIG_CRYPTO_SHA1 is not set
1073# CONFIG_CRYPTO_SHA256 is not set
1074# CONFIG_CRYPTO_SHA512 is not set
1075# CONFIG_CRYPTO_TGR192 is not set
1076# CONFIG_CRYPTO_WP512 is not set
1077
1078#
1079# Ciphers
1080#
1081# CONFIG_CRYPTO_AES is not set
1082# CONFIG_CRYPTO_ANUBIS is not set
1083# CONFIG_CRYPTO_ARC4 is not set
1084# CONFIG_CRYPTO_BLOWFISH is not set
1085# CONFIG_CRYPTO_CAMELLIA is not set
1086# CONFIG_CRYPTO_CAST5 is not set
1087# CONFIG_CRYPTO_CAST6 is not set
1088# CONFIG_CRYPTO_DES is not set
1089# CONFIG_CRYPTO_FCRYPT is not set
1090# CONFIG_CRYPTO_KHAZAD is not set
1091# CONFIG_CRYPTO_SALSA20 is not set
1092# CONFIG_CRYPTO_SEED is not set
1093# CONFIG_CRYPTO_SERPENT is not set
1094# CONFIG_CRYPTO_TEA is not set
1095# CONFIG_CRYPTO_TWOFISH is not set
1096
1097#
1098# Compression
1099#
1100# CONFIG_CRYPTO_DEFLATE is not set
1101# CONFIG_CRYPTO_ZLIB is not set
1102# CONFIG_CRYPTO_LZO is not set
1103
1104#
1105# Random Number Generation
1106#
1107# CONFIG_CRYPTO_ANSI_CPRNG is not set
1108# CONFIG_CRYPTO_HW is not set
1109# CONFIG_BINARY_PRINTF is not set
1110
1111#
1112# Library routines
1113#
1114CONFIG_BITREVERSE=y
1115CONFIG_GENERIC_FIND_LAST_BIT=y
1116# CONFIG_CRC_CCITT is not set
1117# CONFIG_CRC16 is not set
1118# CONFIG_CRC_T10DIF is not set
1119# CONFIG_CRC_ITU_T is not set
1120CONFIG_CRC32=y
1121# CONFIG_CRC7 is not set
1122CONFIG_LIBCRC32C=m
1123CONFIG_ZLIB_INFLATE=y
1124CONFIG_ZLIB_DEFLATE=y
1125CONFIG_DECOMPRESS_GZIP=y
1126CONFIG_HAS_IOMEM=y
1127CONFIG_HAS_IOPORT=y
1128CONFIG_HAS_DMA=y
1129CONFIG_NLATTR=y
diff --git a/arch/arm/include/asm/atomic.h b/arch/arm/include/asm/atomic.h
index 9ed2377fe8e5..d0daeab2234e 100644
--- a/arch/arm/include/asm/atomic.h
+++ b/arch/arm/include/asm/atomic.h
@@ -19,31 +19,21 @@
19 19
20#ifdef __KERNEL__ 20#ifdef __KERNEL__
21 21
22/*
23 * On ARM, ordinary assignment (str instruction) doesn't clear the local
24 * strex/ldrex monitor on some implementations. The reason we can use it for
25 * atomic_set() is the clrex or dummy strex done on every exception return.
26 */
22#define atomic_read(v) ((v)->counter) 27#define atomic_read(v) ((v)->counter)
28#define atomic_set(v,i) (((v)->counter) = (i))
23 29
24#if __LINUX_ARM_ARCH__ >= 6 30#if __LINUX_ARM_ARCH__ >= 6
25 31
26/* 32/*
27 * ARMv6 UP and SMP safe atomic ops. We use load exclusive and 33 * ARMv6 UP and SMP safe atomic ops. We use load exclusive and
28 * store exclusive to ensure that these are atomic. We may loop 34 * store exclusive to ensure that these are atomic. We may loop
29 * to ensure that the update happens. Writing to 'v->counter' 35 * to ensure that the update happens.
30 * without using the following operations WILL break the atomic
31 * nature of these ops.
32 */ 36 */
33static inline void atomic_set(atomic_t *v, int i)
34{
35 unsigned long tmp;
36
37 __asm__ __volatile__("@ atomic_set\n"
38"1: ldrex %0, [%1]\n"
39" strex %0, %2, [%1]\n"
40" teq %0, #0\n"
41" bne 1b"
42 : "=&r" (tmp)
43 : "r" (&v->counter), "r" (i)
44 : "cc");
45}
46
47static inline void atomic_add(int i, atomic_t *v) 37static inline void atomic_add(int i, atomic_t *v)
48{ 38{
49 unsigned long tmp; 39 unsigned long tmp;
@@ -163,8 +153,6 @@ static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr)
163#error SMP not supported on pre-ARMv6 CPUs 153#error SMP not supported on pre-ARMv6 CPUs
164#endif 154#endif
165 155
166#define atomic_set(v,i) (((v)->counter) = (i))
167
168static inline int atomic_add_return(int i, atomic_t *v) 156static inline int atomic_add_return(int i, atomic_t *v)
169{ 157{
170 unsigned long flags; 158 unsigned long flags;
diff --git a/arch/arm/include/asm/cache.h b/arch/arm/include/asm/cache.h
index feaa75f0013e..66c160b8547f 100644
--- a/arch/arm/include/asm/cache.h
+++ b/arch/arm/include/asm/cache.h
@@ -4,7 +4,7 @@
4#ifndef __ASMARM_CACHE_H 4#ifndef __ASMARM_CACHE_H
5#define __ASMARM_CACHE_H 5#define __ASMARM_CACHE_H
6 6
7#define L1_CACHE_SHIFT 5 7#define L1_CACHE_SHIFT CONFIG_ARM_L1_CACHE_SHIFT
8#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) 8#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
9 9
10/* 10/*
diff --git a/arch/arm/include/asm/cacheflush.h b/arch/arm/include/asm/cacheflush.h
index 1a711ea8418b..fd03fb63a332 100644
--- a/arch/arm/include/asm/cacheflush.h
+++ b/arch/arm/include/asm/cacheflush.h
@@ -334,14 +334,14 @@ static inline void outer_flush_range(unsigned long start, unsigned long end)
334#ifndef CONFIG_CPU_CACHE_VIPT 334#ifndef CONFIG_CPU_CACHE_VIPT
335static inline void flush_cache_mm(struct mm_struct *mm) 335static inline void flush_cache_mm(struct mm_struct *mm)
336{ 336{
337 if (cpu_isset(smp_processor_id(), mm->cpu_vm_mask)) 337 if (cpumask_test_cpu(smp_processor_id(), mm_cpumask(mm)))
338 __cpuc_flush_user_all(); 338 __cpuc_flush_user_all();
339} 339}
340 340
341static inline void 341static inline void
342flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long end) 342flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long end)
343{ 343{
344 if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask)) 344 if (cpumask_test_cpu(smp_processor_id(), mm_cpumask(vma->vm_mm)))
345 __cpuc_flush_user_range(start & PAGE_MASK, PAGE_ALIGN(end), 345 __cpuc_flush_user_range(start & PAGE_MASK, PAGE_ALIGN(end),
346 vma->vm_flags); 346 vma->vm_flags);
347} 347}
@@ -349,7 +349,7 @@ flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long
349static inline void 349static inline void
350flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr, unsigned long pfn) 350flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr, unsigned long pfn)
351{ 351{
352 if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask)) { 352 if (cpumask_test_cpu(smp_processor_id(), mm_cpumask(vma->vm_mm))) {
353 unsigned long addr = user_addr & PAGE_MASK; 353 unsigned long addr = user_addr & PAGE_MASK;
354 __cpuc_flush_user_range(addr, addr + PAGE_SIZE, vma->vm_flags); 354 __cpuc_flush_user_range(addr, addr + PAGE_SIZE, vma->vm_flags);
355 } 355 }
@@ -360,7 +360,7 @@ flush_ptrace_access(struct vm_area_struct *vma, struct page *page,
360 unsigned long uaddr, void *kaddr, 360 unsigned long uaddr, void *kaddr,
361 unsigned long len, int write) 361 unsigned long len, int write)
362{ 362{
363 if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask)) { 363 if (cpumask_test_cpu(smp_processor_id(), mm_cpumask(vma->vm_mm))) {
364 unsigned long addr = (unsigned long)kaddr; 364 unsigned long addr = (unsigned long)kaddr;
365 __cpuc_coherent_kern_range(addr, addr + len); 365 __cpuc_coherent_kern_range(addr, addr + len);
366 } 366 }
diff --git a/arch/arm/include/asm/cputype.h b/arch/arm/include/asm/cputype.h
index b3e656c6fb78..20ae96cc0020 100644
--- a/arch/arm/include/asm/cputype.h
+++ b/arch/arm/include/asm/cputype.h
@@ -63,6 +63,11 @@ static inline unsigned int __attribute_const__ read_cpuid_cachetype(void)
63 return read_cpuid(CPUID_CACHETYPE); 63 return read_cpuid(CPUID_CACHETYPE);
64} 64}
65 65
66static inline unsigned int __attribute_const__ read_cpuid_tcmstatus(void)
67{
68 return read_cpuid(CPUID_TCM);
69}
70
66/* 71/*
67 * Intel's XScale3 core supports some v6 features (supersections, L2) 72 * Intel's XScale3 core supports some v6 features (supersections, L2)
68 * but advertises itself as v5 as it does not support the v6 ISA. For 73 * but advertises itself as v5 as it does not support the v6 ISA. For
@@ -73,7 +78,10 @@ static inline unsigned int __attribute_const__ read_cpuid_cachetype(void)
73#else 78#else
74static inline int cpu_is_xsc3(void) 79static inline int cpu_is_xsc3(void)
75{ 80{
76 if ((read_cpuid_id() & 0xffffe000) == 0x69056000) 81 unsigned int id;
82 id = read_cpuid_id() & 0xffffe000;
83 /* It covers both Intel ID and Marvell ID */
84 if ((id == 0x69056000) || (id == 0x56056000))
77 return 1; 85 return 1;
78 86
79 return 0; 87 return 0;
diff --git a/arch/arm/include/asm/hardware/iop3xx-adma.h b/arch/arm/include/asm/hardware/iop3xx-adma.h
index 83e6ba338e2c..1a8c7279a28b 100644
--- a/arch/arm/include/asm/hardware/iop3xx-adma.h
+++ b/arch/arm/include/asm/hardware/iop3xx-adma.h
@@ -187,11 +187,74 @@ union iop3xx_desc {
187 void *ptr; 187 void *ptr;
188}; 188};
189 189
190/* No support for p+q operations */
191static inline int
192iop_chan_pq_slot_count(size_t len, int src_cnt, int *slots_per_op)
193{
194 BUG();
195 return 0;
196}
197
198static inline void
199iop_desc_init_pq(struct iop_adma_desc_slot *desc, int src_cnt,
200 unsigned long flags)
201{
202 BUG();
203}
204
205static inline void
206iop_desc_set_pq_addr(struct iop_adma_desc_slot *desc, dma_addr_t *addr)
207{
208 BUG();
209}
210
211static inline void
212iop_desc_set_pq_src_addr(struct iop_adma_desc_slot *desc, int src_idx,
213 dma_addr_t addr, unsigned char coef)
214{
215 BUG();
216}
217
218static inline int
219iop_chan_pq_zero_sum_slot_count(size_t len, int src_cnt, int *slots_per_op)
220{
221 BUG();
222 return 0;
223}
224
225static inline void
226iop_desc_init_pq_zero_sum(struct iop_adma_desc_slot *desc, int src_cnt,
227 unsigned long flags)
228{
229 BUG();
230}
231
232static inline void
233iop_desc_set_pq_zero_sum_byte_count(struct iop_adma_desc_slot *desc, u32 len)
234{
235 BUG();
236}
237
238#define iop_desc_set_pq_zero_sum_src_addr iop_desc_set_pq_src_addr
239
240static inline void
241iop_desc_set_pq_zero_sum_addr(struct iop_adma_desc_slot *desc, int pq_idx,
242 dma_addr_t *src)
243{
244 BUG();
245}
246
190static inline int iop_adma_get_max_xor(void) 247static inline int iop_adma_get_max_xor(void)
191{ 248{
192 return 32; 249 return 32;
193} 250}
194 251
252static inline int iop_adma_get_max_pq(void)
253{
254 BUG();
255 return 0;
256}
257
195static inline u32 iop_chan_get_current_descriptor(struct iop_adma_chan *chan) 258static inline u32 iop_chan_get_current_descriptor(struct iop_adma_chan *chan)
196{ 259{
197 int id = chan->device->id; 260 int id = chan->device->id;
@@ -332,6 +395,11 @@ static inline int iop_chan_zero_sum_slot_count(size_t len, int src_cnt,
332 return slot_cnt; 395 return slot_cnt;
333} 396}
334 397
398static inline int iop_desc_is_pq(struct iop_adma_desc_slot *desc)
399{
400 return 0;
401}
402
335static inline u32 iop_desc_get_dest_addr(struct iop_adma_desc_slot *desc, 403static inline u32 iop_desc_get_dest_addr(struct iop_adma_desc_slot *desc,
336 struct iop_adma_chan *chan) 404 struct iop_adma_chan *chan)
337{ 405{
@@ -349,6 +417,14 @@ static inline u32 iop_desc_get_dest_addr(struct iop_adma_desc_slot *desc,
349 return 0; 417 return 0;
350} 418}
351 419
420
421static inline u32 iop_desc_get_qdest_addr(struct iop_adma_desc_slot *desc,
422 struct iop_adma_chan *chan)
423{
424 BUG();
425 return 0;
426}
427
352static inline u32 iop_desc_get_byte_count(struct iop_adma_desc_slot *desc, 428static inline u32 iop_desc_get_byte_count(struct iop_adma_desc_slot *desc,
353 struct iop_adma_chan *chan) 429 struct iop_adma_chan *chan)
354{ 430{
@@ -756,13 +832,14 @@ static inline void iop_desc_set_block_fill_val(struct iop_adma_desc_slot *desc,
756 hw_desc->src[0] = val; 832 hw_desc->src[0] = val;
757} 833}
758 834
759static inline int iop_desc_get_zero_result(struct iop_adma_desc_slot *desc) 835static inline enum sum_check_flags
836iop_desc_get_zero_result(struct iop_adma_desc_slot *desc)
760{ 837{
761 struct iop3xx_desc_aau *hw_desc = desc->hw_desc; 838 struct iop3xx_desc_aau *hw_desc = desc->hw_desc;
762 struct iop3xx_aau_desc_ctrl desc_ctrl = hw_desc->desc_ctrl_field; 839 struct iop3xx_aau_desc_ctrl desc_ctrl = hw_desc->desc_ctrl_field;
763 840
764 iop_paranoia(!(desc_ctrl.tx_complete && desc_ctrl.zero_result_en)); 841 iop_paranoia(!(desc_ctrl.tx_complete && desc_ctrl.zero_result_en));
765 return desc_ctrl.zero_result_err; 842 return desc_ctrl.zero_result_err << SUM_CHECK_P;
766} 843}
767 844
768static inline void iop_chan_append(struct iop_adma_chan *chan) 845static inline void iop_chan_append(struct iop_adma_chan *chan)
diff --git a/arch/arm/include/asm/hardware/iop_adma.h b/arch/arm/include/asm/hardware/iop_adma.h
index 385c6e8cbbd2..59b8c3892f76 100644
--- a/arch/arm/include/asm/hardware/iop_adma.h
+++ b/arch/arm/include/asm/hardware/iop_adma.h
@@ -86,6 +86,7 @@ struct iop_adma_chan {
86 * @idx: pool index 86 * @idx: pool index
87 * @unmap_src_cnt: number of xor sources 87 * @unmap_src_cnt: number of xor sources
88 * @unmap_len: transaction bytecount 88 * @unmap_len: transaction bytecount
89 * @tx_list: list of descriptors that are associated with one operation
89 * @async_tx: support for the async_tx api 90 * @async_tx: support for the async_tx api
90 * @group_list: list of slots that make up a multi-descriptor transaction 91 * @group_list: list of slots that make up a multi-descriptor transaction
91 * for example transfer lengths larger than the supported hw max 92 * for example transfer lengths larger than the supported hw max
@@ -102,10 +103,12 @@ struct iop_adma_desc_slot {
102 u16 idx; 103 u16 idx;
103 u16 unmap_src_cnt; 104 u16 unmap_src_cnt;
104 size_t unmap_len; 105 size_t unmap_len;
106 struct list_head tx_list;
105 struct dma_async_tx_descriptor async_tx; 107 struct dma_async_tx_descriptor async_tx;
106 union { 108 union {
107 u32 *xor_check_result; 109 u32 *xor_check_result;
108 u32 *crc32_result; 110 u32 *crc32_result;
111 u32 *pq_check_result;
109 }; 112 };
110}; 113};
111 114
diff --git a/arch/arm/include/asm/mach/mmc.h b/arch/arm/include/asm/mach/mmc.h
deleted file mode 100644
index b490ecc79def..000000000000
--- a/arch/arm/include/asm/mach/mmc.h
+++ /dev/null
@@ -1,17 +0,0 @@
1/*
2 * arch/arm/include/asm/mach/mmc.h
3 */
4#ifndef ASMARM_MACH_MMC_H
5#define ASMARM_MACH_MMC_H
6
7#include <linux/mmc/host.h>
8
9struct mmc_platform_data {
10 unsigned int ocr_mask; /* available voltages */
11 u32 (*translate_vdd)(struct device *, unsigned int);
12 unsigned int (*status)(struct device *);
13 int gpio_wp;
14 int gpio_cd;
15};
16
17#endif
diff --git a/arch/arm/include/asm/mman.h b/arch/arm/include/asm/mman.h
index fc26976d8e3a..8eebf89f5ab1 100644
--- a/arch/arm/include/asm/mman.h
+++ b/arch/arm/include/asm/mman.h
@@ -1,17 +1 @@
1#ifndef __ARM_MMAN_H__ #include <asm-generic/mman.h>
2#define __ARM_MMAN_H__
3
4#include <asm-generic/mman-common.h>
5
6#define MAP_GROWSDOWN 0x0100 /* stack-like segment */
7#define MAP_DENYWRITE 0x0800 /* ETXTBSY */
8#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */
9#define MAP_LOCKED 0x2000 /* pages are locked */
10#define MAP_NORESERVE 0x4000 /* don't check for reservations */
11#define MAP_POPULATE 0x8000 /* populate (prefault) page tables */
12#define MAP_NONBLOCK 0x10000 /* do not block on IO */
13
14#define MCL_CURRENT 1 /* lock all current mappings */
15#define MCL_FUTURE 2 /* lock all future mappings */
16
17#endif /* __ARM_MMAN_H__ */
diff --git a/arch/arm/include/asm/mmu_context.h b/arch/arm/include/asm/mmu_context.h
index bcdb9291ef0c..de6cefb329dd 100644
--- a/arch/arm/include/asm/mmu_context.h
+++ b/arch/arm/include/asm/mmu_context.h
@@ -103,14 +103,15 @@ switch_mm(struct mm_struct *prev, struct mm_struct *next,
103 103
104#ifdef CONFIG_SMP 104#ifdef CONFIG_SMP
105 /* check for possible thread migration */ 105 /* check for possible thread migration */
106 if (!cpus_empty(next->cpu_vm_mask) && !cpu_isset(cpu, next->cpu_vm_mask)) 106 if (!cpumask_empty(mm_cpumask(next)) &&
107 !cpumask_test_cpu(cpu, mm_cpumask(next)))
107 __flush_icache_all(); 108 __flush_icache_all();
108#endif 109#endif
109 if (!cpu_test_and_set(cpu, next->cpu_vm_mask) || prev != next) { 110 if (!cpumask_test_and_set_cpu(cpu, mm_cpumask(next)) || prev != next) {
110 check_context(next); 111 check_context(next);
111 cpu_switch_mm(next->pgd, next); 112 cpu_switch_mm(next->pgd, next);
112 if (cache_is_vivt()) 113 if (cache_is_vivt())
113 cpu_clear(cpu, prev->cpu_vm_mask); 114 cpumask_clear_cpu(cpu, mm_cpumask(prev));
114 } 115 }
115#endif 116#endif
116} 117}
diff --git a/arch/arm/include/asm/pci.h b/arch/arm/include/asm/pci.h
index 0abf386ba3d3..226cddd2fb65 100644
--- a/arch/arm/include/asm/pci.h
+++ b/arch/arm/include/asm/pci.h
@@ -6,8 +6,6 @@
6 6
7#include <mach/hardware.h> /* for PCIBIOS_MIN_* */ 7#include <mach/hardware.h> /* for PCIBIOS_MIN_* */
8 8
9#define pcibios_scan_all_fns(a, b) 0
10
11#ifdef CONFIG_PCI_HOST_ITE8152 9#ifdef CONFIG_PCI_HOST_ITE8152
12/* ITE bridge requires setting latency timer to avoid early bus access 10/* ITE bridge requires setting latency timer to avoid early bus access
13 termination by PIC bus mater devices 11 termination by PIC bus mater devices
diff --git a/arch/arm/include/asm/smp.h b/arch/arm/include/asm/smp.h
index a06e735b262a..e0d763be1846 100644
--- a/arch/arm/include/asm/smp.h
+++ b/arch/arm/include/asm/smp.h
@@ -93,7 +93,6 @@ extern void platform_cpu_enable(unsigned int cpu);
93 93
94extern void arch_send_call_function_single_ipi(int cpu); 94extern void arch_send_call_function_single_ipi(int cpu);
95extern void arch_send_call_function_ipi_mask(const struct cpumask *mask); 95extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
96#define arch_send_call_function_ipi_mask arch_send_call_function_ipi_mask
97 96
98/* 97/*
99 * show local interrupt info 98 * show local interrupt info
diff --git a/arch/arm/include/asm/tcm.h b/arch/arm/include/asm/tcm.h
new file mode 100644
index 000000000000..5929ef5d927a
--- /dev/null
+++ b/arch/arm/include/asm/tcm.h
@@ -0,0 +1,31 @@
1/*
2 *
3 * Copyright (C) 2008-2009 ST-Ericsson AB
4 * License terms: GNU General Public License (GPL) version 2
5 *
6 * Author: Rickard Andersson <rickard.andersson@stericsson.com>
7 * Author: Linus Walleij <linus.walleij@stericsson.com>
8 *
9 */
10#ifndef __ASMARM_TCM_H
11#define __ASMARM_TCM_H
12
13#ifndef CONFIG_HAVE_TCM
14#error "You should not be including tcm.h unless you have a TCM!"
15#endif
16
17#include <linux/compiler.h>
18
19/* Tag variables with this */
20#define __tcmdata __section(.tcm.data)
21/* Tag constants with this */
22#define __tcmconst __section(.tcm.rodata)
23/* Tag functions inside TCM called from outside TCM with this */
24#define __tcmfunc __attribute__((long_call)) __section(.tcm.text) noinline
25/* Tag function inside TCM called from inside TCM with this */
26#define __tcmlocalfunc __section(.tcm.text)
27
28void *tcm_alloc(size_t len);
29void tcm_free(void *addr, size_t len);
30
31#endif
diff --git a/arch/arm/include/asm/tlbflush.h b/arch/arm/include/asm/tlbflush.h
index c964f3fc3bc5..a45ab5dd8255 100644
--- a/arch/arm/include/asm/tlbflush.h
+++ b/arch/arm/include/asm/tlbflush.h
@@ -350,7 +350,7 @@ static inline void local_flush_tlb_mm(struct mm_struct *mm)
350 if (tlb_flag(TLB_WB)) 350 if (tlb_flag(TLB_WB))
351 dsb(); 351 dsb();
352 352
353 if (cpu_isset(smp_processor_id(), mm->cpu_vm_mask)) { 353 if (cpumask_test_cpu(smp_processor_id(), mm_cpumask(mm))) {
354 if (tlb_flag(TLB_V3_FULL)) 354 if (tlb_flag(TLB_V3_FULL))
355 asm("mcr p15, 0, %0, c6, c0, 0" : : "r" (zero) : "cc"); 355 asm("mcr p15, 0, %0, c6, c0, 0" : : "r" (zero) : "cc");
356 if (tlb_flag(TLB_V4_U_FULL)) 356 if (tlb_flag(TLB_V4_U_FULL))
@@ -388,7 +388,7 @@ local_flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr)
388 if (tlb_flag(TLB_WB)) 388 if (tlb_flag(TLB_WB))
389 dsb(); 389 dsb();
390 390
391 if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask)) { 391 if (cpumask_test_cpu(smp_processor_id(), mm_cpumask(vma->vm_mm))) {
392 if (tlb_flag(TLB_V3_PAGE)) 392 if (tlb_flag(TLB_V3_PAGE))
393 asm("mcr p15, 0, %0, c6, c0, 0" : : "r" (uaddr) : "cc"); 393 asm("mcr p15, 0, %0, c6, c0, 0" : : "r" (uaddr) : "cc");
394 if (tlb_flag(TLB_V4_U_PAGE)) 394 if (tlb_flag(TLB_V4_U_PAGE))
diff --git a/arch/arm/include/asm/unified.h b/arch/arm/include/asm/unified.h
index 073e85b9b961..bc631161e9c6 100644
--- a/arch/arm/include/asm/unified.h
+++ b/arch/arm/include/asm/unified.h
@@ -35,7 +35,9 @@
35 35
36#define ARM(x...) 36#define ARM(x...)
37#define THUMB(x...) x 37#define THUMB(x...) x
38#ifdef __ASSEMBLY__
38#define W(instr) instr.w 39#define W(instr) instr.w
40#endif
39#define BSYM(sym) sym + 1 41#define BSYM(sym) sym + 1
40 42
41#else /* !CONFIG_THUMB2_KERNEL */ 43#else /* !CONFIG_THUMB2_KERNEL */
@@ -45,7 +47,9 @@
45 47
46#define ARM(x...) x 48#define ARM(x...) x
47#define THUMB(x...) 49#define THUMB(x...)
50#ifdef __ASSEMBLY__
48#define W(instr) instr 51#define W(instr) instr
52#endif
49#define BSYM(sym) sym 53#define BSYM(sym) sym
50 54
51#endif /* CONFIG_THUMB2_KERNEL */ 55#endif /* CONFIG_THUMB2_KERNEL */
diff --git a/arch/arm/include/asm/unistd.h b/arch/arm/include/asm/unistd.h
index 9122c9ee18fb..89f7eade20af 100644
--- a/arch/arm/include/asm/unistd.h
+++ b/arch/arm/include/asm/unistd.h
@@ -390,7 +390,7 @@
390#define __NR_preadv (__NR_SYSCALL_BASE+361) 390#define __NR_preadv (__NR_SYSCALL_BASE+361)
391#define __NR_pwritev (__NR_SYSCALL_BASE+362) 391#define __NR_pwritev (__NR_SYSCALL_BASE+362)
392#define __NR_rt_tgsigqueueinfo (__NR_SYSCALL_BASE+363) 392#define __NR_rt_tgsigqueueinfo (__NR_SYSCALL_BASE+363)
393#define __NR_perf_counter_open (__NR_SYSCALL_BASE+364) 393#define __NR_perf_event_open (__NR_SYSCALL_BASE+364)
394 394
395/* 395/*
396 * The following SWIs are ARM private. 396 * The following SWIs are ARM private.
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile
index 3213c9382b17..79087dd6d869 100644
--- a/arch/arm/kernel/Makefile
+++ b/arch/arm/kernel/Makefile
@@ -2,7 +2,8 @@
2# Makefile for the linux kernel. 2# Makefile for the linux kernel.
3# 3#
4 4
5AFLAGS_head.o := -DTEXT_OFFSET=$(TEXT_OFFSET) 5CPPFLAGS_vmlinux.lds := -DTEXT_OFFSET=$(TEXT_OFFSET)
6AFLAGS_head.o := -DTEXT_OFFSET=$(TEXT_OFFSET)
6 7
7ifdef CONFIG_DYNAMIC_FTRACE 8ifdef CONFIG_DYNAMIC_FTRACE
8CFLAGS_REMOVE_ftrace.o = -pg 9CFLAGS_REMOVE_ftrace.o = -pg
@@ -34,6 +35,7 @@ obj-$(CONFIG_OABI_COMPAT) += sys_oabi-compat.o
34obj-$(CONFIG_ARM_THUMBEE) += thumbee.o 35obj-$(CONFIG_ARM_THUMBEE) += thumbee.o
35obj-$(CONFIG_KGDB) += kgdb.o 36obj-$(CONFIG_KGDB) += kgdb.o
36obj-$(CONFIG_ARM_UNWIND) += unwind.o 37obj-$(CONFIG_ARM_UNWIND) += unwind.o
38obj-$(CONFIG_HAVE_TCM) += tcm.o
37 39
38obj-$(CONFIG_CRUNCH) += crunch.o crunch-bits.o 40obj-$(CONFIG_CRUNCH) += crunch.o crunch-bits.o
39AFLAGS_crunch-bits.o := -Wa,-mcpu=ep9312 41AFLAGS_crunch-bits.o := -Wa,-mcpu=ep9312
diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S
index ecfa98954d1d..fafce1b5c69f 100644
--- a/arch/arm/kernel/calls.S
+++ b/arch/arm/kernel/calls.S
@@ -373,7 +373,7 @@
373 CALL(sys_preadv) 373 CALL(sys_preadv)
374 CALL(sys_pwritev) 374 CALL(sys_pwritev)
375 CALL(sys_rt_tgsigqueueinfo) 375 CALL(sys_rt_tgsigqueueinfo)
376 CALL(sys_perf_counter_open) 376 CALL(sys_perf_event_open)
377#ifndef syscalls_counted 377#ifndef syscalls_counted
378.equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls 378.equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls
379#define syscalls_counted 379#define syscalls_counted
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
index 3d727a8a23bc..0a2ba51cf35d 100644
--- a/arch/arm/kernel/entry-armv.S
+++ b/arch/arm/kernel/entry-armv.S
@@ -272,7 +272,15 @@ __und_svc:
272 @ 272 @
273 @ r0 - instruction 273 @ r0 - instruction
274 @ 274 @
275#ifndef CONFIG_THUMB2_KERNEL
275 ldr r0, [r2, #-4] 276 ldr r0, [r2, #-4]
277#else
278 ldrh r0, [r2, #-2] @ Thumb instruction at LR - 2
279 and r9, r0, #0xf800
280 cmp r9, #0xe800 @ 32-bit instruction if xx >= 0
281 ldrhhs r9, [r2] @ bottom 16 bits
282 orrhs r0, r9, r0, lsl #16
283#endif
276 adr r9, BSYM(1f) 284 adr r9, BSYM(1f)
277 bl call_fpe 285 bl call_fpe
278 286
@@ -678,7 +686,9 @@ ENTRY(fp_enter)
678 .word no_fp 686 .word no_fp
679 .previous 687 .previous
680 688
681no_fp: mov pc, lr 689ENTRY(no_fp)
690 mov pc, lr
691ENDPROC(no_fp)
682 692
683__und_usr_unknown: 693__und_usr_unknown:
684 enable_irq 694 enable_irq
@@ -734,13 +744,6 @@ ENTRY(__switch_to)
734#ifdef CONFIG_MMU 744#ifdef CONFIG_MMU
735 ldr r6, [r2, #TI_CPU_DOMAIN] 745 ldr r6, [r2, #TI_CPU_DOMAIN]
736#endif 746#endif
737#if __LINUX_ARM_ARCH__ >= 6
738#ifdef CONFIG_CPU_32v6K
739 clrex
740#else
741 strex r5, r4, [ip] @ Clear exclusive monitor
742#endif
743#endif
744#if defined(CONFIG_HAS_TLS_REG) 747#if defined(CONFIG_HAS_TLS_REG)
745 mcr p15, 0, r3, c13, c0, 3 @ set TLS register 748 mcr p15, 0, r3, c13, c0, 3 @ set TLS register
746#elif !defined(CONFIG_TLS_REG_EMUL) 749#elif !defined(CONFIG_TLS_REG_EMUL)
diff --git a/arch/arm/kernel/entry-header.S b/arch/arm/kernel/entry-header.S
index a4eaf4f920c5..ac34c0d9384b 100644
--- a/arch/arm/kernel/entry-header.S
+++ b/arch/arm/kernel/entry-header.S
@@ -76,13 +76,27 @@
76#ifndef CONFIG_THUMB2_KERNEL 76#ifndef CONFIG_THUMB2_KERNEL
77 .macro svc_exit, rpsr 77 .macro svc_exit, rpsr
78 msr spsr_cxsf, \rpsr 78 msr spsr_cxsf, \rpsr
79#if defined(CONFIG_CPU_32v6K)
80 clrex @ clear the exclusive monitor
79 ldmia sp, {r0 - pc}^ @ load r0 - pc, cpsr 81 ldmia sp, {r0 - pc}^ @ load r0 - pc, cpsr
82#elif defined (CONFIG_CPU_V6)
83 ldr r0, [sp]
84 strex r1, r2, [sp] @ clear the exclusive monitor
85 ldmib sp, {r1 - pc}^ @ load r1 - pc, cpsr
86#else
87 ldmia sp, {r0 - pc}^ @ load r0 - pc, cpsr
88#endif
80 .endm 89 .endm
81 90
82 .macro restore_user_regs, fast = 0, offset = 0 91 .macro restore_user_regs, fast = 0, offset = 0
83 ldr r1, [sp, #\offset + S_PSR] @ get calling cpsr 92 ldr r1, [sp, #\offset + S_PSR] @ get calling cpsr
84 ldr lr, [sp, #\offset + S_PC]! @ get pc 93 ldr lr, [sp, #\offset + S_PC]! @ get pc
85 msr spsr_cxsf, r1 @ save in spsr_svc 94 msr spsr_cxsf, r1 @ save in spsr_svc
95#if defined(CONFIG_CPU_32v6K)
96 clrex @ clear the exclusive monitor
97#elif defined (CONFIG_CPU_V6)
98 strex r1, r2, [sp] @ clear the exclusive monitor
99#endif
86 .if \fast 100 .if \fast
87 ldmdb sp, {r1 - lr}^ @ get calling r1 - lr 101 ldmdb sp, {r1 - lr}^ @ get calling r1 - lr
88 .else 102 .else
@@ -98,6 +112,7 @@
98 .endm 112 .endm
99#else /* CONFIG_THUMB2_KERNEL */ 113#else /* CONFIG_THUMB2_KERNEL */
100 .macro svc_exit, rpsr 114 .macro svc_exit, rpsr
115 clrex @ clear the exclusive monitor
101 ldr r0, [sp, #S_SP] @ top of the stack 116 ldr r0, [sp, #S_SP] @ top of the stack
102 ldr r1, [sp, #S_PC] @ return address 117 ldr r1, [sp, #S_PC] @ return address
103 tst r0, #4 @ orig stack 8-byte aligned? 118 tst r0, #4 @ orig stack 8-byte aligned?
@@ -110,6 +125,7 @@
110 .endm 125 .endm
111 126
112 .macro restore_user_regs, fast = 0, offset = 0 127 .macro restore_user_regs, fast = 0, offset = 0
128 clrex @ clear the exclusive monitor
113 mov r2, sp 129 mov r2, sp
114 load_user_sp_lr r2, r3, \offset + S_SP @ calling sp, lr 130 load_user_sp_lr r2, r3, \offset + S_SP @ calling sp, lr
115 ldr r1, [sp, #\offset + S_PSR] @ get calling cpsr 131 ldr r1, [sp, #\offset + S_PSR] @ get calling cpsr
diff --git a/arch/arm/kernel/init_task.c b/arch/arm/kernel/init_task.c
index 3f470866bb89..e7cbb50dc356 100644
--- a/arch/arm/kernel/init_task.c
+++ b/arch/arm/kernel/init_task.c
@@ -24,9 +24,8 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
24 * 24 *
25 * The things we do for performance.. 25 * The things we do for performance..
26 */ 26 */
27union thread_union init_thread_union 27union thread_union init_thread_union __init_task_data =
28 __attribute__((__section__(".data.init_task"))) = 28 { INIT_THREAD_INFO(init_task) };
29 { INIT_THREAD_INFO(init_task) };
30 29
31/* 30/*
32 * Initial task structure. 31 * Initial task structure.
diff --git a/arch/arm/kernel/kprobes.c b/arch/arm/kernel/kprobes.c
index f692efddd449..60c62c377fa9 100644
--- a/arch/arm/kernel/kprobes.c
+++ b/arch/arm/kernel/kprobes.c
@@ -22,6 +22,7 @@
22#include <linux/kernel.h> 22#include <linux/kernel.h>
23#include <linux/kprobes.h> 23#include <linux/kprobes.h>
24#include <linux/module.h> 24#include <linux/module.h>
25#include <linux/stop_machine.h>
25#include <linux/stringify.h> 26#include <linux/stringify.h>
26#include <asm/traps.h> 27#include <asm/traps.h>
27#include <asm/cacheflush.h> 28#include <asm/cacheflush.h>
@@ -83,10 +84,24 @@ void __kprobes arch_arm_kprobe(struct kprobe *p)
83 flush_insns(p->addr, 1); 84 flush_insns(p->addr, 1);
84} 85}
85 86
87/*
88 * The actual disarming is done here on each CPU and synchronized using
89 * stop_machine. This synchronization is necessary on SMP to avoid removing
90 * a probe between the moment the 'Undefined Instruction' exception is raised
91 * and the moment the exception handler reads the faulting instruction from
92 * memory.
93 */
94int __kprobes __arch_disarm_kprobe(void *p)
95{
96 struct kprobe *kp = p;
97 *kp->addr = kp->opcode;
98 flush_insns(kp->addr, 1);
99 return 0;
100}
101
86void __kprobes arch_disarm_kprobe(struct kprobe *p) 102void __kprobes arch_disarm_kprobe(struct kprobe *p)
87{ 103{
88 *p->addr = p->opcode; 104 stop_machine(__arch_disarm_kprobe, p, &cpu_online_map);
89 flush_insns(p->addr, 1);
90} 105}
91 106
92void __kprobes arch_remove_kprobe(struct kprobe *p) 107void __kprobes arch_remove_kprobe(struct kprobe *p)
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index d4d4f77c91b2..c6c57b640b6b 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -45,6 +45,7 @@
45 45
46#include "compat.h" 46#include "compat.h"
47#include "atags.h" 47#include "atags.h"
48#include "tcm.h"
48 49
49#ifndef MEM_SIZE 50#ifndef MEM_SIZE
50#define MEM_SIZE (16*1024*1024) 51#define MEM_SIZE (16*1024*1024)
@@ -749,6 +750,7 @@ void __init setup_arch(char **cmdline_p)
749#endif 750#endif
750 751
751 cpu_init(); 752 cpu_init();
753 tcm_init();
752 754
753 /* 755 /*
754 * Set up various architecture-specific pointers 756 * Set up various architecture-specific pointers
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index de885fd256c5..e0d32770bb3d 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -189,7 +189,7 @@ int __cpuexit __cpu_disable(void)
189 read_lock(&tasklist_lock); 189 read_lock(&tasklist_lock);
190 for_each_process(p) { 190 for_each_process(p) {
191 if (p->mm) 191 if (p->mm)
192 cpu_clear(cpu, p->mm->cpu_vm_mask); 192 cpumask_clear_cpu(cpu, mm_cpumask(p->mm));
193 } 193 }
194 read_unlock(&tasklist_lock); 194 read_unlock(&tasklist_lock);
195 195
@@ -257,7 +257,7 @@ asmlinkage void __cpuinit secondary_start_kernel(void)
257 atomic_inc(&mm->mm_users); 257 atomic_inc(&mm->mm_users);
258 atomic_inc(&mm->mm_count); 258 atomic_inc(&mm->mm_count);
259 current->active_mm = mm; 259 current->active_mm = mm;
260 cpu_set(cpu, mm->cpu_vm_mask); 260 cpumask_set_cpu(cpu, mm_cpumask(mm));
261 cpu_switch_mm(mm->pgd, mm); 261 cpu_switch_mm(mm->pgd, mm);
262 enter_lazy_tlb(mm, current); 262 enter_lazy_tlb(mm, current);
263 local_flush_tlb_all(); 263 local_flush_tlb_all();
@@ -643,7 +643,7 @@ void flush_tlb_all(void)
643void flush_tlb_mm(struct mm_struct *mm) 643void flush_tlb_mm(struct mm_struct *mm)
644{ 644{
645 if (tlb_ops_need_broadcast()) 645 if (tlb_ops_need_broadcast())
646 on_each_cpu_mask(ipi_flush_tlb_mm, mm, 1, &mm->cpu_vm_mask); 646 on_each_cpu_mask(ipi_flush_tlb_mm, mm, 1, mm_cpumask(mm));
647 else 647 else
648 local_flush_tlb_mm(mm); 648 local_flush_tlb_mm(mm);
649} 649}
@@ -654,7 +654,7 @@ void flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr)
654 struct tlb_args ta; 654 struct tlb_args ta;
655 ta.ta_vma = vma; 655 ta.ta_vma = vma;
656 ta.ta_start = uaddr; 656 ta.ta_start = uaddr;
657 on_each_cpu_mask(ipi_flush_tlb_page, &ta, 1, &vma->vm_mm->cpu_vm_mask); 657 on_each_cpu_mask(ipi_flush_tlb_page, &ta, 1, mm_cpumask(vma->vm_mm));
658 } else 658 } else
659 local_flush_tlb_page(vma, uaddr); 659 local_flush_tlb_page(vma, uaddr);
660} 660}
@@ -677,7 +677,7 @@ void flush_tlb_range(struct vm_area_struct *vma,
677 ta.ta_vma = vma; 677 ta.ta_vma = vma;
678 ta.ta_start = start; 678 ta.ta_start = start;
679 ta.ta_end = end; 679 ta.ta_end = end;
680 on_each_cpu_mask(ipi_flush_tlb_range, &ta, 1, &vma->vm_mm->cpu_vm_mask); 680 on_each_cpu_mask(ipi_flush_tlb_range, &ta, 1, mm_cpumask(vma->vm_mm));
681 } else 681 } else
682 local_flush_tlb_range(vma, start, end); 682 local_flush_tlb_range(vma, start, end);
683} 683}
diff --git a/arch/arm/kernel/sys_arm.c b/arch/arm/kernel/sys_arm.c
index b3ec641b5cf8..78ecaac65206 100644
--- a/arch/arm/kernel/sys_arm.c
+++ b/arch/arm/kernel/sys_arm.c
@@ -25,7 +25,6 @@
25#include <linux/mman.h> 25#include <linux/mman.h>
26#include <linux/fs.h> 26#include <linux/fs.h>
27#include <linux/file.h> 27#include <linux/file.h>
28#include <linux/utsname.h>
29#include <linux/ipc.h> 28#include <linux/ipc.h>
30#include <linux/uaccess.h> 29#include <linux/uaccess.h>
31 30
diff --git a/arch/arm/kernel/tcm.c b/arch/arm/kernel/tcm.c
new file mode 100644
index 000000000000..e50303868f1b
--- /dev/null
+++ b/arch/arm/kernel/tcm.c
@@ -0,0 +1,246 @@
1/*
2 * Copyright (C) 2008-2009 ST-Ericsson AB
3 * License terms: GNU General Public License (GPL) version 2
4 * TCM memory handling for ARM systems
5 *
6 * Author: Linus Walleij <linus.walleij@stericsson.com>
7 * Author: Rickard Andersson <rickard.andersson@stericsson.com>
8 */
9#include <linux/init.h>
10#include <linux/kernel.h>
11#include <linux/module.h>
12#include <linux/stddef.h>
13#include <linux/ioport.h>
14#include <linux/genalloc.h>
15#include <linux/string.h> /* memcpy */
16#include <asm/page.h> /* PAGE_SHIFT */
17#include <asm/cputype.h>
18#include <asm/mach/map.h>
19#include <mach/memory.h>
20#include "tcm.h"
21
22/* Scream and warn about misuse */
23#if !defined(ITCM_OFFSET) || !defined(ITCM_END) || \
24 !defined(DTCM_OFFSET) || !defined(DTCM_END)
25#error "TCM support selected but offsets not defined!"
26#endif
27
28static struct gen_pool *tcm_pool;
29
30/* TCM section definitions from the linker */
31extern char __itcm_start, __sitcm_text, __eitcm_text;
32extern char __dtcm_start, __sdtcm_data, __edtcm_data;
33
34/*
35 * TCM memory resources
36 */
37static struct resource dtcm_res = {
38 .name = "DTCM RAM",
39 .start = DTCM_OFFSET,
40 .end = DTCM_END,
41 .flags = IORESOURCE_MEM
42};
43
44static struct resource itcm_res = {
45 .name = "ITCM RAM",
46 .start = ITCM_OFFSET,
47 .end = ITCM_END,
48 .flags = IORESOURCE_MEM
49};
50
51static struct map_desc dtcm_iomap[] __initdata = {
52 {
53 .virtual = DTCM_OFFSET,
54 .pfn = __phys_to_pfn(DTCM_OFFSET),
55 .length = (DTCM_END - DTCM_OFFSET + 1),
56 .type = MT_UNCACHED
57 }
58};
59
60static struct map_desc itcm_iomap[] __initdata = {
61 {
62 .virtual = ITCM_OFFSET,
63 .pfn = __phys_to_pfn(ITCM_OFFSET),
64 .length = (ITCM_END - ITCM_OFFSET + 1),
65 .type = MT_UNCACHED
66 }
67};
68
69/*
70 * Allocate a chunk of TCM memory
71 */
72void *tcm_alloc(size_t len)
73{
74 unsigned long vaddr;
75
76 if (!tcm_pool)
77 return NULL;
78
79 vaddr = gen_pool_alloc(tcm_pool, len);
80 if (!vaddr)
81 return NULL;
82
83 return (void *) vaddr;
84}
85EXPORT_SYMBOL(tcm_alloc);
86
87/*
88 * Free a chunk of TCM memory
89 */
90void tcm_free(void *addr, size_t len)
91{
92 gen_pool_free(tcm_pool, (unsigned long) addr, len);
93}
94EXPORT_SYMBOL(tcm_free);
95
96
97static void __init setup_tcm_bank(u8 type, u32 offset, u32 expected_size)
98{
99 const int tcm_sizes[16] = { 0, -1, -1, 4, 8, 16, 32, 64, 128,
100 256, 512, 1024, -1, -1, -1, -1 };
101 u32 tcm_region;
102 int tcm_size;
103
104 /* Read the special TCM region register c9, 0 */
105 if (!type)
106 asm("mrc p15, 0, %0, c9, c1, 0"
107 : "=r" (tcm_region));
108 else
109 asm("mrc p15, 0, %0, c9, c1, 1"
110 : "=r" (tcm_region));
111
112 tcm_size = tcm_sizes[(tcm_region >> 2) & 0x0f];
113 if (tcm_size < 0) {
114 pr_err("CPU: %sTCM of unknown size!\n",
115 type ? "I" : "D");
116 } else {
117 pr_info("CPU: found %sTCM %dk @ %08x, %senabled\n",
118 type ? "I" : "D",
119 tcm_size,
120 (tcm_region & 0xfffff000U),
121 (tcm_region & 1) ? "" : "not ");
122 }
123
124 if (tcm_size != expected_size) {
125 pr_crit("CPU: %sTCM was detected %dk but expected %dk!\n",
126 type ? "I" : "D",
127 tcm_size,
128 expected_size);
129 /* Adjust to the expected size? what can we do... */
130 }
131
132 /* Force move the TCM bank to where we want it, enable */
133 tcm_region = offset | (tcm_region & 0x00000ffeU) | 1;
134
135 if (!type)
136 asm("mcr p15, 0, %0, c9, c1, 0"
137 : /* No output operands */
138 : "r" (tcm_region));
139 else
140 asm("mcr p15, 0, %0, c9, c1, 1"
141 : /* No output operands */
142 : "r" (tcm_region));
143
144 pr_debug("CPU: moved %sTCM %dk to %08x, enabled\n",
145 type ? "I" : "D",
146 tcm_size,
147 (tcm_region & 0xfffff000U));
148}
149
150/*
151 * This initializes the TCM memory
152 */
153void __init tcm_init(void)
154{
155 u32 tcm_status = read_cpuid_tcmstatus();
156 char *start;
157 char *end;
158 char *ram;
159
160 /* Setup DTCM if present */
161 if (tcm_status & (1 << 16)) {
162 setup_tcm_bank(0, DTCM_OFFSET,
163 (DTCM_END - DTCM_OFFSET + 1) >> 10);
164 request_resource(&iomem_resource, &dtcm_res);
165 iotable_init(dtcm_iomap, 1);
166 /* Copy data from RAM to DTCM */
167 start = &__sdtcm_data;
168 end = &__edtcm_data;
169 ram = &__dtcm_start;
170 memcpy(start, ram, (end-start));
171 pr_debug("CPU DTCM: copied data from %p - %p\n", start, end);
172 }
173
174 /* Setup ITCM if present */
175 if (tcm_status & 1) {
176 setup_tcm_bank(1, ITCM_OFFSET,
177 (ITCM_END - ITCM_OFFSET + 1) >> 10);
178 request_resource(&iomem_resource, &itcm_res);
179 iotable_init(itcm_iomap, 1);
180 /* Copy code from RAM to ITCM */
181 start = &__sitcm_text;
182 end = &__eitcm_text;
183 ram = &__itcm_start;
184 memcpy(start, ram, (end-start));
185 pr_debug("CPU ITCM: copied code from %p - %p\n", start, end);
186 }
187}
188
189/*
190 * This creates the TCM memory pool and has to be done later,
191 * during the core_initicalls, since the allocator is not yet
192 * up and running when the first initialization runs.
193 */
194static int __init setup_tcm_pool(void)
195{
196 u32 tcm_status = read_cpuid_tcmstatus();
197 u32 dtcm_pool_start = (u32) &__edtcm_data;
198 u32 itcm_pool_start = (u32) &__eitcm_text;
199 int ret;
200
201 /*
202 * Set up malloc pool, 2^2 = 4 bytes granularity since
203 * the TCM is sometimes just 4 KiB. NB: pages and cache
204 * line alignments does not matter in TCM!
205 */
206 tcm_pool = gen_pool_create(2, -1);
207
208 pr_debug("Setting up TCM memory pool\n");
209
210 /* Add the rest of DTCM to the TCM pool */
211 if (tcm_status & (1 << 16)) {
212 if (dtcm_pool_start < DTCM_END) {
213 ret = gen_pool_add(tcm_pool, dtcm_pool_start,
214 DTCM_END - dtcm_pool_start + 1, -1);
215 if (ret) {
216 pr_err("CPU DTCM: could not add DTCM " \
217 "remainder to pool!\n");
218 return ret;
219 }
220 pr_debug("CPU DTCM: Added %08x bytes @ %08x to " \
221 "the TCM memory pool\n",
222 DTCM_END - dtcm_pool_start + 1,
223 dtcm_pool_start);
224 }
225 }
226
227 /* Add the rest of ITCM to the TCM pool */
228 if (tcm_status & 1) {
229 if (itcm_pool_start < ITCM_END) {
230 ret = gen_pool_add(tcm_pool, itcm_pool_start,
231 ITCM_END - itcm_pool_start + 1, -1);
232 if (ret) {
233 pr_err("CPU ITCM: could not add ITCM " \
234 "remainder to pool!\n");
235 return ret;
236 }
237 pr_debug("CPU ITCM: Added %08x bytes @ %08x to " \
238 "the TCM memory pool\n",
239 ITCM_END - itcm_pool_start + 1,
240 itcm_pool_start);
241 }
242 }
243 return 0;
244}
245
246core_initcall(setup_tcm_pool);
diff --git a/arch/arm/kernel/tcm.h b/arch/arm/kernel/tcm.h
new file mode 100644
index 000000000000..8015ad434a40
--- /dev/null
+++ b/arch/arm/kernel/tcm.h
@@ -0,0 +1,17 @@
1/*
2 * Copyright (C) 2008-2009 ST-Ericsson AB
3 * License terms: GNU General Public License (GPL) version 2
4 * TCM memory handling for ARM systems
5 *
6 * Author: Linus Walleij <linus.walleij@stericsson.com>
7 * Author: Rickard Andersson <rickard.andersson@stericsson.com>
8 */
9
10#ifdef CONFIG_HAVE_TCM
11void __init tcm_init(void);
12#else
13/* No TCM support, just blank inlines to be optimized out */
14inline void tcm_init(void)
15{
16}
17#endif
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S
index 5cc4812c9763..aecf87dfbaec 100644
--- a/arch/arm/kernel/vmlinux.lds.S
+++ b/arch/arm/kernel/vmlinux.lds.S
@@ -199,6 +199,63 @@ SECTIONS
199 } 199 }
200 _edata_loc = __data_loc + SIZEOF(.data); 200 _edata_loc = __data_loc + SIZEOF(.data);
201 201
202#ifdef CONFIG_HAVE_TCM
203 /*
204 * We align everything to a page boundary so we can
205 * free it after init has commenced and TCM contents have
206 * been copied to its destination.
207 */
208 .tcm_start : {
209 . = ALIGN(PAGE_SIZE);
210 __tcm_start = .;
211 __itcm_start = .;
212 }
213
214 /*
215 * Link these to the ITCM RAM
216 * Put VMA to the TCM address and LMA to the common RAM
217 * and we'll upload the contents from RAM to TCM and free
218 * the used RAM after that.
219 */
220 .text_itcm ITCM_OFFSET : AT(__itcm_start)
221 {
222 __sitcm_text = .;
223 *(.tcm.text)
224 *(.tcm.rodata)
225 . = ALIGN(4);
226 __eitcm_text = .;
227 }
228
229 /*
230 * Reset the dot pointer, this is needed to create the
231 * relative __dtcm_start below (to be used as extern in code).
232 */
233 . = ADDR(.tcm_start) + SIZEOF(.tcm_start) + SIZEOF(.text_itcm);
234
235 .dtcm_start : {
236 __dtcm_start = .;
237 }
238
239 /* TODO: add remainder of ITCM as well, that can be used for data! */
240 .data_dtcm DTCM_OFFSET : AT(__dtcm_start)
241 {
242 . = ALIGN(4);
243 __sdtcm_data = .;
244 *(.tcm.data)
245 . = ALIGN(4);
246 __edtcm_data = .;
247 }
248
249 /* Reset the dot pointer or the linker gets confused */
250 . = ADDR(.dtcm_start) + SIZEOF(.data_dtcm);
251
252 /* End marker for freeing TCM copy in linked object */
253 .tcm_end : AT(ADDR(.dtcm_start) + SIZEOF(.data_dtcm)){
254 . = ALIGN(PAGE_SIZE);
255 __tcm_end = .;
256 }
257#endif
258
202 .bss : { 259 .bss : {
203 __bss_start = .; /* BSS */ 260 __bss_start = .; /* BSS */
204 *(.bss) 261 *(.bss)
diff --git a/arch/arm/lib/copy_page.S b/arch/arm/lib/copy_page.S
index 6ae04db1ca4f..6ee2f6706f86 100644
--- a/arch/arm/lib/copy_page.S
+++ b/arch/arm/lib/copy_page.S
@@ -12,8 +12,9 @@
12#include <linux/linkage.h> 12#include <linux/linkage.h>
13#include <asm/assembler.h> 13#include <asm/assembler.h>
14#include <asm/asm-offsets.h> 14#include <asm/asm-offsets.h>
15#include <asm/cache.h>
15 16
16#define COPY_COUNT (PAGE_SZ/64 PLD( -1 )) 17#define COPY_COUNT (PAGE_SZ / (2 * L1_CACHE_BYTES) PLD( -1 ))
17 18
18 .text 19 .text
19 .align 5 20 .align 5
@@ -26,17 +27,16 @@
26ENTRY(copy_page) 27ENTRY(copy_page)
27 stmfd sp!, {r4, lr} @ 2 28 stmfd sp!, {r4, lr} @ 2
28 PLD( pld [r1, #0] ) 29 PLD( pld [r1, #0] )
29 PLD( pld [r1, #32] ) 30 PLD( pld [r1, #L1_CACHE_BYTES] )
30 mov r2, #COPY_COUNT @ 1 31 mov r2, #COPY_COUNT @ 1
31 ldmia r1!, {r3, r4, ip, lr} @ 4+1 32 ldmia r1!, {r3, r4, ip, lr} @ 4+1
321: PLD( pld [r1, #64] ) 331: PLD( pld [r1, #2 * L1_CACHE_BYTES])
33 PLD( pld [r1, #96] ) 34 PLD( pld [r1, #3 * L1_CACHE_BYTES])
342: stmia r0!, {r3, r4, ip, lr} @ 4 352:
35 ldmia r1!, {r3, r4, ip, lr} @ 4+1 36 .rept (2 * L1_CACHE_BYTES / 16 - 1)
36 stmia r0!, {r3, r4, ip, lr} @ 4
37 ldmia r1!, {r3, r4, ip, lr} @ 4+1
38 stmia r0!, {r3, r4, ip, lr} @ 4 37 stmia r0!, {r3, r4, ip, lr} @ 4
39 ldmia r1!, {r3, r4, ip, lr} @ 4 38 ldmia r1!, {r3, r4, ip, lr} @ 4
39 .endr
40 subs r2, r2, #1 @ 1 40 subs r2, r2, #1 @ 1
41 stmia r0!, {r3, r4, ip, lr} @ 4 41 stmia r0!, {r3, r4, ip, lr} @ 4
42 ldmgtia r1!, {r3, r4, ip, lr} @ 4 42 ldmgtia r1!, {r3, r4, ip, lr} @ 4
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index a24d824c428b..e35d54d43e70 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -289,6 +289,13 @@ config MACH_NEOCORE926
289 help 289 help
290 Select this if you are using the Adeneo Neocore 926 board. 290 Select this if you are using the Adeneo Neocore 926 board.
291 291
292config MACH_AT91SAM9G20EK_2MMC
293 bool "Atmel AT91SAM9G20-EK Evaluation Kit modified for 2 MMC Slots"
294 depends on ARCH_AT91SAM9G20
295 help
296 Select this if you are using an Atmel AT91SAM9G20-EK Evaluation Kit
297 Rev A or B modified for 2 MMC Slots.
298
292endif 299endif
293 300
294# ---------------------------------------------------------- 301# ----------------------------------------------------------
diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile
index a6ed015d82ed..ada440aab0c5 100644
--- a/arch/arm/mach-at91/Makefile
+++ b/arch/arm/mach-at91/Makefile
@@ -59,6 +59,7 @@ obj-$(CONFIG_MACH_AT91SAM9RLEK) += board-sam9rlek.o
59 59
60# AT91SAM9G20 board-specific support 60# AT91SAM9G20 board-specific support
61obj-$(CONFIG_MACH_AT91SAM9G20EK) += board-sam9g20ek.o 61obj-$(CONFIG_MACH_AT91SAM9G20EK) += board-sam9g20ek.o
62obj-$(CONFIG_MACH_AT91SAM9G20EK_2MMC) += board-sam9g20ek-2slot-mmc.o
62obj-$(CONFIG_MACH_CPU9G20) += board-cpu9krea.o 63obj-$(CONFIG_MACH_CPU9G20) += board-cpu9krea.o
63 64
64# AT91SAM9G45 board-specific support 65# AT91SAM9G45 board-specific support
diff --git a/arch/arm/mach-at91/at91cap9_devices.c b/arch/arm/mach-at91/at91cap9_devices.c
index 412aa49ad2fb..d1f775e86353 100644
--- a/arch/arm/mach-at91/at91cap9_devices.c
+++ b/arch/arm/mach-at91/at91cap9_devices.c
@@ -771,9 +771,9 @@ void __init at91_add_device_pwm(u32 mask) {}
771 * AC97 771 * AC97
772 * -------------------------------------------------------------------- */ 772 * -------------------------------------------------------------------- */
773 773
774#if defined(CONFIG_SND_AT91_AC97) || defined(CONFIG_SND_AT91_AC97_MODULE) 774#if defined(CONFIG_SND_ATMEL_AC97C) || defined(CONFIG_SND_ATMEL_AC97C_MODULE)
775static u64 ac97_dmamask = DMA_BIT_MASK(32); 775static u64 ac97_dmamask = DMA_BIT_MASK(32);
776static struct atmel_ac97_data ac97_data; 776static struct ac97c_platform_data ac97_data;
777 777
778static struct resource ac97_resources[] = { 778static struct resource ac97_resources[] = {
779 [0] = { 779 [0] = {
@@ -789,7 +789,7 @@ static struct resource ac97_resources[] = {
789}; 789};
790 790
791static struct platform_device at91cap9_ac97_device = { 791static struct platform_device at91cap9_ac97_device = {
792 .name = "ac97c", 792 .name = "atmel_ac97c",
793 .id = 1, 793 .id = 1,
794 .dev = { 794 .dev = {
795 .dma_mask = &ac97_dmamask, 795 .dma_mask = &ac97_dmamask,
@@ -800,7 +800,7 @@ static struct platform_device at91cap9_ac97_device = {
800 .num_resources = ARRAY_SIZE(ac97_resources), 800 .num_resources = ARRAY_SIZE(ac97_resources),
801}; 801};
802 802
803void __init at91_add_device_ac97(struct atmel_ac97_data *data) 803void __init at91_add_device_ac97(struct ac97c_platform_data *data)
804{ 804{
805 if (!data) 805 if (!data)
806 return; 806 return;
@@ -818,7 +818,7 @@ void __init at91_add_device_ac97(struct atmel_ac97_data *data)
818 platform_device_register(&at91cap9_ac97_device); 818 platform_device_register(&at91cap9_ac97_device);
819} 819}
820#else 820#else
821void __init at91_add_device_ac97(struct atmel_ac97_data *data) {} 821void __init at91_add_device_ac97(struct ac97c_platform_data *data) {}
822#endif 822#endif
823 823
824 824
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c
index ee4ea0e720cf..07eb7b07e442 100644
--- a/arch/arm/mach-at91/at91sam9260_devices.c
+++ b/arch/arm/mach-at91/at91sam9260_devices.c
@@ -278,6 +278,102 @@ void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data)
278void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) {} 278void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) {}
279#endif 279#endif
280 280
281/* --------------------------------------------------------------------
282 * MMC / SD Slot for Atmel MCI Driver
283 * -------------------------------------------------------------------- */
284
285#if defined(CONFIG_MMC_ATMELMCI) || defined(CONFIG_MMC_ATMELMCI_MODULE)
286static u64 mmc_dmamask = DMA_BIT_MASK(32);
287static struct mci_platform_data mmc_data;
288
289static struct resource mmc_resources[] = {
290 [0] = {
291 .start = AT91SAM9260_BASE_MCI,
292 .end = AT91SAM9260_BASE_MCI + SZ_16K - 1,
293 .flags = IORESOURCE_MEM,
294 },
295 [1] = {
296 .start = AT91SAM9260_ID_MCI,
297 .end = AT91SAM9260_ID_MCI,
298 .flags = IORESOURCE_IRQ,
299 },
300};
301
302static struct platform_device at91sam9260_mmc_device = {
303 .name = "atmel_mci",
304 .id = -1,
305 .dev = {
306 .dma_mask = &mmc_dmamask,
307 .coherent_dma_mask = DMA_BIT_MASK(32),
308 .platform_data = &mmc_data,
309 },
310 .resource = mmc_resources,
311 .num_resources = ARRAY_SIZE(mmc_resources),
312};
313
314void __init at91_add_device_mci(short mmc_id, struct mci_platform_data *data)
315{
316 unsigned int i;
317 unsigned int slot_count = 0;
318
319 if (!data)
320 return;
321
322 for (i = 0; i < ATMEL_MCI_MAX_NR_SLOTS; i++) {
323 if (data->slot[i].bus_width) {
324 /* input/irq */
325 if (data->slot[i].detect_pin) {
326 at91_set_gpio_input(data->slot[i].detect_pin, 1);
327 at91_set_deglitch(data->slot[i].detect_pin, 1);
328 }
329 if (data->slot[i].wp_pin)
330 at91_set_gpio_input(data->slot[i].wp_pin, 1);
331
332 switch (i) {
333 case 0:
334 /* CMD */
335 at91_set_A_periph(AT91_PIN_PA7, 1);
336 /* DAT0, maybe DAT1..DAT3 */
337 at91_set_A_periph(AT91_PIN_PA6, 1);
338 if (data->slot[i].bus_width == 4) {
339 at91_set_A_periph(AT91_PIN_PA9, 1);
340 at91_set_A_periph(AT91_PIN_PA10, 1);
341 at91_set_A_periph(AT91_PIN_PA11, 1);
342 }
343 slot_count++;
344 break;
345 case 1:
346 /* CMD */
347 at91_set_B_periph(AT91_PIN_PA1, 1);
348 /* DAT0, maybe DAT1..DAT3 */
349 at91_set_B_periph(AT91_PIN_PA0, 1);
350 if (data->slot[i].bus_width == 4) {
351 at91_set_B_periph(AT91_PIN_PA5, 1);
352 at91_set_B_periph(AT91_PIN_PA4, 1);
353 at91_set_B_periph(AT91_PIN_PA3, 1);
354 }
355 slot_count++;
356 break;
357 default:
358 printk(KERN_ERR
359 "AT91: SD/MMC slot %d not available\n", i);
360 break;
361 }
362 }
363 }
364
365 if (slot_count) {
366 /* CLK */
367 at91_set_A_periph(AT91_PIN_PA8, 0);
368
369 mmc_data = *data;
370 platform_device_register(&at91sam9260_mmc_device);
371 }
372}
373#else
374void __init at91_add_device_mci(short mmc_id, struct mci_platform_data *data) {}
375#endif
376
281 377
282/* -------------------------------------------------------------------- 378/* --------------------------------------------------------------------
283 * NAND / SmartMedia 379 * NAND / SmartMedia
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c
index 55719a974276..fb5c23af1017 100644
--- a/arch/arm/mach-at91/at91sam9263_devices.c
+++ b/arch/arm/mach-at91/at91sam9263_devices.c
@@ -757,6 +757,42 @@ void __init at91_add_device_ac97(struct ac97c_platform_data *data)
757void __init at91_add_device_ac97(struct ac97c_platform_data *data) {} 757void __init at91_add_device_ac97(struct ac97c_platform_data *data) {}
758#endif 758#endif
759 759
760/* --------------------------------------------------------------------
761 * CAN Controller
762 * -------------------------------------------------------------------- */
763
764#if defined(CONFIG_CAN_AT91) || defined(CONFIG_CAN_AT91_MODULE)
765static struct resource can_resources[] = {
766 [0] = {
767 .start = AT91SAM9263_BASE_CAN,
768 .end = AT91SAM9263_BASE_CAN + SZ_16K - 1,
769 .flags = IORESOURCE_MEM,
770 },
771 [1] = {
772 .start = AT91SAM9263_ID_CAN,
773 .end = AT91SAM9263_ID_CAN,
774 .flags = IORESOURCE_IRQ,
775 },
776};
777
778static struct platform_device at91sam9263_can_device = {
779 .name = "at91_can",
780 .id = -1,
781 .resource = can_resources,
782 .num_resources = ARRAY_SIZE(can_resources),
783};
784
785void __init at91_add_device_can(struct at91_can_data *data)
786{
787 at91_set_A_periph(AT91_PIN_PA13, 0); /* CANTX */
788 at91_set_A_periph(AT91_PIN_PA14, 0); /* CANRX */
789 at91sam9263_can_device.dev.platform_data = data;
790
791 platform_device_register(&at91sam9263_can_device);
792}
793#else
794void __init at91_add_device_can(struct at91_can_data *data) {}
795#endif
760 796
761/* -------------------------------------------------------------------- 797/* --------------------------------------------------------------------
762 * LCD Controller 798 * LCD Controller
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c
index d746e8621bc2..d581cff80c4c 100644
--- a/arch/arm/mach-at91/at91sam9g45_devices.c
+++ b/arch/arm/mach-at91/at91sam9g45_devices.c
@@ -24,11 +24,59 @@
24#include <mach/at91sam9g45.h> 24#include <mach/at91sam9g45.h>
25#include <mach/at91sam9g45_matrix.h> 25#include <mach/at91sam9g45_matrix.h>
26#include <mach/at91sam9_smc.h> 26#include <mach/at91sam9_smc.h>
27#include <mach/at_hdmac.h>
27 28
28#include "generic.h" 29#include "generic.h"
29 30
30 31
31/* -------------------------------------------------------------------- 32/* --------------------------------------------------------------------
33 * HDMAC - AHB DMA Controller
34 * -------------------------------------------------------------------- */
35
36#if defined(CONFIG_AT_HDMAC) || defined(CONFIG_AT_HDMAC_MODULE)
37static u64 hdmac_dmamask = DMA_BIT_MASK(32);
38
39static struct at_dma_platform_data atdma_pdata = {
40 .nr_channels = 8,
41};
42
43static struct resource hdmac_resources[] = {
44 [0] = {
45 .start = AT91_BASE_SYS + AT91_DMA,
46 .end = AT91_BASE_SYS + AT91_DMA + SZ_512 - 1,
47 .flags = IORESOURCE_MEM,
48 },
49 [2] = {
50 .start = AT91SAM9G45_ID_DMA,
51 .end = AT91SAM9G45_ID_DMA,
52 .flags = IORESOURCE_IRQ,
53 },
54};
55
56static struct platform_device at_hdmac_device = {
57 .name = "at_hdmac",
58 .id = -1,
59 .dev = {
60 .dma_mask = &hdmac_dmamask,
61 .coherent_dma_mask = DMA_BIT_MASK(32),
62 .platform_data = &atdma_pdata,
63 },
64 .resource = hdmac_resources,
65 .num_resources = ARRAY_SIZE(hdmac_resources),
66};
67
68void __init at91_add_device_hdmac(void)
69{
70 dma_cap_set(DMA_MEMCPY, atdma_pdata.cap_mask);
71 dma_cap_set(DMA_SLAVE, atdma_pdata.cap_mask);
72 platform_device_register(&at_hdmac_device);
73}
74#else
75void __init at91_add_device_hdmac(void) {}
76#endif
77
78
79/* --------------------------------------------------------------------
32 * USB Host (OHCI) 80 * USB Host (OHCI)
33 * -------------------------------------------------------------------- */ 81 * -------------------------------------------------------------------- */
34 82
@@ -550,6 +598,61 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
550 598
551 599
552/* -------------------------------------------------------------------- 600/* --------------------------------------------------------------------
601 * AC97
602 * -------------------------------------------------------------------- */
603
604#if defined(CONFIG_SND_ATMEL_AC97C) || defined(CONFIG_SND_ATMEL_AC97C_MODULE)
605static u64 ac97_dmamask = DMA_BIT_MASK(32);
606static struct ac97c_platform_data ac97_data;
607
608static struct resource ac97_resources[] = {
609 [0] = {
610 .start = AT91SAM9G45_BASE_AC97C,
611 .end = AT91SAM9G45_BASE_AC97C + SZ_16K - 1,
612 .flags = IORESOURCE_MEM,
613 },
614 [1] = {
615 .start = AT91SAM9G45_ID_AC97C,
616 .end = AT91SAM9G45_ID_AC97C,
617 .flags = IORESOURCE_IRQ,
618 },
619};
620
621static struct platform_device at91sam9g45_ac97_device = {
622 .name = "atmel_ac97c",
623 .id = 0,
624 .dev = {
625 .dma_mask = &ac97_dmamask,
626 .coherent_dma_mask = DMA_BIT_MASK(32),
627 .platform_data = &ac97_data,
628 },
629 .resource = ac97_resources,
630 .num_resources = ARRAY_SIZE(ac97_resources),
631};
632
633void __init at91_add_device_ac97(struct ac97c_platform_data *data)
634{
635 if (!data)
636 return;
637
638 at91_set_A_periph(AT91_PIN_PD8, 0); /* AC97FS */
639 at91_set_A_periph(AT91_PIN_PD9, 0); /* AC97CK */
640 at91_set_A_periph(AT91_PIN_PD7, 0); /* AC97TX */
641 at91_set_A_periph(AT91_PIN_PD6, 0); /* AC97RX */
642
643 /* reset */
644 if (data->reset_pin)
645 at91_set_gpio_output(data->reset_pin, 0);
646
647 ac97_data = *data;
648 platform_device_register(&at91sam9g45_ac97_device);
649}
650#else
651void __init at91_add_device_ac97(struct ac97c_platform_data *data) {}
652#endif
653
654
655/* --------------------------------------------------------------------
553 * LCD Controller 656 * LCD Controller
554 * -------------------------------------------------------------------- */ 657 * -------------------------------------------------------------------- */
555 658
@@ -1220,6 +1323,7 @@ void __init at91_add_device_serial(void) {}
1220 */ 1323 */
1221static int __init at91_add_standard_devices(void) 1324static int __init at91_add_standard_devices(void)
1222{ 1325{
1326 at91_add_device_hdmac();
1223 at91_add_device_rtc(); 1327 at91_add_device_rtc();
1224 at91_add_device_rtt(); 1328 at91_add_device_rtt();
1225 at91_add_device_watchdog(); 1329 at91_add_device_watchdog();
diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c
index 728186515cdf..d345f5453dbe 100644
--- a/arch/arm/mach-at91/at91sam9rl_devices.c
+++ b/arch/arm/mach-at91/at91sam9rl_devices.c
@@ -21,11 +21,57 @@
21#include <mach/at91sam9rl.h> 21#include <mach/at91sam9rl.h>
22#include <mach/at91sam9rl_matrix.h> 22#include <mach/at91sam9rl_matrix.h>
23#include <mach/at91sam9_smc.h> 23#include <mach/at91sam9_smc.h>
24#include <mach/at_hdmac.h>
24 25
25#include "generic.h" 26#include "generic.h"
26 27
27 28
28/* -------------------------------------------------------------------- 29/* --------------------------------------------------------------------
30 * HDMAC - AHB DMA Controller
31 * -------------------------------------------------------------------- */
32
33#if defined(CONFIG_AT_HDMAC) || defined(CONFIG_AT_HDMAC_MODULE)
34static u64 hdmac_dmamask = DMA_BIT_MASK(32);
35
36static struct at_dma_platform_data atdma_pdata = {
37 .nr_channels = 2,
38};
39
40static struct resource hdmac_resources[] = {
41 [0] = {
42 .start = AT91_BASE_SYS + AT91_DMA,
43 .end = AT91_BASE_SYS + AT91_DMA + SZ_512 - 1,
44 .flags = IORESOURCE_MEM,
45 },
46 [2] = {
47 .start = AT91SAM9RL_ID_DMA,
48 .end = AT91SAM9RL_ID_DMA,
49 .flags = IORESOURCE_IRQ,
50 },
51};
52
53static struct platform_device at_hdmac_device = {
54 .name = "at_hdmac",
55 .id = -1,
56 .dev = {
57 .dma_mask = &hdmac_dmamask,
58 .coherent_dma_mask = DMA_BIT_MASK(32),
59 .platform_data = &atdma_pdata,
60 },
61 .resource = hdmac_resources,
62 .num_resources = ARRAY_SIZE(hdmac_resources),
63};
64
65void __init at91_add_device_hdmac(void)
66{
67 dma_cap_set(DMA_MEMCPY, atdma_pdata.cap_mask);
68 platform_device_register(&at_hdmac_device);
69}
70#else
71void __init at91_add_device_hdmac(void) {}
72#endif
73
74/* --------------------------------------------------------------------
29 * USB HS Device (Gadget) 75 * USB HS Device (Gadget)
30 * -------------------------------------------------------------------- */ 76 * -------------------------------------------------------------------- */
31 77
@@ -398,6 +444,61 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
398 444
399 445
400/* -------------------------------------------------------------------- 446/* --------------------------------------------------------------------
447 * AC97
448 * -------------------------------------------------------------------- */
449
450#if defined(CONFIG_SND_ATMEL_AC97C) || defined(CONFIG_SND_ATMEL_AC97C_MODULE)
451static u64 ac97_dmamask = DMA_BIT_MASK(32);
452static struct ac97c_platform_data ac97_data;
453
454static struct resource ac97_resources[] = {
455 [0] = {
456 .start = AT91SAM9RL_BASE_AC97C,
457 .end = AT91SAM9RL_BASE_AC97C + SZ_16K - 1,
458 .flags = IORESOURCE_MEM,
459 },
460 [1] = {
461 .start = AT91SAM9RL_ID_AC97C,
462 .end = AT91SAM9RL_ID_AC97C,
463 .flags = IORESOURCE_IRQ,
464 },
465};
466
467static struct platform_device at91sam9rl_ac97_device = {
468 .name = "atmel_ac97c",
469 .id = 0,
470 .dev = {
471 .dma_mask = &ac97_dmamask,
472 .coherent_dma_mask = DMA_BIT_MASK(32),
473 .platform_data = &ac97_data,
474 },
475 .resource = ac97_resources,
476 .num_resources = ARRAY_SIZE(ac97_resources),
477};
478
479void __init at91_add_device_ac97(struct ac97c_platform_data *data)
480{
481 if (!data)
482 return;
483
484 at91_set_A_periph(AT91_PIN_PD1, 0); /* AC97FS */
485 at91_set_A_periph(AT91_PIN_PD2, 0); /* AC97CK */
486 at91_set_A_periph(AT91_PIN_PD3, 0); /* AC97TX */
487 at91_set_A_periph(AT91_PIN_PD4, 0); /* AC97RX */
488
489 /* reset */
490 if (data->reset_pin)
491 at91_set_gpio_output(data->reset_pin, 0);
492
493 ac97_data = *data;
494 platform_device_register(&at91sam9rl_ac97_device);
495}
496#else
497void __init at91_add_device_ac97(struct ac97c_platform_data *data) {}
498#endif
499
500
501/* --------------------------------------------------------------------
401 * LCD Controller 502 * LCD Controller
402 * -------------------------------------------------------------------- */ 503 * -------------------------------------------------------------------- */
403 504
@@ -1103,6 +1204,7 @@ void __init at91_add_device_serial(void) {}
1103 */ 1204 */
1104static int __init at91_add_standard_devices(void) 1205static int __init at91_add_standard_devices(void)
1105{ 1206{
1207 at91_add_device_hdmac();
1106 at91_add_device_rtc(); 1208 at91_add_device_rtc();
1107 at91_add_device_rtt(); 1209 at91_add_device_rtt();
1108 at91_add_device_watchdog(); 1210 at91_add_device_watchdog();
diff --git a/arch/arm/mach-at91/board-afeb-9260v1.c b/arch/arm/mach-at91/board-afeb-9260v1.c
index 61e52b66bc72..50667bed7cc9 100644
--- a/arch/arm/mach-at91/board-afeb-9260v1.c
+++ b/arch/arm/mach-at91/board-afeb-9260v1.c
@@ -53,7 +53,7 @@ static void __init afeb9260_map_io(void)
53 /* Initialize processor: 18.432 MHz crystal */ 53 /* Initialize processor: 18.432 MHz crystal */
54 at91sam9260_initialize(18432000); 54 at91sam9260_initialize(18432000);
55 55
56 /* DGBU on ttyS0. (Rx & Tx only) */ 56 /* DBGU on ttyS0. (Rx & Tx only) */
57 at91_register_uart(0, 0, 0); 57 at91_register_uart(0, 0, 0);
58 58
59 /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ 59 /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
diff --git a/arch/arm/mach-at91/board-cam60.c b/arch/arm/mach-at91/board-cam60.c
index d3ba29c5d8c8..02138af631e7 100644
--- a/arch/arm/mach-at91/board-cam60.c
+++ b/arch/arm/mach-at91/board-cam60.c
@@ -50,7 +50,7 @@ static void __init cam60_map_io(void)
50 /* Initialize processor: 10 MHz crystal */ 50 /* Initialize processor: 10 MHz crystal */
51 at91sam9260_initialize(10000000); 51 at91sam9260_initialize(10000000);
52 52
53 /* DGBU on ttyS0. (Rx & Tx only) */ 53 /* DBGU on ttyS0. (Rx & Tx only) */
54 at91_register_uart(0, 0, 0); 54 at91_register_uart(0, 0, 0);
55 55
56 /* set serial console to ttyS0 (ie, DBGU) */ 56 /* set serial console to ttyS0 (ie, DBGU) */
diff --git a/arch/arm/mach-at91/board-cap9adk.c b/arch/arm/mach-at91/board-cap9adk.c
index 83a1a0fef47b..d6940870e403 100644
--- a/arch/arm/mach-at91/board-cap9adk.c
+++ b/arch/arm/mach-at91/board-cap9adk.c
@@ -364,7 +364,7 @@ static struct atmel_lcdfb_info __initdata cap9adk_lcdc_data;
364/* 364/*
365 * AC97 365 * AC97
366 */ 366 */
367static struct atmel_ac97_data cap9adk_ac97_data = { 367static struct ac97c_platform_data cap9adk_ac97_data = {
368// .reset_pin = ... not connected 368// .reset_pin = ... not connected
369}; 369};
370 370
diff --git a/arch/arm/mach-at91/board-neocore926.c b/arch/arm/mach-at91/board-neocore926.c
index 9ba7ba2cc3b1..7c1e382330fb 100644
--- a/arch/arm/mach-at91/board-neocore926.c
+++ b/arch/arm/mach-at91/board-neocore926.c
@@ -56,7 +56,7 @@ static void __init neocore926_map_io(void)
56 /* Initialize processor: 20 MHz crystal */ 56 /* Initialize processor: 20 MHz crystal */
57 at91sam9263_initialize(20000000); 57 at91sam9263_initialize(20000000);
58 58
59 /* DGBU on ttyS0. (Rx & Tx only) */ 59 /* DBGU on ttyS0. (Rx & Tx only) */
60 at91_register_uart(0, 0, 0); 60 at91_register_uart(0, 0, 0);
61 61
62 /* USART0 on ttyS1. (Rx, Tx, RTS, CTS) */ 62 /* USART0 on ttyS1. (Rx, Tx, RTS, CTS) */
@@ -340,7 +340,7 @@ static void __init neocore926_add_device_buttons(void) {}
340/* 340/*
341 * AC97 341 * AC97
342 */ 342 */
343static struct atmel_ac97_data neocore926_ac97_data = { 343static struct ac97c_platform_data neocore926_ac97_data = {
344 .reset_pin = AT91_PIN_PA13, 344 .reset_pin = AT91_PIN_PA13,
345}; 345};
346 346
diff --git a/arch/arm/mach-at91/board-qil-a9260.c b/arch/arm/mach-at91/board-qil-a9260.c
index 4cff9a7e61d2..664938e8f661 100644
--- a/arch/arm/mach-at91/board-qil-a9260.c
+++ b/arch/arm/mach-at91/board-qil-a9260.c
@@ -53,7 +53,7 @@ static void __init ek_map_io(void)
53 /* Initialize processor: 12.000 MHz crystal */ 53 /* Initialize processor: 12.000 MHz crystal */
54 at91sam9260_initialize(12000000); 54 at91sam9260_initialize(12000000);
55 55
56 /* DGBU on ttyS0. (Rx & Tx only) */ 56 /* DBGU on ttyS0. (Rx & Tx only) */
57 at91_register_uart(0, 0, 0); 57 at91_register_uart(0, 0, 0);
58 58
59 /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ 59 /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
diff --git a/arch/arm/mach-at91/board-sam9260ek.c b/arch/arm/mach-at91/board-sam9260ek.c
index 93a0f8b100eb..ba9d501b5c50 100644
--- a/arch/arm/mach-at91/board-sam9260ek.c
+++ b/arch/arm/mach-at91/board-sam9260ek.c
@@ -54,7 +54,7 @@ static void __init ek_map_io(void)
54 /* Initialize processor: 18.432 MHz crystal */ 54 /* Initialize processor: 18.432 MHz crystal */
55 at91sam9260_initialize(18432000); 55 at91sam9260_initialize(18432000);
56 56
57 /* DGBU on ttyS0. (Rx & Tx only) */ 57 /* DBGU on ttyS0. (Rx & Tx only) */
58 at91_register_uart(0, 0, 0); 58 at91_register_uart(0, 0, 0);
59 59
60 /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ 60 /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c
index f9b19993a7a9..c4c8865d52d7 100644
--- a/arch/arm/mach-at91/board-sam9261ek.c
+++ b/arch/arm/mach-at91/board-sam9261ek.c
@@ -61,7 +61,7 @@ static void __init ek_map_io(void)
61 /* Setup the LEDs */ 61 /* Setup the LEDs */
62 at91_init_leds(AT91_PIN_PA13, AT91_PIN_PA14); 62 at91_init_leds(AT91_PIN_PA13, AT91_PIN_PA14);
63 63
64 /* DGBU on ttyS0. (Rx & Tx only) */ 64 /* DBGU on ttyS0. (Rx & Tx only) */
65 at91_register_uart(0, 0, 0); 65 at91_register_uart(0, 0, 0);
66 66
67 /* set serial console to ttyS0 (ie, DBGU) */ 67 /* set serial console to ttyS0 (ie, DBGU) */
diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c
index 1bf7bd4cbe13..2d867fb0630f 100644
--- a/arch/arm/mach-at91/board-sam9263ek.c
+++ b/arch/arm/mach-at91/board-sam9263ek.c
@@ -57,7 +57,7 @@ static void __init ek_map_io(void)
57 /* Initialize processor: 16.367 MHz crystal */ 57 /* Initialize processor: 16.367 MHz crystal */
58 at91sam9263_initialize(16367660); 58 at91sam9263_initialize(16367660);
59 59
60 /* DGBU on ttyS0. (Rx & Tx only) */ 60 /* DBGU on ttyS0. (Rx & Tx only) */
61 at91_register_uart(0, 0, 0); 61 at91_register_uart(0, 0, 0);
62 62
63 /* USART0 on ttyS1. (Rx, Tx, RTS, CTS) */ 63 /* USART0 on ttyS1. (Rx, Tx, RTS, CTS) */
@@ -400,6 +400,23 @@ static struct gpio_led ek_pwm_led[] = {
400 } 400 }
401}; 401};
402 402
403/*
404 * CAN
405 */
406static void sam9263ek_transceiver_switch(int on)
407{
408 if (on) {
409 at91_set_gpio_output(AT91_PIN_PA18, 1); /* CANRXEN */
410 at91_set_gpio_output(AT91_PIN_PA19, 0); /* CANRS */
411 } else {
412 at91_set_gpio_output(AT91_PIN_PA18, 0); /* CANRXEN */
413 at91_set_gpio_output(AT91_PIN_PA19, 1); /* CANRS */
414 }
415}
416
417static struct at91_can_data ek_can_data = {
418 .transceiver_switch = sam9263ek_transceiver_switch,
419};
403 420
404static void __init ek_board_init(void) 421static void __init ek_board_init(void)
405{ 422{
@@ -431,6 +448,8 @@ static void __init ek_board_init(void)
431 /* LEDs */ 448 /* LEDs */
432 at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds)); 449 at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
433 at91_pwm_leds(ek_pwm_led, ARRAY_SIZE(ek_pwm_led)); 450 at91_pwm_leds(ek_pwm_led, ARRAY_SIZE(ek_pwm_led));
451 /* CAN */
452 at91_add_device_can(&ek_can_data);
434} 453}
435 454
436MACHINE_START(AT91SAM9263EK, "Atmel AT91SAM9263-EK") 455MACHINE_START(AT91SAM9263EK, "Atmel AT91SAM9263-EK")
diff --git a/arch/arm/mach-at91/board-sam9g20ek-2slot-mmc.c b/arch/arm/mach-at91/board-sam9g20ek-2slot-mmc.c
new file mode 100644
index 000000000000..a28e53faf71d
--- /dev/null
+++ b/arch/arm/mach-at91/board-sam9g20ek-2slot-mmc.c
@@ -0,0 +1,277 @@
1/*
2 * Copyright (C) 2005 SAN People
3 * Copyright (C) 2008 Atmel
4 * Copyright (C) 2009 Rob Emanuele
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#include <linux/types.h>
22#include <linux/init.h>
23#include <linux/mm.h>
24#include <linux/module.h>
25#include <linux/platform_device.h>
26#include <linux/spi/spi.h>
27#include <linux/spi/at73c213.h>
28#include <linux/clk.h>
29
30#include <mach/hardware.h>
31#include <asm/setup.h>
32#include <asm/mach-types.h>
33#include <asm/irq.h>
34
35#include <asm/mach/arch.h>
36#include <asm/mach/map.h>
37#include <asm/mach/irq.h>
38
39#include <mach/board.h>
40#include <mach/gpio.h>
41#include <mach/at91sam9_smc.h>
42
43#include "sam9_smc.h"
44#include "generic.h"
45
46
47static void __init ek_map_io(void)
48{
49 /* Initialize processor: 18.432 MHz crystal */
50 at91sam9260_initialize(18432000);
51
52 /* DGBU on ttyS0. (Rx & Tx only) */
53 at91_register_uart(0, 0, 0);
54
55 /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
56 at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
57 | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
58 | ATMEL_UART_RI);
59
60 /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */
61 at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS);
62
63 /* set serial console to ttyS0 (ie, DBGU) */
64 at91_set_serial_console(0);
65}
66
67static void __init ek_init_irq(void)
68{
69 at91sam9260_init_interrupts(NULL);
70}
71
72
73/*
74 * USB Host port
75 */
76static struct at91_usbh_data __initdata ek_usbh_data = {
77 .ports = 2,
78};
79
80/*
81 * USB Device port
82 */
83static struct at91_udc_data __initdata ek_udc_data = {
84 .vbus_pin = AT91_PIN_PC5,
85 .pullup_pin = 0, /* pull-up driven by UDC */
86};
87
88
89/*
90 * SPI devices.
91 */
92static struct spi_board_info ek_spi_devices[] = {
93#if !defined(CONFIG_MMC_ATMELMCI)
94 { /* DataFlash chip */
95 .modalias = "mtd_dataflash",
96 .chip_select = 1,
97 .max_speed_hz = 15 * 1000 * 1000,
98 .bus_num = 0,
99 },
100#if defined(CONFIG_MTD_AT91_DATAFLASH_CARD)
101 { /* DataFlash card */
102 .modalias = "mtd_dataflash",
103 .chip_select = 0,
104 .max_speed_hz = 15 * 1000 * 1000,
105 .bus_num = 0,
106 },
107#endif
108#endif
109};
110
111
112/*
113 * MACB Ethernet device
114 */
115static struct at91_eth_data __initdata ek_macb_data = {
116 .phy_irq_pin = AT91_PIN_PC12,
117 .is_rmii = 1,
118};
119
120
121/*
122 * NAND flash
123 */
124static struct mtd_partition __initdata ek_nand_partition[] = {
125 {
126 .name = "Bootstrap",
127 .offset = 0,
128 .size = 4 * SZ_1M,
129 },
130 {
131 .name = "Partition 1",
132 .offset = MTDPART_OFS_NXTBLK,
133 .size = 60 * SZ_1M,
134 },
135 {
136 .name = "Partition 2",
137 .offset = MTDPART_OFS_NXTBLK,
138 .size = MTDPART_SIZ_FULL,
139 },
140};
141
142static struct mtd_partition * __init nand_partitions(int size, int *num_partitions)
143{
144 *num_partitions = ARRAY_SIZE(ek_nand_partition);
145 return ek_nand_partition;
146}
147
148/* det_pin is not connected */
149static struct atmel_nand_data __initdata ek_nand_data = {
150 .ale = 21,
151 .cle = 22,
152 .rdy_pin = AT91_PIN_PC13,
153 .enable_pin = AT91_PIN_PC14,
154 .partition_info = nand_partitions,
155#if defined(CONFIG_MTD_NAND_ATMEL_BUSWIDTH_16)
156 .bus_width_16 = 1,
157#else
158 .bus_width_16 = 0,
159#endif
160};
161
162static struct sam9_smc_config __initdata ek_nand_smc_config = {
163 .ncs_read_setup = 0,
164 .nrd_setup = 2,
165 .ncs_write_setup = 0,
166 .nwe_setup = 2,
167
168 .ncs_read_pulse = 4,
169 .nrd_pulse = 4,
170 .ncs_write_pulse = 4,
171 .nwe_pulse = 4,
172
173 .read_cycle = 7,
174 .write_cycle = 7,
175
176 .mode = AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE,
177 .tdf_cycles = 3,
178};
179
180static void __init ek_add_device_nand(void)
181{
182 /* setup bus-width (8 or 16) */
183 if (ek_nand_data.bus_width_16)
184 ek_nand_smc_config.mode |= AT91_SMC_DBW_16;
185 else
186 ek_nand_smc_config.mode |= AT91_SMC_DBW_8;
187
188 /* configure chip-select 3 (NAND) */
189 sam9_smc_configure(3, &ek_nand_smc_config);
190
191 at91_add_device_nand(&ek_nand_data);
192}
193
194
195/*
196 * MCI (SD/MMC)
197 * det_pin and wp_pin are not connected
198 */
199#if defined(CONFIG_MMC_ATMELMCI) || defined(CONFIG_MMC_ATMELMCI_MODULE)
200static struct mci_platform_data __initdata ek_mmc_data = {
201 .slot[0] = {
202 .bus_width = 4,
203 .detect_pin = -ENODEV,
204 .wp_pin = -ENODEV,
205 },
206 .slot[1] = {
207 .bus_width = 4,
208 .detect_pin = -ENODEV,
209 .wp_pin = -ENODEV,
210 },
211
212};
213#else
214static struct amci_platform_data __initdata ek_mmc_data = {
215};
216#endif
217
218/*
219 * LEDs
220 */
221static struct gpio_led ek_leds[] = {
222 { /* "bottom" led, green, userled1 to be defined */
223 .name = "ds5",
224 .gpio = AT91_PIN_PB12,
225 .active_low = 1,
226 .default_trigger = "none",
227 },
228 { /* "power" led, yellow */
229 .name = "ds1",
230 .gpio = AT91_PIN_PB13,
231 .default_trigger = "heartbeat",
232 }
233};
234
235static struct i2c_board_info __initdata ek_i2c_devices[] = {
236 {
237 I2C_BOARD_INFO("24c512", 0x50),
238 },
239};
240
241
242static void __init ek_board_init(void)
243{
244 /* Serial */
245 at91_add_device_serial();
246 /* USB Host */
247 at91_add_device_usbh(&ek_usbh_data);
248 /* USB Device */
249 at91_add_device_udc(&ek_udc_data);
250 /* SPI */
251 at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices));
252 /* NAND */
253 ek_add_device_nand();
254 /* Ethernet */
255 at91_add_device_eth(&ek_macb_data);
256 /* MMC */
257 at91_add_device_mci(0, &ek_mmc_data);
258 /* I2C */
259 at91_add_device_i2c(ek_i2c_devices, ARRAY_SIZE(ek_i2c_devices));
260 /* LEDs */
261 at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
262 /* PCK0 provides MCLK to the WM8731 */
263 at91_set_B_periph(AT91_PIN_PC1, 0);
264 /* SSC (for WM8731) */
265 at91_add_device_ssc(AT91SAM9260_ID_SSC, ATMEL_SSC_TX);
266}
267
268MACHINE_START(AT91SAM9G20EK_2MMC, "Atmel AT91SAM9G20-EK 2 MMC Slot Mod")
269 /* Maintainer: Rob Emanuele */
270 .phys_io = AT91_BASE_SYS,
271 .io_pg_offst = (AT91_VA_BASE_SYS >> 18) & 0xfffc,
272 .boot_params = AT91_SDRAM_BASE + 0x100,
273 .timer = &at91sam926x_timer,
274 .map_io = ek_map_io,
275 .init_irq = ek_init_irq,
276 .init_machine = ek_board_init,
277MACHINE_END
diff --git a/arch/arm/mach-at91/board-sam9g20ek.c b/arch/arm/mach-at91/board-sam9g20ek.c
index ca470d504ea0..29cf83177484 100644
--- a/arch/arm/mach-at91/board-sam9g20ek.c
+++ b/arch/arm/mach-at91/board-sam9g20ek.c
@@ -50,7 +50,7 @@ static void __init ek_map_io(void)
50 /* Initialize processor: 18.432 MHz crystal */ 50 /* Initialize processor: 18.432 MHz crystal */
51 at91sam9260_initialize(18432000); 51 at91sam9260_initialize(18432000);
52 52
53 /* DGBU on ttyS0. (Rx & Tx only) */ 53 /* DBGU on ttyS0. (Rx & Tx only) */
54 at91_register_uart(0, 0, 0); 54 at91_register_uart(0, 0, 0);
55 55
56 /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ 56 /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
diff --git a/arch/arm/mach-at91/board-sam9m10g45ek.c b/arch/arm/mach-at91/board-sam9m10g45ek.c
index b8558eae5229..64c3843f323d 100644
--- a/arch/arm/mach-at91/board-sam9m10g45ek.c
+++ b/arch/arm/mach-at91/board-sam9m10g45ek.c
@@ -311,6 +311,14 @@ static void __init ek_add_device_buttons(void) {}
311 311
312 312
313/* 313/*
314 * AC97
315 * reset_pin is not connected: NRST
316 */
317static struct ac97c_platform_data ek_ac97_data = {
318};
319
320
321/*
314 * LEDs ... these could all be PWM-driven, for variable brightness 322 * LEDs ... these could all be PWM-driven, for variable brightness
315 */ 323 */
316static struct gpio_led ek_leds[] = { 324static struct gpio_led ek_leds[] = {
@@ -372,6 +380,8 @@ static void __init ek_board_init(void)
372 at91_add_device_lcdc(&ek_lcdc_data); 380 at91_add_device_lcdc(&ek_lcdc_data);
373 /* Push Buttons */ 381 /* Push Buttons */
374 ek_add_device_buttons(); 382 ek_add_device_buttons();
383 /* AC97 */
384 at91_add_device_ac97(&ek_ac97_data);
375 /* LEDs */ 385 /* LEDs */
376 at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds)); 386 at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
377 at91_pwm_leds(ek_pwm_led, ARRAY_SIZE(ek_pwm_led)); 387 at91_pwm_leds(ek_pwm_led, ARRAY_SIZE(ek_pwm_led));
diff --git a/arch/arm/mach-at91/board-sam9rlek.c b/arch/arm/mach-at91/board-sam9rlek.c
index 9d07679efce7..bd28e989e54e 100644
--- a/arch/arm/mach-at91/board-sam9rlek.c
+++ b/arch/arm/mach-at91/board-sam9rlek.c
@@ -43,7 +43,7 @@ static void __init ek_map_io(void)
43 /* Initialize processor: 12.000 MHz crystal */ 43 /* Initialize processor: 12.000 MHz crystal */
44 at91sam9rl_initialize(12000000); 44 at91sam9rl_initialize(12000000);
45 45
46 /* DGBU on ttyS0. (Rx & Tx only) */ 46 /* DBGU on ttyS0. (Rx & Tx only) */
47 at91_register_uart(0, 0, 0); 47 at91_register_uart(0, 0, 0);
48 48
49 /* USART0 on ttyS1. (Rx, Tx, CTS, RTS) */ 49 /* USART0 on ttyS1. (Rx, Tx, CTS, RTS) */
@@ -211,6 +211,14 @@ static struct atmel_lcdfb_info __initdata ek_lcdc_data;
211 211
212 212
213/* 213/*
214 * AC97
215 * reset_pin is not connected: NRST
216 */
217static struct ac97c_platform_data ek_ac97_data = {
218};
219
220
221/*
214 * LEDs 222 * LEDs
215 */ 223 */
216static struct gpio_led ek_leds[] = { 224static struct gpio_led ek_leds[] = {
@@ -299,6 +307,8 @@ static void __init ek_board_init(void)
299 at91_add_device_mmc(0, &ek_mmc_data); 307 at91_add_device_mmc(0, &ek_mmc_data);
300 /* LCD Controller */ 308 /* LCD Controller */
301 at91_add_device_lcdc(&ek_lcdc_data); 309 at91_add_device_lcdc(&ek_lcdc_data);
310 /* AC97 */
311 at91_add_device_ac97(&ek_ac97_data);
302 /* Touch Screen Controller */ 312 /* Touch Screen Controller */
303 at91_add_device_tsadcc(); 313 at91_add_device_tsadcc();
304 /* LEDs */ 314 /* LEDs */
diff --git a/arch/arm/mach-at91/board-usb-a9260.c b/arch/arm/mach-at91/board-usb-a9260.c
index d13304c0bc45..905d6ef76807 100644
--- a/arch/arm/mach-at91/board-usb-a9260.c
+++ b/arch/arm/mach-at91/board-usb-a9260.c
@@ -53,7 +53,7 @@ static void __init ek_map_io(void)
53 /* Initialize processor: 12.000 MHz crystal */ 53 /* Initialize processor: 12.000 MHz crystal */
54 at91sam9260_initialize(12000000); 54 at91sam9260_initialize(12000000);
55 55
56 /* DGBU on ttyS0. (Rx & Tx only) */ 56 /* DBGU on ttyS0. (Rx & Tx only) */
57 at91_register_uart(0, 0, 0); 57 at91_register_uart(0, 0, 0);
58 58
59 /* set serial console to ttyS0 (ie, DBGU) */ 59 /* set serial console to ttyS0 (ie, DBGU) */
diff --git a/arch/arm/mach-at91/board-usb-a9263.c b/arch/arm/mach-at91/board-usb-a9263.c
index d96405b7d578..b6a3480383e5 100644
--- a/arch/arm/mach-at91/board-usb-a9263.c
+++ b/arch/arm/mach-at91/board-usb-a9263.c
@@ -52,7 +52,7 @@ static void __init ek_map_io(void)
52 /* Initialize processor: 12.00 MHz crystal */ 52 /* Initialize processor: 12.00 MHz crystal */
53 at91sam9263_initialize(12000000); 53 at91sam9263_initialize(12000000);
54 54
55 /* DGBU on ttyS0. (Rx & Tx only) */ 55 /* DBGU on ttyS0. (Rx & Tx only) */
56 at91_register_uart(0, 0, 0); 56 at91_register_uart(0, 0, 0);
57 57
58 /* set serial console to ttyS0 (ie, DBGU) */ 58 /* set serial console to ttyS0 (ie, DBGU) */
diff --git a/arch/arm/mach-at91/include/mach/board.h b/arch/arm/mach-at91/include/mach/board.h
index 13f27a4b882d..2f4fcedc02ba 100644
--- a/arch/arm/mach-at91/include/mach/board.h
+++ b/arch/arm/mach-at91/include/mach/board.h
@@ -37,6 +37,7 @@
37#include <linux/leds.h> 37#include <linux/leds.h>
38#include <linux/spi/spi.h> 38#include <linux/spi/spi.h>
39#include <linux/usb/atmel_usba_udc.h> 39#include <linux/usb/atmel_usba_udc.h>
40#include <linux/atmel-mci.h>
40#include <sound/atmel-ac97c.h> 41#include <sound/atmel-ac97c.h>
41 42
42 /* USB Device */ 43 /* USB Device */
@@ -64,6 +65,7 @@ struct at91_cf_data {
64extern void __init at91_add_device_cf(struct at91_cf_data *data); 65extern void __init at91_add_device_cf(struct at91_cf_data *data);
65 66
66 /* MMC / SD */ 67 /* MMC / SD */
68 /* at91_mci platform config */
67struct at91_mmc_data { 69struct at91_mmc_data {
68 u8 det_pin; /* card detect IRQ */ 70 u8 det_pin; /* card detect IRQ */
69 unsigned slot_b:1; /* uses Slot B */ 71 unsigned slot_b:1; /* uses Slot B */
@@ -73,6 +75,9 @@ struct at91_mmc_data {
73}; 75};
74extern void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data); 76extern void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data);
75 77
78 /* atmel-mci platform config */
79extern void __init at91_add_device_mci(short mmc_id, struct mci_platform_data *data);
80
76 /* Ethernet (EMAC & MACB) */ 81 /* Ethernet (EMAC & MACB) */
77struct at91_eth_data { 82struct at91_eth_data {
78 u32 phy_mask; 83 u32 phy_mask;
@@ -183,6 +188,12 @@ extern void __init at91_add_device_isi(void);
183 /* Touchscreen Controller */ 188 /* Touchscreen Controller */
184extern void __init at91_add_device_tsadcc(void); 189extern void __init at91_add_device_tsadcc(void);
185 190
191/* CAN */
192struct at91_can_data {
193 void (*transceiver_switch)(int on);
194};
195extern void __init at91_add_device_can(struct at91_can_data *data);
196
186 /* LEDs */ 197 /* LEDs */
187extern void __init at91_init_leds(u8 cpu_led, u8 timer_led); 198extern void __init at91_init_leds(u8 cpu_led, u8 timer_led);
188extern void __init at91_gpio_leds(struct gpio_led *leds, int nr); 199extern void __init at91_gpio_leds(struct gpio_led *leds, int nr);
diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig
index be747f5c6cd8..40866c643f13 100644
--- a/arch/arm/mach-davinci/Kconfig
+++ b/arch/arm/mach-davinci/Kconfig
@@ -6,6 +6,9 @@ config AINTC
6config CP_INTC 6config CP_INTC
7 bool 7 bool
8 8
9config ARCH_DAVINCI_DMx
10 bool
11
9menu "TI DaVinci Implementations" 12menu "TI DaVinci Implementations"
10 13
11comment "DaVinci Core Type" 14comment "DaVinci Core Type"
@@ -13,20 +16,41 @@ comment "DaVinci Core Type"
13config ARCH_DAVINCI_DM644x 16config ARCH_DAVINCI_DM644x
14 bool "DaVinci 644x based system" 17 bool "DaVinci 644x based system"
15 select AINTC 18 select AINTC
19 select ARCH_DAVINCI_DMx
16 20
17config ARCH_DAVINCI_DM355 21config ARCH_DAVINCI_DM355
18 bool "DaVinci 355 based system" 22 bool "DaVinci 355 based system"
19 select AINTC 23 select AINTC
24 select ARCH_DAVINCI_DMx
20 25
21config ARCH_DAVINCI_DM646x 26config ARCH_DAVINCI_DM646x
22 bool "DaVinci 646x based system" 27 bool "DaVinci 646x based system"
23 select AINTC 28 select AINTC
29 select ARCH_DAVINCI_DMx
30
31config ARCH_DAVINCI_DA830
32 bool "DA830/OMAP-L137 based system"
33 select CP_INTC
34 select ARCH_DAVINCI_DA8XX
35
36config ARCH_DAVINCI_DA850
37 bool "DA850/OMAP-L138 based system"
38 select CP_INTC
39 select ARCH_DAVINCI_DA8XX
40
41config ARCH_DAVINCI_DA8XX
42 bool
43
44config ARCH_DAVINCI_DM365
45 bool "DaVinci 365 based system"
46 select AINTC
47 select ARCH_DAVINCI_DMx
24 48
25comment "DaVinci Board Type" 49comment "DaVinci Board Type"
26 50
27config MACH_DAVINCI_EVM 51config MACH_DAVINCI_EVM
28 bool "TI DM644x EVM" 52 bool "TI DM644x EVM"
29 default y 53 default ARCH_DAVINCI_DM644x
30 depends on ARCH_DAVINCI_DM644x 54 depends on ARCH_DAVINCI_DM644x
31 help 55 help
32 Configure this option to specify the whether the board used 56 Configure this option to specify the whether the board used
@@ -41,6 +65,7 @@ config MACH_SFFSDR
41 65
42config MACH_DAVINCI_DM355_EVM 66config MACH_DAVINCI_DM355_EVM
43 bool "TI DM355 EVM" 67 bool "TI DM355 EVM"
68 default ARCH_DAVINCI_DM355
44 depends on ARCH_DAVINCI_DM355 69 depends on ARCH_DAVINCI_DM355
45 help 70 help
46 Configure this option to specify the whether the board used 71 Configure this option to specify the whether the board used
@@ -55,11 +80,33 @@ config MACH_DM355_LEOPARD
55 80
56config MACH_DAVINCI_DM6467_EVM 81config MACH_DAVINCI_DM6467_EVM
57 bool "TI DM6467 EVM" 82 bool "TI DM6467 EVM"
83 default ARCH_DAVINCI_DM646x
58 depends on ARCH_DAVINCI_DM646x 84 depends on ARCH_DAVINCI_DM646x
59 help 85 help
60 Configure this option to specify the whether the board used 86 Configure this option to specify the whether the board used
61 for development is a DM6467 EVM 87 for development is a DM6467 EVM
62 88
89config MACH_DAVINCI_DM365_EVM
90 bool "TI DM365 EVM"
91 default ARCH_DAVINCI_DM365
92 depends on ARCH_DAVINCI_DM365
93 help
94 Configure this option to specify whether the board used
95 for development is a DM365 EVM
96
97config MACH_DAVINCI_DA830_EVM
98 bool "TI DA830/OMAP-L137 Reference Platform"
99 default ARCH_DAVINCI_DA830
100 depends on ARCH_DAVINCI_DA830
101 help
102 Say Y here to select the TI DA830/OMAP-L137 Evaluation Module.
103
104config MACH_DAVINCI_DA850_EVM
105 bool "TI DA850/OMAP-L138 Reference Platform"
106 default ARCH_DAVINCI_DA850
107 depends on ARCH_DAVINCI_DA850
108 help
109 Say Y here to select the TI DA850/OMAP-L138 Evaluation Module.
63 110
64config DAVINCI_MUX 111config DAVINCI_MUX
65 bool "DAVINCI multiplexing support" 112 bool "DAVINCI multiplexing support"
diff --git a/arch/arm/mach-davinci/Makefile b/arch/arm/mach-davinci/Makefile
index 059ab78084ba..2e11e847313b 100644
--- a/arch/arm/mach-davinci/Makefile
+++ b/arch/arm/mach-davinci/Makefile
@@ -5,14 +5,17 @@
5 5
6# Common objects 6# Common objects
7obj-y := time.o clock.o serial.o io.o psc.o \ 7obj-y := time.o clock.o serial.o io.o psc.o \
8 gpio.o devices.o dma.o usb.o common.o sram.o 8 gpio.o dma.o usb.o common.o sram.o
9 9
10obj-$(CONFIG_DAVINCI_MUX) += mux.o 10obj-$(CONFIG_DAVINCI_MUX) += mux.o
11 11
12# Chip specific 12# Chip specific
13obj-$(CONFIG_ARCH_DAVINCI_DM644x) += dm644x.o 13obj-$(CONFIG_ARCH_DAVINCI_DM644x) += dm644x.o devices.o
14obj-$(CONFIG_ARCH_DAVINCI_DM355) += dm355.o 14obj-$(CONFIG_ARCH_DAVINCI_DM355) += dm355.o devices.o
15obj-$(CONFIG_ARCH_DAVINCI_DM646x) += dm646x.o 15obj-$(CONFIG_ARCH_DAVINCI_DM646x) += dm646x.o devices.o
16obj-$(CONFIG_ARCH_DAVINCI_DM365) += dm365.o devices.o
17obj-$(CONFIG_ARCH_DAVINCI_DA830) += da830.o devices-da8xx.o
18obj-$(CONFIG_ARCH_DAVINCI_DA850) += da850.o devices-da8xx.o
16 19
17obj-$(CONFIG_AINTC) += irq.o 20obj-$(CONFIG_AINTC) += irq.o
18obj-$(CONFIG_CP_INTC) += cp_intc.o 21obj-$(CONFIG_CP_INTC) += cp_intc.o
@@ -23,3 +26,6 @@ obj-$(CONFIG_MACH_SFFSDR) += board-sffsdr.o
23obj-$(CONFIG_MACH_DAVINCI_DM355_EVM) += board-dm355-evm.o 26obj-$(CONFIG_MACH_DAVINCI_DM355_EVM) += board-dm355-evm.o
24obj-$(CONFIG_MACH_DM355_LEOPARD) += board-dm355-leopard.o 27obj-$(CONFIG_MACH_DM355_LEOPARD) += board-dm355-leopard.o
25obj-$(CONFIG_MACH_DAVINCI_DM6467_EVM) += board-dm646x-evm.o 28obj-$(CONFIG_MACH_DAVINCI_DM6467_EVM) += board-dm646x-evm.o
29obj-$(CONFIG_MACH_DAVINCI_DM365_EVM) += board-dm365-evm.o
30obj-$(CONFIG_MACH_DAVINCI_DA830_EVM) += board-da830-evm.o
31obj-$(CONFIG_MACH_DAVINCI_DA850_EVM) += board-da850-evm.o
diff --git a/arch/arm/mach-davinci/Makefile.boot b/arch/arm/mach-davinci/Makefile.boot
index e1dd366f836b..db97ef2c6477 100644
--- a/arch/arm/mach-davinci/Makefile.boot
+++ b/arch/arm/mach-davinci/Makefile.boot
@@ -1,3 +1,13 @@
1ifeq ($(CONFIG_ARCH_DAVINCI_DA8XX),y)
2ifeq ($(CONFIG_ARCH_DAVINCI_DMx),y)
3$(error Cannot enable DaVinci and DA8XX platforms concurrently)
4else
5 zreladdr-y := 0xc0008000
6params_phys-y := 0xc0000100
7initrd_phys-y := 0xc0800000
8endif
9else
1 zreladdr-y := 0x80008000 10 zreladdr-y := 0x80008000
2params_phys-y := 0x80000100 11params_phys-y := 0x80000100
3initrd_phys-y := 0x80800000 12initrd_phys-y := 0x80800000
13endif
diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c
new file mode 100644
index 000000000000..bfbb63936f33
--- /dev/null
+++ b/arch/arm/mach-davinci/board-da830-evm.c
@@ -0,0 +1,157 @@
1/*
2 * TI DA830/OMAP L137 EVM board
3 *
4 * Author: Mark A. Greer <mgreer@mvista.com>
5 * Derived from: arch/arm/mach-davinci/board-dm644x-evm.c
6 *
7 * 2007, 2009 (c) MontaVista Software, Inc. This file is licensed under
8 * the terms of the GNU General Public License version 2. This program
9 * is licensed "as is" without any warranty of any kind, whether express
10 * or implied.
11 */
12#include <linux/kernel.h>
13#include <linux/module.h>
14#include <linux/init.h>
15#include <linux/console.h>
16#include <linux/i2c.h>
17#include <linux/i2c/at24.h>
18
19#include <asm/mach-types.h>
20#include <asm/mach/arch.h>
21
22#include <mach/common.h>
23#include <mach/irqs.h>
24#include <mach/cp_intc.h>
25#include <mach/da8xx.h>
26#include <mach/asp.h>
27
28#define DA830_EVM_PHY_MASK 0x0
29#define DA830_EVM_MDIO_FREQUENCY 2200000 /* PHY bus frequency */
30
31static struct at24_platform_data da830_evm_i2c_eeprom_info = {
32 .byte_len = SZ_256K / 8,
33 .page_size = 64,
34 .flags = AT24_FLAG_ADDR16,
35 .setup = davinci_get_mac_addr,
36 .context = (void *)0x7f00,
37};
38
39static struct i2c_board_info __initdata da830_evm_i2c_devices[] = {
40 {
41 I2C_BOARD_INFO("24c256", 0x50),
42 .platform_data = &da830_evm_i2c_eeprom_info,
43 },
44 {
45 I2C_BOARD_INFO("tlv320aic3x", 0x18),
46 }
47};
48
49static struct davinci_i2c_platform_data da830_evm_i2c_0_pdata = {
50 .bus_freq = 100, /* kHz */
51 .bus_delay = 0, /* usec */
52};
53
54static struct davinci_uart_config da830_evm_uart_config __initdata = {
55 .enabled_uarts = 0x7,
56};
57
58static u8 da830_iis_serializer_direction[] = {
59 RX_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE,
60 INACTIVE_MODE, TX_MODE, INACTIVE_MODE, INACTIVE_MODE,
61 INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE,
62};
63
64static struct snd_platform_data da830_evm_snd_data = {
65 .tx_dma_offset = 0x2000,
66 .rx_dma_offset = 0x2000,
67 .op_mode = DAVINCI_MCASP_IIS_MODE,
68 .num_serializer = ARRAY_SIZE(da830_iis_serializer_direction),
69 .tdm_slots = 2,
70 .serial_dir = da830_iis_serializer_direction,
71 .eventq_no = EVENTQ_0,
72 .version = MCASP_VERSION_2,
73 .txnumevt = 1,
74 .rxnumevt = 1,
75};
76
77static __init void da830_evm_init(void)
78{
79 struct davinci_soc_info *soc_info = &davinci_soc_info;
80 int ret;
81
82 ret = da8xx_register_edma();
83 if (ret)
84 pr_warning("da830_evm_init: edma registration failed: %d\n",
85 ret);
86
87 ret = da8xx_pinmux_setup(da830_i2c0_pins);
88 if (ret)
89 pr_warning("da830_evm_init: i2c0 mux setup failed: %d\n",
90 ret);
91
92 ret = da8xx_register_i2c(0, &da830_evm_i2c_0_pdata);
93 if (ret)
94 pr_warning("da830_evm_init: i2c0 registration failed: %d\n",
95 ret);
96
97 soc_info->emac_pdata->phy_mask = DA830_EVM_PHY_MASK;
98 soc_info->emac_pdata->mdio_max_freq = DA830_EVM_MDIO_FREQUENCY;
99 soc_info->emac_pdata->rmii_en = 1;
100
101 ret = da8xx_pinmux_setup(da830_cpgmac_pins);
102 if (ret)
103 pr_warning("da830_evm_init: cpgmac mux setup failed: %d\n",
104 ret);
105
106 ret = da8xx_register_emac();
107 if (ret)
108 pr_warning("da830_evm_init: emac registration failed: %d\n",
109 ret);
110
111 ret = da8xx_register_watchdog();
112 if (ret)
113 pr_warning("da830_evm_init: watchdog registration failed: %d\n",
114 ret);
115
116 davinci_serial_init(&da830_evm_uart_config);
117 i2c_register_board_info(1, da830_evm_i2c_devices,
118 ARRAY_SIZE(da830_evm_i2c_devices));
119
120 ret = da8xx_pinmux_setup(da830_mcasp1_pins);
121 if (ret)
122 pr_warning("da830_evm_init: mcasp1 mux setup failed: %d\n",
123 ret);
124
125 da8xx_init_mcasp(1, &da830_evm_snd_data);
126}
127
128#ifdef CONFIG_SERIAL_8250_CONSOLE
129static int __init da830_evm_console_init(void)
130{
131 return add_preferred_console("ttyS", 2, "115200");
132}
133console_initcall(da830_evm_console_init);
134#endif
135
136static __init void da830_evm_irq_init(void)
137{
138 struct davinci_soc_info *soc_info = &davinci_soc_info;
139
140 cp_intc_init((void __iomem *)DA8XX_CP_INTC_VIRT, DA830_N_CP_INTC_IRQ,
141 soc_info->intc_irq_prios);
142}
143
144static void __init da830_evm_map_io(void)
145{
146 da830_init();
147}
148
149MACHINE_START(DAVINCI_DA830_EVM, "DaVinci DA830/OMAP L137 EVM")
150 .phys_io = IO_PHYS,
151 .io_pg_offst = (__IO_ADDRESS(IO_PHYS) >> 18) & 0xfffc,
152 .boot_params = (DA8XX_DDR_BASE + 0x100),
153 .map_io = da830_evm_map_io,
154 .init_irq = da830_evm_irq_init,
155 .timer = &davinci_timer,
156 .init_machine = da830_evm_init,
157MACHINE_END
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c
new file mode 100644
index 000000000000..c759d72494e0
--- /dev/null
+++ b/arch/arm/mach-davinci/board-da850-evm.c
@@ -0,0 +1,415 @@
1/*
2 * TI DA850/OMAP-L138 EVM board
3 *
4 * Copyright (C) 2009 Texas Instruments Incorporated - http://www.ti.com/
5 *
6 * Derived from: arch/arm/mach-davinci/board-da830-evm.c
7 * Original Copyrights follow:
8 *
9 * 2007, 2009 (c) MontaVista Software, Inc. This file is licensed under
10 * the terms of the GNU General Public License version 2. This program
11 * is licensed "as is" without any warranty of any kind, whether express
12 * or implied.
13 */
14#include <linux/kernel.h>
15#include <linux/module.h>
16#include <linux/init.h>
17#include <linux/console.h>
18#include <linux/i2c.h>
19#include <linux/i2c/at24.h>
20#include <linux/gpio.h>
21#include <linux/platform_device.h>
22#include <linux/mtd/mtd.h>
23#include <linux/mtd/nand.h>
24#include <linux/mtd/partitions.h>
25#include <linux/mtd/physmap.h>
26
27#include <asm/mach-types.h>
28#include <asm/mach/arch.h>
29
30#include <mach/common.h>
31#include <mach/irqs.h>
32#include <mach/cp_intc.h>
33#include <mach/da8xx.h>
34#include <mach/nand.h>
35
36#define DA850_EVM_PHY_MASK 0x1
37#define DA850_EVM_MDIO_FREQUENCY 2200000 /* PHY bus frequency */
38
39#define DA850_LCD_BL_PIN GPIO_TO_PIN(2, 15)
40#define DA850_LCD_PWR_PIN GPIO_TO_PIN(8, 10)
41
42#define DA850_MMCSD_CD_PIN GPIO_TO_PIN(4, 0)
43#define DA850_MMCSD_WP_PIN GPIO_TO_PIN(4, 1)
44
45static struct mtd_partition da850_evm_norflash_partition[] = {
46 {
47 .name = "NOR filesystem",
48 .offset = 0,
49 .size = MTDPART_SIZ_FULL,
50 .mask_flags = 0,
51 },
52};
53
54static struct physmap_flash_data da850_evm_norflash_data = {
55 .width = 2,
56 .parts = da850_evm_norflash_partition,
57 .nr_parts = ARRAY_SIZE(da850_evm_norflash_partition),
58};
59
60static struct resource da850_evm_norflash_resource[] = {
61 {
62 .start = DA8XX_AEMIF_CS2_BASE,
63 .end = DA8XX_AEMIF_CS2_BASE + SZ_32M - 1,
64 .flags = IORESOURCE_MEM,
65 },
66};
67
68static struct platform_device da850_evm_norflash_device = {
69 .name = "physmap-flash",
70 .id = 0,
71 .dev = {
72 .platform_data = &da850_evm_norflash_data,
73 },
74 .num_resources = 1,
75 .resource = da850_evm_norflash_resource,
76};
77
78/* DA850/OMAP-L138 EVM includes a 512 MByte large-page NAND flash
79 * (128K blocks). It may be used instead of the (default) SPI flash
80 * to boot, using TI's tools to install the secondary boot loader
81 * (UBL) and U-Boot.
82 */
83struct mtd_partition da850_evm_nandflash_partition[] = {
84 {
85 .name = "u-boot env",
86 .offset = 0,
87 .size = SZ_128K,
88 .mask_flags = MTD_WRITEABLE,
89 },
90 {
91 .name = "UBL",
92 .offset = MTDPART_OFS_APPEND,
93 .size = SZ_128K,
94 .mask_flags = MTD_WRITEABLE,
95 },
96 {
97 .name = "u-boot",
98 .offset = MTDPART_OFS_APPEND,
99 .size = 4 * SZ_128K,
100 .mask_flags = MTD_WRITEABLE,
101 },
102 {
103 .name = "kernel",
104 .offset = 0x200000,
105 .size = SZ_2M,
106 .mask_flags = 0,
107 },
108 {
109 .name = "filesystem",
110 .offset = MTDPART_OFS_APPEND,
111 .size = MTDPART_SIZ_FULL,
112 .mask_flags = 0,
113 },
114};
115
116static struct davinci_nand_pdata da850_evm_nandflash_data = {
117 .parts = da850_evm_nandflash_partition,
118 .nr_parts = ARRAY_SIZE(da850_evm_nandflash_partition),
119 .ecc_mode = NAND_ECC_HW,
120 .options = NAND_USE_FLASH_BBT,
121};
122
123static struct resource da850_evm_nandflash_resource[] = {
124 {
125 .start = DA8XX_AEMIF_CS3_BASE,
126 .end = DA8XX_AEMIF_CS3_BASE + SZ_512K + 2 * SZ_1K - 1,
127 .flags = IORESOURCE_MEM,
128 },
129 {
130 .start = DA8XX_AEMIF_CTL_BASE,
131 .end = DA8XX_AEMIF_CTL_BASE + SZ_32K - 1,
132 .flags = IORESOURCE_MEM,
133 },
134};
135
136static struct platform_device da850_evm_nandflash_device = {
137 .name = "davinci_nand",
138 .id = 1,
139 .dev = {
140 .platform_data = &da850_evm_nandflash_data,
141 },
142 .num_resources = ARRAY_SIZE(da850_evm_nandflash_resource),
143 .resource = da850_evm_nandflash_resource,
144};
145
146static struct i2c_board_info __initdata da850_evm_i2c_devices[] = {
147 {
148 I2C_BOARD_INFO("tlv320aic3x", 0x18),
149 }
150};
151
152static struct davinci_i2c_platform_data da850_evm_i2c_0_pdata = {
153 .bus_freq = 100, /* kHz */
154 .bus_delay = 0, /* usec */
155};
156
157static struct davinci_uart_config da850_evm_uart_config __initdata = {
158 .enabled_uarts = 0x7,
159};
160
161static struct platform_device *da850_evm_devices[] __initdata = {
162 &da850_evm_nandflash_device,
163 &da850_evm_norflash_device,
164};
165
166/* davinci da850 evm audio machine driver */
167static u8 da850_iis_serializer_direction[] = {
168 INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE,
169 INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE,
170 INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, TX_MODE,
171 RX_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE,
172};
173
174static struct snd_platform_data da850_evm_snd_data = {
175 .tx_dma_offset = 0x2000,
176 .rx_dma_offset = 0x2000,
177 .op_mode = DAVINCI_MCASP_IIS_MODE,
178 .num_serializer = ARRAY_SIZE(da850_iis_serializer_direction),
179 .tdm_slots = 2,
180 .serial_dir = da850_iis_serializer_direction,
181 .eventq_no = EVENTQ_1,
182 .version = MCASP_VERSION_2,
183 .txnumevt = 1,
184 .rxnumevt = 1,
185};
186
187static int da850_evm_mmc_get_ro(int index)
188{
189 return gpio_get_value(DA850_MMCSD_WP_PIN);
190}
191
192static int da850_evm_mmc_get_cd(int index)
193{
194 return !gpio_get_value(DA850_MMCSD_CD_PIN);
195}
196
197static struct davinci_mmc_config da850_mmc_config = {
198 .get_ro = da850_evm_mmc_get_ro,
199 .get_cd = da850_evm_mmc_get_cd,
200 .wires = 4,
201 .version = MMC_CTLR_VERSION_2,
202};
203
204static int da850_lcd_hw_init(void)
205{
206 int status;
207
208 status = gpio_request(DA850_LCD_BL_PIN, "lcd bl\n");
209 if (status < 0)
210 return status;
211
212 status = gpio_request(DA850_LCD_PWR_PIN, "lcd pwr\n");
213 if (status < 0) {
214 gpio_free(DA850_LCD_BL_PIN);
215 return status;
216 }
217
218 gpio_direction_output(DA850_LCD_BL_PIN, 0);
219 gpio_direction_output(DA850_LCD_PWR_PIN, 0);
220
221 /* disable lcd backlight */
222 gpio_set_value(DA850_LCD_BL_PIN, 0);
223
224 /* disable lcd power */
225 gpio_set_value(DA850_LCD_PWR_PIN, 0);
226
227 /* enable lcd power */
228 gpio_set_value(DA850_LCD_PWR_PIN, 1);
229
230 /* enable lcd backlight */
231 gpio_set_value(DA850_LCD_BL_PIN, 1);
232
233 return 0;
234}
235
236#define DA8XX_AEMIF_CE2CFG_OFFSET 0x10
237#define DA8XX_AEMIF_ASIZE_16BIT 0x1
238
239static void __init da850_evm_init_nor(void)
240{
241 void __iomem *aemif_addr;
242
243 aemif_addr = ioremap(DA8XX_AEMIF_CTL_BASE, SZ_32K);
244
245 /* Configure data bus width of CS2 to 16 bit */
246 writel(readl(aemif_addr + DA8XX_AEMIF_CE2CFG_OFFSET) |
247 DA8XX_AEMIF_ASIZE_16BIT,
248 aemif_addr + DA8XX_AEMIF_CE2CFG_OFFSET);
249
250 iounmap(aemif_addr);
251}
252
253#if defined(CONFIG_MTD_PHYSMAP) || \
254 defined(CONFIG_MTD_PHYSMAP_MODULE)
255#define HAS_NOR 1
256#else
257#define HAS_NOR 0
258#endif
259
260#if defined(CONFIG_MMC_DAVINCI) || \
261 defined(CONFIG_MMC_DAVINCI_MODULE)
262#define HAS_MMC 1
263#else
264#define HAS_MMC 0
265#endif
266
267static __init void da850_evm_init(void)
268{
269 struct davinci_soc_info *soc_info = &davinci_soc_info;
270 int ret;
271
272 ret = da8xx_pinmux_setup(da850_nand_pins);
273 if (ret)
274 pr_warning("da850_evm_init: nand mux setup failed: %d\n",
275 ret);
276
277 ret = da8xx_pinmux_setup(da850_nor_pins);
278 if (ret)
279 pr_warning("da850_evm_init: nor mux setup failed: %d\n",
280 ret);
281
282 da850_evm_init_nor();
283
284 platform_add_devices(da850_evm_devices,
285 ARRAY_SIZE(da850_evm_devices));
286
287 ret = da8xx_register_edma();
288 if (ret)
289 pr_warning("da850_evm_init: edma registration failed: %d\n",
290 ret);
291
292 ret = da8xx_pinmux_setup(da850_i2c0_pins);
293 if (ret)
294 pr_warning("da850_evm_init: i2c0 mux setup failed: %d\n",
295 ret);
296
297 ret = da8xx_register_i2c(0, &da850_evm_i2c_0_pdata);
298 if (ret)
299 pr_warning("da850_evm_init: i2c0 registration failed: %d\n",
300 ret);
301
302 soc_info->emac_pdata->phy_mask = DA850_EVM_PHY_MASK;
303 soc_info->emac_pdata->mdio_max_freq = DA850_EVM_MDIO_FREQUENCY;
304 soc_info->emac_pdata->rmii_en = 0;
305
306 ret = da8xx_pinmux_setup(da850_cpgmac_pins);
307 if (ret)
308 pr_warning("da850_evm_init: cpgmac mux setup failed: %d\n",
309 ret);
310
311 ret = da8xx_register_emac();
312 if (ret)
313 pr_warning("da850_evm_init: emac registration failed: %d\n",
314 ret);
315
316 ret = da8xx_register_watchdog();
317 if (ret)
318 pr_warning("da830_evm_init: watchdog registration failed: %d\n",
319 ret);
320
321 if (HAS_MMC) {
322 if (HAS_NOR)
323 pr_warning("WARNING: both NOR Flash and MMC/SD are "
324 "enabled, but they share AEMIF pins.\n"
325 "\tDisable one of them.\n");
326
327 ret = da8xx_pinmux_setup(da850_mmcsd0_pins);
328 if (ret)
329 pr_warning("da850_evm_init: mmcsd0 mux setup failed:"
330 " %d\n", ret);
331
332 ret = gpio_request(DA850_MMCSD_CD_PIN, "MMC CD\n");
333 if (ret)
334 pr_warning("da850_evm_init: can not open GPIO %d\n",
335 DA850_MMCSD_CD_PIN);
336 gpio_direction_input(DA850_MMCSD_CD_PIN);
337
338 ret = gpio_request(DA850_MMCSD_WP_PIN, "MMC WP\n");
339 if (ret)
340 pr_warning("da850_evm_init: can not open GPIO %d\n",
341 DA850_MMCSD_WP_PIN);
342 gpio_direction_input(DA850_MMCSD_WP_PIN);
343
344 ret = da8xx_register_mmcsd0(&da850_mmc_config);
345 if (ret)
346 pr_warning("da850_evm_init: mmcsd0 registration failed:"
347 " %d\n", ret);
348 }
349
350 davinci_serial_init(&da850_evm_uart_config);
351
352 i2c_register_board_info(1, da850_evm_i2c_devices,
353 ARRAY_SIZE(da850_evm_i2c_devices));
354
355 /*
356 * shut down uart 0 and 1; they are not used on the board and
357 * accessing them causes endless "too much work in irq53" messages
358 * with arago fs
359 */
360 __raw_writel(0, IO_ADDRESS(DA8XX_UART1_BASE) + 0x30);
361 __raw_writel(0, IO_ADDRESS(DA8XX_UART0_BASE) + 0x30);
362
363 ret = da8xx_pinmux_setup(da850_mcasp_pins);
364 if (ret)
365 pr_warning("da850_evm_init: mcasp mux setup failed: %d\n",
366 ret);
367
368 da8xx_init_mcasp(0, &da850_evm_snd_data);
369
370 ret = da8xx_pinmux_setup(da850_lcdcntl_pins);
371 if (ret)
372 pr_warning("da850_evm_init: lcdcntl mux setup failed: %d\n",
373 ret);
374
375 ret = da850_lcd_hw_init();
376 if (ret)
377 pr_warning("da850_evm_init: lcd initialization failed: %d\n",
378 ret);
379
380 ret = da8xx_register_lcdc();
381 if (ret)
382 pr_warning("da850_evm_init: lcdc registration failed: %d\n",
383 ret);
384}
385
386#ifdef CONFIG_SERIAL_8250_CONSOLE
387static int __init da850_evm_console_init(void)
388{
389 return add_preferred_console("ttyS", 2, "115200");
390}
391console_initcall(da850_evm_console_init);
392#endif
393
394static __init void da850_evm_irq_init(void)
395{
396 struct davinci_soc_info *soc_info = &davinci_soc_info;
397
398 cp_intc_init((void __iomem *)DA8XX_CP_INTC_VIRT, DA850_N_CP_INTC_IRQ,
399 soc_info->intc_irq_prios);
400}
401
402static void __init da850_evm_map_io(void)
403{
404 da850_init();
405}
406
407MACHINE_START(DAVINCI_DA850_EVM, "DaVinci DA850/OMAP-L138 EVM")
408 .phys_io = IO_PHYS,
409 .io_pg_offst = (__IO_ADDRESS(IO_PHYS) >> 18) & 0xfffc,
410 .boot_params = (DA8XX_DDR_BASE + 0x100),
411 .map_io = da850_evm_map_io,
412 .init_irq = da850_evm_irq_init,
413 .timer = &davinci_timer,
414 .init_machine = da850_evm_init,
415MACHINE_END
diff --git a/arch/arm/mach-davinci/board-dm355-evm.c b/arch/arm/mach-davinci/board-dm355-evm.c
index d6ab64ccd496..77e806798822 100644
--- a/arch/arm/mach-davinci/board-dm355-evm.c
+++ b/arch/arm/mach-davinci/board-dm355-evm.c
@@ -20,6 +20,8 @@
20#include <linux/io.h> 20#include <linux/io.h>
21#include <linux/gpio.h> 21#include <linux/gpio.h>
22#include <linux/clk.h> 22#include <linux/clk.h>
23#include <linux/videodev2.h>
24#include <media/tvp514x.h>
23#include <linux/spi/spi.h> 25#include <linux/spi/spi.h>
24#include <linux/spi/eeprom.h> 26#include <linux/spi/eeprom.h>
25 27
@@ -117,6 +119,8 @@ static struct davinci_i2c_platform_data i2c_pdata = {
117 .bus_delay = 0 /* usec */, 119 .bus_delay = 0 /* usec */,
118}; 120};
119 121
122static struct snd_platform_data dm355_evm_snd_data;
123
120static int dm355evm_mmc_gpios = -EINVAL; 124static int dm355evm_mmc_gpios = -EINVAL;
121 125
122static void dm355evm_mmcsd_gpios(unsigned gpio) 126static void dm355evm_mmcsd_gpios(unsigned gpio)
@@ -134,11 +138,11 @@ static void dm355evm_mmcsd_gpios(unsigned gpio)
134} 138}
135 139
136static struct i2c_board_info dm355evm_i2c_info[] = { 140static struct i2c_board_info dm355evm_i2c_info[] = {
137 { I2C_BOARD_INFO("dm355evm_msp", 0x25), 141 { I2C_BOARD_INFO("dm355evm_msp", 0x25),
138 .platform_data = dm355evm_mmcsd_gpios, 142 .platform_data = dm355evm_mmcsd_gpios,
139 /* plus irq */ }, 143 },
140 /* { I2C_BOARD_INFO("tlv320aic3x", 0x1b), }, */ 144 /* { plus irq }, */
141 /* { I2C_BOARD_INFO("tvp5146", 0x5d), }, */ 145 { I2C_BOARD_INFO("tlv320aic33", 0x1b), },
142}; 146};
143 147
144static void __init evm_init_i2c(void) 148static void __init evm_init_i2c(void)
@@ -177,6 +181,72 @@ static struct platform_device dm355evm_dm9000 = {
177 .num_resources = ARRAY_SIZE(dm355evm_dm9000_rsrc), 181 .num_resources = ARRAY_SIZE(dm355evm_dm9000_rsrc),
178}; 182};
179 183
184static struct tvp514x_platform_data tvp5146_pdata = {
185 .clk_polarity = 0,
186 .hs_polarity = 1,
187 .vs_polarity = 1
188};
189
190#define TVP514X_STD_ALL (V4L2_STD_NTSC | V4L2_STD_PAL)
191/* Inputs available at the TVP5146 */
192static struct v4l2_input tvp5146_inputs[] = {
193 {
194 .index = 0,
195 .name = "Composite",
196 .type = V4L2_INPUT_TYPE_CAMERA,
197 .std = TVP514X_STD_ALL,
198 },
199 {
200 .index = 1,
201 .name = "S-Video",
202 .type = V4L2_INPUT_TYPE_CAMERA,
203 .std = TVP514X_STD_ALL,
204 },
205};
206
207/*
208 * this is the route info for connecting each input to decoder
209 * ouput that goes to vpfe. There is a one to one correspondence
210 * with tvp5146_inputs
211 */
212static struct vpfe_route tvp5146_routes[] = {
213 {
214 .input = INPUT_CVBS_VI2B,
215 .output = OUTPUT_10BIT_422_EMBEDDED_SYNC,
216 },
217 {
218 .input = INPUT_SVIDEO_VI2C_VI1C,
219 .output = OUTPUT_10BIT_422_EMBEDDED_SYNC,
220 },
221};
222
223static struct vpfe_subdev_info vpfe_sub_devs[] = {
224 {
225 .name = "tvp5146",
226 .grp_id = 0,
227 .num_inputs = ARRAY_SIZE(tvp5146_inputs),
228 .inputs = tvp5146_inputs,
229 .routes = tvp5146_routes,
230 .can_route = 1,
231 .ccdc_if_params = {
232 .if_type = VPFE_BT656,
233 .hdpol = VPFE_PINPOL_POSITIVE,
234 .vdpol = VPFE_PINPOL_POSITIVE,
235 },
236 .board_info = {
237 I2C_BOARD_INFO("tvp5146", 0x5d),
238 .platform_data = &tvp5146_pdata,
239 },
240 }
241};
242
243static struct vpfe_config vpfe_cfg = {
244 .num_subdevs = ARRAY_SIZE(vpfe_sub_devs),
245 .sub_devs = vpfe_sub_devs,
246 .card_name = "DM355 EVM",
247 .ccdc = "DM355 CCDC",
248};
249
180static struct platform_device *davinci_evm_devices[] __initdata = { 250static struct platform_device *davinci_evm_devices[] __initdata = {
181 &dm355evm_dm9000, 251 &dm355evm_dm9000,
182 &davinci_nand_device, 252 &davinci_nand_device,
@@ -188,6 +258,8 @@ static struct davinci_uart_config uart_config __initdata = {
188 258
189static void __init dm355_evm_map_io(void) 259static void __init dm355_evm_map_io(void)
190{ 260{
261 /* setup input configuration for VPFE input devices */
262 dm355_set_vpfe_config(&vpfe_cfg);
191 dm355_init(); 263 dm355_init();
192} 264}
193 265
@@ -279,6 +351,9 @@ static __init void dm355_evm_init(void)
279 351
280 dm355_init_spi0(BIT(0), dm355_evm_spi_info, 352 dm355_init_spi0(BIT(0), dm355_evm_spi_info,
281 ARRAY_SIZE(dm355_evm_spi_info)); 353 ARRAY_SIZE(dm355_evm_spi_info));
354
355 /* DM335 EVM uses ASP1; line-out is a stereo mini-jack */
356 dm355_init_asp1(ASP1_TX_EVT_EN | ASP1_RX_EVT_EN, &dm355_evm_snd_data);
282} 357}
283 358
284static __init void dm355_evm_irq_init(void) 359static __init void dm355_evm_irq_init(void)
diff --git a/arch/arm/mach-davinci/board-dm365-evm.c b/arch/arm/mach-davinci/board-dm365-evm.c
new file mode 100644
index 000000000000..a1d5e7dac741
--- /dev/null
+++ b/arch/arm/mach-davinci/board-dm365-evm.c
@@ -0,0 +1,492 @@
1/*
2 * TI DaVinci DM365 EVM board support
3 *
4 * Copyright (C) 2009 Texas Instruments Incorporated
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation version 2.
9 *
10 * This program is distributed "as is" WITHOUT ANY WARRANTY of any
11 * kind, whether express or implied; without even the implied warranty
12 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15#include <linux/kernel.h>
16#include <linux/module.h>
17#include <linux/init.h>
18#include <linux/dma-mapping.h>
19#include <linux/i2c.h>
20#include <linux/io.h>
21#include <linux/clk.h>
22#include <linux/i2c/at24.h>
23#include <linux/leds.h>
24#include <linux/mtd/mtd.h>
25#include <linux/mtd/partitions.h>
26#include <linux/mtd/nand.h>
27#include <asm/setup.h>
28#include <asm/mach-types.h>
29#include <asm/mach/arch.h>
30#include <asm/mach/map.h>
31#include <mach/mux.h>
32#include <mach/hardware.h>
33#include <mach/dm365.h>
34#include <mach/psc.h>
35#include <mach/common.h>
36#include <mach/i2c.h>
37#include <mach/serial.h>
38#include <mach/common.h>
39#include <mach/mmc.h>
40#include <mach/nand.h>
41
42
43static inline int have_imager(void)
44{
45 /* REVISIT when it's supported, trigger via Kconfig */
46 return 0;
47}
48
49static inline int have_tvp7002(void)
50{
51 /* REVISIT when it's supported, trigger via Kconfig */
52 return 0;
53}
54
55
56#define DM365_ASYNC_EMIF_CONTROL_BASE 0x01d10000
57#define DM365_ASYNC_EMIF_DATA_CE0_BASE 0x02000000
58#define DM365_ASYNC_EMIF_DATA_CE1_BASE 0x04000000
59
60#define DM365_EVM_PHY_MASK (0x2)
61#define DM365_EVM_MDIO_FREQUENCY (2200000) /* PHY bus frequency */
62
63/*
64 * A MAX-II CPLD is used for various board control functions.
65 */
66#define CPLD_OFFSET(a13a8,a2a1) (((a13a8) << 10) + ((a2a1) << 3))
67
68#define CPLD_VERSION CPLD_OFFSET(0,0) /* r/o */
69#define CPLD_TEST CPLD_OFFSET(0,1)
70#define CPLD_LEDS CPLD_OFFSET(0,2)
71#define CPLD_MUX CPLD_OFFSET(0,3)
72#define CPLD_SWITCH CPLD_OFFSET(1,0) /* r/o */
73#define CPLD_POWER CPLD_OFFSET(1,1)
74#define CPLD_VIDEO CPLD_OFFSET(1,2)
75#define CPLD_CARDSTAT CPLD_OFFSET(1,3) /* r/o */
76
77#define CPLD_DILC_OUT CPLD_OFFSET(2,0)
78#define CPLD_DILC_IN CPLD_OFFSET(2,1) /* r/o */
79
80#define CPLD_IMG_DIR0 CPLD_OFFSET(2,2)
81#define CPLD_IMG_MUX0 CPLD_OFFSET(2,3)
82#define CPLD_IMG_MUX1 CPLD_OFFSET(3,0)
83#define CPLD_IMG_DIR1 CPLD_OFFSET(3,1)
84#define CPLD_IMG_MUX2 CPLD_OFFSET(3,2)
85#define CPLD_IMG_MUX3 CPLD_OFFSET(3,3)
86#define CPLD_IMG_DIR2 CPLD_OFFSET(4,0)
87#define CPLD_IMG_MUX4 CPLD_OFFSET(4,1)
88#define CPLD_IMG_MUX5 CPLD_OFFSET(4,2)
89
90#define CPLD_RESETS CPLD_OFFSET(4,3)
91
92#define CPLD_CCD_DIR1 CPLD_OFFSET(0x3e,0)
93#define CPLD_CCD_IO1 CPLD_OFFSET(0x3e,1)
94#define CPLD_CCD_DIR2 CPLD_OFFSET(0x3e,2)
95#define CPLD_CCD_IO2 CPLD_OFFSET(0x3e,3)
96#define CPLD_CCD_DIR3 CPLD_OFFSET(0x3f,0)
97#define CPLD_CCD_IO3 CPLD_OFFSET(0x3f,1)
98
99static void __iomem *cpld;
100
101
102/* NOTE: this is geared for the standard config, with a socketed
103 * 2 GByte Micron NAND (MT29F16G08FAA) using 128KB sectors. If you
104 * swap chips with a different block size, partitioning will
105 * need to be changed. This NAND chip MT29F16G08FAA is the default
106 * NAND shipped with the Spectrum Digital DM365 EVM
107 */
108#define NAND_BLOCK_SIZE SZ_128K
109
110static struct mtd_partition davinci_nand_partitions[] = {
111 {
112 /* UBL (a few copies) plus U-Boot */
113 .name = "bootloader",
114 .offset = 0,
115 .size = 28 * NAND_BLOCK_SIZE,
116 .mask_flags = MTD_WRITEABLE, /* force read-only */
117 }, {
118 /* U-Boot environment */
119 .name = "params",
120 .offset = MTDPART_OFS_APPEND,
121 .size = 2 * NAND_BLOCK_SIZE,
122 .mask_flags = 0,
123 }, {
124 .name = "kernel",
125 .offset = MTDPART_OFS_APPEND,
126 .size = SZ_4M,
127 .mask_flags = 0,
128 }, {
129 .name = "filesystem1",
130 .offset = MTDPART_OFS_APPEND,
131 .size = SZ_512M,
132 .mask_flags = 0,
133 }, {
134 .name = "filesystem2",
135 .offset = MTDPART_OFS_APPEND,
136 .size = MTDPART_SIZ_FULL,
137 .mask_flags = 0,
138 }
139 /* two blocks with bad block table (and mirror) at the end */
140};
141
142static struct davinci_nand_pdata davinci_nand_data = {
143 .mask_chipsel = BIT(14),
144 .parts = davinci_nand_partitions,
145 .nr_parts = ARRAY_SIZE(davinci_nand_partitions),
146 .ecc_mode = NAND_ECC_HW,
147 .options = NAND_USE_FLASH_BBT,
148};
149
150static struct resource davinci_nand_resources[] = {
151 {
152 .start = DM365_ASYNC_EMIF_DATA_CE0_BASE,
153 .end = DM365_ASYNC_EMIF_DATA_CE0_BASE + SZ_32M - 1,
154 .flags = IORESOURCE_MEM,
155 }, {
156 .start = DM365_ASYNC_EMIF_CONTROL_BASE,
157 .end = DM365_ASYNC_EMIF_CONTROL_BASE + SZ_4K - 1,
158 .flags = IORESOURCE_MEM,
159 },
160};
161
162static struct platform_device davinci_nand_device = {
163 .name = "davinci_nand",
164 .id = 0,
165 .num_resources = ARRAY_SIZE(davinci_nand_resources),
166 .resource = davinci_nand_resources,
167 .dev = {
168 .platform_data = &davinci_nand_data,
169 },
170};
171
172static struct at24_platform_data eeprom_info = {
173 .byte_len = (256*1024) / 8,
174 .page_size = 64,
175 .flags = AT24_FLAG_ADDR16,
176 .setup = davinci_get_mac_addr,
177 .context = (void *)0x7f00,
178};
179
180static struct i2c_board_info i2c_info[] = {
181 {
182 I2C_BOARD_INFO("24c256", 0x50),
183 .platform_data = &eeprom_info,
184 },
185};
186
187static struct davinci_i2c_platform_data i2c_pdata = {
188 .bus_freq = 400 /* kHz */,
189 .bus_delay = 0 /* usec */,
190};
191
192static int cpld_mmc_get_cd(int module)
193{
194 if (!cpld)
195 return -ENXIO;
196
197 /* low == card present */
198 return !(__raw_readb(cpld + CPLD_CARDSTAT) & BIT(module ? 4 : 0));
199}
200
201static int cpld_mmc_get_ro(int module)
202{
203 if (!cpld)
204 return -ENXIO;
205
206 /* high == card's write protect switch active */
207 return !!(__raw_readb(cpld + CPLD_CARDSTAT) & BIT(module ? 5 : 1));
208}
209
210static struct davinci_mmc_config dm365evm_mmc_config = {
211 .get_cd = cpld_mmc_get_cd,
212 .get_ro = cpld_mmc_get_ro,
213 .wires = 4,
214 .max_freq = 50000000,
215 .caps = MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED,
216 .version = MMC_CTLR_VERSION_2,
217};
218
219static void dm365evm_emac_configure(void)
220{
221 /*
222 * EMAC pins are multiplexed with GPIO and UART
223 * Further details are available at the DM365 ARM
224 * Subsystem Users Guide(sprufg5.pdf) pages 125 - 127
225 */
226 davinci_cfg_reg(DM365_EMAC_TX_EN);
227 davinci_cfg_reg(DM365_EMAC_TX_CLK);
228 davinci_cfg_reg(DM365_EMAC_COL);
229 davinci_cfg_reg(DM365_EMAC_TXD3);
230 davinci_cfg_reg(DM365_EMAC_TXD2);
231 davinci_cfg_reg(DM365_EMAC_TXD1);
232 davinci_cfg_reg(DM365_EMAC_TXD0);
233 davinci_cfg_reg(DM365_EMAC_RXD3);
234 davinci_cfg_reg(DM365_EMAC_RXD2);
235 davinci_cfg_reg(DM365_EMAC_RXD1);
236 davinci_cfg_reg(DM365_EMAC_RXD0);
237 davinci_cfg_reg(DM365_EMAC_RX_CLK);
238 davinci_cfg_reg(DM365_EMAC_RX_DV);
239 davinci_cfg_reg(DM365_EMAC_RX_ER);
240 davinci_cfg_reg(DM365_EMAC_CRS);
241 davinci_cfg_reg(DM365_EMAC_MDIO);
242 davinci_cfg_reg(DM365_EMAC_MDCLK);
243
244 /*
245 * EMAC interrupts are multiplexed with GPIO interrupts
246 * Details are available at the DM365 ARM
247 * Subsystem Users Guide(sprufg5.pdf) pages 133 - 134
248 */
249 davinci_cfg_reg(DM365_INT_EMAC_RXTHRESH);
250 davinci_cfg_reg(DM365_INT_EMAC_RXPULSE);
251 davinci_cfg_reg(DM365_INT_EMAC_TXPULSE);
252 davinci_cfg_reg(DM365_INT_EMAC_MISCPULSE);
253}
254
255static void dm365evm_mmc_configure(void)
256{
257 /*
258 * MMC/SD pins are multiplexed with GPIO and EMIF
259 * Further details are available at the DM365 ARM
260 * Subsystem Users Guide(sprufg5.pdf) pages 118, 128 - 131
261 */
262 davinci_cfg_reg(DM365_SD1_CLK);
263 davinci_cfg_reg(DM365_SD1_CMD);
264 davinci_cfg_reg(DM365_SD1_DATA3);
265 davinci_cfg_reg(DM365_SD1_DATA2);
266 davinci_cfg_reg(DM365_SD1_DATA1);
267 davinci_cfg_reg(DM365_SD1_DATA0);
268}
269
270static void __init evm_init_i2c(void)
271{
272 davinci_init_i2c(&i2c_pdata);
273 i2c_register_board_info(1, i2c_info, ARRAY_SIZE(i2c_info));
274}
275
276static struct platform_device *dm365_evm_nand_devices[] __initdata = {
277 &davinci_nand_device,
278};
279
280static inline int have_leds(void)
281{
282#ifdef CONFIG_LEDS_CLASS
283 return 1;
284#else
285 return 0;
286#endif
287}
288
289struct cpld_led {
290 struct led_classdev cdev;
291 u8 mask;
292};
293
294static const struct {
295 const char *name;
296 const char *trigger;
297} cpld_leds[] = {
298 { "dm365evm::ds2", },
299 { "dm365evm::ds3", },
300 { "dm365evm::ds4", },
301 { "dm365evm::ds5", },
302 { "dm365evm::ds6", "nand-disk", },
303 { "dm365evm::ds7", "mmc1", },
304 { "dm365evm::ds8", "mmc0", },
305 { "dm365evm::ds9", "heartbeat", },
306};
307
308static void cpld_led_set(struct led_classdev *cdev, enum led_brightness b)
309{
310 struct cpld_led *led = container_of(cdev, struct cpld_led, cdev);
311 u8 reg = __raw_readb(cpld + CPLD_LEDS);
312
313 if (b != LED_OFF)
314 reg &= ~led->mask;
315 else
316 reg |= led->mask;
317 __raw_writeb(reg, cpld + CPLD_LEDS);
318}
319
320static enum led_brightness cpld_led_get(struct led_classdev *cdev)
321{
322 struct cpld_led *led = container_of(cdev, struct cpld_led, cdev);
323 u8 reg = __raw_readb(cpld + CPLD_LEDS);
324
325 return (reg & led->mask) ? LED_OFF : LED_FULL;
326}
327
328static int __init cpld_leds_init(void)
329{
330 int i;
331
332 if (!have_leds() || !cpld)
333 return 0;
334
335 /* setup LEDs */
336 __raw_writeb(0xff, cpld + CPLD_LEDS);
337 for (i = 0; i < ARRAY_SIZE(cpld_leds); i++) {
338 struct cpld_led *led;
339
340 led = kzalloc(sizeof(*led), GFP_KERNEL);
341 if (!led)
342 break;
343
344 led->cdev.name = cpld_leds[i].name;
345 led->cdev.brightness_set = cpld_led_set;
346 led->cdev.brightness_get = cpld_led_get;
347 led->cdev.default_trigger = cpld_leds[i].trigger;
348 led->mask = BIT(i);
349
350 if (led_classdev_register(NULL, &led->cdev) < 0) {
351 kfree(led);
352 break;
353 }
354 }
355
356 return 0;
357}
358/* run after subsys_initcall() for LEDs */
359fs_initcall(cpld_leds_init);
360
361
362static void __init evm_init_cpld(void)
363{
364 u8 mux, resets;
365 const char *label;
366 struct clk *aemif_clk;
367
368 /* Make sure we can configure the CPLD through CS1. Then
369 * leave it on for later access to MMC and LED registers.
370 */
371 aemif_clk = clk_get(NULL, "aemif");
372 if (IS_ERR(aemif_clk))
373 return;
374 clk_enable(aemif_clk);
375
376 if (request_mem_region(DM365_ASYNC_EMIF_DATA_CE1_BASE, SECTION_SIZE,
377 "cpld") == NULL)
378 goto fail;
379 cpld = ioremap(DM365_ASYNC_EMIF_DATA_CE1_BASE, SECTION_SIZE);
380 if (!cpld) {
381 release_mem_region(DM365_ASYNC_EMIF_DATA_CE1_BASE,
382 SECTION_SIZE);
383fail:
384 pr_err("ERROR: can't map CPLD\n");
385 clk_disable(aemif_clk);
386 return;
387 }
388
389 /* External muxing for some signals */
390 mux = 0;
391
392 /* Read SW5 to set up NAND + keypad _or_ OneNAND (sync read).
393 * NOTE: SW4 bus width setting must match!
394 */
395 if ((__raw_readb(cpld + CPLD_SWITCH) & BIT(5)) == 0) {
396 /* external keypad mux */
397 mux |= BIT(7);
398
399 platform_add_devices(dm365_evm_nand_devices,
400 ARRAY_SIZE(dm365_evm_nand_devices));
401 } else {
402 /* no OneNAND support yet */
403 }
404
405 /* Leave external chips in reset when unused. */
406 resets = BIT(3) | BIT(2) | BIT(1) | BIT(0);
407
408 /* Static video input config with SN74CBT16214 1-of-3 mux:
409 * - port b1 == tvp7002 (mux lowbits == 1 or 6)
410 * - port b2 == imager (mux lowbits == 2 or 7)
411 * - port b3 == tvp5146 (mux lowbits == 5)
412 *
413 * Runtime switching could work too, with limitations.
414 */
415 if (have_imager()) {
416 label = "HD imager";
417 mux |= 1;
418
419 /* externally mux MMC1/ENET/AIC33 to imager */
420 mux |= BIT(6) | BIT(5) | BIT(3);
421 } else {
422 struct davinci_soc_info *soc_info = &davinci_soc_info;
423
424 /* we can use MMC1 ... */
425 dm365evm_mmc_configure();
426 davinci_setup_mmc(1, &dm365evm_mmc_config);
427
428 /* ... and ENET ... */
429 dm365evm_emac_configure();
430 soc_info->emac_pdata->phy_mask = DM365_EVM_PHY_MASK;
431 soc_info->emac_pdata->mdio_max_freq = DM365_EVM_MDIO_FREQUENCY;
432 resets &= ~BIT(3);
433
434 /* ... and AIC33 */
435 resets &= ~BIT(1);
436
437 if (have_tvp7002()) {
438 mux |= 2;
439 resets &= ~BIT(2);
440 label = "tvp7002 HD";
441 } else {
442 /* default to tvp5146 */
443 mux |= 5;
444 resets &= ~BIT(0);
445 label = "tvp5146 SD";
446 }
447 }
448 __raw_writeb(mux, cpld + CPLD_MUX);
449 __raw_writeb(resets, cpld + CPLD_RESETS);
450 pr_info("EVM: %s video input\n", label);
451
452 /* REVISIT export switches: NTSC/PAL (SW5.6), EXTRA1 (SW5.2), etc */
453}
454
455static struct davinci_uart_config uart_config __initdata = {
456 .enabled_uarts = (1 << 0),
457};
458
459static void __init dm365_evm_map_io(void)
460{
461 dm365_init();
462}
463
464static __init void dm365_evm_init(void)
465{
466 evm_init_i2c();
467 davinci_serial_init(&uart_config);
468
469 dm365evm_emac_configure();
470 dm365evm_mmc_configure();
471
472 davinci_setup_mmc(0, &dm365evm_mmc_config);
473
474 /* maybe setup mmc1/etc ... _after_ mmc0 */
475 evm_init_cpld();
476}
477
478static __init void dm365_evm_irq_init(void)
479{
480 davinci_irq_init();
481}
482
483MACHINE_START(DAVINCI_DM365_EVM, "DaVinci DM365 EVM")
484 .phys_io = IO_PHYS,
485 .io_pg_offst = (__IO_ADDRESS(IO_PHYS) >> 18) & 0xfffc,
486 .boot_params = (0x80000100),
487 .map_io = dm365_evm_map_io,
488 .init_irq = dm365_evm_irq_init,
489 .timer = &davinci_timer,
490 .init_machine = dm365_evm_init,
491MACHINE_END
492
diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c
index 56c8cd01de9a..1213a0087ad4 100644
--- a/arch/arm/mach-davinci/board-dm644x-evm.c
+++ b/arch/arm/mach-davinci/board-dm644x-evm.c
@@ -28,6 +28,9 @@
28#include <linux/io.h> 28#include <linux/io.h>
29#include <linux/phy.h> 29#include <linux/phy.h>
30#include <linux/clk.h> 30#include <linux/clk.h>
31#include <linux/videodev2.h>
32
33#include <media/tvp514x.h>
31 34
32#include <asm/setup.h> 35#include <asm/setup.h>
33#include <asm/mach-types.h> 36#include <asm/mach-types.h>
@@ -194,6 +197,72 @@ static struct platform_device davinci_fb_device = {
194 .num_resources = 0, 197 .num_resources = 0,
195}; 198};
196 199
200static struct tvp514x_platform_data tvp5146_pdata = {
201 .clk_polarity = 0,
202 .hs_polarity = 1,
203 .vs_polarity = 1
204};
205
206#define TVP514X_STD_ALL (V4L2_STD_NTSC | V4L2_STD_PAL)
207/* Inputs available at the TVP5146 */
208static struct v4l2_input tvp5146_inputs[] = {
209 {
210 .index = 0,
211 .name = "Composite",
212 .type = V4L2_INPUT_TYPE_CAMERA,
213 .std = TVP514X_STD_ALL,
214 },
215 {
216 .index = 1,
217 .name = "S-Video",
218 .type = V4L2_INPUT_TYPE_CAMERA,
219 .std = TVP514X_STD_ALL,
220 },
221};
222
223/*
224 * this is the route info for connecting each input to decoder
225 * ouput that goes to vpfe. There is a one to one correspondence
226 * with tvp5146_inputs
227 */
228static struct vpfe_route tvp5146_routes[] = {
229 {
230 .input = INPUT_CVBS_VI2B,
231 .output = OUTPUT_10BIT_422_EMBEDDED_SYNC,
232 },
233 {
234 .input = INPUT_SVIDEO_VI2C_VI1C,
235 .output = OUTPUT_10BIT_422_EMBEDDED_SYNC,
236 },
237};
238
239static struct vpfe_subdev_info vpfe_sub_devs[] = {
240 {
241 .name = "tvp5146",
242 .grp_id = 0,
243 .num_inputs = ARRAY_SIZE(tvp5146_inputs),
244 .inputs = tvp5146_inputs,
245 .routes = tvp5146_routes,
246 .can_route = 1,
247 .ccdc_if_params = {
248 .if_type = VPFE_BT656,
249 .hdpol = VPFE_PINPOL_POSITIVE,
250 .vdpol = VPFE_PINPOL_POSITIVE,
251 },
252 .board_info = {
253 I2C_BOARD_INFO("tvp5146", 0x5d),
254 .platform_data = &tvp5146_pdata,
255 },
256 },
257};
258
259static struct vpfe_config vpfe_cfg = {
260 .num_subdevs = ARRAY_SIZE(vpfe_sub_devs),
261 .sub_devs = vpfe_sub_devs,
262 .card_name = "DM6446 EVM",
263 .ccdc = "DM6446 CCDC",
264};
265
197static struct platform_device rtc_dev = { 266static struct platform_device rtc_dev = {
198 .name = "rtc_davinci_evm", 267 .name = "rtc_davinci_evm",
199 .id = -1, 268 .id = -1,
@@ -225,6 +294,8 @@ static struct platform_device ide_dev = {
225 }, 294 },
226}; 295};
227 296
297static struct snd_platform_data dm644x_evm_snd_data;
298
228/*----------------------------------------------------------------------*/ 299/*----------------------------------------------------------------------*/
229 300
230/* 301/*
@@ -557,10 +628,9 @@ static struct i2c_board_info __initdata i2c_info[] = {
557 I2C_BOARD_INFO("24c256", 0x50), 628 I2C_BOARD_INFO("24c256", 0x50),
558 .platform_data = &eeprom_info, 629 .platform_data = &eeprom_info,
559 }, 630 },
560 /* ALSO: 631 {
561 * - tvl320aic33 audio codec (0x1b) 632 I2C_BOARD_INFO("tlv320aic33", 0x1b),
562 * - tvp5146 video decoder (0x5d) 633 },
563 */
564}; 634};
565 635
566/* The msp430 uses a slow bitbanged I2C implementation (ergo 20 KHz), 636/* The msp430 uses a slow bitbanged I2C implementation (ergo 20 KHz),
@@ -590,6 +660,8 @@ static struct davinci_uart_config uart_config __initdata = {
590static void __init 660static void __init
591davinci_evm_map_io(void) 661davinci_evm_map_io(void)
592{ 662{
663 /* setup input configuration for VPFE input devices */
664 dm644x_set_vpfe_config(&vpfe_cfg);
593 dm644x_init(); 665 dm644x_init();
594} 666}
595 667
@@ -666,6 +738,7 @@ static __init void davinci_evm_init(void)
666 davinci_setup_mmc(0, &dm6446evm_mmc_config); 738 davinci_setup_mmc(0, &dm6446evm_mmc_config);
667 739
668 davinci_serial_init(&uart_config); 740 davinci_serial_init(&uart_config);
741 dm644x_init_asp(&dm644x_evm_snd_data);
669 742
670 soc_info->emac_pdata->phy_mask = DM644X_EVM_PHY_MASK; 743 soc_info->emac_pdata->phy_mask = DM644X_EVM_PHY_MASK;
671 soc_info->emac_pdata->mdio_max_freq = DM644X_EVM_MDIO_FREQUENCY; 744 soc_info->emac_pdata->mdio_max_freq = DM644X_EVM_MDIO_FREQUENCY;
diff --git a/arch/arm/mach-davinci/board-dm646x-evm.c b/arch/arm/mach-davinci/board-dm646x-evm.c
index 8657e72debc1..24e0e13b1492 100644
--- a/arch/arm/mach-davinci/board-dm646x-evm.c
+++ b/arch/arm/mach-davinci/board-dm646x-evm.c
@@ -34,6 +34,8 @@
34#include <linux/i2c/pcf857x.h> 34#include <linux/i2c/pcf857x.h>
35#include <linux/etherdevice.h> 35#include <linux/etherdevice.h>
36 36
37#include <media/tvp514x.h>
38
37#include <asm/setup.h> 39#include <asm/setup.h>
38#include <asm/mach-types.h> 40#include <asm/mach-types.h>
39#include <asm/mach/arch.h> 41#include <asm/mach/arch.h>
@@ -48,13 +50,89 @@
48#include <mach/mmc.h> 50#include <mach/mmc.h>
49#include <mach/emac.h> 51#include <mach/emac.h>
50 52
53#if defined(CONFIG_BLK_DEV_PALMCHIP_BK3710) || \
54 defined(CONFIG_BLK_DEV_PALMCHIP_BK3710_MODULE)
55#define HAS_ATA 1
56#else
57#define HAS_ATA 0
58#endif
59
60/* CPLD Register 0 bits to control ATA */
61#define DM646X_EVM_ATA_RST BIT(0)
62#define DM646X_EVM_ATA_PWD BIT(1)
63
51#define DM646X_EVM_PHY_MASK (0x2) 64#define DM646X_EVM_PHY_MASK (0x2)
52#define DM646X_EVM_MDIO_FREQUENCY (2200000) /* PHY bus frequency */ 65#define DM646X_EVM_MDIO_FREQUENCY (2200000) /* PHY bus frequency */
53 66
67#define VIDCLKCTL_OFFSET (DAVINCI_SYSTEM_MODULE_BASE + 0x38)
68#define VSCLKDIS_OFFSET (DAVINCI_SYSTEM_MODULE_BASE + 0x6c)
69#define VCH2CLK_MASK (BIT_MASK(10) | BIT_MASK(9) | BIT_MASK(8))
70#define VCH2CLK_SYSCLK8 (BIT(9))
71#define VCH2CLK_AUXCLK (BIT(9) | BIT(8))
72#define VCH3CLK_MASK (BIT_MASK(14) | BIT_MASK(13) | BIT_MASK(12))
73#define VCH3CLK_SYSCLK8 (BIT(13))
74#define VCH3CLK_AUXCLK (BIT(14) | BIT(13))
75
76#define VIDCH2CLK (BIT(10))
77#define VIDCH3CLK (BIT(11))
78#define VIDCH1CLK (BIT(4))
79#define TVP7002_INPUT (BIT(4))
80#define TVP5147_INPUT (~BIT(4))
81#define VPIF_INPUT_ONE_CHANNEL (BIT(5))
82#define VPIF_INPUT_TWO_CHANNEL (~BIT(5))
83#define TVP5147_CH0 "tvp514x-0"
84#define TVP5147_CH1 "tvp514x-1"
85
86static void __iomem *vpif_vidclkctl_reg;
87static void __iomem *vpif_vsclkdis_reg;
88/* spin lock for updating above registers */
89static spinlock_t vpif_reg_lock;
90
54static struct davinci_uart_config uart_config __initdata = { 91static struct davinci_uart_config uart_config __initdata = {
55 .enabled_uarts = (1 << 0), 92 .enabled_uarts = (1 << 0),
56}; 93};
57 94
95/* CPLD Register 0 Client: used for I/O Control */
96static int cpld_reg0_probe(struct i2c_client *client,
97 const struct i2c_device_id *id)
98{
99 if (HAS_ATA) {
100 u8 data;
101 struct i2c_msg msg[2] = {
102 {
103 .addr = client->addr,
104 .flags = I2C_M_RD,
105 .len = 1,
106 .buf = &data,
107 },
108 {
109 .addr = client->addr,
110 .flags = 0,
111 .len = 1,
112 .buf = &data,
113 },
114 };
115
116 /* Clear ATA_RSTn and ATA_PWD bits to enable ATA operation. */
117 i2c_transfer(client->adapter, msg, 1);
118 data &= ~(DM646X_EVM_ATA_RST | DM646X_EVM_ATA_PWD);
119 i2c_transfer(client->adapter, msg + 1, 1);
120 }
121
122 return 0;
123}
124
125static const struct i2c_device_id cpld_reg_ids[] = {
126 { "cpld_reg0", 0, },
127 { },
128};
129
130static struct i2c_driver dm6467evm_cpld_driver = {
131 .driver.name = "cpld_reg0",
132 .id_table = cpld_reg_ids,
133 .probe = cpld_reg0_probe,
134};
135
58/* LEDS */ 136/* LEDS */
59 137
60static struct gpio_led evm_leds[] = { 138static struct gpio_led evm_leds[] = {
@@ -206,6 +284,69 @@ static struct at24_platform_data eeprom_info = {
206 .context = (void *)0x7f00, 284 .context = (void *)0x7f00,
207}; 285};
208 286
287static u8 dm646x_iis_serializer_direction[] = {
288 TX_MODE, RX_MODE, INACTIVE_MODE, INACTIVE_MODE,
289};
290
291static u8 dm646x_dit_serializer_direction[] = {
292 TX_MODE,
293};
294
295static struct snd_platform_data dm646x_evm_snd_data[] = {
296 {
297 .tx_dma_offset = 0x400,
298 .rx_dma_offset = 0x400,
299 .op_mode = DAVINCI_MCASP_IIS_MODE,
300 .num_serializer = ARRAY_SIZE(dm646x_iis_serializer_direction),
301 .tdm_slots = 2,
302 .serial_dir = dm646x_iis_serializer_direction,
303 .eventq_no = EVENTQ_0,
304 },
305 {
306 .tx_dma_offset = 0x400,
307 .rx_dma_offset = 0,
308 .op_mode = DAVINCI_MCASP_DIT_MODE,
309 .num_serializer = ARRAY_SIZE(dm646x_dit_serializer_direction),
310 .tdm_slots = 32,
311 .serial_dir = dm646x_dit_serializer_direction,
312 .eventq_no = EVENTQ_0,
313 },
314};
315
316static struct i2c_client *cpld_client;
317
318static int cpld_video_probe(struct i2c_client *client,
319 const struct i2c_device_id *id)
320{
321 cpld_client = client;
322 return 0;
323}
324
325static int __devexit cpld_video_remove(struct i2c_client *client)
326{
327 cpld_client = NULL;
328 return 0;
329}
330
331static const struct i2c_device_id cpld_video_id[] = {
332 { "cpld_video", 0 },
333 { }
334};
335
336static struct i2c_driver cpld_video_driver = {
337 .driver = {
338 .name = "cpld_video",
339 },
340 .probe = cpld_video_probe,
341 .remove = cpld_video_remove,
342 .id_table = cpld_video_id,
343};
344
345static void evm_init_cpld(void)
346{
347 i2c_add_driver(&cpld_video_driver);
348}
349
209static struct i2c_board_info __initdata i2c_info[] = { 350static struct i2c_board_info __initdata i2c_info[] = {
210 { 351 {
211 I2C_BOARD_INFO("24c256", 0x50), 352 I2C_BOARD_INFO("24c256", 0x50),
@@ -215,6 +356,15 @@ static struct i2c_board_info __initdata i2c_info[] = {
215 I2C_BOARD_INFO("pcf8574a", 0x38), 356 I2C_BOARD_INFO("pcf8574a", 0x38),
216 .platform_data = &pcf_data, 357 .platform_data = &pcf_data,
217 }, 358 },
359 {
360 I2C_BOARD_INFO("cpld_reg0", 0x3a),
361 },
362 {
363 I2C_BOARD_INFO("tlv320aic33", 0x18),
364 },
365 {
366 I2C_BOARD_INFO("cpld_video", 0x3b),
367 },
218}; 368};
219 369
220static struct davinci_i2c_platform_data i2c_pdata = { 370static struct davinci_i2c_platform_data i2c_pdata = {
@@ -222,10 +372,265 @@ static struct davinci_i2c_platform_data i2c_pdata = {
222 .bus_delay = 0 /* usec */, 372 .bus_delay = 0 /* usec */,
223}; 373};
224 374
375static int set_vpif_clock(int mux_mode, int hd)
376{
377 unsigned long flags;
378 unsigned int value;
379 int val = 0;
380 int err = 0;
381
382 if (!vpif_vidclkctl_reg || !vpif_vsclkdis_reg || !cpld_client)
383 return -ENXIO;
384
385 /* disable the clock */
386 spin_lock_irqsave(&vpif_reg_lock, flags);
387 value = __raw_readl(vpif_vsclkdis_reg);
388 value |= (VIDCH3CLK | VIDCH2CLK);
389 __raw_writel(value, vpif_vsclkdis_reg);
390 spin_unlock_irqrestore(&vpif_reg_lock, flags);
391
392 val = i2c_smbus_read_byte(cpld_client);
393 if (val < 0)
394 return val;
395
396 if (mux_mode == 1)
397 val &= ~0x40;
398 else
399 val |= 0x40;
400
401 err = i2c_smbus_write_byte(cpld_client, val);
402 if (err)
403 return err;
404
405 value = __raw_readl(vpif_vidclkctl_reg);
406 value &= ~(VCH2CLK_MASK);
407 value &= ~(VCH3CLK_MASK);
408
409 if (hd >= 1)
410 value |= (VCH2CLK_SYSCLK8 | VCH3CLK_SYSCLK8);
411 else
412 value |= (VCH2CLK_AUXCLK | VCH3CLK_AUXCLK);
413
414 __raw_writel(value, vpif_vidclkctl_reg);
415
416 spin_lock_irqsave(&vpif_reg_lock, flags);
417 value = __raw_readl(vpif_vsclkdis_reg);
418 /* enable the clock */
419 value &= ~(VIDCH3CLK | VIDCH2CLK);
420 __raw_writel(value, vpif_vsclkdis_reg);
421 spin_unlock_irqrestore(&vpif_reg_lock, flags);
422
423 return 0;
424}
425
426static struct vpif_subdev_info dm646x_vpif_subdev[] = {
427 {
428 .name = "adv7343",
429 .board_info = {
430 I2C_BOARD_INFO("adv7343", 0x2a),
431 },
432 },
433 {
434 .name = "ths7303",
435 .board_info = {
436 I2C_BOARD_INFO("ths7303", 0x2c),
437 },
438 },
439};
440
441static const char *output[] = {
442 "Composite",
443 "Component",
444 "S-Video",
445};
446
447static struct vpif_display_config dm646x_vpif_display_config = {
448 .set_clock = set_vpif_clock,
449 .subdevinfo = dm646x_vpif_subdev,
450 .subdev_count = ARRAY_SIZE(dm646x_vpif_subdev),
451 .output = output,
452 .output_count = ARRAY_SIZE(output),
453 .card_name = "DM646x EVM",
454};
455
456/**
457 * setup_vpif_input_path()
458 * @channel: channel id (0 - CH0, 1 - CH1)
459 * @sub_dev_name: ptr sub device name
460 *
461 * This will set vpif input to capture data from tvp514x or
462 * tvp7002.
463 */
464static int setup_vpif_input_path(int channel, const char *sub_dev_name)
465{
466 int err = 0;
467 int val;
468
469 /* for channel 1, we don't do anything */
470 if (channel != 0)
471 return 0;
472
473 if (!cpld_client)
474 return -ENXIO;
475
476 val = i2c_smbus_read_byte(cpld_client);
477 if (val < 0)
478 return val;
479
480 if (!strcmp(sub_dev_name, TVP5147_CH0) ||
481 !strcmp(sub_dev_name, TVP5147_CH1))
482 val &= TVP5147_INPUT;
483 else
484 val |= TVP7002_INPUT;
485
486 err = i2c_smbus_write_byte(cpld_client, val);
487 if (err)
488 return err;
489 return 0;
490}
491
492/**
493 * setup_vpif_input_channel_mode()
494 * @mux_mode: mux mode. 0 - 1 channel or (1) - 2 channel
495 *
496 * This will setup input mode to one channel (TVP7002) or 2 channel (TVP5147)
497 */
498static int setup_vpif_input_channel_mode(int mux_mode)
499{
500 unsigned long flags;
501 int err = 0;
502 int val;
503 u32 value;
504
505 if (!vpif_vsclkdis_reg || !cpld_client)
506 return -ENXIO;
507
508 val = i2c_smbus_read_byte(cpld_client);
509 if (val < 0)
510 return val;
511
512 spin_lock_irqsave(&vpif_reg_lock, flags);
513 value = __raw_readl(vpif_vsclkdis_reg);
514 if (mux_mode) {
515 val &= VPIF_INPUT_TWO_CHANNEL;
516 value |= VIDCH1CLK;
517 } else {
518 val |= VPIF_INPUT_ONE_CHANNEL;
519 value &= ~VIDCH1CLK;
520 }
521 __raw_writel(value, vpif_vsclkdis_reg);
522 spin_unlock_irqrestore(&vpif_reg_lock, flags);
523
524 err = i2c_smbus_write_byte(cpld_client, val);
525 if (err)
526 return err;
527
528 return 0;
529}
530
531static struct tvp514x_platform_data tvp5146_pdata = {
532 .clk_polarity = 0,
533 .hs_polarity = 1,
534 .vs_polarity = 1
535};
536
537#define TVP514X_STD_ALL (V4L2_STD_NTSC | V4L2_STD_PAL)
538
539static struct vpif_subdev_info vpif_capture_sdev_info[] = {
540 {
541 .name = TVP5147_CH0,
542 .board_info = {
543 I2C_BOARD_INFO("tvp5146", 0x5d),
544 .platform_data = &tvp5146_pdata,
545 },
546 .input = INPUT_CVBS_VI2B,
547 .output = OUTPUT_10BIT_422_EMBEDDED_SYNC,
548 .can_route = 1,
549 .vpif_if = {
550 .if_type = VPIF_IF_BT656,
551 .hd_pol = 1,
552 .vd_pol = 1,
553 .fid_pol = 0,
554 },
555 },
556 {
557 .name = TVP5147_CH1,
558 .board_info = {
559 I2C_BOARD_INFO("tvp5146", 0x5c),
560 .platform_data = &tvp5146_pdata,
561 },
562 .input = INPUT_SVIDEO_VI2C_VI1C,
563 .output = OUTPUT_10BIT_422_EMBEDDED_SYNC,
564 .can_route = 1,
565 .vpif_if = {
566 .if_type = VPIF_IF_BT656,
567 .hd_pol = 1,
568 .vd_pol = 1,
569 .fid_pol = 0,
570 },
571 },
572};
573
574static const struct vpif_input dm6467_ch0_inputs[] = {
575 {
576 .input = {
577 .index = 0,
578 .name = "Composite",
579 .type = V4L2_INPUT_TYPE_CAMERA,
580 .std = TVP514X_STD_ALL,
581 },
582 .subdev_name = TVP5147_CH0,
583 },
584};
585
586static const struct vpif_input dm6467_ch1_inputs[] = {
587 {
588 .input = {
589 .index = 0,
590 .name = "S-Video",
591 .type = V4L2_INPUT_TYPE_CAMERA,
592 .std = TVP514X_STD_ALL,
593 },
594 .subdev_name = TVP5147_CH1,
595 },
596};
597
598static struct vpif_capture_config dm646x_vpif_capture_cfg = {
599 .setup_input_path = setup_vpif_input_path,
600 .setup_input_channel_mode = setup_vpif_input_channel_mode,
601 .subdev_info = vpif_capture_sdev_info,
602 .subdev_count = ARRAY_SIZE(vpif_capture_sdev_info),
603 .chan_config[0] = {
604 .inputs = dm6467_ch0_inputs,
605 .input_count = ARRAY_SIZE(dm6467_ch0_inputs),
606 },
607 .chan_config[1] = {
608 .inputs = dm6467_ch1_inputs,
609 .input_count = ARRAY_SIZE(dm6467_ch1_inputs),
610 },
611};
612
613static void __init evm_init_video(void)
614{
615 vpif_vidclkctl_reg = ioremap(VIDCLKCTL_OFFSET, 4);
616 vpif_vsclkdis_reg = ioremap(VSCLKDIS_OFFSET, 4);
617 if (!vpif_vidclkctl_reg || !vpif_vsclkdis_reg) {
618 pr_err("Can't map VPIF VIDCLKCTL or VSCLKDIS registers\n");
619 return;
620 }
621 spin_lock_init(&vpif_reg_lock);
622
623 dm646x_setup_vpif(&dm646x_vpif_display_config,
624 &dm646x_vpif_capture_cfg);
625}
626
225static void __init evm_init_i2c(void) 627static void __init evm_init_i2c(void)
226{ 628{
227 davinci_init_i2c(&i2c_pdata); 629 davinci_init_i2c(&i2c_pdata);
630 i2c_add_driver(&dm6467evm_cpld_driver);
228 i2c_register_board_info(1, i2c_info, ARRAY_SIZE(i2c_info)); 631 i2c_register_board_info(1, i2c_info, ARRAY_SIZE(i2c_info));
632 evm_init_cpld();
633 evm_init_video();
229} 634}
230 635
231static void __init davinci_map_io(void) 636static void __init davinci_map_io(void)
@@ -239,6 +644,11 @@ static __init void evm_init(void)
239 644
240 evm_init_i2c(); 645 evm_init_i2c();
241 davinci_serial_init(&uart_config); 646 davinci_serial_init(&uart_config);
647 dm646x_init_mcasp0(&dm646x_evm_snd_data[0]);
648 dm646x_init_mcasp1(&dm646x_evm_snd_data[1]);
649
650 if (HAS_ATA)
651 dm646x_init_ide();
242 652
243 soc_info->emac_pdata->phy_mask = DM646X_EVM_PHY_MASK; 653 soc_info->emac_pdata->phy_mask = DM646X_EVM_PHY_MASK;
244 soc_info->emac_pdata->mdio_max_freq = DM646X_EVM_MDIO_FREQUENCY; 654 soc_info->emac_pdata->mdio_max_freq = DM646X_EVM_MDIO_FREQUENCY;
diff --git a/arch/arm/mach-davinci/clock.c b/arch/arm/mach-davinci/clock.c
index 39bf321d70a2..83d54d50b5ea 100644
--- a/arch/arm/mach-davinci/clock.c
+++ b/arch/arm/mach-davinci/clock.c
@@ -227,7 +227,10 @@ static void __init clk_pll_init(struct clk *clk)
227 if (ctrl & PLLCTL_PLLEN) { 227 if (ctrl & PLLCTL_PLLEN) {
228 bypass = 0; 228 bypass = 0;
229 mult = __raw_readl(pll->base + PLLM); 229 mult = __raw_readl(pll->base + PLLM);
230 mult = (mult & PLLM_PLLM_MASK) + 1; 230 if (cpu_is_davinci_dm365())
231 mult = 2 * (mult & PLLM_PLLM_MASK);
232 else
233 mult = (mult & PLLM_PLLM_MASK) + 1;
231 } else 234 } else
232 bypass = 1; 235 bypass = 1;
233 236
diff --git a/arch/arm/mach-davinci/da830.c b/arch/arm/mach-davinci/da830.c
new file mode 100644
index 000000000000..19b2748357fc
--- /dev/null
+++ b/arch/arm/mach-davinci/da830.c
@@ -0,0 +1,1205 @@
1/*
2 * TI DA830/OMAP L137 chip specific setup
3 *
4 * Author: Mark A. Greer <mgreer@mvista.com>
5 *
6 * 2009 (c) MontaVista Software, Inc. 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#include <linux/kernel.h>
12#include <linux/init.h>
13#include <linux/clk.h>
14#include <linux/platform_device.h>
15
16#include <asm/mach/map.h>
17
18#include <mach/clock.h>
19#include <mach/psc.h>
20#include <mach/mux.h>
21#include <mach/irqs.h>
22#include <mach/cputype.h>
23#include <mach/common.h>
24#include <mach/time.h>
25#include <mach/da8xx.h>
26#include <mach/asp.h>
27
28#include "clock.h"
29#include "mux.h"
30
31/* Offsets of the 8 compare registers on the da830 */
32#define DA830_CMP12_0 0x60
33#define DA830_CMP12_1 0x64
34#define DA830_CMP12_2 0x68
35#define DA830_CMP12_3 0x6c
36#define DA830_CMP12_4 0x70
37#define DA830_CMP12_5 0x74
38#define DA830_CMP12_6 0x78
39#define DA830_CMP12_7 0x7c
40
41#define DA830_REF_FREQ 24000000
42
43static struct pll_data pll0_data = {
44 .num = 1,
45 .phys_base = DA8XX_PLL0_BASE,
46 .flags = PLL_HAS_PREDIV | PLL_HAS_POSTDIV,
47};
48
49static struct clk ref_clk = {
50 .name = "ref_clk",
51 .rate = DA830_REF_FREQ,
52};
53
54static struct clk pll0_clk = {
55 .name = "pll0",
56 .parent = &ref_clk,
57 .pll_data = &pll0_data,
58 .flags = CLK_PLL,
59};
60
61static struct clk pll0_aux_clk = {
62 .name = "pll0_aux_clk",
63 .parent = &pll0_clk,
64 .flags = CLK_PLL | PRE_PLL,
65};
66
67static struct clk pll0_sysclk2 = {
68 .name = "pll0_sysclk2",
69 .parent = &pll0_clk,
70 .flags = CLK_PLL,
71 .div_reg = PLLDIV2,
72};
73
74static struct clk pll0_sysclk3 = {
75 .name = "pll0_sysclk3",
76 .parent = &pll0_clk,
77 .flags = CLK_PLL,
78 .div_reg = PLLDIV3,
79};
80
81static struct clk pll0_sysclk4 = {
82 .name = "pll0_sysclk4",
83 .parent = &pll0_clk,
84 .flags = CLK_PLL,
85 .div_reg = PLLDIV4,
86};
87
88static struct clk pll0_sysclk5 = {
89 .name = "pll0_sysclk5",
90 .parent = &pll0_clk,
91 .flags = CLK_PLL,
92 .div_reg = PLLDIV5,
93};
94
95static struct clk pll0_sysclk6 = {
96 .name = "pll0_sysclk6",
97 .parent = &pll0_clk,
98 .flags = CLK_PLL,
99 .div_reg = PLLDIV6,
100};
101
102static struct clk pll0_sysclk7 = {
103 .name = "pll0_sysclk7",
104 .parent = &pll0_clk,
105 .flags = CLK_PLL,
106 .div_reg = PLLDIV7,
107};
108
109static struct clk i2c0_clk = {
110 .name = "i2c0",
111 .parent = &pll0_aux_clk,
112};
113
114static struct clk timerp64_0_clk = {
115 .name = "timer0",
116 .parent = &pll0_aux_clk,
117};
118
119static struct clk timerp64_1_clk = {
120 .name = "timer1",
121 .parent = &pll0_aux_clk,
122};
123
124static struct clk arm_rom_clk = {
125 .name = "arm_rom",
126 .parent = &pll0_sysclk2,
127 .lpsc = DA8XX_LPSC0_ARM_RAM_ROM,
128 .flags = ALWAYS_ENABLED,
129};
130
131static struct clk scr0_ss_clk = {
132 .name = "scr0_ss",
133 .parent = &pll0_sysclk2,
134 .lpsc = DA8XX_LPSC0_SCR0_SS,
135 .flags = ALWAYS_ENABLED,
136};
137
138static struct clk scr1_ss_clk = {
139 .name = "scr1_ss",
140 .parent = &pll0_sysclk2,
141 .lpsc = DA8XX_LPSC0_SCR1_SS,
142 .flags = ALWAYS_ENABLED,
143};
144
145static struct clk scr2_ss_clk = {
146 .name = "scr2_ss",
147 .parent = &pll0_sysclk2,
148 .lpsc = DA8XX_LPSC0_SCR2_SS,
149 .flags = ALWAYS_ENABLED,
150};
151
152static struct clk dmax_clk = {
153 .name = "dmax",
154 .parent = &pll0_sysclk2,
155 .lpsc = DA8XX_LPSC0_DMAX,
156 .flags = ALWAYS_ENABLED,
157};
158
159static struct clk tpcc_clk = {
160 .name = "tpcc",
161 .parent = &pll0_sysclk2,
162 .lpsc = DA8XX_LPSC0_TPCC,
163 .flags = ALWAYS_ENABLED | CLK_PSC,
164};
165
166static struct clk tptc0_clk = {
167 .name = "tptc0",
168 .parent = &pll0_sysclk2,
169 .lpsc = DA8XX_LPSC0_TPTC0,
170 .flags = ALWAYS_ENABLED,
171};
172
173static struct clk tptc1_clk = {
174 .name = "tptc1",
175 .parent = &pll0_sysclk2,
176 .lpsc = DA8XX_LPSC0_TPTC1,
177 .flags = ALWAYS_ENABLED,
178};
179
180static struct clk mmcsd_clk = {
181 .name = "mmcsd",
182 .parent = &pll0_sysclk2,
183 .lpsc = DA8XX_LPSC0_MMC_SD,
184};
185
186static struct clk uart0_clk = {
187 .name = "uart0",
188 .parent = &pll0_sysclk2,
189 .lpsc = DA8XX_LPSC0_UART0,
190};
191
192static struct clk uart1_clk = {
193 .name = "uart1",
194 .parent = &pll0_sysclk2,
195 .lpsc = DA8XX_LPSC1_UART1,
196 .psc_ctlr = 1,
197};
198
199static struct clk uart2_clk = {
200 .name = "uart2",
201 .parent = &pll0_sysclk2,
202 .lpsc = DA8XX_LPSC1_UART2,
203 .psc_ctlr = 1,
204};
205
206static struct clk spi0_clk = {
207 .name = "spi0",
208 .parent = &pll0_sysclk2,
209 .lpsc = DA8XX_LPSC0_SPI0,
210};
211
212static struct clk spi1_clk = {
213 .name = "spi1",
214 .parent = &pll0_sysclk2,
215 .lpsc = DA8XX_LPSC1_SPI1,
216 .psc_ctlr = 1,
217};
218
219static struct clk ecap0_clk = {
220 .name = "ecap0",
221 .parent = &pll0_sysclk2,
222 .lpsc = DA8XX_LPSC1_ECAP,
223 .psc_ctlr = 1,
224};
225
226static struct clk ecap1_clk = {
227 .name = "ecap1",
228 .parent = &pll0_sysclk2,
229 .lpsc = DA8XX_LPSC1_ECAP,
230 .psc_ctlr = 1,
231};
232
233static struct clk ecap2_clk = {
234 .name = "ecap2",
235 .parent = &pll0_sysclk2,
236 .lpsc = DA8XX_LPSC1_ECAP,
237 .psc_ctlr = 1,
238};
239
240static struct clk pwm0_clk = {
241 .name = "pwm0",
242 .parent = &pll0_sysclk2,
243 .lpsc = DA8XX_LPSC1_PWM,
244 .psc_ctlr = 1,
245};
246
247static struct clk pwm1_clk = {
248 .name = "pwm1",
249 .parent = &pll0_sysclk2,
250 .lpsc = DA8XX_LPSC1_PWM,
251 .psc_ctlr = 1,
252};
253
254static struct clk pwm2_clk = {
255 .name = "pwm2",
256 .parent = &pll0_sysclk2,
257 .lpsc = DA8XX_LPSC1_PWM,
258 .psc_ctlr = 1,
259};
260
261static struct clk eqep0_clk = {
262 .name = "eqep0",
263 .parent = &pll0_sysclk2,
264 .lpsc = DA830_LPSC1_EQEP,
265 .psc_ctlr = 1,
266};
267
268static struct clk eqep1_clk = {
269 .name = "eqep1",
270 .parent = &pll0_sysclk2,
271 .lpsc = DA830_LPSC1_EQEP,
272 .psc_ctlr = 1,
273};
274
275static struct clk lcdc_clk = {
276 .name = "lcdc",
277 .parent = &pll0_sysclk2,
278 .lpsc = DA8XX_LPSC1_LCDC,
279 .psc_ctlr = 1,
280};
281
282static struct clk mcasp0_clk = {
283 .name = "mcasp0",
284 .parent = &pll0_sysclk2,
285 .lpsc = DA8XX_LPSC1_McASP0,
286 .psc_ctlr = 1,
287};
288
289static struct clk mcasp1_clk = {
290 .name = "mcasp1",
291 .parent = &pll0_sysclk2,
292 .lpsc = DA830_LPSC1_McASP1,
293 .psc_ctlr = 1,
294};
295
296static struct clk mcasp2_clk = {
297 .name = "mcasp2",
298 .parent = &pll0_sysclk2,
299 .lpsc = DA830_LPSC1_McASP2,
300 .psc_ctlr = 1,
301};
302
303static struct clk usb20_clk = {
304 .name = "usb20",
305 .parent = &pll0_sysclk2,
306 .lpsc = DA8XX_LPSC1_USB20,
307 .psc_ctlr = 1,
308};
309
310static struct clk aemif_clk = {
311 .name = "aemif",
312 .parent = &pll0_sysclk3,
313 .lpsc = DA8XX_LPSC0_EMIF25,
314 .flags = ALWAYS_ENABLED,
315};
316
317static struct clk aintc_clk = {
318 .name = "aintc",
319 .parent = &pll0_sysclk4,
320 .lpsc = DA8XX_LPSC0_AINTC,
321 .flags = ALWAYS_ENABLED,
322};
323
324static struct clk secu_mgr_clk = {
325 .name = "secu_mgr",
326 .parent = &pll0_sysclk4,
327 .lpsc = DA8XX_LPSC0_SECU_MGR,
328 .flags = ALWAYS_ENABLED,
329};
330
331static struct clk emac_clk = {
332 .name = "emac",
333 .parent = &pll0_sysclk4,
334 .lpsc = DA8XX_LPSC1_CPGMAC,
335 .psc_ctlr = 1,
336};
337
338static struct clk gpio_clk = {
339 .name = "gpio",
340 .parent = &pll0_sysclk4,
341 .lpsc = DA8XX_LPSC1_GPIO,
342 .psc_ctlr = 1,
343};
344
345static struct clk i2c1_clk = {
346 .name = "i2c1",
347 .parent = &pll0_sysclk4,
348 .lpsc = DA8XX_LPSC1_I2C,
349 .psc_ctlr = 1,
350};
351
352static struct clk usb11_clk = {
353 .name = "usb11",
354 .parent = &pll0_sysclk4,
355 .lpsc = DA8XX_LPSC1_USB11,
356 .psc_ctlr = 1,
357};
358
359static struct clk emif3_clk = {
360 .name = "emif3",
361 .parent = &pll0_sysclk5,
362 .lpsc = DA8XX_LPSC1_EMIF3C,
363 .flags = ALWAYS_ENABLED,
364 .psc_ctlr = 1,
365};
366
367static struct clk arm_clk = {
368 .name = "arm",
369 .parent = &pll0_sysclk6,
370 .lpsc = DA8XX_LPSC0_ARM,
371 .flags = ALWAYS_ENABLED,
372};
373
374static struct clk rmii_clk = {
375 .name = "rmii",
376 .parent = &pll0_sysclk7,
377};
378
379static struct davinci_clk da830_clks[] = {
380 CLK(NULL, "ref", &ref_clk),
381 CLK(NULL, "pll0", &pll0_clk),
382 CLK(NULL, "pll0_aux", &pll0_aux_clk),
383 CLK(NULL, "pll0_sysclk2", &pll0_sysclk2),
384 CLK(NULL, "pll0_sysclk3", &pll0_sysclk3),
385 CLK(NULL, "pll0_sysclk4", &pll0_sysclk4),
386 CLK(NULL, "pll0_sysclk5", &pll0_sysclk5),
387 CLK(NULL, "pll0_sysclk6", &pll0_sysclk6),
388 CLK(NULL, "pll0_sysclk7", &pll0_sysclk7),
389 CLK("i2c_davinci.1", NULL, &i2c0_clk),
390 CLK(NULL, "timer0", &timerp64_0_clk),
391 CLK("watchdog", NULL, &timerp64_1_clk),
392 CLK(NULL, "arm_rom", &arm_rom_clk),
393 CLK(NULL, "scr0_ss", &scr0_ss_clk),
394 CLK(NULL, "scr1_ss", &scr1_ss_clk),
395 CLK(NULL, "scr2_ss", &scr2_ss_clk),
396 CLK(NULL, "dmax", &dmax_clk),
397 CLK(NULL, "tpcc", &tpcc_clk),
398 CLK(NULL, "tptc0", &tptc0_clk),
399 CLK(NULL, "tptc1", &tptc1_clk),
400 CLK("davinci_mmc.0", NULL, &mmcsd_clk),
401 CLK(NULL, "uart0", &uart0_clk),
402 CLK(NULL, "uart1", &uart1_clk),
403 CLK(NULL, "uart2", &uart2_clk),
404 CLK("dm_spi.0", NULL, &spi0_clk),
405 CLK("dm_spi.1", NULL, &spi1_clk),
406 CLK(NULL, "ecap0", &ecap0_clk),
407 CLK(NULL, "ecap1", &ecap1_clk),
408 CLK(NULL, "ecap2", &ecap2_clk),
409 CLK(NULL, "pwm0", &pwm0_clk),
410 CLK(NULL, "pwm1", &pwm1_clk),
411 CLK(NULL, "pwm2", &pwm2_clk),
412 CLK("eqep.0", NULL, &eqep0_clk),
413 CLK("eqep.1", NULL, &eqep1_clk),
414 CLK("da830_lcdc", NULL, &lcdc_clk),
415 CLK("davinci-mcasp.0", NULL, &mcasp0_clk),
416 CLK("davinci-mcasp.1", NULL, &mcasp1_clk),
417 CLK("davinci-mcasp.2", NULL, &mcasp2_clk),
418 CLK("musb_hdrc", NULL, &usb20_clk),
419 CLK(NULL, "aemif", &aemif_clk),
420 CLK(NULL, "aintc", &aintc_clk),
421 CLK(NULL, "secu_mgr", &secu_mgr_clk),
422 CLK("davinci_emac.1", NULL, &emac_clk),
423 CLK(NULL, "gpio", &gpio_clk),
424 CLK("i2c_davinci.2", NULL, &i2c1_clk),
425 CLK(NULL, "usb11", &usb11_clk),
426 CLK(NULL, "emif3", &emif3_clk),
427 CLK(NULL, "arm", &arm_clk),
428 CLK(NULL, "rmii", &rmii_clk),
429 CLK(NULL, NULL, NULL),
430};
431
432/*
433 * Device specific mux setup
434 *
435 * soc description mux mode mode mux dbg
436 * reg offset mask mode
437 */
438static const struct mux_config da830_pins[] = {
439#ifdef CONFIG_DAVINCI_MUX
440 MUX_CFG(DA830, GPIO7_14, 0, 0, 0xf, 1, false)
441 MUX_CFG(DA830, RTCK, 0, 0, 0xf, 8, false)
442 MUX_CFG(DA830, GPIO7_15, 0, 4, 0xf, 1, false)
443 MUX_CFG(DA830, EMU_0, 0, 4, 0xf, 8, false)
444 MUX_CFG(DA830, EMB_SDCKE, 0, 8, 0xf, 1, false)
445 MUX_CFG(DA830, EMB_CLK_GLUE, 0, 12, 0xf, 1, false)
446 MUX_CFG(DA830, EMB_CLK, 0, 12, 0xf, 2, false)
447 MUX_CFG(DA830, NEMB_CS_0, 0, 16, 0xf, 1, false)
448 MUX_CFG(DA830, NEMB_CAS, 0, 20, 0xf, 1, false)
449 MUX_CFG(DA830, NEMB_RAS, 0, 24, 0xf, 1, false)
450 MUX_CFG(DA830, NEMB_WE, 0, 28, 0xf, 1, false)
451 MUX_CFG(DA830, EMB_BA_1, 1, 0, 0xf, 1, false)
452 MUX_CFG(DA830, EMB_BA_0, 1, 4, 0xf, 1, false)
453 MUX_CFG(DA830, EMB_A_0, 1, 8, 0xf, 1, false)
454 MUX_CFG(DA830, EMB_A_1, 1, 12, 0xf, 1, false)
455 MUX_CFG(DA830, EMB_A_2, 1, 16, 0xf, 1, false)
456 MUX_CFG(DA830, EMB_A_3, 1, 20, 0xf, 1, false)
457 MUX_CFG(DA830, EMB_A_4, 1, 24, 0xf, 1, false)
458 MUX_CFG(DA830, EMB_A_5, 1, 28, 0xf, 1, false)
459 MUX_CFG(DA830, GPIO7_0, 1, 0, 0xf, 8, false)
460 MUX_CFG(DA830, GPIO7_1, 1, 4, 0xf, 8, false)
461 MUX_CFG(DA830, GPIO7_2, 1, 8, 0xf, 8, false)
462 MUX_CFG(DA830, GPIO7_3, 1, 12, 0xf, 8, false)
463 MUX_CFG(DA830, GPIO7_4, 1, 16, 0xf, 8, false)
464 MUX_CFG(DA830, GPIO7_5, 1, 20, 0xf, 8, false)
465 MUX_CFG(DA830, GPIO7_6, 1, 24, 0xf, 8, false)
466 MUX_CFG(DA830, GPIO7_7, 1, 28, 0xf, 8, false)
467 MUX_CFG(DA830, EMB_A_6, 2, 0, 0xf, 1, false)
468 MUX_CFG(DA830, EMB_A_7, 2, 4, 0xf, 1, false)
469 MUX_CFG(DA830, EMB_A_8, 2, 8, 0xf, 1, false)
470 MUX_CFG(DA830, EMB_A_9, 2, 12, 0xf, 1, false)
471 MUX_CFG(DA830, EMB_A_10, 2, 16, 0xf, 1, false)
472 MUX_CFG(DA830, EMB_A_11, 2, 20, 0xf, 1, false)
473 MUX_CFG(DA830, EMB_A_12, 2, 24, 0xf, 1, false)
474 MUX_CFG(DA830, EMB_D_31, 2, 28, 0xf, 1, false)
475 MUX_CFG(DA830, GPIO7_8, 2, 0, 0xf, 8, false)
476 MUX_CFG(DA830, GPIO7_9, 2, 4, 0xf, 8, false)
477 MUX_CFG(DA830, GPIO7_10, 2, 8, 0xf, 8, false)
478 MUX_CFG(DA830, GPIO7_11, 2, 12, 0xf, 8, false)
479 MUX_CFG(DA830, GPIO7_12, 2, 16, 0xf, 8, false)
480 MUX_CFG(DA830, GPIO7_13, 2, 20, 0xf, 8, false)
481 MUX_CFG(DA830, GPIO3_13, 2, 24, 0xf, 8, false)
482 MUX_CFG(DA830, EMB_D_30, 3, 0, 0xf, 1, false)
483 MUX_CFG(DA830, EMB_D_29, 3, 4, 0xf, 1, false)
484 MUX_CFG(DA830, EMB_D_28, 3, 8, 0xf, 1, false)
485 MUX_CFG(DA830, EMB_D_27, 3, 12, 0xf, 1, false)
486 MUX_CFG(DA830, EMB_D_26, 3, 16, 0xf, 1, false)
487 MUX_CFG(DA830, EMB_D_25, 3, 20, 0xf, 1, false)
488 MUX_CFG(DA830, EMB_D_24, 3, 24, 0xf, 1, false)
489 MUX_CFG(DA830, EMB_D_23, 3, 28, 0xf, 1, false)
490 MUX_CFG(DA830, EMB_D_22, 4, 0, 0xf, 1, false)
491 MUX_CFG(DA830, EMB_D_21, 4, 4, 0xf, 1, false)
492 MUX_CFG(DA830, EMB_D_20, 4, 8, 0xf, 1, false)
493 MUX_CFG(DA830, EMB_D_19, 4, 12, 0xf, 1, false)
494 MUX_CFG(DA830, EMB_D_18, 4, 16, 0xf, 1, false)
495 MUX_CFG(DA830, EMB_D_17, 4, 20, 0xf, 1, false)
496 MUX_CFG(DA830, EMB_D_16, 4, 24, 0xf, 1, false)
497 MUX_CFG(DA830, NEMB_WE_DQM_3, 4, 28, 0xf, 1, false)
498 MUX_CFG(DA830, NEMB_WE_DQM_2, 5, 0, 0xf, 1, false)
499 MUX_CFG(DA830, EMB_D_0, 5, 4, 0xf, 1, false)
500 MUX_CFG(DA830, EMB_D_1, 5, 8, 0xf, 1, false)
501 MUX_CFG(DA830, EMB_D_2, 5, 12, 0xf, 1, false)
502 MUX_CFG(DA830, EMB_D_3, 5, 16, 0xf, 1, false)
503 MUX_CFG(DA830, EMB_D_4, 5, 20, 0xf, 1, false)
504 MUX_CFG(DA830, EMB_D_5, 5, 24, 0xf, 1, false)
505 MUX_CFG(DA830, EMB_D_6, 5, 28, 0xf, 1, false)
506 MUX_CFG(DA830, GPIO6_0, 5, 4, 0xf, 8, false)
507 MUX_CFG(DA830, GPIO6_1, 5, 8, 0xf, 8, false)
508 MUX_CFG(DA830, GPIO6_2, 5, 12, 0xf, 8, false)
509 MUX_CFG(DA830, GPIO6_3, 5, 16, 0xf, 8, false)
510 MUX_CFG(DA830, GPIO6_4, 5, 20, 0xf, 8, false)
511 MUX_CFG(DA830, GPIO6_5, 5, 24, 0xf, 8, false)
512 MUX_CFG(DA830, GPIO6_6, 5, 28, 0xf, 8, false)
513 MUX_CFG(DA830, EMB_D_7, 6, 0, 0xf, 1, false)
514 MUX_CFG(DA830, EMB_D_8, 6, 4, 0xf, 1, false)
515 MUX_CFG(DA830, EMB_D_9, 6, 8, 0xf, 1, false)
516 MUX_CFG(DA830, EMB_D_10, 6, 12, 0xf, 1, false)
517 MUX_CFG(DA830, EMB_D_11, 6, 16, 0xf, 1, false)
518 MUX_CFG(DA830, EMB_D_12, 6, 20, 0xf, 1, false)
519 MUX_CFG(DA830, EMB_D_13, 6, 24, 0xf, 1, false)
520 MUX_CFG(DA830, EMB_D_14, 6, 28, 0xf, 1, false)
521 MUX_CFG(DA830, GPIO6_7, 6, 0, 0xf, 8, false)
522 MUX_CFG(DA830, GPIO6_8, 6, 4, 0xf, 8, false)
523 MUX_CFG(DA830, GPIO6_9, 6, 8, 0xf, 8, false)
524 MUX_CFG(DA830, GPIO6_10, 6, 12, 0xf, 8, false)
525 MUX_CFG(DA830, GPIO6_11, 6, 16, 0xf, 8, false)
526 MUX_CFG(DA830, GPIO6_12, 6, 20, 0xf, 8, false)
527 MUX_CFG(DA830, GPIO6_13, 6, 24, 0xf, 8, false)
528 MUX_CFG(DA830, GPIO6_14, 6, 28, 0xf, 8, false)
529 MUX_CFG(DA830, EMB_D_15, 7, 0, 0xf, 1, false)
530 MUX_CFG(DA830, NEMB_WE_DQM_1, 7, 4, 0xf, 1, false)
531 MUX_CFG(DA830, NEMB_WE_DQM_0, 7, 8, 0xf, 1, false)
532 MUX_CFG(DA830, SPI0_SOMI_0, 7, 12, 0xf, 1, false)
533 MUX_CFG(DA830, SPI0_SIMO_0, 7, 16, 0xf, 1, false)
534 MUX_CFG(DA830, SPI0_CLK, 7, 20, 0xf, 1, false)
535 MUX_CFG(DA830, NSPI0_ENA, 7, 24, 0xf, 1, false)
536 MUX_CFG(DA830, NSPI0_SCS_0, 7, 28, 0xf, 1, false)
537 MUX_CFG(DA830, EQEP0I, 7, 12, 0xf, 2, false)
538 MUX_CFG(DA830, EQEP0S, 7, 16, 0xf, 2, false)
539 MUX_CFG(DA830, EQEP1I, 7, 20, 0xf, 2, false)
540 MUX_CFG(DA830, NUART0_CTS, 7, 24, 0xf, 2, false)
541 MUX_CFG(DA830, NUART0_RTS, 7, 28, 0xf, 2, false)
542 MUX_CFG(DA830, EQEP0A, 7, 24, 0xf, 4, false)
543 MUX_CFG(DA830, EQEP0B, 7, 28, 0xf, 4, false)
544 MUX_CFG(DA830, GPIO6_15, 7, 0, 0xf, 8, false)
545 MUX_CFG(DA830, GPIO5_14, 7, 4, 0xf, 8, false)
546 MUX_CFG(DA830, GPIO5_15, 7, 8, 0xf, 8, false)
547 MUX_CFG(DA830, GPIO5_0, 7, 12, 0xf, 8, false)
548 MUX_CFG(DA830, GPIO5_1, 7, 16, 0xf, 8, false)
549 MUX_CFG(DA830, GPIO5_2, 7, 20, 0xf, 8, false)
550 MUX_CFG(DA830, GPIO5_3, 7, 24, 0xf, 8, false)
551 MUX_CFG(DA830, GPIO5_4, 7, 28, 0xf, 8, false)
552 MUX_CFG(DA830, SPI1_SOMI_0, 8, 0, 0xf, 1, false)
553 MUX_CFG(DA830, SPI1_SIMO_0, 8, 4, 0xf, 1, false)
554 MUX_CFG(DA830, SPI1_CLK, 8, 8, 0xf, 1, false)
555 MUX_CFG(DA830, UART0_RXD, 8, 12, 0xf, 1, false)
556 MUX_CFG(DA830, UART0_TXD, 8, 16, 0xf, 1, false)
557 MUX_CFG(DA830, AXR1_10, 8, 20, 0xf, 1, false)
558 MUX_CFG(DA830, AXR1_11, 8, 24, 0xf, 1, false)
559 MUX_CFG(DA830, NSPI1_ENA, 8, 28, 0xf, 1, false)
560 MUX_CFG(DA830, I2C1_SCL, 8, 0, 0xf, 2, false)
561 MUX_CFG(DA830, I2C1_SDA, 8, 4, 0xf, 2, false)
562 MUX_CFG(DA830, EQEP1S, 8, 8, 0xf, 2, false)
563 MUX_CFG(DA830, I2C0_SDA, 8, 12, 0xf, 2, false)
564 MUX_CFG(DA830, I2C0_SCL, 8, 16, 0xf, 2, false)
565 MUX_CFG(DA830, UART2_RXD, 8, 28, 0xf, 2, false)
566 MUX_CFG(DA830, TM64P0_IN12, 8, 12, 0xf, 4, false)
567 MUX_CFG(DA830, TM64P0_OUT12, 8, 16, 0xf, 4, false)
568 MUX_CFG(DA830, GPIO5_5, 8, 0, 0xf, 8, false)
569 MUX_CFG(DA830, GPIO5_6, 8, 4, 0xf, 8, false)
570 MUX_CFG(DA830, GPIO5_7, 8, 8, 0xf, 8, false)
571 MUX_CFG(DA830, GPIO5_8, 8, 12, 0xf, 8, false)
572 MUX_CFG(DA830, GPIO5_9, 8, 16, 0xf, 8, false)
573 MUX_CFG(DA830, GPIO5_10, 8, 20, 0xf, 8, false)
574 MUX_CFG(DA830, GPIO5_11, 8, 24, 0xf, 8, false)
575 MUX_CFG(DA830, GPIO5_12, 8, 28, 0xf, 8, false)
576 MUX_CFG(DA830, NSPI1_SCS_0, 9, 0, 0xf, 1, false)
577 MUX_CFG(DA830, USB0_DRVVBUS, 9, 4, 0xf, 1, false)
578 MUX_CFG(DA830, AHCLKX0, 9, 8, 0xf, 1, false)
579 MUX_CFG(DA830, ACLKX0, 9, 12, 0xf, 1, false)
580 MUX_CFG(DA830, AFSX0, 9, 16, 0xf, 1, false)
581 MUX_CFG(DA830, AHCLKR0, 9, 20, 0xf, 1, false)
582 MUX_CFG(DA830, ACLKR0, 9, 24, 0xf, 1, false)
583 MUX_CFG(DA830, AFSR0, 9, 28, 0xf, 1, false)
584 MUX_CFG(DA830, UART2_TXD, 9, 0, 0xf, 2, false)
585 MUX_CFG(DA830, AHCLKX2, 9, 8, 0xf, 2, false)
586 MUX_CFG(DA830, ECAP0_APWM0, 9, 12, 0xf, 2, false)
587 MUX_CFG(DA830, RMII_MHZ_50_CLK, 9, 20, 0xf, 2, false)
588 MUX_CFG(DA830, ECAP1_APWM1, 9, 24, 0xf, 2, false)
589 MUX_CFG(DA830, USB_REFCLKIN, 9, 8, 0xf, 4, false)
590 MUX_CFG(DA830, GPIO5_13, 9, 0, 0xf, 8, false)
591 MUX_CFG(DA830, GPIO4_15, 9, 4, 0xf, 8, false)
592 MUX_CFG(DA830, GPIO2_11, 9, 8, 0xf, 8, false)
593 MUX_CFG(DA830, GPIO2_12, 9, 12, 0xf, 8, false)
594 MUX_CFG(DA830, GPIO2_13, 9, 16, 0xf, 8, false)
595 MUX_CFG(DA830, GPIO2_14, 9, 20, 0xf, 8, false)
596 MUX_CFG(DA830, GPIO2_15, 9, 24, 0xf, 8, false)
597 MUX_CFG(DA830, GPIO3_12, 9, 28, 0xf, 8, false)
598 MUX_CFG(DA830, AMUTE0, 10, 0, 0xf, 1, false)
599 MUX_CFG(DA830, AXR0_0, 10, 4, 0xf, 1, false)
600 MUX_CFG(DA830, AXR0_1, 10, 8, 0xf, 1, false)
601 MUX_CFG(DA830, AXR0_2, 10, 12, 0xf, 1, false)
602 MUX_CFG(DA830, AXR0_3, 10, 16, 0xf, 1, false)
603 MUX_CFG(DA830, AXR0_4, 10, 20, 0xf, 1, false)
604 MUX_CFG(DA830, AXR0_5, 10, 24, 0xf, 1, false)
605 MUX_CFG(DA830, AXR0_6, 10, 28, 0xf, 1, false)
606 MUX_CFG(DA830, RMII_TXD_0, 10, 4, 0xf, 2, false)
607 MUX_CFG(DA830, RMII_TXD_1, 10, 8, 0xf, 2, false)
608 MUX_CFG(DA830, RMII_TXEN, 10, 12, 0xf, 2, false)
609 MUX_CFG(DA830, RMII_CRS_DV, 10, 16, 0xf, 2, false)
610 MUX_CFG(DA830, RMII_RXD_0, 10, 20, 0xf, 2, false)
611 MUX_CFG(DA830, RMII_RXD_1, 10, 24, 0xf, 2, false)
612 MUX_CFG(DA830, RMII_RXER, 10, 28, 0xf, 2, false)
613 MUX_CFG(DA830, AFSR2, 10, 4, 0xf, 4, false)
614 MUX_CFG(DA830, ACLKX2, 10, 8, 0xf, 4, false)
615 MUX_CFG(DA830, AXR2_3, 10, 12, 0xf, 4, false)
616 MUX_CFG(DA830, AXR2_2, 10, 16, 0xf, 4, false)
617 MUX_CFG(DA830, AXR2_1, 10, 20, 0xf, 4, false)
618 MUX_CFG(DA830, AFSX2, 10, 24, 0xf, 4, false)
619 MUX_CFG(DA830, ACLKR2, 10, 28, 0xf, 4, false)
620 MUX_CFG(DA830, NRESETOUT, 10, 0, 0xf, 8, false)
621 MUX_CFG(DA830, GPIO3_0, 10, 4, 0xf, 8, false)
622 MUX_CFG(DA830, GPIO3_1, 10, 8, 0xf, 8, false)
623 MUX_CFG(DA830, GPIO3_2, 10, 12, 0xf, 8, false)
624 MUX_CFG(DA830, GPIO3_3, 10, 16, 0xf, 8, false)
625 MUX_CFG(DA830, GPIO3_4, 10, 20, 0xf, 8, false)
626 MUX_CFG(DA830, GPIO3_5, 10, 24, 0xf, 8, false)
627 MUX_CFG(DA830, GPIO3_6, 10, 28, 0xf, 8, false)
628 MUX_CFG(DA830, AXR0_7, 11, 0, 0xf, 1, false)
629 MUX_CFG(DA830, AXR0_8, 11, 4, 0xf, 1, false)
630 MUX_CFG(DA830, UART1_RXD, 11, 8, 0xf, 1, false)
631 MUX_CFG(DA830, UART1_TXD, 11, 12, 0xf, 1, false)
632 MUX_CFG(DA830, AXR0_11, 11, 16, 0xf, 1, false)
633 MUX_CFG(DA830, AHCLKX1, 11, 20, 0xf, 1, false)
634 MUX_CFG(DA830, ACLKX1, 11, 24, 0xf, 1, false)
635 MUX_CFG(DA830, AFSX1, 11, 28, 0xf, 1, false)
636 MUX_CFG(DA830, MDIO_CLK, 11, 0, 0xf, 2, false)
637 MUX_CFG(DA830, MDIO_D, 11, 4, 0xf, 2, false)
638 MUX_CFG(DA830, AXR0_9, 11, 8, 0xf, 2, false)
639 MUX_CFG(DA830, AXR0_10, 11, 12, 0xf, 2, false)
640 MUX_CFG(DA830, EPWM0B, 11, 20, 0xf, 2, false)
641 MUX_CFG(DA830, EPWM0A, 11, 24, 0xf, 2, false)
642 MUX_CFG(DA830, EPWMSYNCI, 11, 28, 0xf, 2, false)
643 MUX_CFG(DA830, AXR2_0, 11, 16, 0xf, 4, false)
644 MUX_CFG(DA830, EPWMSYNC0, 11, 28, 0xf, 4, false)
645 MUX_CFG(DA830, GPIO3_7, 11, 0, 0xf, 8, false)
646 MUX_CFG(DA830, GPIO3_8, 11, 4, 0xf, 8, false)
647 MUX_CFG(DA830, GPIO3_9, 11, 8, 0xf, 8, false)
648 MUX_CFG(DA830, GPIO3_10, 11, 12, 0xf, 8, false)
649 MUX_CFG(DA830, GPIO3_11, 11, 16, 0xf, 8, false)
650 MUX_CFG(DA830, GPIO3_14, 11, 20, 0xf, 8, false)
651 MUX_CFG(DA830, GPIO3_15, 11, 24, 0xf, 8, false)
652 MUX_CFG(DA830, GPIO4_10, 11, 28, 0xf, 8, false)
653 MUX_CFG(DA830, AHCLKR1, 12, 0, 0xf, 1, false)
654 MUX_CFG(DA830, ACLKR1, 12, 4, 0xf, 1, false)
655 MUX_CFG(DA830, AFSR1, 12, 8, 0xf, 1, false)
656 MUX_CFG(DA830, AMUTE1, 12, 12, 0xf, 1, false)
657 MUX_CFG(DA830, AXR1_0, 12, 16, 0xf, 1, false)
658 MUX_CFG(DA830, AXR1_1, 12, 20, 0xf, 1, false)
659 MUX_CFG(DA830, AXR1_2, 12, 24, 0xf, 1, false)
660 MUX_CFG(DA830, AXR1_3, 12, 28, 0xf, 1, false)
661 MUX_CFG(DA830, ECAP2_APWM2, 12, 4, 0xf, 2, false)
662 MUX_CFG(DA830, EHRPWMGLUETZ, 12, 12, 0xf, 2, false)
663 MUX_CFG(DA830, EQEP1A, 12, 28, 0xf, 2, false)
664 MUX_CFG(DA830, GPIO4_11, 12, 0, 0xf, 8, false)
665 MUX_CFG(DA830, GPIO4_12, 12, 4, 0xf, 8, false)
666 MUX_CFG(DA830, GPIO4_13, 12, 8, 0xf, 8, false)
667 MUX_CFG(DA830, GPIO4_14, 12, 12, 0xf, 8, false)
668 MUX_CFG(DA830, GPIO4_0, 12, 16, 0xf, 8, false)
669 MUX_CFG(DA830, GPIO4_1, 12, 20, 0xf, 8, false)
670 MUX_CFG(DA830, GPIO4_2, 12, 24, 0xf, 8, false)
671 MUX_CFG(DA830, GPIO4_3, 12, 28, 0xf, 8, false)
672 MUX_CFG(DA830, AXR1_4, 13, 0, 0xf, 1, false)
673 MUX_CFG(DA830, AXR1_5, 13, 4, 0xf, 1, false)
674 MUX_CFG(DA830, AXR1_6, 13, 8, 0xf, 1, false)
675 MUX_CFG(DA830, AXR1_7, 13, 12, 0xf, 1, false)
676 MUX_CFG(DA830, AXR1_8, 13, 16, 0xf, 1, false)
677 MUX_CFG(DA830, AXR1_9, 13, 20, 0xf, 1, false)
678 MUX_CFG(DA830, EMA_D_0, 13, 24, 0xf, 1, false)
679 MUX_CFG(DA830, EMA_D_1, 13, 28, 0xf, 1, false)
680 MUX_CFG(DA830, EQEP1B, 13, 0, 0xf, 2, false)
681 MUX_CFG(DA830, EPWM2B, 13, 4, 0xf, 2, false)
682 MUX_CFG(DA830, EPWM2A, 13, 8, 0xf, 2, false)
683 MUX_CFG(DA830, EPWM1B, 13, 12, 0xf, 2, false)
684 MUX_CFG(DA830, EPWM1A, 13, 16, 0xf, 2, false)
685 MUX_CFG(DA830, MMCSD_DAT_0, 13, 24, 0xf, 2, false)
686 MUX_CFG(DA830, MMCSD_DAT_1, 13, 28, 0xf, 2, false)
687 MUX_CFG(DA830, UHPI_HD_0, 13, 24, 0xf, 4, false)
688 MUX_CFG(DA830, UHPI_HD_1, 13, 28, 0xf, 4, false)
689 MUX_CFG(DA830, GPIO4_4, 13, 0, 0xf, 8, false)
690 MUX_CFG(DA830, GPIO4_5, 13, 4, 0xf, 8, false)
691 MUX_CFG(DA830, GPIO4_6, 13, 8, 0xf, 8, false)
692 MUX_CFG(DA830, GPIO4_7, 13, 12, 0xf, 8, false)
693 MUX_CFG(DA830, GPIO4_8, 13, 16, 0xf, 8, false)
694 MUX_CFG(DA830, GPIO4_9, 13, 20, 0xf, 8, false)
695 MUX_CFG(DA830, GPIO0_0, 13, 24, 0xf, 8, false)
696 MUX_CFG(DA830, GPIO0_1, 13, 28, 0xf, 8, false)
697 MUX_CFG(DA830, EMA_D_2, 14, 0, 0xf, 1, false)
698 MUX_CFG(DA830, EMA_D_3, 14, 4, 0xf, 1, false)
699 MUX_CFG(DA830, EMA_D_4, 14, 8, 0xf, 1, false)
700 MUX_CFG(DA830, EMA_D_5, 14, 12, 0xf, 1, false)
701 MUX_CFG(DA830, EMA_D_6, 14, 16, 0xf, 1, false)
702 MUX_CFG(DA830, EMA_D_7, 14, 20, 0xf, 1, false)
703 MUX_CFG(DA830, EMA_D_8, 14, 24, 0xf, 1, false)
704 MUX_CFG(DA830, EMA_D_9, 14, 28, 0xf, 1, false)
705 MUX_CFG(DA830, MMCSD_DAT_2, 14, 0, 0xf, 2, false)
706 MUX_CFG(DA830, MMCSD_DAT_3, 14, 4, 0xf, 2, false)
707 MUX_CFG(DA830, MMCSD_DAT_4, 14, 8, 0xf, 2, false)
708 MUX_CFG(DA830, MMCSD_DAT_5, 14, 12, 0xf, 2, false)
709 MUX_CFG(DA830, MMCSD_DAT_6, 14, 16, 0xf, 2, false)
710 MUX_CFG(DA830, MMCSD_DAT_7, 14, 20, 0xf, 2, false)
711 MUX_CFG(DA830, UHPI_HD_8, 14, 24, 0xf, 2, false)
712 MUX_CFG(DA830, UHPI_HD_9, 14, 28, 0xf, 2, false)
713 MUX_CFG(DA830, UHPI_HD_2, 14, 0, 0xf, 4, false)
714 MUX_CFG(DA830, UHPI_HD_3, 14, 4, 0xf, 4, false)
715 MUX_CFG(DA830, UHPI_HD_4, 14, 8, 0xf, 4, false)
716 MUX_CFG(DA830, UHPI_HD_5, 14, 12, 0xf, 4, false)
717 MUX_CFG(DA830, UHPI_HD_6, 14, 16, 0xf, 4, false)
718 MUX_CFG(DA830, UHPI_HD_7, 14, 20, 0xf, 4, false)
719 MUX_CFG(DA830, LCD_D_8, 14, 24, 0xf, 4, false)
720 MUX_CFG(DA830, LCD_D_9, 14, 28, 0xf, 4, false)
721 MUX_CFG(DA830, GPIO0_2, 14, 0, 0xf, 8, false)
722 MUX_CFG(DA830, GPIO0_3, 14, 4, 0xf, 8, false)
723 MUX_CFG(DA830, GPIO0_4, 14, 8, 0xf, 8, false)
724 MUX_CFG(DA830, GPIO0_5, 14, 12, 0xf, 8, false)
725 MUX_CFG(DA830, GPIO0_6, 14, 16, 0xf, 8, false)
726 MUX_CFG(DA830, GPIO0_7, 14, 20, 0xf, 8, false)
727 MUX_CFG(DA830, GPIO0_8, 14, 24, 0xf, 8, false)
728 MUX_CFG(DA830, GPIO0_9, 14, 28, 0xf, 8, false)
729 MUX_CFG(DA830, EMA_D_10, 15, 0, 0xf, 1, false)
730 MUX_CFG(DA830, EMA_D_11, 15, 4, 0xf, 1, false)
731 MUX_CFG(DA830, EMA_D_12, 15, 8, 0xf, 1, false)
732 MUX_CFG(DA830, EMA_D_13, 15, 12, 0xf, 1, false)
733 MUX_CFG(DA830, EMA_D_14, 15, 16, 0xf, 1, false)
734 MUX_CFG(DA830, EMA_D_15, 15, 20, 0xf, 1, false)
735 MUX_CFG(DA830, EMA_A_0, 15, 24, 0xf, 1, false)
736 MUX_CFG(DA830, EMA_A_1, 15, 28, 0xf, 1, false)
737 MUX_CFG(DA830, UHPI_HD_10, 15, 0, 0xf, 2, false)
738 MUX_CFG(DA830, UHPI_HD_11, 15, 4, 0xf, 2, false)
739 MUX_CFG(DA830, UHPI_HD_12, 15, 8, 0xf, 2, false)
740 MUX_CFG(DA830, UHPI_HD_13, 15, 12, 0xf, 2, false)
741 MUX_CFG(DA830, UHPI_HD_14, 15, 16, 0xf, 2, false)
742 MUX_CFG(DA830, UHPI_HD_15, 15, 20, 0xf, 2, false)
743 MUX_CFG(DA830, LCD_D_7, 15, 24, 0xf, 2, false)
744 MUX_CFG(DA830, MMCSD_CLK, 15, 28, 0xf, 2, false)
745 MUX_CFG(DA830, LCD_D_10, 15, 0, 0xf, 4, false)
746 MUX_CFG(DA830, LCD_D_11, 15, 4, 0xf, 4, false)
747 MUX_CFG(DA830, LCD_D_12, 15, 8, 0xf, 4, false)
748 MUX_CFG(DA830, LCD_D_13, 15, 12, 0xf, 4, false)
749 MUX_CFG(DA830, LCD_D_14, 15, 16, 0xf, 4, false)
750 MUX_CFG(DA830, LCD_D_15, 15, 20, 0xf, 4, false)
751 MUX_CFG(DA830, UHPI_HCNTL0, 15, 28, 0xf, 4, false)
752 MUX_CFG(DA830, GPIO0_10, 15, 0, 0xf, 8, false)
753 MUX_CFG(DA830, GPIO0_11, 15, 4, 0xf, 8, false)
754 MUX_CFG(DA830, GPIO0_12, 15, 8, 0xf, 8, false)
755 MUX_CFG(DA830, GPIO0_13, 15, 12, 0xf, 8, false)
756 MUX_CFG(DA830, GPIO0_14, 15, 16, 0xf, 8, false)
757 MUX_CFG(DA830, GPIO0_15, 15, 20, 0xf, 8, false)
758 MUX_CFG(DA830, GPIO1_0, 15, 24, 0xf, 8, false)
759 MUX_CFG(DA830, GPIO1_1, 15, 28, 0xf, 8, false)
760 MUX_CFG(DA830, EMA_A_2, 16, 0, 0xf, 1, false)
761 MUX_CFG(DA830, EMA_A_3, 16, 4, 0xf, 1, false)
762 MUX_CFG(DA830, EMA_A_4, 16, 8, 0xf, 1, false)
763 MUX_CFG(DA830, EMA_A_5, 16, 12, 0xf, 1, false)
764 MUX_CFG(DA830, EMA_A_6, 16, 16, 0xf, 1, false)
765 MUX_CFG(DA830, EMA_A_7, 16, 20, 0xf, 1, false)
766 MUX_CFG(DA830, EMA_A_8, 16, 24, 0xf, 1, false)
767 MUX_CFG(DA830, EMA_A_9, 16, 28, 0xf, 1, false)
768 MUX_CFG(DA830, MMCSD_CMD, 16, 0, 0xf, 2, false)
769 MUX_CFG(DA830, LCD_D_6, 16, 4, 0xf, 2, false)
770 MUX_CFG(DA830, LCD_D_3, 16, 8, 0xf, 2, false)
771 MUX_CFG(DA830, LCD_D_2, 16, 12, 0xf, 2, false)
772 MUX_CFG(DA830, LCD_D_1, 16, 16, 0xf, 2, false)
773 MUX_CFG(DA830, LCD_D_0, 16, 20, 0xf, 2, false)
774 MUX_CFG(DA830, LCD_PCLK, 16, 24, 0xf, 2, false)
775 MUX_CFG(DA830, LCD_HSYNC, 16, 28, 0xf, 2, false)
776 MUX_CFG(DA830, UHPI_HCNTL1, 16, 0, 0xf, 4, false)
777 MUX_CFG(DA830, GPIO1_2, 16, 0, 0xf, 8, false)
778 MUX_CFG(DA830, GPIO1_3, 16, 4, 0xf, 8, false)
779 MUX_CFG(DA830, GPIO1_4, 16, 8, 0xf, 8, false)
780 MUX_CFG(DA830, GPIO1_5, 16, 12, 0xf, 8, false)
781 MUX_CFG(DA830, GPIO1_6, 16, 16, 0xf, 8, false)
782 MUX_CFG(DA830, GPIO1_7, 16, 20, 0xf, 8, false)
783 MUX_CFG(DA830, GPIO1_8, 16, 24, 0xf, 8, false)
784 MUX_CFG(DA830, GPIO1_9, 16, 28, 0xf, 8, false)
785 MUX_CFG(DA830, EMA_A_10, 17, 0, 0xf, 1, false)
786 MUX_CFG(DA830, EMA_A_11, 17, 4, 0xf, 1, false)
787 MUX_CFG(DA830, EMA_A_12, 17, 8, 0xf, 1, false)
788 MUX_CFG(DA830, EMA_BA_1, 17, 12, 0xf, 1, false)
789 MUX_CFG(DA830, EMA_BA_0, 17, 16, 0xf, 1, false)
790 MUX_CFG(DA830, EMA_CLK, 17, 20, 0xf, 1, false)
791 MUX_CFG(DA830, EMA_SDCKE, 17, 24, 0xf, 1, false)
792 MUX_CFG(DA830, NEMA_CAS, 17, 28, 0xf, 1, false)
793 MUX_CFG(DA830, LCD_VSYNC, 17, 0, 0xf, 2, false)
794 MUX_CFG(DA830, NLCD_AC_ENB_CS, 17, 4, 0xf, 2, false)
795 MUX_CFG(DA830, LCD_MCLK, 17, 8, 0xf, 2, false)
796 MUX_CFG(DA830, LCD_D_5, 17, 12, 0xf, 2, false)
797 MUX_CFG(DA830, LCD_D_4, 17, 16, 0xf, 2, false)
798 MUX_CFG(DA830, OBSCLK, 17, 20, 0xf, 2, false)
799 MUX_CFG(DA830, NEMA_CS_4, 17, 28, 0xf, 2, false)
800 MUX_CFG(DA830, UHPI_HHWIL, 17, 12, 0xf, 4, false)
801 MUX_CFG(DA830, AHCLKR2, 17, 20, 0xf, 4, false)
802 MUX_CFG(DA830, GPIO1_10, 17, 0, 0xf, 8, false)
803 MUX_CFG(DA830, GPIO1_11, 17, 4, 0xf, 8, false)
804 MUX_CFG(DA830, GPIO1_12, 17, 8, 0xf, 8, false)
805 MUX_CFG(DA830, GPIO1_13, 17, 12, 0xf, 8, false)
806 MUX_CFG(DA830, GPIO1_14, 17, 16, 0xf, 8, false)
807 MUX_CFG(DA830, GPIO1_15, 17, 20, 0xf, 8, false)
808 MUX_CFG(DA830, GPIO2_0, 17, 24, 0xf, 8, false)
809 MUX_CFG(DA830, GPIO2_1, 17, 28, 0xf, 8, false)
810 MUX_CFG(DA830, NEMA_RAS, 18, 0, 0xf, 1, false)
811 MUX_CFG(DA830, NEMA_WE, 18, 4, 0xf, 1, false)
812 MUX_CFG(DA830, NEMA_CS_0, 18, 8, 0xf, 1, false)
813 MUX_CFG(DA830, NEMA_CS_2, 18, 12, 0xf, 1, false)
814 MUX_CFG(DA830, NEMA_CS_3, 18, 16, 0xf, 1, false)
815 MUX_CFG(DA830, NEMA_OE, 18, 20, 0xf, 1, false)
816 MUX_CFG(DA830, NEMA_WE_DQM_1, 18, 24, 0xf, 1, false)
817 MUX_CFG(DA830, NEMA_WE_DQM_0, 18, 28, 0xf, 1, false)
818 MUX_CFG(DA830, NEMA_CS_5, 18, 0, 0xf, 2, false)
819 MUX_CFG(DA830, UHPI_HRNW, 18, 4, 0xf, 2, false)
820 MUX_CFG(DA830, NUHPI_HAS, 18, 8, 0xf, 2, false)
821 MUX_CFG(DA830, NUHPI_HCS, 18, 12, 0xf, 2, false)
822 MUX_CFG(DA830, NUHPI_HDS1, 18, 20, 0xf, 2, false)
823 MUX_CFG(DA830, NUHPI_HDS2, 18, 24, 0xf, 2, false)
824 MUX_CFG(DA830, NUHPI_HINT, 18, 28, 0xf, 2, false)
825 MUX_CFG(DA830, AXR0_12, 18, 4, 0xf, 4, false)
826 MUX_CFG(DA830, AMUTE2, 18, 16, 0xf, 4, false)
827 MUX_CFG(DA830, AXR0_13, 18, 20, 0xf, 4, false)
828 MUX_CFG(DA830, AXR0_14, 18, 24, 0xf, 4, false)
829 MUX_CFG(DA830, AXR0_15, 18, 28, 0xf, 4, false)
830 MUX_CFG(DA830, GPIO2_2, 18, 0, 0xf, 8, false)
831 MUX_CFG(DA830, GPIO2_3, 18, 4, 0xf, 8, false)
832 MUX_CFG(DA830, GPIO2_4, 18, 8, 0xf, 8, false)
833 MUX_CFG(DA830, GPIO2_5, 18, 12, 0xf, 8, false)
834 MUX_CFG(DA830, GPIO2_6, 18, 16, 0xf, 8, false)
835 MUX_CFG(DA830, GPIO2_7, 18, 20, 0xf, 8, false)
836 MUX_CFG(DA830, GPIO2_8, 18, 24, 0xf, 8, false)
837 MUX_CFG(DA830, GPIO2_9, 18, 28, 0xf, 8, false)
838 MUX_CFG(DA830, EMA_WAIT_0, 19, 0, 0xf, 1, false)
839 MUX_CFG(DA830, NUHPI_HRDY, 19, 0, 0xf, 2, false)
840 MUX_CFG(DA830, GPIO2_10, 19, 0, 0xf, 8, false)
841#endif
842};
843
844const short da830_emif25_pins[] __initdata = {
845 DA830_EMA_D_0, DA830_EMA_D_1, DA830_EMA_D_2, DA830_EMA_D_3,
846 DA830_EMA_D_4, DA830_EMA_D_5, DA830_EMA_D_6, DA830_EMA_D_7,
847 DA830_EMA_D_8, DA830_EMA_D_9, DA830_EMA_D_10, DA830_EMA_D_11,
848 DA830_EMA_D_12, DA830_EMA_D_13, DA830_EMA_D_14, DA830_EMA_D_15,
849 DA830_EMA_A_0, DA830_EMA_A_1, DA830_EMA_A_2, DA830_EMA_A_3,
850 DA830_EMA_A_4, DA830_EMA_A_5, DA830_EMA_A_6, DA830_EMA_A_7,
851 DA830_EMA_A_8, DA830_EMA_A_9, DA830_EMA_A_10, DA830_EMA_A_11,
852 DA830_EMA_A_12, DA830_EMA_BA_0, DA830_EMA_BA_1, DA830_EMA_CLK,
853 DA830_EMA_SDCKE, DA830_NEMA_CS_4, DA830_NEMA_CS_5, DA830_NEMA_WE,
854 DA830_NEMA_CS_0, DA830_NEMA_CS_2, DA830_NEMA_CS_3, DA830_NEMA_OE,
855 DA830_NEMA_WE_DQM_1, DA830_NEMA_WE_DQM_0, DA830_EMA_WAIT_0,
856 -1
857};
858
859const short da830_spi0_pins[] __initdata = {
860 DA830_SPI0_SOMI_0, DA830_SPI0_SIMO_0, DA830_SPI0_CLK, DA830_NSPI0_ENA,
861 DA830_NSPI0_SCS_0,
862 -1
863};
864
865const short da830_spi1_pins[] __initdata = {
866 DA830_SPI1_SOMI_0, DA830_SPI1_SIMO_0, DA830_SPI1_CLK, DA830_NSPI1_ENA,
867 DA830_NSPI1_SCS_0,
868 -1
869};
870
871const short da830_mmc_sd_pins[] __initdata = {
872 DA830_MMCSD_DAT_0, DA830_MMCSD_DAT_1, DA830_MMCSD_DAT_2,
873 DA830_MMCSD_DAT_3, DA830_MMCSD_DAT_4, DA830_MMCSD_DAT_5,
874 DA830_MMCSD_DAT_6, DA830_MMCSD_DAT_7, DA830_MMCSD_CLK,
875 DA830_MMCSD_CMD,
876 -1
877};
878
879const short da830_uart0_pins[] __initdata = {
880 DA830_NUART0_CTS, DA830_NUART0_RTS, DA830_UART0_RXD, DA830_UART0_TXD,
881 -1
882};
883
884const short da830_uart1_pins[] __initdata = {
885 DA830_UART1_RXD, DA830_UART1_TXD,
886 -1
887};
888
889const short da830_uart2_pins[] __initdata = {
890 DA830_UART2_RXD, DA830_UART2_TXD,
891 -1
892};
893
894const short da830_usb20_pins[] __initdata = {
895 DA830_USB0_DRVVBUS, DA830_USB_REFCLKIN,
896 -1
897};
898
899const short da830_usb11_pins[] __initdata = {
900 DA830_USB_REFCLKIN,
901 -1
902};
903
904const short da830_uhpi_pins[] __initdata = {
905 DA830_UHPI_HD_0, DA830_UHPI_HD_1, DA830_UHPI_HD_2, DA830_UHPI_HD_3,
906 DA830_UHPI_HD_4, DA830_UHPI_HD_5, DA830_UHPI_HD_6, DA830_UHPI_HD_7,
907 DA830_UHPI_HD_8, DA830_UHPI_HD_9, DA830_UHPI_HD_10, DA830_UHPI_HD_11,
908 DA830_UHPI_HD_12, DA830_UHPI_HD_13, DA830_UHPI_HD_14, DA830_UHPI_HD_15,
909 DA830_UHPI_HCNTL0, DA830_UHPI_HCNTL1, DA830_UHPI_HHWIL, DA830_UHPI_HRNW,
910 DA830_NUHPI_HAS, DA830_NUHPI_HCS, DA830_NUHPI_HDS1, DA830_NUHPI_HDS2,
911 DA830_NUHPI_HINT, DA830_NUHPI_HRDY,
912 -1
913};
914
915const short da830_cpgmac_pins[] __initdata = {
916 DA830_RMII_TXD_0, DA830_RMII_TXD_1, DA830_RMII_TXEN, DA830_RMII_CRS_DV,
917 DA830_RMII_RXD_0, DA830_RMII_RXD_1, DA830_RMII_RXER, DA830_MDIO_CLK,
918 DA830_MDIO_D,
919 -1
920};
921
922const short da830_emif3c_pins[] __initdata = {
923 DA830_EMB_SDCKE, DA830_EMB_CLK_GLUE, DA830_EMB_CLK, DA830_NEMB_CS_0,
924 DA830_NEMB_CAS, DA830_NEMB_RAS, DA830_NEMB_WE, DA830_EMB_BA_1,
925 DA830_EMB_BA_0, DA830_EMB_A_0, DA830_EMB_A_1, DA830_EMB_A_2,
926 DA830_EMB_A_3, DA830_EMB_A_4, DA830_EMB_A_5, DA830_EMB_A_6,
927 DA830_EMB_A_7, DA830_EMB_A_8, DA830_EMB_A_9, DA830_EMB_A_10,
928 DA830_EMB_A_11, DA830_EMB_A_12, DA830_NEMB_WE_DQM_3,
929 DA830_NEMB_WE_DQM_2, DA830_EMB_D_0, DA830_EMB_D_1, DA830_EMB_D_2,
930 DA830_EMB_D_3, DA830_EMB_D_4, DA830_EMB_D_5, DA830_EMB_D_6,
931 DA830_EMB_D_7, DA830_EMB_D_8, DA830_EMB_D_9, DA830_EMB_D_10,
932 DA830_EMB_D_11, DA830_EMB_D_12, DA830_EMB_D_13, DA830_EMB_D_14,
933 DA830_EMB_D_15, DA830_EMB_D_16, DA830_EMB_D_17, DA830_EMB_D_18,
934 DA830_EMB_D_19, DA830_EMB_D_20, DA830_EMB_D_21, DA830_EMB_D_22,
935 DA830_EMB_D_23, DA830_EMB_D_24, DA830_EMB_D_25, DA830_EMB_D_26,
936 DA830_EMB_D_27, DA830_EMB_D_28, DA830_EMB_D_29, DA830_EMB_D_30,
937 DA830_EMB_D_31, DA830_NEMB_WE_DQM_1, DA830_NEMB_WE_DQM_0,
938 -1
939};
940
941const short da830_mcasp0_pins[] __initdata = {
942 DA830_AHCLKX0, DA830_ACLKX0, DA830_AFSX0,
943 DA830_AHCLKR0, DA830_ACLKR0, DA830_AFSR0, DA830_AMUTE0,
944 DA830_AXR0_0, DA830_AXR0_1, DA830_AXR0_2, DA830_AXR0_3,
945 DA830_AXR0_4, DA830_AXR0_5, DA830_AXR0_6, DA830_AXR0_7,
946 DA830_AXR0_8, DA830_AXR0_9, DA830_AXR0_10, DA830_AXR0_11,
947 DA830_AXR0_12, DA830_AXR0_13, DA830_AXR0_14, DA830_AXR0_15,
948 -1
949};
950
951const short da830_mcasp1_pins[] __initdata = {
952 DA830_AHCLKX1, DA830_ACLKX1, DA830_AFSX1,
953 DA830_AHCLKR1, DA830_ACLKR1, DA830_AFSR1, DA830_AMUTE1,
954 DA830_AXR1_0, DA830_AXR1_1, DA830_AXR1_2, DA830_AXR1_3,
955 DA830_AXR1_4, DA830_AXR1_5, DA830_AXR1_6, DA830_AXR1_7,
956 DA830_AXR1_8, DA830_AXR1_9, DA830_AXR1_10, DA830_AXR1_11,
957 -1
958};
959
960const short da830_mcasp2_pins[] __initdata = {
961 DA830_AHCLKX2, DA830_ACLKX2, DA830_AFSX2,
962 DA830_AHCLKR2, DA830_ACLKR2, DA830_AFSR2, DA830_AMUTE2,
963 DA830_AXR2_0, DA830_AXR2_1, DA830_AXR2_2, DA830_AXR2_3,
964 -1
965};
966
967const short da830_i2c0_pins[] __initdata = {
968 DA830_I2C0_SDA, DA830_I2C0_SCL,
969 -1
970};
971
972const short da830_i2c1_pins[] __initdata = {
973 DA830_I2C1_SCL, DA830_I2C1_SDA,
974 -1
975};
976
977const short da830_lcdcntl_pins[] __initdata = {
978 DA830_LCD_D_0, DA830_LCD_D_1, DA830_LCD_D_2, DA830_LCD_D_3,
979 DA830_LCD_D_4, DA830_LCD_D_5, DA830_LCD_D_6, DA830_LCD_D_7,
980 DA830_LCD_D_8, DA830_LCD_D_9, DA830_LCD_D_10, DA830_LCD_D_11,
981 DA830_LCD_D_12, DA830_LCD_D_13, DA830_LCD_D_14, DA830_LCD_D_15,
982 DA830_LCD_PCLK, DA830_LCD_HSYNC, DA830_LCD_VSYNC, DA830_NLCD_AC_ENB_CS,
983 DA830_LCD_MCLK,
984 -1
985};
986
987const short da830_pwm_pins[] __initdata = {
988 DA830_ECAP0_APWM0, DA830_ECAP1_APWM1, DA830_EPWM0B, DA830_EPWM0A,
989 DA830_EPWMSYNCI, DA830_EPWMSYNC0, DA830_ECAP2_APWM2, DA830_EHRPWMGLUETZ,
990 DA830_EPWM2B, DA830_EPWM2A, DA830_EPWM1B, DA830_EPWM1A,
991 -1
992};
993
994const short da830_ecap0_pins[] __initdata = {
995 DA830_ECAP0_APWM0,
996 -1
997};
998
999const short da830_ecap1_pins[] __initdata = {
1000 DA830_ECAP1_APWM1,
1001 -1
1002};
1003
1004const short da830_ecap2_pins[] __initdata = {
1005 DA830_ECAP2_APWM2,
1006 -1
1007};
1008
1009const short da830_eqep0_pins[] __initdata = {
1010 DA830_EQEP0I, DA830_EQEP0S, DA830_EQEP0A, DA830_EQEP0B,
1011 -1
1012};
1013
1014const short da830_eqep1_pins[] __initdata = {
1015 DA830_EQEP1I, DA830_EQEP1S, DA830_EQEP1A, DA830_EQEP1B,
1016 -1
1017};
1018
1019/* FIQ are pri 0-1; otherwise 2-7, with 7 lowest priority */
1020static u8 da830_default_priorities[DA830_N_CP_INTC_IRQ] = {
1021 [IRQ_DA8XX_COMMTX] = 7,
1022 [IRQ_DA8XX_COMMRX] = 7,
1023 [IRQ_DA8XX_NINT] = 7,
1024 [IRQ_DA8XX_EVTOUT0] = 7,
1025 [IRQ_DA8XX_EVTOUT1] = 7,
1026 [IRQ_DA8XX_EVTOUT2] = 7,
1027 [IRQ_DA8XX_EVTOUT3] = 7,
1028 [IRQ_DA8XX_EVTOUT4] = 7,
1029 [IRQ_DA8XX_EVTOUT5] = 7,
1030 [IRQ_DA8XX_EVTOUT6] = 7,
1031 [IRQ_DA8XX_EVTOUT6] = 7,
1032 [IRQ_DA8XX_EVTOUT7] = 7,
1033 [IRQ_DA8XX_CCINT0] = 7,
1034 [IRQ_DA8XX_CCERRINT] = 7,
1035 [IRQ_DA8XX_TCERRINT0] = 7,
1036 [IRQ_DA8XX_AEMIFINT] = 7,
1037 [IRQ_DA8XX_I2CINT0] = 7,
1038 [IRQ_DA8XX_MMCSDINT0] = 7,
1039 [IRQ_DA8XX_MMCSDINT1] = 7,
1040 [IRQ_DA8XX_ALLINT0] = 7,
1041 [IRQ_DA8XX_RTC] = 7,
1042 [IRQ_DA8XX_SPINT0] = 7,
1043 [IRQ_DA8XX_TINT12_0] = 7,
1044 [IRQ_DA8XX_TINT34_0] = 7,
1045 [IRQ_DA8XX_TINT12_1] = 7,
1046 [IRQ_DA8XX_TINT34_1] = 7,
1047 [IRQ_DA8XX_UARTINT0] = 7,
1048 [IRQ_DA8XX_KEYMGRINT] = 7,
1049 [IRQ_DA8XX_SECINT] = 7,
1050 [IRQ_DA8XX_SECKEYERR] = 7,
1051 [IRQ_DA830_MPUERR] = 7,
1052 [IRQ_DA830_IOPUERR] = 7,
1053 [IRQ_DA830_BOOTCFGERR] = 7,
1054 [IRQ_DA8XX_CHIPINT0] = 7,
1055 [IRQ_DA8XX_CHIPINT1] = 7,
1056 [IRQ_DA8XX_CHIPINT2] = 7,
1057 [IRQ_DA8XX_CHIPINT3] = 7,
1058 [IRQ_DA8XX_TCERRINT1] = 7,
1059 [IRQ_DA8XX_C0_RX_THRESH_PULSE] = 7,
1060 [IRQ_DA8XX_C0_RX_PULSE] = 7,
1061 [IRQ_DA8XX_C0_TX_PULSE] = 7,
1062 [IRQ_DA8XX_C0_MISC_PULSE] = 7,
1063 [IRQ_DA8XX_C1_RX_THRESH_PULSE] = 7,
1064 [IRQ_DA8XX_C1_RX_PULSE] = 7,
1065 [IRQ_DA8XX_C1_TX_PULSE] = 7,
1066 [IRQ_DA8XX_C1_MISC_PULSE] = 7,
1067 [IRQ_DA8XX_MEMERR] = 7,
1068 [IRQ_DA8XX_GPIO0] = 7,
1069 [IRQ_DA8XX_GPIO1] = 7,
1070 [IRQ_DA8XX_GPIO2] = 7,
1071 [IRQ_DA8XX_GPIO3] = 7,
1072 [IRQ_DA8XX_GPIO4] = 7,
1073 [IRQ_DA8XX_GPIO5] = 7,
1074 [IRQ_DA8XX_GPIO6] = 7,
1075 [IRQ_DA8XX_GPIO7] = 7,
1076 [IRQ_DA8XX_GPIO8] = 7,
1077 [IRQ_DA8XX_I2CINT1] = 7,
1078 [IRQ_DA8XX_LCDINT] = 7,
1079 [IRQ_DA8XX_UARTINT1] = 7,
1080 [IRQ_DA8XX_MCASPINT] = 7,
1081 [IRQ_DA8XX_ALLINT1] = 7,
1082 [IRQ_DA8XX_SPINT1] = 7,
1083 [IRQ_DA8XX_UHPI_INT1] = 7,
1084 [IRQ_DA8XX_USB_INT] = 7,
1085 [IRQ_DA8XX_IRQN] = 7,
1086 [IRQ_DA8XX_RWAKEUP] = 7,
1087 [IRQ_DA8XX_UARTINT2] = 7,
1088 [IRQ_DA8XX_DFTSSINT] = 7,
1089 [IRQ_DA8XX_EHRPWM0] = 7,
1090 [IRQ_DA8XX_EHRPWM0TZ] = 7,
1091 [IRQ_DA8XX_EHRPWM1] = 7,
1092 [IRQ_DA8XX_EHRPWM1TZ] = 7,
1093 [IRQ_DA830_EHRPWM2] = 7,
1094 [IRQ_DA830_EHRPWM2TZ] = 7,
1095 [IRQ_DA8XX_ECAP0] = 7,
1096 [IRQ_DA8XX_ECAP1] = 7,
1097 [IRQ_DA8XX_ECAP2] = 7,
1098 [IRQ_DA830_EQEP0] = 7,
1099 [IRQ_DA830_EQEP1] = 7,
1100 [IRQ_DA830_T12CMPINT0_0] = 7,
1101 [IRQ_DA830_T12CMPINT1_0] = 7,
1102 [IRQ_DA830_T12CMPINT2_0] = 7,
1103 [IRQ_DA830_T12CMPINT3_0] = 7,
1104 [IRQ_DA830_T12CMPINT4_0] = 7,
1105 [IRQ_DA830_T12CMPINT5_0] = 7,
1106 [IRQ_DA830_T12CMPINT6_0] = 7,
1107 [IRQ_DA830_T12CMPINT7_0] = 7,
1108 [IRQ_DA830_T12CMPINT0_1] = 7,
1109 [IRQ_DA830_T12CMPINT1_1] = 7,
1110 [IRQ_DA830_T12CMPINT2_1] = 7,
1111 [IRQ_DA830_T12CMPINT3_1] = 7,
1112 [IRQ_DA830_T12CMPINT4_1] = 7,
1113 [IRQ_DA830_T12CMPINT5_1] = 7,
1114 [IRQ_DA830_T12CMPINT6_1] = 7,
1115 [IRQ_DA830_T12CMPINT7_1] = 7,
1116 [IRQ_DA8XX_ARMCLKSTOPREQ] = 7,
1117};
1118
1119static struct map_desc da830_io_desc[] = {
1120 {
1121 .virtual = IO_VIRT,
1122 .pfn = __phys_to_pfn(IO_PHYS),
1123 .length = IO_SIZE,
1124 .type = MT_DEVICE
1125 },
1126 {
1127 .virtual = DA8XX_CP_INTC_VIRT,
1128 .pfn = __phys_to_pfn(DA8XX_CP_INTC_BASE),
1129 .length = DA8XX_CP_INTC_SIZE,
1130 .type = MT_DEVICE
1131 },
1132};
1133
1134static void __iomem *da830_psc_bases[] = {
1135 IO_ADDRESS(DA8XX_PSC0_BASE),
1136 IO_ADDRESS(DA8XX_PSC1_BASE),
1137};
1138
1139/* Contents of JTAG ID register used to identify exact cpu type */
1140static struct davinci_id da830_ids[] = {
1141 {
1142 .variant = 0x0,
1143 .part_no = 0xb7df,
1144 .manufacturer = 0x017, /* 0x02f >> 1 */
1145 .cpu_id = DAVINCI_CPU_ID_DA830,
1146 .name = "da830/omap l137",
1147 },
1148};
1149
1150static struct davinci_timer_instance da830_timer_instance[2] = {
1151 {
1152 .base = IO_ADDRESS(DA8XX_TIMER64P0_BASE),
1153 .bottom_irq = IRQ_DA8XX_TINT12_0,
1154 .top_irq = IRQ_DA8XX_TINT34_0,
1155 .cmp_off = DA830_CMP12_0,
1156 .cmp_irq = IRQ_DA830_T12CMPINT0_0,
1157 },
1158 {
1159 .base = IO_ADDRESS(DA8XX_TIMER64P1_BASE),
1160 .bottom_irq = IRQ_DA8XX_TINT12_1,
1161 .top_irq = IRQ_DA8XX_TINT34_1,
1162 .cmp_off = DA830_CMP12_0,
1163 .cmp_irq = IRQ_DA830_T12CMPINT0_1,
1164 },
1165};
1166
1167/*
1168 * T0_BOT: Timer 0, bottom : Used for clock_event & clocksource
1169 * T0_TOP: Timer 0, top : Used by DSP
1170 * T1_BOT, T1_TOP: Timer 1, bottom & top: Used for watchdog timer
1171 */
1172static struct davinci_timer_info da830_timer_info = {
1173 .timers = da830_timer_instance,
1174 .clockevent_id = T0_BOT,
1175 .clocksource_id = T0_BOT,
1176};
1177
1178static struct davinci_soc_info davinci_soc_info_da830 = {
1179 .io_desc = da830_io_desc,
1180 .io_desc_num = ARRAY_SIZE(da830_io_desc),
1181 .jtag_id_base = IO_ADDRESS(DA8XX_JTAG_ID_REG),
1182 .ids = da830_ids,
1183 .ids_num = ARRAY_SIZE(da830_ids),
1184 .cpu_clks = da830_clks,
1185 .psc_bases = da830_psc_bases,
1186 .psc_bases_num = ARRAY_SIZE(da830_psc_bases),
1187 .pinmux_base = IO_ADDRESS(DA8XX_BOOT_CFG_BASE + 0x120),
1188 .pinmux_pins = da830_pins,
1189 .pinmux_pins_num = ARRAY_SIZE(da830_pins),
1190 .intc_base = (void __iomem *)DA8XX_CP_INTC_VIRT,
1191 .intc_type = DAVINCI_INTC_TYPE_CP_INTC,
1192 .intc_irq_prios = da830_default_priorities,
1193 .intc_irq_num = DA830_N_CP_INTC_IRQ,
1194 .timer_info = &da830_timer_info,
1195 .gpio_base = IO_ADDRESS(DA8XX_GPIO_BASE),
1196 .gpio_num = 128,
1197 .gpio_irq = IRQ_DA8XX_GPIO0,
1198 .serial_dev = &da8xx_serial_device,
1199 .emac_pdata = &da8xx_emac_pdata,
1200};
1201
1202void __init da830_init(void)
1203{
1204 davinci_common_init(&davinci_soc_info_da830);
1205}
diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c
new file mode 100644
index 000000000000..192d719a47df
--- /dev/null
+++ b/arch/arm/mach-davinci/da850.c
@@ -0,0 +1,820 @@
1/*
2 * TI DA850/OMAP-L138 chip specific setup
3 *
4 * Copyright (C) 2009 Texas Instruments Incorporated - http://www.ti.com/
5 *
6 * Derived from: arch/arm/mach-davinci/da830.c
7 * Original Copyrights follow:
8 *
9 * 2009 (c) MontaVista Software, Inc. This file is licensed under
10 * the terms of the GNU General Public License version 2. This program
11 * is licensed "as is" without any warranty of any kind, whether express
12 * or implied.
13 */
14#include <linux/kernel.h>
15#include <linux/init.h>
16#include <linux/clk.h>
17#include <linux/platform_device.h>
18
19#include <asm/mach/map.h>
20
21#include <mach/clock.h>
22#include <mach/psc.h>
23#include <mach/mux.h>
24#include <mach/irqs.h>
25#include <mach/cputype.h>
26#include <mach/common.h>
27#include <mach/time.h>
28#include <mach/da8xx.h>
29
30#include "clock.h"
31#include "mux.h"
32
33#define DA850_PLL1_BASE 0x01e1a000
34#define DA850_TIMER64P2_BASE 0x01f0c000
35#define DA850_TIMER64P3_BASE 0x01f0d000
36
37#define DA850_REF_FREQ 24000000
38
39static struct pll_data pll0_data = {
40 .num = 1,
41 .phys_base = DA8XX_PLL0_BASE,
42 .flags = PLL_HAS_PREDIV | PLL_HAS_POSTDIV,
43};
44
45static struct clk ref_clk = {
46 .name = "ref_clk",
47 .rate = DA850_REF_FREQ,
48};
49
50static struct clk pll0_clk = {
51 .name = "pll0",
52 .parent = &ref_clk,
53 .pll_data = &pll0_data,
54 .flags = CLK_PLL,
55};
56
57static struct clk pll0_aux_clk = {
58 .name = "pll0_aux_clk",
59 .parent = &pll0_clk,
60 .flags = CLK_PLL | PRE_PLL,
61};
62
63static struct clk pll0_sysclk2 = {
64 .name = "pll0_sysclk2",
65 .parent = &pll0_clk,
66 .flags = CLK_PLL,
67 .div_reg = PLLDIV2,
68};
69
70static struct clk pll0_sysclk3 = {
71 .name = "pll0_sysclk3",
72 .parent = &pll0_clk,
73 .flags = CLK_PLL,
74 .div_reg = PLLDIV3,
75};
76
77static struct clk pll0_sysclk4 = {
78 .name = "pll0_sysclk4",
79 .parent = &pll0_clk,
80 .flags = CLK_PLL,
81 .div_reg = PLLDIV4,
82};
83
84static struct clk pll0_sysclk5 = {
85 .name = "pll0_sysclk5",
86 .parent = &pll0_clk,
87 .flags = CLK_PLL,
88 .div_reg = PLLDIV5,
89};
90
91static struct clk pll0_sysclk6 = {
92 .name = "pll0_sysclk6",
93 .parent = &pll0_clk,
94 .flags = CLK_PLL,
95 .div_reg = PLLDIV6,
96};
97
98static struct clk pll0_sysclk7 = {
99 .name = "pll0_sysclk7",
100 .parent = &pll0_clk,
101 .flags = CLK_PLL,
102 .div_reg = PLLDIV7,
103};
104
105static struct pll_data pll1_data = {
106 .num = 2,
107 .phys_base = DA850_PLL1_BASE,
108 .flags = PLL_HAS_POSTDIV,
109};
110
111static struct clk pll1_clk = {
112 .name = "pll1",
113 .parent = &ref_clk,
114 .pll_data = &pll1_data,
115 .flags = CLK_PLL,
116};
117
118static struct clk pll1_aux_clk = {
119 .name = "pll1_aux_clk",
120 .parent = &pll1_clk,
121 .flags = CLK_PLL | PRE_PLL,
122};
123
124static struct clk pll1_sysclk2 = {
125 .name = "pll1_sysclk2",
126 .parent = &pll1_clk,
127 .flags = CLK_PLL,
128 .div_reg = PLLDIV2,
129};
130
131static struct clk pll1_sysclk3 = {
132 .name = "pll1_sysclk3",
133 .parent = &pll1_clk,
134 .flags = CLK_PLL,
135 .div_reg = PLLDIV3,
136};
137
138static struct clk pll1_sysclk4 = {
139 .name = "pll1_sysclk4",
140 .parent = &pll1_clk,
141 .flags = CLK_PLL,
142 .div_reg = PLLDIV4,
143};
144
145static struct clk pll1_sysclk5 = {
146 .name = "pll1_sysclk5",
147 .parent = &pll1_clk,
148 .flags = CLK_PLL,
149 .div_reg = PLLDIV5,
150};
151
152static struct clk pll1_sysclk6 = {
153 .name = "pll0_sysclk6",
154 .parent = &pll0_clk,
155 .flags = CLK_PLL,
156 .div_reg = PLLDIV6,
157};
158
159static struct clk pll1_sysclk7 = {
160 .name = "pll1_sysclk7",
161 .parent = &pll1_clk,
162 .flags = CLK_PLL,
163 .div_reg = PLLDIV7,
164};
165
166static struct clk i2c0_clk = {
167 .name = "i2c0",
168 .parent = &pll0_aux_clk,
169};
170
171static struct clk timerp64_0_clk = {
172 .name = "timer0",
173 .parent = &pll0_aux_clk,
174};
175
176static struct clk timerp64_1_clk = {
177 .name = "timer1",
178 .parent = &pll0_aux_clk,
179};
180
181static struct clk arm_rom_clk = {
182 .name = "arm_rom",
183 .parent = &pll0_sysclk2,
184 .lpsc = DA8XX_LPSC0_ARM_RAM_ROM,
185 .flags = ALWAYS_ENABLED,
186};
187
188static struct clk tpcc0_clk = {
189 .name = "tpcc0",
190 .parent = &pll0_sysclk2,
191 .lpsc = DA8XX_LPSC0_TPCC,
192 .flags = ALWAYS_ENABLED | CLK_PSC,
193};
194
195static struct clk tptc0_clk = {
196 .name = "tptc0",
197 .parent = &pll0_sysclk2,
198 .lpsc = DA8XX_LPSC0_TPTC0,
199 .flags = ALWAYS_ENABLED,
200};
201
202static struct clk tptc1_clk = {
203 .name = "tptc1",
204 .parent = &pll0_sysclk2,
205 .lpsc = DA8XX_LPSC0_TPTC1,
206 .flags = ALWAYS_ENABLED,
207};
208
209static struct clk tpcc1_clk = {
210 .name = "tpcc1",
211 .parent = &pll0_sysclk2,
212 .lpsc = DA850_LPSC1_TPCC1,
213 .flags = CLK_PSC | ALWAYS_ENABLED,
214 .psc_ctlr = 1,
215};
216
217static struct clk tptc2_clk = {
218 .name = "tptc2",
219 .parent = &pll0_sysclk2,
220 .lpsc = DA850_LPSC1_TPTC2,
221 .flags = ALWAYS_ENABLED,
222 .psc_ctlr = 1,
223};
224
225static struct clk uart0_clk = {
226 .name = "uart0",
227 .parent = &pll0_sysclk2,
228 .lpsc = DA8XX_LPSC0_UART0,
229};
230
231static struct clk uart1_clk = {
232 .name = "uart1",
233 .parent = &pll0_sysclk2,
234 .lpsc = DA8XX_LPSC1_UART1,
235 .psc_ctlr = 1,
236};
237
238static struct clk uart2_clk = {
239 .name = "uart2",
240 .parent = &pll0_sysclk2,
241 .lpsc = DA8XX_LPSC1_UART2,
242 .psc_ctlr = 1,
243};
244
245static struct clk aintc_clk = {
246 .name = "aintc",
247 .parent = &pll0_sysclk4,
248 .lpsc = DA8XX_LPSC0_AINTC,
249 .flags = ALWAYS_ENABLED,
250};
251
252static struct clk gpio_clk = {
253 .name = "gpio",
254 .parent = &pll0_sysclk4,
255 .lpsc = DA8XX_LPSC1_GPIO,
256 .psc_ctlr = 1,
257};
258
259static struct clk i2c1_clk = {
260 .name = "i2c1",
261 .parent = &pll0_sysclk4,
262 .lpsc = DA8XX_LPSC1_I2C,
263 .psc_ctlr = 1,
264};
265
266static struct clk emif3_clk = {
267 .name = "emif3",
268 .parent = &pll0_sysclk5,
269 .lpsc = DA8XX_LPSC1_EMIF3C,
270 .flags = ALWAYS_ENABLED,
271 .psc_ctlr = 1,
272};
273
274static struct clk arm_clk = {
275 .name = "arm",
276 .parent = &pll0_sysclk6,
277 .lpsc = DA8XX_LPSC0_ARM,
278 .flags = ALWAYS_ENABLED,
279};
280
281static struct clk rmii_clk = {
282 .name = "rmii",
283 .parent = &pll0_sysclk7,
284};
285
286static struct clk emac_clk = {
287 .name = "emac",
288 .parent = &pll0_sysclk4,
289 .lpsc = DA8XX_LPSC1_CPGMAC,
290 .psc_ctlr = 1,
291};
292
293static struct clk mcasp_clk = {
294 .name = "mcasp",
295 .parent = &pll0_sysclk2,
296 .lpsc = DA8XX_LPSC1_McASP0,
297 .psc_ctlr = 1,
298};
299
300static struct clk lcdc_clk = {
301 .name = "lcdc",
302 .parent = &pll0_sysclk2,
303 .lpsc = DA8XX_LPSC1_LCDC,
304 .psc_ctlr = 1,
305};
306
307static struct clk mmcsd_clk = {
308 .name = "mmcsd",
309 .parent = &pll0_sysclk2,
310 .lpsc = DA8XX_LPSC0_MMC_SD,
311};
312
313static struct clk aemif_clk = {
314 .name = "aemif",
315 .parent = &pll0_sysclk3,
316 .lpsc = DA8XX_LPSC0_EMIF25,
317 .flags = ALWAYS_ENABLED,
318};
319
320static struct davinci_clk da850_clks[] = {
321 CLK(NULL, "ref", &ref_clk),
322 CLK(NULL, "pll0", &pll0_clk),
323 CLK(NULL, "pll0_aux", &pll0_aux_clk),
324 CLK(NULL, "pll0_sysclk2", &pll0_sysclk2),
325 CLK(NULL, "pll0_sysclk3", &pll0_sysclk3),
326 CLK(NULL, "pll0_sysclk4", &pll0_sysclk4),
327 CLK(NULL, "pll0_sysclk5", &pll0_sysclk5),
328 CLK(NULL, "pll0_sysclk6", &pll0_sysclk6),
329 CLK(NULL, "pll0_sysclk7", &pll0_sysclk7),
330 CLK(NULL, "pll1", &pll1_clk),
331 CLK(NULL, "pll1_aux", &pll1_aux_clk),
332 CLK(NULL, "pll1_sysclk2", &pll1_sysclk2),
333 CLK(NULL, "pll1_sysclk3", &pll1_sysclk3),
334 CLK(NULL, "pll1_sysclk4", &pll1_sysclk4),
335 CLK(NULL, "pll1_sysclk5", &pll1_sysclk5),
336 CLK(NULL, "pll1_sysclk6", &pll1_sysclk6),
337 CLK(NULL, "pll1_sysclk7", &pll1_sysclk7),
338 CLK("i2c_davinci.1", NULL, &i2c0_clk),
339 CLK(NULL, "timer0", &timerp64_0_clk),
340 CLK("watchdog", NULL, &timerp64_1_clk),
341 CLK(NULL, "arm_rom", &arm_rom_clk),
342 CLK(NULL, "tpcc0", &tpcc0_clk),
343 CLK(NULL, "tptc0", &tptc0_clk),
344 CLK(NULL, "tptc1", &tptc1_clk),
345 CLK(NULL, "tpcc1", &tpcc1_clk),
346 CLK(NULL, "tptc2", &tptc2_clk),
347 CLK(NULL, "uart0", &uart0_clk),
348 CLK(NULL, "uart1", &uart1_clk),
349 CLK(NULL, "uart2", &uart2_clk),
350 CLK(NULL, "aintc", &aintc_clk),
351 CLK(NULL, "gpio", &gpio_clk),
352 CLK("i2c_davinci.2", NULL, &i2c1_clk),
353 CLK(NULL, "emif3", &emif3_clk),
354 CLK(NULL, "arm", &arm_clk),
355 CLK(NULL, "rmii", &rmii_clk),
356 CLK("davinci_emac.1", NULL, &emac_clk),
357 CLK("davinci-mcasp.0", NULL, &mcasp_clk),
358 CLK("da8xx_lcdc.0", NULL, &lcdc_clk),
359 CLK("davinci_mmc.0", NULL, &mmcsd_clk),
360 CLK(NULL, "aemif", &aemif_clk),
361 CLK(NULL, NULL, NULL),
362};
363
364/*
365 * Device specific mux setup
366 *
367 * soc description mux mode mode mux dbg
368 * reg offset mask mode
369 */
370static const struct mux_config da850_pins[] = {
371#ifdef CONFIG_DAVINCI_MUX
372 /* UART0 function */
373 MUX_CFG(DA850, NUART0_CTS, 3, 24, 15, 2, false)
374 MUX_CFG(DA850, NUART0_RTS, 3, 28, 15, 2, false)
375 MUX_CFG(DA850, UART0_RXD, 3, 16, 15, 2, false)
376 MUX_CFG(DA850, UART0_TXD, 3, 20, 15, 2, false)
377 /* UART1 function */
378 MUX_CFG(DA850, UART1_RXD, 4, 24, 15, 2, false)
379 MUX_CFG(DA850, UART1_TXD, 4, 28, 15, 2, false)
380 /* UART2 function */
381 MUX_CFG(DA850, UART2_RXD, 4, 16, 15, 2, false)
382 MUX_CFG(DA850, UART2_TXD, 4, 20, 15, 2, false)
383 /* I2C1 function */
384 MUX_CFG(DA850, I2C1_SCL, 4, 16, 15, 4, false)
385 MUX_CFG(DA850, I2C1_SDA, 4, 20, 15, 4, false)
386 /* I2C0 function */
387 MUX_CFG(DA850, I2C0_SDA, 4, 12, 15, 2, false)
388 MUX_CFG(DA850, I2C0_SCL, 4, 8, 15, 2, false)
389 /* EMAC function */
390 MUX_CFG(DA850, MII_TXEN, 2, 4, 15, 8, false)
391 MUX_CFG(DA850, MII_TXCLK, 2, 8, 15, 8, false)
392 MUX_CFG(DA850, MII_COL, 2, 12, 15, 8, false)
393 MUX_CFG(DA850, MII_TXD_3, 2, 16, 15, 8, false)
394 MUX_CFG(DA850, MII_TXD_2, 2, 20, 15, 8, false)
395 MUX_CFG(DA850, MII_TXD_1, 2, 24, 15, 8, false)
396 MUX_CFG(DA850, MII_TXD_0, 2, 28, 15, 8, false)
397 MUX_CFG(DA850, MII_RXCLK, 3, 0, 15, 8, false)
398 MUX_CFG(DA850, MII_RXDV, 3, 4, 15, 8, false)
399 MUX_CFG(DA850, MII_RXER, 3, 8, 15, 8, false)
400 MUX_CFG(DA850, MII_CRS, 3, 12, 15, 8, false)
401 MUX_CFG(DA850, MII_RXD_3, 3, 16, 15, 8, false)
402 MUX_CFG(DA850, MII_RXD_2, 3, 20, 15, 8, false)
403 MUX_CFG(DA850, MII_RXD_1, 3, 24, 15, 8, false)
404 MUX_CFG(DA850, MII_RXD_0, 3, 28, 15, 8, false)
405 MUX_CFG(DA850, MDIO_CLK, 4, 0, 15, 8, false)
406 MUX_CFG(DA850, MDIO_D, 4, 4, 15, 8, false)
407 /* McASP function */
408 MUX_CFG(DA850, ACLKR, 0, 0, 15, 1, false)
409 MUX_CFG(DA850, ACLKX, 0, 4, 15, 1, false)
410 MUX_CFG(DA850, AFSR, 0, 8, 15, 1, false)
411 MUX_CFG(DA850, AFSX, 0, 12, 15, 1, false)
412 MUX_CFG(DA850, AHCLKR, 0, 16, 15, 1, false)
413 MUX_CFG(DA850, AHCLKX, 0, 20, 15, 1, false)
414 MUX_CFG(DA850, AMUTE, 0, 24, 15, 1, false)
415 MUX_CFG(DA850, AXR_15, 1, 0, 15, 1, false)
416 MUX_CFG(DA850, AXR_14, 1, 4, 15, 1, false)
417 MUX_CFG(DA850, AXR_13, 1, 8, 15, 1, false)
418 MUX_CFG(DA850, AXR_12, 1, 12, 15, 1, false)
419 MUX_CFG(DA850, AXR_11, 1, 16, 15, 1, false)
420 MUX_CFG(DA850, AXR_10, 1, 20, 15, 1, false)
421 MUX_CFG(DA850, AXR_9, 1, 24, 15, 1, false)
422 MUX_CFG(DA850, AXR_8, 1, 28, 15, 1, false)
423 MUX_CFG(DA850, AXR_7, 2, 0, 15, 1, false)
424 MUX_CFG(DA850, AXR_6, 2, 4, 15, 1, false)
425 MUX_CFG(DA850, AXR_5, 2, 8, 15, 1, false)
426 MUX_CFG(DA850, AXR_4, 2, 12, 15, 1, false)
427 MUX_CFG(DA850, AXR_3, 2, 16, 15, 1, false)
428 MUX_CFG(DA850, AXR_2, 2, 20, 15, 1, false)
429 MUX_CFG(DA850, AXR_1, 2, 24, 15, 1, false)
430 MUX_CFG(DA850, AXR_0, 2, 28, 15, 1, false)
431 /* LCD function */
432 MUX_CFG(DA850, LCD_D_7, 16, 8, 15, 2, false)
433 MUX_CFG(DA850, LCD_D_6, 16, 12, 15, 2, false)
434 MUX_CFG(DA850, LCD_D_5, 16, 16, 15, 2, false)
435 MUX_CFG(DA850, LCD_D_4, 16, 20, 15, 2, false)
436 MUX_CFG(DA850, LCD_D_3, 16, 24, 15, 2, false)
437 MUX_CFG(DA850, LCD_D_2, 16, 28, 15, 2, false)
438 MUX_CFG(DA850, LCD_D_1, 17, 0, 15, 2, false)
439 MUX_CFG(DA850, LCD_D_0, 17, 4, 15, 2, false)
440 MUX_CFG(DA850, LCD_D_15, 17, 8, 15, 2, false)
441 MUX_CFG(DA850, LCD_D_14, 17, 12, 15, 2, false)
442 MUX_CFG(DA850, LCD_D_13, 17, 16, 15, 2, false)
443 MUX_CFG(DA850, LCD_D_12, 17, 20, 15, 2, false)
444 MUX_CFG(DA850, LCD_D_11, 17, 24, 15, 2, false)
445 MUX_CFG(DA850, LCD_D_10, 17, 28, 15, 2, false)
446 MUX_CFG(DA850, LCD_D_9, 18, 0, 15, 2, false)
447 MUX_CFG(DA850, LCD_D_8, 18, 4, 15, 2, false)
448 MUX_CFG(DA850, LCD_PCLK, 18, 24, 15, 2, false)
449 MUX_CFG(DA850, LCD_HSYNC, 19, 0, 15, 2, false)
450 MUX_CFG(DA850, LCD_VSYNC, 19, 4, 15, 2, false)
451 MUX_CFG(DA850, NLCD_AC_ENB_CS, 19, 24, 15, 2, false)
452 /* MMC/SD0 function */
453 MUX_CFG(DA850, MMCSD0_DAT_0, 10, 8, 15, 2, false)
454 MUX_CFG(DA850, MMCSD0_DAT_1, 10, 12, 15, 2, false)
455 MUX_CFG(DA850, MMCSD0_DAT_2, 10, 16, 15, 2, false)
456 MUX_CFG(DA850, MMCSD0_DAT_3, 10, 20, 15, 2, false)
457 MUX_CFG(DA850, MMCSD0_CLK, 10, 0, 15, 2, false)
458 MUX_CFG(DA850, MMCSD0_CMD, 10, 4, 15, 2, false)
459 /* EMIF2.5/EMIFA function */
460 MUX_CFG(DA850, EMA_D_7, 9, 0, 15, 1, false)
461 MUX_CFG(DA850, EMA_D_6, 9, 4, 15, 1, false)
462 MUX_CFG(DA850, EMA_D_5, 9, 8, 15, 1, false)
463 MUX_CFG(DA850, EMA_D_4, 9, 12, 15, 1, false)
464 MUX_CFG(DA850, EMA_D_3, 9, 16, 15, 1, false)
465 MUX_CFG(DA850, EMA_D_2, 9, 20, 15, 1, false)
466 MUX_CFG(DA850, EMA_D_1, 9, 24, 15, 1, false)
467 MUX_CFG(DA850, EMA_D_0, 9, 28, 15, 1, false)
468 MUX_CFG(DA850, EMA_A_1, 12, 24, 15, 1, false)
469 MUX_CFG(DA850, EMA_A_2, 12, 20, 15, 1, false)
470 MUX_CFG(DA850, NEMA_CS_3, 7, 4, 15, 1, false)
471 MUX_CFG(DA850, NEMA_CS_4, 7, 8, 15, 1, false)
472 MUX_CFG(DA850, NEMA_WE, 7, 16, 15, 1, false)
473 MUX_CFG(DA850, NEMA_OE, 7, 20, 15, 1, false)
474 MUX_CFG(DA850, EMA_A_0, 12, 28, 15, 1, false)
475 MUX_CFG(DA850, EMA_A_3, 12, 16, 15, 1, false)
476 MUX_CFG(DA850, EMA_A_4, 12, 12, 15, 1, false)
477 MUX_CFG(DA850, EMA_A_5, 12, 8, 15, 1, false)
478 MUX_CFG(DA850, EMA_A_6, 12, 4, 15, 1, false)
479 MUX_CFG(DA850, EMA_A_7, 12, 0, 15, 1, false)
480 MUX_CFG(DA850, EMA_A_8, 11, 28, 15, 1, false)
481 MUX_CFG(DA850, EMA_A_9, 11, 24, 15, 1, false)
482 MUX_CFG(DA850, EMA_A_10, 11, 20, 15, 1, false)
483 MUX_CFG(DA850, EMA_A_11, 11, 16, 15, 1, false)
484 MUX_CFG(DA850, EMA_A_12, 11, 12, 15, 1, false)
485 MUX_CFG(DA850, EMA_A_13, 11, 8, 15, 1, false)
486 MUX_CFG(DA850, EMA_A_14, 11, 4, 15, 1, false)
487 MUX_CFG(DA850, EMA_A_15, 11, 0, 15, 1, false)
488 MUX_CFG(DA850, EMA_A_16, 10, 28, 15, 1, false)
489 MUX_CFG(DA850, EMA_A_17, 10, 24, 15, 1, false)
490 MUX_CFG(DA850, EMA_A_18, 10, 20, 15, 1, false)
491 MUX_CFG(DA850, EMA_A_19, 10, 16, 15, 1, false)
492 MUX_CFG(DA850, EMA_A_20, 10, 12, 15, 1, false)
493 MUX_CFG(DA850, EMA_A_21, 10, 8, 15, 1, false)
494 MUX_CFG(DA850, EMA_A_22, 10, 4, 15, 1, false)
495 MUX_CFG(DA850, EMA_A_23, 10, 0, 15, 1, false)
496 MUX_CFG(DA850, EMA_D_8, 8, 28, 15, 1, false)
497 MUX_CFG(DA850, EMA_D_9, 8, 24, 15, 1, false)
498 MUX_CFG(DA850, EMA_D_10, 8, 20, 15, 1, false)
499 MUX_CFG(DA850, EMA_D_11, 8, 16, 15, 1, false)
500 MUX_CFG(DA850, EMA_D_12, 8, 12, 15, 1, false)
501 MUX_CFG(DA850, EMA_D_13, 8, 8, 15, 1, false)
502 MUX_CFG(DA850, EMA_D_14, 8, 4, 15, 1, false)
503 MUX_CFG(DA850, EMA_D_15, 8, 0, 15, 1, false)
504 MUX_CFG(DA850, EMA_BA_1, 5, 24, 15, 1, false)
505 MUX_CFG(DA850, EMA_CLK, 6, 0, 15, 1, false)
506 MUX_CFG(DA850, EMA_WAIT_1, 6, 24, 15, 1, false)
507 MUX_CFG(DA850, NEMA_CS_2, 7, 0, 15, 1, false)
508 /* GPIO function */
509 MUX_CFG(DA850, GPIO2_15, 5, 0, 15, 8, false)
510 MUX_CFG(DA850, GPIO8_10, 18, 28, 15, 8, false)
511 MUX_CFG(DA850, GPIO4_0, 10, 28, 15, 8, false)
512 MUX_CFG(DA850, GPIO4_1, 10, 24, 15, 8, false)
513#endif
514};
515
516const short da850_uart0_pins[] __initdata = {
517 DA850_NUART0_CTS, DA850_NUART0_RTS, DA850_UART0_RXD, DA850_UART0_TXD,
518 -1
519};
520
521const short da850_uart1_pins[] __initdata = {
522 DA850_UART1_RXD, DA850_UART1_TXD,
523 -1
524};
525
526const short da850_uart2_pins[] __initdata = {
527 DA850_UART2_RXD, DA850_UART2_TXD,
528 -1
529};
530
531const short da850_i2c0_pins[] __initdata = {
532 DA850_I2C0_SDA, DA850_I2C0_SCL,
533 -1
534};
535
536const short da850_i2c1_pins[] __initdata = {
537 DA850_I2C1_SCL, DA850_I2C1_SDA,
538 -1
539};
540
541const short da850_cpgmac_pins[] __initdata = {
542 DA850_MII_TXEN, DA850_MII_TXCLK, DA850_MII_COL, DA850_MII_TXD_3,
543 DA850_MII_TXD_2, DA850_MII_TXD_1, DA850_MII_TXD_0, DA850_MII_RXER,
544 DA850_MII_CRS, DA850_MII_RXCLK, DA850_MII_RXDV, DA850_MII_RXD_3,
545 DA850_MII_RXD_2, DA850_MII_RXD_1, DA850_MII_RXD_0, DA850_MDIO_CLK,
546 DA850_MDIO_D,
547 -1
548};
549
550const short da850_mcasp_pins[] __initdata = {
551 DA850_AHCLKX, DA850_ACLKX, DA850_AFSX,
552 DA850_AHCLKR, DA850_ACLKR, DA850_AFSR, DA850_AMUTE,
553 DA850_AXR_11, DA850_AXR_12,
554 -1
555};
556
557const short da850_lcdcntl_pins[] __initdata = {
558 DA850_LCD_D_1, DA850_LCD_D_2, DA850_LCD_D_3, DA850_LCD_D_4,
559 DA850_LCD_D_5, DA850_LCD_D_6, DA850_LCD_D_7, DA850_LCD_D_8,
560 DA850_LCD_D_9, DA850_LCD_D_10, DA850_LCD_D_11, DA850_LCD_D_12,
561 DA850_LCD_D_13, DA850_LCD_D_14, DA850_LCD_D_15, DA850_LCD_PCLK,
562 DA850_LCD_HSYNC, DA850_LCD_VSYNC, DA850_NLCD_AC_ENB_CS, DA850_GPIO2_15,
563 DA850_GPIO8_10,
564 -1
565};
566
567const short da850_mmcsd0_pins[] __initdata = {
568 DA850_MMCSD0_DAT_0, DA850_MMCSD0_DAT_1, DA850_MMCSD0_DAT_2,
569 DA850_MMCSD0_DAT_3, DA850_MMCSD0_CLK, DA850_MMCSD0_CMD,
570 DA850_GPIO4_0, DA850_GPIO4_1,
571 -1
572};
573
574const short da850_nand_pins[] __initdata = {
575 DA850_EMA_D_7, DA850_EMA_D_6, DA850_EMA_D_5, DA850_EMA_D_4,
576 DA850_EMA_D_3, DA850_EMA_D_2, DA850_EMA_D_1, DA850_EMA_D_0,
577 DA850_EMA_A_1, DA850_EMA_A_2, DA850_NEMA_CS_3, DA850_NEMA_CS_4,
578 DA850_NEMA_WE, DA850_NEMA_OE,
579 -1
580};
581
582const short da850_nor_pins[] __initdata = {
583 DA850_EMA_BA_1, DA850_EMA_CLK, DA850_EMA_WAIT_1, DA850_NEMA_CS_2,
584 DA850_NEMA_WE, DA850_NEMA_OE, DA850_EMA_D_0, DA850_EMA_D_1,
585 DA850_EMA_D_2, DA850_EMA_D_3, DA850_EMA_D_4, DA850_EMA_D_5,
586 DA850_EMA_D_6, DA850_EMA_D_7, DA850_EMA_D_8, DA850_EMA_D_9,
587 DA850_EMA_D_10, DA850_EMA_D_11, DA850_EMA_D_12, DA850_EMA_D_13,
588 DA850_EMA_D_14, DA850_EMA_D_15, DA850_EMA_A_0, DA850_EMA_A_1,
589 DA850_EMA_A_2, DA850_EMA_A_3, DA850_EMA_A_4, DA850_EMA_A_5,
590 DA850_EMA_A_6, DA850_EMA_A_7, DA850_EMA_A_8, DA850_EMA_A_9,
591 DA850_EMA_A_10, DA850_EMA_A_11, DA850_EMA_A_12, DA850_EMA_A_13,
592 DA850_EMA_A_14, DA850_EMA_A_15, DA850_EMA_A_16, DA850_EMA_A_17,
593 DA850_EMA_A_18, DA850_EMA_A_19, DA850_EMA_A_20, DA850_EMA_A_21,
594 DA850_EMA_A_22, DA850_EMA_A_23,
595 -1
596};
597
598/* FIQ are pri 0-1; otherwise 2-7, with 7 lowest priority */
599static u8 da850_default_priorities[DA850_N_CP_INTC_IRQ] = {
600 [IRQ_DA8XX_COMMTX] = 7,
601 [IRQ_DA8XX_COMMRX] = 7,
602 [IRQ_DA8XX_NINT] = 7,
603 [IRQ_DA8XX_EVTOUT0] = 7,
604 [IRQ_DA8XX_EVTOUT1] = 7,
605 [IRQ_DA8XX_EVTOUT2] = 7,
606 [IRQ_DA8XX_EVTOUT3] = 7,
607 [IRQ_DA8XX_EVTOUT4] = 7,
608 [IRQ_DA8XX_EVTOUT5] = 7,
609 [IRQ_DA8XX_EVTOUT6] = 7,
610 [IRQ_DA8XX_EVTOUT6] = 7,
611 [IRQ_DA8XX_EVTOUT7] = 7,
612 [IRQ_DA8XX_CCINT0] = 7,
613 [IRQ_DA8XX_CCERRINT] = 7,
614 [IRQ_DA8XX_TCERRINT0] = 7,
615 [IRQ_DA8XX_AEMIFINT] = 7,
616 [IRQ_DA8XX_I2CINT0] = 7,
617 [IRQ_DA8XX_MMCSDINT0] = 7,
618 [IRQ_DA8XX_MMCSDINT1] = 7,
619 [IRQ_DA8XX_ALLINT0] = 7,
620 [IRQ_DA8XX_RTC] = 7,
621 [IRQ_DA8XX_SPINT0] = 7,
622 [IRQ_DA8XX_TINT12_0] = 7,
623 [IRQ_DA8XX_TINT34_0] = 7,
624 [IRQ_DA8XX_TINT12_1] = 7,
625 [IRQ_DA8XX_TINT34_1] = 7,
626 [IRQ_DA8XX_UARTINT0] = 7,
627 [IRQ_DA8XX_KEYMGRINT] = 7,
628 [IRQ_DA8XX_SECINT] = 7,
629 [IRQ_DA8XX_SECKEYERR] = 7,
630 [IRQ_DA850_MPUADDRERR0] = 7,
631 [IRQ_DA850_MPUPROTERR0] = 7,
632 [IRQ_DA850_IOPUADDRERR0] = 7,
633 [IRQ_DA850_IOPUPROTERR0] = 7,
634 [IRQ_DA850_IOPUADDRERR1] = 7,
635 [IRQ_DA850_IOPUPROTERR1] = 7,
636 [IRQ_DA850_IOPUADDRERR2] = 7,
637 [IRQ_DA850_IOPUPROTERR2] = 7,
638 [IRQ_DA850_BOOTCFG_ADDR_ERR] = 7,
639 [IRQ_DA850_BOOTCFG_PROT_ERR] = 7,
640 [IRQ_DA850_MPUADDRERR1] = 7,
641 [IRQ_DA850_MPUPROTERR1] = 7,
642 [IRQ_DA850_IOPUADDRERR3] = 7,
643 [IRQ_DA850_IOPUPROTERR3] = 7,
644 [IRQ_DA850_IOPUADDRERR4] = 7,
645 [IRQ_DA850_IOPUPROTERR4] = 7,
646 [IRQ_DA850_IOPUADDRERR5] = 7,
647 [IRQ_DA850_IOPUPROTERR5] = 7,
648 [IRQ_DA850_MIOPU_BOOTCFG_ERR] = 7,
649 [IRQ_DA8XX_CHIPINT0] = 7,
650 [IRQ_DA8XX_CHIPINT1] = 7,
651 [IRQ_DA8XX_CHIPINT2] = 7,
652 [IRQ_DA8XX_CHIPINT3] = 7,
653 [IRQ_DA8XX_TCERRINT1] = 7,
654 [IRQ_DA8XX_C0_RX_THRESH_PULSE] = 7,
655 [IRQ_DA8XX_C0_RX_PULSE] = 7,
656 [IRQ_DA8XX_C0_TX_PULSE] = 7,
657 [IRQ_DA8XX_C0_MISC_PULSE] = 7,
658 [IRQ_DA8XX_C1_RX_THRESH_PULSE] = 7,
659 [IRQ_DA8XX_C1_RX_PULSE] = 7,
660 [IRQ_DA8XX_C1_TX_PULSE] = 7,
661 [IRQ_DA8XX_C1_MISC_PULSE] = 7,
662 [IRQ_DA8XX_MEMERR] = 7,
663 [IRQ_DA8XX_GPIO0] = 7,
664 [IRQ_DA8XX_GPIO1] = 7,
665 [IRQ_DA8XX_GPIO2] = 7,
666 [IRQ_DA8XX_GPIO3] = 7,
667 [IRQ_DA8XX_GPIO4] = 7,
668 [IRQ_DA8XX_GPIO5] = 7,
669 [IRQ_DA8XX_GPIO6] = 7,
670 [IRQ_DA8XX_GPIO7] = 7,
671 [IRQ_DA8XX_GPIO8] = 7,
672 [IRQ_DA8XX_I2CINT1] = 7,
673 [IRQ_DA8XX_LCDINT] = 7,
674 [IRQ_DA8XX_UARTINT1] = 7,
675 [IRQ_DA8XX_MCASPINT] = 7,
676 [IRQ_DA8XX_ALLINT1] = 7,
677 [IRQ_DA8XX_SPINT1] = 7,
678 [IRQ_DA8XX_UHPI_INT1] = 7,
679 [IRQ_DA8XX_USB_INT] = 7,
680 [IRQ_DA8XX_IRQN] = 7,
681 [IRQ_DA8XX_RWAKEUP] = 7,
682 [IRQ_DA8XX_UARTINT2] = 7,
683 [IRQ_DA8XX_DFTSSINT] = 7,
684 [IRQ_DA8XX_EHRPWM0] = 7,
685 [IRQ_DA8XX_EHRPWM0TZ] = 7,
686 [IRQ_DA8XX_EHRPWM1] = 7,
687 [IRQ_DA8XX_EHRPWM1TZ] = 7,
688 [IRQ_DA850_SATAINT] = 7,
689 [IRQ_DA850_TINT12_2] = 7,
690 [IRQ_DA850_TINT34_2] = 7,
691 [IRQ_DA850_TINTALL_2] = 7,
692 [IRQ_DA8XX_ECAP0] = 7,
693 [IRQ_DA8XX_ECAP1] = 7,
694 [IRQ_DA8XX_ECAP2] = 7,
695 [IRQ_DA850_MMCSDINT0_1] = 7,
696 [IRQ_DA850_MMCSDINT1_1] = 7,
697 [IRQ_DA850_T12CMPINT0_2] = 7,
698 [IRQ_DA850_T12CMPINT1_2] = 7,
699 [IRQ_DA850_T12CMPINT2_2] = 7,
700 [IRQ_DA850_T12CMPINT3_2] = 7,
701 [IRQ_DA850_T12CMPINT4_2] = 7,
702 [IRQ_DA850_T12CMPINT5_2] = 7,
703 [IRQ_DA850_T12CMPINT6_2] = 7,
704 [IRQ_DA850_T12CMPINT7_2] = 7,
705 [IRQ_DA850_T12CMPINT0_3] = 7,
706 [IRQ_DA850_T12CMPINT1_3] = 7,
707 [IRQ_DA850_T12CMPINT2_3] = 7,
708 [IRQ_DA850_T12CMPINT3_3] = 7,
709 [IRQ_DA850_T12CMPINT4_3] = 7,
710 [IRQ_DA850_T12CMPINT5_3] = 7,
711 [IRQ_DA850_T12CMPINT6_3] = 7,
712 [IRQ_DA850_T12CMPINT7_3] = 7,
713 [IRQ_DA850_RPIINT] = 7,
714 [IRQ_DA850_VPIFINT] = 7,
715 [IRQ_DA850_CCINT1] = 7,
716 [IRQ_DA850_CCERRINT1] = 7,
717 [IRQ_DA850_TCERRINT2] = 7,
718 [IRQ_DA850_TINT12_3] = 7,
719 [IRQ_DA850_TINT34_3] = 7,
720 [IRQ_DA850_TINTALL_3] = 7,
721 [IRQ_DA850_MCBSP0RINT] = 7,
722 [IRQ_DA850_MCBSP0XINT] = 7,
723 [IRQ_DA850_MCBSP1RINT] = 7,
724 [IRQ_DA850_MCBSP1XINT] = 7,
725 [IRQ_DA8XX_ARMCLKSTOPREQ] = 7,
726};
727
728static struct map_desc da850_io_desc[] = {
729 {
730 .virtual = IO_VIRT,
731 .pfn = __phys_to_pfn(IO_PHYS),
732 .length = IO_SIZE,
733 .type = MT_DEVICE
734 },
735 {
736 .virtual = DA8XX_CP_INTC_VIRT,
737 .pfn = __phys_to_pfn(DA8XX_CP_INTC_BASE),
738 .length = DA8XX_CP_INTC_SIZE,
739 .type = MT_DEVICE
740 },
741};
742
743static void __iomem *da850_psc_bases[] = {
744 IO_ADDRESS(DA8XX_PSC0_BASE),
745 IO_ADDRESS(DA8XX_PSC1_BASE),
746};
747
748/* Contents of JTAG ID register used to identify exact cpu type */
749static struct davinci_id da850_ids[] = {
750 {
751 .variant = 0x0,
752 .part_no = 0xb7d1,
753 .manufacturer = 0x017, /* 0x02f >> 1 */
754 .cpu_id = DAVINCI_CPU_ID_DA850,
755 .name = "da850/omap-l138",
756 },
757};
758
759static struct davinci_timer_instance da850_timer_instance[4] = {
760 {
761 .base = IO_ADDRESS(DA8XX_TIMER64P0_BASE),
762 .bottom_irq = IRQ_DA8XX_TINT12_0,
763 .top_irq = IRQ_DA8XX_TINT34_0,
764 },
765 {
766 .base = IO_ADDRESS(DA8XX_TIMER64P1_BASE),
767 .bottom_irq = IRQ_DA8XX_TINT12_1,
768 .top_irq = IRQ_DA8XX_TINT34_1,
769 },
770 {
771 .base = IO_ADDRESS(DA850_TIMER64P2_BASE),
772 .bottom_irq = IRQ_DA850_TINT12_2,
773 .top_irq = IRQ_DA850_TINT34_2,
774 },
775 {
776 .base = IO_ADDRESS(DA850_TIMER64P3_BASE),
777 .bottom_irq = IRQ_DA850_TINT12_3,
778 .top_irq = IRQ_DA850_TINT34_3,
779 },
780};
781
782/*
783 * T0_BOT: Timer 0, bottom : Used for clock_event
784 * T0_TOP: Timer 0, top : Used for clocksource
785 * T1_BOT, T1_TOP: Timer 1, bottom & top: Used for watchdog timer
786 */
787static struct davinci_timer_info da850_timer_info = {
788 .timers = da850_timer_instance,
789 .clockevent_id = T0_BOT,
790 .clocksource_id = T0_TOP,
791};
792
793static struct davinci_soc_info davinci_soc_info_da850 = {
794 .io_desc = da850_io_desc,
795 .io_desc_num = ARRAY_SIZE(da850_io_desc),
796 .jtag_id_base = IO_ADDRESS(DA8XX_JTAG_ID_REG),
797 .ids = da850_ids,
798 .ids_num = ARRAY_SIZE(da850_ids),
799 .cpu_clks = da850_clks,
800 .psc_bases = da850_psc_bases,
801 .psc_bases_num = ARRAY_SIZE(da850_psc_bases),
802 .pinmux_base = IO_ADDRESS(DA8XX_BOOT_CFG_BASE + 0x120),
803 .pinmux_pins = da850_pins,
804 .pinmux_pins_num = ARRAY_SIZE(da850_pins),
805 .intc_base = (void __iomem *)DA8XX_CP_INTC_VIRT,
806 .intc_type = DAVINCI_INTC_TYPE_CP_INTC,
807 .intc_irq_prios = da850_default_priorities,
808 .intc_irq_num = DA850_N_CP_INTC_IRQ,
809 .timer_info = &da850_timer_info,
810 .gpio_base = IO_ADDRESS(DA8XX_GPIO_BASE),
811 .gpio_num = 144,
812 .gpio_irq = IRQ_DA8XX_GPIO0,
813 .serial_dev = &da8xx_serial_device,
814 .emac_pdata = &da8xx_emac_pdata,
815};
816
817void __init da850_init(void)
818{
819 davinci_common_init(&davinci_soc_info_da850);
820}
diff --git a/arch/arm/mach-davinci/devices-da8xx.c b/arch/arm/mach-davinci/devices-da8xx.c
new file mode 100644
index 000000000000..58ad5b66fd60
--- /dev/null
+++ b/arch/arm/mach-davinci/devices-da8xx.c
@@ -0,0 +1,450 @@
1/*
2 * DA8XX/OMAP L1XX platform device data
3 *
4 * Copyright (c) 2007-2009, MontaVista Software, Inc. <source@mvista.com>
5 * Derived from code that was:
6 * Copyright (C) 2006 Komal Shah <komal_shah802003@yahoo.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 of the License, or
11 * (at your option) any later version.
12 */
13#include <linux/module.h>
14#include <linux/kernel.h>
15#include <linux/init.h>
16#include <linux/platform_device.h>
17#include <linux/dma-mapping.h>
18#include <linux/serial_8250.h>
19
20#include <mach/cputype.h>
21#include <mach/common.h>
22#include <mach/time.h>
23#include <mach/da8xx.h>
24#include <video/da8xx-fb.h>
25
26#include "clock.h"
27
28#define DA8XX_TPCC_BASE 0x01c00000
29#define DA8XX_TPTC0_BASE 0x01c08000
30#define DA8XX_TPTC1_BASE 0x01c08400
31#define DA8XX_WDOG_BASE 0x01c21000 /* DA8XX_TIMER64P1_BASE */
32#define DA8XX_I2C0_BASE 0x01c22000
33#define DA8XX_EMAC_CPPI_PORT_BASE 0x01e20000
34#define DA8XX_EMAC_CPGMACSS_BASE 0x01e22000
35#define DA8XX_EMAC_CPGMAC_BASE 0x01e23000
36#define DA8XX_EMAC_MDIO_BASE 0x01e24000
37#define DA8XX_GPIO_BASE 0x01e26000
38#define DA8XX_I2C1_BASE 0x01e28000
39
40#define DA8XX_EMAC_CTRL_REG_OFFSET 0x3000
41#define DA8XX_EMAC_MOD_REG_OFFSET 0x2000
42#define DA8XX_EMAC_RAM_OFFSET 0x0000
43#define DA8XX_MDIO_REG_OFFSET 0x4000
44#define DA8XX_EMAC_CTRL_RAM_SIZE SZ_8K
45
46static struct plat_serial8250_port da8xx_serial_pdata[] = {
47 {
48 .mapbase = DA8XX_UART0_BASE,
49 .irq = IRQ_DA8XX_UARTINT0,
50 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST |
51 UPF_IOREMAP,
52 .iotype = UPIO_MEM,
53 .regshift = 2,
54 },
55 {
56 .mapbase = DA8XX_UART1_BASE,
57 .irq = IRQ_DA8XX_UARTINT1,
58 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST |
59 UPF_IOREMAP,
60 .iotype = UPIO_MEM,
61 .regshift = 2,
62 },
63 {
64 .mapbase = DA8XX_UART2_BASE,
65 .irq = IRQ_DA8XX_UARTINT2,
66 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST |
67 UPF_IOREMAP,
68 .iotype = UPIO_MEM,
69 .regshift = 2,
70 },
71 {
72 .flags = 0,
73 },
74};
75
76struct platform_device da8xx_serial_device = {
77 .name = "serial8250",
78 .id = PLAT8250_DEV_PLATFORM,
79 .dev = {
80 .platform_data = da8xx_serial_pdata,
81 },
82};
83
84static const s8 da8xx_dma_chan_no_event[] = {
85 20, 21,
86 -1
87};
88
89static const s8 da8xx_queue_tc_mapping[][2] = {
90 /* {event queue no, TC no} */
91 {0, 0},
92 {1, 1},
93 {-1, -1}
94};
95
96static const s8 da8xx_queue_priority_mapping[][2] = {
97 /* {event queue no, Priority} */
98 {0, 3},
99 {1, 7},
100 {-1, -1}
101};
102
103static struct edma_soc_info da8xx_edma_info[] = {
104 {
105 .n_channel = 32,
106 .n_region = 4,
107 .n_slot = 128,
108 .n_tc = 2,
109 .n_cc = 1,
110 .noevent = da8xx_dma_chan_no_event,
111 .queue_tc_mapping = da8xx_queue_tc_mapping,
112 .queue_priority_mapping = da8xx_queue_priority_mapping,
113 },
114};
115
116static struct resource da8xx_edma_resources[] = {
117 {
118 .name = "edma_cc0",
119 .start = DA8XX_TPCC_BASE,
120 .end = DA8XX_TPCC_BASE + SZ_32K - 1,
121 .flags = IORESOURCE_MEM,
122 },
123 {
124 .name = "edma_tc0",
125 .start = DA8XX_TPTC0_BASE,
126 .end = DA8XX_TPTC0_BASE + SZ_1K - 1,
127 .flags = IORESOURCE_MEM,
128 },
129 {
130 .name = "edma_tc1",
131 .start = DA8XX_TPTC1_BASE,
132 .end = DA8XX_TPTC1_BASE + SZ_1K - 1,
133 .flags = IORESOURCE_MEM,
134 },
135 {
136 .name = "edma0",
137 .start = IRQ_DA8XX_CCINT0,
138 .flags = IORESOURCE_IRQ,
139 },
140 {
141 .name = "edma0_err",
142 .start = IRQ_DA8XX_CCERRINT,
143 .flags = IORESOURCE_IRQ,
144 },
145};
146
147static struct platform_device da8xx_edma_device = {
148 .name = "edma",
149 .id = -1,
150 .dev = {
151 .platform_data = da8xx_edma_info,
152 },
153 .num_resources = ARRAY_SIZE(da8xx_edma_resources),
154 .resource = da8xx_edma_resources,
155};
156
157int __init da8xx_register_edma(void)
158{
159 return platform_device_register(&da8xx_edma_device);
160}
161
162static struct resource da8xx_i2c_resources0[] = {
163 {
164 .start = DA8XX_I2C0_BASE,
165 .end = DA8XX_I2C0_BASE + SZ_4K - 1,
166 .flags = IORESOURCE_MEM,
167 },
168 {
169 .start = IRQ_DA8XX_I2CINT0,
170 .end = IRQ_DA8XX_I2CINT0,
171 .flags = IORESOURCE_IRQ,
172 },
173};
174
175static struct platform_device da8xx_i2c_device0 = {
176 .name = "i2c_davinci",
177 .id = 1,
178 .num_resources = ARRAY_SIZE(da8xx_i2c_resources0),
179 .resource = da8xx_i2c_resources0,
180};
181
182static struct resource da8xx_i2c_resources1[] = {
183 {
184 .start = DA8XX_I2C1_BASE,
185 .end = DA8XX_I2C1_BASE + SZ_4K - 1,
186 .flags = IORESOURCE_MEM,
187 },
188 {
189 .start = IRQ_DA8XX_I2CINT1,
190 .end = IRQ_DA8XX_I2CINT1,
191 .flags = IORESOURCE_IRQ,
192 },
193};
194
195static struct platform_device da8xx_i2c_device1 = {
196 .name = "i2c_davinci",
197 .id = 2,
198 .num_resources = ARRAY_SIZE(da8xx_i2c_resources1),
199 .resource = da8xx_i2c_resources1,
200};
201
202int __init da8xx_register_i2c(int instance,
203 struct davinci_i2c_platform_data *pdata)
204{
205 struct platform_device *pdev;
206
207 if (instance == 0)
208 pdev = &da8xx_i2c_device0;
209 else if (instance == 1)
210 pdev = &da8xx_i2c_device1;
211 else
212 return -EINVAL;
213
214 pdev->dev.platform_data = pdata;
215 return platform_device_register(pdev);
216}
217
218static struct resource da8xx_watchdog_resources[] = {
219 {
220 .start = DA8XX_WDOG_BASE,
221 .end = DA8XX_WDOG_BASE + SZ_4K - 1,
222 .flags = IORESOURCE_MEM,
223 },
224};
225
226struct platform_device davinci_wdt_device = {
227 .name = "watchdog",
228 .id = -1,
229 .num_resources = ARRAY_SIZE(da8xx_watchdog_resources),
230 .resource = da8xx_watchdog_resources,
231};
232
233int __init da8xx_register_watchdog(void)
234{
235 return platform_device_register(&davinci_wdt_device);
236}
237
238static struct resource da8xx_emac_resources[] = {
239 {
240 .start = DA8XX_EMAC_CPPI_PORT_BASE,
241 .end = DA8XX_EMAC_CPPI_PORT_BASE + 0x5000 - 1,
242 .flags = IORESOURCE_MEM,
243 },
244 {
245 .start = IRQ_DA8XX_C0_RX_THRESH_PULSE,
246 .end = IRQ_DA8XX_C0_RX_THRESH_PULSE,
247 .flags = IORESOURCE_IRQ,
248 },
249 {
250 .start = IRQ_DA8XX_C0_RX_PULSE,
251 .end = IRQ_DA8XX_C0_RX_PULSE,
252 .flags = IORESOURCE_IRQ,
253 },
254 {
255 .start = IRQ_DA8XX_C0_TX_PULSE,
256 .end = IRQ_DA8XX_C0_TX_PULSE,
257 .flags = IORESOURCE_IRQ,
258 },
259 {
260 .start = IRQ_DA8XX_C0_MISC_PULSE,
261 .end = IRQ_DA8XX_C0_MISC_PULSE,
262 .flags = IORESOURCE_IRQ,
263 },
264};
265
266struct emac_platform_data da8xx_emac_pdata = {
267 .ctrl_reg_offset = DA8XX_EMAC_CTRL_REG_OFFSET,
268 .ctrl_mod_reg_offset = DA8XX_EMAC_MOD_REG_OFFSET,
269 .ctrl_ram_offset = DA8XX_EMAC_RAM_OFFSET,
270 .mdio_reg_offset = DA8XX_MDIO_REG_OFFSET,
271 .ctrl_ram_size = DA8XX_EMAC_CTRL_RAM_SIZE,
272 .version = EMAC_VERSION_2,
273};
274
275static struct platform_device da8xx_emac_device = {
276 .name = "davinci_emac",
277 .id = 1,
278 .dev = {
279 .platform_data = &da8xx_emac_pdata,
280 },
281 .num_resources = ARRAY_SIZE(da8xx_emac_resources),
282 .resource = da8xx_emac_resources,
283};
284
285static struct resource da830_mcasp1_resources[] = {
286 {
287 .name = "mcasp1",
288 .start = DAVINCI_DA830_MCASP1_REG_BASE,
289 .end = DAVINCI_DA830_MCASP1_REG_BASE + (SZ_1K * 12) - 1,
290 .flags = IORESOURCE_MEM,
291 },
292 /* TX event */
293 {
294 .start = DAVINCI_DA830_DMA_MCASP1_AXEVT,
295 .end = DAVINCI_DA830_DMA_MCASP1_AXEVT,
296 .flags = IORESOURCE_DMA,
297 },
298 /* RX event */
299 {
300 .start = DAVINCI_DA830_DMA_MCASP1_AREVT,
301 .end = DAVINCI_DA830_DMA_MCASP1_AREVT,
302 .flags = IORESOURCE_DMA,
303 },
304};
305
306static struct platform_device da830_mcasp1_device = {
307 .name = "davinci-mcasp",
308 .id = 1,
309 .num_resources = ARRAY_SIZE(da830_mcasp1_resources),
310 .resource = da830_mcasp1_resources,
311};
312
313static struct resource da850_mcasp_resources[] = {
314 {
315 .name = "mcasp",
316 .start = DAVINCI_DA8XX_MCASP0_REG_BASE,
317 .end = DAVINCI_DA8XX_MCASP0_REG_BASE + (SZ_1K * 12) - 1,
318 .flags = IORESOURCE_MEM,
319 },
320 /* TX event */
321 {
322 .start = DAVINCI_DA8XX_DMA_MCASP0_AXEVT,
323 .end = DAVINCI_DA8XX_DMA_MCASP0_AXEVT,
324 .flags = IORESOURCE_DMA,
325 },
326 /* RX event */
327 {
328 .start = DAVINCI_DA8XX_DMA_MCASP0_AREVT,
329 .end = DAVINCI_DA8XX_DMA_MCASP0_AREVT,
330 .flags = IORESOURCE_DMA,
331 },
332};
333
334static struct platform_device da850_mcasp_device = {
335 .name = "davinci-mcasp",
336 .id = 0,
337 .num_resources = ARRAY_SIZE(da850_mcasp_resources),
338 .resource = da850_mcasp_resources,
339};
340
341int __init da8xx_register_emac(void)
342{
343 return platform_device_register(&da8xx_emac_device);
344}
345
346void __init da8xx_init_mcasp(int id, struct snd_platform_data *pdata)
347{
348 /* DA830/OMAP-L137 has 3 instances of McASP */
349 if (cpu_is_davinci_da830() && id == 1) {
350 da830_mcasp1_device.dev.platform_data = pdata;
351 platform_device_register(&da830_mcasp1_device);
352 } else if (cpu_is_davinci_da850()) {
353 da850_mcasp_device.dev.platform_data = pdata;
354 platform_device_register(&da850_mcasp_device);
355 }
356}
357
358static const struct display_panel disp_panel = {
359 QVGA,
360 16,
361 16,
362 COLOR_ACTIVE,
363};
364
365static struct lcd_ctrl_config lcd_cfg = {
366 &disp_panel,
367 .ac_bias = 255,
368 .ac_bias_intrpt = 0,
369 .dma_burst_sz = 16,
370 .bpp = 16,
371 .fdd = 255,
372 .tft_alt_mode = 0,
373 .stn_565_mode = 0,
374 .mono_8bit_mode = 0,
375 .invert_line_clock = 1,
376 .invert_frm_clock = 1,
377 .sync_edge = 0,
378 .sync_ctrl = 1,
379 .raster_order = 0,
380};
381
382static struct da8xx_lcdc_platform_data da850_evm_lcdc_pdata = {
383 .manu_name = "sharp",
384 .controller_data = &lcd_cfg,
385 .type = "Sharp_LK043T1DG01",
386};
387
388static struct resource da8xx_lcdc_resources[] = {
389 [0] = { /* registers */
390 .start = DA8XX_LCD_CNTRL_BASE,
391 .end = DA8XX_LCD_CNTRL_BASE + SZ_4K - 1,
392 .flags = IORESOURCE_MEM,
393 },
394 [1] = { /* interrupt */
395 .start = IRQ_DA8XX_LCDINT,
396 .end = IRQ_DA8XX_LCDINT,
397 .flags = IORESOURCE_IRQ,
398 },
399};
400
401static struct platform_device da850_lcdc_device = {
402 .name = "da8xx_lcdc",
403 .id = 0,
404 .num_resources = ARRAY_SIZE(da8xx_lcdc_resources),
405 .resource = da8xx_lcdc_resources,
406 .dev = {
407 .platform_data = &da850_evm_lcdc_pdata,
408 }
409};
410
411int __init da8xx_register_lcdc(void)
412{
413 return platform_device_register(&da850_lcdc_device);
414}
415
416static struct resource da8xx_mmcsd0_resources[] = {
417 { /* registers */
418 .start = DA8XX_MMCSD0_BASE,
419 .end = DA8XX_MMCSD0_BASE + SZ_4K - 1,
420 .flags = IORESOURCE_MEM,
421 },
422 { /* interrupt */
423 .start = IRQ_DA8XX_MMCSDINT0,
424 .end = IRQ_DA8XX_MMCSDINT0,
425 .flags = IORESOURCE_IRQ,
426 },
427 { /* DMA RX */
428 .start = EDMA_CTLR_CHAN(0, 16),
429 .end = EDMA_CTLR_CHAN(0, 16),
430 .flags = IORESOURCE_DMA,
431 },
432 { /* DMA TX */
433 .start = EDMA_CTLR_CHAN(0, 17),
434 .end = EDMA_CTLR_CHAN(0, 17),
435 .flags = IORESOURCE_DMA,
436 },
437};
438
439static struct platform_device da8xx_mmcsd0_device = {
440 .name = "davinci_mmc",
441 .id = 0,
442 .num_resources = ARRAY_SIZE(da8xx_mmcsd0_resources),
443 .resource = da8xx_mmcsd0_resources,
444};
445
446int __init da8xx_register_mmcsd0(struct davinci_mmc_config *config)
447{
448 da8xx_mmcsd0_device.dev.platform_data = config;
449 return platform_device_register(&da8xx_mmcsd0_device);
450}
diff --git a/arch/arm/mach-davinci/devices.c b/arch/arm/mach-davinci/devices.c
index de16f347566a..a55b650db71e 100644
--- a/arch/arm/mach-davinci/devices.c
+++ b/arch/arm/mach-davinci/devices.c
@@ -31,6 +31,8 @@
31#define DAVINCI_MMCSD0_BASE 0x01E10000 31#define DAVINCI_MMCSD0_BASE 0x01E10000
32#define DM355_MMCSD0_BASE 0x01E11000 32#define DM355_MMCSD0_BASE 0x01E11000
33#define DM355_MMCSD1_BASE 0x01E00000 33#define DM355_MMCSD1_BASE 0x01E00000
34#define DM365_MMCSD0_BASE 0x01D11000
35#define DM365_MMCSD1_BASE 0x01D00000
34 36
35static struct resource i2c_resources[] = { 37static struct resource i2c_resources[] = {
36 { 38 {
@@ -82,10 +84,10 @@ static struct resource mmcsd0_resources[] = {
82 }, 84 },
83 /* DMA channels: RX, then TX */ 85 /* DMA channels: RX, then TX */
84 { 86 {
85 .start = DAVINCI_DMA_MMCRXEVT, 87 .start = EDMA_CTLR_CHAN(0, DAVINCI_DMA_MMCRXEVT),
86 .flags = IORESOURCE_DMA, 88 .flags = IORESOURCE_DMA,
87 }, { 89 }, {
88 .start = DAVINCI_DMA_MMCTXEVT, 90 .start = EDMA_CTLR_CHAN(0, DAVINCI_DMA_MMCTXEVT),
89 .flags = IORESOURCE_DMA, 91 .flags = IORESOURCE_DMA,
90 }, 92 },
91}; 93};
@@ -119,10 +121,10 @@ static struct resource mmcsd1_resources[] = {
119 }, 121 },
120 /* DMA channels: RX, then TX */ 122 /* DMA channels: RX, then TX */
121 { 123 {
122 .start = 30, /* rx */ 124 .start = EDMA_CTLR_CHAN(0, 30), /* rx */
123 .flags = IORESOURCE_DMA, 125 .flags = IORESOURCE_DMA,
124 }, { 126 }, {
125 .start = 31, /* tx */ 127 .start = EDMA_CTLR_CHAN(0, 31), /* tx */
126 .flags = IORESOURCE_DMA, 128 .flags = IORESOURCE_DMA,
127 }, 129 },
128}; 130};
@@ -154,19 +156,31 @@ void __init davinci_setup_mmc(int module, struct davinci_mmc_config *config)
154 */ 156 */
155 switch (module) { 157 switch (module) {
156 case 1: 158 case 1:
157 if (!cpu_is_davinci_dm355()) 159 if (cpu_is_davinci_dm355()) {
160 /* REVISIT we may not need all these pins if e.g. this
161 * is a hard-wired SDIO device...
162 */
163 davinci_cfg_reg(DM355_SD1_CMD);
164 davinci_cfg_reg(DM355_SD1_CLK);
165 davinci_cfg_reg(DM355_SD1_DATA0);
166 davinci_cfg_reg(DM355_SD1_DATA1);
167 davinci_cfg_reg(DM355_SD1_DATA2);
168 davinci_cfg_reg(DM355_SD1_DATA3);
169 } else if (cpu_is_davinci_dm365()) {
170 void __iomem *pupdctl1 =
171 IO_ADDRESS(DAVINCI_SYSTEM_MODULE_BASE + 0x7c);
172
173 /* Configure pull down control */
174 __raw_writel((__raw_readl(pupdctl1) & ~0x400),
175 pupdctl1);
176
177 mmcsd1_resources[0].start = DM365_MMCSD1_BASE;
178 mmcsd1_resources[0].end = DM365_MMCSD1_BASE +
179 SZ_4K - 1;
180 mmcsd0_resources[2].start = IRQ_DM365_SDIOINT1;
181 } else
158 break; 182 break;
159 183
160 /* REVISIT we may not need all these pins if e.g. this
161 * is a hard-wired SDIO device...
162 */
163 davinci_cfg_reg(DM355_SD1_CMD);
164 davinci_cfg_reg(DM355_SD1_CLK);
165 davinci_cfg_reg(DM355_SD1_DATA0);
166 davinci_cfg_reg(DM355_SD1_DATA1);
167 davinci_cfg_reg(DM355_SD1_DATA2);
168 davinci_cfg_reg(DM355_SD1_DATA3);
169
170 pdev = &davinci_mmcsd1_device; 184 pdev = &davinci_mmcsd1_device;
171 break; 185 break;
172 case 0: 186 case 0:
@@ -180,9 +194,12 @@ void __init davinci_setup_mmc(int module, struct davinci_mmc_config *config)
180 194
181 /* enable RX EDMA */ 195 /* enable RX EDMA */
182 davinci_cfg_reg(DM355_EVT26_MMC0_RX); 196 davinci_cfg_reg(DM355_EVT26_MMC0_RX);
183 } 197 } else if (cpu_is_davinci_dm365()) {
184 198 mmcsd0_resources[0].start = DM365_MMCSD0_BASE;
185 else if (cpu_is_davinci_dm644x()) { 199 mmcsd0_resources[0].end = DM365_MMCSD0_BASE +
200 SZ_4K - 1;
201 mmcsd0_resources[2].start = IRQ_DM365_SDIOINT0;
202 } else if (cpu_is_davinci_dm644x()) {
186 /* REVISIT: should this be in board-init code? */ 203 /* REVISIT: should this be in board-init code? */
187 void __iomem *base = 204 void __iomem *base =
188 IO_ADDRESS(DAVINCI_SYSTEM_MODULE_BASE); 205 IO_ADDRESS(DAVINCI_SYSTEM_MODULE_BASE);
@@ -216,6 +233,8 @@ void __init davinci_setup_mmc(int module, struct davinci_mmc_config *config)
216 233
217static struct resource wdt_resources[] = { 234static struct resource wdt_resources[] = {
218 { 235 {
236 .start = DAVINCI_WDOG_BASE,
237 .end = DAVINCI_WDOG_BASE + SZ_1K - 1,
219 .flags = IORESOURCE_MEM, 238 .flags = IORESOURCE_MEM,
220 }, 239 },
221}; 240};
@@ -229,11 +248,6 @@ struct platform_device davinci_wdt_device = {
229 248
230static void davinci_init_wdt(void) 249static void davinci_init_wdt(void)
231{ 250{
232 struct davinci_soc_info *soc_info = &davinci_soc_info;
233
234 wdt_resources[0].start = (resource_size_t)soc_info->wdt_base;
235 wdt_resources[0].end = (resource_size_t)soc_info->wdt_base + SZ_1K - 1;
236
237 platform_device_register(&davinci_wdt_device); 251 platform_device_register(&davinci_wdt_device);
238} 252}
239 253
diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c
index baaaf328de2e..059670018aff 100644
--- a/arch/arm/mach-davinci/dm355.c
+++ b/arch/arm/mach-davinci/dm355.c
@@ -30,6 +30,7 @@
30#include <mach/time.h> 30#include <mach/time.h>
31#include <mach/serial.h> 31#include <mach/serial.h>
32#include <mach/common.h> 32#include <mach/common.h>
33#include <mach/asp.h>
33 34
34#include "clock.h" 35#include "clock.h"
35#include "mux.h" 36#include "mux.h"
@@ -360,8 +361,8 @@ static struct davinci_clk dm355_clks[] = {
360 CLK(NULL, "uart1", &uart1_clk), 361 CLK(NULL, "uart1", &uart1_clk),
361 CLK(NULL, "uart2", &uart2_clk), 362 CLK(NULL, "uart2", &uart2_clk),
362 CLK("i2c_davinci.1", NULL, &i2c_clk), 363 CLK("i2c_davinci.1", NULL, &i2c_clk),
363 CLK("soc-audio.0", NULL, &asp0_clk), 364 CLK("davinci-asp.0", NULL, &asp0_clk),
364 CLK("soc-audio.1", NULL, &asp1_clk), 365 CLK("davinci-asp.1", NULL, &asp1_clk),
365 CLK("davinci_mmc.0", NULL, &mmcsd0_clk), 366 CLK("davinci_mmc.0", NULL, &mmcsd0_clk),
366 CLK("davinci_mmc.1", NULL, &mmcsd1_clk), 367 CLK("davinci_mmc.1", NULL, &mmcsd1_clk),
367 CLK(NULL, "spi0", &spi0_clk), 368 CLK(NULL, "spi0", &spi0_clk),
@@ -481,6 +482,20 @@ INT_CFG(DM355, INT_EDMA_TC1_ERR, 4, 1, 1, false)
481EVT_CFG(DM355, EVT8_ASP1_TX, 0, 1, 0, false) 482EVT_CFG(DM355, EVT8_ASP1_TX, 0, 1, 0, false)
482EVT_CFG(DM355, EVT9_ASP1_RX, 1, 1, 0, false) 483EVT_CFG(DM355, EVT9_ASP1_RX, 1, 1, 0, false)
483EVT_CFG(DM355, EVT26_MMC0_RX, 2, 1, 0, false) 484EVT_CFG(DM355, EVT26_MMC0_RX, 2, 1, 0, false)
485
486MUX_CFG(DM355, VOUT_FIELD, 1, 18, 3, 1, false)
487MUX_CFG(DM355, VOUT_FIELD_G70, 1, 18, 3, 0, false)
488MUX_CFG(DM355, VOUT_HVSYNC, 1, 16, 1, 0, false)
489MUX_CFG(DM355, VOUT_COUTL_EN, 1, 0, 0xff, 0x55, false)
490MUX_CFG(DM355, VOUT_COUTH_EN, 1, 8, 0xff, 0x55, false)
491
492MUX_CFG(DM355, VIN_PCLK, 0, 14, 1, 1, false)
493MUX_CFG(DM355, VIN_CAM_WEN, 0, 13, 1, 1, false)
494MUX_CFG(DM355, VIN_CAM_VD, 0, 12, 1, 1, false)
495MUX_CFG(DM355, VIN_CAM_HD, 0, 11, 1, 1, false)
496MUX_CFG(DM355, VIN_YIN_EN, 0, 10, 1, 1, false)
497MUX_CFG(DM355, VIN_CINL_EN, 0, 0, 0xff, 0x55, false)
498MUX_CFG(DM355, VIN_CINH_EN, 0, 8, 3, 3, false)
484#endif 499#endif
485}; 500};
486 501
@@ -558,17 +573,38 @@ static const s8 dma_chan_dm355_no_event[] = {
558 -1 573 -1
559}; 574};
560 575
561static struct edma_soc_info dm355_edma_info = { 576static const s8
562 .n_channel = 64, 577queue_tc_mapping[][2] = {
563 .n_region = 4, 578 /* {event queue no, TC no} */
564 .n_slot = 128, 579 {0, 0},
565 .n_tc = 2, 580 {1, 1},
566 .noevent = dma_chan_dm355_no_event, 581 {-1, -1},
582};
583
584static const s8
585queue_priority_mapping[][2] = {
586 /* {event queue no, Priority} */
587 {0, 3},
588 {1, 7},
589 {-1, -1},
590};
591
592static struct edma_soc_info dm355_edma_info[] = {
593 {
594 .n_channel = 64,
595 .n_region = 4,
596 .n_slot = 128,
597 .n_tc = 2,
598 .n_cc = 1,
599 .noevent = dma_chan_dm355_no_event,
600 .queue_tc_mapping = queue_tc_mapping,
601 .queue_priority_mapping = queue_priority_mapping,
602 },
567}; 603};
568 604
569static struct resource edma_resources[] = { 605static struct resource edma_resources[] = {
570 { 606 {
571 .name = "edma_cc", 607 .name = "edma_cc0",
572 .start = 0x01c00000, 608 .start = 0x01c00000,
573 .end = 0x01c00000 + SZ_64K - 1, 609 .end = 0x01c00000 + SZ_64K - 1,
574 .flags = IORESOURCE_MEM, 610 .flags = IORESOURCE_MEM,
@@ -586,10 +622,12 @@ static struct resource edma_resources[] = {
586 .flags = IORESOURCE_MEM, 622 .flags = IORESOURCE_MEM,
587 }, 623 },
588 { 624 {
625 .name = "edma0",
589 .start = IRQ_CCINT0, 626 .start = IRQ_CCINT0,
590 .flags = IORESOURCE_IRQ, 627 .flags = IORESOURCE_IRQ,
591 }, 628 },
592 { 629 {
630 .name = "edma0_err",
593 .start = IRQ_CCERRINT, 631 .start = IRQ_CCERRINT,
594 .flags = IORESOURCE_IRQ, 632 .flags = IORESOURCE_IRQ,
595 }, 633 },
@@ -598,12 +636,98 @@ static struct resource edma_resources[] = {
598 636
599static struct platform_device dm355_edma_device = { 637static struct platform_device dm355_edma_device = {
600 .name = "edma", 638 .name = "edma",
601 .id = -1, 639 .id = 0,
602 .dev.platform_data = &dm355_edma_info, 640 .dev.platform_data = dm355_edma_info,
603 .num_resources = ARRAY_SIZE(edma_resources), 641 .num_resources = ARRAY_SIZE(edma_resources),
604 .resource = edma_resources, 642 .resource = edma_resources,
605}; 643};
606 644
645static struct resource dm355_asp1_resources[] = {
646 {
647 .start = DAVINCI_ASP1_BASE,
648 .end = DAVINCI_ASP1_BASE + SZ_8K - 1,
649 .flags = IORESOURCE_MEM,
650 },
651 {
652 .start = DAVINCI_DMA_ASP1_TX,
653 .end = DAVINCI_DMA_ASP1_TX,
654 .flags = IORESOURCE_DMA,
655 },
656 {
657 .start = DAVINCI_DMA_ASP1_RX,
658 .end = DAVINCI_DMA_ASP1_RX,
659 .flags = IORESOURCE_DMA,
660 },
661};
662
663static struct platform_device dm355_asp1_device = {
664 .name = "davinci-asp",
665 .id = 1,
666 .num_resources = ARRAY_SIZE(dm355_asp1_resources),
667 .resource = dm355_asp1_resources,
668};
669
670static struct resource dm355_vpss_resources[] = {
671 {
672 /* VPSS BL Base address */
673 .name = "vpss",
674 .start = 0x01c70800,
675 .end = 0x01c70800 + 0xff,
676 .flags = IORESOURCE_MEM,
677 },
678 {
679 /* VPSS CLK Base address */
680 .name = "vpss",
681 .start = 0x01c70000,
682 .end = 0x01c70000 + 0xf,
683 .flags = IORESOURCE_MEM,
684 },
685};
686
687static struct platform_device dm355_vpss_device = {
688 .name = "vpss",
689 .id = -1,
690 .dev.platform_data = "dm355_vpss",
691 .num_resources = ARRAY_SIZE(dm355_vpss_resources),
692 .resource = dm355_vpss_resources,
693};
694
695static struct resource vpfe_resources[] = {
696 {
697 .start = IRQ_VDINT0,
698 .end = IRQ_VDINT0,
699 .flags = IORESOURCE_IRQ,
700 },
701 {
702 .start = IRQ_VDINT1,
703 .end = IRQ_VDINT1,
704 .flags = IORESOURCE_IRQ,
705 },
706 /* CCDC Base address */
707 {
708 .flags = IORESOURCE_MEM,
709 .start = 0x01c70600,
710 .end = 0x01c70600 + 0x1ff,
711 },
712};
713
714static u64 vpfe_capture_dma_mask = DMA_BIT_MASK(32);
715static struct platform_device vpfe_capture_dev = {
716 .name = CAPTURE_DRV_NAME,
717 .id = -1,
718 .num_resources = ARRAY_SIZE(vpfe_resources),
719 .resource = vpfe_resources,
720 .dev = {
721 .dma_mask = &vpfe_capture_dma_mask,
722 .coherent_dma_mask = DMA_BIT_MASK(32),
723 },
724};
725
726void dm355_set_vpfe_config(struct vpfe_config *cfg)
727{
728 vpfe_capture_dev.dev.platform_data = cfg;
729}
730
607/*----------------------------------------------------------------------*/ 731/*----------------------------------------------------------------------*/
608 732
609static struct map_desc dm355_io_desc[] = { 733static struct map_desc dm355_io_desc[] = {
@@ -704,7 +828,6 @@ static struct davinci_soc_info davinci_soc_info_dm355 = {
704 .intc_irq_prios = dm355_default_priorities, 828 .intc_irq_prios = dm355_default_priorities,
705 .intc_irq_num = DAVINCI_N_AINTC_IRQ, 829 .intc_irq_num = DAVINCI_N_AINTC_IRQ,
706 .timer_info = &dm355_timer_info, 830 .timer_info = &dm355_timer_info,
707 .wdt_base = IO_ADDRESS(DAVINCI_WDOG_BASE),
708 .gpio_base = IO_ADDRESS(DAVINCI_GPIO_BASE), 831 .gpio_base = IO_ADDRESS(DAVINCI_GPIO_BASE),
709 .gpio_num = 104, 832 .gpio_num = 104,
710 .gpio_irq = IRQ_DM355_GPIOBNK0, 833 .gpio_irq = IRQ_DM355_GPIOBNK0,
@@ -713,6 +836,19 @@ static struct davinci_soc_info davinci_soc_info_dm355 = {
713 .sram_len = SZ_32K, 836 .sram_len = SZ_32K,
714}; 837};
715 838
839void __init dm355_init_asp1(u32 evt_enable, struct snd_platform_data *pdata)
840{
841 /* we don't use ASP1 IRQs, or we'd need to mux them ... */
842 if (evt_enable & ASP1_TX_EVT_EN)
843 davinci_cfg_reg(DM355_EVT8_ASP1_TX);
844
845 if (evt_enable & ASP1_RX_EVT_EN)
846 davinci_cfg_reg(DM355_EVT9_ASP1_RX);
847
848 dm355_asp1_device.dev.platform_data = pdata;
849 platform_device_register(&dm355_asp1_device);
850}
851
716void __init dm355_init(void) 852void __init dm355_init(void)
717{ 853{
718 davinci_common_init(&davinci_soc_info_dm355); 854 davinci_common_init(&davinci_soc_info_dm355);
@@ -725,6 +861,20 @@ static int __init dm355_init_devices(void)
725 861
726 davinci_cfg_reg(DM355_INT_EDMA_CC); 862 davinci_cfg_reg(DM355_INT_EDMA_CC);
727 platform_device_register(&dm355_edma_device); 863 platform_device_register(&dm355_edma_device);
864 platform_device_register(&dm355_vpss_device);
865 /*
866 * setup Mux configuration for vpfe input and register
867 * vpfe capture platform device
868 */
869 davinci_cfg_reg(DM355_VIN_PCLK);
870 davinci_cfg_reg(DM355_VIN_CAM_WEN);
871 davinci_cfg_reg(DM355_VIN_CAM_VD);
872 davinci_cfg_reg(DM355_VIN_CAM_HD);
873 davinci_cfg_reg(DM355_VIN_YIN_EN);
874 davinci_cfg_reg(DM355_VIN_CINL_EN);
875 davinci_cfg_reg(DM355_VIN_CINH_EN);
876 platform_device_register(&vpfe_capture_dev);
877
728 return 0; 878 return 0;
729} 879}
730postcore_initcall(dm355_init_devices); 880postcore_initcall(dm355_init_devices);
diff --git a/arch/arm/mach-davinci/dm365.c b/arch/arm/mach-davinci/dm365.c
new file mode 100644
index 000000000000..e81517434703
--- /dev/null
+++ b/arch/arm/mach-davinci/dm365.c
@@ -0,0 +1,926 @@
1/*
2 * TI DaVinci DM365 chip specific setup
3 *
4 * Copyright (C) 2009 Texas Instruments
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation version 2.
9 *
10 * This program is distributed "as is" WITHOUT ANY WARRANTY of any
11 * kind, whether express or implied; without even the implied warranty
12 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15#include <linux/kernel.h>
16#include <linux/init.h>
17#include <linux/clk.h>
18#include <linux/serial_8250.h>
19#include <linux/platform_device.h>
20#include <linux/dma-mapping.h>
21#include <linux/gpio.h>
22
23#include <asm/mach/map.h>
24
25#include <mach/dm365.h>
26#include <mach/clock.h>
27#include <mach/cputype.h>
28#include <mach/edma.h>
29#include <mach/psc.h>
30#include <mach/mux.h>
31#include <mach/irqs.h>
32#include <mach/time.h>
33#include <mach/serial.h>
34#include <mach/common.h>
35
36#include "clock.h"
37#include "mux.h"
38
39#define DM365_REF_FREQ 24000000 /* 24 MHz on the DM365 EVM */
40
41static struct pll_data pll1_data = {
42 .num = 1,
43 .phys_base = DAVINCI_PLL1_BASE,
44 .flags = PLL_HAS_POSTDIV | PLL_HAS_PREDIV,
45};
46
47static struct pll_data pll2_data = {
48 .num = 2,
49 .phys_base = DAVINCI_PLL2_BASE,
50 .flags = PLL_HAS_POSTDIV | PLL_HAS_PREDIV,
51};
52
53static struct clk ref_clk = {
54 .name = "ref_clk",
55 .rate = DM365_REF_FREQ,
56};
57
58static struct clk pll1_clk = {
59 .name = "pll1",
60 .parent = &ref_clk,
61 .flags = CLK_PLL,
62 .pll_data = &pll1_data,
63};
64
65static struct clk pll1_aux_clk = {
66 .name = "pll1_aux_clk",
67 .parent = &pll1_clk,
68 .flags = CLK_PLL | PRE_PLL,
69};
70
71static struct clk pll1_sysclkbp = {
72 .name = "pll1_sysclkbp",
73 .parent = &pll1_clk,
74 .flags = CLK_PLL | PRE_PLL,
75 .div_reg = BPDIV
76};
77
78static struct clk clkout0_clk = {
79 .name = "clkout0",
80 .parent = &pll1_clk,
81 .flags = CLK_PLL | PRE_PLL,
82};
83
84static struct clk pll1_sysclk1 = {
85 .name = "pll1_sysclk1",
86 .parent = &pll1_clk,
87 .flags = CLK_PLL,
88 .div_reg = PLLDIV1,
89};
90
91static struct clk pll1_sysclk2 = {
92 .name = "pll1_sysclk2",
93 .parent = &pll1_clk,
94 .flags = CLK_PLL,
95 .div_reg = PLLDIV2,
96};
97
98static struct clk pll1_sysclk3 = {
99 .name = "pll1_sysclk3",
100 .parent = &pll1_clk,
101 .flags = CLK_PLL,
102 .div_reg = PLLDIV3,
103};
104
105static struct clk pll1_sysclk4 = {
106 .name = "pll1_sysclk4",
107 .parent = &pll1_clk,
108 .flags = CLK_PLL,
109 .div_reg = PLLDIV4,
110};
111
112static struct clk pll1_sysclk5 = {
113 .name = "pll1_sysclk5",
114 .parent = &pll1_clk,
115 .flags = CLK_PLL,
116 .div_reg = PLLDIV5,
117};
118
119static struct clk pll1_sysclk6 = {
120 .name = "pll1_sysclk6",
121 .parent = &pll1_clk,
122 .flags = CLK_PLL,
123 .div_reg = PLLDIV6,
124};
125
126static struct clk pll1_sysclk7 = {
127 .name = "pll1_sysclk7",
128 .parent = &pll1_clk,
129 .flags = CLK_PLL,
130 .div_reg = PLLDIV7,
131};
132
133static struct clk pll1_sysclk8 = {
134 .name = "pll1_sysclk8",
135 .parent = &pll1_clk,
136 .flags = CLK_PLL,
137 .div_reg = PLLDIV8,
138};
139
140static struct clk pll1_sysclk9 = {
141 .name = "pll1_sysclk9",
142 .parent = &pll1_clk,
143 .flags = CLK_PLL,
144 .div_reg = PLLDIV9,
145};
146
147static struct clk pll2_clk = {
148 .name = "pll2",
149 .parent = &ref_clk,
150 .flags = CLK_PLL,
151 .pll_data = &pll2_data,
152};
153
154static struct clk pll2_aux_clk = {
155 .name = "pll2_aux_clk",
156 .parent = &pll2_clk,
157 .flags = CLK_PLL | PRE_PLL,
158};
159
160static struct clk clkout1_clk = {
161 .name = "clkout1",
162 .parent = &pll2_clk,
163 .flags = CLK_PLL | PRE_PLL,
164};
165
166static struct clk pll2_sysclk1 = {
167 .name = "pll2_sysclk1",
168 .parent = &pll2_clk,
169 .flags = CLK_PLL,
170 .div_reg = PLLDIV1,
171};
172
173static struct clk pll2_sysclk2 = {
174 .name = "pll2_sysclk2",
175 .parent = &pll2_clk,
176 .flags = CLK_PLL,
177 .div_reg = PLLDIV2,
178};
179
180static struct clk pll2_sysclk3 = {
181 .name = "pll2_sysclk3",
182 .parent = &pll2_clk,
183 .flags = CLK_PLL,
184 .div_reg = PLLDIV3,
185};
186
187static struct clk pll2_sysclk4 = {
188 .name = "pll2_sysclk4",
189 .parent = &pll2_clk,
190 .flags = CLK_PLL,
191 .div_reg = PLLDIV4,
192};
193
194static struct clk pll2_sysclk5 = {
195 .name = "pll2_sysclk5",
196 .parent = &pll2_clk,
197 .flags = CLK_PLL,
198 .div_reg = PLLDIV5,
199};
200
201static struct clk pll2_sysclk6 = {
202 .name = "pll2_sysclk6",
203 .parent = &pll2_clk,
204 .flags = CLK_PLL,
205 .div_reg = PLLDIV6,
206};
207
208static struct clk pll2_sysclk7 = {
209 .name = "pll2_sysclk7",
210 .parent = &pll2_clk,
211 .flags = CLK_PLL,
212 .div_reg = PLLDIV7,
213};
214
215static struct clk pll2_sysclk8 = {
216 .name = "pll2_sysclk8",
217 .parent = &pll2_clk,
218 .flags = CLK_PLL,
219 .div_reg = PLLDIV8,
220};
221
222static struct clk pll2_sysclk9 = {
223 .name = "pll2_sysclk9",
224 .parent = &pll2_clk,
225 .flags = CLK_PLL,
226 .div_reg = PLLDIV9,
227};
228
229static struct clk vpss_dac_clk = {
230 .name = "vpss_dac",
231 .parent = &pll1_sysclk3,
232 .lpsc = DM365_LPSC_DAC_CLK,
233};
234
235static struct clk vpss_master_clk = {
236 .name = "vpss_master",
237 .parent = &pll1_sysclk5,
238 .lpsc = DM365_LPSC_VPSSMSTR,
239 .flags = CLK_PSC,
240};
241
242static struct clk arm_clk = {
243 .name = "arm_clk",
244 .parent = &pll2_sysclk2,
245 .lpsc = DAVINCI_LPSC_ARM,
246 .flags = ALWAYS_ENABLED,
247};
248
249static struct clk uart0_clk = {
250 .name = "uart0",
251 .parent = &pll1_aux_clk,
252 .lpsc = DAVINCI_LPSC_UART0,
253};
254
255static struct clk uart1_clk = {
256 .name = "uart1",
257 .parent = &pll1_sysclk4,
258 .lpsc = DAVINCI_LPSC_UART1,
259};
260
261static struct clk i2c_clk = {
262 .name = "i2c",
263 .parent = &pll1_aux_clk,
264 .lpsc = DAVINCI_LPSC_I2C,
265};
266
267static struct clk mmcsd0_clk = {
268 .name = "mmcsd0",
269 .parent = &pll1_sysclk8,
270 .lpsc = DAVINCI_LPSC_MMC_SD,
271};
272
273static struct clk mmcsd1_clk = {
274 .name = "mmcsd1",
275 .parent = &pll1_sysclk4,
276 .lpsc = DM365_LPSC_MMC_SD1,
277};
278
279static struct clk spi0_clk = {
280 .name = "spi0",
281 .parent = &pll1_sysclk4,
282 .lpsc = DAVINCI_LPSC_SPI,
283};
284
285static struct clk spi1_clk = {
286 .name = "spi1",
287 .parent = &pll1_sysclk4,
288 .lpsc = DM365_LPSC_SPI1,
289};
290
291static struct clk spi2_clk = {
292 .name = "spi2",
293 .parent = &pll1_sysclk4,
294 .lpsc = DM365_LPSC_SPI2,
295};
296
297static struct clk spi3_clk = {
298 .name = "spi3",
299 .parent = &pll1_sysclk4,
300 .lpsc = DM365_LPSC_SPI3,
301};
302
303static struct clk spi4_clk = {
304 .name = "spi4",
305 .parent = &pll1_aux_clk,
306 .lpsc = DM365_LPSC_SPI4,
307};
308
309static struct clk gpio_clk = {
310 .name = "gpio",
311 .parent = &pll1_sysclk4,
312 .lpsc = DAVINCI_LPSC_GPIO,
313};
314
315static struct clk aemif_clk = {
316 .name = "aemif",
317 .parent = &pll1_sysclk4,
318 .lpsc = DAVINCI_LPSC_AEMIF,
319};
320
321static struct clk pwm0_clk = {
322 .name = "pwm0",
323 .parent = &pll1_aux_clk,
324 .lpsc = DAVINCI_LPSC_PWM0,
325};
326
327static struct clk pwm1_clk = {
328 .name = "pwm1",
329 .parent = &pll1_aux_clk,
330 .lpsc = DAVINCI_LPSC_PWM1,
331};
332
333static struct clk pwm2_clk = {
334 .name = "pwm2",
335 .parent = &pll1_aux_clk,
336 .lpsc = DAVINCI_LPSC_PWM2,
337};
338
339static struct clk pwm3_clk = {
340 .name = "pwm3",
341 .parent = &ref_clk,
342 .lpsc = DM365_LPSC_PWM3,
343};
344
345static struct clk timer0_clk = {
346 .name = "timer0",
347 .parent = &pll1_aux_clk,
348 .lpsc = DAVINCI_LPSC_TIMER0,
349};
350
351static struct clk timer1_clk = {
352 .name = "timer1",
353 .parent = &pll1_aux_clk,
354 .lpsc = DAVINCI_LPSC_TIMER1,
355};
356
357static struct clk timer2_clk = {
358 .name = "timer2",
359 .parent = &pll1_aux_clk,
360 .lpsc = DAVINCI_LPSC_TIMER2,
361 .usecount = 1,
362};
363
364static struct clk timer3_clk = {
365 .name = "timer3",
366 .parent = &pll1_aux_clk,
367 .lpsc = DM365_LPSC_TIMER3,
368};
369
370static struct clk usb_clk = {
371 .name = "usb",
372 .parent = &pll2_sysclk1,
373 .lpsc = DAVINCI_LPSC_USB,
374};
375
376static struct clk emac_clk = {
377 .name = "emac",
378 .parent = &pll1_sysclk4,
379 .lpsc = DM365_LPSC_EMAC,
380};
381
382static struct clk voicecodec_clk = {
383 .name = "voice_codec",
384 .parent = &pll2_sysclk4,
385 .lpsc = DM365_LPSC_VOICE_CODEC,
386};
387
388static struct clk asp0_clk = {
389 .name = "asp0",
390 .parent = &pll1_sysclk4,
391 .lpsc = DM365_LPSC_McBSP1,
392};
393
394static struct clk rto_clk = {
395 .name = "rto",
396 .parent = &pll1_sysclk4,
397 .lpsc = DM365_LPSC_RTO,
398};
399
400static struct clk mjcp_clk = {
401 .name = "mjcp",
402 .parent = &pll1_sysclk3,
403 .lpsc = DM365_LPSC_MJCP,
404};
405
406static struct davinci_clk dm365_clks[] = {
407 CLK(NULL, "ref", &ref_clk),
408 CLK(NULL, "pll1", &pll1_clk),
409 CLK(NULL, "pll1_aux", &pll1_aux_clk),
410 CLK(NULL, "pll1_sysclkbp", &pll1_sysclkbp),
411 CLK(NULL, "clkout0", &clkout0_clk),
412 CLK(NULL, "pll1_sysclk1", &pll1_sysclk1),
413 CLK(NULL, "pll1_sysclk2", &pll1_sysclk2),
414 CLK(NULL, "pll1_sysclk3", &pll1_sysclk3),
415 CLK(NULL, "pll1_sysclk4", &pll1_sysclk4),
416 CLK(NULL, "pll1_sysclk5", &pll1_sysclk5),
417 CLK(NULL, "pll1_sysclk6", &pll1_sysclk6),
418 CLK(NULL, "pll1_sysclk7", &pll1_sysclk7),
419 CLK(NULL, "pll1_sysclk8", &pll1_sysclk8),
420 CLK(NULL, "pll1_sysclk9", &pll1_sysclk9),
421 CLK(NULL, "pll2", &pll2_clk),
422 CLK(NULL, "pll2_aux", &pll2_aux_clk),
423 CLK(NULL, "clkout1", &clkout1_clk),
424 CLK(NULL, "pll2_sysclk1", &pll2_sysclk1),
425 CLK(NULL, "pll2_sysclk2", &pll2_sysclk2),
426 CLK(NULL, "pll2_sysclk3", &pll2_sysclk3),
427 CLK(NULL, "pll2_sysclk4", &pll2_sysclk4),
428 CLK(NULL, "pll2_sysclk5", &pll2_sysclk5),
429 CLK(NULL, "pll2_sysclk6", &pll2_sysclk6),
430 CLK(NULL, "pll2_sysclk7", &pll2_sysclk7),
431 CLK(NULL, "pll2_sysclk8", &pll2_sysclk8),
432 CLK(NULL, "pll2_sysclk9", &pll2_sysclk9),
433 CLK(NULL, "vpss_dac", &vpss_dac_clk),
434 CLK(NULL, "vpss_master", &vpss_master_clk),
435 CLK(NULL, "arm", &arm_clk),
436 CLK(NULL, "uart0", &uart0_clk),
437 CLK(NULL, "uart1", &uart1_clk),
438 CLK("i2c_davinci.1", NULL, &i2c_clk),
439 CLK("davinci_mmc.0", NULL, &mmcsd0_clk),
440 CLK("davinci_mmc.1", NULL, &mmcsd1_clk),
441 CLK("spi_davinci.0", NULL, &spi0_clk),
442 CLK("spi_davinci.1", NULL, &spi1_clk),
443 CLK("spi_davinci.2", NULL, &spi2_clk),
444 CLK("spi_davinci.3", NULL, &spi3_clk),
445 CLK("spi_davinci.4", NULL, &spi4_clk),
446 CLK(NULL, "gpio", &gpio_clk),
447 CLK(NULL, "aemif", &aemif_clk),
448 CLK(NULL, "pwm0", &pwm0_clk),
449 CLK(NULL, "pwm1", &pwm1_clk),
450 CLK(NULL, "pwm2", &pwm2_clk),
451 CLK(NULL, "pwm3", &pwm3_clk),
452 CLK(NULL, "timer0", &timer0_clk),
453 CLK(NULL, "timer1", &timer1_clk),
454 CLK("watchdog", NULL, &timer2_clk),
455 CLK(NULL, "timer3", &timer3_clk),
456 CLK(NULL, "usb", &usb_clk),
457 CLK("davinci_emac.1", NULL, &emac_clk),
458 CLK("voice_codec", NULL, &voicecodec_clk),
459 CLK("soc-audio.0", NULL, &asp0_clk),
460 CLK(NULL, "rto", &rto_clk),
461 CLK(NULL, "mjcp", &mjcp_clk),
462 CLK(NULL, NULL, NULL),
463};
464
465/*----------------------------------------------------------------------*/
466
467#define PINMUX0 0x00
468#define PINMUX1 0x04
469#define PINMUX2 0x08
470#define PINMUX3 0x0c
471#define PINMUX4 0x10
472#define INTMUX 0x18
473#define EVTMUX 0x1c
474
475
476static const struct mux_config dm365_pins[] = {
477#ifdef CONFIG_DAVINCI_MUX
478MUX_CFG(DM365, MMCSD0, 0, 24, 1, 0, false)
479
480MUX_CFG(DM365, SD1_CLK, 0, 16, 3, 1, false)
481MUX_CFG(DM365, SD1_CMD, 4, 30, 3, 1, false)
482MUX_CFG(DM365, SD1_DATA3, 4, 28, 3, 1, false)
483MUX_CFG(DM365, SD1_DATA2, 4, 26, 3, 1, false)
484MUX_CFG(DM365, SD1_DATA1, 4, 24, 3, 1, false)
485MUX_CFG(DM365, SD1_DATA0, 4, 22, 3, 1, false)
486
487MUX_CFG(DM365, I2C_SDA, 3, 23, 3, 2, false)
488MUX_CFG(DM365, I2C_SCL, 3, 21, 3, 2, false)
489
490MUX_CFG(DM365, AEMIF_AR, 2, 0, 3, 1, false)
491MUX_CFG(DM365, AEMIF_A3, 2, 2, 3, 1, false)
492MUX_CFG(DM365, AEMIF_A7, 2, 4, 3, 1, false)
493MUX_CFG(DM365, AEMIF_D15_8, 2, 6, 1, 1, false)
494MUX_CFG(DM365, AEMIF_CE0, 2, 7, 1, 0, false)
495
496MUX_CFG(DM365, MCBSP0_BDX, 0, 23, 1, 1, false)
497MUX_CFG(DM365, MCBSP0_X, 0, 22, 1, 1, false)
498MUX_CFG(DM365, MCBSP0_BFSX, 0, 21, 1, 1, false)
499MUX_CFG(DM365, MCBSP0_BDR, 0, 20, 1, 1, false)
500MUX_CFG(DM365, MCBSP0_R, 0, 19, 1, 1, false)
501MUX_CFG(DM365, MCBSP0_BFSR, 0, 18, 1, 1, false)
502
503MUX_CFG(DM365, SPI0_SCLK, 3, 28, 1, 1, false)
504MUX_CFG(DM365, SPI0_SDI, 3, 26, 3, 1, false)
505MUX_CFG(DM365, SPI0_SDO, 3, 25, 1, 1, false)
506MUX_CFG(DM365, SPI0_SDENA0, 3, 29, 3, 1, false)
507MUX_CFG(DM365, SPI0_SDENA1, 3, 26, 3, 2, false)
508
509MUX_CFG(DM365, UART0_RXD, 3, 20, 1, 1, false)
510MUX_CFG(DM365, UART0_TXD, 3, 19, 1, 1, false)
511MUX_CFG(DM365, UART1_RXD, 3, 17, 3, 2, false)
512MUX_CFG(DM365, UART1_TXD, 3, 15, 3, 2, false)
513MUX_CFG(DM365, UART1_RTS, 3, 23, 3, 1, false)
514MUX_CFG(DM365, UART1_CTS, 3, 21, 3, 1, false)
515
516MUX_CFG(DM365, EMAC_TX_EN, 3, 17, 3, 1, false)
517MUX_CFG(DM365, EMAC_TX_CLK, 3, 15, 3, 1, false)
518MUX_CFG(DM365, EMAC_COL, 3, 14, 1, 1, false)
519MUX_CFG(DM365, EMAC_TXD3, 3, 13, 1, 1, false)
520MUX_CFG(DM365, EMAC_TXD2, 3, 12, 1, 1, false)
521MUX_CFG(DM365, EMAC_TXD1, 3, 11, 1, 1, false)
522MUX_CFG(DM365, EMAC_TXD0, 3, 10, 1, 1, false)
523MUX_CFG(DM365, EMAC_RXD3, 3, 9, 1, 1, false)
524MUX_CFG(DM365, EMAC_RXD2, 3, 8, 1, 1, false)
525MUX_CFG(DM365, EMAC_RXD1, 3, 7, 1, 1, false)
526MUX_CFG(DM365, EMAC_RXD0, 3, 6, 1, 1, false)
527MUX_CFG(DM365, EMAC_RX_CLK, 3, 5, 1, 1, false)
528MUX_CFG(DM365, EMAC_RX_DV, 3, 4, 1, 1, false)
529MUX_CFG(DM365, EMAC_RX_ER, 3, 3, 1, 1, false)
530MUX_CFG(DM365, EMAC_CRS, 3, 2, 1, 1, false)
531MUX_CFG(DM365, EMAC_MDIO, 3, 1, 1, 1, false)
532MUX_CFG(DM365, EMAC_MDCLK, 3, 0, 1, 1, false)
533
534MUX_CFG(DM365, KEYPAD, 2, 0, 0x3f, 0x3f, false)
535
536MUX_CFG(DM365, PWM0, 1, 0, 3, 2, false)
537MUX_CFG(DM365, PWM0_G23, 3, 26, 3, 3, false)
538MUX_CFG(DM365, PWM1, 1, 2, 3, 2, false)
539MUX_CFG(DM365, PWM1_G25, 3, 29, 3, 2, false)
540MUX_CFG(DM365, PWM2_G87, 1, 10, 3, 2, false)
541MUX_CFG(DM365, PWM2_G88, 1, 8, 3, 2, false)
542MUX_CFG(DM365, PWM2_G89, 1, 6, 3, 2, false)
543MUX_CFG(DM365, PWM2_G90, 1, 4, 3, 2, false)
544MUX_CFG(DM365, PWM3_G80, 1, 20, 3, 3, false)
545MUX_CFG(DM365, PWM3_G81, 1, 18, 3, 3, false)
546MUX_CFG(DM365, PWM3_G85, 1, 14, 3, 2, false)
547MUX_CFG(DM365, PWM3_G86, 1, 12, 3, 2, false)
548
549MUX_CFG(DM365, SPI1_SCLK, 4, 2, 3, 1, false)
550MUX_CFG(DM365, SPI1_SDI, 3, 31, 1, 1, false)
551MUX_CFG(DM365, SPI1_SDO, 4, 0, 3, 1, false)
552MUX_CFG(DM365, SPI1_SDENA0, 4, 4, 3, 1, false)
553MUX_CFG(DM365, SPI1_SDENA1, 4, 0, 3, 2, false)
554
555MUX_CFG(DM365, SPI2_SCLK, 4, 10, 3, 1, false)
556MUX_CFG(DM365, SPI2_SDI, 4, 6, 3, 1, false)
557MUX_CFG(DM365, SPI2_SDO, 4, 8, 3, 1, false)
558MUX_CFG(DM365, SPI2_SDENA0, 4, 12, 3, 1, false)
559MUX_CFG(DM365, SPI2_SDENA1, 4, 8, 3, 2, false)
560
561MUX_CFG(DM365, SPI3_SCLK, 0, 0, 3, 2, false)
562MUX_CFG(DM365, SPI3_SDI, 0, 2, 3, 2, false)
563MUX_CFG(DM365, SPI3_SDO, 0, 6, 3, 2, false)
564MUX_CFG(DM365, SPI3_SDENA0, 0, 4, 3, 2, false)
565MUX_CFG(DM365, SPI3_SDENA1, 0, 6, 3, 3, false)
566
567MUX_CFG(DM365, SPI4_SCLK, 4, 18, 3, 1, false)
568MUX_CFG(DM365, SPI4_SDI, 4, 14, 3, 1, false)
569MUX_CFG(DM365, SPI4_SDO, 4, 16, 3, 1, false)
570MUX_CFG(DM365, SPI4_SDENA0, 4, 20, 3, 1, false)
571MUX_CFG(DM365, SPI4_SDENA1, 4, 16, 3, 2, false)
572
573MUX_CFG(DM365, GPIO20, 3, 21, 3, 0, false)
574MUX_CFG(DM365, GPIO33, 4, 12, 3, 0, false)
575MUX_CFG(DM365, GPIO40, 4, 26, 3, 0, false)
576
577MUX_CFG(DM365, VOUT_FIELD, 1, 18, 3, 1, false)
578MUX_CFG(DM365, VOUT_FIELD_G81, 1, 18, 3, 0, false)
579MUX_CFG(DM365, VOUT_HVSYNC, 1, 16, 1, 0, false)
580MUX_CFG(DM365, VOUT_COUTL_EN, 1, 0, 0xff, 0x55, false)
581MUX_CFG(DM365, VOUT_COUTH_EN, 1, 8, 0xff, 0x55, false)
582MUX_CFG(DM365, VIN_CAM_WEN, 0, 14, 3, 0, false)
583MUX_CFG(DM365, VIN_CAM_VD, 0, 13, 1, 0, false)
584MUX_CFG(DM365, VIN_CAM_HD, 0, 12, 1, 0, false)
585MUX_CFG(DM365, VIN_YIN4_7_EN, 0, 0, 0xff, 0, false)
586MUX_CFG(DM365, VIN_YIN0_3_EN, 0, 8, 0xf, 0, false)
587
588INT_CFG(DM365, INT_EDMA_CC, 2, 1, 1, false)
589INT_CFG(DM365, INT_EDMA_TC0_ERR, 3, 1, 1, false)
590INT_CFG(DM365, INT_EDMA_TC1_ERR, 4, 1, 1, false)
591INT_CFG(DM365, INT_EDMA_TC2_ERR, 22, 1, 1, false)
592INT_CFG(DM365, INT_EDMA_TC3_ERR, 23, 1, 1, false)
593INT_CFG(DM365, INT_PRTCSS, 10, 1, 1, false)
594INT_CFG(DM365, INT_EMAC_RXTHRESH, 14, 1, 1, false)
595INT_CFG(DM365, INT_EMAC_RXPULSE, 15, 1, 1, false)
596INT_CFG(DM365, INT_EMAC_TXPULSE, 16, 1, 1, false)
597INT_CFG(DM365, INT_EMAC_MISCPULSE, 17, 1, 1, false)
598INT_CFG(DM365, INT_IMX0_ENABLE, 0, 1, 0, false)
599INT_CFG(DM365, INT_IMX0_DISABLE, 0, 1, 1, false)
600INT_CFG(DM365, INT_HDVICP_ENABLE, 0, 1, 1, false)
601INT_CFG(DM365, INT_HDVICP_DISABLE, 0, 1, 0, false)
602INT_CFG(DM365, INT_IMX1_ENABLE, 24, 1, 1, false)
603INT_CFG(DM365, INT_IMX1_DISABLE, 24, 1, 0, false)
604INT_CFG(DM365, INT_NSF_ENABLE, 25, 1, 1, false)
605INT_CFG(DM365, INT_NSF_DISABLE, 25, 1, 0, false)
606#endif
607};
608
609static struct emac_platform_data dm365_emac_pdata = {
610 .ctrl_reg_offset = DM365_EMAC_CNTRL_OFFSET,
611 .ctrl_mod_reg_offset = DM365_EMAC_CNTRL_MOD_OFFSET,
612 .ctrl_ram_offset = DM365_EMAC_CNTRL_RAM_OFFSET,
613 .mdio_reg_offset = DM365_EMAC_MDIO_OFFSET,
614 .ctrl_ram_size = DM365_EMAC_CNTRL_RAM_SIZE,
615 .version = EMAC_VERSION_2,
616};
617
618static struct resource dm365_emac_resources[] = {
619 {
620 .start = DM365_EMAC_BASE,
621 .end = DM365_EMAC_BASE + 0x47ff,
622 .flags = IORESOURCE_MEM,
623 },
624 {
625 .start = IRQ_DM365_EMAC_RXTHRESH,
626 .end = IRQ_DM365_EMAC_RXTHRESH,
627 .flags = IORESOURCE_IRQ,
628 },
629 {
630 .start = IRQ_DM365_EMAC_RXPULSE,
631 .end = IRQ_DM365_EMAC_RXPULSE,
632 .flags = IORESOURCE_IRQ,
633 },
634 {
635 .start = IRQ_DM365_EMAC_TXPULSE,
636 .end = IRQ_DM365_EMAC_TXPULSE,
637 .flags = IORESOURCE_IRQ,
638 },
639 {
640 .start = IRQ_DM365_EMAC_MISCPULSE,
641 .end = IRQ_DM365_EMAC_MISCPULSE,
642 .flags = IORESOURCE_IRQ,
643 },
644};
645
646static struct platform_device dm365_emac_device = {
647 .name = "davinci_emac",
648 .id = 1,
649 .dev = {
650 .platform_data = &dm365_emac_pdata,
651 },
652 .num_resources = ARRAY_SIZE(dm365_emac_resources),
653 .resource = dm365_emac_resources,
654};
655
656static u8 dm365_default_priorities[DAVINCI_N_AINTC_IRQ] = {
657 [IRQ_VDINT0] = 2,
658 [IRQ_VDINT1] = 6,
659 [IRQ_VDINT2] = 6,
660 [IRQ_HISTINT] = 6,
661 [IRQ_H3AINT] = 6,
662 [IRQ_PRVUINT] = 6,
663 [IRQ_RSZINT] = 6,
664 [IRQ_DM365_INSFINT] = 7,
665 [IRQ_VENCINT] = 6,
666 [IRQ_ASQINT] = 6,
667 [IRQ_IMXINT] = 6,
668 [IRQ_DM365_IMCOPINT] = 4,
669 [IRQ_USBINT] = 4,
670 [IRQ_DM365_RTOINT] = 7,
671 [IRQ_DM365_TINT5] = 7,
672 [IRQ_DM365_TINT6] = 5,
673 [IRQ_CCINT0] = 5,
674 [IRQ_CCERRINT] = 5,
675 [IRQ_TCERRINT0] = 5,
676 [IRQ_TCERRINT] = 7,
677 [IRQ_PSCIN] = 4,
678 [IRQ_DM365_SPINT2_1] = 7,
679 [IRQ_DM365_TINT7] = 7,
680 [IRQ_DM365_SDIOINT0] = 7,
681 [IRQ_MBXINT] = 7,
682 [IRQ_MBRINT] = 7,
683 [IRQ_MMCINT] = 7,
684 [IRQ_DM365_MMCINT1] = 7,
685 [IRQ_DM365_PWMINT3] = 7,
686 [IRQ_DDRINT] = 4,
687 [IRQ_AEMIFINT] = 2,
688 [IRQ_DM365_SDIOINT1] = 2,
689 [IRQ_TINT0_TINT12] = 7,
690 [IRQ_TINT0_TINT34] = 7,
691 [IRQ_TINT1_TINT12] = 7,
692 [IRQ_TINT1_TINT34] = 7,
693 [IRQ_PWMINT0] = 7,
694 [IRQ_PWMINT1] = 3,
695 [IRQ_PWMINT2] = 3,
696 [IRQ_I2C] = 3,
697 [IRQ_UARTINT0] = 3,
698 [IRQ_UARTINT1] = 3,
699 [IRQ_DM365_SPIINT0_0] = 3,
700 [IRQ_DM365_SPIINT3_0] = 3,
701 [IRQ_DM365_GPIO0] = 3,
702 [IRQ_DM365_GPIO1] = 7,
703 [IRQ_DM365_GPIO2] = 4,
704 [IRQ_DM365_GPIO3] = 4,
705 [IRQ_DM365_GPIO4] = 7,
706 [IRQ_DM365_GPIO5] = 7,
707 [IRQ_DM365_GPIO6] = 7,
708 [IRQ_DM365_GPIO7] = 7,
709 [IRQ_DM365_EMAC_RXTHRESH] = 7,
710 [IRQ_DM365_EMAC_RXPULSE] = 7,
711 [IRQ_DM365_EMAC_TXPULSE] = 7,
712 [IRQ_DM365_EMAC_MISCPULSE] = 7,
713 [IRQ_DM365_GPIO12] = 7,
714 [IRQ_DM365_GPIO13] = 7,
715 [IRQ_DM365_GPIO14] = 7,
716 [IRQ_DM365_GPIO15] = 7,
717 [IRQ_DM365_KEYINT] = 7,
718 [IRQ_DM365_TCERRINT2] = 7,
719 [IRQ_DM365_TCERRINT3] = 7,
720 [IRQ_DM365_EMUINT] = 7,
721};
722
723/* Four Transfer Controllers on DM365 */
724static const s8
725dm365_queue_tc_mapping[][2] = {
726 /* {event queue no, TC no} */
727 {0, 0},
728 {1, 1},
729 {2, 2},
730 {3, 3},
731 {-1, -1},
732};
733
734static const s8
735dm365_queue_priority_mapping[][2] = {
736 /* {event queue no, Priority} */
737 {0, 7},
738 {1, 7},
739 {2, 7},
740 {3, 0},
741 {-1, -1},
742};
743
744static struct edma_soc_info dm365_edma_info[] = {
745 {
746 .n_channel = 64,
747 .n_region = 4,
748 .n_slot = 256,
749 .n_tc = 4,
750 .n_cc = 1,
751 .queue_tc_mapping = dm365_queue_tc_mapping,
752 .queue_priority_mapping = dm365_queue_priority_mapping,
753 .default_queue = EVENTQ_2,
754 },
755};
756
757static struct resource edma_resources[] = {
758 {
759 .name = "edma_cc0",
760 .start = 0x01c00000,
761 .end = 0x01c00000 + SZ_64K - 1,
762 .flags = IORESOURCE_MEM,
763 },
764 {
765 .name = "edma_tc0",
766 .start = 0x01c10000,
767 .end = 0x01c10000 + SZ_1K - 1,
768 .flags = IORESOURCE_MEM,
769 },
770 {
771 .name = "edma_tc1",
772 .start = 0x01c10400,
773 .end = 0x01c10400 + SZ_1K - 1,
774 .flags = IORESOURCE_MEM,
775 },
776 {
777 .name = "edma_tc2",
778 .start = 0x01c10800,
779 .end = 0x01c10800 + SZ_1K - 1,
780 .flags = IORESOURCE_MEM,
781 },
782 {
783 .name = "edma_tc3",
784 .start = 0x01c10c00,
785 .end = 0x01c10c00 + SZ_1K - 1,
786 .flags = IORESOURCE_MEM,
787 },
788 {
789 .name = "edma0",
790 .start = IRQ_CCINT0,
791 .flags = IORESOURCE_IRQ,
792 },
793 {
794 .name = "edma0_err",
795 .start = IRQ_CCERRINT,
796 .flags = IORESOURCE_IRQ,
797 },
798 /* not using TC*_ERR */
799};
800
801static struct platform_device dm365_edma_device = {
802 .name = "edma",
803 .id = 0,
804 .dev.platform_data = dm365_edma_info,
805 .num_resources = ARRAY_SIZE(edma_resources),
806 .resource = edma_resources,
807};
808
809static struct map_desc dm365_io_desc[] = {
810 {
811 .virtual = IO_VIRT,
812 .pfn = __phys_to_pfn(IO_PHYS),
813 .length = IO_SIZE,
814 .type = MT_DEVICE
815 },
816 {
817 .virtual = SRAM_VIRT,
818 .pfn = __phys_to_pfn(0x00010000),
819 .length = SZ_32K,
820 /* MT_MEMORY_NONCACHED requires supersection alignment */
821 .type = MT_DEVICE,
822 },
823};
824
825/* Contents of JTAG ID register used to identify exact cpu type */
826static struct davinci_id dm365_ids[] = {
827 {
828 .variant = 0x0,
829 .part_no = 0xb83e,
830 .manufacturer = 0x017,
831 .cpu_id = DAVINCI_CPU_ID_DM365,
832 .name = "dm365_rev1.1",
833 },
834 {
835 .variant = 0x8,
836 .part_no = 0xb83e,
837 .manufacturer = 0x017,
838 .cpu_id = DAVINCI_CPU_ID_DM365,
839 .name = "dm365_rev1.2",
840 },
841};
842
843static void __iomem *dm365_psc_bases[] = {
844 IO_ADDRESS(DAVINCI_PWR_SLEEP_CNTRL_BASE),
845};
846
847struct davinci_timer_info dm365_timer_info = {
848 .timers = davinci_timer_instance,
849 .clockevent_id = T0_BOT,
850 .clocksource_id = T0_TOP,
851};
852
853static struct plat_serial8250_port dm365_serial_platform_data[] = {
854 {
855 .mapbase = DAVINCI_UART0_BASE,
856 .irq = IRQ_UARTINT0,
857 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST |
858 UPF_IOREMAP,
859 .iotype = UPIO_MEM,
860 .regshift = 2,
861 },
862 {
863 .mapbase = DAVINCI_UART1_BASE,
864 .irq = IRQ_UARTINT1,
865 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST |
866 UPF_IOREMAP,
867 .iotype = UPIO_MEM,
868 .regshift = 2,
869 },
870 {
871 .flags = 0
872 },
873};
874
875static struct platform_device dm365_serial_device = {
876 .name = "serial8250",
877 .id = PLAT8250_DEV_PLATFORM,
878 .dev = {
879 .platform_data = dm365_serial_platform_data,
880 },
881};
882
883static struct davinci_soc_info davinci_soc_info_dm365 = {
884 .io_desc = dm365_io_desc,
885 .io_desc_num = ARRAY_SIZE(dm365_io_desc),
886 .jtag_id_base = IO_ADDRESS(0x01c40028),
887 .ids = dm365_ids,
888 .ids_num = ARRAY_SIZE(dm365_ids),
889 .cpu_clks = dm365_clks,
890 .psc_bases = dm365_psc_bases,
891 .psc_bases_num = ARRAY_SIZE(dm365_psc_bases),
892 .pinmux_base = IO_ADDRESS(DAVINCI_SYSTEM_MODULE_BASE),
893 .pinmux_pins = dm365_pins,
894 .pinmux_pins_num = ARRAY_SIZE(dm365_pins),
895 .intc_base = IO_ADDRESS(DAVINCI_ARM_INTC_BASE),
896 .intc_type = DAVINCI_INTC_TYPE_AINTC,
897 .intc_irq_prios = dm365_default_priorities,
898 .intc_irq_num = DAVINCI_N_AINTC_IRQ,
899 .timer_info = &dm365_timer_info,
900 .gpio_base = IO_ADDRESS(DAVINCI_GPIO_BASE),
901 .gpio_num = 104,
902 .gpio_irq = IRQ_DM365_GPIO0,
903 .gpio_unbanked = 8, /* really 16 ... skip muxed GPIOs */
904 .serial_dev = &dm365_serial_device,
905 .emac_pdata = &dm365_emac_pdata,
906 .sram_dma = 0x00010000,
907 .sram_len = SZ_32K,
908};
909
910void __init dm365_init(void)
911{
912 davinci_common_init(&davinci_soc_info_dm365);
913}
914
915static int __init dm365_init_devices(void)
916{
917 if (!cpu_is_davinci_dm365())
918 return 0;
919
920 davinci_cfg_reg(DM365_INT_EDMA_CC);
921 platform_device_register(&dm365_edma_device);
922 platform_device_register(&dm365_emac_device);
923
924 return 0;
925}
926postcore_initcall(dm365_init_devices);
diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c
index fb5449b3c97b..d6e0fa5a8d8a 100644
--- a/arch/arm/mach-davinci/dm644x.c
+++ b/arch/arm/mach-davinci/dm644x.c
@@ -27,6 +27,7 @@
27#include <mach/time.h> 27#include <mach/time.h>
28#include <mach/serial.h> 28#include <mach/serial.h>
29#include <mach/common.h> 29#include <mach/common.h>
30#include <mach/asp.h>
30 31
31#include "clock.h" 32#include "clock.h"
32#include "mux.h" 33#include "mux.h"
@@ -303,7 +304,7 @@ struct davinci_clk dm644x_clks[] = {
303 CLK("davinci_emac.1", NULL, &emac_clk), 304 CLK("davinci_emac.1", NULL, &emac_clk),
304 CLK("i2c_davinci.1", NULL, &i2c_clk), 305 CLK("i2c_davinci.1", NULL, &i2c_clk),
305 CLK("palm_bk3710", NULL, &ide_clk), 306 CLK("palm_bk3710", NULL, &ide_clk),
306 CLK("soc-audio.0", NULL, &asp_clk), 307 CLK("davinci-asp", NULL, &asp_clk),
307 CLK("davinci_mmc.0", NULL, &mmcsd_clk), 308 CLK("davinci_mmc.0", NULL, &mmcsd_clk),
308 CLK(NULL, "spi", &spi_clk), 309 CLK(NULL, "spi", &spi_clk),
309 CLK(NULL, "gpio", &gpio_clk), 310 CLK(NULL, "gpio", &gpio_clk),
@@ -484,17 +485,38 @@ static const s8 dma_chan_dm644x_no_event[] = {
484 -1 485 -1
485}; 486};
486 487
487static struct edma_soc_info dm644x_edma_info = { 488static const s8
488 .n_channel = 64, 489queue_tc_mapping[][2] = {
489 .n_region = 4, 490 /* {event queue no, TC no} */
490 .n_slot = 128, 491 {0, 0},
491 .n_tc = 2, 492 {1, 1},
492 .noevent = dma_chan_dm644x_no_event, 493 {-1, -1},
494};
495
496static const s8
497queue_priority_mapping[][2] = {
498 /* {event queue no, Priority} */
499 {0, 3},
500 {1, 7},
501 {-1, -1},
502};
503
504static struct edma_soc_info dm644x_edma_info[] = {
505 {
506 .n_channel = 64,
507 .n_region = 4,
508 .n_slot = 128,
509 .n_tc = 2,
510 .n_cc = 1,
511 .noevent = dma_chan_dm644x_no_event,
512 .queue_tc_mapping = queue_tc_mapping,
513 .queue_priority_mapping = queue_priority_mapping,
514 },
493}; 515};
494 516
495static struct resource edma_resources[] = { 517static struct resource edma_resources[] = {
496 { 518 {
497 .name = "edma_cc", 519 .name = "edma_cc0",
498 .start = 0x01c00000, 520 .start = 0x01c00000,
499 .end = 0x01c00000 + SZ_64K - 1, 521 .end = 0x01c00000 + SZ_64K - 1,
500 .flags = IORESOURCE_MEM, 522 .flags = IORESOURCE_MEM,
@@ -512,10 +534,12 @@ static struct resource edma_resources[] = {
512 .flags = IORESOURCE_MEM, 534 .flags = IORESOURCE_MEM,
513 }, 535 },
514 { 536 {
537 .name = "edma0",
515 .start = IRQ_CCINT0, 538 .start = IRQ_CCINT0,
516 .flags = IORESOURCE_IRQ, 539 .flags = IORESOURCE_IRQ,
517 }, 540 },
518 { 541 {
542 .name = "edma0_err",
519 .start = IRQ_CCERRINT, 543 .start = IRQ_CCERRINT,
520 .flags = IORESOURCE_IRQ, 544 .flags = IORESOURCE_IRQ,
521 }, 545 },
@@ -524,12 +548,91 @@ static struct resource edma_resources[] = {
524 548
525static struct platform_device dm644x_edma_device = { 549static struct platform_device dm644x_edma_device = {
526 .name = "edma", 550 .name = "edma",
527 .id = -1, 551 .id = 0,
528 .dev.platform_data = &dm644x_edma_info, 552 .dev.platform_data = dm644x_edma_info,
529 .num_resources = ARRAY_SIZE(edma_resources), 553 .num_resources = ARRAY_SIZE(edma_resources),
530 .resource = edma_resources, 554 .resource = edma_resources,
531}; 555};
532 556
557/* DM6446 EVM uses ASP0; line-out is a pair of RCA jacks */
558static struct resource dm644x_asp_resources[] = {
559 {
560 .start = DAVINCI_ASP0_BASE,
561 .end = DAVINCI_ASP0_BASE + SZ_8K - 1,
562 .flags = IORESOURCE_MEM,
563 },
564 {
565 .start = DAVINCI_DMA_ASP0_TX,
566 .end = DAVINCI_DMA_ASP0_TX,
567 .flags = IORESOURCE_DMA,
568 },
569 {
570 .start = DAVINCI_DMA_ASP0_RX,
571 .end = DAVINCI_DMA_ASP0_RX,
572 .flags = IORESOURCE_DMA,
573 },
574};
575
576static struct platform_device dm644x_asp_device = {
577 .name = "davinci-asp",
578 .id = -1,
579 .num_resources = ARRAY_SIZE(dm644x_asp_resources),
580 .resource = dm644x_asp_resources,
581};
582
583static struct resource dm644x_vpss_resources[] = {
584 {
585 /* VPSS Base address */
586 .name = "vpss",
587 .start = 0x01c73400,
588 .end = 0x01c73400 + 0xff,
589 .flags = IORESOURCE_MEM,
590 },
591};
592
593static struct platform_device dm644x_vpss_device = {
594 .name = "vpss",
595 .id = -1,
596 .dev.platform_data = "dm644x_vpss",
597 .num_resources = ARRAY_SIZE(dm644x_vpss_resources),
598 .resource = dm644x_vpss_resources,
599};
600
601static struct resource vpfe_resources[] = {
602 {
603 .start = IRQ_VDINT0,
604 .end = IRQ_VDINT0,
605 .flags = IORESOURCE_IRQ,
606 },
607 {
608 .start = IRQ_VDINT1,
609 .end = IRQ_VDINT1,
610 .flags = IORESOURCE_IRQ,
611 },
612 {
613 .start = 0x01c70400,
614 .end = 0x01c70400 + 0xff,
615 .flags = IORESOURCE_MEM,
616 },
617};
618
619static u64 vpfe_capture_dma_mask = DMA_BIT_MASK(32);
620static struct platform_device vpfe_capture_dev = {
621 .name = CAPTURE_DRV_NAME,
622 .id = -1,
623 .num_resources = ARRAY_SIZE(vpfe_resources),
624 .resource = vpfe_resources,
625 .dev = {
626 .dma_mask = &vpfe_capture_dma_mask,
627 .coherent_dma_mask = DMA_BIT_MASK(32),
628 },
629};
630
631void dm644x_set_vpfe_config(struct vpfe_config *cfg)
632{
633 vpfe_capture_dev.dev.platform_data = cfg;
634}
635
533/*----------------------------------------------------------------------*/ 636/*----------------------------------------------------------------------*/
534 637
535static struct map_desc dm644x_io_desc[] = { 638static struct map_desc dm644x_io_desc[] = {
@@ -557,6 +660,13 @@ static struct davinci_id dm644x_ids[] = {
557 .cpu_id = DAVINCI_CPU_ID_DM6446, 660 .cpu_id = DAVINCI_CPU_ID_DM6446,
558 .name = "dm6446", 661 .name = "dm6446",
559 }, 662 },
663 {
664 .variant = 0x1,
665 .part_no = 0xb700,
666 .manufacturer = 0x017,
667 .cpu_id = DAVINCI_CPU_ID_DM6446,
668 .name = "dm6446a",
669 },
560}; 670};
561 671
562static void __iomem *dm644x_psc_bases[] = { 672static void __iomem *dm644x_psc_bases[] = {
@@ -630,7 +740,6 @@ static struct davinci_soc_info davinci_soc_info_dm644x = {
630 .intc_irq_prios = dm644x_default_priorities, 740 .intc_irq_prios = dm644x_default_priorities,
631 .intc_irq_num = DAVINCI_N_AINTC_IRQ, 741 .intc_irq_num = DAVINCI_N_AINTC_IRQ,
632 .timer_info = &dm644x_timer_info, 742 .timer_info = &dm644x_timer_info,
633 .wdt_base = IO_ADDRESS(DAVINCI_WDOG_BASE),
634 .gpio_base = IO_ADDRESS(DAVINCI_GPIO_BASE), 743 .gpio_base = IO_ADDRESS(DAVINCI_GPIO_BASE),
635 .gpio_num = 71, 744 .gpio_num = 71,
636 .gpio_irq = IRQ_GPIOBNK0, 745 .gpio_irq = IRQ_GPIOBNK0,
@@ -640,6 +749,13 @@ static struct davinci_soc_info davinci_soc_info_dm644x = {
640 .sram_len = SZ_16K, 749 .sram_len = SZ_16K,
641}; 750};
642 751
752void __init dm644x_init_asp(struct snd_platform_data *pdata)
753{
754 davinci_cfg_reg(DM644X_MCBSP);
755 dm644x_asp_device.dev.platform_data = pdata;
756 platform_device_register(&dm644x_asp_device);
757}
758
643void __init dm644x_init(void) 759void __init dm644x_init(void)
644{ 760{
645 davinci_common_init(&davinci_soc_info_dm644x); 761 davinci_common_init(&davinci_soc_info_dm644x);
@@ -652,6 +768,9 @@ static int __init dm644x_init_devices(void)
652 768
653 platform_device_register(&dm644x_edma_device); 769 platform_device_register(&dm644x_edma_device);
654 platform_device_register(&dm644x_emac_device); 770 platform_device_register(&dm644x_emac_device);
771 platform_device_register(&dm644x_vpss_device);
772 platform_device_register(&vpfe_capture_dev);
773
655 return 0; 774 return 0;
656} 775}
657postcore_initcall(dm644x_init_devices); 776postcore_initcall(dm644x_init_devices);
diff --git a/arch/arm/mach-davinci/dm646x.c b/arch/arm/mach-davinci/dm646x.c
index 334f0711e0f5..0976049c7b3b 100644
--- a/arch/arm/mach-davinci/dm646x.c
+++ b/arch/arm/mach-davinci/dm646x.c
@@ -27,10 +27,20 @@
27#include <mach/time.h> 27#include <mach/time.h>
28#include <mach/serial.h> 28#include <mach/serial.h>
29#include <mach/common.h> 29#include <mach/common.h>
30#include <mach/asp.h>
30 31
31#include "clock.h" 32#include "clock.h"
32#include "mux.h" 33#include "mux.h"
33 34
35#define DAVINCI_VPIF_BASE (0x01C12000)
36#define VDD3P3V_PWDN_OFFSET (0x48)
37#define VSCLKDIS_OFFSET (0x6C)
38
39#define VDD3P3V_VID_MASK (BIT_MASK(3) | BIT_MASK(2) | BIT_MASK(1) |\
40 BIT_MASK(0))
41#define VSCLKDIS_MASK (BIT_MASK(11) | BIT_MASK(10) | BIT_MASK(9) |\
42 BIT_MASK(8))
43
34/* 44/*
35 * Device specific clocks 45 * Device specific clocks
36 */ 46 */
@@ -162,6 +172,41 @@ static struct clk arm_clk = {
162 .flags = ALWAYS_ENABLED, 172 .flags = ALWAYS_ENABLED,
163}; 173};
164 174
175static struct clk edma_cc_clk = {
176 .name = "edma_cc",
177 .parent = &pll1_sysclk2,
178 .lpsc = DM646X_LPSC_TPCC,
179 .flags = ALWAYS_ENABLED,
180};
181
182static struct clk edma_tc0_clk = {
183 .name = "edma_tc0",
184 .parent = &pll1_sysclk2,
185 .lpsc = DM646X_LPSC_TPTC0,
186 .flags = ALWAYS_ENABLED,
187};
188
189static struct clk edma_tc1_clk = {
190 .name = "edma_tc1",
191 .parent = &pll1_sysclk2,
192 .lpsc = DM646X_LPSC_TPTC1,
193 .flags = ALWAYS_ENABLED,
194};
195
196static struct clk edma_tc2_clk = {
197 .name = "edma_tc2",
198 .parent = &pll1_sysclk2,
199 .lpsc = DM646X_LPSC_TPTC2,
200 .flags = ALWAYS_ENABLED,
201};
202
203static struct clk edma_tc3_clk = {
204 .name = "edma_tc3",
205 .parent = &pll1_sysclk2,
206 .lpsc = DM646X_LPSC_TPTC3,
207 .flags = ALWAYS_ENABLED,
208};
209
165static struct clk uart0_clk = { 210static struct clk uart0_clk = {
166 .name = "uart0", 211 .name = "uart0",
167 .parent = &aux_clkin, 212 .parent = &aux_clkin,
@@ -192,6 +237,18 @@ static struct clk gpio_clk = {
192 .lpsc = DM646X_LPSC_GPIO, 237 .lpsc = DM646X_LPSC_GPIO,
193}; 238};
194 239
240static struct clk mcasp0_clk = {
241 .name = "mcasp0",
242 .parent = &pll1_sysclk3,
243 .lpsc = DM646X_LPSC_McASP0,
244};
245
246static struct clk mcasp1_clk = {
247 .name = "mcasp1",
248 .parent = &pll1_sysclk3,
249 .lpsc = DM646X_LPSC_McASP1,
250};
251
195static struct clk aemif_clk = { 252static struct clk aemif_clk = {
196 .name = "aemif", 253 .name = "aemif",
197 .parent = &pll1_sysclk3, 254 .parent = &pll1_sysclk3,
@@ -237,6 +294,13 @@ static struct clk timer2_clk = {
237 .flags = ALWAYS_ENABLED, /* no LPSC, always enabled; c.f. spruep9a */ 294 .flags = ALWAYS_ENABLED, /* no LPSC, always enabled; c.f. spruep9a */
238}; 295};
239 296
297
298static struct clk ide_clk = {
299 .name = "ide",
300 .parent = &pll1_sysclk4,
301 .lpsc = DAVINCI_LPSC_ATA,
302};
303
240static struct clk vpif0_clk = { 304static struct clk vpif0_clk = {
241 .name = "vpif0", 305 .name = "vpif0",
242 .parent = &ref_clk, 306 .parent = &ref_clk,
@@ -269,11 +333,18 @@ struct davinci_clk dm646x_clks[] = {
269 CLK(NULL, "pll2_sysclk1", &pll2_sysclk1), 333 CLK(NULL, "pll2_sysclk1", &pll2_sysclk1),
270 CLK(NULL, "dsp", &dsp_clk), 334 CLK(NULL, "dsp", &dsp_clk),
271 CLK(NULL, "arm", &arm_clk), 335 CLK(NULL, "arm", &arm_clk),
336 CLK(NULL, "edma_cc", &edma_cc_clk),
337 CLK(NULL, "edma_tc0", &edma_tc0_clk),
338 CLK(NULL, "edma_tc1", &edma_tc1_clk),
339 CLK(NULL, "edma_tc2", &edma_tc2_clk),
340 CLK(NULL, "edma_tc3", &edma_tc3_clk),
272 CLK(NULL, "uart0", &uart0_clk), 341 CLK(NULL, "uart0", &uart0_clk),
273 CLK(NULL, "uart1", &uart1_clk), 342 CLK(NULL, "uart1", &uart1_clk),
274 CLK(NULL, "uart2", &uart2_clk), 343 CLK(NULL, "uart2", &uart2_clk),
275 CLK("i2c_davinci.1", NULL, &i2c_clk), 344 CLK("i2c_davinci.1", NULL, &i2c_clk),
276 CLK(NULL, "gpio", &gpio_clk), 345 CLK(NULL, "gpio", &gpio_clk),
346 CLK("davinci-mcasp.0", NULL, &mcasp0_clk),
347 CLK("davinci-mcasp.1", NULL, &mcasp1_clk),
277 CLK(NULL, "aemif", &aemif_clk), 348 CLK(NULL, "aemif", &aemif_clk),
278 CLK("davinci_emac.1", NULL, &emac_clk), 349 CLK("davinci_emac.1", NULL, &emac_clk),
279 CLK(NULL, "pwm0", &pwm0_clk), 350 CLK(NULL, "pwm0", &pwm0_clk),
@@ -281,6 +352,7 @@ struct davinci_clk dm646x_clks[] = {
281 CLK(NULL, "timer0", &timer0_clk), 352 CLK(NULL, "timer0", &timer0_clk),
282 CLK(NULL, "timer1", &timer1_clk), 353 CLK(NULL, "timer1", &timer1_clk),
283 CLK("watchdog", NULL, &timer2_clk), 354 CLK("watchdog", NULL, &timer2_clk),
355 CLK("palm_bk3710", NULL, &ide_clk),
284 CLK(NULL, "vpif0", &vpif0_clk), 356 CLK(NULL, "vpif0", &vpif0_clk),
285 CLK(NULL, "vpif1", &vpif1_clk), 357 CLK(NULL, "vpif1", &vpif1_clk),
286 CLK(NULL, NULL, NULL), 358 CLK(NULL, NULL, NULL),
@@ -344,7 +416,7 @@ static struct platform_device dm646x_emac_device = {
344 */ 416 */
345static const struct mux_config dm646x_pins[] = { 417static const struct mux_config dm646x_pins[] = {
346#ifdef CONFIG_DAVINCI_MUX 418#ifdef CONFIG_DAVINCI_MUX
347MUX_CFG(DM646X, ATAEN, 0, 0, 1, 1, true) 419MUX_CFG(DM646X, ATAEN, 0, 0, 5, 1, true)
348 420
349MUX_CFG(DM646X, AUDCK1, 0, 29, 1, 0, false) 421MUX_CFG(DM646X, AUDCK1, 0, 29, 1, 0, false)
350 422
@@ -451,17 +523,43 @@ static const s8 dma_chan_dm646x_no_event[] = {
451 -1 523 -1
452}; 524};
453 525
454static struct edma_soc_info dm646x_edma_info = { 526/* Four Transfer Controllers on DM646x */
455 .n_channel = 64, 527static const s8
456 .n_region = 6, /* 0-1, 4-7 */ 528dm646x_queue_tc_mapping[][2] = {
457 .n_slot = 512, 529 /* {event queue no, TC no} */
458 .n_tc = 4, 530 {0, 0},
459 .noevent = dma_chan_dm646x_no_event, 531 {1, 1},
532 {2, 2},
533 {3, 3},
534 {-1, -1},
535};
536
537static const s8
538dm646x_queue_priority_mapping[][2] = {
539 /* {event queue no, Priority} */
540 {0, 4},
541 {1, 0},
542 {2, 5},
543 {3, 1},
544 {-1, -1},
545};
546
547static struct edma_soc_info dm646x_edma_info[] = {
548 {
549 .n_channel = 64,
550 .n_region = 6, /* 0-1, 4-7 */
551 .n_slot = 512,
552 .n_tc = 4,
553 .n_cc = 1,
554 .noevent = dma_chan_dm646x_no_event,
555 .queue_tc_mapping = dm646x_queue_tc_mapping,
556 .queue_priority_mapping = dm646x_queue_priority_mapping,
557 },
460}; 558};
461 559
462static struct resource edma_resources[] = { 560static struct resource edma_resources[] = {
463 { 561 {
464 .name = "edma_cc", 562 .name = "edma_cc0",
465 .start = 0x01c00000, 563 .start = 0x01c00000,
466 .end = 0x01c00000 + SZ_64K - 1, 564 .end = 0x01c00000 + SZ_64K - 1,
467 .flags = IORESOURCE_MEM, 565 .flags = IORESOURCE_MEM,
@@ -491,10 +589,12 @@ static struct resource edma_resources[] = {
491 .flags = IORESOURCE_MEM, 589 .flags = IORESOURCE_MEM,
492 }, 590 },
493 { 591 {
592 .name = "edma0",
494 .start = IRQ_CCINT0, 593 .start = IRQ_CCINT0,
495 .flags = IORESOURCE_IRQ, 594 .flags = IORESOURCE_IRQ,
496 }, 595 },
497 { 596 {
597 .name = "edma0_err",
498 .start = IRQ_CCERRINT, 598 .start = IRQ_CCERRINT,
499 .flags = IORESOURCE_IRQ, 599 .flags = IORESOURCE_IRQ,
500 }, 600 },
@@ -503,12 +603,167 @@ static struct resource edma_resources[] = {
503 603
504static struct platform_device dm646x_edma_device = { 604static struct platform_device dm646x_edma_device = {
505 .name = "edma", 605 .name = "edma",
506 .id = -1, 606 .id = 0,
507 .dev.platform_data = &dm646x_edma_info, 607 .dev.platform_data = dm646x_edma_info,
508 .num_resources = ARRAY_SIZE(edma_resources), 608 .num_resources = ARRAY_SIZE(edma_resources),
509 .resource = edma_resources, 609 .resource = edma_resources,
510}; 610};
511 611
612static struct resource ide_resources[] = {
613 {
614 .start = DM646X_ATA_REG_BASE,
615 .end = DM646X_ATA_REG_BASE + 0x7ff,
616 .flags = IORESOURCE_MEM,
617 },
618 {
619 .start = IRQ_DM646X_IDE,
620 .end = IRQ_DM646X_IDE,
621 .flags = IORESOURCE_IRQ,
622 },
623};
624
625static u64 ide_dma_mask = DMA_BIT_MASK(32);
626
627static struct platform_device ide_dev = {
628 .name = "palm_bk3710",
629 .id = -1,
630 .resource = ide_resources,
631 .num_resources = ARRAY_SIZE(ide_resources),
632 .dev = {
633 .dma_mask = &ide_dma_mask,
634 .coherent_dma_mask = DMA_BIT_MASK(32),
635 },
636};
637
638static struct resource dm646x_mcasp0_resources[] = {
639 {
640 .name = "mcasp0",
641 .start = DAVINCI_DM646X_MCASP0_REG_BASE,
642 .end = DAVINCI_DM646X_MCASP0_REG_BASE + (SZ_1K << 1) - 1,
643 .flags = IORESOURCE_MEM,
644 },
645 /* first TX, then RX */
646 {
647 .start = DAVINCI_DM646X_DMA_MCASP0_AXEVT0,
648 .end = DAVINCI_DM646X_DMA_MCASP0_AXEVT0,
649 .flags = IORESOURCE_DMA,
650 },
651 {
652 .start = DAVINCI_DM646X_DMA_MCASP0_AREVT0,
653 .end = DAVINCI_DM646X_DMA_MCASP0_AREVT0,
654 .flags = IORESOURCE_DMA,
655 },
656};
657
658static struct resource dm646x_mcasp1_resources[] = {
659 {
660 .name = "mcasp1",
661 .start = DAVINCI_DM646X_MCASP1_REG_BASE,
662 .end = DAVINCI_DM646X_MCASP1_REG_BASE + (SZ_1K << 1) - 1,
663 .flags = IORESOURCE_MEM,
664 },
665 /* DIT mode, only TX event */
666 {
667 .start = DAVINCI_DM646X_DMA_MCASP1_AXEVT1,
668 .end = DAVINCI_DM646X_DMA_MCASP1_AXEVT1,
669 .flags = IORESOURCE_DMA,
670 },
671 /* DIT mode, dummy entry */
672 {
673 .start = -1,
674 .end = -1,
675 .flags = IORESOURCE_DMA,
676 },
677};
678
679static struct platform_device dm646x_mcasp0_device = {
680 .name = "davinci-mcasp",
681 .id = 0,
682 .num_resources = ARRAY_SIZE(dm646x_mcasp0_resources),
683 .resource = dm646x_mcasp0_resources,
684};
685
686static struct platform_device dm646x_mcasp1_device = {
687 .name = "davinci-mcasp",
688 .id = 1,
689 .num_resources = ARRAY_SIZE(dm646x_mcasp1_resources),
690 .resource = dm646x_mcasp1_resources,
691};
692
693static struct platform_device dm646x_dit_device = {
694 .name = "spdif-dit",
695 .id = -1,
696};
697
698static u64 vpif_dma_mask = DMA_BIT_MASK(32);
699
700static struct resource vpif_resource[] = {
701 {
702 .start = DAVINCI_VPIF_BASE,
703 .end = DAVINCI_VPIF_BASE + 0x03ff,
704 .flags = IORESOURCE_MEM,
705 }
706};
707
708static struct platform_device vpif_dev = {
709 .name = "vpif",
710 .id = -1,
711 .dev = {
712 .dma_mask = &vpif_dma_mask,
713 .coherent_dma_mask = DMA_BIT_MASK(32),
714 },
715 .resource = vpif_resource,
716 .num_resources = ARRAY_SIZE(vpif_resource),
717};
718
719static struct resource vpif_display_resource[] = {
720 {
721 .start = IRQ_DM646X_VP_VERTINT2,
722 .end = IRQ_DM646X_VP_VERTINT2,
723 .flags = IORESOURCE_IRQ,
724 },
725 {
726 .start = IRQ_DM646X_VP_VERTINT3,
727 .end = IRQ_DM646X_VP_VERTINT3,
728 .flags = IORESOURCE_IRQ,
729 },
730};
731
732static struct platform_device vpif_display_dev = {
733 .name = "vpif_display",
734 .id = -1,
735 .dev = {
736 .dma_mask = &vpif_dma_mask,
737 .coherent_dma_mask = DMA_BIT_MASK(32),
738 },
739 .resource = vpif_display_resource,
740 .num_resources = ARRAY_SIZE(vpif_display_resource),
741};
742
743static struct resource vpif_capture_resource[] = {
744 {
745 .start = IRQ_DM646X_VP_VERTINT0,
746 .end = IRQ_DM646X_VP_VERTINT0,
747 .flags = IORESOURCE_IRQ,
748 },
749 {
750 .start = IRQ_DM646X_VP_VERTINT1,
751 .end = IRQ_DM646X_VP_VERTINT1,
752 .flags = IORESOURCE_IRQ,
753 },
754};
755
756static struct platform_device vpif_capture_dev = {
757 .name = "vpif_capture",
758 .id = -1,
759 .dev = {
760 .dma_mask = &vpif_dma_mask,
761 .coherent_dma_mask = DMA_BIT_MASK(32),
762 },
763 .resource = vpif_capture_resource,
764 .num_resources = ARRAY_SIZE(vpif_capture_resource),
765};
766
512/*----------------------------------------------------------------------*/ 767/*----------------------------------------------------------------------*/
513 768
514static struct map_desc dm646x_io_desc[] = { 769static struct map_desc dm646x_io_desc[] = {
@@ -609,7 +864,6 @@ static struct davinci_soc_info davinci_soc_info_dm646x = {
609 .intc_irq_prios = dm646x_default_priorities, 864 .intc_irq_prios = dm646x_default_priorities,
610 .intc_irq_num = DAVINCI_N_AINTC_IRQ, 865 .intc_irq_num = DAVINCI_N_AINTC_IRQ,
611 .timer_info = &dm646x_timer_info, 866 .timer_info = &dm646x_timer_info,
612 .wdt_base = IO_ADDRESS(DAVINCI_WDOG_BASE),
613 .gpio_base = IO_ADDRESS(DAVINCI_GPIO_BASE), 867 .gpio_base = IO_ADDRESS(DAVINCI_GPIO_BASE),
614 .gpio_num = 43, /* Only 33 usable */ 868 .gpio_num = 43, /* Only 33 usable */
615 .gpio_irq = IRQ_DM646X_GPIOBNK0, 869 .gpio_irq = IRQ_DM646X_GPIOBNK0,
@@ -619,6 +873,51 @@ static struct davinci_soc_info davinci_soc_info_dm646x = {
619 .sram_len = SZ_32K, 873 .sram_len = SZ_32K,
620}; 874};
621 875
876void __init dm646x_init_ide()
877{
878 davinci_cfg_reg(DM646X_ATAEN);
879 platform_device_register(&ide_dev);
880}
881
882void __init dm646x_init_mcasp0(struct snd_platform_data *pdata)
883{
884 dm646x_mcasp0_device.dev.platform_data = pdata;
885 platform_device_register(&dm646x_mcasp0_device);
886}
887
888void __init dm646x_init_mcasp1(struct snd_platform_data *pdata)
889{
890 dm646x_mcasp1_device.dev.platform_data = pdata;
891 platform_device_register(&dm646x_mcasp1_device);
892 platform_device_register(&dm646x_dit_device);
893}
894
895void dm646x_setup_vpif(struct vpif_display_config *display_config,
896 struct vpif_capture_config *capture_config)
897{
898 unsigned int value;
899 void __iomem *base = IO_ADDRESS(DAVINCI_SYSTEM_MODULE_BASE);
900
901 value = __raw_readl(base + VSCLKDIS_OFFSET);
902 value &= ~VSCLKDIS_MASK;
903 __raw_writel(value, base + VSCLKDIS_OFFSET);
904
905 value = __raw_readl(base + VDD3P3V_PWDN_OFFSET);
906 value &= ~VDD3P3V_VID_MASK;
907 __raw_writel(value, base + VDD3P3V_PWDN_OFFSET);
908
909 davinci_cfg_reg(DM646X_STSOMUX_DISABLE);
910 davinci_cfg_reg(DM646X_STSIMUX_DISABLE);
911 davinci_cfg_reg(DM646X_PTSOMUX_DISABLE);
912 davinci_cfg_reg(DM646X_PTSIMUX_DISABLE);
913
914 vpif_display_dev.dev.platform_data = display_config;
915 vpif_capture_dev.dev.platform_data = capture_config;
916 platform_device_register(&vpif_dev);
917 platform_device_register(&vpif_display_dev);
918 platform_device_register(&vpif_capture_dev);
919}
920
622void __init dm646x_init(void) 921void __init dm646x_init(void)
623{ 922{
624 davinci_common_init(&davinci_soc_info_dm646x); 923 davinci_common_init(&davinci_soc_info_dm646x);
diff --git a/arch/arm/mach-davinci/dma.c b/arch/arm/mach-davinci/dma.c
index 15e9eb158bb7..f2e57d272958 100644
--- a/arch/arm/mach-davinci/dma.c
+++ b/arch/arm/mach-davinci/dma.c
@@ -100,132 +100,158 @@
100#define EDMA_SHADOW0 0x2000 /* 4 regions shadowing global channels */ 100#define EDMA_SHADOW0 0x2000 /* 4 regions shadowing global channels */
101#define EDMA_PARM 0x4000 /* 128 param entries */ 101#define EDMA_PARM 0x4000 /* 128 param entries */
102 102
103#define DAVINCI_DMA_3PCC_BASE 0x01C00000
104
105#define PARM_OFFSET(param_no) (EDMA_PARM + ((param_no) << 5)) 103#define PARM_OFFSET(param_no) (EDMA_PARM + ((param_no) << 5))
106 104
105#define EDMA_DCHMAP 0x0100 /* 64 registers */
106#define CHMAP_EXIST BIT(24)
107
107#define EDMA_MAX_DMACH 64 108#define EDMA_MAX_DMACH 64
108#define EDMA_MAX_PARAMENTRY 512 109#define EDMA_MAX_PARAMENTRY 512
109#define EDMA_MAX_EVQUE 2 /* FIXME too small */ 110#define EDMA_MAX_CC 2
110 111
111 112
112/*****************************************************************************/ 113/*****************************************************************************/
113 114
114static void __iomem *edmacc_regs_base; 115static void __iomem *edmacc_regs_base[EDMA_MAX_CC];
115 116
116static inline unsigned int edma_read(int offset) 117static inline unsigned int edma_read(unsigned ctlr, int offset)
117{ 118{
118 return (unsigned int)__raw_readl(edmacc_regs_base + offset); 119 return (unsigned int)__raw_readl(edmacc_regs_base[ctlr] + offset);
119} 120}
120 121
121static inline void edma_write(int offset, int val) 122static inline void edma_write(unsigned ctlr, int offset, int val)
122{ 123{
123 __raw_writel(val, edmacc_regs_base + offset); 124 __raw_writel(val, edmacc_regs_base[ctlr] + offset);
124} 125}
125static inline void edma_modify(int offset, unsigned and, unsigned or) 126static inline void edma_modify(unsigned ctlr, int offset, unsigned and,
127 unsigned or)
126{ 128{
127 unsigned val = edma_read(offset); 129 unsigned val = edma_read(ctlr, offset);
128 val &= and; 130 val &= and;
129 val |= or; 131 val |= or;
130 edma_write(offset, val); 132 edma_write(ctlr, offset, val);
131} 133}
132static inline void edma_and(int offset, unsigned and) 134static inline void edma_and(unsigned ctlr, int offset, unsigned and)
133{ 135{
134 unsigned val = edma_read(offset); 136 unsigned val = edma_read(ctlr, offset);
135 val &= and; 137 val &= and;
136 edma_write(offset, val); 138 edma_write(ctlr, offset, val);
137} 139}
138static inline void edma_or(int offset, unsigned or) 140static inline void edma_or(unsigned ctlr, int offset, unsigned or)
139{ 141{
140 unsigned val = edma_read(offset); 142 unsigned val = edma_read(ctlr, offset);
141 val |= or; 143 val |= or;
142 edma_write(offset, val); 144 edma_write(ctlr, offset, val);
143} 145}
144static inline unsigned int edma_read_array(int offset, int i) 146static inline unsigned int edma_read_array(unsigned ctlr, int offset, int i)
145{ 147{
146 return edma_read(offset + (i << 2)); 148 return edma_read(ctlr, offset + (i << 2));
147} 149}
148static inline void edma_write_array(int offset, int i, unsigned val) 150static inline void edma_write_array(unsigned ctlr, int offset, int i,
151 unsigned val)
149{ 152{
150 edma_write(offset + (i << 2), val); 153 edma_write(ctlr, offset + (i << 2), val);
151} 154}
152static inline void edma_modify_array(int offset, int i, 155static inline void edma_modify_array(unsigned ctlr, int offset, int i,
153 unsigned and, unsigned or) 156 unsigned and, unsigned or)
154{ 157{
155 edma_modify(offset + (i << 2), and, or); 158 edma_modify(ctlr, offset + (i << 2), and, or);
156} 159}
157static inline void edma_or_array(int offset, int i, unsigned or) 160static inline void edma_or_array(unsigned ctlr, int offset, int i, unsigned or)
158{ 161{
159 edma_or(offset + (i << 2), or); 162 edma_or(ctlr, offset + (i << 2), or);
160} 163}
161static inline void edma_or_array2(int offset, int i, int j, unsigned or) 164static inline void edma_or_array2(unsigned ctlr, int offset, int i, int j,
165 unsigned or)
162{ 166{
163 edma_or(offset + ((i*2 + j) << 2), or); 167 edma_or(ctlr, offset + ((i*2 + j) << 2), or);
164} 168}
165static inline void edma_write_array2(int offset, int i, int j, unsigned val) 169static inline void edma_write_array2(unsigned ctlr, int offset, int i, int j,
170 unsigned val)
166{ 171{
167 edma_write(offset + ((i*2 + j) << 2), val); 172 edma_write(ctlr, offset + ((i*2 + j) << 2), val);
168} 173}
169static inline unsigned int edma_shadow0_read(int offset) 174static inline unsigned int edma_shadow0_read(unsigned ctlr, int offset)
170{ 175{
171 return edma_read(EDMA_SHADOW0 + offset); 176 return edma_read(ctlr, EDMA_SHADOW0 + offset);
172} 177}
173static inline unsigned int edma_shadow0_read_array(int offset, int i) 178static inline unsigned int edma_shadow0_read_array(unsigned ctlr, int offset,
179 int i)
174{ 180{
175 return edma_read(EDMA_SHADOW0 + offset + (i << 2)); 181 return edma_read(ctlr, EDMA_SHADOW0 + offset + (i << 2));
176} 182}
177static inline void edma_shadow0_write(int offset, unsigned val) 183static inline void edma_shadow0_write(unsigned ctlr, int offset, unsigned val)
178{ 184{
179 edma_write(EDMA_SHADOW0 + offset, val); 185 edma_write(ctlr, EDMA_SHADOW0 + offset, val);
180} 186}
181static inline void edma_shadow0_write_array(int offset, int i, unsigned val) 187static inline void edma_shadow0_write_array(unsigned ctlr, int offset, int i,
188 unsigned val)
182{ 189{
183 edma_write(EDMA_SHADOW0 + offset + (i << 2), val); 190 edma_write(ctlr, EDMA_SHADOW0 + offset + (i << 2), val);
184} 191}
185static inline unsigned int edma_parm_read(int offset, int param_no) 192static inline unsigned int edma_parm_read(unsigned ctlr, int offset,
193 int param_no)
186{ 194{
187 return edma_read(EDMA_PARM + offset + (param_no << 5)); 195 return edma_read(ctlr, EDMA_PARM + offset + (param_no << 5));
188} 196}
189static inline void edma_parm_write(int offset, int param_no, unsigned val) 197static inline void edma_parm_write(unsigned ctlr, int offset, int param_no,
198 unsigned val)
190{ 199{
191 edma_write(EDMA_PARM + offset + (param_no << 5), val); 200 edma_write(ctlr, EDMA_PARM + offset + (param_no << 5), val);
192} 201}
193static inline void edma_parm_modify(int offset, int param_no, 202static inline void edma_parm_modify(unsigned ctlr, int offset, int param_no,
194 unsigned and, unsigned or) 203 unsigned and, unsigned or)
195{ 204{
196 edma_modify(EDMA_PARM + offset + (param_no << 5), and, or); 205 edma_modify(ctlr, EDMA_PARM + offset + (param_no << 5), and, or);
197} 206}
198static inline void edma_parm_and(int offset, int param_no, unsigned and) 207static inline void edma_parm_and(unsigned ctlr, int offset, int param_no,
208 unsigned and)
199{ 209{
200 edma_and(EDMA_PARM + offset + (param_no << 5), and); 210 edma_and(ctlr, EDMA_PARM + offset + (param_no << 5), and);
201} 211}
202static inline void edma_parm_or(int offset, int param_no, unsigned or) 212static inline void edma_parm_or(unsigned ctlr, int offset, int param_no,
213 unsigned or)
203{ 214{
204 edma_or(EDMA_PARM + offset + (param_no << 5), or); 215 edma_or(ctlr, EDMA_PARM + offset + (param_no << 5), or);
205} 216}
206 217
207/*****************************************************************************/ 218/*****************************************************************************/
208 219
209/* actual number of DMA channels and slots on this silicon */ 220/* actual number of DMA channels and slots on this silicon */
210static unsigned num_channels; 221struct edma {
211static unsigned num_slots; 222 /* how many dma resources of each type */
223 unsigned num_channels;
224 unsigned num_region;
225 unsigned num_slots;
226 unsigned num_tc;
227 unsigned num_cc;
228 enum dma_event_q default_queue;
229
230 /* list of channels with no even trigger; terminated by "-1" */
231 const s8 *noevent;
232
233 /* The edma_inuse bit for each PaRAM slot is clear unless the
234 * channel is in use ... by ARM or DSP, for QDMA, or whatever.
235 */
236 DECLARE_BITMAP(edma_inuse, EDMA_MAX_PARAMENTRY);
212 237
213static struct dma_interrupt_data { 238 /* The edma_noevent bit for each channel is clear unless
214 void (*callback)(unsigned channel, unsigned short ch_status, 239 * it doesn't trigger DMA events on this platform. It uses a
215 void *data); 240 * bit of SOC-specific initialization code.
216 void *data; 241 */
217} intr_data[EDMA_MAX_DMACH]; 242 DECLARE_BITMAP(edma_noevent, EDMA_MAX_DMACH);
218 243
219/* The edma_inuse bit for each PaRAM slot is clear unless the 244 unsigned irq_res_start;
220 * channel is in use ... by ARM or DSP, for QDMA, or whatever. 245 unsigned irq_res_end;
221 */
222static DECLARE_BITMAP(edma_inuse, EDMA_MAX_PARAMENTRY);
223 246
224/* The edma_noevent bit for each channel is clear unless 247 struct dma_interrupt_data {
225 * it doesn't trigger DMA events on this platform. It uses a 248 void (*callback)(unsigned channel, unsigned short ch_status,
226 * bit of SOC-specific initialization code. 249 void *data);
227 */ 250 void *data;
228static DECLARE_BITMAP(edma_noevent, EDMA_MAX_DMACH); 251 } intr_data[EDMA_MAX_DMACH];
252};
253
254static struct edma *edma_info[EDMA_MAX_CC];
229 255
230/* dummy param set used to (re)initialize parameter RAM slots */ 256/* dummy param set used to (re)initialize parameter RAM slots */
231static const struct edmacc_param dummy_paramset = { 257static const struct edmacc_param dummy_paramset = {
@@ -233,47 +259,52 @@ static const struct edmacc_param dummy_paramset = {
233 .ccnt = 1, 259 .ccnt = 1,
234}; 260};
235 261
236static const int __initconst
237queue_tc_mapping[EDMA_MAX_EVQUE + 1][2] = {
238/* {event queue no, TC no} */
239 {0, 0},
240 {1, 1},
241 {-1, -1}
242};
243
244static const int __initconst
245queue_priority_mapping[EDMA_MAX_EVQUE + 1][2] = {
246 /* {event queue no, Priority} */
247 {0, 3},
248 {1, 7},
249 {-1, -1}
250};
251
252/*****************************************************************************/ 262/*****************************************************************************/
253 263
254static void map_dmach_queue(unsigned ch_no, enum dma_event_q queue_no) 264static void map_dmach_queue(unsigned ctlr, unsigned ch_no,
265 enum dma_event_q queue_no)
255{ 266{
256 int bit = (ch_no & 0x7) * 4; 267 int bit = (ch_no & 0x7) * 4;
257 268
258 /* default to low priority queue */ 269 /* default to low priority queue */
259 if (queue_no == EVENTQ_DEFAULT) 270 if (queue_no == EVENTQ_DEFAULT)
260 queue_no = EVENTQ_1; 271 queue_no = edma_info[ctlr]->default_queue;
261 272
262 queue_no &= 7; 273 queue_no &= 7;
263 edma_modify_array(EDMA_DMAQNUM, (ch_no >> 3), 274 edma_modify_array(ctlr, EDMA_DMAQNUM, (ch_no >> 3),
264 ~(0x7 << bit), queue_no << bit); 275 ~(0x7 << bit), queue_no << bit);
265} 276}
266 277
267static void __init map_queue_tc(int queue_no, int tc_no) 278static void __init map_queue_tc(unsigned ctlr, int queue_no, int tc_no)
268{ 279{
269 int bit = queue_no * 4; 280 int bit = queue_no * 4;
270 edma_modify(EDMA_QUETCMAP, ~(0x7 << bit), ((tc_no & 0x7) << bit)); 281 edma_modify(ctlr, EDMA_QUETCMAP, ~(0x7 << bit), ((tc_no & 0x7) << bit));
271} 282}
272 283
273static void __init assign_priority_to_queue(int queue_no, int priority) 284static void __init assign_priority_to_queue(unsigned ctlr, int queue_no,
285 int priority)
274{ 286{
275 int bit = queue_no * 4; 287 int bit = queue_no * 4;
276 edma_modify(EDMA_QUEPRI, ~(0x7 << bit), ((priority & 0x7) << bit)); 288 edma_modify(ctlr, EDMA_QUEPRI, ~(0x7 << bit),
289 ((priority & 0x7) << bit));
290}
291
292/**
293 * map_dmach_param - Maps channel number to param entry number
294 *
295 * This maps the dma channel number to param entry numberter. In
296 * other words using the DMA channel mapping registers a param entry
297 * can be mapped to any channel
298 *
299 * Callers are responsible for ensuring the channel mapping logic is
300 * included in that particular EDMA variant (Eg : dm646x)
301 *
302 */
303static void __init map_dmach_param(unsigned ctlr)
304{
305 int i;
306 for (i = 0; i < EDMA_MAX_DMACH; i++)
307 edma_write_array(ctlr, EDMA_DCHMAP , i , (i << 5));
277} 308}
278 309
279static inline void 310static inline void
@@ -281,22 +312,39 @@ setup_dma_interrupt(unsigned lch,
281 void (*callback)(unsigned channel, u16 ch_status, void *data), 312 void (*callback)(unsigned channel, u16 ch_status, void *data),
282 void *data) 313 void *data)
283{ 314{
315 unsigned ctlr;
316
317 ctlr = EDMA_CTLR(lch);
318 lch = EDMA_CHAN_SLOT(lch);
319
284 if (!callback) { 320 if (!callback) {
285 edma_shadow0_write_array(SH_IECR, lch >> 5, 321 edma_shadow0_write_array(ctlr, SH_IECR, lch >> 5,
286 (1 << (lch & 0x1f))); 322 (1 << (lch & 0x1f)));
287 } 323 }
288 324
289 intr_data[lch].callback = callback; 325 edma_info[ctlr]->intr_data[lch].callback = callback;
290 intr_data[lch].data = data; 326 edma_info[ctlr]->intr_data[lch].data = data;
291 327
292 if (callback) { 328 if (callback) {
293 edma_shadow0_write_array(SH_ICR, lch >> 5, 329 edma_shadow0_write_array(ctlr, SH_ICR, lch >> 5,
294 (1 << (lch & 0x1f))); 330 (1 << (lch & 0x1f)));
295 edma_shadow0_write_array(SH_IESR, lch >> 5, 331 edma_shadow0_write_array(ctlr, SH_IESR, lch >> 5,
296 (1 << (lch & 0x1f))); 332 (1 << (lch & 0x1f)));
297 } 333 }
298} 334}
299 335
336static int irq2ctlr(int irq)
337{
338 if (irq >= edma_info[0]->irq_res_start &&
339 irq <= edma_info[0]->irq_res_end)
340 return 0;
341 else if (irq >= edma_info[1]->irq_res_start &&
342 irq <= edma_info[1]->irq_res_end)
343 return 1;
344
345 return -1;
346}
347
300/****************************************************************************** 348/******************************************************************************
301 * 349 *
302 * DMA interrupt handler 350 * DMA interrupt handler
@@ -305,32 +353,39 @@ setup_dma_interrupt(unsigned lch,
305static irqreturn_t dma_irq_handler(int irq, void *data) 353static irqreturn_t dma_irq_handler(int irq, void *data)
306{ 354{
307 int i; 355 int i;
356 unsigned ctlr;
308 unsigned int cnt = 0; 357 unsigned int cnt = 0;
309 358
359 ctlr = irq2ctlr(irq);
360
310 dev_dbg(data, "dma_irq_handler\n"); 361 dev_dbg(data, "dma_irq_handler\n");
311 362
312 if ((edma_shadow0_read_array(SH_IPR, 0) == 0) 363 if ((edma_shadow0_read_array(ctlr, SH_IPR, 0) == 0)
313 && (edma_shadow0_read_array(SH_IPR, 1) == 0)) 364 && (edma_shadow0_read_array(ctlr, SH_IPR, 1) == 0))
314 return IRQ_NONE; 365 return IRQ_NONE;
315 366
316 while (1) { 367 while (1) {
317 int j; 368 int j;
318 if (edma_shadow0_read_array(SH_IPR, 0)) 369 if (edma_shadow0_read_array(ctlr, SH_IPR, 0))
319 j = 0; 370 j = 0;
320 else if (edma_shadow0_read_array(SH_IPR, 1)) 371 else if (edma_shadow0_read_array(ctlr, SH_IPR, 1))
321 j = 1; 372 j = 1;
322 else 373 else
323 break; 374 break;
324 dev_dbg(data, "IPR%d %08x\n", j, 375 dev_dbg(data, "IPR%d %08x\n", j,
325 edma_shadow0_read_array(SH_IPR, j)); 376 edma_shadow0_read_array(ctlr, SH_IPR, j));
326 for (i = 0; i < 32; i++) { 377 for (i = 0; i < 32; i++) {
327 int k = (j << 5) + i; 378 int k = (j << 5) + i;
328 if (edma_shadow0_read_array(SH_IPR, j) & (1 << i)) { 379 if (edma_shadow0_read_array(ctlr, SH_IPR, j) &
380 (1 << i)) {
329 /* Clear the corresponding IPR bits */ 381 /* Clear the corresponding IPR bits */
330 edma_shadow0_write_array(SH_ICR, j, (1 << i)); 382 edma_shadow0_write_array(ctlr, SH_ICR, j,
331 if (intr_data[k].callback) { 383 (1 << i));
332 intr_data[k].callback(k, DMA_COMPLETE, 384 if (edma_info[ctlr]->intr_data[k].callback) {
333 intr_data[k].data); 385 edma_info[ctlr]->intr_data[k].callback(
386 k, DMA_COMPLETE,
387 edma_info[ctlr]->intr_data[k].
388 data);
334 } 389 }
335 } 390 }
336 } 391 }
@@ -338,7 +393,7 @@ static irqreturn_t dma_irq_handler(int irq, void *data)
338 if (cnt > 10) 393 if (cnt > 10)
339 break; 394 break;
340 } 395 }
341 edma_shadow0_write(SH_IEVAL, 1); 396 edma_shadow0_write(ctlr, SH_IEVAL, 1);
342 return IRQ_HANDLED; 397 return IRQ_HANDLED;
343} 398}
344 399
@@ -350,78 +405,87 @@ static irqreturn_t dma_irq_handler(int irq, void *data)
350static irqreturn_t dma_ccerr_handler(int irq, void *data) 405static irqreturn_t dma_ccerr_handler(int irq, void *data)
351{ 406{
352 int i; 407 int i;
408 unsigned ctlr;
353 unsigned int cnt = 0; 409 unsigned int cnt = 0;
354 410
411 ctlr = irq2ctlr(irq);
412
355 dev_dbg(data, "dma_ccerr_handler\n"); 413 dev_dbg(data, "dma_ccerr_handler\n");
356 414
357 if ((edma_read_array(EDMA_EMR, 0) == 0) && 415 if ((edma_read_array(ctlr, EDMA_EMR, 0) == 0) &&
358 (edma_read_array(EDMA_EMR, 1) == 0) && 416 (edma_read_array(ctlr, EDMA_EMR, 1) == 0) &&
359 (edma_read(EDMA_QEMR) == 0) && (edma_read(EDMA_CCERR) == 0)) 417 (edma_read(ctlr, EDMA_QEMR) == 0) &&
418 (edma_read(ctlr, EDMA_CCERR) == 0))
360 return IRQ_NONE; 419 return IRQ_NONE;
361 420
362 while (1) { 421 while (1) {
363 int j = -1; 422 int j = -1;
364 if (edma_read_array(EDMA_EMR, 0)) 423 if (edma_read_array(ctlr, EDMA_EMR, 0))
365 j = 0; 424 j = 0;
366 else if (edma_read_array(EDMA_EMR, 1)) 425 else if (edma_read_array(ctlr, EDMA_EMR, 1))
367 j = 1; 426 j = 1;
368 if (j >= 0) { 427 if (j >= 0) {
369 dev_dbg(data, "EMR%d %08x\n", j, 428 dev_dbg(data, "EMR%d %08x\n", j,
370 edma_read_array(EDMA_EMR, j)); 429 edma_read_array(ctlr, EDMA_EMR, j));
371 for (i = 0; i < 32; i++) { 430 for (i = 0; i < 32; i++) {
372 int k = (j << 5) + i; 431 int k = (j << 5) + i;
373 if (edma_read_array(EDMA_EMR, j) & (1 << i)) { 432 if (edma_read_array(ctlr, EDMA_EMR, j) &
433 (1 << i)) {
374 /* Clear the corresponding EMR bits */ 434 /* Clear the corresponding EMR bits */
375 edma_write_array(EDMA_EMCR, j, 1 << i); 435 edma_write_array(ctlr, EDMA_EMCR, j,
436 1 << i);
376 /* Clear any SER */ 437 /* Clear any SER */
377 edma_shadow0_write_array(SH_SECR, j, 438 edma_shadow0_write_array(ctlr, SH_SECR,
378 (1 << i)); 439 j, (1 << i));
379 if (intr_data[k].callback) { 440 if (edma_info[ctlr]->intr_data[k].
380 intr_data[k].callback(k, 441 callback) {
381 DMA_CC_ERROR, 442 edma_info[ctlr]->intr_data[k].
382 intr_data 443 callback(k,
383 [k].data); 444 DMA_CC_ERROR,
445 edma_info[ctlr]->intr_data
446 [k].data);
384 } 447 }
385 } 448 }
386 } 449 }
387 } else if (edma_read(EDMA_QEMR)) { 450 } else if (edma_read(ctlr, EDMA_QEMR)) {
388 dev_dbg(data, "QEMR %02x\n", 451 dev_dbg(data, "QEMR %02x\n",
389 edma_read(EDMA_QEMR)); 452 edma_read(ctlr, EDMA_QEMR));
390 for (i = 0; i < 8; i++) { 453 for (i = 0; i < 8; i++) {
391 if (edma_read(EDMA_QEMR) & (1 << i)) { 454 if (edma_read(ctlr, EDMA_QEMR) & (1 << i)) {
392 /* Clear the corresponding IPR bits */ 455 /* Clear the corresponding IPR bits */
393 edma_write(EDMA_QEMCR, 1 << i); 456 edma_write(ctlr, EDMA_QEMCR, 1 << i);
394 edma_shadow0_write(SH_QSECR, (1 << i)); 457 edma_shadow0_write(ctlr, SH_QSECR,
458 (1 << i));
395 459
396 /* NOTE: not reported!! */ 460 /* NOTE: not reported!! */
397 } 461 }
398 } 462 }
399 } else if (edma_read(EDMA_CCERR)) { 463 } else if (edma_read(ctlr, EDMA_CCERR)) {
400 dev_dbg(data, "CCERR %08x\n", 464 dev_dbg(data, "CCERR %08x\n",
401 edma_read(EDMA_CCERR)); 465 edma_read(ctlr, EDMA_CCERR));
402 /* FIXME: CCERR.BIT(16) ignored! much better 466 /* FIXME: CCERR.BIT(16) ignored! much better
403 * to just write CCERRCLR with CCERR value... 467 * to just write CCERRCLR with CCERR value...
404 */ 468 */
405 for (i = 0; i < 8; i++) { 469 for (i = 0; i < 8; i++) {
406 if (edma_read(EDMA_CCERR) & (1 << i)) { 470 if (edma_read(ctlr, EDMA_CCERR) & (1 << i)) {
407 /* Clear the corresponding IPR bits */ 471 /* Clear the corresponding IPR bits */
408 edma_write(EDMA_CCERRCLR, 1 << i); 472 edma_write(ctlr, EDMA_CCERRCLR, 1 << i);
409 473
410 /* NOTE: not reported!! */ 474 /* NOTE: not reported!! */
411 } 475 }
412 } 476 }
413 } 477 }
414 if ((edma_read_array(EDMA_EMR, 0) == 0) 478 if ((edma_read_array(ctlr, EDMA_EMR, 0) == 0)
415 && (edma_read_array(EDMA_EMR, 1) == 0) 479 && (edma_read_array(ctlr, EDMA_EMR, 1) == 0)
416 && (edma_read(EDMA_QEMR) == 0) 480 && (edma_read(ctlr, EDMA_QEMR) == 0)
417 && (edma_read(EDMA_CCERR) == 0)) { 481 && (edma_read(ctlr, EDMA_CCERR) == 0)) {
418 break; 482 break;
419 } 483 }
420 cnt++; 484 cnt++;
421 if (cnt > 10) 485 if (cnt > 10)
422 break; 486 break;
423 } 487 }
424 edma_write(EDMA_EEVAL, 1); 488 edma_write(ctlr, EDMA_EEVAL, 1);
425 return IRQ_HANDLED; 489 return IRQ_HANDLED;
426} 490}
427 491
@@ -445,6 +509,45 @@ static irqreturn_t dma_tc1err_handler(int irq, void *data)
445 return IRQ_HANDLED; 509 return IRQ_HANDLED;
446} 510}
447 511
512static int reserve_contiguous_params(int ctlr, unsigned int id,
513 unsigned int num_params,
514 unsigned int start_param)
515{
516 int i, j;
517 unsigned int count = num_params;
518
519 for (i = start_param; i < edma_info[ctlr]->num_slots; ++i) {
520 j = EDMA_CHAN_SLOT(i);
521 if (!test_and_set_bit(j, edma_info[ctlr]->edma_inuse))
522 count--;
523 if (count == 0)
524 break;
525 else if (id == EDMA_CONT_PARAMS_FIXED_EXACT)
526 break;
527 else
528 count = num_params;
529 }
530
531 /*
532 * We have to clear any bits that we set
533 * if we run out parameter RAMs, i.e we do find a set
534 * of contiguous parameter RAMs but do not find the exact number
535 * requested as we may reach the total number of parameter RAMs
536 */
537 if (count) {
538 for (j = i - num_params + count + 1; j <= i ; ++j)
539 clear_bit(j, edma_info[ctlr]->edma_inuse);
540
541 return -EBUSY;
542 }
543
544 for (j = i - num_params + 1; j <= i; ++j)
545 memcpy_toio(edmacc_regs_base[ctlr] + PARM_OFFSET(j),
546 &dummy_paramset, PARM_SIZE);
547
548 return EDMA_CTLR_CHAN(ctlr, i - num_params + 1);
549}
550
448/*-----------------------------------------------------------------------*/ 551/*-----------------------------------------------------------------------*/
449 552
450/* Resource alloc/free: dma channels, parameter RAM slots */ 553/* Resource alloc/free: dma channels, parameter RAM slots */
@@ -484,35 +587,53 @@ int edma_alloc_channel(int channel,
484 void *data, 587 void *data,
485 enum dma_event_q eventq_no) 588 enum dma_event_q eventq_no)
486{ 589{
590 unsigned i, done, ctlr = 0;
591
592 if (channel >= 0) {
593 ctlr = EDMA_CTLR(channel);
594 channel = EDMA_CHAN_SLOT(channel);
595 }
596
487 if (channel < 0) { 597 if (channel < 0) {
488 channel = 0; 598 for (i = 0; i < EDMA_MAX_CC; i++) {
489 for (;;) { 599 channel = 0;
490 channel = find_next_bit(edma_noevent, 600 for (;;) {
491 num_channels, channel); 601 channel = find_next_bit(edma_info[i]->
492 if (channel == num_channels) 602 edma_noevent,
493 return -ENOMEM; 603 edma_info[i]->num_channels,
494 if (!test_and_set_bit(channel, edma_inuse)) 604 channel);
605 if (channel == edma_info[i]->num_channels)
606 return -ENOMEM;
607 if (!test_and_set_bit(channel,
608 edma_info[i]->edma_inuse)) {
609 done = 1;
610 ctlr = i;
611 break;
612 }
613 channel++;
614 }
615 if (done)
495 break; 616 break;
496 channel++;
497 } 617 }
498 } else if (channel >= num_channels) { 618 } else if (channel >= edma_info[ctlr]->num_channels) {
499 return -EINVAL; 619 return -EINVAL;
500 } else if (test_and_set_bit(channel, edma_inuse)) { 620 } else if (test_and_set_bit(channel, edma_info[ctlr]->edma_inuse)) {
501 return -EBUSY; 621 return -EBUSY;
502 } 622 }
503 623
504 /* ensure access through shadow region 0 */ 624 /* ensure access through shadow region 0 */
505 edma_or_array2(EDMA_DRAE, 0, channel >> 5, 1 << (channel & 0x1f)); 625 edma_or_array2(ctlr, EDMA_DRAE, 0, channel >> 5, 1 << (channel & 0x1f));
506 626
507 /* ensure no events are pending */ 627 /* ensure no events are pending */
508 edma_stop(channel); 628 edma_stop(EDMA_CTLR_CHAN(ctlr, channel));
509 memcpy_toio(edmacc_regs_base + PARM_OFFSET(channel), 629 memcpy_toio(edmacc_regs_base[ctlr] + PARM_OFFSET(channel),
510 &dummy_paramset, PARM_SIZE); 630 &dummy_paramset, PARM_SIZE);
511 631
512 if (callback) 632 if (callback)
513 setup_dma_interrupt(channel, callback, data); 633 setup_dma_interrupt(EDMA_CTLR_CHAN(ctlr, channel),
634 callback, data);
514 635
515 map_dmach_queue(channel, eventq_no); 636 map_dmach_queue(ctlr, channel, eventq_no);
516 637
517 return channel; 638 return channel;
518} 639}
@@ -532,15 +653,20 @@ EXPORT_SYMBOL(edma_alloc_channel);
532 */ 653 */
533void edma_free_channel(unsigned channel) 654void edma_free_channel(unsigned channel)
534{ 655{
535 if (channel >= num_channels) 656 unsigned ctlr;
657
658 ctlr = EDMA_CTLR(channel);
659 channel = EDMA_CHAN_SLOT(channel);
660
661 if (channel >= edma_info[ctlr]->num_channels)
536 return; 662 return;
537 663
538 setup_dma_interrupt(channel, NULL, NULL); 664 setup_dma_interrupt(channel, NULL, NULL);
539 /* REVISIT should probably take out of shadow region 0 */ 665 /* REVISIT should probably take out of shadow region 0 */
540 666
541 memcpy_toio(edmacc_regs_base + PARM_OFFSET(channel), 667 memcpy_toio(edmacc_regs_base[ctlr] + PARM_OFFSET(channel),
542 &dummy_paramset, PARM_SIZE); 668 &dummy_paramset, PARM_SIZE);
543 clear_bit(channel, edma_inuse); 669 clear_bit(channel, edma_info[ctlr]->edma_inuse);
544} 670}
545EXPORT_SYMBOL(edma_free_channel); 671EXPORT_SYMBOL(edma_free_channel);
546 672
@@ -558,28 +684,33 @@ EXPORT_SYMBOL(edma_free_channel);
558 * 684 *
559 * Returns the number of the slot, else negative errno. 685 * Returns the number of the slot, else negative errno.
560 */ 686 */
561int edma_alloc_slot(int slot) 687int edma_alloc_slot(unsigned ctlr, int slot)
562{ 688{
689 if (slot >= 0)
690 slot = EDMA_CHAN_SLOT(slot);
691
563 if (slot < 0) { 692 if (slot < 0) {
564 slot = num_channels; 693 slot = edma_info[ctlr]->num_channels;
565 for (;;) { 694 for (;;) {
566 slot = find_next_zero_bit(edma_inuse, 695 slot = find_next_zero_bit(edma_info[ctlr]->edma_inuse,
567 num_slots, slot); 696 edma_info[ctlr]->num_slots, slot);
568 if (slot == num_slots) 697 if (slot == edma_info[ctlr]->num_slots)
569 return -ENOMEM; 698 return -ENOMEM;
570 if (!test_and_set_bit(slot, edma_inuse)) 699 if (!test_and_set_bit(slot,
700 edma_info[ctlr]->edma_inuse))
571 break; 701 break;
572 } 702 }
573 } else if (slot < num_channels || slot >= num_slots) { 703 } else if (slot < edma_info[ctlr]->num_channels ||
704 slot >= edma_info[ctlr]->num_slots) {
574 return -EINVAL; 705 return -EINVAL;
575 } else if (test_and_set_bit(slot, edma_inuse)) { 706 } else if (test_and_set_bit(slot, edma_info[ctlr]->edma_inuse)) {
576 return -EBUSY; 707 return -EBUSY;
577 } 708 }
578 709
579 memcpy_toio(edmacc_regs_base + PARM_OFFSET(slot), 710 memcpy_toio(edmacc_regs_base[ctlr] + PARM_OFFSET(slot),
580 &dummy_paramset, PARM_SIZE); 711 &dummy_paramset, PARM_SIZE);
581 712
582 return slot; 713 return EDMA_CTLR_CHAN(ctlr, slot);
583} 714}
584EXPORT_SYMBOL(edma_alloc_slot); 715EXPORT_SYMBOL(edma_alloc_slot);
585 716
@@ -593,15 +724,119 @@ EXPORT_SYMBOL(edma_alloc_slot);
593 */ 724 */
594void edma_free_slot(unsigned slot) 725void edma_free_slot(unsigned slot)
595{ 726{
596 if (slot < num_channels || slot >= num_slots) 727 unsigned ctlr;
728
729 ctlr = EDMA_CTLR(slot);
730 slot = EDMA_CHAN_SLOT(slot);
731
732 if (slot < edma_info[ctlr]->num_channels ||
733 slot >= edma_info[ctlr]->num_slots)
597 return; 734 return;
598 735
599 memcpy_toio(edmacc_regs_base + PARM_OFFSET(slot), 736 memcpy_toio(edmacc_regs_base[ctlr] + PARM_OFFSET(slot),
600 &dummy_paramset, PARM_SIZE); 737 &dummy_paramset, PARM_SIZE);
601 clear_bit(slot, edma_inuse); 738 clear_bit(slot, edma_info[ctlr]->edma_inuse);
602} 739}
603EXPORT_SYMBOL(edma_free_slot); 740EXPORT_SYMBOL(edma_free_slot);
604 741
742
743/**
744 * edma_alloc_cont_slots- alloc contiguous parameter RAM slots
745 * The API will return the starting point of a set of
746 * contiguous PARAM's that have been requested
747 *
748 * @id: can only be EDMA_CONT_PARAMS_ANY or EDMA_CONT_PARAMS_FIXED_EXACT
749 * or EDMA_CONT_PARAMS_FIXED_NOT_EXACT
750 * @count: number of contiguous Paramter RAM's
751 * @param - the start value of Parameter RAM that should be passed if id
752 * is EDMA_CONT_PARAMS_FIXED_EXACT or EDMA_CONT_PARAMS_FIXED_NOT_EXACT
753 *
754 * If id is EDMA_CONT_PARAMS_ANY then the API starts looking for a set of
755 * contiguous Parameter RAMs from parameter RAM 64 in the case of DaVinci SOCs
756 * and 32 in the case of Primus
757 *
758 * If id is EDMA_CONT_PARAMS_FIXED_EXACT then the API starts looking for a
759 * set of contiguous parameter RAMs from the "param" that is passed as an
760 * argument to the API.
761 *
762 * If id is EDMA_CONT_PARAMS_FIXED_NOT_EXACT then the API initially tries
763 * starts looking for a set of contiguous parameter RAMs from the "param"
764 * that is passed as an argument to the API. On failure the API will try to
765 * find a set of contiguous Parameter RAMs in the remaining Parameter RAMs
766 */
767int edma_alloc_cont_slots(unsigned ctlr, unsigned int id, int slot, int count)
768{
769 /*
770 * The start slot requested should be greater than
771 * the number of channels and lesser than the total number
772 * of slots
773 */
774 if (slot < edma_info[ctlr]->num_channels ||
775 slot >= edma_info[ctlr]->num_slots)
776 return -EINVAL;
777
778 /*
779 * The number of parameter RAMs requested cannot be less than 1
780 * and cannot be more than the number of slots minus the number of
781 * channels
782 */
783 if (count < 1 || count >
784 (edma_info[ctlr]->num_slots - edma_info[ctlr]->num_channels))
785 return -EINVAL;
786
787 switch (id) {
788 case EDMA_CONT_PARAMS_ANY:
789 return reserve_contiguous_params(ctlr, id, count,
790 edma_info[ctlr]->num_channels);
791 case EDMA_CONT_PARAMS_FIXED_EXACT:
792 case EDMA_CONT_PARAMS_FIXED_NOT_EXACT:
793 return reserve_contiguous_params(ctlr, id, count, slot);
794 default:
795 return -EINVAL;
796 }
797
798}
799EXPORT_SYMBOL(edma_alloc_cont_slots);
800
801/**
802 * edma_free_cont_slots - deallocate DMA parameter RAMs
803 * @slot: first parameter RAM of a set of parameter RAMs to be freed
804 * @count: the number of contiguous parameter RAMs to be freed
805 *
806 * This deallocates the parameter RAM slots allocated by
807 * edma_alloc_cont_slots.
808 * Callers/applications need to keep track of sets of contiguous
809 * parameter RAMs that have been allocated using the edma_alloc_cont_slots
810 * API.
811 * Callers are responsible for ensuring the slots are inactive, and will
812 * not be activated.
813 */
814int edma_free_cont_slots(unsigned slot, int count)
815{
816 unsigned ctlr;
817 int i;
818
819 ctlr = EDMA_CTLR(slot);
820 slot = EDMA_CHAN_SLOT(slot);
821
822 if (slot < edma_info[ctlr]->num_channels ||
823 slot >= edma_info[ctlr]->num_slots ||
824 count < 1)
825 return -EINVAL;
826
827 for (i = slot; i < slot + count; ++i) {
828 ctlr = EDMA_CTLR(i);
829 slot = EDMA_CHAN_SLOT(i);
830
831 memcpy_toio(edmacc_regs_base[ctlr] + PARM_OFFSET(slot),
832 &dummy_paramset, PARM_SIZE);
833 clear_bit(slot, edma_info[ctlr]->edma_inuse);
834 }
835
836 return 0;
837}
838EXPORT_SYMBOL(edma_free_cont_slots);
839
605/*-----------------------------------------------------------------------*/ 840/*-----------------------------------------------------------------------*/
606 841
607/* Parameter RAM operations (i) -- read/write partial slots */ 842/* Parameter RAM operations (i) -- read/write partial slots */
@@ -620,8 +855,13 @@ EXPORT_SYMBOL(edma_free_slot);
620void edma_set_src(unsigned slot, dma_addr_t src_port, 855void edma_set_src(unsigned slot, dma_addr_t src_port,
621 enum address_mode mode, enum fifo_width width) 856 enum address_mode mode, enum fifo_width width)
622{ 857{
623 if (slot < num_slots) { 858 unsigned ctlr;
624 unsigned int i = edma_parm_read(PARM_OPT, slot); 859
860 ctlr = EDMA_CTLR(slot);
861 slot = EDMA_CHAN_SLOT(slot);
862
863 if (slot < edma_info[ctlr]->num_slots) {
864 unsigned int i = edma_parm_read(ctlr, PARM_OPT, slot);
625 865
626 if (mode) { 866 if (mode) {
627 /* set SAM and program FWID */ 867 /* set SAM and program FWID */
@@ -630,11 +870,11 @@ void edma_set_src(unsigned slot, dma_addr_t src_port,
630 /* clear SAM */ 870 /* clear SAM */
631 i &= ~SAM; 871 i &= ~SAM;
632 } 872 }
633 edma_parm_write(PARM_OPT, slot, i); 873 edma_parm_write(ctlr, PARM_OPT, slot, i);
634 874
635 /* set the source port address 875 /* set the source port address
636 in source register of param structure */ 876 in source register of param structure */
637 edma_parm_write(PARM_SRC, slot, src_port); 877 edma_parm_write(ctlr, PARM_SRC, slot, src_port);
638 } 878 }
639} 879}
640EXPORT_SYMBOL(edma_set_src); 880EXPORT_SYMBOL(edma_set_src);
@@ -653,8 +893,13 @@ EXPORT_SYMBOL(edma_set_src);
653void edma_set_dest(unsigned slot, dma_addr_t dest_port, 893void edma_set_dest(unsigned slot, dma_addr_t dest_port,
654 enum address_mode mode, enum fifo_width width) 894 enum address_mode mode, enum fifo_width width)
655{ 895{
656 if (slot < num_slots) { 896 unsigned ctlr;
657 unsigned int i = edma_parm_read(PARM_OPT, slot); 897
898 ctlr = EDMA_CTLR(slot);
899 slot = EDMA_CHAN_SLOT(slot);
900
901 if (slot < edma_info[ctlr]->num_slots) {
902 unsigned int i = edma_parm_read(ctlr, PARM_OPT, slot);
658 903
659 if (mode) { 904 if (mode) {
660 /* set DAM and program FWID */ 905 /* set DAM and program FWID */
@@ -663,10 +908,10 @@ void edma_set_dest(unsigned slot, dma_addr_t dest_port,
663 /* clear DAM */ 908 /* clear DAM */
664 i &= ~DAM; 909 i &= ~DAM;
665 } 910 }
666 edma_parm_write(PARM_OPT, slot, i); 911 edma_parm_write(ctlr, PARM_OPT, slot, i);
667 /* set the destination port address 912 /* set the destination port address
668 in dest register of param structure */ 913 in dest register of param structure */
669 edma_parm_write(PARM_DST, slot, dest_port); 914 edma_parm_write(ctlr, PARM_DST, slot, dest_port);
670 } 915 }
671} 916}
672EXPORT_SYMBOL(edma_set_dest); 917EXPORT_SYMBOL(edma_set_dest);
@@ -683,8 +928,12 @@ EXPORT_SYMBOL(edma_set_dest);
683void edma_get_position(unsigned slot, dma_addr_t *src, dma_addr_t *dst) 928void edma_get_position(unsigned slot, dma_addr_t *src, dma_addr_t *dst)
684{ 929{
685 struct edmacc_param temp; 930 struct edmacc_param temp;
931 unsigned ctlr;
932
933 ctlr = EDMA_CTLR(slot);
934 slot = EDMA_CHAN_SLOT(slot);
686 935
687 edma_read_slot(slot, &temp); 936 edma_read_slot(EDMA_CTLR_CHAN(ctlr, slot), &temp);
688 if (src != NULL) 937 if (src != NULL)
689 *src = temp.src; 938 *src = temp.src;
690 if (dst != NULL) 939 if (dst != NULL)
@@ -704,10 +953,15 @@ EXPORT_SYMBOL(edma_get_position);
704 */ 953 */
705void edma_set_src_index(unsigned slot, s16 src_bidx, s16 src_cidx) 954void edma_set_src_index(unsigned slot, s16 src_bidx, s16 src_cidx)
706{ 955{
707 if (slot < num_slots) { 956 unsigned ctlr;
708 edma_parm_modify(PARM_SRC_DST_BIDX, slot, 957
958 ctlr = EDMA_CTLR(slot);
959 slot = EDMA_CHAN_SLOT(slot);
960
961 if (slot < edma_info[ctlr]->num_slots) {
962 edma_parm_modify(ctlr, PARM_SRC_DST_BIDX, slot,
709 0xffff0000, src_bidx); 963 0xffff0000, src_bidx);
710 edma_parm_modify(PARM_SRC_DST_CIDX, slot, 964 edma_parm_modify(ctlr, PARM_SRC_DST_CIDX, slot,
711 0xffff0000, src_cidx); 965 0xffff0000, src_cidx);
712 } 966 }
713} 967}
@@ -725,10 +979,15 @@ EXPORT_SYMBOL(edma_set_src_index);
725 */ 979 */
726void edma_set_dest_index(unsigned slot, s16 dest_bidx, s16 dest_cidx) 980void edma_set_dest_index(unsigned slot, s16 dest_bidx, s16 dest_cidx)
727{ 981{
728 if (slot < num_slots) { 982 unsigned ctlr;
729 edma_parm_modify(PARM_SRC_DST_BIDX, slot, 983
984 ctlr = EDMA_CTLR(slot);
985 slot = EDMA_CHAN_SLOT(slot);
986
987 if (slot < edma_info[ctlr]->num_slots) {
988 edma_parm_modify(ctlr, PARM_SRC_DST_BIDX, slot,
730 0x0000ffff, dest_bidx << 16); 989 0x0000ffff, dest_bidx << 16);
731 edma_parm_modify(PARM_SRC_DST_CIDX, slot, 990 edma_parm_modify(ctlr, PARM_SRC_DST_CIDX, slot,
732 0x0000ffff, dest_cidx << 16); 991 0x0000ffff, dest_cidx << 16);
733 } 992 }
734} 993}
@@ -767,16 +1026,21 @@ void edma_set_transfer_params(unsigned slot,
767 u16 acnt, u16 bcnt, u16 ccnt, 1026 u16 acnt, u16 bcnt, u16 ccnt,
768 u16 bcnt_rld, enum sync_dimension sync_mode) 1027 u16 bcnt_rld, enum sync_dimension sync_mode)
769{ 1028{
770 if (slot < num_slots) { 1029 unsigned ctlr;
771 edma_parm_modify(PARM_LINK_BCNTRLD, slot, 1030
1031 ctlr = EDMA_CTLR(slot);
1032 slot = EDMA_CHAN_SLOT(slot);
1033
1034 if (slot < edma_info[ctlr]->num_slots) {
1035 edma_parm_modify(ctlr, PARM_LINK_BCNTRLD, slot,
772 0x0000ffff, bcnt_rld << 16); 1036 0x0000ffff, bcnt_rld << 16);
773 if (sync_mode == ASYNC) 1037 if (sync_mode == ASYNC)
774 edma_parm_and(PARM_OPT, slot, ~SYNCDIM); 1038 edma_parm_and(ctlr, PARM_OPT, slot, ~SYNCDIM);
775 else 1039 else
776 edma_parm_or(PARM_OPT, slot, SYNCDIM); 1040 edma_parm_or(ctlr, PARM_OPT, slot, SYNCDIM);
777 /* Set the acount, bcount, ccount registers */ 1041 /* Set the acount, bcount, ccount registers */
778 edma_parm_write(PARM_A_B_CNT, slot, (bcnt << 16) | acnt); 1042 edma_parm_write(ctlr, PARM_A_B_CNT, slot, (bcnt << 16) | acnt);
779 edma_parm_write(PARM_CCNT, slot, ccnt); 1043 edma_parm_write(ctlr, PARM_CCNT, slot, ccnt);
780 } 1044 }
781} 1045}
782EXPORT_SYMBOL(edma_set_transfer_params); 1046EXPORT_SYMBOL(edma_set_transfer_params);
@@ -790,11 +1054,19 @@ EXPORT_SYMBOL(edma_set_transfer_params);
790 */ 1054 */
791void edma_link(unsigned from, unsigned to) 1055void edma_link(unsigned from, unsigned to)
792{ 1056{
793 if (from >= num_slots) 1057 unsigned ctlr_from, ctlr_to;
1058
1059 ctlr_from = EDMA_CTLR(from);
1060 from = EDMA_CHAN_SLOT(from);
1061 ctlr_to = EDMA_CTLR(to);
1062 to = EDMA_CHAN_SLOT(to);
1063
1064 if (from >= edma_info[ctlr_from]->num_slots)
794 return; 1065 return;
795 if (to >= num_slots) 1066 if (to >= edma_info[ctlr_to]->num_slots)
796 return; 1067 return;
797 edma_parm_modify(PARM_LINK_BCNTRLD, from, 0xffff0000, PARM_OFFSET(to)); 1068 edma_parm_modify(ctlr_from, PARM_LINK_BCNTRLD, from, 0xffff0000,
1069 PARM_OFFSET(to));
798} 1070}
799EXPORT_SYMBOL(edma_link); 1071EXPORT_SYMBOL(edma_link);
800 1072
@@ -807,9 +1079,14 @@ EXPORT_SYMBOL(edma_link);
807 */ 1079 */
808void edma_unlink(unsigned from) 1080void edma_unlink(unsigned from)
809{ 1081{
810 if (from >= num_slots) 1082 unsigned ctlr;
1083
1084 ctlr = EDMA_CTLR(from);
1085 from = EDMA_CHAN_SLOT(from);
1086
1087 if (from >= edma_info[ctlr]->num_slots)
811 return; 1088 return;
812 edma_parm_or(PARM_LINK_BCNTRLD, from, 0xffff); 1089 edma_parm_or(ctlr, PARM_LINK_BCNTRLD, from, 0xffff);
813} 1090}
814EXPORT_SYMBOL(edma_unlink); 1091EXPORT_SYMBOL(edma_unlink);
815 1092
@@ -829,9 +1106,15 @@ EXPORT_SYMBOL(edma_unlink);
829 */ 1106 */
830void edma_write_slot(unsigned slot, const struct edmacc_param *param) 1107void edma_write_slot(unsigned slot, const struct edmacc_param *param)
831{ 1108{
832 if (slot >= num_slots) 1109 unsigned ctlr;
1110
1111 ctlr = EDMA_CTLR(slot);
1112 slot = EDMA_CHAN_SLOT(slot);
1113
1114 if (slot >= edma_info[ctlr]->num_slots)
833 return; 1115 return;
834 memcpy_toio(edmacc_regs_base + PARM_OFFSET(slot), param, PARM_SIZE); 1116 memcpy_toio(edmacc_regs_base[ctlr] + PARM_OFFSET(slot), param,
1117 PARM_SIZE);
835} 1118}
836EXPORT_SYMBOL(edma_write_slot); 1119EXPORT_SYMBOL(edma_write_slot);
837 1120
@@ -845,9 +1128,15 @@ EXPORT_SYMBOL(edma_write_slot);
845 */ 1128 */
846void edma_read_slot(unsigned slot, struct edmacc_param *param) 1129void edma_read_slot(unsigned slot, struct edmacc_param *param)
847{ 1130{
848 if (slot >= num_slots) 1131 unsigned ctlr;
1132
1133 ctlr = EDMA_CTLR(slot);
1134 slot = EDMA_CHAN_SLOT(slot);
1135
1136 if (slot >= edma_info[ctlr]->num_slots)
849 return; 1137 return;
850 memcpy_fromio(param, edmacc_regs_base + PARM_OFFSET(slot), PARM_SIZE); 1138 memcpy_fromio(param, edmacc_regs_base[ctlr] + PARM_OFFSET(slot),
1139 PARM_SIZE);
851} 1140}
852EXPORT_SYMBOL(edma_read_slot); 1141EXPORT_SYMBOL(edma_read_slot);
853 1142
@@ -864,10 +1153,15 @@ EXPORT_SYMBOL(edma_read_slot);
864 */ 1153 */
865void edma_pause(unsigned channel) 1154void edma_pause(unsigned channel)
866{ 1155{
867 if (channel < num_channels) { 1156 unsigned ctlr;
1157
1158 ctlr = EDMA_CTLR(channel);
1159 channel = EDMA_CHAN_SLOT(channel);
1160
1161 if (channel < edma_info[ctlr]->num_channels) {
868 unsigned int mask = (1 << (channel & 0x1f)); 1162 unsigned int mask = (1 << (channel & 0x1f));
869 1163
870 edma_shadow0_write_array(SH_EECR, channel >> 5, mask); 1164 edma_shadow0_write_array(ctlr, SH_EECR, channel >> 5, mask);
871 } 1165 }
872} 1166}
873EXPORT_SYMBOL(edma_pause); 1167EXPORT_SYMBOL(edma_pause);
@@ -880,10 +1174,15 @@ EXPORT_SYMBOL(edma_pause);
880 */ 1174 */
881void edma_resume(unsigned channel) 1175void edma_resume(unsigned channel)
882{ 1176{
883 if (channel < num_channels) { 1177 unsigned ctlr;
1178
1179 ctlr = EDMA_CTLR(channel);
1180 channel = EDMA_CHAN_SLOT(channel);
1181
1182 if (channel < edma_info[ctlr]->num_channels) {
884 unsigned int mask = (1 << (channel & 0x1f)); 1183 unsigned int mask = (1 << (channel & 0x1f));
885 1184
886 edma_shadow0_write_array(SH_EESR, channel >> 5, mask); 1185 edma_shadow0_write_array(ctlr, SH_EESR, channel >> 5, mask);
887 } 1186 }
888} 1187}
889EXPORT_SYMBOL(edma_resume); 1188EXPORT_SYMBOL(edma_resume);
@@ -901,28 +1200,33 @@ EXPORT_SYMBOL(edma_resume);
901 */ 1200 */
902int edma_start(unsigned channel) 1201int edma_start(unsigned channel)
903{ 1202{
904 if (channel < num_channels) { 1203 unsigned ctlr;
1204
1205 ctlr = EDMA_CTLR(channel);
1206 channel = EDMA_CHAN_SLOT(channel);
1207
1208 if (channel < edma_info[ctlr]->num_channels) {
905 int j = channel >> 5; 1209 int j = channel >> 5;
906 unsigned int mask = (1 << (channel & 0x1f)); 1210 unsigned int mask = (1 << (channel & 0x1f));
907 1211
908 /* EDMA channels without event association */ 1212 /* EDMA channels without event association */
909 if (test_bit(channel, edma_noevent)) { 1213 if (test_bit(channel, edma_info[ctlr]->edma_noevent)) {
910 pr_debug("EDMA: ESR%d %08x\n", j, 1214 pr_debug("EDMA: ESR%d %08x\n", j,
911 edma_shadow0_read_array(SH_ESR, j)); 1215 edma_shadow0_read_array(ctlr, SH_ESR, j));
912 edma_shadow0_write_array(SH_ESR, j, mask); 1216 edma_shadow0_write_array(ctlr, SH_ESR, j, mask);
913 return 0; 1217 return 0;
914 } 1218 }
915 1219
916 /* EDMA channel with event association */ 1220 /* EDMA channel with event association */
917 pr_debug("EDMA: ER%d %08x\n", j, 1221 pr_debug("EDMA: ER%d %08x\n", j,
918 edma_shadow0_read_array(SH_ER, j)); 1222 edma_shadow0_read_array(ctlr, SH_ER, j));
919 /* Clear any pending error */ 1223 /* Clear any pending error */
920 edma_write_array(EDMA_EMCR, j, mask); 1224 edma_write_array(ctlr, EDMA_EMCR, j, mask);
921 /* Clear any SER */ 1225 /* Clear any SER */
922 edma_shadow0_write_array(SH_SECR, j, mask); 1226 edma_shadow0_write_array(ctlr, SH_SECR, j, mask);
923 edma_shadow0_write_array(SH_EESR, j, mask); 1227 edma_shadow0_write_array(ctlr, SH_EESR, j, mask);
924 pr_debug("EDMA: EER%d %08x\n", j, 1228 pr_debug("EDMA: EER%d %08x\n", j,
925 edma_shadow0_read_array(SH_EER, j)); 1229 edma_shadow0_read_array(ctlr, SH_EER, j));
926 return 0; 1230 return 0;
927 } 1231 }
928 1232
@@ -941,17 +1245,22 @@ EXPORT_SYMBOL(edma_start);
941 */ 1245 */
942void edma_stop(unsigned channel) 1246void edma_stop(unsigned channel)
943{ 1247{
944 if (channel < num_channels) { 1248 unsigned ctlr;
1249
1250 ctlr = EDMA_CTLR(channel);
1251 channel = EDMA_CHAN_SLOT(channel);
1252
1253 if (channel < edma_info[ctlr]->num_channels) {
945 int j = channel >> 5; 1254 int j = channel >> 5;
946 unsigned int mask = (1 << (channel & 0x1f)); 1255 unsigned int mask = (1 << (channel & 0x1f));
947 1256
948 edma_shadow0_write_array(SH_EECR, j, mask); 1257 edma_shadow0_write_array(ctlr, SH_EECR, j, mask);
949 edma_shadow0_write_array(SH_ECR, j, mask); 1258 edma_shadow0_write_array(ctlr, SH_ECR, j, mask);
950 edma_shadow0_write_array(SH_SECR, j, mask); 1259 edma_shadow0_write_array(ctlr, SH_SECR, j, mask);
951 edma_write_array(EDMA_EMCR, j, mask); 1260 edma_write_array(ctlr, EDMA_EMCR, j, mask);
952 1261
953 pr_debug("EDMA: EER%d %08x\n", j, 1262 pr_debug("EDMA: EER%d %08x\n", j,
954 edma_shadow0_read_array(SH_EER, j)); 1263 edma_shadow0_read_array(ctlr, SH_EER, j));
955 1264
956 /* REVISIT: consider guarding against inappropriate event 1265 /* REVISIT: consider guarding against inappropriate event
957 * chaining by overwriting with dummy_paramset. 1266 * chaining by overwriting with dummy_paramset.
@@ -975,18 +1284,23 @@ EXPORT_SYMBOL(edma_stop);
975 1284
976void edma_clean_channel(unsigned channel) 1285void edma_clean_channel(unsigned channel)
977{ 1286{
978 if (channel < num_channels) { 1287 unsigned ctlr;
1288
1289 ctlr = EDMA_CTLR(channel);
1290 channel = EDMA_CHAN_SLOT(channel);
1291
1292 if (channel < edma_info[ctlr]->num_channels) {
979 int j = (channel >> 5); 1293 int j = (channel >> 5);
980 unsigned int mask = 1 << (channel & 0x1f); 1294 unsigned int mask = 1 << (channel & 0x1f);
981 1295
982 pr_debug("EDMA: EMR%d %08x\n", j, 1296 pr_debug("EDMA: EMR%d %08x\n", j,
983 edma_read_array(EDMA_EMR, j)); 1297 edma_read_array(ctlr, EDMA_EMR, j));
984 edma_shadow0_write_array(SH_ECR, j, mask); 1298 edma_shadow0_write_array(ctlr, SH_ECR, j, mask);
985 /* Clear the corresponding EMR bits */ 1299 /* Clear the corresponding EMR bits */
986 edma_write_array(EDMA_EMCR, j, mask); 1300 edma_write_array(ctlr, EDMA_EMCR, j, mask);
987 /* Clear any SER */ 1301 /* Clear any SER */
988 edma_shadow0_write_array(SH_SECR, j, mask); 1302 edma_shadow0_write_array(ctlr, SH_SECR, j, mask);
989 edma_write(EDMA_CCERRCLR, (1 << 16) | 0x3); 1303 edma_write(ctlr, EDMA_CCERRCLR, (1 << 16) | 0x3);
990 } 1304 }
991} 1305}
992EXPORT_SYMBOL(edma_clean_channel); 1306EXPORT_SYMBOL(edma_clean_channel);
@@ -998,12 +1312,17 @@ EXPORT_SYMBOL(edma_clean_channel);
998 */ 1312 */
999void edma_clear_event(unsigned channel) 1313void edma_clear_event(unsigned channel)
1000{ 1314{
1001 if (channel >= num_channels) 1315 unsigned ctlr;
1316
1317 ctlr = EDMA_CTLR(channel);
1318 channel = EDMA_CHAN_SLOT(channel);
1319
1320 if (channel >= edma_info[ctlr]->num_channels)
1002 return; 1321 return;
1003 if (channel < 32) 1322 if (channel < 32)
1004 edma_write(EDMA_ECR, 1 << channel); 1323 edma_write(ctlr, EDMA_ECR, 1 << channel);
1005 else 1324 else
1006 edma_write(EDMA_ECRH, 1 << (channel - 32)); 1325 edma_write(ctlr, EDMA_ECRH, 1 << (channel - 32));
1007} 1326}
1008EXPORT_SYMBOL(edma_clear_event); 1327EXPORT_SYMBOL(edma_clear_event);
1009 1328
@@ -1012,62 +1331,133 @@ EXPORT_SYMBOL(edma_clear_event);
1012static int __init edma_probe(struct platform_device *pdev) 1331static int __init edma_probe(struct platform_device *pdev)
1013{ 1332{
1014 struct edma_soc_info *info = pdev->dev.platform_data; 1333 struct edma_soc_info *info = pdev->dev.platform_data;
1015 int i; 1334 const s8 (*queue_priority_mapping)[2];
1016 int status; 1335 const s8 (*queue_tc_mapping)[2];
1336 int i, j, found = 0;
1337 int status = -1;
1017 const s8 *noevent; 1338 const s8 *noevent;
1018 int irq = 0, err_irq = 0; 1339 int irq[EDMA_MAX_CC] = {0, 0};
1019 struct resource *r; 1340 int err_irq[EDMA_MAX_CC] = {0, 0};
1020 resource_size_t len; 1341 struct resource *r[EDMA_MAX_CC] = {NULL};
1342 resource_size_t len[EDMA_MAX_CC];
1343 char res_name[10];
1344 char irq_name[10];
1021 1345
1022 if (!info) 1346 if (!info)
1023 return -ENODEV; 1347 return -ENODEV;
1024 1348
1025 r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "edma_cc"); 1349 for (j = 0; j < EDMA_MAX_CC; j++) {
1026 if (!r) 1350 sprintf(res_name, "edma_cc%d", j);
1027 return -ENODEV; 1351 r[j] = platform_get_resource_byname(pdev, IORESOURCE_MEM,
1352 res_name);
1353 if (!r[j]) {
1354 if (found)
1355 break;
1356 else
1357 return -ENODEV;
1358 } else
1359 found = 1;
1360
1361 len[j] = resource_size(r[j]);
1362
1363 r[j] = request_mem_region(r[j]->start, len[j],
1364 dev_name(&pdev->dev));
1365 if (!r[j]) {
1366 status = -EBUSY;
1367 goto fail1;
1368 }
1028 1369
1029 len = r->end - r->start + 1; 1370 edmacc_regs_base[j] = ioremap(r[j]->start, len[j]);
1371 if (!edmacc_regs_base[j]) {
1372 status = -EBUSY;
1373 goto fail1;
1374 }
1030 1375
1031 r = request_mem_region(r->start, len, r->name); 1376 edma_info[j] = kmalloc(sizeof(struct edma), GFP_KERNEL);
1032 if (!r) 1377 if (!edma_info[j]) {
1033 return -EBUSY; 1378 status = -ENOMEM;
1379 goto fail1;
1380 }
1381 memset(edma_info[j], 0, sizeof(struct edma));
1382
1383 edma_info[j]->num_channels = min_t(unsigned, info[j].n_channel,
1384 EDMA_MAX_DMACH);
1385 edma_info[j]->num_slots = min_t(unsigned, info[j].n_slot,
1386 EDMA_MAX_PARAMENTRY);
1387 edma_info[j]->num_cc = min_t(unsigned, info[j].n_cc,
1388 EDMA_MAX_CC);
1389
1390 edma_info[j]->default_queue = info[j].default_queue;
1391 if (!edma_info[j]->default_queue)
1392 edma_info[j]->default_queue = EVENTQ_1;
1393
1394 dev_dbg(&pdev->dev, "DMA REG BASE ADDR=%p\n",
1395 edmacc_regs_base[j]);
1396
1397 for (i = 0; i < edma_info[j]->num_slots; i++)
1398 memcpy_toio(edmacc_regs_base[j] + PARM_OFFSET(i),
1399 &dummy_paramset, PARM_SIZE);
1400
1401 noevent = info[j].noevent;
1402 if (noevent) {
1403 while (*noevent != -1)
1404 set_bit(*noevent++, edma_info[j]->edma_noevent);
1405 }
1034 1406
1035 edmacc_regs_base = ioremap(r->start, len); 1407 sprintf(irq_name, "edma%d", j);
1036 if (!edmacc_regs_base) { 1408 irq[j] = platform_get_irq_byname(pdev, irq_name);
1037 status = -EBUSY; 1409 edma_info[j]->irq_res_start = irq[j];
1038 goto fail1; 1410 status = request_irq(irq[j], dma_irq_handler, 0, "edma",
1039 } 1411 &pdev->dev);
1412 if (status < 0) {
1413 dev_dbg(&pdev->dev, "request_irq %d failed --> %d\n",
1414 irq[j], status);
1415 goto fail;
1416 }
1040 1417
1041 num_channels = min_t(unsigned, info->n_channel, EDMA_MAX_DMACH); 1418 sprintf(irq_name, "edma%d_err", j);
1042 num_slots = min_t(unsigned, info->n_slot, EDMA_MAX_PARAMENTRY); 1419 err_irq[j] = platform_get_irq_byname(pdev, irq_name);
1420 edma_info[j]->irq_res_end = err_irq[j];
1421 status = request_irq(err_irq[j], dma_ccerr_handler, 0,
1422 "edma_error", &pdev->dev);
1423 if (status < 0) {
1424 dev_dbg(&pdev->dev, "request_irq %d failed --> %d\n",
1425 err_irq[j], status);
1426 goto fail;
1427 }
1043 1428
1044 dev_dbg(&pdev->dev, "DMA REG BASE ADDR=%p\n", edmacc_regs_base); 1429 /* Everything lives on transfer controller 1 until otherwise
1430 * specified. This way, long transfers on the low priority queue
1431 * started by the codec engine will not cause audio defects.
1432 */
1433 for (i = 0; i < edma_info[j]->num_channels; i++)
1434 map_dmach_queue(j, i, EVENTQ_1);
1045 1435
1046 for (i = 0; i < num_slots; i++) 1436 queue_tc_mapping = info[j].queue_tc_mapping;
1047 memcpy_toio(edmacc_regs_base + PARM_OFFSET(i), 1437 queue_priority_mapping = info[j].queue_priority_mapping;
1048 &dummy_paramset, PARM_SIZE);
1049 1438
1050 noevent = info->noevent; 1439 /* Event queue to TC mapping */
1051 if (noevent) { 1440 for (i = 0; queue_tc_mapping[i][0] != -1; i++)
1052 while (*noevent != -1) 1441 map_queue_tc(j, queue_tc_mapping[i][0],
1053 set_bit(*noevent++, edma_noevent); 1442 queue_tc_mapping[i][1]);
1054 }
1055 1443
1056 irq = platform_get_irq(pdev, 0); 1444 /* Event queue priority mapping */
1057 status = request_irq(irq, dma_irq_handler, 0, "edma", &pdev->dev); 1445 for (i = 0; queue_priority_mapping[i][0] != -1; i++)
1058 if (status < 0) { 1446 assign_priority_to_queue(j,
1059 dev_dbg(&pdev->dev, "request_irq %d failed --> %d\n", 1447 queue_priority_mapping[i][0],
1060 irq, status); 1448 queue_priority_mapping[i][1]);
1061 goto fail; 1449
1062 } 1450 /* Map the channel to param entry if channel mapping logic
1451 * exist
1452 */
1453 if (edma_read(j, EDMA_CCCFG) & CHMAP_EXIST)
1454 map_dmach_param(j);
1063 1455
1064 err_irq = platform_get_irq(pdev, 1); 1456 for (i = 0; i < info[j].n_region; i++) {
1065 status = request_irq(err_irq, dma_ccerr_handler, 0, 1457 edma_write_array2(j, EDMA_DRAE, i, 0, 0x0);
1066 "edma_error", &pdev->dev); 1458 edma_write_array2(j, EDMA_DRAE, i, 1, 0x0);
1067 if (status < 0) { 1459 edma_write_array(j, EDMA_QRAE, i, 0x0);
1068 dev_dbg(&pdev->dev, "request_irq %d failed --> %d\n", 1460 }
1069 err_irq, status);
1070 goto fail;
1071 } 1461 }
1072 1462
1073 if (tc_errs_handled) { 1463 if (tc_errs_handled) {
@@ -1087,38 +1477,23 @@ static int __init edma_probe(struct platform_device *pdev)
1087 } 1477 }
1088 } 1478 }
1089 1479
1090 /* Everything lives on transfer controller 1 until otherwise specified.
1091 * This way, long transfers on the low priority queue
1092 * started by the codec engine will not cause audio defects.
1093 */
1094 for (i = 0; i < num_channels; i++)
1095 map_dmach_queue(i, EVENTQ_1);
1096
1097 /* Event queue to TC mapping */
1098 for (i = 0; queue_tc_mapping[i][0] != -1; i++)
1099 map_queue_tc(queue_tc_mapping[i][0], queue_tc_mapping[i][1]);
1100
1101 /* Event queue priority mapping */
1102 for (i = 0; queue_priority_mapping[i][0] != -1; i++)
1103 assign_priority_to_queue(queue_priority_mapping[i][0],
1104 queue_priority_mapping[i][1]);
1105
1106 for (i = 0; i < info->n_region; i++) {
1107 edma_write_array2(EDMA_DRAE, i, 0, 0x0);
1108 edma_write_array2(EDMA_DRAE, i, 1, 0x0);
1109 edma_write_array(EDMA_QRAE, i, 0x0);
1110 }
1111
1112 return 0; 1480 return 0;
1113 1481
1114fail: 1482fail:
1115 if (err_irq) 1483 for (i = 0; i < EDMA_MAX_CC; i++) {
1116 free_irq(err_irq, NULL); 1484 if (err_irq[i])
1117 if (irq) 1485 free_irq(err_irq[i], &pdev->dev);
1118 free_irq(irq, NULL); 1486 if (irq[i])
1119 iounmap(edmacc_regs_base); 1487 free_irq(irq[i], &pdev->dev);
1488 }
1120fail1: 1489fail1:
1121 release_mem_region(r->start, len); 1490 for (i = 0; i < EDMA_MAX_CC; i++) {
1491 if (r[i])
1492 release_mem_region(r[i]->start, len[i]);
1493 if (edmacc_regs_base[i])
1494 iounmap(edmacc_regs_base[i]);
1495 kfree(edma_info[i]);
1496 }
1122 return status; 1497 return status;
1123} 1498}
1124 1499
diff --git a/arch/arm/mach-davinci/gpio.c b/arch/arm/mach-davinci/gpio.c
index 1b6532159c58..f6ea9db11f41 100644
--- a/arch/arm/mach-davinci/gpio.c
+++ b/arch/arm/mach-davinci/gpio.c
@@ -34,6 +34,7 @@ static DEFINE_SPINLOCK(gpio_lock);
34struct davinci_gpio { 34struct davinci_gpio {
35 struct gpio_chip chip; 35 struct gpio_chip chip;
36 struct gpio_controller *__iomem regs; 36 struct gpio_controller *__iomem regs;
37 int irq_base;
37}; 38};
38 39
39static struct davinci_gpio chips[DIV_ROUND_UP(DAVINCI_N_GPIO, 32)]; 40static struct davinci_gpio chips[DIV_ROUND_UP(DAVINCI_N_GPIO, 32)];
@@ -161,8 +162,7 @@ pure_initcall(davinci_gpio_setup);
161 * used as output pins ... which is convenient for testing. 162 * used as output pins ... which is convenient for testing.
162 * 163 *
163 * NOTE: The first few GPIOs also have direct INTC hookups in addition 164 * NOTE: The first few GPIOs also have direct INTC hookups in addition
164 * to their GPIOBNK0 irq, with a bit less overhead but less flexibility 165 * to their GPIOBNK0 irq, with a bit less overhead.
165 * on triggering (e.g. no edge options). We don't try to use those.
166 * 166 *
167 * All those INTC hookups (direct, plus several IRQ banks) can also 167 * All those INTC hookups (direct, plus several IRQ banks) can also
168 * serve as EDMA event triggers. 168 * serve as EDMA event triggers.
@@ -171,7 +171,7 @@ pure_initcall(davinci_gpio_setup);
171static void gpio_irq_disable(unsigned irq) 171static void gpio_irq_disable(unsigned irq)
172{ 172{
173 struct gpio_controller *__iomem g = get_irq_chip_data(irq); 173 struct gpio_controller *__iomem g = get_irq_chip_data(irq);
174 u32 mask = __gpio_mask(irq_to_gpio(irq)); 174 u32 mask = (u32) get_irq_data(irq);
175 175
176 __raw_writel(mask, &g->clr_falling); 176 __raw_writel(mask, &g->clr_falling);
177 __raw_writel(mask, &g->clr_rising); 177 __raw_writel(mask, &g->clr_rising);
@@ -180,7 +180,7 @@ static void gpio_irq_disable(unsigned irq)
180static void gpio_irq_enable(unsigned irq) 180static void gpio_irq_enable(unsigned irq)
181{ 181{
182 struct gpio_controller *__iomem g = get_irq_chip_data(irq); 182 struct gpio_controller *__iomem g = get_irq_chip_data(irq);
183 u32 mask = __gpio_mask(irq_to_gpio(irq)); 183 u32 mask = (u32) get_irq_data(irq);
184 unsigned status = irq_desc[irq].status; 184 unsigned status = irq_desc[irq].status;
185 185
186 status &= IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING; 186 status &= IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING;
@@ -196,7 +196,7 @@ static void gpio_irq_enable(unsigned irq)
196static int gpio_irq_type(unsigned irq, unsigned trigger) 196static int gpio_irq_type(unsigned irq, unsigned trigger)
197{ 197{
198 struct gpio_controller *__iomem g = get_irq_chip_data(irq); 198 struct gpio_controller *__iomem g = get_irq_chip_data(irq);
199 u32 mask = __gpio_mask(irq_to_gpio(irq)); 199 u32 mask = (u32) get_irq_data(irq);
200 200
201 if (trigger & ~(IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING)) 201 if (trigger & ~(IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING))
202 return -EINVAL; 202 return -EINVAL;
@@ -260,6 +260,45 @@ gpio_irq_handler(unsigned irq, struct irq_desc *desc)
260 /* now it may re-trigger */ 260 /* now it may re-trigger */
261} 261}
262 262
263static int gpio_to_irq_banked(struct gpio_chip *chip, unsigned offset)
264{
265 struct davinci_gpio *d = container_of(chip, struct davinci_gpio, chip);
266
267 if (d->irq_base >= 0)
268 return d->irq_base + offset;
269 else
270 return -ENODEV;
271}
272
273static int gpio_to_irq_unbanked(struct gpio_chip *chip, unsigned offset)
274{
275 struct davinci_soc_info *soc_info = &davinci_soc_info;
276
277 /* NOTE: we assume for now that only irqs in the first gpio_chip
278 * can provide direct-mapped IRQs to AINTC (up to 32 GPIOs).
279 */
280 if (offset < soc_info->gpio_unbanked)
281 return soc_info->gpio_irq + offset;
282 else
283 return -ENODEV;
284}
285
286static int gpio_irq_type_unbanked(unsigned irq, unsigned trigger)
287{
288 struct gpio_controller *__iomem g = get_irq_chip_data(irq);
289 u32 mask = (u32) get_irq_data(irq);
290
291 if (trigger & ~(IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING))
292 return -EINVAL;
293
294 __raw_writel(mask, (trigger & IRQ_TYPE_EDGE_FALLING)
295 ? &g->set_falling : &g->clr_falling);
296 __raw_writel(mask, (trigger & IRQ_TYPE_EDGE_RISING)
297 ? &g->set_rising : &g->clr_rising);
298
299 return 0;
300}
301
263/* 302/*
264 * NOTE: for suspend/resume, probably best to make a platform_device with 303 * NOTE: for suspend/resume, probably best to make a platform_device with
265 * suspend_late/resume_resume calls hooking into results of the set_wake() 304 * suspend_late/resume_resume calls hooking into results of the set_wake()
@@ -275,6 +314,7 @@ static int __init davinci_gpio_irq_setup(void)
275 u32 binten = 0; 314 u32 binten = 0;
276 unsigned ngpio, bank_irq; 315 unsigned ngpio, bank_irq;
277 struct davinci_soc_info *soc_info = &davinci_soc_info; 316 struct davinci_soc_info *soc_info = &davinci_soc_info;
317 struct gpio_controller *__iomem g;
278 318
279 ngpio = soc_info->gpio_num; 319 ngpio = soc_info->gpio_num;
280 320
@@ -292,12 +332,63 @@ static int __init davinci_gpio_irq_setup(void)
292 } 332 }
293 clk_enable(clk); 333 clk_enable(clk);
294 334
335 /* Arrange gpio_to_irq() support, handling either direct IRQs or
336 * banked IRQs. Having GPIOs in the first GPIO bank use direct
337 * IRQs, while the others use banked IRQs, would need some setup
338 * tweaks to recognize hardware which can do that.
339 */
340 for (gpio = 0, bank = 0; gpio < ngpio; bank++, gpio += 32) {
341 chips[bank].chip.to_irq = gpio_to_irq_banked;
342 chips[bank].irq_base = soc_info->gpio_unbanked
343 ? -EINVAL
344 : (soc_info->intc_irq_num + gpio);
345 }
346
347 /*
348 * AINTC can handle direct/unbanked IRQs for GPIOs, with the GPIO
349 * controller only handling trigger modes. We currently assume no
350 * IRQ mux conflicts; gpio_irq_type_unbanked() is only for GPIOs.
351 */
352 if (soc_info->gpio_unbanked) {
353 static struct irq_chip gpio_irqchip_unbanked;
354
355 /* pass "bank 0" GPIO IRQs to AINTC */
356 chips[0].chip.to_irq = gpio_to_irq_unbanked;
357 binten = BIT(0);
358
359 /* AINTC handles mask/unmask; GPIO handles triggering */
360 irq = bank_irq;
361 gpio_irqchip_unbanked = *get_irq_desc_chip(irq_to_desc(irq));
362 gpio_irqchip_unbanked.name = "GPIO-AINTC";
363 gpio_irqchip_unbanked.set_type = gpio_irq_type_unbanked;
364
365 /* default trigger: both edges */
366 g = gpio2controller(0);
367 __raw_writel(~0, &g->set_falling);
368 __raw_writel(~0, &g->set_rising);
369
370 /* set the direct IRQs up to use that irqchip */
371 for (gpio = 0; gpio < soc_info->gpio_unbanked; gpio++, irq++) {
372 set_irq_chip(irq, &gpio_irqchip_unbanked);
373 set_irq_data(irq, (void *) __gpio_mask(gpio));
374 set_irq_chip_data(irq, g);
375 irq_desc[irq].status |= IRQ_TYPE_EDGE_BOTH;
376 }
377
378 goto done;
379 }
380
381 /*
382 * Or, AINTC can handle IRQs for banks of 16 GPIO IRQs, which we
383 * then chain through our own handler.
384 */
295 for (gpio = 0, irq = gpio_to_irq(0), bank = 0; 385 for (gpio = 0, irq = gpio_to_irq(0), bank = 0;
296 gpio < ngpio; 386 gpio < ngpio;
297 bank++, bank_irq++) { 387 bank++, bank_irq++) {
298 struct gpio_controller *__iomem g = gpio2controller(gpio);
299 unsigned i; 388 unsigned i;
300 389
390 /* disabled by default, enabled only as needed */
391 g = gpio2controller(gpio);
301 __raw_writel(~0, &g->clr_falling); 392 __raw_writel(~0, &g->clr_falling);
302 __raw_writel(~0, &g->clr_rising); 393 __raw_writel(~0, &g->clr_rising);
303 394
@@ -309,6 +400,7 @@ static int __init davinci_gpio_irq_setup(void)
309 for (i = 0; i < 16 && gpio < ngpio; i++, irq++, gpio++) { 400 for (i = 0; i < 16 && gpio < ngpio; i++, irq++, gpio++) {
310 set_irq_chip(irq, &gpio_irqchip); 401 set_irq_chip(irq, &gpio_irqchip);
311 set_irq_chip_data(irq, g); 402 set_irq_chip_data(irq, g);
403 set_irq_data(irq, (void *) __gpio_mask(gpio));
312 set_irq_handler(irq, handle_simple_irq); 404 set_irq_handler(irq, handle_simple_irq);
313 set_irq_flags(irq, IRQF_VALID); 405 set_irq_flags(irq, IRQF_VALID);
314 } 406 }
@@ -316,6 +408,7 @@ static int __init davinci_gpio_irq_setup(void)
316 binten |= BIT(bank); 408 binten |= BIT(bank);
317 } 409 }
318 410
411done:
319 /* BINTEN -- per-bank interrupt enable. genirq would also let these 412 /* BINTEN -- per-bank interrupt enable. genirq would also let these
320 * bits be set/cleared dynamically. 413 * bits be set/cleared dynamically.
321 */ 414 */
diff --git a/arch/arm/mach-davinci/include/mach/asp.h b/arch/arm/mach-davinci/include/mach/asp.h
index e0abc437d796..18e4ce34ece6 100644
--- a/arch/arm/mach-davinci/include/mach/asp.h
+++ b/arch/arm/mach-davinci/include/mach/asp.h
@@ -5,21 +5,73 @@
5#define __ASM_ARCH_DAVINCI_ASP_H 5#define __ASM_ARCH_DAVINCI_ASP_H
6 6
7#include <mach/irqs.h> 7#include <mach/irqs.h>
8#include <mach/edma.h>
8 9
9/* Bases of register banks */ 10/* Bases of dm644x and dm355 register banks */
10#define DAVINCI_ASP0_BASE 0x01E02000 11#define DAVINCI_ASP0_BASE 0x01E02000
11#define DAVINCI_ASP1_BASE 0x01E04000 12#define DAVINCI_ASP1_BASE 0x01E04000
12 13
13/* EDMA channels */ 14/* Bases of dm646x register banks */
15#define DAVINCI_DM646X_MCASP0_REG_BASE 0x01D01000
16#define DAVINCI_DM646X_MCASP1_REG_BASE 0x01D01800
17
18/* Bases of da850/da830 McASP0 register banks */
19#define DAVINCI_DA8XX_MCASP0_REG_BASE 0x01D00000
20
21/* Bases of da830 McASP1 register banks */
22#define DAVINCI_DA830_MCASP1_REG_BASE 0x01D04000
23
24/* EDMA channels of dm644x and dm355 */
14#define DAVINCI_DMA_ASP0_TX 2 25#define DAVINCI_DMA_ASP0_TX 2
15#define DAVINCI_DMA_ASP0_RX 3 26#define DAVINCI_DMA_ASP0_RX 3
16#define DAVINCI_DMA_ASP1_TX 8 27#define DAVINCI_DMA_ASP1_TX 8
17#define DAVINCI_DMA_ASP1_RX 9 28#define DAVINCI_DMA_ASP1_RX 9
18 29
30/* EDMA channels of dm646x */
31#define DAVINCI_DM646X_DMA_MCASP0_AXEVT0 6
32#define DAVINCI_DM646X_DMA_MCASP0_AREVT0 9
33#define DAVINCI_DM646X_DMA_MCASP1_AXEVT1 12
34
35/* EDMA channels of da850/da830 McASP0 */
36#define DAVINCI_DA8XX_DMA_MCASP0_AREVT 0
37#define DAVINCI_DA8XX_DMA_MCASP0_AXEVT 1
38
39/* EDMA channels of da830 McASP1 */
40#define DAVINCI_DA830_DMA_MCASP1_AREVT 2
41#define DAVINCI_DA830_DMA_MCASP1_AXEVT 3
42
19/* Interrupts */ 43/* Interrupts */
20#define DAVINCI_ASP0_RX_INT IRQ_MBRINT 44#define DAVINCI_ASP0_RX_INT IRQ_MBRINT
21#define DAVINCI_ASP0_TX_INT IRQ_MBXINT 45#define DAVINCI_ASP0_TX_INT IRQ_MBXINT
22#define DAVINCI_ASP1_RX_INT IRQ_MBRINT 46#define DAVINCI_ASP1_RX_INT IRQ_MBRINT
23#define DAVINCI_ASP1_TX_INT IRQ_MBXINT 47#define DAVINCI_ASP1_TX_INT IRQ_MBXINT
24 48
49struct snd_platform_data {
50 u32 tx_dma_offset;
51 u32 rx_dma_offset;
52 enum dma_event_q eventq_no; /* event queue number */
53 unsigned int codec_fmt;
54
55 /* McASP specific fields */
56 int tdm_slots;
57 u8 op_mode;
58 u8 num_serializer;
59 u8 *serial_dir;
60 u8 version;
61 u8 txnumevt;
62 u8 rxnumevt;
63};
64
65enum {
66 MCASP_VERSION_1 = 0, /* DM646x */
67 MCASP_VERSION_2, /* DA8xx/OMAPL1x */
68};
69
70#define INACTIVE_MODE 0
71#define TX_MODE 1
72#define RX_MODE 2
73
74#define DAVINCI_MCASP_IIS_MODE 0
75#define DAVINCI_MCASP_DIT_MODE 1
76
25#endif /* __ASM_ARCH_DAVINCI_ASP_H */ 77#endif /* __ASM_ARCH_DAVINCI_ASP_H */
diff --git a/arch/arm/mach-davinci/include/mach/common.h b/arch/arm/mach-davinci/include/mach/common.h
index a1f03b606d8f..1fd3917cae4e 100644
--- a/arch/arm/mach-davinci/include/mach/common.h
+++ b/arch/arm/mach-davinci/include/mach/common.h
@@ -60,10 +60,10 @@ struct davinci_soc_info {
60 u8 *intc_irq_prios; 60 u8 *intc_irq_prios;
61 unsigned long intc_irq_num; 61 unsigned long intc_irq_num;
62 struct davinci_timer_info *timer_info; 62 struct davinci_timer_info *timer_info;
63 void __iomem *wdt_base;
64 void __iomem *gpio_base; 63 void __iomem *gpio_base;
65 unsigned gpio_num; 64 unsigned gpio_num;
66 unsigned gpio_irq; 65 unsigned gpio_irq;
66 unsigned gpio_unbanked;
67 struct platform_device *serial_dev; 67 struct platform_device *serial_dev;
68 struct emac_platform_data *emac_pdata; 68 struct emac_platform_data *emac_pdata;
69 dma_addr_t sram_dma; 69 dma_addr_t sram_dma;
diff --git a/arch/arm/mach-davinci/include/mach/cputype.h b/arch/arm/mach-davinci/include/mach/cputype.h
index d12a5ed2959a..189b1ff13642 100644
--- a/arch/arm/mach-davinci/include/mach/cputype.h
+++ b/arch/arm/mach-davinci/include/mach/cputype.h
@@ -30,6 +30,9 @@ struct davinci_id {
30#define DAVINCI_CPU_ID_DM6446 0x64460000 30#define DAVINCI_CPU_ID_DM6446 0x64460000
31#define DAVINCI_CPU_ID_DM6467 0x64670000 31#define DAVINCI_CPU_ID_DM6467 0x64670000
32#define DAVINCI_CPU_ID_DM355 0x03550000 32#define DAVINCI_CPU_ID_DM355 0x03550000
33#define DAVINCI_CPU_ID_DM365 0x03650000
34#define DAVINCI_CPU_ID_DA830 0x08300000
35#define DAVINCI_CPU_ID_DA850 0x08500000
33 36
34#define IS_DAVINCI_CPU(type, id) \ 37#define IS_DAVINCI_CPU(type, id) \
35static inline int is_davinci_ ##type(void) \ 38static inline int is_davinci_ ##type(void) \
@@ -40,6 +43,9 @@ static inline int is_davinci_ ##type(void) \
40IS_DAVINCI_CPU(dm644x, DAVINCI_CPU_ID_DM6446) 43IS_DAVINCI_CPU(dm644x, DAVINCI_CPU_ID_DM6446)
41IS_DAVINCI_CPU(dm646x, DAVINCI_CPU_ID_DM6467) 44IS_DAVINCI_CPU(dm646x, DAVINCI_CPU_ID_DM6467)
42IS_DAVINCI_CPU(dm355, DAVINCI_CPU_ID_DM355) 45IS_DAVINCI_CPU(dm355, DAVINCI_CPU_ID_DM355)
46IS_DAVINCI_CPU(dm365, DAVINCI_CPU_ID_DM365)
47IS_DAVINCI_CPU(da830, DAVINCI_CPU_ID_DA830)
48IS_DAVINCI_CPU(da850, DAVINCI_CPU_ID_DA850)
43 49
44#ifdef CONFIG_ARCH_DAVINCI_DM644x 50#ifdef CONFIG_ARCH_DAVINCI_DM644x
45#define cpu_is_davinci_dm644x() is_davinci_dm644x() 51#define cpu_is_davinci_dm644x() is_davinci_dm644x()
@@ -59,4 +65,22 @@ IS_DAVINCI_CPU(dm355, DAVINCI_CPU_ID_DM355)
59#define cpu_is_davinci_dm355() 0 65#define cpu_is_davinci_dm355() 0
60#endif 66#endif
61 67
68#ifdef CONFIG_ARCH_DAVINCI_DM365
69#define cpu_is_davinci_dm365() is_davinci_dm365()
70#else
71#define cpu_is_davinci_dm365() 0
72#endif
73
74#ifdef CONFIG_ARCH_DAVINCI_DA830
75#define cpu_is_davinci_da830() is_davinci_da830()
76#else
77#define cpu_is_davinci_da830() 0
78#endif
79
80#ifdef CONFIG_ARCH_DAVINCI_DA850
81#define cpu_is_davinci_da850() is_davinci_da850()
82#else
83#define cpu_is_davinci_da850() 0
84#endif
85
62#endif 86#endif
diff --git a/arch/arm/mach-davinci/include/mach/da8xx.h b/arch/arm/mach-davinci/include/mach/da8xx.h
new file mode 100644
index 000000000000..d4095d0572c6
--- /dev/null
+++ b/arch/arm/mach-davinci/include/mach/da8xx.h
@@ -0,0 +1,121 @@
1/*
2 * Chip specific defines for DA8XX/OMAP L1XX SoC
3 *
4 * Author: Mark A. Greer <mgreer@mvista.com>
5 *
6 * 2007, 2009 (c) MontaVista Software, Inc. 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#ifndef __ASM_ARCH_DAVINCI_DA8XX_H
12#define __ASM_ARCH_DAVINCI_DA8XX_H
13
14#include <mach/serial.h>
15#include <mach/edma.h>
16#include <mach/i2c.h>
17#include <mach/emac.h>
18#include <mach/asp.h>
19#include <mach/mmc.h>
20
21/*
22 * The cp_intc interrupt controller for the da8xx isn't in the same
23 * chunk of physical memory space as the other registers (like it is
24 * on the davincis) so it needs to be mapped separately. It will be
25 * mapped early on when the I/O space is mapped and we'll put it just
26 * before the I/O space in the processor's virtual memory space.
27 */
28#define DA8XX_CP_INTC_BASE 0xfffee000
29#define DA8XX_CP_INTC_SIZE SZ_8K
30#define DA8XX_CP_INTC_VIRT (IO_VIRT - DA8XX_CP_INTC_SIZE - SZ_4K)
31
32#define DA8XX_BOOT_CFG_BASE (IO_PHYS + 0x14000)
33
34#define DA8XX_PSC0_BASE 0x01c10000
35#define DA8XX_PLL0_BASE 0x01c11000
36#define DA8XX_JTAG_ID_REG 0x01c14018
37#define DA8XX_TIMER64P0_BASE 0x01c20000
38#define DA8XX_TIMER64P1_BASE 0x01c21000
39#define DA8XX_GPIO_BASE 0x01e26000
40#define DA8XX_PSC1_BASE 0x01e27000
41#define DA8XX_LCD_CNTRL_BASE 0x01e13000
42#define DA8XX_MMCSD0_BASE 0x01c40000
43#define DA8XX_AEMIF_CS2_BASE 0x60000000
44#define DA8XX_AEMIF_CS3_BASE 0x62000000
45#define DA8XX_AEMIF_CTL_BASE 0x68000000
46
47#define PINMUX0 0x00
48#define PINMUX1 0x04
49#define PINMUX2 0x08
50#define PINMUX3 0x0c
51#define PINMUX4 0x10
52#define PINMUX5 0x14
53#define PINMUX6 0x18
54#define PINMUX7 0x1c
55#define PINMUX8 0x20
56#define PINMUX9 0x24
57#define PINMUX10 0x28
58#define PINMUX11 0x2c
59#define PINMUX12 0x30
60#define PINMUX13 0x34
61#define PINMUX14 0x38
62#define PINMUX15 0x3c
63#define PINMUX16 0x40
64#define PINMUX17 0x44
65#define PINMUX18 0x48
66#define PINMUX19 0x4c
67
68void __init da830_init(void);
69void __init da850_init(void);
70
71int da8xx_register_edma(void);
72int da8xx_register_i2c(int instance, struct davinci_i2c_platform_data *pdata);
73int da8xx_register_watchdog(void);
74int da8xx_register_emac(void);
75int da8xx_register_lcdc(void);
76int da8xx_register_mmcsd0(struct davinci_mmc_config *config);
77void __init da8xx_init_mcasp(int id, struct snd_platform_data *pdata);
78
79extern struct platform_device da8xx_serial_device;
80extern struct emac_platform_data da8xx_emac_pdata;
81
82extern const short da830_emif25_pins[];
83extern const short da830_spi0_pins[];
84extern const short da830_spi1_pins[];
85extern const short da830_mmc_sd_pins[];
86extern const short da830_uart0_pins[];
87extern const short da830_uart1_pins[];
88extern const short da830_uart2_pins[];
89extern const short da830_usb20_pins[];
90extern const short da830_usb11_pins[];
91extern const short da830_uhpi_pins[];
92extern const short da830_cpgmac_pins[];
93extern const short da830_emif3c_pins[];
94extern const short da830_mcasp0_pins[];
95extern const short da830_mcasp1_pins[];
96extern const short da830_mcasp2_pins[];
97extern const short da830_i2c0_pins[];
98extern const short da830_i2c1_pins[];
99extern const short da830_lcdcntl_pins[];
100extern const short da830_pwm_pins[];
101extern const short da830_ecap0_pins[];
102extern const short da830_ecap1_pins[];
103extern const short da830_ecap2_pins[];
104extern const short da830_eqep0_pins[];
105extern const short da830_eqep1_pins[];
106
107extern const short da850_uart0_pins[];
108extern const short da850_uart1_pins[];
109extern const short da850_uart2_pins[];
110extern const short da850_i2c0_pins[];
111extern const short da850_i2c1_pins[];
112extern const short da850_cpgmac_pins[];
113extern const short da850_mcasp_pins[];
114extern const short da850_lcdcntl_pins[];
115extern const short da850_mmcsd0_pins[];
116extern const short da850_nand_pins[];
117extern const short da850_nor_pins[];
118
119int da8xx_pinmux_setup(const short pins[]);
120
121#endif /* __ASM_ARCH_DAVINCI_DA8XX_H */
diff --git a/arch/arm/mach-davinci/include/mach/debug-macro.S b/arch/arm/mach-davinci/include/mach/debug-macro.S
index de3fc2182b47..17ab5236da66 100644
--- a/arch/arm/mach-davinci/include/mach/debug-macro.S
+++ b/arch/arm/mach-davinci/include/mach/debug-macro.S
@@ -24,7 +24,15 @@
24 tst \rx, #1 @ MMU enabled? 24 tst \rx, #1 @ MMU enabled?
25 moveq \rx, #0x01000000 @ physical base address 25 moveq \rx, #0x01000000 @ physical base address
26 movne \rx, #0xfe000000 @ virtual base 26 movne \rx, #0xfe000000 @ virtual base
27#if defined(CONFIG_ARCH_DAVINCI_DA8XX) && defined(CONFIG_ARCH_DAVINCI_DMx)
28#error Cannot enable DaVinci and DA8XX platforms concurrently
29#elif defined(CONFIG_MACH_DAVINCI_DA830_EVM) || \
30 defined(CONFIG_MACH_DAVINCI_DA850_EVM)
31 orr \rx, \rx, #0x00d00000 @ physical base address
32 orr \rx, \rx, #0x0000d000 @ of UART 2
33#else
27 orr \rx, \rx, #0x00c20000 @ UART 0 34 orr \rx, \rx, #0x00c20000 @ UART 0
35#endif
28 .endm 36 .endm
29 37
30 .macro senduart,rd,rx 38 .macro senduart,rd,rx
diff --git a/arch/arm/mach-davinci/include/mach/dm355.h b/arch/arm/mach-davinci/include/mach/dm355.h
index 54903b72438e..85536d8e8336 100644
--- a/arch/arm/mach-davinci/include/mach/dm355.h
+++ b/arch/arm/mach-davinci/include/mach/dm355.h
@@ -12,11 +12,18 @@
12#define __ASM_ARCH_DM355_H 12#define __ASM_ARCH_DM355_H
13 13
14#include <mach/hardware.h> 14#include <mach/hardware.h>
15#include <mach/asp.h>
16#include <media/davinci/vpfe_capture.h>
17
18#define ASP1_TX_EVT_EN 1
19#define ASP1_RX_EVT_EN 2
15 20
16struct spi_board_info; 21struct spi_board_info;
17 22
18void __init dm355_init(void); 23void __init dm355_init(void);
19void dm355_init_spi0(unsigned chipselect_mask, 24void dm355_init_spi0(unsigned chipselect_mask,
20 struct spi_board_info *info, unsigned len); 25 struct spi_board_info *info, unsigned len);
26void __init dm355_init_asp1(u32 evt_enable, struct snd_platform_data *pdata);
27void dm355_set_vpfe_config(struct vpfe_config *cfg);
21 28
22#endif /* __ASM_ARCH_DM355_H */ 29#endif /* __ASM_ARCH_DM355_H */
diff --git a/arch/arm/mach-davinci/include/mach/dm365.h b/arch/arm/mach-davinci/include/mach/dm365.h
new file mode 100644
index 000000000000..09db4343bb4c
--- /dev/null
+++ b/arch/arm/mach-davinci/include/mach/dm365.h
@@ -0,0 +1,29 @@
1/*
2 * Copyright (C) 2009 Texas Instruments Incorporated
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation version 2.
7 *
8 * This program is distributed "as is" WITHOUT ANY WARRANTY of any
9 * kind, whether express or implied; without even the implied warranty
10 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 */
13#ifndef __ASM_ARCH_DM365_H
14#define __ASM_ARCH_DM665_H
15
16#include <linux/platform_device.h>
17#include <mach/hardware.h>
18#include <mach/emac.h>
19
20#define DM365_EMAC_BASE (0x01D07000)
21#define DM365_EMAC_CNTRL_OFFSET (0x0000)
22#define DM365_EMAC_CNTRL_MOD_OFFSET (0x3000)
23#define DM365_EMAC_CNTRL_RAM_OFFSET (0x1000)
24#define DM365_EMAC_MDIO_OFFSET (0x4000)
25#define DM365_EMAC_CNTRL_RAM_SIZE (0x2000)
26
27void __init dm365_init(void);
28
29#endif /* __ASM_ARCH_DM365_H */
diff --git a/arch/arm/mach-davinci/include/mach/dm644x.h b/arch/arm/mach-davinci/include/mach/dm644x.h
index 15d42b92a8c9..0efb73852c2c 100644
--- a/arch/arm/mach-davinci/include/mach/dm644x.h
+++ b/arch/arm/mach-davinci/include/mach/dm644x.h
@@ -25,6 +25,8 @@
25#include <linux/platform_device.h> 25#include <linux/platform_device.h>
26#include <mach/hardware.h> 26#include <mach/hardware.h>
27#include <mach/emac.h> 27#include <mach/emac.h>
28#include <mach/asp.h>
29#include <media/davinci/vpfe_capture.h>
28 30
29#define DM644X_EMAC_BASE (0x01C80000) 31#define DM644X_EMAC_BASE (0x01C80000)
30#define DM644X_EMAC_CNTRL_OFFSET (0x0000) 32#define DM644X_EMAC_CNTRL_OFFSET (0x0000)
@@ -34,5 +36,7 @@
34#define DM644X_EMAC_CNTRL_RAM_SIZE (0x2000) 36#define DM644X_EMAC_CNTRL_RAM_SIZE (0x2000)
35 37
36void __init dm644x_init(void); 38void __init dm644x_init(void);
39void __init dm644x_init_asp(struct snd_platform_data *pdata);
40void dm644x_set_vpfe_config(struct vpfe_config *cfg);
37 41
38#endif /* __ASM_ARCH_DM644X_H */ 42#endif /* __ASM_ARCH_DM644X_H */
diff --git a/arch/arm/mach-davinci/include/mach/dm646x.h b/arch/arm/mach-davinci/include/mach/dm646x.h
index 1fc764c8646e..8cec746ae9d2 100644
--- a/arch/arm/mach-davinci/include/mach/dm646x.h
+++ b/arch/arm/mach-davinci/include/mach/dm646x.h
@@ -13,6 +13,9 @@
13 13
14#include <mach/hardware.h> 14#include <mach/hardware.h>
15#include <mach/emac.h> 15#include <mach/emac.h>
16#include <mach/asp.h>
17#include <linux/i2c.h>
18#include <linux/videodev2.h>
16 19
17#define DM646X_EMAC_BASE (0x01C80000) 20#define DM646X_EMAC_BASE (0x01C80000)
18#define DM646X_EMAC_CNTRL_OFFSET (0x0000) 21#define DM646X_EMAC_CNTRL_OFFSET (0x0000)
@@ -21,6 +24,68 @@
21#define DM646X_EMAC_MDIO_OFFSET (0x4000) 24#define DM646X_EMAC_MDIO_OFFSET (0x4000)
22#define DM646X_EMAC_CNTRL_RAM_SIZE (0x2000) 25#define DM646X_EMAC_CNTRL_RAM_SIZE (0x2000)
23 26
27#define DM646X_ATA_REG_BASE (0x01C66000)
28
24void __init dm646x_init(void); 29void __init dm646x_init(void);
30void __init dm646x_init_ide(void);
31void __init dm646x_init_mcasp0(struct snd_platform_data *pdata);
32void __init dm646x_init_mcasp1(struct snd_platform_data *pdata);
33
34void dm646x_video_init(void);
35
36enum vpif_if_type {
37 VPIF_IF_BT656,
38 VPIF_IF_BT1120,
39 VPIF_IF_RAW_BAYER
40};
41
42struct vpif_interface {
43 enum vpif_if_type if_type;
44 unsigned hd_pol:1;
45 unsigned vd_pol:1;
46 unsigned fid_pol:1;
47};
48
49struct vpif_subdev_info {
50 const char *name;
51 struct i2c_board_info board_info;
52 u32 input;
53 u32 output;
54 unsigned can_route:1;
55 struct vpif_interface vpif_if;
56};
57
58struct vpif_display_config {
59 int (*set_clock)(int, int);
60 struct vpif_subdev_info *subdevinfo;
61 int subdev_count;
62 const char **output;
63 int output_count;
64 const char *card_name;
65};
66
67struct vpif_input {
68 struct v4l2_input input;
69 const char *subdev_name;
70};
71
72#define VPIF_CAPTURE_MAX_CHANNELS 2
73
74struct vpif_capture_chan_config {
75 const struct vpif_input *inputs;
76 int input_count;
77};
78
79struct vpif_capture_config {
80 int (*setup_input_channel_mode)(int);
81 int (*setup_input_path)(int, const char *);
82 struct vpif_capture_chan_config chan_config[VPIF_CAPTURE_MAX_CHANNELS];
83 struct vpif_subdev_info *subdev_info;
84 int subdev_count;
85 const char *card_name;
86};
87
88void dm646x_setup_vpif(struct vpif_display_config *,
89 struct vpif_capture_config *);
25 90
26#endif /* __ASM_ARCH_DM646X_H */ 91#endif /* __ASM_ARCH_DM646X_H */
diff --git a/arch/arm/mach-davinci/include/mach/edma.h b/arch/arm/mach-davinci/include/mach/edma.h
index 24a379239d7f..eb8bfd7925e7 100644
--- a/arch/arm/mach-davinci/include/mach/edma.h
+++ b/arch/arm/mach-davinci/include/mach/edma.h
@@ -139,6 +139,54 @@ struct edmacc_param {
139#define DAVINCI_DMA_PWM1 53 139#define DAVINCI_DMA_PWM1 53
140#define DAVINCI_DMA_PWM2 54 140#define DAVINCI_DMA_PWM2 54
141 141
142/* DA830 specific EDMA3 information */
143#define EDMA_DA830_NUM_DMACH 32
144#define EDMA_DA830_NUM_TCC 32
145#define EDMA_DA830_NUM_PARAMENTRY 128
146#define EDMA_DA830_NUM_EVQUE 2
147#define EDMA_DA830_NUM_TC 2
148#define EDMA_DA830_CHMAP_EXIST 0
149#define EDMA_DA830_NUM_REGIONS 4
150#define DA830_DMACH2EVENT_MAP0 0x000FC03Fu
151#define DA830_DMACH2EVENT_MAP1 0x00000000u
152#define DA830_EDMA_ARM_OWN 0x30FFCCFFu
153
154/* DA830 specific EDMA3 Events Information */
155enum DA830_edma_ch {
156 DA830_DMACH_MCASP0_RX,
157 DA830_DMACH_MCASP0_TX,
158 DA830_DMACH_MCASP1_RX,
159 DA830_DMACH_MCASP1_TX,
160 DA830_DMACH_MCASP2_RX,
161 DA830_DMACH_MCASP2_TX,
162 DA830_DMACH_GPIO_BNK0INT,
163 DA830_DMACH_GPIO_BNK1INT,
164 DA830_DMACH_UART0_RX,
165 DA830_DMACH_UART0_TX,
166 DA830_DMACH_TMR64P0_EVTOUT12,
167 DA830_DMACH_TMR64P0_EVTOUT34,
168 DA830_DMACH_UART1_RX,
169 DA830_DMACH_UART1_TX,
170 DA830_DMACH_SPI0_RX,
171 DA830_DMACH_SPI0_TX,
172 DA830_DMACH_MMCSD_RX,
173 DA830_DMACH_MMCSD_TX,
174 DA830_DMACH_SPI1_RX,
175 DA830_DMACH_SPI1_TX,
176 DA830_DMACH_DMAX_EVTOUT6,
177 DA830_DMACH_DMAX_EVTOUT7,
178 DA830_DMACH_GPIO_BNK2INT,
179 DA830_DMACH_GPIO_BNK3INT,
180 DA830_DMACH_I2C0_RX,
181 DA830_DMACH_I2C0_TX,
182 DA830_DMACH_I2C1_RX,
183 DA830_DMACH_I2C1_TX,
184 DA830_DMACH_GPIO_BNK4INT,
185 DA830_DMACH_GPIO_BNK5INT,
186 DA830_DMACH_UART2_RX,
187 DA830_DMACH_UART2_TX
188};
189
142/*ch_status paramater of callback function possible values*/ 190/*ch_status paramater of callback function possible values*/
143#define DMA_COMPLETE 1 191#define DMA_COMPLETE 1
144#define DMA_CC_ERROR 2 192#define DMA_CC_ERROR 2
@@ -162,6 +210,8 @@ enum fifo_width {
162enum dma_event_q { 210enum dma_event_q {
163 EVENTQ_0 = 0, 211 EVENTQ_0 = 0,
164 EVENTQ_1 = 1, 212 EVENTQ_1 = 1,
213 EVENTQ_2 = 2,
214 EVENTQ_3 = 3,
165 EVENTQ_DEFAULT = -1 215 EVENTQ_DEFAULT = -1
166}; 216};
167 217
@@ -170,8 +220,15 @@ enum sync_dimension {
170 ABSYNC = 1 220 ABSYNC = 1
171}; 221};
172 222
223#define EDMA_CTLR_CHAN(ctlr, chan) (((ctlr) << 16) | (chan))
224#define EDMA_CTLR(i) ((i) >> 16)
225#define EDMA_CHAN_SLOT(i) ((i) & 0xffff)
226
173#define EDMA_CHANNEL_ANY -1 /* for edma_alloc_channel() */ 227#define EDMA_CHANNEL_ANY -1 /* for edma_alloc_channel() */
174#define EDMA_SLOT_ANY -1 /* for edma_alloc_slot() */ 228#define EDMA_SLOT_ANY -1 /* for edma_alloc_slot() */
229#define EDMA_CONT_PARAMS_ANY 1001
230#define EDMA_CONT_PARAMS_FIXED_EXACT 1002
231#define EDMA_CONT_PARAMS_FIXED_NOT_EXACT 1003
175 232
176/* alloc/free DMA channels and their dedicated parameter RAM slots */ 233/* alloc/free DMA channels and their dedicated parameter RAM slots */
177int edma_alloc_channel(int channel, 234int edma_alloc_channel(int channel,
@@ -180,9 +237,13 @@ int edma_alloc_channel(int channel,
180void edma_free_channel(unsigned channel); 237void edma_free_channel(unsigned channel);
181 238
182/* alloc/free parameter RAM slots */ 239/* alloc/free parameter RAM slots */
183int edma_alloc_slot(int slot); 240int edma_alloc_slot(unsigned ctlr, int slot);
184void edma_free_slot(unsigned slot); 241void edma_free_slot(unsigned slot);
185 242
243/* alloc/free a set of contiguous parameter RAM slots */
244int edma_alloc_cont_slots(unsigned ctlr, unsigned int id, int slot, int count);
245int edma_free_cont_slots(unsigned slot, int count);
246
186/* calls that operate on part of a parameter RAM slot */ 247/* calls that operate on part of a parameter RAM slot */
187void edma_set_src(unsigned slot, dma_addr_t src_port, 248void edma_set_src(unsigned slot, dma_addr_t src_port,
188 enum address_mode mode, enum fifo_width); 249 enum address_mode mode, enum fifo_width);
@@ -216,9 +277,13 @@ struct edma_soc_info {
216 unsigned n_region; 277 unsigned n_region;
217 unsigned n_slot; 278 unsigned n_slot;
218 unsigned n_tc; 279 unsigned n_tc;
280 unsigned n_cc;
281 enum dma_event_q default_queue;
219 282
220 /* list of channels with no even trigger; terminated by "-1" */ 283 /* list of channels with no even trigger; terminated by "-1" */
221 const s8 *noevent; 284 const s8 *noevent;
285 const s8 (*queue_tc_mapping)[2];
286 const s8 (*queue_priority_mapping)[2];
222}; 287};
223 288
224#endif 289#endif
diff --git a/arch/arm/mach-davinci/include/mach/gpio.h b/arch/arm/mach-davinci/include/mach/gpio.h
index ae0745568316..f3b8ef878158 100644
--- a/arch/arm/mach-davinci/include/mach/gpio.h
+++ b/arch/arm/mach-davinci/include/mach/gpio.h
@@ -42,6 +42,9 @@
42 */ 42 */
43#define GPIO(X) (X) /* 0 <= X <= (DAVINCI_N_GPIO - 1) */ 43#define GPIO(X) (X) /* 0 <= X <= (DAVINCI_N_GPIO - 1) */
44 44
45/* Convert GPIO signal to GPIO pin number */
46#define GPIO_TO_PIN(bank, gpio) (16 * (bank) + (gpio))
47
45struct gpio_controller { 48struct gpio_controller {
46 u32 dir; 49 u32 dir;
47 u32 out_data; 50 u32 out_data;
@@ -78,6 +81,8 @@ __gpio_to_controller(unsigned gpio)
78 ptr = base + 0x60; 81 ptr = base + 0x60;
79 else if (gpio < 32 * 4) 82 else if (gpio < 32 * 4)
80 ptr = base + 0x88; 83 ptr = base + 0x88;
84 else if (gpio < 32 * 5)
85 ptr = base + 0xb0;
81 else 86 else
82 ptr = NULL; 87 ptr = NULL;
83 return ptr; 88 return ptr;
@@ -142,15 +147,13 @@ static inline int gpio_cansleep(unsigned gpio)
142 147
143static inline int gpio_to_irq(unsigned gpio) 148static inline int gpio_to_irq(unsigned gpio)
144{ 149{
145 if (gpio >= DAVINCI_N_GPIO) 150 return __gpio_to_irq(gpio);
146 return -EINVAL;
147 return davinci_soc_info.intc_irq_num + gpio;
148} 151}
149 152
150static inline int irq_to_gpio(unsigned irq) 153static inline int irq_to_gpio(unsigned irq)
151{ 154{
152 /* caller guarantees gpio_to_irq() succeeded */ 155 /* don't support the reverse mapping */
153 return irq - davinci_soc_info.intc_irq_num; 156 return -ENOSYS;
154} 157}
155 158
156#endif /* __DAVINCI_GPIO_H */ 159#endif /* __DAVINCI_GPIO_H */
diff --git a/arch/arm/mach-davinci/include/mach/hardware.h b/arch/arm/mach-davinci/include/mach/hardware.h
index 48c77934d519..41c89386e39b 100644
--- a/arch/arm/mach-davinci/include/mach/hardware.h
+++ b/arch/arm/mach-davinci/include/mach/hardware.h
@@ -24,4 +24,21 @@
24/* System control register offsets */ 24/* System control register offsets */
25#define DM64XX_VDD3P3V_PWDN 0x48 25#define DM64XX_VDD3P3V_PWDN 0x48
26 26
27/*
28 * I/O mapping
29 */
30#define IO_PHYS 0x01c00000
31#define IO_OFFSET 0xfd000000 /* Virtual IO = 0xfec00000 */
32#define IO_SIZE 0x00400000
33#define IO_VIRT (IO_PHYS + IO_OFFSET)
34#define io_v2p(va) ((va) - IO_OFFSET)
35#define __IO_ADDRESS(x) ((x) + IO_OFFSET)
36#define IO_ADDRESS(pa) IOMEM(__IO_ADDRESS(pa))
37
38#ifdef __ASSEMBLER__
39#define IOMEM(x) x
40#else
41#define IOMEM(x) ((void __force __iomem *)(x))
42#endif
43
27#endif /* __ASM_ARCH_HARDWARE_H */ 44#endif /* __ASM_ARCH_HARDWARE_H */
diff --git a/arch/arm/mach-davinci/include/mach/io.h b/arch/arm/mach-davinci/include/mach/io.h
index 2479785405af..62b0a90309ad 100644
--- a/arch/arm/mach-davinci/include/mach/io.h
+++ b/arch/arm/mach-davinci/include/mach/io.h
@@ -14,18 +14,6 @@
14#define IO_SPACE_LIMIT 0xffffffff 14#define IO_SPACE_LIMIT 0xffffffff
15 15
16/* 16/*
17 * ----------------------------------------------------------------------------
18 * I/O mapping
19 * ----------------------------------------------------------------------------
20 */
21#define IO_PHYS 0x01c00000
22#define IO_OFFSET 0xfd000000 /* Virtual IO = 0xfec00000 */
23#define IO_SIZE 0x00400000
24#define IO_VIRT (IO_PHYS + IO_OFFSET)
25#define io_v2p(va) ((va) - IO_OFFSET)
26#define __IO_ADDRESS(x) ((x) + IO_OFFSET)
27
28/*
29 * We don't actually have real ISA nor PCI buses, but there is so many 17 * We don't actually have real ISA nor PCI buses, but there is so many
30 * drivers out there that might just work if we fake them... 18 * drivers out there that might just work if we fake them...
31 */ 19 */
@@ -33,19 +21,12 @@
33#define __mem_pci(a) (a) 21#define __mem_pci(a) (a)
34#define __mem_isa(a) (a) 22#define __mem_isa(a) (a)
35 23
36#define IO_ADDRESS(pa) IOMEM(__IO_ADDRESS(pa)) 24#ifndef __ASSEMBLER__
37
38#ifdef __ASSEMBLER__
39#define IOMEM(x) x
40#else
41#define IOMEM(x) ((void __force __iomem *)(x))
42
43#define __arch_ioremap(p, s, t) davinci_ioremap(p, s, t) 25#define __arch_ioremap(p, s, t) davinci_ioremap(p, s, t)
44#define __arch_iounmap(v) davinci_iounmap(v) 26#define __arch_iounmap(v) davinci_iounmap(v)
45 27
46void __iomem *davinci_ioremap(unsigned long phys, size_t size, 28void __iomem *davinci_ioremap(unsigned long phys, size_t size,
47 unsigned int type); 29 unsigned int type);
48void davinci_iounmap(volatile void __iomem *addr); 30void davinci_iounmap(volatile void __iomem *addr);
49 31#endif
50#endif /* __ASSEMBLER__ */
51#endif /* __ASM_ARCH_IO_H */ 32#endif /* __ASM_ARCH_IO_H */
diff --git a/arch/arm/mach-davinci/include/mach/irqs.h b/arch/arm/mach-davinci/include/mach/irqs.h
index bc5d6aaa69a3..3c918a772619 100644
--- a/arch/arm/mach-davinci/include/mach/irqs.h
+++ b/arch/arm/mach-davinci/include/mach/irqs.h
@@ -99,9 +99,6 @@
99#define IRQ_EMUINT 63 99#define IRQ_EMUINT 63
100 100
101#define DAVINCI_N_AINTC_IRQ 64 101#define DAVINCI_N_AINTC_IRQ 64
102#define DAVINCI_N_GPIO 104
103
104#define NR_IRQS (DAVINCI_N_AINTC_IRQ + DAVINCI_N_GPIO)
105 102
106#define ARCH_TIMER_IRQ IRQ_TINT1_TINT34 103#define ARCH_TIMER_IRQ IRQ_TINT1_TINT34
107 104
@@ -206,4 +203,206 @@
206#define IRQ_DM355_GPIOBNK5 59 203#define IRQ_DM355_GPIOBNK5 59
207#define IRQ_DM355_GPIOBNK6 60 204#define IRQ_DM355_GPIOBNK6 60
208 205
206/* DaVinci DM365-specific Interrupts */
207#define IRQ_DM365_INSFINT 7
208#define IRQ_DM365_IMXINT1 8
209#define IRQ_DM365_IMXINT0 10
210#define IRQ_DM365_KLD_ARMINT 10
211#define IRQ_DM365_IMCOPINT 11
212#define IRQ_DM365_RTOINT 13
213#define IRQ_DM365_TINT5 14
214#define IRQ_DM365_TINT6 15
215#define IRQ_DM365_SPINT2_1 21
216#define IRQ_DM365_TINT7 22
217#define IRQ_DM365_SDIOINT0 23
218#define IRQ_DM365_MMCINT1 27
219#define IRQ_DM365_PWMINT3 28
220#define IRQ_DM365_SDIOINT1 31
221#define IRQ_DM365_SPIINT0_0 42
222#define IRQ_DM365_SPIINT3_0 43
223#define IRQ_DM365_GPIO0 44
224#define IRQ_DM365_GPIO1 45
225#define IRQ_DM365_GPIO2 46
226#define IRQ_DM365_GPIO3 47
227#define IRQ_DM365_GPIO4 48
228#define IRQ_DM365_GPIO5 49
229#define IRQ_DM365_GPIO6 50
230#define IRQ_DM365_GPIO7 51
231#define IRQ_DM365_EMAC_RXTHRESH 52
232#define IRQ_DM365_EMAC_RXPULSE 53
233#define IRQ_DM365_EMAC_TXPULSE 54
234#define IRQ_DM365_EMAC_MISCPULSE 55
235#define IRQ_DM365_GPIO12 56
236#define IRQ_DM365_GPIO13 57
237#define IRQ_DM365_GPIO14 58
238#define IRQ_DM365_GPIO15 59
239#define IRQ_DM365_ADCINT 59
240#define IRQ_DM365_KEYINT 60
241#define IRQ_DM365_TCERRINT2 61
242#define IRQ_DM365_TCERRINT3 62
243#define IRQ_DM365_EMUINT 63
244
245/* DA8XX interrupts */
246#define IRQ_DA8XX_COMMTX 0
247#define IRQ_DA8XX_COMMRX 1
248#define IRQ_DA8XX_NINT 2
249#define IRQ_DA8XX_EVTOUT0 3
250#define IRQ_DA8XX_EVTOUT1 4
251#define IRQ_DA8XX_EVTOUT2 5
252#define IRQ_DA8XX_EVTOUT3 6
253#define IRQ_DA8XX_EVTOUT4 7
254#define IRQ_DA8XX_EVTOUT5 8
255#define IRQ_DA8XX_EVTOUT6 9
256#define IRQ_DA8XX_EVTOUT7 10
257#define IRQ_DA8XX_CCINT0 11
258#define IRQ_DA8XX_CCERRINT 12
259#define IRQ_DA8XX_TCERRINT0 13
260#define IRQ_DA8XX_AEMIFINT 14
261#define IRQ_DA8XX_I2CINT0 15
262#define IRQ_DA8XX_MMCSDINT0 16
263#define IRQ_DA8XX_MMCSDINT1 17
264#define IRQ_DA8XX_ALLINT0 18
265#define IRQ_DA8XX_RTC 19
266#define IRQ_DA8XX_SPINT0 20
267#define IRQ_DA8XX_TINT12_0 21
268#define IRQ_DA8XX_TINT34_0 22
269#define IRQ_DA8XX_TINT12_1 23
270#define IRQ_DA8XX_TINT34_1 24
271#define IRQ_DA8XX_UARTINT0 25
272#define IRQ_DA8XX_KEYMGRINT 26
273#define IRQ_DA8XX_SECINT 26
274#define IRQ_DA8XX_SECKEYERR 26
275#define IRQ_DA8XX_CHIPINT0 28
276#define IRQ_DA8XX_CHIPINT1 29
277#define IRQ_DA8XX_CHIPINT2 30
278#define IRQ_DA8XX_CHIPINT3 31
279#define IRQ_DA8XX_TCERRINT1 32
280#define IRQ_DA8XX_C0_RX_THRESH_PULSE 33
281#define IRQ_DA8XX_C0_RX_PULSE 34
282#define IRQ_DA8XX_C0_TX_PULSE 35
283#define IRQ_DA8XX_C0_MISC_PULSE 36
284#define IRQ_DA8XX_C1_RX_THRESH_PULSE 37
285#define IRQ_DA8XX_C1_RX_PULSE 38
286#define IRQ_DA8XX_C1_TX_PULSE 39
287#define IRQ_DA8XX_C1_MISC_PULSE 40
288#define IRQ_DA8XX_MEMERR 41
289#define IRQ_DA8XX_GPIO0 42
290#define IRQ_DA8XX_GPIO1 43
291#define IRQ_DA8XX_GPIO2 44
292#define IRQ_DA8XX_GPIO3 45
293#define IRQ_DA8XX_GPIO4 46
294#define IRQ_DA8XX_GPIO5 47
295#define IRQ_DA8XX_GPIO6 48
296#define IRQ_DA8XX_GPIO7 49
297#define IRQ_DA8XX_GPIO8 50
298#define IRQ_DA8XX_I2CINT1 51
299#define IRQ_DA8XX_LCDINT 52
300#define IRQ_DA8XX_UARTINT1 53
301#define IRQ_DA8XX_MCASPINT 54
302#define IRQ_DA8XX_ALLINT1 55
303#define IRQ_DA8XX_SPINT1 56
304#define IRQ_DA8XX_UHPI_INT1 57
305#define IRQ_DA8XX_USB_INT 58
306#define IRQ_DA8XX_IRQN 59
307#define IRQ_DA8XX_RWAKEUP 60
308#define IRQ_DA8XX_UARTINT2 61
309#define IRQ_DA8XX_DFTSSINT 62
310#define IRQ_DA8XX_EHRPWM0 63
311#define IRQ_DA8XX_EHRPWM0TZ 64
312#define IRQ_DA8XX_EHRPWM1 65
313#define IRQ_DA8XX_EHRPWM1TZ 66
314#define IRQ_DA8XX_ECAP0 69
315#define IRQ_DA8XX_ECAP1 70
316#define IRQ_DA8XX_ECAP2 71
317#define IRQ_DA8XX_ARMCLKSTOPREQ 90
318
319/* DA830 specific interrupts */
320#define IRQ_DA830_MPUERR 27
321#define IRQ_DA830_IOPUERR 27
322#define IRQ_DA830_BOOTCFGERR 27
323#define IRQ_DA830_EHRPWM2 67
324#define IRQ_DA830_EHRPWM2TZ 68
325#define IRQ_DA830_EQEP0 72
326#define IRQ_DA830_EQEP1 73
327#define IRQ_DA830_T12CMPINT0_0 74
328#define IRQ_DA830_T12CMPINT1_0 75
329#define IRQ_DA830_T12CMPINT2_0 76
330#define IRQ_DA830_T12CMPINT3_0 77
331#define IRQ_DA830_T12CMPINT4_0 78
332#define IRQ_DA830_T12CMPINT5_0 79
333#define IRQ_DA830_T12CMPINT6_0 80
334#define IRQ_DA830_T12CMPINT7_0 81
335#define IRQ_DA830_T12CMPINT0_1 82
336#define IRQ_DA830_T12CMPINT1_1 83
337#define IRQ_DA830_T12CMPINT2_1 84
338#define IRQ_DA830_T12CMPINT3_1 85
339#define IRQ_DA830_T12CMPINT4_1 86
340#define IRQ_DA830_T12CMPINT5_1 87
341#define IRQ_DA830_T12CMPINT6_1 88
342#define IRQ_DA830_T12CMPINT7_1 89
343
344#define DA830_N_CP_INTC_IRQ 96
345
346/* DA850 speicific interrupts */
347#define IRQ_DA850_MPUADDRERR0 27
348#define IRQ_DA850_MPUPROTERR0 27
349#define IRQ_DA850_IOPUADDRERR0 27
350#define IRQ_DA850_IOPUPROTERR0 27
351#define IRQ_DA850_IOPUADDRERR1 27
352#define IRQ_DA850_IOPUPROTERR1 27
353#define IRQ_DA850_IOPUADDRERR2 27
354#define IRQ_DA850_IOPUPROTERR2 27
355#define IRQ_DA850_BOOTCFG_ADDR_ERR 27
356#define IRQ_DA850_BOOTCFG_PROT_ERR 27
357#define IRQ_DA850_MPUADDRERR1 27
358#define IRQ_DA850_MPUPROTERR1 27
359#define IRQ_DA850_IOPUADDRERR3 27
360#define IRQ_DA850_IOPUPROTERR3 27
361#define IRQ_DA850_IOPUADDRERR4 27
362#define IRQ_DA850_IOPUPROTERR4 27
363#define IRQ_DA850_IOPUADDRERR5 27
364#define IRQ_DA850_IOPUPROTERR5 27
365#define IRQ_DA850_MIOPU_BOOTCFG_ERR 27
366#define IRQ_DA850_SATAINT 67
367#define IRQ_DA850_TINT12_2 68
368#define IRQ_DA850_TINT34_2 68
369#define IRQ_DA850_TINTALL_2 68
370#define IRQ_DA850_MMCSDINT0_1 72
371#define IRQ_DA850_MMCSDINT1_1 73
372#define IRQ_DA850_T12CMPINT0_2 74
373#define IRQ_DA850_T12CMPINT1_2 75
374#define IRQ_DA850_T12CMPINT2_2 76
375#define IRQ_DA850_T12CMPINT3_2 77
376#define IRQ_DA850_T12CMPINT4_2 78
377#define IRQ_DA850_T12CMPINT5_2 79
378#define IRQ_DA850_T12CMPINT6_2 80
379#define IRQ_DA850_T12CMPINT7_2 81
380#define IRQ_DA850_T12CMPINT0_3 82
381#define IRQ_DA850_T12CMPINT1_3 83
382#define IRQ_DA850_T12CMPINT2_3 84
383#define IRQ_DA850_T12CMPINT3_3 85
384#define IRQ_DA850_T12CMPINT4_3 86
385#define IRQ_DA850_T12CMPINT5_3 87
386#define IRQ_DA850_T12CMPINT6_3 88
387#define IRQ_DA850_T12CMPINT7_3 89
388#define IRQ_DA850_RPIINT 91
389#define IRQ_DA850_VPIFINT 92
390#define IRQ_DA850_CCINT1 93
391#define IRQ_DA850_CCERRINT1 94
392#define IRQ_DA850_TCERRINT2 95
393#define IRQ_DA850_TINT12_3 96
394#define IRQ_DA850_TINT34_3 96
395#define IRQ_DA850_TINTALL_3 96
396#define IRQ_DA850_MCBSP0RINT 97
397#define IRQ_DA850_MCBSP0XINT 98
398#define IRQ_DA850_MCBSP1RINT 99
399#define IRQ_DA850_MCBSP1XINT 100
400
401#define DA850_N_CP_INTC_IRQ 101
402
403/* da850 currently has the most gpio pins (144) */
404#define DAVINCI_N_GPIO 144
405/* da850 currently has the most irqs so use DA850_N_CP_INTC_IRQ */
406#define NR_IRQS (DA850_N_CP_INTC_IRQ + DAVINCI_N_GPIO)
407
209#endif /* __ASM_ARCH_IRQS_H */ 408#endif /* __ASM_ARCH_IRQS_H */
diff --git a/arch/arm/mach-davinci/include/mach/memory.h b/arch/arm/mach-davinci/include/mach/memory.h
index c712c7cdf38f..80309aed534a 100644
--- a/arch/arm/mach-davinci/include/mach/memory.h
+++ b/arch/arm/mach-davinci/include/mach/memory.h
@@ -20,9 +20,16 @@
20/************************************************************************** 20/**************************************************************************
21 * Definitions 21 * Definitions
22 **************************************************************************/ 22 **************************************************************************/
23#define DAVINCI_DDR_BASE 0x80000000 23#define DAVINCI_DDR_BASE 0x80000000
24#define DA8XX_DDR_BASE 0xc0000000
24 25
26#if defined(CONFIG_ARCH_DAVINCI_DA8XX) && defined(CONFIG_ARCH_DAVINCI_DMx)
27#error Cannot enable DaVinci and DA8XX platforms concurrently
28#elif defined(CONFIG_ARCH_DAVINCI_DA8XX)
29#define PHYS_OFFSET DA8XX_DDR_BASE
30#else
25#define PHYS_OFFSET DAVINCI_DDR_BASE 31#define PHYS_OFFSET DAVINCI_DDR_BASE
32#endif
26 33
27/* 34/*
28 * Increase size of DMA-consistent memory region 35 * Increase size of DMA-consistent memory region
diff --git a/arch/arm/mach-davinci/include/mach/mux.h b/arch/arm/mach-davinci/include/mach/mux.h
index 27378458542f..bb84893a4e83 100644
--- a/arch/arm/mach-davinci/include/mach/mux.h
+++ b/arch/arm/mach-davinci/include/mach/mux.h
@@ -154,6 +154,737 @@ enum davinci_dm355_index {
154 DM355_EVT8_ASP1_TX, 154 DM355_EVT8_ASP1_TX,
155 DM355_EVT9_ASP1_RX, 155 DM355_EVT9_ASP1_RX,
156 DM355_EVT26_MMC0_RX, 156 DM355_EVT26_MMC0_RX,
157
158 /* Video Out */
159 DM355_VOUT_FIELD,
160 DM355_VOUT_FIELD_G70,
161 DM355_VOUT_HVSYNC,
162 DM355_VOUT_COUTL_EN,
163 DM355_VOUT_COUTH_EN,
164
165 /* Video In Pin Mux */
166 DM355_VIN_PCLK,
167 DM355_VIN_CAM_WEN,
168 DM355_VIN_CAM_VD,
169 DM355_VIN_CAM_HD,
170 DM355_VIN_YIN_EN,
171 DM355_VIN_CINL_EN,
172 DM355_VIN_CINH_EN,
173};
174
175enum davinci_dm365_index {
176 /* MMC/SD 0 */
177 DM365_MMCSD0,
178
179 /* MMC/SD 1 */
180 DM365_SD1_CLK,
181 DM365_SD1_CMD,
182 DM365_SD1_DATA3,
183 DM365_SD1_DATA2,
184 DM365_SD1_DATA1,
185 DM365_SD1_DATA0,
186
187 /* I2C */
188 DM365_I2C_SDA,
189 DM365_I2C_SCL,
190
191 /* AEMIF */
192 DM365_AEMIF_AR,
193 DM365_AEMIF_A3,
194 DM365_AEMIF_A7,
195 DM365_AEMIF_D15_8,
196 DM365_AEMIF_CE0,
197
198 /* ASP0 function */
199 DM365_MCBSP0_BDX,
200 DM365_MCBSP0_X,
201 DM365_MCBSP0_BFSX,
202 DM365_MCBSP0_BDR,
203 DM365_MCBSP0_R,
204 DM365_MCBSP0_BFSR,
205
206 /* SPI0 */
207 DM365_SPI0_SCLK,
208 DM365_SPI0_SDI,
209 DM365_SPI0_SDO,
210 DM365_SPI0_SDENA0,
211 DM365_SPI0_SDENA1,
212
213 /* UART */
214 DM365_UART0_RXD,
215 DM365_UART0_TXD,
216 DM365_UART1_RXD,
217 DM365_UART1_TXD,
218 DM365_UART1_RTS,
219 DM365_UART1_CTS,
220
221 /* EMAC */
222 DM365_EMAC_TX_EN,
223 DM365_EMAC_TX_CLK,
224 DM365_EMAC_COL,
225 DM365_EMAC_TXD3,
226 DM365_EMAC_TXD2,
227 DM365_EMAC_TXD1,
228 DM365_EMAC_TXD0,
229 DM365_EMAC_RXD3,
230 DM365_EMAC_RXD2,
231 DM365_EMAC_RXD1,
232 DM365_EMAC_RXD0,
233 DM365_EMAC_RX_CLK,
234 DM365_EMAC_RX_DV,
235 DM365_EMAC_RX_ER,
236 DM365_EMAC_CRS,
237 DM365_EMAC_MDIO,
238 DM365_EMAC_MDCLK,
239
240 /* Keypad */
241 DM365_KEYPAD,
242
243 /* PWM */
244 DM365_PWM0,
245 DM365_PWM0_G23,
246 DM365_PWM1,
247 DM365_PWM1_G25,
248 DM365_PWM2_G87,
249 DM365_PWM2_G88,
250 DM365_PWM2_G89,
251 DM365_PWM2_G90,
252 DM365_PWM3_G80,
253 DM365_PWM3_G81,
254 DM365_PWM3_G85,
255 DM365_PWM3_G86,
256
257 /* SPI1 */
258 DM365_SPI1_SCLK,
259 DM365_SPI1_SDO,
260 DM365_SPI1_SDI,
261 DM365_SPI1_SDENA0,
262 DM365_SPI1_SDENA1,
263
264 /* SPI2 */
265 DM365_SPI2_SCLK,
266 DM365_SPI2_SDO,
267 DM365_SPI2_SDI,
268 DM365_SPI2_SDENA0,
269 DM365_SPI2_SDENA1,
270
271 /* SPI3 */
272 DM365_SPI3_SCLK,
273 DM365_SPI3_SDO,
274 DM365_SPI3_SDI,
275 DM365_SPI3_SDENA0,
276 DM365_SPI3_SDENA1,
277
278 /* SPI4 */
279 DM365_SPI4_SCLK,
280 DM365_SPI4_SDO,
281 DM365_SPI4_SDI,
282 DM365_SPI4_SDENA0,
283 DM365_SPI4_SDENA1,
284
285 /* GPIO */
286 DM365_GPIO20,
287 DM365_GPIO33,
288 DM365_GPIO40,
289
290 /* Video */
291 DM365_VOUT_FIELD,
292 DM365_VOUT_FIELD_G81,
293 DM365_VOUT_HVSYNC,
294 DM365_VOUT_COUTL_EN,
295 DM365_VOUT_COUTH_EN,
296 DM365_VIN_CAM_WEN,
297 DM365_VIN_CAM_VD,
298 DM365_VIN_CAM_HD,
299 DM365_VIN_YIN4_7_EN,
300 DM365_VIN_YIN0_3_EN,
301
302 /* IRQ muxing */
303 DM365_INT_EDMA_CC,
304 DM365_INT_EDMA_TC0_ERR,
305 DM365_INT_EDMA_TC1_ERR,
306 DM365_INT_EDMA_TC2_ERR,
307 DM365_INT_EDMA_TC3_ERR,
308 DM365_INT_PRTCSS,
309 DM365_INT_EMAC_RXTHRESH,
310 DM365_INT_EMAC_RXPULSE,
311 DM365_INT_EMAC_TXPULSE,
312 DM365_INT_EMAC_MISCPULSE,
313 DM365_INT_IMX0_ENABLE,
314 DM365_INT_IMX0_DISABLE,
315 DM365_INT_HDVICP_ENABLE,
316 DM365_INT_HDVICP_DISABLE,
317 DM365_INT_IMX1_ENABLE,
318 DM365_INT_IMX1_DISABLE,
319 DM365_INT_NSF_ENABLE,
320 DM365_INT_NSF_DISABLE,
321
322 /* EDMA event muxing */
323 DM365_EVT2_ASP_TX,
324 DM365_EVT3_ASP_RX,
325 DM365_EVT26_MMC0_RX,
326};
327
328enum da830_index {
329 DA830_GPIO7_14,
330 DA830_RTCK,
331 DA830_GPIO7_15,
332 DA830_EMU_0,
333 DA830_EMB_SDCKE,
334 DA830_EMB_CLK_GLUE,
335 DA830_EMB_CLK,
336 DA830_NEMB_CS_0,
337 DA830_NEMB_CAS,
338 DA830_NEMB_RAS,
339 DA830_NEMB_WE,
340 DA830_EMB_BA_1,
341 DA830_EMB_BA_0,
342 DA830_EMB_A_0,
343 DA830_EMB_A_1,
344 DA830_EMB_A_2,
345 DA830_EMB_A_3,
346 DA830_EMB_A_4,
347 DA830_EMB_A_5,
348 DA830_GPIO7_0,
349 DA830_GPIO7_1,
350 DA830_GPIO7_2,
351 DA830_GPIO7_3,
352 DA830_GPIO7_4,
353 DA830_GPIO7_5,
354 DA830_GPIO7_6,
355 DA830_GPIO7_7,
356 DA830_EMB_A_6,
357 DA830_EMB_A_7,
358 DA830_EMB_A_8,
359 DA830_EMB_A_9,
360 DA830_EMB_A_10,
361 DA830_EMB_A_11,
362 DA830_EMB_A_12,
363 DA830_EMB_D_31,
364 DA830_GPIO7_8,
365 DA830_GPIO7_9,
366 DA830_GPIO7_10,
367 DA830_GPIO7_11,
368 DA830_GPIO7_12,
369 DA830_GPIO7_13,
370 DA830_GPIO3_13,
371 DA830_EMB_D_30,
372 DA830_EMB_D_29,
373 DA830_EMB_D_28,
374 DA830_EMB_D_27,
375 DA830_EMB_D_26,
376 DA830_EMB_D_25,
377 DA830_EMB_D_24,
378 DA830_EMB_D_23,
379 DA830_EMB_D_22,
380 DA830_EMB_D_21,
381 DA830_EMB_D_20,
382 DA830_EMB_D_19,
383 DA830_EMB_D_18,
384 DA830_EMB_D_17,
385 DA830_EMB_D_16,
386 DA830_NEMB_WE_DQM_3,
387 DA830_NEMB_WE_DQM_2,
388 DA830_EMB_D_0,
389 DA830_EMB_D_1,
390 DA830_EMB_D_2,
391 DA830_EMB_D_3,
392 DA830_EMB_D_4,
393 DA830_EMB_D_5,
394 DA830_EMB_D_6,
395 DA830_GPIO6_0,
396 DA830_GPIO6_1,
397 DA830_GPIO6_2,
398 DA830_GPIO6_3,
399 DA830_GPIO6_4,
400 DA830_GPIO6_5,
401 DA830_GPIO6_6,
402 DA830_EMB_D_7,
403 DA830_EMB_D_8,
404 DA830_EMB_D_9,
405 DA830_EMB_D_10,
406 DA830_EMB_D_11,
407 DA830_EMB_D_12,
408 DA830_EMB_D_13,
409 DA830_EMB_D_14,
410 DA830_GPIO6_7,
411 DA830_GPIO6_8,
412 DA830_GPIO6_9,
413 DA830_GPIO6_10,
414 DA830_GPIO6_11,
415 DA830_GPIO6_12,
416 DA830_GPIO6_13,
417 DA830_GPIO6_14,
418 DA830_EMB_D_15,
419 DA830_NEMB_WE_DQM_1,
420 DA830_NEMB_WE_DQM_0,
421 DA830_SPI0_SOMI_0,
422 DA830_SPI0_SIMO_0,
423 DA830_SPI0_CLK,
424 DA830_NSPI0_ENA,
425 DA830_NSPI0_SCS_0,
426 DA830_EQEP0I,
427 DA830_EQEP0S,
428 DA830_EQEP1I,
429 DA830_NUART0_CTS,
430 DA830_NUART0_RTS,
431 DA830_EQEP0A,
432 DA830_EQEP0B,
433 DA830_GPIO6_15,
434 DA830_GPIO5_14,
435 DA830_GPIO5_15,
436 DA830_GPIO5_0,
437 DA830_GPIO5_1,
438 DA830_GPIO5_2,
439 DA830_GPIO5_3,
440 DA830_GPIO5_4,
441 DA830_SPI1_SOMI_0,
442 DA830_SPI1_SIMO_0,
443 DA830_SPI1_CLK,
444 DA830_UART0_RXD,
445 DA830_UART0_TXD,
446 DA830_AXR1_10,
447 DA830_AXR1_11,
448 DA830_NSPI1_ENA,
449 DA830_I2C1_SCL,
450 DA830_I2C1_SDA,
451 DA830_EQEP1S,
452 DA830_I2C0_SDA,
453 DA830_I2C0_SCL,
454 DA830_UART2_RXD,
455 DA830_TM64P0_IN12,
456 DA830_TM64P0_OUT12,
457 DA830_GPIO5_5,
458 DA830_GPIO5_6,
459 DA830_GPIO5_7,
460 DA830_GPIO5_8,
461 DA830_GPIO5_9,
462 DA830_GPIO5_10,
463 DA830_GPIO5_11,
464 DA830_GPIO5_12,
465 DA830_NSPI1_SCS_0,
466 DA830_USB0_DRVVBUS,
467 DA830_AHCLKX0,
468 DA830_ACLKX0,
469 DA830_AFSX0,
470 DA830_AHCLKR0,
471 DA830_ACLKR0,
472 DA830_AFSR0,
473 DA830_UART2_TXD,
474 DA830_AHCLKX2,
475 DA830_ECAP0_APWM0,
476 DA830_RMII_MHZ_50_CLK,
477 DA830_ECAP1_APWM1,
478 DA830_USB_REFCLKIN,
479 DA830_GPIO5_13,
480 DA830_GPIO4_15,
481 DA830_GPIO2_11,
482 DA830_GPIO2_12,
483 DA830_GPIO2_13,
484 DA830_GPIO2_14,
485 DA830_GPIO2_15,
486 DA830_GPIO3_12,
487 DA830_AMUTE0,
488 DA830_AXR0_0,
489 DA830_AXR0_1,
490 DA830_AXR0_2,
491 DA830_AXR0_3,
492 DA830_AXR0_4,
493 DA830_AXR0_5,
494 DA830_AXR0_6,
495 DA830_RMII_TXD_0,
496 DA830_RMII_TXD_1,
497 DA830_RMII_TXEN,
498 DA830_RMII_CRS_DV,
499 DA830_RMII_RXD_0,
500 DA830_RMII_RXD_1,
501 DA830_RMII_RXER,
502 DA830_AFSR2,
503 DA830_ACLKX2,
504 DA830_AXR2_3,
505 DA830_AXR2_2,
506 DA830_AXR2_1,
507 DA830_AFSX2,
508 DA830_ACLKR2,
509 DA830_NRESETOUT,
510 DA830_GPIO3_0,
511 DA830_GPIO3_1,
512 DA830_GPIO3_2,
513 DA830_GPIO3_3,
514 DA830_GPIO3_4,
515 DA830_GPIO3_5,
516 DA830_GPIO3_6,
517 DA830_AXR0_7,
518 DA830_AXR0_8,
519 DA830_UART1_RXD,
520 DA830_UART1_TXD,
521 DA830_AXR0_11,
522 DA830_AHCLKX1,
523 DA830_ACLKX1,
524 DA830_AFSX1,
525 DA830_MDIO_CLK,
526 DA830_MDIO_D,
527 DA830_AXR0_9,
528 DA830_AXR0_10,
529 DA830_EPWM0B,
530 DA830_EPWM0A,
531 DA830_EPWMSYNCI,
532 DA830_AXR2_0,
533 DA830_EPWMSYNC0,
534 DA830_GPIO3_7,
535 DA830_GPIO3_8,
536 DA830_GPIO3_9,
537 DA830_GPIO3_10,
538 DA830_GPIO3_11,
539 DA830_GPIO3_14,
540 DA830_GPIO3_15,
541 DA830_GPIO4_10,
542 DA830_AHCLKR1,
543 DA830_ACLKR1,
544 DA830_AFSR1,
545 DA830_AMUTE1,
546 DA830_AXR1_0,
547 DA830_AXR1_1,
548 DA830_AXR1_2,
549 DA830_AXR1_3,
550 DA830_ECAP2_APWM2,
551 DA830_EHRPWMGLUETZ,
552 DA830_EQEP1A,
553 DA830_GPIO4_11,
554 DA830_GPIO4_12,
555 DA830_GPIO4_13,
556 DA830_GPIO4_14,
557 DA830_GPIO4_0,
558 DA830_GPIO4_1,
559 DA830_GPIO4_2,
560 DA830_GPIO4_3,
561 DA830_AXR1_4,
562 DA830_AXR1_5,
563 DA830_AXR1_6,
564 DA830_AXR1_7,
565 DA830_AXR1_8,
566 DA830_AXR1_9,
567 DA830_EMA_D_0,
568 DA830_EMA_D_1,
569 DA830_EQEP1B,
570 DA830_EPWM2B,
571 DA830_EPWM2A,
572 DA830_EPWM1B,
573 DA830_EPWM1A,
574 DA830_MMCSD_DAT_0,
575 DA830_MMCSD_DAT_1,
576 DA830_UHPI_HD_0,
577 DA830_UHPI_HD_1,
578 DA830_GPIO4_4,
579 DA830_GPIO4_5,
580 DA830_GPIO4_6,
581 DA830_GPIO4_7,
582 DA830_GPIO4_8,
583 DA830_GPIO4_9,
584 DA830_GPIO0_0,
585 DA830_GPIO0_1,
586 DA830_EMA_D_2,
587 DA830_EMA_D_3,
588 DA830_EMA_D_4,
589 DA830_EMA_D_5,
590 DA830_EMA_D_6,
591 DA830_EMA_D_7,
592 DA830_EMA_D_8,
593 DA830_EMA_D_9,
594 DA830_MMCSD_DAT_2,
595 DA830_MMCSD_DAT_3,
596 DA830_MMCSD_DAT_4,
597 DA830_MMCSD_DAT_5,
598 DA830_MMCSD_DAT_6,
599 DA830_MMCSD_DAT_7,
600 DA830_UHPI_HD_8,
601 DA830_UHPI_HD_9,
602 DA830_UHPI_HD_2,
603 DA830_UHPI_HD_3,
604 DA830_UHPI_HD_4,
605 DA830_UHPI_HD_5,
606 DA830_UHPI_HD_6,
607 DA830_UHPI_HD_7,
608 DA830_LCD_D_8,
609 DA830_LCD_D_9,
610 DA830_GPIO0_2,
611 DA830_GPIO0_3,
612 DA830_GPIO0_4,
613 DA830_GPIO0_5,
614 DA830_GPIO0_6,
615 DA830_GPIO0_7,
616 DA830_GPIO0_8,
617 DA830_GPIO0_9,
618 DA830_EMA_D_10,
619 DA830_EMA_D_11,
620 DA830_EMA_D_12,
621 DA830_EMA_D_13,
622 DA830_EMA_D_14,
623 DA830_EMA_D_15,
624 DA830_EMA_A_0,
625 DA830_EMA_A_1,
626 DA830_UHPI_HD_10,
627 DA830_UHPI_HD_11,
628 DA830_UHPI_HD_12,
629 DA830_UHPI_HD_13,
630 DA830_UHPI_HD_14,
631 DA830_UHPI_HD_15,
632 DA830_LCD_D_7,
633 DA830_MMCSD_CLK,
634 DA830_LCD_D_10,
635 DA830_LCD_D_11,
636 DA830_LCD_D_12,
637 DA830_LCD_D_13,
638 DA830_LCD_D_14,
639 DA830_LCD_D_15,
640 DA830_UHPI_HCNTL0,
641 DA830_GPIO0_10,
642 DA830_GPIO0_11,
643 DA830_GPIO0_12,
644 DA830_GPIO0_13,
645 DA830_GPIO0_14,
646 DA830_GPIO0_15,
647 DA830_GPIO1_0,
648 DA830_GPIO1_1,
649 DA830_EMA_A_2,
650 DA830_EMA_A_3,
651 DA830_EMA_A_4,
652 DA830_EMA_A_5,
653 DA830_EMA_A_6,
654 DA830_EMA_A_7,
655 DA830_EMA_A_8,
656 DA830_EMA_A_9,
657 DA830_MMCSD_CMD,
658 DA830_LCD_D_6,
659 DA830_LCD_D_3,
660 DA830_LCD_D_2,
661 DA830_LCD_D_1,
662 DA830_LCD_D_0,
663 DA830_LCD_PCLK,
664 DA830_LCD_HSYNC,
665 DA830_UHPI_HCNTL1,
666 DA830_GPIO1_2,
667 DA830_GPIO1_3,
668 DA830_GPIO1_4,
669 DA830_GPIO1_5,
670 DA830_GPIO1_6,
671 DA830_GPIO1_7,
672 DA830_GPIO1_8,
673 DA830_GPIO1_9,
674 DA830_EMA_A_10,
675 DA830_EMA_A_11,
676 DA830_EMA_A_12,
677 DA830_EMA_BA_1,
678 DA830_EMA_BA_0,
679 DA830_EMA_CLK,
680 DA830_EMA_SDCKE,
681 DA830_NEMA_CAS,
682 DA830_LCD_VSYNC,
683 DA830_NLCD_AC_ENB_CS,
684 DA830_LCD_MCLK,
685 DA830_LCD_D_5,
686 DA830_LCD_D_4,
687 DA830_OBSCLK,
688 DA830_NEMA_CS_4,
689 DA830_UHPI_HHWIL,
690 DA830_AHCLKR2,
691 DA830_GPIO1_10,
692 DA830_GPIO1_11,
693 DA830_GPIO1_12,
694 DA830_GPIO1_13,
695 DA830_GPIO1_14,
696 DA830_GPIO1_15,
697 DA830_GPIO2_0,
698 DA830_GPIO2_1,
699 DA830_NEMA_RAS,
700 DA830_NEMA_WE,
701 DA830_NEMA_CS_0,
702 DA830_NEMA_CS_2,
703 DA830_NEMA_CS_3,
704 DA830_NEMA_OE,
705 DA830_NEMA_WE_DQM_1,
706 DA830_NEMA_WE_DQM_0,
707 DA830_NEMA_CS_5,
708 DA830_UHPI_HRNW,
709 DA830_NUHPI_HAS,
710 DA830_NUHPI_HCS,
711 DA830_NUHPI_HDS1,
712 DA830_NUHPI_HDS2,
713 DA830_NUHPI_HINT,
714 DA830_AXR0_12,
715 DA830_AMUTE2,
716 DA830_AXR0_13,
717 DA830_AXR0_14,
718 DA830_AXR0_15,
719 DA830_GPIO2_2,
720 DA830_GPIO2_3,
721 DA830_GPIO2_4,
722 DA830_GPIO2_5,
723 DA830_GPIO2_6,
724 DA830_GPIO2_7,
725 DA830_GPIO2_8,
726 DA830_GPIO2_9,
727 DA830_EMA_WAIT_0,
728 DA830_NUHPI_HRDY,
729 DA830_GPIO2_10,
730};
731
732enum davinci_da850_index {
733 /* UART0 function */
734 DA850_NUART0_CTS,
735 DA850_NUART0_RTS,
736 DA850_UART0_RXD,
737 DA850_UART0_TXD,
738
739 /* UART1 function */
740 DA850_NUART1_CTS,
741 DA850_NUART1_RTS,
742 DA850_UART1_RXD,
743 DA850_UART1_TXD,
744
745 /* UART2 function */
746 DA850_NUART2_CTS,
747 DA850_NUART2_RTS,
748 DA850_UART2_RXD,
749 DA850_UART2_TXD,
750
751 /* I2C1 function */
752 DA850_I2C1_SCL,
753 DA850_I2C1_SDA,
754
755 /* I2C0 function */
756 DA850_I2C0_SDA,
757 DA850_I2C0_SCL,
758
759 /* EMAC function */
760 DA850_MII_TXEN,
761 DA850_MII_TXCLK,
762 DA850_MII_COL,
763 DA850_MII_TXD_3,
764 DA850_MII_TXD_2,
765 DA850_MII_TXD_1,
766 DA850_MII_TXD_0,
767 DA850_MII_RXER,
768 DA850_MII_CRS,
769 DA850_MII_RXCLK,
770 DA850_MII_RXDV,
771 DA850_MII_RXD_3,
772 DA850_MII_RXD_2,
773 DA850_MII_RXD_1,
774 DA850_MII_RXD_0,
775 DA850_MDIO_CLK,
776 DA850_MDIO_D,
777
778 /* McASP function */
779 DA850_ACLKR,
780 DA850_ACLKX,
781 DA850_AFSR,
782 DA850_AFSX,
783 DA850_AHCLKR,
784 DA850_AHCLKX,
785 DA850_AMUTE,
786 DA850_AXR_15,
787 DA850_AXR_14,
788 DA850_AXR_13,
789 DA850_AXR_12,
790 DA850_AXR_11,
791 DA850_AXR_10,
792 DA850_AXR_9,
793 DA850_AXR_8,
794 DA850_AXR_7,
795 DA850_AXR_6,
796 DA850_AXR_5,
797 DA850_AXR_4,
798 DA850_AXR_3,
799 DA850_AXR_2,
800 DA850_AXR_1,
801 DA850_AXR_0,
802
803 /* LCD function */
804 DA850_LCD_D_7,
805 DA850_LCD_D_6,
806 DA850_LCD_D_5,
807 DA850_LCD_D_4,
808 DA850_LCD_D_3,
809 DA850_LCD_D_2,
810 DA850_LCD_D_1,
811 DA850_LCD_D_0,
812 DA850_LCD_D_15,
813 DA850_LCD_D_14,
814 DA850_LCD_D_13,
815 DA850_LCD_D_12,
816 DA850_LCD_D_11,
817 DA850_LCD_D_10,
818 DA850_LCD_D_9,
819 DA850_LCD_D_8,
820 DA850_LCD_PCLK,
821 DA850_LCD_HSYNC,
822 DA850_LCD_VSYNC,
823 DA850_NLCD_AC_ENB_CS,
824
825 /* MMC/SD0 function */
826 DA850_MMCSD0_DAT_0,
827 DA850_MMCSD0_DAT_1,
828 DA850_MMCSD0_DAT_2,
829 DA850_MMCSD0_DAT_3,
830 DA850_MMCSD0_CLK,
831 DA850_MMCSD0_CMD,
832
833 /* EMIF2.5/EMIFA function */
834 DA850_EMA_D_7,
835 DA850_EMA_D_6,
836 DA850_EMA_D_5,
837 DA850_EMA_D_4,
838 DA850_EMA_D_3,
839 DA850_EMA_D_2,
840 DA850_EMA_D_1,
841 DA850_EMA_D_0,
842 DA850_EMA_A_1,
843 DA850_EMA_A_2,
844 DA850_NEMA_CS_3,
845 DA850_NEMA_CS_4,
846 DA850_NEMA_WE,
847 DA850_NEMA_OE,
848 DA850_EMA_D_15,
849 DA850_EMA_D_14,
850 DA850_EMA_D_13,
851 DA850_EMA_D_12,
852 DA850_EMA_D_11,
853 DA850_EMA_D_10,
854 DA850_EMA_D_9,
855 DA850_EMA_D_8,
856 DA850_EMA_A_0,
857 DA850_EMA_A_3,
858 DA850_EMA_A_4,
859 DA850_EMA_A_5,
860 DA850_EMA_A_6,
861 DA850_EMA_A_7,
862 DA850_EMA_A_8,
863 DA850_EMA_A_9,
864 DA850_EMA_A_10,
865 DA850_EMA_A_11,
866 DA850_EMA_A_12,
867 DA850_EMA_A_13,
868 DA850_EMA_A_14,
869 DA850_EMA_A_15,
870 DA850_EMA_A_16,
871 DA850_EMA_A_17,
872 DA850_EMA_A_18,
873 DA850_EMA_A_19,
874 DA850_EMA_A_20,
875 DA850_EMA_A_21,
876 DA850_EMA_A_22,
877 DA850_EMA_A_23,
878 DA850_EMA_BA_1,
879 DA850_EMA_CLK,
880 DA850_EMA_WAIT_1,
881 DA850_NEMA_CS_2,
882
883 /* GPIO function */
884 DA850_GPIO2_15,
885 DA850_GPIO8_10,
886 DA850_GPIO4_0,
887 DA850_GPIO4_1,
157}; 888};
158 889
159#ifdef CONFIG_DAVINCI_MUX 890#ifdef CONFIG_DAVINCI_MUX
diff --git a/arch/arm/mach-davinci/include/mach/psc.h b/arch/arm/mach-davinci/include/mach/psc.h
index ab8a2586d1cc..171173c1dbad 100644
--- a/arch/arm/mach-davinci/include/mach/psc.h
+++ b/arch/arm/mach-davinci/include/mach/psc.h
@@ -81,6 +81,24 @@
81#define DM355_LPSC_RTO 12 81#define DM355_LPSC_RTO 12
82#define DM355_LPSC_VPSS_DAC 41 82#define DM355_LPSC_VPSS_DAC 41
83 83
84/* DM365 */
85#define DM365_LPSC_TIMER3 5
86#define DM365_LPSC_SPI1 6
87#define DM365_LPSC_MMC_SD1 7
88#define DM365_LPSC_McBSP1 8
89#define DM365_LPSC_PWM3 10
90#define DM365_LPSC_SPI2 11
91#define DM365_LPSC_RTO 12
92#define DM365_LPSC_TIMER4 17
93#define DM365_LPSC_SPI0 22
94#define DM365_LPSC_SPI3 38
95#define DM365_LPSC_SPI4 39
96#define DM365_LPSC_EMAC 40
97#define DM365_LPSC_VOICE_CODEC 44
98#define DM365_LPSC_DAC_CLK 46
99#define DM365_LPSC_VPSSMSTR 47
100#define DM365_LPSC_MJCP 50
101
84/* 102/*
85 * LPSC Assignments 103 * LPSC Assignments
86 */ 104 */
@@ -118,6 +136,50 @@
118#define DM646X_LPSC_TIMER1 35 136#define DM646X_LPSC_TIMER1 35
119#define DM646X_LPSC_ARM_INTC 45 137#define DM646X_LPSC_ARM_INTC 45
120 138
139/* PSC0 defines */
140#define DA8XX_LPSC0_TPCC 0
141#define DA8XX_LPSC0_TPTC0 1
142#define DA8XX_LPSC0_TPTC1 2
143#define DA8XX_LPSC0_EMIF25 3
144#define DA8XX_LPSC0_SPI0 4
145#define DA8XX_LPSC0_MMC_SD 5
146#define DA8XX_LPSC0_AINTC 6
147#define DA8XX_LPSC0_ARM_RAM_ROM 7
148#define DA8XX_LPSC0_SECU_MGR 8
149#define DA8XX_LPSC0_UART0 9
150#define DA8XX_LPSC0_SCR0_SS 10
151#define DA8XX_LPSC0_SCR1_SS 11
152#define DA8XX_LPSC0_SCR2_SS 12
153#define DA8XX_LPSC0_DMAX 13
154#define DA8XX_LPSC0_ARM 14
155#define DA8XX_LPSC0_GEM 15
156
157/* PSC1 defines */
158#define DA850_LPSC1_TPCC1 0
159#define DA8XX_LPSC1_USB20 1
160#define DA8XX_LPSC1_USB11 2
161#define DA8XX_LPSC1_GPIO 3
162#define DA8XX_LPSC1_UHPI 4
163#define DA8XX_LPSC1_CPGMAC 5
164#define DA8XX_LPSC1_EMIF3C 6
165#define DA8XX_LPSC1_McASP0 7
166#define DA830_LPSC1_McASP1 8
167#define DA850_LPSC1_SATA 8
168#define DA830_LPSC1_McASP2 9
169#define DA8XX_LPSC1_SPI1 10
170#define DA8XX_LPSC1_I2C 11
171#define DA8XX_LPSC1_UART1 12
172#define DA8XX_LPSC1_UART2 13
173#define DA8XX_LPSC1_LCDC 16
174#define DA8XX_LPSC1_PWM 17
175#define DA8XX_LPSC1_ECAP 20
176#define DA830_LPSC1_EQEP 21
177#define DA850_LPSC1_TPTC2 21
178#define DA8XX_LPSC1_SCR_P0_SS 24
179#define DA8XX_LPSC1_SCR_P1_SS 25
180#define DA8XX_LPSC1_CR_P3_SS 26
181#define DA8XX_LPSC1_L3_CBA_RAM 31
182
121extern int davinci_psc_is_clk_active(unsigned int ctlr, unsigned int id); 183extern int davinci_psc_is_clk_active(unsigned int ctlr, unsigned int id);
122extern void davinci_psc_config(unsigned int domain, unsigned int ctlr, 184extern void davinci_psc_config(unsigned int domain, unsigned int ctlr,
123 unsigned int id, char enable); 185 unsigned int id, char enable);
diff --git a/arch/arm/mach-davinci/include/mach/serial.h b/arch/arm/mach-davinci/include/mach/serial.h
index 794fa5cf93c1..a584697a9e70 100644
--- a/arch/arm/mach-davinci/include/mach/serial.h
+++ b/arch/arm/mach-davinci/include/mach/serial.h
@@ -11,13 +11,17 @@
11#ifndef __ASM_ARCH_SERIAL_H 11#ifndef __ASM_ARCH_SERIAL_H
12#define __ASM_ARCH_SERIAL_H 12#define __ASM_ARCH_SERIAL_H
13 13
14#include <mach/io.h> 14#include <mach/hardware.h>
15 15
16#define DAVINCI_MAX_NR_UARTS 3 16#define DAVINCI_MAX_NR_UARTS 3
17#define DAVINCI_UART0_BASE (IO_PHYS + 0x20000) 17#define DAVINCI_UART0_BASE (IO_PHYS + 0x20000)
18#define DAVINCI_UART1_BASE (IO_PHYS + 0x20400) 18#define DAVINCI_UART1_BASE (IO_PHYS + 0x20400)
19#define DAVINCI_UART2_BASE (IO_PHYS + 0x20800) 19#define DAVINCI_UART2_BASE (IO_PHYS + 0x20800)
20 20
21#define DA8XX_UART0_BASE (IO_PHYS + 0x042000)
22#define DA8XX_UART1_BASE (IO_PHYS + 0x10c000)
23#define DA8XX_UART2_BASE (IO_PHYS + 0x10d000)
24
21/* DaVinci UART register offsets */ 25/* DaVinci UART register offsets */
22#define UART_DAVINCI_PWREMU 0x0c 26#define UART_DAVINCI_PWREMU 0x0c
23#define UART_DM646X_SCR 0x10 27#define UART_DM646X_SCR 0x10
diff --git a/arch/arm/mach-davinci/include/mach/system.h b/arch/arm/mach-davinci/include/mach/system.h
index b7e7036674fa..8e4f10fe1263 100644
--- a/arch/arm/mach-davinci/include/mach/system.h
+++ b/arch/arm/mach-davinci/include/mach/system.h
@@ -16,12 +16,12 @@
16 16
17extern void davinci_watchdog_reset(void); 17extern void davinci_watchdog_reset(void);
18 18
19static void arch_idle(void) 19static inline void arch_idle(void)
20{ 20{
21 cpu_do_idle(); 21 cpu_do_idle();
22} 22}
23 23
24static void arch_reset(char mode, const char *cmd) 24static inline void arch_reset(char mode, const char *cmd)
25{ 25{
26 davinci_watchdog_reset(); 26 davinci_watchdog_reset();
27} 27}
diff --git a/arch/arm/mach-davinci/include/mach/uncompress.h b/arch/arm/mach-davinci/include/mach/uncompress.h
index 1e27475f9a23..33796b4db17f 100644
--- a/arch/arm/mach-davinci/include/mach/uncompress.h
+++ b/arch/arm/mach-davinci/include/mach/uncompress.h
@@ -21,8 +21,11 @@ static u32 *uart;
21 21
22static u32 *get_uart_base(void) 22static u32 *get_uart_base(void)
23{ 23{
24 /* Add logic here for new platforms, using __macine_arch_type */ 24 if (__machine_arch_type == MACH_TYPE_DAVINCI_DA830_EVM ||
25 return (u32 *)DAVINCI_UART0_BASE; 25 __machine_arch_type == MACH_TYPE_DAVINCI_DA850_EVM)
26 return (u32 *)DA8XX_UART2_BASE;
27 else
28 return (u32 *)DAVINCI_UART0_BASE;
26} 29}
27 30
28/* PORT_16C550A, in polled non-fifo mode */ 31/* PORT_16C550A, in polled non-fifo mode */
diff --git a/arch/arm/mach-davinci/include/mach/vmalloc.h b/arch/arm/mach-davinci/include/mach/vmalloc.h
index ad51625b6609..d49646a8e206 100644
--- a/arch/arm/mach-davinci/include/mach/vmalloc.h
+++ b/arch/arm/mach-davinci/include/mach/vmalloc.h
@@ -8,7 +8,7 @@
8 * is licensed "as is" without any warranty of any kind, whether express 8 * is licensed "as is" without any warranty of any kind, whether express
9 * or implied. 9 * or implied.
10 */ 10 */
11#include <mach/io.h> 11#include <mach/hardware.h>
12 12
13/* Allow vmalloc range until the IO virtual range minus a 2M "hole" */ 13/* Allow vmalloc range until the IO virtual range minus a 2M "hole" */
14#define VMALLOC_END (IO_VIRT - (2<<20)) 14#define VMALLOC_END (IO_VIRT - (2<<20))
diff --git a/arch/arm/mach-davinci/mux.c b/arch/arm/mach-davinci/mux.c
index d310f579aa85..898905e48946 100644
--- a/arch/arm/mach-davinci/mux.c
+++ b/arch/arm/mach-davinci/mux.c
@@ -91,3 +91,17 @@ int __init_or_module davinci_cfg_reg(const unsigned long index)
91 return 0; 91 return 0;
92} 92}
93EXPORT_SYMBOL(davinci_cfg_reg); 93EXPORT_SYMBOL(davinci_cfg_reg);
94
95int da8xx_pinmux_setup(const short pins[])
96{
97 int i, error = -EINVAL;
98
99 if (pins)
100 for (i = 0; pins[i] >= 0; i++) {
101 error = davinci_cfg_reg(pins[i]);
102 if (error)
103 break;
104 }
105
106 return error;
107}
diff --git a/arch/arm/mach-davinci/sram.c b/arch/arm/mach-davinci/sram.c
index db54b2a66b4d..4f1fc9b318b3 100644
--- a/arch/arm/mach-davinci/sram.c
+++ b/arch/arm/mach-davinci/sram.c
@@ -60,7 +60,7 @@ static int __init sram_init(void)
60 int status = 0; 60 int status = 0;
61 61
62 if (len) { 62 if (len) {
63 len = min(len, SRAM_SIZE); 63 len = min_t(unsigned, len, SRAM_SIZE);
64 sram_pool = gen_pool_create(ilog2(SRAM_GRANULARITY), -1); 64 sram_pool = gen_pool_create(ilog2(SRAM_GRANULARITY), -1);
65 if (!sram_pool) 65 if (!sram_pool)
66 status = -ENOMEM; 66 status = -ENOMEM;
diff --git a/arch/arm/mach-davinci/time.c b/arch/arm/mach-davinci/time.c
index 0884ca57bfb0..0d1b6d407b46 100644
--- a/arch/arm/mach-davinci/time.c
+++ b/arch/arm/mach-davinci/time.c
@@ -406,11 +406,11 @@ struct sys_timer davinci_timer = {
406void davinci_watchdog_reset(void) 406void davinci_watchdog_reset(void)
407{ 407{
408 u32 tgcr, wdtcr; 408 u32 tgcr, wdtcr;
409 struct davinci_soc_info *soc_info = &davinci_soc_info; 409 struct platform_device *pdev = &davinci_wdt_device;
410 void __iomem *base = soc_info->wdt_base; 410 void __iomem *base = IO_ADDRESS(pdev->resource[0].start);
411 struct clk *wd_clk; 411 struct clk *wd_clk;
412 412
413 wd_clk = clk_get(&davinci_wdt_device.dev, NULL); 413 wd_clk = clk_get(&pdev->dev, NULL);
414 if (WARN_ON(IS_ERR(wd_clk))) 414 if (WARN_ON(IS_ERR(wd_clk)))
415 return; 415 return;
416 clk_enable(wd_clk); 416 clk_enable(wd_clk);
@@ -420,11 +420,11 @@ void davinci_watchdog_reset(void)
420 420
421 /* reset timer, set mode to 64-bit watchdog, and unreset */ 421 /* reset timer, set mode to 64-bit watchdog, and unreset */
422 tgcr = 0; 422 tgcr = 0;
423 __raw_writel(tgcr, base + TCR); 423 __raw_writel(tgcr, base + TGCR);
424 tgcr = TGCR_TIMMODE_64BIT_WDOG << TGCR_TIMMODE_SHIFT; 424 tgcr = TGCR_TIMMODE_64BIT_WDOG << TGCR_TIMMODE_SHIFT;
425 tgcr |= (TGCR_UNRESET << TGCR_TIM12RS_SHIFT) | 425 tgcr |= (TGCR_UNRESET << TGCR_TIM12RS_SHIFT) |
426 (TGCR_UNRESET << TGCR_TIM34RS_SHIFT); 426 (TGCR_UNRESET << TGCR_TIM34RS_SHIFT);
427 __raw_writel(tgcr, base + TCR); 427 __raw_writel(tgcr, base + TGCR);
428 428
429 /* clear counter and period regs */ 429 /* clear counter and period regs */
430 __raw_writel(0, base + TIM12); 430 __raw_writel(0, base + TIM12);
@@ -432,12 +432,8 @@ void davinci_watchdog_reset(void)
432 __raw_writel(0, base + PRD12); 432 __raw_writel(0, base + PRD12);
433 __raw_writel(0, base + PRD34); 433 __raw_writel(0, base + PRD34);
434 434
435 /* enable */
436 wdtcr = __raw_readl(base + WDTCR);
437 wdtcr |= WDTCR_WDEN_ENABLE << WDTCR_WDEN_SHIFT;
438 __raw_writel(wdtcr, base + WDTCR);
439
440 /* put watchdog in pre-active state */ 435 /* put watchdog in pre-active state */
436 wdtcr = __raw_readl(base + WDTCR);
441 wdtcr = (WDTCR_WDKEY_SEQ0 << WDTCR_WDKEY_SHIFT) | 437 wdtcr = (WDTCR_WDKEY_SEQ0 << WDTCR_WDKEY_SHIFT) |
442 (WDTCR_WDEN_ENABLE << WDTCR_WDEN_SHIFT); 438 (WDTCR_WDEN_ENABLE << WDTCR_WDEN_SHIFT);
443 __raw_writel(wdtcr, base + WDTCR); 439 __raw_writel(wdtcr, base + WDTCR);
diff --git a/arch/arm/mach-davinci/usb.c b/arch/arm/mach-davinci/usb.c
index abedb6337182..06f55931620c 100644
--- a/arch/arm/mach-davinci/usb.c
+++ b/arch/arm/mach-davinci/usb.c
@@ -13,6 +13,7 @@
13#include <mach/common.h> 13#include <mach/common.h>
14#include <mach/hardware.h> 14#include <mach/hardware.h>
15#include <mach/irqs.h> 15#include <mach/irqs.h>
16#include <mach/cputype.h>
16 17
17#define DAVINCI_USB_OTG_BASE 0x01C64000 18#define DAVINCI_USB_OTG_BASE 0x01C64000
18 19
@@ -64,6 +65,10 @@ static struct resource usb_resources[] = {
64 .start = IRQ_USBINT, 65 .start = IRQ_USBINT,
65 .flags = IORESOURCE_IRQ, 66 .flags = IORESOURCE_IRQ,
66 }, 67 },
68 {
69 /* placeholder for the dedicated CPPI IRQ */
70 .flags = IORESOURCE_IRQ,
71 },
67}; 72};
68 73
69static u64 usb_dmamask = DMA_BIT_MASK(32); 74static u64 usb_dmamask = DMA_BIT_MASK(32);
@@ -84,6 +89,14 @@ void __init setup_usb(unsigned mA, unsigned potpgt_msec)
84{ 89{
85 usb_data.power = mA / 2; 90 usb_data.power = mA / 2;
86 usb_data.potpgt = potpgt_msec / 2; 91 usb_data.potpgt = potpgt_msec / 2;
92
93 if (cpu_is_davinci_dm646x()) {
94 /* Override the defaults as DM6467 uses different IRQs. */
95 usb_dev.resource[1].start = IRQ_DM646X_USBINT;
96 usb_dev.resource[2].start = IRQ_DM646X_USBDMAINT;
97 } else /* other devices don't have dedicated CPPI IRQ */
98 usb_dev.num_resources = 2;
99
87 platform_device_register(&usb_dev); 100 platform_device_register(&usb_dev);
88} 101}
89 102
diff --git a/arch/arm/mach-ep93xx/clock.c b/arch/arm/mach-ep93xx/clock.c
index 3dd0e2a23095..dda19cd76194 100644
--- a/arch/arm/mach-ep93xx/clock.c
+++ b/arch/arm/mach-ep93xx/clock.c
@@ -37,7 +37,7 @@ struct clk {
37static unsigned long get_uart_rate(struct clk *clk); 37static unsigned long get_uart_rate(struct clk *clk);
38 38
39static int set_keytchclk_rate(struct clk *clk, unsigned long rate); 39static int set_keytchclk_rate(struct clk *clk, unsigned long rate);
40 40static int set_div_rate(struct clk *clk, unsigned long rate);
41 41
42static struct clk clk_uart1 = { 42static struct clk clk_uart1 = {
43 .sw_locked = 1, 43 .sw_locked = 1,
@@ -76,6 +76,13 @@ static struct clk clk_pwm = {
76 .rate = EP93XX_EXT_CLK_RATE, 76 .rate = EP93XX_EXT_CLK_RATE,
77}; 77};
78 78
79static struct clk clk_video = {
80 .sw_locked = 1,
81 .enable_reg = EP93XX_SYSCON_VIDCLKDIV,
82 .enable_mask = EP93XX_SYSCON_CLKDIV_ENABLE,
83 .set_rate = set_div_rate,
84};
85
79/* DMA Clocks */ 86/* DMA Clocks */
80static struct clk clk_m2p0 = { 87static struct clk clk_m2p0 = {
81 .enable_reg = EP93XX_SYSCON_PWRCNT, 88 .enable_reg = EP93XX_SYSCON_PWRCNT,
@@ -140,6 +147,7 @@ static struct clk_lookup clocks[] = {
140 INIT_CK(NULL, "pll2", &clk_pll2), 147 INIT_CK(NULL, "pll2", &clk_pll2),
141 INIT_CK("ep93xx-ohci", NULL, &clk_usb_host), 148 INIT_CK("ep93xx-ohci", NULL, &clk_usb_host),
142 INIT_CK("ep93xx-keypad", NULL, &clk_keypad), 149 INIT_CK("ep93xx-keypad", NULL, &clk_keypad),
150 INIT_CK("ep93xx-fb", NULL, &clk_video),
143 INIT_CK(NULL, "pwm_clk", &clk_pwm), 151 INIT_CK(NULL, "pwm_clk", &clk_pwm),
144 INIT_CK(NULL, "m2p0", &clk_m2p0), 152 INIT_CK(NULL, "m2p0", &clk_m2p0),
145 INIT_CK(NULL, "m2p1", &clk_m2p1), 153 INIT_CK(NULL, "m2p1", &clk_m2p1),
@@ -236,6 +244,84 @@ static int set_keytchclk_rate(struct clk *clk, unsigned long rate)
236 return 0; 244 return 0;
237} 245}
238 246
247static unsigned long calc_clk_div(unsigned long rate, int *psel, int *esel,
248 int *pdiv, int *div)
249{
250 unsigned long max_rate, best_rate = 0,
251 actual_rate = 0, mclk_rate = 0, rate_err = -1;
252 int i, found = 0, __div = 0, __pdiv = 0;
253
254 /* Don't exceed the maximum rate */
255 max_rate = max(max(clk_pll1.rate / 4, clk_pll2.rate / 4),
256 (unsigned long)EP93XX_EXT_CLK_RATE / 4);
257 rate = min(rate, max_rate);
258
259 /*
260 * Try the two pll's and the external clock
261 * Because the valid predividers are 2, 2.5 and 3, we multiply
262 * all the clocks by 2 to avoid floating point math.
263 *
264 * This is based on the algorithm in the ep93xx raster guide:
265 * http://be-a-maverick.com/en/pubs/appNote/AN269REV1.pdf
266 *
267 */
268 for (i = 0; i < 3; i++) {
269 if (i == 0)
270 mclk_rate = EP93XX_EXT_CLK_RATE * 2;
271 else if (i == 1)
272 mclk_rate = clk_pll1.rate * 2;
273 else if (i == 2)
274 mclk_rate = clk_pll2.rate * 2;
275
276 /* Try each predivider value */
277 for (__pdiv = 4; __pdiv <= 6; __pdiv++) {
278 __div = mclk_rate / (rate * __pdiv);
279 if (__div < 2 || __div > 127)
280 continue;
281
282 actual_rate = mclk_rate / (__pdiv * __div);
283
284 if (!found || abs(actual_rate - rate) < rate_err) {
285 *pdiv = __pdiv - 3;
286 *div = __div;
287 *psel = (i == 2);
288 *esel = (i != 0);
289 best_rate = actual_rate;
290 rate_err = abs(actual_rate - rate);
291 found = 1;
292 }
293 }
294 }
295
296 if (!found)
297 return 0;
298
299 return best_rate;
300}
301
302static int set_div_rate(struct clk *clk, unsigned long rate)
303{
304 unsigned long actual_rate;
305 int psel = 0, esel = 0, pdiv = 0, div = 0;
306 u32 val;
307
308 actual_rate = calc_clk_div(rate, &psel, &esel, &pdiv, &div);
309 if (actual_rate == 0)
310 return -EINVAL;
311 clk->rate = actual_rate;
312
313 /* Clear the esel, psel, pdiv and div bits */
314 val = __raw_readl(clk->enable_reg);
315 val &= ~0x7fff;
316
317 /* Set the new esel, psel, pdiv and div bits for the new clock rate */
318 val |= (esel ? EP93XX_SYSCON_CLKDIV_ESEL : 0) |
319 (psel ? EP93XX_SYSCON_CLKDIV_PSEL : 0) |
320 (pdiv << EP93XX_SYSCON_CLKDIV_PDIV_SHIFT) | div;
321 ep93xx_syscon_swlocked_write(val, clk->enable_reg);
322 return 0;
323}
324
239int clk_set_rate(struct clk *clk, unsigned long rate) 325int clk_set_rate(struct clk *clk, unsigned long rate)
240{ 326{
241 if (clk->set_rate) 327 if (clk->set_rate)
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
index 16b92c37ec99..f7ebed942f66 100644
--- a/arch/arm/mach-ep93xx/core.c
+++ b/arch/arm/mach-ep93xx/core.c
@@ -30,6 +30,7 @@
30#include <linux/i2c-gpio.h> 30#include <linux/i2c-gpio.h>
31 31
32#include <mach/hardware.h> 32#include <mach/hardware.h>
33#include <mach/fb.h>
33 34
34#include <asm/mach/map.h> 35#include <asm/mach/map.h>
35#include <asm/mach/time.h> 36#include <asm/mach/time.h>
@@ -682,6 +683,37 @@ void ep93xx_pwm_release_gpio(struct platform_device *pdev)
682EXPORT_SYMBOL(ep93xx_pwm_release_gpio); 683EXPORT_SYMBOL(ep93xx_pwm_release_gpio);
683 684
684 685
686/*************************************************************************
687 * EP93xx video peripheral handling
688 *************************************************************************/
689static struct ep93xxfb_mach_info ep93xxfb_data;
690
691static struct resource ep93xx_fb_resource[] = {
692 {
693 .start = EP93XX_RASTER_PHYS_BASE,
694 .end = EP93XX_RASTER_PHYS_BASE + 0x800 - 1,
695 .flags = IORESOURCE_MEM,
696 },
697};
698
699static struct platform_device ep93xx_fb_device = {
700 .name = "ep93xx-fb",
701 .id = -1,
702 .dev = {
703 .platform_data = &ep93xxfb_data,
704 .coherent_dma_mask = DMA_BIT_MASK(32),
705 .dma_mask = &ep93xx_fb_device.dev.coherent_dma_mask,
706 },
707 .num_resources = ARRAY_SIZE(ep93xx_fb_resource),
708 .resource = ep93xx_fb_resource,
709};
710
711void __init ep93xx_register_fb(struct ep93xxfb_mach_info *data)
712{
713 ep93xxfb_data = *data;
714 platform_device_register(&ep93xx_fb_device);
715}
716
685extern void ep93xx_gpio_init(void); 717extern void ep93xx_gpio_init(void);
686 718
687void __init ep93xx_init_devices(void) 719void __init ep93xx_init_devices(void)
diff --git a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
index ea78e908fc82..0fbf87b16338 100644
--- a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
+++ b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
@@ -70,6 +70,7 @@
70#define EP93XX_USB_PHYS_BASE (EP93XX_AHB_PHYS_BASE + 0x00020000) 70#define EP93XX_USB_PHYS_BASE (EP93XX_AHB_PHYS_BASE + 0x00020000)
71#define EP93XX_USB_BASE EP93XX_AHB_IOMEM(0x00020000) 71#define EP93XX_USB_BASE EP93XX_AHB_IOMEM(0x00020000)
72 72
73#define EP93XX_RASTER_PHYS_BASE (EP93XX_AHB_PHYS_BASE + 0x00030000)
73#define EP93XX_RASTER_BASE EP93XX_AHB_IOMEM(0x00030000) 74#define EP93XX_RASTER_BASE EP93XX_AHB_IOMEM(0x00030000)
74 75
75#define EP93XX_GRAPHICS_ACCEL_BASE EP93XX_AHB_IOMEM(0x00040000) 76#define EP93XX_GRAPHICS_ACCEL_BASE EP93XX_AHB_IOMEM(0x00040000)
@@ -207,6 +208,11 @@
207#define EP93XX_SYSCON_DEVCFG_ADCPD (1<<2) 208#define EP93XX_SYSCON_DEVCFG_ADCPD (1<<2)
208#define EP93XX_SYSCON_DEVCFG_KEYS (1<<1) 209#define EP93XX_SYSCON_DEVCFG_KEYS (1<<1)
209#define EP93XX_SYSCON_DEVCFG_SHENA (1<<0) 210#define EP93XX_SYSCON_DEVCFG_SHENA (1<<0)
211#define EP93XX_SYSCON_VIDCLKDIV EP93XX_SYSCON_REG(0x84)
212#define EP93XX_SYSCON_CLKDIV_ENABLE (1<<15)
213#define EP93XX_SYSCON_CLKDIV_ESEL (1<<14)
214#define EP93XX_SYSCON_CLKDIV_PSEL (1<<13)
215#define EP93XX_SYSCON_CLKDIV_PDIV_SHIFT 8
210#define EP93XX_SYSCON_KEYTCHCLKDIV EP93XX_SYSCON_REG(0x90) 216#define EP93XX_SYSCON_KEYTCHCLKDIV EP93XX_SYSCON_REG(0x90)
211#define EP93XX_SYSCON_KEYTCHCLKDIV_TSEN (1<<31) 217#define EP93XX_SYSCON_KEYTCHCLKDIV_TSEN (1<<31)
212#define EP93XX_SYSCON_KEYTCHCLKDIV_ADIV (1<<16) 218#define EP93XX_SYSCON_KEYTCHCLKDIV_ADIV (1<<16)
diff --git a/arch/arm/mach-ep93xx/include/mach/fb.h b/arch/arm/mach-ep93xx/include/mach/fb.h
new file mode 100644
index 000000000000..d5ae11d7c453
--- /dev/null
+++ b/arch/arm/mach-ep93xx/include/mach/fb.h
@@ -0,0 +1,56 @@
1/*
2 * arch/arm/mach-ep93xx/include/mach/fb.h
3 */
4
5#ifndef __ASM_ARCH_EP93XXFB_H
6#define __ASM_ARCH_EP93XXFB_H
7
8struct platform_device;
9struct fb_videomode;
10struct fb_info;
11
12#define EP93XXFB_USE_MODEDB 0
13
14/* VideoAttributes flags */
15#define EP93XXFB_STATE_MACHINE_ENABLE (1 << 0)
16#define EP93XXFB_PIXEL_CLOCK_ENABLE (1 << 1)
17#define EP93XXFB_VSYNC_ENABLE (1 << 2)
18#define EP93XXFB_PIXEL_DATA_ENABLE (1 << 3)
19#define EP93XXFB_COMPOSITE_SYNC (1 << 4)
20#define EP93XXFB_SYNC_VERT_HIGH (1 << 5)
21#define EP93XXFB_SYNC_HORIZ_HIGH (1 << 6)
22#define EP93XXFB_SYNC_BLANK_HIGH (1 << 7)
23#define EP93XXFB_PCLK_FALLING (1 << 8)
24#define EP93XXFB_ENABLE_AC (1 << 9)
25#define EP93XXFB_ENABLE_LCD (1 << 10)
26#define EP93XXFB_ENABLE_CCIR (1 << 12)
27#define EP93XXFB_USE_PARALLEL_INTERFACE (1 << 13)
28#define EP93XXFB_ENABLE_INTERRUPT (1 << 14)
29#define EP93XXFB_USB_INTERLACE (1 << 16)
30#define EP93XXFB_USE_EQUALIZATION (1 << 17)
31#define EP93XXFB_USE_DOUBLE_HORZ (1 << 18)
32#define EP93XXFB_USE_DOUBLE_VERT (1 << 19)
33#define EP93XXFB_USE_BLANK_PIXEL (1 << 20)
34#define EP93XXFB_USE_SDCSN0 (0 << 21)
35#define EP93XXFB_USE_SDCSN1 (1 << 21)
36#define EP93XXFB_USE_SDCSN2 (2 << 21)
37#define EP93XXFB_USE_SDCSN3 (3 << 21)
38
39#define EP93XXFB_ENABLE (EP93XXFB_STATE_MACHINE_ENABLE | \
40 EP93XXFB_PIXEL_CLOCK_ENABLE | \
41 EP93XXFB_VSYNC_ENABLE | \
42 EP93XXFB_PIXEL_DATA_ENABLE)
43
44struct ep93xxfb_mach_info {
45 unsigned int num_modes;
46 const struct fb_videomode *modes;
47 const struct fb_videomode *default_mode;
48 int bpp;
49 unsigned int flags;
50
51 int (*setup)(struct platform_device *pdev);
52 void (*teardown)(struct platform_device *pdev);
53 void (*blank)(int blank_mode, struct fb_info *info);
54};
55
56#endif /* __ASM_ARCH_EP93XXFB_H */
diff --git a/arch/arm/mach-ep93xx/include/mach/platform.h b/arch/arm/mach-ep93xx/include/mach/platform.h
index 5f5fa6574d34..01a0f0838e5b 100644
--- a/arch/arm/mach-ep93xx/include/mach/platform.h
+++ b/arch/arm/mach-ep93xx/include/mach/platform.h
@@ -6,6 +6,7 @@
6 6
7struct i2c_board_info; 7struct i2c_board_info;
8struct platform_device; 8struct platform_device;
9struct ep93xxfb_mach_info;
9 10
10struct ep93xx_eth_data 11struct ep93xx_eth_data
11{ 12{
@@ -33,6 +34,7 @@ static inline void ep93xx_devcfg_clear_bits(unsigned int bits)
33 34
34void ep93xx_register_eth(struct ep93xx_eth_data *data, int copy_addr); 35void ep93xx_register_eth(struct ep93xx_eth_data *data, int copy_addr);
35void ep93xx_register_i2c(struct i2c_board_info *devices, int num); 36void ep93xx_register_i2c(struct i2c_board_info *devices, int num);
37void ep93xx_register_fb(struct ep93xxfb_mach_info *data);
36void ep93xx_register_pwm(int pwm0, int pwm1); 38void ep93xx_register_pwm(int pwm0, int pwm1);
37int ep93xx_pwm_acquire_gpio(struct platform_device *pdev); 39int ep93xx_pwm_acquire_gpio(struct platform_device *pdev);
38void ep93xx_pwm_release_gpio(struct platform_device *pdev); 40void ep93xx_pwm_release_gpio(struct platform_device *pdev);
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c
index 2a318eba1b07..3f35293d457a 100644
--- a/arch/arm/mach-integrator/integrator_cp.c
+++ b/arch/arm/mach-integrator/integrator_cp.c
@@ -19,6 +19,7 @@
19#include <linux/amba/bus.h> 19#include <linux/amba/bus.h>
20#include <linux/amba/kmi.h> 20#include <linux/amba/kmi.h>
21#include <linux/amba/clcd.h> 21#include <linux/amba/clcd.h>
22#include <linux/amba/mmci.h>
22#include <linux/io.h> 23#include <linux/io.h>
23 24
24#include <asm/clkdev.h> 25#include <asm/clkdev.h>
@@ -35,7 +36,6 @@
35#include <asm/mach/arch.h> 36#include <asm/mach/arch.h>
36#include <asm/mach/flash.h> 37#include <asm/mach/flash.h>
37#include <asm/mach/irq.h> 38#include <asm/mach/irq.h>
38#include <asm/mach/mmc.h>
39#include <asm/mach/map.h> 39#include <asm/mach/map.h>
40#include <asm/mach/time.h> 40#include <asm/mach/time.h>
41 41
@@ -400,7 +400,7 @@ static unsigned int mmc_status(struct device *dev)
400 return status & 8; 400 return status & 8;
401} 401}
402 402
403static struct mmc_platform_data mmc_data = { 403static struct mmci_platform_data mmc_data = {
404 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, 404 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
405 .status = mmc_status, 405 .status = mmc_status,
406 .gpio_wp = -1, 406 .gpio_wp = -1,
diff --git a/arch/arm/mach-iop13xx/include/mach/adma.h b/arch/arm/mach-iop13xx/include/mach/adma.h
index 5722e86f2174..6d3782d85a9f 100644
--- a/arch/arm/mach-iop13xx/include/mach/adma.h
+++ b/arch/arm/mach-iop13xx/include/mach/adma.h
@@ -150,6 +150,8 @@ static inline int iop_adma_get_max_xor(void)
150 return 16; 150 return 16;
151} 151}
152 152
153#define iop_adma_get_max_pq iop_adma_get_max_xor
154
153static inline u32 iop_chan_get_current_descriptor(struct iop_adma_chan *chan) 155static inline u32 iop_chan_get_current_descriptor(struct iop_adma_chan *chan)
154{ 156{
155 return __raw_readl(ADMA_ADAR(chan)); 157 return __raw_readl(ADMA_ADAR(chan));
@@ -211,7 +213,10 @@ iop_chan_xor_slot_count(size_t len, int src_cnt, int *slots_per_op)
211#define IOP_ADMA_MAX_BYTE_COUNT ADMA_MAX_BYTE_COUNT 213#define IOP_ADMA_MAX_BYTE_COUNT ADMA_MAX_BYTE_COUNT
212#define IOP_ADMA_ZERO_SUM_MAX_BYTE_COUNT ADMA_MAX_BYTE_COUNT 214#define IOP_ADMA_ZERO_SUM_MAX_BYTE_COUNT ADMA_MAX_BYTE_COUNT
213#define IOP_ADMA_XOR_MAX_BYTE_COUNT ADMA_MAX_BYTE_COUNT 215#define IOP_ADMA_XOR_MAX_BYTE_COUNT ADMA_MAX_BYTE_COUNT
216#define IOP_ADMA_PQ_MAX_BYTE_COUNT ADMA_MAX_BYTE_COUNT
214#define iop_chan_zero_sum_slot_count(l, s, o) iop_chan_xor_slot_count(l, s, o) 217#define iop_chan_zero_sum_slot_count(l, s, o) iop_chan_xor_slot_count(l, s, o)
218#define iop_chan_pq_slot_count iop_chan_xor_slot_count
219#define iop_chan_pq_zero_sum_slot_count iop_chan_xor_slot_count
215 220
216static inline u32 iop_desc_get_dest_addr(struct iop_adma_desc_slot *desc, 221static inline u32 iop_desc_get_dest_addr(struct iop_adma_desc_slot *desc,
217 struct iop_adma_chan *chan) 222 struct iop_adma_chan *chan)
@@ -220,6 +225,13 @@ static inline u32 iop_desc_get_dest_addr(struct iop_adma_desc_slot *desc,
220 return hw_desc->dest_addr; 225 return hw_desc->dest_addr;
221} 226}
222 227
228static inline u32 iop_desc_get_qdest_addr(struct iop_adma_desc_slot *desc,
229 struct iop_adma_chan *chan)
230{
231 struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc;
232 return hw_desc->q_dest_addr;
233}
234
223static inline u32 iop_desc_get_byte_count(struct iop_adma_desc_slot *desc, 235static inline u32 iop_desc_get_byte_count(struct iop_adma_desc_slot *desc,
224 struct iop_adma_chan *chan) 236 struct iop_adma_chan *chan)
225{ 237{
@@ -319,6 +331,58 @@ iop_desc_init_zero_sum(struct iop_adma_desc_slot *desc, int src_cnt,
319 return 1; 331 return 1;
320} 332}
321 333
334static inline void
335iop_desc_init_pq(struct iop_adma_desc_slot *desc, int src_cnt,
336 unsigned long flags)
337{
338 struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc;
339 union {
340 u32 value;
341 struct iop13xx_adma_desc_ctrl field;
342 } u_desc_ctrl;
343
344 u_desc_ctrl.value = 0;
345 u_desc_ctrl.field.src_select = src_cnt - 1;
346 u_desc_ctrl.field.xfer_dir = 3; /* local to internal bus */
347 u_desc_ctrl.field.pq_xfer_en = 1;
348 u_desc_ctrl.field.p_xfer_dis = !!(flags & DMA_PREP_PQ_DISABLE_P);
349 u_desc_ctrl.field.int_en = flags & DMA_PREP_INTERRUPT;
350 hw_desc->desc_ctrl = u_desc_ctrl.value;
351}
352
353static inline int iop_desc_is_pq(struct iop_adma_desc_slot *desc)
354{
355 struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc;
356 union {
357 u32 value;
358 struct iop13xx_adma_desc_ctrl field;
359 } u_desc_ctrl;
360
361 u_desc_ctrl.value = hw_desc->desc_ctrl;
362 return u_desc_ctrl.field.pq_xfer_en;
363}
364
365static inline void
366iop_desc_init_pq_zero_sum(struct iop_adma_desc_slot *desc, int src_cnt,
367 unsigned long flags)
368{
369 struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc;
370 union {
371 u32 value;
372 struct iop13xx_adma_desc_ctrl field;
373 } u_desc_ctrl;
374
375 u_desc_ctrl.value = 0;
376 u_desc_ctrl.field.src_select = src_cnt - 1;
377 u_desc_ctrl.field.xfer_dir = 3; /* local to internal bus */
378 u_desc_ctrl.field.zero_result = 1;
379 u_desc_ctrl.field.status_write_back_en = 1;
380 u_desc_ctrl.field.pq_xfer_en = 1;
381 u_desc_ctrl.field.p_xfer_dis = !!(flags & DMA_PREP_PQ_DISABLE_P);
382 u_desc_ctrl.field.int_en = flags & DMA_PREP_INTERRUPT;
383 hw_desc->desc_ctrl = u_desc_ctrl.value;
384}
385
322static inline void iop_desc_set_byte_count(struct iop_adma_desc_slot *desc, 386static inline void iop_desc_set_byte_count(struct iop_adma_desc_slot *desc,
323 struct iop_adma_chan *chan, 387 struct iop_adma_chan *chan,
324 u32 byte_count) 388 u32 byte_count)
@@ -351,6 +415,7 @@ iop_desc_set_zero_sum_byte_count(struct iop_adma_desc_slot *desc, u32 len)
351 } 415 }
352} 416}
353 417
418#define iop_desc_set_pq_zero_sum_byte_count iop_desc_set_zero_sum_byte_count
354 419
355static inline void iop_desc_set_dest_addr(struct iop_adma_desc_slot *desc, 420static inline void iop_desc_set_dest_addr(struct iop_adma_desc_slot *desc,
356 struct iop_adma_chan *chan, 421 struct iop_adma_chan *chan,
@@ -361,6 +426,16 @@ static inline void iop_desc_set_dest_addr(struct iop_adma_desc_slot *desc,
361 hw_desc->upper_dest_addr = 0; 426 hw_desc->upper_dest_addr = 0;
362} 427}
363 428
429static inline void
430iop_desc_set_pq_addr(struct iop_adma_desc_slot *desc, dma_addr_t *addr)
431{
432 struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc;
433
434 hw_desc->dest_addr = addr[0];
435 hw_desc->q_dest_addr = addr[1];
436 hw_desc->upper_dest_addr = 0;
437}
438
364static inline void iop_desc_set_memcpy_src_addr(struct iop_adma_desc_slot *desc, 439static inline void iop_desc_set_memcpy_src_addr(struct iop_adma_desc_slot *desc,
365 dma_addr_t addr) 440 dma_addr_t addr)
366{ 441{
@@ -389,6 +464,29 @@ static inline void iop_desc_set_xor_src_addr(struct iop_adma_desc_slot *desc,
389} 464}
390 465
391static inline void 466static inline void
467iop_desc_set_pq_src_addr(struct iop_adma_desc_slot *desc, int src_idx,
468 dma_addr_t addr, unsigned char coef)
469{
470 int slot_cnt = desc->slot_cnt, slots_per_op = desc->slots_per_op;
471 struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc, *iter;
472 struct iop13xx_adma_src *src;
473 int i = 0;
474
475 do {
476 iter = iop_hw_desc_slot_idx(hw_desc, i);
477 src = &iter->src[src_idx];
478 src->src_addr = addr;
479 src->pq_upper_src_addr = 0;
480 src->pq_dmlt = coef;
481 slot_cnt -= slots_per_op;
482 if (slot_cnt) {
483 i += slots_per_op;
484 addr += IOP_ADMA_PQ_MAX_BYTE_COUNT;
485 }
486 } while (slot_cnt);
487}
488
489static inline void
392iop_desc_init_interrupt(struct iop_adma_desc_slot *desc, 490iop_desc_init_interrupt(struct iop_adma_desc_slot *desc,
393 struct iop_adma_chan *chan) 491 struct iop_adma_chan *chan)
394{ 492{
@@ -399,6 +497,15 @@ iop_desc_init_interrupt(struct iop_adma_desc_slot *desc,
399} 497}
400 498
401#define iop_desc_set_zero_sum_src_addr iop_desc_set_xor_src_addr 499#define iop_desc_set_zero_sum_src_addr iop_desc_set_xor_src_addr
500#define iop_desc_set_pq_zero_sum_src_addr iop_desc_set_pq_src_addr
501
502static inline void
503iop_desc_set_pq_zero_sum_addr(struct iop_adma_desc_slot *desc, int pq_idx,
504 dma_addr_t *src)
505{
506 iop_desc_set_xor_src_addr(desc, pq_idx, src[pq_idx]);
507 iop_desc_set_xor_src_addr(desc, pq_idx+1, src[pq_idx+1]);
508}
402 509
403static inline void iop_desc_set_next_desc(struct iop_adma_desc_slot *desc, 510static inline void iop_desc_set_next_desc(struct iop_adma_desc_slot *desc,
404 u32 next_desc_addr) 511 u32 next_desc_addr)
@@ -428,18 +535,20 @@ static inline void iop_desc_set_block_fill_val(struct iop_adma_desc_slot *desc,
428 hw_desc->block_fill_data = val; 535 hw_desc->block_fill_data = val;
429} 536}
430 537
431static inline int iop_desc_get_zero_result(struct iop_adma_desc_slot *desc) 538static inline enum sum_check_flags
539iop_desc_get_zero_result(struct iop_adma_desc_slot *desc)
432{ 540{
433 struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc; 541 struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc;
434 struct iop13xx_adma_desc_ctrl desc_ctrl = hw_desc->desc_ctrl_field; 542 struct iop13xx_adma_desc_ctrl desc_ctrl = hw_desc->desc_ctrl_field;
435 struct iop13xx_adma_byte_count byte_count = hw_desc->byte_count_field; 543 struct iop13xx_adma_byte_count byte_count = hw_desc->byte_count_field;
544 enum sum_check_flags flags;
436 545
437 BUG_ON(!(byte_count.tx_complete && desc_ctrl.zero_result)); 546 BUG_ON(!(byte_count.tx_complete && desc_ctrl.zero_result));
438 547
439 if (desc_ctrl.pq_xfer_en) 548 flags = byte_count.zero_result_err_q << SUM_CHECK_Q;
440 return byte_count.zero_result_err_q; 549 flags |= byte_count.zero_result_err << SUM_CHECK_P;
441 else 550
442 return byte_count.zero_result_err; 551 return flags;
443} 552}
444 553
445static inline void iop_chan_append(struct iop_adma_chan *chan) 554static inline void iop_chan_append(struct iop_adma_chan *chan)
diff --git a/arch/arm/mach-iop13xx/setup.c b/arch/arm/mach-iop13xx/setup.c
index bee42c609df6..5c147fb66a01 100644
--- a/arch/arm/mach-iop13xx/setup.c
+++ b/arch/arm/mach-iop13xx/setup.c
@@ -477,10 +477,8 @@ void __init iop13xx_platform_init(void)
477 plat_data = &iop13xx_adma_0_data; 477 plat_data = &iop13xx_adma_0_data;
478 dma_cap_set(DMA_MEMCPY, plat_data->cap_mask); 478 dma_cap_set(DMA_MEMCPY, plat_data->cap_mask);
479 dma_cap_set(DMA_XOR, plat_data->cap_mask); 479 dma_cap_set(DMA_XOR, plat_data->cap_mask);
480 dma_cap_set(DMA_DUAL_XOR, plat_data->cap_mask); 480 dma_cap_set(DMA_XOR_VAL, plat_data->cap_mask);
481 dma_cap_set(DMA_ZERO_SUM, plat_data->cap_mask);
482 dma_cap_set(DMA_MEMSET, plat_data->cap_mask); 481 dma_cap_set(DMA_MEMSET, plat_data->cap_mask);
483 dma_cap_set(DMA_MEMCPY_CRC32C, plat_data->cap_mask);
484 dma_cap_set(DMA_INTERRUPT, plat_data->cap_mask); 482 dma_cap_set(DMA_INTERRUPT, plat_data->cap_mask);
485 break; 483 break;
486 case IOP13XX_INIT_ADMA_1: 484 case IOP13XX_INIT_ADMA_1:
@@ -489,10 +487,8 @@ void __init iop13xx_platform_init(void)
489 plat_data = &iop13xx_adma_1_data; 487 plat_data = &iop13xx_adma_1_data;
490 dma_cap_set(DMA_MEMCPY, plat_data->cap_mask); 488 dma_cap_set(DMA_MEMCPY, plat_data->cap_mask);
491 dma_cap_set(DMA_XOR, plat_data->cap_mask); 489 dma_cap_set(DMA_XOR, plat_data->cap_mask);
492 dma_cap_set(DMA_DUAL_XOR, plat_data->cap_mask); 490 dma_cap_set(DMA_XOR_VAL, plat_data->cap_mask);
493 dma_cap_set(DMA_ZERO_SUM, plat_data->cap_mask);
494 dma_cap_set(DMA_MEMSET, plat_data->cap_mask); 491 dma_cap_set(DMA_MEMSET, plat_data->cap_mask);
495 dma_cap_set(DMA_MEMCPY_CRC32C, plat_data->cap_mask);
496 dma_cap_set(DMA_INTERRUPT, plat_data->cap_mask); 492 dma_cap_set(DMA_INTERRUPT, plat_data->cap_mask);
497 break; 493 break;
498 case IOP13XX_INIT_ADMA_2: 494 case IOP13XX_INIT_ADMA_2:
@@ -501,14 +497,11 @@ void __init iop13xx_platform_init(void)
501 plat_data = &iop13xx_adma_2_data; 497 plat_data = &iop13xx_adma_2_data;
502 dma_cap_set(DMA_MEMCPY, plat_data->cap_mask); 498 dma_cap_set(DMA_MEMCPY, plat_data->cap_mask);
503 dma_cap_set(DMA_XOR, plat_data->cap_mask); 499 dma_cap_set(DMA_XOR, plat_data->cap_mask);
504 dma_cap_set(DMA_DUAL_XOR, plat_data->cap_mask); 500 dma_cap_set(DMA_XOR_VAL, plat_data->cap_mask);
505 dma_cap_set(DMA_ZERO_SUM, plat_data->cap_mask);
506 dma_cap_set(DMA_MEMSET, plat_data->cap_mask); 501 dma_cap_set(DMA_MEMSET, plat_data->cap_mask);
507 dma_cap_set(DMA_MEMCPY_CRC32C, plat_data->cap_mask);
508 dma_cap_set(DMA_INTERRUPT, plat_data->cap_mask); 502 dma_cap_set(DMA_INTERRUPT, plat_data->cap_mask);
509 dma_cap_set(DMA_PQ_XOR, plat_data->cap_mask); 503 dma_cap_set(DMA_PQ, plat_data->cap_mask);
510 dma_cap_set(DMA_PQ_UPDATE, plat_data->cap_mask); 504 dma_cap_set(DMA_PQ_VAL, plat_data->cap_mask);
511 dma_cap_set(DMA_PQ_ZERO_SUM, plat_data->cap_mask);
512 break; 505 break;
513 } 506 }
514 } 507 }
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c
index 5083f03e9b5e..cfd52fb341cb 100644
--- a/arch/arm/mach-ixp4xx/common.c
+++ b/arch/arm/mach-ixp4xx/common.c
@@ -41,8 +41,8 @@
41#include <asm/mach/irq.h> 41#include <asm/mach/irq.h>
42#include <asm/mach/time.h> 42#include <asm/mach/time.h>
43 43
44static int __init ixp4xx_clocksource_init(void); 44static void __init ixp4xx_clocksource_init(void);
45static int __init ixp4xx_clockevent_init(void); 45static void __init ixp4xx_clockevent_init(void);
46static struct clock_event_device clockevent_ixp4xx; 46static struct clock_event_device clockevent_ixp4xx;
47 47
48/************************************************************************* 48/*************************************************************************
@@ -267,7 +267,7 @@ void __init ixp4xx_init_irq(void)
267 267
268static irqreturn_t ixp4xx_timer_interrupt(int irq, void *dev_id) 268static irqreturn_t ixp4xx_timer_interrupt(int irq, void *dev_id)
269{ 269{
270 struct clock_event_device *evt = &clockevent_ixp4xx; 270 struct clock_event_device *evt = dev_id;
271 271
272 /* Clear Pending Interrupt by writing '1' to it */ 272 /* Clear Pending Interrupt by writing '1' to it */
273 *IXP4XX_OSST = IXP4XX_OSST_TIMER_1_PEND; 273 *IXP4XX_OSST = IXP4XX_OSST_TIMER_1_PEND;
@@ -281,6 +281,7 @@ static struct irqaction ixp4xx_timer_irq = {
281 .name = "timer1", 281 .name = "timer1",
282 .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, 282 .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
283 .handler = ixp4xx_timer_interrupt, 283 .handler = ixp4xx_timer_interrupt,
284 .dev_id = &clockevent_ixp4xx,
284}; 285};
285 286
286void __init ixp4xx_timer_init(void) 287void __init ixp4xx_timer_init(void)
@@ -401,7 +402,7 @@ void __init ixp4xx_sys_init(void)
401/* 402/*
402 * clocksource 403 * clocksource
403 */ 404 */
404cycle_t ixp4xx_get_cycles(struct clocksource *cs) 405static cycle_t ixp4xx_get_cycles(struct clocksource *cs)
405{ 406{
406 return *IXP4XX_OSTS; 407 return *IXP4XX_OSTS;
407} 408}
@@ -417,14 +418,12 @@ static struct clocksource clocksource_ixp4xx = {
417 418
418unsigned long ixp4xx_timer_freq = FREQ; 419unsigned long ixp4xx_timer_freq = FREQ;
419EXPORT_SYMBOL(ixp4xx_timer_freq); 420EXPORT_SYMBOL(ixp4xx_timer_freq);
420static int __init ixp4xx_clocksource_init(void) 421static void __init ixp4xx_clocksource_init(void)
421{ 422{
422 clocksource_ixp4xx.mult = 423 clocksource_ixp4xx.mult =
423 clocksource_hz2mult(ixp4xx_timer_freq, 424 clocksource_hz2mult(ixp4xx_timer_freq,
424 clocksource_ixp4xx.shift); 425 clocksource_ixp4xx.shift);
425 clocksource_register(&clocksource_ixp4xx); 426 clocksource_register(&clocksource_ixp4xx);
426
427 return 0;
428} 427}
429 428
430/* 429/*
@@ -480,7 +479,7 @@ static struct clock_event_device clockevent_ixp4xx = {
480 .set_next_event = ixp4xx_set_next_event, 479 .set_next_event = ixp4xx_set_next_event,
481}; 480};
482 481
483static int __init ixp4xx_clockevent_init(void) 482static void __init ixp4xx_clockevent_init(void)
484{ 483{
485 clockevent_ixp4xx.mult = div_sc(FREQ, NSEC_PER_SEC, 484 clockevent_ixp4xx.mult = div_sc(FREQ, NSEC_PER_SEC,
486 clockevent_ixp4xx.shift); 485 clockevent_ixp4xx.shift);
@@ -491,5 +490,4 @@ static int __init ixp4xx_clockevent_init(void)
491 clockevent_ixp4xx.cpumask = cpumask_of(0); 490 clockevent_ixp4xx.cpumask = cpumask_of(0);
492 491
493 clockevents_register_device(&clockevent_ixp4xx); 492 clockevents_register_device(&clockevent_ixp4xx);
494 return 0;
495} 493}
diff --git a/arch/arm/mach-ixp4xx/include/mach/system.h b/arch/arm/mach-ixp4xx/include/mach/system.h
index d2aa26f5acd7..54c0af7fa2d4 100644
--- a/arch/arm/mach-ixp4xx/include/mach/system.h
+++ b/arch/arm/mach-ixp4xx/include/mach/system.h
@@ -13,9 +13,11 @@
13 13
14static inline void arch_idle(void) 14static inline void arch_idle(void)
15{ 15{
16 /* ixp4xx does not implement the XScale PWRMODE register,
17 * so it must not call cpu_do_idle() here.
18 */
16#if 0 19#if 0
17 if (!hlt_counter) 20 cpu_do_idle();
18 cpu_do_idle(0);
19#endif 21#endif
20} 22}
21 23
diff --git a/arch/arm/mach-nomadik/board-nhk8815.c b/arch/arm/mach-nomadik/board-nhk8815.c
index 79bdea943eb4..6bfd537d5afb 100644
--- a/arch/arm/mach-nomadik/board-nhk8815.c
+++ b/arch/arm/mach-nomadik/board-nhk8815.c
@@ -16,12 +16,164 @@
16#include <linux/amba/bus.h> 16#include <linux/amba/bus.h>
17#include <linux/interrupt.h> 17#include <linux/interrupt.h>
18#include <linux/gpio.h> 18#include <linux/gpio.h>
19#include <linux/mtd/mtd.h>
20#include <linux/mtd/nand.h>
21#include <linux/mtd/partitions.h>
22#include <linux/io.h>
23#include <asm/sizes.h>
19#include <asm/mach-types.h> 24#include <asm/mach-types.h>
20#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
21#include <asm/mach/irq.h> 26#include <asm/mach/irq.h>
27#include <asm/mach/flash.h>
22#include <mach/setup.h> 28#include <mach/setup.h>
29#include <mach/nand.h>
30#include <mach/fsmc.h>
23#include "clock.h" 31#include "clock.h"
24 32
33/* These adresses span 16MB, so use three individual pages */
34static struct resource nhk8815_nand_resources[] = {
35 {
36 .name = "nand_addr",
37 .start = NAND_IO_ADDR,
38 .end = NAND_IO_ADDR + 0xfff,
39 .flags = IORESOURCE_MEM,
40 }, {
41 .name = "nand_cmd",
42 .start = NAND_IO_CMD,
43 .end = NAND_IO_CMD + 0xfff,
44 .flags = IORESOURCE_MEM,
45 }, {
46 .name = "nand_data",
47 .start = NAND_IO_DATA,
48 .end = NAND_IO_DATA + 0xfff,
49 .flags = IORESOURCE_MEM,
50 }
51};
52
53static int nhk8815_nand_init(void)
54{
55 /* FSMC setup for nand chip select (8-bit nand in 8815NHK) */
56 writel(0x0000000E, FSMC_PCR(0));
57 writel(0x000D0A00, FSMC_PMEM(0));
58 writel(0x00100A00, FSMC_PATT(0));
59
60 /* enable access to the chip select area */
61 writel(readl(FSMC_PCR(0)) | 0x04, FSMC_PCR(0));
62
63 return 0;
64}
65
66/*
67 * These partitions are the same as those used in the 2.6.20 release
68 * shipped by the vendor; the first two partitions are mandated
69 * by the boot ROM, and the bootloader area is somehow oversized...
70 */
71static struct mtd_partition nhk8815_partitions[] = {
72 {
73 .name = "X-Loader(NAND)",
74 .offset = 0,
75 .size = SZ_256K,
76 }, {
77 .name = "MemInit(NAND)",
78 .offset = MTDPART_OFS_APPEND,
79 .size = SZ_256K,
80 }, {
81 .name = "BootLoader(NAND)",
82 .offset = MTDPART_OFS_APPEND,
83 .size = SZ_2M,
84 }, {
85 .name = "Kernel zImage(NAND)",
86 .offset = MTDPART_OFS_APPEND,
87 .size = 3 * SZ_1M,
88 }, {
89 .name = "Root Filesystem(NAND)",
90 .offset = MTDPART_OFS_APPEND,
91 .size = 22 * SZ_1M,
92 }, {
93 .name = "User Filesystem(NAND)",
94 .offset = MTDPART_OFS_APPEND,
95 .size = MTDPART_SIZ_FULL,
96 }
97};
98
99static struct nomadik_nand_platform_data nhk8815_nand_data = {
100 .parts = nhk8815_partitions,
101 .nparts = ARRAY_SIZE(nhk8815_partitions),
102 .options = NAND_COPYBACK | NAND_CACHEPRG | NAND_NO_PADDING \
103 | NAND_NO_READRDY | NAND_NO_AUTOINCR,
104 .init = nhk8815_nand_init,
105};
106
107static struct platform_device nhk8815_nand_device = {
108 .name = "nomadik_nand",
109 .dev = {
110 .platform_data = &nhk8815_nand_data,
111 },
112 .resource = nhk8815_nand_resources,
113 .num_resources = ARRAY_SIZE(nhk8815_nand_resources),
114};
115
116/* These are the partitions for the OneNand device, different from above */
117static struct mtd_partition nhk8815_onenand_partitions[] = {
118 {
119 .name = "X-Loader(OneNAND)",
120 .offset = 0,
121 .size = SZ_256K,
122 }, {
123 .name = "MemInit(OneNAND)",
124 .offset = MTDPART_OFS_APPEND,
125 .size = SZ_256K,
126 }, {
127 .name = "BootLoader(OneNAND)",
128 .offset = MTDPART_OFS_APPEND,
129 .size = SZ_2M-SZ_256K,
130 }, {
131 .name = "SysImage(OneNAND)",
132 .offset = MTDPART_OFS_APPEND,
133 .size = 4 * SZ_1M,
134 }, {
135 .name = "Root Filesystem(OneNAND)",
136 .offset = MTDPART_OFS_APPEND,
137 .size = 22 * SZ_1M,
138 }, {
139 .name = "User Filesystem(OneNAND)",
140 .offset = MTDPART_OFS_APPEND,
141 .size = MTDPART_SIZ_FULL,
142 }
143};
144
145static struct flash_platform_data nhk8815_onenand_data = {
146 .parts = nhk8815_onenand_partitions,
147 .nr_parts = ARRAY_SIZE(nhk8815_onenand_partitions),
148};
149
150static struct resource nhk8815_onenand_resource[] = {
151 {
152 .start = 0x30000000,
153 .end = 0x30000000 + SZ_128K - 1,
154 .flags = IORESOURCE_MEM,
155 },
156};
157
158static struct platform_device nhk8815_onenand_device = {
159 .name = "onenand",
160 .id = -1,
161 .dev = {
162 .platform_data = &nhk8815_onenand_data,
163 },
164 .resource = nhk8815_onenand_resource,
165 .num_resources = ARRAY_SIZE(nhk8815_onenand_resource),
166};
167
168static void __init nhk8815_onenand_init(void)
169{
170#ifdef CONFIG_ONENAND
171 /* Set up SMCS0 for OneNand */
172 writel(0x000030db, FSMC_BCR0);
173 writel(0x02100551, FSMC_BTR0);
174#endif
175}
176
25#define __MEM_4K_RESOURCE(x) \ 177#define __MEM_4K_RESOURCE(x) \
26 .res = {.start = (x), .end = (x) + SZ_4K - 1, .flags = IORESOURCE_MEM} 178 .res = {.start = (x), .end = (x) + SZ_4K - 1, .flags = IORESOURCE_MEM}
27 179
@@ -81,6 +233,8 @@ static int __init nhk8815_eth_init(void)
81device_initcall(nhk8815_eth_init); 233device_initcall(nhk8815_eth_init);
82 234
83static struct platform_device *nhk8815_platform_devices[] __initdata = { 235static struct platform_device *nhk8815_platform_devices[] __initdata = {
236 &nhk8815_nand_device,
237 &nhk8815_onenand_device,
84 &nhk8815_eth_device, 238 &nhk8815_eth_device,
85 /* will add more devices */ 239 /* will add more devices */
86}; 240};
@@ -90,6 +244,7 @@ static void __init nhk8815_platform_init(void)
90 int i; 244 int i;
91 245
92 cpu8815_platform_init(); 246 cpu8815_platform_init();
247 nhk8815_onenand_init();
93 platform_add_devices(nhk8815_platform_devices, 248 platform_add_devices(nhk8815_platform_devices,
94 ARRAY_SIZE(nhk8815_platform_devices)); 249 ARRAY_SIZE(nhk8815_platform_devices));
95 250
diff --git a/arch/arm/mach-nomadik/include/mach/fsmc.h b/arch/arm/mach-nomadik/include/mach/fsmc.h
new file mode 100644
index 000000000000..8c2c05183685
--- /dev/null
+++ b/arch/arm/mach-nomadik/include/mach/fsmc.h
@@ -0,0 +1,29 @@
1
2/* Definitions for the Nomadik FSMC "Flexible Static Memory controller" */
3
4#ifndef __ASM_ARCH_FSMC_H
5#define __ASM_ARCH_FSMC_H
6
7#include <mach/hardware.h>
8/*
9 * Register list
10 */
11
12/* bus control reg. and bus timing reg. for CS0..CS3 */
13#define FSMC_BCR(x) (NOMADIK_FSMC_VA + (x << 3))
14#define FSMC_BTR(x) (NOMADIK_FSMC_VA + (x << 3) + 0x04)
15
16/* PC-card and NAND:
17 * PCR = control register
18 * PMEM = memory timing
19 * PATT = attribute timing
20 * PIO = I/O timing
21 * PECCR = ECC result
22 */
23#define FSMC_PCR(x) (NOMADIK_FSMC_VA + ((2 + x) << 5) + 0x00)
24#define FSMC_PMEM(x) (NOMADIK_FSMC_VA + ((2 + x) << 5) + 0x08)
25#define FSMC_PATT(x) (NOMADIK_FSMC_VA + ((2 + x) << 5) + 0x0c)
26#define FSMC_PIO(x) (NOMADIK_FSMC_VA + ((2 + x) << 5) + 0x10)
27#define FSMC_PECCR(x) (NOMADIK_FSMC_VA + ((2 + x) << 5) + 0x14)
28
29#endif /* __ASM_ARCH_FSMC_H */
diff --git a/arch/arm/mach-nomadik/include/mach/nand.h b/arch/arm/mach-nomadik/include/mach/nand.h
new file mode 100644
index 000000000000..c3c8254c22a5
--- /dev/null
+++ b/arch/arm/mach-nomadik/include/mach/nand.h
@@ -0,0 +1,16 @@
1#ifndef __ASM_ARCH_NAND_H
2#define __ASM_ARCH_NAND_H
3
4struct nomadik_nand_platform_data {
5 struct mtd_partition *parts;
6 int nparts;
7 int options;
8 int (*init) (void);
9 int (*exit) (void);
10};
11
12#define NAND_IO_DATA 0x40000000
13#define NAND_IO_CMD 0x40800000
14#define NAND_IO_ADDR 0x41000000
15
16#endif /* __ASM_ARCH_NAND_H */
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c
index 8b40aace9db4..42920f9c1a11 100644
--- a/arch/arm/mach-omap1/board-ams-delta.c
+++ b/arch/arm/mach-omap1/board-ams-delta.c
@@ -15,8 +15,11 @@
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/input.h> 17#include <linux/input.h>
18#include <linux/interrupt.h>
18#include <linux/platform_device.h> 19#include <linux/platform_device.h>
20#include <linux/serial_8250.h>
19 21
22#include <asm/serial.h>
20#include <mach/hardware.h> 23#include <mach/hardware.h>
21#include <asm/mach-types.h> 24#include <asm/mach-types.h>
22#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
@@ -162,10 +165,6 @@ static struct omap_lcd_config ams_delta_lcd_config __initdata = {
162 .ctrl_name = "internal", 165 .ctrl_name = "internal",
163}; 166};
164 167
165static struct omap_uart_config ams_delta_uart_config __initdata = {
166 .enabled_uarts = 1,
167};
168
169static struct omap_usb_config ams_delta_usb_config __initdata = { 168static struct omap_usb_config ams_delta_usb_config __initdata = {
170 .register_host = 1, 169 .register_host = 1,
171 .hmc_mode = 16, 170 .hmc_mode = 16,
@@ -174,7 +173,6 @@ static struct omap_usb_config ams_delta_usb_config __initdata = {
174 173
175static struct omap_board_config_kernel ams_delta_config[] = { 174static struct omap_board_config_kernel ams_delta_config[] = {
176 { OMAP_TAG_LCD, &ams_delta_lcd_config }, 175 { OMAP_TAG_LCD, &ams_delta_lcd_config },
177 { OMAP_TAG_UART, &ams_delta_uart_config },
178}; 176};
179 177
180static struct resource ams_delta_kp_resources[] = { 178static struct resource ams_delta_kp_resources[] = {
@@ -235,6 +233,41 @@ static void __init ams_delta_init(void)
235 platform_add_devices(ams_delta_devices, ARRAY_SIZE(ams_delta_devices)); 233 platform_add_devices(ams_delta_devices, ARRAY_SIZE(ams_delta_devices));
236} 234}
237 235
236static struct plat_serial8250_port ams_delta_modem_ports[] = {
237 {
238 .membase = (void *) AMS_DELTA_MODEM_VIRT,
239 .mapbase = AMS_DELTA_MODEM_PHYS,
240 .irq = -EINVAL, /* changed later */
241 .flags = UPF_BOOT_AUTOCONF,
242 .irqflags = IRQF_TRIGGER_RISING,
243 .iotype = UPIO_MEM,
244 .regshift = 1,
245 .uartclk = BASE_BAUD * 16,
246 },
247 { },
248};
249
250static struct platform_device ams_delta_modem_device = {
251 .name = "serial8250",
252 .id = PLAT8250_DEV_PLATFORM1,
253 .dev = {
254 .platform_data = ams_delta_modem_ports,
255 },
256};
257
258static int __init ams_delta_modem_init(void)
259{
260 omap_cfg_reg(M14_1510_GPIO2);
261 ams_delta_modem_ports[0].irq = gpio_to_irq(2);
262
263 ams_delta_latch2_write(
264 AMS_DELTA_LATCH2_MODEM_NRESET | AMS_DELTA_LATCH2_MODEM_CODEC,
265 AMS_DELTA_LATCH2_MODEM_NRESET | AMS_DELTA_LATCH2_MODEM_CODEC);
266
267 return platform_device_register(&ams_delta_modem_device);
268}
269arch_initcall(ams_delta_modem_init);
270
238static void __init ams_delta_map_io(void) 271static void __init ams_delta_map_io(void)
239{ 272{
240 omap1_map_common_io(); 273 omap1_map_common_io();
diff --git a/arch/arm/mach-omap1/board-fsample.c b/arch/arm/mach-omap1/board-fsample.c
index 19e0e9232336..a7ead1b93226 100644
--- a/arch/arm/mach-omap1/board-fsample.c
+++ b/arch/arm/mach-omap1/board-fsample.c
@@ -240,16 +240,11 @@ static int nand_dev_ready(struct omap_nand_platform_data *data)
240 return gpio_get_value(P2_NAND_RB_GPIO_PIN); 240 return gpio_get_value(P2_NAND_RB_GPIO_PIN);
241} 241}
242 242
243static struct omap_uart_config fsample_uart_config __initdata = {
244 .enabled_uarts = ((1 << 0) | (1 << 1)),
245};
246
247static struct omap_lcd_config fsample_lcd_config __initdata = { 243static struct omap_lcd_config fsample_lcd_config __initdata = {
248 .ctrl_name = "internal", 244 .ctrl_name = "internal",
249}; 245};
250 246
251static struct omap_board_config_kernel fsample_config[] = { 247static struct omap_board_config_kernel fsample_config[] = {
252 { OMAP_TAG_UART, &fsample_uart_config },
253 { OMAP_TAG_LCD, &fsample_lcd_config }, 248 { OMAP_TAG_LCD, &fsample_lcd_config },
254}; 249};
255 250
diff --git a/arch/arm/mach-omap1/board-generic.c b/arch/arm/mach-omap1/board-generic.c
index e724940e86f2..fb47239da72f 100644
--- a/arch/arm/mach-omap1/board-generic.c
+++ b/arch/arm/mach-omap1/board-generic.c
@@ -57,12 +57,7 @@ static struct omap_usb_config generic1610_usb_config __initdata = {
57}; 57};
58#endif 58#endif
59 59
60static struct omap_uart_config generic_uart_config __initdata = {
61 .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
62};
63
64static struct omap_board_config_kernel generic_config[] __initdata = { 60static struct omap_board_config_kernel generic_config[] __initdata = {
65 { OMAP_TAG_UART, &generic_uart_config },
66}; 61};
67 62
68static void __init omap_generic_init(void) 63static void __init omap_generic_init(void)
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c
index f695aa053ac8..aab860307dca 100644
--- a/arch/arm/mach-omap1/board-h2.c
+++ b/arch/arm/mach-omap1/board-h2.c
@@ -360,16 +360,11 @@ static struct omap_usb_config h2_usb_config __initdata = {
360 .pins[1] = 3, 360 .pins[1] = 3,
361}; 361};
362 362
363static struct omap_uart_config h2_uart_config __initdata = {
364 .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
365};
366
367static struct omap_lcd_config h2_lcd_config __initdata = { 363static struct omap_lcd_config h2_lcd_config __initdata = {
368 .ctrl_name = "internal", 364 .ctrl_name = "internal",
369}; 365};
370 366
371static struct omap_board_config_kernel h2_config[] __initdata = { 367static struct omap_board_config_kernel h2_config[] __initdata = {
372 { OMAP_TAG_UART, &h2_uart_config },
373 { OMAP_TAG_LCD, &h2_lcd_config }, 368 { OMAP_TAG_LCD, &h2_lcd_config },
374}; 369};
375 370
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c
index f597968733b4..89586b80b8d5 100644
--- a/arch/arm/mach-omap1/board-h3.c
+++ b/arch/arm/mach-omap1/board-h3.c
@@ -313,16 +313,11 @@ static struct omap_usb_config h3_usb_config __initdata = {
313 .pins[1] = 3, 313 .pins[1] = 3,
314}; 314};
315 315
316static struct omap_uart_config h3_uart_config __initdata = {
317 .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
318};
319
320static struct omap_lcd_config h3_lcd_config __initdata = { 316static struct omap_lcd_config h3_lcd_config __initdata = {
321 .ctrl_name = "internal", 317 .ctrl_name = "internal",
322}; 318};
323 319
324static struct omap_board_config_kernel h3_config[] __initdata = { 320static struct omap_board_config_kernel h3_config[] __initdata = {
325 { OMAP_TAG_UART, &h3_uart_config },
326 { OMAP_TAG_LCD, &h3_lcd_config }, 321 { OMAP_TAG_LCD, &h3_lcd_config },
327}; 322};
328 323
diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c
index 2fd98260ea49..cc2abbb2d0f4 100644
--- a/arch/arm/mach-omap1/board-innovator.c
+++ b/arch/arm/mach-omap1/board-innovator.c
@@ -368,13 +368,8 @@ static inline void innovator_mmc_init(void)
368} 368}
369#endif 369#endif
370 370
371static struct omap_uart_config innovator_uart_config __initdata = {
372 .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
373};
374
375static struct omap_board_config_kernel innovator_config[] = { 371static struct omap_board_config_kernel innovator_config[] = {
376 { OMAP_TAG_LCD, NULL }, 372 { OMAP_TAG_LCD, NULL },
377 { OMAP_TAG_UART, &innovator_uart_config },
378}; 373};
379 374
380static void __init innovator_init(void) 375static void __init innovator_init(void)
diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c
index cf3247b15f87..ed891b8a6b15 100644
--- a/arch/arm/mach-omap1/board-osk.c
+++ b/arch/arm/mach-omap1/board-osk.c
@@ -293,10 +293,6 @@ static struct omap_usb_config osk_usb_config __initdata = {
293 .pins[0] = 2, 293 .pins[0] = 2,
294}; 294};
295 295
296static struct omap_uart_config osk_uart_config __initdata = {
297 .enabled_uarts = (1 << 0),
298};
299
300#ifdef CONFIG_OMAP_OSK_MISTRAL 296#ifdef CONFIG_OMAP_OSK_MISTRAL
301static struct omap_lcd_config osk_lcd_config __initdata = { 297static struct omap_lcd_config osk_lcd_config __initdata = {
302 .ctrl_name = "internal", 298 .ctrl_name = "internal",
@@ -304,7 +300,6 @@ static struct omap_lcd_config osk_lcd_config __initdata = {
304#endif 300#endif
305 301
306static struct omap_board_config_kernel osk_config[] __initdata = { 302static struct omap_board_config_kernel osk_config[] __initdata = {
307 { OMAP_TAG_UART, &osk_uart_config },
308#ifdef CONFIG_OMAP_OSK_MISTRAL 303#ifdef CONFIG_OMAP_OSK_MISTRAL
309 { OMAP_TAG_LCD, &osk_lcd_config }, 304 { OMAP_TAG_LCD, &osk_lcd_config },
310#endif 305#endif
diff --git a/arch/arm/mach-omap1/board-palmte.c b/arch/arm/mach-omap1/board-palmte.c
index 886b4c0569bd..90dd0431b0dc 100644
--- a/arch/arm/mach-omap1/board-palmte.c
+++ b/arch/arm/mach-omap1/board-palmte.c
@@ -212,10 +212,6 @@ static struct omap_lcd_config palmte_lcd_config __initdata = {
212 .ctrl_name = "internal", 212 .ctrl_name = "internal",
213}; 213};
214 214
215static struct omap_uart_config palmte_uart_config __initdata = {
216 .enabled_uarts = (1 << 0) | (1 << 1) | (0 << 2),
217};
218
219#ifdef CONFIG_APM 215#ifdef CONFIG_APM
220/* 216/*
221 * Values measured in 10 minute intervals averaged over 10 samples. 217 * Values measured in 10 minute intervals averaged over 10 samples.
@@ -302,7 +298,6 @@ static void palmte_get_power_status(struct apm_power_info *info, int *battery)
302 298
303static struct omap_board_config_kernel palmte_config[] __initdata = { 299static struct omap_board_config_kernel palmte_config[] __initdata = {
304 { OMAP_TAG_LCD, &palmte_lcd_config }, 300 { OMAP_TAG_LCD, &palmte_lcd_config },
305 { OMAP_TAG_UART, &palmte_uart_config },
306}; 301};
307 302
308static struct spi_board_info palmte_spi_info[] __initdata = { 303static struct spi_board_info palmte_spi_info[] __initdata = {
diff --git a/arch/arm/mach-omap1/board-palmtt.c b/arch/arm/mach-omap1/board-palmtt.c
index 4f1b44831d37..8256139891ff 100644
--- a/arch/arm/mach-omap1/board-palmtt.c
+++ b/arch/arm/mach-omap1/board-palmtt.c
@@ -274,13 +274,8 @@ static struct omap_lcd_config palmtt_lcd_config __initdata = {
274 .ctrl_name = "internal", 274 .ctrl_name = "internal",
275}; 275};
276 276
277static struct omap_uart_config palmtt_uart_config __initdata = {
278 .enabled_uarts = (1 << 0) | (1 << 1) | (0 << 2),
279};
280
281static struct omap_board_config_kernel palmtt_config[] __initdata = { 277static struct omap_board_config_kernel palmtt_config[] __initdata = {
282 { OMAP_TAG_LCD, &palmtt_lcd_config }, 278 { OMAP_TAG_LCD, &palmtt_lcd_config },
283 { OMAP_TAG_UART, &palmtt_uart_config },
284}; 279};
285 280
286static void __init omap_mpu_wdt_mode(int mode) { 281static void __init omap_mpu_wdt_mode(int mode) {
diff --git a/arch/arm/mach-omap1/board-palmz71.c b/arch/arm/mach-omap1/board-palmz71.c
index 9a55c3c58218..81b6bde1c5a3 100644
--- a/arch/arm/mach-omap1/board-palmz71.c
+++ b/arch/arm/mach-omap1/board-palmz71.c
@@ -244,13 +244,8 @@ static struct omap_lcd_config palmz71_lcd_config __initdata = {
244 .ctrl_name = "internal", 244 .ctrl_name = "internal",
245}; 245};
246 246
247static struct omap_uart_config palmz71_uart_config __initdata = {
248 .enabled_uarts = (1 << 0) | (1 << 1) | (0 << 2),
249};
250
251static struct omap_board_config_kernel palmz71_config[] __initdata = { 247static struct omap_board_config_kernel palmz71_config[] __initdata = {
252 {OMAP_TAG_LCD, &palmz71_lcd_config}, 248 {OMAP_TAG_LCD, &palmz71_lcd_config},
253 {OMAP_TAG_UART, &palmz71_uart_config},
254}; 249};
255 250
256static irqreturn_t 251static irqreturn_t
diff --git a/arch/arm/mach-omap1/board-perseus2.c b/arch/arm/mach-omap1/board-perseus2.c
index 3b9f907aa899..83406699f310 100644
--- a/arch/arm/mach-omap1/board-perseus2.c
+++ b/arch/arm/mach-omap1/board-perseus2.c
@@ -208,16 +208,11 @@ static int nand_dev_ready(struct omap_nand_platform_data *data)
208 return gpio_get_value(P2_NAND_RB_GPIO_PIN); 208 return gpio_get_value(P2_NAND_RB_GPIO_PIN);
209} 209}
210 210
211static struct omap_uart_config perseus2_uart_config __initdata = {
212 .enabled_uarts = ((1 << 0) | (1 << 1)),
213};
214
215static struct omap_lcd_config perseus2_lcd_config __initdata = { 211static struct omap_lcd_config perseus2_lcd_config __initdata = {
216 .ctrl_name = "internal", 212 .ctrl_name = "internal",
217}; 213};
218 214
219static struct omap_board_config_kernel perseus2_config[] __initdata = { 215static struct omap_board_config_kernel perseus2_config[] __initdata = {
220 { OMAP_TAG_UART, &perseus2_uart_config },
221 { OMAP_TAG_LCD, &perseus2_lcd_config }, 216 { OMAP_TAG_LCD, &perseus2_lcd_config },
222}; 217};
223 218
diff --git a/arch/arm/mach-omap1/board-sx1.c b/arch/arm/mach-omap1/board-sx1.c
index c096577695fe..02c85ca2e1df 100644
--- a/arch/arm/mach-omap1/board-sx1.c
+++ b/arch/arm/mach-omap1/board-sx1.c
@@ -369,13 +369,8 @@ static struct platform_device *sx1_devices[] __initdata = {
369}; 369};
370/*-----------------------------------------*/ 370/*-----------------------------------------*/
371 371
372static struct omap_uart_config sx1_uart_config __initdata = {
373 .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
374};
375
376static struct omap_board_config_kernel sx1_config[] __initdata = { 372static struct omap_board_config_kernel sx1_config[] __initdata = {
377 { OMAP_TAG_LCD, &sx1_lcd_config }, 373 { OMAP_TAG_LCD, &sx1_lcd_config },
378 { OMAP_TAG_UART, &sx1_uart_config },
379}; 374};
380 375
381/*-----------------------------------------*/ 376/*-----------------------------------------*/
diff --git a/arch/arm/mach-omap1/board-voiceblue.c b/arch/arm/mach-omap1/board-voiceblue.c
index 98275e03dad1..c06e7a553472 100644
--- a/arch/arm/mach-omap1/board-voiceblue.c
+++ b/arch/arm/mach-omap1/board-voiceblue.c
@@ -140,12 +140,7 @@ static struct omap_usb_config voiceblue_usb_config __initdata = {
140 .pins[2] = 6, 140 .pins[2] = 6,
141}; 141};
142 142
143static struct omap_uart_config voiceblue_uart_config __initdata = {
144 .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
145};
146
147static struct omap_board_config_kernel voiceblue_config[] = { 143static struct omap_board_config_kernel voiceblue_config[] = {
148 { OMAP_TAG_UART, &voiceblue_uart_config },
149}; 144};
150 145
151static void __init voiceblue_init_irq(void) 146static void __init voiceblue_init_irq(void)
diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c
index bbbaeb0abcd3..06808434ea04 100644
--- a/arch/arm/mach-omap1/devices.c
+++ b/arch/arm/mach-omap1/devices.c
@@ -71,7 +71,7 @@ static inline void omap_init_rtc(void) {}
71# define INT_DSP_MAILBOX1 INT_1610_DSP_MAILBOX1 71# define INT_DSP_MAILBOX1 INT_1610_DSP_MAILBOX1
72#endif 72#endif
73 73
74#define OMAP1_MBOX_BASE IO_ADDRESS(OMAP16XX_MAILBOX_BASE) 74#define OMAP1_MBOX_BASE OMAP1_IO_ADDRESS(OMAP16XX_MAILBOX_BASE)
75 75
76static struct resource mbox_resources[] = { 76static struct resource mbox_resources[] = {
77 { 77 {
diff --git a/arch/arm/mach-omap1/io.c b/arch/arm/mach-omap1/io.c
index 3afe540149f7..7030f9281ea1 100644
--- a/arch/arm/mach-omap1/io.c
+++ b/arch/arm/mach-omap1/io.c
@@ -29,9 +29,9 @@ extern void omapfb_reserve_sdram(void);
29 */ 29 */
30static struct map_desc omap_io_desc[] __initdata = { 30static struct map_desc omap_io_desc[] __initdata = {
31 { 31 {
32 .virtual = IO_VIRT, 32 .virtual = OMAP1_IO_VIRT,
33 .pfn = __phys_to_pfn(IO_PHYS), 33 .pfn = __phys_to_pfn(OMAP1_IO_PHYS),
34 .length = IO_SIZE, 34 .length = OMAP1_IO_SIZE,
35 .type = MT_DEVICE 35 .type = MT_DEVICE
36 } 36 }
37}; 37};
diff --git a/arch/arm/mach-omap1/pm.h b/arch/arm/mach-omap1/pm.h
index 9ed5e2c1de4d..c4f05bdcf8a6 100644
--- a/arch/arm/mach-omap1/pm.h
+++ b/arch/arm/mach-omap1/pm.h
@@ -39,11 +39,11 @@
39 * Register and offset definitions to be used in PM assembler code 39 * Register and offset definitions to be used in PM assembler code
40 * ---------------------------------------------------------------------------- 40 * ----------------------------------------------------------------------------
41 */ 41 */
42#define CLKGEN_REG_ASM_BASE IO_ADDRESS(0xfffece00) 42#define CLKGEN_REG_ASM_BASE OMAP1_IO_ADDRESS(0xfffece00)
43#define ARM_IDLECT1_ASM_OFFSET 0x04 43#define ARM_IDLECT1_ASM_OFFSET 0x04
44#define ARM_IDLECT2_ASM_OFFSET 0x08 44#define ARM_IDLECT2_ASM_OFFSET 0x08
45 45
46#define TCMIF_ASM_BASE IO_ADDRESS(0xfffecc00) 46#define TCMIF_ASM_BASE OMAP1_IO_ADDRESS(0xfffecc00)
47#define EMIFS_CONFIG_ASM_OFFSET 0x0c 47#define EMIFS_CONFIG_ASM_OFFSET 0x0c
48#define EMIFF_SDRAM_CONFIG_ASM_OFFSET 0x20 48#define EMIFF_SDRAM_CONFIG_ASM_OFFSET 0x20
49 49
diff --git a/arch/arm/mach-omap1/serial.c b/arch/arm/mach-omap1/serial.c
index f754cee4f3c3..d496e50fec40 100644
--- a/arch/arm/mach-omap1/serial.c
+++ b/arch/arm/mach-omap1/serial.c
@@ -64,7 +64,7 @@ static void __init omap_serial_reset(struct plat_serial8250_port *p)
64 64
65static struct plat_serial8250_port serial_platform_data[] = { 65static struct plat_serial8250_port serial_platform_data[] = {
66 { 66 {
67 .membase = IO_ADDRESS(OMAP_UART1_BASE), 67 .membase = OMAP1_IO_ADDRESS(OMAP_UART1_BASE),
68 .mapbase = OMAP_UART1_BASE, 68 .mapbase = OMAP_UART1_BASE,
69 .irq = INT_UART1, 69 .irq = INT_UART1,
70 .flags = UPF_BOOT_AUTOCONF, 70 .flags = UPF_BOOT_AUTOCONF,
@@ -73,7 +73,7 @@ static struct plat_serial8250_port serial_platform_data[] = {
73 .uartclk = OMAP16XX_BASE_BAUD * 16, 73 .uartclk = OMAP16XX_BASE_BAUD * 16,
74 }, 74 },
75 { 75 {
76 .membase = IO_ADDRESS(OMAP_UART2_BASE), 76 .membase = OMAP1_IO_ADDRESS(OMAP_UART2_BASE),
77 .mapbase = OMAP_UART2_BASE, 77 .mapbase = OMAP_UART2_BASE,
78 .irq = INT_UART2, 78 .irq = INT_UART2,
79 .flags = UPF_BOOT_AUTOCONF, 79 .flags = UPF_BOOT_AUTOCONF,
@@ -82,7 +82,7 @@ static struct plat_serial8250_port serial_platform_data[] = {
82 .uartclk = OMAP16XX_BASE_BAUD * 16, 82 .uartclk = OMAP16XX_BASE_BAUD * 16,
83 }, 83 },
84 { 84 {
85 .membase = IO_ADDRESS(OMAP_UART3_BASE), 85 .membase = OMAP1_IO_ADDRESS(OMAP_UART3_BASE),
86 .mapbase = OMAP_UART3_BASE, 86 .mapbase = OMAP_UART3_BASE,
87 .irq = INT_UART3, 87 .irq = INT_UART3,
88 .flags = UPF_BOOT_AUTOCONF, 88 .flags = UPF_BOOT_AUTOCONF,
@@ -109,7 +109,6 @@ static struct platform_device serial_device = {
109void __init omap_serial_init(void) 109void __init omap_serial_init(void)
110{ 110{
111 int i; 111 int i;
112 const struct omap_uart_config *info;
113 112
114 if (cpu_is_omap730()) { 113 if (cpu_is_omap730()) {
115 serial_platform_data[0].regshift = 0; 114 serial_platform_data[0].regshift = 0;
@@ -131,19 +130,9 @@ void __init omap_serial_init(void)
131 serial_platform_data[2].uartclk = OMAP1510_BASE_BAUD * 16; 130 serial_platform_data[2].uartclk = OMAP1510_BASE_BAUD * 16;
132 } 131 }
133 132
134 info = omap_get_config(OMAP_TAG_UART, struct omap_uart_config);
135 if (info == NULL)
136 return;
137
138 for (i = 0; i < OMAP_MAX_NR_PORTS; i++) { 133 for (i = 0; i < OMAP_MAX_NR_PORTS; i++) {
139 unsigned char reg; 134 unsigned char reg;
140 135
141 if (!((1 << i) & info->enabled_uarts)) {
142 serial_platform_data[i].membase = NULL;
143 serial_platform_data[i].mapbase = 0;
144 continue;
145 }
146
147 switch (i) { 136 switch (i) {
148 case 0: 137 case 0:
149 uart1_ck = clk_get(NULL, "uart1_ck"); 138 uart1_ck = clk_get(NULL, "uart1_ck");
diff --git a/arch/arm/mach-omap1/sram.S b/arch/arm/mach-omap1/sram.S
index 261cdc48228b..7724e520d07c 100644
--- a/arch/arm/mach-omap1/sram.S
+++ b/arch/arm/mach-omap1/sram.S
@@ -21,13 +21,13 @@
21ENTRY(omap1_sram_reprogram_clock) 21ENTRY(omap1_sram_reprogram_clock)
22 stmfd sp!, {r0 - r12, lr} @ save registers on stack 22 stmfd sp!, {r0 - r12, lr} @ save registers on stack
23 23
24 mov r2, #IO_ADDRESS(DPLL_CTL) & 0xff000000 24 mov r2, #OMAP1_IO_ADDRESS(DPLL_CTL) & 0xff000000
25 orr r2, r2, #IO_ADDRESS(DPLL_CTL) & 0x00ff0000 25 orr r2, r2, #OMAP1_IO_ADDRESS(DPLL_CTL) & 0x00ff0000
26 orr r2, r2, #IO_ADDRESS(DPLL_CTL) & 0x0000ff00 26 orr r2, r2, #OMAP1_IO_ADDRESS(DPLL_CTL) & 0x0000ff00
27 27
28 mov r3, #IO_ADDRESS(ARM_CKCTL) & 0xff000000 28 mov r3, #OMAP1_IO_ADDRESS(ARM_CKCTL) & 0xff000000
29 orr r3, r3, #IO_ADDRESS(ARM_CKCTL) & 0x00ff0000 29 orr r3, r3, #OMAP1_IO_ADDRESS(ARM_CKCTL) & 0x00ff0000
30 orr r3, r3, #IO_ADDRESS(ARM_CKCTL) & 0x0000ff00 30 orr r3, r3, #OMAP1_IO_ADDRESS(ARM_CKCTL) & 0x0000ff00
31 31
32 tst r0, #1 << 4 @ want lock mode? 32 tst r0, #1 << 4 @ want lock mode?
33 beq newck @ nope 33 beq newck @ nope
diff --git a/arch/arm/mach-omap1/time.c b/arch/arm/mach-omap1/time.c
index 4d56408d3cff..1be6a214d88d 100644
--- a/arch/arm/mach-omap1/time.c
+++ b/arch/arm/mach-omap1/time.c
@@ -62,8 +62,8 @@ typedef struct {
62 u32 read_tim; /* READ_TIM, R */ 62 u32 read_tim; /* READ_TIM, R */
63} omap_mpu_timer_regs_t; 63} omap_mpu_timer_regs_t;
64 64
65#define omap_mpu_timer_base(n) \ 65#define omap_mpu_timer_base(n) \
66((volatile omap_mpu_timer_regs_t*)IO_ADDRESS(OMAP_MPU_TIMER_BASE + \ 66((volatile omap_mpu_timer_regs_t*)OMAP1_IO_ADDRESS(OMAP_MPU_TIMER_BASE + \
67 (n)*OMAP_MPU_TIMER_OFFSET)) 67 (n)*OMAP_MPU_TIMER_OFFSET))
68 68
69static inline unsigned long omap_mpu_timer_read(int nr) 69static inline unsigned long omap_mpu_timer_read(int nr)
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index a755eb5e2361..75b1c7efae7e 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -31,6 +31,11 @@ config MACH_OMAP_GENERIC
31 bool "Generic OMAP board" 31 bool "Generic OMAP board"
32 depends on ARCH_OMAP2 && ARCH_OMAP24XX 32 depends on ARCH_OMAP2 && ARCH_OMAP24XX
33 33
34config MACH_OMAP2_TUSB6010
35 bool
36 depends on ARCH_OMAP2 && ARCH_OMAP2420
37 default y if MACH_NOKIA_N8X0
38
34config MACH_OMAP_H4 39config MACH_OMAP_H4
35 bool "OMAP 2420 H4 board" 40 bool "OMAP 2420 H4 board"
36 depends on ARCH_OMAP2 && ARCH_OMAP24XX 41 depends on ARCH_OMAP2 && ARCH_OMAP24XX
@@ -68,6 +73,10 @@ config MACH_OMAP_3430SDP
68 bool "OMAP 3430 SDP board" 73 bool "OMAP 3430 SDP board"
69 depends on ARCH_OMAP3 && ARCH_OMAP34XX 74 depends on ARCH_OMAP3 && ARCH_OMAP34XX
70 75
76config MACH_NOKIA_N8X0
77 bool "Nokia N800/N810"
78 depends on ARCH_OMAP2420
79
71config MACH_NOKIA_RX51 80config MACH_NOKIA_RX51
72 bool "Nokia RX-51 board" 81 bool "Nokia RX-51 board"
73 depends on ARCH_OMAP3 && ARCH_OMAP34XX 82 depends on ARCH_OMAP3 && ARCH_OMAP34XX
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 735bae5b0dec..8cb16777661a 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -5,7 +5,7 @@
5# Common support 5# Common support
6obj-y := id.o io.o control.o mux.o devices.o serial.o gpmc.o timer-gp.o 6obj-y := id.o io.o control.o mux.o devices.o serial.o gpmc.o timer-gp.o
7 7
8omap-2-3-common = irq.o sdrc.o 8omap-2-3-common = irq.o sdrc.o omap_hwmod.o
9prcm-common = prcm.o powerdomain.o 9prcm-common = prcm.o powerdomain.o
10clock-common = clock.o clockdomain.o 10clock-common = clock.o clockdomain.o
11 11
@@ -35,6 +35,11 @@ obj-$(CONFIG_ARCH_OMAP3) += pm34xx.o sleep34xx.o
35obj-$(CONFIG_PM_DEBUG) += pm-debug.o 35obj-$(CONFIG_PM_DEBUG) += pm-debug.o
36endif 36endif
37 37
38# PRCM
39obj-$(CONFIG_ARCH_OMAP2) += cm.o
40obj-$(CONFIG_ARCH_OMAP3) += cm.o
41obj-$(CONFIG_ARCH_OMAP4) += cm4xxx.o
42
38# Clock framework 43# Clock framework
39obj-$(CONFIG_ARCH_OMAP2) += clock24xx.o 44obj-$(CONFIG_ARCH_OMAP2) += clock24xx.o
40obj-$(CONFIG_ARCH_OMAP3) += clock34xx.o 45obj-$(CONFIG_ARCH_OMAP3) += clock34xx.o
@@ -62,7 +67,7 @@ obj-$(CONFIG_MACH_OMAP3_PANDORA) += board-omap3pandora.o \
62 mmc-twl4030.o 67 mmc-twl4030.o
63obj-$(CONFIG_MACH_OMAP_3430SDP) += board-3430sdp.o \ 68obj-$(CONFIG_MACH_OMAP_3430SDP) += board-3430sdp.o \
64 mmc-twl4030.o 69 mmc-twl4030.o
65 70obj-$(CONFIG_MACH_NOKIA_N8X0) += board-n8x0.o
66obj-$(CONFIG_MACH_NOKIA_RX51) += board-rx51.o \ 71obj-$(CONFIG_MACH_NOKIA_RX51) += board-rx51.o \
67 board-rx51-peripherals.o \ 72 board-rx51-peripherals.o \
68 mmc-twl4030.o 73 mmc-twl4030.o
@@ -74,6 +79,7 @@ obj-$(CONFIG_MACH_OMAP_4430SDP) += board-4430sdp.o
74 79
75# Platform specific device init code 80# Platform specific device init code
76obj-y += usb-musb.o 81obj-y += usb-musb.o
82obj-$(CONFIG_MACH_OMAP2_TUSB6010) += usb-tusb6010.o
77 83
78onenand-$(CONFIG_MTD_ONENAND_OMAP2) := gpmc-onenand.o 84onenand-$(CONFIG_MTD_ONENAND_OMAP2) := gpmc-onenand.o
79obj-y += $(onenand-m) $(onenand-y) 85obj-y += $(onenand-m) $(onenand-y)
diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
index 8ec2a132904d..42217b32f835 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -139,23 +139,19 @@ static inline void board_smc91x_init(void)
139 139
140#endif 140#endif
141 141
142static struct omap_board_config_kernel sdp2430_config[] = {
143 {OMAP_TAG_LCD, &sdp2430_lcd_config},
144};
145
142static void __init omap_2430sdp_init_irq(void) 146static void __init omap_2430sdp_init_irq(void)
143{ 147{
148 omap_board_config = sdp2430_config;
149 omap_board_config_size = ARRAY_SIZE(sdp2430_config);
144 omap2_init_common_hw(NULL, NULL); 150 omap2_init_common_hw(NULL, NULL);
145 omap_init_irq(); 151 omap_init_irq();
146 omap_gpio_init(); 152 omap_gpio_init();
147} 153}
148 154
149static struct omap_uart_config sdp2430_uart_config __initdata = {
150 .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
151};
152
153static struct omap_board_config_kernel sdp2430_config[] = {
154 {OMAP_TAG_UART, &sdp2430_uart_config},
155 {OMAP_TAG_LCD, &sdp2430_lcd_config},
156};
157
158
159static struct twl4030_gpio_platform_data sdp2430_gpio_data = { 155static struct twl4030_gpio_platform_data sdp2430_gpio_data = {
160 .gpio_base = OMAP_MAX_GPIO_LINES, 156 .gpio_base = OMAP_MAX_GPIO_LINES,
161 .irq_base = TWL4030_GPIO_IRQ_BASE, 157 .irq_base = TWL4030_GPIO_IRQ_BASE,
@@ -205,8 +201,6 @@ static void __init omap_2430sdp_init(void)
205 omap2430_i2c_init(); 201 omap2430_i2c_init();
206 202
207 platform_add_devices(sdp2430_devices, ARRAY_SIZE(sdp2430_devices)); 203 platform_add_devices(sdp2430_devices, ARRAY_SIZE(sdp2430_devices));
208 omap_board_config = sdp2430_config;
209 omap_board_config_size = ARRAY_SIZE(sdp2430_config);
210 omap_serial_init(); 204 omap_serial_init();
211 twl4030_mmc_init(mmc); 205 twl4030_mmc_init(mmc);
212 usb_musb_init(); 206 usb_musb_init();
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
index ac262cd74503..bd57ec76dc5e 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -167,26 +167,23 @@ static struct platform_device *sdp3430_devices[] __initdata = {
167 &sdp3430_lcd_device, 167 &sdp3430_lcd_device,
168}; 168};
169 169
170static void __init omap_3430sdp_init_irq(void)
171{
172 omap2_init_common_hw(hyb18m512160af6_sdrc_params, NULL);
173 omap_init_irq();
174 omap_gpio_init();
175}
176
177static struct omap_uart_config sdp3430_uart_config __initdata = {
178 .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
179};
180
181static struct omap_lcd_config sdp3430_lcd_config __initdata = { 170static struct omap_lcd_config sdp3430_lcd_config __initdata = {
182 .ctrl_name = "internal", 171 .ctrl_name = "internal",
183}; 172};
184 173
185static struct omap_board_config_kernel sdp3430_config[] __initdata = { 174static struct omap_board_config_kernel sdp3430_config[] __initdata = {
186 { OMAP_TAG_UART, &sdp3430_uart_config },
187 { OMAP_TAG_LCD, &sdp3430_lcd_config }, 175 { OMAP_TAG_LCD, &sdp3430_lcd_config },
188}; 176};
189 177
178static void __init omap_3430sdp_init_irq(void)
179{
180 omap_board_config = sdp3430_config;
181 omap_board_config_size = ARRAY_SIZE(sdp3430_config);
182 omap2_init_common_hw(hyb18m512160af6_sdrc_params, NULL);
183 omap_init_irq();
184 omap_gpio_init();
185}
186
190static int sdp3430_batt_table[] = { 187static int sdp3430_batt_table[] = {
191/* 0 C*/ 188/* 0 C*/
19230800, 29500, 28300, 27100, 18930800, 29500, 28300, 27100,
@@ -478,12 +475,15 @@ static inline void board_smc91x_init(void)
478 475
479#endif 476#endif
480 477
478static void enable_board_wakeup_source(void)
479{
480 omap_cfg_reg(AF26_34XX_SYS_NIRQ); /* T2 interrupt line (keypad) */
481}
482
481static void __init omap_3430sdp_init(void) 483static void __init omap_3430sdp_init(void)
482{ 484{
483 omap3430_i2c_init(); 485 omap3430_i2c_init();
484 platform_add_devices(sdp3430_devices, ARRAY_SIZE(sdp3430_devices)); 486 platform_add_devices(sdp3430_devices, ARRAY_SIZE(sdp3430_devices));
485 omap_board_config = sdp3430_config;
486 omap_board_config_size = ARRAY_SIZE(sdp3430_config);
487 if (omap_rev() > OMAP3430_REV_ES1_0) 487 if (omap_rev() > OMAP3430_REV_ES1_0)
488 ts_gpio = SDP3430_TS_GPIO_IRQ_SDPV2; 488 ts_gpio = SDP3430_TS_GPIO_IRQ_SDPV2;
489 else 489 else
@@ -495,6 +495,7 @@ static void __init omap_3430sdp_init(void)
495 omap_serial_init(); 495 omap_serial_init();
496 usb_musb_init(); 496 usb_musb_init();
497 board_smc91x_init(); 497 board_smc91x_init();
498 enable_board_wakeup_source();
498} 499}
499 500
500static void __init omap_3430sdp_map_io(void) 501static void __init omap_3430sdp_map_io(void)
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index 1b223076ceb7..eb37c40ea83a 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -47,14 +47,13 @@ static struct omap_lcd_config sdp4430_lcd_config __initdata = {
47}; 47};
48 48
49static struct omap_board_config_kernel sdp4430_config[] __initdata = { 49static struct omap_board_config_kernel sdp4430_config[] __initdata = {
50 { OMAP_TAG_UART, &sdp4430_uart_config },
51 { OMAP_TAG_LCD, &sdp4430_lcd_config }, 50 { OMAP_TAG_LCD, &sdp4430_lcd_config },
52}; 51};
53 52
54static void __init gic_init_irq(void) 53static void __init gic_init_irq(void)
55{ 54{
56 gic_dist_init(0, IO_ADDRESS(OMAP44XX_GIC_DIST_BASE), 29); 55 gic_dist_init(0, OMAP2_IO_ADDRESS(OMAP44XX_GIC_DIST_BASE), 29);
57 gic_cpu_init(0, IO_ADDRESS(OMAP44XX_GIC_CPU_BASE)); 56 gic_cpu_init(0, OMAP2_IO_ADDRESS(OMAP44XX_GIC_CPU_BASE));
58} 57}
59 58
60static void __init omap_4430sdp_init_irq(void) 59static void __init omap_4430sdp_init_irq(void)
diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c
index dcfc20d03894..a1132288c701 100644
--- a/arch/arm/mach-omap2/board-apollon.c
+++ b/arch/arm/mach-omap2/board-apollon.c
@@ -87,7 +87,7 @@ static struct mtd_partition apollon_partitions[] = {
87 }, 87 },
88}; 88};
89 89
90static struct flash_platform_data apollon_flash_data = { 90static struct onenand_platform_data apollon_flash_data = {
91 .parts = apollon_partitions, 91 .parts = apollon_partitions,
92 .nr_parts = ARRAY_SIZE(apollon_partitions), 92 .nr_parts = ARRAY_SIZE(apollon_partitions),
93}; 93};
@@ -99,7 +99,7 @@ static struct resource apollon_flash_resource[] = {
99}; 99};
100 100
101static struct platform_device apollon_onenand_device = { 101static struct platform_device apollon_onenand_device = {
102 .name = "onenand", 102 .name = "onenand-flash",
103 .id = -1, 103 .id = -1,
104 .dev = { 104 .dev = {
105 .platform_data = &apollon_flash_data, 105 .platform_data = &apollon_flash_data,
@@ -248,18 +248,6 @@ out:
248 clk_put(gpmc_fck); 248 clk_put(gpmc_fck);
249} 249}
250 250
251static void __init omap_apollon_init_irq(void)
252{
253 omap2_init_common_hw(NULL, NULL);
254 omap_init_irq();
255 omap_gpio_init();
256 apollon_init_smc91x();
257}
258
259static struct omap_uart_config apollon_uart_config __initdata = {
260 .enabled_uarts = (1 << 0) | (0 << 1) | (0 << 2),
261};
262
263static struct omap_usb_config apollon_usb_config __initdata = { 251static struct omap_usb_config apollon_usb_config __initdata = {
264 .register_dev = 1, 252 .register_dev = 1,
265 .hmc_mode = 0x14, /* 0:dev 1:host1 2:disable */ 253 .hmc_mode = 0x14, /* 0:dev 1:host1 2:disable */
@@ -272,10 +260,19 @@ static struct omap_lcd_config apollon_lcd_config __initdata = {
272}; 260};
273 261
274static struct omap_board_config_kernel apollon_config[] = { 262static struct omap_board_config_kernel apollon_config[] = {
275 { OMAP_TAG_UART, &apollon_uart_config },
276 { OMAP_TAG_LCD, &apollon_lcd_config }, 263 { OMAP_TAG_LCD, &apollon_lcd_config },
277}; 264};
278 265
266static void __init omap_apollon_init_irq(void)
267{
268 omap_board_config = apollon_config;
269 omap_board_config_size = ARRAY_SIZE(apollon_config);
270 omap2_init_common_hw(NULL, NULL);
271 omap_init_irq();
272 omap_gpio_init();
273 apollon_init_smc91x();
274}
275
279static void __init apollon_led_init(void) 276static void __init apollon_led_init(void)
280{ 277{
281 /* LED0 - AA10 */ 278 /* LED0 - AA10 */
@@ -324,8 +321,6 @@ static void __init omap_apollon_init(void)
324 * if not needed. 321 * if not needed.
325 */ 322 */
326 platform_add_devices(apollon_devices, ARRAY_SIZE(apollon_devices)); 323 platform_add_devices(apollon_devices, ARRAY_SIZE(apollon_devices));
327 omap_board_config = apollon_config;
328 omap_board_config_size = ARRAY_SIZE(apollon_config);
329 omap_serial_init(); 324 omap_serial_init();
330} 325}
331 326
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index fd00aa03690c..2e09a1c444cb 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -31,24 +31,19 @@
31#include <mach/board.h> 31#include <mach/board.h>
32#include <mach/common.h> 32#include <mach/common.h>
33 33
34static struct omap_board_config_kernel generic_config[] = {
35};
36
34static void __init omap_generic_init_irq(void) 37static void __init omap_generic_init_irq(void)
35{ 38{
39 omap_board_config = generic_config;
40 omap_board_config_size = ARRAY_SIZE(generic_config);
36 omap2_init_common_hw(NULL, NULL); 41 omap2_init_common_hw(NULL, NULL);
37 omap_init_irq(); 42 omap_init_irq();
38} 43}
39 44
40static struct omap_uart_config generic_uart_config __initdata = {
41 .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
42};
43
44static struct omap_board_config_kernel generic_config[] = {
45 { OMAP_TAG_UART, &generic_uart_config },
46};
47
48static void __init omap_generic_init(void) 45static void __init omap_generic_init(void)
49{ 46{
50 omap_board_config = generic_config;
51 omap_board_config_size = ARRAY_SIZE(generic_config);
52 omap_serial_init(); 47 omap_serial_init();
53} 48}
54 49
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c
index 7b1d61d5bb2c..eaa02d012c5c 100644
--- a/arch/arm/mach-omap2/board-h4.c
+++ b/arch/arm/mach-omap2/board-h4.c
@@ -268,18 +268,6 @@ static void __init h4_init_flash(void)
268 h4_flash_resource.end = base + SZ_64M - 1; 268 h4_flash_resource.end = base + SZ_64M - 1;
269} 269}
270 270
271static void __init omap_h4_init_irq(void)
272{
273 omap2_init_common_hw(NULL, NULL);
274 omap_init_irq();
275 omap_gpio_init();
276 h4_init_flash();
277}
278
279static struct omap_uart_config h4_uart_config __initdata = {
280 .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
281};
282
283static struct omap_lcd_config h4_lcd_config __initdata = { 271static struct omap_lcd_config h4_lcd_config __initdata = {
284 .ctrl_name = "internal", 272 .ctrl_name = "internal",
285}; 273};
@@ -318,10 +306,19 @@ static struct omap_usb_config h4_usb_config __initdata = {
318}; 306};
319 307
320static struct omap_board_config_kernel h4_config[] = { 308static struct omap_board_config_kernel h4_config[] = {
321 { OMAP_TAG_UART, &h4_uart_config },
322 { OMAP_TAG_LCD, &h4_lcd_config }, 309 { OMAP_TAG_LCD, &h4_lcd_config },
323}; 310};
324 311
312static void __init omap_h4_init_irq(void)
313{
314 omap_board_config = h4_config;
315 omap_board_config_size = ARRAY_SIZE(h4_config);
316 omap2_init_common_hw(NULL, NULL);
317 omap_init_irq();
318 omap_gpio_init();
319 h4_init_flash();
320}
321
325static struct at24_platform_data m24c01 = { 322static struct at24_platform_data m24c01 = {
326 .byte_len = SZ_1K / 8, 323 .byte_len = SZ_1K / 8,
327 .page_size = 16, 324 .page_size = 16,
@@ -366,8 +363,6 @@ static void __init omap_h4_init(void)
366 ARRAY_SIZE(h4_i2c_board_info)); 363 ARRAY_SIZE(h4_i2c_board_info));
367 364
368 platform_add_devices(h4_devices, ARRAY_SIZE(h4_devices)); 365 platform_add_devices(h4_devices, ARRAY_SIZE(h4_devices));
369 omap_board_config = h4_config;
370 omap_board_config_size = ARRAY_SIZE(h4_config);
371 omap_usb_init(&h4_usb_config); 366 omap_usb_init(&h4_usb_config);
372 omap_serial_init(); 367 omap_serial_init();
373} 368}
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
index ea383f88cb1b..ec6854cbdd9f 100644
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -268,18 +268,6 @@ static inline void __init ldp_init_smsc911x(void)
268 gpio_direction_input(eth_gpio); 268 gpio_direction_input(eth_gpio);
269} 269}
270 270
271static void __init omap_ldp_init_irq(void)
272{
273 omap2_init_common_hw(NULL, NULL);
274 omap_init_irq();
275 omap_gpio_init();
276 ldp_init_smsc911x();
277}
278
279static struct omap_uart_config ldp_uart_config __initdata = {
280 .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
281};
282
283static struct platform_device ldp_lcd_device = { 271static struct platform_device ldp_lcd_device = {
284 .name = "ldp_lcd", 272 .name = "ldp_lcd",
285 .id = -1, 273 .id = -1,
@@ -290,10 +278,19 @@ static struct omap_lcd_config ldp_lcd_config __initdata = {
290}; 278};
291 279
292static struct omap_board_config_kernel ldp_config[] __initdata = { 280static struct omap_board_config_kernel ldp_config[] __initdata = {
293 { OMAP_TAG_UART, &ldp_uart_config },
294 { OMAP_TAG_LCD, &ldp_lcd_config }, 281 { OMAP_TAG_LCD, &ldp_lcd_config },
295}; 282};
296 283
284static void __init omap_ldp_init_irq(void)
285{
286 omap_board_config = ldp_config;
287 omap_board_config_size = ARRAY_SIZE(ldp_config);
288 omap2_init_common_hw(NULL, NULL);
289 omap_init_irq();
290 omap_gpio_init();
291 ldp_init_smsc911x();
292}
293
297static struct twl4030_usb_data ldp_usb_data = { 294static struct twl4030_usb_data ldp_usb_data = {
298 .usb_mode = T2_USB_MODE_ULPI, 295 .usb_mode = T2_USB_MODE_ULPI,
299}; 296};
@@ -377,8 +374,6 @@ static void __init omap_ldp_init(void)
377{ 374{
378 omap_i2c_init(); 375 omap_i2c_init();
379 platform_add_devices(ldp_devices, ARRAY_SIZE(ldp_devices)); 376 platform_add_devices(ldp_devices, ARRAY_SIZE(ldp_devices));
380 omap_board_config = ldp_config;
381 omap_board_config_size = ARRAY_SIZE(ldp_config);
382 ts_gpio = 54; 377 ts_gpio = 54;
383 ldp_spi_board_info[0].irq = gpio_to_irq(ts_gpio); 378 ldp_spi_board_info[0].irq = gpio_to_irq(ts_gpio);
384 spi_register_board_info(ldp_spi_board_info, 379 spi_register_board_info(ldp_spi_board_info,
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
new file mode 100644
index 000000000000..8341632d260b
--- /dev/null
+++ b/arch/arm/mach-omap2/board-n8x0.c
@@ -0,0 +1,150 @@
1/*
2 * linux/arch/arm/mach-omap2/board-n8x0.c
3 *
4 * Copyright (C) 2005-2009 Nokia Corporation
5 * Author: Juha Yrjola <juha.yrjola@nokia.com>
6 *
7 * Modified from mach-omap2/board-generic.c
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13
14#include <linux/clk.h>
15#include <linux/delay.h>
16#include <linux/gpio.h>
17#include <linux/init.h>
18#include <linux/io.h>
19#include <linux/stddef.h>
20#include <linux/spi/spi.h>
21#include <linux/usb/musb.h>
22
23#include <asm/mach/arch.h>
24#include <asm/mach-types.h>
25
26#include <mach/board.h>
27#include <mach/common.h>
28#include <mach/irqs.h>
29#include <mach/mcspi.h>
30#include <mach/onenand.h>
31#include <mach/serial.h>
32
33static struct omap2_mcspi_device_config p54spi_mcspi_config = {
34 .turbo_mode = 0,
35 .single_channel = 1,
36};
37
38static struct spi_board_info n800_spi_board_info[] __initdata = {
39 {
40 .modalias = "p54spi",
41 .bus_num = 2,
42 .chip_select = 0,
43 .max_speed_hz = 48000000,
44 .controller_data = &p54spi_mcspi_config,
45 },
46};
47
48#if defined(CONFIG_MTD_ONENAND_OMAP2) || \
49 defined(CONFIG_MTD_ONENAND_OMAP2_MODULE)
50
51static struct mtd_partition onenand_partitions[] = {
52 {
53 .name = "bootloader",
54 .offset = 0,
55 .size = 0x20000,
56 .mask_flags = MTD_WRITEABLE, /* Force read-only */
57 },
58 {
59 .name = "config",
60 .offset = MTDPART_OFS_APPEND,
61 .size = 0x60000,
62 },
63 {
64 .name = "kernel",
65 .offset = MTDPART_OFS_APPEND,
66 .size = 0x200000,
67 },
68 {
69 .name = "initfs",
70 .offset = MTDPART_OFS_APPEND,
71 .size = 0x400000,
72 },
73 {
74 .name = "rootfs",
75 .offset = MTDPART_OFS_APPEND,
76 .size = MTDPART_SIZ_FULL,
77 },
78};
79
80static struct omap_onenand_platform_data board_onenand_data = {
81 .cs = 0,
82 .gpio_irq = 26,
83 .parts = onenand_partitions,
84 .nr_parts = ARRAY_SIZE(onenand_partitions),
85 .flags = ONENAND_SYNC_READ,
86};
87
88static void __init n8x0_onenand_init(void)
89{
90 gpmc_onenand_init(&board_onenand_data);
91}
92
93#else
94
95static void __init n8x0_onenand_init(void) {}
96
97#endif
98
99static void __init n8x0_map_io(void)
100{
101 omap2_set_globals_242x();
102 omap2_map_common_io();
103}
104
105static void __init n8x0_init_irq(void)
106{
107 omap2_init_common_hw(NULL, NULL);
108 omap_init_irq();
109 omap_gpio_init();
110}
111
112static void __init n8x0_init_machine(void)
113{
114 /* FIXME: add n810 spi devices */
115 spi_register_board_info(n800_spi_board_info,
116 ARRAY_SIZE(n800_spi_board_info));
117
118 omap_serial_init();
119 n8x0_onenand_init();
120}
121
122MACHINE_START(NOKIA_N800, "Nokia N800")
123 .phys_io = 0x48000000,
124 .io_pg_offst = ((0xd8000000) >> 18) & 0xfffc,
125 .boot_params = 0x80000100,
126 .map_io = n8x0_map_io,
127 .init_irq = n8x0_init_irq,
128 .init_machine = n8x0_init_machine,
129 .timer = &omap_timer,
130MACHINE_END
131
132MACHINE_START(NOKIA_N810, "Nokia N810")
133 .phys_io = 0x48000000,
134 .io_pg_offst = ((0xd8000000) >> 18) & 0xfffc,
135 .boot_params = 0x80000100,
136 .map_io = n8x0_map_io,
137 .init_irq = n8x0_init_irq,
138 .init_machine = n8x0_init_machine,
139 .timer = &omap_timer,
140MACHINE_END
141
142MACHINE_START(NOKIA_N810_WIMAX, "Nokia N810 WiMAX")
143 .phys_io = 0x48000000,
144 .io_pg_offst = ((0xd8000000) >> 18) & 0xfffc,
145 .boot_params = 0x80000100,
146 .map_io = n8x0_map_io,
147 .init_irq = n8x0_init_irq,
148 .init_machine = n8x0_init_machine,
149 .timer = &omap_timer,
150MACHINE_END
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index e00ba128cece..500c9956876d 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -108,10 +108,6 @@ static struct platform_device omap3beagle_nand_device = {
108 108
109#include "sdram-micron-mt46h32m32lf-6.h" 109#include "sdram-micron-mt46h32m32lf-6.h"
110 110
111static struct omap_uart_config omap3_beagle_uart_config __initdata = {
112 .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
113};
114
115static struct twl4030_hsmmc_info mmc[] = { 111static struct twl4030_hsmmc_info mmc[] = {
116 { 112 {
117 .mmc = 1, 113 .mmc = 1,
@@ -249,11 +245,16 @@ static struct regulator_init_data beagle_vpll2 = {
249 .consumer_supplies = &beagle_vdvi_supply, 245 .consumer_supplies = &beagle_vdvi_supply,
250}; 246};
251 247
248static struct twl4030_usb_data beagle_usb_data = {
249 .usb_mode = T2_USB_MODE_ULPI,
250};
251
252static struct twl4030_platform_data beagle_twldata = { 252static struct twl4030_platform_data beagle_twldata = {
253 .irq_base = TWL4030_IRQ_BASE, 253 .irq_base = TWL4030_IRQ_BASE,
254 .irq_end = TWL4030_IRQ_END, 254 .irq_end = TWL4030_IRQ_END,
255 255
256 /* platform_data for children goes here */ 256 /* platform_data for children goes here */
257 .usb = &beagle_usb_data,
257 .gpio = &beagle_gpio_data, 258 .gpio = &beagle_gpio_data,
258 .vmmc1 = &beagle_vmmc1, 259 .vmmc1 = &beagle_vmmc1,
259 .vsim = &beagle_vsim, 260 .vsim = &beagle_vsim,
@@ -280,17 +281,6 @@ static int __init omap3_beagle_i2c_init(void)
280 return 0; 281 return 0;
281} 282}
282 283
283static void __init omap3_beagle_init_irq(void)
284{
285 omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
286 mt46h32m32lf6_sdrc_params);
287 omap_init_irq();
288#ifdef CONFIG_OMAP_32K_TIMER
289 omap2_gp_clockevent_set_gptimer(12);
290#endif
291 omap_gpio_init();
292}
293
294static struct gpio_led gpio_leds[] = { 284static struct gpio_led gpio_leds[] = {
295 { 285 {
296 .name = "beagleboard::usr0", 286 .name = "beagleboard::usr0",
@@ -345,10 +335,22 @@ static struct platform_device keys_gpio = {
345}; 335};
346 336
347static struct omap_board_config_kernel omap3_beagle_config[] __initdata = { 337static struct omap_board_config_kernel omap3_beagle_config[] __initdata = {
348 { OMAP_TAG_UART, &omap3_beagle_uart_config },
349 { OMAP_TAG_LCD, &omap3_beagle_lcd_config }, 338 { OMAP_TAG_LCD, &omap3_beagle_lcd_config },
350}; 339};
351 340
341static void __init omap3_beagle_init_irq(void)
342{
343 omap_board_config = omap3_beagle_config;
344 omap_board_config_size = ARRAY_SIZE(omap3_beagle_config);
345 omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
346 mt46h32m32lf6_sdrc_params);
347 omap_init_irq();
348#ifdef CONFIG_OMAP_32K_TIMER
349 omap2_gp_clockevent_set_gptimer(12);
350#endif
351 omap_gpio_init();
352}
353
352static struct platform_device *omap3_beagle_devices[] __initdata = { 354static struct platform_device *omap3_beagle_devices[] __initdata = {
353 &omap3_beagle_lcd_device, 355 &omap3_beagle_lcd_device,
354 &leds_gpio, 356 &leds_gpio,
@@ -398,8 +400,6 @@ static void __init omap3_beagle_init(void)
398 omap3_beagle_i2c_init(); 400 omap3_beagle_i2c_init();
399 platform_add_devices(omap3_beagle_devices, 401 platform_add_devices(omap3_beagle_devices,
400 ARRAY_SIZE(omap3_beagle_devices)); 402 ARRAY_SIZE(omap3_beagle_devices));
401 omap_board_config = omap3_beagle_config;
402 omap_board_config_size = ARRAY_SIZE(omap3_beagle_config);
403 omap_serial_init(); 403 omap_serial_init();
404 404
405 omap_cfg_reg(J25_34XX_GPIO170); 405 omap_cfg_reg(J25_34XX_GPIO170);
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index c4b144647dc5..d50b9be90580 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -92,10 +92,6 @@ static inline void __init omap3evm_init_smc911x(void)
92 gpio_direction_input(OMAP3EVM_ETHR_GPIO_IRQ); 92 gpio_direction_input(OMAP3EVM_ETHR_GPIO_IRQ);
93} 93}
94 94
95static struct omap_uart_config omap3_evm_uart_config __initdata = {
96 .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
97};
98
99static struct twl4030_hsmmc_info mmc[] = { 95static struct twl4030_hsmmc_info mmc[] = {
100 { 96 {
101 .mmc = 1, 97 .mmc = 1,
@@ -278,19 +274,20 @@ struct spi_board_info omap3evm_spi_board_info[] = {
278 }, 274 },
279}; 275};
280 276
277static struct omap_board_config_kernel omap3_evm_config[] __initdata = {
278 { OMAP_TAG_LCD, &omap3_evm_lcd_config },
279};
280
281static void __init omap3_evm_init_irq(void) 281static void __init omap3_evm_init_irq(void)
282{ 282{
283 omap_board_config = omap3_evm_config;
284 omap_board_config_size = ARRAY_SIZE(omap3_evm_config);
283 omap2_init_common_hw(mt46h32m32lf6_sdrc_params, NULL); 285 omap2_init_common_hw(mt46h32m32lf6_sdrc_params, NULL);
284 omap_init_irq(); 286 omap_init_irq();
285 omap_gpio_init(); 287 omap_gpio_init();
286 omap3evm_init_smc911x(); 288 omap3evm_init_smc911x();
287} 289}
288 290
289static struct omap_board_config_kernel omap3_evm_config[] __initdata = {
290 { OMAP_TAG_UART, &omap3_evm_uart_config },
291 { OMAP_TAG_LCD, &omap3_evm_lcd_config },
292};
293
294static struct platform_device *omap3_evm_devices[] __initdata = { 291static struct platform_device *omap3_evm_devices[] __initdata = {
295 &omap3_evm_lcd_device, 292 &omap3_evm_lcd_device,
296 &omap3evm_smc911x_device, 293 &omap3evm_smc911x_device,
@@ -301,8 +298,6 @@ static void __init omap3_evm_init(void)
301 omap3_evm_i2c_init(); 298 omap3_evm_i2c_init();
302 299
303 platform_add_devices(omap3_evm_devices, ARRAY_SIZE(omap3_evm_devices)); 300 platform_add_devices(omap3_evm_devices, ARRAY_SIZE(omap3_evm_devices));
304 omap_board_config = omap3_evm_config;
305 omap_board_config_size = ARRAY_SIZE(omap3_evm_config);
306 301
307 spi_register_board_info(omap3evm_spi_board_info, 302 spi_register_board_info(omap3evm_spi_board_info,
308 ARRAY_SIZE(omap3evm_spi_board_info)); 303 ARRAY_SIZE(omap3evm_spi_board_info));
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
index 864ee3d021f7..b43f6e36b6d9 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -213,10 +213,6 @@ static struct twl4030_hsmmc_info omap3pandora_mmc[] = {
213 {} /* Terminator */ 213 {} /* Terminator */
214}; 214};
215 215
216static struct omap_uart_config omap3pandora_uart_config __initdata = {
217 .enabled_uarts = (1 << 2), /* UART3 */
218};
219
220static struct regulator_consumer_supply pandora_vmmc1_supply = { 216static struct regulator_consumer_supply pandora_vmmc1_supply = {
221 .supply = "vmmc", 217 .supply = "vmmc",
222}; 218};
@@ -309,14 +305,6 @@ static int __init omap3pandora_i2c_init(void)
309 return 0; 305 return 0;
310} 306}
311 307
312static void __init omap3pandora_init_irq(void)
313{
314 omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
315 mt46h32m32lf6_sdrc_params);
316 omap_init_irq();
317 omap_gpio_init();
318}
319
320static void __init omap3pandora_ads7846_init(void) 308static void __init omap3pandora_ads7846_init(void)
321{ 309{
322 int gpio = OMAP3_PANDORA_TS_GPIO; 310 int gpio = OMAP3_PANDORA_TS_GPIO;
@@ -376,10 +364,19 @@ static struct omap_lcd_config omap3pandora_lcd_config __initdata = {
376}; 364};
377 365
378static struct omap_board_config_kernel omap3pandora_config[] __initdata = { 366static struct omap_board_config_kernel omap3pandora_config[] __initdata = {
379 { OMAP_TAG_UART, &omap3pandora_uart_config },
380 { OMAP_TAG_LCD, &omap3pandora_lcd_config }, 367 { OMAP_TAG_LCD, &omap3pandora_lcd_config },
381}; 368};
382 369
370static void __init omap3pandora_init_irq(void)
371{
372 omap_board_config = omap3pandora_config;
373 omap_board_config_size = ARRAY_SIZE(omap3pandora_config);
374 omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
375 mt46h32m32lf6_sdrc_params);
376 omap_init_irq();
377 omap_gpio_init();
378}
379
383static struct platform_device *omap3pandora_devices[] __initdata = { 380static struct platform_device *omap3pandora_devices[] __initdata = {
384 &omap3pandora_lcd_device, 381 &omap3pandora_lcd_device,
385 &pandora_leds_gpio, 382 &pandora_leds_gpio,
@@ -391,8 +388,6 @@ static void __init omap3pandora_init(void)
391 omap3pandora_i2c_init(); 388 omap3pandora_i2c_init();
392 platform_add_devices(omap3pandora_devices, 389 platform_add_devices(omap3pandora_devices,
393 ARRAY_SIZE(omap3pandora_devices)); 390 ARRAY_SIZE(omap3pandora_devices));
394 omap_board_config = omap3pandora_config;
395 omap_board_config_size = ARRAY_SIZE(omap3pandora_config);
396 omap_serial_init(); 391 omap_serial_init();
397 spi_register_board_info(omap3pandora_spi_board_info, 392 spi_register_board_info(omap3pandora_spi_board_info,
398 ARRAY_SIZE(omap3pandora_spi_board_info)); 393 ARRAY_SIZE(omap3pandora_spi_board_info));
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
index 6bce23004aa4..9917d2fddc2f 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -271,9 +271,6 @@ static void __init overo_flash_init(void)
271 printk(KERN_ERR "Unable to register NAND device\n"); 271 printk(KERN_ERR "Unable to register NAND device\n");
272 } 272 }
273} 273}
274static struct omap_uart_config overo_uart_config __initdata = {
275 .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
276};
277 274
278static struct twl4030_hsmmc_info mmc[] = { 275static struct twl4030_hsmmc_info mmc[] = {
279 { 276 {
@@ -360,14 +357,6 @@ static int __init overo_i2c_init(void)
360 return 0; 357 return 0;
361} 358}
362 359
363static void __init overo_init_irq(void)
364{
365 omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
366 mt46h32m32lf6_sdrc_params);
367 omap_init_irq();
368 omap_gpio_init();
369}
370
371static struct platform_device overo_lcd_device = { 360static struct platform_device overo_lcd_device = {
372 .name = "overo_lcd", 361 .name = "overo_lcd",
373 .id = -1, 362 .id = -1,
@@ -378,10 +367,19 @@ static struct omap_lcd_config overo_lcd_config __initdata = {
378}; 367};
379 368
380static struct omap_board_config_kernel overo_config[] __initdata = { 369static struct omap_board_config_kernel overo_config[] __initdata = {
381 { OMAP_TAG_UART, &overo_uart_config },
382 { OMAP_TAG_LCD, &overo_lcd_config }, 370 { OMAP_TAG_LCD, &overo_lcd_config },
383}; 371};
384 372
373static void __init overo_init_irq(void)
374{
375 omap_board_config = overo_config;
376 omap_board_config_size = ARRAY_SIZE(overo_config);
377 omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
378 mt46h32m32lf6_sdrc_params);
379 omap_init_irq();
380 omap_gpio_init();
381}
382
385static struct platform_device *overo_devices[] __initdata = { 383static struct platform_device *overo_devices[] __initdata = {
386 &overo_lcd_device, 384 &overo_lcd_device,
387}; 385};
@@ -390,8 +388,6 @@ static void __init overo_init(void)
390{ 388{
391 overo_i2c_init(); 389 overo_i2c_init();
392 platform_add_devices(overo_devices, ARRAY_SIZE(overo_devices)); 390 platform_add_devices(overo_devices, ARRAY_SIZE(overo_devices));
393 omap_board_config = overo_config;
394 omap_board_config_size = ARRAY_SIZE(overo_config);
395 omap_serial_init(); 391 omap_serial_init();
396 overo_flash_init(); 392 overo_flash_init();
397 usb_musb_init(); 393 usb_musb_init();
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index 56d931a425f7..e6e8290b7828 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-omap2/board-rx51-flash.c 2 * linux/arch/arm/mach-omap2/board-rx51-peripherals.c
3 * 3 *
4 * Copyright (C) 2008-2009 Nokia 4 * Copyright (C) 2008-2009 Nokia
5 * 5 *
@@ -19,6 +19,7 @@
19#include <linux/delay.h> 19#include <linux/delay.h>
20#include <linux/regulator/machine.h> 20#include <linux/regulator/machine.h>
21#include <linux/gpio.h> 21#include <linux/gpio.h>
22#include <linux/mmc/host.h>
22 23
23#include <mach/mcspi.h> 24#include <mach/mcspi.h>
24#include <mach/mux.h> 25#include <mach/mux.h>
@@ -102,6 +103,7 @@ static struct twl4030_hsmmc_info mmc[] = {
102 .cover_only = true, 103 .cover_only = true,
103 .gpio_cd = 160, 104 .gpio_cd = 160,
104 .gpio_wp = -EINVAL, 105 .gpio_wp = -EINVAL,
106 .power_saving = true,
105 }, 107 },
106 { 108 {
107 .name = "internal", 109 .name = "internal",
@@ -109,6 +111,8 @@ static struct twl4030_hsmmc_info mmc[] = {
109 .wires = 8, 111 .wires = 8,
110 .gpio_cd = -EINVAL, 112 .gpio_cd = -EINVAL,
111 .gpio_wp = -EINVAL, 113 .gpio_wp = -EINVAL,
114 .nonremovable = true,
115 .power_saving = true,
112 }, 116 },
113 {} /* Terminator */ 117 {} /* Terminator */
114}; 118};
@@ -282,7 +286,124 @@ static struct twl4030_usb_data rx51_usb_data = {
282 .usb_mode = T2_USB_MODE_ULPI, 286 .usb_mode = T2_USB_MODE_ULPI,
283}; 287};
284 288
285static struct twl4030_platform_data rx51_twldata = { 289static struct twl4030_ins sleep_on_seq[] __initdata = {
290/*
291 * Turn off VDD1 and VDD2.
292 */
293 {MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_OFF), 4},
294 {MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_OFF), 2},
295/*
296 * And also turn off the OMAP3 PLLs and the sysclk output.
297 */
298 {MSG_SINGULAR(DEV_GRP_P1, 0x7, RES_STATE_OFF), 3},
299 {MSG_SINGULAR(DEV_GRP_P1, 0x17, RES_STATE_OFF), 3},
300};
301
302static struct twl4030_script sleep_on_script __initdata = {
303 .script = sleep_on_seq,
304 .size = ARRAY_SIZE(sleep_on_seq),
305 .flags = TWL4030_SLEEP_SCRIPT,
306};
307
308static struct twl4030_ins wakeup_seq[] __initdata = {
309/*
310 * Reenable the OMAP3 PLLs.
311 * Wakeup VDD1 and VDD2.
312 * Reenable sysclk output.
313 */
314 {MSG_SINGULAR(DEV_GRP_P1, 0x7, RES_STATE_ACTIVE), 0x30},
315 {MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_ACTIVE), 0x30},
316 {MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_ACTIVE), 0x37},
317 {MSG_SINGULAR(DEV_GRP_P1, 0x19, RES_STATE_ACTIVE), 3},
318};
319
320static struct twl4030_script wakeup_script __initdata = {
321 .script = wakeup_seq,
322 .size = ARRAY_SIZE(wakeup_seq),
323 .flags = TWL4030_WAKEUP12_SCRIPT,
324};
325
326static struct twl4030_ins wakeup_p3_seq[] __initdata = {
327/*
328 * Wakeup VDD1 (dummy to be able to insert a delay)
329 * Enable CLKEN
330 */
331 {MSG_SINGULAR(DEV_GRP_P1, 0x17, RES_STATE_ACTIVE), 3},
332};
333
334static struct twl4030_script wakeup_p3_script __initdata = {
335 .script = wakeup_p3_seq,
336 .size = ARRAY_SIZE(wakeup_p3_seq),
337 .flags = TWL4030_WAKEUP3_SCRIPT,
338};
339
340static struct twl4030_ins wrst_seq[] __initdata = {
341/*
342 * Reset twl4030.
343 * Reset VDD1 regulator.
344 * Reset VDD2 regulator.
345 * Reset VPLL1 regulator.
346 * Enable sysclk output.
347 * Reenable twl4030.
348 */
349 {MSG_SINGULAR(DEV_GRP_NULL, RES_RESET, RES_STATE_OFF), 2},
350 {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, 0, 1, RES_STATE_ACTIVE),
351 0x13},
352 {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_PP, 0, 2, RES_STATE_WRST), 0x13},
353 {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_PP, 0, 3, RES_STATE_OFF), 0x13},
354 {MSG_SINGULAR(DEV_GRP_NULL, RES_VDD1, RES_STATE_WRST), 0x13},
355 {MSG_SINGULAR(DEV_GRP_NULL, RES_VDD2, RES_STATE_WRST), 0x13},
356 {MSG_SINGULAR(DEV_GRP_NULL, RES_VPLL1, RES_STATE_WRST), 0x35},
357 {MSG_SINGULAR(DEV_GRP_P1, RES_HFCLKOUT, RES_STATE_ACTIVE), 2},
358 {MSG_SINGULAR(DEV_GRP_NULL, RES_RESET, RES_STATE_ACTIVE), 2},
359};
360
361static struct twl4030_script wrst_script __initdata = {
362 .script = wrst_seq,
363 .size = ARRAY_SIZE(wrst_seq),
364 .flags = TWL4030_WRST_SCRIPT,
365};
366
367static struct twl4030_script *twl4030_scripts[] __initdata = {
368 /* wakeup12 script should be loaded before sleep script, otherwise a
369 board might hit retention before loading of wakeup script is
370 completed. This can cause boot failures depending on timing issues.
371 */
372 &wakeup_script,
373 &sleep_on_script,
374 &wakeup_p3_script,
375 &wrst_script,
376};
377
378static struct twl4030_resconfig twl4030_rconfig[] __initdata = {
379 { .resource = RES_VINTANA1, .devgroup = -1, .type = -1, .type2 = 1 },
380 { .resource = RES_VINTANA2, .devgroup = -1, .type = -1, .type2 = 1 },
381 { .resource = RES_VINTDIG, .devgroup = -1, .type = -1, .type2 = 1 },
382 { .resource = RES_VMMC1, .devgroup = -1, .type = -1, .type2 = 3},
383 { .resource = RES_VMMC2, .devgroup = DEV_GRP_NULL, .type = -1,
384 .type2 = 3},
385 { .resource = RES_VAUX1, .devgroup = -1, .type = -1, .type2 = 3},
386 { .resource = RES_VAUX2, .devgroup = -1, .type = -1, .type2 = 3},
387 { .resource = RES_VAUX3, .devgroup = -1, .type = -1, .type2 = 3},
388 { .resource = RES_VAUX4, .devgroup = -1, .type = -1, .type2 = 3},
389 { .resource = RES_VPLL2, .devgroup = -1, .type = -1, .type2 = 3},
390 { .resource = RES_VDAC, .devgroup = -1, .type = -1, .type2 = 3},
391 { .resource = RES_VSIM, .devgroup = DEV_GRP_NULL, .type = -1,
392 .type2 = 3},
393 { .resource = RES_CLKEN, .devgroup = DEV_GRP_P3, .type = -1,
394 .type2 = 1 },
395 { 0, 0},
396};
397
398static struct twl4030_power_data rx51_t2scripts_data __initdata = {
399 .scripts = twl4030_scripts,
400 .num = ARRAY_SIZE(twl4030_scripts),
401 .resource_config = twl4030_rconfig,
402};
403
404
405
406static struct twl4030_platform_data rx51_twldata __initdata = {
286 .irq_base = TWL4030_IRQ_BASE, 407 .irq_base = TWL4030_IRQ_BASE,
287 .irq_end = TWL4030_IRQ_END, 408 .irq_end = TWL4030_IRQ_END,
288 409
@@ -291,6 +412,7 @@ static struct twl4030_platform_data rx51_twldata = {
291 .keypad = &rx51_kp_data, 412 .keypad = &rx51_kp_data,
292 .madc = &rx51_madc_data, 413 .madc = &rx51_madc_data,
293 .usb = &rx51_usb_data, 414 .usb = &rx51_usb_data,
415 .power = &rx51_t2scripts_data,
294 416
295 .vaux1 = &rx51_vaux1, 417 .vaux1 = &rx51_vaux1,
296 .vaux2 = &rx51_vaux2, 418 .vaux2 = &rx51_vaux2,
diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c
index 1c9e07fe8266..f9196c3b1a7b 100644
--- a/arch/arm/mach-omap2/board-rx51.c
+++ b/arch/arm/mach-omap2/board-rx51.c
@@ -31,10 +31,6 @@
31#include <mach/gpmc.h> 31#include <mach/gpmc.h>
32#include <mach/usb.h> 32#include <mach/usb.h>
33 33
34static struct omap_uart_config rx51_uart_config = {
35 .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
36};
37
38static struct omap_lcd_config rx51_lcd_config = { 34static struct omap_lcd_config rx51_lcd_config = {
39 .ctrl_name = "internal", 35 .ctrl_name = "internal",
40}; 36};
@@ -52,7 +48,6 @@ static struct omap_fbmem_config rx51_fbmem2_config = {
52}; 48};
53 49
54static struct omap_board_config_kernel rx51_config[] = { 50static struct omap_board_config_kernel rx51_config[] = {
55 { OMAP_TAG_UART, &rx51_uart_config },
56 { OMAP_TAG_FBMEM, &rx51_fbmem0_config }, 51 { OMAP_TAG_FBMEM, &rx51_fbmem0_config },
57 { OMAP_TAG_FBMEM, &rx51_fbmem1_config }, 52 { OMAP_TAG_FBMEM, &rx51_fbmem1_config },
58 { OMAP_TAG_FBMEM, &rx51_fbmem2_config }, 53 { OMAP_TAG_FBMEM, &rx51_fbmem2_config },
@@ -61,6 +56,8 @@ static struct omap_board_config_kernel rx51_config[] = {
61 56
62static void __init rx51_init_irq(void) 57static void __init rx51_init_irq(void)
63{ 58{
59 omap_board_config = rx51_config;
60 omap_board_config_size = ARRAY_SIZE(rx51_config);
64 omap2_init_common_hw(NULL, NULL); 61 omap2_init_common_hw(NULL, NULL);
65 omap_init_irq(); 62 omap_init_irq();
66 omap_gpio_init(); 63 omap_gpio_init();
@@ -70,8 +67,6 @@ extern void __init rx51_peripherals_init(void);
70 67
71static void __init rx51_init(void) 68static void __init rx51_init(void)
72{ 69{
73 omap_board_config = rx51_config;
74 omap_board_config_size = ARRAY_SIZE(rx51_config);
75 omap_serial_init(); 70 omap_serial_init();
76 usb_musb_init(); 71 usb_musb_init();
77 rx51_peripherals_init(); 72 rx51_peripherals_init();
diff --git a/arch/arm/mach-omap2/board-zoom-debugboard.c b/arch/arm/mach-omap2/board-zoom-debugboard.c
index bac5c4321ff7..1f13e2a1f322 100644
--- a/arch/arm/mach-omap2/board-zoom-debugboard.c
+++ b/arch/arm/mach-omap2/board-zoom-debugboard.c
@@ -12,6 +12,7 @@
12#include <linux/gpio.h> 12#include <linux/gpio.h>
13#include <linux/serial_8250.h> 13#include <linux/serial_8250.h>
14#include <linux/smsc911x.h> 14#include <linux/smsc911x.h>
15#include <linux/interrupt.h>
15 16
16#include <mach/gpmc.h> 17#include <mach/gpmc.h>
17 18
@@ -84,6 +85,7 @@ static struct plat_serial8250_port serial_platform_data[] = {
84 .mapbase = 0x10000000, 85 .mapbase = 0x10000000,
85 .irq = OMAP_GPIO_IRQ(102), 86 .irq = OMAP_GPIO_IRQ(102),
86 .flags = UPF_BOOT_AUTOCONF|UPF_IOREMAP|UPF_SHARE_IRQ, 87 .flags = UPF_BOOT_AUTOCONF|UPF_IOREMAP|UPF_SHARE_IRQ,
88 .irqflags = IRQF_SHARED | IRQF_TRIGGER_RISING,
87 .iotype = UPIO_MEM, 89 .iotype = UPIO_MEM,
88 .regshift = 1, 90 .regshift = 1,
89 .uartclk = QUART_CLK, 91 .uartclk = QUART_CLK,
@@ -94,7 +96,7 @@ static struct plat_serial8250_port serial_platform_data[] = {
94 96
95static struct platform_device zoom2_debugboard_serial_device = { 97static struct platform_device zoom2_debugboard_serial_device = {
96 .name = "serial8250", 98 .name = "serial8250",
97 .id = PLAT8250_DEV_PLATFORM1, 99 .id = 3,
98 .dev = { 100 .dev = {
99 .platform_data = serial_platform_data, 101 .platform_data = serial_platform_data,
100 }, 102 },
@@ -127,6 +129,7 @@ static inline void __init zoom2_init_quaduart(void)
127static inline int omap_zoom2_debugboard_detect(void) 129static inline int omap_zoom2_debugboard_detect(void)
128{ 130{
129 int debug_board_detect = 0; 131 int debug_board_detect = 0;
132 int ret = 1;
130 133
131 debug_board_detect = ZOOM2_SMSC911X_GPIO; 134 debug_board_detect = ZOOM2_SMSC911X_GPIO;
132 135
@@ -138,10 +141,10 @@ static inline int omap_zoom2_debugboard_detect(void)
138 gpio_direction_input(debug_board_detect); 141 gpio_direction_input(debug_board_detect);
139 142
140 if (!gpio_get_value(debug_board_detect)) { 143 if (!gpio_get_value(debug_board_detect)) {
141 gpio_free(debug_board_detect); 144 ret = 0;
142 return 0;
143 } 145 }
144 return 1; 146 gpio_free(debug_board_detect);
147 return ret;
145} 148}
146 149
147static struct platform_device *zoom2_devices[] __initdata = { 150static struct platform_device *zoom2_devices[] __initdata = {
diff --git a/arch/arm/mach-omap2/board-zoom2.c b/arch/arm/mach-omap2/board-zoom2.c
index 427b7b8b1237..324009edbd53 100644
--- a/arch/arm/mach-omap2/board-zoom2.c
+++ b/arch/arm/mach-omap2/board-zoom2.c
@@ -12,36 +12,217 @@
12#include <linux/kernel.h> 12#include <linux/kernel.h>
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/platform_device.h> 14#include <linux/platform_device.h>
15#include <linux/input.h>
15#include <linux/gpio.h> 16#include <linux/gpio.h>
16#include <linux/i2c/twl4030.h> 17#include <linux/i2c/twl4030.h>
18#include <linux/regulator/machine.h>
17 19
18#include <asm/mach-types.h> 20#include <asm/mach-types.h>
19#include <asm/mach/arch.h> 21#include <asm/mach/arch.h>
20 22
21#include <mach/common.h> 23#include <mach/common.h>
22#include <mach/usb.h> 24#include <mach/usb.h>
25#include <mach/keypad.h>
23 26
24#include "mmc-twl4030.h" 27#include "mmc-twl4030.h"
25 28
26static void __init omap_zoom2_init_irq(void) 29/* Zoom2 has Qwerty keyboard*/
30static int zoom2_twl4030_keymap[] = {
31 KEY(0, 0, KEY_E),
32 KEY(1, 0, KEY_R),
33 KEY(2, 0, KEY_T),
34 KEY(3, 0, KEY_HOME),
35 KEY(6, 0, KEY_I),
36 KEY(7, 0, KEY_LEFTSHIFT),
37 KEY(0, 1, KEY_D),
38 KEY(1, 1, KEY_F),
39 KEY(2, 1, KEY_G),
40 KEY(3, 1, KEY_SEND),
41 KEY(6, 1, KEY_K),
42 KEY(7, 1, KEY_ENTER),
43 KEY(0, 2, KEY_X),
44 KEY(1, 2, KEY_C),
45 KEY(2, 2, KEY_V),
46 KEY(3, 2, KEY_END),
47 KEY(6, 2, KEY_DOT),
48 KEY(7, 2, KEY_CAPSLOCK),
49 KEY(0, 3, KEY_Z),
50 KEY(1, 3, KEY_KPPLUS),
51 KEY(2, 3, KEY_B),
52 KEY(3, 3, KEY_F1),
53 KEY(6, 3, KEY_O),
54 KEY(7, 3, KEY_SPACE),
55 KEY(0, 4, KEY_W),
56 KEY(1, 4, KEY_Y),
57 KEY(2, 4, KEY_U),
58 KEY(3, 4, KEY_F2),
59 KEY(4, 4, KEY_VOLUMEUP),
60 KEY(6, 4, KEY_L),
61 KEY(7, 4, KEY_LEFT),
62 KEY(0, 5, KEY_S),
63 KEY(1, 5, KEY_H),
64 KEY(2, 5, KEY_J),
65 KEY(3, 5, KEY_F3),
66 KEY(5, 5, KEY_VOLUMEDOWN),
67 KEY(6, 5, KEY_M),
68 KEY(4, 5, KEY_ENTER),
69 KEY(7, 5, KEY_RIGHT),
70 KEY(0, 6, KEY_Q),
71 KEY(1, 6, KEY_A),
72 KEY(2, 6, KEY_N),
73 KEY(3, 6, KEY_BACKSPACE),
74 KEY(6, 6, KEY_P),
75 KEY(7, 6, KEY_UP),
76 KEY(6, 7, KEY_SELECT),
77 KEY(7, 7, KEY_DOWN),
78 KEY(0, 7, KEY_PROG1), /*MACRO 1 <User defined> */
79 KEY(1, 7, KEY_PROG2), /*MACRO 2 <User defined> */
80 KEY(2, 7, KEY_PROG3), /*MACRO 3 <User defined> */
81 KEY(3, 7, KEY_PROG4), /*MACRO 4 <User defined> */
82 0
83};
84
85static struct twl4030_keypad_data zoom2_kp_twl4030_data = {
86 .rows = 8,
87 .cols = 8,
88 .keymap = zoom2_twl4030_keymap,
89 .keymapsize = ARRAY_SIZE(zoom2_twl4030_keymap),
90 .rep = 1,
91};
92
93static struct omap_board_config_kernel zoom2_config[] __initdata = {
94};
95
96static struct regulator_consumer_supply zoom2_vmmc1_supply = {
97 .supply = "vmmc",
98};
99
100static struct regulator_consumer_supply zoom2_vsim_supply = {
101 .supply = "vmmc_aux",
102};
103
104static struct regulator_consumer_supply zoom2_vmmc2_supply = {
105 .supply = "vmmc",
106};
107
108/* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
109static struct regulator_init_data zoom2_vmmc1 = {
110 .constraints = {
111 .min_uV = 1850000,
112 .max_uV = 3150000,
113 .valid_modes_mask = REGULATOR_MODE_NORMAL
114 | REGULATOR_MODE_STANDBY,
115 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
116 | REGULATOR_CHANGE_MODE
117 | REGULATOR_CHANGE_STATUS,
118 },
119 .num_consumer_supplies = 1,
120 .consumer_supplies = &zoom2_vmmc1_supply,
121};
122
123/* VMMC2 for MMC2 card */
124static struct regulator_init_data zoom2_vmmc2 = {
125 .constraints = {
126 .min_uV = 1850000,
127 .max_uV = 1850000,
128 .apply_uV = true,
129 .valid_modes_mask = REGULATOR_MODE_NORMAL
130 | REGULATOR_MODE_STANDBY,
131 .valid_ops_mask = REGULATOR_CHANGE_MODE
132 | REGULATOR_CHANGE_STATUS,
133 },
134 .num_consumer_supplies = 1,
135 .consumer_supplies = &zoom2_vmmc2_supply,
136};
137
138/* VSIM for OMAP VDD_MMC1A (i/o for DAT4..DAT7) */
139static struct regulator_init_data zoom2_vsim = {
140 .constraints = {
141 .min_uV = 1800000,
142 .max_uV = 3000000,
143 .valid_modes_mask = REGULATOR_MODE_NORMAL
144 | REGULATOR_MODE_STANDBY,
145 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
146 | REGULATOR_CHANGE_MODE
147 | REGULATOR_CHANGE_STATUS,
148 },
149 .num_consumer_supplies = 1,
150 .consumer_supplies = &zoom2_vsim_supply,
151};
152
153static struct twl4030_hsmmc_info mmc[] __initdata = {
154 {
155 .mmc = 1,
156 .wires = 4,
157 .gpio_wp = -EINVAL,
158 },
159 {
160 .mmc = 2,
161 .wires = 4,
162 .gpio_wp = -EINVAL,
163 },
164 {} /* Terminator */
165};
166
167static int zoom2_twl_gpio_setup(struct device *dev,
168 unsigned gpio, unsigned ngpio)
27{ 169{
28 omap2_init_common_hw(NULL, NULL); 170 /* gpio + 0 is "mmc0_cd" (input/IRQ),
29 omap_init_irq(); 171 * gpio + 1 is "mmc1_cd" (input/IRQ)
30 omap_gpio_init(); 172 */
173 mmc[0].gpio_cd = gpio + 0;
174 mmc[1].gpio_cd = gpio + 1;
175 twl4030_mmc_init(mmc);
176
177 /* link regulators to MMC adapters ... we "know" the
178 * regulators will be set up only *after* we return.
179 */
180 zoom2_vmmc1_supply.dev = mmc[0].dev;
181 zoom2_vsim_supply.dev = mmc[0].dev;
182 zoom2_vmmc2_supply.dev = mmc[1].dev;
183
184 return 0;
31} 185}
32 186
33static struct omap_uart_config zoom2_uart_config __initdata = { 187
34 .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)), 188static int zoom2_batt_table[] = {
189/* 0 C*/
19030800, 29500, 28300, 27100,
19126000, 24900, 23900, 22900, 22000, 21100, 20300, 19400, 18700, 17900,
19217200, 16500, 15900, 15300, 14700, 14100, 13600, 13100, 12600, 12100,
19311600, 11200, 10800, 10400, 10000, 9630, 9280, 8950, 8620, 8310,
1948020, 7730, 7460, 7200, 6950, 6710, 6470, 6250, 6040, 5830,
1955640, 5450, 5260, 5090, 4920, 4760, 4600, 4450, 4310, 4170,
1964040, 3910, 3790, 3670, 3550
35}; 197};
36 198
37static struct omap_board_config_kernel zoom2_config[] __initdata = { 199static struct twl4030_bci_platform_data zoom2_bci_data = {
38 { OMAP_TAG_UART, &zoom2_uart_config }, 200 .battery_tmp_tbl = zoom2_batt_table,
201 .tblsize = ARRAY_SIZE(zoom2_batt_table),
39}; 202};
40 203
204static struct twl4030_usb_data zoom2_usb_data = {
205 .usb_mode = T2_USB_MODE_ULPI,
206};
207
208static void __init omap_zoom2_init_irq(void)
209{
210 omap_board_config = zoom2_config;
211 omap_board_config_size = ARRAY_SIZE(zoom2_config);
212 omap2_init_common_hw(NULL, NULL);
213 omap_init_irq();
214 omap_gpio_init();
215}
216
41static struct twl4030_gpio_platform_data zoom2_gpio_data = { 217static struct twl4030_gpio_platform_data zoom2_gpio_data = {
42 .gpio_base = OMAP_MAX_GPIO_LINES, 218 .gpio_base = OMAP_MAX_GPIO_LINES,
43 .irq_base = TWL4030_GPIO_IRQ_BASE, 219 .irq_base = TWL4030_GPIO_IRQ_BASE,
44 .irq_end = TWL4030_GPIO_IRQ_END, 220 .irq_end = TWL4030_GPIO_IRQ_END,
221 .setup = zoom2_twl_gpio_setup,
222};
223
224static struct twl4030_madc_platform_data zoom2_madc_data = {
225 .irq_line = 1,
45}; 226};
46 227
47static struct twl4030_platform_data zoom2_twldata = { 228static struct twl4030_platform_data zoom2_twldata = {
@@ -49,7 +230,15 @@ static struct twl4030_platform_data zoom2_twldata = {
49 .irq_end = TWL4030_IRQ_END, 230 .irq_end = TWL4030_IRQ_END,
50 231
51 /* platform_data for children goes here */ 232 /* platform_data for children goes here */
233 .bci = &zoom2_bci_data,
234 .madc = &zoom2_madc_data,
235 .usb = &zoom2_usb_data,
52 .gpio = &zoom2_gpio_data, 236 .gpio = &zoom2_gpio_data,
237 .keypad = &zoom2_kp_twl4030_data,
238 .vmmc1 = &zoom2_vmmc1,
239 .vmmc2 = &zoom2_vmmc2,
240 .vsim = &zoom2_vsim,
241
53}; 242};
54 243
55static struct i2c_board_info __initdata zoom2_i2c_boardinfo[] = { 244static struct i2c_board_info __initdata zoom2_i2c_boardinfo[] = {
@@ -70,26 +259,13 @@ static int __init omap_i2c_init(void)
70 return 0; 259 return 0;
71} 260}
72 261
73static struct twl4030_hsmmc_info mmc[] __initdata = {
74 {
75 .mmc = 1,
76 .wires = 4,
77 .gpio_cd = -EINVAL,
78 .gpio_wp = -EINVAL,
79 },
80 {} /* Terminator */
81};
82
83extern int __init omap_zoom2_debugboard_init(void); 262extern int __init omap_zoom2_debugboard_init(void);
84 263
85static void __init omap_zoom2_init(void) 264static void __init omap_zoom2_init(void)
86{ 265{
87 omap_i2c_init(); 266 omap_i2c_init();
88 omap_board_config = zoom2_config;
89 omap_board_config_size = ARRAY_SIZE(zoom2_config);
90 omap_serial_init(); 267 omap_serial_init();
91 omap_zoom2_debugboard_init(); 268 omap_zoom2_debugboard_init();
92 twl4030_mmc_init(mmc);
93 usb_musb_init(); 269 usb_musb_init();
94} 270}
95 271
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c
index 456e2ad5f621..f2a92d614f0f 100644
--- a/arch/arm/mach-omap2/clock.c
+++ b/arch/arm/mach-omap2/clock.c
@@ -1043,5 +1043,7 @@ void omap2_clk_disable_unused(struct clk *clk)
1043 omap2_clk_disable(clk); 1043 omap2_clk_disable(clk);
1044 } else 1044 } else
1045 _omap2_clk_disable(clk); 1045 _omap2_clk_disable(clk);
1046 if (clk->clkdm != NULL)
1047 pwrdm_clkdm_state_switch(clk->clkdm);
1046} 1048}
1047#endif 1049#endif
diff --git a/arch/arm/mach-omap2/clock34xx.c b/arch/arm/mach-omap2/clock34xx.c
index cd7819cc0c9e..fafcd32e6907 100644
--- a/arch/arm/mach-omap2/clock34xx.c
+++ b/arch/arm/mach-omap2/clock34xx.c
@@ -27,6 +27,7 @@
27#include <linux/limits.h> 27#include <linux/limits.h>
28#include <linux/bitops.h> 28#include <linux/bitops.h>
29 29
30#include <mach/cpu.h>
30#include <mach/clock.h> 31#include <mach/clock.h>
31#include <mach/sram.h> 32#include <mach/sram.h>
32#include <asm/div64.h> 33#include <asm/div64.h>
@@ -1067,17 +1068,17 @@ static int __init omap2_clk_arch_init(void)
1067 return -EINVAL; 1068 return -EINVAL;
1068 1069
1069 /* REVISIT: not yet ready for 343x */ 1070 /* REVISIT: not yet ready for 343x */
1070#if 0 1071 if (clk_set_rate(&dpll1_ck, mpurate))
1071 if (clk_set_rate(&virt_prcm_set, mpurate)) 1072 printk(KERN_ERR "*** Unable to set MPU rate\n");
1072 printk(KERN_ERR "Could not find matching MPU rate\n");
1073#endif
1074 1073
1075 recalculate_root_clocks(); 1074 recalculate_root_clocks();
1076 1075
1077 printk(KERN_INFO "Switched to new clocking rate (Crystal/DPLL3/MPU): " 1076 printk(KERN_INFO "Switched to new clocking rate (Crystal/Core/MPU): "
1078 "%ld.%01ld/%ld/%ld MHz\n", 1077 "%ld.%01ld/%ld/%ld MHz\n",
1079 (osc_sys_ck.rate / 1000000), (osc_sys_ck.rate / 100000) % 10, 1078 (osc_sys_ck.rate / 1000000), ((osc_sys_ck.rate / 100000) % 10),
1080 (core_ck.rate / 1000000), (dpll1_fck.rate / 1000000)) ; 1079 (core_ck.rate / 1000000), (arm_fck.rate / 1000000)) ;
1080
1081 calibrate_delay();
1081 1082
1082 return 0; 1083 return 0;
1083} 1084}
@@ -1136,7 +1137,7 @@ int __init omap2_clk_init(void)
1136 1137
1137 recalculate_root_clocks(); 1138 recalculate_root_clocks();
1138 1139
1139 printk(KERN_INFO "Clocking rate (Crystal/DPLL/ARM core): " 1140 printk(KERN_INFO "Clocking rate (Crystal/Core/MPU): "
1140 "%ld.%01ld/%ld/%ld MHz\n", 1141 "%ld.%01ld/%ld/%ld MHz\n",
1141 (osc_sys_ck.rate / 1000000), (osc_sys_ck.rate / 100000) % 10, 1142 (osc_sys_ck.rate / 1000000), (osc_sys_ck.rate / 100000) % 10,
1142 (core_ck.rate / 1000000), (arm_fck.rate / 1000000)); 1143 (core_ck.rate / 1000000), (arm_fck.rate / 1000000));
diff --git a/arch/arm/mach-omap2/clock34xx.h b/arch/arm/mach-omap2/clock34xx.h
index 57cc2725b923..c8119781e00a 100644
--- a/arch/arm/mach-omap2/clock34xx.h
+++ b/arch/arm/mach-omap2/clock34xx.h
@@ -1020,6 +1020,7 @@ static struct clk arm_fck = {
1020 .clksel_reg = OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_IDLEST_PLL), 1020 .clksel_reg = OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_IDLEST_PLL),
1021 .clksel_mask = OMAP3430_ST_MPU_CLK_MASK, 1021 .clksel_mask = OMAP3430_ST_MPU_CLK_MASK,
1022 .clksel = arm_fck_clksel, 1022 .clksel = arm_fck_clksel,
1023 .clkdm_name = "mpu_clkdm",
1023 .recalc = &omap2_clksel_recalc, 1024 .recalc = &omap2_clksel_recalc,
1024}; 1025};
1025 1026
@@ -1155,7 +1156,6 @@ static struct clk gfx_cg1_ck = {
1155 .name = "gfx_cg1_ck", 1156 .name = "gfx_cg1_ck",
1156 .ops = &clkops_omap2_dflt_wait, 1157 .ops = &clkops_omap2_dflt_wait,
1157 .parent = &gfx_l3_fck, /* REVISIT: correct? */ 1158 .parent = &gfx_l3_fck, /* REVISIT: correct? */
1158 .init = &omap2_init_clk_clkdm,
1159 .enable_reg = OMAP_CM_REGADDR(GFX_MOD, CM_FCLKEN), 1159 .enable_reg = OMAP_CM_REGADDR(GFX_MOD, CM_FCLKEN),
1160 .enable_bit = OMAP3430ES1_EN_2D_SHIFT, 1160 .enable_bit = OMAP3430ES1_EN_2D_SHIFT,
1161 .clkdm_name = "gfx_3430es1_clkdm", 1161 .clkdm_name = "gfx_3430es1_clkdm",
@@ -1166,7 +1166,6 @@ static struct clk gfx_cg2_ck = {
1166 .name = "gfx_cg2_ck", 1166 .name = "gfx_cg2_ck",
1167 .ops = &clkops_omap2_dflt_wait, 1167 .ops = &clkops_omap2_dflt_wait,
1168 .parent = &gfx_l3_fck, /* REVISIT: correct? */ 1168 .parent = &gfx_l3_fck, /* REVISIT: correct? */
1169 .init = &omap2_init_clk_clkdm,
1170 .enable_reg = OMAP_CM_REGADDR(GFX_MOD, CM_FCLKEN), 1169 .enable_reg = OMAP_CM_REGADDR(GFX_MOD, CM_FCLKEN),
1171 .enable_bit = OMAP3430ES1_EN_3D_SHIFT, 1170 .enable_bit = OMAP3430ES1_EN_3D_SHIFT,
1172 .clkdm_name = "gfx_3430es1_clkdm", 1171 .clkdm_name = "gfx_3430es1_clkdm",
@@ -1210,7 +1209,6 @@ static struct clk sgx_ick = {
1210 .name = "sgx_ick", 1209 .name = "sgx_ick",
1211 .ops = &clkops_omap2_dflt_wait, 1210 .ops = &clkops_omap2_dflt_wait,
1212 .parent = &l3_ick, 1211 .parent = &l3_ick,
1213 .init = &omap2_init_clk_clkdm,
1214 .enable_reg = OMAP_CM_REGADDR(OMAP3430ES2_SGX_MOD, CM_ICLKEN), 1212 .enable_reg = OMAP_CM_REGADDR(OMAP3430ES2_SGX_MOD, CM_ICLKEN),
1215 .enable_bit = OMAP3430ES2_CM_ICLKEN_SGX_EN_SGX_SHIFT, 1213 .enable_bit = OMAP3430ES2_CM_ICLKEN_SGX_EN_SGX_SHIFT,
1216 .clkdm_name = "sgx_clkdm", 1214 .clkdm_name = "sgx_clkdm",
@@ -1223,7 +1221,6 @@ static struct clk d2d_26m_fck = {
1223 .name = "d2d_26m_fck", 1221 .name = "d2d_26m_fck",
1224 .ops = &clkops_omap2_dflt_wait, 1222 .ops = &clkops_omap2_dflt_wait,
1225 .parent = &sys_ck, 1223 .parent = &sys_ck,
1226 .init = &omap2_init_clk_clkdm,
1227 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), 1224 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1228 .enable_bit = OMAP3430ES1_EN_D2D_SHIFT, 1225 .enable_bit = OMAP3430ES1_EN_D2D_SHIFT,
1229 .clkdm_name = "d2d_clkdm", 1226 .clkdm_name = "d2d_clkdm",
@@ -1234,7 +1231,6 @@ static struct clk modem_fck = {
1234 .name = "modem_fck", 1231 .name = "modem_fck",
1235 .ops = &clkops_omap2_dflt_wait, 1232 .ops = &clkops_omap2_dflt_wait,
1236 .parent = &sys_ck, 1233 .parent = &sys_ck,
1237 .init = &omap2_init_clk_clkdm,
1238 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), 1234 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1239 .enable_bit = OMAP3430_EN_MODEM_SHIFT, 1235 .enable_bit = OMAP3430_EN_MODEM_SHIFT,
1240 .clkdm_name = "d2d_clkdm", 1236 .clkdm_name = "d2d_clkdm",
@@ -1622,7 +1618,6 @@ static struct clk core_l3_ick = {
1622 .name = "core_l3_ick", 1618 .name = "core_l3_ick",
1623 .ops = &clkops_null, 1619 .ops = &clkops_null,
1624 .parent = &l3_ick, 1620 .parent = &l3_ick,
1625 .init = &omap2_init_clk_clkdm,
1626 .clkdm_name = "core_l3_clkdm", 1621 .clkdm_name = "core_l3_clkdm",
1627 .recalc = &followparent_recalc, 1622 .recalc = &followparent_recalc,
1628}; 1623};
@@ -1691,7 +1686,6 @@ static struct clk core_l4_ick = {
1691 .name = "core_l4_ick", 1686 .name = "core_l4_ick",
1692 .ops = &clkops_null, 1687 .ops = &clkops_null,
1693 .parent = &l4_ick, 1688 .parent = &l4_ick,
1694 .init = &omap2_init_clk_clkdm,
1695 .clkdm_name = "core_l4_clkdm", 1689 .clkdm_name = "core_l4_clkdm",
1696 .recalc = &followparent_recalc, 1690 .recalc = &followparent_recalc,
1697}; 1691};
@@ -2089,7 +2083,6 @@ static struct clk dss_tv_fck = {
2089 .name = "dss_tv_fck", 2083 .name = "dss_tv_fck",
2090 .ops = &clkops_omap2_dflt, 2084 .ops = &clkops_omap2_dflt,
2091 .parent = &omap_54m_fck, 2085 .parent = &omap_54m_fck,
2092 .init = &omap2_init_clk_clkdm,
2093 .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_FCLKEN), 2086 .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_FCLKEN),
2094 .enable_bit = OMAP3430_EN_TV_SHIFT, 2087 .enable_bit = OMAP3430_EN_TV_SHIFT,
2095 .clkdm_name = "dss_clkdm", 2088 .clkdm_name = "dss_clkdm",
@@ -2100,7 +2093,6 @@ static struct clk dss_96m_fck = {
2100 .name = "dss_96m_fck", 2093 .name = "dss_96m_fck",
2101 .ops = &clkops_omap2_dflt, 2094 .ops = &clkops_omap2_dflt,
2102 .parent = &omap_96m_fck, 2095 .parent = &omap_96m_fck,
2103 .init = &omap2_init_clk_clkdm,
2104 .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_FCLKEN), 2096 .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_FCLKEN),
2105 .enable_bit = OMAP3430_EN_TV_SHIFT, 2097 .enable_bit = OMAP3430_EN_TV_SHIFT,
2106 .clkdm_name = "dss_clkdm", 2098 .clkdm_name = "dss_clkdm",
@@ -2111,7 +2103,6 @@ static struct clk dss2_alwon_fck = {
2111 .name = "dss2_alwon_fck", 2103 .name = "dss2_alwon_fck",
2112 .ops = &clkops_omap2_dflt, 2104 .ops = &clkops_omap2_dflt,
2113 .parent = &sys_ck, 2105 .parent = &sys_ck,
2114 .init = &omap2_init_clk_clkdm,
2115 .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_FCLKEN), 2106 .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_FCLKEN),
2116 .enable_bit = OMAP3430_EN_DSS2_SHIFT, 2107 .enable_bit = OMAP3430_EN_DSS2_SHIFT,
2117 .clkdm_name = "dss_clkdm", 2108 .clkdm_name = "dss_clkdm",
@@ -2123,7 +2114,6 @@ static struct clk dss_ick_3430es1 = {
2123 .name = "dss_ick", 2114 .name = "dss_ick",
2124 .ops = &clkops_omap2_dflt, 2115 .ops = &clkops_omap2_dflt,
2125 .parent = &l4_ick, 2116 .parent = &l4_ick,
2126 .init = &omap2_init_clk_clkdm,
2127 .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_ICLKEN), 2117 .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_ICLKEN),
2128 .enable_bit = OMAP3430_CM_ICLKEN_DSS_EN_DSS_SHIFT, 2118 .enable_bit = OMAP3430_CM_ICLKEN_DSS_EN_DSS_SHIFT,
2129 .clkdm_name = "dss_clkdm", 2119 .clkdm_name = "dss_clkdm",
@@ -2135,7 +2125,6 @@ static struct clk dss_ick_3430es2 = {
2135 .name = "dss_ick", 2125 .name = "dss_ick",
2136 .ops = &clkops_omap3430es2_dss_usbhost_wait, 2126 .ops = &clkops_omap3430es2_dss_usbhost_wait,
2137 .parent = &l4_ick, 2127 .parent = &l4_ick,
2138 .init = &omap2_init_clk_clkdm,
2139 .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_ICLKEN), 2128 .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_ICLKEN),
2140 .enable_bit = OMAP3430_CM_ICLKEN_DSS_EN_DSS_SHIFT, 2129 .enable_bit = OMAP3430_CM_ICLKEN_DSS_EN_DSS_SHIFT,
2141 .clkdm_name = "dss_clkdm", 2130 .clkdm_name = "dss_clkdm",
@@ -2159,7 +2148,6 @@ static struct clk cam_ick = {
2159 .name = "cam_ick", 2148 .name = "cam_ick",
2160 .ops = &clkops_omap2_dflt, 2149 .ops = &clkops_omap2_dflt,
2161 .parent = &l4_ick, 2150 .parent = &l4_ick,
2162 .init = &omap2_init_clk_clkdm,
2163 .enable_reg = OMAP_CM_REGADDR(OMAP3430_CAM_MOD, CM_ICLKEN), 2151 .enable_reg = OMAP_CM_REGADDR(OMAP3430_CAM_MOD, CM_ICLKEN),
2164 .enable_bit = OMAP3430_EN_CAM_SHIFT, 2152 .enable_bit = OMAP3430_EN_CAM_SHIFT,
2165 .clkdm_name = "cam_clkdm", 2153 .clkdm_name = "cam_clkdm",
@@ -2170,7 +2158,6 @@ static struct clk csi2_96m_fck = {
2170 .name = "csi2_96m_fck", 2158 .name = "csi2_96m_fck",
2171 .ops = &clkops_omap2_dflt, 2159 .ops = &clkops_omap2_dflt,
2172 .parent = &core_96m_fck, 2160 .parent = &core_96m_fck,
2173 .init = &omap2_init_clk_clkdm,
2174 .enable_reg = OMAP_CM_REGADDR(OMAP3430_CAM_MOD, CM_FCLKEN), 2161 .enable_reg = OMAP_CM_REGADDR(OMAP3430_CAM_MOD, CM_FCLKEN),
2175 .enable_bit = OMAP3430_EN_CSI2_SHIFT, 2162 .enable_bit = OMAP3430_EN_CSI2_SHIFT,
2176 .clkdm_name = "cam_clkdm", 2163 .clkdm_name = "cam_clkdm",
@@ -2183,7 +2170,6 @@ static struct clk usbhost_120m_fck = {
2183 .name = "usbhost_120m_fck", 2170 .name = "usbhost_120m_fck",
2184 .ops = &clkops_omap2_dflt, 2171 .ops = &clkops_omap2_dflt,
2185 .parent = &dpll5_m2_ck, 2172 .parent = &dpll5_m2_ck,
2186 .init = &omap2_init_clk_clkdm,
2187 .enable_reg = OMAP_CM_REGADDR(OMAP3430ES2_USBHOST_MOD, CM_FCLKEN), 2173 .enable_reg = OMAP_CM_REGADDR(OMAP3430ES2_USBHOST_MOD, CM_FCLKEN),
2188 .enable_bit = OMAP3430ES2_EN_USBHOST2_SHIFT, 2174 .enable_bit = OMAP3430ES2_EN_USBHOST2_SHIFT,
2189 .clkdm_name = "usbhost_clkdm", 2175 .clkdm_name = "usbhost_clkdm",
@@ -2194,7 +2180,6 @@ static struct clk usbhost_48m_fck = {
2194 .name = "usbhost_48m_fck", 2180 .name = "usbhost_48m_fck",
2195 .ops = &clkops_omap3430es2_dss_usbhost_wait, 2181 .ops = &clkops_omap3430es2_dss_usbhost_wait,
2196 .parent = &omap_48m_fck, 2182 .parent = &omap_48m_fck,
2197 .init = &omap2_init_clk_clkdm,
2198 .enable_reg = OMAP_CM_REGADDR(OMAP3430ES2_USBHOST_MOD, CM_FCLKEN), 2183 .enable_reg = OMAP_CM_REGADDR(OMAP3430ES2_USBHOST_MOD, CM_FCLKEN),
2199 .enable_bit = OMAP3430ES2_EN_USBHOST1_SHIFT, 2184 .enable_bit = OMAP3430ES2_EN_USBHOST1_SHIFT,
2200 .clkdm_name = "usbhost_clkdm", 2185 .clkdm_name = "usbhost_clkdm",
@@ -2206,7 +2191,6 @@ static struct clk usbhost_ick = {
2206 .name = "usbhost_ick", 2191 .name = "usbhost_ick",
2207 .ops = &clkops_omap3430es2_dss_usbhost_wait, 2192 .ops = &clkops_omap3430es2_dss_usbhost_wait,
2208 .parent = &l4_ick, 2193 .parent = &l4_ick,
2209 .init = &omap2_init_clk_clkdm,
2210 .enable_reg = OMAP_CM_REGADDR(OMAP3430ES2_USBHOST_MOD, CM_ICLKEN), 2194 .enable_reg = OMAP_CM_REGADDR(OMAP3430ES2_USBHOST_MOD, CM_ICLKEN),
2211 .enable_bit = OMAP3430ES2_EN_USBHOST_SHIFT, 2195 .enable_bit = OMAP3430ES2_EN_USBHOST_SHIFT,
2212 .clkdm_name = "usbhost_clkdm", 2196 .clkdm_name = "usbhost_clkdm",
@@ -2268,7 +2252,6 @@ static struct clk gpt1_fck = {
2268static struct clk wkup_32k_fck = { 2252static struct clk wkup_32k_fck = {
2269 .name = "wkup_32k_fck", 2253 .name = "wkup_32k_fck",
2270 .ops = &clkops_null, 2254 .ops = &clkops_null,
2271 .init = &omap2_init_clk_clkdm,
2272 .parent = &omap_32k_fck, 2255 .parent = &omap_32k_fck,
2273 .clkdm_name = "wkup_clkdm", 2256 .clkdm_name = "wkup_clkdm",
2274 .recalc = &followparent_recalc, 2257 .recalc = &followparent_recalc,
@@ -2383,7 +2366,6 @@ static struct clk per_96m_fck = {
2383 .name = "per_96m_fck", 2366 .name = "per_96m_fck",
2384 .ops = &clkops_null, 2367 .ops = &clkops_null,
2385 .parent = &omap_96m_alwon_fck, 2368 .parent = &omap_96m_alwon_fck,
2386 .init = &omap2_init_clk_clkdm,
2387 .clkdm_name = "per_clkdm", 2369 .clkdm_name = "per_clkdm",
2388 .recalc = &followparent_recalc, 2370 .recalc = &followparent_recalc,
2389}; 2371};
@@ -2392,7 +2374,6 @@ static struct clk per_48m_fck = {
2392 .name = "per_48m_fck", 2374 .name = "per_48m_fck",
2393 .ops = &clkops_null, 2375 .ops = &clkops_null,
2394 .parent = &omap_48m_fck, 2376 .parent = &omap_48m_fck,
2395 .init = &omap2_init_clk_clkdm,
2396 .clkdm_name = "per_clkdm", 2377 .clkdm_name = "per_clkdm",
2397 .recalc = &followparent_recalc, 2378 .recalc = &followparent_recalc,
2398}; 2379};
diff --git a/arch/arm/mach-omap2/clockdomain.c b/arch/arm/mach-omap2/clockdomain.c
index 0e7d501865b6..4ef7b4f5474e 100644
--- a/arch/arm/mach-omap2/clockdomain.c
+++ b/arch/arm/mach-omap2/clockdomain.c
@@ -299,7 +299,8 @@ struct clockdomain *clkdm_lookup(const char *name)
299 * anything else to indicate failure; or -EINVAL if the function pointer 299 * anything else to indicate failure; or -EINVAL if the function pointer
300 * is null. 300 * is null.
301 */ 301 */
302int clkdm_for_each(int (*fn)(struct clockdomain *clkdm)) 302int clkdm_for_each(int (*fn)(struct clockdomain *clkdm, void *user),
303 void *user)
303{ 304{
304 struct clockdomain *clkdm; 305 struct clockdomain *clkdm;
305 int ret = 0; 306 int ret = 0;
@@ -309,7 +310,7 @@ int clkdm_for_each(int (*fn)(struct clockdomain *clkdm))
309 310
310 mutex_lock(&clkdm_mutex); 311 mutex_lock(&clkdm_mutex);
311 list_for_each_entry(clkdm, &clkdm_list, node) { 312 list_for_each_entry(clkdm, &clkdm_list, node) {
312 ret = (*fn)(clkdm); 313 ret = (*fn)(clkdm, user);
313 if (ret) 314 if (ret)
314 break; 315 break;
315 } 316 }
@@ -484,6 +485,8 @@ void omap2_clkdm_allow_idle(struct clockdomain *clkdm)
484 v << __ffs(clkdm->clktrctrl_mask), 485 v << __ffs(clkdm->clktrctrl_mask),
485 clkdm->pwrdm.ptr->prcm_offs, 486 clkdm->pwrdm.ptr->prcm_offs,
486 CM_CLKSTCTRL); 487 CM_CLKSTCTRL);
488
489 pwrdm_clkdm_state_switch(clkdm);
487} 490}
488 491
489/** 492/**
@@ -572,6 +575,7 @@ int omap2_clkdm_clk_enable(struct clockdomain *clkdm, struct clk *clk)
572 omap2_clkdm_wakeup(clkdm); 575 omap2_clkdm_wakeup(clkdm);
573 576
574 pwrdm_wait_transition(clkdm->pwrdm.ptr); 577 pwrdm_wait_transition(clkdm->pwrdm.ptr);
578 pwrdm_clkdm_state_switch(clkdm);
575 579
576 return 0; 580 return 0;
577} 581}
@@ -624,6 +628,8 @@ int omap2_clkdm_clk_disable(struct clockdomain *clkdm, struct clk *clk)
624 else 628 else
625 omap2_clkdm_sleep(clkdm); 629 omap2_clkdm_sleep(clkdm);
626 630
631 pwrdm_clkdm_state_switch(clkdm);
632
627 return 0; 633 return 0;
628} 634}
629 635
diff --git a/arch/arm/mach-omap2/cm.c b/arch/arm/mach-omap2/cm.c
new file mode 100644
index 000000000000..8eb2dab8c7db
--- /dev/null
+++ b/arch/arm/mach-omap2/cm.c
@@ -0,0 +1,70 @@
1/*
2 * OMAP2/3 CM module functions
3 *
4 * Copyright (C) 2009 Nokia Corporation
5 * Paul Walmsley
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#include <linux/kernel.h>
13#include <linux/module.h>
14#include <linux/types.h>
15#include <linux/delay.h>
16#include <linux/spinlock.h>
17#include <linux/list.h>
18#include <linux/errno.h>
19#include <linux/err.h>
20#include <linux/io.h>
21
22#include <asm/atomic.h>
23
24#include "cm.h"
25#include "cm-regbits-24xx.h"
26#include "cm-regbits-34xx.h"
27
28/* MAX_MODULE_READY_TIME: max milliseconds for module to leave idle */
29#define MAX_MODULE_READY_TIME 20000
30
31static const u8 cm_idlest_offs[] = {
32 CM_IDLEST1, CM_IDLEST2, OMAP2430_CM_IDLEST3
33};
34
35/**
36 * omap2_cm_wait_idlest_ready - wait for a module to leave idle or standby
37 * @prcm_mod: PRCM module offset
38 * @idlest_id: CM_IDLESTx register ID (i.e., x = 1, 2, 3)
39 * @idlest_shift: shift of the bit in the CM_IDLEST* register to check
40 *
41 * XXX document
42 */
43int omap2_cm_wait_module_ready(s16 prcm_mod, u8 idlest_id, u8 idlest_shift)
44{
45 int ena = 0, i = 0;
46 u8 cm_idlest_reg;
47 u32 mask;
48
49 if (!idlest_id || (idlest_id > ARRAY_SIZE(cm_idlest_offs)))
50 return -EINVAL;
51
52 cm_idlest_reg = cm_idlest_offs[idlest_id - 1];
53
54 if (cpu_is_omap24xx())
55 ena = idlest_shift;
56 else if (cpu_is_omap34xx())
57 ena = 0;
58 else
59 BUG();
60
61 mask = 1 << idlest_shift;
62
63 /* XXX should be OMAP2 CM */
64 while (((cm_read_mod_reg(prcm_mod, cm_idlest_reg) & mask) != ena) &&
65 (i++ < MAX_MODULE_READY_TIME))
66 udelay(1);
67
68 return (i < MAX_MODULE_READY_TIME) ? 0 : -EBUSY;
69}
70
diff --git a/arch/arm/mach-omap2/cm.h b/arch/arm/mach-omap2/cm.h
index f3c91a1ca391..cfd0b726ba44 100644
--- a/arch/arm/mach-omap2/cm.h
+++ b/arch/arm/mach-omap2/cm.h
@@ -17,11 +17,11 @@
17#include "prcm-common.h" 17#include "prcm-common.h"
18 18
19#define OMAP2420_CM_REGADDR(module, reg) \ 19#define OMAP2420_CM_REGADDR(module, reg) \
20 IO_ADDRESS(OMAP2420_CM_BASE + (module) + (reg)) 20 OMAP2_IO_ADDRESS(OMAP2420_CM_BASE + (module) + (reg))
21#define OMAP2430_CM_REGADDR(module, reg) \ 21#define OMAP2430_CM_REGADDR(module, reg) \
22 IO_ADDRESS(OMAP2430_CM_BASE + (module) + (reg)) 22 OMAP2_IO_ADDRESS(OMAP2430_CM_BASE + (module) + (reg))
23#define OMAP34XX_CM_REGADDR(module, reg) \ 23#define OMAP34XX_CM_REGADDR(module, reg) \
24 IO_ADDRESS(OMAP3430_CM_BASE + (module) + (reg)) 24 OMAP2_IO_ADDRESS(OMAP3430_CM_BASE + (module) + (reg))
25 25
26/* 26/*
27 * Architecture-specific global CM registers 27 * Architecture-specific global CM registers
@@ -98,6 +98,10 @@ extern u32 cm_read_mod_reg(s16 module, u16 idx);
98extern void cm_write_mod_reg(u32 val, s16 module, u16 idx); 98extern void cm_write_mod_reg(u32 val, s16 module, u16 idx);
99extern u32 cm_rmw_mod_reg_bits(u32 mask, u32 bits, s16 module, s16 idx); 99extern u32 cm_rmw_mod_reg_bits(u32 mask, u32 bits, s16 module, s16 idx);
100 100
101extern int omap2_cm_wait_module_ready(s16 prcm_mod, u8 idlest_id,
102 u8 idlest_shift);
103extern int omap4_cm_wait_module_ready(u32 prcm_mod, u8 prcm_dev_offs);
104
101static inline u32 cm_set_mod_reg_bits(u32 bits, s16 module, s16 idx) 105static inline u32 cm_set_mod_reg_bits(u32 bits, s16 module, s16 idx)
102{ 106{
103 return cm_rmw_mod_reg_bits(bits, bits, module, idx); 107 return cm_rmw_mod_reg_bits(bits, bits, module, idx);
diff --git a/arch/arm/mach-omap2/cm4xxx.c b/arch/arm/mach-omap2/cm4xxx.c
new file mode 100644
index 000000000000..e4ebd6d53135
--- /dev/null
+++ b/arch/arm/mach-omap2/cm4xxx.c
@@ -0,0 +1,68 @@
1/*
2 * OMAP4 CM module functions
3 *
4 * Copyright (C) 2009 Nokia Corporation
5 * Paul Walmsley
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#include <linux/kernel.h>
13#include <linux/module.h>
14#include <linux/types.h>
15#include <linux/delay.h>
16#include <linux/spinlock.h>
17#include <linux/list.h>
18#include <linux/errno.h>
19#include <linux/err.h>
20#include <linux/io.h>
21
22#include <asm/atomic.h>
23
24#include "cm.h"
25#include "cm-regbits-4xxx.h"
26
27/* XXX move this to cm.h */
28/* MAX_MODULE_READY_TIME: max milliseconds for module to leave idle */
29#define MAX_MODULE_READY_TIME 20000
30
31/*
32 * OMAP4_PRCM_CM_CLKCTRL_IDLEST_MASK: isolates the IDLEST field in the
33 * CM_CLKCTRL register.
34 */
35#define OMAP4_PRCM_CM_CLKCTRL_IDLEST_MASK (0x2 << 16)
36
37/*
38 * OMAP4 prcm_mod u32 fields contain packed data: the CM ID in bit 16 and
39 * the PRCM module offset address (from the CM module base) in bits 15-0.
40 */
41#define OMAP4_PRCM_MOD_CM_ID_SHIFT 16
42#define OMAP4_PRCM_MOD_OFFS_MASK 0xffff
43
44/**
45 * omap4_cm_wait_idlest_ready - wait for a module to leave idle or standby
46 * @prcm_mod: PRCM module offset (XXX example)
47 * @prcm_dev_offs: PRCM device offset (e.g. MCASP XXX example)
48 *
49 * XXX document
50 */
51int omap4_cm_wait_idlest_ready(u32 prcm_mod, u8 prcm_dev_offs)
52{
53 int i = 0;
54 u8 cm_id;
55 u16 prcm_mod_offs;
56 u32 mask = OMAP4_PRCM_CM_CLKCTRL_IDLEST_MASK;
57
58 cm_id = prcm_mod >> OMAP4_PRCM_MOD_CM_ID_SHIFT;
59 prcm_mod_offs = prcm_mod & OMAP4_PRCM_MOD_OFFS_MASK;
60
61 while (((omap4_cm_read_mod_reg(cm_id, prcm_mod_offs, prcm_dev_offs,
62 OMAP4_CM_CLKCTRL_DREG) & mask) != 0) &&
63 (i++ < MAX_MODULE_READY_TIME))
64 udelay(1);
65
66 return (i < MAX_MODULE_READY_TIME) ? 0 : -EBUSY;
67}
68
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 894cc355818a..bcfcfc7fdb9b 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -257,6 +257,11 @@ static inline void omap_init_sti(void) {}
257#define OMAP2_MCSPI3_BASE 0x480b8000 257#define OMAP2_MCSPI3_BASE 0x480b8000
258#define OMAP2_MCSPI4_BASE 0x480ba000 258#define OMAP2_MCSPI4_BASE 0x480ba000
259 259
260#define OMAP4_MCSPI1_BASE 0x48098100
261#define OMAP4_MCSPI2_BASE 0x4809a100
262#define OMAP4_MCSPI3_BASE 0x480b8100
263#define OMAP4_MCSPI4_BASE 0x480ba100
264
260static struct omap2_mcspi_platform_config omap2_mcspi1_config = { 265static struct omap2_mcspi_platform_config omap2_mcspi1_config = {
261 .num_cs = 4, 266 .num_cs = 4,
262}; 267};
@@ -301,7 +306,8 @@ static struct platform_device omap2_mcspi2 = {
301 }, 306 },
302}; 307};
303 308
304#if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3) 309#if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3) || \
310 defined(CONFIG_ARCH_OMAP4)
305static struct omap2_mcspi_platform_config omap2_mcspi3_config = { 311static struct omap2_mcspi_platform_config omap2_mcspi3_config = {
306 .num_cs = 2, 312 .num_cs = 2,
307}; 313};
@@ -325,7 +331,7 @@ static struct platform_device omap2_mcspi3 = {
325}; 331};
326#endif 332#endif
327 333
328#ifdef CONFIG_ARCH_OMAP3 334#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
329static struct omap2_mcspi_platform_config omap2_mcspi4_config = { 335static struct omap2_mcspi_platform_config omap2_mcspi4_config = {
330 .num_cs = 1, 336 .num_cs = 1,
331}; 337};
@@ -351,14 +357,25 @@ static struct platform_device omap2_mcspi4 = {
351 357
352static void omap_init_mcspi(void) 358static void omap_init_mcspi(void)
353{ 359{
360 if (cpu_is_omap44xx()) {
361 omap2_mcspi1_resources[0].start = OMAP4_MCSPI1_BASE;
362 omap2_mcspi1_resources[0].end = OMAP4_MCSPI1_BASE + 0xff;
363 omap2_mcspi2_resources[0].start = OMAP4_MCSPI2_BASE;
364 omap2_mcspi2_resources[0].end = OMAP4_MCSPI2_BASE + 0xff;
365 omap2_mcspi3_resources[0].start = OMAP4_MCSPI3_BASE;
366 omap2_mcspi3_resources[0].end = OMAP4_MCSPI3_BASE + 0xff;
367 omap2_mcspi4_resources[0].start = OMAP4_MCSPI4_BASE;
368 omap2_mcspi4_resources[0].end = OMAP4_MCSPI4_BASE + 0xff;
369 }
354 platform_device_register(&omap2_mcspi1); 370 platform_device_register(&omap2_mcspi1);
355 platform_device_register(&omap2_mcspi2); 371 platform_device_register(&omap2_mcspi2);
356#if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3) 372#if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3) || \
357 if (cpu_is_omap2430() || cpu_is_omap343x()) 373 defined(CONFIG_ARCH_OMAP4)
374 if (cpu_is_omap2430() || cpu_is_omap343x() || cpu_is_omap44xx())
358 platform_device_register(&omap2_mcspi3); 375 platform_device_register(&omap2_mcspi3);
359#endif 376#endif
360#ifdef CONFIG_ARCH_OMAP3 377#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
361 if (cpu_is_omap343x()) 378 if (cpu_is_omap343x() || cpu_is_omap44xx())
362 platform_device_register(&omap2_mcspi4); 379 platform_device_register(&omap2_mcspi4);
363#endif 380#endif
364} 381}
@@ -397,7 +414,7 @@ static inline void omap_init_sha1_md5(void) { }
397 414
398/*-------------------------------------------------------------------------*/ 415/*-------------------------------------------------------------------------*/
399 416
400#ifdef CONFIG_ARCH_OMAP3 417#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
401 418
402#define MMCHS_SYSCONFIG 0x0010 419#define MMCHS_SYSCONFIG 0x0010
403#define MMCHS_SYSCONFIG_SWRESET (1 << 1) 420#define MMCHS_SYSCONFIG_SWRESET (1 << 1)
@@ -424,8 +441,8 @@ static struct platform_device dummy_pdev = {
424 **/ 441 **/
425static void __init omap_hsmmc_reset(void) 442static void __init omap_hsmmc_reset(void)
426{ 443{
427 u32 i, nr_controllers = cpu_is_omap34xx() ? OMAP34XX_NR_MMC : 444 u32 i, nr_controllers = cpu_is_omap44xx() ? OMAP44XX_NR_MMC :
428 OMAP24XX_NR_MMC; 445 (cpu_is_omap34xx() ? OMAP34XX_NR_MMC : OMAP24XX_NR_MMC);
429 446
430 for (i = 0; i < nr_controllers; i++) { 447 for (i = 0; i < nr_controllers; i++) {
431 u32 v, base = 0; 448 u32 v, base = 0;
@@ -442,8 +459,21 @@ static void __init omap_hsmmc_reset(void)
442 case 2: 459 case 2:
443 base = OMAP3_MMC3_BASE; 460 base = OMAP3_MMC3_BASE;
444 break; 461 break;
462 case 3:
463 if (!cpu_is_omap44xx())
464 return;
465 base = OMAP4_MMC4_BASE;
466 break;
467 case 4:
468 if (!cpu_is_omap44xx())
469 return;
470 base = OMAP4_MMC5_BASE;
471 break;
445 } 472 }
446 473
474 if (cpu_is_omap44xx())
475 base += OMAP4_MMC_REG_OFFSET;
476
447 dummy_pdev.id = i; 477 dummy_pdev.id = i;
448 dev_set_name(&dummy_pdev.dev, "mmci-omap-hs.%d", i); 478 dev_set_name(&dummy_pdev.dev, "mmci-omap-hs.%d", i);
449 iclk = clk_get(dev, "ick"); 479 iclk = clk_get(dev, "ick");
@@ -513,6 +543,47 @@ static inline void omap2_mmc_mux(struct omap_mmc_platform_data *mmc_controller,
513 omap_ctrl_writel(v, OMAP2_CONTROL_DEVCONF0); 543 omap_ctrl_writel(v, OMAP2_CONTROL_DEVCONF0);
514 } 544 }
515 } 545 }
546
547 if (cpu_is_omap3430()) {
548 if (controller_nr == 0) {
549 omap_cfg_reg(N28_3430_MMC1_CLK);
550 omap_cfg_reg(M27_3430_MMC1_CMD);
551 omap_cfg_reg(N27_3430_MMC1_DAT0);
552 if (mmc_controller->slots[0].wires == 4 ||
553 mmc_controller->slots[0].wires == 8) {
554 omap_cfg_reg(N26_3430_MMC1_DAT1);
555 omap_cfg_reg(N25_3430_MMC1_DAT2);
556 omap_cfg_reg(P28_3430_MMC1_DAT3);
557 }
558 if (mmc_controller->slots[0].wires == 8) {
559 omap_cfg_reg(P27_3430_MMC1_DAT4);
560 omap_cfg_reg(P26_3430_MMC1_DAT5);
561 omap_cfg_reg(R27_3430_MMC1_DAT6);
562 omap_cfg_reg(R25_3430_MMC1_DAT7);
563 }
564 }
565 if (controller_nr == 1) {
566 /* MMC2 */
567 omap_cfg_reg(AE2_3430_MMC2_CLK);
568 omap_cfg_reg(AG5_3430_MMC2_CMD);
569 omap_cfg_reg(AH5_3430_MMC2_DAT0);
570
571 /*
572 * For 8 wire configurations, Lines DAT4, 5, 6 and 7 need to be muxed
573 * in the board-*.c files
574 */
575 if (mmc_controller->slots[0].wires == 4 ||
576 mmc_controller->slots[0].wires == 8) {
577 omap_cfg_reg(AH4_3430_MMC2_DAT1);
578 omap_cfg_reg(AG4_3430_MMC2_DAT2);
579 omap_cfg_reg(AF4_3430_MMC2_DAT3);
580 }
581 }
582
583 /*
584 * For MMC3 the pins need to be muxed in the board-*.c files
585 */
586 }
516} 587}
517 588
518void __init omap2_init_mmc(struct omap_mmc_platform_data **mmc_data, 589void __init omap2_init_mmc(struct omap_mmc_platform_data **mmc_data,
@@ -540,11 +611,23 @@ void __init omap2_init_mmc(struct omap_mmc_platform_data **mmc_data,
540 irq = INT_24XX_MMC2_IRQ; 611 irq = INT_24XX_MMC2_IRQ;
541 break; 612 break;
542 case 2: 613 case 2:
543 if (!cpu_is_omap34xx()) 614 if (!cpu_is_omap44xx() && !cpu_is_omap34xx())
544 return; 615 return;
545 base = OMAP3_MMC3_BASE; 616 base = OMAP3_MMC3_BASE;
546 irq = INT_34XX_MMC3_IRQ; 617 irq = INT_34XX_MMC3_IRQ;
547 break; 618 break;
619 case 3:
620 if (!cpu_is_omap44xx())
621 return;
622 base = OMAP4_MMC4_BASE + OMAP4_MMC_REG_OFFSET;
623 irq = INT_44XX_MMC4_IRQ;
624 break;
625 case 4:
626 if (!cpu_is_omap44xx())
627 return;
628 base = OMAP4_MMC5_BASE + OMAP4_MMC_REG_OFFSET;
629 irq = INT_44XX_MMC5_IRQ;
630 break;
548 default: 631 default:
549 continue; 632 continue;
550 } 633 }
@@ -552,8 +635,15 @@ void __init omap2_init_mmc(struct omap_mmc_platform_data **mmc_data,
552 if (cpu_is_omap2420()) { 635 if (cpu_is_omap2420()) {
553 size = OMAP2420_MMC_SIZE; 636 size = OMAP2420_MMC_SIZE;
554 name = "mmci-omap"; 637 name = "mmci-omap";
638 } else if (cpu_is_omap44xx()) {
639 if (i < 3) {
640 base += OMAP4_MMC_REG_OFFSET;
641 irq += IRQ_GIC_START;
642 }
643 size = OMAP4_HSMMC_SIZE;
644 name = "mmci-omap-hs";
555 } else { 645 } else {
556 size = HSMMC_SIZE; 646 size = OMAP3_HSMMC_SIZE;
557 name = "mmci-omap-hs"; 647 name = "mmci-omap-hs";
558 } 648 }
559 omap_mmc_add(name, i, base, size, irq, mmc_data[i]); 649 omap_mmc_add(name, i, base, size, irq, mmc_data[i]);
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index f91934b2b092..15876828db23 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -57,6 +57,11 @@
57#define GPMC_CHUNK_SHIFT 24 /* 16 MB */ 57#define GPMC_CHUNK_SHIFT 24 /* 16 MB */
58#define GPMC_SECTION_SHIFT 28 /* 128 MB */ 58#define GPMC_SECTION_SHIFT 28 /* 128 MB */
59 59
60#define PREFETCH_FIFOTHRESHOLD (0x40 << 8)
61#define CS_NUM_SHIFT 24
62#define ENABLE_PREFETCH (0x1 << 7)
63#define DMA_MPU_MODE 2
64
60static struct resource gpmc_mem_root; 65static struct resource gpmc_mem_root;
61static struct resource gpmc_cs_mem[GPMC_CS_NUM]; 66static struct resource gpmc_cs_mem[GPMC_CS_NUM];
62static DEFINE_SPINLOCK(gpmc_mem_lock); 67static DEFINE_SPINLOCK(gpmc_mem_lock);
@@ -386,6 +391,63 @@ void gpmc_cs_free(int cs)
386} 391}
387EXPORT_SYMBOL(gpmc_cs_free); 392EXPORT_SYMBOL(gpmc_cs_free);
388 393
394/**
395 * gpmc_prefetch_enable - configures and starts prefetch transfer
396 * @cs: nand cs (chip select) number
397 * @dma_mode: dma mode enable (1) or disable (0)
398 * @u32_count: number of bytes to be transferred
399 * @is_write: prefetch read(0) or write post(1) mode
400 */
401int gpmc_prefetch_enable(int cs, int dma_mode,
402 unsigned int u32_count, int is_write)
403{
404 uint32_t prefetch_config1;
405
406 if (!(gpmc_read_reg(GPMC_PREFETCH_CONTROL))) {
407 /* Set the amount of bytes to be prefetched */
408 gpmc_write_reg(GPMC_PREFETCH_CONFIG2, u32_count);
409
410 /* Set dma/mpu mode, the prefetch read / post write and
411 * enable the engine. Set which cs is has requested for.
412 */
413 prefetch_config1 = ((cs << CS_NUM_SHIFT) |
414 PREFETCH_FIFOTHRESHOLD |
415 ENABLE_PREFETCH |
416 (dma_mode << DMA_MPU_MODE) |
417 (0x1 & is_write));
418 gpmc_write_reg(GPMC_PREFETCH_CONFIG1, prefetch_config1);
419 } else {
420 return -EBUSY;
421 }
422 /* Start the prefetch engine */
423 gpmc_write_reg(GPMC_PREFETCH_CONTROL, 0x1);
424
425 return 0;
426}
427EXPORT_SYMBOL(gpmc_prefetch_enable);
428
429/**
430 * gpmc_prefetch_reset - disables and stops the prefetch engine
431 */
432void gpmc_prefetch_reset(void)
433{
434 /* Stop the PFPW engine */
435 gpmc_write_reg(GPMC_PREFETCH_CONTROL, 0x0);
436
437 /* Reset/disable the PFPW engine */
438 gpmc_write_reg(GPMC_PREFETCH_CONFIG1, 0x0);
439}
440EXPORT_SYMBOL(gpmc_prefetch_reset);
441
442/**
443 * gpmc_prefetch_status - reads prefetch status of engine
444 */
445int gpmc_prefetch_status(void)
446{
447 return gpmc_read_reg(GPMC_PREFETCH_STATUS);
448}
449EXPORT_SYMBOL(gpmc_prefetch_status);
450
389static void __init gpmc_mem_init(void) 451static void __init gpmc_mem_init(void)
390{ 452{
391 int cs; 453 int cs;
@@ -452,6 +514,5 @@ void __init gpmc_init(void)
452 l &= 0x03 << 3; 514 l &= 0x03 << 3;
453 l |= (0x02 << 3) | (1 << 0); 515 l |= (0x02 << 3) | (1 << 0);
454 gpmc_write_reg(GPMC_SYSCONFIG, l); 516 gpmc_write_reg(GPMC_SYSCONFIG, l);
455
456 gpmc_mem_init(); 517 gpmc_mem_init();
457} 518}
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index e9b9bcb19b4e..7574b6f20e8e 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -32,17 +32,23 @@
32#include <mach/sram.h> 32#include <mach/sram.h>
33#include <mach/sdrc.h> 33#include <mach/sdrc.h>
34#include <mach/gpmc.h> 34#include <mach/gpmc.h>
35#include <mach/serial.h>
35 36
36#ifndef CONFIG_ARCH_OMAP4 /* FIXME: Remove this once clkdev is ready */ 37#ifndef CONFIG_ARCH_OMAP4 /* FIXME: Remove this once clkdev is ready */
37#include "clock.h" 38#include "clock.h"
38 39
40#include <mach/omap-pm.h>
39#include <mach/powerdomain.h> 41#include <mach/powerdomain.h>
40
41#include "powerdomains.h" 42#include "powerdomains.h"
42 43
43#include <mach/clockdomain.h> 44#include <mach/clockdomain.h>
44#include "clockdomains.h" 45#include "clockdomains.h"
45#endif 46#endif
47#include <mach/omap_hwmod.h>
48#include "omap_hwmod_2420.h"
49#include "omap_hwmod_2430.h"
50#include "omap_hwmod_34xx.h"
51
46/* 52/*
47 * The machine specific code may provide the extra mapping besides the 53 * The machine specific code may provide the extra mapping besides the
48 * default mapping provided here. 54 * default mapping provided here.
@@ -279,11 +285,26 @@ static int __init _omap2_init_reprogram_sdrc(void)
279void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0, 285void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0,
280 struct omap_sdrc_params *sdrc_cs1) 286 struct omap_sdrc_params *sdrc_cs1)
281{ 287{
288 struct omap_hwmod **hwmods = NULL;
289
290 if (cpu_is_omap2420())
291 hwmods = omap2420_hwmods;
292 else if (cpu_is_omap2430())
293 hwmods = omap2430_hwmods;
294 else if (cpu_is_omap34xx())
295 hwmods = omap34xx_hwmods;
296
297 omap_hwmod_init(hwmods);
282 omap2_mux_init(); 298 omap2_mux_init();
283#ifndef CONFIG_ARCH_OMAP4 /* FIXME: Remove this once the clkdev is ready */ 299#ifndef CONFIG_ARCH_OMAP4 /* FIXME: Remove this once the clkdev is ready */
300 /* The OPP tables have to be registered before a clk init */
301 omap_pm_if_early_init(mpu_opps, dsp_opps, l3_opps);
284 pwrdm_init(powerdomains_omap); 302 pwrdm_init(powerdomains_omap);
285 clkdm_init(clockdomains_omap, clkdm_pwrdm_autodeps); 303 clkdm_init(clockdomains_omap, clkdm_pwrdm_autodeps);
286 omap2_clk_init(); 304 omap2_clk_init();
305 omap_serial_early_init();
306 omap_hwmod_late_init();
307 omap_pm_if_init();
287 omap2_sdrc_init(sdrc_cs0, sdrc_cs1); 308 omap2_sdrc_init(sdrc_cs0, sdrc_cs1);
288 _omap2_init_reprogram_sdrc(); 309 _omap2_init_reprogram_sdrc();
289#endif 310#endif
diff --git a/arch/arm/mach-omap2/iommu2.c b/arch/arm/mach-omap2/iommu2.c
index 015f22a53ead..2d9b5cc981cd 100644
--- a/arch/arm/mach-omap2/iommu2.c
+++ b/arch/arm/mach-omap2/iommu2.c
@@ -217,10 +217,19 @@ static ssize_t omap2_dump_cr(struct iommu *obj, struct cr_regs *cr, char *buf)
217} 217}
218 218
219#define pr_reg(name) \ 219#define pr_reg(name) \
220 p += sprintf(p, "%20s: %08x\n", \ 220 do { \
221 __stringify(name), iommu_read_reg(obj, MMU_##name)); 221 ssize_t bytes; \
222 222 const char *str = "%20s: %08x\n"; \
223static ssize_t omap2_iommu_dump_ctx(struct iommu *obj, char *buf) 223 const int maxcol = 32; \
224 bytes = snprintf(p, maxcol, str, __stringify(name), \
225 iommu_read_reg(obj, MMU_##name)); \
226 p += bytes; \
227 len -= bytes; \
228 if (len < maxcol) \
229 goto out; \
230 } while (0)
231
232static ssize_t omap2_iommu_dump_ctx(struct iommu *obj, char *buf, ssize_t len)
224{ 233{
225 char *p = buf; 234 char *p = buf;
226 235
@@ -242,7 +251,7 @@ static ssize_t omap2_iommu_dump_ctx(struct iommu *obj, char *buf)
242 pr_reg(READ_CAM); 251 pr_reg(READ_CAM);
243 pr_reg(READ_RAM); 252 pr_reg(READ_RAM);
244 pr_reg(EMU_FAULT_AD); 253 pr_reg(EMU_FAULT_AD);
245 254out:
246 return p - buf; 255 return p - buf;
247} 256}
248 257
diff --git a/arch/arm/mach-omap2/mmc-twl4030.c b/arch/arm/mach-omap2/mmc-twl4030.c
index 3c04c2f1b23f..c9c59a2db4e2 100644
--- a/arch/arm/mach-omap2/mmc-twl4030.c
+++ b/arch/arm/mach-omap2/mmc-twl4030.c
@@ -198,6 +198,18 @@ static int twl_mmc_resume(struct device *dev, int slot)
198#define twl_mmc_resume NULL 198#define twl_mmc_resume NULL
199#endif 199#endif
200 200
201#if defined(CONFIG_ARCH_OMAP3) && defined(CONFIG_PM)
202
203static int twl4030_mmc_get_context_loss(struct device *dev)
204{
205 /* FIXME: PM DPS not implemented yet */
206 return 0;
207}
208
209#else
210#define twl4030_mmc_get_context_loss NULL
211#endif
212
201static int twl_mmc1_set_power(struct device *dev, int slot, int power_on, 213static int twl_mmc1_set_power(struct device *dev, int slot, int power_on,
202 int vdd) 214 int vdd)
203{ 215{
@@ -328,6 +340,61 @@ static int twl_mmc23_set_power(struct device *dev, int slot, int power_on, int v
328 return ret; 340 return ret;
329} 341}
330 342
343static int twl_mmc1_set_sleep(struct device *dev, int slot, int sleep, int vdd,
344 int cardsleep)
345{
346 struct twl_mmc_controller *c = &hsmmc[0];
347 int mode = sleep ? REGULATOR_MODE_STANDBY : REGULATOR_MODE_NORMAL;
348
349 return regulator_set_mode(c->vcc, mode);
350}
351
352static int twl_mmc23_set_sleep(struct device *dev, int slot, int sleep, int vdd,
353 int cardsleep)
354{
355 struct twl_mmc_controller *c = NULL;
356 struct omap_mmc_platform_data *mmc = dev->platform_data;
357 int i, err, mode;
358
359 for (i = 1; i < ARRAY_SIZE(hsmmc); i++) {
360 if (mmc == hsmmc[i].mmc) {
361 c = &hsmmc[i];
362 break;
363 }
364 }
365
366 if (c == NULL)
367 return -ENODEV;
368
369 /*
370 * If we don't see a Vcc regulator, assume it's a fixed
371 * voltage always-on regulator.
372 */
373 if (!c->vcc)
374 return 0;
375
376 mode = sleep ? REGULATOR_MODE_STANDBY : REGULATOR_MODE_NORMAL;
377
378 if (!c->vcc_aux)
379 return regulator_set_mode(c->vcc, mode);
380
381 if (cardsleep) {
382 /* VCC can be turned off if card is asleep */
383 struct regulator *vcc_aux = c->vcc_aux;
384
385 c->vcc_aux = NULL;
386 if (sleep)
387 err = twl_mmc23_set_power(dev, slot, 0, 0);
388 else
389 err = twl_mmc23_set_power(dev, slot, 1, vdd);
390 c->vcc_aux = vcc_aux;
391 } else
392 err = regulator_set_mode(c->vcc, mode);
393 if (err)
394 return err;
395 return regulator_set_mode(c->vcc_aux, mode);
396}
397
331static struct omap_mmc_platform_data *hsmmc_data[OMAP34XX_NR_MMC] __initdata; 398static struct omap_mmc_platform_data *hsmmc_data[OMAP34XX_NR_MMC] __initdata;
332 399
333void __init twl4030_mmc_init(struct twl4030_hsmmc_info *controllers) 400void __init twl4030_mmc_init(struct twl4030_hsmmc_info *controllers)
@@ -390,6 +457,9 @@ void __init twl4030_mmc_init(struct twl4030_hsmmc_info *controllers)
390 } else 457 } else
391 mmc->slots[0].switch_pin = -EINVAL; 458 mmc->slots[0].switch_pin = -EINVAL;
392 459
460 mmc->get_context_loss_count =
461 twl4030_mmc_get_context_loss;
462
393 /* write protect normally uses an OMAP gpio */ 463 /* write protect normally uses an OMAP gpio */
394 if (gpio_is_valid(c->gpio_wp)) { 464 if (gpio_is_valid(c->gpio_wp)) {
395 gpio_request(c->gpio_wp, "mmc_wp"); 465 gpio_request(c->gpio_wp, "mmc_wp");
@@ -400,6 +470,12 @@ void __init twl4030_mmc_init(struct twl4030_hsmmc_info *controllers)
400 } else 470 } else
401 mmc->slots[0].gpio_wp = -EINVAL; 471 mmc->slots[0].gpio_wp = -EINVAL;
402 472
473 if (c->nonremovable)
474 mmc->slots[0].nonremovable = 1;
475
476 if (c->power_saving)
477 mmc->slots[0].power_saving = 1;
478
403 /* NOTE: MMC slots should have a Vcc regulator set up. 479 /* NOTE: MMC slots should have a Vcc regulator set up.
404 * This may be from a TWL4030-family chip, another 480 * This may be from a TWL4030-family chip, another
405 * controllable regulator, or a fixed supply. 481 * controllable regulator, or a fixed supply.
@@ -412,6 +488,7 @@ void __init twl4030_mmc_init(struct twl4030_hsmmc_info *controllers)
412 case 1: 488 case 1:
413 /* on-chip level shifting via PBIAS0/PBIAS1 */ 489 /* on-chip level shifting via PBIAS0/PBIAS1 */
414 mmc->slots[0].set_power = twl_mmc1_set_power; 490 mmc->slots[0].set_power = twl_mmc1_set_power;
491 mmc->slots[0].set_sleep = twl_mmc1_set_sleep;
415 break; 492 break;
416 case 2: 493 case 2:
417 if (c->ext_clock) 494 if (c->ext_clock)
@@ -422,6 +499,7 @@ void __init twl4030_mmc_init(struct twl4030_hsmmc_info *controllers)
422 case 3: 499 case 3:
423 /* off-chip level shifting, or none */ 500 /* off-chip level shifting, or none */
424 mmc->slots[0].set_power = twl_mmc23_set_power; 501 mmc->slots[0].set_power = twl_mmc23_set_power;
502 mmc->slots[0].set_sleep = twl_mmc23_set_sleep;
425 break; 503 break;
426 default: 504 default:
427 pr_err("MMC%d configuration not supported!\n", c->mmc); 505 pr_err("MMC%d configuration not supported!\n", c->mmc);
diff --git a/arch/arm/mach-omap2/mmc-twl4030.h b/arch/arm/mach-omap2/mmc-twl4030.h
index 3807c45c9a6c..a47e68563fb6 100644
--- a/arch/arm/mach-omap2/mmc-twl4030.h
+++ b/arch/arm/mach-omap2/mmc-twl4030.h
@@ -12,6 +12,8 @@ struct twl4030_hsmmc_info {
12 bool transceiver; /* MMC-2 option */ 12 bool transceiver; /* MMC-2 option */
13 bool ext_clock; /* use external pin for input clock */ 13 bool ext_clock; /* use external pin for input clock */
14 bool cover_only; /* No card detect - just cover switch */ 14 bool cover_only; /* No card detect - just cover switch */
15 bool nonremovable; /* Nonremovable e.g. eMMC */
16 bool power_saving; /* Try to sleep or power off when possible */
15 int gpio_cd; /* or -EINVAL */ 17 int gpio_cd; /* or -EINVAL */
16 int gpio_wp; /* or -EINVAL */ 18 int gpio_wp; /* or -EINVAL */
17 char *name; /* or NULL for default */ 19 char *name; /* or NULL for default */
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index 43d6b92b65f2..2daa595aaff4 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -492,6 +492,61 @@ MUX_CFG_34XX("H16_34XX_SDRC_CKE0", 0x262,
492 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT) 492 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT)
493MUX_CFG_34XX("H17_34XX_SDRC_CKE1", 0x264, 493MUX_CFG_34XX("H17_34XX_SDRC_CKE1", 0x264,
494 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT) 494 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT)
495
496/* MMC1 */
497MUX_CFG_34XX("N28_3430_MMC1_CLK", 0x144,
498 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
499MUX_CFG_34XX("M27_3430_MMC1_CMD", 0x146,
500 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
501MUX_CFG_34XX("N27_3430_MMC1_DAT0", 0x148,
502 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
503MUX_CFG_34XX("N26_3430_MMC1_DAT1", 0x14a,
504 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
505MUX_CFG_34XX("N25_3430_MMC1_DAT2", 0x14c,
506 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
507MUX_CFG_34XX("P28_3430_MMC1_DAT3", 0x14e,
508 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
509MUX_CFG_34XX("P27_3430_MMC1_DAT4", 0x150,
510 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
511MUX_CFG_34XX("P26_3430_MMC1_DAT5", 0x152,
512 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
513MUX_CFG_34XX("R27_3430_MMC1_DAT6", 0x154,
514 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
515MUX_CFG_34XX("R25_3430_MMC1_DAT7", 0x156,
516 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
517
518/* MMC2 */
519MUX_CFG_34XX("AE2_3430_MMC2_CLK", 0x158,
520 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
521MUX_CFG_34XX("AG5_3430_MMC2_CMD", 0x15A,
522 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
523MUX_CFG_34XX("AH5_3430_MMC2_DAT0", 0x15c,
524 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
525MUX_CFG_34XX("AH4_3430_MMC2_DAT1", 0x15e,
526 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
527MUX_CFG_34XX("AG4_3430_MMC2_DAT2", 0x160,
528 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
529MUX_CFG_34XX("AF4_3430_MMC2_DAT3", 0x162,
530 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
531
532/* MMC3 */
533MUX_CFG_34XX("AF10_3430_MMC3_CLK", 0x5d8,
534 OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLUP)
535MUX_CFG_34XX("AC3_3430_MMC3_CMD", 0x1d0,
536 OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLUP)
537MUX_CFG_34XX("AE11_3430_MMC3_DAT0", 0x5e4,
538 OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLUP)
539MUX_CFG_34XX("AH9_3430_MMC3_DAT1", 0x5e6,
540 OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLUP)
541MUX_CFG_34XX("AF13_3430_MMC3_DAT2", 0x5e8,
542 OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLUP)
543MUX_CFG_34XX("AF13_3430_MMC3_DAT3", 0x5e2,
544 OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLUP)
545
546/* SYS_NIRQ T2 INT1 */
547MUX_CFG_34XX("AF26_34XX_SYS_NIRQ", 0x1E0,
548 OMAP3_WAKEUP_EN | OMAP34XX_PIN_INPUT_PULLUP |
549 OMAP34XX_MUX_MODE0)
495}; 550};
496 551
497#define OMAP34XX_PINS_SZ ARRAY_SIZE(omap34xx_pins) 552#define OMAP34XX_PINS_SZ ARRAY_SIZE(omap34xx_pins)
diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c
index 8fe8d230f21b..48ee295db275 100644
--- a/arch/arm/mach-omap2/omap-smp.c
+++ b/arch/arm/mach-omap2/omap-smp.c
@@ -54,7 +54,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu)
54 * for us: do so 54 * for us: do so
55 */ 55 */
56 56
57 gic_cpu_init(0, IO_ADDRESS(OMAP44XX_GIC_CPU_BASE)); 57 gic_cpu_init(0, OMAP2_IO_ADDRESS(OMAP44XX_GIC_CPU_BASE));
58 58
59 /* 59 /*
60 * Synchronise with the boot thread. 60 * Synchronise with the boot thread.
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
new file mode 100644
index 000000000000..d2e0f1c95961
--- /dev/null
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -0,0 +1,1554 @@
1/*
2 * omap_hwmod implementation for OMAP2/3/4
3 *
4 * Copyright (C) 2009 Nokia Corporation
5 * Paul Walmsley
6 * With fixes and testing from Kevin Hilman
7 *
8 * Created in collaboration with (alphabetical order): Benoit Cousson,
9 * Kevin Hilman, Tony Lindgren, Rajendra Nayak, Vikram Pandita, Sakari
10 * Poussa, Anand Sawant, Santosh Shilimkar, Richard Woodruff
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 * This code manages "OMAP modules" (on-chip devices) and their
17 * integration with Linux device driver and bus code.
18 *
19 * References:
20 * - OMAP2420 Multimedia Processor Silicon Revision 2.1.1, 2.2 (SWPU064)
21 * - OMAP2430 Multimedia Device POP Silicon Revision 2.1 (SWPU090)
22 * - OMAP34xx Multimedia Device Silicon Revision 3.1 (SWPU108)
23 * - OMAP4430 Multimedia Device Silicon Revision 1.0 (SWPU140)
24 * - Open Core Protocol Specification 2.2
25 *
26 * To do:
27 * - pin mux handling
28 * - handle IO mapping
29 * - bus throughput & module latency measurement code
30 *
31 * XXX add tests at the beginning of each function to ensure the hwmod is
32 * in the appropriate state
33 * XXX error return values should be checked to ensure that they are
34 * appropriate
35 */
36#undef DEBUG
37
38#include <linux/kernel.h>
39#include <linux/errno.h>
40#include <linux/io.h>
41#include <linux/clk.h>
42#include <linux/delay.h>
43#include <linux/err.h>
44#include <linux/list.h>
45#include <linux/mutex.h>
46#include <linux/bootmem.h>
47
48#include <mach/cpu.h>
49#include <mach/clockdomain.h>
50#include <mach/powerdomain.h>
51#include <mach/clock.h>
52#include <mach/omap_hwmod.h>
53
54#include "cm.h"
55
56/* Maximum microseconds to wait for OMAP module to reset */
57#define MAX_MODULE_RESET_WAIT 10000
58
59/* Name of the OMAP hwmod for the MPU */
60#define MPU_INITIATOR_NAME "mpu_hwmod"
61
62/* omap_hwmod_list contains all registered struct omap_hwmods */
63static LIST_HEAD(omap_hwmod_list);
64
65static DEFINE_MUTEX(omap_hwmod_mutex);
66
67/* mpu_oh: used to add/remove MPU initiator from sleepdep list */
68static struct omap_hwmod *mpu_oh;
69
70/* inited: 0 if omap_hwmod_init() has not yet been called; 1 otherwise */
71static u8 inited;
72
73
74/* Private functions */
75
76/**
77 * _update_sysc_cache - return the module OCP_SYSCONFIG register, keep copy
78 * @oh: struct omap_hwmod *
79 *
80 * Load the current value of the hwmod OCP_SYSCONFIG register into the
81 * struct omap_hwmod for later use. Returns -EINVAL if the hwmod has no
82 * OCP_SYSCONFIG register or 0 upon success.
83 */
84static int _update_sysc_cache(struct omap_hwmod *oh)
85{
86 if (!oh->sysconfig) {
87 WARN(!oh->sysconfig, "omap_hwmod: %s: cannot read "
88 "OCP_SYSCONFIG: not defined on hwmod\n", oh->name);
89 return -EINVAL;
90 }
91
92 /* XXX ensure module interface clock is up */
93
94 oh->_sysc_cache = omap_hwmod_readl(oh, oh->sysconfig->sysc_offs);
95
96 oh->_int_flags |= _HWMOD_SYSCONFIG_LOADED;
97
98 return 0;
99}
100
101/**
102 * _write_sysconfig - write a value to the module's OCP_SYSCONFIG register
103 * @v: OCP_SYSCONFIG value to write
104 * @oh: struct omap_hwmod *
105 *
106 * Write @v into the module OCP_SYSCONFIG register, if it has one. No
107 * return value.
108 */
109static void _write_sysconfig(u32 v, struct omap_hwmod *oh)
110{
111 if (!oh->sysconfig) {
112 WARN(!oh->sysconfig, "omap_hwmod: %s: cannot write "
113 "OCP_SYSCONFIG: not defined on hwmod\n", oh->name);
114 return;
115 }
116
117 /* XXX ensure module interface clock is up */
118
119 if (oh->_sysc_cache != v) {
120 oh->_sysc_cache = v;
121 omap_hwmod_writel(v, oh, oh->sysconfig->sysc_offs);
122 }
123}
124
125/**
126 * _set_master_standbymode: set the OCP_SYSCONFIG MIDLEMODE field in @v
127 * @oh: struct omap_hwmod *
128 * @standbymode: MIDLEMODE field bits
129 * @v: pointer to register contents to modify
130 *
131 * Update the master standby mode bits in @v to be @standbymode for
132 * the @oh hwmod. Does not write to the hardware. Returns -EINVAL
133 * upon error or 0 upon success.
134 */
135static int _set_master_standbymode(struct omap_hwmod *oh, u8 standbymode,
136 u32 *v)
137{
138 if (!oh->sysconfig ||
139 !(oh->sysconfig->sysc_flags & SYSC_HAS_MIDLEMODE))
140 return -EINVAL;
141
142 *v &= ~SYSC_MIDLEMODE_MASK;
143 *v |= __ffs(standbymode) << SYSC_MIDLEMODE_SHIFT;
144
145 return 0;
146}
147
148/**
149 * _set_slave_idlemode: set the OCP_SYSCONFIG SIDLEMODE field in @v
150 * @oh: struct omap_hwmod *
151 * @idlemode: SIDLEMODE field bits
152 * @v: pointer to register contents to modify
153 *
154 * Update the slave idle mode bits in @v to be @idlemode for the @oh
155 * hwmod. Does not write to the hardware. Returns -EINVAL upon error
156 * or 0 upon success.
157 */
158static int _set_slave_idlemode(struct omap_hwmod *oh, u8 idlemode, u32 *v)
159{
160 if (!oh->sysconfig ||
161 !(oh->sysconfig->sysc_flags & SYSC_HAS_SIDLEMODE))
162 return -EINVAL;
163
164 *v &= ~SYSC_SIDLEMODE_MASK;
165 *v |= __ffs(idlemode) << SYSC_SIDLEMODE_SHIFT;
166
167 return 0;
168}
169
170/**
171 * _set_clockactivity: set OCP_SYSCONFIG.CLOCKACTIVITY bits in @v
172 * @oh: struct omap_hwmod *
173 * @clockact: CLOCKACTIVITY field bits
174 * @v: pointer to register contents to modify
175 *
176 * Update the clockactivity mode bits in @v to be @clockact for the
177 * @oh hwmod. Used for additional powersaving on some modules. Does
178 * not write to the hardware. Returns -EINVAL upon error or 0 upon
179 * success.
180 */
181static int _set_clockactivity(struct omap_hwmod *oh, u8 clockact, u32 *v)
182{
183 if (!oh->sysconfig ||
184 !(oh->sysconfig->sysc_flags & SYSC_HAS_CLOCKACTIVITY))
185 return -EINVAL;
186
187 *v &= ~SYSC_CLOCKACTIVITY_MASK;
188 *v |= clockact << SYSC_CLOCKACTIVITY_SHIFT;
189
190 return 0;
191}
192
193/**
194 * _set_softreset: set OCP_SYSCONFIG.CLOCKACTIVITY bits in @v
195 * @oh: struct omap_hwmod *
196 * @v: pointer to register contents to modify
197 *
198 * Set the SOFTRESET bit in @v for hwmod @oh. Returns -EINVAL upon
199 * error or 0 upon success.
200 */
201static int _set_softreset(struct omap_hwmod *oh, u32 *v)
202{
203 if (!oh->sysconfig ||
204 !(oh->sysconfig->sysc_flags & SYSC_HAS_SOFTRESET))
205 return -EINVAL;
206
207 *v |= SYSC_SOFTRESET_MASK;
208
209 return 0;
210}
211
212/**
213 * _enable_wakeup: set OCP_SYSCONFIG.ENAWAKEUP bit in the hardware
214 * @oh: struct omap_hwmod *
215 *
216 * Allow the hardware module @oh to send wakeups. Returns -EINVAL
217 * upon error or 0 upon success.
218 */
219static int _enable_wakeup(struct omap_hwmod *oh)
220{
221 u32 v;
222
223 if (!oh->sysconfig ||
224 !(oh->sysconfig->sysc_flags & SYSC_HAS_ENAWAKEUP))
225 return -EINVAL;
226
227 v = oh->_sysc_cache;
228 v |= SYSC_ENAWAKEUP_MASK;
229 _write_sysconfig(v, oh);
230
231 /* XXX test pwrdm_get_wken for this hwmod's subsystem */
232
233 oh->_int_flags |= _HWMOD_WAKEUP_ENABLED;
234
235 return 0;
236}
237
238/**
239 * _disable_wakeup: clear OCP_SYSCONFIG.ENAWAKEUP bit in the hardware
240 * @oh: struct omap_hwmod *
241 *
242 * Prevent the hardware module @oh to send wakeups. Returns -EINVAL
243 * upon error or 0 upon success.
244 */
245static int _disable_wakeup(struct omap_hwmod *oh)
246{
247 u32 v;
248
249 if (!oh->sysconfig ||
250 !(oh->sysconfig->sysc_flags & SYSC_HAS_ENAWAKEUP))
251 return -EINVAL;
252
253 v = oh->_sysc_cache;
254 v &= ~SYSC_ENAWAKEUP_MASK;
255 _write_sysconfig(v, oh);
256
257 /* XXX test pwrdm_get_wken for this hwmod's subsystem */
258
259 oh->_int_flags &= ~_HWMOD_WAKEUP_ENABLED;
260
261 return 0;
262}
263
264/**
265 * _add_initiator_dep: prevent @oh from smart-idling while @init_oh is active
266 * @oh: struct omap_hwmod *
267 *
268 * Prevent the hardware module @oh from entering idle while the
269 * hardare module initiator @init_oh is active. Useful when a module
270 * will be accessed by a particular initiator (e.g., if a module will
271 * be accessed by the IVA, there should be a sleepdep between the IVA
272 * initiator and the module). Only applies to modules in smart-idle
273 * mode. Returns -EINVAL upon error or passes along
274 * pwrdm_add_sleepdep() value upon success.
275 */
276static int _add_initiator_dep(struct omap_hwmod *oh, struct omap_hwmod *init_oh)
277{
278 if (!oh->_clk)
279 return -EINVAL;
280
281 return pwrdm_add_sleepdep(oh->_clk->clkdm->pwrdm.ptr,
282 init_oh->_clk->clkdm->pwrdm.ptr);
283}
284
285/**
286 * _del_initiator_dep: allow @oh to smart-idle even if @init_oh is active
287 * @oh: struct omap_hwmod *
288 *
289 * Allow the hardware module @oh to enter idle while the hardare
290 * module initiator @init_oh is active. Useful when a module will not
291 * be accessed by a particular initiator (e.g., if a module will not
292 * be accessed by the IVA, there should be no sleepdep between the IVA
293 * initiator and the module). Only applies to modules in smart-idle
294 * mode. Returns -EINVAL upon error or passes along
295 * pwrdm_add_sleepdep() value upon success.
296 */
297static int _del_initiator_dep(struct omap_hwmod *oh, struct omap_hwmod *init_oh)
298{
299 if (!oh->_clk)
300 return -EINVAL;
301
302 return pwrdm_del_sleepdep(oh->_clk->clkdm->pwrdm.ptr,
303 init_oh->_clk->clkdm->pwrdm.ptr);
304}
305
306/**
307 * _init_main_clk - get a struct clk * for the the hwmod's main functional clk
308 * @oh: struct omap_hwmod *
309 *
310 * Called from _init_clocks(). Populates the @oh _clk (main
311 * functional clock pointer) if a main_clk is present. Returns 0 on
312 * success or -EINVAL on error.
313 */
314static int _init_main_clk(struct omap_hwmod *oh)
315{
316 struct clk *c;
317 int ret = 0;
318
319 if (!oh->clkdev_con_id)
320 return 0;
321
322 c = clk_get_sys(oh->clkdev_dev_id, oh->clkdev_con_id);
323 WARN(IS_ERR(c), "omap_hwmod: %s: cannot clk_get main_clk %s.%s\n",
324 oh->name, oh->clkdev_dev_id, oh->clkdev_con_id);
325 if (IS_ERR(c))
326 ret = -EINVAL;
327 oh->_clk = c;
328
329 return ret;
330}
331
332/**
333 * _init_interface_clk - get a struct clk * for the the hwmod's interface clks
334 * @oh: struct omap_hwmod *
335 *
336 * Called from _init_clocks(). Populates the @oh OCP slave interface
337 * clock pointers. Returns 0 on success or -EINVAL on error.
338 */
339static int _init_interface_clks(struct omap_hwmod *oh)
340{
341 struct omap_hwmod_ocp_if *os;
342 struct clk *c;
343 int i;
344 int ret = 0;
345
346 if (oh->slaves_cnt == 0)
347 return 0;
348
349 for (i = 0, os = *oh->slaves; i < oh->slaves_cnt; i++, os++) {
350 if (!os->clkdev_con_id)
351 continue;
352
353 c = clk_get_sys(os->clkdev_dev_id, os->clkdev_con_id);
354 WARN(IS_ERR(c), "omap_hwmod: %s: cannot clk_get "
355 "interface_clk %s.%s\n", oh->name,
356 os->clkdev_dev_id, os->clkdev_con_id);
357 if (IS_ERR(c))
358 ret = -EINVAL;
359 os->_clk = c;
360 }
361
362 return ret;
363}
364
365/**
366 * _init_opt_clk - get a struct clk * for the the hwmod's optional clocks
367 * @oh: struct omap_hwmod *
368 *
369 * Called from _init_clocks(). Populates the @oh omap_hwmod_opt_clk
370 * clock pointers. Returns 0 on success or -EINVAL on error.
371 */
372static int _init_opt_clks(struct omap_hwmod *oh)
373{
374 struct omap_hwmod_opt_clk *oc;
375 struct clk *c;
376 int i;
377 int ret = 0;
378
379 for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++) {
380 c = clk_get_sys(oc->clkdev_dev_id, oc->clkdev_con_id);
381 WARN(IS_ERR(c), "omap_hwmod: %s: cannot clk_get opt_clk "
382 "%s.%s\n", oh->name, oc->clkdev_dev_id,
383 oc->clkdev_con_id);
384 if (IS_ERR(c))
385 ret = -EINVAL;
386 oc->_clk = c;
387 }
388
389 return ret;
390}
391
392/**
393 * _enable_clocks - enable hwmod main clock and interface clocks
394 * @oh: struct omap_hwmod *
395 *
396 * Enables all clocks necessary for register reads and writes to succeed
397 * on the hwmod @oh. Returns 0.
398 */
399static int _enable_clocks(struct omap_hwmod *oh)
400{
401 struct omap_hwmod_ocp_if *os;
402 int i;
403
404 pr_debug("omap_hwmod: %s: enabling clocks\n", oh->name);
405
406 if (oh->_clk && !IS_ERR(oh->_clk))
407 clk_enable(oh->_clk);
408
409 if (oh->slaves_cnt > 0) {
410 for (i = 0, os = *oh->slaves; i < oh->slaves_cnt; i++, os++) {
411 struct clk *c = os->_clk;
412
413 if (c && !IS_ERR(c) && (os->flags & OCPIF_SWSUP_IDLE))
414 clk_enable(c);
415 }
416 }
417
418 /* The opt clocks are controlled by the device driver. */
419
420 return 0;
421}
422
423/**
424 * _disable_clocks - disable hwmod main clock and interface clocks
425 * @oh: struct omap_hwmod *
426 *
427 * Disables the hwmod @oh main functional and interface clocks. Returns 0.
428 */
429static int _disable_clocks(struct omap_hwmod *oh)
430{
431 struct omap_hwmod_ocp_if *os;
432 int i;
433
434 pr_debug("omap_hwmod: %s: disabling clocks\n", oh->name);
435
436 if (oh->_clk && !IS_ERR(oh->_clk))
437 clk_disable(oh->_clk);
438
439 if (oh->slaves_cnt > 0) {
440 for (i = 0, os = *oh->slaves; i < oh->slaves_cnt; i++, os++) {
441 struct clk *c = os->_clk;
442
443 if (c && !IS_ERR(c) && (os->flags & OCPIF_SWSUP_IDLE))
444 clk_disable(c);
445 }
446 }
447
448 /* The opt clocks are controlled by the device driver. */
449
450 return 0;
451}
452
453/**
454 * _find_mpu_port_index - find hwmod OCP slave port ID intended for MPU use
455 * @oh: struct omap_hwmod *
456 *
457 * Returns the array index of the OCP slave port that the MPU
458 * addresses the device on, or -EINVAL upon error or not found.
459 */
460static int _find_mpu_port_index(struct omap_hwmod *oh)
461{
462 struct omap_hwmod_ocp_if *os;
463 int i;
464 int found = 0;
465
466 if (!oh || oh->slaves_cnt == 0)
467 return -EINVAL;
468
469 for (i = 0, os = *oh->slaves; i < oh->slaves_cnt; i++, os++) {
470 if (os->user & OCP_USER_MPU) {
471 found = 1;
472 break;
473 }
474 }
475
476 if (found)
477 pr_debug("omap_hwmod: %s: MPU OCP slave port ID %d\n",
478 oh->name, i);
479 else
480 pr_debug("omap_hwmod: %s: no MPU OCP slave port found\n",
481 oh->name);
482
483 return (found) ? i : -EINVAL;
484}
485
486/**
487 * _find_mpu_rt_base - find hwmod register target base addr accessible by MPU
488 * @oh: struct omap_hwmod *
489 *
490 * Return the virtual address of the base of the register target of
491 * device @oh, or NULL on error.
492 */
493static void __iomem *_find_mpu_rt_base(struct omap_hwmod *oh, u8 index)
494{
495 struct omap_hwmod_ocp_if *os;
496 struct omap_hwmod_addr_space *mem;
497 int i;
498 int found = 0;
499
500 if (!oh || oh->slaves_cnt == 0)
501 return NULL;
502
503 os = *oh->slaves + index;
504
505 for (i = 0, mem = os->addr; i < os->addr_cnt; i++, mem++) {
506 if (mem->flags & ADDR_TYPE_RT) {
507 found = 1;
508 break;
509 }
510 }
511
512 /* XXX use ioremap() instead? */
513
514 if (found)
515 pr_debug("omap_hwmod: %s: MPU register target at va %p\n",
516 oh->name, OMAP2_IO_ADDRESS(mem->pa_start));
517 else
518 pr_debug("omap_hwmod: %s: no MPU register target found\n",
519 oh->name);
520
521 return (found) ? OMAP2_IO_ADDRESS(mem->pa_start) : NULL;
522}
523
524/**
525 * _sysc_enable - try to bring a module out of idle via OCP_SYSCONFIG
526 * @oh: struct omap_hwmod *
527 *
528 * If module is marked as SWSUP_SIDLE, force the module out of slave
529 * idle; otherwise, configure it for smart-idle. If module is marked
530 * as SWSUP_MSUSPEND, force the module out of master standby;
531 * otherwise, configure it for smart-standby. No return value.
532 */
533static void _sysc_enable(struct omap_hwmod *oh)
534{
535 u8 idlemode;
536 u32 v;
537
538 if (!oh->sysconfig)
539 return;
540
541 v = oh->_sysc_cache;
542
543 if (oh->sysconfig->sysc_flags & SYSC_HAS_SIDLEMODE) {
544 idlemode = (oh->flags & HWMOD_SWSUP_SIDLE) ?
545 HWMOD_IDLEMODE_NO : HWMOD_IDLEMODE_SMART;
546 _set_slave_idlemode(oh, idlemode, &v);
547 }
548
549 if (oh->sysconfig->sysc_flags & SYSC_HAS_MIDLEMODE) {
550 idlemode = (oh->flags & HWMOD_SWSUP_MSTANDBY) ?
551 HWMOD_IDLEMODE_NO : HWMOD_IDLEMODE_SMART;
552 _set_master_standbymode(oh, idlemode, &v);
553 }
554
555 /* XXX OCP AUTOIDLE bit? */
556
557 if (oh->flags & HWMOD_SET_DEFAULT_CLOCKACT &&
558 oh->sysconfig->sysc_flags & SYSC_HAS_CLOCKACTIVITY)
559 _set_clockactivity(oh, oh->sysconfig->clockact, &v);
560
561 _write_sysconfig(v, oh);
562}
563
564/**
565 * _sysc_idle - try to put a module into idle via OCP_SYSCONFIG
566 * @oh: struct omap_hwmod *
567 *
568 * If module is marked as SWSUP_SIDLE, force the module into slave
569 * idle; otherwise, configure it for smart-idle. If module is marked
570 * as SWSUP_MSUSPEND, force the module into master standby; otherwise,
571 * configure it for smart-standby. No return value.
572 */
573static void _sysc_idle(struct omap_hwmod *oh)
574{
575 u8 idlemode;
576 u32 v;
577
578 if (!oh->sysconfig)
579 return;
580
581 v = oh->_sysc_cache;
582
583 if (oh->sysconfig->sysc_flags & SYSC_HAS_SIDLEMODE) {
584 idlemode = (oh->flags & HWMOD_SWSUP_SIDLE) ?
585 HWMOD_IDLEMODE_FORCE : HWMOD_IDLEMODE_SMART;
586 _set_slave_idlemode(oh, idlemode, &v);
587 }
588
589 if (oh->sysconfig->sysc_flags & SYSC_HAS_MIDLEMODE) {
590 idlemode = (oh->flags & HWMOD_SWSUP_MSTANDBY) ?
591 HWMOD_IDLEMODE_FORCE : HWMOD_IDLEMODE_SMART;
592 _set_master_standbymode(oh, idlemode, &v);
593 }
594
595 _write_sysconfig(v, oh);
596}
597
598/**
599 * _sysc_shutdown - force a module into idle via OCP_SYSCONFIG
600 * @oh: struct omap_hwmod *
601 *
602 * Force the module into slave idle and master suspend. No return
603 * value.
604 */
605static void _sysc_shutdown(struct omap_hwmod *oh)
606{
607 u32 v;
608
609 if (!oh->sysconfig)
610 return;
611
612 v = oh->_sysc_cache;
613
614 if (oh->sysconfig->sysc_flags & SYSC_HAS_SIDLEMODE)
615 _set_slave_idlemode(oh, HWMOD_IDLEMODE_FORCE, &v);
616
617 if (oh->sysconfig->sysc_flags & SYSC_HAS_MIDLEMODE)
618 _set_master_standbymode(oh, HWMOD_IDLEMODE_FORCE, &v);
619
620 /* XXX clear OCP AUTOIDLE bit? */
621
622 _write_sysconfig(v, oh);
623}
624
625/**
626 * _lookup - find an omap_hwmod by name
627 * @name: find an omap_hwmod by name
628 *
629 * Return a pointer to an omap_hwmod by name, or NULL if not found.
630 * Caller must hold omap_hwmod_mutex.
631 */
632static struct omap_hwmod *_lookup(const char *name)
633{
634 struct omap_hwmod *oh, *temp_oh;
635
636 oh = NULL;
637
638 list_for_each_entry(temp_oh, &omap_hwmod_list, node) {
639 if (!strcmp(name, temp_oh->name)) {
640 oh = temp_oh;
641 break;
642 }
643 }
644
645 return oh;
646}
647
648/**
649 * _init_clocks - clk_get() all clocks associated with this hwmod
650 * @oh: struct omap_hwmod *
651 *
652 * Called by omap_hwmod_late_init() (after omap2_clk_init()).
653 * Resolves all clock names embedded in the hwmod. Must be called
654 * with omap_hwmod_mutex held. Returns -EINVAL if the omap_hwmod
655 * has not yet been registered or if the clocks have already been
656 * initialized, 0 on success, or a non-zero error on failure.
657 */
658static int _init_clocks(struct omap_hwmod *oh)
659{
660 int ret = 0;
661
662 if (!oh || (oh->_state != _HWMOD_STATE_REGISTERED))
663 return -EINVAL;
664
665 pr_debug("omap_hwmod: %s: looking up clocks\n", oh->name);
666
667 ret |= _init_main_clk(oh);
668 ret |= _init_interface_clks(oh);
669 ret |= _init_opt_clks(oh);
670
671 oh->_state = _HWMOD_STATE_CLKS_INITED;
672
673 return ret;
674}
675
676/**
677 * _wait_target_ready - wait for a module to leave slave idle
678 * @oh: struct omap_hwmod *
679 *
680 * Wait for a module @oh to leave slave idle. Returns 0 if the module
681 * does not have an IDLEST bit or if the module successfully leaves
682 * slave idle; otherwise, pass along the return value of the
683 * appropriate *_cm_wait_module_ready() function.
684 */
685static int _wait_target_ready(struct omap_hwmod *oh)
686{
687 struct omap_hwmod_ocp_if *os;
688 int ret;
689
690 if (!oh)
691 return -EINVAL;
692
693 if (oh->_int_flags & _HWMOD_NO_MPU_PORT)
694 return 0;
695
696 os = *oh->slaves + oh->_mpu_port_index;
697
698 if (!(os->flags & OCPIF_HAS_IDLEST))
699 return 0;
700
701 /* XXX check module SIDLEMODE */
702
703 /* XXX check clock enable states */
704
705 if (cpu_is_omap24xx() || cpu_is_omap34xx()) {
706 ret = omap2_cm_wait_module_ready(oh->prcm.omap2.module_offs,
707 oh->prcm.omap2.idlest_reg_id,
708 oh->prcm.omap2.idlest_idle_bit);
709#if 0
710 } else if (cpu_is_omap44xx()) {
711 ret = omap4_cm_wait_module_ready(oh->prcm.omap4.module_offs,
712 oh->prcm.omap4.device_offs);
713#endif
714 } else {
715 BUG();
716 };
717
718 return ret;
719}
720
721/**
722 * _reset - reset an omap_hwmod
723 * @oh: struct omap_hwmod *
724 *
725 * Resets an omap_hwmod @oh via the OCP_SYSCONFIG bit. hwmod must be
726 * enabled for this to work. Must be called with omap_hwmod_mutex
727 * held. Returns -EINVAL if the hwmod cannot be reset this way or if
728 * the hwmod is in the wrong state, -ETIMEDOUT if the module did not
729 * reset in time, or 0 upon success.
730 */
731static int _reset(struct omap_hwmod *oh)
732{
733 u32 r, v;
734 int c;
735
736 if (!oh->sysconfig ||
737 !(oh->sysconfig->sysc_flags & SYSC_HAS_SOFTRESET) ||
738 (oh->sysconfig->sysc_flags & SYSS_MISSING))
739 return -EINVAL;
740
741 /* clocks must be on for this operation */
742 if (oh->_state != _HWMOD_STATE_ENABLED) {
743 WARN(1, "omap_hwmod: %s: reset can only be entered from "
744 "enabled state\n", oh->name);
745 return -EINVAL;
746 }
747
748 pr_debug("omap_hwmod: %s: resetting\n", oh->name);
749
750 v = oh->_sysc_cache;
751 r = _set_softreset(oh, &v);
752 if (r)
753 return r;
754 _write_sysconfig(v, oh);
755
756 c = 0;
757 while (c < MAX_MODULE_RESET_WAIT &&
758 !(omap_hwmod_readl(oh, oh->sysconfig->syss_offs) &
759 SYSS_RESETDONE_MASK)) {
760 udelay(1);
761 c++;
762 }
763
764 if (c == MAX_MODULE_RESET_WAIT)
765 WARN(1, "omap_hwmod: %s: failed to reset in %d usec\n",
766 oh->name, MAX_MODULE_RESET_WAIT);
767 else
768 pr_debug("omap_hwmod: %s: reset in %d usec\n", oh->name, c);
769
770 /*
771 * XXX add _HWMOD_STATE_WEDGED for modules that don't come back from
772 * _wait_target_ready() or _reset()
773 */
774
775 return (c == MAX_MODULE_RESET_WAIT) ? -ETIMEDOUT : 0;
776}
777
778/**
779 * _enable - enable an omap_hwmod
780 * @oh: struct omap_hwmod *
781 *
782 * Enables an omap_hwmod @oh such that the MPU can access the hwmod's
783 * register target. Must be called with omap_hwmod_mutex held.
784 * Returns -EINVAL if the hwmod is in the wrong state or passes along
785 * the return value of _wait_target_ready().
786 */
787static int _enable(struct omap_hwmod *oh)
788{
789 int r;
790
791 if (oh->_state != _HWMOD_STATE_INITIALIZED &&
792 oh->_state != _HWMOD_STATE_IDLE &&
793 oh->_state != _HWMOD_STATE_DISABLED) {
794 WARN(1, "omap_hwmod: %s: enabled state can only be entered "
795 "from initialized, idle, or disabled state\n", oh->name);
796 return -EINVAL;
797 }
798
799 pr_debug("omap_hwmod: %s: enabling\n", oh->name);
800
801 /* XXX mux balls */
802
803 _add_initiator_dep(oh, mpu_oh);
804 _enable_clocks(oh);
805
806 if (oh->sysconfig) {
807 if (!(oh->_int_flags & _HWMOD_SYSCONFIG_LOADED))
808 _update_sysc_cache(oh);
809 _sysc_enable(oh);
810 }
811
812 r = _wait_target_ready(oh);
813 if (!r)
814 oh->_state = _HWMOD_STATE_ENABLED;
815
816 return r;
817}
818
819/**
820 * _idle - idle an omap_hwmod
821 * @oh: struct omap_hwmod *
822 *
823 * Idles an omap_hwmod @oh. This should be called once the hwmod has
824 * no further work. Returns -EINVAL if the hwmod is in the wrong
825 * state or returns 0.
826 */
827static int _idle(struct omap_hwmod *oh)
828{
829 if (oh->_state != _HWMOD_STATE_ENABLED) {
830 WARN(1, "omap_hwmod: %s: idle state can only be entered from "
831 "enabled state\n", oh->name);
832 return -EINVAL;
833 }
834
835 pr_debug("omap_hwmod: %s: idling\n", oh->name);
836
837 if (oh->sysconfig)
838 _sysc_idle(oh);
839 _del_initiator_dep(oh, mpu_oh);
840 _disable_clocks(oh);
841
842 oh->_state = _HWMOD_STATE_IDLE;
843
844 return 0;
845}
846
847/**
848 * _shutdown - shutdown an omap_hwmod
849 * @oh: struct omap_hwmod *
850 *
851 * Shut down an omap_hwmod @oh. This should be called when the driver
852 * used for the hwmod is removed or unloaded or if the driver is not
853 * used by the system. Returns -EINVAL if the hwmod is in the wrong
854 * state or returns 0.
855 */
856static int _shutdown(struct omap_hwmod *oh)
857{
858 if (oh->_state != _HWMOD_STATE_IDLE &&
859 oh->_state != _HWMOD_STATE_ENABLED) {
860 WARN(1, "omap_hwmod: %s: disabled state can only be entered "
861 "from idle, or enabled state\n", oh->name);
862 return -EINVAL;
863 }
864
865 pr_debug("omap_hwmod: %s: disabling\n", oh->name);
866
867 if (oh->sysconfig)
868 _sysc_shutdown(oh);
869 _del_initiator_dep(oh, mpu_oh);
870 /* XXX what about the other system initiators here? DMA, tesla, d2d */
871 _disable_clocks(oh);
872 /* XXX Should this code also force-disable the optional clocks? */
873
874 /* XXX mux any associated balls to safe mode */
875
876 oh->_state = _HWMOD_STATE_DISABLED;
877
878 return 0;
879}
880
881/**
882 * _write_clockact_lock - set the module's clockactivity bits
883 * @oh: struct omap_hwmod *
884 * @clockact: CLOCKACTIVITY field bits
885 *
886 * Writes the CLOCKACTIVITY bits @clockact to the hwmod @oh
887 * OCP_SYSCONFIG register. Returns -EINVAL if the hwmod is in the
888 * wrong state or returns 0.
889 */
890static int _write_clockact_lock(struct omap_hwmod *oh, u8 clockact)
891{
892 u32 v;
893
894 if (!oh->sysconfig ||
895 !(oh->sysconfig->sysc_flags & SYSC_HAS_CLOCKACTIVITY))
896 return -EINVAL;
897
898 mutex_lock(&omap_hwmod_mutex);
899 v = oh->_sysc_cache;
900 _set_clockactivity(oh, clockact, &v);
901 _write_sysconfig(v, oh);
902 mutex_unlock(&omap_hwmod_mutex);
903
904 return 0;
905}
906
907
908/**
909 * _setup - do initial configuration of omap_hwmod
910 * @oh: struct omap_hwmod *
911 *
912 * Writes the CLOCKACTIVITY bits @clockact to the hwmod @oh
913 * OCP_SYSCONFIG register. Must be called with omap_hwmod_mutex
914 * held. Returns -EINVAL if the hwmod is in the wrong state or returns
915 * 0.
916 */
917static int _setup(struct omap_hwmod *oh)
918{
919 struct omap_hwmod_ocp_if *os;
920 int i;
921
922 if (!oh)
923 return -EINVAL;
924
925 /* Set iclk autoidle mode */
926 if (oh->slaves_cnt > 0) {
927 for (i = 0, os = *oh->slaves; i < oh->slaves_cnt; i++, os++) {
928 struct clk *c = os->_clk;
929
930 if (!c || IS_ERR(c))
931 continue;
932
933 if (os->flags & OCPIF_SWSUP_IDLE) {
934 /* XXX omap_iclk_deny_idle(c); */
935 } else {
936 /* XXX omap_iclk_allow_idle(c); */
937 clk_enable(c);
938 }
939 }
940 }
941
942 oh->_state = _HWMOD_STATE_INITIALIZED;
943
944 _enable(oh);
945
946 if (!(oh->flags & HWMOD_INIT_NO_RESET))
947 _reset(oh);
948
949 /* XXX OCP AUTOIDLE bit? */
950 /* XXX OCP ENAWAKEUP bit? */
951
952 if (!(oh->flags & HWMOD_INIT_NO_IDLE))
953 _idle(oh);
954
955 return 0;
956}
957
958
959
960/* Public functions */
961
962u32 omap_hwmod_readl(struct omap_hwmod *oh, u16 reg_offs)
963{
964 return __raw_readl(oh->_rt_va + reg_offs);
965}
966
967void omap_hwmod_writel(u32 v, struct omap_hwmod *oh, u16 reg_offs)
968{
969 __raw_writel(v, oh->_rt_va + reg_offs);
970}
971
972/**
973 * omap_hwmod_register - register a struct omap_hwmod
974 * @oh: struct omap_hwmod *
975 *
976 * Registers the omap_hwmod @oh. Returns -EEXIST if an omap_hwmod already
977 * has been registered by the same name; -EINVAL if the omap_hwmod is in the
978 * wrong state, or 0 on success.
979 *
980 * XXX The data should be copied into bootmem, so the original data
981 * should be marked __initdata and freed after init. This would allow
982 * unneeded omap_hwmods to be freed on multi-OMAP configurations. Note
983 * that the copy process would be relatively complex due to the large number
984 * of substructures.
985 */
986int omap_hwmod_register(struct omap_hwmod *oh)
987{
988 int ret, ms_id;
989
990 if (!oh || (oh->_state != _HWMOD_STATE_UNKNOWN))
991 return -EINVAL;
992
993 mutex_lock(&omap_hwmod_mutex);
994
995 pr_debug("omap_hwmod: %s: registering\n", oh->name);
996
997 if (_lookup(oh->name)) {
998 ret = -EEXIST;
999 goto ohr_unlock;
1000 }
1001
1002 ms_id = _find_mpu_port_index(oh);
1003 if (!IS_ERR_VALUE(ms_id)) {
1004 oh->_mpu_port_index = ms_id;
1005 oh->_rt_va = _find_mpu_rt_base(oh, oh->_mpu_port_index);
1006 } else {
1007 oh->_int_flags |= _HWMOD_NO_MPU_PORT;
1008 }
1009
1010 list_add_tail(&oh->node, &omap_hwmod_list);
1011
1012 oh->_state = _HWMOD_STATE_REGISTERED;
1013
1014 ret = 0;
1015
1016ohr_unlock:
1017 mutex_unlock(&omap_hwmod_mutex);
1018 return ret;
1019}
1020
1021/**
1022 * omap_hwmod_lookup - look up a registered omap_hwmod by name
1023 * @name: name of the omap_hwmod to look up
1024 *
1025 * Given a @name of an omap_hwmod, return a pointer to the registered
1026 * struct omap_hwmod *, or NULL upon error.
1027 */
1028struct omap_hwmod *omap_hwmod_lookup(const char *name)
1029{
1030 struct omap_hwmod *oh;
1031
1032 if (!name)
1033 return NULL;
1034
1035 mutex_lock(&omap_hwmod_mutex);
1036 oh = _lookup(name);
1037 mutex_unlock(&omap_hwmod_mutex);
1038
1039 return oh;
1040}
1041
1042/**
1043 * omap_hwmod_for_each - call function for each registered omap_hwmod
1044 * @fn: pointer to a callback function
1045 *
1046 * Call @fn for each registered omap_hwmod, passing @data to each
1047 * function. @fn must return 0 for success or any other value for
1048 * failure. If @fn returns non-zero, the iteration across omap_hwmods
1049 * will stop and the non-zero return value will be passed to the
1050 * caller of omap_hwmod_for_each(). @fn is called with
1051 * omap_hwmod_for_each() held.
1052 */
1053int omap_hwmod_for_each(int (*fn)(struct omap_hwmod *oh))
1054{
1055 struct omap_hwmod *temp_oh;
1056 int ret;
1057
1058 if (!fn)
1059 return -EINVAL;
1060
1061 mutex_lock(&omap_hwmod_mutex);
1062 list_for_each_entry(temp_oh, &omap_hwmod_list, node) {
1063 ret = (*fn)(temp_oh);
1064 if (ret)
1065 break;
1066 }
1067 mutex_unlock(&omap_hwmod_mutex);
1068
1069 return ret;
1070}
1071
1072
1073/**
1074 * omap_hwmod_init - init omap_hwmod code and register hwmods
1075 * @ohs: pointer to an array of omap_hwmods to register
1076 *
1077 * Intended to be called early in boot before the clock framework is
1078 * initialized. If @ohs is not null, will register all omap_hwmods
1079 * listed in @ohs that are valid for this chip. Returns -EINVAL if
1080 * omap_hwmod_init() has already been called or 0 otherwise.
1081 */
1082int omap_hwmod_init(struct omap_hwmod **ohs)
1083{
1084 struct omap_hwmod *oh;
1085 int r;
1086
1087 if (inited)
1088 return -EINVAL;
1089
1090 inited = 1;
1091
1092 if (!ohs)
1093 return 0;
1094
1095 oh = *ohs;
1096 while (oh) {
1097 if (omap_chip_is(oh->omap_chip)) {
1098 r = omap_hwmod_register(oh);
1099 WARN(r, "omap_hwmod: %s: omap_hwmod_register returned "
1100 "%d\n", oh->name, r);
1101 }
1102 oh = *++ohs;
1103 }
1104
1105 return 0;
1106}
1107
1108/**
1109 * omap_hwmod_late_init - do some post-clock framework initialization
1110 *
1111 * Must be called after omap2_clk_init(). Resolves the struct clk names
1112 * to struct clk pointers for each registered omap_hwmod. Also calls
1113 * _setup() on each hwmod. Returns 0.
1114 */
1115int omap_hwmod_late_init(void)
1116{
1117 int r;
1118
1119 /* XXX check return value */
1120 r = omap_hwmod_for_each(_init_clocks);
1121 WARN(r, "omap_hwmod: omap_hwmod_late_init(): _init_clocks failed\n");
1122
1123 mpu_oh = omap_hwmod_lookup(MPU_INITIATOR_NAME);
1124 WARN(!mpu_oh, "omap_hwmod: could not find MPU initiator hwmod %s\n",
1125 MPU_INITIATOR_NAME);
1126
1127 omap_hwmod_for_each(_setup);
1128
1129 return 0;
1130}
1131
1132/**
1133 * omap_hwmod_unregister - unregister an omap_hwmod
1134 * @oh: struct omap_hwmod *
1135 *
1136 * Unregisters a previously-registered omap_hwmod @oh. There's probably
1137 * no use case for this, so it is likely to be removed in a later version.
1138 *
1139 * XXX Free all of the bootmem-allocated structures here when that is
1140 * implemented. Make it clear that core code is the only code that is
1141 * expected to unregister modules.
1142 */
1143int omap_hwmod_unregister(struct omap_hwmod *oh)
1144{
1145 if (!oh)
1146 return -EINVAL;
1147
1148 pr_debug("omap_hwmod: %s: unregistering\n", oh->name);
1149
1150 mutex_lock(&omap_hwmod_mutex);
1151 list_del(&oh->node);
1152 mutex_unlock(&omap_hwmod_mutex);
1153
1154 return 0;
1155}
1156
1157/**
1158 * omap_hwmod_enable - enable an omap_hwmod
1159 * @oh: struct omap_hwmod *
1160 *
1161 * Enable an omap_hwomd @oh. Intended to be called by omap_device_enable().
1162 * Returns -EINVAL on error or passes along the return value from _enable().
1163 */
1164int omap_hwmod_enable(struct omap_hwmod *oh)
1165{
1166 int r;
1167
1168 if (!oh)
1169 return -EINVAL;
1170
1171 mutex_lock(&omap_hwmod_mutex);
1172 r = _enable(oh);
1173 mutex_unlock(&omap_hwmod_mutex);
1174
1175 return r;
1176}
1177
1178/**
1179 * omap_hwmod_idle - idle an omap_hwmod
1180 * @oh: struct omap_hwmod *
1181 *
1182 * Idle an omap_hwomd @oh. Intended to be called by omap_device_idle().
1183 * Returns -EINVAL on error or passes along the return value from _idle().
1184 */
1185int omap_hwmod_idle(struct omap_hwmod *oh)
1186{
1187 if (!oh)
1188 return -EINVAL;
1189
1190 mutex_lock(&omap_hwmod_mutex);
1191 _idle(oh);
1192 mutex_unlock(&omap_hwmod_mutex);
1193
1194 return 0;
1195}
1196
1197/**
1198 * omap_hwmod_shutdown - shutdown an omap_hwmod
1199 * @oh: struct omap_hwmod *
1200 *
1201 * Shutdown an omap_hwomd @oh. Intended to be called by
1202 * omap_device_shutdown(). Returns -EINVAL on error or passes along
1203 * the return value from _shutdown().
1204 */
1205int omap_hwmod_shutdown(struct omap_hwmod *oh)
1206{
1207 if (!oh)
1208 return -EINVAL;
1209
1210 mutex_lock(&omap_hwmod_mutex);
1211 _shutdown(oh);
1212 mutex_unlock(&omap_hwmod_mutex);
1213
1214 return 0;
1215}
1216
1217/**
1218 * omap_hwmod_enable_clocks - enable main_clk, all interface clocks
1219 * @oh: struct omap_hwmod *oh
1220 *
1221 * Intended to be called by the omap_device code.
1222 */
1223int omap_hwmod_enable_clocks(struct omap_hwmod *oh)
1224{
1225 mutex_lock(&omap_hwmod_mutex);
1226 _enable_clocks(oh);
1227 mutex_unlock(&omap_hwmod_mutex);
1228
1229 return 0;
1230}
1231
1232/**
1233 * omap_hwmod_disable_clocks - disable main_clk, all interface clocks
1234 * @oh: struct omap_hwmod *oh
1235 *
1236 * Intended to be called by the omap_device code.
1237 */
1238int omap_hwmod_disable_clocks(struct omap_hwmod *oh)
1239{
1240 mutex_lock(&omap_hwmod_mutex);
1241 _disable_clocks(oh);
1242 mutex_unlock(&omap_hwmod_mutex);
1243
1244 return 0;
1245}
1246
1247/**
1248 * omap_hwmod_ocp_barrier - wait for posted writes against the hwmod to complete
1249 * @oh: struct omap_hwmod *oh
1250 *
1251 * Intended to be called by drivers and core code when all posted
1252 * writes to a device must complete before continuing further
1253 * execution (for example, after clearing some device IRQSTATUS
1254 * register bits)
1255 *
1256 * XXX what about targets with multiple OCP threads?
1257 */
1258void omap_hwmod_ocp_barrier(struct omap_hwmod *oh)
1259{
1260 BUG_ON(!oh);
1261
1262 if (!oh->sysconfig || !oh->sysconfig->sysc_flags) {
1263 WARN(1, "omap_device: %s: OCP barrier impossible due to "
1264 "device configuration\n", oh->name);
1265 return;
1266 }
1267
1268 /*
1269 * Forces posted writes to complete on the OCP thread handling
1270 * register writes
1271 */
1272 omap_hwmod_readl(oh, oh->sysconfig->sysc_offs);
1273}
1274
1275/**
1276 * omap_hwmod_reset - reset the hwmod
1277 * @oh: struct omap_hwmod *
1278 *
1279 * Under some conditions, a driver may wish to reset the entire device.
1280 * Called from omap_device code. Returns -EINVAL on error or passes along
1281 * the return value from _reset()/_enable().
1282 */
1283int omap_hwmod_reset(struct omap_hwmod *oh)
1284{
1285 int r;
1286
1287 if (!oh || !(oh->_state & _HWMOD_STATE_ENABLED))
1288 return -EINVAL;
1289
1290 mutex_lock(&omap_hwmod_mutex);
1291 r = _reset(oh);
1292 if (!r)
1293 r = _enable(oh);
1294 mutex_unlock(&omap_hwmod_mutex);
1295
1296 return r;
1297}
1298
1299/**
1300 * omap_hwmod_count_resources - count number of struct resources needed by hwmod
1301 * @oh: struct omap_hwmod *
1302 * @res: pointer to the first element of an array of struct resource to fill
1303 *
1304 * Count the number of struct resource array elements necessary to
1305 * contain omap_hwmod @oh resources. Intended to be called by code
1306 * that registers omap_devices. Intended to be used to determine the
1307 * size of a dynamically-allocated struct resource array, before
1308 * calling omap_hwmod_fill_resources(). Returns the number of struct
1309 * resource array elements needed.
1310 *
1311 * XXX This code is not optimized. It could attempt to merge adjacent
1312 * resource IDs.
1313 *
1314 */
1315int omap_hwmod_count_resources(struct omap_hwmod *oh)
1316{
1317 int ret, i;
1318
1319 ret = oh->mpu_irqs_cnt + oh->sdma_chs_cnt;
1320
1321 for (i = 0; i < oh->slaves_cnt; i++)
1322 ret += (*oh->slaves + i)->addr_cnt;
1323
1324 return ret;
1325}
1326
1327/**
1328 * omap_hwmod_fill_resources - fill struct resource array with hwmod data
1329 * @oh: struct omap_hwmod *
1330 * @res: pointer to the first element of an array of struct resource to fill
1331 *
1332 * Fill the struct resource array @res with resource data from the
1333 * omap_hwmod @oh. Intended to be called by code that registers
1334 * omap_devices. See also omap_hwmod_count_resources(). Returns the
1335 * number of array elements filled.
1336 */
1337int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res)
1338{
1339 int i, j;
1340 int r = 0;
1341
1342 /* For each IRQ, DMA, memory area, fill in array.*/
1343
1344 for (i = 0; i < oh->mpu_irqs_cnt; i++) {
1345 (res + r)->start = *(oh->mpu_irqs + i);
1346 (res + r)->end = *(oh->mpu_irqs + i);
1347 (res + r)->flags = IORESOURCE_IRQ;
1348 r++;
1349 }
1350
1351 for (i = 0; i < oh->sdma_chs_cnt; i++) {
1352 (res + r)->name = (oh->sdma_chs + i)->name;
1353 (res + r)->start = (oh->sdma_chs + i)->dma_ch;
1354 (res + r)->end = (oh->sdma_chs + i)->dma_ch;
1355 (res + r)->flags = IORESOURCE_DMA;
1356 r++;
1357 }
1358
1359 for (i = 0; i < oh->slaves_cnt; i++) {
1360 struct omap_hwmod_ocp_if *os;
1361
1362 os = *oh->slaves + i;
1363
1364 for (j = 0; j < os->addr_cnt; j++) {
1365 (res + r)->start = (os->addr + j)->pa_start;
1366 (res + r)->end = (os->addr + j)->pa_end;
1367 (res + r)->flags = IORESOURCE_MEM;
1368 r++;
1369 }
1370 }
1371
1372 return r;
1373}
1374
1375/**
1376 * omap_hwmod_get_pwrdm - return pointer to this module's main powerdomain
1377 * @oh: struct omap_hwmod *
1378 *
1379 * Return the powerdomain pointer associated with the OMAP module
1380 * @oh's main clock. If @oh does not have a main clk, return the
1381 * powerdomain associated with the interface clock associated with the
1382 * module's MPU port. (XXX Perhaps this should use the SDMA port
1383 * instead?) Returns NULL on error, or a struct powerdomain * on
1384 * success.
1385 */
1386struct powerdomain *omap_hwmod_get_pwrdm(struct omap_hwmod *oh)
1387{
1388 struct clk *c;
1389
1390 if (!oh)
1391 return NULL;
1392
1393 if (oh->_clk) {
1394 c = oh->_clk;
1395 } else {
1396 if (oh->_int_flags & _HWMOD_NO_MPU_PORT)
1397 return NULL;
1398 c = oh->slaves[oh->_mpu_port_index]->_clk;
1399 }
1400
1401 return c->clkdm->pwrdm.ptr;
1402
1403}
1404
1405/**
1406 * omap_hwmod_add_initiator_dep - add sleepdep from @init_oh to @oh
1407 * @oh: struct omap_hwmod *
1408 * @init_oh: struct omap_hwmod * (initiator)
1409 *
1410 * Add a sleep dependency between the initiator @init_oh and @oh.
1411 * Intended to be called by DSP/Bridge code via platform_data for the
1412 * DSP case; and by the DMA code in the sDMA case. DMA code, *Bridge
1413 * code needs to add/del initiator dependencies dynamically
1414 * before/after accessing a device. Returns the return value from
1415 * _add_initiator_dep().
1416 *
1417 * XXX Keep a usecount in the clockdomain code
1418 */
1419int omap_hwmod_add_initiator_dep(struct omap_hwmod *oh,
1420 struct omap_hwmod *init_oh)
1421{
1422 return _add_initiator_dep(oh, init_oh);
1423}
1424
1425/*
1426 * XXX what about functions for drivers to save/restore ocp_sysconfig
1427 * for context save/restore operations?
1428 */
1429
1430/**
1431 * omap_hwmod_del_initiator_dep - remove sleepdep from @init_oh to @oh
1432 * @oh: struct omap_hwmod *
1433 * @init_oh: struct omap_hwmod * (initiator)
1434 *
1435 * Remove a sleep dependency between the initiator @init_oh and @oh.
1436 * Intended to be called by DSP/Bridge code via platform_data for the
1437 * DSP case; and by the DMA code in the sDMA case. DMA code, *Bridge
1438 * code needs to add/del initiator dependencies dynamically
1439 * before/after accessing a device. Returns the return value from
1440 * _del_initiator_dep().
1441 *
1442 * XXX Keep a usecount in the clockdomain code
1443 */
1444int omap_hwmod_del_initiator_dep(struct omap_hwmod *oh,
1445 struct omap_hwmod *init_oh)
1446{
1447 return _del_initiator_dep(oh, init_oh);
1448}
1449
1450/**
1451 * omap_hwmod_set_clockact_none - set clockactivity test to BOTH
1452 * @oh: struct omap_hwmod *
1453 *
1454 * On some modules, this function can affect the wakeup latency vs.
1455 * power consumption balance. Intended to be called by the
1456 * omap_device layer. Passes along the return value from
1457 * _write_clockact_lock().
1458 */
1459int omap_hwmod_set_clockact_both(struct omap_hwmod *oh)
1460{
1461 return _write_clockact_lock(oh, CLOCKACT_TEST_BOTH);
1462}
1463
1464/**
1465 * omap_hwmod_set_clockact_none - set clockactivity test to MAIN
1466 * @oh: struct omap_hwmod *
1467 *
1468 * On some modules, this function can affect the wakeup latency vs.
1469 * power consumption balance. Intended to be called by the
1470 * omap_device layer. Passes along the return value from
1471 * _write_clockact_lock().
1472 */
1473int omap_hwmod_set_clockact_main(struct omap_hwmod *oh)
1474{
1475 return _write_clockact_lock(oh, CLOCKACT_TEST_MAIN);
1476}
1477
1478/**
1479 * omap_hwmod_set_clockact_none - set clockactivity test to ICLK
1480 * @oh: struct omap_hwmod *
1481 *
1482 * On some modules, this function can affect the wakeup latency vs.
1483 * power consumption balance. Intended to be called by the
1484 * omap_device layer. Passes along the return value from
1485 * _write_clockact_lock().
1486 */
1487int omap_hwmod_set_clockact_iclk(struct omap_hwmod *oh)
1488{
1489 return _write_clockact_lock(oh, CLOCKACT_TEST_ICLK);
1490}
1491
1492/**
1493 * omap_hwmod_set_clockact_none - set clockactivity test to NONE
1494 * @oh: struct omap_hwmod *
1495 *
1496 * On some modules, this function can affect the wakeup latency vs.
1497 * power consumption balance. Intended to be called by the
1498 * omap_device layer. Passes along the return value from
1499 * _write_clockact_lock().
1500 */
1501int omap_hwmod_set_clockact_none(struct omap_hwmod *oh)
1502{
1503 return _write_clockact_lock(oh, CLOCKACT_TEST_NONE);
1504}
1505
1506/**
1507 * omap_hwmod_enable_wakeup - allow device to wake up the system
1508 * @oh: struct omap_hwmod *
1509 *
1510 * Sets the module OCP socket ENAWAKEUP bit to allow the module to
1511 * send wakeups to the PRCM. Eventually this should sets PRCM wakeup
1512 * registers to cause the PRCM to receive wakeup events from the
1513 * module. Does not set any wakeup routing registers beyond this
1514 * point - if the module is to wake up any other module or subsystem,
1515 * that must be set separately. Called by omap_device code. Returns
1516 * -EINVAL on error or 0 upon success.
1517 */
1518int omap_hwmod_enable_wakeup(struct omap_hwmod *oh)
1519{
1520 if (!oh->sysconfig ||
1521 !(oh->sysconfig->sysc_flags & SYSC_HAS_ENAWAKEUP))
1522 return -EINVAL;
1523
1524 mutex_lock(&omap_hwmod_mutex);
1525 _enable_wakeup(oh);
1526 mutex_unlock(&omap_hwmod_mutex);
1527
1528 return 0;
1529}
1530
1531/**
1532 * omap_hwmod_disable_wakeup - prevent device from waking the system
1533 * @oh: struct omap_hwmod *
1534 *
1535 * Clears the module OCP socket ENAWAKEUP bit to prevent the module
1536 * from sending wakeups to the PRCM. Eventually this should clear
1537 * PRCM wakeup registers to cause the PRCM to ignore wakeup events
1538 * from the module. Does not set any wakeup routing registers beyond
1539 * this point - if the module is to wake up any other module or
1540 * subsystem, that must be set separately. Called by omap_device
1541 * code. Returns -EINVAL on error or 0 upon success.
1542 */
1543int omap_hwmod_disable_wakeup(struct omap_hwmod *oh)
1544{
1545 if (!oh->sysconfig ||
1546 !(oh->sysconfig->sysc_flags & SYSC_HAS_ENAWAKEUP))
1547 return -EINVAL;
1548
1549 mutex_lock(&omap_hwmod_mutex);
1550 _disable_wakeup(oh);
1551 mutex_unlock(&omap_hwmod_mutex);
1552
1553 return 0;
1554}
diff --git a/arch/arm/mach-omap2/omap_hwmod_2420.h b/arch/arm/mach-omap2/omap_hwmod_2420.h
new file mode 100644
index 000000000000..767e4965ac4e
--- /dev/null
+++ b/arch/arm/mach-omap2/omap_hwmod_2420.h
@@ -0,0 +1,141 @@
1/*
2 * omap_hwmod_2420.h - hardware modules present on the OMAP2420 chips
3 *
4 * Copyright (C) 2009 Nokia Corporation
5 * Paul Walmsley
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 * XXX handle crossbar/shared link difference for L3?
12 *
13 */
14#ifndef __ARCH_ARM_PLAT_OMAP_INCLUDE_MACH_OMAP_HWMOD2420_H
15#define __ARCH_ARM_PLAT_OMAP_INCLUDE_MACH_OMAP_HWMOD2420_H
16
17#ifdef CONFIG_ARCH_OMAP2420
18
19#include <mach/omap_hwmod.h>
20#include <mach/irqs.h>
21#include <mach/cpu.h>
22#include <mach/dma.h>
23
24#include "prm-regbits-24xx.h"
25
26static struct omap_hwmod omap2420_mpu_hwmod;
27static struct omap_hwmod omap2420_l3_hwmod;
28static struct omap_hwmod omap2420_l4_core_hwmod;
29
30/* L3 -> L4_CORE interface */
31static struct omap_hwmod_ocp_if omap2420_l3__l4_core = {
32 .master = &omap2420_l3_hwmod,
33 .slave = &omap2420_l4_core_hwmod,
34 .user = OCP_USER_MPU | OCP_USER_SDMA,
35};
36
37/* MPU -> L3 interface */
38static struct omap_hwmod_ocp_if omap2420_mpu__l3 = {
39 .master = &omap2420_mpu_hwmod,
40 .slave = &omap2420_l3_hwmod,
41 .user = OCP_USER_MPU,
42};
43
44/* Slave interfaces on the L3 interconnect */
45static struct omap_hwmod_ocp_if *omap2420_l3_slaves[] = {
46 &omap2420_mpu__l3,
47};
48
49/* Master interfaces on the L3 interconnect */
50static struct omap_hwmod_ocp_if *omap2420_l3_masters[] = {
51 &omap2420_l3__l4_core,
52};
53
54/* L3 */
55static struct omap_hwmod omap2420_l3_hwmod = {
56 .name = "l3_hwmod",
57 .masters = omap2420_l3_masters,
58 .masters_cnt = ARRAY_SIZE(omap2420_l3_masters),
59 .slaves = omap2420_l3_slaves,
60 .slaves_cnt = ARRAY_SIZE(omap2420_l3_slaves),
61 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
62};
63
64static struct omap_hwmod omap2420_l4_wkup_hwmod;
65
66/* L4_CORE -> L4_WKUP interface */
67static struct omap_hwmod_ocp_if omap2420_l4_core__l4_wkup = {
68 .master = &omap2420_l4_core_hwmod,
69 .slave = &omap2420_l4_wkup_hwmod,
70 .user = OCP_USER_MPU | OCP_USER_SDMA,
71};
72
73/* Slave interfaces on the L4_CORE interconnect */
74static struct omap_hwmod_ocp_if *omap2420_l4_core_slaves[] = {
75 &omap2420_l3__l4_core,
76};
77
78/* Master interfaces on the L4_CORE interconnect */
79static struct omap_hwmod_ocp_if *omap2420_l4_core_masters[] = {
80 &omap2420_l4_core__l4_wkup,
81};
82
83/* L4 CORE */
84static struct omap_hwmod omap2420_l4_core_hwmod = {
85 .name = "l4_core_hwmod",
86 .masters = omap2420_l4_core_masters,
87 .masters_cnt = ARRAY_SIZE(omap2420_l4_core_masters),
88 .slaves = omap2420_l4_core_slaves,
89 .slaves_cnt = ARRAY_SIZE(omap2420_l4_core_slaves),
90 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
91};
92
93/* Slave interfaces on the L4_WKUP interconnect */
94static struct omap_hwmod_ocp_if *omap2420_l4_wkup_slaves[] = {
95 &omap2420_l4_core__l4_wkup,
96};
97
98/* Master interfaces on the L4_WKUP interconnect */
99static struct omap_hwmod_ocp_if *omap2420_l4_wkup_masters[] = {
100};
101
102/* L4 WKUP */
103static struct omap_hwmod omap2420_l4_wkup_hwmod = {
104 .name = "l4_wkup_hwmod",
105 .masters = omap2420_l4_wkup_masters,
106 .masters_cnt = ARRAY_SIZE(omap2420_l4_wkup_masters),
107 .slaves = omap2420_l4_wkup_slaves,
108 .slaves_cnt = ARRAY_SIZE(omap2420_l4_wkup_slaves),
109 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
110};
111
112/* Master interfaces on the MPU device */
113static struct omap_hwmod_ocp_if *omap2420_mpu_masters[] = {
114 &omap2420_mpu__l3,
115};
116
117/* MPU */
118static struct omap_hwmod omap2420_mpu_hwmod = {
119 .name = "mpu_hwmod",
120 .clkdev_dev_id = NULL,
121 .clkdev_con_id = "mpu_ck",
122 .masters = omap2420_mpu_masters,
123 .masters_cnt = ARRAY_SIZE(omap2420_mpu_masters),
124 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
125};
126
127static __initdata struct omap_hwmod *omap2420_hwmods[] = {
128 &omap2420_l3_hwmod,
129 &omap2420_l4_core_hwmod,
130 &omap2420_l4_wkup_hwmod,
131 &omap2420_mpu_hwmod,
132 NULL,
133};
134
135#else
136# define omap2420_hwmods 0
137#endif
138
139#endif
140
141
diff --git a/arch/arm/mach-omap2/omap_hwmod_2430.h b/arch/arm/mach-omap2/omap_hwmod_2430.h
new file mode 100644
index 000000000000..a412be6420ec
--- /dev/null
+++ b/arch/arm/mach-omap2/omap_hwmod_2430.h
@@ -0,0 +1,143 @@
1/*
2 * omap_hwmod_2430.h - hardware modules present on the OMAP2430 chips
3 *
4 * Copyright (C) 2009 Nokia Corporation
5 * Paul Walmsley
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 * XXX handle crossbar/shared link difference for L3?
12 *
13 */
14#ifndef __ARCH_ARM_PLAT_OMAP_INCLUDE_MACH_OMAP_HWMOD2430_H
15#define __ARCH_ARM_PLAT_OMAP_INCLUDE_MACH_OMAP_HWMOD2430_H
16
17#ifdef CONFIG_ARCH_OMAP2430
18
19#include <mach/omap_hwmod.h>
20#include <mach/irqs.h>
21#include <mach/cpu.h>
22#include <mach/dma.h>
23
24#include "prm-regbits-24xx.h"
25
26static struct omap_hwmod omap2430_mpu_hwmod;
27static struct omap_hwmod omap2430_l3_hwmod;
28static struct omap_hwmod omap2430_l4_core_hwmod;
29
30/* L3 -> L4_CORE interface */
31static struct omap_hwmod_ocp_if omap2430_l3__l4_core = {
32 .master = &omap2430_l3_hwmod,
33 .slave = &omap2430_l4_core_hwmod,
34 .user = OCP_USER_MPU | OCP_USER_SDMA,
35};
36
37/* MPU -> L3 interface */
38static struct omap_hwmod_ocp_if omap2430_mpu__l3 = {
39 .master = &omap2430_mpu_hwmod,
40 .slave = &omap2430_l3_hwmod,
41 .user = OCP_USER_MPU,
42};
43
44/* Slave interfaces on the L3 interconnect */
45static struct omap_hwmod_ocp_if *omap2430_l3_slaves[] = {
46 &omap2430_mpu__l3,
47};
48
49/* Master interfaces on the L3 interconnect */
50static struct omap_hwmod_ocp_if *omap2430_l3_masters[] = {
51 &omap2430_l3__l4_core,
52};
53
54/* L3 */
55static struct omap_hwmod omap2430_l3_hwmod = {
56 .name = "l3_hwmod",
57 .masters = omap2430_l3_masters,
58 .masters_cnt = ARRAY_SIZE(omap2430_l3_masters),
59 .slaves = omap2430_l3_slaves,
60 .slaves_cnt = ARRAY_SIZE(omap2430_l3_slaves),
61 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
62};
63
64static struct omap_hwmod omap2430_l4_wkup_hwmod;
65static struct omap_hwmod omap2430_mmc1_hwmod;
66static struct omap_hwmod omap2430_mmc2_hwmod;
67
68/* L4_CORE -> L4_WKUP interface */
69static struct omap_hwmod_ocp_if omap2430_l4_core__l4_wkup = {
70 .master = &omap2430_l4_core_hwmod,
71 .slave = &omap2430_l4_wkup_hwmod,
72 .user = OCP_USER_MPU | OCP_USER_SDMA,
73};
74
75/* Slave interfaces on the L4_CORE interconnect */
76static struct omap_hwmod_ocp_if *omap2430_l4_core_slaves[] = {
77 &omap2430_l3__l4_core,
78};
79
80/* Master interfaces on the L4_CORE interconnect */
81static struct omap_hwmod_ocp_if *omap2430_l4_core_masters[] = {
82 &omap2430_l4_core__l4_wkup,
83};
84
85/* L4 CORE */
86static struct omap_hwmod omap2430_l4_core_hwmod = {
87 .name = "l4_core_hwmod",
88 .masters = omap2430_l4_core_masters,
89 .masters_cnt = ARRAY_SIZE(omap2430_l4_core_masters),
90 .slaves = omap2430_l4_core_slaves,
91 .slaves_cnt = ARRAY_SIZE(omap2430_l4_core_slaves),
92 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
93};
94
95/* Slave interfaces on the L4_WKUP interconnect */
96static struct omap_hwmod_ocp_if *omap2430_l4_wkup_slaves[] = {
97 &omap2430_l4_core__l4_wkup,
98};
99
100/* Master interfaces on the L4_WKUP interconnect */
101static struct omap_hwmod_ocp_if *omap2430_l4_wkup_masters[] = {
102};
103
104/* L4 WKUP */
105static struct omap_hwmod omap2430_l4_wkup_hwmod = {
106 .name = "l4_wkup_hwmod",
107 .masters = omap2430_l4_wkup_masters,
108 .masters_cnt = ARRAY_SIZE(omap2430_l4_wkup_masters),
109 .slaves = omap2430_l4_wkup_slaves,
110 .slaves_cnt = ARRAY_SIZE(omap2430_l4_wkup_slaves),
111 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
112};
113
114/* Master interfaces on the MPU device */
115static struct omap_hwmod_ocp_if *omap2430_mpu_masters[] = {
116 &omap2430_mpu__l3,
117};
118
119/* MPU */
120static struct omap_hwmod omap2430_mpu_hwmod = {
121 .name = "mpu_hwmod",
122 .clkdev_dev_id = NULL,
123 .clkdev_con_id = "mpu_ck",
124 .masters = omap2430_mpu_masters,
125 .masters_cnt = ARRAY_SIZE(omap2430_mpu_masters),
126 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
127};
128
129static __initdata struct omap_hwmod *omap2430_hwmods[] = {
130 &omap2430_l3_hwmod,
131 &omap2430_l4_core_hwmod,
132 &omap2430_l4_wkup_hwmod,
133 &omap2430_mpu_hwmod,
134 NULL,
135};
136
137#else
138# define omap2430_hwmods 0
139#endif
140
141#endif
142
143
diff --git a/arch/arm/mach-omap2/omap_hwmod_34xx.h b/arch/arm/mach-omap2/omap_hwmod_34xx.h
new file mode 100644
index 000000000000..1e069f831575
--- /dev/null
+++ b/arch/arm/mach-omap2/omap_hwmod_34xx.h
@@ -0,0 +1,168 @@
1/*
2 * omap_hwmod_34xx.h - hardware modules present on the OMAP34xx chips
3 *
4 * Copyright (C) 2009 Nokia Corporation
5 * Paul Walmsley
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 */
12#ifndef __ARCH_ARM_PLAT_OMAP_INCLUDE_MACH_OMAP_HWMOD34XX_H
13#define __ARCH_ARM_PLAT_OMAP_INCLUDE_MACH_OMAP_HWMOD34XX_H
14
15#ifdef CONFIG_ARCH_OMAP34XX
16
17#include <mach/omap_hwmod.h>
18#include <mach/irqs.h>
19#include <mach/cpu.h>
20#include <mach/dma.h>
21
22#include "prm-regbits-34xx.h"
23
24static struct omap_hwmod omap34xx_mpu_hwmod;
25static struct omap_hwmod omap34xx_l3_hwmod;
26static struct omap_hwmod omap34xx_l4_core_hwmod;
27static struct omap_hwmod omap34xx_l4_per_hwmod;
28
29/* L3 -> L4_CORE interface */
30static struct omap_hwmod_ocp_if omap34xx_l3__l4_core = {
31 .master = &omap34xx_l3_hwmod,
32 .slave = &omap34xx_l4_core_hwmod,
33 .user = OCP_USER_MPU | OCP_USER_SDMA,
34};
35
36/* L3 -> L4_PER interface */
37static struct omap_hwmod_ocp_if omap34xx_l3__l4_per = {
38 .master = &omap34xx_l3_hwmod,
39 .slave = &omap34xx_l4_per_hwmod,
40 .user = OCP_USER_MPU | OCP_USER_SDMA,
41};
42
43/* MPU -> L3 interface */
44static struct omap_hwmod_ocp_if omap34xx_mpu__l3 = {
45 .master = &omap34xx_mpu_hwmod,
46 .slave = &omap34xx_l3_hwmod,
47 .user = OCP_USER_MPU,
48};
49
50/* Slave interfaces on the L3 interconnect */
51static struct omap_hwmod_ocp_if *omap34xx_l3_slaves[] = {
52 &omap34xx_mpu__l3,
53};
54
55/* Master interfaces on the L3 interconnect */
56static struct omap_hwmod_ocp_if *omap34xx_l3_masters[] = {
57 &omap34xx_l3__l4_core,
58 &omap34xx_l3__l4_per,
59};
60
61/* L3 */
62static struct omap_hwmod omap34xx_l3_hwmod = {
63 .name = "l3_hwmod",
64 .masters = omap34xx_l3_masters,
65 .masters_cnt = ARRAY_SIZE(omap34xx_l3_masters),
66 .slaves = omap34xx_l3_slaves,
67 .slaves_cnt = ARRAY_SIZE(omap34xx_l3_slaves),
68 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
69};
70
71static struct omap_hwmod omap34xx_l4_wkup_hwmod;
72
73/* L4_CORE -> L4_WKUP interface */
74static struct omap_hwmod_ocp_if omap34xx_l4_core__l4_wkup = {
75 .master = &omap34xx_l4_core_hwmod,
76 .slave = &omap34xx_l4_wkup_hwmod,
77 .user = OCP_USER_MPU | OCP_USER_SDMA,
78};
79
80/* Slave interfaces on the L4_CORE interconnect */
81static struct omap_hwmod_ocp_if *omap34xx_l4_core_slaves[] = {
82 &omap34xx_l3__l4_core,
83};
84
85/* Master interfaces on the L4_CORE interconnect */
86static struct omap_hwmod_ocp_if *omap34xx_l4_core_masters[] = {
87 &omap34xx_l4_core__l4_wkup,
88};
89
90/* L4 CORE */
91static struct omap_hwmod omap34xx_l4_core_hwmod = {
92 .name = "l4_core_hwmod",
93 .masters = omap34xx_l4_core_masters,
94 .masters_cnt = ARRAY_SIZE(omap34xx_l4_core_masters),
95 .slaves = omap34xx_l4_core_slaves,
96 .slaves_cnt = ARRAY_SIZE(omap34xx_l4_core_slaves),
97 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
98};
99
100/* Slave interfaces on the L4_PER interconnect */
101static struct omap_hwmod_ocp_if *omap34xx_l4_per_slaves[] = {
102 &omap34xx_l3__l4_per,
103};
104
105/* Master interfaces on the L4_PER interconnect */
106static struct omap_hwmod_ocp_if *omap34xx_l4_per_masters[] = {
107};
108
109/* L4 PER */
110static struct omap_hwmod omap34xx_l4_per_hwmod = {
111 .name = "l4_per_hwmod",
112 .masters = omap34xx_l4_per_masters,
113 .masters_cnt = ARRAY_SIZE(omap34xx_l4_per_masters),
114 .slaves = omap34xx_l4_per_slaves,
115 .slaves_cnt = ARRAY_SIZE(omap34xx_l4_per_slaves),
116 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
117};
118
119/* Slave interfaces on the L4_WKUP interconnect */
120static struct omap_hwmod_ocp_if *omap34xx_l4_wkup_slaves[] = {
121 &omap34xx_l4_core__l4_wkup,
122};
123
124/* Master interfaces on the L4_WKUP interconnect */
125static struct omap_hwmod_ocp_if *omap34xx_l4_wkup_masters[] = {
126};
127
128/* L4 WKUP */
129static struct omap_hwmod omap34xx_l4_wkup_hwmod = {
130 .name = "l4_wkup_hwmod",
131 .masters = omap34xx_l4_wkup_masters,
132 .masters_cnt = ARRAY_SIZE(omap34xx_l4_wkup_masters),
133 .slaves = omap34xx_l4_wkup_slaves,
134 .slaves_cnt = ARRAY_SIZE(omap34xx_l4_wkup_slaves),
135 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
136};
137
138/* Master interfaces on the MPU device */
139static struct omap_hwmod_ocp_if *omap34xx_mpu_masters[] = {
140 &omap34xx_mpu__l3,
141};
142
143/* MPU */
144static struct omap_hwmod omap34xx_mpu_hwmod = {
145 .name = "mpu_hwmod",
146 .clkdev_dev_id = NULL,
147 .clkdev_con_id = "arm_fck",
148 .masters = omap34xx_mpu_masters,
149 .masters_cnt = ARRAY_SIZE(omap34xx_mpu_masters),
150 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
151};
152
153static __initdata struct omap_hwmod *omap34xx_hwmods[] = {
154 &omap34xx_l3_hwmod,
155 &omap34xx_l4_core_hwmod,
156 &omap34xx_l4_per_hwmod,
157 &omap34xx_l4_wkup_hwmod,
158 &omap34xx_mpu_hwmod,
159 NULL,
160};
161
162#else
163# define omap34xx_hwmods 0
164#endif
165
166#endif
167
168
diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c
index 6cc375a275be..1b4c1600f8d8 100644
--- a/arch/arm/mach-omap2/pm-debug.c
+++ b/arch/arm/mach-omap2/pm-debug.c
@@ -20,13 +20,16 @@
20 */ 20 */
21 21
22#include <linux/kernel.h> 22#include <linux/kernel.h>
23#include <linux/timer.h> 23#include <linux/sched.h>
24#include <linux/clk.h> 24#include <linux/clk.h>
25#include <linux/err.h> 25#include <linux/err.h>
26#include <linux/io.h> 26#include <linux/io.h>
27#include <linux/module.h>
27 28
28#include <mach/clock.h> 29#include <mach/clock.h>
29#include <mach/board.h> 30#include <mach/board.h>
31#include <mach/powerdomain.h>
32#include <mach/clockdomain.h>
30 33
31#include "prm.h" 34#include "prm.h"
32#include "cm.h" 35#include "cm.h"
@@ -48,7 +51,9 @@ int omap2_pm_debug;
48 regs[reg_count++].val = __raw_readl(reg) 51 regs[reg_count++].val = __raw_readl(reg)
49#define DUMP_INTC_REG(reg, off) \ 52#define DUMP_INTC_REG(reg, off) \
50 regs[reg_count].name = #reg; \ 53 regs[reg_count].name = #reg; \
51 regs[reg_count++].val = __raw_readl(IO_ADDRESS(0x480fe000 + (off))) 54 regs[reg_count++].val = __raw_readl(OMAP2_IO_ADDRESS(0x480fe000 + (off)))
55
56static int __init pm_dbg_init(void);
52 57
53void omap2_pm_dump(int mode, int resume, unsigned int us) 58void omap2_pm_dump(int mode, int resume, unsigned int us)
54{ 59{
@@ -150,3 +155,425 @@ void omap2_pm_dump(int mode, int resume, unsigned int us)
150 for (i = 0; i < reg_count; i++) 155 for (i = 0; i < reg_count; i++)
151 printk(KERN_INFO "%-20s: 0x%08x\n", regs[i].name, regs[i].val); 156 printk(KERN_INFO "%-20s: 0x%08x\n", regs[i].name, regs[i].val);
152} 157}
158
159#ifdef CONFIG_DEBUG_FS
160#include <linux/debugfs.h>
161#include <linux/seq_file.h>
162
163static void pm_dbg_regset_store(u32 *ptr);
164
165struct dentry *pm_dbg_dir;
166
167static int pm_dbg_init_done;
168
169enum {
170 DEBUG_FILE_COUNTERS = 0,
171 DEBUG_FILE_TIMERS,
172};
173
174struct pm_module_def {
175 char name[8]; /* Name of the module */
176 short type; /* CM or PRM */
177 unsigned short offset;
178 int low; /* First register address on this module */
179 int high; /* Last register address on this module */
180};
181
182#define MOD_CM 0
183#define MOD_PRM 1
184
185static const struct pm_module_def *pm_dbg_reg_modules;
186static const struct pm_module_def omap3_pm_reg_modules[] = {
187 { "IVA2", MOD_CM, OMAP3430_IVA2_MOD, 0, 0x4c },
188 { "OCP", MOD_CM, OCP_MOD, 0, 0x10 },
189 { "MPU", MOD_CM, MPU_MOD, 4, 0x4c },
190 { "CORE", MOD_CM, CORE_MOD, 0, 0x4c },
191 { "SGX", MOD_CM, OMAP3430ES2_SGX_MOD, 0, 0x4c },
192 { "WKUP", MOD_CM, WKUP_MOD, 0, 0x40 },
193 { "CCR", MOD_CM, PLL_MOD, 0, 0x70 },
194 { "DSS", MOD_CM, OMAP3430_DSS_MOD, 0, 0x4c },
195 { "CAM", MOD_CM, OMAP3430_CAM_MOD, 0, 0x4c },
196 { "PER", MOD_CM, OMAP3430_PER_MOD, 0, 0x4c },
197 { "EMU", MOD_CM, OMAP3430_EMU_MOD, 0x40, 0x54 },
198 { "NEON", MOD_CM, OMAP3430_NEON_MOD, 0x20, 0x48 },
199 { "USB", MOD_CM, OMAP3430ES2_USBHOST_MOD, 0, 0x4c },
200
201 { "IVA2", MOD_PRM, OMAP3430_IVA2_MOD, 0x50, 0xfc },
202 { "OCP", MOD_PRM, OCP_MOD, 4, 0x1c },
203 { "MPU", MOD_PRM, MPU_MOD, 0x58, 0xe8 },
204 { "CORE", MOD_PRM, CORE_MOD, 0x58, 0xf8 },
205 { "SGX", MOD_PRM, OMAP3430ES2_SGX_MOD, 0x58, 0xe8 },
206 { "WKUP", MOD_PRM, WKUP_MOD, 0xa0, 0xb0 },
207 { "CCR", MOD_PRM, PLL_MOD, 0x40, 0x70 },
208 { "DSS", MOD_PRM, OMAP3430_DSS_MOD, 0x58, 0xe8 },
209 { "CAM", MOD_PRM, OMAP3430_CAM_MOD, 0x58, 0xe8 },
210 { "PER", MOD_PRM, OMAP3430_PER_MOD, 0x58, 0xe8 },
211 { "EMU", MOD_PRM, OMAP3430_EMU_MOD, 0x58, 0xe4 },
212 { "GLBL", MOD_PRM, OMAP3430_GR_MOD, 0x20, 0xe4 },
213 { "NEON", MOD_PRM, OMAP3430_NEON_MOD, 0x58, 0xe8 },
214 { "USB", MOD_PRM, OMAP3430ES2_USBHOST_MOD, 0x58, 0xe8 },
215 { "", 0, 0, 0, 0 },
216};
217
218#define PM_DBG_MAX_REG_SETS 4
219
220static void *pm_dbg_reg_set[PM_DBG_MAX_REG_SETS];
221
222static int pm_dbg_get_regset_size(void)
223{
224 static int regset_size;
225
226 if (regset_size == 0) {
227 int i = 0;
228
229 while (pm_dbg_reg_modules[i].name[0] != 0) {
230 regset_size += pm_dbg_reg_modules[i].high +
231 4 - pm_dbg_reg_modules[i].low;
232 i++;
233 }
234 }
235 return regset_size;
236}
237
238static int pm_dbg_show_regs(struct seq_file *s, void *unused)
239{
240 int i, j;
241 unsigned long val;
242 int reg_set = (int)s->private;
243 u32 *ptr;
244 void *store = NULL;
245 int regs;
246 int linefeed;
247
248 if (reg_set == 0) {
249 store = kmalloc(pm_dbg_get_regset_size(), GFP_KERNEL);
250 ptr = store;
251 pm_dbg_regset_store(ptr);
252 } else {
253 ptr = pm_dbg_reg_set[reg_set - 1];
254 }
255
256 i = 0;
257
258 while (pm_dbg_reg_modules[i].name[0] != 0) {
259 regs = 0;
260 linefeed = 0;
261 if (pm_dbg_reg_modules[i].type == MOD_CM)
262 seq_printf(s, "MOD: CM_%s (%08x)\n",
263 pm_dbg_reg_modules[i].name,
264 (u32)(OMAP3430_CM_BASE +
265 pm_dbg_reg_modules[i].offset));
266 else
267 seq_printf(s, "MOD: PRM_%s (%08x)\n",
268 pm_dbg_reg_modules[i].name,
269 (u32)(OMAP3430_PRM_BASE +
270 pm_dbg_reg_modules[i].offset));
271
272 for (j = pm_dbg_reg_modules[i].low;
273 j <= pm_dbg_reg_modules[i].high; j += 4) {
274 val = *(ptr++);
275 if (val != 0) {
276 regs++;
277 if (linefeed) {
278 seq_printf(s, "\n");
279 linefeed = 0;
280 }
281 seq_printf(s, " %02x => %08lx", j, val);
282 if (regs % 4 == 0)
283 linefeed = 1;
284 }
285 }
286 seq_printf(s, "\n");
287 i++;
288 }
289
290 if (store != NULL)
291 kfree(store);
292
293 return 0;
294}
295
296static void pm_dbg_regset_store(u32 *ptr)
297{
298 int i, j;
299 u32 val;
300
301 i = 0;
302
303 while (pm_dbg_reg_modules[i].name[0] != 0) {
304 for (j = pm_dbg_reg_modules[i].low;
305 j <= pm_dbg_reg_modules[i].high; j += 4) {
306 if (pm_dbg_reg_modules[i].type == MOD_CM)
307 val = cm_read_mod_reg(
308 pm_dbg_reg_modules[i].offset, j);
309 else
310 val = prm_read_mod_reg(
311 pm_dbg_reg_modules[i].offset, j);
312 *(ptr++) = val;
313 }
314 i++;
315 }
316}
317
318int pm_dbg_regset_save(int reg_set)
319{
320 if (pm_dbg_reg_set[reg_set-1] == NULL)
321 return -EINVAL;
322
323 pm_dbg_regset_store(pm_dbg_reg_set[reg_set-1]);
324
325 return 0;
326}
327
328static const char pwrdm_state_names[][4] = {
329 "OFF",
330 "RET",
331 "INA",
332 "ON"
333};
334
335void pm_dbg_update_time(struct powerdomain *pwrdm, int prev)
336{
337 s64 t;
338
339 if (!pm_dbg_init_done)
340 return ;
341
342 /* Update timer for previous state */
343 t = sched_clock();
344
345 pwrdm->state_timer[prev] += t - pwrdm->timer;
346
347 pwrdm->timer = t;
348}
349
350static int clkdm_dbg_show_counter(struct clockdomain *clkdm, void *user)
351{
352 struct seq_file *s = (struct seq_file *)user;
353
354 if (strcmp(clkdm->name, "emu_clkdm") == 0 ||
355 strcmp(clkdm->name, "wkup_clkdm") == 0 ||
356 strncmp(clkdm->name, "dpll", 4) == 0)
357 return 0;
358
359 seq_printf(s, "%s->%s (%d)", clkdm->name,
360 clkdm->pwrdm.ptr->name,
361 atomic_read(&clkdm->usecount));
362 seq_printf(s, "\n");
363
364 return 0;
365}
366
367static int pwrdm_dbg_show_counter(struct powerdomain *pwrdm, void *user)
368{
369 struct seq_file *s = (struct seq_file *)user;
370 int i;
371
372 if (strcmp(pwrdm->name, "emu_pwrdm") == 0 ||
373 strcmp(pwrdm->name, "wkup_pwrdm") == 0 ||
374 strncmp(pwrdm->name, "dpll", 4) == 0)
375 return 0;
376
377 if (pwrdm->state != pwrdm_read_pwrst(pwrdm))
378 printk(KERN_ERR "pwrdm state mismatch(%s) %d != %d\n",
379 pwrdm->name, pwrdm->state, pwrdm_read_pwrst(pwrdm));
380
381 seq_printf(s, "%s (%s)", pwrdm->name,
382 pwrdm_state_names[pwrdm->state]);
383 for (i = 0; i < 4; i++)
384 seq_printf(s, ",%s:%d", pwrdm_state_names[i],
385 pwrdm->state_counter[i]);
386
387 seq_printf(s, "\n");
388
389 return 0;
390}
391
392static int pwrdm_dbg_show_timer(struct powerdomain *pwrdm, void *user)
393{
394 struct seq_file *s = (struct seq_file *)user;
395 int i;
396
397 if (strcmp(pwrdm->name, "emu_pwrdm") == 0 ||
398 strcmp(pwrdm->name, "wkup_pwrdm") == 0 ||
399 strncmp(pwrdm->name, "dpll", 4) == 0)
400 return 0;
401
402 pwrdm_state_switch(pwrdm);
403
404 seq_printf(s, "%s (%s)", pwrdm->name,
405 pwrdm_state_names[pwrdm->state]);
406
407 for (i = 0; i < 4; i++)
408 seq_printf(s, ",%s:%lld", pwrdm_state_names[i],
409 pwrdm->state_timer[i]);
410
411 seq_printf(s, "\n");
412 return 0;
413}
414
415static int pm_dbg_show_counters(struct seq_file *s, void *unused)
416{
417 pwrdm_for_each(pwrdm_dbg_show_counter, s);
418 clkdm_for_each(clkdm_dbg_show_counter, s);
419
420 return 0;
421}
422
423static int pm_dbg_show_timers(struct seq_file *s, void *unused)
424{
425 pwrdm_for_each(pwrdm_dbg_show_timer, s);
426 return 0;
427}
428
429static int pm_dbg_open(struct inode *inode, struct file *file)
430{
431 switch ((int)inode->i_private) {
432 case DEBUG_FILE_COUNTERS:
433 return single_open(file, pm_dbg_show_counters,
434 &inode->i_private);
435 case DEBUG_FILE_TIMERS:
436 default:
437 return single_open(file, pm_dbg_show_timers,
438 &inode->i_private);
439 };
440}
441
442static int pm_dbg_reg_open(struct inode *inode, struct file *file)
443{
444 return single_open(file, pm_dbg_show_regs, inode->i_private);
445}
446
447static const struct file_operations debug_fops = {
448 .open = pm_dbg_open,
449 .read = seq_read,
450 .llseek = seq_lseek,
451 .release = single_release,
452};
453
454static const struct file_operations debug_reg_fops = {
455 .open = pm_dbg_reg_open,
456 .read = seq_read,
457 .llseek = seq_lseek,
458 .release = single_release,
459};
460
461int pm_dbg_regset_init(int reg_set)
462{
463 char name[2];
464
465 if (!pm_dbg_init_done)
466 pm_dbg_init();
467
468 if (reg_set < 1 || reg_set > PM_DBG_MAX_REG_SETS ||
469 pm_dbg_reg_set[reg_set-1] != NULL)
470 return -EINVAL;
471
472 pm_dbg_reg_set[reg_set-1] =
473 kmalloc(pm_dbg_get_regset_size(), GFP_KERNEL);
474
475 if (pm_dbg_reg_set[reg_set-1] == NULL)
476 return -ENOMEM;
477
478 if (pm_dbg_dir != NULL) {
479 sprintf(name, "%d", reg_set);
480
481 (void) debugfs_create_file(name, S_IRUGO,
482 pm_dbg_dir, (void *)reg_set, &debug_reg_fops);
483 }
484
485 return 0;
486}
487
488static int pwrdm_suspend_get(void *data, u64 *val)
489{
490 *val = omap3_pm_get_suspend_state((struct powerdomain *)data);
491
492 if (*val >= 0)
493 return 0;
494 return *val;
495}
496
497static int pwrdm_suspend_set(void *data, u64 val)
498{
499 return omap3_pm_set_suspend_state((struct powerdomain *)data, (int)val);
500}
501
502DEFINE_SIMPLE_ATTRIBUTE(pwrdm_suspend_fops, pwrdm_suspend_get,
503 pwrdm_suspend_set, "%llu\n");
504
505static int __init pwrdms_setup(struct powerdomain *pwrdm, void *dir)
506{
507 int i;
508 s64 t;
509 struct dentry *d;
510
511 t = sched_clock();
512
513 for (i = 0; i < 4; i++)
514 pwrdm->state_timer[i] = 0;
515
516 pwrdm->timer = t;
517
518 if (strncmp(pwrdm->name, "dpll", 4) == 0)
519 return 0;
520
521 d = debugfs_create_dir(pwrdm->name, (struct dentry *)dir);
522
523 (void) debugfs_create_file("suspend", S_IRUGO|S_IWUSR, d,
524 (void *)pwrdm, &pwrdm_suspend_fops);
525
526 return 0;
527}
528
529static int __init pm_dbg_init(void)
530{
531 int i;
532 struct dentry *d;
533 char name[2];
534
535 if (pm_dbg_init_done)
536 return 0;
537
538 if (cpu_is_omap34xx())
539 pm_dbg_reg_modules = omap3_pm_reg_modules;
540 else {
541 printk(KERN_ERR "%s: only OMAP3 supported\n", __func__);
542 return -ENODEV;
543 }
544
545 d = debugfs_create_dir("pm_debug", NULL);
546 if (IS_ERR(d))
547 return PTR_ERR(d);
548
549 (void) debugfs_create_file("count", S_IRUGO,
550 d, (void *)DEBUG_FILE_COUNTERS, &debug_fops);
551 (void) debugfs_create_file("time", S_IRUGO,
552 d, (void *)DEBUG_FILE_TIMERS, &debug_fops);
553
554 pwrdm_for_each(pwrdms_setup, (void *)d);
555
556 pm_dbg_dir = debugfs_create_dir("registers", d);
557 if (IS_ERR(pm_dbg_dir))
558 return PTR_ERR(pm_dbg_dir);
559
560 (void) debugfs_create_file("current", S_IRUGO,
561 pm_dbg_dir, (void *)0, &debug_reg_fops);
562
563 for (i = 0; i < PM_DBG_MAX_REG_SETS; i++)
564 if (pm_dbg_reg_set[i] != NULL) {
565 sprintf(name, "%d", i+1);
566 (void) debugfs_create_file(name, S_IRUGO,
567 pm_dbg_dir, (void *)(i+1), &debug_reg_fops);
568
569 }
570
571 pm_dbg_init_done = 1;
572
573 return 0;
574}
575arch_initcall(pm_dbg_init);
576
577#else
578void pm_dbg_update_time(struct powerdomain *pwrdm, int prev) {}
579#endif
diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h
index 21201cd4117b..8400f5768923 100644
--- a/arch/arm/mach-omap2/pm.h
+++ b/arch/arm/mach-omap2/pm.h
@@ -11,12 +11,23 @@
11#ifndef __ARCH_ARM_MACH_OMAP2_PM_H 11#ifndef __ARCH_ARM_MACH_OMAP2_PM_H
12#define __ARCH_ARM_MACH_OMAP2_PM_H 12#define __ARCH_ARM_MACH_OMAP2_PM_H
13 13
14#include <mach/powerdomain.h>
15
16extern int omap3_pm_get_suspend_state(struct powerdomain *pwrdm);
17extern int omap3_pm_set_suspend_state(struct powerdomain *pwrdm, int state);
18
14#ifdef CONFIG_PM_DEBUG 19#ifdef CONFIG_PM_DEBUG
15extern void omap2_pm_dump(int mode, int resume, unsigned int us); 20extern void omap2_pm_dump(int mode, int resume, unsigned int us);
16extern int omap2_pm_debug; 21extern int omap2_pm_debug;
22extern void pm_dbg_update_time(struct powerdomain *pwrdm, int prev);
23extern int pm_dbg_regset_save(int reg_set);
24extern int pm_dbg_regset_init(int reg_set);
17#else 25#else
18#define omap2_pm_dump(mode, resume, us) do {} while (0); 26#define omap2_pm_dump(mode, resume, us) do {} while (0);
19#define omap2_pm_debug 0 27#define omap2_pm_debug 0
28#define pm_dbg_update_time(pwrdm, prev) do {} while (0);
29#define pm_dbg_regset_save(reg_set) do {} while (0);
30#define pm_dbg_regset_init(reg_set) do {} while (0);
20#endif /* CONFIG_PM_DEBUG */ 31#endif /* CONFIG_PM_DEBUG */
21 32
22extern void omap24xx_idle_loop_suspend(void); 33extern void omap24xx_idle_loop_suspend(void);
diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c
index 528dbdc26e23..bff5c4e89742 100644
--- a/arch/arm/mach-omap2/pm24xx.c
+++ b/arch/arm/mach-omap2/pm24xx.c
@@ -333,7 +333,7 @@ static struct platform_suspend_ops omap_pm_ops = {
333 .valid = suspend_valid_only_mem, 333 .valid = suspend_valid_only_mem,
334}; 334};
335 335
336static int _pm_clkdm_enable_hwsup(struct clockdomain *clkdm) 336static int _pm_clkdm_enable_hwsup(struct clockdomain *clkdm, void *unused)
337{ 337{
338 omap2_clkdm_allow_idle(clkdm); 338 omap2_clkdm_allow_idle(clkdm);
339 return 0; 339 return 0;
@@ -385,7 +385,7 @@ static void __init prcm_setup_regs(void)
385 omap2_clkdm_sleep(gfx_clkdm); 385 omap2_clkdm_sleep(gfx_clkdm);
386 386
387 /* Enable clockdomain hardware-supervised control for all clkdms */ 387 /* Enable clockdomain hardware-supervised control for all clkdms */
388 clkdm_for_each(_pm_clkdm_enable_hwsup); 388 clkdm_for_each(_pm_clkdm_enable_hwsup, NULL);
389 389
390 /* Enable clock autoidle for all domains */ 390 /* Enable clock autoidle for all domains */
391 cm_write_mod_reg(OMAP24XX_AUTO_CAM | 391 cm_write_mod_reg(OMAP24XX_AUTO_CAM |
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 488d595d8e4b..0ff5a6c53aa0 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -170,6 +170,8 @@ static void omap_sram_idle(void)
170 printk(KERN_ERR "Invalid mpu state in sram_idle\n"); 170 printk(KERN_ERR "Invalid mpu state in sram_idle\n");
171 return; 171 return;
172 } 172 }
173 pwrdm_pre_transition();
174
173 omap2_gpio_prepare_for_retention(); 175 omap2_gpio_prepare_for_retention();
174 omap_uart_prepare_idle(0); 176 omap_uart_prepare_idle(0);
175 omap_uart_prepare_idle(1); 177 omap_uart_prepare_idle(1);
@@ -182,6 +184,9 @@ static void omap_sram_idle(void)
182 omap_uart_resume_idle(1); 184 omap_uart_resume_idle(1);
183 omap_uart_resume_idle(0); 185 omap_uart_resume_idle(0);
184 omap2_gpio_resume_after_retention(); 186 omap2_gpio_resume_after_retention();
187
188 pwrdm_post_transition();
189
185} 190}
186 191
187/* 192/*
@@ -271,6 +276,7 @@ static int set_pwrdm_state(struct powerdomain *pwrdm, u32 state)
271 if (sleep_switch) { 276 if (sleep_switch) {
272 omap2_clkdm_allow_idle(pwrdm->pwrdm_clkdms[0]); 277 omap2_clkdm_allow_idle(pwrdm->pwrdm_clkdms[0]);
273 pwrdm_wait_transition(pwrdm); 278 pwrdm_wait_transition(pwrdm);
279 pwrdm_state_switch(pwrdm);
274 } 280 }
275 281
276err: 282err:
@@ -658,14 +664,38 @@ static void __init prcm_setup_regs(void)
658 omap3_d2d_idle(); 664 omap3_d2d_idle();
659} 665}
660 666
661static int __init pwrdms_setup(struct powerdomain *pwrdm) 667int omap3_pm_get_suspend_state(struct powerdomain *pwrdm)
668{
669 struct power_state *pwrst;
670
671 list_for_each_entry(pwrst, &pwrst_list, node) {
672 if (pwrst->pwrdm == pwrdm)
673 return pwrst->next_state;
674 }
675 return -EINVAL;
676}
677
678int omap3_pm_set_suspend_state(struct powerdomain *pwrdm, int state)
679{
680 struct power_state *pwrst;
681
682 list_for_each_entry(pwrst, &pwrst_list, node) {
683 if (pwrst->pwrdm == pwrdm) {
684 pwrst->next_state = state;
685 return 0;
686 }
687 }
688 return -EINVAL;
689}
690
691static int __init pwrdms_setup(struct powerdomain *pwrdm, void *unused)
662{ 692{
663 struct power_state *pwrst; 693 struct power_state *pwrst;
664 694
665 if (!pwrdm->pwrsts) 695 if (!pwrdm->pwrsts)
666 return 0; 696 return 0;
667 697
668 pwrst = kmalloc(sizeof(struct power_state), GFP_KERNEL); 698 pwrst = kmalloc(sizeof(struct power_state), GFP_ATOMIC);
669 if (!pwrst) 699 if (!pwrst)
670 return -ENOMEM; 700 return -ENOMEM;
671 pwrst->pwrdm = pwrdm; 701 pwrst->pwrdm = pwrdm;
@@ -683,7 +713,7 @@ static int __init pwrdms_setup(struct powerdomain *pwrdm)
683 * supported. Initiate sleep transition for other clockdomains, if 713 * supported. Initiate sleep transition for other clockdomains, if
684 * they are not used 714 * they are not used
685 */ 715 */
686static int __init clkdms_setup(struct clockdomain *clkdm) 716static int __init clkdms_setup(struct clockdomain *clkdm, void *unused)
687{ 717{
688 if (clkdm->flags & CLKDM_CAN_ENABLE_AUTO) 718 if (clkdm->flags & CLKDM_CAN_ENABLE_AUTO)
689 omap2_clkdm_allow_idle(clkdm); 719 omap2_clkdm_allow_idle(clkdm);
@@ -716,13 +746,13 @@ static int __init omap3_pm_init(void)
716 goto err1; 746 goto err1;
717 } 747 }
718 748
719 ret = pwrdm_for_each(pwrdms_setup); 749 ret = pwrdm_for_each(pwrdms_setup, NULL);
720 if (ret) { 750 if (ret) {
721 printk(KERN_ERR "Failed to setup powerdomains\n"); 751 printk(KERN_ERR "Failed to setup powerdomains\n");
722 goto err2; 752 goto err2;
723 } 753 }
724 754
725 (void) clkdm_for_each(clkdms_setup); 755 (void) clkdm_for_each(clkdms_setup, NULL);
726 756
727 mpu_pwrdm = pwrdm_lookup("mpu_pwrdm"); 757 mpu_pwrdm = pwrdm_lookup("mpu_pwrdm");
728 if (mpu_pwrdm == NULL) { 758 if (mpu_pwrdm == NULL) {
diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c
index 983f1cb676be..2594cbff3947 100644
--- a/arch/arm/mach-omap2/powerdomain.c
+++ b/arch/arm/mach-omap2/powerdomain.c
@@ -35,6 +35,13 @@
35#include <mach/powerdomain.h> 35#include <mach/powerdomain.h>
36#include <mach/clockdomain.h> 36#include <mach/clockdomain.h>
37 37
38#include "pm.h"
39
40enum {
41 PWRDM_STATE_NOW = 0,
42 PWRDM_STATE_PREV,
43};
44
38/* pwrdm_list contains all registered struct powerdomains */ 45/* pwrdm_list contains all registered struct powerdomains */
39static LIST_HEAD(pwrdm_list); 46static LIST_HEAD(pwrdm_list);
40 47
@@ -83,7 +90,7 @@ static struct powerdomain *_pwrdm_deps_lookup(struct powerdomain *pwrdm,
83 if (!pwrdm || !deps || !omap_chip_is(pwrdm->omap_chip)) 90 if (!pwrdm || !deps || !omap_chip_is(pwrdm->omap_chip))
84 return ERR_PTR(-EINVAL); 91 return ERR_PTR(-EINVAL);
85 92
86 for (pd = deps; pd; pd++) { 93 for (pd = deps; pd->pwrdm_name; pd++) {
87 94
88 if (!omap_chip_is(pd->omap_chip)) 95 if (!omap_chip_is(pd->omap_chip))
89 continue; 96 continue;
@@ -96,12 +103,71 @@ static struct powerdomain *_pwrdm_deps_lookup(struct powerdomain *pwrdm,
96 103
97 } 104 }
98 105
99 if (!pd) 106 if (!pd->pwrdm_name)
100 return ERR_PTR(-ENOENT); 107 return ERR_PTR(-ENOENT);
101 108
102 return pd->pwrdm; 109 return pd->pwrdm;
103} 110}
104 111
112static int _pwrdm_state_switch(struct powerdomain *pwrdm, int flag)
113{
114
115 int prev;
116 int state;
117
118 if (pwrdm == NULL)
119 return -EINVAL;
120
121 state = pwrdm_read_pwrst(pwrdm);
122
123 switch (flag) {
124 case PWRDM_STATE_NOW:
125 prev = pwrdm->state;
126 break;
127 case PWRDM_STATE_PREV:
128 prev = pwrdm_read_prev_pwrst(pwrdm);
129 if (pwrdm->state != prev)
130 pwrdm->state_counter[prev]++;
131 break;
132 default:
133 return -EINVAL;
134 }
135
136 if (state != prev)
137 pwrdm->state_counter[state]++;
138
139 pm_dbg_update_time(pwrdm, prev);
140
141 pwrdm->state = state;
142
143 return 0;
144}
145
146static int _pwrdm_pre_transition_cb(struct powerdomain *pwrdm, void *unused)
147{
148 pwrdm_clear_all_prev_pwrst(pwrdm);
149 _pwrdm_state_switch(pwrdm, PWRDM_STATE_NOW);
150 return 0;
151}
152
153static int _pwrdm_post_transition_cb(struct powerdomain *pwrdm, void *unused)
154{
155 _pwrdm_state_switch(pwrdm, PWRDM_STATE_PREV);
156 return 0;
157}
158
159static __init void _pwrdm_setup(struct powerdomain *pwrdm)
160{
161 int i;
162
163 for (i = 0; i < 4; i++)
164 pwrdm->state_counter[i] = 0;
165
166 pwrdm_wait_transition(pwrdm);
167 pwrdm->state = pwrdm_read_pwrst(pwrdm);
168 pwrdm->state_counter[pwrdm->state] = 1;
169
170}
105 171
106/* Public functions */ 172/* Public functions */
107 173
@@ -117,9 +183,12 @@ void pwrdm_init(struct powerdomain **pwrdm_list)
117{ 183{
118 struct powerdomain **p = NULL; 184 struct powerdomain **p = NULL;
119 185
120 if (pwrdm_list) 186 if (pwrdm_list) {
121 for (p = pwrdm_list; *p; p++) 187 for (p = pwrdm_list; *p; p++) {
122 pwrdm_register(*p); 188 pwrdm_register(*p);
189 _pwrdm_setup(*p);
190 }
191 }
123} 192}
124 193
125/** 194/**
@@ -217,7 +286,8 @@ struct powerdomain *pwrdm_lookup(const char *name)
217 * anything else to indicate failure; or -EINVAL if the function 286 * anything else to indicate failure; or -EINVAL if the function
218 * pointer is null. 287 * pointer is null.
219 */ 288 */
220int pwrdm_for_each(int (*fn)(struct powerdomain *pwrdm)) 289int pwrdm_for_each(int (*fn)(struct powerdomain *pwrdm, void *user),
290 void *user)
221{ 291{
222 struct powerdomain *temp_pwrdm; 292 struct powerdomain *temp_pwrdm;
223 unsigned long flags; 293 unsigned long flags;
@@ -228,7 +298,7 @@ int pwrdm_for_each(int (*fn)(struct powerdomain *pwrdm))
228 298
229 read_lock_irqsave(&pwrdm_rwlock, flags); 299 read_lock_irqsave(&pwrdm_rwlock, flags);
230 list_for_each_entry(temp_pwrdm, &pwrdm_list, node) { 300 list_for_each_entry(temp_pwrdm, &pwrdm_list, node) {
231 ret = (*fn)(temp_pwrdm); 301 ret = (*fn)(temp_pwrdm, user);
232 if (ret) 302 if (ret)
233 break; 303 break;
234 } 304 }
@@ -1110,4 +1180,36 @@ int pwrdm_wait_transition(struct powerdomain *pwrdm)
1110 return 0; 1180 return 0;
1111} 1181}
1112 1182
1183int pwrdm_state_switch(struct powerdomain *pwrdm)
1184{
1185 return _pwrdm_state_switch(pwrdm, PWRDM_STATE_NOW);
1186}
1187
1188int pwrdm_clkdm_state_switch(struct clockdomain *clkdm)
1189{
1190 if (clkdm != NULL && clkdm->pwrdm.ptr != NULL) {
1191 pwrdm_wait_transition(clkdm->pwrdm.ptr);
1192 return pwrdm_state_switch(clkdm->pwrdm.ptr);
1193 }
1194
1195 return -EINVAL;
1196}
1197int pwrdm_clk_state_switch(struct clk *clk)
1198{
1199 if (clk != NULL && clk->clkdm != NULL)
1200 return pwrdm_clkdm_state_switch(clk->clkdm);
1201 return -EINVAL;
1202}
1203
1204int pwrdm_pre_transition(void)
1205{
1206 pwrdm_for_each(_pwrdm_pre_transition_cb, NULL);
1207 return 0;
1208}
1209
1210int pwrdm_post_transition(void)
1211{
1212 pwrdm_for_each(_pwrdm_post_transition_cb, NULL);
1213 return 0;
1214}
1113 1215
diff --git a/arch/arm/mach-omap2/prm.h b/arch/arm/mach-omap2/prm.h
index 9937e2814696..03c467c35f54 100644
--- a/arch/arm/mach-omap2/prm.h
+++ b/arch/arm/mach-omap2/prm.h
@@ -17,11 +17,11 @@
17#include "prcm-common.h" 17#include "prcm-common.h"
18 18
19#define OMAP2420_PRM_REGADDR(module, reg) \ 19#define OMAP2420_PRM_REGADDR(module, reg) \
20 IO_ADDRESS(OMAP2420_PRM_BASE + (module) + (reg)) 20 OMAP2_IO_ADDRESS(OMAP2420_PRM_BASE + (module) + (reg))
21#define OMAP2430_PRM_REGADDR(module, reg) \ 21#define OMAP2430_PRM_REGADDR(module, reg) \
22 IO_ADDRESS(OMAP2430_PRM_BASE + (module) + (reg)) 22 OMAP2_IO_ADDRESS(OMAP2430_PRM_BASE + (module) + (reg))
23#define OMAP34XX_PRM_REGADDR(module, reg) \ 23#define OMAP34XX_PRM_REGADDR(module, reg) \
24 IO_ADDRESS(OMAP3430_PRM_BASE + (module) + (reg)) 24 OMAP2_IO_ADDRESS(OMAP3430_PRM_BASE + (module) + (reg))
25 25
26/* 26/*
27 * Architecture-specific global PRM registers 27 * Architecture-specific global PRM registers
diff --git a/arch/arm/mach-omap2/sdrc.h b/arch/arm/mach-omap2/sdrc.h
index 1a8bbd094066..0837eda5f2b6 100644
--- a/arch/arm/mach-omap2/sdrc.h
+++ b/arch/arm/mach-omap2/sdrc.h
@@ -48,9 +48,9 @@ static inline u32 sms_read_reg(u16 reg)
48 return __raw_readl(OMAP_SMS_REGADDR(reg)); 48 return __raw_readl(OMAP_SMS_REGADDR(reg));
49} 49}
50#else 50#else
51#define OMAP242X_SDRC_REGADDR(reg) IO_ADDRESS(OMAP2420_SDRC_BASE + (reg)) 51#define OMAP242X_SDRC_REGADDR(reg) OMAP2_IO_ADDRESS(OMAP2420_SDRC_BASE + (reg))
52#define OMAP243X_SDRC_REGADDR(reg) IO_ADDRESS(OMAP243X_SDRC_BASE + (reg)) 52#define OMAP243X_SDRC_REGADDR(reg) OMAP2_IO_ADDRESS(OMAP243X_SDRC_BASE + (reg))
53#define OMAP34XX_SDRC_REGADDR(reg) IO_ADDRESS(OMAP343X_SDRC_BASE + (reg)) 53#define OMAP34XX_SDRC_REGADDR(reg) OMAP2_IO_ADDRESS(OMAP343X_SDRC_BASE + (reg))
54#endif /* __ASSEMBLER__ */ 54#endif /* __ASSEMBLER__ */
55 55
56#endif 56#endif
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index ce22344b94e7..3a529c77daa8 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -73,7 +73,7 @@ static LIST_HEAD(uart_list);
73 73
74static struct plat_serial8250_port serial_platform_data0[] = { 74static struct plat_serial8250_port serial_platform_data0[] = {
75 { 75 {
76 .membase = IO_ADDRESS(OMAP_UART1_BASE), 76 .membase = OMAP2_IO_ADDRESS(OMAP_UART1_BASE),
77 .mapbase = OMAP_UART1_BASE, 77 .mapbase = OMAP_UART1_BASE,
78 .irq = 72, 78 .irq = 72,
79 .flags = UPF_BOOT_AUTOCONF, 79 .flags = UPF_BOOT_AUTOCONF,
@@ -87,7 +87,7 @@ static struct plat_serial8250_port serial_platform_data0[] = {
87 87
88static struct plat_serial8250_port serial_platform_data1[] = { 88static struct plat_serial8250_port serial_platform_data1[] = {
89 { 89 {
90 .membase = IO_ADDRESS(OMAP_UART2_BASE), 90 .membase = OMAP2_IO_ADDRESS(OMAP_UART2_BASE),
91 .mapbase = OMAP_UART2_BASE, 91 .mapbase = OMAP_UART2_BASE,
92 .irq = 73, 92 .irq = 73,
93 .flags = UPF_BOOT_AUTOCONF, 93 .flags = UPF_BOOT_AUTOCONF,
@@ -101,7 +101,7 @@ static struct plat_serial8250_port serial_platform_data1[] = {
101 101
102static struct plat_serial8250_port serial_platform_data2[] = { 102static struct plat_serial8250_port serial_platform_data2[] = {
103 { 103 {
104 .membase = IO_ADDRESS(OMAP_UART3_BASE), 104 .membase = OMAP2_IO_ADDRESS(OMAP_UART3_BASE),
105 .mapbase = OMAP_UART3_BASE, 105 .mapbase = OMAP_UART3_BASE,
106 .irq = 74, 106 .irq = 74,
107 .flags = UPF_BOOT_AUTOCONF, 107 .flags = UPF_BOOT_AUTOCONF,
@@ -123,6 +123,21 @@ static struct plat_serial8250_port serial_platform_data2[] = {
123 } 123 }
124}; 124};
125 125
126#ifdef CONFIG_ARCH_OMAP4
127static struct plat_serial8250_port serial_platform_data3[] = {
128 {
129 .membase = IO_ADDRESS(OMAP_UART4_BASE),
130 .mapbase = OMAP_UART4_BASE,
131 .irq = 70,
132 .flags = UPF_BOOT_AUTOCONF,
133 .iotype = UPIO_MEM,
134 .regshift = 2,
135 .uartclk = OMAP24XX_BASE_BAUD * 16,
136 }, {
137 .flags = 0
138 }
139};
140#endif
126static inline unsigned int serial_read_reg(struct plat_serial8250_port *up, 141static inline unsigned int serial_read_reg(struct plat_serial8250_port *up,
127 int offset) 142 int offset)
128{ 143{
@@ -470,7 +485,7 @@ static void omap_uart_idle_init(struct omap_uart_state *uart)
470 uart->padconf = 0; 485 uart->padconf = 0;
471 } 486 }
472 487
473 p->flags |= UPF_SHARE_IRQ; 488 p->irqflags |= IRQF_SHARED;
474 ret = request_irq(p->irq, omap_uart_interrupt, IRQF_SHARED, 489 ret = request_irq(p->irq, omap_uart_interrupt, IRQF_SHARED,
475 "serial idle", (void *)uart); 490 "serial idle", (void *)uart);
476 WARN_ON(ret); 491 WARN_ON(ret);
@@ -560,12 +575,22 @@ static struct omap_uart_state omap_uart[OMAP_MAX_NR_PORTS] = {
560 }, 575 },
561 }, 576 },
562 }, 577 },
578#ifdef CONFIG_ARCH_OMAP4
579 {
580 .pdev = {
581 .name = "serial8250",
582 .id = 3
583 .dev = {
584 .platform_data = serial_platform_data3,
585 },
586 },
587 },
588#endif
563}; 589};
564 590
565void __init omap_serial_init(void) 591void __init omap_serial_early_init(void)
566{ 592{
567 int i; 593 int i;
568 const struct omap_uart_config *info;
569 char name[16]; 594 char name[16];
570 595
571 /* 596 /*
@@ -574,23 +599,12 @@ void __init omap_serial_init(void)
574 * if not needed. 599 * if not needed.
575 */ 600 */
576 601
577 info = omap_get_config(OMAP_TAG_UART, struct omap_uart_config);
578
579 if (info == NULL)
580 return;
581
582 for (i = 0; i < OMAP_MAX_NR_PORTS; i++) { 602 for (i = 0; i < OMAP_MAX_NR_PORTS; i++) {
583 struct omap_uart_state *uart = &omap_uart[i]; 603 struct omap_uart_state *uart = &omap_uart[i];
584 struct platform_device *pdev = &uart->pdev; 604 struct platform_device *pdev = &uart->pdev;
585 struct device *dev = &pdev->dev; 605 struct device *dev = &pdev->dev;
586 struct plat_serial8250_port *p = dev->platform_data; 606 struct plat_serial8250_port *p = dev->platform_data;
587 607
588 if (!(info->enabled_uarts & (1 << i))) {
589 p->membase = NULL;
590 p->mapbase = 0;
591 continue;
592 }
593
594 sprintf(name, "uart%d_ick", i+1); 608 sprintf(name, "uart%d_ick", i+1);
595 uart->ick = clk_get(NULL, name); 609 uart->ick = clk_get(NULL, name);
596 if (IS_ERR(uart->ick)) { 610 if (IS_ERR(uart->ick)) {
@@ -605,8 +619,11 @@ void __init omap_serial_init(void)
605 uart->fck = NULL; 619 uart->fck = NULL;
606 } 620 }
607 621
608 if (!uart->ick || !uart->fck) 622 /* FIXME: Remove this once the clkdev is ready */
609 continue; 623 if (!cpu_is_omap44xx()) {
624 if (!uart->ick || !uart->fck)
625 continue;
626 }
610 627
611 uart->num = i; 628 uart->num = i;
612 p->private_data = uart; 629 p->private_data = uart;
@@ -617,6 +634,18 @@ void __init omap_serial_init(void)
617 p->irq += 32; 634 p->irq += 32;
618 635
619 omap_uart_enable_clocks(uart); 636 omap_uart_enable_clocks(uart);
637 }
638}
639
640void __init omap_serial_init(void)
641{
642 int i;
643
644 for (i = 0; i < OMAP_MAX_NR_PORTS; i++) {
645 struct omap_uart_state *uart = &omap_uart[i];
646 struct platform_device *pdev = &uart->pdev;
647 struct device *dev = &pdev->dev;
648
620 omap_uart_reset(uart); 649 omap_uart_reset(uart);
621 omap_uart_idle_init(uart); 650 omap_uart_idle_init(uart);
622 651
diff --git a/arch/arm/mach-omap2/sram242x.S b/arch/arm/mach-omap2/sram242x.S
index bb299851116d..9b62208658bc 100644
--- a/arch/arm/mach-omap2/sram242x.S
+++ b/arch/arm/mach-omap2/sram242x.S
@@ -128,7 +128,7 @@ omap242x_sdi_prcm_voltctrl:
128prcm_mask_val: 128prcm_mask_val:
129 .word 0xFFFF3FFC 129 .word 0xFFFF3FFC
130omap242x_sdi_timer_32ksynct_cr: 130omap242x_sdi_timer_32ksynct_cr:
131 .word IO_ADDRESS(OMAP2420_32KSYNCT_BASE + 0x010) 131 .word OMAP2_IO_ADDRESS(OMAP2420_32KSYNCT_BASE + 0x010)
132ENTRY(omap242x_sram_ddr_init_sz) 132ENTRY(omap242x_sram_ddr_init_sz)
133 .word . - omap242x_sram_ddr_init 133 .word . - omap242x_sram_ddr_init
134 134
@@ -224,7 +224,7 @@ omap242x_srs_prcm_voltctrl:
224ddr_prcm_mask_val: 224ddr_prcm_mask_val:
225 .word 0xFFFF3FFC 225 .word 0xFFFF3FFC
226omap242x_srs_timer_32ksynct: 226omap242x_srs_timer_32ksynct:
227 .word IO_ADDRESS(OMAP2420_32KSYNCT_BASE + 0x010) 227 .word OMAP2_IO_ADDRESS(OMAP2420_32KSYNCT_BASE + 0x010)
228 228
229ENTRY(omap242x_sram_reprogram_sdrc_sz) 229ENTRY(omap242x_sram_reprogram_sdrc_sz)
230 .word . - omap242x_sram_reprogram_sdrc 230 .word . - omap242x_sram_reprogram_sdrc
diff --git a/arch/arm/mach-omap2/sram243x.S b/arch/arm/mach-omap2/sram243x.S
index 9955abcaeb31..df2cd9277c00 100644
--- a/arch/arm/mach-omap2/sram243x.S
+++ b/arch/arm/mach-omap2/sram243x.S
@@ -128,7 +128,7 @@ omap243x_sdi_prcm_voltctrl:
128prcm_mask_val: 128prcm_mask_val:
129 .word 0xFFFF3FFC 129 .word 0xFFFF3FFC
130omap243x_sdi_timer_32ksynct_cr: 130omap243x_sdi_timer_32ksynct_cr:
131 .word IO_ADDRESS(OMAP2430_32KSYNCT_BASE + 0x010) 131 .word OMAP2_IO_ADDRESS(OMAP2430_32KSYNCT_BASE + 0x010)
132ENTRY(omap243x_sram_ddr_init_sz) 132ENTRY(omap243x_sram_ddr_init_sz)
133 .word . - omap243x_sram_ddr_init 133 .word . - omap243x_sram_ddr_init
134 134
@@ -224,7 +224,7 @@ omap243x_srs_prcm_voltctrl:
224ddr_prcm_mask_val: 224ddr_prcm_mask_val:
225 .word 0xFFFF3FFC 225 .word 0xFFFF3FFC
226omap243x_srs_timer_32ksynct: 226omap243x_srs_timer_32ksynct:
227 .word IO_ADDRESS(OMAP2430_32KSYNCT_BASE + 0x010) 227 .word OMAP2_IO_ADDRESS(OMAP2430_32KSYNCT_BASE + 0x010)
228 228
229ENTRY(omap243x_sram_reprogram_sdrc_sz) 229ENTRY(omap243x_sram_reprogram_sdrc_sz)
230 .word . - omap243x_sram_reprogram_sdrc 230 .word . - omap243x_sram_reprogram_sdrc
diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c
index 97eeeebcb066..e2338c0aebcf 100644
--- a/arch/arm/mach-omap2/timer-gp.c
+++ b/arch/arm/mach-omap2/timer-gp.c
@@ -231,7 +231,7 @@ static void __init omap2_gp_clocksource_init(void)
231static void __init omap2_gp_timer_init(void) 231static void __init omap2_gp_timer_init(void)
232{ 232{
233#ifdef CONFIG_LOCAL_TIMERS 233#ifdef CONFIG_LOCAL_TIMERS
234 twd_base = IO_ADDRESS(OMAP44XX_LOCAL_TWD_BASE); 234 twd_base = OMAP2_IO_ADDRESS(OMAP44XX_LOCAL_TWD_BASE);
235#endif 235#endif
236 omap_dm_timer_init(); 236 omap_dm_timer_init();
237 237
diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c
index 739e59e8025c..1145a2562b0f 100644
--- a/arch/arm/mach-omap2/usb-musb.c
+++ b/arch/arm/mach-omap2/usb-musb.c
@@ -31,15 +31,6 @@
31#include <mach/mux.h> 31#include <mach/mux.h>
32#include <mach/usb.h> 32#include <mach/usb.h>
33 33
34#define OTG_SYSCONFIG (OMAP34XX_HSUSB_OTG_BASE + 0x404)
35
36static void __init usb_musb_pm_init(void)
37{
38 /* Ensure force-idle mode for OTG controller */
39 if (cpu_is_omap34xx())
40 omap_writel(0, OTG_SYSCONFIG);
41}
42
43#ifdef CONFIG_USB_MUSB_SOC 34#ifdef CONFIG_USB_MUSB_SOC
44 35
45static struct resource musb_resources[] = { 36static struct resource musb_resources[] = {
@@ -173,13 +164,10 @@ void __init usb_musb_init(void)
173 printk(KERN_ERR "Unable to register HS-USB (MUSB) device\n"); 164 printk(KERN_ERR "Unable to register HS-USB (MUSB) device\n");
174 return; 165 return;
175 } 166 }
176
177 usb_musb_pm_init();
178} 167}
179 168
180#else 169#else
181void __init usb_musb_init(void) 170void __init usb_musb_init(void)
182{ 171{
183 usb_musb_pm_init();
184} 172}
185#endif /* CONFIG_USB_MUSB_SOC */ 173#endif /* CONFIG_USB_MUSB_SOC */
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig
index 89c992b8f75b..a6f8eab14ba5 100644
--- a/arch/arm/mach-pxa/Kconfig
+++ b/arch/arm/mach-pxa/Kconfig
@@ -21,6 +21,11 @@ config CPU_PXA930
21 21
22config CPU_PXA935 22config CPU_PXA935
23 bool "PXA935 (codename Tavor-P65)" 23 bool "PXA935 (codename Tavor-P65)"
24 select CPU_PXA930
25
26config CPU_PXA950
27 bool "PXA950 (codename Tavor-PV2)"
28 select CPU_PXA930
24 29
25endmenu 30endmenu
26 31
@@ -79,6 +84,12 @@ config MACH_MP900C
79 bool "Nec Mobilepro 900/c" 84 bool "Nec Mobilepro 900/c"
80 select PXA25x 85 select PXA25x
81 86
87config MACH_BALLOON3
88 bool "Balloon 3 board"
89 select PXA27x
90 select IWMMXT
91 select PXA_HAVE_BOARD_IRQS
92
82config ARCH_PXA_IDP 93config ARCH_PXA_IDP
83 bool "Accelent Xscale IDP" 94 bool "Accelent Xscale IDP"
84 select PXA25x 95 select PXA25x
@@ -371,6 +382,15 @@ config MACH_PALMTE2
371 Say Y here if you intend to run this kernel on a Palm Tungsten|E2 382 Say Y here if you intend to run this kernel on a Palm Tungsten|E2
372 handheld computer. 383 handheld computer.
373 384
385config MACH_PALMTC
386 bool "Palm Tungsten|C"
387 default y
388 depends on ARCH_PXA_PALM
389 select PXA25x
390 help
391 Say Y here if you intend to run this kernel on a Palm Tungsten|C
392 handheld computer.
393
374config MACH_PALMT5 394config MACH_PALMT5
375 bool "Palm Tungsten|T5" 395 bool "Palm Tungsten|T5"
376 default y 396 default y
@@ -458,6 +478,7 @@ config PXA_EZX
458 select PXA27x 478 select PXA27x
459 select IWMMXT 479 select IWMMXT
460 select HAVE_PWM 480 select HAVE_PWM
481 select PXA_HAVE_BOARD_IRQS
461 482
462config MACH_EZX_A780 483config MACH_EZX_A780
463 bool "Motorola EZX A780" 484 bool "Motorola EZX A780"
@@ -489,6 +510,21 @@ config MACH_EZX_E2
489 default y 510 default y
490 depends on PXA_EZX 511 depends on PXA_EZX
491 512
513config MACH_XCEP
514 bool "Iskratel Electronics XCEP"
515 select PXA25x
516 select MTD
517 select MTD_PARTITIONS
518 select MTD_PHYSMAP
519 select MTD_CFI_INTELEXT
520 select MTD_CFI
521 select MTD_CHAR
522 select SMC91X
523 select PXA_SSP
524 help
525 PXA255 based Single Board Computer with SMC 91C111 ethernet chip and 64 MB of flash.
526 Tuned for usage in Libera instruments for particle accelerators.
527
492endmenu 528endmenu
493 529
494config PXA25x 530config PXA25x
diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile
index d4c6122a342f..f10e152bfc27 100644
--- a/arch/arm/mach-pxa/Makefile
+++ b/arch/arm/mach-pxa/Makefile
@@ -31,6 +31,7 @@ obj-$(CONFIG_GUMSTIX_AM300EPD) += am300epd.o
31obj-$(CONFIG_ARCH_LUBBOCK) += lubbock.o 31obj-$(CONFIG_ARCH_LUBBOCK) += lubbock.o
32obj-$(CONFIG_MACH_LOGICPD_PXA270) += lpd270.o 32obj-$(CONFIG_MACH_LOGICPD_PXA270) += lpd270.o
33obj-$(CONFIG_MACH_MAINSTONE) += mainstone.o 33obj-$(CONFIG_MACH_MAINSTONE) += mainstone.o
34obj-$(CONFIG_MACH_BALLOON3) += balloon3.o
34obj-$(CONFIG_MACH_MP900C) += mp900.o 35obj-$(CONFIG_MACH_MP900C) += mp900.o
35obj-$(CONFIG_ARCH_PXA_IDP) += idp.o 36obj-$(CONFIG_ARCH_PXA_IDP) += idp.o
36obj-$(CONFIG_MACH_TRIZEPS4) += trizeps4.o 37obj-$(CONFIG_MACH_TRIZEPS4) += trizeps4.o
@@ -58,6 +59,7 @@ obj-$(CONFIG_MACH_E750) += e750.o
58obj-$(CONFIG_MACH_E400) += e400.o 59obj-$(CONFIG_MACH_E400) += e400.o
59obj-$(CONFIG_MACH_E800) += e800.o 60obj-$(CONFIG_MACH_E800) += e800.o
60obj-$(CONFIG_MACH_PALMTE2) += palmte2.o 61obj-$(CONFIG_MACH_PALMTE2) += palmte2.o
62obj-$(CONFIG_MACH_PALMTC) += palmtc.o
61obj-$(CONFIG_MACH_PALMT5) += palmt5.o 63obj-$(CONFIG_MACH_PALMT5) += palmt5.o
62obj-$(CONFIG_MACH_PALMTX) += palmtx.o 64obj-$(CONFIG_MACH_PALMTX) += palmtx.o
63obj-$(CONFIG_MACH_PALMLD) += palmld.o 65obj-$(CONFIG_MACH_PALMLD) += palmld.o
@@ -78,6 +80,8 @@ obj-$(CONFIG_MACH_ARMCORE) += cm-x2xx.o cm-x255.o cm-x270.o
78obj-$(CONFIG_MACH_CM_X300) += cm-x300.o 80obj-$(CONFIG_MACH_CM_X300) += cm-x300.o
79obj-$(CONFIG_PXA_EZX) += ezx.o 81obj-$(CONFIG_PXA_EZX) += ezx.o
80 82
83obj-$(CONFIG_MACH_XCEP) += xcep.o
84
81obj-$(CONFIG_MACH_INTELMOTE2) += imote2.o 85obj-$(CONFIG_MACH_INTELMOTE2) += imote2.o
82obj-$(CONFIG_MACH_STARGATE2) += stargate2.o 86obj-$(CONFIG_MACH_STARGATE2) += stargate2.o
83obj-$(CONFIG_MACH_CSB726) += csb726.o 87obj-$(CONFIG_MACH_CSB726) += csb726.o
diff --git a/arch/arm/mach-pxa/balloon3.c b/arch/arm/mach-pxa/balloon3.c
new file mode 100644
index 000000000000..f23138b8fca3
--- /dev/null
+++ b/arch/arm/mach-pxa/balloon3.c
@@ -0,0 +1,361 @@
1/*
2 * linux/arch/arm/mach-pxa/balloon3.c
3 *
4 * Support for Balloonboard.org Balloon3 board.
5 *
6 * Author: Nick Bane, Wookey, Jonathan McDowell
7 * Created: June, 2006
8 * Copyright: Toby Churchill Ltd
9 * Derived from mainstone.c, by Nico Pitre
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
14 */
15
16#include <linux/init.h>
17#include <linux/platform_device.h>
18#include <linux/sysdev.h>
19#include <linux/interrupt.h>
20#include <linux/sched.h>
21#include <linux/bitops.h>
22#include <linux/fb.h>
23#include <linux/gpio.h>
24#include <linux/ioport.h>
25#include <linux/mtd/mtd.h>
26#include <linux/mtd/partitions.h>
27#include <linux/types.h>
28
29#include <asm/setup.h>
30#include <asm/mach-types.h>
31#include <asm/irq.h>
32#include <asm/sizes.h>
33
34#include <asm/mach/arch.h>
35#include <asm/mach/map.h>
36#include <asm/mach/irq.h>
37#include <asm/mach/flash.h>
38
39#include <mach/pxa27x.h>
40#include <mach/balloon3.h>
41#include <mach/audio.h>
42#include <mach/pxafb.h>
43#include <mach/mmc.h>
44#include <mach/udc.h>
45#include <mach/pxa27x-udc.h>
46#include <mach/irda.h>
47#include <mach/ohci.h>
48
49#include <plat/i2c.h>
50
51#include "generic.h"
52#include "devices.h"
53
54static unsigned long balloon3_irq_enabled;
55
56static unsigned long balloon3_features_present =
57 (1 << BALLOON3_FEATURE_OHCI) | (1 << BALLOON3_FEATURE_CF) |
58 (1 << BALLOON3_FEATURE_AUDIO) |
59 (1 << BALLOON3_FEATURE_TOPPOLY);
60
61int balloon3_has(enum balloon3_features feature)
62{
63 return (balloon3_features_present & (1 << feature)) ? 1 : 0;
64}
65EXPORT_SYMBOL_GPL(balloon3_has);
66
67int __init parse_balloon3_features(char *arg)
68{
69 if (!arg)
70 return 0;
71
72 return strict_strtoul(arg, 0, &balloon3_features_present);
73}
74early_param("balloon3_features", parse_balloon3_features);
75
76static void balloon3_mask_irq(unsigned int irq)
77{
78 int balloon3_irq = (irq - BALLOON3_IRQ(0));
79 balloon3_irq_enabled &= ~(1 << balloon3_irq);
80 __raw_writel(~balloon3_irq_enabled, BALLOON3_INT_CONTROL_REG);
81}
82
83static void balloon3_unmask_irq(unsigned int irq)
84{
85 int balloon3_irq = (irq - BALLOON3_IRQ(0));
86 balloon3_irq_enabled |= (1 << balloon3_irq);
87 __raw_writel(~balloon3_irq_enabled, BALLOON3_INT_CONTROL_REG);
88}
89
90static struct irq_chip balloon3_irq_chip = {
91 .name = "FPGA",
92 .ack = balloon3_mask_irq,
93 .mask = balloon3_mask_irq,
94 .unmask = balloon3_unmask_irq,
95};
96
97static void balloon3_irq_handler(unsigned int irq, struct irq_desc *desc)
98{
99 unsigned long pending = __raw_readl(BALLOON3_INT_CONTROL_REG) &
100 balloon3_irq_enabled;
101
102 do {
103 /* clear useless edge notification */
104 if (desc->chip->ack)
105 desc->chip->ack(BALLOON3_AUX_NIRQ);
106 while (pending) {
107 irq = BALLOON3_IRQ(0) + __ffs(pending);
108 generic_handle_irq(irq);
109 pending &= pending - 1;
110 }
111 pending = __raw_readl(BALLOON3_INT_CONTROL_REG) &
112 balloon3_irq_enabled;
113 } while (pending);
114}
115
116static void __init balloon3_init_irq(void)
117{
118 int irq;
119
120 pxa27x_init_irq();
121 /* setup extra Balloon3 irqs */
122 for (irq = BALLOON3_IRQ(0); irq <= BALLOON3_IRQ(7); irq++) {
123 set_irq_chip(irq, &balloon3_irq_chip);
124 set_irq_handler(irq, handle_level_irq);
125 set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
126 }
127
128 set_irq_chained_handler(BALLOON3_AUX_NIRQ, balloon3_irq_handler);
129 set_irq_type(BALLOON3_AUX_NIRQ, IRQ_TYPE_EDGE_FALLING);
130
131 pr_debug("%s: chained handler installed - irq %d automatically "
132 "enabled\n", __func__, BALLOON3_AUX_NIRQ);
133}
134
135static void balloon3_backlight_power(int on)
136{
137 pr_debug("%s: power is %s\n", __func__, on ? "on" : "off");
138 gpio_set_value(BALLOON3_GPIO_RUN_BACKLIGHT, on);
139}
140
141static unsigned long balloon3_lcd_pin_config[] = {
142 /* LCD - 16bpp Active TFT */
143 GPIO58_LCD_LDD_0,
144 GPIO59_LCD_LDD_1,
145 GPIO60_LCD_LDD_2,
146 GPIO61_LCD_LDD_3,
147 GPIO62_LCD_LDD_4,
148 GPIO63_LCD_LDD_5,
149 GPIO64_LCD_LDD_6,
150 GPIO65_LCD_LDD_7,
151 GPIO66_LCD_LDD_8,
152 GPIO67_LCD_LDD_9,
153 GPIO68_LCD_LDD_10,
154 GPIO69_LCD_LDD_11,
155 GPIO70_LCD_LDD_12,
156 GPIO71_LCD_LDD_13,
157 GPIO72_LCD_LDD_14,
158 GPIO73_LCD_LDD_15,
159 GPIO74_LCD_FCLK,
160 GPIO75_LCD_LCLK,
161 GPIO76_LCD_PCLK,
162 GPIO77_LCD_BIAS,
163
164 GPIO99_GPIO, /* Backlight */
165};
166
167static struct pxafb_mode_info balloon3_lcd_modes[] = {
168 {
169 .pixclock = 38000,
170 .xres = 480,
171 .yres = 640,
172 .bpp = 16,
173 .hsync_len = 8,
174 .left_margin = 8,
175 .right_margin = 8,
176 .vsync_len = 2,
177 .upper_margin = 4,
178 .lower_margin = 5,
179 .sync = 0,
180 },
181};
182
183static struct pxafb_mach_info balloon3_pxafb_info = {
184 .modes = balloon3_lcd_modes,
185 .num_modes = ARRAY_SIZE(balloon3_lcd_modes),
186 .lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL,
187 .pxafb_backlight_power = balloon3_backlight_power,
188};
189
190static unsigned long balloon3_mmc_pin_config[] = {
191 GPIO32_MMC_CLK,
192 GPIO92_MMC_DAT_0,
193 GPIO109_MMC_DAT_1,
194 GPIO110_MMC_DAT_2,
195 GPIO111_MMC_DAT_3,
196 GPIO112_MMC_CMD,
197};
198
199static void balloon3_mci_setpower(struct device *dev, unsigned int vdd)
200{
201 struct pxamci_platform_data *p_d = dev->platform_data;
202
203 if ((1 << vdd) & p_d->ocr_mask) {
204 pr_debug("%s: on\n", __func__);
205 /* FIXME something to prod here? */
206 } else {
207 pr_debug("%s: off\n", __func__);
208 /* FIXME something to prod here? */
209 }
210}
211
212static struct pxamci_platform_data balloon3_mci_platform_data = {
213 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
214 .setpower = balloon3_mci_setpower,
215};
216
217static int balloon3_udc_is_connected(void)
218{
219 pr_debug("%s: udc connected\n", __func__);
220 return 1;
221}
222
223static void balloon3_udc_command(int cmd)
224{
225 switch (cmd) {
226 case PXA2XX_UDC_CMD_CONNECT:
227 UP2OCR |= (UP2OCR_DPPUE + UP2OCR_DPPUBE);
228 pr_debug("%s: connect\n", __func__);
229 break;
230 case PXA2XX_UDC_CMD_DISCONNECT:
231 UP2OCR &= ~UP2OCR_DPPUE;
232 pr_debug("%s: disconnect\n", __func__);
233 break;
234 }
235}
236
237static struct pxa2xx_udc_mach_info balloon3_udc_info = {
238 .udc_is_connected = balloon3_udc_is_connected,
239 .udc_command = balloon3_udc_command,
240};
241
242static struct pxaficp_platform_data balloon3_ficp_platform_data = {
243 .transceiver_cap = IR_SIRMODE | IR_FIRMODE | IR_OFF,
244};
245
246static unsigned long balloon3_ohci_pin_config[] = {
247 GPIO88_USBH1_PWR,
248 GPIO89_USBH1_PEN,
249};
250
251static struct pxaohci_platform_data balloon3_ohci_platform_data = {
252 .port_mode = PMM_PERPORT_MODE,
253 .flags = ENABLE_PORT_ALL | POWER_CONTROL_LOW | POWER_SENSE_LOW,
254};
255
256static unsigned long balloon3_pin_config[] __initdata = {
257 /* Select BTUART 'COM1/ttyS0' as IO option for pins 42/43/44/45 */
258 GPIO42_BTUART_RXD,
259 GPIO43_BTUART_TXD,
260 GPIO44_BTUART_CTS,
261 GPIO45_BTUART_RTS,
262
263 /* Wakeup GPIO */
264 GPIO1_GPIO | WAKEUP_ON_EDGE_BOTH,
265
266 /* NAND & IDLE LED GPIOs */
267 GPIO9_GPIO,
268 GPIO10_GPIO,
269};
270
271static struct gpio_led balloon3_gpio_leds[] = {
272 {
273 .name = "balloon3:green:idle",
274 .default_trigger = "heartbeat",
275 .gpio = BALLOON3_GPIO_LED_IDLE,
276 .active_low = 1,
277 },
278 {
279 .name = "balloon3:green:nand",
280 .default_trigger = "nand-disk",
281 .gpio = BALLOON3_GPIO_LED_NAND,
282 .active_low = 1,
283 },
284};
285
286static struct gpio_led_platform_data balloon3_gpio_leds_platform_data = {
287 .leds = balloon3_gpio_leds,
288 .num_leds = ARRAY_SIZE(balloon3_gpio_leds),
289};
290
291static struct platform_device balloon3led_device = {
292 .name = "leds-gpio",
293 .id = -1,
294 .dev = {
295 .platform_data = &balloon3_gpio_leds_platform_data,
296 },
297};
298
299static void __init balloon3_init(void)
300{
301 pr_info("Initialising Balloon3\n");
302
303 /* system bus arbiter setting
304 * - Core_Park
305 * - LCD_wt:DMA_wt:CORE_Wt = 2:3:4
306 */
307 ARB_CNTRL = ARB_CORE_PARK | 0x234;
308
309 pxa_set_i2c_info(NULL);
310 if (balloon3_has(BALLOON3_FEATURE_AUDIO))
311 pxa_set_ac97_info(NULL);
312
313 if (balloon3_has(BALLOON3_FEATURE_TOPPOLY)) {
314 pxa2xx_mfp_config(ARRAY_AND_SIZE(balloon3_lcd_pin_config));
315 gpio_request(BALLOON3_GPIO_RUN_BACKLIGHT,
316 "LCD Backlight Power");
317 gpio_direction_output(BALLOON3_GPIO_RUN_BACKLIGHT, 1);
318 set_pxa_fb_info(&balloon3_pxafb_info);
319 }
320
321 if (balloon3_has(BALLOON3_FEATURE_MMC)) {
322 pxa2xx_mfp_config(ARRAY_AND_SIZE(balloon3_mmc_pin_config));
323 pxa_set_mci_info(&balloon3_mci_platform_data);
324 }
325 pxa_set_ficp_info(&balloon3_ficp_platform_data);
326 if (balloon3_has(BALLOON3_FEATURE_OHCI)) {
327 pxa2xx_mfp_config(ARRAY_AND_SIZE(balloon3_ohci_pin_config));
328 pxa_set_ohci_info(&balloon3_ohci_platform_data);
329 }
330 pxa_set_udc_info(&balloon3_udc_info);
331
332 pxa2xx_mfp_config(ARRAY_AND_SIZE(balloon3_pin_config));
333
334 platform_device_register(&balloon3led_device);
335}
336
337static struct map_desc balloon3_io_desc[] __initdata = {
338 { /* CPLD/FPGA */
339 .virtual = BALLOON3_FPGA_VIRT,
340 .pfn = __phys_to_pfn(BALLOON3_FPGA_PHYS),
341 .length = BALLOON3_FPGA_LENGTH,
342 .type = MT_DEVICE,
343 },
344};
345
346static void __init balloon3_map_io(void)
347{
348 pxa_map_io();
349 iotable_init(balloon3_io_desc, ARRAY_SIZE(balloon3_io_desc));
350}
351
352MACHINE_START(BALLOON3, "Balloon3")
353 /* Maintainer: Nick Bane. */
354 .phys_io = 0x40000000,
355 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
356 .map_io = balloon3_map_io,
357 .init_irq = balloon3_init_irq,
358 .timer = &pxa_timer,
359 .init_machine = balloon3_init,
360 .boot_params = PHYS_OFFSET + 0x100,
361MACHINE_END
diff --git a/arch/arm/mach-pxa/clock.h b/arch/arm/mach-pxa/clock.h
index 5599bceff738..978a3667e90d 100644
--- a/arch/arm/mach-pxa/clock.h
+++ b/arch/arm/mach-pxa/clock.h
@@ -12,7 +12,6 @@ struct clk {
12 unsigned int cken; 12 unsigned int cken;
13 unsigned int delay; 13 unsigned int delay;
14 unsigned int enabled; 14 unsigned int enabled;
15 struct clk *other;
16}; 15};
17 16
18#define INIT_CLKREG(_clk,_devname,_conname) \ 17#define INIT_CLKREG(_clk,_devname,_conname) \
diff --git a/arch/arm/mach-pxa/cm-x270.c b/arch/arm/mach-pxa/cm-x270.c
index 1d2cec25391d..eea78b6c2bc5 100644
--- a/arch/arm/mach-pxa/cm-x270.c
+++ b/arch/arm/mach-pxa/cm-x270.c
@@ -13,13 +13,18 @@
13#include <linux/sysdev.h> 13#include <linux/sysdev.h>
14#include <linux/irq.h> 14#include <linux/irq.h>
15#include <linux/gpio.h> 15#include <linux/gpio.h>
16#include <linux/delay.h>
16 17
17#include <linux/rtc-v3020.h> 18#include <linux/rtc-v3020.h>
18#include <video/mbxfb.h> 19#include <video/mbxfb.h>
19 20
21#include <linux/spi/spi.h>
22#include <linux/spi/libertas_spi.h>
23
20#include <mach/pxa27x.h> 24#include <mach/pxa27x.h>
21#include <mach/ohci.h> 25#include <mach/ohci.h>
22#include <mach/mmc.h> 26#include <mach/mmc.h>
27#include <mach/pxa2xx_spi.h>
23 28
24#include "generic.h" 29#include "generic.h"
25 30
@@ -34,6 +39,10 @@
34/* MMC power enable */ 39/* MMC power enable */
35#define GPIO105_MMC_POWER (105) 40#define GPIO105_MMC_POWER (105)
36 41
42/* WLAN GPIOS */
43#define GPIO19_WLAN_STRAP (19)
44#define GPIO102_WLAN_RST (102)
45
37static unsigned long cmx270_pin_config[] = { 46static unsigned long cmx270_pin_config[] = {
38 /* AC'97 */ 47 /* AC'97 */
39 GPIO28_AC97_BITCLK, 48 GPIO28_AC97_BITCLK,
@@ -94,8 +103,8 @@ static unsigned long cmx270_pin_config[] = {
94 GPIO26_SSP1_RXD, 103 GPIO26_SSP1_RXD,
95 104
96 /* SSP2 */ 105 /* SSP2 */
97 GPIO19_SSP2_SCLK, 106 GPIO19_GPIO, /* SSP2 clock is used as GPIO for Libertas pin-strap */
98 GPIO14_SSP2_SFRM, 107 GPIO14_GPIO,
99 GPIO87_SSP2_TXD, 108 GPIO87_SSP2_TXD,
100 GPIO88_SSP2_RXD, 109 GPIO88_SSP2_RXD,
101 110
@@ -123,6 +132,7 @@ static unsigned long cmx270_pin_config[] = {
123 GPIO0_GPIO | WAKEUP_ON_EDGE_BOTH, 132 GPIO0_GPIO | WAKEUP_ON_EDGE_BOTH,
124 GPIO105_GPIO | MFP_LPM_DRIVE_HIGH, /* MMC/SD power */ 133 GPIO105_GPIO | MFP_LPM_DRIVE_HIGH, /* MMC/SD power */
125 GPIO53_GPIO, /* PC card reset */ 134 GPIO53_GPIO, /* PC card reset */
135 GPIO102_GPIO, /* WLAN reset */
126 136
127 /* NAND controls */ 137 /* NAND controls */
128 GPIO11_GPIO | MFP_LPM_DRIVE_HIGH, /* NAND CE# */ 138 GPIO11_GPIO | MFP_LPM_DRIVE_HIGH, /* NAND CE# */
@@ -131,6 +141,7 @@ static unsigned long cmx270_pin_config[] = {
131 /* interrupts */ 141 /* interrupts */
132 GPIO10_GPIO, /* DM9000 interrupt */ 142 GPIO10_GPIO, /* DM9000 interrupt */
133 GPIO83_GPIO, /* MMC card detect */ 143 GPIO83_GPIO, /* MMC card detect */
144 GPIO95_GPIO, /* WLAN interrupt */
134}; 145};
135 146
136/* V3020 RTC */ 147/* V3020 RTC */
@@ -271,64 +282,114 @@ static inline void cmx270_init_ohci(void) {}
271#endif 282#endif
272 283
273#if defined(CONFIG_MMC) || defined(CONFIG_MMC_MODULE) 284#if defined(CONFIG_MMC) || defined(CONFIG_MMC_MODULE)
274static int cmx270_mci_init(struct device *dev, 285static struct pxamci_platform_data cmx270_mci_platform_data = {
275 irq_handler_t cmx270_detect_int, 286 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
276 void *data) 287 .gpio_card_detect = GPIO83_MMC_IRQ,
288 .gpio_card_ro = -1,
289 .gpio_power = GPIO105_MMC_POWER,
290 .gpio_power_invert = 1,
291};
292
293static void __init cmx270_init_mmc(void)
277{ 294{
278 int err; 295 pxa_set_mci_info(&cmx270_mci_platform_data);
296}
297#else
298static inline void cmx270_init_mmc(void) {}
299#endif
300
301#if defined(CONFIG_SPI_PXA2XX) || defined(CONFIG_SPI_PXA2XX_MODULE)
302static struct pxa2xx_spi_master cm_x270_spi_info = {
303 .num_chipselect = 1,
304 .enable_dma = 1,
305};
306
307static struct pxa2xx_spi_chip cm_x270_libertas_chip = {
308 .rx_threshold = 1,
309 .tx_threshold = 1,
310 .timeout = 1000,
311 .gpio_cs = 14,
312};
313
314static unsigned long cm_x270_libertas_pin_config[] = {
315 /* SSP2 */
316 GPIO19_SSP2_SCLK,
317 GPIO14_GPIO,
318 GPIO87_SSP2_TXD,
319 GPIO88_SSP2_RXD,
320
321};
279 322
280 err = gpio_request(GPIO105_MMC_POWER, "MMC/SD power"); 323static int cm_x270_libertas_setup(struct spi_device *spi)
281 if (err) { 324{
282 dev_warn(dev, "power gpio unavailable\n"); 325 int err = gpio_request(GPIO19_WLAN_STRAP, "WLAN STRAP");
326 if (err)
283 return err; 327 return err;
284 }
285 328
286 gpio_direction_output(GPIO105_MMC_POWER, 0); 329 err = gpio_request(GPIO102_WLAN_RST, "WLAN RST");
330 if (err)
331 goto err_free_strap;
287 332
288 err = request_irq(CMX270_MMC_IRQ, cmx270_detect_int, 333 err = gpio_direction_output(GPIO102_WLAN_RST, 0);
289 IRQF_DISABLED | IRQF_TRIGGER_FALLING, 334 if (err)
290 "MMC card detect", data); 335 goto err_free_strap;
291 if (err) { 336 msleep(100);
292 gpio_free(GPIO105_MMC_POWER); 337
293 dev_err(dev, "cmx270_mci_init: MMC/SD: can't" 338 err = gpio_direction_output(GPIO19_WLAN_STRAP, 1);
294 " request MMC card detect IRQ\n"); 339 if (err)
295 } 340 goto err_free_strap;
341 msleep(100);
342
343 pxa2xx_mfp_config(ARRAY_AND_SIZE(cm_x270_libertas_pin_config));
344
345 gpio_set_value(GPIO102_WLAN_RST, 1);
346 msleep(100);
347
348 spi->bits_per_word = 16;
349 spi_setup(spi);
350
351 return 0;
352
353err_free_strap:
354 gpio_free(GPIO19_WLAN_STRAP);
296 355
297 return err; 356 return err;
298} 357}
299 358
300static void cmx270_mci_setpower(struct device *dev, unsigned int vdd) 359static int cm_x270_libertas_teardown(struct spi_device *spi)
301{ 360{
302 struct pxamci_platform_data *p_d = dev->platform_data; 361 gpio_set_value(GPIO102_WLAN_RST, 0);
303 362 gpio_free(GPIO102_WLAN_RST);
304 if ((1 << vdd) & p_d->ocr_mask) { 363 gpio_free(GPIO19_WLAN_STRAP);
305 dev_dbg(dev, "power on\n");
306 gpio_set_value(GPIO105_MMC_POWER, 0);
307 } else {
308 gpio_set_value(GPIO105_MMC_POWER, 1);
309 dev_dbg(dev, "power off\n");
310 }
311}
312 364
313static void cmx270_mci_exit(struct device *dev, void *data) 365 return 0;
314{
315 free_irq(CMX270_MMC_IRQ, data);
316 gpio_free(GPIO105_MMC_POWER);
317} 366}
318 367
319static struct pxamci_platform_data cmx270_mci_platform_data = { 368struct libertas_spi_platform_data cm_x270_libertas_pdata = {
320 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, 369 .use_dummy_writes = 1,
321 .init = cmx270_mci_init, 370 .setup = cm_x270_libertas_setup,
322 .setpower = cmx270_mci_setpower, 371 .teardown = cm_x270_libertas_teardown,
323 .exit = cmx270_mci_exit,
324}; 372};
325 373
326static void __init cmx270_init_mmc(void) 374static struct spi_board_info cm_x270_spi_devices[] __initdata = {
375 {
376 .modalias = "libertas_spi",
377 .max_speed_hz = 13000000,
378 .bus_num = 2,
379 .irq = gpio_to_irq(95),
380 .chip_select = 0,
381 .controller_data = &cm_x270_libertas_chip,
382 .platform_data = &cm_x270_libertas_pdata,
383 },
384};
385
386static void __init cmx270_init_spi(void)
327{ 387{
328 pxa_set_mci_info(&cmx270_mci_platform_data); 388 pxa2xx_set_spi_info(2, &cm_x270_spi_info);
389 spi_register_board_info(ARRAY_AND_SIZE(cm_x270_spi_devices));
329} 390}
330#else 391#else
331static inline void cmx270_init_mmc(void) {} 392static inline void cmx270_init_spi(void) {}
332#endif 393#endif
333 394
334void __init cmx270_init(void) 395void __init cmx270_init(void)
@@ -343,4 +404,5 @@ void __init cmx270_init(void)
343 cmx270_init_mmc(); 404 cmx270_init_mmc();
344 cmx270_init_ohci(); 405 cmx270_init_ohci();
345 cmx270_init_2700G(); 406 cmx270_init_2700G();
407 cmx270_init_spi();
346} 408}
diff --git a/arch/arm/mach-pxa/cm-x300.c b/arch/arm/mach-pxa/cm-x300.c
index 465da26591bd..aac2cda60e09 100644
--- a/arch/arm/mach-pxa/cm-x300.c
+++ b/arch/arm/mach-pxa/cm-x300.c
@@ -306,68 +306,21 @@ static void cm_x300_mci_exit(struct device *dev, void *data)
306} 306}
307 307
308static struct pxamci_platform_data cm_x300_mci_platform_data = { 308static struct pxamci_platform_data cm_x300_mci_platform_data = {
309 .detect_delay = 20, 309 .detect_delay = 20,
310 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, 310 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
311 .init = cm_x300_mci_init, 311 .init = cm_x300_mci_init,
312 .exit = cm_x300_mci_exit, 312 .exit = cm_x300_mci_exit,
313 .gpio_card_detect = -1,
314 .gpio_card_ro = -1,
315 .gpio_power = -1,
313}; 316};
314 317
315static int cm_x300_mci2_ro(struct device *dev)
316{
317 return gpio_get_value(GPIO85_MMC2_WP);
318}
319
320static int cm_x300_mci2_init(struct device *dev,
321 irq_handler_t cm_x300_detect_int,
322 void *data)
323{
324 int err;
325
326 /*
327 * setup GPIO for CM-X300 MMC controller
328 */
329 err = gpio_request(GPIO82_MMC2_IRQ, "mmc card detect");
330 if (err)
331 goto err_request_cd;
332 gpio_direction_input(GPIO82_MMC2_IRQ);
333
334 err = gpio_request(GPIO85_MMC2_WP, "mmc write protect");
335 if (err)
336 goto err_request_wp;
337 gpio_direction_input(GPIO85_MMC2_WP);
338
339 err = request_irq(CM_X300_MMC2_IRQ, cm_x300_detect_int,
340 IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
341 "MMC card detect", data);
342 if (err) {
343 printk(KERN_ERR "%s: MMC/SD/SDIO: "
344 "can't request card detect IRQ\n", __func__);
345 goto err_request_irq;
346 }
347
348 return 0;
349
350err_request_irq:
351 gpio_free(GPIO85_MMC2_WP);
352err_request_wp:
353 gpio_free(GPIO82_MMC2_IRQ);
354err_request_cd:
355 return err;
356}
357
358static void cm_x300_mci2_exit(struct device *dev, void *data)
359{
360 free_irq(CM_X300_MMC2_IRQ, data);
361 gpio_free(GPIO82_MMC2_IRQ);
362 gpio_free(GPIO85_MMC2_WP);
363}
364
365static struct pxamci_platform_data cm_x300_mci2_platform_data = { 318static struct pxamci_platform_data cm_x300_mci2_platform_data = {
366 .detect_delay = 20, 319 .detect_delay = 20,
367 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, 320 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
368 .init = cm_x300_mci2_init, 321 .gpio_card_detect = GPIO82_MMC2_IRQ,
369 .exit = cm_x300_mci2_exit, 322 .gpio_card_ro = GPIO85_MMC2_WP,
370 .get_ro = cm_x300_mci2_ro, 323 .gpio_power = -1,
371}; 324};
372 325
373static void __init cm_x300_init_mmc(void) 326static void __init cm_x300_init_mmc(void)
diff --git a/arch/arm/mach-pxa/colibri-pxa300.c b/arch/arm/mach-pxa/colibri-pxa300.c
index 7c9c34c19ae2..37c239c56568 100644
--- a/arch/arm/mach-pxa/colibri-pxa300.c
+++ b/arch/arm/mach-pxa/colibri-pxa300.c
@@ -172,6 +172,7 @@ void __init colibri_pxa300_init(void)
172{ 172{
173 colibri_pxa300_init_eth(); 173 colibri_pxa300_init_eth();
174 colibri_pxa300_init_ohci(); 174 colibri_pxa300_init_ohci();
175 colibri_pxa3xx_init_nand();
175 colibri_pxa300_init_lcd(); 176 colibri_pxa300_init_lcd();
176 colibri_pxa3xx_init_lcd(mfp_to_gpio(GPIO39_GPIO)); 177 colibri_pxa3xx_init_lcd(mfp_to_gpio(GPIO39_GPIO));
177 colibri_pxa310_init_ac97(); 178 colibri_pxa310_init_ac97();
diff --git a/arch/arm/mach-pxa/colibri-pxa320.c b/arch/arm/mach-pxa/colibri-pxa320.c
index a18d37b3c5e6..494572825c7d 100644
--- a/arch/arm/mach-pxa/colibri-pxa320.c
+++ b/arch/arm/mach-pxa/colibri-pxa320.c
@@ -164,15 +164,48 @@ static inline void __init colibri_pxa320_init_ac97(void)
164static inline void colibri_pxa320_init_ac97(void) {} 164static inline void colibri_pxa320_init_ac97(void) {}
165#endif 165#endif
166 166
167/*
168 * The following configuration is verified to work with the Toradex Orchid
169 * carrier board
170 */
171static mfp_cfg_t colibri_pxa320_uart_pin_config[] __initdata = {
172 /* UART 1 configuration (may be set by bootloader) */
173 GPIO99_UART1_CTS,
174 GPIO104_UART1_RTS,
175 GPIO97_UART1_RXD,
176 GPIO98_UART1_TXD,
177 GPIO101_UART1_DTR,
178 GPIO103_UART1_DSR,
179 GPIO100_UART1_DCD,
180 GPIO102_UART1_RI,
181
182 /* UART 2 configuration */
183 GPIO109_UART2_CTS,
184 GPIO112_UART2_RTS,
185 GPIO110_UART2_RXD,
186 GPIO111_UART2_TXD,
187
188 /* UART 3 configuration */
189 GPIO30_UART3_RXD,
190 GPIO31_UART3_TXD,
191};
192
193static void __init colibri_pxa320_init_uart(void)
194{
195 pxa3xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa320_uart_pin_config));
196}
197
167void __init colibri_pxa320_init(void) 198void __init colibri_pxa320_init(void)
168{ 199{
169 colibri_pxa320_init_eth(); 200 colibri_pxa320_init_eth();
170 colibri_pxa320_init_ohci(); 201 colibri_pxa320_init_ohci();
202 colibri_pxa3xx_init_nand();
171 colibri_pxa320_init_lcd(); 203 colibri_pxa320_init_lcd();
172 colibri_pxa3xx_init_lcd(mfp_to_gpio(GPIO49_GPIO)); 204 colibri_pxa3xx_init_lcd(mfp_to_gpio(GPIO49_GPIO));
173 colibri_pxa320_init_ac97(); 205 colibri_pxa320_init_ac97();
174 colibri_pxa3xx_init_mmc(ARRAY_AND_SIZE(colibri_pxa320_mmc_pin_config), 206 colibri_pxa3xx_init_mmc(ARRAY_AND_SIZE(colibri_pxa320_mmc_pin_config),
175 mfp_to_gpio(MFP_PIN_GPIO28)); 207 mfp_to_gpio(MFP_PIN_GPIO28));
208 colibri_pxa320_init_uart();
176} 209}
177 210
178MACHINE_START(COLIBRI320, "Toradex Colibri PXA320") 211MACHINE_START(COLIBRI320, "Toradex Colibri PXA320")
diff --git a/arch/arm/mach-pxa/colibri-pxa3xx.c b/arch/arm/mach-pxa/colibri-pxa3xx.c
index ea34e34f8cd8..efebaf4d734d 100644
--- a/arch/arm/mach-pxa/colibri-pxa3xx.c
+++ b/arch/arm/mach-pxa/colibri-pxa3xx.c
@@ -25,6 +25,7 @@
25#include <mach/colibri.h> 25#include <mach/colibri.h>
26#include <mach/mmc.h> 26#include <mach/mmc.h>
27#include <mach/pxafb.h> 27#include <mach/pxafb.h>
28#include <mach/pxa3xx_nand.h>
28 29
29#include "generic.h" 30#include "generic.h"
30#include "devices.h" 31#include "devices.h"
@@ -95,10 +96,13 @@ static void colibri_pxa3xx_mci_exit(struct device *dev, void *data)
95} 96}
96 97
97static struct pxamci_platform_data colibri_pxa3xx_mci_platform_data = { 98static struct pxamci_platform_data colibri_pxa3xx_mci_platform_data = {
98 .detect_delay = 20, 99 .detect_delay = 20,
99 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, 100 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
100 .init = colibri_pxa3xx_mci_init, 101 .init = colibri_pxa3xx_mci_init,
101 .exit = colibri_pxa3xx_mci_exit, 102 .exit = colibri_pxa3xx_mci_exit,
103 .gpio_card_detect = -1,
104 .gpio_card_ro = -1,
105 .gpio_power = -1,
102}; 106};
103 107
104void __init colibri_pxa3xx_init_mmc(mfp_cfg_t *pins, int len, int detect_pin) 108void __init colibri_pxa3xx_init_mmc(mfp_cfg_t *pins, int len, int detect_pin)
@@ -154,3 +158,43 @@ void __init colibri_pxa3xx_init_lcd(int bl_pin)
154} 158}
155#endif 159#endif
156 160
161#if defined(CONFIG_MTD_NAND_PXA3xx) || defined(CONFIG_MTD_NAND_PXA3xx_MODULE)
162static struct mtd_partition colibri_nand_partitions[] = {
163 {
164 .name = "bootloader",
165 .offset = 0,
166 .size = SZ_512K,
167 .mask_flags = MTD_WRITEABLE, /* force read-only */
168 },
169 {
170 .name = "kernel",
171 .offset = MTDPART_OFS_APPEND,
172 .size = SZ_4M,
173 .mask_flags = MTD_WRITEABLE, /* force read-only */
174 },
175 {
176 .name = "reserved",
177 .offset = MTDPART_OFS_APPEND,
178 .size = SZ_1M,
179 .mask_flags = MTD_WRITEABLE, /* force read-only */
180 },
181 {
182 .name = "fs",
183 .offset = MTDPART_OFS_APPEND,
184 .size = MTDPART_SIZ_FULL,
185 },
186};
187
188static struct pxa3xx_nand_platform_data colibri_nand_info = {
189 .enable_arbiter = 1,
190 .keep_config = 1,
191 .parts = colibri_nand_partitions,
192 .nr_parts = ARRAY_SIZE(colibri_nand_partitions),
193};
194
195void __init colibri_pxa3xx_init_nand(void)
196{
197 pxa3xx_set_nand_info(&colibri_nand_info);
198}
199#endif
200
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c
index 5363e1aea3fb..b536b5a5a10d 100644
--- a/arch/arm/mach-pxa/corgi.c
+++ b/arch/arm/mach-pxa/corgi.c
@@ -29,6 +29,7 @@
29#include <linux/spi/ads7846.h> 29#include <linux/spi/ads7846.h>
30#include <linux/spi/corgi_lcd.h> 30#include <linux/spi/corgi_lcd.h>
31#include <linux/mtd/sharpsl.h> 31#include <linux/mtd/sharpsl.h>
32#include <linux/input/matrix_keypad.h>
32#include <video/w100fb.h> 33#include <video/w100fb.h>
33 34
34#include <asm/setup.h> 35#include <asm/setup.h>
@@ -104,6 +105,28 @@ static unsigned long corgi_pin_config[] __initdata = {
104 GPIO6_MMC_CLK, 105 GPIO6_MMC_CLK,
105 GPIO8_MMC_CS0, 106 GPIO8_MMC_CS0,
106 107
108 /* GPIO Matrix Keypad */
109 GPIO66_GPIO, /* column 0 */
110 GPIO67_GPIO, /* column 1 */
111 GPIO68_GPIO, /* column 2 */
112 GPIO69_GPIO, /* column 3 */
113 GPIO70_GPIO, /* column 4 */
114 GPIO71_GPIO, /* column 5 */
115 GPIO72_GPIO, /* column 6 */
116 GPIO73_GPIO, /* column 7 */
117 GPIO74_GPIO, /* column 8 */
118 GPIO75_GPIO, /* column 9 */
119 GPIO76_GPIO, /* column 10 */
120 GPIO77_GPIO, /* column 11 */
121 GPIO58_GPIO, /* row 0 */
122 GPIO59_GPIO, /* row 1 */
123 GPIO60_GPIO, /* row 2 */
124 GPIO61_GPIO, /* row 3 */
125 GPIO62_GPIO, /* row 4 */
126 GPIO63_GPIO, /* row 5 */
127 GPIO64_GPIO, /* row 6 */
128 GPIO65_GPIO, /* row 7 */
129
107 /* GPIO */ 130 /* GPIO */
108 GPIO9_GPIO, /* CORGI_GPIO_nSD_DETECT */ 131 GPIO9_GPIO, /* CORGI_GPIO_nSD_DETECT */
109 GPIO7_GPIO, /* CORGI_GPIO_nSD_WP */ 132 GPIO7_GPIO, /* CORGI_GPIO_nSD_WP */
@@ -267,9 +290,115 @@ static struct platform_device corgifb_device = {
267/* 290/*
268 * Corgi Keyboard Device 291 * Corgi Keyboard Device
269 */ 292 */
293#define CORGI_KEY_CALENDER KEY_F1
294#define CORGI_KEY_ADDRESS KEY_F2
295#define CORGI_KEY_FN KEY_F3
296#define CORGI_KEY_CANCEL KEY_F4
297#define CORGI_KEY_OFF KEY_SUSPEND
298#define CORGI_KEY_EXOK KEY_F5
299#define CORGI_KEY_EXCANCEL KEY_F6
300#define CORGI_KEY_EXJOGDOWN KEY_F7
301#define CORGI_KEY_EXJOGUP KEY_F8
302#define CORGI_KEY_JAP1 KEY_LEFTCTRL
303#define CORGI_KEY_JAP2 KEY_LEFTALT
304#define CORGI_KEY_MAIL KEY_F10
305#define CORGI_KEY_OK KEY_F11
306#define CORGI_KEY_MENU KEY_F12
307
308static const uint32_t corgikbd_keymap[] = {
309 KEY(0, 1, KEY_1),
310 KEY(0, 2, KEY_3),
311 KEY(0, 3, KEY_5),
312 KEY(0, 4, KEY_6),
313 KEY(0, 5, KEY_7),
314 KEY(0, 6, KEY_9),
315 KEY(0, 7, KEY_0),
316 KEY(0, 8, KEY_BACKSPACE),
317 KEY(1, 1, KEY_2),
318 KEY(1, 2, KEY_4),
319 KEY(1, 3, KEY_R),
320 KEY(1, 4, KEY_Y),
321 KEY(1, 5, KEY_8),
322 KEY(1, 6, KEY_I),
323 KEY(1, 7, KEY_O),
324 KEY(1, 8, KEY_P),
325 KEY(2, 0, KEY_TAB),
326 KEY(2, 1, KEY_Q),
327 KEY(2, 2, KEY_E),
328 KEY(2, 3, KEY_T),
329 KEY(2, 4, KEY_G),
330 KEY(2, 5, KEY_U),
331 KEY(2, 6, KEY_J),
332 KEY(2, 7, KEY_K),
333 KEY(3, 0, CORGI_KEY_CALENDER),
334 KEY(3, 1, KEY_W),
335 KEY(3, 2, KEY_S),
336 KEY(3, 3, KEY_F),
337 KEY(3, 4, KEY_V),
338 KEY(3, 5, KEY_H),
339 KEY(3, 6, KEY_M),
340 KEY(3, 7, KEY_L),
341 KEY(3, 9, KEY_RIGHTSHIFT),
342 KEY(4, 0, CORGI_KEY_ADDRESS),
343 KEY(4, 1, KEY_A),
344 KEY(4, 2, KEY_D),
345 KEY(4, 3, KEY_C),
346 KEY(4, 4, KEY_B),
347 KEY(4, 5, KEY_N),
348 KEY(4, 6, KEY_DOT),
349 KEY(4, 8, KEY_ENTER),
350 KEY(4, 10, KEY_LEFTSHIFT),
351 KEY(5, 0, CORGI_KEY_MAIL),
352 KEY(5, 1, KEY_Z),
353 KEY(5, 2, KEY_X),
354 KEY(5, 3, KEY_MINUS),
355 KEY(5, 4, KEY_SPACE),
356 KEY(5, 5, KEY_COMMA),
357 KEY(5, 7, KEY_UP),
358 KEY(5, 11, CORGI_KEY_FN),
359 KEY(6, 0, KEY_SYSRQ),
360 KEY(6, 1, CORGI_KEY_JAP1),
361 KEY(6, 2, CORGI_KEY_JAP2),
362 KEY(6, 3, CORGI_KEY_CANCEL),
363 KEY(6, 4, CORGI_KEY_OK),
364 KEY(6, 5, CORGI_KEY_MENU),
365 KEY(6, 6, KEY_LEFT),
366 KEY(6, 7, KEY_DOWN),
367 KEY(6, 8, KEY_RIGHT),
368 KEY(7, 0, CORGI_KEY_OFF),
369 KEY(7, 1, CORGI_KEY_EXOK),
370 KEY(7, 2, CORGI_KEY_EXCANCEL),
371 KEY(7, 3, CORGI_KEY_EXJOGDOWN),
372 KEY(7, 4, CORGI_KEY_EXJOGUP),
373};
374
375static struct matrix_keymap_data corgikbd_keymap_data = {
376 .keymap = corgikbd_keymap,
377 .keymap_size = ARRAY_SIZE(corgikbd_keymap),
378};
379
380static const int corgikbd_row_gpios[] =
381 { 58, 59, 60, 61, 62, 63, 64, 65 };
382static const int corgikbd_col_gpios[] =
383 { 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77 };
384
385static struct matrix_keypad_platform_data corgikbd_pdata = {
386 .keymap_data = &corgikbd_keymap_data,
387 .row_gpios = corgikbd_row_gpios,
388 .col_gpios = corgikbd_col_gpios,
389 .num_row_gpios = ARRAY_SIZE(corgikbd_row_gpios),
390 .num_col_gpios = ARRAY_SIZE(corgikbd_col_gpios),
391 .col_scan_delay_us = 10,
392 .debounce_ms = 10,
393 .wakeup = 1,
394};
395
270static struct platform_device corgikbd_device = { 396static struct platform_device corgikbd_device = {
271 .name = "corgi-keyboard", 397 .name = "matrix-keypad",
272 .id = -1, 398 .id = -1,
399 .dev = {
400 .platform_data = &corgikbd_pdata,
401 },
273}; 402};
274 403
275/* 404/*
@@ -307,111 +436,20 @@ static struct platform_device corgiled_device = {
307 * The card detect interrupt isn't debounced so we delay it by 250ms 436 * The card detect interrupt isn't debounced so we delay it by 250ms
308 * to give the card a chance to fully insert/eject. 437 * to give the card a chance to fully insert/eject.
309 */ 438 */
310static struct pxamci_platform_data corgi_mci_platform_data;
311
312static int corgi_mci_init(struct device *dev, irq_handler_t corgi_detect_int, void *data)
313{
314 int err;
315
316 err = gpio_request(CORGI_GPIO_nSD_DETECT, "nSD_DETECT");
317 if (err)
318 goto err_out;
319
320 err = gpio_request(CORGI_GPIO_nSD_WP, "nSD_WP");
321 if (err)
322 goto err_free_1;
323
324 err = gpio_request(CORGI_GPIO_SD_PWR, "SD_PWR");
325 if (err)
326 goto err_free_2;
327
328 gpio_direction_input(CORGI_GPIO_nSD_DETECT);
329 gpio_direction_input(CORGI_GPIO_nSD_WP);
330 gpio_direction_output(CORGI_GPIO_SD_PWR, 0);
331
332 corgi_mci_platform_data.detect_delay = msecs_to_jiffies(250);
333
334 err = request_irq(CORGI_IRQ_GPIO_nSD_DETECT, corgi_detect_int,
335 IRQF_DISABLED | IRQF_TRIGGER_RISING |
336 IRQF_TRIGGER_FALLING,
337 "MMC card detect", data);
338 if (err) {
339 pr_err("%s: MMC/SD: can't request MMC card detect IRQ\n",
340 __func__);
341 goto err_free_3;
342 }
343 return 0;
344
345err_free_3:
346 gpio_free(CORGI_GPIO_SD_PWR);
347err_free_2:
348 gpio_free(CORGI_GPIO_nSD_WP);
349err_free_1:
350 gpio_free(CORGI_GPIO_nSD_DETECT);
351err_out:
352 return err;
353}
354
355static void corgi_mci_setpower(struct device *dev, unsigned int vdd)
356{
357 struct pxamci_platform_data* p_d = dev->platform_data;
358
359 gpio_set_value(CORGI_GPIO_SD_PWR, ((1 << vdd) & p_d->ocr_mask));
360}
361
362static int corgi_mci_get_ro(struct device *dev)
363{
364 return gpio_get_value(CORGI_GPIO_nSD_WP);
365}
366
367static void corgi_mci_exit(struct device *dev, void *data)
368{
369 free_irq(CORGI_IRQ_GPIO_nSD_DETECT, data);
370 gpio_free(CORGI_GPIO_SD_PWR);
371 gpio_free(CORGI_GPIO_nSD_WP);
372 gpio_free(CORGI_GPIO_nSD_DETECT);
373}
374
375static struct pxamci_platform_data corgi_mci_platform_data = { 439static struct pxamci_platform_data corgi_mci_platform_data = {
376 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, 440 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
377 .init = corgi_mci_init, 441 .gpio_card_detect = -1,
378 .get_ro = corgi_mci_get_ro, 442 .gpio_card_ro = CORGI_GPIO_nSD_WP,
379 .setpower = corgi_mci_setpower, 443 .gpio_power = CORGI_GPIO_SD_PWR,
380 .exit = corgi_mci_exit,
381}; 444};
382 445
383 446
384/* 447/*
385 * Irda 448 * Irda
386 */ 449 */
387static void corgi_irda_transceiver_mode(struct device *dev, int mode)
388{
389 gpio_set_value(CORGI_GPIO_IR_ON, mode & IR_OFF);
390 pxa2xx_transceiver_mode(dev, mode);
391}
392
393static int corgi_irda_startup(struct device *dev)
394{
395 int err;
396
397 err = gpio_request(CORGI_GPIO_IR_ON, "IR_ON");
398 if (err)
399 return err;
400
401 gpio_direction_output(CORGI_GPIO_IR_ON, 1);
402 return 0;
403}
404
405static void corgi_irda_shutdown(struct device *dev)
406{
407 gpio_free(CORGI_GPIO_IR_ON);
408}
409
410static struct pxaficp_platform_data corgi_ficp_platform_data = { 450static struct pxaficp_platform_data corgi_ficp_platform_data = {
451 .gpio_pwdown = CORGI_GPIO_IR_ON,
411 .transceiver_cap = IR_SIRMODE | IR_OFF, 452 .transceiver_cap = IR_SIRMODE | IR_OFF,
412 .transceiver_mode = corgi_irda_transceiver_mode,
413 .startup = corgi_irda_startup,
414 .shutdown = corgi_irda_shutdown,
415}; 453};
416 454
417 455
@@ -636,6 +674,7 @@ static void __init corgi_init(void)
636 corgi_init_spi(); 674 corgi_init_spi();
637 675
638 pxa_set_udc_info(&udc_info); 676 pxa_set_udc_info(&udc_info);
677 corgi_mci_platform_data.detect_delay = msecs_to_jiffies(250);
639 pxa_set_mci_info(&corgi_mci_platform_data); 678 pxa_set_mci_info(&corgi_mci_platform_data);
640 pxa_set_ficp_info(&corgi_ficp_platform_data); 679 pxa_set_ficp_info(&corgi_ficp_platform_data);
641 pxa_set_i2c_info(NULL); 680 pxa_set_i2c_info(NULL);
diff --git a/arch/arm/mach-pxa/csb726.c b/arch/arm/mach-pxa/csb726.c
index 7d3e1b46e550..79141f862728 100644
--- a/arch/arm/mach-pxa/csb726.c
+++ b/arch/arm/mach-pxa/csb726.c
@@ -130,61 +130,17 @@ static struct pxamci_platform_data csb726_mci_data;
130static int csb726_mci_init(struct device *dev, 130static int csb726_mci_init(struct device *dev,
131 irq_handler_t detect, void *data) 131 irq_handler_t detect, void *data)
132{ 132{
133 int err;
134
135 csb726_mci_data.detect_delay = msecs_to_jiffies(500); 133 csb726_mci_data.detect_delay = msecs_to_jiffies(500);
136
137 err = gpio_request(CSB726_GPIO_MMC_DETECT, "MMC detect");
138 if (err)
139 goto err_det_req;
140
141 err = gpio_direction_input(CSB726_GPIO_MMC_DETECT);
142 if (err)
143 goto err_det_dir;
144
145 err = gpio_request(CSB726_GPIO_MMC_RO, "MMC ro");
146 if (err)
147 goto err_ro_req;
148
149 err = gpio_direction_input(CSB726_GPIO_MMC_RO);
150 if (err)
151 goto err_ro_dir;
152
153 err = request_irq(gpio_to_irq(CSB726_GPIO_MMC_DETECT), detect,
154 IRQF_DISABLED, "MMC card detect", data);
155 if (err)
156 goto err_irq;
157
158 return 0; 134 return 0;
159
160err_irq:
161err_ro_dir:
162 gpio_free(CSB726_GPIO_MMC_RO);
163err_ro_req:
164err_det_dir:
165 gpio_free(CSB726_GPIO_MMC_DETECT);
166err_det_req:
167 return err;
168}
169
170static int csb726_mci_get_ro(struct device *dev)
171{
172 return gpio_get_value(CSB726_GPIO_MMC_RO);
173}
174
175static void csb726_mci_exit(struct device *dev, void *data)
176{
177 free_irq(gpio_to_irq(CSB726_GPIO_MMC_DETECT), data);
178 gpio_free(CSB726_GPIO_MMC_RO);
179 gpio_free(CSB726_GPIO_MMC_DETECT);
180} 135}
181 136
182static struct pxamci_platform_data csb726_mci = { 137static struct pxamci_platform_data csb726_mci = {
183 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, 138 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
184 .init = csb726_mci_init, 139 .init = csb726_mci_init,
185 .get_ro = csb726_mci_get_ro,
186 /* FIXME setpower */ 140 /* FIXME setpower */
187 .exit = csb726_mci_exit, 141 .gpio_card_detect = CSB726_GPIO_MMC_DETECT,
142 .gpio_card_ro = CSB726_GPIO_MMC_RO,
143 .gpio_power = -1,
188}; 144};
189 145
190static struct pxaohci_platform_data csb726_ohci_platform_data = { 146static struct pxaohci_platform_data csb726_ohci_platform_data = {
diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c
index ecc08f360b68..46fabe1cca11 100644
--- a/arch/arm/mach-pxa/devices.c
+++ b/arch/arm/mach-pxa/devices.c
@@ -935,6 +935,33 @@ void __init pxa3xx_set_nand_info(struct pxa3xx_nand_platform_data *info)
935{ 935{
936 pxa_register_device(&pxa3xx_device_nand, info); 936 pxa_register_device(&pxa3xx_device_nand, info);
937} 937}
938
939static struct resource pxa3xx_resources_gcu[] = {
940 {
941 .start = 0x54000000,
942 .end = 0x54000fff,
943 .flags = IORESOURCE_MEM,
944 },
945 {
946 .start = IRQ_GCU,
947 .end = IRQ_GCU,
948 .flags = IORESOURCE_IRQ,
949 },
950};
951
952static u64 pxa3xx_gcu_dmamask = DMA_BIT_MASK(32);
953
954struct platform_device pxa3xx_device_gcu = {
955 .name = "pxa3xx-gcu",
956 .id = -1,
957 .num_resources = ARRAY_SIZE(pxa3xx_resources_gcu),
958 .resource = pxa3xx_resources_gcu,
959 .dev = {
960 .dma_mask = &pxa3xx_gcu_dmamask,
961 .coherent_dma_mask = 0xffffffff,
962 },
963};
964
938#endif /* CONFIG_PXA3xx */ 965#endif /* CONFIG_PXA3xx */
939 966
940/* pxa2xx-spi platform-device ID equals respective SSP platform-device ID + 1. 967/* pxa2xx-spi platform-device ID equals respective SSP platform-device ID + 1.
diff --git a/arch/arm/mach-pxa/devices.h b/arch/arm/mach-pxa/devices.h
index ecc24a4dca6d..93817d99761e 100644
--- a/arch/arm/mach-pxa/devices.h
+++ b/arch/arm/mach-pxa/devices.h
@@ -35,4 +35,6 @@ extern struct platform_device pxa27x_device_pwm1;
35extern struct platform_device pxa3xx_device_nand; 35extern struct platform_device pxa3xx_device_nand;
36extern struct platform_device pxa3xx_device_i2c_power; 36extern struct platform_device pxa3xx_device_i2c_power;
37 37
38extern struct platform_device pxa3xx_device_gcu;
39
38void __init pxa_register_device(struct platform_device *dev, void *data); 40void __init pxa_register_device(struct platform_device *dev, void *data);
diff --git a/arch/arm/mach-pxa/e740.c b/arch/arm/mach-pxa/e740.c
index a36fc17f671d..49acdfa6650d 100644
--- a/arch/arm/mach-pxa/e740.c
+++ b/arch/arm/mach-pxa/e740.c
@@ -199,7 +199,6 @@ static void __init e740_init(void)
199 platform_add_devices(devices, ARRAY_SIZE(devices)); 199 platform_add_devices(devices, ARRAY_SIZE(devices));
200 pxa_set_udc_info(&e7xx_udc_mach_info); 200 pxa_set_udc_info(&e7xx_udc_mach_info);
201 pxa_set_ac97_info(NULL); 201 pxa_set_ac97_info(NULL);
202 e7xx_irda_init();
203 pxa_set_ficp_info(&e7xx_ficp_platform_data); 202 pxa_set_ficp_info(&e7xx_ficp_platform_data);
204} 203}
205 204
diff --git a/arch/arm/mach-pxa/e750.c b/arch/arm/mach-pxa/e750.c
index 1d00110590e5..4052ece3ef49 100644
--- a/arch/arm/mach-pxa/e750.c
+++ b/arch/arm/mach-pxa/e750.c
@@ -200,7 +200,6 @@ static void __init e750_init(void)
200 platform_add_devices(devices, ARRAY_SIZE(devices)); 200 platform_add_devices(devices, ARRAY_SIZE(devices));
201 pxa_set_udc_info(&e7xx_udc_mach_info); 201 pxa_set_udc_info(&e7xx_udc_mach_info);
202 pxa_set_ac97_info(NULL); 202 pxa_set_ac97_info(NULL);
203 e7xx_irda_init();
204 pxa_set_ficp_info(&e7xx_ficp_platform_data); 203 pxa_set_ficp_info(&e7xx_ficp_platform_data);
205} 204}
206 205
diff --git a/arch/arm/mach-pxa/em-x270.c b/arch/arm/mach-pxa/em-x270.c
index 9cd09465a0e8..aec7f4214b14 100644
--- a/arch/arm/mach-pxa/em-x270.c
+++ b/arch/arm/mach-pxa/em-x270.c
@@ -646,13 +646,16 @@ static int em_x270_mci_get_ro(struct device *dev)
646} 646}
647 647
648static struct pxamci_platform_data em_x270_mci_platform_data = { 648static struct pxamci_platform_data em_x270_mci_platform_data = {
649 .ocr_mask = MMC_VDD_20_21|MMC_VDD_21_22|MMC_VDD_22_23| 649 .ocr_mask = MMC_VDD_20_21|MMC_VDD_21_22|MMC_VDD_22_23|
650 MMC_VDD_24_25|MMC_VDD_25_26|MMC_VDD_26_27| 650 MMC_VDD_24_25|MMC_VDD_25_26|MMC_VDD_26_27|
651 MMC_VDD_27_28|MMC_VDD_28_29|MMC_VDD_29_30| 651 MMC_VDD_27_28|MMC_VDD_28_29|MMC_VDD_29_30|
652 MMC_VDD_30_31|MMC_VDD_31_32, 652 MMC_VDD_30_31|MMC_VDD_31_32,
653 .init = em_x270_mci_init, 653 .init = em_x270_mci_init,
654 .setpower = em_x270_mci_setpower, 654 .setpower = em_x270_mci_setpower,
655 .exit = em_x270_mci_exit, 655 .exit = em_x270_mci_exit,
656 .gpio_card_detect = -1,
657 .gpio_card_ro = -1,
658 .gpio_power = -1,
656}; 659};
657 660
658static void __init em_x270_init_mmc(void) 661static void __init em_x270_init_mmc(void)
@@ -1022,22 +1025,32 @@ static int em_x270_sensor_power(struct device *dev, int on)
1022 return 0; 1025 return 0;
1023} 1026}
1024 1027
1025static struct soc_camera_link iclink = {
1026 .bus_id = 0,
1027 .power = em_x270_sensor_power,
1028};
1029
1030static struct i2c_board_info em_x270_i2c_cam_info[] = { 1028static struct i2c_board_info em_x270_i2c_cam_info[] = {
1031 { 1029 {
1032 I2C_BOARD_INFO("mt9m111", 0x48), 1030 I2C_BOARD_INFO("mt9m111", 0x48),
1031 },
1032};
1033
1034static struct soc_camera_link iclink = {
1035 .bus_id = 0,
1036 .power = em_x270_sensor_power,
1037 .board_info = &em_x270_i2c_cam_info[0],
1038 .i2c_adapter_id = 0,
1039 .module_name = "mt9m111",
1040};
1041
1042static struct platform_device em_x270_camera = {
1043 .name = "soc-camera-pdrv",
1044 .id = -1,
1045 .dev = {
1033 .platform_data = &iclink, 1046 .platform_data = &iclink,
1034 }, 1047 },
1035}; 1048};
1036 1049
1037static void __init em_x270_init_camera(void) 1050static void __init em_x270_init_camera(void)
1038{ 1051{
1039 i2c_register_board_info(0, ARRAY_AND_SIZE(em_x270_i2c_cam_info));
1040 pxa_set_camera_info(&em_x270_camera_platform_data); 1052 pxa_set_camera_info(&em_x270_camera_platform_data);
1053 platform_device_register(&em_x270_camera);
1041} 1054}
1042#else 1055#else
1043static inline void em_x270_init_camera(void) {} 1056static inline void em_x270_init_camera(void) {}
@@ -1103,6 +1116,7 @@ REGULATOR_CONSUMER(ldo5, NULL, "vcc cam");
1103REGULATOR_CONSUMER(ldo10, &pxa_device_mci.dev, "vcc sdio"); 1116REGULATOR_CONSUMER(ldo10, &pxa_device_mci.dev, "vcc sdio");
1104REGULATOR_CONSUMER(ldo12, NULL, "vcc usb"); 1117REGULATOR_CONSUMER(ldo12, NULL, "vcc usb");
1105REGULATOR_CONSUMER(ldo19, &em_x270_gprs_userspace_consumer.dev, "vcc gprs"); 1118REGULATOR_CONSUMER(ldo19, &em_x270_gprs_userspace_consumer.dev, "vcc gprs");
1119REGULATOR_CONSUMER(buck2, NULL, "vcc_core");
1106 1120
1107#define REGULATOR_INIT(_ldo, _min_uV, _max_uV, _ops_mask) \ 1121#define REGULATOR_INIT(_ldo, _min_uV, _max_uV, _ops_mask) \
1108 static struct regulator_init_data _ldo##_data = { \ 1122 static struct regulator_init_data _ldo##_data = { \
@@ -1125,6 +1139,7 @@ REGULATOR_INIT(ldo10, 2000000, 3200000,
1125 REGULATOR_CHANGE_STATUS | REGULATOR_CHANGE_VOLTAGE); 1139 REGULATOR_CHANGE_STATUS | REGULATOR_CHANGE_VOLTAGE);
1126REGULATOR_INIT(ldo12, 3000000, 3000000, REGULATOR_CHANGE_STATUS); 1140REGULATOR_INIT(ldo12, 3000000, 3000000, REGULATOR_CHANGE_STATUS);
1127REGULATOR_INIT(ldo19, 3200000, 3200000, REGULATOR_CHANGE_STATUS); 1141REGULATOR_INIT(ldo19, 3200000, 3200000, REGULATOR_CHANGE_STATUS);
1142REGULATOR_INIT(buck2, 1000000, 1650000, REGULATOR_CHANGE_VOLTAGE);
1128 1143
1129struct led_info em_x270_led_info = { 1144struct led_info em_x270_led_info = {
1130 .name = "em-x270:orange", 1145 .name = "em-x270:orange",
@@ -1194,6 +1209,8 @@ struct da903x_subdev_info em_x270_da9030_subdevs[] = {
1194 DA9030_LDO(12), 1209 DA9030_LDO(12),
1195 DA9030_LDO(19), 1210 DA9030_LDO(19),
1196 1211
1212 DA9030_SUBDEV(regulator, BUCK2, &buck2_data),
1213
1197 DA9030_SUBDEV(led, LED_PC, &em_x270_led_info), 1214 DA9030_SUBDEV(led, LED_PC, &em_x270_led_info),
1198 DA9030_SUBDEV(backlight, WLED, &em_x270_led_info), 1215 DA9030_SUBDEV(backlight, WLED, &em_x270_led_info),
1199 DA9030_SUBDEV(battery, BAT, &em_x270_batterty_info), 1216 DA9030_SUBDEV(battery, BAT, &em_x270_batterty_info),
@@ -1245,7 +1262,6 @@ static void __init em_x270_init_i2c(void)
1245 1262
1246static void __init em_x270_module_init(void) 1263static void __init em_x270_module_init(void)
1247{ 1264{
1248 pr_info("%s\n", __func__);
1249 pxa2xx_mfp_config(ARRAY_AND_SIZE(em_x270_pin_config)); 1265 pxa2xx_mfp_config(ARRAY_AND_SIZE(em_x270_pin_config));
1250 1266
1251 mmc_cd = GPIO13_MMC_CD; 1267 mmc_cd = GPIO13_MMC_CD;
@@ -1257,7 +1273,6 @@ static void __init em_x270_module_init(void)
1257 1273
1258static void __init em_x270_exeda_init(void) 1274static void __init em_x270_exeda_init(void)
1259{ 1275{
1260 pr_info("%s\n", __func__);
1261 pxa2xx_mfp_config(ARRAY_AND_SIZE(exeda_pin_config)); 1276 pxa2xx_mfp_config(ARRAY_AND_SIZE(exeda_pin_config));
1262 1277
1263 mmc_cd = GPIO114_MMC_CD; 1278 mmc_cd = GPIO114_MMC_CD;
diff --git a/arch/arm/mach-pxa/eseries.c b/arch/arm/mach-pxa/eseries.c
index c60dadf847a6..91417f035069 100644
--- a/arch/arm/mach-pxa/eseries.c
+++ b/arch/arm/mach-pxa/eseries.c
@@ -47,44 +47,9 @@ struct pxa2xx_udc_mach_info e7xx_udc_mach_info = {
47 .gpio_pullup_inverted = 1 47 .gpio_pullup_inverted = 1
48}; 48};
49 49
50static void e7xx_irda_transceiver_mode(struct device *dev, int mode)
51{
52 if (mode & IR_OFF) {
53 gpio_set_value(GPIO_E7XX_IR_OFF, 1);
54 pxa2xx_transceiver_mode(dev, mode);
55 } else {
56 pxa2xx_transceiver_mode(dev, mode);
57 gpio_set_value(GPIO_E7XX_IR_OFF, 0);
58 }
59}
60
61int e7xx_irda_init(void)
62{
63 int ret;
64
65 ret = gpio_request(GPIO_E7XX_IR_OFF, "IrDA power");
66 if (ret)
67 goto out;
68
69 ret = gpio_direction_output(GPIO_E7XX_IR_OFF, 0);
70 if (ret)
71 goto out;
72
73 e7xx_irda_transceiver_mode(NULL, IR_SIRMODE | IR_OFF);
74out:
75 return ret;
76}
77
78static void e7xx_irda_shutdown(struct device *dev)
79{
80 e7xx_irda_transceiver_mode(dev, IR_SIRMODE | IR_OFF);
81 gpio_free(GPIO_E7XX_IR_OFF);
82}
83
84struct pxaficp_platform_data e7xx_ficp_platform_data = { 50struct pxaficp_platform_data e7xx_ficp_platform_data = {
85 .transceiver_cap = IR_SIRMODE | IR_OFF, 51 .gpio_pwdown = GPIO_E7XX_IR_OFF,
86 .transceiver_mode = e7xx_irda_transceiver_mode, 52 .transceiver_cap = IR_SIRMODE | IR_OFF,
87 .shutdown = e7xx_irda_shutdown,
88}; 53};
89 54
90int eseries_tmio_enable(struct platform_device *dev) 55int eseries_tmio_enable(struct platform_device *dev)
diff --git a/arch/arm/mach-pxa/gumstix.c b/arch/arm/mach-pxa/gumstix.c
index ca9912ea78d9..1708c0109844 100644
--- a/arch/arm/mach-pxa/gumstix.c
+++ b/arch/arm/mach-pxa/gumstix.c
@@ -88,7 +88,10 @@ static struct platform_device *devices[] __initdata = {
88 88
89#ifdef CONFIG_MMC_PXA 89#ifdef CONFIG_MMC_PXA
90static struct pxamci_platform_data gumstix_mci_platform_data = { 90static struct pxamci_platform_data gumstix_mci_platform_data = {
91 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, 91 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
92 .gpio_card_detect = -1,
93 .gpio_card_ro = -1,
94 .gpio_power = -1,
92}; 95};
93 96
94static void __init gumstix_mmc_init(void) 97static void __init gumstix_mmc_init(void)
diff --git a/arch/arm/mach-pxa/hx4700.c b/arch/arm/mach-pxa/hx4700.c
index 81359d574f88..abff9e132749 100644
--- a/arch/arm/mach-pxa/hx4700.c
+++ b/arch/arm/mach-pxa/hx4700.c
@@ -45,6 +45,7 @@
45#include <mach/irda.h> 45#include <mach/irda.h>
46#include <mach/pxa2xx_spi.h> 46#include <mach/pxa2xx_spi.h>
47 47
48#include <video/platform_lcd.h>
48#include <video/w100fb.h> 49#include <video/w100fb.h>
49 50
50#include "devices.h" 51#include "devices.h"
@@ -174,14 +175,9 @@ static int hx4700_gpio_request(struct gpio_ress *gpios, int size)
174 * IRDA 175 * IRDA
175 */ 176 */
176 177
177static void irda_transceiver_mode(struct device *dev, int mode)
178{
179 gpio_set_value(GPIO105_HX4700_nIR_ON, mode & IR_OFF);
180}
181
182static struct pxaficp_platform_data ficp_info = { 178static struct pxaficp_platform_data ficp_info = {
183 .transceiver_cap = IR_SIRMODE | IR_OFF, 179 .gpio_pwdown = GPIO105_HX4700_nIR_ON,
184 .transceiver_mode = irda_transceiver_mode, 180 .transceiver_cap = IR_SIRMODE | IR_OFF,
185}; 181};
186 182
187/* 183/*
@@ -368,8 +364,6 @@ static struct platform_device egpio = {
368 * LCD - Sony display connected to ATI Imageon w3220 364 * LCD - Sony display connected to ATI Imageon w3220
369 */ 365 */
370 366
371static int lcd_power;
372
373static void sony_lcd_init(void) 367static void sony_lcd_init(void)
374{ 368{
375 gpio_set_value(GPIO84_HX4700_LCD_SQN, 1); 369 gpio_set_value(GPIO84_HX4700_LCD_SQN, 1);
@@ -410,35 +404,6 @@ static void sony_lcd_off(void)
410 gpio_set_value(GPIO110_HX4700_LCD_LVDD_3V3_ON, 0); 404 gpio_set_value(GPIO110_HX4700_LCD_LVDD_3V3_ON, 0);
411} 405}
412 406
413static int hx4700_lcd_set_power(struct lcd_device *ldev, int level)
414{
415 switch (level) {
416 case FB_BLANK_UNBLANK:
417 sony_lcd_init();
418 break;
419 case FB_BLANK_NORMAL:
420 case FB_BLANK_VSYNC_SUSPEND:
421 case FB_BLANK_HSYNC_SUSPEND:
422 case FB_BLANK_POWERDOWN:
423 sony_lcd_off();
424 break;
425 }
426 lcd_power = level;
427 return 0;
428}
429
430static int hx4700_lcd_get_power(struct lcd_device *lm)
431{
432 return lcd_power;
433}
434
435static struct lcd_ops hx4700_lcd_ops = {
436 .get_power = hx4700_lcd_get_power,
437 .set_power = hx4700_lcd_set_power,
438};
439
440static struct lcd_device *hx4700_lcd_device;
441
442#ifdef CONFIG_PM 407#ifdef CONFIG_PM
443static void w3220_lcd_suspend(struct w100fb_par *wfb) 408static void w3220_lcd_suspend(struct w100fb_par *wfb)
444{ 409{
@@ -573,6 +538,27 @@ static struct platform_device w3220 = {
573 .resource = w3220_resources, 538 .resource = w3220_resources,
574}; 539};
575 540
541static void hx4700_lcd_set_power(struct plat_lcd_data *pd, unsigned int power)
542{
543 if (power)
544 sony_lcd_init();
545 else
546 sony_lcd_off();
547}
548
549static struct plat_lcd_data hx4700_lcd_data = {
550 .set_power = hx4700_lcd_set_power,
551};
552
553static struct platform_device hx4700_lcd = {
554 .name = "platform-lcd",
555 .id = -1,
556 .dev = {
557 .platform_data = &hx4700_lcd_data,
558 .parent = &w3220.dev,
559 },
560};
561
576/* 562/*
577 * Backlight 563 * Backlight
578 */ 564 */
@@ -872,9 +858,6 @@ static void __init hx4700_init(void)
872 pxa2xx_set_spi_info(2, &pxa_ssp2_master_info); 858 pxa2xx_set_spi_info(2, &pxa_ssp2_master_info);
873 spi_register_board_info(ARRAY_AND_SIZE(tsc2046_board_info)); 859 spi_register_board_info(ARRAY_AND_SIZE(tsc2046_board_info));
874 860
875 hx4700_lcd_device = lcd_device_register("w100fb", NULL,
876 (void *)&w3220_info, &hx4700_lcd_ops);
877
878 gpio_set_value(GPIO71_HX4700_ASIC3_nRESET, 0); 861 gpio_set_value(GPIO71_HX4700_ASIC3_nRESET, 0);
879 mdelay(10); 862 mdelay(10);
880 gpio_set_value(GPIO71_HX4700_ASIC3_nRESET, 1); 863 gpio_set_value(GPIO71_HX4700_ASIC3_nRESET, 1);
diff --git a/arch/arm/mach-pxa/idp.c b/arch/arm/mach-pxa/idp.c
index b6243b59d9be..b6486ef20b17 100644
--- a/arch/arm/mach-pxa/idp.c
+++ b/arch/arm/mach-pxa/idp.c
@@ -168,7 +168,10 @@ static struct pxafb_mach_info sharp_lm8v31 = {
168}; 168};
169 169
170static struct pxamci_platform_data idp_mci_platform_data = { 170static struct pxamci_platform_data idp_mci_platform_data = {
171 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, 171 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
172 .gpio_card_detect = -1,
173 .gpio_card_ro = -1,
174 .gpio_power = -1,
172}; 175};
173 176
174static void __init idp_init(void) 177static void __init idp_init(void)
diff --git a/arch/arm/mach-pxa/imote2.c b/arch/arm/mach-pxa/imote2.c
index 961807dc6467..2a4945db31c5 100644
--- a/arch/arm/mach-pxa/imote2.c
+++ b/arch/arm/mach-pxa/imote2.c
@@ -389,6 +389,9 @@ static int imote2_mci_get_ro(struct device *dev)
389static struct pxamci_platform_data imote2_mci_platform_data = { 389static struct pxamci_platform_data imote2_mci_platform_data = {
390 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, /* default anyway */ 390 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, /* default anyway */
391 .get_ro = imote2_mci_get_ro, 391 .get_ro = imote2_mci_get_ro,
392 .gpio_card_detect = -1,
393 .gpio_card_ro = -1,
394 .gpio_power = -1,
392}; 395};
393 396
394static struct mtd_partition imote2flash_partitions[] = { 397static struct mtd_partition imote2flash_partitions[] = {
diff --git a/arch/arm/mach-pxa/include/mach/balloon3.h b/arch/arm/mach-pxa/include/mach/balloon3.h
new file mode 100644
index 000000000000..bfec09b1814b
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/balloon3.h
@@ -0,0 +1,134 @@
1/*
2 * linux/include/asm-arm/arch-pxa/balloon3.h
3 *
4 * Authors: Nick Bane and Wookey
5 * Created: Oct, 2005
6 * Copyright: Toby Churchill Ltd
7 * Cribbed from mainstone.c, by Nicholas Pitre
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13
14#ifndef ASM_ARCH_BALLOON3_H
15#define ASM_ARCH_BALLOON3_H
16
17enum balloon3_features {
18 BALLOON3_FEATURE_OHCI,
19 BALLOON3_FEATURE_MMC,
20 BALLOON3_FEATURE_CF,
21 BALLOON3_FEATURE_AUDIO,
22 BALLOON3_FEATURE_TOPPOLY,
23};
24
25#define BALLOON3_FPGA_PHYS PXA_CS4_PHYS
26#define BALLOON3_FPGA_VIRT (0xf1000000) /* as per balloon2 */
27#define BALLOON3_FPGA_LENGTH 0x01000000
28
29/* FPGA/CPLD registers */
30#define BALLOON3_PCMCIA0_REG (BALLOON3_FPGA_VIRT + 0x00e00008)
31/* fixme - same for now */
32#define BALLOON3_PCMCIA1_REG (BALLOON3_FPGA_VIRT + 0x00e00008)
33#define BALLOON3_NANDIO_IO_REG (BALLOON3_FPGA_VIRT + 0x00e00000)
34/* fpga/cpld interrupt control register */
35#define BALLOON3_INT_CONTROL_REG (BALLOON3_FPGA_VIRT + 0x00e0000C)
36#define BALLOON3_NANDIO_CTL2_REG (BALLOON3_FPGA_VIRT + 0x00e00010)
37#define BALLOON3_NANDIO_CTL_REG (BALLOON3_FPGA_VIRT + 0x00e00014)
38#define BALLOON3_VERSION_REG (BALLOON3_FPGA_VIRT + 0x00e0001c)
39
40#define BALLOON3_SAMOSA_ADDR_REG (BALLOON3_FPGA_VIRT + 0x00c00000)
41#define BALLOON3_SAMOSA_DATA_REG (BALLOON3_FPGA_VIRT + 0x00c00004)
42#define BALLOON3_SAMOSA_STATUS_REG (BALLOON3_FPGA_VIRT + 0x00c0001c)
43
44/* GPIOs for irqs */
45#define BALLOON3_GPIO_AUX_NIRQ (94)
46#define BALLOON3_GPIO_CODEC_IRQ (95)
47
48/* Timer and Idle LED locations */
49#define BALLOON3_GPIO_LED_NAND (9)
50#define BALLOON3_GPIO_LED_IDLE (10)
51
52/* backlight control */
53#define BALLOON3_GPIO_RUN_BACKLIGHT (99)
54
55#define BALLOON3_GPIO_S0_CD (105)
56
57/* FPGA Interrupt Mask/Acknowledge Register */
58#define BALLOON3_INT_S0_IRQ (1 << 0) /* PCMCIA 0 IRQ */
59#define BALLOON3_INT_S0_STSCHG (1 << 1) /* PCMCIA 0 status changed */
60
61/* CF Status Register */
62#define BALLOON3_PCMCIA_nIRQ (1 << 0) /* IRQ / ready signal */
63#define BALLOON3_PCMCIA_nSTSCHG_BVD1 (1 << 1)
64 /* VDD sense / card status changed */
65
66/* CF control register (write) */
67#define BALLOON3_PCMCIA_RESET (1 << 0) /* Card reset signal */
68#define BALLOON3_PCMCIA_ENABLE (1 << 1)
69#define BALLOON3_PCMCIA_ADD_ENABLE (1 << 2)
70
71/* CPLD (and FPGA) interface definitions */
72#define CPLD_LCD0_DATA_SET 0x00
73#define CPLD_LCD0_DATA_CLR 0x10
74#define CPLD_LCD0_COMMAND_SET 0x01
75#define CPLD_LCD0_COMMAND_CLR 0x11
76#define CPLD_LCD1_DATA_SET 0x02
77#define CPLD_LCD1_DATA_CLR 0x12
78#define CPLD_LCD1_COMMAND_SET 0x03
79#define CPLD_LCD1_COMMAND_CLR 0x13
80
81#define CPLD_MISC_SET 0x07
82#define CPLD_MISC_CLR 0x17
83#define CPLD_MISC_LOON_NRESET_BIT 0
84#define CPLD_MISC_LOON_UNSUSP_BIT 1
85#define CPLD_MISC_RUN_5V_BIT 2
86#define CPLD_MISC_CHG_D0_BIT 3
87#define CPLD_MISC_CHG_D1_BIT 4
88#define CPLD_MISC_DAC_NCS_BIT 5
89
90#define CPLD_LCD_SET 0x08
91#define CPLD_LCD_CLR 0x18
92#define CPLD_LCD_BACKLIGHT_EN_0_BIT 0
93#define CPLD_LCD_BACKLIGHT_EN_1_BIT 1
94#define CPLD_LCD_LED_RED_BIT 4
95#define CPLD_LCD_LED_GREEN_BIT 5
96#define CPLD_LCD_NRESET_BIT 7
97
98#define CPLD_LCD_RO_SET 0x09
99#define CPLD_LCD_RO_CLR 0x19
100#define CPLD_LCD_RO_LCD0_nWAIT_BIT 0
101#define CPLD_LCD_RO_LCD1_nWAIT_BIT 1
102
103#define CPLD_SERIAL_SET 0x0a
104#define CPLD_SERIAL_CLR 0x1a
105#define CPLD_SERIAL_GSM_RI_BIT 0
106#define CPLD_SERIAL_GSM_CTS_BIT 1
107#define CPLD_SERIAL_GSM_DTR_BIT 2
108#define CPLD_SERIAL_LPR_CTS_BIT 3
109#define CPLD_SERIAL_TC232_CTS_BIT 4
110#define CPLD_SERIAL_TC232_DSR_BIT 5
111
112#define CPLD_SROUTING_SET 0x0b
113#define CPLD_SROUTING_CLR 0x1b
114#define CPLD_SROUTING_MSP430_LPR 0
115#define CPLD_SROUTING_MSP430_TC232 1
116#define CPLD_SROUTING_MSP430_GSM 2
117#define CPLD_SROUTING_LOON_LPR (0 << 4)
118#define CPLD_SROUTING_LOON_TC232 (1 << 4)
119#define CPLD_SROUTING_LOON_GSM (2 << 4)
120
121#define CPLD_AROUTING_SET 0x0c
122#define CPLD_AROUTING_CLR 0x1c
123#define CPLD_AROUTING_MIC2PHONE_BIT 0
124#define CPLD_AROUTING_PHONE2INT_BIT 1
125#define CPLD_AROUTING_PHONE2EXT_BIT 2
126#define CPLD_AROUTING_LOONL2INT_BIT 3
127#define CPLD_AROUTING_LOONL2EXT_BIT 4
128#define CPLD_AROUTING_LOONR2PHONE_BIT 5
129#define CPLD_AROUTING_LOONR2INT_BIT 6
130#define CPLD_AROUTING_LOONR2EXT_BIT 7
131
132extern int balloon3_has(enum balloon3_features feature);
133
134#endif
diff --git a/arch/arm/mach-pxa/include/mach/colibri.h b/arch/arm/mach-pxa/include/mach/colibri.h
index a88d7caff0d1..811743c56147 100644
--- a/arch/arm/mach-pxa/include/mach/colibri.h
+++ b/arch/arm/mach-pxa/include/mach/colibri.h
@@ -23,6 +23,12 @@ static inline void colibri_pxa3xx_init_lcd(int bl_pin) {}
23extern void colibri_pxa3xx_init_eth(struct ax_plat_data *plat_data); 23extern void colibri_pxa3xx_init_eth(struct ax_plat_data *plat_data);
24#endif 24#endif
25 25
26#if defined(CONFIG_MTD_NAND_PXA3xx) || defined(CONFIG_MTD_NAND_PXA3xx_MODULE)
27extern void colibri_pxa3xx_init_nand(void);
28#else
29static inline void colibri_pxa3xx_init_nand(void) {}
30#endif
31
26/* physical memory regions */ 32/* physical memory regions */
27#define COLIBRI_SDRAM_BASE 0xa0000000 /* SDRAM region */ 33#define COLIBRI_SDRAM_BASE 0xa0000000 /* SDRAM region */
28 34
diff --git a/arch/arm/mach-pxa/include/mach/entry-macro.S b/arch/arm/mach-pxa/include/mach/entry-macro.S
index f6b4bf3e73d2..241880608ac6 100644
--- a/arch/arm/mach-pxa/include/mach/entry-macro.S
+++ b/arch/arm/mach-pxa/include/mach/entry-macro.S
@@ -24,34 +24,27 @@
24 mov \tmp, \tmp, lsr #13 24 mov \tmp, \tmp, lsr #13
25 and \tmp, \tmp, #0x7 @ Core G 25 and \tmp, \tmp, #0x7 @ Core G
26 cmp \tmp, #1 26 cmp \tmp, #1
27 bhi 1004f 27 bhi 1002f
28 28
29 @ Core Generation 1 (PXA25x)
29 mov \base, #io_p2v(0x40000000) @ IIR Ctl = 0x40d00000 30 mov \base, #io_p2v(0x40000000) @ IIR Ctl = 0x40d00000
30 add \base, \base, #0x00d00000 31 add \base, \base, #0x00d00000
31 ldr \irqstat, [\base, #0] @ ICIP 32 ldr \irqstat, [\base, #0] @ ICIP
32 ldr \irqnr, [\base, #4] @ ICMR 33 ldr \irqnr, [\base, #4] @ ICMR
33 b 1002f
34 34
351004:
36 mrc p6, 0, \irqstat, c6, c0, 0 @ ICIP2
37 mrc p6, 0, \irqnr, c7, c0, 0 @ ICMR2
38 ands \irqnr, \irqstat, \irqnr 35 ands \irqnr, \irqstat, \irqnr
39 beq 1003f 36 beq 1001f
40 rsb \irqstat, \irqnr, #0 37 rsb \irqstat, \irqnr, #0
41 and \irqstat, \irqstat, \irqnr 38 and \irqstat, \irqstat, \irqnr
42 clz \irqnr, \irqstat 39 clz \irqnr, \irqstat
43 rsb \irqnr, \irqnr, #31 40 rsb \irqnr, \irqnr, #(31 + PXA_IRQ(0))
44 add \irqnr, \irqnr, #(32 + PXA_IRQ(0))
45 b 1001f 41 b 1001f
461003:
47 mrc p6, 0, \irqstat, c0, c0, 0 @ ICIP
48 mrc p6, 0, \irqnr, c1, c0, 0 @ ICMR
491002: 421002:
50 ands \irqnr, \irqstat, \irqnr 43 @ Core Generation 2 (PXA27x) or Core Generation 3 (PXA3xx)
44 mrc p6, 0, \irqstat, c5, c0, 0 @ ICHP
45 tst \irqstat, #0x80000000
51 beq 1001f 46 beq 1001f
52 rsb \irqstat, \irqnr, #0 47 bic \irqstat, \irqstat, #0x80000000
53 and \irqstat, \irqstat, \irqnr 48 mov \irqnr, \irqstat, lsr #16
54 clz \irqnr, \irqstat
55 rsb \irqnr, \irqnr, #(31 + PXA_IRQ(0))
561001: 491001:
57 .endm 50 .endm
diff --git a/arch/arm/mach-pxa/include/mach/hardware.h b/arch/arm/mach-pxa/include/mach/hardware.h
index 16ab79547dae..aa3d9f70a08a 100644
--- a/arch/arm/mach-pxa/include/mach/hardware.h
+++ b/arch/arm/mach-pxa/include/mach/hardware.h
@@ -197,6 +197,16 @@
197#define __cpu_is_pxa935(id) (0) 197#define __cpu_is_pxa935(id) (0)
198#endif 198#endif
199 199
200#ifdef CONFIG_CPU_PXA950
201#define __cpu_is_pxa950(id) \
202 ({ \
203 unsigned int _id = (id) >> 4 & 0xfff; \
204 id == 0x697; \
205 })
206#else
207#define __cpu_is_pxa950(id) (0)
208#endif
209
200#define cpu_is_pxa210() \ 210#define cpu_is_pxa210() \
201 ({ \ 211 ({ \
202 __cpu_is_pxa210(read_cpuid_id()); \ 212 __cpu_is_pxa210(read_cpuid_id()); \
@@ -249,6 +259,13 @@
249 __cpu_is_pxa935(id); \ 259 __cpu_is_pxa935(id); \
250 }) 260 })
251 261
262#define cpu_is_pxa950() \
263 ({ \
264 unsigned int id = read_cpuid(CPUID_ID); \
265 __cpu_is_pxa950(id); \
266 })
267
268
252/* 269/*
253 * CPUID Core Generation Bit 270 * CPUID Core Generation Bit
254 * <= 0x2 for pxa21x/pxa25x/pxa26x/pxa27x 271 * <= 0x2 for pxa21x/pxa25x/pxa26x/pxa27x
diff --git a/arch/arm/mach-pxa/include/mach/irda.h b/arch/arm/mach-pxa/include/mach/irda.h
index 0a50c3c763df..3cd41f77dda4 100644
--- a/arch/arm/mach-pxa/include/mach/irda.h
+++ b/arch/arm/mach-pxa/include/mach/irda.h
@@ -12,6 +12,8 @@ struct pxaficp_platform_data {
12 void (*transceiver_mode)(struct device *dev, int mode); 12 void (*transceiver_mode)(struct device *dev, int mode);
13 int (*startup)(struct device *dev); 13 int (*startup)(struct device *dev);
14 void (*shutdown)(struct device *dev); 14 void (*shutdown)(struct device *dev);
15 int gpio_pwdown; /* powerdown GPIO for the IrDA chip */
16 bool gpio_pwdown_inverted; /* gpio_pwdown is inverted */
15}; 17};
16 18
17extern void pxa_set_ficp_info(struct pxaficp_platform_data *info); 19extern void pxa_set_ficp_info(struct pxaficp_platform_data *info);
diff --git a/arch/arm/mach-pxa/include/mach/irqs.h b/arch/arm/mach-pxa/include/mach/irqs.h
index 6a1d95993342..3677a9af9c87 100644
--- a/arch/arm/mach-pxa/include/mach/irqs.h
+++ b/arch/arm/mach-pxa/include/mach/irqs.h
@@ -68,9 +68,10 @@
68#ifdef CONFIG_PXA3xx 68#ifdef CONFIG_PXA3xx
69#define IRQ_SSP4 PXA_IRQ(13) /* SSP4 service request */ 69#define IRQ_SSP4 PXA_IRQ(13) /* SSP4 service request */
70#define IRQ_CIR PXA_IRQ(34) /* Consumer IR */ 70#define IRQ_CIR PXA_IRQ(34) /* Consumer IR */
71#define IRQ_COMM_WDT PXA_IRQ(35) /* Comm WDT interrupt */
71#define IRQ_TSI PXA_IRQ(36) /* Touch Screen Interface (PXA320) */ 72#define IRQ_TSI PXA_IRQ(36) /* Touch Screen Interface (PXA320) */
72#define IRQ_USIM2 PXA_IRQ(38) /* USIM2 Controller */ 73#define IRQ_USIM2 PXA_IRQ(38) /* USIM2 Controller */
73#define IRQ_GRPHICS PXA_IRQ(39) /* Graphics Controller */ 74#define IRQ_GCU PXA_IRQ(39) /* Graphics Controller */
74#define IRQ_MMC2 PXA_IRQ(41) /* MMC2 Controller */ 75#define IRQ_MMC2 PXA_IRQ(41) /* MMC2 Controller */
75#define IRQ_1WIRE PXA_IRQ(44) /* 1-Wire Controller */ 76#define IRQ_1WIRE PXA_IRQ(44) /* 1-Wire Controller */
76#define IRQ_NAND PXA_IRQ(45) /* NAND Controller */ 77#define IRQ_NAND PXA_IRQ(45) /* NAND Controller */
@@ -81,8 +82,31 @@
81#define IRQ_MMC3 PXA_IRQ(55) /* MMC3 Controller (PXA310) */ 82#define IRQ_MMC3 PXA_IRQ(55) /* MMC3 Controller (PXA310) */
82#endif 83#endif
83 84
84#define PXA_GPIO_IRQ_BASE PXA_IRQ(64) 85#ifdef CONFIG_CPU_PXA935
85#define PXA_GPIO_IRQ_NUM (128) 86#define IRQ_U2O PXA_IRQ(64) /* USB OTG 2.0 Controller (PXA935) */
87#define IRQ_U2H PXA_IRQ(65) /* USB Host 2.0 Controller (PXA935) */
88
89#define IRQ_MMC3_PXA935 PXA_IRQ(72) /* MMC3 Controller (PXA935) */
90#define IRQ_MMC4_PXA935 PXA_IRQ(73) /* MMC4 Controller (PXA935) */
91#define IRQ_MMC5_PXA935 PXA_IRQ(74) /* MMC5 Controller (PXA935) */
92
93#define IRQ_U2P PXA_IRQ(93) /* USB PHY D+/D- Lines (PXA935) */
94#endif
95
96#ifdef CONFIG_CPU_PXA930
97#define IRQ_ENHROT PXA_IRQ(37) /* Enhanced Rotary (PXA930) */
98#define IRQ_ACIPC0 PXA_IRQ(5)
99#define IRQ_ACIPC1 PXA_IRQ(40)
100#define IRQ_ACIPC2 PXA_IRQ(19)
101#define IRQ_TRKBALL PXA_IRQ(43) /* Track Ball */
102#endif
103
104#ifdef CONFIG_CPU_PXA950
105#define IRQ_GC500 PXA_IRQ(70) /* Graphics Controller (PXA950) */
106#endif
107
108#define PXA_GPIO_IRQ_BASE PXA_IRQ(96)
109#define PXA_GPIO_IRQ_NUM (192)
86 110
87#define GPIO_2_x_TO_IRQ(x) (PXA_GPIO_IRQ_BASE + (x)) 111#define GPIO_2_x_TO_IRQ(x) (PXA_GPIO_IRQ_BASE + (x))
88#define IRQ_GPIO(x) (((x) < 2) ? (IRQ_GPIO0 + (x)) : GPIO_2_x_TO_IRQ(x)) 112#define IRQ_GPIO(x) (((x) < 2) ? (IRQ_GPIO0 + (x)) : GPIO_2_x_TO_IRQ(x))
@@ -105,6 +129,8 @@
105#define IRQ_BOARD_END (IRQ_BOARD_START + 70) 129#define IRQ_BOARD_END (IRQ_BOARD_START + 70)
106#elif defined(CONFIG_MACH_ZYLONITE) 130#elif defined(CONFIG_MACH_ZYLONITE)
107#define IRQ_BOARD_END (IRQ_BOARD_START + 32) 131#define IRQ_BOARD_END (IRQ_BOARD_START + 32)
132#elif defined(CONFIG_PXA_EZX)
133#define IRQ_BOARD_END (IRQ_BOARD_START + 23)
108#else 134#else
109#define IRQ_BOARD_END (IRQ_BOARD_START + 16) 135#define IRQ_BOARD_END (IRQ_BOARD_START + 16)
110#endif 136#endif
@@ -237,6 +263,16 @@
237#define MAINSTONE_S1_STSCHG_IRQ MAINSTONE_IRQ(14) 263#define MAINSTONE_S1_STSCHG_IRQ MAINSTONE_IRQ(14)
238#define MAINSTONE_S1_IRQ MAINSTONE_IRQ(15) 264#define MAINSTONE_S1_IRQ MAINSTONE_IRQ(15)
239 265
266/* Balloon3 Interrupts */
267#define BALLOON3_IRQ(x) (IRQ_BOARD_START + (x))
268
269#define BALLOON3_BP_CF_NRDY_IRQ BALLOON3_IRQ(0)
270#define BALLOON3_BP_NSTSCHG_IRQ BALLOON3_IRQ(1)
271
272#define BALLOON3_AUX_NIRQ IRQ_GPIO(BALLOON3_GPIO_AUX_NIRQ)
273#define BALLOON3_CODEC_IRQ IRQ_GPIO(BALLOON3_GPIO_CODEC_IRQ)
274#define BALLOON3_S0_CD_IRQ IRQ_GPIO(BALLOON3_GPIO_S0_CD)
275
240/* LoCoMo Interrupts (CONFIG_SHARP_LOCOMO) */ 276/* LoCoMo Interrupts (CONFIG_SHARP_LOCOMO) */
241#define IRQ_LOCOMO_KEY_BASE (IRQ_BOARD_START + 0) 277#define IRQ_LOCOMO_KEY_BASE (IRQ_BOARD_START + 0)
242#define IRQ_LOCOMO_GPIO_BASE (IRQ_BOARD_START + 1) 278#define IRQ_LOCOMO_GPIO_BASE (IRQ_BOARD_START + 1)
diff --git a/arch/arm/mach-pxa/include/mach/mfp.h b/arch/arm/mach-pxa/include/mach/mfp.h
index 482185053a92..271e249ae34f 100644
--- a/arch/arm/mach-pxa/include/mach/mfp.h
+++ b/arch/arm/mach-pxa/include/mach/mfp.h
@@ -16,305 +16,6 @@
16#ifndef __ASM_ARCH_MFP_H 16#ifndef __ASM_ARCH_MFP_H
17#define __ASM_ARCH_MFP_H 17#define __ASM_ARCH_MFP_H
18 18
19#define mfp_to_gpio(m) ((m) % 128) 19#include <plat/mfp.h>
20
21/* list of all the configurable MFP pins */
22enum {
23 MFP_PIN_INVALID = -1,
24
25 MFP_PIN_GPIO0 = 0,
26 MFP_PIN_GPIO1,
27 MFP_PIN_GPIO2,
28 MFP_PIN_GPIO3,
29 MFP_PIN_GPIO4,
30 MFP_PIN_GPIO5,
31 MFP_PIN_GPIO6,
32 MFP_PIN_GPIO7,
33 MFP_PIN_GPIO8,
34 MFP_PIN_GPIO9,
35 MFP_PIN_GPIO10,
36 MFP_PIN_GPIO11,
37 MFP_PIN_GPIO12,
38 MFP_PIN_GPIO13,
39 MFP_PIN_GPIO14,
40 MFP_PIN_GPIO15,
41 MFP_PIN_GPIO16,
42 MFP_PIN_GPIO17,
43 MFP_PIN_GPIO18,
44 MFP_PIN_GPIO19,
45 MFP_PIN_GPIO20,
46 MFP_PIN_GPIO21,
47 MFP_PIN_GPIO22,
48 MFP_PIN_GPIO23,
49 MFP_PIN_GPIO24,
50 MFP_PIN_GPIO25,
51 MFP_PIN_GPIO26,
52 MFP_PIN_GPIO27,
53 MFP_PIN_GPIO28,
54 MFP_PIN_GPIO29,
55 MFP_PIN_GPIO30,
56 MFP_PIN_GPIO31,
57 MFP_PIN_GPIO32,
58 MFP_PIN_GPIO33,
59 MFP_PIN_GPIO34,
60 MFP_PIN_GPIO35,
61 MFP_PIN_GPIO36,
62 MFP_PIN_GPIO37,
63 MFP_PIN_GPIO38,
64 MFP_PIN_GPIO39,
65 MFP_PIN_GPIO40,
66 MFP_PIN_GPIO41,
67 MFP_PIN_GPIO42,
68 MFP_PIN_GPIO43,
69 MFP_PIN_GPIO44,
70 MFP_PIN_GPIO45,
71 MFP_PIN_GPIO46,
72 MFP_PIN_GPIO47,
73 MFP_PIN_GPIO48,
74 MFP_PIN_GPIO49,
75 MFP_PIN_GPIO50,
76 MFP_PIN_GPIO51,
77 MFP_PIN_GPIO52,
78 MFP_PIN_GPIO53,
79 MFP_PIN_GPIO54,
80 MFP_PIN_GPIO55,
81 MFP_PIN_GPIO56,
82 MFP_PIN_GPIO57,
83 MFP_PIN_GPIO58,
84 MFP_PIN_GPIO59,
85 MFP_PIN_GPIO60,
86 MFP_PIN_GPIO61,
87 MFP_PIN_GPIO62,
88 MFP_PIN_GPIO63,
89 MFP_PIN_GPIO64,
90 MFP_PIN_GPIO65,
91 MFP_PIN_GPIO66,
92 MFP_PIN_GPIO67,
93 MFP_PIN_GPIO68,
94 MFP_PIN_GPIO69,
95 MFP_PIN_GPIO70,
96 MFP_PIN_GPIO71,
97 MFP_PIN_GPIO72,
98 MFP_PIN_GPIO73,
99 MFP_PIN_GPIO74,
100 MFP_PIN_GPIO75,
101 MFP_PIN_GPIO76,
102 MFP_PIN_GPIO77,
103 MFP_PIN_GPIO78,
104 MFP_PIN_GPIO79,
105 MFP_PIN_GPIO80,
106 MFP_PIN_GPIO81,
107 MFP_PIN_GPIO82,
108 MFP_PIN_GPIO83,
109 MFP_PIN_GPIO84,
110 MFP_PIN_GPIO85,
111 MFP_PIN_GPIO86,
112 MFP_PIN_GPIO87,
113 MFP_PIN_GPIO88,
114 MFP_PIN_GPIO89,
115 MFP_PIN_GPIO90,
116 MFP_PIN_GPIO91,
117 MFP_PIN_GPIO92,
118 MFP_PIN_GPIO93,
119 MFP_PIN_GPIO94,
120 MFP_PIN_GPIO95,
121 MFP_PIN_GPIO96,
122 MFP_PIN_GPIO97,
123 MFP_PIN_GPIO98,
124 MFP_PIN_GPIO99,
125 MFP_PIN_GPIO100,
126 MFP_PIN_GPIO101,
127 MFP_PIN_GPIO102,
128 MFP_PIN_GPIO103,
129 MFP_PIN_GPIO104,
130 MFP_PIN_GPIO105,
131 MFP_PIN_GPIO106,
132 MFP_PIN_GPIO107,
133 MFP_PIN_GPIO108,
134 MFP_PIN_GPIO109,
135 MFP_PIN_GPIO110,
136 MFP_PIN_GPIO111,
137 MFP_PIN_GPIO112,
138 MFP_PIN_GPIO113,
139 MFP_PIN_GPIO114,
140 MFP_PIN_GPIO115,
141 MFP_PIN_GPIO116,
142 MFP_PIN_GPIO117,
143 MFP_PIN_GPIO118,
144 MFP_PIN_GPIO119,
145 MFP_PIN_GPIO120,
146 MFP_PIN_GPIO121,
147 MFP_PIN_GPIO122,
148 MFP_PIN_GPIO123,
149 MFP_PIN_GPIO124,
150 MFP_PIN_GPIO125,
151 MFP_PIN_GPIO126,
152 MFP_PIN_GPIO127,
153 MFP_PIN_GPIO0_2,
154 MFP_PIN_GPIO1_2,
155 MFP_PIN_GPIO2_2,
156 MFP_PIN_GPIO3_2,
157 MFP_PIN_GPIO4_2,
158 MFP_PIN_GPIO5_2,
159 MFP_PIN_GPIO6_2,
160 MFP_PIN_GPIO7_2,
161 MFP_PIN_GPIO8_2,
162 MFP_PIN_GPIO9_2,
163 MFP_PIN_GPIO10_2,
164 MFP_PIN_GPIO11_2,
165 MFP_PIN_GPIO12_2,
166 MFP_PIN_GPIO13_2,
167 MFP_PIN_GPIO14_2,
168 MFP_PIN_GPIO15_2,
169 MFP_PIN_GPIO16_2,
170 MFP_PIN_GPIO17_2,
171
172 MFP_PIN_ULPI_STP,
173 MFP_PIN_ULPI_NXT,
174 MFP_PIN_ULPI_DIR,
175
176 MFP_PIN_nXCVREN,
177 MFP_PIN_DF_CLE_nOE,
178 MFP_PIN_DF_nADV1_ALE,
179 MFP_PIN_DF_SCLK_E,
180 MFP_PIN_DF_SCLK_S,
181 MFP_PIN_nBE0,
182 MFP_PIN_nBE1,
183 MFP_PIN_DF_nADV2_ALE,
184 MFP_PIN_DF_INT_RnB,
185 MFP_PIN_DF_nCS0,
186 MFP_PIN_DF_nCS1,
187 MFP_PIN_nLUA,
188 MFP_PIN_nLLA,
189 MFP_PIN_DF_nWE,
190 MFP_PIN_DF_ALE_nWE,
191 MFP_PIN_DF_nRE_nOE,
192 MFP_PIN_DF_ADDR0,
193 MFP_PIN_DF_ADDR1,
194 MFP_PIN_DF_ADDR2,
195 MFP_PIN_DF_ADDR3,
196 MFP_PIN_DF_IO0,
197 MFP_PIN_DF_IO1,
198 MFP_PIN_DF_IO2,
199 MFP_PIN_DF_IO3,
200 MFP_PIN_DF_IO4,
201 MFP_PIN_DF_IO5,
202 MFP_PIN_DF_IO6,
203 MFP_PIN_DF_IO7,
204 MFP_PIN_DF_IO8,
205 MFP_PIN_DF_IO9,
206 MFP_PIN_DF_IO10,
207 MFP_PIN_DF_IO11,
208 MFP_PIN_DF_IO12,
209 MFP_PIN_DF_IO13,
210 MFP_PIN_DF_IO14,
211 MFP_PIN_DF_IO15,
212
213 /* additional pins on PXA930 */
214 MFP_PIN_GSIM_UIO,
215 MFP_PIN_GSIM_UCLK,
216 MFP_PIN_GSIM_UDET,
217 MFP_PIN_GSIM_nURST,
218 MFP_PIN_PMIC_INT,
219 MFP_PIN_RDY,
220
221 MFP_PIN_MAX,
222};
223
224/*
225 * a possible MFP configuration is represented by a 32-bit integer
226 *
227 * bit 0.. 9 - MFP Pin Number (1024 Pins Maximum)
228 * bit 10..12 - Alternate Function Selection
229 * bit 13..15 - Drive Strength
230 * bit 16..18 - Low Power Mode State
231 * bit 19..20 - Low Power Mode Edge Detection
232 * bit 21..22 - Run Mode Pull State
233 *
234 * to facilitate the definition, the following macros are provided
235 *
236 * MFP_CFG_DEFAULT - default MFP configuration value, with
237 * alternate function = 0,
238 * drive strength = fast 3mA (MFP_DS03X)
239 * low power mode = default
240 * edge detection = none
241 *
242 * MFP_CFG - default MFPR value with alternate function
243 * MFP_CFG_DRV - default MFPR value with alternate function and
244 * pin drive strength
245 * MFP_CFG_LPM - default MFPR value with alternate function and
246 * low power mode
247 * MFP_CFG_X - default MFPR value with alternate function,
248 * pin drive strength and low power mode
249 */
250
251typedef unsigned long mfp_cfg_t;
252
253#define MFP_PIN(x) ((x) & 0x3ff)
254
255#define MFP_AF0 (0x0 << 10)
256#define MFP_AF1 (0x1 << 10)
257#define MFP_AF2 (0x2 << 10)
258#define MFP_AF3 (0x3 << 10)
259#define MFP_AF4 (0x4 << 10)
260#define MFP_AF5 (0x5 << 10)
261#define MFP_AF6 (0x6 << 10)
262#define MFP_AF7 (0x7 << 10)
263#define MFP_AF_MASK (0x7 << 10)
264#define MFP_AF(x) (((x) >> 10) & 0x7)
265
266#define MFP_DS01X (0x0 << 13)
267#define MFP_DS02X (0x1 << 13)
268#define MFP_DS03X (0x2 << 13)
269#define MFP_DS04X (0x3 << 13)
270#define MFP_DS06X (0x4 << 13)
271#define MFP_DS08X (0x5 << 13)
272#define MFP_DS10X (0x6 << 13)
273#define MFP_DS13X (0x7 << 13)
274#define MFP_DS_MASK (0x7 << 13)
275#define MFP_DS(x) (((x) >> 13) & 0x7)
276
277#define MFP_LPM_DEFAULT (0x0 << 16)
278#define MFP_LPM_DRIVE_LOW (0x1 << 16)
279#define MFP_LPM_DRIVE_HIGH (0x2 << 16)
280#define MFP_LPM_PULL_LOW (0x3 << 16)
281#define MFP_LPM_PULL_HIGH (0x4 << 16)
282#define MFP_LPM_FLOAT (0x5 << 16)
283#define MFP_LPM_INPUT (0x6 << 16)
284#define MFP_LPM_STATE_MASK (0x7 << 16)
285#define MFP_LPM_STATE(x) (((x) >> 16) & 0x7)
286
287#define MFP_LPM_EDGE_NONE (0x0 << 19)
288#define MFP_LPM_EDGE_RISE (0x1 << 19)
289#define MFP_LPM_EDGE_FALL (0x2 << 19)
290#define MFP_LPM_EDGE_BOTH (0x3 << 19)
291#define MFP_LPM_EDGE_MASK (0x3 << 19)
292#define MFP_LPM_EDGE(x) (((x) >> 19) & 0x3)
293
294#define MFP_PULL_NONE (0x0 << 21)
295#define MFP_PULL_LOW (0x1 << 21)
296#define MFP_PULL_HIGH (0x2 << 21)
297#define MFP_PULL_BOTH (0x3 << 21)
298#define MFP_PULL_MASK (0x3 << 21)
299#define MFP_PULL(x) (((x) >> 21) & 0x3)
300
301#define MFP_CFG_DEFAULT (MFP_AF0 | MFP_DS03X | MFP_LPM_DEFAULT |\
302 MFP_LPM_EDGE_NONE | MFP_PULL_NONE)
303
304#define MFP_CFG(pin, af) \
305 ((MFP_CFG_DEFAULT & ~MFP_AF_MASK) |\
306 (MFP_PIN(MFP_PIN_##pin) | MFP_##af))
307
308#define MFP_CFG_DRV(pin, af, drv) \
309 ((MFP_CFG_DEFAULT & ~(MFP_AF_MASK | MFP_DS_MASK)) |\
310 (MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_##drv))
311
312#define MFP_CFG_LPM(pin, af, lpm) \
313 ((MFP_CFG_DEFAULT & ~(MFP_AF_MASK | MFP_LPM_STATE_MASK)) |\
314 (MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_LPM_##lpm))
315
316#define MFP_CFG_X(pin, af, drv, lpm) \
317 ((MFP_CFG_DEFAULT & ~(MFP_AF_MASK | MFP_DS_MASK | MFP_LPM_STATE_MASK)) |\
318 (MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_##drv | MFP_LPM_##lpm))
319 20
320#endif /* __ASM_ARCH_MFP_H */ 21#endif /* __ASM_ARCH_MFP_H */
diff --git a/arch/arm/mach-pxa/include/mach/mmc.h b/arch/arm/mach-pxa/include/mach/mmc.h
index 6d1304c9270f..02a69dc2ee63 100644
--- a/arch/arm/mach-pxa/include/mach/mmc.h
+++ b/arch/arm/mach-pxa/include/mach/mmc.h
@@ -14,6 +14,11 @@ struct pxamci_platform_data {
14 int (*get_ro)(struct device *); 14 int (*get_ro)(struct device *);
15 void (*setpower)(struct device *, unsigned int); 15 void (*setpower)(struct device *, unsigned int);
16 void (*exit)(struct device *, void *); 16 void (*exit)(struct device *, void *);
17 int gpio_card_detect; /* gpio detecting card insertion */
18 int gpio_card_ro; /* gpio detecting read only toggle */
19 bool gpio_card_ro_invert; /* gpio ro is inverted */
20 int gpio_power; /* gpio powering up MMC bus */
21 bool gpio_power_invert; /* gpio power is inverted */
17}; 22};
18 23
19extern void pxa_set_mci_info(struct pxamci_platform_data *info); 24extern void pxa_set_mci_info(struct pxamci_platform_data *info);
diff --git a/arch/arm/mach-pxa/include/mach/palmtc.h b/arch/arm/mach-pxa/include/mach/palmtc.h
new file mode 100644
index 000000000000..3dc9b074ab46
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/palmtc.h
@@ -0,0 +1,86 @@
1/*
2 * linux/include/asm-arm/arch-pxa/palmtc-gpio.h
3 *
4 * GPIOs and interrupts for Palm Tungsten|C Handheld Computer
5 *
6 * Authors: Alex Osborne <bobofdoom@gmail.com>
7 * Marek Vasut <marek.vasut@gmail.com>
8 * Holger Bocklet <bitz.email@gmx.net>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13 *
14 */
15
16#ifndef _INCLUDE_PALMTC_H_
17#define _INCLUDE_PALMTC_H_
18
19/** HERE ARE GPIOs **/
20
21/* GPIOs */
22#define GPIO_NR_PALMTC_EARPHONE_DETECT 2
23#define GPIO_NR_PALMTC_CRADLE_DETECT 5
24#define GPIO_NR_PALMTC_HOTSYNC_BUTTON 7
25
26/* SD/MMC */
27#define GPIO_NR_PALMTC_SD_DETECT_N 12
28#define GPIO_NR_PALMTC_SD_POWER 32
29#define GPIO_NR_PALMTC_SD_READONLY 54
30
31/* WLAN */
32#define GPIO_NR_PALMTC_PCMCIA_READY 13
33#define GPIO_NR_PALMTC_PCMCIA_PWRREADY 14
34#define GPIO_NR_PALMTC_PCMCIA_POWER1 15
35#define GPIO_NR_PALMTC_PCMCIA_POWER2 33
36#define GPIO_NR_PALMTC_PCMCIA_POWER3 55
37#define GPIO_NR_PALMTC_PCMCIA_RESET 78
38
39/* UDC */
40#define GPIO_NR_PALMTC_USB_DETECT_N 4
41#define GPIO_NR_PALMTC_USB_POWER 36
42
43/* LCD/BACKLIGHT */
44#define GPIO_NR_PALMTC_BL_POWER 16
45#define GPIO_NR_PALMTC_LCD_POWER 44
46#define GPIO_NR_PALMTC_LCD_BLANK 38
47
48/* UART */
49#define GPIO_NR_PALMTC_RS232_POWER 37
50
51/* IRDA */
52#define GPIO_NR_PALMTC_IR_DISABLE 45
53
54/* IRQs */
55#define IRQ_GPIO_PALMTC_SD_DETECT_N IRQ_GPIO(GPIO_NR_PALMTC_SD_DETECT_N)
56#define IRQ_GPIO_PALMTC_WLAN_READY IRQ_GPIO(GPIO_NR_PALMTC_WLAN_READY)
57
58/* UCB1400 GPIOs */
59#define GPIO_NR_PALMTC_POWER_DETECT (0x80 | 0x00)
60#define GPIO_NR_PALMTC_HEADPHONE_DETECT (0x80 | 0x01)
61#define GPIO_NR_PALMTC_SPEAKER_ENABLE (0x80 | 0x03)
62#define GPIO_NR_PALMTC_VIBRA_POWER (0x80 | 0x05)
63#define GPIO_NR_PALMTC_LED_POWER (0x80 | 0x07)
64
65/** HERE ARE INIT VALUES **/
66#define PALMTC_UCB1400_GPIO_OFFSET 0x80
67
68/* BATTERY */
69#define PALMTC_BAT_MAX_VOLTAGE 4000 /* 4.00V maximum voltage */
70#define PALMTC_BAT_MIN_VOLTAGE 3550 /* 3.55V critical voltage */
71#define PALMTC_BAT_MAX_CURRENT 0 /* unknokn */
72#define PALMTC_BAT_MIN_CURRENT 0 /* unknown */
73#define PALMTC_BAT_MAX_CHARGE 1 /* unknown */
74#define PALMTC_BAT_MIN_CHARGE 1 /* unknown */
75#define PALMTC_MAX_LIFE_MINS 240 /* on-life in minutes */
76
77#define PALMTC_BAT_MEASURE_DELAY (HZ * 1)
78
79/* BACKLIGHT */
80#define PALMTC_MAX_INTENSITY 0xFE
81#define PALMTC_DEFAULT_INTENSITY 0x7E
82#define PALMTC_LIMIT_MASK 0x7F
83#define PALMTC_PRESCALER 0x3F
84#define PALMTC_PERIOD_NS 3500
85
86#endif
diff --git a/arch/arm/mach-pxa/include/mach/palmtx.h b/arch/arm/mach-pxa/include/mach/palmtx.h
index e74082c872e1..1be0db6ed55e 100644
--- a/arch/arm/mach-pxa/include/mach/palmtx.h
+++ b/arch/arm/mach-pxa/include/mach/palmtx.h
@@ -82,6 +82,11 @@
82#define PALMTX_PHYS_FLASH_START PXA_CS0_PHYS /* ChipSelect 0 */ 82#define PALMTX_PHYS_FLASH_START PXA_CS0_PHYS /* ChipSelect 0 */
83#define PALMTX_PHYS_NAND_START PXA_CS1_PHYS /* ChipSelect 1 */ 83#define PALMTX_PHYS_NAND_START PXA_CS1_PHYS /* ChipSelect 1 */
84 84
85#define PALMTX_NAND_ALE_PHYS (PALMTX_PHYS_NAND_START | (1 << 24))
86#define PALMTX_NAND_CLE_PHYS (PALMTX_PHYS_NAND_START | (1 << 25))
87#define PALMTX_NAND_ALE_VIRT 0xff100000
88#define PALMTX_NAND_CLE_VIRT 0xff200000
89
85/* TOUCHSCREEN */ 90/* TOUCHSCREEN */
86#define AC97_LINK_FRAME 21 91#define AC97_LINK_FRAME 21
87 92
diff --git a/arch/arm/mach-pxa/include/mach/pxa3xx-regs.h b/arch/arm/mach-pxa/include/mach/pxa3xx-regs.h
index 7d1a059b3d43..e91d63cfe811 100644
--- a/arch/arm/mach-pxa/include/mach/pxa3xx-regs.h
+++ b/arch/arm/mach-pxa/include/mach/pxa3xx-regs.h
@@ -208,7 +208,7 @@
208#define CKEN_MVED 43 /* < MVED clock enable */ 208#define CKEN_MVED 43 /* < MVED clock enable */
209 209
210/* Note: GCU clock enable bit differs on PXA300/PXA310 and PXA320 */ 210/* Note: GCU clock enable bit differs on PXA300/PXA310 and PXA320 */
211#define PXA300_CKEN_GRAPHICS 42 /* Graphics controller clock enable */ 211#define CKEN_PXA300_GCU 42 /* Graphics controller clock enable */
212#define PXA320_CKEN_GRAPHICS 7 /* Graphics controller clock enable */ 212#define CKEN_PXA320_GCU 7 /* Graphics controller clock enable */
213 213
214#endif /* __ASM_ARCH_PXA3XX_REGS_H */ 214#endif /* __ASM_ARCH_PXA3XX_REGS_H */
diff --git a/arch/arm/mach-pxa/include/mach/pxafb.h b/arch/arm/mach-pxa/include/mach/pxafb.h
index 6932720ba04e..f73061c90b5e 100644
--- a/arch/arm/mach-pxa/include/mach/pxafb.h
+++ b/arch/arm/mach-pxa/include/mach/pxafb.h
@@ -118,7 +118,8 @@ struct pxafb_mach_info {
118 u_int fixed_modes:1, 118 u_int fixed_modes:1,
119 cmap_inverse:1, 119 cmap_inverse:1,
120 cmap_static:1, 120 cmap_static:1,
121 unused:29; 121 acceleration_enabled:1,
122 unused:28;
122 123
123 /* The following should be defined in LCCR0 124 /* The following should be defined in LCCR0
124 * LCCR0_Act or LCCR0_Pas Active or Passive 125 * LCCR0_Act or LCCR0_Pas Active or Passive
diff --git a/arch/arm/mach-pxa/include/mach/regs-intc.h b/arch/arm/mach-pxa/include/mach/regs-intc.h
index ad23e74b762f..68464ce1c1ea 100644
--- a/arch/arm/mach-pxa/include/mach/regs-intc.h
+++ b/arch/arm/mach-pxa/include/mach/regs-intc.h
@@ -13,6 +13,7 @@
13#define ICFP __REG(0x40D0000C) /* Interrupt Controller FIQ Pending Register */ 13#define ICFP __REG(0x40D0000C) /* Interrupt Controller FIQ Pending Register */
14#define ICPR __REG(0x40D00010) /* Interrupt Controller Pending Register */ 14#define ICPR __REG(0x40D00010) /* Interrupt Controller Pending Register */
15#define ICCR __REG(0x40D00014) /* Interrupt Controller Control Register */ 15#define ICCR __REG(0x40D00014) /* Interrupt Controller Control Register */
16#define ICHP __REG(0x40D00018) /* Interrupt Controller Highest Priority Register */
16 17
17#define ICIP2 __REG(0x40D0009C) /* Interrupt Controller IRQ Pending Register 2 */ 18#define ICIP2 __REG(0x40D0009C) /* Interrupt Controller IRQ Pending Register 2 */
18#define ICMR2 __REG(0x40D000A0) /* Interrupt Controller Mask Register 2 */ 19#define ICMR2 __REG(0x40D000A0) /* Interrupt Controller Mask Register 2 */
@@ -20,4 +21,14 @@
20#define ICFP2 __REG(0x40D000A8) /* Interrupt Controller FIQ Pending Register 2 */ 21#define ICFP2 __REG(0x40D000A8) /* Interrupt Controller FIQ Pending Register 2 */
21#define ICPR2 __REG(0x40D000AC) /* Interrupt Controller Pending Register 2 */ 22#define ICPR2 __REG(0x40D000AC) /* Interrupt Controller Pending Register 2 */
22 23
24#define ICIP3 __REG(0x40D00130) /* Interrupt Controller IRQ Pending Register 3 */
25#define ICMR3 __REG(0x40D00134) /* Interrupt Controller Mask Register 3 */
26#define ICLR3 __REG(0x40D00138) /* Interrupt Controller Level Register 3 */
27#define ICFP3 __REG(0x40D0013C) /* Interrupt Controller FIQ Pending Register 3 */
28#define ICPR3 __REG(0x40D00140) /* Interrupt Controller Pending Register 3 */
29
30#define IPR(x) __REG(0x40D0001C + (x < 32 ? (x << 2) \
31 : (x < 64 ? (0x94 + ((x - 32) << 2)) \
32 : (0x128 + ((x - 64) << 2)))))
33
23#endif /* __ASM_MACH_REGS_INTC_H */ 34#endif /* __ASM_MACH_REGS_INTC_H */
diff --git a/arch/arm/mach-pxa/include/mach/uncompress.h b/arch/arm/mach-pxa/include/mach/uncompress.h
index b54749413e96..237734b5b1be 100644
--- a/arch/arm/mach-pxa/include/mach/uncompress.h
+++ b/arch/arm/mach-pxa/include/mach/uncompress.h
@@ -37,7 +37,7 @@ static inline void arch_decomp_setup(void)
37{ 37{
38 if (machine_is_littleton() || machine_is_intelmote2() 38 if (machine_is_littleton() || machine_is_intelmote2()
39 || machine_is_csb726() || machine_is_stargate2() 39 || machine_is_csb726() || machine_is_stargate2()
40 || machine_is_cm_x300()) 40 || machine_is_cm_x300() || machine_is_balloon3())
41 UART = STUART; 41 UART = STUART;
42} 42}
43 43
diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c
index f6e0300e4f64..d694ce289668 100644
--- a/arch/arm/mach-pxa/irq.c
+++ b/arch/arm/mach-pxa/irq.c
@@ -120,7 +120,7 @@ static void __init pxa_init_low_gpio_irq(set_wake_t fn)
120 120
121void __init pxa_init_irq(int irq_nr, set_wake_t fn) 121void __init pxa_init_irq(int irq_nr, set_wake_t fn)
122{ 122{
123 int irq; 123 int irq, i;
124 124
125 pxa_internal_irq_nr = irq_nr; 125 pxa_internal_irq_nr = irq_nr;
126 126
@@ -129,6 +129,12 @@ void __init pxa_init_irq(int irq_nr, set_wake_t fn)
129 _ICLR(irq) = 0; /* all IRQs are IRQ, not FIQ */ 129 _ICLR(irq) = 0; /* all IRQs are IRQ, not FIQ */
130 } 130 }
131 131
132 /* initialize interrupt priority */
133 if (cpu_is_pxa27x() || cpu_is_pxa3xx()) {
134 for (i = 0; i < irq_nr; i++)
135 IPR(i) = i | (1 << 31);
136 }
137
132 /* only unmasked interrupts kick us out of idle */ 138 /* only unmasked interrupts kick us out of idle */
133 ICCR = 1; 139 ICCR = 1;
134 140
diff --git a/arch/arm/mach-pxa/littleton.c b/arch/arm/mach-pxa/littleton.c
index 55b3788fd1ae..13848955d133 100644
--- a/arch/arm/mach-pxa/littleton.c
+++ b/arch/arm/mach-pxa/littleton.c
@@ -265,45 +265,12 @@ static inline void littleton_init_keypad(void) {}
265#endif 265#endif
266 266
267#if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE) 267#if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE)
268static int littleton_mci_init(struct device *dev,
269 irq_handler_t littleton_detect_int, void *data)
270{
271 int err, gpio_cd = GPIO_MMC1_CARD_DETECT;
272
273 err = gpio_request(gpio_cd, "mmc card detect");
274 if (err)
275 goto err_request_cd;
276
277 gpio_direction_input(gpio_cd);
278
279 err = request_irq(gpio_to_irq(gpio_cd), littleton_detect_int,
280 IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
281 "mmc card detect", data);
282 if (err) {
283 dev_err(dev, "failed to request card detect IRQ\n");
284 goto err_request_irq;
285 }
286 return 0;
287
288err_request_irq:
289 gpio_free(gpio_cd);
290err_request_cd:
291 return err;
292}
293
294static void littleton_mci_exit(struct device *dev, void *data)
295{
296 int gpio_cd = GPIO_MMC1_CARD_DETECT;
297
298 free_irq(gpio_to_irq(gpio_cd), data);
299 gpio_free(gpio_cd);
300}
301
302static struct pxamci_platform_data littleton_mci_platform_data = { 268static struct pxamci_platform_data littleton_mci_platform_data = {
303 .detect_delay = 20, 269 .detect_delay = 20,
304 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, 270 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
305 .init = littleton_mci_init, 271 .gpio_card_detect = GPIO_MMC1_CARD_DETECT,
306 .exit = littleton_mci_exit, 272 .gpio_card_ro = -1,
273 .gpio_power = -1,
307}; 274};
308 275
309static void __init littleton_init_mmc(void) 276static void __init littleton_init_mmc(void)
diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c
index f04c8333dff7..c6a94d3fdd61 100644
--- a/arch/arm/mach-pxa/lubbock.c
+++ b/arch/arm/mach-pxa/lubbock.c
@@ -482,11 +482,14 @@ static void lubbock_mci_exit(struct device *dev, void *data)
482} 482}
483 483
484static struct pxamci_platform_data lubbock_mci_platform_data = { 484static struct pxamci_platform_data lubbock_mci_platform_data = {
485 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, 485 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
486 .detect_delay = 1, 486 .detect_delay = 1,
487 .init = lubbock_mci_init, 487 .init = lubbock_mci_init,
488 .get_ro = lubbock_mci_get_ro, 488 .get_ro = lubbock_mci_get_ro,
489 .exit = lubbock_mci_exit, 489 .exit = lubbock_mci_exit,
490 .gpio_card_detect = -1,
491 .gpio_card_ro = -1,
492 .gpio_power = -1,
490}; 493};
491 494
492static void lubbock_irda_transceiver_mode(struct device *dev, int mode) 495static void lubbock_irda_transceiver_mode(struct device *dev, int mode)
@@ -504,8 +507,9 @@ static void lubbock_irda_transceiver_mode(struct device *dev, int mode)
504} 507}
505 508
506static struct pxaficp_platform_data lubbock_ficp_platform_data = { 509static struct pxaficp_platform_data lubbock_ficp_platform_data = {
507 .transceiver_cap = IR_SIRMODE | IR_FIRMODE, 510 .gpio_pwdown = -1,
508 .transceiver_mode = lubbock_irda_transceiver_mode, 511 .transceiver_cap = IR_SIRMODE | IR_FIRMODE,
512 .transceiver_mode = lubbock_irda_transceiver_mode,
509}; 513};
510 514
511static void __init lubbock_init(void) 515static void __init lubbock_init(void)
diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c
index ca39669cffc5..5360c07f5138 100644
--- a/arch/arm/mach-pxa/magician.c
+++ b/arch/arm/mach-pxa/magician.c
@@ -140,15 +140,9 @@ static unsigned long magician_pin_config[] __initdata = {
140 * IRDA 140 * IRDA
141 */ 141 */
142 142
143static void magician_irda_transceiver_mode(struct device *dev, int mode)
144{
145 gpio_set_value(GPIO83_MAGICIAN_nIR_EN, mode & IR_OFF);
146 pxa2xx_transceiver_mode(dev, mode);
147}
148
149static struct pxaficp_platform_data magician_ficp_info = { 143static struct pxaficp_platform_data magician_ficp_info = {
150 .transceiver_cap = IR_SIRMODE | IR_OFF, 144 .gpio_pwdown = GPIO83_MAGICIAN_nIR_EN,
151 .transceiver_mode = magician_irda_transceiver_mode, 145 .transceiver_cap = IR_SIRMODE | IR_OFF,
152}; 146};
153 147
154/* 148/*
@@ -651,55 +645,24 @@ static struct platform_device bq24022 = {
651static int magician_mci_init(struct device *dev, 645static int magician_mci_init(struct device *dev,
652 irq_handler_t detect_irq, void *data) 646 irq_handler_t detect_irq, void *data)
653{ 647{
654 int err; 648 return request_irq(IRQ_MAGICIAN_SD, detect_irq,
655
656 err = request_irq(IRQ_MAGICIAN_SD, detect_irq,
657 IRQF_DISABLED | IRQF_SAMPLE_RANDOM, 649 IRQF_DISABLED | IRQF_SAMPLE_RANDOM,
658 "MMC card detect", data); 650 "mmc card detect", data);
659 if (err)
660 goto err_request_irq;
661 err = gpio_request(EGPIO_MAGICIAN_SD_POWER, "SD_POWER");
662 if (err)
663 goto err_request_power;
664 err = gpio_request(EGPIO_MAGICIAN_nSD_READONLY, "nSD_READONLY");
665 if (err)
666 goto err_request_readonly;
667
668 return 0;
669
670err_request_readonly:
671 gpio_free(EGPIO_MAGICIAN_SD_POWER);
672err_request_power:
673 free_irq(IRQ_MAGICIAN_SD, data);
674err_request_irq:
675 return err;
676}
677
678static void magician_mci_setpower(struct device *dev, unsigned int vdd)
679{
680 struct pxamci_platform_data *pdata = dev->platform_data;
681
682 gpio_set_value(EGPIO_MAGICIAN_SD_POWER, (1 << vdd) & pdata->ocr_mask);
683}
684
685static int magician_mci_get_ro(struct device *dev)
686{
687 return (!gpio_get_value(EGPIO_MAGICIAN_nSD_READONLY));
688} 651}
689 652
690static void magician_mci_exit(struct device *dev, void *data) 653static void magician_mci_exit(struct device *dev, void *data)
691{ 654{
692 gpio_free(EGPIO_MAGICIAN_nSD_READONLY);
693 gpio_free(EGPIO_MAGICIAN_SD_POWER);
694 free_irq(IRQ_MAGICIAN_SD, data); 655 free_irq(IRQ_MAGICIAN_SD, data);
695} 656}
696 657
697static struct pxamci_platform_data magician_mci_info = { 658static struct pxamci_platform_data magician_mci_info = {
698 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, 659 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
699 .init = magician_mci_init, 660 .init = magician_mci_init,
700 .get_ro = magician_mci_get_ro, 661 .exit = magician_mci_exit,
701 .setpower = magician_mci_setpower, 662 .gpio_card_detect = -1,
702 .exit = magician_mci_exit, 663 .gpio_card_ro = EGPIO_MAGICIAN_nSD_READONLY,
664 .gpio_card_ro_invert = 1,
665 .gpio_power = EGPIO_MAGICIAN_SD_POWER,
703}; 666};
704 667
705 668
diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c
index f4dabf0273ca..a4eeae345e64 100644
--- a/arch/arm/mach-pxa/mainstone.c
+++ b/arch/arm/mach-pxa/mainstone.c
@@ -450,10 +450,13 @@ static void mainstone_mci_exit(struct device *dev, void *data)
450} 450}
451 451
452static struct pxamci_platform_data mainstone_mci_platform_data = { 452static struct pxamci_platform_data mainstone_mci_platform_data = {
453 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, 453 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
454 .init = mainstone_mci_init, 454 .init = mainstone_mci_init,
455 .setpower = mainstone_mci_setpower, 455 .setpower = mainstone_mci_setpower,
456 .exit = mainstone_mci_exit, 456 .exit = mainstone_mci_exit,
457 .gpio_card_detect = -1,
458 .gpio_card_ro = -1,
459 .gpio_power = -1,
457}; 460};
458 461
459static void mainstone_irda_transceiver_mode(struct device *dev, int mode) 462static void mainstone_irda_transceiver_mode(struct device *dev, int mode)
@@ -476,8 +479,9 @@ static void mainstone_irda_transceiver_mode(struct device *dev, int mode)
476} 479}
477 480
478static struct pxaficp_platform_data mainstone_ficp_platform_data = { 481static struct pxaficp_platform_data mainstone_ficp_platform_data = {
479 .transceiver_cap = IR_SIRMODE | IR_FIRMODE | IR_OFF, 482 .gpio_pwdown = -1,
480 .transceiver_mode = mainstone_irda_transceiver_mode, 483 .transceiver_cap = IR_SIRMODE | IR_FIRMODE | IR_OFF,
484 .transceiver_mode = mainstone_irda_transceiver_mode,
481}; 485};
482 486
483static struct gpio_keys_button gpio_keys_button[] = { 487static struct gpio_keys_button gpio_keys_button[] = {
diff --git a/arch/arm/mach-pxa/mioa701.c b/arch/arm/mach-pxa/mioa701.c
index 2d28132c725b..3cab452e5567 100644
--- a/arch/arm/mach-pxa/mioa701.c
+++ b/arch/arm/mach-pxa/mioa701.c
@@ -434,72 +434,15 @@ struct gpio_vbus_mach_info gpio_vbus_data = {
434/* 434/*
435 * SDIO/MMC Card controller 435 * SDIO/MMC Card controller
436 */ 436 */
437static void mci_setpower(struct device *dev, unsigned int vdd)
438{
439 struct pxamci_platform_data *p_d = dev->platform_data;
440
441 if ((1 << vdd) & p_d->ocr_mask)
442 gpio_set_value(GPIO91_SDIO_EN, 1); /* enable SDIO power */
443 else
444 gpio_set_value(GPIO91_SDIO_EN, 0); /* disable SDIO power */
445}
446
447static int mci_get_ro(struct device *dev)
448{
449 return gpio_get_value(GPIO78_SDIO_RO);
450}
451
452struct gpio_ress mci_gpios[] = {
453 MIO_GPIO_IN(GPIO78_SDIO_RO, "SDIO readonly detect"),
454 MIO_GPIO_IN(GPIO15_SDIO_INSERT, "SDIO insertion detect"),
455 MIO_GPIO_OUT(GPIO91_SDIO_EN, 0, "SDIO power enable")
456};
457
458static void mci_exit(struct device *dev, void *data)
459{
460 mio_gpio_free(ARRAY_AND_SIZE(mci_gpios));
461 free_irq(gpio_to_irq(GPIO15_SDIO_INSERT), data);
462}
463
464static struct pxamci_platform_data mioa701_mci_info;
465
466/** 437/**
467 * The card detect interrupt isn't debounced so we delay it by 250ms 438 * The card detect interrupt isn't debounced so we delay it by 250ms
468 * to give the card a chance to fully insert/eject. 439 * to give the card a chance to fully insert/eject.
469 */ 440 */
470static int mci_init(struct device *dev, irq_handler_t detect_int, void *data)
471{
472 int rc;
473 int irq = gpio_to_irq(GPIO15_SDIO_INSERT);
474
475 rc = mio_gpio_request(ARRAY_AND_SIZE(mci_gpios));
476 if (rc)
477 goto err_gpio;
478 /* enable RE/FE interrupt on card insertion and removal */
479 rc = request_irq(irq, detect_int,
480 IRQF_DISABLED | IRQF_TRIGGER_RISING |
481 IRQF_TRIGGER_FALLING,
482 "MMC card detect", data);
483 if (rc)
484 goto err_irq;
485
486 mioa701_mci_info.detect_delay = msecs_to_jiffies(250);
487 return 0;
488
489err_irq:
490 dev_err(dev, "mioa701_mci_init: MMC/SD:"
491 " can't request MMC card detect IRQ\n");
492 mio_gpio_free(ARRAY_AND_SIZE(mci_gpios));
493err_gpio:
494 return rc;
495}
496
497static struct pxamci_platform_data mioa701_mci_info = { 441static struct pxamci_platform_data mioa701_mci_info = {
498 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, 442 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
499 .init = mci_init, 443 .gpio_card_detect = GPIO15_SDIO_INSERT,
500 .get_ro = mci_get_ro, 444 .gpio_card_ro = GPIO78_SDIO_RO,
501 .setpower = mci_setpower, 445 .gpio_power = GPIO91_SDIO_EN,
502 .exit = mci_exit,
503}; 446};
504 447
505/* FlashRAM */ 448/* FlashRAM */
@@ -765,19 +708,20 @@ static struct i2c_board_info __initdata mioa701_pi2c_devices[] = {
765 }, 708 },
766}; 709};
767 710
768static struct soc_camera_link iclink = {
769 .bus_id = 0, /* Must match id in pxa27x_device_camera in device.c */
770};
771
772/* Board I2C devices. */ 711/* Board I2C devices. */
773static struct i2c_board_info __initdata mioa701_i2c_devices[] = { 712static struct i2c_board_info __initdata mioa701_i2c_devices[] = {
774 { 713 {
775 /* Must initialize before the camera(s) */
776 I2C_BOARD_INFO("mt9m111", 0x5d), 714 I2C_BOARD_INFO("mt9m111", 0x5d),
777 .platform_data = &iclink,
778 }, 715 },
779}; 716};
780 717
718static struct soc_camera_link iclink = {
719 .bus_id = 0, /* Match id in pxa27x_device_camera in device.c */
720 .board_info = &mioa701_i2c_devices[0],
721 .i2c_adapter_id = 0,
722 .module_name = "mt9m111",
723};
724
781struct i2c_pxa_platform_data i2c_pdata = { 725struct i2c_pxa_platform_data i2c_pdata = {
782 .fast_mode = 1, 726 .fast_mode = 1,
783}; 727};
@@ -811,6 +755,7 @@ MIO_SIMPLE_DEV(pxa2xx_pcm, "pxa2xx-pcm", NULL)
811MIO_SIMPLE_DEV(mioa701_sound, "mioa701-wm9713", NULL) 755MIO_SIMPLE_DEV(mioa701_sound, "mioa701-wm9713", NULL)
812MIO_SIMPLE_DEV(mioa701_board, "mioa701-board", NULL) 756MIO_SIMPLE_DEV(mioa701_board, "mioa701-board", NULL)
813MIO_SIMPLE_DEV(gpio_vbus, "gpio-vbus", &gpio_vbus_data); 757MIO_SIMPLE_DEV(gpio_vbus, "gpio-vbus", &gpio_vbus_data);
758MIO_SIMPLE_DEV(mioa701_camera, "soc-camera-pdrv",&iclink);
814 759
815static struct platform_device *devices[] __initdata = { 760static struct platform_device *devices[] __initdata = {
816 &mioa701_gpio_keys, 761 &mioa701_gpio_keys,
@@ -821,6 +766,7 @@ static struct platform_device *devices[] __initdata = {
821 &power_dev, 766 &power_dev,
822 &strataflash, 767 &strataflash,
823 &gpio_vbus, 768 &gpio_vbus,
769 &mioa701_camera,
824 &mioa701_board, 770 &mioa701_board,
825}; 771};
826 772
@@ -841,7 +787,7 @@ static void mioa701_restart(char c, const char *cmd)
841static struct gpio_ress global_gpios[] = { 787static struct gpio_ress global_gpios[] = {
842 MIO_GPIO_OUT(GPIO9_CHARGE_EN, 1, "Charger enable"), 788 MIO_GPIO_OUT(GPIO9_CHARGE_EN, 1, "Charger enable"),
843 MIO_GPIO_OUT(GPIO18_POWEROFF, 0, "Power Off"), 789 MIO_GPIO_OUT(GPIO18_POWEROFF, 0, "Power Off"),
844 MIO_GPIO_OUT(GPIO87_LCD_POWER, 0, "LCD Power") 790 MIO_GPIO_OUT(GPIO87_LCD_POWER, 0, "LCD Power"),
845}; 791};
846 792
847static void __init mioa701_machine_init(void) 793static void __init mioa701_machine_init(void)
@@ -855,6 +801,7 @@ static void __init mioa701_machine_init(void)
855 mio_gpio_request(ARRAY_AND_SIZE(global_gpios)); 801 mio_gpio_request(ARRAY_AND_SIZE(global_gpios));
856 bootstrap_init(); 802 bootstrap_init();
857 set_pxa_fb_info(&mioa701_pxafb_info); 803 set_pxa_fb_info(&mioa701_pxafb_info);
804 mioa701_mci_info.detect_delay = msecs_to_jiffies(250);
858 pxa_set_mci_info(&mioa701_mci_info); 805 pxa_set_mci_info(&mioa701_mci_info);
859 pxa_set_keypad_info(&mioa701_keypad_info); 806 pxa_set_keypad_info(&mioa701_keypad_info);
860 wm97xx_bat_set_pdata(&mioa701_battery_data); 807 wm97xx_bat_set_pdata(&mioa701_battery_data);
@@ -869,7 +816,6 @@ static void __init mioa701_machine_init(void)
869 pxa_set_i2c_info(&i2c_pdata); 816 pxa_set_i2c_info(&i2c_pdata);
870 pxa27x_set_i2c_power_info(NULL); 817 pxa27x_set_i2c_power_info(NULL);
871 pxa_set_camera_info(&mioa701_pxacamera_platform_data); 818 pxa_set_camera_info(&mioa701_pxacamera_platform_data);
872 i2c_register_board_info(0, ARRAY_AND_SIZE(mioa701_i2c_devices));
873} 819}
874 820
875static void mioa701_machine_exit(void) 821static void mioa701_machine_exit(void)
diff --git a/arch/arm/mach-pxa/palmld.c b/arch/arm/mach-pxa/palmld.c
index 169fcc18154e..1ad029dd4438 100644
--- a/arch/arm/mach-pxa/palmld.c
+++ b/arch/arm/mach-pxa/palmld.c
@@ -25,6 +25,9 @@
25#include <linux/wm97xx_batt.h> 25#include <linux/wm97xx_batt.h>
26#include <linux/power_supply.h> 26#include <linux/power_supply.h>
27#include <linux/sysdev.h> 27#include <linux/sysdev.h>
28#include <linux/mtd/mtd.h>
29#include <linux/mtd/partitions.h>
30#include <linux/mtd/physmap.h>
28 31
29#include <asm/mach-types.h> 32#include <asm/mach-types.h>
30#include <asm/mach/arch.h> 33#include <asm/mach/arch.h>
@@ -141,85 +144,50 @@ static unsigned long palmld_pin_config[] __initdata = {
141}; 144};
142 145
143/****************************************************************************** 146/******************************************************************************
144 * SD/MMC card controller 147 * NOR Flash
145 ******************************************************************************/ 148 ******************************************************************************/
146static int palmld_mci_init(struct device *dev, irq_handler_t palmld_detect_int, 149static struct mtd_partition palmld_partitions[] = {
147 void *data) 150 {
148{ 151 .name = "Flash",
149 int err = 0; 152 .offset = 0x00000000,
150 153 .size = MTDPART_SIZ_FULL,
151 /* Setup an interrupt for detecting card insert/remove events */ 154 .mask_flags = 0
152 err = gpio_request(GPIO_NR_PALMLD_SD_DETECT_N, "SD IRQ");
153 if (err)
154 goto err;
155 err = gpio_direction_input(GPIO_NR_PALMLD_SD_DETECT_N);
156 if (err)
157 goto err2;
158 err = request_irq(gpio_to_irq(GPIO_NR_PALMLD_SD_DETECT_N),
159 palmld_detect_int, IRQF_DISABLED | IRQF_SAMPLE_RANDOM |
160 IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
161 "SD/MMC card detect", data);
162 if (err) {
163 printk(KERN_ERR "%s: cannot request SD/MMC card detect IRQ\n",
164 __func__);
165 goto err2;
166 } 155 }
156};
167 157
168 err = gpio_request(GPIO_NR_PALMLD_SD_POWER, "SD_POWER"); 158static struct physmap_flash_data palmld_flash_data[] = {
169 if (err) 159 {
170 goto err3; 160 .width = 2, /* bankwidth in bytes */
171 err = gpio_direction_output(GPIO_NR_PALMLD_SD_POWER, 0); 161 .parts = palmld_partitions,
172 if (err) 162 .nr_parts = ARRAY_SIZE(palmld_partitions)
173 goto err4; 163 }
174 164};
175 err = gpio_request(GPIO_NR_PALMLD_SD_READONLY, "SD_READONLY");
176 if (err)
177 goto err4;
178 err = gpio_direction_input(GPIO_NR_PALMLD_SD_READONLY);
179 if (err)
180 goto err5;
181
182 printk(KERN_DEBUG "%s: irq registered\n", __func__);
183
184 return 0;
185
186err5:
187 gpio_free(GPIO_NR_PALMLD_SD_READONLY);
188err4:
189 gpio_free(GPIO_NR_PALMLD_SD_POWER);
190err3:
191 free_irq(gpio_to_irq(GPIO_NR_PALMLD_SD_DETECT_N), data);
192err2:
193 gpio_free(GPIO_NR_PALMLD_SD_DETECT_N);
194err:
195 return err;
196}
197
198static void palmld_mci_exit(struct device *dev, void *data)
199{
200 gpio_free(GPIO_NR_PALMLD_SD_READONLY);
201 gpio_free(GPIO_NR_PALMLD_SD_POWER);
202 free_irq(gpio_to_irq(GPIO_NR_PALMLD_SD_DETECT_N), data);
203 gpio_free(GPIO_NR_PALMLD_SD_DETECT_N);
204}
205 165
206static void palmld_mci_power(struct device *dev, unsigned int vdd) 166static struct resource palmld_flash_resource = {
207{ 167 .start = PXA_CS0_PHYS,
208 struct pxamci_platform_data *p_d = dev->platform_data; 168 .end = PXA_CS0_PHYS + SZ_4M - 1,
209 gpio_set_value(GPIO_NR_PALMLD_SD_POWER, p_d->ocr_mask & (1 << vdd)); 169 .flags = IORESOURCE_MEM,
210} 170};
211 171
212static int palmld_mci_get_ro(struct device *dev) 172static struct platform_device palmld_flash = {
213{ 173 .name = "physmap-flash",
214 return gpio_get_value(GPIO_NR_PALMLD_SD_READONLY); 174 .id = 0,
215} 175 .resource = &palmld_flash_resource,
176 .num_resources = 1,
177 .dev = {
178 .platform_data = palmld_flash_data,
179 },
180};
216 181
182/******************************************************************************
183 * SD/MMC card controller
184 ******************************************************************************/
217static struct pxamci_platform_data palmld_mci_platform_data = { 185static struct pxamci_platform_data palmld_mci_platform_data = {
218 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, 186 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
219 .setpower = palmld_mci_power, 187 .gpio_card_detect = GPIO_NR_PALMLD_SD_DETECT_N,
220 .get_ro = palmld_mci_get_ro, 188 .gpio_card_ro = GPIO_NR_PALMLD_SD_READONLY,
221 .init = palmld_mci_init, 189 .gpio_power = GPIO_NR_PALMLD_SD_POWER,
222 .exit = palmld_mci_exit, 190 .detect_delay = 20,
223}; 191};
224 192
225/****************************************************************************** 193/******************************************************************************
@@ -336,35 +304,9 @@ static struct platform_device palmld_backlight = {
336/****************************************************************************** 304/******************************************************************************
337 * IrDA 305 * IrDA
338 ******************************************************************************/ 306 ******************************************************************************/
339static int palmld_irda_startup(struct device *dev)
340{
341 int err;
342 err = gpio_request(GPIO_NR_PALMLD_IR_DISABLE, "IR DISABLE");
343 if (err)
344 goto err;
345 err = gpio_direction_output(GPIO_NR_PALMLD_IR_DISABLE, 1);
346 if (err)
347 gpio_free(GPIO_NR_PALMLD_IR_DISABLE);
348err:
349 return err;
350}
351
352static void palmld_irda_shutdown(struct device *dev)
353{
354 gpio_free(GPIO_NR_PALMLD_IR_DISABLE);
355}
356
357static void palmld_irda_transceiver_mode(struct device *dev, int mode)
358{
359 gpio_set_value(GPIO_NR_PALMLD_IR_DISABLE, mode & IR_OFF);
360 pxa2xx_transceiver_mode(dev, mode);
361}
362
363static struct pxaficp_platform_data palmld_ficp_platform_data = { 307static struct pxaficp_platform_data palmld_ficp_platform_data = {
364 .startup = palmld_irda_startup, 308 .gpio_pwdown = GPIO_NR_PALMLD_IR_DISABLE,
365 .shutdown = palmld_irda_shutdown, 309 .transceiver_cap = IR_SIRMODE | IR_OFF,
366 .transceiver_cap = IR_SIRMODE | IR_FIRMODE | IR_OFF,
367 .transceiver_mode = palmld_irda_transceiver_mode,
368}; 310};
369 311
370/****************************************************************************** 312/******************************************************************************
@@ -560,6 +502,7 @@ static struct platform_device *devices[] __initdata = {
560 &power_supply, 502 &power_supply,
561 &palmld_asoc, 503 &palmld_asoc,
562 &palmld_hdd, 504 &palmld_hdd,
505 &palmld_flash,
563}; 506};
564 507
565static struct map_desc palmld_io_desc[] __initdata = { 508static struct map_desc palmld_io_desc[] __initdata = {
diff --git a/arch/arm/mach-pxa/palmt5.c b/arch/arm/mach-pxa/palmt5.c
index 33f726ff55e5..2dd7ce28556b 100644
--- a/arch/arm/mach-pxa/palmt5.c
+++ b/arch/arm/mach-pxa/palmt5.c
@@ -124,83 +124,12 @@ static unsigned long palmt5_pin_config[] __initdata = {
124/****************************************************************************** 124/******************************************************************************
125 * SD/MMC card controller 125 * SD/MMC card controller
126 ******************************************************************************/ 126 ******************************************************************************/
127static int palmt5_mci_init(struct device *dev, irq_handler_t palmt5_detect_int,
128 void *data)
129{
130 int err = 0;
131
132 /* Setup an interrupt for detecting card insert/remove events */
133 err = gpio_request(GPIO_NR_PALMT5_SD_DETECT_N, "SD IRQ");
134 if (err)
135 goto err;
136 err = gpio_direction_input(GPIO_NR_PALMT5_SD_DETECT_N);
137 if (err)
138 goto err2;
139 err = request_irq(gpio_to_irq(GPIO_NR_PALMT5_SD_DETECT_N),
140 palmt5_detect_int, IRQF_DISABLED | IRQF_SAMPLE_RANDOM |
141 IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
142 "SD/MMC card detect", data);
143 if (err) {
144 printk(KERN_ERR "%s: cannot request SD/MMC card detect IRQ\n",
145 __func__);
146 goto err2;
147 }
148
149 err = gpio_request(GPIO_NR_PALMT5_SD_POWER, "SD_POWER");
150 if (err)
151 goto err3;
152 err = gpio_direction_output(GPIO_NR_PALMT5_SD_POWER, 0);
153 if (err)
154 goto err4;
155
156 err = gpio_request(GPIO_NR_PALMT5_SD_READONLY, "SD_READONLY");
157 if (err)
158 goto err4;
159 err = gpio_direction_input(GPIO_NR_PALMT5_SD_READONLY);
160 if (err)
161 goto err5;
162
163 printk(KERN_DEBUG "%s: irq registered\n", __func__);
164
165 return 0;
166
167err5:
168 gpio_free(GPIO_NR_PALMT5_SD_READONLY);
169err4:
170 gpio_free(GPIO_NR_PALMT5_SD_POWER);
171err3:
172 free_irq(gpio_to_irq(GPIO_NR_PALMT5_SD_DETECT_N), data);
173err2:
174 gpio_free(GPIO_NR_PALMT5_SD_DETECT_N);
175err:
176 return err;
177}
178
179static void palmt5_mci_exit(struct device *dev, void *data)
180{
181 gpio_free(GPIO_NR_PALMT5_SD_READONLY);
182 gpio_free(GPIO_NR_PALMT5_SD_POWER);
183 free_irq(IRQ_GPIO_PALMT5_SD_DETECT_N, data);
184 gpio_free(GPIO_NR_PALMT5_SD_DETECT_N);
185}
186
187static void palmt5_mci_power(struct device *dev, unsigned int vdd)
188{
189 struct pxamci_platform_data *p_d = dev->platform_data;
190 gpio_set_value(GPIO_NR_PALMT5_SD_POWER, p_d->ocr_mask & (1 << vdd));
191}
192
193static int palmt5_mci_get_ro(struct device *dev)
194{
195 return gpio_get_value(GPIO_NR_PALMT5_SD_READONLY);
196}
197
198static struct pxamci_platform_data palmt5_mci_platform_data = { 127static struct pxamci_platform_data palmt5_mci_platform_data = {
199 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, 128 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
200 .setpower = palmt5_mci_power, 129 .gpio_card_detect = GPIO_NR_PALMT5_SD_DETECT_N,
201 .get_ro = palmt5_mci_get_ro, 130 .gpio_card_ro = GPIO_NR_PALMT5_SD_READONLY,
202 .init = palmt5_mci_init, 131 .gpio_power = GPIO_NR_PALMT5_SD_POWER,
203 .exit = palmt5_mci_exit, 132 .detect_delay = 20,
204}; 133};
205 134
206/****************************************************************************** 135/******************************************************************************
@@ -314,35 +243,9 @@ static struct platform_device palmt5_backlight = {
314/****************************************************************************** 243/******************************************************************************
315 * IrDA 244 * IrDA
316 ******************************************************************************/ 245 ******************************************************************************/
317static int palmt5_irda_startup(struct device *dev)
318{
319 int err;
320 err = gpio_request(GPIO_NR_PALMT5_IR_DISABLE, "IR DISABLE");
321 if (err)
322 goto err;
323 err = gpio_direction_output(GPIO_NR_PALMT5_IR_DISABLE, 1);
324 if (err)
325 gpio_free(GPIO_NR_PALMT5_IR_DISABLE);
326err:
327 return err;
328}
329
330static void palmt5_irda_shutdown(struct device *dev)
331{
332 gpio_free(GPIO_NR_PALMT5_IR_DISABLE);
333}
334
335static void palmt5_irda_transceiver_mode(struct device *dev, int mode)
336{
337 gpio_set_value(GPIO_NR_PALMT5_IR_DISABLE, mode & IR_OFF);
338 pxa2xx_transceiver_mode(dev, mode);
339}
340
341static struct pxaficp_platform_data palmt5_ficp_platform_data = { 246static struct pxaficp_platform_data palmt5_ficp_platform_data = {
342 .startup = palmt5_irda_startup, 247 .gpio_pwdown = GPIO_NR_PALMT5_IR_DISABLE,
343 .shutdown = palmt5_irda_shutdown, 248 .transceiver_cap = IR_SIRMODE | IR_OFF,
344 .transceiver_cap = IR_SIRMODE | IR_FIRMODE | IR_OFF,
345 .transceiver_mode = palmt5_irda_transceiver_mode,
346}; 249};
347 250
348/****************************************************************************** 251/******************************************************************************
diff --git a/arch/arm/mach-pxa/palmtc.c b/arch/arm/mach-pxa/palmtc.c
new file mode 100644
index 000000000000..bb2cc0dd44ec
--- /dev/null
+++ b/arch/arm/mach-pxa/palmtc.c
@@ -0,0 +1,436 @@
1/*
2 * linux/arch/arm/mach-pxa/palmtc.c
3 *
4 * Support for the Palm Tungsten|C
5 *
6 * Author: Marek Vasut <marek.vasut@gmail.com>
7 *
8 * Based on work of:
9 * Petr Blaha <p3t3@centrum.cz>
10 * Chetan S. Kumar <shivakumar.chetan@gmail.com>
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation.
15 */
16
17#include <linux/platform_device.h>
18#include <linux/delay.h>
19#include <linux/irq.h>
20#include <linux/input.h>
21#include <linux/pwm_backlight.h>
22#include <linux/gpio.h>
23#include <linux/input/matrix_keypad.h>
24#include <linux/ucb1400.h>
25#include <linux/power_supply.h>
26#include <linux/gpio_keys.h>
27#include <linux/mtd/physmap.h>
28
29#include <asm/mach-types.h>
30#include <asm/mach/arch.h>
31#include <asm/mach/map.h>
32
33#include <mach/audio.h>
34#include <mach/palmtc.h>
35#include <mach/mmc.h>
36#include <mach/pxafb.h>
37#include <mach/mfp-pxa25x.h>
38#include <mach/irda.h>
39#include <mach/udc.h>
40#include <mach/pxa2xx-regs.h>
41
42#include "generic.h"
43#include "devices.h"
44
45/******************************************************************************
46 * Pin configuration
47 ******************************************************************************/
48static unsigned long palmtc_pin_config[] __initdata = {
49 /* MMC */
50 GPIO6_MMC_CLK,
51 GPIO8_MMC_CS0,
52 GPIO12_GPIO, /* detect */
53 GPIO32_GPIO, /* power */
54 GPIO54_GPIO, /* r/o switch */
55
56 /* PCMCIA */
57 GPIO52_nPCE_1,
58 GPIO53_nPCE_2,
59 GPIO50_nPIOR,
60 GPIO51_nPIOW,
61 GPIO49_nPWE,
62 GPIO48_nPOE,
63 GPIO52_nPCE_1,
64 GPIO53_nPCE_2,
65 GPIO57_nIOIS16,
66 GPIO56_nPWAIT,
67
68 /* AC97 */
69 GPIO28_AC97_BITCLK,
70 GPIO29_AC97_SDATA_IN_0,
71 GPIO30_AC97_SDATA_OUT,
72 GPIO31_AC97_SYNC,
73
74 /* IrDA */
75 GPIO45_GPIO, /* ir disable */
76 GPIO46_FICP_RXD,
77 GPIO47_FICP_TXD,
78
79 /* PWM */
80 GPIO17_PWM1_OUT,
81
82 /* USB */
83 GPIO4_GPIO, /* detect */
84 GPIO36_GPIO, /* pullup */
85
86 /* LCD */
87 GPIO58_LCD_LDD_0,
88 GPIO59_LCD_LDD_1,
89 GPIO60_LCD_LDD_2,
90 GPIO61_LCD_LDD_3,
91 GPIO62_LCD_LDD_4,
92 GPIO63_LCD_LDD_5,
93 GPIO64_LCD_LDD_6,
94 GPIO65_LCD_LDD_7,
95 GPIO66_LCD_LDD_8,
96 GPIO67_LCD_LDD_9,
97 GPIO68_LCD_LDD_10,
98 GPIO69_LCD_LDD_11,
99 GPIO70_LCD_LDD_12,
100 GPIO71_LCD_LDD_13,
101 GPIO72_LCD_LDD_14,
102 GPIO73_LCD_LDD_15,
103 GPIO74_LCD_FCLK,
104 GPIO75_LCD_LCLK,
105 GPIO76_LCD_PCLK,
106 GPIO77_LCD_BIAS,
107
108 /* MATRIX KEYPAD */
109 GPIO0_GPIO | WAKEUP_ON_EDGE_BOTH, /* in 0 */
110 GPIO9_GPIO | WAKEUP_ON_EDGE_BOTH, /* in 1 */
111 GPIO10_GPIO | WAKEUP_ON_EDGE_BOTH, /* in 2 */
112 GPIO11_GPIO | WAKEUP_ON_EDGE_BOTH, /* in 3 */
113 GPIO18_GPIO | MFP_LPM_DRIVE_LOW, /* out 0 */
114 GPIO19_GPIO | MFP_LPM_DRIVE_LOW, /* out 1 */
115 GPIO20_GPIO | MFP_LPM_DRIVE_LOW, /* out 2 */
116 GPIO21_GPIO | MFP_LPM_DRIVE_LOW, /* out 3 */
117 GPIO22_GPIO | MFP_LPM_DRIVE_LOW, /* out 4 */
118 GPIO23_GPIO | MFP_LPM_DRIVE_LOW, /* out 5 */
119 GPIO24_GPIO | MFP_LPM_DRIVE_LOW, /* out 6 */
120 GPIO25_GPIO | MFP_LPM_DRIVE_LOW, /* out 7 */
121 GPIO26_GPIO | MFP_LPM_DRIVE_LOW, /* out 8 */
122 GPIO27_GPIO | MFP_LPM_DRIVE_LOW, /* out 9 */
123 GPIO79_GPIO | MFP_LPM_DRIVE_LOW, /* out 10 */
124 GPIO80_GPIO | MFP_LPM_DRIVE_LOW, /* out 11 */
125
126 /* PXA GPIO KEYS */
127 GPIO7_GPIO | WAKEUP_ON_EDGE_BOTH, /* hotsync button on cradle */
128
129 /* MISC */
130 GPIO1_RST, /* reset */
131 GPIO2_GPIO, /* earphone detect */
132 GPIO16_GPIO, /* backlight switch */
133};
134
135/******************************************************************************
136 * SD/MMC card controller
137 ******************************************************************************/
138static struct pxamci_platform_data palmtc_mci_platform_data = {
139 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
140 .gpio_power = GPIO_NR_PALMTC_SD_POWER,
141 .gpio_card_ro = GPIO_NR_PALMTC_SD_READONLY,
142 .gpio_card_detect = GPIO_NR_PALMTC_SD_DETECT_N,
143 .detect_delay = 20,
144};
145
146/******************************************************************************
147 * GPIO keys
148 ******************************************************************************/
149static struct gpio_keys_button palmtc_pxa_buttons[] = {
150 {KEY_F8, GPIO_NR_PALMTC_HOTSYNC_BUTTON, 1, "HotSync Button", EV_KEY, 1},
151};
152
153static struct gpio_keys_platform_data palmtc_pxa_keys_data = {
154 .buttons = palmtc_pxa_buttons,
155 .nbuttons = ARRAY_SIZE(palmtc_pxa_buttons),
156};
157
158static struct platform_device palmtc_pxa_keys = {
159 .name = "gpio-keys",
160 .id = -1,
161 .dev = {
162 .platform_data = &palmtc_pxa_keys_data,
163 },
164};
165
166/******************************************************************************
167 * Backlight
168 ******************************************************************************/
169static int palmtc_backlight_init(struct device *dev)
170{
171 int ret;
172
173 ret = gpio_request(GPIO_NR_PALMTC_BL_POWER, "BL POWER");
174 if (ret)
175 goto err;
176 ret = gpio_direction_output(GPIO_NR_PALMTC_BL_POWER, 1);
177 if (ret)
178 goto err2;
179
180 return 0;
181
182err2:
183 gpio_free(GPIO_NR_PALMTC_BL_POWER);
184err:
185 return ret;
186}
187
188static int palmtc_backlight_notify(int brightness)
189{
190 /* backlight is on when GPIO16 AF0 is high */
191 gpio_set_value(GPIO_NR_PALMTC_BL_POWER, brightness);
192 return brightness;
193}
194
195static void palmtc_backlight_exit(struct device *dev)
196{
197 gpio_free(GPIO_NR_PALMTC_BL_POWER);
198}
199
200static struct platform_pwm_backlight_data palmtc_backlight_data = {
201 .pwm_id = 1,
202 .max_brightness = PALMTC_MAX_INTENSITY,
203 .dft_brightness = PALMTC_MAX_INTENSITY,
204 .pwm_period_ns = PALMTC_PERIOD_NS,
205 .init = palmtc_backlight_init,
206 .notify = palmtc_backlight_notify,
207 .exit = palmtc_backlight_exit,
208};
209
210static struct platform_device palmtc_backlight = {
211 .name = "pwm-backlight",
212 .dev = {
213 .parent = &pxa25x_device_pwm1.dev,
214 .platform_data = &palmtc_backlight_data,
215 },
216};
217
218/******************************************************************************
219 * IrDA
220 ******************************************************************************/
221static struct pxaficp_platform_data palmtc_ficp_platform_data = {
222 .gpio_pwdown = GPIO_NR_PALMTC_IR_DISABLE,
223 .transceiver_cap = IR_SIRMODE | IR_OFF,
224};
225
226/******************************************************************************
227 * Keyboard
228 ******************************************************************************/
229static const uint32_t palmtc_matrix_keys[] = {
230 KEY(0, 0, KEY_F1),
231 KEY(0, 1, KEY_X),
232 KEY(0, 2, KEY_POWER),
233 KEY(0, 3, KEY_TAB),
234 KEY(0, 4, KEY_A),
235 KEY(0, 5, KEY_Q),
236 KEY(0, 6, KEY_LEFTSHIFT),
237 KEY(0, 7, KEY_Z),
238 KEY(0, 8, KEY_S),
239 KEY(0, 9, KEY_W),
240 KEY(0, 10, KEY_E),
241 KEY(0, 11, KEY_UP),
242
243 KEY(1, 0, KEY_F2),
244 KEY(1, 1, KEY_DOWN),
245 KEY(1, 3, KEY_D),
246 KEY(1, 4, KEY_C),
247 KEY(1, 5, KEY_F),
248 KEY(1, 6, KEY_R),
249 KEY(1, 7, KEY_SPACE),
250 KEY(1, 8, KEY_V),
251 KEY(1, 9, KEY_G),
252 KEY(1, 10, KEY_T),
253 KEY(1, 11, KEY_LEFT),
254
255 KEY(2, 0, KEY_F3),
256 KEY(2, 1, KEY_LEFTCTRL),
257 KEY(2, 3, KEY_H),
258 KEY(2, 4, KEY_Y),
259 KEY(2, 5, KEY_N),
260 KEY(2, 6, KEY_J),
261 KEY(2, 7, KEY_U),
262 KEY(2, 8, KEY_M),
263 KEY(2, 9, KEY_K),
264 KEY(2, 10, KEY_I),
265 KEY(2, 11, KEY_RIGHT),
266
267 KEY(3, 0, KEY_F4),
268 KEY(3, 1, KEY_ENTER),
269 KEY(3, 3, KEY_DOT),
270 KEY(3, 4, KEY_L),
271 KEY(3, 5, KEY_O),
272 KEY(3, 6, KEY_LEFTALT),
273 KEY(3, 7, KEY_ENTER),
274 KEY(3, 8, KEY_BACKSPACE),
275 KEY(3, 9, KEY_P),
276 KEY(3, 10, KEY_B),
277 KEY(3, 11, KEY_FN),
278};
279
280const struct matrix_keymap_data palmtc_keymap_data = {
281 .keymap = palmtc_matrix_keys,
282 .keymap_size = ARRAY_SIZE(palmtc_matrix_keys),
283};
284
285const static unsigned int palmtc_keypad_row_gpios[] = {
286 0, 9, 10, 11
287};
288
289const static unsigned int palmtc_keypad_col_gpios[] = {
290 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 79, 80
291};
292
293static struct matrix_keypad_platform_data palmtc_keypad_platform_data = {
294 .keymap_data = &palmtc_keymap_data,
295 .col_gpios = palmtc_keypad_row_gpios,
296 .num_col_gpios = 12,
297 .row_gpios = palmtc_keypad_col_gpios,
298 .num_row_gpios = 4,
299 .active_low = 1,
300
301 .debounce_ms = 20,
302 .col_scan_delay_us = 5,
303};
304
305static struct platform_device palmtc_keyboard = {
306 .name = "matrix-keypad",
307 .id = -1,
308 .dev = {
309 .platform_data = &palmtc_keypad_platform_data,
310 },
311};
312
313/******************************************************************************
314 * UDC
315 ******************************************************************************/
316static struct pxa2xx_udc_mach_info palmtc_udc_info __initdata = {
317 .gpio_vbus = GPIO_NR_PALMTC_USB_DETECT_N,
318 .gpio_vbus_inverted = 1,
319 .gpio_pullup = GPIO_NR_PALMTC_USB_POWER,
320};
321
322/******************************************************************************
323 * Touchscreen / Battery / GPIO-extender
324 ******************************************************************************/
325static struct platform_device palmtc_ucb1400_core = {
326 .name = "ucb1400_core",
327 .id = -1,
328};
329
330/******************************************************************************
331 * NOR Flash
332 ******************************************************************************/
333static struct resource palmtc_flash_resource = {
334 .start = PXA_CS0_PHYS,
335 .end = PXA_CS0_PHYS + SZ_16M - 1,
336 .flags = IORESOURCE_MEM,
337};
338
339static struct mtd_partition palmtc_flash_parts[] = {
340 {
341 .name = "U-Boot Bootloader",
342 .offset = 0x0,
343 .size = 0x40000,
344 },
345 {
346 .name = "Linux Kernel",
347 .offset = 0x40000,
348 .size = 0x2c0000,
349 },
350 {
351 .name = "Filesystem",
352 .offset = 0x300000,
353 .size = 0xcc0000,
354 },
355 {
356 .name = "U-Boot Environment",
357 .offset = 0xfc0000,
358 .size = MTDPART_SIZ_FULL,
359 },
360};
361
362static struct physmap_flash_data palmtc_flash_data = {
363 .width = 4,
364 .parts = palmtc_flash_parts,
365 .nr_parts = ARRAY_SIZE(palmtc_flash_parts),
366};
367
368static struct platform_device palmtc_flash = {
369 .name = "physmap-flash",
370 .id = -1,
371 .resource = &palmtc_flash_resource,
372 .num_resources = 1,
373 .dev = {
374 .platform_data = &palmtc_flash_data,
375 },
376};
377
378/******************************************************************************
379 * Framebuffer
380 ******************************************************************************/
381static struct pxafb_mode_info palmtc_lcd_modes[] = {
382{
383 .pixclock = 115384,
384 .xres = 320,
385 .yres = 320,
386 .bpp = 16,
387
388 .left_margin = 27,
389 .right_margin = 7,
390 .upper_margin = 7,
391 .lower_margin = 8,
392
393 .hsync_len = 6,
394 .vsync_len = 1,
395},
396};
397
398static struct pxafb_mach_info palmtc_lcd_screen = {
399 .modes = palmtc_lcd_modes,
400 .num_modes = ARRAY_SIZE(palmtc_lcd_modes),
401 .lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL,
402};
403
404/******************************************************************************
405 * Machine init
406 ******************************************************************************/
407static struct platform_device *devices[] __initdata = {
408 &palmtc_backlight,
409 &palmtc_ucb1400_core,
410 &palmtc_keyboard,
411 &palmtc_pxa_keys,
412 &palmtc_flash,
413};
414
415static void __init palmtc_init(void)
416{
417 pxa2xx_mfp_config(ARRAY_AND_SIZE(palmtc_pin_config));
418
419 set_pxa_fb_info(&palmtc_lcd_screen);
420 pxa_set_mci_info(&palmtc_mci_platform_data);
421 pxa_set_udc_info(&palmtc_udc_info);
422 pxa_set_ac97_info(NULL);
423 pxa_set_ficp_info(&palmtc_ficp_platform_data);
424
425 platform_add_devices(devices, ARRAY_SIZE(devices));
426};
427
428MACHINE_START(PALMTC, "Palm Tungsten|C")
429 .phys_io = 0x40000000,
430 .boot_params = 0xa0000100,
431 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
432 .map_io = pxa_map_io,
433 .init_irq = pxa25x_init_irq,
434 .timer = &pxa_timer,
435 .init_machine = palmtc_init
436MACHINE_END
diff --git a/arch/arm/mach-pxa/palmte2.c b/arch/arm/mach-pxa/palmte2.c
index d823b09801df..277c4062e3c6 100644
--- a/arch/arm/mach-pxa/palmte2.c
+++ b/arch/arm/mach-pxa/palmte2.c
@@ -117,83 +117,11 @@ static unsigned long palmte2_pin_config[] __initdata = {
117/****************************************************************************** 117/******************************************************************************
118 * SD/MMC card controller 118 * SD/MMC card controller
119 ******************************************************************************/ 119 ******************************************************************************/
120static int palmte2_mci_init(struct device *dev,
121 irq_handler_t palmte2_detect_int, void *data)
122{
123 int err = 0;
124
125 /* Setup an interrupt for detecting card insert/remove events */
126 err = gpio_request(GPIO_NR_PALMTE2_SD_DETECT_N, "SD IRQ");
127 if (err)
128 goto err;
129 err = gpio_direction_input(GPIO_NR_PALMTE2_SD_DETECT_N);
130 if (err)
131 goto err2;
132 err = request_irq(gpio_to_irq(GPIO_NR_PALMTE2_SD_DETECT_N),
133 palmte2_detect_int, IRQF_DISABLED | IRQF_SAMPLE_RANDOM |
134 IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
135 "SD/MMC card detect", data);
136 if (err) {
137 printk(KERN_ERR "%s: cannot request SD/MMC card detect IRQ\n",
138 __func__);
139 goto err2;
140 }
141
142 err = gpio_request(GPIO_NR_PALMTE2_SD_POWER, "SD_POWER");
143 if (err)
144 goto err3;
145 err = gpio_direction_output(GPIO_NR_PALMTE2_SD_POWER, 0);
146 if (err)
147 goto err4;
148
149 err = gpio_request(GPIO_NR_PALMTE2_SD_READONLY, "SD_READONLY");
150 if (err)
151 goto err4;
152 err = gpio_direction_input(GPIO_NR_PALMTE2_SD_READONLY);
153 if (err)
154 goto err5;
155
156 printk(KERN_DEBUG "%s: irq registered\n", __func__);
157
158 return 0;
159
160err5:
161 gpio_free(GPIO_NR_PALMTE2_SD_READONLY);
162err4:
163 gpio_free(GPIO_NR_PALMTE2_SD_POWER);
164err3:
165 free_irq(gpio_to_irq(GPIO_NR_PALMTE2_SD_DETECT_N), data);
166err2:
167 gpio_free(GPIO_NR_PALMTE2_SD_DETECT_N);
168err:
169 return err;
170}
171
172static void palmte2_mci_exit(struct device *dev, void *data)
173{
174 gpio_free(GPIO_NR_PALMTE2_SD_READONLY);
175 gpio_free(GPIO_NR_PALMTE2_SD_POWER);
176 free_irq(gpio_to_irq(GPIO_NR_PALMTE2_SD_DETECT_N), data);
177 gpio_free(GPIO_NR_PALMTE2_SD_DETECT_N);
178}
179
180static void palmte2_mci_power(struct device *dev, unsigned int vdd)
181{
182 struct pxamci_platform_data *p_d = dev->platform_data;
183 gpio_set_value(GPIO_NR_PALMTE2_SD_POWER, p_d->ocr_mask & (1 << vdd));
184}
185
186static int palmte2_mci_get_ro(struct device *dev)
187{
188 return gpio_get_value(GPIO_NR_PALMTE2_SD_READONLY);
189}
190
191static struct pxamci_platform_data palmte2_mci_platform_data = { 120static struct pxamci_platform_data palmte2_mci_platform_data = {
192 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, 121 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
193 .setpower = palmte2_mci_power, 122 .gpio_card_detect = GPIO_NR_PALMTE2_SD_DETECT_N,
194 .get_ro = palmte2_mci_get_ro, 123 .gpio_card_ro = GPIO_NR_PALMTE2_SD_READONLY,
195 .init = palmte2_mci_init, 124 .gpio_power = GPIO_NR_PALMTE2_SD_POWER,
196 .exit = palmte2_mci_exit,
197}; 125};
198 126
199/****************************************************************************** 127/******************************************************************************
@@ -287,35 +215,9 @@ static struct platform_device palmte2_backlight = {
287/****************************************************************************** 215/******************************************************************************
288 * IrDA 216 * IrDA
289 ******************************************************************************/ 217 ******************************************************************************/
290static int palmte2_irda_startup(struct device *dev)
291{
292 int err;
293 err = gpio_request(GPIO_NR_PALMTE2_IR_DISABLE, "IR DISABLE");
294 if (err)
295 goto err;
296 err = gpio_direction_output(GPIO_NR_PALMTE2_IR_DISABLE, 1);
297 if (err)
298 gpio_free(GPIO_NR_PALMTE2_IR_DISABLE);
299err:
300 return err;
301}
302
303static void palmte2_irda_shutdown(struct device *dev)
304{
305 gpio_free(GPIO_NR_PALMTE2_IR_DISABLE);
306}
307
308static void palmte2_irda_transceiver_mode(struct device *dev, int mode)
309{
310 gpio_set_value(GPIO_NR_PALMTE2_IR_DISABLE, mode & IR_OFF);
311 pxa2xx_transceiver_mode(dev, mode);
312}
313
314static struct pxaficp_platform_data palmte2_ficp_platform_data = { 218static struct pxaficp_platform_data palmte2_ficp_platform_data = {
315 .startup = palmte2_irda_startup, 219 .gpio_pwdown = GPIO_NR_PALMTE2_IR_DISABLE,
316 .shutdown = palmte2_irda_shutdown, 220 .transceiver_cap = IR_SIRMODE | IR_OFF,
317 .transceiver_cap = IR_SIRMODE | IR_FIRMODE | IR_OFF,
318 .transceiver_mode = palmte2_irda_transceiver_mode,
319}; 221};
320 222
321/****************************************************************************** 223/******************************************************************************
diff --git a/arch/arm/mach-pxa/palmtx.c b/arch/arm/mach-pxa/palmtx.c
index 83d020879581..76a2b37eaf30 100644
--- a/arch/arm/mach-pxa/palmtx.c
+++ b/arch/arm/mach-pxa/palmtx.c
@@ -28,6 +28,10 @@
28#include <linux/wm97xx_batt.h> 28#include <linux/wm97xx_batt.h>
29#include <linux/power_supply.h> 29#include <linux/power_supply.h>
30#include <linux/usb/gpio_vbus.h> 30#include <linux/usb/gpio_vbus.h>
31#include <linux/mtd/nand.h>
32#include <linux/mtd/partitions.h>
33#include <linux/mtd/mtd.h>
34#include <linux/mtd/physmap.h>
31 35
32#include <asm/mach-types.h> 36#include <asm/mach-types.h>
33#include <asm/mach/arch.h> 37#include <asm/mach/arch.h>
@@ -131,6 +135,10 @@ static unsigned long palmtx_pin_config[] __initdata = {
131 GPIO34_FFUART_RXD, 135 GPIO34_FFUART_RXD,
132 GPIO39_FFUART_TXD, 136 GPIO39_FFUART_TXD,
133 137
138 /* NAND */
139 GPIO15_nCS_1,
140 GPIO18_RDY,
141
134 /* MISC. */ 142 /* MISC. */
135 GPIO10_GPIO, /* hotsync button */ 143 GPIO10_GPIO, /* hotsync button */
136 GPIO12_GPIO, /* power detect */ 144 GPIO12_GPIO, /* power detect */
@@ -138,85 +146,50 @@ static unsigned long palmtx_pin_config[] __initdata = {
138}; 146};
139 147
140/****************************************************************************** 148/******************************************************************************
141 * SD/MMC card controller 149 * NOR Flash
142 ******************************************************************************/ 150 ******************************************************************************/
143static int palmtx_mci_init(struct device *dev, irq_handler_t palmtx_detect_int, 151static struct mtd_partition palmtx_partitions[] = {
144 void *data) 152 {
145{ 153 .name = "Flash",
146 int err = 0; 154 .offset = 0x00000000,
147 155 .size = MTDPART_SIZ_FULL,
148 /* Setup an interrupt for detecting card insert/remove events */ 156 .mask_flags = 0
149 err = gpio_request(GPIO_NR_PALMTX_SD_DETECT_N, "SD IRQ");
150 if (err)
151 goto err;
152 err = gpio_direction_input(GPIO_NR_PALMTX_SD_DETECT_N);
153 if (err)
154 goto err2;
155 err = request_irq(gpio_to_irq(GPIO_NR_PALMTX_SD_DETECT_N),
156 palmtx_detect_int, IRQF_DISABLED | IRQF_SAMPLE_RANDOM |
157 IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
158 "SD/MMC card detect", data);
159 if (err) {
160 printk(KERN_ERR "%s: cannot request SD/MMC card detect IRQ\n",
161 __func__);
162 goto err2;
163 } 157 }
158};
164 159
165 err = gpio_request(GPIO_NR_PALMTX_SD_POWER, "SD_POWER"); 160static struct physmap_flash_data palmtx_flash_data[] = {
166 if (err) 161 {
167 goto err3; 162 .width = 2, /* bankwidth in bytes */
168 err = gpio_direction_output(GPIO_NR_PALMTX_SD_POWER, 0); 163 .parts = palmtx_partitions,
169 if (err) 164 .nr_parts = ARRAY_SIZE(palmtx_partitions)
170 goto err4; 165 }
171 166};
172 err = gpio_request(GPIO_NR_PALMTX_SD_READONLY, "SD_READONLY");
173 if (err)
174 goto err4;
175 err = gpio_direction_input(GPIO_NR_PALMTX_SD_READONLY);
176 if (err)
177 goto err5;
178
179 printk(KERN_DEBUG "%s: irq registered\n", __func__);
180
181 return 0;
182
183err5:
184 gpio_free(GPIO_NR_PALMTX_SD_READONLY);
185err4:
186 gpio_free(GPIO_NR_PALMTX_SD_POWER);
187err3:
188 free_irq(gpio_to_irq(GPIO_NR_PALMTX_SD_DETECT_N), data);
189err2:
190 gpio_free(GPIO_NR_PALMTX_SD_DETECT_N);
191err:
192 return err;
193}
194
195static void palmtx_mci_exit(struct device *dev, void *data)
196{
197 gpio_free(GPIO_NR_PALMTX_SD_READONLY);
198 gpio_free(GPIO_NR_PALMTX_SD_POWER);
199 free_irq(gpio_to_irq(GPIO_NR_PALMTX_SD_DETECT_N), data);
200 gpio_free(GPIO_NR_PALMTX_SD_DETECT_N);
201}
202 167
203static void palmtx_mci_power(struct device *dev, unsigned int vdd) 168static struct resource palmtx_flash_resource = {
204{ 169 .start = PXA_CS0_PHYS,
205 struct pxamci_platform_data *p_d = dev->platform_data; 170 .end = PXA_CS0_PHYS + SZ_8M - 1,
206 gpio_set_value(GPIO_NR_PALMTX_SD_POWER, p_d->ocr_mask & (1 << vdd)); 171 .flags = IORESOURCE_MEM,
207} 172};
208 173
209static int palmtx_mci_get_ro(struct device *dev) 174static struct platform_device palmtx_flash = {
210{ 175 .name = "physmap-flash",
211 return gpio_get_value(GPIO_NR_PALMTX_SD_READONLY); 176 .id = 0,
212} 177 .resource = &palmtx_flash_resource,
178 .num_resources = 1,
179 .dev = {
180 .platform_data = palmtx_flash_data,
181 },
182};
213 183
184/******************************************************************************
185 * SD/MMC card controller
186 ******************************************************************************/
214static struct pxamci_platform_data palmtx_mci_platform_data = { 187static struct pxamci_platform_data palmtx_mci_platform_data = {
215 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, 188 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
216 .setpower = palmtx_mci_power, 189 .gpio_card_detect = GPIO_NR_PALMTX_SD_DETECT_N,
217 .get_ro = palmtx_mci_get_ro, 190 .gpio_card_ro = GPIO_NR_PALMTX_SD_READONLY,
218 .init = palmtx_mci_init, 191 .gpio_power = GPIO_NR_PALMTX_SD_POWER,
219 .exit = palmtx_mci_exit, 192 .detect_delay = 20,
220}; 193};
221 194
222/****************************************************************************** 195/******************************************************************************
@@ -330,35 +303,9 @@ static struct platform_device palmtx_backlight = {
330/****************************************************************************** 303/******************************************************************************
331 * IrDA 304 * IrDA
332 ******************************************************************************/ 305 ******************************************************************************/
333static int palmtx_irda_startup(struct device *dev)
334{
335 int err;
336 err = gpio_request(GPIO_NR_PALMTX_IR_DISABLE, "IR DISABLE");
337 if (err)
338 goto err;
339 err = gpio_direction_output(GPIO_NR_PALMTX_IR_DISABLE, 1);
340 if (err)
341 gpio_free(GPIO_NR_PALMTX_IR_DISABLE);
342err:
343 return err;
344}
345
346static void palmtx_irda_shutdown(struct device *dev)
347{
348 gpio_free(GPIO_NR_PALMTX_IR_DISABLE);
349}
350
351static void palmtx_irda_transceiver_mode(struct device *dev, int mode)
352{
353 gpio_set_value(GPIO_NR_PALMTX_IR_DISABLE, mode & IR_OFF);
354 pxa2xx_transceiver_mode(dev, mode);
355}
356
357static struct pxaficp_platform_data palmtx_ficp_platform_data = { 306static struct pxaficp_platform_data palmtx_ficp_platform_data = {
358 .startup = palmtx_irda_startup, 307 .gpio_pwdown = GPIO_NR_PALMTX_IR_DISABLE,
359 .shutdown = palmtx_irda_shutdown, 308 .transceiver_cap = IR_SIRMODE | IR_OFF,
360 .transceiver_cap = IR_SIRMODE | IR_FIRMODE | IR_OFF,
361 .transceiver_mode = palmtx_irda_transceiver_mode,
362}; 309};
363 310
364/****************************************************************************** 311/******************************************************************************
@@ -493,6 +440,68 @@ static struct pxafb_mach_info palmtx_lcd_screen = {
493}; 440};
494 441
495/****************************************************************************** 442/******************************************************************************
443 * NAND Flash
444 ******************************************************************************/
445static void palmtx_nand_cmd_ctl(struct mtd_info *mtd, int cmd,
446 unsigned int ctrl)
447{
448 struct nand_chip *this = mtd->priv;
449 unsigned long nandaddr = (unsigned long)this->IO_ADDR_W;
450
451 if (cmd == NAND_CMD_NONE)
452 return;
453
454 if (ctrl & NAND_CLE)
455 writeb(cmd, PALMTX_NAND_CLE_VIRT);
456 else if (ctrl & NAND_ALE)
457 writeb(cmd, PALMTX_NAND_ALE_VIRT);
458 else
459 writeb(cmd, nandaddr);
460}
461
462static struct mtd_partition palmtx_partition_info[] = {
463 [0] = {
464 .name = "palmtx-0",
465 .offset = 0,
466 .size = MTDPART_SIZ_FULL
467 },
468};
469
470static const char *palmtx_part_probes[] = { "cmdlinepart", NULL };
471
472struct platform_nand_data palmtx_nand_platdata = {
473 .chip = {
474 .nr_chips = 1,
475 .chip_offset = 0,
476 .nr_partitions = ARRAY_SIZE(palmtx_partition_info),
477 .partitions = palmtx_partition_info,
478 .chip_delay = 20,
479 .part_probe_types = palmtx_part_probes,
480 },
481 .ctrl = {
482 .cmd_ctrl = palmtx_nand_cmd_ctl,
483 },
484};
485
486static struct resource palmtx_nand_resource[] = {
487 [0] = {
488 .start = PXA_CS1_PHYS,
489 .end = PXA_CS1_PHYS + SZ_1M - 1,
490 .flags = IORESOURCE_MEM,
491 },
492};
493
494static struct platform_device palmtx_nand = {
495 .name = "gen_nand",
496 .num_resources = ARRAY_SIZE(palmtx_nand_resource),
497 .resource = palmtx_nand_resource,
498 .id = -1,
499 .dev = {
500 .platform_data = &palmtx_nand_platdata,
501 }
502};
503
504/******************************************************************************
496 * Power management - standby 505 * Power management - standby
497 ******************************************************************************/ 506 ******************************************************************************/
498static void __init palmtx_pm_init(void) 507static void __init palmtx_pm_init(void)
@@ -518,6 +527,8 @@ static struct platform_device *devices[] __initdata = {
518 &power_supply, 527 &power_supply,
519 &palmtx_asoc, 528 &palmtx_asoc,
520 &palmtx_gpio_vbus, 529 &palmtx_gpio_vbus,
530 &palmtx_flash,
531 &palmtx_nand,
521}; 532};
522 533
523static struct map_desc palmtx_io_desc[] __initdata = { 534static struct map_desc palmtx_io_desc[] __initdata = {
@@ -525,8 +536,18 @@ static struct map_desc palmtx_io_desc[] __initdata = {
525 .virtual = PALMTX_PCMCIA_VIRT, 536 .virtual = PALMTX_PCMCIA_VIRT,
526 .pfn = __phys_to_pfn(PALMTX_PCMCIA_PHYS), 537 .pfn = __phys_to_pfn(PALMTX_PCMCIA_PHYS),
527 .length = PALMTX_PCMCIA_SIZE, 538 .length = PALMTX_PCMCIA_SIZE,
528 .type = MT_DEVICE 539 .type = MT_DEVICE,
529}, 540}, {
541 .virtual = PALMTX_NAND_ALE_VIRT,
542 .pfn = __phys_to_pfn(PALMTX_NAND_ALE_PHYS),
543 .length = SZ_1M,
544 .type = MT_DEVICE,
545}, {
546 .virtual = PALMTX_NAND_CLE_VIRT,
547 .pfn = __phys_to_pfn(PALMTX_NAND_CLE_PHYS),
548 .length = SZ_1M,
549 .type = MT_DEVICE,
550}
530}; 551};
531 552
532static void __init palmtx_map_io(void) 553static void __init palmtx_map_io(void)
diff --git a/arch/arm/mach-pxa/palmz72.c b/arch/arm/mach-pxa/palmz72.c
index c3645aa3fa3d..c2bf493c5f53 100644
--- a/arch/arm/mach-pxa/palmz72.c
+++ b/arch/arm/mach-pxa/palmz72.c
@@ -129,88 +129,14 @@ static unsigned long palmz72_pin_config[] __initdata = {
129/****************************************************************************** 129/******************************************************************************
130 * SD/MMC card controller 130 * SD/MMC card controller
131 ******************************************************************************/ 131 ******************************************************************************/
132static int palmz72_mci_init(struct device *dev, 132/* SD_POWER is not actually power, but it is more like chip
133 irq_handler_t palmz72_detect_int, void *data) 133 * select, i.e. it is inverted */
134{
135 int err = 0;
136
137 /* Setup an interrupt for detecting card insert/remove events */
138 err = gpio_request(GPIO_NR_PALMZ72_SD_DETECT_N, "SD IRQ");
139 if (err)
140 goto err;
141 err = gpio_direction_input(GPIO_NR_PALMZ72_SD_DETECT_N);
142 if (err)
143 goto err2;
144 err = request_irq(gpio_to_irq(GPIO_NR_PALMZ72_SD_DETECT_N),
145 palmz72_detect_int, IRQF_DISABLED | IRQF_SAMPLE_RANDOM |
146 IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
147 "SD/MMC card detect", data);
148 if (err) {
149 printk(KERN_ERR "%s: cannot request SD/MMC card detect IRQ\n",
150 __func__);
151 goto err2;
152 }
153
154 /* SD_POWER is not actually power, but it is more like chip
155 * select, i.e. it is inverted */
156
157 err = gpio_request(GPIO_NR_PALMZ72_SD_POWER_N, "SD_POWER");
158 if (err)
159 goto err3;
160 err = gpio_direction_output(GPIO_NR_PALMZ72_SD_POWER_N, 0);
161 if (err)
162 goto err4;
163 err = gpio_request(GPIO_NR_PALMZ72_SD_RO, "SD_RO");
164 if (err)
165 goto err4;
166 err = gpio_direction_input(GPIO_NR_PALMZ72_SD_RO);
167 if (err)
168 goto err5;
169
170 printk(KERN_DEBUG "%s: irq registered\n", __func__);
171
172 return 0;
173
174err5:
175 gpio_free(GPIO_NR_PALMZ72_SD_RO);
176err4:
177 gpio_free(GPIO_NR_PALMZ72_SD_POWER_N);
178err3:
179 free_irq(gpio_to_irq(GPIO_NR_PALMZ72_SD_DETECT_N), data);
180err2:
181 gpio_free(GPIO_NR_PALMZ72_SD_DETECT_N);
182err:
183 return err;
184}
185
186static void palmz72_mci_exit(struct device *dev, void *data)
187{
188 gpio_free(GPIO_NR_PALMZ72_SD_POWER_N);
189 free_irq(gpio_to_irq(GPIO_NR_PALMZ72_SD_DETECT_N), data);
190 gpio_free(GPIO_NR_PALMZ72_SD_DETECT_N);
191 gpio_free(GPIO_NR_PALMZ72_SD_RO);
192}
193
194static void palmz72_mci_power(struct device *dev, unsigned int vdd)
195{
196 struct pxamci_platform_data *p_d = dev->platform_data;
197 if (p_d->ocr_mask & (1 << vdd))
198 gpio_set_value(GPIO_NR_PALMZ72_SD_POWER_N, 0);
199 else
200 gpio_set_value(GPIO_NR_PALMZ72_SD_POWER_N, 1);
201}
202
203static int palmz72_mci_ro(struct device *dev)
204{
205 return gpio_get_value(GPIO_NR_PALMZ72_SD_RO);
206}
207
208static struct pxamci_platform_data palmz72_mci_platform_data = { 134static struct pxamci_platform_data palmz72_mci_platform_data = {
209 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, 135 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
210 .setpower = palmz72_mci_power, 136 .gpio_card_detect = GPIO_NR_PALMZ72_SD_DETECT_N,
211 .get_ro = palmz72_mci_ro, 137 .gpio_card_ro = GPIO_NR_PALMZ72_SD_RO,
212 .init = palmz72_mci_init, 138 .gpio_power = GPIO_NR_PALMZ72_SD_POWER_N,
213 .exit = palmz72_mci_exit, 139 .gpio_power_invert = 1,
214}; 140};
215 141
216/****************************************************************************** 142/******************************************************************************
@@ -304,35 +230,9 @@ static struct platform_device palmz72_backlight = {
304/****************************************************************************** 230/******************************************************************************
305 * IrDA 231 * IrDA
306 ******************************************************************************/ 232 ******************************************************************************/
307static int palmz72_irda_startup(struct device *dev)
308{
309 int err;
310 err = gpio_request(GPIO_NR_PALMZ72_IR_DISABLE, "IR DISABLE");
311 if (err)
312 goto err;
313 err = gpio_direction_output(GPIO_NR_PALMZ72_IR_DISABLE, 1);
314 if (err)
315 gpio_free(GPIO_NR_PALMZ72_IR_DISABLE);
316err:
317 return err;
318}
319
320static void palmz72_irda_shutdown(struct device *dev)
321{
322 gpio_free(GPIO_NR_PALMZ72_IR_DISABLE);
323}
324
325static void palmz72_irda_transceiver_mode(struct device *dev, int mode)
326{
327 gpio_set_value(GPIO_NR_PALMZ72_IR_DISABLE, mode & IR_OFF);
328 pxa2xx_transceiver_mode(dev, mode);
329}
330
331static struct pxaficp_platform_data palmz72_ficp_platform_data = { 233static struct pxaficp_platform_data palmz72_ficp_platform_data = {
332 .startup = palmz72_irda_startup, 234 .gpio_pwdown = GPIO_NR_PALMZ72_IR_DISABLE,
333 .shutdown = palmz72_irda_shutdown,
334 .transceiver_cap = IR_SIRMODE | IR_OFF, 235 .transceiver_cap = IR_SIRMODE | IR_OFF,
335 .transceiver_mode = palmz72_irda_transceiver_mode,
336}; 236};
337 237
338/****************************************************************************** 238/******************************************************************************
diff --git a/arch/arm/mach-pxa/pcm990-baseboard.c b/arch/arm/mach-pxa/pcm990-baseboard.c
index 01791d74e08e..bbda57078e0f 100644
--- a/arch/arm/mach-pxa/pcm990-baseboard.c
+++ b/arch/arm/mach-pxa/pcm990-baseboard.c
@@ -321,11 +321,14 @@ static void pcm990_mci_exit(struct device *dev, void *data)
321#define MSECS_PER_JIFFY (1000/HZ) 321#define MSECS_PER_JIFFY (1000/HZ)
322 322
323static struct pxamci_platform_data pcm990_mci_platform_data = { 323static struct pxamci_platform_data pcm990_mci_platform_data = {
324 .detect_delay = 250 / MSECS_PER_JIFFY, 324 .detect_delay = 250 / MSECS_PER_JIFFY,
325 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, 325 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
326 .init = pcm990_mci_init, 326 .init = pcm990_mci_init,
327 .setpower = pcm990_mci_setpower, 327 .setpower = pcm990_mci_setpower,
328 .exit = pcm990_mci_exit, 328 .exit = pcm990_mci_exit,
329 .gpio_card_detect = -1,
330 .gpio_card_ro = -1,
331 .gpio_power = -1,
329}; 332};
330 333
331static struct pxaohci_platform_data pcm990_ohci_platform_data = { 334static struct pxaohci_platform_data pcm990_ohci_platform_data = {
@@ -427,25 +430,56 @@ static void pcm990_camera_free_bus(struct soc_camera_link *link)
427 gpio_bus_switch = -EINVAL; 430 gpio_bus_switch = -EINVAL;
428} 431}
429 432
430static struct soc_camera_link iclink = {
431 .bus_id = 0, /* Must match with the camera ID above */
432 .query_bus_param = pcm990_camera_query_bus_param,
433 .set_bus_param = pcm990_camera_set_bus_param,
434 .free_bus = pcm990_camera_free_bus,
435};
436
437/* Board I2C devices. */ 433/* Board I2C devices. */
438static struct i2c_board_info __initdata pcm990_i2c_devices[] = { 434static struct i2c_board_info __initdata pcm990_i2c_devices[] = {
439 { 435 {
440 /* Must initialize before the camera(s) */ 436 /* Must initialize before the camera(s) */
441 I2C_BOARD_INFO("pca9536", 0x41), 437 I2C_BOARD_INFO("pca9536", 0x41),
442 .platform_data = &pca9536_data, 438 .platform_data = &pca9536_data,
443 }, { 439 },
440};
441
442static struct i2c_board_info pcm990_camera_i2c[] = {
443 {
444 I2C_BOARD_INFO("mt9v022", 0x48), 444 I2C_BOARD_INFO("mt9v022", 0x48),
445 .platform_data = &iclink, /* With extender */
446 }, { 445 }, {
447 I2C_BOARD_INFO("mt9m001", 0x5d), 446 I2C_BOARD_INFO("mt9m001", 0x5d),
448 .platform_data = &iclink, /* With extender */ 447 },
448};
449
450static struct soc_camera_link iclink[] = {
451 {
452 .bus_id = 0, /* Must match with the camera ID */
453 .board_info = &pcm990_camera_i2c[0],
454 .i2c_adapter_id = 0,
455 .query_bus_param = pcm990_camera_query_bus_param,
456 .set_bus_param = pcm990_camera_set_bus_param,
457 .free_bus = pcm990_camera_free_bus,
458 .module_name = "mt9v022",
459 }, {
460 .bus_id = 0, /* Must match with the camera ID */
461 .board_info = &pcm990_camera_i2c[1],
462 .i2c_adapter_id = 0,
463 .query_bus_param = pcm990_camera_query_bus_param,
464 .set_bus_param = pcm990_camera_set_bus_param,
465 .free_bus = pcm990_camera_free_bus,
466 .module_name = "mt9m001",
467 },
468};
469
470static struct platform_device pcm990_camera[] = {
471 {
472 .name = "soc-camera-pdrv",
473 .id = 0,
474 .dev = {
475 .platform_data = &iclink[0],
476 },
477 }, {
478 .name = "soc-camera-pdrv",
479 .id = 1,
480 .dev = {
481 .platform_data = &iclink[1],
482 },
449 }, 483 },
450}; 484};
451#endif /* CONFIG_VIDEO_PXA27x ||CONFIG_VIDEO_PXA27x_MODULE */ 485#endif /* CONFIG_VIDEO_PXA27x ||CONFIG_VIDEO_PXA27x_MODULE */
@@ -501,6 +535,9 @@ void __init pcm990_baseboard_init(void)
501 pxa_set_camera_info(&pcm990_pxacamera_platform_data); 535 pxa_set_camera_info(&pcm990_pxacamera_platform_data);
502 536
503 i2c_register_board_info(0, ARRAY_AND_SIZE(pcm990_i2c_devices)); 537 i2c_register_board_info(0, ARRAY_AND_SIZE(pcm990_i2c_devices));
538
539 platform_device_register(&pcm990_camera[0]);
540 platform_device_register(&pcm990_camera[1]);
504#endif 541#endif
505 542
506 printk(KERN_INFO "PCM-990 Evaluation baseboard initialized\n"); 543 printk(KERN_INFO "PCM-990 Evaluation baseboard initialized\n");
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c
index 9352d4a34837..a186994f77fb 100644
--- a/arch/arm/mach-pxa/poodle.c
+++ b/arch/arm/mach-pxa/poodle.c
@@ -245,20 +245,10 @@ static inline void poodle_init_spi(void) {}
245 * The card detect interrupt isn't debounced so we delay it by 250ms 245 * The card detect interrupt isn't debounced so we delay it by 250ms
246 * to give the card a chance to fully insert/eject. 246 * to give the card a chance to fully insert/eject.
247 */ 247 */
248static struct pxamci_platform_data poodle_mci_platform_data;
249
250static int poodle_mci_init(struct device *dev, irq_handler_t poodle_detect_int, void *data) 248static int poodle_mci_init(struct device *dev, irq_handler_t poodle_detect_int, void *data)
251{ 249{
252 int err; 250 int err;
253 251
254 err = gpio_request(POODLE_GPIO_nSD_DETECT, "nSD_DETECT");
255 if (err)
256 goto err_out;
257
258 err = gpio_request(POODLE_GPIO_nSD_WP, "nSD_WP");
259 if (err)
260 goto err_free_1;
261
262 err = gpio_request(POODLE_GPIO_SD_PWR, "SD_PWR"); 252 err = gpio_request(POODLE_GPIO_SD_PWR, "SD_PWR");
263 if (err) 253 if (err)
264 goto err_free_2; 254 goto err_free_2;
@@ -267,34 +257,14 @@ static int poodle_mci_init(struct device *dev, irq_handler_t poodle_detect_int,
267 if (err) 257 if (err)
268 goto err_free_3; 258 goto err_free_3;
269 259
270 gpio_direction_input(POODLE_GPIO_nSD_DETECT);
271 gpio_direction_input(POODLE_GPIO_nSD_WP);
272
273 gpio_direction_output(POODLE_GPIO_SD_PWR, 0); 260 gpio_direction_output(POODLE_GPIO_SD_PWR, 0);
274 gpio_direction_output(POODLE_GPIO_SD_PWR1, 0); 261 gpio_direction_output(POODLE_GPIO_SD_PWR1, 0);
275 262
276 poodle_mci_platform_data.detect_delay = msecs_to_jiffies(250);
277
278 err = request_irq(POODLE_IRQ_GPIO_nSD_DETECT, poodle_detect_int,
279 IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
280 "MMC card detect", data);
281 if (err) {
282 pr_err("%s: MMC/SD: can't request MMC card detect IRQ\n",
283 __func__);
284 goto err_free_4;
285 }
286
287 return 0; 263 return 0;
288 264
289err_free_4:
290 gpio_free(POODLE_GPIO_SD_PWR1);
291err_free_3: 265err_free_3:
292 gpio_free(POODLE_GPIO_SD_PWR); 266 gpio_free(POODLE_GPIO_SD_PWR);
293err_free_2: 267err_free_2:
294 gpio_free(POODLE_GPIO_nSD_WP);
295err_free_1:
296 gpio_free(POODLE_GPIO_nSD_DETECT);
297err_out:
298 return err; 268 return err;
299} 269}
300 270
@@ -312,62 +282,29 @@ static void poodle_mci_setpower(struct device *dev, unsigned int vdd)
312 } 282 }
313} 283}
314 284
315static int poodle_mci_get_ro(struct device *dev)
316{
317 return !!gpio_get_value(POODLE_GPIO_nSD_WP);
318 return GPLR(POODLE_GPIO_nSD_WP) & GPIO_bit(POODLE_GPIO_nSD_WP);
319}
320
321
322static void poodle_mci_exit(struct device *dev, void *data) 285static void poodle_mci_exit(struct device *dev, void *data)
323{ 286{
324 free_irq(POODLE_IRQ_GPIO_nSD_DETECT, data);
325 gpio_free(POODLE_GPIO_SD_PWR1); 287 gpio_free(POODLE_GPIO_SD_PWR1);
326 gpio_free(POODLE_GPIO_SD_PWR); 288 gpio_free(POODLE_GPIO_SD_PWR);
327 gpio_free(POODLE_GPIO_nSD_WP);
328 gpio_free(POODLE_GPIO_nSD_DETECT);
329} 289}
330 290
331static struct pxamci_platform_data poodle_mci_platform_data = { 291static struct pxamci_platform_data poodle_mci_platform_data = {
332 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, 292 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
333 .init = poodle_mci_init, 293 .init = poodle_mci_init,
334 .get_ro = poodle_mci_get_ro, 294 .setpower = poodle_mci_setpower,
335 .setpower = poodle_mci_setpower, 295 .exit = poodle_mci_exit,
336 .exit = poodle_mci_exit, 296 .gpio_card_detect = POODLE_IRQ_GPIO_nSD_DETECT,
297 .gpio_card_ro = POODLE_GPIO_nSD_WP,
298 .gpio_power = -1,
337}; 299};
338 300
339 301
340/* 302/*
341 * Irda 303 * Irda
342 */ 304 */
343static void poodle_irda_transceiver_mode(struct device *dev, int mode)
344{
345 gpio_set_value(POODLE_GPIO_IR_ON, mode & IR_OFF);
346 pxa2xx_transceiver_mode(dev, mode);
347}
348
349static int poodle_irda_startup(struct device *dev)
350{
351 int err;
352
353 err = gpio_request(POODLE_GPIO_IR_ON, "IR_ON");
354 if (err)
355 return err;
356
357 gpio_direction_output(POODLE_GPIO_IR_ON, 1);
358 return 0;
359}
360
361static void poodle_irda_shutdown(struct device *dev)
362{
363 gpio_free(POODLE_GPIO_IR_ON);
364}
365
366static struct pxaficp_platform_data poodle_ficp_platform_data = { 305static struct pxaficp_platform_data poodle_ficp_platform_data = {
306 .gpio_pwdown = POODLE_GPIO_IR_ON,
367 .transceiver_cap = IR_SIRMODE | IR_OFF, 307 .transceiver_cap = IR_SIRMODE | IR_OFF,
368 .transceiver_mode = poodle_irda_transceiver_mode,
369 .startup = poodle_irda_startup,
370 .shutdown = poodle_irda_shutdown,
371}; 308};
372 309
373 310
@@ -521,6 +458,7 @@ static void __init poodle_init(void)
521 set_pxa_fb_parent(&poodle_locomo_device.dev); 458 set_pxa_fb_parent(&poodle_locomo_device.dev);
522 set_pxa_fb_info(&poodle_fb_info); 459 set_pxa_fb_info(&poodle_fb_info);
523 pxa_set_udc_info(&udc_info); 460 pxa_set_udc_info(&udc_info);
461 poodle_mci_platform_data.detect_delay = msecs_to_jiffies(250);
524 pxa_set_mci_info(&poodle_mci_platform_data); 462 pxa_set_mci_info(&poodle_mci_platform_data);
525 pxa_set_ficp_info(&poodle_ficp_platform_data); 463 pxa_set_ficp_info(&poodle_ficp_platform_data);
526 pxa_set_i2c_info(NULL); 464 pxa_set_i2c_info(NULL);
diff --git a/arch/arm/mach-pxa/pxa2xx.c b/arch/arm/mach-pxa/pxa2xx.c
index 2f3394f85917..868270421b8c 100644
--- a/arch/arm/mach-pxa/pxa2xx.c
+++ b/arch/arm/mach-pxa/pxa2xx.c
@@ -52,3 +52,4 @@ void pxa2xx_transceiver_mode(struct device *dev, int mode)
52 } else 52 } else
53 BUG(); 53 BUG();
54} 54}
55EXPORT_SYMBOL_GPL(pxa2xx_transceiver_mode);
diff --git a/arch/arm/mach-pxa/pxa300.c b/arch/arm/mach-pxa/pxa300.c
index 4ba6d21f851c..f4af6e2bef89 100644
--- a/arch/arm/mach-pxa/pxa300.c
+++ b/arch/arm/mach-pxa/pxa300.c
@@ -84,9 +84,11 @@ static struct mfp_addr_map pxa310_mfp_addr_map[] __initdata = {
84}; 84};
85 85
86static DEFINE_PXA3_CKEN(common_nand, NAND, 156000000, 0); 86static DEFINE_PXA3_CKEN(common_nand, NAND, 156000000, 0);
87static DEFINE_PXA3_CKEN(gcu, PXA300_GCU, 0, 0);
87 88
88static struct clk_lookup common_clkregs[] = { 89static struct clk_lookup common_clkregs[] = {
89 INIT_CLKREG(&clk_common_nand, "pxa3xx-nand", NULL), 90 INIT_CLKREG(&clk_common_nand, "pxa3xx-nand", NULL),
91 INIT_CLKREG(&clk_gcu, "pxa3xx-gcu", NULL),
90}; 92};
91 93
92static DEFINE_PXA3_CKEN(pxa310_mmc3, MMC3, 19500000, 0); 94static DEFINE_PXA3_CKEN(pxa310_mmc3, MMC3, 19500000, 0);
diff --git a/arch/arm/mach-pxa/pxa320.c b/arch/arm/mach-pxa/pxa320.c
index 8b3d97efadab..c7373e74a109 100644
--- a/arch/arm/mach-pxa/pxa320.c
+++ b/arch/arm/mach-pxa/pxa320.c
@@ -78,9 +78,11 @@ static struct mfp_addr_map pxa320_mfp_addr_map[] __initdata = {
78}; 78};
79 79
80static DEFINE_PXA3_CKEN(pxa320_nand, NAND, 104000000, 0); 80static DEFINE_PXA3_CKEN(pxa320_nand, NAND, 104000000, 0);
81static DEFINE_PXA3_CKEN(gcu, PXA320_GCU, 0, 0);
81 82
82static struct clk_lookup pxa320_clkregs[] = { 83static struct clk_lookup pxa320_clkregs[] = {
83 INIT_CLKREG(&clk_pxa320_nand, "pxa3xx-nand", NULL), 84 INIT_CLKREG(&clk_pxa320_nand, "pxa3xx-nand", NULL),
85 INIT_CLKREG(&clk_gcu, "pxa3xx-gcu", NULL),
84}; 86};
85 87
86static int __init pxa320_init(void) 88static int __init pxa320_init(void)
diff --git a/arch/arm/mach-pxa/pxa930.c b/arch/arm/mach-pxa/pxa930.c
index 71131742fffd..064292008288 100644
--- a/arch/arm/mach-pxa/pxa930.c
+++ b/arch/arm/mach-pxa/pxa930.c
@@ -176,13 +176,30 @@ static struct mfp_addr_map pxa930_mfp_addr_map[] __initdata = {
176 MFP_ADDR_END, 176 MFP_ADDR_END,
177}; 177};
178 178
179static struct mfp_addr_map pxa935_mfp_addr_map[] __initdata = {
180 MFP_ADDR(GPIO159, 0x0524),
181 MFP_ADDR(GPIO163, 0x0534),
182 MFP_ADDR(GPIO167, 0x0544),
183 MFP_ADDR(GPIO168, 0x0548),
184 MFP_ADDR(GPIO169, 0x054c),
185 MFP_ADDR(GPIO170, 0x0550),
186 MFP_ADDR(GPIO171, 0x0554),
187 MFP_ADDR(GPIO172, 0x0558),
188 MFP_ADDR(GPIO173, 0x055c),
189
190 MFP_ADDR_END,
191};
192
179static int __init pxa930_init(void) 193static int __init pxa930_init(void)
180{ 194{
181 if (cpu_is_pxa930()) { 195 if (cpu_is_pxa930() || cpu_is_pxa935()) {
182 mfp_init_base(io_p2v(MFPR_BASE)); 196 mfp_init_base(io_p2v(MFPR_BASE));
183 mfp_init_addr(pxa930_mfp_addr_map); 197 mfp_init_addr(pxa930_mfp_addr_map);
184 } 198 }
185 199
200 if (cpu_is_pxa935())
201 mfp_init_addr(pxa935_mfp_addr_map);
202
186 return 0; 203 return 0;
187} 204}
188 205
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
index dda310fe71c8..ee8d6038ce82 100644
--- a/arch/arm/mach-pxa/spitz.c
+++ b/arch/arm/mach-pxa/spitz.c
@@ -24,6 +24,7 @@
24#include <linux/spi/ads7846.h> 24#include <linux/spi/ads7846.h>
25#include <linux/spi/corgi_lcd.h> 25#include <linux/spi/corgi_lcd.h>
26#include <linux/mtd/sharpsl.h> 26#include <linux/mtd/sharpsl.h>
27#include <linux/input/matrix_keypad.h>
27 28
28#include <asm/setup.h> 29#include <asm/setup.h>
29#include <asm/mach-types.h> 30#include <asm/mach-types.h>
@@ -111,6 +112,26 @@ static unsigned long spitz_pin_config[] __initdata = {
111 GPIO105_GPIO, /* SPITZ_GPIO_CF_IRQ */ 112 GPIO105_GPIO, /* SPITZ_GPIO_CF_IRQ */
112 GPIO106_GPIO, /* SPITZ_GPIO_CF2_IRQ */ 113 GPIO106_GPIO, /* SPITZ_GPIO_CF2_IRQ */
113 114
115 /* GPIO matrix keypad */
116 GPIO88_GPIO, /* column 0 */
117 GPIO23_GPIO, /* column 1 */
118 GPIO24_GPIO, /* column 2 */
119 GPIO25_GPIO, /* column 3 */
120 GPIO26_GPIO, /* column 4 */
121 GPIO27_GPIO, /* column 5 */
122 GPIO52_GPIO, /* column 6 */
123 GPIO103_GPIO, /* column 7 */
124 GPIO107_GPIO, /* column 8 */
125 GPIO108_GPIO, /* column 9 */
126 GPIO114_GPIO, /* column 10 */
127 GPIO12_GPIO, /* row 0 */
128 GPIO17_GPIO, /* row 1 */
129 GPIO91_GPIO, /* row 2 */
130 GPIO34_GPIO, /* row 3 */
131 GPIO36_GPIO, /* row 4 */
132 GPIO38_GPIO, /* row 5 */
133 GPIO39_GPIO, /* row 6 */
134
114 /* I2C */ 135 /* I2C */
115 GPIO117_I2C_SCL, 136 GPIO117_I2C_SCL,
116 GPIO118_I2C_SDA, 137 GPIO118_I2C_SDA,
@@ -242,9 +263,115 @@ EXPORT_SYMBOL(spitzscoop2_device);
242/* 263/*
243 * Spitz Keyboard Device 264 * Spitz Keyboard Device
244 */ 265 */
266#define SPITZ_KEY_CALENDAR KEY_F1
267#define SPITZ_KEY_ADDRESS KEY_F2
268#define SPITZ_KEY_FN KEY_F3
269#define SPITZ_KEY_CANCEL KEY_F4
270#define SPITZ_KEY_EXOK KEY_F5
271#define SPITZ_KEY_EXCANCEL KEY_F6
272#define SPITZ_KEY_EXJOGDOWN KEY_F7
273#define SPITZ_KEY_EXJOGUP KEY_F8
274#define SPITZ_KEY_JAP1 KEY_LEFTALT
275#define SPITZ_KEY_JAP2 KEY_RIGHTCTRL
276#define SPITZ_KEY_SYNC KEY_F9
277#define SPITZ_KEY_MAIL KEY_F10
278#define SPITZ_KEY_OK KEY_F11
279#define SPITZ_KEY_MENU KEY_F12
280
281static const uint32_t spitzkbd_keymap[] = {
282 KEY(0, 0, KEY_LEFTCTRL),
283 KEY(0, 1, KEY_1),
284 KEY(0, 2, KEY_3),
285 KEY(0, 3, KEY_5),
286 KEY(0, 4, KEY_6),
287 KEY(0, 5, KEY_7),
288 KEY(0, 6, KEY_9),
289 KEY(0, 7, KEY_0),
290 KEY(0, 8, KEY_BACKSPACE),
291 KEY(0, 9, SPITZ_KEY_EXOK), /* EXOK */
292 KEY(0, 10, SPITZ_KEY_EXCANCEL), /* EXCANCEL */
293 KEY(1, 1, KEY_2),
294 KEY(1, 2, KEY_4),
295 KEY(1, 3, KEY_R),
296 KEY(1, 4, KEY_Y),
297 KEY(1, 5, KEY_8),
298 KEY(1, 6, KEY_I),
299 KEY(1, 7, KEY_O),
300 KEY(1, 8, KEY_P),
301 KEY(1, 9, SPITZ_KEY_EXJOGDOWN), /* EXJOGDOWN */
302 KEY(1, 10, SPITZ_KEY_EXJOGUP), /* EXJOGUP */
303 KEY(2, 0, KEY_TAB),
304 KEY(2, 1, KEY_Q),
305 KEY(2, 2, KEY_E),
306 KEY(2, 3, KEY_T),
307 KEY(2, 4, KEY_G),
308 KEY(2, 5, KEY_U),
309 KEY(2, 6, KEY_J),
310 KEY(2, 7, KEY_K),
311 KEY(3, 0, SPITZ_KEY_ADDRESS), /* ADDRESS */
312 KEY(3, 1, KEY_W),
313 KEY(3, 2, KEY_S),
314 KEY(3, 3, KEY_F),
315 KEY(3, 4, KEY_V),
316 KEY(3, 5, KEY_H),
317 KEY(3, 6, KEY_M),
318 KEY(3, 7, KEY_L),
319 KEY(3, 9, KEY_RIGHTSHIFT),
320 KEY(4, 0, SPITZ_KEY_CALENDAR), /* CALENDAR */
321 KEY(4, 1, KEY_A),
322 KEY(4, 2, KEY_D),
323 KEY(4, 3, KEY_C),
324 KEY(4, 4, KEY_B),
325 KEY(4, 5, KEY_N),
326 KEY(4, 6, KEY_DOT),
327 KEY(4, 8, KEY_ENTER),
328 KEY(4, 9, KEY_LEFTSHIFT),
329 KEY(5, 0, SPITZ_KEY_MAIL), /* MAIL */
330 KEY(5, 1, KEY_Z),
331 KEY(5, 2, KEY_X),
332 KEY(5, 3, KEY_MINUS),
333 KEY(5, 4, KEY_SPACE),
334 KEY(5, 5, KEY_COMMA),
335 KEY(5, 7, KEY_UP),
336 KEY(5, 10, SPITZ_KEY_FN), /* FN */
337 KEY(6, 0, KEY_SYSRQ),
338 KEY(6, 1, SPITZ_KEY_JAP1), /* JAP1 */
339 KEY(6, 2, SPITZ_KEY_JAP2), /* JAP2 */
340 KEY(6, 3, SPITZ_KEY_CANCEL), /* CANCEL */
341 KEY(6, 4, SPITZ_KEY_OK), /* OK */
342 KEY(6, 5, SPITZ_KEY_MENU), /* MENU */
343 KEY(6, 6, KEY_LEFT),
344 KEY(6, 7, KEY_DOWN),
345 KEY(6, 8, KEY_RIGHT),
346};
347
348static const struct matrix_keymap_data spitzkbd_keymap_data = {
349 .keymap = spitzkbd_keymap,
350 .keymap_size = ARRAY_SIZE(spitzkbd_keymap),
351};
352
353static const uint32_t spitzkbd_row_gpios[] =
354 { 12, 17, 91, 34, 36, 38, 39 };
355static const uint32_t spitzkbd_col_gpios[] =
356 { 88, 23, 24, 25, 26, 27, 52, 103, 107, 108, 114 };
357
358static struct matrix_keypad_platform_data spitzkbd_pdata = {
359 .keymap_data = &spitzkbd_keymap_data,
360 .row_gpios = spitzkbd_row_gpios,
361 .col_gpios = spitzkbd_col_gpios,
362 .num_row_gpios = ARRAY_SIZE(spitzkbd_row_gpios),
363 .num_col_gpios = ARRAY_SIZE(spitzkbd_col_gpios),
364 .col_scan_delay_us = 10,
365 .debounce_ms = 10,
366 .wakeup = 1,
367};
368
245static struct platform_device spitzkbd_device = { 369static struct platform_device spitzkbd_device = {
246 .name = "spitz-keyboard", 370 .name = "matrix-keypad",
247 .id = -1, 371 .id = -1,
372 .dev = {
373 .platform_data = &spitzkbd_pdata,
374 },
248}; 375};
249 376
250 377
@@ -296,6 +423,7 @@ static struct ads7846_platform_data spitz_ads7846_info = {
296 .vref_delay_usecs = 100, 423 .vref_delay_usecs = 100,
297 .x_plate_ohms = 419, 424 .x_plate_ohms = 419,
298 .y_plate_ohms = 486, 425 .y_plate_ohms = 486,
426 .pressure_max = 1024,
299 .gpio_pendown = SPITZ_GPIO_TP_INT, 427 .gpio_pendown = SPITZ_GPIO_TP_INT,
300 .wait_for_sync = spitz_wait_for_hsync, 428 .wait_for_sync = spitz_wait_for_hsync,
301}; 429};
@@ -378,45 +506,6 @@ static inline void spitz_init_spi(void) {}
378 * The card detect interrupt isn't debounced so we delay it by 250ms 506 * The card detect interrupt isn't debounced so we delay it by 250ms
379 * to give the card a chance to fully insert/eject. 507 * to give the card a chance to fully insert/eject.
380 */ 508 */
381
382static struct pxamci_platform_data spitz_mci_platform_data;
383
384static int spitz_mci_init(struct device *dev, irq_handler_t spitz_detect_int, void *data)
385{
386 int err;
387
388 err = gpio_request(SPITZ_GPIO_nSD_DETECT, "nSD_DETECT");
389 if (err)
390 goto err_out;
391
392 err = gpio_request(SPITZ_GPIO_nSD_WP, "nSD_WP");
393 if (err)
394 goto err_free_1;
395
396 gpio_direction_input(SPITZ_GPIO_nSD_DETECT);
397 gpio_direction_input(SPITZ_GPIO_nSD_WP);
398
399 spitz_mci_platform_data.detect_delay = msecs_to_jiffies(250);
400
401 err = request_irq(SPITZ_IRQ_GPIO_nSD_DETECT, spitz_detect_int,
402 IRQF_DISABLED | IRQF_TRIGGER_RISING |
403 IRQF_TRIGGER_FALLING,
404 "MMC card detect", data);
405 if (err) {
406 pr_err("%s: MMC/SD: can't request MMC card detect IRQ\n",
407 __func__);
408 goto err_free_2;
409 }
410 return 0;
411
412err_free_2:
413 gpio_free(SPITZ_GPIO_nSD_WP);
414err_free_1:
415 gpio_free(SPITZ_GPIO_nSD_DETECT);
416err_out:
417 return err;
418}
419
420static void spitz_mci_setpower(struct device *dev, unsigned int vdd) 509static void spitz_mci_setpower(struct device *dev, unsigned int vdd)
421{ 510{
422 struct pxamci_platform_data* p_d = dev->platform_data; 511 struct pxamci_platform_data* p_d = dev->platform_data;
@@ -427,24 +516,12 @@ static void spitz_mci_setpower(struct device *dev, unsigned int vdd)
427 spitz_card_pwr_ctrl(SPITZ_PWR_SD, 0x0000); 516 spitz_card_pwr_ctrl(SPITZ_PWR_SD, 0x0000);
428} 517}
429 518
430static int spitz_mci_get_ro(struct device *dev)
431{
432 return gpio_get_value(SPITZ_GPIO_nSD_WP);
433}
434
435static void spitz_mci_exit(struct device *dev, void *data)
436{
437 free_irq(SPITZ_IRQ_GPIO_nSD_DETECT, data);
438 gpio_free(SPITZ_GPIO_nSD_WP);
439 gpio_free(SPITZ_GPIO_nSD_DETECT);
440}
441
442static struct pxamci_platform_data spitz_mci_platform_data = { 519static struct pxamci_platform_data spitz_mci_platform_data = {
443 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, 520 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
444 .init = spitz_mci_init, 521 .setpower = spitz_mci_setpower,
445 .get_ro = spitz_mci_get_ro, 522 .gpio_card_detect = SPITZ_GPIO_nSD_DETECT,
446 .setpower = spitz_mci_setpower, 523 .gpio_card_ro = SPITZ_GPIO_nSD_WP,
447 .exit = spitz_mci_exit, 524 .gpio_power = -1,
448}; 525};
449 526
450 527
@@ -484,50 +561,10 @@ static struct pxaohci_platform_data spitz_ohci_platform_data = {
484/* 561/*
485 * Irda 562 * Irda
486 */ 563 */
487static int spitz_irda_startup(struct device *dev)
488{
489 int rc;
490
491 rc = gpio_request(SPITZ_GPIO_IR_ON, "IrDA on");
492 if (rc)
493 goto err;
494
495 rc = gpio_direction_output(SPITZ_GPIO_IR_ON, 1);
496 if (rc)
497 goto err_dir;
498
499 return 0;
500
501err_dir:
502 gpio_free(SPITZ_GPIO_IR_ON);
503err:
504 return rc;
505}
506
507static void spitz_irda_shutdown(struct device *dev)
508{
509 gpio_free(SPITZ_GPIO_IR_ON);
510}
511
512static void spitz_irda_transceiver_mode(struct device *dev, int mode)
513{
514 gpio_set_value(SPITZ_GPIO_IR_ON, mode & IR_OFF);
515 pxa2xx_transceiver_mode(dev, mode);
516}
517
518#ifdef CONFIG_MACH_AKITA
519static void akita_irda_transceiver_mode(struct device *dev, int mode)
520{
521 gpio_set_value(AKITA_GPIO_IR_ON, mode & IR_OFF);
522 pxa2xx_transceiver_mode(dev, mode);
523}
524#endif
525 564
526static struct pxaficp_platform_data spitz_ficp_platform_data = { 565static struct pxaficp_platform_data spitz_ficp_platform_data = {
566/* .gpio_pwdown is set in spitz_init() and akita_init() accordingly */
527 .transceiver_cap = IR_SIRMODE | IR_OFF, 567 .transceiver_cap = IR_SIRMODE | IR_OFF,
528 .transceiver_mode = spitz_irda_transceiver_mode,
529 .startup = spitz_irda_startup,
530 .shutdown = spitz_irda_shutdown,
531}; 568};
532 569
533 570
@@ -695,6 +732,7 @@ static void __init common_init(void)
695 spitz_init_spi(); 732 spitz_init_spi();
696 733
697 platform_add_devices(devices, ARRAY_SIZE(devices)); 734 platform_add_devices(devices, ARRAY_SIZE(devices));
735 spitz_mci_platform_data.detect_delay = msecs_to_jiffies(250);
698 pxa_set_mci_info(&spitz_mci_platform_data); 736 pxa_set_mci_info(&spitz_mci_platform_data);
699 pxa_set_ohci_info(&spitz_ohci_platform_data); 737 pxa_set_ohci_info(&spitz_ohci_platform_data);
700 pxa_set_ficp_info(&spitz_ficp_platform_data); 738 pxa_set_ficp_info(&spitz_ficp_platform_data);
@@ -705,6 +743,8 @@ static void __init common_init(void)
705#if defined(CONFIG_MACH_SPITZ) || defined(CONFIG_MACH_BORZOI) 743#if defined(CONFIG_MACH_SPITZ) || defined(CONFIG_MACH_BORZOI)
706static void __init spitz_init(void) 744static void __init spitz_init(void)
707{ 745{
746 spitz_ficp_platform_data.gpio_pwdown = SPITZ_GPIO_IR_ON;
747
708 platform_scoop_config = &spitz_pcmcia_config; 748 platform_scoop_config = &spitz_pcmcia_config;
709 749
710 common_init(); 750 common_init();
@@ -747,7 +787,7 @@ static struct nand_ecclayout akita_oobinfo = {
747 787
748static void __init akita_init(void) 788static void __init akita_init(void)
749{ 789{
750 spitz_ficp_platform_data.transceiver_mode = akita_irda_transceiver_mode; 790 spitz_ficp_platform_data.gpio_pwdown = AKITA_GPIO_IR_ON;
751 791
752 sharpsl_nand_platform_data.badblock_pattern = &sharpsl_akita_bbt; 792 sharpsl_nand_platform_data.badblock_pattern = &sharpsl_akita_bbt;
753 sharpsl_nand_platform_data.ecc_layout = &akita_oobinfo; 793 sharpsl_nand_platform_data.ecc_layout = &akita_oobinfo;
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c
index 117ad5920e53..e81a52673d49 100644
--- a/arch/arm/mach-pxa/tosa.c
+++ b/arch/arm/mach-pxa/tosa.c
@@ -247,49 +247,10 @@ static struct pxa2xx_udc_mach_info udc_info __initdata = {
247/* 247/*
248 * MMC/SD Device 248 * MMC/SD Device
249 */ 249 */
250static struct pxamci_platform_data tosa_mci_platform_data;
251
252static int tosa_mci_init(struct device *dev, irq_handler_t tosa_detect_int, void *data) 250static int tosa_mci_init(struct device *dev, irq_handler_t tosa_detect_int, void *data)
253{ 251{
254 int err; 252 int err;
255 253
256 tosa_mci_platform_data.detect_delay = msecs_to_jiffies(250);
257
258 err = gpio_request(TOSA_GPIO_nSD_DETECT, "MMC/SD card detect");
259 if (err) {
260 printk(KERN_ERR "tosa_mci_init: can't request nSD_DETECT gpio\n");
261 goto err_gpio_detect;
262 }
263 err = gpio_direction_input(TOSA_GPIO_nSD_DETECT);
264 if (err)
265 goto err_gpio_detect_dir;
266
267 err = request_irq(TOSA_IRQ_GPIO_nSD_DETECT, tosa_detect_int,
268 IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
269 "MMC/SD card detect", data);
270 if (err) {
271 printk(KERN_ERR "tosa_mci_init: MMC/SD: can't request MMC card detect IRQ\n");
272 goto err_irq;
273 }
274
275 err = gpio_request(TOSA_GPIO_SD_WP, "SD Write Protect");
276 if (err) {
277 printk(KERN_ERR "tosa_mci_init: can't request SD_WP gpio\n");
278 goto err_gpio_wp;
279 }
280 err = gpio_direction_input(TOSA_GPIO_SD_WP);
281 if (err)
282 goto err_gpio_wp_dir;
283
284 err = gpio_request(TOSA_GPIO_PWR_ON, "SD Power");
285 if (err) {
286 printk(KERN_ERR "tosa_mci_init: can't request SD_PWR gpio\n");
287 goto err_gpio_pwr;
288 }
289 err = gpio_direction_output(TOSA_GPIO_PWR_ON, 0);
290 if (err)
291 goto err_gpio_pwr_dir;
292
293 err = gpio_request(TOSA_GPIO_nSD_INT, "SD Int"); 254 err = gpio_request(TOSA_GPIO_nSD_INT, "SD Int");
294 if (err) { 255 if (err) {
295 printk(KERN_ERR "tosa_mci_init: can't request SD_PWR gpio\n"); 256 printk(KERN_ERR "tosa_mci_init: can't request SD_PWR gpio\n");
@@ -304,51 +265,21 @@ static int tosa_mci_init(struct device *dev, irq_handler_t tosa_detect_int, void
304err_gpio_int_dir: 265err_gpio_int_dir:
305 gpio_free(TOSA_GPIO_nSD_INT); 266 gpio_free(TOSA_GPIO_nSD_INT);
306err_gpio_int: 267err_gpio_int:
307err_gpio_pwr_dir:
308 gpio_free(TOSA_GPIO_PWR_ON);
309err_gpio_pwr:
310err_gpio_wp_dir:
311 gpio_free(TOSA_GPIO_SD_WP);
312err_gpio_wp:
313 free_irq(TOSA_IRQ_GPIO_nSD_DETECT, data);
314err_irq:
315err_gpio_detect_dir:
316 gpio_free(TOSA_GPIO_nSD_DETECT);
317err_gpio_detect:
318 return err; 268 return err;
319} 269}
320 270
321static void tosa_mci_setpower(struct device *dev, unsigned int vdd)
322{
323 struct pxamci_platform_data* p_d = dev->platform_data;
324
325 if (( 1 << vdd) & p_d->ocr_mask) {
326 gpio_set_value(TOSA_GPIO_PWR_ON, 1);
327 } else {
328 gpio_set_value(TOSA_GPIO_PWR_ON, 0);
329 }
330}
331
332static int tosa_mci_get_ro(struct device *dev)
333{
334 return gpio_get_value(TOSA_GPIO_SD_WP);
335}
336
337static void tosa_mci_exit(struct device *dev, void *data) 271static void tosa_mci_exit(struct device *dev, void *data)
338{ 272{
339 gpio_free(TOSA_GPIO_nSD_INT); 273 gpio_free(TOSA_GPIO_nSD_INT);
340 gpio_free(TOSA_GPIO_PWR_ON);
341 gpio_free(TOSA_GPIO_SD_WP);
342 free_irq(TOSA_IRQ_GPIO_nSD_DETECT, data);
343 gpio_free(TOSA_GPIO_nSD_DETECT);
344} 274}
345 275
346static struct pxamci_platform_data tosa_mci_platform_data = { 276static struct pxamci_platform_data tosa_mci_platform_data = {
347 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, 277 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
348 .init = tosa_mci_init, 278 .init = tosa_mci_init,
349 .get_ro = tosa_mci_get_ro, 279 .exit = tosa_mci_exit,
350 .setpower = tosa_mci_setpower, 280 .gpio_card_detect = TOSA_GPIO_nSD_DETECT,
351 .exit = tosa_mci_exit, 281 .gpio_card_ro = TOSA_GPIO_SD_WP,
282 .gpio_power = TOSA_GPIO_PWR_ON,
352}; 283};
353 284
354/* 285/*
@@ -406,10 +337,11 @@ static void tosa_irda_shutdown(struct device *dev)
406} 337}
407 338
408static struct pxaficp_platform_data tosa_ficp_platform_data = { 339static struct pxaficp_platform_data tosa_ficp_platform_data = {
409 .transceiver_cap = IR_SIRMODE | IR_OFF, 340 .gpio_pwdown = -1,
410 .transceiver_mode = tosa_irda_transceiver_mode, 341 .transceiver_cap = IR_SIRMODE | IR_OFF,
411 .startup = tosa_irda_startup, 342 .transceiver_mode = tosa_irda_transceiver_mode,
412 .shutdown = tosa_irda_shutdown, 343 .startup = tosa_irda_startup,
344 .shutdown = tosa_irda_shutdown,
413}; 345};
414 346
415/* 347/*
@@ -910,6 +842,7 @@ static void __init tosa_init(void)
910 dummy = gpiochip_reserve(TOSA_SCOOP_JC_GPIO_BASE, 12); 842 dummy = gpiochip_reserve(TOSA_SCOOP_JC_GPIO_BASE, 12);
911 dummy = gpiochip_reserve(TOSA_TC6393XB_GPIO_BASE, 16); 843 dummy = gpiochip_reserve(TOSA_TC6393XB_GPIO_BASE, 16);
912 844
845 tosa_mci_platform_data.detect_delay = msecs_to_jiffies(250);
913 pxa_set_mci_info(&tosa_mci_platform_data); 846 pxa_set_mci_info(&tosa_mci_platform_data);
914 pxa_set_udc_info(&udc_info); 847 pxa_set_udc_info(&udc_info);
915 pxa_set_ficp_info(&tosa_ficp_platform_data); 848 pxa_set_ficp_info(&tosa_ficp_platform_data);
diff --git a/arch/arm/mach-pxa/treo680.c b/arch/arm/mach-pxa/treo680.c
index 753ec4df17b9..fe085076fbf2 100644
--- a/arch/arm/mach-pxa/treo680.c
+++ b/arch/arm/mach-pxa/treo680.c
@@ -153,87 +153,11 @@ static unsigned long treo680_pin_config[] __initdata = {
153/****************************************************************************** 153/******************************************************************************
154 * SD/MMC card controller 154 * SD/MMC card controller
155 ******************************************************************************/ 155 ******************************************************************************/
156static int treo680_mci_init(struct device *dev,
157 irq_handler_t treo680_detect_int, void *data)
158{
159 int err = 0;
160
161 /* Setup an interrupt for detecting card insert/remove events */
162 err = gpio_request(GPIO_NR_TREO680_SD_DETECT_N, "SD IRQ");
163
164 if (err)
165 goto err;
166
167 err = gpio_direction_input(GPIO_NR_TREO680_SD_DETECT_N);
168 if (err)
169 goto err2;
170
171 err = request_irq(gpio_to_irq(GPIO_NR_TREO680_SD_DETECT_N),
172 treo680_detect_int, IRQF_DISABLED | IRQF_SAMPLE_RANDOM |
173 IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
174 "SD/MMC card detect", data);
175
176 if (err) {
177 dev_err(dev, "%s: cannot request SD/MMC card detect IRQ\n",
178 __func__);
179 goto err2;
180 }
181
182 err = gpio_request(GPIO_NR_TREO680_SD_POWER, "SD_POWER");
183 if (err)
184 goto err3;
185
186 err = gpio_direction_output(GPIO_NR_TREO680_SD_POWER, 1);
187 if (err)
188 goto err4;
189
190 err = gpio_request(GPIO_NR_TREO680_SD_READONLY, "SD_READONLY");
191 if (err)
192 goto err4;
193
194 err = gpio_direction_input(GPIO_NR_TREO680_SD_READONLY);
195 if (err)
196 goto err5;
197
198 return 0;
199
200err5:
201 gpio_free(GPIO_NR_TREO680_SD_READONLY);
202err4:
203 gpio_free(GPIO_NR_TREO680_SD_POWER);
204err3:
205 free_irq(gpio_to_irq(GPIO_NR_TREO680_SD_DETECT_N), data);
206err2:
207 gpio_free(GPIO_NR_TREO680_SD_DETECT_N);
208err:
209 return err;
210}
211
212static void treo680_mci_exit(struct device *dev, void *data)
213{
214 gpio_free(GPIO_NR_TREO680_SD_READONLY);
215 gpio_free(GPIO_NR_TREO680_SD_POWER);
216 free_irq(gpio_to_irq(GPIO_NR_TREO680_SD_DETECT_N), data);
217 gpio_free(GPIO_NR_TREO680_SD_DETECT_N);
218}
219
220static void treo680_mci_power(struct device *dev, unsigned int vdd)
221{
222 struct pxamci_platform_data *p_d = dev->platform_data;
223 gpio_set_value(GPIO_NR_TREO680_SD_POWER, p_d->ocr_mask & (1 << vdd));
224}
225
226static int treo680_mci_get_ro(struct device *dev)
227{
228 return gpio_get_value(GPIO_NR_TREO680_SD_READONLY);
229}
230
231static struct pxamci_platform_data treo680_mci_platform_data = { 156static struct pxamci_platform_data treo680_mci_platform_data = {
232 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, 157 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
233 .setpower = treo680_mci_power, 158 .gpio_card_detect = GPIO_NR_TREO680_SD_DETECT_N,
234 .get_ro = treo680_mci_get_ro, 159 .gpio_card_ro = GPIO_NR_TREO680_SD_READONLY,
235 .init = treo680_mci_init, 160 .gpio_power = GPIO_NR_TREO680_SD_POWER,
236 .exit = treo680_mci_exit,
237}; 161};
238 162
239/****************************************************************************** 163/******************************************************************************
@@ -330,16 +254,9 @@ static int treo680_backlight_init(struct device *dev)
330 ret = gpio_direction_output(GPIO_NR_TREO680_BL_POWER, 0); 254 ret = gpio_direction_output(GPIO_NR_TREO680_BL_POWER, 0);
331 if (ret) 255 if (ret)
332 goto err2; 256 goto err2;
333 ret = gpio_request(GPIO_NR_TREO680_LCD_POWER, "LCD POWER");
334 if (ret)
335 goto err2;
336 ret = gpio_direction_output(GPIO_NR_TREO680_LCD_POWER, 0);
337 if (ret)
338 goto err3;
339 257
340 return 0; 258 return 0;
341err3: 259
342 gpio_free(GPIO_NR_TREO680_LCD_POWER);
343err2: 260err2:
344 gpio_free(GPIO_NR_TREO680_BL_POWER); 261 gpio_free(GPIO_NR_TREO680_BL_POWER);
345err: 262err:
@@ -355,7 +272,6 @@ static int treo680_backlight_notify(int brightness)
355static void treo680_backlight_exit(struct device *dev) 272static void treo680_backlight_exit(struct device *dev)
356{ 273{
357 gpio_free(GPIO_NR_TREO680_BL_POWER); 274 gpio_free(GPIO_NR_TREO680_BL_POWER);
358 gpio_free(GPIO_NR_TREO680_LCD_POWER);
359} 275}
360 276
361static struct platform_pwm_backlight_data treo680_backlight_data = { 277static struct platform_pwm_backlight_data treo680_backlight_data = {
@@ -379,44 +295,9 @@ static struct platform_device treo680_backlight = {
379/****************************************************************************** 295/******************************************************************************
380 * IrDA 296 * IrDA
381 ******************************************************************************/ 297 ******************************************************************************/
382static void treo680_transceiver_mode(struct device *dev, int mode)
383{
384 gpio_set_value(GPIO_NR_TREO680_IR_EN, mode & IR_OFF);
385 pxa2xx_transceiver_mode(dev, mode);
386}
387
388static int treo680_irda_startup(struct device *dev)
389{
390 int err;
391
392 err = gpio_request(GPIO_NR_TREO680_IR_EN, "Ir port disable");
393 if (err)
394 goto err1;
395
396 err = gpio_direction_output(GPIO_NR_TREO680_IR_EN, 1);
397 if (err)
398 goto err2;
399
400 return 0;
401
402err2:
403 dev_err(dev, "treo680_irda: cannot change IR gpio direction\n");
404 gpio_free(GPIO_NR_TREO680_IR_EN);
405err1:
406 dev_err(dev, "treo680_irda: cannot allocate IR gpio\n");
407 return err;
408}
409
410static void treo680_irda_shutdown(struct device *dev)
411{
412 gpio_free(GPIO_NR_TREO680_IR_EN);
413}
414
415static struct pxaficp_platform_data treo680_ficp_info = { 298static struct pxaficp_platform_data treo680_ficp_info = {
416 .transceiver_cap = IR_FIRMODE | IR_SIRMODE | IR_OFF, 299 .gpio_pwdown = GPIO_NR_TREO680_IR_EN,
417 .startup = treo680_irda_startup, 300 .transceiver_cap = IR_SIRMODE | IR_OFF,
418 .shutdown = treo680_irda_shutdown,
419 .transceiver_mode = treo680_transceiver_mode,
420}; 301};
421 302
422/****************************************************************************** 303/******************************************************************************
@@ -546,6 +427,11 @@ static struct pxafb_mode_info treo680_lcd_modes[] = {
546}, 427},
547}; 428};
548 429
430static void treo680_lcd_power(int on, struct fb_var_screeninfo *info)
431{
432 gpio_set_value(GPIO_NR_TREO680_BL_POWER, on);
433}
434
549static struct pxafb_mach_info treo680_lcd_screen = { 435static struct pxafb_mach_info treo680_lcd_screen = {
550 .modes = treo680_lcd_modes, 436 .modes = treo680_lcd_modes,
551 .num_modes = ARRAY_SIZE(treo680_lcd_modes), 437 .num_modes = ARRAY_SIZE(treo680_lcd_modes),
@@ -585,11 +471,32 @@ static void __init treo680_udc_init(void)
585 } 471 }
586} 472}
587 473
474static void __init treo680_lcd_power_init(void)
475{
476 int ret;
477
478 ret = gpio_request(GPIO_NR_TREO680_LCD_POWER, "LCD POWER");
479 if (ret) {
480 pr_err("Treo680: LCD power GPIO request failed!\n");
481 return;
482 }
483
484 ret = gpio_direction_output(GPIO_NR_TREO680_LCD_POWER, 0);
485 if (ret) {
486 pr_err("Treo680: setting LCD power GPIO direction failed!\n");
487 gpio_free(GPIO_NR_TREO680_LCD_POWER);
488 return;
489 }
490
491 treo680_lcd_screen.pxafb_lcd_power = treo680_lcd_power;
492}
493
588static void __init treo680_init(void) 494static void __init treo680_init(void)
589{ 495{
590 treo680_pm_init(); 496 treo680_pm_init();
591 pxa2xx_mfp_config(ARRAY_AND_SIZE(treo680_pin_config)); 497 pxa2xx_mfp_config(ARRAY_AND_SIZE(treo680_pin_config));
592 pxa_set_keypad_info(&treo680_keypad_platform_data); 498 pxa_set_keypad_info(&treo680_keypad_platform_data);
499 treo680_lcd_power_init();
593 set_pxa_fb_info(&treo680_lcd_screen); 500 set_pxa_fb_info(&treo680_lcd_screen);
594 pxa_set_mci_info(&treo680_mci_platform_data); 501 pxa_set_mci_info(&treo680_mci_platform_data);
595 treo680_udc_init(); 502 treo680_udc_init();
diff --git a/arch/arm/mach-pxa/trizeps4.c b/arch/arm/mach-pxa/trizeps4.c
index 825f540176d2..3981e0356d12 100644
--- a/arch/arm/mach-pxa/trizeps4.c
+++ b/arch/arm/mach-pxa/trizeps4.c
@@ -367,6 +367,9 @@ static struct pxamci_platform_data trizeps4_mci_platform_data = {
367 .exit = trizeps4_mci_exit, 367 .exit = trizeps4_mci_exit,
368 .get_ro = NULL, /* write-protection not supported */ 368 .get_ro = NULL, /* write-protection not supported */
369 .setpower = NULL, /* power-switching not supported */ 369 .setpower = NULL, /* power-switching not supported */
370 .gpio_card_detect = -1,
371 .gpio_card_ro = -1,
372 .gpio_power = -1,
370}; 373};
371 374
372/**************************************************************************** 375/****************************************************************************
@@ -412,6 +415,7 @@ static void trizeps4_irda_transceiver_mode(struct device *dev, int mode)
412} 415}
413 416
414static struct pxaficp_platform_data trizeps4_ficp_platform_data = { 417static struct pxaficp_platform_data trizeps4_ficp_platform_data = {
418 .gpio_pwdown = -1,
415 .transceiver_cap = IR_SIRMODE | IR_FIRMODE | IR_OFF, 419 .transceiver_cap = IR_SIRMODE | IR_FIRMODE | IR_OFF,
416 .transceiver_mode = trizeps4_irda_transceiver_mode, 420 .transceiver_mode = trizeps4_irda_transceiver_mode,
417 .startup = trizeps4_irda_startup, 421 .startup = trizeps4_irda_startup,
diff --git a/arch/arm/mach-pxa/xcep.c b/arch/arm/mach-pxa/xcep.c
new file mode 100644
index 000000000000..3fd79cbb36c8
--- /dev/null
+++ b/arch/arm/mach-pxa/xcep.c
@@ -0,0 +1,187 @@
1/* linux/arch/arm/mach-pxa/xcep.c
2 *
3 * Support for the Iskratel Electronics XCEP platform as used in
4 * the Libera instruments from Instrumentation Technologies.
5 *
6 * Author: Ales Bardorfer <ales@i-tech.si>
7 * Contributions by: Abbott, MG (Michael) <michael.abbott@diamond.ac.uk>
8 * Contributions by: Matej Kenda <matej.kenda@i-tech.si>
9 * Created: June 2006
10 * Copyright: (C) 2006-2009 Instrumentation Technologies
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
17#include <linux/platform_device.h>
18#include <linux/i2c.h>
19#include <linux/smc91x.h>
20#include <linux/mtd/mtd.h>
21#include <linux/mtd/partitions.h>
22#include <linux/mtd/physmap.h>
23
24#include <asm/mach-types.h>
25#include <asm/mach/arch.h>
26#include <asm/mach/irq.h>
27#include <asm/mach/map.h>
28
29#include <plat/i2c.h>
30
31#include <mach/hardware.h>
32#include <mach/pxa2xx-regs.h>
33#include <mach/mfp-pxa25x.h>
34
35#include "generic.h"
36
37#define XCEP_ETH_PHYS (PXA_CS3_PHYS + 0x00000300)
38#define XCEP_ETH_PHYS_END (PXA_CS3_PHYS + 0x000fffff)
39#define XCEP_ETH_ATTR (PXA_CS3_PHYS + 0x02000000)
40#define XCEP_ETH_ATTR_END (PXA_CS3_PHYS + 0x020fffff)
41#define XCEP_ETH_IRQ IRQ_GPIO0
42
43/* XCEP CPLD base */
44#define XCEP_CPLD_BASE 0xf0000000
45
46
47/* Flash partitions. */
48
49static struct mtd_partition xcep_partitions[] = {
50 {
51 .name = "Bootloader",
52 .size = 0x00040000,
53 .offset = 0,
54 .mask_flags = MTD_WRITEABLE
55 }, {
56 .name = "Bootloader ENV",
57 .size = 0x00040000,
58 .offset = 0x00040000,
59 .mask_flags = MTD_WRITEABLE
60 }, {
61 .name = "Kernel",
62 .size = 0x00100000,
63 .offset = 0x00080000,
64 }, {
65 .name = "Rescue fs",
66 .size = 0x00280000,
67 .offset = 0x00180000,
68 }, {
69 .name = "Filesystem",
70 .size = MTDPART_SIZ_FULL,
71 .offset = 0x00400000
72 }
73};
74
75static struct physmap_flash_data xcep_flash_data[] = {
76 {
77 .width = 4, /* bankwidth in bytes */
78 .parts = xcep_partitions,
79 .nr_parts = ARRAY_SIZE(xcep_partitions)
80 }
81};
82
83static struct resource flash_resource = {
84 .start = PXA_CS0_PHYS,
85 .end = PXA_CS0_PHYS + SZ_32M - 1,
86 .flags = IORESOURCE_MEM,
87};
88
89static struct platform_device flash_device = {
90 .name = "physmap-flash",
91 .id = 0,
92 .dev = {
93 .platform_data = xcep_flash_data,
94 },
95 .resource = &flash_resource,
96 .num_resources = 1,
97};
98
99
100
101/* SMC LAN91C111 network controller. */
102
103static struct resource smc91x_resources[] = {
104 [0] = {
105 .name = "smc91x-regs",
106 .start = XCEP_ETH_PHYS,
107 .end = XCEP_ETH_PHYS_END,
108 .flags = IORESOURCE_MEM,
109 },
110 [1] = {
111 .start = XCEP_ETH_IRQ,
112 .end = XCEP_ETH_IRQ,
113 .flags = IORESOURCE_IRQ,
114 },
115 [2] = {
116 .name = "smc91x-attrib",
117 .start = XCEP_ETH_ATTR,
118 .end = XCEP_ETH_ATTR_END,
119 .flags = IORESOURCE_MEM,
120 },
121};
122
123static struct smc91x_platdata xcep_smc91x_info = {
124 .flags = SMC91X_USE_32BIT | SMC91X_NOWAIT | SMC91X_USE_DMA,
125};
126
127static struct platform_device smc91x_device = {
128 .name = "smc91x",
129 .id = -1,
130 .num_resources = ARRAY_SIZE(smc91x_resources),
131 .resource = smc91x_resources,
132 .dev = {
133 .platform_data = &xcep_smc91x_info,
134 },
135};
136
137
138static struct platform_device *devices[] __initdata = {
139 &flash_device,
140 &smc91x_device,
141};
142
143
144/* We have to state that there are HWMON devices on the I2C bus on XCEP.
145 * Drivers for HWMON verify capabilities of the adapter when loading and
146 * refuse to attach if the adapter doesn't support HWMON class of devices.
147 * See also Documentation/i2c/porting-clients. */
148static struct i2c_pxa_platform_data xcep_i2c_platform_data = {
149 .class = I2C_CLASS_HWMON
150};
151
152
153static mfp_cfg_t xcep_pin_config[] __initdata = {
154 GPIO79_nCS_3, /* SMC 91C111 chip select. */
155 GPIO80_nCS_4, /* CPLD chip select. */
156 /* SSP communication to MSP430 */
157 GPIO23_SSP1_SCLK,
158 GPIO24_SSP1_SFRM,
159 GPIO25_SSP1_TXD,
160 GPIO26_SSP1_RXD,
161 GPIO27_SSP1_EXTCLK
162};
163
164static void __init xcep_init(void)
165{
166 pxa2xx_mfp_config(ARRAY_AND_SIZE(xcep_pin_config));
167
168 /* See Intel XScale Developer's Guide for details */
169 /* Set RDF and RDN to appropriate values (chip select 3 (smc91x)) */
170 MSC1 = (MSC1 & 0xffff) | 0xD5540000;
171 /* Set RDF and RDN to appropriate values (chip select 5 (fpga)) */
172 MSC2 = (MSC2 & 0xffff) | 0x72A00000;
173
174 platform_add_devices(ARRAY_AND_SIZE(devices));
175 pxa_set_i2c_info(&xcep_i2c_platform_data);
176}
177
178MACHINE_START(XCEP, "Iskratel XCEP")
179 .phys_io = 0x40000000,
180 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
181 .boot_params = 0xa0000100,
182 .init_machine = xcep_init,
183 .map_io = pxa_map_io,
184 .init_irq = pxa25x_init_irq,
185 .timer = &pxa_timer,
186MACHINE_END
187
diff --git a/arch/arm/mach-pxa/zylonite.c b/arch/arm/mach-pxa/zylonite.c
index 218d2001f1df..09784d3954e4 100644
--- a/arch/arm/mach-pxa/zylonite.c
+++ b/arch/arm/mach-pxa/zylonite.c
@@ -290,6 +290,9 @@ static struct pxamci_platform_data zylonite_mci_platform_data = {
290 .init = zylonite_mci_init, 290 .init = zylonite_mci_init,
291 .exit = zylonite_mci_exit, 291 .exit = zylonite_mci_exit,
292 .get_ro = zylonite_mci_ro, 292 .get_ro = zylonite_mci_ro,
293 .gpio_card_detect = -1,
294 .gpio_card_ro = -1,
295 .gpio_power = -1,
293}; 296};
294 297
295static struct pxamci_platform_data zylonite_mci2_platform_data = { 298static struct pxamci_platform_data zylonite_mci2_platform_data = {
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c
index dc3519c50ab2..a2083b60e3fb 100644
--- a/arch/arm/mach-realview/core.c
+++ b/arch/arm/mach-realview/core.c
@@ -30,6 +30,7 @@
30#include <linux/io.h> 30#include <linux/io.h>
31#include <linux/smsc911x.h> 31#include <linux/smsc911x.h>
32#include <linux/ata_platform.h> 32#include <linux/ata_platform.h>
33#include <linux/amba/mmci.h>
33 34
34#include <asm/clkdev.h> 35#include <asm/clkdev.h>
35#include <asm/system.h> 36#include <asm/system.h>
@@ -44,7 +45,6 @@
44#include <asm/mach/flash.h> 45#include <asm/mach/flash.h>
45#include <asm/mach/irq.h> 46#include <asm/mach/irq.h>
46#include <asm/mach/map.h> 47#include <asm/mach/map.h>
47#include <asm/mach/mmc.h>
48 48
49#include <asm/hardware/gic.h> 49#include <asm/hardware/gic.h>
50 50
@@ -237,14 +237,14 @@ static unsigned int realview_mmc_status(struct device *dev)
237 return readl(REALVIEW_SYSMCI) & mask; 237 return readl(REALVIEW_SYSMCI) & mask;
238} 238}
239 239
240struct mmc_platform_data realview_mmc0_plat_data = { 240struct mmci_platform_data realview_mmc0_plat_data = {
241 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, 241 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
242 .status = realview_mmc_status, 242 .status = realview_mmc_status,
243 .gpio_wp = 17, 243 .gpio_wp = 17,
244 .gpio_cd = 16, 244 .gpio_cd = 16,
245}; 245};
246 246
247struct mmc_platform_data realview_mmc1_plat_data = { 247struct mmci_platform_data realview_mmc1_plat_data = {
248 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, 248 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
249 .status = realview_mmc_status, 249 .status = realview_mmc_status,
250 .gpio_wp = 19, 250 .gpio_wp = 19,
@@ -296,31 +296,31 @@ static struct clk ref24_clk = {
296 296
297static struct clk_lookup lookups[] = { 297static struct clk_lookup lookups[] = {
298 { /* UART0 */ 298 { /* UART0 */
299 .dev_id = "dev:f1", 299 .dev_id = "dev:uart0",
300 .clk = &ref24_clk, 300 .clk = &ref24_clk,
301 }, { /* UART1 */ 301 }, { /* UART1 */
302 .dev_id = "dev:f2", 302 .dev_id = "dev:uart1",
303 .clk = &ref24_clk, 303 .clk = &ref24_clk,
304 }, { /* UART2 */ 304 }, { /* UART2 */
305 .dev_id = "dev:f3", 305 .dev_id = "dev:uart2",
306 .clk = &ref24_clk, 306 .clk = &ref24_clk,
307 }, { /* UART3 */ 307 }, { /* UART3 */
308 .dev_id = "fpga:09", 308 .dev_id = "fpga:uart3",
309 .clk = &ref24_clk, 309 .clk = &ref24_clk,
310 }, { /* KMI0 */ 310 }, { /* KMI0 */
311 .dev_id = "fpga:06", 311 .dev_id = "fpga:kmi0",
312 .clk = &ref24_clk, 312 .clk = &ref24_clk,
313 }, { /* KMI1 */ 313 }, { /* KMI1 */
314 .dev_id = "fpga:07", 314 .dev_id = "fpga:kmi1",
315 .clk = &ref24_clk, 315 .clk = &ref24_clk,
316 }, { /* MMC0 */ 316 }, { /* MMC0 */
317 .dev_id = "fpga:05", 317 .dev_id = "fpga:mmc0",
318 .clk = &ref24_clk, 318 .clk = &ref24_clk,
319 }, { /* EB:CLCD */ 319 }, { /* EB:CLCD */
320 .dev_id = "dev:20", 320 .dev_id = "dev:clcd",
321 .clk = &oscvco_clk, 321 .clk = &oscvco_clk,
322 }, { /* PB:CLCD */ 322 }, { /* PB:CLCD */
323 .dev_id = "issp:20", 323 .dev_id = "issp:clcd",
324 .clk = &oscvco_clk, 324 .clk = &oscvco_clk,
325 } 325 }
326}; 326};
diff --git a/arch/arm/mach-realview/core.h b/arch/arm/mach-realview/core.h
index 59a337ba4be7..46cd6acb4d40 100644
--- a/arch/arm/mach-realview/core.h
+++ b/arch/arm/mach-realview/core.h
@@ -47,8 +47,8 @@ static struct amba_device name##_device = { \
47extern struct platform_device realview_flash_device; 47extern struct platform_device realview_flash_device;
48extern struct platform_device realview_cf_device; 48extern struct platform_device realview_cf_device;
49extern struct platform_device realview_i2c_device; 49extern struct platform_device realview_i2c_device;
50extern struct mmc_platform_data realview_mmc0_plat_data; 50extern struct mmci_platform_data realview_mmc0_plat_data;
51extern struct mmc_platform_data realview_mmc1_plat_data; 51extern struct mmci_platform_data realview_mmc1_plat_data;
52extern struct clcd_board clcd_plat_data; 52extern struct clcd_board clcd_plat_data;
53extern void __iomem *gic_cpu_base_addr; 53extern void __iomem *gic_cpu_base_addr;
54extern void __iomem *timer0_va_base; 54extern void __iomem *timer0_va_base;
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c
index abd13b448671..1d65e64ae571 100644
--- a/arch/arm/mach-realview/realview_eb.c
+++ b/arch/arm/mach-realview/realview_eb.c
@@ -24,6 +24,7 @@
24#include <linux/sysdev.h> 24#include <linux/sysdev.h>
25#include <linux/amba/bus.h> 25#include <linux/amba/bus.h>
26#include <linux/amba/pl061.h> 26#include <linux/amba/pl061.h>
27#include <linux/amba/mmci.h>
27#include <linux/io.h> 28#include <linux/io.h>
28 29
29#include <mach/hardware.h> 30#include <mach/hardware.h>
@@ -37,7 +38,6 @@
37 38
38#include <asm/mach/arch.h> 39#include <asm/mach/arch.h>
39#include <asm/mach/map.h> 40#include <asm/mach/map.h>
40#include <asm/mach/mmc.h>
41#include <asm/mach/time.h> 41#include <asm/mach/time.h>
42 42
43#include <mach/board-eb.h> 43#include <mach/board-eb.h>
@@ -193,27 +193,27 @@ static struct pl061_platform_data gpio2_plat_data = {
193#define EB_SSP_DMA { 9, 8 } 193#define EB_SSP_DMA { 9, 8 }
194 194
195/* FPGA Primecells */ 195/* FPGA Primecells */
196AMBA_DEVICE(aaci, "fpga:04", AACI, NULL); 196AMBA_DEVICE(aaci, "fpga:aaci", AACI, NULL);
197AMBA_DEVICE(mmc0, "fpga:05", MMCI0, &realview_mmc0_plat_data); 197AMBA_DEVICE(mmc0, "fpga:mmc0", MMCI0, &realview_mmc0_plat_data);
198AMBA_DEVICE(kmi0, "fpga:06", KMI0, NULL); 198AMBA_DEVICE(kmi0, "fpga:kmi0", KMI0, NULL);
199AMBA_DEVICE(kmi1, "fpga:07", KMI1, NULL); 199AMBA_DEVICE(kmi1, "fpga:kmi1", KMI1, NULL);
200AMBA_DEVICE(uart3, "fpga:09", EB_UART3, NULL); 200AMBA_DEVICE(uart3, "fpga:uart3", EB_UART3, NULL);
201 201
202/* DevChip Primecells */ 202/* DevChip Primecells */
203AMBA_DEVICE(smc, "dev:00", EB_SMC, NULL); 203AMBA_DEVICE(smc, "dev:smc", EB_SMC, NULL);
204AMBA_DEVICE(clcd, "dev:20", EB_CLCD, &clcd_plat_data); 204AMBA_DEVICE(clcd, "dev:clcd", EB_CLCD, &clcd_plat_data);
205AMBA_DEVICE(dmac, "dev:30", DMAC, NULL); 205AMBA_DEVICE(dmac, "dev:dmac", DMAC, NULL);
206AMBA_DEVICE(sctl, "dev:e0", SCTL, NULL); 206AMBA_DEVICE(sctl, "dev:sctl", SCTL, NULL);
207AMBA_DEVICE(wdog, "dev:e1", EB_WATCHDOG, NULL); 207AMBA_DEVICE(wdog, "dev:wdog", EB_WATCHDOG, NULL);
208AMBA_DEVICE(gpio0, "dev:e4", EB_GPIO0, &gpio0_plat_data); 208AMBA_DEVICE(gpio0, "dev:gpio0", EB_GPIO0, &gpio0_plat_data);
209AMBA_DEVICE(gpio1, "dev:e5", GPIO1, &gpio1_plat_data); 209AMBA_DEVICE(gpio1, "dev:gpio1", GPIO1, &gpio1_plat_data);
210AMBA_DEVICE(gpio2, "dev:e6", GPIO2, &gpio2_plat_data); 210AMBA_DEVICE(gpio2, "dev:gpio2", GPIO2, &gpio2_plat_data);
211AMBA_DEVICE(rtc, "dev:e8", EB_RTC, NULL); 211AMBA_DEVICE(rtc, "dev:rtc", EB_RTC, NULL);
212AMBA_DEVICE(sci0, "dev:f0", SCI, NULL); 212AMBA_DEVICE(sci0, "dev:sci0", SCI, NULL);
213AMBA_DEVICE(uart0, "dev:f1", EB_UART0, NULL); 213AMBA_DEVICE(uart0, "dev:uart0", EB_UART0, NULL);
214AMBA_DEVICE(uart1, "dev:f2", EB_UART1, NULL); 214AMBA_DEVICE(uart1, "dev:uart1", EB_UART1, NULL);
215AMBA_DEVICE(uart2, "dev:f3", EB_UART2, NULL); 215AMBA_DEVICE(uart2, "dev:uart2", EB_UART2, NULL);
216AMBA_DEVICE(ssp0, "dev:f4", EB_SSP, NULL); 216AMBA_DEVICE(ssp0, "dev:ssp0", EB_SSP, NULL);
217 217
218static struct amba_device *amba_devs[] __initdata = { 218static struct amba_device *amba_devs[] __initdata = {
219 &dmac_device, 219 &dmac_device,
diff --git a/arch/arm/mach-realview/realview_pb1176.c b/arch/arm/mach-realview/realview_pb1176.c
index 17fbb0e889b6..2817fe099319 100644
--- a/arch/arm/mach-realview/realview_pb1176.c
+++ b/arch/arm/mach-realview/realview_pb1176.c
@@ -24,6 +24,7 @@
24#include <linux/sysdev.h> 24#include <linux/sysdev.h>
25#include <linux/amba/bus.h> 25#include <linux/amba/bus.h>
26#include <linux/amba/pl061.h> 26#include <linux/amba/pl061.h>
27#include <linux/amba/mmci.h>
27#include <linux/io.h> 28#include <linux/io.h>
28 29
29#include <mach/hardware.h> 30#include <mach/hardware.h>
@@ -37,7 +38,6 @@
37#include <asm/mach/arch.h> 38#include <asm/mach/arch.h>
38#include <asm/mach/flash.h> 39#include <asm/mach/flash.h>
39#include <asm/mach/map.h> 40#include <asm/mach/map.h>
40#include <asm/mach/mmc.h>
41#include <asm/mach/time.h> 41#include <asm/mach/time.h>
42 42
43#include <mach/board-pb1176.h> 43#include <mach/board-pb1176.h>
@@ -170,29 +170,29 @@ static struct pl061_platform_data gpio2_plat_data = {
170#define PB1176_SSP_DMA { 9, 8 } 170#define PB1176_SSP_DMA { 9, 8 }
171 171
172/* FPGA Primecells */ 172/* FPGA Primecells */
173AMBA_DEVICE(aaci, "fpga:04", AACI, NULL); 173AMBA_DEVICE(aaci, "fpga:aaci", AACI, NULL);
174AMBA_DEVICE(mmc0, "fpga:05", MMCI0, &realview_mmc0_plat_data); 174AMBA_DEVICE(mmc0, "fpga:mmc0", MMCI0, &realview_mmc0_plat_data);
175AMBA_DEVICE(kmi0, "fpga:06", KMI0, NULL); 175AMBA_DEVICE(kmi0, "fpga:kmi0", KMI0, NULL);
176AMBA_DEVICE(kmi1, "fpga:07", KMI1, NULL); 176AMBA_DEVICE(kmi1, "fpga:kmi1", KMI1, NULL);
177AMBA_DEVICE(uart3, "fpga:09", PB1176_UART3, NULL); 177AMBA_DEVICE(uart3, "fpga:uart3", PB1176_UART3, NULL);
178 178
179/* DevChip Primecells */ 179/* DevChip Primecells */
180AMBA_DEVICE(smc, "dev:00", PB1176_SMC, NULL); 180AMBA_DEVICE(smc, "dev:smc", PB1176_SMC, NULL);
181AMBA_DEVICE(sctl, "dev:e0", SCTL, NULL); 181AMBA_DEVICE(sctl, "dev:sctl", SCTL, NULL);
182AMBA_DEVICE(wdog, "dev:e1", PB1176_WATCHDOG, NULL); 182AMBA_DEVICE(wdog, "dev:wdog", PB1176_WATCHDOG, NULL);
183AMBA_DEVICE(gpio0, "dev:e4", PB1176_GPIO0, &gpio0_plat_data); 183AMBA_DEVICE(gpio0, "dev:gpio0", PB1176_GPIO0, &gpio0_plat_data);
184AMBA_DEVICE(gpio1, "dev:e5", GPIO1, &gpio1_plat_data); 184AMBA_DEVICE(gpio1, "dev:gpio1", GPIO1, &gpio1_plat_data);
185AMBA_DEVICE(gpio2, "dev:e6", GPIO2, &gpio2_plat_data); 185AMBA_DEVICE(gpio2, "dev:gpio2", GPIO2, &gpio2_plat_data);
186AMBA_DEVICE(rtc, "dev:e8", PB1176_RTC, NULL); 186AMBA_DEVICE(rtc, "dev:rtc", PB1176_RTC, NULL);
187AMBA_DEVICE(sci0, "dev:f0", SCI, NULL); 187AMBA_DEVICE(sci0, "dev:sci0", SCI, NULL);
188AMBA_DEVICE(uart0, "dev:f1", PB1176_UART0, NULL); 188AMBA_DEVICE(uart0, "dev:uart0", PB1176_UART0, NULL);
189AMBA_DEVICE(uart1, "dev:f2", PB1176_UART1, NULL); 189AMBA_DEVICE(uart1, "dev:uart1", PB1176_UART1, NULL);
190AMBA_DEVICE(uart2, "dev:f3", PB1176_UART2, NULL); 190AMBA_DEVICE(uart2, "dev:uart2", PB1176_UART2, NULL);
191AMBA_DEVICE(ssp0, "dev:f4", PB1176_SSP, NULL); 191AMBA_DEVICE(ssp0, "dev:ssp0", PB1176_SSP, NULL);
192 192
193/* Primecells on the NEC ISSP chip */ 193/* Primecells on the NEC ISSP chip */
194AMBA_DEVICE(clcd, "issp:20", PB1176_CLCD, &clcd_plat_data); 194AMBA_DEVICE(clcd, "issp:clcd", PB1176_CLCD, &clcd_plat_data);
195//AMBA_DEVICE(dmac, "issp:30", PB1176_DMAC, NULL); 195//AMBA_DEVICE(dmac, "issp:dmac", PB1176_DMAC, NULL);
196 196
197static struct amba_device *amba_devs[] __initdata = { 197static struct amba_device *amba_devs[] __initdata = {
198// &dmac_device, 198// &dmac_device,
diff --git a/arch/arm/mach-realview/realview_pb11mp.c b/arch/arm/mach-realview/realview_pb11mp.c
index fdd042b85f40..94680fcf726d 100644
--- a/arch/arm/mach-realview/realview_pb11mp.c
+++ b/arch/arm/mach-realview/realview_pb11mp.c
@@ -24,6 +24,7 @@
24#include <linux/sysdev.h> 24#include <linux/sysdev.h>
25#include <linux/amba/bus.h> 25#include <linux/amba/bus.h>
26#include <linux/amba/pl061.h> 26#include <linux/amba/pl061.h>
27#include <linux/amba/mmci.h>
27#include <linux/io.h> 28#include <linux/io.h>
28 29
29#include <mach/hardware.h> 30#include <mach/hardware.h>
@@ -38,7 +39,6 @@
38#include <asm/mach/arch.h> 39#include <asm/mach/arch.h>
39#include <asm/mach/flash.h> 40#include <asm/mach/flash.h>
40#include <asm/mach/map.h> 41#include <asm/mach/map.h>
41#include <asm/mach/mmc.h>
42#include <asm/mach/time.h> 42#include <asm/mach/time.h>
43 43
44#include <mach/board-pb11mp.h> 44#include <mach/board-pb11mp.h>
@@ -172,29 +172,29 @@ static struct pl061_platform_data gpio2_plat_data = {
172#define PB11MP_SSP_DMA { 9, 8 } 172#define PB11MP_SSP_DMA { 9, 8 }
173 173
174/* FPGA Primecells */ 174/* FPGA Primecells */
175AMBA_DEVICE(aaci, "fpga:04", AACI, NULL); 175AMBA_DEVICE(aaci, "fpga:aaci", AACI, NULL);
176AMBA_DEVICE(mmc0, "fpga:05", MMCI0, &realview_mmc0_plat_data); 176AMBA_DEVICE(mmc0, "fpga:mmc0", MMCI0, &realview_mmc0_plat_data);
177AMBA_DEVICE(kmi0, "fpga:06", KMI0, NULL); 177AMBA_DEVICE(kmi0, "fpga:kmi0", KMI0, NULL);
178AMBA_DEVICE(kmi1, "fpga:07", KMI1, NULL); 178AMBA_DEVICE(kmi1, "fpga:kmi1", KMI1, NULL);
179AMBA_DEVICE(uart3, "fpga:09", PB11MP_UART3, NULL); 179AMBA_DEVICE(uart3, "fpga:uart3", PB11MP_UART3, NULL);
180 180
181/* DevChip Primecells */ 181/* DevChip Primecells */
182AMBA_DEVICE(smc, "dev:00", PB11MP_SMC, NULL); 182AMBA_DEVICE(smc, "dev:smc", PB11MP_SMC, NULL);
183AMBA_DEVICE(sctl, "dev:e0", SCTL, NULL); 183AMBA_DEVICE(sctl, "dev:sctl", SCTL, NULL);
184AMBA_DEVICE(wdog, "dev:e1", PB11MP_WATCHDOG, NULL); 184AMBA_DEVICE(wdog, "dev:wdog", PB11MP_WATCHDOG, NULL);
185AMBA_DEVICE(gpio0, "dev:e4", PB11MP_GPIO0, &gpio0_plat_data); 185AMBA_DEVICE(gpio0, "dev:gpio0", PB11MP_GPIO0, &gpio0_plat_data);
186AMBA_DEVICE(gpio1, "dev:e5", GPIO1, &gpio1_plat_data); 186AMBA_DEVICE(gpio1, "dev:gpio1", GPIO1, &gpio1_plat_data);
187AMBA_DEVICE(gpio2, "dev:e6", GPIO2, &gpio2_plat_data); 187AMBA_DEVICE(gpio2, "dev:gpio2", GPIO2, &gpio2_plat_data);
188AMBA_DEVICE(rtc, "dev:e8", PB11MP_RTC, NULL); 188AMBA_DEVICE(rtc, "dev:rtc", PB11MP_RTC, NULL);
189AMBA_DEVICE(sci0, "dev:f0", SCI, NULL); 189AMBA_DEVICE(sci0, "dev:sci0", SCI, NULL);
190AMBA_DEVICE(uart0, "dev:f1", PB11MP_UART0, NULL); 190AMBA_DEVICE(uart0, "dev:uart0", PB11MP_UART0, NULL);
191AMBA_DEVICE(uart1, "dev:f2", PB11MP_UART1, NULL); 191AMBA_DEVICE(uart1, "dev:uart1", PB11MP_UART1, NULL);
192AMBA_DEVICE(uart2, "dev:f3", PB11MP_UART2, NULL); 192AMBA_DEVICE(uart2, "dev:uart2", PB11MP_UART2, NULL);
193AMBA_DEVICE(ssp0, "dev:f4", PB11MP_SSP, NULL); 193AMBA_DEVICE(ssp0, "dev:ssp0", PB11MP_SSP, NULL);
194 194
195/* Primecells on the NEC ISSP chip */ 195/* Primecells on the NEC ISSP chip */
196AMBA_DEVICE(clcd, "issp:20", PB11MP_CLCD, &clcd_plat_data); 196AMBA_DEVICE(clcd, "issp:clcd", PB11MP_CLCD, &clcd_plat_data);
197AMBA_DEVICE(dmac, "issp:30", DMAC, NULL); 197AMBA_DEVICE(dmac, "issp:dmac", DMAC, NULL);
198 198
199static struct amba_device *amba_devs[] __initdata = { 199static struct amba_device *amba_devs[] __initdata = {
200 &dmac_device, 200 &dmac_device,
diff --git a/arch/arm/mach-realview/realview_pba8.c b/arch/arm/mach-realview/realview_pba8.c
index 70bba9900d97..941beb2b9709 100644
--- a/arch/arm/mach-realview/realview_pba8.c
+++ b/arch/arm/mach-realview/realview_pba8.c
@@ -24,6 +24,7 @@
24#include <linux/sysdev.h> 24#include <linux/sysdev.h>
25#include <linux/amba/bus.h> 25#include <linux/amba/bus.h>
26#include <linux/amba/pl061.h> 26#include <linux/amba/pl061.h>
27#include <linux/amba/mmci.h>
27#include <linux/io.h> 28#include <linux/io.h>
28 29
29#include <asm/irq.h> 30#include <asm/irq.h>
@@ -34,7 +35,6 @@
34 35
35#include <asm/mach/arch.h> 36#include <asm/mach/arch.h>
36#include <asm/mach/map.h> 37#include <asm/mach/map.h>
37#include <asm/mach/mmc.h>
38#include <asm/mach/time.h> 38#include <asm/mach/time.h>
39 39
40#include <mach/hardware.h> 40#include <mach/hardware.h>
@@ -162,29 +162,29 @@ static struct pl061_platform_data gpio2_plat_data = {
162#define PBA8_SSP_DMA { 9, 8 } 162#define PBA8_SSP_DMA { 9, 8 }
163 163
164/* FPGA Primecells */ 164/* FPGA Primecells */
165AMBA_DEVICE(aaci, "fpga:04", AACI, NULL); 165AMBA_DEVICE(aaci, "fpga:aaci", AACI, NULL);
166AMBA_DEVICE(mmc0, "fpga:05", MMCI0, &realview_mmc0_plat_data); 166AMBA_DEVICE(mmc0, "fpga:mmc0", MMCI0, &realview_mmc0_plat_data);
167AMBA_DEVICE(kmi0, "fpga:06", KMI0, NULL); 167AMBA_DEVICE(kmi0, "fpga:kmi0", KMI0, NULL);
168AMBA_DEVICE(kmi1, "fpga:07", KMI1, NULL); 168AMBA_DEVICE(kmi1, "fpga:kmi1", KMI1, NULL);
169AMBA_DEVICE(uart3, "fpga:09", PBA8_UART3, NULL); 169AMBA_DEVICE(uart3, "fpga:uart3", PBA8_UART3, NULL);
170 170
171/* DevChip Primecells */ 171/* DevChip Primecells */
172AMBA_DEVICE(smc, "dev:00", PBA8_SMC, NULL); 172AMBA_DEVICE(smc, "dev:smc", PBA8_SMC, NULL);
173AMBA_DEVICE(sctl, "dev:e0", SCTL, NULL); 173AMBA_DEVICE(sctl, "dev:sctl", SCTL, NULL);
174AMBA_DEVICE(wdog, "dev:e1", PBA8_WATCHDOG, NULL); 174AMBA_DEVICE(wdog, "dev:wdog", PBA8_WATCHDOG, NULL);
175AMBA_DEVICE(gpio0, "dev:e4", PBA8_GPIO0, &gpio0_plat_data); 175AMBA_DEVICE(gpio0, "dev:gpio0", PBA8_GPIO0, &gpio0_plat_data);
176AMBA_DEVICE(gpio1, "dev:e5", GPIO1, &gpio1_plat_data); 176AMBA_DEVICE(gpio1, "dev:gpio1", GPIO1, &gpio1_plat_data);
177AMBA_DEVICE(gpio2, "dev:e6", GPIO2, &gpio2_plat_data); 177AMBA_DEVICE(gpio2, "dev:gpio2", GPIO2, &gpio2_plat_data);
178AMBA_DEVICE(rtc, "dev:e8", PBA8_RTC, NULL); 178AMBA_DEVICE(rtc, "dev:rtc", PBA8_RTC, NULL);
179AMBA_DEVICE(sci0, "dev:f0", SCI, NULL); 179AMBA_DEVICE(sci0, "dev:sci0", SCI, NULL);
180AMBA_DEVICE(uart0, "dev:f1", PBA8_UART0, NULL); 180AMBA_DEVICE(uart0, "dev:uart0", PBA8_UART0, NULL);
181AMBA_DEVICE(uart1, "dev:f2", PBA8_UART1, NULL); 181AMBA_DEVICE(uart1, "dev:uart1", PBA8_UART1, NULL);
182AMBA_DEVICE(uart2, "dev:f3", PBA8_UART2, NULL); 182AMBA_DEVICE(uart2, "dev:uart2", PBA8_UART2, NULL);
183AMBA_DEVICE(ssp0, "dev:f4", PBA8_SSP, NULL); 183AMBA_DEVICE(ssp0, "dev:ssp0", PBA8_SSP, NULL);
184 184
185/* Primecells on the NEC ISSP chip */ 185/* Primecells on the NEC ISSP chip */
186AMBA_DEVICE(clcd, "issp:20", PBA8_CLCD, &clcd_plat_data); 186AMBA_DEVICE(clcd, "issp:clcd", PBA8_CLCD, &clcd_plat_data);
187AMBA_DEVICE(dmac, "issp:30", DMAC, NULL); 187AMBA_DEVICE(dmac, "issp:dmac", DMAC, NULL);
188 188
189static struct amba_device *amba_devs[] __initdata = { 189static struct amba_device *amba_devs[] __initdata = {
190 &dmac_device, 190 &dmac_device,
diff --git a/arch/arm/mach-realview/realview_pbx.c b/arch/arm/mach-realview/realview_pbx.c
index ce6c5d25fbef..7e4bc6cdca52 100644
--- a/arch/arm/mach-realview/realview_pbx.c
+++ b/arch/arm/mach-realview/realview_pbx.c
@@ -23,6 +23,7 @@
23#include <linux/sysdev.h> 23#include <linux/sysdev.h>
24#include <linux/amba/bus.h> 24#include <linux/amba/bus.h>
25#include <linux/amba/pl061.h> 25#include <linux/amba/pl061.h>
26#include <linux/amba/mmci.h>
26#include <linux/io.h> 27#include <linux/io.h>
27 28
28#include <asm/irq.h> 29#include <asm/irq.h>
@@ -34,7 +35,6 @@
34 35
35#include <asm/mach/arch.h> 36#include <asm/mach/arch.h>
36#include <asm/mach/map.h> 37#include <asm/mach/map.h>
37#include <asm/mach/mmc.h>
38#include <asm/mach/time.h> 38#include <asm/mach/time.h>
39 39
40#include <mach/hardware.h> 40#include <mach/hardware.h>
@@ -182,29 +182,29 @@ static struct pl061_platform_data gpio2_plat_data = {
182#define PBX_SSP_DMA { 9, 8 } 182#define PBX_SSP_DMA { 9, 8 }
183 183
184/* FPGA Primecells */ 184/* FPGA Primecells */
185AMBA_DEVICE(aaci, "fpga:04", AACI, NULL); 185AMBA_DEVICE(aaci, "fpga:aaci", AACI, NULL);
186AMBA_DEVICE(mmc0, "fpga:05", MMCI0, &realview_mmc0_plat_data); 186AMBA_DEVICE(mmc0, "fpga:mmc0", MMCI0, &realview_mmc0_plat_data);
187AMBA_DEVICE(kmi0, "fpga:06", KMI0, NULL); 187AMBA_DEVICE(kmi0, "fpga:kmi0", KMI0, NULL);
188AMBA_DEVICE(kmi1, "fpga:07", KMI1, NULL); 188AMBA_DEVICE(kmi1, "fpga:kmi1", KMI1, NULL);
189AMBA_DEVICE(uart3, "fpga:09", PBX_UART3, NULL); 189AMBA_DEVICE(uart3, "fpga:uart3", PBX_UART3, NULL);
190 190
191/* DevChip Primecells */ 191/* DevChip Primecells */
192AMBA_DEVICE(smc, "dev:00", PBX_SMC, NULL); 192AMBA_DEVICE(smc, "dev:smc", PBX_SMC, NULL);
193AMBA_DEVICE(sctl, "dev:e0", SCTL, NULL); 193AMBA_DEVICE(sctl, "dev:sctl", SCTL, NULL);
194AMBA_DEVICE(wdog, "dev:e1", PBX_WATCHDOG, NULL); 194AMBA_DEVICE(wdog, "dev:wdog", PBX_WATCHDOG, NULL);
195AMBA_DEVICE(gpio0, "dev:e4", PBX_GPIO0, &gpio0_plat_data); 195AMBA_DEVICE(gpio0, "dev:gpio0", PBX_GPIO0, &gpio0_plat_data);
196AMBA_DEVICE(gpio1, "dev:e5", GPIO1, &gpio1_plat_data); 196AMBA_DEVICE(gpio1, "dev:gpio1", GPIO1, &gpio1_plat_data);
197AMBA_DEVICE(gpio2, "dev:e6", GPIO2, &gpio2_plat_data); 197AMBA_DEVICE(gpio2, "dev:gpio2", GPIO2, &gpio2_plat_data);
198AMBA_DEVICE(rtc, "dev:e8", PBX_RTC, NULL); 198AMBA_DEVICE(rtc, "dev:rtc", PBX_RTC, NULL);
199AMBA_DEVICE(sci0, "dev:f0", SCI, NULL); 199AMBA_DEVICE(sci0, "dev:sci0", SCI, NULL);
200AMBA_DEVICE(uart0, "dev:f1", PBX_UART0, NULL); 200AMBA_DEVICE(uart0, "dev:uart0", PBX_UART0, NULL);
201AMBA_DEVICE(uart1, "dev:f2", PBX_UART1, NULL); 201AMBA_DEVICE(uart1, "dev:uart1", PBX_UART1, NULL);
202AMBA_DEVICE(uart2, "dev:f3", PBX_UART2, NULL); 202AMBA_DEVICE(uart2, "dev:uart2", PBX_UART2, NULL);
203AMBA_DEVICE(ssp0, "dev:f4", PBX_SSP, NULL); 203AMBA_DEVICE(ssp0, "dev:ssp0", PBX_SSP, NULL);
204 204
205/* Primecells on the NEC ISSP chip */ 205/* Primecells on the NEC ISSP chip */
206AMBA_DEVICE(clcd, "issp:20", PBX_CLCD, &clcd_plat_data); 206AMBA_DEVICE(clcd, "issp:clcd", PBX_CLCD, &clcd_plat_data);
207AMBA_DEVICE(dmac, "issp:30", DMAC, NULL); 207AMBA_DEVICE(dmac, "issp:dmac", DMAC, NULL);
208 208
209static struct amba_device *amba_devs[] __initdata = { 209static struct amba_device *amba_devs[] __initdata = {
210 &dmac_device, 210 &dmac_device,
diff --git a/arch/arm/mach-s3c2410/Kconfig b/arch/arm/mach-s3c2410/Kconfig
index d8c023d4df30..3d4e9da3fa52 100644
--- a/arch/arm/mach-s3c2410/Kconfig
+++ b/arch/arm/mach-s3c2410/Kconfig
@@ -77,6 +77,7 @@ config ARCH_H1940
77 select CPU_S3C2410 77 select CPU_S3C2410
78 select PM_H1940 if PM 78 select PM_H1940 if PM
79 select S3C_DEV_USB_HOST 79 select S3C_DEV_USB_HOST
80 select S3C_DEV_NAND
80 help 81 help
81 Say Y here if you are using the HP IPAQ H1940 82 Say Y here if you are using the HP IPAQ H1940
82 83
@@ -89,6 +90,7 @@ config MACH_N30
89 bool "Acer N30 family" 90 bool "Acer N30 family"
90 select CPU_S3C2410 91 select CPU_S3C2410
91 select S3C_DEV_USB_HOST 92 select S3C_DEV_USB_HOST
93 select S3C_DEV_NAND
92 help 94 help
93 Say Y here if you want suppt for the Acer N30, Acer N35, 95 Say Y here if you want suppt for the Acer N30, Acer N35,
94 Navman PiN570, Yakumo AlphaX or Airis NC05 PDAs. 96 Navman PiN570, Yakumo AlphaX or Airis NC05 PDAs.
@@ -103,6 +105,7 @@ config ARCH_BAST
103 select S3C24XX_DCLK 105 select S3C24XX_DCLK
104 select ISA 106 select ISA
105 select S3C_DEV_USB_HOST 107 select S3C_DEV_USB_HOST
108 select S3C_DEV_NAND
106 help 109 help
107 Say Y here if you are using the Simtec Electronics EB2410ITX 110 Say Y here if you are using the Simtec Electronics EB2410ITX
108 development board (also known as BAST) 111 development board (also known as BAST)
@@ -111,6 +114,7 @@ config MACH_OTOM
111 bool "NexVision OTOM Board" 114 bool "NexVision OTOM Board"
112 select CPU_S3C2410 115 select CPU_S3C2410
113 select S3C_DEV_USB_HOST 116 select S3C_DEV_USB_HOST
117 select S3C_DEV_NAND
114 help 118 help
115 Say Y here if you are using the Nex Vision OTOM board 119 Say Y here if you are using the Nex Vision OTOM board
116 120
@@ -154,6 +158,7 @@ config MACH_QT2410
154 bool "QT2410" 158 bool "QT2410"
155 select CPU_S3C2410 159 select CPU_S3C2410
156 select S3C_DEV_USB_HOST 160 select S3C_DEV_USB_HOST
161 select S3C_DEV_NAND
157 help 162 help
158 Say Y here if you are using the Armzone QT2410 163 Say Y here if you are using the Armzone QT2410
159 164
diff --git a/arch/arm/mach-s3c2412/Kconfig b/arch/arm/mach-s3c2412/Kconfig
index 35c1bde89cf2..c2bdc4635d12 100644
--- a/arch/arm/mach-s3c2412/Kconfig
+++ b/arch/arm/mach-s3c2412/Kconfig
@@ -48,6 +48,7 @@ config MACH_JIVE
48 bool "Logitech Jive" 48 bool "Logitech Jive"
49 select CPU_S3C2412 49 select CPU_S3C2412
50 select S3C_DEV_USB_HOST 50 select S3C_DEV_USB_HOST
51 select S3C_DEV_NAND
51 help 52 help
52 Say Y here if you are using the Logitech Jive. 53 Say Y here if you are using the Logitech Jive.
53 54
@@ -61,6 +62,7 @@ config MACH_SMDK2413
61 select MACH_S3C2413 62 select MACH_S3C2413
62 select MACH_SMDK 63 select MACH_SMDK
63 select S3C_DEV_USB_HOST 64 select S3C_DEV_USB_HOST
65 select S3C_DEV_NAND
64 help 66 help
65 Say Y here if you are using an SMDK2413 67 Say Y here if you are using an SMDK2413
66 68
@@ -84,6 +86,7 @@ config MACH_VSTMS
84 bool "VMSTMS" 86 bool "VMSTMS"
85 select CPU_S3C2412 87 select CPU_S3C2412
86 select S3C_DEV_USB_HOST 88 select S3C_DEV_USB_HOST
89 select S3C_DEV_NAND
87 help 90 help
88 Say Y here if you are using an VSTMS board 91 Say Y here if you are using an VSTMS board
89 92
diff --git a/arch/arm/mach-s3c2440/Kconfig b/arch/arm/mach-s3c2440/Kconfig
index 8ae1b288f7fa..d7bba919a77e 100644
--- a/arch/arm/mach-s3c2440/Kconfig
+++ b/arch/arm/mach-s3c2440/Kconfig
@@ -48,6 +48,7 @@ config MACH_OSIRIS
48 select S3C2440_XTAL_12000000 48 select S3C2440_XTAL_12000000
49 select S3C2410_IOTIMING if S3C2440_CPUFREQ 49 select S3C2410_IOTIMING if S3C2440_CPUFREQ
50 select S3C_DEV_USB_HOST 50 select S3C_DEV_USB_HOST
51 select S3C_DEV_NAND
51 help 52 help
52 Say Y here if you are using the Simtec IM2440D20 module, also 53 Say Y here if you are using the Simtec IM2440D20 module, also
53 known as the Osiris. 54 known as the Osiris.
@@ -57,6 +58,7 @@ config MACH_RX3715
57 select CPU_S3C2440 58 select CPU_S3C2440
58 select S3C2440_XTAL_16934400 59 select S3C2440_XTAL_16934400
59 select PM_H1940 if PM 60 select PM_H1940 if PM
61 select S3C_DEV_NAND
60 help 62 help
61 Say Y here if you are using the HP iPAQ rx3715. 63 Say Y here if you are using the HP iPAQ rx3715.
62 64
@@ -66,6 +68,7 @@ config ARCH_S3C2440
66 select S3C2440_XTAL_16934400 68 select S3C2440_XTAL_16934400
67 select MACH_SMDK 69 select MACH_SMDK
68 select S3C_DEV_USB_HOST 70 select S3C_DEV_USB_HOST
71 select S3C_DEV_NAND
69 help 72 help
70 Say Y here if you are using the SMDK2440. 73 Say Y here if you are using the SMDK2440.
71 74
@@ -74,6 +77,7 @@ config MACH_NEXCODER_2440
74 select CPU_S3C2440 77 select CPU_S3C2440
75 select S3C2440_XTAL_12000000 78 select S3C2440_XTAL_12000000
76 select S3C_DEV_USB_HOST 79 select S3C_DEV_USB_HOST
80 select S3C_DEV_NAND
77 help 81 help
78 Say Y here if you are using the Nex Vision NEXCODER 2440 Light Board 82 Say Y here if you are using the Nex Vision NEXCODER 2440 Light Board
79 83
@@ -88,6 +92,7 @@ config MACH_AT2440EVB
88 bool "Avantech AT2440EVB development board" 92 bool "Avantech AT2440EVB development board"
89 select CPU_S3C2440 93 select CPU_S3C2440
90 select S3C_DEV_USB_HOST 94 select S3C_DEV_USB_HOST
95 select S3C_DEV_NAND
91 help 96 help
92 Say Y here if you are using the AT2440EVB development board 97 Say Y here if you are using the AT2440EVB development board
93 98
@@ -97,6 +102,7 @@ config MACH_MINI2440
97 select EEPROM_AT24 102 select EEPROM_AT24
98 select LEDS_TRIGGER_BACKLIGHT 103 select LEDS_TRIGGER_BACKLIGHT
99 select SND_S3C24XX_SOC_S3C24XX_UDA134X 104 select SND_S3C24XX_SOC_S3C24XX_UDA134X
105 select S3C_DEV_NAND
100 help 106 help
101 Say Y here to select support for the MINI2440. Is a 10cm x 10cm board 107 Say Y here to select support for the MINI2440. Is a 10cm x 10cm board
102 available via various sources. It can come with a 3.5" or 7" touch LCD. 108 available via various sources. It can come with a 3.5" or 7" touch LCD.
diff --git a/arch/arm/mach-s3c6400/Kconfig b/arch/arm/mach-s3c6400/Kconfig
index f5af212066c3..770b72067e3d 100644
--- a/arch/arm/mach-s3c6400/Kconfig
+++ b/arch/arm/mach-s3c6400/Kconfig
@@ -26,6 +26,7 @@ config MACH_SMDK6400
26 bool "SMDK6400" 26 bool "SMDK6400"
27 select CPU_S3C6400 27 select CPU_S3C6400
28 select S3C_DEV_HSMMC 28 select S3C_DEV_HSMMC
29 select S3C_DEV_NAND
29 select S3C6400_SETUP_SDHCI 30 select S3C6400_SETUP_SDHCI
30 help 31 help
31 Machine support for the Samsung SMDK6400 32 Machine support for the Samsung SMDK6400
diff --git a/arch/arm/mach-s3c6410/Kconfig b/arch/arm/mach-s3c6410/Kconfig
index f9d0f09f9761..53fc3ff657f7 100644
--- a/arch/arm/mach-s3c6410/Kconfig
+++ b/arch/arm/mach-s3c6410/Kconfig
@@ -102,6 +102,7 @@ config MACH_HMT
102 bool "Airgoo HMT" 102 bool "Airgoo HMT"
103 select CPU_S3C6410 103 select CPU_S3C6410
104 select S3C_DEV_FB 104 select S3C_DEV_FB
105 select S3C_DEV_NAND
105 select S3C_DEV_USB_HOST 106 select S3C_DEV_USB_HOST
106 select S3C64XX_SETUP_FB_24BPP 107 select S3C64XX_SETUP_FB_24BPP
107 select HAVE_PWM 108 select HAVE_PWM
diff --git a/arch/arm/mach-sa1100/dma.c b/arch/arm/mach-sa1100/dma.c
index 95f9c5a6d6d5..cb4521a6f42d 100644
--- a/arch/arm/mach-sa1100/dma.c
+++ b/arch/arm/mach-sa1100/dma.c
@@ -39,7 +39,7 @@ typedef struct {
39 39
40static sa1100_dma_t dma_chan[SA1100_DMA_CHANNELS]; 40static sa1100_dma_t dma_chan[SA1100_DMA_CHANNELS];
41 41
42static spinlock_t dma_list_lock; 42static DEFINE_SPINLOCK(dma_list_lock);
43 43
44 44
45static irqreturn_t dma_irq_handler(int irq, void *dev_id) 45static irqreturn_t dma_irq_handler(int irq, void *dev_id)
diff --git a/arch/arm/mach-u300/Kconfig b/arch/arm/mach-u300/Kconfig
index 337b9aabce49..801b21e7f677 100644
--- a/arch/arm/mach-u300/Kconfig
+++ b/arch/arm/mach-u300/Kconfig
@@ -81,6 +81,18 @@ config MACH_U300_SEMI_IS_SHARED
81 Memory Interface) from both from access and application 81 Memory Interface) from both from access and application
82 side. 82 side.
83 83
84config MACH_U300_SPIDUMMY
85 bool "SSP/SPI dummy chip"
86 select SPI
87 select SPI_MASTER
88 select SPI_PL022
89 help
90 This creates a small kernel module that creates a dummy
91 SPI device to be used for loopback tests. Regularly used
92 to test reference designs. If you're not testing SPI,
93 you don't need it. Selecting this will activate the
94 SPI framework and ARM PL022 support.
95
84comment "All the settings below must match the bootloader's settings" 96comment "All the settings below must match the bootloader's settings"
85 97
86config MACH_U300_ACCESS_MEM_SIZE 98config MACH_U300_ACCESS_MEM_SIZE
diff --git a/arch/arm/mach-u300/Makefile b/arch/arm/mach-u300/Makefile
index 24950e0df4b4..885b5c027c1e 100644
--- a/arch/arm/mach-u300/Makefile
+++ b/arch/arm/mach-u300/Makefile
@@ -9,3 +9,6 @@ obj- :=
9 9
10obj-$(CONFIG_ARCH_U300) += u300.o 10obj-$(CONFIG_ARCH_U300) += u300.o
11obj-$(CONFIG_MMC) += mmc.o 11obj-$(CONFIG_MMC) += mmc.o
12obj-$(CONFIG_SPI_PL022) += spi.o
13obj-$(CONFIG_MACH_U300_SPIDUMMY) += dummyspichip.o
14obj-$(CONFIG_I2C_STU300) += i2c.o
diff --git a/arch/arm/mach-u300/core.c b/arch/arm/mach-u300/core.c
index 2e9b8ccd8ec2..be60d6deee8b 100644
--- a/arch/arm/mach-u300/core.c
+++ b/arch/arm/mach-u300/core.c
@@ -32,6 +32,8 @@
32 32
33#include "clock.h" 33#include "clock.h"
34#include "mmc.h" 34#include "mmc.h"
35#include "spi.h"
36#include "i2c.h"
35 37
36/* 38/*
37 * Static I/O mappings that are needed for booting the U300 platforms. The 39 * Static I/O mappings that are needed for booting the U300 platforms. The
@@ -378,14 +380,14 @@ static struct platform_device wdog_device = {
378}; 380};
379 381
380static struct platform_device i2c0_device = { 382static struct platform_device i2c0_device = {
381 .name = "stddci2c", 383 .name = "stu300",
382 .id = 0, 384 .id = 0,
383 .num_resources = ARRAY_SIZE(i2c0_resources), 385 .num_resources = ARRAY_SIZE(i2c0_resources),
384 .resource = i2c0_resources, 386 .resource = i2c0_resources,
385}; 387};
386 388
387static struct platform_device i2c1_device = { 389static struct platform_device i2c1_device = {
388 .name = "stddci2c", 390 .name = "stu300",
389 .id = 1, 391 .id = 1,
390 .num_resources = ARRAY_SIZE(i2c1_resources), 392 .num_resources = ARRAY_SIZE(i2c1_resources),
391 .resource = i2c1_resources, 393 .resource = i2c1_resources,
@@ -611,6 +613,8 @@ void __init u300_init_devices(void)
611 /* Wait for the PLL208 to lock if not locked in yet */ 613 /* Wait for the PLL208 to lock if not locked in yet */
612 while (!(readw(U300_SYSCON_VBASE + U300_SYSCON_CSR) & 614 while (!(readw(U300_SYSCON_VBASE + U300_SYSCON_CSR) &
613 U300_SYSCON_CSR_PLL208_LOCK_IND)); 615 U300_SYSCON_CSR_PLL208_LOCK_IND));
616 /* Initialize SPI device with some board specifics */
617 u300_spi_init(&pl022_device);
614 618
615 /* Register the AMBA devices in the AMBA bus abstraction layer */ 619 /* Register the AMBA devices in the AMBA bus abstraction layer */
616 u300_clock_primecells(); 620 u300_clock_primecells();
@@ -622,6 +626,12 @@ void __init u300_init_devices(void)
622 626
623 u300_assign_physmem(); 627 u300_assign_physmem();
624 628
629 /* Register subdevices on the I2C buses */
630 u300_i2c_register_board_devices();
631
632 /* Register subdevices on the SPI bus */
633 u300_spi_register_board_devices();
634
625 /* Register the platform devices */ 635 /* Register the platform devices */
626 platform_add_devices(platform_devs, ARRAY_SIZE(platform_devs)); 636 platform_add_devices(platform_devs, ARRAY_SIZE(platform_devs));
627 637
diff --git a/arch/arm/mach-u300/dummyspichip.c b/arch/arm/mach-u300/dummyspichip.c
new file mode 100644
index 000000000000..962f9de454de
--- /dev/null
+++ b/arch/arm/mach-u300/dummyspichip.c
@@ -0,0 +1,290 @@
1/*
2 * arch/arm/mach-u300/dummyspichip.c
3 *
4 * Copyright (C) 2007-2009 ST-Ericsson AB
5 * License terms: GNU General Public License (GPL) version 2
6 * This is a dummy loopback SPI "chip" used for testing SPI.
7 * Author: Linus Walleij <linus.walleij@stericsson.com>
8 */
9#include <linux/init.h>
10#include <linux/module.h>
11#include <linux/kernel.h>
12#include <linux/device.h>
13#include <linux/err.h>
14#include <linux/sysfs.h>
15#include <linux/mutex.h>
16#include <linux/spi/spi.h>
17#include <linux/dma-mapping.h>
18/*
19 * WARNING! Do not include this pl022-specific controller header
20 * for any generic driver. It is only done in this dummy chip
21 * because we alter the chip configuration in order to test some
22 * different settings on the loopback device. Normal chip configs
23 * shall be STATIC and not altered by the driver!
24 */
25#include <linux/amba/pl022.h>
26
27struct dummy {
28 struct device *dev;
29 struct mutex lock;
30};
31
32#define DMA_TEST_SIZE 2048
33
34/* When we cat /sys/bus/spi/devices/spi0.0/looptest this will be triggered */
35static ssize_t dummy_looptest(struct device *dev,
36 struct device_attribute *attr, char *buf)
37{
38 struct spi_device *spi = to_spi_device(dev);
39 struct dummy *p_dummy = dev_get_drvdata(&spi->dev);
40
41 /*
42 * WARNING! Do not dereference the chip-specific data in any normal
43 * driver for a chip. It is usually STATIC and shall not be read
44 * or written to. Your chip driver should NOT depend on fields in this
45 * struct, this is just used here to alter the behaviour of the chip
46 * in order to perform tests.
47 */
48 struct pl022_config_chip *chip_info = spi->controller_data;
49 int status;
50 u8 txbuf[14] = {0xDE, 0xAD, 0xBE, 0xEF, 0x2B, 0xAD,
51 0xCA, 0xFE, 0xBA, 0xBE, 0xB1, 0x05,
52 0xF0, 0x0D};
53 u8 rxbuf[14];
54 u8 *bigtxbuf_virtual;
55 u8 *bigrxbuf_virtual;
56
57 if (mutex_lock_interruptible(&p_dummy->lock))
58 return -ERESTARTSYS;
59
60 bigtxbuf_virtual = kmalloc(DMA_TEST_SIZE, GFP_KERNEL);
61 if (bigtxbuf_virtual == NULL) {
62 status = -ENOMEM;
63 goto out;
64 }
65 bigrxbuf_virtual = kmalloc(DMA_TEST_SIZE, GFP_KERNEL);
66
67 /* Fill TXBUF with some happy pattern */
68 memset(bigtxbuf_virtual, 0xAA, DMA_TEST_SIZE);
69
70 /*
71 * Force chip to 8 bit mode
72 * WARNING: NEVER DO THIS IN REAL DRIVER CODE, THIS SHOULD BE STATIC!
73 */
74 chip_info->data_size = SSP_DATA_BITS_8;
75 /* You should NOT DO THIS EITHER */
76 spi->master->setup(spi);
77
78 /* Now run the tests for 8bit mode */
79 pr_info("Simple test 1: write 0xAA byte, read back garbage byte "
80 "in 8bit mode\n");
81 status = spi_w8r8(spi, 0xAA);
82 if (status < 0)
83 pr_warning("Siple test 1: FAILURE: spi_write_then_read "
84 "failed with status %d\n", status);
85 else
86 pr_info("Simple test 1: SUCCESS!\n");
87
88 pr_info("Simple test 2: write 8 bytes, read back 8 bytes garbage "
89 "in 8bit mode (full FIFO)\n");
90 status = spi_write_then_read(spi, &txbuf[0], 8, &rxbuf[0], 8);
91 if (status < 0)
92 pr_warning("Simple test 2: FAILURE: spi_write_then_read() "
93 "failed with status %d\n", status);
94 else
95 pr_info("Simple test 2: SUCCESS!\n");
96
97 pr_info("Simple test 3: write 14 bytes, read back 14 bytes garbage "
98 "in 8bit mode (see if we overflow FIFO)\n");
99 status = spi_write_then_read(spi, &txbuf[0], 14, &rxbuf[0], 14);
100 if (status < 0)
101 pr_warning("Simple test 3: FAILURE: failed with status %d "
102 "(probably FIFO overrun)\n", status);
103 else
104 pr_info("Simple test 3: SUCCESS!\n");
105
106 pr_info("Simple test 4: write 8 bytes with spi_write(), read 8 "
107 "bytes garbage with spi_read() in 8bit mode\n");
108 status = spi_write(spi, &txbuf[0], 8);
109 if (status < 0)
110 pr_warning("Simple test 4 step 1: FAILURE: spi_write() "
111 "failed with status %d\n", status);
112 else
113 pr_info("Simple test 4 step 1: SUCCESS!\n");
114 status = spi_read(spi, &rxbuf[0], 8);
115 if (status < 0)
116 pr_warning("Simple test 4 step 2: FAILURE: spi_read() "
117 "failed with status %d\n", status);
118 else
119 pr_info("Simple test 4 step 2: SUCCESS!\n");
120
121 pr_info("Simple test 5: write 14 bytes with spi_write(), read "
122 "14 bytes garbage with spi_read() in 8bit mode\n");
123 status = spi_write(spi, &txbuf[0], 14);
124 if (status < 0)
125 pr_warning("Simple test 5 step 1: FAILURE: spi_write() "
126 "failed with status %d (probably FIFO overrun)\n",
127 status);
128 else
129 pr_info("Simple test 5 step 1: SUCCESS!\n");
130 status = spi_read(spi, &rxbuf[0], 14);
131 if (status < 0)
132 pr_warning("Simple test 5 step 2: FAILURE: spi_read() "
133 "failed with status %d (probably FIFO overrun)\n",
134 status);
135 else
136 pr_info("Simple test 5: SUCCESS!\n");
137
138 pr_info("Simple test 6: write %d bytes with spi_write(), "
139 "read %d bytes garbage with spi_read() in 8bit mode\n",
140 DMA_TEST_SIZE, DMA_TEST_SIZE);
141 status = spi_write(spi, &bigtxbuf_virtual[0], DMA_TEST_SIZE);
142 if (status < 0)
143 pr_warning("Simple test 6 step 1: FAILURE: spi_write() "
144 "failed with status %d (probably FIFO overrun)\n",
145 status);
146 else
147 pr_info("Simple test 6 step 1: SUCCESS!\n");
148 status = spi_read(spi, &bigrxbuf_virtual[0], DMA_TEST_SIZE);
149 if (status < 0)
150 pr_warning("Simple test 6 step 2: FAILURE: spi_read() "
151 "failed with status %d (probably FIFO overrun)\n",
152 status);
153 else
154 pr_info("Simple test 6: SUCCESS!\n");
155
156
157 /*
158 * Force chip to 16 bit mode
159 * WARNING: NEVER DO THIS IN REAL DRIVER CODE, THIS SHOULD BE STATIC!
160 */
161 chip_info->data_size = SSP_DATA_BITS_16;
162 /* You should NOT DO THIS EITHER */
163 spi->master->setup(spi);
164
165 pr_info("Simple test 7: write 0xAA byte, read back garbage byte "
166 "in 16bit bus mode\n");
167 status = spi_w8r8(spi, 0xAA);
168 if (status == -EIO)
169 pr_info("Simple test 7: SUCCESS! (expected failure with "
170 "status EIO)\n");
171 else if (status < 0)
172 pr_warning("Siple test 7: FAILURE: spi_write_then_read "
173 "failed with status %d\n", status);
174 else
175 pr_warning("Siple test 7: FAILURE: spi_write_then_read "
176 "succeeded but it was expected to fail!\n");
177
178 pr_info("Simple test 8: write 8 bytes, read back 8 bytes garbage "
179 "in 16bit mode (full FIFO)\n");
180 status = spi_write_then_read(spi, &txbuf[0], 8, &rxbuf[0], 8);
181 if (status < 0)
182 pr_warning("Simple test 8: FAILURE: spi_write_then_read() "
183 "failed with status %d\n", status);
184 else
185 pr_info("Simple test 8: SUCCESS!\n");
186
187 pr_info("Simple test 9: write 14 bytes, read back 14 bytes garbage "
188 "in 16bit mode (see if we overflow FIFO)\n");
189 status = spi_write_then_read(spi, &txbuf[0], 14, &rxbuf[0], 14);
190 if (status < 0)
191 pr_warning("Simple test 9: FAILURE: failed with status %d "
192 "(probably FIFO overrun)\n", status);
193 else
194 pr_info("Simple test 9: SUCCESS!\n");
195
196 pr_info("Simple test 10: write %d bytes with spi_write(), "
197 "read %d bytes garbage with spi_read() in 16bit mode\n",
198 DMA_TEST_SIZE, DMA_TEST_SIZE);
199 status = spi_write(spi, &bigtxbuf_virtual[0], DMA_TEST_SIZE);
200 if (status < 0)
201 pr_warning("Simple test 10 step 1: FAILURE: spi_write() "
202 "failed with status %d (probably FIFO overrun)\n",
203 status);
204 else
205 pr_info("Simple test 10 step 1: SUCCESS!\n");
206
207 status = spi_read(spi, &bigrxbuf_virtual[0], DMA_TEST_SIZE);
208 if (status < 0)
209 pr_warning("Simple test 10 step 2: FAILURE: spi_read() "
210 "failed with status %d (probably FIFO overrun)\n",
211 status);
212 else
213 pr_info("Simple test 10: SUCCESS!\n");
214
215 status = sprintf(buf, "loop test complete\n");
216 kfree(bigrxbuf_virtual);
217 kfree(bigtxbuf_virtual);
218 out:
219 mutex_unlock(&p_dummy->lock);
220 return status;
221}
222
223static DEVICE_ATTR(looptest, S_IRUGO, dummy_looptest, NULL);
224
225static int __devinit pl022_dummy_probe(struct spi_device *spi)
226{
227 struct dummy *p_dummy;
228 int status;
229
230 dev_info(&spi->dev, "probing dummy SPI device\n");
231
232 p_dummy = kzalloc(sizeof *p_dummy, GFP_KERNEL);
233 if (!p_dummy)
234 return -ENOMEM;
235
236 dev_set_drvdata(&spi->dev, p_dummy);
237 mutex_init(&p_dummy->lock);
238
239 /* sysfs hook */
240 status = device_create_file(&spi->dev, &dev_attr_looptest);
241 if (status) {
242 dev_dbg(&spi->dev, "device_create_file looptest failure.\n");
243 goto out_dev_create_looptest_failed;
244 }
245
246 return 0;
247
248out_dev_create_looptest_failed:
249 dev_set_drvdata(&spi->dev, NULL);
250 kfree(p_dummy);
251 return status;
252}
253
254static int __devexit pl022_dummy_remove(struct spi_device *spi)
255{
256 struct dummy *p_dummy = dev_get_drvdata(&spi->dev);
257
258 dev_info(&spi->dev, "removing dummy SPI device\n");
259 device_remove_file(&spi->dev, &dev_attr_looptest);
260 dev_set_drvdata(&spi->dev, NULL);
261 kfree(p_dummy);
262
263 return 0;
264}
265
266static struct spi_driver pl022_dummy_driver = {
267 .driver = {
268 .name = "spi-dummy",
269 .owner = THIS_MODULE,
270 },
271 .probe = pl022_dummy_probe,
272 .remove = __devexit_p(pl022_dummy_remove),
273};
274
275static int __init pl022_init_dummy(void)
276{
277 return spi_register_driver(&pl022_dummy_driver);
278}
279
280static void __exit pl022_exit_dummy(void)
281{
282 spi_unregister_driver(&pl022_dummy_driver);
283}
284
285module_init(pl022_init_dummy);
286module_exit(pl022_exit_dummy);
287
288MODULE_AUTHOR("Linus Walleij <linus.walleij@stericsson.com>");
289MODULE_DESCRIPTION("PL022 SSP/SPI DUMMY Linux driver");
290MODULE_LICENSE("GPL");
diff --git a/arch/arm/mach-u300/gpio.c b/arch/arm/mach-u300/gpio.c
index 308cdb197a92..63c8f27fb15a 100644
--- a/arch/arm/mach-u300/gpio.c
+++ b/arch/arm/mach-u300/gpio.c
@@ -25,11 +25,6 @@
25#include <linux/platform_device.h> 25#include <linux/platform_device.h>
26#include <linux/gpio.h> 26#include <linux/gpio.h>
27 27
28/* Need access to SYSCON registers for PADmuxing */
29#include <mach/syscon.h>
30
31#include "padmux.h"
32
33/* Reference to GPIO block clock */ 28/* Reference to GPIO block clock */
34static struct clk *clk; 29static struct clk *clk;
35 30
@@ -606,14 +601,6 @@ static int __init gpio_probe(struct platform_device *pdev)
606 writel(U300_GPIO_CR_BLOCK_CLKRQ_ENABLE, virtbase + U300_GPIO_CR); 601 writel(U300_GPIO_CR_BLOCK_CLKRQ_ENABLE, virtbase + U300_GPIO_CR);
607#endif 602#endif
608 603
609 /* Set up some padmuxing here */
610#ifdef CONFIG_MMC
611 pmx_set_mission_mode_mmc();
612#endif
613#ifdef CONFIG_SPI_PL022
614 pmx_set_mission_mode_spi();
615#endif
616
617 gpio_set_initial_values(); 604 gpio_set_initial_values();
618 605
619 for (num_irqs = 0 ; num_irqs < U300_GPIO_NUM_PORTS; num_irqs++) { 606 for (num_irqs = 0 ; num_irqs < U300_GPIO_NUM_PORTS; num_irqs++) {
diff --git a/arch/arm/mach-u300/i2c.c b/arch/arm/mach-u300/i2c.c
new file mode 100644
index 000000000000..10be1f888b27
--- /dev/null
+++ b/arch/arm/mach-u300/i2c.c
@@ -0,0 +1,43 @@
1/*
2 * arch/arm/mach-u300/i2c.c
3 *
4 * Copyright (C) 2009 ST-Ericsson AB
5 * License terms: GNU General Public License (GPL) version 2
6 *
7 * Register board i2c devices
8 * Author: Linus Walleij <linus.walleij@stericsson.com>
9 */
10#include <linux/kernel.h>
11#include <linux/i2c.h>
12#include <mach/irqs.h>
13
14static struct i2c_board_info __initdata bus0_i2c_board_info[] = {
15 {
16 .type = "ab3100",
17 .addr = 0x48,
18 .irq = IRQ_U300_IRQ0_EXT,
19 },
20};
21
22static struct i2c_board_info __initdata bus1_i2c_board_info[] = {
23#ifdef CONFIG_MACH_U300_BS335
24 {
25 .type = "fwcam",
26 .addr = 0x10,
27 },
28 {
29 .type = "fwcam",
30 .addr = 0x5d,
31 },
32#else
33 { },
34#endif
35};
36
37void __init u300_i2c_register_board_devices(void)
38{
39 i2c_register_board_info(0, bus0_i2c_board_info,
40 ARRAY_SIZE(bus0_i2c_board_info));
41 i2c_register_board_info(1, bus1_i2c_board_info,
42 ARRAY_SIZE(bus1_i2c_board_info));
43}
diff --git a/arch/arm/mach-u300/i2c.h b/arch/arm/mach-u300/i2c.h
new file mode 100644
index 000000000000..485c02e5c06d
--- /dev/null
+++ b/arch/arm/mach-u300/i2c.h
@@ -0,0 +1,23 @@
1/*
2 * arch/arm/mach-u300/i2c.h
3 *
4 * Copyright (C) 2009 ST-Ericsson AB
5 * License terms: GNU General Public License (GPL) version 2
6 *
7 * Register board i2c devices
8 * Author: Linus Walleij <linus.walleij@stericsson.com>
9 */
10
11#ifndef MACH_U300_I2C_H
12#define MACH_U300_I2C_H
13
14#ifdef CONFIG_I2C_STU300
15void __init u300_i2c_register_board_devices(void);
16#else
17/* Compile out this stuff if no I2C adapter is available */
18static inline void __init u300_i2c_register_board_devices(void)
19{
20}
21#endif
22
23#endif
diff --git a/arch/arm/mach-u300/include/mach/memory.h b/arch/arm/mach-u300/include/mach/memory.h
index bf134bcc129d..ab000df7fc03 100644
--- a/arch/arm/mach-u300/include/mach/memory.h
+++ b/arch/arm/mach-u300/include/mach/memory.h
@@ -35,6 +35,14 @@
35#endif 35#endif
36 36
37/* 37/*
38 * TCM memory whereabouts
39 */
40#define ITCM_OFFSET 0xffff2000
41#define ITCM_END 0xffff3fff
42#define DTCM_OFFSET 0xffff4000
43#define DTCM_END 0xffff5fff
44
45/*
38 * We enable a real big DMA buffer if need be. 46 * We enable a real big DMA buffer if need be.
39 */ 47 */
40#define CONSISTENT_DMA_SIZE SZ_4M 48#define CONSISTENT_DMA_SIZE SZ_4M
diff --git a/arch/arm/mach-u300/include/mach/syscon.h b/arch/arm/mach-u300/include/mach/syscon.h
index 1c90d1b1ccb6..7444f5c7da97 100644
--- a/arch/arm/mach-u300/include/mach/syscon.h
+++ b/arch/arm/mach-u300/include/mach/syscon.h
@@ -240,8 +240,13 @@
240#define U300_SYSCON_PMC1LR_CDI_MASK (0xC000) 240#define U300_SYSCON_PMC1LR_CDI_MASK (0xC000)
241#define U300_SYSCON_PMC1LR_CDI_CDI (0x0000) 241#define U300_SYSCON_PMC1LR_CDI_CDI (0x0000)
242#define U300_SYSCON_PMC1LR_CDI_EMIF (0x4000) 242#define U300_SYSCON_PMC1LR_CDI_EMIF (0x4000)
243#ifdef CONFIG_MACH_U300_BS335
244#define U300_SYSCON_PMC1LR_CDI_CDI2 (0x8000)
245#define U300_SYSCON_PMC1LR_CDI_WCDMA_APP_GPIO (0xC000)
246#elif CONFIG_MACH_U300_BS365
243#define U300_SYSCON_PMC1LR_CDI_GPIO (0x8000) 247#define U300_SYSCON_PMC1LR_CDI_GPIO (0x8000)
244#define U300_SYSCON_PMC1LR_CDI_WCDMA (0xC000) 248#define U300_SYSCON_PMC1LR_CDI_WCDMA (0xC000)
249#endif
245#define U300_SYSCON_PMC1LR_PDI_MASK (0x3000) 250#define U300_SYSCON_PMC1LR_PDI_MASK (0x3000)
246#define U300_SYSCON_PMC1LR_PDI_PDI (0x0000) 251#define U300_SYSCON_PMC1LR_PDI_PDI (0x0000)
247#define U300_SYSCON_PMC1LR_PDI_EGG (0x1000) 252#define U300_SYSCON_PMC1LR_PDI_EGG (0x1000)
@@ -345,19 +350,69 @@
345#define U300_SYSCON_MMCR_MASK (0x0003) 350#define U300_SYSCON_MMCR_MASK (0x0003)
346#define U300_SYSCON_MMCR_MMC_FB_CLK_SEL_ENABLE (0x0002) 351#define U300_SYSCON_MMCR_MMC_FB_CLK_SEL_ENABLE (0x0002)
347#define U300_SYSCON_MMCR_MSPRO_FREQSEL_ENABLE (0x0001) 352#define U300_SYSCON_MMCR_MSPRO_FREQSEL_ENABLE (0x0001)
348 353/* Pull up/down control (R/W) */
354#define U300_SYSCON_PUCR (0x104)
355#define U300_SYSCON_PUCR_EMIF_1_WAIT_N_PU_ENABLE (0x0200)
356#define U300_SYSCON_PUCR_EMIF_1_NFIF_READY_PU_ENABLE (0x0100)
357#define U300_SYSCON_PUCR_EMIF_1_16BIT_PU_ENABLE (0x0080)
358#define U300_SYSCON_PUCR_EMIF_1_8BIT_PU_ENABLE (0x0040)
359#define U300_SYSCON_PUCR_KEY_IN_PU_EN_MASK (0x003F)
360/* Padmux 2 control */
361#define U300_SYSCON_PMC2R (0x100)
362#define U300_SYSCON_PMC2R_APP_MISC_0_MASK (0x00C0)
363#define U300_SYSCON_PMC2R_APP_MISC_0_APP_GPIO (0x0000)
364#define U300_SYSCON_PMC2R_APP_MISC_0_EMIF_SDRAM (0x0040)
365#define U300_SYSCON_PMC2R_APP_MISC_0_MMC (0x0080)
366#define U300_SYSCON_PMC2R_APP_MISC_0_CDI2 (0x00C0)
367#define U300_SYSCON_PMC2R_APP_MISC_1_MASK (0x0300)
368#define U300_SYSCON_PMC2R_APP_MISC_1_APP_GPIO (0x0000)
369#define U300_SYSCON_PMC2R_APP_MISC_1_EMIF_SDRAM (0x0100)
370#define U300_SYSCON_PMC2R_APP_MISC_1_MMC (0x0200)
371#define U300_SYSCON_PMC2R_APP_MISC_1_CDI2 (0x0300)
372#define U300_SYSCON_PMC2R_APP_MISC_2_MASK (0x0C00)
373#define U300_SYSCON_PMC2R_APP_MISC_2_APP_GPIO (0x0000)
374#define U300_SYSCON_PMC2R_APP_MISC_2_EMIF_SDRAM (0x0400)
375#define U300_SYSCON_PMC2R_APP_MISC_2_MMC (0x0800)
376#define U300_SYSCON_PMC2R_APP_MISC_2_CDI2 (0x0C00)
377#define U300_SYSCON_PMC2R_APP_MISC_3_MASK (0x3000)
378#define U300_SYSCON_PMC2R_APP_MISC_3_APP_GPIO (0x0000)
379#define U300_SYSCON_PMC2R_APP_MISC_3_EMIF_SDRAM (0x1000)
380#define U300_SYSCON_PMC2R_APP_MISC_3_MMC (0x2000)
381#define U300_SYSCON_PMC2R_APP_MISC_3_CDI2 (0x3000)
382#define U300_SYSCON_PMC2R_APP_MISC_4_MASK (0xC000)
383#define U300_SYSCON_PMC2R_APP_MISC_4_APP_GPIO (0x0000)
384#define U300_SYSCON_PMC2R_APP_MISC_4_EMIF_SDRAM (0x4000)
385#define U300_SYSCON_PMC2R_APP_MISC_4_MMC (0x8000)
386#define U300_SYSCON_PMC2R_APP_MISC_4_ACC_GPIO (0xC000)
349/* TODO: More SYSCON registers missing */ 387/* TODO: More SYSCON registers missing */
350#define U300_SYSCON_PMC3R (0x10c) 388#define U300_SYSCON_PMC3R (0x10c)
351#define U300_SYSCON_PMC3R_APP_MISC_11_MASK (0xc000) 389#define U300_SYSCON_PMC3R_APP_MISC_11_MASK (0xc000)
352#define U300_SYSCON_PMC3R_APP_MISC_11_SPI (0x4000) 390#define U300_SYSCON_PMC3R_APP_MISC_11_SPI (0x4000)
353#define U300_SYSCON_PMC3R_APP_MISC_10_MASK (0x3000) 391#define U300_SYSCON_PMC3R_APP_MISC_10_MASK (0x3000)
354#define U300_SYSCON_PMC3R_APP_MISC_10_SPI (0x1000) 392#define U300_SYSCON_PMC3R_APP_MISC_10_SPI (0x1000)
355/* TODO: Missing other configs, I just added the SPI stuff */ 393/* TODO: Missing other configs */
356 394#define U300_SYSCON_PMC4R (0x168)
395#define U300_SYSCON_PMC4R_APP_MISC_12_MASK (0x0003)
396#define U300_SYSCON_PMC4R_APP_MISC_12_APP_GPIO (0x0000)
397#define U300_SYSCON_PMC4R_APP_MISC_13_MASK (0x000C)
398#define U300_SYSCON_PMC4R_APP_MISC_13_CDI (0x0000)
399#define U300_SYSCON_PMC4R_APP_MISC_13_SMIA (0x0004)
400#define U300_SYSCON_PMC4R_APP_MISC_13_SMIA2 (0x0008)
401#define U300_SYSCON_PMC4R_APP_MISC_13_APP_GPIO (0x000C)
402#define U300_SYSCON_PMC4R_APP_MISC_14_MASK (0x0030)
403#define U300_SYSCON_PMC4R_APP_MISC_14_CDI (0x0000)
404#define U300_SYSCON_PMC4R_APP_MISC_14_SMIA (0x0010)
405#define U300_SYSCON_PMC4R_APP_MISC_14_CDI2 (0x0020)
406#define U300_SYSCON_PMC4R_APP_MISC_14_APP_GPIO (0x0030)
407#define U300_SYSCON_PMC4R_APP_MISC_16_MASK (0x0300)
408#define U300_SYSCON_PMC4R_APP_MISC_16_APP_GPIO_13 (0x0000)
409#define U300_SYSCON_PMC4R_APP_MISC_16_APP_UART1_CTS (0x0100)
410#define U300_SYSCON_PMC4R_APP_MISC_16_EMIF_1_STATIC_CS5_N (0x0200)
357/* SYS_0_CLK_CONTROL first clock control 16bit (R/W) */ 411/* SYS_0_CLK_CONTROL first clock control 16bit (R/W) */
358#define U300_SYSCON_S0CCR (0x120) 412#define U300_SYSCON_S0CCR (0x120)
359#define U300_SYSCON_S0CCR_FIELD_MASK (0x43FF) 413#define U300_SYSCON_S0CCR_FIELD_MASK (0x43FF)
360#define U300_SYSCON_S0CCR_CLOCK_REQ (0x4000) 414#define U300_SYSCON_S0CCR_CLOCK_REQ (0x4000)
415#define U300_SYSCON_S0CCR_CLOCK_REQ_MONITOR (0x2000)
361#define U300_SYSCON_S0CCR_CLOCK_INV (0x0200) 416#define U300_SYSCON_S0CCR_CLOCK_INV (0x0200)
362#define U300_SYSCON_S0CCR_CLOCK_FREQ_MASK (0x01E0) 417#define U300_SYSCON_S0CCR_CLOCK_FREQ_MASK (0x01E0)
363#define U300_SYSCON_S0CCR_CLOCK_SELECT_MASK (0x001E) 418#define U300_SYSCON_S0CCR_CLOCK_SELECT_MASK (0x001E)
@@ -375,6 +430,7 @@
375#define U300_SYSCON_S1CCR (0x124) 430#define U300_SYSCON_S1CCR (0x124)
376#define U300_SYSCON_S1CCR_FIELD_MASK (0x43FF) 431#define U300_SYSCON_S1CCR_FIELD_MASK (0x43FF)
377#define U300_SYSCON_S1CCR_CLOCK_REQ (0x4000) 432#define U300_SYSCON_S1CCR_CLOCK_REQ (0x4000)
433#define U300_SYSCON_S1CCR_CLOCK_REQ_MONITOR (0x2000)
378#define U300_SYSCON_S1CCR_CLOCK_INV (0x0200) 434#define U300_SYSCON_S1CCR_CLOCK_INV (0x0200)
379#define U300_SYSCON_S1CCR_CLOCK_FREQ_MASK (0x01E0) 435#define U300_SYSCON_S1CCR_CLOCK_FREQ_MASK (0x01E0)
380#define U300_SYSCON_S1CCR_CLOCK_SELECT_MASK (0x001E) 436#define U300_SYSCON_S1CCR_CLOCK_SELECT_MASK (0x001E)
@@ -393,6 +449,7 @@
393#define U300_SYSCON_S2CCR_FIELD_MASK (0xC3FF) 449#define U300_SYSCON_S2CCR_FIELD_MASK (0xC3FF)
394#define U300_SYSCON_S2CCR_CLK_STEAL (0x8000) 450#define U300_SYSCON_S2CCR_CLK_STEAL (0x8000)
395#define U300_SYSCON_S2CCR_CLOCK_REQ (0x4000) 451#define U300_SYSCON_S2CCR_CLOCK_REQ (0x4000)
452#define U300_SYSCON_S2CCR_CLOCK_REQ_MONITOR (0x2000)
396#define U300_SYSCON_S2CCR_CLOCK_INV (0x0200) 453#define U300_SYSCON_S2CCR_CLOCK_INV (0x0200)
397#define U300_SYSCON_S2CCR_CLOCK_FREQ_MASK (0x01E0) 454#define U300_SYSCON_S2CCR_CLOCK_FREQ_MASK (0x01E0)
398#define U300_SYSCON_S2CCR_CLOCK_SELECT_MASK (0x001E) 455#define U300_SYSCON_S2CCR_CLOCK_SELECT_MASK (0x001E)
@@ -425,6 +482,44 @@
425#define U300_SYSCON_MCR_PMGEN_CR_0_EMIF_0_SDRAM (0x000C) 482#define U300_SYSCON_MCR_PMGEN_CR_0_EMIF_0_SDRAM (0x000C)
426#define U300_SYSCON_MCR_PM1G_MODE_ENABLE (0x0002) 483#define U300_SYSCON_MCR_PM1G_MODE_ENABLE (0x0002)
427#define U300_SYSCON_MCR_PMTG5_MODE_ENABLE (0x0001) 484#define U300_SYSCON_MCR_PMTG5_MODE_ENABLE (0x0001)
485/* SC_PLL_IRQ_CONTROL 16bit (R/W) */
486#define U300_SYSCON_PICR (0x0130)
487#define U300_SYSCON_PICR_MASK (0x00FF)
488#define U300_SYSCON_PICR_FORCE_PLL208_LOCK_LOW_ENABLE (0x0080)
489#define U300_SYSCON_PICR_FORCE_PLL208_LOCK_HIGH_ENABLE (0x0040)
490#define U300_SYSCON_PICR_FORCE_PLL13_LOCK_LOW_ENABLE (0x0020)
491#define U300_SYSCON_PICR_FORCE_PLL13_LOCK_HIGH_ENABLE (0x0010)
492#define U300_SYSCON_PICR_IRQMASK_PLL13_UNLOCK_ENABLE (0x0008)
493#define U300_SYSCON_PICR_IRQMASK_PLL13_LOCK_ENABLE (0x0004)
494#define U300_SYSCON_PICR_IRQMASK_PLL208_UNLOCK_ENABLE (0x0002)
495#define U300_SYSCON_PICR_IRQMASK_PLL208_LOCK_ENABLE (0x0001)
496/* SC_PLL_IRQ_STATUS 16 bit (R/-) */
497#define U300_SYSCON_PISR (0x0134)
498#define U300_SYSCON_PISR_MASK (0x000F)
499#define U300_SYSCON_PISR_PLL13_UNLOCK_IND (0x0008)
500#define U300_SYSCON_PISR_PLL13_LOCK_IND (0x0004)
501#define U300_SYSCON_PISR_PLL208_UNLOCK_IND (0x0002)
502#define U300_SYSCON_PISR_PLL208_LOCK_IND (0x0001)
503/* SC_PLL_IRQ_CLEAR 16 bit (-/W) */
504#define U300_SYSCON_PICLR (0x0138)
505#define U300_SYSCON_PICLR_MASK (0x000F)
506#define U300_SYSCON_PICLR_RWMASK (0x0000)
507#define U300_SYSCON_PICLR_PLL13_UNLOCK_SC (0x0008)
508#define U300_SYSCON_PICLR_PLL13_LOCK_SC (0x0004)
509#define U300_SYSCON_PICLR_PLL208_UNLOCK_SC (0x0002)
510#define U300_SYSCON_PICLR_PLL208_LOCK_SC (0x0001)
511/* CAMIF_CONTROL 16 bit (-/W) */
512#define U300_SYSCON_CICR (0x013C)
513#define U300_SYSCON_CICR_MASK (0x0FFF)
514#define U300_SYSCON_CICR_APP_SUBLVDS_TESTMODE_MASK (0x0F00)
515#define U300_SYSCON_CICR_APP_SUBLVDS_TESTMODE_PORT1 (0x0C00)
516#define U300_SYSCON_CICR_APP_SUBLVDS_TESTMODE_PORT0 (0x0300)
517#define U300_SYSCON_CICR_APP_SUBLVDS_RESCON_MASK (0x00F0)
518#define U300_SYSCON_CICR_APP_SUBLVDS_RESCON_PORT1 (0x00C0)
519#define U300_SYSCON_CICR_APP_SUBLVDS_RESCON_PORT0 (0x0030)
520#define U300_SYSCON_CICR_APP_SUBLVDS_PWR_DWN_N_MASK (0x000F)
521#define U300_SYSCON_CICR_APP_SUBLVDS_PWR_DWN_N_PORT1 (0x000C)
522#define U300_SYSCON_CICR_APP_SUBLVDS_PWR_DWN_N_PORT0 (0x0003)
428/* Clock activity observability register 0 */ 523/* Clock activity observability register 0 */
429#define U300_SYSCON_C0OAR (0x140) 524#define U300_SYSCON_C0OAR (0x140)
430#define U300_SYSCON_C0OAR_MASK (0xFFFF) 525#define U300_SYSCON_C0OAR_MASK (0xFFFF)
@@ -513,7 +608,7 @@
513/** 608/**
514 * CPU medium frequency in MHz 609 * CPU medium frequency in MHz
515 */ 610 */
516#define SYSCON_CPU_CLOCK_MEDIUM 104 611#define SYSCON_CPU_CLOCK_MEDIUM 52
517/** 612/**
518 * CPU low frequency in MHz 613 * CPU low frequency in MHz
519 */ 614 */
@@ -527,7 +622,7 @@
527/** 622/**
528 * EMIF medium frequency in MHz 623 * EMIF medium frequency in MHz
529 */ 624 */
530#define SYSCON_EMIF_CLOCK_MEDIUM 104 625#define SYSCON_EMIF_CLOCK_MEDIUM 52
531/** 626/**
532 * EMIF low frequency in MHz 627 * EMIF low frequency in MHz
533 */ 628 */
@@ -541,7 +636,7 @@
541/** 636/**
542 * AHB medium frequency in MHz 637 * AHB medium frequency in MHz
543 */ 638 */
544#define SYSCON_AHB_CLOCK_MEDIUM 52 639#define SYSCON_AHB_CLOCK_MEDIUM 26
545/** 640/**
546 * AHB low frequency in MHz 641 * AHB low frequency in MHz
547 */ 642 */
@@ -553,6 +648,15 @@ enum syscon_busmaster {
553 SYSCON_BM_VIDEO_ENC 648 SYSCON_BM_VIDEO_ENC
554}; 649};
555 650
651/* Selectr a resistor or a set of resistors */
652enum syscon_pull_up_down {
653 SYSCON_PU_KEY_IN_EN,
654 SYSCON_PU_EMIF_1_8_BIT_EN,
655 SYSCON_PU_EMIF_1_16_BIT_EN,
656 SYSCON_PU_EMIF_1_NFIF_READY_EN,
657 SYSCON_PU_EMIF_1_NFIF_WAIT_N_EN,
658};
659
556/* 660/*
557 * Note that this array must match the order of the array "clk_reg" 661 * Note that this array must match the order of the array "clk_reg"
558 * in syscon.c 662 * in syscon.c
@@ -575,6 +679,7 @@ enum syscon_clk {
575 SYSCON_CLKCONTROL_SPI, 679 SYSCON_CLKCONTROL_SPI,
576 SYSCON_CLKCONTROL_I2S0_CORE, 680 SYSCON_CLKCONTROL_I2S0_CORE,
577 SYSCON_CLKCONTROL_I2S1_CORE, 681 SYSCON_CLKCONTROL_I2S1_CORE,
682 SYSCON_CLKCONTROL_UART1,
578 SYSCON_CLKCONTROL_AAIF, 683 SYSCON_CLKCONTROL_AAIF,
579 SYSCON_CLKCONTROL_AHB, 684 SYSCON_CLKCONTROL_AHB,
580 SYSCON_CLKCONTROL_APEX, 685 SYSCON_CLKCONTROL_APEX,
@@ -604,7 +709,8 @@ enum syscon_sysclk_mode {
604 709
605enum syscon_sysclk_req { 710enum syscon_sysclk_req {
606 SYSCON_SYSCLKREQ_DISABLED, 711 SYSCON_SYSCLKREQ_DISABLED,
607 SYSCON_SYSCLKREQ_ACTIVE_LOW 712 SYSCON_SYSCLKREQ_ACTIVE_LOW,
713 SYSCON_SYSCLKREQ_MONITOR
608}; 714};
609 715
610enum syscon_clk_mode { 716enum syscon_clk_mode {
diff --git a/arch/arm/mach-u300/mmc.c b/arch/arm/mach-u300/mmc.c
index 585cc013639d..7b6b016786bb 100644
--- a/arch/arm/mach-u300/mmc.c
+++ b/arch/arm/mach-u300/mmc.c
@@ -19,15 +19,16 @@
19#include <linux/regulator/consumer.h> 19#include <linux/regulator/consumer.h>
20#include <linux/regulator/machine.h> 20#include <linux/regulator/machine.h>
21#include <linux/gpio.h> 21#include <linux/gpio.h>
22#include <linux/amba/mmci.h>
22 23
23#include <asm/mach/mmc.h>
24#include "mmc.h" 24#include "mmc.h"
25#include "padmux.h"
25 26
26struct mmci_card_event { 27struct mmci_card_event {
27 struct input_dev *mmc_input; 28 struct input_dev *mmc_input;
28 int mmc_inserted; 29 int mmc_inserted;
29 struct work_struct workq; 30 struct work_struct workq;
30 struct mmc_platform_data mmc0_plat_data; 31 struct mmci_platform_data mmc0_plat_data;
31}; 32};
32 33
33static unsigned int mmc_status(struct device *dev) 34static unsigned int mmc_status(struct device *dev)
@@ -146,6 +147,7 @@ int __devinit mmc_init(struct amba_device *adev)
146{ 147{
147 struct mmci_card_event *mmci_card; 148 struct mmci_card_event *mmci_card;
148 struct device *mmcsd_device = &adev->dev; 149 struct device *mmcsd_device = &adev->dev;
150 struct pmx *pmx;
149 int ret = 0; 151 int ret = 0;
150 152
151 mmci_card = kzalloc(sizeof(struct mmci_card_event), GFP_KERNEL); 153 mmci_card = kzalloc(sizeof(struct mmci_card_event), GFP_KERNEL);
@@ -158,6 +160,8 @@ int __devinit mmc_init(struct amba_device *adev)
158 mmci_card->mmc0_plat_data.status = mmc_status; 160 mmci_card->mmc0_plat_data.status = mmc_status;
159 mmci_card->mmc0_plat_data.gpio_wp = -1; 161 mmci_card->mmc0_plat_data.gpio_wp = -1;
160 mmci_card->mmc0_plat_data.gpio_cd = -1; 162 mmci_card->mmc0_plat_data.gpio_cd = -1;
163 mmci_card->mmc0_plat_data.capabilities = MMC_CAP_MMC_HIGHSPEED |
164 MMC_CAP_SD_HIGHSPEED | MMC_CAP_4_BIT_DATA;
161 165
162 mmcsd_device->platform_data = (void *) &mmci_card->mmc0_plat_data; 166 mmcsd_device->platform_data = (void *) &mmci_card->mmc0_plat_data;
163 167
@@ -207,6 +211,20 @@ int __devinit mmc_init(struct amba_device *adev)
207 211
208 input_set_drvdata(mmci_card->mmc_input, mmci_card); 212 input_set_drvdata(mmci_card->mmc_input, mmci_card);
209 213
214 /*
215 * Setup padmuxing for MMC. Since this must always be
216 * compiled into the kernel, pmx is never released.
217 */
218 pmx = pmx_get(mmcsd_device, U300_APP_PMX_MMC_SETTING);
219
220 if (IS_ERR(pmx))
221 pr_warning("Could not get padmux handle\n");
222 else {
223 ret = pmx_activate(mmcsd_device, pmx);
224 if (IS_ERR_VALUE(ret))
225 pr_warning("Could not activate padmuxing\n");
226 }
227
210 ret = gpio_register_callback(U300_GPIO_PIN_MMC_CD, mmci_callback, 228 ret = gpio_register_callback(U300_GPIO_PIN_MMC_CD, mmci_callback,
211 mmci_card); 229 mmci_card);
212 230
diff --git a/arch/arm/mach-u300/padmux.c b/arch/arm/mach-u300/padmux.c
index f3664564f086..4c93c6cefd37 100644
--- a/arch/arm/mach-u300/padmux.c
+++ b/arch/arm/mach-u300/padmux.c
@@ -6,53 +6,362 @@
6 * Copyright (C) 2009 ST-Ericsson AB 6 * Copyright (C) 2009 ST-Ericsson AB
7 * License terms: GNU General Public License (GPL) version 2 7 * License terms: GNU General Public License (GPL) version 2
8 * U300 PADMUX functions 8 * U300 PADMUX functions
9 * Author: Linus Walleij <linus.walleij@stericsson.com> 9 * Author: Martin Persson <martin.persson@stericsson.com>
10 *
11 */ 10 */
12#include <linux/io.h> 11
12#include <linux/module.h>
13#include <linux/kernel.h>
14#include <linux/device.h>
13#include <linux/err.h> 15#include <linux/err.h>
16#include <linux/errno.h>
17#include <linux/io.h>
18#include <linux/mutex.h>
19#include <linux/string.h>
20#include <linux/bug.h>
21#include <linux/debugfs.h>
22#include <linux/seq_file.h>
14#include <mach/u300-regs.h> 23#include <mach/u300-regs.h>
15#include <mach/syscon.h> 24#include <mach/syscon.h>
16
17#include "padmux.h" 25#include "padmux.h"
18 26
19/* Set the PAD MUX to route the MMC reader correctly to GPIO0. */ 27static DEFINE_MUTEX(pmx_mutex);
20void pmx_set_mission_mode_mmc(void) 28
21{ 29const u32 pmx_registers[] = {
22 u16 val; 30 (U300_SYSCON_VBASE + U300_SYSCON_PMC1LR),
23 31 (U300_SYSCON_VBASE + U300_SYSCON_PMC1HR),
24 val = readw(U300_SYSCON_VBASE + U300_SYSCON_PMC1LR); 32 (U300_SYSCON_VBASE + U300_SYSCON_PMC2R),
25 val &= ~U300_SYSCON_PMC1LR_MMCSD_MASK; 33 (U300_SYSCON_VBASE + U300_SYSCON_PMC3R),
26 writew(val, U300_SYSCON_VBASE + U300_SYSCON_PMC1LR); 34 (U300_SYSCON_VBASE + U300_SYSCON_PMC4R)
27 val = readw(U300_SYSCON_VBASE + U300_SYSCON_PMC1HR); 35};
28 val &= ~U300_SYSCON_PMC1HR_APP_GPIO_1_MASK; 36
29 val |= U300_SYSCON_PMC1HR_APP_GPIO_1_MMC; 37/* High level functionality */
30 writew(val, U300_SYSCON_VBASE + U300_SYSCON_PMC1HR); 38
31} 39/* Lazy dog:
32 40 * onmask = {
33void pmx_set_mission_mode_spi(void) 41 * {"PMC1LR" mask, "PMC1LR" value},
34{ 42 * {"PMC1HR" mask, "PMC1HR" value},
35 u16 val; 43 * {"PMC2R" mask, "PMC2R" value},
36 44 * {"PMC3R" mask, "PMC3R" value},
37 /* Set up padmuxing so the SPI port and its chipselects are active */ 45 * {"PMC4R" mask, "PMC4R" value}
38 val = readw(U300_SYSCON_VBASE + U300_SYSCON_PMC1HR); 46 * }
39 /* 47 */
40 * Activate the SPI port (disable the use of these pins for generic 48static struct pmx mmc_setting = {
41 * GPIO, DSP, AAIF 49 .setting = U300_APP_PMX_MMC_SETTING,
42 */ 50 .default_on = false,
43 val &= ~U300_SYSCON_PMC1HR_APP_SPI_2_MASK; 51 .activated = false,
44 val |= U300_SYSCON_PMC1HR_APP_SPI_2_SPI; 52 .name = "MMC",
45 /* 53 .onmask = {
46 * Use GPIO pin SPI CS1 for CS1 actually (it can be used for other 54 {U300_SYSCON_PMC1LR_MMCSD_MASK,
47 * things also) 55 U300_SYSCON_PMC1LR_MMCSD_MMCSD},
48 */ 56 {0, 0},
49 val &= ~U300_SYSCON_PMC1HR_APP_SPI_CS_1_MASK; 57 {0, 0},
50 val |= U300_SYSCON_PMC1HR_APP_SPI_CS_1_SPI; 58 {0, 0},
51 /* 59 {U300_SYSCON_PMC4R_APP_MISC_12_MASK,
52 * Use GPIO pin SPI CS2 for CS2 actually (it can be used for other 60 U300_SYSCON_PMC4R_APP_MISC_12_APP_GPIO}
53 * things also) 61 },
54 */ 62};
55 val &= ~U300_SYSCON_PMC1HR_APP_SPI_CS_2_MASK; 63
56 val |= U300_SYSCON_PMC1HR_APP_SPI_CS_2_SPI; 64static struct pmx spi_setting = {
57 writew(val, U300_SYSCON_VBASE + U300_SYSCON_PMC1HR); 65 .setting = U300_APP_PMX_SPI_SETTING,
66 .default_on = false,
67 .activated = false,
68 .name = "SPI",
69 .onmask = {{0, 0},
70 {U300_SYSCON_PMC1HR_APP_SPI_2_MASK |
71 U300_SYSCON_PMC1HR_APP_SPI_CS_1_MASK |
72 U300_SYSCON_PMC1HR_APP_SPI_CS_2_MASK,
73 U300_SYSCON_PMC1HR_APP_SPI_2_SPI |
74 U300_SYSCON_PMC1HR_APP_SPI_CS_1_SPI |
75 U300_SYSCON_PMC1HR_APP_SPI_CS_2_SPI},
76 {0, 0},
77 {0, 0},
78 {0, 0}
79 },
80};
81
82/* Available padmux settings */
83static struct pmx *pmx_settings[] = {
84 &mmc_setting,
85 &spi_setting,
86};
87
88static void update_registers(struct pmx *pmx, bool activate)
89{
90 u16 regval, val, mask;
91 int i;
92
93 for (i = 0; i < ARRAY_SIZE(pmx_registers); i++) {
94 if (activate)
95 val = pmx->onmask[i].val;
96 else
97 val = 0;
98
99 mask = pmx->onmask[i].mask;
100 if (mask != 0) {
101 regval = readw(pmx_registers[i]);
102 regval &= ~mask;
103 regval |= val;
104 writew(regval, pmx_registers[i]);
105 }
106 }
107}
108
109struct pmx *pmx_get(struct device *dev, enum pmx_settings setting)
110{
111 int i;
112 struct pmx *pmx = ERR_PTR(-ENOENT);
113
114 if (dev == NULL)
115 return ERR_PTR(-EINVAL);
116
117 mutex_lock(&pmx_mutex);
118 for (i = 0; i < ARRAY_SIZE(pmx_settings); i++) {
119
120 if (setting == pmx_settings[i]->setting) {
121
122 if (pmx_settings[i]->dev != NULL) {
123 WARN(1, "padmux: required setting "
124 "in use by another consumer\n");
125 } else {
126 pmx = pmx_settings[i];
127 pmx->dev = dev;
128 dev_dbg(dev, "padmux: setting nr %d is now "
129 "bound to %s and ready to use\n",
130 setting, dev_name(dev));
131 break;
132 }
133 }
134 }
135 mutex_unlock(&pmx_mutex);
136
137 return pmx;
138}
139EXPORT_SYMBOL(pmx_get);
140
141int pmx_put(struct device *dev, struct pmx *pmx)
142{
143 int i;
144 int ret = -ENOENT;
145
146 if (pmx == NULL || dev == NULL)
147 return -EINVAL;
148
149 mutex_lock(&pmx_mutex);
150 for (i = 0; i < ARRAY_SIZE(pmx_settings); i++) {
151
152 if (pmx->setting == pmx_settings[i]->setting) {
153
154 if (dev != pmx->dev) {
155 WARN(1, "padmux: cannot release handle as "
156 "it is bound to another consumer\n");
157 ret = -EINVAL;
158 break;
159 } else {
160 pmx_settings[i]->dev = NULL;
161 ret = 0;
162 break;
163 }
164 }
165 }
166 mutex_unlock(&pmx_mutex);
167
168 return ret;
169}
170EXPORT_SYMBOL(pmx_put);
171
172int pmx_activate(struct device *dev, struct pmx *pmx)
173{
174 int i, j, ret;
175 ret = 0;
176
177 if (pmx == NULL || dev == NULL)
178 return -EINVAL;
179
180 mutex_lock(&pmx_mutex);
181
182 /* Make sure the required bits are not used */
183 for (i = 0; i < ARRAY_SIZE(pmx_settings); i++) {
184
185 if (pmx_settings[i]->dev == NULL || pmx_settings[i] == pmx)
186 continue;
187
188 for (j = 0; j < ARRAY_SIZE(pmx_registers); j++) {
189
190 if (pmx_settings[i]->onmask[j].mask & pmx->
191 onmask[j].mask) {
192 /* More than one entry on the same bits */
193 WARN(1, "padmux: cannot activate "
194 "setting. Bit conflict with "
195 "an active setting\n");
196
197 ret = -EUSERS;
198 goto exit;
199 }
200 }
201 }
202 update_registers(pmx, true);
203 pmx->activated = true;
204 dev_dbg(dev, "padmux: setting nr %d is activated\n",
205 pmx->setting);
206
207exit:
208 mutex_unlock(&pmx_mutex);
209 return ret;
210}
211EXPORT_SYMBOL(pmx_activate);
212
213int pmx_deactivate(struct device *dev, struct pmx *pmx)
214{
215 int i;
216 int ret = -ENOENT;
217
218 if (pmx == NULL || dev == NULL)
219 return -EINVAL;
220
221 mutex_lock(&pmx_mutex);
222 for (i = 0; i < ARRAY_SIZE(pmx_settings); i++) {
223
224 if (pmx_settings[i]->dev == NULL)
225 continue;
226
227 if (pmx->setting == pmx_settings[i]->setting) {
228
229 if (dev != pmx->dev) {
230 WARN(1, "padmux: cannot deactivate "
231 "pmx setting as it was activated "
232 "by another consumer\n");
233
234 ret = -EBUSY;
235 continue;
236 } else {
237 update_registers(pmx, false);
238 pmx_settings[i]->dev = NULL;
239 pmx->activated = false;
240 ret = 0;
241 dev_dbg(dev, "padmux: setting nr %d is deactivated",
242 pmx->setting);
243 break;
244 }
245 }
246 }
247 mutex_unlock(&pmx_mutex);
248
249 return ret;
250}
251EXPORT_SYMBOL(pmx_deactivate);
252
253/*
254 * For internal use only. If it is to be exported,
255 * it should be reentrant. Notice that pmx_activate
256 * (i.e. runtime settings) always override default settings.
257 */
258static int pmx_set_default(void)
259{
260 /* Used to identify several entries on the same bits */
261 u16 modbits[ARRAY_SIZE(pmx_registers)];
262
263 int i, j;
264
265 memset(modbits, 0, ARRAY_SIZE(pmx_registers) * sizeof(u16));
266
267 for (i = 0; i < ARRAY_SIZE(pmx_settings); i++) {
268
269 if (!pmx_settings[i]->default_on)
270 continue;
271
272 for (j = 0; j < ARRAY_SIZE(pmx_registers); j++) {
273
274 /* Make sure there is only one entry on the same bits */
275 if (modbits[j] & pmx_settings[i]->onmask[j].mask) {
276 BUG();
277 return -EUSERS;
278 }
279 modbits[j] |= pmx_settings[i]->onmask[j].mask;
280 }
281 update_registers(pmx_settings[i], true);
282 }
283 return 0;
58} 284}
285
286#if (defined(CONFIG_DEBUG_FS) && defined(CONFIG_U300_DEBUG))
287static int pmx_show(struct seq_file *s, void *data)
288{
289 int i;
290 seq_printf(s, "-------------------------------------------------\n");
291 seq_printf(s, "SETTING BOUND TO DEVICE STATE\n");
292 seq_printf(s, "-------------------------------------------------\n");
293 mutex_lock(&pmx_mutex);
294 for (i = 0; i < ARRAY_SIZE(pmx_settings); i++) {
295 /* Format pmx and device name nicely */
296 char cdp[33];
297 int chars;
298
299 chars = snprintf(&cdp[0], 17, "%s", pmx_settings[i]->name);
300 while (chars < 16) {
301 cdp[chars] = ' ';
302 chars++;
303 }
304 chars = snprintf(&cdp[16], 17, "%s", pmx_settings[i]->dev ?
305 dev_name(pmx_settings[i]->dev) : "N/A");
306 while (chars < 16) {
307 cdp[chars+16] = ' ';
308 chars++;
309 }
310 cdp[32] = '\0';
311
312 seq_printf(s,
313 "%s\t%s\n",
314 &cdp[0],
315 pmx_settings[i]->activated ?
316 "ACTIVATED" : "DEACTIVATED"
317 );
318
319 }
320 mutex_unlock(&pmx_mutex);
321 return 0;
322}
323
324static int pmx_open(struct inode *inode, struct file *file)
325{
326 return single_open(file, pmx_show, NULL);
327}
328
329static const struct file_operations pmx_operations = {
330 .owner = THIS_MODULE,
331 .open = pmx_open,
332 .read = seq_read,
333 .llseek = seq_lseek,
334 .release = single_release,
335};
336
337static int __init init_pmx_read_debugfs(void)
338{
339 /* Expose a simple debugfs interface to view pmx settings */
340 (void) debugfs_create_file("padmux", S_IFREG | S_IRUGO,
341 NULL, NULL,
342 &pmx_operations);
343 return 0;
344}
345
346/*
347 * This needs to come in after the core_initcall(),
348 * because debugfs is not available until
349 * the subsystems come up.
350 */
351module_init(init_pmx_read_debugfs);
352#endif
353
354static int __init pmx_init(void)
355{
356 int ret;
357
358 ret = pmx_set_default();
359
360 if (IS_ERR_VALUE(ret))
361 pr_crit("padmux: default settings could not be set\n");
362
363 return 0;
364}
365
366/* Should be initialized before consumers */
367core_initcall(pmx_init);
diff --git a/arch/arm/mach-u300/padmux.h b/arch/arm/mach-u300/padmux.h
index 8c2099ac5046..6e8b86064097 100644
--- a/arch/arm/mach-u300/padmux.h
+++ b/arch/arm/mach-u300/padmux.h
@@ -6,14 +6,34 @@
6 * Copyright (C) 2009 ST-Ericsson AB 6 * Copyright (C) 2009 ST-Ericsson AB
7 * License terms: GNU General Public License (GPL) version 2 7 * License terms: GNU General Public License (GPL) version 2
8 * U300 PADMUX API 8 * U300 PADMUX API
9 * Author: Linus Walleij <linus.walleij@stericsson.com> 9 * Author: Martin Persson <martin.persson@stericsson.com>
10 *
11 */ 10 */
12 11
13#ifndef __MACH_U300_PADMUX_H 12#ifndef __MACH_U300_PADMUX_H
14#define __MACH_U300_PADMUX_H 13#define __MACH_U300_PADMUX_H
15 14
16void pmx_set_mission_mode_mmc(void); 15enum pmx_settings {
17void pmx_set_mission_mode_spi(void); 16 U300_APP_PMX_MMC_SETTING,
17 U300_APP_PMX_SPI_SETTING
18};
19
20struct pmx_onmask {
21 u16 mask; /* Mask bits */
22 u16 val; /* Value when active */
23};
24
25struct pmx {
26 struct device *dev;
27 enum pmx_settings setting;
28 char *name;
29 bool activated;
30 bool default_on;
31 struct pmx_onmask onmask[];
32};
33
34struct pmx *pmx_get(struct device *dev, enum pmx_settings setting);
35int pmx_put(struct device *dev, struct pmx *pmx);
36int pmx_activate(struct device *dev, struct pmx *pmx);
37int pmx_deactivate(struct device *dev, struct pmx *pmx);
18 38
19#endif 39#endif
diff --git a/arch/arm/mach-u300/spi.c b/arch/arm/mach-u300/spi.c
new file mode 100644
index 000000000000..f0e887bea30e
--- /dev/null
+++ b/arch/arm/mach-u300/spi.c
@@ -0,0 +1,124 @@
1/*
2 * arch/arm/mach-u300/spi.c
3 *
4 * Copyright (C) 2009 ST-Ericsson AB
5 * License terms: GNU General Public License (GPL) version 2
6 *
7 * Author: Linus Walleij <linus.walleij@stericsson.com>
8 */
9#include <linux/device.h>
10#include <linux/amba/bus.h>
11#include <linux/spi/spi.h>
12#include <linux/amba/pl022.h>
13#include <linux/err.h>
14#include "padmux.h"
15
16/*
17 * The following is for the actual devices on the SSP/SPI bus
18 */
19#ifdef CONFIG_MACH_U300_SPIDUMMY
20static void select_dummy_chip(u32 chipselect)
21{
22 pr_debug("CORE: %s called with CS=0x%x (%s)\n",
23 __func__,
24 chipselect,
25 chipselect ? "unselect chip" : "select chip");
26 /*
27 * Here you would write the chip select value to the GPIO pins if
28 * this was a real chip (but this is a loopback dummy).
29 */
30}
31
32struct pl022_config_chip dummy_chip_info = {
33 /* Nominally this is LOOPBACK_DISABLED, but this is our dummy chip! */
34 .lbm = LOOPBACK_ENABLED,
35 /*
36 * available POLLING_TRANSFER and INTERRUPT_TRANSFER,
37 * DMA_TRANSFER does not work
38 */
39 .com_mode = INTERRUPT_TRANSFER,
40 .iface = SSP_INTERFACE_MOTOROLA_SPI,
41 /* We can only act as master but SSP_SLAVE is possible in theory */
42 .hierarchy = SSP_MASTER,
43 /* 0 = drive TX even as slave, 1 = do not drive TX as slave */
44 .slave_tx_disable = 0,
45 /* LSB first */
46 .endian_tx = SSP_TX_LSB,
47 .endian_rx = SSP_RX_LSB,
48 .data_size = SSP_DATA_BITS_8, /* used to be 12 in some default */
49 .rx_lev_trig = SSP_RX_1_OR_MORE_ELEM,
50 .tx_lev_trig = SSP_TX_1_OR_MORE_EMPTY_LOC,
51 .clk_phase = SSP_CLK_SECOND_EDGE,
52 .clk_pol = SSP_CLK_POL_IDLE_LOW,
53 .ctrl_len = SSP_BITS_12,
54 .wait_state = SSP_MWIRE_WAIT_ZERO,
55 .duplex = SSP_MICROWIRE_CHANNEL_FULL_DUPLEX,
56 /*
57 * This is where you insert a call to a function to enable CS
58 * (usually GPIO) for a certain chip.
59 */
60 .cs_control = select_dummy_chip,
61};
62#endif
63
64static struct spi_board_info u300_spi_devices[] = {
65#ifdef CONFIG_MACH_U300_SPIDUMMY
66 {
67 /* A dummy chip used for loopback tests */
68 .modalias = "spi-dummy",
69 /* Really dummy, pass in additional chip config here */
70 .platform_data = NULL,
71 /* This defines how the controller shall handle the device */
72 .controller_data = &dummy_chip_info,
73 /* .irq - no external IRQ routed from this device */
74 .max_speed_hz = 1000000,
75 .bus_num = 0, /* Only one bus on this chip */
76 .chip_select = 0,
77 /* Means SPI_CS_HIGH, change if e.g low CS */
78 .mode = 0,
79 },
80#endif
81};
82
83static struct pl022_ssp_controller ssp_platform_data = {
84 /* If you have several SPI buses this varies, we have only bus 0 */
85 .bus_id = 0,
86 /* Set this to 1 when we think we got DMA working */
87 .enable_dma = 0,
88 /*
89 * On the APP CPU GPIO 4, 5 and 6 are connected as generic
90 * chip selects for SPI. (Same on U330, U335 and U365.)
91 * TODO: make sure the GPIO driver can select these properly
92 * and do padmuxing accordingly too.
93 */
94 .num_chipselect = 3,
95};
96
97
98void __init u300_spi_init(struct amba_device *adev)
99{
100 struct pmx *pmx;
101
102 adev->dev.platform_data = &ssp_platform_data;
103 /*
104 * Setup padmuxing for SPI. Since this must always be
105 * compiled into the kernel, pmx is never released.
106 */
107 pmx = pmx_get(&adev->dev, U300_APP_PMX_SPI_SETTING);
108
109 if (IS_ERR(pmx))
110 dev_warn(&adev->dev, "Could not get padmux handle\n");
111 else {
112 int ret;
113
114 ret = pmx_activate(&adev->dev, pmx);
115 if (IS_ERR_VALUE(ret))
116 dev_warn(&adev->dev, "Could not activate padmuxing\n");
117 }
118
119}
120void __init u300_spi_register_board_devices(void)
121{
122 /* Register any SPI devices */
123 spi_register_board_info(u300_spi_devices, ARRAY_SIZE(u300_spi_devices));
124}
diff --git a/arch/arm/mach-u300/spi.h b/arch/arm/mach-u300/spi.h
new file mode 100644
index 000000000000..bd3d867e240f
--- /dev/null
+++ b/arch/arm/mach-u300/spi.h
@@ -0,0 +1,26 @@
1/*
2 * arch/arm/mach-u300/spi.h
3 *
4 * Copyright (C) 2009 ST-Ericsson AB
5 * License terms: GNU General Public License (GPL) version 2
6 *
7 * Author: Linus Walleij <linus.walleij@stericsson.com>
8 */
9#ifndef SPI_H
10#define SPI_H
11#include <linux/amba/bus.h>
12
13#ifdef CONFIG_SPI_PL022
14void __init u300_spi_init(struct amba_device *adev);
15void __init u300_spi_register_board_devices(void);
16#else
17/* Compile out SPI support if PL022 is not selected */
18static inline void __init u300_spi_init(struct amba_device *adev)
19{
20}
21static inline void __init u300_spi_register_board_devices(void)
22{
23}
24#endif
25
26#endif
diff --git a/arch/arm/mach-u300/timer.c b/arch/arm/mach-u300/timer.c
index cce53204880e..26d26f5100fe 100644
--- a/arch/arm/mach-u300/timer.c
+++ b/arch/arm/mach-u300/timer.c
@@ -346,6 +346,21 @@ static struct clocksource clocksource_u300_1mhz = {
346 .flags = CLOCK_SOURCE_IS_CONTINUOUS, 346 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
347}; 347};
348 348
349/*
350 * Override the global weak sched_clock symbol with this
351 * local implementation which uses the clocksource to get some
352 * better resolution when scheduling the kernel. We accept that
353 * this wraps around for now, since it is just a relative time
354 * stamp. (Inspired by OMAP implementation.)
355 */
356unsigned long long notrace sched_clock(void)
357{
358 return clocksource_cyc2ns(clocksource_u300_1mhz.read(
359 &clocksource_u300_1mhz),
360 clocksource_u300_1mhz.mult,
361 clocksource_u300_1mhz.shift);
362}
363
349 364
350/* 365/*
351 * This sets up the system timers, clock source and clock event. 366 * This sets up the system timers, clock source and clock event.
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c
index 975eae41ee66..e13be7c444ca 100644
--- a/arch/arm/mach-versatile/core.c
+++ b/arch/arm/mach-versatile/core.c
@@ -27,6 +27,7 @@
27#include <linux/amba/bus.h> 27#include <linux/amba/bus.h>
28#include <linux/amba/clcd.h> 28#include <linux/amba/clcd.h>
29#include <linux/amba/pl061.h> 29#include <linux/amba/pl061.h>
30#include <linux/amba/mmci.h>
30#include <linux/clocksource.h> 31#include <linux/clocksource.h>
31#include <linux/clockchips.h> 32#include <linux/clockchips.h>
32#include <linux/cnt32_to_63.h> 33#include <linux/cnt32_to_63.h>
@@ -47,7 +48,6 @@
47#include <asm/mach/irq.h> 48#include <asm/mach/irq.h>
48#include <asm/mach/time.h> 49#include <asm/mach/time.h>
49#include <asm/mach/map.h> 50#include <asm/mach/map.h>
50#include <asm/mach/mmc.h>
51 51
52#include "core.h" 52#include "core.h"
53#include "clock.h" 53#include "clock.h"
@@ -369,7 +369,7 @@ unsigned int mmc_status(struct device *dev)
369 return readl(VERSATILE_SYSMCI) & mask; 369 return readl(VERSATILE_SYSMCI) & mask;
370} 370}
371 371
372static struct mmc_platform_data mmc0_plat_data = { 372static struct mmci_platform_data mmc0_plat_data = {
373 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, 373 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
374 .status = mmc_status, 374 .status = mmc_status,
375 .gpio_wp = -1, 375 .gpio_wp = -1,
diff --git a/arch/arm/mach-versatile/versatile_pb.c b/arch/arm/mach-versatile/versatile_pb.c
index 9af8d8154df5..239cd30fc4f5 100644
--- a/arch/arm/mach-versatile/versatile_pb.c
+++ b/arch/arm/mach-versatile/versatile_pb.c
@@ -24,6 +24,7 @@
24#include <linux/sysdev.h> 24#include <linux/sysdev.h>
25#include <linux/amba/bus.h> 25#include <linux/amba/bus.h>
26#include <linux/amba/pl061.h> 26#include <linux/amba/pl061.h>
27#include <linux/amba/mmci.h>
27#include <linux/io.h> 28#include <linux/io.h>
28 29
29#include <mach/hardware.h> 30#include <mach/hardware.h>
@@ -31,7 +32,6 @@
31#include <asm/mach-types.h> 32#include <asm/mach-types.h>
32 33
33#include <asm/mach/arch.h> 34#include <asm/mach/arch.h>
34#include <asm/mach/mmc.h>
35 35
36#include "core.h" 36#include "core.h"
37 37
@@ -41,7 +41,7 @@
41#define IRQ_MMCI1A IRQ_SIC_MMCI1A 41#define IRQ_MMCI1A IRQ_SIC_MMCI1A
42#endif 42#endif
43 43
44static struct mmc_platform_data mmc1_plat_data = { 44static struct mmci_platform_data mmc1_plat_data = {
45 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, 45 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
46 .status = mmc_status, 46 .status = mmc_status,
47 .gpio_wp = -1, 47 .gpio_wp = -1,
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
index 5fe595aeba69..8d43e58f9244 100644
--- a/arch/arm/mm/Kconfig
+++ b/arch/arm/mm/Kconfig
@@ -771,3 +771,8 @@ config CACHE_XSC3L2
771 select OUTER_CACHE 771 select OUTER_CACHE
772 help 772 help
773 This option enables the L2 cache on XScale3. 773 This option enables the L2 cache on XScale3.
774
775config ARM_L1_CACHE_SHIFT
776 int
777 default 6 if ARCH_OMAP3
778 default 5
diff --git a/arch/arm/mm/context.c b/arch/arm/mm/context.c
index fc84fcc74380..6bda76a43199 100644
--- a/arch/arm/mm/context.c
+++ b/arch/arm/mm/context.c
@@ -59,6 +59,6 @@ void __new_context(struct mm_struct *mm)
59 } 59 }
60 spin_unlock(&cpu_asid_lock); 60 spin_unlock(&cpu_asid_lock);
61 61
62 mm->cpu_vm_mask = cpumask_of_cpu(smp_processor_id()); 62 cpumask_copy(mm_cpumask(mm), cpumask_of(smp_processor_id()));
63 mm->context.id = asid; 63 mm->context.id = asid;
64} 64}
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
index cc8829d7e116..379f78556055 100644
--- a/arch/arm/mm/fault.c
+++ b/arch/arm/mm/fault.c
@@ -25,6 +25,19 @@
25 25
26#include "fault.h" 26#include "fault.h"
27 27
28/*
29 * Fault status register encodings. We steal bit 31 for our own purposes.
30 */
31#define FSR_LNX_PF (1 << 31)
32#define FSR_WRITE (1 << 11)
33#define FSR_FS4 (1 << 10)
34#define FSR_FS3_0 (15)
35
36static inline int fsr_fs(unsigned int fsr)
37{
38 return (fsr & FSR_FS3_0) | (fsr & FSR_FS4) >> 6;
39}
40
28#ifdef CONFIG_MMU 41#ifdef CONFIG_MMU
29 42
30#ifdef CONFIG_KPROBES 43#ifdef CONFIG_KPROBES
@@ -182,18 +195,35 @@ void do_bad_area(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
182#define VM_FAULT_BADMAP 0x010000 195#define VM_FAULT_BADMAP 0x010000
183#define VM_FAULT_BADACCESS 0x020000 196#define VM_FAULT_BADACCESS 0x020000
184 197
185static int 198/*
199 * Check that the permissions on the VMA allow for the fault which occurred.
200 * If we encountered a write fault, we must have write permission, otherwise
201 * we allow any permission.
202 */
203static inline bool access_error(unsigned int fsr, struct vm_area_struct *vma)
204{
205 unsigned int mask = VM_READ | VM_WRITE | VM_EXEC;
206
207 if (fsr & FSR_WRITE)
208 mask = VM_WRITE;
209 if (fsr & FSR_LNX_PF)
210 mask = VM_EXEC;
211
212 return vma->vm_flags & mask ? false : true;
213}
214
215static int __kprobes
186__do_page_fault(struct mm_struct *mm, unsigned long addr, unsigned int fsr, 216__do_page_fault(struct mm_struct *mm, unsigned long addr, unsigned int fsr,
187 struct task_struct *tsk) 217 struct task_struct *tsk)
188{ 218{
189 struct vm_area_struct *vma; 219 struct vm_area_struct *vma;
190 int fault, mask; 220 int fault;
191 221
192 vma = find_vma(mm, addr); 222 vma = find_vma(mm, addr);
193 fault = VM_FAULT_BADMAP; 223 fault = VM_FAULT_BADMAP;
194 if (!vma) 224 if (unlikely(!vma))
195 goto out; 225 goto out;
196 if (vma->vm_start > addr) 226 if (unlikely(vma->vm_start > addr))
197 goto check_stack; 227 goto check_stack;
198 228
199 /* 229 /*
@@ -201,47 +231,24 @@ __do_page_fault(struct mm_struct *mm, unsigned long addr, unsigned int fsr,
201 * memory access, so we can handle it. 231 * memory access, so we can handle it.
202 */ 232 */
203good_area: 233good_area:
204 if (fsr & (1 << 11)) /* write? */ 234 if (access_error(fsr, vma)) {
205 mask = VM_WRITE; 235 fault = VM_FAULT_BADACCESS;
206 else
207 mask = VM_READ|VM_EXEC|VM_WRITE;
208
209 fault = VM_FAULT_BADACCESS;
210 if (!(vma->vm_flags & mask))
211 goto out; 236 goto out;
237 }
212 238
213 /* 239 /*
214 * If for any reason at all we couldn't handle 240 * If for any reason at all we couldn't handle the fault, make
215 * the fault, make sure we exit gracefully rather 241 * sure we exit gracefully rather than endlessly redo the fault.
216 * than endlessly redo the fault.
217 */ 242 */
218survive: 243 fault = handle_mm_fault(mm, vma, addr & PAGE_MASK, (fsr & FSR_WRITE) ? FAULT_FLAG_WRITE : 0);
219 fault = handle_mm_fault(mm, vma, addr & PAGE_MASK, (fsr & (1 << 11)) ? FAULT_FLAG_WRITE : 0); 244 if (unlikely(fault & VM_FAULT_ERROR))
220 if (unlikely(fault & VM_FAULT_ERROR)) { 245 return fault;
221 if (fault & VM_FAULT_OOM)
222 goto out_of_memory;
223 else if (fault & VM_FAULT_SIGBUS)
224 return fault;
225 BUG();
226 }
227 if (fault & VM_FAULT_MAJOR) 246 if (fault & VM_FAULT_MAJOR)
228 tsk->maj_flt++; 247 tsk->maj_flt++;
229 else 248 else
230 tsk->min_flt++; 249 tsk->min_flt++;
231 return fault; 250 return fault;
232 251
233out_of_memory:
234 if (!is_global_init(tsk))
235 goto out;
236
237 /*
238 * If we are out of memory for pid1, sleep for a while and retry
239 */
240 up_read(&mm->mmap_sem);
241 yield();
242 down_read(&mm->mmap_sem);
243 goto survive;
244
245check_stack: 252check_stack:
246 if (vma->vm_flags & VM_GROWSDOWN && !expand_stack(vma, addr)) 253 if (vma->vm_flags & VM_GROWSDOWN && !expand_stack(vma, addr))
247 goto good_area; 254 goto good_area;
@@ -278,6 +285,13 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
278 if (!user_mode(regs) && !search_exception_tables(regs->ARM_pc)) 285 if (!user_mode(regs) && !search_exception_tables(regs->ARM_pc))
279 goto no_context; 286 goto no_context;
280 down_read(&mm->mmap_sem); 287 down_read(&mm->mmap_sem);
288 } else {
289 /*
290 * The above down_read_trylock() might have succeeded in
291 * which case, we'll have missed the might_sleep() from
292 * down_read()
293 */
294 might_sleep();
281 } 295 }
282 296
283 fault = __do_page_fault(mm, addr, fsr, tsk); 297 fault = __do_page_fault(mm, addr, fsr, tsk);
@@ -289,6 +303,16 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
289 if (likely(!(fault & (VM_FAULT_ERROR | VM_FAULT_BADMAP | VM_FAULT_BADACCESS)))) 303 if (likely(!(fault & (VM_FAULT_ERROR | VM_FAULT_BADMAP | VM_FAULT_BADACCESS))))
290 return 0; 304 return 0;
291 305
306 if (fault & VM_FAULT_OOM) {
307 /*
308 * We ran out of memory, call the OOM killer, and return to
309 * userspace (which will retry the fault, or kill us if we
310 * got oom-killed)
311 */
312 pagefault_out_of_memory();
313 return 0;
314 }
315
292 /* 316 /*
293 * If we are in kernel mode at this point, we 317 * If we are in kernel mode at this point, we
294 * have no context to handle this fault with. 318 * have no context to handle this fault with.
@@ -296,16 +320,6 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
296 if (!user_mode(regs)) 320 if (!user_mode(regs))
297 goto no_context; 321 goto no_context;
298 322
299 if (fault & VM_FAULT_OOM) {
300 /*
301 * We ran out of memory, or some other thing
302 * happened to us that made us unable to handle
303 * the page fault gracefully.
304 */
305 printk("VM: killing process %s\n", tsk->comm);
306 do_group_exit(SIGKILL);
307 return 0;
308 }
309 if (fault & VM_FAULT_SIGBUS) { 323 if (fault & VM_FAULT_SIGBUS) {
310 /* 324 /*
311 * We had some memory, but were unable to 325 * We had some memory, but were unable to
@@ -489,10 +503,10 @@ hook_fault_code(int nr, int (*fn)(unsigned long, unsigned int, struct pt_regs *)
489asmlinkage void __exception 503asmlinkage void __exception
490do_DataAbort(unsigned long addr, unsigned int fsr, struct pt_regs *regs) 504do_DataAbort(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
491{ 505{
492 const struct fsr_info *inf = fsr_info + (fsr & 15) + ((fsr & (1 << 10)) >> 6); 506 const struct fsr_info *inf = fsr_info + fsr_fs(fsr);
493 struct siginfo info; 507 struct siginfo info;
494 508
495 if (!inf->fn(addr, fsr, regs)) 509 if (!inf->fn(addr, fsr & ~FSR_LNX_PF, regs))
496 return; 510 return;
497 511
498 printk(KERN_ALERT "Unhandled fault: %s (0x%03x) at 0x%08lx\n", 512 printk(KERN_ALERT "Unhandled fault: %s (0x%03x) at 0x%08lx\n",
@@ -508,6 +522,6 @@ do_DataAbort(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
508asmlinkage void __exception 522asmlinkage void __exception
509do_PrefetchAbort(unsigned long addr, struct pt_regs *regs) 523do_PrefetchAbort(unsigned long addr, struct pt_regs *regs)
510{ 524{
511 do_translation_fault(addr, 0, regs); 525 do_translation_fault(addr, FSR_LNX_PF, regs);
512} 526}
513 527
diff --git a/arch/arm/mm/flush.c b/arch/arm/mm/flush.c
index 575f3ad722e7..b27942909b23 100644
--- a/arch/arm/mm/flush.c
+++ b/arch/arm/mm/flush.c
@@ -50,7 +50,7 @@ static void flush_pfn_alias(unsigned long pfn, unsigned long vaddr)
50void flush_cache_mm(struct mm_struct *mm) 50void flush_cache_mm(struct mm_struct *mm)
51{ 51{
52 if (cache_is_vivt()) { 52 if (cache_is_vivt()) {
53 if (cpu_isset(smp_processor_id(), mm->cpu_vm_mask)) 53 if (cpumask_test_cpu(smp_processor_id(), mm_cpumask(mm)))
54 __cpuc_flush_user_all(); 54 __cpuc_flush_user_all();
55 return; 55 return;
56 } 56 }
@@ -73,7 +73,7 @@ void flush_cache_mm(struct mm_struct *mm)
73void flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long end) 73void flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long end)
74{ 74{
75 if (cache_is_vivt()) { 75 if (cache_is_vivt()) {
76 if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask)) 76 if (cpumask_test_cpu(smp_processor_id(), mm_cpumask(vma->vm_mm)))
77 __cpuc_flush_user_range(start & PAGE_MASK, PAGE_ALIGN(end), 77 __cpuc_flush_user_range(start & PAGE_MASK, PAGE_ALIGN(end),
78 vma->vm_flags); 78 vma->vm_flags);
79 return; 79 return;
@@ -97,7 +97,7 @@ void flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned
97void flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr, unsigned long pfn) 97void flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr, unsigned long pfn)
98{ 98{
99 if (cache_is_vivt()) { 99 if (cache_is_vivt()) {
100 if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask)) { 100 if (cpumask_test_cpu(smp_processor_id(), mm_cpumask(vma->vm_mm))) {
101 unsigned long addr = user_addr & PAGE_MASK; 101 unsigned long addr = user_addr & PAGE_MASK;
102 __cpuc_flush_user_range(addr, addr + PAGE_SIZE, vma->vm_flags); 102 __cpuc_flush_user_range(addr, addr + PAGE_SIZE, vma->vm_flags);
103 } 103 }
@@ -113,7 +113,7 @@ void flush_ptrace_access(struct vm_area_struct *vma, struct page *page,
113 unsigned long len, int write) 113 unsigned long len, int write)
114{ 114{
115 if (cache_is_vivt()) { 115 if (cache_is_vivt()) {
116 if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask)) { 116 if (cpumask_test_cpu(smp_processor_id(), mm_cpumask(vma->vm_mm))) {
117 unsigned long addr = (unsigned long)kaddr; 117 unsigned long addr = (unsigned long)kaddr;
118 __cpuc_coherent_kern_range(addr, addr + len); 118 __cpuc_coherent_kern_range(addr, addr + len);
119 } 119 }
@@ -126,7 +126,7 @@ void flush_ptrace_access(struct vm_area_struct *vma, struct page *page,
126 } 126 }
127 127
128 /* VIPT non-aliasing cache */ 128 /* VIPT non-aliasing cache */
129 if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask) && 129 if (cpumask_test_cpu(smp_processor_id(), mm_cpumask(vma->vm_mm)) &&
130 vma->vm_flags & VM_EXEC) { 130 vma->vm_flags & VM_EXEC) {
131 unsigned long addr = (unsigned long)kaddr; 131 unsigned long addr = (unsigned long)kaddr;
132 /* only flushing the kernel mapping on non-aliasing VIPT */ 132 /* only flushing the kernel mapping on non-aliasing VIPT */
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index ea36186f32c3..877c492f8e10 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -596,8 +596,8 @@ void __init mem_init(void)
596 596
597 printk(KERN_NOTICE "Memory: %luKB available (%dK code, " 597 printk(KERN_NOTICE "Memory: %luKB available (%dK code, "
598 "%dK data, %dK init, %luK highmem)\n", 598 "%dK data, %dK init, %luK highmem)\n",
599 (unsigned long) nr_free_pages() << (PAGE_SHIFT-10), 599 nr_free_pages() << (PAGE_SHIFT-10), codesize >> 10,
600 codesize >> 10, datasize >> 10, initsize >> 10, 600 datasize >> 10, initsize >> 10,
601 (unsigned long) (totalhigh_pages << (PAGE_SHIFT-10))); 601 (unsigned long) (totalhigh_pages << (PAGE_SHIFT-10)));
602 602
603 if (PAGE_SIZE >= 16384 && num_physpages <= 128) { 603 if (PAGE_SIZE >= 16384 && num_physpages <= 128) {
@@ -613,6 +613,14 @@ void __init mem_init(void)
613 613
614void free_initmem(void) 614void free_initmem(void)
615{ 615{
616#ifdef CONFIG_HAVE_TCM
617 extern char *__tcm_start, *__tcm_end;
618
619 totalram_pages += free_area(__phys_to_pfn(__pa(__tcm_start)),
620 __phys_to_pfn(__pa(__tcm_end)),
621 "TCM link");
622#endif
623
616 if (!machine_is_integrator() && !machine_is_cintegrator()) 624 if (!machine_is_integrator() && !machine_is_cintegrator())
617 totalram_pages += free_area(__phys_to_pfn(__pa(__init_begin)), 625 totalram_pages += free_area(__phys_to_pfn(__pa(__init_begin)),
618 __phys_to_pfn(__pa(__init_end)), 626 __phys_to_pfn(__pa(__init_end)),
diff --git a/arch/arm/plat-iop/adma.c b/arch/arm/plat-iop/adma.c
index 3c127aabe214..1ff6a37e893c 100644
--- a/arch/arm/plat-iop/adma.c
+++ b/arch/arm/plat-iop/adma.c
@@ -179,7 +179,6 @@ static int __init iop3xx_adma_cap_init(void)
179 dma_cap_set(DMA_INTERRUPT, iop3xx_dma_0_data.cap_mask); 179 dma_cap_set(DMA_INTERRUPT, iop3xx_dma_0_data.cap_mask);
180 #else 180 #else
181 dma_cap_set(DMA_MEMCPY, iop3xx_dma_0_data.cap_mask); 181 dma_cap_set(DMA_MEMCPY, iop3xx_dma_0_data.cap_mask);
182 dma_cap_set(DMA_MEMCPY_CRC32C, iop3xx_dma_0_data.cap_mask);
183 dma_cap_set(DMA_INTERRUPT, iop3xx_dma_0_data.cap_mask); 182 dma_cap_set(DMA_INTERRUPT, iop3xx_dma_0_data.cap_mask);
184 #endif 183 #endif
185 184
@@ -188,7 +187,6 @@ static int __init iop3xx_adma_cap_init(void)
188 dma_cap_set(DMA_INTERRUPT, iop3xx_dma_1_data.cap_mask); 187 dma_cap_set(DMA_INTERRUPT, iop3xx_dma_1_data.cap_mask);
189 #else 188 #else
190 dma_cap_set(DMA_MEMCPY, iop3xx_dma_1_data.cap_mask); 189 dma_cap_set(DMA_MEMCPY, iop3xx_dma_1_data.cap_mask);
191 dma_cap_set(DMA_MEMCPY_CRC32C, iop3xx_dma_1_data.cap_mask);
192 dma_cap_set(DMA_INTERRUPT, iop3xx_dma_1_data.cap_mask); 190 dma_cap_set(DMA_INTERRUPT, iop3xx_dma_1_data.cap_mask);
193 #endif 191 #endif
194 192
@@ -198,7 +196,7 @@ static int __init iop3xx_adma_cap_init(void)
198 dma_cap_set(DMA_INTERRUPT, iop3xx_aau_data.cap_mask); 196 dma_cap_set(DMA_INTERRUPT, iop3xx_aau_data.cap_mask);
199 #else 197 #else
200 dma_cap_set(DMA_XOR, iop3xx_aau_data.cap_mask); 198 dma_cap_set(DMA_XOR, iop3xx_aau_data.cap_mask);
201 dma_cap_set(DMA_ZERO_SUM, iop3xx_aau_data.cap_mask); 199 dma_cap_set(DMA_XOR_VAL, iop3xx_aau_data.cap_mask);
202 dma_cap_set(DMA_MEMSET, iop3xx_aau_data.cap_mask); 200 dma_cap_set(DMA_MEMSET, iop3xx_aau_data.cap_mask);
203 dma_cap_set(DMA_INTERRUPT, iop3xx_aau_data.cap_mask); 201 dma_cap_set(DMA_INTERRUPT, iop3xx_aau_data.cap_mask);
204 #endif 202 #endif
diff --git a/arch/arm/plat-mxc/include/mach/spi.h b/arch/arm/plat-mxc/include/mach/spi.h
new file mode 100644
index 000000000000..08be445e8eb8
--- /dev/null
+++ b/arch/arm/plat-mxc/include/mach/spi.h
@@ -0,0 +1,27 @@
1
2#ifndef __MACH_SPI_H_
3#define __MACH_SPI_H_
4
5/*
6 * struct spi_imx_master - device.platform_data for SPI controller devices.
7 * @chipselect: Array of chipselects for this master. Numbers >= 0 mean gpio
8 * pins, numbers < 0 mean internal CSPI chipselects according
9 * to MXC_SPI_CS(). Normally you want to use gpio based chip
10 * selects as the CSPI module tries to be intelligent about
11 * when to assert the chipselect: The CSPI module deasserts the
12 * chipselect once it runs out of input data. The other problem
13 * is that it is not possible to mix between high active and low
14 * active chipselects on one single bus using the internal
15 * chipselects. Unfortunately Freescale decided to put some
16 * chipselects on dedicated pins which are not usable as gpios,
17 * so we have to support the internal chipselects.
18 * @num_chipselect: ARRAY_SIZE(chipselect)
19 */
20struct spi_imx_master {
21 int *chipselect;
22 int num_chipselect;
23};
24
25#define MXC_SPI_CS(no) ((no) - 32)
26
27#endif /* __MACH_SPI_H_*/
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
index efe85d095190..64b3f52bd9b2 100644
--- a/arch/arm/plat-omap/Kconfig
+++ b/arch/arm/plat-omap/Kconfig
@@ -120,6 +120,10 @@ config OMAP_MBOX_FWK
120config OMAP_IOMMU 120config OMAP_IOMMU
121 tristate 121 tristate
122 122
123config OMAP_IOMMU_DEBUG
124 depends on OMAP_IOMMU
125 tristate
126
123choice 127choice
124 prompt "System timer" 128 prompt "System timer"
125 default OMAP_MPU_TIMER 129 default OMAP_MPU_TIMER
@@ -183,6 +187,19 @@ config OMAP_SERIAL_WAKE
183 to data on the serial RX line. This allows you to wake the 187 to data on the serial RX line. This allows you to wake the
184 system from serial console. 188 system from serial console.
185 189
190choice
191 prompt "OMAP PM layer selection"
192 depends on ARCH_OMAP
193 default OMAP_PM_NOOP
194
195config OMAP_PM_NONE
196 bool "No PM layer"
197
198config OMAP_PM_NOOP
199 bool "No-op/debug PM layer"
200
201endchoice
202
186endmenu 203endmenu
187 204
188endif 205endif
diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile
index a83279523958..98f01910c2cf 100644
--- a/arch/arm/plat-omap/Makefile
+++ b/arch/arm/plat-omap/Makefile
@@ -12,8 +12,13 @@ obj- :=
12# OCPI interconnect support for 1710, 1610 and 5912 12# OCPI interconnect support for 1710, 1610 and 5912
13obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o 13obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o
14 14
15# omap_device support (OMAP2+ only at the moment)
16obj-$(CONFIG_ARCH_OMAP2) += omap_device.o
17obj-$(CONFIG_ARCH_OMAP3) += omap_device.o
18
15obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o 19obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o
16obj-$(CONFIG_OMAP_IOMMU) += iommu.o iovmm.o 20obj-$(CONFIG_OMAP_IOMMU) += iommu.o iovmm.o
21obj-$(CONFIG_OMAP_IOMMU_DEBUG) += iommu-debug.o
17 22
18obj-$(CONFIG_CPU_FREQ) += cpu-omap.o 23obj-$(CONFIG_CPU_FREQ) += cpu-omap.o
19obj-$(CONFIG_OMAP_DM_TIMER) += dmtimer.o 24obj-$(CONFIG_OMAP_DM_TIMER) += dmtimer.o
@@ -25,3 +30,4 @@ obj-y += $(i2c-omap-m) $(i2c-omap-y)
25# OMAP mailbox framework 30# OMAP mailbox framework
26obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox.o 31obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox.o
27 32
33obj-$(CONFIG_OMAP_PM_NOOP) += omap-pm-noop.o \ No newline at end of file
diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c
index e8c327a45a55..bf880e966d3b 100644
--- a/arch/arm/plat-omap/clock.c
+++ b/arch/arm/plat-omap/clock.c
@@ -488,7 +488,7 @@ static int __init clk_debugfs_init(void)
488 } 488 }
489 return 0; 489 return 0;
490err_out: 490err_out:
491 debugfs_remove(clk_debugfs_root); /* REVISIT: Cleanup correctly */ 491 debugfs_remove_recursive(clk_debugfs_root);
492 return err; 492 return err;
493} 493}
494late_initcall(clk_debugfs_init); 494late_initcall(clk_debugfs_init);
diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c
index ebcf006406f9..3a4768d55895 100644
--- a/arch/arm/plat-omap/common.c
+++ b/arch/arm/plat-omap/common.c
@@ -54,50 +54,6 @@ static const void *get_config(u16 tag, size_t len, int skip, size_t *len_out)
54 struct omap_board_config_kernel *kinfo = NULL; 54 struct omap_board_config_kernel *kinfo = NULL;
55 int i; 55 int i;
56 56
57#ifdef CONFIG_OMAP_BOOT_TAG
58 struct omap_board_config_entry *info = NULL;
59
60 if (omap_bootloader_tag_len > 4)
61 info = (struct omap_board_config_entry *) omap_bootloader_tag;
62 while (info != NULL) {
63 u8 *next;
64
65 if (info->tag == tag) {
66 if (skip == 0)
67 break;
68 skip--;
69 }
70
71 if ((info->len & 0x03) != 0) {
72 /* We bail out to avoid an alignment fault */
73 printk(KERN_ERR "OMAP peripheral config: Length (%d) not word-aligned (tag %04x)\n",
74 info->len, info->tag);
75 return NULL;
76 }
77 next = (u8 *) info + sizeof(*info) + info->len;
78 if (next >= omap_bootloader_tag + omap_bootloader_tag_len)
79 info = NULL;
80 else
81 info = (struct omap_board_config_entry *) next;
82 }
83 if (info != NULL) {
84 /* Check the length as a lame attempt to check for
85 * binary inconsistency. */
86 if (len != NO_LENGTH_CHECK) {
87 /* Word-align len */
88 if (len & 0x03)
89 len = (len + 3) & ~0x03;
90 if (info->len != len) {
91 printk(KERN_ERR "OMAP peripheral config: Length mismatch with tag %x (want %d, got %d)\n",
92 tag, len, info->len);
93 return NULL;
94 }
95 }
96 if (len_out != NULL)
97 *len_out = info->len;
98 return info->data;
99 }
100#endif
101 /* Try to find the config from the board-specific structures 57 /* Try to find the config from the board-specific structures
102 * in the kernel. */ 58 * in the kernel. */
103 for (i = 0; i < omap_board_config_size; i++) { 59 for (i = 0; i < omap_board_config_size; i++) {
@@ -127,50 +83,6 @@ const void *omap_get_var_config(u16 tag, size_t *len)
127} 83}
128EXPORT_SYMBOL(omap_get_var_config); 84EXPORT_SYMBOL(omap_get_var_config);
129 85
130static int __init omap_add_serial_console(void)
131{
132 const struct omap_serial_console_config *con_info;
133 const struct omap_uart_config *uart_info;
134 static char speed[11], *opt = NULL;
135 int line, i, uart_idx;
136
137 uart_info = omap_get_config(OMAP_TAG_UART, struct omap_uart_config);
138 con_info = omap_get_config(OMAP_TAG_SERIAL_CONSOLE,
139 struct omap_serial_console_config);
140 if (uart_info == NULL || con_info == NULL)
141 return 0;
142
143 if (con_info->console_uart == 0)
144 return 0;
145
146 if (con_info->console_speed) {
147 snprintf(speed, sizeof(speed), "%u", con_info->console_speed);
148 opt = speed;
149 }
150
151 uart_idx = con_info->console_uart - 1;
152 if (uart_idx >= OMAP_MAX_NR_PORTS) {
153 printk(KERN_INFO "Console: external UART#%d. "
154 "Not adding it as console this time.\n",
155 uart_idx + 1);
156 return 0;
157 }
158 if (!(uart_info->enabled_uarts & (1 << uart_idx))) {
159 printk(KERN_ERR "Console: Selected UART#%d is "
160 "not enabled for this platform\n",
161 uart_idx + 1);
162 return -1;
163 }
164 line = 0;
165 for (i = 0; i < uart_idx; i++) {
166 if (uart_info->enabled_uarts & (1 << i))
167 line++;
168 }
169 return add_preferred_console("ttyS", line, opt);
170}
171console_initcall(omap_add_serial_console);
172
173
174/* 86/*
175 * 32KHz clocksource ... always available, on pretty most chips except 87 * 32KHz clocksource ... always available, on pretty most chips except
176 * OMAP 730 and 1510. Other timers could be used as clocksources, with 88 * OMAP 730 and 1510. Other timers could be used as clocksources, with
@@ -253,11 +165,8 @@ static struct clocksource clocksource_32k = {
253 */ 165 */
254unsigned long long sched_clock(void) 166unsigned long long sched_clock(void)
255{ 167{
256 unsigned long long ret; 168 return clocksource_cyc2ns(clocksource_32k.read(&clocksource_32k),
257 169 clocksource_32k.mult, clocksource_32k.shift);
258 ret = (unsigned long long)clocksource_32k.read(&clocksource_32k);
259 ret = (ret * clocksource_32k.mult_orig) >> clocksource_32k.shift;
260 return ret;
261} 170}
262 171
263static int __init omap_init_clocksource_32k(void) 172static int __init omap_init_clocksource_32k(void)
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index 9b00f4cbc903..fd3154ae69b1 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -2347,16 +2347,16 @@ static int __init omap_init_dma(void)
2347 int ch, r; 2347 int ch, r;
2348 2348
2349 if (cpu_class_is_omap1()) { 2349 if (cpu_class_is_omap1()) {
2350 omap_dma_base = IO_ADDRESS(OMAP1_DMA_BASE); 2350 omap_dma_base = OMAP1_IO_ADDRESS(OMAP1_DMA_BASE);
2351 dma_lch_count = OMAP1_LOGICAL_DMA_CH_COUNT; 2351 dma_lch_count = OMAP1_LOGICAL_DMA_CH_COUNT;
2352 } else if (cpu_is_omap24xx()) { 2352 } else if (cpu_is_omap24xx()) {
2353 omap_dma_base = IO_ADDRESS(OMAP24XX_DMA4_BASE); 2353 omap_dma_base = OMAP2_IO_ADDRESS(OMAP24XX_DMA4_BASE);
2354 dma_lch_count = OMAP_DMA4_LOGICAL_DMA_CH_COUNT; 2354 dma_lch_count = OMAP_DMA4_LOGICAL_DMA_CH_COUNT;
2355 } else if (cpu_is_omap34xx()) { 2355 } else if (cpu_is_omap34xx()) {
2356 omap_dma_base = IO_ADDRESS(OMAP34XX_DMA4_BASE); 2356 omap_dma_base = OMAP2_IO_ADDRESS(OMAP34XX_DMA4_BASE);
2357 dma_lch_count = OMAP_DMA4_LOGICAL_DMA_CH_COUNT; 2357 dma_lch_count = OMAP_DMA4_LOGICAL_DMA_CH_COUNT;
2358 } else if (cpu_is_omap44xx()) { 2358 } else if (cpu_is_omap44xx()) {
2359 omap_dma_base = IO_ADDRESS(OMAP44XX_DMA4_BASE); 2359 omap_dma_base = OMAP2_IO_ADDRESS(OMAP44XX_DMA4_BASE);
2360 dma_lch_count = OMAP_DMA4_LOGICAL_DMA_CH_COUNT; 2360 dma_lch_count = OMAP_DMA4_LOGICAL_DMA_CH_COUNT;
2361 } else { 2361 } else {
2362 pr_err("DMA init failed for unsupported omap\n"); 2362 pr_err("DMA init failed for unsupported omap\n");
diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
index 7f50b6103dee..d325b54daeb5 100644
--- a/arch/arm/plat-omap/dmtimer.c
+++ b/arch/arm/plat-omap/dmtimer.c
@@ -774,7 +774,10 @@ int __init omap_dm_timer_init(void)
774 774
775 for (i = 0; i < dm_timer_count; i++) { 775 for (i = 0; i < dm_timer_count; i++) {
776 timer = &dm_timers[i]; 776 timer = &dm_timers[i];
777 timer->io_base = IO_ADDRESS(timer->phys_base); 777 if (cpu_class_is_omap1())
778 timer->io_base = OMAP1_IO_ADDRESS(timer->phys_base);
779 else
780 timer->io_base = OMAP2_IO_ADDRESS(timer->phys_base);
778#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) || \ 781#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) || \
779 defined(CONFIG_ARCH_OMAP4) 782 defined(CONFIG_ARCH_OMAP4)
780 if (cpu_class_is_omap2()) { 783 if (cpu_class_is_omap2()) {
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c
index 176c86e5531d..693839c89ad0 100644
--- a/arch/arm/plat-omap/gpio.c
+++ b/arch/arm/plat-omap/gpio.c
@@ -31,7 +31,7 @@
31/* 31/*
32 * OMAP1510 GPIO registers 32 * OMAP1510 GPIO registers
33 */ 33 */
34#define OMAP1510_GPIO_BASE IO_ADDRESS(0xfffce000) 34#define OMAP1510_GPIO_BASE OMAP1_IO_ADDRESS(0xfffce000)
35#define OMAP1510_GPIO_DATA_INPUT 0x00 35#define OMAP1510_GPIO_DATA_INPUT 0x00
36#define OMAP1510_GPIO_DATA_OUTPUT 0x04 36#define OMAP1510_GPIO_DATA_OUTPUT 0x04
37#define OMAP1510_GPIO_DIR_CONTROL 0x08 37#define OMAP1510_GPIO_DIR_CONTROL 0x08
@@ -45,10 +45,10 @@
45/* 45/*
46 * OMAP1610 specific GPIO registers 46 * OMAP1610 specific GPIO registers
47 */ 47 */
48#define OMAP1610_GPIO1_BASE IO_ADDRESS(0xfffbe400) 48#define OMAP1610_GPIO1_BASE OMAP1_IO_ADDRESS(0xfffbe400)
49#define OMAP1610_GPIO2_BASE IO_ADDRESS(0xfffbec00) 49#define OMAP1610_GPIO2_BASE OMAP1_IO_ADDRESS(0xfffbec00)
50#define OMAP1610_GPIO3_BASE IO_ADDRESS(0xfffbb400) 50#define OMAP1610_GPIO3_BASE OMAP1_IO_ADDRESS(0xfffbb400)
51#define OMAP1610_GPIO4_BASE IO_ADDRESS(0xfffbbc00) 51#define OMAP1610_GPIO4_BASE OMAP1_IO_ADDRESS(0xfffbbc00)
52#define OMAP1610_GPIO_REVISION 0x0000 52#define OMAP1610_GPIO_REVISION 0x0000
53#define OMAP1610_GPIO_SYSCONFIG 0x0010 53#define OMAP1610_GPIO_SYSCONFIG 0x0010
54#define OMAP1610_GPIO_SYSSTATUS 0x0014 54#define OMAP1610_GPIO_SYSSTATUS 0x0014
@@ -70,12 +70,12 @@
70/* 70/*
71 * OMAP730 specific GPIO registers 71 * OMAP730 specific GPIO registers
72 */ 72 */
73#define OMAP730_GPIO1_BASE IO_ADDRESS(0xfffbc000) 73#define OMAP730_GPIO1_BASE OMAP1_IO_ADDRESS(0xfffbc000)
74#define OMAP730_GPIO2_BASE IO_ADDRESS(0xfffbc800) 74#define OMAP730_GPIO2_BASE OMAP1_IO_ADDRESS(0xfffbc800)
75#define OMAP730_GPIO3_BASE IO_ADDRESS(0xfffbd000) 75#define OMAP730_GPIO3_BASE OMAP1_IO_ADDRESS(0xfffbd000)
76#define OMAP730_GPIO4_BASE IO_ADDRESS(0xfffbd800) 76#define OMAP730_GPIO4_BASE OMAP1_IO_ADDRESS(0xfffbd800)
77#define OMAP730_GPIO5_BASE IO_ADDRESS(0xfffbe000) 77#define OMAP730_GPIO5_BASE OMAP1_IO_ADDRESS(0xfffbe000)
78#define OMAP730_GPIO6_BASE IO_ADDRESS(0xfffbe800) 78#define OMAP730_GPIO6_BASE OMAP1_IO_ADDRESS(0xfffbe800)
79#define OMAP730_GPIO_DATA_INPUT 0x00 79#define OMAP730_GPIO_DATA_INPUT 0x00
80#define OMAP730_GPIO_DATA_OUTPUT 0x04 80#define OMAP730_GPIO_DATA_OUTPUT 0x04
81#define OMAP730_GPIO_DIR_CONTROL 0x08 81#define OMAP730_GPIO_DIR_CONTROL 0x08
@@ -86,12 +86,12 @@
86/* 86/*
87 * OMAP850 specific GPIO registers 87 * OMAP850 specific GPIO registers
88 */ 88 */
89#define OMAP850_GPIO1_BASE IO_ADDRESS(0xfffbc000) 89#define OMAP850_GPIO1_BASE OMAP1_IO_ADDRESS(0xfffbc000)
90#define OMAP850_GPIO2_BASE IO_ADDRESS(0xfffbc800) 90#define OMAP850_GPIO2_BASE OMAP1_IO_ADDRESS(0xfffbc800)
91#define OMAP850_GPIO3_BASE IO_ADDRESS(0xfffbd000) 91#define OMAP850_GPIO3_BASE OMAP1_IO_ADDRESS(0xfffbd000)
92#define OMAP850_GPIO4_BASE IO_ADDRESS(0xfffbd800) 92#define OMAP850_GPIO4_BASE OMAP1_IO_ADDRESS(0xfffbd800)
93#define OMAP850_GPIO5_BASE IO_ADDRESS(0xfffbe000) 93#define OMAP850_GPIO5_BASE OMAP1_IO_ADDRESS(0xfffbe000)
94#define OMAP850_GPIO6_BASE IO_ADDRESS(0xfffbe800) 94#define OMAP850_GPIO6_BASE OMAP1_IO_ADDRESS(0xfffbe800)
95#define OMAP850_GPIO_DATA_INPUT 0x00 95#define OMAP850_GPIO_DATA_INPUT 0x00
96#define OMAP850_GPIO_DATA_OUTPUT 0x04 96#define OMAP850_GPIO_DATA_OUTPUT 0x04
97#define OMAP850_GPIO_DIR_CONTROL 0x08 97#define OMAP850_GPIO_DIR_CONTROL 0x08
@@ -99,19 +99,21 @@
99#define OMAP850_GPIO_INT_MASK 0x10 99#define OMAP850_GPIO_INT_MASK 0x10
100#define OMAP850_GPIO_INT_STATUS 0x14 100#define OMAP850_GPIO_INT_STATUS 0x14
101 101
102#define OMAP1_MPUIO_VBASE OMAP1_IO_ADDRESS(OMAP1_MPUIO_BASE)
103
102/* 104/*
103 * omap24xx specific GPIO registers 105 * omap24xx specific GPIO registers
104 */ 106 */
105#define OMAP242X_GPIO1_BASE IO_ADDRESS(0x48018000) 107#define OMAP242X_GPIO1_BASE OMAP2_IO_ADDRESS(0x48018000)
106#define OMAP242X_GPIO2_BASE IO_ADDRESS(0x4801a000) 108#define OMAP242X_GPIO2_BASE OMAP2_IO_ADDRESS(0x4801a000)
107#define OMAP242X_GPIO3_BASE IO_ADDRESS(0x4801c000) 109#define OMAP242X_GPIO3_BASE OMAP2_IO_ADDRESS(0x4801c000)
108#define OMAP242X_GPIO4_BASE IO_ADDRESS(0x4801e000) 110#define OMAP242X_GPIO4_BASE OMAP2_IO_ADDRESS(0x4801e000)
109 111
110#define OMAP243X_GPIO1_BASE IO_ADDRESS(0x4900C000) 112#define OMAP243X_GPIO1_BASE OMAP2_IO_ADDRESS(0x4900C000)
111#define OMAP243X_GPIO2_BASE IO_ADDRESS(0x4900E000) 113#define OMAP243X_GPIO2_BASE OMAP2_IO_ADDRESS(0x4900E000)
112#define OMAP243X_GPIO3_BASE IO_ADDRESS(0x49010000) 114#define OMAP243X_GPIO3_BASE OMAP2_IO_ADDRESS(0x49010000)
113#define OMAP243X_GPIO4_BASE IO_ADDRESS(0x49012000) 115#define OMAP243X_GPIO4_BASE OMAP2_IO_ADDRESS(0x49012000)
114#define OMAP243X_GPIO5_BASE IO_ADDRESS(0x480B6000) 116#define OMAP243X_GPIO5_BASE OMAP2_IO_ADDRESS(0x480B6000)
115 117
116#define OMAP24XX_GPIO_REVISION 0x0000 118#define OMAP24XX_GPIO_REVISION 0x0000
117#define OMAP24XX_GPIO_SYSCONFIG 0x0010 119#define OMAP24XX_GPIO_SYSCONFIG 0x0010
@@ -168,24 +170,22 @@
168 * omap34xx specific GPIO registers 170 * omap34xx specific GPIO registers
169 */ 171 */
170 172
171#define OMAP34XX_GPIO1_BASE IO_ADDRESS(0x48310000) 173#define OMAP34XX_GPIO1_BASE OMAP2_IO_ADDRESS(0x48310000)
172#define OMAP34XX_GPIO2_BASE IO_ADDRESS(0x49050000) 174#define OMAP34XX_GPIO2_BASE OMAP2_IO_ADDRESS(0x49050000)
173#define OMAP34XX_GPIO3_BASE IO_ADDRESS(0x49052000) 175#define OMAP34XX_GPIO3_BASE OMAP2_IO_ADDRESS(0x49052000)
174#define OMAP34XX_GPIO4_BASE IO_ADDRESS(0x49054000) 176#define OMAP34XX_GPIO4_BASE OMAP2_IO_ADDRESS(0x49054000)
175#define OMAP34XX_GPIO5_BASE IO_ADDRESS(0x49056000) 177#define OMAP34XX_GPIO5_BASE OMAP2_IO_ADDRESS(0x49056000)
176#define OMAP34XX_GPIO6_BASE IO_ADDRESS(0x49058000) 178#define OMAP34XX_GPIO6_BASE OMAP2_IO_ADDRESS(0x49058000)
177 179
178/* 180/*
179 * OMAP44XX specific GPIO registers 181 * OMAP44XX specific GPIO registers
180 */ 182 */
181#define OMAP44XX_GPIO1_BASE IO_ADDRESS(0x4a310000) 183#define OMAP44XX_GPIO1_BASE OMAP2_IO_ADDRESS(0x4a310000)
182#define OMAP44XX_GPIO2_BASE IO_ADDRESS(0x48055000) 184#define OMAP44XX_GPIO2_BASE OMAP2_IO_ADDRESS(0x48055000)
183#define OMAP44XX_GPIO3_BASE IO_ADDRESS(0x48057000) 185#define OMAP44XX_GPIO3_BASE OMAP2_IO_ADDRESS(0x48057000)
184#define OMAP44XX_GPIO4_BASE IO_ADDRESS(0x48059000) 186#define OMAP44XX_GPIO4_BASE OMAP2_IO_ADDRESS(0x48059000)
185#define OMAP44XX_GPIO5_BASE IO_ADDRESS(0x4805B000) 187#define OMAP44XX_GPIO5_BASE OMAP2_IO_ADDRESS(0x4805B000)
186#define OMAP44XX_GPIO6_BASE IO_ADDRESS(0x4805D000) 188#define OMAP44XX_GPIO6_BASE OMAP2_IO_ADDRESS(0x4805D000)
187
188#define OMAP_MPUIO_VBASE IO_ADDRESS(OMAP_MPUIO_BASE)
189 189
190struct gpio_bank { 190struct gpio_bank {
191 void __iomem *base; 191 void __iomem *base;
@@ -221,7 +221,7 @@ struct gpio_bank {
221 221
222#ifdef CONFIG_ARCH_OMAP16XX 222#ifdef CONFIG_ARCH_OMAP16XX
223static struct gpio_bank gpio_bank_1610[5] = { 223static struct gpio_bank gpio_bank_1610[5] = {
224 { OMAP_MPUIO_VBASE, INT_MPUIO, IH_MPUIO_BASE, METHOD_MPUIO}, 224 { OMAP1_MPUIO_VBASE, INT_MPUIO, IH_MPUIO_BASE, METHOD_MPUIO},
225 { OMAP1610_GPIO1_BASE, INT_GPIO_BANK1, IH_GPIO_BASE, METHOD_GPIO_1610 }, 225 { OMAP1610_GPIO1_BASE, INT_GPIO_BANK1, IH_GPIO_BASE, METHOD_GPIO_1610 },
226 { OMAP1610_GPIO2_BASE, INT_1610_GPIO_BANK2, IH_GPIO_BASE + 16, METHOD_GPIO_1610 }, 226 { OMAP1610_GPIO2_BASE, INT_1610_GPIO_BANK2, IH_GPIO_BASE + 16, METHOD_GPIO_1610 },
227 { OMAP1610_GPIO3_BASE, INT_1610_GPIO_BANK3, IH_GPIO_BASE + 32, METHOD_GPIO_1610 }, 227 { OMAP1610_GPIO3_BASE, INT_1610_GPIO_BANK3, IH_GPIO_BASE + 32, METHOD_GPIO_1610 },
@@ -231,14 +231,14 @@ static struct gpio_bank gpio_bank_1610[5] = {
231 231
232#ifdef CONFIG_ARCH_OMAP15XX 232#ifdef CONFIG_ARCH_OMAP15XX
233static struct gpio_bank gpio_bank_1510[2] = { 233static struct gpio_bank gpio_bank_1510[2] = {
234 { OMAP_MPUIO_VBASE, INT_MPUIO, IH_MPUIO_BASE, METHOD_MPUIO }, 234 { OMAP1_MPUIO_VBASE, INT_MPUIO, IH_MPUIO_BASE, METHOD_MPUIO },
235 { OMAP1510_GPIO_BASE, INT_GPIO_BANK1, IH_GPIO_BASE, METHOD_GPIO_1510 } 235 { OMAP1510_GPIO_BASE, INT_GPIO_BANK1, IH_GPIO_BASE, METHOD_GPIO_1510 }
236}; 236};
237#endif 237#endif
238 238
239#ifdef CONFIG_ARCH_OMAP730 239#ifdef CONFIG_ARCH_OMAP730
240static struct gpio_bank gpio_bank_730[7] = { 240static struct gpio_bank gpio_bank_730[7] = {
241 { OMAP_MPUIO_VBASE, INT_730_MPUIO, IH_MPUIO_BASE, METHOD_MPUIO }, 241 { OMAP1_MPUIO_VBASE, INT_730_MPUIO, IH_MPUIO_BASE, METHOD_MPUIO },
242 { OMAP730_GPIO1_BASE, INT_730_GPIO_BANK1, IH_GPIO_BASE, METHOD_GPIO_730 }, 242 { OMAP730_GPIO1_BASE, INT_730_GPIO_BANK1, IH_GPIO_BASE, METHOD_GPIO_730 },
243 { OMAP730_GPIO2_BASE, INT_730_GPIO_BANK2, IH_GPIO_BASE + 32, METHOD_GPIO_730 }, 243 { OMAP730_GPIO2_BASE, INT_730_GPIO_BANK2, IH_GPIO_BASE + 32, METHOD_GPIO_730 },
244 { OMAP730_GPIO3_BASE, INT_730_GPIO_BANK3, IH_GPIO_BASE + 64, METHOD_GPIO_730 }, 244 { OMAP730_GPIO3_BASE, INT_730_GPIO_BANK3, IH_GPIO_BASE + 64, METHOD_GPIO_730 },
@@ -250,7 +250,7 @@ static struct gpio_bank gpio_bank_730[7] = {
250 250
251#ifdef CONFIG_ARCH_OMAP850 251#ifdef CONFIG_ARCH_OMAP850
252static struct gpio_bank gpio_bank_850[7] = { 252static struct gpio_bank gpio_bank_850[7] = {
253 { OMAP_MPUIO_BASE, INT_850_MPUIO, IH_MPUIO_BASE, METHOD_MPUIO }, 253 { OMAP1_MPUIO_BASE, INT_850_MPUIO, IH_MPUIO_BASE, METHOD_MPUIO },
254 { OMAP850_GPIO1_BASE, INT_850_GPIO_BANK1, IH_GPIO_BASE, METHOD_GPIO_850 }, 254 { OMAP850_GPIO1_BASE, INT_850_GPIO_BANK1, IH_GPIO_BASE, METHOD_GPIO_850 },
255 { OMAP850_GPIO2_BASE, INT_850_GPIO_BANK2, IH_GPIO_BASE + 32, METHOD_GPIO_850 }, 255 { OMAP850_GPIO2_BASE, INT_850_GPIO_BANK2, IH_GPIO_BASE + 32, METHOD_GPIO_850 },
256 { OMAP850_GPIO3_BASE, INT_850_GPIO_BANK3, IH_GPIO_BASE + 64, METHOD_GPIO_850 }, 256 { OMAP850_GPIO3_BASE, INT_850_GPIO_BANK3, IH_GPIO_BASE + 64, METHOD_GPIO_850 },
@@ -2032,7 +2032,7 @@ void omap2_gpio_resume_after_retention(void)
2032 return; 2032 return;
2033 for (i = 0; i < gpio_bank_count; i++) { 2033 for (i = 0; i < gpio_bank_count; i++) {
2034 struct gpio_bank *bank = &gpio_bank[i]; 2034 struct gpio_bank *bank = &gpio_bank[i];
2035 u32 l; 2035 u32 l, gen, gen0, gen1;
2036 2036
2037 if (!(bank->enabled_non_wakeup_gpios)) 2037 if (!(bank->enabled_non_wakeup_gpios))
2038 continue; 2038 continue;
@@ -2056,13 +2056,32 @@ void omap2_gpio_resume_after_retention(void)
2056 * this silicon bug. */ 2056 * this silicon bug. */
2057 l ^= bank->saved_datain; 2057 l ^= bank->saved_datain;
2058 l &= bank->non_wakeup_gpios; 2058 l &= bank->non_wakeup_gpios;
2059 if (l) { 2059
2060 /*
2061 * No need to generate IRQs for the rising edge for gpio IRQs
2062 * configured with falling edge only; and vice versa.
2063 */
2064 gen0 = l & bank->saved_fallingdetect;
2065 gen0 &= bank->saved_datain;
2066
2067 gen1 = l & bank->saved_risingdetect;
2068 gen1 &= ~(bank->saved_datain);
2069
2070 /* FIXME: Consider GPIO IRQs with level detections properly! */
2071 gen = l & (~(bank->saved_fallingdetect) &
2072 ~(bank->saved_risingdetect));
2073 /* Consider all GPIO IRQs needed to be updated */
2074 gen |= gen0 | gen1;
2075
2076 if (gen) {
2060 u32 old0, old1; 2077 u32 old0, old1;
2061#if defined(CONFIG_ARCH_OMAP24XX) || defined(CONFIG_ARCH_OMAP34XX) 2078#if defined(CONFIG_ARCH_OMAP24XX) || defined(CONFIG_ARCH_OMAP34XX)
2062 old0 = __raw_readl(bank->base + OMAP24XX_GPIO_LEVELDETECT0); 2079 old0 = __raw_readl(bank->base + OMAP24XX_GPIO_LEVELDETECT0);
2063 old1 = __raw_readl(bank->base + OMAP24XX_GPIO_LEVELDETECT1); 2080 old1 = __raw_readl(bank->base + OMAP24XX_GPIO_LEVELDETECT1);
2064 __raw_writel(old0 | l, bank->base + OMAP24XX_GPIO_LEVELDETECT0); 2081 __raw_writel(old0 | gen, bank->base +
2065 __raw_writel(old1 | l, bank->base + OMAP24XX_GPIO_LEVELDETECT1); 2082 OMAP24XX_GPIO_LEVELDETECT0);
2083 __raw_writel(old1 | gen, bank->base +
2084 OMAP24XX_GPIO_LEVELDETECT1);
2066 __raw_writel(old0, bank->base + OMAP24XX_GPIO_LEVELDETECT0); 2085 __raw_writel(old0, bank->base + OMAP24XX_GPIO_LEVELDETECT0);
2067 __raw_writel(old1, bank->base + OMAP24XX_GPIO_LEVELDETECT1); 2086 __raw_writel(old1, bank->base + OMAP24XX_GPIO_LEVELDETECT1);
2068#endif 2087#endif
diff --git a/arch/arm/plat-omap/include/mach/board.h b/arch/arm/plat-omap/include/mach/board.h
index 50ea79a0efa2..8e913c322810 100644
--- a/arch/arm/plat-omap/include/mach/board.h
+++ b/arch/arm/plat-omap/include/mach/board.h
@@ -16,10 +16,8 @@
16 16
17/* Different peripheral ids */ 17/* Different peripheral ids */
18#define OMAP_TAG_CLOCK 0x4f01 18#define OMAP_TAG_CLOCK 0x4f01
19#define OMAP_TAG_SERIAL_CONSOLE 0x4f03
20#define OMAP_TAG_LCD 0x4f05 19#define OMAP_TAG_LCD 0x4f05
21#define OMAP_TAG_GPIO_SWITCH 0x4f06 20#define OMAP_TAG_GPIO_SWITCH 0x4f06
22#define OMAP_TAG_UART 0x4f07
23#define OMAP_TAG_FBMEM 0x4f08 21#define OMAP_TAG_FBMEM 0x4f08
24#define OMAP_TAG_STI_CONSOLE 0x4f09 22#define OMAP_TAG_STI_CONSOLE 0x4f09
25#define OMAP_TAG_CAMERA_SENSOR 0x4f0a 23#define OMAP_TAG_CAMERA_SENSOR 0x4f0a
diff --git a/arch/arm/plat-omap/include/mach/clockdomain.h b/arch/arm/plat-omap/include/mach/clockdomain.h
index b9d0dd2da89b..99ebd886f134 100644
--- a/arch/arm/plat-omap/include/mach/clockdomain.h
+++ b/arch/arm/plat-omap/include/mach/clockdomain.h
@@ -95,7 +95,8 @@ int clkdm_register(struct clockdomain *clkdm);
95int clkdm_unregister(struct clockdomain *clkdm); 95int clkdm_unregister(struct clockdomain *clkdm);
96struct clockdomain *clkdm_lookup(const char *name); 96struct clockdomain *clkdm_lookup(const char *name);
97 97
98int clkdm_for_each(int (*fn)(struct clockdomain *clkdm)); 98int clkdm_for_each(int (*fn)(struct clockdomain *clkdm, void *user),
99 void *user);
99struct powerdomain *clkdm_get_pwrdm(struct clockdomain *clkdm); 100struct powerdomain *clkdm_get_pwrdm(struct clockdomain *clkdm);
100 101
101void omap2_clkdm_allow_idle(struct clockdomain *clkdm); 102void omap2_clkdm_allow_idle(struct clockdomain *clkdm);
diff --git a/arch/arm/plat-omap/include/mach/control.h b/arch/arm/plat-omap/include/mach/control.h
index 8140dbccb7bc..826d317cdbec 100644
--- a/arch/arm/plat-omap/include/mach/control.h
+++ b/arch/arm/plat-omap/include/mach/control.h
@@ -20,15 +20,15 @@
20 20
21#ifndef __ASSEMBLY__ 21#ifndef __ASSEMBLY__
22#define OMAP242X_CTRL_REGADDR(reg) \ 22#define OMAP242X_CTRL_REGADDR(reg) \
23 IO_ADDRESS(OMAP242X_CTRL_BASE + (reg)) 23 OMAP2_IO_ADDRESS(OMAP242X_CTRL_BASE + (reg))
24#define OMAP243X_CTRL_REGADDR(reg) \ 24#define OMAP243X_CTRL_REGADDR(reg) \
25 IO_ADDRESS(OMAP243X_CTRL_BASE + (reg)) 25 OMAP2_IO_ADDRESS(OMAP243X_CTRL_BASE + (reg))
26#define OMAP343X_CTRL_REGADDR(reg) \ 26#define OMAP343X_CTRL_REGADDR(reg) \
27 IO_ADDRESS(OMAP343X_CTRL_BASE + (reg)) 27 OMAP2_IO_ADDRESS(OMAP343X_CTRL_BASE + (reg))
28#else 28#else
29#define OMAP242X_CTRL_REGADDR(reg) IO_ADDRESS(OMAP242X_CTRL_BASE + (reg)) 29#define OMAP242X_CTRL_REGADDR(reg) OMAP2_IO_ADDRESS(OMAP242X_CTRL_BASE + (reg))
30#define OMAP243X_CTRL_REGADDR(reg) IO_ADDRESS(OMAP243X_CTRL_BASE + (reg)) 30#define OMAP243X_CTRL_REGADDR(reg) OMAP2_IO_ADDRESS(OMAP243X_CTRL_BASE + (reg))
31#define OMAP343X_CTRL_REGADDR(reg) IO_ADDRESS(OMAP343X_CTRL_BASE + (reg)) 31#define OMAP343X_CTRL_REGADDR(reg) OMAP2_IO_ADDRESS(OMAP343X_CTRL_BASE + (reg))
32#endif /* __ASSEMBLY__ */ 32#endif /* __ASSEMBLY__ */
33 33
34/* 34/*
diff --git a/arch/arm/plat-omap/include/mach/entry-macro.S b/arch/arm/plat-omap/include/mach/entry-macro.S
index 56426ed45ef4..a5592991634d 100644
--- a/arch/arm/plat-omap/include/mach/entry-macro.S
+++ b/arch/arm/plat-omap/include/mach/entry-macro.S
@@ -41,7 +41,7 @@
41 .endm 41 .endm
42 42
43 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp 43 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
44 ldr \base, =IO_ADDRESS(OMAP_IH1_BASE) 44 ldr \base, =OMAP1_IO_ADDRESS(OMAP_IH1_BASE)
45 ldr \irqnr, [\base, #IRQ_ITR_REG_OFFSET] 45 ldr \irqnr, [\base, #IRQ_ITR_REG_OFFSET]
46 ldr \tmp, [\base, #IRQ_MIR_REG_OFFSET] 46 ldr \tmp, [\base, #IRQ_MIR_REG_OFFSET]
47 mov \irqstat, #0xffffffff 47 mov \irqstat, #0xffffffff
@@ -53,7 +53,7 @@
53 cmp \irqnr, #0 53 cmp \irqnr, #0
54 ldreq \irqnr, [\base, #IRQ_SIR_IRQ_REG_OFFSET] 54 ldreq \irqnr, [\base, #IRQ_SIR_IRQ_REG_OFFSET]
55 cmpeq \irqnr, #INT_IH2_IRQ 55 cmpeq \irqnr, #INT_IH2_IRQ
56 ldreq \base, =IO_ADDRESS(OMAP_IH2_BASE) 56 ldreq \base, =OMAP1_IO_ADDRESS(OMAP_IH2_BASE)
57 ldreq \irqnr, [\base, #IRQ_SIR_IRQ_REG_OFFSET] 57 ldreq \irqnr, [\base, #IRQ_SIR_IRQ_REG_OFFSET]
58 addeqs \irqnr, \irqnr, #32 58 addeqs \irqnr, \irqnr, #32
591510: 591510:
@@ -68,9 +68,9 @@
68 68
69/* REVISIT: This should be set dynamically if CONFIG_MULTI_OMAP2 is selected */ 69/* REVISIT: This should be set dynamically if CONFIG_MULTI_OMAP2 is selected */
70#if defined(CONFIG_ARCH_OMAP2420) || defined(CONFIG_ARCH_OMAP2430) 70#if defined(CONFIG_ARCH_OMAP2420) || defined(CONFIG_ARCH_OMAP2430)
71#define OMAP2_VA_IC_BASE IO_ADDRESS(OMAP24XX_IC_BASE) 71#define OMAP2_VA_IC_BASE OMAP2_IO_ADDRESS(OMAP24XX_IC_BASE)
72#elif defined(CONFIG_ARCH_OMAP34XX) 72#elif defined(CONFIG_ARCH_OMAP34XX)
73#define OMAP2_VA_IC_BASE IO_ADDRESS(OMAP34XX_IC_BASE) 73#define OMAP2_VA_IC_BASE OMAP2_IO_ADDRESS(OMAP34XX_IC_BASE)
74#endif 74#endif
75#if defined(CONFIG_ARCH_OMAP4) 75#if defined(CONFIG_ARCH_OMAP4)
76#include <mach/omap44xx.h> 76#include <mach/omap44xx.h>
diff --git a/arch/arm/plat-omap/include/mach/gpio.h b/arch/arm/plat-omap/include/mach/gpio.h
index 2b22a8799bc6..633ff688b928 100644
--- a/arch/arm/plat-omap/include/mach/gpio.h
+++ b/arch/arm/plat-omap/include/mach/gpio.h
@@ -29,7 +29,7 @@
29#include <linux/io.h> 29#include <linux/io.h>
30#include <mach/irqs.h> 30#include <mach/irqs.h>
31 31
32#define OMAP_MPUIO_BASE 0xfffb5000 32#define OMAP1_MPUIO_BASE 0xfffb5000
33 33
34#if (defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850)) 34#if (defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850))
35 35
diff --git a/arch/arm/plat-omap/include/mach/gpmc.h b/arch/arm/plat-omap/include/mach/gpmc.h
index 921b16532ff5..9c99cda77ba6 100644
--- a/arch/arm/plat-omap/include/mach/gpmc.h
+++ b/arch/arm/plat-omap/include/mach/gpmc.h
@@ -103,6 +103,10 @@ extern int gpmc_cs_request(int cs, unsigned long size, unsigned long *base);
103extern void gpmc_cs_free(int cs); 103extern void gpmc_cs_free(int cs);
104extern int gpmc_cs_set_reserved(int cs, int reserved); 104extern int gpmc_cs_set_reserved(int cs, int reserved);
105extern int gpmc_cs_reserved(int cs); 105extern int gpmc_cs_reserved(int cs);
106extern int gpmc_prefetch_enable(int cs, int dma_mode,
107 unsigned int u32_count, int is_write);
108extern void gpmc_prefetch_reset(void);
109extern int gpmc_prefetch_status(void);
106extern void __init gpmc_init(void); 110extern void __init gpmc_init(void);
107 111
108#endif 112#endif
diff --git a/arch/arm/plat-omap/include/mach/io.h b/arch/arm/plat-omap/include/mach/io.h
index 21fb0efdda86..8d32df32b0b1 100644
--- a/arch/arm/plat-omap/include/mach/io.h
+++ b/arch/arm/plat-omap/include/mach/io.h
@@ -54,17 +54,33 @@
54 * ---------------------------------------------------------------------------- 54 * ----------------------------------------------------------------------------
55 */ 55 */
56 56
57#if defined(CONFIG_ARCH_OMAP1) 57#ifdef __ASSEMBLER__
58#define IOMEM(x) (x)
59#else
60#define IOMEM(x) ((void __force __iomem *)(x))
61#endif
62
63#define OMAP1_IO_OFFSET 0x01000000 /* Virtual IO = 0xfefb0000 */
64#define OMAP1_IO_ADDRESS(pa) IOMEM((pa) - OMAP1_IO_OFFSET)
65
66#define OMAP2_IO_OFFSET 0x90000000
67#define OMAP2_IO_ADDRESS(pa) IOMEM((pa) + OMAP2_IO_OFFSET) /* L3 and L4 */
68
69/*
70 * ----------------------------------------------------------------------------
71 * Omap1 specific IO mapping
72 * ----------------------------------------------------------------------------
73 */
58 74
59#define IO_PHYS 0xFFFB0000 75#define OMAP1_IO_PHYS 0xFFFB0000
60#define IO_OFFSET 0x01000000 /* Virtual IO = 0xfefb0000 */ 76#define OMAP1_IO_SIZE 0x40000
61#define IO_SIZE 0x40000 77#define OMAP1_IO_VIRT (OMAP1_IO_PHYS - OMAP1_IO_OFFSET)
62#define IO_VIRT (IO_PHYS - IO_OFFSET)
63#define __IO_ADDRESS(pa) ((pa) - IO_OFFSET)
64#define __OMAP1_IO_ADDRESS(pa) ((pa) - IO_OFFSET)
65#define io_v2p(va) ((va) + IO_OFFSET)
66 78
67#elif defined(CONFIG_ARCH_OMAP2) 79/*
80 * ----------------------------------------------------------------------------
81 * Omap2 specific IO mapping
82 * ----------------------------------------------------------------------------
83 */
68 84
69/* We map both L3 and L4 on OMAP2 */ 85/* We map both L3 and L4 on OMAP2 */
70#define L3_24XX_PHYS L3_24XX_BASE /* 0x68000000 */ 86#define L3_24XX_PHYS L3_24XX_BASE /* 0x68000000 */
@@ -87,11 +103,6 @@
87#define OMAP243X_SMS_VIRT 0xFC000000 103#define OMAP243X_SMS_VIRT 0xFC000000
88#define OMAP243X_SMS_SIZE SZ_1M 104#define OMAP243X_SMS_SIZE SZ_1M
89 105
90#define IO_OFFSET 0x90000000
91#define __IO_ADDRESS(pa) ((pa) + IO_OFFSET) /* Works for L3 and L4 */
92#define __OMAP2_IO_ADDRESS(pa) ((pa) + IO_OFFSET) /* Works for L3 and L4 */
93#define io_v2p(va) ((va) - IO_OFFSET) /* Works for L3 and L4 */
94
95/* DSP */ 106/* DSP */
96#define DSP_MEM_24XX_PHYS OMAP2420_DSP_MEM_BASE /* 0x58000000 */ 107#define DSP_MEM_24XX_PHYS OMAP2420_DSP_MEM_BASE /* 0x58000000 */
97#define DSP_MEM_24XX_VIRT 0xe0000000 108#define DSP_MEM_24XX_VIRT 0xe0000000
@@ -103,7 +114,11 @@
103#define DSP_MMU_24XX_VIRT 0xe2000000 114#define DSP_MMU_24XX_VIRT 0xe2000000
104#define DSP_MMU_24XX_SIZE SZ_4K 115#define DSP_MMU_24XX_SIZE SZ_4K
105 116
106#elif defined(CONFIG_ARCH_OMAP3) 117/*
118 * ----------------------------------------------------------------------------
119 * Omap3 specific IO mapping
120 * ----------------------------------------------------------------------------
121 */
107 122
108/* We map both L3 and L4 on OMAP3 */ 123/* We map both L3 and L4 on OMAP3 */
109#define L3_34XX_PHYS L3_34XX_BASE /* 0x68000000 */ 124#define L3_34XX_PHYS L3_34XX_BASE /* 0x68000000 */
@@ -143,12 +158,6 @@
143#define OMAP343X_SDRC_VIRT 0xFD000000 158#define OMAP343X_SDRC_VIRT 0xFD000000
144#define OMAP343X_SDRC_SIZE SZ_1M 159#define OMAP343X_SDRC_SIZE SZ_1M
145 160
146
147#define IO_OFFSET 0x90000000
148#define __IO_ADDRESS(pa) ((pa) + IO_OFFSET)/* Works for L3 and L4 */
149#define __OMAP2_IO_ADDRESS(pa) ((pa) + IO_OFFSET)/* Works for L3 and L4 */
150#define io_v2p(va) ((va) - IO_OFFSET)/* Works for L3 and L4 */
151
152/* DSP */ 161/* DSP */
153#define DSP_MEM_34XX_PHYS OMAP34XX_DSP_MEM_BASE /* 0x58000000 */ 162#define DSP_MEM_34XX_PHYS OMAP34XX_DSP_MEM_BASE /* 0x58000000 */
154#define DSP_MEM_34XX_VIRT 0xe0000000 163#define DSP_MEM_34XX_VIRT 0xe0000000
@@ -160,8 +169,12 @@
160#define DSP_MMU_34XX_VIRT 0xe2000000 169#define DSP_MMU_34XX_VIRT 0xe2000000
161#define DSP_MMU_34XX_SIZE SZ_4K 170#define DSP_MMU_34XX_SIZE SZ_4K
162 171
172/*
173 * ----------------------------------------------------------------------------
174 * Omap4 specific IO mapping
175 * ----------------------------------------------------------------------------
176 */
163 177
164#elif defined(CONFIG_ARCH_OMAP4)
165/* We map both L3 and L4 on OMAP4 */ 178/* We map both L3 and L4 on OMAP4 */
166#define L3_44XX_PHYS L3_44XX_BASE 179#define L3_44XX_PHYS L3_44XX_BASE
167#define L3_44XX_VIRT 0xd4000000 180#define L3_44XX_VIRT 0xd4000000
@@ -189,38 +202,24 @@
189#define OMAP44XX_GPMC_SIZE SZ_1M 202#define OMAP44XX_GPMC_SIZE SZ_1M
190 203
191 204
192#define IO_OFFSET 0x90000000 205/*
193#define __IO_ADDRESS(pa) ((pa) + IO_OFFSET)/* Works for L3 and L4 */ 206 * ----------------------------------------------------------------------------
194#define __OMAP2_IO_ADDRESS(pa) ((pa) + IO_OFFSET)/* Works for L3 and L4 */ 207 * Omap specific register access
195#define io_v2p(va) ((va) - IO_OFFSET)/* Works for L3 and L4 */ 208 * ----------------------------------------------------------------------------
196 209 */
197#endif
198
199#define IO_ADDRESS(pa) IOMEM(__IO_ADDRESS(pa))
200#define OMAP1_IO_ADDRESS(pa) IOMEM(__OMAP1_IO_ADDRESS(pa))
201#define OMAP2_IO_ADDRESS(pa) IOMEM(__OMAP2_IO_ADDRESS(pa))
202 210
203#ifdef __ASSEMBLER__ 211#ifndef __ASSEMBLER__
204#define IOMEM(x) (x)
205#else
206#define IOMEM(x) ((void __force __iomem *)(x))
207 212
208/* 213/*
209 * Functions to access the OMAP IO region 214 * NOTE: Please use ioremap + __raw_read/write where possible instead of these
210 *
211 * NOTE: - Use omap_read/write[bwl] for physical register addresses
212 * - Use __raw_read/write[bwl]() for virtual register addresses
213 * - Use IO_ADDRESS(phys_addr) to convert registers to virtual addresses
214 * - DO NOT use hardcoded virtual addresses to allow changing the
215 * IO address space again if needed
216 */ 215 */
217#define omap_readb(a) __raw_readb(IO_ADDRESS(a))
218#define omap_readw(a) __raw_readw(IO_ADDRESS(a))
219#define omap_readl(a) __raw_readl(IO_ADDRESS(a))
220 216
221#define omap_writeb(v,a) __raw_writeb(v, IO_ADDRESS(a)) 217extern u8 omap_readb(u32 pa);
222#define omap_writew(v,a) __raw_writew(v, IO_ADDRESS(a)) 218extern u16 omap_readw(u32 pa);
223#define omap_writel(v,a) __raw_writel(v, IO_ADDRESS(a)) 219extern u32 omap_readl(u32 pa);
220extern void omap_writeb(u8 v, u32 pa);
221extern void omap_writew(u16 v, u32 pa);
222extern void omap_writel(u32 v, u32 pa);
224 223
225struct omap_sdrc_params; 224struct omap_sdrc_params;
226 225
diff --git a/arch/arm/plat-omap/include/mach/iommu.h b/arch/arm/plat-omap/include/mach/iommu.h
index 769b00b4c34a..46d41ac83dbf 100644
--- a/arch/arm/plat-omap/include/mach/iommu.h
+++ b/arch/arm/plat-omap/include/mach/iommu.h
@@ -95,7 +95,7 @@ struct iommu_functions {
95 95
96 void (*save_ctx)(struct iommu *obj); 96 void (*save_ctx)(struct iommu *obj);
97 void (*restore_ctx)(struct iommu *obj); 97 void (*restore_ctx)(struct iommu *obj);
98 ssize_t (*dump_ctx)(struct iommu *obj, char *buf); 98 ssize_t (*dump_ctx)(struct iommu *obj, char *buf, ssize_t len);
99}; 99};
100 100
101struct iommu_platform_data { 101struct iommu_platform_data {
@@ -162,7 +162,7 @@ extern void uninstall_iommu_arch(const struct iommu_functions *ops);
162extern int foreach_iommu_device(void *data, 162extern int foreach_iommu_device(void *data,
163 int (*fn)(struct device *, void *)); 163 int (*fn)(struct device *, void *));
164 164
165extern ssize_t iommu_dump_ctx(struct iommu *obj, char *buf); 165extern ssize_t iommu_dump_ctx(struct iommu *obj, char *buf, ssize_t len);
166extern size_t dump_tlb_entries(struct iommu *obj, char *buf); 166extern size_t dump_tlb_entries(struct iommu *obj, char *buf, ssize_t len);
167 167
168#endif /* __MACH_IOMMU_H */ 168#endif /* __MACH_IOMMU_H */
diff --git a/arch/arm/plat-omap/include/mach/irqs.h b/arch/arm/plat-omap/include/mach/irqs.h
index fb7cb7723990..28a165058b61 100644
--- a/arch/arm/plat-omap/include/mach/irqs.h
+++ b/arch/arm/plat-omap/include/mach/irqs.h
@@ -503,6 +503,7 @@
503#define INT_44XX_FPKA_READY_IRQ (50 + IRQ_GIC_START) 503#define INT_44XX_FPKA_READY_IRQ (50 + IRQ_GIC_START)
504#define INT_44XX_SHA1MD51_IRQ (51 + IRQ_GIC_START) 504#define INT_44XX_SHA1MD51_IRQ (51 + IRQ_GIC_START)
505#define INT_44XX_RNG_IRQ (52 + IRQ_GIC_START) 505#define INT_44XX_RNG_IRQ (52 + IRQ_GIC_START)
506#define INT_44XX_MMC5_IRQ (59 + IRQ_GIC_START)
506#define INT_44XX_I2C3_IRQ (61 + IRQ_GIC_START) 507#define INT_44XX_I2C3_IRQ (61 + IRQ_GIC_START)
507#define INT_44XX_FPKA_ERROR_IRQ (64 + IRQ_GIC_START) 508#define INT_44XX_FPKA_ERROR_IRQ (64 + IRQ_GIC_START)
508#define INT_44XX_PBIAS_IRQ (75 + IRQ_GIC_START) 509#define INT_44XX_PBIAS_IRQ (75 + IRQ_GIC_START)
@@ -511,6 +512,7 @@
511#define INT_44XX_TLL_IRQ (78 + IRQ_GIC_START) 512#define INT_44XX_TLL_IRQ (78 + IRQ_GIC_START)
512#define INT_44XX_PARTHASH_IRQ (79 + IRQ_GIC_START) 513#define INT_44XX_PARTHASH_IRQ (79 + IRQ_GIC_START)
513#define INT_44XX_MMC3_IRQ (94 + IRQ_GIC_START) 514#define INT_44XX_MMC3_IRQ (94 + IRQ_GIC_START)
515#define INT_44XX_MMC4_IRQ (96 + IRQ_GIC_START)
514 516
515 517
516/* Max. 128 level 2 IRQs (OMAP1610), 192 GPIOs (OMAP730/850) and 518/* Max. 128 level 2 IRQs (OMAP1610), 192 GPIOs (OMAP730/850) and
diff --git a/arch/arm/plat-omap/include/mach/lcd_mipid.h b/arch/arm/plat-omap/include/mach/lcd_mipid.h
index f8fbc4801e52..8e52c6572281 100644
--- a/arch/arm/plat-omap/include/mach/lcd_mipid.h
+++ b/arch/arm/plat-omap/include/mach/lcd_mipid.h
@@ -16,7 +16,12 @@ enum mipid_test_result {
16struct mipid_platform_data { 16struct mipid_platform_data {
17 int nreset_gpio; 17 int nreset_gpio;
18 int data_lines; 18 int data_lines;
19
19 void (*shutdown)(struct mipid_platform_data *pdata); 20 void (*shutdown)(struct mipid_platform_data *pdata);
21 void (*set_bklight_level)(struct mipid_platform_data *pdata,
22 int level);
23 int (*get_bklight_level)(struct mipid_platform_data *pdata);
24 int (*get_bklight_max)(struct mipid_platform_data *pdata);
20}; 25};
21 26
22#endif 27#endif
diff --git a/arch/arm/plat-omap/include/mach/mmc.h b/arch/arm/plat-omap/include/mach/mmc.h
index 81d5b36534b3..7229b9593301 100644
--- a/arch/arm/plat-omap/include/mach/mmc.h
+++ b/arch/arm/plat-omap/include/mach/mmc.h
@@ -25,11 +25,18 @@
25 25
26#define OMAP24XX_NR_MMC 2 26#define OMAP24XX_NR_MMC 2
27#define OMAP34XX_NR_MMC 3 27#define OMAP34XX_NR_MMC 3
28#define OMAP44XX_NR_MMC 5
28#define OMAP2420_MMC_SIZE OMAP1_MMC_SIZE 29#define OMAP2420_MMC_SIZE OMAP1_MMC_SIZE
29#define HSMMC_SIZE 0x200 30#define OMAP3_HSMMC_SIZE 0x200
31#define OMAP4_HSMMC_SIZE 0x1000
30#define OMAP2_MMC1_BASE 0x4809c000 32#define OMAP2_MMC1_BASE 0x4809c000
31#define OMAP2_MMC2_BASE 0x480b4000 33#define OMAP2_MMC2_BASE 0x480b4000
32#define OMAP3_MMC3_BASE 0x480ad000 34#define OMAP3_MMC3_BASE 0x480ad000
35#define OMAP4_MMC4_BASE 0x480d1000
36#define OMAP4_MMC5_BASE 0x480d5000
37#define OMAP4_MMC_REG_OFFSET 0x100
38#define HSMMC5 (1 << 4)
39#define HSMMC4 (1 << 3)
33#define HSMMC3 (1 << 2) 40#define HSMMC3 (1 << 2)
34#define HSMMC2 (1 << 1) 41#define HSMMC2 (1 << 1)
35#define HSMMC1 (1 << 0) 42#define HSMMC1 (1 << 0)
@@ -59,6 +66,9 @@ struct omap_mmc_platform_data {
59 int (*suspend)(struct device *dev, int slot); 66 int (*suspend)(struct device *dev, int slot);
60 int (*resume)(struct device *dev, int slot); 67 int (*resume)(struct device *dev, int slot);
61 68
69 /* Return context loss count due to PM states changing */
70 int (*get_context_loss_count)(struct device *dev);
71
62 u64 dma_mask; 72 u64 dma_mask;
63 73
64 struct omap_mmc_slot_data { 74 struct omap_mmc_slot_data {
@@ -80,12 +90,20 @@ struct omap_mmc_platform_data {
80 /* use the internal clock */ 90 /* use the internal clock */
81 unsigned internal_clock:1; 91 unsigned internal_clock:1;
82 92
93 /* nonremovable e.g. eMMC */
94 unsigned nonremovable:1;
95
96 /* Try to sleep or power off when possible */
97 unsigned power_saving:1;
98
83 int switch_pin; /* gpio (card detect) */ 99 int switch_pin; /* gpio (card detect) */
84 int gpio_wp; /* gpio (write protect) */ 100 int gpio_wp; /* gpio (write protect) */
85 101
86 int (* set_bus_mode)(struct device *dev, int slot, int bus_mode); 102 int (* set_bus_mode)(struct device *dev, int slot, int bus_mode);
87 int (* set_power)(struct device *dev, int slot, int power_on, int vdd); 103 int (* set_power)(struct device *dev, int slot, int power_on, int vdd);
88 int (* get_ro)(struct device *dev, int slot); 104 int (* get_ro)(struct device *dev, int slot);
105 int (*set_sleep)(struct device *dev, int slot, int sleep,
106 int vdd, int cardsleep);
89 107
90 /* return MMC cover switch state, can be NULL if not supported. 108 /* return MMC cover switch state, can be NULL if not supported.
91 * 109 *
diff --git a/arch/arm/plat-omap/include/mach/mtd-xip.h b/arch/arm/plat-omap/include/mach/mtd-xip.h
index 39b591ff54bb..f82a8dcaad94 100644
--- a/arch/arm/plat-omap/include/mach/mtd-xip.h
+++ b/arch/arm/plat-omap/include/mach/mtd-xip.h
@@ -25,7 +25,7 @@ typedef struct {
25} xip_omap_mpu_timer_regs_t; 25} xip_omap_mpu_timer_regs_t;
26 26
27#define xip_omap_mpu_timer_base(n) \ 27#define xip_omap_mpu_timer_base(n) \
28((volatile xip_omap_mpu_timer_regs_t*)IO_ADDRESS(OMAP_MPU_TIMER_BASE + \ 28((volatile xip_omap_mpu_timer_regs_t*)OMAP1_IO_ADDRESS(OMAP_MPU_TIMER_BASE + \
29 (n)*OMAP_MPU_TIMER_OFFSET)) 29 (n)*OMAP_MPU_TIMER_OFFSET))
30 30
31static inline unsigned long xip_omap_mpu_timer_read(int nr) 31static inline unsigned long xip_omap_mpu_timer_read(int nr)
diff --git a/arch/arm/plat-omap/include/mach/mux.h b/arch/arm/plat-omap/include/mach/mux.h
index 80281c458baf..98dfab651dfc 100644
--- a/arch/arm/plat-omap/include/mach/mux.h
+++ b/arch/arm/plat-omap/include/mach/mux.h
@@ -857,6 +857,37 @@ enum omap34xx_index {
857 /* OMAP3 SDRC CKE signals to SDR/DDR ram chips */ 857 /* OMAP3 SDRC CKE signals to SDR/DDR ram chips */
858 H16_34XX_SDRC_CKE0, 858 H16_34XX_SDRC_CKE0,
859 H17_34XX_SDRC_CKE1, 859 H17_34XX_SDRC_CKE1,
860
861 /* MMC1 */
862 N28_3430_MMC1_CLK,
863 M27_3430_MMC1_CMD,
864 N27_3430_MMC1_DAT0,
865 N26_3430_MMC1_DAT1,
866 N25_3430_MMC1_DAT2,
867 P28_3430_MMC1_DAT3,
868 P27_3430_MMC1_DAT4,
869 P26_3430_MMC1_DAT5,
870 R27_3430_MMC1_DAT6,
871 R25_3430_MMC1_DAT7,
872
873 /* MMC2 */
874 AE2_3430_MMC2_CLK,
875 AG5_3430_MMC2_CMD,
876 AH5_3430_MMC2_DAT0,
877 AH4_3430_MMC2_DAT1,
878 AG4_3430_MMC2_DAT2,
879 AF4_3430_MMC2_DAT3,
880
881 /* MMC3 */
882 AF10_3430_MMC3_CLK,
883 AC3_3430_MMC3_CMD,
884 AE11_3430_MMC3_DAT0,
885 AH9_3430_MMC3_DAT1,
886 AF13_3430_MMC3_DAT2,
887 AF13_3430_MMC3_DAT3,
888
889 /* SYS_NIRQ T2 INT1 */
890 AF26_34XX_SYS_NIRQ,
860}; 891};
861 892
862struct omap_mux_cfg { 893struct omap_mux_cfg {
diff --git a/arch/arm/plat-omap/include/mach/omap-pm.h b/arch/arm/plat-omap/include/mach/omap-pm.h
new file mode 100644
index 000000000000..3ee41d711492
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/omap-pm.h
@@ -0,0 +1,301 @@
1/*
2 * omap-pm.h - OMAP power management interface
3 *
4 * Copyright (C) 2008-2009 Texas Instruments, Inc.
5 * Copyright (C) 2008-2009 Nokia Corporation
6 * Paul Walmsley
7 *
8 * Interface developed by (in alphabetical order): Karthik Dasu, Jouni
9 * Högander, Tony Lindgren, Rajendra Nayak, Sakari Poussa,
10 * Veeramanikandan Raju, Anand Sawant, Igor Stoppa, Paul Walmsley,
11 * Richard Woodruff
12 */
13
14#ifndef ASM_ARM_ARCH_OMAP_OMAP_PM_H
15#define ASM_ARM_ARCH_OMAP_OMAP_PM_H
16
17#include <linux/device.h>
18#include <linux/cpufreq.h>
19
20#include "powerdomain.h"
21
22/**
23 * struct omap_opp - clock frequency-to-OPP ID table for DSP, MPU
24 * @rate: target clock rate
25 * @opp_id: OPP ID
26 * @min_vdd: minimum VDD1 voltage (in millivolts) for this OPP
27 *
28 * Operating performance point data. Can vary by OMAP chip and board.
29 */
30struct omap_opp {
31 unsigned long rate;
32 u8 opp_id;
33 u16 min_vdd;
34};
35
36extern struct omap_opp *mpu_opps;
37extern struct omap_opp *dsp_opps;
38extern struct omap_opp *l3_opps;
39
40/*
41 * agent_id values for use with omap_pm_set_min_bus_tput():
42 *
43 * OCP_INITIATOR_AGENT is only valid for devices that can act as
44 * initiators -- it represents the device's L3 interconnect
45 * connection. OCP_TARGET_AGENT represents the device's L4
46 * interconnect connection.
47 */
48#define OCP_TARGET_AGENT 1
49#define OCP_INITIATOR_AGENT 2
50
51/**
52 * omap_pm_if_early_init - OMAP PM init code called before clock fw init
53 * @mpu_opp_table: array ptr to struct omap_opp for MPU
54 * @dsp_opp_table: array ptr to struct omap_opp for DSP
55 * @l3_opp_table : array ptr to struct omap_opp for CORE
56 *
57 * Initialize anything that must be configured before the clock
58 * framework starts. The "_if_" is to avoid name collisions with the
59 * PM idle-loop code.
60 */
61int __init omap_pm_if_early_init(struct omap_opp *mpu_opp_table,
62 struct omap_opp *dsp_opp_table,
63 struct omap_opp *l3_opp_table);
64
65/**
66 * omap_pm_if_init - OMAP PM init code called after clock fw init
67 *
68 * The main initialization code. OPP tables are passed in here. The
69 * "_if_" is to avoid name collisions with the PM idle-loop code.
70 */
71int __init omap_pm_if_init(void);
72
73/**
74 * omap_pm_if_exit - OMAP PM exit code
75 *
76 * Exit code; currently unused. The "_if_" is to avoid name
77 * collisions with the PM idle-loop code.
78 */
79void omap_pm_if_exit(void);
80
81/*
82 * Device-driver-originated constraints (via board-*.c files, platform_data)
83 */
84
85
86/**
87 * omap_pm_set_max_mpu_wakeup_lat - set the maximum MPU wakeup latency
88 * @dev: struct device * requesting the constraint
89 * @t: maximum MPU wakeup latency in microseconds
90 *
91 * Request that the maximum interrupt latency for the MPU to be no
92 * greater than 't' microseconds. "Interrupt latency" in this case is
93 * defined as the elapsed time from the occurrence of a hardware or
94 * timer interrupt to the time when the device driver's interrupt
95 * service routine has been entered by the MPU.
96 *
97 * It is intended that underlying PM code will use this information to
98 * determine what power state to put the MPU powerdomain into, and
99 * possibly the CORE powerdomain as well, since interrupt handling
100 * code currently runs from SDRAM. Advanced PM or board*.c code may
101 * also configure interrupt controller priorities, OCP bus priorities,
102 * CPU speed(s), etc.
103 *
104 * This function will not affect device wakeup latency, e.g., time
105 * elapsed from when a device driver enables a hardware device with
106 * clk_enable(), to when the device is ready for register access or
107 * other use. To control this device wakeup latency, use
108 * set_max_dev_wakeup_lat()
109 *
110 * Multiple calls to set_max_mpu_wakeup_lat() will replace the
111 * previous t value. To remove the latency target for the MPU, call
112 * with t = -1.
113 *
114 * No return value.
115 */
116void omap_pm_set_max_mpu_wakeup_lat(struct device *dev, long t);
117
118
119/**
120 * omap_pm_set_min_bus_tput - set minimum bus throughput needed by device
121 * @dev: struct device * requesting the constraint
122 * @tbus_id: interconnect to operate on (OCP_{INITIATOR,TARGET}_AGENT)
123 * @r: minimum throughput (in KiB/s)
124 *
125 * Request that the minimum data throughput on the OCP interconnect
126 * attached to device 'dev' interconnect agent 'tbus_id' be no less
127 * than 'r' KiB/s.
128 *
129 * It is expected that the OMAP PM or bus code will use this
130 * information to set the interconnect clock to run at the lowest
131 * possible speed that satisfies all current system users. The PM or
132 * bus code will adjust the estimate based on its model of the bus, so
133 * device driver authors should attempt to specify an accurate
134 * quantity for their device use case, and let the PM or bus code
135 * overestimate the numbers as necessary to handle request/response
136 * latency, other competing users on the system, etc. On OMAP2/3, if
137 * a driver requests a minimum L4 interconnect speed constraint, the
138 * code will also need to add an minimum L3 interconnect speed
139 * constraint,
140 *
141 * Multiple calls to set_min_bus_tput() will replace the previous rate
142 * value for this device. To remove the interconnect throughput
143 * restriction for this device, call with r = 0.
144 *
145 * No return value.
146 */
147void omap_pm_set_min_bus_tput(struct device *dev, u8 agent_id, unsigned long r);
148
149
150/**
151 * omap_pm_set_max_dev_wakeup_lat - set the maximum device enable latency
152 * @dev: struct device *
153 * @t: maximum device wakeup latency in microseconds
154 *
155 * Request that the maximum amount of time necessary for a device to
156 * become accessible after its clocks are enabled should be no greater
157 * than 't' microseconds. Specifically, this represents the time from
158 * when a device driver enables device clocks with clk_enable(), to
159 * when the register reads and writes on the device will succeed.
160 * This function should be called before clk_disable() is called,
161 * since the power state transition decision may be made during
162 * clk_disable().
163 *
164 * It is intended that underlying PM code will use this information to
165 * determine what power state to put the powerdomain enclosing this
166 * device into.
167 *
168 * Multiple calls to set_max_dev_wakeup_lat() will replace the
169 * previous wakeup latency values for this device. To remove the wakeup
170 * latency restriction for this device, call with t = -1.
171 *
172 * No return value.
173 */
174void omap_pm_set_max_dev_wakeup_lat(struct device *dev, long t);
175
176
177/**
178 * omap_pm_set_max_sdma_lat - set the maximum system DMA transfer start latency
179 * @dev: struct device *
180 * @t: maximum DMA transfer start latency in microseconds
181 *
182 * Request that the maximum system DMA transfer start latency for this
183 * device 'dev' should be no greater than 't' microseconds. "DMA
184 * transfer start latency" here is defined as the elapsed time from
185 * when a device (e.g., McBSP) requests that a system DMA transfer
186 * start or continue, to the time at which data starts to flow into
187 * that device from the system DMA controller.
188 *
189 * It is intended that underlying PM code will use this information to
190 * determine what power state to put the CORE powerdomain into.
191 *
192 * Since system DMA transfers may not involve the MPU, this function
193 * will not affect MPU wakeup latency. Use set_max_cpu_lat() to do
194 * so. Similarly, this function will not affect device wakeup latency
195 * -- use set_max_dev_wakeup_lat() to affect that.
196 *
197 * Multiple calls to set_max_sdma_lat() will replace the previous t
198 * value for this device. To remove the maximum DMA latency for this
199 * device, call with t = -1.
200 *
201 * No return value.
202 */
203void omap_pm_set_max_sdma_lat(struct device *dev, long t);
204
205
206/*
207 * DSP Bridge-specific constraints
208 */
209
210/**
211 * omap_pm_dsp_get_opp_table - get OPP->DSP clock frequency table
212 *
213 * Intended for use by DSPBridge. Returns an array of OPP->DSP clock
214 * frequency entries. The final item in the array should have .rate =
215 * .opp_id = 0.
216 */
217const struct omap_opp *omap_pm_dsp_get_opp_table(void);
218
219/**
220 * omap_pm_dsp_set_min_opp - receive desired OPP target ID from DSP Bridge
221 * @opp_id: target DSP OPP ID
222 *
223 * Set a minimum OPP ID for the DSP. This is intended to be called
224 * only from the DSP Bridge MPU-side driver. Unfortunately, the only
225 * information that code receives from the DSP/BIOS load estimator is the
226 * target OPP ID; hence, this interface. No return value.
227 */
228void omap_pm_dsp_set_min_opp(u8 opp_id);
229
230/**
231 * omap_pm_dsp_get_opp - report the current DSP OPP ID
232 *
233 * Report the current OPP for the DSP. Since on OMAP3, the DSP and
234 * MPU share a single voltage domain, the OPP ID returned back may
235 * represent a higher DSP speed than the OPP requested via
236 * omap_pm_dsp_set_min_opp().
237 *
238 * Returns the current VDD1 OPP ID, or 0 upon error.
239 */
240u8 omap_pm_dsp_get_opp(void);
241
242
243/*
244 * CPUFreq-originated constraint
245 *
246 * In the future, this should be handled by custom OPP clocktype
247 * functions.
248 */
249
250/**
251 * omap_pm_cpu_get_freq_table - return a cpufreq_frequency_table array ptr
252 *
253 * Provide a frequency table usable by CPUFreq for the current chip/board.
254 * Returns a pointer to a struct cpufreq_frequency_table array or NULL
255 * upon error.
256 */
257struct cpufreq_frequency_table **omap_pm_cpu_get_freq_table(void);
258
259/**
260 * omap_pm_cpu_set_freq - set the current minimum MPU frequency
261 * @f: MPU frequency in Hz
262 *
263 * Set the current minimum CPU frequency. The actual CPU frequency
264 * used could end up higher if the DSP requested a higher OPP.
265 * Intended to be called by plat-omap/cpu_omap.c:omap_target(). No
266 * return value.
267 */
268void omap_pm_cpu_set_freq(unsigned long f);
269
270/**
271 * omap_pm_cpu_get_freq - report the current CPU frequency
272 *
273 * Returns the current MPU frequency, or 0 upon error.
274 */
275unsigned long omap_pm_cpu_get_freq(void);
276
277
278/*
279 * Device context loss tracking
280 */
281
282/**
283 * omap_pm_get_dev_context_loss_count - return count of times dev has lost ctx
284 * @dev: struct device *
285 *
286 * This function returns the number of times that the device @dev has
287 * lost its internal context. This generally occurs on a powerdomain
288 * transition to OFF. Drivers use this as an optimization to avoid restoring
289 * context if the device hasn't lost it. To use, drivers should initially
290 * call this in their context save functions and store the result. Early in
291 * the driver's context restore function, the driver should call this function
292 * again, and compare the result to the stored counter. If they differ, the
293 * driver must restore device context. If the number of context losses
294 * exceeds the maximum positive integer, the function will wrap to 0 and
295 * continue counting. Returns the number of context losses for this device,
296 * or -EINVAL upon error.
297 */
298int omap_pm_get_dev_context_loss_count(struct device *dev);
299
300
301#endif
diff --git a/arch/arm/plat-omap/include/mach/omap44xx.h b/arch/arm/plat-omap/include/mach/omap44xx.h
index 15dec7f1c7c0..b3ba5ac7b4a4 100644
--- a/arch/arm/plat-omap/include/mach/omap44xx.h
+++ b/arch/arm/plat-omap/include/mach/omap44xx.h
@@ -33,14 +33,14 @@
33#define IRQ_SIR_IRQ 0x0040 33#define IRQ_SIR_IRQ 0x0040
34#define OMAP44XX_GIC_DIST_BASE 0x48241000 34#define OMAP44XX_GIC_DIST_BASE 0x48241000
35#define OMAP44XX_GIC_CPU_BASE 0x48240100 35#define OMAP44XX_GIC_CPU_BASE 0x48240100
36#define OMAP44XX_VA_GIC_CPU_BASE IO_ADDRESS(OMAP44XX_GIC_CPU_BASE) 36#define OMAP44XX_VA_GIC_CPU_BASE OMAP2_IO_ADDRESS(OMAP44XX_GIC_CPU_BASE)
37#define OMAP44XX_SCU_BASE 0x48240000 37#define OMAP44XX_SCU_BASE 0x48240000
38#define OMAP44XX_VA_SCU_BASE IO_ADDRESS(OMAP44XX_SCU_BASE) 38#define OMAP44XX_VA_SCU_BASE OMAP2_IO_ADDRESS(OMAP44XX_SCU_BASE)
39#define OMAP44XX_LOCAL_TWD_BASE 0x48240600 39#define OMAP44XX_LOCAL_TWD_BASE 0x48240600
40#define OMAP44XX_VA_LOCAL_TWD_BASE IO_ADDRESS(OMAP44XX_LOCAL_TWD_BASE) 40#define OMAP44XX_VA_LOCAL_TWD_BASE OMAP2_IO_ADDRESS(OMAP44XX_LOCAL_TWD_BASE)
41#define OMAP44XX_LOCAL_TWD_SIZE 0x00000100 41#define OMAP44XX_LOCAL_TWD_SIZE 0x00000100
42#define OMAP44XX_WKUPGEN_BASE 0x48281000 42#define OMAP44XX_WKUPGEN_BASE 0x48281000
43#define OMAP44XX_VA_WKUPGEN_BASE IO_ADDRESS(OMAP44XX_WKUPGEN_BASE) 43#define OMAP44XX_VA_WKUPGEN_BASE OMAP2_IO_ADDRESS(OMAP44XX_WKUPGEN_BASE)
44 44
45#endif /* __ASM_ARCH_OMAP44XX_H */ 45#endif /* __ASM_ARCH_OMAP44XX_H */
46 46
diff --git a/arch/arm/plat-omap/include/mach/omap_device.h b/arch/arm/plat-omap/include/mach/omap_device.h
new file mode 100644
index 000000000000..bd0e136db337
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/omap_device.h
@@ -0,0 +1,141 @@
1/*
2 * omap_device headers
3 *
4 * Copyright (C) 2009 Nokia Corporation
5 * Paul Walmsley
6 *
7 * Developed in collaboration with (alphabetical order): Benoit
8 * Cousson, Kevin Hilman, Tony Lindgren, Rajendra Nayak, Vikram
9 * Pandita, Sakari Poussa, Anand Sawant, Santosh Shilimkar, Richard
10 * Woodruff
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 * Eventually this type of functionality should either be
17 * a) implemented via arch-specific pointers in platform_device
18 * or
19 * b) implemented as a proper omap_bus/omap_device in Linux, no more
20 * platform_device
21 *
22 * omap_device differs from omap_hwmod in that it includes external
23 * (e.g., board- and system-level) integration details. omap_hwmod
24 * stores hardware data that is invariant for a given OMAP chip.
25 *
26 * To do:
27 * - GPIO integration
28 * - regulator integration
29 *
30 */
31#ifndef __ARCH_ARM_PLAT_OMAP_INCLUDE_MACH_OMAP_DEVICE_H
32#define __ARCH_ARM_PLAT_OMAP_INCLUDE_MACH_OMAP_DEVICE_H
33
34#include <linux/kernel.h>
35#include <linux/platform_device.h>
36
37#include <mach/omap_hwmod.h>
38
39/* omap_device._state values */
40#define OMAP_DEVICE_STATE_UNKNOWN 0
41#define OMAP_DEVICE_STATE_ENABLED 1
42#define OMAP_DEVICE_STATE_IDLE 2
43#define OMAP_DEVICE_STATE_SHUTDOWN 3
44
45/**
46 * struct omap_device - omap_device wrapper for platform_devices
47 * @pdev: platform_device
48 * @hwmods: (one .. many per omap_device)
49 * @hwmods_cnt: ARRAY_SIZE() of @hwmods
50 * @pm_lats: ptr to an omap_device_pm_latency table
51 * @pm_lats_cnt: ARRAY_SIZE() of what is passed to @pm_lats
52 * @pm_lat_level: array index of the last odpl entry executed - -1 if never
53 * @dev_wakeup_lat: dev wakeup latency in microseconds
54 * @_dev_wakeup_lat_limit: dev wakeup latency limit in usec - set by OMAP PM
55 * @_state: one of OMAP_DEVICE_STATE_* (see above)
56 * @flags: device flags
57 *
58 * Integrates omap_hwmod data into Linux platform_device.
59 *
60 * Field names beginning with underscores are for the internal use of
61 * the omap_device code.
62 *
63 */
64struct omap_device {
65 struct platform_device pdev;
66 struct omap_hwmod **hwmods;
67 struct omap_device_pm_latency *pm_lats;
68 u32 dev_wakeup_lat;
69 u32 _dev_wakeup_lat_limit;
70 u8 pm_lats_cnt;
71 s8 pm_lat_level;
72 u8 hwmods_cnt;
73 u8 _state;
74};
75
76/* Device driver interface (call via platform_data fn ptrs) */
77
78int omap_device_enable(struct platform_device *pdev);
79int omap_device_idle(struct platform_device *pdev);
80int omap_device_shutdown(struct platform_device *pdev);
81
82/* Core code interface */
83
84int omap_device_count_resources(struct omap_device *od);
85int omap_device_fill_resources(struct omap_device *od, struct resource *res);
86
87struct omap_device *omap_device_build(const char *pdev_name, int pdev_id,
88 struct omap_hwmod *oh, void *pdata,
89 int pdata_len,
90 struct omap_device_pm_latency *pm_lats,
91 int pm_lats_cnt);
92
93struct omap_device *omap_device_build_ss(const char *pdev_name, int pdev_id,
94 struct omap_hwmod **oh, int oh_cnt,
95 void *pdata, int pdata_len,
96 struct omap_device_pm_latency *pm_lats,
97 int pm_lats_cnt);
98
99int omap_device_register(struct omap_device *od);
100
101/* OMAP PM interface */
102int omap_device_align_pm_lat(struct platform_device *pdev,
103 u32 new_wakeup_lat_limit);
104struct powerdomain *omap_device_get_pwrdm(struct omap_device *od);
105
106/* Other */
107
108int omap_device_idle_hwmods(struct omap_device *od);
109int omap_device_enable_hwmods(struct omap_device *od);
110
111int omap_device_disable_clocks(struct omap_device *od);
112int omap_device_enable_clocks(struct omap_device *od);
113
114
115/*
116 * Entries should be kept in latency order ascending
117 *
118 * deact_lat is the maximum number of microseconds required to complete
119 * deactivate_func() at the device's slowest OPP.
120 *
121 * act_lat is the maximum number of microseconds required to complete
122 * activate_func() at the device's slowest OPP.
123 *
124 * This will result in some suboptimal power management decisions at fast
125 * OPPs, but avoids having to recompute all device power management decisions
126 * if the system shifts from a fast OPP to a slow OPP (in order to meet
127 * latency requirements).
128 *
129 * XXX should deactivate_func/activate_func() take platform_device pointers
130 * rather than omap_device pointers?
131 */
132struct omap_device_pm_latency {
133 u32 deactivate_lat;
134 int (*deactivate_func)(struct omap_device *od);
135 u32 activate_lat;
136 int (*activate_func)(struct omap_device *od);
137};
138
139
140#endif
141
diff --git a/arch/arm/plat-omap/include/mach/omap_hwmod.h b/arch/arm/plat-omap/include/mach/omap_hwmod.h
new file mode 100644
index 000000000000..1f79c20e2929
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/omap_hwmod.h
@@ -0,0 +1,447 @@
1/*
2 * omap_hwmod macros, structures
3 *
4 * Copyright (C) 2009 Nokia Corporation
5 * Paul Walmsley
6 *
7 * Created in collaboration with (alphabetical order): Benoit Cousson,
8 * Kevin Hilman, Tony Lindgren, Rajendra Nayak, Vikram Pandita, Sakari
9 * Poussa, Anand Sawant, Santosh Shilimkar, Richard Woodruff
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
14 *
15 * These headers and macros are used to define OMAP on-chip module
16 * data and their integration with other OMAP modules and Linux.
17 *
18 * References:
19 * - OMAP2420 Multimedia Processor Silicon Revision 2.1.1, 2.2 (SWPU064)
20 * - OMAP2430 Multimedia Device POP Silicon Revision 2.1 (SWPU090)
21 * - OMAP34xx Multimedia Device Silicon Revision 3.1 (SWPU108)
22 * - OMAP4430 Multimedia Device Silicon Revision 1.0 (SWPU140)
23 * - Open Core Protocol Specification 2.2
24 *
25 * To do:
26 * - add interconnect error log structures
27 * - add pinmuxing
28 * - init_conn_id_bit (CONNID_BIT_VECTOR)
29 * - implement default hwmod SMS/SDRC flags?
30 *
31 */
32#ifndef __ARCH_ARM_PLAT_OMAP_INCLUDE_MACH_OMAP_HWMOD_H
33#define __ARCH_ARM_PLAT_OMAP_INCLUDE_MACH_OMAP_HWMOD_H
34
35#include <linux/kernel.h>
36#include <linux/ioport.h>
37
38#include <mach/cpu.h>
39
40struct omap_device;
41
42/* OCP SYSCONFIG bit shifts/masks */
43#define SYSC_MIDLEMODE_SHIFT 12
44#define SYSC_MIDLEMODE_MASK (0x3 << SYSC_MIDLEMODE_SHIFT)
45#define SYSC_CLOCKACTIVITY_SHIFT 8
46#define SYSC_CLOCKACTIVITY_MASK (0x3 << SYSC_CLOCKACTIVITY_SHIFT)
47#define SYSC_SIDLEMODE_SHIFT 3
48#define SYSC_SIDLEMODE_MASK (0x3 << SYSC_SIDLEMODE_SHIFT)
49#define SYSC_ENAWAKEUP_SHIFT 2
50#define SYSC_ENAWAKEUP_MASK (1 << SYSC_ENAWAKEUP_SHIFT)
51#define SYSC_SOFTRESET_SHIFT 1
52#define SYSC_SOFTRESET_MASK (1 << SYSC_SOFTRESET_SHIFT)
53
54/* OCP SYSSTATUS bit shifts/masks */
55#define SYSS_RESETDONE_SHIFT 0
56#define SYSS_RESETDONE_MASK (1 << SYSS_RESETDONE_SHIFT)
57
58/* Master standby/slave idle mode flags */
59#define HWMOD_IDLEMODE_FORCE (1 << 0)
60#define HWMOD_IDLEMODE_NO (1 << 1)
61#define HWMOD_IDLEMODE_SMART (1 << 2)
62
63
64/**
65 * struct omap_hwmod_dma_info - MPU address space handled by the hwmod
66 * @name: name of the DMA channel (module local name)
67 * @dma_ch: DMA channel ID
68 *
69 * @name should be something short, e.g., "tx" or "rx". It is for use
70 * by platform_get_resource_byname(). It is defined locally to the
71 * hwmod.
72 */
73struct omap_hwmod_dma_info {
74 const char *name;
75 u16 dma_ch;
76};
77
78/**
79 * struct omap_hwmod_opt_clk - optional clocks used by this hwmod
80 * @role: "sys", "32k", "tv", etc -- for use in clk_get()
81 * @clkdev_dev_id: opt clock: clkdev dev_id string
82 * @clkdev_con_id: opt clock: clkdev con_id string
83 * @_clk: pointer to the struct clk (filled in at runtime)
84 *
85 * The module's interface clock and main functional clock should not
86 * be added as optional clocks.
87 */
88struct omap_hwmod_opt_clk {
89 const char *role;
90 const char *clkdev_dev_id;
91 const char *clkdev_con_id;
92 struct clk *_clk;
93};
94
95
96/* omap_hwmod_omap2_firewall.flags bits */
97#define OMAP_FIREWALL_L3 (1 << 0)
98#define OMAP_FIREWALL_L4 (1 << 1)
99
100/**
101 * struct omap_hwmod_omap2_firewall - OMAP2/3 device firewall data
102 * @l3_perm_bit: bit shift for L3_PM_*_PERMISSION_*
103 * @l4_fw_region: L4 firewall region ID
104 * @l4_prot_group: L4 protection group ID
105 * @flags: (see omap_hwmod_omap2_firewall.flags macros above)
106 */
107struct omap_hwmod_omap2_firewall {
108 u8 l3_perm_bit;
109 u8 l4_fw_region;
110 u8 l4_prot_group;
111 u8 flags;
112};
113
114
115/*
116 * omap_hwmod_addr_space.flags bits
117 *
118 * ADDR_MAP_ON_INIT: Map this address space during omap_hwmod init.
119 * ADDR_TYPE_RT: Address space contains module register target data.
120 */
121#define ADDR_MAP_ON_INIT (1 << 0)
122#define ADDR_TYPE_RT (1 << 1)
123
124/**
125 * struct omap_hwmod_addr_space - MPU address space handled by the hwmod
126 * @pa_start: starting physical address
127 * @pa_end: ending physical address
128 * @flags: (see omap_hwmod_addr_space.flags macros above)
129 *
130 * Address space doesn't necessarily follow physical interconnect
131 * structure. GPMC is one example.
132 */
133struct omap_hwmod_addr_space {
134 u32 pa_start;
135 u32 pa_end;
136 u8 flags;
137};
138
139
140/*
141 * omap_hwmod_ocp_if.user bits: these indicate the initiators that use this
142 * interface to interact with the hwmod. Used to add sleep dependencies
143 * when the module is enabled or disabled.
144 */
145#define OCP_USER_MPU (1 << 0)
146#define OCP_USER_SDMA (1 << 1)
147
148/* omap_hwmod_ocp_if.flags bits */
149#define OCPIF_HAS_IDLEST (1 << 0)
150#define OCPIF_SWSUP_IDLE (1 << 1)
151#define OCPIF_CAN_BURST (1 << 2)
152
153/**
154 * struct omap_hwmod_ocp_if - OCP interface data
155 * @master: struct omap_hwmod that initiates OCP transactions on this link
156 * @slave: struct omap_hwmod that responds to OCP transactions on this link
157 * @addr: address space associated with this link
158 * @clkdev_dev_id: interface clock: clkdev dev_id string
159 * @clkdev_con_id: interface clock: clkdev con_id string
160 * @_clk: pointer to the interface struct clk (filled in at runtime)
161 * @fw: interface firewall data
162 * @addr_cnt: ARRAY_SIZE(@addr)
163 * @width: OCP data width
164 * @thread_cnt: number of threads
165 * @max_burst_len: maximum burst length in @width sized words (0 if unlimited)
166 * @user: initiators using this interface (see OCP_USER_* macros above)
167 * @flags: OCP interface flags (see OCPIF_* macros above)
168 *
169 * It may also be useful to add a tag_cnt field for OCP2.x devices.
170 *
171 * Parameter names beginning with an underscore are managed internally by
172 * the omap_hwmod code and should not be set during initialization.
173 */
174struct omap_hwmod_ocp_if {
175 struct omap_hwmod *master;
176 struct omap_hwmod *slave;
177 struct omap_hwmod_addr_space *addr;
178 const char *clkdev_dev_id;
179 const char *clkdev_con_id;
180 struct clk *_clk;
181 union {
182 struct omap_hwmod_omap2_firewall omap2;
183 } fw;
184 u8 addr_cnt;
185 u8 width;
186 u8 thread_cnt;
187 u8 max_burst_len;
188 u8 user;
189 u8 flags;
190};
191
192
193/* Macros for use in struct omap_hwmod_sysconfig */
194
195/* Flags for use in omap_hwmod_sysconfig.idlemodes */
196#define MASTER_STANDBY_SHIFT 2
197#define SLAVE_IDLE_SHIFT 0
198#define SIDLE_FORCE (HWMOD_IDLEMODE_FORCE << SLAVE_IDLE_SHIFT)
199#define SIDLE_NO (HWMOD_IDLEMODE_NO << SLAVE_IDLE_SHIFT)
200#define SIDLE_SMART (HWMOD_IDLEMODE_SMART << SLAVE_IDLE_SHIFT)
201#define MSTANDBY_FORCE (HWMOD_IDLEMODE_FORCE << MASTER_STANDBY_SHIFT)
202#define MSTANDBY_NO (HWMOD_IDLEMODE_NO << MASTER_STANDBY_SHIFT)
203#define MSTANDBY_SMART (HWMOD_IDLEMODE_SMART << MASTER_STANDBY_SHIFT)
204
205/* omap_hwmod_sysconfig.sysc_flags capability flags */
206#define SYSC_HAS_AUTOIDLE (1 << 0)
207#define SYSC_HAS_SOFTRESET (1 << 1)
208#define SYSC_HAS_ENAWAKEUP (1 << 2)
209#define SYSC_HAS_EMUFREE (1 << 3)
210#define SYSC_HAS_CLOCKACTIVITY (1 << 4)
211#define SYSC_HAS_SIDLEMODE (1 << 5)
212#define SYSC_HAS_MIDLEMODE (1 << 6)
213#define SYSS_MISSING (1 << 7)
214
215/* omap_hwmod_sysconfig.clockact flags */
216#define CLOCKACT_TEST_BOTH 0x0
217#define CLOCKACT_TEST_MAIN 0x1
218#define CLOCKACT_TEST_ICLK 0x2
219#define CLOCKACT_TEST_NONE 0x3
220
221/**
222 * struct omap_hwmod_sysconfig - hwmod OCP_SYSCONFIG/OCP_SYSSTATUS data
223 * @rev_offs: IP block revision register offset (from module base addr)
224 * @sysc_offs: OCP_SYSCONFIG register offset (from module base addr)
225 * @syss_offs: OCP_SYSSTATUS register offset (from module base addr)
226 * @idlemodes: One or more of {SIDLE,MSTANDBY}_{OFF,FORCE,SMART}
227 * @sysc_flags: SYS{C,S}_HAS* flags indicating SYSCONFIG bits supported
228 * @clockact: the default value of the module CLOCKACTIVITY bits
229 *
230 * @clockact describes to the module which clocks are likely to be
231 * disabled when the PRCM issues its idle request to the module. Some
232 * modules have separate clockdomains for the interface clock and main
233 * functional clock, and can check whether they should acknowledge the
234 * idle request based on the internal module functionality that has
235 * been associated with the clocks marked in @clockact. This field is
236 * only used if HWMOD_SET_DEFAULT_CLOCKACT is set (see below)
237 *
238 */
239struct omap_hwmod_sysconfig {
240 u16 rev_offs;
241 u16 sysc_offs;
242 u16 syss_offs;
243 u8 idlemodes;
244 u8 sysc_flags;
245 u8 clockact;
246};
247
248/**
249 * struct omap_hwmod_omap2_prcm - OMAP2/3-specific PRCM data
250 * @module_offs: PRCM submodule offset from the start of the PRM/CM
251 * @prcm_reg_id: PRCM register ID (e.g., 3 for CM_AUTOIDLE3)
252 * @module_bit: register bit shift for AUTOIDLE, WKST, WKEN, GRPSEL regs
253 * @idlest_reg_id: IDLEST register ID (e.g., 3 for CM_IDLEST3)
254 * @idlest_idle_bit: register bit shift for CM_IDLEST slave idle bit
255 * @idlest_stdby_bit: register bit shift for CM_IDLEST master standby bit
256 *
257 * @prcm_reg_id and @module_bit are specific to the AUTOIDLE, WKST,
258 * WKEN, GRPSEL registers. In an ideal world, no extra information
259 * would be needed for IDLEST information, but alas, there are some
260 * exceptions, so @idlest_reg_id, @idlest_idle_bit, @idlest_stdby_bit
261 * are needed for the IDLEST registers (c.f. 2430 I2CHS, 3430 USBHOST)
262 */
263struct omap_hwmod_omap2_prcm {
264 s16 module_offs;
265 u8 prcm_reg_id;
266 u8 module_bit;
267 u8 idlest_reg_id;
268 u8 idlest_idle_bit;
269 u8 idlest_stdby_bit;
270};
271
272
273/**
274 * struct omap_hwmod_omap4_prcm - OMAP4-specific PRCM data
275 * @module_offs: PRCM submodule offset from the start of the PRM/CM1/CM2
276 * @device_offs: device register offset from @module_offs
277 * @submodule_wkdep_bit: bit shift of the WKDEP range
278 */
279struct omap_hwmod_omap4_prcm {
280 u32 module_offs;
281 u16 device_offs;
282 u8 submodule_wkdep_bit;
283};
284
285
286/*
287 * omap_hwmod.flags definitions
288 *
289 * HWMOD_SWSUP_SIDLE: omap_hwmod code should manually bring module in and out
290 * of idle, rather than relying on module smart-idle
291 * HWMOD_SWSUP_MSTDBY: omap_hwmod code should manually bring module in and out
292 * of standby, rather than relying on module smart-standby
293 * HWMOD_INIT_NO_RESET: don't reset this module at boot - important for
294 * SDRAM controller, etc.
295 * HWMOD_INIT_NO_IDLE: don't idle this module at boot - important for SDRAM
296 * controller, etc.
297 * HWMOD_SET_DEFAULT_CLOCKACT: program CLOCKACTIVITY bits at startup
298 */
299#define HWMOD_SWSUP_SIDLE (1 << 0)
300#define HWMOD_SWSUP_MSTANDBY (1 << 1)
301#define HWMOD_INIT_NO_RESET (1 << 2)
302#define HWMOD_INIT_NO_IDLE (1 << 3)
303#define HWMOD_SET_DEFAULT_CLOCKACT (1 << 4)
304
305/*
306 * omap_hwmod._int_flags definitions
307 * These are for internal use only and are managed by the omap_hwmod code.
308 *
309 * _HWMOD_NO_MPU_PORT: no path exists for the MPU to write to this module
310 * _HWMOD_WAKEUP_ENABLED: set when the omap_hwmod code has enabled ENAWAKEUP
311 * _HWMOD_SYSCONFIG_LOADED: set when the OCP_SYSCONFIG value has been cached
312 */
313#define _HWMOD_NO_MPU_PORT (1 << 0)
314#define _HWMOD_WAKEUP_ENABLED (1 << 1)
315#define _HWMOD_SYSCONFIG_LOADED (1 << 2)
316
317/*
318 * omap_hwmod._state definitions
319 *
320 * INITIALIZED: reset (optionally), initialized, enabled, disabled
321 * (optionally)
322 *
323 *
324 */
325#define _HWMOD_STATE_UNKNOWN 0
326#define _HWMOD_STATE_REGISTERED 1
327#define _HWMOD_STATE_CLKS_INITED 2
328#define _HWMOD_STATE_INITIALIZED 3
329#define _HWMOD_STATE_ENABLED 4
330#define _HWMOD_STATE_IDLE 5
331#define _HWMOD_STATE_DISABLED 6
332
333/**
334 * struct omap_hwmod - integration data for OMAP hardware "modules" (IP blocks)
335 * @name: name of the hwmod
336 * @od: struct omap_device currently associated with this hwmod (internal use)
337 * @mpu_irqs: ptr to an array of MPU IRQs (see also mpu_irqs_cnt)
338 * @sdma_chs: ptr to an array of SDMA channel IDs (see also sdma_chs_cnt)
339 * @prcm: PRCM data pertaining to this hwmod
340 * @clkdev_dev_id: main clock: clkdev dev_id string
341 * @clkdev_con_id: main clock: clkdev con_id string
342 * @_clk: pointer to the main struct clk (filled in at runtime)
343 * @opt_clks: other device clocks that drivers can request (0..*)
344 * @masters: ptr to array of OCP ifs that this hwmod can initiate on
345 * @slaves: ptr to array of OCP ifs that this hwmod can respond on
346 * @sysconfig: device SYSCONFIG/SYSSTATUS register data
347 * @dev_attr: arbitrary device attributes that can be passed to the driver
348 * @_sysc_cache: internal-use hwmod flags
349 * @_rt_va: cached register target start address (internal use)
350 * @_mpu_port_index: cached MPU register target slave ID (internal use)
351 * @msuspendmux_reg_id: CONTROL_MSUSPENDMUX register ID (1-6)
352 * @msuspendmux_shift: CONTROL_MSUSPENDMUX register bit shift
353 * @mpu_irqs_cnt: number of @mpu_irqs
354 * @sdma_chs_cnt: number of @sdma_chs
355 * @opt_clks_cnt: number of @opt_clks
356 * @master_cnt: number of @master entries
357 * @slaves_cnt: number of @slave entries
358 * @response_lat: device OCP response latency (in interface clock cycles)
359 * @_int_flags: internal-use hwmod flags
360 * @_state: internal-use hwmod state
361 * @flags: hwmod flags (documented below)
362 * @omap_chip: OMAP chips this hwmod is present on
363 * @node: list node for hwmod list (internal use)
364 *
365 * @clkdev_dev_id, @clkdev_con_id, and @clk all refer to this module's "main
366 * clock," which for our purposes is defined as "the functional clock needed
367 * for register accesses to complete." Modules may not have a main clock if
368 * the interface clock also serves as a main clock.
369 *
370 * Parameter names beginning with an underscore are managed internally by
371 * the omap_hwmod code and should not be set during initialization.
372 */
373struct omap_hwmod {
374 const char *name;
375 struct omap_device *od;
376 u8 *mpu_irqs;
377 struct omap_hwmod_dma_info *sdma_chs;
378 union {
379 struct omap_hwmod_omap2_prcm omap2;
380 struct omap_hwmod_omap4_prcm omap4;
381 } prcm;
382 const char *clkdev_dev_id;
383 const char *clkdev_con_id;
384 struct clk *_clk;
385 struct omap_hwmod_opt_clk *opt_clks;
386 struct omap_hwmod_ocp_if **masters; /* connect to *_IA */
387 struct omap_hwmod_ocp_if **slaves; /* connect to *_TA */
388 struct omap_hwmod_sysconfig *sysconfig;
389 void *dev_attr;
390 u32 _sysc_cache;
391 void __iomem *_rt_va;
392 struct list_head node;
393 u16 flags;
394 u8 _mpu_port_index;
395 u8 msuspendmux_reg_id;
396 u8 msuspendmux_shift;
397 u8 response_lat;
398 u8 mpu_irqs_cnt;
399 u8 sdma_chs_cnt;
400 u8 opt_clks_cnt;
401 u8 masters_cnt;
402 u8 slaves_cnt;
403 u8 hwmods_cnt;
404 u8 _int_flags;
405 u8 _state;
406 const struct omap_chip_id omap_chip;
407};
408
409int omap_hwmod_init(struct omap_hwmod **ohs);
410int omap_hwmod_register(struct omap_hwmod *oh);
411int omap_hwmod_unregister(struct omap_hwmod *oh);
412struct omap_hwmod *omap_hwmod_lookup(const char *name);
413int omap_hwmod_for_each(int (*fn)(struct omap_hwmod *oh));
414int omap_hwmod_late_init(void);
415
416int omap_hwmod_enable(struct omap_hwmod *oh);
417int omap_hwmod_idle(struct omap_hwmod *oh);
418int omap_hwmod_shutdown(struct omap_hwmod *oh);
419
420int omap_hwmod_enable_clocks(struct omap_hwmod *oh);
421int omap_hwmod_disable_clocks(struct omap_hwmod *oh);
422
423int omap_hwmod_reset(struct omap_hwmod *oh);
424void omap_hwmod_ocp_barrier(struct omap_hwmod *oh);
425
426void omap_hwmod_writel(u32 v, struct omap_hwmod *oh, u16 reg_offs);
427u32 omap_hwmod_readl(struct omap_hwmod *oh, u16 reg_offs);
428
429int omap_hwmod_count_resources(struct omap_hwmod *oh);
430int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res);
431
432struct powerdomain *omap_hwmod_get_pwrdm(struct omap_hwmod *oh);
433
434int omap_hwmod_add_initiator_dep(struct omap_hwmod *oh,
435 struct omap_hwmod *init_oh);
436int omap_hwmod_del_initiator_dep(struct omap_hwmod *oh,
437 struct omap_hwmod *init_oh);
438
439int omap_hwmod_set_clockact_both(struct omap_hwmod *oh);
440int omap_hwmod_set_clockact_main(struct omap_hwmod *oh);
441int omap_hwmod_set_clockact_iclk(struct omap_hwmod *oh);
442int omap_hwmod_set_clockact_none(struct omap_hwmod *oh);
443
444int omap_hwmod_enable_wakeup(struct omap_hwmod *oh);
445int omap_hwmod_disable_wakeup(struct omap_hwmod *oh);
446
447#endif
diff --git a/arch/arm/plat-omap/include/mach/omapfb.h b/arch/arm/plat-omap/include/mach/omapfb.h
index 7b74d1255e0b..b226bdf45739 100644
--- a/arch/arm/plat-omap/include/mach/omapfb.h
+++ b/arch/arm/plat-omap/include/mach/omapfb.h
@@ -276,8 +276,8 @@ typedef int (*omapfb_notifier_callback_t)(struct notifier_block *,
276 void *fbi); 276 void *fbi);
277 277
278struct omapfb_mem_region { 278struct omapfb_mem_region {
279 dma_addr_t paddr; 279 u32 paddr;
280 void *vaddr; 280 void __iomem *vaddr;
281 unsigned long size; 281 unsigned long size;
282 u8 type; /* OMAPFB_PLANE_MEM_* */ 282 u8 type; /* OMAPFB_PLANE_MEM_* */
283 unsigned alloc:1; /* allocated by the driver */ 283 unsigned alloc:1; /* allocated by the driver */
diff --git a/arch/arm/plat-omap/include/mach/powerdomain.h b/arch/arm/plat-omap/include/mach/powerdomain.h
index 69c9e675d8ee..6271d8556a40 100644
--- a/arch/arm/plat-omap/include/mach/powerdomain.h
+++ b/arch/arm/plat-omap/include/mach/powerdomain.h
@@ -117,6 +117,13 @@ struct powerdomain {
117 117
118 struct list_head node; 118 struct list_head node;
119 119
120 int state;
121 unsigned state_counter[4];
122
123#ifdef CONFIG_PM_DEBUG
124 s64 timer;
125 s64 state_timer[4];
126#endif
120}; 127};
121 128
122 129
@@ -126,7 +133,8 @@ int pwrdm_register(struct powerdomain *pwrdm);
126int pwrdm_unregister(struct powerdomain *pwrdm); 133int pwrdm_unregister(struct powerdomain *pwrdm);
127struct powerdomain *pwrdm_lookup(const char *name); 134struct powerdomain *pwrdm_lookup(const char *name);
128 135
129int pwrdm_for_each(int (*fn)(struct powerdomain *pwrdm)); 136int pwrdm_for_each(int (*fn)(struct powerdomain *pwrdm, void *user),
137 void *user);
130 138
131int pwrdm_add_clkdm(struct powerdomain *pwrdm, struct clockdomain *clkdm); 139int pwrdm_add_clkdm(struct powerdomain *pwrdm, struct clockdomain *clkdm);
132int pwrdm_del_clkdm(struct powerdomain *pwrdm, struct clockdomain *clkdm); 140int pwrdm_del_clkdm(struct powerdomain *pwrdm, struct clockdomain *clkdm);
@@ -164,4 +172,9 @@ bool pwrdm_has_hdwr_sar(struct powerdomain *pwrdm);
164 172
165int pwrdm_wait_transition(struct powerdomain *pwrdm); 173int pwrdm_wait_transition(struct powerdomain *pwrdm);
166 174
175int pwrdm_state_switch(struct powerdomain *pwrdm);
176int pwrdm_clkdm_state_switch(struct clockdomain *clkdm);
177int pwrdm_pre_transition(void);
178int pwrdm_post_transition(void);
179
167#endif 180#endif
diff --git a/arch/arm/plat-omap/include/mach/sdrc.h b/arch/arm/plat-omap/include/mach/sdrc.h
index 0be18e4ff182..1c09c78a48f2 100644
--- a/arch/arm/plat-omap/include/mach/sdrc.h
+++ b/arch/arm/plat-omap/include/mach/sdrc.h
@@ -21,19 +21,28 @@
21/* SDRC register offsets - read/write with sdrc_{read,write}_reg() */ 21/* SDRC register offsets - read/write with sdrc_{read,write}_reg() */
22 22
23#define SDRC_SYSCONFIG 0x010 23#define SDRC_SYSCONFIG 0x010
24#define SDRC_CS_CFG 0x040
25#define SDRC_SHARING 0x044
26#define SDRC_ERR_TYPE 0x04C
24#define SDRC_DLLA_CTRL 0x060 27#define SDRC_DLLA_CTRL 0x060
25#define SDRC_DLLA_STATUS 0x064 28#define SDRC_DLLA_STATUS 0x064
26#define SDRC_DLLB_CTRL 0x068 29#define SDRC_DLLB_CTRL 0x068
27#define SDRC_DLLB_STATUS 0x06C 30#define SDRC_DLLB_STATUS 0x06C
28#define SDRC_POWER 0x070 31#define SDRC_POWER 0x070
32#define SDRC_MCFG_0 0x080
29#define SDRC_MR_0 0x084 33#define SDRC_MR_0 0x084
34#define SDRC_EMR2_0 0x08c
30#define SDRC_ACTIM_CTRL_A_0 0x09c 35#define SDRC_ACTIM_CTRL_A_0 0x09c
31#define SDRC_ACTIM_CTRL_B_0 0x0a0 36#define SDRC_ACTIM_CTRL_B_0 0x0a0
32#define SDRC_RFR_CTRL_0 0x0a4 37#define SDRC_RFR_CTRL_0 0x0a4
38#define SDRC_MANUAL_0 0x0a8
39#define SDRC_MCFG_1 0x0B0
33#define SDRC_MR_1 0x0B4 40#define SDRC_MR_1 0x0B4
41#define SDRC_EMR2_1 0x0BC
34#define SDRC_ACTIM_CTRL_A_1 0x0C4 42#define SDRC_ACTIM_CTRL_A_1 0x0C4
35#define SDRC_ACTIM_CTRL_B_1 0x0C8 43#define SDRC_ACTIM_CTRL_B_1 0x0C8
36#define SDRC_RFR_CTRL_1 0x0D4 44#define SDRC_RFR_CTRL_1 0x0D4
45#define SDRC_MANUAL_1 0x0D8
37 46
38/* 47/*
39 * These values represent the number of memory clock cycles between 48 * These values represent the number of memory clock cycles between
@@ -71,11 +80,11 @@
71 */ 80 */
72 81
73#define OMAP242X_SMS_REGADDR(reg) \ 82#define OMAP242X_SMS_REGADDR(reg) \
74 (void __iomem *)IO_ADDRESS(OMAP2420_SMS_BASE + reg) 83 (void __iomem *)OMAP2_IO_ADDRESS(OMAP2420_SMS_BASE + reg)
75#define OMAP243X_SMS_REGADDR(reg) \ 84#define OMAP243X_SMS_REGADDR(reg) \
76 (void __iomem *)IO_ADDRESS(OMAP243X_SMS_BASE + reg) 85 (void __iomem *)OMAP2_IO_ADDRESS(OMAP243X_SMS_BASE + reg)
77#define OMAP343X_SMS_REGADDR(reg) \ 86#define OMAP343X_SMS_REGADDR(reg) \
78 (void __iomem *)IO_ADDRESS(OMAP343X_SMS_BASE + reg) 87 (void __iomem *)OMAP2_IO_ADDRESS(OMAP343X_SMS_BASE + reg)
79 88
80/* SMS register offsets - read/write with sms_{read,write}_reg() */ 89/* SMS register offsets - read/write with sms_{read,write}_reg() */
81 90
diff --git a/arch/arm/plat-omap/include/mach/serial.h b/arch/arm/plat-omap/include/mach/serial.h
index def0529c75eb..e249186d26e2 100644
--- a/arch/arm/plat-omap/include/mach/serial.h
+++ b/arch/arm/plat-omap/include/mach/serial.h
@@ -13,6 +13,8 @@
13#ifndef __ASM_ARCH_SERIAL_H 13#ifndef __ASM_ARCH_SERIAL_H
14#define __ASM_ARCH_SERIAL_H 14#define __ASM_ARCH_SERIAL_H
15 15
16#include <linux/init.h>
17
16#if defined(CONFIG_ARCH_OMAP1) 18#if defined(CONFIG_ARCH_OMAP1)
17/* OMAP1 serial ports */ 19/* OMAP1 serial ports */
18#define OMAP_UART1_BASE 0xfffb0000 20#define OMAP_UART1_BASE 0xfffb0000
@@ -53,6 +55,7 @@
53 }) 55 })
54 56
55#ifndef __ASSEMBLER__ 57#ifndef __ASSEMBLER__
58extern void __init omap_serial_early_init(void);
56extern void omap_serial_init(void); 59extern void omap_serial_init(void);
57extern int omap_uart_can_sleep(void); 60extern int omap_uart_can_sleep(void);
58extern void omap_uart_check_wakeup(void); 61extern void omap_uart_check_wakeup(void);
diff --git a/arch/arm/plat-omap/io.c b/arch/arm/plat-omap/io.c
index 9b42d72d96cf..b6defa23e77e 100644
--- a/arch/arm/plat-omap/io.c
+++ b/arch/arm/plat-omap/io.c
@@ -30,8 +30,8 @@ void __iomem *omap_ioremap(unsigned long p, size_t size, unsigned int type)
30{ 30{
31#ifdef CONFIG_ARCH_OMAP1 31#ifdef CONFIG_ARCH_OMAP1
32 if (cpu_class_is_omap1()) { 32 if (cpu_class_is_omap1()) {
33 if (BETWEEN(p, IO_PHYS, IO_SIZE)) 33 if (BETWEEN(p, OMAP1_IO_PHYS, OMAP1_IO_SIZE))
34 return XLATE(p, IO_PHYS, IO_VIRT); 34 return XLATE(p, OMAP1_IO_PHYS, OMAP1_IO_VIRT);
35 } 35 }
36 if (cpu_is_omap730()) { 36 if (cpu_is_omap730()) {
37 if (BETWEEN(p, OMAP730_DSP_BASE, OMAP730_DSP_SIZE)) 37 if (BETWEEN(p, OMAP730_DSP_BASE, OMAP730_DSP_SIZE))
@@ -132,3 +132,61 @@ void omap_iounmap(volatile void __iomem *addr)
132 __iounmap(addr); 132 __iounmap(addr);
133} 133}
134EXPORT_SYMBOL(omap_iounmap); 134EXPORT_SYMBOL(omap_iounmap);
135
136/*
137 * NOTE: Please use ioremap + __raw_read/write where possible instead of these
138 */
139
140u8 omap_readb(u32 pa)
141{
142 if (cpu_class_is_omap1())
143 return __raw_readb(OMAP1_IO_ADDRESS(pa));
144 else
145 return __raw_readb(OMAP2_IO_ADDRESS(pa));
146}
147EXPORT_SYMBOL(omap_readb);
148
149u16 omap_readw(u32 pa)
150{
151 if (cpu_class_is_omap1())
152 return __raw_readw(OMAP1_IO_ADDRESS(pa));
153 else
154 return __raw_readw(OMAP2_IO_ADDRESS(pa));
155}
156EXPORT_SYMBOL(omap_readw);
157
158u32 omap_readl(u32 pa)
159{
160 if (cpu_class_is_omap1())
161 return __raw_readl(OMAP1_IO_ADDRESS(pa));
162 else
163 return __raw_readl(OMAP2_IO_ADDRESS(pa));
164}
165EXPORT_SYMBOL(omap_readl);
166
167void omap_writeb(u8 v, u32 pa)
168{
169 if (cpu_class_is_omap1())
170 __raw_writeb(v, OMAP1_IO_ADDRESS(pa));
171 else
172 __raw_writeb(v, OMAP2_IO_ADDRESS(pa));
173}
174EXPORT_SYMBOL(omap_writeb);
175
176void omap_writew(u16 v, u32 pa)
177{
178 if (cpu_class_is_omap1())
179 __raw_writew(v, OMAP1_IO_ADDRESS(pa));
180 else
181 __raw_writew(v, OMAP2_IO_ADDRESS(pa));
182}
183EXPORT_SYMBOL(omap_writew);
184
185void omap_writel(u32 v, u32 pa)
186{
187 if (cpu_class_is_omap1())
188 __raw_writel(v, OMAP1_IO_ADDRESS(pa));
189 else
190 __raw_writel(v, OMAP2_IO_ADDRESS(pa));
191}
192EXPORT_SYMBOL(omap_writel);
diff --git a/arch/arm/plat-omap/iommu-debug.c b/arch/arm/plat-omap/iommu-debug.c
new file mode 100644
index 000000000000..c799b3b0d709
--- /dev/null
+++ b/arch/arm/plat-omap/iommu-debug.c
@@ -0,0 +1,415 @@
1/*
2 * omap iommu: debugfs interface
3 *
4 * Copyright (C) 2008-2009 Nokia Corporation
5 *
6 * Written by Hiroshi DOYU <Hiroshi.DOYU@nokia.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#include <linux/err.h>
14#include <linux/clk.h>
15#include <linux/io.h>
16#include <linux/uaccess.h>
17#include <linux/platform_device.h>
18#include <linux/debugfs.h>
19
20#include <mach/iommu.h>
21#include <mach/iovmm.h>
22
23#include "iopgtable.h"
24
25#define MAXCOLUMN 100 /* for short messages */
26
27static DEFINE_MUTEX(iommu_debug_lock);
28
29static struct dentry *iommu_debug_root;
30
31static ssize_t debug_read_ver(struct file *file, char __user *userbuf,
32 size_t count, loff_t *ppos)
33{
34 u32 ver = iommu_arch_version();
35 char buf[MAXCOLUMN], *p = buf;
36
37 p += sprintf(p, "H/W version: %d.%d\n", (ver >> 4) & 0xf , ver & 0xf);
38
39 return simple_read_from_buffer(userbuf, count, ppos, buf, p - buf);
40}
41
42static ssize_t debug_read_regs(struct file *file, char __user *userbuf,
43 size_t count, loff_t *ppos)
44{
45 struct iommu *obj = file->private_data;
46 char *p, *buf;
47 ssize_t bytes;
48
49 buf = kmalloc(count, GFP_KERNEL);
50 if (!buf)
51 return -ENOMEM;
52 p = buf;
53
54 mutex_lock(&iommu_debug_lock);
55
56 bytes = iommu_dump_ctx(obj, p, count);
57 bytes = simple_read_from_buffer(userbuf, count, ppos, buf, bytes);
58
59 mutex_unlock(&iommu_debug_lock);
60 kfree(buf);
61
62 return bytes;
63}
64
65static ssize_t debug_read_tlb(struct file *file, char __user *userbuf,
66 size_t count, loff_t *ppos)
67{
68 struct iommu *obj = file->private_data;
69 char *p, *buf;
70 ssize_t bytes, rest;
71
72 buf = kmalloc(count, GFP_KERNEL);
73 if (!buf)
74 return -ENOMEM;
75 p = buf;
76
77 mutex_lock(&iommu_debug_lock);
78
79 p += sprintf(p, "%8s %8s\n", "cam:", "ram:");
80 p += sprintf(p, "-----------------------------------------\n");
81 rest = count - (p - buf);
82 p += dump_tlb_entries(obj, p, rest);
83
84 bytes = simple_read_from_buffer(userbuf, count, ppos, buf, p - buf);
85
86 mutex_unlock(&iommu_debug_lock);
87 kfree(buf);
88
89 return bytes;
90}
91
92static ssize_t debug_write_pagetable(struct file *file,
93 const char __user *userbuf, size_t count, loff_t *ppos)
94{
95 struct iotlb_entry e;
96 struct cr_regs cr;
97 int err;
98 struct iommu *obj = file->private_data;
99 char buf[MAXCOLUMN], *p = buf;
100
101 count = min(count, sizeof(buf));
102
103 mutex_lock(&iommu_debug_lock);
104 if (copy_from_user(p, userbuf, count)) {
105 mutex_unlock(&iommu_debug_lock);
106 return -EFAULT;
107 }
108
109 sscanf(p, "%x %x", &cr.cam, &cr.ram);
110 if (!cr.cam || !cr.ram) {
111 mutex_unlock(&iommu_debug_lock);
112 return -EINVAL;
113 }
114
115 iotlb_cr_to_e(&cr, &e);
116 err = iopgtable_store_entry(obj, &e);
117 if (err)
118 dev_err(obj->dev, "%s: fail to store cr\n", __func__);
119
120 mutex_unlock(&iommu_debug_lock);
121 return count;
122}
123
124#define dump_ioptable_entry_one(lv, da, val) \
125 ({ \
126 int __err = 0; \
127 ssize_t bytes; \
128 const int maxcol = 22; \
129 const char *str = "%d: %08x %08x\n"; \
130 bytes = snprintf(p, maxcol, str, lv, da, val); \
131 p += bytes; \
132 len -= bytes; \
133 if (len < maxcol) \
134 __err = -ENOMEM; \
135 __err; \
136 })
137
138static ssize_t dump_ioptable(struct iommu *obj, char *buf, ssize_t len)
139{
140 int i;
141 u32 *iopgd;
142 char *p = buf;
143
144 spin_lock(&obj->page_table_lock);
145
146 iopgd = iopgd_offset(obj, 0);
147 for (i = 0; i < PTRS_PER_IOPGD; i++, iopgd++) {
148 int j, err;
149 u32 *iopte;
150 u32 da;
151
152 if (!*iopgd)
153 continue;
154
155 if (!(*iopgd & IOPGD_TABLE)) {
156 da = i << IOPGD_SHIFT;
157
158 err = dump_ioptable_entry_one(1, da, *iopgd);
159 if (err)
160 goto out;
161 continue;
162 }
163
164 iopte = iopte_offset(iopgd, 0);
165
166 for (j = 0; j < PTRS_PER_IOPTE; j++, iopte++) {
167 if (!*iopte)
168 continue;
169
170 da = (i << IOPGD_SHIFT) + (j << IOPTE_SHIFT);
171 err = dump_ioptable_entry_one(2, da, *iopgd);
172 if (err)
173 goto out;
174 }
175 }
176out:
177 spin_unlock(&obj->page_table_lock);
178
179 return p - buf;
180}
181
182static ssize_t debug_read_pagetable(struct file *file, char __user *userbuf,
183 size_t count, loff_t *ppos)
184{
185 struct iommu *obj = file->private_data;
186 char *p, *buf;
187 size_t bytes;
188
189 buf = (char *)__get_free_page(GFP_KERNEL);
190 if (!buf)
191 return -ENOMEM;
192 p = buf;
193
194 p += sprintf(p, "L: %8s %8s\n", "da:", "pa:");
195 p += sprintf(p, "-----------------------------------------\n");
196
197 mutex_lock(&iommu_debug_lock);
198
199 bytes = PAGE_SIZE - (p - buf);
200 p += dump_ioptable(obj, p, bytes);
201
202 bytes = simple_read_from_buffer(userbuf, count, ppos, buf, p - buf);
203
204 mutex_unlock(&iommu_debug_lock);
205 free_page((unsigned long)buf);
206
207 return bytes;
208}
209
210static ssize_t debug_read_mmap(struct file *file, char __user *userbuf,
211 size_t count, loff_t *ppos)
212{
213 struct iommu *obj = file->private_data;
214 char *p, *buf;
215 struct iovm_struct *tmp;
216 int uninitialized_var(i);
217 ssize_t bytes;
218
219 buf = (char *)__get_free_page(GFP_KERNEL);
220 if (!buf)
221 return -ENOMEM;
222 p = buf;
223
224 p += sprintf(p, "%-3s %-8s %-8s %6s %8s\n",
225 "No", "start", "end", "size", "flags");
226 p += sprintf(p, "-------------------------------------------------\n");
227
228 mutex_lock(&iommu_debug_lock);
229
230 list_for_each_entry(tmp, &obj->mmap, list) {
231 size_t len;
232 const char *str = "%3d %08x-%08x %6x %8x\n";
233 const int maxcol = 39;
234
235 len = tmp->da_end - tmp->da_start;
236 p += snprintf(p, maxcol, str,
237 i, tmp->da_start, tmp->da_end, len, tmp->flags);
238
239 if (PAGE_SIZE - (p - buf) < maxcol)
240 break;
241 i++;
242 }
243
244 bytes = simple_read_from_buffer(userbuf, count, ppos, buf, p - buf);
245
246 mutex_unlock(&iommu_debug_lock);
247 free_page((unsigned long)buf);
248
249 return bytes;
250}
251
252static ssize_t debug_read_mem(struct file *file, char __user *userbuf,
253 size_t count, loff_t *ppos)
254{
255 struct iommu *obj = file->private_data;
256 char *p, *buf;
257 struct iovm_struct *area;
258 ssize_t bytes;
259
260 count = min_t(ssize_t, count, PAGE_SIZE);
261
262 buf = (char *)__get_free_page(GFP_KERNEL);
263 if (!buf)
264 return -ENOMEM;
265 p = buf;
266
267 mutex_lock(&iommu_debug_lock);
268
269 area = find_iovm_area(obj, (u32)ppos);
270 if (IS_ERR(area)) {
271 bytes = -EINVAL;
272 goto err_out;
273 }
274 memcpy(p, area->va, count);
275 p += count;
276
277 bytes = simple_read_from_buffer(userbuf, count, ppos, buf, p - buf);
278err_out:
279 mutex_unlock(&iommu_debug_lock);
280 free_page((unsigned long)buf);
281
282 return bytes;
283}
284
285static ssize_t debug_write_mem(struct file *file, const char __user *userbuf,
286 size_t count, loff_t *ppos)
287{
288 struct iommu *obj = file->private_data;
289 struct iovm_struct *area;
290 char *p, *buf;
291
292 count = min_t(size_t, count, PAGE_SIZE);
293
294 buf = (char *)__get_free_page(GFP_KERNEL);
295 if (!buf)
296 return -ENOMEM;
297 p = buf;
298
299 mutex_lock(&iommu_debug_lock);
300
301 if (copy_from_user(p, userbuf, count)) {
302 count = -EFAULT;
303 goto err_out;
304 }
305
306 area = find_iovm_area(obj, (u32)ppos);
307 if (IS_ERR(area)) {
308 count = -EINVAL;
309 goto err_out;
310 }
311 memcpy(area->va, p, count);
312err_out:
313 mutex_unlock(&iommu_debug_lock);
314 free_page((unsigned long)buf);
315
316 return count;
317}
318
319static int debug_open_generic(struct inode *inode, struct file *file)
320{
321 file->private_data = inode->i_private;
322 return 0;
323}
324
325#define DEBUG_FOPS(name) \
326 static const struct file_operations debug_##name##_fops = { \
327 .open = debug_open_generic, \
328 .read = debug_read_##name, \
329 .write = debug_write_##name, \
330 };
331
332#define DEBUG_FOPS_RO(name) \
333 static const struct file_operations debug_##name##_fops = { \
334 .open = debug_open_generic, \
335 .read = debug_read_##name, \
336 };
337
338DEBUG_FOPS_RO(ver);
339DEBUG_FOPS_RO(regs);
340DEBUG_FOPS_RO(tlb);
341DEBUG_FOPS(pagetable);
342DEBUG_FOPS_RO(mmap);
343DEBUG_FOPS(mem);
344
345#define __DEBUG_ADD_FILE(attr, mode) \
346 { \
347 struct dentry *dent; \
348 dent = debugfs_create_file(#attr, mode, parent, \
349 obj, &debug_##attr##_fops); \
350 if (!dent) \
351 return -ENOMEM; \
352 }
353
354#define DEBUG_ADD_FILE(name) __DEBUG_ADD_FILE(name, 600)
355#define DEBUG_ADD_FILE_RO(name) __DEBUG_ADD_FILE(name, 400)
356
357static int iommu_debug_register(struct device *dev, void *data)
358{
359 struct platform_device *pdev = to_platform_device(dev);
360 struct iommu *obj = platform_get_drvdata(pdev);
361 struct dentry *d, *parent;
362
363 if (!obj || !obj->dev)
364 return -EINVAL;
365
366 d = debugfs_create_dir(obj->name, iommu_debug_root);
367 if (!d)
368 return -ENOMEM;
369 parent = d;
370
371 d = debugfs_create_u8("nr_tlb_entries", 400, parent,
372 (u8 *)&obj->nr_tlb_entries);
373 if (!d)
374 return -ENOMEM;
375
376 DEBUG_ADD_FILE_RO(ver);
377 DEBUG_ADD_FILE_RO(regs);
378 DEBUG_ADD_FILE_RO(tlb);
379 DEBUG_ADD_FILE(pagetable);
380 DEBUG_ADD_FILE_RO(mmap);
381 DEBUG_ADD_FILE(mem);
382
383 return 0;
384}
385
386static int __init iommu_debug_init(void)
387{
388 struct dentry *d;
389 int err;
390
391 d = debugfs_create_dir("iommu", NULL);
392 if (!d)
393 return -ENOMEM;
394 iommu_debug_root = d;
395
396 err = foreach_iommu_device(d, iommu_debug_register);
397 if (err)
398 goto err_out;
399 return 0;
400
401err_out:
402 debugfs_remove_recursive(iommu_debug_root);
403 return err;
404}
405module_init(iommu_debug_init)
406
407static void __exit iommu_debugfs_exit(void)
408{
409 debugfs_remove_recursive(iommu_debug_root);
410}
411module_exit(iommu_debugfs_exit)
412
413MODULE_DESCRIPTION("omap iommu: debugfs interface");
414MODULE_AUTHOR("Hiroshi DOYU <Hiroshi.DOYU@nokia.com>");
415MODULE_LICENSE("GPL v2");
diff --git a/arch/arm/plat-omap/iommu.c b/arch/arm/plat-omap/iommu.c
index 4a0301399013..4b6012707307 100644
--- a/arch/arm/plat-omap/iommu.c
+++ b/arch/arm/plat-omap/iommu.c
@@ -351,16 +351,14 @@ EXPORT_SYMBOL_GPL(flush_iotlb_all);
351 351
352#if defined(CONFIG_OMAP_IOMMU_DEBUG_MODULE) 352#if defined(CONFIG_OMAP_IOMMU_DEBUG_MODULE)
353 353
354ssize_t iommu_dump_ctx(struct iommu *obj, char *buf) 354ssize_t iommu_dump_ctx(struct iommu *obj, char *buf, ssize_t bytes)
355{ 355{
356 ssize_t bytes;
357
358 if (!obj || !buf) 356 if (!obj || !buf)
359 return -EINVAL; 357 return -EINVAL;
360 358
361 clk_enable(obj->clk); 359 clk_enable(obj->clk);
362 360
363 bytes = arch_iommu->dump_ctx(obj, buf); 361 bytes = arch_iommu->dump_ctx(obj, buf, bytes);
364 362
365 clk_disable(obj->clk); 363 clk_disable(obj->clk);
366 364
@@ -368,7 +366,7 @@ ssize_t iommu_dump_ctx(struct iommu *obj, char *buf)
368} 366}
369EXPORT_SYMBOL_GPL(iommu_dump_ctx); 367EXPORT_SYMBOL_GPL(iommu_dump_ctx);
370 368
371static int __dump_tlb_entries(struct iommu *obj, struct cr_regs *crs) 369static int __dump_tlb_entries(struct iommu *obj, struct cr_regs *crs, int num)
372{ 370{
373 int i; 371 int i;
374 struct iotlb_lock saved, l; 372 struct iotlb_lock saved, l;
@@ -379,7 +377,7 @@ static int __dump_tlb_entries(struct iommu *obj, struct cr_regs *crs)
379 iotlb_lock_get(obj, &saved); 377 iotlb_lock_get(obj, &saved);
380 memcpy(&l, &saved, sizeof(saved)); 378 memcpy(&l, &saved, sizeof(saved));
381 379
382 for (i = 0; i < obj->nr_tlb_entries; i++) { 380 for (i = 0; i < num; i++) {
383 struct cr_regs tmp; 381 struct cr_regs tmp;
384 382
385 iotlb_lock_get(obj, &l); 383 iotlb_lock_get(obj, &l);
@@ -402,18 +400,21 @@ static int __dump_tlb_entries(struct iommu *obj, struct cr_regs *crs)
402 * @obj: target iommu 400 * @obj: target iommu
403 * @buf: output buffer 401 * @buf: output buffer
404 **/ 402 **/
405size_t dump_tlb_entries(struct iommu *obj, char *buf) 403size_t dump_tlb_entries(struct iommu *obj, char *buf, ssize_t bytes)
406{ 404{
407 int i, n; 405 int i, num;
408 struct cr_regs *cr; 406 struct cr_regs *cr;
409 char *p = buf; 407 char *p = buf;
410 408
411 cr = kcalloc(obj->nr_tlb_entries, sizeof(*cr), GFP_KERNEL); 409 num = bytes / sizeof(*cr);
410 num = min(obj->nr_tlb_entries, num);
411
412 cr = kcalloc(num, sizeof(*cr), GFP_KERNEL);
412 if (!cr) 413 if (!cr)
413 return 0; 414 return 0;
414 415
415 n = __dump_tlb_entries(obj, cr); 416 num = __dump_tlb_entries(obj, cr, num);
416 for (i = 0; i < n; i++) 417 for (i = 0; i < num; i++)
417 p += iotlb_dump_cr(obj, cr + i, p); 418 p += iotlb_dump_cr(obj, cr + i, p);
418 kfree(cr); 419 kfree(cr);
419 420
diff --git a/arch/arm/plat-omap/iovmm.c b/arch/arm/plat-omap/iovmm.c
index 2fce2c151a95..6fc52fcbdc03 100644
--- a/arch/arm/plat-omap/iovmm.c
+++ b/arch/arm/plat-omap/iovmm.c
@@ -199,7 +199,7 @@ static void *vmap_sg(const struct sg_table *sgt)
199 va += bytes; 199 va += bytes;
200 } 200 }
201 201
202 flush_cache_vmap(new->addr, total); 202 flush_cache_vmap(new->addr, new->addr + total);
203 return new->addr; 203 return new->addr;
204 204
205err_out: 205err_out:
diff --git a/arch/arm/plat-omap/omap-pm-noop.c b/arch/arm/plat-omap/omap-pm-noop.c
new file mode 100644
index 000000000000..e98f0a2a6c26
--- /dev/null
+++ b/arch/arm/plat-omap/omap-pm-noop.c
@@ -0,0 +1,296 @@
1/*
2 * omap-pm-noop.c - OMAP power management interface - dummy version
3 *
4 * This code implements the OMAP power management interface to
5 * drivers, CPUIdle, CPUFreq, and DSP Bridge. It is strictly for
6 * debug/demonstration use, as it does nothing but printk() whenever a
7 * function is called (when DEBUG is defined, below)
8 *
9 * Copyright (C) 2008-2009 Texas Instruments, Inc.
10 * Copyright (C) 2008-2009 Nokia Corporation
11 * Paul Walmsley
12 *
13 * Interface developed by (in alphabetical order):
14 * Karthik Dasu, Tony Lindgren, Rajendra Nayak, Sakari Poussa, Veeramanikandan
15 * Raju, Anand Sawant, Igor Stoppa, Paul Walmsley, Richard Woodruff
16 */
17
18#undef DEBUG
19
20#include <linux/init.h>
21#include <linux/cpufreq.h>
22#include <linux/device.h>
23
24/* Interface documentation is in mach/omap-pm.h */
25#include <mach/omap-pm.h>
26
27#include <mach/powerdomain.h>
28
29struct omap_opp *dsp_opps;
30struct omap_opp *mpu_opps;
31struct omap_opp *l3_opps;
32
33/*
34 * Device-driver-originated constraints (via board-*.c files)
35 */
36
37void omap_pm_set_max_mpu_wakeup_lat(struct device *dev, long t)
38{
39 if (!dev || t < -1) {
40 WARN_ON(1);
41 return;
42 };
43
44 if (t == -1)
45 pr_debug("OMAP PM: remove max MPU wakeup latency constraint: "
46 "dev %s\n", dev_name(dev));
47 else
48 pr_debug("OMAP PM: add max MPU wakeup latency constraint: "
49 "dev %s, t = %ld usec\n", dev_name(dev), t);
50
51 /*
52 * For current Linux, this needs to map the MPU to a
53 * powerdomain, then go through the list of current max lat
54 * constraints on the MPU and find the smallest. If
55 * the latency constraint has changed, the code should
56 * recompute the state to enter for the next powerdomain
57 * state.
58 *
59 * TI CDP code can call constraint_set here.
60 */
61}
62
63void omap_pm_set_min_bus_tput(struct device *dev, u8 agent_id, unsigned long r)
64{
65 if (!dev || (agent_id != OCP_INITIATOR_AGENT &&
66 agent_id != OCP_TARGET_AGENT)) {
67 WARN_ON(1);
68 return;
69 };
70
71 if (r == 0)
72 pr_debug("OMAP PM: remove min bus tput constraint: "
73 "dev %s for agent_id %d\n", dev_name(dev), agent_id);
74 else
75 pr_debug("OMAP PM: add min bus tput constraint: "
76 "dev %s for agent_id %d: rate %ld KiB\n",
77 dev_name(dev), agent_id, r);
78
79 /*
80 * This code should model the interconnect and compute the
81 * required clock frequency, convert that to a VDD2 OPP ID, then
82 * set the VDD2 OPP appropriately.
83 *
84 * TI CDP code can call constraint_set here on the VDD2 OPP.
85 */
86}
87
88void omap_pm_set_max_dev_wakeup_lat(struct device *dev, long t)
89{
90 if (!dev || t < -1) {
91 WARN_ON(1);
92 return;
93 };
94
95 if (t == -1)
96 pr_debug("OMAP PM: remove max device latency constraint: "
97 "dev %s\n", dev_name(dev));
98 else
99 pr_debug("OMAP PM: add max device latency constraint: "
100 "dev %s, t = %ld usec\n", dev_name(dev), t);
101
102 /*
103 * For current Linux, this needs to map the device to a
104 * powerdomain, then go through the list of current max lat
105 * constraints on that powerdomain and find the smallest. If
106 * the latency constraint has changed, the code should
107 * recompute the state to enter for the next powerdomain
108 * state. Conceivably, this code should also determine
109 * whether to actually disable the device clocks or not,
110 * depending on how long it takes to re-enable the clocks.
111 *
112 * TI CDP code can call constraint_set here.
113 */
114}
115
116void omap_pm_set_max_sdma_lat(struct device *dev, long t)
117{
118 if (!dev || t < -1) {
119 WARN_ON(1);
120 return;
121 };
122
123 if (t == -1)
124 pr_debug("OMAP PM: remove max DMA latency constraint: "
125 "dev %s\n", dev_name(dev));
126 else
127 pr_debug("OMAP PM: add max DMA latency constraint: "
128 "dev %s, t = %ld usec\n", dev_name(dev), t);
129
130 /*
131 * For current Linux PM QOS params, this code should scan the
132 * list of maximum CPU and DMA latencies and select the
133 * smallest, then set cpu_dma_latency pm_qos_param
134 * accordingly.
135 *
136 * For future Linux PM QOS params, with separate CPU and DMA
137 * latency params, this code should just set the dma_latency param.
138 *
139 * TI CDP code can call constraint_set here.
140 */
141
142}
143
144
145/*
146 * DSP Bridge-specific constraints
147 */
148
149const struct omap_opp *omap_pm_dsp_get_opp_table(void)
150{
151 pr_debug("OMAP PM: DSP request for OPP table\n");
152
153 /*
154 * Return DSP frequency table here: The final item in the
155 * array should have .rate = .opp_id = 0.
156 */
157
158 return NULL;
159}
160
161void omap_pm_dsp_set_min_opp(u8 opp_id)
162{
163 if (opp_id == 0) {
164 WARN_ON(1);
165 return;
166 }
167
168 pr_debug("OMAP PM: DSP requests minimum VDD1 OPP to be %d\n", opp_id);
169
170 /*
171 *
172 * For l-o dev tree, our VDD1 clk is keyed on OPP ID, so we
173 * can just test to see which is higher, the CPU's desired OPP
174 * ID or the DSP's desired OPP ID, and use whichever is
175 * highest.
176 *
177 * In CDP12.14+, the VDD1 OPP custom clock that controls the DSP
178 * rate is keyed on MPU speed, not the OPP ID. So we need to
179 * map the OPP ID to the MPU speed for use with clk_set_rate()
180 * if it is higher than the current OPP clock rate.
181 *
182 */
183}
184
185
186u8 omap_pm_dsp_get_opp(void)
187{
188 pr_debug("OMAP PM: DSP requests current DSP OPP ID\n");
189
190 /*
191 * For l-o dev tree, call clk_get_rate() on VDD1 OPP clock
192 *
193 * CDP12.14+:
194 * Call clk_get_rate() on the OPP custom clock, map that to an
195 * OPP ID using the tables defined in board-*.c/chip-*.c files.
196 */
197
198 return 0;
199}
200
201/*
202 * CPUFreq-originated constraint
203 *
204 * In the future, this should be handled by custom OPP clocktype
205 * functions.
206 */
207
208struct cpufreq_frequency_table **omap_pm_cpu_get_freq_table(void)
209{
210 pr_debug("OMAP PM: CPUFreq request for frequency table\n");
211
212 /*
213 * Return CPUFreq frequency table here: loop over
214 * all VDD1 clkrates, pull out the mpu_ck frequencies, build
215 * table
216 */
217
218 return NULL;
219}
220
221void omap_pm_cpu_set_freq(unsigned long f)
222{
223 if (f == 0) {
224 WARN_ON(1);
225 return;
226 }
227
228 pr_debug("OMAP PM: CPUFreq requests CPU frequency to be set to %lu\n",
229 f);
230
231 /*
232 * For l-o dev tree, determine whether MPU freq or DSP OPP id
233 * freq is higher. Find the OPP ID corresponding to the
234 * higher frequency. Call clk_round_rate() and clk_set_rate()
235 * on the OPP custom clock.
236 *
237 * CDP should just be able to set the VDD1 OPP clock rate here.
238 */
239}
240
241unsigned long omap_pm_cpu_get_freq(void)
242{
243 pr_debug("OMAP PM: CPUFreq requests current CPU frequency\n");
244
245 /*
246 * Call clk_get_rate() on the mpu_ck.
247 */
248
249 return 0;
250}
251
252/*
253 * Device context loss tracking
254 */
255
256int omap_pm_get_dev_context_loss_count(struct device *dev)
257{
258 if (!dev) {
259 WARN_ON(1);
260 return -EINVAL;
261 };
262
263 pr_debug("OMAP PM: returning context loss count for dev %s\n",
264 dev_name(dev));
265
266 /*
267 * Map the device to the powerdomain. Return the powerdomain
268 * off counter.
269 */
270
271 return 0;
272}
273
274
275/* Should be called before clk framework init */
276int __init omap_pm_if_early_init(struct omap_opp *mpu_opp_table,
277 struct omap_opp *dsp_opp_table,
278 struct omap_opp *l3_opp_table)
279{
280 mpu_opps = mpu_opp_table;
281 dsp_opps = dsp_opp_table;
282 l3_opps = l3_opp_table;
283 return 0;
284}
285
286/* Must be called after clock framework is initialized */
287int __init omap_pm_if_init(void)
288{
289 return 0;
290}
291
292void omap_pm_if_exit(void)
293{
294 /* Deallocate CPUFreq frequency table here */
295}
296
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c
new file mode 100644
index 000000000000..2c409fc6dd21
--- /dev/null
+++ b/arch/arm/plat-omap/omap_device.c
@@ -0,0 +1,687 @@
1/*
2 * omap_device implementation
3 *
4 * Copyright (C) 2009 Nokia Corporation
5 * Paul Walmsley
6 *
7 * Developed in collaboration with (alphabetical order): Benoit
8 * Cousson, Kevin Hilman, Tony Lindgren, Rajendra Nayak, Vikram
9 * Pandita, Sakari Poussa, Anand Sawant, Santosh Shilimkar, Richard
10 * Woodruff
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 * This code provides a consistent interface for OMAP device drivers
17 * to control power management and interconnect properties of their
18 * devices.
19 *
20 * In the medium- to long-term, this code should either be
21 * a) implemented via arch-specific pointers in platform_data
22 * or
23 * b) implemented as a proper omap_bus/omap_device in Linux, no more
24 * platform_data func pointers
25 *
26 *
27 * Guidelines for usage by driver authors:
28 *
29 * 1. These functions are intended to be used by device drivers via
30 * function pointers in struct platform_data. As an example,
31 * omap_device_enable() should be passed to the driver as
32 *
33 * struct foo_driver_platform_data {
34 * ...
35 * int (*device_enable)(struct platform_device *pdev);
36 * ...
37 * }
38 *
39 * Note that the generic "device_enable" name is used, rather than
40 * "omap_device_enable". This is so other architectures can pass in their
41 * own enable/disable functions here.
42 *
43 * This should be populated during device setup:
44 *
45 * ...
46 * pdata->device_enable = omap_device_enable;
47 * ...
48 *
49 * 2. Drivers should first check to ensure the function pointer is not null
50 * before calling it, as in:
51 *
52 * if (pdata->device_enable)
53 * pdata->device_enable(pdev);
54 *
55 * This allows other architectures that don't use similar device_enable()/
56 * device_shutdown() functions to execute normally.
57 *
58 * ...
59 *
60 * Suggested usage by device drivers:
61 *
62 * During device initialization:
63 * device_enable()
64 *
65 * During device idle:
66 * (save remaining device context if necessary)
67 * device_idle();
68 *
69 * During device resume:
70 * device_enable();
71 * (restore context if necessary)
72 *
73 * During device shutdown:
74 * device_shutdown()
75 * (device must be reinitialized at this point to use it again)
76 *
77 */
78#undef DEBUG
79
80#include <linux/kernel.h>
81#include <linux/platform_device.h>
82#include <linux/err.h>
83#include <linux/io.h>
84
85#include <mach/omap_device.h>
86#include <mach/omap_hwmod.h>
87
88/* These parameters are passed to _omap_device_{de,}activate() */
89#define USE_WAKEUP_LAT 0
90#define IGNORE_WAKEUP_LAT 1
91
92/* XXX this should be moved into a separate file */
93#if defined(CONFIG_ARCH_OMAP2420)
94# define OMAP_32KSYNCT_BASE 0x48004000
95#elif defined(CONFIG_ARCH_OMAP2430)
96# define OMAP_32KSYNCT_BASE 0x49020000
97#elif defined(CONFIG_ARCH_OMAP3430)
98# define OMAP_32KSYNCT_BASE 0x48320000
99#else
100# error Unknown OMAP device
101#endif
102
103/* Private functions */
104
105/**
106 * _read_32ksynct - read the OMAP 32K sync timer
107 *
108 * Returns the current value of the 32KiHz synchronization counter.
109 * XXX this should be generalized to simply read the system clocksource.
110 * XXX this should be moved to a separate synctimer32k.c file
111 */
112static u32 _read_32ksynct(void)
113{
114 if (!cpu_class_is_omap2())
115 BUG();
116
117 return __raw_readl(OMAP2_IO_ADDRESS(OMAP_32KSYNCT_BASE + 0x010));
118}
119
120/**
121 * _omap_device_activate - increase device readiness
122 * @od: struct omap_device *
123 * @ignore_lat: increase to latency target (0) or full readiness (1)?
124 *
125 * Increase readiness of omap_device @od (thus decreasing device
126 * wakeup latency, but consuming more power). If @ignore_lat is
127 * IGNORE_WAKEUP_LAT, make the omap_device fully active. Otherwise,
128 * if @ignore_lat is USE_WAKEUP_LAT, and the device's maximum wakeup
129 * latency is greater than the requested maximum wakeup latency, step
130 * backwards in the omap_device_pm_latency table to ensure the
131 * device's maximum wakeup latency is less than or equal to the
132 * requested maximum wakeup latency. Returns 0.
133 */
134static int _omap_device_activate(struct omap_device *od, u8 ignore_lat)
135{
136 u32 a, b;
137
138 pr_debug("omap_device: %s: activating\n", od->pdev.name);
139
140 while (od->pm_lat_level > 0) {
141 struct omap_device_pm_latency *odpl;
142 int act_lat = 0;
143
144 od->pm_lat_level--;
145
146 odpl = od->pm_lats + od->pm_lat_level;
147
148 if (!ignore_lat &&
149 (od->dev_wakeup_lat <= od->_dev_wakeup_lat_limit))
150 break;
151
152 a = _read_32ksynct();
153
154 /* XXX check return code */
155 odpl->activate_func(od);
156
157 b = _read_32ksynct();
158
159 act_lat = (b - a) >> 15; /* 32KiHz cycles to microseconds */
160
161 pr_debug("omap_device: %s: pm_lat %d: activate: elapsed time "
162 "%d usec\n", od->pdev.name, od->pm_lat_level, act_lat);
163
164 WARN(act_lat > odpl->activate_lat, "omap_device: %s.%d: "
165 "activate step %d took longer than expected (%d > %d)\n",
166 od->pdev.name, od->pdev.id, od->pm_lat_level,
167 act_lat, odpl->activate_lat);
168
169 od->dev_wakeup_lat -= odpl->activate_lat;
170 }
171
172 return 0;
173}
174
175/**
176 * _omap_device_deactivate - decrease device readiness
177 * @od: struct omap_device *
178 * @ignore_lat: decrease to latency target (0) or full inactivity (1)?
179 *
180 * Decrease readiness of omap_device @od (thus increasing device
181 * wakeup latency, but conserving power). If @ignore_lat is
182 * IGNORE_WAKEUP_LAT, make the omap_device fully inactive. Otherwise,
183 * if @ignore_lat is USE_WAKEUP_LAT, and the device's maximum wakeup
184 * latency is less than the requested maximum wakeup latency, step
185 * forwards in the omap_device_pm_latency table to ensure the device's
186 * maximum wakeup latency is less than or equal to the requested
187 * maximum wakeup latency. Returns 0.
188 */
189static int _omap_device_deactivate(struct omap_device *od, u8 ignore_lat)
190{
191 u32 a, b;
192
193 pr_debug("omap_device: %s: deactivating\n", od->pdev.name);
194
195 while (od->pm_lat_level < od->pm_lats_cnt) {
196 struct omap_device_pm_latency *odpl;
197 int deact_lat = 0;
198
199 odpl = od->pm_lats + od->pm_lat_level;
200
201 if (!ignore_lat &&
202 ((od->dev_wakeup_lat + odpl->activate_lat) >
203 od->_dev_wakeup_lat_limit))
204 break;
205
206 a = _read_32ksynct();
207
208 /* XXX check return code */
209 odpl->deactivate_func(od);
210
211 b = _read_32ksynct();
212
213 deact_lat = (b - a) >> 15; /* 32KiHz cycles to microseconds */
214
215 pr_debug("omap_device: %s: pm_lat %d: deactivate: elapsed time "
216 "%d usec\n", od->pdev.name, od->pm_lat_level,
217 deact_lat);
218
219 WARN(deact_lat > odpl->deactivate_lat, "omap_device: %s.%d: "
220 "deactivate step %d took longer than expected (%d > %d)\n",
221 od->pdev.name, od->pdev.id, od->pm_lat_level,
222 deact_lat, odpl->deactivate_lat);
223
224 od->dev_wakeup_lat += odpl->activate_lat;
225
226 od->pm_lat_level++;
227 }
228
229 return 0;
230}
231
232static inline struct omap_device *_find_by_pdev(struct platform_device *pdev)
233{
234 return container_of(pdev, struct omap_device, pdev);
235}
236
237
238/* Public functions for use by core code */
239
240/**
241 * omap_device_count_resources - count number of struct resource entries needed
242 * @od: struct omap_device *
243 *
244 * Count the number of struct resource entries needed for this
245 * omap_device @od. Used by omap_device_build_ss() to determine how
246 * much memory to allocate before calling
247 * omap_device_fill_resources(). Returns the count.
248 */
249int omap_device_count_resources(struct omap_device *od)
250{
251 struct omap_hwmod *oh;
252 int c = 0;
253 int i;
254
255 for (i = 0, oh = *od->hwmods; i < od->hwmods_cnt; i++, oh++)
256 c += omap_hwmod_count_resources(oh);
257
258 pr_debug("omap_device: %s: counted %d total resources across %d "
259 "hwmods\n", od->pdev.name, c, od->hwmods_cnt);
260
261 return c;
262}
263
264/**
265 * omap_device_fill_resources - fill in array of struct resource
266 * @od: struct omap_device *
267 * @res: pointer to an array of struct resource to be filled in
268 *
269 * Populate one or more empty struct resource pointed to by @res with
270 * the resource data for this omap_device @od. Used by
271 * omap_device_build_ss() after calling omap_device_count_resources().
272 * Ideally this function would not be needed at all. If omap_device
273 * replaces platform_device, then we can specify our own
274 * get_resource()/ get_irq()/etc functions that use the underlying
275 * omap_hwmod information. Or if platform_device is extended to use
276 * subarchitecture-specific function pointers, the various
277 * platform_device functions can simply call omap_device internal
278 * functions to get device resources. Hacking around the existing
279 * platform_device code wastes memory. Returns 0.
280 */
281int omap_device_fill_resources(struct omap_device *od, struct resource *res)
282{
283 struct omap_hwmod *oh;
284 int c = 0;
285 int i, r;
286
287 for (i = 0, oh = *od->hwmods; i < od->hwmods_cnt; i++, oh++) {
288 r = omap_hwmod_fill_resources(oh, res);
289 res += r;
290 c += r;
291 }
292
293 return 0;
294}
295
296/**
297 * omap_device_build - build and register an omap_device with one omap_hwmod
298 * @pdev_name: name of the platform_device driver to use
299 * @pdev_id: this platform_device's connection ID
300 * @oh: ptr to the single omap_hwmod that backs this omap_device
301 * @pdata: platform_data ptr to associate with the platform_device
302 * @pdata_len: amount of memory pointed to by @pdata
303 * @pm_lats: pointer to a omap_device_pm_latency array for this device
304 * @pm_lats_cnt: ARRAY_SIZE() of @pm_lats
305 *
306 * Convenience function for building and registering a single
307 * omap_device record, which in turn builds and registers a
308 * platform_device record. See omap_device_build_ss() for more
309 * information. Returns ERR_PTR(-EINVAL) if @oh is NULL; otherwise,
310 * passes along the return value of omap_device_build_ss().
311 */
312struct omap_device *omap_device_build(const char *pdev_name, int pdev_id,
313 struct omap_hwmod *oh, void *pdata,
314 int pdata_len,
315 struct omap_device_pm_latency *pm_lats,
316 int pm_lats_cnt)
317{
318 struct omap_hwmod *ohs[] = { oh };
319
320 if (!oh)
321 return ERR_PTR(-EINVAL);
322
323 return omap_device_build_ss(pdev_name, pdev_id, ohs, 1, pdata,
324 pdata_len, pm_lats, pm_lats_cnt);
325}
326
327/**
328 * omap_device_build_ss - build and register an omap_device with multiple hwmods
329 * @pdev_name: name of the platform_device driver to use
330 * @pdev_id: this platform_device's connection ID
331 * @oh: ptr to the single omap_hwmod that backs this omap_device
332 * @pdata: platform_data ptr to associate with the platform_device
333 * @pdata_len: amount of memory pointed to by @pdata
334 * @pm_lats: pointer to a omap_device_pm_latency array for this device
335 * @pm_lats_cnt: ARRAY_SIZE() of @pm_lats
336 *
337 * Convenience function for building and registering an omap_device
338 * subsystem record. Subsystem records consist of multiple
339 * omap_hwmods. This function in turn builds and registers a
340 * platform_device record. Returns an ERR_PTR() on error, or passes
341 * along the return value of omap_device_register().
342 */
343struct omap_device *omap_device_build_ss(const char *pdev_name, int pdev_id,
344 struct omap_hwmod **ohs, int oh_cnt,
345 void *pdata, int pdata_len,
346 struct omap_device_pm_latency *pm_lats,
347 int pm_lats_cnt)
348{
349 int ret = -ENOMEM;
350 struct omap_device *od;
351 char *pdev_name2;
352 struct resource *res = NULL;
353 int res_count;
354 struct omap_hwmod **hwmods;
355
356 if (!ohs || oh_cnt == 0 || !pdev_name)
357 return ERR_PTR(-EINVAL);
358
359 if (!pdata && pdata_len > 0)
360 return ERR_PTR(-EINVAL);
361
362 pr_debug("omap_device: %s: building with %d hwmods\n", pdev_name,
363 oh_cnt);
364
365 od = kzalloc(sizeof(struct omap_device), GFP_KERNEL);
366 if (!od)
367 return ERR_PTR(-ENOMEM);
368
369 od->hwmods_cnt = oh_cnt;
370
371 hwmods = kzalloc(sizeof(struct omap_hwmod *) * oh_cnt,
372 GFP_KERNEL);
373 if (!hwmods)
374 goto odbs_exit1;
375
376 memcpy(hwmods, ohs, sizeof(struct omap_hwmod *) * oh_cnt);
377 od->hwmods = hwmods;
378
379 pdev_name2 = kzalloc(strlen(pdev_name) + 1, GFP_KERNEL);
380 if (!pdev_name2)
381 goto odbs_exit2;
382 strcpy(pdev_name2, pdev_name);
383
384 od->pdev.name = pdev_name2;
385 od->pdev.id = pdev_id;
386
387 res_count = omap_device_count_resources(od);
388 if (res_count > 0) {
389 res = kzalloc(sizeof(struct resource) * res_count, GFP_KERNEL);
390 if (!res)
391 goto odbs_exit3;
392 }
393 omap_device_fill_resources(od, res);
394
395 od->pdev.num_resources = res_count;
396 od->pdev.resource = res;
397
398 platform_device_add_data(&od->pdev, pdata, pdata_len);
399
400 od->pm_lats = pm_lats;
401 od->pm_lats_cnt = pm_lats_cnt;
402
403 ret = omap_device_register(od);
404 if (ret)
405 goto odbs_exit4;
406
407 return od;
408
409odbs_exit4:
410 kfree(res);
411odbs_exit3:
412 kfree(pdev_name2);
413odbs_exit2:
414 kfree(hwmods);
415odbs_exit1:
416 kfree(od);
417
418 pr_err("omap_device: %s: build failed (%d)\n", pdev_name, ret);
419
420 return ERR_PTR(ret);
421}
422
423/**
424 * omap_device_register - register an omap_device with one omap_hwmod
425 * @od: struct omap_device * to register
426 *
427 * Register the omap_device structure. This currently just calls
428 * platform_device_register() on the underlying platform_device.
429 * Returns the return value of platform_device_register().
430 */
431int omap_device_register(struct omap_device *od)
432{
433 pr_debug("omap_device: %s: registering\n", od->pdev.name);
434
435 return platform_device_register(&od->pdev);
436}
437
438
439/* Public functions for use by device drivers through struct platform_data */
440
441/**
442 * omap_device_enable - fully activate an omap_device
443 * @od: struct omap_device * to activate
444 *
445 * Do whatever is necessary for the hwmods underlying omap_device @od
446 * to be accessible and ready to operate. This generally involves
447 * enabling clocks, setting SYSCONFIG registers; and in the future may
448 * involve remuxing pins. Device drivers should call this function
449 * (through platform_data function pointers) where they would normally
450 * enable clocks, etc. Returns -EINVAL if called when the omap_device
451 * is already enabled, or passes along the return value of
452 * _omap_device_activate().
453 */
454int omap_device_enable(struct platform_device *pdev)
455{
456 int ret;
457 struct omap_device *od;
458
459 od = _find_by_pdev(pdev);
460
461 if (od->_state == OMAP_DEVICE_STATE_ENABLED) {
462 WARN(1, "omap_device: %s.%d: omap_device_enable() called from "
463 "invalid state\n", od->pdev.name, od->pdev.id);
464 return -EINVAL;
465 }
466
467 /* Enable everything if we're enabling this device from scratch */
468 if (od->_state == OMAP_DEVICE_STATE_UNKNOWN)
469 od->pm_lat_level = od->pm_lats_cnt;
470
471 ret = _omap_device_activate(od, IGNORE_WAKEUP_LAT);
472
473 od->dev_wakeup_lat = 0;
474 od->_dev_wakeup_lat_limit = INT_MAX;
475 od->_state = OMAP_DEVICE_STATE_ENABLED;
476
477 return ret;
478}
479
480/**
481 * omap_device_idle - idle an omap_device
482 * @od: struct omap_device * to idle
483 *
484 * Idle omap_device @od by calling as many .deactivate_func() entries
485 * in the omap_device's pm_lats table as is possible without exceeding
486 * the device's maximum wakeup latency limit, pm_lat_limit. Device
487 * drivers should call this function (through platform_data function
488 * pointers) where they would normally disable clocks after operations
489 * complete, etc.. Returns -EINVAL if the omap_device is not
490 * currently enabled, or passes along the return value of
491 * _omap_device_deactivate().
492 */
493int omap_device_idle(struct platform_device *pdev)
494{
495 int ret;
496 struct omap_device *od;
497
498 od = _find_by_pdev(pdev);
499
500 if (od->_state != OMAP_DEVICE_STATE_ENABLED) {
501 WARN(1, "omap_device: %s.%d: omap_device_idle() called from "
502 "invalid state\n", od->pdev.name, od->pdev.id);
503 return -EINVAL;
504 }
505
506 ret = _omap_device_deactivate(od, USE_WAKEUP_LAT);
507
508 od->_state = OMAP_DEVICE_STATE_IDLE;
509
510 return ret;
511}
512
513/**
514 * omap_device_shutdown - shut down an omap_device
515 * @od: struct omap_device * to shut down
516 *
517 * Shut down omap_device @od by calling all .deactivate_func() entries
518 * in the omap_device's pm_lats table and then shutting down all of
519 * the underlying omap_hwmods. Used when a device is being "removed"
520 * or a device driver is being unloaded. Returns -EINVAL if the
521 * omap_device is not currently enabled or idle, or passes along the
522 * return value of _omap_device_deactivate().
523 */
524int omap_device_shutdown(struct platform_device *pdev)
525{
526 int ret, i;
527 struct omap_device *od;
528 struct omap_hwmod *oh;
529
530 od = _find_by_pdev(pdev);
531
532 if (od->_state != OMAP_DEVICE_STATE_ENABLED &&
533 od->_state != OMAP_DEVICE_STATE_IDLE) {
534 WARN(1, "omap_device: %s.%d: omap_device_shutdown() called "
535 "from invalid state\n", od->pdev.name, od->pdev.id);
536 return -EINVAL;
537 }
538
539 ret = _omap_device_deactivate(od, IGNORE_WAKEUP_LAT);
540
541 for (i = 0, oh = *od->hwmods; i < od->hwmods_cnt; i++, oh++)
542 omap_hwmod_shutdown(oh);
543
544 od->_state = OMAP_DEVICE_STATE_SHUTDOWN;
545
546 return ret;
547}
548
549/**
550 * omap_device_align_pm_lat - activate/deactivate device to match wakeup lat lim
551 * @od: struct omap_device *
552 *
553 * When a device's maximum wakeup latency limit changes, call some of
554 * the .activate_func or .deactivate_func function pointers in the
555 * omap_device's pm_lats array to ensure that the device's maximum
556 * wakeup latency is less than or equal to the new latency limit.
557 * Intended to be called by OMAP PM code whenever a device's maximum
558 * wakeup latency limit changes (e.g., via
559 * omap_pm_set_dev_wakeup_lat()). Returns 0 if nothing needs to be
560 * done (e.g., if the omap_device is not currently idle, or if the
561 * wakeup latency is already current with the new limit) or passes
562 * along the return value of _omap_device_deactivate() or
563 * _omap_device_activate().
564 */
565int omap_device_align_pm_lat(struct platform_device *pdev,
566 u32 new_wakeup_lat_limit)
567{
568 int ret = -EINVAL;
569 struct omap_device *od;
570
571 od = _find_by_pdev(pdev);
572
573 if (new_wakeup_lat_limit == od->dev_wakeup_lat)
574 return 0;
575
576 od->_dev_wakeup_lat_limit = new_wakeup_lat_limit;
577
578 if (od->_state != OMAP_DEVICE_STATE_IDLE)
579 return 0;
580 else if (new_wakeup_lat_limit > od->dev_wakeup_lat)
581 ret = _omap_device_deactivate(od, USE_WAKEUP_LAT);
582 else if (new_wakeup_lat_limit < od->dev_wakeup_lat)
583 ret = _omap_device_activate(od, USE_WAKEUP_LAT);
584
585 return ret;
586}
587
588/**
589 * omap_device_get_pwrdm - return the powerdomain * associated with @od
590 * @od: struct omap_device *
591 *
592 * Return the powerdomain associated with the first underlying
593 * omap_hwmod for this omap_device. Intended for use by core OMAP PM
594 * code. Returns NULL on error or a struct powerdomain * upon
595 * success.
596 */
597struct powerdomain *omap_device_get_pwrdm(struct omap_device *od)
598{
599 /*
600 * XXX Assumes that all omap_hwmod powerdomains are identical.
601 * This may not necessarily be true. There should be a sanity
602 * check in here to WARN() if any difference appears.
603 */
604 if (!od->hwmods_cnt)
605 return NULL;
606
607 return omap_hwmod_get_pwrdm(od->hwmods[0]);
608}
609
610/*
611 * Public functions intended for use in omap_device_pm_latency
612 * .activate_func and .deactivate_func function pointers
613 */
614
615/**
616 * omap_device_enable_hwmods - call omap_hwmod_enable() on all hwmods
617 * @od: struct omap_device *od
618 *
619 * Enable all underlying hwmods. Returns 0.
620 */
621int omap_device_enable_hwmods(struct omap_device *od)
622{
623 struct omap_hwmod *oh;
624 int i;
625
626 for (i = 0, oh = *od->hwmods; i < od->hwmods_cnt; i++, oh++)
627 omap_hwmod_enable(oh);
628
629 /* XXX pass along return value here? */
630 return 0;
631}
632
633/**
634 * omap_device_idle_hwmods - call omap_hwmod_idle() on all hwmods
635 * @od: struct omap_device *od
636 *
637 * Idle all underlying hwmods. Returns 0.
638 */
639int omap_device_idle_hwmods(struct omap_device *od)
640{
641 struct omap_hwmod *oh;
642 int i;
643
644 for (i = 0, oh = *od->hwmods; i < od->hwmods_cnt; i++, oh++)
645 omap_hwmod_idle(oh);
646
647 /* XXX pass along return value here? */
648 return 0;
649}
650
651/**
652 * omap_device_disable_clocks - disable all main and interface clocks
653 * @od: struct omap_device *od
654 *
655 * Disable the main functional clock and interface clock for all of the
656 * omap_hwmods associated with the omap_device. Returns 0.
657 */
658int omap_device_disable_clocks(struct omap_device *od)
659{
660 struct omap_hwmod *oh;
661 int i;
662
663 for (i = 0, oh = *od->hwmods; i < od->hwmods_cnt; i++, oh++)
664 omap_hwmod_disable_clocks(oh);
665
666 /* XXX pass along return value here? */
667 return 0;
668}
669
670/**
671 * omap_device_enable_clocks - enable all main and interface clocks
672 * @od: struct omap_device *od
673 *
674 * Enable the main functional clock and interface clock for all of the
675 * omap_hwmods associated with the omap_device. Returns 0.
676 */
677int omap_device_enable_clocks(struct omap_device *od)
678{
679 struct omap_hwmod *oh;
680 int i;
681
682 for (i = 0, oh = *od->hwmods; i < od->hwmods_cnt; i++, oh++)
683 omap_hwmod_enable_clocks(oh);
684
685 /* XXX pass along return value here? */
686 return 0;
687}
diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c
index 5eae7876979c..925f64711c37 100644
--- a/arch/arm/plat-omap/sram.c
+++ b/arch/arm/plat-omap/sram.c
@@ -56,16 +56,16 @@
56#define SRAM_BOOTLOADER_SZ 0x80 56#define SRAM_BOOTLOADER_SZ 0x80
57#endif 57#endif
58 58
59#define OMAP24XX_VA_REQINFOPERM0 IO_ADDRESS(0x68005048) 59#define OMAP24XX_VA_REQINFOPERM0 OMAP2_IO_ADDRESS(0x68005048)
60#define OMAP24XX_VA_READPERM0 IO_ADDRESS(0x68005050) 60#define OMAP24XX_VA_READPERM0 OMAP2_IO_ADDRESS(0x68005050)
61#define OMAP24XX_VA_WRITEPERM0 IO_ADDRESS(0x68005058) 61#define OMAP24XX_VA_WRITEPERM0 OMAP2_IO_ADDRESS(0x68005058)
62 62
63#define OMAP34XX_VA_REQINFOPERM0 IO_ADDRESS(0x68012848) 63#define OMAP34XX_VA_REQINFOPERM0 OMAP2_IO_ADDRESS(0x68012848)
64#define OMAP34XX_VA_READPERM0 IO_ADDRESS(0x68012850) 64#define OMAP34XX_VA_READPERM0 OMAP2_IO_ADDRESS(0x68012850)
65#define OMAP34XX_VA_WRITEPERM0 IO_ADDRESS(0x68012858) 65#define OMAP34XX_VA_WRITEPERM0 OMAP2_IO_ADDRESS(0x68012858)
66#define OMAP34XX_VA_ADDR_MATCH2 IO_ADDRESS(0x68012880) 66#define OMAP34XX_VA_ADDR_MATCH2 OMAP2_IO_ADDRESS(0x68012880)
67#define OMAP34XX_VA_SMS_RG_ATT0 IO_ADDRESS(0x6C000048) 67#define OMAP34XX_VA_SMS_RG_ATT0 OMAP2_IO_ADDRESS(0x6C000048)
68#define OMAP34XX_VA_CONTROL_STAT IO_ADDRESS(0x480022F0) 68#define OMAP34XX_VA_CONTROL_STAT OMAP2_IO_ADDRESS(0x480022F0)
69 69
70#define GP_DEVICE 0x300 70#define GP_DEVICE 0x300
71 71
diff --git a/arch/arm/plat-pxa/dma.c b/arch/arm/plat-pxa/dma.c
index 70aeee407f7d..2975798d411f 100644
--- a/arch/arm/plat-pxa/dma.c
+++ b/arch/arm/plat-pxa/dma.c
@@ -17,22 +17,266 @@
17#include <linux/kernel.h> 17#include <linux/kernel.h>
18#include <linux/interrupt.h> 18#include <linux/interrupt.h>
19#include <linux/errno.h> 19#include <linux/errno.h>
20#include <linux/dma-mapping.h>
20 21
21#include <asm/system.h> 22#include <asm/system.h>
22#include <asm/irq.h> 23#include <asm/irq.h>
24#include <asm/memory.h>
23#include <mach/hardware.h> 25#include <mach/hardware.h>
24#include <mach/dma.h> 26#include <mach/dma.h>
25 27
28#define DMA_DEBUG_NAME "pxa_dma"
29#define DMA_MAX_REQUESTERS 64
30
26struct dma_channel { 31struct dma_channel {
27 char *name; 32 char *name;
28 pxa_dma_prio prio; 33 pxa_dma_prio prio;
29 void (*irq_handler)(int, void *); 34 void (*irq_handler)(int, void *);
30 void *data; 35 void *data;
36 spinlock_t lock;
31}; 37};
32 38
33static struct dma_channel *dma_channels; 39static struct dma_channel *dma_channels;
34static int num_dma_channels; 40static int num_dma_channels;
35 41
42/*
43 * Debug fs
44 */
45#ifdef CONFIG_DEBUG_FS
46#include <linux/debugfs.h>
47#include <linux/uaccess.h>
48#include <linux/seq_file.h>
49
50static struct dentry *dbgfs_root, *dbgfs_state, **dbgfs_chan;
51
52static int dbg_show_requester_chan(struct seq_file *s, void *p)
53{
54 int pos = 0;
55 int chan = (int)s->private;
56 int i;
57 u32 drcmr;
58
59 pos += seq_printf(s, "DMA channel %d requesters list :\n", chan);
60 for (i = 0; i < DMA_MAX_REQUESTERS; i++) {
61 drcmr = DRCMR(i);
62 if ((drcmr & DRCMR_CHLNUM) == chan)
63 pos += seq_printf(s, "\tRequester %d (MAPVLD=%d)\n", i,
64 !!(drcmr & DRCMR_MAPVLD));
65 }
66 return pos;
67}
68
69static inline int dbg_burst_from_dcmd(u32 dcmd)
70{
71 int burst = (dcmd >> 16) & 0x3;
72
73 return burst ? 4 << burst : 0;
74}
75
76static int is_phys_valid(unsigned long addr)
77{
78 return pfn_valid(__phys_to_pfn(addr));
79}
80
81#define DCSR_STR(flag) (dcsr & DCSR_##flag ? #flag" " : "")
82#define DCMD_STR(flag) (dcmd & DCMD_##flag ? #flag" " : "")
83
84static int dbg_show_descriptors(struct seq_file *s, void *p)
85{
86 int pos = 0;
87 int chan = (int)s->private;
88 int i, max_show = 20, burst, width;
89 u32 dcmd;
90 unsigned long phys_desc;
91 struct pxa_dma_desc *desc;
92 unsigned long flags;
93
94 spin_lock_irqsave(&dma_channels[chan].lock, flags);
95 phys_desc = DDADR(chan);
96
97 pos += seq_printf(s, "DMA channel %d descriptors :\n", chan);
98 pos += seq_printf(s, "[%03d] First descriptor unknown\n", 0);
99 for (i = 1; i < max_show && is_phys_valid(phys_desc); i++) {
100 desc = phys_to_virt(phys_desc);
101 dcmd = desc->dcmd;
102 burst = dbg_burst_from_dcmd(dcmd);
103 width = (1 << ((dcmd >> 14) & 0x3)) >> 1;
104
105 pos += seq_printf(s, "[%03d] Desc at %08lx(virt %p)\n",
106 i, phys_desc, desc);
107 pos += seq_printf(s, "\tDDADR = %08x\n", desc->ddadr);
108 pos += seq_printf(s, "\tDSADR = %08x\n", desc->dsadr);
109 pos += seq_printf(s, "\tDTADR = %08x\n", desc->dtadr);
110 pos += seq_printf(s, "\tDCMD = %08x (%s%s%s%s%s%s%sburst=%d"
111 " width=%d len=%d)\n",
112 dcmd,
113 DCMD_STR(INCSRCADDR), DCMD_STR(INCTRGADDR),
114 DCMD_STR(FLOWSRC), DCMD_STR(FLOWTRG),
115 DCMD_STR(STARTIRQEN), DCMD_STR(ENDIRQEN),
116 DCMD_STR(ENDIAN), burst, width,
117 dcmd & DCMD_LENGTH);
118 phys_desc = desc->ddadr;
119 }
120 if (i == max_show)
121 pos += seq_printf(s, "[%03d] Desc at %08lx ... max display reached\n",
122 i, phys_desc);
123 else
124 pos += seq_printf(s, "[%03d] Desc at %08lx is %s\n",
125 i, phys_desc, phys_desc == DDADR_STOP ?
126 "DDADR_STOP" : "invalid");
127
128 spin_unlock_irqrestore(&dma_channels[chan].lock, flags);
129 return pos;
130}
131
132static int dbg_show_chan_state(struct seq_file *s, void *p)
133{
134 int pos = 0;
135 int chan = (int)s->private;
136 u32 dcsr, dcmd;
137 int burst, width;
138 static char *str_prio[] = { "high", "normal", "low" };
139
140 dcsr = DCSR(chan);
141 dcmd = DCMD(chan);
142 burst = dbg_burst_from_dcmd(dcmd);
143 width = (1 << ((dcmd >> 14) & 0x3)) >> 1;
144
145 pos += seq_printf(s, "DMA channel %d\n", chan);
146 pos += seq_printf(s, "\tPriority : %s\n",
147 str_prio[dma_channels[chan].prio]);
148 pos += seq_printf(s, "\tUnaligned transfer bit: %s\n",
149 DALGN & (1 << chan) ? "yes" : "no");
150 pos += seq_printf(s, "\tDCSR = %08x (%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s)\n",
151 dcsr, DCSR_STR(RUN), DCSR_STR(NODESC),
152 DCSR_STR(STOPIRQEN), DCSR_STR(EORIRQEN),
153 DCSR_STR(EORJMPEN), DCSR_STR(EORSTOPEN),
154 DCSR_STR(SETCMPST), DCSR_STR(CLRCMPST),
155 DCSR_STR(CMPST), DCSR_STR(EORINTR), DCSR_STR(REQPEND),
156 DCSR_STR(STOPSTATE), DCSR_STR(ENDINTR),
157 DCSR_STR(STARTINTR), DCSR_STR(BUSERR));
158
159 pos += seq_printf(s, "\tDCMD = %08x (%s%s%s%s%s%s%sburst=%d width=%d"
160 " len=%d)\n",
161 dcmd,
162 DCMD_STR(INCSRCADDR), DCMD_STR(INCTRGADDR),
163 DCMD_STR(FLOWSRC), DCMD_STR(FLOWTRG),
164 DCMD_STR(STARTIRQEN), DCMD_STR(ENDIRQEN),
165 DCMD_STR(ENDIAN), burst, width, dcmd & DCMD_LENGTH);
166 pos += seq_printf(s, "\tDSADR = %08x\n", DSADR(chan));
167 pos += seq_printf(s, "\tDTADR = %08x\n", DTADR(chan));
168 pos += seq_printf(s, "\tDDADR = %08x\n", DDADR(chan));
169 return pos;
170}
171
172static int dbg_show_state(struct seq_file *s, void *p)
173{
174 int pos = 0;
175
176 /* basic device status */
177 pos += seq_printf(s, "DMA engine status\n");
178 pos += seq_printf(s, "\tChannel number: %d\n", num_dma_channels);
179
180 return pos;
181}
182
183#define DBGFS_FUNC_DECL(name) \
184static int dbg_open_##name(struct inode *inode, struct file *file) \
185{ \
186 return single_open(file, dbg_show_##name, inode->i_private); \
187} \
188static const struct file_operations dbg_fops_##name = { \
189 .owner = THIS_MODULE, \
190 .open = dbg_open_##name, \
191 .llseek = seq_lseek, \
192 .read = seq_read, \
193 .release = single_release, \
194}
195
196DBGFS_FUNC_DECL(state);
197DBGFS_FUNC_DECL(chan_state);
198DBGFS_FUNC_DECL(descriptors);
199DBGFS_FUNC_DECL(requester_chan);
200
201static struct dentry *pxa_dma_dbg_alloc_chan(int ch, struct dentry *chandir)
202{
203 char chan_name[11];
204 struct dentry *chan, *chan_state = NULL, *chan_descr = NULL;
205 struct dentry *chan_reqs = NULL;
206 void *dt;
207
208 scnprintf(chan_name, sizeof(chan_name), "%d", ch);
209 chan = debugfs_create_dir(chan_name, chandir);
210 dt = (void *)ch;
211
212 if (chan)
213 chan_state = debugfs_create_file("state", 0400, chan, dt,
214 &dbg_fops_chan_state);
215 if (chan_state)
216 chan_descr = debugfs_create_file("descriptors", 0400, chan, dt,
217 &dbg_fops_descriptors);
218 if (chan_descr)
219 chan_reqs = debugfs_create_file("requesters", 0400, chan, dt,
220 &dbg_fops_requester_chan);
221 if (!chan_reqs)
222 goto err_state;
223
224 return chan;
225
226err_state:
227 debugfs_remove_recursive(chan);
228 return NULL;
229}
230
231static void pxa_dma_init_debugfs(void)
232{
233 int i;
234 struct dentry *chandir;
235
236 dbgfs_root = debugfs_create_dir(DMA_DEBUG_NAME, NULL);
237 if (IS_ERR(dbgfs_root) || !dbgfs_root)
238 goto err_root;
239
240 dbgfs_state = debugfs_create_file("state", 0400, dbgfs_root, NULL,
241 &dbg_fops_state);
242 if (!dbgfs_state)
243 goto err_state;
244
245 dbgfs_chan = kmalloc(sizeof(*dbgfs_state) * num_dma_channels,
246 GFP_KERNEL);
247 if (!dbgfs_state)
248 goto err_alloc;
249
250 chandir = debugfs_create_dir("channels", dbgfs_root);
251 if (!chandir)
252 goto err_chandir;
253
254 for (i = 0; i < num_dma_channels; i++) {
255 dbgfs_chan[i] = pxa_dma_dbg_alloc_chan(i, chandir);
256 if (!dbgfs_chan[i])
257 goto err_chans;
258 }
259
260 return;
261err_chans:
262err_chandir:
263 kfree(dbgfs_chan);
264err_alloc:
265err_state:
266 debugfs_remove_recursive(dbgfs_root);
267err_root:
268 pr_err("pxa_dma: debugfs is not available\n");
269}
270
271static void __exit pxa_dma_cleanup_debugfs(void)
272{
273 debugfs_remove_recursive(dbgfs_root);
274}
275#else
276static inline void pxa_dma_init_debugfs(void) {}
277static inline void pxa_dma_cleanup_debugfs(void) {}
278#endif
279
36int pxa_request_dma (char *name, pxa_dma_prio prio, 280int pxa_request_dma (char *name, pxa_dma_prio prio,
37 void (*irq_handler)(int, void *), 281 void (*irq_handler)(int, void *),
38 void *data) 282 void *data)
@@ -71,6 +315,7 @@ int pxa_request_dma (char *name, pxa_dma_prio prio,
71 local_irq_restore(flags); 315 local_irq_restore(flags);
72 return i; 316 return i;
73} 317}
318EXPORT_SYMBOL(pxa_request_dma);
74 319
75void pxa_free_dma (int dma_ch) 320void pxa_free_dma (int dma_ch)
76{ 321{
@@ -88,24 +333,26 @@ void pxa_free_dma (int dma_ch)
88 dma_channels[dma_ch].name = NULL; 333 dma_channels[dma_ch].name = NULL;
89 local_irq_restore(flags); 334 local_irq_restore(flags);
90} 335}
336EXPORT_SYMBOL(pxa_free_dma);
91 337
92static irqreturn_t dma_irq_handler(int irq, void *dev_id) 338static irqreturn_t dma_irq_handler(int irq, void *dev_id)
93{ 339{
94 int i, dint = DINT; 340 int i, dint = DINT;
341 struct dma_channel *channel;
95 342
96 for (i = 0; i < num_dma_channels; i++) { 343 while (dint) {
97 if (dint & (1 << i)) { 344 i = __ffs(dint);
98 struct dma_channel *channel = &dma_channels[i]; 345 dint &= (dint - 1);
99 if (channel->name && channel->irq_handler) { 346 channel = &dma_channels[i];
100 channel->irq_handler(i, channel->data); 347 if (channel->name && channel->irq_handler) {
101 } else { 348 channel->irq_handler(i, channel->data);
102 /* 349 } else {
103 * IRQ for an unregistered DMA channel: 350 /*
104 * let's clear the interrupts and disable it. 351 * IRQ for an unregistered DMA channel:
105 */ 352 * let's clear the interrupts and disable it.
106 printk (KERN_WARNING "spurious IRQ for DMA channel %d\n", i); 353 */
107 DCSR(i) = DCSR_STARTINTR|DCSR_ENDINTR|DCSR_BUSERR; 354 printk (KERN_WARNING "spurious IRQ for DMA channel %d\n", i);
108 } 355 DCSR(i) = DCSR_STARTINTR|DCSR_ENDINTR|DCSR_BUSERR;
109 } 356 }
110 } 357 }
111 return IRQ_HANDLED; 358 return IRQ_HANDLED;
@@ -127,6 +374,7 @@ int __init pxa_init_dma(int irq, int num_ch)
127 for (i = 0; i < num_ch; i++) { 374 for (i = 0; i < num_ch; i++) {
128 DCSR(i) = 0; 375 DCSR(i) = 0;
129 dma_channels[i].prio = min((i & 0xf) >> 2, DMA_PRIO_LOW); 376 dma_channels[i].prio = min((i & 0xf) >> 2, DMA_PRIO_LOW);
377 spin_lock_init(&dma_channels[i].lock);
130 } 378 }
131 379
132 ret = request_irq(irq, dma_irq_handler, IRQF_DISABLED, "DMA", NULL); 380 ret = request_irq(irq, dma_irq_handler, IRQF_DISABLED, "DMA", NULL);
@@ -135,10 +383,9 @@ int __init pxa_init_dma(int irq, int num_ch)
135 kfree(dma_channels); 383 kfree(dma_channels);
136 return ret; 384 return ret;
137 } 385 }
138
139 num_dma_channels = num_ch; 386 num_dma_channels = num_ch;
387
388 pxa_dma_init_debugfs();
389
140 return 0; 390 return 0;
141} 391}
142
143EXPORT_SYMBOL(pxa_request_dma);
144EXPORT_SYMBOL(pxa_free_dma);
diff --git a/arch/arm/plat-pxa/include/plat/mfp.h b/arch/arm/plat-pxa/include/plat/mfp.h
index 64019464c8db..22086e696e8e 100644
--- a/arch/arm/plat-pxa/include/plat/mfp.h
+++ b/arch/arm/plat-pxa/include/plat/mfp.h
@@ -150,6 +150,74 @@ enum {
150 MFP_PIN_GPIO125, 150 MFP_PIN_GPIO125,
151 MFP_PIN_GPIO126, 151 MFP_PIN_GPIO126,
152 MFP_PIN_GPIO127, 152 MFP_PIN_GPIO127,
153
154 MFP_PIN_GPIO128,
155 MFP_PIN_GPIO129,
156 MFP_PIN_GPIO130,
157 MFP_PIN_GPIO131,
158 MFP_PIN_GPIO132,
159 MFP_PIN_GPIO133,
160 MFP_PIN_GPIO134,
161 MFP_PIN_GPIO135,
162 MFP_PIN_GPIO136,
163 MFP_PIN_GPIO137,
164 MFP_PIN_GPIO138,
165 MFP_PIN_GPIO139,
166 MFP_PIN_GPIO140,
167 MFP_PIN_GPIO141,
168 MFP_PIN_GPIO142,
169 MFP_PIN_GPIO143,
170 MFP_PIN_GPIO144,
171 MFP_PIN_GPIO145,
172 MFP_PIN_GPIO146,
173 MFP_PIN_GPIO147,
174 MFP_PIN_GPIO148,
175 MFP_PIN_GPIO149,
176 MFP_PIN_GPIO150,
177 MFP_PIN_GPIO151,
178 MFP_PIN_GPIO152,
179 MFP_PIN_GPIO153,
180 MFP_PIN_GPIO154,
181 MFP_PIN_GPIO155,
182 MFP_PIN_GPIO156,
183 MFP_PIN_GPIO157,
184 MFP_PIN_GPIO158,
185 MFP_PIN_GPIO159,
186 MFP_PIN_GPIO160,
187 MFP_PIN_GPIO161,
188 MFP_PIN_GPIO162,
189 MFP_PIN_GPIO163,
190 MFP_PIN_GPIO164,
191 MFP_PIN_GPIO165,
192 MFP_PIN_GPIO166,
193 MFP_PIN_GPIO167,
194 MFP_PIN_GPIO168,
195 MFP_PIN_GPIO169,
196 MFP_PIN_GPIO170,
197 MFP_PIN_GPIO171,
198 MFP_PIN_GPIO172,
199 MFP_PIN_GPIO173,
200 MFP_PIN_GPIO174,
201 MFP_PIN_GPIO175,
202 MFP_PIN_GPIO176,
203 MFP_PIN_GPIO177,
204 MFP_PIN_GPIO178,
205 MFP_PIN_GPIO179,
206 MFP_PIN_GPIO180,
207 MFP_PIN_GPIO181,
208 MFP_PIN_GPIO182,
209 MFP_PIN_GPIO183,
210 MFP_PIN_GPIO184,
211 MFP_PIN_GPIO185,
212 MFP_PIN_GPIO186,
213 MFP_PIN_GPIO187,
214 MFP_PIN_GPIO188,
215 MFP_PIN_GPIO189,
216 MFP_PIN_GPIO190,
217 MFP_PIN_GPIO191,
218
219 MFP_PIN_GPIO255 = 255,
220
153 MFP_PIN_GPIO0_2, 221 MFP_PIN_GPIO0_2,
154 MFP_PIN_GPIO1_2, 222 MFP_PIN_GPIO1_2,
155 MFP_PIN_GPIO2_2, 223 MFP_PIN_GPIO2_2,
@@ -325,8 +393,9 @@ typedef unsigned long mfp_cfg_t;
325#define MFP_PULL_LOW (0x1 << 21) 393#define MFP_PULL_LOW (0x1 << 21)
326#define MFP_PULL_HIGH (0x2 << 21) 394#define MFP_PULL_HIGH (0x2 << 21)
327#define MFP_PULL_BOTH (0x3 << 21) 395#define MFP_PULL_BOTH (0x3 << 21)
328#define MFP_PULL_MASK (0x3 << 21) 396#define MFP_PULL_FLOAT (0x4 << 21)
329#define MFP_PULL(x) (((x) >> 21) & 0x3) 397#define MFP_PULL_MASK (0x7 << 21)
398#define MFP_PULL(x) (((x) >> 21) & 0x7)
330 399
331#define MFP_CFG_DEFAULT (MFP_AF0 | MFP_DS03X | MFP_LPM_DEFAULT |\ 400#define MFP_CFG_DEFAULT (MFP_AF0 | MFP_DS03X | MFP_LPM_DEFAULT |\
332 MFP_LPM_EDGE_NONE | MFP_PULL_NONE) 401 MFP_LPM_EDGE_NONE | MFP_PULL_NONE)
diff --git a/arch/arm/plat-pxa/mfp.c b/arch/arm/plat-pxa/mfp.c
index e716c622a17c..9405d0379c85 100644
--- a/arch/arm/plat-pxa/mfp.c
+++ b/arch/arm/plat-pxa/mfp.c
@@ -77,11 +77,13 @@
77 * MFPR_PULL_LOW 1 0 1 77 * MFPR_PULL_LOW 1 0 1
78 * MFPR_PULL_HIGH 1 1 0 78 * MFPR_PULL_HIGH 1 1 0
79 * MFPR_PULL_BOTH 1 1 1 79 * MFPR_PULL_BOTH 1 1 1
80 * MFPR_PULL_FLOAT 1 0 0
80 */ 81 */
81#define MFPR_PULL_NONE (0) 82#define MFPR_PULL_NONE (0)
82#define MFPR_PULL_LOW (MFPR_PULL_SEL | MFPR_PULLDOWN_EN) 83#define MFPR_PULL_LOW (MFPR_PULL_SEL | MFPR_PULLDOWN_EN)
83#define MFPR_PULL_BOTH (MFPR_PULL_LOW | MFPR_PULLUP_EN) 84#define MFPR_PULL_BOTH (MFPR_PULL_LOW | MFPR_PULLUP_EN)
84#define MFPR_PULL_HIGH (MFPR_PULL_SEL | MFPR_PULLUP_EN) 85#define MFPR_PULL_HIGH (MFPR_PULL_SEL | MFPR_PULLUP_EN)
86#define MFPR_PULL_FLOAT (MFPR_PULL_SEL)
85 87
86/* mfp_spin_lock is used to ensure that MFP register configuration 88/* mfp_spin_lock is used to ensure that MFP register configuration
87 * (most likely a read-modify-write operation) is atomic, and that 89 * (most likely a read-modify-write operation) is atomic, and that
@@ -116,6 +118,7 @@ static const unsigned long mfpr_pull[] = {
116 MFPR_PULL_LOW, 118 MFPR_PULL_LOW,
117 MFPR_PULL_HIGH, 119 MFPR_PULL_HIGH,
118 MFPR_PULL_BOTH, 120 MFPR_PULL_BOTH,
121 MFPR_PULL_FLOAT,
119}; 122};
120 123
121/* mapping of MFP_LPM_EDGE_* definitions to MFPR_EDGE_* register bits */ 124/* mapping of MFP_LPM_EDGE_* definitions to MFPR_EDGE_* register bits */
diff --git a/arch/arm/plat-s3c/gpio.c b/arch/arm/plat-s3c/gpio.c
index 260fdc6ad685..5ff24e0f9f89 100644
--- a/arch/arm/plat-s3c/gpio.c
+++ b/arch/arm/plat-s3c/gpio.c
@@ -28,7 +28,7 @@ static __init void s3c_gpiolib_track(struct s3c_gpio_chip *chip)
28 28
29 gpn = chip->chip.base; 29 gpn = chip->chip.base;
30 for (i = 0; i < chip->chip.ngpio; i++, gpn++) { 30 for (i = 0; i < chip->chip.ngpio; i++, gpn++) {
31 BUG_ON(gpn > ARRAY_SIZE(s3c_gpios)); 31 BUG_ON(gpn >= ARRAY_SIZE(s3c_gpios));
32 s3c_gpios[gpn] = chip; 32 s3c_gpios[gpn] = chip;
33 } 33 }
34} 34}
diff --git a/arch/arm/plat-s3c64xx/dma.c b/arch/arm/plat-s3c64xx/dma.c
index 67aa93dbb69e..266a10745a85 100644
--- a/arch/arm/plat-s3c64xx/dma.c
+++ b/arch/arm/plat-s3c64xx/dma.c
@@ -345,13 +345,13 @@ int s3c2410_dma_enqueue(unsigned int channel, void *id,
345 if (!chan) 345 if (!chan)
346 return -EINVAL; 346 return -EINVAL;
347 347
348 buff = kzalloc(sizeof(struct s3c64xx_dma_buff), GFP_KERNEL); 348 buff = kzalloc(sizeof(struct s3c64xx_dma_buff), GFP_ATOMIC);
349 if (!buff) { 349 if (!buff) {
350 printk(KERN_ERR "%s: no memory for buffer\n", __func__); 350 printk(KERN_ERR "%s: no memory for buffer\n", __func__);
351 return -ENOMEM; 351 return -ENOMEM;
352 } 352 }
353 353
354 lli = dma_pool_alloc(dma_pool, GFP_KERNEL, &buff->lli_dma); 354 lli = dma_pool_alloc(dma_pool, GFP_ATOMIC, &buff->lli_dma);
355 if (!lli) { 355 if (!lli) {
356 printk(KERN_ERR "%s: no memory for lli\n", __func__); 356 printk(KERN_ERR "%s: no memory for lli\n", __func__);
357 ret = -ENOMEM; 357 ret = -ENOMEM;
@@ -697,7 +697,7 @@ static int __init s3c64xx_dma_init(void)
697 697
698 printk(KERN_INFO "%s: Registering DMA channels\n", __func__); 698 printk(KERN_INFO "%s: Registering DMA channels\n", __func__);
699 699
700 dma_pool = dma_pool_create("DMA-LLI", NULL, 32, 16, 0); 700 dma_pool = dma_pool_create("DMA-LLI", NULL, sizeof(struct pl080s_lli), 16, 0);
701 if (!dma_pool) { 701 if (!dma_pool) {
702 printk(KERN_ERR "%s: failed to create pool\n", __func__); 702 printk(KERN_ERR "%s: failed to create pool\n", __func__);
703 return -ENOMEM; 703 return -ENOMEM;
diff --git a/arch/arm/plat-s3c64xx/include/plat/dma-plat.h b/arch/arm/plat-s3c64xx/include/plat/dma-plat.h
index 0c30dd986725..8f76a1e474d6 100644
--- a/arch/arm/plat-s3c64xx/include/plat/dma-plat.h
+++ b/arch/arm/plat-s3c64xx/include/plat/dma-plat.h
@@ -26,7 +26,7 @@ struct s3c64xx_dma_buff {
26 struct s3c64xx_dma_buff *next; 26 struct s3c64xx_dma_buff *next;
27 27
28 void *pw; 28 void *pw;
29 struct pl080_lli *lli; 29 struct pl080s_lli *lli;
30 dma_addr_t lli_dma; 30 dma_addr_t lli_dma;
31}; 31};
32 32
diff --git a/arch/arm/plat-s3c64xx/include/plat/irqs.h b/arch/arm/plat-s3c64xx/include/plat/irqs.h
index 743a70094d04..7956fd3bb194 100644
--- a/arch/arm/plat-s3c64xx/include/plat/irqs.h
+++ b/arch/arm/plat-s3c64xx/include/plat/irqs.h
@@ -194,9 +194,17 @@
194 194
195#define IRQ_EINT_GROUP(group, no) (IRQ_EINT_GROUP##group##_BASE + (no)) 195#define IRQ_EINT_GROUP(group, no) (IRQ_EINT_GROUP##group##_BASE + (no))
196 196
197/* Define a group of interrupts for board-specific use (eg, for MFD
198 * interrupt controllers). */
199#define IRQ_BOARD_START (IRQ_EINT_GROUP9_BASE + IRQ_EINT_GROUP9_NR + 1)
200
201#define IRQ_BOARD_NR 16
202
203#define IRQ_BOARD_END (IRQ_BOARD_START + IRQ_BOARD_NR)
204
197/* Set the default NR_IRQS */ 205/* Set the default NR_IRQS */
198 206
199#define NR_IRQS (IRQ_EINT_GROUP9_BASE + IRQ_EINT_GROUP9_NR + 1) 207#define NR_IRQS (IRQ_BOARD_END + 1)
200 208
201#endif /* __ASM_PLAT_S3C64XX_IRQS_H */ 209#endif /* __ASM_PLAT_S3C64XX_IRQS_H */
202 210
diff --git a/arch/arm/plat-s3c64xx/s3c6400-clock.c b/arch/arm/plat-s3c64xx/s3c6400-clock.c
index febac1950d8e..9745852261e0 100644
--- a/arch/arm/plat-s3c64xx/s3c6400-clock.c
+++ b/arch/arm/plat-s3c64xx/s3c6400-clock.c
@@ -302,8 +302,8 @@ static int s3c64xx_setrate_clksrc(struct clk *clk, unsigned long rate)
302 return -EINVAL; 302 return -EINVAL;
303 303
304 val = __raw_readl(reg); 304 val = __raw_readl(reg);
305 val &= ~(0xf << sclk->shift); 305 val &= ~(0xf << sclk->divider_shift);
306 val |= (div - 1) << sclk->shift; 306 val |= (div - 1) << sclk->divider_shift;
307 __raw_writel(val, reg); 307 __raw_writel(val, reg);
308 308
309 return 0; 309 return 0;
@@ -328,6 +328,8 @@ static int s3c64xx_setparent_clksrc(struct clk *clk, struct clk *parent)
328 clksrc |= src_nr << sclk->shift; 328 clksrc |= src_nr << sclk->shift;
329 329
330 __raw_writel(clksrc, S3C_CLK_SRC); 330 __raw_writel(clksrc, S3C_CLK_SRC);
331
332 clk->parent = parent;
331 return 0; 333 return 0;
332 } 334 }
333 335
@@ -343,7 +345,7 @@ static unsigned long s3c64xx_roundrate_clksrc(struct clk *clk,
343 if (rate > parent_rate) 345 if (rate > parent_rate)
344 rate = parent_rate; 346 rate = parent_rate;
345 else { 347 else {
346 div = rate / parent_rate; 348 div = parent_rate / rate;
347 349
348 if (div == 0) 350 if (div == 0)
349 div = 1; 351 div = 1;
diff --git a/arch/arm/plat-stmp3xxx/dma.c b/arch/arm/plat-stmp3xxx/dma.c
index d2f497764dce..ef88f25fb870 100644
--- a/arch/arm/plat-stmp3xxx/dma.c
+++ b/arch/arm/plat-stmp3xxx/dma.c
@@ -264,7 +264,7 @@ int stmp3xxx_dma_make_chain(int ch, struct stmp37xx_circ_dma_chain *chain,
264 stmp3xxx_dma_free_command(ch, 264 stmp3xxx_dma_free_command(ch,
265 &descriptors 265 &descriptors
266 [i]); 266 [i]);
267 } while (i-- >= 0); 267 } while (i-- > 0);
268 } 268 }
269 return err; 269 return err;
270 } 270 }
diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types
index c8c55b469342..94be7bb6cb9a 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: Sat Sep 12 12:00:16 2009 15# Last update: Fri Sep 18 21:42:00 2009
16# 16#
17# machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number 17# machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number
18# 18#
@@ -1638,7 +1638,7 @@ mx35evb MACH_MX35EVB MX35EVB 1643
1638aml_m8050 MACH_AML_M8050 AML_M8050 1644 1638aml_m8050 MACH_AML_M8050 AML_M8050 1644
1639mx35_3ds MACH_MX35_3DS MX35_3DS 1645 1639mx35_3ds MACH_MX35_3DS MX35_3DS 1645
1640mars MACH_MARS MARS 1646 1640mars MACH_MARS MARS 1646
1641ntosd_644xa MACH_NTOSD_644XA NTOSD_644XA 1647 1641neuros_osd2 MACH_NEUROS_OSD2 NEUROS_OSD2 1647
1642badger MACH_BADGER BADGER 1648 1642badger MACH_BADGER BADGER 1648
1643trizeps4wl MACH_TRIZEPS4WL TRIZEPS4WL 1649 1643trizeps4wl MACH_TRIZEPS4WL TRIZEPS4WL 1649
1644trizeps5 MACH_TRIZEPS5 TRIZEPS5 1650 1644trizeps5 MACH_TRIZEPS5 TRIZEPS5 1650
@@ -1654,7 +1654,7 @@ vf10xx MACH_VF10XX VF10XX 1659
1654zoran43xx MACH_ZORAN43XX ZORAN43XX 1660 1654zoran43xx MACH_ZORAN43XX ZORAN43XX 1660
1655sonix926 MACH_SONIX926 SONIX926 1661 1655sonix926 MACH_SONIX926 SONIX926 1661
1656celestialsemi MACH_CELESTIALSEMI CELESTIALSEMI 1662 1656celestialsemi MACH_CELESTIALSEMI CELESTIALSEMI 1662
1657cc9m2443 MACH_CC9M2443 CC9M2443 1663 1657cc9m2443js MACH_CC9M2443JS CC9M2443JS 1663
1658tw5334 MACH_TW5334 TW5334 1664 1658tw5334 MACH_TW5334 TW5334 1664
1659omap_htcartemis MACH_HTCARTEMIS HTCARTEMIS 1665 1659omap_htcartemis MACH_HTCARTEMIS HTCARTEMIS 1665
1660nal_hlite MACH_NAL_HLITE NAL_HLITE 1666 1660nal_hlite MACH_NAL_HLITE NAL_HLITE 1666
@@ -1802,7 +1802,7 @@ ccw9p9215js MACH_CCW9P9215JS CCW9P9215JS 1811
1802rd88f5181l_ge MACH_RD88F5181L_GE RD88F5181L_GE 1812 1802rd88f5181l_ge MACH_RD88F5181L_GE RD88F5181L_GE 1812
1803sifmain MACH_SIFMAIN SIFMAIN 1813 1803sifmain MACH_SIFMAIN SIFMAIN 1813
1804sam9_l9261 MACH_SAM9_L9261 SAM9_L9261 1814 1804sam9_l9261 MACH_SAM9_L9261 SAM9_L9261 1814
1805cc9m2443js MACH_CC9M2443JS CC9M2443JS 1815 1805cc9m2443 MACH_CC9M2443 CC9M2443 1815
1806xaria300 MACH_XARIA300 XARIA300 1816 1806xaria300 MACH_XARIA300 XARIA300 1816
1807it9200 MACH_IT9200 IT9200 1817 1807it9200 MACH_IT9200 IT9200 1817
1808rd88f5181l_fxo MACH_RD88F5181L_FXO RD88F5181L_FXO 1818 1808rd88f5181l_fxo MACH_RD88F5181L_FXO RD88F5181L_FXO 1818
@@ -2409,3 +2409,15 @@ platypus MACH_PLATYPUS PLATYPUS 2422
2409pss2 MACH_PSS2 PSS2 2423 2409pss2 MACH_PSS2 PSS2 2423
2410davinci_apm150 MACH_DAVINCI_APM150 DAVINCI_APM150 2424 2410davinci_apm150 MACH_DAVINCI_APM150 DAVINCI_APM150 2424
2411str9100 MACH_STR9100 STR9100 2425 2411str9100 MACH_STR9100 STR9100 2425
2412net5big MACH_NET5BIG NET5BIG 2426
2413seabed9263 MACH_SEABED9263 SEABED9263 2427
2414mx51_m2id MACH_MX51_M2ID MX51_M2ID 2428
2415octvocplus_eb MACH_OCTVOCPLUS_EB OCTVOCPLUS_EB 2429
2416klk_firefox MACH_KLK_FIREFOX KLK_FIREFOX 2430
2417klk_wirma_module MACH_KLK_WIRMA_MODULE KLK_WIRMA_MODULE 2431
2418klk_wirma_mmi MACH_KLK_WIRMA_MMI KLK_WIRMA_MMI 2432
2419supersonic MACH_SUPERSONIC SUPERSONIC 2433
2420liberty MACH_LIBERTY LIBERTY 2434
2421mh355 MACH_MH355 MH355 2435
2422pc7802 MACH_PC7802 PC7802 2436
2423gnet_sgc MACH_GNET_SGC GNET_SGC 2437
diff --git a/arch/avr32/include/asm/mman.h b/arch/avr32/include/asm/mman.h
index 9a92b15f6a66..8eebf89f5ab1 100644
--- a/arch/avr32/include/asm/mman.h
+++ b/arch/avr32/include/asm/mman.h
@@ -1,17 +1 @@
1#ifndef __ASM_AVR32_MMAN_H__ #include <asm-generic/mman.h>
2#define __ASM_AVR32_MMAN_H__
3
4#include <asm-generic/mman-common.h>
5
6#define MAP_GROWSDOWN 0x0100 /* stack-like segment */
7#define MAP_DENYWRITE 0x0800 /* ETXTBSY */
8#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */
9#define MAP_LOCKED 0x2000 /* pages are locked */
10#define MAP_NORESERVE 0x4000 /* don't check for reservations */
11#define MAP_POPULATE 0x8000 /* populate (prefault) page tables */
12#define MAP_NONBLOCK 0x10000 /* do not block on IO */
13
14#define MCL_CURRENT 1 /* lock all current mappings */
15#define MCL_FUTURE 2 /* lock all future mappings */
16
17#endif /* __ASM_AVR32_MMAN_H__ */
diff --git a/arch/avr32/kernel/init_task.c b/arch/avr32/kernel/init_task.c
index 57ec9f2dcd95..6b2343e6fe33 100644
--- a/arch/avr32/kernel/init_task.c
+++ b/arch/avr32/kernel/init_task.c
@@ -18,9 +18,8 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
18/* 18/*
19 * Initial thread structure. Must be aligned on an 8192-byte boundary. 19 * Initial thread structure. Must be aligned on an 8192-byte boundary.
20 */ 20 */
21union thread_union init_thread_union 21union thread_union init_thread_union __init_task_data =
22 __attribute__((__section__(".data.init_task"))) = 22 { INIT_THREAD_INFO(init_task) };
23 { INIT_THREAD_INFO(init_task) };
24 23
25/* 24/*
26 * Initial task structure. 25 * Initial task structure.
diff --git a/arch/avr32/mm/init.c b/arch/avr32/mm/init.c
index e819fa69a90e..94925641e53e 100644
--- a/arch/avr32/mm/init.c
+++ b/arch/avr32/mm/init.c
@@ -24,11 +24,9 @@
24#include <asm/setup.h> 24#include <asm/setup.h>
25#include <asm/sections.h> 25#include <asm/sections.h>
26 26
27#define __page_aligned __attribute__((section(".data.page_aligned")))
28
29DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); 27DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
30 28
31pgd_t swapper_pg_dir[PTRS_PER_PGD] __page_aligned; 29pgd_t swapper_pg_dir[PTRS_PER_PGD] __page_aligned_data;
32 30
33struct page *empty_zero_page; 31struct page *empty_zero_page;
34EXPORT_SYMBOL(empty_zero_page); 32EXPORT_SYMBOL(empty_zero_page);
@@ -141,7 +139,7 @@ void __init mem_init(void)
141 139
142 printk ("Memory: %luk/%luk available (%dk kernel code, " 140 printk ("Memory: %luk/%luk available (%dk kernel code, "
143 "%dk reserved, %dk data, %dk init)\n", 141 "%dk reserved, %dk data, %dk init)\n",
144 (unsigned long)nr_free_pages() << (PAGE_SHIFT - 10), 142 nr_free_pages() << (PAGE_SHIFT - 10),
145 totalram_pages << (PAGE_SHIFT - 10), 143 totalram_pages << (PAGE_SHIFT - 10),
146 codesize >> 10, 144 codesize >> 10,
147 reservedpages << (PAGE_SHIFT - 10), 145 reservedpages << (PAGE_SHIFT - 10),
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig
index 7faa2f554ab1..9a01d445eca8 100644
--- a/arch/blackfin/Kconfig
+++ b/arch/blackfin/Kconfig
@@ -342,8 +342,9 @@ config MEM_MT48LC64M4A2FB_7E
342config MEM_MT48LC16M16A2TG_75 342config MEM_MT48LC16M16A2TG_75
343 bool 343 bool
344 depends on (BFIN533_EZKIT || BFIN561_EZKIT \ 344 depends on (BFIN533_EZKIT || BFIN561_EZKIT \
345 || BFIN533_BLUETECHNIX_CM || BFIN537_BLUETECHNIX_CM \ 345 || BFIN533_BLUETECHNIX_CM || BFIN537_BLUETECHNIX_CM_E \
346 || H8606_HVSISTEMAS || BFIN527_BLUETECHNIX_CM) 346 || BFIN537_BLUETECHNIX_CM_U || H8606_HVSISTEMAS \
347 || BFIN527_BLUETECHNIX_CM)
347 default y 348 default y
348 349
349config MEM_MT48LC32M8A2_75 350config MEM_MT48LC32M8A2_75
@@ -459,7 +460,7 @@ config VCO_MULT
459 default "45" if BFIN533_STAMP 460 default "45" if BFIN533_STAMP
460 default "20" if (BFIN537_STAMP || BFIN527_EZKIT || BFIN548_EZKIT || BFIN548_BLUETECHNIX_CM || BFIN538_EZKIT) 461 default "20" if (BFIN537_STAMP || BFIN527_EZKIT || BFIN548_EZKIT || BFIN548_BLUETECHNIX_CM || BFIN538_EZKIT)
461 default "22" if BFIN533_BLUETECHNIX_CM 462 default "22" if BFIN533_BLUETECHNIX_CM
462 default "20" if (BFIN537_BLUETECHNIX_CM || BFIN527_BLUETECHNIX_CM || BFIN561_BLUETECHNIX_CM) 463 default "20" if (BFIN537_BLUETECHNIX_CM_E || BFIN537_BLUETECHNIX_CM_U || BFIN527_BLUETECHNIX_CM || BFIN561_BLUETECHNIX_CM)
463 default "20" if BFIN561_EZKIT 464 default "20" if BFIN561_EZKIT
464 default "16" if (H8606_HVSISTEMAS || BLACKSTAMP || BFIN526_EZBRD || BFIN518F_EZBRD) 465 default "16" if (H8606_HVSISTEMAS || BLACKSTAMP || BFIN526_EZBRD || BFIN518F_EZBRD)
465 help 466 help
@@ -574,8 +575,8 @@ config MAX_VCO_HZ
574 default 400000000 if BF514 575 default 400000000 if BF514
575 default 400000000 if BF516 576 default 400000000 if BF516
576 default 400000000 if BF518 577 default 400000000 if BF518
577 default 600000000 if BF522 578 default 400000000 if BF522
578 default 400000000 if BF523 579 default 600000000 if BF523
579 default 400000000 if BF524 580 default 400000000 if BF524
580 default 600000000 if BF525 581 default 600000000 if BF525
581 default 400000000 if BF526 582 default 400000000 if BF526
@@ -647,7 +648,7 @@ config CYCLES_CLOCKSOURCE
647 writing the registers will most likely crash the kernel. 648 writing the registers will most likely crash the kernel.
648 649
649config GPTMR0_CLOCKSOURCE 650config GPTMR0_CLOCKSOURCE
650 bool "Use GPTimer0 as a clocksource (higher rating)" 651 bool "Use GPTimer0 as a clocksource"
651 select BFIN_GPTIMERS 652 select BFIN_GPTIMERS
652 depends on GENERIC_CLOCKEVENTS 653 depends on GENERIC_CLOCKEVENTS
653 depends on !TICKSOURCE_GPTMR0 654 depends on !TICKSOURCE_GPTMR0
@@ -917,10 +918,6 @@ comment "Cache Support"
917config BFIN_ICACHE 918config BFIN_ICACHE
918 bool "Enable ICACHE" 919 bool "Enable ICACHE"
919 default y 920 default y
920config BFIN_ICACHE_LOCK
921 bool "Enable Instruction Cache Locking"
922 depends on BFIN_ICACHE
923 default n
924config BFIN_EXTMEM_ICACHEABLE 921config BFIN_EXTMEM_ICACHEABLE
925 bool "Enable ICACHE for external memory" 922 bool "Enable ICACHE for external memory"
926 depends on BFIN_ICACHE 923 depends on BFIN_ICACHE
@@ -987,7 +984,7 @@ endchoice
987config BFIN_L2_DCACHEABLE 984config BFIN_L2_DCACHEABLE
988 bool "Enable DCACHE for L2 SRAM" 985 bool "Enable DCACHE for L2 SRAM"
989 depends on BFIN_DCACHE 986 depends on BFIN_DCACHE
990 depends on BF54x || BF561 987 depends on (BF54x || BF561) && !SMP
991 default n 988 default n
992choice 989choice
993 prompt "L2 SRAM DCACHE policy" 990 prompt "L2 SRAM DCACHE policy"
@@ -995,11 +992,9 @@ choice
995 default BFIN_L2_WRITEBACK 992 default BFIN_L2_WRITEBACK
996config BFIN_L2_WRITEBACK 993config BFIN_L2_WRITEBACK
997 bool "Write back" 994 bool "Write back"
998 depends on !SMP
999 995
1000config BFIN_L2_WRITETHROUGH 996config BFIN_L2_WRITETHROUGH
1001 bool "Write through" 997 bool "Write through"
1002 depends on !SMP
1003endchoice 998endchoice
1004 999
1005 1000
@@ -1154,11 +1149,12 @@ source "fs/Kconfig.binfmt"
1154endmenu 1149endmenu
1155 1150
1156menu "Power management options" 1151menu "Power management options"
1152 depends on !SMP
1153
1157source "kernel/power/Kconfig" 1154source "kernel/power/Kconfig"
1158 1155
1159config ARCH_SUSPEND_POSSIBLE 1156config ARCH_SUSPEND_POSSIBLE
1160 def_bool y 1157 def_bool y
1161 depends on !SMP
1162 1158
1163choice 1159choice
1164 prompt "Standby Power Saving Mode" 1160 prompt "Standby Power Saving Mode"
@@ -1246,6 +1242,7 @@ config PM_BFIN_WAKE_GP
1246endmenu 1242endmenu
1247 1243
1248menu "CPU Frequency scaling" 1244menu "CPU Frequency scaling"
1245 depends on !SMP
1249 1246
1250source "drivers/cpufreq/Kconfig" 1247source "drivers/cpufreq/Kconfig"
1251 1248
diff --git a/arch/blackfin/Kconfig.debug b/arch/blackfin/Kconfig.debug
index 1fc4981d486f..87f195ee2e06 100644
--- a/arch/blackfin/Kconfig.debug
+++ b/arch/blackfin/Kconfig.debug
@@ -252,4 +252,10 @@ config ACCESS_CHECK
252 252
253 Say N here to disable that check to improve the performance. 253 Say N here to disable that check to improve the performance.
254 254
255config BFIN_ISRAM_SELF_TEST
256 bool "isram boot self tests"
257 default n
258 help
259 Run some self tests of the isram driver code at boot.
260
255endmenu 261endmenu
diff --git a/arch/blackfin/Makefile b/arch/blackfin/Makefile
index 6f9533c3d752..f063b772934b 100644
--- a/arch/blackfin/Makefile
+++ b/arch/blackfin/Makefile
@@ -155,7 +155,7 @@ define archhelp
155 echo '* vmImage.gz - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage.gz)' 155 echo '* vmImage.gz - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage.gz)'
156 echo ' vmImage.lzma - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage.lzma)' 156 echo ' vmImage.lzma - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage.lzma)'
157 echo ' install - Install kernel using' 157 echo ' install - Install kernel using'
158 echo ' (your) ~/bin/$(CROSS_COMPILE)installkernel or' 158 echo ' (your) ~/bin/$(INSTALLKERNEL) or'
159 echo ' (distribution) PATH: $(CROSS_COMPILE)installkernel or' 159 echo ' (distribution) PATH: $(INSTALLKERNEL) or'
160 echo ' install to $$(INSTALL_PATH)' 160 echo ' install to $$(INSTALL_PATH)'
161endef 161endef
diff --git a/arch/blackfin/boot/install.sh b/arch/blackfin/boot/install.sh
index 9560a6b29100..e2c6e40902b7 100644
--- a/arch/blackfin/boot/install.sh
+++ b/arch/blackfin/boot/install.sh
@@ -36,9 +36,9 @@ verify "$3"
36 36
37# User may have a custom install script 37# User may have a custom install script
38 38
39if [ -x ~/bin/${CROSS_COMPILE}installkernel ]; then exec ~/bin/${CROSS_COMPILE}installkernel "$@"; fi 39if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi
40if which ${CROSS_COMPILE}installkernel >/dev/null 2>&1; then 40if which ${INSTALLKERNEL} >/dev/null 2>&1; then
41 exec ${CROSS_COMPILE}installkernel "$@" 41 exec ${INSTALLKERNEL} "$@"
42fi 42fi
43 43
44# Default install - same as make zlilo 44# Default install - same as make zlilo
diff --git a/arch/blackfin/configs/BF518F-EZBRD_defconfig b/arch/blackfin/configs/BF518F-EZBRD_defconfig
index dcfb4889559a..9905b26009e5 100644
--- a/arch/blackfin/configs/BF518F-EZBRD_defconfig
+++ b/arch/blackfin/configs/BF518F-EZBRD_defconfig
@@ -358,9 +358,9 @@ CONFIG_C_AMBEN_ALL=y
358# EBIU_AMBCTL Control 358# EBIU_AMBCTL Control
359# 359#
360CONFIG_BANK_0=0x7BB0 360CONFIG_BANK_0=0x7BB0
361CONFIG_BANK_1=0x5554 361CONFIG_BANK_1=0x7BB0
362CONFIG_BANK_2=0x7BB0 362CONFIG_BANK_2=0x7BB0
363CONFIG_BANK_3=0xFFC0 363CONFIG_BANK_3=0x99B2
364 364
365# 365#
366# Bus options (PCI, PCMCIA, EISA, MCA, ISA) 366# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
diff --git a/arch/blackfin/configs/BF526-EZBRD_defconfig b/arch/blackfin/configs/BF526-EZBRD_defconfig
index 48a3a7a9099c..9dc682088023 100644
--- a/arch/blackfin/configs/BF526-EZBRD_defconfig
+++ b/arch/blackfin/configs/BF526-EZBRD_defconfig
@@ -359,9 +359,9 @@ CONFIG_C_AMBEN_ALL=y
359# EBIU_AMBCTL Control 359# EBIU_AMBCTL Control
360# 360#
361CONFIG_BANK_0=0x7BB0 361CONFIG_BANK_0=0x7BB0
362CONFIG_BANK_1=0x5554 362CONFIG_BANK_1=0x7BB0
363CONFIG_BANK_2=0x7BB0 363CONFIG_BANK_2=0x7BB0
364CONFIG_BANK_3=0xFFC0 364CONFIG_BANK_3=0x99B2
365 365
366# 366#
367# Bus options (PCI, PCMCIA, EISA, MCA, ISA) 367# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
diff --git a/arch/blackfin/configs/BF527-EZKIT_defconfig b/arch/blackfin/configs/BF527-EZKIT_defconfig
index dd8352791daf..77e35d4baf53 100644
--- a/arch/blackfin/configs/BF527-EZKIT_defconfig
+++ b/arch/blackfin/configs/BF527-EZKIT_defconfig
@@ -363,9 +363,9 @@ CONFIG_C_AMBEN_ALL=y
363# EBIU_AMBCTL Control 363# EBIU_AMBCTL Control
364# 364#
365CONFIG_BANK_0=0x7BB0 365CONFIG_BANK_0=0x7BB0
366CONFIG_BANK_1=0x5554 366CONFIG_BANK_1=0x7BB0
367CONFIG_BANK_2=0x7BB0 367CONFIG_BANK_2=0x7BB0
368CONFIG_BANK_3=0xFFC0 368CONFIG_BANK_3=0x99B2
369 369
370# 370#
371# Bus options (PCI, PCMCIA, EISA, MCA, ISA) 371# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
diff --git a/arch/blackfin/configs/BF548-EZKIT_defconfig b/arch/blackfin/configs/BF548-EZKIT_defconfig
index b3d3cab81cfe..f773ad1155d4 100644
--- a/arch/blackfin/configs/BF548-EZKIT_defconfig
+++ b/arch/blackfin/configs/BF548-EZKIT_defconfig
@@ -400,7 +400,7 @@ CONFIG_C_AMBEN_ALL=y
400# EBIU_AMBCTL Control 400# EBIU_AMBCTL Control
401# 401#
402CONFIG_BANK_0=0x7BB0 402CONFIG_BANK_0=0x7BB0
403CONFIG_BANK_1=0x5554 403CONFIG_BANK_1=0x7BB0
404CONFIG_BANK_2=0x7BB0 404CONFIG_BANK_2=0x7BB0
405CONFIG_BANK_3=0x99B2 405CONFIG_BANK_3=0x99B2
406CONFIG_EBIU_MBSCTLVAL=0x0 406CONFIG_EBIU_MBSCTLVAL=0x0
diff --git a/arch/blackfin/include/asm/bfin-global.h b/arch/blackfin/include/asm/bfin-global.h
index e39277ea43e8..aef0594e7865 100644
--- a/arch/blackfin/include/asm/bfin-global.h
+++ b/arch/blackfin/include/asm/bfin-global.h
@@ -66,7 +66,6 @@ extern void program_IAR(void);
66 66
67extern asmlinkage void lower_to_irq14(void); 67extern asmlinkage void lower_to_irq14(void);
68extern asmlinkage void bfin_return_from_exception(void); 68extern asmlinkage void bfin_return_from_exception(void);
69extern asmlinkage void evt14_softirq(void);
70extern asmlinkage void asm_do_IRQ(unsigned int irq, struct pt_regs *regs); 69extern asmlinkage void asm_do_IRQ(unsigned int irq, struct pt_regs *regs);
71extern int bfin_internal_set_wake(unsigned int irq, unsigned int state); 70extern int bfin_internal_set_wake(unsigned int irq, unsigned int state);
72 71
@@ -100,11 +99,6 @@ extern unsigned long bfin_sic_iwr[];
100extern unsigned vr_wakeup; 99extern unsigned vr_wakeup;
101extern u16 _bfin_swrst; /* shadow for Software Reset Register (SWRST) */ 100extern u16 _bfin_swrst; /* shadow for Software Reset Register (SWRST) */
102 101
103#ifdef CONFIG_BFIN_ICACHE_LOCK
104extern void cache_grab_lock(int way);
105extern void bfin_cache_lock(int way);
106#endif
107
108#endif 102#endif
109 103
110#endif /* _BLACKFIN_H_ */ 104#endif /* _BLACKFIN_H_ */
diff --git a/arch/blackfin/include/asm/bfin5xx_spi.h b/arch/blackfin/include/asm/bfin5xx_spi.h
index aaeb4df10d57..c281c6328276 100644
--- a/arch/blackfin/include/asm/bfin5xx_spi.h
+++ b/arch/blackfin/include/asm/bfin5xx_spi.h
@@ -127,6 +127,7 @@ struct bfin5xx_spi_chip {
127 u32 cs_gpio; 127 u32 cs_gpio;
128 /* Value to send if no TX value is supplied, usually 0x0 or 0xFFFF */ 128 /* Value to send if no TX value is supplied, usually 0x0 or 0xFFFF */
129 u16 idle_tx_val; 129 u16 idle_tx_val;
130 u8 pio_interrupt; /* Enable spi data irq */
130}; 131};
131 132
132#endif /* _SPI_CHANNEL_H_ */ 133#endif /* _SPI_CHANNEL_H_ */
diff --git a/arch/blackfin/include/asm/cplb.h b/arch/blackfin/include/asm/cplb.h
index c5dacf8f8cf9..d18d16837a6d 100644
--- a/arch/blackfin/include/asm/cplb.h
+++ b/arch/blackfin/include/asm/cplb.h
@@ -125,4 +125,48 @@
125#define FAULT_USERSUPV (1 << 17) 125#define FAULT_USERSUPV (1 << 17)
126#define FAULT_CPLBBITS 0x0000ffff 126#define FAULT_CPLBBITS 0x0000ffff
127 127
128#endif /* _CPLB_H */ 128#ifndef __ASSEMBLY__
129
130static inline void _disable_cplb(u32 mmr, u32 mask)
131{
132 u32 ctrl = bfin_read32(mmr) & ~mask;
133 /* CSYNC to ensure load store ordering */
134 __builtin_bfin_csync();
135 bfin_write32(mmr, ctrl);
136 __builtin_bfin_ssync();
137}
138static inline void disable_cplb(u32 mmr, u32 mask)
139{
140 u32 ctrl = bfin_read32(mmr) & ~mask;
141 CSYNC();
142 bfin_write32(mmr, ctrl);
143 SSYNC();
144}
145#define _disable_dcplb() _disable_cplb(DMEM_CONTROL, ENDCPLB)
146#define disable_dcplb() disable_cplb(DMEM_CONTROL, ENDCPLB)
147#define _disable_icplb() _disable_cplb(IMEM_CONTROL, ENICPLB)
148#define disable_icplb() disable_cplb(IMEM_CONTROL, ENICPLB)
149
150static inline void _enable_cplb(u32 mmr, u32 mask)
151{
152 u32 ctrl = bfin_read32(mmr) | mask;
153 /* CSYNC to ensure load store ordering */
154 __builtin_bfin_csync();
155 bfin_write32(mmr, ctrl);
156 __builtin_bfin_ssync();
157}
158static inline void enable_cplb(u32 mmr, u32 mask)
159{
160 u32 ctrl = bfin_read32(mmr) | mask;
161 CSYNC();
162 bfin_write32(mmr, ctrl);
163 SSYNC();
164}
165#define _enable_dcplb() _enable_cplb(DMEM_CONTROL, ENDCPLB)
166#define enable_dcplb() enable_cplb(DMEM_CONTROL, ENDCPLB)
167#define _enable_icplb() _enable_cplb(IMEM_CONTROL, ENICPLB)
168#define enable_icplb() enable_cplb(IMEM_CONTROL, ENICPLB)
169
170#endif /* __ASSEMBLY__ */
171
172#endif /* _CPLB_H */
diff --git a/arch/blackfin/include/asm/early_printk.h b/arch/blackfin/include/asm/early_printk.h
index 110f1c1f845c..53a762b6fcd2 100644
--- a/arch/blackfin/include/asm/early_printk.h
+++ b/arch/blackfin/include/asm/early_printk.h
@@ -21,8 +21,32 @@
21 * GNU General Public License for more details. 21 * GNU General Public License for more details.
22 */ 22 */
23 23
24
25#ifndef __ASM_EARLY_PRINTK_H__
26#define __ASM_EARLY_PRINTK_H__
27
24#ifdef CONFIG_EARLY_PRINTK 28#ifdef CONFIG_EARLY_PRINTK
29/* For those that don't include it already */
30#include <linux/console.h>
31
25extern int setup_early_printk(char *); 32extern int setup_early_printk(char *);
33extern void enable_shadow_console(void);
34extern int shadow_console_enabled(void);
35extern void mark_shadow_error(void);
36extern void early_shadow_reg(unsigned long reg, unsigned int n);
37extern void early_shadow_write(struct console *con, const char *s,
38 unsigned int n) __attribute__((nonnull(2)));
39#define early_shadow_puts(str) early_shadow_write(NULL, str, strlen(str))
40#define early_shadow_stamp() \
41 do { \
42 early_shadow_puts(__FILE__ " : " __stringify(__LINE__) " ["); \
43 early_shadow_puts(__func__); \
44 early_shadow_puts("]\n"); \
45 } while (0)
26#else 46#else
27#define setup_early_printk(fmt) do { } while (0) 47#define setup_early_printk(fmt) do { } while (0)
48#define enable_shadow_console(fmt) do { } while (0)
49#define early_shadow_stamp() do { } while (0)
28#endif /* CONFIG_EARLY_PRINTK */ 50#endif /* CONFIG_EARLY_PRINTK */
51
52#endif /* __ASM_EARLY_PRINTK_H__ */
diff --git a/arch/blackfin/include/asm/elf.h b/arch/blackfin/include/asm/elf.h
index 5a87baf0659d..c823e8ebbfa1 100644
--- a/arch/blackfin/include/asm/elf.h
+++ b/arch/blackfin/include/asm/elf.h
@@ -23,7 +23,7 @@ typedef unsigned long elf_greg_t;
23#define ELF_NGREG 40 /* (sizeof(struct user_regs_struct) / sizeof(elf_greg_t)) */ 23#define ELF_NGREG 40 /* (sizeof(struct user_regs_struct) / sizeof(elf_greg_t)) */
24typedef elf_greg_t elf_gregset_t[ELF_NGREG]; 24typedef elf_greg_t elf_gregset_t[ELF_NGREG];
25 25
26typedef struct user_bfinfp_struct elf_fpregset_t; 26typedef struct { } elf_fpregset_t;
27/* 27/*
28 * This is used to ensure we don't load something for the wrong architecture. 28 * This is used to ensure we don't load something for the wrong architecture.
29 */ 29 */
diff --git a/arch/blackfin/include/asm/entry.h b/arch/blackfin/include/asm/entry.h
index ec58efc130e6..55b808fced71 100644
--- a/arch/blackfin/include/asm/entry.h
+++ b/arch/blackfin/include/asm/entry.h
@@ -36,6 +36,21 @@
36# define LOAD_IPIPE_IPEND 36# define LOAD_IPIPE_IPEND
37#endif 37#endif
38 38
39/*
40 * Workaround for anomalies 05000283 and 05000315
41 */
42#if ANOMALY_05000283 || ANOMALY_05000315
43# define ANOMALY_283_315_WORKAROUND(preg, dreg) \
44 cc = dreg == dreg; \
45 preg.h = HI(CHIPID); \
46 preg.l = LO(CHIPID); \
47 if cc jump 1f; \
48 dreg.l = W[preg]; \
491:
50#else
51# define ANOMALY_283_315_WORKAROUND(preg, dreg)
52#endif /* ANOMALY_05000283 || ANOMALY_05000315 */
53
39#ifndef CONFIG_EXACT_HWERR 54#ifndef CONFIG_EXACT_HWERR
40/* As a debugging aid - we save IPEND when DEBUG_KERNEL is on, 55/* As a debugging aid - we save IPEND when DEBUG_KERNEL is on,
41 * otherwise it is a waste of cycles. 56 * otherwise it is a waste of cycles.
@@ -88,17 +103,22 @@
88 * As you can see by the code - we actually need to do two SSYNCS - one to 103 * As you can see by the code - we actually need to do two SSYNCS - one to
89 * make sure the read/writes complete, and another to make sure the hardware 104 * make sure the read/writes complete, and another to make sure the hardware
90 * error is recognized by the core. 105 * error is recognized by the core.
106 *
107 * The extra nop before the SSYNC is to make sure we work around 05000244,
108 * since the 283/315 workaround includes a branch to the end
91 */ 109 */
92#define INTERRUPT_ENTRY(N) \ 110#define INTERRUPT_ENTRY(N) \
93 SSYNC; \
94 SSYNC; \
95 [--sp] = SYSCFG; \ 111 [--sp] = SYSCFG; \
96 [--sp] = P0; /*orig_p0*/ \ 112 [--sp] = P0; /*orig_p0*/ \
97 [--sp] = R0; /*orig_r0*/ \ 113 [--sp] = R0; /*orig_r0*/ \
98 [--sp] = (R7:0,P5:0); \ 114 [--sp] = (R7:0,P5:0); \
99 R1 = ASTAT; \ 115 R1 = ASTAT; \
116 ANOMALY_283_315_WORKAROUND(p0, r0) \
100 P0.L = LO(ILAT); \ 117 P0.L = LO(ILAT); \
101 P0.H = HI(ILAT); \ 118 P0.H = HI(ILAT); \
119 NOP; \
120 SSYNC; \
121 SSYNC; \
102 R0 = [P0]; \ 122 R0 = [P0]; \
103 CC = BITTST(R0, EVT_IVHW_P); \ 123 CC = BITTST(R0, EVT_IVHW_P); \
104 IF CC JUMP 1f; \ 124 IF CC JUMP 1f; \
@@ -118,15 +138,17 @@
118 RTI; 138 RTI;
119 139
120#define TIMER_INTERRUPT_ENTRY(N) \ 140#define TIMER_INTERRUPT_ENTRY(N) \
121 SSYNC; \
122 SSYNC; \
123 [--sp] = SYSCFG; \ 141 [--sp] = SYSCFG; \
124 [--sp] = P0; /*orig_p0*/ \ 142 [--sp] = P0; /*orig_p0*/ \
125 [--sp] = R0; /*orig_r0*/ \ 143 [--sp] = R0; /*orig_r0*/ \
126 [--sp] = (R7:0,P5:0); \ 144 [--sp] = (R7:0,P5:0); \
127 R1 = ASTAT; \ 145 R1 = ASTAT; \
146 ANOMALY_283_315_WORKAROUND(p0, r0) \
128 P0.L = LO(ILAT); \ 147 P0.L = LO(ILAT); \
129 P0.H = HI(ILAT); \ 148 P0.H = HI(ILAT); \
149 NOP; \
150 SSYNC; \
151 SSYNC; \
130 R0 = [P0]; \ 152 R0 = [P0]; \
131 CC = BITTST(R0, EVT_IVHW_P); \ 153 CC = BITTST(R0, EVT_IVHW_P); \
132 IF CC JUMP 1f; \ 154 IF CC JUMP 1f; \
diff --git a/arch/blackfin/include/asm/ftrace.h b/arch/blackfin/include/asm/ftrace.h
index 8643680f0f78..90c9b400ba6d 100644
--- a/arch/blackfin/include/asm/ftrace.h
+++ b/arch/blackfin/include/asm/ftrace.h
@@ -8,6 +8,6 @@
8#ifndef __ASM_BFIN_FTRACE_H__ 8#ifndef __ASM_BFIN_FTRACE_H__
9#define __ASM_BFIN_FTRACE_H__ 9#define __ASM_BFIN_FTRACE_H__
10 10
11#define MCOUNT_INSN_SIZE 8 /* sizeof mcount call: LINK + CALL */ 11#define MCOUNT_INSN_SIZE 6 /* sizeof "[++sp] = rets; call __mcount;" */
12 12
13#endif 13#endif
diff --git a/arch/blackfin/include/asm/ipipe.h b/arch/blackfin/include/asm/ipipe.h
index 87ba9ad399cb..4617ba66278f 100644
--- a/arch/blackfin/include/asm/ipipe.h
+++ b/arch/blackfin/include/asm/ipipe.h
@@ -145,10 +145,6 @@ void __ipipe_handle_irq(unsigned irq, struct pt_regs *regs);
145 145
146int __ipipe_get_irq_priority(unsigned irq); 146int __ipipe_get_irq_priority(unsigned irq);
147 147
148void __ipipe_stall_root_raw(void);
149
150void __ipipe_unstall_root_raw(void);
151
152void __ipipe_serial_debug(const char *fmt, ...); 148void __ipipe_serial_debug(const char *fmt, ...);
153 149
154asmlinkage void __ipipe_call_irqtail(unsigned long addr); 150asmlinkage void __ipipe_call_irqtail(unsigned long addr);
@@ -234,9 +230,6 @@ int ipipe_start_irq_thread(unsigned irq, struct irq_desc *desc);
234#define task_hijacked(p) 0 230#define task_hijacked(p) 0
235#define ipipe_trap_notify(t, r) 0 231#define ipipe_trap_notify(t, r) 0
236 232
237#define __ipipe_stall_root_raw() do { } while (0)
238#define __ipipe_unstall_root_raw() do { } while (0)
239
240#define ipipe_init_irq_threads() do { } while (0) 233#define ipipe_init_irq_threads() do { } while (0)
241#define ipipe_start_irq_thread(irq, desc) 0 234#define ipipe_start_irq_thread(irq, desc) 0
242 235
diff --git a/arch/blackfin/include/asm/irq_handler.h b/arch/blackfin/include/asm/irq_handler.h
index 139b5208f9d8..7d9e2d3bbede 100644
--- a/arch/blackfin/include/asm/irq_handler.h
+++ b/arch/blackfin/include/asm/irq_handler.h
@@ -17,6 +17,7 @@ asmlinkage void evt_evt10(void);
17asmlinkage void evt_evt11(void); 17asmlinkage void evt_evt11(void);
18asmlinkage void evt_evt12(void); 18asmlinkage void evt_evt12(void);
19asmlinkage void evt_evt13(void); 19asmlinkage void evt_evt13(void);
20asmlinkage void evt_evt14(void);
20asmlinkage void evt_soft_int1(void); 21asmlinkage void evt_soft_int1(void);
21asmlinkage void evt_system_call(void); 22asmlinkage void evt_system_call(void);
22asmlinkage void init_exception_buff(void); 23asmlinkage void init_exception_buff(void);
diff --git a/arch/blackfin/include/asm/mmu_context.h b/arch/blackfin/include/asm/mmu_context.h
index 944e29faae48..040410bb07e1 100644
--- a/arch/blackfin/include/asm/mmu_context.h
+++ b/arch/blackfin/include/asm/mmu_context.h
@@ -127,17 +127,17 @@ static inline void protect_page(struct mm_struct *mm, unsigned long addr,
127 unsigned long idx = page >> 5; 127 unsigned long idx = page >> 5;
128 unsigned long bit = 1 << (page & 31); 128 unsigned long bit = 1 << (page & 31);
129 129
130 if (flags & VM_MAYREAD) 130 if (flags & VM_READ)
131 mask[idx] |= bit; 131 mask[idx] |= bit;
132 else 132 else
133 mask[idx] &= ~bit; 133 mask[idx] &= ~bit;
134 mask += page_mask_nelts; 134 mask += page_mask_nelts;
135 if (flags & VM_MAYWRITE) 135 if (flags & VM_WRITE)
136 mask[idx] |= bit; 136 mask[idx] |= bit;
137 else 137 else
138 mask[idx] &= ~bit; 138 mask[idx] &= ~bit;
139 mask += page_mask_nelts; 139 mask += page_mask_nelts;
140 if (flags & VM_MAYEXEC) 140 if (flags & VM_EXEC)
141 mask[idx] |= bit; 141 mask[idx] |= bit;
142 else 142 else
143 mask[idx] &= ~bit; 143 mask[idx] &= ~bit;
diff --git a/arch/blackfin/include/asm/pda.h b/arch/blackfin/include/asm/pda.h
index b42555c1431c..a6f95695731d 100644
--- a/arch/blackfin/include/asm/pda.h
+++ b/arch/blackfin/include/asm/pda.h
@@ -50,6 +50,7 @@ struct blackfin_pda { /* Per-processor Data Area */
50 unsigned long ex_optr; 50 unsigned long ex_optr;
51 unsigned long ex_buf[4]; 51 unsigned long ex_buf[4];
52 unsigned long ex_imask; /* Saved imask from exception */ 52 unsigned long ex_imask; /* Saved imask from exception */
53 unsigned long ex_ipend; /* Saved IPEND from exception */
53 unsigned long *ex_stack; /* Exception stack space */ 54 unsigned long *ex_stack; /* Exception stack space */
54 55
55#ifdef ANOMALY_05000261 56#ifdef ANOMALY_05000261
@@ -60,6 +61,12 @@ struct blackfin_pda { /* Per-processor Data Area */
60 unsigned long retx; 61 unsigned long retx;
61 unsigned long seqstat; 62 unsigned long seqstat;
62 unsigned int __nmi_count; /* number of times NMI asserted on this CPU */ 63 unsigned int __nmi_count; /* number of times NMI asserted on this CPU */
64#ifdef CONFIG_DEBUG_DOUBLEFAULT
65 unsigned long dcplb_doublefault_addr;
66 unsigned long icplb_doublefault_addr;
67 unsigned long retx_doublefault;
68 unsigned long seqstat_doublefault;
69#endif
63}; 70};
64 71
65extern struct blackfin_pda cpu_pda[]; 72extern struct blackfin_pda cpu_pda[];
diff --git a/arch/blackfin/include/asm/sections.h b/arch/blackfin/include/asm/sections.h
index e7fd0ecd73f7..ae4dae1e370b 100644
--- a/arch/blackfin/include/asm/sections.h
+++ b/arch/blackfin/include/asm/sections.h
@@ -1,9 +1,6 @@
1#ifndef _BLACKFIN_SECTIONS_H 1#ifndef _BLACKFIN_SECTIONS_H
2#define _BLACKFIN_SECTIONS_H 2#define _BLACKFIN_SECTIONS_H
3 3
4/* nothing to see, move along */
5#include <asm-generic/sections.h>
6
7/* only used when MTD_UCLINUX */ 4/* only used when MTD_UCLINUX */
8extern unsigned long memory_mtd_start, memory_mtd_end, mtd_size; 5extern unsigned long memory_mtd_start, memory_mtd_end, mtd_size;
9 6
@@ -15,4 +12,39 @@ extern char _stext_l1[], _etext_l1[], _sdata_l1[], _edata_l1[], _sbss_l1[],
15 _stext_l2[], _etext_l2[], _sdata_l2[], _edata_l2[], _sbss_l2[], 12 _stext_l2[], _etext_l2[], _sdata_l2[], _edata_l2[], _sbss_l2[],
16 _ebss_l2[], _l2_lma_start[]; 13 _ebss_l2[], _l2_lma_start[];
17 14
15#include <asm/mem_map.h>
16
17/* Blackfin systems have discontinuous memory map and no virtualized memory */
18static inline int arch_is_kernel_text(unsigned long addr)
19{
20 return
21 (L1_CODE_LENGTH &&
22 addr >= (unsigned long)_stext_l1 &&
23 addr < (unsigned long)_etext_l1)
24 ||
25 (L2_LENGTH &&
26 addr >= (unsigned long)_stext_l2 &&
27 addr < (unsigned long)_etext_l2);
28}
29#define arch_is_kernel_text(addr) arch_is_kernel_text(addr)
30
31static inline int arch_is_kernel_data(unsigned long addr)
32{
33 return
34 (L1_DATA_A_LENGTH &&
35 addr >= (unsigned long)_sdata_l1 &&
36 addr < (unsigned long)_ebss_l1)
37 ||
38 (L1_DATA_B_LENGTH &&
39 addr >= (unsigned long)_sdata_b_l1 &&
40 addr < (unsigned long)_ebss_b_l1)
41 ||
42 (L2_LENGTH &&
43 addr >= (unsigned long)_sdata_l2 &&
44 addr < (unsigned long)_ebss_l2);
45}
46#define arch_is_kernel_data(addr) arch_is_kernel_data(addr)
47
48#include <asm-generic/sections.h>
49
18#endif 50#endif
diff --git a/arch/blackfin/include/asm/unistd.h b/arch/blackfin/include/asm/unistd.h
index c8e7ee4768cd..02b1529dad57 100644
--- a/arch/blackfin/include/asm/unistd.h
+++ b/arch/blackfin/include/asm/unistd.h
@@ -381,7 +381,7 @@
381#define __NR_preadv 366 381#define __NR_preadv 366
382#define __NR_pwritev 367 382#define __NR_pwritev 367
383#define __NR_rt_tgsigqueueinfo 368 383#define __NR_rt_tgsigqueueinfo 368
384#define __NR_perf_counter_open 369 384#define __NR_perf_event_open 369
385 385
386#define __NR_syscall 370 386#define __NR_syscall 370
387#define NR_syscalls __NR_syscall 387#define NR_syscalls __NR_syscall
diff --git a/arch/blackfin/kernel/Makefile b/arch/blackfin/kernel/Makefile
index 141d9281e4b0..a8ddbc8ed5af 100644
--- a/arch/blackfin/kernel/Makefile
+++ b/arch/blackfin/kernel/Makefile
@@ -26,6 +26,7 @@ obj-$(CONFIG_MODULES) += module.o
26obj-$(CONFIG_KGDB) += kgdb.o 26obj-$(CONFIG_KGDB) += kgdb.o
27obj-$(CONFIG_KGDB_TESTS) += kgdb_test.o 27obj-$(CONFIG_KGDB_TESTS) += kgdb_test.o
28obj-$(CONFIG_EARLY_PRINTK) += early_printk.o 28obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
29obj-$(CONFIG_EARLY_PRINTK) += shadow_console.o
29obj-$(CONFIG_STACKTRACE) += stacktrace.o 30obj-$(CONFIG_STACKTRACE) += stacktrace.o
30 31
31# the kgdb test puts code into L2 and without linker 32# the kgdb test puts code into L2 and without linker
diff --git a/arch/blackfin/kernel/asm-offsets.c b/arch/blackfin/kernel/asm-offsets.c
index b5df9459d6d5..f05d1b99b0ef 100644
--- a/arch/blackfin/kernel/asm-offsets.c
+++ b/arch/blackfin/kernel/asm-offsets.c
@@ -145,6 +145,7 @@ int main(void)
145 DEFINE(PDA_EXBUF, offsetof(struct blackfin_pda, ex_buf)); 145 DEFINE(PDA_EXBUF, offsetof(struct blackfin_pda, ex_buf));
146 DEFINE(PDA_EXIMASK, offsetof(struct blackfin_pda, ex_imask)); 146 DEFINE(PDA_EXIMASK, offsetof(struct blackfin_pda, ex_imask));
147 DEFINE(PDA_EXSTACK, offsetof(struct blackfin_pda, ex_stack)); 147 DEFINE(PDA_EXSTACK, offsetof(struct blackfin_pda, ex_stack));
148 DEFINE(PDA_EXIPEND, offsetof(struct blackfin_pda, ex_ipend));
148#ifdef ANOMALY_05000261 149#ifdef ANOMALY_05000261
149 DEFINE(PDA_LFRETX, offsetof(struct blackfin_pda, last_cplb_fault_retx)); 150 DEFINE(PDA_LFRETX, offsetof(struct blackfin_pda, last_cplb_fault_retx));
150#endif 151#endif
@@ -152,6 +153,12 @@ int main(void)
152 DEFINE(PDA_ICPLB, offsetof(struct blackfin_pda, icplb_fault_addr)); 153 DEFINE(PDA_ICPLB, offsetof(struct blackfin_pda, icplb_fault_addr));
153 DEFINE(PDA_RETX, offsetof(struct blackfin_pda, retx)); 154 DEFINE(PDA_RETX, offsetof(struct blackfin_pda, retx));
154 DEFINE(PDA_SEQSTAT, offsetof(struct blackfin_pda, seqstat)); 155 DEFINE(PDA_SEQSTAT, offsetof(struct blackfin_pda, seqstat));
156#ifdef CONFIG_DEBUG_DOUBLEFAULT
157 DEFINE(PDA_DF_DCPLB, offsetof(struct blackfin_pda, dcplb_doublefault_addr));
158 DEFINE(PDA_DF_ICPLB, offsetof(struct blackfin_pda, icplb_doublefault_addr));
159 DEFINE(PDA_DF_SEQSTAT, offsetof(struct blackfin_pda, seqstat_doublefault));
160 DEFINE(PDA_DF_RETX, offsetof(struct blackfin_pda, retx_doublefault));
161#endif
155#ifdef CONFIG_SMP 162#ifdef CONFIG_SMP
156 /* Inter-core lock (in L2 SRAM) */ 163 /* Inter-core lock (in L2 SRAM) */
157 DEFINE(SIZEOF_CORELOCK, sizeof(struct corelock_slot)); 164 DEFINE(SIZEOF_CORELOCK, sizeof(struct corelock_slot));
diff --git a/arch/blackfin/kernel/bfin_dma_5xx.c b/arch/blackfin/kernel/bfin_dma_5xx.c
index 9f9b82816652..384868dedac3 100644
--- a/arch/blackfin/kernel/bfin_dma_5xx.c
+++ b/arch/blackfin/kernel/bfin_dma_5xx.c
@@ -19,6 +19,7 @@
19#include <asm/cacheflush.h> 19#include <asm/cacheflush.h>
20#include <asm/dma.h> 20#include <asm/dma.h>
21#include <asm/uaccess.h> 21#include <asm/uaccess.h>
22#include <asm/early_printk.h>
22 23
23/* 24/*
24 * To make sure we work around 05000119 - we always check DMA_DONE bit, 25 * To make sure we work around 05000119 - we always check DMA_DONE bit,
@@ -146,8 +147,8 @@ EXPORT_SYMBOL(request_dma);
146 147
147int set_dma_callback(unsigned int channel, irq_handler_t callback, void *data) 148int set_dma_callback(unsigned int channel, irq_handler_t callback, void *data)
148{ 149{
149 BUG_ON(!(dma_ch[channel].chan_status != DMA_CHANNEL_FREE 150 BUG_ON(channel >= MAX_DMA_CHANNELS ||
150 && channel < MAX_DMA_CHANNELS)); 151 dma_ch[channel].chan_status == DMA_CHANNEL_FREE);
151 152
152 if (callback != NULL) { 153 if (callback != NULL) {
153 int ret; 154 int ret;
@@ -181,8 +182,8 @@ static void clear_dma_buffer(unsigned int channel)
181void free_dma(unsigned int channel) 182void free_dma(unsigned int channel)
182{ 183{
183 pr_debug("freedma() : BEGIN \n"); 184 pr_debug("freedma() : BEGIN \n");
184 BUG_ON(!(dma_ch[channel].chan_status != DMA_CHANNEL_FREE 185 BUG_ON(channel >= MAX_DMA_CHANNELS ||
185 && channel < MAX_DMA_CHANNELS)); 186 dma_ch[channel].chan_status == DMA_CHANNEL_FREE);
186 187
187 /* Halt the DMA */ 188 /* Halt the DMA */
188 disable_dma(channel); 189 disable_dma(channel);
@@ -236,6 +237,7 @@ void blackfin_dma_resume(void)
236 */ 237 */
237void __init blackfin_dma_early_init(void) 238void __init blackfin_dma_early_init(void)
238{ 239{
240 early_shadow_stamp();
239 bfin_write_MDMA_S0_CONFIG(0); 241 bfin_write_MDMA_S0_CONFIG(0);
240 bfin_write_MDMA_S1_CONFIG(0); 242 bfin_write_MDMA_S1_CONFIG(0);
241} 243}
@@ -246,6 +248,8 @@ void __init early_dma_memcpy(void *pdst, const void *psrc, size_t size)
246 unsigned long src = (unsigned long)psrc; 248 unsigned long src = (unsigned long)psrc;
247 struct dma_register *dst_ch, *src_ch; 249 struct dma_register *dst_ch, *src_ch;
248 250
251 early_shadow_stamp();
252
249 /* We assume that everything is 4 byte aligned, so include 253 /* We assume that everything is 4 byte aligned, so include
250 * a basic sanity check 254 * a basic sanity check
251 */ 255 */
@@ -300,6 +304,8 @@ void __init early_dma_memcpy(void *pdst, const void *psrc, size_t size)
300 304
301void __init early_dma_memcpy_done(void) 305void __init early_dma_memcpy_done(void)
302{ 306{
307 early_shadow_stamp();
308
303 while ((bfin_read_MDMA_S0_CONFIG() && !(bfin_read_MDMA_D0_IRQ_STATUS() & DMA_DONE)) || 309 while ((bfin_read_MDMA_S0_CONFIG() && !(bfin_read_MDMA_D0_IRQ_STATUS() & DMA_DONE)) ||
304 (bfin_read_MDMA_S1_CONFIG() && !(bfin_read_MDMA_D1_IRQ_STATUS() & DMA_DONE))) 310 (bfin_read_MDMA_S1_CONFIG() && !(bfin_read_MDMA_D1_IRQ_STATUS() & DMA_DONE)))
305 continue; 311 continue;
diff --git a/arch/blackfin/kernel/bfin_gpio.c b/arch/blackfin/kernel/bfin_gpio.c
index 6b9446271371..fc4681c0170e 100644
--- a/arch/blackfin/kernel/bfin_gpio.c
+++ b/arch/blackfin/kernel/bfin_gpio.c
@@ -722,7 +722,6 @@ void bfin_gpio_pm_hibernate_suspend(void)
722 gpio_bank_saved[bank].fer = gpio_array[bank]->port_fer; 722 gpio_bank_saved[bank].fer = gpio_array[bank]->port_fer;
723 gpio_bank_saved[bank].mux = gpio_array[bank]->port_mux; 723 gpio_bank_saved[bank].mux = gpio_array[bank]->port_mux;
724 gpio_bank_saved[bank].data = gpio_array[bank]->data; 724 gpio_bank_saved[bank].data = gpio_array[bank]->data;
725 gpio_bank_saved[bank].data = gpio_array[bank]->data;
726 gpio_bank_saved[bank].inen = gpio_array[bank]->inen; 725 gpio_bank_saved[bank].inen = gpio_array[bank]->inen;
727 gpio_bank_saved[bank].dir = gpio_array[bank]->dir_set; 726 gpio_bank_saved[bank].dir = gpio_array[bank]->dir_set;
728 } 727 }
diff --git a/arch/blackfin/kernel/cplb-mpu/Makefile b/arch/blackfin/kernel/cplb-mpu/Makefile
index 7d70d3bf3212..394d0b1b28fe 100644
--- a/arch/blackfin/kernel/cplb-mpu/Makefile
+++ b/arch/blackfin/kernel/cplb-mpu/Makefile
@@ -2,7 +2,7 @@
2# arch/blackfin/kernel/cplb-nompu/Makefile 2# arch/blackfin/kernel/cplb-nompu/Makefile
3# 3#
4 4
5obj-y := cplbinit.o cacheinit.o cplbmgr.o 5obj-y := cplbinit.o cplbmgr.o
6 6
7CFLAGS_cplbmgr.o := -ffixed-I0 -ffixed-I1 -ffixed-I2 -ffixed-I3 \ 7CFLAGS_cplbmgr.o := -ffixed-I0 -ffixed-I1 -ffixed-I2 -ffixed-I3 \
8 -ffixed-L0 -ffixed-L1 -ffixed-L2 -ffixed-L3 \ 8 -ffixed-L0 -ffixed-L1 -ffixed-L2 -ffixed-L3 \
diff --git a/arch/blackfin/kernel/cplb-mpu/cacheinit.c b/arch/blackfin/kernel/cplb-mpu/cacheinit.c
deleted file mode 100644
index d5a86c3017f7..000000000000
--- a/arch/blackfin/kernel/cplb-mpu/cacheinit.c
+++ /dev/null
@@ -1,69 +0,0 @@
1/*
2 * Copyright 2004-2007 Analog Devices Inc.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, see the file COPYING, or write
16 * to the Free Software Foundation, Inc.,
17 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20#include <linux/cpu.h>
21
22#include <asm/cacheflush.h>
23#include <asm/blackfin.h>
24#include <asm/cplb.h>
25#include <asm/cplbinit.h>
26
27#if defined(CONFIG_BFIN_ICACHE)
28void __cpuinit bfin_icache_init(struct cplb_entry *icplb_tbl)
29{
30 unsigned long ctrl;
31 int i;
32
33 SSYNC();
34 for (i = 0; i < MAX_CPLBS; i++) {
35 bfin_write32(ICPLB_ADDR0 + i * 4, icplb_tbl[i].addr);
36 bfin_write32(ICPLB_DATA0 + i * 4, icplb_tbl[i].data);
37 }
38 ctrl = bfin_read_IMEM_CONTROL();
39 ctrl |= IMC | ENICPLB;
40 bfin_write_IMEM_CONTROL(ctrl);
41 SSYNC();
42}
43#endif
44
45#if defined(CONFIG_BFIN_DCACHE)
46void __cpuinit bfin_dcache_init(struct cplb_entry *dcplb_tbl)
47{
48 unsigned long ctrl;
49 int i;
50
51 SSYNC();
52 for (i = 0; i < MAX_CPLBS; i++) {
53 bfin_write32(DCPLB_ADDR0 + i * 4, dcplb_tbl[i].addr);
54 bfin_write32(DCPLB_DATA0 + i * 4, dcplb_tbl[i].data);
55 }
56
57 ctrl = bfin_read_DMEM_CONTROL();
58
59 /*
60 * Anomaly notes:
61 * 05000287 - We implement workaround #2 - Change the DMEM_CONTROL
62 * register, so that the port preferences for DAG0 and DAG1 are set
63 * to port B
64 */
65 ctrl |= DMEM_CNTR | PORT_PREF0 | (ANOMALY_05000287 ? PORT_PREF1 : 0);
66 bfin_write_DMEM_CONTROL(ctrl);
67 SSYNC();
68}
69#endif
diff --git a/arch/blackfin/kernel/cplb-mpu/cplbmgr.c b/arch/blackfin/kernel/cplb-mpu/cplbmgr.c
index bcdfe9b0b71f..8e1e9e9e9632 100644
--- a/arch/blackfin/kernel/cplb-mpu/cplbmgr.c
+++ b/arch/blackfin/kernel/cplb-mpu/cplbmgr.c
@@ -22,6 +22,7 @@
22 22
23#include <asm/blackfin.h> 23#include <asm/blackfin.h>
24#include <asm/cacheflush.h> 24#include <asm/cacheflush.h>
25#include <asm/cplb.h>
25#include <asm/cplbinit.h> 26#include <asm/cplbinit.h>
26#include <asm/mmu_context.h> 27#include <asm/mmu_context.h>
27 28
@@ -41,46 +42,6 @@ int nr_dcplb_miss[NR_CPUS], nr_icplb_miss[NR_CPUS];
41int nr_icplb_supv_miss[NR_CPUS], nr_dcplb_prot[NR_CPUS]; 42int nr_icplb_supv_miss[NR_CPUS], nr_dcplb_prot[NR_CPUS];
42int nr_cplb_flush[NR_CPUS]; 43int nr_cplb_flush[NR_CPUS];
43 44
44static inline void disable_dcplb(void)
45{
46 unsigned long ctrl;
47 SSYNC();
48 ctrl = bfin_read_DMEM_CONTROL();
49 ctrl &= ~ENDCPLB;
50 bfin_write_DMEM_CONTROL(ctrl);
51 SSYNC();
52}
53
54static inline void enable_dcplb(void)
55{
56 unsigned long ctrl;
57 SSYNC();
58 ctrl = bfin_read_DMEM_CONTROL();
59 ctrl |= ENDCPLB;
60 bfin_write_DMEM_CONTROL(ctrl);
61 SSYNC();
62}
63
64static inline void disable_icplb(void)
65{
66 unsigned long ctrl;
67 SSYNC();
68 ctrl = bfin_read_IMEM_CONTROL();
69 ctrl &= ~ENICPLB;
70 bfin_write_IMEM_CONTROL(ctrl);
71 SSYNC();
72}
73
74static inline void enable_icplb(void)
75{
76 unsigned long ctrl;
77 SSYNC();
78 ctrl = bfin_read_IMEM_CONTROL();
79 ctrl |= ENICPLB;
80 bfin_write_IMEM_CONTROL(ctrl);
81 SSYNC();
82}
83
84/* 45/*
85 * Given the contents of the status register, return the index of the 46 * Given the contents of the status register, return the index of the
86 * CPLB that caused the fault. 47 * CPLB that caused the fault.
@@ -198,10 +159,10 @@ static noinline int dcplb_miss(unsigned int cpu)
198 dcplb_tbl[cpu][idx].addr = addr; 159 dcplb_tbl[cpu][idx].addr = addr;
199 dcplb_tbl[cpu][idx].data = d_data; 160 dcplb_tbl[cpu][idx].data = d_data;
200 161
201 disable_dcplb(); 162 _disable_dcplb();
202 bfin_write32(DCPLB_DATA0 + idx * 4, d_data); 163 bfin_write32(DCPLB_DATA0 + idx * 4, d_data);
203 bfin_write32(DCPLB_ADDR0 + idx * 4, addr); 164 bfin_write32(DCPLB_ADDR0 + idx * 4, addr);
204 enable_dcplb(); 165 _enable_dcplb();
205 166
206 return 0; 167 return 0;
207} 168}
@@ -288,10 +249,10 @@ static noinline int icplb_miss(unsigned int cpu)
288 icplb_tbl[cpu][idx].addr = addr; 249 icplb_tbl[cpu][idx].addr = addr;
289 icplb_tbl[cpu][idx].data = i_data; 250 icplb_tbl[cpu][idx].data = i_data;
290 251
291 disable_icplb(); 252 _disable_icplb();
292 bfin_write32(ICPLB_DATA0 + idx * 4, i_data); 253 bfin_write32(ICPLB_DATA0 + idx * 4, i_data);
293 bfin_write32(ICPLB_ADDR0 + idx * 4, addr); 254 bfin_write32(ICPLB_ADDR0 + idx * 4, addr);
294 enable_icplb(); 255 _enable_icplb();
295 256
296 return 0; 257 return 0;
297} 258}
@@ -319,7 +280,7 @@ static noinline int dcplb_protection_fault(unsigned int cpu)
319int cplb_hdr(int seqstat, struct pt_regs *regs) 280int cplb_hdr(int seqstat, struct pt_regs *regs)
320{ 281{
321 int cause = seqstat & 0x3f; 282 int cause = seqstat & 0x3f;
322 unsigned int cpu = smp_processor_id(); 283 unsigned int cpu = raw_smp_processor_id();
323 switch (cause) { 284 switch (cause) {
324 case 0x23: 285 case 0x23:
325 return dcplb_protection_fault(cpu); 286 return dcplb_protection_fault(cpu);
@@ -340,19 +301,19 @@ void flush_switched_cplbs(unsigned int cpu)
340 nr_cplb_flush[cpu]++; 301 nr_cplb_flush[cpu]++;
341 302
342 local_irq_save_hw(flags); 303 local_irq_save_hw(flags);
343 disable_icplb(); 304 _disable_icplb();
344 for (i = first_switched_icplb; i < MAX_CPLBS; i++) { 305 for (i = first_switched_icplb; i < MAX_CPLBS; i++) {
345 icplb_tbl[cpu][i].data = 0; 306 icplb_tbl[cpu][i].data = 0;
346 bfin_write32(ICPLB_DATA0 + i * 4, 0); 307 bfin_write32(ICPLB_DATA0 + i * 4, 0);
347 } 308 }
348 enable_icplb(); 309 _enable_icplb();
349 310
350 disable_dcplb(); 311 _disable_dcplb();
351 for (i = first_switched_dcplb; i < MAX_CPLBS; i++) { 312 for (i = first_switched_dcplb; i < MAX_CPLBS; i++) {
352 dcplb_tbl[cpu][i].data = 0; 313 dcplb_tbl[cpu][i].data = 0;
353 bfin_write32(DCPLB_DATA0 + i * 4, 0); 314 bfin_write32(DCPLB_DATA0 + i * 4, 0);
354 } 315 }
355 enable_dcplb(); 316 _enable_dcplb();
356 local_irq_restore_hw(flags); 317 local_irq_restore_hw(flags);
357 318
358} 319}
@@ -385,7 +346,7 @@ void set_mask_dcplbs(unsigned long *masks, unsigned int cpu)
385#endif 346#endif
386 } 347 }
387 348
388 disable_dcplb(); 349 _disable_dcplb();
389 for (i = first_mask_dcplb; i < first_switched_dcplb; i++) { 350 for (i = first_mask_dcplb; i < first_switched_dcplb; i++) {
390 dcplb_tbl[cpu][i].addr = addr; 351 dcplb_tbl[cpu][i].addr = addr;
391 dcplb_tbl[cpu][i].data = d_data; 352 dcplb_tbl[cpu][i].data = d_data;
@@ -393,6 +354,6 @@ void set_mask_dcplbs(unsigned long *masks, unsigned int cpu)
393 bfin_write32(DCPLB_ADDR0 + i * 4, addr); 354 bfin_write32(DCPLB_ADDR0 + i * 4, addr);
394 addr += PAGE_SIZE; 355 addr += PAGE_SIZE;
395 } 356 }
396 enable_dcplb(); 357 _enable_dcplb();
397 local_irq_restore_hw(flags); 358 local_irq_restore_hw(flags);
398} 359}
diff --git a/arch/blackfin/kernel/cplb-nompu/Makefile b/arch/blackfin/kernel/cplb-nompu/Makefile
index 7d70d3bf3212..394d0b1b28fe 100644
--- a/arch/blackfin/kernel/cplb-nompu/Makefile
+++ b/arch/blackfin/kernel/cplb-nompu/Makefile
@@ -2,7 +2,7 @@
2# arch/blackfin/kernel/cplb-nompu/Makefile 2# arch/blackfin/kernel/cplb-nompu/Makefile
3# 3#
4 4
5obj-y := cplbinit.o cacheinit.o cplbmgr.o 5obj-y := cplbinit.o cplbmgr.o
6 6
7CFLAGS_cplbmgr.o := -ffixed-I0 -ffixed-I1 -ffixed-I2 -ffixed-I3 \ 7CFLAGS_cplbmgr.o := -ffixed-I0 -ffixed-I1 -ffixed-I2 -ffixed-I3 \
8 -ffixed-L0 -ffixed-L1 -ffixed-L2 -ffixed-L3 \ 8 -ffixed-L0 -ffixed-L1 -ffixed-L2 -ffixed-L3 \
diff --git a/arch/blackfin/kernel/cplb-nompu/cacheinit.c b/arch/blackfin/kernel/cplb-nompu/cacheinit.c
deleted file mode 100644
index d5a86c3017f7..000000000000
--- a/arch/blackfin/kernel/cplb-nompu/cacheinit.c
+++ /dev/null
@@ -1,69 +0,0 @@
1/*
2 * Copyright 2004-2007 Analog Devices Inc.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, see the file COPYING, or write
16 * to the Free Software Foundation, Inc.,
17 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20#include <linux/cpu.h>
21
22#include <asm/cacheflush.h>
23#include <asm/blackfin.h>
24#include <asm/cplb.h>
25#include <asm/cplbinit.h>
26
27#if defined(CONFIG_BFIN_ICACHE)
28void __cpuinit bfin_icache_init(struct cplb_entry *icplb_tbl)
29{
30 unsigned long ctrl;
31 int i;
32
33 SSYNC();
34 for (i = 0; i < MAX_CPLBS; i++) {
35 bfin_write32(ICPLB_ADDR0 + i * 4, icplb_tbl[i].addr);
36 bfin_write32(ICPLB_DATA0 + i * 4, icplb_tbl[i].data);
37 }
38 ctrl = bfin_read_IMEM_CONTROL();
39 ctrl |= IMC | ENICPLB;
40 bfin_write_IMEM_CONTROL(ctrl);
41 SSYNC();
42}
43#endif
44
45#if defined(CONFIG_BFIN_DCACHE)
46void __cpuinit bfin_dcache_init(struct cplb_entry *dcplb_tbl)
47{
48 unsigned long ctrl;
49 int i;
50
51 SSYNC();
52 for (i = 0; i < MAX_CPLBS; i++) {
53 bfin_write32(DCPLB_ADDR0 + i * 4, dcplb_tbl[i].addr);
54 bfin_write32(DCPLB_DATA0 + i * 4, dcplb_tbl[i].data);
55 }
56
57 ctrl = bfin_read_DMEM_CONTROL();
58
59 /*
60 * Anomaly notes:
61 * 05000287 - We implement workaround #2 - Change the DMEM_CONTROL
62 * register, so that the port preferences for DAG0 and DAG1 are set
63 * to port B
64 */
65 ctrl |= DMEM_CNTR | PORT_PREF0 | (ANOMALY_05000287 ? PORT_PREF1 : 0);
66 bfin_write_DMEM_CONTROL(ctrl);
67 SSYNC();
68}
69#endif
diff --git a/arch/blackfin/kernel/cplb-nompu/cplbinit.c b/arch/blackfin/kernel/cplb-nompu/cplbinit.c
index 685f160a5a36..5d8ad503f82a 100644
--- a/arch/blackfin/kernel/cplb-nompu/cplbinit.c
+++ b/arch/blackfin/kernel/cplb-nompu/cplbinit.c
@@ -36,7 +36,7 @@ int first_switched_icplb PDT_ATTR;
36int first_switched_dcplb PDT_ATTR; 36int first_switched_dcplb PDT_ATTR;
37 37
38struct cplb_boundary dcplb_bounds[9] PDT_ATTR; 38struct cplb_boundary dcplb_bounds[9] PDT_ATTR;
39struct cplb_boundary icplb_bounds[7] PDT_ATTR; 39struct cplb_boundary icplb_bounds[9] PDT_ATTR;
40 40
41int icplb_nr_bounds PDT_ATTR; 41int icplb_nr_bounds PDT_ATTR;
42int dcplb_nr_bounds PDT_ATTR; 42int dcplb_nr_bounds PDT_ATTR;
@@ -167,14 +167,21 @@ void __init generate_cplb_tables_all(void)
167 icplb_bounds[i_i++].data = (reserved_mem_icache_on ? 167 icplb_bounds[i_i++].data = (reserved_mem_icache_on ?
168 SDRAM_IGENERIC : SDRAM_INON_CHBL); 168 SDRAM_IGENERIC : SDRAM_INON_CHBL);
169 } 169 }
170 /* Addressing hole up to the async bank. */
171 icplb_bounds[i_i].eaddr = ASYNC_BANK0_BASE;
172 icplb_bounds[i_i++].data = 0;
173 /* ASYNC banks. */
174 icplb_bounds[i_i].eaddr = ASYNC_BANK3_BASE + ASYNC_BANK3_SIZE;
175 icplb_bounds[i_i++].data = SDRAM_EBIU;
170 /* Addressing hole up to BootROM. */ 176 /* Addressing hole up to BootROM. */
171 icplb_bounds[i_i].eaddr = BOOT_ROM_START; 177 icplb_bounds[i_i].eaddr = BOOT_ROM_START;
172 icplb_bounds[i_i++].data = 0; 178 icplb_bounds[i_i++].data = 0;
173 /* BootROM -- largest one should be less than 1 meg. */ 179 /* BootROM -- largest one should be less than 1 meg. */
174 icplb_bounds[i_i].eaddr = BOOT_ROM_START + (1 * 1024 * 1024); 180 icplb_bounds[i_i].eaddr = BOOT_ROM_START + (1 * 1024 * 1024);
175 icplb_bounds[i_i++].data = SDRAM_IGENERIC; 181 icplb_bounds[i_i++].data = SDRAM_IGENERIC;
182
176 if (L2_LENGTH) { 183 if (L2_LENGTH) {
177 /* Addressing hole up to L2 SRAM, including the async bank. */ 184 /* Addressing hole up to L2 SRAM. */
178 icplb_bounds[i_i].eaddr = L2_START; 185 icplb_bounds[i_i].eaddr = L2_START;
179 icplb_bounds[i_i++].data = 0; 186 icplb_bounds[i_i++].data = 0;
180 /* L2 SRAM. */ 187 /* L2 SRAM. */
diff --git a/arch/blackfin/kernel/cplb-nompu/cplbmgr.c b/arch/blackfin/kernel/cplb-nompu/cplbmgr.c
index 12b030842fdb..d9ea46c6e41a 100644
--- a/arch/blackfin/kernel/cplb-nompu/cplbmgr.c
+++ b/arch/blackfin/kernel/cplb-nompu/cplbmgr.c
@@ -48,36 +48,13 @@ int nr_cplb_flush[NR_CPUS], nr_dcplb_prot[NR_CPUS];
48#define MGR_ATTR 48#define MGR_ATTR
49#endif 49#endif
50 50
51/*
52 * We're in an exception handler. The normal cli nop nop workaround
53 * isn't going to do very much, as the only thing that can interrupt
54 * us is an NMI, and the cli isn't going to stop that.
55 */
56#define NOWA_SSYNC __asm__ __volatile__ ("ssync;")
57
58/* Anomaly handlers provide SSYNCs, so avoid extra if anomaly is present */
59#if ANOMALY_05000125
60
61#define bfin_write_DMEM_CONTROL_SSYNC(v) bfin_write_DMEM_CONTROL(v)
62#define bfin_write_IMEM_CONTROL_SSYNC(v) bfin_write_IMEM_CONTROL(v)
63
64#else
65
66#define bfin_write_DMEM_CONTROL_SSYNC(v) \
67 do { NOWA_SSYNC; bfin_write_DMEM_CONTROL(v); NOWA_SSYNC; } while (0)
68#define bfin_write_IMEM_CONTROL_SSYNC(v) \
69 do { NOWA_SSYNC; bfin_write_IMEM_CONTROL(v); NOWA_SSYNC; } while (0)
70
71#endif
72
73static inline void write_dcplb_data(int cpu, int idx, unsigned long data, 51static inline void write_dcplb_data(int cpu, int idx, unsigned long data,
74 unsigned long addr) 52 unsigned long addr)
75{ 53{
76 unsigned long ctrl = bfin_read_DMEM_CONTROL(); 54 _disable_dcplb();
77 bfin_write_DMEM_CONTROL_SSYNC(ctrl & ~ENDCPLB);
78 bfin_write32(DCPLB_DATA0 + idx * 4, data); 55 bfin_write32(DCPLB_DATA0 + idx * 4, data);
79 bfin_write32(DCPLB_ADDR0 + idx * 4, addr); 56 bfin_write32(DCPLB_ADDR0 + idx * 4, addr);
80 bfin_write_DMEM_CONTROL_SSYNC(ctrl); 57 _enable_dcplb();
81 58
82#ifdef CONFIG_CPLB_INFO 59#ifdef CONFIG_CPLB_INFO
83 dcplb_tbl[cpu][idx].addr = addr; 60 dcplb_tbl[cpu][idx].addr = addr;
@@ -88,12 +65,10 @@ static inline void write_dcplb_data(int cpu, int idx, unsigned long data,
88static inline void write_icplb_data(int cpu, int idx, unsigned long data, 65static inline void write_icplb_data(int cpu, int idx, unsigned long data,
89 unsigned long addr) 66 unsigned long addr)
90{ 67{
91 unsigned long ctrl = bfin_read_IMEM_CONTROL(); 68 _disable_icplb();
92
93 bfin_write_IMEM_CONTROL_SSYNC(ctrl & ~ENICPLB);
94 bfin_write32(ICPLB_DATA0 + idx * 4, data); 69 bfin_write32(ICPLB_DATA0 + idx * 4, data);
95 bfin_write32(ICPLB_ADDR0 + idx * 4, addr); 70 bfin_write32(ICPLB_ADDR0 + idx * 4, addr);
96 bfin_write_IMEM_CONTROL_SSYNC(ctrl); 71 _enable_icplb();
97 72
98#ifdef CONFIG_CPLB_INFO 73#ifdef CONFIG_CPLB_INFO
99 icplb_tbl[cpu][idx].addr = addr; 74 icplb_tbl[cpu][idx].addr = addr;
@@ -227,7 +202,7 @@ MGR_ATTR static int dcplb_miss(int cpu)
227MGR_ATTR int cplb_hdr(int seqstat, struct pt_regs *regs) 202MGR_ATTR int cplb_hdr(int seqstat, struct pt_regs *regs)
228{ 203{
229 int cause = seqstat & 0x3f; 204 int cause = seqstat & 0x3f;
230 unsigned int cpu = smp_processor_id(); 205 unsigned int cpu = raw_smp_processor_id();
231 switch (cause) { 206 switch (cause) {
232 case VEC_CPLB_I_M: 207 case VEC_CPLB_I_M:
233 return icplb_miss(cpu); 208 return icplb_miss(cpu);
diff --git a/arch/blackfin/kernel/early_printk.c b/arch/blackfin/kernel/early_printk.c
index 2ab56811841c..931c78b5ea1f 100644
--- a/arch/blackfin/kernel/early_printk.c
+++ b/arch/blackfin/kernel/early_printk.c
@@ -27,6 +27,7 @@
27#include <linux/serial_core.h> 27#include <linux/serial_core.h>
28#include <linux/console.h> 28#include <linux/console.h>
29#include <linux/string.h> 29#include <linux/string.h>
30#include <linux/reboot.h>
30#include <asm/blackfin.h> 31#include <asm/blackfin.h>
31#include <asm/irq_handler.h> 32#include <asm/irq_handler.h>
32#include <asm/early_printk.h> 33#include <asm/early_printk.h>
@@ -181,6 +182,22 @@ asmlinkage void __init init_early_exception_vectors(void)
181 u32 evt; 182 u32 evt;
182 SSYNC(); 183 SSYNC();
183 184
185 /*
186 * This starts up the shadow buffer, incase anything crashes before
187 * setup arch
188 */
189 mark_shadow_error();
190 early_shadow_puts(linux_banner);
191 early_shadow_stamp();
192
193 if (CPUID != bfin_cpuid()) {
194 early_shadow_puts("Running on wrong machine type, expected");
195 early_shadow_reg(CPUID, 16);
196 early_shadow_puts(", but running on");
197 early_shadow_reg(bfin_cpuid(), 16);
198 early_shadow_puts("\n");
199 }
200
184 /* cannot program in software: 201 /* cannot program in software:
185 * evt0 - emulation (jtag) 202 * evt0 - emulation (jtag)
186 * evt1 - reset 203 * evt1 - reset
@@ -199,6 +216,7 @@ asmlinkage void __init init_early_exception_vectors(void)
199 216
200} 217}
201 218
219__attribute__((__noreturn__))
202asmlinkage void __init early_trap_c(struct pt_regs *fp, void *retaddr) 220asmlinkage void __init early_trap_c(struct pt_regs *fp, void *retaddr)
203{ 221{
204 /* This can happen before the uart is initialized, so initialize 222 /* This can happen before the uart is initialized, so initialize
@@ -210,10 +228,58 @@ asmlinkage void __init early_trap_c(struct pt_regs *fp, void *retaddr)
210 if (likely(early_console == NULL) && CPUID == bfin_cpuid()) 228 if (likely(early_console == NULL) && CPUID == bfin_cpuid())
211 setup_early_printk(DEFAULT_EARLY_PORT); 229 setup_early_printk(DEFAULT_EARLY_PORT);
212 230
213 printk(KERN_EMERG "Early panic\n"); 231 if (!shadow_console_enabled()) {
214 dump_bfin_mem(fp); 232 /* crap - we crashed before setup_arch() */
215 show_regs(fp); 233 early_shadow_puts("panic before setup_arch\n");
216 dump_bfin_trace_buffer(); 234 early_shadow_puts("IPEND:");
235 early_shadow_reg(fp->ipend, 16);
236 if (fp->seqstat & SEQSTAT_EXCAUSE) {
237 early_shadow_puts("\nEXCAUSE:");
238 early_shadow_reg(fp->seqstat & SEQSTAT_EXCAUSE, 8);
239 }
240 if (fp->seqstat & SEQSTAT_HWERRCAUSE) {
241 early_shadow_puts("\nHWERRCAUSE:");
242 early_shadow_reg(
243 (fp->seqstat & SEQSTAT_HWERRCAUSE) >> 14, 8);
244 }
245 early_shadow_puts("\nErr @");
246 if (fp->ipend & EVT_EVX)
247 early_shadow_reg(fp->retx, 32);
248 else
249 early_shadow_reg(fp->pc, 32);
250#ifdef CONFIG_DEBUG_BFIN_HWTRACE_ON
251 early_shadow_puts("\nTrace:");
252 if (likely(bfin_read_TBUFSTAT() & TBUFCNT)) {
253 while (bfin_read_TBUFSTAT() & TBUFCNT) {
254 early_shadow_puts("\nT :");
255 early_shadow_reg(bfin_read_TBUF(), 32);
256 early_shadow_puts("\n S :");
257 early_shadow_reg(bfin_read_TBUF(), 32);
258 }
259 }
260#endif
261 early_shadow_puts("\nUse bfin-elf-addr2line to determine "
262 "function names\n");
263 /*
264 * We should panic(), but we can't - since panic calls printk,
265 * and printk uses memcpy.
266 * we want to reboot, but if the machine type is different,
267 * can't due to machine specific reboot sequences
268 */
269 if (CPUID == bfin_cpuid()) {
270 early_shadow_puts("Trying to restart\n");
271 machine_restart("");
272 }
273
274 early_shadow_puts("Halting, since it is not safe to restart\n");
275 while (1)
276 asm volatile ("EMUEXCPT; IDLE;\n");
277
278 } else {
279 printk(KERN_EMERG "Early panic\n");
280 show_regs(fp);
281 dump_bfin_trace_buffer();
282 }
217 283
218 panic("Died early"); 284 panic("Died early");
219} 285}
diff --git a/arch/blackfin/kernel/entry.S b/arch/blackfin/kernel/entry.S
index a9cfba9946b5..3f8769b7db54 100644
--- a/arch/blackfin/kernel/entry.S
+++ b/arch/blackfin/kernel/entry.S
@@ -43,8 +43,28 @@
43 43
44ENTRY(_ret_from_fork) 44ENTRY(_ret_from_fork)
45#ifdef CONFIG_IPIPE 45#ifdef CONFIG_IPIPE
46 [--sp] = reti; /* IRQs on. */ 46 /*
47 SP += 4; 47 * Hw IRQs are off on entry, and we don't want the scheduling tail
48 * code to starve high priority domains from interrupts while it
49 * runs. Therefore we first stall the root stage to have the
50 * virtual interrupt state reflect IMASK.
51 */
52 p0.l = ___ipipe_root_status;
53 p0.h = ___ipipe_root_status;
54 r4 = [p0];
55 bitset(r4, 0);
56 [p0] = r4;
57 /*
58 * Then we may enable hw IRQs, allowing preemption from high
59 * priority domains. schedule_tail() will do local_irq_enable()
60 * since Blackfin does not define __ARCH_WANT_UNLOCKED_CTXSW, so
61 * there is no need to unstall the root domain by ourselves
62 * afterwards.
63 */
64 p0.l = _bfin_irq_flags;
65 p0.h = _bfin_irq_flags;
66 r4 = [p0];
67 sti r4;
48#endif /* CONFIG_IPIPE */ 68#endif /* CONFIG_IPIPE */
49 SP += -12; 69 SP += -12;
50 call _schedule_tail; 70 call _schedule_tail;
diff --git a/arch/blackfin/kernel/ftrace-entry.S b/arch/blackfin/kernel/ftrace-entry.S
index 6980b7a0615d..76dd4fbcd17a 100644
--- a/arch/blackfin/kernel/ftrace-entry.S
+++ b/arch/blackfin/kernel/ftrace-entry.S
@@ -17,8 +17,8 @@
17 * only one we can blow away. With pointer registers, we have P0-P2. 17 * only one we can blow away. With pointer registers, we have P0-P2.
18 * 18 *
19 * Upon entry, the RETS will point to the top of the current profiled 19 * Upon entry, the RETS will point to the top of the current profiled
20 * function. And since GCC setup the frame for us, the previous function 20 * function. And since GCC pushed the previous RETS for us, the previous
21 * will be waiting there. mmmm pie. 21 * function will be waiting there. mmmm pie.
22 */ 22 */
23ENTRY(__mcount) 23ENTRY(__mcount)
24 /* save third function arg early so we can do testing below */ 24 /* save third function arg early so we can do testing below */
@@ -70,14 +70,14 @@ ENTRY(__mcount)
70 /* setup the tracer function */ 70 /* setup the tracer function */
71 p0 = r3; 71 p0 = r3;
72 72
73 /* tracer(ulong frompc, ulong selfpc): 73 /* function_trace_call(unsigned long ip, unsigned long parent_ip):
74 * frompc: the pc that did the call to ... 74 * ip: this point was called by ...
75 * selfpc: ... this location 75 * parent_ip: ... this function
76 * the selfpc itself will need adjusting for the mcount call 76 * the ip itself will need adjusting for the mcount call
77 */ 77 */
78 r1 = rets; 78 r0 = rets;
79 r0 = [fp + 4]; 79 r1 = [sp + 16]; /* skip the 4 local regs on stack */
80 r1 += -MCOUNT_INSN_SIZE; 80 r0 += -MCOUNT_INSN_SIZE;
81 81
82 /* call the tracer */ 82 /* call the tracer */
83 call (p0); 83 call (p0);
@@ -106,9 +106,10 @@ ENTRY(_ftrace_graph_caller)
106 [--sp] = r1; 106 [--sp] = r1;
107 [--sp] = rets; 107 [--sp] = rets;
108 108
109 r0 = fp; 109 /* prepare_ftrace_return(unsigned long *parent, unsigned long self_addr) */
110 r0 = sp;
110 r1 = rets; 111 r1 = rets;
111 r0 += 4; 112 r0 += 16; /* skip the 4 local regs on stack */
112 r1 += -MCOUNT_INSN_SIZE; 113 r1 += -MCOUNT_INSN_SIZE;
113 call _prepare_ftrace_return; 114 call _prepare_ftrace_return;
114 115
diff --git a/arch/blackfin/kernel/ftrace.c b/arch/blackfin/kernel/ftrace.c
index 905bfc40a00b..f2c85ac6f2da 100644
--- a/arch/blackfin/kernel/ftrace.c
+++ b/arch/blackfin/kernel/ftrace.c
@@ -24,7 +24,7 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr)
24 if (unlikely(atomic_read(&current->tracing_graph_pause))) 24 if (unlikely(atomic_read(&current->tracing_graph_pause)))
25 return; 25 return;
26 26
27 if (ftrace_push_return_trace(*parent, self_addr, &trace.depth) == -EBUSY) 27 if (ftrace_push_return_trace(*parent, self_addr, &trace.depth, 0) == -EBUSY)
28 return; 28 return;
29 29
30 trace.func = self_addr; 30 trace.func = self_addr;
diff --git a/arch/blackfin/kernel/ipipe.c b/arch/blackfin/kernel/ipipe.c
index b8d22034b9a6..5d7382396dc0 100644
--- a/arch/blackfin/kernel/ipipe.c
+++ b/arch/blackfin/kernel/ipipe.c
@@ -30,10 +30,10 @@
30#include <linux/slab.h> 30#include <linux/slab.h>
31#include <linux/errno.h> 31#include <linux/errno.h>
32#include <linux/kthread.h> 32#include <linux/kthread.h>
33#include <asm/unistd.h> 33#include <linux/unistd.h>
34#include <linux/io.h>
34#include <asm/system.h> 35#include <asm/system.h>
35#include <asm/atomic.h> 36#include <asm/atomic.h>
36#include <asm/io.h>
37 37
38DEFINE_PER_CPU(struct pt_regs, __ipipe_tick_regs); 38DEFINE_PER_CPU(struct pt_regs, __ipipe_tick_regs);
39 39
@@ -90,6 +90,7 @@ void __ipipe_handle_irq(unsigned irq, struct pt_regs *regs)
90 struct ipipe_percpu_domain_data *p = ipipe_root_cpudom_ptr(); 90 struct ipipe_percpu_domain_data *p = ipipe_root_cpudom_ptr();
91 struct ipipe_domain *this_domain, *next_domain; 91 struct ipipe_domain *this_domain, *next_domain;
92 struct list_head *head, *pos; 92 struct list_head *head, *pos;
93 struct ipipe_irqdesc *idesc;
93 int m_ack, s = -1; 94 int m_ack, s = -1;
94 95
95 /* 96 /*
@@ -100,17 +101,20 @@ void __ipipe_handle_irq(unsigned irq, struct pt_regs *regs)
100 */ 101 */
101 m_ack = (regs == NULL || irq == IRQ_SYSTMR || irq == IRQ_CORETMR); 102 m_ack = (regs == NULL || irq == IRQ_SYSTMR || irq == IRQ_CORETMR);
102 this_domain = __ipipe_current_domain; 103 this_domain = __ipipe_current_domain;
104 idesc = &this_domain->irqs[irq];
103 105
104 if (unlikely(test_bit(IPIPE_STICKY_FLAG, &this_domain->irqs[irq].control))) 106 if (unlikely(test_bit(IPIPE_STICKY_FLAG, &idesc->control)))
105 head = &this_domain->p_link; 107 head = &this_domain->p_link;
106 else { 108 else {
107 head = __ipipe_pipeline.next; 109 head = __ipipe_pipeline.next;
108 next_domain = list_entry(head, struct ipipe_domain, p_link); 110 next_domain = list_entry(head, struct ipipe_domain, p_link);
109 if (likely(test_bit(IPIPE_WIRED_FLAG, &next_domain->irqs[irq].control))) { 111 idesc = &next_domain->irqs[irq];
110 if (!m_ack && next_domain->irqs[irq].acknowledge != NULL) 112 if (likely(test_bit(IPIPE_WIRED_FLAG, &idesc->control))) {
111 next_domain->irqs[irq].acknowledge(irq, irq_to_desc(irq)); 113 if (!m_ack && idesc->acknowledge != NULL)
114 idesc->acknowledge(irq, irq_to_desc(irq));
112 if (test_bit(IPIPE_SYNCDEFER_FLAG, &p->status)) 115 if (test_bit(IPIPE_SYNCDEFER_FLAG, &p->status))
113 s = __test_and_set_bit(IPIPE_STALL_FLAG, &p->status); 116 s = __test_and_set_bit(IPIPE_STALL_FLAG,
117 &p->status);
114 __ipipe_dispatch_wired(next_domain, irq); 118 __ipipe_dispatch_wired(next_domain, irq);
115 goto out; 119 goto out;
116 } 120 }
@@ -121,14 +125,15 @@ void __ipipe_handle_irq(unsigned irq, struct pt_regs *regs)
121 pos = head; 125 pos = head;
122 while (pos != &__ipipe_pipeline) { 126 while (pos != &__ipipe_pipeline) {
123 next_domain = list_entry(pos, struct ipipe_domain, p_link); 127 next_domain = list_entry(pos, struct ipipe_domain, p_link);
124 if (test_bit(IPIPE_HANDLE_FLAG, &next_domain->irqs[irq].control)) { 128 idesc = &next_domain->irqs[irq];
129 if (test_bit(IPIPE_HANDLE_FLAG, &idesc->control)) {
125 __ipipe_set_irq_pending(next_domain, irq); 130 __ipipe_set_irq_pending(next_domain, irq);
126 if (!m_ack && next_domain->irqs[irq].acknowledge != NULL) { 131 if (!m_ack && idesc->acknowledge != NULL) {
127 next_domain->irqs[irq].acknowledge(irq, irq_to_desc(irq)); 132 idesc->acknowledge(irq, irq_to_desc(irq));
128 m_ack = 1; 133 m_ack = 1;
129 } 134 }
130 } 135 }
131 if (!test_bit(IPIPE_PASS_FLAG, &next_domain->irqs[irq].control)) 136 if (!test_bit(IPIPE_PASS_FLAG, &idesc->control))
132 break; 137 break;
133 pos = next_domain->p_link.next; 138 pos = next_domain->p_link.next;
134 } 139 }
@@ -159,11 +164,6 @@ out:
159 __clear_bit(IPIPE_STALL_FLAG, &p->status); 164 __clear_bit(IPIPE_STALL_FLAG, &p->status);
160} 165}
161 166
162int __ipipe_check_root(void)
163{
164 return ipipe_root_domain_p;
165}
166
167void __ipipe_enable_irqdesc(struct ipipe_domain *ipd, unsigned irq) 167void __ipipe_enable_irqdesc(struct ipipe_domain *ipd, unsigned irq)
168{ 168{
169 struct irq_desc *desc = irq_to_desc(irq); 169 struct irq_desc *desc = irq_to_desc(irq);
@@ -186,30 +186,6 @@ void __ipipe_disable_irqdesc(struct ipipe_domain *ipd, unsigned irq)
186} 186}
187EXPORT_SYMBOL(__ipipe_disable_irqdesc); 187EXPORT_SYMBOL(__ipipe_disable_irqdesc);
188 188
189void __ipipe_stall_root_raw(void)
190{
191 /*
192 * This code is called by the ins{bwl} routines (see
193 * arch/blackfin/lib/ins.S), which are heavily used by the
194 * network stack. It masks all interrupts but those handled by
195 * non-root domains, so that we keep decent network transfer
196 * rates for Linux without inducing pathological jitter for
197 * the real-time domain.
198 */
199 __asm__ __volatile__ ("sti %0;" : : "d"(__ipipe_irq_lvmask));
200
201 __set_bit(IPIPE_STALL_FLAG,
202 &ipipe_root_cpudom_var(status));
203}
204
205void __ipipe_unstall_root_raw(void)
206{
207 __clear_bit(IPIPE_STALL_FLAG,
208 &ipipe_root_cpudom_var(status));
209
210 __asm__ __volatile__ ("sti %0;" : : "d"(bfin_irq_flags));
211}
212
213int __ipipe_syscall_root(struct pt_regs *regs) 189int __ipipe_syscall_root(struct pt_regs *regs)
214{ 190{
215 struct ipipe_percpu_domain_data *p; 191 struct ipipe_percpu_domain_data *p;
@@ -333,12 +309,29 @@ asmlinkage void __ipipe_sync_root(void)
333 309
334void ___ipipe_sync_pipeline(unsigned long syncmask) 310void ___ipipe_sync_pipeline(unsigned long syncmask)
335{ 311{
336 if (__ipipe_root_domain_p) { 312 if (__ipipe_root_domain_p &&
337 if (test_bit(IPIPE_SYNCDEFER_FLAG, &ipipe_root_cpudom_var(status))) 313 test_bit(IPIPE_SYNCDEFER_FLAG, &ipipe_root_cpudom_var(status)))
338 return; 314 return;
339 }
340 315
341 __ipipe_sync_stage(syncmask); 316 __ipipe_sync_stage(syncmask);
342} 317}
343 318
344EXPORT_SYMBOL(show_stack); 319void __ipipe_disable_root_irqs_hw(void)
320{
321 /*
322 * This code is called by the ins{bwl} routines (see
323 * arch/blackfin/lib/ins.S), which are heavily used by the
324 * network stack. It masks all interrupts but those handled by
325 * non-root domains, so that we keep decent network transfer
326 * rates for Linux without inducing pathological jitter for
327 * the real-time domain.
328 */
329 bfin_sti(__ipipe_irq_lvmask);
330 __set_bit(IPIPE_STALL_FLAG, &ipipe_root_cpudom_var(status));
331}
332
333void __ipipe_enable_root_irqs_hw(void)
334{
335 __clear_bit(IPIPE_STALL_FLAG, &ipipe_root_cpudom_var(status));
336 bfin_sti(bfin_irq_flags);
337}
diff --git a/arch/blackfin/kernel/kgdb_test.c b/arch/blackfin/kernel/kgdb_test.c
index dbcf3e45cb0b..59fc42dc5d6a 100644
--- a/arch/blackfin/kernel/kgdb_test.c
+++ b/arch/blackfin/kernel/kgdb_test.c
@@ -54,7 +54,7 @@ void kgdb_l2_test(void)
54 54
55int kgdb_test(char *name, int len, int count, int z) 55int kgdb_test(char *name, int len, int count, int z)
56{ 56{
57 printk(KERN_DEBUG "kgdb name(%d): %s, %d, %d\n", len, name, count, z); 57 printk(KERN_ALERT "kgdb name(%d): %s, %d, %d\n", len, name, count, z);
58 count = z; 58 count = z;
59 return count; 59 return count;
60} 60}
diff --git a/arch/blackfin/kernel/module.c b/arch/blackfin/kernel/module.c
index d5aee3626688..67fc7a56c865 100644
--- a/arch/blackfin/kernel/module.c
+++ b/arch/blackfin/kernel/module.c
@@ -27,6 +27,7 @@
27 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 27 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28 */ 28 */
29 29
30#define pr_fmt(fmt) "module %s: " fmt
30 31
31#include <linux/moduleloader.h> 32#include <linux/moduleloader.h>
32#include <linux/elf.h> 33#include <linux/elf.h>
@@ -36,6 +37,7 @@
36#include <linux/kernel.h> 37#include <linux/kernel.h>
37#include <asm/dma.h> 38#include <asm/dma.h>
38#include <asm/cacheflush.h> 39#include <asm/cacheflush.h>
40#include <asm/uaccess.h>
39 41
40void *module_alloc(unsigned long size) 42void *module_alloc(unsigned long size)
41{ 43{
@@ -52,7 +54,7 @@ void module_free(struct module *mod, void *module_region)
52 54
53/* Transfer the section to the L1 memory */ 55/* Transfer the section to the L1 memory */
54int 56int
55module_frob_arch_sections(Elf_Ehdr * hdr, Elf_Shdr * sechdrs, 57module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs,
56 char *secstrings, struct module *mod) 58 char *secstrings, struct module *mod)
57{ 59{
58 /* 60 /*
@@ -63,126 +65,119 @@ module_frob_arch_sections(Elf_Ehdr * hdr, Elf_Shdr * sechdrs,
63 * NOTE: this breaks the semantic of mod->arch structure. 65 * NOTE: this breaks the semantic of mod->arch structure.
64 */ 66 */
65 Elf_Shdr *s, *sechdrs_end = sechdrs + hdr->e_shnum; 67 Elf_Shdr *s, *sechdrs_end = sechdrs + hdr->e_shnum;
66 void *dest = NULL; 68 void *dest;
67 69
68 for (s = sechdrs; s < sechdrs_end; ++s) { 70 for (s = sechdrs; s < sechdrs_end; ++s) {
69 if ((strcmp(".l1.text", secstrings + s->sh_name) == 0) || 71 const char *shname = secstrings + s->sh_name;
70 ((strcmp(".text", secstrings + s->sh_name) == 0) && 72
71 (hdr->e_flags & EF_BFIN_CODE_IN_L1) && (s->sh_size > 0))) { 73 if (s->sh_size == 0)
74 continue;
75
76 if (!strcmp(".l1.text", shname) ||
77 (!strcmp(".text", shname) &&
78 (hdr->e_flags & EF_BFIN_CODE_IN_L1))) {
79
72 dest = l1_inst_sram_alloc(s->sh_size); 80 dest = l1_inst_sram_alloc(s->sh_size);
73 mod->arch.text_l1 = dest; 81 mod->arch.text_l1 = dest;
74 if (dest == NULL) { 82 if (dest == NULL) {
75 printk(KERN_ERR 83 pr_err("L1 inst memory allocation failed\n",
76 "module %s: L1 instruction memory allocation failed\n", 84 mod->name);
77 mod->name);
78 return -1; 85 return -1;
79 } 86 }
80 dma_memcpy(dest, (void *)s->sh_addr, s->sh_size); 87 dma_memcpy(dest, (void *)s->sh_addr, s->sh_size);
81 s->sh_flags &= ~SHF_ALLOC; 88
82 s->sh_addr = (unsigned long)dest; 89 } else if (!strcmp(".l1.data", shname) ||
83 } 90 (!strcmp(".data", shname) &&
84 if ((strcmp(".l1.data", secstrings + s->sh_name) == 0) || 91 (hdr->e_flags & EF_BFIN_DATA_IN_L1))) {
85 ((strcmp(".data", secstrings + s->sh_name) == 0) && 92
86 (hdr->e_flags & EF_BFIN_DATA_IN_L1) && (s->sh_size > 0))) {
87 dest = l1_data_sram_alloc(s->sh_size); 93 dest = l1_data_sram_alloc(s->sh_size);
88 mod->arch.data_a_l1 = dest; 94 mod->arch.data_a_l1 = dest;
89 if (dest == NULL) { 95 if (dest == NULL) {
90 printk(KERN_ERR 96 pr_err("L1 data memory allocation failed\n",
91 "module %s: L1 data memory allocation failed\n",
92 mod->name); 97 mod->name);
93 return -1; 98 return -1;
94 } 99 }
95 memcpy(dest, (void *)s->sh_addr, s->sh_size); 100 memcpy(dest, (void *)s->sh_addr, s->sh_size);
96 s->sh_flags &= ~SHF_ALLOC; 101
97 s->sh_addr = (unsigned long)dest; 102 } else if (!strcmp(".l1.bss", shname) ||
98 } 103 (!strcmp(".bss", shname) &&
99 if (strcmp(".l1.bss", secstrings + s->sh_name) == 0 || 104 (hdr->e_flags & EF_BFIN_DATA_IN_L1))) {
100 ((strcmp(".bss", secstrings + s->sh_name) == 0) && 105
101 (hdr->e_flags & EF_BFIN_DATA_IN_L1) && (s->sh_size > 0))) { 106 dest = l1_data_sram_zalloc(s->sh_size);
102 dest = l1_data_sram_alloc(s->sh_size);
103 mod->arch.bss_a_l1 = dest; 107 mod->arch.bss_a_l1 = dest;
104 if (dest == NULL) { 108 if (dest == NULL) {
105 printk(KERN_ERR 109 pr_err("L1 data memory allocation failed\n",
106 "module %s: L1 data memory allocation failed\n",
107 mod->name); 110 mod->name);
108 return -1; 111 return -1;
109 } 112 }
110 memset(dest, 0, s->sh_size); 113
111 s->sh_flags &= ~SHF_ALLOC; 114 } else if (!strcmp(".l1.data.B", shname)) {
112 s->sh_addr = (unsigned long)dest; 115
113 }
114 if (strcmp(".l1.data.B", secstrings + s->sh_name) == 0) {
115 dest = l1_data_B_sram_alloc(s->sh_size); 116 dest = l1_data_B_sram_alloc(s->sh_size);
116 mod->arch.data_b_l1 = dest; 117 mod->arch.data_b_l1 = dest;
117 if (dest == NULL) { 118 if (dest == NULL) {
118 printk(KERN_ERR 119 pr_err("L1 data memory allocation failed\n",
119 "module %s: L1 data memory allocation failed\n",
120 mod->name); 120 mod->name);
121 return -1; 121 return -1;
122 } 122 }
123 memcpy(dest, (void *)s->sh_addr, s->sh_size); 123 memcpy(dest, (void *)s->sh_addr, s->sh_size);
124 s->sh_flags &= ~SHF_ALLOC; 124
125 s->sh_addr = (unsigned long)dest; 125 } else if (!strcmp(".l1.bss.B", shname)) {
126 } 126
127 if (strcmp(".l1.bss.B", secstrings + s->sh_name) == 0) {
128 dest = l1_data_B_sram_alloc(s->sh_size); 127 dest = l1_data_B_sram_alloc(s->sh_size);
129 mod->arch.bss_b_l1 = dest; 128 mod->arch.bss_b_l1 = dest;
130 if (dest == NULL) { 129 if (dest == NULL) {
131 printk(KERN_ERR 130 pr_err("L1 data memory allocation failed\n",
132 "module %s: L1 data memory allocation failed\n",
133 mod->name); 131 mod->name);
134 return -1; 132 return -1;
135 } 133 }
136 memset(dest, 0, s->sh_size); 134 memset(dest, 0, s->sh_size);
137 s->sh_flags &= ~SHF_ALLOC; 135
138 s->sh_addr = (unsigned long)dest; 136 } else if (!strcmp(".l2.text", shname) ||
139 } 137 (!strcmp(".text", shname) &&
140 if ((strcmp(".l2.text", secstrings + s->sh_name) == 0) || 138 (hdr->e_flags & EF_BFIN_CODE_IN_L2))) {
141 ((strcmp(".text", secstrings + s->sh_name) == 0) && 139
142 (hdr->e_flags & EF_BFIN_CODE_IN_L2) && (s->sh_size > 0))) {
143 dest = l2_sram_alloc(s->sh_size); 140 dest = l2_sram_alloc(s->sh_size);
144 mod->arch.text_l2 = dest; 141 mod->arch.text_l2 = dest;
145 if (dest == NULL) { 142 if (dest == NULL) {
146 printk(KERN_ERR 143 pr_err("L2 SRAM allocation failed\n",
147 "module %s: L2 SRAM allocation failed\n", 144 mod->name);
148 mod->name);
149 return -1; 145 return -1;
150 } 146 }
151 memcpy(dest, (void *)s->sh_addr, s->sh_size); 147 memcpy(dest, (void *)s->sh_addr, s->sh_size);
152 s->sh_flags &= ~SHF_ALLOC; 148
153 s->sh_addr = (unsigned long)dest; 149 } else if (!strcmp(".l2.data", shname) ||
154 } 150 (!strcmp(".data", shname) &&
155 if ((strcmp(".l2.data", secstrings + s->sh_name) == 0) || 151 (hdr->e_flags & EF_BFIN_DATA_IN_L2))) {
156 ((strcmp(".data", secstrings + s->sh_name) == 0) && 152
157 (hdr->e_flags & EF_BFIN_DATA_IN_L2) && (s->sh_size > 0))) {
158 dest = l2_sram_alloc(s->sh_size); 153 dest = l2_sram_alloc(s->sh_size);
159 mod->arch.data_l2 = dest; 154 mod->arch.data_l2 = dest;
160 if (dest == NULL) { 155 if (dest == NULL) {
161 printk(KERN_ERR 156 pr_err("L2 SRAM allocation failed\n",
162 "module %s: L2 SRAM allocation failed\n",
163 mod->name); 157 mod->name);
164 return -1; 158 return -1;
165 } 159 }
166 memcpy(dest, (void *)s->sh_addr, s->sh_size); 160 memcpy(dest, (void *)s->sh_addr, s->sh_size);
167 s->sh_flags &= ~SHF_ALLOC; 161
168 s->sh_addr = (unsigned long)dest; 162 } else if (!strcmp(".l2.bss", shname) ||
169 } 163 (!strcmp(".bss", shname) &&
170 if (strcmp(".l2.bss", secstrings + s->sh_name) == 0 || 164 (hdr->e_flags & EF_BFIN_DATA_IN_L2))) {
171 ((strcmp(".bss", secstrings + s->sh_name) == 0) && 165
172 (hdr->e_flags & EF_BFIN_DATA_IN_L2) && (s->sh_size > 0))) { 166 dest = l2_sram_zalloc(s->sh_size);
173 dest = l2_sram_alloc(s->sh_size);
174 mod->arch.bss_l2 = dest; 167 mod->arch.bss_l2 = dest;
175 if (dest == NULL) { 168 if (dest == NULL) {
176 printk(KERN_ERR 169 pr_err("L2 SRAM allocation failed\n",
177 "module %s: L2 SRAM allocation failed\n",
178 mod->name); 170 mod->name);
179 return -1; 171 return -1;
180 } 172 }
181 memset(dest, 0, s->sh_size); 173
182 s->sh_flags &= ~SHF_ALLOC; 174 } else
183 s->sh_addr = (unsigned long)dest; 175 continue;
184 } 176
177 s->sh_flags &= ~SHF_ALLOC;
178 s->sh_addr = (unsigned long)dest;
185 } 179 }
180
186 return 0; 181 return 0;
187} 182}
188 183
@@ -190,7 +185,7 @@ int
190apply_relocate(Elf_Shdr * sechdrs, const char *strtab, 185apply_relocate(Elf_Shdr * sechdrs, const char *strtab,
191 unsigned int symindex, unsigned int relsec, struct module *me) 186 unsigned int symindex, unsigned int relsec, struct module *me)
192{ 187{
193 printk(KERN_ERR "module %s: .rel unsupported\n", me->name); 188 pr_err(".rel unsupported\n", me->name);
194 return -ENOEXEC; 189 return -ENOEXEC;
195} 190}
196 191
@@ -205,109 +200,86 @@ apply_relocate(Elf_Shdr * sechdrs, const char *strtab,
205/* gas does not generate it. */ 200/* gas does not generate it. */
206/*************************************************************************/ 201/*************************************************************************/
207int 202int
208apply_relocate_add(Elf_Shdr * sechdrs, const char *strtab, 203apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab,
209 unsigned int symindex, unsigned int relsec, 204 unsigned int symindex, unsigned int relsec,
210 struct module *mod) 205 struct module *mod)
211{ 206{
212 unsigned int i; 207 unsigned int i;
213 unsigned short tmp;
214 Elf32_Rela *rel = (void *)sechdrs[relsec].sh_addr; 208 Elf32_Rela *rel = (void *)sechdrs[relsec].sh_addr;
215 Elf32_Sym *sym; 209 Elf32_Sym *sym;
216 uint32_t *location32; 210 unsigned long location, value, size;
217 uint16_t *location16; 211
218 uint32_t value; 212 pr_debug("applying relocate section %u to %u\n", mod->name,
213 relsec, sechdrs[relsec].sh_info);
219 214
220 pr_debug("Applying relocate section %u to %u\n", relsec,
221 sechdrs[relsec].sh_info);
222 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { 215 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) {
223 /* This is where to make the change */ 216 /* This is where to make the change */
224 location16 = 217 location = sechdrs[sechdrs[relsec].sh_info].sh_addr +
225 (uint16_t *) (sechdrs[sechdrs[relsec].sh_info].sh_addr + 218 rel[i].r_offset;
226 rel[i].r_offset); 219
227 location32 = (uint32_t *) location16;
228 /* This is the symbol it is referring to. Note that all 220 /* This is the symbol it is referring to. Note that all
229 undefined symbols have been resolved. */ 221 undefined symbols have been resolved. */
230 sym = (Elf32_Sym *) sechdrs[symindex].sh_addr 222 sym = (Elf32_Sym *) sechdrs[symindex].sh_addr
231 + ELF32_R_SYM(rel[i].r_info); 223 + ELF32_R_SYM(rel[i].r_info);
232 value = sym->st_value; 224 value = sym->st_value;
233 value += rel[i].r_addend; 225 value += rel[i].r_addend;
234 pr_debug("location is %x, value is %x type is %d \n", 226
235 (unsigned int) location32, value,
236 ELF32_R_TYPE(rel[i].r_info));
237#ifdef CONFIG_SMP 227#ifdef CONFIG_SMP
238 if ((unsigned long)location16 >= COREB_L1_DATA_A_START) { 228 if (location >= COREB_L1_DATA_A_START) {
239 printk(KERN_ERR "module %s: cannot relocate in L1: %u (SMP kernel)", 229 pr_err("cannot relocate in L1: %u (SMP kernel)",
240 mod->name, ELF32_R_TYPE(rel[i].r_info)); 230 mod->name, ELF32_R_TYPE(rel[i].r_info));
241 return -ENOEXEC; 231 return -ENOEXEC;
242 } 232 }
243#endif 233#endif
234
235 pr_debug("location is %lx, value is %lx type is %d\n",
236 mod->name, location, value, ELF32_R_TYPE(rel[i].r_info));
237
244 switch (ELF32_R_TYPE(rel[i].r_info)) { 238 switch (ELF32_R_TYPE(rel[i].r_info)) {
245 239
240 case R_BFIN_HUIMM16:
241 value >>= 16;
242 case R_BFIN_LUIMM16:
243 case R_BFIN_RIMM16:
244 size = 2;
245 break;
246 case R_BFIN_BYTE4_DATA:
247 size = 4;
248 break;
249
246 case R_BFIN_PCREL24: 250 case R_BFIN_PCREL24:
247 case R_BFIN_PCREL24_JUMP_L: 251 case R_BFIN_PCREL24_JUMP_L:
248 /* Add the value, subtract its postition */
249 location16 =
250 (uint16_t *) (sechdrs[sechdrs[relsec].sh_info].
251 sh_addr + rel[i].r_offset - 2);
252 location32 = (uint32_t *) location16;
253 value -= (uint32_t) location32;
254 value >>= 1;
255 if ((value & 0xFF000000) != 0 &&
256 (value & 0xFF000000) != 0xFF000000) {
257 printk(KERN_ERR "module %s: relocation overflow\n",
258 mod->name);
259 return -ENOEXEC;
260 }
261 pr_debug("value is %x, before %x-%x after %x-%x\n", value,
262 *location16, *(location16 + 1),
263 (*location16 & 0xff00) | (value >> 16 & 0x00ff),
264 value & 0xffff);
265 *location16 =
266 (*location16 & 0xff00) | (value >> 16 & 0x00ff);
267 *(location16 + 1) = value & 0xffff;
268 break;
269 case R_BFIN_PCREL12_JUMP: 252 case R_BFIN_PCREL12_JUMP:
270 case R_BFIN_PCREL12_JUMP_S: 253 case R_BFIN_PCREL12_JUMP_S:
271 value -= (uint32_t) location32;
272 value >>= 1;
273 *location16 = (value & 0xfff);
274 break;
275 case R_BFIN_PCREL10: 254 case R_BFIN_PCREL10:
276 value -= (uint32_t) location32; 255 pr_err("unsupported relocation: %u (no -mlong-calls?)\n",
277 value >>= 1; 256 mod->name, ELF32_R_TYPE(rel[i].r_info));
278 *location16 = (value & 0x3ff); 257 return -ENOEXEC;
279 break; 258
280 case R_BFIN_LUIMM16: 259 default:
281 pr_debug("before %x after %x\n", *location16, 260 pr_err("unknown relocation: %u\n", mod->name,
282 (value & 0xffff)); 261 ELF32_R_TYPE(rel[i].r_info));
283 tmp = (value & 0xffff); 262 return -ENOEXEC;
284 if ((unsigned long)location16 >= L1_CODE_START) { 263 }
285 dma_memcpy(location16, &tmp, 2); 264
286 } else 265 switch (bfin_mem_access_type(location, size)) {
287 *location16 = tmp; 266 case BFIN_MEM_ACCESS_CORE:
288 break; 267 case BFIN_MEM_ACCESS_CORE_ONLY:
289 case R_BFIN_HUIMM16: 268 memcpy((void *)location, &value, size);
290 pr_debug("before %x after %x\n", *location16,
291 ((value >> 16) & 0xffff));
292 tmp = ((value >> 16) & 0xffff);
293 if ((unsigned long)location16 >= L1_CODE_START) {
294 dma_memcpy(location16, &tmp, 2);
295 } else
296 *location16 = tmp;
297 break; 269 break;
298 case R_BFIN_RIMM16: 270 case BFIN_MEM_ACCESS_DMA:
299 *location16 = (value & 0xffff); 271 dma_memcpy((void *)location, &value, size);
300 break; 272 break;
301 case R_BFIN_BYTE4_DATA: 273 case BFIN_MEM_ACCESS_ITEST:
302 pr_debug("before %x after %x\n", *location32, value); 274 isram_memcpy((void *)location, &value, size);
303 *location32 = value;
304 break; 275 break;
305 default: 276 default:
306 printk(KERN_ERR "module %s: Unknown relocation: %u\n", 277 pr_err("invalid relocation for %#lx\n",
307 mod->name, ELF32_R_TYPE(rel[i].r_info)); 278 mod->name, location);
308 return -ENOEXEC; 279 return -ENOEXEC;
309 } 280 }
310 } 281 }
282
311 return 0; 283 return 0;
312} 284}
313 285
@@ -332,22 +304,28 @@ module_finalize(const Elf_Ehdr * hdr,
332 for (i = 1; i < hdr->e_shnum; i++) { 304 for (i = 1; i < hdr->e_shnum; i++) {
333 const char *strtab = (char *)sechdrs[strindex].sh_addr; 305 const char *strtab = (char *)sechdrs[strindex].sh_addr;
334 unsigned int info = sechdrs[i].sh_info; 306 unsigned int info = sechdrs[i].sh_info;
307 const char *shname = secstrings + sechdrs[i].sh_name;
335 308
336 /* Not a valid relocation section? */ 309 /* Not a valid relocation section? */
337 if (info >= hdr->e_shnum) 310 if (info >= hdr->e_shnum)
338 continue; 311 continue;
339 312
340 if ((sechdrs[i].sh_type == SHT_RELA) && 313 /* Only support RELA relocation types */
341 ((strcmp(".rela.l2.text", secstrings + sechdrs[i].sh_name) == 0) || 314 if (sechdrs[i].sh_type != SHT_RELA)
342 (strcmp(".rela.l1.text", secstrings + sechdrs[i].sh_name) == 0) || 315 continue;
343 ((strcmp(".rela.text", secstrings + sechdrs[i].sh_name) == 0) && 316
344 (hdr->e_flags & (EF_BFIN_CODE_IN_L1|EF_BFIN_CODE_IN_L2))))) { 317 if (!strcmp(".rela.l2.text", shname) ||
318 !strcmp(".rela.l1.text", shname) ||
319 (!strcmp(".rela.text", shname) &&
320 (hdr->e_flags & (EF_BFIN_CODE_IN_L1 | EF_BFIN_CODE_IN_L2)))) {
321
345 err = apply_relocate_add((Elf_Shdr *) sechdrs, strtab, 322 err = apply_relocate_add((Elf_Shdr *) sechdrs, strtab,
346 symindex, i, mod); 323 symindex, i, mod);
347 if (err < 0) 324 if (err < 0)
348 return -ENOEXEC; 325 return -ENOEXEC;
349 } 326 }
350 } 327 }
328
351 return 0; 329 return 0;
352} 330}
353 331
diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c
index 9da36bab7ccb..f5b286189647 100644
--- a/arch/blackfin/kernel/process.c
+++ b/arch/blackfin/kernel/process.c
@@ -282,25 +282,19 @@ void finish_atomic_sections (struct pt_regs *regs)
282{ 282{
283 int __user *up0 = (int __user *)regs->p0; 283 int __user *up0 = (int __user *)regs->p0;
284 284
285 if (regs->pc < ATOMIC_SEQS_START || regs->pc >= ATOMIC_SEQS_END)
286 return;
287
288 switch (regs->pc) { 285 switch (regs->pc) {
289 case ATOMIC_XCHG32 + 2: 286 case ATOMIC_XCHG32 + 2:
290 put_user(regs->r1, up0); 287 put_user(regs->r1, up0);
291 regs->pc += 2; 288 regs->pc = ATOMIC_XCHG32 + 4;
292 break; 289 break;
293 290
294 case ATOMIC_CAS32 + 2: 291 case ATOMIC_CAS32 + 2:
295 case ATOMIC_CAS32 + 4: 292 case ATOMIC_CAS32 + 4:
296 if (regs->r0 == regs->r1) 293 if (regs->r0 == regs->r1)
294 case ATOMIC_CAS32 + 6:
297 put_user(regs->r2, up0); 295 put_user(regs->r2, up0);
298 regs->pc = ATOMIC_CAS32 + 8; 296 regs->pc = ATOMIC_CAS32 + 8;
299 break; 297 break;
300 case ATOMIC_CAS32 + 6:
301 put_user(regs->r2, up0);
302 regs->pc += 2;
303 break;
304 298
305 case ATOMIC_ADD32 + 2: 299 case ATOMIC_ADD32 + 2:
306 regs->r0 = regs->r1 + regs->r0; 300 regs->r0 = regs->r1 + regs->r0;
diff --git a/arch/blackfin/kernel/ptrace.c b/arch/blackfin/kernel/ptrace.c
index 6a387eec6b65..30f4828277ad 100644
--- a/arch/blackfin/kernel/ptrace.c
+++ b/arch/blackfin/kernel/ptrace.c
@@ -206,6 +206,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
206{ 206{
207 int ret; 207 int ret;
208 unsigned long __user *datap = (unsigned long __user *)data; 208 unsigned long __user *datap = (unsigned long __user *)data;
209 void *paddr = (void *)addr;
209 210
210 switch (request) { 211 switch (request) {
211 /* when I and D space are separate, these will need to be fixed. */ 212 /* when I and D space are separate, these will need to be fixed. */
@@ -215,42 +216,49 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
215 case PTRACE_PEEKTEXT: /* read word at location addr. */ 216 case PTRACE_PEEKTEXT: /* read word at location addr. */
216 { 217 {
217 unsigned long tmp = 0; 218 unsigned long tmp = 0;
218 int copied; 219 int copied = 0, to_copy = sizeof(tmp);
219 220
220 ret = -EIO; 221 ret = -EIO;
221 pr_debug("ptrace: PEEKTEXT at addr 0x%08lx + %ld\n", addr, sizeof(data)); 222 pr_debug("ptrace: PEEKTEXT at addr 0x%08lx + %i\n", addr, to_copy);
222 if (is_user_addr_valid(child, addr, sizeof(tmp)) < 0) 223 if (is_user_addr_valid(child, addr, to_copy) < 0)
223 break; 224 break;
224 pr_debug("ptrace: user address is valid\n"); 225 pr_debug("ptrace: user address is valid\n");
225 226
226 if (L1_CODE_LENGTH != 0 && addr >= get_l1_code_start() 227 switch (bfin_mem_access_type(addr, to_copy)) {
227 && addr + sizeof(tmp) <= get_l1_code_start() + L1_CODE_LENGTH) { 228 case BFIN_MEM_ACCESS_CORE:
228 safe_dma_memcpy (&tmp, (const void *)(addr), sizeof(tmp)); 229 case BFIN_MEM_ACCESS_CORE_ONLY:
229 copied = sizeof(tmp);
230
231 } else if (L1_DATA_A_LENGTH != 0 && addr >= L1_DATA_A_START
232 && addr + sizeof(tmp) <= L1_DATA_A_START + L1_DATA_A_LENGTH) {
233 memcpy(&tmp, (const void *)(addr), sizeof(tmp));
234 copied = sizeof(tmp);
235
236 } else if (L1_DATA_B_LENGTH != 0 && addr >= L1_DATA_B_START
237 && addr + sizeof(tmp) <= L1_DATA_B_START + L1_DATA_B_LENGTH) {
238 memcpy(&tmp, (const void *)(addr), sizeof(tmp));
239 copied = sizeof(tmp);
240
241 } else if (addr >= FIXED_CODE_START
242 && addr + sizeof(tmp) <= FIXED_CODE_END) {
243 copy_from_user_page(0, 0, 0, &tmp, (const void *)(addr), sizeof(tmp));
244 copied = sizeof(tmp);
245
246 } else
247 copied = access_process_vm(child, addr, &tmp, 230 copied = access_process_vm(child, addr, &tmp,
248 sizeof(tmp), 0); 231 to_copy, 0);
232 if (copied)
233 break;
234
235 /* hrm, why didn't that work ... maybe no mapping */
236 if (addr >= FIXED_CODE_START &&
237 addr + to_copy <= FIXED_CODE_END) {
238 copy_from_user_page(0, 0, 0, &tmp, paddr, to_copy);
239 copied = to_copy;
240 } else if (addr >= BOOT_ROM_START) {
241 memcpy(&tmp, paddr, to_copy);
242 copied = to_copy;
243 }
249 244
250 pr_debug("ptrace: copied size %d [0x%08lx]\n", copied, tmp);
251 if (copied != sizeof(tmp))
252 break; 245 break;
253 ret = put_user(tmp, datap); 246 case BFIN_MEM_ACCESS_DMA:
247 if (safe_dma_memcpy(&tmp, paddr, to_copy))
248 copied = to_copy;
249 break;
250 case BFIN_MEM_ACCESS_ITEST:
251 if (isram_memcpy(&tmp, paddr, to_copy))
252 copied = to_copy;
253 break;
254 default:
255 copied = 0;
256 break;
257 }
258
259 pr_debug("ptrace: copied size %d [0x%08lx]\n", copied, tmp);
260 if (copied == to_copy)
261 ret = put_user(tmp, datap);
254 break; 262 break;
255 } 263 }
256 264
@@ -277,9 +285,9 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
277 tmp = child->mm->start_data; 285 tmp = child->mm->start_data;
278#ifdef CONFIG_BINFMT_ELF_FDPIC 286#ifdef CONFIG_BINFMT_ELF_FDPIC
279 } else if (addr == (sizeof(struct pt_regs) + 12)) { 287 } else if (addr == (sizeof(struct pt_regs) + 12)) {
280 tmp = child->mm->context.exec_fdpic_loadmap; 288 goto case_PTRACE_GETFDPIC_EXEC;
281 } else if (addr == (sizeof(struct pt_regs) + 16)) { 289 } else if (addr == (sizeof(struct pt_regs) + 16)) {
282 tmp = child->mm->context.interp_fdpic_loadmap; 290 goto case_PTRACE_GETFDPIC_INTERP;
283#endif 291#endif
284 } else { 292 } else {
285 tmp = get_reg(child, addr); 293 tmp = get_reg(child, addr);
@@ -288,49 +296,78 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
288 break; 296 break;
289 } 297 }
290 298
299#ifdef CONFIG_BINFMT_ELF_FDPIC
300 case PTRACE_GETFDPIC: {
301 unsigned long tmp = 0;
302
303 switch (addr) {
304 case_PTRACE_GETFDPIC_EXEC:
305 case PTRACE_GETFDPIC_EXEC:
306 tmp = child->mm->context.exec_fdpic_loadmap;
307 break;
308 case_PTRACE_GETFDPIC_INTERP:
309 case PTRACE_GETFDPIC_INTERP:
310 tmp = child->mm->context.interp_fdpic_loadmap;
311 break;
312 default:
313 break;
314 }
315
316 ret = put_user(tmp, datap);
317 break;
318 }
319#endif
320
291 /* when I and D space are separate, this will have to be fixed. */ 321 /* when I and D space are separate, this will have to be fixed. */
292 case PTRACE_POKEDATA: 322 case PTRACE_POKEDATA:
293 pr_debug("ptrace: PTRACE_PEEKDATA\n"); 323 pr_debug("ptrace: PTRACE_PEEKDATA\n");
294 /* fall through */ 324 /* fall through */
295 case PTRACE_POKETEXT: /* write the word at location addr. */ 325 case PTRACE_POKETEXT: /* write the word at location addr. */
296 { 326 {
297 int copied; 327 int copied = 0, to_copy = sizeof(data);
298 328
299 ret = -EIO; 329 ret = -EIO;
300 pr_debug("ptrace: POKETEXT at addr 0x%08lx + %ld bytes %lx\n", 330 pr_debug("ptrace: POKETEXT at addr 0x%08lx + %i bytes %lx\n",
301 addr, sizeof(data), data); 331 addr, to_copy, data);
302 if (is_user_addr_valid(child, addr, sizeof(data)) < 0) 332 if (is_user_addr_valid(child, addr, to_copy) < 0)
303 break; 333 break;
304 pr_debug("ptrace: user address is valid\n"); 334 pr_debug("ptrace: user address is valid\n");
305 335
306 if (L1_CODE_LENGTH != 0 && addr >= get_l1_code_start() 336 switch (bfin_mem_access_type(addr, to_copy)) {
307 && addr + sizeof(data) <= get_l1_code_start() + L1_CODE_LENGTH) { 337 case BFIN_MEM_ACCESS_CORE:
308 safe_dma_memcpy ((void *)(addr), &data, sizeof(data)); 338 case BFIN_MEM_ACCESS_CORE_ONLY:
309 copied = sizeof(data);
310
311 } else if (L1_DATA_A_LENGTH != 0 && addr >= L1_DATA_A_START
312 && addr + sizeof(data) <= L1_DATA_A_START + L1_DATA_A_LENGTH) {
313 memcpy((void *)(addr), &data, sizeof(data));
314 copied = sizeof(data);
315
316 } else if (L1_DATA_B_LENGTH != 0 && addr >= L1_DATA_B_START
317 && addr + sizeof(data) <= L1_DATA_B_START + L1_DATA_B_LENGTH) {
318 memcpy((void *)(addr), &data, sizeof(data));
319 copied = sizeof(data);
320
321 } else if (addr >= FIXED_CODE_START
322 && addr + sizeof(data) <= FIXED_CODE_END) {
323 copy_to_user_page(0, 0, 0, (void *)(addr), &data, sizeof(data));
324 copied = sizeof(data);
325
326 } else
327 copied = access_process_vm(child, addr, &data, 339 copied = access_process_vm(child, addr, &data,
328 sizeof(data), 1); 340 to_copy, 0);
341 if (copied)
342 break;
343
344 /* hrm, why didn't that work ... maybe no mapping */
345 if (addr >= FIXED_CODE_START &&
346 addr + to_copy <= FIXED_CODE_END) {
347 copy_to_user_page(0, 0, 0, paddr, &data, to_copy);
348 copied = to_copy;
349 } else if (addr >= BOOT_ROM_START) {
350 memcpy(paddr, &data, to_copy);
351 copied = to_copy;
352 }
329 353
330 pr_debug("ptrace: copied size %d\n", copied);
331 if (copied != sizeof(data))
332 break; 354 break;
333 ret = 0; 355 case BFIN_MEM_ACCESS_DMA:
356 if (safe_dma_memcpy(paddr, &data, to_copy))
357 copied = to_copy;
358 break;
359 case BFIN_MEM_ACCESS_ITEST:
360 if (isram_memcpy(paddr, &data, to_copy))
361 copied = to_copy;
362 break;
363 default:
364 copied = 0;
365 break;
366 }
367
368 pr_debug("ptrace: copied size %d\n", copied);
369 if (copied == to_copy)
370 ret = 0;
334 break; 371 break;
335 } 372 }
336 373
diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c
index 6225edae488e..369535b61ed1 100644
--- a/arch/blackfin/kernel/setup.c
+++ b/arch/blackfin/kernel/setup.c
@@ -112,7 +112,7 @@ void __cpuinit bfin_setup_caches(unsigned int cpu)
112 /* 112 /*
113 * In cache coherence emulation mode, we need to have the 113 * In cache coherence emulation mode, we need to have the
114 * D-cache enabled before running any atomic operation which 114 * D-cache enabled before running any atomic operation which
115 * might invove cache invalidation (i.e. spinlock, rwlock). 115 * might involve cache invalidation (i.e. spinlock, rwlock).
116 * So printk's are deferred until then. 116 * So printk's are deferred until then.
117 */ 117 */
118#ifdef CONFIG_BFIN_ICACHE 118#ifdef CONFIG_BFIN_ICACHE
@@ -187,6 +187,8 @@ void __init bfin_relocate_l1_mem(void)
187 unsigned long l1_data_b_length; 187 unsigned long l1_data_b_length;
188 unsigned long l2_length; 188 unsigned long l2_length;
189 189
190 early_shadow_stamp();
191
190 /* 192 /*
191 * due to the ALIGN(4) in the arch/blackfin/kernel/vmlinux.lds.S 193 * due to the ALIGN(4) in the arch/blackfin/kernel/vmlinux.lds.S
192 * we know that everything about l1 text/data is nice and aligned, 194 * we know that everything about l1 text/data is nice and aligned,
@@ -511,6 +513,7 @@ static __init void memory_setup(void)
511#ifdef CONFIG_MTD_UCLINUX 513#ifdef CONFIG_MTD_UCLINUX
512 unsigned long mtd_phys = 0; 514 unsigned long mtd_phys = 0;
513#endif 515#endif
516 unsigned long max_mem;
514 517
515 _rambase = (unsigned long)_stext; 518 _rambase = (unsigned long)_stext;
516 _ramstart = (unsigned long)_end; 519 _ramstart = (unsigned long)_end;
@@ -520,7 +523,22 @@ static __init void memory_setup(void)
520 panic("DMA region exceeds memory limit: %lu.", 523 panic("DMA region exceeds memory limit: %lu.",
521 _ramend - _ramstart); 524 _ramend - _ramstart);
522 } 525 }
523 memory_end = _ramend - DMA_UNCACHED_REGION; 526 max_mem = memory_end = _ramend - DMA_UNCACHED_REGION;
527
528#if (defined(CONFIG_BFIN_EXTMEM_ICACHEABLE) && ANOMALY_05000263)
529 /* Due to a Hardware Anomaly we need to limit the size of usable
530 * instruction memory to max 60MB, 56 if HUNT_FOR_ZERO is on
531 * 05000263 - Hardware loop corrupted when taking an ICPLB exception
532 */
533# if (defined(CONFIG_DEBUG_HUNT_FOR_ZERO))
534 if (max_mem >= 56 * 1024 * 1024)
535 max_mem = 56 * 1024 * 1024;
536# else
537 if (max_mem >= 60 * 1024 * 1024)
538 max_mem = 60 * 1024 * 1024;
539# endif /* CONFIG_DEBUG_HUNT_FOR_ZERO */
540#endif /* ANOMALY_05000263 */
541
524 542
525#ifdef CONFIG_MPU 543#ifdef CONFIG_MPU
526 /* Round up to multiple of 4MB */ 544 /* Round up to multiple of 4MB */
@@ -549,22 +567,16 @@ static __init void memory_setup(void)
549 567
550# if defined(CONFIG_ROMFS_FS) 568# if defined(CONFIG_ROMFS_FS)
551 if (((unsigned long *)mtd_phys)[0] == ROMSB_WORD0 569 if (((unsigned long *)mtd_phys)[0] == ROMSB_WORD0
552 && ((unsigned long *)mtd_phys)[1] == ROMSB_WORD1) 570 && ((unsigned long *)mtd_phys)[1] == ROMSB_WORD1) {
553 mtd_size = 571 mtd_size =
554 PAGE_ALIGN(be32_to_cpu(((unsigned long *)mtd_phys)[2])); 572 PAGE_ALIGN(be32_to_cpu(((unsigned long *)mtd_phys)[2]));
555# if (defined(CONFIG_BFIN_EXTMEM_ICACHEABLE) && ANOMALY_05000263) 573
556 /* Due to a Hardware Anomaly we need to limit the size of usable 574 /* ROM_FS is XIP, so if we found it, we need to limit memory */
557 * instruction memory to max 60MB, 56 if HUNT_FOR_ZERO is on 575 if (memory_end > max_mem) {
558 * 05000263 - Hardware loop corrupted when taking an ICPLB exception 576 pr_info("Limiting kernel memory to %liMB due to anomaly 05000263\n", max_mem >> 20);
559 */ 577 memory_end = max_mem;
560# if (defined(CONFIG_DEBUG_HUNT_FOR_ZERO)) 578 }
561 if (memory_end >= 56 * 1024 * 1024) 579 }
562 memory_end = 56 * 1024 * 1024;
563# else
564 if (memory_end >= 60 * 1024 * 1024)
565 memory_end = 60 * 1024 * 1024;
566# endif /* CONFIG_DEBUG_HUNT_FOR_ZERO */
567# endif /* ANOMALY_05000263 */
568# endif /* CONFIG_ROMFS_FS */ 580# endif /* CONFIG_ROMFS_FS */
569 581
570 /* Since the default MTD_UCLINUX has no magic number, we just blindly 582 /* Since the default MTD_UCLINUX has no magic number, we just blindly
@@ -586,20 +598,14 @@ static __init void memory_setup(void)
586 } 598 }
587#endif /* CONFIG_MTD_UCLINUX */ 599#endif /* CONFIG_MTD_UCLINUX */
588 600
589#if (defined(CONFIG_BFIN_EXTMEM_ICACHEABLE) && ANOMALY_05000263) 601 /* We need lo limit memory, since everything could have a text section
590 /* Due to a Hardware Anomaly we need to limit the size of usable 602 * of userspace in it, and expose anomaly 05000263. If the anomaly
591 * instruction memory to max 60MB, 56 if HUNT_FOR_ZERO is on 603 * doesn't exist, or we don't need to - then dont.
592 * 05000263 - Hardware loop corrupted when taking an ICPLB exception
593 */ 604 */
594#if (defined(CONFIG_DEBUG_HUNT_FOR_ZERO)) 605 if (memory_end > max_mem) {
595 if (memory_end >= 56 * 1024 * 1024) 606 pr_info("Limiting kernel memory to %liMB due to anomaly 05000263\n", max_mem >> 20);
596 memory_end = 56 * 1024 * 1024; 607 memory_end = max_mem;
597#else 608 }
598 if (memory_end >= 60 * 1024 * 1024)
599 memory_end = 60 * 1024 * 1024;
600#endif /* CONFIG_DEBUG_HUNT_FOR_ZERO */
601 printk(KERN_NOTICE "Warning: limiting memory to %liMB due to hardware anomaly 05000263\n", memory_end >> 20);
602#endif /* ANOMALY_05000263 */
603 609
604#ifdef CONFIG_MPU 610#ifdef CONFIG_MPU
605 page_mask_nelts = ((_ramend >> PAGE_SHIFT) + 31) / 32; 611 page_mask_nelts = ((_ramend >> PAGE_SHIFT) + 31) / 32;
@@ -693,7 +699,7 @@ static __init void setup_bootmem_allocator(void)
693 sanitize_memmap(bfin_memmap.map, &bfin_memmap.nr_map); 699 sanitize_memmap(bfin_memmap.map, &bfin_memmap.nr_map);
694 print_memory_map("boot memmap"); 700 print_memory_map("boot memmap");
695 701
696 /* intialize globals in linux/bootmem.h */ 702 /* initialize globals in linux/bootmem.h */
697 find_min_max_pfn(); 703 find_min_max_pfn();
698 /* pfn of the last usable page frame */ 704 /* pfn of the last usable page frame */
699 if (max_pfn > memory_end >> PAGE_SHIFT) 705 if (max_pfn > memory_end >> PAGE_SHIFT)
@@ -806,6 +812,8 @@ void __init setup_arch(char **cmdline_p)
806{ 812{
807 unsigned long sclk, cclk; 813 unsigned long sclk, cclk;
808 814
815 enable_shadow_console();
816
809 /* Check to make sure we are running on the right processor */ 817 /* Check to make sure we are running on the right processor */
810 if (unlikely(CPUID != bfin_cpuid())) 818 if (unlikely(CPUID != bfin_cpuid()))
811 printk(KERN_ERR "ERROR: Not running on ADSP-%s: unknown CPUID 0x%04x Rev 0.%d\n", 819 printk(KERN_ERR "ERROR: Not running on ADSP-%s: unknown CPUID 0x%04x Rev 0.%d\n",
@@ -1230,57 +1238,6 @@ static int show_cpuinfo(struct seq_file *m, void *v)
1230#ifdef __ARCH_SYNC_CORE_ICACHE 1238#ifdef __ARCH_SYNC_CORE_ICACHE
1231 seq_printf(m, "SMP Icache Flushes\t: %lu\n\n", cpudata->icache_invld_count); 1239 seq_printf(m, "SMP Icache Flushes\t: %lu\n\n", cpudata->icache_invld_count);
1232#endif 1240#endif
1233#ifdef CONFIG_BFIN_ICACHE_LOCK
1234 switch ((cpudata->imemctl >> 3) & WAYALL_L) {
1235 case WAY0_L:
1236 seq_printf(m, "Way0 Locked-Down\n");
1237 break;
1238 case WAY1_L:
1239 seq_printf(m, "Way1 Locked-Down\n");
1240 break;
1241 case WAY01_L:
1242 seq_printf(m, "Way0,Way1 Locked-Down\n");
1243 break;
1244 case WAY2_L:
1245 seq_printf(m, "Way2 Locked-Down\n");
1246 break;
1247 case WAY02_L:
1248 seq_printf(m, "Way0,Way2 Locked-Down\n");
1249 break;
1250 case WAY12_L:
1251 seq_printf(m, "Way1,Way2 Locked-Down\n");
1252 break;
1253 case WAY012_L:
1254 seq_printf(m, "Way0,Way1 & Way2 Locked-Down\n");
1255 break;
1256 case WAY3_L:
1257 seq_printf(m, "Way3 Locked-Down\n");
1258 break;
1259 case WAY03_L:
1260 seq_printf(m, "Way0,Way3 Locked-Down\n");
1261 break;
1262 case WAY13_L:
1263 seq_printf(m, "Way1,Way3 Locked-Down\n");
1264 break;
1265 case WAY013_L:
1266 seq_printf(m, "Way 0,Way1,Way3 Locked-Down\n");
1267 break;
1268 case WAY32_L:
1269 seq_printf(m, "Way3,Way2 Locked-Down\n");
1270 break;
1271 case WAY320_L:
1272 seq_printf(m, "Way3,Way2,Way0 Locked-Down\n");
1273 break;
1274 case WAY321_L:
1275 seq_printf(m, "Way3,Way2,Way1 Locked-Down\n");
1276 break;
1277 case WAYALL_L:
1278 seq_printf(m, "All Ways are locked\n");
1279 break;
1280 default:
1281 seq_printf(m, "No Ways are locked\n");
1282 }
1283#endif
1284 1241
1285 if (cpu_num != num_possible_cpus() - 1) 1242 if (cpu_num != num_possible_cpus() - 1)
1286 return 0; 1243 return 0;
@@ -1346,6 +1303,7 @@ const struct seq_operations cpuinfo_op = {
1346 1303
1347void __init cmdline_init(const char *r0) 1304void __init cmdline_init(const char *r0)
1348{ 1305{
1306 early_shadow_stamp();
1349 if (r0) 1307 if (r0)
1350 strncpy(command_line, r0, COMMAND_LINE_SIZE); 1308 strncpy(command_line, r0, COMMAND_LINE_SIZE);
1351} 1309}
diff --git a/arch/blackfin/kernel/shadow_console.c b/arch/blackfin/kernel/shadow_console.c
new file mode 100644
index 000000000000..8b8c7107a162
--- /dev/null
+++ b/arch/blackfin/kernel/shadow_console.c
@@ -0,0 +1,113 @@
1/*
2 * manage a small early shadow of the log buffer which we can pass between the
3 * bootloader so early crash messages are communicated properly and easily
4 *
5 * Copyright 2009 Analog Devices Inc.
6 *
7 * Enter bugs at http://blackfin.uclinux.org/
8 *
9 * Licensed under the GPL-2 or later.
10 */
11
12#include <linux/kernel.h>
13#include <linux/init.h>
14#include <linux/console.h>
15#include <linux/string.h>
16#include <asm/blackfin.h>
17#include <asm/irq_handler.h>
18#include <asm/early_printk.h>
19
20#define SHADOW_CONSOLE_START (0x500)
21#define SHADOW_CONSOLE_END (0x1000)
22#define SHADOW_CONSOLE_MAGIC_LOC (0x4F0)
23#define SHADOW_CONSOLE_MAGIC (0xDEADBEEF)
24
25static __initdata char *shadow_console_buffer = (char *)SHADOW_CONSOLE_START;
26
27__init void early_shadow_write(struct console *con, const char *s,
28 unsigned int n)
29{
30 unsigned int i;
31 /*
32 * save 2 bytes for the double null at the end
33 * once we fail on a long line, make sure we don't write a short line afterwards
34 */
35 if ((shadow_console_buffer + n) <= (char *)(SHADOW_CONSOLE_END - 2)) {
36 /* can't use memcpy - it may not be relocated yet */
37 for (i = 0; i <= n; i++)
38 shadow_console_buffer[i] = s[i];
39 shadow_console_buffer += n;
40 shadow_console_buffer[0] = 0;
41 shadow_console_buffer[1] = 0;
42 } else
43 shadow_console_buffer = (char *)SHADOW_CONSOLE_END;
44}
45
46static __initdata struct console early_shadow_console = {
47 .name = "early_shadow",
48 .write = early_shadow_write,
49 .flags = CON_BOOT | CON_PRINTBUFFER,
50 .index = -1,
51 .device = 0,
52};
53
54__init int shadow_console_enabled(void)
55{
56 return early_shadow_console.flags & CON_ENABLED;
57}
58
59__init void mark_shadow_error(void)
60{
61 int *loc = (int *)SHADOW_CONSOLE_MAGIC_LOC;
62 loc[0] = SHADOW_CONSOLE_MAGIC;
63 loc[1] = SHADOW_CONSOLE_START;
64}
65
66__init void enable_shadow_console(void)
67{
68 if (!shadow_console_enabled()) {
69 register_console(&early_shadow_console);
70 /* for now, assume things are going to fail */
71 mark_shadow_error();
72 }
73}
74
75static __init int disable_shadow_console(void)
76{
77 /*
78 * by the time pure_initcall runs, the standard console is enabled,
79 * and the early_console is off, so unset the magic numbers
80 * unregistering the console is taken care of in common code (See
81 * ./kernel/printk:disable_boot_consoles() )
82 */
83 int *loc = (int *)SHADOW_CONSOLE_MAGIC_LOC;
84
85 loc[0] = 0;
86
87 return 0;
88}
89pure_initcall(disable_shadow_console);
90
91/*
92 * since we can't use printk, dump numbers (as hex), n = # bits
93 */
94__init void early_shadow_reg(unsigned long reg, unsigned int n)
95{
96 /*
97 * can't use any "normal" kernel features, since thay
98 * may not be relocated to their execute address yet
99 */
100 int i;
101 char ascii[11] = " 0x";
102
103 n = n / 4;
104 reg = reg << ((8 - n) * 4);
105 n += 3;
106
107 for (i = 3; i <= n ; i++) {
108 ascii[i] = hex_asc_lo(reg >> 28);
109 reg <<= 4;
110 }
111 early_shadow_write(NULL, ascii, n);
112
113}
diff --git a/arch/blackfin/kernel/time-ts.c b/arch/blackfin/kernel/time-ts.c
index 0791eba40d9f..f9715764383e 100644
--- a/arch/blackfin/kernel/time-ts.c
+++ b/arch/blackfin/kernel/time-ts.c
@@ -66,7 +66,7 @@ static cycle_t bfin_read_cycles(struct clocksource *cs)
66 66
67static struct clocksource bfin_cs_cycles = { 67static struct clocksource bfin_cs_cycles = {
68 .name = "bfin_cs_cycles", 68 .name = "bfin_cs_cycles",
69 .rating = 350, 69 .rating = 400,
70 .read = bfin_read_cycles, 70 .read = bfin_read_cycles,
71 .mask = CLOCKSOURCE_MASK(64), 71 .mask = CLOCKSOURCE_MASK(64),
72 .shift = 22, 72 .shift = 22,
@@ -115,7 +115,7 @@ static cycle_t bfin_read_gptimer0(void)
115 115
116static struct clocksource bfin_cs_gptimer0 = { 116static struct clocksource bfin_cs_gptimer0 = {
117 .name = "bfin_cs_gptimer0", 117 .name = "bfin_cs_gptimer0",
118 .rating = 400, 118 .rating = 350,
119 .read = bfin_read_gptimer0, 119 .read = bfin_read_gptimer0,
120 .mask = CLOCKSOURCE_MASK(32), 120 .mask = CLOCKSOURCE_MASK(32),
121 .shift = 22, 121 .shift = 22,
diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c
index bf2b2d1f8ae5..56464cb8edf3 100644
--- a/arch/blackfin/kernel/traps.c
+++ b/arch/blackfin/kernel/traps.c
@@ -100,7 +100,11 @@ static void decode_address(char *buf, unsigned long address)
100 char *modname; 100 char *modname;
101 char *delim = ":"; 101 char *delim = ":";
102 char namebuf[128]; 102 char namebuf[128];
103#endif
104
105 buf += sprintf(buf, "<0x%08lx> ", address);
103 106
107#ifdef CONFIG_KALLSYMS
104 /* look up the address and see if we are in kernel space */ 108 /* look up the address and see if we are in kernel space */
105 symname = kallsyms_lookup(address, &symsize, &offset, &modname, namebuf); 109 symname = kallsyms_lookup(address, &symsize, &offset, &modname, namebuf);
106 110
@@ -108,23 +112,33 @@ static void decode_address(char *buf, unsigned long address)
108 /* yeah! kernel space! */ 112 /* yeah! kernel space! */
109 if (!modname) 113 if (!modname)
110 modname = delim = ""; 114 modname = delim = "";
111 sprintf(buf, "<0x%p> { %s%s%s%s + 0x%lx }", 115 sprintf(buf, "{ %s%s%s%s + 0x%lx }",
112 (void *)address, delim, modname, delim, symname, 116 delim, modname, delim, symname,
113 (unsigned long)offset); 117 (unsigned long)offset);
114 return; 118 return;
115
116 } 119 }
117#endif 120#endif
118 121
119 /* Problem in fixed code section? */
120 if (address >= FIXED_CODE_START && address < FIXED_CODE_END) { 122 if (address >= FIXED_CODE_START && address < FIXED_CODE_END) {
121 sprintf(buf, "<0x%p> /* Maybe fixed code section */", (void *)address); 123 /* Problem in fixed code section? */
124 strcat(buf, "/* Maybe fixed code section */");
125 return;
126
127 } else if (address < CONFIG_BOOT_LOAD) {
128 /* Problem somewhere before the kernel start address */
129 strcat(buf, "/* Maybe null pointer? */");
130 return;
131
132 } else if (address >= COREMMR_BASE) {
133 strcat(buf, "/* core mmrs */");
122 return; 134 return;
123 }
124 135
125 /* Problem somewhere before the kernel start address */ 136 } else if (address >= SYSMMR_BASE) {
126 if (address < CONFIG_BOOT_LOAD) { 137 strcat(buf, "/* system mmrs */");
127 sprintf(buf, "<0x%p> /* Maybe null pointer? */", (void *)address); 138 return;
139
140 } else if (address >= L1_ROM_START && address < L1_ROM_START + L1_ROM_LENGTH) {
141 strcat(buf, "/* on-chip L1 ROM */");
128 return; 142 return;
129 } 143 }
130 144
@@ -172,18 +186,16 @@ static void decode_address(char *buf, unsigned long address)
172 offset = (address - vma->vm_start) + 186 offset = (address - vma->vm_start) +
173 (vma->vm_pgoff << PAGE_SHIFT); 187 (vma->vm_pgoff << PAGE_SHIFT);
174 188
175 sprintf(buf, "<0x%p> [ %s + 0x%lx ]", 189 sprintf(buf, "[ %s + 0x%lx ]", name, offset);
176 (void *)address, name, offset);
177 } else 190 } else
178 sprintf(buf, "<0x%p> [ %s vma:0x%lx-0x%lx]", 191 sprintf(buf, "[ %s vma:0x%lx-0x%lx]",
179 (void *)address, name, 192 name, vma->vm_start, vma->vm_end);
180 vma->vm_start, vma->vm_end);
181 193
182 if (!in_atomic) 194 if (!in_atomic)
183 mmput(mm); 195 mmput(mm);
184 196
185 if (!strlen(buf)) 197 if (buf[0] == '\0')
186 sprintf(buf, "<0x%p> [ %s ] dynamic memory", (void *)address, name); 198 sprintf(buf, "[ %s ] dynamic memory", name);
187 199
188 goto done; 200 goto done;
189 } 201 }
@@ -193,7 +205,7 @@ static void decode_address(char *buf, unsigned long address)
193 } 205 }
194 206
195 /* we were unable to find this address anywhere */ 207 /* we were unable to find this address anywhere */
196 sprintf(buf, "<0x%p> /* kernel dynamic memory */", (void *)address); 208 sprintf(buf, "/* kernel dynamic memory */");
197 209
198done: 210done:
199 write_unlock_irqrestore(&tasklist_lock, flags); 211 write_unlock_irqrestore(&tasklist_lock, flags);
@@ -215,14 +227,14 @@ asmlinkage void double_fault_c(struct pt_regs *fp)
215 printk(KERN_EMERG "Double Fault\n"); 227 printk(KERN_EMERG "Double Fault\n");
216#ifdef CONFIG_DEBUG_DOUBLEFAULT_PRINT 228#ifdef CONFIG_DEBUG_DOUBLEFAULT_PRINT
217 if (((long)fp->seqstat & SEQSTAT_EXCAUSE) == VEC_UNCOV) { 229 if (((long)fp->seqstat & SEQSTAT_EXCAUSE) == VEC_UNCOV) {
218 unsigned int cpu = smp_processor_id(); 230 unsigned int cpu = raw_smp_processor_id();
219 char buf[150]; 231 char buf[150];
220 decode_address(buf, cpu_pda[cpu].retx); 232 decode_address(buf, cpu_pda[cpu].retx_doublefault);
221 printk(KERN_EMERG "While handling exception (EXCAUSE = 0x%x) at %s:\n", 233 printk(KERN_EMERG "While handling exception (EXCAUSE = 0x%x) at %s:\n",
222 (unsigned int)cpu_pda[cpu].seqstat & SEQSTAT_EXCAUSE, buf); 234 (unsigned int)cpu_pda[cpu].seqstat_doublefault & SEQSTAT_EXCAUSE, buf);
223 decode_address(buf, cpu_pda[cpu].dcplb_fault_addr); 235 decode_address(buf, cpu_pda[cpu].dcplb_doublefault_addr);
224 printk(KERN_NOTICE " DCPLB_FAULT_ADDR: %s\n", buf); 236 printk(KERN_NOTICE " DCPLB_FAULT_ADDR: %s\n", buf);
225 decode_address(buf, cpu_pda[cpu].icplb_fault_addr); 237 decode_address(buf, cpu_pda[cpu].icplb_doublefault_addr);
226 printk(KERN_NOTICE " ICPLB_FAULT_ADDR: %s\n", buf); 238 printk(KERN_NOTICE " ICPLB_FAULT_ADDR: %s\n", buf);
227 239
228 decode_address(buf, fp->retx); 240 decode_address(buf, fp->retx);
@@ -245,13 +257,13 @@ static int kernel_mode_regs(struct pt_regs *regs)
245 return regs->ipend & 0xffc0; 257 return regs->ipend & 0xffc0;
246} 258}
247 259
248asmlinkage void trap_c(struct pt_regs *fp) 260asmlinkage notrace void trap_c(struct pt_regs *fp)
249{ 261{
250#ifdef CONFIG_DEBUG_BFIN_HWTRACE_ON 262#ifdef CONFIG_DEBUG_BFIN_HWTRACE_ON
251 int j; 263 int j;
252#endif 264#endif
253#ifdef CONFIG_DEBUG_HUNT_FOR_ZERO 265#ifdef CONFIG_DEBUG_HUNT_FOR_ZERO
254 unsigned int cpu = smp_processor_id(); 266 unsigned int cpu = raw_smp_processor_id();
255#endif 267#endif
256 const char *strerror = NULL; 268 const char *strerror = NULL;
257 int sig = 0; 269 int sig = 0;
@@ -267,11 +279,6 @@ asmlinkage void trap_c(struct pt_regs *fp)
267 * double faults if the stack has become corrupt 279 * double faults if the stack has become corrupt
268 */ 280 */
269 281
270#ifndef CONFIG_KGDB
271 /* IPEND is skipped if KGDB isn't enabled (see entry code) */
272 fp->ipend = bfin_read_IPEND();
273#endif
274
275 /* trap_c() will be called for exceptions. During exceptions 282 /* trap_c() will be called for exceptions. During exceptions
276 * processing, the pc value should be set with retx value. 283 * processing, the pc value should be set with retx value.
277 * With this change we can cleanup some code in signal.c- TODO 284 * With this change we can cleanup some code in signal.c- TODO
@@ -404,7 +411,7 @@ asmlinkage void trap_c(struct pt_regs *fp)
404 /* 0x23 - Data CPLB protection violation, handled here */ 411 /* 0x23 - Data CPLB protection violation, handled here */
405 case VEC_CPLB_VL: 412 case VEC_CPLB_VL:
406 info.si_code = ILL_CPLB_VI; 413 info.si_code = ILL_CPLB_VI;
407 sig = SIGBUS; 414 sig = SIGSEGV;
408 strerror = KERN_NOTICE EXC_0x23(KERN_NOTICE); 415 strerror = KERN_NOTICE EXC_0x23(KERN_NOTICE);
409 CHK_DEBUGGER_TRAP_MAYBE(); 416 CHK_DEBUGGER_TRAP_MAYBE();
410 break; 417 break;
@@ -904,7 +911,7 @@ void show_stack(struct task_struct *task, unsigned long *stack)
904 frame_no = 0; 911 frame_no = 0;
905 912
906 for (addr = (unsigned int *)((unsigned int)stack & ~0xF), i = 0; 913 for (addr = (unsigned int *)((unsigned int)stack & ~0xF), i = 0;
907 addr <= endstack; addr++, i++) { 914 addr < endstack; addr++, i++) {
908 915
909 ret_addr = 0; 916 ret_addr = 0;
910 if (!j && i % 8 == 0) 917 if (!j && i % 8 == 0)
@@ -949,6 +956,7 @@ void show_stack(struct task_struct *task, unsigned long *stack)
949 } 956 }
950#endif 957#endif
951} 958}
959EXPORT_SYMBOL(show_stack);
952 960
953void dump_stack(void) 961void dump_stack(void)
954{ 962{
@@ -1090,7 +1098,7 @@ void show_regs(struct pt_regs *fp)
1090 struct irqaction *action; 1098 struct irqaction *action;
1091 unsigned int i; 1099 unsigned int i;
1092 unsigned long flags = 0; 1100 unsigned long flags = 0;
1093 unsigned int cpu = smp_processor_id(); 1101 unsigned int cpu = raw_smp_processor_id();
1094 unsigned char in_atomic = (bfin_read_IPEND() & 0x10) || in_atomic(); 1102 unsigned char in_atomic = (bfin_read_IPEND() & 0x10) || in_atomic();
1095 1103
1096 verbose_printk(KERN_NOTICE "\n"); 1104 verbose_printk(KERN_NOTICE "\n");
@@ -1116,10 +1124,16 @@ void show_regs(struct pt_regs *fp)
1116 1124
1117 verbose_printk(KERN_NOTICE "%s", linux_banner); 1125 verbose_printk(KERN_NOTICE "%s", linux_banner);
1118 1126
1119 verbose_printk(KERN_NOTICE "\nSEQUENCER STATUS:\t\t%s\n", 1127 verbose_printk(KERN_NOTICE "\nSEQUENCER STATUS:\t\t%s\n", print_tainted());
1120 print_tainted()); 1128 verbose_printk(KERN_NOTICE " SEQSTAT: %08lx IPEND: %04lx IMASK: %04lx SYSCFG: %04lx\n",
1121 verbose_printk(KERN_NOTICE " SEQSTAT: %08lx IPEND: %04lx SYSCFG: %04lx\n", 1129 (long)fp->seqstat, fp->ipend, cpu_pda[raw_smp_processor_id()].ex_imask, fp->syscfg);
1122 (long)fp->seqstat, fp->ipend, fp->syscfg); 1130 if (fp->ipend & EVT_IRPTEN)
1131 verbose_printk(KERN_NOTICE " Global Interrupts Disabled (IPEND[4])\n");
1132 if (!(cpu_pda[raw_smp_processor_id()].ex_imask & (EVT_IVG13 | EVT_IVG12 | EVT_IVG11 |
1133 EVT_IVG10 | EVT_IVG9 | EVT_IVG8 | EVT_IVG7 | EVT_IVTMR)))
1134 verbose_printk(KERN_NOTICE " Peripheral interrupts masked off\n");
1135 if (!(cpu_pda[raw_smp_processor_id()].ex_imask & (EVT_IVG15 | EVT_IVG14)))
1136 verbose_printk(KERN_NOTICE " Kernel interrupts masked off\n");
1123 if ((fp->seqstat & SEQSTAT_EXCAUSE) == VEC_HWERR) { 1137 if ((fp->seqstat & SEQSTAT_EXCAUSE) == VEC_HWERR) {
1124 verbose_printk(KERN_NOTICE " HWERRCAUSE: 0x%lx\n", 1138 verbose_printk(KERN_NOTICE " HWERRCAUSE: 0x%lx\n",
1125 (fp->seqstat & SEQSTAT_HWERRCAUSE) >> 14); 1139 (fp->seqstat & SEQSTAT_HWERRCAUSE) >> 14);
diff --git a/arch/blackfin/kernel/vmlinux.lds.S b/arch/blackfin/kernel/vmlinux.lds.S
index d7ffe299b979..ffd90fbbc8f9 100644
--- a/arch/blackfin/kernel/vmlinux.lds.S
+++ b/arch/blackfin/kernel/vmlinux.lds.S
@@ -96,8 +96,7 @@ SECTIONS
96 { 96 {
97 __sdata = .; 97 __sdata = .;
98 /* This gets done first, so the glob doesn't suck it in */ 98 /* This gets done first, so the glob doesn't suck it in */
99 . = ALIGN(32); 99 CACHELINE_ALIGNED_DATA(32)
100 *(.data.cacheline_aligned)
101 100
102#if !L1_DATA_A_LENGTH 101#if !L1_DATA_A_LENGTH
103 . = ALIGN(32); 102 . = ALIGN(32);
@@ -116,12 +115,7 @@ SECTIONS
116 DATA_DATA 115 DATA_DATA
117 CONSTRUCTORS 116 CONSTRUCTORS
118 117
119 /* make sure the init_task is aligned to the 118 INIT_TASK_DATA(THREAD_SIZE)
120 * kernel thread size so we can locate the kernel
121 * stack properly and quickly.
122 */
123 . = ALIGN(THREAD_SIZE);
124 *(.init_task.data)
125 119
126 __edata = .; 120 __edata = .;
127 } 121 }
@@ -134,39 +128,10 @@ SECTIONS
134 . = ALIGN(PAGE_SIZE); 128 . = ALIGN(PAGE_SIZE);
135 ___init_begin = .; 129 ___init_begin = .;
136 130
137 .init.text : 131 INIT_TEXT_SECTION(PAGE_SIZE)
138 { 132 . = ALIGN(16);
139 . = ALIGN(PAGE_SIZE); 133 INIT_DATA_SECTION(16)
140 __sinittext = .;
141 INIT_TEXT
142 __einittext = .;
143 }
144 .init.data :
145 {
146 . = ALIGN(16);
147 INIT_DATA
148 }
149 .init.setup :
150 {
151 . = ALIGN(16);
152 ___setup_start = .;
153 *(.init.setup)
154 ___setup_end = .;
155 }
156 .initcall.init :
157 {
158 ___initcall_start = .;
159 INITCALLS
160 ___initcall_end = .;
161 }
162 .con_initcall.init :
163 {
164 ___con_initcall_start = .;
165 *(.con_initcall.init)
166 ___con_initcall_end = .;
167 }
168 PERCPU(4) 134 PERCPU(4)
169 SECURITY_INIT
170 135
171 /* we have to discard exit text and such at runtime, not link time, to 136 /* we have to discard exit text and such at runtime, not link time, to
172 * handle embedded cross-section references (alt instructions, bug 137 * handle embedded cross-section references (alt instructions, bug
@@ -181,18 +146,9 @@ SECTIONS
181 EXIT_DATA 146 EXIT_DATA
182 } 147 }
183 148
184 .init.ramfs :
185 {
186 . = ALIGN(4);
187 ___initramfs_start = .;
188 *(.init.ramfs)
189 . = ALIGN(4);
190 ___initramfs_end = .;
191 }
192
193 __l1_lma_start = .; 149 __l1_lma_start = .;
194 150
195 .text_l1 L1_CODE_START : AT(LOADADDR(.init.ramfs) + SIZEOF(.init.ramfs)) 151 .text_l1 L1_CODE_START : AT(LOADADDR(.exit.data) + SIZEOF(.exit.data))
196 { 152 {
197 . = ALIGN(4); 153 . = ALIGN(4);
198 __stext_l1 = .; 154 __stext_l1 = .;
@@ -221,7 +177,7 @@ SECTIONS
221 . = ALIGN(4); 177 . = ALIGN(4);
222 __ebss_l1 = .; 178 __ebss_l1 = .;
223 } 179 }
224 ASSERT (SIZEOF(.data_a_l1) <= L1_DATA_A_LENGTH, "L1 data A overflow!") 180 ASSERT (SIZEOF(.data_l1) <= L1_DATA_A_LENGTH, "L1 data A overflow!")
225 181
226 .data_b_l1 L1_DATA_B_START : AT(LOADADDR(.data_l1) + SIZEOF(.data_l1)) 182 .data_b_l1 L1_DATA_B_START : AT(LOADADDR(.data_l1) + SIZEOF(.data_l1))
227 { 183 {
@@ -262,7 +218,7 @@ SECTIONS
262 . = ALIGN(4); 218 . = ALIGN(4);
263 __ebss_l2 = .; 219 __ebss_l2 = .;
264 } 220 }
265 ASSERT (SIZEOF(.text_data_l1) <= L2_LENGTH, "L2 overflow!") 221 ASSERT (SIZEOF(.text_data_l2) <= L2_LENGTH, "L2 overflow!")
266 222
267 /* Force trailing alignment of our init section so that when we 223 /* Force trailing alignment of our init section so that when we
268 * free our init memory, we don't leave behind a partial page. 224 * free our init memory, we don't leave behind a partial page.
diff --git a/arch/blackfin/lib/ins.S b/arch/blackfin/lib/ins.S
index 1863a6ba507c..3edbd8db6598 100644
--- a/arch/blackfin/lib/ins.S
+++ b/arch/blackfin/lib/ins.S
@@ -16,7 +16,7 @@
16 [--sp] = rets; \ 16 [--sp] = rets; \
17 [--sp] = (P5:0); \ 17 [--sp] = (P5:0); \
18 sp += -12; \ 18 sp += -12; \
19 call ___ipipe_stall_root_raw; \ 19 call ___ipipe_disable_root_irqs_hw; \
20 sp += 12; \ 20 sp += 12; \
21 (P5:0) = [sp++]; 21 (P5:0) = [sp++];
22# define CLI_INNER_NOP 22# define CLI_INNER_NOP
@@ -28,7 +28,7 @@
28#ifdef CONFIG_IPIPE 28#ifdef CONFIG_IPIPE
29# define DO_STI \ 29# define DO_STI \
30 sp += -12; \ 30 sp += -12; \
31 call ___ipipe_unstall_root_raw; \ 31 call ___ipipe_enable_root_irqs_hw; \
32 sp += 12; \ 32 sp += 12; \
332: rets = [sp++]; 332: rets = [sp++];
34#else 34#else
diff --git a/arch/blackfin/mach-bf518/boards/ezbrd.c b/arch/blackfin/mach-bf518/boards/ezbrd.c
index 809be268e42d..03e4a9941f01 100644
--- a/arch/blackfin/mach-bf518/boards/ezbrd.c
+++ b/arch/blackfin/mach-bf518/boards/ezbrd.c
@@ -199,15 +199,6 @@ static struct bfin5xx_spi_chip mmc_spi_chip_info = {
199}; 199};
200#endif 200#endif
201 201
202#if defined(CONFIG_PBX)
203static struct bfin5xx_spi_chip spi_si3xxx_chip_info = {
204 .ctl_reg = 0x4, /* send zero */
205 .enable_dma = 0,
206 .bits_per_word = 8,
207 .cs_change_per_word = 1,
208};
209#endif
210
211#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 202#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
212static struct bfin5xx_spi_chip spi_ad7877_chip_info = { 203static struct bfin5xx_spi_chip spi_ad7877_chip_info = {
213 .enable_dma = 0, 204 .enable_dma = 0,
@@ -296,24 +287,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
296 .mode = SPI_MODE_3, 287 .mode = SPI_MODE_3,
297 }, 288 },
298#endif 289#endif
299#if defined(CONFIG_PBX)
300 {
301 .modalias = "fxs-spi",
302 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
303 .bus_num = 0,
304 .chip_select = 8 - CONFIG_J11_JUMPER,
305 .controller_data = &spi_si3xxx_chip_info,
306 .mode = SPI_MODE_3,
307 },
308 {
309 .modalias = "fxo-spi",
310 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
311 .bus_num = 0,
312 .chip_select = 8 - CONFIG_J19_JUMPER,
313 .controller_data = &spi_si3xxx_chip_info,
314 .mode = SPI_MODE_3,
315 },
316#endif
317#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 290#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
318 { 291 {
319 .modalias = "ad7877", 292 .modalias = "ad7877",
@@ -539,7 +512,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
539 I2C_BOARD_INFO("pcf8574_lcd", 0x22), 512 I2C_BOARD_INFO("pcf8574_lcd", 0x22),
540 }, 513 },
541#endif 514#endif
542#if defined(CONFIG_TWI_KEYPAD) || defined(CONFIG_TWI_KEYPAD_MODULE) 515#if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE)
543 { 516 {
544 I2C_BOARD_INFO("pcf8574_keypad", 0x27), 517 I2C_BOARD_INFO("pcf8574_keypad", 0x27),
545 .irq = IRQ_PF8, 518 .irq = IRQ_PF8,
diff --git a/arch/blackfin/mach-bf518/include/mach/anomaly.h b/arch/blackfin/mach-bf518/include/mach/anomaly.h
index 753ed810e1c6..e9c65390edd1 100644
--- a/arch/blackfin/mach-bf518/include/mach/anomaly.h
+++ b/arch/blackfin/mach-bf518/include/mach/anomaly.h
@@ -124,6 +124,7 @@
124#define ANOMALY_05000386 (0) 124#define ANOMALY_05000386 (0)
125#define ANOMALY_05000389 (0) 125#define ANOMALY_05000389 (0)
126#define ANOMALY_05000400 (0) 126#define ANOMALY_05000400 (0)
127#define ANOMALY_05000402 (0)
127#define ANOMALY_05000412 (0) 128#define ANOMALY_05000412 (0)
128#define ANOMALY_05000432 (0) 129#define ANOMALY_05000432 (0)
129#define ANOMALY_05000447 (0) 130#define ANOMALY_05000447 (0)
diff --git a/arch/blackfin/mach-bf518/include/mach/blackfin.h b/arch/blackfin/mach-bf518/include/mach/blackfin.h
index e8e14c2769ed..83421d393148 100644
--- a/arch/blackfin/mach-bf518/include/mach/blackfin.h
+++ b/arch/blackfin/mach-bf518/include/mach/blackfin.h
@@ -68,11 +68,6 @@
68#endif 68#endif
69#endif 69#endif
70 70
71/* UART_IIR Register */
72#define STATUS(x) ((x << 1) & 0x06)
73#define STATUS_P1 0x02
74#define STATUS_P0 0x01
75
76#define BFIN_UART_NR_PORTS 2 71#define BFIN_UART_NR_PORTS 2
77 72
78#define OFFSET_THR 0x00 /* Transmit Holding register */ 73#define OFFSET_THR 0x00 /* Transmit Holding register */
@@ -88,11 +83,6 @@
88#define OFFSET_SCR 0x1C /* SCR Scratch Register */ 83#define OFFSET_SCR 0x1C /* SCR Scratch Register */
89#define OFFSET_GCTL 0x24 /* Global Control Register */ 84#define OFFSET_GCTL 0x24 /* Global Control Register */
90 85
91/* DPMC*/
92#define bfin_read_STOPCK_OFF() bfin_read_STOPCK()
93#define bfin_write_STOPCK_OFF(val) bfin_write_STOPCK(val)
94#define STOPCK_OFF STOPCK
95
96/* PLL_DIV Masks */ 86/* PLL_DIV Masks */
97#define CCLK_DIV1 CSEL_DIV1 /* CCLK = VCO / 1 */ 87#define CCLK_DIV1 CSEL_DIV1 /* CCLK = VCO / 1 */
98#define CCLK_DIV2 CSEL_DIV2 /* CCLK = VCO / 2 */ 88#define CCLK_DIV2 CSEL_DIV2 /* CCLK = VCO / 2 */
diff --git a/arch/blackfin/mach-bf527/boards/cm_bf527.c b/arch/blackfin/mach-bf527/boards/cm_bf527.c
index b09484f538f4..08a3f01c9886 100644
--- a/arch/blackfin/mach-bf527/boards/cm_bf527.c
+++ b/arch/blackfin/mach-bf527/boards/cm_bf527.c
@@ -151,46 +151,6 @@ static struct platform_device musb_device = {
151}; 151};
152#endif 152#endif
153 153
154#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
155static struct mtd_partition ezkit_partitions[] = {
156 {
157 .name = "bootloader(nor)",
158 .size = 0x40000,
159 .offset = 0,
160 }, {
161 .name = "linux kernel(nor)",
162 .size = 0x1C0000,
163 .offset = MTDPART_OFS_APPEND,
164 }, {
165 .name = "file system(nor)",
166 .size = MTDPART_SIZ_FULL,
167 .offset = MTDPART_OFS_APPEND,
168 }
169};
170
171static struct physmap_flash_data ezkit_flash_data = {
172 .width = 2,
173 .parts = ezkit_partitions,
174 .nr_parts = ARRAY_SIZE(ezkit_partitions),
175};
176
177static struct resource ezkit_flash_resource = {
178 .start = 0x20000000,
179 .end = 0x201fffff,
180 .flags = IORESOURCE_MEM,
181};
182
183static struct platform_device ezkit_flash_device = {
184 .name = "physmap-flash",
185 .id = 0,
186 .dev = {
187 .platform_data = &ezkit_flash_data,
188 },
189 .num_resources = 1,
190 .resource = &ezkit_flash_resource,
191};
192#endif
193
194#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) 154#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
195static struct mtd_partition partition_info[] = { 155static struct mtd_partition partition_info[] = {
196 { 156 {
@@ -275,6 +235,14 @@ static struct platform_device rtc_device = {
275#endif 235#endif
276 236
277#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 237#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
238#include <linux/smc91x.h>
239
240static struct smc91x_platdata smc91x_info = {
241 .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
242 .leda = RPC_LED_100_10,
243 .ledb = RPC_LED_TX_RX,
244};
245
278static struct resource smc91x_resources[] = { 246static struct resource smc91x_resources[] = {
279 { 247 {
280 .name = "smc91x-regs", 248 .name = "smc91x-regs",
@@ -293,6 +261,9 @@ static struct platform_device smc91x_device = {
293 .id = 0, 261 .id = 0,
294 .num_resources = ARRAY_SIZE(smc91x_resources), 262 .num_resources = ARRAY_SIZE(smc91x_resources),
295 .resource = smc91x_resources, 263 .resource = smc91x_resources,
264 .dev = {
265 .platform_data = &smc91x_info,
266 },
296}; 267};
297#endif 268#endif
298 269
@@ -300,10 +271,15 @@ static struct platform_device smc91x_device = {
300static struct resource dm9000_resources[] = { 271static struct resource dm9000_resources[] = {
301 [0] = { 272 [0] = {
302 .start = 0x203FB800, 273 .start = 0x203FB800,
303 .end = 0x203FB800 + 8, 274 .end = 0x203FB800 + 1,
304 .flags = IORESOURCE_MEM, 275 .flags = IORESOURCE_MEM,
305 }, 276 },
306 [1] = { 277 [1] = {
278 .start = 0x203FB804,
279 .end = 0x203FB804 + 1,
280 .flags = IORESOURCE_MEM,
281 },
282 [2] = {
307 .start = IRQ_PF9, 283 .start = IRQ_PF9,
308 .end = IRQ_PF9, 284 .end = IRQ_PF9,
309 .flags = (IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE), 285 .flags = (IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE),
@@ -479,13 +455,6 @@ static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
479}; 455};
480#endif 456#endif
481 457
482#if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
483static struct bfin5xx_spi_chip ad9960_spi_chip_info = {
484 .enable_dma = 0,
485 .bits_per_word = 16,
486};
487#endif
488
489#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 458#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
490static struct bfin5xx_spi_chip mmc_spi_chip_info = { 459static struct bfin5xx_spi_chip mmc_spi_chip_info = {
491 .enable_dma = 0, 460 .enable_dma = 0,
@@ -493,15 +462,6 @@ static struct bfin5xx_spi_chip mmc_spi_chip_info = {
493}; 462};
494#endif 463#endif
495 464
496#if defined(CONFIG_PBX)
497static struct bfin5xx_spi_chip spi_si3xxx_chip_info = {
498 .ctl_reg = 0x4, /* send zero */
499 .enable_dma = 0,
500 .bits_per_word = 8,
501 .cs_change_per_word = 1,
502};
503#endif
504
505#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 465#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
506static struct bfin5xx_spi_chip spi_ad7877_chip_info = { 466static struct bfin5xx_spi_chip spi_ad7877_chip_info = {
507 .enable_dma = 0, 467 .enable_dma = 0,
@@ -568,22 +528,13 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
568#if defined(CONFIG_SND_BLACKFIN_AD1836) \ 528#if defined(CONFIG_SND_BLACKFIN_AD1836) \
569 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) 529 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
570 { 530 {
571 .modalias = "ad1836-spi", 531 .modalias = "ad1836",
572 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 532 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
573 .bus_num = 0, 533 .bus_num = 0,
574 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, 534 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT,
575 .controller_data = &ad1836_spi_chip_info, 535 .controller_data = &ad1836_spi_chip_info,
576 }, 536 },
577#endif 537#endif
578#if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
579 {
580 .modalias = "ad9960-spi",
581 .max_speed_hz = 10000000, /* max spi clock (SCK) speed in HZ */
582 .bus_num = 0,
583 .chip_select = 1,
584 .controller_data = &ad9960_spi_chip_info,
585 },
586#endif
587#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 538#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
588 { 539 {
589 .modalias = "mmc_spi", 540 .modalias = "mmc_spi",
@@ -594,24 +545,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
594 .mode = SPI_MODE_3, 545 .mode = SPI_MODE_3,
595 }, 546 },
596#endif 547#endif
597#if defined(CONFIG_PBX)
598 {
599 .modalias = "fxs-spi",
600 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
601 .bus_num = 0,
602 .chip_select = 8 - CONFIG_J11_JUMPER,
603 .controller_data = &spi_si3xxx_chip_info,
604 .mode = SPI_MODE_3,
605 },
606 {
607 .modalias = "fxo-spi",
608 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
609 .bus_num = 0,
610 .chip_select = 8 - CONFIG_J19_JUMPER,
611 .controller_data = &spi_si3xxx_chip_info,
612 .mode = SPI_MODE_3,
613 },
614#endif
615#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 548#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
616 { 549 {
617 .modalias = "ad7877", 550 .modalias = "ad7877",
@@ -689,6 +622,55 @@ static struct platform_device bfin_fb_adv7393_device = {
689}; 622};
690#endif 623#endif
691 624
625#if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE)
626static struct mtd_partition cm_partitions[] = {
627 {
628 .name = "bootloader(nor)",
629 .size = 0x40000,
630 .offset = 0,
631 }, {
632 .name = "linux kernel(nor)",
633 .size = 0x100000,
634 .offset = MTDPART_OFS_APPEND,
635 }, {
636 .name = "file system(nor)",
637 .size = MTDPART_SIZ_FULL,
638 .offset = MTDPART_OFS_APPEND,
639 }
640};
641
642static struct physmap_flash_data cm_flash_data = {
643 .width = 2,
644 .parts = cm_partitions,
645 .nr_parts = ARRAY_SIZE(cm_partitions),
646};
647
648static unsigned cm_flash_gpios[] = { GPIO_PH9, GPIO_PG11 };
649
650static struct resource cm_flash_resource[] = {
651 {
652 .name = "cfi_probe",
653 .start = 0x20000000,
654 .end = 0x201fffff,
655 .flags = IORESOURCE_MEM,
656 }, {
657 .start = (unsigned long)cm_flash_gpios,
658 .end = ARRAY_SIZE(cm_flash_gpios),
659 .flags = IORESOURCE_IRQ,
660 }
661};
662
663static struct platform_device cm_flash_device = {
664 .name = "gpio-addr-flash",
665 .id = 0,
666 .dev = {
667 .platform_data = &cm_flash_data,
668 },
669 .num_resources = ARRAY_SIZE(cm_flash_resource),
670 .resource = cm_flash_resource,
671};
672#endif
673
692#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 674#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
693static struct resource bfin_uart_resources[] = { 675static struct resource bfin_uart_resources[] = {
694#ifdef CONFIG_SERIAL_BFIN_UART0 676#ifdef CONFIG_SERIAL_BFIN_UART0
@@ -796,13 +778,11 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
796#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) 778#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE)
797 { 779 {
798 I2C_BOARD_INFO("pcf8574_lcd", 0x22), 780 I2C_BOARD_INFO("pcf8574_lcd", 0x22),
799 .type = "pcf8574_lcd",
800 }, 781 },
801#endif 782#endif
802#if defined(CONFIG_TWI_KEYPAD) || defined(CONFIG_TWI_KEYPAD_MODULE) 783#if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE)
803 { 784 {
804 I2C_BOARD_INFO("pcf8574_keypad", 0x27), 785 I2C_BOARD_INFO("pcf8574_keypad", 0x27),
805 .type = "pcf8574_keypad",
806 .irq = IRQ_PF8, 786 .irq = IRQ_PF8,
807 }, 787 },
808#endif 788#endif
@@ -876,7 +856,7 @@ static struct platform_device bfin_dpmc = {
876 }, 856 },
877}; 857};
878 858
879static struct platform_device *stamp_devices[] __initdata = { 859static struct platform_device *cmbf527_devices[] __initdata = {
880 860
881 &bfin_dpmc, 861 &bfin_dpmc,
882 862
@@ -959,8 +939,8 @@ static struct platform_device *stamp_devices[] __initdata = {
959 &bfin_device_gpiokeys, 939 &bfin_device_gpiokeys,
960#endif 940#endif
961 941
962#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 942#if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE)
963 &ezkit_flash_device, 943 &cm_flash_device,
964#endif 944#endif
965 945
966 &bfin_gpios_device, 946 &bfin_gpios_device,
@@ -971,7 +951,7 @@ static int __init cm_init(void)
971 printk(KERN_INFO "%s(): registering device resources\n", __func__); 951 printk(KERN_INFO "%s(): registering device resources\n", __func__);
972 i2c_register_board_info(0, bfin_i2c_board_info, 952 i2c_register_board_info(0, bfin_i2c_board_info,
973 ARRAY_SIZE(bfin_i2c_board_info)); 953 ARRAY_SIZE(bfin_i2c_board_info));
974 platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); 954 platform_add_devices(cmbf527_devices, ARRAY_SIZE(cmbf527_devices));
975 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 955 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
976 return 0; 956 return 0;
977} 957}
diff --git a/arch/blackfin/mach-bf527/boards/ezbrd.c b/arch/blackfin/mach-bf527/boards/ezbrd.c
index 2ad68cd10ae6..68b4c804364c 100644
--- a/arch/blackfin/mach-bf527/boards/ezbrd.c
+++ b/arch/blackfin/mach-bf527/boards/ezbrd.c
@@ -263,15 +263,6 @@ static struct bfin5xx_spi_chip mmc_spi_chip_info = {
263}; 263};
264#endif 264#endif
265 265
266#if defined(CONFIG_PBX)
267static struct bfin5xx_spi_chip spi_si3xxx_chip_info = {
268 .ctl_reg = 0x4, /* send zero */
269 .enable_dma = 0,
270 .bits_per_word = 8,
271 .cs_change_per_word = 1,
272};
273#endif
274
275#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 266#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
276static struct bfin5xx_spi_chip spi_ad7877_chip_info = { 267static struct bfin5xx_spi_chip spi_ad7877_chip_info = {
277 .enable_dma = 0, 268 .enable_dma = 0,
@@ -376,24 +367,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
376 .mode = SPI_MODE_3, 367 .mode = SPI_MODE_3,
377 }, 368 },
378#endif 369#endif
379#if defined(CONFIG_PBX)
380 {
381 .modalias = "fxs-spi",
382 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
383 .bus_num = 0,
384 .chip_select = 8 - CONFIG_J11_JUMPER,
385 .controller_data = &spi_si3xxx_chip_info,
386 .mode = SPI_MODE_3,
387 },
388 {
389 .modalias = "fxo-spi",
390 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
391 .bus_num = 0,
392 .chip_select = 8 - CONFIG_J19_JUMPER,
393 .controller_data = &spi_si3xxx_chip_info,
394 .mode = SPI_MODE_3,
395 },
396#endif
397#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 370#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
398 { 371 {
399 .modalias = "ad7877", 372 .modalias = "ad7877",
@@ -596,7 +569,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
596 I2C_BOARD_INFO("pcf8574_lcd", 0x22), 569 I2C_BOARD_INFO("pcf8574_lcd", 0x22),
597 }, 570 },
598#endif 571#endif
599#if defined(CONFIG_TWI_KEYPAD) || defined(CONFIG_TWI_KEYPAD_MODULE) 572#if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE)
600 { 573 {
601 I2C_BOARD_INFO("pcf8574_keypad", 0x27), 574 I2C_BOARD_INFO("pcf8574_keypad", 0x27),
602 .irq = IRQ_PF8, 575 .irq = IRQ_PF8,
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c
index 75e563d3f9d4..2849b09abe99 100644
--- a/arch/blackfin/mach-bf527/boards/ezkit.c
+++ b/arch/blackfin/mach-bf527/boards/ezkit.c
@@ -292,6 +292,14 @@ static struct platform_device rtc_device = {
292#endif 292#endif
293 293
294#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 294#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
295#include <linux/smc91x.h>
296
297static struct smc91x_platdata smc91x_info = {
298 .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
299 .leda = RPC_LED_100_10,
300 .ledb = RPC_LED_TX_RX,
301};
302
295static struct resource smc91x_resources[] = { 303static struct resource smc91x_resources[] = {
296 { 304 {
297 .name = "smc91x-regs", 305 .name = "smc91x-regs",
@@ -310,6 +318,9 @@ static struct platform_device smc91x_device = {
310 .id = 0, 318 .id = 0,
311 .num_resources = ARRAY_SIZE(smc91x_resources), 319 .num_resources = ARRAY_SIZE(smc91x_resources),
312 .resource = smc91x_resources, 320 .resource = smc91x_resources,
321 .dev = {
322 .platform_data = &smc91x_info,
323 },
313}; 324};
314#endif 325#endif
315 326
@@ -501,13 +512,6 @@ static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
501}; 512};
502#endif 513#endif
503 514
504#if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
505static struct bfin5xx_spi_chip ad9960_spi_chip_info = {
506 .enable_dma = 0,
507 .bits_per_word = 16,
508};
509#endif
510
511#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 515#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
512static struct bfin5xx_spi_chip mmc_spi_chip_info = { 516static struct bfin5xx_spi_chip mmc_spi_chip_info = {
513 .enable_dma = 0, 517 .enable_dma = 0,
@@ -515,15 +519,6 @@ static struct bfin5xx_spi_chip mmc_spi_chip_info = {
515}; 519};
516#endif 520#endif
517 521
518#if defined(CONFIG_PBX)
519static struct bfin5xx_spi_chip spi_si3xxx_chip_info = {
520 .ctl_reg = 0x4, /* send zero */
521 .enable_dma = 0,
522 .bits_per_word = 8,
523 .cs_change_per_word = 1,
524};
525#endif
526
527#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 522#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
528static struct bfin5xx_spi_chip spi_ad7877_chip_info = { 523static struct bfin5xx_spi_chip spi_ad7877_chip_info = {
529 .enable_dma = 0, 524 .enable_dma = 0,
@@ -614,22 +609,13 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
614#if defined(CONFIG_SND_BLACKFIN_AD1836) \ 609#if defined(CONFIG_SND_BLACKFIN_AD1836) \
615 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) 610 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
616 { 611 {
617 .modalias = "ad1836-spi", 612 .modalias = "ad1836",
618 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 613 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
619 .bus_num = 0, 614 .bus_num = 0,
620 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, 615 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT,
621 .controller_data = &ad1836_spi_chip_info, 616 .controller_data = &ad1836_spi_chip_info,
622 }, 617 },
623#endif 618#endif
624#if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
625 {
626 .modalias = "ad9960-spi",
627 .max_speed_hz = 10000000, /* max spi clock (SCK) speed in HZ */
628 .bus_num = 0,
629 .chip_select = 1,
630 .controller_data = &ad9960_spi_chip_info,
631 },
632#endif
633#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 619#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
634 { 620 {
635 .modalias = "mmc_spi", 621 .modalias = "mmc_spi",
@@ -641,24 +627,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
641 }, 627 },
642#endif 628#endif
643 629
644#if defined(CONFIG_PBX)
645 {
646 .modalias = "fxs-spi",
647 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
648 .bus_num = 0,
649 .chip_select = 8 - CONFIG_J11_JUMPER,
650 .controller_data = &spi_si3xxx_chip_info,
651 .mode = SPI_MODE_3,
652 },
653 {
654 .modalias = "fxo-spi",
655 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
656 .bus_num = 0,
657 .chip_select = 8 - CONFIG_J19_JUMPER,
658 .controller_data = &spi_si3xxx_chip_info,
659 .mode = SPI_MODE_3,
660 },
661#endif
662#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 630#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
663 { 631 {
664 .modalias = "ad7877", 632 .modalias = "ad7877",
@@ -863,7 +831,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
863 I2C_BOARD_INFO("pcf8574_lcd", 0x22), 831 I2C_BOARD_INFO("pcf8574_lcd", 0x22),
864 }, 832 },
865#endif 833#endif
866#if defined(CONFIG_TWI_KEYPAD) || defined(CONFIG_TWI_KEYPAD_MODULE) 834#if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE)
867 { 835 {
868 I2C_BOARD_INFO("pcf8574_keypad", 0x27), 836 I2C_BOARD_INFO("pcf8574_keypad", 0x27),
869 .irq = IRQ_PF8, 837 .irq = IRQ_PF8,
diff --git a/arch/blackfin/mach-bf527/include/mach/anomaly.h b/arch/blackfin/mach-bf527/include/mach/anomaly.h
index c438ca89d8c9..3f9052687fa8 100644
--- a/arch/blackfin/mach-bf527/include/mach/anomaly.h
+++ b/arch/blackfin/mach-bf527/include/mach/anomaly.h
@@ -7,7 +7,7 @@
7 */ 7 */
8 8
9/* This file should be up to date with: 9/* This file should be up to date with:
10 * - Revision C, 03/13/2009; ADSP-BF526 Blackfin Processor Anomaly List 10 * - Revision D, 08/14/2009; ADSP-BF526 Blackfin Processor Anomaly List
11 * - Revision F, 03/03/2009; ADSP-BF527 Blackfin Processor Anomaly List 11 * - Revision F, 03/03/2009; ADSP-BF527 Blackfin Processor Anomaly List
12 */ 12 */
13 13
@@ -176,7 +176,7 @@
176#define ANOMALY_05000443 (1) 176#define ANOMALY_05000443 (1)
177/* The WURESET Bit in the SYSCR Register is not Functional */ 177/* The WURESET Bit in the SYSCR Register is not Functional */
178#define ANOMALY_05000445 (1) 178#define ANOMALY_05000445 (1)
179/* USB DMA Short Packet Data Corruption */ 179/* USB DMA Mode 1 Short Packet Data Corruption */
180#define ANOMALY_05000450 (1) 180#define ANOMALY_05000450 (1)
181/* BCODE_QUICKBOOT, BCODE_ALLBOOT, and BCODE_FULLBOOT Settings in SYSCR Register Not Functional */ 181/* BCODE_QUICKBOOT, BCODE_ALLBOOT, and BCODE_FULLBOOT Settings in SYSCR Register Not Functional */
182#define ANOMALY_05000451 (1) 182#define ANOMALY_05000451 (1)
@@ -186,12 +186,20 @@
186#define ANOMALY_05000456 (1) 186#define ANOMALY_05000456 (1)
187/* Host DMA Port Responds to Certain Bus Activity Without HOST_CE Assertion */ 187/* Host DMA Port Responds to Certain Bus Activity Without HOST_CE Assertion */
188#define ANOMALY_05000457 (1) 188#define ANOMALY_05000457 (1)
189/* USB DMA Mode 1 Failure When Multiple USB DMA Channels Are Concurrently Enabled */
190#define ANOMALY_05000460 (1)
189/* False Hardware Error when RETI Points to Invalid Memory */ 191/* False Hardware Error when RETI Points to Invalid Memory */
190#define ANOMALY_05000461 (1) 192#define ANOMALY_05000461 (1)
193/* Synchronization Problem at Startup May Cause SPORT Transmit Channels to Misalign */
194#define ANOMALY_05000462 (1)
191/* USB Rx DMA hang */ 195/* USB Rx DMA hang */
192#define ANOMALY_05000465 (1) 196#define ANOMALY_05000465 (1)
197/* TxPktRdy Bit Not Set for Transmit Endpoint When Core and DMA Access USB Endpoint FIFOs Simultaneously */
198#define ANOMALY_05000466 (1)
193/* Possible RX data corruption when control & data EP FIFOs are accessed via the core */ 199/* Possible RX data corruption when control & data EP FIFOs are accessed via the core */
194#define ANOMALY_05000467 (1) 200#define ANOMALY_05000467 (1)
201/* PLL Latches Incorrect Settings During Reset */
202#define ANOMALY_05000469 (1)
195 203
196/* Anomalies that don't exist on this proc */ 204/* Anomalies that don't exist on this proc */
197#define ANOMALY_05000099 (0) 205#define ANOMALY_05000099 (0)
@@ -238,6 +246,7 @@
238#define ANOMALY_05000362 (1) 246#define ANOMALY_05000362 (1)
239#define ANOMALY_05000363 (0) 247#define ANOMALY_05000363 (0)
240#define ANOMALY_05000400 (0) 248#define ANOMALY_05000400 (0)
249#define ANOMALY_05000402 (0)
241#define ANOMALY_05000412 (0) 250#define ANOMALY_05000412 (0)
242#define ANOMALY_05000447 (0) 251#define ANOMALY_05000447 (0)
243#define ANOMALY_05000448 (0) 252#define ANOMALY_05000448 (0)
diff --git a/arch/blackfin/mach-bf527/include/mach/blackfin.h b/arch/blackfin/mach-bf527/include/mach/blackfin.h
index 03665a8e16be..ea9cb0fef8bc 100644
--- a/arch/blackfin/mach-bf527/include/mach/blackfin.h
+++ b/arch/blackfin/mach-bf527/include/mach/blackfin.h
@@ -56,11 +56,6 @@
56#endif 56#endif
57#endif 57#endif
58 58
59/* UART_IIR Register */
60#define STATUS(x) ((x << 1) & 0x06)
61#define STATUS_P1 0x02
62#define STATUS_P0 0x01
63
64#define BFIN_UART_NR_PORTS 2 59#define BFIN_UART_NR_PORTS 2
65 60
66#define OFFSET_THR 0x00 /* Transmit Holding register */ 61#define OFFSET_THR 0x00 /* Transmit Holding register */
@@ -76,11 +71,6 @@
76#define OFFSET_SCR 0x1C /* SCR Scratch Register */ 71#define OFFSET_SCR 0x1C /* SCR Scratch Register */
77#define OFFSET_GCTL 0x24 /* Global Control Register */ 72#define OFFSET_GCTL 0x24 /* Global Control Register */
78 73
79/* DPMC*/
80#define bfin_read_STOPCK_OFF() bfin_read_STOPCK()
81#define bfin_write_STOPCK_OFF(val) bfin_write_STOPCK(val)
82#define STOPCK_OFF STOPCK
83
84/* PLL_DIV Masks */ 74/* PLL_DIV Masks */
85#define CCLK_DIV1 CSEL_DIV1 /* CCLK = VCO / 1 */ 75#define CCLK_DIV1 CSEL_DIV1 /* CCLK = VCO / 1 */
86#define CCLK_DIV2 CSEL_DIV2 /* CCLK = VCO / 2 */ 76#define CCLK_DIV2 CSEL_DIV2 /* CCLK = VCO / 2 */
diff --git a/arch/blackfin/mach-bf533/boards/H8606.c b/arch/blackfin/mach-bf533/boards/H8606.c
index 38cf8ffd6d74..6c2b47fe4fe4 100644
--- a/arch/blackfin/mach-bf533/boards/H8606.c
+++ b/arch/blackfin/mach-bf533/boards/H8606.c
@@ -88,6 +88,14 @@ static struct platform_device dm9000_device = {
88#endif 88#endif
89 89
90#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 90#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
91#include <linux/smc91x.h>
92
93static struct smc91x_platdata smc91x_info = {
94 .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
95 .leda = RPC_LED_100_10,
96 .ledb = RPC_LED_TX_RX,
97};
98
91static struct resource smc91x_resources[] = { 99static struct resource smc91x_resources[] = {
92 { 100 {
93 .name = "smc91x-regs", 101 .name = "smc91x-regs",
@@ -110,6 +118,9 @@ static struct platform_device smc91x_device = {
110 .id = 0, 118 .id = 0,
111 .num_resources = ARRAY_SIZE(smc91x_resources), 119 .num_resources = ARRAY_SIZE(smc91x_resources),
112 .resource = smc91x_resources, 120 .resource = smc91x_resources,
121 .dev = {
122 .platform_data = &smc91x_info,
123 },
113}; 124};
114#endif 125#endif
115 126
@@ -190,15 +201,6 @@ static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
190}; 201};
191#endif 202#endif
192 203
193#if defined(CONFIG_PBX)
194static struct bfin5xx_spi_chip spi_si3xxx_chip_info = {
195 .ctl_reg = 0x1c04,
196 .enable_dma = 0,
197 .bits_per_word = 8,
198 .cs_change_per_word = 1,
199};
200#endif
201
202/* Notice: for blackfin, the speed_hz is the value of register 204/* Notice: for blackfin, the speed_hz is the value of register
203 * SPI_BAUD, not the real baudrate */ 205 * SPI_BAUD, not the real baudrate */
204static struct spi_board_info bfin_spi_board_info[] __initdata = { 206static struct spi_board_info bfin_spi_board_info[] __initdata = {
@@ -229,7 +231,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
229 231
230#if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) 232#if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
231 { 233 {
232 .modalias = "ad1836-spi", 234 .modalias = "ad1836",
233 .max_speed_hz = 16, 235 .max_speed_hz = 16,
234 .bus_num = 1, 236 .bus_num = 1,
235 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, 237 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT,
@@ -237,23 +239,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
237 }, 239 },
238#endif 240#endif
239 241
240#if defined(CONFIG_PBX)
241 {
242 .modalias = "fxs-spi",
243 .max_speed_hz = 4,
244 .bus_num = 1,
245 .chip_select = 3,
246 .controller_data = &spi_si3xxx_chip_info,
247 },
248
249 {
250 .modalias = "fxo-spi",
251 .max_speed_hz = 4,
252 .bus_num = 1,
253 .chip_select = 2,
254 .controller_data = &spi_si3xxx_chip_info,
255 },
256#endif
257}; 242};
258 243
259/* SPI (0) */ 244/* SPI (0) */
diff --git a/arch/blackfin/mach-bf533/boards/blackstamp.c b/arch/blackfin/mach-bf533/boards/blackstamp.c
index 9ecdc361fa6d..8208d67e2c97 100644
--- a/arch/blackfin/mach-bf533/boards/blackstamp.c
+++ b/arch/blackfin/mach-bf533/boards/blackstamp.c
@@ -48,6 +48,14 @@ static struct platform_device rtc_device = {
48 * Driver needs to know address, irq and flag pin. 48 * Driver needs to know address, irq and flag pin.
49 */ 49 */
50#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 50#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
51#include <linux/smc91x.h>
52
53static struct smc91x_platdata smc91x_info = {
54 .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
55 .leda = RPC_LED_100_10,
56 .ledb = RPC_LED_TX_RX,
57};
58
51static struct resource smc91x_resources[] = { 59static struct resource smc91x_resources[] = {
52 { 60 {
53 .name = "smc91x-regs", 61 .name = "smc91x-regs",
@@ -66,6 +74,9 @@ static struct platform_device smc91x_device = {
66 .id = 0, 74 .id = 0,
67 .num_resources = ARRAY_SIZE(smc91x_resources), 75 .num_resources = ARRAY_SIZE(smc91x_resources),
68 .resource = smc91x_resources, 76 .resource = smc91x_resources,
77 .dev = {
78 .platform_data = &smc91x_info,
79 },
69}; 80};
70#endif 81#endif
71 82
diff --git a/arch/blackfin/mach-bf533/boards/cm_bf533.c b/arch/blackfin/mach-bf533/boards/cm_bf533.c
index 1443e92d8b62..7443b26c80c5 100644
--- a/arch/blackfin/mach-bf533/boards/cm_bf533.c
+++ b/arch/blackfin/mach-bf533/boards/cm_bf533.c
@@ -31,8 +31,10 @@
31#include <linux/platform_device.h> 31#include <linux/platform_device.h>
32#include <linux/mtd/mtd.h> 32#include <linux/mtd/mtd.h>
33#include <linux/mtd/partitions.h> 33#include <linux/mtd/partitions.h>
34#include <linux/mtd/physmap.h>
34#include <linux/spi/spi.h> 35#include <linux/spi/spi.h>
35#include <linux/spi/flash.h> 36#include <linux/spi/flash.h>
37#include <linux/spi/mmc_spi.h>
36#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 38#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
37#include <linux/usb/isp1362.h> 39#include <linux/usb/isp1362.h>
38#endif 40#endif
@@ -130,7 +132,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
130 132
131#if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) 133#if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
132 { 134 {
133 .modalias = "ad1836-spi", 135 .modalias = "ad1836",
134 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 136 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
135 .bus_num = 0, 137 .bus_num = 0,
136 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, 138 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT,
@@ -141,9 +143,9 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
141#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 143#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
142 { 144 {
143 .modalias = "mmc_spi", 145 .modalias = "mmc_spi",
144 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ 146 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
145 .bus_num = 0, 147 .bus_num = 0,
146 .chip_select = 5, 148 .chip_select = 1,
147 .controller_data = &mmc_spi_chip_info, 149 .controller_data = &mmc_spi_chip_info,
148 .mode = SPI_MODE_3, 150 .mode = SPI_MODE_3,
149 }, 151 },
@@ -195,6 +197,14 @@ static struct platform_device rtc_device = {
195#endif 197#endif
196 198
197#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 199#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
200#include <linux/smc91x.h>
201
202static struct smc91x_platdata smc91x_info = {
203 .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
204 .leda = RPC_LED_100_10,
205 .ledb = RPC_LED_TX_RX,
206};
207
198static struct resource smc91x_resources[] = { 208static struct resource smc91x_resources[] = {
199 { 209 {
200 .start = 0x20200300, 210 .start = 0x20200300,
@@ -211,6 +221,43 @@ static struct platform_device smc91x_device = {
211 .id = 0, 221 .id = 0,
212 .num_resources = ARRAY_SIZE(smc91x_resources), 222 .num_resources = ARRAY_SIZE(smc91x_resources),
213 .resource = smc91x_resources, 223 .resource = smc91x_resources,
224 .dev = {
225 .platform_data = &smc91x_info,
226 },
227};
228#endif
229
230#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
231#include <linux/smsc911x.h>
232
233static struct resource smsc911x_resources[] = {
234 {
235 .name = "smsc911x-memory",
236 .start = 0x20308000,
237 .end = 0x20308000 + 0xFF,
238 .flags = IORESOURCE_MEM,
239 }, {
240 .start = IRQ_PF8,
241 .end = IRQ_PF8,
242 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
243 },
244};
245
246static struct smsc911x_platform_config smsc911x_config = {
247 .flags = SMSC911X_USE_16BIT,
248 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
249 .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN,
250 .phy_interface = PHY_INTERFACE_MODE_MII,
251};
252
253static struct platform_device smsc911x_device = {
254 .name = "smsc911x",
255 .id = 0,
256 .num_resources = ARRAY_SIZE(smsc911x_resources),
257 .resource = smsc911x_resources,
258 .dev = {
259 .platform_data = &smsc911x_config,
260 },
214}; 261};
215#endif 262#endif
216 263
@@ -324,6 +371,68 @@ static struct platform_device isp1362_hcd_device = {
324}; 371};
325#endif 372#endif
326 373
374
375#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
376static struct resource net2272_bfin_resources[] = {
377 {
378 .start = 0x20300000,
379 .end = 0x20300000 + 0x100,
380 .flags = IORESOURCE_MEM,
381 }, {
382 .start = IRQ_PF6,
383 .end = IRQ_PF6,
384 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
385 },
386};
387
388static struct platform_device net2272_bfin_device = {
389 .name = "net2272",
390 .id = -1,
391 .num_resources = ARRAY_SIZE(net2272_bfin_resources),
392 .resource = net2272_bfin_resources,
393};
394#endif
395
396
397
398#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
399static struct mtd_partition para_partitions[] = {
400 {
401 .name = "bootloader(nor)",
402 .size = 0x40000,
403 .offset = 0,
404 }, {
405 .name = "linux+rootfs(nor)",
406 .size = MTDPART_SIZ_FULL,
407 .offset = MTDPART_OFS_APPEND,
408 },
409};
410
411static struct physmap_flash_data para_flash_data = {
412 .width = 2,
413 .parts = para_partitions,
414 .nr_parts = ARRAY_SIZE(para_partitions),
415};
416
417static struct resource para_flash_resource = {
418 .start = 0x20000000,
419 .end = 0x201fffff,
420 .flags = IORESOURCE_MEM,
421};
422
423static struct platform_device para_flash_device = {
424 .name = "physmap-flash",
425 .id = 0,
426 .dev = {
427 .platform_data = &para_flash_data,
428 },
429 .num_resources = 1,
430 .resource = &para_flash_resource,
431};
432#endif
433
434
435
327static const unsigned int cclk_vlev_datasheet[] = 436static const unsigned int cclk_vlev_datasheet[] =
328{ 437{
329 VRPAIR(VLEV_085, 250000000), 438 VRPAIR(VLEV_085, 250000000),
@@ -382,10 +491,22 @@ static struct platform_device *cm_bf533_devices[] __initdata = {
382 &smc91x_device, 491 &smc91x_device,
383#endif 492#endif
384 493
494#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
495 &smsc911x_device,
496#endif
497
498#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
499 &net2272_bfin_device,
500#endif
501
385#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 502#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
386 &bfin_spi0_device, 503 &bfin_spi0_device,
387#endif 504#endif
388 505
506#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
507 &para_flash_device,
508#endif
509
389 &bfin_gpios_device, 510 &bfin_gpios_device,
390}; 511};
391 512
diff --git a/arch/blackfin/mach-bf533/boards/ezkit.c b/arch/blackfin/mach-bf533/boards/ezkit.c
index 4e3e511bf146..fd518e383b79 100644
--- a/arch/blackfin/mach-bf533/boards/ezkit.c
+++ b/arch/blackfin/mach-bf533/boards/ezkit.c
@@ -67,6 +67,14 @@ static struct platform_device bfin_fb_adv7393_device = {
67 * Driver needs to know address, irq and flag pin. 67 * Driver needs to know address, irq and flag pin.
68 */ 68 */
69#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 69#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
70#include <linux/smc91x.h>
71
72static struct smc91x_platdata smc91x_info = {
73 .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
74 .leda = RPC_LED_100_10,
75 .ledb = RPC_LED_TX_RX,
76};
77
70static struct resource smc91x_resources[] = { 78static struct resource smc91x_resources[] = {
71 { 79 {
72 .name = "smc91x-regs", 80 .name = "smc91x-regs",
@@ -84,6 +92,9 @@ static struct platform_device smc91x_device = {
84 .id = 0, 92 .id = 0,
85 .num_resources = ARRAY_SIZE(smc91x_resources), 93 .num_resources = ARRAY_SIZE(smc91x_resources),
86 .resource = smc91x_resources, 94 .resource = smc91x_resources,
95 .dev = {
96 .platform_data = &smc91x_info,
97 },
87}; 98};
88#endif 99#endif
89 100
@@ -263,7 +274,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
263 274
264#if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) 275#if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
265 { 276 {
266 .modalias = "ad1836-spi", 277 .modalias = "ad1836",
267 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 278 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
268 .bus_num = 0, 279 .bus_num = 0,
269 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, 280 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT,
diff --git a/arch/blackfin/mach-bf533/boards/stamp.c b/arch/blackfin/mach-bf533/boards/stamp.c
index 3d743ccaff6a..729fd7c26336 100644
--- a/arch/blackfin/mach-bf533/boards/stamp.c
+++ b/arch/blackfin/mach-bf533/boards/stamp.c
@@ -35,6 +35,7 @@
35#include <linux/mtd/physmap.h> 35#include <linux/mtd/physmap.h>
36#include <linux/spi/spi.h> 36#include <linux/spi/spi.h>
37#include <linux/spi/flash.h> 37#include <linux/spi/flash.h>
38#include <linux/spi/mmc_spi.h>
38#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 39#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
39#include <linux/usb/isp1362.h> 40#include <linux/usb/isp1362.h>
40#endif 41#endif
@@ -62,6 +63,14 @@ static struct platform_device rtc_device = {
62 * Driver needs to know address, irq and flag pin. 63 * Driver needs to know address, irq and flag pin.
63 */ 64 */
64#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 65#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
66#include <linux/smc91x.h>
67
68static struct smc91x_platdata smc91x_info = {
69 .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
70 .leda = RPC_LED_100_10,
71 .ledb = RPC_LED_TX_RX,
72};
73
65static struct resource smc91x_resources[] = { 74static struct resource smc91x_resources[] = {
66 { 75 {
67 .name = "smc91x-regs", 76 .name = "smc91x-regs",
@@ -80,6 +89,9 @@ static struct platform_device smc91x_device = {
80 .id = 0, 89 .id = 0,
81 .num_resources = ARRAY_SIZE(smc91x_resources), 90 .num_resources = ARRAY_SIZE(smc91x_resources),
82 .resource = smc91x_resources, 91 .resource = smc91x_resources,
92 .dev = {
93 .platform_data = &smc91x_info,
94 },
83}; 95};
84#endif 96#endif
85 97
@@ -207,19 +219,38 @@ static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
207}; 219};
208#endif 220#endif
209 221
210#if defined(CONFIG_PBX) 222#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
211static struct bfin5xx_spi_chip spi_si3xxx_chip_info = { 223static struct bfin5xx_spi_chip spidev_chip_info = {
212 .ctl_reg = 0x4, /* send zero */ 224 .enable_dma = 0,
213 .enable_dma = 0, 225 .bits_per_word = 8,
214 .bits_per_word = 8,
215 .cs_change_per_word = 1,
216}; 226};
217#endif 227#endif
218 228
219#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 229#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
220static struct bfin5xx_spi_chip spidev_chip_info = { 230#define MMC_SPI_CARD_DETECT_INT IRQ_PF5
231static int bfin_mmc_spi_init(struct device *dev,
232 irqreturn_t (*detect_int)(int, void *), void *data)
233{
234 return request_irq(MMC_SPI_CARD_DETECT_INT, detect_int,
235 IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
236 "mmc-spi-detect", data);
237}
238
239static void bfin_mmc_spi_exit(struct device *dev, void *data)
240{
241 free_irq(MMC_SPI_CARD_DETECT_INT, data);
242}
243
244static struct mmc_spi_platform_data bfin_mmc_spi_pdata = {
245 .init = bfin_mmc_spi_init,
246 .exit = bfin_mmc_spi_exit,
247 .detect_delay = 100, /* msecs */
248};
249
250static struct bfin5xx_spi_chip mmc_spi_chip_info = {
221 .enable_dma = 0, 251 .enable_dma = 0,
222 .bits_per_word = 8, 252 .bits_per_word = 8,
253 .pio_interrupt = 0,
223}; 254};
224#endif 255#endif
225 256
@@ -250,33 +281,14 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
250 281
251#if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) 282#if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
252 { 283 {
253 .modalias = "ad1836-spi", 284 .modalias = "ad1836",
254 .max_speed_hz = 31250000, /* max spi clock (SCK) speed in HZ */ 285 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
255 .bus_num = 0, 286 .bus_num = 0,
256 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, 287 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT,
257 .controller_data = &ad1836_spi_chip_info, 288 .controller_data = &ad1836_spi_chip_info,
258 }, 289 },
259#endif 290#endif
260 291
261#if defined(CONFIG_PBX)
262 {
263 .modalias = "fxs-spi",
264 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
265 .bus_num = 0,
266 .chip_select = 8 - CONFIG_J11_JUMPER,
267 .controller_data = &spi_si3xxx_chip_info,
268 .mode = SPI_MODE_3,
269 },
270 {
271 .modalias = "fxo-spi",
272 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
273 .bus_num = 0,
274 .chip_select = 8 - CONFIG_J19_JUMPER,
275 .controller_data = &spi_si3xxx_chip_info,
276 .mode = SPI_MODE_3,
277 },
278#endif
279
280#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 292#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
281 { 293 {
282 .modalias = "spidev", 294 .modalias = "spidev",
@@ -286,6 +298,17 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
286 .controller_data = &spidev_chip_info, 298 .controller_data = &spidev_chip_info,
287 }, 299 },
288#endif 300#endif
301#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
302 {
303 .modalias = "mmc_spi",
304 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
305 .bus_num = 0,
306 .chip_select = 4,
307 .platform_data = &bfin_mmc_spi_pdata,
308 .controller_data = &mmc_spi_chip_info,
309 .mode = SPI_MODE_3,
310 },
311#endif
289}; 312};
290 313
291#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 314#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
@@ -458,7 +481,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
458 I2C_BOARD_INFO("pcf8574_lcd", 0x22), 481 I2C_BOARD_INFO("pcf8574_lcd", 0x22),
459 }, 482 },
460#endif 483#endif
461#if defined(CONFIG_TWI_KEYPAD) || defined(CONFIG_TWI_KEYPAD_MODULE) 484#if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE)
462 { 485 {
463 I2C_BOARD_INFO("pcf8574_keypad", 0x27), 486 I2C_BOARD_INFO("pcf8574_keypad", 0x27),
464 .irq = 39, 487 .irq = 39,
diff --git a/arch/blackfin/mach-bf533/dma.c b/arch/blackfin/mach-bf533/dma.c
index 0a6eb8f24d98..7a443c37fb9f 100644
--- a/arch/blackfin/mach-bf533/dma.c
+++ b/arch/blackfin/mach-bf533/dma.c
@@ -76,12 +76,12 @@ int channel2irq(unsigned int channel)
76 ret_irq = IRQ_SPI; 76 ret_irq = IRQ_SPI;
77 break; 77 break;
78 78
79 case CH_UART_RX: 79 case CH_UART0_RX:
80 ret_irq = IRQ_UART_RX; 80 ret_irq = IRQ_UART0_RX;
81 break; 81 break;
82 82
83 case CH_UART_TX: 83 case CH_UART0_TX:
84 ret_irq = IRQ_UART_TX; 84 ret_irq = IRQ_UART0_TX;
85 break; 85 break;
86 86
87 case CH_MEM_STREAM0_SRC: 87 case CH_MEM_STREAM0_SRC:
diff --git a/arch/blackfin/mach-bf533/include/mach/bfin_serial_5xx.h b/arch/blackfin/mach-bf533/include/mach/bfin_serial_5xx.h
index 4062e24e759b..6965b4088c44 100644
--- a/arch/blackfin/mach-bf533/include/mach/bfin_serial_5xx.h
+++ b/arch/blackfin/mach-bf533/include/mach/bfin_serial_5xx.h
@@ -131,11 +131,11 @@ struct bfin_serial_res {
131struct bfin_serial_res bfin_serial_resource[] = { 131struct bfin_serial_res bfin_serial_resource[] = {
132 { 132 {
133 0xFFC00400, 133 0xFFC00400,
134 IRQ_UART_RX, 134 IRQ_UART0_RX,
135 IRQ_UART_ERROR, 135 IRQ_UART0_ERROR,
136#ifdef CONFIG_SERIAL_BFIN_DMA 136#ifdef CONFIG_SERIAL_BFIN_DMA
137 CH_UART_TX, 137 CH_UART0_TX,
138 CH_UART_RX, 138 CH_UART0_RX,
139#endif 139#endif
140#ifdef CONFIG_SERIAL_BFIN_CTSRTS 140#ifdef CONFIG_SERIAL_BFIN_CTSRTS
141 CONFIG_UART0_CTS_PIN, 141 CONFIG_UART0_CTS_PIN,
diff --git a/arch/blackfin/mach-bf533/include/mach/blackfin.h b/arch/blackfin/mach-bf533/include/mach/blackfin.h
index 39aa175f19f5..499e897a4f4f 100644
--- a/arch/blackfin/mach-bf533/include/mach/blackfin.h
+++ b/arch/blackfin/mach-bf533/include/mach/blackfin.h
@@ -43,13 +43,6 @@
43 43
44#define BFIN_UART_NR_PORTS 1 44#define BFIN_UART_NR_PORTS 1
45 45
46#define CH_UART_RX CH_UART0_RX
47#define CH_UART_TX CH_UART0_TX
48
49#define IRQ_UART_ERROR IRQ_UART0_ERROR
50#define IRQ_UART_RX IRQ_UART0_RX
51#define IRQ_UART_TX IRQ_UART0_TX
52
53#define OFFSET_THR 0x00 /* Transmit Holding register */ 46#define OFFSET_THR 0x00 /* Transmit Holding register */
54#define OFFSET_RBR 0x00 /* Receive Buffer register */ 47#define OFFSET_RBR 0x00 /* Receive Buffer register */
55#define OFFSET_DLL 0x00 /* Divisor Latch (Low-Byte) */ 48#define OFFSET_DLL 0x00 /* Divisor Latch (Low-Byte) */
diff --git a/arch/blackfin/mach-bf537/boards/Kconfig b/arch/blackfin/mach-bf537/boards/Kconfig
index 77c59da87e85..44132fda63be 100644
--- a/arch/blackfin/mach-bf537/boards/Kconfig
+++ b/arch/blackfin/mach-bf537/boards/Kconfig
@@ -9,11 +9,17 @@ config BFIN537_STAMP
9 help 9 help
10 BF537-STAMP board support. 10 BF537-STAMP board support.
11 11
12config BFIN537_BLUETECHNIX_CM 12config BFIN537_BLUETECHNIX_CM_E
13 bool "Bluetechnix CM-BF537" 13 bool "Bluetechnix CM-BF537E"
14 depends on (BF537) 14 depends on (BF537)
15 help 15 help
16 CM-BF537 support for EVAL- and DEV-Board. 16 CM-BF537E support for EVAL- and DEV-Board.
17
18config BFIN537_BLUETECHNIX_CM_U
19 bool "Bluetechnix CM-BF537U"
20 depends on (BF537)
21 help
22 CM-BF537U support for EVAL- and DEV-Board.
17 23
18config BFIN537_BLUETECHNIX_TCM 24config BFIN537_BLUETECHNIX_TCM
19 bool "Bluetechnix TCM-BF537" 25 bool "Bluetechnix TCM-BF537"
diff --git a/arch/blackfin/mach-bf537/boards/Makefile b/arch/blackfin/mach-bf537/boards/Makefile
index 68b98a7af6a6..7e6aa4e5b205 100644
--- a/arch/blackfin/mach-bf537/boards/Makefile
+++ b/arch/blackfin/mach-bf537/boards/Makefile
@@ -3,7 +3,8 @@
3# 3#
4 4
5obj-$(CONFIG_BFIN537_STAMP) += stamp.o 5obj-$(CONFIG_BFIN537_STAMP) += stamp.o
6obj-$(CONFIG_BFIN537_BLUETECHNIX_CM) += cm_bf537.o 6obj-$(CONFIG_BFIN537_BLUETECHNIX_CM_E) += cm_bf537e.o
7obj-$(CONFIG_BFIN537_BLUETECHNIX_CM_U) += cm_bf537u.o
7obj-$(CONFIG_BFIN537_BLUETECHNIX_TCM) += tcm_bf537.o 8obj-$(CONFIG_BFIN537_BLUETECHNIX_TCM) += tcm_bf537.o
8obj-$(CONFIG_PNAV10) += pnav10.o 9obj-$(CONFIG_PNAV10) += pnav10.o
9obj-$(CONFIG_CAMSIG_MINOTAUR) += minotaur.o 10obj-$(CONFIG_CAMSIG_MINOTAUR) += minotaur.o
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537e.c b/arch/blackfin/mach-bf537/boards/cm_bf537e.c
new file mode 100644
index 000000000000..87acb7dd2df3
--- /dev/null
+++ b/arch/blackfin/mach-bf537/boards/cm_bf537e.c
@@ -0,0 +1,727 @@
1/*
2 * File: arch/blackfin/mach-bf537/boards/cm_bf537.c
3 * Based on: arch/blackfin/mach-bf533/boards/ezkit.c
4 * Author: Aidan Williams <aidan@nicta.com.au>
5 *
6 * Created: 2005
7 * Description: Board description file
8 *
9 * Modified:
10 * Copyright 2005 National ICT Australia (NICTA)
11 * Copyright 2004-2006 Analog Devices Inc.
12 *
13 * Bugs: Enter bugs at http://blackfin.uclinux.org/
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2 of the License, or
18 * (at your option) any later version.
19 *
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with this program; if not, see the file COPYING, or write
27 * to the Free Software Foundation, Inc.,
28 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29 */
30
31#include <linux/device.h>
32#include <linux/etherdevice.h>
33#include <linux/platform_device.h>
34#include <linux/mtd/mtd.h>
35#include <linux/mtd/partitions.h>
36#include <linux/mtd/physmap.h>
37#include <linux/spi/spi.h>
38#include <linux/spi/flash.h>
39#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
40#include <linux/usb/isp1362.h>
41#endif
42#include <linux/ata_platform.h>
43#include <linux/irq.h>
44#include <asm/dma.h>
45#include <asm/bfin5xx_spi.h>
46#include <asm/portmux.h>
47#include <asm/dpmc.h>
48
49/*
50 * Name the Board for the /proc/cpuinfo
51 */
52const char bfin_board_name[] = "Bluetechnix CM BF537E";
53
54#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
55/* all SPI peripherals info goes here */
56
57#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE)
58static struct mtd_partition bfin_spi_flash_partitions[] = {
59 {
60 .name = "bootloader(spi)",
61 .size = 0x00020000,
62 .offset = 0,
63 .mask_flags = MTD_CAP_ROM
64 }, {
65 .name = "linux kernel(spi)",
66 .size = 0xe0000,
67 .offset = 0x20000
68 }, {
69 .name = "file system(spi)",
70 .size = 0x700000,
71 .offset = 0x00100000,
72 }
73};
74
75static struct flash_platform_data bfin_spi_flash_data = {
76 .name = "m25p80",
77 .parts = bfin_spi_flash_partitions,
78 .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
79 .type = "m25p64",
80};
81
82/* SPI flash chip (m25p64) */
83static struct bfin5xx_spi_chip spi_flash_chip_info = {
84 .enable_dma = 0, /* use dma transfer with this chip*/
85 .bits_per_word = 8,
86};
87#endif
88
89#if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE)
90/* SPI ADC chip */
91static struct bfin5xx_spi_chip spi_adc_chip_info = {
92 .enable_dma = 1, /* use dma transfer with this chip*/
93 .bits_per_word = 16,
94};
95#endif
96
97#if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
98static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
99 .enable_dma = 0,
100 .bits_per_word = 16,
101};
102#endif
103
104#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
105static struct bfin5xx_spi_chip mmc_spi_chip_info = {
106 .enable_dma = 0,
107 .bits_per_word = 8,
108};
109#endif
110
111static struct spi_board_info bfin_spi_board_info[] __initdata = {
112#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE)
113 {
114 /* the modalias must be the same as spi device driver name */
115 .modalias = "m25p80", /* Name of spi_driver for this device */
116 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
117 .bus_num = 0, /* Framework bus number */
118 .chip_select = 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/
119 .platform_data = &bfin_spi_flash_data,
120 .controller_data = &spi_flash_chip_info,
121 .mode = SPI_MODE_3,
122 },
123#endif
124
125#if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE)
126 {
127 .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
128 .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
129 .bus_num = 0, /* Framework bus number */
130 .chip_select = 1, /* Framework chip select. */
131 .platform_data = NULL, /* No spi_driver specific config */
132 .controller_data = &spi_adc_chip_info,
133 },
134#endif
135
136#if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
137 {
138 .modalias = "ad1836",
139 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
140 .bus_num = 0,
141 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT,
142 .controller_data = &ad1836_spi_chip_info,
143 },
144#endif
145
146#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
147 {
148 .modalias = "mmc_spi",
149 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
150 .bus_num = 0,
151 .chip_select = 1,
152 .controller_data = &mmc_spi_chip_info,
153 .mode = SPI_MODE_3,
154 },
155#endif
156};
157
158/* SPI (0) */
159static struct resource bfin_spi0_resource[] = {
160 [0] = {
161 .start = SPI0_REGBASE,
162 .end = SPI0_REGBASE + 0xFF,
163 .flags = IORESOURCE_MEM,
164 },
165 [1] = {
166 .start = CH_SPI,
167 .end = CH_SPI,
168 .flags = IORESOURCE_DMA,
169 },
170 [2] = {
171 .start = IRQ_SPI,
172 .end = IRQ_SPI,
173 .flags = IORESOURCE_IRQ,
174 },
175};
176
177/* SPI controller data */
178static struct bfin5xx_spi_master bfin_spi0_info = {
179 .num_chipselect = 8,
180 .enable_dma = 1, /* master has the ability to do dma transfer */
181 .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0},
182};
183
184static struct platform_device bfin_spi0_device = {
185 .name = "bfin-spi",
186 .id = 0, /* Bus number */
187 .num_resources = ARRAY_SIZE(bfin_spi0_resource),
188 .resource = bfin_spi0_resource,
189 .dev = {
190 .platform_data = &bfin_spi0_info, /* Passed to driver */
191 },
192};
193#endif /* spi master and devices */
194
195#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
196static struct platform_device rtc_device = {
197 .name = "rtc-bfin",
198 .id = -1,
199};
200#endif
201
202#if defined(CONFIG_FB_HITACHI_TX09) || defined(CONFIG_FB_HITACHI_TX09_MODULE)
203static struct platform_device hitachi_fb_device = {
204 .name = "hitachi-tx09",
205};
206#endif
207
208#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
209#include <linux/smc91x.h>
210
211static struct smc91x_platdata smc91x_info = {
212 .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
213 .leda = RPC_LED_100_10,
214 .ledb = RPC_LED_TX_RX,
215};
216
217static struct resource smc91x_resources[] = {
218 {
219 .start = 0x20200300,
220 .end = 0x20200300 + 16,
221 .flags = IORESOURCE_MEM,
222 }, {
223 .start = IRQ_PF14,
224 .end = IRQ_PF14,
225 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
226 },
227};
228
229static struct platform_device smc91x_device = {
230 .name = "smc91x",
231 .id = 0,
232 .num_resources = ARRAY_SIZE(smc91x_resources),
233 .resource = smc91x_resources,
234 .dev = {
235 .platform_data = &smc91x_info,
236 },
237};
238#endif
239
240#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
241static struct resource isp1362_hcd_resources[] = {
242 {
243 .start = 0x20308000,
244 .end = 0x20308000,
245 .flags = IORESOURCE_MEM,
246 }, {
247 .start = 0x20308004,
248 .end = 0x20308004,
249 .flags = IORESOURCE_MEM,
250 }, {
251 .start = IRQ_PG15,
252 .end = IRQ_PG15,
253 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
254 },
255};
256
257static struct isp1362_platform_data isp1362_priv = {
258 .sel15Kres = 1,
259 .clknotstop = 0,
260 .oc_enable = 0,
261 .int_act_high = 0,
262 .int_edge_triggered = 0,
263 .remote_wakeup_connected = 0,
264 .no_power_switching = 1,
265 .power_switching_mode = 0,
266};
267
268static struct platform_device isp1362_hcd_device = {
269 .name = "isp1362-hcd",
270 .id = 0,
271 .dev = {
272 .platform_data = &isp1362_priv,
273 },
274 .num_resources = ARRAY_SIZE(isp1362_hcd_resources),
275 .resource = isp1362_hcd_resources,
276};
277#endif
278
279#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
280static struct resource net2272_bfin_resources[] = {
281 {
282 .start = 0x20300000,
283 .end = 0x20300000 + 0x100,
284 .flags = IORESOURCE_MEM,
285 }, {
286 .start = IRQ_PG13,
287 .end = IRQ_PG13,
288 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
289 },
290};
291
292static struct platform_device net2272_bfin_device = {
293 .name = "net2272",
294 .id = -1,
295 .num_resources = ARRAY_SIZE(net2272_bfin_resources),
296 .resource = net2272_bfin_resources,
297};
298#endif
299
300static struct resource bfin_gpios_resources = {
301 .start = 0,
302 .end = MAX_BLACKFIN_GPIOS - 1,
303 .flags = IORESOURCE_IRQ,
304};
305
306static struct platform_device bfin_gpios_device = {
307 .name = "simple-gpio",
308 .id = -1,
309 .num_resources = 1,
310 .resource = &bfin_gpios_resources,
311};
312
313#if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE)
314static struct mtd_partition cm_partitions[] = {
315 {
316 .name = "bootloader(nor)",
317 .size = 0x40000,
318 .offset = 0,
319 }, {
320 .name = "linux kernel(nor)",
321 .size = 0x100000,
322 .offset = MTDPART_OFS_APPEND,
323 }, {
324 .name = "file system(nor)",
325 .size = MTDPART_SIZ_FULL,
326 .offset = MTDPART_OFS_APPEND,
327 }
328};
329
330static struct physmap_flash_data cm_flash_data = {
331 .width = 2,
332 .parts = cm_partitions,
333 .nr_parts = ARRAY_SIZE(cm_partitions),
334};
335
336static unsigned cm_flash_gpios[] = { GPIO_PF4 };
337
338static struct resource cm_flash_resource[] = {
339 {
340 .name = "cfi_probe",
341 .start = 0x20000000,
342 .end = 0x201fffff,
343 .flags = IORESOURCE_MEM,
344 }, {
345 .start = (unsigned long)cm_flash_gpios,
346 .end = ARRAY_SIZE(cm_flash_gpios),
347 .flags = IORESOURCE_IRQ,
348 }
349};
350
351static struct platform_device cm_flash_device = {
352 .name = "gpio-addr-flash",
353 .id = 0,
354 .dev = {
355 .platform_data = &cm_flash_data,
356 },
357 .num_resources = ARRAY_SIZE(cm_flash_resource),
358 .resource = cm_flash_resource,
359};
360#endif
361
362#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
363#ifdef CONFIG_SERIAL_BFIN_UART0
364static struct resource bfin_uart0_resources[] = {
365 {
366 .start = 0xFFC00400,
367 .end = 0xFFC004FF,
368 .flags = IORESOURCE_MEM,
369 },
370 {
371 .start = IRQ_UART0_RX,
372 .end = IRQ_UART0_RX+1,
373 .flags = IORESOURCE_IRQ,
374 },
375 {
376 .start = IRQ_UART0_ERROR,
377 .end = IRQ_UART0_ERROR,
378 .flags = IORESOURCE_IRQ,
379 },
380 {
381 .start = CH_UART0_TX,
382 .end = CH_UART0_TX,
383 .flags = IORESOURCE_DMA,
384 },
385 {
386 .start = CH_UART0_RX,
387 .end = CH_UART0_RX,
388 .flags = IORESOURCE_DMA,
389 },
390#ifdef CONFIG_BFIN_UART0_CTSRTS
391 {
392 /*
393 * Refer to arch/blackfin/mach-xxx/include/mach/gpio.h for the GPIO map.
394 */
395 .start = -1,
396 .end = -1,
397 .flags = IORESOURCE_IO,
398 },
399 {
400 /*
401 * Refer to arch/blackfin/mach-xxx/include/mach/gpio.h for the GPIO map.
402 */
403 .start = -1,
404 .end = -1,
405 .flags = IORESOURCE_IO,
406 },
407#endif
408};
409
410static struct platform_device bfin_uart0_device = {
411 .name = "bfin-uart",
412 .id = 0,
413 .num_resources = ARRAY_SIZE(bfin_uart0_resources),
414 .resource = bfin_uart0_resources,
415};
416#endif
417#ifdef CONFIG_SERIAL_BFIN_UART1
418static struct resource bfin_uart1_resources[] = {
419 {
420 .start = 0xFFC02000,
421 .end = 0xFFC020FF,
422 .flags = IORESOURCE_MEM,
423 },
424 {
425 .start = IRQ_UART1_RX,
426 .end = IRQ_UART1_RX+1,
427 .flags = IORESOURCE_IRQ,
428 },
429 {
430 .start = IRQ_UART1_ERROR,
431 .end = IRQ_UART1_ERROR,
432 .flags = IORESOURCE_IRQ,
433 },
434 {
435 .start = CH_UART1_TX,
436 .end = CH_UART1_TX,
437 .flags = IORESOURCE_DMA,
438 },
439 {
440 .start = CH_UART1_RX,
441 .end = CH_UART1_RX,
442 .flags = IORESOURCE_DMA,
443 },
444#ifdef CONFIG_BFIN_UART1_CTSRTS
445 {
446 /*
447 * Refer to arch/blackfin/mach-xxx/include/mach/gpio.h for the GPIO map.
448 */
449 .start = -1,
450 .end = -1,
451 .flags = IORESOURCE_IO,
452 },
453 {
454 /*
455 * Refer to arch/blackfin/mach-xxx/include/mach/gpio.h for the GPIO map.
456 */
457 .start = -1,
458 .end = -1,
459 .flags = IORESOURCE_IO,
460 },
461#endif
462};
463
464static struct platform_device bfin_uart1_device = {
465 .name = "bfin-uart",
466 .id = 1,
467 .num_resources = ARRAY_SIZE(bfin_uart1_resources),
468 .resource = bfin_uart1_resources,
469};
470#endif
471#endif
472
473#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
474#ifdef CONFIG_BFIN_SIR0
475static struct resource bfin_sir0_resources[] = {
476 {
477 .start = 0xFFC00400,
478 .end = 0xFFC004FF,
479 .flags = IORESOURCE_MEM,
480 },
481 {
482 .start = IRQ_UART0_RX,
483 .end = IRQ_UART0_RX+1,
484 .flags = IORESOURCE_IRQ,
485 },
486 {
487 .start = CH_UART0_RX,
488 .end = CH_UART0_RX+1,
489 .flags = IORESOURCE_DMA,
490 },
491};
492static struct platform_device bfin_sir0_device = {
493 .name = "bfin_sir",
494 .id = 0,
495 .num_resources = ARRAY_SIZE(bfin_sir0_resources),
496 .resource = bfin_sir0_resources,
497};
498#endif
499#ifdef CONFIG_BFIN_SIR1
500static struct resource bfin_sir1_resources[] = {
501 {
502 .start = 0xFFC02000,
503 .end = 0xFFC020FF,
504 .flags = IORESOURCE_MEM,
505 },
506 {
507 .start = IRQ_UART1_RX,
508 .end = IRQ_UART1_RX+1,
509 .flags = IORESOURCE_IRQ,
510 },
511 {
512 .start = CH_UART1_RX,
513 .end = CH_UART1_RX+1,
514 .flags = IORESOURCE_DMA,
515 },
516};
517static struct platform_device bfin_sir1_device = {
518 .name = "bfin_sir",
519 .id = 1,
520 .num_resources = ARRAY_SIZE(bfin_sir1_resources),
521 .resource = bfin_sir1_resources,
522};
523#endif
524#endif
525
526#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
527static struct resource bfin_twi0_resource[] = {
528 [0] = {
529 .start = TWI0_REGBASE,
530 .end = TWI0_REGBASE,
531 .flags = IORESOURCE_MEM,
532 },
533 [1] = {
534 .start = IRQ_TWI,
535 .end = IRQ_TWI,
536 .flags = IORESOURCE_IRQ,
537 },
538};
539
540static struct platform_device i2c_bfin_twi_device = {
541 .name = "i2c-bfin-twi",
542 .id = 0,
543 .num_resources = ARRAY_SIZE(bfin_twi0_resource),
544 .resource = bfin_twi0_resource,
545};
546#endif
547
548#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
549static struct platform_device bfin_sport0_uart_device = {
550 .name = "bfin-sport-uart",
551 .id = 0,
552};
553
554static struct platform_device bfin_sport1_uart_device = {
555 .name = "bfin-sport-uart",
556 .id = 1,
557};
558#endif
559
560#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
561static struct platform_device bfin_mii_bus = {
562 .name = "bfin_mii_bus",
563};
564
565static struct platform_device bfin_mac_device = {
566 .name = "bfin_mac",
567 .dev.platform_data = &bfin_mii_bus,
568};
569#endif
570
571#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
572#define PATA_INT IRQ_PF14
573
574static struct pata_platform_info bfin_pata_platform_data = {
575 .ioport_shift = 2,
576 .irq_type = IRQF_TRIGGER_HIGH | IRQF_DISABLED,
577};
578
579static struct resource bfin_pata_resources[] = {
580 {
581 .start = 0x2030C000,
582 .end = 0x2030C01F,
583 .flags = IORESOURCE_MEM,
584 },
585 {
586 .start = 0x2030D018,
587 .end = 0x2030D01B,
588 .flags = IORESOURCE_MEM,
589 },
590 {
591 .start = PATA_INT,
592 .end = PATA_INT,
593 .flags = IORESOURCE_IRQ,
594 },
595};
596
597static struct platform_device bfin_pata_device = {
598 .name = "pata_platform",
599 .id = -1,
600 .num_resources = ARRAY_SIZE(bfin_pata_resources),
601 .resource = bfin_pata_resources,
602 .dev = {
603 .platform_data = &bfin_pata_platform_data,
604 }
605};
606#endif
607
608static const unsigned int cclk_vlev_datasheet[] =
609{
610 VRPAIR(VLEV_085, 250000000),
611 VRPAIR(VLEV_090, 376000000),
612 VRPAIR(VLEV_095, 426000000),
613 VRPAIR(VLEV_100, 426000000),
614 VRPAIR(VLEV_105, 476000000),
615 VRPAIR(VLEV_110, 476000000),
616 VRPAIR(VLEV_115, 476000000),
617 VRPAIR(VLEV_120, 500000000),
618 VRPAIR(VLEV_125, 533000000),
619 VRPAIR(VLEV_130, 600000000),
620};
621
622static struct bfin_dpmc_platform_data bfin_dmpc_vreg_data = {
623 .tuple_tab = cclk_vlev_datasheet,
624 .tabsize = ARRAY_SIZE(cclk_vlev_datasheet),
625 .vr_settling_time = 25 /* us */,
626};
627
628static struct platform_device bfin_dpmc = {
629 .name = "bfin dpmc",
630 .dev = {
631 .platform_data = &bfin_dmpc_vreg_data,
632 },
633};
634
635static struct platform_device *cm_bf537e_devices[] __initdata = {
636
637 &bfin_dpmc,
638
639#if defined(CONFIG_FB_HITACHI_TX09) || defined(CONFIG_FB_HITACHI_TX09_MODULE)
640 &hitachi_fb_device,
641#endif
642
643#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
644 &rtc_device,
645#endif
646
647#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
648#ifdef CONFIG_SERIAL_BFIN_UART0
649 &bfin_uart0_device,
650#endif
651#ifdef CONFIG_SERIAL_BFIN_UART1
652 &bfin_uart1_device,
653#endif
654#endif
655
656#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
657#ifdef CONFIG_BFIN_SIR0
658 &bfin_sir0_device,
659#endif
660#ifdef CONFIG_BFIN_SIR1
661 &bfin_sir1_device,
662#endif
663#endif
664
665#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
666 &i2c_bfin_twi_device,
667#endif
668
669#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
670 &bfin_sport0_uart_device,
671 &bfin_sport1_uart_device,
672#endif
673
674#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
675 &isp1362_hcd_device,
676#endif
677
678#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
679 &smc91x_device,
680#endif
681
682#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
683 &bfin_mii_bus,
684 &bfin_mac_device,
685#endif
686
687#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
688 &net2272_bfin_device,
689#endif
690
691#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
692 &bfin_spi0_device,
693#endif
694
695#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
696 &bfin_pata_device,
697#endif
698
699#if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE)
700 &cm_flash_device,
701#endif
702
703 &bfin_gpios_device,
704};
705
706static int __init cm_bf537e_init(void)
707{
708 printk(KERN_INFO "%s(): registering device resources\n", __func__);
709 platform_add_devices(cm_bf537e_devices, ARRAY_SIZE(cm_bf537e_devices));
710#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
711 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
712#endif
713
714#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
715 irq_desc[PATA_INT].status |= IRQ_NOAUTOEN;
716#endif
717 return 0;
718}
719
720arch_initcall(cm_bf537e_init);
721
722void bfin_get_ether_addr(char *addr)
723{
724 random_ether_addr(addr);
725 printk(KERN_WARNING "%s:%s: Setting Ethernet MAC to a random one\n", __FILE__, __func__);
726}
727EXPORT_SYMBOL(bfin_get_ether_addr);
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537.c b/arch/blackfin/mach-bf537/boards/cm_bf537u.c
index 2a87d1cfcd06..8219dc3d65bd 100644
--- a/arch/blackfin/mach-bf537/boards/cm_bf537.c
+++ b/arch/blackfin/mach-bf537/boards/cm_bf537u.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * File: arch/blackfin/mach-bf537/boards/cm_bf537.c 2 * File: arch/blackfin/mach-bf537/boards/cm_bf537u.c
3 * Based on: arch/blackfin/mach-bf533/boards/ezkit.c 3 * Based on: arch/blackfin/mach-bf533/boards/ezkit.c
4 * Author: Aidan Williams <aidan@nicta.com.au> 4 * Author: Aidan Williams <aidan@nicta.com.au>
5 * 5 *
@@ -45,11 +45,12 @@
45#include <asm/bfin5xx_spi.h> 45#include <asm/bfin5xx_spi.h>
46#include <asm/portmux.h> 46#include <asm/portmux.h>
47#include <asm/dpmc.h> 47#include <asm/dpmc.h>
48#include <linux/spi/mmc_spi.h>
48 49
49/* 50/*
50 * Name the Board for the /proc/cpuinfo 51 * Name the Board for the /proc/cpuinfo
51 */ 52 */
52const char bfin_board_name[] = "Bluetechnix CM BF537"; 53const char bfin_board_name[] = "Bluetechnix CM BF537U";
53 54
54#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 55#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
55/* all SPI peripherals info goes here */ 56/* all SPI peripherals info goes here */
@@ -101,13 +102,6 @@ static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
101}; 102};
102#endif 103#endif
103 104
104#if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
105static struct bfin5xx_spi_chip ad9960_spi_chip_info = {
106 .enable_dma = 0,
107 .bits_per_word = 16,
108};
109#endif
110
111#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 105#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
112static struct bfin5xx_spi_chip mmc_spi_chip_info = { 106static struct bfin5xx_spi_chip mmc_spi_chip_info = {
113 .enable_dma = 0, 107 .enable_dma = 0,
@@ -142,7 +136,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
142 136
143#if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) 137#if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
144 { 138 {
145 .modalias = "ad1836-spi", 139 .modalias = "ad1836",
146 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 140 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
147 .bus_num = 0, 141 .bus_num = 0,
148 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, 142 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT,
@@ -150,16 +144,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
150 }, 144 },
151#endif 145#endif
152 146
153#if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
154 {
155 .modalias = "ad9960-spi",
156 .max_speed_hz = 10000000, /* max spi clock (SCK) speed in HZ */
157 .bus_num = 0,
158 .chip_select = 1,
159 .controller_data = &ad9960_spi_chip_info,
160 },
161#endif
162
163#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 147#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
164 { 148 {
165 .modalias = "mmc_spi", 149 .modalias = "mmc_spi",
@@ -223,6 +207,14 @@ static struct platform_device hitachi_fb_device = {
223#endif 207#endif
224 208
225#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 209#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
210#include <linux/smc91x.h>
211
212static struct smc91x_platdata smc91x_info = {
213 .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
214 .leda = RPC_LED_100_10,
215 .ledb = RPC_LED_TX_RX,
216};
217
226static struct resource smc91x_resources[] = { 218static struct resource smc91x_resources[] = {
227 { 219 {
228 .start = 0x20200300, 220 .start = 0x20200300,
@@ -240,6 +232,9 @@ static struct platform_device smc91x_device = {
240 .id = 0, 232 .id = 0,
241 .num_resources = ARRAY_SIZE(smc91x_resources), 233 .num_resources = ARRAY_SIZE(smc91x_resources),
242 .resource = smc91x_resources, 234 .resource = smc91x_resources,
235 .dev = {
236 .platform_data = &smc91x_info,
237 },
243}; 238};
244#endif 239#endif
245 240
@@ -324,7 +319,7 @@ static struct mtd_partition cm_partitions[] = {
324 .offset = 0, 319 .offset = 0,
325 }, { 320 }, {
326 .name = "linux kernel(nor)", 321 .name = "linux kernel(nor)",
327 .size = 0xE0000, 322 .size = 0x100000,
328 .offset = MTDPART_OFS_APPEND, 323 .offset = MTDPART_OFS_APPEND,
329 }, { 324 }, {
330 .name = "file system(nor)", 325 .name = "file system(nor)",
@@ -339,7 +334,7 @@ static struct physmap_flash_data cm_flash_data = {
339 .nr_parts = ARRAY_SIZE(cm_partitions), 334 .nr_parts = ARRAY_SIZE(cm_partitions),
340}; 335};
341 336
342static unsigned cm_flash_gpios[] = { GPIO_PF4 }; 337static unsigned cm_flash_gpios[] = { GPIO_PH0 };
343 338
344static struct resource cm_flash_resource[] = { 339static struct resource cm_flash_resource[] = {
345 { 340 {
@@ -548,7 +543,7 @@ static struct platform_device bfin_dpmc = {
548 }, 543 },
549}; 544};
550 545
551static struct platform_device *cm_bf537_devices[] __initdata = { 546static struct platform_device *cm_bf537u_devices[] __initdata = {
552 547
553 &bfin_dpmc, 548 &bfin_dpmc,
554 549
@@ -614,10 +609,10 @@ static struct platform_device *cm_bf537_devices[] __initdata = {
614 &bfin_gpios_device, 609 &bfin_gpios_device,
615}; 610};
616 611
617static int __init cm_bf537_init(void) 612static int __init cm_bf537u_init(void)
618{ 613{
619 printk(KERN_INFO "%s(): registering device resources\n", __func__); 614 printk(KERN_INFO "%s(): registering device resources\n", __func__);
620 platform_add_devices(cm_bf537_devices, ARRAY_SIZE(cm_bf537_devices)); 615 platform_add_devices(cm_bf537u_devices, ARRAY_SIZE(cm_bf537u_devices));
621#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 616#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
622 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 617 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
623#endif 618#endif
@@ -628,7 +623,7 @@ static int __init cm_bf537_init(void)
628 return 0; 623 return 0;
629} 624}
630 625
631arch_initcall(cm_bf537_init); 626arch_initcall(cm_bf537u_init);
632 627
633void bfin_get_ether_addr(char *addr) 628void bfin_get_ether_addr(char *addr)
634{ 629{
diff --git a/arch/blackfin/mach-bf537/boards/pnav10.c b/arch/blackfin/mach-bf537/boards/pnav10.c
index 838240f151f5..10b35b838bac 100644
--- a/arch/blackfin/mach-bf537/boards/pnav10.c
+++ b/arch/blackfin/mach-bf537/boards/pnav10.c
@@ -92,6 +92,14 @@ static struct platform_device rtc_device = {
92#endif 92#endif
93 93
94#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 94#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
95#include <linux/smc91x.h>
96
97static struct smc91x_platdata smc91x_info = {
98 .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
99 .leda = RPC_LED_100_10,
100 .ledb = RPC_LED_TX_RX,
101};
102
95static struct resource smc91x_resources[] = { 103static struct resource smc91x_resources[] = {
96 { 104 {
97 .name = "smc91x-regs", 105 .name = "smc91x-regs",
@@ -110,6 +118,9 @@ static struct platform_device smc91x_device = {
110 .id = 0, 118 .id = 0,
111 .num_resources = ARRAY_SIZE(smc91x_resources), 119 .num_resources = ARRAY_SIZE(smc91x_resources),
112 .resource = smc91x_resources, 120 .resource = smc91x_resources,
121 .dev = {
122 .platform_data = &smc91x_info,
123 },
113}; 124};
114#endif 125#endif
115 126
@@ -282,13 +293,6 @@ static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
282}; 293};
283#endif 294#endif
284 295
285#if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
286static struct bfin5xx_spi_chip ad9960_spi_chip_info = {
287 .enable_dma = 0,
288 .bits_per_word = 16,
289};
290#endif
291
292#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 296#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
293static struct bfin5xx_spi_chip mmc_spi_chip_info = { 297static struct bfin5xx_spi_chip mmc_spi_chip_info = {
294 .enable_dma = 0, 298 .enable_dma = 0,
@@ -348,22 +352,13 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
348#if defined(CONFIG_SND_BLACKFIN_AD1836) \ 352#if defined(CONFIG_SND_BLACKFIN_AD1836) \
349 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) 353 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
350 { 354 {
351 .modalias = "ad1836-spi", 355 .modalias = "ad1836",
352 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 356 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
353 .bus_num = 0, 357 .bus_num = 0,
354 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, 358 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT,
355 .controller_data = &ad1836_spi_chip_info, 359 .controller_data = &ad1836_spi_chip_info,
356 }, 360 },
357#endif 361#endif
358#if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
359 {
360 .modalias = "ad9960-spi",
361 .max_speed_hz = 10000000, /* max spi clock (SCK) speed in HZ */
362 .bus_num = 0,
363 .chip_select = 1,
364 .controller_data = &ad9960_spi_chip_info,
365 },
366#endif
367#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 362#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
368 { 363 {
369 .modalias = "mmc_spi", 364 .modalias = "mmc_spi",
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c
index bd656907b8c0..9db6b40743e0 100644
--- a/arch/blackfin/mach-bf537/boards/stamp.c
+++ b/arch/blackfin/mach-bf537/boards/stamp.c
@@ -171,6 +171,14 @@ static struct platform_device rtc_device = {
171#endif 171#endif
172 172
173#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 173#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
174#include <linux/smc91x.h>
175
176static struct smc91x_platdata smc91x_info = {
177 .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
178 .leda = RPC_LED_100_10,
179 .ledb = RPC_LED_TX_RX,
180};
181
174static struct resource smc91x_resources[] = { 182static struct resource smc91x_resources[] = {
175 { 183 {
176 .name = "smc91x-regs", 184 .name = "smc91x-regs",
@@ -189,6 +197,9 @@ static struct platform_device smc91x_device = {
189 .id = 0, 197 .id = 0,
190 .num_resources = ARRAY_SIZE(smc91x_resources), 198 .num_resources = ARRAY_SIZE(smc91x_resources),
191 .resource = smc91x_resources, 199 .resource = smc91x_resources,
200 .dev = {
201 .platform_data = &smc91x_info,
202 },
192}; 203};
193#endif 204#endif
194 205
@@ -196,10 +207,15 @@ static struct platform_device smc91x_device = {
196static struct resource dm9000_resources[] = { 207static struct resource dm9000_resources[] = {
197 [0] = { 208 [0] = {
198 .start = 0x203FB800, 209 .start = 0x203FB800,
199 .end = 0x203FB800 + 8, 210 .end = 0x203FB800 + 1,
200 .flags = IORESOURCE_MEM, 211 .flags = IORESOURCE_MEM,
201 }, 212 },
202 [1] = { 213 [1] = {
214 .start = 0x203FB804,
215 .end = 0x203FB804 + 1,
216 .flags = IORESOURCE_MEM,
217 },
218 [2] = {
203 .start = IRQ_PF9, 219 .start = IRQ_PF9,
204 .end = IRQ_PF9, 220 .end = IRQ_PF9,
205 .flags = (IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE), 221 .flags = (IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE),
@@ -516,19 +532,135 @@ static struct bfin5xx_spi_chip spi_adc_chip_info = {
516}; 532};
517#endif 533#endif
518 534
519#if defined(CONFIG_SND_BLACKFIN_AD1836) \ 535#if defined(CONFIG_SND_BF5XX_SOC_AD1836) \
520 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) 536 || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
521static struct bfin5xx_spi_chip ad1836_spi_chip_info = { 537static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
522 .enable_dma = 0, 538 .enable_dma = 0,
523 .bits_per_word = 16, 539 .bits_per_word = 16,
524}; 540};
525#endif 541#endif
526 542
527#if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE) 543#if defined(CONFIG_SND_BF5XX_SOC_AD1938) \
528static struct bfin5xx_spi_chip ad9960_spi_chip_info = { 544 || defined(CONFIG_SND_BF5XX_SOC_AD1938_MODULE)
545static struct bfin5xx_spi_chip ad1938_spi_chip_info = {
546 .enable_dma = 0,
547 .bits_per_word = 8,
548 .cs_gpio = GPIO_PF5,
549};
550#endif
551
552#if defined(CONFIG_INPUT_EVAL_AD7147EBZ)
553#include <linux/input.h>
554#include <linux/input/ad714x.h>
555static struct bfin5xx_spi_chip ad7147_spi_chip_info = {
529 .enable_dma = 0, 556 .enable_dma = 0,
530 .bits_per_word = 16, 557 .bits_per_word = 16,
531}; 558};
559
560static struct ad714x_slider_plat slider_plat[] = {
561 {
562 .start_stage = 0,
563 .end_stage = 7,
564 .max_coord = 128,
565 },
566};
567
568static struct ad714x_button_plat button_plat[] = {
569 {
570 .keycode = BTN_FORWARD,
571 .l_mask = 0,
572 .h_mask = 0x600,
573 },
574 {
575 .keycode = BTN_LEFT,
576 .l_mask = 0,
577 .h_mask = 0x500,
578 },
579 {
580 .keycode = BTN_MIDDLE,
581 .l_mask = 0,
582 .h_mask = 0x800,
583 },
584 {
585 .keycode = BTN_RIGHT,
586 .l_mask = 0x100,
587 .h_mask = 0x400,
588 },
589 {
590 .keycode = BTN_BACK,
591 .l_mask = 0x200,
592 .h_mask = 0x400,
593 },
594};
595static struct ad714x_platform_data ad7147_platfrom_data = {
596 .slider_num = 1,
597 .button_num = 5,
598 .slider = slider_plat,
599 .button = button_plat,
600 .stage_cfg_reg = {
601 {0xFBFF, 0x1FFF, 0, 0x2626, 1600, 1600, 1600, 1600},
602 {0xEFFF, 0x1FFF, 0, 0x2626, 1650, 1650, 1650, 1650},
603 {0xFFFF, 0x1FFE, 0, 0x2626, 1650, 1650, 1650, 1650},
604 {0xFFFF, 0x1FFB, 0, 0x2626, 1650, 1650, 1650, 1650},
605 {0xFFFF, 0x1FEF, 0, 0x2626, 1650, 1650, 1650, 1650},
606 {0xFFFF, 0x1FBF, 0, 0x2626, 1650, 1650, 1650, 1650},
607 {0xFFFF, 0x1EFF, 0, 0x2626, 1650, 1650, 1650, 1650},
608 {0xFFFF, 0x1BFF, 0, 0x2626, 1600, 1600, 1600, 1600},
609 {0xFF7B, 0x3FFF, 0x506, 0x2626, 1100, 1100, 1150, 1150},
610 {0xFDFE, 0x3FFF, 0x606, 0x2626, 1100, 1100, 1150, 1150},
611 {0xFEBA, 0x1FFF, 0x1400, 0x2626, 1200, 1200, 1300, 1300},
612 {0xFFEF, 0x1FFF, 0x0, 0x2626, 1100, 1100, 1150, 1150},
613 },
614 .sys_cfg_reg = {0x2B2, 0x0, 0x3233, 0x819, 0x832, 0xCFF, 0xCFF, 0x0},
615};
616#endif
617
618#if defined(CONFIG_INPUT_EVAL_AD7142EB)
619#include <linux/input.h>
620#include <linux/input/ad714x.h>
621static struct ad714x_button_plat button_plat[] = {
622 {
623 .keycode = BTN_1,
624 .l_mask = 0,
625 .h_mask = 0x1,
626 },
627 {
628 .keycode = BTN_2,
629 .l_mask = 0,
630 .h_mask = 0x2,
631 },
632 {
633 .keycode = BTN_3,
634 .l_mask = 0,
635 .h_mask = 0x4,
636 },
637 {
638 .keycode = BTN_4,
639 .l_mask = 0x0,
640 .h_mask = 0x8,
641 },
642};
643static struct ad714x_platform_data ad7142_platfrom_data = {
644 .button_num = 4,
645 .button = button_plat,
646 .stage_cfg_reg = {
647 /* fixme: figure out right setting for all comoponent according
648 * to hardware feature of EVAL-AD7142EB board */
649 {0xE7FF, 0x3FFF, 0x0005, 0x2626, 0x01F4, 0x01F4, 0x028A, 0x028A},
650 {0xFDBF, 0x3FFF, 0x0001, 0x2626, 0x01F4, 0x01F4, 0x028A, 0x028A},
651 {0xFFFF, 0x2DFF, 0x0001, 0x2626, 0x01F4, 0x01F4, 0x028A, 0x028A},
652 {0xFFFF, 0x37BF, 0x0001, 0x2626, 0x01F4, 0x01F4, 0x028A, 0x028A},
653 {0xFFFF, 0x3FFF, 0x0000, 0x0606, 0x01F4, 0x01F4, 0x0320, 0x0320},
654 {0xFFFF, 0x3FFF, 0x0000, 0x0606, 0x01F4, 0x01F4, 0x0320, 0x0320},
655 {0xFFFF, 0x3FFF, 0x0000, 0x0606, 0x01F4, 0x01F4, 0x0320, 0x0320},
656 {0xFFFF, 0x3FFF, 0x0000, 0x0606, 0x01F4, 0x01F4, 0x0320, 0x0320},
657 {0xFFFF, 0x3FFF, 0x0000, 0x0606, 0x01F4, 0x01F4, 0x0320, 0x0320},
658 {0xFFFF, 0x3FFF, 0x0000, 0x0606, 0x01F4, 0x01F4, 0x0320, 0x0320},
659 {0xFFFF, 0x3FFF, 0x0000, 0x0606, 0x01F4, 0x01F4, 0x0320, 0x0320},
660 {0xFFFF, 0x3FFF, 0x0000, 0x0606, 0x01F4, 0x01F4, 0x0320, 0x0320},
661 },
662 .sys_cfg_reg = {0x0B2, 0x0, 0x690, 0x664, 0x290F, 0xF, 0xF, 0x0},
663};
532#endif 664#endif
533 665
534#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 666#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
@@ -555,15 +687,7 @@ static struct mmc_spi_platform_data bfin_mmc_spi_pdata = {
555static struct bfin5xx_spi_chip mmc_spi_chip_info = { 687static struct bfin5xx_spi_chip mmc_spi_chip_info = {
556 .enable_dma = 0, 688 .enable_dma = 0,
557 .bits_per_word = 8, 689 .bits_per_word = 8,
558}; 690 .pio_interrupt = 0,
559#endif
560
561#if defined(CONFIG_PBX)
562static struct bfin5xx_spi_chip spi_si3xxx_chip_info = {
563 .ctl_reg = 0x4, /* send zero */
564 .enable_dma = 0,
565 .bits_per_word = 8,
566 .cs_change_per_word = 1,
567}; 691};
568#endif 692#endif
569 693
@@ -743,25 +867,42 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
743 }, 867 },
744#endif 868#endif
745 869
746#if defined(CONFIG_SND_BLACKFIN_AD1836) \ 870#if defined(CONFIG_SND_BF5XX_SOC_AD1836) \
747 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) 871 || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
748 { 872 {
749 .modalias = "ad1836-spi", 873 .modalias = "ad1836",
750 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 874 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
751 .bus_num = 0, 875 .bus_num = 0,
752 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, 876 .chip_select = 4,/* CONFIG_SND_BLACKFIN_SPI_PFBIT */
753 .controller_data = &ad1836_spi_chip_info, 877 .controller_data = &ad1836_spi_chip_info,
878 .mode = SPI_MODE_3,
754 }, 879 },
755#endif 880#endif
756#if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE) 881
882#if defined(CONFIG_SND_BF5XX_SOC_AD1938) || defined(CONFIG_SND_BF5XX_SOC_AD1938_MODULE)
757 { 883 {
758 .modalias = "ad9960-spi", 884 .modalias = "ad1938",
759 .max_speed_hz = 10000000, /* max spi clock (SCK) speed in HZ */ 885 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
760 .bus_num = 0, 886 .bus_num = 0,
761 .chip_select = 1, 887 .chip_select = 0,/* CONFIG_SND_BLACKFIN_SPI_PFBIT */
762 .controller_data = &ad9960_spi_chip_info, 888 .controller_data = &ad1938_spi_chip_info,
889 .mode = SPI_MODE_3,
763 }, 890 },
764#endif 891#endif
892
893#if defined(CONFIG_INPUT_EVAL_AD7147EBZ)
894 {
895 .modalias = "ad714x_captouch",
896 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
897 .irq = IRQ_PF4,
898 .bus_num = 0,
899 .chip_select = 5,
900 .mode = SPI_MODE_3,
901 .platform_data = &ad7147_platfrom_data,
902 .controller_data = &ad7147_spi_chip_info,
903 },
904#endif
905
765#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 906#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
766 { 907 {
767 .modalias = "mmc_spi", 908 .modalias = "mmc_spi",
@@ -773,24 +914,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
773 .mode = SPI_MODE_3, 914 .mode = SPI_MODE_3,
774 }, 915 },
775#endif 916#endif
776#if defined(CONFIG_PBX)
777 {
778 .modalias = "fxs-spi",
779 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
780 .bus_num = 0,
781 .chip_select = 8 - CONFIG_J11_JUMPER,
782 .controller_data = &spi_si3xxx_chip_info,
783 .mode = SPI_MODE_3,
784 },
785 {
786 .modalias = "fxo-spi",
787 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
788 .bus_num = 0,
789 .chip_select = 8 - CONFIG_J19_JUMPER,
790 .controller_data = &spi_si3xxx_chip_info,
791 .mode = SPI_MODE_3,
792 },
793#endif
794#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 917#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
795 { 918 {
796 .modalias = "ad7877", 919 .modalias = "ad7877",
@@ -864,6 +987,11 @@ static struct resource bfin_spi0_resource[] = {
864 [1] = { 987 [1] = {
865 .start = CH_SPI, 988 .start = CH_SPI,
866 .end = CH_SPI, 989 .end = CH_SPI,
990 .flags = IORESOURCE_DMA,
991 },
992 [2] = {
993 .start = IRQ_SPI,
994 .end = IRQ_SPI,
867 .flags = IORESOURCE_IRQ, 995 .flags = IORESOURCE_IRQ,
868 }, 996 },
869}; 997};
@@ -1089,7 +1217,7 @@ static struct platform_device i2c_bfin_twi_device = {
1089 1217
1090#if defined(CONFIG_KEYBOARD_ADP5588) || defined(CONFIG_KEYBOARD_ADP5588_MODULE) 1218#if defined(CONFIG_KEYBOARD_ADP5588) || defined(CONFIG_KEYBOARD_ADP5588_MODULE)
1091#include <linux/input.h> 1219#include <linux/input.h>
1092#include <linux/i2c/adp5588_keys.h> 1220#include <linux/i2c/adp5588.h>
1093static const unsigned short adp5588_keymap[ADP5588_KEYMAPSIZE] = { 1221static const unsigned short adp5588_keymap[ADP5588_KEYMAPSIZE] = {
1094 [0] = KEY_GRAVE, 1222 [0] = KEY_GRAVE,
1095 [1] = KEY_1, 1223 [1] = KEY_1,
@@ -1309,11 +1437,20 @@ static struct adp5520_platform_data adp5520_pdev_data = {
1309 1437
1310#endif 1438#endif
1311 1439
1440#if defined(CONFIG_GPIO_ADP5588) || defined(CONFIG_GPIO_ADP5588_MODULE)
1441#include <linux/i2c/adp5588.h>
1442static struct adp5588_gpio_platfrom_data adp5588_gpio_data = {
1443 .gpio_start = 50,
1444 .pullup_dis_mask = 0,
1445};
1446#endif
1447
1312static struct i2c_board_info __initdata bfin_i2c_board_info[] = { 1448static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
1313#if defined(CONFIG_JOYSTICK_AD7142) || defined(CONFIG_JOYSTICK_AD7142_MODULE) 1449#if defined(CONFIG_INPUT_EVAL_AD7142EB)
1314 { 1450 {
1315 I2C_BOARD_INFO("ad7142_joystick", 0x2C), 1451 I2C_BOARD_INFO("ad7142_captouch", 0x2C),
1316 .irq = IRQ_PG5, 1452 .irq = IRQ_PG5,
1453 .platform_data = (void *)&ad7142_platfrom_data,
1317 }, 1454 },
1318#endif 1455#endif
1319#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) 1456#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE)
@@ -1321,7 +1458,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
1321 I2C_BOARD_INFO("pcf8574_lcd", 0x22), 1458 I2C_BOARD_INFO("pcf8574_lcd", 0x22),
1322 }, 1459 },
1323#endif 1460#endif
1324#if defined(CONFIG_TWI_KEYPAD) || defined(CONFIG_TWI_KEYPAD_MODULE) 1461#if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE)
1325 { 1462 {
1326 I2C_BOARD_INFO("pcf8574_keypad", 0x27), 1463 I2C_BOARD_INFO("pcf8574_keypad", 0x27),
1327 .irq = IRQ_PG6, 1464 .irq = IRQ_PG6,
@@ -1355,6 +1492,12 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
1355 .platform_data = (void *)&adxl34x_info, 1492 .platform_data = (void *)&adxl34x_info,
1356 }, 1493 },
1357#endif 1494#endif
1495#if defined(CONFIG_GPIO_ADP5588) || defined(CONFIG_GPIO_ADP5588_MODULE)
1496 {
1497 I2C_BOARD_INFO("adp5588-gpio", 0x34),
1498 .platform_data = (void *)&adp5588_gpio_data,
1499 },
1500#endif
1358}; 1501};
1359 1502
1360#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 1503#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
@@ -1456,6 +1599,13 @@ static struct platform_device bfin_dpmc = {
1456 }, 1599 },
1457}; 1600};
1458 1601
1602#if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE)
1603static struct platform_device bfin_tdm = {
1604 .name = "bfin-tdm",
1605 /* TODO: add platform data here */
1606};
1607#endif
1608
1459static struct platform_device *stamp_devices[] __initdata = { 1609static struct platform_device *stamp_devices[] __initdata = {
1460 1610
1461 &bfin_dpmc, 1611 &bfin_dpmc,
@@ -1561,6 +1711,10 @@ static struct platform_device *stamp_devices[] __initdata = {
1561#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 1711#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
1562 &stamp_flash_device, 1712 &stamp_flash_device,
1563#endif 1713#endif
1714
1715#if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE)
1716 &bfin_tdm,
1717#endif
1564}; 1718};
1565 1719
1566static int __init stamp_init(void) 1720static int __init stamp_init(void)
@@ -1572,11 +1726,6 @@ static int __init stamp_init(void)
1572 platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); 1726 platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices));
1573 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 1727 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
1574 1728
1575#if (defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)) \
1576 && defined(PATA_INT)
1577 irq_desc[PATA_INT].status |= IRQ_NOAUTOEN;
1578#endif
1579
1580 return 0; 1729 return 0;
1581} 1730}
1582 1731
diff --git a/arch/blackfin/mach-bf537/boards/tcm_bf537.c b/arch/blackfin/mach-bf537/boards/tcm_bf537.c
index e523e6e610d0..61353f7bcb9e 100644
--- a/arch/blackfin/mach-bf537/boards/tcm_bf537.c
+++ b/arch/blackfin/mach-bf537/boards/tcm_bf537.c
@@ -45,6 +45,7 @@
45#include <asm/bfin5xx_spi.h> 45#include <asm/bfin5xx_spi.h>
46#include <asm/portmux.h> 46#include <asm/portmux.h>
47#include <asm/dpmc.h> 47#include <asm/dpmc.h>
48#include <linux/spi/mmc_spi.h>
48 49
49/* 50/*
50 * Name the Board for the /proc/cpuinfo 51 * Name the Board for the /proc/cpuinfo
@@ -101,13 +102,6 @@ static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
101}; 102};
102#endif 103#endif
103 104
104#if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
105static struct bfin5xx_spi_chip ad9960_spi_chip_info = {
106 .enable_dma = 0,
107 .bits_per_word = 16,
108};
109#endif
110
111#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 105#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
112static struct bfin5xx_spi_chip mmc_spi_chip_info = { 106static struct bfin5xx_spi_chip mmc_spi_chip_info = {
113 .enable_dma = 0, 107 .enable_dma = 0,
@@ -142,7 +136,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
142 136
143#if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) 137#if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
144 { 138 {
145 .modalias = "ad1836-spi", 139 .modalias = "ad1836",
146 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 140 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
147 .bus_num = 0, 141 .bus_num = 0,
148 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, 142 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT,
@@ -150,22 +144,12 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
150 }, 144 },
151#endif 145#endif
152 146
153#if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
154 {
155 .modalias = "ad9960-spi",
156 .max_speed_hz = 10000000, /* max spi clock (SCK) speed in HZ */
157 .bus_num = 0,
158 .chip_select = 1,
159 .controller_data = &ad9960_spi_chip_info,
160 },
161#endif
162
163#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 147#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
164 { 148 {
165 .modalias = "mmc_spi", 149 .modalias = "mmc_spi",
166 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ 150 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
167 .bus_num = 0, 151 .bus_num = 0,
168 .chip_select = 5, 152 .chip_select = 1,
169 .controller_data = &mmc_spi_chip_info, 153 .controller_data = &mmc_spi_chip_info,
170 .mode = SPI_MODE_3, 154 .mode = SPI_MODE_3,
171 }, 155 },
@@ -223,6 +207,14 @@ static struct platform_device hitachi_fb_device = {
223#endif 207#endif
224 208
225#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 209#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
210#include <linux/smc91x.h>
211
212static struct smc91x_platdata smc91x_info = {
213 .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
214 .leda = RPC_LED_100_10,
215 .ledb = RPC_LED_TX_RX,
216};
217
226static struct resource smc91x_resources[] = { 218static struct resource smc91x_resources[] = {
227 { 219 {
228 .start = 0x20200300, 220 .start = 0x20200300,
@@ -240,6 +232,9 @@ static struct platform_device smc91x_device = {
240 .id = 0, 232 .id = 0,
241 .num_resources = ARRAY_SIZE(smc91x_resources), 233 .num_resources = ARRAY_SIZE(smc91x_resources),
242 .resource = smc91x_resources, 234 .resource = smc91x_resources,
235 .dev = {
236 .platform_data = &smc91x_info,
237 },
243}; 238};
244#endif 239#endif
245 240
@@ -285,12 +280,12 @@ static struct platform_device isp1362_hcd_device = {
285#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 280#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
286static struct resource net2272_bfin_resources[] = { 281static struct resource net2272_bfin_resources[] = {
287 { 282 {
288 .start = 0x20200000, 283 .start = 0x20300000,
289 .end = 0x20200000 + 0x100, 284 .end = 0x20300000 + 0x100,
290 .flags = IORESOURCE_MEM, 285 .flags = IORESOURCE_MEM,
291 }, { 286 }, {
292 .start = IRQ_PH14, 287 .start = IRQ_PG13,
293 .end = IRQ_PH14, 288 .end = IRQ_PG13,
294 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 289 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
295 }, 290 },
296}; 291};
@@ -324,7 +319,7 @@ static struct mtd_partition cm_partitions[] = {
324 .offset = 0, 319 .offset = 0,
325 }, { 320 }, {
326 .name = "linux kernel(nor)", 321 .name = "linux kernel(nor)",
327 .size = 0xE0000, 322 .size = 0x100000,
328 .offset = MTDPART_OFS_APPEND, 323 .offset = MTDPART_OFS_APPEND,
329 }, { 324 }, {
330 .name = "file system(nor)", 325 .name = "file system(nor)",
diff --git a/arch/blackfin/mach-bf537/dma.c b/arch/blackfin/mach-bf537/dma.c
index 81185051de91..d23fc0edf2b9 100644
--- a/arch/blackfin/mach-bf537/dma.c
+++ b/arch/blackfin/mach-bf537/dma.c
@@ -96,12 +96,12 @@ int channel2irq(unsigned int channel)
96 ret_irq = IRQ_SPI; 96 ret_irq = IRQ_SPI;
97 break; 97 break;
98 98
99 case CH_UART_RX: 99 case CH_UART0_RX:
100 ret_irq = IRQ_UART_RX; 100 ret_irq = IRQ_UART0_RX;
101 break; 101 break;
102 102
103 case CH_UART_TX: 103 case CH_UART0_TX:
104 ret_irq = IRQ_UART_TX; 104 ret_irq = IRQ_UART0_TX;
105 break; 105 break;
106 106
107 case CH_MEM_STREAM0_SRC: 107 case CH_MEM_STREAM0_SRC:
diff --git a/arch/blackfin/mach-bf537/include/mach/anomaly.h b/arch/blackfin/mach-bf537/include/mach/anomaly.h
index e66aa131f517..f091ad2d8ea8 100644
--- a/arch/blackfin/mach-bf537/include/mach/anomaly.h
+++ b/arch/blackfin/mach-bf537/include/mach/anomaly.h
@@ -143,7 +143,7 @@
143/* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */ 143/* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */
144#define ANOMALY_05000371 (1) 144#define ANOMALY_05000371 (1)
145/* SSYNC Stalls Processor when Executed from Non-Cacheable Memory */ 145/* SSYNC Stalls Processor when Executed from Non-Cacheable Memory */
146#define ANOMALY_05000402 (__SILICON_REVISION__ >= 5) 146#define ANOMALY_05000402 (__SILICON_REVISION__ == 2)
147/* Level-Sensitive External GPIO Wakeups May Cause Indefinite Stall */ 147/* Level-Sensitive External GPIO Wakeups May Cause Indefinite Stall */
148#define ANOMALY_05000403 (1) 148#define ANOMALY_05000403 (1)
149/* Speculative Fetches Can Cause Undesired External FIFO Operations */ 149/* Speculative Fetches Can Cause Undesired External FIFO Operations */
diff --git a/arch/blackfin/mach-bf537/include/mach/blackfin.h b/arch/blackfin/mach-bf537/include/mach/blackfin.h
index f5e5015ad831..9ee8834c8f1a 100644
--- a/arch/blackfin/mach-bf537/include/mach/blackfin.h
+++ b/arch/blackfin/mach-bf537/include/mach/blackfin.h
@@ -45,96 +45,11 @@
45#if !defined(__ASSEMBLY__) 45#if !defined(__ASSEMBLY__)
46#include "cdefBF534.h" 46#include "cdefBF534.h"
47 47
48/* UART 0*/
49#define bfin_read_UART_THR() bfin_read_UART0_THR()
50#define bfin_write_UART_THR(val) bfin_write_UART0_THR(val)
51#define bfin_read_UART_RBR() bfin_read_UART0_RBR()
52#define bfin_write_UART_RBR(val) bfin_write_UART0_RBR(val)
53#define bfin_read_UART_DLL() bfin_read_UART0_DLL()
54#define bfin_write_UART_DLL(val) bfin_write_UART0_DLL(val)
55#define bfin_read_UART_IER() bfin_read_UART0_IER()
56#define bfin_write_UART_IER(val) bfin_write_UART0_IER(val)
57#define bfin_read_UART_DLH() bfin_read_UART0_DLH()
58#define bfin_write_UART_DLH(val) bfin_write_UART0_DLH(val)
59#define bfin_read_UART_IIR() bfin_read_UART0_IIR()
60#define bfin_write_UART_IIR(val) bfin_write_UART0_IIR(val)
61#define bfin_read_UART_LCR() bfin_read_UART0_LCR()
62#define bfin_write_UART_LCR(val) bfin_write_UART0_LCR(val)
63#define bfin_read_UART_MCR() bfin_read_UART0_MCR()
64#define bfin_write_UART_MCR(val) bfin_write_UART0_MCR(val)
65#define bfin_read_UART_LSR() bfin_read_UART0_LSR()
66#define bfin_write_UART_LSR(val) bfin_write_UART0_LSR(val)
67#define bfin_read_UART_SCR() bfin_read_UART0_SCR()
68#define bfin_write_UART_SCR(val) bfin_write_UART0_SCR(val)
69#define bfin_read_UART_GCTL() bfin_read_UART0_GCTL()
70#define bfin_write_UART_GCTL(val) bfin_write_UART0_GCTL(val)
71
72#if defined(CONFIG_BF537) || defined(CONFIG_BF536) 48#if defined(CONFIG_BF537) || defined(CONFIG_BF536)
73#include "cdefBF537.h" 49#include "cdefBF537.h"
74#endif 50#endif
75#endif 51#endif
76 52
77/* MAP used DEFINES from BF533 to BF537 - so we don't need to change them in the driver, kernel, etc. */
78
79/* UART_IIR Register */
80#define STATUS(x) ((x << 1) & 0x06)
81#define STATUS_P1 0x02
82#define STATUS_P0 0x01
83
84/* DMA Channel */
85#define bfin_read_CH_UART_RX() bfin_read_CH_UART0_RX()
86#define bfin_write_CH_UART_RX(val) bfin_write_CH_UART0_RX(val)
87#define CH_UART_RX CH_UART0_RX
88#define bfin_read_CH_UART_TX() bfin_read_CH_UART0_TX()
89#define bfin_write_CH_UART_TX(val) bfin_write_CH_UART0_TX(val)
90#define CH_UART_TX CH_UART0_TX
91
92/* System Interrupt Controller */
93#define bfin_read_IRQ_UART_RX() bfin_read_IRQ_UART0_RX()
94#define bfin_write_IRQ_UART_RX(val) bfin_write_IRQ_UART0_RX(val)
95#define IRQ_UART_RX IRQ_UART0_RX
96#define bfin_read_IRQ_UART_TX() bfin_read_IRQ_UART0_TX()
97#define bfin_write_IRQ_UART_TX(val) bfin_write_IRQ_UART0_TX(val)
98#define IRQ_UART_TX IRQ_UART0_TX
99#define bfin_read_IRQ_UART_ERROR() bfin_read_IRQ_UART0_ERROR()
100#define bfin_write_IRQ_UART_ERROR(val) bfin_write_IRQ_UART0_ERROR(val)
101#define IRQ_UART_ERROR IRQ_UART0_ERROR
102
103/* MMR Registers*/
104#define bfin_read_UART_THR() bfin_read_UART0_THR()
105#define bfin_write_UART_THR(val) bfin_write_UART0_THR(val)
106#define BFIN_UART_THR UART0_THR
107#define bfin_read_UART_RBR() bfin_read_UART0_RBR()
108#define bfin_write_UART_RBR(val) bfin_write_UART0_RBR(val)
109#define BFIN_UART_RBR UART0_RBR
110#define bfin_read_UART_DLL() bfin_read_UART0_DLL()
111#define bfin_write_UART_DLL(val) bfin_write_UART0_DLL(val)
112#define BFIN_UART_DLL UART0_DLL
113#define bfin_read_UART_IER() bfin_read_UART0_IER()
114#define bfin_write_UART_IER(val) bfin_write_UART0_IER(val)
115#define BFIN_UART_IER UART0_IER
116#define bfin_read_UART_DLH() bfin_read_UART0_DLH()
117#define bfin_write_UART_DLH(val) bfin_write_UART0_DLH(val)
118#define BFIN_UART_DLH UART0_DLH
119#define bfin_read_UART_IIR() bfin_read_UART0_IIR()
120#define bfin_write_UART_IIR(val) bfin_write_UART0_IIR(val)
121#define BFIN_UART_IIR UART0_IIR
122#define bfin_read_UART_LCR() bfin_read_UART0_LCR()
123#define bfin_write_UART_LCR(val) bfin_write_UART0_LCR(val)
124#define BFIN_UART_LCR UART0_LCR
125#define bfin_read_UART_MCR() bfin_read_UART0_MCR()
126#define bfin_write_UART_MCR(val) bfin_write_UART0_MCR(val)
127#define BFIN_UART_MCR UART0_MCR
128#define bfin_read_UART_LSR() bfin_read_UART0_LSR()
129#define bfin_write_UART_LSR(val) bfin_write_UART0_LSR(val)
130#define BFIN_UART_LSR UART0_LSR
131#define bfin_read_UART_SCR() bfin_read_UART0_SCR()
132#define bfin_write_UART_SCR(val) bfin_write_UART0_SCR(val)
133#define BFIN_UART_SCR UART0_SCR
134#define bfin_read_UART_GCTL() bfin_read_UART0_GCTL()
135#define bfin_write_UART_GCTL(val) bfin_write_UART0_GCTL(val)
136#define BFIN_UART_GCTL UART0_GCTL
137
138#define BFIN_UART_NR_PORTS 2 53#define BFIN_UART_NR_PORTS 2
139 54
140#define OFFSET_THR 0x00 /* Transmit Holding register */ 55#define OFFSET_THR 0x00 /* Transmit Holding register */
@@ -150,11 +65,6 @@
150#define OFFSET_SCR 0x1C /* SCR Scratch Register */ 65#define OFFSET_SCR 0x1C /* SCR Scratch Register */
151#define OFFSET_GCTL 0x24 /* Global Control Register */ 66#define OFFSET_GCTL 0x24 /* Global Control Register */
152 67
153/* DPMC*/
154#define bfin_read_STOPCK_OFF() bfin_read_STOPCK()
155#define bfin_write_STOPCK_OFF(val) bfin_write_STOPCK(val)
156#define STOPCK_OFF STOPCK
157
158/* PLL_DIV Masks */ 68/* PLL_DIV Masks */
159#define CCLK_DIV1 CSEL_DIV1 /* CCLK = VCO / 1 */ 69#define CCLK_DIV1 CSEL_DIV1 /* CCLK = VCO / 1 */
160#define CCLK_DIV2 CSEL_DIV2 /* CCLK = VCO / 2 */ 70#define CCLK_DIV2 CSEL_DIV2 /* CCLK = VCO / 2 */
diff --git a/arch/blackfin/mach-bf538/boards/ezkit.c b/arch/blackfin/mach-bf538/boards/ezkit.c
index 57695b4c3c09..f2ac3b0ebf24 100644
--- a/arch/blackfin/mach-bf538/boards/ezkit.c
+++ b/arch/blackfin/mach-bf538/boards/ezkit.c
@@ -31,6 +31,7 @@
31#include <linux/device.h> 31#include <linux/device.h>
32#include <linux/platform_device.h> 32#include <linux/platform_device.h>
33#include <linux/mtd/mtd.h> 33#include <linux/mtd/mtd.h>
34#include <linux/mtd/physmap.h>
34#include <linux/mtd/partitions.h> 35#include <linux/mtd/partitions.h>
35#include <linux/spi/spi.h> 36#include <linux/spi/spi.h>
36#include <linux/spi/flash.h> 37#include <linux/spi/flash.h>
@@ -177,6 +178,14 @@ static struct platform_device bfin_sir2_device = {
177 * Driver needs to know address, irq and flag pin. 178 * Driver needs to know address, irq and flag pin.
178 */ 179 */
179#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 180#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
181#include <linux/smc91x.h>
182
183static struct smc91x_platdata smc91x_info = {
184 .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
185 .leda = RPC_LED_100_10,
186 .ledb = RPC_LED_TX_RX,
187};
188
180static struct resource smc91x_resources[] = { 189static struct resource smc91x_resources[] = {
181 { 190 {
182 .name = "smc91x-regs", 191 .name = "smc91x-regs",
@@ -194,6 +203,9 @@ static struct platform_device smc91x_device = {
194 .id = 0, 203 .id = 0,
195 .num_resources = ARRAY_SIZE(smc91x_resources), 204 .num_resources = ARRAY_SIZE(smc91x_resources),
196 .resource = smc91x_resources, 205 .resource = smc91x_resources,
206 .dev = {
207 .platform_data = &smc91x_info,
208 },
197}; 209};
198#endif 210#endif
199 211
@@ -390,6 +402,11 @@ static struct resource bfin_spi2_resource[] = {
390 [1] = { 402 [1] = {
391 .start = CH_SPI2, 403 .start = CH_SPI2,
392 .end = CH_SPI2, 404 .end = CH_SPI2,
405 .flags = IORESOURCE_DMA,
406 },
407 [2] = {
408 .start = IRQ_SPI2,
409 .end = IRQ_SPI2,
393 .flags = IORESOURCE_IRQ, 410 .flags = IORESOURCE_IRQ,
394 } 411 }
395}; 412};
@@ -550,6 +567,50 @@ static struct platform_device bfin_dpmc = {
550 }, 567 },
551}; 568};
552 569
570#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
571static struct mtd_partition ezkit_partitions[] = {
572 {
573 .name = "bootloader(nor)",
574 .size = 0x40000,
575 .offset = 0,
576 }, {
577 .name = "linux kernel(nor)",
578 .size = 0x180000,
579 .offset = MTDPART_OFS_APPEND,
580 }, {
581 .name = "file system(nor)",
582 .size = MTDPART_SIZ_FULL,
583 .offset = MTDPART_OFS_APPEND,
584 }
585};
586
587static struct physmap_flash_data ezkit_flash_data = {
588 .width = 2,
589 .parts = ezkit_partitions,
590 .nr_parts = ARRAY_SIZE(ezkit_partitions),
591};
592
593static struct resource ezkit_flash_resource = {
594 .start = 0x20000000,
595#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
596 .end = 0x202fffff,
597#else
598 .end = 0x203fffff,
599#endif
600 .flags = IORESOURCE_MEM,
601};
602
603static struct platform_device ezkit_flash_device = {
604 .name = "physmap-flash",
605 .id = 0,
606 .dev = {
607 .platform_data = &ezkit_flash_data,
608 },
609 .num_resources = 1,
610 .resource = &ezkit_flash_resource,
611};
612#endif
613
553static struct platform_device *cm_bf538_devices[] __initdata = { 614static struct platform_device *cm_bf538_devices[] __initdata = {
554 615
555 &bfin_dpmc, 616 &bfin_dpmc,
@@ -598,6 +659,10 @@ static struct platform_device *cm_bf538_devices[] __initdata = {
598#endif 659#endif
599 660
600 &bfin_gpios_device, 661 &bfin_gpios_device,
662
663#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
664 &ezkit_flash_device,
665#endif
601}; 666};
602 667
603static int __init ezkit_init(void) 668static int __init ezkit_init(void)
diff --git a/arch/blackfin/mach-bf538/include/mach/anomaly.h b/arch/blackfin/mach-bf538/include/mach/anomaly.h
index 451cf8a82a42..26b76083e14c 100644
--- a/arch/blackfin/mach-bf538/include/mach/anomaly.h
+++ b/arch/blackfin/mach-bf538/include/mach/anomaly.h
@@ -113,7 +113,7 @@
113/* GPIO Pins PC1 and PC4 Can Function as Normal Outputs */ 113/* GPIO Pins PC1 and PC4 Can Function as Normal Outputs */
114#define ANOMALY_05000375 (__SILICON_REVISION__ < 4) 114#define ANOMALY_05000375 (__SILICON_REVISION__ < 4)
115/* SSYNC Stalls Processor when Executed from Non-Cacheable Memory */ 115/* SSYNC Stalls Processor when Executed from Non-Cacheable Memory */
116#define ANOMALY_05000402 (__SILICON_REVISION__ < 4) 116#define ANOMALY_05000402 (__SILICON_REVISION__ == 3)
117/* Level-Sensitive External GPIO Wakeups May Cause Indefinite Stall */ 117/* Level-Sensitive External GPIO Wakeups May Cause Indefinite Stall */
118#define ANOMALY_05000403 (1) 118#define ANOMALY_05000403 (1)
119/* Speculative Fetches Can Cause Undesired External FIFO Operations */ 119/* Speculative Fetches Can Cause Undesired External FIFO Operations */
diff --git a/arch/blackfin/mach-bf538/include/mach/blackfin.h b/arch/blackfin/mach-bf538/include/mach/blackfin.h
index 9496196ac164..5ecee1690957 100644
--- a/arch/blackfin/mach-bf538/include/mach/blackfin.h
+++ b/arch/blackfin/mach-bf538/include/mach/blackfin.h
@@ -47,11 +47,6 @@
47#endif 47#endif
48#endif 48#endif
49 49
50/* UART_IIR Register */
51#define STATUS(x) ((x << 1) & 0x06)
52#define STATUS_P1 0x02
53#define STATUS_P0 0x01
54
55#define BFIN_UART_NR_PORTS 3 50#define BFIN_UART_NR_PORTS 3
56 51
57#define OFFSET_THR 0x00 /* Transmit Holding register */ 52#define OFFSET_THR 0x00 /* Transmit Holding register */
@@ -67,11 +62,6 @@
67#define OFFSET_SCR 0x1C /* SCR Scratch Register */ 62#define OFFSET_SCR 0x1C /* SCR Scratch Register */
68#define OFFSET_GCTL 0x24 /* Global Control Register */ 63#define OFFSET_GCTL 0x24 /* Global Control Register */
69 64
70/* DPMC*/
71#define bfin_read_STOPCK_OFF() bfin_read_STOPCK()
72#define bfin_write_STOPCK_OFF(val) bfin_write_STOPCK(val)
73#define STOPCK_OFF STOPCK
74
75/* PLL_DIV Masks */ 65/* PLL_DIV Masks */
76#define CCLK_DIV1 CSEL_DIV1 /* CCLK = VCO / 1 */ 66#define CCLK_DIV1 CSEL_DIV1 /* CCLK = VCO / 1 */
77#define CCLK_DIV2 CSEL_DIV2 /* CCLK = VCO / 2 */ 67#define CCLK_DIV2 CSEL_DIV2 /* CCLK = VCO / 2 */
diff --git a/arch/blackfin/mach-bf538/include/mach/cdefBF538.h b/arch/blackfin/mach-bf538/include/mach/cdefBF538.h
index 99ca3f4305e2..1de67515dc9d 100644
--- a/arch/blackfin/mach-bf538/include/mach/cdefBF538.h
+++ b/arch/blackfin/mach-bf538/include/mach/cdefBF538.h
@@ -1310,6 +1310,7 @@
1310#define bfin_write_PPI_CONTROL(val) bfin_write16(PPI_CONTROL, val) 1310#define bfin_write_PPI_CONTROL(val) bfin_write16(PPI_CONTROL, val)
1311#define bfin_read_PPI_STATUS() bfin_read16(PPI_STATUS) 1311#define bfin_read_PPI_STATUS() bfin_read16(PPI_STATUS)
1312#define bfin_write_PPI_STATUS(val) bfin_write16(PPI_STATUS, val) 1312#define bfin_write_PPI_STATUS(val) bfin_write16(PPI_STATUS, val)
1313#define bfin_clear_PPI_STATUS() bfin_read_PPI_STATUS()
1313#define bfin_read_PPI_DELAY() bfin_read16(PPI_DELAY) 1314#define bfin_read_PPI_DELAY() bfin_read16(PPI_DELAY)
1314#define bfin_write_PPI_DELAY(val) bfin_write16(PPI_DELAY, val) 1315#define bfin_write_PPI_DELAY(val) bfin_write16(PPI_DELAY, val)
1315#define bfin_read_PPI_COUNT() bfin_read16(PPI_COUNT) 1316#define bfin_read_PPI_COUNT() bfin_read16(PPI_COUNT)
diff --git a/arch/blackfin/mach-bf538/include/mach/defBF539.h b/arch/blackfin/mach-bf538/include/mach/defBF539.h
index bdc330cd0e1c..1c58914a8740 100644
--- a/arch/blackfin/mach-bf538/include/mach/defBF539.h
+++ b/arch/blackfin/mach-bf538/include/mach/defBF539.h
@@ -2325,7 +2325,7 @@
2325#define AMBEN_B0_B1 0x0004 /* Enable Asynchronous Memory Banks 0 & 1 only */ 2325#define AMBEN_B0_B1 0x0004 /* Enable Asynchronous Memory Banks 0 & 1 only */
2326#define AMBEN_B0_B1_B2 0x0006 /* Enable Asynchronous Memory Banks 0, 1, and 2 */ 2326#define AMBEN_B0_B1_B2 0x0006 /* Enable Asynchronous Memory Banks 0, 1, and 2 */
2327#define AMBEN_ALL 0x0008 /* Enable Asynchronous Memory Banks (all) 0, 1, 2, and 3 */ 2327#define AMBEN_ALL 0x0008 /* Enable Asynchronous Memory Banks (all) 0, 1, 2, and 3 */
2328#define CDPRIO 0x0100 /* DMA has priority over core for for external accesses */ 2328#define CDPRIO 0x0100 /* DMA has priority over core for external accesses */
2329 2329
2330/* EBIU_AMGCTL Bit Positions */ 2330/* EBIU_AMGCTL Bit Positions */
2331#define AMCKEN_P 0x0000 /* Enable CLKOUT */ 2331#define AMCKEN_P 0x0000 /* Enable CLKOUT */
diff --git a/arch/blackfin/mach-bf548/boards/cm_bf548.c b/arch/blackfin/mach-bf548/boards/cm_bf548.c
index f5a3c30a41bd..e565aae11d72 100644
--- a/arch/blackfin/mach-bf548/boards/cm_bf548.c
+++ b/arch/blackfin/mach-bf548/boards/cm_bf548.c
@@ -291,6 +291,8 @@ static struct platform_device bfin_sir3_device = {
291#endif 291#endif
292 292
293#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) 293#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
294#include <linux/smsc911x.h>
295
294static struct resource smsc911x_resources[] = { 296static struct resource smsc911x_resources[] = {
295 { 297 {
296 .name = "smsc911x-memory", 298 .name = "smsc911x-memory",
@@ -304,11 +306,22 @@ static struct resource smsc911x_resources[] = {
304 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, 306 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
305 }, 307 },
306}; 308};
309
310static struct smsc911x_platform_config smsc911x_config = {
311 .flags = SMSC911X_USE_16BIT,
312 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
313 .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN,
314 .phy_interface = PHY_INTERFACE_MODE_MII,
315};
316
307static struct platform_device smsc911x_device = { 317static struct platform_device smsc911x_device = {
308 .name = "smsc911x", 318 .name = "smsc911x",
309 .id = 0, 319 .id = 0,
310 .num_resources = ARRAY_SIZE(smsc911x_resources), 320 .num_resources = ARRAY_SIZE(smsc911x_resources),
311 .resource = smsc911x_resources, 321 .resource = smsc911x_resources,
322 .dev = {
323 .platform_data = &smsc911x_config,
324 },
312}; 325};
313#endif 326#endif
314 327
@@ -473,7 +486,7 @@ static struct mtd_partition para_partitions[] = {
473 .offset = 0, 486 .offset = 0,
474 }, { 487 }, {
475 .name = "linux kernel(nor)", 488 .name = "linux kernel(nor)",
476 .size = 0x400000, 489 .size = 0x100000,
477 .offset = MTDPART_OFS_APPEND, 490 .offset = MTDPART_OFS_APPEND,
478 }, { 491 }, {
479 .name = "file system(nor)", 492 .name = "file system(nor)",
@@ -642,7 +655,7 @@ static struct resource bfin_spi1_resource[] = {
642 655
643/* SPI controller data */ 656/* SPI controller data */
644static struct bfin5xx_spi_master bf54x_spi_master_info0 = { 657static struct bfin5xx_spi_master bf54x_spi_master_info0 = {
645 .num_chipselect = 8, 658 .num_chipselect = 3,
646 .enable_dma = 1, /* master has the ability to do dma transfer */ 659 .enable_dma = 1, /* master has the ability to do dma transfer */
647 .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0}, 660 .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0},
648}; 661};
@@ -658,7 +671,7 @@ static struct platform_device bf54x_spi_master0 = {
658}; 671};
659 672
660static struct bfin5xx_spi_master bf54x_spi_master_info1 = { 673static struct bfin5xx_spi_master bf54x_spi_master_info1 = {
661 .num_chipselect = 8, 674 .num_chipselect = 3,
662 .enable_dma = 1, /* master has the ability to do dma transfer */ 675 .enable_dma = 1, /* master has the ability to do dma transfer */
663 .pin_req = {P_SPI1_SCK, P_SPI1_MISO, P_SPI1_MOSI, 0}, 676 .pin_req = {P_SPI1_SCK, P_SPI1_MISO, P_SPI1_MOSI, 0},
664}; 677};
diff --git a/arch/blackfin/mach-bf548/boards/ezkit.c b/arch/blackfin/mach-bf548/boards/ezkit.c
index dc0dd9b2bcef..c66f3801274f 100644
--- a/arch/blackfin/mach-bf548/boards/ezkit.c
+++ b/arch/blackfin/mach-bf548/boards/ezkit.c
@@ -99,8 +99,8 @@ static struct platform_device bfin_isp1760_device = {
99#include <mach/bf54x-lq043.h> 99#include <mach/bf54x-lq043.h>
100 100
101static struct bfin_bf54xfb_mach_info bf54x_lq043_data = { 101static struct bfin_bf54xfb_mach_info bf54x_lq043_data = {
102 .width = 480, 102 .width = 95,
103 .height = 272, 103 .height = 54,
104 .xres = {480, 480, 480}, 104 .xres = {480, 480, 480},
105 .yres = {272, 272, 272}, 105 .yres = {272, 272, 272},
106 .bpp = {24, 24, 24}, 106 .bpp = {24, 24, 24},
@@ -702,7 +702,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
702#if defined(CONFIG_SND_BLACKFIN_AD1836) \ 702#if defined(CONFIG_SND_BLACKFIN_AD1836) \
703 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) 703 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
704 { 704 {
705 .modalias = "ad1836-spi", 705 .modalias = "ad1836",
706 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 706 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
707 .bus_num = 1, 707 .bus_num = 1,
708 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, 708 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT,
@@ -783,7 +783,7 @@ static struct resource bfin_spi1_resource[] = {
783 783
784/* SPI controller data */ 784/* SPI controller data */
785static struct bfin5xx_spi_master bf54x_spi_master_info0 = { 785static struct bfin5xx_spi_master bf54x_spi_master_info0 = {
786 .num_chipselect = 8, 786 .num_chipselect = 3,
787 .enable_dma = 1, /* master has the ability to do dma transfer */ 787 .enable_dma = 1, /* master has the ability to do dma transfer */
788 .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0}, 788 .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0},
789}; 789};
@@ -799,7 +799,7 @@ static struct platform_device bf54x_spi_master0 = {
799}; 799};
800 800
801static struct bfin5xx_spi_master bf54x_spi_master_info1 = { 801static struct bfin5xx_spi_master bf54x_spi_master_info1 = {
802 .num_chipselect = 8, 802 .num_chipselect = 3,
803 .enable_dma = 1, /* master has the ability to do dma transfer */ 803 .enable_dma = 1, /* master has the ability to do dma transfer */
804 .pin_req = {P_SPI1_SCK, P_SPI1_MISO, P_SPI1_MOSI, 0}, 804 .pin_req = {P_SPI1_SCK, P_SPI1_MISO, P_SPI1_MOSI, 0},
805}; 805};
@@ -869,7 +869,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info1[] = {
869 I2C_BOARD_INFO("pcf8574_lcd", 0x22), 869 I2C_BOARD_INFO("pcf8574_lcd", 0x22),
870 }, 870 },
871#endif 871#endif
872#if defined(CONFIG_TWI_KEYPAD) || defined(CONFIG_TWI_KEYPAD_MODULE) 872#if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE)
873 { 873 {
874 I2C_BOARD_INFO("pcf8574_keypad", 0x27), 874 I2C_BOARD_INFO("pcf8574_keypad", 0x27),
875 .irq = 212, 875 .irq = 212,
diff --git a/arch/blackfin/mach-bf548/dma.c b/arch/blackfin/mach-bf548/dma.c
index 535980652bf6..d9239bc05dd4 100644
--- a/arch/blackfin/mach-bf548/dma.c
+++ b/arch/blackfin/mach-bf548/dma.c
@@ -91,16 +91,16 @@ int channel2irq(unsigned int channel)
91 ret_irq = IRQ_SPI1; 91 ret_irq = IRQ_SPI1;
92 break; 92 break;
93 case CH_UART0_RX: 93 case CH_UART0_RX:
94 ret_irq = IRQ_UART_RX; 94 ret_irq = IRQ_UART0_RX;
95 break; 95 break;
96 case CH_UART0_TX: 96 case CH_UART0_TX:
97 ret_irq = IRQ_UART_TX; 97 ret_irq = IRQ_UART0_TX;
98 break; 98 break;
99 case CH_UART1_RX: 99 case CH_UART1_RX:
100 ret_irq = IRQ_UART_RX; 100 ret_irq = IRQ_UART1_RX;
101 break; 101 break;
102 case CH_UART1_TX: 102 case CH_UART1_TX:
103 ret_irq = IRQ_UART_TX; 103 ret_irq = IRQ_UART1_TX;
104 break; 104 break;
105 case CH_EPPI0: 105 case CH_EPPI0:
106 ret_irq = IRQ_EPPI0; 106 ret_irq = IRQ_EPPI0;
diff --git a/arch/blackfin/mach-bf548/include/mach/anomaly.h b/arch/blackfin/mach-bf548/include/mach/anomaly.h
index cd040fe0bc5c..52b116ae522a 100644
--- a/arch/blackfin/mach-bf548/include/mach/anomaly.h
+++ b/arch/blackfin/mach-bf548/include/mach/anomaly.h
@@ -7,7 +7,7 @@
7 */ 7 */
8 8
9/* This file should be up to date with: 9/* This file should be up to date with:
10 * - Revision H, 01/16/2009; ADSP-BF542/BF544/BF547/BF548/BF549 Blackfin Processor Anomaly List 10 * - Revision I, 07/23/2009; ADSP-BF542/BF544/BF547/BF548/BF549 Blackfin Processor Anomaly List
11 */ 11 */
12 12
13#ifndef _MACH_ANOMALY_H_ 13#ifndef _MACH_ANOMALY_H_
@@ -162,6 +162,8 @@
162#define ANOMALY_05000430 (__SILICON_REVISION__ >= 2) 162#define ANOMALY_05000430 (__SILICON_REVISION__ >= 2)
163/* Incorrect Use of Stack in Lockbox Firmware During Authentication */ 163/* Incorrect Use of Stack in Lockbox Firmware During Authentication */
164#define ANOMALY_05000431 (__SILICON_REVISION__ < 3) 164#define ANOMALY_05000431 (__SILICON_REVISION__ < 3)
165/* SW Breakpoints Ignored Upon Return From Lockbox Authentication */
166#define ANOMALY_05000434 (1)
165/* OTP Write Accesses Not Supported */ 167/* OTP Write Accesses Not Supported */
166#define ANOMALY_05000442 (__SILICON_REVISION__ < 1) 168#define ANOMALY_05000442 (__SILICON_REVISION__ < 1)
167/* IFLUSH Instruction at End of Hardware Loop Causes Infinite Stall */ 169/* IFLUSH Instruction at End of Hardware Loop Causes Infinite Stall */
@@ -176,12 +178,26 @@
176#define ANOMALY_05000449 (__SILICON_REVISION__ == 1) 178#define ANOMALY_05000449 (__SILICON_REVISION__ == 1)
177/* USB DMA Mode 1 Short Packet Data Corruption */ 179/* USB DMA Mode 1 Short Packet Data Corruption */
178#define ANOMALY_05000450 (1) 180#define ANOMALY_05000450 (1)
181/* Incorrect Default Hysteresis Setting for RESET, NMI, and BMODE Signals */
182#define ANOMALY_05000452 (__SILICON_REVISION__ < 1)
179/* USB Receive Interrupt Is Not Generated in DMA Mode 1 */ 183/* USB Receive Interrupt Is Not Generated in DMA Mode 1 */
180#define ANOMALY_05000456 (__SILICON_REVISION__ < 3) 184#define ANOMALY_05000456 (1)
185/* Host DMA Port Responds to Certain Bus Activity Without HOST_CE Assertion */
186#define ANOMALY_05000457 (1)
187/* USB DMA Mode 1 Failure When Multiple USB DMA Channels Are Concurrently Enabled */
188#define ANOMALY_05000460 (1)
181/* False Hardware Error when RETI Points to Invalid Memory */ 189/* False Hardware Error when RETI Points to Invalid Memory */
182#define ANOMALY_05000461 (1) 190#define ANOMALY_05000461 (1)
191/* Synchronization Problem at Startup May Cause SPORT Transmit Channels to Misalign */
192#define ANOMALY_05000462 (1)
193/* USB DMA RX Data Corruption */
194#define ANOMALY_05000463 (1)
195/* USB TX DMA Hang */
196#define ANOMALY_05000464 (1)
183/* USB Rx DMA hang */ 197/* USB Rx DMA hang */
184#define ANOMALY_05000465 (1) 198#define ANOMALY_05000465 (1)
199/* TxPktRdy Bit Not Set for Transmit Endpoint When Core and DMA Access USB Endpoint FIFOs Simultaneously */
200#define ANOMALY_05000466 (1)
185/* Possible RX data corruption when control & data EP FIFOs are accessed via the core */ 201/* Possible RX data corruption when control & data EP FIFOs are accessed via the core */
186#define ANOMALY_05000467 (1) 202#define ANOMALY_05000467 (1)
187 203
@@ -230,6 +246,7 @@
230#define ANOMALY_05000364 (0) 246#define ANOMALY_05000364 (0)
231#define ANOMALY_05000380 (0) 247#define ANOMALY_05000380 (0)
232#define ANOMALY_05000400 (0) 248#define ANOMALY_05000400 (0)
249#define ANOMALY_05000402 (0)
233#define ANOMALY_05000412 (0) 250#define ANOMALY_05000412 (0)
234#define ANOMALY_05000432 (0) 251#define ANOMALY_05000432 (0)
235#define ANOMALY_05000435 (0) 252#define ANOMALY_05000435 (0)
diff --git a/arch/blackfin/mach-bf548/include/mach/blackfin.h b/arch/blackfin/mach-bf548/include/mach/blackfin.h
index 6b97396d817f..318667b2f036 100644
--- a/arch/blackfin/mach-bf548/include/mach/blackfin.h
+++ b/arch/blackfin/mach-bf548/include/mach/blackfin.h
@@ -72,97 +72,8 @@
72#include "cdefBF549.h" 72#include "cdefBF549.h"
73#endif 73#endif
74 74
75/* UART 1*/
76#define bfin_read_UART_THR() bfin_read_UART1_THR()
77#define bfin_write_UART_THR(val) bfin_write_UART1_THR(val)
78#define bfin_read_UART_RBR() bfin_read_UART1_RBR()
79#define bfin_write_UART_RBR(val) bfin_write_UART1_RBR(val)
80#define bfin_read_UART_DLL() bfin_read_UART1_DLL()
81#define bfin_write_UART_DLL(val) bfin_write_UART1_DLL(val)
82#define bfin_read_UART_IER() bfin_read_UART1_IER()
83#define bfin_write_UART_IER(val) bfin_write_UART1_IER(val)
84#define bfin_read_UART_DLH() bfin_read_UART1_DLH()
85#define bfin_write_UART_DLH(val) bfin_write_UART1_DLH(val)
86#define bfin_read_UART_IIR() bfin_read_UART1_IIR()
87#define bfin_write_UART_IIR(val) bfin_write_UART1_IIR(val)
88#define bfin_read_UART_LCR() bfin_read_UART1_LCR()
89#define bfin_write_UART_LCR(val) bfin_write_UART1_LCR(val)
90#define bfin_read_UART_MCR() bfin_read_UART1_MCR()
91#define bfin_write_UART_MCR(val) bfin_write_UART1_MCR(val)
92#define bfin_read_UART_LSR() bfin_read_UART1_LSR()
93#define bfin_write_UART_LSR(val) bfin_write_UART1_LSR(val)
94#define bfin_read_UART_SCR() bfin_read_UART1_SCR()
95#define bfin_write_UART_SCR(val) bfin_write_UART1_SCR(val)
96#define bfin_read_UART_GCTL() bfin_read_UART1_GCTL()
97#define bfin_write_UART_GCTL(val) bfin_write_UART1_GCTL(val)
98
99#endif 75#endif
100 76
101/* MAP used DEFINES from BF533 to BF54x - so we don't need to change
102 * them in the driver, kernel, etc. */
103
104/* UART_IIR Register */
105#define STATUS(x) ((x << 1) & 0x06)
106#define STATUS_P1 0x02
107#define STATUS_P0 0x01
108
109/* UART 0*/
110
111/* DMA Channel */
112#define bfin_read_CH_UART_RX() bfin_read_CH_UART1_RX()
113#define bfin_write_CH_UART_RX(val) bfin_write_CH_UART1_RX(val)
114#define bfin_read_CH_UART_TX() bfin_read_CH_UART1_TX()
115#define bfin_write_CH_UART_TX(val) bfin_write_CH_UART1_TX(val)
116#define CH_UART_RX CH_UART1_RX
117#define CH_UART_TX CH_UART1_TX
118
119/* System Interrupt Controller */
120#define bfin_read_IRQ_UART_RX() bfin_read_IRQ_UART1_RX()
121#define bfin_write_IRQ_UART_RX(val) bfin_write_IRQ_UART1_RX(val)
122#define bfin_read_IRQ_UART_TX() bfin_read_IRQ_UART1_TX()
123#define bfin_write_IRQ_UART_TX(val) bfin_write_IRQ_UART1_TX(val)
124#define bfin_read_IRQ_UART_ERROR() bfin_read_IRQ_UART1_ERROR()
125#define bfin_write_IRQ_UART_ERROR(val) bfin_write_IRQ_UART1_ERROR(val)
126#define IRQ_UART_RX IRQ_UART1_RX
127#define IRQ_UART_TX IRQ_UART1_TX
128#define IRQ_UART_ERROR IRQ_UART1_ERROR
129
130/* MMR Registers*/
131#define bfin_read_UART_THR() bfin_read_UART1_THR()
132#define bfin_write_UART_THR(val) bfin_write_UART1_THR(val)
133#define bfin_read_UART_RBR() bfin_read_UART1_RBR()
134#define bfin_write_UART_RBR(val) bfin_write_UART1_RBR(val)
135#define bfin_read_UART_DLL() bfin_read_UART1_DLL()
136#define bfin_write_UART_DLL(val) bfin_write_UART1_DLL(val)
137#define bfin_read_UART_IER() bfin_read_UART1_IER()
138#define bfin_write_UART_IER(val) bfin_write_UART1_IER(val)
139#define bfin_read_UART_DLH() bfin_read_UART1_DLH()
140#define bfin_write_UART_DLH(val) bfin_write_UART1_DLH(val)
141#define bfin_read_UART_IIR() bfin_read_UART1_IIR()
142#define bfin_write_UART_IIR(val) bfin_write_UART1_IIR(val)
143#define bfin_read_UART_LCR() bfin_read_UART1_LCR()
144#define bfin_write_UART_LCR(val) bfin_write_UART1_LCR(val)
145#define bfin_read_UART_MCR() bfin_read_UART1_MCR()
146#define bfin_write_UART_MCR(val) bfin_write_UART1_MCR(val)
147#define bfin_read_UART_LSR() bfin_read_UART1_LSR()
148#define bfin_write_UART_LSR(val) bfin_write_UART1_LSR(val)
149#define bfin_read_UART_SCR() bfin_read_UART1_SCR()
150#define bfin_write_UART_SCR(val) bfin_write_UART1_SCR(val)
151#define bfin_read_UART_GCTL() bfin_read_UART1_GCTL()
152#define bfin_write_UART_GCTL(val) bfin_write_UART1_GCTL(val)
153
154#define BFIN_UART_THR UART1_THR
155#define BFIN_UART_RBR UART1_RBR
156#define BFIN_UART_DLL UART1_DLL
157#define BFIN_UART_IER UART1_IER
158#define BFIN_UART_DLH UART1_DLH
159#define BFIN_UART_IIR UART1_IIR
160#define BFIN_UART_LCR UART1_LCR
161#define BFIN_UART_MCR UART1_MCR
162#define BFIN_UART_LSR UART1_LSR
163#define BFIN_UART_SCR UART1_SCR
164#define BFIN_UART_GCTL UART1_GCTL
165
166#define BFIN_UART_NR_PORTS 4 77#define BFIN_UART_NR_PORTS 4
167 78
168#define OFFSET_DLL 0x00 /* Divisor Latch (Low-Byte) */ 79#define OFFSET_DLL 0x00 /* Divisor Latch (Low-Byte) */
diff --git a/arch/blackfin/mach-bf561/boards/cm_bf561.c b/arch/blackfin/mach-bf561/boards/cm_bf561.c
index 0c9d72c5f5ba..6577ecfcf11e 100644
--- a/arch/blackfin/mach-bf561/boards/cm_bf561.c
+++ b/arch/blackfin/mach-bf561/boards/cm_bf561.c
@@ -42,6 +42,7 @@
42#include <asm/bfin5xx_spi.h> 42#include <asm/bfin5xx_spi.h>
43#include <asm/portmux.h> 43#include <asm/portmux.h>
44#include <asm/dpmc.h> 44#include <asm/dpmc.h>
45#include <linux/mtd/physmap.h>
45 46
46/* 47/*
47 * Name the Board for the /proc/cpuinfo 48 * Name the Board for the /proc/cpuinfo
@@ -98,13 +99,6 @@ static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
98}; 99};
99#endif 100#endif
100 101
101#if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
102static struct bfin5xx_spi_chip ad9960_spi_chip_info = {
103 .enable_dma = 0,
104 .bits_per_word = 16,
105};
106#endif
107
108#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 102#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
109static struct bfin5xx_spi_chip mmc_spi_chip_info = { 103static struct bfin5xx_spi_chip mmc_spi_chip_info = {
110 .enable_dma = 0, 104 .enable_dma = 0,
@@ -139,28 +133,19 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
139 133
140#if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) 134#if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
141 { 135 {
142 .modalias = "ad1836-spi", 136 .modalias = "ad1836",
143 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 137 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
144 .bus_num = 0, 138 .bus_num = 0,
145 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, 139 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT,
146 .controller_data = &ad1836_spi_chip_info, 140 .controller_data = &ad1836_spi_chip_info,
147 }, 141 },
148#endif 142#endif
149#if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
150 {
151 .modalias = "ad9960-spi",
152 .max_speed_hz = 10000000, /* max spi clock (SCK) speed in HZ */
153 .bus_num = 0,
154 .chip_select = 1,
155 .controller_data = &ad9960_spi_chip_info,
156 },
157#endif
158#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 143#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
159 { 144 {
160 .modalias = "mmc_spi", 145 .modalias = "mmc_spi",
161 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ 146 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
162 .bus_num = 0, 147 .bus_num = 0,
163 .chip_select = 5, 148 .chip_select = 1,
164 .controller_data = &mmc_spi_chip_info, 149 .controller_data = &mmc_spi_chip_info,
165 .mode = SPI_MODE_3, 150 .mode = SPI_MODE_3,
166 }, 151 },
@@ -213,6 +198,13 @@ static struct platform_device hitachi_fb_device = {
213 198
214 199
215#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 200#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
201#include <linux/smc91x.h>
202
203static struct smc91x_platdata smc91x_info = {
204 .flags = SMC91X_USE_32BIT | SMC91X_NOWAIT,
205 .leda = RPC_LED_100_10,
206 .ledb = RPC_LED_TX_RX,
207};
216 208
217static struct resource smc91x_resources[] = { 209static struct resource smc91x_resources[] = {
218 { 210 {
@@ -231,6 +223,65 @@ static struct platform_device smc91x_device = {
231 .id = 0, 223 .id = 0,
232 .num_resources = ARRAY_SIZE(smc91x_resources), 224 .num_resources = ARRAY_SIZE(smc91x_resources),
233 .resource = smc91x_resources, 225 .resource = smc91x_resources,
226 .dev = {
227 .platform_data = &smc91x_info,
228 },
229};
230#endif
231
232#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
233#include <linux/smsc911x.h>
234
235static struct resource smsc911x_resources[] = {
236 {
237 .name = "smsc911x-memory",
238 .start = 0x24008000,
239 .end = 0x24008000 + 0xFF,
240 .flags = IORESOURCE_MEM,
241 },
242 {
243 .start = IRQ_PF43,
244 .end = IRQ_PF43,
245 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
246 },
247};
248
249static struct smsc911x_platform_config smsc911x_config = {
250 .flags = SMSC911X_USE_16BIT,
251 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
252 .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN,
253 .phy_interface = PHY_INTERFACE_MODE_MII,
254};
255
256static struct platform_device smsc911x_device = {
257 .name = "smsc911x",
258 .id = 0,
259 .num_resources = ARRAY_SIZE(smsc911x_resources),
260 .resource = smsc911x_resources,
261 .dev = {
262 .platform_data = &smsc911x_config,
263 },
264};
265#endif
266
267#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
268static struct resource net2272_bfin_resources[] = {
269 {
270 .start = 0x24000000,
271 .end = 0x24000000 + 0x100,
272 .flags = IORESOURCE_MEM,
273 }, {
274 .start = IRQ_PF45,
275 .end = IRQ_PF45,
276 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
277 },
278};
279
280static struct platform_device net2272_bfin_device = {
281 .name = "net2272",
282 .id = -1,
283 .num_resources = ARRAY_SIZE(net2272_bfin_resources),
284 .resource = net2272_bfin_resources,
234}; 285};
235#endif 286#endif
236 287
@@ -369,6 +420,46 @@ static struct platform_device bfin_pata_device = {
369}; 420};
370#endif 421#endif
371 422
423#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
424static struct mtd_partition para_partitions[] = {
425 {
426 .name = "bootloader(nor)",
427 .size = 0x40000,
428 .offset = 0,
429 }, {
430 .name = "linux kernel(nor)",
431 .size = 0x100000,
432 .offset = MTDPART_OFS_APPEND,
433 }, {
434 .name = "file system(nor)",
435 .size = MTDPART_SIZ_FULL,
436 .offset = MTDPART_OFS_APPEND,
437 }
438};
439
440static struct physmap_flash_data para_flash_data = {
441 .width = 2,
442 .parts = para_partitions,
443 .nr_parts = ARRAY_SIZE(para_partitions),
444};
445
446static struct resource para_flash_resource = {
447 .start = 0x20000000,
448 .end = 0x207fffff,
449 .flags = IORESOURCE_MEM,
450};
451
452static struct platform_device para_flash_device = {
453 .name = "physmap-flash",
454 .id = 0,
455 .dev = {
456 .platform_data = &para_flash_data,
457 },
458 .num_resources = 1,
459 .resource = &para_flash_resource,
460};
461#endif
462
372static const unsigned int cclk_vlev_datasheet[] = 463static const unsigned int cclk_vlev_datasheet[] =
373{ 464{
374 VRPAIR(VLEV_085, 250000000), 465 VRPAIR(VLEV_085, 250000000),
@@ -422,6 +513,14 @@ static struct platform_device *cm_bf561_devices[] __initdata = {
422 &smc91x_device, 513 &smc91x_device,
423#endif 514#endif
424 515
516#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
517 &smsc911x_device,
518#endif
519
520#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
521 &net2272_bfin_device,
522#endif
523
425#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 524#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
426 &bfin_spi0_device, 525 &bfin_spi0_device,
427#endif 526#endif
@@ -430,6 +529,10 @@ static struct platform_device *cm_bf561_devices[] __initdata = {
430 &bfin_pata_device, 529 &bfin_pata_device,
431#endif 530#endif
432 531
532#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
533 &para_flash_device,
534#endif
535
433 &bfin_gpios_device, 536 &bfin_gpios_device,
434}; 537};
435 538
diff --git a/arch/blackfin/mach-bf561/boards/ezkit.c b/arch/blackfin/mach-bf561/boards/ezkit.c
index 4df904f9e90a..caed96bb957e 100644
--- a/arch/blackfin/mach-bf561/boards/ezkit.c
+++ b/arch/blackfin/mach-bf561/boards/ezkit.c
@@ -147,6 +147,14 @@ static struct platform_device net2272_bfin_device = {
147 * Driver needs to know address, irq and flag pin. 147 * Driver needs to know address, irq and flag pin.
148 */ 148 */
149#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 149#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
150#include <linux/smc91x.h>
151
152static struct smc91x_platdata smc91x_info = {
153 .flags = SMC91X_USE_32BIT | SMC91X_NOWAIT,
154 .leda = RPC_LED_100_10,
155 .ledb = RPC_LED_TX_RX,
156};
157
150static struct resource smc91x_resources[] = { 158static struct resource smc91x_resources[] = {
151 { 159 {
152 .name = "smc91x-regs", 160 .name = "smc91x-regs",
@@ -166,6 +174,9 @@ static struct platform_device smc91x_device = {
166 .id = 0, 174 .id = 0,
167 .num_resources = ARRAY_SIZE(smc91x_resources), 175 .num_resources = ARRAY_SIZE(smc91x_resources),
168 .resource = smc91x_resources, 176 .resource = smc91x_resources,
177 .dev = {
178 .platform_data = &smc91x_info,
179 },
169}; 180};
170#endif 181#endif
171 182
@@ -334,7 +345,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
334#if defined(CONFIG_SND_BLACKFIN_AD1836) \ 345#if defined(CONFIG_SND_BLACKFIN_AD1836) \
335 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) 346 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
336 { 347 {
337 .modalias = "ad1836-spi", 348 .modalias = "ad1836",
338 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 349 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
339 .bus_num = 0, 350 .bus_num = 0,
340 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, 351 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT,
diff --git a/arch/blackfin/mach-bf561/include/mach/anomaly.h b/arch/blackfin/mach-bf561/include/mach/anomaly.h
index a5312b2d267e..70da495c9665 100644
--- a/arch/blackfin/mach-bf561/include/mach/anomaly.h
+++ b/arch/blackfin/mach-bf561/include/mach/anomaly.h
@@ -262,6 +262,8 @@
262#define ANOMALY_05000366 (1) 262#define ANOMALY_05000366 (1)
263/* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */ 263/* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */
264#define ANOMALY_05000371 (1) 264#define ANOMALY_05000371 (1)
265/* SSYNC Stalls Processor when Executed from Non-Cacheable Memory */
266#define ANOMALY_05000402 (__SILICON_REVISION__ == 4)
265/* Level-Sensitive External GPIO Wakeups May Cause Indefinite Stall */ 267/* Level-Sensitive External GPIO Wakeups May Cause Indefinite Stall */
266#define ANOMALY_05000403 (1) 268#define ANOMALY_05000403 (1)
267/* TESTSET Instruction Causes Data Corruption with Writeback Data Cache Enabled */ 269/* TESTSET Instruction Causes Data Corruption with Writeback Data Cache Enabled */
diff --git a/arch/blackfin/mach-bf561/secondary.S b/arch/blackfin/mach-bf561/secondary.S
index 35280f06b7b6..f72a6af20c4f 100644
--- a/arch/blackfin/mach-bf561/secondary.S
+++ b/arch/blackfin/mach-bf561/secondary.S
@@ -85,16 +85,10 @@ ENTRY(_coreb_trampoline_start)
85 R0 = ~ENICPLB; 85 R0 = ~ENICPLB;
86 R0 = R0 & R1; 86 R0 = R0 & R1;
87 87
88 /* Anomaly 05000125 */ 88 /* Disabling of CPLBs should be proceeded by a CSYNC */
89#ifdef ANOMALY_05000125 89 CSYNC;
90 CLI R2;
91 SSYNC;
92#endif
93 [p0] = R0; 90 [p0] = R0;
94 SSYNC; 91 SSYNC;
95#ifdef ANOMALY_05000125
96 STI R2;
97#endif
98 92
99 /* Turn off the dcache */ 93 /* Turn off the dcache */
100 p0.l = LO(DMEM_CONTROL); 94 p0.l = LO(DMEM_CONTROL);
@@ -103,16 +97,10 @@ ENTRY(_coreb_trampoline_start)
103 R0 = ~ENDCPLB; 97 R0 = ~ENDCPLB;
104 R0 = R0 & R1; 98 R0 = R0 & R1;
105 99
106 /* Anomaly 05000125 */ 100 /* Disabling of CPLBs should be proceeded by a CSYNC */
107#ifdef ANOMALY_05000125 101 CSYNC;
108 CLI R2;
109 SSYNC;
110#endif
111 [p0] = R0; 102 [p0] = R0;
112 SSYNC; 103 SSYNC;
113#ifdef ANOMALY_05000125
114 STI R2;
115#endif
116 104
117 /* in case of double faults, save a few things */ 105 /* in case of double faults, save a few things */
118 p0.l = _init_retx_coreb; 106 p0.l = _init_retx_coreb;
@@ -126,22 +114,22 @@ ENTRY(_coreb_trampoline_start)
126 * below 114 * below
127 */ 115 */
128 GET_PDA(p0, r0); 116 GET_PDA(p0, r0);
129 r7 = [p0 + PDA_RETX]; 117 r7 = [p0 + PDA_DF_RETX];
130 p1.l = _init_saved_retx_coreb; 118 p1.l = _init_saved_retx_coreb;
131 p1.h = _init_saved_retx_coreb; 119 p1.h = _init_saved_retx_coreb;
132 [p1] = r7; 120 [p1] = r7;
133 121
134 r7 = [p0 + PDA_DCPLB]; 122 r7 = [p0 + PDA_DF_DCPLB];
135 p1.l = _init_saved_dcplb_fault_addr_coreb; 123 p1.l = _init_saved_dcplb_fault_addr_coreb;
136 p1.h = _init_saved_dcplb_fault_addr_coreb; 124 p1.h = _init_saved_dcplb_fault_addr_coreb;
137 [p1] = r7; 125 [p1] = r7;
138 126
139 r7 = [p0 + PDA_ICPLB]; 127 r7 = [p0 + PDA_DF_ICPLB];
140 p1.l = _init_saved_icplb_fault_addr_coreb; 128 p1.l = _init_saved_icplb_fault_addr_coreb;
141 p1.h = _init_saved_icplb_fault_addr_coreb; 129 p1.h = _init_saved_icplb_fault_addr_coreb;
142 [p1] = r7; 130 [p1] = r7;
143 131
144 r7 = [p0 + PDA_SEQSTAT]; 132 r7 = [p0 + PDA_DF_SEQSTAT];
145 p1.l = _init_saved_seqstat_coreb; 133 p1.l = _init_saved_seqstat_coreb;
146 p1.h = _init_saved_seqstat_coreb; 134 p1.h = _init_saved_seqstat_coreb;
147 [p1] = r7; 135 [p1] = r7;
diff --git a/arch/blackfin/mach-common/Makefile b/arch/blackfin/mach-common/Makefile
index dd8b2dc97f56..814cb483853b 100644
--- a/arch/blackfin/mach-common/Makefile
+++ b/arch/blackfin/mach-common/Makefile
@@ -6,7 +6,6 @@ obj-y := \
6 cache.o cache-c.o entry.o head.o \ 6 cache.o cache-c.o entry.o head.o \
7 interrupt.o arch_checks.o ints-priority.o 7 interrupt.o arch_checks.o ints-priority.o
8 8
9obj-$(CONFIG_BFIN_ICACHE_LOCK) += lock.o
10obj-$(CONFIG_PM) += pm.o dpmc_modes.o 9obj-$(CONFIG_PM) += pm.o dpmc_modes.o
11obj-$(CONFIG_CPU_FREQ) += cpufreq.o 10obj-$(CONFIG_CPU_FREQ) += cpufreq.o
12obj-$(CONFIG_CPU_VOLTAGE) += dpmc.o 11obj-$(CONFIG_CPU_VOLTAGE) += dpmc.o
diff --git a/arch/blackfin/mach-common/cache-c.c b/arch/blackfin/mach-common/cache-c.c
index b59ce3cb3807..4ebbd78db3a4 100644
--- a/arch/blackfin/mach-common/cache-c.c
+++ b/arch/blackfin/mach-common/cache-c.c
@@ -1,14 +1,16 @@
1/* 1/*
2 * Blackfin cache control code (simpler control-style functions) 2 * Blackfin cache control code (simpler control-style functions)
3 * 3 *
4 * Copyright 2004-2008 Analog Devices Inc. 4 * Copyright 2004-2009 Analog Devices Inc.
5 * 5 *
6 * Enter bugs at http://blackfin.uclinux.org/ 6 * Enter bugs at http://blackfin.uclinux.org/
7 * 7 *
8 * Licensed under the GPL-2 or later. 8 * Licensed under the GPL-2 or later.
9 */ 9 */
10 10
11#include <linux/init.h>
11#include <asm/blackfin.h> 12#include <asm/blackfin.h>
13#include <asm/cplbinit.h>
12 14
13/* Invalidate the Entire Data cache by 15/* Invalidate the Entire Data cache by
14 * clearing DMC[1:0] bits 16 * clearing DMC[1:0] bits
@@ -34,3 +36,43 @@ void blackfin_invalidate_entire_icache(void)
34 SSYNC(); 36 SSYNC();
35} 37}
36 38
39#if defined(CONFIG_BFIN_ICACHE) || defined(CONFIG_BFIN_DCACHE)
40
41static void
42bfin_cache_init(struct cplb_entry *cplb_tbl, unsigned long cplb_addr,
43 unsigned long cplb_data, unsigned long mem_control,
44 unsigned long mem_mask)
45{
46 int i;
47
48 for (i = 0; i < MAX_CPLBS; i++) {
49 bfin_write32(cplb_addr + i * 4, cplb_tbl[i].addr);
50 bfin_write32(cplb_data + i * 4, cplb_tbl[i].data);
51 }
52
53 _enable_cplb(mem_control, mem_mask);
54}
55
56#ifdef CONFIG_BFIN_ICACHE
57void __cpuinit bfin_icache_init(struct cplb_entry *icplb_tbl)
58{
59 bfin_cache_init(icplb_tbl, ICPLB_ADDR0, ICPLB_DATA0, IMEM_CONTROL,
60 (IMC | ENICPLB));
61}
62#endif
63
64#ifdef CONFIG_BFIN_DCACHE
65void __cpuinit bfin_dcache_init(struct cplb_entry *dcplb_tbl)
66{
67 /*
68 * Anomaly notes:
69 * 05000287 - We implement workaround #2 - Change the DMEM_CONTROL
70 * register, so that the port preferences for DAG0 and DAG1 are set
71 * to port B
72 */
73 bfin_cache_init(dcplb_tbl, DCPLB_ADDR0, DCPLB_DATA0, DMEM_CONTROL,
74 (DMEM_CNTR | PORT_PREF0 | (ANOMALY_05000287 ? PORT_PREF1 : 0)));
75}
76#endif
77
78#endif
diff --git a/arch/blackfin/mach-common/entry.S b/arch/blackfin/mach-common/entry.S
index fb1795d5be2a..1e7cac23e25f 100644
--- a/arch/blackfin/mach-common/entry.S
+++ b/arch/blackfin/mach-common/entry.S
@@ -301,27 +301,31 @@ ENTRY(_ex_replaceable)
301 nop; 301 nop;
302 302
303ENTRY(_ex_trap_c) 303ENTRY(_ex_trap_c)
304 /* The only thing that has been saved in this context is
305 * (R7:6,P5:4), ASTAT & SP - don't use anything else
306 */
307
308 GET_PDA(p5, r6);
309
304 /* Make sure we are not in a double fault */ 310 /* Make sure we are not in a double fault */
305 p4.l = lo(IPEND); 311 p4.l = lo(IPEND);
306 p4.h = hi(IPEND); 312 p4.h = hi(IPEND);
307 r7 = [p4]; 313 r7 = [p4];
308 CC = BITTST (r7, 5); 314 CC = BITTST (r7, 5);
309 if CC jump _double_fault; 315 if CC jump _double_fault;
316 [p5 + PDA_EXIPEND] = r7;
310 317
311 /* Call C code (trap_c) to handle the exception, which most 318 /* Call C code (trap_c) to handle the exception, which most
312 * likely involves sending a signal to the current process. 319 * likely involves sending a signal to the current process.
313 * To avoid double faults, lower our priority to IRQ5 first. 320 * To avoid double faults, lower our priority to IRQ5 first.
314 */ 321 */
315 P5.h = _exception_to_level5; 322 r7.h = _exception_to_level5;
316 P5.l = _exception_to_level5; 323 r7.l = _exception_to_level5;
317 p4.l = lo(EVT5); 324 p4.l = lo(EVT5);
318 p4.h = hi(EVT5); 325 p4.h = hi(EVT5);
319 [p4] = p5; 326 [p4] = r7;
320 csync; 327 csync;
321 328
322 GET_PDA(p5, r6);
323#ifndef CONFIG_DEBUG_DOUBLEFAULT
324
325 /* 329 /*
326 * Save these registers, as they are only valid in exception context 330 * Save these registers, as they are only valid in exception context
327 * (where we are now - as soon as we defer to IRQ5, they can change) 331 * (where we are now - as soon as we defer to IRQ5, they can change)
@@ -341,7 +345,10 @@ ENTRY(_ex_trap_c)
341 345
342 r6 = retx; 346 r6 = retx;
343 [p5 + PDA_RETX] = r6; 347 [p5 + PDA_RETX] = r6;
344#endif 348
349 r6 = SEQSTAT;
350 [p5 + PDA_SEQSTAT] = r6;
351
345 /* Save the state of single stepping */ 352 /* Save the state of single stepping */
346 r6 = SYSCFG; 353 r6 = SYSCFG;
347 [p5 + PDA_SYSCFG] = r6; 354 [p5 + PDA_SYSCFG] = r6;
@@ -349,8 +356,7 @@ ENTRY(_ex_trap_c)
349 BITCLR(r6, SYSCFG_SSSTEP_P); 356 BITCLR(r6, SYSCFG_SSSTEP_P);
350 SYSCFG = r6; 357 SYSCFG = r6;
351 358
352 /* Disable all interrupts, but make sure level 5 is enabled so 359 /* Save the current IMASK, since we change in order to jump to level 5 */
353 * we can switch to that level. Save the old mask. */
354 cli r6; 360 cli r6;
355 [p5 + PDA_EXIMASK] = r6; 361 [p5 + PDA_EXIMASK] = r6;
356 362
@@ -358,9 +364,21 @@ ENTRY(_ex_trap_c)
358 p4.h = hi(SAFE_USER_INSTRUCTION); 364 p4.h = hi(SAFE_USER_INSTRUCTION);
359 retx = p4; 365 retx = p4;
360 366
367 /* Disable all interrupts, but make sure level 5 is enabled so
368 * we can switch to that level.
369 */
361 r6 = 0x3f; 370 r6 = 0x3f;
362 sti r6; 371 sti r6;
363 372
373 /* In case interrupts are disabled IPEND[4] (global interrupt disable bit)
374 * clear it (re-enabling interrupts again) by the special sequence of pushing
375 * RETI onto the stack. This way we can lower ourselves to IVG5 even if the
376 * exception was taken after the interrupt handler was called but before it
377 * got a chance to enable global interrupts itself.
378 */
379 [--sp] = reti;
380 sp += 4;
381
364 raise 5; 382 raise 5;
365 jump.s _bfin_return_from_exception; 383 jump.s _bfin_return_from_exception;
366ENDPROC(_ex_trap_c) 384ENDPROC(_ex_trap_c)
@@ -379,8 +397,7 @@ ENTRY(_double_fault)
379 397
380 R5 = [P4]; /* Control Register*/ 398 R5 = [P4]; /* Control Register*/
381 BITCLR(R5,ENICPLB_P); 399 BITCLR(R5,ENICPLB_P);
382 SSYNC; /* SSYNC required before writing to IMEM_CONTROL. */ 400 CSYNC; /* Disabling of CPLBs should be proceeded by a CSYNC */
383 .align 8;
384 [P4] = R5; 401 [P4] = R5;
385 SSYNC; 402 SSYNC;
386 403
@@ -388,8 +405,7 @@ ENTRY(_double_fault)
388 P4.H = HI(DMEM_CONTROL); 405 P4.H = HI(DMEM_CONTROL);
389 R5 = [P4]; 406 R5 = [P4];
390 BITCLR(R5,ENDCPLB_P); 407 BITCLR(R5,ENDCPLB_P);
391 SSYNC; /* SSYNC required before writing to DMEM_CONTROL. */ 408 CSYNC; /* Disabling of CPLBs should be proceeded by a CSYNC */
392 .align 8;
393 [P4] = R5; 409 [P4] = R5;
394 SSYNC; 410 SSYNC;
395 411
@@ -420,47 +436,55 @@ ENDPROC(_double_fault)
420ENTRY(_exception_to_level5) 436ENTRY(_exception_to_level5)
421 SAVE_ALL_SYS 437 SAVE_ALL_SYS
422 438
423 GET_PDA(p4, r7); /* Fetch current PDA */ 439 GET_PDA(p5, r7); /* Fetch current PDA */
424 r6 = [p4 + PDA_RETX]; 440 r6 = [p5 + PDA_RETX];
425 [sp + PT_PC] = r6; 441 [sp + PT_PC] = r6;
426 442
427 r6 = [p4 + PDA_SYSCFG]; 443 r6 = [p5 + PDA_SYSCFG];
428 [sp + PT_SYSCFG] = r6; 444 [sp + PT_SYSCFG] = r6;
429 445
430 /* Restore interrupt mask. We haven't pushed RETI, so this 446 r6 = [p5 + PDA_SEQSTAT]; /* Read back seqstat */
431 * doesn't enable interrupts until we return from this handler. */ 447 [sp + PT_SEQSTAT] = r6;
432 r6 = [p4 + PDA_EXIMASK];
433 sti r6;
434 448
435 /* Restore the hardware error vector. */ 449 /* Restore the hardware error vector. */
436 P5.h = _evt_ivhw; 450 r7.h = _evt_ivhw;
437 P5.l = _evt_ivhw; 451 r7.l = _evt_ivhw;
438 p4.l = lo(EVT5); 452 p4.l = lo(EVT5);
439 p4.h = hi(EVT5); 453 p4.h = hi(EVT5);
440 [p4] = p5; 454 [p4] = r7;
441 csync; 455 csync;
442 456
443 p2.l = lo(IPEND); 457#ifdef CONFIG_DEBUG_DOUBLEFAULT
444 p2.h = hi(IPEND); 458 /* Now that we have the hardware error vector programmed properly
445 csync; 459 * we can re-enable interrupts (IPEND[4]), so if the _trap_c causes
446 r0 = [p2]; /* Read current IPEND */ 460 * another hardware error, we can catch it (self-nesting).
447 [sp + PT_IPEND] = r0; /* Store IPEND */ 461 */
462 [--sp] = reti;
463 sp += 4;
464#endif
465
466 r7 = [p5 + PDA_EXIPEND] /* Read the IPEND from the Exception state */
467 [sp + PT_IPEND] = r7; /* Store IPEND onto the stack */
448 468
449 r0 = sp; /* stack frame pt_regs pointer argument ==> r0 */ 469 r0 = sp; /* stack frame pt_regs pointer argument ==> r0 */
450 SP += -12; 470 SP += -12;
451 call _trap_c; 471 call _trap_c;
452 SP += 12; 472 SP += 12;
453 473
454#ifdef CONFIG_DEBUG_DOUBLEFAULT 474 /* If interrupts were off during the exception (IPEND[4] = 1), turn them off
455 /* Grab ILAT */ 475 * before we return.
456 p2.l = lo(ILAT); 476 */
457 p2.h = hi(ILAT); 477 CC = BITTST(r7, EVT_IRPTEN_P)
458 r0 = [p2]; 478 if !CC jump 1f;
459 r1 = 0x20; /* Did I just cause anther HW error? */ 479 /* this will load a random value into the reti register - but that is OK,
460 r0 = r0 & r1; 480 * since we do restore it to the correct value in the 'RESTORE_ALL_SYS' macro
461 CC = R0 == R1; 481 */
462 if CC JUMP _double_fault; 482 sp += -4;
463#endif 483 reti = [sp++];
4841:
485 /* restore the interrupt mask (IMASK) */
486 r6 = [p5 + PDA_EXIMASK];
487 sti r6;
464 488
465 call _ret_from_exception; 489 call _ret_from_exception;
466 RESTORE_ALL_SYS 490 RESTORE_ALL_SYS
@@ -474,7 +498,7 @@ ENTRY(_trap) /* Exception: 4th entry into system event table(supervisor mode)*/
474 */ 498 */
475 EX_SCRATCH_REG = sp; 499 EX_SCRATCH_REG = sp;
476 GET_PDA_SAFE(sp); 500 GET_PDA_SAFE(sp);
477 sp = [sp + PDA_EXSTACK] 501 sp = [sp + PDA_EXSTACK];
478 /* Try to deal with syscalls quickly. */ 502 /* Try to deal with syscalls quickly. */
479 [--sp] = ASTAT; 503 [--sp] = ASTAT;
480 [--sp] = (R7:6,P5:4); 504 [--sp] = (R7:6,P5:4);
@@ -489,14 +513,7 @@ ENTRY(_trap) /* Exception: 4th entry into system event table(supervisor mode)*/
489 ssync; 513 ssync;
490#endif 514#endif
491 515
492#if ANOMALY_05000283 || ANOMALY_05000315 516 ANOMALY_283_315_WORKAROUND(p5, r7)
493 cc = r7 == r7;
494 p5.h = HI(CHIPID);
495 p5.l = LO(CHIPID);
496 if cc jump 1f;
497 r7.l = W[p5];
4981:
499#endif
500 517
501#ifdef CONFIG_DEBUG_DOUBLEFAULT 518#ifdef CONFIG_DEBUG_DOUBLEFAULT
502 /* 519 /*
@@ -510,18 +527,18 @@ ENTRY(_trap) /* Exception: 4th entry into system event table(supervisor mode)*/
510 p4.l = lo(DCPLB_FAULT_ADDR); 527 p4.l = lo(DCPLB_FAULT_ADDR);
511 p4.h = hi(DCPLB_FAULT_ADDR); 528 p4.h = hi(DCPLB_FAULT_ADDR);
512 r7 = [p4]; 529 r7 = [p4];
513 [p5 + PDA_DCPLB] = r7; 530 [p5 + PDA_DF_DCPLB] = r7;
514 531
515 p4.l = lo(ICPLB_FAULT_ADDR); 532 p4.l = lo(ICPLB_FAULT_ADDR);
516 p4.h = hi(ICPLB_FAULT_ADDR); 533 p4.h = hi(ICPLB_FAULT_ADDR);
517 r7 = [p4]; 534 r7 = [p4];
518 [p5 + PDA_ICPLB] = r7; 535 [p5 + PDA_DF_ICPLB] = r7;
519 536
520 r6 = retx; 537 r7 = retx;
521 [p5 + PDA_RETX] = r6; 538 [p5 + PDA_DF_RETX] = r7;
522 539
523 r7 = SEQSTAT; /* reason code is in bit 5:0 */ 540 r7 = SEQSTAT; /* reason code is in bit 5:0 */
524 [p5 + PDA_SEQSTAT] = r7; 541 [p5 + PDA_DF_SEQSTAT] = r7;
525#else 542#else
526 r7 = SEQSTAT; /* reason code is in bit 5:0 */ 543 r7 = SEQSTAT; /* reason code is in bit 5:0 */
527#endif 544#endif
@@ -686,8 +703,14 @@ ENTRY(_system_call)
686#ifdef CONFIG_IPIPE 703#ifdef CONFIG_IPIPE
687 cc = BITTST(r7, TIF_IRQ_SYNC); 704 cc = BITTST(r7, TIF_IRQ_SYNC);
688 if !cc jump .Lsyscall_no_irqsync; 705 if !cc jump .Lsyscall_no_irqsync;
706 /*
707 * Clear IPEND[4] manually to undo what resume_userspace_1 just did;
708 * we need this so that high priority domain interrupts may still
709 * preempt the current domain while the pipeline log is being played
710 * back.
711 */
689 [--sp] = reti; 712 [--sp] = reti;
690 r0 = [sp++]; 713 SP += 4; /* don't merge with next insn to keep the pattern obvious */
691 SP += -12; 714 SP += -12;
692 call ___ipipe_sync_root; 715 call ___ipipe_sync_root;
693 SP += 12; 716 SP += 12;
@@ -699,7 +722,7 @@ ENTRY(_system_call)
699 722
700 /* Reenable interrupts. */ 723 /* Reenable interrupts. */
701 [--sp] = reti; 724 [--sp] = reti;
702 r0 = [sp++]; 725 sp += 4;
703 726
704 SP += -12; 727 SP += -12;
705 call _schedule; 728 call _schedule;
@@ -715,7 +738,7 @@ ENTRY(_system_call)
715.Lsyscall_do_signals: 738.Lsyscall_do_signals:
716 /* Reenable interrupts. */ 739 /* Reenable interrupts. */
717 [--sp] = reti; 740 [--sp] = reti;
718 r0 = [sp++]; 741 sp += 4;
719 742
720 r0 = sp; 743 r0 = sp;
721 SP += -12; 744 SP += -12;
@@ -725,10 +748,6 @@ ENTRY(_system_call)
725.Lsyscall_really_exit: 748.Lsyscall_really_exit:
726 r5 = [sp + PT_RESERVED]; 749 r5 = [sp + PT_RESERVED];
727 rets = r5; 750 rets = r5;
728#ifdef CONFIG_IPIPE
729 [--sp] = reti;
730 r5 = [sp++];
731#endif /* CONFIG_IPIPE */
732 rts; 751 rts;
733ENDPROC(_system_call) 752ENDPROC(_system_call)
734 753
@@ -816,13 +835,13 @@ ENDPROC(_resume)
816 835
817ENTRY(_ret_from_exception) 836ENTRY(_ret_from_exception)
818#ifdef CONFIG_IPIPE 837#ifdef CONFIG_IPIPE
819 [--sp] = rets; 838 p2.l = _per_cpu__ipipe_percpu_domain;
820 SP += -12; 839 p2.h = _per_cpu__ipipe_percpu_domain;
821 call ___ipipe_check_root 840 r0.l = _ipipe_root;
822 SP += 12 841 r0.h = _ipipe_root;
823 rets = [sp++]; 842 r2 = [p2];
824 cc = r0 == 0; 843 cc = r0 == r2;
825 if cc jump 4f; /* not on behalf of Linux, get out */ 844 if !cc jump 4f; /* not on behalf of the root domain, get out */
826#endif /* CONFIG_IPIPE */ 845#endif /* CONFIG_IPIPE */
827 p2.l = lo(IPEND); 846 p2.l = lo(IPEND);
828 p2.h = hi(IPEND); 847 p2.h = hi(IPEND);
@@ -882,14 +901,9 @@ ENDPROC(_ret_from_exception)
882 901
883#ifdef CONFIG_IPIPE 902#ifdef CONFIG_IPIPE
884 903
885_sync_root_irqs:
886 [--sp] = reti; /* Reenable interrupts */
887 r0 = [sp++];
888 jump.l ___ipipe_sync_root
889
890_resume_kernel_from_int: 904_resume_kernel_from_int:
891 r0.l = _sync_root_irqs 905 r0.l = ___ipipe_sync_root;
892 r0.h = _sync_root_irqs 906 r0.h = ___ipipe_sync_root;
893 [--sp] = rets; 907 [--sp] = rets;
894 [--sp] = ( r7:4, p5:3 ); 908 [--sp] = ( r7:4, p5:3 );
895 SP += -12; 909 SP += -12;
@@ -953,10 +967,10 @@ ENTRY(_lower_to_irq14)
953#endif 967#endif
954 968
955#ifdef CONFIG_DEBUG_HWERR 969#ifdef CONFIG_DEBUG_HWERR
956 /* enable irq14 & hwerr interrupt, until we transition to _evt14_softirq */ 970 /* enable irq14 & hwerr interrupt, until we transition to _evt_evt14 */
957 r0 = (EVT_IVG14 | EVT_IVHW | EVT_IRPTEN | EVT_EVX | EVT_NMI | EVT_RST | EVT_EMU); 971 r0 = (EVT_IVG14 | EVT_IVHW | EVT_IRPTEN | EVT_EVX | EVT_NMI | EVT_RST | EVT_EMU);
958#else 972#else
959 /* Only enable irq14 interrupt, until we transition to _evt14_softirq */ 973 /* Only enable irq14 interrupt, until we transition to _evt_evt14 */
960 r0 = (EVT_IVG14 | EVT_IRPTEN | EVT_EVX | EVT_NMI | EVT_RST | EVT_EMU); 974 r0 = (EVT_IVG14 | EVT_IRPTEN | EVT_EVX | EVT_NMI | EVT_RST | EVT_EMU);
961#endif 975#endif
962 sti r0; 976 sti r0;
@@ -964,7 +978,7 @@ ENTRY(_lower_to_irq14)
964 rti; 978 rti;
965ENDPROC(_lower_to_irq14) 979ENDPROC(_lower_to_irq14)
966 980
967ENTRY(_evt14_softirq) 981ENTRY(_evt_evt14)
968#ifdef CONFIG_DEBUG_HWERR 982#ifdef CONFIG_DEBUG_HWERR
969 r0 = (EVT_IVHW | EVT_IRPTEN | EVT_EVX | EVT_NMI | EVT_RST | EVT_EMU); 983 r0 = (EVT_IVHW | EVT_IRPTEN | EVT_EVX | EVT_NMI | EVT_RST | EVT_EMU);
970 sti r0; 984 sti r0;
@@ -974,7 +988,7 @@ ENTRY(_evt14_softirq)
974 [--sp] = RETI; 988 [--sp] = RETI;
975 SP += 4; 989 SP += 4;
976 rts; 990 rts;
977ENDPROC(_evt14_softirq) 991ENDPROC(_evt_evt14)
978 992
979ENTRY(_schedule_and_signal_from_int) 993ENTRY(_schedule_and_signal_from_int)
980 /* To end up here, vector 15 was changed - so we have to change it 994 /* To end up here, vector 15 was changed - so we have to change it
@@ -1004,6 +1018,12 @@ ENTRY(_schedule_and_signal_from_int)
1004#endif 1018#endif
1005 sti r0; 1019 sti r0;
1006 1020
1021 /* finish the userspace "atomic" functions for it */
1022 r1 = FIXED_CODE_END;
1023 r2 = [sp + PT_PC];
1024 cc = r1 <= r2;
1025 if cc jump .Lresume_userspace (bp);
1026
1007 r0 = sp; 1027 r0 = sp;
1008 sp += -12; 1028 sp += -12;
1009 call _finish_atomic_sections; 1029 call _finish_atomic_sections;
@@ -1107,14 +1127,7 @@ ENTRY(_early_trap)
1107 SAVE_ALL_SYS 1127 SAVE_ALL_SYS
1108 trace_buffer_stop(p0,r0); 1128 trace_buffer_stop(p0,r0);
1109 1129
1110#if ANOMALY_05000283 || ANOMALY_05000315 1130 ANOMALY_283_315_WORKAROUND(p4, r5)
1111 cc = r5 == r5;
1112 p4.h = HI(CHIPID);
1113 p4.l = LO(CHIPID);
1114 if cc jump 1f;
1115 r5.l = W[p4];
11161:
1117#endif
1118 1131
1119 /* Turn caches off, to ensure we don't get double exceptions */ 1132 /* Turn caches off, to ensure we don't get double exceptions */
1120 1133
@@ -1123,9 +1136,7 @@ ENTRY(_early_trap)
1123 1136
1124 R5 = [P4]; /* Control Register*/ 1137 R5 = [P4]; /* Control Register*/
1125 BITCLR(R5,ENICPLB_P); 1138 BITCLR(R5,ENICPLB_P);
1126 CLI R1; 1139 CSYNC; /* Disabling of CPLBs should be proceeded by a CSYNC */
1127 SSYNC; /* SSYNC required before writing to IMEM_CONTROL. */
1128 .align 8;
1129 [P4] = R5; 1140 [P4] = R5;
1130 SSYNC; 1141 SSYNC;
1131 1142
@@ -1133,11 +1144,9 @@ ENTRY(_early_trap)
1133 P4.H = HI(DMEM_CONTROL); 1144 P4.H = HI(DMEM_CONTROL);
1134 R5 = [P4]; 1145 R5 = [P4];
1135 BITCLR(R5,ENDCPLB_P); 1146 BITCLR(R5,ENDCPLB_P);
1136 SSYNC; /* SSYNC required before writing to DMEM_CONTROL. */ 1147 CSYNC; /* Disabling of CPLBs should be proceeded by a CSYNC */
1137 .align 8;
1138 [P4] = R5; 1148 [P4] = R5;
1139 SSYNC; 1149 SSYNC;
1140 STI R1;
1141 1150
1142 r0 = sp; /* stack frame pt_regs pointer argument ==> r0 */ 1151 r0 = sp; /* stack frame pt_regs pointer argument ==> r0 */
1143 r1 = RETX; 1152 r1 = RETX;
@@ -1611,7 +1620,7 @@ ENTRY(_sys_call_table)
1611 .long _sys_preadv 1620 .long _sys_preadv
1612 .long _sys_pwritev 1621 .long _sys_pwritev
1613 .long _sys_rt_tgsigqueueinfo 1622 .long _sys_rt_tgsigqueueinfo
1614 .long _sys_perf_counter_open 1623 .long _sys_perf_event_open
1615 1624
1616 .rept NR_syscalls-(.-_sys_call_table)/4 1625 .rept NR_syscalls-(.-_sys_call_table)/4
1617 .long _sys_ni_syscall 1626 .long _sys_ni_syscall
diff --git a/arch/blackfin/mach-common/head.S b/arch/blackfin/mach-common/head.S
index f826f6b9f917..9c79dfea2a53 100644
--- a/arch/blackfin/mach-common/head.S
+++ b/arch/blackfin/mach-common/head.S
@@ -124,22 +124,22 @@ ENTRY(__start)
124 * below 124 * below
125 */ 125 */
126 GET_PDA(p0, r0); 126 GET_PDA(p0, r0);
127 r6 = [p0 + PDA_RETX]; 127 r6 = [p0 + PDA_DF_RETX];
128 p1.l = _init_saved_retx; 128 p1.l = _init_saved_retx;
129 p1.h = _init_saved_retx; 129 p1.h = _init_saved_retx;
130 [p1] = r6; 130 [p1] = r6;
131 131
132 r6 = [p0 + PDA_DCPLB]; 132 r6 = [p0 + PDA_DF_DCPLB];
133 p1.l = _init_saved_dcplb_fault_addr; 133 p1.l = _init_saved_dcplb_fault_addr;
134 p1.h = _init_saved_dcplb_fault_addr; 134 p1.h = _init_saved_dcplb_fault_addr;
135 [p1] = r6; 135 [p1] = r6;
136 136
137 r6 = [p0 + PDA_ICPLB]; 137 r6 = [p0 + PDA_DF_ICPLB];
138 p1.l = _init_saved_icplb_fault_addr; 138 p1.l = _init_saved_icplb_fault_addr;
139 p1.h = _init_saved_icplb_fault_addr; 139 p1.h = _init_saved_icplb_fault_addr;
140 [p1] = r6; 140 [p1] = r6;
141 141
142 r6 = [p0 + PDA_SEQSTAT]; 142 r6 = [p0 + PDA_DF_SEQSTAT];
143 p1.l = _init_saved_seqstat; 143 p1.l = _init_saved_seqstat;
144 p1.h = _init_saved_seqstat; 144 p1.h = _init_saved_seqstat;
145 [p1] = r6; 145 [p1] = r6;
@@ -153,6 +153,8 @@ ENTRY(__start)
153 153
154#ifdef CONFIG_EARLY_PRINTK 154#ifdef CONFIG_EARLY_PRINTK
155 call _init_early_exception_vectors; 155 call _init_early_exception_vectors;
156 r0 = (EVT_IVHW | EVT_IRPTEN | EVT_EVX | EVT_NMI | EVT_RST | EVT_EMU);
157 sti r0;
156#endif 158#endif
157 159
158 r0 = 0 (x); 160 r0 = 0 (x);
@@ -212,12 +214,21 @@ ENTRY(__start)
212 [p0] = p1; 214 [p0] = p1;
213 csync; 215 csync;
214 216
217#ifdef CONFIG_EARLY_PRINTK
218 r0 = (EVT_IVG15 | EVT_IVHW | EVT_IRPTEN | EVT_EVX | EVT_NMI | EVT_RST | EVT_EMU) (z);
219#else
215 r0 = EVT_IVG15 (z); 220 r0 = EVT_IVG15 (z);
221#endif
216 sti r0; 222 sti r0;
217 223
218 raise 15; 224 raise 15;
225#ifdef CONFIG_EARLY_PRINTK
226 p0.l = _early_trap;
227 p0.h = _early_trap;
228#else
219 p0.l = .LWAIT_HERE; 229 p0.l = .LWAIT_HERE;
220 p0.h = .LWAIT_HERE; 230 p0.h = .LWAIT_HERE;
231#endif
221 reti = p0; 232 reti = p0;
222#if ANOMALY_05000281 233#if ANOMALY_05000281
223 nop; nop; nop; 234 nop; nop; nop;
diff --git a/arch/blackfin/mach-common/interrupt.S b/arch/blackfin/mach-common/interrupt.S
index 9c46680186e4..82d417ef4b5b 100644
--- a/arch/blackfin/mach-common/interrupt.S
+++ b/arch/blackfin/mach-common/interrupt.S
@@ -119,14 +119,8 @@ __common_int_entry:
119 fp = 0; 119 fp = 0;
120#endif 120#endif
121 121
122#if ANOMALY_05000283 || ANOMALY_05000315 122 ANOMALY_283_315_WORKAROUND(p5, r7)
123 cc = r7 == r7; 123
124 p5.h = HI(CHIPID);
125 p5.l = LO(CHIPID);
126 if cc jump 1f;
127 r7.l = W[p5];
1281:
129#endif
130 r1 = sp; 124 r1 = sp;
131 SP += -12; 125 SP += -12;
132#ifdef CONFIG_IPIPE 126#ifdef CONFIG_IPIPE
@@ -158,14 +152,7 @@ ENTRY(_evt_ivhw)
158 fp = 0; 152 fp = 0;
159#endif 153#endif
160 154
161#if ANOMALY_05000283 || ANOMALY_05000315 155 ANOMALY_283_315_WORKAROUND(p5, r7)
162 cc = r7 == r7;
163 p5.h = HI(CHIPID);
164 p5.l = LO(CHIPID);
165 if cc jump 1f;
166 r7.l = W[p5];
1671:
168#endif
169 156
170 /* Handle all stacked hardware errors 157 /* Handle all stacked hardware errors
171 * To make sure we don't hang forever, only do it 10 times 158 * To make sure we don't hang forever, only do it 10 times
@@ -261,6 +248,31 @@ ENTRY(_evt_system_call)
261ENDPROC(_evt_system_call) 248ENDPROC(_evt_system_call)
262 249
263#ifdef CONFIG_IPIPE 250#ifdef CONFIG_IPIPE
251/*
252 * __ipipe_call_irqtail: lowers the current priority level to EVT15
253 * before running a user-defined routine, then raises the priority
254 * level to EVT14 to prepare the caller for a normal interrupt
255 * return through RTI.
256 *
257 * We currently use this facility in two occasions:
258 *
259 * - to branch to __ipipe_irq_tail_hook as requested by a high
260 * priority domain after the pipeline delivered an interrupt,
261 * e.g. such as Xenomai, in order to start its rescheduling
262 * procedure, since we may not switch tasks when IRQ levels are
263 * nested on the Blackfin, so we have to fake an interrupt return
264 * so that we may reschedule immediately.
265 *
266 * - to branch to sync_root_irqs, in order to play any interrupt
267 * pending for the root domain (i.e. the Linux kernel). This lowers
268 * the core priority level enough so that Linux IRQ handlers may
269 * never delay interrupts handled by high priority domains; we defer
270 * those handlers until this point instead. This is a substitute
271 * to using a threaded interrupt model for the Linux kernel.
272 *
273 * r0: address of user-defined routine
274 * context: caller must have preempted EVT15, hw interrupts must be off.
275 */
264ENTRY(___ipipe_call_irqtail) 276ENTRY(___ipipe_call_irqtail)
265 p0 = r0; 277 p0 = r0;
266 r0.l = 1f; 278 r0.l = 1f;
@@ -276,33 +288,19 @@ ENTRY(___ipipe_call_irqtail)
276 ( r7:4, p5:3 ) = [sp++]; 288 ( r7:4, p5:3 ) = [sp++];
277 rets = [sp++]; 289 rets = [sp++];
278 290
279 [--sp] = reti; 291#ifdef CONFIG_DEBUG_HWERR
280 reti = [sp++]; /* IRQs are off. */ 292 /* enable irq14 & hwerr interrupt, until we transition to _evt_evt14 */
281 r0.h = 3f; 293 r0 = (EVT_IVG14 | EVT_IVHW | \
282 r0.l = 3f; 294 EVT_IRPTEN | EVT_EVX | EVT_NMI | EVT_RST | EVT_EMU);
283 p0.l = lo(EVT14); 295#else
284 p0.h = hi(EVT14); 296 /* Only enable irq14 interrupt, until we transition to _evt_evt14 */
285 [p0] = r0; 297 r0 = (EVT_IVG14 | \
286 csync; 298 EVT_IRPTEN | EVT_EVX | EVT_NMI | EVT_RST | EVT_EMU);
287 r0 = 0x401f (z); 299#endif
288 sti r0; 300 sti r0;
289 raise 14; 301 raise 14; /* Branches to _evt_evt14 */
290 [--sp] = reti; /* IRQs on. */
2912: 3022:
292 jump 2b; /* Likely paranoid. */ 303 jump 2b; /* Likely paranoid. */
2933:
294 sp += 4; /* Discard saved RETI */
295 r0.h = _evt14_softirq;
296 r0.l = _evt14_softirq;
297 p0.l = lo(EVT14);
298 p0.h = hi(EVT14);
299 [p0] = r0;
300 csync;
301 p0.l = _bfin_irq_flags;
302 p0.h = _bfin_irq_flags;
303 r0 = [p0];
304 sti r0;
305 rts;
306ENDPROC(___ipipe_call_irqtail) 304ENDPROC(___ipipe_call_irqtail)
307 305
308#endif /* CONFIG_IPIPE */ 306#endif /* CONFIG_IPIPE */
diff --git a/arch/blackfin/mach-common/ints-priority.c b/arch/blackfin/mach-common/ints-priority.c
index b42150190d0e..6ffda78aaf9d 100644
--- a/arch/blackfin/mach-common/ints-priority.c
+++ b/arch/blackfin/mach-common/ints-priority.c
@@ -967,7 +967,7 @@ void __cpuinit init_exception_vectors(void)
967 bfin_write_EVT11(evt_evt11); 967 bfin_write_EVT11(evt_evt11);
968 bfin_write_EVT12(evt_evt12); 968 bfin_write_EVT12(evt_evt12);
969 bfin_write_EVT13(evt_evt13); 969 bfin_write_EVT13(evt_evt13);
970 bfin_write_EVT14(evt14_softirq); 970 bfin_write_EVT14(evt_evt14);
971 bfin_write_EVT15(evt_system_call); 971 bfin_write_EVT15(evt_system_call);
972 CSYNC(); 972 CSYNC();
973} 973}
@@ -1052,18 +1052,26 @@ int __init init_arch_irq(void)
1052 set_irq_chained_handler(irq, bfin_demux_error_irq); 1052 set_irq_chained_handler(irq, bfin_demux_error_irq);
1053 break; 1053 break;
1054#endif 1054#endif
1055
1055#ifdef CONFIG_SMP 1056#ifdef CONFIG_SMP
1057#ifdef CONFIG_TICKSOURCE_GPTMR0
1058 case IRQ_TIMER0:
1059#endif
1060#ifdef CONFIG_TICKSOURCE_CORETMR
1061 case IRQ_CORETMR:
1062#endif
1056 case IRQ_SUPPLE_0: 1063 case IRQ_SUPPLE_0:
1057 case IRQ_SUPPLE_1: 1064 case IRQ_SUPPLE_1:
1058 set_irq_handler(irq, handle_percpu_irq); 1065 set_irq_handler(irq, handle_percpu_irq);
1059 break; 1066 break;
1060#endif 1067#endif
1068
1061#ifdef CONFIG_IPIPE 1069#ifdef CONFIG_IPIPE
1062#ifndef CONFIG_TICKSOURCE_CORETMR 1070#ifndef CONFIG_TICKSOURCE_CORETMR
1063 case IRQ_TIMER0: 1071 case IRQ_TIMER0:
1064 set_irq_handler(irq, handle_simple_irq); 1072 set_irq_handler(irq, handle_simple_irq);
1065 break; 1073 break;
1066#endif /* !CONFIG_TICKSOURCE_CORETMR */ 1074#endif
1067 case IRQ_CORETMR: 1075 case IRQ_CORETMR:
1068 set_irq_handler(irq, handle_simple_irq); 1076 set_irq_handler(irq, handle_simple_irq);
1069 break; 1077 break;
@@ -1071,15 +1079,10 @@ int __init init_arch_irq(void)
1071 set_irq_handler(irq, handle_level_irq); 1079 set_irq_handler(irq, handle_level_irq);
1072 break; 1080 break;
1073#else /* !CONFIG_IPIPE */ 1081#else /* !CONFIG_IPIPE */
1074#ifdef CONFIG_TICKSOURCE_GPTMR0
1075 case IRQ_TIMER0:
1076 set_irq_handler(irq, handle_percpu_irq);
1077 break;
1078#endif /* CONFIG_TICKSOURCE_GPTMR0 */
1079 default: 1082 default:
1080 set_irq_handler(irq, handle_simple_irq); 1083 set_irq_handler(irq, handle_simple_irq);
1081 break; 1084 break;
1082#endif /* !CONFIG_IPIPE */ 1085#endif /* !CONFIG_IPIPE */
1083 } 1086 }
1084 } 1087 }
1085 1088
diff --git a/arch/blackfin/mach-common/lock.S b/arch/blackfin/mach-common/lock.S
deleted file mode 100644
index 6c5f5f0ea7fe..000000000000
--- a/arch/blackfin/mach-common/lock.S
+++ /dev/null
@@ -1,223 +0,0 @@
1/*
2 * File: arch/blackfin/mach-common/lock.S
3 * Based on:
4 * Author: LG Soft India
5 *
6 * Created: ?
7 * Description: kernel locks
8 *
9 * Modified:
10 * Copyright 2004-2006 Analog Devices Inc.
11 *
12 * Bugs: Enter bugs at http://blackfin.uclinux.org/
13 *
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, see the file COPYING, or write
26 * to the Free Software Foundation, Inc.,
27 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28 */
29
30#include <linux/linkage.h>
31#include <asm/blackfin.h>
32
33.text
34
35/* When you come here, it is assumed that
36 * R0 - Which way to be locked
37 */
38
39ENTRY(_cache_grab_lock)
40
41 [--SP]=( R7:0,P5:0 );
42
43 P1.H = HI(IMEM_CONTROL);
44 P1.L = LO(IMEM_CONTROL);
45 P5.H = HI(ICPLB_ADDR0);
46 P5.L = LO(ICPLB_ADDR0);
47 P4.H = HI(ICPLB_DATA0);
48 P4.L = LO(ICPLB_DATA0);
49 R7 = R0;
50
51 /* If the code of interest already resides in the cache
52 * invalidate the entire cache itself.
53 * invalidate_entire_icache;
54 */
55
56 SP += -12;
57 [--SP] = RETS;
58 CALL _invalidate_entire_icache;
59 RETS = [SP++];
60 SP += 12;
61
62 /* Disable the Interrupts*/
63
64 CLI R3;
65
66.LLOCK_WAY:
67
68 /* Way0 - 0xFFA133E0
69 * Way1 - 0xFFA137E0
70 * Way2 - 0xFFA13BE0 Total Way Size = 4K
71 * Way3 - 0xFFA13FE0
72 */
73
74 /* Procedure Ex. -Set the locks for other ways by setting ILOC[3:1]
75 * Only Way0 of the instruction cache can now be
76 * replaced by a new code
77 */
78
79 R5 = R7;
80 CC = BITTST(R7,0);
81 IF CC JUMP .LCLEAR1;
82 R7 = 0;
83 BITSET(R7,0);
84 JUMP .LDONE1;
85
86.LCLEAR1:
87 R7 = 0;
88 BITCLR(R7,0);
89.LDONE1: R4 = R7 << 3;
90 R7 = [P1];
91 R7 = R7 | R4;
92 SSYNC; /* SSYNC required writing to IMEM_CONTROL. */
93 .align 8;
94 [P1] = R7;
95 SSYNC;
96
97 R7 = R5;
98 CC = BITTST(R7,1);
99 IF CC JUMP .LCLEAR2;
100 R7 = 0;
101 BITSET(R7,1);
102 JUMP .LDONE2;
103
104.LCLEAR2:
105 R7 = 0;
106 BITCLR(R7,1);
107.LDONE2: R4 = R7 << 3;
108 R7 = [P1];
109 R7 = R7 | R4;
110 SSYNC; /* SSYNC required writing to IMEM_CONTROL. */
111 .align 8;
112 [P1] = R7;
113 SSYNC;
114
115 R7 = R5;
116 CC = BITTST(R7,2);
117 IF CC JUMP .LCLEAR3;
118 R7 = 0;
119 BITSET(R7,2);
120 JUMP .LDONE3;
121.LCLEAR3:
122 R7 = 0;
123 BITCLR(R7,2);
124.LDONE3: R4 = R7 << 3;
125 R7 = [P1];
126 R7 = R7 | R4;
127 SSYNC; /* SSYNC required writing to IMEM_CONTROL. */
128 .align 8;
129 [P1] = R7;
130 SSYNC;
131
132
133 R7 = R5;
134 CC = BITTST(R7,3);
135 IF CC JUMP .LCLEAR4;
136 R7 = 0;
137 BITSET(R7,3);
138 JUMP .LDONE4;
139.LCLEAR4:
140 R7 = 0;
141 BITCLR(R7,3);
142.LDONE4: R4 = R7 << 3;
143 R7 = [P1];
144 R7 = R7 | R4;
145 SSYNC; /* SSYNC required writing to IMEM_CONTROL. */
146 .align 8;
147 [P1] = R7;
148 SSYNC;
149
150 STI R3;
151
152 ( R7:0,P5:0 ) = [SP++];
153
154 RTS;
155ENDPROC(_cache_grab_lock)
156
157/* After the execution of critical code, the code is now locked into
158 * the cache way. Now we need to set ILOC.
159 *
160 * R0 - Which way to be locked
161 */
162
163ENTRY(_bfin_cache_lock)
164
165 [--SP]=( R7:0,P5:0 );
166
167 P1.H = HI(IMEM_CONTROL);
168 P1.L = LO(IMEM_CONTROL);
169
170 /* Disable the Interrupts*/
171 CLI R3;
172
173 R7 = [P1];
174 R2 = ~(0x78) (X); /* mask out ILOC */
175 R7 = R7 & R2;
176 R0 = R0 << 3;
177 R7 = R0 | R7;
178 SSYNC; /* SSYNC required writing to IMEM_CONTROL. */
179 .align 8;
180 [P1] = R7;
181 SSYNC;
182 /* Renable the Interrupts */
183 STI R3;
184
185 ( R7:0,P5:0 ) = [SP++];
186 RTS;
187ENDPROC(_bfin_cache_lock)
188
189/* Invalidate the Entire Instruction cache by
190 * disabling IMC bit
191 */
192ENTRY(_invalidate_entire_icache)
193 [--SP] = ( R7:5);
194
195 P0.L = LO(IMEM_CONTROL);
196 P0.H = HI(IMEM_CONTROL);
197 R7 = [P0];
198
199 /* Clear the IMC bit , All valid bits in the instruction
200 * cache are set to the invalid state
201 */
202 BITCLR(R7,IMC_P);
203 CLI R6;
204 SSYNC; /* SSYNC required before invalidating cache. */
205 .align 8;
206 [P0] = R7;
207 SSYNC;
208 STI R6;
209
210 /* Configures the instruction cache agian */
211 R6 = (IMC | ENICPLB);
212 R7 = R7 | R6;
213
214 CLI R6;
215 SSYNC; /* SSYNC required before writing to IMEM_CONTROL. */
216 .align 8;
217 [P0] = R7;
218 SSYNC;
219 STI R6;
220
221 ( R7:5) = [SP++];
222 RTS;
223ENDPROC(_invalidate_entire_icache)
diff --git a/arch/blackfin/mach-common/pm.c b/arch/blackfin/mach-common/pm.c
index 9e7e27b7fc8d..0e3d4ff9d8b6 100644
--- a/arch/blackfin/mach-common/pm.c
+++ b/arch/blackfin/mach-common/pm.c
@@ -38,6 +38,7 @@
38#include <linux/io.h> 38#include <linux/io.h>
39#include <linux/irq.h> 39#include <linux/irq.h>
40 40
41#include <asm/cplb.h>
41#include <asm/gpio.h> 42#include <asm/gpio.h>
42#include <asm/dma.h> 43#include <asm/dma.h>
43#include <asm/dpmc.h> 44#include <asm/dpmc.h>
@@ -170,58 +171,6 @@ static void flushinv_all_dcache(void)
170} 171}
171#endif 172#endif
172 173
173static inline void dcache_disable(void)
174{
175#ifdef CONFIG_BFIN_DCACHE
176 unsigned long ctrl;
177
178#if defined(CONFIG_BFIN_EXTMEM_WRITEBACK) || defined(CONFIG_BFIN_L2_WRITEBACK)
179 flushinv_all_dcache();
180#endif
181 SSYNC();
182 ctrl = bfin_read_DMEM_CONTROL();
183 ctrl &= ~ENDCPLB;
184 bfin_write_DMEM_CONTROL(ctrl);
185 SSYNC();
186#endif
187}
188
189static inline void dcache_enable(void)
190{
191#ifdef CONFIG_BFIN_DCACHE
192 unsigned long ctrl;
193 SSYNC();
194 ctrl = bfin_read_DMEM_CONTROL();
195 ctrl |= ENDCPLB;
196 bfin_write_DMEM_CONTROL(ctrl);
197 SSYNC();
198#endif
199}
200
201static inline void icache_disable(void)
202{
203#ifdef CONFIG_BFIN_ICACHE
204 unsigned long ctrl;
205 SSYNC();
206 ctrl = bfin_read_IMEM_CONTROL();
207 ctrl &= ~ENICPLB;
208 bfin_write_IMEM_CONTROL(ctrl);
209 SSYNC();
210#endif
211}
212
213static inline void icache_enable(void)
214{
215#ifdef CONFIG_BFIN_ICACHE
216 unsigned long ctrl;
217 SSYNC();
218 ctrl = bfin_read_IMEM_CONTROL();
219 ctrl |= ENICPLB;
220 bfin_write_IMEM_CONTROL(ctrl);
221 SSYNC();
222#endif
223}
224
225int bfin_pm_suspend_mem_enter(void) 174int bfin_pm_suspend_mem_enter(void)
226{ 175{
227 unsigned long flags; 176 unsigned long flags;
@@ -258,16 +207,19 @@ int bfin_pm_suspend_mem_enter(void)
258 207
259 bfin_gpio_pm_hibernate_suspend(); 208 bfin_gpio_pm_hibernate_suspend();
260 209
261 dcache_disable(); 210#if defined(CONFIG_BFIN_EXTMEM_WRITEBACK) || defined(CONFIG_BFIN_L2_WRITEBACK)
262 icache_disable(); 211 flushinv_all_dcache();
212#endif
213 _disable_dcplb();
214 _disable_icplb();
263 bf53x_suspend_l1_mem(memptr); 215 bf53x_suspend_l1_mem(memptr);
264 216
265 do_hibernate(wakeup | vr_wakeup); /* Goodbye */ 217 do_hibernate(wakeup | vr_wakeup); /* Goodbye */
266 218
267 bf53x_resume_l1_mem(memptr); 219 bf53x_resume_l1_mem(memptr);
268 220
269 icache_enable(); 221 _enable_icplb();
270 dcache_enable(); 222 _enable_dcplb();
271 223
272 bfin_gpio_pm_hibernate_restore(); 224 bfin_gpio_pm_hibernate_restore();
273 blackfin_dma_resume(); 225 blackfin_dma_resume();
diff --git a/arch/blackfin/mm/init.c b/arch/blackfin/mm/init.c
index 68bd0bd680cd..b88ce7fda548 100644
--- a/arch/blackfin/mm/init.c
+++ b/arch/blackfin/mm/init.c
@@ -33,6 +33,7 @@
33#include <asm/bfin-global.h> 33#include <asm/bfin-global.h>
34#include <asm/pda.h> 34#include <asm/pda.h>
35#include <asm/cplbinit.h> 35#include <asm/cplbinit.h>
36#include <asm/early_printk.h>
36#include "blackfin_sram.h" 37#include "blackfin_sram.h"
37 38
38/* 39/*
@@ -113,6 +114,8 @@ asmlinkage void __init init_pda(void)
113{ 114{
114 unsigned int cpu = raw_smp_processor_id(); 115 unsigned int cpu = raw_smp_processor_id();
115 116
117 early_shadow_stamp();
118
116 /* Initialize the PDA fields holding references to other parts 119 /* Initialize the PDA fields holding references to other parts
117 of the memory. The content of such memory is still 120 of the memory. The content of such memory is still
118 undefined at the time of the call, we are only setting up 121 undefined at the time of the call, we are only setting up
diff --git a/arch/blackfin/mm/isram-driver.c b/arch/blackfin/mm/isram-driver.c
index c080e70f98b0..beb1a608824c 100644
--- a/arch/blackfin/mm/isram-driver.c
+++ b/arch/blackfin/mm/isram-driver.c
@@ -16,6 +16,8 @@
16 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 16 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 */ 17 */
18 18
19#define pr_fmt(fmt) "isram: " fmt
20
19#include <linux/module.h> 21#include <linux/module.h>
20#include <linux/kernel.h> 22#include <linux/kernel.h>
21#include <linux/types.h> 23#include <linux/types.h>
@@ -23,6 +25,7 @@
23#include <linux/sched.h> 25#include <linux/sched.h>
24 26
25#include <asm/blackfin.h> 27#include <asm/blackfin.h>
28#include <asm/dma.h>
26 29
27/* 30/*
28 * IMPORTANT WARNING ABOUT THESE FUNCTIONS 31 * IMPORTANT WARNING ABOUT THESE FUNCTIONS
@@ -50,10 +53,12 @@ static DEFINE_SPINLOCK(dtest_lock);
50#define IADDR2DTEST(x) \ 53#define IADDR2DTEST(x) \
51 ({ unsigned long __addr = (unsigned long)(x); \ 54 ({ unsigned long __addr = (unsigned long)(x); \
52 (__addr & 0x47F8) | /* address bits 14 & 10:3 */ \ 55 (__addr & 0x47F8) | /* address bits 14 & 10:3 */ \
56 (__addr & 0x8000) << 23 | /* Bank A/B */ \
53 (__addr & 0x0800) << 15 | /* address bit 11 */ \ 57 (__addr & 0x0800) << 15 | /* address bit 11 */ \
54 (__addr & 0x3000) << 4 | /* address bits 13:12 */ \ 58 (__addr & 0x3000) << 4 | /* address bits 13:12 */ \
55 (__addr & 0x8000) << 8 | /* address bit 15 */ \ 59 (__addr & 0x8000) << 8 | /* address bit 15 */ \
56 (0x1000004); /* isram access */ \ 60 (0x1000000) | /* instruction access = 1 */ \
61 (0x4); /* data array = 1 */ \
57 }) 62 })
58 63
59/* Takes a pointer, and returns the offset (in bits) which things should be shifted */ 64/* Takes a pointer, and returns the offset (in bits) which things should be shifted */
@@ -70,7 +75,7 @@ static void isram_write(const void *addr, uint64_t data)
70 if (addr >= (void *)(L1_CODE_START + L1_CODE_LENGTH)) 75 if (addr >= (void *)(L1_CODE_START + L1_CODE_LENGTH))
71 return; 76 return;
72 77
73 cmd = IADDR2DTEST(addr) | 1; /* write */ 78 cmd = IADDR2DTEST(addr) | 2; /* write */
74 79
75 /* 80 /*
76 * Writes to DTEST_DATA[0:1] need to be atomic with write to DTEST_COMMAND 81 * Writes to DTEST_DATA[0:1] need to be atomic with write to DTEST_COMMAND
@@ -127,8 +132,7 @@ static bool isram_check_addr(const void *addr, size_t n)
127 (addr < (void *)(L1_CODE_START + L1_CODE_LENGTH))) { 132 (addr < (void *)(L1_CODE_START + L1_CODE_LENGTH))) {
128 if ((addr + n) > (void *)(L1_CODE_START + L1_CODE_LENGTH)) { 133 if ((addr + n) > (void *)(L1_CODE_START + L1_CODE_LENGTH)) {
129 show_stack(NULL, NULL); 134 show_stack(NULL, NULL);
130 printk(KERN_ERR "isram_memcpy: copy involving %p length " 135 pr_err("copy involving %p length (%zu) too long\n", addr, n);
131 "(%zu) too long\n", addr, n);
132 } 136 }
133 return true; 137 return true;
134 } 138 }
@@ -199,3 +203,209 @@ void *isram_memcpy(void *dest, const void *src, size_t n)
199} 203}
200EXPORT_SYMBOL(isram_memcpy); 204EXPORT_SYMBOL(isram_memcpy);
201 205
206#ifdef CONFIG_BFIN_ISRAM_SELF_TEST
207
208#define TEST_LEN 0x100
209
210static __init void hex_dump(unsigned char *buf, int len)
211{
212 while (len--)
213 pr_cont("%02x", *buf++);
214}
215
216static __init int isram_read_test(char *sdram, void *l1inst)
217{
218 int i, ret = 0;
219 uint64_t data1, data2;
220
221 pr_info("INFO: running isram_read tests\n");
222
223 /* setup some different data to play with */
224 for (i = 0; i < TEST_LEN; ++i)
225 sdram[i] = i;
226 dma_memcpy(l1inst, sdram, TEST_LEN);
227
228 /* make sure we can read the L1 inst */
229 for (i = 0; i < TEST_LEN; i += sizeof(uint64_t)) {
230 data1 = isram_read(l1inst + i);
231 memcpy(&data2, sdram + i, sizeof(data2));
232 if (memcmp(&data1, &data2, sizeof(uint64_t))) {
233 pr_err("FAIL: isram_read(%p) returned %#llx but wanted %#llx\n",
234 l1inst + i, data1, data2);
235 ++ret;
236 }
237 }
238
239 return ret;
240}
241
242static __init int isram_write_test(char *sdram, void *l1inst)
243{
244 int i, ret = 0;
245 uint64_t data1, data2;
246
247 pr_info("INFO: running isram_write tests\n");
248
249 /* setup some different data to play with */
250 memset(sdram, 0, TEST_LEN * 2);
251 dma_memcpy(l1inst, sdram, TEST_LEN);
252 for (i = 0; i < TEST_LEN; ++i)
253 sdram[i] = i;
254
255 /* make sure we can write the L1 inst */
256 for (i = 0; i < TEST_LEN; i += sizeof(uint64_t)) {
257 memcpy(&data1, sdram + i, sizeof(data1));
258 isram_write(l1inst + i, data1);
259 data2 = isram_read(l1inst + i);
260 if (memcmp(&data1, &data2, sizeof(uint64_t))) {
261 pr_err("FAIL: isram_write(%p, %#llx) != %#llx\n",
262 l1inst + i, data1, data2);
263 ++ret;
264 }
265 }
266
267 dma_memcpy(sdram + TEST_LEN, l1inst, TEST_LEN);
268 if (memcmp(sdram, sdram + TEST_LEN, TEST_LEN)) {
269 pr_err("FAIL: isram_write() did not work properly\n");
270 ++ret;
271 }
272
273 return ret;
274}
275
276static __init int
277_isram_memcpy_test(char pattern, void *sdram, void *l1inst, const char *smemcpy,
278 void *(*fmemcpy)(void *, const void *, size_t))
279{
280 memset(sdram, pattern, TEST_LEN);
281 fmemcpy(l1inst, sdram, TEST_LEN);
282 fmemcpy(sdram + TEST_LEN, l1inst, TEST_LEN);
283 if (memcmp(sdram, sdram + TEST_LEN, TEST_LEN)) {
284 pr_err("FAIL: %s(%p <=> %p, %#x) failed (data is %#x)\n",
285 smemcpy, l1inst, sdram, TEST_LEN, pattern);
286 return 1;
287 }
288 return 0;
289}
290#define _isram_memcpy_test(a, b, c, d) _isram_memcpy_test(a, b, c, #d, d)
291
292static __init int isram_memcpy_test(char *sdram, void *l1inst)
293{
294 int i, j, thisret, ret = 0;
295
296 /* check broad isram_memcpy() */
297 pr_info("INFO: running broad isram_memcpy tests\n");
298 for (i = 0xf; i >= 0; --i)
299 ret += _isram_memcpy_test(i, sdram, l1inst, isram_memcpy);
300
301 /* check read of small, unaligned, and hardware 64bit limits */
302 pr_info("INFO: running isram_memcpy (read) tests\n");
303
304 for (i = 0; i < TEST_LEN; ++i)
305 sdram[i] = i;
306 dma_memcpy(l1inst, sdram, TEST_LEN);
307
308 thisret = 0;
309 for (i = 0; i < TEST_LEN - 32; ++i) {
310 unsigned char cmp[32];
311 for (j = 1; j <= 32; ++j) {
312 memset(cmp, 0, sizeof(cmp));
313 isram_memcpy(cmp, l1inst + i, j);
314 if (memcmp(cmp, sdram + i, j)) {
315 pr_err("FAIL: %p:", l1inst + 1);
316 hex_dump(cmp, j);
317 pr_cont(" SDRAM:");
318 hex_dump(sdram + i, j);
319 pr_cont("\n");
320 if (++thisret > 20) {
321 pr_err("FAIL: skipping remaining series\n");
322 i = TEST_LEN;
323 break;
324 }
325 }
326 }
327 }
328 ret += thisret;
329
330 /* check write of small, unaligned, and hardware 64bit limits */
331 pr_info("INFO: running isram_memcpy (write) tests\n");
332
333 memset(sdram + TEST_LEN, 0, TEST_LEN);
334 dma_memcpy(l1inst, sdram + TEST_LEN, TEST_LEN);
335
336 thisret = 0;
337 for (i = 0; i < TEST_LEN - 32; ++i) {
338 unsigned char cmp[32];
339 for (j = 1; j <= 32; ++j) {
340 isram_memcpy(l1inst + i, sdram + i, j);
341 dma_memcpy(cmp, l1inst + i, j);
342 if (memcmp(cmp, sdram + i, j)) {
343 pr_err("FAIL: %p:", l1inst + i);
344 hex_dump(cmp, j);
345 pr_cont(" SDRAM:");
346 hex_dump(sdram + i, j);
347 pr_cont("\n");
348 if (++thisret > 20) {
349 pr_err("FAIL: skipping remaining series\n");
350 i = TEST_LEN;
351 break;
352 }
353 }
354 }
355 }
356 ret += thisret;
357
358 return ret;
359}
360
361static __init int isram_test_init(void)
362{
363 int ret;
364 char *sdram;
365 void *l1inst;
366
367 sdram = kmalloc(TEST_LEN * 2, GFP_KERNEL);
368 if (!sdram) {
369 pr_warning("SKIP: could not allocate sdram\n");
370 return 0;
371 }
372
373 l1inst = l1_inst_sram_alloc(TEST_LEN);
374 if (!l1inst) {
375 kfree(sdram);
376 pr_warning("SKIP: could not allocate L1 inst\n");
377 return 0;
378 }
379
380 /* sanity check initial L1 inst state */
381 ret = 1;
382 pr_info("INFO: running initial dma_memcpy checks\n");
383 if (_isram_memcpy_test(0xa, sdram, l1inst, dma_memcpy))
384 goto abort;
385 if (_isram_memcpy_test(0x5, sdram, l1inst, dma_memcpy))
386 goto abort;
387
388 ret = 0;
389 ret += isram_read_test(sdram, l1inst);
390 ret += isram_write_test(sdram, l1inst);
391 ret += isram_memcpy_test(sdram, l1inst);
392
393 abort:
394 sram_free(l1inst);
395 kfree(sdram);
396
397 if (ret)
398 return -EIO;
399
400 pr_info("PASS: all tests worked !\n");
401 return 0;
402}
403late_initcall(isram_test_init);
404
405static __exit void isram_test_exit(void)
406{
407 /* stub to allow unloading */
408}
409module_exit(isram_test_exit);
410
411#endif
diff --git a/arch/blackfin/mm/sram-alloc.c b/arch/blackfin/mm/sram-alloc.c
index 99e4dbb1dfd1..eb63ab353e5a 100644
--- a/arch/blackfin/mm/sram-alloc.c
+++ b/arch/blackfin/mm/sram-alloc.c
@@ -42,11 +42,6 @@
42#include <asm/mem_map.h> 42#include <asm/mem_map.h>
43#include "blackfin_sram.h" 43#include "blackfin_sram.h"
44 44
45static DEFINE_PER_CPU_SHARED_ALIGNED(spinlock_t, l1sram_lock);
46static DEFINE_PER_CPU_SHARED_ALIGNED(spinlock_t, l1_data_sram_lock);
47static DEFINE_PER_CPU_SHARED_ALIGNED(spinlock_t, l1_inst_sram_lock);
48static spinlock_t l2_sram_lock ____cacheline_aligned_in_smp;
49
50/* the data structure for L1 scratchpad and DATA SRAM */ 45/* the data structure for L1 scratchpad and DATA SRAM */
51struct sram_piece { 46struct sram_piece {
52 void *paddr; 47 void *paddr;
@@ -55,6 +50,7 @@ struct sram_piece {
55 struct sram_piece *next; 50 struct sram_piece *next;
56}; 51};
57 52
53static DEFINE_PER_CPU_SHARED_ALIGNED(spinlock_t, l1sram_lock);
58static DEFINE_PER_CPU(struct sram_piece, free_l1_ssram_head); 54static DEFINE_PER_CPU(struct sram_piece, free_l1_ssram_head);
59static DEFINE_PER_CPU(struct sram_piece, used_l1_ssram_head); 55static DEFINE_PER_CPU(struct sram_piece, used_l1_ssram_head);
60 56
@@ -68,12 +64,18 @@ static DEFINE_PER_CPU(struct sram_piece, free_l1_data_B_sram_head);
68static DEFINE_PER_CPU(struct sram_piece, used_l1_data_B_sram_head); 64static DEFINE_PER_CPU(struct sram_piece, used_l1_data_B_sram_head);
69#endif 65#endif
70 66
67#if L1_DATA_A_LENGTH || L1_DATA_B_LENGTH
68static DEFINE_PER_CPU_SHARED_ALIGNED(spinlock_t, l1_data_sram_lock);
69#endif
70
71#if L1_CODE_LENGTH != 0 71#if L1_CODE_LENGTH != 0
72static DEFINE_PER_CPU_SHARED_ALIGNED(spinlock_t, l1_inst_sram_lock);
72static DEFINE_PER_CPU(struct sram_piece, free_l1_inst_sram_head); 73static DEFINE_PER_CPU(struct sram_piece, free_l1_inst_sram_head);
73static DEFINE_PER_CPU(struct sram_piece, used_l1_inst_sram_head); 74static DEFINE_PER_CPU(struct sram_piece, used_l1_inst_sram_head);
74#endif 75#endif
75 76
76#if L2_LENGTH != 0 77#if L2_LENGTH != 0
78static spinlock_t l2_sram_lock ____cacheline_aligned_in_smp;
77static struct sram_piece free_l2_sram_head, used_l2_sram_head; 79static struct sram_piece free_l2_sram_head, used_l2_sram_head;
78#endif 80#endif
79 81
@@ -225,10 +227,10 @@ static void __init l2_sram_init(void)
225 printk(KERN_INFO "Blackfin L2 SRAM: %d KB (%d KB free)\n", 227 printk(KERN_INFO "Blackfin L2 SRAM: %d KB (%d KB free)\n",
226 L2_LENGTH >> 10, 228 L2_LENGTH >> 10,
227 free_l2_sram_head.next->size >> 10); 229 free_l2_sram_head.next->size >> 10);
228#endif
229 230
230 /* mutex initialize */ 231 /* mutex initialize */
231 spin_lock_init(&l2_sram_lock); 232 spin_lock_init(&l2_sram_lock);
233#endif
232} 234}
233 235
234static int __init bfin_sram_init(void) 236static int __init bfin_sram_init(void)
@@ -416,18 +418,17 @@ EXPORT_SYMBOL(sram_free);
416 418
417void *l1_data_A_sram_alloc(size_t size) 419void *l1_data_A_sram_alloc(size_t size)
418{ 420{
421#if L1_DATA_A_LENGTH != 0
419 unsigned long flags; 422 unsigned long flags;
420 void *addr = NULL; 423 void *addr;
421 unsigned int cpu; 424 unsigned int cpu;
422 425
423 cpu = get_cpu(); 426 cpu = get_cpu();
424 /* add mutex operation */ 427 /* add mutex operation */
425 spin_lock_irqsave(&per_cpu(l1_data_sram_lock, cpu), flags); 428 spin_lock_irqsave(&per_cpu(l1_data_sram_lock, cpu), flags);
426 429
427#if L1_DATA_A_LENGTH != 0
428 addr = _sram_alloc(size, &per_cpu(free_l1_data_A_sram_head, cpu), 430 addr = _sram_alloc(size, &per_cpu(free_l1_data_A_sram_head, cpu),
429 &per_cpu(used_l1_data_A_sram_head, cpu)); 431 &per_cpu(used_l1_data_A_sram_head, cpu));
430#endif
431 432
432 /* add mutex operation */ 433 /* add mutex operation */
433 spin_unlock_irqrestore(&per_cpu(l1_data_sram_lock, cpu), flags); 434 spin_unlock_irqrestore(&per_cpu(l1_data_sram_lock, cpu), flags);
@@ -437,11 +438,15 @@ void *l1_data_A_sram_alloc(size_t size)
437 (long unsigned int)addr, size); 438 (long unsigned int)addr, size);
438 439
439 return addr; 440 return addr;
441#else
442 return NULL;
443#endif
440} 444}
441EXPORT_SYMBOL(l1_data_A_sram_alloc); 445EXPORT_SYMBOL(l1_data_A_sram_alloc);
442 446
443int l1_data_A_sram_free(const void *addr) 447int l1_data_A_sram_free(const void *addr)
444{ 448{
449#if L1_DATA_A_LENGTH != 0
445 unsigned long flags; 450 unsigned long flags;
446 int ret; 451 int ret;
447 unsigned int cpu; 452 unsigned int cpu;
@@ -450,18 +455,17 @@ int l1_data_A_sram_free(const void *addr)
450 /* add mutex operation */ 455 /* add mutex operation */
451 spin_lock_irqsave(&per_cpu(l1_data_sram_lock, cpu), flags); 456 spin_lock_irqsave(&per_cpu(l1_data_sram_lock, cpu), flags);
452 457
453#if L1_DATA_A_LENGTH != 0
454 ret = _sram_free(addr, &per_cpu(free_l1_data_A_sram_head, cpu), 458 ret = _sram_free(addr, &per_cpu(free_l1_data_A_sram_head, cpu),
455 &per_cpu(used_l1_data_A_sram_head, cpu)); 459 &per_cpu(used_l1_data_A_sram_head, cpu));
456#else
457 ret = -1;
458#endif
459 460
460 /* add mutex operation */ 461 /* add mutex operation */
461 spin_unlock_irqrestore(&per_cpu(l1_data_sram_lock, cpu), flags); 462 spin_unlock_irqrestore(&per_cpu(l1_data_sram_lock, cpu), flags);
462 put_cpu(); 463 put_cpu();
463 464
464 return ret; 465 return ret;
466#else
467 return -1;
468#endif
465} 469}
466EXPORT_SYMBOL(l1_data_A_sram_free); 470EXPORT_SYMBOL(l1_data_A_sram_free);
467 471
diff --git a/arch/cris/Makefile b/arch/cris/Makefile
index 71e17d3eeddb..29c2ceb38a76 100644
--- a/arch/cris/Makefile
+++ b/arch/cris/Makefile
@@ -42,8 +42,6 @@ LD = $(CROSS_COMPILE)ld -mcrislinux
42 42
43OBJCOPYFLAGS := -O binary -R .note -R .comment -S 43OBJCOPYFLAGS := -O binary -R .note -R .comment -S
44 44
45CPPFLAGS_vmlinux.lds = -DDRAM_VIRTUAL_BASE=0x$(CONFIG_ETRAX_DRAM_VIRTUAL_BASE)
46
47KBUILD_AFLAGS += -mlinux -march=$(arch-y) $(inc) 45KBUILD_AFLAGS += -mlinux -march=$(arch-y) $(inc)
48KBUILD_CFLAGS += -mlinux -march=$(arch-y) -pipe $(inc) 46KBUILD_CFLAGS += -mlinux -march=$(arch-y) -pipe $(inc)
49KBUILD_CPPFLAGS += $(inc) 47KBUILD_CPPFLAGS += $(inc)
diff --git a/arch/cris/arch-v10/kernel/time.c b/arch/cris/arch-v10/kernel/time.c
index 2b73c7a5b649..31ca1418d5a7 100644
--- a/arch/cris/arch-v10/kernel/time.c
+++ b/arch/cris/arch-v10/kernel/time.c
@@ -28,7 +28,6 @@
28 28
29extern void update_xtime_from_cmos(void); 29extern void update_xtime_from_cmos(void);
30extern int set_rtc_mmss(unsigned long nowtime); 30extern int set_rtc_mmss(unsigned long nowtime);
31extern int setup_irq(int, struct irqaction *);
32extern int have_rtc; 31extern int have_rtc;
33 32
34unsigned long get_ns_in_jiffie(void) 33unsigned long get_ns_in_jiffie(void)
diff --git a/arch/cris/arch-v32/kernel/smp.c b/arch/cris/arch-v32/kernel/smp.c
index d2a3ff8c4d37..058adddf4e4b 100644
--- a/arch/cris/arch-v32/kernel/smp.c
+++ b/arch/cris/arch-v32/kernel/smp.c
@@ -52,8 +52,6 @@ static struct mm_struct* flush_mm;
52static struct vm_area_struct* flush_vma; 52static struct vm_area_struct* flush_vma;
53static unsigned long flush_addr; 53static unsigned long flush_addr;
54 54
55extern int setup_irq(int, struct irqaction *);
56
57/* Mode registers */ 55/* Mode registers */
58static unsigned long irq_regs[NR_CPUS] = { 56static unsigned long irq_regs[NR_CPUS] = {
59 regi_irq, 57 regi_irq,
diff --git a/arch/cris/arch-v32/kernel/time.c b/arch/cris/arch-v32/kernel/time.c
index 65633d0dab86..b1920d8de403 100644
--- a/arch/cris/arch-v32/kernel/time.c
+++ b/arch/cris/arch-v32/kernel/time.c
@@ -46,7 +46,6 @@ unsigned long timer_regs[NR_CPUS] =
46 46
47extern void update_xtime_from_cmos(void); 47extern void update_xtime_from_cmos(void);
48extern int set_rtc_mmss(unsigned long nowtime); 48extern int set_rtc_mmss(unsigned long nowtime);
49extern int setup_irq(int, struct irqaction *);
50extern int have_rtc; 49extern int have_rtc;
51 50
52#ifdef CONFIG_CPU_FREQ 51#ifdef CONFIG_CPU_FREQ
diff --git a/arch/cris/arch-v32/mach-a3/io.c b/arch/cris/arch-v32/mach-a3/io.c
index c22f67ecd9f3..090ceb99ef0b 100644
--- a/arch/cris/arch-v32/mach-a3/io.c
+++ b/arch/cris/arch-v32/mach-a3/io.c
@@ -36,7 +36,7 @@ struct crisv32_ioport crisv32_ioports[] = {
36 }, 36 },
37}; 37};
38 38
39#define NBR_OF_PORTS sizeof(crisv32_ioports)/sizeof(struct crisv32_ioport) 39#define NBR_OF_PORTS ARRAY_SIZE(crisv32_ioports)
40 40
41struct crisv32_iopin crisv32_led_net0_green; 41struct crisv32_iopin crisv32_led_net0_green;
42struct crisv32_iopin crisv32_led_net0_red; 42struct crisv32_iopin crisv32_led_net0_red;
diff --git a/arch/cris/arch-v32/mach-fs/io.c b/arch/cris/arch-v32/mach-fs/io.c
index cb6327b1f8f8..a6958661fa8e 100644
--- a/arch/cris/arch-v32/mach-fs/io.c
+++ b/arch/cris/arch-v32/mach-fs/io.c
@@ -52,7 +52,7 @@ struct crisv32_ioport crisv32_ioports[] = {
52 } 52 }
53}; 53};
54 54
55#define NBR_OF_PORTS sizeof(crisv32_ioports)/sizeof(struct crisv32_ioport) 55#define NBR_OF_PORTS ARRAY_SIZE(crisv32_ioports)
56 56
57struct crisv32_iopin crisv32_led_net0_green; 57struct crisv32_iopin crisv32_led_net0_green;
58struct crisv32_iopin crisv32_led_net0_red; 58struct crisv32_iopin crisv32_led_net0_red;
diff --git a/arch/cris/include/arch-v10/arch/mmu.h b/arch/cris/include/arch-v10/arch/mmu.h
index df84f1716e6b..e829e5a37bbe 100644
--- a/arch/cris/include/arch-v10/arch/mmu.h
+++ b/arch/cris/include/arch-v10/arch/mmu.h
@@ -33,10 +33,10 @@ typedef struct
33 33
34/* CRIS PTE bits (see R_TLB_LO in the register description) 34/* CRIS PTE bits (see R_TLB_LO in the register description)
35 * 35 *
36 * Bit: 31-13 12-------4 3 2 1 0 36 * Bit: 31 30-13 12-------4 3 2 1 0
37 * ________________________________________________ 37 * _______________________________________________________
38 * | pfn | reserved | global | valid | kernel | we | 38 * | cache |pfn | reserved | global | valid | kernel | we |
39 * |_____|__________|________|_______|________|_____| 39 * |_______|____|__________|________|_______|________|_____|
40 * 40 *
41 * (pfn = physical frame number) 41 * (pfn = physical frame number)
42 */ 42 */
@@ -53,6 +53,7 @@ typedef struct
53#define _PAGE_VALID (1<<2) /* page is valid */ 53#define _PAGE_VALID (1<<2) /* page is valid */
54#define _PAGE_SILENT_READ (1<<2) /* synonym */ 54#define _PAGE_SILENT_READ (1<<2) /* synonym */
55#define _PAGE_GLOBAL (1<<3) /* global page - context is ignored */ 55#define _PAGE_GLOBAL (1<<3) /* global page - context is ignored */
56#define _PAGE_NO_CACHE (1<<31) /* part of the uncached memory map */
56 57
57/* Bits the HW doesn't care about but the kernel uses them in SW */ 58/* Bits the HW doesn't care about but the kernel uses them in SW */
58 59
diff --git a/arch/cris/include/arch-v32/arch/mmu.h b/arch/cris/include/arch-v32/arch/mmu.h
index 6bcdc3fdf7dc..c1a13e05e963 100644
--- a/arch/cris/include/arch-v32/arch/mmu.h
+++ b/arch/cris/include/arch-v32/arch/mmu.h
@@ -28,10 +28,10 @@ typedef struct
28/* 28/*
29 * CRISv32 PTE bits: 29 * CRISv32 PTE bits:
30 * 30 *
31 * Bit: 31-13 12-5 4 3 2 1 0 31 * Bit: 31 30-13 12-5 4 3 2 1 0
32 * +-----+------+--------+-------+--------+-------+---------+ 32 * +-------+-----+------+--------+-------+--------+-------+---------+
33 * | pfn | zero | global | valid | kernel | write | execute | 33 * | cache | pfn | zero | global | valid | kernel | write | execute |
34 * +-----+------+--------+-------+--------+-------+---------+ 34 * +-------+-----+------+--------+-------+--------+-------+---------+
35 */ 35 */
36 36
37/* 37/*
@@ -45,6 +45,8 @@ typedef struct
45#define _PAGE_VALID (1 << 3) /* Page is valid. */ 45#define _PAGE_VALID (1 << 3) /* Page is valid. */
46#define _PAGE_SILENT_READ (1 << 3) /* Same as above. */ 46#define _PAGE_SILENT_READ (1 << 3) /* Same as above. */
47#define _PAGE_GLOBAL (1 << 4) /* Global page. */ 47#define _PAGE_GLOBAL (1 << 4) /* Global page. */
48#define _PAGE_NO_CACHE (1 << 31) /* part of the uncached memory map */
49
48 50
49/* 51/*
50 * The hardware doesn't care about these bits, but the kernel uses them in 52 * The hardware doesn't care about these bits, but the kernel uses them in
diff --git a/arch/cris/include/asm/hardirq.h b/arch/cris/include/asm/hardirq.h
index 74178adeb1cd..17bb12d760b2 100644
--- a/arch/cris/include/asm/hardirq.h
+++ b/arch/cris/include/asm/hardirq.h
@@ -2,16 +2,6 @@
2#define __ASM_HARDIRQ_H 2#define __ASM_HARDIRQ_H
3 3
4#include <asm/irq.h> 4#include <asm/irq.h>
5#include <linux/threads.h>
6#include <linux/cache.h>
7
8typedef struct {
9 unsigned int __softirq_pending;
10} ____cacheline_aligned irq_cpustat_t;
11
12#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
13
14void ack_bad_irq(unsigned int irq);
15 5
16#define HARDIRQ_BITS 8 6#define HARDIRQ_BITS 8
17 7
@@ -24,4 +14,6 @@ void ack_bad_irq(unsigned int irq);
24# error HARDIRQ_BITS is too low! 14# error HARDIRQ_BITS is too low!
25#endif 15#endif
26 16
17#include <asm-generic/hardirq.h>
18
27#endif /* __ASM_HARDIRQ_H */ 19#endif /* __ASM_HARDIRQ_H */
diff --git a/arch/cris/include/asm/mman.h b/arch/cris/include/asm/mman.h
index b7f0afba3ce0..8eebf89f5ab1 100644
--- a/arch/cris/include/asm/mman.h
+++ b/arch/cris/include/asm/mman.h
@@ -1,19 +1 @@
1#ifndef __CRIS_MMAN_H__ #include <asm-generic/mman.h>
2#define __CRIS_MMAN_H__
3
4/* verbatim copy of asm-i386/ version */
5
6#include <asm-generic/mman-common.h>
7
8#define MAP_GROWSDOWN 0x0100 /* stack-like segment */
9#define MAP_DENYWRITE 0x0800 /* ETXTBSY */
10#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */
11#define MAP_LOCKED 0x2000 /* pages are locked */
12#define MAP_NORESERVE 0x4000 /* don't check for reservations */
13#define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */
14#define MAP_NONBLOCK 0x10000 /* do not block on IO */
15
16#define MCL_CURRENT 1 /* lock all current mappings */
17#define MCL_FUTURE 2 /* lock all future mappings */
18
19#endif /* __CRIS_MMAN_H__ */
diff --git a/arch/cris/include/asm/pgtable.h b/arch/cris/include/asm/pgtable.h
index 50aa974aa834..1fcce00f01f4 100644
--- a/arch/cris/include/asm/pgtable.h
+++ b/arch/cris/include/asm/pgtable.h
@@ -197,6 +197,8 @@ static inline pte_t __mk_pte(void * page, pgprot_t pgprot)
197static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) 197static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
198{ pte_val(pte) = (pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot); return pte; } 198{ pte_val(pte) = (pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot); return pte; }
199 199
200#define pgprot_noncached(prot) __pgprot((pgprot_val(prot) | _PAGE_NO_CACHE))
201
200 202
201/* pte_val refers to a page in the 0x4xxxxxxx physical DRAM interval 203/* pte_val refers to a page in the 0x4xxxxxxx physical DRAM interval
202 * __pte_page(pte_val) refers to the "virtual" DRAM interval 204 * __pte_page(pte_val) refers to the "virtual" DRAM interval
diff --git a/arch/cris/kernel/Makefile b/arch/cris/kernel/Makefile
index ee7bcd4d20b2..b45640b3e600 100644
--- a/arch/cris/kernel/Makefile
+++ b/arch/cris/kernel/Makefile
@@ -3,6 +3,7 @@
3# Makefile for the linux kernel. 3# Makefile for the linux kernel.
4# 4#
5 5
6CPPFLAGS_vmlinux.lds := -DDRAM_VIRTUAL_BASE=0x$(CONFIG_ETRAX_DRAM_VIRTUAL_BASE)
6extra-y := vmlinux.lds 7extra-y := vmlinux.lds
7 8
8obj-y := process.o traps.o irq.o ptrace.o setup.o time.o sys_cris.o 9obj-y := process.o traps.o irq.o ptrace.o setup.o time.o sys_cris.o
diff --git a/arch/cris/kernel/irq.c b/arch/cris/kernel/irq.c
index 7f642fcffbfc..0ca7d9892cc6 100644
--- a/arch/cris/kernel/irq.c
+++ b/arch/cris/kernel/irq.c
@@ -38,11 +38,6 @@
38 38
39#include <asm/io.h> 39#include <asm/io.h>
40 40
41void ack_bad_irq(unsigned int irq)
42{
43 printk("unexpected IRQ trap at vector %02x\n", irq);
44}
45
46int show_interrupts(struct seq_file *p, void *v) 41int show_interrupts(struct seq_file *p, void *v)
47{ 42{
48 int i = *(loff_t *) v, j; 43 int i = *(loff_t *) v, j;
diff --git a/arch/cris/kernel/process.c b/arch/cris/kernel/process.c
index 51dcd04d2777..c99aeab7cef7 100644
--- a/arch/cris/kernel/process.c
+++ b/arch/cris/kernel/process.c
@@ -45,9 +45,8 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
45 * way process stacks are handled. This is done by having a special 45 * way process stacks are handled. This is done by having a special
46 * "init_task" linker map entry.. 46 * "init_task" linker map entry..
47 */ 47 */
48union thread_union init_thread_union 48union thread_union init_thread_union __init_task_data =
49 __attribute__((__section__(".data.init_task"))) = 49 { INIT_THREAD_INFO(init_task) };
50 { INIT_THREAD_INFO(init_task) };
51 50
52/* 51/*
53 * Initial task structure. 52 * Initial task structure.
diff --git a/arch/cris/kernel/vmlinux.lds.S b/arch/cris/kernel/vmlinux.lds.S
index 6c81836b9229..bbfda67d2907 100644
--- a/arch/cris/kernel/vmlinux.lds.S
+++ b/arch/cris/kernel/vmlinux.lds.S
@@ -51,10 +51,7 @@ SECTIONS
51 _etext = . ; /* End of text section. */ 51 _etext = . ; /* End of text section. */
52 __etext = .; 52 __etext = .;
53 53
54 . = ALIGN(4); /* Exception table. */ 54 EXCEPTION_TABLE(4)
55 __start___ex_table = .;
56 __ex_table : { *(__ex_table) }
57 __stop___ex_table = .;
58 55
59 RODATA 56 RODATA
60 57
@@ -67,36 +64,24 @@ SECTIONS
67 __edata = . ; /* End of data section. */ 64 __edata = . ; /* End of data section. */
68 _edata = . ; 65 _edata = . ;
69 66
70 . = ALIGN(PAGE_SIZE); /* init_task and stack, must be aligned. */ 67 INIT_TASK_DATA_SECTION(PAGE_SIZE)
71 .data.init_task : { *(.data.init_task) }
72 68
73 . = ALIGN(PAGE_SIZE); /* Init code and data. */ 69 . = ALIGN(PAGE_SIZE); /* Init code and data. */
74 __init_begin = .; 70 __init_begin = .;
75 .init.text : { 71 INIT_TEXT_SECTION(PAGE_SIZE)
76 _sinittext = .;
77 INIT_TEXT
78 _einittext = .;
79 }
80 .init.data : { INIT_DATA } 72 .init.data : { INIT_DATA }
81 . = ALIGN(16); 73 .init.setup : { INIT_SETUP(16) }
82 __setup_start = .;
83 .init.setup : { *(.init.setup) }
84 __setup_end = .;
85#ifdef CONFIG_ETRAX_ARCH_V32 74#ifdef CONFIG_ETRAX_ARCH_V32
86 __start___param = .; 75 __start___param = .;
87 __param : { *(__param) } 76 __param : { *(__param) }
88 __stop___param = .; 77 __stop___param = .;
89#endif 78#endif
90 .initcall.init : { 79 .initcall.init : {
91 __initcall_start = .; 80 INIT_CALLS
92 INITCALLS
93 __initcall_end = .;
94 } 81 }
95 82
96 .con_initcall.init : { 83 .con_initcall.init : {
97 __con_initcall_start = .; 84 CON_INITCALL
98 *(.con_initcall.init)
99 __con_initcall_end = .;
100 } 85 }
101 SECURITY_INIT 86 SECURITY_INIT
102 87
@@ -114,9 +99,7 @@ SECTIONS
114 PERCPU(PAGE_SIZE) 99 PERCPU(PAGE_SIZE)
115 100
116 .init.ramfs : { 101 .init.ramfs : {
117 __initramfs_start = .; 102 INIT_RAM_FS
118 *(.init.ramfs)
119 __initramfs_end = .;
120 } 103 }
121#endif 104#endif
122 105
@@ -130,11 +113,7 @@ SECTIONS
130 __init_end = .; 113 __init_end = .;
131 114
132 __data_end = . ; /* Move to _edata ? */ 115 __data_end = . ; /* Move to _edata ? */
133 __bss_start = .; /* BSS. */ 116 BSS_SECTION(0, 0, 0)
134 .bss : {
135 *(COMMON)
136 *(.bss)
137 }
138 117
139 . = ALIGN (0x20); 118 . = ALIGN (0x20);
140 _end = .; 119 _end = .;
diff --git a/arch/cris/mm/init.c b/arch/cris/mm/init.c
index 514f46a4b230..ff68b9f516a1 100644
--- a/arch/cris/mm/init.c
+++ b/arch/cris/mm/init.c
@@ -54,7 +54,7 @@ mem_init(void)
54 printk(KERN_INFO 54 printk(KERN_INFO
55 "Memory: %luk/%luk available (%dk kernel code, %dk reserved, %dk data, " 55 "Memory: %luk/%luk available (%dk kernel code, %dk reserved, %dk data, "
56 "%dk init)\n" , 56 "%dk init)\n" ,
57 (unsigned long) nr_free_pages() << (PAGE_SHIFT-10), 57 nr_free_pages() << (PAGE_SHIFT-10),
58 max_mapnr << (PAGE_SHIFT-10), 58 max_mapnr << (PAGE_SHIFT-10),
59 codesize >> 10, 59 codesize >> 10,
60 reservedpages << (PAGE_SHIFT-10), 60 reservedpages << (PAGE_SHIFT-10),
diff --git a/arch/frv/Kconfig b/arch/frv/Kconfig
index b86e19c9b5b0..4b5830bcbe2e 100644
--- a/arch/frv/Kconfig
+++ b/arch/frv/Kconfig
@@ -7,7 +7,7 @@ config FRV
7 default y 7 default y
8 select HAVE_IDE 8 select HAVE_IDE
9 select HAVE_ARCH_TRACEHOOK 9 select HAVE_ARCH_TRACEHOOK
10 select HAVE_PERF_COUNTERS 10 select HAVE_PERF_EVENTS
11 11
12config ZONE_DMA 12config ZONE_DMA
13 bool 13 bool
diff --git a/arch/frv/include/asm/gdb-stub.h b/arch/frv/include/asm/gdb-stub.h
index 24f9738670bd..2da716407ff2 100644
--- a/arch/frv/include/asm/gdb-stub.h
+++ b/arch/frv/include/asm/gdb-stub.h
@@ -90,7 +90,6 @@ extern void gdbstub_do_rx(void);
90extern asmlinkage void __debug_stub_init_break(void); 90extern asmlinkage void __debug_stub_init_break(void);
91extern asmlinkage void __break_hijack_kernel_event(void); 91extern asmlinkage void __break_hijack_kernel_event(void);
92extern asmlinkage void __break_hijack_kernel_event_breaks_here(void); 92extern asmlinkage void __break_hijack_kernel_event_breaks_here(void);
93extern asmlinkage void start_kernel(void);
94 93
95extern asmlinkage void gdbstub_rx_handler(void); 94extern asmlinkage void gdbstub_rx_handler(void);
96extern asmlinkage void gdbstub_rx_irq(void); 95extern asmlinkage void gdbstub_rx_irq(void);
diff --git a/arch/frv/include/asm/hardirq.h b/arch/frv/include/asm/hardirq.h
index fc47515822a2..5fc8b6f5bc55 100644
--- a/arch/frv/include/asm/hardirq.h
+++ b/arch/frv/include/asm/hardirq.h
@@ -12,24 +12,15 @@
12#ifndef __ASM_HARDIRQ_H 12#ifndef __ASM_HARDIRQ_H
13#define __ASM_HARDIRQ_H 13#define __ASM_HARDIRQ_H
14 14
15#include <linux/threads.h> 15#include <asm/atomic.h>
16#include <linux/irq.h>
17
18typedef struct {
19 unsigned int __softirq_pending;
20 unsigned long idle_timestamp;
21} ____cacheline_aligned irq_cpustat_t;
22
23#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
24
25#ifdef CONFIG_SMP
26#error SMP not available on FR-V
27#endif /* CONFIG_SMP */
28 16
29extern atomic_t irq_err_count; 17extern atomic_t irq_err_count;
30static inline void ack_bad_irq(int irq) 18static inline void ack_bad_irq(int irq)
31{ 19{
32 atomic_inc(&irq_err_count); 20 atomic_inc(&irq_err_count);
33} 21}
22#define ack_bad_irq ack_bad_irq
23
24#include <asm-generic/hardirq.h>
34 25
35#endif 26#endif
diff --git a/arch/frv/include/asm/mman.h b/arch/frv/include/asm/mman.h
index 58c1d11e2ac7..8eebf89f5ab1 100644
--- a/arch/frv/include/asm/mman.h
+++ b/arch/frv/include/asm/mman.h
@@ -1,18 +1 @@
1#ifndef __ASM_MMAN_H__ #include <asm-generic/mman.h>
2#define __ASM_MMAN_H__
3
4#include <asm-generic/mman-common.h>
5
6#define MAP_GROWSDOWN 0x0100 /* stack-like segment */
7#define MAP_DENYWRITE 0x0800 /* ETXTBSY */
8#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */
9#define MAP_LOCKED 0x2000 /* pages are locked */
10#define MAP_NORESERVE 0x4000 /* don't check for reservations */
11#define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */
12#define MAP_NONBLOCK 0x10000 /* do not block on IO */
13
14#define MCL_CURRENT 1 /* lock all current mappings */
15#define MCL_FUTURE 2 /* lock all future mappings */
16
17#endif /* __ASM_MMAN_H__ */
18
diff --git a/arch/frv/include/asm/perf_counter.h b/arch/frv/include/asm/perf_event.h
index ccf726e61b2e..a69e0155d146 100644
--- a/arch/frv/include/asm/perf_counter.h
+++ b/arch/frv/include/asm/perf_event.h
@@ -1,4 +1,4 @@
1/* FRV performance counter support 1/* FRV performance event support
2 * 2 *
3 * Copyright (C) 2009 Red Hat, Inc. All Rights Reserved. 3 * Copyright (C) 2009 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com) 4 * Written by David Howells (dhowells@redhat.com)
@@ -9,9 +9,9 @@
9 * 2 of the Licence, or (at your option) any later version. 9 * 2 of the Licence, or (at your option) any later version.
10 */ 10 */
11 11
12#ifndef _ASM_PERF_COUNTER_H 12#ifndef _ASM_PERF_EVENT_H
13#define _ASM_PERF_COUNTER_H 13#define _ASM_PERF_EVENT_H
14 14
15#define PERF_COUNTER_INDEX_OFFSET 0 15#define PERF_EVENT_INDEX_OFFSET 0
16 16
17#endif /* _ASM_PERF_COUNTER_H */ 17#endif /* _ASM_PERF_EVENT_H */
diff --git a/arch/frv/include/asm/unistd.h b/arch/frv/include/asm/unistd.h
index 4a8fb427ce0a..be6ef0f5cd42 100644
--- a/arch/frv/include/asm/unistd.h
+++ b/arch/frv/include/asm/unistd.h
@@ -342,7 +342,7 @@
342#define __NR_preadv 333 342#define __NR_preadv 333
343#define __NR_pwritev 334 343#define __NR_pwritev 334
344#define __NR_rt_tgsigqueueinfo 335 344#define __NR_rt_tgsigqueueinfo 335
345#define __NR_perf_counter_open 336 345#define __NR_perf_event_open 336
346 346
347#ifdef __KERNEL__ 347#ifdef __KERNEL__
348 348
diff --git a/arch/frv/kernel/debug-stub.c b/arch/frv/kernel/debug-stub.c
index 2f6c60c921e0..2845139c8077 100644
--- a/arch/frv/kernel/debug-stub.c
+++ b/arch/frv/kernel/debug-stub.c
@@ -15,6 +15,7 @@
15#include <linux/sched.h> 15#include <linux/sched.h>
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/serial_reg.h> 17#include <linux/serial_reg.h>
18#include <linux/start_kernel.h>
18 19
19#include <asm/system.h> 20#include <asm/system.h>
20#include <asm/serial-regs.h> 21#include <asm/serial-regs.h>
diff --git a/arch/frv/kernel/entry.S b/arch/frv/kernel/entry.S
index fde1e446b440..189397ec012a 100644
--- a/arch/frv/kernel/entry.S
+++ b/arch/frv/kernel/entry.S
@@ -1525,6 +1525,6 @@ sys_call_table:
1525 .long sys_preadv 1525 .long sys_preadv
1526 .long sys_pwritev 1526 .long sys_pwritev
1527 .long sys_rt_tgsigqueueinfo /* 335 */ 1527 .long sys_rt_tgsigqueueinfo /* 335 */
1528 .long sys_perf_counter_open 1528 .long sys_perf_event_open
1529 1529
1530syscall_table_size = (. - sys_call_table) 1530syscall_table_size = (. - sys_call_table)
diff --git a/arch/frv/kernel/init_task.c b/arch/frv/kernel/init_task.c
index 1d3df1d9495c..3c3e0b336a9d 100644
--- a/arch/frv/kernel/init_task.c
+++ b/arch/frv/kernel/init_task.c
@@ -19,9 +19,8 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
19 * way process stacks are handled. This is done by having a special 19 * way process stacks are handled. This is done by having a special
20 * "init_task" linker map entry.. 20 * "init_task" linker map entry..
21 */ 21 */
22union thread_union init_thread_union 22union thread_union init_thread_union __init_task_data =
23 __attribute__((__section__(".data.init_task"))) = 23 { INIT_THREAD_INFO(init_task) };
24 { INIT_THREAD_INFO(init_task) };
25 24
26/* 25/*
27 * Initial task structure. 26 * Initial task structure.
diff --git a/arch/frv/kernel/pm.c b/arch/frv/kernel/pm.c
index be722fc1acff..0d4d3e3a4cfc 100644
--- a/arch/frv/kernel/pm.c
+++ b/arch/frv/kernel/pm.c
@@ -150,7 +150,7 @@ static int user_atoi(char __user *ubuf, size_t len)
150/* 150/*
151 * Send us to sleep. 151 * Send us to sleep.
152 */ 152 */
153static int sysctl_pm_do_suspend(ctl_table *ctl, int write, struct file *filp, 153static int sysctl_pm_do_suspend(ctl_table *ctl, int write,
154 void __user *buffer, size_t *lenp, loff_t *fpos) 154 void __user *buffer, size_t *lenp, loff_t *fpos)
155{ 155{
156 int retval, mode; 156 int retval, mode;
@@ -198,13 +198,13 @@ static int try_set_cmode(int new_cmode)
198} 198}
199 199
200 200
201static int cmode_procctl(ctl_table *ctl, int write, struct file *filp, 201static int cmode_procctl(ctl_table *ctl, int write,
202 void __user *buffer, size_t *lenp, loff_t *fpos) 202 void __user *buffer, size_t *lenp, loff_t *fpos)
203{ 203{
204 int new_cmode; 204 int new_cmode;
205 205
206 if (!write) 206 if (!write)
207 return proc_dointvec(ctl, write, filp, buffer, lenp, fpos); 207 return proc_dointvec(ctl, write, buffer, lenp, fpos);
208 208
209 new_cmode = user_atoi(buffer, *lenp); 209 new_cmode = user_atoi(buffer, *lenp);
210 210
@@ -301,13 +301,13 @@ static int try_set_cm(int new_cm)
301 return 0; 301 return 0;
302} 302}
303 303
304static int p0_procctl(ctl_table *ctl, int write, struct file *filp, 304static int p0_procctl(ctl_table *ctl, int write,
305 void __user *buffer, size_t *lenp, loff_t *fpos) 305 void __user *buffer, size_t *lenp, loff_t *fpos)
306{ 306{
307 int new_p0; 307 int new_p0;
308 308
309 if (!write) 309 if (!write)
310 return proc_dointvec(ctl, write, filp, buffer, lenp, fpos); 310 return proc_dointvec(ctl, write, buffer, lenp, fpos);
311 311
312 new_p0 = user_atoi(buffer, *lenp); 312 new_p0 = user_atoi(buffer, *lenp);
313 313
@@ -345,13 +345,13 @@ static int p0_sysctl(ctl_table *table,
345 return 1; 345 return 1;
346} 346}
347 347
348static int cm_procctl(ctl_table *ctl, int write, struct file *filp, 348static int cm_procctl(ctl_table *ctl, int write,
349 void __user *buffer, size_t *lenp, loff_t *fpos) 349 void __user *buffer, size_t *lenp, loff_t *fpos)
350{ 350{
351 int new_cm; 351 int new_cm;
352 352
353 if (!write) 353 if (!write)
354 return proc_dointvec(ctl, write, filp, buffer, lenp, fpos); 354 return proc_dointvec(ctl, write, buffer, lenp, fpos);
355 355
356 new_cm = user_atoi(buffer, *lenp); 356 new_cm = user_atoi(buffer, *lenp);
357 357
diff --git a/arch/frv/kernel/process.c b/arch/frv/kernel/process.c
index 0de50df74970..904255938216 100644
--- a/arch/frv/kernel/process.c
+++ b/arch/frv/kernel/process.c
@@ -83,13 +83,9 @@ void (*idle)(void) = core_sleep_idle;
83 */ 83 */
84void cpu_idle(void) 84void cpu_idle(void)
85{ 85{
86 int cpu = smp_processor_id();
87
88 /* endless idle loop with no priority at all */ 86 /* endless idle loop with no priority at all */
89 while (1) { 87 while (1) {
90 while (!need_resched()) { 88 while (!need_resched()) {
91 irq_stat[cpu].idle_timestamp = jiffies;
92
93 check_pgt_cache(); 89 check_pgt_cache();
94 90
95 if (!frv_dma_inprogress && idle) 91 if (!frv_dma_inprogress && idle)
diff --git a/arch/frv/kernel/sys_frv.c b/arch/frv/kernel/sys_frv.c
index baadc97f8627..2b6b5289cdcc 100644
--- a/arch/frv/kernel/sys_frv.c
+++ b/arch/frv/kernel/sys_frv.c
@@ -21,7 +21,6 @@
21#include <linux/stat.h> 21#include <linux/stat.h>
22#include <linux/mman.h> 22#include <linux/mman.h>
23#include <linux/file.h> 23#include <linux/file.h>
24#include <linux/utsname.h>
25#include <linux/syscalls.h> 24#include <linux/syscalls.h>
26#include <linux/ipc.h> 25#include <linux/ipc.h>
27 26
diff --git a/arch/frv/kernel/vmlinux.lds.S b/arch/frv/kernel/vmlinux.lds.S
index 7dbf41f68b52..cbe811fccfcc 100644
--- a/arch/frv/kernel/vmlinux.lds.S
+++ b/arch/frv/kernel/vmlinux.lds.S
@@ -35,50 +35,13 @@ SECTIONS
35#endif 35#endif
36 } 36 }
37 _einittext = .; 37 _einittext = .;
38 .init.data : { INIT_DATA }
39
40 . = ALIGN(8);
41 __setup_start = .;
42 .setup.init : { KEEP(*(.init.setup)) }
43 __setup_end = .;
44
45 __initcall_start = .;
46 .initcall.init : {
47 INITCALLS
48 }
49 __initcall_end = .;
50 __con_initcall_start = .;
51 .con_initcall.init : { *(.con_initcall.init) }
52 __con_initcall_end = .;
53 SECURITY_INIT
54 . = ALIGN(4);
55 __alt_instructions = .;
56 .altinstructions : { *(.altinstructions) }
57 __alt_instructions_end = .;
58 .altinstr_replacement : { *(.altinstr_replacement) }
59 38
39 INIT_DATA_SECTION(8)
60 PERCPU(4096) 40 PERCPU(4096)
61 41
62#ifdef CONFIG_BLK_DEV_INITRD 42 . = ALIGN(PAGE_SIZE);
63 . = ALIGN(4096);
64 __initramfs_start = .;
65 .init.ramfs : { *(.init.ramfs) }
66 __initramfs_end = .;
67#endif
68
69 . = ALIGN(THREAD_SIZE);
70 __init_end = .; 43 __init_end = .;
71 44
72 /* put sections together that have massive alignment issues */
73 . = ALIGN(THREAD_SIZE);
74 .data.init_task : {
75 /* init task record & stack */
76 *(.data.init_task)
77 }
78
79 . = ALIGN(L1_CACHE_BYTES);
80 .data.cacheline_aligned : { *(.data.cacheline_aligned) }
81
82 .trap : { 45 .trap : {
83 /* trap table management - read entry-table.S before modifying */ 46 /* trap table management - read entry-table.S before modifying */
84 . = ALIGN(8192); 47 . = ALIGN(8192);
@@ -124,13 +87,12 @@ SECTIONS
124 87
125 } 88 }
126 89
127 . = ALIGN(8); /* Exception table */ 90 EXCEPTION_TABLE(8)
128 __start___ex_table = .;
129 __ex_table : { KEEP(*(__ex_table)) }
130 __stop___ex_table = .;
131 91
132 _sdata = .; 92 _sdata = .;
133 .data : { /* Data */ 93 .data : { /* Data */
94 INIT_TASK_DATA(THREAD_SIZE)
95 CACHELINE_ALIGNED_DATA(L1_CACHE_BYTES)
134 DATA_DATA 96 DATA_DATA
135 *(.data.*) 97 *(.data.*)
136 EXIT_DATA 98 EXIT_DATA
@@ -159,22 +121,8 @@ SECTIONS
159 . = ALIGN(PAGE_SIZE); 121 . = ALIGN(PAGE_SIZE);
160 __kernel_image_end = .; 122 __kernel_image_end = .;
161 123
162 /* Stabs debugging sections. */ 124 STABS_DEBUG
163 .stab 0 : { *(.stab) } 125 DWARF_DEBUG
164 .stabstr 0 : { *(.stabstr) }
165 .stab.excl 0 : { *(.stab.excl) }
166 .stab.exclstr 0 : { *(.stab.exclstr) }
167 .stab.index 0 : { *(.stab.index) }
168 .stab.indexstr 0 : { *(.stab.indexstr) }
169
170 .debug_line 0 : { *(.debug_line) }
171 .debug_info 0 : { *(.debug_info) }
172 .debug_abbrev 0 : { *(.debug_abbrev) }
173 .debug_aranges 0 : { *(.debug_aranges) }
174 .debug_frame 0 : { *(.debug_frame) }
175 .debug_pubnames 0 : { *(.debug_pubnames) }
176 .debug_str 0 : { *(.debug_str) }
177 .debug_ranges 0 : { *(.debug_ranges) }
178 126
179 .comment 0 : { *(.comment) } 127 .comment 0 : { *(.comment) }
180 128
diff --git a/arch/frv/lib/Makefile b/arch/frv/lib/Makefile
index 0a377210c89b..f4709756d0d9 100644
--- a/arch/frv/lib/Makefile
+++ b/arch/frv/lib/Makefile
@@ -5,4 +5,4 @@
5lib-y := \ 5lib-y := \
6 __ashldi3.o __lshrdi3.o __muldi3.o __ashrdi3.o __negdi2.o __ucmpdi2.o \ 6 __ashldi3.o __lshrdi3.o __muldi3.o __ashrdi3.o __negdi2.o __ucmpdi2.o \
7 checksum.o memcpy.o memset.o atomic-ops.o atomic64-ops.o \ 7 checksum.o memcpy.o memset.o atomic-ops.o atomic64-ops.o \
8 outsl_ns.o outsl_sw.o insl_ns.o insl_sw.o cache.o perf_counter.o 8 outsl_ns.o outsl_sw.o insl_ns.o insl_sw.o cache.o perf_event.o
diff --git a/arch/frv/lib/cache.S b/arch/frv/lib/cache.S
index 0e10ad8dc462..0c4fb204911b 100644
--- a/arch/frv/lib/cache.S
+++ b/arch/frv/lib/cache.S
@@ -1,4 +1,4 @@
1/* cache.S: cache managment routines 1/* cache.S: cache management routines
2 * 2 *
3 * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved. 3 * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com) 4 * Written by David Howells (dhowells@redhat.com)
diff --git a/arch/frv/lib/perf_counter.c b/arch/frv/lib/perf_event.c
index 2000feecd571..9ac5acfd2e91 100644
--- a/arch/frv/lib/perf_counter.c
+++ b/arch/frv/lib/perf_event.c
@@ -1,4 +1,4 @@
1/* Performance counter handling 1/* Performance event handling
2 * 2 *
3 * Copyright (C) 2009 Red Hat, Inc. All Rights Reserved. 3 * Copyright (C) 2009 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com) 4 * Written by David Howells (dhowells@redhat.com)
@@ -9,11 +9,11 @@
9 * 2 of the Licence, or (at your option) any later version. 9 * 2 of the Licence, or (at your option) any later version.
10 */ 10 */
11 11
12#include <linux/perf_counter.h> 12#include <linux/perf_event.h>
13 13
14/* 14/*
15 * mark the performance counter as pending 15 * mark the performance event as pending
16 */ 16 */
17void set_perf_counter_pending(void) 17void set_perf_event_pending(void)
18{ 18{
19} 19}
diff --git a/arch/frv/mb93090-mb00/Makefile b/arch/frv/mb93090-mb00/Makefile
index 76595e870733..b73b542f8f48 100644
--- a/arch/frv/mb93090-mb00/Makefile
+++ b/arch/frv/mb93090-mb00/Makefile
@@ -11,3 +11,5 @@ else
11obj-y += pci-dma-nommu.o 11obj-y += pci-dma-nommu.o
12endif 12endif
13endif 13endif
14
15obj-$(CONFIG_MTD) += flash.o
diff --git a/arch/frv/mb93090-mb00/flash.c b/arch/frv/mb93090-mb00/flash.c
new file mode 100644
index 000000000000..c0e3707c2299
--- /dev/null
+++ b/arch/frv/mb93090-mb00/flash.c
@@ -0,0 +1,90 @@
1/* Flash mappings for the MB93090-MB00 motherboard
2 *
3 * Copyright (C) 2009 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public Licence
8 * as published by the Free Software Foundation; either version
9 * 2 of the Licence, or (at your option) any later version.
10 */
11
12#include <linux/init.h>
13#include <linux/platform_device.h>
14#include <linux/mtd/partitions.h>
15#include <linux/mtd/physmap.h>
16
17#define MB93090_BOOTROM_ADDR 0xFF000000 /* Boot ROM */
18#define MB93090_BOOTROM_SIZE (2 * 1024 * 1024)
19#define MB93090_USERROM_ADDR 0xFF200000 /* User ROM */
20#define MB93090_USERROM_SIZE (2 * 1024 * 1024)
21
22/*
23 * default MTD partition table for both main flash devices, expected to be
24 * overridden by RedBoot
25 */
26static struct mtd_partition mb93090_partitions[] = {
27 {
28 .name = "Filesystem",
29 .size = MTDPART_SIZ_FULL,
30 .offset = 0,
31 }
32};
33
34/*
35 * Definition of the MB93090 Boot ROM (on the CPU card)
36 */
37static struct physmap_flash_data mb93090_bootrom_data = {
38 .width = 2,
39 .nr_parts = 2,
40 .parts = mb93090_partitions,
41};
42
43static struct resource mb93090_bootrom_resource = {
44 .start = MB93090_BOOTROM_ADDR,
45 .end = MB93090_BOOTROM_ADDR + MB93090_BOOTROM_SIZE - 1,
46 .flags = IORESOURCE_MEM,
47};
48
49static struct platform_device mb93090_bootrom = {
50 .name = "physmap-flash",
51 .id = 0,
52 .dev.platform_data = &mb93090_bootrom_data,
53 .num_resources = 1,
54 .resource = &mb93090_bootrom_resource,
55};
56
57/*
58 * Definition of the MB93090 User ROM definition (on the motherboard)
59 */
60static struct physmap_flash_data mb93090_userrom_data = {
61 .width = 2,
62 .nr_parts = 2,
63 .parts = mb93090_partitions,
64};
65
66static struct resource mb93090_userrom_resource = {
67 .start = MB93090_USERROM_ADDR,
68 .end = MB93090_USERROM_ADDR + MB93090_USERROM_SIZE - 1,
69 .flags = IORESOURCE_MEM,
70};
71
72static struct platform_device mb93090_userrom = {
73 .name = "physmap-flash",
74 .id = 1,
75 .dev.platform_data = &mb93090_userrom_data,
76 .num_resources = 1,
77 .resource = &mb93090_userrom_resource,
78};
79
80/*
81 * register the MB93090 flashes
82 */
83static int __init mb93090_mtd_init(void)
84{
85 platform_device_register(&mb93090_bootrom);
86 platform_device_register(&mb93090_userrom);
87 return 0;
88}
89
90module_init(mb93090_mtd_init);
diff --git a/arch/frv/mb93090-mb00/pci-frv.c b/arch/frv/mb93090-mb00/pci-frv.c
index 43d67534c712..566bdeb499d1 100644
--- a/arch/frv/mb93090-mb00/pci-frv.c
+++ b/arch/frv/mb93090-mb00/pci-frv.c
@@ -86,7 +86,7 @@ static void __init pcibios_allocate_bus_resources(struct list_head *bus_list)
86 struct pci_bus *bus; 86 struct pci_bus *bus;
87 struct pci_dev *dev; 87 struct pci_dev *dev;
88 int idx; 88 int idx;
89 struct resource *r, *pr; 89 struct resource *r;
90 90
91 /* Depth-First Search on bus tree */ 91 /* Depth-First Search on bus tree */
92 for (ln=bus_list->next; ln != bus_list; ln=ln->next) { 92 for (ln=bus_list->next; ln != bus_list; ln=ln->next) {
@@ -96,8 +96,7 @@ static void __init pcibios_allocate_bus_resources(struct list_head *bus_list)
96 r = &dev->resource[idx]; 96 r = &dev->resource[idx];
97 if (!r->start) 97 if (!r->start)
98 continue; 98 continue;
99 pr = pci_find_parent_resource(dev, r); 99 if (pci_claim_resource(dev, idx) < 0)
100 if (!pr || request_resource(pr, r) < 0)
101 printk(KERN_ERR "PCI: Cannot allocate resource region %d of bridge %s\n", idx, pci_name(dev)); 100 printk(KERN_ERR "PCI: Cannot allocate resource region %d of bridge %s\n", idx, pci_name(dev));
102 } 101 }
103 } 102 }
@@ -110,7 +109,7 @@ static void __init pcibios_allocate_resources(int pass)
110 struct pci_dev *dev = NULL; 109 struct pci_dev *dev = NULL;
111 int idx, disabled; 110 int idx, disabled;
112 u16 command; 111 u16 command;
113 struct resource *r, *pr; 112 struct resource *r;
114 113
115 for_each_pci_dev(dev) { 114 for_each_pci_dev(dev) {
116 pci_read_config_word(dev, PCI_COMMAND, &command); 115 pci_read_config_word(dev, PCI_COMMAND, &command);
@@ -127,8 +126,7 @@ static void __init pcibios_allocate_resources(int pass)
127 if (pass == disabled) { 126 if (pass == disabled) {
128 DBG("PCI: Resource %08lx-%08lx (f=%lx, d=%d, p=%d)\n", 127 DBG("PCI: Resource %08lx-%08lx (f=%lx, d=%d, p=%d)\n",
129 r->start, r->end, r->flags, disabled, pass); 128 r->start, r->end, r->flags, disabled, pass);
130 pr = pci_find_parent_resource(dev, r); 129 if (pci_claim_resource(dev, idx) < 0) {
131 if (!pr || request_resource(pr, r) < 0) {
132 printk(KERN_ERR "PCI: Cannot allocate resource region %d of device %s\n", idx, pci_name(dev)); 130 printk(KERN_ERR "PCI: Cannot allocate resource region %d of device %s\n", idx, pci_name(dev));
133 /* We'll assign a new address later */ 131 /* We'll assign a new address later */
134 r->end -= r->start; 132 r->end -= r->start;
diff --git a/arch/h8300/include/asm/hardirq.h b/arch/h8300/include/asm/hardirq.h
index 9d7f7a7462b2..c2e1aa0f0d14 100644
--- a/arch/h8300/include/asm/hardirq.h
+++ b/arch/h8300/include/asm/hardirq.h
@@ -1,18 +1,7 @@
1#ifndef __H8300_HARDIRQ_H 1#ifndef __H8300_HARDIRQ_H
2#define __H8300_HARDIRQ_H 2#define __H8300_HARDIRQ_H
3 3
4#include <linux/kernel.h> 4#include <asm/irq.h>
5#include <linux/threads.h>
6#include <linux/interrupt.h>
7#include <linux/irq.h>
8
9typedef struct {
10 unsigned int __softirq_pending;
11} ____cacheline_aligned irq_cpustat_t;
12
13#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
14
15extern void ack_bad_irq(unsigned int irq);
16 5
17#define HARDIRQ_BITS 8 6#define HARDIRQ_BITS 8
18 7
@@ -25,4 +14,6 @@ extern void ack_bad_irq(unsigned int irq);
25# error HARDIRQ_BITS is too low! 14# error HARDIRQ_BITS is too low!
26#endif 15#endif
27 16
17#include <asm-generic/hardirq.h>
18
28#endif 19#endif
diff --git a/arch/h8300/include/asm/mman.h b/arch/h8300/include/asm/mman.h
index cf35f0a6f12e..8eebf89f5ab1 100644
--- a/arch/h8300/include/asm/mman.h
+++ b/arch/h8300/include/asm/mman.h
@@ -1,17 +1 @@
1#ifndef __H8300_MMAN_H__ #include <asm-generic/mman.h>
2#define __H8300_MMAN_H__
3
4#include <asm-generic/mman-common.h>
5
6#define MAP_GROWSDOWN 0x0100 /* stack-like segment */
7#define MAP_DENYWRITE 0x0800 /* ETXTBSY */
8#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */
9#define MAP_LOCKED 0x2000 /* pages are locked */
10#define MAP_NORESERVE 0x4000 /* don't check for reservations */
11#define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */
12#define MAP_NONBLOCK 0x10000 /* do not block on IO */
13
14#define MCL_CURRENT 1 /* lock all current mappings */
15#define MCL_FUTURE 2 /* lock all future mappings */
16
17#endif /* __H8300_MMAN_H__ */
diff --git a/arch/h8300/include/asm/pci.h b/arch/h8300/include/asm/pci.h
index 97389b35aa35..cc9762091c0a 100644
--- a/arch/h8300/include/asm/pci.h
+++ b/arch/h8300/include/asm/pci.h
@@ -8,7 +8,6 @@
8 */ 8 */
9 9
10#define pcibios_assign_all_busses() 0 10#define pcibios_assign_all_busses() 0
11#define pcibios_scan_all_fns(a, b) 0
12 11
13static inline void pcibios_set_master(struct pci_dev *dev) 12static inline void pcibios_set_master(struct pci_dev *dev)
14{ 13{
diff --git a/arch/h8300/kernel/init_task.c b/arch/h8300/kernel/init_task.c
index 089c65ed6eb3..54c1062ee80e 100644
--- a/arch/h8300/kernel/init_task.c
+++ b/arch/h8300/kernel/init_task.c
@@ -31,7 +31,6 @@ EXPORT_SYMBOL(init_task);
31 * way process stacks are handled. This is done by having a special 31 * way process stacks are handled. This is done by having a special
32 * "init_task" linker map entry.. 32 * "init_task" linker map entry..
33 */ 33 */
34union thread_union init_thread_union 34union thread_union init_thread_union __init_task_data =
35 __attribute__((__section__(".data.init_task"))) = 35 { INIT_THREAD_INFO(init_task) };
36 { INIT_THREAD_INFO(init_task) };
37 36
diff --git a/arch/h8300/kernel/irq.c b/arch/h8300/kernel/irq.c
index 74f8dd7b34d2..5c913d472119 100644
--- a/arch/h8300/kernel/irq.c
+++ b/arch/h8300/kernel/irq.c
@@ -81,11 +81,6 @@ struct irq_chip h8300irq_chip = {
81 .end = h8300_end_irq, 81 .end = h8300_end_irq,
82}; 82};
83 83
84void ack_bad_irq(unsigned int irq)
85{
86 printk("unexpected IRQ trap at vector %02x\n", irq);
87}
88
89#if defined(CONFIG_RAMKERNEL) 84#if defined(CONFIG_RAMKERNEL)
90static unsigned long __init *get_vector_address(void) 85static unsigned long __init *get_vector_address(void)
91{ 86{
diff --git a/arch/h8300/kernel/sys_h8300.c b/arch/h8300/kernel/sys_h8300.c
index 2745656dcc52..8cb5d73a0e35 100644
--- a/arch/h8300/kernel/sys_h8300.c
+++ b/arch/h8300/kernel/sys_h8300.c
@@ -17,7 +17,6 @@
17#include <linux/syscalls.h> 17#include <linux/syscalls.h>
18#include <linux/mman.h> 18#include <linux/mman.h>
19#include <linux/file.h> 19#include <linux/file.h>
20#include <linux/utsname.h>
21#include <linux/fs.h> 20#include <linux/fs.h>
22#include <linux/ipc.h> 21#include <linux/ipc.h>
23 22
diff --git a/arch/h8300/kernel/timer/tpu.c b/arch/h8300/kernel/timer/tpu.c
index e7c6e614a758..2193a2e2859a 100644
--- a/arch/h8300/kernel/timer/tpu.c
+++ b/arch/h8300/kernel/timer/tpu.c
@@ -7,7 +7,6 @@
7 * 7 *
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/errno.h> 10#include <linux/errno.h>
12#include <linux/sched.h> 11#include <linux/sched.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
diff --git a/arch/h8300/kernel/vmlinux.lds.S b/arch/h8300/kernel/vmlinux.lds.S
index 662b02ecb86e..b9e24907e6ea 100644
--- a/arch/h8300/kernel/vmlinux.lds.S
+++ b/arch/h8300/kernel/vmlinux.lds.S
@@ -1,5 +1,6 @@
1#define VMLINUX_SYMBOL(_sym_) _##_sym_ 1#define VMLINUX_SYMBOL(_sym_) _##_sym_
2#include <asm-generic/vmlinux.lds.h> 2#include <asm-generic/vmlinux.lds.h>
3#include <asm/page.h>
3 4
4/* target memory map */ 5/* target memory map */
5#ifdef CONFIG_H8300H_GENERIC 6#ifdef CONFIG_H8300H_GENERIC
@@ -79,11 +80,8 @@ SECTIONS
79 SCHED_TEXT 80 SCHED_TEXT
80 LOCK_TEXT 81 LOCK_TEXT
81 __etext = . ; 82 __etext = . ;
82 . = ALIGN(16); /* Exception table */
83 ___start___ex_table = .;
84 *(__ex_table)
85 ___stop___ex_table = .;
86 } 83 }
84 EXCEPTION_TABLE(16)
87 85
88 RODATA 86 RODATA
89#if defined(CONFIG_ROMKERNEL) 87#if defined(CONFIG_ROMKERNEL)
@@ -100,8 +98,7 @@ SECTIONS
100 __sdata = . ; 98 __sdata = . ;
101 ___data_start = . ; 99 ___data_start = . ;
102 100
103 . = ALIGN(0x2000) ; 101 INIT_TASK_DATA(0x2000)
104 *(.data.init_task)
105 . = ALIGN(0x4) ; 102 . = ALIGN(0x4) ;
106 DATA_DATA 103 DATA_DATA
107 . = ALIGN(0x4) ; 104 . = ALIGN(0x4) ;
@@ -114,24 +111,16 @@ SECTIONS
114 __einittext = .; 111 __einittext = .;
115 INIT_DATA 112 INIT_DATA
116 . = ALIGN(0x4) ; 113 . = ALIGN(0x4) ;
114 INIT_SETUP(0x4)
117 ___setup_start = .; 115 ___setup_start = .;
118 *(.init.setup) 116 *(.init.setup)
119 . = ALIGN(0x4) ; 117 . = ALIGN(0x4) ;
120 ___setup_end = .; 118 ___setup_end = .;
121 ___initcall_start = .; 119 INIT_CALLS
122 INITCALLS 120 CON_INITCALL
123 ___initcall_end = .;
124 ___con_initcall_start = .;
125 *(.con_initcall.init)
126 ___con_initcall_end = .;
127 EXIT_TEXT 121 EXIT_TEXT
128 EXIT_DATA 122 EXIT_DATA
129#if defined(CONFIG_BLK_DEV_INITRD) 123 INIT_RAM_FS
130 . = ALIGN(4);
131 ___initramfs_start = .;
132 *(.init.ramfs)
133 ___initramfs_end = .;
134#endif
135 . = ALIGN(0x4) ; 124 . = ALIGN(0x4) ;
136 ___init_end = .; 125 ___init_end = .;
137 __edata = . ; 126 __edata = . ;
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 011a1cdf0eb5..6851e52ed5a2 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -500,6 +500,10 @@ config HAVE_ARCH_NODEDATA_EXTENSION
500 def_bool y 500 def_bool y
501 depends on NUMA 501 depends on NUMA
502 502
503config ARCH_PROC_KCORE_TEXT
504 def_bool y
505 depends on PROC_KCORE
506
503config IA32_SUPPORT 507config IA32_SUPPORT
504 bool "Support for Linux/x86 binaries" 508 bool "Support for Linux/x86 binaries"
505 help 509 help
diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c
index 8cfb001092ab..674a8374c6d9 100644
--- a/arch/ia64/hp/common/sba_iommu.c
+++ b/arch/ia64/hp/common/sba_iommu.c
@@ -2026,24 +2026,21 @@ acpi_sba_ioc_add(struct acpi_device *device)
2026 struct ioc *ioc; 2026 struct ioc *ioc;
2027 acpi_status status; 2027 acpi_status status;
2028 u64 hpa, length; 2028 u64 hpa, length;
2029 struct acpi_buffer buffer;
2030 struct acpi_device_info *dev_info; 2029 struct acpi_device_info *dev_info;
2031 2030
2032 status = hp_acpi_csr_space(device->handle, &hpa, &length); 2031 status = hp_acpi_csr_space(device->handle, &hpa, &length);
2033 if (ACPI_FAILURE(status)) 2032 if (ACPI_FAILURE(status))
2034 return 1; 2033 return 1;
2035 2034
2036 buffer.length = ACPI_ALLOCATE_LOCAL_BUFFER; 2035 status = acpi_get_object_info(device->handle, &dev_info);
2037 status = acpi_get_object_info(device->handle, &buffer);
2038 if (ACPI_FAILURE(status)) 2036 if (ACPI_FAILURE(status))
2039 return 1; 2037 return 1;
2040 dev_info = buffer.pointer;
2041 2038
2042 /* 2039 /*
2043 * For HWP0001, only SBA appears in ACPI namespace. It encloses the PCI 2040 * For HWP0001, only SBA appears in ACPI namespace. It encloses the PCI
2044 * root bridges, and its CSR space includes the IOC function. 2041 * root bridges, and its CSR space includes the IOC function.
2045 */ 2042 */
2046 if (strncmp("HWP0001", dev_info->hardware_id.value, 7) == 0) { 2043 if (strncmp("HWP0001", dev_info->hardware_id.string, 7) == 0) {
2047 hpa += ZX1_IOC_OFFSET; 2044 hpa += ZX1_IOC_OFFSET;
2048 /* zx1 based systems default to kernel page size iommu pages */ 2045 /* zx1 based systems default to kernel page size iommu pages */
2049 if (!iovp_shift) 2046 if (!iovp_shift)
diff --git a/arch/ia64/ia32/sys_ia32.c b/arch/ia64/ia32/sys_ia32.c
index 16ef61a91d95..625ed8f76fce 100644
--- a/arch/ia64/ia32/sys_ia32.c
+++ b/arch/ia64/ia32/sys_ia32.c
@@ -1270,7 +1270,7 @@ putreg (struct task_struct *child, int regno, unsigned int value)
1270 case PT_CS: 1270 case PT_CS:
1271 if (value != __USER_CS) 1271 if (value != __USER_CS)
1272 printk(KERN_ERR 1272 printk(KERN_ERR
1273 "ia32.putreg: attempt to to set invalid segment register %d = %x\n", 1273 "ia32.putreg: attempt to set invalid segment register %d = %x\n",
1274 regno, value); 1274 regno, value);
1275 break; 1275 break;
1276 default: 1276 default:
diff --git a/arch/ia64/include/asm/cputime.h b/arch/ia64/include/asm/cputime.h
index d20b998cb91d..7fa8a8594660 100644
--- a/arch/ia64/include/asm/cputime.h
+++ b/arch/ia64/include/asm/cputime.h
@@ -30,6 +30,7 @@ typedef u64 cputime_t;
30typedef u64 cputime64_t; 30typedef u64 cputime64_t;
31 31
32#define cputime_zero ((cputime_t)0) 32#define cputime_zero ((cputime_t)0)
33#define cputime_one_jiffy jiffies_to_cputime(1)
33#define cputime_max ((~((cputime_t)0) >> 1) - 1) 34#define cputime_max ((~((cputime_t)0) >> 1) - 1)
34#define cputime_add(__a, __b) ((__a) + (__b)) 35#define cputime_add(__a, __b) ((__a) + (__b))
35#define cputime_sub(__a, __b) ((__a) - (__b)) 36#define cputime_sub(__a, __b) ((__a) - (__b))
diff --git a/arch/ia64/include/asm/mca.h b/arch/ia64/include/asm/mca.h
index 44a0b53df900..c171cdf0a789 100644
--- a/arch/ia64/include/asm/mca.h
+++ b/arch/ia64/include/asm/mca.h
@@ -145,12 +145,14 @@ extern void ia64_mca_ucmc_handler(struct pt_regs *, struct ia64_sal_os_state *);
145extern void ia64_init_handler(struct pt_regs *, 145extern void ia64_init_handler(struct pt_regs *,
146 struct switch_stack *, 146 struct switch_stack *,
147 struct ia64_sal_os_state *); 147 struct ia64_sal_os_state *);
148extern void ia64_os_init_on_kdump(void);
148extern void ia64_monarch_init_handler(void); 149extern void ia64_monarch_init_handler(void);
149extern void ia64_slave_init_handler(void); 150extern void ia64_slave_init_handler(void);
150extern void ia64_mca_cmc_vector_setup(void); 151extern void ia64_mca_cmc_vector_setup(void);
151extern int ia64_reg_MCA_extension(int (*fn)(void *, struct ia64_sal_os_state *)); 152extern int ia64_reg_MCA_extension(int (*fn)(void *, struct ia64_sal_os_state *));
152extern void ia64_unreg_MCA_extension(void); 153extern void ia64_unreg_MCA_extension(void);
153extern unsigned long ia64_get_rnat(unsigned long *); 154extern unsigned long ia64_get_rnat(unsigned long *);
155extern void ia64_set_psr_mc(void);
154extern void ia64_mca_printk(const char * fmt, ...) 156extern void ia64_mca_printk(const char * fmt, ...)
155 __attribute__ ((format (printf, 1, 2))); 157 __attribute__ ((format (printf, 1, 2)));
156 158
diff --git a/arch/ia64/include/asm/mman.h b/arch/ia64/include/asm/mman.h
index 48cf8b98a0b4..4459028e5aa8 100644
--- a/arch/ia64/include/asm/mman.h
+++ b/arch/ia64/include/asm/mman.h
@@ -8,19 +8,9 @@
8 * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co 8 * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co
9 */ 9 */
10 10
11#include <asm-generic/mman-common.h> 11#include <asm-generic/mman.h>
12 12
13#define MAP_GROWSDOWN 0x00100 /* stack-like segment */ 13#define MAP_GROWSUP 0x0200 /* register stack-like segment */
14#define MAP_GROWSUP 0x00200 /* register stack-like segment */
15#define MAP_DENYWRITE 0x00800 /* ETXTBSY */
16#define MAP_EXECUTABLE 0x01000 /* mark it as an executable */
17#define MAP_LOCKED 0x02000 /* pages are locked */
18#define MAP_NORESERVE 0x04000 /* don't check for reservations */
19#define MAP_POPULATE 0x08000 /* populate (prefault) pagetables */
20#define MAP_NONBLOCK 0x10000 /* do not block on IO */
21
22#define MCL_CURRENT 1 /* lock all current mappings */
23#define MCL_FUTURE 2 /* lock all future mappings */
24 14
25#ifdef __KERNEL__ 15#ifdef __KERNEL__
26#ifndef __ASSEMBLY__ 16#ifndef __ASSEMBLY__
diff --git a/arch/ia64/include/asm/pci.h b/arch/ia64/include/asm/pci.h
index fcfca56bb850..55281aabe5f2 100644
--- a/arch/ia64/include/asm/pci.h
+++ b/arch/ia64/include/asm/pci.h
@@ -17,7 +17,6 @@
17 * loader. 17 * loader.
18 */ 18 */
19#define pcibios_assign_all_busses() 0 19#define pcibios_assign_all_busses() 0
20#define pcibios_scan_all_fns(a, b) 0
21 20
22#define PCIBIOS_MIN_IO 0x1000 21#define PCIBIOS_MIN_IO 0x1000
23#define PCIBIOS_MIN_MEM 0x10000000 22#define PCIBIOS_MIN_MEM 0x10000000
@@ -135,7 +134,18 @@ extern void pcibios_resource_to_bus(struct pci_dev *dev,
135extern void pcibios_bus_to_resource(struct pci_dev *dev, 134extern void pcibios_bus_to_resource(struct pci_dev *dev,
136 struct resource *res, struct pci_bus_region *region); 135 struct resource *res, struct pci_bus_region *region);
137 136
138#define pcibios_scan_all_fns(a, b) 0 137static inline struct resource *
138pcibios_select_root(struct pci_dev *pdev, struct resource *res)
139{
140 struct resource *root = NULL;
141
142 if (res->flags & IORESOURCE_IO)
143 root = &ioport_resource;
144 if (res->flags & IORESOURCE_MEM)
145 root = &iomem_resource;
146
147 return root;
148}
139 149
140#define HAVE_ARCH_PCI_GET_LEGACY_IDE_IRQ 150#define HAVE_ARCH_PCI_GET_LEGACY_IDE_IRQ
141static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) 151static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
diff --git a/arch/ia64/include/asm/smp.h b/arch/ia64/include/asm/smp.h
index d217d1d4e051..0b3b3997decd 100644
--- a/arch/ia64/include/asm/smp.h
+++ b/arch/ia64/include/asm/smp.h
@@ -127,7 +127,6 @@ extern int is_multithreading_enabled(void);
127 127
128extern void arch_send_call_function_single_ipi(int cpu); 128extern void arch_send_call_function_single_ipi(int cpu);
129extern void arch_send_call_function_ipi_mask(const struct cpumask *mask); 129extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
130#define arch_send_call_function_ipi_mask arch_send_call_function_ipi_mask
131 130
132#else /* CONFIG_SMP */ 131#else /* CONFIG_SMP */
133 132
diff --git a/arch/ia64/include/asm/topology.h b/arch/ia64/include/asm/topology.h
index 7b4c8c70b2d1..3ddb4e709dba 100644
--- a/arch/ia64/include/asm/topology.h
+++ b/arch/ia64/include/asm/topology.h
@@ -33,7 +33,6 @@
33/* 33/*
34 * Returns a bitmask of CPUs on Node 'node'. 34 * Returns a bitmask of CPUs on Node 'node'.
35 */ 35 */
36#define node_to_cpumask(node) (node_to_cpu_mask[node])
37#define cpumask_of_node(node) (&node_to_cpu_mask[node]) 36#define cpumask_of_node(node) (&node_to_cpu_mask[node])
38 37
39/* 38/*
@@ -61,12 +60,13 @@ void build_cpu_to_node_map(void);
61 .cache_nice_tries = 2, \ 60 .cache_nice_tries = 2, \
62 .busy_idx = 2, \ 61 .busy_idx = 2, \
63 .idle_idx = 1, \ 62 .idle_idx = 1, \
64 .newidle_idx = 2, \ 63 .newidle_idx = 0, \
65 .wake_idx = 1, \ 64 .wake_idx = 0, \
66 .forkexec_idx = 1, \ 65 .forkexec_idx = 0, \
67 .flags = SD_LOAD_BALANCE \ 66 .flags = SD_LOAD_BALANCE \
68 | SD_BALANCE_NEWIDLE \ 67 | SD_BALANCE_NEWIDLE \
69 | SD_BALANCE_EXEC \ 68 | SD_BALANCE_EXEC \
69 | SD_BALANCE_FORK \
70 | SD_WAKE_AFFINE, \ 70 | SD_WAKE_AFFINE, \
71 .last_balance = jiffies, \ 71 .last_balance = jiffies, \
72 .balance_interval = 1, \ 72 .balance_interval = 1, \
@@ -85,14 +85,14 @@ void build_cpu_to_node_map(void);
85 .cache_nice_tries = 2, \ 85 .cache_nice_tries = 2, \
86 .busy_idx = 3, \ 86 .busy_idx = 3, \
87 .idle_idx = 2, \ 87 .idle_idx = 2, \
88 .newidle_idx = 2, \ 88 .newidle_idx = 0, \
89 .wake_idx = 1, \ 89 .wake_idx = 0, \
90 .forkexec_idx = 1, \ 90 .forkexec_idx = 0, \
91 .flags = SD_LOAD_BALANCE \ 91 .flags = SD_LOAD_BALANCE \
92 | SD_BALANCE_NEWIDLE \
92 | SD_BALANCE_EXEC \ 93 | SD_BALANCE_EXEC \
93 | SD_BALANCE_FORK \ 94 | SD_BALANCE_FORK \
94 | SD_SERIALIZE \ 95 | SD_SERIALIZE, \
95 | SD_WAKE_BALANCE, \
96 .last_balance = jiffies, \ 96 .last_balance = jiffies, \
97 .balance_interval = 64, \ 97 .balance_interval = 64, \
98 .nr_balance_failed = 0, \ 98 .nr_balance_failed = 0, \
@@ -103,8 +103,6 @@ void build_cpu_to_node_map(void);
103#ifdef CONFIG_SMP 103#ifdef CONFIG_SMP
104#define topology_physical_package_id(cpu) (cpu_data(cpu)->socket_id) 104#define topology_physical_package_id(cpu) (cpu_data(cpu)->socket_id)
105#define topology_core_id(cpu) (cpu_data(cpu)->core_id) 105#define topology_core_id(cpu) (cpu_data(cpu)->core_id)
106#define topology_core_siblings(cpu) (cpu_core_map[cpu])
107#define topology_thread_siblings(cpu) (per_cpu(cpu_sibling_map, cpu))
108#define topology_core_cpumask(cpu) (&cpu_core_map[cpu]) 106#define topology_core_cpumask(cpu) (&cpu_core_map[cpu])
109#define topology_thread_cpumask(cpu) (&per_cpu(cpu_sibling_map, cpu)) 107#define topology_thread_cpumask(cpu) (&per_cpu(cpu_sibling_map, cpu))
110#define smt_capable() (smp_num_siblings > 1) 108#define smt_capable() (smp_num_siblings > 1)
diff --git a/arch/ia64/install.sh b/arch/ia64/install.sh
index 929e780026d1..0e932f5dcd1a 100644
--- a/arch/ia64/install.sh
+++ b/arch/ia64/install.sh
@@ -21,8 +21,8 @@
21 21
22# User may have a custom install script 22# User may have a custom install script
23 23
24if [ -x ~/bin/installkernel ]; then exec ~/bin/installkernel "$@"; fi 24if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi
25if [ -x /sbin/installkernel ]; then exec /sbin/installkernel "$@"; fi 25if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi
26 26
27# Default install - same as make zlilo 27# Default install - same as make zlilo
28 28
diff --git a/arch/ia64/kernel/Makefile.gate b/arch/ia64/kernel/Makefile.gate
index 1d87f84069b3..ab9b03a9adcc 100644
--- a/arch/ia64/kernel/Makefile.gate
+++ b/arch/ia64/kernel/Makefile.gate
@@ -10,7 +10,7 @@ quiet_cmd_gate = GATE $@
10 cmd_gate = $(CC) -nostdlib $(GATECFLAGS_$(@F)) -Wl,-T,$(filter-out FORCE,$^) -o $@ 10 cmd_gate = $(CC) -nostdlib $(GATECFLAGS_$(@F)) -Wl,-T,$(filter-out FORCE,$^) -o $@
11 11
12GATECFLAGS_gate.so = -shared -s -Wl,-soname=linux-gate.so.1 \ 12GATECFLAGS_gate.so = -shared -s -Wl,-soname=linux-gate.so.1 \
13 $(call ld-option, -Wl$(comma)--hash-style=sysv) 13 $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
14$(obj)/gate.so: $(obj)/gate.lds $(obj)/gate.o FORCE 14$(obj)/gate.so: $(obj)/gate.lds $(obj)/gate.o FORCE
15 $(call if_changed,gate) 15 $(call if_changed,gate)
16 16
diff --git a/arch/ia64/kernel/crash.c b/arch/ia64/kernel/crash.c
index f065093f8e9b..6631a9dfafdc 100644
--- a/arch/ia64/kernel/crash.c
+++ b/arch/ia64/kernel/crash.c
@@ -23,6 +23,7 @@
23int kdump_status[NR_CPUS]; 23int kdump_status[NR_CPUS];
24static atomic_t kdump_cpu_frozen; 24static atomic_t kdump_cpu_frozen;
25atomic_t kdump_in_progress; 25atomic_t kdump_in_progress;
26static int kdump_freeze_monarch;
26static int kdump_on_init = 1; 27static int kdump_on_init = 1;
27static int kdump_on_fatal_mca = 1; 28static int kdump_on_fatal_mca = 1;
28 29
@@ -108,10 +109,38 @@ machine_crash_shutdown(struct pt_regs *pt)
108 */ 109 */
109 kexec_disable_iosapic(); 110 kexec_disable_iosapic();
110#ifdef CONFIG_SMP 111#ifdef CONFIG_SMP
112 /*
113 * If kdump_on_init is set and an INIT is asserted here, kdump will
114 * be started again via INIT monarch.
115 */
116 local_irq_disable();
117 ia64_set_psr_mc(); /* mask MCA/INIT */
118 if (atomic_inc_return(&kdump_in_progress) != 1)
119 unw_init_running(kdump_cpu_freeze, NULL);
120
121 /*
122 * Now this cpu is ready for kdump.
123 * Stop all others by IPI or INIT. They could receive INIT from
124 * outside and might be INIT monarch, but only thing they have to
125 * do is falling into kdump_cpu_freeze().
126 *
127 * If an INIT is asserted here:
128 * - All receivers might be slaves, since some of cpus could already
129 * be frozen and INIT might be masked on monarch. In this case,
130 * all slaves will be frozen soon since kdump_in_progress will let
131 * them into DIE_INIT_SLAVE_LEAVE.
132 * - One might be a monarch, but INIT rendezvous will fail since
133 * at least this cpu already have INIT masked so it never join
134 * to the rendezvous. In this case, all slaves and monarch will
135 * be frozen soon with no wait since the INIT rendezvous is skipped
136 * by kdump_in_progress.
137 */
111 kdump_smp_send_stop(); 138 kdump_smp_send_stop();
112 /* not all cpu response to IPI, send INIT to freeze them */ 139 /* not all cpu response to IPI, send INIT to freeze them */
113 if (kdump_wait_cpu_freeze() && kdump_on_init) { 140 if (kdump_wait_cpu_freeze()) {
114 kdump_smp_send_init(); 141 kdump_smp_send_init();
142 /* wait again, don't go ahead if possible */
143 kdump_wait_cpu_freeze();
115 } 144 }
116#endif 145#endif
117} 146}
@@ -129,17 +158,17 @@ void
129kdump_cpu_freeze(struct unw_frame_info *info, void *arg) 158kdump_cpu_freeze(struct unw_frame_info *info, void *arg)
130{ 159{
131 int cpuid; 160 int cpuid;
161
132 local_irq_disable(); 162 local_irq_disable();
133 cpuid = smp_processor_id(); 163 cpuid = smp_processor_id();
134 crash_save_this_cpu(); 164 crash_save_this_cpu();
135 current->thread.ksp = (__u64)info->sw - 16; 165 current->thread.ksp = (__u64)info->sw - 16;
166
167 ia64_set_psr_mc(); /* mask MCA/INIT and stop reentrance */
168
136 atomic_inc(&kdump_cpu_frozen); 169 atomic_inc(&kdump_cpu_frozen);
137 kdump_status[cpuid] = 1; 170 kdump_status[cpuid] = 1;
138 mb(); 171 mb();
139#ifdef CONFIG_HOTPLUG_CPU
140 if (cpuid != 0)
141 ia64_jump_to_sal(&sal_boot_rendez_state[cpuid]);
142#endif
143 for (;;) 172 for (;;)
144 cpu_relax(); 173 cpu_relax();
145} 174}
@@ -150,6 +179,20 @@ kdump_init_notifier(struct notifier_block *self, unsigned long val, void *data)
150 struct ia64_mca_notify_die *nd; 179 struct ia64_mca_notify_die *nd;
151 struct die_args *args = data; 180 struct die_args *args = data;
152 181
182 if (atomic_read(&kdump_in_progress)) {
183 switch (val) {
184 case DIE_INIT_MONARCH_LEAVE:
185 if (!kdump_freeze_monarch)
186 break;
187 /* fall through */
188 case DIE_INIT_SLAVE_LEAVE:
189 case DIE_INIT_MONARCH_ENTER:
190 case DIE_MCA_RENDZVOUS_LEAVE:
191 unw_init_running(kdump_cpu_freeze, NULL);
192 break;
193 }
194 }
195
153 if (!kdump_on_init && !kdump_on_fatal_mca) 196 if (!kdump_on_init && !kdump_on_fatal_mca)
154 return NOTIFY_DONE; 197 return NOTIFY_DONE;
155 198
@@ -162,43 +205,31 @@ kdump_init_notifier(struct notifier_block *self, unsigned long val, void *data)
162 } 205 }
163 206
164 if (val != DIE_INIT_MONARCH_LEAVE && 207 if (val != DIE_INIT_MONARCH_LEAVE &&
165 val != DIE_INIT_SLAVE_LEAVE &&
166 val != DIE_INIT_MONARCH_PROCESS && 208 val != DIE_INIT_MONARCH_PROCESS &&
167 val != DIE_MCA_RENDZVOUS_LEAVE &&
168 val != DIE_MCA_MONARCH_LEAVE) 209 val != DIE_MCA_MONARCH_LEAVE)
169 return NOTIFY_DONE; 210 return NOTIFY_DONE;
170 211
171 nd = (struct ia64_mca_notify_die *)args->err; 212 nd = (struct ia64_mca_notify_die *)args->err;
172 /* Reason code 1 means machine check rendezvous*/
173 if ((val == DIE_INIT_MONARCH_LEAVE || val == DIE_INIT_SLAVE_LEAVE
174 || val == DIE_INIT_MONARCH_PROCESS) && nd->sos->rv_rc == 1)
175 return NOTIFY_DONE;
176 213
177 switch (val) { 214 switch (val) {
178 case DIE_INIT_MONARCH_PROCESS: 215 case DIE_INIT_MONARCH_PROCESS:
179 if (kdump_on_init) { 216 /* Reason code 1 means machine check rendezvous*/
180 atomic_set(&kdump_in_progress, 1); 217 if (kdump_on_init && (nd->sos->rv_rc != 1)) {
181 *(nd->monarch_cpu) = -1; 218 if (atomic_inc_return(&kdump_in_progress) != 1)
219 kdump_freeze_monarch = 1;
182 } 220 }
183 break; 221 break;
184 case DIE_INIT_MONARCH_LEAVE: 222 case DIE_INIT_MONARCH_LEAVE:
185 if (kdump_on_init) 223 /* Reason code 1 means machine check rendezvous*/
224 if (kdump_on_init && (nd->sos->rv_rc != 1))
186 machine_kdump_on_init(); 225 machine_kdump_on_init();
187 break; 226 break;
188 case DIE_INIT_SLAVE_LEAVE:
189 if (atomic_read(&kdump_in_progress))
190 unw_init_running(kdump_cpu_freeze, NULL);
191 break;
192 case DIE_MCA_RENDZVOUS_LEAVE:
193 if (atomic_read(&kdump_in_progress))
194 unw_init_running(kdump_cpu_freeze, NULL);
195 break;
196 case DIE_MCA_MONARCH_LEAVE: 227 case DIE_MCA_MONARCH_LEAVE:
197 /* *(nd->data) indicate if MCA is recoverable */ 228 /* *(nd->data) indicate if MCA is recoverable */
198 if (kdump_on_fatal_mca && !(*(nd->data))) { 229 if (kdump_on_fatal_mca && !(*(nd->data))) {
199 atomic_set(&kdump_in_progress, 1); 230 if (atomic_inc_return(&kdump_in_progress) == 1)
200 *(nd->monarch_cpu) = -1; 231 machine_kdump_on_init();
201 machine_kdump_on_init(); 232 /* We got fatal MCA while kdump!? No way!! */
202 } 233 }
203 break; 234 break;
204 } 235 }
diff --git a/arch/ia64/kernel/head.S b/arch/ia64/kernel/head.S
index e6c5c3d5e1f8..1a6e44515eb4 100644
--- a/arch/ia64/kernel/head.S
+++ b/arch/ia64/kernel/head.S
@@ -34,7 +34,6 @@
34#include <asm/mca_asm.h> 34#include <asm/mca_asm.h>
35#include <linux/init.h> 35#include <linux/init.h>
36#include <linux/linkage.h> 36#include <linux/linkage.h>
37#include "head.h"
38 37
39#ifdef CONFIG_HOTPLUG_CPU 38#ifdef CONFIG_HOTPLUG_CPU
40#define SAL_PSR_BITS_TO_SET \ 39#define SAL_PSR_BITS_TO_SET \
@@ -168,7 +167,7 @@ RestRR: \
168 mov _tmp2=((ia64_rid(IA64_REGION_ID_KERNEL, (num<<61)) << 8) | (pgsize << 2) | vhpt);; \ 167 mov _tmp2=((ia64_rid(IA64_REGION_ID_KERNEL, (num<<61)) << 8) | (pgsize << 2) | vhpt);; \
169 mov rr[_tmp1]=_tmp2 168 mov rr[_tmp1]=_tmp2
170 169
171 .section __special_page_section,"ax" 170 __PAGE_ALIGNED_DATA
172 171
173 .global empty_zero_page 172 .global empty_zero_page
174empty_zero_page: 173empty_zero_page:
@@ -182,7 +181,7 @@ swapper_pg_dir:
182halt_msg: 181halt_msg:
183 stringz "Halting kernel\n" 182 stringz "Halting kernel\n"
184 183
185 .section .text.head,"ax" 184 __REF
186 185
187 .global start_ap 186 .global start_ap
188 187
@@ -1243,7 +1242,7 @@ GLOBAL_ENTRY(ia64_jump_to_sal)
1243 movl r16=SAL_PSR_BITS_TO_SET;; 1242 movl r16=SAL_PSR_BITS_TO_SET;;
1244 mov cr.ipsr=r16 1243 mov cr.ipsr=r16
1245 mov cr.ifs=r0;; 1244 mov cr.ifs=r0;;
1246 rfi;; 1245 rfi;; // note: this unmask MCA/INIT (psr.mc)
12471: 12461:
1248 /* 1247 /*
1249 * Invalidate all TLB data/inst 1248 * Invalidate all TLB data/inst
diff --git a/arch/ia64/kernel/head.h b/arch/ia64/kernel/head.h
deleted file mode 100644
index 2e2ac6824e65..000000000000
--- a/arch/ia64/kernel/head.h
+++ /dev/null
@@ -1 +0,0 @@
1extern void console_print(const char *s);
diff --git a/arch/ia64/kernel/init_task.c b/arch/ia64/kernel/init_task.c
index c475fc281be7..e253ab8fcbc8 100644
--- a/arch/ia64/kernel/init_task.c
+++ b/arch/ia64/kernel/init_task.c
@@ -33,7 +33,8 @@ union {
33 struct thread_info thread_info; 33 struct thread_info thread_info;
34 } s; 34 } s;
35 unsigned long stack[KERNEL_STACK_SIZE/sizeof (unsigned long)]; 35 unsigned long stack[KERNEL_STACK_SIZE/sizeof (unsigned long)];
36} init_task_mem asm ("init_task") __attribute__((section(".data.init_task"))) = {{ 36} init_task_mem asm ("init_task") __init_task_data =
37 {{
37 .task = INIT_TASK(init_task_mem.s.task), 38 .task = INIT_TASK(init_task_mem.s.task),
38 .thread_info = INIT_THREAD_INFO(init_task_mem.s.task) 39 .thread_info = INIT_THREAD_INFO(init_task_mem.s.task)
39}}; 40}};
diff --git a/arch/ia64/kernel/machine_kexec.c b/arch/ia64/kernel/machine_kexec.c
index 0823de1f6ebe..3d3aeef46947 100644
--- a/arch/ia64/kernel/machine_kexec.c
+++ b/arch/ia64/kernel/machine_kexec.c
@@ -24,6 +24,8 @@
24#include <asm/delay.h> 24#include <asm/delay.h>
25#include <asm/meminit.h> 25#include <asm/meminit.h>
26#include <asm/processor.h> 26#include <asm/processor.h>
27#include <asm/sal.h>
28#include <asm/mca.h>
27 29
28typedef NORET_TYPE void (*relocate_new_kernel_t)( 30typedef NORET_TYPE void (*relocate_new_kernel_t)(
29 unsigned long indirection_page, 31 unsigned long indirection_page,
@@ -85,13 +87,26 @@ static void ia64_machine_kexec(struct unw_frame_info *info, void *arg)
85 void *pal_addr = efi_get_pal_addr(); 87 void *pal_addr = efi_get_pal_addr();
86 unsigned long code_addr = (unsigned long)page_address(image->control_code_page); 88 unsigned long code_addr = (unsigned long)page_address(image->control_code_page);
87 int ii; 89 int ii;
90 u64 fp, gp;
91 ia64_fptr_t *init_handler = (ia64_fptr_t *)ia64_os_init_on_kdump;
88 92
89 BUG_ON(!image); 93 BUG_ON(!image);
90 if (image->type == KEXEC_TYPE_CRASH) { 94 if (image->type == KEXEC_TYPE_CRASH) {
91 crash_save_this_cpu(); 95 crash_save_this_cpu();
92 current->thread.ksp = (__u64)info->sw - 16; 96 current->thread.ksp = (__u64)info->sw - 16;
97
98 /* Register noop init handler */
99 fp = ia64_tpa(init_handler->fp);
100 gp = ia64_tpa(ia64_getreg(_IA64_REG_GP));
101 ia64_sal_set_vectors(SAL_VECTOR_OS_INIT, fp, gp, 0, fp, gp, 0);
102 } else {
103 /* Unregister init handlers of current kernel */
104 ia64_sal_set_vectors(SAL_VECTOR_OS_INIT, 0, 0, 0, 0, 0, 0);
93 } 105 }
94 106
107 /* Unregister mca handler - No more recovery on current kernel */
108 ia64_sal_set_vectors(SAL_VECTOR_OS_MCA, 0, 0, 0, 0, 0, 0);
109
95 /* Interrupts aren't acceptable while we reboot */ 110 /* Interrupts aren't acceptable while we reboot */
96 local_irq_disable(); 111 local_irq_disable();
97 112
diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c
index 7b30d21c5190..d2877a7bfe2e 100644
--- a/arch/ia64/kernel/mca.c
+++ b/arch/ia64/kernel/mca.c
@@ -1682,14 +1682,25 @@ ia64_init_handler(struct pt_regs *regs, struct switch_stack *sw,
1682 1682
1683 if (!sos->monarch) { 1683 if (!sos->monarch) {
1684 ia64_mc_info.imi_rendez_checkin[cpu] = IA64_MCA_RENDEZ_CHECKIN_INIT; 1684 ia64_mc_info.imi_rendez_checkin[cpu] = IA64_MCA_RENDEZ_CHECKIN_INIT;
1685
1686#ifdef CONFIG_KEXEC
1687 while (monarch_cpu == -1 && !atomic_read(&kdump_in_progress))
1688 udelay(1000);
1689#else
1685 while (monarch_cpu == -1) 1690 while (monarch_cpu == -1)
1686 cpu_relax(); /* spin until monarch enters */ 1691 cpu_relax(); /* spin until monarch enters */
1692#endif
1687 1693
1688 NOTIFY_INIT(DIE_INIT_SLAVE_ENTER, regs, (long)&nd, 1); 1694 NOTIFY_INIT(DIE_INIT_SLAVE_ENTER, regs, (long)&nd, 1);
1689 NOTIFY_INIT(DIE_INIT_SLAVE_PROCESS, regs, (long)&nd, 1); 1695 NOTIFY_INIT(DIE_INIT_SLAVE_PROCESS, regs, (long)&nd, 1);
1690 1696
1697#ifdef CONFIG_KEXEC
1698 while (monarch_cpu != -1 && !atomic_read(&kdump_in_progress))
1699 udelay(1000);
1700#else
1691 while (monarch_cpu != -1) 1701 while (monarch_cpu != -1)
1692 cpu_relax(); /* spin until monarch leaves */ 1702 cpu_relax(); /* spin until monarch leaves */
1703#endif
1693 1704
1694 NOTIFY_INIT(DIE_INIT_SLAVE_LEAVE, regs, (long)&nd, 1); 1705 NOTIFY_INIT(DIE_INIT_SLAVE_LEAVE, regs, (long)&nd, 1);
1695 1706
diff --git a/arch/ia64/kernel/mca_asm.S b/arch/ia64/kernel/mca_asm.S
index a06d46548ff9..7461d2573d41 100644
--- a/arch/ia64/kernel/mca_asm.S
+++ b/arch/ia64/kernel/mca_asm.S
@@ -40,6 +40,7 @@
40 40
41 .global ia64_do_tlb_purge 41 .global ia64_do_tlb_purge
42 .global ia64_os_mca_dispatch 42 .global ia64_os_mca_dispatch
43 .global ia64_os_init_on_kdump
43 .global ia64_os_init_dispatch_monarch 44 .global ia64_os_init_dispatch_monarch
44 .global ia64_os_init_dispatch_slave 45 .global ia64_os_init_dispatch_slave
45 46
@@ -299,6 +300,25 @@ END(ia64_os_mca_virtual_begin)
299//StartMain//////////////////////////////////////////////////////////////////// 300//StartMain////////////////////////////////////////////////////////////////////
300 301
301// 302//
303// NOP init handler for kdump. In panic situation, we may receive INIT
304// while kernel transition. Since we initialize registers on leave from
305// current kernel, no longer monarch/slave handlers of current kernel in
306// virtual mode are called safely.
307// We can unregister these init handlers from SAL, however then the INIT
308// will result in warmboot by SAL and we cannot retrieve the crashdump.
309// Therefore register this NOP function to SAL, to prevent entering virtual
310// mode and resulting warmboot by SAL.
311//
312ia64_os_init_on_kdump:
313 mov r8=r0 // IA64_INIT_RESUME
314 mov r9=r10 // SAL_GP
315 mov r22=r17 // *minstate
316 ;;
317 mov r10=r0 // return to same context
318 mov b0=r12 // SAL_CHECK return address
319 br b0
320
321//
302// SAL to OS entry point for INIT on all processors. This has been defined for 322// SAL to OS entry point for INIT on all processors. This has been defined for
303// registration purposes with SAL as a part of ia64_mca_init. Monarch and 323// registration purposes with SAL as a part of ia64_mca_init. Monarch and
304// slave INIT have identical processing, except for the value of the 324// slave INIT have identical processing, except for the value of the
@@ -1073,3 +1093,30 @@ GLOBAL_ENTRY(ia64_get_rnat)
1073 mov ar.rsc=3 1093 mov ar.rsc=3
1074 br.ret.sptk.many rp 1094 br.ret.sptk.many rp
1075END(ia64_get_rnat) 1095END(ia64_get_rnat)
1096
1097
1098// void ia64_set_psr_mc(void)
1099//
1100// Set psr.mc bit to mask MCA/INIT.
1101GLOBAL_ENTRY(ia64_set_psr_mc)
1102 rsm psr.i | psr.ic // disable interrupts
1103 ;;
1104 srlz.d
1105 ;;
1106 mov r14 = psr // get psr{36:35,31:0}
1107 movl r15 = 1f
1108 ;;
1109 dep r14 = -1, r14, PSR_MC, 1 // set psr.mc
1110 ;;
1111 dep r14 = -1, r14, PSR_IC, 1 // set psr.ic
1112 ;;
1113 dep r14 = -1, r14, PSR_BN, 1 // keep bank1 in use
1114 ;;
1115 mov cr.ipsr = r14
1116 mov cr.ifs = r0
1117 mov cr.iip = r15
1118 ;;
1119 rfi
11201:
1121 br.ret.sptk.many rp
1122END(ia64_set_psr_mc)
diff --git a/arch/ia64/kernel/pci-swiotlb.c b/arch/ia64/kernel/pci-swiotlb.c
index 223abb134105..285aae8431c6 100644
--- a/arch/ia64/kernel/pci-swiotlb.c
+++ b/arch/ia64/kernel/pci-swiotlb.c
@@ -46,7 +46,7 @@ void __init swiotlb_dma_init(void)
46 46
47void __init pci_swiotlb_init(void) 47void __init pci_swiotlb_init(void)
48{ 48{
49 if (!iommu_detected || iommu_pass_through) { 49 if (!iommu_detected) {
50#ifdef CONFIG_IA64_GENERIC 50#ifdef CONFIG_IA64_GENERIC
51 swiotlb = 1; 51 swiotlb = 1;
52 printk(KERN_INFO "PCI-DMA: Re-initialize machine vector.\n"); 52 printk(KERN_INFO "PCI-DMA: Re-initialize machine vector.\n");
diff --git a/arch/ia64/kernel/relocate_kernel.S b/arch/ia64/kernel/relocate_kernel.S
index 903babd22d62..32f6fc131fbe 100644
--- a/arch/ia64/kernel/relocate_kernel.S
+++ b/arch/ia64/kernel/relocate_kernel.S
@@ -52,7 +52,7 @@ GLOBAL_ENTRY(relocate_new_kernel)
52 srlz.i 52 srlz.i
53 ;; 53 ;;
54 mov ar.rnat=r18 54 mov ar.rnat=r18
55 rfi 55 rfi // note: this unmask MCA/INIT (psr.mc)
56 ;; 56 ;;
571: 571:
58 //physical mode code begin 58 //physical mode code begin
diff --git a/arch/ia64/kernel/smp.c b/arch/ia64/kernel/smp.c
index 93ebfea43c6c..dabeefe21134 100644
--- a/arch/ia64/kernel/smp.c
+++ b/arch/ia64/kernel/smp.c
@@ -302,7 +302,7 @@ smp_flush_tlb_mm (struct mm_struct *mm)
302 return; 302 return;
303 } 303 }
304 304
305 smp_call_function_mask(mm->cpu_vm_mask, 305 smp_call_function_many(mm_cpumask(mm),
306 (void (*)(void *))local_finish_flush_tlb_mm, mm, 1); 306 (void (*)(void *))local_finish_flush_tlb_mm, mm, 1);
307 local_irq_disable(); 307 local_irq_disable();
308 local_finish_flush_tlb_mm(mm); 308 local_finish_flush_tlb_mm(mm);
diff --git a/arch/ia64/kernel/vmlinux.lds.S b/arch/ia64/kernel/vmlinux.lds.S
index eb4214d1c5af..0a0c77b2c988 100644
--- a/arch/ia64/kernel/vmlinux.lds.S
+++ b/arch/ia64/kernel/vmlinux.lds.S
@@ -51,8 +51,6 @@ SECTIONS
51 KPROBES_TEXT 51 KPROBES_TEXT
52 *(.gnu.linkonce.t*) 52 *(.gnu.linkonce.t*)
53 } 53 }
54 .text.head : AT(ADDR(.text.head) - LOAD_OFFSET)
55 { *(.text.head) }
56 .text2 : AT(ADDR(.text2) - LOAD_OFFSET) 54 .text2 : AT(ADDR(.text2) - LOAD_OFFSET)
57 { *(.text2) } 55 { *(.text2) }
58#ifdef CONFIG_SMP 56#ifdef CONFIG_SMP
@@ -66,14 +64,7 @@ SECTIONS
66 NOTES :code :note /* put .notes in text and mark in PT_NOTE */ 64 NOTES :code :note /* put .notes in text and mark in PT_NOTE */
67 code_continues : {} :code /* switch back to regular program... */ 65 code_continues : {} :code /* switch back to regular program... */
68 66
69 /* Exception table */ 67 EXCEPTION_TABLE(16)
70 . = ALIGN(16);
71 __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET)
72 {
73 __start___ex_table = .;
74 *(__ex_table)
75 __stop___ex_table = .;
76 }
77 68
78 /* MCA table */ 69 /* MCA table */
79 . = ALIGN(16); 70 . = ALIGN(16);
@@ -115,38 +106,9 @@ SECTIONS
115 106
116 . = ALIGN(PAGE_SIZE); 107 . = ALIGN(PAGE_SIZE);
117 __init_begin = .; 108 __init_begin = .;
118 .init.text : AT(ADDR(.init.text) - LOAD_OFFSET)
119 {
120 _sinittext = .;
121 INIT_TEXT
122 _einittext = .;
123 }
124
125 .init.data : AT(ADDR(.init.data) - LOAD_OFFSET)
126 { INIT_DATA }
127 109
128#ifdef CONFIG_BLK_DEV_INITRD 110 INIT_TEXT_SECTION(PAGE_SIZE)
129 .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) 111 INIT_DATA_SECTION(16)
130 {
131 __initramfs_start = .;
132 *(.init.ramfs)
133 __initramfs_end = .;
134 }
135#endif
136
137 . = ALIGN(16);
138 .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET)
139 {
140 __setup_start = .;
141 *(.init.setup)
142 __setup_end = .;
143 }
144 .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET)
145 {
146 __initcall_start = .;
147 INITCALLS
148 __initcall_end = .;
149 }
150 112
151 .data.patch.vtop : AT(ADDR(.data.patch.vtop) - LOAD_OFFSET) 113 .data.patch.vtop : AT(ADDR(.data.patch.vtop) - LOAD_OFFSET)
152 { 114 {
@@ -204,24 +166,13 @@ SECTIONS
204 } 166 }
205#endif 167#endif
206 168
207 . = ALIGN(8);
208 __con_initcall_start = .;
209 .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET)
210 { *(.con_initcall.init) }
211 __con_initcall_end = .;
212 __security_initcall_start = .;
213 .security_initcall.init : AT(ADDR(.security_initcall.init) - LOAD_OFFSET)
214 { *(.security_initcall.init) }
215 __security_initcall_end = .;
216 . = ALIGN(PAGE_SIZE); 169 . = ALIGN(PAGE_SIZE);
217 __init_end = .; 170 __init_end = .;
218 171
219 /* The initial task and kernel stack */
220 .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET)
221 { *(.data.init_task) }
222
223 .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) 172 .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET)
224 { *(__special_page_section) 173 {
174 PAGE_ALIGNED_DATA(PAGE_SIZE)
175 . = ALIGN(PAGE_SIZE);
225 __start_gate_section = .; 176 __start_gate_section = .;
226 *(.data.gate) 177 *(.data.gate)
227 __stop_gate_section = .; 178 __stop_gate_section = .;
@@ -236,12 +187,6 @@ SECTIONS
236 * kernel data 187 * kernel data
237 */ 188 */
238 189
239 .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET)
240 { *(.data.read_mostly) }
241
242 .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET)
243 { *(.data.cacheline_aligned) }
244
245 /* Per-cpu data: */ 190 /* Per-cpu data: */
246 . = ALIGN(PERCPU_PAGE_SIZE); 191 . = ALIGN(PERCPU_PAGE_SIZE);
247 PERCPU_VADDR(PERCPU_ADDR, :percpu) 192 PERCPU_VADDR(PERCPU_ADDR, :percpu)
@@ -258,6 +203,9 @@ SECTIONS
258 __cpu0_per_cpu = .; 203 __cpu0_per_cpu = .;
259 . = . + PERCPU_PAGE_SIZE; /* cpu0 per-cpu space */ 204 . = . + PERCPU_PAGE_SIZE; /* cpu0 per-cpu space */
260#endif 205#endif
206 INIT_TASK_DATA(PAGE_SIZE)
207 CACHELINE_ALIGNED_DATA(SMP_CACHE_BYTES)
208 READ_MOSTLY_DATA(SMP_CACHE_BYTES)
261 DATA_DATA 209 DATA_DATA
262 *(.data1) 210 *(.data1)
263 *(.gnu.linkonce.d*) 211 *(.gnu.linkonce.d*)
@@ -274,48 +222,15 @@ SECTIONS
274 .sdata : AT(ADDR(.sdata) - LOAD_OFFSET) 222 .sdata : AT(ADDR(.sdata) - LOAD_OFFSET)
275 { *(.sdata) *(.sdata1) *(.srdata) } 223 { *(.sdata) *(.sdata1) *(.srdata) }
276 _edata = .; 224 _edata = .;
277 __bss_start = .; 225
278 .sbss : AT(ADDR(.sbss) - LOAD_OFFSET) 226 BSS_SECTION(0, 0, 0)
279 { *(.sbss) *(.scommon) }
280 .bss : AT(ADDR(.bss) - LOAD_OFFSET)
281 { *(.bss) *(COMMON) }
282 __bss_stop = .;
283 227
284 _end = .; 228 _end = .;
285 229
286 code : { } :code 230 code : { } :code
287 /* Stabs debugging sections. */ 231
288 .stab 0 : { *(.stab) } 232 STABS_DEBUG
289 .stabstr 0 : { *(.stabstr) } 233 DWARF_DEBUG
290 .stab.excl 0 : { *(.stab.excl) }
291 .stab.exclstr 0 : { *(.stab.exclstr) }
292 .stab.index 0 : { *(.stab.index) }
293 .stab.indexstr 0 : { *(.stab.indexstr) }
294 /* DWARF debug sections.
295 Symbols in the DWARF debugging sections are relative to the beginning
296 of the section so we begin them at 0. */
297 /* DWARF 1 */
298 .debug 0 : { *(.debug) }
299 .line 0 : { *(.line) }
300 /* GNU DWARF 1 extensions */
301 .debug_srcinfo 0 : { *(.debug_srcinfo) }
302 .debug_sfnames 0 : { *(.debug_sfnames) }
303 /* DWARF 1.1 and DWARF 2 */
304 .debug_aranges 0 : { *(.debug_aranges) }
305 .debug_pubnames 0 : { *(.debug_pubnames) }
306 /* DWARF 2 */
307 .debug_info 0 : { *(.debug_info) }
308 .debug_abbrev 0 : { *(.debug_abbrev) }
309 .debug_line 0 : { *(.debug_line) }
310 .debug_frame 0 : { *(.debug_frame) }
311 .debug_str 0 : { *(.debug_str) }
312 .debug_loc 0 : { *(.debug_loc) }
313 .debug_macinfo 0 : { *(.debug_macinfo) }
314 /* SGI/MIPS DWARF 2 extensions */
315 .debug_weaknames 0 : { *(.debug_weaknames) }
316 .debug_funcnames 0 : { *(.debug_funcnames) }
317 .debug_typenames 0 : { *(.debug_typenames) }
318 .debug_varnames 0 : { *(.debug_varnames) }
319 234
320 /* Default discards */ 235 /* Default discards */
321 DISCARDS 236 DISCARDS
diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c
index b115b3bbf04a..1857766a63c1 100644
--- a/arch/ia64/mm/init.c
+++ b/arch/ia64/mm/init.c
@@ -617,7 +617,6 @@ mem_init (void)
617 long reserved_pages, codesize, datasize, initsize; 617 long reserved_pages, codesize, datasize, initsize;
618 pg_data_t *pgdat; 618 pg_data_t *pgdat;
619 int i; 619 int i;
620 static struct kcore_list kcore_mem, kcore_vmem, kcore_kernel;
621 620
622 BUG_ON(PTRS_PER_PGD * sizeof(pgd_t) != PAGE_SIZE); 621 BUG_ON(PTRS_PER_PGD * sizeof(pgd_t) != PAGE_SIZE);
623 BUG_ON(PTRS_PER_PMD * sizeof(pmd_t) != PAGE_SIZE); 622 BUG_ON(PTRS_PER_PMD * sizeof(pmd_t) != PAGE_SIZE);
@@ -639,10 +638,6 @@ mem_init (void)
639 638
640 high_memory = __va(max_low_pfn * PAGE_SIZE); 639 high_memory = __va(max_low_pfn * PAGE_SIZE);
641 640
642 kclist_add(&kcore_mem, __va(0), max_low_pfn * PAGE_SIZE);
643 kclist_add(&kcore_vmem, (void *)VMALLOC_START, VMALLOC_END-VMALLOC_START);
644 kclist_add(&kcore_kernel, _stext, _end - _stext);
645
646 for_each_online_pgdat(pgdat) 641 for_each_online_pgdat(pgdat)
647 if (pgdat->bdata->node_bootmem_map) 642 if (pgdat->bdata->node_bootmem_map)
648 totalram_pages += free_all_bootmem_node(pgdat); 643 totalram_pages += free_all_bootmem_node(pgdat);
@@ -655,7 +650,7 @@ mem_init (void)
655 initsize = (unsigned long) __init_end - (unsigned long) __init_begin; 650 initsize = (unsigned long) __init_end - (unsigned long) __init_begin;
656 651
657 printk(KERN_INFO "Memory: %luk/%luk available (%luk code, %luk reserved, " 652 printk(KERN_INFO "Memory: %luk/%luk available (%luk code, %luk reserved, "
658 "%luk data, %luk init)\n", (unsigned long) nr_free_pages() << (PAGE_SHIFT - 10), 653 "%luk data, %luk init)\n", nr_free_pages() << (PAGE_SHIFT - 10),
659 num_physpages << (PAGE_SHIFT - 10), codesize >> 10, 654 num_physpages << (PAGE_SHIFT - 10), codesize >> 10,
660 reserved_pages << (PAGE_SHIFT - 10), datasize >> 10, initsize >> 10); 655 reserved_pages << (PAGE_SHIFT - 10), datasize >> 10, initsize >> 10);
661 656
diff --git a/arch/ia64/sn/pci/pcibr/pcibr_ate.c b/arch/ia64/sn/pci/pcibr/pcibr_ate.c
index 239b3cedcf2b..5bc34eac9e01 100644
--- a/arch/ia64/sn/pci/pcibr/pcibr_ate.c
+++ b/arch/ia64/sn/pci/pcibr/pcibr_ate.c
@@ -54,6 +54,8 @@ static int find_free_ate(struct ate_resource *ate_resource, int start,
54 break; 54 break;
55 } 55 }
56 } 56 }
57 if (i >= ate_resource->num_ate)
58 return -1;
57 } else 59 } else
58 index++; /* Try next ate */ 60 index++; /* Try next ate */
59 } 61 }
diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig
index cabba332cc48..c41234f1b825 100644
--- a/arch/m32r/Kconfig
+++ b/arch/m32r/Kconfig
@@ -41,6 +41,12 @@ config HZ
41 int 41 int
42 default 100 42 default 100
43 43
44config GENERIC_TIME
45 def_bool y
46
47config ARCH_USES_GETTIMEOFFSET
48 def_bool y
49
44source "init/Kconfig" 50source "init/Kconfig"
45 51
46source "kernel/Kconfig.freezer" 52source "kernel/Kconfig.freezer"
diff --git a/arch/m32r/boot/compressed/install.sh b/arch/m32r/boot/compressed/install.sh
index 6d72e9e72697..16e5a0a13437 100644
--- a/arch/m32r/boot/compressed/install.sh
+++ b/arch/m32r/boot/compressed/install.sh
@@ -24,8 +24,8 @@
24 24
25# User may have a custom install script 25# User may have a custom install script
26 26
27if [ -x /sbin/installkernel ]; then 27if [ -x /sbin/${INSTALLKERNEL} ]; then
28 exec /sbin/installkernel "$@" 28 exec /sbin/${INSTALLKERNEL} "$@"
29fi 29fi
30 30
31if [ "$2" = "zImage" ]; then 31if [ "$2" = "zImage" ]; then
diff --git a/arch/m32r/include/asm/hardirq.h b/arch/m32r/include/asm/hardirq.h
index cb8aa762f235..4c31c0ae215e 100644
--- a/arch/m32r/include/asm/hardirq.h
+++ b/arch/m32r/include/asm/hardirq.h
@@ -2,14 +2,7 @@
2#ifndef __ASM_HARDIRQ_H 2#ifndef __ASM_HARDIRQ_H
3#define __ASM_HARDIRQ_H 3#define __ASM_HARDIRQ_H
4 4
5#include <linux/threads.h> 5#include <asm/irq.h>
6#include <linux/irq.h>
7
8typedef struct {
9 unsigned int __softirq_pending;
10} ____cacheline_aligned irq_cpustat_t;
11
12#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
13 6
14#if NR_IRQS > 256 7#if NR_IRQS > 256
15#define HARDIRQ_BITS 9 8#define HARDIRQ_BITS 9
@@ -26,11 +19,7 @@ typedef struct {
26# error HARDIRQ_BITS is too low! 19# error HARDIRQ_BITS is too low!
27#endif 20#endif
28 21
29static inline void ack_bad_irq(int irq) 22#include <asm-generic/hardirq.h>
30{
31 printk(KERN_CRIT "unexpected IRQ trap at vector %02x\n", irq);
32 BUG();
33}
34 23
35#endif /* __ASM_HARDIRQ_H */ 24#endif /* __ASM_HARDIRQ_H */
36#endif /* __KERNEL__ */ 25#endif /* __KERNEL__ */
diff --git a/arch/m32r/include/asm/mman.h b/arch/m32r/include/asm/mman.h
index 04a5f40aa401..8eebf89f5ab1 100644
--- a/arch/m32r/include/asm/mman.h
+++ b/arch/m32r/include/asm/mman.h
@@ -1,17 +1 @@
1#ifndef __M32R_MMAN_H__ #include <asm-generic/mman.h>
2#define __M32R_MMAN_H__
3
4#include <asm-generic/mman-common.h>
5
6#define MAP_GROWSDOWN 0x0100 /* stack-like segment */
7#define MAP_DENYWRITE 0x0800 /* ETXTBSY */
8#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */
9#define MAP_LOCKED 0x2000 /* pages are locked */
10#define MAP_NORESERVE 0x4000 /* don't check for reservations */
11#define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */
12#define MAP_NONBLOCK 0x10000 /* do not block on IO */
13
14#define MCL_CURRENT 1 /* lock all current mappings */
15#define MCL_FUTURE 2 /* lock all future mappings */
16
17#endif /* __M32R_MMAN_H__ */
diff --git a/arch/m32r/include/asm/mmu_context.h b/arch/m32r/include/asm/mmu_context.h
index 91909e5dd9d0..a70a3df33635 100644
--- a/arch/m32r/include/asm/mmu_context.h
+++ b/arch/m32r/include/asm/mmu_context.h
@@ -127,7 +127,7 @@ static inline void switch_mm(struct mm_struct *prev,
127 127
128 if (prev != next) { 128 if (prev != next) {
129#ifdef CONFIG_SMP 129#ifdef CONFIG_SMP
130 cpu_set(cpu, next->cpu_vm_mask); 130 cpumask_set_cpu(cpu, mm_cpumask(next));
131#endif /* CONFIG_SMP */ 131#endif /* CONFIG_SMP */
132 /* Set MPTB = next->pgd */ 132 /* Set MPTB = next->pgd */
133 *(volatile unsigned long *)MPTB = (unsigned long)next->pgd; 133 *(volatile unsigned long *)MPTB = (unsigned long)next->pgd;
@@ -135,7 +135,7 @@ static inline void switch_mm(struct mm_struct *prev,
135 } 135 }
136#ifdef CONFIG_SMP 136#ifdef CONFIG_SMP
137 else 137 else
138 if (!cpu_test_and_set(cpu, next->cpu_vm_mask)) 138 if (!cpumask_test_and_set_cpu(cpu, mm_cpumask(next)))
139 activate_context(next); 139 activate_context(next);
140#endif /* CONFIG_SMP */ 140#endif /* CONFIG_SMP */
141} 141}
diff --git a/arch/m32r/include/asm/page.h b/arch/m32r/include/asm/page.h
index 11777f7a5628..725ede8f2889 100644
--- a/arch/m32r/include/asm/page.h
+++ b/arch/m32r/include/asm/page.h
@@ -1,9 +1,11 @@
1#ifndef _ASM_M32R_PAGE_H 1#ifndef _ASM_M32R_PAGE_H
2#define _ASM_M32R_PAGE_H 2#define _ASM_M32R_PAGE_H
3 3
4#include <linux/const.h>
5
4/* PAGE_SHIFT determines the page size */ 6/* PAGE_SHIFT determines the page size */
5#define PAGE_SHIFT 12 7#define PAGE_SHIFT 12
6#define PAGE_SIZE (1UL << PAGE_SHIFT) 8#define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT)
7#define PAGE_MASK (~(PAGE_SIZE-1)) 9#define PAGE_MASK (~(PAGE_SIZE-1))
8 10
9#ifndef __ASSEMBLY__ 11#ifndef __ASSEMBLY__
diff --git a/arch/m32r/include/asm/processor.h b/arch/m32r/include/asm/processor.h
index 1a997fc148a2..8397c249989b 100644
--- a/arch/m32r/include/asm/processor.h
+++ b/arch/m32r/include/asm/processor.h
@@ -140,8 +140,6 @@ unsigned long get_wchan(struct task_struct *p);
140#define KSTK_EIP(tsk) ((tsk)->thread.lr) 140#define KSTK_EIP(tsk) ((tsk)->thread.lr)
141#define KSTK_ESP(tsk) ((tsk)->thread.sp) 141#define KSTK_ESP(tsk) ((tsk)->thread.sp)
142 142
143#define THREAD_SIZE (2*PAGE_SIZE)
144
145#define cpu_relax() barrier() 143#define cpu_relax() barrier()
146 144
147#endif /* _ASM_M32R_PROCESSOR_H */ 145#endif /* _ASM_M32R_PROCESSOR_H */
diff --git a/arch/m32r/include/asm/smp.h b/arch/m32r/include/asm/smp.h
index b96a6d2ffbc3..e67ded1aab91 100644
--- a/arch/m32r/include/asm/smp.h
+++ b/arch/m32r/include/asm/smp.h
@@ -88,7 +88,7 @@ extern void smp_send_timer(void);
88extern unsigned long send_IPI_mask_phys(cpumask_t, int, int); 88extern unsigned long send_IPI_mask_phys(cpumask_t, int, int);
89 89
90extern void arch_send_call_function_single_ipi(int cpu); 90extern void arch_send_call_function_single_ipi(int cpu);
91extern void arch_send_call_function_ipi(cpumask_t mask); 91extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
92 92
93#endif /* not __ASSEMBLY__ */ 93#endif /* not __ASSEMBLY__ */
94 94
diff --git a/arch/m32r/include/asm/thread_info.h b/arch/m32r/include/asm/thread_info.h
index 71578151a403..ed240b6e8e77 100644
--- a/arch/m32r/include/asm/thread_info.h
+++ b/arch/m32r/include/asm/thread_info.h
@@ -55,6 +55,8 @@ struct thread_info {
55 55
56#define PREEMPT_ACTIVE 0x10000000 56#define PREEMPT_ACTIVE 0x10000000
57 57
58#define THREAD_SIZE (PAGE_SIZE << 1)
59
58/* 60/*
59 * macros/functions for gaining access to the thread information structure 61 * macros/functions for gaining access to the thread information structure
60 */ 62 */
@@ -76,8 +78,6 @@ struct thread_info {
76#define init_thread_info (init_thread_union.thread_info) 78#define init_thread_info (init_thread_union.thread_info)
77#define init_stack (init_thread_union.stack) 79#define init_stack (init_thread_union.stack)
78 80
79#define THREAD_SIZE (2*PAGE_SIZE)
80
81/* how to get the thread information struct from C */ 81/* how to get the thread information struct from C */
82static inline struct thread_info *current_thread_info(void) 82static inline struct thread_info *current_thread_info(void)
83{ 83{
@@ -125,17 +125,6 @@ static inline unsigned int get_thread_fault_code(void)
125 return ti->flags >> TI_FLAG_FAULT_CODE_SHIFT; 125 return ti->flags >> TI_FLAG_FAULT_CODE_SHIFT;
126} 126}
127 127
128#else /* !__ASSEMBLY__ */
129
130#define THREAD_SIZE 8192
131
132/* how to get the thread information struct from ASM */
133#define GET_THREAD_INFO(reg) GET_THREAD_INFO reg
134 .macro GET_THREAD_INFO reg
135 ldi \reg, #-THREAD_SIZE
136 and \reg, sp
137 .endm
138
139#endif 128#endif
140 129
141/* 130/*
diff --git a/arch/m32r/kernel/entry.S b/arch/m32r/kernel/entry.S
index 612d35b082a6..403869833b98 100644
--- a/arch/m32r/kernel/entry.S
+++ b/arch/m32r/kernel/entry.S
@@ -118,6 +118,13 @@
118#define resume_kernel restore_all 118#define resume_kernel restore_all
119#endif 119#endif
120 120
121/* how to get the thread information struct from ASM */
122#define GET_THREAD_INFO(reg) GET_THREAD_INFO reg
123 .macro GET_THREAD_INFO reg
124 ldi \reg, #-THREAD_SIZE
125 and \reg, sp
126 .endm
127
121ENTRY(ret_from_fork) 128ENTRY(ret_from_fork)
122 pop r0 129 pop r0
123 bl schedule_tail 130 bl schedule_tail
diff --git a/arch/m32r/kernel/head.S b/arch/m32r/kernel/head.S
index 0a7194439eb1..a46652dd83e6 100644
--- a/arch/m32r/kernel/head.S
+++ b/arch/m32r/kernel/head.S
@@ -268,13 +268,13 @@ ENTRY(empty_zero_page)
268/*------------------------------------------------------------------------ 268/*------------------------------------------------------------------------
269 * Stack area 269 * Stack area
270 */ 270 */
271 .section .spi 271 .section .init.data, "aw"
272 ALIGN 272 ALIGN
273 .global spi_stack_top 273 .global spi_stack_top
274 .zero 1024 274 .zero 1024
275spi_stack_top: 275spi_stack_top:
276 276
277 .section .spu 277 .section .init.data, "aw"
278 ALIGN 278 ALIGN
279 .global spu_stack_top 279 .global spu_stack_top
280 .zero 1024 280 .zero 1024
diff --git a/arch/m32r/kernel/init_task.c b/arch/m32r/kernel/init_task.c
index fce57e5d3f91..6c42d5f8df50 100644
--- a/arch/m32r/kernel/init_task.c
+++ b/arch/m32r/kernel/init_task.c
@@ -20,9 +20,8 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
20 * way process stacks are handled. This is done by having a special 20 * way process stacks are handled. This is done by having a special
21 * "init_task" linker map entry.. 21 * "init_task" linker map entry..
22 */ 22 */
23union thread_union init_thread_union 23union thread_union init_thread_union __init_task_data =
24 __attribute__((__section__(".data.init_task"))) = 24 { INIT_THREAD_INFO(init_task) };
25 { INIT_THREAD_INFO(init_task) };
26 25
27/* 26/*
28 * Initial task structure. 27 * Initial task structure.
diff --git a/arch/m32r/kernel/ptrace.c b/arch/m32r/kernel/ptrace.c
index 98b8feb12ed8..98682bba0ed9 100644
--- a/arch/m32r/kernel/ptrace.c
+++ b/arch/m32r/kernel/ptrace.c
@@ -77,7 +77,7 @@ static int ptrace_read_user(struct task_struct *tsk, unsigned long off,
77 struct user * dummy = NULL; 77 struct user * dummy = NULL;
78#endif 78#endif
79 79
80 if ((off & 3) || (off < 0) || (off > sizeof(struct user) - 3)) 80 if ((off & 3) || off > sizeof(struct user) - 3)
81 return -EIO; 81 return -EIO;
82 82
83 off >>= 2; 83 off >>= 2;
@@ -139,8 +139,7 @@ static int ptrace_write_user(struct task_struct *tsk, unsigned long off,
139 struct user * dummy = NULL; 139 struct user * dummy = NULL;
140#endif 140#endif
141 141
142 if ((off & 3) || off < 0 || 142 if ((off & 3) || off > sizeof(struct user) - 3)
143 off > sizeof(struct user) - 3)
144 return -EIO; 143 return -EIO;
145 144
146 off >>= 2; 145 off >>= 2;
diff --git a/arch/m32r/kernel/smp.c b/arch/m32r/kernel/smp.c
index 929e5c9d3ad9..1b7598e6f6e8 100644
--- a/arch/m32r/kernel/smp.c
+++ b/arch/m32r/kernel/smp.c
@@ -85,7 +85,7 @@ void smp_ipi_timer_interrupt(struct pt_regs *);
85void smp_local_timer_interrupt(void); 85void smp_local_timer_interrupt(void);
86 86
87static void send_IPI_allbutself(int, int); 87static void send_IPI_allbutself(int, int);
88static void send_IPI_mask(cpumask_t, int, int); 88static void send_IPI_mask(const struct cpumask *, int, int);
89unsigned long send_IPI_mask_phys(cpumask_t, int, int); 89unsigned long send_IPI_mask_phys(cpumask_t, int, int);
90 90
91/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ 91/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
@@ -113,7 +113,7 @@ unsigned long send_IPI_mask_phys(cpumask_t, int, int);
113void smp_send_reschedule(int cpu_id) 113void smp_send_reschedule(int cpu_id)
114{ 114{
115 WARN_ON(cpu_is_offline(cpu_id)); 115 WARN_ON(cpu_is_offline(cpu_id));
116 send_IPI_mask(cpumask_of_cpu(cpu_id), RESCHEDULE_IPI, 1); 116 send_IPI_mask(cpumask_of(cpu_id), RESCHEDULE_IPI, 1);
117} 117}
118 118
119/*==========================================================================* 119/*==========================================================================*
@@ -168,7 +168,7 @@ void smp_flush_cache_all(void)
168 spin_lock(&flushcache_lock); 168 spin_lock(&flushcache_lock);
169 mask=cpus_addr(cpumask); 169 mask=cpus_addr(cpumask);
170 atomic_set_mask(*mask, (atomic_t *)&flushcache_cpumask); 170 atomic_set_mask(*mask, (atomic_t *)&flushcache_cpumask);
171 send_IPI_mask(cpumask, INVALIDATE_CACHE_IPI, 0); 171 send_IPI_mask(&cpumask, INVALIDATE_CACHE_IPI, 0);
172 _flush_cache_copyback_all(); 172 _flush_cache_copyback_all();
173 while (flushcache_cpumask) 173 while (flushcache_cpumask)
174 mb(); 174 mb();
@@ -264,7 +264,7 @@ void smp_flush_tlb_mm(struct mm_struct *mm)
264 preempt_disable(); 264 preempt_disable();
265 cpu_id = smp_processor_id(); 265 cpu_id = smp_processor_id();
266 mmc = &mm->context[cpu_id]; 266 mmc = &mm->context[cpu_id];
267 cpu_mask = mm->cpu_vm_mask; 267 cpu_mask = *mm_cpumask(mm);
268 cpu_clear(cpu_id, cpu_mask); 268 cpu_clear(cpu_id, cpu_mask);
269 269
270 if (*mmc != NO_CONTEXT) { 270 if (*mmc != NO_CONTEXT) {
@@ -273,7 +273,7 @@ void smp_flush_tlb_mm(struct mm_struct *mm)
273 if (mm == current->mm) 273 if (mm == current->mm)
274 activate_context(mm); 274 activate_context(mm);
275 else 275 else
276 cpu_clear(cpu_id, mm->cpu_vm_mask); 276 cpumask_clear_cpu(cpu_id, mm_cpumask(mm));
277 local_irq_restore(flags); 277 local_irq_restore(flags);
278 } 278 }
279 if (!cpus_empty(cpu_mask)) 279 if (!cpus_empty(cpu_mask))
@@ -334,7 +334,7 @@ void smp_flush_tlb_page(struct vm_area_struct *vma, unsigned long va)
334 preempt_disable(); 334 preempt_disable();
335 cpu_id = smp_processor_id(); 335 cpu_id = smp_processor_id();
336 mmc = &mm->context[cpu_id]; 336 mmc = &mm->context[cpu_id];
337 cpu_mask = mm->cpu_vm_mask; 337 cpu_mask = *mm_cpumask(mm);
338 cpu_clear(cpu_id, cpu_mask); 338 cpu_clear(cpu_id, cpu_mask);
339 339
340#ifdef DEBUG_SMP 340#ifdef DEBUG_SMP
@@ -424,7 +424,7 @@ static void flush_tlb_others(cpumask_t cpumask, struct mm_struct *mm,
424 * We have to send the IPI only to 424 * We have to send the IPI only to
425 * CPUs affected. 425 * CPUs affected.
426 */ 426 */
427 send_IPI_mask(cpumask, INVALIDATE_TLB_IPI, 0); 427 send_IPI_mask(&cpumask, INVALIDATE_TLB_IPI, 0);
428 428
429 while (!cpus_empty(flush_cpumask)) { 429 while (!cpus_empty(flush_cpumask)) {
430 /* nothing. lockup detection does not belong here */ 430 /* nothing. lockup detection does not belong here */
@@ -469,7 +469,7 @@ void smp_invalidate_interrupt(void)
469 if (flush_mm == current->active_mm) 469 if (flush_mm == current->active_mm)
470 activate_context(flush_mm); 470 activate_context(flush_mm);
471 else 471 else
472 cpu_clear(cpu_id, flush_mm->cpu_vm_mask); 472 cpumask_clear_cpu(cpu_id, mm_cpumask(flush_mm));
473 } else { 473 } else {
474 unsigned long va = flush_va; 474 unsigned long va = flush_va;
475 475
@@ -546,14 +546,14 @@ static void stop_this_cpu(void *dummy)
546 for ( ; ; ); 546 for ( ; ; );
547} 547}
548 548
549void arch_send_call_function_ipi(cpumask_t mask) 549void arch_send_call_function_ipi_mask(const struct cpumask *mask)
550{ 550{
551 send_IPI_mask(mask, CALL_FUNCTION_IPI, 0); 551 send_IPI_mask(mask, CALL_FUNCTION_IPI, 0);
552} 552}
553 553
554void arch_send_call_function_single_ipi(int cpu) 554void arch_send_call_function_single_ipi(int cpu)
555{ 555{
556 send_IPI_mask(cpumask_of_cpu(cpu), CALL_FUNC_SINGLE_IPI, 0); 556 send_IPI_mask(cpumask_of(cpu), CALL_FUNC_SINGLE_IPI, 0);
557} 557}
558 558
559/*==========================================================================* 559/*==========================================================================*
@@ -729,7 +729,7 @@ static void send_IPI_allbutself(int ipi_num, int try)
729 cpumask = cpu_online_map; 729 cpumask = cpu_online_map;
730 cpu_clear(smp_processor_id(), cpumask); 730 cpu_clear(smp_processor_id(), cpumask);
731 731
732 send_IPI_mask(cpumask, ipi_num, try); 732 send_IPI_mask(&cpumask, ipi_num, try);
733} 733}
734 734
735/*==========================================================================* 735/*==========================================================================*
@@ -752,7 +752,7 @@ static void send_IPI_allbutself(int ipi_num, int try)
752 * ---------- --- -------------------------------------------------------- 752 * ---------- --- --------------------------------------------------------
753 * 753 *
754 *==========================================================================*/ 754 *==========================================================================*/
755static void send_IPI_mask(cpumask_t cpumask, int ipi_num, int try) 755static void send_IPI_mask(const struct cpumask *cpumask, int ipi_num, int try)
756{ 756{
757 cpumask_t physid_mask, tmp; 757 cpumask_t physid_mask, tmp;
758 int cpu_id, phys_id; 758 int cpu_id, phys_id;
@@ -761,11 +761,11 @@ static void send_IPI_mask(cpumask_t cpumask, int ipi_num, int try)
761 if (num_cpus <= 1) /* NO MP */ 761 if (num_cpus <= 1) /* NO MP */
762 return; 762 return;
763 763
764 cpus_and(tmp, cpumask, cpu_online_map); 764 cpumask_and(&tmp, cpumask, cpu_online_mask);
765 BUG_ON(!cpus_equal(cpumask, tmp)); 765 BUG_ON(!cpumask_equal(cpumask, &tmp));
766 766
767 physid_mask = CPU_MASK_NONE; 767 physid_mask = CPU_MASK_NONE;
768 for_each_cpu_mask(cpu_id, cpumask){ 768 for_each_cpu(cpu_id, cpumask) {
769 if ((phys_id = cpu_to_physid(cpu_id)) != -1) 769 if ((phys_id = cpu_to_physid(cpu_id)) != -1)
770 cpu_set(phys_id, physid_mask); 770 cpu_set(phys_id, physid_mask);
771 } 771 }
diff --git a/arch/m32r/kernel/smpboot.c b/arch/m32r/kernel/smpboot.c
index 2547d6c4a827..e034844cfc0d 100644
--- a/arch/m32r/kernel/smpboot.c
+++ b/arch/m32r/kernel/smpboot.c
@@ -178,7 +178,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
178 for (phys_id = 0 ; phys_id < nr_cpu ; phys_id++) 178 for (phys_id = 0 ; phys_id < nr_cpu ; phys_id++)
179 physid_set(phys_id, phys_cpu_present_map); 179 physid_set(phys_id, phys_cpu_present_map);
180#ifndef CONFIG_HOTPLUG_CPU 180#ifndef CONFIG_HOTPLUG_CPU
181 cpu_present_map = cpu_possible_map; 181 init_cpu_present(&cpu_possible_map);
182#endif 182#endif
183 183
184 show_mp_info(nr_cpu); 184 show_mp_info(nr_cpu);
@@ -213,7 +213,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
213 if (!physid_isset(phys_id, phys_cpu_present_map)) 213 if (!physid_isset(phys_id, phys_cpu_present_map))
214 continue; 214 continue;
215 215
216 if ((max_cpus >= 0) && (max_cpus <= cpucount + 1)) 216 if (max_cpus <= cpucount + 1)
217 continue; 217 continue;
218 218
219 do_boot_cpu(phys_id); 219 do_boot_cpu(phys_id);
diff --git a/arch/m32r/kernel/time.c b/arch/m32r/kernel/time.c
index cada3ba4b990..ba61c4c73202 100644
--- a/arch/m32r/kernel/time.c
+++ b/arch/m32r/kernel/time.c
@@ -48,7 +48,7 @@ extern void smp_local_timer_interrupt(void);
48 48
49static unsigned long latch; 49static unsigned long latch;
50 50
51static unsigned long do_gettimeoffset(void) 51u32 arch_gettimeoffset(void)
52{ 52{
53 unsigned long elapsed_time = 0; /* [us] */ 53 unsigned long elapsed_time = 0; /* [us] */
54 54
@@ -93,79 +93,10 @@ static unsigned long do_gettimeoffset(void)
93#error no chip configuration 93#error no chip configuration
94#endif 94#endif
95 95
96 return elapsed_time; 96 return elapsed_time * 1000;
97} 97}
98 98
99/* 99/*
100 * This version of gettimeofday has near microsecond resolution.
101 */
102void do_gettimeofday(struct timeval *tv)
103{
104 unsigned long seq;
105 unsigned long usec, sec;
106 unsigned long max_ntp_tick = tick_usec - tickadj;
107
108 do {
109 seq = read_seqbegin(&xtime_lock);
110
111 usec = do_gettimeoffset();
112
113 /*
114 * If time_adjust is negative then NTP is slowing the clock
115 * so make sure not to go into next possible interval.
116 * Better to lose some accuracy than have time go backwards..
117 */
118 if (unlikely(time_adjust < 0))
119 usec = min(usec, max_ntp_tick);
120
121 sec = xtime.tv_sec;
122 usec += (xtime.tv_nsec / 1000);
123 } while (read_seqretry(&xtime_lock, seq));
124
125 while (usec >= 1000000) {
126 usec -= 1000000;
127 sec++;
128 }
129
130 tv->tv_sec = sec;
131 tv->tv_usec = usec;
132}
133
134EXPORT_SYMBOL(do_gettimeofday);
135
136int do_settimeofday(struct timespec *tv)
137{
138 time_t wtm_sec, sec = tv->tv_sec;
139 long wtm_nsec, nsec = tv->tv_nsec;
140
141 if ((unsigned long)tv->tv_nsec >= NSEC_PER_SEC)
142 return -EINVAL;
143
144 write_seqlock_irq(&xtime_lock);
145 /*
146 * This is revolting. We need to set "xtime" correctly. However, the
147 * value in this location is the value at the most recent update of
148 * wall time. Discover what correction gettimeofday() would have
149 * made, and then undo it!
150 */
151 nsec -= do_gettimeoffset() * NSEC_PER_USEC;
152
153 wtm_sec = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec);
154 wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec);
155
156 set_normalized_timespec(&xtime, sec, nsec);
157 set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec);
158
159 ntp_clear();
160 write_sequnlock_irq(&xtime_lock);
161 clock_was_set();
162
163 return 0;
164}
165
166EXPORT_SYMBOL(do_settimeofday);
167
168/*
169 * In order to set the CMOS clock precisely, set_rtc_mmss has to be 100 * In order to set the CMOS clock precisely, set_rtc_mmss has to be
170 * called 500 ms after the second nowtime has started, because when 101 * called 500 ms after the second nowtime has started, because when
171 * nowtime is written into the registers of the CMOS clock, it will 102 * nowtime is written into the registers of the CMOS clock, it will
@@ -192,6 +123,7 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id)
192#ifndef CONFIG_SMP 123#ifndef CONFIG_SMP
193 profile_tick(CPU_PROFILING); 124 profile_tick(CPU_PROFILING);
194#endif 125#endif
126 /* XXX FIXME. Uh, the xtime_lock should be held here, no? */
195 do_timer(1); 127 do_timer(1);
196 128
197#ifndef CONFIG_SMP 129#ifndef CONFIG_SMP
diff --git a/arch/m32r/kernel/vmlinux.lds.S b/arch/m32r/kernel/vmlinux.lds.S
index de5e21cca6a5..8ceb6181d805 100644
--- a/arch/m32r/kernel/vmlinux.lds.S
+++ b/arch/m32r/kernel/vmlinux.lds.S
@@ -4,6 +4,7 @@
4#include <asm-generic/vmlinux.lds.h> 4#include <asm-generic/vmlinux.lds.h>
5#include <asm/addrspace.h> 5#include <asm/addrspace.h>
6#include <asm/page.h> 6#include <asm/page.h>
7#include <asm/thread_info.h>
7 8
8OUTPUT_ARCH(m32r) 9OUTPUT_ARCH(m32r)
9#if defined(__LITTLE_ENDIAN__) 10#if defined(__LITTLE_ENDIAN__)
@@ -40,83 +41,22 @@ SECTIONS
40#endif 41#endif
41 _etext = .; /* End of text section */ 42 _etext = .; /* End of text section */
42 43
43 . = ALIGN(16); /* Exception table */ 44 EXCEPTION_TABLE(16)
44 __start___ex_table = .;
45 __ex_table : { *(__ex_table) }
46 __stop___ex_table = .;
47
48 RODATA 45 RODATA
49 46 RW_DATA_SECTION(32, PAGE_SIZE, THREAD_SIZE)
50 /* writeable */
51 .data : { /* Data */
52 *(.spu)
53 *(.spi)
54 DATA_DATA
55 CONSTRUCTORS
56 }
57
58 . = ALIGN(4096);
59 __nosave_begin = .;
60 .data_nosave : { *(.data.nosave) }
61 . = ALIGN(4096);
62 __nosave_end = .;
63
64 . = ALIGN(32);
65 .data.cacheline_aligned : { *(.data.cacheline_aligned) }
66
67 _edata = .; /* End of data section */ 47 _edata = .; /* End of data section */
68 48
69 . = ALIGN(8192); /* init_task */
70 .data.init_task : { *(.data.init_task) }
71
72 /* will be freed after init */ 49 /* will be freed after init */
73 . = ALIGN(4096); /* Init code and data */ 50 . = ALIGN(PAGE_SIZE); /* Init code and data */
74 __init_begin = .; 51 __init_begin = .;
75 .init.text : { 52 INIT_TEXT_SECTION(PAGE_SIZE)
76 _sinittext = .; 53 INIT_DATA_SECTION(16)
77 INIT_TEXT 54 PERCPU(PAGE_SIZE)
78 _einittext = .; 55 . = ALIGN(PAGE_SIZE);
79 }
80 .init.data : { INIT_DATA }
81 . = ALIGN(16);
82 __setup_start = .;
83 .init.setup : { *(.init.setup) }
84 __setup_end = .;
85 __initcall_start = .;
86 .initcall.init : {
87 INITCALLS
88 }
89 __initcall_end = .;
90 __con_initcall_start = .;
91 .con_initcall.init : { *(.con_initcall.init) }
92 __con_initcall_end = .;
93 SECURITY_INIT
94 . = ALIGN(4);
95 __alt_instructions = .;
96 .altinstructions : { *(.altinstructions) }
97 __alt_instructions_end = .;
98 .altinstr_replacement : { *(.altinstr_replacement) }
99 /* .exit.text is discard at runtime, not link time, to deal with references
100 from .altinstructions and .eh_frame */
101 .exit.text : { EXIT_TEXT }
102 .exit.data : { EXIT_DATA }
103
104#ifdef CONFIG_BLK_DEV_INITRD
105 . = ALIGN(4096);
106 __initramfs_start = .;
107 .init.ramfs : { *(.init.ramfs) }
108 __initramfs_end = .;
109#endif
110
111 PERCPU(4096)
112 . = ALIGN(4096);
113 __init_end = .; 56 __init_end = .;
114 /* freed after init ends here */ 57 /* freed after init ends here */
115 58
116 __bss_start = .; /* BSS */ 59 BSS_SECTION(0, 0, 4)
117 .bss : { *(.bss) }
118 . = ALIGN(4);
119 __bss_stop = .;
120 60
121 _end = . ; 61 _end = . ;
122 62
diff --git a/arch/m32r/mm/init.c b/arch/m32r/mm/init.c
index 24d429f9358a..9f581df3952b 100644
--- a/arch/m32r/mm/init.c
+++ b/arch/m32r/mm/init.c
@@ -171,7 +171,7 @@ void __init mem_init(void)
171 171
172 printk(KERN_INFO "Memory: %luk/%luk available (%dk kernel code, " 172 printk(KERN_INFO "Memory: %luk/%luk available (%dk kernel code, "
173 "%dk reserved, %dk data, %dk init)\n", 173 "%dk reserved, %dk data, %dk init)\n",
174 (unsigned long) nr_free_pages() << (PAGE_SHIFT-10), 174 nr_free_pages() << (PAGE_SHIFT-10),
175 num_physpages << (PAGE_SHIFT-10), 175 num_physpages << (PAGE_SHIFT-10),
176 codesize >> 10, 176 codesize >> 10,
177 reservedpages << (PAGE_SHIFT-10), 177 reservedpages << (PAGE_SHIFT-10),
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index fb87c08c6b57..29dd8489ffec 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -58,6 +58,12 @@ config HZ
58 int 58 int
59 default 100 59 default 100
60 60
61config GENERIC_TIME
62 def_bool y
63
64config ARCH_USES_GETTIMEOFFSET
65 def_bool y
66
61mainmenu "Linux/68k Kernel Configuration" 67mainmenu "Linux/68k Kernel Configuration"
62 68
63source "init/Kconfig" 69source "init/Kconfig"
diff --git a/arch/m68k/include/asm/checksum.h b/arch/m68k/include/asm/checksum.h
index 1cf544767453..ec514485c8b6 100644
--- a/arch/m68k/include/asm/checksum.h
+++ b/arch/m68k/include/asm/checksum.h
@@ -1,5 +1,170 @@
1#ifdef __uClinux__ 1#ifndef _M68K_CHECKSUM_H
2#include "checksum_no.h" 2#define _M68K_CHECKSUM_H
3
4#include <linux/in6.h>
5
6/*
7 * computes the checksum of a memory block at buff, length len,
8 * and adds in "sum" (32-bit)
9 *
10 * returns a 32-bit number suitable for feeding into itself
11 * or csum_tcpudp_magic
12 *
13 * this function must be called with even lengths, except
14 * for the last fragment, which may be odd
15 *
16 * it's best to have buff aligned on a 32-bit boundary
17 */
18__wsum csum_partial(const void *buff, int len, __wsum sum);
19
20/*
21 * the same as csum_partial, but copies from src while it
22 * checksums
23 *
24 * here even more important to align src and dst on a 32-bit (or even
25 * better 64-bit) boundary
26 */
27
28extern __wsum csum_partial_copy_from_user(const void __user *src,
29 void *dst,
30 int len, __wsum sum,
31 int *csum_err);
32
33extern __wsum csum_partial_copy_nocheck(const void *src,
34 void *dst, int len,
35 __wsum sum);
36
37
38#ifdef CONFIG_COLDFIRE
39
40/*
41 * The ColdFire cores don't support all the 68k instructions used
42 * in the optimized checksum code below. So it reverts back to using
43 * more standard C coded checksums. The fast checksum code is
44 * significantly larger than the optimized version, so it is not
45 * inlined here.
46 */
47__sum16 ip_fast_csum(const void *iph, unsigned int ihl);
48
49static inline __sum16 csum_fold(__wsum sum)
50{
51 unsigned int tmp = (__force u32)sum;
52
53 tmp = (tmp & 0xffff) + (tmp >> 16);
54 tmp = (tmp & 0xffff) + (tmp >> 16);
55
56 return (__force __sum16)~tmp;
57}
58
3#else 59#else
4#include "checksum_mm.h" 60
5#endif 61/*
62 * This is a version of ip_fast_csum() optimized for IP headers,
63 * which always checksum on 4 octet boundaries.
64 */
65static inline __sum16 ip_fast_csum(const void *iph, unsigned int ihl)
66{
67 unsigned int sum = 0;
68 unsigned long tmp;
69
70 __asm__ ("subqw #1,%2\n"
71 "1:\t"
72 "movel %1@+,%3\n\t"
73 "addxl %3,%0\n\t"
74 "dbra %2,1b\n\t"
75 "movel %0,%3\n\t"
76 "swap %3\n\t"
77 "addxw %3,%0\n\t"
78 "clrw %3\n\t"
79 "addxw %3,%0\n\t"
80 : "=d" (sum), "=&a" (iph), "=&d" (ihl), "=&d" (tmp)
81 : "0" (sum), "1" (iph), "2" (ihl)
82 : "memory");
83 return (__force __sum16)~sum;
84}
85
86static inline __sum16 csum_fold(__wsum sum)
87{
88 unsigned int tmp = (__force u32)sum;
89
90 __asm__("swap %1\n\t"
91 "addw %1, %0\n\t"
92 "clrw %1\n\t"
93 "addxw %1, %0"
94 : "=&d" (sum), "=&d" (tmp)
95 : "0" (sum), "1" (tmp));
96
97 return (__force __sum16)~sum;
98}
99
100#endif /* CONFIG_COLDFIRE */
101
102static inline __wsum
103csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len,
104 unsigned short proto, __wsum sum)
105{
106 __asm__ ("addl %2,%0\n\t"
107 "addxl %3,%0\n\t"
108 "addxl %4,%0\n\t"
109 "clrl %1\n\t"
110 "addxl %1,%0"
111 : "=&d" (sum), "=d" (saddr)
112 : "g" (daddr), "1" (saddr), "d" (len + proto),
113 "0" (sum));
114 return sum;
115}
116
117
118/*
119 * computes the checksum of the TCP/UDP pseudo-header
120 * returns a 16-bit checksum, already complemented
121 */
122static inline __sum16
123csum_tcpudp_magic(__be32 saddr, __be32 daddr, unsigned short len,
124 unsigned short proto, __wsum sum)
125{
126 return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum));
127}
128
129/*
130 * this routine is used for miscellaneous IP-like checksums, mainly
131 * in icmp.c
132 */
133
134static inline __sum16 ip_compute_csum(const void *buff, int len)
135{
136 return csum_fold (csum_partial(buff, len, 0));
137}
138
139#define _HAVE_ARCH_IPV6_CSUM
140static __inline__ __sum16
141csum_ipv6_magic(const struct in6_addr *saddr, const struct in6_addr *daddr,
142 __u32 len, unsigned short proto, __wsum sum)
143{
144 register unsigned long tmp;
145 __asm__("addl %2@,%0\n\t"
146 "movel %2@(4),%1\n\t"
147 "addxl %1,%0\n\t"
148 "movel %2@(8),%1\n\t"
149 "addxl %1,%0\n\t"
150 "movel %2@(12),%1\n\t"
151 "addxl %1,%0\n\t"
152 "movel %3@,%1\n\t"
153 "addxl %1,%0\n\t"
154 "movel %3@(4),%1\n\t"
155 "addxl %1,%0\n\t"
156 "movel %3@(8),%1\n\t"
157 "addxl %1,%0\n\t"
158 "movel %3@(12),%1\n\t"
159 "addxl %1,%0\n\t"
160 "addxl %4,%0\n\t"
161 "clrl %1\n\t"
162 "addxl %1,%0"
163 : "=&d" (sum), "=&d" (tmp)
164 : "a" (saddr), "a" (daddr), "d" (len + proto),
165 "0" (sum));
166
167 return csum_fold(sum);
168}
169
170#endif /* _M68K_CHECKSUM_H */
diff --git a/arch/m68k/include/asm/checksum_mm.h b/arch/m68k/include/asm/checksum_mm.h
deleted file mode 100644
index 494f9aec37ea..000000000000
--- a/arch/m68k/include/asm/checksum_mm.h
+++ /dev/null
@@ -1,148 +0,0 @@
1#ifndef _M68K_CHECKSUM_H
2#define _M68K_CHECKSUM_H
3
4#include <linux/in6.h>
5
6/*
7 * computes the checksum of a memory block at buff, length len,
8 * and adds in "sum" (32-bit)
9 *
10 * returns a 32-bit number suitable for feeding into itself
11 * or csum_tcpudp_magic
12 *
13 * this function must be called with even lengths, except
14 * for the last fragment, which may be odd
15 *
16 * it's best to have buff aligned on a 32-bit boundary
17 */
18__wsum csum_partial(const void *buff, int len, __wsum sum);
19
20/*
21 * the same as csum_partial, but copies from src while it
22 * checksums
23 *
24 * here even more important to align src and dst on a 32-bit (or even
25 * better 64-bit) boundary
26 */
27
28extern __wsum csum_partial_copy_from_user(const void __user *src,
29 void *dst,
30 int len, __wsum sum,
31 int *csum_err);
32
33extern __wsum csum_partial_copy_nocheck(const void *src,
34 void *dst, int len,
35 __wsum sum);
36
37/*
38 * This is a version of ip_compute_csum() optimized for IP headers,
39 * which always checksum on 4 octet boundaries.
40 *
41 */
42static inline __sum16 ip_fast_csum(const void *iph, unsigned int ihl)
43{
44 unsigned int sum = 0;
45 unsigned long tmp;
46
47 __asm__ ("subqw #1,%2\n"
48 "1:\t"
49 "movel %1@+,%3\n\t"
50 "addxl %3,%0\n\t"
51 "dbra %2,1b\n\t"
52 "movel %0,%3\n\t"
53 "swap %3\n\t"
54 "addxw %3,%0\n\t"
55 "clrw %3\n\t"
56 "addxw %3,%0\n\t"
57 : "=d" (sum), "=&a" (iph), "=&d" (ihl), "=&d" (tmp)
58 : "0" (sum), "1" (iph), "2" (ihl)
59 : "memory");
60 return (__force __sum16)~sum;
61}
62
63/*
64 * Fold a partial checksum
65 */
66
67static inline __sum16 csum_fold(__wsum sum)
68{
69 unsigned int tmp = (__force u32)sum;
70 __asm__("swap %1\n\t"
71 "addw %1, %0\n\t"
72 "clrw %1\n\t"
73 "addxw %1, %0"
74 : "=&d" (sum), "=&d" (tmp)
75 : "0" (sum), "1" (tmp));
76 return (__force __sum16)~sum;
77}
78
79
80static inline __wsum
81csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len,
82 unsigned short proto, __wsum sum)
83{
84 __asm__ ("addl %2,%0\n\t"
85 "addxl %3,%0\n\t"
86 "addxl %4,%0\n\t"
87 "clrl %1\n\t"
88 "addxl %1,%0"
89 : "=&d" (sum), "=d" (saddr)
90 : "g" (daddr), "1" (saddr), "d" (len + proto),
91 "0" (sum));
92 return sum;
93}
94
95
96/*
97 * computes the checksum of the TCP/UDP pseudo-header
98 * returns a 16-bit checksum, already complemented
99 */
100static inline __sum16
101csum_tcpudp_magic(__be32 saddr, __be32 daddr, unsigned short len,
102 unsigned short proto, __wsum sum)
103{
104 return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum));
105}
106
107/*
108 * this routine is used for miscellaneous IP-like checksums, mainly
109 * in icmp.c
110 */
111
112static inline __sum16 ip_compute_csum(const void *buff, int len)
113{
114 return csum_fold (csum_partial(buff, len, 0));
115}
116
117#define _HAVE_ARCH_IPV6_CSUM
118static __inline__ __sum16
119csum_ipv6_magic(const struct in6_addr *saddr, const struct in6_addr *daddr,
120 __u32 len, unsigned short proto, __wsum sum)
121{
122 register unsigned long tmp;
123 __asm__("addl %2@,%0\n\t"
124 "movel %2@(4),%1\n\t"
125 "addxl %1,%0\n\t"
126 "movel %2@(8),%1\n\t"
127 "addxl %1,%0\n\t"
128 "movel %2@(12),%1\n\t"
129 "addxl %1,%0\n\t"
130 "movel %3@,%1\n\t"
131 "addxl %1,%0\n\t"
132 "movel %3@(4),%1\n\t"
133 "addxl %1,%0\n\t"
134 "movel %3@(8),%1\n\t"
135 "addxl %1,%0\n\t"
136 "movel %3@(12),%1\n\t"
137 "addxl %1,%0\n\t"
138 "addxl %4,%0\n\t"
139 "clrl %1\n\t"
140 "addxl %1,%0"
141 : "=&d" (sum), "=&d" (tmp)
142 : "a" (saddr), "a" (daddr), "d" (len + proto),
143 "0" (sum));
144
145 return csum_fold(sum);
146}
147
148#endif /* _M68K_CHECKSUM_H */
diff --git a/arch/m68k/include/asm/checksum_no.h b/arch/m68k/include/asm/checksum_no.h
deleted file mode 100644
index 81883482ffb1..000000000000
--- a/arch/m68k/include/asm/checksum_no.h
+++ /dev/null
@@ -1,132 +0,0 @@
1#ifndef _M68K_CHECKSUM_H
2#define _M68K_CHECKSUM_H
3
4#include <linux/in6.h>
5
6/*
7 * computes the checksum of a memory block at buff, length len,
8 * and adds in "sum" (32-bit)
9 *
10 * returns a 32-bit number suitable for feeding into itself
11 * or csum_tcpudp_magic
12 *
13 * this function must be called with even lengths, except
14 * for the last fragment, which may be odd
15 *
16 * it's best to have buff aligned on a 32-bit boundary
17 */
18__wsum csum_partial(const void *buff, int len, __wsum sum);
19
20/*
21 * the same as csum_partial, but copies from src while it
22 * checksums
23 *
24 * here even more important to align src and dst on a 32-bit (or even
25 * better 64-bit) boundary
26 */
27
28__wsum csum_partial_copy_nocheck(const void *src, void *dst,
29 int len, __wsum sum);
30
31
32/*
33 * the same as csum_partial_copy, but copies from user space.
34 *
35 * here even more important to align src and dst on a 32-bit (or even
36 * better 64-bit) boundary
37 */
38
39extern __wsum csum_partial_copy_from_user(const void __user *src,
40 void *dst, int len, __wsum sum, int *csum_err);
41
42__sum16 ip_fast_csum(const void *iph, unsigned int ihl);
43
44/*
45 * Fold a partial checksum
46 */
47
48static inline __sum16 csum_fold(__wsum sum)
49{
50 unsigned int tmp = (__force u32)sum;
51#ifdef CONFIG_COLDFIRE
52 tmp = (tmp & 0xffff) + (tmp >> 16);
53 tmp = (tmp & 0xffff) + (tmp >> 16);
54 return (__force __sum16)~tmp;
55#else
56 __asm__("swap %1\n\t"
57 "addw %1, %0\n\t"
58 "clrw %1\n\t"
59 "addxw %1, %0"
60 : "=&d" (sum), "=&d" (tmp)
61 : "0" (sum), "1" (sum));
62 return (__force __sum16)~sum;
63#endif
64}
65
66
67/*
68 * computes the checksum of the TCP/UDP pseudo-header
69 * returns a 16-bit checksum, already complemented
70 */
71
72static inline __wsum
73csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len,
74 unsigned short proto, __wsum sum)
75{
76 __asm__ ("addl %1,%0\n\t"
77 "addxl %4,%0\n\t"
78 "addxl %5,%0\n\t"
79 "clrl %1\n\t"
80 "addxl %1,%0"
81 : "=&d" (sum), "=&d" (saddr)
82 : "0" (daddr), "1" (saddr), "d" (len + proto),
83 "d"(sum));
84 return sum;
85}
86
87static inline __sum16
88csum_tcpudp_magic(__be32 saddr, __be32 daddr, unsigned short len,
89 unsigned short proto, __wsum sum)
90{
91 return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum));
92}
93
94/*
95 * this routine is used for miscellaneous IP-like checksums, mainly
96 * in icmp.c
97 */
98
99extern __sum16 ip_compute_csum(const void *buff, int len);
100
101#define _HAVE_ARCH_IPV6_CSUM
102static __inline__ __sum16
103csum_ipv6_magic(const struct in6_addr *saddr, const struct in6_addr *daddr,
104 __u32 len, unsigned short proto, __wsum sum)
105{
106 register unsigned long tmp;
107 __asm__("addl %2@,%0\n\t"
108 "movel %2@(4),%1\n\t"
109 "addxl %1,%0\n\t"
110 "movel %2@(8),%1\n\t"
111 "addxl %1,%0\n\t"
112 "movel %2@(12),%1\n\t"
113 "addxl %1,%0\n\t"
114 "movel %3@,%1\n\t"
115 "addxl %1,%0\n\t"
116 "movel %3@(4),%1\n\t"
117 "addxl %1,%0\n\t"
118 "movel %3@(8),%1\n\t"
119 "addxl %1,%0\n\t"
120 "movel %3@(12),%1\n\t"
121 "addxl %1,%0\n\t"
122 "addxl %4,%0\n\t"
123 "clrl %1\n\t"
124 "addxl %1,%0"
125 : "=&d" (sum), "=&d" (tmp)
126 : "a" (saddr), "a" (daddr), "d" (len + proto),
127 "0" (sum));
128
129 return csum_fold(sum);
130}
131
132#endif /* _M68K_CHECKSUM_H */
diff --git a/arch/m68k/include/asm/dma.h b/arch/m68k/include/asm/dma.h
index b82e660cf1c2..6fbdfe895104 100644
--- a/arch/m68k/include/asm/dma.h
+++ b/arch/m68k/include/asm/dma.h
@@ -1,5 +1,491 @@
1#ifdef __uClinux__ 1#ifndef _M68K_DMA_H
2#include "dma_no.h" 2#define _M68K_DMA_H 1
3
4#ifdef CONFIG_COLDFIRE
5/*
6 * ColdFire DMA Model:
7 * ColdFire DMA supports two forms of DMA: Single and Dual address. Single
8 * address mode emits a source address, and expects that the device will either
9 * pick up the data (DMA READ) or source data (DMA WRITE). This implies that
10 * the device will place data on the correct byte(s) of the data bus, as the
11 * memory transactions are always 32 bits. This implies that only 32 bit
12 * devices will find single mode transfers useful. Dual address DMA mode
13 * performs two cycles: source read and destination write. ColdFire will
14 * align the data so that the device will always get the correct bytes, thus
15 * is useful for 8 and 16 bit devices. This is the mode that is supported
16 * below.
17 *
18 * AUG/22/2000 : added support for 32-bit Dual-Address-Mode (K) 2000
19 * Oliver Kamphenkel (O.Kamphenkel@tu-bs.de)
20 *
21 * AUG/25/2000 : addad support for 8, 16 and 32-bit Single-Address-Mode (K)2000
22 * Oliver Kamphenkel (O.Kamphenkel@tu-bs.de)
23 *
24 * APR/18/2002 : added proper support for MCF5272 DMA controller.
25 * Arthur Shipkowski (art@videon-central.com)
26 */
27
28#include <asm/coldfire.h>
29#include <asm/mcfsim.h>
30#include <asm/mcfdma.h>
31
32/*
33 * Set number of channels of DMA on ColdFire for different implementations.
34 */
35#if defined(CONFIG_M5249) || defined(CONFIG_M5307) || defined(CONFIG_M5407) || \
36 defined(CONFIG_M523x) || defined(CONFIG_M527x) || defined(CONFIG_M528x)
37#define MAX_M68K_DMA_CHANNELS 4
38#elif defined(CONFIG_M5272)
39#define MAX_M68K_DMA_CHANNELS 1
40#elif defined(CONFIG_M532x)
41#define MAX_M68K_DMA_CHANNELS 0
3#else 42#else
4#include "dma_mm.h" 43#define MAX_M68K_DMA_CHANNELS 2
5#endif 44#endif
45
46extern unsigned int dma_base_addr[MAX_M68K_DMA_CHANNELS];
47extern unsigned int dma_device_address[MAX_M68K_DMA_CHANNELS];
48
49#if !defined(CONFIG_M5272)
50#define DMA_MODE_WRITE_BIT 0x01 /* Memory/IO to IO/Memory select */
51#define DMA_MODE_WORD_BIT 0x02 /* 8 or 16 bit transfers */
52#define DMA_MODE_LONG_BIT 0x04 /* or 32 bit transfers */
53#define DMA_MODE_SINGLE_BIT 0x08 /* single-address-mode */
54
55/* I/O to memory, 8 bits, mode */
56#define DMA_MODE_READ 0
57/* memory to I/O, 8 bits, mode */
58#define DMA_MODE_WRITE 1
59/* I/O to memory, 16 bits, mode */
60#define DMA_MODE_READ_WORD 2
61/* memory to I/O, 16 bits, mode */
62#define DMA_MODE_WRITE_WORD 3
63/* I/O to memory, 32 bits, mode */
64#define DMA_MODE_READ_LONG 4
65/* memory to I/O, 32 bits, mode */
66#define DMA_MODE_WRITE_LONG 5
67/* I/O to memory, 8 bits, single-address-mode */
68#define DMA_MODE_READ_SINGLE 8
69/* memory to I/O, 8 bits, single-address-mode */
70#define DMA_MODE_WRITE_SINGLE 9
71/* I/O to memory, 16 bits, single-address-mode */
72#define DMA_MODE_READ_WORD_SINGLE 10
73/* memory to I/O, 16 bits, single-address-mode */
74#define DMA_MODE_WRITE_WORD_SINGLE 11
75/* I/O to memory, 32 bits, single-address-mode */
76#define DMA_MODE_READ_LONG_SINGLE 12
77/* memory to I/O, 32 bits, single-address-mode */
78#define DMA_MODE_WRITE_LONG_SINGLE 13
79
80#else /* CONFIG_M5272 is defined */
81
82/* Source static-address mode */
83#define DMA_MODE_SRC_SA_BIT 0x01
84/* Two bits to select between all four modes */
85#define DMA_MODE_SSIZE_MASK 0x06
86/* Offset to shift bits in */
87#define DMA_MODE_SSIZE_OFF 0x01
88/* Destination static-address mode */
89#define DMA_MODE_DES_SA_BIT 0x10
90/* Two bits to select between all four modes */
91#define DMA_MODE_DSIZE_MASK 0x60
92/* Offset to shift bits in */
93#define DMA_MODE_DSIZE_OFF 0x05
94/* Size modifiers */
95#define DMA_MODE_SIZE_LONG 0x00
96#define DMA_MODE_SIZE_BYTE 0x01
97#define DMA_MODE_SIZE_WORD 0x02
98#define DMA_MODE_SIZE_LINE 0x03
99
100/*
101 * Aliases to help speed quick ports; these may be suboptimal, however. They
102 * do not include the SINGLE mode modifiers since the MCF5272 does not have a
103 * mode where the device is in control of its addressing.
104 */
105
106/* I/O to memory, 8 bits, mode */
107#define DMA_MODE_READ ((DMA_MODE_SIZE_BYTE << DMA_MODE_DSIZE_OFF) | (DMA_MODE_SIZE_BYTE << DMA_MODE_SSIZE_OFF) | DMA_SRC_SA_BIT)
108/* memory to I/O, 8 bits, mode */
109#define DMA_MODE_WRITE ((DMA_MODE_SIZE_BYTE << DMA_MODE_DSIZE_OFF) | (DMA_MODE_SIZE_BYTE << DMA_MODE_SSIZE_OFF) | DMA_DES_SA_BIT)
110/* I/O to memory, 16 bits, mode */
111#define DMA_MODE_READ_WORD ((DMA_MODE_SIZE_WORD << DMA_MODE_DSIZE_OFF) | (DMA_MODE_SIZE_WORD << DMA_MODE_SSIZE_OFF) | DMA_SRC_SA_BIT)
112/* memory to I/O, 16 bits, mode */
113#define DMA_MODE_WRITE_WORD ((DMA_MODE_SIZE_WORD << DMA_MODE_DSIZE_OFF) | (DMA_MODE_SIZE_WORD << DMA_MODE_SSIZE_OFF) | DMA_DES_SA_BIT)
114/* I/O to memory, 32 bits, mode */
115#define DMA_MODE_READ_LONG ((DMA_MODE_SIZE_LONG << DMA_MODE_DSIZE_OFF) | (DMA_MODE_SIZE_LONG << DMA_MODE_SSIZE_OFF) | DMA_SRC_SA_BIT)
116/* memory to I/O, 32 bits, mode */
117#define DMA_MODE_WRITE_LONG ((DMA_MODE_SIZE_LONG << DMA_MODE_DSIZE_OFF) | (DMA_MODE_SIZE_LONG << DMA_MODE_SSIZE_OFF) | DMA_DES_SA_BIT)
118
119#endif /* !defined(CONFIG_M5272) */
120
121#if !defined(CONFIG_M5272)
122/* enable/disable a specific DMA channel */
123static __inline__ void enable_dma(unsigned int dmanr)
124{
125 volatile unsigned short *dmawp;
126
127#ifdef DMA_DEBUG
128 printk("enable_dma(dmanr=%d)\n", dmanr);
129#endif
130
131 dmawp = (unsigned short *) dma_base_addr[dmanr];
132 dmawp[MCFDMA_DCR] |= MCFDMA_DCR_EEXT;
133}
134
135static __inline__ void disable_dma(unsigned int dmanr)
136{
137 volatile unsigned short *dmawp;
138 volatile unsigned char *dmapb;
139
140#ifdef DMA_DEBUG
141 printk("disable_dma(dmanr=%d)\n", dmanr);
142#endif
143
144 dmawp = (unsigned short *) dma_base_addr[dmanr];
145 dmapb = (unsigned char *) dma_base_addr[dmanr];
146
147 /* Turn off external requests, and stop any DMA in progress */
148 dmawp[MCFDMA_DCR] &= ~MCFDMA_DCR_EEXT;
149 dmapb[MCFDMA_DSR] = MCFDMA_DSR_DONE;
150}
151
152/*
153 * Clear the 'DMA Pointer Flip Flop'.
154 * Write 0 for LSB/MSB, 1 for MSB/LSB access.
155 * Use this once to initialize the FF to a known state.
156 * After that, keep track of it. :-)
157 * --- In order to do that, the DMA routines below should ---
158 * --- only be used while interrupts are disabled! ---
159 *
160 * This is a NOP for ColdFire. Provide a stub for compatibility.
161 */
162static __inline__ void clear_dma_ff(unsigned int dmanr)
163{
164}
165
166/* set mode (above) for a specific DMA channel */
167static __inline__ void set_dma_mode(unsigned int dmanr, char mode)
168{
169
170 volatile unsigned char *dmabp;
171 volatile unsigned short *dmawp;
172
173#ifdef DMA_DEBUG
174 printk("set_dma_mode(dmanr=%d,mode=%d)\n", dmanr, mode);
175#endif
176
177 dmabp = (unsigned char *) dma_base_addr[dmanr];
178 dmawp = (unsigned short *) dma_base_addr[dmanr];
179
180 /* Clear config errors */
181 dmabp[MCFDMA_DSR] = MCFDMA_DSR_DONE;
182
183 /* Set command register */
184 dmawp[MCFDMA_DCR] =
185 MCFDMA_DCR_INT | /* Enable completion irq */
186 MCFDMA_DCR_CS | /* Force one xfer per request */
187 MCFDMA_DCR_AA | /* Enable auto alignment */
188 /* single-address-mode */
189 ((mode & DMA_MODE_SINGLE_BIT) ? MCFDMA_DCR_SAA : 0) |
190 /* sets s_rw (-> r/w) high if Memory to I/0 */
191 ((mode & DMA_MODE_WRITE_BIT) ? MCFDMA_DCR_S_RW : 0) |
192 /* Memory to I/O or I/O to Memory */
193 ((mode & DMA_MODE_WRITE_BIT) ? MCFDMA_DCR_SINC : MCFDMA_DCR_DINC) |
194 /* 32 bit, 16 bit or 8 bit transfers */
195 ((mode & DMA_MODE_WORD_BIT) ? MCFDMA_DCR_SSIZE_WORD :
196 ((mode & DMA_MODE_LONG_BIT) ? MCFDMA_DCR_SSIZE_LONG :
197 MCFDMA_DCR_SSIZE_BYTE)) |
198 ((mode & DMA_MODE_WORD_BIT) ? MCFDMA_DCR_DSIZE_WORD :
199 ((mode & DMA_MODE_LONG_BIT) ? MCFDMA_DCR_DSIZE_LONG :
200 MCFDMA_DCR_DSIZE_BYTE));
201
202#ifdef DEBUG_DMA
203 printk("%s(%d): dmanr=%d DSR[%x]=%x DCR[%x]=%x\n", __FILE__, __LINE__,
204 dmanr, (int) &dmabp[MCFDMA_DSR], dmabp[MCFDMA_DSR],
205 (int) &dmawp[MCFDMA_DCR], dmawp[MCFDMA_DCR]);
206#endif
207}
208
209/* Set transfer address for specific DMA channel */
210static __inline__ void set_dma_addr(unsigned int dmanr, unsigned int a)
211{
212 volatile unsigned short *dmawp;
213 volatile unsigned int *dmalp;
214
215#ifdef DMA_DEBUG
216 printk("set_dma_addr(dmanr=%d,a=%x)\n", dmanr, a);
217#endif
218
219 dmawp = (unsigned short *) dma_base_addr[dmanr];
220 dmalp = (unsigned int *) dma_base_addr[dmanr];
221
222 /* Determine which address registers are used for memory/device accesses */
223 if (dmawp[MCFDMA_DCR] & MCFDMA_DCR_SINC) {
224 /* Source incrementing, must be memory */
225 dmalp[MCFDMA_SAR] = a;
226 /* Set dest address, must be device */
227 dmalp[MCFDMA_DAR] = dma_device_address[dmanr];
228 } else {
229 /* Destination incrementing, must be memory */
230 dmalp[MCFDMA_DAR] = a;
231 /* Set source address, must be device */
232 dmalp[MCFDMA_SAR] = dma_device_address[dmanr];
233 }
234
235#ifdef DEBUG_DMA
236 printk("%s(%d): dmanr=%d DCR[%x]=%x SAR[%x]=%08x DAR[%x]=%08x\n",
237 __FILE__, __LINE__, dmanr, (int) &dmawp[MCFDMA_DCR], dmawp[MCFDMA_DCR],
238 (int) &dmalp[MCFDMA_SAR], dmalp[MCFDMA_SAR],
239 (int) &dmalp[MCFDMA_DAR], dmalp[MCFDMA_DAR]);
240#endif
241}
242
243/*
244 * Specific for Coldfire - sets device address.
245 * Should be called after the mode set call, and before set DMA address.
246 */
247static __inline__ void set_dma_device_addr(unsigned int dmanr, unsigned int a)
248{
249#ifdef DMA_DEBUG
250 printk("set_dma_device_addr(dmanr=%d,a=%x)\n", dmanr, a);
251#endif
252
253 dma_device_address[dmanr] = a;
254}
255
256/*
257 * NOTE 2: "count" represents _bytes_.
258 */
259static __inline__ void set_dma_count(unsigned int dmanr, unsigned int count)
260{
261 volatile unsigned short *dmawp;
262
263#ifdef DMA_DEBUG
264 printk("set_dma_count(dmanr=%d,count=%d)\n", dmanr, count);
265#endif
266
267 dmawp = (unsigned short *) dma_base_addr[dmanr];
268 dmawp[MCFDMA_BCR] = (unsigned short)count;
269}
270
271/*
272 * Get DMA residue count. After a DMA transfer, this
273 * should return zero. Reading this while a DMA transfer is
274 * still in progress will return unpredictable results.
275 * Otherwise, it returns the number of _bytes_ left to transfer.
276 */
277static __inline__ int get_dma_residue(unsigned int dmanr)
278{
279 volatile unsigned short *dmawp;
280 unsigned short count;
281
282#ifdef DMA_DEBUG
283 printk("get_dma_residue(dmanr=%d)\n", dmanr);
284#endif
285
286 dmawp = (unsigned short *) dma_base_addr[dmanr];
287 count = dmawp[MCFDMA_BCR];
288 return((int) count);
289}
290#else /* CONFIG_M5272 is defined */
291
292/*
293 * The MCF5272 DMA controller is very different than the controller defined above
294 * in terms of register mapping. For instance, with the exception of the 16-bit
295 * interrupt register (IRQ#85, for reference), all of the registers are 32-bit.
296 *
297 * The big difference, however, is the lack of device-requested DMA. All modes
298 * are dual address transfer, and there is no 'device' setup or direction bit.
299 * You can DMA between a device and memory, between memory and memory, or even between
300 * two devices directly, with any combination of incrementing and non-incrementing
301 * addresses you choose. This puts a crimp in distinguishing between the 'device
302 * address' set up by set_dma_device_addr.
303 *
304 * Therefore, there are two options. One is to use set_dma_addr and set_dma_device_addr,
305 * which will act exactly as above in -- it will look to see if the source is set to
306 * autoincrement, and if so it will make the source use the set_dma_addr value and the
307 * destination the set_dma_device_addr value. Otherwise the source will be set to the
308 * set_dma_device_addr value and the destination will get the set_dma_addr value.
309 *
310 * The other is to use the provided set_dma_src_addr and set_dma_dest_addr functions
311 * and make it explicit. Depending on what you're doing, one of these two should work
312 * for you, but don't mix them in the same transfer setup.
313 */
314
315/* enable/disable a specific DMA channel */
316static __inline__ void enable_dma(unsigned int dmanr)
317{
318 volatile unsigned int *dmalp;
319
320#ifdef DMA_DEBUG
321 printk("enable_dma(dmanr=%d)\n", dmanr);
322#endif
323
324 dmalp = (unsigned int *) dma_base_addr[dmanr];
325 dmalp[MCFDMA_DMR] |= MCFDMA_DMR_EN;
326}
327
328static __inline__ void disable_dma(unsigned int dmanr)
329{
330 volatile unsigned int *dmalp;
331
332#ifdef DMA_DEBUG
333 printk("disable_dma(dmanr=%d)\n", dmanr);
334#endif
335
336 dmalp = (unsigned int *) dma_base_addr[dmanr];
337
338 /* Turn off external requests, and stop any DMA in progress */
339 dmalp[MCFDMA_DMR] &= ~MCFDMA_DMR_EN;
340 dmalp[MCFDMA_DMR] |= MCFDMA_DMR_RESET;
341}
342
343/*
344 * Clear the 'DMA Pointer Flip Flop'.
345 * Write 0 for LSB/MSB, 1 for MSB/LSB access.
346 * Use this once to initialize the FF to a known state.
347 * After that, keep track of it. :-)
348 * --- In order to do that, the DMA routines below should ---
349 * --- only be used while interrupts are disabled! ---
350 *
351 * This is a NOP for ColdFire. Provide a stub for compatibility.
352 */
353static __inline__ void clear_dma_ff(unsigned int dmanr)
354{
355}
356
357/* set mode (above) for a specific DMA channel */
358static __inline__ void set_dma_mode(unsigned int dmanr, char mode)
359{
360
361 volatile unsigned int *dmalp;
362 volatile unsigned short *dmawp;
363
364#ifdef DMA_DEBUG
365 printk("set_dma_mode(dmanr=%d,mode=%d)\n", dmanr, mode);
366#endif
367 dmalp = (unsigned int *) dma_base_addr[dmanr];
368 dmawp = (unsigned short *) dma_base_addr[dmanr];
369
370 /* Clear config errors */
371 dmalp[MCFDMA_DMR] |= MCFDMA_DMR_RESET;
372
373 /* Set command register */
374 dmalp[MCFDMA_DMR] =
375 MCFDMA_DMR_RQM_DUAL | /* Mandatory Request Mode setting */
376 MCFDMA_DMR_DSTT_SD | /* Set up addressing types; set to supervisor-data. */
377 MCFDMA_DMR_SRCT_SD | /* Set up addressing types; set to supervisor-data. */
378 /* source static-address-mode */
379 ((mode & DMA_MODE_SRC_SA_BIT) ? MCFDMA_DMR_SRCM_SA : MCFDMA_DMR_SRCM_IA) |
380 /* dest static-address-mode */
381 ((mode & DMA_MODE_DES_SA_BIT) ? MCFDMA_DMR_DSTM_SA : MCFDMA_DMR_DSTM_IA) |
382 /* burst, 32 bit, 16 bit or 8 bit transfers are separately configurable on the MCF5272 */
383 (((mode & DMA_MODE_SSIZE_MASK) >> DMA_MODE_SSIZE_OFF) << MCFDMA_DMR_DSTS_OFF) |
384 (((mode & DMA_MODE_SSIZE_MASK) >> DMA_MODE_SSIZE_OFF) << MCFDMA_DMR_SRCS_OFF);
385
386 dmawp[MCFDMA_DIR] |= MCFDMA_DIR_ASCEN; /* Enable completion interrupts */
387
388#ifdef DEBUG_DMA
389 printk("%s(%d): dmanr=%d DMR[%x]=%x DIR[%x]=%x\n", __FILE__, __LINE__,
390 dmanr, (int) &dmalp[MCFDMA_DMR], dmabp[MCFDMA_DMR],
391 (int) &dmawp[MCFDMA_DIR], dmawp[MCFDMA_DIR]);
392#endif
393}
394
395/* Set transfer address for specific DMA channel */
396static __inline__ void set_dma_addr(unsigned int dmanr, unsigned int a)
397{
398 volatile unsigned int *dmalp;
399
400#ifdef DMA_DEBUG
401 printk("set_dma_addr(dmanr=%d,a=%x)\n", dmanr, a);
402#endif
403
404 dmalp = (unsigned int *) dma_base_addr[dmanr];
405
406 /* Determine which address registers are used for memory/device accesses */
407 if (dmalp[MCFDMA_DMR] & MCFDMA_DMR_SRCM) {
408 /* Source incrementing, must be memory */
409 dmalp[MCFDMA_DSAR] = a;
410 /* Set dest address, must be device */
411 dmalp[MCFDMA_DDAR] = dma_device_address[dmanr];
412 } else {
413 /* Destination incrementing, must be memory */
414 dmalp[MCFDMA_DDAR] = a;
415 /* Set source address, must be device */
416 dmalp[MCFDMA_DSAR] = dma_device_address[dmanr];
417 }
418
419#ifdef DEBUG_DMA
420 printk("%s(%d): dmanr=%d DMR[%x]=%x SAR[%x]=%08x DAR[%x]=%08x\n",
421 __FILE__, __LINE__, dmanr, (int) &dmawp[MCFDMA_DMR], dmawp[MCFDMA_DMR],
422 (int) &dmalp[MCFDMA_DSAR], dmalp[MCFDMA_DSAR],
423 (int) &dmalp[MCFDMA_DDAR], dmalp[MCFDMA_DDAR]);
424#endif
425}
426
427/*
428 * Specific for Coldfire - sets device address.
429 * Should be called after the mode set call, and before set DMA address.
430 */
431static __inline__ void set_dma_device_addr(unsigned int dmanr, unsigned int a)
432{
433#ifdef DMA_DEBUG
434 printk("set_dma_device_addr(dmanr=%d,a=%x)\n", dmanr, a);
435#endif
436
437 dma_device_address[dmanr] = a;
438}
439
440/*
441 * NOTE 2: "count" represents _bytes_.
442 *
443 * NOTE 3: While a 32-bit register, "count" is only a maximum 24-bit value.
444 */
445static __inline__ void set_dma_count(unsigned int dmanr, unsigned int count)
446{
447 volatile unsigned int *dmalp;
448
449#ifdef DMA_DEBUG
450 printk("set_dma_count(dmanr=%d,count=%d)\n", dmanr, count);
451#endif
452
453 dmalp = (unsigned int *) dma_base_addr[dmanr];
454 dmalp[MCFDMA_DBCR] = count;
455}
456
457/*
458 * Get DMA residue count. After a DMA transfer, this
459 * should return zero. Reading this while a DMA transfer is
460 * still in progress will return unpredictable results.
461 * Otherwise, it returns the number of _bytes_ left to transfer.
462 */
463static __inline__ int get_dma_residue(unsigned int dmanr)
464{
465 volatile unsigned int *dmalp;
466 unsigned int count;
467
468#ifdef DMA_DEBUG
469 printk("get_dma_residue(dmanr=%d)\n", dmanr);
470#endif
471
472 dmalp = (unsigned int *) dma_base_addr[dmanr];
473 count = dmalp[MCFDMA_DBCR];
474 return(count);
475}
476
477#endif /* !defined(CONFIG_M5272) */
478#endif /* CONFIG_COLDFIRE */
479
480/* it's useless on the m68k, but unfortunately needed by the new
481 bootmem allocator (but this should do it for this) */
482#define MAX_DMA_ADDRESS PAGE_OFFSET
483
484#define MAX_DMA_CHANNELS 8
485
486extern int request_dma(unsigned int dmanr, const char * device_id); /* reserve a DMA channel */
487extern void free_dma(unsigned int dmanr); /* release it again */
488
489#define isa_dma_bridge_buggy (0)
490
491#endif /* _M68K_DMA_H */
diff --git a/arch/m68k/include/asm/dma_mm.h b/arch/m68k/include/asm/dma_mm.h
deleted file mode 100644
index 4240fbc946f8..000000000000
--- a/arch/m68k/include/asm/dma_mm.h
+++ /dev/null
@@ -1,16 +0,0 @@
1#ifndef _M68K_DMA_H
2#define _M68K_DMA_H 1
3
4
5/* it's useless on the m68k, but unfortunately needed by the new
6 bootmem allocator (but this should do it for this) */
7#define MAX_DMA_ADDRESS PAGE_OFFSET
8
9#define MAX_DMA_CHANNELS 8
10
11extern int request_dma(unsigned int dmanr, const char * device_id); /* reserve a DMA channel */
12extern void free_dma(unsigned int dmanr); /* release it again */
13
14#define isa_dma_bridge_buggy (0)
15
16#endif /* _M68K_DMA_H */
diff --git a/arch/m68k/include/asm/dma_no.h b/arch/m68k/include/asm/dma_no.h
deleted file mode 100644
index 939a02056217..000000000000
--- a/arch/m68k/include/asm/dma_no.h
+++ /dev/null
@@ -1,494 +0,0 @@
1#ifndef _M68K_DMA_H
2#define _M68K_DMA_H 1
3
4//#define DMA_DEBUG 1
5
6
7#ifdef CONFIG_COLDFIRE
8/*
9 * ColdFire DMA Model:
10 * ColdFire DMA supports two forms of DMA: Single and Dual address. Single
11 * address mode emits a source address, and expects that the device will either
12 * pick up the data (DMA READ) or source data (DMA WRITE). This implies that
13 * the device will place data on the correct byte(s) of the data bus, as the
14 * memory transactions are always 32 bits. This implies that only 32 bit
15 * devices will find single mode transfers useful. Dual address DMA mode
16 * performs two cycles: source read and destination write. ColdFire will
17 * align the data so that the device will always get the correct bytes, thus
18 * is useful for 8 and 16 bit devices. This is the mode that is supported
19 * below.
20 *
21 * AUG/22/2000 : added support for 32-bit Dual-Address-Mode (K) 2000
22 * Oliver Kamphenkel (O.Kamphenkel@tu-bs.de)
23 *
24 * AUG/25/2000 : addad support for 8, 16 and 32-bit Single-Address-Mode (K)2000
25 * Oliver Kamphenkel (O.Kamphenkel@tu-bs.de)
26 *
27 * APR/18/2002 : added proper support for MCF5272 DMA controller.
28 * Arthur Shipkowski (art@videon-central.com)
29 */
30
31#include <asm/coldfire.h>
32#include <asm/mcfsim.h>
33#include <asm/mcfdma.h>
34
35/*
36 * Set number of channels of DMA on ColdFire for different implementations.
37 */
38#if defined(CONFIG_M5249) || defined(CONFIG_M5307) || defined(CONFIG_M5407) || \
39 defined(CONFIG_M523x) || defined(CONFIG_M527x) || defined(CONFIG_M528x)
40#define MAX_M68K_DMA_CHANNELS 4
41#elif defined(CONFIG_M5272)
42#define MAX_M68K_DMA_CHANNELS 1
43#elif defined(CONFIG_M532x)
44#define MAX_M68K_DMA_CHANNELS 0
45#else
46#define MAX_M68K_DMA_CHANNELS 2
47#endif
48
49extern unsigned int dma_base_addr[MAX_M68K_DMA_CHANNELS];
50extern unsigned int dma_device_address[MAX_M68K_DMA_CHANNELS];
51
52#if !defined(CONFIG_M5272)
53#define DMA_MODE_WRITE_BIT 0x01 /* Memory/IO to IO/Memory select */
54#define DMA_MODE_WORD_BIT 0x02 /* 8 or 16 bit transfers */
55#define DMA_MODE_LONG_BIT 0x04 /* or 32 bit transfers */
56#define DMA_MODE_SINGLE_BIT 0x08 /* single-address-mode */
57
58/* I/O to memory, 8 bits, mode */
59#define DMA_MODE_READ 0
60/* memory to I/O, 8 bits, mode */
61#define DMA_MODE_WRITE 1
62/* I/O to memory, 16 bits, mode */
63#define DMA_MODE_READ_WORD 2
64/* memory to I/O, 16 bits, mode */
65#define DMA_MODE_WRITE_WORD 3
66/* I/O to memory, 32 bits, mode */
67#define DMA_MODE_READ_LONG 4
68/* memory to I/O, 32 bits, mode */
69#define DMA_MODE_WRITE_LONG 5
70/* I/O to memory, 8 bits, single-address-mode */
71#define DMA_MODE_READ_SINGLE 8
72/* memory to I/O, 8 bits, single-address-mode */
73#define DMA_MODE_WRITE_SINGLE 9
74/* I/O to memory, 16 bits, single-address-mode */
75#define DMA_MODE_READ_WORD_SINGLE 10
76/* memory to I/O, 16 bits, single-address-mode */
77#define DMA_MODE_WRITE_WORD_SINGLE 11
78/* I/O to memory, 32 bits, single-address-mode */
79#define DMA_MODE_READ_LONG_SINGLE 12
80/* memory to I/O, 32 bits, single-address-mode */
81#define DMA_MODE_WRITE_LONG_SINGLE 13
82
83#else /* CONFIG_M5272 is defined */
84
85/* Source static-address mode */
86#define DMA_MODE_SRC_SA_BIT 0x01
87/* Two bits to select between all four modes */
88#define DMA_MODE_SSIZE_MASK 0x06
89/* Offset to shift bits in */
90#define DMA_MODE_SSIZE_OFF 0x01
91/* Destination static-address mode */
92#define DMA_MODE_DES_SA_BIT 0x10
93/* Two bits to select between all four modes */
94#define DMA_MODE_DSIZE_MASK 0x60
95/* Offset to shift bits in */
96#define DMA_MODE_DSIZE_OFF 0x05
97/* Size modifiers */
98#define DMA_MODE_SIZE_LONG 0x00
99#define DMA_MODE_SIZE_BYTE 0x01
100#define DMA_MODE_SIZE_WORD 0x02
101#define DMA_MODE_SIZE_LINE 0x03
102
103/*
104 * Aliases to help speed quick ports; these may be suboptimal, however. They
105 * do not include the SINGLE mode modifiers since the MCF5272 does not have a
106 * mode where the device is in control of its addressing.
107 */
108
109/* I/O to memory, 8 bits, mode */
110#define DMA_MODE_READ ((DMA_MODE_SIZE_BYTE << DMA_MODE_DSIZE_OFF) | (DMA_MODE_SIZE_BYTE << DMA_MODE_SSIZE_OFF) | DMA_SRC_SA_BIT)
111/* memory to I/O, 8 bits, mode */
112#define DMA_MODE_WRITE ((DMA_MODE_SIZE_BYTE << DMA_MODE_DSIZE_OFF) | (DMA_MODE_SIZE_BYTE << DMA_MODE_SSIZE_OFF) | DMA_DES_SA_BIT)
113/* I/O to memory, 16 bits, mode */
114#define DMA_MODE_READ_WORD ((DMA_MODE_SIZE_WORD << DMA_MODE_DSIZE_OFF) | (DMA_MODE_SIZE_WORD << DMA_MODE_SSIZE_OFF) | DMA_SRC_SA_BIT)
115/* memory to I/O, 16 bits, mode */
116#define DMA_MODE_WRITE_WORD ((DMA_MODE_SIZE_WORD << DMA_MODE_DSIZE_OFF) | (DMA_MODE_SIZE_WORD << DMA_MODE_SSIZE_OFF) | DMA_DES_SA_BIT)
117/* I/O to memory, 32 bits, mode */
118#define DMA_MODE_READ_LONG ((DMA_MODE_SIZE_LONG << DMA_MODE_DSIZE_OFF) | (DMA_MODE_SIZE_LONG << DMA_MODE_SSIZE_OFF) | DMA_SRC_SA_BIT)
119/* memory to I/O, 32 bits, mode */
120#define DMA_MODE_WRITE_LONG ((DMA_MODE_SIZE_LONG << DMA_MODE_DSIZE_OFF) | (DMA_MODE_SIZE_LONG << DMA_MODE_SSIZE_OFF) | DMA_DES_SA_BIT)
121
122#endif /* !defined(CONFIG_M5272) */
123
124#if !defined(CONFIG_M5272)
125/* enable/disable a specific DMA channel */
126static __inline__ void enable_dma(unsigned int dmanr)
127{
128 volatile unsigned short *dmawp;
129
130#ifdef DMA_DEBUG
131 printk("enable_dma(dmanr=%d)\n", dmanr);
132#endif
133
134 dmawp = (unsigned short *) dma_base_addr[dmanr];
135 dmawp[MCFDMA_DCR] |= MCFDMA_DCR_EEXT;
136}
137
138static __inline__ void disable_dma(unsigned int dmanr)
139{
140 volatile unsigned short *dmawp;
141 volatile unsigned char *dmapb;
142
143#ifdef DMA_DEBUG
144 printk("disable_dma(dmanr=%d)\n", dmanr);
145#endif
146
147 dmawp = (unsigned short *) dma_base_addr[dmanr];
148 dmapb = (unsigned char *) dma_base_addr[dmanr];
149
150 /* Turn off external requests, and stop any DMA in progress */
151 dmawp[MCFDMA_DCR] &= ~MCFDMA_DCR_EEXT;
152 dmapb[MCFDMA_DSR] = MCFDMA_DSR_DONE;
153}
154
155/*
156 * Clear the 'DMA Pointer Flip Flop'.
157 * Write 0 for LSB/MSB, 1 for MSB/LSB access.
158 * Use this once to initialize the FF to a known state.
159 * After that, keep track of it. :-)
160 * --- In order to do that, the DMA routines below should ---
161 * --- only be used while interrupts are disabled! ---
162 *
163 * This is a NOP for ColdFire. Provide a stub for compatibility.
164 */
165static __inline__ void clear_dma_ff(unsigned int dmanr)
166{
167}
168
169/* set mode (above) for a specific DMA channel */
170static __inline__ void set_dma_mode(unsigned int dmanr, char mode)
171{
172
173 volatile unsigned char *dmabp;
174 volatile unsigned short *dmawp;
175
176#ifdef DMA_DEBUG
177 printk("set_dma_mode(dmanr=%d,mode=%d)\n", dmanr, mode);
178#endif
179
180 dmabp = (unsigned char *) dma_base_addr[dmanr];
181 dmawp = (unsigned short *) dma_base_addr[dmanr];
182
183 // Clear config errors
184 dmabp[MCFDMA_DSR] = MCFDMA_DSR_DONE;
185
186 // Set command register
187 dmawp[MCFDMA_DCR] =
188 MCFDMA_DCR_INT | // Enable completion irq
189 MCFDMA_DCR_CS | // Force one xfer per request
190 MCFDMA_DCR_AA | // Enable auto alignment
191 // single-address-mode
192 ((mode & DMA_MODE_SINGLE_BIT) ? MCFDMA_DCR_SAA : 0) |
193 // sets s_rw (-> r/w) high if Memory to I/0
194 ((mode & DMA_MODE_WRITE_BIT) ? MCFDMA_DCR_S_RW : 0) |
195 // Memory to I/O or I/O to Memory
196 ((mode & DMA_MODE_WRITE_BIT) ? MCFDMA_DCR_SINC : MCFDMA_DCR_DINC) |
197 // 32 bit, 16 bit or 8 bit transfers
198 ((mode & DMA_MODE_WORD_BIT) ? MCFDMA_DCR_SSIZE_WORD :
199 ((mode & DMA_MODE_LONG_BIT) ? MCFDMA_DCR_SSIZE_LONG :
200 MCFDMA_DCR_SSIZE_BYTE)) |
201 ((mode & DMA_MODE_WORD_BIT) ? MCFDMA_DCR_DSIZE_WORD :
202 ((mode & DMA_MODE_LONG_BIT) ? MCFDMA_DCR_DSIZE_LONG :
203 MCFDMA_DCR_DSIZE_BYTE));
204
205#ifdef DEBUG_DMA
206 printk("%s(%d): dmanr=%d DSR[%x]=%x DCR[%x]=%x\n", __FILE__, __LINE__,
207 dmanr, (int) &dmabp[MCFDMA_DSR], dmabp[MCFDMA_DSR],
208 (int) &dmawp[MCFDMA_DCR], dmawp[MCFDMA_DCR]);
209#endif
210}
211
212/* Set transfer address for specific DMA channel */
213static __inline__ void set_dma_addr(unsigned int dmanr, unsigned int a)
214{
215 volatile unsigned short *dmawp;
216 volatile unsigned int *dmalp;
217
218#ifdef DMA_DEBUG
219 printk("set_dma_addr(dmanr=%d,a=%x)\n", dmanr, a);
220#endif
221
222 dmawp = (unsigned short *) dma_base_addr[dmanr];
223 dmalp = (unsigned int *) dma_base_addr[dmanr];
224
225 // Determine which address registers are used for memory/device accesses
226 if (dmawp[MCFDMA_DCR] & MCFDMA_DCR_SINC) {
227 // Source incrementing, must be memory
228 dmalp[MCFDMA_SAR] = a;
229 // Set dest address, must be device
230 dmalp[MCFDMA_DAR] = dma_device_address[dmanr];
231 } else {
232 // Destination incrementing, must be memory
233 dmalp[MCFDMA_DAR] = a;
234 // Set source address, must be device
235 dmalp[MCFDMA_SAR] = dma_device_address[dmanr];
236 }
237
238#ifdef DEBUG_DMA
239 printk("%s(%d): dmanr=%d DCR[%x]=%x SAR[%x]=%08x DAR[%x]=%08x\n",
240 __FILE__, __LINE__, dmanr, (int) &dmawp[MCFDMA_DCR], dmawp[MCFDMA_DCR],
241 (int) &dmalp[MCFDMA_SAR], dmalp[MCFDMA_SAR],
242 (int) &dmalp[MCFDMA_DAR], dmalp[MCFDMA_DAR]);
243#endif
244}
245
246/*
247 * Specific for Coldfire - sets device address.
248 * Should be called after the mode set call, and before set DMA address.
249 */
250static __inline__ void set_dma_device_addr(unsigned int dmanr, unsigned int a)
251{
252#ifdef DMA_DEBUG
253 printk("set_dma_device_addr(dmanr=%d,a=%x)\n", dmanr, a);
254#endif
255
256 dma_device_address[dmanr] = a;
257}
258
259/*
260 * NOTE 2: "count" represents _bytes_.
261 */
262static __inline__ void set_dma_count(unsigned int dmanr, unsigned int count)
263{
264 volatile unsigned short *dmawp;
265
266#ifdef DMA_DEBUG
267 printk("set_dma_count(dmanr=%d,count=%d)\n", dmanr, count);
268#endif
269
270 dmawp = (unsigned short *) dma_base_addr[dmanr];
271 dmawp[MCFDMA_BCR] = (unsigned short)count;
272}
273
274/*
275 * Get DMA residue count. After a DMA transfer, this
276 * should return zero. Reading this while a DMA transfer is
277 * still in progress will return unpredictable results.
278 * Otherwise, it returns the number of _bytes_ left to transfer.
279 */
280static __inline__ int get_dma_residue(unsigned int dmanr)
281{
282 volatile unsigned short *dmawp;
283 unsigned short count;
284
285#ifdef DMA_DEBUG
286 printk("get_dma_residue(dmanr=%d)\n", dmanr);
287#endif
288
289 dmawp = (unsigned short *) dma_base_addr[dmanr];
290 count = dmawp[MCFDMA_BCR];
291 return((int) count);
292}
293#else /* CONFIG_M5272 is defined */
294
295/*
296 * The MCF5272 DMA controller is very different than the controller defined above
297 * in terms of register mapping. For instance, with the exception of the 16-bit
298 * interrupt register (IRQ#85, for reference), all of the registers are 32-bit.
299 *
300 * The big difference, however, is the lack of device-requested DMA. All modes
301 * are dual address transfer, and there is no 'device' setup or direction bit.
302 * You can DMA between a device and memory, between memory and memory, or even between
303 * two devices directly, with any combination of incrementing and non-incrementing
304 * addresses you choose. This puts a crimp in distinguishing between the 'device
305 * address' set up by set_dma_device_addr.
306 *
307 * Therefore, there are two options. One is to use set_dma_addr and set_dma_device_addr,
308 * which will act exactly as above in -- it will look to see if the source is set to
309 * autoincrement, and if so it will make the source use the set_dma_addr value and the
310 * destination the set_dma_device_addr value. Otherwise the source will be set to the
311 * set_dma_device_addr value and the destination will get the set_dma_addr value.
312 *
313 * The other is to use the provided set_dma_src_addr and set_dma_dest_addr functions
314 * and make it explicit. Depending on what you're doing, one of these two should work
315 * for you, but don't mix them in the same transfer setup.
316 */
317
318/* enable/disable a specific DMA channel */
319static __inline__ void enable_dma(unsigned int dmanr)
320{
321 volatile unsigned int *dmalp;
322
323#ifdef DMA_DEBUG
324 printk("enable_dma(dmanr=%d)\n", dmanr);
325#endif
326
327 dmalp = (unsigned int *) dma_base_addr[dmanr];
328 dmalp[MCFDMA_DMR] |= MCFDMA_DMR_EN;
329}
330
331static __inline__ void disable_dma(unsigned int dmanr)
332{
333 volatile unsigned int *dmalp;
334
335#ifdef DMA_DEBUG
336 printk("disable_dma(dmanr=%d)\n", dmanr);
337#endif
338
339 dmalp = (unsigned int *) dma_base_addr[dmanr];
340
341 /* Turn off external requests, and stop any DMA in progress */
342 dmalp[MCFDMA_DMR] &= ~MCFDMA_DMR_EN;
343 dmalp[MCFDMA_DMR] |= MCFDMA_DMR_RESET;
344}
345
346/*
347 * Clear the 'DMA Pointer Flip Flop'.
348 * Write 0 for LSB/MSB, 1 for MSB/LSB access.
349 * Use this once to initialize the FF to a known state.
350 * After that, keep track of it. :-)
351 * --- In order to do that, the DMA routines below should ---
352 * --- only be used while interrupts are disabled! ---
353 *
354 * This is a NOP for ColdFire. Provide a stub for compatibility.
355 */
356static __inline__ void clear_dma_ff(unsigned int dmanr)
357{
358}
359
360/* set mode (above) for a specific DMA channel */
361static __inline__ void set_dma_mode(unsigned int dmanr, char mode)
362{
363
364 volatile unsigned int *dmalp;
365 volatile unsigned short *dmawp;
366
367#ifdef DMA_DEBUG
368 printk("set_dma_mode(dmanr=%d,mode=%d)\n", dmanr, mode);
369#endif
370 dmalp = (unsigned int *) dma_base_addr[dmanr];
371 dmawp = (unsigned short *) dma_base_addr[dmanr];
372
373 // Clear config errors
374 dmalp[MCFDMA_DMR] |= MCFDMA_DMR_RESET;
375
376 // Set command register
377 dmalp[MCFDMA_DMR] =
378 MCFDMA_DMR_RQM_DUAL | // Mandatory Request Mode setting
379 MCFDMA_DMR_DSTT_SD | // Set up addressing types; set to supervisor-data.
380 MCFDMA_DMR_SRCT_SD | // Set up addressing types; set to supervisor-data.
381 // source static-address-mode
382 ((mode & DMA_MODE_SRC_SA_BIT) ? MCFDMA_DMR_SRCM_SA : MCFDMA_DMR_SRCM_IA) |
383 // dest static-address-mode
384 ((mode & DMA_MODE_DES_SA_BIT) ? MCFDMA_DMR_DSTM_SA : MCFDMA_DMR_DSTM_IA) |
385 // burst, 32 bit, 16 bit or 8 bit transfers are separately configurable on the MCF5272
386 (((mode & DMA_MODE_SSIZE_MASK) >> DMA_MODE_SSIZE_OFF) << MCFDMA_DMR_DSTS_OFF) |
387 (((mode & DMA_MODE_SSIZE_MASK) >> DMA_MODE_SSIZE_OFF) << MCFDMA_DMR_SRCS_OFF);
388
389 dmawp[MCFDMA_DIR] |= MCFDMA_DIR_ASCEN; /* Enable completion interrupts */
390
391#ifdef DEBUG_DMA
392 printk("%s(%d): dmanr=%d DMR[%x]=%x DIR[%x]=%x\n", __FILE__, __LINE__,
393 dmanr, (int) &dmalp[MCFDMA_DMR], dmabp[MCFDMA_DMR],
394 (int) &dmawp[MCFDMA_DIR], dmawp[MCFDMA_DIR]);
395#endif
396}
397
398/* Set transfer address for specific DMA channel */
399static __inline__ void set_dma_addr(unsigned int dmanr, unsigned int a)
400{
401 volatile unsigned int *dmalp;
402
403#ifdef DMA_DEBUG
404 printk("set_dma_addr(dmanr=%d,a=%x)\n", dmanr, a);
405#endif
406
407 dmalp = (unsigned int *) dma_base_addr[dmanr];
408
409 // Determine which address registers are used for memory/device accesses
410 if (dmalp[MCFDMA_DMR] & MCFDMA_DMR_SRCM) {
411 // Source incrementing, must be memory
412 dmalp[MCFDMA_DSAR] = a;
413 // Set dest address, must be device
414 dmalp[MCFDMA_DDAR] = dma_device_address[dmanr];
415 } else {
416 // Destination incrementing, must be memory
417 dmalp[MCFDMA_DDAR] = a;
418 // Set source address, must be device
419 dmalp[MCFDMA_DSAR] = dma_device_address[dmanr];
420 }
421
422#ifdef DEBUG_DMA
423 printk("%s(%d): dmanr=%d DMR[%x]=%x SAR[%x]=%08x DAR[%x]=%08x\n",
424 __FILE__, __LINE__, dmanr, (int) &dmawp[MCFDMA_DMR], dmawp[MCFDMA_DMR],
425 (int) &dmalp[MCFDMA_DSAR], dmalp[MCFDMA_DSAR],
426 (int) &dmalp[MCFDMA_DDAR], dmalp[MCFDMA_DDAR]);
427#endif
428}
429
430/*
431 * Specific for Coldfire - sets device address.
432 * Should be called after the mode set call, and before set DMA address.
433 */
434static __inline__ void set_dma_device_addr(unsigned int dmanr, unsigned int a)
435{
436#ifdef DMA_DEBUG
437 printk("set_dma_device_addr(dmanr=%d,a=%x)\n", dmanr, a);
438#endif
439
440 dma_device_address[dmanr] = a;
441}
442
443/*
444 * NOTE 2: "count" represents _bytes_.
445 *
446 * NOTE 3: While a 32-bit register, "count" is only a maximum 24-bit value.
447 */
448static __inline__ void set_dma_count(unsigned int dmanr, unsigned int count)
449{
450 volatile unsigned int *dmalp;
451
452#ifdef DMA_DEBUG
453 printk("set_dma_count(dmanr=%d,count=%d)\n", dmanr, count);
454#endif
455
456 dmalp = (unsigned int *) dma_base_addr[dmanr];
457 dmalp[MCFDMA_DBCR] = count;
458}
459
460/*
461 * Get DMA residue count. After a DMA transfer, this
462 * should return zero. Reading this while a DMA transfer is
463 * still in progress will return unpredictable results.
464 * Otherwise, it returns the number of _bytes_ left to transfer.
465 */
466static __inline__ int get_dma_residue(unsigned int dmanr)
467{
468 volatile unsigned int *dmalp;
469 unsigned int count;
470
471#ifdef DMA_DEBUG
472 printk("get_dma_residue(dmanr=%d)\n", dmanr);
473#endif
474
475 dmalp = (unsigned int *) dma_base_addr[dmanr];
476 count = dmalp[MCFDMA_DBCR];
477 return(count);
478}
479
480#endif /* !defined(CONFIG_M5272) */
481#endif /* CONFIG_COLDFIRE */
482
483#define MAX_DMA_CHANNELS 8
484
485/* Don't define MAX_DMA_ADDRESS; it's useless on the m68k/coldfire and any
486 occurrence should be flagged as an error. */
487/* under 2.4 it is actually needed by the new bootmem allocator */
488#define MAX_DMA_ADDRESS PAGE_OFFSET
489
490/* These are in kernel/dma.c: */
491extern int request_dma(unsigned int dmanr, const char *device_id); /* reserve a DMA channel */
492extern void free_dma(unsigned int dmanr); /* release it again */
493
494#endif /* _M68K_DMA_H */
diff --git a/arch/m68k/include/asm/elia.h b/arch/m68k/include/asm/elia.h
deleted file mode 100644
index e037d4e2de33..000000000000
--- a/arch/m68k/include/asm/elia.h
+++ /dev/null
@@ -1,41 +0,0 @@
1/****************************************************************************/
2
3/*
4 * elia.h -- Lineo (formerly Moreton Bay) eLIA platform support.
5 *
6 * (C) Copyright 1999-2000, Moreton Bay (www.moreton.com.au)
7 * (C) Copyright 1999-2000, Lineo (www.lineo.com)
8 */
9
10/****************************************************************************/
11#ifndef elia_h
12#define elia_h
13/****************************************************************************/
14
15#include <asm/coldfire.h>
16
17#ifdef CONFIG_eLIA
18
19/*
20 * The serial port DTR and DCD lines are also on the Parallel I/O
21 * as well, so define those too.
22 */
23
24#define eLIA_DCD1 0x0001
25#define eLIA_DCD0 0x0002
26#define eLIA_DTR1 0x0004
27#define eLIA_DTR0 0x0008
28
29#define eLIA_PCIRESET 0x0020
30
31/*
32 * Kernel macros to set and unset the LEDs.
33 */
34#ifndef __ASSEMBLY__
35extern unsigned short ppdata;
36#endif /* __ASSEMBLY__ */
37
38#endif /* CONFIG_eLIA */
39
40/****************************************************************************/
41#endif /* elia_h */
diff --git a/arch/m68k/include/asm/gpio.h b/arch/m68k/include/asm/gpio.h
new file mode 100644
index 000000000000..283214dc65a7
--- /dev/null
+++ b/arch/m68k/include/asm/gpio.h
@@ -0,0 +1,238 @@
1/*
2 * Coldfire generic GPIO support
3 *
4 * (C) Copyright 2009, Steven King <sfking@fdwdc.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 as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14*/
15
16#ifndef coldfire_gpio_h
17#define coldfire_gpio_h
18
19#include <linux/io.h>
20#include <asm-generic/gpio.h>
21#include <asm/coldfire.h>
22#include <asm/mcfsim.h>
23
24/*
25 * The Freescale Coldfire family is quite varied in how they implement GPIO.
26 * Some parts have 8 bit ports, some have 16bit and some have 32bit; some have
27 * only one port, others have multiple ports; some have a single data latch
28 * for both input and output, others have a separate pin data register to read
29 * input; some require a read-modify-write access to change an output, others
30 * have set and clear registers for some of the outputs; Some have all the
31 * GPIOs in a single control area, others have some GPIOs implemented in
32 * different modules.
33 *
34 * This implementation attempts accomodate the differences while presenting
35 * a generic interface that will optimize to as few instructions as possible.
36 */
37#if defined(CONFIG_M5206) || defined(CONFIG_M5206e) || \
38 defined(CONFIG_M520x) || defined(CONFIG_M523x) || \
39 defined(CONFIG_M527x) || defined(CONFIG_M528x) || defined(CONFIG_M532x)
40
41/* These parts have GPIO organized by 8 bit ports */
42
43#define MCFGPIO_PORTTYPE u8
44#define MCFGPIO_PORTSIZE 8
45#define mcfgpio_read(port) __raw_readb(port)
46#define mcfgpio_write(data, port) __raw_writeb(data, port)
47
48#elif defined(CONFIG_M5307) || defined(CONFIG_M5407) || defined(CONFIG_M5272)
49
50/* These parts have GPIO organized by 16 bit ports */
51
52#define MCFGPIO_PORTTYPE u16
53#define MCFGPIO_PORTSIZE 16
54#define mcfgpio_read(port) __raw_readw(port)
55#define mcfgpio_write(data, port) __raw_writew(data, port)
56
57#elif defined(CONFIG_M5249)
58
59/* These parts have GPIO organized by 32 bit ports */
60
61#define MCFGPIO_PORTTYPE u32
62#define MCFGPIO_PORTSIZE 32
63#define mcfgpio_read(port) __raw_readl(port)
64#define mcfgpio_write(data, port) __raw_writel(data, port)
65
66#endif
67
68#define mcfgpio_bit(gpio) (1 << ((gpio) % MCFGPIO_PORTSIZE))
69#define mcfgpio_port(gpio) ((gpio) / MCFGPIO_PORTSIZE)
70
71#if defined(CONFIG_M520x) || defined(CONFIG_M523x) || \
72 defined(CONFIG_M527x) || defined(CONFIG_M528x) || defined(CONFIG_M532x)
73/*
74 * These parts have an 'Edge' Port module (external interrupt/GPIO) which uses
75 * read-modify-write to change an output and a GPIO module which has separate
76 * set/clr registers to directly change outputs with a single write access.
77 */
78#if defined(CONFIG_M528x)
79/*
80 * The 528x also has GPIOs in other modules (GPT, QADC) which use
81 * read-modify-write as well as those controlled by the EPORT and GPIO modules.
82 */
83#define MCFGPIO_SCR_START 40
84#else
85#define MCFGPIO_SCR_START 8
86#endif
87
88#define MCFGPIO_SETR_PORT(gpio) (MCFGPIO_SETR + \
89 mcfgpio_port(gpio - MCFGPIO_SCR_START))
90
91#define MCFGPIO_CLRR_PORT(gpio) (MCFGPIO_CLRR + \
92 mcfgpio_port(gpio - MCFGPIO_SCR_START))
93#else
94
95#define MCFGPIO_SCR_START MCFGPIO_PIN_MAX
96/* with MCFGPIO_SCR == MCFGPIO_PIN_MAX, these will be optimized away */
97#define MCFGPIO_SETR_PORT(gpio) 0
98#define MCFGPIO_CLRR_PORT(gpio) 0
99
100#endif
101/*
102 * Coldfire specific helper functions
103 */
104
105/* return the port pin data register for a gpio */
106static inline u32 __mcf_gpio_ppdr(unsigned gpio)
107{
108#if defined(CONFIG_M5206) || defined(CONFIG_M5206e) || \
109 defined(CONFIG_M5307) || defined(CONFIG_M5407)
110 return MCFSIM_PADAT;
111#elif defined(CONFIG_M5272)
112 if (gpio < 16)
113 return MCFSIM_PADAT;
114 else if (gpio < 32)
115 return MCFSIM_PBDAT;
116 else
117 return MCFSIM_PCDAT;
118#elif defined(CONFIG_M5249)
119 if (gpio < 32)
120 return MCFSIM2_GPIOREAD;
121 else
122 return MCFSIM2_GPIO1READ;
123#elif defined(CONFIG_M520x) || defined(CONFIG_M523x) || \
124 defined(CONFIG_M527x) || defined(CONFIG_M528x) || defined(CONFIG_M532x)
125 if (gpio < 8)
126 return MCFEPORT_EPPDR;
127#if defined(CONFIG_M528x)
128 else if (gpio < 16)
129 return MCFGPTA_GPTPORT;
130 else if (gpio < 24)
131 return MCFGPTB_GPTPORT;
132 else if (gpio < 32)
133 return MCFQADC_PORTQA;
134 else if (gpio < 40)
135 return MCFQADC_PORTQB;
136#endif
137 else
138 return MCFGPIO_PPDR + mcfgpio_port(gpio - MCFGPIO_SCR_START);
139#endif
140}
141
142/* return the port output data register for a gpio */
143static inline u32 __mcf_gpio_podr(unsigned gpio)
144{
145#if defined(CONFIG_M5206) || defined(CONFIG_M5206e) || \
146 defined(CONFIG_M5307) || defined(CONFIG_M5407)
147 return MCFSIM_PADAT;
148#elif defined(CONFIG_M5272)
149 if (gpio < 16)
150 return MCFSIM_PADAT;
151 else if (gpio < 32)
152 return MCFSIM_PBDAT;
153 else
154 return MCFSIM_PCDAT;
155#elif defined(CONFIG_M5249)
156 if (gpio < 32)
157 return MCFSIM2_GPIOWRITE;
158 else
159 return MCFSIM2_GPIO1WRITE;
160#elif defined(CONFIG_M520x) || defined(CONFIG_M523x) || \
161 defined(CONFIG_M527x) || defined(CONFIG_M528x) || defined(CONFIG_M532x)
162 if (gpio < 8)
163 return MCFEPORT_EPDR;
164#if defined(CONFIG_M528x)
165 else if (gpio < 16)
166 return MCFGPTA_GPTPORT;
167 else if (gpio < 24)
168 return MCFGPTB_GPTPORT;
169 else if (gpio < 32)
170 return MCFQADC_PORTQA;
171 else if (gpio < 40)
172 return MCFQADC_PORTQB;
173#endif
174 else
175 return MCFGPIO_PODR + mcfgpio_port(gpio - MCFGPIO_SCR_START);
176#endif
177}
178
179/*
180 * The Generic GPIO functions
181 *
182 * If the gpio is a compile time constant and is one of the Coldfire gpios,
183 * use the inline version, otherwise dispatch thru gpiolib.
184 */
185
186static inline int gpio_get_value(unsigned gpio)
187{
188 if (__builtin_constant_p(gpio) && gpio < MCFGPIO_PIN_MAX)
189 return mcfgpio_read(__mcf_gpio_ppdr(gpio)) & mcfgpio_bit(gpio);
190 else
191 return __gpio_get_value(gpio);
192}
193
194static inline void gpio_set_value(unsigned gpio, int value)
195{
196 if (__builtin_constant_p(gpio) && gpio < MCFGPIO_PIN_MAX) {
197 if (gpio < MCFGPIO_SCR_START) {
198 unsigned long flags;
199 MCFGPIO_PORTTYPE data;
200
201 local_irq_save(flags);
202 data = mcfgpio_read(__mcf_gpio_podr(gpio));
203 if (value)
204 data |= mcfgpio_bit(gpio);
205 else
206 data &= ~mcfgpio_bit(gpio);
207 mcfgpio_write(data, __mcf_gpio_podr(gpio));
208 local_irq_restore(flags);
209 } else {
210 if (value)
211 mcfgpio_write(mcfgpio_bit(gpio),
212 MCFGPIO_SETR_PORT(gpio));
213 else
214 mcfgpio_write(~mcfgpio_bit(gpio),
215 MCFGPIO_CLRR_PORT(gpio));
216 }
217 } else
218 __gpio_set_value(gpio, value);
219}
220
221static inline int gpio_to_irq(unsigned gpio)
222{
223 return (gpio < MCFGPIO_IRQ_MAX) ? gpio + MCFGPIO_IRQ_VECBASE : -EINVAL;
224}
225
226static inline int irq_to_gpio(unsigned irq)
227{
228 return (irq >= MCFGPIO_IRQ_VECBASE &&
229 irq < (MCFGPIO_IRQ_VECBASE + MCFGPIO_IRQ_MAX)) ?
230 irq - MCFGPIO_IRQ_VECBASE : -ENXIO;
231}
232
233static inline int gpio_cansleep(unsigned gpio)
234{
235 return gpio < MCFGPIO_PIN_MAX ? 0 : __gpio_cansleep(gpio);
236}
237
238#endif
diff --git a/arch/m68k/include/asm/hardirq_mm.h b/arch/m68k/include/asm/hardirq_mm.h
index 394ee946015c..554f65b6cd3b 100644
--- a/arch/m68k/include/asm/hardirq_mm.h
+++ b/arch/m68k/include/asm/hardirq_mm.h
@@ -1,16 +1,8 @@
1#ifndef __M68K_HARDIRQ_H 1#ifndef __M68K_HARDIRQ_H
2#define __M68K_HARDIRQ_H 2#define __M68K_HARDIRQ_H
3 3
4#include <linux/threads.h>
5#include <linux/cache.h>
6
7/* entry.S is sensitive to the offsets of these fields */
8typedef struct {
9 unsigned int __softirq_pending;
10} ____cacheline_aligned irq_cpustat_t;
11
12#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
13
14#define HARDIRQ_BITS 8 4#define HARDIRQ_BITS 8
15 5
6#include <asm-generic/hardirq.h>
7
16#endif 8#endif
diff --git a/arch/m68k/include/asm/hardirq_no.h b/arch/m68k/include/asm/hardirq_no.h
index bfad28149a49..b44b14be87d9 100644
--- a/arch/m68k/include/asm/hardirq_no.h
+++ b/arch/m68k/include/asm/hardirq_no.h
@@ -1,16 +1,8 @@
1#ifndef __M68K_HARDIRQ_H 1#ifndef __M68K_HARDIRQ_H
2#define __M68K_HARDIRQ_H 2#define __M68K_HARDIRQ_H
3 3
4#include <linux/cache.h>
5#include <linux/threads.h>
6#include <asm/irq.h> 4#include <asm/irq.h>
7 5
8typedef struct {
9 unsigned int __softirq_pending;
10} ____cacheline_aligned irq_cpustat_t;
11
12#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
13
14#define HARDIRQ_BITS 8 6#define HARDIRQ_BITS 8
15 7
16/* 8/*
@@ -22,6 +14,6 @@ typedef struct {
22# error HARDIRQ_BITS is too low! 14# error HARDIRQ_BITS is too low!
23#endif 15#endif
24 16
25void ack_bad_irq(unsigned int irq); 17#include <asm-generic/hardirq.h>
26 18
27#endif /* __M68K_HARDIRQ_H */ 19#endif /* __M68K_HARDIRQ_H */
diff --git a/arch/m68k/include/asm/io_no.h b/arch/m68k/include/asm/io_no.h
index 6adef1ee2082..7f57436ec18f 100644
--- a/arch/m68k/include/asm/io_no.h
+++ b/arch/m68k/include/asm/io_no.h
@@ -134,7 +134,7 @@ static inline void io_insl(unsigned int addr, void *buf, int len)
134#define insw(a,b,l) io_insw(a,b,l) 134#define insw(a,b,l) io_insw(a,b,l)
135#define insl(a,b,l) io_insl(a,b,l) 135#define insl(a,b,l) io_insl(a,b,l)
136 136
137#define IO_SPACE_LIMIT 0xffff 137#define IO_SPACE_LIMIT 0xffffffff
138 138
139 139
140/* Values for nocacheflag and cmode */ 140/* Values for nocacheflag and cmode */
diff --git a/arch/m68k/include/asm/irq.h b/arch/m68k/include/asm/irq.h
index d031416595b2..907eff1edd2f 100644
--- a/arch/m68k/include/asm/irq.h
+++ b/arch/m68k/include/asm/irq.h
@@ -1,5 +1,134 @@
1#ifdef __uClinux__ 1#ifndef _M68K_IRQ_H_
2#include "irq_no.h" 2#define _M68K_IRQ_H_
3
4/*
5 * This should be the same as the max(NUM_X_SOURCES) for all the
6 * different m68k hosts compiled into the kernel.
7 * Currently the Atari has 72 and the Amiga 24, but if both are
8 * supported in the kernel it is better to make room for 72.
9 */
10#if defined(CONFIG_COLDFIRE)
11#define NR_IRQS 256
12#elif defined(CONFIG_VME) || defined(CONFIG_SUN3) || defined(CONFIG_SUN3X)
13#define NR_IRQS 200
14#elif defined(CONFIG_ATARI) || defined(CONFIG_MAC)
15#define NR_IRQS 72
16#elif defined(CONFIG_Q40)
17#define NR_IRQS 43
18#elif defined(CONFIG_AMIGA) || !defined(CONFIG_MMU)
19#define NR_IRQS 32
20#elif defined(CONFIG_APOLLO)
21#define NR_IRQS 24
22#elif defined(CONFIG_HP300)
23#define NR_IRQS 8
3#else 24#else
4#include "irq_mm.h" 25#define NR_IRQS 0
5#endif 26#endif
27
28#ifdef CONFIG_MMU
29
30#include <linux/linkage.h>
31#include <linux/hardirq.h>
32#include <linux/irqreturn.h>
33#include <linux/spinlock_types.h>
34
35/*
36 * The hardirq mask has to be large enough to have
37 * space for potentially all IRQ sources in the system
38 * nesting on a single CPU:
39 */
40#if (1 << HARDIRQ_BITS) < NR_IRQS
41# error HARDIRQ_BITS is too low!
42#endif
43
44/*
45 * Interrupt source definitions
46 * General interrupt sources are the level 1-7.
47 * Adding an interrupt service routine for one of these sources
48 * results in the addition of that routine to a chain of routines.
49 * Each one is called in succession. Each individual interrupt
50 * service routine should determine if the device associated with
51 * that routine requires service.
52 */
53
54#define IRQ_SPURIOUS 0
55
56#define IRQ_AUTO_1 1 /* level 1 interrupt */
57#define IRQ_AUTO_2 2 /* level 2 interrupt */
58#define IRQ_AUTO_3 3 /* level 3 interrupt */
59#define IRQ_AUTO_4 4 /* level 4 interrupt */
60#define IRQ_AUTO_5 5 /* level 5 interrupt */
61#define IRQ_AUTO_6 6 /* level 6 interrupt */
62#define IRQ_AUTO_7 7 /* level 7 interrupt (non-maskable) */
63
64#define IRQ_USER 8
65
66extern unsigned int irq_canonicalize(unsigned int irq);
67
68struct pt_regs;
69
70/*
71 * various flags for request_irq() - the Amiga now uses the standard
72 * mechanism like all other architectures - IRQF_DISABLED and
73 * IRQF_SHARED are your friends.
74 */
75#ifndef MACH_AMIGA_ONLY
76#define IRQ_FLG_LOCK (0x0001) /* handler is not replaceable */
77#define IRQ_FLG_REPLACE (0x0002) /* replace existing handler */
78#define IRQ_FLG_FAST (0x0004)
79#define IRQ_FLG_SLOW (0x0008)
80#define IRQ_FLG_STD (0x8000) /* internally used */
81#endif
82
83/*
84 * This structure is used to chain together the ISRs for a particular
85 * interrupt source (if it supports chaining).
86 */
87typedef struct irq_node {
88 irqreturn_t (*handler)(int, void *);
89 void *dev_id;
90 struct irq_node *next;
91 unsigned long flags;
92 const char *devname;
93} irq_node_t;
94
95/*
96 * This structure has only 4 elements for speed reasons
97 */
98struct irq_handler {
99 int (*handler)(int, void *);
100 unsigned long flags;
101 void *dev_id;
102 const char *devname;
103};
104
105struct irq_controller {
106 const char *name;
107 spinlock_t lock;
108 int (*startup)(unsigned int irq);
109 void (*shutdown)(unsigned int irq);
110 void (*enable)(unsigned int irq);
111 void (*disable)(unsigned int irq);
112};
113
114extern int m68k_irq_startup(unsigned int);
115extern void m68k_irq_shutdown(unsigned int);
116
117/*
118 * This function returns a new irq_node_t
119 */
120extern irq_node_t *new_irq_node(void);
121
122extern void m68k_setup_auto_interrupt(void (*handler)(unsigned int, struct pt_regs *));
123extern void m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt,
124 void (*handler)(unsigned int, struct pt_regs *));
125extern void m68k_setup_irq_controller(struct irq_controller *, unsigned int, unsigned int);
126
127asmlinkage void m68k_handle_int(unsigned int);
128asmlinkage void __m68k_handle_int(unsigned int, struct pt_regs *);
129
130#else
131#define irq_canonicalize(irq) (irq)
132#endif /* CONFIG_MMU */
133
134#endif /* _M68K_IRQ_H_ */
diff --git a/arch/m68k/include/asm/irq_mm.h b/arch/m68k/include/asm/irq_mm.h
deleted file mode 100644
index 0cab42cad79e..000000000000
--- a/arch/m68k/include/asm/irq_mm.h
+++ /dev/null
@@ -1,126 +0,0 @@
1#ifndef _M68K_IRQ_H_
2#define _M68K_IRQ_H_
3
4#include <linux/linkage.h>
5#include <linux/hardirq.h>
6#include <linux/irqreturn.h>
7#include <linux/spinlock_types.h>
8
9/*
10 * This should be the same as the max(NUM_X_SOURCES) for all the
11 * different m68k hosts compiled into the kernel.
12 * Currently the Atari has 72 and the Amiga 24, but if both are
13 * supported in the kernel it is better to make room for 72.
14 */
15#if defined(CONFIG_VME) || defined(CONFIG_SUN3) || defined(CONFIG_SUN3X)
16#define NR_IRQS 200
17#elif defined(CONFIG_ATARI) || defined(CONFIG_MAC)
18#define NR_IRQS 72
19#elif defined(CONFIG_Q40)
20#define NR_IRQS 43
21#elif defined(CONFIG_AMIGA)
22#define NR_IRQS 32
23#elif defined(CONFIG_APOLLO)
24#define NR_IRQS 24
25#elif defined(CONFIG_HP300)
26#define NR_IRQS 8
27#else
28#define NR_IRQS 0
29#endif
30
31/*
32 * The hardirq mask has to be large enough to have
33 * space for potentially all IRQ sources in the system
34 * nesting on a single CPU:
35 */
36#if (1 << HARDIRQ_BITS) < NR_IRQS
37# error HARDIRQ_BITS is too low!
38#endif
39
40/*
41 * Interrupt source definitions
42 * General interrupt sources are the level 1-7.
43 * Adding an interrupt service routine for one of these sources
44 * results in the addition of that routine to a chain of routines.
45 * Each one is called in succession. Each individual interrupt
46 * service routine should determine if the device associated with
47 * that routine requires service.
48 */
49
50#define IRQ_SPURIOUS 0
51
52#define IRQ_AUTO_1 1 /* level 1 interrupt */
53#define IRQ_AUTO_2 2 /* level 2 interrupt */
54#define IRQ_AUTO_3 3 /* level 3 interrupt */
55#define IRQ_AUTO_4 4 /* level 4 interrupt */
56#define IRQ_AUTO_5 5 /* level 5 interrupt */
57#define IRQ_AUTO_6 6 /* level 6 interrupt */
58#define IRQ_AUTO_7 7 /* level 7 interrupt (non-maskable) */
59
60#define IRQ_USER 8
61
62extern unsigned int irq_canonicalize(unsigned int irq);
63
64struct pt_regs;
65
66/*
67 * various flags for request_irq() - the Amiga now uses the standard
68 * mechanism like all other architectures - IRQF_DISABLED and
69 * IRQF_SHARED are your friends.
70 */
71#ifndef MACH_AMIGA_ONLY
72#define IRQ_FLG_LOCK (0x0001) /* handler is not replaceable */
73#define IRQ_FLG_REPLACE (0x0002) /* replace existing handler */
74#define IRQ_FLG_FAST (0x0004)
75#define IRQ_FLG_SLOW (0x0008)
76#define IRQ_FLG_STD (0x8000) /* internally used */
77#endif
78
79/*
80 * This structure is used to chain together the ISRs for a particular
81 * interrupt source (if it supports chaining).
82 */
83typedef struct irq_node {
84 irqreturn_t (*handler)(int, void *);
85 void *dev_id;
86 struct irq_node *next;
87 unsigned long flags;
88 const char *devname;
89} irq_node_t;
90
91/*
92 * This structure has only 4 elements for speed reasons
93 */
94struct irq_handler {
95 int (*handler)(int, void *);
96 unsigned long flags;
97 void *dev_id;
98 const char *devname;
99};
100
101struct irq_controller {
102 const char *name;
103 spinlock_t lock;
104 int (*startup)(unsigned int irq);
105 void (*shutdown)(unsigned int irq);
106 void (*enable)(unsigned int irq);
107 void (*disable)(unsigned int irq);
108};
109
110extern int m68k_irq_startup(unsigned int);
111extern void m68k_irq_shutdown(unsigned int);
112
113/*
114 * This function returns a new irq_node_t
115 */
116extern irq_node_t *new_irq_node(void);
117
118extern void m68k_setup_auto_interrupt(void (*handler)(unsigned int, struct pt_regs *));
119extern void m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt,
120 void (*handler)(unsigned int, struct pt_regs *));
121extern void m68k_setup_irq_controller(struct irq_controller *, unsigned int, unsigned int);
122
123asmlinkage void m68k_handle_int(unsigned int);
124asmlinkage void __m68k_handle_int(unsigned int, struct pt_regs *);
125
126#endif /* _M68K_IRQ_H_ */
diff --git a/arch/m68k/include/asm/irq_no.h b/arch/m68k/include/asm/irq_no.h
deleted file mode 100644
index 9373c31ac87d..000000000000
--- a/arch/m68k/include/asm/irq_no.h
+++ /dev/null
@@ -1,26 +0,0 @@
1#ifndef _M68KNOMMU_IRQ_H_
2#define _M68KNOMMU_IRQ_H_
3
4#ifdef CONFIG_COLDFIRE
5/*
6 * On the ColdFire we keep track of all vectors. That way drivers
7 * can register whatever vector number they wish, and we can deal
8 * with it.
9 */
10#define SYS_IRQS 256
11#define NR_IRQS SYS_IRQS
12
13#else
14
15/*
16 * # of m68k interrupts
17 */
18#define SYS_IRQS 8
19#define NR_IRQS (24 + SYS_IRQS)
20
21#endif /* CONFIG_COLDFIRE */
22
23
24#define irq_canonicalize(irq) (irq)
25
26#endif /* _M68KNOMMU_IRQ_H_ */
diff --git a/arch/m68k/include/asm/m5206sim.h b/arch/m68k/include/asm/m5206sim.h
index 7e3594dea88b..9c384e294af9 100644
--- a/arch/m68k/include/asm/m5206sim.h
+++ b/arch/m68k/include/asm/m5206sim.h
@@ -85,8 +85,21 @@
85#define MCFSIM_PAR 0xcb /* Pin Assignment reg (r/w) */ 85#define MCFSIM_PAR 0xcb /* Pin Assignment reg (r/w) */
86#endif 86#endif
87 87
88#define MCFSIM_PADDR 0x1c5 /* Parallel Direction (r/w) */ 88#define MCFSIM_PADDR (MCF_MBAR + 0x1c5) /* Parallel Direction (r/w) */
89#define MCFSIM_PADAT 0x1c9 /* Parallel Port Value (r/w) */ 89#define MCFSIM_PADAT (MCF_MBAR + 0x1c9) /* Parallel Port Value (r/w) */
90
91/*
92 * Define system peripheral IRQ usage.
93 */
94#define MCF_IRQ_TIMER 30 /* Timer0, Level 6 */
95#define MCF_IRQ_PROFILER 31 /* Timer1, Level 7 */
96
97/*
98 * Generic GPIO
99 */
100#define MCFGPIO_PIN_MAX 8
101#define MCFGPIO_IRQ_VECBASE -1
102#define MCFGPIO_IRQ_MAX -1
90 103
91/* 104/*
92 * Some symbol defines for the Parallel Port Pin Assignment Register 105 * Some symbol defines for the Parallel Port Pin Assignment Register
@@ -111,21 +124,5 @@
111#define MCFSIM_DMA2ICR MCFSIM_ICR15 /* DMA 2 ICR */ 124#define MCFSIM_DMA2ICR MCFSIM_ICR15 /* DMA 2 ICR */
112#endif 125#endif
113 126
114#if defined(CONFIG_M5206e)
115#define MCFSIM_IMR_MASKALL 0xfffe /* All SIM intr sources */
116#endif
117
118/*
119 * Macro to get and set IMR register. It is 16 bits on the 5206.
120 */
121#define mcf_getimr() \
122 *((volatile unsigned short *) (MCF_MBAR + MCFSIM_IMR))
123
124#define mcf_setimr(imr) \
125 *((volatile unsigned short *) (MCF_MBAR + MCFSIM_IMR)) = (imr)
126
127#define mcf_getipr() \
128 *((volatile unsigned short *) (MCF_MBAR + MCFSIM_IPR))
129
130/****************************************************************************/ 127/****************************************************************************/
131#endif /* m5206sim_h */ 128#endif /* m5206sim_h */
diff --git a/arch/m68k/include/asm/m520xsim.h b/arch/m68k/include/asm/m520xsim.h
index 83bbcfd6e8f2..ed2b69b96805 100644
--- a/arch/m68k/include/asm/m520xsim.h
+++ b/arch/m68k/include/asm/m520xsim.h
@@ -11,9 +11,8 @@
11#define m520xsim_h 11#define m520xsim_h
12/****************************************************************************/ 12/****************************************************************************/
13 13
14
15/* 14/*
16 * Define the 5282 SIM register set addresses. 15 * Define the 520x SIM register set addresses.
17 */ 16 */
18#define MCFICM_INTC0 0x48000 /* Base for Interrupt Ctrl 0 */ 17#define MCFICM_INTC0 0x48000 /* Base for Interrupt Ctrl 0 */
19#define MCFINTC_IPRH 0x00 /* Interrupt pending 32-63 */ 18#define MCFINTC_IPRH 0x00 /* Interrupt pending 32-63 */
@@ -22,8 +21,22 @@
22#define MCFINTC_IMRL 0x0c /* Interrupt mask 1-31 */ 21#define MCFINTC_IMRL 0x0c /* Interrupt mask 1-31 */
23#define MCFINTC_INTFRCH 0x10 /* Interrupt force 32-63 */ 22#define MCFINTC_INTFRCH 0x10 /* Interrupt force 32-63 */
24#define MCFINTC_INTFRCL 0x14 /* Interrupt force 1-31 */ 23#define MCFINTC_INTFRCL 0x14 /* Interrupt force 1-31 */
24#define MCFINTC_SIMR 0x1c /* Set interrupt mask 0-63 */
25#define MCFINTC_CIMR 0x1d /* Clear interrupt mask 0-63 */
25#define MCFINTC_ICR0 0x40 /* Base ICR register */ 26#define MCFINTC_ICR0 0x40 /* Base ICR register */
26 27
28/*
29 * The common interrupt controller code just wants to know the absolute
30 * address to the SIMR and CIMR registers (not offsets into IPSBAR).
31 * The 520x family only has a single INTC unit.
32 */
33#define MCFINTC0_SIMR (MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_SIMR)
34#define MCFINTC0_CIMR (MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_CIMR)
35#define MCFINTC0_ICR0 (MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_ICR0)
36#define MCFINTC1_SIMR (0)
37#define MCFINTC1_CIMR (0)
38#define MCFINTC1_ICR0 (0)
39
27#define MCFINT_VECBASE 64 40#define MCFINT_VECBASE 64
28#define MCFINT_UART0 26 /* Interrupt number for UART0 */ 41#define MCFINT_UART0 26 /* Interrupt number for UART0 */
29#define MCFINT_UART1 27 /* Interrupt number for UART1 */ 42#define MCFINT_UART1 27 /* Interrupt number for UART1 */
@@ -41,6 +54,62 @@
41#define MCFSIM_SDCS0 0x000a8110 /* SDRAM Chip Select 0 Configuration */ 54#define MCFSIM_SDCS0 0x000a8110 /* SDRAM Chip Select 0 Configuration */
42#define MCFSIM_SDCS1 0x000a8114 /* SDRAM Chip Select 1 Configuration */ 55#define MCFSIM_SDCS1 0x000a8114 /* SDRAM Chip Select 1 Configuration */
43 56
57#define MCFEPORT_EPDDR 0xFC088002
58#define MCFEPORT_EPDR 0xFC088004
59#define MCFEPORT_EPPDR 0xFC088005
60
61#define MCFGPIO_PODR_BUSCTL 0xFC0A4000
62#define MCFGPIO_PODR_BE 0xFC0A4001
63#define MCFGPIO_PODR_CS 0xFC0A4002
64#define MCFGPIO_PODR_FECI2C 0xFC0A4003
65#define MCFGPIO_PODR_QSPI 0xFC0A4004
66#define MCFGPIO_PODR_TIMER 0xFC0A4005
67#define MCFGPIO_PODR_UART 0xFC0A4006
68#define MCFGPIO_PODR_FECH 0xFC0A4007
69#define MCFGPIO_PODR_FECL 0xFC0A4008
70
71#define MCFGPIO_PDDR_BUSCTL 0xFC0A400C
72#define MCFGPIO_PDDR_BE 0xFC0A400D
73#define MCFGPIO_PDDR_CS 0xFC0A400E
74#define MCFGPIO_PDDR_FECI2C 0xFC0A400F
75#define MCFGPIO_PDDR_QSPI 0xFC0A4010
76#define MCFGPIO_PDDR_TIMER 0xFC0A4011
77#define MCFGPIO_PDDR_UART 0xFC0A4012
78#define MCFGPIO_PDDR_FECH 0xFC0A4013
79#define MCFGPIO_PDDR_FECL 0xFC0A4014
80
81#define MCFGPIO_PPDSDR_BUSCTL 0xFC0A401A
82#define MCFGPIO_PPDSDR_BE 0xFC0A401B
83#define MCFGPIO_PPDSDR_CS 0xFC0A401C
84#define MCFGPIO_PPDSDR_FECI2C 0xFC0A401D
85#define MCFGPIO_PPDSDR_QSPI 0xFC0A401E
86#define MCFGPIO_PPDSDR_TIMER 0xFC0A401F
87#define MCFGPIO_PPDSDR_UART 0xFC0A4021
88#define MCFGPIO_PPDSDR_FECH 0xFC0A4021
89#define MCFGPIO_PPDSDR_FECL 0xFC0A4022
90
91#define MCFGPIO_PCLRR_BUSCTL 0xFC0A4024
92#define MCFGPIO_PCLRR_BE 0xFC0A4025
93#define MCFGPIO_PCLRR_CS 0xFC0A4026
94#define MCFGPIO_PCLRR_FECI2C 0xFC0A4027
95#define MCFGPIO_PCLRR_QSPI 0xFC0A4028
96#define MCFGPIO_PCLRR_TIMER 0xFC0A4029
97#define MCFGPIO_PCLRR_UART 0xFC0A402A
98#define MCFGPIO_PCLRR_FECH 0xFC0A402B
99#define MCFGPIO_PCLRR_FECL 0xFC0A402C
100/*
101 * Generic GPIO support
102 */
103#define MCFGPIO_PODR MCFGPIO_PODR_BUSCTL
104#define MCFGPIO_PDDR MCFGPIO_PDDR_BUSCTL
105#define MCFGPIO_PPDR MCFGPIO_PPDSDR_BUSCTL
106#define MCFGPIO_SETR MCFGPIO_PPDSDR_BUSCTL
107#define MCFGPIO_CLRR MCFGPIO_PCLRR_BUSCTL
108
109#define MCFGPIO_PIN_MAX 80
110#define MCFGPIO_IRQ_MAX 8
111#define MCFGPIO_IRQ_VECBASE MCFINT_VECBASE
112/****************************************************************************/
44 113
45#define MCF_GPIO_PAR_UART (0xA4036) 114#define MCF_GPIO_PAR_UART (0xA4036)
46#define MCF_GPIO_PAR_FECI2C (0xA4033) 115#define MCF_GPIO_PAR_FECI2C (0xA4033)
@@ -55,10 +124,6 @@
55#define MCF_GPIO_PAR_FECI2C_PAR_SDA_URXD2 (0x02) 124#define MCF_GPIO_PAR_FECI2C_PAR_SDA_URXD2 (0x02)
56#define MCF_GPIO_PAR_FECI2C_PAR_SCL_UTXD2 (0x04) 125#define MCF_GPIO_PAR_FECI2C_PAR_SCL_UTXD2 (0x04)
57 126
58#define ICR_INTRCONF 0x05
59#define MCFPIT_IMR MCFINTC_IMRL
60#define MCFPIT_IMR_IBIT (1 << MCFINT_PIT1)
61
62/* 127/*
63 * Reset Controll Unit. 128 * Reset Controll Unit.
64 */ 129 */
diff --git a/arch/m68k/include/asm/m523xsim.h b/arch/m68k/include/asm/m523xsim.h
index 55183b5df1b8..a34894cf8e6f 100644
--- a/arch/m68k/include/asm/m523xsim.h
+++ b/arch/m68k/include/asm/m523xsim.h
@@ -50,5 +50,82 @@
50#define MCF_RCR_SWRESET 0x80 /* Software reset bit */ 50#define MCF_RCR_SWRESET 0x80 /* Software reset bit */
51#define MCF_RCR_FRCSTOUT 0x40 /* Force external reset */ 51#define MCF_RCR_FRCSTOUT 0x40 /* Force external reset */
52 52
53#define MCFGPIO_PODR_ADDR (MCF_IPSBAR + 0x100000)
54#define MCFGPIO_PODR_DATAH (MCF_IPSBAR + 0x100001)
55#define MCFGPIO_PODR_DATAL (MCF_IPSBAR + 0x100002)
56#define MCFGPIO_PODR_BUSCTL (MCF_IPSBAR + 0x100003)
57#define MCFGPIO_PODR_BS (MCF_IPSBAR + 0x100004)
58#define MCFGPIO_PODR_CS (MCF_IPSBAR + 0x100005)
59#define MCFGPIO_PODR_SDRAM (MCF_IPSBAR + 0x100006)
60#define MCFGPIO_PODR_FECI2C (MCF_IPSBAR + 0x100007)
61#define MCFGPIO_PODR_UARTH (MCF_IPSBAR + 0x100008)
62#define MCFGPIO_PODR_UARTL (MCF_IPSBAR + 0x100009)
63#define MCFGPIO_PODR_QSPI (MCF_IPSBAR + 0x10000A)
64#define MCFGPIO_PODR_TIMER (MCF_IPSBAR + 0x10000B)
65#define MCFGPIO_PODR_ETPU (MCF_IPSBAR + 0x10000C)
66
67#define MCFGPIO_PDDR_ADDR (MCF_IPSBAR + 0x100010)
68#define MCFGPIO_PDDR_DATAH (MCF_IPSBAR + 0x100011)
69#define MCFGPIO_PDDR_DATAL (MCF_IPSBAR + 0x100012)
70#define MCFGPIO_PDDR_BUSCTL (MCF_IPSBAR + 0x100013)
71#define MCFGPIO_PDDR_BS (MCF_IPSBAR + 0x100014)
72#define MCFGPIO_PDDR_CS (MCF_IPSBAR + 0x100015)
73#define MCFGPIO_PDDR_SDRAM (MCF_IPSBAR + 0x100016)
74#define MCFGPIO_PDDR_FECI2C (MCF_IPSBAR + 0x100017)
75#define MCFGPIO_PDDR_UARTH (MCF_IPSBAR + 0x100018)
76#define MCFGPIO_PDDR_UARTL (MCF_IPSBAR + 0x100019)
77#define MCFGPIO_PDDR_QSPI (MCF_IPSBAR + 0x10001A)
78#define MCFGPIO_PDDR_TIMER (MCF_IPSBAR + 0x10001B)
79#define MCFGPIO_PDDR_ETPU (MCF_IPSBAR + 0x10001C)
80
81#define MCFGPIO_PPDSDR_ADDR (MCF_IPSBAR + 0x100020)
82#define MCFGPIO_PPDSDR_DATAH (MCF_IPSBAR + 0x100021)
83#define MCFGPIO_PPDSDR_DATAL (MCF_IPSBAR + 0x100022)
84#define MCFGPIO_PPDSDR_BUSCTL (MCF_IPSBAR + 0x100023)
85#define MCFGPIO_PPDSDR_BS (MCF_IPSBAR + 0x100024)
86#define MCFGPIO_PPDSDR_CS (MCF_IPSBAR + 0x100025)
87#define MCFGPIO_PPDSDR_SDRAM (MCF_IPSBAR + 0x100026)
88#define MCFGPIO_PPDSDR_FECI2C (MCF_IPSBAR + 0x100027)
89#define MCFGPIO_PPDSDR_UARTH (MCF_IPSBAR + 0x100028)
90#define MCFGPIO_PPDSDR_UARTL (MCF_IPSBAR + 0x100029)
91#define MCFGPIO_PPDSDR_QSPI (MCF_IPSBAR + 0x10002A)
92#define MCFGPIO_PPDSDR_TIMER (MCF_IPSBAR + 0x10002B)
93#define MCFGPIO_PPDSDR_ETPU (MCF_IPSBAR + 0x10002C)
94
95#define MCFGPIO_PCLRR_ADDR (MCF_IPSBAR + 0x100030)
96#define MCFGPIO_PCLRR_DATAH (MCF_IPSBAR + 0x100031)
97#define MCFGPIO_PCLRR_DATAL (MCF_IPSBAR + 0x100032)
98#define MCFGPIO_PCLRR_BUSCTL (MCF_IPSBAR + 0x100033)
99#define MCFGPIO_PCLRR_BS (MCF_IPSBAR + 0x100034)
100#define MCFGPIO_PCLRR_CS (MCF_IPSBAR + 0x100035)
101#define MCFGPIO_PCLRR_SDRAM (MCF_IPSBAR + 0x100036)
102#define MCFGPIO_PCLRR_FECI2C (MCF_IPSBAR + 0x100037)
103#define MCFGPIO_PCLRR_UARTH (MCF_IPSBAR + 0x100038)
104#define MCFGPIO_PCLRR_UARTL (MCF_IPSBAR + 0x100039)
105#define MCFGPIO_PCLRR_QSPI (MCF_IPSBAR + 0x10003A)
106#define MCFGPIO_PCLRR_TIMER (MCF_IPSBAR + 0x10003B)
107#define MCFGPIO_PCLRR_ETPU (MCF_IPSBAR + 0x10003C)
108
109/*
110 * EPort
111 */
112
113#define MCFEPORT_EPDDR (MCF_IPSBAR + 0x130002)
114#define MCFEPORT_EPDR (MCF_IPSBAR + 0x130004)
115#define MCFEPORT_EPPDR (MCF_IPSBAR + 0x130005)
116
117/*
118 * Generic GPIO support
119 */
120#define MCFGPIO_PODR MCFGPIO_PODR_ADDR
121#define MCFGPIO_PDDR MCFGPIO_PDDR_ADDR
122#define MCFGPIO_PPDR MCFGPIO_PPDSDR_ADDR
123#define MCFGPIO_SETR MCFGPIO_PPDSDR_ADDR
124#define MCFGPIO_CLRR MCFGPIO_PCLRR_ADDR
125
126#define MCFGPIO_PIN_MAX 107
127#define MCFGPIO_IRQ_MAX 8
128#define MCFGPIO_IRQ_VECBASE MCFINT_VECBASE
129
53/****************************************************************************/ 130/****************************************************************************/
54#endif /* m523xsim_h */ 131#endif /* m523xsim_h */
diff --git a/arch/m68k/include/asm/m5249sim.h b/arch/m68k/include/asm/m5249sim.h
index 366eb8602d2f..14bce877ed88 100644
--- a/arch/m68k/include/asm/m5249sim.h
+++ b/arch/m68k/include/asm/m5249sim.h
@@ -71,16 +71,22 @@
71#define MCFSIM_DMA3ICR MCFSIM_ICR9 /* DMA 3 ICR */ 71#define MCFSIM_DMA3ICR MCFSIM_ICR9 /* DMA 3 ICR */
72 72
73/* 73/*
74 * Define system peripheral IRQ usage.
75 */
76#define MCF_IRQ_TIMER 30 /* Timer0, Level 6 */
77#define MCF_IRQ_PROFILER 31 /* Timer1, Level 7 */
78
79/*
74 * General purpose IO registers (in MBAR2). 80 * General purpose IO registers (in MBAR2).
75 */ 81 */
76#define MCFSIM2_GPIOREAD 0x0 /* GPIO read values */ 82#define MCFSIM2_GPIOREAD (MCF_MBAR2 + 0x000) /* GPIO read values */
77#define MCFSIM2_GPIOWRITE 0x4 /* GPIO write values */ 83#define MCFSIM2_GPIOWRITE (MCF_MBAR2 + 0x004) /* GPIO write values */
78#define MCFSIM2_GPIOENABLE 0x8 /* GPIO enabled */ 84#define MCFSIM2_GPIOENABLE (MCF_MBAR2 + 0x008) /* GPIO enabled */
79#define MCFSIM2_GPIOFUNC 0xc /* GPIO function */ 85#define MCFSIM2_GPIOFUNC (MCF_MBAR2 + 0x00C) /* GPIO function */
80#define MCFSIM2_GPIO1READ 0xb0 /* GPIO1 read values */ 86#define MCFSIM2_GPIO1READ (MCF_MBAR2 + 0x0B0) /* GPIO1 read values */
81#define MCFSIM2_GPIO1WRITE 0xb4 /* GPIO1 write values */ 87#define MCFSIM2_GPIO1WRITE (MCF_MBAR2 + 0x0B4) /* GPIO1 write values */
82#define MCFSIM2_GPIO1ENABLE 0xb8 /* GPIO1 enabled */ 88#define MCFSIM2_GPIO1ENABLE (MCF_MBAR2 + 0x0B8) /* GPIO1 enabled */
83#define MCFSIM2_GPIO1FUNC 0xbc /* GPIO1 function */ 89#define MCFSIM2_GPIO1FUNC (MCF_MBAR2 + 0x0BC) /* GPIO1 function */
84 90
85#define MCFSIM2_GPIOINTSTAT 0xc0 /* GPIO interrupt status */ 91#define MCFSIM2_GPIOINTSTAT 0xc0 /* GPIO interrupt status */
86#define MCFSIM2_GPIOINTCLEAR 0xc0 /* GPIO interrupt clear */ 92#define MCFSIM2_GPIOINTCLEAR 0xc0 /* GPIO interrupt clear */
@@ -100,20 +106,28 @@
100#define MCFSIM2_IDECONFIG1 0x18c /* IDEconfig1 */ 106#define MCFSIM2_IDECONFIG1 0x18c /* IDEconfig1 */
101#define MCFSIM2_IDECONFIG2 0x190 /* IDEconfig2 */ 107#define MCFSIM2_IDECONFIG2 0x190 /* IDEconfig2 */
102 108
103
104/* 109/*
105 * Macro to set IMR register. It is 32 bits on the 5249. 110 * Define the base interrupt for the second interrupt controller.
111 * We set it to 128, out of the way of the base interrupts, and plenty
112 * of room for its 64 interrupts.
106 */ 113 */
107#define MCFSIM_IMR_MASKALL 0x7fffe /* All SIM intr sources */ 114#define MCFINTC2_VECBASE 128
108 115
109#define mcf_getimr() \ 116#define MCFINTC2_GPIOIRQ0 (MCFINTC2_VECBASE + 32)
110 *((volatile unsigned long *) (MCF_MBAR + MCFSIM_IMR)) 117#define MCFINTC2_GPIOIRQ1 (MCFINTC2_VECBASE + 33)
118#define MCFINTC2_GPIOIRQ2 (MCFINTC2_VECBASE + 34)
119#define MCFINTC2_GPIOIRQ3 (MCFINTC2_VECBASE + 35)
120#define MCFINTC2_GPIOIRQ4 (MCFINTC2_VECBASE + 36)
121#define MCFINTC2_GPIOIRQ5 (MCFINTC2_VECBASE + 37)
122#define MCFINTC2_GPIOIRQ6 (MCFINTC2_VECBASE + 38)
123#define MCFINTC2_GPIOIRQ7 (MCFINTC2_VECBASE + 39)
111 124
112#define mcf_setimr(imr) \ 125/*
113 *((volatile unsigned long *) (MCF_MBAR + MCFSIM_IMR)) = (imr); 126 * Generic GPIO support
114 127 */
115#define mcf_getipr() \ 128#define MCFGPIO_PIN_MAX 64
116 *((volatile unsigned long *) (MCF_MBAR + MCFSIM_IPR)) 129#define MCFGPIO_IRQ_MAX -1
130#define MCFGPIO_IRQ_VECBASE -1
117 131
118/****************************************************************************/ 132/****************************************************************************/
119 133
@@ -137,9 +151,9 @@
137 subql #1,%a1 /* get MBAR2 address in a1 */ 151 subql #1,%a1 /* get MBAR2 address in a1 */
138 152
139 /* 153 /*
140 * Move secondary interrupts to base at 128. 154 * Move secondary interrupts to their base (128).
141 */ 155 */
142 moveb #0x80,%d0 156 moveb #MCFINTC2_VECBASE,%d0
143 moveb %d0,0x16b(%a1) /* interrupt base register */ 157 moveb %d0,0x16b(%a1) /* interrupt base register */
144 158
145 /* 159 /*
diff --git a/arch/m68k/include/asm/m5272sim.h b/arch/m68k/include/asm/m5272sim.h
index 6217edc21139..df3332c2317d 100644
--- a/arch/m68k/include/asm/m5272sim.h
+++ b/arch/m68k/include/asm/m5272sim.h
@@ -12,7 +12,6 @@
12#define m5272sim_h 12#define m5272sim_h
13/****************************************************************************/ 13/****************************************************************************/
14 14
15
16/* 15/*
17 * Define the 5272 SIM register set addresses. 16 * Define the 5272 SIM register set addresses.
18 */ 17 */
@@ -63,16 +62,59 @@
63#define MCFSIM_DCMR1 0x5c /* DRAM 1 Mask reg (r/w) */ 62#define MCFSIM_DCMR1 0x5c /* DRAM 1 Mask reg (r/w) */
64#define MCFSIM_DCCR1 0x63 /* DRAM 1 Control reg (r/w) */ 63#define MCFSIM_DCCR1 0x63 /* DRAM 1 Control reg (r/w) */
65 64
66#define MCFSIM_PACNT 0x80 /* Port A Control (r/w) */ 65#define MCFSIM_PACNT (MCF_MBAR + 0x80) /* Port A Control (r/w) */
67#define MCFSIM_PADDR 0x84 /* Port A Direction (r/w) */ 66#define MCFSIM_PADDR (MCF_MBAR + 0x84) /* Port A Direction (r/w) */
68#define MCFSIM_PADAT 0x86 /* Port A Data (r/w) */ 67#define MCFSIM_PADAT (MCF_MBAR + 0x86) /* Port A Data (r/w) */
69#define MCFSIM_PBCNT 0x88 /* Port B Control (r/w) */ 68#define MCFSIM_PBCNT (MCF_MBAR + 0x88) /* Port B Control (r/w) */
70#define MCFSIM_PBDDR 0x8c /* Port B Direction (r/w) */ 69#define MCFSIM_PBDDR (MCF_MBAR + 0x8c) /* Port B Direction (r/w) */
71#define MCFSIM_PBDAT 0x8e /* Port B Data (r/w) */ 70#define MCFSIM_PBDAT (MCF_MBAR + 0x8e) /* Port B Data (r/w) */
72#define MCFSIM_PCDDR 0x94 /* Port C Direction (r/w) */ 71#define MCFSIM_PCDDR (MCF_MBAR + 0x94) /* Port C Direction (r/w) */
73#define MCFSIM_PCDAT 0x96 /* Port C Data (r/w) */ 72#define MCFSIM_PCDAT (MCF_MBAR + 0x96) /* Port C Data (r/w) */
74#define MCFSIM_PDCNT 0x98 /* Port D Control (r/w) */ 73#define MCFSIM_PDCNT (MCF_MBAR + 0x98) /* Port D Control (r/w) */
74
75/*
76 * Define system peripheral IRQ usage.
77 */
78#define MCFINT_VECBASE 64 /* Base of interrupts */
79#define MCF_IRQ_SPURIOUS 64 /* User Spurious */
80#define MCF_IRQ_EINT1 65 /* External Interrupt 1 */
81#define MCF_IRQ_EINT2 66 /* External Interrupt 2 */
82#define MCF_IRQ_EINT3 67 /* External Interrupt 3 */
83#define MCF_IRQ_EINT4 68 /* External Interrupt 4 */
84#define MCF_IRQ_TIMER1 69 /* Timer 1 */
85#define MCF_IRQ_TIMER2 70 /* Timer 2 */
86#define MCF_IRQ_TIMER3 71 /* Timer 3 */
87#define MCF_IRQ_TIMER4 72 /* Timer 4 */
88#define MCF_IRQ_UART1 73 /* UART 1 */
89#define MCF_IRQ_UART2 74 /* UART 2 */
90#define MCF_IRQ_PLIP 75 /* PLIC 2Khz Periodic */
91#define MCF_IRQ_PLIA 76 /* PLIC Asynchronous */
92#define MCF_IRQ_USB0 77 /* USB Endpoint 0 */
93#define MCF_IRQ_USB1 78 /* USB Endpoint 1 */
94#define MCF_IRQ_USB2 79 /* USB Endpoint 2 */
95#define MCF_IRQ_USB3 80 /* USB Endpoint 3 */
96#define MCF_IRQ_USB4 81 /* USB Endpoint 4 */
97#define MCF_IRQ_USB5 82 /* USB Endpoint 5 */
98#define MCF_IRQ_USB6 83 /* USB Endpoint 6 */
99#define MCF_IRQ_USB7 84 /* USB Endpoint 7 */
100#define MCF_IRQ_DMA 85 /* DMA Controller */
101#define MCF_IRQ_ERX 86 /* Ethernet Receiver */
102#define MCF_IRQ_ETX 87 /* Ethernet Transmitter */
103#define MCF_IRQ_ENTC 88 /* Ethernet Non-Time Critical */
104#define MCF_IRQ_QSPI 89 /* Queued Serial Interface */
105#define MCF_IRQ_EINT5 90 /* External Interrupt 5 */
106#define MCF_IRQ_EINT6 91 /* External Interrupt 6 */
107#define MCF_IRQ_SWTO 92 /* Software Watchdog */
108#define MCFINT_VECMAX 95 /* Maxmum interrupt */
75 109
110#define MCF_IRQ_TIMER MCF_IRQ_TIMER1
111#define MCF_IRQ_PROFILER MCF_IRQ_TIMER2
76 112
113/*
114 * Generic GPIO support
115 */
116#define MCFGPIO_PIN_MAX 48
117#define MCFGPIO_IRQ_MAX -1
118#define MCFGPIO_IRQ_VECBASE -1
77/****************************************************************************/ 119/****************************************************************************/
78#endif /* m5272sim_h */ 120#endif /* m5272sim_h */
diff --git a/arch/m68k/include/asm/m527xsim.h b/arch/m68k/include/asm/m527xsim.h
index 95f4f8ee8f7c..453356d72d80 100644
--- a/arch/m68k/include/asm/m527xsim.h
+++ b/arch/m68k/include/asm/m527xsim.h
@@ -54,6 +54,175 @@
54#define MCFSIM_DMR1 0x5c /* SDRAM address mask 1 */ 54#define MCFSIM_DMR1 0x5c /* SDRAM address mask 1 */
55#endif 55#endif
56 56
57
58#ifdef CONFIG_M5271
59#define MCFGPIO_PODR_ADDR (MCF_IPSBAR + 0x100000)
60#define MCFGPIO_PODR_DATAH (MCF_IPSBAR + 0x100001)
61#define MCFGPIO_PODR_DATAL (MCF_IPSBAR + 0x100002)
62#define MCFGPIO_PODR_BUSCTL (MCF_IPSBAR + 0x100003)
63#define MCFGPIO_PODR_BS (MCF_IPSBAR + 0x100004)
64#define MCFGPIO_PODR_CS (MCF_IPSBAR + 0x100005)
65#define MCFGPIO_PODR_SDRAM (MCF_IPSBAR + 0x100006)
66#define MCFGPIO_PODR_FECI2C (MCF_IPSBAR + 0x100007)
67#define MCFGPIO_PODR_UARTH (MCF_IPSBAR + 0x100008)
68#define MCFGPIO_PODR_UARTL (MCF_IPSBAR + 0x100009)
69#define MCFGPIO_PODR_QSPI (MCF_IPSBAR + 0x10000A)
70#define MCFGPIO_PODR_TIMER (MCF_IPSBAR + 0x10000B)
71
72#define MCFGPIO_PDDR_ADDR (MCF_IPSBAR + 0x100010)
73#define MCFGPIO_PDDR_DATAH (MCF_IPSBAR + 0x100011)
74#define MCFGPIO_PDDR_DATAL (MCF_IPSBAR + 0x100012)
75#define MCFGPIO_PDDR_BUSCTL (MCF_IPSBAR + 0x100013)
76#define MCFGPIO_PDDR_BS (MCF_IPSBAR + 0x100014)
77#define MCFGPIO_PDDR_CS (MCF_IPSBAR + 0x100015)
78#define MCFGPIO_PDDR_SDRAM (MCF_IPSBAR + 0x100016)
79#define MCFGPIO_PDDR_FECI2C (MCF_IPSBAR + 0x100017)
80#define MCFGPIO_PDDR_UARTH (MCF_IPSBAR + 0x100018)
81#define MCFGPIO_PDDR_UARTL (MCF_IPSBAR + 0x100019)
82#define MCFGPIO_PDDR_QSPI (MCF_IPSBAR + 0x10001A)
83#define MCFGPIO_PDDR_TIMER (MCF_IPSBAR + 0x10001B)
84
85#define MCFGPIO_PPDSDR_ADDR (MCF_IPSBAR + 0x100020)
86#define MCFGPIO_PPDSDR_DATAH (MCF_IPSBAR + 0x100021)
87#define MCFGPIO_PPDSDR_DATAL (MCF_IPSBAR + 0x100022)
88#define MCFGPIO_PPDSDR_BUSCTL (MCF_IPSBAR + 0x100023)
89#define MCFGPIO_PPDSDR_BS (MCF_IPSBAR + 0x100024)
90#define MCFGPIO_PPDSDR_CS (MCF_IPSBAR + 0x100025)
91#define MCFGPIO_PPDSDR_SDRAM (MCF_IPSBAR + 0x100026)
92#define MCFGPIO_PPDSDR_FECI2C (MCF_IPSBAR + 0x100027)
93#define MCFGPIO_PPDSDR_UARTH (MCF_IPSBAR + 0x100028)
94#define MCFGPIO_PPDSDR_UARTL (MCF_IPSBAR + 0x100029)
95#define MCFGPIO_PPDSDR_QSPI (MCF_IPSBAR + 0x10002A)
96#define MCFGPIO_PPDSDR_TIMER (MCF_IPSBAR + 0x10002B)
97
98#define MCFGPIO_PCLRR_ADDR (MCF_IPSBAR + 0x100030)
99#define MCFGPIO_PCLRR_DATAH (MCF_IPSBAR + 0x100031)
100#define MCFGPIO_PCLRR_DATAL (MCF_IPSBAR + 0x100032)
101#define MCFGPIO_PCLRR_BUSCTL (MCF_IPSBAR + 0x100033)
102#define MCFGPIO_PCLRR_BS (MCF_IPSBAR + 0x100034)
103#define MCFGPIO_PCLRR_CS (MCF_IPSBAR + 0x100035)
104#define MCFGPIO_PCLRR_SDRAM (MCF_IPSBAR + 0x100036)
105#define MCFGPIO_PCLRR_FECI2C (MCF_IPSBAR + 0x100037)
106#define MCFGPIO_PCLRR_UARTH (MCF_IPSBAR + 0x100038)
107#define MCFGPIO_PCLRR_UARTL (MCF_IPSBAR + 0x100039)
108#define MCFGPIO_PCLRR_QSPI (MCF_IPSBAR + 0x10003A)
109#define MCFGPIO_PCLRR_TIMER (MCF_IPSBAR + 0x10003B)
110
111/*
112 * Generic GPIO support
113 */
114#define MCFGPIO_PODR MCFGPIO_PODR_ADDR
115#define MCFGPIO_PDDR MCFGPIO_PDDR_ADDR
116#define MCFGPIO_PPDR MCFGPIO_PPDSDR_ADDR
117#define MCFGPIO_SETR MCFGPIO_PPDSDR_ADDR
118#define MCFGPIO_CLRR MCFGPIO_PCLRR_ADDR
119
120#define MCFGPIO_PIN_MAX 100
121#define MCFGPIO_IRQ_MAX 8
122#define MCFGPIO_IRQ_VECBASE MCFINT_VECBASE
123#endif
124
125#ifdef CONFIG_M5275
126#define MCFGPIO_PODR_BUSCTL (MCF_IPSBAR + 0x100004)
127#define MCFGPIO_PODR_ADDR (MCF_IPSBAR + 0x100005)
128#define MCFGPIO_PODR_CS (MCF_IPSBAR + 0x100008)
129#define MCFGPIO_PODR_FEC0H (MCF_IPSBAR + 0x10000A)
130#define MCFGPIO_PODR_FEC0L (MCF_IPSBAR + 0x10000B)
131#define MCFGPIO_PODR_FECI2C (MCF_IPSBAR + 0x10000C)
132#define MCFGPIO_PODR_QSPI (MCF_IPSBAR + 0x10000D)
133#define MCFGPIO_PODR_SDRAM (MCF_IPSBAR + 0x10000E)
134#define MCFGPIO_PODR_TIMERH (MCF_IPSBAR + 0x10000F)
135#define MCFGPIO_PODR_TIMERL (MCF_IPSBAR + 0x100010)
136#define MCFGPIO_PODR_UARTL (MCF_IPSBAR + 0x100011)
137#define MCFGPIO_PODR_FEC1H (MCF_IPSBAR + 0x100012)
138#define MCFGPIO_PODR_FEC1L (MCF_IPSBAR + 0x100013)
139#define MCFGPIO_PODR_BS (MCF_IPSBAR + 0x100014)
140#define MCFGPIO_PODR_IRQ (MCF_IPSBAR + 0x100015)
141#define MCFGPIO_PODR_USBH (MCF_IPSBAR + 0x100016)
142#define MCFGPIO_PODR_USBL (MCF_IPSBAR + 0x100017)
143#define MCFGPIO_PODR_UARTH (MCF_IPSBAR + 0x100018)
144
145#define MCFGPIO_PDDR_BUSCTL (MCF_IPSBAR + 0x100020)
146#define MCFGPIO_PDDR_ADDR (MCF_IPSBAR + 0x100021)
147#define MCFGPIO_PDDR_CS (MCF_IPSBAR + 0x100024)
148#define MCFGPIO_PDDR_FEC0H (MCF_IPSBAR + 0x100026)
149#define MCFGPIO_PDDR_FEC0L (MCF_IPSBAR + 0x100027)
150#define MCFGPIO_PDDR_FECI2C (MCF_IPSBAR + 0x100028)
151#define MCFGPIO_PDDR_QSPI (MCF_IPSBAR + 0x100029)
152#define MCFGPIO_PDDR_SDRAM (MCF_IPSBAR + 0x10002A)
153#define MCFGPIO_PDDR_TIMERH (MCF_IPSBAR + 0x10002B)
154#define MCFGPIO_PDDR_TIMERL (MCF_IPSBAR + 0x10002C)
155#define MCFGPIO_PDDR_UARTL (MCF_IPSBAR + 0x10002D)
156#define MCFGPIO_PDDR_FEC1H (MCF_IPSBAR + 0x10002E)
157#define MCFGPIO_PDDR_FEC1L (MCF_IPSBAR + 0x10002F)
158#define MCFGPIO_PDDR_BS (MCF_IPSBAR + 0x100030)
159#define MCFGPIO_PDDR_IRQ (MCF_IPSBAR + 0x100031)
160#define MCFGPIO_PDDR_USBH (MCF_IPSBAR + 0x100032)
161#define MCFGPIO_PDDR_USBL (MCF_IPSBAR + 0x100033)
162#define MCFGPIO_PDDR_UARTH (MCF_IPSBAR + 0x100034)
163
164#define MCFGPIO_PPDSDR_BUSCTL (MCF_IPSBAR + 0x10003C)
165#define MCFGPIO_PPDSDR_ADDR (MCF_IPSBAR + 0x10003D)
166#define MCFGPIO_PPDSDR_CS (MCF_IPSBAR + 0x100040)
167#define MCFGPIO_PPDSDR_FEC0H (MCF_IPSBAR + 0x100042)
168#define MCFGPIO_PPDSDR_FEC0L (MCF_IPSBAR + 0x100043)
169#define MCFGPIO_PPDSDR_FECI2C (MCF_IPSBAR + 0x100044)
170#define MCFGPIO_PPDSDR_QSPI (MCF_IPSBAR + 0x100045)
171#define MCFGPIO_PPDSDR_SDRAM (MCF_IPSBAR + 0x100046)
172#define MCFGPIO_PPDSDR_TIMERH (MCF_IPSBAR + 0x100047)
173#define MCFGPIO_PPDSDR_TIMERL (MCF_IPSBAR + 0x100048)
174#define MCFGPIO_PPDSDR_UARTL (MCF_IPSBAR + 0x100049)
175#define MCFGPIO_PPDSDR_FEC1H (MCF_IPSBAR + 0x10004A)
176#define MCFGPIO_PPDSDR_FEC1L (MCF_IPSBAR + 0x10004B)
177#define MCFGPIO_PPDSDR_BS (MCF_IPSBAR + 0x10004C)
178#define MCFGPIO_PPDSDR_IRQ (MCF_IPSBAR + 0x10004D)
179#define MCFGPIO_PPDSDR_USBH (MCF_IPSBAR + 0x10004E)
180#define MCFGPIO_PPDSDR_USBL (MCF_IPSBAR + 0x10004F)
181#define MCFGPIO_PPDSDR_UARTH (MCF_IPSBAR + 0x100050)
182
183#define MCFGPIO_PCLRR_BUSCTL (MCF_IPSBAR + 0x100058)
184#define MCFGPIO_PCLRR_ADDR (MCF_IPSBAR + 0x100059)
185#define MCFGPIO_PCLRR_CS (MCF_IPSBAR + 0x10005C)
186#define MCFGPIO_PCLRR_FEC0H (MCF_IPSBAR + 0x10005E)
187#define MCFGPIO_PCLRR_FEC0L (MCF_IPSBAR + 0x10005F)
188#define MCFGPIO_PCLRR_FECI2C (MCF_IPSBAR + 0x100060)
189#define MCFGPIO_PCLRR_QSPI (MCF_IPSBAR + 0x100061)
190#define MCFGPIO_PCLRR_SDRAM (MCF_IPSBAR + 0x100062)
191#define MCFGPIO_PCLRR_TIMERH (MCF_IPSBAR + 0x100063)
192#define MCFGPIO_PCLRR_TIMERL (MCF_IPSBAR + 0x100064)
193#define MCFGPIO_PCLRR_UARTL (MCF_IPSBAR + 0x100065)
194#define MCFGPIO_PCLRR_FEC1H (MCF_IPSBAR + 0x100066)
195#define MCFGPIO_PCLRR_FEC1L (MCF_IPSBAR + 0x100067)
196#define MCFGPIO_PCLRR_BS (MCF_IPSBAR + 0x100068)
197#define MCFGPIO_PCLRR_IRQ (MCF_IPSBAR + 0x100069)
198#define MCFGPIO_PCLRR_USBH (MCF_IPSBAR + 0x10006A)
199#define MCFGPIO_PCLRR_USBL (MCF_IPSBAR + 0x10006B)
200#define MCFGPIO_PCLRR_UARTH (MCF_IPSBAR + 0x10006C)
201
202
203/*
204 * Generic GPIO support
205 */
206#define MCFGPIO_PODR MCFGPIO_PODR_BUSCTL
207#define MCFGPIO_PDDR MCFGPIO_PDDR_BUSCTL
208#define MCFGPIO_PPDR MCFGPIO_PPDSDR_BUSCTL
209#define MCFGPIO_SETR MCFGPIO_PPDSDR_BUSCTL
210#define MCFGPIO_CLRR MCFGPIO_PCLRR_BUSCTL
211
212#define MCFGPIO_PIN_MAX 148
213#define MCFGPIO_IRQ_MAX 8
214#define MCFGPIO_IRQ_VECBASE MCFINT_VECBASE
215#endif
216
217/*
218 * EPort
219 */
220
221#define MCFEPORT_EPDDR (MCF_IPSBAR + 0x130002)
222#define MCFEPORT_EPDR (MCF_IPSBAR + 0x130004)
223#define MCFEPORT_EPPDR (MCF_IPSBAR + 0x130005)
224
225
57/* 226/*
58 * GPIO pins setups to enable the UARTs. 227 * GPIO pins setups to enable the UARTs.
59 */ 228 */
diff --git a/arch/m68k/include/asm/m528xsim.h b/arch/m68k/include/asm/m528xsim.h
index d79c49f8134a..e2ad1f42b657 100644
--- a/arch/m68k/include/asm/m528xsim.h
+++ b/arch/m68k/include/asm/m528xsim.h
@@ -41,6 +41,157 @@
41#define MCFSIM_DMR1 0x54 /* SDRAM address mask 1 */ 41#define MCFSIM_DMR1 0x54 /* SDRAM address mask 1 */
42 42
43/* 43/*
44 * GPIO registers
45 */
46#define MCFGPIO_PORTA (MCF_IPSBAR + 0x00100000)
47#define MCFGPIO_PORTB (MCF_IPSBAR + 0x00100001)
48#define MCFGPIO_PORTC (MCF_IPSBAR + 0x00100002)
49#define MCFGPIO_PORTD (MCF_IPSBAR + 0x00100003)
50#define MCFGPIO_PORTE (MCF_IPSBAR + 0x00100004)
51#define MCFGPIO_PORTF (MCF_IPSBAR + 0x00100005)
52#define MCFGPIO_PORTG (MCF_IPSBAR + 0x00100006)
53#define MCFGPIO_PORTH (MCF_IPSBAR + 0x00100007)
54#define MCFGPIO_PORTJ (MCF_IPSBAR + 0x00100008)
55#define MCFGPIO_PORTDD (MCF_IPSBAR + 0x00100009)
56#define MCFGPIO_PORTEH (MCF_IPSBAR + 0x0010000A)
57#define MCFGPIO_PORTEL (MCF_IPSBAR + 0x0010000B)
58#define MCFGPIO_PORTAS (MCF_IPSBAR + 0x0010000C)
59#define MCFGPIO_PORTQS (MCF_IPSBAR + 0x0010000D)
60#define MCFGPIO_PORTSD (MCF_IPSBAR + 0x0010000E)
61#define MCFGPIO_PORTTC (MCF_IPSBAR + 0x0010000F)
62#define MCFGPIO_PORTTD (MCF_IPSBAR + 0x00100010)
63#define MCFGPIO_PORTUA (MCF_IPSBAR + 0x00100011)
64
65#define MCFGPIO_DDRA (MCF_IPSBAR + 0x00100014)
66#define MCFGPIO_DDRB (MCF_IPSBAR + 0x00100015)
67#define MCFGPIO_DDRC (MCF_IPSBAR + 0x00100016)
68#define MCFGPIO_DDRD (MCF_IPSBAR + 0x00100017)
69#define MCFGPIO_DDRE (MCF_IPSBAR + 0x00100018)
70#define MCFGPIO_DDRF (MCF_IPSBAR + 0x00100019)
71#define MCFGPIO_DDRG (MCF_IPSBAR + 0x0010001A)
72#define MCFGPIO_DDRH (MCF_IPSBAR + 0x0010001B)
73#define MCFGPIO_DDRJ (MCF_IPSBAR + 0x0010001C)
74#define MCFGPIO_DDRDD (MCF_IPSBAR + 0x0010001D)
75#define MCFGPIO_DDREH (MCF_IPSBAR + 0x0010001E)
76#define MCFGPIO_DDREL (MCF_IPSBAR + 0x0010001F)
77#define MCFGPIO_DDRAS (MCF_IPSBAR + 0x00100020)
78#define MCFGPIO_DDRQS (MCF_IPSBAR + 0x00100021)
79#define MCFGPIO_DDRSD (MCF_IPSBAR + 0x00100022)
80#define MCFGPIO_DDRTC (MCF_IPSBAR + 0x00100023)
81#define MCFGPIO_DDRTD (MCF_IPSBAR + 0x00100024)
82#define MCFGPIO_DDRUA (MCF_IPSBAR + 0x00100025)
83
84#define MCFGPIO_PORTAP (MCF_IPSBAR + 0x00100028)
85#define MCFGPIO_PORTBP (MCF_IPSBAR + 0x00100029)
86#define MCFGPIO_PORTCP (MCF_IPSBAR + 0x0010002A)
87#define MCFGPIO_PORTDP (MCF_IPSBAR + 0x0010002B)
88#define MCFGPIO_PORTEP (MCF_IPSBAR + 0x0010002C)
89#define MCFGPIO_PORTFP (MCF_IPSBAR + 0x0010002D)
90#define MCFGPIO_PORTGP (MCF_IPSBAR + 0x0010002E)
91#define MCFGPIO_PORTHP (MCF_IPSBAR + 0x0010002F)
92#define MCFGPIO_PORTJP (MCF_IPSBAR + 0x00100030)
93#define MCFGPIO_PORTDDP (MCF_IPSBAR + 0x00100031)
94#define MCFGPIO_PORTEHP (MCF_IPSBAR + 0x00100032)
95#define MCFGPIO_PORTELP (MCF_IPSBAR + 0x00100033)
96#define MCFGPIO_PORTASP (MCF_IPSBAR + 0x00100034)
97#define MCFGPIO_PORTQSP (MCF_IPSBAR + 0x00100035)
98#define MCFGPIO_PORTSDP (MCF_IPSBAR + 0x00100036)
99#define MCFGPIO_PORTTCP (MCF_IPSBAR + 0x00100037)
100#define MCFGPIO_PORTTDP (MCF_IPSBAR + 0x00100038)
101#define MCFGPIO_PORTUAP (MCF_IPSBAR + 0x00100039)
102
103#define MCFGPIO_SETA (MCF_IPSBAR + 0x00100028)
104#define MCFGPIO_SETB (MCF_IPSBAR + 0x00100029)
105#define MCFGPIO_SETC (MCF_IPSBAR + 0x0010002A)
106#define MCFGPIO_SETD (MCF_IPSBAR + 0x0010002B)
107#define MCFGPIO_SETE (MCF_IPSBAR + 0x0010002C)
108#define MCFGPIO_SETF (MCF_IPSBAR + 0x0010002D)
109#define MCFGPIO_SETG (MCF_IPSBAR + 0x0010002E)
110#define MCFGPIO_SETH (MCF_IPSBAR + 0x0010002F)
111#define MCFGPIO_SETJ (MCF_IPSBAR + 0x00100030)
112#define MCFGPIO_SETDD (MCF_IPSBAR + 0x00100031)
113#define MCFGPIO_SETEH (MCF_IPSBAR + 0x00100032)
114#define MCFGPIO_SETEL (MCF_IPSBAR + 0x00100033)
115#define MCFGPIO_SETAS (MCF_IPSBAR + 0x00100034)
116#define MCFGPIO_SETQS (MCF_IPSBAR + 0x00100035)
117#define MCFGPIO_SETSD (MCF_IPSBAR + 0x00100036)
118#define MCFGPIO_SETTC (MCF_IPSBAR + 0x00100037)
119#define MCFGPIO_SETTD (MCF_IPSBAR + 0x00100038)
120#define MCFGPIO_SETUA (MCF_IPSBAR + 0x00100039)
121
122#define MCFGPIO_CLRA (MCF_IPSBAR + 0x0010003C)
123#define MCFGPIO_CLRB (MCF_IPSBAR + 0x0010003D)
124#define MCFGPIO_CLRC (MCF_IPSBAR + 0x0010003E)
125#define MCFGPIO_CLRD (MCF_IPSBAR + 0x0010003F)
126#define MCFGPIO_CLRE (MCF_IPSBAR + 0x00100040)
127#define MCFGPIO_CLRF (MCF_IPSBAR + 0x00100041)
128#define MCFGPIO_CLRG (MCF_IPSBAR + 0x00100042)
129#define MCFGPIO_CLRH (MCF_IPSBAR + 0x00100043)
130#define MCFGPIO_CLRJ (MCF_IPSBAR + 0x00100044)
131#define MCFGPIO_CLRDD (MCF_IPSBAR + 0x00100045)
132#define MCFGPIO_CLREH (MCF_IPSBAR + 0x00100046)
133#define MCFGPIO_CLREL (MCF_IPSBAR + 0x00100047)
134#define MCFGPIO_CLRAS (MCF_IPSBAR + 0x00100048)
135#define MCFGPIO_CLRQS (MCF_IPSBAR + 0x00100049)
136#define MCFGPIO_CLRSD (MCF_IPSBAR + 0x0010004A)
137#define MCFGPIO_CLRTC (MCF_IPSBAR + 0x0010004B)
138#define MCFGPIO_CLRTD (MCF_IPSBAR + 0x0010004C)
139#define MCFGPIO_CLRUA (MCF_IPSBAR + 0x0010004D)
140
141#define MCFGPIO_PBCDPAR (MCF_IPSBAR + 0x00100050)
142#define MCFGPIO_PFPAR (MCF_IPSBAR + 0x00100051)
143#define MCFGPIO_PEPAR (MCF_IPSBAR + 0x00100052)
144#define MCFGPIO_PJPAR (MCF_IPSBAR + 0x00100054)
145#define MCFGPIO_PSDPAR (MCF_IPSBAR + 0x00100055)
146#define MCFGPIO_PASPAR (MCF_IPSBAR + 0x00100056)
147#define MCFGPIO_PEHLPAR (MCF_IPSBAR + 0x00100058)
148#define MCFGPIO_PQSPAR (MCF_IPSBAR + 0x00100059)
149#define MCFGPIO_PTCPAR (MCF_IPSBAR + 0x0010005A)
150#define MCFGPIO_PTDPAR (MCF_IPSBAR + 0x0010005B)
151#define MCFGPIO_PUAPAR (MCF_IPSBAR + 0x0010005C)
152
153/*
154 * Edge Port registers
155 */
156#define MCFEPORT_EPPAR (MCF_IPSBAR + 0x00130000)
157#define MCFEPORT_EPDDR (MCF_IPSBAR + 0x00130002)
158#define MCFEPORT_EPIER (MCF_IPSBAR + 0x00130003)
159#define MCFEPORT_EPDR (MCF_IPSBAR + 0x00130004)
160#define MCFEPORT_EPPDR (MCF_IPSBAR + 0x00130005)
161#define MCFEPORT_EPFR (MCF_IPSBAR + 0x00130006)
162
163/*
164 * Queued ADC registers
165 */
166#define MCFQADC_PORTQA (MCF_IPSBAR + 0x00190006)
167#define MCFQADC_PORTQB (MCF_IPSBAR + 0x00190007)
168#define MCFQADC_DDRQA (MCF_IPSBAR + 0x00190008)
169#define MCFQADC_DDRQB (MCF_IPSBAR + 0x00190009)
170
171/*
172 * General Purpose Timers registers
173 */
174#define MCFGPTA_GPTPORT (MCF_IPSBAR + 0x001A001D)
175#define MCFGPTA_GPTDDR (MCF_IPSBAR + 0x001A001E)
176#define MCFGPTB_GPTPORT (MCF_IPSBAR + 0x001B001D)
177#define MCFGPTB_GPTDDR (MCF_IPSBAR + 0x001B001E)
178/*
179 *
180 * definitions for generic gpio support
181 *
182 */
183#define MCFGPIO_PODR MCFGPIO_PORTA /* port output data */
184#define MCFGPIO_PDDR MCFGPIO_DDRA /* port data direction */
185#define MCFGPIO_PPDR MCFGPIO_PORTAP /* port pin data */
186#define MCFGPIO_SETR MCFGPIO_SETA /* set output */
187#define MCFGPIO_CLRR MCFGPIO_CLRA /* clr output */
188
189#define MCFGPIO_IRQ_MAX 8
190#define MCFGPIO_IRQ_VECBASE MCFINT_VECBASE
191#define MCFGPIO_PIN_MAX 180
192
193
194/*
44 * Derek Cheung - 6 Feb 2005 195 * Derek Cheung - 6 Feb 2005
45 * add I2C and QSPI register definition using Freescale's MCF5282 196 * add I2C and QSPI register definition using Freescale's MCF5282
46 */ 197 */
diff --git a/arch/m68k/include/asm/m5307sim.h b/arch/m68k/include/asm/m5307sim.h
index 5886728409c0..c6830e5b54ce 100644
--- a/arch/m68k/include/asm/m5307sim.h
+++ b/arch/m68k/include/asm/m5307sim.h
@@ -90,8 +90,15 @@
90#define MCFSIM_DACR1 0x110 /* DRAM 1 Addr and Ctrl (r/w) */ 90#define MCFSIM_DACR1 0x110 /* DRAM 1 Addr and Ctrl (r/w) */
91#define MCFSIM_DMR1 0x114 /* DRAM 1 Mask reg (r/w) */ 91#define MCFSIM_DMR1 0x114 /* DRAM 1 Mask reg (r/w) */
92 92
93#define MCFSIM_PADDR 0x244 /* Parallel Direction (r/w) */ 93#define MCFSIM_PADDR (MCF_MBAR + 0x244)
94#define MCFSIM_PADAT 0x248 /* Parallel Data (r/w) */ 94#define MCFSIM_PADAT (MCF_MBAR + 0x248)
95
96/*
97 * Generic GPIO support
98 */
99#define MCFGPIO_PIN_MAX 16
100#define MCFGPIO_IRQ_MAX -1
101#define MCFGPIO_IRQ_VECBASE -1
95 102
96 103
97/* Definition offset address for CS2-7 -- old mask 5307 */ 104/* Definition offset address for CS2-7 -- old mask 5307 */
@@ -117,22 +124,6 @@
117#define MCFSIM_DMA2ICR MCFSIM_ICR8 /* DMA 2 ICR */ 124#define MCFSIM_DMA2ICR MCFSIM_ICR8 /* DMA 2 ICR */
118#define MCFSIM_DMA3ICR MCFSIM_ICR9 /* DMA 3 ICR */ 125#define MCFSIM_DMA3ICR MCFSIM_ICR9 /* DMA 3 ICR */
119 126
120#if defined(CONFIG_M5307)
121#define MCFSIM_IMR_MASKALL 0x3fffe /* All SIM intr sources */
122#endif
123
124/*
125 * Macro to set IMR register. It is 32 bits on the 5307.
126 */
127#define mcf_getimr() \
128 *((volatile unsigned long *) (MCF_MBAR + MCFSIM_IMR))
129
130#define mcf_setimr(imr) \
131 *((volatile unsigned long *) (MCF_MBAR + MCFSIM_IMR)) = (imr);
132
133#define mcf_getipr() \
134 *((volatile unsigned long *) (MCF_MBAR + MCFSIM_IPR))
135
136 127
137/* 128/*
138 * Some symbol defines for the Parallel Port Pin Assignment Register 129 * Some symbol defines for the Parallel Port Pin Assignment Register
@@ -149,6 +140,11 @@
149#define IRQ3_LEVEL6 0x40 140#define IRQ3_LEVEL6 0x40
150#define IRQ1_LEVEL2 0x20 141#define IRQ1_LEVEL2 0x20
151 142
143/*
144 * Define system peripheral IRQ usage.
145 */
146#define MCF_IRQ_TIMER 30 /* Timer0, Level 6 */
147#define MCF_IRQ_PROFILER 31 /* Timer1, Level 7 */
152 148
153/* 149/*
154 * Define the Cache register flags. 150 * Define the Cache register flags.
diff --git a/arch/m68k/include/asm/m532xsim.h b/arch/m68k/include/asm/m532xsim.h
index eb7fd4448947..36bf15aec9ae 100644
--- a/arch/m68k/include/asm/m532xsim.h
+++ b/arch/m68k/include/asm/m532xsim.h
@@ -56,47 +56,21 @@
56#define MCFSIM_DMA3ICR MCFSIM_ICR9 /* DMA 3 ICR */ 56#define MCFSIM_DMA3ICR MCFSIM_ICR9 /* DMA 3 ICR */
57 57
58 58
59#define MCFSIM_IMR_MASKALL 0xFFFFFFFF /* All SIM intr sources */ 59#define MCFINTC0_SIMR 0xFC04801C
60 60#define MCFINTC0_CIMR 0xFC04801D
61#define MCFSIM_IMR_SIMR0 0xFC04801C 61#define MCFINTC0_ICR0 0xFC048040
62#define MCFSIM_IMR_SIMR1 0xFC04C01C 62#define MCFINTC1_SIMR 0xFC04C01C
63#define MCFSIM_IMR_CIMR0 0xFC04801D 63#define MCFINTC1_CIMR 0xFC04C01D
64#define MCFSIM_IMR_CIMR1 0xFC04C01D 64#define MCFINTC1_ICR0 0xFC04C040
65 65
66#define MCFSIM_ICR_TIMER1 (0xFC048040+32) 66#define MCFSIM_ICR_TIMER1 (0xFC048040+32)
67#define MCFSIM_ICR_TIMER2 (0xFC048040+33) 67#define MCFSIM_ICR_TIMER2 (0xFC048040+33)
68 68
69
70/* 69/*
71 * Macro to set IMR register. It is 32 bits on the 5307. 70 * Define system peripheral IRQ usage.
72 */ 71 */
73#define mcf_getimr() \ 72#define MCF_IRQ_TIMER (64 + 32) /* Timer0 */
74 *((volatile unsigned long *) (MCF_MBAR + MCFSIM_IMR)) 73#define MCF_IRQ_PROFILER (64 + 33) /* Timer1 */
75
76#define mcf_setimr(imr) \
77 *((volatile unsigned long *) (MCF_MBAR + MCFSIM_IMR)) = (imr);
78
79#define mcf_getipr() \
80 *((volatile unsigned long *) (MCF_MBAR + MCFSIM_IPR))
81
82#define mcf_getiprl() \
83 *((volatile unsigned long *) (MCF_MBAR + MCFSIM_IPRL))
84
85#define mcf_getiprh() \
86 *((volatile unsigned long *) (MCF_MBAR + MCFSIM_IPRH))
87
88
89#define mcf_enable_irq0(irq) \
90 *((volatile unsigned char*) (MCFSIM_IMR_CIMR0)) = (irq);
91
92#define mcf_enable_irq1(irq) \
93 *((volatile unsigned char*) (MCFSIM_IMR_CIMR1)) = (irq);
94
95#define mcf_disable_irq0(irq) \
96 *((volatile unsigned char*) (MCFSIM_IMR_SIMR0)) = (irq);
97
98#define mcf_disable_irq1(irq) \
99 *((volatile unsigned char*) (MCFSIM_IMR_SIMR1)) = (irq);
100 74
101/* 75/*
102 * Define the Cache register flags. 76 * Define the Cache register flags.
@@ -422,70 +396,70 @@
422 *********************************************************************/ 396 *********************************************************************/
423 397
424/* Register read/write macros */ 398/* Register read/write macros */
425#define MCF_GPIO_PODR_FECH MCF_REG08(0xFC0A4000) 399#define MCFGPIO_PODR_FECH (0xFC0A4000)
426#define MCF_GPIO_PODR_FECL MCF_REG08(0xFC0A4001) 400#define MCFGPIO_PODR_FECL (0xFC0A4001)
427#define MCF_GPIO_PODR_SSI MCF_REG08(0xFC0A4002) 401#define MCFGPIO_PODR_SSI (0xFC0A4002)
428#define MCF_GPIO_PODR_BUSCTL MCF_REG08(0xFC0A4003) 402#define MCFGPIO_PODR_BUSCTL (0xFC0A4003)
429#define MCF_GPIO_PODR_BE MCF_REG08(0xFC0A4004) 403#define MCFGPIO_PODR_BE (0xFC0A4004)
430#define MCF_GPIO_PODR_CS MCF_REG08(0xFC0A4005) 404#define MCFGPIO_PODR_CS (0xFC0A4005)
431#define MCF_GPIO_PODR_PWM MCF_REG08(0xFC0A4006) 405#define MCFGPIO_PODR_PWM (0xFC0A4006)
432#define MCF_GPIO_PODR_FECI2C MCF_REG08(0xFC0A4007) 406#define MCFGPIO_PODR_FECI2C (0xFC0A4007)
433#define MCF_GPIO_PODR_UART MCF_REG08(0xFC0A4009) 407#define MCFGPIO_PODR_UART (0xFC0A4009)
434#define MCF_GPIO_PODR_QSPI MCF_REG08(0xFC0A400A) 408#define MCFGPIO_PODR_QSPI (0xFC0A400A)
435#define MCF_GPIO_PODR_TIMER MCF_REG08(0xFC0A400B) 409#define MCFGPIO_PODR_TIMER (0xFC0A400B)
436#define MCF_GPIO_PODR_LCDDATAH MCF_REG08(0xFC0A400D) 410#define MCFGPIO_PODR_LCDDATAH (0xFC0A400D)
437#define MCF_GPIO_PODR_LCDDATAM MCF_REG08(0xFC0A400E) 411#define MCFGPIO_PODR_LCDDATAM (0xFC0A400E)
438#define MCF_GPIO_PODR_LCDDATAL MCF_REG08(0xFC0A400F) 412#define MCFGPIO_PODR_LCDDATAL (0xFC0A400F)
439#define MCF_GPIO_PODR_LCDCTLH MCF_REG08(0xFC0A4010) 413#define MCFGPIO_PODR_LCDCTLH (0xFC0A4010)
440#define MCF_GPIO_PODR_LCDCTLL MCF_REG08(0xFC0A4011) 414#define MCFGPIO_PODR_LCDCTLL (0xFC0A4011)
441#define MCF_GPIO_PDDR_FECH MCF_REG08(0xFC0A4014) 415#define MCFGPIO_PDDR_FECH (0xFC0A4014)
442#define MCF_GPIO_PDDR_FECL MCF_REG08(0xFC0A4015) 416#define MCFGPIO_PDDR_FECL (0xFC0A4015)
443#define MCF_GPIO_PDDR_SSI MCF_REG08(0xFC0A4016) 417#define MCFGPIO_PDDR_SSI (0xFC0A4016)
444#define MCF_GPIO_PDDR_BUSCTL MCF_REG08(0xFC0A4017) 418#define MCFGPIO_PDDR_BUSCTL (0xFC0A4017)
445#define MCF_GPIO_PDDR_BE MCF_REG08(0xFC0A4018) 419#define MCFGPIO_PDDR_BE (0xFC0A4018)
446#define MCF_GPIO_PDDR_CS MCF_REG08(0xFC0A4019) 420#define MCFGPIO_PDDR_CS (0xFC0A4019)
447#define MCF_GPIO_PDDR_PWM MCF_REG08(0xFC0A401A) 421#define MCFGPIO_PDDR_PWM (0xFC0A401A)
448#define MCF_GPIO_PDDR_FECI2C MCF_REG08(0xFC0A401B) 422#define MCFGPIO_PDDR_FECI2C (0xFC0A401B)
449#define MCF_GPIO_PDDR_UART MCF_REG08(0xFC0A401C) 423#define MCFGPIO_PDDR_UART (0xFC0A401C)
450#define MCF_GPIO_PDDR_QSPI MCF_REG08(0xFC0A401E) 424#define MCFGPIO_PDDR_QSPI (0xFC0A401E)
451#define MCF_GPIO_PDDR_TIMER MCF_REG08(0xFC0A401F) 425#define MCFGPIO_PDDR_TIMER (0xFC0A401F)
452#define MCF_GPIO_PDDR_LCDDATAH MCF_REG08(0xFC0A4021) 426#define MCFGPIO_PDDR_LCDDATAH (0xFC0A4021)
453#define MCF_GPIO_PDDR_LCDDATAM MCF_REG08(0xFC0A4022) 427#define MCFGPIO_PDDR_LCDDATAM (0xFC0A4022)
454#define MCF_GPIO_PDDR_LCDDATAL MCF_REG08(0xFC0A4023) 428#define MCFGPIO_PDDR_LCDDATAL (0xFC0A4023)
455#define MCF_GPIO_PDDR_LCDCTLH MCF_REG08(0xFC0A4024) 429#define MCFGPIO_PDDR_LCDCTLH (0xFC0A4024)
456#define MCF_GPIO_PDDR_LCDCTLL MCF_REG08(0xFC0A4025) 430#define MCFGPIO_PDDR_LCDCTLL (0xFC0A4025)
457#define MCF_GPIO_PPDSDR_FECH MCF_REG08(0xFC0A4028) 431#define MCFGPIO_PPDSDR_FECH (0xFC0A4028)
458#define MCF_GPIO_PPDSDR_FECL MCF_REG08(0xFC0A4029) 432#define MCFGPIO_PPDSDR_FECL (0xFC0A4029)
459#define MCF_GPIO_PPDSDR_SSI MCF_REG08(0xFC0A402A) 433#define MCFGPIO_PPDSDR_SSI (0xFC0A402A)
460#define MCF_GPIO_PPDSDR_BUSCTL MCF_REG08(0xFC0A402B) 434#define MCFGPIO_PPDSDR_BUSCTL (0xFC0A402B)
461#define MCF_GPIO_PPDSDR_BE MCF_REG08(0xFC0A402C) 435#define MCFGPIO_PPDSDR_BE (0xFC0A402C)
462#define MCF_GPIO_PPDSDR_CS MCF_REG08(0xFC0A402D) 436#define MCFGPIO_PPDSDR_CS (0xFC0A402D)
463#define MCF_GPIO_PPDSDR_PWM MCF_REG08(0xFC0A402E) 437#define MCFGPIO_PPDSDR_PWM (0xFC0A402E)
464#define MCF_GPIO_PPDSDR_FECI2C MCF_REG08(0xFC0A402F) 438#define MCFGPIO_PPDSDR_FECI2C (0xFC0A402F)
465#define MCF_GPIO_PPDSDR_UART MCF_REG08(0xFC0A4031) 439#define MCFGPIO_PPDSDR_UART (0xFC0A4031)
466#define MCF_GPIO_PPDSDR_QSPI MCF_REG08(0xFC0A4032) 440#define MCFGPIO_PPDSDR_QSPI (0xFC0A4032)
467#define MCF_GPIO_PPDSDR_TIMER MCF_REG08(0xFC0A4033) 441#define MCFGPIO_PPDSDR_TIMER (0xFC0A4033)
468#define MCF_GPIO_PPDSDR_LCDDATAH MCF_REG08(0xFC0A4035) 442#define MCFGPIO_PPDSDR_LCDDATAH (0xFC0A4035)
469#define MCF_GPIO_PPDSDR_LCDDATAM MCF_REG08(0xFC0A4036) 443#define MCFGPIO_PPDSDR_LCDDATAM (0xFC0A4036)
470#define MCF_GPIO_PPDSDR_LCDDATAL MCF_REG08(0xFC0A4037) 444#define MCFGPIO_PPDSDR_LCDDATAL (0xFC0A4037)
471#define MCF_GPIO_PPDSDR_LCDCTLH MCF_REG08(0xFC0A4038) 445#define MCFGPIO_PPDSDR_LCDCTLH (0xFC0A4038)
472#define MCF_GPIO_PPDSDR_LCDCTLL MCF_REG08(0xFC0A4039) 446#define MCFGPIO_PPDSDR_LCDCTLL (0xFC0A4039)
473#define MCF_GPIO_PCLRR_FECH MCF_REG08(0xFC0A403C) 447#define MCFGPIO_PCLRR_FECH (0xFC0A403C)
474#define MCF_GPIO_PCLRR_FECL MCF_REG08(0xFC0A403D) 448#define MCFGPIO_PCLRR_FECL (0xFC0A403D)
475#define MCF_GPIO_PCLRR_SSI MCF_REG08(0xFC0A403E) 449#define MCFGPIO_PCLRR_SSI (0xFC0A403E)
476#define MCF_GPIO_PCLRR_BUSCTL MCF_REG08(0xFC0A403F) 450#define MCFGPIO_PCLRR_BUSCTL (0xFC0A403F)
477#define MCF_GPIO_PCLRR_BE MCF_REG08(0xFC0A4040) 451#define MCFGPIO_PCLRR_BE (0xFC0A4040)
478#define MCF_GPIO_PCLRR_CS MCF_REG08(0xFC0A4041) 452#define MCFGPIO_PCLRR_CS (0xFC0A4041)
479#define MCF_GPIO_PCLRR_PWM MCF_REG08(0xFC0A4042) 453#define MCFGPIO_PCLRR_PWM (0xFC0A4042)
480#define MCF_GPIO_PCLRR_FECI2C MCF_REG08(0xFC0A4043) 454#define MCFGPIO_PCLRR_FECI2C (0xFC0A4043)
481#define MCF_GPIO_PCLRR_UART MCF_REG08(0xFC0A4045) 455#define MCFGPIO_PCLRR_UART (0xFC0A4045)
482#define MCF_GPIO_PCLRR_QSPI MCF_REG08(0xFC0A4046) 456#define MCFGPIO_PCLRR_QSPI (0xFC0A4046)
483#define MCF_GPIO_PCLRR_TIMER MCF_REG08(0xFC0A4047) 457#define MCFGPIO_PCLRR_TIMER (0xFC0A4047)
484#define MCF_GPIO_PCLRR_LCDDATAH MCF_REG08(0xFC0A4049) 458#define MCFGPIO_PCLRR_LCDDATAH (0xFC0A4049)
485#define MCF_GPIO_PCLRR_LCDDATAM MCF_REG08(0xFC0A404A) 459#define MCFGPIO_PCLRR_LCDDATAM (0xFC0A404A)
486#define MCF_GPIO_PCLRR_LCDDATAL MCF_REG08(0xFC0A404B) 460#define MCFGPIO_PCLRR_LCDDATAL (0xFC0A404B)
487#define MCF_GPIO_PCLRR_LCDCTLH MCF_REG08(0xFC0A404C) 461#define MCFGPIO_PCLRR_LCDCTLH (0xFC0A404C)
488#define MCF_GPIO_PCLRR_LCDCTLL MCF_REG08(0xFC0A404D) 462#define MCFGPIO_PCLRR_LCDCTLL (0xFC0A404D)
489#define MCF_GPIO_PAR_FEC MCF_REG08(0xFC0A4050) 463#define MCF_GPIO_PAR_FEC MCF_REG08(0xFC0A4050)
490#define MCF_GPIO_PAR_PWM MCF_REG08(0xFC0A4051) 464#define MCF_GPIO_PAR_PWM MCF_REG08(0xFC0A4051)
491#define MCF_GPIO_PAR_BUSCTL MCF_REG08(0xFC0A4052) 465#define MCF_GPIO_PAR_BUSCTL MCF_REG08(0xFC0A4052)
@@ -1187,6 +1161,20 @@
1187/* Bit definitions and macros for MCF_GPIO_DSCR_IRQ */ 1161/* Bit definitions and macros for MCF_GPIO_DSCR_IRQ */
1188#define MCF_GPIO_DSCR_IRQ_IRQ_DSE(x) (((x)&0x03)<<0) 1162#define MCF_GPIO_DSCR_IRQ_IRQ_DSE(x) (((x)&0x03)<<0)
1189 1163
1164/*
1165 * Generic GPIO support
1166 */
1167#define MCFGPIO_PODR MCFGPIO_PODR_FECH
1168#define MCFGPIO_PDDR MCFGPIO_PDDR_FECH
1169#define MCFGPIO_PPDR MCFGPIO_PPDSDR_FECH
1170#define MCFGPIO_SETR MCFGPIO_PPDSDR_FECH
1171#define MCFGPIO_CLRR MCFGPIO_PCLRR_FECH
1172
1173#define MCFGPIO_PIN_MAX 136
1174#define MCFGPIO_IRQ_MAX 8
1175#define MCFGPIO_IRQ_VECBASE MCFINT_VECBASE
1176
1177
1190/********************************************************************* 1178/*********************************************************************
1191 * 1179 *
1192 * Interrupt Controller (INTC) 1180 * Interrupt Controller (INTC)
@@ -2154,12 +2142,12 @@
2154 *********************************************************************/ 2142 *********************************************************************/
2155 2143
2156/* Register read/write macros */ 2144/* Register read/write macros */
2157#define MCF_EPORT_EPPAR MCF_REG16(0xFC094000) 2145#define MCFEPORT_EPPAR (0xFC094000)
2158#define MCF_EPORT_EPDDR MCF_REG08(0xFC094002) 2146#define MCFEPORT_EPDDR (0xFC094002)
2159#define MCF_EPORT_EPIER MCF_REG08(0xFC094003) 2147#define MCFEPORT_EPIER (0xFC094003)
2160#define MCF_EPORT_EPDR MCF_REG08(0xFC094004) 2148#define MCFEPORT_EPDR (0xFC094004)
2161#define MCF_EPORT_EPPDR MCF_REG08(0xFC094005) 2149#define MCFEPORT_EPPDR (0xFC094005)
2162#define MCF_EPORT_EPFR MCF_REG08(0xFC094006) 2150#define MCFEPORT_EPFR (0xFC094006)
2163 2151
2164/* Bit definitions and macros for MCF_EPORT_EPPAR */ 2152/* Bit definitions and macros for MCF_EPORT_EPPAR */
2165#define MCF_EPORT_EPPAR_EPPA1(x) (((x)&0x0003)<<2) 2153#define MCF_EPORT_EPPAR_EPPA1(x) (((x)&0x0003)<<2)
diff --git a/arch/m68k/include/asm/m5407sim.h b/arch/m68k/include/asm/m5407sim.h
index cc22c4a53005..c399abbf953c 100644
--- a/arch/m68k/include/asm/m5407sim.h
+++ b/arch/m68k/include/asm/m5407sim.h
@@ -73,9 +73,15 @@
73#define MCFSIM_DACR1 0x110 /* DRAM 1 Addr and Ctrl (r/w) */ 73#define MCFSIM_DACR1 0x110 /* DRAM 1 Addr and Ctrl (r/w) */
74#define MCFSIM_DMR1 0x114 /* DRAM 1 Mask reg (r/w) */ 74#define MCFSIM_DMR1 0x114 /* DRAM 1 Mask reg (r/w) */
75 75
76#define MCFSIM_PADDR 0x244 /* Parallel Direction (r/w) */ 76#define MCFSIM_PADDR (MCF_MBAR + 0x244)
77#define MCFSIM_PADAT 0x248 /* Parallel Data (r/w) */ 77#define MCFSIM_PADAT (MCF_MBAR + 0x248)
78 78
79/*
80 * Generic GPIO support
81 */
82#define MCFGPIO_PIN_MAX 16
83#define MCFGPIO_IRQ_MAX -1
84#define MCFGPIO_IRQ_VECBASE -1
79 85
80/* 86/*
81 * Some symbol defines for the above... 87 * Some symbol defines for the above...
@@ -91,19 +97,6 @@
91#define MCFSIM_DMA3ICR MCFSIM_ICR9 /* DMA 3 ICR */ 97#define MCFSIM_DMA3ICR MCFSIM_ICR9 /* DMA 3 ICR */
92 98
93/* 99/*
94 * Macro to set IMR register. It is 32 bits on the 5407.
95 */
96#define mcf_getimr() \
97 *((volatile unsigned long *) (MCF_MBAR + MCFSIM_IMR))
98
99#define mcf_setimr(imr) \
100 *((volatile unsigned long *) (MCF_MBAR + MCFSIM_IMR)) = (imr);
101
102#define mcf_getipr() \
103 *((volatile unsigned long *) (MCF_MBAR + MCFSIM_IPR))
104
105
106/*
107 * Some symbol defines for the Parallel Port Pin Assignment Register 100 * Some symbol defines for the Parallel Port Pin Assignment Register
108 */ 101 */
109#define MCFSIM_PAR_DREQ0 0x40 /* Set to select DREQ0 input */ 102#define MCFSIM_PAR_DREQ0 0x40 /* Set to select DREQ0 input */
@@ -118,6 +111,11 @@
118#define IRQ3_LEVEL6 0x40 111#define IRQ3_LEVEL6 0x40
119#define IRQ1_LEVEL2 0x20 112#define IRQ1_LEVEL2 0x20
120 113
114/*
115 * Define system peripheral IRQ usage.
116 */
117#define MCF_IRQ_TIMER 30 /* Timer0, Level 6 */
118#define MCF_IRQ_PROFILER 31 /* Timer1, Level 7 */
121 119
122/* 120/*
123 * Define the Cache register flags. 121 * Define the Cache register flags.
diff --git a/arch/m68k/include/asm/mcfgpio.h b/arch/m68k/include/asm/mcfgpio.h
new file mode 100644
index 000000000000..ee5e4ccce89e
--- /dev/null
+++ b/arch/m68k/include/asm/mcfgpio.h
@@ -0,0 +1,40 @@
1/*
2 * Coldfire generic GPIO support.
3 *
4 * (C) Copyright 2009, Steven King <sfking@fdwdc.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 as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15
16#ifndef mcfgpio_h
17#define mcfgpio_h
18
19#include <linux/io.h>
20#include <asm-generic/gpio.h>
21
22struct mcf_gpio_chip {
23 struct gpio_chip gpio_chip;
24 void __iomem *pddr;
25 void __iomem *podr;
26 void __iomem *ppdr;
27 void __iomem *setr;
28 void __iomem *clrr;
29 const u8 *gpio_to_pinmux;
30};
31
32int mcf_gpio_direction_input(struct gpio_chip *, unsigned);
33int mcf_gpio_get_value(struct gpio_chip *, unsigned);
34int mcf_gpio_direction_output(struct gpio_chip *, unsigned, int);
35void mcf_gpio_set_value(struct gpio_chip *, unsigned, int);
36void mcf_gpio_set_value_fast(struct gpio_chip *, unsigned, int);
37int mcf_gpio_request(struct gpio_chip *, unsigned);
38void mcf_gpio_free(struct gpio_chip *, unsigned);
39
40#endif
diff --git a/arch/m68k/include/asm/mcfintc.h b/arch/m68k/include/asm/mcfintc.h
new file mode 100644
index 000000000000..4183320a3813
--- /dev/null
+++ b/arch/m68k/include/asm/mcfintc.h
@@ -0,0 +1,89 @@
1/****************************************************************************/
2
3/*
4 * mcfintc.h -- support definitions for the simple ColdFire
5 * Interrupt Controller
6 *
7 * (C) Copyright 2009, Greg Ungerer <gerg@uclinux.org>
8 */
9
10/****************************************************************************/
11#ifndef mcfintc_h
12#define mcfintc_h
13/****************************************************************************/
14
15/*
16 * Most of the older ColdFire parts use the same simple interrupt
17 * controller. This is currently used on the 5206, 5206e, 5249, 5307
18 * and 5407 parts.
19 *
20 * The builtin peripherals are masked through dedicated bits in the
21 * Interrupt Mask register (IMR) - and this is not indexed (or in any way
22 * related to) the actual interrupt number they use. So knowing the IRQ
23 * number doesn't explicitly map to a certain internal device for
24 * interrupt control purposes.
25 */
26
27/*
28 * Bit definitions for the ICR family of registers.
29 */
30#define MCFSIM_ICR_AUTOVEC 0x80 /* Auto-vectored intr */
31#define MCFSIM_ICR_LEVEL0 0x00 /* Level 0 intr */
32#define MCFSIM_ICR_LEVEL1 0x04 /* Level 1 intr */
33#define MCFSIM_ICR_LEVEL2 0x08 /* Level 2 intr */
34#define MCFSIM_ICR_LEVEL3 0x0c /* Level 3 intr */
35#define MCFSIM_ICR_LEVEL4 0x10 /* Level 4 intr */
36#define MCFSIM_ICR_LEVEL5 0x14 /* Level 5 intr */
37#define MCFSIM_ICR_LEVEL6 0x18 /* Level 6 intr */
38#define MCFSIM_ICR_LEVEL7 0x1c /* Level 7 intr */
39
40#define MCFSIM_ICR_PRI0 0x00 /* Priority 0 intr */
41#define MCFSIM_ICR_PRI1 0x01 /* Priority 1 intr */
42#define MCFSIM_ICR_PRI2 0x02 /* Priority 2 intr */
43#define MCFSIM_ICR_PRI3 0x03 /* Priority 3 intr */
44
45/*
46 * IMR bit position definitions. Not all ColdFire parts with this interrupt
47 * controller actually support all of these interrupt sources. But the bit
48 * numbers are the same in all cores.
49 */
50#define MCFINTC_EINT1 1 /* External int #1 */
51#define MCFINTC_EINT2 2 /* External int #2 */
52#define MCFINTC_EINT3 3 /* External int #3 */
53#define MCFINTC_EINT4 4 /* External int #4 */
54#define MCFINTC_EINT5 5 /* External int #5 */
55#define MCFINTC_EINT6 6 /* External int #6 */
56#define MCFINTC_EINT7 7 /* External int #7 */
57#define MCFINTC_SWT 8 /* Software Watchdog */
58#define MCFINTC_TIMER1 9
59#define MCFINTC_TIMER2 10
60#define MCFINTC_I2C 11 /* I2C / MBUS */
61#define MCFINTC_UART0 12
62#define MCFINTC_UART1 13
63#define MCFINTC_DMA0 14
64#define MCFINTC_DMA1 15
65#define MCFINTC_DMA2 16
66#define MCFINTC_DMA3 17
67#define MCFINTC_QSPI 18
68
69#ifndef __ASSEMBLER__
70
71/*
72 * There is no one-is-one correspondance between the interrupt number (irq)
73 * and the bit fields on the mask register. So we create a per-cpu type
74 * mapping of irq to mask bit. The CPU platform code needs to register
75 * its supported irq's at init time, using this function.
76 */
77extern unsigned char mcf_irq2imr[];
78static inline void mcf_mapirq2imr(int irq, int imr)
79{
80 mcf_irq2imr[irq] = imr;
81}
82
83void mcf_autovector(int irq);
84void mcf_setimr(int index);
85void mcf_clrimr(int index);
86#endif
87
88/****************************************************************************/
89#endif /* mcfintc_h */
diff --git a/arch/m68k/include/asm/mcfne.h b/arch/m68k/include/asm/mcfne.h
index 431f63aadd0e..bf638be0958c 100644
--- a/arch/m68k/include/asm/mcfne.h
+++ b/arch/m68k/include/asm/mcfne.h
@@ -239,87 +239,4 @@ void ne2000_outsw(unsigned int addr, const void *vbuf, unsigned long len)
239#endif /* NE2000_OFFOFFSET */ 239#endif /* NE2000_OFFOFFSET */
240 240
241/****************************************************************************/ 241/****************************************************************************/
242
243#ifdef COLDFIRE_NE2000_FUNCS
244
245/*
246 * Lastly the interrupt set up code...
247 * Minor differences between the different board types.
248 */
249
250#if defined(CONFIG_ARN5206)
251void ne2000_irqsetup(int irq)
252{
253 volatile unsigned char *icrp;
254
255 icrp = (volatile unsigned char *) (MCF_MBAR + MCFSIM_ICR4);
256 *icrp = MCFSIM_ICR_LEVEL4 | MCFSIM_ICR_PRI2;
257 mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_EINT4);
258}
259#endif
260
261#if defined(CONFIG_M5206eC3)
262void ne2000_irqsetup(int irq)
263{
264 volatile unsigned char *icrp;
265
266 icrp = (volatile unsigned char *) (MCF_MBAR + MCFSIM_ICR4);
267 *icrp = MCFSIM_ICR_LEVEL4 | MCFSIM_ICR_PRI2 | MCFSIM_ICR_AUTOVEC;
268 mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_EINT4);
269}
270#endif
271
272#if defined(CONFIG_M5206e) && defined(CONFIG_NETtel)
273void ne2000_irqsetup(int irq)
274{
275 mcf_autovector(irq);
276}
277#endif
278
279#if defined(CONFIG_M5272) && defined(CONFIG_NETtel)
280void ne2000_irqsetup(int irq)
281{
282 volatile unsigned long *icrp;
283 volatile unsigned long *pitr;
284
285 /* The NE2000 device uses external IRQ3 */
286 icrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_ICR1);
287 *icrp = (*icrp & 0x77077777) | 0x00d00000;
288
289 pitr = (volatile unsigned long *) (MCF_MBAR + MCFSIM_PITR);
290 *pitr = *pitr | 0x20000000;
291}
292
293void ne2000_irqack(int irq)
294{
295 volatile unsigned long *icrp;
296
297 /* The NE2000 device uses external IRQ3 */
298 icrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_ICR1);
299 *icrp = (*icrp & 0x77777777) | 0x00800000;
300}
301#endif
302
303#if defined(CONFIG_M5307) || defined(CONFIG_M5407)
304#if defined(CONFIG_NETtel) || defined(CONFIG_SECUREEDGEMP3)
305
306void ne2000_irqsetup(int irq)
307{
308 mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_EINT3);
309 mcf_autovector(irq);
310}
311
312#else
313
314void ne2000_irqsetup(int irq)
315{
316 mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_EINT3);
317}
318
319#endif /* ! CONFIG_NETtel || CONFIG_SECUREEDGEMP3 */
320#endif /* CONFIG_M5307 || CONFIG_M5407 */
321
322#endif /* COLDFIRE_NE2000_FUNCS */
323
324/****************************************************************************/
325#endif /* mcfne_h */ 242#endif /* mcfne_h */
diff --git a/arch/m68k/include/asm/mcfsim.h b/arch/m68k/include/asm/mcfsim.h
index da3f2ceff3a4..9c70a67bf85f 100644
--- a/arch/m68k/include/asm/mcfsim.h
+++ b/arch/m68k/include/asm/mcfsim.h
@@ -4,7 +4,7 @@
4 * mcfsim.h -- ColdFire System Integration Module support. 4 * mcfsim.h -- ColdFire System Integration Module support.
5 * 5 *
6 * (C) Copyright 1999-2003, Greg Ungerer (gerg@snapgear.com) 6 * (C) Copyright 1999-2003, Greg Ungerer (gerg@snapgear.com)
7 * (C) Copyright 2000, Lineo Inc. (www.lineo.com) 7 * (C) Copyright 2000, Lineo Inc. (www.lineo.com)
8 */ 8 */
9 9
10/****************************************************************************/ 10/****************************************************************************/
@@ -12,19 +12,21 @@
12#define mcfsim_h 12#define mcfsim_h
13/****************************************************************************/ 13/****************************************************************************/
14 14
15
16/* 15/*
17 * Include 5204, 5206/e, 5235, 5249, 5270/5271, 5272, 5280/5282, 16 * Include the appropriate ColdFire CPU specific System Integration Module
18 * 5307 or 5407 specific addresses. 17 * (SIM) definitions.
19 */ 18 */
20#if defined(CONFIG_M5206) || defined(CONFIG_M5206e) 19#if defined(CONFIG_M5206) || defined(CONFIG_M5206e)
21#include <asm/m5206sim.h> 20#include <asm/m5206sim.h>
21#include <asm/mcfintc.h>
22#elif defined(CONFIG_M520x) 22#elif defined(CONFIG_M520x)
23#include <asm/m520xsim.h> 23#include <asm/m520xsim.h>
24#elif defined(CONFIG_M523x) 24#elif defined(CONFIG_M523x)
25#include <asm/m523xsim.h> 25#include <asm/m523xsim.h>
26#include <asm/mcfintc.h>
26#elif defined(CONFIG_M5249) 27#elif defined(CONFIG_M5249)
27#include <asm/m5249sim.h> 28#include <asm/m5249sim.h>
29#include <asm/mcfintc.h>
28#elif defined(CONFIG_M527x) 30#elif defined(CONFIG_M527x)
29#include <asm/m527xsim.h> 31#include <asm/m527xsim.h>
30#elif defined(CONFIG_M5272) 32#elif defined(CONFIG_M5272)
@@ -33,94 +35,13 @@
33#include <asm/m528xsim.h> 35#include <asm/m528xsim.h>
34#elif defined(CONFIG_M5307) 36#elif defined(CONFIG_M5307)
35#include <asm/m5307sim.h> 37#include <asm/m5307sim.h>
38#include <asm/mcfintc.h>
36#elif defined(CONFIG_M532x) 39#elif defined(CONFIG_M532x)
37#include <asm/m532xsim.h> 40#include <asm/m532xsim.h>
38#elif defined(CONFIG_M5407) 41#elif defined(CONFIG_M5407)
39#include <asm/m5407sim.h> 42#include <asm/m5407sim.h>
43#include <asm/mcfintc.h>
40#endif 44#endif
41 45
42
43/*
44 * Define the base address of the SIM within the MBAR address space.
45 */
46#define MCFSIM_BASE 0x0 /* Base address of SIM */
47
48
49/*
50 * Bit definitions for the ICR family of registers.
51 */
52#define MCFSIM_ICR_AUTOVEC 0x80 /* Auto-vectored intr */
53#define MCFSIM_ICR_LEVEL0 0x00 /* Level 0 intr */
54#define MCFSIM_ICR_LEVEL1 0x04 /* Level 1 intr */
55#define MCFSIM_ICR_LEVEL2 0x08 /* Level 2 intr */
56#define MCFSIM_ICR_LEVEL3 0x0c /* Level 3 intr */
57#define MCFSIM_ICR_LEVEL4 0x10 /* Level 4 intr */
58#define MCFSIM_ICR_LEVEL5 0x14 /* Level 5 intr */
59#define MCFSIM_ICR_LEVEL6 0x18 /* Level 6 intr */
60#define MCFSIM_ICR_LEVEL7 0x1c /* Level 7 intr */
61
62#define MCFSIM_ICR_PRI0 0x00 /* Priority 0 intr */
63#define MCFSIM_ICR_PRI1 0x01 /* Priority 1 intr */
64#define MCFSIM_ICR_PRI2 0x02 /* Priority 2 intr */
65#define MCFSIM_ICR_PRI3 0x03 /* Priority 3 intr */
66
67/*
68 * Bit definitions for the Interrupt Mask register (IMR).
69 */
70#define MCFSIM_IMR_EINT1 0x0002 /* External intr # 1 */
71#define MCFSIM_IMR_EINT2 0x0004 /* External intr # 2 */
72#define MCFSIM_IMR_EINT3 0x0008 /* External intr # 3 */
73#define MCFSIM_IMR_EINT4 0x0010 /* External intr # 4 */
74#define MCFSIM_IMR_EINT5 0x0020 /* External intr # 5 */
75#define MCFSIM_IMR_EINT6 0x0040 /* External intr # 6 */
76#define MCFSIM_IMR_EINT7 0x0080 /* External intr # 7 */
77
78#define MCFSIM_IMR_SWD 0x0100 /* Software Watchdog intr */
79#define MCFSIM_IMR_TIMER1 0x0200 /* TIMER 1 intr */
80#define MCFSIM_IMR_TIMER2 0x0400 /* TIMER 2 intr */
81#define MCFSIM_IMR_MBUS 0x0800 /* MBUS intr */
82#define MCFSIM_IMR_UART1 0x1000 /* UART 1 intr */
83#define MCFSIM_IMR_UART2 0x2000 /* UART 2 intr */
84
85#if defined(CONFIG_M5206e)
86#define MCFSIM_IMR_DMA1 0x4000 /* DMA 1 intr */
87#define MCFSIM_IMR_DMA2 0x8000 /* DMA 2 intr */
88#elif defined(CONFIG_M5249) || defined(CONFIG_M5307)
89#define MCFSIM_IMR_DMA0 0x4000 /* DMA 0 intr */
90#define MCFSIM_IMR_DMA1 0x8000 /* DMA 1 intr */
91#define MCFSIM_IMR_DMA2 0x10000 /* DMA 2 intr */
92#define MCFSIM_IMR_DMA3 0x20000 /* DMA 3 intr */
93#endif
94
95/*
96 * Mask for all of the SIM devices. Some parts have more or less
97 * SIM devices. This is a catchall for the sandard set.
98 */
99#ifndef MCFSIM_IMR_MASKALL
100#define MCFSIM_IMR_MASKALL 0x3ffe /* All intr sources */
101#endif
102
103
104/*
105 * PIT interrupt settings, if not found in mXXXXsim.h file.
106 */
107#ifndef ICR_INTRCONF
108#define ICR_INTRCONF 0x2b /* PIT1 level 5, priority 3 */
109#endif
110#ifndef MCFPIT_IMR
111#define MCFPIT_IMR MCFINTC_IMRH
112#endif
113#ifndef MCFPIT_IMR_IBIT
114#define MCFPIT_IMR_IBIT (1 << (MCFINT_PIT1 - 32))
115#endif
116
117
118#ifndef __ASSEMBLY__
119/*
120 * Definition for the interrupt auto-vectoring support.
121 */
122extern void mcf_autovector(unsigned int vec);
123#endif /* __ASSEMBLY__ */
124
125/****************************************************************************/ 46/****************************************************************************/
126#endif /* mcfsim_h */ 47#endif /* mcfsim_h */
diff --git a/arch/m68k/include/asm/mcfsmc.h b/arch/m68k/include/asm/mcfsmc.h
index 2d7a4dbd9683..527bea5d6788 100644
--- a/arch/m68k/include/asm/mcfsmc.h
+++ b/arch/m68k/include/asm/mcfsmc.h
@@ -167,15 +167,15 @@ void smc_remap(unsigned int ioaddr)
167 static int once = 0; 167 static int once = 0;
168 extern unsigned short ppdata; 168 extern unsigned short ppdata;
169 if (once++ == 0) { 169 if (once++ == 0) {
170 *((volatile unsigned short *)(MCF_MBAR+MCFSIM_PADDR)) = 0x00ec; 170 *((volatile unsigned short *)MCFSIM_PADDR) = 0x00ec;
171 ppdata |= 0x0080; 171 ppdata |= 0x0080;
172 *((volatile unsigned short *)(MCF_MBAR+MCFSIM_PADAT)) = ppdata; 172 *((volatile unsigned short *)MCFSIM_PADAT) = ppdata;
173 outw(0x0001, ioaddr + BANK_SELECT); 173 outw(0x0001, ioaddr + BANK_SELECT);
174 outw(0x0001, ioaddr + BANK_SELECT); 174 outw(0x0001, ioaddr + BANK_SELECT);
175 outw(0x0067, ioaddr + BASE); 175 outw(0x0067, ioaddr + BASE);
176 176
177 ppdata &= ~0x0080; 177 ppdata &= ~0x0080;
178 *((volatile unsigned short *)(MCF_MBAR+MCFSIM_PADAT)) = ppdata; 178 *((volatile unsigned short *)MCFSIM_PADAT) = ppdata;
179 } 179 }
180 180
181 *((volatile unsigned short *)(MCF_MBAR+MCFSIM_CSCR3)) = 0x1180; 181 *((volatile unsigned short *)(MCF_MBAR+MCFSIM_CSCR3)) = 0x1180;
diff --git a/arch/m68k/include/asm/mman.h b/arch/m68k/include/asm/mman.h
index 9f5c4c4b3c7b..8eebf89f5ab1 100644
--- a/arch/m68k/include/asm/mman.h
+++ b/arch/m68k/include/asm/mman.h
@@ -1,17 +1 @@
1#ifndef __M68K_MMAN_H__ #include <asm-generic/mman.h>
2#define __M68K_MMAN_H__
3
4#include <asm-generic/mman-common.h>
5
6#define MAP_GROWSDOWN 0x0100 /* stack-like segment */
7#define MAP_DENYWRITE 0x0800 /* ETXTBSY */
8#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */
9#define MAP_LOCKED 0x2000 /* pages are locked */
10#define MAP_NORESERVE 0x4000 /* don't check for reservations */
11#define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */
12#define MAP_NONBLOCK 0x10000 /* do not block on IO */
13
14#define MCL_CURRENT 1 /* lock all current mappings */
15#define MCL_FUTURE 2 /* lock all future mappings */
16
17#endif /* __M68K_MMAN_H__ */
diff --git a/arch/m68k/include/asm/nettel.h b/arch/m68k/include/asm/nettel.h
index 0299f6a2deeb..4dec2d9fb994 100644
--- a/arch/m68k/include/asm/nettel.h
+++ b/arch/m68k/include/asm/nettel.h
@@ -48,14 +48,14 @@ extern volatile unsigned short ppdata;
48static __inline__ unsigned int mcf_getppdata(void) 48static __inline__ unsigned int mcf_getppdata(void)
49{ 49{
50 volatile unsigned short *pp; 50 volatile unsigned short *pp;
51 pp = (volatile unsigned short *) (MCF_MBAR + MCFSIM_PADAT); 51 pp = (volatile unsigned short *) MCFSIM_PADAT;
52 return((unsigned int) *pp); 52 return((unsigned int) *pp);
53} 53}
54 54
55static __inline__ void mcf_setppdata(unsigned int mask, unsigned int bits) 55static __inline__ void mcf_setppdata(unsigned int mask, unsigned int bits)
56{ 56{
57 volatile unsigned short *pp; 57 volatile unsigned short *pp;
58 pp = (volatile unsigned short *) (MCF_MBAR + MCFSIM_PADAT); 58 pp = (volatile unsigned short *) MCFSIM_PADAT;
59 ppdata = (ppdata & ~mask) | bits; 59 ppdata = (ppdata & ~mask) | bits;
60 *pp = ppdata; 60 *pp = ppdata;
61} 61}
diff --git a/arch/m68k/include/asm/page_no.h b/arch/m68k/include/asm/page_no.h
index 9aa3f90f4855..1f31b060cc8d 100644
--- a/arch/m68k/include/asm/page_no.h
+++ b/arch/m68k/include/asm/page_no.h
@@ -1,10 +1,12 @@
1#ifndef _M68KNOMMU_PAGE_H 1#ifndef _M68KNOMMU_PAGE_H
2#define _M68KNOMMU_PAGE_H 2#define _M68KNOMMU_PAGE_H
3 3
4#include <linux/const.h>
5
4/* PAGE_SHIFT determines the page size */ 6/* PAGE_SHIFT determines the page size */
5 7
6#define PAGE_SHIFT (12) 8#define PAGE_SHIFT (12)
7#define PAGE_SIZE (1UL << PAGE_SHIFT) 9#define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT)
8#define PAGE_MASK (~(PAGE_SIZE-1)) 10#define PAGE_MASK (~(PAGE_SIZE-1))
9 11
10#include <asm/setup.h> 12#include <asm/setup.h>
diff --git a/arch/m68k/include/asm/pinmux.h b/arch/m68k/include/asm/pinmux.h
new file mode 100644
index 000000000000..119ee686dbd1
--- /dev/null
+++ b/arch/m68k/include/asm/pinmux.h
@@ -0,0 +1,30 @@
1/*
2 * Coldfire generic GPIO pinmux support.
3 *
4 * (C) Copyright 2009, Steven King <sfking@fdwdc.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 as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15
16#ifndef pinmux_h
17#define pinmux_h
18
19#define MCFPINMUX_NONE -1
20
21extern int mcf_pinmux_request(unsigned, unsigned);
22extern void mcf_pinmux_release(unsigned, unsigned);
23
24static inline int mcf_pinmux_is_valid(unsigned pinmux)
25{
26 return pinmux != MCFPINMUX_NONE;
27}
28
29#endif
30
diff --git a/arch/m68k/include/asm/processor.h b/arch/m68k/include/asm/processor.h
index fc3f2c22f2b8..74fd674b15ad 100644
--- a/arch/m68k/include/asm/processor.h
+++ b/arch/m68k/include/asm/processor.h
@@ -1,5 +1,170 @@
1#ifdef __uClinux__ 1/*
2#include "processor_no.h" 2 * include/asm-m68k/processor.h
3 *
4 * Copyright (C) 1995 Hamish Macdonald
5 */
6
7#ifndef __ASM_M68K_PROCESSOR_H
8#define __ASM_M68K_PROCESSOR_H
9
10/*
11 * Default implementation of macro that returns current
12 * instruction pointer ("program counter").
13 */
14#define current_text_addr() ({ __label__ _l; _l: &&_l;})
15
16#include <linux/thread_info.h>
17#include <asm/segment.h>
18#include <asm/fpu.h>
19#include <asm/ptrace.h>
20
21static inline unsigned long rdusp(void)
22{
23#ifdef CONFIG_COLDFIRE
24 extern unsigned int sw_usp;
25 return sw_usp;
3#else 26#else
4#include "processor_mm.h" 27 unsigned long usp;
28 __asm__ __volatile__("move %/usp,%0" : "=a" (usp));
29 return usp;
30#endif
31}
32
33static inline void wrusp(unsigned long usp)
34{
35#ifdef CONFIG_COLDFIRE
36 extern unsigned int sw_usp;
37 sw_usp = usp;
38#else
39 __asm__ __volatile__("move %0,%/usp" : : "a" (usp));
40#endif
41}
42
43/*
44 * User space process size: 3.75GB. This is hardcoded into a few places,
45 * so don't change it unless you know what you are doing.
46 */
47#ifndef CONFIG_SUN3
48#define TASK_SIZE (0xF0000000UL)
49#else
50#define TASK_SIZE (0x0E000000UL)
51#endif
52
53#ifdef __KERNEL__
54#define STACK_TOP TASK_SIZE
55#define STACK_TOP_MAX STACK_TOP
56#endif
57
58/* This decides where the kernel will search for a free chunk of vm
59 * space during mmap's.
60 */
61#ifdef CONFIG_MMU
62#ifndef CONFIG_SUN3
63#define TASK_UNMAPPED_BASE 0xC0000000UL
64#else
65#define TASK_UNMAPPED_BASE 0x0A000000UL
66#endif
67#define TASK_UNMAPPED_ALIGN(addr, off) PAGE_ALIGN(addr)
68#else
69#define TASK_UNMAPPED_BASE 0
70#endif
71
72struct thread_struct {
73 unsigned long ksp; /* kernel stack pointer */
74 unsigned long usp; /* user stack pointer */
75 unsigned short sr; /* saved status register */
76 unsigned short fs; /* saved fs (sfc, dfc) */
77 unsigned long crp[2]; /* cpu root pointer */
78 unsigned long esp0; /* points to SR of stack frame */
79 unsigned long faddr; /* info about last fault */
80 int signo, code;
81 unsigned long fp[8*3];
82 unsigned long fpcntl[3]; /* fp control regs */
83 unsigned char fpstate[FPSTATESIZE]; /* floating point state */
84 struct thread_info info;
85};
86
87#define INIT_THREAD { \
88 .ksp = sizeof(init_stack) + (unsigned long) init_stack, \
89 .sr = PS_S, \
90 .fs = __KERNEL_DS, \
91 .info = INIT_THREAD_INFO(init_task), \
92}
93
94#ifdef CONFIG_MMU
95/*
96 * Do necessary setup to start up a newly executed thread.
97 */
98static inline void start_thread(struct pt_regs * regs, unsigned long pc,
99 unsigned long usp)
100{
101 /* reads from user space */
102 set_fs(USER_DS);
103
104 regs->pc = pc;
105 regs->sr &= ~0x2000;
106 wrusp(usp);
107}
108
109#else
110
111/*
112 * Coldfire stacks need to be re-aligned on trap exit, conventional
113 * 68k can handle this case cleanly.
114 */
115#ifdef CONFIG_COLDFIRE
116#define reformat(_regs) do { (_regs)->format = 0x4; } while(0)
117#else
118#define reformat(_regs) do { } while (0)
119#endif
120
121#define start_thread(_regs, _pc, _usp) \
122do { \
123 set_fs(USER_DS); /* reads from user space */ \
124 (_regs)->pc = (_pc); \
125 ((struct switch_stack *)(_regs))[-1].a6 = 0; \
126 reformat(_regs); \
127 if (current->mm) \
128 (_regs)->d5 = current->mm->start_data; \
129 (_regs)->sr &= ~0x2000; \
130 wrusp(_usp); \
131} while(0)
132
133#endif
134
135/* Forward declaration, a strange C thing */
136struct task_struct;
137
138/* Free all resources held by a thread. */
139static inline void release_thread(struct task_struct *dead_task)
140{
141}
142
143/* Prepare to copy thread state - unlazy all lazy status */
144#define prepare_to_copy(tsk) do { } while (0)
145
146extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
147
148/*
149 * Free current thread data structures etc..
150 */
151static inline void exit_thread(void)
152{
153}
154
155extern unsigned long thread_saved_pc(struct task_struct *tsk);
156
157unsigned long get_wchan(struct task_struct *p);
158
159#define KSTK_EIP(tsk) \
160 ({ \
161 unsigned long eip = 0; \
162 if ((tsk)->thread.esp0 > PAGE_SIZE && \
163 (virt_addr_valid((tsk)->thread.esp0))) \
164 eip = ((struct pt_regs *) (tsk)->thread.esp0)->pc; \
165 eip; })
166#define KSTK_ESP(tsk) ((tsk) == current ? rdusp() : (tsk)->thread.usp)
167
168#define cpu_relax() barrier()
169
5#endif 170#endif
diff --git a/arch/m68k/include/asm/processor_mm.h b/arch/m68k/include/asm/processor_mm.h
deleted file mode 100644
index 1f61ef53f0e0..000000000000
--- a/arch/m68k/include/asm/processor_mm.h
+++ /dev/null
@@ -1,130 +0,0 @@
1/*
2 * include/asm-m68k/processor.h
3 *
4 * Copyright (C) 1995 Hamish Macdonald
5 */
6
7#ifndef __ASM_M68K_PROCESSOR_H
8#define __ASM_M68K_PROCESSOR_H
9
10/*
11 * Default implementation of macro that returns current
12 * instruction pointer ("program counter").
13 */
14#define current_text_addr() ({ __label__ _l; _l: &&_l;})
15
16#include <linux/thread_info.h>
17#include <asm/segment.h>
18#include <asm/fpu.h>
19#include <asm/ptrace.h>
20
21static inline unsigned long rdusp(void)
22{
23 unsigned long usp;
24
25 __asm__ __volatile__("move %/usp,%0" : "=a" (usp));
26 return usp;
27}
28
29static inline void wrusp(unsigned long usp)
30{
31 __asm__ __volatile__("move %0,%/usp" : : "a" (usp));
32}
33
34/*
35 * User space process size: 3.75GB. This is hardcoded into a few places,
36 * so don't change it unless you know what you are doing.
37 */
38#ifndef CONFIG_SUN3
39#define TASK_SIZE (0xF0000000UL)
40#else
41#define TASK_SIZE (0x0E000000UL)
42#endif
43
44#ifdef __KERNEL__
45#define STACK_TOP TASK_SIZE
46#define STACK_TOP_MAX STACK_TOP
47#endif
48
49/* This decides where the kernel will search for a free chunk of vm
50 * space during mmap's.
51 */
52#ifndef CONFIG_SUN3
53#define TASK_UNMAPPED_BASE 0xC0000000UL
54#else
55#define TASK_UNMAPPED_BASE 0x0A000000UL
56#endif
57#define TASK_UNMAPPED_ALIGN(addr, off) PAGE_ALIGN(addr)
58
59struct thread_struct {
60 unsigned long ksp; /* kernel stack pointer */
61 unsigned long usp; /* user stack pointer */
62 unsigned short sr; /* saved status register */
63 unsigned short fs; /* saved fs (sfc, dfc) */
64 unsigned long crp[2]; /* cpu root pointer */
65 unsigned long esp0; /* points to SR of stack frame */
66 unsigned long faddr; /* info about last fault */
67 int signo, code;
68 unsigned long fp[8*3];
69 unsigned long fpcntl[3]; /* fp control regs */
70 unsigned char fpstate[FPSTATESIZE]; /* floating point state */
71 struct thread_info info;
72};
73
74#define INIT_THREAD { \
75 .ksp = sizeof(init_stack) + (unsigned long) init_stack, \
76 .sr = PS_S, \
77 .fs = __KERNEL_DS, \
78 .info = INIT_THREAD_INFO(init_task), \
79}
80
81/*
82 * Do necessary setup to start up a newly executed thread.
83 */
84static inline void start_thread(struct pt_regs * regs, unsigned long pc,
85 unsigned long usp)
86{
87 /* reads from user space */
88 set_fs(USER_DS);
89
90 regs->pc = pc;
91 regs->sr &= ~0x2000;
92 wrusp(usp);
93}
94
95/* Forward declaration, a strange C thing */
96struct task_struct;
97
98/* Free all resources held by a thread. */
99static inline void release_thread(struct task_struct *dead_task)
100{
101}
102
103/* Prepare to copy thread state - unlazy all lazy status */
104#define prepare_to_copy(tsk) do { } while (0)
105
106extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
107
108/*
109 * Free current thread data structures etc..
110 */
111static inline void exit_thread(void)
112{
113}
114
115extern unsigned long thread_saved_pc(struct task_struct *tsk);
116
117unsigned long get_wchan(struct task_struct *p);
118
119#define KSTK_EIP(tsk) \
120 ({ \
121 unsigned long eip = 0; \
122 if ((tsk)->thread.esp0 > PAGE_SIZE && \
123 (virt_addr_valid((tsk)->thread.esp0))) \
124 eip = ((struct pt_regs *) (tsk)->thread.esp0)->pc; \
125 eip; })
126#define KSTK_ESP(tsk) ((tsk) == current ? rdusp() : (tsk)->thread.usp)
127
128#define cpu_relax() barrier()
129
130#endif
diff --git a/arch/m68k/include/asm/processor_no.h b/arch/m68k/include/asm/processor_no.h
deleted file mode 100644
index 7a1e0ba35f5a..000000000000
--- a/arch/m68k/include/asm/processor_no.h
+++ /dev/null
@@ -1,143 +0,0 @@
1/*
2 * include/asm-m68knommu/processor.h
3 *
4 * Copyright (C) 1995 Hamish Macdonald
5 */
6
7#ifndef __ASM_M68K_PROCESSOR_H
8#define __ASM_M68K_PROCESSOR_H
9
10/*
11 * Default implementation of macro that returns current
12 * instruction pointer ("program counter").
13 */
14#define current_text_addr() ({ __label__ _l; _l: &&_l;})
15
16#include <linux/compiler.h>
17#include <linux/threads.h>
18#include <asm/types.h>
19#include <asm/segment.h>
20#include <asm/fpu.h>
21#include <asm/ptrace.h>
22#include <asm/current.h>
23
24static inline unsigned long rdusp(void)
25{
26#ifdef CONFIG_COLDFIRE
27 extern unsigned int sw_usp;
28 return(sw_usp);
29#else
30 unsigned long usp;
31 __asm__ __volatile__("move %/usp,%0" : "=a" (usp));
32 return usp;
33#endif
34}
35
36static inline void wrusp(unsigned long usp)
37{
38#ifdef CONFIG_COLDFIRE
39 extern unsigned int sw_usp;
40 sw_usp = usp;
41#else
42 __asm__ __volatile__("move %0,%/usp" : : "a" (usp));
43#endif
44}
45
46/*
47 * User space process size: 3.75GB. This is hardcoded into a few places,
48 * so don't change it unless you know what you are doing.
49 */
50#define TASK_SIZE (0xF0000000UL)
51
52/*
53 * This decides where the kernel will search for a free chunk of vm
54 * space during mmap's. We won't be using it
55 */
56#define TASK_UNMAPPED_BASE 0
57
58/*
59 * if you change this structure, you must change the code and offsets
60 * in m68k/machasm.S
61 */
62
63struct thread_struct {
64 unsigned long ksp; /* kernel stack pointer */
65 unsigned long usp; /* user stack pointer */
66 unsigned short sr; /* saved status register */
67 unsigned short fs; /* saved fs (sfc, dfc) */
68 unsigned long crp[2]; /* cpu root pointer */
69 unsigned long esp0; /* points to SR of stack frame */
70 unsigned long fp[8*3];
71 unsigned long fpcntl[3]; /* fp control regs */
72 unsigned char fpstate[FPSTATESIZE]; /* floating point state */
73};
74
75#define INIT_THREAD { \
76 .ksp = sizeof(init_stack) + (unsigned long) init_stack, \
77 .sr = PS_S, \
78 .fs = __KERNEL_DS, \
79}
80
81/*
82 * Coldfire stacks need to be re-aligned on trap exit, conventional
83 * 68k can handle this case cleanly.
84 */
85#if defined(CONFIG_COLDFIRE)
86#define reformat(_regs) do { (_regs)->format = 0x4; } while(0)
87#else
88#define reformat(_regs) do { } while (0)
89#endif
90
91/*
92 * Do necessary setup to start up a newly executed thread.
93 *
94 * pass the data segment into user programs if it exists,
95 * it can't hurt anything as far as I can tell
96 */
97#define start_thread(_regs, _pc, _usp) \
98do { \
99 set_fs(USER_DS); /* reads from user space */ \
100 (_regs)->pc = (_pc); \
101 ((struct switch_stack *)(_regs))[-1].a6 = 0; \
102 reformat(_regs); \
103 if (current->mm) \
104 (_regs)->d5 = current->mm->start_data; \
105 (_regs)->sr &= ~0x2000; \
106 wrusp(_usp); \
107} while(0)
108
109/* Forward declaration, a strange C thing */
110struct task_struct;
111
112/* Free all resources held by a thread. */
113static inline void release_thread(struct task_struct *dead_task)
114{
115}
116
117/* Prepare to copy thread state - unlazy all lazy status */
118#define prepare_to_copy(tsk) do { } while (0)
119
120extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
121
122/*
123 * Free current thread data structures etc..
124 */
125static inline void exit_thread(void)
126{
127}
128
129unsigned long thread_saved_pc(struct task_struct *tsk);
130unsigned long get_wchan(struct task_struct *p);
131
132#define KSTK_EIP(tsk) \
133 ({ \
134 unsigned long eip = 0; \
135 if ((tsk)->thread.esp0 > PAGE_SIZE && \
136 (virt_addr_valid((tsk)->thread.esp0))) \
137 eip = ((struct pt_regs *) (tsk)->thread.esp0)->pc; \
138 eip; })
139#define KSTK_ESP(tsk) ((tsk) == current ? rdusp() : (tsk)->thread.usp)
140
141#define cpu_relax() barrier()
142
143#endif
diff --git a/arch/m68k/include/asm/timex.h b/arch/m68k/include/asm/timex.h
index b87f2f278f67..6759dad954f6 100644
--- a/arch/m68k/include/asm/timex.h
+++ b/arch/m68k/include/asm/timex.h
@@ -3,10 +3,23 @@
3 * 3 *
4 * m68k architecture timex specifications 4 * m68k architecture timex specifications
5 */ 5 */
6#ifndef _ASMm68k_TIMEX_H 6#ifndef _ASMm68K_TIMEX_H
7#define _ASMm68k_TIMEX_H 7#define _ASMm68K_TIMEX_H
8 8
9#ifdef CONFIG_COLDFIRE
10/*
11 * CLOCK_TICK_RATE should give the underlying frequency of the tick timer
12 * to make ntp work best. For Coldfires, that's the main clock.
13 */
14#include <asm/coldfire.h>
15#define CLOCK_TICK_RATE MCF_CLK
16#else
17/*
18 * This default CLOCK_TICK_RATE is probably wrong for many 68k boards
19 * Users of those boards will need to check and modify accordingly
20 */
9#define CLOCK_TICK_RATE 1193180 /* Underlying HZ */ 21#define CLOCK_TICK_RATE 1193180 /* Underlying HZ */
22#endif
10 23
11typedef unsigned long cycles_t; 24typedef unsigned long cycles_t;
12 25
diff --git a/arch/m68k/include/asm/unistd.h b/arch/m68k/include/asm/unistd.h
index 946d8691f2b0..48b87f5ced50 100644
--- a/arch/m68k/include/asm/unistd.h
+++ b/arch/m68k/include/asm/unistd.h
@@ -335,7 +335,7 @@
335#define __NR_preadv 329 335#define __NR_preadv 329
336#define __NR_pwritev 330 336#define __NR_pwritev 330
337#define __NR_rt_tgsigqueueinfo 331 337#define __NR_rt_tgsigqueueinfo 331
338#define __NR_perf_counter_open 332 338#define __NR_perf_event_open 332
339 339
340#ifdef __KERNEL__ 340#ifdef __KERNEL__
341 341
diff --git a/arch/m68k/install.sh b/arch/m68k/install.sh
index 9c6bae6112e3..57d640d4382c 100644
--- a/arch/m68k/install.sh
+++ b/arch/m68k/install.sh
@@ -33,8 +33,8 @@ verify "$3"
33 33
34# User may have a custom install script 34# User may have a custom install script
35 35
36if [ -x ~/bin/${CROSS_COMPILE}installkernel ]; then exec ~/bin/${CROSS_COMPILE}installkernel "$@"; fi 36if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi
37if [ -x /sbin/${CROSS_COMPILE}installkernel ]; then exec /sbin/${CROSS_COMPILE}installkernel "$@"; fi 37if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi
38 38
39# Default install - same as make zlilo 39# Default install - same as make zlilo
40 40
diff --git a/arch/m68k/kernel/entry.S b/arch/m68k/kernel/entry.S
index 922f52e7ed1a..c5b33634c980 100644
--- a/arch/m68k/kernel/entry.S
+++ b/arch/m68k/kernel/entry.S
@@ -756,5 +756,5 @@ sys_call_table:
756 .long sys_preadv 756 .long sys_preadv
757 .long sys_pwritev /* 330 */ 757 .long sys_pwritev /* 330 */
758 .long sys_rt_tgsigqueueinfo 758 .long sys_rt_tgsigqueueinfo
759 .long sys_perf_counter_open 759 .long sys_perf_event_open
760 760
diff --git a/arch/m68k/kernel/process.c b/arch/m68k/kernel/process.c
index 72bad65dba3a..41230c595a8e 100644
--- a/arch/m68k/kernel/process.c
+++ b/arch/m68k/kernel/process.c
@@ -42,9 +42,9 @@
42 */ 42 */
43static struct signal_struct init_signals = INIT_SIGNALS(init_signals); 43static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
44static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); 44static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
45union thread_union init_thread_union 45union thread_union init_thread_union __init_task_data
46__attribute__((section(".data.init_task"), aligned(THREAD_SIZE))) 46 __attribute__((aligned(THREAD_SIZE))) =
47 = { INIT_THREAD_INFO(init_task) }; 47 { INIT_THREAD_INFO(init_task) };
48 48
49/* initial task structure */ 49/* initial task structure */
50struct task_struct init_task = INIT_TASK(init_task); 50struct task_struct init_task = INIT_TASK(init_task);
diff --git a/arch/m68k/kernel/sys_m68k.c b/arch/m68k/kernel/sys_m68k.c
index 7f54efaf60bb..7deb402bfc75 100644
--- a/arch/m68k/kernel/sys_m68k.c
+++ b/arch/m68k/kernel/sys_m68k.c
@@ -20,7 +20,6 @@
20#include <linux/syscalls.h> 20#include <linux/syscalls.h>
21#include <linux/mman.h> 21#include <linux/mman.h>
22#include <linux/file.h> 22#include <linux/file.h>
23#include <linux/utsname.h>
24#include <linux/ipc.h> 23#include <linux/ipc.h>
25 24
26#include <asm/setup.h> 25#include <asm/setup.h>
diff --git a/arch/m68k/kernel/time.c b/arch/m68k/kernel/time.c
index 54d980795fc4..17dc2a31a7ca 100644
--- a/arch/m68k/kernel/time.c
+++ b/arch/m68k/kernel/time.c
@@ -91,77 +91,11 @@ void __init time_init(void)
91 mach_sched_init(timer_interrupt); 91 mach_sched_init(timer_interrupt);
92} 92}
93 93
94/* 94u32 arch_gettimeoffset(void)
95 * This version of gettimeofday has near microsecond resolution.
96 */
97void do_gettimeofday(struct timeval *tv)
98{ 95{
99 unsigned long flags; 96 return mach_gettimeoffset() * 1000;
100 unsigned long seq;
101 unsigned long usec, sec;
102 unsigned long max_ntp_tick = tick_usec - tickadj;
103
104 do {
105 seq = read_seqbegin_irqsave(&xtime_lock, flags);
106
107 usec = mach_gettimeoffset();
108
109 /*
110 * If time_adjust is negative then NTP is slowing the clock
111 * so make sure not to go into next possible interval.
112 * Better to lose some accuracy than have time go backwards..
113 */
114 if (unlikely(time_adjust < 0))
115 usec = min(usec, max_ntp_tick);
116
117 sec = xtime.tv_sec;
118 usec += xtime.tv_nsec/1000;
119 } while (read_seqretry_irqrestore(&xtime_lock, seq, flags));
120
121
122 while (usec >= 1000000) {
123 usec -= 1000000;
124 sec++;
125 }
126
127 tv->tv_sec = sec;
128 tv->tv_usec = usec;
129}
130
131EXPORT_SYMBOL(do_gettimeofday);
132
133int do_settimeofday(struct timespec *tv)
134{
135 time_t wtm_sec, sec = tv->tv_sec;
136 long wtm_nsec, nsec = tv->tv_nsec;
137
138 if ((unsigned long)tv->tv_nsec >= NSEC_PER_SEC)
139 return -EINVAL;
140
141 write_seqlock_irq(&xtime_lock);
142 /* This is revolting. We need to set the xtime.tv_nsec
143 * correctly. However, the value in this location is
144 * is value at the last tick.
145 * Discover what correction gettimeofday
146 * would have done, and then undo it!
147 */
148 nsec -= 1000 * mach_gettimeoffset();
149
150 wtm_sec = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec);
151 wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec);
152
153 set_normalized_timespec(&xtime, sec, nsec);
154 set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec);
155
156 ntp_clear();
157 write_sequnlock_irq(&xtime_lock);
158 clock_was_set();
159 return 0;
160} 97}
161 98
162EXPORT_SYMBOL(do_settimeofday);
163
164
165static int __init rtc_init(void) 99static int __init rtc_init(void)
166{ 100{
167 struct platform_device *pdev; 101 struct platform_device *pdev;
diff --git a/arch/m68k/mm/init.c b/arch/m68k/mm/init.c
index 0007b2adf3a3..774549accd2d 100644
--- a/arch/m68k/mm/init.c
+++ b/arch/m68k/mm/init.c
@@ -126,7 +126,7 @@ void __init mem_init(void)
126#endif 126#endif
127 127
128 printk("Memory: %luk/%luk available (%dk kernel code, %dk data, %dk init)\n", 128 printk("Memory: %luk/%luk available (%dk kernel code, %dk data, %dk init)\n",
129 (unsigned long)nr_free_pages() << (PAGE_SHIFT-10), 129 nr_free_pages() << (PAGE_SHIFT-10),
130 totalram_pages << (PAGE_SHIFT-10), 130 totalram_pages << (PAGE_SHIFT-10),
131 codepages << (PAGE_SHIFT-10), 131 codepages << (PAGE_SHIFT-10),
132 datapages << (PAGE_SHIFT-10), 132 datapages << (PAGE_SHIFT-10),
diff --git a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig
index 534376299a99..e2201b90aa22 100644
--- a/arch/m68knommu/Kconfig
+++ b/arch/m68knommu/Kconfig
@@ -47,6 +47,10 @@ config GENERIC_FIND_NEXT_BIT
47 bool 47 bool
48 default y 48 default y
49 49
50config GENERIC_GPIO
51 bool
52 default n
53
50config GENERIC_HWEIGHT 54config GENERIC_HWEIGHT
51 bool 55 bool
52 default y 56 default y
@@ -182,6 +186,8 @@ config M527x
182config COLDFIRE 186config COLDFIRE
183 bool 187 bool
184 depends on (M5206 || M5206e || M520x || M523x || M5249 || M527x || M5272 || M528x || M5307 || M532x || M5407) 188 depends on (M5206 || M5206e || M520x || M523x || M5249 || M527x || M5272 || M528x || M5307 || M532x || M5407)
189 select GENERIC_GPIO
190 select ARCH_REQUIRE_GPIOLIB
185 default y 191 default y
186 192
187config CLOCK_SET 193config CLOCK_SET
diff --git a/arch/m68knommu/kernel/init_task.c b/arch/m68knommu/kernel/init_task.c
index 45e97a207fed..cbf9dc3cc51d 100644
--- a/arch/m68knommu/kernel/init_task.c
+++ b/arch/m68knommu/kernel/init_task.c
@@ -31,7 +31,6 @@ EXPORT_SYMBOL(init_task);
31 * way process stacks are handled. This is done by having a special 31 * way process stacks are handled. This is done by having a special
32 * "init_task" linker map entry.. 32 * "init_task" linker map entry..
33 */ 33 */
34union thread_union init_thread_union 34union thread_union init_thread_union __init_task_data =
35 __attribute__((__section__(".data.init_task"))) = 35 { INIT_THREAD_INFO(init_task) };
36 { INIT_THREAD_INFO(init_task) };
37 36
diff --git a/arch/m68knommu/kernel/irq.c b/arch/m68knommu/kernel/irq.c
index 56e0f4c55a67..c9cac36d4422 100644
--- a/arch/m68knommu/kernel/irq.c
+++ b/arch/m68knommu/kernel/irq.c
@@ -29,32 +29,6 @@ asmlinkage void do_IRQ(int irq, struct pt_regs *regs)
29 set_irq_regs(oldregs); 29 set_irq_regs(oldregs);
30} 30}
31 31
32void ack_bad_irq(unsigned int irq)
33{
34 printk(KERN_ERR "IRQ: unexpected irq=%d\n", irq);
35}
36
37static struct irq_chip m_irq_chip = {
38 .name = "M68K-INTC",
39 .enable = enable_vector,
40 .disable = disable_vector,
41 .ack = ack_vector,
42};
43
44void __init init_IRQ(void)
45{
46 int irq;
47
48 init_vectors();
49
50 for (irq = 0; (irq < NR_IRQS); irq++) {
51 irq_desc[irq].status = IRQ_DISABLED;
52 irq_desc[irq].action = NULL;
53 irq_desc[irq].depth = 1;
54 irq_desc[irq].chip = &m_irq_chip;
55 }
56}
57
58int show_interrupts(struct seq_file *p, void *v) 32int show_interrupts(struct seq_file *p, void *v)
59{ 33{
60 struct irqaction *ap; 34 struct irqaction *ap;
diff --git a/arch/m68knommu/kernel/sys_m68k.c b/arch/m68knommu/kernel/sys_m68k.c
index 700281638629..efdd090778a3 100644
--- a/arch/m68knommu/kernel/sys_m68k.c
+++ b/arch/m68knommu/kernel/sys_m68k.c
@@ -17,7 +17,6 @@
17#include <linux/syscalls.h> 17#include <linux/syscalls.h>
18#include <linux/mman.h> 18#include <linux/mman.h>
19#include <linux/file.h> 19#include <linux/file.h>
20#include <linux/utsname.h>
21#include <linux/ipc.h> 20#include <linux/ipc.h>
22#include <linux/fs.h> 21#include <linux/fs.h>
23 22
diff --git a/arch/m68knommu/kernel/syscalltable.S b/arch/m68knommu/kernel/syscalltable.S
index 0ae123e08985..23535cc415ae 100644
--- a/arch/m68knommu/kernel/syscalltable.S
+++ b/arch/m68knommu/kernel/syscalltable.S
@@ -350,7 +350,7 @@ ENTRY(sys_call_table)
350 .long sys_preadv 350 .long sys_preadv
351 .long sys_pwritev /* 330 */ 351 .long sys_pwritev /* 330 */
352 .long sys_rt_tgsigqueueinfo 352 .long sys_rt_tgsigqueueinfo
353 .long sys_perf_counter_open 353 .long sys_perf_event_open
354 354
355 .rept NR_syscalls-(.-sys_call_table)/4 355 .rept NR_syscalls-(.-sys_call_table)/4
356 .long sys_ni_syscall 356 .long sys_ni_syscall
diff --git a/arch/m68knommu/kernel/time.c b/arch/m68knommu/kernel/time.c
index d182b2f72211..a90acf5b0cde 100644
--- a/arch/m68knommu/kernel/time.c
+++ b/arch/m68knommu/kernel/time.c
@@ -69,12 +69,13 @@ static unsigned long read_rtc_mmss(void)
69 if ((year += 1900) < 1970) 69 if ((year += 1900) < 1970)
70 year += 100; 70 year += 100;
71 71
72 return mktime(year, mon, day, hour, min, sec);; 72 return mktime(year, mon, day, hour, min, sec);
73} 73}
74 74
75unsigned long read_persistent_clock(void) 75void read_persistent_clock(struct timespec *ts)
76{ 76{
77 return read_rtc_mmss(); 77 ts->tv_sec = read_rtc_mmss();
78 ts->tv_nsec = 0;
78} 79}
79 80
80int update_persistent_clock(struct timespec now) 81int update_persistent_clock(struct timespec now)
diff --git a/arch/m68knommu/lib/checksum.c b/arch/m68knommu/lib/checksum.c
index 269d83bfbbe1..eccf25d3d73e 100644
--- a/arch/m68knommu/lib/checksum.c
+++ b/arch/m68knommu/lib/checksum.c
@@ -92,6 +92,7 @@ out:
92 return result; 92 return result;
93} 93}
94 94
95#ifdef CONFIG_COLDFIRE
95/* 96/*
96 * This is a version of ip_compute_csum() optimized for IP headers, 97 * This is a version of ip_compute_csum() optimized for IP headers,
97 * which always checksum on 4 octet boundaries. 98 * which always checksum on 4 octet boundaries.
@@ -100,6 +101,7 @@ __sum16 ip_fast_csum(const void *iph, unsigned int ihl)
100{ 101{
101 return (__force __sum16)~do_csum(iph,ihl*4); 102 return (__force __sum16)~do_csum(iph,ihl*4);
102} 103}
104#endif
103 105
104/* 106/*
105 * computes the checksum of a memory block at buff, length len, 107 * computes the checksum of a memory block at buff, length len,
@@ -127,15 +129,6 @@ __wsum csum_partial(const void *buff, int len, __wsum sum)
127EXPORT_SYMBOL(csum_partial); 129EXPORT_SYMBOL(csum_partial);
128 130
129/* 131/*
130 * this routine is used for miscellaneous IP-like checksums, mainly
131 * in icmp.c
132 */
133__sum16 ip_compute_csum(const void *buff, int len)
134{
135 return (__force __sum16)~do_csum(buff,len);
136}
137
138/*
139 * copy from fs while checksumming, otherwise like csum_partial 132 * copy from fs while checksumming, otherwise like csum_partial
140 */ 133 */
141 134
diff --git a/arch/m68knommu/platform/5206/Makefile b/arch/m68knommu/platform/5206/Makefile
index a439d9ab3f27..113c33390064 100644
--- a/arch/m68knommu/platform/5206/Makefile
+++ b/arch/m68knommu/platform/5206/Makefile
@@ -14,5 +14,5 @@
14 14
15asflags-$(CONFIG_FULLDEBUG) := -DDEBUGGER_COMPATIBLE_CACHE=1 15asflags-$(CONFIG_FULLDEBUG) := -DDEBUGGER_COMPATIBLE_CACHE=1
16 16
17obj-y := config.o 17obj-y := config.o gpio.o
18 18
diff --git a/arch/m68knommu/platform/5206/config.c b/arch/m68knommu/platform/5206/config.c
index f6f79874e9af..9c335465e66d 100644
--- a/arch/m68knommu/platform/5206/config.c
+++ b/arch/m68knommu/platform/5206/config.c
@@ -49,11 +49,11 @@ static void __init m5206_uart_init_line(int line, int irq)
49 if (line == 0) { 49 if (line == 0) {
50 writel(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI1, MCF_MBAR + MCFSIM_UART1ICR); 50 writel(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI1, MCF_MBAR + MCFSIM_UART1ICR);
51 writeb(irq, MCFUART_BASE1 + MCFUART_UIVR); 51 writeb(irq, MCFUART_BASE1 + MCFUART_UIVR);
52 mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_UART1); 52 mcf_mapirq2imr(irq, MCFINTC_UART0);
53 } else if (line == 1) { 53 } else if (line == 1) {
54 writel(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI2, MCF_MBAR + MCFSIM_UART2ICR); 54 writel(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI2, MCF_MBAR + MCFSIM_UART2ICR);
55 writeb(irq, MCFUART_BASE2 + MCFUART_UIVR); 55 writeb(irq, MCFUART_BASE2 + MCFUART_UIVR);
56 mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_UART2); 56 mcf_mapirq2imr(irq, MCFINTC_UART1);
57 } 57 }
58} 58}
59 59
@@ -68,38 +68,19 @@ static void __init m5206_uarts_init(void)
68 68
69/***************************************************************************/ 69/***************************************************************************/
70 70
71void mcf_autovector(unsigned int vec) 71static void __init m5206_timers_init(void)
72{ 72{
73 volatile unsigned char *mbar; 73 /* Timer1 is always used as system timer */
74 unsigned char icr; 74 writeb(MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI3,
75 75 MCF_MBAR + MCFSIM_TIMER1ICR);
76 if ((vec >= 25) && (vec <= 31)) { 76 mcf_mapirq2imr(MCF_IRQ_TIMER, MCFINTC_TIMER1);
77 vec -= 25; 77
78 mbar = (volatile unsigned char *) MCF_MBAR; 78#ifdef CONFIG_HIGHPROFILE
79 icr = MCFSIM_ICR_AUTOVEC | (vec << 3); 79 /* Timer2 is to be used as a high speed profile timer */
80 *(mbar + MCFSIM_ICR1 + vec) = icr; 80 writeb(MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL7 | MCFSIM_ICR_PRI3,
81 vec = 0x1 << (vec + 1); 81 MCF_MBAR + MCFSIM_TIMER2ICR);
82 mcf_setimr(mcf_getimr() & ~vec); 82 mcf_mapirq2imr(MCF_IRQ_PROFILER, MCFINTC_TIMER2);
83 } 83#endif
84}
85
86/***************************************************************************/
87
88void mcf_settimericr(unsigned int timer, unsigned int level)
89{
90 volatile unsigned char *icrp;
91 unsigned int icr, imr;
92
93 if (timer <= 2) {
94 switch (timer) {
95 case 2: icr = MCFSIM_TIMER2ICR; imr = MCFSIM_IMR_TIMER2; break;
96 default: icr = MCFSIM_TIMER1ICR; imr = MCFSIM_IMR_TIMER1; break;
97 }
98
99 icrp = (volatile unsigned char *) (MCF_MBAR + icr);
100 *icrp = MCFSIM_ICR_AUTOVEC | (level << 2) | MCFSIM_ICR_PRI3;
101 mcf_setimr(mcf_getimr() & ~imr);
102 }
103} 84}
104 85
105/***************************************************************************/ 86/***************************************************************************/
@@ -117,15 +98,20 @@ void m5206_cpu_reset(void)
117 98
118void __init config_BSP(char *commandp, int size) 99void __init config_BSP(char *commandp, int size)
119{ 100{
120 mcf_setimr(MCFSIM_IMR_MASKALL);
121 mach_reset = m5206_cpu_reset; 101 mach_reset = m5206_cpu_reset;
102 m5206_timers_init();
103 m5206_uarts_init();
104
105 /* Only support the external interrupts on their primary level */
106 mcf_mapirq2imr(25, MCFINTC_EINT1);
107 mcf_mapirq2imr(28, MCFINTC_EINT4);
108 mcf_mapirq2imr(31, MCFINTC_EINT7);
122} 109}
123 110
124/***************************************************************************/ 111/***************************************************************************/
125 112
126static int __init init_BSP(void) 113static int __init init_BSP(void)
127{ 114{
128 m5206_uarts_init();
129 platform_add_devices(m5206_devices, ARRAY_SIZE(m5206_devices)); 115 platform_add_devices(m5206_devices, ARRAY_SIZE(m5206_devices));
130 return 0; 116 return 0;
131} 117}
diff --git a/arch/m68knommu/platform/5206/gpio.c b/arch/m68knommu/platform/5206/gpio.c
new file mode 100644
index 000000000000..60f779ce1651
--- /dev/null
+++ b/arch/m68knommu/platform/5206/gpio.c
@@ -0,0 +1,49 @@
1/*
2 * Coldfire generic GPIO support
3 *
4 * (C) Copyright 2009, Steven King <sfking@fdwdc.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 as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14*/
15
16#include <linux/kernel.h>
17#include <linux/init.h>
18
19#include <asm/coldfire.h>
20#include <asm/mcfsim.h>
21#include <asm/mcfgpio.h>
22
23static struct mcf_gpio_chip mcf_gpio_chips[] = {
24 {
25 .gpio_chip = {
26 .label = "PP",
27 .request = mcf_gpio_request,
28 .free = mcf_gpio_free,
29 .direction_input = mcf_gpio_direction_input,
30 .direction_output = mcf_gpio_direction_output,
31 .get = mcf_gpio_get_value,
32 .set = mcf_gpio_set_value,
33 .ngpio = 8,
34 },
35 .pddr = MCFSIM_PADDR,
36 .podr = MCFSIM_PADAT,
37 .ppdr = MCFSIM_PADAT,
38 },
39};
40
41static int __init mcf_gpio_init(void)
42{
43 unsigned i = 0;
44 while (i < ARRAY_SIZE(mcf_gpio_chips))
45 (void)gpiochip_add((struct gpio_chip *)&mcf_gpio_chips[i++]);
46 return 0;
47}
48
49core_initcall(mcf_gpio_init);
diff --git a/arch/m68knommu/platform/5206e/Makefile b/arch/m68knommu/platform/5206e/Makefile
index a439d9ab3f27..113c33390064 100644
--- a/arch/m68knommu/platform/5206e/Makefile
+++ b/arch/m68knommu/platform/5206e/Makefile
@@ -14,5 +14,5 @@
14 14
15asflags-$(CONFIG_FULLDEBUG) := -DDEBUGGER_COMPATIBLE_CACHE=1 15asflags-$(CONFIG_FULLDEBUG) := -DDEBUGGER_COMPATIBLE_CACHE=1
16 16
17obj-y := config.o 17obj-y := config.o gpio.o
18 18
diff --git a/arch/m68knommu/platform/5206e/config.c b/arch/m68knommu/platform/5206e/config.c
index 65887799db81..0f41ba82a3b5 100644
--- a/arch/m68knommu/platform/5206e/config.c
+++ b/arch/m68knommu/platform/5206e/config.c
@@ -15,6 +15,7 @@
15#include <asm/machdep.h> 15#include <asm/machdep.h>
16#include <asm/coldfire.h> 16#include <asm/coldfire.h>
17#include <asm/mcfsim.h> 17#include <asm/mcfsim.h>
18#include <asm/mcfuart.h>
18#include <asm/mcfdma.h> 19#include <asm/mcfdma.h>
19#include <asm/mcfuart.h> 20#include <asm/mcfuart.h>
20 21
@@ -49,11 +50,11 @@ static void __init m5206e_uart_init_line(int line, int irq)
49 if (line == 0) { 50 if (line == 0) {
50 writel(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI1, MCF_MBAR + MCFSIM_UART1ICR); 51 writel(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI1, MCF_MBAR + MCFSIM_UART1ICR);
51 writeb(irq, MCFUART_BASE1 + MCFUART_UIVR); 52 writeb(irq, MCFUART_BASE1 + MCFUART_UIVR);
52 mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_UART1); 53 mcf_mapirq2imr(irq, MCFINTC_UART0);
53 } else if (line == 1) { 54 } else if (line == 1) {
54 writel(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI2, MCF_MBAR + MCFSIM_UART2ICR); 55 writel(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI2, MCF_MBAR + MCFSIM_UART2ICR);
55 writeb(irq, MCFUART_BASE2 + MCFUART_UIVR); 56 writeb(irq, MCFUART_BASE2 + MCFUART_UIVR);
56 mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_UART2); 57 mcf_mapirq2imr(irq, MCFINTC_UART1);
57 } 58 }
58} 59}
59 60
@@ -68,38 +69,19 @@ static void __init m5206e_uarts_init(void)
68 69
69/***************************************************************************/ 70/***************************************************************************/
70 71
71void mcf_autovector(unsigned int vec) 72static void __init m5206e_timers_init(void)
72{
73 volatile unsigned char *mbar;
74 unsigned char icr;
75
76 if ((vec >= 25) && (vec <= 31)) {
77 vec -= 25;
78 mbar = (volatile unsigned char *) MCF_MBAR;
79 icr = MCFSIM_ICR_AUTOVEC | (vec << 3);
80 *(mbar + MCFSIM_ICR1 + vec) = icr;
81 vec = 0x1 << (vec + 1);
82 mcf_setimr(mcf_getimr() & ~vec);
83 }
84}
85
86/***************************************************************************/
87
88void mcf_settimericr(unsigned int timer, unsigned int level)
89{ 73{
90 volatile unsigned char *icrp; 74 /* Timer1 is always used as system timer */
91 unsigned int icr, imr; 75 writeb(MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI3,
92 76 MCF_MBAR + MCFSIM_TIMER1ICR);
93 if (timer <= 2) { 77 mcf_mapirq2imr(MCF_IRQ_TIMER, MCFINTC_TIMER1);
94 switch (timer) { 78
95 case 2: icr = MCFSIM_TIMER2ICR; imr = MCFSIM_IMR_TIMER2; break; 79#ifdef CONFIG_HIGHPROFILE
96 default: icr = MCFSIM_TIMER1ICR; imr = MCFSIM_IMR_TIMER1; break; 80 /* Timer2 is to be used as a high speed profile timer */
97 } 81 writeb(MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL7 | MCFSIM_ICR_PRI3,
98 82 MCF_MBAR + MCFSIM_TIMER2ICR);
99 icrp = (volatile unsigned char *) (MCF_MBAR + icr); 83 mcf_mapirq2imr(MCF_IRQ_PROFILER, MCFINTC_TIMER2);
100 *icrp = MCFSIM_ICR_AUTOVEC | (level << 2) | MCFSIM_ICR_PRI3; 84#endif
101 mcf_setimr(mcf_getimr() & ~imr);
102 }
103} 85}
104 86
105/***************************************************************************/ 87/***************************************************************************/
@@ -117,8 +99,6 @@ void m5206e_cpu_reset(void)
117 99
118void __init config_BSP(char *commandp, int size) 100void __init config_BSP(char *commandp, int size)
119{ 101{
120 mcf_setimr(MCFSIM_IMR_MASKALL);
121
122#if defined(CONFIG_NETtel) 102#if defined(CONFIG_NETtel)
123 /* Copy command line from FLASH to local buffer... */ 103 /* Copy command line from FLASH to local buffer... */
124 memcpy(commandp, (char *) 0xf0004000, size); 104 memcpy(commandp, (char *) 0xf0004000, size);
@@ -126,13 +106,19 @@ void __init config_BSP(char *commandp, int size)
126#endif /* CONFIG_NETtel */ 106#endif /* CONFIG_NETtel */
127 107
128 mach_reset = m5206e_cpu_reset; 108 mach_reset = m5206e_cpu_reset;
109 m5206e_timers_init();
110 m5206e_uarts_init();
111
112 /* Only support the external interrupts on their primary level */
113 mcf_mapirq2imr(25, MCFINTC_EINT1);
114 mcf_mapirq2imr(28, MCFINTC_EINT4);
115 mcf_mapirq2imr(31, MCFINTC_EINT7);
129} 116}
130 117
131/***************************************************************************/ 118/***************************************************************************/
132 119
133static int __init init_BSP(void) 120static int __init init_BSP(void)
134{ 121{
135 m5206e_uarts_init();
136 platform_add_devices(m5206e_devices, ARRAY_SIZE(m5206e_devices)); 122 platform_add_devices(m5206e_devices, ARRAY_SIZE(m5206e_devices));
137 return 0; 123 return 0;
138} 124}
diff --git a/arch/m68knommu/platform/5206e/gpio.c b/arch/m68knommu/platform/5206e/gpio.c
new file mode 100644
index 000000000000..60f779ce1651
--- /dev/null
+++ b/arch/m68knommu/platform/5206e/gpio.c
@@ -0,0 +1,49 @@
1/*
2 * Coldfire generic GPIO support
3 *
4 * (C) Copyright 2009, Steven King <sfking@fdwdc.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 as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14*/
15
16#include <linux/kernel.h>
17#include <linux/init.h>
18
19#include <asm/coldfire.h>
20#include <asm/mcfsim.h>
21#include <asm/mcfgpio.h>
22
23static struct mcf_gpio_chip mcf_gpio_chips[] = {
24 {
25 .gpio_chip = {
26 .label = "PP",
27 .request = mcf_gpio_request,
28 .free = mcf_gpio_free,
29 .direction_input = mcf_gpio_direction_input,
30 .direction_output = mcf_gpio_direction_output,
31 .get = mcf_gpio_get_value,
32 .set = mcf_gpio_set_value,
33 .ngpio = 8,
34 },
35 .pddr = MCFSIM_PADDR,
36 .podr = MCFSIM_PADAT,
37 .ppdr = MCFSIM_PADAT,
38 },
39};
40
41static int __init mcf_gpio_init(void)
42{
43 unsigned i = 0;
44 while (i < ARRAY_SIZE(mcf_gpio_chips))
45 (void)gpiochip_add((struct gpio_chip *)&mcf_gpio_chips[i++]);
46 return 0;
47}
48
49core_initcall(mcf_gpio_init);
diff --git a/arch/m68knommu/platform/520x/Makefile b/arch/m68knommu/platform/520x/Makefile
index a50e76acc8fd..435ab3483dc1 100644
--- a/arch/m68knommu/platform/520x/Makefile
+++ b/arch/m68knommu/platform/520x/Makefile
@@ -14,4 +14,4 @@
14 14
15asflags-$(CONFIG_FULLDEBUG) := -DDEBUGGER_COMPATIBLE_CACHE=1 15asflags-$(CONFIG_FULLDEBUG) := -DDEBUGGER_COMPATIBLE_CACHE=1
16 16
17obj-y := config.o 17obj-y := config.o gpio.o
diff --git a/arch/m68knommu/platform/520x/config.c b/arch/m68knommu/platform/520x/config.c
index 1c43a8aec69b..92614de42cd3 100644
--- a/arch/m68knommu/platform/520x/config.c
+++ b/arch/m68knommu/platform/520x/config.c
@@ -81,20 +81,11 @@ static struct platform_device *m520x_devices[] __initdata = {
81 81
82/***************************************************************************/ 82/***************************************************************************/
83 83
84#define INTC0 (MCF_MBAR + MCFICM_INTC0)
85
86static void __init m520x_uart_init_line(int line, int irq) 84static void __init m520x_uart_init_line(int line, int irq)
87{ 85{
88 u32 imr;
89 u16 par; 86 u16 par;
90 u8 par2; 87 u8 par2;
91 88
92 writeb(0x03, INTC0 + MCFINTC_ICR0 + MCFINT_UART0 + line);
93
94 imr = readl(INTC0 + MCFINTC_IMRL);
95 imr &= ~((1 << (irq - MCFINT_VECBASE)) | 1);
96 writel(imr, INTC0 + MCFINTC_IMRL);
97
98 switch (line) { 89 switch (line) {
99 case 0: 90 case 0:
100 par = readw(MCF_IPSBAR + MCF_GPIO_PAR_UART); 91 par = readw(MCF_IPSBAR + MCF_GPIO_PAR_UART);
@@ -131,18 +122,8 @@ static void __init m520x_uarts_init(void)
131 122
132static void __init m520x_fec_init(void) 123static void __init m520x_fec_init(void)
133{ 124{
134 u32 imr;
135 u8 v; 125 u8 v;
136 126
137 /* Unmask FEC interrupts at ColdFire interrupt controller */
138 writeb(0x4, MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_ICR0 + 36);
139 writeb(0x4, MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_ICR0 + 40);
140 writeb(0x4, MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_ICR0 + 42);
141
142 imr = readl(MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRH);
143 imr &= ~0x0001FFF0;
144 writel(imr, MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRH);
145
146 /* Set multi-function pins to ethernet mode */ 127 /* Set multi-function pins to ethernet mode */
147 v = readb(MCF_IPSBAR + MCF_GPIO_PAR_FEC); 128 v = readb(MCF_IPSBAR + MCF_GPIO_PAR_FEC);
148 writeb(v | 0xf0, MCF_IPSBAR + MCF_GPIO_PAR_FEC); 129 writeb(v | 0xf0, MCF_IPSBAR + MCF_GPIO_PAR_FEC);
@@ -153,17 +134,6 @@ static void __init m520x_fec_init(void)
153 134
154/***************************************************************************/ 135/***************************************************************************/
155 136
156/*
157 * Program the vector to be an auto-vectored.
158 */
159
160void mcf_autovector(unsigned int vec)
161{
162 /* Everything is auto-vectored on the 520x devices */
163}
164
165/***************************************************************************/
166
167static void m520x_cpu_reset(void) 137static void m520x_cpu_reset(void)
168{ 138{
169 local_irq_disable(); 139 local_irq_disable();
diff --git a/arch/m68knommu/platform/520x/gpio.c b/arch/m68knommu/platform/520x/gpio.c
new file mode 100644
index 000000000000..15b5bb62a698
--- /dev/null
+++ b/arch/m68knommu/platform/520x/gpio.c
@@ -0,0 +1,211 @@
1/*
2 * Coldfire generic GPIO support
3 *
4 * (C) Copyright 2009, Steven King <sfking@fdwdc.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 as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14*/
15
16#include <linux/kernel.h>
17#include <linux/init.h>
18
19#include <asm/coldfire.h>
20#include <asm/mcfsim.h>
21#include <asm/mcfgpio.h>
22
23static struct mcf_gpio_chip mcf_gpio_chips[] = {
24 {
25 .gpio_chip = {
26 .label = "PIRQ",
27 .request = mcf_gpio_request,
28 .free = mcf_gpio_free,
29 .direction_input = mcf_gpio_direction_input,
30 .direction_output = mcf_gpio_direction_output,
31 .get = mcf_gpio_get_value,
32 .set = mcf_gpio_set_value,
33 .ngpio = 8,
34 },
35 .pddr = MCFEPORT_EPDDR,
36 .podr = MCFEPORT_EPDR,
37 .ppdr = MCFEPORT_EPPDR,
38 },
39 {
40 .gpio_chip = {
41 .label = "BUSCTL",
42 .request = mcf_gpio_request,
43 .free = mcf_gpio_free,
44 .direction_input = mcf_gpio_direction_input,
45 .direction_output = mcf_gpio_direction_output,
46 .get = mcf_gpio_get_value,
47 .set = mcf_gpio_set_value_fast,
48 .base = 8,
49 .ngpio = 4,
50 },
51 .pddr = MCFGPIO_PDDR_BUSCTL,
52 .podr = MCFGPIO_PODR_BUSCTL,
53 .ppdr = MCFGPIO_PPDSDR_BUSCTL,
54 .setr = MCFGPIO_PPDSDR_BUSCTL,
55 .clrr = MCFGPIO_PCLRR_BUSCTL,
56 },
57 {
58 .gpio_chip = {
59 .label = "BE",
60 .request = mcf_gpio_request,
61 .free = mcf_gpio_free,
62 .direction_input = mcf_gpio_direction_input,
63 .direction_output = mcf_gpio_direction_output,
64 .get = mcf_gpio_get_value,
65 .set = mcf_gpio_set_value_fast,
66 .base = 16,
67 .ngpio = 4,
68 },
69 .pddr = MCFGPIO_PDDR_BE,
70 .podr = MCFGPIO_PODR_BE,
71 .ppdr = MCFGPIO_PPDSDR_BE,
72 .setr = MCFGPIO_PPDSDR_BE,
73 .clrr = MCFGPIO_PCLRR_BE,
74 },
75 {
76 .gpio_chip = {
77 .label = "CS",
78 .request = mcf_gpio_request,
79 .free = mcf_gpio_free,
80 .direction_input = mcf_gpio_direction_input,
81 .direction_output = mcf_gpio_direction_output,
82 .get = mcf_gpio_get_value,
83 .set = mcf_gpio_set_value_fast,
84 .base = 25,
85 .ngpio = 3,
86 },
87 .pddr = MCFGPIO_PDDR_CS,
88 .podr = MCFGPIO_PODR_CS,
89 .ppdr = MCFGPIO_PPDSDR_CS,
90 .setr = MCFGPIO_PPDSDR_CS,
91 .clrr = MCFGPIO_PCLRR_CS,
92 },
93 {
94 .gpio_chip = {
95 .label = "FECI2C",
96 .request = mcf_gpio_request,
97 .free = mcf_gpio_free,
98 .direction_input = mcf_gpio_direction_input,
99 .direction_output = mcf_gpio_direction_output,
100 .get = mcf_gpio_get_value,
101 .set = mcf_gpio_set_value_fast,
102 .base = 32,
103 .ngpio = 4,
104 },
105 .pddr = MCFGPIO_PDDR_FECI2C,
106 .podr = MCFGPIO_PODR_FECI2C,
107 .ppdr = MCFGPIO_PPDSDR_FECI2C,
108 .setr = MCFGPIO_PPDSDR_FECI2C,
109 .clrr = MCFGPIO_PCLRR_FECI2C,
110 },
111 {
112 .gpio_chip = {
113 .label = "QSPI",
114 .request = mcf_gpio_request,
115 .free = mcf_gpio_free,
116 .direction_input = mcf_gpio_direction_input,
117 .direction_output = mcf_gpio_direction_output,
118 .get = mcf_gpio_get_value,
119 .set = mcf_gpio_set_value_fast,
120 .base = 40,
121 .ngpio = 4,
122 },
123 .pddr = MCFGPIO_PDDR_QSPI,
124 .podr = MCFGPIO_PODR_QSPI,
125 .ppdr = MCFGPIO_PPDSDR_QSPI,
126 .setr = MCFGPIO_PPDSDR_QSPI,
127 .clrr = MCFGPIO_PCLRR_QSPI,
128 },
129 {
130 .gpio_chip = {
131 .label = "TIMER",
132 .request = mcf_gpio_request,
133 .free = mcf_gpio_free,
134 .direction_input = mcf_gpio_direction_input,
135 .direction_output = mcf_gpio_direction_output,
136 .get = mcf_gpio_get_value,
137 .set = mcf_gpio_set_value_fast,
138 .base = 48,
139 .ngpio = 4,
140 },
141 .pddr = MCFGPIO_PDDR_TIMER,
142 .podr = MCFGPIO_PODR_TIMER,
143 .ppdr = MCFGPIO_PPDSDR_TIMER,
144 .setr = MCFGPIO_PPDSDR_TIMER,
145 .clrr = MCFGPIO_PCLRR_TIMER,
146 },
147 {
148 .gpio_chip = {
149 .label = "UART",
150 .request = mcf_gpio_request,
151 .free = mcf_gpio_free,
152 .direction_input = mcf_gpio_direction_input,
153 .direction_output = mcf_gpio_direction_output,
154 .get = mcf_gpio_get_value,
155 .set = mcf_gpio_set_value_fast,
156 .base = 56,
157 .ngpio = 8,
158 },
159 .pddr = MCFGPIO_PDDR_UART,
160 .podr = MCFGPIO_PODR_UART,
161 .ppdr = MCFGPIO_PPDSDR_UART,
162 .setr = MCFGPIO_PPDSDR_UART,
163 .clrr = MCFGPIO_PCLRR_UART,
164 },
165 {
166 .gpio_chip = {
167 .label = "FECH",
168 .request = mcf_gpio_request,
169 .free = mcf_gpio_free,
170 .direction_input = mcf_gpio_direction_input,
171 .direction_output = mcf_gpio_direction_output,
172 .get = mcf_gpio_get_value,
173 .set = mcf_gpio_set_value_fast,
174 .base = 64,
175 .ngpio = 8,
176 },
177 .pddr = MCFGPIO_PDDR_FECH,
178 .podr = MCFGPIO_PODR_FECH,
179 .ppdr = MCFGPIO_PPDSDR_FECH,
180 .setr = MCFGPIO_PPDSDR_FECH,
181 .clrr = MCFGPIO_PCLRR_FECH,
182 },
183 {
184 .gpio_chip = {
185 .label = "FECL",
186 .request = mcf_gpio_request,
187 .free = mcf_gpio_free,
188 .direction_input = mcf_gpio_direction_input,
189 .direction_output = mcf_gpio_direction_output,
190 .get = mcf_gpio_get_value,
191 .set = mcf_gpio_set_value_fast,
192 .base = 72,
193 .ngpio = 8,
194 },
195 .pddr = MCFGPIO_PDDR_FECL,
196 .podr = MCFGPIO_PODR_FECL,
197 .ppdr = MCFGPIO_PPDSDR_FECL,
198 .setr = MCFGPIO_PPDSDR_FECL,
199 .clrr = MCFGPIO_PCLRR_FECL,
200 },
201};
202
203static int __init mcf_gpio_init(void)
204{
205 unsigned i = 0;
206 while (i < ARRAY_SIZE(mcf_gpio_chips))
207 (void)gpiochip_add((struct gpio_chip *)&mcf_gpio_chips[i++]);
208 return 0;
209}
210
211core_initcall(mcf_gpio_init);
diff --git a/arch/m68knommu/platform/523x/Makefile b/arch/m68knommu/platform/523x/Makefile
index 5694d593f029..b8f9b45440c2 100644
--- a/arch/m68knommu/platform/523x/Makefile
+++ b/arch/m68knommu/platform/523x/Makefile
@@ -14,4 +14,4 @@
14 14
15asflags-$(CONFIG_FULLDEBUG) := -DDEBUGGER_COMPATIBLE_CACHE=1 15asflags-$(CONFIG_FULLDEBUG) := -DDEBUGGER_COMPATIBLE_CACHE=1
16 16
17obj-y := config.o 17obj-y := config.o gpio.o
diff --git a/arch/m68knommu/platform/523x/config.c b/arch/m68knommu/platform/523x/config.c
index 961fefebca14..6ba84f2aa397 100644
--- a/arch/m68knommu/platform/523x/config.c
+++ b/arch/m68knommu/platform/523x/config.c
@@ -82,66 +82,20 @@ static struct platform_device *m523x_devices[] __initdata = {
82 82
83/***************************************************************************/ 83/***************************************************************************/
84 84
85#define INTC0 (MCF_MBAR + MCFICM_INTC0)
86
87static void __init m523x_uart_init_line(int line, int irq)
88{
89 u32 imr;
90
91 if ((line < 0) || (line > 2))
92 return;
93
94 writeb(0x30+line, (INTC0 + MCFINTC_ICR0 + MCFINT_UART0 + line));
95
96 imr = readl(INTC0 + MCFINTC_IMRL);
97 imr &= ~((1 << (irq - MCFINT_VECBASE)) | 1);
98 writel(imr, INTC0 + MCFINTC_IMRL);
99}
100
101static void __init m523x_uarts_init(void)
102{
103 const int nrlines = ARRAY_SIZE(m523x_uart_platform);
104 int line;
105
106 for (line = 0; (line < nrlines); line++)
107 m523x_uart_init_line(line, m523x_uart_platform[line].irq);
108}
109
110/***************************************************************************/
111
112static void __init m523x_fec_init(void) 85static void __init m523x_fec_init(void)
113{ 86{
114 u32 imr; 87 u16 par;
115 88 u8 v;
116 /* Unmask FEC interrupts at ColdFire interrupt controller */ 89
117 writeb(0x28, MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_ICR0 + 23); 90 /* Set multi-function pins to ethernet use */
118 writeb(0x27, MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_ICR0 + 27); 91 par = readw(MCF_IPSBAR + 0x100082);
119 writeb(0x26, MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_ICR0 + 29); 92 writew(par | 0xf00, MCF_IPSBAR + 0x100082);
120 93 v = readb(MCF_IPSBAR + 0x100078);
121 imr = readl(MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRH); 94 writeb(v | 0xc0, MCF_IPSBAR + 0x100078);
122 imr &= ~0xf;
123 writel(imr, MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRH);
124 imr = readl(MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRL);
125 imr &= ~0xff800001;
126 writel(imr, MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRL);
127}
128
129/***************************************************************************/
130
131void mcf_disableall(void)
132{
133 *((volatile unsigned long *) (MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRH)) = 0xffffffff;
134 *((volatile unsigned long *) (MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRL)) = 0xffffffff;
135} 95}
136 96
137/***************************************************************************/ 97/***************************************************************************/
138 98
139void mcf_autovector(unsigned int vec)
140{
141 /* Everything is auto-vectored on the 523x */
142}
143/***************************************************************************/
144
145static void m523x_cpu_reset(void) 99static void m523x_cpu_reset(void)
146{ 100{
147 local_irq_disable(); 101 local_irq_disable();
@@ -152,16 +106,14 @@ static void m523x_cpu_reset(void)
152 106
153void __init config_BSP(char *commandp, int size) 107void __init config_BSP(char *commandp, int size)
154{ 108{
155 mcf_disableall();
156 mach_reset = m523x_cpu_reset; 109 mach_reset = m523x_cpu_reset;
157 m523x_uarts_init();
158 m523x_fec_init();
159} 110}
160 111
161/***************************************************************************/ 112/***************************************************************************/
162 113
163static int __init init_BSP(void) 114static int __init init_BSP(void)
164{ 115{
116 m523x_fec_init();
165 platform_add_devices(m523x_devices, ARRAY_SIZE(m523x_devices)); 117 platform_add_devices(m523x_devices, ARRAY_SIZE(m523x_devices));
166 return 0; 118 return 0;
167} 119}
diff --git a/arch/m68knommu/platform/523x/gpio.c b/arch/m68knommu/platform/523x/gpio.c
new file mode 100644
index 000000000000..f02840d54d3c
--- /dev/null
+++ b/arch/m68knommu/platform/523x/gpio.c
@@ -0,0 +1,283 @@
1/*
2 * Coldfire generic GPIO support
3 *
4 * (C) Copyright 2009, Steven King <sfking@fdwdc.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 as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14*/
15
16#include <linux/kernel.h>
17#include <linux/init.h>
18
19#include <asm/coldfire.h>
20#include <asm/mcfsim.h>
21#include <asm/mcfgpio.h>
22
23static struct mcf_gpio_chip mcf_gpio_chips[] = {
24 {
25 .gpio_chip = {
26 .label = "PIRQ",
27 .request = mcf_gpio_request,
28 .free = mcf_gpio_free,
29 .direction_input = mcf_gpio_direction_input,
30 .direction_output = mcf_gpio_direction_output,
31 .get = mcf_gpio_get_value,
32 .set = mcf_gpio_set_value,
33 .ngpio = 8,
34 },
35 .pddr = MCFEPORT_EPDDR,
36 .podr = MCFEPORT_EPDR,
37 .ppdr = MCFEPORT_EPPDR,
38 },
39 {
40 .gpio_chip = {
41 .label = "ADDR",
42 .request = mcf_gpio_request,
43 .free = mcf_gpio_free,
44 .direction_input = mcf_gpio_direction_input,
45 .direction_output = mcf_gpio_direction_output,
46 .get = mcf_gpio_get_value,
47 .set = mcf_gpio_set_value_fast,
48 .base = 13,
49 .ngpio = 3,
50 },
51 .pddr = MCFGPIO_PDDR_ADDR,
52 .podr = MCFGPIO_PODR_ADDR,
53 .ppdr = MCFGPIO_PPDSDR_ADDR,
54 .setr = MCFGPIO_PPDSDR_ADDR,
55 .clrr = MCFGPIO_PCLRR_ADDR,
56 },
57 {
58 .gpio_chip = {
59 .label = "DATAH",
60 .request = mcf_gpio_request,
61 .free = mcf_gpio_free,
62 .direction_input = mcf_gpio_direction_input,
63 .direction_output = mcf_gpio_direction_output,
64 .get = mcf_gpio_get_value,
65 .set = mcf_gpio_set_value_fast,
66 .base = 16,
67 .ngpio = 8,
68 },
69 .pddr = MCFGPIO_PDDR_DATAH,
70 .podr = MCFGPIO_PODR_DATAH,
71 .ppdr = MCFGPIO_PPDSDR_DATAH,
72 .setr = MCFGPIO_PPDSDR_DATAH,
73 .clrr = MCFGPIO_PCLRR_DATAH,
74 },
75 {
76 .gpio_chip = {
77 .label = "DATAL",
78 .request = mcf_gpio_request,
79 .free = mcf_gpio_free,
80 .direction_input = mcf_gpio_direction_input,
81 .direction_output = mcf_gpio_direction_output,
82 .get = mcf_gpio_get_value,
83 .set = mcf_gpio_set_value_fast,
84 .base = 24,
85 .ngpio = 8,
86 },
87 .pddr = MCFGPIO_PDDR_DATAL,
88 .podr = MCFGPIO_PODR_DATAL,
89 .ppdr = MCFGPIO_PPDSDR_DATAL,
90 .setr = MCFGPIO_PPDSDR_DATAL,
91 .clrr = MCFGPIO_PCLRR_DATAL,
92 },
93 {
94 .gpio_chip = {
95 .label = "BUSCTL",
96 .request = mcf_gpio_request,
97 .free = mcf_gpio_free,
98 .direction_input = mcf_gpio_direction_input,
99 .direction_output = mcf_gpio_direction_output,
100 .get = mcf_gpio_get_value,
101 .set = mcf_gpio_set_value_fast,
102 .base = 32,
103 .ngpio = 8,
104 },
105 .pddr = MCFGPIO_PDDR_BUSCTL,
106 .podr = MCFGPIO_PODR_BUSCTL,
107 .ppdr = MCFGPIO_PPDSDR_BUSCTL,
108 .setr = MCFGPIO_PPDSDR_BUSCTL,
109 .clrr = MCFGPIO_PCLRR_BUSCTL,
110 },
111 {
112 .gpio_chip = {
113 .label = "BS",
114 .request = mcf_gpio_request,
115 .free = mcf_gpio_free,
116 .direction_input = mcf_gpio_direction_input,
117 .direction_output = mcf_gpio_direction_output,
118 .get = mcf_gpio_get_value,
119 .set = mcf_gpio_set_value_fast,
120 .base = 40,
121 .ngpio = 4,
122 },
123 .pddr = MCFGPIO_PDDR_BS,
124 .podr = MCFGPIO_PODR_BS,
125 .ppdr = MCFGPIO_PPDSDR_BS,
126 .setr = MCFGPIO_PPDSDR_BS,
127 .clrr = MCFGPIO_PCLRR_BS,
128 },
129 {
130 .gpio_chip = {
131 .label = "CS",
132 .request = mcf_gpio_request,
133 .free = mcf_gpio_free,
134 .direction_input = mcf_gpio_direction_input,
135 .direction_output = mcf_gpio_direction_output,
136 .get = mcf_gpio_get_value,
137 .set = mcf_gpio_set_value_fast,
138 .base = 49,
139 .ngpio = 7,
140 },
141 .pddr = MCFGPIO_PDDR_CS,
142 .podr = MCFGPIO_PODR_CS,
143 .ppdr = MCFGPIO_PPDSDR_CS,
144 .setr = MCFGPIO_PPDSDR_CS,
145 .clrr = MCFGPIO_PCLRR_CS,
146 },
147 {
148 .gpio_chip = {
149 .label = "SDRAM",
150 .request = mcf_gpio_request,
151 .free = mcf_gpio_free,
152 .direction_input = mcf_gpio_direction_input,
153 .direction_output = mcf_gpio_direction_output,
154 .get = mcf_gpio_get_value,
155 .set = mcf_gpio_set_value_fast,
156 .base = 56,
157 .ngpio = 6,
158 },
159 .pddr = MCFGPIO_PDDR_SDRAM,
160 .podr = MCFGPIO_PODR_SDRAM,
161 .ppdr = MCFGPIO_PPDSDR_SDRAM,
162 .setr = MCFGPIO_PPDSDR_SDRAM,
163 .clrr = MCFGPIO_PCLRR_SDRAM,
164 },
165 {
166 .gpio_chip = {
167 .label = "FECI2C",
168 .request = mcf_gpio_request,
169 .free = mcf_gpio_free,
170 .direction_input = mcf_gpio_direction_input,
171 .direction_output = mcf_gpio_direction_output,
172 .get = mcf_gpio_get_value,
173 .set = mcf_gpio_set_value_fast,
174 .base = 64,
175 .ngpio = 4,
176 },
177 .pddr = MCFGPIO_PDDR_FECI2C,
178 .podr = MCFGPIO_PODR_FECI2C,
179 .ppdr = MCFGPIO_PPDSDR_FECI2C,
180 .setr = MCFGPIO_PPDSDR_FECI2C,
181 .clrr = MCFGPIO_PCLRR_FECI2C,
182 },
183 {
184 .gpio_chip = {
185 .label = "UARTH",
186 .request = mcf_gpio_request,
187 .free = mcf_gpio_free,
188 .direction_input = mcf_gpio_direction_input,
189 .direction_output = mcf_gpio_direction_output,
190 .get = mcf_gpio_get_value,
191 .set = mcf_gpio_set_value_fast,
192 .base = 72,
193 .ngpio = 2,
194 },
195 .pddr = MCFGPIO_PDDR_UARTH,
196 .podr = MCFGPIO_PODR_UARTH,
197 .ppdr = MCFGPIO_PPDSDR_UARTH,
198 .setr = MCFGPIO_PPDSDR_UARTH,
199 .clrr = MCFGPIO_PCLRR_UARTH,
200 },
201 {
202 .gpio_chip = {
203 .label = "UARTL",
204 .request = mcf_gpio_request,
205 .free = mcf_gpio_free,
206 .direction_input = mcf_gpio_direction_input,
207 .direction_output = mcf_gpio_direction_output,
208 .get = mcf_gpio_get_value,
209 .set = mcf_gpio_set_value_fast,
210 .base = 80,
211 .ngpio = 8,
212 },
213 .pddr = MCFGPIO_PDDR_UARTL,
214 .podr = MCFGPIO_PODR_UARTL,
215 .ppdr = MCFGPIO_PPDSDR_UARTL,
216 .setr = MCFGPIO_PPDSDR_UARTL,
217 .clrr = MCFGPIO_PCLRR_UARTL,
218 },
219 {
220 .gpio_chip = {
221 .label = "QSPI",
222 .request = mcf_gpio_request,
223 .free = mcf_gpio_free,
224 .direction_input = mcf_gpio_direction_input,
225 .direction_output = mcf_gpio_direction_output,
226 .get = mcf_gpio_get_value,
227 .set = mcf_gpio_set_value_fast,
228 .base = 88,
229 .ngpio = 5,
230 },
231 .pddr = MCFGPIO_PDDR_QSPI,
232 .podr = MCFGPIO_PODR_QSPI,
233 .ppdr = MCFGPIO_PPDSDR_QSPI,
234 .setr = MCFGPIO_PPDSDR_QSPI,
235 .clrr = MCFGPIO_PCLRR_QSPI,
236 },
237 {
238 .gpio_chip = {
239 .label = "TIMER",
240 .request = mcf_gpio_request,
241 .free = mcf_gpio_free,
242 .direction_input = mcf_gpio_direction_input,
243 .direction_output = mcf_gpio_direction_output,
244 .get = mcf_gpio_get_value,
245 .set = mcf_gpio_set_value_fast,
246 .base = 96,
247 .ngpio = 4,
248 },
249 .pddr = MCFGPIO_PDDR_TIMER,
250 .podr = MCFGPIO_PODR_TIMER,
251 .ppdr = MCFGPIO_PPDSDR_TIMER,
252 .setr = MCFGPIO_PPDSDR_TIMER,
253 .clrr = MCFGPIO_PCLRR_TIMER,
254 },
255 {
256 .gpio_chip = {
257 .label = "ETPU",
258 .request = mcf_gpio_request,
259 .free = mcf_gpio_free,
260 .direction_input = mcf_gpio_direction_input,
261 .direction_output = mcf_gpio_direction_output,
262 .get = mcf_gpio_get_value,
263 .set = mcf_gpio_set_value_fast,
264 .base = 104,
265 .ngpio = 3,
266 },
267 .pddr = MCFGPIO_PDDR_ETPU,
268 .podr = MCFGPIO_PODR_ETPU,
269 .ppdr = MCFGPIO_PPDSDR_ETPU,
270 .setr = MCFGPIO_PPDSDR_ETPU,
271 .clrr = MCFGPIO_PCLRR_ETPU,
272 },
273};
274
275static int __init mcf_gpio_init(void)
276{
277 unsigned i = 0;
278 while (i < ARRAY_SIZE(mcf_gpio_chips))
279 (void)gpiochip_add((struct gpio_chip *)&mcf_gpio_chips[i++]);
280 return 0;
281}
282
283core_initcall(mcf_gpio_init);
diff --git a/arch/m68knommu/platform/5249/Makefile b/arch/m68knommu/platform/5249/Makefile
index a439d9ab3f27..f56225d1582f 100644
--- a/arch/m68knommu/platform/5249/Makefile
+++ b/arch/m68knommu/platform/5249/Makefile
@@ -14,5 +14,5 @@
14 14
15asflags-$(CONFIG_FULLDEBUG) := -DDEBUGGER_COMPATIBLE_CACHE=1 15asflags-$(CONFIG_FULLDEBUG) := -DDEBUGGER_COMPATIBLE_CACHE=1
16 16
17obj-y := config.o 17obj-y := config.o gpio.o intc2.o
18 18
diff --git a/arch/m68knommu/platform/5249/config.c b/arch/m68knommu/platform/5249/config.c
index 93d998825925..646f5ba462fc 100644
--- a/arch/m68knommu/platform/5249/config.c
+++ b/arch/m68knommu/platform/5249/config.c
@@ -48,11 +48,11 @@ static void __init m5249_uart_init_line(int line, int irq)
48 if (line == 0) { 48 if (line == 0) {
49 writeb(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI1, MCF_MBAR + MCFSIM_UART1ICR); 49 writeb(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI1, MCF_MBAR + MCFSIM_UART1ICR);
50 writeb(irq, MCF_MBAR + MCFUART_BASE1 + MCFUART_UIVR); 50 writeb(irq, MCF_MBAR + MCFUART_BASE1 + MCFUART_UIVR);
51 mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_UART1); 51 mcf_mapirq2imr(irq, MCFINTC_UART0);
52 } else if (line == 1) { 52 } else if (line == 1) {
53 writeb(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI2, MCF_MBAR + MCFSIM_UART2ICR); 53 writeb(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI2, MCF_MBAR + MCFSIM_UART2ICR);
54 writeb(irq, MCF_MBAR + MCFUART_BASE2 + MCFUART_UIVR); 54 writeb(irq, MCF_MBAR + MCFUART_BASE2 + MCFUART_UIVR);
55 mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_UART2); 55 mcf_mapirq2imr(irq, MCFINTC_UART1);
56 } 56 }
57} 57}
58 58
@@ -65,38 +65,21 @@ static void __init m5249_uarts_init(void)
65 m5249_uart_init_line(line, m5249_uart_platform[line].irq); 65 m5249_uart_init_line(line, m5249_uart_platform[line].irq);
66} 66}
67 67
68
69/***************************************************************************/ 68/***************************************************************************/
70 69
71void mcf_autovector(unsigned int vec) 70static void __init m5249_timers_init(void)
72{ 71{
73 volatile unsigned char *mbar; 72 /* Timer1 is always used as system timer */
74 73 writeb(MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI3,
75 if ((vec >= 25) && (vec <= 31)) { 74 MCF_MBAR + MCFSIM_TIMER1ICR);
76 mbar = (volatile unsigned char *) MCF_MBAR; 75 mcf_mapirq2imr(MCF_IRQ_TIMER, MCFINTC_TIMER1);
77 vec = 0x1 << (vec - 24); 76
78 *(mbar + MCFSIM_AVR) |= vec; 77#ifdef CONFIG_HIGHPROFILE
79 mcf_setimr(mcf_getimr() & ~vec); 78 /* Timer2 is to be used as a high speed profile timer */
80 } 79 writeb(MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL7 | MCFSIM_ICR_PRI3,
81} 80 MCF_MBAR + MCFSIM_TIMER2ICR);
82 81 mcf_mapirq2imr(MCF_IRQ_PROFILER, MCFINTC_TIMER2);
83/***************************************************************************/ 82#endif
84
85void mcf_settimericr(unsigned int timer, unsigned int level)
86{
87 volatile unsigned char *icrp;
88 unsigned int icr, imr;
89
90 if (timer <= 2) {
91 switch (timer) {
92 case 2: icr = MCFSIM_TIMER2ICR; imr = MCFSIM_IMR_TIMER2; break;
93 default: icr = MCFSIM_TIMER1ICR; imr = MCFSIM_IMR_TIMER1; break;
94 }
95
96 icrp = (volatile unsigned char *) (MCF_MBAR + icr);
97 *icrp = MCFSIM_ICR_AUTOVEC | (level << 2) | MCFSIM_ICR_PRI3;
98 mcf_setimr(mcf_getimr() & ~imr);
99 }
100} 83}
101 84
102/***************************************************************************/ 85/***************************************************************************/
@@ -114,15 +97,15 @@ void m5249_cpu_reset(void)
114 97
115void __init config_BSP(char *commandp, int size) 98void __init config_BSP(char *commandp, int size)
116{ 99{
117 mcf_setimr(MCFSIM_IMR_MASKALL);
118 mach_reset = m5249_cpu_reset; 100 mach_reset = m5249_cpu_reset;
101 m5249_timers_init();
102 m5249_uarts_init();
119} 103}
120 104
121/***************************************************************************/ 105/***************************************************************************/
122 106
123static int __init init_BSP(void) 107static int __init init_BSP(void)
124{ 108{
125 m5249_uarts_init();
126 platform_add_devices(m5249_devices, ARRAY_SIZE(m5249_devices)); 109 platform_add_devices(m5249_devices, ARRAY_SIZE(m5249_devices));
127 return 0; 110 return 0;
128} 111}
diff --git a/arch/m68knommu/platform/5249/gpio.c b/arch/m68knommu/platform/5249/gpio.c
new file mode 100644
index 000000000000..c611eab8b3b6
--- /dev/null
+++ b/arch/m68knommu/platform/5249/gpio.c
@@ -0,0 +1,65 @@
1/*
2 * Coldfire generic GPIO support
3 *
4 * (C) Copyright 2009, Steven King <sfking@fdwdc.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 as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14*/
15
16#include <linux/kernel.h>
17#include <linux/init.h>
18
19#include <asm/coldfire.h>
20#include <asm/mcfsim.h>
21#include <asm/mcfgpio.h>
22
23static struct mcf_gpio_chip mcf_gpio_chips[] = {
24 {
25 .gpio_chip = {
26 .label = "GPIO0",
27 .request = mcf_gpio_request,
28 .free = mcf_gpio_free,
29 .direction_input = mcf_gpio_direction_input,
30 .direction_output = mcf_gpio_direction_output,
31 .get = mcf_gpio_get_value,
32 .set = mcf_gpio_set_value,
33 .ngpio = 32,
34 },
35 .pddr = MCFSIM2_GPIOENABLE,
36 .podr = MCFSIM2_GPIOWRITE,
37 .ppdr = MCFSIM2_GPIOREAD,
38 },
39 {
40 .gpio_chip = {
41 .label = "GPIO1",
42 .request = mcf_gpio_request,
43 .free = mcf_gpio_free,
44 .direction_input = mcf_gpio_direction_input,
45 .direction_output = mcf_gpio_direction_output,
46 .get = mcf_gpio_get_value,
47 .set = mcf_gpio_set_value,
48 .base = 32,
49 .ngpio = 32,
50 },
51 .pddr = MCFSIM2_GPIO1ENABLE,
52 .podr = MCFSIM2_GPIO1WRITE,
53 .ppdr = MCFSIM2_GPIO1READ,
54 },
55};
56
57static int __init mcf_gpio_init(void)
58{
59 unsigned i = 0;
60 while (i < ARRAY_SIZE(mcf_gpio_chips))
61 (void)gpiochip_add((struct gpio_chip *)&mcf_gpio_chips[i++]);
62 return 0;
63}
64
65core_initcall(mcf_gpio_init);
diff --git a/arch/m68knommu/platform/5249/intc2.c b/arch/m68knommu/platform/5249/intc2.c
new file mode 100644
index 000000000000..d09d9da04537
--- /dev/null
+++ b/arch/m68knommu/platform/5249/intc2.c
@@ -0,0 +1,59 @@
1/*
2 * intc2.c -- support for the 2nd INTC controller of the 5249
3 *
4 * (C) Copyright 2009, Greg Ungerer <gerg@snapgear.com>
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file COPYING in the main directory of this archive
8 * for more details.
9 */
10
11#include <linux/types.h>
12#include <linux/init.h>
13#include <linux/kernel.h>
14#include <linux/interrupt.h>
15#include <linux/irq.h>
16#include <linux/io.h>
17#include <asm/coldfire.h>
18#include <asm/mcfsim.h>
19
20static void intc2_irq_gpio_mask(unsigned int irq)
21{
22 u32 imr;
23 imr = readl(MCF_MBAR2 + MCFSIM2_GPIOINTENABLE);
24 imr &= ~(0x1 << (irq - MCFINTC2_GPIOIRQ0));
25 writel(imr, MCF_MBAR2 + MCFSIM2_GPIOINTENABLE);
26}
27
28static void intc2_irq_gpio_unmask(unsigned int irq)
29{
30 u32 imr;
31 imr = readl(MCF_MBAR2 + MCFSIM2_GPIOINTENABLE);
32 imr |= (0x1 << (irq - MCFINTC2_GPIOIRQ0));
33 writel(imr, MCF_MBAR2 + MCFSIM2_GPIOINTENABLE);
34}
35
36static void intc2_irq_gpio_ack(unsigned int irq)
37{
38 writel(0x1 << (irq - MCFINTC2_GPIOIRQ0), MCF_MBAR2 + MCFSIM2_GPIOINTCLEAR);
39}
40
41static struct irq_chip intc2_irq_gpio_chip = {
42 .name = "CF-INTC2",
43 .mask = intc2_irq_gpio_mask,
44 .unmask = intc2_irq_gpio_unmask,
45 .ack = intc2_irq_gpio_ack,
46};
47
48static int __init mcf_intc2_init(void)
49{
50 int irq;
51
52 /* GPIO interrupt sources */
53 for (irq = MCFINTC2_GPIOIRQ0; (irq <= MCFINTC2_GPIOIRQ7); irq++)
54 irq_desc[irq].chip = &intc2_irq_gpio_chip;
55
56 return 0;
57}
58
59arch_initcall(mcf_intc2_init);
diff --git a/arch/m68knommu/platform/5272/Makefile b/arch/m68knommu/platform/5272/Makefile
index 26135d92b34d..93673ef8e2c1 100644
--- a/arch/m68knommu/platform/5272/Makefile
+++ b/arch/m68knommu/platform/5272/Makefile
@@ -14,5 +14,5 @@
14 14
15asflags-$(CONFIG_FULLDEBUG) := -DDEBUGGER_COMPATIBLE_CACHE=1 15asflags-$(CONFIG_FULLDEBUG) := -DDEBUGGER_COMPATIBLE_CACHE=1
16 16
17obj-y := config.o 17obj-y := config.o gpio.o intc.o
18 18
diff --git a/arch/m68knommu/platform/5272/config.c b/arch/m68knommu/platform/5272/config.c
index 5f95fcde05fd..59278c0887d0 100644
--- a/arch/m68knommu/platform/5272/config.c
+++ b/arch/m68knommu/platform/5272/config.c
@@ -20,12 +20,6 @@
20 20
21/***************************************************************************/ 21/***************************************************************************/
22 22
23extern unsigned int mcf_timervector;
24extern unsigned int mcf_profilevector;
25extern unsigned int mcf_timerlevel;
26
27/***************************************************************************/
28
29/* 23/*
30 * Some platforms need software versions of the GPIO data registers. 24 * Some platforms need software versions of the GPIO data registers.
31 */ 25 */
@@ -37,11 +31,11 @@ unsigned char ledbank = 0xff;
37static struct mcf_platform_uart m5272_uart_platform[] = { 31static struct mcf_platform_uart m5272_uart_platform[] = {
38 { 32 {
39 .mapbase = MCF_MBAR + MCFUART_BASE1, 33 .mapbase = MCF_MBAR + MCFUART_BASE1,
40 .irq = 73, 34 .irq = MCF_IRQ_UART1,
41 }, 35 },
42 { 36 {
43 .mapbase = MCF_MBAR + MCFUART_BASE2, 37 .mapbase = MCF_MBAR + MCFUART_BASE2,
44 .irq = 74, 38 .irq = MCF_IRQ_UART2,
45 }, 39 },
46 { }, 40 { },
47}; 41};
@@ -59,18 +53,18 @@ static struct resource m5272_fec_resources[] = {
59 .flags = IORESOURCE_MEM, 53 .flags = IORESOURCE_MEM,
60 }, 54 },
61 { 55 {
62 .start = 86, 56 .start = MCF_IRQ_ERX,
63 .end = 86, 57 .end = MCF_IRQ_ERX,
64 .flags = IORESOURCE_IRQ, 58 .flags = IORESOURCE_IRQ,
65 }, 59 },
66 { 60 {
67 .start = 87, 61 .start = MCF_IRQ_ETX,
68 .end = 87, 62 .end = MCF_IRQ_ETX,
69 .flags = IORESOURCE_IRQ, 63 .flags = IORESOURCE_IRQ,
70 }, 64 },
71 { 65 {
72 .start = 88, 66 .start = MCF_IRQ_ENTC,
73 .end = 88, 67 .end = MCF_IRQ_ENTC,
74 .flags = IORESOURCE_IRQ, 68 .flags = IORESOURCE_IRQ,
75 }, 69 },
76}; 70};
@@ -94,9 +88,6 @@ static void __init m5272_uart_init_line(int line, int irq)
94 u32 v; 88 u32 v;
95 89
96 if ((line >= 0) && (line < 2)) { 90 if ((line >= 0) && (line < 2)) {
97 v = (line) ? 0x0e000000 : 0xe0000000;
98 writel(v, MCF_MBAR + MCFSIM_ICR2);
99
100 /* Enable the output lines for the serial ports */ 91 /* Enable the output lines for the serial ports */
101 v = readl(MCF_MBAR + MCFSIM_PBCNT); 92 v = readl(MCF_MBAR + MCFSIM_PBCNT);
102 v = (v & ~0x000000ff) | 0x00000055; 93 v = (v & ~0x000000ff) | 0x00000055;
@@ -119,54 +110,6 @@ static void __init m5272_uarts_init(void)
119 110
120/***************************************************************************/ 111/***************************************************************************/
121 112
122static void __init m5272_fec_init(void)
123{
124 u32 imr;
125
126 /* Unmask FEC interrupts at ColdFire interrupt controller */
127 imr = readl(MCF_MBAR + MCFSIM_ICR3);
128 imr = (imr & ~0x00000fff) | 0x00000ddd;
129 writel(imr, MCF_MBAR + MCFSIM_ICR3);
130
131 imr = readl(MCF_MBAR + MCFSIM_ICR1);
132 imr = (imr & ~0x0f000000) | 0x0d000000;
133 writel(imr, MCF_MBAR + MCFSIM_ICR1);
134}
135
136/***************************************************************************/
137
138void mcf_disableall(void)
139{
140 volatile unsigned long *icrp;
141
142 icrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_ICR1);
143 icrp[0] = 0x88888888;
144 icrp[1] = 0x88888888;
145 icrp[2] = 0x88888888;
146 icrp[3] = 0x88888888;
147}
148
149/***************************************************************************/
150
151void mcf_autovector(unsigned int vec)
152{
153 /* Everything is auto-vectored on the 5272 */
154}
155
156/***************************************************************************/
157
158void mcf_settimericr(int timer, int level)
159{
160 volatile unsigned long *icrp;
161
162 if ((timer >= 1 ) && (timer <= 4)) {
163 icrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_ICR1);
164 *icrp = (0x8 | level) << ((4 - timer) * 4);
165 }
166}
167
168/***************************************************************************/
169
170static void m5272_cpu_reset(void) 113static void m5272_cpu_reset(void)
171{ 114{
172 local_irq_disable(); 115 local_irq_disable();
@@ -190,8 +133,6 @@ void __init config_BSP(char *commandp, int size)
190 *pivrp = 0x40; 133 *pivrp = 0x40;
191#endif 134#endif
192 135
193 mcf_disableall();
194
195#if defined(CONFIG_NETtel) || defined(CONFIG_SCALES) 136#if defined(CONFIG_NETtel) || defined(CONFIG_SCALES)
196 /* Copy command line from FLASH to local buffer... */ 137 /* Copy command line from FLASH to local buffer... */
197 memcpy(commandp, (char *) 0xf0004000, size); 138 memcpy(commandp, (char *) 0xf0004000, size);
@@ -202,8 +143,6 @@ void __init config_BSP(char *commandp, int size)
202 commandp[size-1] = 0; 143 commandp[size-1] = 0;
203#endif 144#endif
204 145
205 mcf_timervector = 69;
206 mcf_profilevector = 70;
207 mach_reset = m5272_cpu_reset; 146 mach_reset = m5272_cpu_reset;
208} 147}
209 148
@@ -212,7 +151,6 @@ void __init config_BSP(char *commandp, int size)
212static int __init init_BSP(void) 151static int __init init_BSP(void)
213{ 152{
214 m5272_uarts_init(); 153 m5272_uarts_init();
215 m5272_fec_init();
216 platform_add_devices(m5272_devices, ARRAY_SIZE(m5272_devices)); 154 platform_add_devices(m5272_devices, ARRAY_SIZE(m5272_devices));
217 return 0; 155 return 0;
218} 156}
diff --git a/arch/m68knommu/platform/5272/gpio.c b/arch/m68knommu/platform/5272/gpio.c
new file mode 100644
index 000000000000..459db89a89cc
--- /dev/null
+++ b/arch/m68knommu/platform/5272/gpio.c
@@ -0,0 +1,81 @@
1/*
2 * Coldfire generic GPIO support
3 *
4 * (C) Copyright 2009, Steven King <sfking@fdwdc.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 as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14*/
15
16#include <linux/kernel.h>
17#include <linux/init.h>
18
19#include <asm/coldfire.h>
20#include <asm/mcfsim.h>
21#include <asm/mcfgpio.h>
22
23static struct mcf_gpio_chip mcf_gpio_chips[] = {
24 {
25 .gpio_chip = {
26 .label = "PA",
27 .request = mcf_gpio_request,
28 .free = mcf_gpio_free,
29 .direction_input = mcf_gpio_direction_input,
30 .direction_output = mcf_gpio_direction_output,
31 .get = mcf_gpio_get_value,
32 .set = mcf_gpio_set_value,
33 .ngpio = 16,
34 },
35 .pddr = MCFSIM_PADDR,
36 .podr = MCFSIM_PADAT,
37 .ppdr = MCFSIM_PADAT,
38 },
39 {
40 .gpio_chip = {
41 .label = "PB",
42 .request = mcf_gpio_request,
43 .free = mcf_gpio_free,
44 .direction_input = mcf_gpio_direction_input,
45 .direction_output = mcf_gpio_direction_output,
46 .get = mcf_gpio_get_value,
47 .set = mcf_gpio_set_value,
48 .base = 16,
49 .ngpio = 16,
50 },
51 .pddr = MCFSIM_PBDDR,
52 .podr = MCFSIM_PBDAT,
53 .ppdr = MCFSIM_PBDAT,
54 },
55 {
56 .gpio_chip = {
57 .label = "PC",
58 .request = mcf_gpio_request,
59 .free = mcf_gpio_free,
60 .direction_input = mcf_gpio_direction_input,
61 .direction_output = mcf_gpio_direction_output,
62 .get = mcf_gpio_get_value,
63 .set = mcf_gpio_set_value,
64 .base = 32,
65 .ngpio = 16,
66 },
67 .pddr = MCFSIM_PCDDR,
68 .podr = MCFSIM_PCDAT,
69 .ppdr = MCFSIM_PCDAT,
70 },
71};
72
73static int __init mcf_gpio_init(void)
74{
75 unsigned i = 0;
76 while (i < ARRAY_SIZE(mcf_gpio_chips))
77 (void)gpiochip_add((struct gpio_chip *)&mcf_gpio_chips[i++]);
78 return 0;
79}
80
81core_initcall(mcf_gpio_init);
diff --git a/arch/m68knommu/platform/5272/intc.c b/arch/m68knommu/platform/5272/intc.c
new file mode 100644
index 000000000000..7081e0a9720e
--- /dev/null
+++ b/arch/m68knommu/platform/5272/intc.c
@@ -0,0 +1,138 @@
1/*
2 * intc.c -- interrupt controller or ColdFire 5272 SoC
3 *
4 * (C) Copyright 2009, Greg Ungerer <gerg@snapgear.com>
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file COPYING in the main directory of this archive
8 * for more details.
9 */
10
11#include <linux/types.h>
12#include <linux/init.h>
13#include <linux/kernel.h>
14#include <linux/interrupt.h>
15#include <linux/irq.h>
16#include <linux/io.h>
17#include <asm/coldfire.h>
18#include <asm/mcfsim.h>
19#include <asm/traps.h>
20
21/*
22 * The 5272 ColdFire interrupt controller is nothing like any other
23 * ColdFire interrupt controller - it truly is completely different.
24 * Given its age it is unlikely to be used on any other ColdFire CPU.
25 */
26
27/*
28 * The masking and priproty setting of interrupts on the 5272 is done
29 * via a set of 4 "Interrupt Controller Registers" (ICR). There is a
30 * loose mapping of vector number to register and internal bits, but
31 * a table is the easiest and quickest way to map them.
32 */
33struct irqmap {
34 unsigned char icr;
35 unsigned char index;
36 unsigned char ack;
37};
38
39static struct irqmap intc_irqmap[MCFINT_VECMAX - MCFINT_VECBASE] = {
40 /*MCF_IRQ_SPURIOUS*/ { .icr = 0, .index = 0, .ack = 0, },
41 /*MCF_IRQ_EINT1*/ { .icr = MCFSIM_ICR1, .index = 28, .ack = 1, },
42 /*MCF_IRQ_EINT2*/ { .icr = MCFSIM_ICR1, .index = 24, .ack = 1, },
43 /*MCF_IRQ_EINT3*/ { .icr = MCFSIM_ICR1, .index = 20, .ack = 1, },
44 /*MCF_IRQ_EINT4*/ { .icr = MCFSIM_ICR1, .index = 16, .ack = 1, },
45 /*MCF_IRQ_TIMER1*/ { .icr = MCFSIM_ICR1, .index = 12, .ack = 0, },
46 /*MCF_IRQ_TIMER2*/ { .icr = MCFSIM_ICR1, .index = 8, .ack = 0, },
47 /*MCF_IRQ_TIMER3*/ { .icr = MCFSIM_ICR1, .index = 4, .ack = 0, },
48 /*MCF_IRQ_TIMER4*/ { .icr = MCFSIM_ICR1, .index = 0, .ack = 0, },
49 /*MCF_IRQ_UART1*/ { .icr = MCFSIM_ICR2, .index = 28, .ack = 0, },
50 /*MCF_IRQ_UART2*/ { .icr = MCFSIM_ICR2, .index = 24, .ack = 0, },
51 /*MCF_IRQ_PLIP*/ { .icr = MCFSIM_ICR2, .index = 20, .ack = 0, },
52 /*MCF_IRQ_PLIA*/ { .icr = MCFSIM_ICR2, .index = 16, .ack = 0, },
53 /*MCF_IRQ_USB0*/ { .icr = MCFSIM_ICR2, .index = 12, .ack = 0, },
54 /*MCF_IRQ_USB1*/ { .icr = MCFSIM_ICR2, .index = 8, .ack = 0, },
55 /*MCF_IRQ_USB2*/ { .icr = MCFSIM_ICR2, .index = 4, .ack = 0, },
56 /*MCF_IRQ_USB3*/ { .icr = MCFSIM_ICR2, .index = 0, .ack = 0, },
57 /*MCF_IRQ_USB4*/ { .icr = MCFSIM_ICR3, .index = 28, .ack = 0, },
58 /*MCF_IRQ_USB5*/ { .icr = MCFSIM_ICR3, .index = 24, .ack = 0, },
59 /*MCF_IRQ_USB6*/ { .icr = MCFSIM_ICR3, .index = 20, .ack = 0, },
60 /*MCF_IRQ_USB7*/ { .icr = MCFSIM_ICR3, .index = 16, .ack = 0, },
61 /*MCF_IRQ_DMA*/ { .icr = MCFSIM_ICR3, .index = 12, .ack = 0, },
62 /*MCF_IRQ_ERX*/ { .icr = MCFSIM_ICR3, .index = 8, .ack = 0, },
63 /*MCF_IRQ_ETX*/ { .icr = MCFSIM_ICR3, .index = 4, .ack = 0, },
64 /*MCF_IRQ_ENTC*/ { .icr = MCFSIM_ICR3, .index = 0, .ack = 0, },
65 /*MCF_IRQ_QSPI*/ { .icr = MCFSIM_ICR4, .index = 28, .ack = 0, },
66 /*MCF_IRQ_EINT5*/ { .icr = MCFSIM_ICR4, .index = 24, .ack = 1, },
67 /*MCF_IRQ_EINT6*/ { .icr = MCFSIM_ICR4, .index = 20, .ack = 1, },
68 /*MCF_IRQ_SWTO*/ { .icr = MCFSIM_ICR4, .index = 16, .ack = 0, },
69};
70
71static void intc_irq_mask(unsigned int irq)
72{
73 if ((irq >= MCFINT_VECBASE) && (irq <= MCFINT_VECMAX)) {
74 u32 v;
75 irq -= MCFINT_VECBASE;
76 v = 0x8 << intc_irqmap[irq].index;
77 writel(v, MCF_MBAR + intc_irqmap[irq].icr);
78 }
79}
80
81static void intc_irq_unmask(unsigned int irq)
82{
83 if ((irq >= MCFINT_VECBASE) && (irq <= MCFINT_VECMAX)) {
84 u32 v;
85 irq -= MCFINT_VECBASE;
86 v = 0xd << intc_irqmap[irq].index;
87 writel(v, MCF_MBAR + intc_irqmap[irq].icr);
88 }
89}
90
91static void intc_irq_ack(unsigned int irq)
92{
93 /* Only external interrupts are acked */
94 if ((irq >= MCFINT_VECBASE) && (irq <= MCFINT_VECMAX)) {
95 irq -= MCFINT_VECBASE;
96 if (intc_irqmap[irq].ack) {
97 u32 v;
98 v = 0xd << intc_irqmap[irq].index;
99 writel(v, MCF_MBAR + intc_irqmap[irq].icr);
100 }
101 }
102}
103
104static int intc_irq_set_type(unsigned int irq, unsigned int type)
105{
106 /* We can set the edge type here for external interrupts */
107 return 0;
108}
109
110static struct irq_chip intc_irq_chip = {
111 .name = "CF-INTC",
112 .mask = intc_irq_mask,
113 .unmask = intc_irq_unmask,
114 .ack = intc_irq_ack,
115 .set_type = intc_irq_set_type,
116};
117
118void __init init_IRQ(void)
119{
120 int irq;
121
122 init_vectors();
123
124 /* Mask all interrupt sources */
125 writel(0x88888888, MCF_MBAR + MCFSIM_ICR1);
126 writel(0x88888888, MCF_MBAR + MCFSIM_ICR2);
127 writel(0x88888888, MCF_MBAR + MCFSIM_ICR3);
128 writel(0x88888888, MCF_MBAR + MCFSIM_ICR4);
129
130 for (irq = 0; (irq < NR_IRQS); irq++) {
131 irq_desc[irq].status = IRQ_DISABLED;
132 irq_desc[irq].action = NULL;
133 irq_desc[irq].depth = 1;
134 irq_desc[irq].chip = &intc_irq_chip;
135 intc_irq_set_type(irq, 0);
136 }
137}
138
diff --git a/arch/m68knommu/platform/527x/Makefile b/arch/m68knommu/platform/527x/Makefile
index 26135d92b34d..3d90e6d92459 100644
--- a/arch/m68knommu/platform/527x/Makefile
+++ b/arch/m68knommu/platform/527x/Makefile
@@ -14,5 +14,5 @@
14 14
15asflags-$(CONFIG_FULLDEBUG) := -DDEBUGGER_COMPATIBLE_CACHE=1 15asflags-$(CONFIG_FULLDEBUG) := -DDEBUGGER_COMPATIBLE_CACHE=1
16 16
17obj-y := config.o 17obj-y := config.o gpio.o
18 18
diff --git a/arch/m68knommu/platform/527x/config.c b/arch/m68knommu/platform/527x/config.c
index f746439cfd3e..fa51be172830 100644
--- a/arch/m68knommu/platform/527x/config.c
+++ b/arch/m68knommu/platform/527x/config.c
@@ -116,23 +116,13 @@ static struct platform_device *m527x_devices[] __initdata = {
116 116
117/***************************************************************************/ 117/***************************************************************************/
118 118
119#define INTC0 (MCF_MBAR + MCFICM_INTC0)
120
121static void __init m527x_uart_init_line(int line, int irq) 119static void __init m527x_uart_init_line(int line, int irq)
122{ 120{
123 u16 sepmask; 121 u16 sepmask;
124 u32 imr;
125 122
126 if ((line < 0) || (line > 2)) 123 if ((line < 0) || (line > 2))
127 return; 124 return;
128 125
129 /* level 6, line based priority */
130 writeb(0x30+line, INTC0 + MCFINTC_ICR0 + MCFINT_UART0 + line);
131
132 imr = readl(INTC0 + MCFINTC_IMRL);
133 imr &= ~((1 << (irq - MCFINT_VECBASE)) | 1);
134 writel(imr, INTC0 + MCFINTC_IMRL);
135
136 /* 126 /*
137 * External Pin Mask Setting & Enable External Pin for Interface 127 * External Pin Mask Setting & Enable External Pin for Interface
138 */ 128 */
@@ -157,32 +147,11 @@ static void __init m527x_uarts_init(void)
157 147
158/***************************************************************************/ 148/***************************************************************************/
159 149
160static void __init m527x_fec_irq_init(int nr)
161{
162 unsigned long base;
163 u32 imr;
164
165 base = MCF_IPSBAR + (nr ? MCFICM_INTC1 : MCFICM_INTC0);
166
167 writeb(0x28, base + MCFINTC_ICR0 + 23);
168 writeb(0x27, base + MCFINTC_ICR0 + 27);
169 writeb(0x26, base + MCFINTC_ICR0 + 29);
170
171 imr = readl(base + MCFINTC_IMRH);
172 imr &= ~0xf;
173 writel(imr, base + MCFINTC_IMRH);
174 imr = readl(base + MCFINTC_IMRL);
175 imr &= ~0xff800001;
176 writel(imr, base + MCFINTC_IMRL);
177}
178
179static void __init m527x_fec_init(void) 150static void __init m527x_fec_init(void)
180{ 151{
181 u16 par; 152 u16 par;
182 u8 v; 153 u8 v;
183 154
184 m527x_fec_irq_init(0);
185
186 /* Set multi-function pins to ethernet mode for fec0 */ 155 /* Set multi-function pins to ethernet mode for fec0 */
187#if defined(CONFIG_M5271) 156#if defined(CONFIG_M5271)
188 v = readb(MCF_IPSBAR + 0x100047); 157 v = readb(MCF_IPSBAR + 0x100047);
@@ -195,8 +164,6 @@ static void __init m527x_fec_init(void)
195#endif 164#endif
196 165
197#ifdef CONFIG_FEC2 166#ifdef CONFIG_FEC2
198 m527x_fec_irq_init(1);
199
200 /* Set multi-function pins to ethernet mode for fec1 */ 167 /* Set multi-function pins to ethernet mode for fec1 */
201 par = readw(MCF_IPSBAR + 0x100082); 168 par = readw(MCF_IPSBAR + 0x100082);
202 writew(par | 0xa0, MCF_IPSBAR + 0x100082); 169 writew(par | 0xa0, MCF_IPSBAR + 0x100082);
@@ -207,21 +174,6 @@ static void __init m527x_fec_init(void)
207 174
208/***************************************************************************/ 175/***************************************************************************/
209 176
210void mcf_disableall(void)
211{
212 *((volatile unsigned long *) (MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRH)) = 0xffffffff;
213 *((volatile unsigned long *) (MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRL)) = 0xffffffff;
214}
215
216/***************************************************************************/
217
218void mcf_autovector(unsigned int vec)
219{
220 /* Everything is auto-vectored on the 5272 */
221}
222
223/***************************************************************************/
224
225static void m527x_cpu_reset(void) 177static void m527x_cpu_reset(void)
226{ 178{
227 local_irq_disable(); 179 local_irq_disable();
@@ -232,7 +184,6 @@ static void m527x_cpu_reset(void)
232 184
233void __init config_BSP(char *commandp, int size) 185void __init config_BSP(char *commandp, int size)
234{ 186{
235 mcf_disableall();
236 mach_reset = m527x_cpu_reset; 187 mach_reset = m527x_cpu_reset;
237 m527x_uarts_init(); 188 m527x_uarts_init();
238 m527x_fec_init(); 189 m527x_fec_init();
diff --git a/arch/m68knommu/platform/527x/gpio.c b/arch/m68knommu/platform/527x/gpio.c
new file mode 100644
index 000000000000..1028142851ac
--- /dev/null
+++ b/arch/m68knommu/platform/527x/gpio.c
@@ -0,0 +1,607 @@
1/*
2 * Coldfire generic GPIO support
3 *
4 * (C) Copyright 2009, Steven King <sfking@fdwdc.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 as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14*/
15
16#include <linux/kernel.h>
17#include <linux/init.h>
18
19#include <asm/coldfire.h>
20#include <asm/mcfsim.h>
21#include <asm/mcfgpio.h>
22
23static struct mcf_gpio_chip mcf_gpio_chips[] = {
24#if defined(CONFIG_M5271)
25 {
26 .gpio_chip = {
27 .label = "PIRQ",
28 .request = mcf_gpio_request,
29 .free = mcf_gpio_free,
30 .direction_input = mcf_gpio_direction_input,
31 .direction_output = mcf_gpio_direction_output,
32 .get = mcf_gpio_get_value,
33 .set = mcf_gpio_set_value,
34 .ngpio = 8,
35 },
36 .pddr = MCFEPORT_EPDDR,
37 .podr = MCFEPORT_EPDR,
38 .ppdr = MCFEPORT_EPPDR,
39 },
40 {
41 .gpio_chip = {
42 .label = "ADDR",
43 .request = mcf_gpio_request,
44 .free = mcf_gpio_free,
45 .direction_input = mcf_gpio_direction_input,
46 .direction_output = mcf_gpio_direction_output,
47 .get = mcf_gpio_get_value,
48 .set = mcf_gpio_set_value_fast,
49 .base = 13,
50 .ngpio = 3,
51 },
52 .pddr = MCFGPIO_PDDR_ADDR,
53 .podr = MCFGPIO_PODR_ADDR,
54 .ppdr = MCFGPIO_PPDSDR_ADDR,
55 .setr = MCFGPIO_PPDSDR_ADDR,
56 .clrr = MCFGPIO_PCLRR_ADDR,
57 },
58 {
59 .gpio_chip = {
60 .label = "DATAH",
61 .request = mcf_gpio_request,
62 .free = mcf_gpio_free,
63 .direction_input = mcf_gpio_direction_input,
64 .direction_output = mcf_gpio_direction_output,
65 .get = mcf_gpio_get_value,
66 .set = mcf_gpio_set_value_fast,
67 .base = 16,
68 .ngpio = 8,
69 },
70 .pddr = MCFGPIO_PDDR_DATAH,
71 .podr = MCFGPIO_PODR_DATAH,
72 .ppdr = MCFGPIO_PPDSDR_DATAH,
73 .setr = MCFGPIO_PPDSDR_DATAH,
74 .clrr = MCFGPIO_PCLRR_DATAH,
75 },
76 {
77 .gpio_chip = {
78 .label = "DATAL",
79 .request = mcf_gpio_request,
80 .free = mcf_gpio_free,
81 .direction_input = mcf_gpio_direction_input,
82 .direction_output = mcf_gpio_direction_output,
83 .get = mcf_gpio_get_value,
84 .set = mcf_gpio_set_value_fast,
85 .base = 24,
86 .ngpio = 8,
87 },
88 .pddr = MCFGPIO_PDDR_DATAL,
89 .podr = MCFGPIO_PODR_DATAL,
90 .ppdr = MCFGPIO_PPDSDR_DATAL,
91 .setr = MCFGPIO_PPDSDR_DATAL,
92 .clrr = MCFGPIO_PCLRR_DATAL,
93 },
94 {
95 .gpio_chip = {
96 .label = "BUSCTL",
97 .request = mcf_gpio_request,
98 .free = mcf_gpio_free,
99 .direction_input = mcf_gpio_direction_input,
100 .direction_output = mcf_gpio_direction_output,
101 .get = mcf_gpio_get_value,
102 .set = mcf_gpio_set_value_fast,
103 .base = 32,
104 .ngpio = 8,
105 },
106 .pddr = MCFGPIO_PDDR_BUSCTL,
107 .podr = MCFGPIO_PODR_BUSCTL,
108 .ppdr = MCFGPIO_PPDSDR_BUSCTL,
109 .setr = MCFGPIO_PPDSDR_BUSCTL,
110 .clrr = MCFGPIO_PCLRR_BUSCTL,
111 },
112 {
113 .gpio_chip = {
114 .label = "BS",
115 .request = mcf_gpio_request,
116 .free = mcf_gpio_free,
117 .direction_input = mcf_gpio_direction_input,
118 .direction_output = mcf_gpio_direction_output,
119 .get = mcf_gpio_get_value,
120 .set = mcf_gpio_set_value_fast,
121 .base = 40,
122 .ngpio = 4,
123 },
124 .pddr = MCFGPIO_PDDR_BS,
125 .podr = MCFGPIO_PODR_BS,
126 .ppdr = MCFGPIO_PPDSDR_BS,
127 .setr = MCFGPIO_PPDSDR_BS,
128 .clrr = MCFGPIO_PCLRR_BS,
129 },
130 {
131 .gpio_chip = {
132 .label = "CS",
133 .request = mcf_gpio_request,
134 .free = mcf_gpio_free,
135 .direction_input = mcf_gpio_direction_input,
136 .direction_output = mcf_gpio_direction_output,
137 .get = mcf_gpio_get_value,
138 .set = mcf_gpio_set_value_fast,
139 .base = 49,
140 .ngpio = 7,
141 },
142 .pddr = MCFGPIO_PDDR_CS,
143 .podr = MCFGPIO_PODR_CS,
144 .ppdr = MCFGPIO_PPDSDR_CS,
145 .setr = MCFGPIO_PPDSDR_CS,
146 .clrr = MCFGPIO_PCLRR_CS,
147 },
148 {
149 .gpio_chip = {
150 .label = "SDRAM",
151 .request = mcf_gpio_request,
152 .free = mcf_gpio_free,
153 .direction_input = mcf_gpio_direction_input,
154 .direction_output = mcf_gpio_direction_output,
155 .get = mcf_gpio_get_value,
156 .set = mcf_gpio_set_value_fast,
157 .base = 56,
158 .ngpio = 6,
159 },
160 .pddr = MCFGPIO_PDDR_SDRAM,
161 .podr = MCFGPIO_PODR_SDRAM,
162 .ppdr = MCFGPIO_PPDSDR_SDRAM,
163 .setr = MCFGPIO_PPDSDR_SDRAM,
164 .clrr = MCFGPIO_PCLRR_SDRAM,
165 },
166 {
167 .gpio_chip = {
168 .label = "FECI2C",
169 .request = mcf_gpio_request,
170 .free = mcf_gpio_free,
171 .direction_input = mcf_gpio_direction_input,
172 .direction_output = mcf_gpio_direction_output,
173 .get = mcf_gpio_get_value,
174 .set = mcf_gpio_set_value_fast,
175 .base = 64,
176 .ngpio = 4,
177 },
178 .pddr = MCFGPIO_PDDR_FECI2C,
179 .podr = MCFGPIO_PODR_FECI2C,
180 .ppdr = MCFGPIO_PPDSDR_FECI2C,
181 .setr = MCFGPIO_PPDSDR_FECI2C,
182 .clrr = MCFGPIO_PCLRR_FECI2C,
183 },
184 {
185 .gpio_chip = {
186 .label = "UARTH",
187 .request = mcf_gpio_request,
188 .free = mcf_gpio_free,
189 .direction_input = mcf_gpio_direction_input,
190 .direction_output = mcf_gpio_direction_output,
191 .get = mcf_gpio_get_value,
192 .set = mcf_gpio_set_value_fast,
193 .base = 72,
194 .ngpio = 2,
195 },
196 .pddr = MCFGPIO_PDDR_UARTH,
197 .podr = MCFGPIO_PODR_UARTH,
198 .ppdr = MCFGPIO_PPDSDR_UARTH,
199 .setr = MCFGPIO_PPDSDR_UARTH,
200 .clrr = MCFGPIO_PCLRR_UARTH,
201 },
202 {
203 .gpio_chip = {
204 .label = "UARTL",
205 .request = mcf_gpio_request,
206 .free = mcf_gpio_free,
207 .direction_input = mcf_gpio_direction_input,
208 .direction_output = mcf_gpio_direction_output,
209 .get = mcf_gpio_get_value,
210 .set = mcf_gpio_set_value_fast,
211 .base = 80,
212 .ngpio = 8,
213 },
214 .pddr = MCFGPIO_PDDR_UARTL,
215 .podr = MCFGPIO_PODR_UARTL,
216 .ppdr = MCFGPIO_PPDSDR_UARTL,
217 .setr = MCFGPIO_PPDSDR_UARTL,
218 .clrr = MCFGPIO_PCLRR_UARTL,
219 },
220 {
221 .gpio_chip = {
222 .label = "QSPI",
223 .request = mcf_gpio_request,
224 .free = mcf_gpio_free,
225 .direction_input = mcf_gpio_direction_input,
226 .direction_output = mcf_gpio_direction_output,
227 .get = mcf_gpio_get_value,
228 .set = mcf_gpio_set_value_fast,
229 .base = 88,
230 .ngpio = 5,
231 },
232 .pddr = MCFGPIO_PDDR_QSPI,
233 .podr = MCFGPIO_PODR_QSPI,
234 .ppdr = MCFGPIO_PPDSDR_QSPI,
235 .setr = MCFGPIO_PPDSDR_QSPI,
236 .clrr = MCFGPIO_PCLRR_QSPI,
237 },
238 {
239 .gpio_chip = {
240 .label = "TIMER",
241 .request = mcf_gpio_request,
242 .free = mcf_gpio_free,
243 .direction_input = mcf_gpio_direction_input,
244 .direction_output = mcf_gpio_direction_output,
245 .get = mcf_gpio_get_value,
246 .set = mcf_gpio_set_value_fast,
247 .base = 96,
248 .ngpio = 8,
249 },
250 .pddr = MCFGPIO_PDDR_TIMER,
251 .podr = MCFGPIO_PODR_TIMER,
252 .ppdr = MCFGPIO_PPDSDR_TIMER,
253 .setr = MCFGPIO_PPDSDR_TIMER,
254 .clrr = MCFGPIO_PCLRR_TIMER,
255 },
256#elif defined(CONFIG_M5275)
257 {
258 .gpio_chip = {
259 .label = "PIRQ",
260 .request = mcf_gpio_request,
261 .free = mcf_gpio_free,
262 .direction_input = mcf_gpio_direction_input,
263 .direction_output = mcf_gpio_direction_output,
264 .get = mcf_gpio_get_value,
265 .set = mcf_gpio_set_value,
266 .ngpio = 8,
267 },
268 .pddr = MCFEPORT_EPDDR,
269 .podr = MCFEPORT_EPDR,
270 .ppdr = MCFEPORT_EPPDR,
271 },
272 {
273 .gpio_chip = {
274 .label = "BUSCTL",
275 .request = mcf_gpio_request,
276 .free = mcf_gpio_free,
277 .direction_input = mcf_gpio_direction_input,
278 .direction_output = mcf_gpio_direction_output,
279 .get = mcf_gpio_get_value,
280 .set = mcf_gpio_set_value_fast,
281 .base = 8,
282 .ngpio = 8,
283 },
284 .pddr = MCFGPIO_PDDR_BUSCTL,
285 .podr = MCFGPIO_PODR_BUSCTL,
286 .ppdr = MCFGPIO_PPDSDR_BUSCTL,
287 .setr = MCFGPIO_PPDSDR_BUSCTL,
288 .clrr = MCFGPIO_PCLRR_BUSCTL,
289 },
290 {
291 .gpio_chip = {
292 .label = "ADDR",
293 .request = mcf_gpio_request,
294 .free = mcf_gpio_free,
295 .direction_input = mcf_gpio_direction_input,
296 .direction_output = mcf_gpio_direction_output,
297 .get = mcf_gpio_get_value,
298 .set = mcf_gpio_set_value_fast,
299 .base = 21,
300 .ngpio = 3,
301 },
302 .pddr = MCFGPIO_PDDR_ADDR,
303 .podr = MCFGPIO_PODR_ADDR,
304 .ppdr = MCFGPIO_PPDSDR_ADDR,
305 .setr = MCFGPIO_PPDSDR_ADDR,
306 .clrr = MCFGPIO_PCLRR_ADDR,
307 },
308 {
309 .gpio_chip = {
310 .label = "CS",
311 .request = mcf_gpio_request,
312 .free = mcf_gpio_free,
313 .direction_input = mcf_gpio_direction_input,
314 .direction_output = mcf_gpio_direction_output,
315 .get = mcf_gpio_get_value,
316 .set = mcf_gpio_set_value_fast,
317 .base = 25,
318 .ngpio = 7,
319 },
320 .pddr = MCFGPIO_PDDR_CS,
321 .podr = MCFGPIO_PODR_CS,
322 .ppdr = MCFGPIO_PPDSDR_CS,
323 .setr = MCFGPIO_PPDSDR_CS,
324 .clrr = MCFGPIO_PCLRR_CS,
325 },
326 {
327 .gpio_chip = {
328 .label = "FEC0H",
329 .request = mcf_gpio_request,
330 .free = mcf_gpio_free,
331 .direction_input = mcf_gpio_direction_input,
332 .direction_output = mcf_gpio_direction_output,
333 .get = mcf_gpio_get_value,
334 .set = mcf_gpio_set_value_fast,
335 .base = 32,
336 .ngpio = 8,
337 },
338 .pddr = MCFGPIO_PDDR_FEC0H,
339 .podr = MCFGPIO_PODR_FEC0H,
340 .ppdr = MCFGPIO_PPDSDR_FEC0H,
341 .setr = MCFGPIO_PPDSDR_FEC0H,
342 .clrr = MCFGPIO_PCLRR_FEC0H,
343 },
344 {
345 .gpio_chip = {
346 .label = "FEC0L",
347 .request = mcf_gpio_request,
348 .free = mcf_gpio_free,
349 .direction_input = mcf_gpio_direction_input,
350 .direction_output = mcf_gpio_direction_output,
351 .get = mcf_gpio_get_value,
352 .set = mcf_gpio_set_value_fast,
353 .base = 40,
354 .ngpio = 8,
355 },
356 .pddr = MCFGPIO_PDDR_FEC0L,
357 .podr = MCFGPIO_PODR_FEC0L,
358 .ppdr = MCFGPIO_PPDSDR_FEC0L,
359 .setr = MCFGPIO_PPDSDR_FEC0L,
360 .clrr = MCFGPIO_PCLRR_FEC0L,
361 },
362 {
363 .gpio_chip = {
364 .label = "FECI2C",
365 .request = mcf_gpio_request,
366 .free = mcf_gpio_free,
367 .direction_input = mcf_gpio_direction_input,
368 .direction_output = mcf_gpio_direction_output,
369 .get = mcf_gpio_get_value,
370 .set = mcf_gpio_set_value_fast,
371 .base = 48,
372 .ngpio = 6,
373 },
374 .pddr = MCFGPIO_PDDR_FECI2C,
375 .podr = MCFGPIO_PODR_FECI2C,
376 .ppdr = MCFGPIO_PPDSDR_FECI2C,
377 .setr = MCFGPIO_PPDSDR_FECI2C,
378 .clrr = MCFGPIO_PCLRR_FECI2C,
379 },
380 {
381 .gpio_chip = {
382 .label = "QSPI",
383 .request = mcf_gpio_request,
384 .free = mcf_gpio_free,
385 .direction_input = mcf_gpio_direction_input,
386 .direction_output = mcf_gpio_direction_output,
387 .get = mcf_gpio_get_value,
388 .set = mcf_gpio_set_value_fast,
389 .base = 56,
390 .ngpio = 7,
391 },
392 .pddr = MCFGPIO_PDDR_QSPI,
393 .podr = MCFGPIO_PODR_QSPI,
394 .ppdr = MCFGPIO_PPDSDR_QSPI,
395 .setr = MCFGPIO_PPDSDR_QSPI,
396 .clrr = MCFGPIO_PCLRR_QSPI,
397 },
398 {
399 .gpio_chip = {
400 .label = "SDRAM",
401 .request = mcf_gpio_request,
402 .free = mcf_gpio_free,
403 .direction_input = mcf_gpio_direction_input,
404 .direction_output = mcf_gpio_direction_output,
405 .get = mcf_gpio_get_value,
406 .set = mcf_gpio_set_value_fast,
407 .base = 64,
408 .ngpio = 8,
409 },
410 .pddr = MCFGPIO_PDDR_SDRAM,
411 .podr = MCFGPIO_PODR_SDRAM,
412 .ppdr = MCFGPIO_PPDSDR_SDRAM,
413 .setr = MCFGPIO_PPDSDR_SDRAM,
414 .clrr = MCFGPIO_PCLRR_SDRAM,
415 },
416 {
417 .gpio_chip = {
418 .label = "TIMERH",
419 .request = mcf_gpio_request,
420 .free = mcf_gpio_free,
421 .direction_input = mcf_gpio_direction_input,
422 .direction_output = mcf_gpio_direction_output,
423 .get = mcf_gpio_get_value,
424 .set = mcf_gpio_set_value_fast,
425 .base = 72,
426 .ngpio = 4,
427 },
428 .pddr = MCFGPIO_PDDR_TIMERH,
429 .podr = MCFGPIO_PODR_TIMERH,
430 .ppdr = MCFGPIO_PPDSDR_TIMERH,
431 .setr = MCFGPIO_PPDSDR_TIMERH,
432 .clrr = MCFGPIO_PCLRR_TIMERH,
433 },
434 {
435 .gpio_chip = {
436 .label = "TIMERL",
437 .request = mcf_gpio_request,
438 .free = mcf_gpio_free,
439 .direction_input = mcf_gpio_direction_input,
440 .direction_output = mcf_gpio_direction_output,
441 .get = mcf_gpio_get_value,
442 .set = mcf_gpio_set_value_fast,
443 .base = 80,
444 .ngpio = 4,
445 },
446 .pddr = MCFGPIO_PDDR_TIMERL,
447 .podr = MCFGPIO_PODR_TIMERL,
448 .ppdr = MCFGPIO_PPDSDR_TIMERL,
449 .setr = MCFGPIO_PPDSDR_TIMERL,
450 .clrr = MCFGPIO_PCLRR_TIMERL,
451 },
452 {
453 .gpio_chip = {
454 .label = "UARTL",
455 .request = mcf_gpio_request,
456 .free = mcf_gpio_free,
457 .direction_input = mcf_gpio_direction_input,
458 .direction_output = mcf_gpio_direction_output,
459 .get = mcf_gpio_get_value,
460 .set = mcf_gpio_set_value_fast,
461 .base = 88,
462 .ngpio = 8,
463 },
464 .pddr = MCFGPIO_PDDR_UARTL,
465 .podr = MCFGPIO_PODR_UARTL,
466 .ppdr = MCFGPIO_PPDSDR_UARTL,
467 .setr = MCFGPIO_PPDSDR_UARTL,
468 .clrr = MCFGPIO_PCLRR_UARTL,
469 },
470 {
471 .gpio_chip = {
472 .label = "FEC1H",
473 .request = mcf_gpio_request,
474 .free = mcf_gpio_free,
475 .direction_input = mcf_gpio_direction_input,
476 .direction_output = mcf_gpio_direction_output,
477 .get = mcf_gpio_get_value,
478 .set = mcf_gpio_set_value_fast,
479 .base = 96,
480 .ngpio = 8,
481 },
482 .pddr = MCFGPIO_PDDR_FEC1H,
483 .podr = MCFGPIO_PODR_FEC1H,
484 .ppdr = MCFGPIO_PPDSDR_FEC1H,
485 .setr = MCFGPIO_PPDSDR_FEC1H,
486 .clrr = MCFGPIO_PCLRR_FEC1H,
487 },
488 {
489 .gpio_chip = {
490 .label = "FEC1L",
491 .request = mcf_gpio_request,
492 .free = mcf_gpio_free,
493 .direction_input = mcf_gpio_direction_input,
494 .direction_output = mcf_gpio_direction_output,
495 .get = mcf_gpio_get_value,
496 .set = mcf_gpio_set_value_fast,
497 .base = 104,
498 .ngpio = 8,
499 },
500 .pddr = MCFGPIO_PDDR_FEC1L,
501 .podr = MCFGPIO_PODR_FEC1L,
502 .ppdr = MCFGPIO_PPDSDR_FEC1L,
503 .setr = MCFGPIO_PPDSDR_FEC1L,
504 .clrr = MCFGPIO_PCLRR_FEC1L,
505 },
506 {
507 .gpio_chip = {
508 .label = "BS",
509 .request = mcf_gpio_request,
510 .free = mcf_gpio_free,
511 .direction_input = mcf_gpio_direction_input,
512 .direction_output = mcf_gpio_direction_output,
513 .get = mcf_gpio_get_value,
514 .set = mcf_gpio_set_value_fast,
515 .base = 114,
516 .ngpio = 2,
517 },
518 .pddr = MCFGPIO_PDDR_BS,
519 .podr = MCFGPIO_PODR_BS,
520 .ppdr = MCFGPIO_PPDSDR_BS,
521 .setr = MCFGPIO_PPDSDR_BS,
522 .clrr = MCFGPIO_PCLRR_BS,
523 },
524 {
525 .gpio_chip = {
526 .label = "IRQ",
527 .request = mcf_gpio_request,
528 .free = mcf_gpio_free,
529 .direction_input = mcf_gpio_direction_input,
530 .direction_output = mcf_gpio_direction_output,
531 .get = mcf_gpio_get_value,
532 .set = mcf_gpio_set_value_fast,
533 .base = 121,
534 .ngpio = 7,
535 },
536 .pddr = MCFGPIO_PDDR_IRQ,
537 .podr = MCFGPIO_PODR_IRQ,
538 .ppdr = MCFGPIO_PPDSDR_IRQ,
539 .setr = MCFGPIO_PPDSDR_IRQ,
540 .clrr = MCFGPIO_PCLRR_IRQ,
541 },
542 {
543 .gpio_chip = {
544 .label = "USBH",
545 .request = mcf_gpio_request,
546 .free = mcf_gpio_free,
547 .direction_input = mcf_gpio_direction_input,
548 .direction_output = mcf_gpio_direction_output,
549 .get = mcf_gpio_get_value,
550 .set = mcf_gpio_set_value_fast,
551 .base = 128,
552 .ngpio = 1,
553 },
554 .pddr = MCFGPIO_PDDR_USBH,
555 .podr = MCFGPIO_PODR_USBH,
556 .ppdr = MCFGPIO_PPDSDR_USBH,
557 .setr = MCFGPIO_PPDSDR_USBH,
558 .clrr = MCFGPIO_PCLRR_USBH,
559 },
560 {
561 .gpio_chip = {
562 .label = "USBL",
563 .request = mcf_gpio_request,
564 .free = mcf_gpio_free,
565 .direction_input = mcf_gpio_direction_input,
566 .direction_output = mcf_gpio_direction_output,
567 .get = mcf_gpio_get_value,
568 .set = mcf_gpio_set_value_fast,
569 .base = 136,
570 .ngpio = 8,
571 },
572 .pddr = MCFGPIO_PDDR_USBL,
573 .podr = MCFGPIO_PODR_USBL,
574 .ppdr = MCFGPIO_PPDSDR_USBL,
575 .setr = MCFGPIO_PPDSDR_USBL,
576 .clrr = MCFGPIO_PCLRR_USBL,
577 },
578 {
579 .gpio_chip = {
580 .label = "UARTH",
581 .request = mcf_gpio_request,
582 .free = mcf_gpio_free,
583 .direction_input = mcf_gpio_direction_input,
584 .direction_output = mcf_gpio_direction_output,
585 .get = mcf_gpio_get_value,
586 .set = mcf_gpio_set_value_fast,
587 .base = 144,
588 .ngpio = 4,
589 },
590 .pddr = MCFGPIO_PDDR_UARTH,
591 .podr = MCFGPIO_PODR_UARTH,
592 .ppdr = MCFGPIO_PPDSDR_UARTH,
593 .setr = MCFGPIO_PPDSDR_UARTH,
594 .clrr = MCFGPIO_PCLRR_UARTH,
595 },
596#endif
597};
598
599static int __init mcf_gpio_init(void)
600{
601 unsigned i = 0;
602 while (i < ARRAY_SIZE(mcf_gpio_chips))
603 (void)gpiochip_add((struct gpio_chip *)&mcf_gpio_chips[i++]);
604 return 0;
605}
606
607core_initcall(mcf_gpio_init);
diff --git a/arch/m68knommu/platform/528x/Makefile b/arch/m68knommu/platform/528x/Makefile
index 26135d92b34d..3d90e6d92459 100644
--- a/arch/m68knommu/platform/528x/Makefile
+++ b/arch/m68knommu/platform/528x/Makefile
@@ -14,5 +14,5 @@
14 14
15asflags-$(CONFIG_FULLDEBUG) := -DDEBUGGER_COMPATIBLE_CACHE=1 15asflags-$(CONFIG_FULLDEBUG) := -DDEBUGGER_COMPATIBLE_CACHE=1
16 16
17obj-y := config.o 17obj-y := config.o gpio.o
18 18
diff --git a/arch/m68knommu/platform/528x/config.c b/arch/m68knommu/platform/528x/config.c
index a1d1a61c4fe6..6e608d1836f1 100644
--- a/arch/m68knommu/platform/528x/config.c
+++ b/arch/m68knommu/platform/528x/config.c
@@ -3,8 +3,8 @@
3/* 3/*
4 * linux/arch/m68knommu/platform/528x/config.c 4 * linux/arch/m68knommu/platform/528x/config.c
5 * 5 *
6 * Sub-architcture dependant initialization code for the Motorola 6 * Sub-architcture dependant initialization code for the Freescale
7 * 5280 and 5282 CPUs. 7 * 5280, 5281 and 5282 CPUs.
8 * 8 *
9 * Copyright (C) 1999-2003, Greg Ungerer (gerg@snapgear.com) 9 * Copyright (C) 1999-2003, Greg Ungerer (gerg@snapgear.com)
10 * Copyright (C) 2001-2003, SnapGear Inc. (www.snapgear.com) 10 * Copyright (C) 2001-2003, SnapGear Inc. (www.snapgear.com)
@@ -15,20 +15,13 @@
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/param.h> 16#include <linux/param.h>
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/interrupt.h>
19#include <linux/platform_device.h> 18#include <linux/platform_device.h>
20#include <linux/spi/spi.h>
21#include <linux/spi/flash.h>
22#include <linux/io.h> 19#include <linux/io.h>
23#include <asm/machdep.h> 20#include <asm/machdep.h>
24#include <asm/coldfire.h> 21#include <asm/coldfire.h>
25#include <asm/mcfsim.h> 22#include <asm/mcfsim.h>
26#include <asm/mcfuart.h> 23#include <asm/mcfuart.h>
27 24
28#ifdef CONFIG_MTD_PARTITIONS
29#include <linux/mtd/partitions.h>
30#endif
31
32/***************************************************************************/ 25/***************************************************************************/
33 26
34static struct mcf_platform_uart m528x_uart_platform[] = { 27static struct mcf_platform_uart m528x_uart_platform[] = {
@@ -91,23 +84,13 @@ static struct platform_device *m528x_devices[] __initdata = {
91 84
92/***************************************************************************/ 85/***************************************************************************/
93 86
94#define INTC0 (MCF_MBAR + MCFICM_INTC0)
95
96static void __init m528x_uart_init_line(int line, int irq) 87static void __init m528x_uart_init_line(int line, int irq)
97{ 88{
98 u8 port; 89 u8 port;
99 u32 imr;
100 90
101 if ((line < 0) || (line > 2)) 91 if ((line < 0) || (line > 2))
102 return; 92 return;
103 93
104 /* level 6, line based priority */
105 writeb(0x30+line, INTC0 + MCFINTC_ICR0 + MCFINT_UART0 + line);
106
107 imr = readl(INTC0 + MCFINTC_IMRL);
108 imr &= ~((1 << (irq - MCFINT_VECBASE)) | 1);
109 writel(imr, INTC0 + MCFINTC_IMRL);
110
111 /* make sure PUAPAR is set for UART0 and UART1 */ 94 /* make sure PUAPAR is set for UART0 and UART1 */
112 if (line < 2) { 95 if (line < 2) {
113 port = readb(MCF_MBAR + MCF5282_GPIO_PUAPAR); 96 port = readb(MCF_MBAR + MCF5282_GPIO_PUAPAR);
@@ -129,21 +112,8 @@ static void __init m528x_uarts_init(void)
129 112
130static void __init m528x_fec_init(void) 113static void __init m528x_fec_init(void)
131{ 114{
132 u32 imr;
133 u16 v16; 115 u16 v16;
134 116
135 /* Unmask FEC interrupts at ColdFire interrupt controller */
136 writeb(0x28, MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_ICR0 + 23);
137 writeb(0x27, MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_ICR0 + 27);
138 writeb(0x26, MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_ICR0 + 29);
139
140 imr = readl(MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRH);
141 imr &= ~0xf;
142 writel(imr, MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRH);
143 imr = readl(MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRL);
144 imr &= ~0xff800001;
145 writel(imr, MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRL);
146
147 /* Set multi-function pins to ethernet mode for fec0 */ 117 /* Set multi-function pins to ethernet mode for fec0 */
148 v16 = readw(MCF_IPSBAR + 0x100056); 118 v16 = readw(MCF_IPSBAR + 0x100056);
149 writew(v16 | 0xf00, MCF_IPSBAR + 0x100056); 119 writew(v16 | 0xf00, MCF_IPSBAR + 0x100056);
@@ -152,21 +122,6 @@ static void __init m528x_fec_init(void)
152 122
153/***************************************************************************/ 123/***************************************************************************/
154 124
155void mcf_disableall(void)
156{
157 *((volatile unsigned long *) (MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRH)) = 0xffffffff;
158 *((volatile unsigned long *) (MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRL)) = 0xffffffff;
159}
160
161/***************************************************************************/
162
163void mcf_autovector(unsigned int vec)
164{
165 /* Everything is auto-vectored on the 5272 */
166}
167
168/***************************************************************************/
169
170static void m528x_cpu_reset(void) 125static void m528x_cpu_reset(void)
171{ 126{
172 local_irq_disable(); 127 local_irq_disable();
@@ -204,8 +159,6 @@ void wildfiremod_halt(void)
204 159
205void __init config_BSP(char *commandp, int size) 160void __init config_BSP(char *commandp, int size)
206{ 161{
207 mcf_disableall();
208
209#ifdef CONFIG_WILDFIRE 162#ifdef CONFIG_WILDFIRE
210 mach_halt = wildfire_halt; 163 mach_halt = wildfire_halt;
211#endif 164#endif
diff --git a/arch/m68knommu/platform/528x/gpio.c b/arch/m68knommu/platform/528x/gpio.c
new file mode 100644
index 000000000000..ec593950696a
--- /dev/null
+++ b/arch/m68knommu/platform/528x/gpio.c
@@ -0,0 +1,438 @@
1/*
2 * Coldfire generic GPIO support
3 *
4 * (C) Copyright 2009, Steven King <sfking@fdwdc.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 as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14*/
15
16#include <linux/kernel.h>
17#include <linux/init.h>
18
19#include <asm/coldfire.h>
20#include <asm/mcfsim.h>
21#include <asm/mcfgpio.h>
22
23static struct mcf_gpio_chip mcf_gpio_chips[] = {
24 {
25 .gpio_chip = {
26 .label = "NQ",
27 .request = mcf_gpio_request,
28 .free = mcf_gpio_free,
29 .direction_input = mcf_gpio_direction_input,
30 .direction_output = mcf_gpio_direction_output,
31 .get = mcf_gpio_get_value,
32 .set = mcf_gpio_set_value,
33 .base = 1,
34 .ngpio = 8,
35 },
36 .pddr = MCFEPORT_EPDDR,
37 .podr = MCFEPORT_EPDR,
38 .ppdr = MCFEPORT_EPPDR,
39 },
40 {
41 .gpio_chip = {
42 .label = "TA",
43 .request = mcf_gpio_request,
44 .free = mcf_gpio_free,
45 .direction_input = mcf_gpio_direction_input,
46 .direction_output = mcf_gpio_direction_output,
47 .get = mcf_gpio_get_value,
48 .set = mcf_gpio_set_value_fast,
49 .base = 8,
50 .ngpio = 4,
51 },
52 .pddr = MCFGPTA_GPTDDR,
53 .podr = MCFGPTA_GPTPORT,
54 .ppdr = MCFGPTB_GPTPORT,
55 },
56 {
57 .gpio_chip = {
58 .label = "TB",
59 .request = mcf_gpio_request,
60 .free = mcf_gpio_free,
61 .direction_input = mcf_gpio_direction_input,
62 .direction_output = mcf_gpio_direction_output,
63 .get = mcf_gpio_get_value,
64 .set = mcf_gpio_set_value_fast,
65 .base = 16,
66 .ngpio = 4,
67 },
68 .pddr = MCFGPTB_GPTDDR,
69 .podr = MCFGPTB_GPTPORT,
70 .ppdr = MCFGPTB_GPTPORT,
71 },
72 {
73 .gpio_chip = {
74 .label = "QA",
75 .request = mcf_gpio_request,
76 .free = mcf_gpio_free,
77 .direction_input = mcf_gpio_direction_input,
78 .direction_output = mcf_gpio_direction_output,
79 .get = mcf_gpio_get_value,
80 .set = mcf_gpio_set_value_fast,
81 .base = 24,
82 .ngpio = 4,
83 },
84 .pddr = MCFQADC_DDRQA,
85 .podr = MCFQADC_PORTQA,
86 .ppdr = MCFQADC_PORTQA,
87 },
88 {
89 .gpio_chip = {
90 .label = "QB",
91 .request = mcf_gpio_request,
92 .free = mcf_gpio_free,
93 .direction_input = mcf_gpio_direction_input,
94 .direction_output = mcf_gpio_direction_output,
95 .get = mcf_gpio_get_value,
96 .set = mcf_gpio_set_value_fast,
97 .base = 32,
98 .ngpio = 4,
99 },
100 .pddr = MCFQADC_DDRQB,
101 .podr = MCFQADC_PORTQB,
102 .ppdr = MCFQADC_PORTQB,
103 },
104 {
105 .gpio_chip = {
106 .label = "A",
107 .request = mcf_gpio_request,
108 .free = mcf_gpio_free,
109 .direction_input = mcf_gpio_direction_input,
110 .direction_output = mcf_gpio_direction_output,
111 .get = mcf_gpio_get_value,
112 .set = mcf_gpio_set_value_fast,
113 .base = 40,
114 .ngpio = 8,
115 },
116 .pddr = MCFGPIO_DDRA,
117 .podr = MCFGPIO_PORTA,
118 .ppdr = MCFGPIO_PORTAP,
119 .setr = MCFGPIO_SETA,
120 .clrr = MCFGPIO_CLRA,
121 },
122 {
123 .gpio_chip = {
124 .label = "B",
125 .request = mcf_gpio_request,
126 .free = mcf_gpio_free,
127 .direction_input = mcf_gpio_direction_input,
128 .direction_output = mcf_gpio_direction_output,
129 .get = mcf_gpio_get_value,
130 .set = mcf_gpio_set_value_fast,
131 .base = 48,
132 .ngpio = 8,
133 },
134 .pddr = MCFGPIO_DDRB,
135 .podr = MCFGPIO_PORTB,
136 .ppdr = MCFGPIO_PORTBP,
137 .setr = MCFGPIO_SETB,
138 .clrr = MCFGPIO_CLRB,
139 },
140 {
141 .gpio_chip = {
142 .label = "C",
143 .request = mcf_gpio_request,
144 .free = mcf_gpio_free,
145 .direction_input = mcf_gpio_direction_input,
146 .direction_output = mcf_gpio_direction_output,
147 .get = mcf_gpio_get_value,
148 .set = mcf_gpio_set_value_fast,
149 .base = 56,
150 .ngpio = 8,
151 },
152 .pddr = MCFGPIO_DDRC,
153 .podr = MCFGPIO_PORTC,
154 .ppdr = MCFGPIO_PORTCP,
155 .setr = MCFGPIO_SETC,
156 .clrr = MCFGPIO_CLRC,
157 },
158 {
159 .gpio_chip = {
160 .label = "D",
161 .request = mcf_gpio_request,
162 .free = mcf_gpio_free,
163 .direction_input = mcf_gpio_direction_input,
164 .direction_output = mcf_gpio_direction_output,
165 .get = mcf_gpio_get_value,
166 .set = mcf_gpio_set_value_fast,
167 .base = 64,
168 .ngpio = 8,
169 },
170 .pddr = MCFGPIO_DDRD,
171 .podr = MCFGPIO_PORTD,
172 .ppdr = MCFGPIO_PORTDP,
173 .setr = MCFGPIO_SETD,
174 .clrr = MCFGPIO_CLRD,
175 },
176 {
177 .gpio_chip = {
178 .label = "E",
179 .request = mcf_gpio_request,
180 .free = mcf_gpio_free,
181 .direction_input = mcf_gpio_direction_input,
182 .direction_output = mcf_gpio_direction_output,
183 .get = mcf_gpio_get_value,
184 .set = mcf_gpio_set_value_fast,
185 .base = 72,
186 .ngpio = 8,
187 },
188 .pddr = MCFGPIO_DDRE,
189 .podr = MCFGPIO_PORTE,
190 .ppdr = MCFGPIO_PORTEP,
191 .setr = MCFGPIO_SETE,
192 .clrr = MCFGPIO_CLRE,
193 },
194 {
195 .gpio_chip = {
196 .label = "F",
197 .request = mcf_gpio_request,
198 .free = mcf_gpio_free,
199 .direction_input = mcf_gpio_direction_input,
200 .direction_output = mcf_gpio_direction_output,
201 .get = mcf_gpio_get_value,
202 .set = mcf_gpio_set_value_fast,
203 .base = 80,
204 .ngpio = 8,
205 },
206 .pddr = MCFGPIO_DDRF,
207 .podr = MCFGPIO_PORTF,
208 .ppdr = MCFGPIO_PORTFP,
209 .setr = MCFGPIO_SETF,
210 .clrr = MCFGPIO_CLRF,
211 },
212 {
213 .gpio_chip = {
214 .label = "G",
215 .request = mcf_gpio_request,
216 .free = mcf_gpio_free,
217 .direction_input = mcf_gpio_direction_input,
218 .direction_output = mcf_gpio_direction_output,
219 .get = mcf_gpio_get_value,
220 .set = mcf_gpio_set_value_fast,
221 .base = 88,
222 .ngpio = 8,
223 },
224 .pddr = MCFGPIO_DDRG,
225 .podr = MCFGPIO_PORTG,
226 .ppdr = MCFGPIO_PORTGP,
227 .setr = MCFGPIO_SETG,
228 .clrr = MCFGPIO_CLRG,
229 },
230 {
231 .gpio_chip = {
232 .label = "H",
233 .request = mcf_gpio_request,
234 .free = mcf_gpio_free,
235 .direction_input = mcf_gpio_direction_input,
236 .direction_output = mcf_gpio_direction_output,
237 .get = mcf_gpio_get_value,
238 .set = mcf_gpio_set_value_fast,
239 .base = 96,
240 .ngpio = 8,
241 },
242 .pddr = MCFGPIO_DDRH,
243 .podr = MCFGPIO_PORTH,
244 .ppdr = MCFGPIO_PORTHP,
245 .setr = MCFGPIO_SETH,
246 .clrr = MCFGPIO_CLRH,
247 },
248 {
249 .gpio_chip = {
250 .label = "J",
251 .request = mcf_gpio_request,
252 .free = mcf_gpio_free,
253 .direction_input = mcf_gpio_direction_input,
254 .direction_output = mcf_gpio_direction_output,
255 .get = mcf_gpio_get_value,
256 .set = mcf_gpio_set_value_fast,
257 .base = 104,
258 .ngpio = 8,
259 },
260 .pddr = MCFGPIO_DDRJ,
261 .podr = MCFGPIO_PORTJ,
262 .ppdr = MCFGPIO_PORTJP,
263 .setr = MCFGPIO_SETJ,
264 .clrr = MCFGPIO_CLRJ,
265 },
266 {
267 .gpio_chip = {
268 .label = "DD",
269 .request = mcf_gpio_request,
270 .free = mcf_gpio_free,
271 .direction_input = mcf_gpio_direction_input,
272 .direction_output = mcf_gpio_direction_output,
273 .get = mcf_gpio_get_value,
274 .set = mcf_gpio_set_value_fast,
275 .base = 112,
276 .ngpio = 8,
277 },
278 .pddr = MCFGPIO_DDRDD,
279 .podr = MCFGPIO_PORTDD,
280 .ppdr = MCFGPIO_PORTDDP,
281 .setr = MCFGPIO_SETDD,
282 .clrr = MCFGPIO_CLRDD,
283 },
284 {
285 .gpio_chip = {
286 .label = "EH",
287 .request = mcf_gpio_request,
288 .free = mcf_gpio_free,
289 .direction_input = mcf_gpio_direction_input,
290 .direction_output = mcf_gpio_direction_output,
291 .get = mcf_gpio_get_value,
292 .set = mcf_gpio_set_value_fast,
293 .base = 120,
294 .ngpio = 8,
295 },
296 .pddr = MCFGPIO_DDREH,
297 .podr = MCFGPIO_PORTEH,
298 .ppdr = MCFGPIO_PORTEHP,
299 .setr = MCFGPIO_SETEH,
300 .clrr = MCFGPIO_CLREH,
301 },
302 {
303 .gpio_chip = {
304 .label = "EL",
305 .request = mcf_gpio_request,
306 .free = mcf_gpio_free,
307 .direction_input = mcf_gpio_direction_input,
308 .direction_output = mcf_gpio_direction_output,
309 .get = mcf_gpio_get_value,
310 .set = mcf_gpio_set_value_fast,
311 .base = 128,
312 .ngpio = 8,
313 },
314 .pddr = MCFGPIO_DDREL,
315 .podr = MCFGPIO_PORTEL,
316 .ppdr = MCFGPIO_PORTELP,
317 .setr = MCFGPIO_SETEL,
318 .clrr = MCFGPIO_CLREL,
319 },
320 {
321 .gpio_chip = {
322 .label = "AS",
323 .request = mcf_gpio_request,
324 .free = mcf_gpio_free,
325 .direction_input = mcf_gpio_direction_input,
326 .direction_output = mcf_gpio_direction_output,
327 .get = mcf_gpio_get_value,
328 .set = mcf_gpio_set_value_fast,
329 .base = 136,
330 .ngpio = 6,
331 },
332 .pddr = MCFGPIO_DDRAS,
333 .podr = MCFGPIO_PORTAS,
334 .ppdr = MCFGPIO_PORTASP,
335 .setr = MCFGPIO_SETAS,
336 .clrr = MCFGPIO_CLRAS,
337 },
338 {
339 .gpio_chip = {
340 .label = "QS",
341 .request = mcf_gpio_request,
342 .free = mcf_gpio_free,
343 .direction_input = mcf_gpio_direction_input,
344 .direction_output = mcf_gpio_direction_output,
345 .get = mcf_gpio_get_value,
346 .set = mcf_gpio_set_value_fast,
347 .base = 144,
348 .ngpio = 7,
349 },
350 .pddr = MCFGPIO_DDRQS,
351 .podr = MCFGPIO_PORTQS,
352 .ppdr = MCFGPIO_PORTQSP,
353 .setr = MCFGPIO_SETQS,
354 .clrr = MCFGPIO_CLRQS,
355 },
356 {
357 .gpio_chip = {
358 .label = "SD",
359 .request = mcf_gpio_request,
360 .free = mcf_gpio_free,
361 .direction_input = mcf_gpio_direction_input,
362 .direction_output = mcf_gpio_direction_output,
363 .get = mcf_gpio_get_value,
364 .set = mcf_gpio_set_value_fast,
365 .base = 152,
366 .ngpio = 6,
367 },
368 .pddr = MCFGPIO_DDRSD,
369 .podr = MCFGPIO_PORTSD,
370 .ppdr = MCFGPIO_PORTSDP,
371 .setr = MCFGPIO_SETSD,
372 .clrr = MCFGPIO_CLRSD,
373 },
374 {
375 .gpio_chip = {
376 .label = "TC",
377 .request = mcf_gpio_request,
378 .free = mcf_gpio_free,
379 .direction_input = mcf_gpio_direction_input,
380 .direction_output = mcf_gpio_direction_output,
381 .get = mcf_gpio_get_value,
382 .set = mcf_gpio_set_value_fast,
383 .base = 160,
384 .ngpio = 4,
385 },
386 .pddr = MCFGPIO_DDRTC,
387 .podr = MCFGPIO_PORTTC,
388 .ppdr = MCFGPIO_PORTTCP,
389 .setr = MCFGPIO_SETTC,
390 .clrr = MCFGPIO_CLRTC,
391 },
392 {
393 .gpio_chip = {
394 .label = "TD",
395 .request = mcf_gpio_request,
396 .free = mcf_gpio_free,
397 .direction_input = mcf_gpio_direction_input,
398 .direction_output = mcf_gpio_direction_output,
399 .get = mcf_gpio_get_value,
400 .set = mcf_gpio_set_value_fast,
401 .base = 168,
402 .ngpio = 4,
403 },
404 .pddr = MCFGPIO_DDRTD,
405 .podr = MCFGPIO_PORTTD,
406 .ppdr = MCFGPIO_PORTTDP,
407 .setr = MCFGPIO_SETTD,
408 .clrr = MCFGPIO_CLRTD,
409 },
410 {
411 .gpio_chip = {
412 .label = "UA",
413 .request = mcf_gpio_request,
414 .free = mcf_gpio_free,
415 .direction_input = mcf_gpio_direction_input,
416 .direction_output = mcf_gpio_direction_output,
417 .get = mcf_gpio_get_value,
418 .set = mcf_gpio_set_value_fast,
419 .base = 176,
420 .ngpio = 4,
421 },
422 .pddr = MCFGPIO_DDRUA,
423 .podr = MCFGPIO_PORTUA,
424 .ppdr = MCFGPIO_PORTUAP,
425 .setr = MCFGPIO_SETUA,
426 .clrr = MCFGPIO_CLRUA,
427 },
428};
429
430static int __init mcf_gpio_init(void)
431{
432 unsigned i = 0;
433 while (i < ARRAY_SIZE(mcf_gpio_chips))
434 (void)gpiochip_add((struct gpio_chip *)&mcf_gpio_chips[i++]);
435 return 0;
436}
437
438core_initcall(mcf_gpio_init);
diff --git a/arch/m68knommu/platform/5307/Makefile b/arch/m68knommu/platform/5307/Makefile
index cfd586860fd8..667db6598451 100644
--- a/arch/m68knommu/platform/5307/Makefile
+++ b/arch/m68knommu/platform/5307/Makefile
@@ -14,5 +14,5 @@
14 14
15asflags-$(CONFIG_FULLDEBUG) := -DDEBUGGER_COMPATIBLE_CACHE=1 15asflags-$(CONFIG_FULLDEBUG) := -DDEBUGGER_COMPATIBLE_CACHE=1
16 16
17obj-y += config.o 17obj-y += config.o gpio.o
18 18
diff --git a/arch/m68knommu/platform/5307/config.c b/arch/m68knommu/platform/5307/config.c
index 39da9e9ff674..00900ac06a9c 100644
--- a/arch/m68knommu/platform/5307/config.c
+++ b/arch/m68knommu/platform/5307/config.c
@@ -21,12 +21,6 @@
21 21
22/***************************************************************************/ 22/***************************************************************************/
23 23
24extern unsigned int mcf_timervector;
25extern unsigned int mcf_profilevector;
26extern unsigned int mcf_timerlevel;
27
28/***************************************************************************/
29
30/* 24/*
31 * Some platforms need software versions of the GPIO data registers. 25 * Some platforms need software versions of the GPIO data registers.
32 */ 26 */
@@ -64,11 +58,11 @@ static void __init m5307_uart_init_line(int line, int irq)
64 if (line == 0) { 58 if (line == 0) {
65 writeb(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI1, MCF_MBAR + MCFSIM_UART1ICR); 59 writeb(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI1, MCF_MBAR + MCFSIM_UART1ICR);
66 writeb(irq, MCF_MBAR + MCFUART_BASE1 + MCFUART_UIVR); 60 writeb(irq, MCF_MBAR + MCFUART_BASE1 + MCFUART_UIVR);
67 mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_UART1); 61 mcf_mapirq2imr(irq, MCFINTC_UART0);
68 } else if (line == 1) { 62 } else if (line == 1) {
69 writeb(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI2, MCF_MBAR + MCFSIM_UART2ICR); 63 writeb(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI2, MCF_MBAR + MCFSIM_UART2ICR);
70 writeb(irq, MCF_MBAR + MCFUART_BASE2 + MCFUART_UIVR); 64 writeb(irq, MCF_MBAR + MCFUART_BASE2 + MCFUART_UIVR);
71 mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_UART2); 65 mcf_mapirq2imr(irq, MCFINTC_UART1);
72 } 66 }
73} 67}
74 68
@@ -83,35 +77,19 @@ static void __init m5307_uarts_init(void)
83 77
84/***************************************************************************/ 78/***************************************************************************/
85 79
86void mcf_autovector(unsigned int vec) 80static void __init m5307_timers_init(void)
87{
88 volatile unsigned char *mbar;
89
90 if ((vec >= 25) && (vec <= 31)) {
91 mbar = (volatile unsigned char *) MCF_MBAR;
92 vec = 0x1 << (vec - 24);
93 *(mbar + MCFSIM_AVR) |= vec;
94 mcf_setimr(mcf_getimr() & ~vec);
95 }
96}
97
98/***************************************************************************/
99
100void mcf_settimericr(unsigned int timer, unsigned int level)
101{ 81{
102 volatile unsigned char *icrp; 82 /* Timer1 is always used as system timer */
103 unsigned int icr, imr; 83 writeb(MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI3,
104 84 MCF_MBAR + MCFSIM_TIMER1ICR);
105 if (timer <= 2) { 85 mcf_mapirq2imr(MCF_IRQ_TIMER, MCFINTC_TIMER1);
106 switch (timer) { 86
107 case 2: icr = MCFSIM_TIMER2ICR; imr = MCFSIM_IMR_TIMER2; break; 87#ifdef CONFIG_HIGHPROFILE
108 default: icr = MCFSIM_TIMER1ICR; imr = MCFSIM_IMR_TIMER1; break; 88 /* Timer2 is to be used as a high speed profile timer */
109 } 89 writeb(MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL7 | MCFSIM_ICR_PRI3,
110 90 MCF_MBAR + MCFSIM_TIMER2ICR);
111 icrp = (volatile unsigned char *) (MCF_MBAR + icr); 91 mcf_mapirq2imr(MCF_IRQ_PROFILER, MCFINTC_TIMER2);
112 *icrp = MCFSIM_ICR_AUTOVEC | (level << 2) | MCFSIM_ICR_PRI3; 92#endif
113 mcf_setimr(mcf_getimr() & ~imr);
114 }
115} 93}
116 94
117/***************************************************************************/ 95/***************************************************************************/
@@ -129,20 +107,22 @@ void m5307_cpu_reset(void)
129 107
130void __init config_BSP(char *commandp, int size) 108void __init config_BSP(char *commandp, int size)
131{ 109{
132 mcf_setimr(MCFSIM_IMR_MASKALL);
133
134#if defined(CONFIG_NETtel) || \ 110#if defined(CONFIG_NETtel) || \
135 defined(CONFIG_SECUREEDGEMP3) || defined(CONFIG_CLEOPATRA) 111 defined(CONFIG_SECUREEDGEMP3) || defined(CONFIG_CLEOPATRA)
136 /* Copy command line from FLASH to local buffer... */ 112 /* Copy command line from FLASH to local buffer... */
137 memcpy(commandp, (char *) 0xf0004000, size); 113 memcpy(commandp, (char *) 0xf0004000, size);
138 commandp[size-1] = 0; 114 commandp[size-1] = 0;
139 /* Different timer setup - to prevent device clash */
140 mcf_timervector = 30;
141 mcf_profilevector = 31;
142 mcf_timerlevel = 6;
143#endif 115#endif
144 116
145 mach_reset = m5307_cpu_reset; 117 mach_reset = m5307_cpu_reset;
118 m5307_timers_init();
119 m5307_uarts_init();
120
121 /* Only support the external interrupts on their primary level */
122 mcf_mapirq2imr(25, MCFINTC_EINT1);
123 mcf_mapirq2imr(27, MCFINTC_EINT3);
124 mcf_mapirq2imr(29, MCFINTC_EINT5);
125 mcf_mapirq2imr(31, MCFINTC_EINT7);
146 126
147#ifdef CONFIG_BDM_DISABLE 127#ifdef CONFIG_BDM_DISABLE
148 /* 128 /*
@@ -158,7 +138,6 @@ void __init config_BSP(char *commandp, int size)
158 138
159static int __init init_BSP(void) 139static int __init init_BSP(void)
160{ 140{
161 m5307_uarts_init();
162 platform_add_devices(m5307_devices, ARRAY_SIZE(m5307_devices)); 141 platform_add_devices(m5307_devices, ARRAY_SIZE(m5307_devices));
163 return 0; 142 return 0;
164} 143}
diff --git a/arch/m68knommu/platform/5307/gpio.c b/arch/m68knommu/platform/5307/gpio.c
new file mode 100644
index 000000000000..8da5880e4066
--- /dev/null
+++ b/arch/m68knommu/platform/5307/gpio.c
@@ -0,0 +1,49 @@
1/*
2 * Coldfire generic GPIO support
3 *
4 * (C) Copyright 2009, Steven King <sfking@fdwdc.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 as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14*/
15
16#include <linux/kernel.h>
17#include <linux/init.h>
18
19#include <asm/coldfire.h>
20#include <asm/mcfsim.h>
21#include <asm/mcfgpio.h>
22
23static struct mcf_gpio_chip mcf_gpio_chips[] = {
24 {
25 .gpio_chip = {
26 .label = "PP",
27 .request = mcf_gpio_request,
28 .free = mcf_gpio_free,
29 .direction_input = mcf_gpio_direction_input,
30 .direction_output = mcf_gpio_direction_output,
31 .get = mcf_gpio_get_value,
32 .set = mcf_gpio_set_value,
33 .ngpio = 16,
34 },
35 .pddr = MCFSIM_PADDR,
36 .podr = MCFSIM_PADAT,
37 .ppdr = MCFSIM_PADAT,
38 },
39};
40
41static int __init mcf_gpio_init(void)
42{
43 unsigned i = 0;
44 while (i < ARRAY_SIZE(mcf_gpio_chips))
45 (void)gpiochip_add((struct gpio_chip *)&mcf_gpio_chips[i++]);
46 return 0;
47}
48
49core_initcall(mcf_gpio_init);
diff --git a/arch/m68knommu/platform/532x/Makefile b/arch/m68knommu/platform/532x/Makefile
index e431912f5628..4cc23245bcd1 100644
--- a/arch/m68knommu/platform/532x/Makefile
+++ b/arch/m68knommu/platform/532x/Makefile
@@ -15,4 +15,4 @@
15asflags-$(CONFIG_FULLDEBUG) := -DDEBUGGER_COMPATIBLE_CACHE=1 15asflags-$(CONFIG_FULLDEBUG) := -DDEBUGGER_COMPATIBLE_CACHE=1
16 16
17#obj-y := config.o usb-mcf532x.o spi-mcf532x.o 17#obj-y := config.o usb-mcf532x.o spi-mcf532x.o
18obj-y := config.o 18obj-y := config.o gpio.o
diff --git a/arch/m68knommu/platform/532x/config.c b/arch/m68knommu/platform/532x/config.c
index cdb761971f7a..d632948e64e5 100644
--- a/arch/m68knommu/platform/532x/config.c
+++ b/arch/m68knommu/platform/532x/config.c
@@ -20,7 +20,6 @@
20#include <linux/kernel.h> 20#include <linux/kernel.h>
21#include <linux/param.h> 21#include <linux/param.h>
22#include <linux/init.h> 22#include <linux/init.h>
23#include <linux/interrupt.h>
24#include <linux/io.h> 23#include <linux/io.h>
25#include <asm/machdep.h> 24#include <asm/machdep.h>
26#include <asm/coldfire.h> 25#include <asm/coldfire.h>
@@ -31,12 +30,6 @@
31 30
32/***************************************************************************/ 31/***************************************************************************/
33 32
34extern unsigned int mcf_timervector;
35extern unsigned int mcf_profilevector;
36extern unsigned int mcf_timerlevel;
37
38/***************************************************************************/
39
40static struct mcf_platform_uart m532x_uart_platform[] = { 33static struct mcf_platform_uart m532x_uart_platform[] = {
41 { 34 {
42 .mapbase = MCFUART_BASE1, 35 .mapbase = MCFUART_BASE1,
@@ -88,6 +81,7 @@ static struct platform_device m532x_fec = {
88 .num_resources = ARRAY_SIZE(m532x_fec_resources), 81 .num_resources = ARRAY_SIZE(m532x_fec_resources),
89 .resource = m532x_fec_resources, 82 .resource = m532x_fec_resources,
90}; 83};
84
91static struct platform_device *m532x_devices[] __initdata = { 85static struct platform_device *m532x_devices[] __initdata = {
92 &m532x_uart, 86 &m532x_uart,
93 &m532x_fec, 87 &m532x_fec,
@@ -98,18 +92,11 @@ static struct platform_device *m532x_devices[] __initdata = {
98static void __init m532x_uart_init_line(int line, int irq) 92static void __init m532x_uart_init_line(int line, int irq)
99{ 93{
100 if (line == 0) { 94 if (line == 0) {
101 MCF_INTC0_ICR26 = 0x3;
102 MCF_INTC0_CIMR = 26;
103 /* GPIO initialization */ 95 /* GPIO initialization */
104 MCF_GPIO_PAR_UART |= 0x000F; 96 MCF_GPIO_PAR_UART |= 0x000F;
105 } else if (line == 1) { 97 } else if (line == 1) {
106 MCF_INTC0_ICR27 = 0x3;
107 MCF_INTC0_CIMR = 27;
108 /* GPIO initialization */ 98 /* GPIO initialization */
109 MCF_GPIO_PAR_UART |= 0x0FF0; 99 MCF_GPIO_PAR_UART |= 0x0FF0;
110 } else if (line == 2) {
111 MCF_INTC0_ICR28 = 0x3;
112 MCF_INTC0_CIMR = 28;
113 } 100 }
114} 101}
115 102
@@ -125,14 +112,6 @@ static void __init m532x_uarts_init(void)
125 112
126static void __init m532x_fec_init(void) 113static void __init m532x_fec_init(void)
127{ 114{
128 /* Unmask FEC interrupts at ColdFire interrupt controller */
129 MCF_INTC0_ICR36 = 0x2;
130 MCF_INTC0_ICR40 = 0x2;
131 MCF_INTC0_ICR42 = 0x2;
132
133 MCF_INTC0_IMRH &= ~(MCF_INTC_IMRH_INT_MASK36 |
134 MCF_INTC_IMRH_INT_MASK40 | MCF_INTC_IMRH_INT_MASK42);
135
136 /* Set multi-function pins to ethernet mode for fec0 */ 115 /* Set multi-function pins to ethernet mode for fec0 */
137 MCF_GPIO_PAR_FECI2C |= (MCF_GPIO_PAR_FECI2C_PAR_MDC_EMDC | 116 MCF_GPIO_PAR_FECI2C |= (MCF_GPIO_PAR_FECI2C_PAR_MDC_EMDC |
138 MCF_GPIO_PAR_FECI2C_PAR_MDIO_EMDIO); 117 MCF_GPIO_PAR_FECI2C_PAR_MDIO_EMDIO);
@@ -142,26 +121,6 @@ static void __init m532x_fec_init(void)
142 121
143/***************************************************************************/ 122/***************************************************************************/
144 123
145void mcf_settimericr(unsigned int timer, unsigned int level)
146{
147 volatile unsigned char *icrp;
148 unsigned int icr;
149 unsigned char irq;
150
151 if (timer <= 2) {
152 switch (timer) {
153 case 2: irq = 33; icr = MCFSIM_ICR_TIMER2; break;
154 default: irq = 32; icr = MCFSIM_ICR_TIMER1; break;
155 }
156
157 icrp = (volatile unsigned char *) (icr);
158 *icrp = level;
159 mcf_enable_irq0(irq);
160 }
161}
162
163/***************************************************************************/
164
165static void m532x_cpu_reset(void) 124static void m532x_cpu_reset(void)
166{ 125{
167 local_irq_disable(); 126 local_irq_disable();
@@ -172,8 +131,6 @@ static void m532x_cpu_reset(void)
172 131
173void __init config_BSP(char *commandp, int size) 132void __init config_BSP(char *commandp, int size)
174{ 133{
175 mcf_setimr(MCFSIM_IMR_MASKALL);
176
177#if !defined(CONFIG_BOOTPARAM) 134#if !defined(CONFIG_BOOTPARAM)
178 /* Copy command line from FLASH to local buffer... */ 135 /* Copy command line from FLASH to local buffer... */
179 memcpy(commandp, (char *) 0x4000, 4); 136 memcpy(commandp, (char *) 0x4000, 4);
@@ -185,10 +142,6 @@ void __init config_BSP(char *commandp, int size)
185 } 142 }
186#endif 143#endif
187 144
188 mcf_timervector = 64+32;
189 mcf_profilevector = 64+33;
190 mach_reset = m532x_cpu_reset;
191
192#ifdef CONFIG_BDM_DISABLE 145#ifdef CONFIG_BDM_DISABLE
193 /* 146 /*
194 * Disable the BDM clocking. This also turns off most of the rest of 147 * Disable the BDM clocking. This also turns off most of the rest of
@@ -438,8 +391,8 @@ void gpio_init(void)
438 /* Initialize TIN3 as a GPIO output to enable the write 391 /* Initialize TIN3 as a GPIO output to enable the write
439 half of the latch */ 392 half of the latch */
440 MCF_GPIO_PAR_TIMER = 0x00; 393 MCF_GPIO_PAR_TIMER = 0x00;
441 MCF_GPIO_PDDR_TIMER = 0x08; 394 __raw_writeb(0x08, MCFGPIO_PDDR_TIMER);
442 MCF_GPIO_PCLRR_TIMER = 0x0; 395 __raw_writeb(0x00, MCFGPIO_PCLRR_TIMER);
443 396
444} 397}
445 398
diff --git a/arch/m68knommu/platform/532x/gpio.c b/arch/m68knommu/platform/532x/gpio.c
new file mode 100644
index 000000000000..184b77382c3d
--- /dev/null
+++ b/arch/m68knommu/platform/532x/gpio.c
@@ -0,0 +1,337 @@
1/*
2 * Coldfire generic GPIO support
3 *
4 * (C) Copyright 2009, Steven King <sfking@fdwdc.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 as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14*/
15
16#include <linux/kernel.h>
17#include <linux/init.h>
18
19#include <asm/coldfire.h>
20#include <asm/mcfsim.h>
21#include <asm/mcfgpio.h>
22
23static struct mcf_gpio_chip mcf_gpio_chips[] = {
24 {
25 .gpio_chip = {
26 .label = "PIRQ",
27 .request = mcf_gpio_request,
28 .free = mcf_gpio_free,
29 .direction_input = mcf_gpio_direction_input,
30 .direction_output = mcf_gpio_direction_output,
31 .get = mcf_gpio_get_value,
32 .set = mcf_gpio_set_value,
33 .ngpio = 8,
34 },
35 .pddr = MCFEPORT_EPDDR,
36 .podr = MCFEPORT_EPDR,
37 .ppdr = MCFEPORT_EPPDR,
38 },
39 {
40 .gpio_chip = {
41 .label = "FECH",
42 .request = mcf_gpio_request,
43 .free = mcf_gpio_free,
44 .direction_input = mcf_gpio_direction_input,
45 .direction_output = mcf_gpio_direction_output,
46 .get = mcf_gpio_get_value,
47 .set = mcf_gpio_set_value_fast,
48 .base = 8,
49 .ngpio = 8,
50 },
51 .pddr = MCFGPIO_PDDR_FECH,
52 .podr = MCFGPIO_PODR_FECH,
53 .ppdr = MCFGPIO_PPDSDR_FECH,
54 .setr = MCFGPIO_PPDSDR_FECH,
55 .clrr = MCFGPIO_PCLRR_FECH,
56 },
57 {
58 .gpio_chip = {
59 .label = "FECL",
60 .request = mcf_gpio_request,
61 .free = mcf_gpio_free,
62 .direction_input = mcf_gpio_direction_input,
63 .direction_output = mcf_gpio_direction_output,
64 .get = mcf_gpio_get_value,
65 .set = mcf_gpio_set_value_fast,
66 .base = 16,
67 .ngpio = 8,
68 },
69 .pddr = MCFGPIO_PDDR_FECL,
70 .podr = MCFGPIO_PODR_FECL,
71 .ppdr = MCFGPIO_PPDSDR_FECL,
72 .setr = MCFGPIO_PPDSDR_FECL,
73 .clrr = MCFGPIO_PCLRR_FECL,
74 },
75 {
76 .gpio_chip = {
77 .label = "SSI",
78 .request = mcf_gpio_request,
79 .free = mcf_gpio_free,
80 .direction_input = mcf_gpio_direction_input,
81 .direction_output = mcf_gpio_direction_output,
82 .get = mcf_gpio_get_value,
83 .set = mcf_gpio_set_value_fast,
84 .base = 24,
85 .ngpio = 5,
86 },
87 .pddr = MCFGPIO_PDDR_SSI,
88 .podr = MCFGPIO_PODR_SSI,
89 .ppdr = MCFGPIO_PPDSDR_SSI,
90 .setr = MCFGPIO_PPDSDR_SSI,
91 .clrr = MCFGPIO_PCLRR_SSI,
92 },
93 {
94 .gpio_chip = {
95 .label = "BUSCTL",
96 .request = mcf_gpio_request,
97 .free = mcf_gpio_free,
98 .direction_input = mcf_gpio_direction_input,
99 .direction_output = mcf_gpio_direction_output,
100 .get = mcf_gpio_get_value,
101 .set = mcf_gpio_set_value_fast,
102 .base = 32,
103 .ngpio = 4,
104 },
105 .pddr = MCFGPIO_PDDR_BUSCTL,
106 .podr = MCFGPIO_PODR_BUSCTL,
107 .ppdr = MCFGPIO_PPDSDR_BUSCTL,
108 .setr = MCFGPIO_PPDSDR_BUSCTL,
109 .clrr = MCFGPIO_PCLRR_BUSCTL,
110 },
111 {
112 .gpio_chip = {
113 .label = "BE",
114 .request = mcf_gpio_request,
115 .free = mcf_gpio_free,
116 .direction_input = mcf_gpio_direction_input,
117 .direction_output = mcf_gpio_direction_output,
118 .get = mcf_gpio_get_value,
119 .set = mcf_gpio_set_value_fast,
120 .base = 40,
121 .ngpio = 4,
122 },
123 .pddr = MCFGPIO_PDDR_BE,
124 .podr = MCFGPIO_PODR_BE,
125 .ppdr = MCFGPIO_PPDSDR_BE,
126 .setr = MCFGPIO_PPDSDR_BE,
127 .clrr = MCFGPIO_PCLRR_BE,
128 },
129 {
130 .gpio_chip = {
131 .label = "CS",
132 .request = mcf_gpio_request,
133 .free = mcf_gpio_free,
134 .direction_input = mcf_gpio_direction_input,
135 .direction_output = mcf_gpio_direction_output,
136 .get = mcf_gpio_get_value,
137 .set = mcf_gpio_set_value_fast,
138 .base = 49,
139 .ngpio = 5,
140 },
141 .pddr = MCFGPIO_PDDR_CS,
142 .podr = MCFGPIO_PODR_CS,
143 .ppdr = MCFGPIO_PPDSDR_CS,
144 .setr = MCFGPIO_PPDSDR_CS,
145 .clrr = MCFGPIO_PCLRR_CS,
146 },
147 {
148 .gpio_chip = {
149 .label = "PWM",
150 .request = mcf_gpio_request,
151 .free = mcf_gpio_free,
152 .direction_input = mcf_gpio_direction_input,
153 .direction_output = mcf_gpio_direction_output,
154 .get = mcf_gpio_get_value,
155 .set = mcf_gpio_set_value_fast,
156 .base = 58,
157 .ngpio = 4,
158 },
159 .pddr = MCFGPIO_PDDR_PWM,
160 .podr = MCFGPIO_PODR_PWM,
161 .ppdr = MCFGPIO_PPDSDR_PWM,
162 .setr = MCFGPIO_PPDSDR_PWM,
163 .clrr = MCFGPIO_PCLRR_PWM,
164 },
165 {
166 .gpio_chip = {
167 .label = "FECI2C",
168 .request = mcf_gpio_request,
169 .free = mcf_gpio_free,
170 .direction_input = mcf_gpio_direction_input,
171 .direction_output = mcf_gpio_direction_output,
172 .get = mcf_gpio_get_value,
173 .set = mcf_gpio_set_value_fast,
174 .base = 64,
175 .ngpio = 4,
176 },
177 .pddr = MCFGPIO_PDDR_FECI2C,
178 .podr = MCFGPIO_PODR_FECI2C,
179 .ppdr = MCFGPIO_PPDSDR_FECI2C,
180 .setr = MCFGPIO_PPDSDR_FECI2C,
181 .clrr = MCFGPIO_PCLRR_FECI2C,
182 },
183 {
184 .gpio_chip = {
185 .label = "UART",
186 .request = mcf_gpio_request,
187 .free = mcf_gpio_free,
188 .direction_input = mcf_gpio_direction_input,
189 .direction_output = mcf_gpio_direction_output,
190 .get = mcf_gpio_get_value,
191 .set = mcf_gpio_set_value_fast,
192 .base = 72,
193 .ngpio = 8,
194 },
195 .pddr = MCFGPIO_PDDR_UART,
196 .podr = MCFGPIO_PODR_UART,
197 .ppdr = MCFGPIO_PPDSDR_UART,
198 .setr = MCFGPIO_PPDSDR_UART,
199 .clrr = MCFGPIO_PCLRR_UART,
200 },
201 {
202 .gpio_chip = {
203 .label = "QSPI",
204 .request = mcf_gpio_request,
205 .free = mcf_gpio_free,
206 .direction_input = mcf_gpio_direction_input,
207 .direction_output = mcf_gpio_direction_output,
208 .get = mcf_gpio_get_value,
209 .set = mcf_gpio_set_value_fast,
210 .base = 80,
211 .ngpio = 6,
212 },
213 .pddr = MCFGPIO_PDDR_QSPI,
214 .podr = MCFGPIO_PODR_QSPI,
215 .ppdr = MCFGPIO_PPDSDR_QSPI,
216 .setr = MCFGPIO_PPDSDR_QSPI,
217 .clrr = MCFGPIO_PCLRR_QSPI,
218 },
219 {
220 .gpio_chip = {
221 .label = "TIMER",
222 .request = mcf_gpio_request,
223 .free = mcf_gpio_free,
224 .direction_input = mcf_gpio_direction_input,
225 .direction_output = mcf_gpio_direction_output,
226 .get = mcf_gpio_get_value,
227 .set = mcf_gpio_set_value_fast,
228 .base = 88,
229 .ngpio = 4,
230 },
231 .pddr = MCFGPIO_PDDR_TIMER,
232 .podr = MCFGPIO_PODR_TIMER,
233 .ppdr = MCFGPIO_PPDSDR_TIMER,
234 .setr = MCFGPIO_PPDSDR_TIMER,
235 .clrr = MCFGPIO_PCLRR_TIMER,
236 },
237 {
238 .gpio_chip = {
239 .label = "LCDDATAH",
240 .request = mcf_gpio_request,
241 .free = mcf_gpio_free,
242 .direction_input = mcf_gpio_direction_input,
243 .direction_output = mcf_gpio_direction_output,
244 .get = mcf_gpio_get_value,
245 .set = mcf_gpio_set_value_fast,
246 .base = 96,
247 .ngpio = 2,
248 },
249 .pddr = MCFGPIO_PDDR_LCDDATAH,
250 .podr = MCFGPIO_PODR_LCDDATAH,
251 .ppdr = MCFGPIO_PPDSDR_LCDDATAH,
252 .setr = MCFGPIO_PPDSDR_LCDDATAH,
253 .clrr = MCFGPIO_PCLRR_LCDDATAH,
254 },
255 {
256 .gpio_chip = {
257 .label = "LCDDATAM",
258 .request = mcf_gpio_request,
259 .free = mcf_gpio_free,
260 .direction_input = mcf_gpio_direction_input,
261 .direction_output = mcf_gpio_direction_output,
262 .get = mcf_gpio_get_value,
263 .set = mcf_gpio_set_value_fast,
264 .base = 104,
265 .ngpio = 8,
266 },
267 .pddr = MCFGPIO_PDDR_LCDDATAM,
268 .podr = MCFGPIO_PODR_LCDDATAM,
269 .ppdr = MCFGPIO_PPDSDR_LCDDATAM,
270 .setr = MCFGPIO_PPDSDR_LCDDATAM,
271 .clrr = MCFGPIO_PCLRR_LCDDATAM,
272 },
273 {
274 .gpio_chip = {
275 .label = "LCDDATAL",
276 .request = mcf_gpio_request,
277 .free = mcf_gpio_free,
278 .direction_input = mcf_gpio_direction_input,
279 .direction_output = mcf_gpio_direction_output,
280 .get = mcf_gpio_get_value,
281 .set = mcf_gpio_set_value_fast,
282 .base = 112,
283 .ngpio = 8,
284 },
285 .pddr = MCFGPIO_PDDR_LCDDATAL,
286 .podr = MCFGPIO_PODR_LCDDATAL,
287 .ppdr = MCFGPIO_PPDSDR_LCDDATAL,
288 .setr = MCFGPIO_PPDSDR_LCDDATAL,
289 .clrr = MCFGPIO_PCLRR_LCDDATAL,
290 },
291 {
292 .gpio_chip = {
293 .label = "LCDCTLH",
294 .request = mcf_gpio_request,
295 .free = mcf_gpio_free,
296 .direction_input = mcf_gpio_direction_input,
297 .direction_output = mcf_gpio_direction_output,
298 .get = mcf_gpio_get_value,
299 .set = mcf_gpio_set_value_fast,
300 .base = 120,
301 .ngpio = 1,
302 },
303 .pddr = MCFGPIO_PDDR_LCDCTLH,
304 .podr = MCFGPIO_PODR_LCDCTLH,
305 .ppdr = MCFGPIO_PPDSDR_LCDCTLH,
306 .setr = MCFGPIO_PPDSDR_LCDCTLH,
307 .clrr = MCFGPIO_PCLRR_LCDCTLH,
308 },
309 {
310 .gpio_chip = {
311 .label = "LCDCTLL",
312 .request = mcf_gpio_request,
313 .free = mcf_gpio_free,
314 .direction_input = mcf_gpio_direction_input,
315 .direction_output = mcf_gpio_direction_output,
316 .get = mcf_gpio_get_value,
317 .set = mcf_gpio_set_value_fast,
318 .base = 128,
319 .ngpio = 8,
320 },
321 .pddr = MCFGPIO_PDDR_LCDCTLL,
322 .podr = MCFGPIO_PODR_LCDCTLL,
323 .ppdr = MCFGPIO_PPDSDR_LCDCTLL,
324 .setr = MCFGPIO_PPDSDR_LCDCTLL,
325 .clrr = MCFGPIO_PCLRR_LCDCTLL,
326 },
327};
328
329static int __init mcf_gpio_init(void)
330{
331 unsigned i = 0;
332 while (i < ARRAY_SIZE(mcf_gpio_chips))
333 (void)gpiochip_add((struct gpio_chip *)&mcf_gpio_chips[i++]);
334 return 0;
335}
336
337core_initcall(mcf_gpio_init);
diff --git a/arch/m68knommu/platform/5407/Makefile b/arch/m68knommu/platform/5407/Makefile
index e6035e7a2d3f..dee62c5dbaa6 100644
--- a/arch/m68knommu/platform/5407/Makefile
+++ b/arch/m68knommu/platform/5407/Makefile
@@ -14,5 +14,5 @@
14 14
15asflags-$(CONFIG_FULLDEBUG) := -DDEBUGGER_COMPATIBLE_CACHE=1 15asflags-$(CONFIG_FULLDEBUG) := -DDEBUGGER_COMPATIBLE_CACHE=1
16 16
17obj-y := config.o 17obj-y := config.o gpio.o
18 18
diff --git a/arch/m68knommu/platform/5407/config.c b/arch/m68knommu/platform/5407/config.c
index b41d942bf8d0..70ea789a400c 100644
--- a/arch/m68knommu/platform/5407/config.c
+++ b/arch/m68knommu/platform/5407/config.c
@@ -20,12 +20,6 @@
20 20
21/***************************************************************************/ 21/***************************************************************************/
22 22
23extern unsigned int mcf_timervector;
24extern unsigned int mcf_profilevector;
25extern unsigned int mcf_timerlevel;
26
27/***************************************************************************/
28
29static struct mcf_platform_uart m5407_uart_platform[] = { 23static struct mcf_platform_uart m5407_uart_platform[] = {
30 { 24 {
31 .mapbase = MCF_MBAR + MCFUART_BASE1, 25 .mapbase = MCF_MBAR + MCFUART_BASE1,
@@ -55,11 +49,11 @@ static void __init m5407_uart_init_line(int line, int irq)
55 if (line == 0) { 49 if (line == 0) {
56 writeb(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI1, MCF_MBAR + MCFSIM_UART1ICR); 50 writeb(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI1, MCF_MBAR + MCFSIM_UART1ICR);
57 writeb(irq, MCF_MBAR + MCFUART_BASE1 + MCFUART_UIVR); 51 writeb(irq, MCF_MBAR + MCFUART_BASE1 + MCFUART_UIVR);
58 mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_UART1); 52 mcf_mapirq2imr(irq, MCFINTC_UART0);
59 } else if (line == 1) { 53 } else if (line == 1) {
60 writeb(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI2, MCF_MBAR + MCFSIM_UART2ICR); 54 writeb(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI2, MCF_MBAR + MCFSIM_UART2ICR);
61 writeb(irq, MCF_MBAR + MCFUART_BASE2 + MCFUART_UIVR); 55 writeb(irq, MCF_MBAR + MCFUART_BASE2 + MCFUART_UIVR);
62 mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_UART2); 56 mcf_mapirq2imr(irq, MCFINTC_UART1);
63 } 57 }
64} 58}
65 59
@@ -74,35 +68,19 @@ static void __init m5407_uarts_init(void)
74 68
75/***************************************************************************/ 69/***************************************************************************/
76 70
77void mcf_autovector(unsigned int vec) 71static void __init m5407_timers_init(void)
78{
79 volatile unsigned char *mbar;
80
81 if ((vec >= 25) && (vec <= 31)) {
82 mbar = (volatile unsigned char *) MCF_MBAR;
83 vec = 0x1 << (vec - 24);
84 *(mbar + MCFSIM_AVR) |= vec;
85 mcf_setimr(mcf_getimr() & ~vec);
86 }
87}
88
89/***************************************************************************/
90
91void mcf_settimericr(unsigned int timer, unsigned int level)
92{ 72{
93 volatile unsigned char *icrp; 73 /* Timer1 is always used as system timer */
94 unsigned int icr, imr; 74 writeb(MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI3,
95 75 MCF_MBAR + MCFSIM_TIMER1ICR);
96 if (timer <= 2) { 76 mcf_mapirq2imr(MCF_IRQ_TIMER, MCFINTC_TIMER1);
97 switch (timer) { 77
98 case 2: icr = MCFSIM_TIMER2ICR; imr = MCFSIM_IMR_TIMER2; break; 78#ifdef CONFIG_HIGHPROFILE
99 default: icr = MCFSIM_TIMER1ICR; imr = MCFSIM_IMR_TIMER1; break; 79 /* Timer2 is to be used as a high speed profile timer */
100 } 80 writeb(MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL7 | MCFSIM_ICR_PRI3,
101 81 MCF_MBAR + MCFSIM_TIMER2ICR);
102 icrp = (volatile unsigned char *) (MCF_MBAR + icr); 82 mcf_mapirq2imr(MCF_IRQ_PROFILER, MCFINTC_TIMER2);
103 *icrp = MCFSIM_ICR_AUTOVEC | (level << 2) | MCFSIM_ICR_PRI3; 83#endif
104 mcf_setimr(mcf_getimr() & ~imr);
105 }
106} 84}
107 85
108/***************************************************************************/ 86/***************************************************************************/
@@ -120,23 +98,21 @@ void m5407_cpu_reset(void)
120 98
121void __init config_BSP(char *commandp, int size) 99void __init config_BSP(char *commandp, int size)
122{ 100{
123 mcf_setimr(MCFSIM_IMR_MASKALL);
124
125#if defined(CONFIG_CLEOPATRA)
126 /* Different timer setup - to prevent device clash */
127 mcf_timervector = 30;
128 mcf_profilevector = 31;
129 mcf_timerlevel = 6;
130#endif
131
132 mach_reset = m5407_cpu_reset; 101 mach_reset = m5407_cpu_reset;
102 m5407_timers_init();
103 m5407_uarts_init();
104
105 /* Only support the external interrupts on their primary level */
106 mcf_mapirq2imr(25, MCFINTC_EINT1);
107 mcf_mapirq2imr(27, MCFINTC_EINT3);
108 mcf_mapirq2imr(29, MCFINTC_EINT5);
109 mcf_mapirq2imr(31, MCFINTC_EINT7);
133} 110}
134 111
135/***************************************************************************/ 112/***************************************************************************/
136 113
137static int __init init_BSP(void) 114static int __init init_BSP(void)
138{ 115{
139 m5407_uarts_init();
140 platform_add_devices(m5407_devices, ARRAY_SIZE(m5407_devices)); 116 platform_add_devices(m5407_devices, ARRAY_SIZE(m5407_devices));
141 return 0; 117 return 0;
142} 118}
diff --git a/arch/m68knommu/platform/5407/gpio.c b/arch/m68knommu/platform/5407/gpio.c
new file mode 100644
index 000000000000..8da5880e4066
--- /dev/null
+++ b/arch/m68knommu/platform/5407/gpio.c
@@ -0,0 +1,49 @@
1/*
2 * Coldfire generic GPIO support
3 *
4 * (C) Copyright 2009, Steven King <sfking@fdwdc.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 as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14*/
15
16#include <linux/kernel.h>
17#include <linux/init.h>
18
19#include <asm/coldfire.h>
20#include <asm/mcfsim.h>
21#include <asm/mcfgpio.h>
22
23static struct mcf_gpio_chip mcf_gpio_chips[] = {
24 {
25 .gpio_chip = {
26 .label = "PP",
27 .request = mcf_gpio_request,
28 .free = mcf_gpio_free,
29 .direction_input = mcf_gpio_direction_input,
30 .direction_output = mcf_gpio_direction_output,
31 .get = mcf_gpio_get_value,
32 .set = mcf_gpio_set_value,
33 .ngpio = 16,
34 },
35 .pddr = MCFSIM_PADDR,
36 .podr = MCFSIM_PADAT,
37 .ppdr = MCFSIM_PADAT,
38 },
39};
40
41static int __init mcf_gpio_init(void)
42{
43 unsigned i = 0;
44 while (i < ARRAY_SIZE(mcf_gpio_chips))
45 (void)gpiochip_add((struct gpio_chip *)&mcf_gpio_chips[i++]);
46 return 0;
47}
48
49core_initcall(mcf_gpio_init);
diff --git a/arch/m68knommu/platform/68328/ints.c b/arch/m68knommu/platform/68328/ints.c
index 72e56d554f4f..b91ee85d4b5d 100644
--- a/arch/m68knommu/platform/68328/ints.c
+++ b/arch/m68knommu/platform/68328/ints.c
@@ -73,34 +73,6 @@ extern e_vector *_ramvec;
73/* The number of spurious interrupts */ 73/* The number of spurious interrupts */
74volatile unsigned int num_spurious; 74volatile unsigned int num_spurious;
75 75
76/*
77 * This function should be called during kernel startup to initialize
78 * the machine vector table.
79 */
80void __init init_vectors(void)
81{
82 int i;
83
84 /* set up the vectors */
85 for (i = 72; i < 256; ++i)
86 _ramvec[i] = (e_vector) bad_interrupt;
87
88 _ramvec[32] = system_call;
89
90 _ramvec[65] = (e_vector) inthandler1;
91 _ramvec[66] = (e_vector) inthandler2;
92 _ramvec[67] = (e_vector) inthandler3;
93 _ramvec[68] = (e_vector) inthandler4;
94 _ramvec[69] = (e_vector) inthandler5;
95 _ramvec[70] = (e_vector) inthandler6;
96 _ramvec[71] = (e_vector) inthandler7;
97
98 IVR = 0x40; /* Set DragonBall IVR (interrupt base) to 64 */
99
100 /* turn off all interrupts */
101 IMR = ~0;
102}
103
104/* The 68k family did not have a good way to determine the source 76/* The 68k family did not have a good way to determine the source
105 * of interrupts until later in the family. The EC000 core does 77 * of interrupts until later in the family. The EC000 core does
106 * not provide the vector number on the stack, we vector everything 78 * not provide the vector number on the stack, we vector everything
@@ -163,18 +135,54 @@ void process_int(int vec, struct pt_regs *fp)
163 } 135 }
164} 136}
165 137
166void enable_vector(unsigned int irq) 138static void intc_irq_unmask(unsigned int irq)
167{ 139{
168 IMR &= ~(1<<irq); 140 IMR &= ~(1<<irq);
169} 141}
170 142
171void disable_vector(unsigned int irq) 143static void intc_irq_mask(unsigned int irq)
172{ 144{
173 IMR |= (1<<irq); 145 IMR |= (1<<irq);
174} 146}
175 147
176void ack_vector(unsigned int irq) 148static struct irq_chip intc_irq_chip = {
149 .name = "M68K-INTC",
150 .mask = intc_irq_mask,
151 .unmask = intc_irq_unmask,
152};
153
154/*
155 * This function should be called during kernel startup to initialize
156 * the machine vector table.
157 */
158void __init init_IRQ(void)
177{ 159{
178 /* Nothing needed */ 160 int i;
161
162 /* set up the vectors */
163 for (i = 72; i < 256; ++i)
164 _ramvec[i] = (e_vector) bad_interrupt;
165
166 _ramvec[32] = system_call;
167
168 _ramvec[65] = (e_vector) inthandler1;
169 _ramvec[66] = (e_vector) inthandler2;
170 _ramvec[67] = (e_vector) inthandler3;
171 _ramvec[68] = (e_vector) inthandler4;
172 _ramvec[69] = (e_vector) inthandler5;
173 _ramvec[70] = (e_vector) inthandler6;
174 _ramvec[71] = (e_vector) inthandler7;
175
176 IVR = 0x40; /* Set DragonBall IVR (interrupt base) to 64 */
177
178 /* turn off all interrupts */
179 IMR = ~0;
180
181 for (i = 0; (i < NR_IRQS); i++) {
182 irq_desc[i].status = IRQ_DISABLED;
183 irq_desc[i].action = NULL;
184 irq_desc[i].depth = 1;
185 irq_desc[i].chip = &intc_irq_chip;
186 }
179} 187}
180 188
diff --git a/arch/m68knommu/platform/68360/ints.c b/arch/m68knommu/platform/68360/ints.c
index c36781157e09..1143f77caca4 100644
--- a/arch/m68knommu/platform/68360/ints.c
+++ b/arch/m68knommu/platform/68360/ints.c
@@ -37,11 +37,33 @@ extern void *_ramvec[];
37/* The number of spurious interrupts */ 37/* The number of spurious interrupts */
38volatile unsigned int num_spurious; 38volatile unsigned int num_spurious;
39 39
40static void intc_irq_unmask(unsigned int irq)
41{
42 pquicc->intr_cimr |= (1 << irq);
43}
44
45static void intc_irq_mask(unsigned int irq)
46{
47 pquicc->intr_cimr &= ~(1 << irq);
48}
49
50static void intc_irq_ack(unsigned int irq)
51{
52 pquicc->intr_cisr = (1 << irq);
53}
54
55static struct irq_chip intc_irq_chip = {
56 .name = "M68K-INTC",
57 .mask = intc_irq_mask,
58 .unmask = intc_irq_unmask,
59 .ack = intc_irq_ack,
60};
61
40/* 62/*
41 * This function should be called during kernel startup to initialize 63 * This function should be called during kernel startup to initialize
42 * the vector table. 64 * the vector table.
43 */ 65 */
44void init_vectors(void) 66void init_IRQ(void)
45{ 67{
46 int i; 68 int i;
47 int vba = (CPM_VECTOR_BASE<<4); 69 int vba = (CPM_VECTOR_BASE<<4);
@@ -109,20 +131,12 @@ void init_vectors(void)
109 131
110 /* turn off all CPM interrupts */ 132 /* turn off all CPM interrupts */
111 pquicc->intr_cimr = 0x00000000; 133 pquicc->intr_cimr = 0x00000000;
112}
113
114void enable_vector(unsigned int irq)
115{
116 pquicc->intr_cimr |= (1 << irq);
117}
118 134
119void disable_vector(unsigned int irq) 135 for (i = 0; (i < NR_IRQS); i++) {
120{ 136 irq_desc[i].status = IRQ_DISABLED;
121 pquicc->intr_cimr &= ~(1 << irq); 137 irq_desc[i].action = NULL;
122} 138 irq_desc[i].depth = 1;
123 139 irq_desc[i].chip = &intc_irq_chip;
124void ack_vector(unsigned int irq) 140 }
125{
126 pquicc->intr_cisr = (1 << irq);
127} 141}
128 142
diff --git a/arch/m68knommu/platform/coldfire/Makefile b/arch/m68knommu/platform/coldfire/Makefile
index 1bcb9372353f..f72a0e5d9996 100644
--- a/arch/m68knommu/platform/coldfire/Makefile
+++ b/arch/m68knommu/platform/coldfire/Makefile
@@ -15,16 +15,17 @@
15asflags-$(CONFIG_FULLDEBUG) := -DDEBUGGER_COMPATIBLE_CACHE=1 15asflags-$(CONFIG_FULLDEBUG) := -DDEBUGGER_COMPATIBLE_CACHE=1
16 16
17obj-$(CONFIG_COLDFIRE) += clk.o dma.o entry.o vectors.o 17obj-$(CONFIG_COLDFIRE) += clk.o dma.o entry.o vectors.o
18obj-$(CONFIG_M5206) += timers.o 18obj-$(CONFIG_M5206) += timers.o intc.o
19obj-$(CONFIG_M5206e) += timers.o 19obj-$(CONFIG_M5206e) += timers.o intc.o
20obj-$(CONFIG_M520x) += pit.o 20obj-$(CONFIG_M520x) += pit.o intc-simr.o
21obj-$(CONFIG_M523x) += pit.o dma_timer.o 21obj-$(CONFIG_M523x) += pit.o dma_timer.o intc-2.o
22obj-$(CONFIG_M5249) += timers.o 22obj-$(CONFIG_M5249) += timers.o intc.o
23obj-$(CONFIG_M527x) += pit.o 23obj-$(CONFIG_M527x) += pit.o intc-2.o
24obj-$(CONFIG_M5272) += timers.o 24obj-$(CONFIG_M5272) += timers.o
25obj-$(CONFIG_M528x) += pit.o 25obj-$(CONFIG_M528x) += pit.o intc-2.o
26obj-$(CONFIG_M5307) += timers.o 26obj-$(CONFIG_M5307) += timers.o intc.o
27obj-$(CONFIG_M532x) += timers.o 27obj-$(CONFIG_M532x) += timers.o intc-simr.o
28obj-$(CONFIG_M5407) += timers.o 28obj-$(CONFIG_M5407) += timers.o intc.o
29 29
30obj-y += pinmux.o gpio.o
30extra-y := head.o 31extra-y := head.o
diff --git a/arch/m68knommu/platform/coldfire/gpio.c b/arch/m68knommu/platform/coldfire/gpio.c
new file mode 100644
index 000000000000..ff0045793450
--- /dev/null
+++ b/arch/m68knommu/platform/coldfire/gpio.c
@@ -0,0 +1,127 @@
1/*
2 * Coldfire generic GPIO support.
3 *
4 * (C) Copyright 2009, Steven King <sfking@fdwdc.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 as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15
16#include <linux/kernel.h>
17#include <linux/init.h>
18#include <linux/sysdev.h>
19
20#include <asm/gpio.h>
21#include <asm/pinmux.h>
22#include <asm/mcfgpio.h>
23
24#define MCF_CHIP(chip) container_of(chip, struct mcf_gpio_chip, gpio_chip)
25
26int mcf_gpio_direction_input(struct gpio_chip *chip, unsigned offset)
27{
28 unsigned long flags;
29 MCFGPIO_PORTTYPE dir;
30 struct mcf_gpio_chip *mcf_chip = MCF_CHIP(chip);
31
32 local_irq_save(flags);
33 dir = mcfgpio_read(mcf_chip->pddr);
34 dir &= ~mcfgpio_bit(chip->base + offset);
35 mcfgpio_write(dir, mcf_chip->pddr);
36 local_irq_restore(flags);
37
38 return 0;
39}
40
41int mcf_gpio_get_value(struct gpio_chip *chip, unsigned offset)
42{
43 struct mcf_gpio_chip *mcf_chip = MCF_CHIP(chip);
44
45 return mcfgpio_read(mcf_chip->ppdr) & mcfgpio_bit(chip->base + offset);
46}
47
48int mcf_gpio_direction_output(struct gpio_chip *chip, unsigned offset,
49 int value)
50{
51 unsigned long flags;
52 MCFGPIO_PORTTYPE data;
53 struct mcf_gpio_chip *mcf_chip = MCF_CHIP(chip);
54
55 local_irq_save(flags);
56 /* write the value to the output latch */
57 data = mcfgpio_read(mcf_chip->podr);
58 if (value)
59 data |= mcfgpio_bit(chip->base + offset);
60 else
61 data &= ~mcfgpio_bit(chip->base + offset);
62 mcfgpio_write(data, mcf_chip->podr);
63
64 /* now set the direction to output */
65 data = mcfgpio_read(mcf_chip->pddr);
66 data |= mcfgpio_bit(chip->base + offset);
67 mcfgpio_write(data, mcf_chip->pddr);
68 local_irq_restore(flags);
69
70 return 0;
71}
72
73void mcf_gpio_set_value(struct gpio_chip *chip, unsigned offset, int value)
74{
75 struct mcf_gpio_chip *mcf_chip = MCF_CHIP(chip);
76
77 unsigned long flags;
78 MCFGPIO_PORTTYPE data;
79
80 local_irq_save(flags);
81 data = mcfgpio_read(mcf_chip->podr);
82 if (value)
83 data |= mcfgpio_bit(chip->base + offset);
84 else
85 data &= ~mcfgpio_bit(chip->base + offset);
86 mcfgpio_write(data, mcf_chip->podr);
87 local_irq_restore(flags);
88}
89
90void mcf_gpio_set_value_fast(struct gpio_chip *chip, unsigned offset, int value)
91{
92 struct mcf_gpio_chip *mcf_chip = MCF_CHIP(chip);
93
94 if (value)
95 mcfgpio_write(mcfgpio_bit(chip->base + offset), mcf_chip->setr);
96 else
97 mcfgpio_write(~mcfgpio_bit(chip->base + offset), mcf_chip->clrr);
98}
99
100int mcf_gpio_request(struct gpio_chip *chip, unsigned offset)
101{
102 struct mcf_gpio_chip *mcf_chip = MCF_CHIP(chip);
103
104 return mcf_chip->gpio_to_pinmux ?
105 mcf_pinmux_request(mcf_chip->gpio_to_pinmux[offset], 0) : 0;
106}
107
108void mcf_gpio_free(struct gpio_chip *chip, unsigned offset)
109{
110 struct mcf_gpio_chip *mcf_chip = MCF_CHIP(chip);
111
112 mcf_gpio_direction_input(chip, offset);
113
114 if (mcf_chip->gpio_to_pinmux)
115 mcf_pinmux_release(mcf_chip->gpio_to_pinmux[offset], 0);
116}
117
118struct sysdev_class mcf_gpio_sysclass = {
119 .name = "gpio",
120};
121
122static int __init mcf_gpio_sysinit(void)
123{
124 return sysdev_class_register(&mcf_gpio_sysclass);
125}
126
127core_initcall(mcf_gpio_sysinit);
diff --git a/arch/m68knommu/platform/coldfire/intc-2.c b/arch/m68knommu/platform/coldfire/intc-2.c
new file mode 100644
index 000000000000..5598c8b8661f
--- /dev/null
+++ b/arch/m68knommu/platform/coldfire/intc-2.c
@@ -0,0 +1,93 @@
1/*
2 * intc-1.c
3 *
4 * (C) Copyright 2009, Greg Ungerer <gerg@snapgear.com>
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file COPYING in the main directory of this archive
8 * for more details.
9 */
10
11#include <linux/types.h>
12#include <linux/init.h>
13#include <linux/kernel.h>
14#include <linux/interrupt.h>
15#include <linux/irq.h>
16#include <linux/io.h>
17#include <asm/coldfire.h>
18#include <asm/mcfsim.h>
19#include <asm/traps.h>
20
21/*
22 * Each vector needs a unique priority and level asscoiated with it.
23 * We don't really care so much what they are, we don't rely on the
24 * tranditional priority interrupt scheme of the m68k/ColdFire.
25 */
26static u8 intc_intpri = 0x36;
27
28static void intc_irq_mask(unsigned int irq)
29{
30 if ((irq >= MCFINT_VECBASE) && (irq <= MCFINT_VECBASE + 128)) {
31 unsigned long imraddr;
32 u32 val, imrbit;
33
34 irq -= MCFINT_VECBASE;
35 imraddr = MCF_IPSBAR;
36 imraddr += (irq & 0x40) ? MCFICM_INTC1 : MCFICM_INTC0;
37 imraddr += (irq & 0x20) ? MCFINTC_IMRH : MCFINTC_IMRL;
38 imrbit = 0x1 << (irq & 0x1f);
39
40 val = __raw_readl(imraddr);
41 __raw_writel(val | imrbit, imraddr);
42 }
43}
44
45static void intc_irq_unmask(unsigned int irq)
46{
47 if ((irq >= MCFINT_VECBASE) && (irq <= MCFINT_VECBASE + 128)) {
48 unsigned long intaddr, imraddr, icraddr;
49 u32 val, imrbit;
50
51 irq -= MCFINT_VECBASE;
52 intaddr = MCF_IPSBAR;
53 intaddr += (irq & 0x40) ? MCFICM_INTC1 : MCFICM_INTC0;
54 imraddr = intaddr + ((irq & 0x20) ? MCFINTC_IMRH : MCFINTC_IMRL);
55 icraddr = intaddr + MCFINTC_ICR0 + (irq & 0x3f);
56 imrbit = 0x1 << (irq & 0x1f);
57
58 /* Don't set the "maskall" bit! */
59 if ((irq & 0x20) == 0)
60 imrbit |= 0x1;
61
62 if (__raw_readb(icraddr) == 0)
63 __raw_writeb(intc_intpri--, icraddr);
64
65 val = __raw_readl(imraddr);
66 __raw_writel(val & ~imrbit, imraddr);
67 }
68}
69
70static struct irq_chip intc_irq_chip = {
71 .name = "CF-INTC",
72 .mask = intc_irq_mask,
73 .unmask = intc_irq_unmask,
74};
75
76void __init init_IRQ(void)
77{
78 int irq;
79
80 init_vectors();
81
82 /* Mask all interrupt sources */
83 __raw_writel(0x1, MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRL);
84 __raw_writel(0x1, MCF_IPSBAR + MCFICM_INTC1 + MCFINTC_IMRL);
85
86 for (irq = 0; (irq < NR_IRQS); irq++) {
87 irq_desc[irq].status = IRQ_DISABLED;
88 irq_desc[irq].action = NULL;
89 irq_desc[irq].depth = 1;
90 irq_desc[irq].chip = &intc_irq_chip;
91 }
92}
93
diff --git a/arch/m68knommu/platform/coldfire/intc-simr.c b/arch/m68knommu/platform/coldfire/intc-simr.c
new file mode 100644
index 000000000000..1b01e79c2f63
--- /dev/null
+++ b/arch/m68knommu/platform/coldfire/intc-simr.c
@@ -0,0 +1,78 @@
1/*
2 * intc-simr.c
3 *
4 * (C) Copyright 2009, Greg Ungerer <gerg@snapgear.com>
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file COPYING in the main directory of this archive
8 * for more details.
9 */
10
11#include <linux/types.h>
12#include <linux/init.h>
13#include <linux/kernel.h>
14#include <linux/interrupt.h>
15#include <linux/irq.h>
16#include <linux/io.h>
17#include <asm/coldfire.h>
18#include <asm/mcfsim.h>
19#include <asm/traps.h>
20
21static void intc_irq_mask(unsigned int irq)
22{
23 if (irq >= MCFINT_VECBASE) {
24 if (irq < MCFINT_VECBASE + 64)
25 __raw_writeb(irq - MCFINT_VECBASE, MCFINTC0_SIMR);
26 else if ((irq < MCFINT_VECBASE + 128) && MCFINTC1_SIMR)
27 __raw_writeb(irq - MCFINT_VECBASE - 64, MCFINTC1_SIMR);
28 }
29}
30
31static void intc_irq_unmask(unsigned int irq)
32{
33 if (irq >= MCFINT_VECBASE) {
34 if (irq < MCFINT_VECBASE + 64)
35 __raw_writeb(irq - MCFINT_VECBASE, MCFINTC0_CIMR);
36 else if ((irq < MCFINT_VECBASE + 128) && MCFINTC1_CIMR)
37 __raw_writeb(irq - MCFINT_VECBASE - 64, MCFINTC1_CIMR);
38 }
39}
40
41static int intc_irq_set_type(unsigned int irq, unsigned int type)
42{
43 if (irq >= MCFINT_VECBASE) {
44 if (irq < MCFINT_VECBASE + 64)
45 __raw_writeb(5, MCFINTC0_ICR0 + irq - MCFINT_VECBASE);
46 else if ((irq < MCFINT_VECBASE) && MCFINTC1_ICR0)
47 __raw_writeb(5, MCFINTC1_ICR0 + irq - MCFINT_VECBASE - 64);
48 }
49 return 0;
50}
51
52static struct irq_chip intc_irq_chip = {
53 .name = "CF-INTC",
54 .mask = intc_irq_mask,
55 .unmask = intc_irq_unmask,
56 .set_type = intc_irq_set_type,
57};
58
59void __init init_IRQ(void)
60{
61 int irq;
62
63 init_vectors();
64
65 /* Mask all interrupt sources */
66 __raw_writeb(0xff, MCFINTC0_SIMR);
67 if (MCFINTC1_SIMR)
68 __raw_writeb(0xff, MCFINTC1_SIMR);
69
70 for (irq = 0; (irq < NR_IRQS); irq++) {
71 irq_desc[irq].status = IRQ_DISABLED;
72 irq_desc[irq].action = NULL;
73 irq_desc[irq].depth = 1;
74 irq_desc[irq].chip = &intc_irq_chip;
75 intc_irq_set_type(irq, 0);
76 }
77}
78
diff --git a/arch/m68knommu/platform/coldfire/intc.c b/arch/m68knommu/platform/coldfire/intc.c
new file mode 100644
index 000000000000..a4560c86db71
--- /dev/null
+++ b/arch/m68knommu/platform/coldfire/intc.c
@@ -0,0 +1,153 @@
1/*
2 * intc.c -- support for the old ColdFire interrupt controller
3 *
4 * (C) Copyright 2009, Greg Ungerer <gerg@snapgear.com>
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file COPYING in the main directory of this archive
8 * for more details.
9 */
10
11#include <linux/types.h>
12#include <linux/init.h>
13#include <linux/kernel.h>
14#include <linux/interrupt.h>
15#include <linux/irq.h>
16#include <linux/io.h>
17#include <asm/traps.h>
18#include <asm/coldfire.h>
19#include <asm/mcfsim.h>
20
21/*
22 * The mapping of irq number to a mask register bit is not one-to-one.
23 * The irq numbers are either based on "level" of interrupt or fixed
24 * for an autovector-able interrupt. So we keep a local data structure
25 * that maps from irq to mask register. Not all interrupts will have
26 * an IMR bit.
27 */
28unsigned char mcf_irq2imr[NR_IRQS];
29
30/*
31 * Define the miniumun and maximum external interrupt numbers.
32 * This is also used as the "level" interrupt numbers.
33 */
34#define EIRQ1 25
35#define EIRQ7 31
36
37/*
38 * In the early version 2 core ColdFire parts the IMR register was 16 bits
39 * in size. Version 3 (and later version 2) core parts have a 32 bit
40 * sized IMR register. Provide some size independant methods to access the
41 * IMR register.
42 */
43#ifdef MCFSIM_IMR_IS_16BITS
44
45void mcf_setimr(int index)
46{
47 u16 imr;
48 imr = __raw_readw(MCF_MBAR + MCFSIM_IMR);
49 __raw_writew(imr | (0x1 << index), MCF_MBAR + MCFSIM_IMR);
50}
51
52void mcf_clrimr(int index)
53{
54 u16 imr;
55 imr = __raw_readw(MCF_MBAR + MCFSIM_IMR);
56 __raw_writew(imr & ~(0x1 << index), MCF_MBAR + MCFSIM_IMR);
57}
58
59void mcf_maskimr(unsigned int mask)
60{
61 u16 imr;
62 imr = __raw_readw(MCF_MBAR + MCFSIM_IMR);
63 imr |= mask;
64 __raw_writew(imr, MCF_MBAR + MCFSIM_IMR);
65}
66
67#else
68
69void mcf_setimr(int index)
70{
71 u32 imr;
72 imr = __raw_readl(MCF_MBAR + MCFSIM_IMR);
73 __raw_writel(imr | (0x1 << index), MCF_MBAR + MCFSIM_IMR);
74}
75
76void mcf_clrimr(int index)
77{
78 u32 imr;
79 imr = __raw_readl(MCF_MBAR + MCFSIM_IMR);
80 __raw_writel(imr & ~(0x1 << index), MCF_MBAR + MCFSIM_IMR);
81}
82
83void mcf_maskimr(unsigned int mask)
84{
85 u32 imr;
86 imr = __raw_readl(MCF_MBAR + MCFSIM_IMR);
87 imr |= mask;
88 __raw_writel(imr, MCF_MBAR + MCFSIM_IMR);
89}
90
91#endif
92
93/*
94 * Interrupts can be "vectored" on the ColdFire cores that support this old
95 * interrupt controller. That is, the device raising the interrupt can also
96 * supply the vector number to interrupt through. The AVR register of the
97 * interrupt controller enables or disables this for each external interrupt,
98 * so provide generic support for this. Setting this up is out-of-band for
99 * the interrupt system API's, and needs to be done by the driver that
100 * supports this device. Very few devices actually use this.
101 */
102void mcf_autovector(int irq)
103{
104#ifdef MCFSIM_AVR
105 if ((irq >= EIRQ1) && (irq <= EIRQ7)) {
106 u8 avec;
107 avec = __raw_readb(MCF_MBAR + MCFSIM_AVR);
108 avec |= (0x1 << (irq - EIRQ1 + 1));
109 __raw_writeb(avec, MCF_MBAR + MCFSIM_AVR);
110 }
111#endif
112}
113
114static void intc_irq_mask(unsigned int irq)
115{
116 if (mcf_irq2imr[irq])
117 mcf_setimr(mcf_irq2imr[irq]);
118}
119
120static void intc_irq_unmask(unsigned int irq)
121{
122 if (mcf_irq2imr[irq])
123 mcf_clrimr(mcf_irq2imr[irq]);
124}
125
126static int intc_irq_set_type(unsigned int irq, unsigned int type)
127{
128 return 0;
129}
130
131static struct irq_chip intc_irq_chip = {
132 .name = "CF-INTC",
133 .mask = intc_irq_mask,
134 .unmask = intc_irq_unmask,
135 .set_type = intc_irq_set_type,
136};
137
138void __init init_IRQ(void)
139{
140 int irq;
141
142 init_vectors();
143 mcf_maskimr(0xffffffff);
144
145 for (irq = 0; (irq < NR_IRQS); irq++) {
146 irq_desc[irq].status = IRQ_DISABLED;
147 irq_desc[irq].action = NULL;
148 irq_desc[irq].depth = 1;
149 irq_desc[irq].chip = &intc_irq_chip;
150 intc_irq_set_type(irq, 0);
151 }
152}
153
diff --git a/arch/m68knommu/platform/coldfire/pinmux.c b/arch/m68knommu/platform/coldfire/pinmux.c
new file mode 100644
index 000000000000..8c62b825939f
--- /dev/null
+++ b/arch/m68knommu/platform/coldfire/pinmux.c
@@ -0,0 +1,28 @@
1/*
2 * Coldfire generic GPIO pinmux support.
3 *
4 * (C) Copyright 2009, Steven King <sfking@fdwdc.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 as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 */
16
17#include <linux/kernel.h>
18
19#include <asm/pinmux.h>
20
21int mcf_pinmux_request(unsigned pinmux, unsigned func)
22{
23 return 0;
24}
25
26void mcf_pinmux_release(unsigned pinmux, unsigned func)
27{
28}
diff --git a/arch/m68knommu/platform/coldfire/pit.c b/arch/m68knommu/platform/coldfire/pit.c
index 61b96211f8ff..d8720ee34510 100644
--- a/arch/m68knommu/platform/coldfire/pit.c
+++ b/arch/m68knommu/platform/coldfire/pit.c
@@ -32,7 +32,6 @@
32 */ 32 */
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)
36#define PIT_CYCLES_PER_JIFFY (FREQ / HZ) 35#define PIT_CYCLES_PER_JIFFY (FREQ / HZ)
37 36
38static u32 pit_cnt; 37static u32 pit_cnt;
@@ -154,8 +153,6 @@ static struct clocksource pit_clk = {
154 153
155void hw_timer_init(void) 154void hw_timer_init(void)
156{ 155{
157 u32 imr;
158
159 cf_pit_clockevent.cpumask = cpumask_of(smp_processor_id()); 156 cf_pit_clockevent.cpumask = cpumask_of(smp_processor_id());
160 cf_pit_clockevent.mult = div_sc(FREQ, NSEC_PER_SEC, 32); 157 cf_pit_clockevent.mult = div_sc(FREQ, NSEC_PER_SEC, 32);
161 cf_pit_clockevent.max_delta_ns = 158 cf_pit_clockevent.max_delta_ns =
@@ -166,11 +163,6 @@ void hw_timer_init(void)
166 163
167 setup_irq(MCFINT_VECBASE + MCFINT_PIT1, &pit_irq); 164 setup_irq(MCFINT_VECBASE + MCFINT_PIT1, &pit_irq);
168 165
169 __raw_writeb(ICR_INTRCONF, INTC0 + MCFINTC_ICR0 + MCFINT_PIT1);
170 imr = __raw_readl(INTC0 + MCFPIT_IMR);
171 imr &= ~MCFPIT_IMR_IBIT;
172 __raw_writel(imr, INTC0 + MCFPIT_IMR);
173
174 pit_clk.mult = clocksource_hz2mult(FREQ, pit_clk.shift); 166 pit_clk.mult = clocksource_hz2mult(FREQ, pit_clk.shift);
175 clocksource_register(&pit_clk); 167 clocksource_register(&pit_clk);
176} 168}
diff --git a/arch/m68knommu/platform/coldfire/timers.c b/arch/m68knommu/platform/coldfire/timers.c
index 1ba8a3731653..2304d736c701 100644
--- a/arch/m68knommu/platform/coldfire/timers.c
+++ b/arch/m68knommu/platform/coldfire/timers.c
@@ -31,19 +31,9 @@
31#define TA(a) (MCF_MBAR + MCFTIMER_BASE1 + (a)) 31#define TA(a) (MCF_MBAR + MCFTIMER_BASE1 + (a))
32 32
33/* 33/*
34 * Default the timer and vector to use for ColdFire. Some ColdFire
35 * CPU's and some boards may want different. Their sub-architecture
36 * startup code (in config.c) can change these if they want.
37 */
38unsigned int mcf_timervector = 29;
39unsigned int mcf_profilevector = 31;
40unsigned int mcf_timerlevel = 5;
41
42/*
43 * These provide the underlying interrupt vector support. 34 * These provide the underlying interrupt vector support.
44 * Unfortunately it is a little different on each ColdFire. 35 * Unfortunately it is a little different on each ColdFire.
45 */ 36 */
46extern void mcf_settimericr(int timer, int level);
47void coldfire_profile_init(void); 37void coldfire_profile_init(void);
48 38
49#if defined(CONFIG_M532x) 39#if defined(CONFIG_M532x)
@@ -107,8 +97,6 @@ static struct clocksource mcftmr_clk = {
107 97
108void hw_timer_init(void) 98void hw_timer_init(void)
109{ 99{
110 setup_irq(mcf_timervector, &mcftmr_timer_irq);
111
112 __raw_writew(MCFTIMER_TMR_DISABLE, TA(MCFTIMER_TMR)); 100 __raw_writew(MCFTIMER_TMR_DISABLE, TA(MCFTIMER_TMR));
113 mcftmr_cycles_per_jiffy = FREQ / HZ; 101 mcftmr_cycles_per_jiffy = FREQ / HZ;
114 /* 102 /*
@@ -124,7 +112,7 @@ void hw_timer_init(void)
124 mcftmr_clk.mult = clocksource_hz2mult(FREQ, mcftmr_clk.shift); 112 mcftmr_clk.mult = clocksource_hz2mult(FREQ, mcftmr_clk.shift);
125 clocksource_register(&mcftmr_clk); 113 clocksource_register(&mcftmr_clk);
126 114
127 mcf_settimericr(1, mcf_timerlevel); 115 setup_irq(MCF_IRQ_TIMER, &mcftmr_timer_irq);
128 116
129#ifdef CONFIG_HIGHPROFILE 117#ifdef CONFIG_HIGHPROFILE
130 coldfire_profile_init(); 118 coldfire_profile_init();
@@ -171,8 +159,6 @@ void coldfire_profile_init(void)
171 printk(KERN_INFO "PROFILE: lodging TIMER2 @ %dHz as profile timer\n", 159 printk(KERN_INFO "PROFILE: lodging TIMER2 @ %dHz as profile timer\n",
172 PROFILEHZ); 160 PROFILEHZ);
173 161
174 setup_irq(mcf_profilevector, &coldfire_profile_irq);
175
176 /* Set up TIMER 2 as high speed profile clock */ 162 /* Set up TIMER 2 as high speed profile clock */
177 __raw_writew(MCFTIMER_TMR_DISABLE, PA(MCFTIMER_TMR)); 163 __raw_writew(MCFTIMER_TMR_DISABLE, PA(MCFTIMER_TMR));
178 164
@@ -180,7 +166,7 @@ void coldfire_profile_init(void)
180 __raw_writew(MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 | 166 __raw_writew(MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 |
181 MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE, PA(MCFTIMER_TMR)); 167 MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE, PA(MCFTIMER_TMR));
182 168
183 mcf_settimericr(2, 7); 169 setup_irq(MCF_IRQ_PROFILER, &coldfire_profile_irq);
184} 170}
185 171
186/***************************************************************************/ 172/***************************************************************************/
diff --git a/arch/m68knommu/platform/coldfire/vectors.c b/arch/m68knommu/platform/coldfire/vectors.c
index bdca0297fa9a..a21d3f870b7a 100644
--- a/arch/m68knommu/platform/coldfire/vectors.c
+++ b/arch/m68knommu/platform/coldfire/vectors.c
@@ -1,7 +1,7 @@
1/***************************************************************************/ 1/***************************************************************************/
2 2
3/* 3/*
4 * linux/arch/m68knommu/platform/5307/vectors.c 4 * linux/arch/m68knommu/platform/coldfire/vectors.c
5 * 5 *
6 * Copyright (C) 1999-2007, Greg Ungerer <gerg@snapgear.com> 6 * Copyright (C) 1999-2007, Greg Ungerer <gerg@snapgear.com>
7 */ 7 */
@@ -15,7 +15,6 @@
15#include <asm/machdep.h> 15#include <asm/machdep.h>
16#include <asm/coldfire.h> 16#include <asm/coldfire.h>
17#include <asm/mcfsim.h> 17#include <asm/mcfsim.h>
18#include <asm/mcfdma.h>
19#include <asm/mcfwdebug.h> 18#include <asm/mcfwdebug.h>
20 19
21/***************************************************************************/ 20/***************************************************************************/
@@ -79,20 +78,3 @@ void __init init_vectors(void)
79} 78}
80 79
81/***************************************************************************/ 80/***************************************************************************/
82
83void enable_vector(unsigned int irq)
84{
85 /* Currently no action on ColdFire */
86}
87
88void disable_vector(unsigned int irq)
89{
90 /* Currently no action on ColdFire */
91}
92
93void ack_vector(unsigned int irq)
94{
95 /* Currently no action on ColdFire */
96}
97
98/***************************************************************************/
diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig
index 2db722d80d4d..bbd8327f1890 100644
--- a/arch/microblaze/Kconfig
+++ b/arch/microblaze/Kconfig
@@ -6,6 +6,7 @@ mainmenu "Linux/Microblaze Kernel Configuration"
6config MICROBLAZE 6config MICROBLAZE
7 def_bool y 7 def_bool y
8 select HAVE_LMB 8 select HAVE_LMB
9 select USB_ARCH_HAS_EHCI
9 select ARCH_WANT_OPTIONAL_GPIOLIB 10 select ARCH_WANT_OPTIONAL_GPIOLIB
10 11
11config SWAP 12config SWAP
diff --git a/arch/microblaze/Makefile b/arch/microblaze/Makefile
index 8439598d4655..34187354304a 100644
--- a/arch/microblaze/Makefile
+++ b/arch/microblaze/Makefile
@@ -37,12 +37,12 @@ CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR) += -mxl-pattern-compare
37CPUFLAGS-1 += $(call cc-option,-mcpu=v$(CPU_VER)) 37CPUFLAGS-1 += $(call cc-option,-mcpu=v$(CPU_VER))
38 38
39# r31 holds current when in kernel mode 39# r31 holds current when in kernel mode
40KBUILD_KERNEL += -ffixed-r31 $(CPUFLAGS-1) $(CPUFLAGS-2) 40KBUILD_CFLAGS += -ffixed-r31 $(CPUFLAGS-1) $(CPUFLAGS-2)
41 41
42LDFLAGS := 42LDFLAGS :=
43LDFLAGS_vmlinux := 43LDFLAGS_vmlinux :=
44 44
45LIBGCC := $(shell $(CC) $(KBUILD_KERNEL) -print-libgcc-file-name) 45LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
46 46
47head-y := arch/microblaze/kernel/head.o 47head-y := arch/microblaze/kernel/head.o
48libs-y += arch/microblaze/lib/ 48libs-y += arch/microblaze/lib/
@@ -53,22 +53,41 @@ core-y += arch/microblaze/platform/
53 53
54boot := arch/microblaze/boot 54boot := arch/microblaze/boot
55 55
56# Are we making a simpleImage.<boardname> target? If so, crack out the boardname
57DTB:=$(subst simpleImage.,,$(filter simpleImage.%, $(MAKECMDGOALS)))
58
59ifneq ($(DTB),)
60 core-y += $(boot)/
61endif
62
56# defines filename extension depending memory management type 63# defines filename extension depending memory management type
57ifeq ($(CONFIG_MMU),) 64ifeq ($(CONFIG_MMU),)
58MMU := -nommu 65MMU := -nommu
59endif 66endif
60 67
61export MMU 68export MMU DTB
62 69
63all: linux.bin 70all: linux.bin
64 71
72BOOT_TARGETS = linux.bin linux.bin.gz simpleImage.%
73
65archclean: 74archclean:
66 $(Q)$(MAKE) $(clean)=$(boot) 75 $(Q)$(MAKE) $(clean)=$(boot)
67 76
68linux.bin linux.bin.gz: vmlinux 77$(BOOT_TARGETS): vmlinux
69 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ 78 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
70 79
71define archhelp 80define archhelp
72 echo '* linux.bin - Create raw binary' 81 echo '* linux.bin - Create raw binary'
73 echo ' linux.bin.gz - Create compressed raw binary' 82 echo ' linux.bin.gz - Create compressed raw binary'
83 echo ' simpleImage.<dt> - ELF image with $(arch)/boot/dts/<dt>.dts linked in'
84 echo ' - stripped elf with fdt blob
85 echo ' simpleImage.<dt>.unstrip - full ELF image with fdt blob'
86 echo ' *_defconfig - Select default config from arch/microblaze/configs'
87 echo ''
88 echo ' Targets with <dt> embed a device tree blob inside the image'
89 echo ' These targets support board with firmware that does not'
90 echo ' support passing a device tree directly. Replace <dt> with the'
91 echo ' name of a dts file from the arch/microblaze/boot/dts/ directory'
92 echo ' (minus the .dts extension).'
74endef 93endef
diff --git a/arch/microblaze/boot/Makefile b/arch/microblaze/boot/Makefile
index c2bb043a029d..21f13322a4ca 100644
--- a/arch/microblaze/boot/Makefile
+++ b/arch/microblaze/boot/Makefile
@@ -2,10 +2,24 @@
2# arch/microblaze/boot/Makefile 2# arch/microblaze/boot/Makefile
3# 3#
4 4
5targets := linux.bin linux.bin.gz 5obj-y += linked_dtb.o
6
7targets := linux.bin linux.bin.gz simpleImage.%
6 8
7OBJCOPYFLAGS_linux.bin := -O binary 9OBJCOPYFLAGS_linux.bin := -O binary
8 10
11# Where the DTS files live
12dtstree := $(srctree)/$(src)/dts
13
14# Ensure system.dtb exists
15$(obj)/linked_dtb.o: $(obj)/system.dtb
16
17# Generate system.dtb from $(DTB).dtb
18ifneq ($(DTB),system)
19$(obj)/system.dtb: $(obj)/$(DTB).dtb
20 $(call if_changed,cp)
21endif
22
9$(obj)/linux.bin: vmlinux FORCE 23$(obj)/linux.bin: vmlinux FORCE
10 [ -n $(CONFIG_INITRAMFS_SOURCE) ] && [ ! -e $(CONFIG_INITRAMFS_SOURCE) ] && \ 24 [ -n $(CONFIG_INITRAMFS_SOURCE) ] && [ ! -e $(CONFIG_INITRAMFS_SOURCE) ] && \
11 touch $(CONFIG_INITRAMFS_SOURCE) || echo "No CPIO image" 25 touch $(CONFIG_INITRAMFS_SOURCE) || echo "No CPIO image"
@@ -16,4 +30,27 @@ $(obj)/linux.bin.gz: $(obj)/linux.bin FORCE
16 $(call if_changed,gzip) 30 $(call if_changed,gzip)
17 @echo 'Kernel: $@ is ready' ' (#'`cat .version`')' 31 @echo 'Kernel: $@ is ready' ' (#'`cat .version`')'
18 32
19clean-kernel += linux.bin linux.bin.gz 33quiet_cmd_cp = CP $< $@$2
34 cmd_cp = cat $< >$@$2 || (rm -f $@ && echo false)
35
36quiet_cmd_strip = STRIP $@
37 cmd_strip = $(STRIP) -K _start -K _end -K __log_buf -K _fdt_start vmlinux -o $@
38
39$(obj)/simpleImage.%: vmlinux FORCE
40 $(call if_changed,cp,.unstrip)
41 $(call if_changed,strip)
42 @echo 'Kernel: $@ is ready' ' (#'`cat .version`')'
43
44# Rule to build device tree blobs
45DTC = $(objtree)/scripts/dtc/dtc
46
47# Rule to build device tree blobs
48quiet_cmd_dtc = DTC $@
49 cmd_dtc = $(DTC) -O dtb -o $(obj)/$*.dtb -b 0 -p 1024 $(dtstree)/$*.dts
50
51$(obj)/%.dtb: $(dtstree)/%.dts FORCE
52 $(call if_changed,dtc)
53
54clean-kernel += linux.bin linux.bin.gz simpleImage.*
55
56clean-files += *.dtb
diff --git a/arch/microblaze/boot/dts/system.dts b/arch/microblaze/boot/dts/system.dts
new file mode 120000
index 000000000000..7cb657892f21
--- /dev/null
+++ b/arch/microblaze/boot/dts/system.dts
@@ -0,0 +1 @@
../../platform/generic/system.dts \ No newline at end of file
diff --git a/arch/microblaze/boot/linked_dtb.S b/arch/microblaze/boot/linked_dtb.S
new file mode 100644
index 000000000000..cb2b537aebee
--- /dev/null
+++ b/arch/microblaze/boot/linked_dtb.S
@@ -0,0 +1,3 @@
1.section __fdt_blob,"a"
2.incbin "arch/microblaze/boot/system.dtb"
3
diff --git a/arch/microblaze/configs/mmu_defconfig b/arch/microblaze/configs/mmu_defconfig
index 09c32962b66f..bb7c374713ad 100644
--- a/arch/microblaze/configs/mmu_defconfig
+++ b/arch/microblaze/configs/mmu_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.31-rc6 3# Linux kernel version: 2.6.31
4# Tue Aug 18 11:00:02 2009 4# Thu Sep 24 10:28:50 2009
5# 5#
6CONFIG_MICROBLAZE=y 6CONFIG_MICROBLAZE=y
7# CONFIG_SWAP is not set 7# CONFIG_SWAP is not set
@@ -42,11 +42,12 @@ CONFIG_SYSVIPC_SYSCTL=y
42# 42#
43# RCU Subsystem 43# RCU Subsystem
44# 44#
45CONFIG_CLASSIC_RCU=y 45CONFIG_TREE_RCU=y
46# CONFIG_TREE_RCU is not set 46# CONFIG_TREE_PREEMPT_RCU is not set
47# CONFIG_PREEMPT_RCU is not set 47# CONFIG_RCU_TRACE is not set
48CONFIG_RCU_FANOUT=32
49# CONFIG_RCU_FANOUT_EXACT is not set
48# CONFIG_TREE_RCU_TRACE is not set 50# CONFIG_TREE_RCU_TRACE is not set
49# CONFIG_PREEMPT_RCU_TRACE is not set
50CONFIG_IKCONFIG=y 51CONFIG_IKCONFIG=y
51CONFIG_IKCONFIG_PROC=y 52CONFIG_IKCONFIG_PROC=y
52CONFIG_LOG_BUF_SHIFT=17 53CONFIG_LOG_BUF_SHIFT=17
@@ -260,6 +261,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
260# CONFIG_NETFILTER is not set 261# CONFIG_NETFILTER is not set
261# CONFIG_IP_DCCP is not set 262# CONFIG_IP_DCCP is not set
262# CONFIG_IP_SCTP is not set 263# CONFIG_IP_SCTP is not set
264# CONFIG_RDS is not set
263# CONFIG_TIPC is not set 265# CONFIG_TIPC is not set
264# CONFIG_ATM is not set 266# CONFIG_ATM is not set
265# CONFIG_BRIDGE is not set 267# CONFIG_BRIDGE is not set
@@ -357,12 +359,10 @@ CONFIG_NET_ETHERNET=y
357# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set 359# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
358# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 360# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
359# CONFIG_KS8842 is not set 361# CONFIG_KS8842 is not set
362CONFIG_XILINX_EMACLITE=y
360CONFIG_NETDEV_1000=y 363CONFIG_NETDEV_1000=y
361CONFIG_NETDEV_10000=y 364CONFIG_NETDEV_10000=y
362 365CONFIG_WLAN=y
363#
364# Wireless LAN
365#
366# CONFIG_WLAN_PRE80211 is not set 366# CONFIG_WLAN_PRE80211 is not set
367# CONFIG_WLAN_80211 is not set 367# CONFIG_WLAN_80211 is not set
368 368
@@ -460,6 +460,7 @@ CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
460# CONFIG_DISPLAY_SUPPORT is not set 460# CONFIG_DISPLAY_SUPPORT is not set
461# CONFIG_SOUND is not set 461# CONFIG_SOUND is not set
462# CONFIG_USB_SUPPORT is not set 462# CONFIG_USB_SUPPORT is not set
463CONFIG_USB_ARCH_HAS_EHCI=y
463# CONFIG_MMC is not set 464# CONFIG_MMC is not set
464# CONFIG_MEMSTICK is not set 465# CONFIG_MEMSTICK is not set
465# CONFIG_NEW_LEDS is not set 466# CONFIG_NEW_LEDS is not set
@@ -488,6 +489,7 @@ CONFIG_EXT2_FS=y
488# CONFIG_GFS2_FS is not set 489# CONFIG_GFS2_FS is not set
489# CONFIG_OCFS2_FS is not set 490# CONFIG_OCFS2_FS is not set
490# CONFIG_BTRFS_FS is not set 491# CONFIG_BTRFS_FS is not set
492# CONFIG_NILFS2_FS is not set
491CONFIG_FILE_LOCKING=y 493CONFIG_FILE_LOCKING=y
492CONFIG_FSNOTIFY=y 494CONFIG_FSNOTIFY=y
493# CONFIG_DNOTIFY is not set 495# CONFIG_DNOTIFY is not set
@@ -546,7 +548,6 @@ CONFIG_MISC_FILESYSTEMS=y
546# CONFIG_ROMFS_FS is not set 548# CONFIG_ROMFS_FS is not set
547# CONFIG_SYSV_FS is not set 549# CONFIG_SYSV_FS is not set
548# CONFIG_UFS_FS is not set 550# CONFIG_UFS_FS is not set
549# CONFIG_NILFS2_FS is not set
550CONFIG_NETWORK_FILESYSTEMS=y 551CONFIG_NETWORK_FILESYSTEMS=y
551CONFIG_NFS_FS=y 552CONFIG_NFS_FS=y
552CONFIG_NFS_V3=y 553CONFIG_NFS_V3=y
@@ -671,18 +672,20 @@ CONFIG_DEBUG_INFO=y
671# CONFIG_DEBUG_LIST is not set 672# CONFIG_DEBUG_LIST is not set
672# CONFIG_DEBUG_SG is not set 673# CONFIG_DEBUG_SG is not set
673# CONFIG_DEBUG_NOTIFIERS is not set 674# CONFIG_DEBUG_NOTIFIERS is not set
675# CONFIG_DEBUG_CREDENTIALS is not set
674# CONFIG_BOOT_PRINTK_DELAY is not set 676# CONFIG_BOOT_PRINTK_DELAY is not set
675# CONFIG_RCU_TORTURE_TEST is not set 677# CONFIG_RCU_TORTURE_TEST is not set
676# CONFIG_RCU_CPU_STALL_DETECTOR is not set 678# CONFIG_RCU_CPU_STALL_DETECTOR is not set
677# CONFIG_BACKTRACE_SELF_TEST is not set 679# CONFIG_BACKTRACE_SELF_TEST is not set
678# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set 680# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
681# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
679# CONFIG_FAULT_INJECTION is not set 682# CONFIG_FAULT_INJECTION is not set
680# CONFIG_SYSCTL_SYSCALL_CHECK is not set 683# CONFIG_SYSCTL_SYSCALL_CHECK is not set
681# CONFIG_PAGE_POISONING is not set 684# CONFIG_PAGE_POISONING is not set
682# CONFIG_SAMPLES is not set 685# CONFIG_SAMPLES is not set
683# CONFIG_KMEMCHECK is not set 686# CONFIG_KMEMCHECK is not set
684CONFIG_EARLY_PRINTK=y 687CONFIG_EARLY_PRINTK=y
685CONFIG_HEART_BEAT=y 688# CONFIG_HEART_BEAT is not set
686CONFIG_DEBUG_BOOTMEM=y 689CONFIG_DEBUG_BOOTMEM=y
687 690
688# 691#
@@ -697,7 +700,6 @@ CONFIG_CRYPTO=y
697# 700#
698# Crypto core or helper 701# Crypto core or helper
699# 702#
700# CONFIG_CRYPTO_FIPS is not set
701# CONFIG_CRYPTO_MANAGER is not set 703# CONFIG_CRYPTO_MANAGER is not set
702# CONFIG_CRYPTO_MANAGER2 is not set 704# CONFIG_CRYPTO_MANAGER2 is not set
703# CONFIG_CRYPTO_GF128MUL is not set 705# CONFIG_CRYPTO_GF128MUL is not set
@@ -729,11 +731,13 @@ CONFIG_CRYPTO=y
729# 731#
730# CONFIG_CRYPTO_HMAC is not set 732# CONFIG_CRYPTO_HMAC is not set
731# CONFIG_CRYPTO_XCBC is not set 733# CONFIG_CRYPTO_XCBC is not set
734# CONFIG_CRYPTO_VMAC is not set
732 735
733# 736#
734# Digest 737# Digest
735# 738#
736# CONFIG_CRYPTO_CRC32C is not set 739# CONFIG_CRYPTO_CRC32C is not set
740# CONFIG_CRYPTO_GHASH is not set
737# CONFIG_CRYPTO_MD4 is not set 741# CONFIG_CRYPTO_MD4 is not set
738# CONFIG_CRYPTO_MD5 is not set 742# CONFIG_CRYPTO_MD5 is not set
739# CONFIG_CRYPTO_MICHAEL_MIC is not set 743# CONFIG_CRYPTO_MICHAEL_MIC is not set
diff --git a/arch/microblaze/configs/nommu_defconfig b/arch/microblaze/configs/nommu_defconfig
index 8b638615a972..adb839bab704 100644
--- a/arch/microblaze/configs/nommu_defconfig
+++ b/arch/microblaze/configs/nommu_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.31-rc6 3# Linux kernel version: 2.6.31
4# Tue Aug 18 10:35:30 2009 4# Thu Sep 24 10:29:43 2009
5# 5#
6CONFIG_MICROBLAZE=y 6CONFIG_MICROBLAZE=y
7# CONFIG_SWAP is not set 7# CONFIG_SWAP is not set
@@ -44,11 +44,12 @@ CONFIG_BSD_PROCESS_ACCT_V3=y
44# 44#
45# RCU Subsystem 45# RCU Subsystem
46# 46#
47CONFIG_CLASSIC_RCU=y 47CONFIG_TREE_RCU=y
48# CONFIG_TREE_RCU is not set 48# CONFIG_TREE_PREEMPT_RCU is not set
49# CONFIG_PREEMPT_RCU is not set 49# CONFIG_RCU_TRACE is not set
50CONFIG_RCU_FANOUT=32
51# CONFIG_RCU_FANOUT_EXACT is not set
50# CONFIG_TREE_RCU_TRACE is not set 52# CONFIG_TREE_RCU_TRACE is not set
51# CONFIG_PREEMPT_RCU_TRACE is not set
52CONFIG_IKCONFIG=y 53CONFIG_IKCONFIG=y
53CONFIG_IKCONFIG_PROC=y 54CONFIG_IKCONFIG_PROC=y
54CONFIG_LOG_BUF_SHIFT=17 55CONFIG_LOG_BUF_SHIFT=17
@@ -243,6 +244,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
243# CONFIG_NETFILTER is not set 244# CONFIG_NETFILTER is not set
244# CONFIG_IP_DCCP is not set 245# CONFIG_IP_DCCP is not set
245# CONFIG_IP_SCTP is not set 246# CONFIG_IP_SCTP is not set
247# CONFIG_RDS is not set
246# CONFIG_TIPC is not set 248# CONFIG_TIPC is not set
247# CONFIG_ATM is not set 249# CONFIG_ATM is not set
248# CONFIG_BRIDGE is not set 250# CONFIG_BRIDGE is not set
@@ -272,6 +274,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
272# CONFIG_AF_RXRPC is not set 274# CONFIG_AF_RXRPC is not set
273CONFIG_WIRELESS=y 275CONFIG_WIRELESS=y
274# CONFIG_CFG80211 is not set 276# CONFIG_CFG80211 is not set
277CONFIG_CFG80211_DEFAULT_PS_VALUE=0
275CONFIG_WIRELESS_OLD_REGULATORY=y 278CONFIG_WIRELESS_OLD_REGULATORY=y
276# CONFIG_WIRELESS_EXT is not set 279# CONFIG_WIRELESS_EXT is not set
277# CONFIG_LIB80211 is not set 280# CONFIG_LIB80211 is not set
@@ -279,7 +282,6 @@ CONFIG_WIRELESS_OLD_REGULATORY=y
279# 282#
280# CFG80211 needs to be enabled for MAC80211 283# CFG80211 needs to be enabled for MAC80211
281# 284#
282CONFIG_MAC80211_DEFAULT_PS_VALUE=0
283# CONFIG_WIMAX is not set 285# CONFIG_WIMAX is not set
284# CONFIG_RFKILL is not set 286# CONFIG_RFKILL is not set
285# CONFIG_NET_9P is not set 287# CONFIG_NET_9P is not set
@@ -304,6 +306,7 @@ CONFIG_MTD_PARTITIONS=y
304# CONFIG_MTD_TESTS is not set 306# CONFIG_MTD_TESTS is not set
305# CONFIG_MTD_REDBOOT_PARTS is not set 307# CONFIG_MTD_REDBOOT_PARTS is not set
306CONFIG_MTD_CMDLINE_PARTS=y 308CONFIG_MTD_CMDLINE_PARTS=y
309# CONFIG_MTD_OF_PARTS is not set
307# CONFIG_MTD_AR7_PARTS is not set 310# CONFIG_MTD_AR7_PARTS is not set
308 311
309# 312#
@@ -349,6 +352,7 @@ CONFIG_MTD_RAM=y
349# 352#
350# CONFIG_MTD_COMPLEX_MAPPINGS is not set 353# CONFIG_MTD_COMPLEX_MAPPINGS is not set
351# CONFIG_MTD_PHYSMAP is not set 354# CONFIG_MTD_PHYSMAP is not set
355# CONFIG_MTD_PHYSMAP_OF is not set
352CONFIG_MTD_UCLINUX=y 356CONFIG_MTD_UCLINUX=y
353# CONFIG_MTD_PLATRAM is not set 357# CONFIG_MTD_PLATRAM is not set
354 358
@@ -429,12 +433,10 @@ CONFIG_NET_ETHERNET=y
429# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set 433# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
430# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 434# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
431# CONFIG_KS8842 is not set 435# CONFIG_KS8842 is not set
436# CONFIG_XILINX_EMACLITE is not set
432CONFIG_NETDEV_1000=y 437CONFIG_NETDEV_1000=y
433CONFIG_NETDEV_10000=y 438CONFIG_NETDEV_10000=y
434 439CONFIG_WLAN=y
435#
436# Wireless LAN
437#
438# CONFIG_WLAN_PRE80211 is not set 440# CONFIG_WLAN_PRE80211 is not set
439# CONFIG_WLAN_80211 is not set 441# CONFIG_WLAN_80211 is not set
440 442
@@ -535,7 +537,7 @@ CONFIG_VIDEO_OUTPUT_CONTROL=y
535CONFIG_USB_SUPPORT=y 537CONFIG_USB_SUPPORT=y
536CONFIG_USB_ARCH_HAS_HCD=y 538CONFIG_USB_ARCH_HAS_HCD=y
537# CONFIG_USB_ARCH_HAS_OHCI is not set 539# CONFIG_USB_ARCH_HAS_OHCI is not set
538# CONFIG_USB_ARCH_HAS_EHCI is not set 540CONFIG_USB_ARCH_HAS_EHCI=y
539# CONFIG_USB is not set 541# CONFIG_USB is not set
540# CONFIG_USB_OTG_WHITELIST is not set 542# CONFIG_USB_OTG_WHITELIST is not set
541# CONFIG_USB_OTG_BLACKLIST_HUB is not set 543# CONFIG_USB_OTG_BLACKLIST_HUB is not set
@@ -579,6 +581,7 @@ CONFIG_FS_POSIX_ACL=y
579# CONFIG_GFS2_FS is not set 581# CONFIG_GFS2_FS is not set
580# CONFIG_OCFS2_FS is not set 582# CONFIG_OCFS2_FS is not set
581# CONFIG_BTRFS_FS is not set 583# CONFIG_BTRFS_FS is not set
584# CONFIG_NILFS2_FS is not set
582CONFIG_FILE_LOCKING=y 585CONFIG_FILE_LOCKING=y
583CONFIG_FSNOTIFY=y 586CONFIG_FSNOTIFY=y
584# CONFIG_DNOTIFY is not set 587# CONFIG_DNOTIFY is not set
@@ -639,7 +642,6 @@ CONFIG_ROMFS_BACKED_BY_BLOCK=y
639CONFIG_ROMFS_ON_BLOCK=y 642CONFIG_ROMFS_ON_BLOCK=y
640# CONFIG_SYSV_FS is not set 643# CONFIG_SYSV_FS is not set
641# CONFIG_UFS_FS is not set 644# CONFIG_UFS_FS is not set
642# CONFIG_NILFS2_FS is not set
643CONFIG_NETWORK_FILESYSTEMS=y 645CONFIG_NETWORK_FILESYSTEMS=y
644CONFIG_NFS_FS=y 646CONFIG_NFS_FS=y
645CONFIG_NFS_V3=y 647CONFIG_NFS_V3=y
@@ -710,18 +712,20 @@ CONFIG_DEBUG_INFO=y
710CONFIG_DEBUG_LIST=y 712CONFIG_DEBUG_LIST=y
711CONFIG_DEBUG_SG=y 713CONFIG_DEBUG_SG=y
712# CONFIG_DEBUG_NOTIFIERS is not set 714# CONFIG_DEBUG_NOTIFIERS is not set
715# CONFIG_DEBUG_CREDENTIALS is not set
713# CONFIG_BOOT_PRINTK_DELAY is not set 716# CONFIG_BOOT_PRINTK_DELAY is not set
714# CONFIG_RCU_TORTURE_TEST is not set 717# CONFIG_RCU_TORTURE_TEST is not set
715# CONFIG_RCU_CPU_STALL_DETECTOR is not set 718# CONFIG_RCU_CPU_STALL_DETECTOR is not set
716# CONFIG_BACKTRACE_SELF_TEST is not set 719# CONFIG_BACKTRACE_SELF_TEST is not set
717# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set 720# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
721# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
718# CONFIG_FAULT_INJECTION is not set 722# CONFIG_FAULT_INJECTION is not set
719CONFIG_SYSCTL_SYSCALL_CHECK=y 723CONFIG_SYSCTL_SYSCALL_CHECK=y
720# CONFIG_PAGE_POISONING is not set 724# CONFIG_PAGE_POISONING is not set
721# CONFIG_DYNAMIC_DEBUG is not set 725# CONFIG_DYNAMIC_DEBUG is not set
722# CONFIG_SAMPLES is not set 726# CONFIG_SAMPLES is not set
723CONFIG_EARLY_PRINTK=y 727CONFIG_EARLY_PRINTK=y
724CONFIG_HEART_BEAT=y 728# CONFIG_HEART_BEAT is not set
725# CONFIG_DEBUG_BOOTMEM is not set 729# CONFIG_DEBUG_BOOTMEM is not set
726 730
727# 731#
@@ -736,7 +740,6 @@ CONFIG_CRYPTO=y
736# 740#
737# Crypto core or helper 741# Crypto core or helper
738# 742#
739# CONFIG_CRYPTO_FIPS is not set
740# CONFIG_CRYPTO_MANAGER is not set 743# CONFIG_CRYPTO_MANAGER is not set
741# CONFIG_CRYPTO_MANAGER2 is not set 744# CONFIG_CRYPTO_MANAGER2 is not set
742# CONFIG_CRYPTO_GF128MUL is not set 745# CONFIG_CRYPTO_GF128MUL is not set
@@ -768,11 +771,13 @@ CONFIG_CRYPTO=y
768# 771#
769# CONFIG_CRYPTO_HMAC is not set 772# CONFIG_CRYPTO_HMAC is not set
770# CONFIG_CRYPTO_XCBC is not set 773# CONFIG_CRYPTO_XCBC is not set
774# CONFIG_CRYPTO_VMAC is not set
771 775
772# 776#
773# Digest 777# Digest
774# 778#
775# CONFIG_CRYPTO_CRC32C is not set 779# CONFIG_CRYPTO_CRC32C is not set
780# CONFIG_CRYPTO_GHASH is not set
776# CONFIG_CRYPTO_MD4 is not set 781# CONFIG_CRYPTO_MD4 is not set
777# CONFIG_CRYPTO_MD5 is not set 782# CONFIG_CRYPTO_MD5 is not set
778# CONFIG_CRYPTO_MICHAEL_MIC is not set 783# CONFIG_CRYPTO_MICHAEL_MIC is not set
diff --git a/arch/microblaze/include/asm/asm-compat.h b/arch/microblaze/include/asm/asm-compat.h
new file mode 100644
index 000000000000..e7bc9dc11b57
--- /dev/null
+++ b/arch/microblaze/include/asm/asm-compat.h
@@ -0,0 +1,17 @@
1#ifndef _ASM_MICROBLAZE_ASM_COMPAT_H
2#define _ASM_MICROBLAZE_ASM_COMPAT_H
3
4#include <asm/types.h>
5
6#ifdef __ASSEMBLY__
7# define stringify_in_c(...) __VA_ARGS__
8# define ASM_CONST(x) x
9#else
10/* This version of stringify will deal with commas... */
11# define __stringify_in_c(...) #__VA_ARGS__
12# define stringify_in_c(...) __stringify_in_c(__VA_ARGS__) " "
13# define __ASM_CONST(x) x##UL
14# define ASM_CONST(x) __ASM_CONST(x)
15#endif
16
17#endif /* _ASM_MICROBLAZE_ASM_COMPAT_H */
diff --git a/arch/microblaze/include/asm/io.h b/arch/microblaze/include/asm/io.h
index 7c3ec13b44d8..fc9997b73c09 100644
--- a/arch/microblaze/include/asm/io.h
+++ b/arch/microblaze/include/asm/io.h
@@ -210,6 +210,9 @@ static inline void __iomem *__ioremap(phys_addr_t address, unsigned long size,
210#define in_be32(a) __raw_readl((const void __iomem __force *)(a)) 210#define in_be32(a) __raw_readl((const void __iomem __force *)(a))
211#define in_be16(a) __raw_readw(a) 211#define in_be16(a) __raw_readw(a)
212 212
213#define writel_be(v, a) out_be32((__force unsigned *)a, v)
214#define readl_be(a) in_be32((__force unsigned *)a)
215
213/* 216/*
214 * Little endian 217 * Little endian
215 */ 218 */
diff --git a/arch/microblaze/include/asm/ipc.h b/arch/microblaze/include/asm/ipc.h
deleted file mode 100644
index a46e3d9c2a3f..000000000000
--- a/arch/microblaze/include/asm/ipc.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/ipc.h>
diff --git a/arch/microblaze/include/asm/page.h b/arch/microblaze/include/asm/page.h
index 72aceae88680..880c988c2237 100644
--- a/arch/microblaze/include/asm/page.h
+++ b/arch/microblaze/include/asm/page.h
@@ -17,6 +17,7 @@
17 17
18#include <linux/pfn.h> 18#include <linux/pfn.h>
19#include <asm/setup.h> 19#include <asm/setup.h>
20#include <asm/asm-compat.h>
20#include <linux/const.h> 21#include <linux/const.h>
21 22
22#ifdef __KERNEL__ 23#ifdef __KERNEL__
@@ -26,6 +27,8 @@
26#define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT) 27#define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT)
27#define PAGE_MASK (~(PAGE_SIZE-1)) 28#define PAGE_MASK (~(PAGE_SIZE-1))
28 29
30#define LOAD_OFFSET ASM_CONST((CONFIG_KERNEL_START-CONFIG_KERNEL_BASE_ADDR))
31
29#ifndef __ASSEMBLY__ 32#ifndef __ASSEMBLY__
30 33
31#define PAGE_UP(addr) (((addr)+((PAGE_SIZE)-1))&(~((PAGE_SIZE)-1))) 34#define PAGE_UP(addr) (((addr)+((PAGE_SIZE)-1))&(~((PAGE_SIZE)-1)))
diff --git a/arch/microblaze/include/asm/setup.h b/arch/microblaze/include/asm/setup.h
index 27f8dafd8c34..ed67c9ed15b8 100644
--- a/arch/microblaze/include/asm/setup.h
+++ b/arch/microblaze/include/asm/setup.h
@@ -38,7 +38,7 @@ extern void early_console_reg_tlb_alloc(unsigned int addr);
38void time_init(void); 38void time_init(void);
39void init_IRQ(void); 39void init_IRQ(void);
40void machine_early_init(const char *cmdline, unsigned int ram, 40void machine_early_init(const char *cmdline, unsigned int ram,
41 unsigned int fdt); 41 unsigned int fdt, unsigned int msr);
42 42
43void machine_restart(char *cmd); 43void machine_restart(char *cmd);
44void machine_shutdown(void); 44void machine_shutdown(void);
diff --git a/arch/microblaze/include/asm/syscall.h b/arch/microblaze/include/asm/syscall.h
new file mode 100644
index 000000000000..048dfcd8d89d
--- /dev/null
+++ b/arch/microblaze/include/asm/syscall.h
@@ -0,0 +1,99 @@
1#ifndef __ASM_MICROBLAZE_SYSCALL_H
2#define __ASM_MICROBLAZE_SYSCALL_H
3
4#include <linux/kernel.h>
5#include <linux/sched.h>
6#include <asm/ptrace.h>
7
8/* The system call number is given by the user in R12 */
9static inline long syscall_get_nr(struct task_struct *task,
10 struct pt_regs *regs)
11{
12 return regs->r12;
13}
14
15static inline void syscall_rollback(struct task_struct *task,
16 struct pt_regs *regs)
17{
18 /* TODO. */
19}
20
21static inline long syscall_get_error(struct task_struct *task,
22 struct pt_regs *regs)
23{
24 return IS_ERR_VALUE(regs->r3) ? regs->r3 : 0;
25}
26
27static inline long syscall_get_return_value(struct task_struct *task,
28 struct pt_regs *regs)
29{
30 return regs->r3;
31}
32
33static inline void syscall_set_return_value(struct task_struct *task,
34 struct pt_regs *regs,
35 int error, long val)
36{
37 if (error)
38 regs->r3 = -error;
39 else
40 regs->r3 = val;
41}
42
43static inline microblaze_reg_t microblaze_get_syscall_arg(struct pt_regs *regs,
44 unsigned int n)
45{
46 switch (n) {
47 case 5: return regs->r10;
48 case 4: return regs->r9;
49 case 3: return regs->r8;
50 case 2: return regs->r7;
51 case 1: return regs->r6;
52 case 0: return regs->r5;
53 default:
54 BUG();
55 }
56 return ~0;
57}
58
59static inline void microblaze_set_syscall_arg(struct pt_regs *regs,
60 unsigned int n,
61 unsigned long val)
62{
63 switch (n) {
64 case 5:
65 regs->r10 = val;
66 case 4:
67 regs->r9 = val;
68 case 3:
69 regs->r8 = val;
70 case 2:
71 regs->r7 = val;
72 case 1:
73 regs->r6 = val;
74 case 0:
75 regs->r5 = val;
76 default:
77 BUG();
78 }
79}
80
81static inline void syscall_get_arguments(struct task_struct *task,
82 struct pt_regs *regs,
83 unsigned int i, unsigned int n,
84 unsigned long *args)
85{
86 while (n--)
87 *args++ = microblaze_get_syscall_arg(regs, i++);
88}
89
90static inline void syscall_set_arguments(struct task_struct *task,
91 struct pt_regs *regs,
92 unsigned int i, unsigned int n,
93 const unsigned long *args)
94{
95 while (n--)
96 microblaze_set_syscall_arg(regs, i++, *args++);
97}
98
99#endif /* __ASM_MICROBLAZE_SYSCALL_H */
diff --git a/arch/microblaze/include/asm/unistd.h b/arch/microblaze/include/asm/unistd.h
index 0b852327c0e7..cb05a07e55e9 100644
--- a/arch/microblaze/include/asm/unistd.h
+++ b/arch/microblaze/include/asm/unistd.h
@@ -381,7 +381,7 @@
381#define __NR_preadv 363 /* new */ 381#define __NR_preadv 363 /* new */
382#define __NR_pwritev 364 /* new */ 382#define __NR_pwritev 364 /* new */
383#define __NR_rt_tgsigqueueinfo 365 /* new */ 383#define __NR_rt_tgsigqueueinfo 365 /* new */
384#define __NR_perf_counter_open 366 /* new */ 384#define __NR_perf_event_open 366 /* new */
385 385
386#define __NR_syscalls 367 386#define __NR_syscalls 367
387 387
diff --git a/arch/microblaze/kernel/cpu/cpuinfo.c b/arch/microblaze/kernel/cpu/cpuinfo.c
index c411c6757deb..3539babc1c18 100644
--- a/arch/microblaze/kernel/cpu/cpuinfo.c
+++ b/arch/microblaze/kernel/cpu/cpuinfo.c
@@ -28,6 +28,7 @@ const struct cpu_ver_key cpu_ver_lookup[] = {
28 {"7.10.d", 0x0b}, 28 {"7.10.d", 0x0b},
29 {"7.20.a", 0x0c}, 29 {"7.20.a", 0x0c},
30 {"7.20.b", 0x0d}, 30 {"7.20.b", 0x0d},
31 {"7.20.c", 0x0e},
31 /* FIXME There is no keycode defined in MBV for these versions */ 32 /* FIXME There is no keycode defined in MBV for these versions */
32 {"2.10.a", 0x10}, 33 {"2.10.a", 0x10},
33 {"3.00.a", 0x20}, 34 {"3.00.a", 0x20},
@@ -49,6 +50,8 @@ const struct family_string_key family_string_lookup[] = {
49 {"spartan3a", 0xa}, 50 {"spartan3a", 0xa},
50 {"spartan3an", 0xb}, 51 {"spartan3an", 0xb},
51 {"spartan3adsp", 0xc}, 52 {"spartan3adsp", 0xc},
53 {"spartan6", 0xd},
54 {"virtex6", 0xe},
52 /* FIXME There is no key code defined for spartan2 */ 55 /* FIXME There is no key code defined for spartan2 */
53 {"spartan2", 0xf0}, 56 {"spartan2", 0xf0},
54 {NULL, 0}, 57 {NULL, 0},
diff --git a/arch/microblaze/kernel/entry.S b/arch/microblaze/kernel/entry.S
index c7353e79f4a2..acc1f05d1e2c 100644
--- a/arch/microblaze/kernel/entry.S
+++ b/arch/microblaze/kernel/entry.S
@@ -308,38 +308,69 @@ C_ENTRY(_user_exception):
308 swi r12, r1, PTO+PT_R0; 308 swi r12, r1, PTO+PT_R0;
309 tovirt(r1,r1) 309 tovirt(r1,r1)
310 310
311 la r15, r0, ret_from_trap-8
312/* where the trap should return need -8 to adjust for rtsd r15, 8*/ 311/* where the trap should return need -8 to adjust for rtsd r15, 8*/
313/* Jump to the appropriate function for the system call number in r12 312/* Jump to the appropriate function for the system call number in r12
314 * (r12 is not preserved), or return an error if r12 is not valid. The LP 313 * (r12 is not preserved), or return an error if r12 is not valid. The LP
315 * register should point to the location where 314 * register should point to the location where
316 * the called function should return. [note that MAKE_SYS_CALL uses label 1] */ 315 * the called function should return. [note that MAKE_SYS_CALL uses label 1] */
317 /* See if the system call number is valid. */ 316
317 # Step into virtual mode.
318 set_vms;
319 addik r11, r0, 3f
320 rtid r11, 0
321 nop
3223:
323 add r11, r0, CURRENT_TASK /* Get current task ptr into r11 */
324 lwi r11, r11, TS_THREAD_INFO /* get thread info */
325 lwi r11, r11, TI_FLAGS /* get flags in thread info */
326 andi r11, r11, _TIF_WORK_SYSCALL_MASK
327 beqi r11, 4f
328
329 addik r3, r0, -ENOSYS
330 swi r3, r1, PTO + PT_R3
331 brlid r15, do_syscall_trace_enter
332 addik r5, r1, PTO + PT_R0
333
334 # do_syscall_trace_enter returns the new syscall nr.
335 addk r12, r0, r3
336 lwi r5, r1, PTO+PT_R5;
337 lwi r6, r1, PTO+PT_R6;
338 lwi r7, r1, PTO+PT_R7;
339 lwi r8, r1, PTO+PT_R8;
340 lwi r9, r1, PTO+PT_R9;
341 lwi r10, r1, PTO+PT_R10;
3424:
343/* Jump to the appropriate function for the system call number in r12
344 * (r12 is not preserved), or return an error if r12 is not valid.
345 * The LP register should point to the location where the called function
346 * should return. [note that MAKE_SYS_CALL uses label 1] */
347 /* See if the system call number is valid */
318 addi r11, r12, -__NR_syscalls; 348 addi r11, r12, -__NR_syscalls;
319 bgei r11,1f; 349 bgei r11,5f;
320 /* Figure out which function to use for this system call. */ 350 /* Figure out which function to use for this system call. */
321 /* Note Microblaze barrel shift is optional, so don't rely on it */ 351 /* Note Microblaze barrel shift is optional, so don't rely on it */
322 add r12, r12, r12; /* convert num -> ptr */ 352 add r12, r12, r12; /* convert num -> ptr */
323 add r12, r12, r12; 353 add r12, r12, r12;
324 354
325 /* Trac syscalls and stored them to r0_ram */ 355 /* Trac syscalls and stored them to r0_ram */
326 lwi r3, r12, 0x400 + TOPHYS(r0_ram) 356 lwi r3, r12, 0x400 + r0_ram
327 addi r3, r3, 1 357 addi r3, r3, 1
328 swi r3, r12, 0x400 + TOPHYS(r0_ram) 358 swi r3, r12, 0x400 + r0_ram
359
360 # Find and jump into the syscall handler.
361 lwi r12, r12, sys_call_table
362 /* where the trap should return need -8 to adjust for rtsd r15, 8 */
363 la r15, r0, ret_from_trap-8
364 bra r12
329 365
330 lwi r12, r12, TOPHYS(sys_call_table); /* Function ptr */
331 /* Make the system call. to r12*/
332 set_vms;
333 rtid r12, 0;
334 nop;
335 /* The syscall number is invalid, return an error. */ 366 /* The syscall number is invalid, return an error. */
3361: VM_ON; /* RETURN() expects virtual mode*/ 3675:
337 addi r3, r0, -ENOSYS; 368 addi r3, r0, -ENOSYS;
338 rtsd r15,8; /* looks like a normal subroutine return */ 369 rtsd r15,8; /* looks like a normal subroutine return */
339 or r0, r0, r0 370 or r0, r0, r0
340 371
341 372
342/* Entry point used to return from a syscall/trap. */ 373/* Entry point used to return from a syscall/trap */
343/* We re-enable BIP bit before state restore */ 374/* We re-enable BIP bit before state restore */
344C_ENTRY(ret_from_trap): 375C_ENTRY(ret_from_trap):
345 set_bip; /* Ints masked for state restore*/ 376 set_bip; /* Ints masked for state restore*/
@@ -349,6 +380,23 @@ C_ENTRY(ret_from_trap):
349 380
350 /* We're returning to user mode, so check for various conditions that 381 /* We're returning to user mode, so check for various conditions that
351 * trigger rescheduling. */ 382 * trigger rescheduling. */
383 # FIXME: Restructure all these flag checks.
384 add r11, r0, CURRENT_TASK; /* Get current task ptr into r11 */
385 lwi r11, r11, TS_THREAD_INFO; /* get thread info */
386 lwi r11, r11, TI_FLAGS; /* get flags in thread info */
387 andi r11, r11, _TIF_WORK_SYSCALL_MASK
388 beqi r11, 1f
389
390 swi r3, r1, PTO + PT_R3
391 swi r4, r1, PTO + PT_R4
392 brlid r15, do_syscall_trace_leave
393 addik r5, r1, PTO + PT_R0
394 lwi r3, r1, PTO + PT_R3
395 lwi r4, r1, PTO + PT_R4
3961:
397
398 /* We're returning to user mode, so check for various conditions that
399 * trigger rescheduling. */
352 /* Get current task ptr into r11 */ 400 /* Get current task ptr into r11 */
353 add r11, r0, CURRENT_TASK; /* Get current task ptr into r11 */ 401 add r11, r0, CURRENT_TASK; /* Get current task ptr into r11 */
354 lwi r11, r11, TS_THREAD_INFO; /* get thread info */ 402 lwi r11, r11, TS_THREAD_INFO; /* get thread info */
diff --git a/arch/microblaze/kernel/exceptions.c b/arch/microblaze/kernel/exceptions.c
index 0cb64a31e89a..d9f70f83097f 100644
--- a/arch/microblaze/kernel/exceptions.c
+++ b/arch/microblaze/kernel/exceptions.c
@@ -72,7 +72,8 @@ asmlinkage void full_exception(struct pt_regs *regs, unsigned int type,
72#endif 72#endif
73 73
74#if 0 74#if 0
75 printk(KERN_WARNING "Exception %02x in %s mode, FSR=%08x PC=%08x ESR=%08x\n", 75 printk(KERN_WARNING "Exception %02x in %s mode, FSR=%08x PC=%08x " \
76 "ESR=%08x\n",
76 type, user_mode(regs) ? "user" : "kernel", fsr, 77 type, user_mode(regs) ? "user" : "kernel", fsr,
77 (unsigned int) regs->pc, (unsigned int) regs->esr); 78 (unsigned int) regs->pc, (unsigned int) regs->esr);
78#endif 79#endif
@@ -80,42 +81,50 @@ asmlinkage void full_exception(struct pt_regs *regs, unsigned int type,
80 switch (type & 0x1F) { 81 switch (type & 0x1F) {
81 case MICROBLAZE_ILL_OPCODE_EXCEPTION: 82 case MICROBLAZE_ILL_OPCODE_EXCEPTION:
82 if (user_mode(regs)) { 83 if (user_mode(regs)) {
83 printk(KERN_WARNING "Illegal opcode exception in user mode.\n"); 84 pr_debug(KERN_WARNING "Illegal opcode exception " \
85 "in user mode.\n");
84 _exception(SIGILL, regs, ILL_ILLOPC, addr); 86 _exception(SIGILL, regs, ILL_ILLOPC, addr);
85 return; 87 return;
86 } 88 }
87 printk(KERN_WARNING "Illegal opcode exception in kernel mode.\n"); 89 printk(KERN_WARNING "Illegal opcode exception " \
90 "in kernel mode.\n");
88 die("opcode exception", regs, SIGBUS); 91 die("opcode exception", regs, SIGBUS);
89 break; 92 break;
90 case MICROBLAZE_IBUS_EXCEPTION: 93 case MICROBLAZE_IBUS_EXCEPTION:
91 if (user_mode(regs)) { 94 if (user_mode(regs)) {
92 printk(KERN_WARNING "Instruction bus error exception in user mode.\n"); 95 pr_debug(KERN_WARNING "Instruction bus error " \
96 "exception in user mode.\n");
93 _exception(SIGBUS, regs, BUS_ADRERR, addr); 97 _exception(SIGBUS, regs, BUS_ADRERR, addr);
94 return; 98 return;
95 } 99 }
96 printk(KERN_WARNING "Instruction bus error exception in kernel mode.\n"); 100 printk(KERN_WARNING "Instruction bus error exception " \
101 "in kernel mode.\n");
97 die("bus exception", regs, SIGBUS); 102 die("bus exception", regs, SIGBUS);
98 break; 103 break;
99 case MICROBLAZE_DBUS_EXCEPTION: 104 case MICROBLAZE_DBUS_EXCEPTION:
100 if (user_mode(regs)) { 105 if (user_mode(regs)) {
101 printk(KERN_WARNING "Data bus error exception in user mode.\n"); 106 pr_debug(KERN_WARNING "Data bus error exception " \
107 "in user mode.\n");
102 _exception(SIGBUS, regs, BUS_ADRERR, addr); 108 _exception(SIGBUS, regs, BUS_ADRERR, addr);
103 return; 109 return;
104 } 110 }
105 printk(KERN_WARNING "Data bus error exception in kernel mode.\n"); 111 printk(KERN_WARNING "Data bus error exception " \
112 "in kernel mode.\n");
106 die("bus exception", regs, SIGBUS); 113 die("bus exception", regs, SIGBUS);
107 break; 114 break;
108 case MICROBLAZE_DIV_ZERO_EXCEPTION: 115 case MICROBLAZE_DIV_ZERO_EXCEPTION:
109 if (user_mode(regs)) { 116 if (user_mode(regs)) {
110 printk(KERN_WARNING "Divide by zero exception in user mode\n"); 117 pr_debug(KERN_WARNING "Divide by zero exception " \
111 _exception(SIGILL, regs, ILL_ILLOPC, addr); 118 "in user mode\n");
119 _exception(SIGILL, regs, FPE_INTDIV, addr);
112 return; 120 return;
113 } 121 }
114 printk(KERN_WARNING "Divide by zero exception in kernel mode.\n"); 122 printk(KERN_WARNING "Divide by zero exception " \
123 "in kernel mode.\n");
115 die("Divide by exception", regs, SIGBUS); 124 die("Divide by exception", regs, SIGBUS);
116 break; 125 break;
117 case MICROBLAZE_FPU_EXCEPTION: 126 case MICROBLAZE_FPU_EXCEPTION:
118 printk(KERN_WARNING "FPU exception\n"); 127 pr_debug(KERN_WARNING "FPU exception\n");
119 /* IEEE FP exception */ 128 /* IEEE FP exception */
120 /* I removed fsr variable and use code var for storing fsr */ 129 /* I removed fsr variable and use code var for storing fsr */
121 if (fsr & FSR_IO) 130 if (fsr & FSR_IO)
@@ -133,7 +142,7 @@ asmlinkage void full_exception(struct pt_regs *regs, unsigned int type,
133 142
134#ifdef CONFIG_MMU 143#ifdef CONFIG_MMU
135 case MICROBLAZE_PRIVILEGED_EXCEPTION: 144 case MICROBLAZE_PRIVILEGED_EXCEPTION:
136 printk(KERN_WARNING "Privileged exception\n"); 145 pr_debug(KERN_WARNING "Privileged exception\n");
137 /* "brk r0,r0" - used as debug breakpoint */ 146 /* "brk r0,r0" - used as debug breakpoint */
138 if (get_user(code, (unsigned long *)regs->pc) == 0 147 if (get_user(code, (unsigned long *)regs->pc) == 0
139 && code == 0x980c0000) { 148 && code == 0x980c0000) {
diff --git a/arch/microblaze/kernel/head.S b/arch/microblaze/kernel/head.S
index e41c6ce2a7be..697ce3007f30 100644
--- a/arch/microblaze/kernel/head.S
+++ b/arch/microblaze/kernel/head.S
@@ -54,6 +54,16 @@ ENTRY(_start)
54 mfs r1, rmsr 54 mfs r1, rmsr
55 andi r1, r1, ~2 55 andi r1, r1, ~2
56 mts rmsr, r1 56 mts rmsr, r1
57/*
58 * Here is checking mechanism which check if Microblaze has msr instructions
59 * We load msr and compare it with previous r1 value - if is the same,
60 * msr instructions works if not - cpu don't have them.
61 */
62 /* r8=0 - I have msr instr, 1 - I don't have them */
63 rsubi r0, r0, 1 /* set the carry bit */
64 msrclr r0, 0x4 /* try to clear it */
65 /* read the carry bit, r8 will be '0' if msrclr exists */
66 addik r8, r0, 0
57 67
58/* r7 may point to an FDT, or there may be one linked in. 68/* r7 may point to an FDT, or there may be one linked in.
59 if it's in r7, we've got to save it away ASAP. 69 if it's in r7, we've got to save it away ASAP.
@@ -209,8 +219,8 @@ start_here:
209 * Please see $(ARCH)/mach-$(SUBARCH)/setup.c for 219 * Please see $(ARCH)/mach-$(SUBARCH)/setup.c for
210 * the function. 220 * the function.
211 */ 221 */
212 la r8, r0, machine_early_init 222 la r9, r0, machine_early_init
213 brald r15, r8 223 brald r15, r9
214 nop 224 nop
215 225
216#ifndef CONFIG_MMU 226#ifndef CONFIG_MMU
diff --git a/arch/microblaze/kernel/hw_exception_handler.S b/arch/microblaze/kernel/hw_exception_handler.S
index 3288c9737671..6b0288ebccd6 100644
--- a/arch/microblaze/kernel/hw_exception_handler.S
+++ b/arch/microblaze/kernel/hw_exception_handler.S
@@ -84,9 +84,10 @@
84#define NUM_TO_REG(num) r ## num 84#define NUM_TO_REG(num) r ## num
85 85
86#ifdef CONFIG_MMU 86#ifdef CONFIG_MMU
87/* FIXME you can't change first load of MSR because there is
88 * hardcoded jump bri 4 */
89 #define RESTORE_STATE \ 87 #define RESTORE_STATE \
88 lwi r5, r1, 0; \
89 mts rmsr, r5; \
90 nop; \
90 lwi r3, r1, PT_R3; \ 91 lwi r3, r1, PT_R3; \
91 lwi r4, r1, PT_R4; \ 92 lwi r4, r1, PT_R4; \
92 lwi r5, r1, PT_R5; \ 93 lwi r5, r1, PT_R5; \
@@ -309,6 +310,9 @@ _hw_exception_handler:
309 lwi r31, r0, TOPHYS(PER_CPU(CURRENT_SAVE)) /* get saved current */ 310 lwi r31, r0, TOPHYS(PER_CPU(CURRENT_SAVE)) /* get saved current */
310#endif 311#endif
311 312
313 mfs r5, rmsr;
314 nop
315 swi r5, r1, 0;
312 mfs r3, resr 316 mfs r3, resr
313 nop 317 nop
314 mfs r4, rear; 318 mfs r4, rear;
@@ -380,6 +384,8 @@ handle_other_ex: /* Handle Other exceptions here */
380 addk r8, r17, r0; /* Load exception address */ 384 addk r8, r17, r0; /* Load exception address */
381 bralid r15, full_exception; /* Branch to the handler */ 385 bralid r15, full_exception; /* Branch to the handler */
382 nop; 386 nop;
387 mts r0, rfsr; /* Clear sticky fsr */
388 nop
383 389
384 /* 390 /*
385 * Trigger execution of the signal handler by enabling 391 * Trigger execution of the signal handler by enabling
diff --git a/arch/microblaze/kernel/init_task.c b/arch/microblaze/kernel/init_task.c
index 67da22579b62..b5d711f94ff8 100644
--- a/arch/microblaze/kernel/init_task.c
+++ b/arch/microblaze/kernel/init_task.c
@@ -19,9 +19,8 @@
19static struct signal_struct init_signals = INIT_SIGNALS(init_signals); 19static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
20static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); 20static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
21 21
22union thread_union init_thread_union 22union thread_union init_thread_union __init_task_data =
23 __attribute__((__section__(".data.init_task"))) = 23 { INIT_THREAD_INFO(init_task) };
24{ INIT_THREAD_INFO(init_task) };
25 24
26struct task_struct init_task = INIT_TASK(init_task); 25struct task_struct init_task = INIT_TASK(init_task);
27EXPORT_SYMBOL(init_task); 26EXPORT_SYMBOL(init_task);
diff --git a/arch/microblaze/kernel/process.c b/arch/microblaze/kernel/process.c
index 00b12c6d5326..4201c743cc9f 100644
--- a/arch/microblaze/kernel/process.c
+++ b/arch/microblaze/kernel/process.c
@@ -235,6 +235,7 @@ void start_thread(struct pt_regs *regs, unsigned long pc, unsigned long usp)
235 regs->pc = pc; 235 regs->pc = pc;
236 regs->r1 = usp; 236 regs->r1 = usp;
237 regs->pt_mode = 0; 237 regs->pt_mode = 0;
238 regs->msr |= MSR_UMS;
238} 239}
239 240
240#ifdef CONFIG_MMU 241#ifdef CONFIG_MMU
diff --git a/arch/microblaze/kernel/ptrace.c b/arch/microblaze/kernel/ptrace.c
index 53ff39af6a5c..4b3ac32754de 100644
--- a/arch/microblaze/kernel/ptrace.c
+++ b/arch/microblaze/kernel/ptrace.c
@@ -29,6 +29,10 @@
29#include <linux/sched.h> 29#include <linux/sched.h>
30#include <linux/ptrace.h> 30#include <linux/ptrace.h>
31#include <linux/signal.h> 31#include <linux/signal.h>
32#include <linux/elf.h>
33#include <linux/audit.h>
34#include <linux/seccomp.h>
35#include <linux/tracehook.h>
32 36
33#include <linux/errno.h> 37#include <linux/errno.h>
34#include <asm/processor.h> 38#include <asm/processor.h>
@@ -174,6 +178,64 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
174 return rval; 178 return rval;
175} 179}
176 180
181asmlinkage long do_syscall_trace_enter(struct pt_regs *regs)
182{
183 long ret = 0;
184
185 secure_computing(regs->r12);
186
187 if (test_thread_flag(TIF_SYSCALL_TRACE) &&
188 tracehook_report_syscall_entry(regs))
189 /*
190 * Tracing decided this syscall should not happen.
191 * We'll return a bogus call number to get an ENOSYS
192 * error, but leave the original number in regs->regs[0].
193 */
194 ret = -1L;
195
196 if (unlikely(current->audit_context))
197 audit_syscall_entry(EM_XILINX_MICROBLAZE, regs->r12,
198 regs->r5, regs->r6,
199 regs->r7, regs->r8);
200
201 return ret ?: regs->r12;
202}
203
204asmlinkage void do_syscall_trace_leave(struct pt_regs *regs)
205{
206 int step;
207
208 if (unlikely(current->audit_context))
209 audit_syscall_exit(AUDITSC_RESULT(regs->r3), regs->r3);
210
211 step = test_thread_flag(TIF_SINGLESTEP);
212 if (step || test_thread_flag(TIF_SYSCALL_TRACE))
213 tracehook_report_syscall_exit(regs, step);
214}
215
216#if 0
217static asmlinkage void syscall_trace(void)
218{
219 if (!test_thread_flag(TIF_SYSCALL_TRACE))
220 return;
221 if (!(current->ptrace & PT_PTRACED))
222 return;
223 /* The 0x80 provides a way for the tracing parent to distinguish
224 between a syscall stop and SIGTRAP delivery */
225 ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD)
226 ? 0x80 : 0));
227 /*
228 * this isn't the same as continuing with a signal, but it will do
229 * for normal use. strace only continues with a signal if the
230 * stopping signal is not SIGTRAP. -brl
231 */
232 if (current->exit_code) {
233 send_sig(current->exit_code, current, 1);
234 current->exit_code = 0;
235 }
236}
237#endif
238
177void ptrace_disable(struct task_struct *child) 239void ptrace_disable(struct task_struct *child)
178{ 240{
179 /* nothing to do */ 241 /* nothing to do */
diff --git a/arch/microblaze/kernel/setup.c b/arch/microblaze/kernel/setup.c
index 2a97bf513b64..8c1e0f4dcf18 100644
--- a/arch/microblaze/kernel/setup.c
+++ b/arch/microblaze/kernel/setup.c
@@ -94,7 +94,7 @@ inline unsigned get_romfs_len(unsigned *addr)
94#endif /* CONFIG_MTD_UCLINUX_EBSS */ 94#endif /* CONFIG_MTD_UCLINUX_EBSS */
95 95
96void __init machine_early_init(const char *cmdline, unsigned int ram, 96void __init machine_early_init(const char *cmdline, unsigned int ram,
97 unsigned int fdt) 97 unsigned int fdt, unsigned int msr)
98{ 98{
99 unsigned long *src, *dst = (unsigned long *)0x0; 99 unsigned long *src, *dst = (unsigned long *)0x0;
100 100
@@ -157,6 +157,16 @@ void __init machine_early_init(const char *cmdline, unsigned int ram,
157 early_printk("New klimit: 0x%08x\n", (unsigned)klimit); 157 early_printk("New klimit: 0x%08x\n", (unsigned)klimit);
158#endif 158#endif
159 159
160#if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR
161 if (msr)
162 early_printk("!!!Your kernel has setup MSR instruction but "
163 "CPU don't have it %d\n", msr);
164#else
165 if (!msr)
166 early_printk("!!!Your kernel not setup MSR instruction but "
167 "CPU have it %d\n", msr);
168#endif
169
160 for (src = __ivt_start; src < __ivt_end; src++, dst++) 170 for (src = __ivt_start; src < __ivt_end; src++, dst++)
161 *dst = *src; 171 *dst = *src;
162 172
diff --git a/arch/microblaze/kernel/sys_microblaze.c b/arch/microblaze/kernel/sys_microblaze.c
index b96f1682bb24..07cabed4b947 100644
--- a/arch/microblaze/kernel/sys_microblaze.c
+++ b/arch/microblaze/kernel/sys_microblaze.c
@@ -23,7 +23,6 @@
23#include <linux/mman.h> 23#include <linux/mman.h>
24#include <linux/sys.h> 24#include <linux/sys.h>
25#include <linux/ipc.h> 25#include <linux/ipc.h>
26#include <linux/utsname.h>
27#include <linux/file.h> 26#include <linux/file.h>
28#include <linux/module.h> 27#include <linux/module.h>
29#include <linux/err.h> 28#include <linux/err.h>
diff --git a/arch/microblaze/kernel/syscall_table.S b/arch/microblaze/kernel/syscall_table.S
index 457216097dfd..ecec19155135 100644
--- a/arch/microblaze/kernel/syscall_table.S
+++ b/arch/microblaze/kernel/syscall_table.S
@@ -370,4 +370,4 @@ ENTRY(sys_call_table)
370 .long sys_ni_syscall 370 .long sys_ni_syscall
371 .long sys_ni_syscall 371 .long sys_ni_syscall
372 .long sys_rt_tgsigqueueinfo /* 365 */ 372 .long sys_rt_tgsigqueueinfo /* 365 */
373 .long sys_perf_counter_open 373 .long sys_perf_event_open
diff --git a/arch/microblaze/kernel/vmlinux.lds.S b/arch/microblaze/kernel/vmlinux.lds.S
index ec5fa91a48d8..e704188d7855 100644
--- a/arch/microblaze/kernel/vmlinux.lds.S
+++ b/arch/microblaze/kernel/vmlinux.lds.S
@@ -12,13 +12,16 @@ OUTPUT_FORMAT("elf32-microblaze", "elf32-microblaze", "elf32-microblaze")
12OUTPUT_ARCH(microblaze) 12OUTPUT_ARCH(microblaze)
13ENTRY(_start) 13ENTRY(_start)
14 14
15#include <asm/page.h>
15#include <asm-generic/vmlinux.lds.h> 16#include <asm-generic/vmlinux.lds.h>
17#include <asm/thread_info.h>
16 18
17jiffies = jiffies_64 + 4; 19jiffies = jiffies_64 + 4;
18 20
19SECTIONS { 21SECTIONS {
20 . = CONFIG_KERNEL_START; 22 . = CONFIG_KERNEL_START;
21 .text : { 23 _start = CONFIG_KERNEL_BASE_ADDR;
24 .text : AT(ADDR(.text) - LOAD_OFFSET) {
22 _text = . ; 25 _text = . ;
23 _stext = . ; 26 _stext = . ;
24 *(.text .text.*) 27 *(.text .text.*)
@@ -33,24 +36,22 @@ SECTIONS {
33 } 36 }
34 37
35 . = ALIGN (4) ; 38 . = ALIGN (4) ;
36 _fdt_start = . ; /* place for fdt blob */ 39 __fdt_blob : AT(ADDR(__fdt_blob) - LOAD_OFFSET) {
37 . = . + 0x4000; 40 _fdt_start = . ; /* place for fdt blob */
38 _fdt_end = . ; 41 *(__fdt_blob) ; /* Any link-placed DTB */
42 . = _fdt_start + 0x4000; /* Pad up to 16kbyte */
43 _fdt_end = . ;
44 }
39 45
40 . = ALIGN(16); 46 . = ALIGN(16);
41 RODATA 47 RODATA
42 . = ALIGN(16); 48 EXCEPTION_TABLE(16)
43 __ex_table : {
44 __start___ex_table = .;
45 *(__ex_table)
46 __stop___ex_table = .;
47 }
48 49
49 /* 50 /*
50 * sdata2 section can go anywhere, but must be word aligned 51 * sdata2 section can go anywhere, but must be word aligned
51 * and SDA2_BASE must point to the middle of it 52 * and SDA2_BASE must point to the middle of it
52 */ 53 */
53 .sdata2 : { 54 .sdata2 : AT(ADDR(.sdata2) - LOAD_OFFSET) {
54 _ssrw = .; 55 _ssrw = .;
55 . = ALIGN(4096); /* page aligned when MMU used - origin 0x8 */ 56 . = ALIGN(4096); /* page aligned when MMU used - origin 0x8 */
56 *(.sdata2) 57 *(.sdata2)
@@ -61,12 +62,7 @@ SECTIONS {
61 } 62 }
62 63
63 _sdata = . ; 64 _sdata = . ;
64 .data ALIGN (4096) : { /* page aligned when MMU used - origin 0x4 */ 65 RW_DATA_SECTION(32, PAGE_SIZE, THREAD_SIZE)
65 DATA_DATA
66 CONSTRUCTORS
67 }
68 . = ALIGN(32);
69 .data.cacheline_aligned : { *(.data.cacheline_aligned) }
70 _edata = . ; 66 _edata = . ;
71 67
72 /* Reserve some low RAM for r0 based memory references */ 68 /* Reserve some low RAM for r0 based memory references */
@@ -74,18 +70,14 @@ SECTIONS {
74 r0_ram = . ; 70 r0_ram = . ;
75 . = . + 4096; /* a page should be enough */ 71 . = . + 4096; /* a page should be enough */
76 72
77 /* The initial task */
78 . = ALIGN(8192);
79 .data.init_task : { *(.data.init_task) }
80
81 /* Under the microblaze ABI, .sdata and .sbss must be contiguous */ 73 /* Under the microblaze ABI, .sdata and .sbss must be contiguous */
82 . = ALIGN(8); 74 . = ALIGN(8);
83 .sdata : { 75 .sdata : AT(ADDR(.sdata) - LOAD_OFFSET) {
84 _ssro = .; 76 _ssro = .;
85 *(.sdata) 77 *(.sdata)
86 } 78 }
87 79
88 .sbss : { 80 .sbss : AT(ADDR(.sbss) - LOAD_OFFSET) {
89 _ssbss = .; 81 _ssbss = .;
90 *(.sbss) 82 *(.sbss)
91 _esbss = .; 83 _esbss = .;
@@ -96,47 +88,36 @@ SECTIONS {
96 88
97 __init_begin = .; 89 __init_begin = .;
98 90
99 . = ALIGN(4096); 91 INIT_TEXT_SECTION(PAGE_SIZE)
100 .init.text : {
101 _sinittext = . ;
102 INIT_TEXT
103 _einittext = .;
104 }
105 92
106 .init.data : { 93 .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) {
107 INIT_DATA 94 INIT_DATA
108 } 95 }
109 96
110 . = ALIGN(4); 97 . = ALIGN(4);
111 .init.ivt : { 98 .init.ivt : AT(ADDR(.init.ivt) - LOAD_OFFSET) {
112 __ivt_start = .; 99 __ivt_start = .;
113 *(.init.ivt) 100 *(.init.ivt)
114 __ivt_end = .; 101 __ivt_end = .;
115 } 102 }
116 103
117 .init.setup : { 104 .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) {
118 __setup_start = .; 105 INIT_SETUP(0)
119 *(.init.setup)
120 __setup_end = .;
121 } 106 }
122 107
123 .initcall.init : { 108 .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET ) {
124 __initcall_start = .; 109 INIT_CALLS
125 INITCALLS
126 __initcall_end = .;
127 } 110 }
128 111
129 .con_initcall.init : { 112 .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET) {
130 __con_initcall_start = .; 113 CON_INITCALL
131 *(.con_initcall.init)
132 __con_initcall_end = .;
133 } 114 }
134 115
135 SECURITY_INIT 116 SECURITY_INIT
136 117
137 __init_end_before_initramfs = .; 118 __init_end_before_initramfs = .;
138 119
139 .init.ramfs ALIGN(4096) : { 120 .init.ramfs ALIGN(4096) : AT(ADDR(.init.ramfs) - LOAD_OFFSET) {
140 __initramfs_start = .; 121 __initramfs_start = .;
141 *(.init.ramfs) 122 *(.init.ramfs)
142 __initramfs_end = .; 123 __initramfs_end = .;
@@ -152,7 +133,8 @@ SECTIONS {
152 } 133 }
153 __init_end = .; 134 __init_end = .;
154 135
155 .bss ALIGN (4096) : { /* page aligned when MMU used */ 136 .bss ALIGN (4096) : AT(ADDR(.bss) - LOAD_OFFSET) {
137 /* page aligned when MMU used */
156 __bss_start = . ; 138 __bss_start = . ;
157 *(.bss*) 139 *(.bss*)
158 *(COMMON) 140 *(COMMON)
diff --git a/arch/microblaze/mm/init.c b/arch/microblaze/mm/init.c
index f207f1a94dbc..a44892e7cd5b 100644
--- a/arch/microblaze/mm/init.c
+++ b/arch/microblaze/mm/init.c
@@ -180,7 +180,8 @@ void free_initrd_mem(unsigned long start, unsigned long end)
180 totalram_pages++; 180 totalram_pages++;
181 pages++; 181 pages++;
182 } 182 }
183 printk(KERN_NOTICE "Freeing initrd memory: %dk freed\n", pages); 183 printk(KERN_NOTICE "Freeing initrd memory: %dk freed\n",
184 (int)(pages * (PAGE_SIZE / 1024)));
184} 185}
185#endif 186#endif
186 187
@@ -204,7 +205,7 @@ void __init mem_init(void)
204 totalram_pages += free_all_bootmem(); 205 totalram_pages += free_all_bootmem();
205 206
206 printk(KERN_INFO "Memory: %luk/%luk available\n", 207 printk(KERN_INFO "Memory: %luk/%luk available\n",
207 (unsigned long) nr_free_pages() << (PAGE_SHIFT-10), 208 nr_free_pages() << (PAGE_SHIFT-10),
208 num_physpages << (PAGE_SHIFT-10)); 209 num_physpages << (PAGE_SHIFT-10));
209#ifdef CONFIG_MMU 210#ifdef CONFIG_MMU
210 mem_init_done = 1; 211 mem_init_done = 1;
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 3ca0fe1a9123..705a7a9170f3 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -6,7 +6,7 @@ config MIPS
6 select HAVE_ARCH_KGDB 6 select HAVE_ARCH_KGDB
7 # Horrible source of confusion. Die, die, die ... 7 # Horrible source of confusion. Die, die, die ...
8 select EMBEDDED 8 select EMBEDDED
9 select RTC_LIB 9 select RTC_LIB if !LEMOTE_FULOONG2E
10 10
11mainmenu "Linux/MIPS Kernel Configuration" 11mainmenu "Linux/MIPS Kernel Configuration"
12 12
@@ -80,6 +80,21 @@ config BCM47XX
80 help 80 help
81 Support for BCM47XX based boards 81 Support for BCM47XX based boards
82 82
83config BCM63XX
84 bool "Broadcom BCM63XX based boards"
85 select CEVT_R4K
86 select CSRC_R4K
87 select DMA_NONCOHERENT
88 select IRQ_CPU
89 select SYS_HAS_CPU_MIPS32_R1
90 select SYS_SUPPORTS_32BIT_KERNEL
91 select SYS_SUPPORTS_BIG_ENDIAN
92 select SYS_HAS_EARLY_PRINTK
93 select SWAP_IO_SPACE
94 select ARCH_REQUIRE_GPIOLIB
95 help
96 Support for BCM63XX based boards
97
83config MIPS_COBALT 98config MIPS_COBALT
84 bool "Cobalt Server" 99 bool "Cobalt Server"
85 select CEVT_R4K 100 select CEVT_R4K
@@ -174,30 +189,15 @@ config LASAT
174 select SYS_SUPPORTS_64BIT_KERNEL if BROKEN 189 select SYS_SUPPORTS_64BIT_KERNEL if BROKEN
175 select SYS_SUPPORTS_LITTLE_ENDIAN 190 select SYS_SUPPORTS_LITTLE_ENDIAN
176 191
177config LEMOTE_FULONG 192config MACH_LOONGSON
178 bool "Lemote Fulong mini-PC" 193 bool "Loongson family of machines"
179 select ARCH_SPARSEMEM_ENABLE
180 select CEVT_R4K
181 select CSRC_R4K
182 select SYS_HAS_CPU_LOONGSON2
183 select DMA_NONCOHERENT
184 select BOOT_ELF32
185 select BOARD_SCACHE
186 select HAVE_STD_PC_SERIAL_PORT
187 select HW_HAS_PCI
188 select I8259
189 select ISA
190 select IRQ_CPU
191 select SYS_SUPPORTS_32BIT_KERNEL
192 select SYS_SUPPORTS_64BIT_KERNEL
193 select SYS_SUPPORTS_LITTLE_ENDIAN
194 select SYS_SUPPORTS_HIGHMEM
195 select SYS_HAS_EARLY_PRINTK
196 select GENERIC_ISA_DMA_SUPPORT_BROKEN
197 select CPU_HAS_WB
198 help 194 help
199 Lemote Fulong mini-PC board based on the Chinese Loongson-2E CPU and 195 This enables the support of Loongson family of machines.
200 an FPGA northbridge 196
197 Loongson is a family of general-purpose MIPS-compatible CPUs.
198 developed at Institute of Computing Technology (ICT),
199 Chinese Academy of Sciences (CAS) in the People's Republic
200 of China. The chief architect is Professor Weiwu Hu.
201 201
202config MIPS_MALTA 202config MIPS_MALTA
203 bool "MIPS Malta board" 203 bool "MIPS Malta board"
@@ -660,6 +660,7 @@ endchoice
660 660
661source "arch/mips/alchemy/Kconfig" 661source "arch/mips/alchemy/Kconfig"
662source "arch/mips/basler/excite/Kconfig" 662source "arch/mips/basler/excite/Kconfig"
663source "arch/mips/bcm63xx/Kconfig"
663source "arch/mips/jazz/Kconfig" 664source "arch/mips/jazz/Kconfig"
664source "arch/mips/lasat/Kconfig" 665source "arch/mips/lasat/Kconfig"
665source "arch/mips/pmc-sierra/Kconfig" 666source "arch/mips/pmc-sierra/Kconfig"
@@ -668,6 +669,7 @@ source "arch/mips/sibyte/Kconfig"
668source "arch/mips/txx9/Kconfig" 669source "arch/mips/txx9/Kconfig"
669source "arch/mips/vr41xx/Kconfig" 670source "arch/mips/vr41xx/Kconfig"
670source "arch/mips/cavium-octeon/Kconfig" 671source "arch/mips/cavium-octeon/Kconfig"
672source "arch/mips/loongson/Kconfig"
671 673
672endmenu 674endmenu
673 675
@@ -1044,12 +1046,10 @@ choice
1044 prompt "CPU type" 1046 prompt "CPU type"
1045 default CPU_R4X00 1047 default CPU_R4X00
1046 1048
1047config CPU_LOONGSON2 1049config CPU_LOONGSON2E
1048 bool "Loongson 2" 1050 bool "Loongson 2E"
1049 depends on SYS_HAS_CPU_LOONGSON2 1051 depends on SYS_HAS_CPU_LOONGSON2E
1050 select CPU_SUPPORTS_32BIT_KERNEL 1052 select CPU_LOONGSON2
1051 select CPU_SUPPORTS_64BIT_KERNEL
1052 select CPU_SUPPORTS_HIGHMEM
1053 help 1053 help
1054 The Loongson 2E processor implements the MIPS III instruction set 1054 The Loongson 2E processor implements the MIPS III instruction set
1055 with many extensions. 1055 with many extensions.
@@ -1057,7 +1057,6 @@ config CPU_LOONGSON2
1057config CPU_MIPS32_R1 1057config CPU_MIPS32_R1
1058 bool "MIPS32 Release 1" 1058 bool "MIPS32 Release 1"
1059 depends on SYS_HAS_CPU_MIPS32_R1 1059 depends on SYS_HAS_CPU_MIPS32_R1
1060 select CPU_HAS_LLSC
1061 select CPU_HAS_PREFETCH 1060 select CPU_HAS_PREFETCH
1062 select CPU_SUPPORTS_32BIT_KERNEL 1061 select CPU_SUPPORTS_32BIT_KERNEL
1063 select CPU_SUPPORTS_HIGHMEM 1062 select CPU_SUPPORTS_HIGHMEM
@@ -1075,7 +1074,6 @@ config CPU_MIPS32_R1
1075config CPU_MIPS32_R2 1074config CPU_MIPS32_R2
1076 bool "MIPS32 Release 2" 1075 bool "MIPS32 Release 2"
1077 depends on SYS_HAS_CPU_MIPS32_R2 1076 depends on SYS_HAS_CPU_MIPS32_R2
1078 select CPU_HAS_LLSC
1079 select CPU_HAS_PREFETCH 1077 select CPU_HAS_PREFETCH
1080 select CPU_SUPPORTS_32BIT_KERNEL 1078 select CPU_SUPPORTS_32BIT_KERNEL
1081 select CPU_SUPPORTS_HIGHMEM 1079 select CPU_SUPPORTS_HIGHMEM
@@ -1089,7 +1087,6 @@ config CPU_MIPS32_R2
1089config CPU_MIPS64_R1 1087config CPU_MIPS64_R1
1090 bool "MIPS64 Release 1" 1088 bool "MIPS64 Release 1"
1091 depends on SYS_HAS_CPU_MIPS64_R1 1089 depends on SYS_HAS_CPU_MIPS64_R1
1092 select CPU_HAS_LLSC
1093 select CPU_HAS_PREFETCH 1090 select CPU_HAS_PREFETCH
1094 select CPU_SUPPORTS_32BIT_KERNEL 1091 select CPU_SUPPORTS_32BIT_KERNEL
1095 select CPU_SUPPORTS_64BIT_KERNEL 1092 select CPU_SUPPORTS_64BIT_KERNEL
@@ -1109,7 +1106,6 @@ config CPU_MIPS64_R1
1109config CPU_MIPS64_R2 1106config CPU_MIPS64_R2
1110 bool "MIPS64 Release 2" 1107 bool "MIPS64 Release 2"
1111 depends on SYS_HAS_CPU_MIPS64_R2 1108 depends on SYS_HAS_CPU_MIPS64_R2
1112 select CPU_HAS_LLSC
1113 select CPU_HAS_PREFETCH 1109 select CPU_HAS_PREFETCH
1114 select CPU_SUPPORTS_32BIT_KERNEL 1110 select CPU_SUPPORTS_32BIT_KERNEL
1115 select CPU_SUPPORTS_64BIT_KERNEL 1111 select CPU_SUPPORTS_64BIT_KERNEL
@@ -1155,7 +1151,6 @@ config CPU_VR41XX
1155config CPU_R4300 1151config CPU_R4300
1156 bool "R4300" 1152 bool "R4300"
1157 depends on SYS_HAS_CPU_R4300 1153 depends on SYS_HAS_CPU_R4300
1158 select CPU_HAS_LLSC
1159 select CPU_SUPPORTS_32BIT_KERNEL 1154 select CPU_SUPPORTS_32BIT_KERNEL
1160 select CPU_SUPPORTS_64BIT_KERNEL 1155 select CPU_SUPPORTS_64BIT_KERNEL
1161 help 1156 help
@@ -1164,7 +1159,6 @@ config CPU_R4300
1164config CPU_R4X00 1159config CPU_R4X00
1165 bool "R4x00" 1160 bool "R4x00"
1166 depends on SYS_HAS_CPU_R4X00 1161 depends on SYS_HAS_CPU_R4X00
1167 select CPU_HAS_LLSC
1168 select CPU_SUPPORTS_32BIT_KERNEL 1162 select CPU_SUPPORTS_32BIT_KERNEL
1169 select CPU_SUPPORTS_64BIT_KERNEL 1163 select CPU_SUPPORTS_64BIT_KERNEL
1170 help 1164 help
@@ -1174,7 +1168,6 @@ config CPU_R4X00
1174config CPU_TX49XX 1168config CPU_TX49XX
1175 bool "R49XX" 1169 bool "R49XX"
1176 depends on SYS_HAS_CPU_TX49XX 1170 depends on SYS_HAS_CPU_TX49XX
1177 select CPU_HAS_LLSC
1178 select CPU_HAS_PREFETCH 1171 select CPU_HAS_PREFETCH
1179 select CPU_SUPPORTS_32BIT_KERNEL 1172 select CPU_SUPPORTS_32BIT_KERNEL
1180 select CPU_SUPPORTS_64BIT_KERNEL 1173 select CPU_SUPPORTS_64BIT_KERNEL
@@ -1182,7 +1175,6 @@ config CPU_TX49XX
1182config CPU_R5000 1175config CPU_R5000
1183 bool "R5000" 1176 bool "R5000"
1184 depends on SYS_HAS_CPU_R5000 1177 depends on SYS_HAS_CPU_R5000
1185 select CPU_HAS_LLSC
1186 select CPU_SUPPORTS_32BIT_KERNEL 1178 select CPU_SUPPORTS_32BIT_KERNEL
1187 select CPU_SUPPORTS_64BIT_KERNEL 1179 select CPU_SUPPORTS_64BIT_KERNEL
1188 help 1180 help
@@ -1191,14 +1183,12 @@ config CPU_R5000
1191config CPU_R5432 1183config CPU_R5432
1192 bool "R5432" 1184 bool "R5432"
1193 depends on SYS_HAS_CPU_R5432 1185 depends on SYS_HAS_CPU_R5432
1194 select CPU_HAS_LLSC
1195 select CPU_SUPPORTS_32BIT_KERNEL 1186 select CPU_SUPPORTS_32BIT_KERNEL
1196 select CPU_SUPPORTS_64BIT_KERNEL 1187 select CPU_SUPPORTS_64BIT_KERNEL
1197 1188
1198config CPU_R5500 1189config CPU_R5500
1199 bool "R5500" 1190 bool "R5500"
1200 depends on SYS_HAS_CPU_R5500 1191 depends on SYS_HAS_CPU_R5500
1201 select CPU_HAS_LLSC
1202 select CPU_SUPPORTS_32BIT_KERNEL 1192 select CPU_SUPPORTS_32BIT_KERNEL
1203 select CPU_SUPPORTS_64BIT_KERNEL 1193 select CPU_SUPPORTS_64BIT_KERNEL
1204 select CPU_SUPPORTS_HUGEPAGES 1194 select CPU_SUPPORTS_HUGEPAGES
@@ -1209,7 +1199,6 @@ config CPU_R5500
1209config CPU_R6000 1199config CPU_R6000
1210 bool "R6000" 1200 bool "R6000"
1211 depends on EXPERIMENTAL 1201 depends on EXPERIMENTAL
1212 select CPU_HAS_LLSC
1213 depends on SYS_HAS_CPU_R6000 1202 depends on SYS_HAS_CPU_R6000
1214 select CPU_SUPPORTS_32BIT_KERNEL 1203 select CPU_SUPPORTS_32BIT_KERNEL
1215 help 1204 help
@@ -1219,7 +1208,6 @@ config CPU_R6000
1219config CPU_NEVADA 1208config CPU_NEVADA
1220 bool "RM52xx" 1209 bool "RM52xx"
1221 depends on SYS_HAS_CPU_NEVADA 1210 depends on SYS_HAS_CPU_NEVADA
1222 select CPU_HAS_LLSC
1223 select CPU_SUPPORTS_32BIT_KERNEL 1211 select CPU_SUPPORTS_32BIT_KERNEL
1224 select CPU_SUPPORTS_64BIT_KERNEL 1212 select CPU_SUPPORTS_64BIT_KERNEL
1225 help 1213 help
@@ -1229,7 +1217,6 @@ config CPU_R8000
1229 bool "R8000" 1217 bool "R8000"
1230 depends on EXPERIMENTAL 1218 depends on EXPERIMENTAL
1231 depends on SYS_HAS_CPU_R8000 1219 depends on SYS_HAS_CPU_R8000
1232 select CPU_HAS_LLSC
1233 select CPU_HAS_PREFETCH 1220 select CPU_HAS_PREFETCH
1234 select CPU_SUPPORTS_64BIT_KERNEL 1221 select CPU_SUPPORTS_64BIT_KERNEL
1235 help 1222 help
@@ -1239,7 +1226,6 @@ config CPU_R8000
1239config CPU_R10000 1226config CPU_R10000
1240 bool "R10000" 1227 bool "R10000"
1241 depends on SYS_HAS_CPU_R10000 1228 depends on SYS_HAS_CPU_R10000
1242 select CPU_HAS_LLSC
1243 select CPU_HAS_PREFETCH 1229 select CPU_HAS_PREFETCH
1244 select CPU_SUPPORTS_32BIT_KERNEL 1230 select CPU_SUPPORTS_32BIT_KERNEL
1245 select CPU_SUPPORTS_64BIT_KERNEL 1231 select CPU_SUPPORTS_64BIT_KERNEL
@@ -1250,7 +1236,6 @@ config CPU_R10000
1250config CPU_RM7000 1236config CPU_RM7000
1251 bool "RM7000" 1237 bool "RM7000"
1252 depends on SYS_HAS_CPU_RM7000 1238 depends on SYS_HAS_CPU_RM7000
1253 select CPU_HAS_LLSC
1254 select CPU_HAS_PREFETCH 1239 select CPU_HAS_PREFETCH
1255 select CPU_SUPPORTS_32BIT_KERNEL 1240 select CPU_SUPPORTS_32BIT_KERNEL
1256 select CPU_SUPPORTS_64BIT_KERNEL 1241 select CPU_SUPPORTS_64BIT_KERNEL
@@ -1259,7 +1244,6 @@ config CPU_RM7000
1259config CPU_RM9000 1244config CPU_RM9000
1260 bool "RM9000" 1245 bool "RM9000"
1261 depends on SYS_HAS_CPU_RM9000 1246 depends on SYS_HAS_CPU_RM9000
1262 select CPU_HAS_LLSC
1263 select CPU_HAS_PREFETCH 1247 select CPU_HAS_PREFETCH
1264 select CPU_SUPPORTS_32BIT_KERNEL 1248 select CPU_SUPPORTS_32BIT_KERNEL
1265 select CPU_SUPPORTS_64BIT_KERNEL 1249 select CPU_SUPPORTS_64BIT_KERNEL
@@ -1269,7 +1253,6 @@ config CPU_RM9000
1269config CPU_SB1 1253config CPU_SB1
1270 bool "SB1" 1254 bool "SB1"
1271 depends on SYS_HAS_CPU_SB1 1255 depends on SYS_HAS_CPU_SB1
1272 select CPU_HAS_LLSC
1273 select CPU_SUPPORTS_32BIT_KERNEL 1256 select CPU_SUPPORTS_32BIT_KERNEL
1274 select CPU_SUPPORTS_64BIT_KERNEL 1257 select CPU_SUPPORTS_64BIT_KERNEL
1275 select CPU_SUPPORTS_HIGHMEM 1258 select CPU_SUPPORTS_HIGHMEM
@@ -1296,7 +1279,13 @@ config CPU_CAVIUM_OCTEON
1296 1279
1297endchoice 1280endchoice
1298 1281
1299config SYS_HAS_CPU_LOONGSON2 1282config CPU_LOONGSON2
1283 bool
1284 select CPU_SUPPORTS_32BIT_KERNEL
1285 select CPU_SUPPORTS_64BIT_KERNEL
1286 select CPU_SUPPORTS_HIGHMEM
1287
1288config SYS_HAS_CPU_LOONGSON2E
1300 bool 1289 bool
1301 1290
1302config SYS_HAS_CPU_MIPS32_R1 1291config SYS_HAS_CPU_MIPS32_R1
@@ -1683,9 +1672,6 @@ config SB1_PASS_2_1_WORKAROUNDS
1683config 64BIT_PHYS_ADDR 1672config 64BIT_PHYS_ADDR
1684 bool 1673 bool
1685 1674
1686config CPU_HAS_LLSC
1687 bool
1688
1689config CPU_HAS_SMARTMIPS 1675config CPU_HAS_SMARTMIPS
1690 depends on SYS_SUPPORTS_SMARTMIPS 1676 depends on SYS_SUPPORTS_SMARTMIPS
1691 bool "Support for the SmartMIPS ASE" 1677 bool "Support for the SmartMIPS ASE"
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index 861da514a468..77f5021218d3 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -120,7 +120,11 @@ cflags-$(CONFIG_CPU_R4300) += -march=r4300 -Wa,--trap
120cflags-$(CONFIG_CPU_VR41XX) += -march=r4100 -Wa,--trap 120cflags-$(CONFIG_CPU_VR41XX) += -march=r4100 -Wa,--trap
121cflags-$(CONFIG_CPU_R4X00) += -march=r4600 -Wa,--trap 121cflags-$(CONFIG_CPU_R4X00) += -march=r4600 -Wa,--trap
122cflags-$(CONFIG_CPU_TX49XX) += -march=r4600 -Wa,--trap 122cflags-$(CONFIG_CPU_TX49XX) += -march=r4600 -Wa,--trap
123cflags-$(CONFIG_CPU_LOONGSON2) += -march=r4600 -Wa,--trap 123# only gcc >= 4.4 have the loongson-specific support
124cflags-$(CONFIG_CPU_LOONGSON2) += -Wa,--trap
125cflags-$(CONFIG_CPU_LOONGSON2E) += \
126 $(call cc-option,-march=loongson2e,-march=r4600)
127
124cflags-$(CONFIG_CPU_MIPS32_R1) += $(call cc-option,-march=mips32,-mips32 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \ 128cflags-$(CONFIG_CPU_MIPS32_R1) += $(call cc-option,-march=mips32,-mips32 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \
125 -Wa,-mips32 -Wa,--trap 129 -Wa,-mips32 -Wa,--trap
126cflags-$(CONFIG_CPU_MIPS32_R2) += $(call cc-option,-march=mips32r2,-mips32r2 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \ 130cflags-$(CONFIG_CPU_MIPS32_R2) += $(call cc-option,-march=mips32r2,-mips32r2 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \
@@ -314,11 +318,12 @@ cflags-$(CONFIG_WR_PPMC) += -I$(srctree)/arch/mips/include/asm/mach-wrppmc
314load-$(CONFIG_WR_PPMC) += 0xffffffff80100000 318load-$(CONFIG_WR_PPMC) += 0xffffffff80100000
315 319
316# 320#
317# lemote fulong mini-PC board 321# Loongson family
318# 322#
319core-$(CONFIG_LEMOTE_FULONG) +=arch/mips/lemote/lm2e/ 323core-$(CONFIG_MACH_LOONGSON) +=arch/mips/loongson/
320load-$(CONFIG_LEMOTE_FULONG) +=0xffffffff80100000 324cflags-$(CONFIG_MACH_LOONGSON) += -I$(srctree)/arch/mips/include/asm/mach-loongson \
321cflags-$(CONFIG_LEMOTE_FULONG) += -I$(srctree)/arch/mips/include/asm/mach-lemote 325 -mno-branch-likely
326load-$(CONFIG_LEMOTE_FULOONG2E) +=0xffffffff80100000
322 327
323# 328#
324# MIPS Malta board 329# MIPS Malta board
@@ -560,6 +565,13 @@ cflags-$(CONFIG_BCM47XX) += -I$(srctree)/arch/mips/include/asm/mach-bcm47xx
560load-$(CONFIG_BCM47XX) := 0xffffffff80001000 565load-$(CONFIG_BCM47XX) := 0xffffffff80001000
561 566
562# 567#
568# Broadcom BCM63XX boards
569#
570core-$(CONFIG_BCM63XX) += arch/mips/bcm63xx/
571cflags-$(CONFIG_BCM63XX) += -I$(srctree)/arch/mips/include/asm/mach-bcm63xx/
572load-$(CONFIG_BCM63XX) := 0xffffffff80010000
573
574#
563# SNI RM 575# SNI RM
564# 576#
565core-$(CONFIG_SNI_RM) += arch/mips/sni/ 577core-$(CONFIG_SNI_RM) += arch/mips/sni/
@@ -615,16 +627,6 @@ endif
615cflags-y += -I$(srctree)/arch/mips/include/asm/mach-generic 627cflags-y += -I$(srctree)/arch/mips/include/asm/mach-generic
616drivers-$(CONFIG_PCI) += arch/mips/pci/ 628drivers-$(CONFIG_PCI) += arch/mips/pci/
617 629
618ifdef CONFIG_32BIT
619ifdef CONFIG_CPU_LITTLE_ENDIAN
620JIFFIES = jiffies_64
621else
622JIFFIES = jiffies_64 + 4
623endif
624else
625JIFFIES = jiffies_64
626endif
627
628# 630#
629# Automatically detect the build format. By default we choose 631# Automatically detect the build format. By default we choose
630# the elf format according to the load address. 632# the elf format according to the load address.
@@ -648,8 +650,9 @@ ifdef CONFIG_64BIT
648endif 650endif
649 651
650KBUILD_AFLAGS += $(cflags-y) 652KBUILD_AFLAGS += $(cflags-y)
651KBUILD_CFLAGS += $(cflags-y) \ 653KBUILD_CFLAGS += $(cflags-y)
652 -D"VMLINUX_LOAD_ADDRESS=$(load-y)" 654KBUILD_CPPFLAGS += -D"VMLINUX_LOAD_ADDRESS=$(load-y)"
655KBUILD_CPPFLAGS += -D"DATAOFFSET=$(if $(dataoffset-y),$(dataoffset-y),0)"
653 656
654LDFLAGS += -m $(ld-emul) 657LDFLAGS += -m $(ld-emul)
655 658
@@ -664,18 +667,6 @@ endif
664 667
665OBJCOPYFLAGS += --remove-section=.reginfo 668OBJCOPYFLAGS += --remove-section=.reginfo
666 669
667#
668# Choosing incompatible machines durings configuration will result in
669# error messages during linking. Select a default linkscript if
670# none has been choosen above.
671#
672
673CPPFLAGS_vmlinux.lds := \
674 $(KBUILD_CFLAGS) \
675 -D"LOADADDR=$(load-y)" \
676 -D"JIFFIES=$(JIFFIES)" \
677 -D"DATAOFFSET=$(if $(dataoffset-y),$(dataoffset-y),0)"
678
679head-y := arch/mips/kernel/head.o arch/mips/kernel/init_task.o 670head-y := arch/mips/kernel/head.o arch/mips/kernel/init_task.o
680 671
681libs-y += arch/mips/lib/ 672libs-y += arch/mips/lib/
diff --git a/arch/mips/alchemy/common/setup.c b/arch/mips/alchemy/common/setup.c
index 3f036b3d400e..6184baa56786 100644
--- a/arch/mips/alchemy/common/setup.c
+++ b/arch/mips/alchemy/common/setup.c
@@ -27,6 +27,7 @@
27 27
28#include <linux/init.h> 28#include <linux/init.h>
29#include <linux/ioport.h> 29#include <linux/ioport.h>
30#include <linux/jiffies.h>
30#include <linux/module.h> 31#include <linux/module.h>
31#include <linux/pm.h> 32#include <linux/pm.h>
32 33
@@ -53,6 +54,9 @@ void __init plat_mem_setup(void)
53 printk(KERN_INFO "(PRId %08x) @ %lu.%02lu MHz\n", read_c0_prid(), 54 printk(KERN_INFO "(PRId %08x) @ %lu.%02lu MHz\n", read_c0_prid(),
54 est_freq / 1000000, ((est_freq % 1000000) * 100) / 1000000); 55 est_freq / 1000000, ((est_freq % 1000000) * 100) / 1000000);
55 56
57 /* this is faster than wasting cycles trying to approximate it */
58 preset_lpj = (est_freq >> 1) / HZ;
59
56 _machine_restart = au1000_restart; 60 _machine_restart = au1000_restart;
57 _machine_halt = au1000_halt; 61 _machine_halt = au1000_halt;
58 pm_power_off = au1000_power_off; 62 pm_power_off = au1000_power_off;
diff --git a/arch/mips/alchemy/common/time.c b/arch/mips/alchemy/common/time.c
index 33fbae79af5e..379a664809b0 100644
--- a/arch/mips/alchemy/common/time.c
+++ b/arch/mips/alchemy/common/time.c
@@ -36,14 +36,13 @@
36#include <linux/interrupt.h> 36#include <linux/interrupt.h>
37#include <linux/spinlock.h> 37#include <linux/spinlock.h>
38 38
39#include <asm/processor.h>
39#include <asm/time.h> 40#include <asm/time.h>
40#include <asm/mach-au1x00/au1000.h> 41#include <asm/mach-au1x00/au1000.h>
41 42
42/* 32kHz clock enabled and detected */ 43/* 32kHz clock enabled and detected */
43#define CNTR_OK (SYS_CNTRL_E0 | SYS_CNTRL_32S) 44#define CNTR_OK (SYS_CNTRL_E0 | SYS_CNTRL_32S)
44 45
45extern int allow_au1k_wait; /* default off for CP0 Counter */
46
47static cycle_t au1x_counter1_read(struct clocksource *cs) 46static cycle_t au1x_counter1_read(struct clocksource *cs)
48{ 47{
49 return au_readl(SYS_RTCREAD); 48 return au_readl(SYS_RTCREAD);
@@ -89,7 +88,7 @@ static struct clock_event_device au1x_rtcmatch2_clockdev = {
89 .irq = AU1000_RTC_MATCH2_INT, 88 .irq = AU1000_RTC_MATCH2_INT,
90 .set_next_event = au1x_rtcmatch2_set_next_event, 89 .set_next_event = au1x_rtcmatch2_set_next_event,
91 .set_mode = au1x_rtcmatch2_set_mode, 90 .set_mode = au1x_rtcmatch2_set_mode,
92 .cpumask = CPU_MASK_ALL_PTR, 91 .cpumask = cpu_all_mask,
93}; 92};
94 93
95static struct irqaction au1x_rtcmatch2_irqaction = { 94static struct irqaction au1x_rtcmatch2_irqaction = {
@@ -153,13 +152,17 @@ void __init plat_time_init(void)
153 152
154 printk(KERN_INFO "Alchemy clocksource installed\n"); 153 printk(KERN_INFO "Alchemy clocksource installed\n");
155 154
156 /* can now use 'wait' */
157 allow_au1k_wait = 1;
158 return; 155 return;
159 156
160cntr_err: 157cntr_err:
161 /* counters unusable, use C0 counter */ 158 /*
159 * MIPS kernel assigns 'au1k_wait' to 'cpu_wait' before this
160 * function is called. Because the Alchemy counters are unusable
161 * the C0 timekeeping code is installed and use of the 'wait'
162 * instruction must be prohibited, which is done most easily by
163 * assigning NULL to cpu_wait.
164 */
165 cpu_wait = NULL;
162 r4k_clockevent_init(); 166 r4k_clockevent_init();
163 init_r4k_clocksource(); 167 init_r4k_clocksource();
164 allow_au1k_wait = 0;
165} 168}
diff --git a/arch/mips/ar7/platform.c b/arch/mips/ar7/platform.c
index cf50fa29b198..e2278c04459d 100644
--- a/arch/mips/ar7/platform.c
+++ b/arch/mips/ar7/platform.c
@@ -417,6 +417,20 @@ static struct platform_device ar7_udc = {
417 .num_resources = ARRAY_SIZE(usb_res), 417 .num_resources = ARRAY_SIZE(usb_res),
418}; 418};
419 419
420static struct resource ar7_wdt_res = {
421 .name = "regs",
422 .start = -1, /* Filled at runtime */
423 .end = -1, /* Filled at runtime */
424 .flags = IORESOURCE_MEM,
425};
426
427static struct platform_device ar7_wdt = {
428 .id = -1,
429 .name = "ar7_wdt",
430 .resource = &ar7_wdt_res,
431 .num_resources = 1,
432};
433
420static inline unsigned char char2hex(char h) 434static inline unsigned char char2hex(char h)
421{ 435{
422 switch (h) { 436 switch (h) {
@@ -487,6 +501,7 @@ static void __init detect_leds(void)
487 501
488static int __init ar7_register_devices(void) 502static int __init ar7_register_devices(void)
489{ 503{
504 u16 chip_id;
490 int res; 505 int res;
491#ifdef CONFIG_SERIAL_8250 506#ifdef CONFIG_SERIAL_8250
492 static struct uart_port uart_port[2]; 507 static struct uart_port uart_port[2];
@@ -565,6 +580,23 @@ static int __init ar7_register_devices(void)
565 580
566 res = platform_device_register(&ar7_udc); 581 res = platform_device_register(&ar7_udc);
567 582
583 chip_id = ar7_chip_id();
584 switch (chip_id) {
585 case AR7_CHIP_7100:
586 case AR7_CHIP_7200:
587 ar7_wdt_res.start = AR7_REGS_WDT;
588 break;
589 case AR7_CHIP_7300:
590 ar7_wdt_res.start = UR8_REGS_WDT;
591 break;
592 default:
593 break;
594 }
595
596 ar7_wdt_res.end = ar7_wdt_res.start + 0x20;
597
598 res = platform_device_register(&ar7_wdt);
599
568 return res; 600 return res;
569} 601}
570arch_initcall(ar7_register_devices); 602arch_initcall(ar7_register_devices);
diff --git a/arch/mips/bcm63xx/Kconfig b/arch/mips/bcm63xx/Kconfig
new file mode 100644
index 000000000000..fb177d6df066
--- /dev/null
+++ b/arch/mips/bcm63xx/Kconfig
@@ -0,0 +1,25 @@
1menu "CPU support"
2 depends on BCM63XX
3
4config BCM63XX_CPU_6338
5 bool "support 6338 CPU"
6 select HW_HAS_PCI
7 select USB_ARCH_HAS_OHCI
8 select USB_OHCI_BIG_ENDIAN_DESC
9 select USB_OHCI_BIG_ENDIAN_MMIO
10
11config BCM63XX_CPU_6345
12 bool "support 6345 CPU"
13 select USB_OHCI_BIG_ENDIAN_DESC
14 select USB_OHCI_BIG_ENDIAN_MMIO
15
16config BCM63XX_CPU_6348
17 bool "support 6348 CPU"
18 select HW_HAS_PCI
19
20config BCM63XX_CPU_6358
21 bool "support 6358 CPU"
22 select HW_HAS_PCI
23endmenu
24
25source "arch/mips/bcm63xx/boards/Kconfig"
diff --git a/arch/mips/bcm63xx/Makefile b/arch/mips/bcm63xx/Makefile
new file mode 100644
index 000000000000..aaa585cf26e3
--- /dev/null
+++ b/arch/mips/bcm63xx/Makefile
@@ -0,0 +1,7 @@
1obj-y += clk.o cpu.o cs.o gpio.o irq.o prom.o setup.o timer.o \
2 dev-dsp.o dev-enet.o
3obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
4
5obj-y += boards/
6
7EXTRA_CFLAGS += -Werror
diff --git a/arch/mips/bcm63xx/boards/Kconfig b/arch/mips/bcm63xx/boards/Kconfig
new file mode 100644
index 000000000000..c6aed33d893e
--- /dev/null
+++ b/arch/mips/bcm63xx/boards/Kconfig
@@ -0,0 +1,11 @@
1choice
2 prompt "Board support"
3 depends on BCM63XX
4 default BOARD_BCM963XX
5
6config BOARD_BCM963XX
7 bool "Generic Broadcom 963xx boards"
8 select SSB
9 help
10
11endchoice
diff --git a/arch/mips/bcm63xx/boards/Makefile b/arch/mips/bcm63xx/boards/Makefile
new file mode 100644
index 000000000000..e5cc86dc1da8
--- /dev/null
+++ b/arch/mips/bcm63xx/boards/Makefile
@@ -0,0 +1,3 @@
1obj-$(CONFIG_BOARD_BCM963XX) += board_bcm963xx.o
2
3EXTRA_CFLAGS += -Werror
diff --git a/arch/mips/bcm63xx/boards/board_bcm963xx.c b/arch/mips/bcm63xx/boards/board_bcm963xx.c
new file mode 100644
index 000000000000..fd77f548207a
--- /dev/null
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
@@ -0,0 +1,837 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr>
7 * Copyright (C) 2008 Florian Fainelli <florian@openwrt.org>
8 */
9
10#include <linux/init.h>
11#include <linux/kernel.h>
12#include <linux/string.h>
13#include <linux/platform_device.h>
14#include <linux/mtd/mtd.h>
15#include <linux/mtd/partitions.h>
16#include <linux/mtd/physmap.h>
17#include <linux/ssb/ssb.h>
18#include <asm/addrspace.h>
19#include <bcm63xx_board.h>
20#include <bcm63xx_cpu.h>
21#include <bcm63xx_regs.h>
22#include <bcm63xx_io.h>
23#include <bcm63xx_board.h>
24#include <bcm63xx_dev_pci.h>
25#include <bcm63xx_dev_enet.h>
26#include <bcm63xx_dev_dsp.h>
27#include <board_bcm963xx.h>
28
29#define PFX "board_bcm963xx: "
30
31static struct bcm963xx_nvram nvram;
32static unsigned int mac_addr_used;
33static struct board_info board;
34
35/*
36 * known 6338 boards
37 */
38#ifdef CONFIG_BCM63XX_CPU_6338
39static struct board_info __initdata board_96338gw = {
40 .name = "96338GW",
41 .expected_cpu_id = 0x6338,
42
43 .has_enet0 = 1,
44 .enet0 = {
45 .force_speed_100 = 1,
46 .force_duplex_full = 1,
47 },
48
49 .has_ohci0 = 1,
50
51 .leds = {
52 {
53 .name = "adsl",
54 .gpio = 3,
55 .active_low = 1,
56 },
57 {
58 .name = "ses",
59 .gpio = 5,
60 .active_low = 1,
61 },
62 {
63 .name = "ppp-fail",
64 .gpio = 4,
65 .active_low = 1,
66 },
67 {
68 .name = "power",
69 .gpio = 0,
70 .active_low = 1,
71 .default_trigger = "default-on",
72 },
73 {
74 .name = "stop",
75 .gpio = 1,
76 .active_low = 1,
77 }
78 },
79};
80
81static struct board_info __initdata board_96338w = {
82 .name = "96338W",
83 .expected_cpu_id = 0x6338,
84
85 .has_enet0 = 1,
86 .enet0 = {
87 .force_speed_100 = 1,
88 .force_duplex_full = 1,
89 },
90
91 .leds = {
92 {
93 .name = "adsl",
94 .gpio = 3,
95 .active_low = 1,
96 },
97 {
98 .name = "ses",
99 .gpio = 5,
100 .active_low = 1,
101 },
102 {
103 .name = "ppp-fail",
104 .gpio = 4,
105 .active_low = 1,
106 },
107 {
108 .name = "power",
109 .gpio = 0,
110 .active_low = 1,
111 .default_trigger = "default-on",
112 },
113 {
114 .name = "stop",
115 .gpio = 1,
116 .active_low = 1,
117 },
118 },
119};
120#endif
121
122/*
123 * known 6345 boards
124 */
125#ifdef CONFIG_BCM63XX_CPU_6345
126static struct board_info __initdata board_96345gw2 = {
127 .name = "96345GW2",
128 .expected_cpu_id = 0x6345,
129};
130#endif
131
132/*
133 * known 6348 boards
134 */
135#ifdef CONFIG_BCM63XX_CPU_6348
136static struct board_info __initdata board_96348r = {
137 .name = "96348R",
138 .expected_cpu_id = 0x6348,
139
140 .has_enet0 = 1,
141 .has_pci = 1,
142
143 .enet0 = {
144 .has_phy = 1,
145 .use_internal_phy = 1,
146 },
147
148 .leds = {
149 {
150 .name = "adsl-fail",
151 .gpio = 2,
152 .active_low = 1,
153 },
154 {
155 .name = "ppp",
156 .gpio = 3,
157 .active_low = 1,
158 },
159 {
160 .name = "ppp-fail",
161 .gpio = 4,
162 .active_low = 1,
163 },
164 {
165 .name = "power",
166 .gpio = 0,
167 .active_low = 1,
168 .default_trigger = "default-on",
169
170 },
171 {
172 .name = "stop",
173 .gpio = 1,
174 .active_low = 1,
175 },
176 },
177};
178
179static struct board_info __initdata board_96348gw_10 = {
180 .name = "96348GW-10",
181 .expected_cpu_id = 0x6348,
182
183 .has_enet0 = 1,
184 .has_enet1 = 1,
185 .has_pci = 1,
186
187 .enet0 = {
188 .has_phy = 1,
189 .use_internal_phy = 1,
190 },
191 .enet1 = {
192 .force_speed_100 = 1,
193 .force_duplex_full = 1,
194 },
195
196 .has_ohci0 = 1,
197 .has_pccard = 1,
198 .has_ehci0 = 1,
199
200 .has_dsp = 1,
201 .dsp = {
202 .gpio_rst = 6,
203 .gpio_int = 34,
204 .cs = 2,
205 .ext_irq = 2,
206 },
207
208 .leds = {
209 {
210 .name = "adsl-fail",
211 .gpio = 2,
212 .active_low = 1,
213 },
214 {
215 .name = "ppp",
216 .gpio = 3,
217 .active_low = 1,
218 },
219 {
220 .name = "ppp-fail",
221 .gpio = 4,
222 .active_low = 1,
223 },
224 {
225 .name = "power",
226 .gpio = 0,
227 .active_low = 1,
228 .default_trigger = "default-on",
229 },
230 {
231 .name = "stop",
232 .gpio = 1,
233 .active_low = 1,
234 },
235 },
236};
237
238static struct board_info __initdata board_96348gw_11 = {
239 .name = "96348GW-11",
240 .expected_cpu_id = 0x6348,
241
242 .has_enet0 = 1,
243 .has_enet1 = 1,
244 .has_pci = 1,
245
246 .enet0 = {
247 .has_phy = 1,
248 .use_internal_phy = 1,
249 },
250
251 .enet1 = {
252 .force_speed_100 = 1,
253 .force_duplex_full = 1,
254 },
255
256
257 .has_ohci0 = 1,
258 .has_pccard = 1,
259 .has_ehci0 = 1,
260
261 .leds = {
262 {
263 .name = "adsl-fail",
264 .gpio = 2,
265 .active_low = 1,
266 },
267 {
268 .name = "ppp",
269 .gpio = 3,
270 .active_low = 1,
271 },
272 {
273 .name = "ppp-fail",
274 .gpio = 4,
275 .active_low = 1,
276 },
277 {
278 .name = "power",
279 .gpio = 0,
280 .active_low = 1,
281 .default_trigger = "default-on",
282 },
283 {
284 .name = "stop",
285 .gpio = 1,
286 .active_low = 1,
287 },
288 },
289};
290
291static struct board_info __initdata board_96348gw = {
292 .name = "96348GW",
293 .expected_cpu_id = 0x6348,
294
295 .has_enet0 = 1,
296 .has_enet1 = 1,
297 .has_pci = 1,
298
299 .enet0 = {
300 .has_phy = 1,
301 .use_internal_phy = 1,
302 },
303 .enet1 = {
304 .force_speed_100 = 1,
305 .force_duplex_full = 1,
306 },
307
308 .has_ohci0 = 1,
309
310 .has_dsp = 1,
311 .dsp = {
312 .gpio_rst = 6,
313 .gpio_int = 34,
314 .ext_irq = 2,
315 .cs = 2,
316 },
317
318 .leds = {
319 {
320 .name = "adsl-fail",
321 .gpio = 2,
322 .active_low = 1,
323 },
324 {
325 .name = "ppp",
326 .gpio = 3,
327 .active_low = 1,
328 },
329 {
330 .name = "ppp-fail",
331 .gpio = 4,
332 .active_low = 1,
333 },
334 {
335 .name = "power",
336 .gpio = 0,
337 .active_low = 1,
338 .default_trigger = "default-on",
339 },
340 {
341 .name = "stop",
342 .gpio = 1,
343 .active_low = 1,
344 },
345 },
346};
347
348static struct board_info __initdata board_FAST2404 = {
349 .name = "F@ST2404",
350 .expected_cpu_id = 0x6348,
351
352 .has_enet0 = 1,
353 .has_enet1 = 1,
354 .has_pci = 1,
355
356 .enet0 = {
357 .has_phy = 1,
358 .use_internal_phy = 1,
359 },
360
361 .enet1 = {
362 .force_speed_100 = 1,
363 .force_duplex_full = 1,
364 },
365
366
367 .has_ohci0 = 1,
368 .has_pccard = 1,
369 .has_ehci0 = 1,
370};
371
372static struct board_info __initdata board_DV201AMR = {
373 .name = "DV201AMR",
374 .expected_cpu_id = 0x6348,
375
376 .has_pci = 1,
377 .has_ohci0 = 1,
378
379 .has_enet0 = 1,
380 .has_enet1 = 1,
381 .enet0 = {
382 .has_phy = 1,
383 .use_internal_phy = 1,
384 },
385 .enet1 = {
386 .force_speed_100 = 1,
387 .force_duplex_full = 1,
388 },
389};
390
391static struct board_info __initdata board_96348gw_a = {
392 .name = "96348GW-A",
393 .expected_cpu_id = 0x6348,
394
395 .has_enet0 = 1,
396 .has_enet1 = 1,
397 .has_pci = 1,
398
399 .enet0 = {
400 .has_phy = 1,
401 .use_internal_phy = 1,
402 },
403 .enet1 = {
404 .force_speed_100 = 1,
405 .force_duplex_full = 1,
406 },
407
408 .has_ohci0 = 1,
409};
410#endif
411
412/*
413 * known 6358 boards
414 */
415#ifdef CONFIG_BCM63XX_CPU_6358
416static struct board_info __initdata board_96358vw = {
417 .name = "96358VW",
418 .expected_cpu_id = 0x6358,
419
420 .has_enet0 = 1,
421 .has_enet1 = 1,
422 .has_pci = 1,
423
424 .enet0 = {
425 .has_phy = 1,
426 .use_internal_phy = 1,
427 },
428
429 .enet1 = {
430 .force_speed_100 = 1,
431 .force_duplex_full = 1,
432 },
433
434
435 .has_ohci0 = 1,
436 .has_pccard = 1,
437 .has_ehci0 = 1,
438
439 .leds = {
440 {
441 .name = "adsl-fail",
442 .gpio = 15,
443 .active_low = 1,
444 },
445 {
446 .name = "ppp",
447 .gpio = 22,
448 .active_low = 1,
449 },
450 {
451 .name = "ppp-fail",
452 .gpio = 23,
453 .active_low = 1,
454 },
455 {
456 .name = "power",
457 .gpio = 4,
458 .default_trigger = "default-on",
459 },
460 {
461 .name = "stop",
462 .gpio = 5,
463 },
464 },
465};
466
467static struct board_info __initdata board_96358vw2 = {
468 .name = "96358VW2",
469 .expected_cpu_id = 0x6358,
470
471 .has_enet0 = 1,
472 .has_enet1 = 1,
473 .has_pci = 1,
474
475 .enet0 = {
476 .has_phy = 1,
477 .use_internal_phy = 1,
478 },
479
480 .enet1 = {
481 .force_speed_100 = 1,
482 .force_duplex_full = 1,
483 },
484
485
486 .has_ohci0 = 1,
487 .has_pccard = 1,
488 .has_ehci0 = 1,
489
490 .leds = {
491 {
492 .name = "adsl",
493 .gpio = 22,
494 .active_low = 1,
495 },
496 {
497 .name = "ppp-fail",
498 .gpio = 23,
499 },
500 {
501 .name = "power",
502 .gpio = 5,
503 .active_low = 1,
504 .default_trigger = "default-on",
505 },
506 {
507 .name = "stop",
508 .gpio = 4,
509 .active_low = 1,
510 },
511 },
512};
513
514static struct board_info __initdata board_AGPFS0 = {
515 .name = "AGPF-S0",
516 .expected_cpu_id = 0x6358,
517
518 .has_enet0 = 1,
519 .has_enet1 = 1,
520 .has_pci = 1,
521
522 .enet0 = {
523 .has_phy = 1,
524 .use_internal_phy = 1,
525 },
526
527 .enet1 = {
528 .force_speed_100 = 1,
529 .force_duplex_full = 1,
530 },
531
532 .has_ohci0 = 1,
533 .has_ehci0 = 1,
534};
535#endif
536
537/*
538 * all boards
539 */
540static const struct board_info __initdata *bcm963xx_boards[] = {
541#ifdef CONFIG_BCM63XX_CPU_6338
542 &board_96338gw,
543 &board_96338w,
544#endif
545#ifdef CONFIG_BCM63XX_CPU_6345
546 &board_96345gw2,
547#endif
548#ifdef CONFIG_BCM63XX_CPU_6348
549 &board_96348r,
550 &board_96348gw,
551 &board_96348gw_10,
552 &board_96348gw_11,
553 &board_FAST2404,
554 &board_DV201AMR,
555 &board_96348gw_a,
556#endif
557
558#ifdef CONFIG_BCM63XX_CPU_6358
559 &board_96358vw,
560 &board_96358vw2,
561 &board_AGPFS0,
562#endif
563};
564
565/*
566 * early init callback, read nvram data from flash and checksum it
567 */
568void __init board_prom_init(void)
569{
570 unsigned int check_len, i;
571 u8 *boot_addr, *cfe, *p;
572 char cfe_version[32];
573 u32 val;
574
575 /* read base address of boot chip select (0)
576 * 6345 does not have MPI but boots from standard
577 * MIPS Flash address */
578 if (BCMCPU_IS_6345())
579 val = 0x1fc00000;
580 else {
581 val = bcm_mpi_readl(MPI_CSBASE_REG(0));
582 val &= MPI_CSBASE_BASE_MASK;
583 }
584 boot_addr = (u8 *)KSEG1ADDR(val);
585
586 /* dump cfe version */
587 cfe = boot_addr + BCM963XX_CFE_VERSION_OFFSET;
588 if (!memcmp(cfe, "cfe-v", 5))
589 snprintf(cfe_version, sizeof(cfe_version), "%u.%u.%u-%u.%u",
590 cfe[5], cfe[6], cfe[7], cfe[8], cfe[9]);
591 else
592 strcpy(cfe_version, "unknown");
593 printk(KERN_INFO PFX "CFE version: %s\n", cfe_version);
594
595 /* extract nvram data */
596 memcpy(&nvram, boot_addr + BCM963XX_NVRAM_OFFSET, sizeof(nvram));
597
598 /* check checksum before using data */
599 if (nvram.version <= 4)
600 check_len = offsetof(struct bcm963xx_nvram, checksum_old);
601 else
602 check_len = sizeof(nvram);
603 val = 0;
604 p = (u8 *)&nvram;
605 while (check_len--)
606 val += *p;
607 if (val) {
608 printk(KERN_ERR PFX "invalid nvram checksum\n");
609 return;
610 }
611
612 /* find board by name */
613 for (i = 0; i < ARRAY_SIZE(bcm963xx_boards); i++) {
614 if (strncmp(nvram.name, bcm963xx_boards[i]->name,
615 sizeof(nvram.name)))
616 continue;
617 /* copy, board desc array is marked initdata */
618 memcpy(&board, bcm963xx_boards[i], sizeof(board));
619 break;
620 }
621
622 /* bail out if board is not found, will complain later */
623 if (!board.name[0]) {
624 char name[17];
625 memcpy(name, nvram.name, 16);
626 name[16] = 0;
627 printk(KERN_ERR PFX "unknown bcm963xx board: %s\n",
628 name);
629 return;
630 }
631
632 /* setup pin multiplexing depending on board enabled device,
633 * this has to be done this early since PCI init is done
634 * inside arch_initcall */
635 val = 0;
636
637#ifdef CONFIG_PCI
638 if (board.has_pci) {
639 bcm63xx_pci_enabled = 1;
640 if (BCMCPU_IS_6348())
641 val |= GPIO_MODE_6348_G2_PCI;
642 }
643#endif
644
645 if (board.has_pccard) {
646 if (BCMCPU_IS_6348())
647 val |= GPIO_MODE_6348_G1_MII_PCCARD;
648 }
649
650 if (board.has_enet0 && !board.enet0.use_internal_phy) {
651 if (BCMCPU_IS_6348())
652 val |= GPIO_MODE_6348_G3_EXT_MII |
653 GPIO_MODE_6348_G0_EXT_MII;
654 }
655
656 if (board.has_enet1 && !board.enet1.use_internal_phy) {
657 if (BCMCPU_IS_6348())
658 val |= GPIO_MODE_6348_G3_EXT_MII |
659 GPIO_MODE_6348_G0_EXT_MII;
660 }
661
662 bcm_gpio_writel(val, GPIO_MODE_REG);
663}
664
665/*
666 * second stage init callback, good time to panic if we couldn't
667 * identify on which board we're running since early printk is working
668 */
669void __init board_setup(void)
670{
671 if (!board.name[0])
672 panic("unable to detect bcm963xx board");
673 printk(KERN_INFO PFX "board name: %s\n", board.name);
674
675 /* make sure we're running on expected cpu */
676 if (bcm63xx_get_cpu_id() != board.expected_cpu_id)
677 panic("unexpected CPU for bcm963xx board");
678}
679
680/*
681 * return board name for /proc/cpuinfo
682 */
683const char *board_get_name(void)
684{
685 return board.name;
686}
687
688/*
689 * register & return a new board mac address
690 */
691static int board_get_mac_address(u8 *mac)
692{
693 u8 *p;
694 int count;
695
696 if (mac_addr_used >= nvram.mac_addr_count) {
697 printk(KERN_ERR PFX "not enough mac address\n");
698 return -ENODEV;
699 }
700
701 memcpy(mac, nvram.mac_addr_base, ETH_ALEN);
702 p = mac + ETH_ALEN - 1;
703 count = mac_addr_used;
704
705 while (count--) {
706 do {
707 (*p)++;
708 if (*p != 0)
709 break;
710 p--;
711 } while (p != mac);
712 }
713
714 if (p == mac) {
715 printk(KERN_ERR PFX "unable to fetch mac address\n");
716 return -ENODEV;
717 }
718
719 mac_addr_used++;
720 return 0;
721}
722
723static struct mtd_partition mtd_partitions[] = {
724 {
725 .name = "cfe",
726 .offset = 0x0,
727 .size = 0x40000,
728 }
729};
730
731static struct physmap_flash_data flash_data = {
732 .width = 2,
733 .nr_parts = ARRAY_SIZE(mtd_partitions),
734 .parts = mtd_partitions,
735};
736
737static struct resource mtd_resources[] = {
738 {
739 .start = 0, /* filled at runtime */
740 .end = 0, /* filled at runtime */
741 .flags = IORESOURCE_MEM,
742 }
743};
744
745static struct platform_device mtd_dev = {
746 .name = "physmap-flash",
747 .resource = mtd_resources,
748 .num_resources = ARRAY_SIZE(mtd_resources),
749 .dev = {
750 .platform_data = &flash_data,
751 },
752};
753
754/*
755 * Register a sane SPROMv2 to make the on-board
756 * bcm4318 WLAN work
757 */
758#ifdef CONFIG_SSB_PCIHOST
759static struct ssb_sprom bcm63xx_sprom = {
760 .revision = 0x02,
761 .board_rev = 0x17,
762 .country_code = 0x0,
763 .ant_available_bg = 0x3,
764 .pa0b0 = 0x15ae,
765 .pa0b1 = 0xfa85,
766 .pa0b2 = 0xfe8d,
767 .pa1b0 = 0xffff,
768 .pa1b1 = 0xffff,
769 .pa1b2 = 0xffff,
770 .gpio0 = 0xff,
771 .gpio1 = 0xff,
772 .gpio2 = 0xff,
773 .gpio3 = 0xff,
774 .maxpwr_bg = 0x004c,
775 .itssi_bg = 0x00,
776 .boardflags_lo = 0x2848,
777 .boardflags_hi = 0x0000,
778};
779#endif
780
781static struct gpio_led_platform_data bcm63xx_led_data;
782
783static struct platform_device bcm63xx_gpio_leds = {
784 .name = "leds-gpio",
785 .id = 0,
786 .dev.platform_data = &bcm63xx_led_data,
787};
788
789/*
790 * third stage init callback, register all board devices.
791 */
792int __init board_register_devices(void)
793{
794 u32 val;
795
796 if (board.has_enet0 &&
797 !board_get_mac_address(board.enet0.mac_addr))
798 bcm63xx_enet_register(0, &board.enet0);
799
800 if (board.has_enet1 &&
801 !board_get_mac_address(board.enet1.mac_addr))
802 bcm63xx_enet_register(1, &board.enet1);
803
804 if (board.has_dsp)
805 bcm63xx_dsp_register(&board.dsp);
806
807 /* Generate MAC address for WLAN and
808 * register our SPROM */
809#ifdef CONFIG_SSB_PCIHOST
810 if (!board_get_mac_address(bcm63xx_sprom.il0mac)) {
811 memcpy(bcm63xx_sprom.et0mac, bcm63xx_sprom.il0mac, ETH_ALEN);
812 memcpy(bcm63xx_sprom.et1mac, bcm63xx_sprom.il0mac, ETH_ALEN);
813 if (ssb_arch_set_fallback_sprom(&bcm63xx_sprom) < 0)
814 printk(KERN_ERR "failed to register fallback SPROM\n");
815 }
816#endif
817
818 /* read base address of boot chip select (0) */
819 if (BCMCPU_IS_6345())
820 val = 0x1fc00000;
821 else {
822 val = bcm_mpi_readl(MPI_CSBASE_REG(0));
823 val &= MPI_CSBASE_BASE_MASK;
824 }
825 mtd_resources[0].start = val;
826 mtd_resources[0].end = 0x1FFFFFFF;
827
828 platform_device_register(&mtd_dev);
829
830 bcm63xx_led_data.num_leds = ARRAY_SIZE(board.leds);
831 bcm63xx_led_data.leds = board.leds;
832
833 platform_device_register(&bcm63xx_gpio_leds);
834
835 return 0;
836}
837
diff --git a/arch/mips/bcm63xx/clk.c b/arch/mips/bcm63xx/clk.c
new file mode 100644
index 000000000000..2c68ee9ccee2
--- /dev/null
+++ b/arch/mips/bcm63xx/clk.c
@@ -0,0 +1,226 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr>
7 */
8
9#include <linux/module.h>
10#include <linux/mutex.h>
11#include <linux/err.h>
12#include <linux/clk.h>
13#include <bcm63xx_cpu.h>
14#include <bcm63xx_io.h>
15#include <bcm63xx_regs.h>
16#include <bcm63xx_clk.h>
17
18static DEFINE_MUTEX(clocks_mutex);
19
20
21static void clk_enable_unlocked(struct clk *clk)
22{
23 if (clk->set && (clk->usage++) == 0)
24 clk->set(clk, 1);
25}
26
27static void clk_disable_unlocked(struct clk *clk)
28{
29 if (clk->set && (--clk->usage) == 0)
30 clk->set(clk, 0);
31}
32
33static void bcm_hwclock_set(u32 mask, int enable)
34{
35 u32 reg;
36
37 reg = bcm_perf_readl(PERF_CKCTL_REG);
38 if (enable)
39 reg |= mask;
40 else
41 reg &= ~mask;
42 bcm_perf_writel(reg, PERF_CKCTL_REG);
43}
44
45/*
46 * Ethernet MAC "misc" clock: dma clocks and main clock on 6348
47 */
48static void enet_misc_set(struct clk *clk, int enable)
49{
50 u32 mask;
51
52 if (BCMCPU_IS_6338())
53 mask = CKCTL_6338_ENET_EN;
54 else if (BCMCPU_IS_6345())
55 mask = CKCTL_6345_ENET_EN;
56 else if (BCMCPU_IS_6348())
57 mask = CKCTL_6348_ENET_EN;
58 else
59 /* BCMCPU_IS_6358 */
60 mask = CKCTL_6358_EMUSB_EN;
61 bcm_hwclock_set(mask, enable);
62}
63
64static struct clk clk_enet_misc = {
65 .set = enet_misc_set,
66};
67
68/*
69 * Ethernet MAC clocks: only revelant on 6358, silently enable misc
70 * clocks
71 */
72static void enetx_set(struct clk *clk, int enable)
73{
74 if (enable)
75 clk_enable_unlocked(&clk_enet_misc);
76 else
77 clk_disable_unlocked(&clk_enet_misc);
78
79 if (BCMCPU_IS_6358()) {
80 u32 mask;
81
82 if (clk->id == 0)
83 mask = CKCTL_6358_ENET0_EN;
84 else
85 mask = CKCTL_6358_ENET1_EN;
86 bcm_hwclock_set(mask, enable);
87 }
88}
89
90static struct clk clk_enet0 = {
91 .id = 0,
92 .set = enetx_set,
93};
94
95static struct clk clk_enet1 = {
96 .id = 1,
97 .set = enetx_set,
98};
99
100/*
101 * Ethernet PHY clock
102 */
103static void ephy_set(struct clk *clk, int enable)
104{
105 if (!BCMCPU_IS_6358())
106 return;
107 bcm_hwclock_set(CKCTL_6358_EPHY_EN, enable);
108}
109
110
111static struct clk clk_ephy = {
112 .set = ephy_set,
113};
114
115/*
116 * PCM clock
117 */
118static void pcm_set(struct clk *clk, int enable)
119{
120 if (!BCMCPU_IS_6358())
121 return;
122 bcm_hwclock_set(CKCTL_6358_PCM_EN, enable);
123}
124
125static struct clk clk_pcm = {
126 .set = pcm_set,
127};
128
129/*
130 * USB host clock
131 */
132static void usbh_set(struct clk *clk, int enable)
133{
134 if (!BCMCPU_IS_6348())
135 return;
136 bcm_hwclock_set(CKCTL_6348_USBH_EN, enable);
137}
138
139static struct clk clk_usbh = {
140 .set = usbh_set,
141};
142
143/*
144 * SPI clock
145 */
146static void spi_set(struct clk *clk, int enable)
147{
148 u32 mask;
149
150 if (BCMCPU_IS_6338())
151 mask = CKCTL_6338_SPI_EN;
152 else if (BCMCPU_IS_6348())
153 mask = CKCTL_6348_SPI_EN;
154 else
155 /* BCMCPU_IS_6358 */
156 mask = CKCTL_6358_SPI_EN;
157 bcm_hwclock_set(mask, enable);
158}
159
160static struct clk clk_spi = {
161 .set = spi_set,
162};
163
164/*
165 * Internal peripheral clock
166 */
167static struct clk clk_periph = {
168 .rate = (50 * 1000 * 1000),
169};
170
171
172/*
173 * Linux clock API implementation
174 */
175int clk_enable(struct clk *clk)
176{
177 mutex_lock(&clocks_mutex);
178 clk_enable_unlocked(clk);
179 mutex_unlock(&clocks_mutex);
180 return 0;
181}
182
183EXPORT_SYMBOL(clk_enable);
184
185void clk_disable(struct clk *clk)
186{
187 mutex_lock(&clocks_mutex);
188 clk_disable_unlocked(clk);
189 mutex_unlock(&clocks_mutex);
190}
191
192EXPORT_SYMBOL(clk_disable);
193
194unsigned long clk_get_rate(struct clk *clk)
195{
196 return clk->rate;
197}
198
199EXPORT_SYMBOL(clk_get_rate);
200
201struct clk *clk_get(struct device *dev, const char *id)
202{
203 if (!strcmp(id, "enet0"))
204 return &clk_enet0;
205 if (!strcmp(id, "enet1"))
206 return &clk_enet1;
207 if (!strcmp(id, "ephy"))
208 return &clk_ephy;
209 if (!strcmp(id, "usbh"))
210 return &clk_usbh;
211 if (!strcmp(id, "spi"))
212 return &clk_spi;
213 if (!strcmp(id, "periph"))
214 return &clk_periph;
215 if (BCMCPU_IS_6358() && !strcmp(id, "pcm"))
216 return &clk_pcm;
217 return ERR_PTR(-ENOENT);
218}
219
220EXPORT_SYMBOL(clk_get);
221
222void clk_put(struct clk *clk)
223{
224}
225
226EXPORT_SYMBOL(clk_put);
diff --git a/arch/mips/bcm63xx/cpu.c b/arch/mips/bcm63xx/cpu.c
new file mode 100644
index 000000000000..6dc43f0483e8
--- /dev/null
+++ b/arch/mips/bcm63xx/cpu.c
@@ -0,0 +1,345 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr>
7 * Copyright (C) 2009 Florian Fainelli <florian@openwrt.org>
8 */
9
10#include <linux/kernel.h>
11#include <linux/module.h>
12#include <linux/cpu.h>
13#include <bcm63xx_cpu.h>
14#include <bcm63xx_regs.h>
15#include <bcm63xx_io.h>
16#include <bcm63xx_irq.h>
17
18const unsigned long *bcm63xx_regs_base;
19EXPORT_SYMBOL(bcm63xx_regs_base);
20
21const int *bcm63xx_irqs;
22EXPORT_SYMBOL(bcm63xx_irqs);
23
24static u16 bcm63xx_cpu_id;
25static u16 bcm63xx_cpu_rev;
26static unsigned int bcm63xx_cpu_freq;
27static unsigned int bcm63xx_memory_size;
28
29/*
30 * 6338 register sets and irqs
31 */
32static const unsigned long bcm96338_regs_base[] = {
33 [RSET_DSL_LMEM] = BCM_6338_DSL_LMEM_BASE,
34 [RSET_PERF] = BCM_6338_PERF_BASE,
35 [RSET_TIMER] = BCM_6338_TIMER_BASE,
36 [RSET_WDT] = BCM_6338_WDT_BASE,
37 [RSET_UART0] = BCM_6338_UART0_BASE,
38 [RSET_GPIO] = BCM_6338_GPIO_BASE,
39 [RSET_SPI] = BCM_6338_SPI_BASE,
40 [RSET_OHCI0] = BCM_6338_OHCI0_BASE,
41 [RSET_OHCI_PRIV] = BCM_6338_OHCI_PRIV_BASE,
42 [RSET_USBH_PRIV] = BCM_6338_USBH_PRIV_BASE,
43 [RSET_UDC0] = BCM_6338_UDC0_BASE,
44 [RSET_MPI] = BCM_6338_MPI_BASE,
45 [RSET_PCMCIA] = BCM_6338_PCMCIA_BASE,
46 [RSET_SDRAM] = BCM_6338_SDRAM_BASE,
47 [RSET_DSL] = BCM_6338_DSL_BASE,
48 [RSET_ENET0] = BCM_6338_ENET0_BASE,
49 [RSET_ENET1] = BCM_6338_ENET1_BASE,
50 [RSET_ENETDMA] = BCM_6338_ENETDMA_BASE,
51 [RSET_MEMC] = BCM_6338_MEMC_BASE,
52 [RSET_DDR] = BCM_6338_DDR_BASE,
53};
54
55static const int bcm96338_irqs[] = {
56 [IRQ_TIMER] = BCM_6338_TIMER_IRQ,
57 [IRQ_UART0] = BCM_6338_UART0_IRQ,
58 [IRQ_DSL] = BCM_6338_DSL_IRQ,
59 [IRQ_ENET0] = BCM_6338_ENET0_IRQ,
60 [IRQ_ENET_PHY] = BCM_6338_ENET_PHY_IRQ,
61 [IRQ_ENET0_RXDMA] = BCM_6338_ENET0_RXDMA_IRQ,
62 [IRQ_ENET0_TXDMA] = BCM_6338_ENET0_TXDMA_IRQ,
63};
64
65/*
66 * 6345 register sets and irqs
67 */
68static const unsigned long bcm96345_regs_base[] = {
69 [RSET_DSL_LMEM] = BCM_6345_DSL_LMEM_BASE,
70 [RSET_PERF] = BCM_6345_PERF_BASE,
71 [RSET_TIMER] = BCM_6345_TIMER_BASE,
72 [RSET_WDT] = BCM_6345_WDT_BASE,
73 [RSET_UART0] = BCM_6345_UART0_BASE,
74 [RSET_GPIO] = BCM_6345_GPIO_BASE,
75 [RSET_SPI] = BCM_6345_SPI_BASE,
76 [RSET_UDC0] = BCM_6345_UDC0_BASE,
77 [RSET_OHCI0] = BCM_6345_OHCI0_BASE,
78 [RSET_OHCI_PRIV] = BCM_6345_OHCI_PRIV_BASE,
79 [RSET_USBH_PRIV] = BCM_6345_USBH_PRIV_BASE,
80 [RSET_MPI] = BCM_6345_MPI_BASE,
81 [RSET_PCMCIA] = BCM_6345_PCMCIA_BASE,
82 [RSET_DSL] = BCM_6345_DSL_BASE,
83 [RSET_ENET0] = BCM_6345_ENET0_BASE,
84 [RSET_ENET1] = BCM_6345_ENET1_BASE,
85 [RSET_ENETDMA] = BCM_6345_ENETDMA_BASE,
86 [RSET_EHCI0] = BCM_6345_EHCI0_BASE,
87 [RSET_SDRAM] = BCM_6345_SDRAM_BASE,
88 [RSET_MEMC] = BCM_6345_MEMC_BASE,
89 [RSET_DDR] = BCM_6345_DDR_BASE,
90};
91
92static const int bcm96345_irqs[] = {
93 [IRQ_TIMER] = BCM_6345_TIMER_IRQ,
94 [IRQ_UART0] = BCM_6345_UART0_IRQ,
95 [IRQ_DSL] = BCM_6345_DSL_IRQ,
96 [IRQ_ENET0] = BCM_6345_ENET0_IRQ,
97 [IRQ_ENET_PHY] = BCM_6345_ENET_PHY_IRQ,
98 [IRQ_ENET0_RXDMA] = BCM_6345_ENET0_RXDMA_IRQ,
99 [IRQ_ENET0_TXDMA] = BCM_6345_ENET0_TXDMA_IRQ,
100};
101
102/*
103 * 6348 register sets and irqs
104 */
105static const unsigned long bcm96348_regs_base[] = {
106 [RSET_DSL_LMEM] = BCM_6348_DSL_LMEM_BASE,
107 [RSET_PERF] = BCM_6348_PERF_BASE,
108 [RSET_TIMER] = BCM_6348_TIMER_BASE,
109 [RSET_WDT] = BCM_6348_WDT_BASE,
110 [RSET_UART0] = BCM_6348_UART0_BASE,
111 [RSET_GPIO] = BCM_6348_GPIO_BASE,
112 [RSET_SPI] = BCM_6348_SPI_BASE,
113 [RSET_OHCI0] = BCM_6348_OHCI0_BASE,
114 [RSET_OHCI_PRIV] = BCM_6348_OHCI_PRIV_BASE,
115 [RSET_USBH_PRIV] = BCM_6348_USBH_PRIV_BASE,
116 [RSET_MPI] = BCM_6348_MPI_BASE,
117 [RSET_PCMCIA] = BCM_6348_PCMCIA_BASE,
118 [RSET_SDRAM] = BCM_6348_SDRAM_BASE,
119 [RSET_DSL] = BCM_6348_DSL_BASE,
120 [RSET_ENET0] = BCM_6348_ENET0_BASE,
121 [RSET_ENET1] = BCM_6348_ENET1_BASE,
122 [RSET_ENETDMA] = BCM_6348_ENETDMA_BASE,
123 [RSET_MEMC] = BCM_6348_MEMC_BASE,
124 [RSET_DDR] = BCM_6348_DDR_BASE,
125};
126
127static const int bcm96348_irqs[] = {
128 [IRQ_TIMER] = BCM_6348_TIMER_IRQ,
129 [IRQ_UART0] = BCM_6348_UART0_IRQ,
130 [IRQ_DSL] = BCM_6348_DSL_IRQ,
131 [IRQ_ENET0] = BCM_6348_ENET0_IRQ,
132 [IRQ_ENET1] = BCM_6348_ENET1_IRQ,
133 [IRQ_ENET_PHY] = BCM_6348_ENET_PHY_IRQ,
134 [IRQ_OHCI0] = BCM_6348_OHCI0_IRQ,
135 [IRQ_PCMCIA] = BCM_6348_PCMCIA_IRQ,
136 [IRQ_ENET0_RXDMA] = BCM_6348_ENET0_RXDMA_IRQ,
137 [IRQ_ENET0_TXDMA] = BCM_6348_ENET0_TXDMA_IRQ,
138 [IRQ_ENET1_RXDMA] = BCM_6348_ENET1_RXDMA_IRQ,
139 [IRQ_ENET1_TXDMA] = BCM_6348_ENET1_TXDMA_IRQ,
140 [IRQ_PCI] = BCM_6348_PCI_IRQ,
141};
142
143/*
144 * 6358 register sets and irqs
145 */
146static const unsigned long bcm96358_regs_base[] = {
147 [RSET_DSL_LMEM] = BCM_6358_DSL_LMEM_BASE,
148 [RSET_PERF] = BCM_6358_PERF_BASE,
149 [RSET_TIMER] = BCM_6358_TIMER_BASE,
150 [RSET_WDT] = BCM_6358_WDT_BASE,
151 [RSET_UART0] = BCM_6358_UART0_BASE,
152 [RSET_GPIO] = BCM_6358_GPIO_BASE,
153 [RSET_SPI] = BCM_6358_SPI_BASE,
154 [RSET_OHCI0] = BCM_6358_OHCI0_BASE,
155 [RSET_EHCI0] = BCM_6358_EHCI0_BASE,
156 [RSET_OHCI_PRIV] = BCM_6358_OHCI_PRIV_BASE,
157 [RSET_USBH_PRIV] = BCM_6358_USBH_PRIV_BASE,
158 [RSET_MPI] = BCM_6358_MPI_BASE,
159 [RSET_PCMCIA] = BCM_6358_PCMCIA_BASE,
160 [RSET_SDRAM] = BCM_6358_SDRAM_BASE,
161 [RSET_DSL] = BCM_6358_DSL_BASE,
162 [RSET_ENET0] = BCM_6358_ENET0_BASE,
163 [RSET_ENET1] = BCM_6358_ENET1_BASE,
164 [RSET_ENETDMA] = BCM_6358_ENETDMA_BASE,
165 [RSET_MEMC] = BCM_6358_MEMC_BASE,
166 [RSET_DDR] = BCM_6358_DDR_BASE,
167};
168
169static const int bcm96358_irqs[] = {
170 [IRQ_TIMER] = BCM_6358_TIMER_IRQ,
171 [IRQ_UART0] = BCM_6358_UART0_IRQ,
172 [IRQ_DSL] = BCM_6358_DSL_IRQ,
173 [IRQ_ENET0] = BCM_6358_ENET0_IRQ,
174 [IRQ_ENET1] = BCM_6358_ENET1_IRQ,
175 [IRQ_ENET_PHY] = BCM_6358_ENET_PHY_IRQ,
176 [IRQ_OHCI0] = BCM_6358_OHCI0_IRQ,
177 [IRQ_EHCI0] = BCM_6358_EHCI0_IRQ,
178 [IRQ_PCMCIA] = BCM_6358_PCMCIA_IRQ,
179 [IRQ_ENET0_RXDMA] = BCM_6358_ENET0_RXDMA_IRQ,
180 [IRQ_ENET0_TXDMA] = BCM_6358_ENET0_TXDMA_IRQ,
181 [IRQ_ENET1_RXDMA] = BCM_6358_ENET1_RXDMA_IRQ,
182 [IRQ_ENET1_TXDMA] = BCM_6358_ENET1_TXDMA_IRQ,
183 [IRQ_PCI] = BCM_6358_PCI_IRQ,
184};
185
186u16 __bcm63xx_get_cpu_id(void)
187{
188 return bcm63xx_cpu_id;
189}
190
191EXPORT_SYMBOL(__bcm63xx_get_cpu_id);
192
193u16 bcm63xx_get_cpu_rev(void)
194{
195 return bcm63xx_cpu_rev;
196}
197
198EXPORT_SYMBOL(bcm63xx_get_cpu_rev);
199
200unsigned int bcm63xx_get_cpu_freq(void)
201{
202 return bcm63xx_cpu_freq;
203}
204
205unsigned int bcm63xx_get_memory_size(void)
206{
207 return bcm63xx_memory_size;
208}
209
210static unsigned int detect_cpu_clock(void)
211{
212 unsigned int tmp, n1 = 0, n2 = 0, m1 = 0;
213
214 /* BCM6338 has a fixed 240 Mhz frequency */
215 if (BCMCPU_IS_6338())
216 return 240000000;
217
218 /* BCM6345 has a fixed 140Mhz frequency */
219 if (BCMCPU_IS_6345())
220 return 140000000;
221
222 /*
223 * frequency depends on PLL configuration:
224 */
225 if (BCMCPU_IS_6348()) {
226 /* 16MHz * (N1 + 1) * (N2 + 2) / (M1_CPU + 1) */
227 tmp = bcm_perf_readl(PERF_MIPSPLLCTL_REG);
228 n1 = (tmp & MIPSPLLCTL_N1_MASK) >> MIPSPLLCTL_N1_SHIFT;
229 n2 = (tmp & MIPSPLLCTL_N2_MASK) >> MIPSPLLCTL_N2_SHIFT;
230 m1 = (tmp & MIPSPLLCTL_M1CPU_MASK) >> MIPSPLLCTL_M1CPU_SHIFT;
231 n1 += 1;
232 n2 += 2;
233 m1 += 1;
234 }
235
236 if (BCMCPU_IS_6358()) {
237 /* 16MHz * N1 * N2 / M1_CPU */
238 tmp = bcm_ddr_readl(DDR_DMIPSPLLCFG_REG);
239 n1 = (tmp & DMIPSPLLCFG_N1_MASK) >> DMIPSPLLCFG_N1_SHIFT;
240 n2 = (tmp & DMIPSPLLCFG_N2_MASK) >> DMIPSPLLCFG_N2_SHIFT;
241 m1 = (tmp & DMIPSPLLCFG_M1_MASK) >> DMIPSPLLCFG_M1_SHIFT;
242 }
243
244 return (16 * 1000000 * n1 * n2) / m1;
245}
246
247/*
248 * attempt to detect the amount of memory installed
249 */
250static unsigned int detect_memory_size(void)
251{
252 unsigned int cols = 0, rows = 0, is_32bits = 0, banks = 0;
253 u32 val;
254
255 if (BCMCPU_IS_6345())
256 return (8 * 1024 * 1024);
257
258 if (BCMCPU_IS_6338() || BCMCPU_IS_6348()) {
259 val = bcm_sdram_readl(SDRAM_CFG_REG);
260 rows = (val & SDRAM_CFG_ROW_MASK) >> SDRAM_CFG_ROW_SHIFT;
261 cols = (val & SDRAM_CFG_COL_MASK) >> SDRAM_CFG_COL_SHIFT;
262 is_32bits = (val & SDRAM_CFG_32B_MASK) ? 1 : 0;
263 banks = (val & SDRAM_CFG_BANK_MASK) ? 2 : 1;
264 }
265
266 if (BCMCPU_IS_6358()) {
267 val = bcm_memc_readl(MEMC_CFG_REG);
268 rows = (val & MEMC_CFG_ROW_MASK) >> MEMC_CFG_ROW_SHIFT;
269 cols = (val & MEMC_CFG_COL_MASK) >> MEMC_CFG_COL_SHIFT;
270 is_32bits = (val & MEMC_CFG_32B_MASK) ? 0 : 1;
271 banks = 2;
272 }
273
274 /* 0 => 11 address bits ... 2 => 13 address bits */
275 rows += 11;
276
277 /* 0 => 8 address bits ... 2 => 10 address bits */
278 cols += 8;
279
280 return 1 << (cols + rows + (is_32bits + 1) + banks);
281}
282
283void __init bcm63xx_cpu_init(void)
284{
285 unsigned int tmp, expected_cpu_id;
286 struct cpuinfo_mips *c = &current_cpu_data;
287
288 /* soc registers location depends on cpu type */
289 expected_cpu_id = 0;
290
291 switch (c->cputype) {
292 /*
293 * BCM6338 as the same PrId as BCM3302 see arch/mips/kernel/cpu-probe.c
294 */
295 case CPU_BCM3302:
296 expected_cpu_id = BCM6338_CPU_ID;
297 bcm63xx_regs_base = bcm96338_regs_base;
298 bcm63xx_irqs = bcm96338_irqs;
299 break;
300 case CPU_BCM6345:
301 expected_cpu_id = BCM6345_CPU_ID;
302 bcm63xx_regs_base = bcm96345_regs_base;
303 bcm63xx_irqs = bcm96345_irqs;
304 break;
305 case CPU_BCM6348:
306 expected_cpu_id = BCM6348_CPU_ID;
307 bcm63xx_regs_base = bcm96348_regs_base;
308 bcm63xx_irqs = bcm96348_irqs;
309 break;
310 case CPU_BCM6358:
311 expected_cpu_id = BCM6358_CPU_ID;
312 bcm63xx_regs_base = bcm96358_regs_base;
313 bcm63xx_irqs = bcm96358_irqs;
314 break;
315 }
316
317 /*
318 * really early to panic, but delaying panic would not help since we
319 * will never get any working console
320 */
321 if (!expected_cpu_id)
322 panic("unsupported Broadcom CPU");
323
324 /*
325 * bcm63xx_regs_base is set, we can access soc registers
326 */
327
328 /* double check CPU type */
329 tmp = bcm_perf_readl(PERF_REV_REG);
330 bcm63xx_cpu_id = (tmp & REV_CHIPID_MASK) >> REV_CHIPID_SHIFT;
331 bcm63xx_cpu_rev = (tmp & REV_REVID_MASK) >> REV_REVID_SHIFT;
332
333 if (bcm63xx_cpu_id != expected_cpu_id)
334 panic("bcm63xx CPU id mismatch");
335
336 bcm63xx_cpu_freq = detect_cpu_clock();
337 bcm63xx_memory_size = detect_memory_size();
338
339 printk(KERN_INFO "Detected Broadcom 0x%04x CPU revision %02x\n",
340 bcm63xx_cpu_id, bcm63xx_cpu_rev);
341 printk(KERN_INFO "CPU frequency is %u MHz\n",
342 bcm63xx_cpu_freq / 1000000);
343 printk(KERN_INFO "%uMB of RAM installed\n",
344 bcm63xx_memory_size >> 20);
345}
diff --git a/arch/mips/bcm63xx/cs.c b/arch/mips/bcm63xx/cs.c
new file mode 100644
index 000000000000..50d8190bbf7b
--- /dev/null
+++ b/arch/mips/bcm63xx/cs.c
@@ -0,0 +1,144 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr>
7 */
8
9#include <linux/kernel.h>
10#include <linux/module.h>
11#include <linux/spinlock.h>
12#include <linux/log2.h>
13#include <bcm63xx_cpu.h>
14#include <bcm63xx_io.h>
15#include <bcm63xx_regs.h>
16#include <bcm63xx_cs.h>
17
18static DEFINE_SPINLOCK(bcm63xx_cs_lock);
19
20/*
21 * check if given chip select exists
22 */
23static int is_valid_cs(unsigned int cs)
24{
25 if (cs > 6)
26 return 0;
27 return 1;
28}
29
30/*
31 * Configure chipselect base address and size (bytes).
32 * Size must be a power of two between 8k and 256M.
33 */
34int bcm63xx_set_cs_base(unsigned int cs, u32 base, unsigned int size)
35{
36 unsigned long flags;
37 u32 val;
38
39 if (!is_valid_cs(cs))
40 return -EINVAL;
41
42 /* sanity check on size */
43 if (size != roundup_pow_of_two(size))
44 return -EINVAL;
45
46 if (size < 8 * 1024 || size > 256 * 1024 * 1024)
47 return -EINVAL;
48
49 val = (base & MPI_CSBASE_BASE_MASK);
50 /* 8k => 0 - 256M => 15 */
51 val |= (ilog2(size) - ilog2(8 * 1024)) << MPI_CSBASE_SIZE_SHIFT;
52
53 spin_lock_irqsave(&bcm63xx_cs_lock, flags);
54 bcm_mpi_writel(val, MPI_CSBASE_REG(cs));
55 spin_unlock_irqrestore(&bcm63xx_cs_lock, flags);
56
57 return 0;
58}
59
60EXPORT_SYMBOL(bcm63xx_set_cs_base);
61
62/*
63 * configure chipselect timing (ns)
64 */
65int bcm63xx_set_cs_timing(unsigned int cs, unsigned int wait,
66 unsigned int setup, unsigned int hold)
67{
68 unsigned long flags;
69 u32 val;
70
71 if (!is_valid_cs(cs))
72 return -EINVAL;
73
74 spin_lock_irqsave(&bcm63xx_cs_lock, flags);
75 val = bcm_mpi_readl(MPI_CSCTL_REG(cs));
76 val &= ~(MPI_CSCTL_WAIT_MASK);
77 val &= ~(MPI_CSCTL_SETUP_MASK);
78 val &= ~(MPI_CSCTL_HOLD_MASK);
79 val |= wait << MPI_CSCTL_WAIT_SHIFT;
80 val |= setup << MPI_CSCTL_SETUP_SHIFT;
81 val |= hold << MPI_CSCTL_HOLD_SHIFT;
82 bcm_mpi_writel(val, MPI_CSCTL_REG(cs));
83 spin_unlock_irqrestore(&bcm63xx_cs_lock, flags);
84
85 return 0;
86}
87
88EXPORT_SYMBOL(bcm63xx_set_cs_timing);
89
90/*
91 * configure other chipselect parameter (data bus size, ...)
92 */
93int bcm63xx_set_cs_param(unsigned int cs, u32 params)
94{
95 unsigned long flags;
96 u32 val;
97
98 if (!is_valid_cs(cs))
99 return -EINVAL;
100
101 /* none of this fields apply to pcmcia */
102 if (cs == MPI_CS_PCMCIA_COMMON ||
103 cs == MPI_CS_PCMCIA_ATTR ||
104 cs == MPI_CS_PCMCIA_IO)
105 return -EINVAL;
106
107 spin_lock_irqsave(&bcm63xx_cs_lock, flags);
108 val = bcm_mpi_readl(MPI_CSCTL_REG(cs));
109 val &= ~(MPI_CSCTL_DATA16_MASK);
110 val &= ~(MPI_CSCTL_SYNCMODE_MASK);
111 val &= ~(MPI_CSCTL_TSIZE_MASK);
112 val &= ~(MPI_CSCTL_ENDIANSWAP_MASK);
113 val |= params;
114 bcm_mpi_writel(val, MPI_CSCTL_REG(cs));
115 spin_unlock_irqrestore(&bcm63xx_cs_lock, flags);
116
117 return 0;
118}
119
120EXPORT_SYMBOL(bcm63xx_set_cs_param);
121
122/*
123 * set cs status (enable/disable)
124 */
125int bcm63xx_set_cs_status(unsigned int cs, int enable)
126{
127 unsigned long flags;
128 u32 val;
129
130 if (!is_valid_cs(cs))
131 return -EINVAL;
132
133 spin_lock_irqsave(&bcm63xx_cs_lock, flags);
134 val = bcm_mpi_readl(MPI_CSCTL_REG(cs));
135 if (enable)
136 val |= MPI_CSCTL_ENABLE_MASK;
137 else
138 val &= ~MPI_CSCTL_ENABLE_MASK;
139 bcm_mpi_writel(val, MPI_CSCTL_REG(cs));
140 spin_unlock_irqrestore(&bcm63xx_cs_lock, flags);
141 return 0;
142}
143
144EXPORT_SYMBOL(bcm63xx_set_cs_status);
diff --git a/arch/mips/bcm63xx/dev-dsp.c b/arch/mips/bcm63xx/dev-dsp.c
new file mode 100644
index 000000000000..da46d1d3c77c
--- /dev/null
+++ b/arch/mips/bcm63xx/dev-dsp.c
@@ -0,0 +1,56 @@
1/*
2 * Broadcom BCM63xx VoIP DSP registration
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 *
8 * Copyright (C) 2009 Florian Fainelli <florian@openwrt.org>
9 */
10
11#include <linux/init.h>
12#include <linux/kernel.h>
13#include <linux/platform_device.h>
14
15#include <bcm63xx_cpu.h>
16#include <bcm63xx_dev_dsp.h>
17#include <bcm63xx_regs.h>
18#include <bcm63xx_io.h>
19
20static struct resource voip_dsp_resources[] = {
21 {
22 .start = -1, /* filled at runtime */
23 .end = -1, /* filled at runtime */
24 .flags = IORESOURCE_MEM,
25 },
26 {
27 .start = -1, /* filled at runtime */
28 .flags = IORESOURCE_IRQ,
29 },
30};
31
32static struct platform_device bcm63xx_voip_dsp_device = {
33 .name = "bcm63xx-voip-dsp",
34 .id = 0,
35 .num_resources = ARRAY_SIZE(voip_dsp_resources),
36 .resource = voip_dsp_resources,
37};
38
39int __init bcm63xx_dsp_register(const struct bcm63xx_dsp_platform_data *pd)
40{
41 struct bcm63xx_dsp_platform_data *dpd;
42 u32 val;
43
44 /* Get the memory window */
45 val = bcm_mpi_readl(MPI_CSBASE_REG(pd->cs - 1));
46 val &= MPI_CSBASE_BASE_MASK;
47 voip_dsp_resources[0].start = val;
48 voip_dsp_resources[0].end = val + 0xFFFFFFF;
49 voip_dsp_resources[1].start = pd->ext_irq;
50
51 /* copy given platform data */
52 dpd = bcm63xx_voip_dsp_device.dev.platform_data;
53 memcpy(dpd, pd, sizeof (*pd));
54
55 return platform_device_register(&bcm63xx_voip_dsp_device);
56}
diff --git a/arch/mips/bcm63xx/dev-enet.c b/arch/mips/bcm63xx/dev-enet.c
new file mode 100644
index 000000000000..9f544badd0b4
--- /dev/null
+++ b/arch/mips/bcm63xx/dev-enet.c
@@ -0,0 +1,159 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr>
7 */
8
9#include <linux/init.h>
10#include <linux/kernel.h>
11#include <linux/platform_device.h>
12#include <bcm63xx_dev_enet.h>
13#include <bcm63xx_io.h>
14#include <bcm63xx_regs.h>
15
16static struct resource shared_res[] = {
17 {
18 .start = -1, /* filled at runtime */
19 .end = -1, /* filled at runtime */
20 .flags = IORESOURCE_MEM,
21 },
22};
23
24static struct platform_device bcm63xx_enet_shared_device = {
25 .name = "bcm63xx_enet_shared",
26 .id = 0,
27 .num_resources = ARRAY_SIZE(shared_res),
28 .resource = shared_res,
29};
30
31static int shared_device_registered;
32
33static struct resource enet0_res[] = {
34 {
35 .start = -1, /* filled at runtime */
36 .end = -1, /* filled at runtime */
37 .flags = IORESOURCE_MEM,
38 },
39 {
40 .start = -1, /* filled at runtime */
41 .flags = IORESOURCE_IRQ,
42 },
43 {
44 .start = -1, /* filled at runtime */
45 .flags = IORESOURCE_IRQ,
46 },
47 {
48 .start = -1, /* filled at runtime */
49 .flags = IORESOURCE_IRQ,
50 },
51};
52
53static struct bcm63xx_enet_platform_data enet0_pd;
54
55static struct platform_device bcm63xx_enet0_device = {
56 .name = "bcm63xx_enet",
57 .id = 0,
58 .num_resources = ARRAY_SIZE(enet0_res),
59 .resource = enet0_res,
60 .dev = {
61 .platform_data = &enet0_pd,
62 },
63};
64
65static struct resource enet1_res[] = {
66 {
67 .start = -1, /* filled at runtime */
68 .end = -1, /* filled at runtime */
69 .flags = IORESOURCE_MEM,
70 },
71 {
72 .start = -1, /* filled at runtime */
73 .flags = IORESOURCE_IRQ,
74 },
75 {
76 .start = -1, /* filled at runtime */
77 .flags = IORESOURCE_IRQ,
78 },
79 {
80 .start = -1, /* filled at runtime */
81 .flags = IORESOURCE_IRQ,
82 },
83};
84
85static struct bcm63xx_enet_platform_data enet1_pd;
86
87static struct platform_device bcm63xx_enet1_device = {
88 .name = "bcm63xx_enet",
89 .id = 1,
90 .num_resources = ARRAY_SIZE(enet1_res),
91 .resource = enet1_res,
92 .dev = {
93 .platform_data = &enet1_pd,
94 },
95};
96
97int __init bcm63xx_enet_register(int unit,
98 const struct bcm63xx_enet_platform_data *pd)
99{
100 struct platform_device *pdev;
101 struct bcm63xx_enet_platform_data *dpd;
102 int ret;
103
104 if (unit > 1)
105 return -ENODEV;
106
107 if (!shared_device_registered) {
108 shared_res[0].start = bcm63xx_regset_address(RSET_ENETDMA);
109 shared_res[0].end = shared_res[0].start;
110 if (BCMCPU_IS_6338())
111 shared_res[0].end += (RSET_ENETDMA_SIZE / 2) - 1;
112 else
113 shared_res[0].end += (RSET_ENETDMA_SIZE) - 1;
114
115 ret = platform_device_register(&bcm63xx_enet_shared_device);
116 if (ret)
117 return ret;
118 shared_device_registered = 1;
119 }
120
121 if (unit == 0) {
122 enet0_res[0].start = bcm63xx_regset_address(RSET_ENET0);
123 enet0_res[0].end = enet0_res[0].start;
124 enet0_res[0].end += RSET_ENET_SIZE - 1;
125 enet0_res[1].start = bcm63xx_get_irq_number(IRQ_ENET0);
126 enet0_res[2].start = bcm63xx_get_irq_number(IRQ_ENET0_RXDMA);
127 enet0_res[3].start = bcm63xx_get_irq_number(IRQ_ENET0_TXDMA);
128 pdev = &bcm63xx_enet0_device;
129 } else {
130 enet1_res[0].start = bcm63xx_regset_address(RSET_ENET1);
131 enet1_res[0].end = enet1_res[0].start;
132 enet1_res[0].end += RSET_ENET_SIZE - 1;
133 enet1_res[1].start = bcm63xx_get_irq_number(IRQ_ENET1);
134 enet1_res[2].start = bcm63xx_get_irq_number(IRQ_ENET1_RXDMA);
135 enet1_res[3].start = bcm63xx_get_irq_number(IRQ_ENET1_TXDMA);
136 pdev = &bcm63xx_enet1_device;
137 }
138
139 /* copy given platform data */
140 dpd = pdev->dev.platform_data;
141 memcpy(dpd, pd, sizeof(*pd));
142
143 /* adjust them in case internal phy is used */
144 if (dpd->use_internal_phy) {
145
146 /* internal phy only exists for enet0 */
147 if (unit == 1)
148 return -ENODEV;
149
150 dpd->phy_id = 1;
151 dpd->has_phy_interrupt = 1;
152 dpd->phy_interrupt = bcm63xx_get_irq_number(IRQ_ENET_PHY);
153 }
154
155 ret = platform_device_register(pdev);
156 if (ret)
157 return ret;
158 return 0;
159}
diff --git a/arch/mips/bcm63xx/early_printk.c b/arch/mips/bcm63xx/early_printk.c
new file mode 100644
index 000000000000..bf353c937df2
--- /dev/null
+++ b/arch/mips/bcm63xx/early_printk.c
@@ -0,0 +1,30 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr>
7 */
8
9#include <linux/init.h>
10#include <bcm63xx_io.h>
11#include <bcm63xx_regs.h>
12
13static void __init wait_xfered(void)
14{
15 unsigned int val;
16
17 /* wait for any previous char to be transmitted */
18 do {
19 val = bcm_uart0_readl(UART_IR_REG);
20 if (val & UART_IR_STAT(UART_IR_TXEMPTY))
21 break;
22 } while (1);
23}
24
25void __init prom_putchar(char c)
26{
27 wait_xfered();
28 bcm_uart0_writel(c, UART_FIFO_REG);
29 wait_xfered();
30}
diff --git a/arch/mips/bcm63xx/gpio.c b/arch/mips/bcm63xx/gpio.c
new file mode 100644
index 000000000000..87ca39046334
--- /dev/null
+++ b/arch/mips/bcm63xx/gpio.c
@@ -0,0 +1,134 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr>
7 * Copyright (C) 2008 Florian Fainelli <florian@openwrt.org>
8 */
9
10#include <linux/kernel.h>
11#include <linux/module.h>
12#include <linux/spinlock.h>
13#include <linux/platform_device.h>
14#include <linux/gpio.h>
15
16#include <bcm63xx_cpu.h>
17#include <bcm63xx_gpio.h>
18#include <bcm63xx_io.h>
19#include <bcm63xx_regs.h>
20
21static DEFINE_SPINLOCK(bcm63xx_gpio_lock);
22static u32 gpio_out_low, gpio_out_high;
23
24static void bcm63xx_gpio_set(struct gpio_chip *chip,
25 unsigned gpio, int val)
26{
27 u32 reg;
28 u32 mask;
29 u32 *v;
30 unsigned long flags;
31
32 if (gpio >= chip->ngpio)
33 BUG();
34
35 if (gpio < 32) {
36 reg = GPIO_DATA_LO_REG;
37 mask = 1 << gpio;
38 v = &gpio_out_low;
39 } else {
40 reg = GPIO_DATA_HI_REG;
41 mask = 1 << (gpio - 32);
42 v = &gpio_out_high;
43 }
44
45 spin_lock_irqsave(&bcm63xx_gpio_lock, flags);
46 if (val)
47 *v |= mask;
48 else
49 *v &= ~mask;
50 bcm_gpio_writel(*v, reg);
51 spin_unlock_irqrestore(&bcm63xx_gpio_lock, flags);
52}
53
54static int bcm63xx_gpio_get(struct gpio_chip *chip, unsigned gpio)
55{
56 u32 reg;
57 u32 mask;
58
59 if (gpio >= chip->ngpio)
60 BUG();
61
62 if (gpio < 32) {
63 reg = GPIO_DATA_LO_REG;
64 mask = 1 << gpio;
65 } else {
66 reg = GPIO_DATA_HI_REG;
67 mask = 1 << (gpio - 32);
68 }
69
70 return !!(bcm_gpio_readl(reg) & mask);
71}
72
73static int bcm63xx_gpio_set_direction(struct gpio_chip *chip,
74 unsigned gpio, int dir)
75{
76 u32 reg;
77 u32 mask;
78 u32 tmp;
79 unsigned long flags;
80
81 if (gpio >= chip->ngpio)
82 BUG();
83
84 if (gpio < 32) {
85 reg = GPIO_CTL_LO_REG;
86 mask = 1 << gpio;
87 } else {
88 reg = GPIO_CTL_HI_REG;
89 mask = 1 << (gpio - 32);
90 }
91
92 spin_lock_irqsave(&bcm63xx_gpio_lock, flags);
93 tmp = bcm_gpio_readl(reg);
94 if (dir == GPIO_DIR_IN)
95 tmp &= ~mask;
96 else
97 tmp |= mask;
98 bcm_gpio_writel(tmp, reg);
99 spin_unlock_irqrestore(&bcm63xx_gpio_lock, flags);
100
101 return 0;
102}
103
104static int bcm63xx_gpio_direction_input(struct gpio_chip *chip, unsigned gpio)
105{
106 return bcm63xx_gpio_set_direction(chip, gpio, GPIO_DIR_IN);
107}
108
109static int bcm63xx_gpio_direction_output(struct gpio_chip *chip,
110 unsigned gpio, int value)
111{
112 bcm63xx_gpio_set(chip, gpio, value);
113 return bcm63xx_gpio_set_direction(chip, gpio, GPIO_DIR_OUT);
114}
115
116
117static struct gpio_chip bcm63xx_gpio_chip = {
118 .label = "bcm63xx-gpio",
119 .direction_input = bcm63xx_gpio_direction_input,
120 .direction_output = bcm63xx_gpio_direction_output,
121 .get = bcm63xx_gpio_get,
122 .set = bcm63xx_gpio_set,
123 .base = 0,
124};
125
126int __init bcm63xx_gpio_init(void)
127{
128 bcm63xx_gpio_chip.ngpio = bcm63xx_gpio_count();
129 pr_info("registering %d GPIOs\n", bcm63xx_gpio_chip.ngpio);
130
131 return gpiochip_add(&bcm63xx_gpio_chip);
132}
133
134arch_initcall(bcm63xx_gpio_init);
diff --git a/arch/mips/bcm63xx/irq.c b/arch/mips/bcm63xx/irq.c
new file mode 100644
index 000000000000..a0c5cd18c192
--- /dev/null
+++ b/arch/mips/bcm63xx/irq.c
@@ -0,0 +1,253 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr>
7 * Copyright (C) 2008 Nicolas Schichan <nschichan@freebox.fr>
8 */
9
10#include <linux/kernel.h>
11#include <linux/init.h>
12#include <linux/interrupt.h>
13#include <linux/module.h>
14#include <asm/irq_cpu.h>
15#include <asm/mipsregs.h>
16#include <bcm63xx_cpu.h>
17#include <bcm63xx_regs.h>
18#include <bcm63xx_io.h>
19#include <bcm63xx_irq.h>
20
21/*
22 * dispatch internal devices IRQ (uart, enet, watchdog, ...). do not
23 * prioritize any interrupt relatively to another. the static counter
24 * will resume the loop where it ended the last time we left this
25 * function.
26 */
27static void bcm63xx_irq_dispatch_internal(void)
28{
29 u32 pending;
30 static int i;
31
32 pending = bcm_perf_readl(PERF_IRQMASK_REG) &
33 bcm_perf_readl(PERF_IRQSTAT_REG);
34
35 if (!pending)
36 return ;
37
38 while (1) {
39 int to_call = i;
40
41 i = (i + 1) & 0x1f;
42 if (pending & (1 << to_call)) {
43 do_IRQ(to_call + IRQ_INTERNAL_BASE);
44 break;
45 }
46 }
47}
48
49asmlinkage void plat_irq_dispatch(void)
50{
51 u32 cause;
52
53 do {
54 cause = read_c0_cause() & read_c0_status() & ST0_IM;
55
56 if (!cause)
57 break;
58
59 if (cause & CAUSEF_IP7)
60 do_IRQ(7);
61 if (cause & CAUSEF_IP2)
62 bcm63xx_irq_dispatch_internal();
63 if (cause & CAUSEF_IP3)
64 do_IRQ(IRQ_EXT_0);
65 if (cause & CAUSEF_IP4)
66 do_IRQ(IRQ_EXT_1);
67 if (cause & CAUSEF_IP5)
68 do_IRQ(IRQ_EXT_2);
69 if (cause & CAUSEF_IP6)
70 do_IRQ(IRQ_EXT_3);
71 } while (1);
72}
73
74/*
75 * internal IRQs operations: only mask/unmask on PERF irq mask
76 * register.
77 */
78static inline void bcm63xx_internal_irq_mask(unsigned int irq)
79{
80 u32 mask;
81
82 irq -= IRQ_INTERNAL_BASE;
83 mask = bcm_perf_readl(PERF_IRQMASK_REG);
84 mask &= ~(1 << irq);
85 bcm_perf_writel(mask, PERF_IRQMASK_REG);
86}
87
88static void bcm63xx_internal_irq_unmask(unsigned int irq)
89{
90 u32 mask;
91
92 irq -= IRQ_INTERNAL_BASE;
93 mask = bcm_perf_readl(PERF_IRQMASK_REG);
94 mask |= (1 << irq);
95 bcm_perf_writel(mask, PERF_IRQMASK_REG);
96}
97
98static unsigned int bcm63xx_internal_irq_startup(unsigned int irq)
99{
100 bcm63xx_internal_irq_unmask(irq);
101 return 0;
102}
103
104/*
105 * external IRQs operations: mask/unmask and clear on PERF external
106 * irq control register.
107 */
108static void bcm63xx_external_irq_mask(unsigned int irq)
109{
110 u32 reg;
111
112 irq -= IRQ_EXT_BASE;
113 reg = bcm_perf_readl(PERF_EXTIRQ_CFG_REG);
114 reg &= ~EXTIRQ_CFG_MASK(irq);
115 bcm_perf_writel(reg, PERF_EXTIRQ_CFG_REG);
116}
117
118static void bcm63xx_external_irq_unmask(unsigned int irq)
119{
120 u32 reg;
121
122 irq -= IRQ_EXT_BASE;
123 reg = bcm_perf_readl(PERF_EXTIRQ_CFG_REG);
124 reg |= EXTIRQ_CFG_MASK(irq);
125 bcm_perf_writel(reg, PERF_EXTIRQ_CFG_REG);
126}
127
128static void bcm63xx_external_irq_clear(unsigned int irq)
129{
130 u32 reg;
131
132 irq -= IRQ_EXT_BASE;
133 reg = bcm_perf_readl(PERF_EXTIRQ_CFG_REG);
134 reg |= EXTIRQ_CFG_CLEAR(irq);
135 bcm_perf_writel(reg, PERF_EXTIRQ_CFG_REG);
136}
137
138static unsigned int bcm63xx_external_irq_startup(unsigned int irq)
139{
140 set_c0_status(0x100 << (irq - IRQ_MIPS_BASE));
141 irq_enable_hazard();
142 bcm63xx_external_irq_unmask(irq);
143 return 0;
144}
145
146static void bcm63xx_external_irq_shutdown(unsigned int irq)
147{
148 bcm63xx_external_irq_mask(irq);
149 clear_c0_status(0x100 << (irq - IRQ_MIPS_BASE));
150 irq_disable_hazard();
151}
152
153static int bcm63xx_external_irq_set_type(unsigned int irq,
154 unsigned int flow_type)
155{
156 u32 reg;
157 struct irq_desc *desc = irq_desc + irq;
158
159 irq -= IRQ_EXT_BASE;
160
161 flow_type &= IRQ_TYPE_SENSE_MASK;
162
163 if (flow_type == IRQ_TYPE_NONE)
164 flow_type = IRQ_TYPE_LEVEL_LOW;
165
166 reg = bcm_perf_readl(PERF_EXTIRQ_CFG_REG);
167 switch (flow_type) {
168 case IRQ_TYPE_EDGE_BOTH:
169 reg &= ~EXTIRQ_CFG_LEVELSENSE(irq);
170 reg |= EXTIRQ_CFG_BOTHEDGE(irq);
171 break;
172
173 case IRQ_TYPE_EDGE_RISING:
174 reg &= ~EXTIRQ_CFG_LEVELSENSE(irq);
175 reg |= EXTIRQ_CFG_SENSE(irq);
176 reg &= ~EXTIRQ_CFG_BOTHEDGE(irq);
177 break;
178
179 case IRQ_TYPE_EDGE_FALLING:
180 reg &= ~EXTIRQ_CFG_LEVELSENSE(irq);
181 reg &= ~EXTIRQ_CFG_SENSE(irq);
182 reg &= ~EXTIRQ_CFG_BOTHEDGE(irq);
183 break;
184
185 case IRQ_TYPE_LEVEL_HIGH:
186 reg |= EXTIRQ_CFG_LEVELSENSE(irq);
187 reg |= EXTIRQ_CFG_SENSE(irq);
188 break;
189
190 case IRQ_TYPE_LEVEL_LOW:
191 reg |= EXTIRQ_CFG_LEVELSENSE(irq);
192 reg &= ~EXTIRQ_CFG_SENSE(irq);
193 break;
194
195 default:
196 printk(KERN_ERR "bogus flow type combination given !\n");
197 return -EINVAL;
198 }
199 bcm_perf_writel(reg, PERF_EXTIRQ_CFG_REG);
200
201 if (flow_type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH)) {
202 desc->status |= IRQ_LEVEL;
203 desc->handle_irq = handle_level_irq;
204 } else {
205 desc->handle_irq = handle_edge_irq;
206 }
207
208 return 0;
209}
210
211static struct irq_chip bcm63xx_internal_irq_chip = {
212 .name = "bcm63xx_ipic",
213 .startup = bcm63xx_internal_irq_startup,
214 .shutdown = bcm63xx_internal_irq_mask,
215
216 .mask = bcm63xx_internal_irq_mask,
217 .mask_ack = bcm63xx_internal_irq_mask,
218 .unmask = bcm63xx_internal_irq_unmask,
219};
220
221static struct irq_chip bcm63xx_external_irq_chip = {
222 .name = "bcm63xx_epic",
223 .startup = bcm63xx_external_irq_startup,
224 .shutdown = bcm63xx_external_irq_shutdown,
225
226 .ack = bcm63xx_external_irq_clear,
227
228 .mask = bcm63xx_external_irq_mask,
229 .unmask = bcm63xx_external_irq_unmask,
230
231 .set_type = bcm63xx_external_irq_set_type,
232};
233
234static struct irqaction cpu_ip2_cascade_action = {
235 .handler = no_action,
236 .name = "cascade_ip2",
237};
238
239void __init arch_init_irq(void)
240{
241 int i;
242
243 mips_cpu_irq_init();
244 for (i = IRQ_INTERNAL_BASE; i < NR_IRQS; ++i)
245 set_irq_chip_and_handler(i, &bcm63xx_internal_irq_chip,
246 handle_level_irq);
247
248 for (i = IRQ_EXT_BASE; i < IRQ_EXT_BASE + 4; ++i)
249 set_irq_chip_and_handler(i, &bcm63xx_external_irq_chip,
250 handle_edge_irq);
251
252 setup_irq(IRQ_MIPS_BASE + 2, &cpu_ip2_cascade_action);
253}
diff --git a/arch/mips/bcm63xx/prom.c b/arch/mips/bcm63xx/prom.c
new file mode 100644
index 000000000000..fb284fbc5853
--- /dev/null
+++ b/arch/mips/bcm63xx/prom.c
@@ -0,0 +1,55 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr>
7 */
8
9#include <linux/init.h>
10#include <linux/bootmem.h>
11#include <asm/bootinfo.h>
12#include <bcm63xx_board.h>
13#include <bcm63xx_cpu.h>
14#include <bcm63xx_io.h>
15#include <bcm63xx_regs.h>
16#include <bcm63xx_gpio.h>
17
18void __init prom_init(void)
19{
20 u32 reg, mask;
21
22 bcm63xx_cpu_init();
23
24 /* stop any running watchdog */
25 bcm_wdt_writel(WDT_STOP_1, WDT_CTL_REG);
26 bcm_wdt_writel(WDT_STOP_2, WDT_CTL_REG);
27
28 /* disable all hardware blocks clock for now */
29 if (BCMCPU_IS_6338())
30 mask = CKCTL_6338_ALL_SAFE_EN;
31 else if (BCMCPU_IS_6345())
32 mask = CKCTL_6345_ALL_SAFE_EN;
33 else if (BCMCPU_IS_6348())
34 mask = CKCTL_6348_ALL_SAFE_EN;
35 else
36 /* BCMCPU_IS_6358() */
37 mask = CKCTL_6358_ALL_SAFE_EN;
38
39 reg = bcm_perf_readl(PERF_CKCTL_REG);
40 reg &= ~mask;
41 bcm_perf_writel(reg, PERF_CKCTL_REG);
42
43 /* assign command line from kernel config */
44 strcpy(arcs_cmdline, CONFIG_CMDLINE);
45
46 /* register gpiochip */
47 bcm63xx_gpio_init();
48
49 /* do low level board init */
50 board_prom_init();
51}
52
53void __init prom_free_prom_memory(void)
54{
55}
diff --git a/arch/mips/bcm63xx/setup.c b/arch/mips/bcm63xx/setup.c
new file mode 100644
index 000000000000..b18a0ca926fa
--- /dev/null
+++ b/arch/mips/bcm63xx/setup.c
@@ -0,0 +1,125 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr>
7 */
8
9#include <linux/init.h>
10#include <linux/kernel.h>
11#include <linux/delay.h>
12#include <linux/bootmem.h>
13#include <linux/ioport.h>
14#include <linux/pm.h>
15#include <asm/bootinfo.h>
16#include <asm/time.h>
17#include <asm/reboot.h>
18#include <asm/cacheflush.h>
19#include <bcm63xx_board.h>
20#include <bcm63xx_cpu.h>
21#include <bcm63xx_regs.h>
22#include <bcm63xx_io.h>
23
24void bcm63xx_machine_halt(void)
25{
26 printk(KERN_INFO "System halted\n");
27 while (1)
28 ;
29}
30
31static void bcm6348_a1_reboot(void)
32{
33 u32 reg;
34
35 /* soft reset all blocks */
36 printk(KERN_INFO "soft-reseting all blocks ...\n");
37 reg = bcm_perf_readl(PERF_SOFTRESET_REG);
38 reg &= ~SOFTRESET_6348_ALL;
39 bcm_perf_writel(reg, PERF_SOFTRESET_REG);
40 mdelay(10);
41
42 reg = bcm_perf_readl(PERF_SOFTRESET_REG);
43 reg |= SOFTRESET_6348_ALL;
44 bcm_perf_writel(reg, PERF_SOFTRESET_REG);
45 mdelay(10);
46
47 /* Jump to the power on address. */
48 printk(KERN_INFO "jumping to reset vector.\n");
49 /* set high vectors (base at 0xbfc00000 */
50 set_c0_status(ST0_BEV | ST0_ERL);
51 /* run uncached in kseg0 */
52 change_c0_config(CONF_CM_CMASK, CONF_CM_UNCACHED);
53 __flush_cache_all();
54 /* remove all wired TLB entries */
55 write_c0_wired(0);
56 __asm__ __volatile__(
57 "jr\t%0"
58 :
59 : "r" (0xbfc00000));
60 while (1)
61 ;
62}
63
64void bcm63xx_machine_reboot(void)
65{
66 u32 reg;
67
68 /* mask and clear all external irq */
69 reg = bcm_perf_readl(PERF_EXTIRQ_CFG_REG);
70 reg &= ~EXTIRQ_CFG_MASK_ALL;
71 reg |= EXTIRQ_CFG_CLEAR_ALL;
72 bcm_perf_writel(reg, PERF_EXTIRQ_CFG_REG);
73
74 if (BCMCPU_IS_6348() && (bcm63xx_get_cpu_rev() == 0xa1))
75 bcm6348_a1_reboot();
76
77 printk(KERN_INFO "triggering watchdog soft-reset...\n");
78 bcm_perf_writel(SYS_PLL_SOFT_RESET, PERF_SYS_PLL_CTL_REG);
79 while (1)
80 ;
81}
82
83static void __bcm63xx_machine_reboot(char *p)
84{
85 bcm63xx_machine_reboot();
86}
87
88/*
89 * return system type in /proc/cpuinfo
90 */
91const char *get_system_type(void)
92{
93 static char buf[128];
94 snprintf(buf, sizeof(buf), "bcm63xx/%s (0x%04x/0x%04X)",
95 board_get_name(),
96 bcm63xx_get_cpu_id(), bcm63xx_get_cpu_rev());
97 return buf;
98}
99
100void __init plat_time_init(void)
101{
102 mips_hpt_frequency = bcm63xx_get_cpu_freq() / 2;
103}
104
105void __init plat_mem_setup(void)
106{
107 add_memory_region(0, bcm63xx_get_memory_size(), BOOT_MEM_RAM);
108
109 _machine_halt = bcm63xx_machine_halt;
110 _machine_restart = __bcm63xx_machine_reboot;
111 pm_power_off = bcm63xx_machine_halt;
112
113 set_io_port_base(0);
114 ioport_resource.start = 0;
115 ioport_resource.end = ~0;
116
117 board_setup();
118}
119
120int __init bcm63xx_register_devices(void)
121{
122 return board_register_devices();
123}
124
125arch_initcall(bcm63xx_register_devices);
diff --git a/arch/mips/bcm63xx/timer.c b/arch/mips/bcm63xx/timer.c
new file mode 100644
index 000000000000..ba522bdcde4b
--- /dev/null
+++ b/arch/mips/bcm63xx/timer.c
@@ -0,0 +1,205 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr>
7 */
8
9#include <linux/kernel.h>
10#include <linux/err.h>
11#include <linux/module.h>
12#include <linux/spinlock.h>
13#include <linux/interrupt.h>
14#include <linux/clk.h>
15#include <bcm63xx_cpu.h>
16#include <bcm63xx_io.h>
17#include <bcm63xx_timer.h>
18#include <bcm63xx_regs.h>
19
20static DEFINE_SPINLOCK(timer_reg_lock);
21static DEFINE_SPINLOCK(timer_data_lock);
22static struct clk *periph_clk;
23
24static struct timer_data {
25 void (*cb)(void *);
26 void *data;
27} timer_data[BCM63XX_TIMER_COUNT];
28
29static irqreturn_t timer_interrupt(int irq, void *dev_id)
30{
31 u32 stat;
32 int i;
33
34 spin_lock(&timer_reg_lock);
35 stat = bcm_timer_readl(TIMER_IRQSTAT_REG);
36 bcm_timer_writel(stat, TIMER_IRQSTAT_REG);
37 spin_unlock(&timer_reg_lock);
38
39 for (i = 0; i < BCM63XX_TIMER_COUNT; i++) {
40 if (!(stat & TIMER_IRQSTAT_TIMER_CAUSE(i)))
41 continue;
42
43 spin_lock(&timer_data_lock);
44 if (!timer_data[i].cb) {
45 spin_unlock(&timer_data_lock);
46 continue;
47 }
48
49 timer_data[i].cb(timer_data[i].data);
50 spin_unlock(&timer_data_lock);
51 }
52
53 return IRQ_HANDLED;
54}
55
56int bcm63xx_timer_enable(int id)
57{
58 u32 reg;
59 unsigned long flags;
60
61 if (id >= BCM63XX_TIMER_COUNT)
62 return -EINVAL;
63
64 spin_lock_irqsave(&timer_reg_lock, flags);
65
66 reg = bcm_timer_readl(TIMER_CTLx_REG(id));
67 reg |= TIMER_CTL_ENABLE_MASK;
68 bcm_timer_writel(reg, TIMER_CTLx_REG(id));
69
70 reg = bcm_timer_readl(TIMER_IRQSTAT_REG);
71 reg |= TIMER_IRQSTAT_TIMER_IR_EN(id);
72 bcm_timer_writel(reg, TIMER_IRQSTAT_REG);
73
74 spin_unlock_irqrestore(&timer_reg_lock, flags);
75 return 0;
76}
77
78EXPORT_SYMBOL(bcm63xx_timer_enable);
79
80int bcm63xx_timer_disable(int id)
81{
82 u32 reg;
83 unsigned long flags;
84
85 if (id >= BCM63XX_TIMER_COUNT)
86 return -EINVAL;
87
88 spin_lock_irqsave(&timer_reg_lock, flags);
89
90 reg = bcm_timer_readl(TIMER_CTLx_REG(id));
91 reg &= ~TIMER_CTL_ENABLE_MASK;
92 bcm_timer_writel(reg, TIMER_CTLx_REG(id));
93
94 reg = bcm_timer_readl(TIMER_IRQSTAT_REG);
95 reg &= ~TIMER_IRQSTAT_TIMER_IR_EN(id);
96 bcm_timer_writel(reg, TIMER_IRQSTAT_REG);
97
98 spin_unlock_irqrestore(&timer_reg_lock, flags);
99 return 0;
100}
101
102EXPORT_SYMBOL(bcm63xx_timer_disable);
103
104int bcm63xx_timer_register(int id, void (*callback)(void *data), void *data)
105{
106 unsigned long flags;
107 int ret;
108
109 if (id >= BCM63XX_TIMER_COUNT || !callback)
110 return -EINVAL;
111
112 ret = 0;
113 spin_lock_irqsave(&timer_data_lock, flags);
114 if (timer_data[id].cb) {
115 ret = -EBUSY;
116 goto out;
117 }
118
119 timer_data[id].cb = callback;
120 timer_data[id].data = data;
121
122out:
123 spin_unlock_irqrestore(&timer_data_lock, flags);
124 return ret;
125}
126
127EXPORT_SYMBOL(bcm63xx_timer_register);
128
129void bcm63xx_timer_unregister(int id)
130{
131 unsigned long flags;
132
133 if (id >= BCM63XX_TIMER_COUNT)
134 return;
135
136 spin_lock_irqsave(&timer_data_lock, flags);
137 timer_data[id].cb = NULL;
138 spin_unlock_irqrestore(&timer_data_lock, flags);
139}
140
141EXPORT_SYMBOL(bcm63xx_timer_unregister);
142
143unsigned int bcm63xx_timer_countdown(unsigned int countdown_us)
144{
145 return (clk_get_rate(periph_clk) / (1000 * 1000)) * countdown_us;
146}
147
148EXPORT_SYMBOL(bcm63xx_timer_countdown);
149
150int bcm63xx_timer_set(int id, int monotonic, unsigned int countdown_us)
151{
152 u32 reg, countdown;
153 unsigned long flags;
154
155 if (id >= BCM63XX_TIMER_COUNT)
156 return -EINVAL;
157
158 countdown = bcm63xx_timer_countdown(countdown_us);
159 if (countdown & ~TIMER_CTL_COUNTDOWN_MASK)
160 return -EINVAL;
161
162 spin_lock_irqsave(&timer_reg_lock, flags);
163 reg = bcm_timer_readl(TIMER_CTLx_REG(id));
164
165 if (monotonic)
166 reg &= ~TIMER_CTL_MONOTONIC_MASK;
167 else
168 reg |= TIMER_CTL_MONOTONIC_MASK;
169
170 reg &= ~TIMER_CTL_COUNTDOWN_MASK;
171 reg |= countdown;
172 bcm_timer_writel(reg, TIMER_CTLx_REG(id));
173
174 spin_unlock_irqrestore(&timer_reg_lock, flags);
175 return 0;
176}
177
178EXPORT_SYMBOL(bcm63xx_timer_set);
179
180int bcm63xx_timer_init(void)
181{
182 int ret, irq;
183 u32 reg;
184
185 reg = bcm_timer_readl(TIMER_IRQSTAT_REG);
186 reg &= ~TIMER_IRQSTAT_TIMER0_IR_EN;
187 reg &= ~TIMER_IRQSTAT_TIMER1_IR_EN;
188 reg &= ~TIMER_IRQSTAT_TIMER2_IR_EN;
189 bcm_timer_writel(reg, TIMER_IRQSTAT_REG);
190
191 periph_clk = clk_get(NULL, "periph");
192 if (IS_ERR(periph_clk))
193 return -ENODEV;
194
195 irq = bcm63xx_get_irq_number(IRQ_TIMER);
196 ret = request_irq(irq, timer_interrupt, 0, "bcm63xx_timer", NULL);
197 if (ret) {
198 printk(KERN_ERR "bcm63xx_timer: failed to register irq\n");
199 return ret;
200 }
201
202 return 0;
203}
204
205arch_initcall(bcm63xx_timer_init);
diff --git a/arch/mips/boot/elf2ecoff.c b/arch/mips/boot/elf2ecoff.c
index c5a7f308c405..e19d906236af 100644
--- a/arch/mips/boot/elf2ecoff.c
+++ b/arch/mips/boot/elf2ecoff.c
@@ -59,8 +59,8 @@ struct sect {
59}; 59};
60 60
61int *symTypeTable; 61int *symTypeTable;
62int must_convert_endian = 0; 62int must_convert_endian;
63int format_bigendian = 0; 63int format_bigendian;
64 64
65static void copy(int out, int in, off_t offset, off_t size) 65static void copy(int out, int in, off_t offset, off_t size)
66{ 66{
diff --git a/arch/mips/cavium-octeon/Makefile b/arch/mips/cavium-octeon/Makefile
index d6903c3f3d51..139436280520 100644
--- a/arch/mips/cavium-octeon/Makefile
+++ b/arch/mips/cavium-octeon/Makefile
@@ -6,10 +6,10 @@
6# License. See the file "COPYING" in the main directory of this archive 6# License. See the file "COPYING" in the main directory of this archive
7# for more details. 7# for more details.
8# 8#
9# Copyright (C) 2005-2008 Cavium Networks 9# Copyright (C) 2005-2009 Cavium Networks
10# 10#
11 11
12obj-y := setup.o serial.o octeon-irq.o csrc-octeon.o 12obj-y := setup.o serial.o octeon-platform.o octeon-irq.o csrc-octeon.o
13obj-y += dma-octeon.o flash_setup.o 13obj-y += dma-octeon.o flash_setup.o
14obj-y += octeon-memcpy.o 14obj-y += octeon-memcpy.o
15 15
diff --git a/arch/mips/cavium-octeon/octeon-platform.c b/arch/mips/cavium-octeon/octeon-platform.c
new file mode 100644
index 000000000000..be711dd2d918
--- /dev/null
+++ b/arch/mips/cavium-octeon/octeon-platform.c
@@ -0,0 +1,164 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2004-2009 Cavium Networks
7 * Copyright (C) 2008 Wind River Systems
8 */
9
10#include <linux/init.h>
11#include <linux/irq.h>
12#include <linux/module.h>
13#include <linux/platform_device.h>
14
15#include <asm/octeon/octeon.h>
16#include <asm/octeon/cvmx-rnm-defs.h>
17
18static struct octeon_cf_data octeon_cf_data;
19
20static int __init octeon_cf_device_init(void)
21{
22 union cvmx_mio_boot_reg_cfgx mio_boot_reg_cfg;
23 unsigned long base_ptr, region_base, region_size;
24 struct platform_device *pd;
25 struct resource cf_resources[3];
26 unsigned int num_resources;
27 int i;
28 int ret = 0;
29
30 /* Setup octeon-cf platform device if present. */
31 base_ptr = 0;
32 if (octeon_bootinfo->major_version == 1
33 && octeon_bootinfo->minor_version >= 1) {
34 if (octeon_bootinfo->compact_flash_common_base_addr)
35 base_ptr =
36 octeon_bootinfo->compact_flash_common_base_addr;
37 } else {
38 base_ptr = 0x1d000800;
39 }
40
41 if (!base_ptr)
42 return ret;
43
44 /* Find CS0 region. */
45 for (i = 0; i < 8; i++) {
46 mio_boot_reg_cfg.u64 = cvmx_read_csr(CVMX_MIO_BOOT_REG_CFGX(i));
47 region_base = mio_boot_reg_cfg.s.base << 16;
48 region_size = (mio_boot_reg_cfg.s.size + 1) << 16;
49 if (mio_boot_reg_cfg.s.en && base_ptr >= region_base
50 && base_ptr < region_base + region_size)
51 break;
52 }
53 if (i >= 7) {
54 /* i and i + 1 are CS0 and CS1, both must be less than 8. */
55 goto out;
56 }
57 octeon_cf_data.base_region = i;
58 octeon_cf_data.is16bit = mio_boot_reg_cfg.s.width;
59 octeon_cf_data.base_region_bias = base_ptr - region_base;
60 memset(cf_resources, 0, sizeof(cf_resources));
61 num_resources = 0;
62 cf_resources[num_resources].flags = IORESOURCE_MEM;
63 cf_resources[num_resources].start = region_base;
64 cf_resources[num_resources].end = region_base + region_size - 1;
65 num_resources++;
66
67
68 if (!(base_ptr & 0xfffful)) {
69 /*
70 * Boot loader signals availability of DMA (true_ide
71 * mode) by setting low order bits of base_ptr to
72 * zero.
73 */
74
75 /* Asume that CS1 immediately follows. */
76 mio_boot_reg_cfg.u64 =
77 cvmx_read_csr(CVMX_MIO_BOOT_REG_CFGX(i + 1));
78 region_base = mio_boot_reg_cfg.s.base << 16;
79 region_size = (mio_boot_reg_cfg.s.size + 1) << 16;
80 if (!mio_boot_reg_cfg.s.en)
81 goto out;
82
83 cf_resources[num_resources].flags = IORESOURCE_MEM;
84 cf_resources[num_resources].start = region_base;
85 cf_resources[num_resources].end = region_base + region_size - 1;
86 num_resources++;
87
88 octeon_cf_data.dma_engine = 0;
89 cf_resources[num_resources].flags = IORESOURCE_IRQ;
90 cf_resources[num_resources].start = OCTEON_IRQ_BOOTDMA;
91 cf_resources[num_resources].end = OCTEON_IRQ_BOOTDMA;
92 num_resources++;
93 } else {
94 octeon_cf_data.dma_engine = -1;
95 }
96
97 pd = platform_device_alloc("pata_octeon_cf", -1);
98 if (!pd) {
99 ret = -ENOMEM;
100 goto out;
101 }
102 pd->dev.platform_data = &octeon_cf_data;
103
104 ret = platform_device_add_resources(pd, cf_resources, num_resources);
105 if (ret)
106 goto fail;
107
108 ret = platform_device_add(pd);
109 if (ret)
110 goto fail;
111
112 return ret;
113fail:
114 platform_device_put(pd);
115out:
116 return ret;
117}
118device_initcall(octeon_cf_device_init);
119
120/* Octeon Random Number Generator. */
121static int __init octeon_rng_device_init(void)
122{
123 struct platform_device *pd;
124 int ret = 0;
125
126 struct resource rng_resources[] = {
127 {
128 .flags = IORESOURCE_MEM,
129 .start = XKPHYS_TO_PHYS(CVMX_RNM_CTL_STATUS),
130 .end = XKPHYS_TO_PHYS(CVMX_RNM_CTL_STATUS) + 0xf
131 }, {
132 .flags = IORESOURCE_MEM,
133 .start = cvmx_build_io_address(8, 0),
134 .end = cvmx_build_io_address(8, 0) + 0x7
135 }
136 };
137
138 pd = platform_device_alloc("octeon_rng", -1);
139 if (!pd) {
140 ret = -ENOMEM;
141 goto out;
142 }
143
144 ret = platform_device_add_resources(pd, rng_resources,
145 ARRAY_SIZE(rng_resources));
146 if (ret)
147 goto fail;
148
149 ret = platform_device_add(pd);
150 if (ret)
151 goto fail;
152
153 return ret;
154fail:
155 platform_device_put(pd);
156
157out:
158 return ret;
159}
160device_initcall(octeon_rng_device_init);
161
162MODULE_AUTHOR("David Daney <ddaney@caviumnetworks.com>");
163MODULE_LICENSE("GPL");
164MODULE_DESCRIPTION("Platform driver for Octeon SOC");
diff --git a/arch/mips/cavium-octeon/setup.c b/arch/mips/cavium-octeon/setup.c
index da559249cc2f..b321d3b16877 100644
--- a/arch/mips/cavium-octeon/setup.c
+++ b/arch/mips/cavium-octeon/setup.c
@@ -11,7 +11,6 @@
11#include <linux/delay.h> 11#include <linux/delay.h>
12#include <linux/interrupt.h> 12#include <linux/interrupt.h>
13#include <linux/io.h> 13#include <linux/io.h>
14#include <linux/irq.h>
15#include <linux/serial.h> 14#include <linux/serial.h>
16#include <linux/smp.h> 15#include <linux/smp.h>
17#include <linux/types.h> 16#include <linux/types.h>
@@ -824,105 +823,3 @@ void prom_free_prom_memory(void)
824 CONFIG_CAVIUM_RESERVE32_USE_WIRED_TLB option is set */ 823 CONFIG_CAVIUM_RESERVE32_USE_WIRED_TLB option is set */
825 octeon_hal_setup_reserved32(); 824 octeon_hal_setup_reserved32();
826} 825}
827
828static struct octeon_cf_data octeon_cf_data;
829
830static int __init octeon_cf_device_init(void)
831{
832 union cvmx_mio_boot_reg_cfgx mio_boot_reg_cfg;
833 unsigned long base_ptr, region_base, region_size;
834 struct platform_device *pd;
835 struct resource cf_resources[3];
836 unsigned int num_resources;
837 int i;
838 int ret = 0;
839
840 /* Setup octeon-cf platform device if present. */
841 base_ptr = 0;
842 if (octeon_bootinfo->major_version == 1
843 && octeon_bootinfo->minor_version >= 1) {
844 if (octeon_bootinfo->compact_flash_common_base_addr)
845 base_ptr =
846 octeon_bootinfo->compact_flash_common_base_addr;
847 } else {
848 base_ptr = 0x1d000800;
849 }
850
851 if (!base_ptr)
852 return ret;
853
854 /* Find CS0 region. */
855 for (i = 0; i < 8; i++) {
856 mio_boot_reg_cfg.u64 = cvmx_read_csr(CVMX_MIO_BOOT_REG_CFGX(i));
857 region_base = mio_boot_reg_cfg.s.base << 16;
858 region_size = (mio_boot_reg_cfg.s.size + 1) << 16;
859 if (mio_boot_reg_cfg.s.en && base_ptr >= region_base
860 && base_ptr < region_base + region_size)
861 break;
862 }
863 if (i >= 7) {
864 /* i and i + 1 are CS0 and CS1, both must be less than 8. */
865 goto out;
866 }
867 octeon_cf_data.base_region = i;
868 octeon_cf_data.is16bit = mio_boot_reg_cfg.s.width;
869 octeon_cf_data.base_region_bias = base_ptr - region_base;
870 memset(cf_resources, 0, sizeof(cf_resources));
871 num_resources = 0;
872 cf_resources[num_resources].flags = IORESOURCE_MEM;
873 cf_resources[num_resources].start = region_base;
874 cf_resources[num_resources].end = region_base + region_size - 1;
875 num_resources++;
876
877
878 if (!(base_ptr & 0xfffful)) {
879 /*
880 * Boot loader signals availability of DMA (true_ide
881 * mode) by setting low order bits of base_ptr to
882 * zero.
883 */
884
885 /* Asume that CS1 immediately follows. */
886 mio_boot_reg_cfg.u64 =
887 cvmx_read_csr(CVMX_MIO_BOOT_REG_CFGX(i + 1));
888 region_base = mio_boot_reg_cfg.s.base << 16;
889 region_size = (mio_boot_reg_cfg.s.size + 1) << 16;
890 if (!mio_boot_reg_cfg.s.en)
891 goto out;
892
893 cf_resources[num_resources].flags = IORESOURCE_MEM;
894 cf_resources[num_resources].start = region_base;
895 cf_resources[num_resources].end = region_base + region_size - 1;
896 num_resources++;
897
898 octeon_cf_data.dma_engine = 0;
899 cf_resources[num_resources].flags = IORESOURCE_IRQ;
900 cf_resources[num_resources].start = OCTEON_IRQ_BOOTDMA;
901 cf_resources[num_resources].end = OCTEON_IRQ_BOOTDMA;
902 num_resources++;
903 } else {
904 octeon_cf_data.dma_engine = -1;
905 }
906
907 pd = platform_device_alloc("pata_octeon_cf", -1);
908 if (!pd) {
909 ret = -ENOMEM;
910 goto out;
911 }
912 pd->dev.platform_data = &octeon_cf_data;
913
914 ret = platform_device_add_resources(pd, cf_resources, num_resources);
915 if (ret)
916 goto fail;
917
918 ret = platform_device_add(pd);
919 if (ret)
920 goto fail;
921
922 return ret;
923fail:
924 platform_device_put(pd);
925out:
926 return ret;
927}
928device_initcall(octeon_cf_device_init);
diff --git a/arch/mips/configs/ar7_defconfig b/arch/mips/configs/ar7_defconfig
index dad5b6769d74..35648302f7cc 100644
--- a/arch/mips/configs/ar7_defconfig
+++ b/arch/mips/configs/ar7_defconfig
@@ -125,7 +125,6 @@ CONFIG_CPU_HAS_PREFETCH=y
125CONFIG_MIPS_MT_DISABLED=y 125CONFIG_MIPS_MT_DISABLED=y
126# CONFIG_MIPS_MT_SMP is not set 126# CONFIG_MIPS_MT_SMP is not set
127# CONFIG_MIPS_MT_SMTC is not set 127# CONFIG_MIPS_MT_SMTC is not set
128CONFIG_CPU_HAS_LLSC=y
129CONFIG_CPU_HAS_SYNC=y 128CONFIG_CPU_HAS_SYNC=y
130CONFIG_GENERIC_HARDIRQS=y 129CONFIG_GENERIC_HARDIRQS=y
131CONFIG_GENERIC_IRQ_PROBE=y 130CONFIG_GENERIC_IRQ_PROBE=y
diff --git a/arch/mips/configs/bcm47xx_defconfig b/arch/mips/configs/bcm47xx_defconfig
index d8694332b344..94b7d57f906d 100644
--- a/arch/mips/configs/bcm47xx_defconfig
+++ b/arch/mips/configs/bcm47xx_defconfig
@@ -111,7 +111,6 @@ CONFIG_CPU_HAS_PREFETCH=y
111CONFIG_MIPS_MT_DISABLED=y 111CONFIG_MIPS_MT_DISABLED=y
112# CONFIG_MIPS_MT_SMP is not set 112# CONFIG_MIPS_MT_SMP is not set
113# CONFIG_MIPS_MT_SMTC is not set 113# CONFIG_MIPS_MT_SMTC is not set
114CONFIG_CPU_HAS_LLSC=y
115CONFIG_CPU_HAS_SYNC=y 114CONFIG_CPU_HAS_SYNC=y
116CONFIG_GENERIC_HARDIRQS=y 115CONFIG_GENERIC_HARDIRQS=y
117CONFIG_GENERIC_IRQ_PROBE=y 116CONFIG_GENERIC_IRQ_PROBE=y
diff --git a/arch/mips/configs/bcm63xx_defconfig b/arch/mips/configs/bcm63xx_defconfig
new file mode 100644
index 000000000000..ea00c18d1f7b
--- /dev/null
+++ b/arch/mips/configs/bcm63xx_defconfig
@@ -0,0 +1,972 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc6
4# Sun May 31 20:17:18 2009
5#
6CONFIG_MIPS=y
7
8#
9# Machine selection
10#
11# CONFIG_MACH_ALCHEMY is not set
12# CONFIG_BASLER_EXCITE is not set
13# CONFIG_BCM47XX is not set
14CONFIG_BCM63XX=y
15# CONFIG_MIPS_COBALT is not set
16# CONFIG_MACH_DECSTATION is not set
17# CONFIG_MACH_JAZZ is not set
18# CONFIG_LASAT is not set
19# CONFIG_LEMOTE_FULONG is not set
20# CONFIG_MIPS_MALTA is not set
21# CONFIG_MIPS_SIM is not set
22# CONFIG_NEC_MARKEINS is not set
23# CONFIG_MACH_VR41XX is not set
24# CONFIG_NXP_STB220 is not set
25# CONFIG_NXP_STB225 is not set
26# CONFIG_PNX8550_JBS is not set
27# CONFIG_PNX8550_STB810 is not set
28# CONFIG_PMC_MSP is not set
29# CONFIG_PMC_YOSEMITE is not set
30# CONFIG_SGI_IP22 is not set
31# CONFIG_SGI_IP27 is not set
32# CONFIG_SGI_IP28 is not set
33# CONFIG_SGI_IP32 is not set
34# CONFIG_SIBYTE_CRHINE is not set
35# CONFIG_SIBYTE_CARMEL is not set
36# CONFIG_SIBYTE_CRHONE is not set
37# CONFIG_SIBYTE_RHONE is not set
38# CONFIG_SIBYTE_SWARM is not set
39# CONFIG_SIBYTE_LITTLESUR is not set
40# CONFIG_SIBYTE_SENTOSA is not set
41# CONFIG_SIBYTE_BIGSUR is not set
42# CONFIG_SNI_RM is not set
43# CONFIG_MACH_TX39XX is not set
44# CONFIG_MACH_TX49XX is not set
45# CONFIG_MIKROTIK_RB532 is not set
46# CONFIG_WR_PPMC is not set
47# CONFIG_CAVIUM_OCTEON_SIMULATOR is not set
48# CONFIG_CAVIUM_OCTEON_REFERENCE_BOARD is not set
49
50#
51# CPU support
52#
53CONFIG_BCM63XX_CPU_6348=y
54CONFIG_BCM63XX_CPU_6358=y
55CONFIG_BOARD_BCM963XX=y
56CONFIG_RWSEM_GENERIC_SPINLOCK=y
57# CONFIG_ARCH_HAS_ILOG2_U32 is not set
58# CONFIG_ARCH_HAS_ILOG2_U64 is not set
59CONFIG_ARCH_SUPPORTS_OPROFILE=y
60CONFIG_GENERIC_FIND_NEXT_BIT=y
61CONFIG_GENERIC_HWEIGHT=y
62CONFIG_GENERIC_CALIBRATE_DELAY=y
63CONFIG_GENERIC_CLOCKEVENTS=y
64CONFIG_GENERIC_TIME=y
65CONFIG_GENERIC_CMOS_UPDATE=y
66CONFIG_SCHED_OMIT_FRAME_POINTER=y
67CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
68CONFIG_CEVT_R4K_LIB=y
69CONFIG_CEVT_R4K=y
70CONFIG_CSRC_R4K_LIB=y
71CONFIG_CSRC_R4K=y
72CONFIG_DMA_NONCOHERENT=y
73CONFIG_DMA_NEED_PCI_MAP_STATE=y
74CONFIG_EARLY_PRINTK=y
75CONFIG_SYS_HAS_EARLY_PRINTK=y
76# CONFIG_HOTPLUG_CPU is not set
77# CONFIG_NO_IOPORT is not set
78CONFIG_GENERIC_GPIO=y
79CONFIG_CPU_BIG_ENDIAN=y
80# CONFIG_CPU_LITTLE_ENDIAN is not set
81CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
82CONFIG_IRQ_CPU=y
83CONFIG_SWAP_IO_SPACE=y
84CONFIG_MIPS_L1_CACHE_SHIFT=5
85
86#
87# CPU selection
88#
89# CONFIG_CPU_LOONGSON2 is not set
90CONFIG_CPU_MIPS32_R1=y
91# CONFIG_CPU_MIPS32_R2 is not set
92# CONFIG_CPU_MIPS64_R1 is not set
93# CONFIG_CPU_MIPS64_R2 is not set
94# CONFIG_CPU_R3000 is not set
95# CONFIG_CPU_TX39XX is not set
96# CONFIG_CPU_VR41XX is not set
97# CONFIG_CPU_R4300 is not set
98# CONFIG_CPU_R4X00 is not set
99# CONFIG_CPU_TX49XX is not set
100# CONFIG_CPU_R5000 is not set
101# CONFIG_CPU_R5432 is not set
102# CONFIG_CPU_R5500 is not set
103# CONFIG_CPU_R6000 is not set
104# CONFIG_CPU_NEVADA is not set
105# CONFIG_CPU_R8000 is not set
106# CONFIG_CPU_R10000 is not set
107# CONFIG_CPU_RM7000 is not set
108# CONFIG_CPU_RM9000 is not set
109# CONFIG_CPU_SB1 is not set
110# CONFIG_CPU_CAVIUM_OCTEON is not set
111CONFIG_SYS_HAS_CPU_MIPS32_R1=y
112CONFIG_CPU_MIPS32=y
113CONFIG_CPU_MIPSR1=y
114CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
115CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
116CONFIG_HARDWARE_WATCHPOINTS=y
117
118#
119# Kernel type
120#
121CONFIG_32BIT=y
122# CONFIG_64BIT is not set
123CONFIG_PAGE_SIZE_4KB=y
124# CONFIG_PAGE_SIZE_8KB is not set
125# CONFIG_PAGE_SIZE_16KB is not set
126# CONFIG_PAGE_SIZE_32KB is not set
127# CONFIG_PAGE_SIZE_64KB is not set
128CONFIG_CPU_HAS_PREFETCH=y
129CONFIG_MIPS_MT_DISABLED=y
130# CONFIG_MIPS_MT_SMP is not set
131# CONFIG_MIPS_MT_SMTC is not set
132CONFIG_CPU_HAS_LLSC=y
133CONFIG_CPU_HAS_SYNC=y
134CONFIG_GENERIC_HARDIRQS=y
135CONFIG_GENERIC_IRQ_PROBE=y
136CONFIG_CPU_SUPPORTS_HIGHMEM=y
137CONFIG_ARCH_FLATMEM_ENABLE=y
138CONFIG_ARCH_POPULATES_NODE_MAP=y
139CONFIG_SELECT_MEMORY_MODEL=y
140CONFIG_FLATMEM_MANUAL=y
141# CONFIG_DISCONTIGMEM_MANUAL is not set
142# CONFIG_SPARSEMEM_MANUAL is not set
143CONFIG_FLATMEM=y
144CONFIG_FLAT_NODE_MEM_MAP=y
145CONFIG_PAGEFLAGS_EXTENDED=y
146CONFIG_SPLIT_PTLOCK_CPUS=4
147# CONFIG_PHYS_ADDR_T_64BIT is not set
148CONFIG_ZONE_DMA_FLAG=0
149CONFIG_VIRT_TO_BUS=y
150CONFIG_UNEVICTABLE_LRU=y
151CONFIG_HAVE_MLOCK=y
152CONFIG_HAVE_MLOCKED_PAGE_BIT=y
153CONFIG_TICK_ONESHOT=y
154CONFIG_NO_HZ=y
155# CONFIG_HIGH_RES_TIMERS is not set
156CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
157# CONFIG_HZ_48 is not set
158# CONFIG_HZ_100 is not set
159# CONFIG_HZ_128 is not set
160CONFIG_HZ_250=y
161# CONFIG_HZ_256 is not set
162# CONFIG_HZ_1000 is not set
163# CONFIG_HZ_1024 is not set
164CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
165CONFIG_HZ=250
166CONFIG_PREEMPT_NONE=y
167# CONFIG_PREEMPT_VOLUNTARY is not set
168# CONFIG_PREEMPT is not set
169# CONFIG_KEXEC is not set
170# CONFIG_SECCOMP is not set
171CONFIG_LOCKDEP_SUPPORT=y
172CONFIG_STACKTRACE_SUPPORT=y
173CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
174
175#
176# General setup
177#
178CONFIG_EXPERIMENTAL=y
179CONFIG_BROKEN_ON_SMP=y
180CONFIG_INIT_ENV_ARG_LIMIT=32
181CONFIG_LOCALVERSION=""
182# CONFIG_LOCALVERSION_AUTO is not set
183# CONFIG_SWAP is not set
184# CONFIG_SYSVIPC is not set
185# CONFIG_POSIX_MQUEUE is not set
186# CONFIG_BSD_PROCESS_ACCT is not set
187# CONFIG_TASKSTATS is not set
188# CONFIG_AUDIT is not set
189
190#
191# RCU Subsystem
192#
193CONFIG_CLASSIC_RCU=y
194# CONFIG_TREE_RCU is not set
195# CONFIG_PREEMPT_RCU is not set
196# CONFIG_TREE_RCU_TRACE is not set
197# CONFIG_PREEMPT_RCU_TRACE is not set
198# CONFIG_IKCONFIG is not set
199CONFIG_LOG_BUF_SHIFT=17
200# CONFIG_GROUP_SCHED is not set
201# CONFIG_CGROUPS is not set
202CONFIG_SYSFS_DEPRECATED=y
203CONFIG_SYSFS_DEPRECATED_V2=y
204# CONFIG_RELAY is not set
205# CONFIG_NAMESPACES is not set
206# CONFIG_BLK_DEV_INITRD is not set
207CONFIG_CC_OPTIMIZE_FOR_SIZE=y
208CONFIG_SYSCTL=y
209CONFIG_EMBEDDED=y
210CONFIG_SYSCTL_SYSCALL=y
211CONFIG_KALLSYMS=y
212# CONFIG_KALLSYMS_EXTRA_PASS is not set
213# CONFIG_STRIP_ASM_SYMS is not set
214CONFIG_HOTPLUG=y
215CONFIG_PRINTK=y
216CONFIG_BUG=y
217CONFIG_ELF_CORE=y
218# CONFIG_PCSPKR_PLATFORM is not set
219CONFIG_BASE_FULL=y
220# CONFIG_FUTEX is not set
221# CONFIG_EPOLL is not set
222# CONFIG_SIGNALFD is not set
223# CONFIG_TIMERFD is not set
224# CONFIG_EVENTFD is not set
225# CONFIG_SHMEM is not set
226# CONFIG_AIO is not set
227# CONFIG_VM_EVENT_COUNTERS is not set
228CONFIG_PCI_QUIRKS=y
229# CONFIG_SLUB_DEBUG is not set
230CONFIG_COMPAT_BRK=y
231# CONFIG_SLAB is not set
232CONFIG_SLUB=y
233# CONFIG_SLOB is not set
234# CONFIG_PROFILING is not set
235# CONFIG_MARKERS is not set
236CONFIG_HAVE_OPROFILE=y
237# CONFIG_SLOW_WORK is not set
238# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
239CONFIG_BASE_SMALL=0
240# CONFIG_MODULES is not set
241CONFIG_BLOCK=y
242# CONFIG_LBD is not set
243# CONFIG_BLK_DEV_BSG is not set
244# CONFIG_BLK_DEV_INTEGRITY is not set
245
246#
247# IO Schedulers
248#
249CONFIG_IOSCHED_NOOP=y
250# CONFIG_IOSCHED_AS is not set
251# CONFIG_IOSCHED_DEADLINE is not set
252# CONFIG_IOSCHED_CFQ is not set
253# CONFIG_DEFAULT_AS is not set
254# CONFIG_DEFAULT_DEADLINE is not set
255# CONFIG_DEFAULT_CFQ is not set
256CONFIG_DEFAULT_NOOP=y
257CONFIG_DEFAULT_IOSCHED="noop"
258# CONFIG_FREEZER is not set
259
260#
261# Bus options (PCI, PCMCIA, EISA, ISA, TC)
262#
263CONFIG_HW_HAS_PCI=y
264CONFIG_PCI=y
265CONFIG_PCI_DOMAINS=y
266# CONFIG_ARCH_SUPPORTS_MSI is not set
267# CONFIG_PCI_LEGACY is not set
268# CONFIG_PCI_STUB is not set
269# CONFIG_PCI_IOV is not set
270CONFIG_MMU=y
271CONFIG_PCCARD=y
272# CONFIG_PCMCIA_DEBUG is not set
273CONFIG_PCMCIA=y
274CONFIG_PCMCIA_LOAD_CIS=y
275CONFIG_PCMCIA_IOCTL=y
276CONFIG_CARDBUS=y
277
278#
279# PC-card bridges
280#
281# CONFIG_YENTA is not set
282# CONFIG_PD6729 is not set
283# CONFIG_I82092 is not set
284CONFIG_PCMCIA_BCM63XX=y
285# CONFIG_HOTPLUG_PCI is not set
286
287#
288# Executable file formats
289#
290CONFIG_BINFMT_ELF=y
291# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
292# CONFIG_HAVE_AOUT is not set
293# CONFIG_BINFMT_MISC is not set
294CONFIG_TRAD_SIGNALS=y
295
296#
297# Power management options
298#
299CONFIG_ARCH_SUSPEND_POSSIBLE=y
300# CONFIG_PM is not set
301CONFIG_NET=y
302
303#
304# Networking options
305#
306# CONFIG_PACKET is not set
307CONFIG_UNIX=y
308# CONFIG_NET_KEY is not set
309CONFIG_INET=y
310# CONFIG_IP_MULTICAST is not set
311# CONFIG_IP_ADVANCED_ROUTER is not set
312CONFIG_IP_FIB_HASH=y
313# CONFIG_IP_PNP is not set
314# CONFIG_NET_IPIP is not set
315# CONFIG_NET_IPGRE is not set
316# CONFIG_ARPD is not set
317# CONFIG_SYN_COOKIES is not set
318# CONFIG_INET_AH is not set
319# CONFIG_INET_ESP is not set
320# CONFIG_INET_IPCOMP is not set
321# CONFIG_INET_XFRM_TUNNEL is not set
322# CONFIG_INET_TUNNEL is not set
323# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
324# CONFIG_INET_XFRM_MODE_TUNNEL is not set
325# CONFIG_INET_XFRM_MODE_BEET is not set
326# CONFIG_INET_LRO is not set
327# CONFIG_INET_DIAG is not set
328# CONFIG_TCP_CONG_ADVANCED is not set
329CONFIG_TCP_CONG_CUBIC=y
330CONFIG_DEFAULT_TCP_CONG="cubic"
331# CONFIG_TCP_MD5SIG is not set
332# CONFIG_IPV6 is not set
333# CONFIG_NETWORK_SECMARK is not set
334# CONFIG_NETFILTER is not set
335# CONFIG_IP_DCCP is not set
336# CONFIG_IP_SCTP is not set
337# CONFIG_TIPC is not set
338# CONFIG_ATM is not set
339# CONFIG_BRIDGE is not set
340# CONFIG_NET_DSA is not set
341# CONFIG_VLAN_8021Q is not set
342# CONFIG_DECNET is not set
343# CONFIG_LLC2 is not set
344# CONFIG_IPX is not set
345# CONFIG_ATALK is not set
346# CONFIG_X25 is not set
347# CONFIG_LAPB is not set
348# CONFIG_ECONET is not set
349# CONFIG_WAN_ROUTER is not set
350# CONFIG_PHONET is not set
351# CONFIG_NET_SCHED is not set
352# CONFIG_DCB is not set
353
354#
355# Network testing
356#
357# CONFIG_NET_PKTGEN is not set
358# CONFIG_HAMRADIO is not set
359# CONFIG_CAN is not set
360# CONFIG_IRDA is not set
361# CONFIG_BT is not set
362# CONFIG_AF_RXRPC is not set
363# CONFIG_WIRELESS is not set
364# CONFIG_WIMAX is not set
365# CONFIG_RFKILL is not set
366# CONFIG_NET_9P is not set
367
368#
369# Device Drivers
370#
371
372#
373# Generic Driver Options
374#
375CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
376# CONFIG_STANDALONE is not set
377# CONFIG_PREVENT_FIRMWARE_BUILD is not set
378CONFIG_FW_LOADER=y
379CONFIG_FIRMWARE_IN_KERNEL=y
380CONFIG_EXTRA_FIRMWARE=""
381# CONFIG_SYS_HYPERVISOR is not set
382# CONFIG_CONNECTOR is not set
383CONFIG_MTD=y
384# CONFIG_MTD_DEBUG is not set
385# CONFIG_MTD_CONCAT is not set
386CONFIG_MTD_PARTITIONS=y
387# CONFIG_MTD_REDBOOT_PARTS is not set
388# CONFIG_MTD_CMDLINE_PARTS is not set
389# CONFIG_MTD_AR7_PARTS is not set
390
391#
392# User Modules And Translation Layers
393#
394# CONFIG_MTD_CHAR is not set
395# CONFIG_MTD_BLKDEVS is not set
396# CONFIG_MTD_BLOCK is not set
397# CONFIG_MTD_BLOCK_RO is not set
398# CONFIG_FTL is not set
399# CONFIG_NFTL is not set
400# CONFIG_INFTL is not set
401# CONFIG_RFD_FTL is not set
402# CONFIG_SSFDC is not set
403# CONFIG_MTD_OOPS is not set
404
405#
406# RAM/ROM/Flash chip drivers
407#
408CONFIG_MTD_CFI=y
409# CONFIG_MTD_JEDECPROBE is not set
410CONFIG_MTD_GEN_PROBE=y
411# CONFIG_MTD_CFI_ADV_OPTIONS is not set
412CONFIG_MTD_MAP_BANK_WIDTH_1=y
413CONFIG_MTD_MAP_BANK_WIDTH_2=y
414CONFIG_MTD_MAP_BANK_WIDTH_4=y
415# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
416# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
417# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
418CONFIG_MTD_CFI_I1=y
419CONFIG_MTD_CFI_I2=y
420# CONFIG_MTD_CFI_I4 is not set
421# CONFIG_MTD_CFI_I8 is not set
422CONFIG_MTD_CFI_INTELEXT=y
423CONFIG_MTD_CFI_AMDSTD=y
424# CONFIG_MTD_CFI_STAA is not set
425CONFIG_MTD_CFI_UTIL=y
426# CONFIG_MTD_RAM is not set
427# CONFIG_MTD_ROM is not set
428# CONFIG_MTD_ABSENT is not set
429
430#
431# Mapping drivers for chip access
432#
433# CONFIG_MTD_COMPLEX_MAPPINGS is not set
434CONFIG_MTD_PHYSMAP=y
435# CONFIG_MTD_PHYSMAP_COMPAT is not set
436# CONFIG_MTD_INTEL_VR_NOR is not set
437# CONFIG_MTD_PLATRAM is not set
438
439#
440# Self-contained MTD device drivers
441#
442# CONFIG_MTD_PMC551 is not set
443# CONFIG_MTD_SLRAM is not set
444# CONFIG_MTD_PHRAM is not set
445# CONFIG_MTD_MTDRAM is not set
446# CONFIG_MTD_BLOCK2MTD is not set
447
448#
449# Disk-On-Chip Device Drivers
450#
451# CONFIG_MTD_DOC2000 is not set
452# CONFIG_MTD_DOC2001 is not set
453# CONFIG_MTD_DOC2001PLUS is not set
454# CONFIG_MTD_NAND is not set
455# CONFIG_MTD_ONENAND is not set
456
457#
458# LPDDR flash memory drivers
459#
460# CONFIG_MTD_LPDDR is not set
461
462#
463# UBI - Unsorted block images
464#
465# CONFIG_MTD_UBI is not set
466# CONFIG_PARPORT is not set
467# CONFIG_BLK_DEV is not set
468# CONFIG_MISC_DEVICES is not set
469CONFIG_HAVE_IDE=y
470# CONFIG_IDE is not set
471
472#
473# SCSI device support
474#
475# CONFIG_RAID_ATTRS is not set
476# CONFIG_SCSI is not set
477# CONFIG_SCSI_DMA is not set
478# CONFIG_SCSI_NETLINK is not set
479# CONFIG_ATA is not set
480# CONFIG_MD is not set
481# CONFIG_FUSION is not set
482
483#
484# IEEE 1394 (FireWire) support
485#
486
487#
488# Enable only one of the two stacks, unless you know what you are doing
489#
490# CONFIG_FIREWIRE is not set
491# CONFIG_IEEE1394 is not set
492# CONFIG_I2O is not set
493CONFIG_NETDEVICES=y
494CONFIG_COMPAT_NET_DEV_OPS=y
495# CONFIG_DUMMY is not set
496# CONFIG_BONDING is not set
497# CONFIG_MACVLAN is not set
498# CONFIG_EQUALIZER is not set
499# CONFIG_TUN is not set
500# CONFIG_VETH is not set
501# CONFIG_ARCNET is not set
502CONFIG_PHYLIB=y
503
504#
505# MII PHY device drivers
506#
507# CONFIG_MARVELL_PHY is not set
508# CONFIG_DAVICOM_PHY is not set
509# CONFIG_QSEMI_PHY is not set
510# CONFIG_LXT_PHY is not set
511# CONFIG_CICADA_PHY is not set
512# CONFIG_VITESSE_PHY is not set
513# CONFIG_SMSC_PHY is not set
514# CONFIG_BROADCOM_PHY is not set
515CONFIG_BCM63XX_PHY=y
516# CONFIG_ICPLUS_PHY is not set
517# CONFIG_REALTEK_PHY is not set
518# CONFIG_NATIONAL_PHY is not set
519# CONFIG_STE10XP is not set
520# CONFIG_LSI_ET1011C_PHY is not set
521# CONFIG_FIXED_PHY is not set
522# CONFIG_MDIO_BITBANG is not set
523CONFIG_NET_ETHERNET=y
524CONFIG_MII=y
525# CONFIG_AX88796 is not set
526# CONFIG_HAPPYMEAL is not set
527# CONFIG_SUNGEM is not set
528# CONFIG_CASSINI is not set
529# CONFIG_NET_VENDOR_3COM is not set
530# CONFIG_SMC91X is not set
531# CONFIG_DM9000 is not set
532# CONFIG_ETHOC is not set
533# CONFIG_DNET is not set
534# CONFIG_NET_TULIP is not set
535# CONFIG_HP100 is not set
536# CONFIG_IBM_NEW_EMAC_ZMII is not set
537# CONFIG_IBM_NEW_EMAC_RGMII is not set
538# CONFIG_IBM_NEW_EMAC_TAH is not set
539# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
540# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
541# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
542# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
543# CONFIG_NET_PCI is not set
544# CONFIG_B44 is not set
545# CONFIG_ATL2 is not set
546CONFIG_BCM63XX_ENET=y
547# CONFIG_NETDEV_1000 is not set
548# CONFIG_NETDEV_10000 is not set
549# CONFIG_TR is not set
550
551#
552# Wireless LAN
553#
554# CONFIG_WLAN_PRE80211 is not set
555# CONFIG_WLAN_80211 is not set
556
557#
558# Enable WiMAX (Networking options) to see the WiMAX drivers
559#
560
561#
562# USB Network Adapters
563#
564# CONFIG_USB_CATC is not set
565# CONFIG_USB_KAWETH is not set
566# CONFIG_USB_PEGASUS is not set
567# CONFIG_USB_RTL8150 is not set
568# CONFIG_USB_USBNET is not set
569# CONFIG_NET_PCMCIA is not set
570# CONFIG_WAN is not set
571# CONFIG_FDDI is not set
572# CONFIG_HIPPI is not set
573# CONFIG_PPP is not set
574# CONFIG_SLIP is not set
575# CONFIG_NETCONSOLE is not set
576# CONFIG_NETPOLL is not set
577# CONFIG_NET_POLL_CONTROLLER is not set
578# CONFIG_ISDN is not set
579# CONFIG_PHONE is not set
580
581#
582# Input device support
583#
584# CONFIG_INPUT is not set
585
586#
587# Hardware I/O ports
588#
589# CONFIG_SERIO is not set
590# CONFIG_GAMEPORT is not set
591
592#
593# Character devices
594#
595# CONFIG_VT is not set
596# CONFIG_DEVKMEM is not set
597# CONFIG_SERIAL_NONSTANDARD is not set
598# CONFIG_NOZOMI is not set
599
600#
601# Serial drivers
602#
603# CONFIG_SERIAL_8250 is not set
604
605#
606# Non-8250 serial port support
607#
608CONFIG_SERIAL_CORE=y
609CONFIG_SERIAL_CORE_CONSOLE=y
610# CONFIG_SERIAL_JSM is not set
611CONFIG_SERIAL_BCM63XX=y
612CONFIG_SERIAL_BCM63XX_CONSOLE=y
613# CONFIG_UNIX98_PTYS is not set
614CONFIG_LEGACY_PTYS=y
615CONFIG_LEGACY_PTY_COUNT=256
616# CONFIG_IPMI_HANDLER is not set
617# CONFIG_HW_RANDOM is not set
618# CONFIG_R3964 is not set
619# CONFIG_APPLICOM is not set
620
621#
622# PCMCIA character devices
623#
624# CONFIG_SYNCLINK_CS is not set
625# CONFIG_CARDMAN_4000 is not set
626# CONFIG_CARDMAN_4040 is not set
627# CONFIG_IPWIRELESS is not set
628# CONFIG_RAW_DRIVER is not set
629# CONFIG_TCG_TPM is not set
630CONFIG_DEVPORT=y
631# CONFIG_I2C is not set
632# CONFIG_SPI is not set
633CONFIG_ARCH_REQUIRE_GPIOLIB=y
634CONFIG_GPIOLIB=y
635# CONFIG_GPIO_SYSFS is not set
636
637#
638# Memory mapped GPIO expanders:
639#
640
641#
642# I2C GPIO expanders:
643#
644
645#
646# PCI GPIO expanders:
647#
648# CONFIG_GPIO_BT8XX is not set
649
650#
651# SPI GPIO expanders:
652#
653# CONFIG_W1 is not set
654# CONFIG_POWER_SUPPLY is not set
655# CONFIG_HWMON is not set
656# CONFIG_THERMAL is not set
657# CONFIG_THERMAL_HWMON is not set
658# CONFIG_WATCHDOG is not set
659CONFIG_SSB_POSSIBLE=y
660
661#
662# Sonics Silicon Backplane
663#
664CONFIG_SSB=y
665CONFIG_SSB_SPROM=y
666CONFIG_SSB_PCIHOST_POSSIBLE=y
667CONFIG_SSB_PCIHOST=y
668# CONFIG_SSB_B43_PCI_BRIDGE is not set
669CONFIG_SSB_PCMCIAHOST_POSSIBLE=y
670# CONFIG_SSB_PCMCIAHOST is not set
671# CONFIG_SSB_SILENT is not set
672# CONFIG_SSB_DEBUG is not set
673CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y
674# CONFIG_SSB_DRIVER_PCICORE is not set
675# CONFIG_SSB_DRIVER_MIPS is not set
676
677#
678# Multifunction device drivers
679#
680# CONFIG_MFD_CORE is not set
681# CONFIG_MFD_SM501 is not set
682# CONFIG_HTC_PASIC3 is not set
683# CONFIG_MFD_TMIO is not set
684# CONFIG_REGULATOR is not set
685
686#
687# Multimedia devices
688#
689
690#
691# Multimedia core support
692#
693# CONFIG_VIDEO_DEV is not set
694# CONFIG_DVB_CORE is not set
695# CONFIG_VIDEO_MEDIA is not set
696
697#
698# Multimedia drivers
699#
700# CONFIG_DAB is not set
701
702#
703# Graphics support
704#
705# CONFIG_DRM is not set
706# CONFIG_VGASTATE is not set
707# CONFIG_VIDEO_OUTPUT_CONTROL is not set
708# CONFIG_FB is not set
709# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
710
711#
712# Display device support
713#
714CONFIG_DISPLAY_SUPPORT=y
715
716#
717# Display hardware drivers
718#
719# CONFIG_SOUND is not set
720CONFIG_USB_SUPPORT=y
721CONFIG_USB_ARCH_HAS_HCD=y
722CONFIG_USB_ARCH_HAS_OHCI=y
723CONFIG_USB_ARCH_HAS_EHCI=y
724CONFIG_USB=y
725# CONFIG_USB_DEBUG is not set
726# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
727
728#
729# Miscellaneous USB options
730#
731# CONFIG_USB_DEVICEFS is not set
732# CONFIG_USB_DEVICE_CLASS is not set
733# CONFIG_USB_DYNAMIC_MINORS is not set
734# CONFIG_USB_OTG is not set
735# CONFIG_USB_OTG_WHITELIST is not set
736# CONFIG_USB_OTG_BLACKLIST_HUB is not set
737# CONFIG_USB_MON is not set
738# CONFIG_USB_WUSB is not set
739# CONFIG_USB_WUSB_CBAF is not set
740
741#
742# USB Host Controller Drivers
743#
744# CONFIG_USB_C67X00_HCD is not set
745CONFIG_USB_EHCI_HCD=y
746# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
747# CONFIG_USB_EHCI_TT_NEWSCHED is not set
748CONFIG_USB_EHCI_BIG_ENDIAN_MMIO=y
749# CONFIG_USB_OXU210HP_HCD is not set
750# CONFIG_USB_ISP116X_HCD is not set
751# CONFIG_USB_ISP1760_HCD is not set
752CONFIG_USB_OHCI_HCD=y
753# CONFIG_USB_OHCI_HCD_SSB is not set
754CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
755CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
756CONFIG_USB_OHCI_LITTLE_ENDIAN=y
757# CONFIG_USB_UHCI_HCD is not set
758# CONFIG_USB_SL811_HCD is not set
759# CONFIG_USB_R8A66597_HCD is not set
760# CONFIG_USB_WHCI_HCD is not set
761# CONFIG_USB_HWA_HCD is not set
762
763#
764# USB Device Class drivers
765#
766# CONFIG_USB_ACM is not set
767# CONFIG_USB_PRINTER is not set
768# CONFIG_USB_WDM is not set
769# CONFIG_USB_TMC is not set
770
771#
772# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
773#
774
775#
776# also be needed; see USB_STORAGE Help for more info
777#
778# CONFIG_USB_LIBUSUAL is not set
779
780#
781# USB Imaging devices
782#
783# CONFIG_USB_MDC800 is not set
784
785#
786# USB port drivers
787#
788# CONFIG_USB_SERIAL is not set
789
790#
791# USB Miscellaneous drivers
792#
793# CONFIG_USB_EMI62 is not set
794# CONFIG_USB_EMI26 is not set
795# CONFIG_USB_ADUTUX is not set
796# CONFIG_USB_SEVSEG is not set
797# CONFIG_USB_RIO500 is not set
798# CONFIG_USB_LEGOTOWER is not set
799# CONFIG_USB_LCD is not set
800# CONFIG_USB_BERRY_CHARGE is not set
801# CONFIG_USB_LED is not set
802# CONFIG_USB_CYPRESS_CY7C63 is not set
803# CONFIG_USB_CYTHERM is not set
804# CONFIG_USB_IDMOUSE is not set
805# CONFIG_USB_FTDI_ELAN is not set
806# CONFIG_USB_APPLEDISPLAY is not set
807# CONFIG_USB_SISUSBVGA is not set
808# CONFIG_USB_LD is not set
809# CONFIG_USB_TRANCEVIBRATOR is not set
810# CONFIG_USB_IOWARRIOR is not set
811# CONFIG_USB_ISIGHTFW is not set
812# CONFIG_USB_VST is not set
813# CONFIG_USB_GADGET is not set
814
815#
816# OTG and related infrastructure
817#
818# CONFIG_USB_GPIO_VBUS is not set
819# CONFIG_NOP_USB_XCEIV is not set
820# CONFIG_UWB is not set
821# CONFIG_MMC is not set
822# CONFIG_MEMSTICK is not set
823# CONFIG_NEW_LEDS is not set
824# CONFIG_ACCESSIBILITY is not set
825# CONFIG_INFINIBAND is not set
826CONFIG_RTC_LIB=y
827# CONFIG_RTC_CLASS is not set
828# CONFIG_DMADEVICES is not set
829# CONFIG_AUXDISPLAY is not set
830# CONFIG_UIO is not set
831# CONFIG_STAGING is not set
832
833#
834# File systems
835#
836# CONFIG_EXT2_FS is not set
837# CONFIG_EXT3_FS is not set
838# CONFIG_EXT4_FS is not set
839# CONFIG_REISERFS_FS is not set
840# CONFIG_JFS_FS is not set
841# CONFIG_FS_POSIX_ACL is not set
842# CONFIG_FILE_LOCKING is not set
843# CONFIG_XFS_FS is not set
844# CONFIG_OCFS2_FS is not set
845# CONFIG_BTRFS_FS is not set
846# CONFIG_DNOTIFY is not set
847# CONFIG_INOTIFY is not set
848# CONFIG_QUOTA is not set
849# CONFIG_AUTOFS_FS is not set
850# CONFIG_AUTOFS4_FS is not set
851# CONFIG_FUSE_FS is not set
852
853#
854# Caches
855#
856# CONFIG_FSCACHE is not set
857
858#
859# CD-ROM/DVD Filesystems
860#
861# CONFIG_ISO9660_FS is not set
862# CONFIG_UDF_FS is not set
863
864#
865# DOS/FAT/NT Filesystems
866#
867# CONFIG_MSDOS_FS is not set
868# CONFIG_VFAT_FS is not set
869# CONFIG_NTFS_FS is not set
870
871#
872# Pseudo filesystems
873#
874CONFIG_PROC_FS=y
875CONFIG_PROC_KCORE=y
876CONFIG_PROC_SYSCTL=y
877CONFIG_PROC_PAGE_MONITOR=y
878CONFIG_SYSFS=y
879CONFIG_TMPFS=y
880# CONFIG_TMPFS_POSIX_ACL is not set
881# CONFIG_HUGETLB_PAGE is not set
882# CONFIG_CONFIGFS_FS is not set
883CONFIG_MISC_FILESYSTEMS=y
884# CONFIG_ADFS_FS is not set
885# CONFIG_AFFS_FS is not set
886# CONFIG_HFS_FS is not set
887# CONFIG_HFSPLUS_FS is not set
888# CONFIG_BEFS_FS is not set
889# CONFIG_BFS_FS is not set
890# CONFIG_EFS_FS is not set
891# CONFIG_JFFS2_FS is not set
892# CONFIG_CRAMFS is not set
893# CONFIG_SQUASHFS is not set
894# CONFIG_VXFS_FS is not set
895# CONFIG_MINIX_FS is not set
896# CONFIG_OMFS_FS is not set
897# CONFIG_HPFS_FS is not set
898# CONFIG_QNX4FS_FS is not set
899# CONFIG_ROMFS_FS is not set
900# CONFIG_SYSV_FS is not set
901# CONFIG_UFS_FS is not set
902# CONFIG_NILFS2_FS is not set
903# CONFIG_NETWORK_FILESYSTEMS is not set
904
905#
906# Partition Types
907#
908# CONFIG_PARTITION_ADVANCED is not set
909CONFIG_MSDOS_PARTITION=y
910# CONFIG_NLS is not set
911# CONFIG_DLM is not set
912
913#
914# Kernel hacking
915#
916CONFIG_TRACE_IRQFLAGS_SUPPORT=y
917# CONFIG_PRINTK_TIME is not set
918CONFIG_ENABLE_WARN_DEPRECATED=y
919CONFIG_ENABLE_MUST_CHECK=y
920CONFIG_FRAME_WARN=1024
921CONFIG_MAGIC_SYSRQ=y
922# CONFIG_UNUSED_SYMBOLS is not set
923# CONFIG_DEBUG_FS is not set
924# CONFIG_HEADERS_CHECK is not set
925# CONFIG_DEBUG_KERNEL is not set
926# CONFIG_DEBUG_MEMORY_INIT is not set
927# CONFIG_RCU_CPU_STALL_DETECTOR is not set
928CONFIG_SYSCTL_SYSCALL_CHECK=y
929CONFIG_TRACING_SUPPORT=y
930
931#
932# Tracers
933#
934# CONFIG_IRQSOFF_TRACER is not set
935# CONFIG_SCHED_TRACER is not set
936# CONFIG_CONTEXT_SWITCH_TRACER is not set
937# CONFIG_EVENT_TRACER is not set
938# CONFIG_BOOT_TRACER is not set
939# CONFIG_TRACE_BRANCH_PROFILING is not set
940# CONFIG_KMEMTRACE is not set
941# CONFIG_WORKQUEUE_TRACER is not set
942# CONFIG_BLK_DEV_IO_TRACE is not set
943# CONFIG_SAMPLES is not set
944CONFIG_HAVE_ARCH_KGDB=y
945CONFIG_CMDLINE="console=ttyS0,115200"
946
947#
948# Security options
949#
950# CONFIG_KEYS is not set
951# CONFIG_SECURITY is not set
952# CONFIG_SECURITYFS is not set
953# CONFIG_SECURITY_FILE_CAPABILITIES is not set
954# CONFIG_CRYPTO is not set
955# CONFIG_BINARY_PRINTF is not set
956
957#
958# Library routines
959#
960CONFIG_BITREVERSE=y
961CONFIG_GENERIC_FIND_LAST_BIT=y
962# CONFIG_CRC_CCITT is not set
963# CONFIG_CRC16 is not set
964# CONFIG_CRC_T10DIF is not set
965# CONFIG_CRC_ITU_T is not set
966CONFIG_CRC32=y
967# CONFIG_CRC7 is not set
968# CONFIG_LIBCRC32C is not set
969CONFIG_HAS_IOMEM=y
970CONFIG_HAS_IOPORT=y
971CONFIG_HAS_DMA=y
972CONFIG_NLATTR=y
diff --git a/arch/mips/configs/bigsur_defconfig b/arch/mips/configs/bigsur_defconfig
index d6d35b2e5fe8..13d9eb4736c0 100644
--- a/arch/mips/configs/bigsur_defconfig
+++ b/arch/mips/configs/bigsur_defconfig
@@ -129,7 +129,6 @@ CONFIG_PAGE_SIZE_4KB=y
129CONFIG_MIPS_MT_DISABLED=y 129CONFIG_MIPS_MT_DISABLED=y
130# CONFIG_MIPS_MT_SMP is not set 130# CONFIG_MIPS_MT_SMP is not set
131# CONFIG_MIPS_MT_SMTC is not set 131# CONFIG_MIPS_MT_SMTC is not set
132CONFIG_CPU_HAS_LLSC=y
133CONFIG_CPU_HAS_SYNC=y 132CONFIG_CPU_HAS_SYNC=y
134CONFIG_GENERIC_HARDIRQS=y 133CONFIG_GENERIC_HARDIRQS=y
135CONFIG_GENERIC_IRQ_PROBE=y 134CONFIG_GENERIC_IRQ_PROBE=y
diff --git a/arch/mips/configs/cobalt_defconfig b/arch/mips/configs/cobalt_defconfig
index eb44b72254af..6c8cca8589ba 100644
--- a/arch/mips/configs/cobalt_defconfig
+++ b/arch/mips/configs/cobalt_defconfig
@@ -112,7 +112,6 @@ CONFIG_PAGE_SIZE_4KB=y
112CONFIG_MIPS_MT_DISABLED=y 112CONFIG_MIPS_MT_DISABLED=y
113# CONFIG_MIPS_MT_SMP is not set 113# CONFIG_MIPS_MT_SMP is not set
114# CONFIG_MIPS_MT_SMTC is not set 114# CONFIG_MIPS_MT_SMTC is not set
115CONFIG_CPU_HAS_LLSC=y
116CONFIG_CPU_HAS_SYNC=y 115CONFIG_CPU_HAS_SYNC=y
117CONFIG_GENERIC_HARDIRQS=y 116CONFIG_GENERIC_HARDIRQS=y
118CONFIG_GENERIC_IRQ_PROBE=y 117CONFIG_GENERIC_IRQ_PROBE=y
diff --git a/arch/mips/configs/db1000_defconfig b/arch/mips/configs/db1000_defconfig
index a279165e3a7d..dbdf3bb1a34a 100644
--- a/arch/mips/configs/db1000_defconfig
+++ b/arch/mips/configs/db1000_defconfig
@@ -114,7 +114,6 @@ CONFIG_MIPS_MT_DISABLED=y
114# CONFIG_MIPS_MT_SMTC is not set 114# CONFIG_MIPS_MT_SMTC is not set
115# CONFIG_MIPS_VPE_LOADER is not set 115# CONFIG_MIPS_VPE_LOADER is not set
116CONFIG_64BIT_PHYS_ADDR=y 116CONFIG_64BIT_PHYS_ADDR=y
117CONFIG_CPU_HAS_LLSC=y
118CONFIG_CPU_HAS_SYNC=y 117CONFIG_CPU_HAS_SYNC=y
119CONFIG_GENERIC_HARDIRQS=y 118CONFIG_GENERIC_HARDIRQS=y
120CONFIG_GENERIC_IRQ_PROBE=y 119CONFIG_GENERIC_IRQ_PROBE=y
diff --git a/arch/mips/configs/db1100_defconfig b/arch/mips/configs/db1100_defconfig
index 8944d15caf13..fa6814475898 100644
--- a/arch/mips/configs/db1100_defconfig
+++ b/arch/mips/configs/db1100_defconfig
@@ -114,7 +114,6 @@ CONFIG_MIPS_MT_DISABLED=y
114# CONFIG_MIPS_MT_SMTC is not set 114# CONFIG_MIPS_MT_SMTC is not set
115# CONFIG_MIPS_VPE_LOADER is not set 115# CONFIG_MIPS_VPE_LOADER is not set
116CONFIG_64BIT_PHYS_ADDR=y 116CONFIG_64BIT_PHYS_ADDR=y
117CONFIG_CPU_HAS_LLSC=y
118CONFIG_CPU_HAS_SYNC=y 117CONFIG_CPU_HAS_SYNC=y
119CONFIG_GENERIC_HARDIRQS=y 118CONFIG_GENERIC_HARDIRQS=y
120CONFIG_GENERIC_IRQ_PROBE=y 119CONFIG_GENERIC_IRQ_PROBE=y
diff --git a/arch/mips/configs/db1200_defconfig b/arch/mips/configs/db1200_defconfig
index ab17973107fd..d73f1de43b5d 100644
--- a/arch/mips/configs/db1200_defconfig
+++ b/arch/mips/configs/db1200_defconfig
@@ -114,7 +114,6 @@ CONFIG_MIPS_MT_DISABLED=y
114# CONFIG_MIPS_MT_SMTC is not set 114# CONFIG_MIPS_MT_SMTC is not set
115# CONFIG_MIPS_VPE_LOADER is not set 115# CONFIG_MIPS_VPE_LOADER is not set
116CONFIG_64BIT_PHYS_ADDR=y 116CONFIG_64BIT_PHYS_ADDR=y
117CONFIG_CPU_HAS_LLSC=y
118CONFIG_CPU_HAS_SYNC=y 117CONFIG_CPU_HAS_SYNC=y
119CONFIG_GENERIC_HARDIRQS=y 118CONFIG_GENERIC_HARDIRQS=y
120CONFIG_GENERIC_IRQ_PROBE=y 119CONFIG_GENERIC_IRQ_PROBE=y
diff --git a/arch/mips/configs/db1500_defconfig b/arch/mips/configs/db1500_defconfig
index b65803f19352..ec3e028a5b2e 100644
--- a/arch/mips/configs/db1500_defconfig
+++ b/arch/mips/configs/db1500_defconfig
@@ -116,7 +116,6 @@ CONFIG_MIPS_MT_DISABLED=y
116# CONFIG_MIPS_MT_SMTC is not set 116# CONFIG_MIPS_MT_SMTC is not set
117# CONFIG_MIPS_VPE_LOADER is not set 117# CONFIG_MIPS_VPE_LOADER is not set
118CONFIG_64BIT_PHYS_ADDR=y 118CONFIG_64BIT_PHYS_ADDR=y
119CONFIG_CPU_HAS_LLSC=y
120CONFIG_CPU_HAS_SYNC=y 119CONFIG_CPU_HAS_SYNC=y
121CONFIG_GENERIC_HARDIRQS=y 120CONFIG_GENERIC_HARDIRQS=y
122CONFIG_GENERIC_IRQ_PROBE=y 121CONFIG_GENERIC_IRQ_PROBE=y
diff --git a/arch/mips/configs/db1550_defconfig b/arch/mips/configs/db1550_defconfig
index a190ac07740b..7631dae51be9 100644
--- a/arch/mips/configs/db1550_defconfig
+++ b/arch/mips/configs/db1550_defconfig
@@ -115,7 +115,6 @@ CONFIG_MIPS_MT_DISABLED=y
115# CONFIG_MIPS_MT_SMTC is not set 115# CONFIG_MIPS_MT_SMTC is not set
116# CONFIG_MIPS_VPE_LOADER is not set 116# CONFIG_MIPS_VPE_LOADER is not set
117CONFIG_64BIT_PHYS_ADDR=y 117CONFIG_64BIT_PHYS_ADDR=y
118CONFIG_CPU_HAS_LLSC=y
119CONFIG_CPU_HAS_SYNC=y 118CONFIG_CPU_HAS_SYNC=y
120CONFIG_GENERIC_HARDIRQS=y 119CONFIG_GENERIC_HARDIRQS=y
121CONFIG_GENERIC_IRQ_PROBE=y 120CONFIG_GENERIC_IRQ_PROBE=y
diff --git a/arch/mips/configs/excite_defconfig b/arch/mips/configs/excite_defconfig
index 4e465e945991..1995d43a2ed1 100644
--- a/arch/mips/configs/excite_defconfig
+++ b/arch/mips/configs/excite_defconfig
@@ -118,7 +118,6 @@ CONFIG_MIPS_MT_DISABLED=y
118# CONFIG_MIPS_MT_SMTC is not set 118# CONFIG_MIPS_MT_SMTC is not set
119# CONFIG_MIPS_VPE_LOADER is not set 119# CONFIG_MIPS_VPE_LOADER is not set
120# CONFIG_64BIT_PHYS_ADDR is not set 120# CONFIG_64BIT_PHYS_ADDR is not set
121CONFIG_CPU_HAS_LLSC=y
122CONFIG_CPU_HAS_SYNC=y 121CONFIG_CPU_HAS_SYNC=y
123CONFIG_GENERIC_HARDIRQS=y 122CONFIG_GENERIC_HARDIRQS=y
124CONFIG_GENERIC_IRQ_PROBE=y 123CONFIG_GENERIC_IRQ_PROBE=y
diff --git a/arch/mips/configs/fulong_defconfig b/arch/mips/configs/fuloong2e_defconfig
index 786a9bc9a696..0197f0de6b3f 100644
--- a/arch/mips/configs/fulong_defconfig
+++ b/arch/mips/configs/fuloong2e_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.28-rc6 3# Linux kernel version: 2.6.31-rc1
4# Fri Nov 28 17:53:48 2008 4# Thu Jul 2 22:37:00 2009
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
@@ -9,16 +9,17 @@ CONFIG_MIPS=y
9# Machine selection 9# Machine selection
10# 10#
11# CONFIG_MACH_ALCHEMY is not set 11# CONFIG_MACH_ALCHEMY is not set
12# CONFIG_AR7 is not set
12# CONFIG_BASLER_EXCITE is not set 13# CONFIG_BASLER_EXCITE is not set
13# CONFIG_BCM47XX is not set 14# CONFIG_BCM47XX is not set
14# CONFIG_MIPS_COBALT is not set 15# CONFIG_MIPS_COBALT is not set
15# CONFIG_MACH_DECSTATION is not set 16# CONFIG_MACH_DECSTATION is not set
16# CONFIG_MACH_JAZZ is not set 17# CONFIG_MACH_JAZZ is not set
17# CONFIG_LASAT is not set 18# CONFIG_LASAT is not set
18CONFIG_LEMOTE_FULONG=y 19CONFIG_MACH_LOONGSON=y
19# CONFIG_MIPS_MALTA is not set 20# CONFIG_MIPS_MALTA is not set
20# CONFIG_MIPS_SIM is not set 21# CONFIG_MIPS_SIM is not set
21# CONFIG_MACH_EMMA is not set 22# CONFIG_NEC_MARKEINS is not set
22# CONFIG_MACH_VR41XX is not set 23# CONFIG_MACH_VR41XX is not set
23# CONFIG_NXP_STB220 is not set 24# CONFIG_NXP_STB220 is not set
24# CONFIG_NXP_STB225 is not set 25# CONFIG_NXP_STB225 is not set
@@ -43,6 +44,11 @@ CONFIG_LEMOTE_FULONG=y
43# CONFIG_MACH_TX49XX is not set 44# CONFIG_MACH_TX49XX is not set
44# CONFIG_MIKROTIK_RB532 is not set 45# CONFIG_MIKROTIK_RB532 is not set
45# CONFIG_WR_PPMC is not set 46# CONFIG_WR_PPMC is not set
47# CONFIG_CAVIUM_OCTEON_SIMULATOR is not set
48# CONFIG_CAVIUM_OCTEON_REFERENCE_BOARD is not set
49# CONFIG_ALCHEMY_GPIO_INDIRECT is not set
50CONFIG_ARCH_SPARSEMEM_ENABLE=y
51CONFIG_LEMOTE_FULOONG2E=y
46CONFIG_RWSEM_GENERIC_SPINLOCK=y 52CONFIG_RWSEM_GENERIC_SPINLOCK=y
47# CONFIG_ARCH_HAS_ILOG2_U32 is not set 53# CONFIG_ARCH_HAS_ILOG2_U32 is not set
48# CONFIG_ARCH_HAS_ILOG2_U64 is not set 54# CONFIG_ARCH_HAS_ILOG2_U64 is not set
@@ -53,15 +59,16 @@ CONFIG_GENERIC_CALIBRATE_DELAY=y
53CONFIG_GENERIC_CLOCKEVENTS=y 59CONFIG_GENERIC_CLOCKEVENTS=y
54CONFIG_GENERIC_TIME=y 60CONFIG_GENERIC_TIME=y
55CONFIG_GENERIC_CMOS_UPDATE=y 61CONFIG_GENERIC_CMOS_UPDATE=y
56CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 62CONFIG_SCHED_OMIT_FRAME_POINTER=y
57CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 63CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
64CONFIG_CEVT_R4K_LIB=y
58CONFIG_CEVT_R4K=y 65CONFIG_CEVT_R4K=y
66CONFIG_CSRC_R4K_LIB=y
59CONFIG_CSRC_R4K=y 67CONFIG_CSRC_R4K=y
60CONFIG_DMA_NONCOHERENT=y 68CONFIG_DMA_NONCOHERENT=y
61CONFIG_DMA_NEED_PCI_MAP_STATE=y 69CONFIG_DMA_NEED_PCI_MAP_STATE=y
62CONFIG_EARLY_PRINTK=y 70CONFIG_EARLY_PRINTK=y
63CONFIG_SYS_HAS_EARLY_PRINTK=y 71CONFIG_SYS_HAS_EARLY_PRINTK=y
64# CONFIG_HOTPLUG_CPU is not set
65CONFIG_I8259=y 72CONFIG_I8259=y
66# CONFIG_NO_IOPORT is not set 73# CONFIG_NO_IOPORT is not set
67CONFIG_GENERIC_ISA_DMA=y 74CONFIG_GENERIC_ISA_DMA=y
@@ -72,12 +79,11 @@ CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
72CONFIG_IRQ_CPU=y 79CONFIG_IRQ_CPU=y
73CONFIG_BOOT_ELF32=y 80CONFIG_BOOT_ELF32=y
74CONFIG_MIPS_L1_CACHE_SHIFT=5 81CONFIG_MIPS_L1_CACHE_SHIFT=5
75CONFIG_HAVE_STD_PC_SERIAL_PORT=y
76 82
77# 83#
78# CPU selection 84# CPU selection
79# 85#
80CONFIG_CPU_LOONGSON2=y 86CONFIG_CPU_LOONGSON2E=y
81# CONFIG_CPU_MIPS32_R1 is not set 87# CONFIG_CPU_MIPS32_R1 is not set
82# CONFIG_CPU_MIPS32_R2 is not set 88# CONFIG_CPU_MIPS32_R2 is not set
83# CONFIG_CPU_MIPS64_R1 is not set 89# CONFIG_CPU_MIPS64_R1 is not set
@@ -98,7 +104,9 @@ CONFIG_CPU_LOONGSON2=y
98# CONFIG_CPU_RM7000 is not set 104# CONFIG_CPU_RM7000 is not set
99# CONFIG_CPU_RM9000 is not set 105# CONFIG_CPU_RM9000 is not set
100# CONFIG_CPU_SB1 is not set 106# CONFIG_CPU_SB1 is not set
101CONFIG_SYS_HAS_CPU_LOONGSON2=y 107# CONFIG_CPU_CAVIUM_OCTEON is not set
108CONFIG_CPU_LOONGSON2=y
109CONFIG_SYS_HAS_CPU_LOONGSON2E=y
102CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y 110CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
103CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y 111CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y
104CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y 112CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
@@ -112,6 +120,7 @@ CONFIG_64BIT=y
112# CONFIG_PAGE_SIZE_4KB is not set 120# CONFIG_PAGE_SIZE_4KB is not set
113# CONFIG_PAGE_SIZE_8KB is not set 121# CONFIG_PAGE_SIZE_8KB is not set
114CONFIG_PAGE_SIZE_16KB=y 122CONFIG_PAGE_SIZE_16KB=y
123# CONFIG_PAGE_SIZE_32KB is not set
115# CONFIG_PAGE_SIZE_64KB is not set 124# CONFIG_PAGE_SIZE_64KB is not set
116CONFIG_BOARD_SCACHE=y 125CONFIG_BOARD_SCACHE=y
117CONFIG_MIPS_MT_DISABLED=y 126CONFIG_MIPS_MT_DISABLED=y
@@ -125,7 +134,6 @@ CONFIG_CPU_SUPPORTS_HIGHMEM=y
125CONFIG_SYS_SUPPORTS_HIGHMEM=y 134CONFIG_SYS_SUPPORTS_HIGHMEM=y
126CONFIG_ARCH_FLATMEM_ENABLE=y 135CONFIG_ARCH_FLATMEM_ENABLE=y
127CONFIG_ARCH_POPULATES_NODE_MAP=y 136CONFIG_ARCH_POPULATES_NODE_MAP=y
128CONFIG_ARCH_SPARSEMEM_ENABLE=y
129CONFIG_SELECT_MEMORY_MODEL=y 137CONFIG_SELECT_MEMORY_MODEL=y
130CONFIG_FLATMEM_MANUAL=y 138CONFIG_FLATMEM_MANUAL=y
131# CONFIG_DISCONTIGMEM_MANUAL is not set 139# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -135,11 +143,12 @@ CONFIG_FLAT_NODE_MEM_MAP=y
135CONFIG_SPARSEMEM_STATIC=y 143CONFIG_SPARSEMEM_STATIC=y
136CONFIG_PAGEFLAGS_EXTENDED=y 144CONFIG_PAGEFLAGS_EXTENDED=y
137CONFIG_SPLIT_PTLOCK_CPUS=4 145CONFIG_SPLIT_PTLOCK_CPUS=4
138CONFIG_RESOURCES_64BIT=y
139CONFIG_PHYS_ADDR_T_64BIT=y 146CONFIG_PHYS_ADDR_T_64BIT=y
140CONFIG_ZONE_DMA_FLAG=0 147CONFIG_ZONE_DMA_FLAG=0
141CONFIG_VIRT_TO_BUS=y 148CONFIG_VIRT_TO_BUS=y
142CONFIG_UNEVICTABLE_LRU=y 149CONFIG_HAVE_MLOCK=y
150CONFIG_HAVE_MLOCKED_PAGE_BIT=y
151CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
143CONFIG_TICK_ONESHOT=y 152CONFIG_TICK_ONESHOT=y
144CONFIG_NO_HZ=y 153CONFIG_NO_HZ=y
145CONFIG_HIGH_RES_TIMERS=y 154CONFIG_HIGH_RES_TIMERS=y
@@ -161,6 +170,7 @@ CONFIG_SECCOMP=y
161CONFIG_LOCKDEP_SUPPORT=y 170CONFIG_LOCKDEP_SUPPORT=y
162CONFIG_STACKTRACE_SUPPORT=y 171CONFIG_STACKTRACE_SUPPORT=y
163CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 172CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
173CONFIG_CONSTRUCTORS=y
164 174
165# 175#
166# General setup 176# General setup
@@ -168,21 +178,31 @@ CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
168CONFIG_EXPERIMENTAL=y 178CONFIG_EXPERIMENTAL=y
169CONFIG_BROKEN_ON_SMP=y 179CONFIG_BROKEN_ON_SMP=y
170CONFIG_INIT_ENV_ARG_LIMIT=32 180CONFIG_INIT_ENV_ARG_LIMIT=32
171CONFIG_LOCALVERSION="lm32" 181CONFIG_LOCALVERSION="-fuloong2e"
172# CONFIG_LOCALVERSION_AUTO is not set 182# CONFIG_LOCALVERSION_AUTO is not set
173CONFIG_SWAP=y 183CONFIG_SWAP=y
174CONFIG_SYSVIPC=y 184CONFIG_SYSVIPC=y
175CONFIG_SYSVIPC_SYSCTL=y 185CONFIG_SYSVIPC_SYSCTL=y
176CONFIG_POSIX_MQUEUE=y 186CONFIG_POSIX_MQUEUE=y
187CONFIG_POSIX_MQUEUE_SYSCTL=y
177CONFIG_BSD_PROCESS_ACCT=y 188CONFIG_BSD_PROCESS_ACCT=y
178# CONFIG_BSD_PROCESS_ACCT_V3 is not set 189# CONFIG_BSD_PROCESS_ACCT_V3 is not set
179# CONFIG_TASKSTATS is not set 190# CONFIG_TASKSTATS is not set
180# CONFIG_AUDIT is not set 191# CONFIG_AUDIT is not set
192
193#
194# RCU Subsystem
195#
196CONFIG_CLASSIC_RCU=y
197# CONFIG_TREE_RCU is not set
198# CONFIG_PREEMPT_RCU is not set
199# CONFIG_TREE_RCU_TRACE is not set
200# CONFIG_PREEMPT_RCU_TRACE is not set
181CONFIG_IKCONFIG=y 201CONFIG_IKCONFIG=y
182CONFIG_IKCONFIG_PROC=y 202CONFIG_IKCONFIG_PROC=y
183CONFIG_LOG_BUF_SHIFT=14 203CONFIG_LOG_BUF_SHIFT=14
184# CONFIG_CGROUPS is not set
185# CONFIG_GROUP_SCHED is not set 204# CONFIG_GROUP_SCHED is not set
205# CONFIG_CGROUPS is not set
186CONFIG_SYSFS_DEPRECATED=y 206CONFIG_SYSFS_DEPRECATED=y
187CONFIG_SYSFS_DEPRECATED_V2=y 207CONFIG_SYSFS_DEPRECATED_V2=y
188# CONFIG_RELAY is not set 208# CONFIG_RELAY is not set
@@ -191,9 +211,11 @@ CONFIG_NAMESPACES=y
191# CONFIG_IPC_NS is not set 211# CONFIG_IPC_NS is not set
192CONFIG_USER_NS=y 212CONFIG_USER_NS=y
193CONFIG_PID_NS=y 213CONFIG_PID_NS=y
214# CONFIG_NET_NS is not set
194# CONFIG_BLK_DEV_INITRD is not set 215# CONFIG_BLK_DEV_INITRD is not set
195# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 216# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
196CONFIG_SYSCTL=y 217CONFIG_SYSCTL=y
218CONFIG_ANON_INODES=y
197CONFIG_EMBEDDED=y 219CONFIG_EMBEDDED=y
198CONFIG_SYSCTL_SYSCALL=y 220CONFIG_SYSCTL_SYSCALL=y
199CONFIG_KALLSYMS=y 221CONFIG_KALLSYMS=y
@@ -203,29 +225,40 @@ CONFIG_PRINTK=y
203CONFIG_BUG=y 225CONFIG_BUG=y
204CONFIG_ELF_CORE=y 226CONFIG_ELF_CORE=y
205# CONFIG_PCSPKR_PLATFORM is not set 227# CONFIG_PCSPKR_PLATFORM is not set
206# CONFIG_COMPAT_BRK is not set
207CONFIG_BASE_FULL=y 228CONFIG_BASE_FULL=y
208CONFIG_FUTEX=y 229CONFIG_FUTEX=y
209CONFIG_ANON_INODES=y
210CONFIG_EPOLL=y 230CONFIG_EPOLL=y
211CONFIG_SIGNALFD=y 231CONFIG_SIGNALFD=y
212CONFIG_TIMERFD=y 232CONFIG_TIMERFD=y
213CONFIG_EVENTFD=y 233CONFIG_EVENTFD=y
214CONFIG_SHMEM=y 234CONFIG_SHMEM=y
215CONFIG_AIO=y 235CONFIG_AIO=y
236
237#
238# Performance Counters
239#
216CONFIG_VM_EVENT_COUNTERS=y 240CONFIG_VM_EVENT_COUNTERS=y
217CONFIG_PCI_QUIRKS=y 241CONFIG_PCI_QUIRKS=y
242# CONFIG_STRIP_ASM_SYMS is not set
243# CONFIG_COMPAT_BRK is not set
218CONFIG_SLAB=y 244CONFIG_SLAB=y
219# CONFIG_SLUB is not set 245# CONFIG_SLUB is not set
220# CONFIG_SLOB is not set 246# CONFIG_SLOB is not set
221CONFIG_PROFILING=y 247CONFIG_PROFILING=y
222# CONFIG_MARKERS is not set 248CONFIG_TRACEPOINTS=y
249CONFIG_MARKERS=y
223CONFIG_OPROFILE=m 250CONFIG_OPROFILE=m
224CONFIG_HAVE_OPROFILE=y 251CONFIG_HAVE_OPROFILE=y
252CONFIG_HAVE_SYSCALL_WRAPPERS=y
253
254#
255# GCOV-based kernel profiling
256#
257# CONFIG_GCOV_KERNEL is not set
258# CONFIG_SLOW_WORK is not set
225# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 259# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
226CONFIG_SLABINFO=y 260CONFIG_SLABINFO=y
227CONFIG_RT_MUTEXES=y 261CONFIG_RT_MUTEXES=y
228# CONFIG_TINY_SHMEM is not set
229CONFIG_BASE_SMALL=0 262CONFIG_BASE_SMALL=0
230CONFIG_MODULES=y 263CONFIG_MODULES=y
231# CONFIG_MODULE_FORCE_LOAD is not set 264# CONFIG_MODULE_FORCE_LOAD is not set
@@ -233,9 +266,7 @@ CONFIG_MODULE_UNLOAD=y
233CONFIG_MODULE_FORCE_UNLOAD=y 266CONFIG_MODULE_FORCE_UNLOAD=y
234# CONFIG_MODVERSIONS is not set 267# CONFIG_MODVERSIONS is not set
235# CONFIG_MODULE_SRCVERSION_ALL is not set 268# CONFIG_MODULE_SRCVERSION_ALL is not set
236CONFIG_KMOD=y
237CONFIG_BLOCK=y 269CONFIG_BLOCK=y
238# CONFIG_BLK_DEV_IO_TRACE is not set
239CONFIG_BLK_DEV_BSG=y 270CONFIG_BLK_DEV_BSG=y
240# CONFIG_BLK_DEV_INTEGRITY is not set 271# CONFIG_BLK_DEV_INTEGRITY is not set
241CONFIG_BLOCK_COMPAT=y 272CONFIG_BLOCK_COMPAT=y
@@ -252,8 +283,7 @@ CONFIG_IOSCHED_CFQ=y
252CONFIG_DEFAULT_CFQ=y 283CONFIG_DEFAULT_CFQ=y
253# CONFIG_DEFAULT_NOOP is not set 284# CONFIG_DEFAULT_NOOP is not set
254CONFIG_DEFAULT_IOSCHED="cfq" 285CONFIG_DEFAULT_IOSCHED="cfq"
255CONFIG_CLASSIC_RCU=y 286# CONFIG_FREEZER is not set
256CONFIG_FREEZER=y
257 287
258# 288#
259# Bus options (PCI, PCMCIA, EISA, ISA, TC) 289# Bus options (PCI, PCMCIA, EISA, ISA, TC)
@@ -263,6 +293,8 @@ CONFIG_PCI=y
263CONFIG_PCI_DOMAINS=y 293CONFIG_PCI_DOMAINS=y
264# CONFIG_ARCH_SUPPORTS_MSI is not set 294# CONFIG_ARCH_SUPPORTS_MSI is not set
265CONFIG_PCI_LEGACY=y 295CONFIG_PCI_LEGACY=y
296# CONFIG_PCI_STUB is not set
297# CONFIG_PCI_IOV is not set
266CONFIG_ISA=y 298CONFIG_ISA=y
267CONFIG_MMU=y 299CONFIG_MMU=y
268# CONFIG_PCCARD is not set 300# CONFIG_PCCARD is not set
@@ -285,12 +317,12 @@ CONFIG_BINFMT_ELF32=y
285# 317#
286# Power management options 318# Power management options
287# 319#
320CONFIG_ARCH_HIBERNATION_POSSIBLE=y
288CONFIG_ARCH_SUSPEND_POSSIBLE=y 321CONFIG_ARCH_SUSPEND_POSSIBLE=y
289CONFIG_PM=y 322CONFIG_PM=y
290# CONFIG_PM_DEBUG is not set 323# CONFIG_PM_DEBUG is not set
291CONFIG_PM_SLEEP=y 324# CONFIG_SUSPEND is not set
292CONFIG_SUSPEND=y 325# CONFIG_HIBERNATION is not set
293CONFIG_SUSPEND_FREEZER=y
294CONFIG_NET=y 326CONFIG_NET=y
295 327
296# 328#
@@ -346,9 +378,11 @@ CONFIG_NETFILTER_NETLINK=m
346CONFIG_NETFILTER_NETLINK_QUEUE=m 378CONFIG_NETFILTER_NETLINK_QUEUE=m
347CONFIG_NETFILTER_NETLINK_LOG=m 379CONFIG_NETFILTER_NETLINK_LOG=m
348# CONFIG_NF_CONNTRACK is not set 380# CONFIG_NF_CONNTRACK is not set
381# CONFIG_NETFILTER_TPROXY is not set
349CONFIG_NETFILTER_XTABLES=m 382CONFIG_NETFILTER_XTABLES=m
350CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m 383CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
351# CONFIG_NETFILTER_XT_TARGET_DSCP is not set 384# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
385CONFIG_NETFILTER_XT_TARGET_HL=m
352CONFIG_NETFILTER_XT_TARGET_MARK=m 386CONFIG_NETFILTER_XT_TARGET_MARK=m
353# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set 387# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
354CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m 388CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
@@ -361,6 +395,7 @@ CONFIG_NETFILTER_XT_MATCH_DCCP=m
361# CONFIG_NETFILTER_XT_MATCH_DSCP is not set 395# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
362CONFIG_NETFILTER_XT_MATCH_ESP=m 396CONFIG_NETFILTER_XT_MATCH_ESP=m
363# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set 397# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
398CONFIG_NETFILTER_XT_MATCH_HL=m
364CONFIG_NETFILTER_XT_MATCH_IPRANGE=m 399CONFIG_NETFILTER_XT_MATCH_IPRANGE=m
365CONFIG_NETFILTER_XT_MATCH_LENGTH=m 400CONFIG_NETFILTER_XT_MATCH_LENGTH=m
366CONFIG_NETFILTER_XT_MATCH_LIMIT=m 401CONFIG_NETFILTER_XT_MATCH_LIMIT=m
@@ -381,6 +416,7 @@ CONFIG_NETFILTER_XT_MATCH_STRING=m
381CONFIG_NETFILTER_XT_MATCH_TCPMSS=m 416CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
382CONFIG_NETFILTER_XT_MATCH_TIME=m 417CONFIG_NETFILTER_XT_MATCH_TIME=m
383CONFIG_NETFILTER_XT_MATCH_U32=m 418CONFIG_NETFILTER_XT_MATCH_U32=m
419# CONFIG_NETFILTER_XT_MATCH_OSF is not set
384# CONFIG_IP_VS is not set 420# CONFIG_IP_VS is not set
385 421
386# 422#
@@ -419,30 +455,34 @@ CONFIG_IP_NF_ARP_MANGLE=m
419# CONFIG_LAPB is not set 455# CONFIG_LAPB is not set
420# CONFIG_ECONET is not set 456# CONFIG_ECONET is not set
421# CONFIG_WAN_ROUTER is not set 457# CONFIG_WAN_ROUTER is not set
458CONFIG_PHONET=m
459# CONFIG_IEEE802154 is not set
422# CONFIG_NET_SCHED is not set 460# CONFIG_NET_SCHED is not set
423CONFIG_NET_CLS_ROUTE=y 461CONFIG_NET_CLS_ROUTE=y
462# CONFIG_DCB is not set
424 463
425# 464#
426# Network testing 465# Network testing
427# 466#
428# CONFIG_NET_PKTGEN is not set 467# CONFIG_NET_PKTGEN is not set
468# CONFIG_NET_DROP_MONITOR is not set
429# CONFIG_HAMRADIO is not set 469# CONFIG_HAMRADIO is not set
430# CONFIG_CAN is not set 470# CONFIG_CAN is not set
431# CONFIG_IRDA is not set 471# CONFIG_IRDA is not set
432# CONFIG_BT is not set 472# CONFIG_BT is not set
433# CONFIG_AF_RXRPC is not set 473# CONFIG_AF_RXRPC is not set
434CONFIG_PHONET=m
435CONFIG_WIRELESS=y 474CONFIG_WIRELESS=y
436# CONFIG_CFG80211 is not set 475# CONFIG_CFG80211 is not set
437CONFIG_WIRELESS_OLD_REGULATORY=y 476CONFIG_WIRELESS_OLD_REGULATORY=y
438CONFIG_WIRELESS_EXT=y 477CONFIG_WIRELESS_EXT=y
439CONFIG_WIRELESS_EXT_SYSFS=y 478CONFIG_WIRELESS_EXT_SYSFS=y
440# CONFIG_MAC80211 is not set 479# CONFIG_LIB80211 is not set
441CONFIG_IEEE80211=m 480
442# CONFIG_IEEE80211_DEBUG is not set 481#
443CONFIG_IEEE80211_CRYPT_WEP=m 482# CFG80211 needs to be enabled for MAC80211
444# CONFIG_IEEE80211_CRYPT_CCMP is not set 483#
445# CONFIG_IEEE80211_CRYPT_TKIP is not set 484CONFIG_MAC80211_DEFAULT_PS_VALUE=0
485# CONFIG_WIMAX is not set
446# CONFIG_RFKILL is not set 486# CONFIG_RFKILL is not set
447CONFIG_NET_9P=m 487CONFIG_NET_9P=m
448# CONFIG_NET_9P_DEBUG is not set 488# CONFIG_NET_9P_DEBUG is not set
@@ -466,6 +506,7 @@ CONFIG_MTD=m
466# CONFIG_MTD_DEBUG is not set 506# CONFIG_MTD_DEBUG is not set
467# CONFIG_MTD_CONCAT is not set 507# CONFIG_MTD_CONCAT is not set
468# CONFIG_MTD_PARTITIONS is not set 508# CONFIG_MTD_PARTITIONS is not set
509# CONFIG_MTD_TESTS is not set
469 510
470# 511#
471# User Modules And Translation Layers 512# User Modules And Translation Layers
@@ -516,9 +557,7 @@ CONFIG_MTD_CFI_UTIL=m
516# 557#
517# CONFIG_MTD_COMPLEX_MAPPINGS is not set 558# CONFIG_MTD_COMPLEX_MAPPINGS is not set
518CONFIG_MTD_PHYSMAP=m 559CONFIG_MTD_PHYSMAP=m
519CONFIG_MTD_PHYSMAP_START=0x1fc00000 560# CONFIG_MTD_PHYSMAP_COMPAT is not set
520CONFIG_MTD_PHYSMAP_LEN=0x80000
521CONFIG_MTD_PHYSMAP_BANKWIDTH=1
522# CONFIG_MTD_INTEL_VR_NOR is not set 561# CONFIG_MTD_INTEL_VR_NOR is not set
523# CONFIG_MTD_PLATRAM is not set 562# CONFIG_MTD_PLATRAM is not set
524 563
@@ -541,6 +580,11 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=1
541# CONFIG_MTD_ONENAND is not set 580# CONFIG_MTD_ONENAND is not set
542 581
543# 582#
583# LPDDR flash memory drivers
584#
585# CONFIG_MTD_LPDDR is not set
586
587#
544# UBI - Unsorted block images 588# UBI - Unsorted block images
545# 589#
546# CONFIG_MTD_UBI is not set 590# CONFIG_MTD_UBI is not set
@@ -573,6 +617,7 @@ CONFIG_IDE=y
573# 617#
574# Please see Documentation/ide/ide.txt for help/info on IDE drives 618# Please see Documentation/ide/ide.txt for help/info on IDE drives
575# 619#
620CONFIG_IDE_XFER_MODE=y
576CONFIG_IDE_TIMINGS=y 621CONFIG_IDE_TIMINGS=y
577CONFIG_IDE_ATAPI=y 622CONFIG_IDE_ATAPI=y
578# CONFIG_BLK_DEV_IDE_SATA is not set 623# CONFIG_BLK_DEV_IDE_SATA is not set
@@ -582,7 +627,6 @@ CONFIG_IDE_GD_ATA=y
582CONFIG_BLK_DEV_IDECD=y 627CONFIG_BLK_DEV_IDECD=y
583CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS=y 628CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS=y
584# CONFIG_BLK_DEV_IDETAPE is not set 629# CONFIG_BLK_DEV_IDETAPE is not set
585CONFIG_BLK_DEV_IDESCSI=y
586CONFIG_IDE_TASK_IOCTL=y 630CONFIG_IDE_TASK_IOCTL=y
587CONFIG_IDE_PROC_FS=y 631CONFIG_IDE_PROC_FS=y
588 632
@@ -613,6 +657,7 @@ CONFIG_BLK_DEV_IDEDMA_PCI=y
613# CONFIG_BLK_DEV_JMICRON is not set 657# CONFIG_BLK_DEV_JMICRON is not set
614# CONFIG_BLK_DEV_SC1200 is not set 658# CONFIG_BLK_DEV_SC1200 is not set
615# CONFIG_BLK_DEV_PIIX is not set 659# CONFIG_BLK_DEV_PIIX is not set
660# CONFIG_BLK_DEV_IT8172 is not set
616# CONFIG_BLK_DEV_IT8213 is not set 661# CONFIG_BLK_DEV_IT8213 is not set
617# CONFIG_BLK_DEV_IT821X is not set 662# CONFIG_BLK_DEV_IT821X is not set
618# CONFIG_BLK_DEV_NS87415 is not set 663# CONFIG_BLK_DEV_NS87415 is not set
@@ -660,10 +705,6 @@ CONFIG_BLK_DEV_SR=y
660CONFIG_BLK_DEV_SR_VENDOR=y 705CONFIG_BLK_DEV_SR_VENDOR=y
661CONFIG_CHR_DEV_SG=y 706CONFIG_CHR_DEV_SG=y
662# CONFIG_CHR_DEV_SCH is not set 707# CONFIG_CHR_DEV_SCH is not set
663
664#
665# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
666#
667# CONFIG_SCSI_MULTI_LUN is not set 708# CONFIG_SCSI_MULTI_LUN is not set
668CONFIG_SCSI_CONSTANTS=y 709CONFIG_SCSI_CONSTANTS=y
669# CONFIG_SCSI_LOGGING is not set 710# CONFIG_SCSI_LOGGING is not set
@@ -681,6 +722,7 @@ CONFIG_SCSI_WAIT_SCAN=m
681# CONFIG_SCSI_SRP_ATTRS is not set 722# CONFIG_SCSI_SRP_ATTRS is not set
682# CONFIG_SCSI_LOWLEVEL is not set 723# CONFIG_SCSI_LOWLEVEL is not set
683# CONFIG_SCSI_DH is not set 724# CONFIG_SCSI_DH is not set
725# CONFIG_SCSI_OSD_INITIATOR is not set
684# CONFIG_ATA is not set 726# CONFIG_ATA is not set
685# CONFIG_MD is not set 727# CONFIG_MD is not set
686# CONFIG_FUSION is not set 728# CONFIG_FUSION is not set
@@ -690,7 +732,11 @@ CONFIG_SCSI_WAIT_SCAN=m
690# 732#
691 733
692# 734#
693# Enable only one of the two stacks, unless you know what you are doing 735# You can enable one or both FireWire driver stacks.
736#
737
738#
739# See the help texts for more information.
694# 740#
695# CONFIG_FIREWIRE is not set 741# CONFIG_FIREWIRE is not set
696# CONFIG_IEEE1394 is not set 742# CONFIG_IEEE1394 is not set
@@ -718,6 +764,9 @@ CONFIG_CICADA_PHY=m
718# CONFIG_BROADCOM_PHY is not set 764# CONFIG_BROADCOM_PHY is not set
719# CONFIG_ICPLUS_PHY is not set 765# CONFIG_ICPLUS_PHY is not set
720# CONFIG_REALTEK_PHY is not set 766# CONFIG_REALTEK_PHY is not set
767# CONFIG_NATIONAL_PHY is not set
768# CONFIG_STE10XP is not set
769# CONFIG_LSI_ET1011C_PHY is not set
721# CONFIG_MDIO_BITBANG is not set 770# CONFIG_MDIO_BITBANG is not set
722CONFIG_NET_ETHERNET=y 771CONFIG_NET_ETHERNET=y
723CONFIG_MII=y 772CONFIG_MII=y
@@ -729,7 +778,9 @@ CONFIG_MII=y
729# CONFIG_NET_VENDOR_SMC is not set 778# CONFIG_NET_VENDOR_SMC is not set
730# CONFIG_SMC91X is not set 779# CONFIG_SMC91X is not set
731# CONFIG_DM9000 is not set 780# CONFIG_DM9000 is not set
781# CONFIG_ETHOC is not set
732# CONFIG_NET_VENDOR_RACAL is not set 782# CONFIG_NET_VENDOR_RACAL is not set
783# CONFIG_DNET is not set
733# CONFIG_NET_TULIP is not set 784# CONFIG_NET_TULIP is not set
734# CONFIG_AT1700 is not set 785# CONFIG_AT1700 is not set
735# CONFIG_DEPCA is not set 786# CONFIG_DEPCA is not set
@@ -752,7 +803,6 @@ CONFIG_NET_PCI=y
752# CONFIG_FORCEDETH is not set 803# CONFIG_FORCEDETH is not set
753# CONFIG_CS89x0 is not set 804# CONFIG_CS89x0 is not set
754# CONFIG_TC35815 is not set 805# CONFIG_TC35815 is not set
755# CONFIG_EEPRO100 is not set
756# CONFIG_E100 is not set 806# CONFIG_E100 is not set
757# CONFIG_FEALNX is not set 807# CONFIG_FEALNX is not set
758# CONFIG_NATSEMI is not set 808# CONFIG_NATSEMI is not set
@@ -766,8 +816,10 @@ CONFIG_8139TOO=y
766# CONFIG_R6040 is not set 816# CONFIG_R6040 is not set
767# CONFIG_SIS900 is not set 817# CONFIG_SIS900 is not set
768# CONFIG_EPIC100 is not set 818# CONFIG_EPIC100 is not set
819# CONFIG_SMSC9420 is not set
769# CONFIG_SUNDANCE is not set 820# CONFIG_SUNDANCE is not set
770# CONFIG_TLAN is not set 821# CONFIG_TLAN is not set
822# CONFIG_KS8842 is not set
771# CONFIG_VIA_RHINE is not set 823# CONFIG_VIA_RHINE is not set
772# CONFIG_SC92031 is not set 824# CONFIG_SC92031 is not set
773# CONFIG_ATL2 is not set 825# CONFIG_ATL2 is not set
@@ -778,6 +830,7 @@ CONFIG_NETDEV_1000=y
778# CONFIG_E1000E is not set 830# CONFIG_E1000E is not set
779# CONFIG_IP1000 is not set 831# CONFIG_IP1000 is not set
780# CONFIG_IGB is not set 832# CONFIG_IGB is not set
833# CONFIG_IGBVF is not set
781# CONFIG_NS83820 is not set 834# CONFIG_NS83820 is not set
782# CONFIG_HAMACHI is not set 835# CONFIG_HAMACHI is not set
783# CONFIG_YELLOWFIN is not set 836# CONFIG_YELLOWFIN is not set
@@ -788,17 +841,21 @@ CONFIG_NETDEV_1000=y
788# CONFIG_VIA_VELOCITY is not set 841# CONFIG_VIA_VELOCITY is not set
789# CONFIG_TIGON3 is not set 842# CONFIG_TIGON3 is not set
790# CONFIG_BNX2 is not set 843# CONFIG_BNX2 is not set
844# CONFIG_CNIC is not set
791# CONFIG_QLA3XXX is not set 845# CONFIG_QLA3XXX is not set
792# CONFIG_ATL1 is not set 846# CONFIG_ATL1 is not set
793# CONFIG_ATL1E is not set 847# CONFIG_ATL1E is not set
848# CONFIG_ATL1C is not set
794# CONFIG_JME is not set 849# CONFIG_JME is not set
795CONFIG_NETDEV_10000=y 850CONFIG_NETDEV_10000=y
796# CONFIG_CHELSIO_T1 is not set 851# CONFIG_CHELSIO_T1 is not set
852CONFIG_CHELSIO_T3_DEPENDS=y
797# CONFIG_CHELSIO_T3 is not set 853# CONFIG_CHELSIO_T3 is not set
798# CONFIG_ENIC is not set 854# CONFIG_ENIC is not set
799# CONFIG_IXGBE is not set 855# CONFIG_IXGBE is not set
800# CONFIG_IXGB is not set 856# CONFIG_IXGB is not set
801# CONFIG_S2IO is not set 857# CONFIG_S2IO is not set
858# CONFIG_VXGE is not set
802# CONFIG_MYRI10GE is not set 859# CONFIG_MYRI10GE is not set
803# CONFIG_NETXEN_NIC is not set 860# CONFIG_NETXEN_NIC is not set
804# CONFIG_NIU is not set 861# CONFIG_NIU is not set
@@ -808,6 +865,7 @@ CONFIG_NETDEV_10000=y
808# CONFIG_BNX2X is not set 865# CONFIG_BNX2X is not set
809# CONFIG_QLGE is not set 866# CONFIG_QLGE is not set
810# CONFIG_SFC is not set 867# CONFIG_SFC is not set
868# CONFIG_BE2NET is not set
811# CONFIG_TR is not set 869# CONFIG_TR is not set
812 870
813# 871#
@@ -815,7 +873,10 @@ CONFIG_NETDEV_10000=y
815# 873#
816# CONFIG_WLAN_PRE80211 is not set 874# CONFIG_WLAN_PRE80211 is not set
817# CONFIG_WLAN_80211 is not set 875# CONFIG_WLAN_80211 is not set
818# CONFIG_IWLWIFI_LEDS is not set 876
877#
878# Enable WiMAX (Networking options) to see the WiMAX drivers
879#
819 880
820# 881#
821# USB Network Adapters 882# USB Network Adapters
@@ -872,7 +933,7 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
872# Input Device Drivers 933# Input Device Drivers
873# 934#
874CONFIG_INPUT_KEYBOARD=y 935CONFIG_INPUT_KEYBOARD=y
875CONFIG_KEYBOARD_ATKBD=m 936CONFIG_KEYBOARD_ATKBD=y
876# CONFIG_KEYBOARD_SUNKBD is not set 937# CONFIG_KEYBOARD_SUNKBD is not set
877# CONFIG_KEYBOARD_LKKBD is not set 938# CONFIG_KEYBOARD_LKKBD is not set
878# CONFIG_KEYBOARD_XTKBD is not set 939# CONFIG_KEYBOARD_XTKBD is not set
@@ -883,7 +944,6 @@ CONFIG_MOUSE_PS2=y
883CONFIG_MOUSE_PS2_ALPS=y 944CONFIG_MOUSE_PS2_ALPS=y
884CONFIG_MOUSE_PS2_LOGIPS2PP=y 945CONFIG_MOUSE_PS2_LOGIPS2PP=y
885CONFIG_MOUSE_PS2_SYNAPTICS=y 946CONFIG_MOUSE_PS2_SYNAPTICS=y
886CONFIG_MOUSE_PS2_LIFEBOOK=y
887CONFIG_MOUSE_PS2_TRACKPOINT=y 947CONFIG_MOUSE_PS2_TRACKPOINT=y
888# CONFIG_MOUSE_PS2_ELANTECH is not set 948# CONFIG_MOUSE_PS2_ELANTECH is not set
889# CONFIG_MOUSE_PS2_TOUCHKIT is not set 949# CONFIG_MOUSE_PS2_TOUCHKIT is not set
@@ -894,6 +954,7 @@ CONFIG_MOUSE_SERIAL=y
894# CONFIG_MOUSE_LOGIBM is not set 954# CONFIG_MOUSE_LOGIBM is not set
895# CONFIG_MOUSE_PC110PAD is not set 955# CONFIG_MOUSE_PC110PAD is not set
896# CONFIG_MOUSE_VSXXXAA is not set 956# CONFIG_MOUSE_VSXXXAA is not set
957# CONFIG_MOUSE_SYNAPTICS_I2C is not set
897# CONFIG_INPUT_JOYSTICK is not set 958# CONFIG_INPUT_JOYSTICK is not set
898# CONFIG_INPUT_TABLET is not set 959# CONFIG_INPUT_TABLET is not set
899# CONFIG_INPUT_TOUCHSCREEN is not set 960# CONFIG_INPUT_TOUCHSCREEN is not set
@@ -939,10 +1000,13 @@ CONFIG_SERIAL_CORE=y
939CONFIG_SERIAL_CORE_CONSOLE=y 1000CONFIG_SERIAL_CORE_CONSOLE=y
940# CONFIG_SERIAL_JSM is not set 1001# CONFIG_SERIAL_JSM is not set
941CONFIG_UNIX98_PTYS=y 1002CONFIG_UNIX98_PTYS=y
1003# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
942CONFIG_LEGACY_PTYS=y 1004CONFIG_LEGACY_PTYS=y
943CONFIG_LEGACY_PTY_COUNT=256 1005CONFIG_LEGACY_PTY_COUNT=256
944# CONFIG_IPMI_HANDLER is not set 1006# CONFIG_IPMI_HANDLER is not set
945CONFIG_HW_RANDOM=y 1007CONFIG_HW_RANDOM=y
1008# CONFIG_HW_RANDOM_TIMERIOMEM is not set
1009CONFIG_RTC=y
946# CONFIG_DTLK is not set 1010# CONFIG_DTLK is not set
947# CONFIG_R3964 is not set 1011# CONFIG_R3964 is not set
948# CONFIG_APPLICOM is not set 1012# CONFIG_APPLICOM is not set
@@ -1006,19 +1070,20 @@ CONFIG_I2C_VIAPRO=m
1006# Miscellaneous I2C Chip support 1070# Miscellaneous I2C Chip support
1007# 1071#
1008# CONFIG_DS1682 is not set 1072# CONFIG_DS1682 is not set
1009# CONFIG_EEPROM_AT24 is not set
1010# CONFIG_EEPROM_LEGACY is not set
1011# CONFIG_SENSORS_PCF8574 is not set 1073# CONFIG_SENSORS_PCF8574 is not set
1012# CONFIG_PCF8575 is not set 1074# CONFIG_PCF8575 is not set
1013# CONFIG_SENSORS_PCA9539 is not set 1075# CONFIG_SENSORS_PCA9539 is not set
1014# CONFIG_SENSORS_PCF8591 is not set
1015# CONFIG_SENSORS_MAX6875 is not set
1016# CONFIG_SENSORS_TSL2550 is not set 1076# CONFIG_SENSORS_TSL2550 is not set
1017# CONFIG_I2C_DEBUG_CORE is not set 1077# CONFIG_I2C_DEBUG_CORE is not set
1018# CONFIG_I2C_DEBUG_ALGO is not set 1078# CONFIG_I2C_DEBUG_ALGO is not set
1019# CONFIG_I2C_DEBUG_BUS is not set 1079# CONFIG_I2C_DEBUG_BUS is not set
1020# CONFIG_I2C_DEBUG_CHIP is not set 1080# CONFIG_I2C_DEBUG_CHIP is not set
1021# CONFIG_SPI is not set 1081# CONFIG_SPI is not set
1082
1083#
1084# PPS support
1085#
1086# CONFIG_PPS is not set
1022# CONFIG_W1 is not set 1087# CONFIG_W1 is not set
1023# CONFIG_POWER_SUPPLY is not set 1088# CONFIG_POWER_SUPPLY is not set
1024# CONFIG_HWMON is not set 1089# CONFIG_HWMON is not set
@@ -1041,140 +1106,10 @@ CONFIG_SSB_POSSIBLE=y
1041# CONFIG_MFD_TMIO is not set 1106# CONFIG_MFD_TMIO is not set
1042# CONFIG_MFD_WM8400 is not set 1107# CONFIG_MFD_WM8400 is not set
1043# CONFIG_MFD_WM8350_I2C is not set 1108# CONFIG_MFD_WM8350_I2C is not set
1109# CONFIG_MFD_PCF50633 is not set
1110# CONFIG_AB3100_CORE is not set
1044# CONFIG_REGULATOR is not set 1111# CONFIG_REGULATOR is not set
1045 1112# CONFIG_MEDIA_SUPPORT is not set
1046#
1047# Multimedia devices
1048#
1049
1050#
1051# Multimedia core support
1052#
1053CONFIG_VIDEO_DEV=m
1054CONFIG_VIDEO_V4L2_COMMON=m
1055CONFIG_VIDEO_ALLOW_V4L1=y
1056CONFIG_VIDEO_V4L1_COMPAT=y
1057# CONFIG_DVB_CORE is not set
1058CONFIG_VIDEO_MEDIA=m
1059
1060#
1061# Multimedia drivers
1062#
1063CONFIG_MEDIA_ATTACH=y
1064CONFIG_MEDIA_TUNER=m
1065CONFIG_MEDIA_TUNER_CUSTOMIZE=y
1066CONFIG_MEDIA_TUNER_SIMPLE=m
1067CONFIG_MEDIA_TUNER_TDA8290=m
1068CONFIG_MEDIA_TUNER_TDA827X=m
1069CONFIG_MEDIA_TUNER_TDA18271=m
1070CONFIG_MEDIA_TUNER_TDA9887=m
1071CONFIG_MEDIA_TUNER_TEA5761=m
1072CONFIG_MEDIA_TUNER_TEA5767=m
1073CONFIG_MEDIA_TUNER_MT20XX=m
1074CONFIG_MEDIA_TUNER_MT2060=m
1075CONFIG_MEDIA_TUNER_MT2266=m
1076CONFIG_MEDIA_TUNER_MT2131=m
1077CONFIG_MEDIA_TUNER_QT1010=m
1078CONFIG_MEDIA_TUNER_XC2028=m
1079CONFIG_MEDIA_TUNER_XC5000=m
1080CONFIG_MEDIA_TUNER_MXL5005S=m
1081CONFIG_MEDIA_TUNER_MXL5007T=m
1082CONFIG_VIDEO_V4L2=m
1083CONFIG_VIDEO_V4L1=m
1084CONFIG_VIDEOBUF_GEN=m
1085CONFIG_VIDEOBUF_VMALLOC=m
1086CONFIG_VIDEOBUF_DMA_CONTIG=m
1087CONFIG_VIDEO_CAPTURE_DRIVERS=y
1088# CONFIG_VIDEO_ADV_DEBUG is not set
1089# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
1090CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
1091# CONFIG_VIDEO_VIVI is not set
1092# CONFIG_VIDEO_BT848 is not set
1093# CONFIG_VIDEO_PMS is not set
1094# CONFIG_VIDEO_CPIA is not set
1095# CONFIG_VIDEO_CPIA2 is not set
1096# CONFIG_VIDEO_SAA5246A is not set
1097# CONFIG_VIDEO_SAA5249 is not set
1098# CONFIG_VIDEO_STRADIS is not set
1099# CONFIG_VIDEO_SAA7134 is not set
1100# CONFIG_VIDEO_MXB is not set
1101# CONFIG_VIDEO_HEXIUM_ORION is not set
1102# CONFIG_VIDEO_HEXIUM_GEMINI is not set
1103# CONFIG_VIDEO_CX88 is not set
1104# CONFIG_VIDEO_IVTV is not set
1105# CONFIG_VIDEO_CAFE_CCIC is not set
1106CONFIG_SOC_CAMERA=m
1107CONFIG_SOC_CAMERA_MT9M001=m
1108CONFIG_SOC_CAMERA_MT9M111=m
1109CONFIG_SOC_CAMERA_MT9V022=m
1110CONFIG_SOC_CAMERA_PLATFORM=m
1111CONFIG_VIDEO_SH_MOBILE_CEU=m
1112CONFIG_V4L_USB_DRIVERS=y
1113CONFIG_USB_VIDEO_CLASS=m
1114CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
1115CONFIG_USB_GSPCA=m
1116CONFIG_USB_M5602=m
1117CONFIG_USB_GSPCA_CONEX=m
1118CONFIG_USB_GSPCA_ETOMS=m
1119CONFIG_USB_GSPCA_FINEPIX=m
1120CONFIG_USB_GSPCA_MARS=m
1121CONFIG_USB_GSPCA_OV519=m
1122CONFIG_USB_GSPCA_PAC207=m
1123CONFIG_USB_GSPCA_PAC7311=m
1124CONFIG_USB_GSPCA_SONIXB=m
1125CONFIG_USB_GSPCA_SONIXJ=m
1126CONFIG_USB_GSPCA_SPCA500=m
1127CONFIG_USB_GSPCA_SPCA501=m
1128CONFIG_USB_GSPCA_SPCA505=m
1129CONFIG_USB_GSPCA_SPCA506=m
1130CONFIG_USB_GSPCA_SPCA508=m
1131CONFIG_USB_GSPCA_SPCA561=m
1132CONFIG_USB_GSPCA_STK014=m
1133CONFIG_USB_GSPCA_SUNPLUS=m
1134CONFIG_USB_GSPCA_T613=m
1135CONFIG_USB_GSPCA_TV8532=m
1136CONFIG_USB_GSPCA_VC032X=m
1137CONFIG_USB_GSPCA_ZC3XX=m
1138# CONFIG_VIDEO_PVRUSB2 is not set
1139# CONFIG_VIDEO_EM28XX is not set
1140# CONFIG_VIDEO_USBVISION is not set
1141CONFIG_VIDEO_USBVIDEO=m
1142CONFIG_USB_VICAM=m
1143CONFIG_USB_IBMCAM=m
1144CONFIG_USB_KONICAWC=m
1145CONFIG_USB_QUICKCAM_MESSENGER=m
1146CONFIG_USB_ET61X251=m
1147# CONFIG_VIDEO_OVCAMCHIP is not set
1148CONFIG_USB_OV511=m
1149CONFIG_USB_SE401=m
1150CONFIG_USB_SN9C102=m
1151CONFIG_USB_STV680=m
1152CONFIG_USB_ZC0301=m
1153CONFIG_USB_PWC=m
1154# CONFIG_USB_PWC_DEBUG is not set
1155# CONFIG_USB_ZR364XX is not set
1156CONFIG_USB_STKWEBCAM=m
1157CONFIG_USB_S2255=m
1158CONFIG_RADIO_ADAPTERS=y
1159# CONFIG_RADIO_CADET is not set
1160# CONFIG_RADIO_RTRACK is not set
1161# CONFIG_RADIO_RTRACK2 is not set
1162# CONFIG_RADIO_AZTECH is not set
1163# CONFIG_RADIO_GEMTEK is not set
1164# CONFIG_RADIO_GEMTEK_PCI is not set
1165# CONFIG_RADIO_MAXIRADIO is not set
1166# CONFIG_RADIO_MAESTRO is not set
1167# CONFIG_RADIO_SF16FMI is not set
1168# CONFIG_RADIO_SF16FMR2 is not set
1169# CONFIG_RADIO_TERRATEC is not set
1170# CONFIG_RADIO_TRUST is not set
1171# CONFIG_RADIO_TYPHOON is not set
1172# CONFIG_RADIO_ZOLTRIX is not set
1173# CONFIG_USB_DSBR is not set
1174CONFIG_USB_SI470X=m
1175CONFIG_USB_MR800=m
1176CONFIG_DAB=y
1177# CONFIG_USB_DABUSB is not set
1178 1113
1179# 1114#
1180# Graphics support 1115# Graphics support
@@ -1235,12 +1170,13 @@ CONFIG_FB_RADEON_BACKLIGHT=y
1235# CONFIG_FB_VIRTUAL is not set 1170# CONFIG_FB_VIRTUAL is not set
1236# CONFIG_FB_METRONOME is not set 1171# CONFIG_FB_METRONOME is not set
1237# CONFIG_FB_MB862XX is not set 1172# CONFIG_FB_MB862XX is not set
1173# CONFIG_FB_BROADSHEET is not set
1238CONFIG_BACKLIGHT_LCD_SUPPORT=y 1174CONFIG_BACKLIGHT_LCD_SUPPORT=y
1239CONFIG_LCD_CLASS_DEVICE=m 1175CONFIG_LCD_CLASS_DEVICE=m
1240# CONFIG_LCD_ILI9320 is not set 1176# CONFIG_LCD_ILI9320 is not set
1241# CONFIG_LCD_PLATFORM is not set 1177# CONFIG_LCD_PLATFORM is not set
1242CONFIG_BACKLIGHT_CLASS_DEVICE=y 1178CONFIG_BACKLIGHT_CLASS_DEVICE=y
1243# CONFIG_BACKLIGHT_CORGI is not set 1179CONFIG_BACKLIGHT_GENERIC=y
1244 1180
1245# 1181#
1246# Display device support 1182# Display device support
@@ -1273,12 +1209,19 @@ CONFIG_SND_MIXER_OSS=m
1273CONFIG_SND_PCM_OSS=m 1209CONFIG_SND_PCM_OSS=m
1274CONFIG_SND_PCM_OSS_PLUGINS=y 1210CONFIG_SND_PCM_OSS_PLUGINS=y
1275CONFIG_SND_SEQUENCER_OSS=y 1211CONFIG_SND_SEQUENCER_OSS=y
1212# CONFIG_SND_HRTIMER is not set
1213# CONFIG_SND_RTCTIMER is not set
1276# CONFIG_SND_DYNAMIC_MINORS is not set 1214# CONFIG_SND_DYNAMIC_MINORS is not set
1277CONFIG_SND_SUPPORT_OLD_API=y 1215CONFIG_SND_SUPPORT_OLD_API=y
1278CONFIG_SND_VERBOSE_PROCFS=y 1216CONFIG_SND_VERBOSE_PROCFS=y
1279# CONFIG_SND_VERBOSE_PRINTK is not set 1217# CONFIG_SND_VERBOSE_PRINTK is not set
1280# CONFIG_SND_DEBUG is not set 1218# CONFIG_SND_DEBUG is not set
1281CONFIG_SND_VMASTER=y 1219CONFIG_SND_VMASTER=y
1220CONFIG_SND_RAWMIDI_SEQ=m
1221# CONFIG_SND_OPL3_LIB_SEQ is not set
1222# CONFIG_SND_OPL4_LIB_SEQ is not set
1223# CONFIG_SND_SBAWE_SEQ is not set
1224# CONFIG_SND_EMU10K1_SEQ is not set
1282CONFIG_SND_MPU401_UART=m 1225CONFIG_SND_MPU401_UART=m
1283CONFIG_SND_AC97_CODEC=m 1226CONFIG_SND_AC97_CODEC=m
1284CONFIG_SND_DRIVERS=y 1227CONFIG_SND_DRIVERS=y
@@ -1305,6 +1248,7 @@ CONFIG_SND_PCI=y
1305# CONFIG_SND_OXYGEN is not set 1248# CONFIG_SND_OXYGEN is not set
1306# CONFIG_SND_CS4281 is not set 1249# CONFIG_SND_CS4281 is not set
1307# CONFIG_SND_CS46XX is not set 1250# CONFIG_SND_CS46XX is not set
1251# CONFIG_SND_CTXFI is not set
1308# CONFIG_SND_DARLA20 is not set 1252# CONFIG_SND_DARLA20 is not set
1309# CONFIG_SND_GINA20 is not set 1253# CONFIG_SND_GINA20 is not set
1310# CONFIG_SND_LAYLA20 is not set 1254# CONFIG_SND_LAYLA20 is not set
@@ -1317,6 +1261,8 @@ CONFIG_SND_PCI=y
1317# CONFIG_SND_INDIGO is not set 1261# CONFIG_SND_INDIGO is not set
1318# CONFIG_SND_INDIGOIO is not set 1262# CONFIG_SND_INDIGOIO is not set
1319# CONFIG_SND_INDIGODJ is not set 1263# CONFIG_SND_INDIGODJ is not set
1264# CONFIG_SND_INDIGOIOX is not set
1265# CONFIG_SND_INDIGODJX is not set
1320# CONFIG_SND_EMU10K1 is not set 1266# CONFIG_SND_EMU10K1 is not set
1321# CONFIG_SND_EMU10K1X is not set 1267# CONFIG_SND_EMU10K1X is not set
1322# CONFIG_SND_ENS1370 is not set 1268# CONFIG_SND_ENS1370 is not set
@@ -1333,6 +1279,7 @@ CONFIG_SND_PCI=y
1333# CONFIG_SND_INTEL8X0 is not set 1279# CONFIG_SND_INTEL8X0 is not set
1334# CONFIG_SND_INTEL8X0M is not set 1280# CONFIG_SND_INTEL8X0M is not set
1335# CONFIG_SND_KORG1212 is not set 1281# CONFIG_SND_KORG1212 is not set
1282# CONFIG_SND_LX6464ES is not set
1336# CONFIG_SND_MAESTRO3 is not set 1283# CONFIG_SND_MAESTRO3 is not set
1337# CONFIG_SND_MIXART is not set 1284# CONFIG_SND_MIXART is not set
1338# CONFIG_SND_NM256 is not set 1285# CONFIG_SND_NM256 is not set
@@ -1363,43 +1310,18 @@ CONFIG_HIDRAW=y
1363# 1310#
1364# USB Input Devices 1311# USB Input Devices
1365# 1312#
1366CONFIG_USB_HID=m 1313# CONFIG_USB_HID is not set
1367CONFIG_HID_PID=y 1314CONFIG_HID_PID=y
1368CONFIG_USB_HIDDEV=y
1369 1315
1370# 1316#
1371# USB HID Boot Protocol drivers 1317# USB HID Boot Protocol drivers
1372# 1318#
1373# CONFIG_USB_KBD is not set 1319CONFIG_USB_KBD=y
1374# CONFIG_USB_MOUSE is not set 1320CONFIG_USB_MOUSE=y
1375 1321
1376# 1322#
1377# Special HID drivers 1323# Special HID drivers
1378# 1324#
1379CONFIG_HID_COMPAT=y
1380CONFIG_HID_A4TECH=m
1381CONFIG_HID_APPLE=m
1382CONFIG_HID_BELKIN=m
1383CONFIG_HID_BRIGHT=m
1384CONFIG_HID_CHERRY=m
1385CONFIG_HID_CHICONY=m
1386CONFIG_HID_CYPRESS=m
1387CONFIG_HID_DELL=m
1388CONFIG_HID_EZKEY=m
1389CONFIG_HID_GYRATION=m
1390CONFIG_HID_LOGITECH=m
1391CONFIG_LOGITECH_FF=y
1392CONFIG_LOGIRUMBLEPAD2_FF=y
1393CONFIG_HID_MICROSOFT=m
1394CONFIG_HID_MONTEREY=m
1395CONFIG_HID_PANTHERLORD=m
1396# CONFIG_PANTHERLORD_FF is not set
1397CONFIG_HID_PETALYNX=m
1398CONFIG_HID_SAMSUNG=m
1399CONFIG_HID_SONY=m
1400CONFIG_HID_SUNPLUS=m
1401# CONFIG_THRUSTMASTER_FF is not set
1402CONFIG_ZEROPLUS_FF=m
1403CONFIG_USB_SUPPORT=y 1325CONFIG_USB_SUPPORT=y
1404CONFIG_USB_ARCH_HAS_HCD=y 1326CONFIG_USB_ARCH_HAS_HCD=y
1405CONFIG_USB_ARCH_HAS_OHCI=y 1327CONFIG_USB_ARCH_HAS_OHCI=y
@@ -1427,9 +1349,11 @@ CONFIG_USB_WUSB_CBAF=m
1427# USB Host Controller Drivers 1349# USB Host Controller Drivers
1428# 1350#
1429CONFIG_USB_C67X00_HCD=m 1351CONFIG_USB_C67X00_HCD=m
1352# CONFIG_USB_XHCI_HCD is not set
1430CONFIG_USB_EHCI_HCD=y 1353CONFIG_USB_EHCI_HCD=y
1431CONFIG_USB_EHCI_ROOT_HUB_TT=y 1354CONFIG_USB_EHCI_ROOT_HUB_TT=y
1432CONFIG_USB_EHCI_TT_NEWSCHED=y 1355CONFIG_USB_EHCI_TT_NEWSCHED=y
1356# CONFIG_USB_OXU210HP_HCD is not set
1433# CONFIG_USB_ISP116X_HCD is not set 1357# CONFIG_USB_ISP116X_HCD is not set
1434CONFIG_USB_ISP1760_HCD=m 1358CONFIG_USB_ISP1760_HCD=m
1435CONFIG_USB_OHCI_HCD=y 1359CONFIG_USB_OHCI_HCD=y
@@ -1451,18 +1375,17 @@ CONFIG_USB_WDM=m
1451CONFIG_USB_TMC=m 1375CONFIG_USB_TMC=m
1452 1376
1453# 1377#
1454# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; 1378# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
1455# 1379#
1456 1380
1457# 1381#
1458# see USB_STORAGE Help for more information 1382# also be needed; see USB_STORAGE Help for more info
1459# 1383#
1460CONFIG_USB_STORAGE=y 1384CONFIG_USB_STORAGE=y
1461# CONFIG_USB_STORAGE_DEBUG is not set 1385# CONFIG_USB_STORAGE_DEBUG is not set
1462# CONFIG_USB_STORAGE_DATAFAB is not set 1386# CONFIG_USB_STORAGE_DATAFAB is not set
1463# CONFIG_USB_STORAGE_FREECOM is not set 1387# CONFIG_USB_STORAGE_FREECOM is not set
1464# CONFIG_USB_STORAGE_ISD200 is not set 1388# CONFIG_USB_STORAGE_ISD200 is not set
1465# CONFIG_USB_STORAGE_DPCM is not set
1466# CONFIG_USB_STORAGE_USBAT is not set 1389# CONFIG_USB_STORAGE_USBAT is not set
1467# CONFIG_USB_STORAGE_SDDR09 is not set 1390# CONFIG_USB_STORAGE_SDDR09 is not set
1468# CONFIG_USB_STORAGE_SDDR55 is not set 1391# CONFIG_USB_STORAGE_SDDR55 is not set
@@ -1498,7 +1421,6 @@ CONFIG_USB_SEVSEG=m
1498# CONFIG_USB_LED is not set 1421# CONFIG_USB_LED is not set
1499# CONFIG_USB_CYPRESS_CY7C63 is not set 1422# CONFIG_USB_CYPRESS_CY7C63 is not set
1500# CONFIG_USB_CYTHERM is not set 1423# CONFIG_USB_CYTHERM is not set
1501# CONFIG_USB_PHIDGET is not set
1502# CONFIG_USB_IDMOUSE is not set 1424# CONFIG_USB_IDMOUSE is not set
1503# CONFIG_USB_FTDI_ELAN is not set 1425# CONFIG_USB_FTDI_ELAN is not set
1504# CONFIG_USB_APPLEDISPLAY is not set 1426# CONFIG_USB_APPLEDISPLAY is not set
@@ -1510,72 +1432,32 @@ CONFIG_USB_SEVSEG=m
1510CONFIG_USB_ISIGHTFW=m 1432CONFIG_USB_ISIGHTFW=m
1511CONFIG_USB_VST=m 1433CONFIG_USB_VST=m
1512# CONFIG_USB_GADGET is not set 1434# CONFIG_USB_GADGET is not set
1435
1436#
1437# OTG and related infrastructure
1438#
1439# CONFIG_NOP_USB_XCEIV is not set
1513# CONFIG_UWB is not set 1440# CONFIG_UWB is not set
1514# CONFIG_MMC is not set 1441# CONFIG_MMC is not set
1515# CONFIG_MEMSTICK is not set 1442# CONFIG_MEMSTICK is not set
1516# CONFIG_NEW_LEDS is not set 1443# CONFIG_NEW_LEDS is not set
1517# CONFIG_ACCESSIBILITY is not set 1444# CONFIG_ACCESSIBILITY is not set
1518# CONFIG_INFINIBAND is not set 1445# CONFIG_INFINIBAND is not set
1519CONFIG_RTC_LIB=y 1446# CONFIG_RTC_CLASS is not set
1520CONFIG_RTC_CLASS=m
1521
1522#
1523# RTC interfaces
1524#
1525CONFIG_RTC_INTF_SYSFS=y
1526CONFIG_RTC_INTF_PROC=y
1527CONFIG_RTC_INTF_DEV=y
1528CONFIG_RTC_INTF_DEV_UIE_EMUL=y
1529# CONFIG_RTC_DRV_TEST is not set
1530
1531#
1532# I2C RTC drivers
1533#
1534# CONFIG_RTC_DRV_DS1307 is not set
1535# CONFIG_RTC_DRV_DS1374 is not set
1536# CONFIG_RTC_DRV_DS1672 is not set
1537# CONFIG_RTC_DRV_MAX6900 is not set
1538# CONFIG_RTC_DRV_RS5C372 is not set
1539# CONFIG_RTC_DRV_ISL1208 is not set
1540# CONFIG_RTC_DRV_X1205 is not set
1541# CONFIG_RTC_DRV_PCF8563 is not set
1542# CONFIG_RTC_DRV_PCF8583 is not set
1543# CONFIG_RTC_DRV_M41T80 is not set
1544# CONFIG_RTC_DRV_S35390A is not set
1545# CONFIG_RTC_DRV_FM3130 is not set
1546# CONFIG_RTC_DRV_RX8581 is not set
1547
1548#
1549# SPI RTC drivers
1550#
1551
1552#
1553# Platform RTC drivers
1554#
1555CONFIG_RTC_DRV_CMOS=m
1556# CONFIG_RTC_DRV_DS1286 is not set
1557# CONFIG_RTC_DRV_DS1511 is not set
1558# CONFIG_RTC_DRV_DS1553 is not set
1559# CONFIG_RTC_DRV_DS1742 is not set
1560# CONFIG_RTC_DRV_STK17TA8 is not set
1561# CONFIG_RTC_DRV_M48T86 is not set
1562# CONFIG_RTC_DRV_M48T35 is not set
1563# CONFIG_RTC_DRV_M48T59 is not set
1564# CONFIG_RTC_DRV_BQ4802 is not set
1565# CONFIG_RTC_DRV_V3020 is not set
1566
1567#
1568# on-CPU RTC drivers
1569#
1570# CONFIG_DMADEVICES is not set 1447# CONFIG_DMADEVICES is not set
1448# CONFIG_AUXDISPLAY is not set
1571CONFIG_UIO=m 1449CONFIG_UIO=m
1572CONFIG_UIO_CIF=m 1450CONFIG_UIO_CIF=m
1573# CONFIG_UIO_PDRV is not set 1451# CONFIG_UIO_PDRV is not set
1574# CONFIG_UIO_PDRV_GENIRQ is not set 1452# CONFIG_UIO_PDRV_GENIRQ is not set
1575# CONFIG_UIO_SMX is not set 1453# CONFIG_UIO_SMX is not set
1454# CONFIG_UIO_AEC is not set
1576# CONFIG_UIO_SERCOS3 is not set 1455# CONFIG_UIO_SERCOS3 is not set
1456
1457#
1458# TI VLYNQ
1459#
1577# CONFIG_STAGING is not set 1460# CONFIG_STAGING is not set
1578CONFIG_STAGING_EXCLUDE_BUILD=y
1579 1461
1580# 1462#
1581# File systems 1463# File systems
@@ -1584,6 +1466,7 @@ CONFIG_EXT2_FS=y
1584# CONFIG_EXT2_FS_XATTR is not set 1466# CONFIG_EXT2_FS_XATTR is not set
1585CONFIG_EXT2_FS_XIP=y 1467CONFIG_EXT2_FS_XIP=y
1586CONFIG_EXT3_FS=y 1468CONFIG_EXT3_FS=y
1469# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
1587# CONFIG_EXT3_FS_XATTR is not set 1470# CONFIG_EXT3_FS_XATTR is not set
1588CONFIG_EXT4_FS=m 1471CONFIG_EXT4_FS=m
1589CONFIG_EXT4DEV_COMPAT=y 1472CONFIG_EXT4DEV_COMPAT=y
@@ -1592,7 +1475,9 @@ CONFIG_EXT4_FS_POSIX_ACL=y
1592CONFIG_EXT4_FS_SECURITY=y 1475CONFIG_EXT4_FS_SECURITY=y
1593CONFIG_FS_XIP=y 1476CONFIG_FS_XIP=y
1594CONFIG_JBD=y 1477CONFIG_JBD=y
1478# CONFIG_JBD_DEBUG is not set
1595CONFIG_JBD2=m 1479CONFIG_JBD2=m
1480# CONFIG_JBD2_DEBUG is not set
1596CONFIG_FS_MBCACHE=m 1481CONFIG_FS_MBCACHE=m
1597CONFIG_REISERFS_FS=m 1482CONFIG_REISERFS_FS=m
1598# CONFIG_REISERFS_CHECK is not set 1483# CONFIG_REISERFS_CHECK is not set
@@ -1600,10 +1485,12 @@ CONFIG_REISERFS_FS=m
1600# CONFIG_REISERFS_FS_XATTR is not set 1485# CONFIG_REISERFS_FS_XATTR is not set
1601# CONFIG_JFS_FS is not set 1486# CONFIG_JFS_FS is not set
1602CONFIG_FS_POSIX_ACL=y 1487CONFIG_FS_POSIX_ACL=y
1603CONFIG_FILE_LOCKING=y
1604# CONFIG_XFS_FS is not set 1488# CONFIG_XFS_FS is not set
1605# CONFIG_GFS2_FS is not set 1489# CONFIG_GFS2_FS is not set
1606# CONFIG_OCFS2_FS is not set 1490# CONFIG_OCFS2_FS is not set
1491# CONFIG_BTRFS_FS is not set
1492CONFIG_FILE_LOCKING=y
1493CONFIG_FSNOTIFY=y
1607CONFIG_DNOTIFY=y 1494CONFIG_DNOTIFY=y
1608CONFIG_INOTIFY=y 1495CONFIG_INOTIFY=y
1609CONFIG_INOTIFY_USER=y 1496CONFIG_INOTIFY_USER=y
@@ -1611,6 +1498,12 @@ CONFIG_INOTIFY_USER=y
1611CONFIG_AUTOFS_FS=y 1498CONFIG_AUTOFS_FS=y
1612CONFIG_AUTOFS4_FS=y 1499CONFIG_AUTOFS4_FS=y
1613CONFIG_FUSE_FS=y 1500CONFIG_FUSE_FS=y
1501# CONFIG_CUSE is not set
1502
1503#
1504# Caches
1505#
1506# CONFIG_FSCACHE is not set
1614 1507
1615# 1508#
1616# CD-ROM/DVD Filesystems 1509# CD-ROM/DVD Filesystems
@@ -1645,10 +1538,7 @@ CONFIG_TMPFS=y
1645# CONFIG_TMPFS_POSIX_ACL is not set 1538# CONFIG_TMPFS_POSIX_ACL is not set
1646# CONFIG_HUGETLB_PAGE is not set 1539# CONFIG_HUGETLB_PAGE is not set
1647# CONFIG_CONFIGFS_FS is not set 1540# CONFIG_CONFIGFS_FS is not set
1648 1541CONFIG_MISC_FILESYSTEMS=y
1649#
1650# Miscellaneous filesystems
1651#
1652# CONFIG_ADFS_FS is not set 1542# CONFIG_ADFS_FS is not set
1653# CONFIG_AFFS_FS is not set 1543# CONFIG_AFFS_FS is not set
1654# CONFIG_HFS_FS is not set 1544# CONFIG_HFS_FS is not set
@@ -1658,6 +1548,7 @@ CONFIG_TMPFS=y
1658# CONFIG_EFS_FS is not set 1548# CONFIG_EFS_FS is not set
1659# CONFIG_JFFS2_FS is not set 1549# CONFIG_JFFS2_FS is not set
1660# CONFIG_CRAMFS is not set 1550# CONFIG_CRAMFS is not set
1551# CONFIG_SQUASHFS is not set
1661# CONFIG_VXFS_FS is not set 1552# CONFIG_VXFS_FS is not set
1662# CONFIG_MINIX_FS is not set 1553# CONFIG_MINIX_FS is not set
1663CONFIG_OMFS_FS=m 1554CONFIG_OMFS_FS=m
@@ -1666,11 +1557,13 @@ CONFIG_OMFS_FS=m
1666# CONFIG_ROMFS_FS is not set 1557# CONFIG_ROMFS_FS is not set
1667# CONFIG_SYSV_FS is not set 1558# CONFIG_SYSV_FS is not set
1668# CONFIG_UFS_FS is not set 1559# CONFIG_UFS_FS is not set
1560# CONFIG_NILFS2_FS is not set
1669CONFIG_NETWORK_FILESYSTEMS=y 1561CONFIG_NETWORK_FILESYSTEMS=y
1670CONFIG_NFS_FS=m 1562CONFIG_NFS_FS=m
1671CONFIG_NFS_V3=y 1563CONFIG_NFS_V3=y
1672CONFIG_NFS_V3_ACL=y 1564CONFIG_NFS_V3_ACL=y
1673CONFIG_NFS_V4=y 1565CONFIG_NFS_V4=y
1566# CONFIG_NFS_V4_1 is not set
1674CONFIG_NFSD=m 1567CONFIG_NFSD=m
1675CONFIG_NFSD_V2_ACL=y 1568CONFIG_NFSD_V2_ACL=y
1676CONFIG_NFSD_V3=y 1569CONFIG_NFSD_V3=y
@@ -1683,7 +1576,6 @@ CONFIG_NFS_ACL_SUPPORT=m
1683CONFIG_NFS_COMMON=y 1576CONFIG_NFS_COMMON=y
1684CONFIG_SUNRPC=m 1577CONFIG_SUNRPC=m
1685CONFIG_SUNRPC_GSS=m 1578CONFIG_SUNRPC_GSS=m
1686# CONFIG_SUNRPC_REGISTER_V4 is not set
1687CONFIG_RPCSEC_GSS_KRB5=m 1579CONFIG_RPCSEC_GSS_KRB5=m
1688# CONFIG_RPCSEC_GSS_SPKM3 is not set 1580# CONFIG_RPCSEC_GSS_SPKM3 is not set
1689CONFIG_SMB_FS=m 1581CONFIG_SMB_FS=m
@@ -1775,17 +1667,21 @@ CONFIG_ENABLE_WARN_DEPRECATED=y
1775CONFIG_FRAME_WARN=2048 1667CONFIG_FRAME_WARN=2048
1776# CONFIG_MAGIC_SYSRQ is not set 1668# CONFIG_MAGIC_SYSRQ is not set
1777# CONFIG_UNUSED_SYMBOLS is not set 1669# CONFIG_UNUSED_SYMBOLS is not set
1778# CONFIG_DEBUG_FS is not set 1670CONFIG_DEBUG_FS=y
1779# CONFIG_HEADERS_CHECK is not set 1671# CONFIG_HEADERS_CHECK is not set
1780# CONFIG_DEBUG_KERNEL is not set 1672# CONFIG_DEBUG_KERNEL is not set
1673CONFIG_STACKTRACE=y
1781# CONFIG_DEBUG_MEMORY_INIT is not set 1674# CONFIG_DEBUG_MEMORY_INIT is not set
1782# CONFIG_RCU_CPU_STALL_DETECTOR is not set 1675# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1783CONFIG_SYSCTL_SYSCALL_CHECK=y 1676CONFIG_SYSCTL_SYSCALL_CHECK=y
1784 1677CONFIG_NOP_TRACER=y
1785# 1678CONFIG_RING_BUFFER=y
1786# Tracers 1679CONFIG_EVENT_TRACING=y
1787# 1680CONFIG_CONTEXT_SWITCH_TRACER=y
1788CONFIG_DYNAMIC_PRINTK_DEBUG=y 1681CONFIG_TRACING=y
1682CONFIG_TRACING_SUPPORT=y
1683# CONFIG_FTRACE is not set
1684# CONFIG_DYNAMIC_DEBUG is not set
1789# CONFIG_SAMPLES is not set 1685# CONFIG_SAMPLES is not set
1790CONFIG_HAVE_ARCH_KGDB=y 1686CONFIG_HAVE_ARCH_KGDB=y
1791CONFIG_CMDLINE="" 1687CONFIG_CMDLINE=""
@@ -1804,13 +1700,21 @@ CONFIG_CRYPTO=y
1804# 1700#
1805CONFIG_CRYPTO_FIPS=y 1701CONFIG_CRYPTO_FIPS=y
1806CONFIG_CRYPTO_ALGAPI=y 1702CONFIG_CRYPTO_ALGAPI=y
1807CONFIG_CRYPTO_AEAD=y 1703CONFIG_CRYPTO_ALGAPI2=y
1808CONFIG_CRYPTO_BLKCIPHER=y 1704CONFIG_CRYPTO_AEAD=m
1705CONFIG_CRYPTO_AEAD2=y
1706CONFIG_CRYPTO_BLKCIPHER=m
1707CONFIG_CRYPTO_BLKCIPHER2=y
1809CONFIG_CRYPTO_HASH=y 1708CONFIG_CRYPTO_HASH=y
1810CONFIG_CRYPTO_RNG=y 1709CONFIG_CRYPTO_HASH2=y
1710CONFIG_CRYPTO_RNG=m
1711CONFIG_CRYPTO_RNG2=y
1712CONFIG_CRYPTO_PCOMP=y
1811CONFIG_CRYPTO_MANAGER=y 1713CONFIG_CRYPTO_MANAGER=y
1714CONFIG_CRYPTO_MANAGER2=y
1812CONFIG_CRYPTO_GF128MUL=m 1715CONFIG_CRYPTO_GF128MUL=m
1813# CONFIG_CRYPTO_NULL is not set 1716# CONFIG_CRYPTO_NULL is not set
1717CONFIG_CRYPTO_WORKQUEUE=y
1814# CONFIG_CRYPTO_CRYPTD is not set 1718# CONFIG_CRYPTO_CRYPTD is not set
1815CONFIG_CRYPTO_AUTHENC=m 1719CONFIG_CRYPTO_AUTHENC=m
1816# CONFIG_CRYPTO_TEST is not set 1720# CONFIG_CRYPTO_TEST is not set
@@ -1879,6 +1783,7 @@ CONFIG_CRYPTO_SEED=m
1879# Compression 1783# Compression
1880# 1784#
1881CONFIG_CRYPTO_DEFLATE=m 1785CONFIG_CRYPTO_DEFLATE=m
1786# CONFIG_CRYPTO_ZLIB is not set
1882CONFIG_CRYPTO_LZO=m 1787CONFIG_CRYPTO_LZO=m
1883 1788
1884# 1789#
@@ -1886,11 +1791,13 @@ CONFIG_CRYPTO_LZO=m
1886# 1791#
1887CONFIG_CRYPTO_ANSI_CPRNG=m 1792CONFIG_CRYPTO_ANSI_CPRNG=m
1888# CONFIG_CRYPTO_HW is not set 1793# CONFIG_CRYPTO_HW is not set
1794CONFIG_BINARY_PRINTF=y
1889 1795
1890# 1796#
1891# Library routines 1797# Library routines
1892# 1798#
1893CONFIG_BITREVERSE=y 1799CONFIG_BITREVERSE=y
1800CONFIG_GENERIC_FIND_LAST_BIT=y
1894CONFIG_CRC_CCITT=y 1801CONFIG_CRC_CCITT=y
1895CONFIG_CRC16=m 1802CONFIG_CRC16=m
1896# CONFIG_CRC_T10DIF is not set 1803# CONFIG_CRC_T10DIF is not set
@@ -1906,7 +1813,7 @@ CONFIG_TEXTSEARCH=y
1906CONFIG_TEXTSEARCH_KMP=m 1813CONFIG_TEXTSEARCH_KMP=m
1907CONFIG_TEXTSEARCH_BM=m 1814CONFIG_TEXTSEARCH_BM=m
1908CONFIG_TEXTSEARCH_FSM=m 1815CONFIG_TEXTSEARCH_FSM=m
1909CONFIG_PLIST=y
1910CONFIG_HAS_IOMEM=y 1816CONFIG_HAS_IOMEM=y
1911CONFIG_HAS_IOPORT=y 1817CONFIG_HAS_IOPORT=y
1912CONFIG_HAS_DMA=y 1818CONFIG_HAS_DMA=y
1819CONFIG_NLATTR=y
diff --git a/arch/mips/configs/ip22_defconfig b/arch/mips/configs/ip22_defconfig
index 115822876417..f14d38ba6034 100644
--- a/arch/mips/configs/ip22_defconfig
+++ b/arch/mips/configs/ip22_defconfig
@@ -130,7 +130,6 @@ CONFIG_IP22_CPU_SCACHE=y
130CONFIG_MIPS_MT_DISABLED=y 130CONFIG_MIPS_MT_DISABLED=y
131# CONFIG_MIPS_MT_SMP is not set 131# CONFIG_MIPS_MT_SMP is not set
132# CONFIG_MIPS_MT_SMTC is not set 132# CONFIG_MIPS_MT_SMTC is not set
133CONFIG_CPU_HAS_LLSC=y
134CONFIG_CPU_HAS_SYNC=y 133CONFIG_CPU_HAS_SYNC=y
135CONFIG_GENERIC_HARDIRQS=y 134CONFIG_GENERIC_HARDIRQS=y
136CONFIG_GENERIC_IRQ_PROBE=y 135CONFIG_GENERIC_IRQ_PROBE=y
diff --git a/arch/mips/configs/ip27_defconfig b/arch/mips/configs/ip27_defconfig
index 0208723adf28..1fc73aa7b509 100644
--- a/arch/mips/configs/ip27_defconfig
+++ b/arch/mips/configs/ip27_defconfig
@@ -105,7 +105,6 @@ CONFIG_CPU_HAS_PREFETCH=y
105CONFIG_MIPS_MT_DISABLED=y 105CONFIG_MIPS_MT_DISABLED=y
106# CONFIG_MIPS_MT_SMP is not set 106# CONFIG_MIPS_MT_SMP is not set
107# CONFIG_MIPS_MT_SMTC is not set 107# CONFIG_MIPS_MT_SMTC is not set
108CONFIG_CPU_HAS_LLSC=y
109CONFIG_CPU_HAS_SYNC=y 108CONFIG_CPU_HAS_SYNC=y
110CONFIG_GENERIC_HARDIRQS=y 109CONFIG_GENERIC_HARDIRQS=y
111CONFIG_GENERIC_IRQ_PROBE=y 110CONFIG_GENERIC_IRQ_PROBE=y
diff --git a/arch/mips/configs/ip28_defconfig b/arch/mips/configs/ip28_defconfig
index 70a744e9a8c5..539dccb0345d 100644
--- a/arch/mips/configs/ip28_defconfig
+++ b/arch/mips/configs/ip28_defconfig
@@ -123,7 +123,6 @@ CONFIG_CPU_HAS_PREFETCH=y
123CONFIG_MIPS_MT_DISABLED=y 123CONFIG_MIPS_MT_DISABLED=y
124# CONFIG_MIPS_MT_SMP is not set 124# CONFIG_MIPS_MT_SMP is not set
125# CONFIG_MIPS_MT_SMTC is not set 125# CONFIG_MIPS_MT_SMTC is not set
126CONFIG_CPU_HAS_LLSC=y
127CONFIG_CPU_HAS_SYNC=y 126CONFIG_CPU_HAS_SYNC=y
128CONFIG_GENERIC_HARDIRQS=y 127CONFIG_GENERIC_HARDIRQS=y
129CONFIG_GENERIC_IRQ_PROBE=y 128CONFIG_GENERIC_IRQ_PROBE=y
diff --git a/arch/mips/configs/ip32_defconfig b/arch/mips/configs/ip32_defconfig
index de4c7a0a96dd..d934bdefb393 100644
--- a/arch/mips/configs/ip32_defconfig
+++ b/arch/mips/configs/ip32_defconfig
@@ -118,7 +118,6 @@ CONFIG_RM7000_CPU_SCACHE=y
118CONFIG_MIPS_MT_DISABLED=y 118CONFIG_MIPS_MT_DISABLED=y
119# CONFIG_MIPS_MT_SMP is not set 119# CONFIG_MIPS_MT_SMP is not set
120# CONFIG_MIPS_MT_SMTC is not set 120# CONFIG_MIPS_MT_SMTC is not set
121CONFIG_CPU_HAS_LLSC=y
122CONFIG_CPU_HAS_SYNC=y 121CONFIG_CPU_HAS_SYNC=y
123CONFIG_GENERIC_HARDIRQS=y 122CONFIG_GENERIC_HARDIRQS=y
124CONFIG_GENERIC_IRQ_PROBE=y 123CONFIG_GENERIC_IRQ_PROBE=y
diff --git a/arch/mips/configs/jazz_defconfig b/arch/mips/configs/jazz_defconfig
index bbacc35d804f..d22df61833a8 100644
--- a/arch/mips/configs/jazz_defconfig
+++ b/arch/mips/configs/jazz_defconfig
@@ -119,7 +119,6 @@ CONFIG_MIPS_MT_DISABLED=y
119# CONFIG_MIPS_MT_SMTC is not set 119# CONFIG_MIPS_MT_SMTC is not set
120# CONFIG_MIPS_VPE_LOADER is not set 120# CONFIG_MIPS_VPE_LOADER is not set
121# CONFIG_64BIT_PHYS_ADDR is not set 121# CONFIG_64BIT_PHYS_ADDR is not set
122CONFIG_CPU_HAS_LLSC=y
123CONFIG_CPU_HAS_SYNC=y 122CONFIG_CPU_HAS_SYNC=y
124CONFIG_GENERIC_HARDIRQS=y 123CONFIG_GENERIC_HARDIRQS=y
125CONFIG_GENERIC_IRQ_PROBE=y 124CONFIG_GENERIC_IRQ_PROBE=y
diff --git a/arch/mips/configs/lasat_defconfig b/arch/mips/configs/lasat_defconfig
index bc9159fda728..044074db7e55 100644
--- a/arch/mips/configs/lasat_defconfig
+++ b/arch/mips/configs/lasat_defconfig
@@ -108,7 +108,6 @@ CONFIG_R5000_CPU_SCACHE=y
108CONFIG_MIPS_MT_DISABLED=y 108CONFIG_MIPS_MT_DISABLED=y
109# CONFIG_MIPS_MT_SMP is not set 109# CONFIG_MIPS_MT_SMP is not set
110# CONFIG_MIPS_MT_SMTC is not set 110# CONFIG_MIPS_MT_SMTC is not set
111CONFIG_CPU_HAS_LLSC=y
112CONFIG_CPU_HAS_SYNC=y 111CONFIG_CPU_HAS_SYNC=y
113CONFIG_GENERIC_HARDIRQS=y 112CONFIG_GENERIC_HARDIRQS=y
114CONFIG_GENERIC_IRQ_PROBE=y 113CONFIG_GENERIC_IRQ_PROBE=y
diff --git a/arch/mips/configs/malta_defconfig b/arch/mips/configs/malta_defconfig
index 1ecdd3b65dc7..3f01870b4d65 100644
--- a/arch/mips/configs/malta_defconfig
+++ b/arch/mips/configs/malta_defconfig
@@ -139,7 +139,6 @@ CONFIG_SYS_SUPPORTS_SCHED_SMT=y
139CONFIG_SYS_SUPPORTS_MULTITHREADING=y 139CONFIG_SYS_SUPPORTS_MULTITHREADING=y
140CONFIG_MIPS_MT_FPAFF=y 140CONFIG_MIPS_MT_FPAFF=y
141# CONFIG_MIPS_VPE_LOADER is not set 141# CONFIG_MIPS_VPE_LOADER is not set
142CONFIG_CPU_HAS_LLSC=y
143# CONFIG_CPU_HAS_SMARTMIPS is not set 142# CONFIG_CPU_HAS_SMARTMIPS is not set
144CONFIG_CPU_MIPSR2_IRQ_VI=y 143CONFIG_CPU_MIPSR2_IRQ_VI=y
145CONFIG_CPU_MIPSR2_IRQ_EI=y 144CONFIG_CPU_MIPSR2_IRQ_EI=y
diff --git a/arch/mips/configs/markeins_defconfig b/arch/mips/configs/markeins_defconfig
index bad8901f8f3c..d001f7e87418 100644
--- a/arch/mips/configs/markeins_defconfig
+++ b/arch/mips/configs/markeins_defconfig
@@ -112,7 +112,6 @@ CONFIG_MIPS_MT_DISABLED=y
112# CONFIG_MIPS_MT_SMTC is not set 112# CONFIG_MIPS_MT_SMTC is not set
113# CONFIG_MIPS_VPE_LOADER is not set 113# CONFIG_MIPS_VPE_LOADER is not set
114# CONFIG_64BIT_PHYS_ADDR is not set 114# CONFIG_64BIT_PHYS_ADDR is not set
115CONFIG_CPU_HAS_LLSC=y
116CONFIG_CPU_HAS_SYNC=y 115CONFIG_CPU_HAS_SYNC=y
117CONFIG_GENERIC_HARDIRQS=y 116CONFIG_GENERIC_HARDIRQS=y
118CONFIG_GENERIC_IRQ_PROBE=y 117CONFIG_GENERIC_IRQ_PROBE=y
diff --git a/arch/mips/configs/mipssim_defconfig b/arch/mips/configs/mipssim_defconfig
index 2c0a6314e901..7358454deaa6 100644
--- a/arch/mips/configs/mipssim_defconfig
+++ b/arch/mips/configs/mipssim_defconfig
@@ -115,7 +115,6 @@ CONFIG_MIPS_MT_DISABLED=y
115# CONFIG_MIPS_MT_SMTC is not set 115# CONFIG_MIPS_MT_SMTC is not set
116CONFIG_SYS_SUPPORTS_MULTITHREADING=y 116CONFIG_SYS_SUPPORTS_MULTITHREADING=y
117# CONFIG_MIPS_VPE_LOADER is not set 117# CONFIG_MIPS_VPE_LOADER is not set
118CONFIG_CPU_HAS_LLSC=y
119CONFIG_CPU_HAS_SYNC=y 118CONFIG_CPU_HAS_SYNC=y
120CONFIG_GENERIC_HARDIRQS=y 119CONFIG_GENERIC_HARDIRQS=y
121CONFIG_GENERIC_IRQ_PROBE=y 120CONFIG_GENERIC_IRQ_PROBE=y
diff --git a/arch/mips/configs/msp71xx_defconfig b/arch/mips/configs/msp71xx_defconfig
index 84d6491b3d41..ecbc030b7b6c 100644
--- a/arch/mips/configs/msp71xx_defconfig
+++ b/arch/mips/configs/msp71xx_defconfig
@@ -129,7 +129,6 @@ CONFIG_MIPS_MT_DISABLED=y
129# CONFIG_MIPS_VPE_LOADER is not set 129# CONFIG_MIPS_VPE_LOADER is not set
130CONFIG_SYS_SUPPORTS_MULTITHREADING=y 130CONFIG_SYS_SUPPORTS_MULTITHREADING=y
131# CONFIG_64BIT_PHYS_ADDR is not set 131# CONFIG_64BIT_PHYS_ADDR is not set
132CONFIG_CPU_HAS_LLSC=y
133CONFIG_CPU_HAS_SYNC=y 132CONFIG_CPU_HAS_SYNC=y
134CONFIG_GENERIC_HARDIRQS=y 133CONFIG_GENERIC_HARDIRQS=y
135CONFIG_GENERIC_IRQ_PROBE=y 134CONFIG_GENERIC_IRQ_PROBE=y
diff --git a/arch/mips/configs/mtx1_defconfig b/arch/mips/configs/mtx1_defconfig
index fadb351d249b..9477f040796d 100644
--- a/arch/mips/configs/mtx1_defconfig
+++ b/arch/mips/configs/mtx1_defconfig
@@ -116,7 +116,6 @@ CONFIG_MIPS_MT_DISABLED=y
116# CONFIG_MIPS_MT_SMP is not set 116# CONFIG_MIPS_MT_SMP is not set
117# CONFIG_MIPS_MT_SMTC is not set 117# CONFIG_MIPS_MT_SMTC is not set
118CONFIG_64BIT_PHYS_ADDR=y 118CONFIG_64BIT_PHYS_ADDR=y
119CONFIG_CPU_HAS_LLSC=y
120CONFIG_CPU_HAS_SYNC=y 119CONFIG_CPU_HAS_SYNC=y
121CONFIG_GENERIC_HARDIRQS=y 120CONFIG_GENERIC_HARDIRQS=y
122CONFIG_GENERIC_IRQ_PROBE=y 121CONFIG_GENERIC_IRQ_PROBE=y
diff --git a/arch/mips/configs/pb1100_defconfig b/arch/mips/configs/pb1100_defconfig
index 9e21e333a2fc..be8091ef0a79 100644
--- a/arch/mips/configs/pb1100_defconfig
+++ b/arch/mips/configs/pb1100_defconfig
@@ -115,7 +115,6 @@ CONFIG_MIPS_MT_DISABLED=y
115# CONFIG_MIPS_MT_SMTC is not set 115# CONFIG_MIPS_MT_SMTC is not set
116# CONFIG_MIPS_VPE_LOADER is not set 116# CONFIG_MIPS_VPE_LOADER is not set
117CONFIG_64BIT_PHYS_ADDR=y 117CONFIG_64BIT_PHYS_ADDR=y
118CONFIG_CPU_HAS_LLSC=y
119CONFIG_CPU_HAS_SYNC=y 118CONFIG_CPU_HAS_SYNC=y
120CONFIG_GENERIC_HARDIRQS=y 119CONFIG_GENERIC_HARDIRQS=y
121CONFIG_GENERIC_IRQ_PROBE=y 120CONFIG_GENERIC_IRQ_PROBE=y
diff --git a/arch/mips/configs/pb1500_defconfig b/arch/mips/configs/pb1500_defconfig
index af67ed4f71ae..e74ba794c789 100644
--- a/arch/mips/configs/pb1500_defconfig
+++ b/arch/mips/configs/pb1500_defconfig
@@ -114,7 +114,6 @@ CONFIG_MIPS_MT_DISABLED=y
114# CONFIG_MIPS_MT_SMTC is not set 114# CONFIG_MIPS_MT_SMTC is not set
115# CONFIG_MIPS_VPE_LOADER is not set 115# CONFIG_MIPS_VPE_LOADER is not set
116CONFIG_64BIT_PHYS_ADDR=y 116CONFIG_64BIT_PHYS_ADDR=y
117CONFIG_CPU_HAS_LLSC=y
118CONFIG_CPU_HAS_SYNC=y 117CONFIG_CPU_HAS_SYNC=y
119CONFIG_GENERIC_HARDIRQS=y 118CONFIG_GENERIC_HARDIRQS=y
120CONFIG_GENERIC_IRQ_PROBE=y 119CONFIG_GENERIC_IRQ_PROBE=y
diff --git a/arch/mips/configs/pb1550_defconfig b/arch/mips/configs/pb1550_defconfig
index 7956f56cbf3e..1d896fd830da 100644
--- a/arch/mips/configs/pb1550_defconfig
+++ b/arch/mips/configs/pb1550_defconfig
@@ -115,7 +115,6 @@ CONFIG_MIPS_MT_DISABLED=y
115# CONFIG_MIPS_MT_SMTC is not set 115# CONFIG_MIPS_MT_SMTC is not set
116# CONFIG_MIPS_VPE_LOADER is not set 116# CONFIG_MIPS_VPE_LOADER is not set
117CONFIG_64BIT_PHYS_ADDR=y 117CONFIG_64BIT_PHYS_ADDR=y
118CONFIG_CPU_HAS_LLSC=y
119CONFIG_CPU_HAS_SYNC=y 118CONFIG_CPU_HAS_SYNC=y
120CONFIG_GENERIC_HARDIRQS=y 119CONFIG_GENERIC_HARDIRQS=y
121CONFIG_GENERIC_IRQ_PROBE=y 120CONFIG_GENERIC_IRQ_PROBE=y
diff --git a/arch/mips/configs/pnx8335-stb225_defconfig b/arch/mips/configs/pnx8335-stb225_defconfig
index 2728caa6c2fb..fef4d31c2055 100644
--- a/arch/mips/configs/pnx8335-stb225_defconfig
+++ b/arch/mips/configs/pnx8335-stb225_defconfig
@@ -112,7 +112,6 @@ CONFIG_CPU_HAS_PREFETCH=y
112CONFIG_MIPS_MT_DISABLED=y 112CONFIG_MIPS_MT_DISABLED=y
113# CONFIG_MIPS_MT_SMP is not set 113# CONFIG_MIPS_MT_SMP is not set
114# CONFIG_MIPS_MT_SMTC is not set 114# CONFIG_MIPS_MT_SMTC is not set
115CONFIG_CPU_HAS_LLSC=y
116CONFIG_CPU_MIPSR2_IRQ_VI=y 115CONFIG_CPU_MIPSR2_IRQ_VI=y
117CONFIG_CPU_HAS_SYNC=y 116CONFIG_CPU_HAS_SYNC=y
118CONFIG_GENERIC_HARDIRQS=y 117CONFIG_GENERIC_HARDIRQS=y
diff --git a/arch/mips/configs/pnx8550-jbs_defconfig b/arch/mips/configs/pnx8550-jbs_defconfig
index 723bd5176a35..e10c7116c3c2 100644
--- a/arch/mips/configs/pnx8550-jbs_defconfig
+++ b/arch/mips/configs/pnx8550-jbs_defconfig
@@ -112,7 +112,6 @@ CONFIG_MIPS_MT_DISABLED=y
112# CONFIG_MIPS_MT_SMTC is not set 112# CONFIG_MIPS_MT_SMTC is not set
113# CONFIG_MIPS_VPE_LOADER is not set 113# CONFIG_MIPS_VPE_LOADER is not set
114# CONFIG_64BIT_PHYS_ADDR is not set 114# CONFIG_64BIT_PHYS_ADDR is not set
115CONFIG_CPU_HAS_LLSC=y
116CONFIG_CPU_HAS_SYNC=y 115CONFIG_CPU_HAS_SYNC=y
117CONFIG_GENERIC_HARDIRQS=y 116CONFIG_GENERIC_HARDIRQS=y
118CONFIG_GENERIC_IRQ_PROBE=y 117CONFIG_GENERIC_IRQ_PROBE=y
diff --git a/arch/mips/configs/pnx8550-stb810_defconfig b/arch/mips/configs/pnx8550-stb810_defconfig
index b5052fb42e9e..5ed3c8dfa0a1 100644
--- a/arch/mips/configs/pnx8550-stb810_defconfig
+++ b/arch/mips/configs/pnx8550-stb810_defconfig
@@ -112,7 +112,6 @@ CONFIG_MIPS_MT_DISABLED=y
112# CONFIG_MIPS_MT_SMTC is not set 112# CONFIG_MIPS_MT_SMTC is not set
113# CONFIG_MIPS_VPE_LOADER is not set 113# CONFIG_MIPS_VPE_LOADER is not set
114# CONFIG_64BIT_PHYS_ADDR is not set 114# CONFIG_64BIT_PHYS_ADDR is not set
115CONFIG_CPU_HAS_LLSC=y
116CONFIG_CPU_HAS_SYNC=y 115CONFIG_CPU_HAS_SYNC=y
117CONFIG_GENERIC_HARDIRQS=y 116CONFIG_GENERIC_HARDIRQS=y
118CONFIG_GENERIC_IRQ_PROBE=y 117CONFIG_GENERIC_IRQ_PROBE=y
diff --git a/arch/mips/configs/rb532_defconfig b/arch/mips/configs/rb532_defconfig
index f28dc32974e5..f40c3a04739d 100644
--- a/arch/mips/configs/rb532_defconfig
+++ b/arch/mips/configs/rb532_defconfig
@@ -113,7 +113,6 @@ CONFIG_CPU_HAS_PREFETCH=y
113CONFIG_MIPS_MT_DISABLED=y 113CONFIG_MIPS_MT_DISABLED=y
114# CONFIG_MIPS_MT_SMP is not set 114# CONFIG_MIPS_MT_SMP is not set
115# CONFIG_MIPS_MT_SMTC is not set 115# CONFIG_MIPS_MT_SMTC is not set
116CONFIG_CPU_HAS_LLSC=y
117CONFIG_CPU_HAS_SYNC=y 116CONFIG_CPU_HAS_SYNC=y
118CONFIG_GENERIC_HARDIRQS=y 117CONFIG_GENERIC_HARDIRQS=y
119CONFIG_GENERIC_IRQ_PROBE=y 118CONFIG_GENERIC_IRQ_PROBE=y
diff --git a/arch/mips/configs/rbtx49xx_defconfig b/arch/mips/configs/rbtx49xx_defconfig
index 1efe977497dd..c69813b8488c 100644
--- a/arch/mips/configs/rbtx49xx_defconfig
+++ b/arch/mips/configs/rbtx49xx_defconfig
@@ -142,7 +142,6 @@ CONFIG_CPU_HAS_PREFETCH=y
142CONFIG_MIPS_MT_DISABLED=y 142CONFIG_MIPS_MT_DISABLED=y
143# CONFIG_MIPS_MT_SMP is not set 143# CONFIG_MIPS_MT_SMP is not set
144# CONFIG_MIPS_MT_SMTC is not set 144# CONFIG_MIPS_MT_SMTC is not set
145CONFIG_CPU_HAS_LLSC=y
146CONFIG_CPU_HAS_SYNC=y 145CONFIG_CPU_HAS_SYNC=y
147CONFIG_GENERIC_HARDIRQS=y 146CONFIG_GENERIC_HARDIRQS=y
148CONFIG_GENERIC_IRQ_PROBE=y 147CONFIG_GENERIC_IRQ_PROBE=y
diff --git a/arch/mips/configs/rm200_defconfig b/arch/mips/configs/rm200_defconfig
index 0f4da0325ea4..e53b8d096cfc 100644
--- a/arch/mips/configs/rm200_defconfig
+++ b/arch/mips/configs/rm200_defconfig
@@ -124,7 +124,6 @@ CONFIG_MIPS_MT_DISABLED=y
124# CONFIG_MIPS_MT_SMTC is not set 124# CONFIG_MIPS_MT_SMTC is not set
125# CONFIG_MIPS_VPE_LOADER is not set 125# CONFIG_MIPS_VPE_LOADER is not set
126# CONFIG_64BIT_PHYS_ADDR is not set 126# CONFIG_64BIT_PHYS_ADDR is not set
127CONFIG_CPU_HAS_LLSC=y
128CONFIG_CPU_HAS_SYNC=y 127CONFIG_CPU_HAS_SYNC=y
129CONFIG_GENERIC_HARDIRQS=y 128CONFIG_GENERIC_HARDIRQS=y
130CONFIG_GENERIC_IRQ_PROBE=y 129CONFIG_GENERIC_IRQ_PROBE=y
diff --git a/arch/mips/configs/sb1250-swarm_defconfig b/arch/mips/configs/sb1250-swarm_defconfig
index a9acaa2f9da3..7f38c0b956f3 100644
--- a/arch/mips/configs/sb1250-swarm_defconfig
+++ b/arch/mips/configs/sb1250-swarm_defconfig
@@ -133,7 +133,6 @@ CONFIG_MIPS_MT_DISABLED=y
133# CONFIG_MIPS_MT_SMP is not set 133# CONFIG_MIPS_MT_SMP is not set
134# CONFIG_MIPS_MT_SMTC is not set 134# CONFIG_MIPS_MT_SMTC is not set
135CONFIG_SB1_PASS_2_WORKAROUNDS=y 135CONFIG_SB1_PASS_2_WORKAROUNDS=y
136CONFIG_CPU_HAS_LLSC=y
137CONFIG_CPU_HAS_SYNC=y 136CONFIG_CPU_HAS_SYNC=y
138CONFIG_GENERIC_HARDIRQS=y 137CONFIG_GENERIC_HARDIRQS=y
139CONFIG_GENERIC_IRQ_PROBE=y 138CONFIG_GENERIC_IRQ_PROBE=y
diff --git a/arch/mips/configs/wrppmc_defconfig b/arch/mips/configs/wrppmc_defconfig
index fc2c56731b98..06acc7482e4c 100644
--- a/arch/mips/configs/wrppmc_defconfig
+++ b/arch/mips/configs/wrppmc_defconfig
@@ -120,7 +120,6 @@ CONFIG_MIPS_MT_DISABLED=y
120# CONFIG_MIPS_MT_SMTC is not set 120# CONFIG_MIPS_MT_SMTC is not set
121# CONFIG_MIPS_VPE_LOADER is not set 121# CONFIG_MIPS_VPE_LOADER is not set
122# CONFIG_64BIT_PHYS_ADDR is not set 122# CONFIG_64BIT_PHYS_ADDR is not set
123CONFIG_CPU_HAS_LLSC=y
124CONFIG_CPU_HAS_SYNC=y 123CONFIG_CPU_HAS_SYNC=y
125CONFIG_GENERIC_HARDIRQS=y 124CONFIG_GENERIC_HARDIRQS=y
126CONFIG_GENERIC_IRQ_PROBE=y 125CONFIG_GENERIC_IRQ_PROBE=y
diff --git a/arch/mips/configs/yosemite_defconfig b/arch/mips/configs/yosemite_defconfig
index ea8249c75b3f..69feaf88b510 100644
--- a/arch/mips/configs/yosemite_defconfig
+++ b/arch/mips/configs/yosemite_defconfig
@@ -115,7 +115,6 @@ CONFIG_MIPS_MT_DISABLED=y
115# CONFIG_MIPS_MT_SMTC is not set 115# CONFIG_MIPS_MT_SMTC is not set
116# CONFIG_MIPS_VPE_LOADER is not set 116# CONFIG_MIPS_VPE_LOADER is not set
117# CONFIG_64BIT_PHYS_ADDR is not set 117# CONFIG_64BIT_PHYS_ADDR is not set
118CONFIG_CPU_HAS_LLSC=y
119CONFIG_CPU_HAS_SYNC=y 118CONFIG_CPU_HAS_SYNC=y
120CONFIG_GENERIC_HARDIRQS=y 119CONFIG_GENERIC_HARDIRQS=y
121CONFIG_GENERIC_IRQ_PROBE=y 120CONFIG_GENERIC_IRQ_PROBE=y
diff --git a/arch/mips/dec/prom/memory.c b/arch/mips/dec/prom/memory.c
index 5a557e268f78..e95ff3054ff6 100644
--- a/arch/mips/dec/prom/memory.c
+++ b/arch/mips/dec/prom/memory.c
@@ -18,7 +18,7 @@
18#include <asm/sections.h> 18#include <asm/sections.h>
19 19
20 20
21volatile unsigned long mem_err = 0; /* So we know an error occurred */ 21volatile unsigned long mem_err; /* So we know an error occurred */
22 22
23/* 23/*
24 * Probe memory in 4MB chunks, waiting for an error to tell us we've fallen 24 * Probe memory in 4MB chunks, waiting for an error to tell us we've fallen
diff --git a/arch/mips/dec/time.c b/arch/mips/dec/time.c
index 463136e6685a..02f505f23c32 100644
--- a/arch/mips/dec/time.c
+++ b/arch/mips/dec/time.c
@@ -18,7 +18,7 @@
18#include <asm/dec/ioasic.h> 18#include <asm/dec/ioasic.h>
19#include <asm/dec/machtype.h> 19#include <asm/dec/machtype.h>
20 20
21unsigned long read_persistent_clock(void) 21void read_persistent_clock(struct timespec *ts)
22{ 22{
23 unsigned int year, mon, day, hour, min, sec, real_year; 23 unsigned int year, mon, day, hour, min, sec, real_year;
24 unsigned long flags; 24 unsigned long flags;
@@ -53,7 +53,8 @@ unsigned long read_persistent_clock(void)
53 53
54 year += real_year - 72 + 2000; 54 year += real_year - 72 + 2000;
55 55
56 return mktime(year, mon, day, hour, min, sec); 56 ts->tv_sec = mktime(year, mon, day, hour, min, sec);
57 ts->tv_nsec = 0;
57} 58}
58 59
59/* 60/*
diff --git a/arch/mips/emma/markeins/setup.c b/arch/mips/emma/markeins/setup.c
index 335dc8c1a1bb..9b3f51e5f140 100644
--- a/arch/mips/emma/markeins/setup.c
+++ b/arch/mips/emma/markeins/setup.c
@@ -32,7 +32,7 @@
32 32
33extern void markeins_led(const char *); 33extern void markeins_led(const char *);
34 34
35static int bus_frequency = 0; 35static int bus_frequency;
36 36
37static void markeins_machine_restart(char *command) 37static void markeins_machine_restart(char *command)
38{ 38{
diff --git a/arch/mips/fw/arc/Makefile b/arch/mips/fw/arc/Makefile
index 4f349ec1ea2d..e0aaad482b0e 100644
--- a/arch/mips/fw/arc/Makefile
+++ b/arch/mips/fw/arc/Makefile
@@ -8,3 +8,5 @@ lib-y += cmdline.o env.o file.o identify.o init.o \
8lib-$(CONFIG_ARC_MEMORY) += memory.o 8lib-$(CONFIG_ARC_MEMORY) += memory.o
9lib-$(CONFIG_ARC_CONSOLE) += arc_con.o 9lib-$(CONFIG_ARC_CONSOLE) += arc_con.o
10lib-$(CONFIG_ARC_PROMLIB) += promlib.o 10lib-$(CONFIG_ARC_PROMLIB) += promlib.o
11
12EXTRA_CFLAGS += -Werror
diff --git a/arch/mips/fw/cfe/cfe_api.c b/arch/mips/fw/cfe/cfe_api.c
index 717db74f7c6e..d06dc5a6b8d3 100644
--- a/arch/mips/fw/cfe/cfe_api.c
+++ b/arch/mips/fw/cfe/cfe_api.c
@@ -45,8 +45,8 @@ int cfe_iocb_dispatch(struct cfe_xiocb *xiocb);
45 * passed in two registers each, and CFE expects one. 45 * passed in two registers each, and CFE expects one.
46 */ 46 */
47 47
48static int (*cfe_dispfunc) (intptr_t handle, intptr_t xiocb) = 0; 48static int (*cfe_dispfunc) (intptr_t handle, intptr_t xiocb);
49static u64 cfe_handle = 0; 49static u64 cfe_handle;
50 50
51int cfe_init(u64 handle, u64 ept) 51int cfe_init(u64 handle, u64 ept)
52{ 52{
diff --git a/arch/mips/include/asm/atomic.h b/arch/mips/include/asm/atomic.h
index eb7f01cfd1ac..dd75d673447e 100644
--- a/arch/mips/include/asm/atomic.h
+++ b/arch/mips/include/asm/atomic.h
@@ -49,7 +49,7 @@
49 */ 49 */
50static __inline__ void atomic_add(int i, atomic_t * v) 50static __inline__ void atomic_add(int i, atomic_t * v)
51{ 51{
52 if (cpu_has_llsc && R10000_LLSC_WAR) { 52 if (kernel_uses_llsc && R10000_LLSC_WAR) {
53 int temp; 53 int temp;
54 54
55 __asm__ __volatile__( 55 __asm__ __volatile__(
@@ -61,7 +61,7 @@ static __inline__ void atomic_add(int i, atomic_t * v)
61 " .set mips0 \n" 61 " .set mips0 \n"
62 : "=&r" (temp), "=m" (v->counter) 62 : "=&r" (temp), "=m" (v->counter)
63 : "Ir" (i), "m" (v->counter)); 63 : "Ir" (i), "m" (v->counter));
64 } else if (cpu_has_llsc) { 64 } else if (kernel_uses_llsc) {
65 int temp; 65 int temp;
66 66
67 __asm__ __volatile__( 67 __asm__ __volatile__(
@@ -94,7 +94,7 @@ static __inline__ void atomic_add(int i, atomic_t * v)
94 */ 94 */
95static __inline__ void atomic_sub(int i, atomic_t * v) 95static __inline__ void atomic_sub(int i, atomic_t * v)
96{ 96{
97 if (cpu_has_llsc && R10000_LLSC_WAR) { 97 if (kernel_uses_llsc && R10000_LLSC_WAR) {
98 int temp; 98 int temp;
99 99
100 __asm__ __volatile__( 100 __asm__ __volatile__(
@@ -106,7 +106,7 @@ static __inline__ void atomic_sub(int i, atomic_t * v)
106 " .set mips0 \n" 106 " .set mips0 \n"
107 : "=&r" (temp), "=m" (v->counter) 107 : "=&r" (temp), "=m" (v->counter)
108 : "Ir" (i), "m" (v->counter)); 108 : "Ir" (i), "m" (v->counter));
109 } else if (cpu_has_llsc) { 109 } else if (kernel_uses_llsc) {
110 int temp; 110 int temp;
111 111
112 __asm__ __volatile__( 112 __asm__ __volatile__(
@@ -139,7 +139,7 @@ static __inline__ int atomic_add_return(int i, atomic_t * v)
139 139
140 smp_llsc_mb(); 140 smp_llsc_mb();
141 141
142 if (cpu_has_llsc && R10000_LLSC_WAR) { 142 if (kernel_uses_llsc && R10000_LLSC_WAR) {
143 int temp; 143 int temp;
144 144
145 __asm__ __volatile__( 145 __asm__ __volatile__(
@@ -153,7 +153,7 @@ static __inline__ int atomic_add_return(int i, atomic_t * v)
153 : "=&r" (result), "=&r" (temp), "=m" (v->counter) 153 : "=&r" (result), "=&r" (temp), "=m" (v->counter)
154 : "Ir" (i), "m" (v->counter) 154 : "Ir" (i), "m" (v->counter)
155 : "memory"); 155 : "memory");
156 } else if (cpu_has_llsc) { 156 } else if (kernel_uses_llsc) {
157 int temp; 157 int temp;
158 158
159 __asm__ __volatile__( 159 __asm__ __volatile__(
@@ -191,7 +191,7 @@ static __inline__ int atomic_sub_return(int i, atomic_t * v)
191 191
192 smp_llsc_mb(); 192 smp_llsc_mb();
193 193
194 if (cpu_has_llsc && R10000_LLSC_WAR) { 194 if (kernel_uses_llsc && R10000_LLSC_WAR) {
195 int temp; 195 int temp;
196 196
197 __asm__ __volatile__( 197 __asm__ __volatile__(
@@ -205,7 +205,7 @@ static __inline__ int atomic_sub_return(int i, atomic_t * v)
205 : "=&r" (result), "=&r" (temp), "=m" (v->counter) 205 : "=&r" (result), "=&r" (temp), "=m" (v->counter)
206 : "Ir" (i), "m" (v->counter) 206 : "Ir" (i), "m" (v->counter)
207 : "memory"); 207 : "memory");
208 } else if (cpu_has_llsc) { 208 } else if (kernel_uses_llsc) {
209 int temp; 209 int temp;
210 210
211 __asm__ __volatile__( 211 __asm__ __volatile__(
@@ -251,7 +251,7 @@ static __inline__ int atomic_sub_if_positive(int i, atomic_t * v)
251 251
252 smp_llsc_mb(); 252 smp_llsc_mb();
253 253
254 if (cpu_has_llsc && R10000_LLSC_WAR) { 254 if (kernel_uses_llsc && R10000_LLSC_WAR) {
255 int temp; 255 int temp;
256 256
257 __asm__ __volatile__( 257 __asm__ __volatile__(
@@ -269,7 +269,7 @@ static __inline__ int atomic_sub_if_positive(int i, atomic_t * v)
269 : "=&r" (result), "=&r" (temp), "=m" (v->counter) 269 : "=&r" (result), "=&r" (temp), "=m" (v->counter)
270 : "Ir" (i), "m" (v->counter) 270 : "Ir" (i), "m" (v->counter)
271 : "memory"); 271 : "memory");
272 } else if (cpu_has_llsc) { 272 } else if (kernel_uses_llsc) {
273 int temp; 273 int temp;
274 274
275 __asm__ __volatile__( 275 __asm__ __volatile__(
@@ -428,7 +428,7 @@ static __inline__ int atomic_add_unless(atomic_t *v, int a, int u)
428 */ 428 */
429static __inline__ void atomic64_add(long i, atomic64_t * v) 429static __inline__ void atomic64_add(long i, atomic64_t * v)
430{ 430{
431 if (cpu_has_llsc && R10000_LLSC_WAR) { 431 if (kernel_uses_llsc && R10000_LLSC_WAR) {
432 long temp; 432 long temp;
433 433
434 __asm__ __volatile__( 434 __asm__ __volatile__(
@@ -440,7 +440,7 @@ static __inline__ void atomic64_add(long i, atomic64_t * v)
440 " .set mips0 \n" 440 " .set mips0 \n"
441 : "=&r" (temp), "=m" (v->counter) 441 : "=&r" (temp), "=m" (v->counter)
442 : "Ir" (i), "m" (v->counter)); 442 : "Ir" (i), "m" (v->counter));
443 } else if (cpu_has_llsc) { 443 } else if (kernel_uses_llsc) {
444 long temp; 444 long temp;
445 445
446 __asm__ __volatile__( 446 __asm__ __volatile__(
@@ -473,7 +473,7 @@ static __inline__ void atomic64_add(long i, atomic64_t * v)
473 */ 473 */
474static __inline__ void atomic64_sub(long i, atomic64_t * v) 474static __inline__ void atomic64_sub(long i, atomic64_t * v)
475{ 475{
476 if (cpu_has_llsc && R10000_LLSC_WAR) { 476 if (kernel_uses_llsc && R10000_LLSC_WAR) {
477 long temp; 477 long temp;
478 478
479 __asm__ __volatile__( 479 __asm__ __volatile__(
@@ -485,7 +485,7 @@ static __inline__ void atomic64_sub(long i, atomic64_t * v)
485 " .set mips0 \n" 485 " .set mips0 \n"
486 : "=&r" (temp), "=m" (v->counter) 486 : "=&r" (temp), "=m" (v->counter)
487 : "Ir" (i), "m" (v->counter)); 487 : "Ir" (i), "m" (v->counter));
488 } else if (cpu_has_llsc) { 488 } else if (kernel_uses_llsc) {
489 long temp; 489 long temp;
490 490
491 __asm__ __volatile__( 491 __asm__ __volatile__(
@@ -518,7 +518,7 @@ static __inline__ long atomic64_add_return(long i, atomic64_t * v)
518 518
519 smp_llsc_mb(); 519 smp_llsc_mb();
520 520
521 if (cpu_has_llsc && R10000_LLSC_WAR) { 521 if (kernel_uses_llsc && R10000_LLSC_WAR) {
522 long temp; 522 long temp;
523 523
524 __asm__ __volatile__( 524 __asm__ __volatile__(
@@ -532,7 +532,7 @@ static __inline__ long atomic64_add_return(long i, atomic64_t * v)
532 : "=&r" (result), "=&r" (temp), "=m" (v->counter) 532 : "=&r" (result), "=&r" (temp), "=m" (v->counter)
533 : "Ir" (i), "m" (v->counter) 533 : "Ir" (i), "m" (v->counter)
534 : "memory"); 534 : "memory");
535 } else if (cpu_has_llsc) { 535 } else if (kernel_uses_llsc) {
536 long temp; 536 long temp;
537 537
538 __asm__ __volatile__( 538 __asm__ __volatile__(
@@ -570,7 +570,7 @@ static __inline__ long atomic64_sub_return(long i, atomic64_t * v)
570 570
571 smp_llsc_mb(); 571 smp_llsc_mb();
572 572
573 if (cpu_has_llsc && R10000_LLSC_WAR) { 573 if (kernel_uses_llsc && R10000_LLSC_WAR) {
574 long temp; 574 long temp;
575 575
576 __asm__ __volatile__( 576 __asm__ __volatile__(
@@ -584,7 +584,7 @@ static __inline__ long atomic64_sub_return(long i, atomic64_t * v)
584 : "=&r" (result), "=&r" (temp), "=m" (v->counter) 584 : "=&r" (result), "=&r" (temp), "=m" (v->counter)
585 : "Ir" (i), "m" (v->counter) 585 : "Ir" (i), "m" (v->counter)
586 : "memory"); 586 : "memory");
587 } else if (cpu_has_llsc) { 587 } else if (kernel_uses_llsc) {
588 long temp; 588 long temp;
589 589
590 __asm__ __volatile__( 590 __asm__ __volatile__(
@@ -630,7 +630,7 @@ static __inline__ long atomic64_sub_if_positive(long i, atomic64_t * v)
630 630
631 smp_llsc_mb(); 631 smp_llsc_mb();
632 632
633 if (cpu_has_llsc && R10000_LLSC_WAR) { 633 if (kernel_uses_llsc && R10000_LLSC_WAR) {
634 long temp; 634 long temp;
635 635
636 __asm__ __volatile__( 636 __asm__ __volatile__(
@@ -648,7 +648,7 @@ static __inline__ long atomic64_sub_if_positive(long i, atomic64_t * v)
648 : "=&r" (result), "=&r" (temp), "=m" (v->counter) 648 : "=&r" (result), "=&r" (temp), "=m" (v->counter)
649 : "Ir" (i), "m" (v->counter) 649 : "Ir" (i), "m" (v->counter)
650 : "memory"); 650 : "memory");
651 } else if (cpu_has_llsc) { 651 } else if (kernel_uses_llsc) {
652 long temp; 652 long temp;
653 653
654 __asm__ __volatile__( 654 __asm__ __volatile__(
diff --git a/arch/mips/include/asm/bitops.h b/arch/mips/include/asm/bitops.h
index b1e9e97a9c78..84a383806b2c 100644
--- a/arch/mips/include/asm/bitops.h
+++ b/arch/mips/include/asm/bitops.h
@@ -61,7 +61,7 @@ static inline void set_bit(unsigned long nr, volatile unsigned long *addr)
61 unsigned short bit = nr & SZLONG_MASK; 61 unsigned short bit = nr & SZLONG_MASK;
62 unsigned long temp; 62 unsigned long temp;
63 63
64 if (cpu_has_llsc && R10000_LLSC_WAR) { 64 if (kernel_uses_llsc && R10000_LLSC_WAR) {
65 __asm__ __volatile__( 65 __asm__ __volatile__(
66 " .set mips3 \n" 66 " .set mips3 \n"
67 "1: " __LL "%0, %1 # set_bit \n" 67 "1: " __LL "%0, %1 # set_bit \n"
@@ -72,7 +72,7 @@ static inline void set_bit(unsigned long nr, volatile unsigned long *addr)
72 : "=&r" (temp), "=m" (*m) 72 : "=&r" (temp), "=m" (*m)
73 : "ir" (1UL << bit), "m" (*m)); 73 : "ir" (1UL << bit), "m" (*m));
74#ifdef CONFIG_CPU_MIPSR2 74#ifdef CONFIG_CPU_MIPSR2
75 } else if (__builtin_constant_p(bit)) { 75 } else if (kernel_uses_llsc && __builtin_constant_p(bit)) {
76 __asm__ __volatile__( 76 __asm__ __volatile__(
77 "1: " __LL "%0, %1 # set_bit \n" 77 "1: " __LL "%0, %1 # set_bit \n"
78 " " __INS "%0, %4, %2, 1 \n" 78 " " __INS "%0, %4, %2, 1 \n"
@@ -84,7 +84,7 @@ static inline void set_bit(unsigned long nr, volatile unsigned long *addr)
84 : "=&r" (temp), "=m" (*m) 84 : "=&r" (temp), "=m" (*m)
85 : "ir" (bit), "m" (*m), "r" (~0)); 85 : "ir" (bit), "m" (*m), "r" (~0));
86#endif /* CONFIG_CPU_MIPSR2 */ 86#endif /* CONFIG_CPU_MIPSR2 */
87 } else if (cpu_has_llsc) { 87 } else if (kernel_uses_llsc) {
88 __asm__ __volatile__( 88 __asm__ __volatile__(
89 " .set mips3 \n" 89 " .set mips3 \n"
90 "1: " __LL "%0, %1 # set_bit \n" 90 "1: " __LL "%0, %1 # set_bit \n"
@@ -126,7 +126,7 @@ static inline void clear_bit(unsigned long nr, volatile unsigned long *addr)
126 unsigned short bit = nr & SZLONG_MASK; 126 unsigned short bit = nr & SZLONG_MASK;
127 unsigned long temp; 127 unsigned long temp;
128 128
129 if (cpu_has_llsc && R10000_LLSC_WAR) { 129 if (kernel_uses_llsc && R10000_LLSC_WAR) {
130 __asm__ __volatile__( 130 __asm__ __volatile__(
131 " .set mips3 \n" 131 " .set mips3 \n"
132 "1: " __LL "%0, %1 # clear_bit \n" 132 "1: " __LL "%0, %1 # clear_bit \n"
@@ -137,7 +137,7 @@ static inline void clear_bit(unsigned long nr, volatile unsigned long *addr)
137 : "=&r" (temp), "=m" (*m) 137 : "=&r" (temp), "=m" (*m)
138 : "ir" (~(1UL << bit)), "m" (*m)); 138 : "ir" (~(1UL << bit)), "m" (*m));
139#ifdef CONFIG_CPU_MIPSR2 139#ifdef CONFIG_CPU_MIPSR2
140 } else if (__builtin_constant_p(bit)) { 140 } else if (kernel_uses_llsc && __builtin_constant_p(bit)) {
141 __asm__ __volatile__( 141 __asm__ __volatile__(
142 "1: " __LL "%0, %1 # clear_bit \n" 142 "1: " __LL "%0, %1 # clear_bit \n"
143 " " __INS "%0, $0, %2, 1 \n" 143 " " __INS "%0, $0, %2, 1 \n"
@@ -149,7 +149,7 @@ static inline void clear_bit(unsigned long nr, volatile unsigned long *addr)
149 : "=&r" (temp), "=m" (*m) 149 : "=&r" (temp), "=m" (*m)
150 : "ir" (bit), "m" (*m)); 150 : "ir" (bit), "m" (*m));
151#endif /* CONFIG_CPU_MIPSR2 */ 151#endif /* CONFIG_CPU_MIPSR2 */
152 } else if (cpu_has_llsc) { 152 } else if (kernel_uses_llsc) {
153 __asm__ __volatile__( 153 __asm__ __volatile__(
154 " .set mips3 \n" 154 " .set mips3 \n"
155 "1: " __LL "%0, %1 # clear_bit \n" 155 "1: " __LL "%0, %1 # clear_bit \n"
@@ -202,7 +202,7 @@ static inline void change_bit(unsigned long nr, volatile unsigned long *addr)
202{ 202{
203 unsigned short bit = nr & SZLONG_MASK; 203 unsigned short bit = nr & SZLONG_MASK;
204 204
205 if (cpu_has_llsc && R10000_LLSC_WAR) { 205 if (kernel_uses_llsc && R10000_LLSC_WAR) {
206 unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); 206 unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG);
207 unsigned long temp; 207 unsigned long temp;
208 208
@@ -215,7 +215,7 @@ static inline void change_bit(unsigned long nr, volatile unsigned long *addr)
215 " .set mips0 \n" 215 " .set mips0 \n"
216 : "=&r" (temp), "=m" (*m) 216 : "=&r" (temp), "=m" (*m)
217 : "ir" (1UL << bit), "m" (*m)); 217 : "ir" (1UL << bit), "m" (*m));
218 } else if (cpu_has_llsc) { 218 } else if (kernel_uses_llsc) {
219 unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); 219 unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG);
220 unsigned long temp; 220 unsigned long temp;
221 221
@@ -260,7 +260,7 @@ static inline int test_and_set_bit(unsigned long nr,
260 260
261 smp_llsc_mb(); 261 smp_llsc_mb();
262 262
263 if (cpu_has_llsc && R10000_LLSC_WAR) { 263 if (kernel_uses_llsc && R10000_LLSC_WAR) {
264 unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); 264 unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG);
265 unsigned long temp; 265 unsigned long temp;
266 266
@@ -275,7 +275,7 @@ static inline int test_and_set_bit(unsigned long nr,
275 : "=&r" (temp), "=m" (*m), "=&r" (res) 275 : "=&r" (temp), "=m" (*m), "=&r" (res)
276 : "r" (1UL << bit), "m" (*m) 276 : "r" (1UL << bit), "m" (*m)
277 : "memory"); 277 : "memory");
278 } else if (cpu_has_llsc) { 278 } else if (kernel_uses_llsc) {
279 unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); 279 unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG);
280 unsigned long temp; 280 unsigned long temp;
281 281
@@ -328,7 +328,7 @@ static inline int test_and_set_bit_lock(unsigned long nr,
328 unsigned short bit = nr & SZLONG_MASK; 328 unsigned short bit = nr & SZLONG_MASK;
329 unsigned long res; 329 unsigned long res;
330 330
331 if (cpu_has_llsc && R10000_LLSC_WAR) { 331 if (kernel_uses_llsc && R10000_LLSC_WAR) {
332 unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); 332 unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG);
333 unsigned long temp; 333 unsigned long temp;
334 334
@@ -343,7 +343,7 @@ static inline int test_and_set_bit_lock(unsigned long nr,
343 : "=&r" (temp), "=m" (*m), "=&r" (res) 343 : "=&r" (temp), "=m" (*m), "=&r" (res)
344 : "r" (1UL << bit), "m" (*m) 344 : "r" (1UL << bit), "m" (*m)
345 : "memory"); 345 : "memory");
346 } else if (cpu_has_llsc) { 346 } else if (kernel_uses_llsc) {
347 unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); 347 unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG);
348 unsigned long temp; 348 unsigned long temp;
349 349
@@ -397,7 +397,7 @@ static inline int test_and_clear_bit(unsigned long nr,
397 397
398 smp_llsc_mb(); 398 smp_llsc_mb();
399 399
400 if (cpu_has_llsc && R10000_LLSC_WAR) { 400 if (kernel_uses_llsc && R10000_LLSC_WAR) {
401 unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); 401 unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG);
402 unsigned long temp; 402 unsigned long temp;
403 403
@@ -414,7 +414,7 @@ static inline int test_and_clear_bit(unsigned long nr,
414 : "r" (1UL << bit), "m" (*m) 414 : "r" (1UL << bit), "m" (*m)
415 : "memory"); 415 : "memory");
416#ifdef CONFIG_CPU_MIPSR2 416#ifdef CONFIG_CPU_MIPSR2
417 } else if (__builtin_constant_p(nr)) { 417 } else if (kernel_uses_llsc && __builtin_constant_p(nr)) {
418 unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); 418 unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG);
419 unsigned long temp; 419 unsigned long temp;
420 420
@@ -431,7 +431,7 @@ static inline int test_and_clear_bit(unsigned long nr,
431 : "ir" (bit), "m" (*m) 431 : "ir" (bit), "m" (*m)
432 : "memory"); 432 : "memory");
433#endif 433#endif
434 } else if (cpu_has_llsc) { 434 } else if (kernel_uses_llsc) {
435 unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); 435 unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG);
436 unsigned long temp; 436 unsigned long temp;
437 437
@@ -487,7 +487,7 @@ static inline int test_and_change_bit(unsigned long nr,
487 487
488 smp_llsc_mb(); 488 smp_llsc_mb();
489 489
490 if (cpu_has_llsc && R10000_LLSC_WAR) { 490 if (kernel_uses_llsc && R10000_LLSC_WAR) {
491 unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); 491 unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG);
492 unsigned long temp; 492 unsigned long temp;
493 493
@@ -502,7 +502,7 @@ static inline int test_and_change_bit(unsigned long nr,
502 : "=&r" (temp), "=m" (*m), "=&r" (res) 502 : "=&r" (temp), "=m" (*m), "=&r" (res)
503 : "r" (1UL << bit), "m" (*m) 503 : "r" (1UL << bit), "m" (*m)
504 : "memory"); 504 : "memory");
505 } else if (cpu_has_llsc) { 505 } else if (kernel_uses_llsc) {
506 unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); 506 unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG);
507 unsigned long temp; 507 unsigned long temp;
508 508
diff --git a/arch/mips/include/asm/bootinfo.h b/arch/mips/include/asm/bootinfo.h
index 610fe3af7a03..f5dfaf6a1606 100644
--- a/arch/mips/include/asm/bootinfo.h
+++ b/arch/mips/include/asm/bootinfo.h
@@ -7,6 +7,7 @@
7 * Copyright (C) 1995, 1996 Andreas Busse 7 * Copyright (C) 1995, 1996 Andreas Busse
8 * Copyright (C) 1995, 1996 Stoned Elipot 8 * Copyright (C) 1995, 1996 Stoned Elipot
9 * Copyright (C) 1995, 1996 Paul M. Antoine. 9 * Copyright (C) 1995, 1996 Paul M. Antoine.
10 * Copyright (C) 2009 Zhang Le
10 */ 11 */
11#ifndef _ASM_BOOTINFO_H 12#ifndef _ASM_BOOTINFO_H
12#define _ASM_BOOTINFO_H 13#define _ASM_BOOTINFO_H
@@ -57,6 +58,17 @@
57#define MACH_MIKROTIK_RB532 0 /* Mikrotik RouterBoard 532 */ 58#define MACH_MIKROTIK_RB532 0 /* Mikrotik RouterBoard 532 */
58#define MACH_MIKROTIK_RB532A 1 /* Mikrotik RouterBoard 532A */ 59#define MACH_MIKROTIK_RB532A 1 /* Mikrotik RouterBoard 532A */
59 60
61/*
62 * Valid machtype for Loongson family
63 */
64#define MACH_LOONGSON_UNKNOWN 0
65#define MACH_LEMOTE_FL2E 1
66#define MACH_LEMOTE_FL2F 2
67#define MACH_LEMOTE_ML2F7 3
68#define MACH_LEMOTE_YL2F89 4
69#define MACH_DEXXON_GDIUM2F10 5
70#define MACH_LOONGSON_END 6
71
60#define CL_SIZE COMMAND_LINE_SIZE 72#define CL_SIZE COMMAND_LINE_SIZE
61 73
62extern char *system_type; 74extern char *system_type;
diff --git a/arch/mips/include/asm/cmpxchg.h b/arch/mips/include/asm/cmpxchg.h
index 4a812c3ceb90..815a438a268d 100644
--- a/arch/mips/include/asm/cmpxchg.h
+++ b/arch/mips/include/asm/cmpxchg.h
@@ -16,7 +16,7 @@
16({ \ 16({ \
17 __typeof(*(m)) __ret; \ 17 __typeof(*(m)) __ret; \
18 \ 18 \
19 if (cpu_has_llsc && R10000_LLSC_WAR) { \ 19 if (kernel_uses_llsc && R10000_LLSC_WAR) { \
20 __asm__ __volatile__( \ 20 __asm__ __volatile__( \
21 " .set push \n" \ 21 " .set push \n" \
22 " .set noat \n" \ 22 " .set noat \n" \
@@ -33,7 +33,7 @@
33 : "=&r" (__ret), "=R" (*m) \ 33 : "=&r" (__ret), "=R" (*m) \
34 : "R" (*m), "Jr" (old), "Jr" (new) \ 34 : "R" (*m), "Jr" (old), "Jr" (new) \
35 : "memory"); \ 35 : "memory"); \
36 } else if (cpu_has_llsc) { \ 36 } else if (kernel_uses_llsc) { \
37 __asm__ __volatile__( \ 37 __asm__ __volatile__( \
38 " .set push \n" \ 38 " .set push \n" \
39 " .set noat \n" \ 39 " .set noat \n" \
diff --git a/arch/mips/include/asm/cpu-features.h b/arch/mips/include/asm/cpu-features.h
index 8ab1d12ba7f4..1f4df647c384 100644
--- a/arch/mips/include/asm/cpu-features.h
+++ b/arch/mips/include/asm/cpu-features.h
@@ -80,6 +80,9 @@
80#ifndef cpu_has_llsc 80#ifndef cpu_has_llsc
81#define cpu_has_llsc (cpu_data[0].options & MIPS_CPU_LLSC) 81#define cpu_has_llsc (cpu_data[0].options & MIPS_CPU_LLSC)
82#endif 82#endif
83#ifndef kernel_uses_llsc
84#define kernel_uses_llsc cpu_has_llsc
85#endif
83#ifndef cpu_has_mips16 86#ifndef cpu_has_mips16
84#define cpu_has_mips16 (cpu_data[0].ases & MIPS_ASE_MIPS16) 87#define cpu_has_mips16 (cpu_data[0].ases & MIPS_ASE_MIPS16)
85#endif 88#endif
diff --git a/arch/mips/include/asm/cpu.h b/arch/mips/include/asm/cpu.h
index 3bdc0e3d89cc..4b96d1a36056 100644
--- a/arch/mips/include/asm/cpu.h
+++ b/arch/mips/include/asm/cpu.h
@@ -113,6 +113,12 @@
113 113
114#define PRID_IMP_BCM4710 0x4000 114#define PRID_IMP_BCM4710 0x4000
115#define PRID_IMP_BCM3302 0x9000 115#define PRID_IMP_BCM3302 0x9000
116#define PRID_IMP_BCM6338 0x9000
117#define PRID_IMP_BCM6345 0x8000
118#define PRID_IMP_BCM6348 0x9100
119#define PRID_IMP_BCM4350 0xA000
120#define PRID_REV_BCM6358 0x0010
121#define PRID_REV_BCM6368 0x0030
116 122
117/* 123/*
118 * These are the PRID's for when 23:16 == PRID_COMP_CAVIUM 124 * These are the PRID's for when 23:16 == PRID_COMP_CAVIUM
@@ -210,6 +216,7 @@ enum cpu_type_enum {
210 */ 216 */
211 CPU_4KC, CPU_4KEC, CPU_4KSC, CPU_24K, CPU_34K, CPU_1004K, CPU_74K, 217 CPU_4KC, CPU_4KEC, CPU_4KSC, CPU_24K, CPU_34K, CPU_1004K, CPU_74K,
212 CPU_ALCHEMY, CPU_PR4450, CPU_BCM3302, CPU_BCM4710, 218 CPU_ALCHEMY, CPU_PR4450, CPU_BCM3302, CPU_BCM4710,
219 CPU_BCM6338, CPU_BCM6345, CPU_BCM6348, CPU_BCM6358,
213 220
214 /* 221 /*
215 * MIPS64 class processors 222 * MIPS64 class processors
diff --git a/arch/mips/include/asm/delay.h b/arch/mips/include/asm/delay.h
index d2d8949be6b7..e7cd78277c23 100644
--- a/arch/mips/include/asm/delay.h
+++ b/arch/mips/include/asm/delay.h
@@ -11,6 +11,8 @@
11#ifndef _ASM_DELAY_H 11#ifndef _ASM_DELAY_H
12#define _ASM_DELAY_H 12#define _ASM_DELAY_H
13 13
14#include <linux/param.h>
15
14extern void __delay(unsigned int loops); 16extern void __delay(unsigned int loops);
15extern void __ndelay(unsigned int ns); 17extern void __ndelay(unsigned int ns);
16extern void __udelay(unsigned int us); 18extern void __udelay(unsigned int us);
diff --git a/arch/mips/include/asm/fixmap.h b/arch/mips/include/asm/fixmap.h
index 0f5caa1307f1..efeddc8db8b1 100644
--- a/arch/mips/include/asm/fixmap.h
+++ b/arch/mips/include/asm/fixmap.h
@@ -67,11 +67,15 @@ enum fixed_addresses {
67 * the start of the fixmap, and leave one page empty 67 * the start of the fixmap, and leave one page empty
68 * at the top of mem.. 68 * at the top of mem..
69 */ 69 */
70#ifdef CONFIG_BCM63XX
71#define FIXADDR_TOP ((unsigned long)(long)(int)0xff000000)
72#else
70#if defined(CONFIG_CPU_TX39XX) || defined(CONFIG_CPU_TX49XX) 73#if defined(CONFIG_CPU_TX39XX) || defined(CONFIG_CPU_TX49XX)
71#define FIXADDR_TOP ((unsigned long)(long)(int)(0xff000000 - 0x20000)) 74#define FIXADDR_TOP ((unsigned long)(long)(int)(0xff000000 - 0x20000))
72#else 75#else
73#define FIXADDR_TOP ((unsigned long)(long)(int)0xfffe0000) 76#define FIXADDR_TOP ((unsigned long)(long)(int)0xfffe0000)
74#endif 77#endif
78#endif
75#define FIXADDR_SIZE (__end_of_fixed_addresses << PAGE_SHIFT) 79#define FIXADDR_SIZE (__end_of_fixed_addresses << PAGE_SHIFT)
76#define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE) 80#define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE)
77 81
diff --git a/arch/mips/include/asm/hardirq.h b/arch/mips/include/asm/hardirq.h
index 90bf399e6dd9..c977a86c2c65 100644
--- a/arch/mips/include/asm/hardirq.h
+++ b/arch/mips/include/asm/hardirq.h
@@ -10,15 +10,9 @@
10#ifndef _ASM_HARDIRQ_H 10#ifndef _ASM_HARDIRQ_H
11#define _ASM_HARDIRQ_H 11#define _ASM_HARDIRQ_H
12 12
13#include <linux/threads.h>
14#include <linux/irq.h>
15
16typedef struct {
17 unsigned int __softirq_pending;
18} ____cacheline_aligned irq_cpustat_t;
19
20#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
21
22extern void ack_bad_irq(unsigned int irq); 13extern void ack_bad_irq(unsigned int irq);
14#define ack_bad_irq ack_bad_irq
15
16#include <asm-generic/hardirq.h>
23 17
24#endif /* _ASM_HARDIRQ_H */ 18#endif /* _ASM_HARDIRQ_H */
diff --git a/arch/mips/include/asm/lasat/lasat.h b/arch/mips/include/asm/lasat/lasat.h
index caeba1e302a2..a1ada1c27c16 100644
--- a/arch/mips/include/asm/lasat/lasat.h
+++ b/arch/mips/include/asm/lasat/lasat.h
@@ -227,6 +227,7 @@ extern void lasat_write_eeprom_info(void);
227 * It is used for the bit-banging rtc and eeprom drivers */ 227 * It is used for the bit-banging rtc and eeprom drivers */
228 228
229#include <linux/delay.h> 229#include <linux/delay.h>
230#include <linux/smp.h>
230 231
231/* calculating with the slowest board with 100 MHz clock */ 232/* calculating with the slowest board with 100 MHz clock */
232#define LASAT_100_DIVIDER 20 233#define LASAT_100_DIVIDER 20
diff --git a/arch/mips/include/asm/local.h b/arch/mips/include/asm/local.h
index f96fd59e0845..361f4f16c30c 100644
--- a/arch/mips/include/asm/local.h
+++ b/arch/mips/include/asm/local.h
@@ -29,7 +29,7 @@ static __inline__ long local_add_return(long i, local_t * l)
29{ 29{
30 unsigned long result; 30 unsigned long result;
31 31
32 if (cpu_has_llsc && R10000_LLSC_WAR) { 32 if (kernel_uses_llsc && R10000_LLSC_WAR) {
33 unsigned long temp; 33 unsigned long temp;
34 34
35 __asm__ __volatile__( 35 __asm__ __volatile__(
@@ -43,7 +43,7 @@ static __inline__ long local_add_return(long i, local_t * l)
43 : "=&r" (result), "=&r" (temp), "=m" (l->a.counter) 43 : "=&r" (result), "=&r" (temp), "=m" (l->a.counter)
44 : "Ir" (i), "m" (l->a.counter) 44 : "Ir" (i), "m" (l->a.counter)
45 : "memory"); 45 : "memory");
46 } else if (cpu_has_llsc) { 46 } else if (kernel_uses_llsc) {
47 unsigned long temp; 47 unsigned long temp;
48 48
49 __asm__ __volatile__( 49 __asm__ __volatile__(
@@ -74,7 +74,7 @@ static __inline__ long local_sub_return(long i, local_t * l)
74{ 74{
75 unsigned long result; 75 unsigned long result;
76 76
77 if (cpu_has_llsc && R10000_LLSC_WAR) { 77 if (kernel_uses_llsc && R10000_LLSC_WAR) {
78 unsigned long temp; 78 unsigned long temp;
79 79
80 __asm__ __volatile__( 80 __asm__ __volatile__(
@@ -88,7 +88,7 @@ static __inline__ long local_sub_return(long i, local_t * l)
88 : "=&r" (result), "=&r" (temp), "=m" (l->a.counter) 88 : "=&r" (result), "=&r" (temp), "=m" (l->a.counter)
89 : "Ir" (i), "m" (l->a.counter) 89 : "Ir" (i), "m" (l->a.counter)
90 : "memory"); 90 : "memory");
91 } else if (cpu_has_llsc) { 91 } else if (kernel_uses_llsc) {
92 unsigned long temp; 92 unsigned long temp;
93 93
94 __asm__ __volatile__( 94 __asm__ __volatile__(
diff --git a/arch/mips/include/asm/mach-au1x00/gpio-au1000.h b/arch/mips/include/asm/mach-au1x00/gpio-au1000.h
index 127d4ed9f073..feea00148b5d 100644
--- a/arch/mips/include/asm/mach-au1x00/gpio-au1000.h
+++ b/arch/mips/include/asm/mach-au1x00/gpio-au1000.h
@@ -578,6 +578,15 @@ static inline int irq_to_gpio(int irq)
578 return alchemy_irq_to_gpio(irq); 578 return alchemy_irq_to_gpio(irq);
579} 579}
580 580
581static inline int gpio_request(unsigned gpio, const char *label)
582{
583 return 0;
584}
585
586static inline void gpio_free(unsigned gpio)
587{
588}
589
581#endif /* !CONFIG_ALCHEMY_GPIO_INDIRECT */ 590#endif /* !CONFIG_ALCHEMY_GPIO_INDIRECT */
582 591
583 592
diff --git a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_board.h b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_board.h
new file mode 100644
index 000000000000..fa3e7e617b09
--- /dev/null
+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_board.h
@@ -0,0 +1,12 @@
1#ifndef BCM63XX_BOARD_H_
2#define BCM63XX_BOARD_H_
3
4const char *board_get_name(void);
5
6void board_prom_init(void);
7
8void board_setup(void);
9
10int board_register_devices(void);
11
12#endif /* ! BCM63XX_BOARD_H_ */
diff --git a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_clk.h b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_clk.h
new file mode 100644
index 000000000000..8fcf8df4418a
--- /dev/null
+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_clk.h
@@ -0,0 +1,11 @@
1#ifndef BCM63XX_CLK_H_
2#define BCM63XX_CLK_H_
3
4struct clk {
5 void (*set)(struct clk *, int);
6 unsigned int rate;
7 unsigned int usage;
8 int id;
9};
10
11#endif /* ! BCM63XX_CLK_H_ */
diff --git a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
new file mode 100644
index 000000000000..b12c4aca2cc9
--- /dev/null
+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
@@ -0,0 +1,538 @@
1#ifndef BCM63XX_CPU_H_
2#define BCM63XX_CPU_H_
3
4#include <linux/types.h>
5#include <linux/init.h>
6
7/*
8 * Macro to fetch bcm63xx cpu id and revision, should be optimized at
9 * compile time if only one CPU support is enabled (idea stolen from
10 * arm mach-types)
11 */
12#define BCM6338_CPU_ID 0x6338
13#define BCM6345_CPU_ID 0x6345
14#define BCM6348_CPU_ID 0x6348
15#define BCM6358_CPU_ID 0x6358
16
17void __init bcm63xx_cpu_init(void);
18u16 __bcm63xx_get_cpu_id(void);
19u16 bcm63xx_get_cpu_rev(void);
20unsigned int bcm63xx_get_cpu_freq(void);
21
22#ifdef CONFIG_BCM63XX_CPU_6338
23# ifdef bcm63xx_get_cpu_id
24# undef bcm63xx_get_cpu_id
25# define bcm63xx_get_cpu_id() __bcm63xx_get_cpu_id()
26# define BCMCPU_RUNTIME_DETECT
27# else
28# define bcm63xx_get_cpu_id() BCM6338_CPU_ID
29# endif
30# define BCMCPU_IS_6338() (bcm63xx_get_cpu_id() == BCM6338_CPU_ID)
31#else
32# define BCMCPU_IS_6338() (0)
33#endif
34
35#ifdef CONFIG_BCM63XX_CPU_6345
36# ifdef bcm63xx_get_cpu_id
37# undef bcm63xx_get_cpu_id
38# define bcm63xx_get_cpu_id() __bcm63xx_get_cpu_id()
39# define BCMCPU_RUNTIME_DETECT
40# else
41# define bcm63xx_get_cpu_id() BCM6345_CPU_ID
42# endif
43# define BCMCPU_IS_6345() (bcm63xx_get_cpu_id() == BCM6345_CPU_ID)
44#else
45# define BCMCPU_IS_6345() (0)
46#endif
47
48#ifdef CONFIG_BCM63XX_CPU_6348
49# ifdef bcm63xx_get_cpu_id
50# undef bcm63xx_get_cpu_id
51# define bcm63xx_get_cpu_id() __bcm63xx_get_cpu_id()
52# define BCMCPU_RUNTIME_DETECT
53# else
54# define bcm63xx_get_cpu_id() BCM6348_CPU_ID
55# endif
56# define BCMCPU_IS_6348() (bcm63xx_get_cpu_id() == BCM6348_CPU_ID)
57#else
58# define BCMCPU_IS_6348() (0)
59#endif
60
61#ifdef CONFIG_BCM63XX_CPU_6358
62# ifdef bcm63xx_get_cpu_id
63# undef bcm63xx_get_cpu_id
64# define bcm63xx_get_cpu_id() __bcm63xx_get_cpu_id()
65# define BCMCPU_RUNTIME_DETECT
66# else
67# define bcm63xx_get_cpu_id() BCM6358_CPU_ID
68# endif
69# define BCMCPU_IS_6358() (bcm63xx_get_cpu_id() == BCM6358_CPU_ID)
70#else
71# define BCMCPU_IS_6358() (0)
72#endif
73
74#ifndef bcm63xx_get_cpu_id
75#error "No CPU support configured"
76#endif
77
78/*
79 * While registers sets are (mostly) the same across 63xx CPU, base
80 * address of these sets do change.
81 */
82enum bcm63xx_regs_set {
83 RSET_DSL_LMEM = 0,
84 RSET_PERF,
85 RSET_TIMER,
86 RSET_WDT,
87 RSET_UART0,
88 RSET_GPIO,
89 RSET_SPI,
90 RSET_UDC0,
91 RSET_OHCI0,
92 RSET_OHCI_PRIV,
93 RSET_USBH_PRIV,
94 RSET_MPI,
95 RSET_PCMCIA,
96 RSET_DSL,
97 RSET_ENET0,
98 RSET_ENET1,
99 RSET_ENETDMA,
100 RSET_EHCI0,
101 RSET_SDRAM,
102 RSET_MEMC,
103 RSET_DDR,
104};
105
106#define RSET_DSL_LMEM_SIZE (64 * 1024 * 4)
107#define RSET_DSL_SIZE 4096
108#define RSET_WDT_SIZE 12
109#define RSET_ENET_SIZE 2048
110#define RSET_ENETDMA_SIZE 2048
111#define RSET_UART_SIZE 24
112#define RSET_UDC_SIZE 256
113#define RSET_OHCI_SIZE 256
114#define RSET_EHCI_SIZE 256
115#define RSET_PCMCIA_SIZE 12
116
117/*
118 * 6338 register sets base address
119 */
120#define BCM_6338_DSL_LMEM_BASE (0xfff00000)
121#define BCM_6338_PERF_BASE (0xfffe0000)
122#define BCM_6338_BB_BASE (0xfffe0100)
123#define BCM_6338_TIMER_BASE (0xfffe0200)
124#define BCM_6338_WDT_BASE (0xfffe021c)
125#define BCM_6338_UART0_BASE (0xfffe0300)
126#define BCM_6338_GPIO_BASE (0xfffe0400)
127#define BCM_6338_SPI_BASE (0xfffe0c00)
128#define BCM_6338_UDC0_BASE (0xdeadbeef)
129#define BCM_6338_USBDMA_BASE (0xfffe2400)
130#define BCM_6338_OHCI0_BASE (0xdeadbeef)
131#define BCM_6338_OHCI_PRIV_BASE (0xfffe3000)
132#define BCM_6338_USBH_PRIV_BASE (0xdeadbeef)
133#define BCM_6338_MPI_BASE (0xfffe3160)
134#define BCM_6338_PCMCIA_BASE (0xdeadbeef)
135#define BCM_6338_SDRAM_REGS_BASE (0xfffe3100)
136#define BCM_6338_DSL_BASE (0xfffe1000)
137#define BCM_6338_SAR_BASE (0xfffe2000)
138#define BCM_6338_UBUS_BASE (0xdeadbeef)
139#define BCM_6338_ENET0_BASE (0xfffe2800)
140#define BCM_6338_ENET1_BASE (0xdeadbeef)
141#define BCM_6338_ENETDMA_BASE (0xfffe2400)
142#define BCM_6338_EHCI0_BASE (0xdeadbeef)
143#define BCM_6338_SDRAM_BASE (0xfffe3100)
144#define BCM_6338_MEMC_BASE (0xdeadbeef)
145#define BCM_6338_DDR_BASE (0xdeadbeef)
146
147/*
148 * 6345 register sets base address
149 */
150#define BCM_6345_DSL_LMEM_BASE (0xfff00000)
151#define BCM_6345_PERF_BASE (0xfffe0000)
152#define BCM_6345_BB_BASE (0xfffe0100)
153#define BCM_6345_TIMER_BASE (0xfffe0200)
154#define BCM_6345_WDT_BASE (0xfffe021c)
155#define BCM_6345_UART0_BASE (0xfffe0300)
156#define BCM_6345_GPIO_BASE (0xfffe0400)
157#define BCM_6345_SPI_BASE (0xdeadbeef)
158#define BCM_6345_UDC0_BASE (0xdeadbeef)
159#define BCM_6345_USBDMA_BASE (0xfffe2800)
160#define BCM_6345_ENET0_BASE (0xfffe1800)
161#define BCM_6345_ENETDMA_BASE (0xfffe2800)
162#define BCM_6345_PCMCIA_BASE (0xfffe2028)
163#define BCM_6345_MPI_BASE (0xdeadbeef)
164#define BCM_6345_OHCI0_BASE (0xfffe2100)
165#define BCM_6345_OHCI_PRIV_BASE (0xfffe2200)
166#define BCM_6345_USBH_PRIV_BASE (0xdeadbeef)
167#define BCM_6345_SDRAM_REGS_BASE (0xfffe2300)
168#define BCM_6345_DSL_BASE (0xdeadbeef)
169#define BCM_6345_SAR_BASE (0xdeadbeef)
170#define BCM_6345_UBUS_BASE (0xdeadbeef)
171#define BCM_6345_ENET1_BASE (0xdeadbeef)
172#define BCM_6345_EHCI0_BASE (0xdeadbeef)
173#define BCM_6345_SDRAM_BASE (0xfffe2300)
174#define BCM_6345_MEMC_BASE (0xdeadbeef)
175#define BCM_6345_DDR_BASE (0xdeadbeef)
176
177/*
178 * 6348 register sets base address
179 */
180#define BCM_6348_DSL_LMEM_BASE (0xfff00000)
181#define BCM_6348_PERF_BASE (0xfffe0000)
182#define BCM_6348_TIMER_BASE (0xfffe0200)
183#define BCM_6348_WDT_BASE (0xfffe021c)
184#define BCM_6348_UART0_BASE (0xfffe0300)
185#define BCM_6348_GPIO_BASE (0xfffe0400)
186#define BCM_6348_SPI_BASE (0xfffe0c00)
187#define BCM_6348_UDC0_BASE (0xfffe1000)
188#define BCM_6348_OHCI0_BASE (0xfffe1b00)
189#define BCM_6348_OHCI_PRIV_BASE (0xfffe1c00)
190#define BCM_6348_USBH_PRIV_BASE (0xdeadbeef)
191#define BCM_6348_MPI_BASE (0xfffe2000)
192#define BCM_6348_PCMCIA_BASE (0xfffe2054)
193#define BCM_6348_SDRAM_REGS_BASE (0xfffe2300)
194#define BCM_6348_DSL_BASE (0xfffe3000)
195#define BCM_6348_ENET0_BASE (0xfffe6000)
196#define BCM_6348_ENET1_BASE (0xfffe6800)
197#define BCM_6348_ENETDMA_BASE (0xfffe7000)
198#define BCM_6348_EHCI0_BASE (0xdeadbeef)
199#define BCM_6348_SDRAM_BASE (0xfffe2300)
200#define BCM_6348_MEMC_BASE (0xdeadbeef)
201#define BCM_6348_DDR_BASE (0xdeadbeef)
202
203/*
204 * 6358 register sets base address
205 */
206#define BCM_6358_DSL_LMEM_BASE (0xfff00000)
207#define BCM_6358_PERF_BASE (0xfffe0000)
208#define BCM_6358_TIMER_BASE (0xfffe0040)
209#define BCM_6358_WDT_BASE (0xfffe005c)
210#define BCM_6358_UART0_BASE (0xfffe0100)
211#define BCM_6358_GPIO_BASE (0xfffe0080)
212#define BCM_6358_SPI_BASE (0xdeadbeef)
213#define BCM_6358_UDC0_BASE (0xfffe0800)
214#define BCM_6358_OHCI0_BASE (0xfffe1400)
215#define BCM_6358_OHCI_PRIV_BASE (0xdeadbeef)
216#define BCM_6358_USBH_PRIV_BASE (0xfffe1500)
217#define BCM_6358_MPI_BASE (0xfffe1000)
218#define BCM_6358_PCMCIA_BASE (0xfffe1054)
219#define BCM_6358_SDRAM_REGS_BASE (0xfffe2300)
220#define BCM_6358_DSL_BASE (0xfffe3000)
221#define BCM_6358_ENET0_BASE (0xfffe4000)
222#define BCM_6358_ENET1_BASE (0xfffe4800)
223#define BCM_6358_ENETDMA_BASE (0xfffe5000)
224#define BCM_6358_EHCI0_BASE (0xfffe1300)
225#define BCM_6358_SDRAM_BASE (0xdeadbeef)
226#define BCM_6358_MEMC_BASE (0xfffe1200)
227#define BCM_6358_DDR_BASE (0xfffe12a0)
228
229
230extern const unsigned long *bcm63xx_regs_base;
231
232static inline unsigned long bcm63xx_regset_address(enum bcm63xx_regs_set set)
233{
234#ifdef BCMCPU_RUNTIME_DETECT
235 return bcm63xx_regs_base[set];
236#else
237#ifdef CONFIG_BCM63XX_CPU_6338
238 switch (set) {
239 case RSET_DSL_LMEM:
240 return BCM_6338_DSL_LMEM_BASE;
241 case RSET_PERF:
242 return BCM_6338_PERF_BASE;
243 case RSET_TIMER:
244 return BCM_6338_TIMER_BASE;
245 case RSET_WDT:
246 return BCM_6338_WDT_BASE;
247 case RSET_UART0:
248 return BCM_6338_UART0_BASE;
249 case RSET_GPIO:
250 return BCM_6338_GPIO_BASE;
251 case RSET_SPI:
252 return BCM_6338_SPI_BASE;
253 case RSET_UDC0:
254 return BCM_6338_UDC0_BASE;
255 case RSET_OHCI0:
256 return BCM_6338_OHCI0_BASE;
257 case RSET_OHCI_PRIV:
258 return BCM_6338_OHCI_PRIV_BASE;
259 case RSET_USBH_PRIV:
260 return BCM_6338_USBH_PRIV_BASE;
261 case RSET_MPI:
262 return BCM_6338_MPI_BASE;
263 case RSET_PCMCIA:
264 return BCM_6338_PCMCIA_BASE;
265 case RSET_DSL:
266 return BCM_6338_DSL_BASE;
267 case RSET_ENET0:
268 return BCM_6338_ENET0_BASE;
269 case RSET_ENET1:
270 return BCM_6338_ENET1_BASE;
271 case RSET_ENETDMA:
272 return BCM_6338_ENETDMA_BASE;
273 case RSET_EHCI0:
274 return BCM_6338_EHCI0_BASE;
275 case RSET_SDRAM:
276 return BCM_6338_SDRAM_BASE;
277 case RSET_MEMC:
278 return BCM_6338_MEMC_BASE;
279 case RSET_DDR:
280 return BCM_6338_DDR_BASE;
281 }
282#endif
283#ifdef CONFIG_BCM63XX_CPU_6345
284 switch (set) {
285 case RSET_DSL_LMEM:
286 return BCM_6345_DSL_LMEM_BASE;
287 case RSET_PERF:
288 return BCM_6345_PERF_BASE;
289 case RSET_TIMER:
290 return BCM_6345_TIMER_BASE;
291 case RSET_WDT:
292 return BCM_6345_WDT_BASE;
293 case RSET_UART0:
294 return BCM_6345_UART0_BASE;
295 case RSET_GPIO:
296 return BCM_6345_GPIO_BASE;
297 case RSET_SPI:
298 return BCM_6345_SPI_BASE;
299 case RSET_UDC0:
300 return BCM_6345_UDC0_BASE;
301 case RSET_OHCI0:
302 return BCM_6345_OHCI0_BASE;
303 case RSET_OHCI_PRIV:
304 return BCM_6345_OHCI_PRIV_BASE;
305 case RSET_USBH_PRIV:
306 return BCM_6345_USBH_PRIV_BASE;
307 case RSET_MPI:
308 return BCM_6345_MPI_BASE;
309 case RSET_PCMCIA:
310 return BCM_6345_PCMCIA_BASE;
311 case RSET_DSL:
312 return BCM_6345_DSL_BASE;
313 case RSET_ENET0:
314 return BCM_6345_ENET0_BASE;
315 case RSET_ENET1:
316 return BCM_6345_ENET1_BASE;
317 case RSET_ENETDMA:
318 return BCM_6345_ENETDMA_BASE;
319 case RSET_EHCI0:
320 return BCM_6345_EHCI0_BASE;
321 case RSET_SDRAM:
322 return BCM_6345_SDRAM_BASE;
323 case RSET_MEMC:
324 return BCM_6345_MEMC_BASE;
325 case RSET_DDR:
326 return BCM_6345_DDR_BASE;
327 }
328#endif
329#ifdef CONFIG_BCM63XX_CPU_6348
330 switch (set) {
331 case RSET_DSL_LMEM:
332 return BCM_6348_DSL_LMEM_BASE;
333 case RSET_PERF:
334 return BCM_6348_PERF_BASE;
335 case RSET_TIMER:
336 return BCM_6348_TIMER_BASE;
337 case RSET_WDT:
338 return BCM_6348_WDT_BASE;
339 case RSET_UART0:
340 return BCM_6348_UART0_BASE;
341 case RSET_GPIO:
342 return BCM_6348_GPIO_BASE;
343 case RSET_SPI:
344 return BCM_6348_SPI_BASE;
345 case RSET_UDC0:
346 return BCM_6348_UDC0_BASE;
347 case RSET_OHCI0:
348 return BCM_6348_OHCI0_BASE;
349 case RSET_OHCI_PRIV:
350 return BCM_6348_OHCI_PRIV_BASE;
351 case RSET_USBH_PRIV:
352 return BCM_6348_USBH_PRIV_BASE;
353 case RSET_MPI:
354 return BCM_6348_MPI_BASE;
355 case RSET_PCMCIA:
356 return BCM_6348_PCMCIA_BASE;
357 case RSET_DSL:
358 return BCM_6348_DSL_BASE;
359 case RSET_ENET0:
360 return BCM_6348_ENET0_BASE;
361 case RSET_ENET1:
362 return BCM_6348_ENET1_BASE;
363 case RSET_ENETDMA:
364 return BCM_6348_ENETDMA_BASE;
365 case RSET_EHCI0:
366 return BCM_6348_EHCI0_BASE;
367 case RSET_SDRAM:
368 return BCM_6348_SDRAM_BASE;
369 case RSET_MEMC:
370 return BCM_6348_MEMC_BASE;
371 case RSET_DDR:
372 return BCM_6348_DDR_BASE;
373 }
374#endif
375#ifdef CONFIG_BCM63XX_CPU_6358
376 switch (set) {
377 case RSET_DSL_LMEM:
378 return BCM_6358_DSL_LMEM_BASE;
379 case RSET_PERF:
380 return BCM_6358_PERF_BASE;
381 case RSET_TIMER:
382 return BCM_6358_TIMER_BASE;
383 case RSET_WDT:
384 return BCM_6358_WDT_BASE;
385 case RSET_UART0:
386 return BCM_6358_UART0_BASE;
387 case RSET_GPIO:
388 return BCM_6358_GPIO_BASE;
389 case RSET_SPI:
390 return BCM_6358_SPI_BASE;
391 case RSET_UDC0:
392 return BCM_6358_UDC0_BASE;
393 case RSET_OHCI0:
394 return BCM_6358_OHCI0_BASE;
395 case RSET_OHCI_PRIV:
396 return BCM_6358_OHCI_PRIV_BASE;
397 case RSET_USBH_PRIV:
398 return BCM_6358_USBH_PRIV_BASE;
399 case RSET_MPI:
400 return BCM_6358_MPI_BASE;
401 case RSET_PCMCIA:
402 return BCM_6358_PCMCIA_BASE;
403 case RSET_ENET0:
404 return BCM_6358_ENET0_BASE;
405 case RSET_ENET1:
406 return BCM_6358_ENET1_BASE;
407 case RSET_ENETDMA:
408 return BCM_6358_ENETDMA_BASE;
409 case RSET_DSL:
410 return BCM_6358_DSL_BASE;
411 case RSET_EHCI0:
412 return BCM_6358_EHCI0_BASE;
413 case RSET_SDRAM:
414 return BCM_6358_SDRAM_BASE;
415 case RSET_MEMC:
416 return BCM_6358_MEMC_BASE;
417 case RSET_DDR:
418 return BCM_6358_DDR_BASE;
419 }
420#endif
421#endif
422 /* unreached */
423 return 0;
424}
425
426/*
427 * IRQ number changes across CPU too
428 */
429enum bcm63xx_irq {
430 IRQ_TIMER = 0,
431 IRQ_UART0,
432 IRQ_DSL,
433 IRQ_ENET0,
434 IRQ_ENET1,
435 IRQ_ENET_PHY,
436 IRQ_OHCI0,
437 IRQ_EHCI0,
438 IRQ_PCMCIA0,
439 IRQ_ENET0_RXDMA,
440 IRQ_ENET0_TXDMA,
441 IRQ_ENET1_RXDMA,
442 IRQ_ENET1_TXDMA,
443 IRQ_PCI,
444 IRQ_PCMCIA,
445};
446
447/*
448 * 6338 irqs
449 */
450#define BCM_6338_TIMER_IRQ (IRQ_INTERNAL_BASE + 0)
451#define BCM_6338_SPI_IRQ (IRQ_INTERNAL_BASE + 1)
452#define BCM_6338_UART0_IRQ (IRQ_INTERNAL_BASE + 2)
453#define BCM_6338_DG_IRQ (IRQ_INTERNAL_BASE + 4)
454#define BCM_6338_DSL_IRQ (IRQ_INTERNAL_BASE + 5)
455#define BCM_6338_ATM_IRQ (IRQ_INTERNAL_BASE + 6)
456#define BCM_6338_UDC0_IRQ (IRQ_INTERNAL_BASE + 7)
457#define BCM_6338_ENET0_IRQ (IRQ_INTERNAL_BASE + 8)
458#define BCM_6338_ENET_PHY_IRQ (IRQ_INTERNAL_BASE + 9)
459#define BCM_6338_SDRAM_IRQ (IRQ_INTERNAL_BASE + 10)
460#define BCM_6338_USB_CNTL_RX_DMA_IRQ (IRQ_INTERNAL_BASE + 11)
461#define BCM_6338_USB_CNTL_TX_DMA_IRQ (IRQ_INTERNAL_BASE + 12)
462#define BCM_6338_USB_BULK_RX_DMA_IRQ (IRQ_INTERNAL_BASE + 13)
463#define BCM_6338_USB_BULK_TX_DMA_IRQ (IRQ_INTERNAL_BASE + 14)
464#define BCM_6338_ENET0_RXDMA_IRQ (IRQ_INTERNAL_BASE + 15)
465#define BCM_6338_ENET0_TXDMA_IRQ (IRQ_INTERNAL_BASE + 16)
466#define BCM_6338_SDIO_IRQ (IRQ_INTERNAL_BASE + 17)
467
468/*
469 * 6345 irqs
470 */
471#define BCM_6345_TIMER_IRQ (IRQ_INTERNAL_BASE + 0)
472#define BCM_6345_UART0_IRQ (IRQ_INTERNAL_BASE + 2)
473#define BCM_6345_DSL_IRQ (IRQ_INTERNAL_BASE + 3)
474#define BCM_6345_ATM_IRQ (IRQ_INTERNAL_BASE + 4)
475#define BCM_6345_USB_IRQ (IRQ_INTERNAL_BASE + 5)
476#define BCM_6345_ENET0_IRQ (IRQ_INTERNAL_BASE + 8)
477#define BCM_6345_ENET_PHY_IRQ (IRQ_INTERNAL_BASE + 12)
478#define BCM_6345_ENET0_RXDMA_IRQ (IRQ_INTERNAL_BASE + 13 + 1)
479#define BCM_6345_ENET0_TXDMA_IRQ (IRQ_INTERNAL_BASE + 13 + 2)
480#define BCM_6345_EBI_RX_IRQ (IRQ_INTERNAL_BASE + 13 + 5)
481#define BCM_6345_EBI_TX_IRQ (IRQ_INTERNAL_BASE + 13 + 6)
482#define BCM_6345_RESERVED_RX_IRQ (IRQ_INTERNAL_BASE + 13 + 9)
483#define BCM_6345_RESERVED_TX_IRQ (IRQ_INTERNAL_BASE + 13 + 10)
484#define BCM_6345_USB_BULK_RX_DMA_IRQ (IRQ_INTERNAL_BASE + 13 + 13)
485#define BCM_6345_USB_BULK_TX_DMA_IRQ (IRQ_INTERNAL_BASE + 13 + 14)
486#define BCM_6345_USB_CNTL_RX_DMA_IRQ (IRQ_INTERNAL_BASE + 13 + 15)
487#define BCM_6345_USB_CNTL_TX_DMA_IRQ (IRQ_INTERNAL_BASE + 13 + 16)
488#define BCM_6345_USB_ISO_RX_DMA_IRQ (IRQ_INTERNAL_BASE + 13 + 17)
489#define BCM_6345_USB_ISO_TX_DMA_IRQ (IRQ_INTERNAL_BASE + 13 + 18)
490
491/*
492 * 6348 irqs
493 */
494#define BCM_6348_TIMER_IRQ (IRQ_INTERNAL_BASE + 0)
495#define BCM_6348_UART0_IRQ (IRQ_INTERNAL_BASE + 2)
496#define BCM_6348_DSL_IRQ (IRQ_INTERNAL_BASE + 4)
497#define BCM_6348_ENET1_IRQ (IRQ_INTERNAL_BASE + 7)
498#define BCM_6348_ENET0_IRQ (IRQ_INTERNAL_BASE + 8)
499#define BCM_6348_ENET_PHY_IRQ (IRQ_INTERNAL_BASE + 9)
500#define BCM_6348_OHCI0_IRQ (IRQ_INTERNAL_BASE + 12)
501#define BCM_6348_ENET0_RXDMA_IRQ (IRQ_INTERNAL_BASE + 20)
502#define BCM_6348_ENET0_TXDMA_IRQ (IRQ_INTERNAL_BASE + 21)
503#define BCM_6348_ENET1_RXDMA_IRQ (IRQ_INTERNAL_BASE + 22)
504#define BCM_6348_ENET1_TXDMA_IRQ (IRQ_INTERNAL_BASE + 23)
505#define BCM_6348_PCMCIA_IRQ (IRQ_INTERNAL_BASE + 24)
506#define BCM_6348_PCI_IRQ (IRQ_INTERNAL_BASE + 24)
507
508/*
509 * 6358 irqs
510 */
511#define BCM_6358_TIMER_IRQ (IRQ_INTERNAL_BASE + 0)
512#define BCM_6358_UART0_IRQ (IRQ_INTERNAL_BASE + 2)
513#define BCM_6358_OHCI0_IRQ (IRQ_INTERNAL_BASE + 5)
514#define BCM_6358_ENET1_IRQ (IRQ_INTERNAL_BASE + 6)
515#define BCM_6358_ENET0_IRQ (IRQ_INTERNAL_BASE + 8)
516#define BCM_6358_ENET_PHY_IRQ (IRQ_INTERNAL_BASE + 9)
517#define BCM_6358_EHCI0_IRQ (IRQ_INTERNAL_BASE + 10)
518#define BCM_6358_ENET0_RXDMA_IRQ (IRQ_INTERNAL_BASE + 15)
519#define BCM_6358_ENET0_TXDMA_IRQ (IRQ_INTERNAL_BASE + 16)
520#define BCM_6358_ENET1_RXDMA_IRQ (IRQ_INTERNAL_BASE + 17)
521#define BCM_6358_ENET1_TXDMA_IRQ (IRQ_INTERNAL_BASE + 18)
522#define BCM_6358_DSL_IRQ (IRQ_INTERNAL_BASE + 29)
523#define BCM_6358_PCI_IRQ (IRQ_INTERNAL_BASE + 31)
524#define BCM_6358_PCMCIA_IRQ (IRQ_INTERNAL_BASE + 24)
525
526extern const int *bcm63xx_irqs;
527
528static inline int bcm63xx_get_irq_number(enum bcm63xx_irq irq)
529{
530 return bcm63xx_irqs[irq];
531}
532
533/*
534 * return installed memory size
535 */
536unsigned int bcm63xx_get_memory_size(void);
537
538#endif /* !BCM63XX_CPU_H_ */
diff --git a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cs.h b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cs.h
new file mode 100644
index 000000000000..b1821c866e53
--- /dev/null
+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cs.h
@@ -0,0 +1,10 @@
1#ifndef BCM63XX_CS_H
2#define BCM63XX_CS_H
3
4int bcm63xx_set_cs_base(unsigned int cs, u32 base, unsigned int size);
5int bcm63xx_set_cs_timing(unsigned int cs, unsigned int wait,
6 unsigned int setup, unsigned int hold);
7int bcm63xx_set_cs_param(unsigned int cs, u32 flags);
8int bcm63xx_set_cs_status(unsigned int cs, int enable);
9
10#endif /* !BCM63XX_CS_H */
diff --git a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_dsp.h b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_dsp.h
new file mode 100644
index 000000000000..b587d45c3045
--- /dev/null
+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_dsp.h
@@ -0,0 +1,13 @@
1#ifndef __BCM63XX_DSP_H
2#define __BCM63XX_DSP_H
3
4struct bcm63xx_dsp_platform_data {
5 unsigned gpio_rst;
6 unsigned gpio_int;
7 unsigned cs;
8 unsigned ext_irq;
9};
10
11int __init bcm63xx_dsp_register(const struct bcm63xx_dsp_platform_data *pd);
12
13#endif /* __BCM63XX_DSP_H */
diff --git a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_enet.h b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_enet.h
new file mode 100644
index 000000000000..d53f611184b9
--- /dev/null
+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_enet.h
@@ -0,0 +1,45 @@
1#ifndef BCM63XX_DEV_ENET_H_
2#define BCM63XX_DEV_ENET_H_
3
4#include <linux/if_ether.h>
5#include <linux/init.h>
6
7/*
8 * on board ethernet platform data
9 */
10struct bcm63xx_enet_platform_data {
11 char mac_addr[ETH_ALEN];
12
13 int has_phy;
14
15 /* if has_phy, then set use_internal_phy */
16 int use_internal_phy;
17
18 /* or fill phy info to use an external one */
19 int phy_id;
20 int has_phy_interrupt;
21 int phy_interrupt;
22
23 /* if has_phy, use autonegociated pause parameters or force
24 * them */
25 int pause_auto;
26 int pause_rx;
27 int pause_tx;
28
29 /* if !has_phy, set desired forced speed/duplex */
30 int force_speed_100;
31 int force_duplex_full;
32
33 /* if !has_phy, set callback to perform mii device
34 * init/remove */
35 int (*mii_config)(struct net_device *dev, int probe,
36 int (*mii_read)(struct net_device *dev,
37 int phy_id, int reg),
38 void (*mii_write)(struct net_device *dev,
39 int phy_id, int reg, int val));
40};
41
42int __init bcm63xx_enet_register(int unit,
43 const struct bcm63xx_enet_platform_data *pd);
44
45#endif /* ! BCM63XX_DEV_ENET_H_ */
diff --git a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_pci.h b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_pci.h
new file mode 100644
index 000000000000..c549344b70ad
--- /dev/null
+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_pci.h
@@ -0,0 +1,6 @@
1#ifndef BCM63XX_DEV_PCI_H_
2#define BCM63XX_DEV_PCI_H_
3
4extern int bcm63xx_pci_enabled;
5
6#endif /* BCM63XX_DEV_PCI_H_ */
diff --git a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_gpio.h b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_gpio.h
new file mode 100644
index 000000000000..76a0b7216af5
--- /dev/null
+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_gpio.h
@@ -0,0 +1,22 @@
1#ifndef BCM63XX_GPIO_H
2#define BCM63XX_GPIO_H
3
4#include <linux/init.h>
5
6int __init bcm63xx_gpio_init(void);
7
8static inline unsigned long bcm63xx_gpio_count(void)
9{
10 switch (bcm63xx_get_cpu_id()) {
11 case BCM6358_CPU_ID:
12 return 40;
13 case BCM6348_CPU_ID:
14 default:
15 return 37;
16 }
17}
18
19#define GPIO_DIR_OUT 0x0
20#define GPIO_DIR_IN 0x1
21
22#endif /* !BCM63XX_GPIO_H */
diff --git a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_io.h b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_io.h
new file mode 100644
index 000000000000..91180fac6ed9
--- /dev/null
+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_io.h
@@ -0,0 +1,93 @@
1#ifndef BCM63XX_IO_H_
2#define BCM63XX_IO_H_
3
4#include "bcm63xx_cpu.h"
5
6/*
7 * Physical memory map, RAM is mapped at 0x0.
8 *
9 * Note that size MUST be a power of two.
10 */
11#define BCM_PCMCIA_COMMON_BASE_PA (0x20000000)
12#define BCM_PCMCIA_COMMON_SIZE (16 * 1024 * 1024)
13#define BCM_PCMCIA_COMMON_END_PA (BCM_PCMCIA_COMMON_BASE_PA + \
14 BCM_PCMCIA_COMMON_SIZE - 1)
15
16#define BCM_PCMCIA_ATTR_BASE_PA (0x21000000)
17#define BCM_PCMCIA_ATTR_SIZE (16 * 1024 * 1024)
18#define BCM_PCMCIA_ATTR_END_PA (BCM_PCMCIA_ATTR_BASE_PA + \
19 BCM_PCMCIA_ATTR_SIZE - 1)
20
21#define BCM_PCMCIA_IO_BASE_PA (0x22000000)
22#define BCM_PCMCIA_IO_SIZE (64 * 1024)
23#define BCM_PCMCIA_IO_END_PA (BCM_PCMCIA_IO_BASE_PA + \
24 BCM_PCMCIA_IO_SIZE - 1)
25
26#define BCM_PCI_MEM_BASE_PA (0x30000000)
27#define BCM_PCI_MEM_SIZE (128 * 1024 * 1024)
28#define BCM_PCI_MEM_END_PA (BCM_PCI_MEM_BASE_PA + \
29 BCM_PCI_MEM_SIZE - 1)
30
31#define BCM_PCI_IO_BASE_PA (0x08000000)
32#define BCM_PCI_IO_SIZE (64 * 1024)
33#define BCM_PCI_IO_END_PA (BCM_PCI_IO_BASE_PA + \
34 BCM_PCI_IO_SIZE - 1)
35#define BCM_PCI_IO_HALF_PA (BCM_PCI_IO_BASE_PA + \
36 (BCM_PCI_IO_SIZE / 2) - 1)
37
38#define BCM_CB_MEM_BASE_PA (0x38000000)
39#define BCM_CB_MEM_SIZE (128 * 1024 * 1024)
40#define BCM_CB_MEM_END_PA (BCM_CB_MEM_BASE_PA + \
41 BCM_CB_MEM_SIZE - 1)
42
43
44/*
45 * Internal registers are accessed through KSEG3
46 */
47#define BCM_REGS_VA(x) ((void __iomem *)(x))
48
49#define bcm_readb(a) (*(volatile unsigned char *) BCM_REGS_VA(a))
50#define bcm_readw(a) (*(volatile unsigned short *) BCM_REGS_VA(a))
51#define bcm_readl(a) (*(volatile unsigned int *) BCM_REGS_VA(a))
52#define bcm_writeb(v, a) (*(volatile unsigned char *) BCM_REGS_VA((a)) = (v))
53#define bcm_writew(v, a) (*(volatile unsigned short *) BCM_REGS_VA((a)) = (v))
54#define bcm_writel(v, a) (*(volatile unsigned int *) BCM_REGS_VA((a)) = (v))
55
56/*
57 * IO helpers to access register set for current CPU
58 */
59#define bcm_rset_readb(s, o) bcm_readb(bcm63xx_regset_address(s) + (o))
60#define bcm_rset_readw(s, o) bcm_readw(bcm63xx_regset_address(s) + (o))
61#define bcm_rset_readl(s, o) bcm_readl(bcm63xx_regset_address(s) + (o))
62#define bcm_rset_writeb(s, v, o) bcm_writeb((v), \
63 bcm63xx_regset_address(s) + (o))
64#define bcm_rset_writew(s, v, o) bcm_writew((v), \
65 bcm63xx_regset_address(s) + (o))
66#define bcm_rset_writel(s, v, o) bcm_writel((v), \
67 bcm63xx_regset_address(s) + (o))
68
69/*
70 * helpers for frequently used register sets
71 */
72#define bcm_perf_readl(o) bcm_rset_readl(RSET_PERF, (o))
73#define bcm_perf_writel(v, o) bcm_rset_writel(RSET_PERF, (v), (o))
74#define bcm_timer_readl(o) bcm_rset_readl(RSET_TIMER, (o))
75#define bcm_timer_writel(v, o) bcm_rset_writel(RSET_TIMER, (v), (o))
76#define bcm_wdt_readl(o) bcm_rset_readl(RSET_WDT, (o))
77#define bcm_wdt_writel(v, o) bcm_rset_writel(RSET_WDT, (v), (o))
78#define bcm_gpio_readl(o) bcm_rset_readl(RSET_GPIO, (o))
79#define bcm_gpio_writel(v, o) bcm_rset_writel(RSET_GPIO, (v), (o))
80#define bcm_uart0_readl(o) bcm_rset_readl(RSET_UART0, (o))
81#define bcm_uart0_writel(v, o) bcm_rset_writel(RSET_UART0, (v), (o))
82#define bcm_mpi_readl(o) bcm_rset_readl(RSET_MPI, (o))
83#define bcm_mpi_writel(v, o) bcm_rset_writel(RSET_MPI, (v), (o))
84#define bcm_pcmcia_readl(o) bcm_rset_readl(RSET_PCMCIA, (o))
85#define bcm_pcmcia_writel(v, o) bcm_rset_writel(RSET_PCMCIA, (v), (o))
86#define bcm_sdram_readl(o) bcm_rset_readl(RSET_SDRAM, (o))
87#define bcm_sdram_writel(v, o) bcm_rset_writel(RSET_SDRAM, (v), (o))
88#define bcm_memc_readl(o) bcm_rset_readl(RSET_MEMC, (o))
89#define bcm_memc_writel(v, o) bcm_rset_writel(RSET_MEMC, (v), (o))
90#define bcm_ddr_readl(o) bcm_rset_readl(RSET_DDR, (o))
91#define bcm_ddr_writel(v, o) bcm_rset_writel(RSET_DDR, (v), (o))
92
93#endif /* ! BCM63XX_IO_H_ */
diff --git a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_irq.h b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_irq.h
new file mode 100644
index 000000000000..5f95577c8213
--- /dev/null
+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_irq.h
@@ -0,0 +1,15 @@
1#ifndef BCM63XX_IRQ_H_
2#define BCM63XX_IRQ_H_
3
4#include <bcm63xx_cpu.h>
5
6#define IRQ_MIPS_BASE 0
7#define IRQ_INTERNAL_BASE 8
8
9#define IRQ_EXT_BASE (IRQ_MIPS_BASE + 3)
10#define IRQ_EXT_0 (IRQ_EXT_BASE + 0)
11#define IRQ_EXT_1 (IRQ_EXT_BASE + 1)
12#define IRQ_EXT_2 (IRQ_EXT_BASE + 2)
13#define IRQ_EXT_3 (IRQ_EXT_BASE + 3)
14
15#endif /* ! BCM63XX_IRQ_H_ */
diff --git a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
new file mode 100644
index 000000000000..ed4ccec87dd4
--- /dev/null
+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
@@ -0,0 +1,773 @@
1#ifndef BCM63XX_REGS_H_
2#define BCM63XX_REGS_H_
3
4/*************************************************************************
5 * _REG relative to RSET_PERF
6 *************************************************************************/
7
8/* Chip Identifier / Revision register */
9#define PERF_REV_REG 0x0
10#define REV_CHIPID_SHIFT 16
11#define REV_CHIPID_MASK (0xffff << REV_CHIPID_SHIFT)
12#define REV_REVID_SHIFT 0
13#define REV_REVID_MASK (0xffff << REV_REVID_SHIFT)
14
15/* Clock Control register */
16#define PERF_CKCTL_REG 0x4
17
18#define CKCTL_6338_ADSLPHY_EN (1 << 0)
19#define CKCTL_6338_MPI_EN (1 << 1)
20#define CKCTL_6338_DRAM_EN (1 << 2)
21#define CKCTL_6338_ENET_EN (1 << 4)
22#define CKCTL_6338_USBS_EN (1 << 4)
23#define CKCTL_6338_SAR_EN (1 << 5)
24#define CKCTL_6338_SPI_EN (1 << 9)
25
26#define CKCTL_6338_ALL_SAFE_EN (CKCTL_6338_ADSLPHY_EN | \
27 CKCTL_6338_MPI_EN | \
28 CKCTL_6338_ENET_EN | \
29 CKCTL_6338_SAR_EN | \
30 CKCTL_6338_SPI_EN)
31
32#define CKCTL_6345_CPU_EN (1 << 0)
33#define CKCTL_6345_BUS_EN (1 << 1)
34#define CKCTL_6345_EBI_EN (1 << 2)
35#define CKCTL_6345_UART_EN (1 << 3)
36#define CKCTL_6345_ADSLPHY_EN (1 << 4)
37#define CKCTL_6345_ENET_EN (1 << 7)
38#define CKCTL_6345_USBH_EN (1 << 8)
39
40#define CKCTL_6345_ALL_SAFE_EN (CKCTL_6345_ENET_EN | \
41 CKCTL_6345_USBH_EN | \
42 CKCTL_6345_ADSLPHY_EN)
43
44#define CKCTL_6348_ADSLPHY_EN (1 << 0)
45#define CKCTL_6348_MPI_EN (1 << 1)
46#define CKCTL_6348_SDRAM_EN (1 << 2)
47#define CKCTL_6348_M2M_EN (1 << 3)
48#define CKCTL_6348_ENET_EN (1 << 4)
49#define CKCTL_6348_SAR_EN (1 << 5)
50#define CKCTL_6348_USBS_EN (1 << 6)
51#define CKCTL_6348_USBH_EN (1 << 8)
52#define CKCTL_6348_SPI_EN (1 << 9)
53
54#define CKCTL_6348_ALL_SAFE_EN (CKCTL_6348_ADSLPHY_EN | \
55 CKCTL_6348_M2M_EN | \
56 CKCTL_6348_ENET_EN | \
57 CKCTL_6348_SAR_EN | \
58 CKCTL_6348_USBS_EN | \
59 CKCTL_6348_USBH_EN | \
60 CKCTL_6348_SPI_EN)
61
62#define CKCTL_6358_ENET_EN (1 << 4)
63#define CKCTL_6358_ADSLPHY_EN (1 << 5)
64#define CKCTL_6358_PCM_EN (1 << 8)
65#define CKCTL_6358_SPI_EN (1 << 9)
66#define CKCTL_6358_USBS_EN (1 << 10)
67#define CKCTL_6358_SAR_EN (1 << 11)
68#define CKCTL_6358_EMUSB_EN (1 << 17)
69#define CKCTL_6358_ENET0_EN (1 << 18)
70#define CKCTL_6358_ENET1_EN (1 << 19)
71#define CKCTL_6358_USBSU_EN (1 << 20)
72#define CKCTL_6358_EPHY_EN (1 << 21)
73
74#define CKCTL_6358_ALL_SAFE_EN (CKCTL_6358_ENET_EN | \
75 CKCTL_6358_ADSLPHY_EN | \
76 CKCTL_6358_PCM_EN | \
77 CKCTL_6358_SPI_EN | \
78 CKCTL_6358_USBS_EN | \
79 CKCTL_6358_SAR_EN | \
80 CKCTL_6358_EMUSB_EN | \
81 CKCTL_6358_ENET0_EN | \
82 CKCTL_6358_ENET1_EN | \
83 CKCTL_6358_USBSU_EN | \
84 CKCTL_6358_EPHY_EN)
85
86/* System PLL Control register */
87#define PERF_SYS_PLL_CTL_REG 0x8
88#define SYS_PLL_SOFT_RESET 0x1
89
90/* Interrupt Mask register */
91#define PERF_IRQMASK_REG 0xc
92#define PERF_IRQSTAT_REG 0x10
93
94/* Interrupt Status register */
95#define PERF_IRQSTAT_REG 0x10
96
97/* External Interrupt Configuration register */
98#define PERF_EXTIRQ_CFG_REG 0x14
99#define EXTIRQ_CFG_SENSE(x) (1 << (x))
100#define EXTIRQ_CFG_STAT(x) (1 << (x + 5))
101#define EXTIRQ_CFG_CLEAR(x) (1 << (x + 10))
102#define EXTIRQ_CFG_MASK(x) (1 << (x + 15))
103#define EXTIRQ_CFG_BOTHEDGE(x) (1 << (x + 20))
104#define EXTIRQ_CFG_LEVELSENSE(x) (1 << (x + 25))
105
106#define EXTIRQ_CFG_CLEAR_ALL (0xf << 10)
107#define EXTIRQ_CFG_MASK_ALL (0xf << 15)
108
109/* Soft Reset register */
110#define PERF_SOFTRESET_REG 0x28
111
112#define SOFTRESET_6338_SPI_MASK (1 << 0)
113#define SOFTRESET_6338_ENET_MASK (1 << 2)
114#define SOFTRESET_6338_USBH_MASK (1 << 3)
115#define SOFTRESET_6338_USBS_MASK (1 << 4)
116#define SOFTRESET_6338_ADSL_MASK (1 << 5)
117#define SOFTRESET_6338_DMAMEM_MASK (1 << 6)
118#define SOFTRESET_6338_SAR_MASK (1 << 7)
119#define SOFTRESET_6338_ACLC_MASK (1 << 8)
120#define SOFTRESET_6338_ADSLMIPSPLL_MASK (1 << 10)
121#define SOFTRESET_6338_ALL (SOFTRESET_6338_SPI_MASK | \
122 SOFTRESET_6338_ENET_MASK | \
123 SOFTRESET_6338_USBH_MASK | \
124 SOFTRESET_6338_USBS_MASK | \
125 SOFTRESET_6338_ADSL_MASK | \
126 SOFTRESET_6338_DMAMEM_MASK | \
127 SOFTRESET_6338_SAR_MASK | \
128 SOFTRESET_6338_ACLC_MASK | \
129 SOFTRESET_6338_ADSLMIPSPLL_MASK)
130
131#define SOFTRESET_6348_SPI_MASK (1 << 0)
132#define SOFTRESET_6348_ENET_MASK (1 << 2)
133#define SOFTRESET_6348_USBH_MASK (1 << 3)
134#define SOFTRESET_6348_USBS_MASK (1 << 4)
135#define SOFTRESET_6348_ADSL_MASK (1 << 5)
136#define SOFTRESET_6348_DMAMEM_MASK (1 << 6)
137#define SOFTRESET_6348_SAR_MASK (1 << 7)
138#define SOFTRESET_6348_ACLC_MASK (1 << 8)
139#define SOFTRESET_6348_ADSLMIPSPLL_MASK (1 << 10)
140
141#define SOFTRESET_6348_ALL (SOFTRESET_6348_SPI_MASK | \
142 SOFTRESET_6348_ENET_MASK | \
143 SOFTRESET_6348_USBH_MASK | \
144 SOFTRESET_6348_USBS_MASK | \
145 SOFTRESET_6348_ADSL_MASK | \
146 SOFTRESET_6348_DMAMEM_MASK | \
147 SOFTRESET_6348_SAR_MASK | \
148 SOFTRESET_6348_ACLC_MASK | \
149 SOFTRESET_6348_ADSLMIPSPLL_MASK)
150
151/* MIPS PLL control register */
152#define PERF_MIPSPLLCTL_REG 0x34
153#define MIPSPLLCTL_N1_SHIFT 20
154#define MIPSPLLCTL_N1_MASK (0x7 << MIPSPLLCTL_N1_SHIFT)
155#define MIPSPLLCTL_N2_SHIFT 15
156#define MIPSPLLCTL_N2_MASK (0x1f << MIPSPLLCTL_N2_SHIFT)
157#define MIPSPLLCTL_M1REF_SHIFT 12
158#define MIPSPLLCTL_M1REF_MASK (0x7 << MIPSPLLCTL_M1REF_SHIFT)
159#define MIPSPLLCTL_M2REF_SHIFT 9
160#define MIPSPLLCTL_M2REF_MASK (0x7 << MIPSPLLCTL_M2REF_SHIFT)
161#define MIPSPLLCTL_M1CPU_SHIFT 6
162#define MIPSPLLCTL_M1CPU_MASK (0x7 << MIPSPLLCTL_M1CPU_SHIFT)
163#define MIPSPLLCTL_M1BUS_SHIFT 3
164#define MIPSPLLCTL_M1BUS_MASK (0x7 << MIPSPLLCTL_M1BUS_SHIFT)
165#define MIPSPLLCTL_M2BUS_SHIFT 0
166#define MIPSPLLCTL_M2BUS_MASK (0x7 << MIPSPLLCTL_M2BUS_SHIFT)
167
168/* ADSL PHY PLL Control register */
169#define PERF_ADSLPLLCTL_REG 0x38
170#define ADSLPLLCTL_N1_SHIFT 20
171#define ADSLPLLCTL_N1_MASK (0x7 << ADSLPLLCTL_N1_SHIFT)
172#define ADSLPLLCTL_N2_SHIFT 15
173#define ADSLPLLCTL_N2_MASK (0x1f << ADSLPLLCTL_N2_SHIFT)
174#define ADSLPLLCTL_M1REF_SHIFT 12
175#define ADSLPLLCTL_M1REF_MASK (0x7 << ADSLPLLCTL_M1REF_SHIFT)
176#define ADSLPLLCTL_M2REF_SHIFT 9
177#define ADSLPLLCTL_M2REF_MASK (0x7 << ADSLPLLCTL_M2REF_SHIFT)
178#define ADSLPLLCTL_M1CPU_SHIFT 6
179#define ADSLPLLCTL_M1CPU_MASK (0x7 << ADSLPLLCTL_M1CPU_SHIFT)
180#define ADSLPLLCTL_M1BUS_SHIFT 3
181#define ADSLPLLCTL_M1BUS_MASK (0x7 << ADSLPLLCTL_M1BUS_SHIFT)
182#define ADSLPLLCTL_M2BUS_SHIFT 0
183#define ADSLPLLCTL_M2BUS_MASK (0x7 << ADSLPLLCTL_M2BUS_SHIFT)
184
185#define ADSLPLLCTL_VAL(n1, n2, m1ref, m2ref, m1cpu, m1bus, m2bus) \
186 (((n1) << ADSLPLLCTL_N1_SHIFT) | \
187 ((n2) << ADSLPLLCTL_N2_SHIFT) | \
188 ((m1ref) << ADSLPLLCTL_M1REF_SHIFT) | \
189 ((m2ref) << ADSLPLLCTL_M2REF_SHIFT) | \
190 ((m1cpu) << ADSLPLLCTL_M1CPU_SHIFT) | \
191 ((m1bus) << ADSLPLLCTL_M1BUS_SHIFT) | \
192 ((m2bus) << ADSLPLLCTL_M2BUS_SHIFT))
193
194
195/*************************************************************************
196 * _REG relative to RSET_TIMER
197 *************************************************************************/
198
199#define BCM63XX_TIMER_COUNT 4
200#define TIMER_T0_ID 0
201#define TIMER_T1_ID 1
202#define TIMER_T2_ID 2
203#define TIMER_WDT_ID 3
204
205/* Timer irqstat register */
206#define TIMER_IRQSTAT_REG 0
207#define TIMER_IRQSTAT_TIMER_CAUSE(x) (1 << (x))
208#define TIMER_IRQSTAT_TIMER0_CAUSE (1 << 0)
209#define TIMER_IRQSTAT_TIMER1_CAUSE (1 << 1)
210#define TIMER_IRQSTAT_TIMER2_CAUSE (1 << 2)
211#define TIMER_IRQSTAT_WDT_CAUSE (1 << 3)
212#define TIMER_IRQSTAT_TIMER_IR_EN(x) (1 << ((x) + 8))
213#define TIMER_IRQSTAT_TIMER0_IR_EN (1 << 8)
214#define TIMER_IRQSTAT_TIMER1_IR_EN (1 << 9)
215#define TIMER_IRQSTAT_TIMER2_IR_EN (1 << 10)
216
217/* Timer control register */
218#define TIMER_CTLx_REG(x) (0x4 + (x * 4))
219#define TIMER_CTL0_REG 0x4
220#define TIMER_CTL1_REG 0x8
221#define TIMER_CTL2_REG 0xC
222#define TIMER_CTL_COUNTDOWN_MASK (0x3fffffff)
223#define TIMER_CTL_MONOTONIC_MASK (1 << 30)
224#define TIMER_CTL_ENABLE_MASK (1 << 31)
225
226
227/*************************************************************************
228 * _REG relative to RSET_WDT
229 *************************************************************************/
230
231/* Watchdog default count register */
232#define WDT_DEFVAL_REG 0x0
233
234/* Watchdog control register */
235#define WDT_CTL_REG 0x4
236
237/* Watchdog control register constants */
238#define WDT_START_1 (0xff00)
239#define WDT_START_2 (0x00ff)
240#define WDT_STOP_1 (0xee00)
241#define WDT_STOP_2 (0x00ee)
242
243/* Watchdog reset length register */
244#define WDT_RSTLEN_REG 0x8
245
246
247/*************************************************************************
248 * _REG relative to RSET_UARTx
249 *************************************************************************/
250
251/* UART Control Register */
252#define UART_CTL_REG 0x0
253#define UART_CTL_RXTMOUTCNT_SHIFT 0
254#define UART_CTL_RXTMOUTCNT_MASK (0x1f << UART_CTL_RXTMOUTCNT_SHIFT)
255#define UART_CTL_RSTTXDN_SHIFT 5
256#define UART_CTL_RSTTXDN_MASK (1 << UART_CTL_RSTTXDN_SHIFT)
257#define UART_CTL_RSTRXFIFO_SHIFT 6
258#define UART_CTL_RSTRXFIFO_MASK (1 << UART_CTL_RSTRXFIFO_SHIFT)
259#define UART_CTL_RSTTXFIFO_SHIFT 7
260#define UART_CTL_RSTTXFIFO_MASK (1 << UART_CTL_RSTTXFIFO_SHIFT)
261#define UART_CTL_STOPBITS_SHIFT 8
262#define UART_CTL_STOPBITS_MASK (0xf << UART_CTL_STOPBITS_SHIFT)
263#define UART_CTL_STOPBITS_1 (0x7 << UART_CTL_STOPBITS_SHIFT)
264#define UART_CTL_STOPBITS_2 (0xf << UART_CTL_STOPBITS_SHIFT)
265#define UART_CTL_BITSPERSYM_SHIFT 12
266#define UART_CTL_BITSPERSYM_MASK (0x3 << UART_CTL_BITSPERSYM_SHIFT)
267#define UART_CTL_XMITBRK_SHIFT 14
268#define UART_CTL_XMITBRK_MASK (1 << UART_CTL_XMITBRK_SHIFT)
269#define UART_CTL_RSVD_SHIFT 15
270#define UART_CTL_RSVD_MASK (1 << UART_CTL_RSVD_SHIFT)
271#define UART_CTL_RXPAREVEN_SHIFT 16
272#define UART_CTL_RXPAREVEN_MASK (1 << UART_CTL_RXPAREVEN_SHIFT)
273#define UART_CTL_RXPAREN_SHIFT 17
274#define UART_CTL_RXPAREN_MASK (1 << UART_CTL_RXPAREN_SHIFT)
275#define UART_CTL_TXPAREVEN_SHIFT 18
276#define UART_CTL_TXPAREVEN_MASK (1 << UART_CTL_TXPAREVEN_SHIFT)
277#define UART_CTL_TXPAREN_SHIFT 18
278#define UART_CTL_TXPAREN_MASK (1 << UART_CTL_TXPAREN_SHIFT)
279#define UART_CTL_LOOPBACK_SHIFT 20
280#define UART_CTL_LOOPBACK_MASK (1 << UART_CTL_LOOPBACK_SHIFT)
281#define UART_CTL_RXEN_SHIFT 21
282#define UART_CTL_RXEN_MASK (1 << UART_CTL_RXEN_SHIFT)
283#define UART_CTL_TXEN_SHIFT 22
284#define UART_CTL_TXEN_MASK (1 << UART_CTL_TXEN_SHIFT)
285#define UART_CTL_BRGEN_SHIFT 23
286#define UART_CTL_BRGEN_MASK (1 << UART_CTL_BRGEN_SHIFT)
287
288/* UART Baudword register */
289#define UART_BAUD_REG 0x4
290
291/* UART Misc Control register */
292#define UART_MCTL_REG 0x8
293#define UART_MCTL_DTR_SHIFT 0
294#define UART_MCTL_DTR_MASK (1 << UART_MCTL_DTR_SHIFT)
295#define UART_MCTL_RTS_SHIFT 1
296#define UART_MCTL_RTS_MASK (1 << UART_MCTL_RTS_SHIFT)
297#define UART_MCTL_RXFIFOTHRESH_SHIFT 8
298#define UART_MCTL_RXFIFOTHRESH_MASK (0xf << UART_MCTL_RXFIFOTHRESH_SHIFT)
299#define UART_MCTL_TXFIFOTHRESH_SHIFT 12
300#define UART_MCTL_TXFIFOTHRESH_MASK (0xf << UART_MCTL_TXFIFOTHRESH_SHIFT)
301#define UART_MCTL_RXFIFOFILL_SHIFT 16
302#define UART_MCTL_RXFIFOFILL_MASK (0x1f << UART_MCTL_RXFIFOFILL_SHIFT)
303#define UART_MCTL_TXFIFOFILL_SHIFT 24
304#define UART_MCTL_TXFIFOFILL_MASK (0x1f << UART_MCTL_TXFIFOFILL_SHIFT)
305
306/* UART External Input Configuration register */
307#define UART_EXTINP_REG 0xc
308#define UART_EXTINP_RI_SHIFT 0
309#define UART_EXTINP_RI_MASK (1 << UART_EXTINP_RI_SHIFT)
310#define UART_EXTINP_CTS_SHIFT 1
311#define UART_EXTINP_CTS_MASK (1 << UART_EXTINP_CTS_SHIFT)
312#define UART_EXTINP_DCD_SHIFT 2
313#define UART_EXTINP_DCD_MASK (1 << UART_EXTINP_DCD_SHIFT)
314#define UART_EXTINP_DSR_SHIFT 3
315#define UART_EXTINP_DSR_MASK (1 << UART_EXTINP_DSR_SHIFT)
316#define UART_EXTINP_IRSTAT(x) (1 << (x + 4))
317#define UART_EXTINP_IRMASK(x) (1 << (x + 8))
318#define UART_EXTINP_IR_RI 0
319#define UART_EXTINP_IR_CTS 1
320#define UART_EXTINP_IR_DCD 2
321#define UART_EXTINP_IR_DSR 3
322#define UART_EXTINP_RI_NOSENSE_SHIFT 16
323#define UART_EXTINP_RI_NOSENSE_MASK (1 << UART_EXTINP_RI_NOSENSE_SHIFT)
324#define UART_EXTINP_CTS_NOSENSE_SHIFT 17
325#define UART_EXTINP_CTS_NOSENSE_MASK (1 << UART_EXTINP_CTS_NOSENSE_SHIFT)
326#define UART_EXTINP_DCD_NOSENSE_SHIFT 18
327#define UART_EXTINP_DCD_NOSENSE_MASK (1 << UART_EXTINP_DCD_NOSENSE_SHIFT)
328#define UART_EXTINP_DSR_NOSENSE_SHIFT 19
329#define UART_EXTINP_DSR_NOSENSE_MASK (1 << UART_EXTINP_DSR_NOSENSE_SHIFT)
330
331/* UART Interrupt register */
332#define UART_IR_REG 0x10
333#define UART_IR_MASK(x) (1 << (x + 16))
334#define UART_IR_STAT(x) (1 << (x))
335#define UART_IR_EXTIP 0
336#define UART_IR_TXUNDER 1
337#define UART_IR_TXOVER 2
338#define UART_IR_TXTRESH 3
339#define UART_IR_TXRDLATCH 4
340#define UART_IR_TXEMPTY 5
341#define UART_IR_RXUNDER 6
342#define UART_IR_RXOVER 7
343#define UART_IR_RXTIMEOUT 8
344#define UART_IR_RXFULL 9
345#define UART_IR_RXTHRESH 10
346#define UART_IR_RXNOTEMPTY 11
347#define UART_IR_RXFRAMEERR 12
348#define UART_IR_RXPARERR 13
349#define UART_IR_RXBRK 14
350#define UART_IR_TXDONE 15
351
352/* UART Fifo register */
353#define UART_FIFO_REG 0x14
354#define UART_FIFO_VALID_SHIFT 0
355#define UART_FIFO_VALID_MASK 0xff
356#define UART_FIFO_FRAMEERR_SHIFT 8
357#define UART_FIFO_FRAMEERR_MASK (1 << UART_FIFO_FRAMEERR_SHIFT)
358#define UART_FIFO_PARERR_SHIFT 9
359#define UART_FIFO_PARERR_MASK (1 << UART_FIFO_PARERR_SHIFT)
360#define UART_FIFO_BRKDET_SHIFT 10
361#define UART_FIFO_BRKDET_MASK (1 << UART_FIFO_BRKDET_SHIFT)
362#define UART_FIFO_ANYERR_MASK (UART_FIFO_FRAMEERR_MASK | \
363 UART_FIFO_PARERR_MASK | \
364 UART_FIFO_BRKDET_MASK)
365
366
367/*************************************************************************
368 * _REG relative to RSET_GPIO
369 *************************************************************************/
370
371/* GPIO registers */
372#define GPIO_CTL_HI_REG 0x0
373#define GPIO_CTL_LO_REG 0x4
374#define GPIO_DATA_HI_REG 0x8
375#define GPIO_DATA_LO_REG 0xC
376
377/* GPIO mux registers and constants */
378#define GPIO_MODE_REG 0x18
379
380#define GPIO_MODE_6348_G4_DIAG 0x00090000
381#define GPIO_MODE_6348_G4_UTOPIA 0x00080000
382#define GPIO_MODE_6348_G4_LEGACY_LED 0x00030000
383#define GPIO_MODE_6348_G4_MII_SNOOP 0x00020000
384#define GPIO_MODE_6348_G4_EXT_EPHY 0x00010000
385#define GPIO_MODE_6348_G3_DIAG 0x00009000
386#define GPIO_MODE_6348_G3_UTOPIA 0x00008000
387#define GPIO_MODE_6348_G3_EXT_MII 0x00007000
388#define GPIO_MODE_6348_G2_DIAG 0x00000900
389#define GPIO_MODE_6348_G2_PCI 0x00000500
390#define GPIO_MODE_6348_G1_DIAG 0x00000090
391#define GPIO_MODE_6348_G1_UTOPIA 0x00000080
392#define GPIO_MODE_6348_G1_SPI_UART 0x00000060
393#define GPIO_MODE_6348_G1_SPI_MASTER 0x00000060
394#define GPIO_MODE_6348_G1_MII_PCCARD 0x00000040
395#define GPIO_MODE_6348_G1_MII_SNOOP 0x00000020
396#define GPIO_MODE_6348_G1_EXT_EPHY 0x00000010
397#define GPIO_MODE_6348_G0_DIAG 0x00000009
398#define GPIO_MODE_6348_G0_EXT_MII 0x00000007
399
400#define GPIO_MODE_6358_EXTRACS (1 << 5)
401#define GPIO_MODE_6358_UART1 (1 << 6)
402#define GPIO_MODE_6358_EXTRA_SPI_SS (1 << 7)
403#define GPIO_MODE_6358_SERIAL_LED (1 << 10)
404#define GPIO_MODE_6358_UTOPIA (1 << 12)
405
406
407/*************************************************************************
408 * _REG relative to RSET_ENET
409 *************************************************************************/
410
411/* Receiver Configuration register */
412#define ENET_RXCFG_REG 0x0
413#define ENET_RXCFG_ALLMCAST_SHIFT 1
414#define ENET_RXCFG_ALLMCAST_MASK (1 << ENET_RXCFG_ALLMCAST_SHIFT)
415#define ENET_RXCFG_PROMISC_SHIFT 3
416#define ENET_RXCFG_PROMISC_MASK (1 << ENET_RXCFG_PROMISC_SHIFT)
417#define ENET_RXCFG_LOOPBACK_SHIFT 4
418#define ENET_RXCFG_LOOPBACK_MASK (1 << ENET_RXCFG_LOOPBACK_SHIFT)
419#define ENET_RXCFG_ENFLOW_SHIFT 5
420#define ENET_RXCFG_ENFLOW_MASK (1 << ENET_RXCFG_ENFLOW_SHIFT)
421
422/* Receive Maximum Length register */
423#define ENET_RXMAXLEN_REG 0x4
424#define ENET_RXMAXLEN_SHIFT 0
425#define ENET_RXMAXLEN_MASK (0x7ff << ENET_RXMAXLEN_SHIFT)
426
427/* Transmit Maximum Length register */
428#define ENET_TXMAXLEN_REG 0x8
429#define ENET_TXMAXLEN_SHIFT 0
430#define ENET_TXMAXLEN_MASK (0x7ff << ENET_TXMAXLEN_SHIFT)
431
432/* MII Status/Control register */
433#define ENET_MIISC_REG 0x10
434#define ENET_MIISC_MDCFREQDIV_SHIFT 0
435#define ENET_MIISC_MDCFREQDIV_MASK (0x7f << ENET_MIISC_MDCFREQDIV_SHIFT)
436#define ENET_MIISC_PREAMBLEEN_SHIFT 7
437#define ENET_MIISC_PREAMBLEEN_MASK (1 << ENET_MIISC_PREAMBLEEN_SHIFT)
438
439/* MII Data register */
440#define ENET_MIIDATA_REG 0x14
441#define ENET_MIIDATA_DATA_SHIFT 0
442#define ENET_MIIDATA_DATA_MASK (0xffff << ENET_MIIDATA_DATA_SHIFT)
443#define ENET_MIIDATA_TA_SHIFT 16
444#define ENET_MIIDATA_TA_MASK (0x3 << ENET_MIIDATA_TA_SHIFT)
445#define ENET_MIIDATA_REG_SHIFT 18
446#define ENET_MIIDATA_REG_MASK (0x1f << ENET_MIIDATA_REG_SHIFT)
447#define ENET_MIIDATA_PHYID_SHIFT 23
448#define ENET_MIIDATA_PHYID_MASK (0x1f << ENET_MIIDATA_PHYID_SHIFT)
449#define ENET_MIIDATA_OP_READ_MASK (0x6 << 28)
450#define ENET_MIIDATA_OP_WRITE_MASK (0x5 << 28)
451
452/* Ethernet Interrupt Mask register */
453#define ENET_IRMASK_REG 0x18
454
455/* Ethernet Interrupt register */
456#define ENET_IR_REG 0x1c
457#define ENET_IR_MII (1 << 0)
458#define ENET_IR_MIB (1 << 1)
459#define ENET_IR_FLOWC (1 << 2)
460
461/* Ethernet Control register */
462#define ENET_CTL_REG 0x2c
463#define ENET_CTL_ENABLE_SHIFT 0
464#define ENET_CTL_ENABLE_MASK (1 << ENET_CTL_ENABLE_SHIFT)
465#define ENET_CTL_DISABLE_SHIFT 1
466#define ENET_CTL_DISABLE_MASK (1 << ENET_CTL_DISABLE_SHIFT)
467#define ENET_CTL_SRESET_SHIFT 2
468#define ENET_CTL_SRESET_MASK (1 << ENET_CTL_SRESET_SHIFT)
469#define ENET_CTL_EPHYSEL_SHIFT 3
470#define ENET_CTL_EPHYSEL_MASK (1 << ENET_CTL_EPHYSEL_SHIFT)
471
472/* Transmit Control register */
473#define ENET_TXCTL_REG 0x30
474#define ENET_TXCTL_FD_SHIFT 0
475#define ENET_TXCTL_FD_MASK (1 << ENET_TXCTL_FD_SHIFT)
476
477/* Transmit Watermask register */
478#define ENET_TXWMARK_REG 0x34
479#define ENET_TXWMARK_WM_SHIFT 0
480#define ENET_TXWMARK_WM_MASK (0x3f << ENET_TXWMARK_WM_SHIFT)
481
482/* MIB Control register */
483#define ENET_MIBCTL_REG 0x38
484#define ENET_MIBCTL_RDCLEAR_SHIFT 0
485#define ENET_MIBCTL_RDCLEAR_MASK (1 << ENET_MIBCTL_RDCLEAR_SHIFT)
486
487/* Perfect Match Data Low register */
488#define ENET_PML_REG(x) (0x58 + (x) * 8)
489#define ENET_PMH_REG(x) (0x5c + (x) * 8)
490#define ENET_PMH_DATAVALID_SHIFT 16
491#define ENET_PMH_DATAVALID_MASK (1 << ENET_PMH_DATAVALID_SHIFT)
492
493/* MIB register */
494#define ENET_MIB_REG(x) (0x200 + (x) * 4)
495#define ENET_MIB_REG_COUNT 55
496
497
498/*************************************************************************
499 * _REG relative to RSET_ENETDMA
500 *************************************************************************/
501
502/* Controller Configuration Register */
503#define ENETDMA_CFG_REG (0x0)
504#define ENETDMA_CFG_EN_SHIFT 0
505#define ENETDMA_CFG_EN_MASK (1 << ENETDMA_CFG_EN_SHIFT)
506#define ENETDMA_CFG_FLOWCH_MASK(x) (1 << ((x >> 1) + 1))
507
508/* Flow Control Descriptor Low Threshold register */
509#define ENETDMA_FLOWCL_REG(x) (0x4 + (x) * 6)
510
511/* Flow Control Descriptor High Threshold register */
512#define ENETDMA_FLOWCH_REG(x) (0x8 + (x) * 6)
513
514/* Flow Control Descriptor Buffer Alloca Threshold register */
515#define ENETDMA_BUFALLOC_REG(x) (0xc + (x) * 6)
516#define ENETDMA_BUFALLOC_FORCE_SHIFT 31
517#define ENETDMA_BUFALLOC_FORCE_MASK (1 << ENETDMA_BUFALLOC_FORCE_SHIFT)
518
519/* Channel Configuration register */
520#define ENETDMA_CHANCFG_REG(x) (0x100 + (x) * 0x10)
521#define ENETDMA_CHANCFG_EN_SHIFT 0
522#define ENETDMA_CHANCFG_EN_MASK (1 << ENETDMA_CHANCFG_EN_SHIFT)
523#define ENETDMA_CHANCFG_PKTHALT_SHIFT 1
524#define ENETDMA_CHANCFG_PKTHALT_MASK (1 << ENETDMA_CHANCFG_PKTHALT_SHIFT)
525
526/* Interrupt Control/Status register */
527#define ENETDMA_IR_REG(x) (0x104 + (x) * 0x10)
528#define ENETDMA_IR_BUFDONE_MASK (1 << 0)
529#define ENETDMA_IR_PKTDONE_MASK (1 << 1)
530#define ENETDMA_IR_NOTOWNER_MASK (1 << 2)
531
532/* Interrupt Mask register */
533#define ENETDMA_IRMASK_REG(x) (0x108 + (x) * 0x10)
534
535/* Maximum Burst Length */
536#define ENETDMA_MAXBURST_REG(x) (0x10C + (x) * 0x10)
537
538/* Ring Start Address register */
539#define ENETDMA_RSTART_REG(x) (0x200 + (x) * 0x10)
540
541/* State Ram Word 2 */
542#define ENETDMA_SRAM2_REG(x) (0x204 + (x) * 0x10)
543
544/* State Ram Word 3 */
545#define ENETDMA_SRAM3_REG(x) (0x208 + (x) * 0x10)
546
547/* State Ram Word 4 */
548#define ENETDMA_SRAM4_REG(x) (0x20c + (x) * 0x10)
549
550
551/*************************************************************************
552 * _REG relative to RSET_OHCI_PRIV
553 *************************************************************************/
554
555#define OHCI_PRIV_REG 0x0
556#define OHCI_PRIV_PORT1_HOST_SHIFT 0
557#define OHCI_PRIV_PORT1_HOST_MASK (1 << OHCI_PRIV_PORT1_HOST_SHIFT)
558#define OHCI_PRIV_REG_SWAP_SHIFT 3
559#define OHCI_PRIV_REG_SWAP_MASK (1 << OHCI_PRIV_REG_SWAP_SHIFT)
560
561
562/*************************************************************************
563 * _REG relative to RSET_USBH_PRIV
564 *************************************************************************/
565
566#define USBH_PRIV_SWAP_REG 0x0
567#define USBH_PRIV_SWAP_EHCI_ENDN_SHIFT 4
568#define USBH_PRIV_SWAP_EHCI_ENDN_MASK (1 << USBH_PRIV_SWAP_EHCI_ENDN_SHIFT)
569#define USBH_PRIV_SWAP_EHCI_DATA_SHIFT 3
570#define USBH_PRIV_SWAP_EHCI_DATA_MASK (1 << USBH_PRIV_SWAP_EHCI_DATA_SHIFT)
571#define USBH_PRIV_SWAP_OHCI_ENDN_SHIFT 1
572#define USBH_PRIV_SWAP_OHCI_ENDN_MASK (1 << USBH_PRIV_SWAP_OHCI_ENDN_SHIFT)
573#define USBH_PRIV_SWAP_OHCI_DATA_SHIFT 0
574#define USBH_PRIV_SWAP_OHCI_DATA_MASK (1 << USBH_PRIV_SWAP_OHCI_DATA_SHIFT)
575
576#define USBH_PRIV_TEST_REG 0x24
577
578
579/*************************************************************************
580 * _REG relative to RSET_MPI
581 *************************************************************************/
582
583/* well known (hard wired) chip select */
584#define MPI_CS_PCMCIA_COMMON 4
585#define MPI_CS_PCMCIA_ATTR 5
586#define MPI_CS_PCMCIA_IO 6
587
588/* Chip select base register */
589#define MPI_CSBASE_REG(x) (0x0 + (x) * 8)
590#define MPI_CSBASE_BASE_SHIFT 13
591#define MPI_CSBASE_BASE_MASK (0x1ffff << MPI_CSBASE_BASE_SHIFT)
592#define MPI_CSBASE_SIZE_SHIFT 0
593#define MPI_CSBASE_SIZE_MASK (0xf << MPI_CSBASE_SIZE_SHIFT)
594
595#define MPI_CSBASE_SIZE_8K 0
596#define MPI_CSBASE_SIZE_16K 1
597#define MPI_CSBASE_SIZE_32K 2
598#define MPI_CSBASE_SIZE_64K 3
599#define MPI_CSBASE_SIZE_128K 4
600#define MPI_CSBASE_SIZE_256K 5
601#define MPI_CSBASE_SIZE_512K 6
602#define MPI_CSBASE_SIZE_1M 7
603#define MPI_CSBASE_SIZE_2M 8
604#define MPI_CSBASE_SIZE_4M 9
605#define MPI_CSBASE_SIZE_8M 10
606#define MPI_CSBASE_SIZE_16M 11
607#define MPI_CSBASE_SIZE_32M 12
608#define MPI_CSBASE_SIZE_64M 13
609#define MPI_CSBASE_SIZE_128M 14
610#define MPI_CSBASE_SIZE_256M 15
611
612/* Chip select control register */
613#define MPI_CSCTL_REG(x) (0x4 + (x) * 8)
614#define MPI_CSCTL_ENABLE_MASK (1 << 0)
615#define MPI_CSCTL_WAIT_SHIFT 1
616#define MPI_CSCTL_WAIT_MASK (0x7 << MPI_CSCTL_WAIT_SHIFT)
617#define MPI_CSCTL_DATA16_MASK (1 << 4)
618#define MPI_CSCTL_SYNCMODE_MASK (1 << 7)
619#define MPI_CSCTL_TSIZE_MASK (1 << 8)
620#define MPI_CSCTL_ENDIANSWAP_MASK (1 << 10)
621#define MPI_CSCTL_SETUP_SHIFT 16
622#define MPI_CSCTL_SETUP_MASK (0xf << MPI_CSCTL_SETUP_SHIFT)
623#define MPI_CSCTL_HOLD_SHIFT 20
624#define MPI_CSCTL_HOLD_MASK (0xf << MPI_CSCTL_HOLD_SHIFT)
625
626/* PCI registers */
627#define MPI_SP0_RANGE_REG 0x100
628#define MPI_SP0_REMAP_REG 0x104
629#define MPI_SP0_REMAP_ENABLE_MASK (1 << 0)
630#define MPI_SP1_RANGE_REG 0x10C
631#define MPI_SP1_REMAP_REG 0x110
632#define MPI_SP1_REMAP_ENABLE_MASK (1 << 0)
633
634#define MPI_L2PCFG_REG 0x11C
635#define MPI_L2PCFG_CFG_TYPE_SHIFT 0
636#define MPI_L2PCFG_CFG_TYPE_MASK (0x3 << MPI_L2PCFG_CFG_TYPE_SHIFT)
637#define MPI_L2PCFG_REG_SHIFT 2
638#define MPI_L2PCFG_REG_MASK (0x3f << MPI_L2PCFG_REG_SHIFT)
639#define MPI_L2PCFG_FUNC_SHIFT 8
640#define MPI_L2PCFG_FUNC_MASK (0x7 << MPI_L2PCFG_FUNC_SHIFT)
641#define MPI_L2PCFG_DEVNUM_SHIFT 11
642#define MPI_L2PCFG_DEVNUM_MASK (0x1f << MPI_L2PCFG_DEVNUM_SHIFT)
643#define MPI_L2PCFG_CFG_USEREG_MASK (1 << 30)
644#define MPI_L2PCFG_CFG_SEL_MASK (1 << 31)
645
646#define MPI_L2PMEMRANGE1_REG 0x120
647#define MPI_L2PMEMBASE1_REG 0x124
648#define MPI_L2PMEMREMAP1_REG 0x128
649#define MPI_L2PMEMRANGE2_REG 0x12C
650#define MPI_L2PMEMBASE2_REG 0x130
651#define MPI_L2PMEMREMAP2_REG 0x134
652#define MPI_L2PIORANGE_REG 0x138
653#define MPI_L2PIOBASE_REG 0x13C
654#define MPI_L2PIOREMAP_REG 0x140
655#define MPI_L2P_BASE_MASK (0xffff8000)
656#define MPI_L2PREMAP_ENABLED_MASK (1 << 0)
657#define MPI_L2PREMAP_IS_CARDBUS_MASK (1 << 2)
658
659#define MPI_PCIMODESEL_REG 0x144
660#define MPI_PCIMODESEL_BAR1_NOSWAP_MASK (1 << 0)
661#define MPI_PCIMODESEL_BAR2_NOSWAP_MASK (1 << 1)
662#define MPI_PCIMODESEL_EXT_ARB_MASK (1 << 2)
663#define MPI_PCIMODESEL_PREFETCH_SHIFT 4
664#define MPI_PCIMODESEL_PREFETCH_MASK (0xf << MPI_PCIMODESEL_PREFETCH_SHIFT)
665
666#define MPI_LOCBUSCTL_REG 0x14C
667#define MPI_LOCBUSCTL_EN_PCI_GPIO_MASK (1 << 0)
668#define MPI_LOCBUSCTL_U2P_NOSWAP_MASK (1 << 1)
669
670#define MPI_LOCINT_REG 0x150
671#define MPI_LOCINT_MASK(x) (1 << (x + 16))
672#define MPI_LOCINT_STAT(x) (1 << (x))
673#define MPI_LOCINT_DIR_FAILED 6
674#define MPI_LOCINT_EXT_PCI_INT 7
675#define MPI_LOCINT_SERR 8
676#define MPI_LOCINT_CSERR 9
677
678#define MPI_PCICFGCTL_REG 0x178
679#define MPI_PCICFGCTL_CFGADDR_SHIFT 2
680#define MPI_PCICFGCTL_CFGADDR_MASK (0x1f << MPI_PCICFGCTL_CFGADDR_SHIFT)
681#define MPI_PCICFGCTL_WRITEEN_MASK (1 << 7)
682
683#define MPI_PCICFGDATA_REG 0x17C
684
685/* PCI host bridge custom register */
686#define BCMPCI_REG_TIMERS 0x40
687#define REG_TIMER_TRDY_SHIFT 0
688#define REG_TIMER_TRDY_MASK (0xff << REG_TIMER_TRDY_SHIFT)
689#define REG_TIMER_RETRY_SHIFT 8
690#define REG_TIMER_RETRY_MASK (0xff << REG_TIMER_RETRY_SHIFT)
691
692
693/*************************************************************************
694 * _REG relative to RSET_PCMCIA
695 *************************************************************************/
696
697#define PCMCIA_C1_REG 0x0
698#define PCMCIA_C1_CD1_MASK (1 << 0)
699#define PCMCIA_C1_CD2_MASK (1 << 1)
700#define PCMCIA_C1_VS1_MASK (1 << 2)
701#define PCMCIA_C1_VS2_MASK (1 << 3)
702#define PCMCIA_C1_VS1OE_MASK (1 << 6)
703#define PCMCIA_C1_VS2OE_MASK (1 << 7)
704#define PCMCIA_C1_CBIDSEL_SHIFT (8)
705#define PCMCIA_C1_CBIDSEL_MASK (0x1f << PCMCIA_C1_CBIDSEL_SHIFT)
706#define PCMCIA_C1_EN_PCMCIA_GPIO_MASK (1 << 13)
707#define PCMCIA_C1_EN_PCMCIA_MASK (1 << 14)
708#define PCMCIA_C1_EN_CARDBUS_MASK (1 << 15)
709#define PCMCIA_C1_RESET_MASK (1 << 18)
710
711#define PCMCIA_C2_REG 0x8
712#define PCMCIA_C2_DATA16_MASK (1 << 0)
713#define PCMCIA_C2_BYTESWAP_MASK (1 << 1)
714#define PCMCIA_C2_RWCOUNT_SHIFT 2
715#define PCMCIA_C2_RWCOUNT_MASK (0x3f << PCMCIA_C2_RWCOUNT_SHIFT)
716#define PCMCIA_C2_INACTIVE_SHIFT 8
717#define PCMCIA_C2_INACTIVE_MASK (0x3f << PCMCIA_C2_INACTIVE_SHIFT)
718#define PCMCIA_C2_SETUP_SHIFT 16
719#define PCMCIA_C2_SETUP_MASK (0x3f << PCMCIA_C2_SETUP_SHIFT)
720#define PCMCIA_C2_HOLD_SHIFT 24
721#define PCMCIA_C2_HOLD_MASK (0x3f << PCMCIA_C2_HOLD_SHIFT)
722
723
724/*************************************************************************
725 * _REG relative to RSET_SDRAM
726 *************************************************************************/
727
728#define SDRAM_CFG_REG 0x0
729#define SDRAM_CFG_ROW_SHIFT 4
730#define SDRAM_CFG_ROW_MASK (0x3 << SDRAM_CFG_ROW_SHIFT)
731#define SDRAM_CFG_COL_SHIFT 6
732#define SDRAM_CFG_COL_MASK (0x3 << SDRAM_CFG_COL_SHIFT)
733#define SDRAM_CFG_32B_SHIFT 10
734#define SDRAM_CFG_32B_MASK (1 << SDRAM_CFG_32B_SHIFT)
735#define SDRAM_CFG_BANK_SHIFT 13
736#define SDRAM_CFG_BANK_MASK (1 << SDRAM_CFG_BANK_SHIFT)
737
738#define SDRAM_PRIO_REG 0x2C
739#define SDRAM_PRIO_MIPS_SHIFT 29
740#define SDRAM_PRIO_MIPS_MASK (1 << SDRAM_PRIO_MIPS_SHIFT)
741#define SDRAM_PRIO_ADSL_SHIFT 30
742#define SDRAM_PRIO_ADSL_MASK (1 << SDRAM_PRIO_ADSL_SHIFT)
743#define SDRAM_PRIO_EN_SHIFT 31
744#define SDRAM_PRIO_EN_MASK (1 << SDRAM_PRIO_EN_SHIFT)
745
746
747/*************************************************************************
748 * _REG relative to RSET_MEMC
749 *************************************************************************/
750
751#define MEMC_CFG_REG 0x4
752#define MEMC_CFG_32B_SHIFT 1
753#define MEMC_CFG_32B_MASK (1 << MEMC_CFG_32B_SHIFT)
754#define MEMC_CFG_COL_SHIFT 3
755#define MEMC_CFG_COL_MASK (0x3 << MEMC_CFG_COL_SHIFT)
756#define MEMC_CFG_ROW_SHIFT 6
757#define MEMC_CFG_ROW_MASK (0x3 << MEMC_CFG_ROW_SHIFT)
758
759
760/*************************************************************************
761 * _REG relative to RSET_DDR
762 *************************************************************************/
763
764#define DDR_DMIPSPLLCFG_REG 0x18
765#define DMIPSPLLCFG_M1_SHIFT 0
766#define DMIPSPLLCFG_M1_MASK (0xff << DMIPSPLLCFG_M1_SHIFT)
767#define DMIPSPLLCFG_N1_SHIFT 23
768#define DMIPSPLLCFG_N1_MASK (0x3f << DMIPSPLLCFG_N1_SHIFT)
769#define DMIPSPLLCFG_N2_SHIFT 29
770#define DMIPSPLLCFG_N2_MASK (0x7 << DMIPSPLLCFG_N2_SHIFT)
771
772#endif /* BCM63XX_REGS_H_ */
773
diff --git a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_timer.h b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_timer.h
new file mode 100644
index 000000000000..c0fce833c9ed
--- /dev/null
+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_timer.h
@@ -0,0 +1,11 @@
1#ifndef BCM63XX_TIMER_H_
2#define BCM63XX_TIMER_H_
3
4int bcm63xx_timer_register(int id, void (*callback)(void *data), void *data);
5void bcm63xx_timer_unregister(int id);
6int bcm63xx_timer_set(int id, int monotonic, unsigned int countdown_us);
7int bcm63xx_timer_enable(int id);
8int bcm63xx_timer_disable(int id);
9unsigned int bcm63xx_timer_countdown(unsigned int countdown_us);
10
11#endif /* !BCM63XX_TIMER_H_ */
diff --git a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
new file mode 100644
index 000000000000..6479090a4106
--- /dev/null
+++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
@@ -0,0 +1,60 @@
1#ifndef BOARD_BCM963XX_H_
2#define BOARD_BCM963XX_H_
3
4#include <linux/types.h>
5#include <linux/gpio.h>
6#include <linux/leds.h>
7#include <bcm63xx_dev_enet.h>
8#include <bcm63xx_dev_dsp.h>
9
10/*
11 * flash mapping
12 */
13#define BCM963XX_CFE_VERSION_OFFSET 0x570
14#define BCM963XX_NVRAM_OFFSET 0x580
15
16/*
17 * nvram structure
18 */
19struct bcm963xx_nvram {
20 u32 version;
21 u8 reserved1[256];
22 u8 name[16];
23 u32 main_tp_number;
24 u32 psi_size;
25 u32 mac_addr_count;
26 u8 mac_addr_base[6];
27 u8 reserved2[2];
28 u32 checksum_old;
29 u8 reserved3[720];
30 u32 checksum_high;
31};
32
33/*
34 * board definition
35 */
36struct board_info {
37 u8 name[16];
38 unsigned int expected_cpu_id;
39
40 /* enabled feature/device */
41 unsigned int has_enet0:1;
42 unsigned int has_enet1:1;
43 unsigned int has_pci:1;
44 unsigned int has_pccard:1;
45 unsigned int has_ohci0:1;
46 unsigned int has_ehci0:1;
47 unsigned int has_dsp:1;
48
49 /* ethernet config */
50 struct bcm63xx_enet_platform_data enet0;
51 struct bcm63xx_enet_platform_data enet1;
52
53 /* DSP config */
54 struct bcm63xx_dsp_platform_data dsp;
55
56 /* GPIO LEDs */
57 struct gpio_led leds[5];
58};
59
60#endif /* ! BOARD_BCM963XX_H_ */
diff --git a/arch/mips/include/asm/mach-bcm63xx/cpu-feature-overrides.h b/arch/mips/include/asm/mach-bcm63xx/cpu-feature-overrides.h
new file mode 100644
index 000000000000..71742bac940d
--- /dev/null
+++ b/arch/mips/include/asm/mach-bcm63xx/cpu-feature-overrides.h
@@ -0,0 +1,51 @@
1#ifndef __ASM_MACH_BCM963XX_CPU_FEATURE_OVERRIDES_H
2#define __ASM_MACH_BCM963XX_CPU_FEATURE_OVERRIDES_H
3
4#include <bcm63xx_cpu.h>
5
6#define cpu_has_tlb 1
7#define cpu_has_4kex 1
8#define cpu_has_4k_cache 1
9#define cpu_has_fpu 0
10#define cpu_has_32fpr 0
11#define cpu_has_counter 1
12#define cpu_has_watch 0
13#define cpu_has_divec 1
14#define cpu_has_vce 0
15#define cpu_has_cache_cdex_p 0
16#define cpu_has_cache_cdex_s 0
17#define cpu_has_prefetch 1
18#define cpu_has_mcheck 1
19#define cpu_has_ejtag 1
20#define cpu_has_llsc 1
21#define cpu_has_mips16 0
22#define cpu_has_mdmx 0
23#define cpu_has_mips3d 0
24#define cpu_has_smartmips 0
25#define cpu_has_vtag_icache 0
26
27#if !defined(BCMCPU_RUNTIME_DETECT) && (defined(CONFIG_BCMCPU_IS_6348) || defined(CONFIG_CPU_IS_6338) || defined(CONFIG_CPU_IS_BCM6345))
28#define cpu_has_dc_aliases 0
29#endif
30
31#define cpu_has_ic_fills_f_dc 0
32#define cpu_has_pindexed_dcache 0
33
34#define cpu_has_mips32r1 1
35#define cpu_has_mips32r2 0
36#define cpu_has_mips64r1 0
37#define cpu_has_mips64r2 0
38
39#define cpu_has_dsp 0
40#define cpu_has_mipsmt 0
41#define cpu_has_userlocal 0
42
43#define cpu_has_nofpuex 0
44#define cpu_has_64bits 0
45#define cpu_has_64bit_zero_reg 0
46
47#define cpu_dcache_line_size() 16
48#define cpu_icache_line_size() 16
49#define cpu_scache_line_size() 0
50
51#endif /* __ASM_MACH_BCM963XX_CPU_FEATURE_OVERRIDES_H */
diff --git a/arch/mips/include/asm/mach-bcm63xx/gpio.h b/arch/mips/include/asm/mach-bcm63xx/gpio.h
new file mode 100644
index 000000000000..7cda8c0a3979
--- /dev/null
+++ b/arch/mips/include/asm/mach-bcm63xx/gpio.h
@@ -0,0 +1,15 @@
1#ifndef __ASM_MIPS_MACH_BCM63XX_GPIO_H
2#define __ASM_MIPS_MACH_BCM63XX_GPIO_H
3
4#include <bcm63xx_gpio.h>
5
6#define gpio_to_irq(gpio) NULL
7
8#define gpio_get_value __gpio_get_value
9#define gpio_set_value __gpio_set_value
10
11#define gpio_cansleep __gpio_cansleep
12
13#include <asm-generic/gpio.h>
14
15#endif /* __ASM_MIPS_MACH_BCM63XX_GPIO_H */
diff --git a/arch/mips/include/asm/mach-bcm63xx/war.h b/arch/mips/include/asm/mach-bcm63xx/war.h
new file mode 100644
index 000000000000..8e3f3fdf3209
--- /dev/null
+++ b/arch/mips/include/asm/mach-bcm63xx/war.h
@@ -0,0 +1,25 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2002, 2004, 2007 by Ralf Baechle <ralf@linux-mips.org>
7 */
8#ifndef __ASM_MIPS_MACH_BCM63XX_WAR_H
9#define __ASM_MIPS_MACH_BCM63XX_WAR_H
10
11#define R4600_V1_INDEX_ICACHEOP_WAR 0
12#define R4600_V1_HIT_CACHEOP_WAR 0
13#define R4600_V2_HIT_CACHEOP_WAR 0
14#define R5432_CP0_INTERRUPT_WAR 0
15#define BCM1250_M3_WAR 0
16#define SIBYTE_1956_WAR 0
17#define MIPS4K_ICACHE_REFILL_WAR 0
18#define MIPS_CACHE_SYNC_WAR 0
19#define TX49XX_ICACHE_INDEX_INV_WAR 0
20#define RM9000_CDEX_SMP_WAR 0
21#define ICACHE_REFILLS_WORKAROUND_WAR 0
22#define R10000_LLSC_WAR 0
23#define MIPS34K_MISSED_ITLB_WAR 0
24
25#endif /* __ASM_MIPS_MACH_BCM63XX_WAR_H */
diff --git a/arch/mips/include/asm/mach-cavium-octeon/cpu-feature-overrides.h b/arch/mips/include/asm/mach-cavium-octeon/cpu-feature-overrides.h
index 3d830756b13a..425e708d4fb9 100644
--- a/arch/mips/include/asm/mach-cavium-octeon/cpu-feature-overrides.h
+++ b/arch/mips/include/asm/mach-cavium-octeon/cpu-feature-overrides.h
@@ -31,12 +31,16 @@
31#define cpu_has_cache_cdex_s 0 31#define cpu_has_cache_cdex_s 0
32#define cpu_has_prefetch 1 32#define cpu_has_prefetch 1
33 33
34#define cpu_has_llsc 1
34/* 35/*
35 * We should disable LL/SC on non SMP systems as it is faster to 36 * We Disable LL/SC on non SMP systems as it is faster to disable
36 * disable interrupts for atomic access than a LL/SC. Unfortunatly we 37 * interrupts for atomic access than a LL/SC.
37 * cannot as this breaks asm/futex.h
38 */ 38 */
39#define cpu_has_llsc 1 39#ifdef CONFIG_SMP
40# define kernel_uses_llsc 1
41#else
42# define kernel_uses_llsc 0
43#endif
40#define cpu_has_vtag_icache 1 44#define cpu_has_vtag_icache 1
41#define cpu_has_dc_aliases 0 45#define cpu_has_dc_aliases 0
42#define cpu_has_ic_fills_f_dc 0 46#define cpu_has_ic_fills_f_dc 0
diff --git a/arch/mips/include/asm/mach-ip27/topology.h b/arch/mips/include/asm/mach-ip27/topology.h
index 07547231e078..f6837422fe65 100644
--- a/arch/mips/include/asm/mach-ip27/topology.h
+++ b/arch/mips/include/asm/mach-ip27/topology.h
@@ -24,12 +24,10 @@ extern struct cpuinfo_ip27 sn_cpu_info[NR_CPUS];
24 24
25#define cpu_to_node(cpu) (sn_cpu_info[(cpu)].p_nodeid) 25#define cpu_to_node(cpu) (sn_cpu_info[(cpu)].p_nodeid)
26#define parent_node(node) (node) 26#define parent_node(node) (node)
27#define node_to_cpumask(node) (hub_data(node)->h_cpus)
28#define cpumask_of_node(node) (&hub_data(node)->h_cpus) 27#define cpumask_of_node(node) (&hub_data(node)->h_cpus)
29struct pci_bus; 28struct pci_bus;
30extern int pcibus_to_node(struct pci_bus *); 29extern int pcibus_to_node(struct pci_bus *);
31 30
32#define pcibus_to_cpumask(bus) (cpu_online_map)
33#define cpumask_of_pcibus(bus) (cpu_online_mask) 31#define cpumask_of_pcibus(bus) (cpu_online_mask)
34 32
35extern unsigned char __node_distances[MAX_COMPACT_NODES][MAX_COMPACT_NODES]; 33extern unsigned char __node_distances[MAX_COMPACT_NODES][MAX_COMPACT_NODES];
@@ -48,7 +46,6 @@ extern unsigned char __node_distances[MAX_COMPACT_NODES][MAX_COMPACT_NODES];
48 .cache_nice_tries = 1, \ 46 .cache_nice_tries = 1, \
49 .flags = SD_LOAD_BALANCE \ 47 .flags = SD_LOAD_BALANCE \
50 | SD_BALANCE_EXEC \ 48 | SD_BALANCE_EXEC \
51 | SD_WAKE_BALANCE, \
52 .last_balance = jiffies, \ 49 .last_balance = jiffies, \
53 .balance_interval = 1, \ 50 .balance_interval = 1, \
54 .nr_balance_failed = 0, \ 51 .nr_balance_failed = 0, \
diff --git a/arch/mips/include/asm/mach-lemote/cpu-feature-overrides.h b/arch/mips/include/asm/mach-loongson/cpu-feature-overrides.h
index 550a10dc9dba..ce5b6e270e3f 100644
--- a/arch/mips/include/asm/mach-lemote/cpu-feature-overrides.h
+++ b/arch/mips/include/asm/mach-loongson/cpu-feature-overrides.h
@@ -13,8 +13,8 @@
13 * loongson2f user manual. 13 * loongson2f user manual.
14 */ 14 */
15 15
16#ifndef __ASM_MACH_LEMOTE_CPU_FEATURE_OVERRIDES_H 16#ifndef __ASM_MACH_LOONGSON_CPU_FEATURE_OVERRIDES_H
17#define __ASM_MACH_LEMOTE_CPU_FEATURE_OVERRIDES_H 17#define __ASM_MACH_LOONGSON_CPU_FEATURE_OVERRIDES_H
18 18
19#define cpu_dcache_line_size() 32 19#define cpu_dcache_line_size() 32
20#define cpu_icache_line_size() 32 20#define cpu_icache_line_size() 32
@@ -56,4 +56,4 @@
56#define cpu_has_watch 1 56#define cpu_has_watch 1
57#define cpu_icache_snoops_remote_store 1 57#define cpu_icache_snoops_remote_store 1
58 58
59#endif /* __ASM_MACH_LEMOTE_CPU_FEATURE_OVERRIDES_H */ 59#endif /* __ASM_MACH_LOONGSON_CPU_FEATURE_OVERRIDES_H */
diff --git a/arch/mips/include/asm/mach-lemote/dma-coherence.h b/arch/mips/include/asm/mach-loongson/dma-coherence.h
index c8de5e750777..71a6851ba833 100644
--- a/arch/mips/include/asm/mach-lemote/dma-coherence.h
+++ b/arch/mips/include/asm/mach-loongson/dma-coherence.h
@@ -8,8 +8,8 @@
8 * Author: Fuxin Zhang, zhangfx@lemote.com 8 * Author: Fuxin Zhang, zhangfx@lemote.com
9 * 9 *
10 */ 10 */
11#ifndef __ASM_MACH_LEMOTE_DMA_COHERENCE_H 11#ifndef __ASM_MACH_LOONGSON_DMA_COHERENCE_H
12#define __ASM_MACH_LEMOTE_DMA_COHERENCE_H 12#define __ASM_MACH_LOONGSON_DMA_COHERENCE_H
13 13
14struct device; 14struct device;
15 15
@@ -65,4 +65,4 @@ static inline int plat_device_is_coherent(struct device *dev)
65 return 0; 65 return 0;
66} 66}
67 67
68#endif /* __ASM_MACH_LEMOTE_DMA_COHERENCE_H */ 68#endif /* __ASM_MACH_LOONGSON_DMA_COHERENCE_H */
diff --git a/arch/mips/include/asm/mach-loongson/loongson.h b/arch/mips/include/asm/mach-loongson/loongson.h
new file mode 100644
index 000000000000..da70bcf2304e
--- /dev/null
+++ b/arch/mips/include/asm/mach-loongson/loongson.h
@@ -0,0 +1,64 @@
1/*
2 * Copyright (C) 2009 Lemote, Inc. & Institute of Computing Technology
3 * Author: Wu Zhangjin <wuzj@lemote.com>
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version.
9 *
10 */
11
12#ifndef __ASM_MACH_LOONGSON_LOONGSON_H
13#define __ASM_MACH_LOONGSON_LOONGSON_H
14
15#include <linux/io.h>
16#include <linux/init.h>
17
18/* there is an internal bonito64-compatiable northbridge in loongson2e/2f */
19#include <asm/mips-boards/bonito64.h>
20
21/* loongson internal northbridge initialization */
22extern void bonito_irq_init(void);
23
24/* machine-specific reboot/halt operation */
25extern void mach_prepare_reboot(void);
26extern void mach_prepare_shutdown(void);
27
28/* environment arguments from bootloader */
29extern unsigned long bus_clock, cpu_clock_freq;
30extern unsigned long memsize, highmemsize;
31
32/* loongson-specific command line, env and memory initialization */
33extern void __init prom_init_memory(void);
34extern void __init prom_init_cmdline(void);
35extern void __init prom_init_env(void);
36
37/* irq operation functions */
38extern void bonito_irqdispatch(void);
39extern void __init bonito_irq_init(void);
40extern void __init set_irq_trigger_mode(void);
41extern void __init mach_init_irq(void);
42extern void mach_irq_dispatch(unsigned int pending);
43
44/* PCI Configuration Registers */
45#define LOONGSON_PCI_ISR4C BONITO_PCI_REG(0x4c)
46
47/* PCI_Hit*_Sel_* */
48
49#define LOONGSON_PCI_HIT0_SEL_L BONITO(BONITO_REGBASE + 0x50)
50#define LOONGSON_PCI_HIT0_SEL_H BONITO(BONITO_REGBASE + 0x54)
51#define LOONGSON_PCI_HIT1_SEL_L BONITO(BONITO_REGBASE + 0x58)
52#define LOONGSON_PCI_HIT1_SEL_H BONITO(BONITO_REGBASE + 0x5c)
53#define LOONGSON_PCI_HIT2_SEL_L BONITO(BONITO_REGBASE + 0x60)
54#define LOONGSON_PCI_HIT2_SEL_H BONITO(BONITO_REGBASE + 0x64)
55
56/* PXArb Config & Status */
57
58#define LOONGSON_PXARB_CFG BONITO(BONITO_REGBASE + 0x68)
59#define LOONGSON_PXARB_STATUS BONITO(BONITO_REGBASE + 0x6c)
60
61/* loongson2-specific perf counter IRQ */
62#define LOONGSON2_PERFCNT_IRQ (MIPS_CPU_IRQ_BASE + 6)
63
64#endif /* __ASM_MACH_LOONGSON_LOONGSON_H */
diff --git a/arch/mips/include/asm/mach-loongson/machine.h b/arch/mips/include/asm/mach-loongson/machine.h
new file mode 100644
index 000000000000..206ea2067916
--- /dev/null
+++ b/arch/mips/include/asm/mach-loongson/machine.h
@@ -0,0 +1,22 @@
1/*
2 * Copyright (C) 2009 Lemote, Inc. & Institute of Computing Technology
3 * Author: Wu Zhangjin <wuzj@lemote.com>
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version.
9 */
10
11#ifndef __ASM_MACH_LOONGSON_MACHINE_H
12#define __ASM_MACH_LOONGSON_MACHINE_H
13
14#ifdef CONFIG_LEMOTE_FULOONG2E
15
16#define LOONGSON_UART_BASE (BONITO_PCIIO_BASE + 0x3f8)
17
18#define LOONGSON_MACHTYPE MACH_LEMOTE_FL2E
19
20#endif
21
22#endif /* __ASM_MACH_LOONGSON_MACHINE_H */
diff --git a/arch/mips/include/asm/mach-lemote/mc146818rtc.h b/arch/mips/include/asm/mach-loongson/mc146818rtc.h
index ed5147e11085..ed7fe978335a 100644
--- a/arch/mips/include/asm/mach-lemote/mc146818rtc.h
+++ b/arch/mips/include/asm/mach-loongson/mc146818rtc.h
@@ -7,8 +7,8 @@
7 * 7 *
8 * RTC routines for PC style attached Dallas chip. 8 * RTC routines for PC style attached Dallas chip.
9 */ 9 */
10#ifndef __ASM_MACH_LEMOTE_MC146818RTC_H 10#ifndef __ASM_MACH_LOONGSON_MC146818RTC_H
11#define __ASM_MACH_LEMOTE_MC146818RTC_H 11#define __ASM_MACH_LOONGSON_MC146818RTC_H
12 12
13#include <linux/io.h> 13#include <linux/io.h>
14 14
@@ -33,4 +33,4 @@ static inline void CMOS_WRITE(unsigned char data, unsigned long addr)
33#define mc146818_decode_year(year) ((year) < 70 ? (year) + 2000 : (year) + 1970) 33#define mc146818_decode_year(year) ((year) < 70 ? (year) + 2000 : (year) + 1970)
34#endif 34#endif
35 35
36#endif /* __ASM_MACH_LEMOTE_MC146818RTC_H */ 36#endif /* __ASM_MACH_LOONGSON_MC146818RTC_H */
diff --git a/arch/mips/include/asm/mach-loongson/mem.h b/arch/mips/include/asm/mach-loongson/mem.h
new file mode 100644
index 000000000000..bd7b3cba7e35
--- /dev/null
+++ b/arch/mips/include/asm/mach-loongson/mem.h
@@ -0,0 +1,30 @@
1/*
2 * Copyright (C) 2009 Lemote, Inc. & Institute of Computing Technology
3 * Author: Wu Zhangjin <wuzj@lemote.com>
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version.
9 */
10
11#ifndef __ASM_MACH_LOONGSON_MEM_H
12#define __ASM_MACH_LOONGSON_MEM_H
13
14/*
15 * On Lemote Loongson 2e
16 *
17 * the high memory space starts from 512M.
18 * the peripheral registers reside between 0x1000:0000 and 0x2000:0000.
19 */
20
21#ifdef CONFIG_LEMOTE_FULOONG2E
22
23#define LOONGSON_HIGHMEM_START 0x20000000
24
25#define LOONGSON_MMIO_MEM_START 0x10000000
26#define LOONGSON_MMIO_MEM_END 0x20000000
27
28#endif
29
30#endif /* __ASM_MACH_LOONGSON_MEM_H */
diff --git a/arch/mips/include/asm/mach-lemote/pci.h b/arch/mips/include/asm/mach-loongson/pci.h
index ea6aa143b78e..f1663ca81da0 100644
--- a/arch/mips/include/asm/mach-lemote/pci.h
+++ b/arch/mips/include/asm/mach-loongson/pci.h
@@ -19,12 +19,19 @@
19 * 02139, USA. 19 * 02139, USA.
20 */ 20 */
21 21
22#ifndef _LEMOTE_PCI_H_ 22#ifndef __ASM_MACH_LOONGSON_PCI_H_
23#define _LEMOTE_PCI_H_ 23#define __ASM_MACH_LOONGSON_PCI_H_
24 24
25#define LOONGSON2E_PCI_MEM_START 0x14000000UL 25extern struct pci_ops bonito64_pci_ops;
26#define LOONGSON2E_PCI_MEM_END 0x1fffffffUL
27#define LOONGSON2E_PCI_IO_START 0x00004000UL
28#define LOONGSON2E_IO_PORT_BASE 0x1fd00000UL
29 26
30#endif /* !_LEMOTE_PCI_H_ */ 27#ifdef CONFIG_LEMOTE_FULOONG2E
28
29/* this pci memory space is mapped by pcimap in pci.c */
30#define LOONGSON_PCI_MEM_START BONITO_PCILO1_BASE
31#define LOONGSON_PCI_MEM_END (BONITO_PCILO1_BASE + 0x04000000 * 2)
32/* this is an offset from mips_io_port_base */
33#define LOONGSON_PCI_IO_START 0x00004000UL
34
35#endif
36
37#endif /* !__ASM_MACH_LOONGSON_PCI_H_ */
diff --git a/arch/mips/include/asm/mach-lemote/war.h b/arch/mips/include/asm/mach-loongson/war.h
index 05f89e0f2a11..4b971c3ffd8d 100644
--- a/arch/mips/include/asm/mach-lemote/war.h
+++ b/arch/mips/include/asm/mach-loongson/war.h
@@ -5,8 +5,8 @@
5 * 5 *
6 * Copyright (C) 2002, 2004, 2007 by Ralf Baechle <ralf@linux-mips.org> 6 * Copyright (C) 2002, 2004, 2007 by Ralf Baechle <ralf@linux-mips.org>
7 */ 7 */
8#ifndef __ASM_MIPS_MACH_LEMOTE_WAR_H 8#ifndef __ASM_MACH_LOONGSON_WAR_H
9#define __ASM_MIPS_MACH_LEMOTE_WAR_H 9#define __ASM_MACH_LOONGSON_WAR_H
10 10
11#define R4600_V1_INDEX_ICACHEOP_WAR 0 11#define R4600_V1_INDEX_ICACHEOP_WAR 0
12#define R4600_V1_HIT_CACHEOP_WAR 0 12#define R4600_V1_HIT_CACHEOP_WAR 0
@@ -22,4 +22,4 @@
22#define R10000_LLSC_WAR 0 22#define R10000_LLSC_WAR 0
23#define MIPS34K_MISSED_ITLB_WAR 0 23#define MIPS34K_MISSED_ITLB_WAR 0
24 24
25#endif /* __ASM_MIPS_MACH_LEMOTE_WAR_H */ 25#endif /* __ASM_MACH_LEMOTE_WAR_H */
diff --git a/arch/mips/include/asm/mach-malta/cpu-feature-overrides.h b/arch/mips/include/asm/mach-malta/cpu-feature-overrides.h
index 7f3e3f9bd23a..2848cea42bce 100644
--- a/arch/mips/include/asm/mach-malta/cpu-feature-overrides.h
+++ b/arch/mips/include/asm/mach-malta/cpu-feature-overrides.h
@@ -28,11 +28,7 @@
28/* #define cpu_has_prefetch ? */ 28/* #define cpu_has_prefetch ? */
29#define cpu_has_mcheck 1 29#define cpu_has_mcheck 1
30/* #define cpu_has_ejtag ? */ 30/* #define cpu_has_ejtag ? */
31#ifdef CONFIG_CPU_HAS_LLSC
32#define cpu_has_llsc 1 31#define cpu_has_llsc 1
33#else
34#define cpu_has_llsc 0
35#endif
36/* #define cpu_has_vtag_icache ? */ 32/* #define cpu_has_vtag_icache ? */
37/* #define cpu_has_dc_aliases ? */ 33/* #define cpu_has_dc_aliases ? */
38/* #define cpu_has_ic_fills_f_dc ? */ 34/* #define cpu_has_ic_fills_f_dc ? */
diff --git a/arch/mips/include/asm/mips-boards/bonito64.h b/arch/mips/include/asm/mips-boards/bonito64.h
index a0f04bb99c99..a576ce044c3c 100644
--- a/arch/mips/include/asm/mips-boards/bonito64.h
+++ b/arch/mips/include/asm/mips-boards/bonito64.h
@@ -26,7 +26,7 @@
26/* offsets from base register */ 26/* offsets from base register */
27#define BONITO(x) (x) 27#define BONITO(x) (x)
28 28
29#elif defined(CONFIG_LEMOTE_FULONG) 29#elif defined(CONFIG_LEMOTE_FULOONG2E)
30 30
31#define BONITO(x) (*(volatile u32 *)((char *)CKSEG1ADDR(BONITO_REG_BASE) + (x))) 31#define BONITO(x) (*(volatile u32 *)((char *)CKSEG1ADDR(BONITO_REG_BASE) + (x)))
32#define BONITO_IRQ_BASE 32 32#define BONITO_IRQ_BASE 32
diff --git a/arch/mips/include/asm/mips-boards/generic.h b/arch/mips/include/asm/mips-boards/generic.h
index c0da1a881e3d..46c08563e532 100644
--- a/arch/mips/include/asm/mips-boards/generic.h
+++ b/arch/mips/include/asm/mips-boards/generic.h
@@ -87,8 +87,6 @@
87 87
88extern int mips_revision_sconid; 88extern int mips_revision_sconid;
89 89
90extern void mips_reboot_setup(void);
91
92#ifdef CONFIG_PCI 90#ifdef CONFIG_PCI
93extern void mips_pcibios_init(void); 91extern void mips_pcibios_init(void);
94#else 92#else
diff --git a/arch/mips/include/asm/mman.h b/arch/mips/include/asm/mman.h
index e4d6f1fb1cf7..a2250f390a29 100644
--- a/arch/mips/include/asm/mman.h
+++ b/arch/mips/include/asm/mman.h
@@ -46,6 +46,8 @@
46#define MAP_LOCKED 0x8000 /* pages are locked */ 46#define MAP_LOCKED 0x8000 /* pages are locked */
47#define MAP_POPULATE 0x10000 /* populate (prefault) pagetables */ 47#define MAP_POPULATE 0x10000 /* populate (prefault) pagetables */
48#define MAP_NONBLOCK 0x20000 /* do not block on IO */ 48#define MAP_NONBLOCK 0x20000 /* do not block on IO */
49#define MAP_STACK 0x40000 /* give out an address that is best suited for process/thread stacks */
50#define MAP_HUGETLB 0x80000 /* create a huge page mapping */
49 51
50/* 52/*
51 * Flags for msync 53 * Flags for msync
@@ -71,6 +73,9 @@
71#define MADV_DONTFORK 10 /* don't inherit across fork */ 73#define MADV_DONTFORK 10 /* don't inherit across fork */
72#define MADV_DOFORK 11 /* do inherit across fork */ 74#define MADV_DOFORK 11 /* do inherit across fork */
73 75
76#define MADV_MERGEABLE 12 /* KSM may merge identical pages */
77#define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages */
78
74/* compatibility flags */ 79/* compatibility flags */
75#define MAP_FILE 0 80#define MAP_FILE 0
76 81
diff --git a/arch/mips/include/asm/mmu_context.h b/arch/mips/include/asm/mmu_context.h
index d3bea88d8744..d9743536a621 100644
--- a/arch/mips/include/asm/mmu_context.h
+++ b/arch/mips/include/asm/mmu_context.h
@@ -178,8 +178,8 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
178 * Mark current->active_mm as not "active" anymore. 178 * Mark current->active_mm as not "active" anymore.
179 * We don't want to mislead possible IPI tlb flush routines. 179 * We don't want to mislead possible IPI tlb flush routines.
180 */ 180 */
181 cpu_clear(cpu, prev->cpu_vm_mask); 181 cpumask_clear_cpu(cpu, mm_cpumask(prev));
182 cpu_set(cpu, next->cpu_vm_mask); 182 cpumask_set_cpu(cpu, mm_cpumask(next));
183 183
184 local_irq_restore(flags); 184 local_irq_restore(flags);
185} 185}
@@ -235,8 +235,8 @@ activate_mm(struct mm_struct *prev, struct mm_struct *next)
235 TLBMISS_HANDLER_SETUP_PGD(next->pgd); 235 TLBMISS_HANDLER_SETUP_PGD(next->pgd);
236 236
237 /* mark mmu ownership change */ 237 /* mark mmu ownership change */
238 cpu_clear(cpu, prev->cpu_vm_mask); 238 cpumask_clear_cpu(cpu, mm_cpumask(prev));
239 cpu_set(cpu, next->cpu_vm_mask); 239 cpumask_set_cpu(cpu, mm_cpumask(next));
240 240
241 local_irq_restore(flags); 241 local_irq_restore(flags);
242} 242}
@@ -258,7 +258,7 @@ drop_mmu_context(struct mm_struct *mm, unsigned cpu)
258 258
259 local_irq_save(flags); 259 local_irq_save(flags);
260 260
261 if (cpu_isset(cpu, mm->cpu_vm_mask)) { 261 if (cpumask_test_cpu(cpu, mm_cpumask(mm))) {
262 get_new_mmu_context(mm, cpu); 262 get_new_mmu_context(mm, cpu);
263#ifdef CONFIG_MIPS_MT_SMTC 263#ifdef CONFIG_MIPS_MT_SMTC
264 /* See comments for similar code above */ 264 /* See comments for similar code above */
diff --git a/arch/mips/include/asm/octeon/cvmx-rnm-defs.h b/arch/mips/include/asm/octeon/cvmx-rnm-defs.h
new file mode 100644
index 000000000000..4586958c97be
--- /dev/null
+++ b/arch/mips/include/asm/octeon/cvmx-rnm-defs.h
@@ -0,0 +1,88 @@
1/***********************license start***************
2 * Author: Cavium Networks
3 *
4 * Contact: support@caviumnetworks.com
5 * This file is part of the OCTEON SDK
6 *
7 * Copyright (c) 2003-2008 Cavium Networks
8 *
9 * This file is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License, Version 2, as
11 * published by the Free Software Foundation.
12 *
13 * This file is distributed in the hope that it will be useful, but
14 * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty
15 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or
16 * NONINFRINGEMENT. See the GNU General Public License for more
17 * details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this file; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 * or visit http://www.gnu.org/licenses/.
23 *
24 * This file may also be available under a different license from Cavium.
25 * Contact Cavium Networks for more information
26 ***********************license end**************************************/
27
28#ifndef __CVMX_RNM_DEFS_H__
29#define __CVMX_RNM_DEFS_H__
30
31#include <linux/types.h>
32
33#define CVMX_RNM_BIST_STATUS \
34 CVMX_ADD_IO_SEG(0x0001180040000008ull)
35#define CVMX_RNM_CTL_STATUS \
36 CVMX_ADD_IO_SEG(0x0001180040000000ull)
37
38union cvmx_rnm_bist_status {
39 uint64_t u64;
40 struct cvmx_rnm_bist_status_s {
41 uint64_t reserved_2_63:62;
42 uint64_t rrc:1;
43 uint64_t mem:1;
44 } s;
45 struct cvmx_rnm_bist_status_s cn30xx;
46 struct cvmx_rnm_bist_status_s cn31xx;
47 struct cvmx_rnm_bist_status_s cn38xx;
48 struct cvmx_rnm_bist_status_s cn38xxp2;
49 struct cvmx_rnm_bist_status_s cn50xx;
50 struct cvmx_rnm_bist_status_s cn52xx;
51 struct cvmx_rnm_bist_status_s cn52xxp1;
52 struct cvmx_rnm_bist_status_s cn56xx;
53 struct cvmx_rnm_bist_status_s cn56xxp1;
54 struct cvmx_rnm_bist_status_s cn58xx;
55 struct cvmx_rnm_bist_status_s cn58xxp1;
56};
57
58union cvmx_rnm_ctl_status {
59 uint64_t u64;
60 struct cvmx_rnm_ctl_status_s {
61 uint64_t reserved_9_63:55;
62 uint64_t ent_sel:4;
63 uint64_t exp_ent:1;
64 uint64_t rng_rst:1;
65 uint64_t rnm_rst:1;
66 uint64_t rng_en:1;
67 uint64_t ent_en:1;
68 } s;
69 struct cvmx_rnm_ctl_status_cn30xx {
70 uint64_t reserved_4_63:60;
71 uint64_t rng_rst:1;
72 uint64_t rnm_rst:1;
73 uint64_t rng_en:1;
74 uint64_t ent_en:1;
75 } cn30xx;
76 struct cvmx_rnm_ctl_status_cn30xx cn31xx;
77 struct cvmx_rnm_ctl_status_cn30xx cn38xx;
78 struct cvmx_rnm_ctl_status_cn30xx cn38xxp2;
79 struct cvmx_rnm_ctl_status_s cn50xx;
80 struct cvmx_rnm_ctl_status_s cn52xx;
81 struct cvmx_rnm_ctl_status_s cn52xxp1;
82 struct cvmx_rnm_ctl_status_s cn56xx;
83 struct cvmx_rnm_ctl_status_s cn56xxp1;
84 struct cvmx_rnm_ctl_status_s cn58xx;
85 struct cvmx_rnm_ctl_status_s cn58xxp1;
86};
87
88#endif
diff --git a/arch/mips/include/asm/octeon/cvmx.h b/arch/mips/include/asm/octeon/cvmx.h
index e31e3fe14f8a..9d9381e2e3d8 100644
--- a/arch/mips/include/asm/octeon/cvmx.h
+++ b/arch/mips/include/asm/octeon/cvmx.h
@@ -271,7 +271,7 @@ static inline void cvmx_write_csr(uint64_t csr_addr, uint64_t val)
271 * what RSL read we do, so we choose CVMX_MIO_BOOT_BIST_STAT 271 * what RSL read we do, so we choose CVMX_MIO_BOOT_BIST_STAT
272 * because it is fast and harmless. 272 * because it is fast and harmless.
273 */ 273 */
274 if ((csr_addr >> 40) == (0x800118)) 274 if (((csr_addr >> 40) & 0x7ffff) == (0x118))
275 cvmx_read64(CVMX_MIO_BOOT_BIST_STAT); 275 cvmx_read64(CVMX_MIO_BOOT_BIST_STAT);
276} 276}
277 277
diff --git a/arch/mips/include/asm/page.h b/arch/mips/include/asm/page.h
index 4320239cf4ef..f266295cce51 100644
--- a/arch/mips/include/asm/page.h
+++ b/arch/mips/include/asm/page.h
@@ -10,6 +10,7 @@
10#define _ASM_PAGE_H 10#define _ASM_PAGE_H
11 11
12#include <spaces.h> 12#include <spaces.h>
13#include <linux/const.h>
13 14
14/* 15/*
15 * PAGE_SHIFT determines the page size 16 * PAGE_SHIFT determines the page size
@@ -29,12 +30,12 @@
29#ifdef CONFIG_PAGE_SIZE_64KB 30#ifdef CONFIG_PAGE_SIZE_64KB
30#define PAGE_SHIFT 16 31#define PAGE_SHIFT 16
31#endif 32#endif
32#define PAGE_SIZE (1UL << PAGE_SHIFT) 33#define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT)
33#define PAGE_MASK (~((1 << PAGE_SHIFT) - 1)) 34#define PAGE_MASK (~((1 << PAGE_SHIFT) - 1))
34 35
35#ifdef CONFIG_HUGETLB_PAGE 36#ifdef CONFIG_HUGETLB_PAGE
36#define HPAGE_SHIFT (PAGE_SHIFT + PAGE_SHIFT - 3) 37#define HPAGE_SHIFT (PAGE_SHIFT + PAGE_SHIFT - 3)
37#define HPAGE_SIZE ((1UL) << HPAGE_SHIFT) 38#define HPAGE_SIZE (_AC(1,UL) << HPAGE_SHIFT)
38#define HPAGE_MASK (~(HPAGE_SIZE - 1)) 39#define HPAGE_MASK (~(HPAGE_SIZE - 1))
39#define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT) 40#define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT)
40#endif /* CONFIG_HUGETLB_PAGE */ 41#endif /* CONFIG_HUGETLB_PAGE */
diff --git a/arch/mips/include/asm/pci.h b/arch/mips/include/asm/pci.h
index a68d111e55e9..5ebf82572ec0 100644
--- a/arch/mips/include/asm/pci.h
+++ b/arch/mips/include/asm/pci.h
@@ -65,8 +65,6 @@ extern int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin);
65 65
66extern unsigned int pcibios_assign_all_busses(void); 66extern unsigned int pcibios_assign_all_busses(void);
67 67
68#define pcibios_scan_all_fns(a, b) 0
69
70extern unsigned long PCIBIOS_MIN_IO; 68extern unsigned long PCIBIOS_MIN_IO;
71extern unsigned long PCIBIOS_MIN_MEM; 69extern unsigned long PCIBIOS_MIN_MEM;
72 70
diff --git a/arch/mips/include/asm/pgtable-64.h b/arch/mips/include/asm/pgtable-64.h
index 4ed9d1bba2ba..9cd508993956 100644
--- a/arch/mips/include/asm/pgtable-64.h
+++ b/arch/mips/include/asm/pgtable-64.h
@@ -109,13 +109,13 @@
109 109
110#define VMALLOC_START MAP_BASE 110#define VMALLOC_START MAP_BASE
111#define VMALLOC_END \ 111#define VMALLOC_END \
112 (VMALLOC_START + PTRS_PER_PGD * PTRS_PER_PMD * PTRS_PER_PTE * PAGE_SIZE) 112 (VMALLOC_START + \
113 PTRS_PER_PGD * PTRS_PER_PMD * PTRS_PER_PTE * PAGE_SIZE - (1UL << 32))
113#if defined(CONFIG_MODULES) && defined(KBUILD_64BIT_SYM32) && \ 114#if defined(CONFIG_MODULES) && defined(KBUILD_64BIT_SYM32) && \
114 VMALLOC_START != CKSSEG 115 VMALLOC_START != CKSSEG
115/* Load modules into 32bit-compatible segment. */ 116/* Load modules into 32bit-compatible segment. */
116#define MODULE_START CKSSEG 117#define MODULE_START CKSSEG
117#define MODULE_END (FIXADDR_START-2*PAGE_SIZE) 118#define MODULE_END (FIXADDR_START-2*PAGE_SIZE)
118extern pgd_t module_pg_dir[PTRS_PER_PGD];
119#endif 119#endif
120 120
121#define pte_ERROR(e) \ 121#define pte_ERROR(e) \
@@ -188,12 +188,7 @@ static inline void pud_clear(pud_t *pudp)
188#define __pmd_offset(address) pmd_index(address) 188#define __pmd_offset(address) pmd_index(address)
189 189
190/* to find an entry in a kernel page-table-directory */ 190/* to find an entry in a kernel page-table-directory */
191#ifdef MODULE_START 191#define pgd_offset_k(address) pgd_offset(&init_mm, address)
192#define pgd_offset_k(address) \
193 ((address) >= MODULE_START ? module_pg_dir : pgd_offset(&init_mm, 0UL))
194#else
195#define pgd_offset_k(address) pgd_offset(&init_mm, 0UL)
196#endif
197 192
198#define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD-1)) 193#define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD-1))
199#define pmd_index(address) (((address) >> PMD_SHIFT) & (PTRS_PER_PMD-1)) 194#define pmd_index(address) (((address) >> PMD_SHIFT) & (PTRS_PER_PMD-1))
diff --git a/arch/mips/include/asm/pgtable.h b/arch/mips/include/asm/pgtable.h
index 1a9f9b257551..d6eb6134abec 100644
--- a/arch/mips/include/asm/pgtable.h
+++ b/arch/mips/include/asm/pgtable.h
@@ -76,6 +76,16 @@ extern unsigned long zero_page_mask;
76#define ZERO_PAGE(vaddr) \ 76#define ZERO_PAGE(vaddr) \
77 (virt_to_page((void *)(empty_zero_page + (((unsigned long)(vaddr)) & zero_page_mask)))) 77 (virt_to_page((void *)(empty_zero_page + (((unsigned long)(vaddr)) & zero_page_mask))))
78 78
79#define is_zero_pfn is_zero_pfn
80static inline int is_zero_pfn(unsigned long pfn)
81{
82 extern unsigned long zero_pfn;
83 unsigned long offset_from_zero_pfn = pfn - zero_pfn;
84 return offset_from_zero_pfn <= (zero_page_mask >> PAGE_SHIFT);
85}
86
87#define my_zero_pfn(addr) page_to_pfn(ZERO_PAGE(addr))
88
79extern void paging_init(void); 89extern void paging_init(void);
80 90
81/* 91/*
diff --git a/arch/mips/include/asm/smp-ops.h b/arch/mips/include/asm/smp-ops.h
index fd545547b8aa..9e09af34c8a8 100644
--- a/arch/mips/include/asm/smp-ops.h
+++ b/arch/mips/include/asm/smp-ops.h
@@ -19,7 +19,7 @@ struct task_struct;
19 19
20struct plat_smp_ops { 20struct plat_smp_ops {
21 void (*send_ipi_single)(int cpu, unsigned int action); 21 void (*send_ipi_single)(int cpu, unsigned int action);
22 void (*send_ipi_mask)(cpumask_t mask, unsigned int action); 22 void (*send_ipi_mask)(const struct cpumask *mask, unsigned int action);
23 void (*init_secondary)(void); 23 void (*init_secondary)(void);
24 void (*smp_finish)(void); 24 void (*smp_finish)(void);
25 void (*cpus_done)(void); 25 void (*cpus_done)(void);
diff --git a/arch/mips/include/asm/smp.h b/arch/mips/include/asm/smp.h
index aaa2d4ab26dc..e15f11a09311 100644
--- a/arch/mips/include/asm/smp.h
+++ b/arch/mips/include/asm/smp.h
@@ -78,6 +78,6 @@ extern void play_dead(void);
78extern asmlinkage void smp_call_function_interrupt(void); 78extern asmlinkage void smp_call_function_interrupt(void);
79 79
80extern void arch_send_call_function_single_ipi(int cpu); 80extern void arch_send_call_function_single_ipi(int cpu);
81extern void arch_send_call_function_ipi(cpumask_t mask); 81extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
82 82
83#endif /* __ASM_SMP_H */ 83#endif /* __ASM_SMP_H */
diff --git a/arch/mips/include/asm/system.h b/arch/mips/include/asm/system.h
index cd30f83235bb..fcf5f98d90cc 100644
--- a/arch/mips/include/asm/system.h
+++ b/arch/mips/include/asm/system.h
@@ -32,6 +32,9 @@ extern asmlinkage void *resume(void *last, void *next, void *next_ti);
32 32
33struct task_struct; 33struct task_struct;
34 34
35extern unsigned int ll_bit;
36extern struct task_struct *ll_task;
37
35#ifdef CONFIG_MIPS_MT_FPAFF 38#ifdef CONFIG_MIPS_MT_FPAFF
36 39
37/* 40/*
@@ -63,11 +66,18 @@ do { \
63#define __mips_mt_fpaff_switch_to(prev) do { (void) (prev); } while (0) 66#define __mips_mt_fpaff_switch_to(prev) do { (void) (prev); } while (0)
64#endif 67#endif
65 68
69#define __clear_software_ll_bit() \
70do { \
71 if (!__builtin_constant_p(cpu_has_llsc) || !cpu_has_llsc) \
72 ll_bit = 0; \
73} while (0)
74
66#define switch_to(prev, next, last) \ 75#define switch_to(prev, next, last) \
67do { \ 76do { \
68 __mips_mt_fpaff_switch_to(prev); \ 77 __mips_mt_fpaff_switch_to(prev); \
69 if (cpu_has_dsp) \ 78 if (cpu_has_dsp) \
70 __save_dsp(prev); \ 79 __save_dsp(prev); \
80 __clear_software_ll_bit(); \
71 (last) = resume(prev, next, task_thread_info(next)); \ 81 (last) = resume(prev, next, task_thread_info(next)); \
72} while (0) 82} while (0)
73 83
@@ -84,7 +94,7 @@ static inline unsigned long __xchg_u32(volatile int * m, unsigned int val)
84{ 94{
85 __u32 retval; 95 __u32 retval;
86 96
87 if (cpu_has_llsc && R10000_LLSC_WAR) { 97 if (kernel_uses_llsc && R10000_LLSC_WAR) {
88 unsigned long dummy; 98 unsigned long dummy;
89 99
90 __asm__ __volatile__( 100 __asm__ __volatile__(
@@ -99,7 +109,7 @@ static inline unsigned long __xchg_u32(volatile int * m, unsigned int val)
99 : "=&r" (retval), "=m" (*m), "=&r" (dummy) 109 : "=&r" (retval), "=m" (*m), "=&r" (dummy)
100 : "R" (*m), "Jr" (val) 110 : "R" (*m), "Jr" (val)
101 : "memory"); 111 : "memory");
102 } else if (cpu_has_llsc) { 112 } else if (kernel_uses_llsc) {
103 unsigned long dummy; 113 unsigned long dummy;
104 114
105 __asm__ __volatile__( 115 __asm__ __volatile__(
@@ -136,7 +146,7 @@ static inline __u64 __xchg_u64(volatile __u64 * m, __u64 val)
136{ 146{
137 __u64 retval; 147 __u64 retval;
138 148
139 if (cpu_has_llsc && R10000_LLSC_WAR) { 149 if (kernel_uses_llsc && R10000_LLSC_WAR) {
140 unsigned long dummy; 150 unsigned long dummy;
141 151
142 __asm__ __volatile__( 152 __asm__ __volatile__(
@@ -149,7 +159,7 @@ static inline __u64 __xchg_u64(volatile __u64 * m, __u64 val)
149 : "=&r" (retval), "=m" (*m), "=&r" (dummy) 159 : "=&r" (retval), "=m" (*m), "=&r" (dummy)
150 : "R" (*m), "Jr" (val) 160 : "R" (*m), "Jr" (val)
151 : "memory"); 161 : "memory");
152 } else if (cpu_has_llsc) { 162 } else if (kernel_uses_llsc) {
153 unsigned long dummy; 163 unsigned long dummy;
154 164
155 __asm__ __volatile__( 165 __asm__ __volatile__(
diff --git a/arch/mips/include/asm/unistd.h b/arch/mips/include/asm/unistd.h
index e753a777949b..8c9dfa9e9018 100644
--- a/arch/mips/include/asm/unistd.h
+++ b/arch/mips/include/asm/unistd.h
@@ -353,7 +353,7 @@
353#define __NR_preadv (__NR_Linux + 330) 353#define __NR_preadv (__NR_Linux + 330)
354#define __NR_pwritev (__NR_Linux + 331) 354#define __NR_pwritev (__NR_Linux + 331)
355#define __NR_rt_tgsigqueueinfo (__NR_Linux + 332) 355#define __NR_rt_tgsigqueueinfo (__NR_Linux + 332)
356#define __NR_perf_counter_open (__NR_Linux + 333) 356#define __NR_perf_event_open (__NR_Linux + 333)
357#define __NR_accept4 (__NR_Linux + 334) 357#define __NR_accept4 (__NR_Linux + 334)
358 358
359/* 359/*
@@ -664,7 +664,7 @@
664#define __NR_preadv (__NR_Linux + 289) 664#define __NR_preadv (__NR_Linux + 289)
665#define __NR_pwritev (__NR_Linux + 290) 665#define __NR_pwritev (__NR_Linux + 290)
666#define __NR_rt_tgsigqueueinfo (__NR_Linux + 291) 666#define __NR_rt_tgsigqueueinfo (__NR_Linux + 291)
667#define __NR_perf_counter_open (__NR_Linux + 292) 667#define __NR_perf_event_open (__NR_Linux + 292)
668#define __NR_accept4 (__NR_Linux + 293) 668#define __NR_accept4 (__NR_Linux + 293)
669 669
670/* 670/*
@@ -979,7 +979,7 @@
979#define __NR_preadv (__NR_Linux + 293) 979#define __NR_preadv (__NR_Linux + 293)
980#define __NR_pwritev (__NR_Linux + 294) 980#define __NR_pwritev (__NR_Linux + 294)
981#define __NR_rt_tgsigqueueinfo (__NR_Linux + 295) 981#define __NR_rt_tgsigqueueinfo (__NR_Linux + 295)
982#define __NR_perf_counter_open (__NR_Linux + 296) 982#define __NR_perf_event_open (__NR_Linux + 296)
983#define __NR_accept4 (__NR_Linux + 297) 983#define __NR_accept4 (__NR_Linux + 297)
984 984
985/* 985/*
diff --git a/arch/mips/kernel/asm-offsets.c b/arch/mips/kernel/asm-offsets.c
index 8d006ec65677..2c1e1d02338b 100644
--- a/arch/mips/kernel/asm-offsets.c
+++ b/arch/mips/kernel/asm-offsets.c
@@ -183,9 +183,6 @@ void output_mm_defines(void)
183 OFFSET(MM_PGD, mm_struct, pgd); 183 OFFSET(MM_PGD, mm_struct, pgd);
184 OFFSET(MM_CONTEXT, mm_struct, context); 184 OFFSET(MM_CONTEXT, mm_struct, context);
185 BLANK(); 185 BLANK();
186 DEFINE(_PAGE_SIZE, PAGE_SIZE);
187 DEFINE(_PAGE_SHIFT, PAGE_SHIFT);
188 BLANK();
189 DEFINE(_PGD_T_SIZE, sizeof(pgd_t)); 186 DEFINE(_PGD_T_SIZE, sizeof(pgd_t));
190 DEFINE(_PMD_T_SIZE, sizeof(pmd_t)); 187 DEFINE(_PMD_T_SIZE, sizeof(pmd_t));
191 DEFINE(_PTE_T_SIZE, sizeof(pte_t)); 188 DEFINE(_PTE_T_SIZE, sizeof(pte_t));
diff --git a/arch/mips/kernel/cpu-bugs64.c b/arch/mips/kernel/cpu-bugs64.c
index 02b7713cf71c..408d0a07b3a3 100644
--- a/arch/mips/kernel/cpu-bugs64.c
+++ b/arch/mips/kernel/cpu-bugs64.c
@@ -167,7 +167,7 @@ static inline void check_mult_sh(void)
167 panic(bug64hit, !R4000_WAR ? r4kwar : nowar); 167 panic(bug64hit, !R4000_WAR ? r4kwar : nowar);
168} 168}
169 169
170static volatile int daddi_ov __cpuinitdata = 0; 170static volatile int daddi_ov __cpuinitdata;
171 171
172asmlinkage void __init do_daddi_ov(struct pt_regs *regs) 172asmlinkage void __init do_daddi_ov(struct pt_regs *regs)
173{ 173{
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c
index 1abe9905c9c1..f709657e4dcd 100644
--- a/arch/mips/kernel/cpu-probe.c
+++ b/arch/mips/kernel/cpu-probe.c
@@ -31,7 +31,7 @@
31 * The wait instruction stops the pipeline and reduces the power consumption of 31 * The wait instruction stops the pipeline and reduces the power consumption of
32 * the CPU very much. 32 * the CPU very much.
33 */ 33 */
34void (*cpu_wait)(void) = NULL; 34void (*cpu_wait)(void);
35 35
36static void r3081_wait(void) 36static void r3081_wait(void)
37{ 37{
@@ -91,16 +91,13 @@ static void rm7k_wait_irqoff(void)
91 local_irq_enable(); 91 local_irq_enable();
92} 92}
93 93
94/* The Au1xxx wait is available only if using 32khz counter or 94/*
95 * external timer source, but specifically not CP0 Counter. */ 95 * The Au1xxx wait is available only if using 32khz counter or
96int allow_au1k_wait; 96 * external timer source, but specifically not CP0 Counter.
97 97 * alchemy/common/time.c may override cpu_wait!
98 */
98static void au1k_wait(void) 99static void au1k_wait(void)
99{ 100{
100 if (!allow_au1k_wait)
101 return;
102
103 /* using the wait instruction makes CP0 counter unusable */
104 __asm__(" .set mips3 \n" 101 __asm__(" .set mips3 \n"
105 " cache 0x14, 0(%0) \n" 102 " cache 0x14, 0(%0) \n"
106 " cache 0x14, 32(%0) \n" 103 " cache 0x14, 32(%0) \n"
@@ -115,7 +112,7 @@ static void au1k_wait(void)
115 : : "r" (au1k_wait)); 112 : : "r" (au1k_wait));
116} 113}
117 114
118static int __initdata nowait = 0; 115static int __initdata nowait;
119 116
120static int __init wait_disable(char *s) 117static int __init wait_disable(char *s)
121{ 118{
@@ -159,6 +156,9 @@ void __init check_wait(void)
159 case CPU_25KF: 156 case CPU_25KF:
160 case CPU_PR4450: 157 case CPU_PR4450:
161 case CPU_BCM3302: 158 case CPU_BCM3302:
159 case CPU_BCM6338:
160 case CPU_BCM6348:
161 case CPU_BCM6358:
162 case CPU_CAVIUM_OCTEON: 162 case CPU_CAVIUM_OCTEON:
163 cpu_wait = r4k_wait; 163 cpu_wait = r4k_wait;
164 break; 164 break;
@@ -857,6 +857,7 @@ static inline void cpu_probe_broadcom(struct cpuinfo_mips *c, unsigned int cpu)
857 decode_configs(c); 857 decode_configs(c);
858 switch (c->processor_id & 0xff00) { 858 switch (c->processor_id & 0xff00) {
859 case PRID_IMP_BCM3302: 859 case PRID_IMP_BCM3302:
860 /* same as PRID_IMP_BCM6338 */
860 c->cputype = CPU_BCM3302; 861 c->cputype = CPU_BCM3302;
861 __cpu_name[cpu] = "Broadcom BCM3302"; 862 __cpu_name[cpu] = "Broadcom BCM3302";
862 break; 863 break;
@@ -864,6 +865,25 @@ static inline void cpu_probe_broadcom(struct cpuinfo_mips *c, unsigned int cpu)
864 c->cputype = CPU_BCM4710; 865 c->cputype = CPU_BCM4710;
865 __cpu_name[cpu] = "Broadcom BCM4710"; 866 __cpu_name[cpu] = "Broadcom BCM4710";
866 break; 867 break;
868 case PRID_IMP_BCM6345:
869 c->cputype = CPU_BCM6345;
870 __cpu_name[cpu] = "Broadcom BCM6345";
871 break;
872 case PRID_IMP_BCM6348:
873 c->cputype = CPU_BCM6348;
874 __cpu_name[cpu] = "Broadcom BCM6348";
875 break;
876 case PRID_IMP_BCM4350:
877 switch (c->processor_id & 0xf0) {
878 case PRID_REV_BCM6358:
879 c->cputype = CPU_BCM6358;
880 __cpu_name[cpu] = "Broadcom BCM6358";
881 break;
882 default:
883 c->cputype = CPU_UNKNOWN;
884 break;
885 }
886 break;
867 } 887 }
868} 888}
869 889
diff --git a/arch/mips/kernel/init_task.c b/arch/mips/kernel/init_task.c
index 5b457a40c784..6d6ca5305895 100644
--- a/arch/mips/kernel/init_task.c
+++ b/arch/mips/kernel/init_task.c
@@ -21,9 +21,8 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
21 * 21 *
22 * The things we do for performance.. 22 * The things we do for performance..
23 */ 23 */
24union thread_union init_thread_union 24union thread_union init_thread_union __init_task_data
25 __attribute__((__section__(".data.init_task"), 25 __attribute__((__aligned__(THREAD_SIZE))) =
26 __aligned__(THREAD_SIZE))) =
27 { INIT_THREAD_INFO(init_task) }; 26 { INIT_THREAD_INFO(init_task) };
28 27
29/* 28/*
diff --git a/arch/mips/kernel/kspd.c b/arch/mips/kernel/kspd.c
index fd6e51224034..f2397f00db43 100644
--- a/arch/mips/kernel/kspd.c
+++ b/arch/mips/kernel/kspd.c
@@ -31,7 +31,7 @@
31#include <asm/rtlx.h> 31#include <asm/rtlx.h>
32#include <asm/kspd.h> 32#include <asm/kspd.h>
33 33
34static struct workqueue_struct *workqueue = NULL; 34static struct workqueue_struct *workqueue;
35static struct work_struct work; 35static struct work_struct work;
36 36
37extern unsigned long cpu_khz; 37extern unsigned long cpu_khz;
@@ -58,7 +58,7 @@ struct mtsp_syscall_generic {
58}; 58};
59 59
60static struct list_head kspd_notifylist; 60static struct list_head kspd_notifylist;
61static int sp_stopping = 0; 61static int sp_stopping;
62 62
63/* these should match with those in the SDE kit */ 63/* these should match with those in the SDE kit */
64#define MTSP_SYSCALL_BASE 0 64#define MTSP_SYSCALL_BASE 0
@@ -328,7 +328,7 @@ static void sp_cleanup(void)
328 sys_chdir("/"); 328 sys_chdir("/");
329} 329}
330 330
331static int channel_open = 0; 331static int channel_open;
332 332
333/* the work handler */ 333/* the work handler */
334static void sp_work(struct work_struct *unused) 334static void sp_work(struct work_struct *unused)
diff --git a/arch/mips/kernel/mips-mt-fpaff.c b/arch/mips/kernel/mips-mt-fpaff.c
index 42461310b185..cbc6182b0065 100644
--- a/arch/mips/kernel/mips-mt-fpaff.c
+++ b/arch/mips/kernel/mips-mt-fpaff.c
@@ -18,7 +18,7 @@
18cpumask_t mt_fpu_cpumask; 18cpumask_t mt_fpu_cpumask;
19 19
20static int fpaff_threshold = -1; 20static int fpaff_threshold = -1;
21unsigned long mt_fpemul_threshold = 0; 21unsigned long mt_fpemul_threshold;
22 22
23/* 23/*
24 * Replacement functions for the sys_sched_setaffinity() and 24 * Replacement functions for the sys_sched_setaffinity() and
diff --git a/arch/mips/kernel/mips-mt.c b/arch/mips/kernel/mips-mt.c
index d01665a453f5..b2259e7cd829 100644
--- a/arch/mips/kernel/mips-mt.c
+++ b/arch/mips/kernel/mips-mt.c
@@ -125,10 +125,10 @@ void mips_mt_regdump(unsigned long mvpctl)
125 local_irq_restore(flags); 125 local_irq_restore(flags);
126} 126}
127 127
128static int mt_opt_norps = 0; 128static int mt_opt_norps;
129static int mt_opt_rpsctl = -1; 129static int mt_opt_rpsctl = -1;
130static int mt_opt_nblsu = -1; 130static int mt_opt_nblsu = -1;
131static int mt_opt_forceconfig7 = 0; 131static int mt_opt_forceconfig7;
132static int mt_opt_config7 = -1; 132static int mt_opt_config7 = -1;
133 133
134static int __init rps_disable(char *s) 134static int __init rps_disable(char *s)
@@ -161,8 +161,8 @@ static int __init config7_set(char *str)
161__setup("config7=", config7_set); 161__setup("config7=", config7_set);
162 162
163/* Experimental cache flush control parameters that should go away some day */ 163/* Experimental cache flush control parameters that should go away some day */
164int mt_protiflush = 0; 164int mt_protiflush;
165int mt_protdflush = 0; 165int mt_protdflush;
166int mt_n_iflushes = 1; 166int mt_n_iflushes = 1;
167int mt_n_dflushes = 1; 167int mt_n_dflushes = 1;
168 168
@@ -194,7 +194,7 @@ static int __init ndflush(char *s)
194} 194}
195__setup("ndflush=", ndflush); 195__setup("ndflush=", ndflush);
196 196
197static unsigned int itc_base = 0; 197static unsigned int itc_base;
198 198
199static int __init set_itc_base(char *str) 199static int __init set_itc_base(char *str)
200{ 200{
diff --git a/arch/mips/kernel/octeon_switch.S b/arch/mips/kernel/octeon_switch.S
index d52389672b06..3952b8323efa 100644
--- a/arch/mips/kernel/octeon_switch.S
+++ b/arch/mips/kernel/octeon_switch.S
@@ -36,9 +36,6 @@
36 .align 7 36 .align 7
37 LEAF(resume) 37 LEAF(resume)
38 .set arch=octeon 38 .set arch=octeon
39#ifndef CONFIG_CPU_HAS_LLSC
40 sw zero, ll_bit
41#endif
42 mfc0 t1, CP0_STATUS 39 mfc0 t1, CP0_STATUS
43 LONG_S t1, THREAD_STATUS(a0) 40 LONG_S t1, THREAD_STATUS(a0)
44 cpu_save_nonscratch a0 41 cpu_save_nonscratch a0
diff --git a/arch/mips/kernel/r2300_switch.S b/arch/mips/kernel/r2300_switch.S
index 656bde2e11b1..698414b7a253 100644
--- a/arch/mips/kernel/r2300_switch.S
+++ b/arch/mips/kernel/r2300_switch.S
@@ -46,9 +46,6 @@
46 * struct thread_info *next_ti) ) 46 * struct thread_info *next_ti) )
47 */ 47 */
48LEAF(resume) 48LEAF(resume)
49#ifndef CONFIG_CPU_HAS_LLSC
50 sw zero, ll_bit
51#endif
52 mfc0 t1, CP0_STATUS 49 mfc0 t1, CP0_STATUS
53 sw t1, THREAD_STATUS(a0) 50 sw t1, THREAD_STATUS(a0)
54 cpu_save_nonscratch a0 51 cpu_save_nonscratch a0
diff --git a/arch/mips/kernel/r4k_switch.S b/arch/mips/kernel/r4k_switch.S
index d9bfae53c43f..8893ee1a2368 100644
--- a/arch/mips/kernel/r4k_switch.S
+++ b/arch/mips/kernel/r4k_switch.S
@@ -45,9 +45,6 @@
45 */ 45 */
46 .align 5 46 .align 5
47 LEAF(resume) 47 LEAF(resume)
48#ifndef CONFIG_CPU_HAS_LLSC
49 sw zero, ll_bit
50#endif
51 mfc0 t1, CP0_STATUS 48 mfc0 t1, CP0_STATUS
52 LONG_S t1, THREAD_STATUS(a0) 49 LONG_S t1, THREAD_STATUS(a0)
53 cpu_save_nonscratch a0 50 cpu_save_nonscratch a0
diff --git a/arch/mips/kernel/rtlx.c b/arch/mips/kernel/rtlx.c
index 4ce93aa7b372..a10ebfdc28ae 100644
--- a/arch/mips/kernel/rtlx.c
+++ b/arch/mips/kernel/rtlx.c
@@ -57,7 +57,7 @@ static struct chan_waitqueues {
57} channel_wqs[RTLX_CHANNELS]; 57} channel_wqs[RTLX_CHANNELS];
58 58
59static struct vpe_notifications notify; 59static struct vpe_notifications notify;
60static int sp_stopping = 0; 60static int sp_stopping;
61 61
62extern void *vpe_get_shared(int index); 62extern void *vpe_get_shared(int index);
63 63
diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S
index b57082123536..fd2a9bb620d6 100644
--- a/arch/mips/kernel/scall32-o32.S
+++ b/arch/mips/kernel/scall32-o32.S
@@ -187,78 +187,6 @@ illegal_syscall:
187 j o32_syscall_exit 187 j o32_syscall_exit
188 END(handle_sys) 188 END(handle_sys)
189 189
190 LEAF(mips_atomic_set)
191 andi v0, a1, 3 # must be word aligned
192 bnez v0, bad_alignment
193
194 lw v1, TI_ADDR_LIMIT($28) # in legal address range?
195 addiu a0, a1, 4
196 or a0, a0, a1
197 and a0, a0, v1
198 bltz a0, bad_address
199
200#ifdef CONFIG_CPU_HAS_LLSC
201 /* Ok, this is the ll/sc case. World is sane :-) */
2021: ll v0, (a1)
203 move a0, a2
2042: sc a0, (a1)
205#if R10000_LLSC_WAR
206 beqzl a0, 1b
207#else
208 beqz a0, 1b
209#endif
210
211 .section __ex_table,"a"
212 PTR 1b, bad_stack
213 PTR 2b, bad_stack
214 .previous
215#else
216 sw a1, 16(sp)
217 sw a2, 20(sp)
218
219 move a0, sp
220 move a2, a1
221 li a1, 1
222 jal do_page_fault
223
224 lw a1, 16(sp)
225 lw a2, 20(sp)
226
227 /*
228 * At this point the page should be readable and writable unless
229 * there was no more memory available.
230 */
2311: lw v0, (a1)
2322: sw a2, (a1)
233
234 .section __ex_table,"a"
235 PTR 1b, no_mem
236 PTR 2b, no_mem
237 .previous
238#endif
239
240 sw zero, PT_R7(sp) # success
241 sw v0, PT_R2(sp) # result
242
243 j o32_syscall_exit # continue like a normal syscall
244
245no_mem: li v0, -ENOMEM
246 jr ra
247
248bad_address:
249 li v0, -EFAULT
250 jr ra
251
252bad_alignment:
253 li v0, -EINVAL
254 jr ra
255 END(mips_atomic_set)
256
257 LEAF(sys_sysmips)
258 beq a0, MIPS_ATOMIC_SET, mips_atomic_set
259 j _sys_sysmips
260 END(sys_sysmips)
261
262 LEAF(sys_syscall) 190 LEAF(sys_syscall)
263 subu t0, a0, __NR_O32_Linux # check syscall number 191 subu t0, a0, __NR_O32_Linux # check syscall number
264 sltiu v0, t0, __NR_O32_Linux_syscalls + 1 192 sltiu v0, t0, __NR_O32_Linux_syscalls + 1
@@ -653,7 +581,7 @@ einval: li v0, -ENOSYS
653 sys sys_preadv 6 /* 4330 */ 581 sys sys_preadv 6 /* 4330 */
654 sys sys_pwritev 6 582 sys sys_pwritev 6
655 sys sys_rt_tgsigqueueinfo 4 583 sys sys_rt_tgsigqueueinfo 4
656 sys sys_perf_counter_open 5 584 sys sys_perf_event_open 5
657 sys sys_accept4 4 585 sys sys_accept4 4
658 .endm 586 .endm
659 587
diff --git a/arch/mips/kernel/scall64-64.S b/arch/mips/kernel/scall64-64.S
index 3d866f24e064..18bf7f32c5e4 100644
--- a/arch/mips/kernel/scall64-64.S
+++ b/arch/mips/kernel/scall64-64.S
@@ -124,78 +124,6 @@ illegal_syscall:
124 j n64_syscall_exit 124 j n64_syscall_exit
125 END(handle_sys64) 125 END(handle_sys64)
126 126
127 LEAF(mips_atomic_set)
128 andi v0, a1, 3 # must be word aligned
129 bnez v0, bad_alignment
130
131 LONG_L v1, TI_ADDR_LIMIT($28) # in legal address range?
132 LONG_ADDIU a0, a1, 4
133 or a0, a0, a1
134 and a0, a0, v1
135 bltz a0, bad_address
136
137#ifdef CONFIG_CPU_HAS_LLSC
138 /* Ok, this is the ll/sc case. World is sane :-) */
1391: ll v0, (a1)
140 move a0, a2
1412: sc a0, (a1)
142#if R10000_LLSC_WAR
143 beqzl a0, 1b
144#else
145 beqz a0, 1b
146#endif
147
148 .section __ex_table,"a"
149 PTR 1b, bad_stack
150 PTR 2b, bad_stack
151 .previous
152#else
153 sw a1, 16(sp)
154 sw a2, 20(sp)
155
156 move a0, sp
157 move a2, a1
158 li a1, 1
159 jal do_page_fault
160
161 lw a1, 16(sp)
162 lw a2, 20(sp)
163
164 /*
165 * At this point the page should be readable and writable unless
166 * there was no more memory available.
167 */
1681: lw v0, (a1)
1692: sw a2, (a1)
170
171 .section __ex_table,"a"
172 PTR 1b, no_mem
173 PTR 2b, no_mem
174 .previous
175#endif
176
177 sd zero, PT_R7(sp) # success
178 sd v0, PT_R2(sp) # result
179
180 j n64_syscall_exit # continue like a normal syscall
181
182no_mem: li v0, -ENOMEM
183 jr ra
184
185bad_address:
186 li v0, -EFAULT
187 jr ra
188
189bad_alignment:
190 li v0, -EINVAL
191 jr ra
192 END(mips_atomic_set)
193
194 LEAF(sys_sysmips)
195 beq a0, MIPS_ATOMIC_SET, mips_atomic_set
196 j _sys_sysmips
197 END(sys_sysmips)
198
199 .align 3 127 .align 3
200sys_call_table: 128sys_call_table:
201 PTR sys_read /* 5000 */ 129 PTR sys_read /* 5000 */
@@ -490,6 +418,6 @@ sys_call_table:
490 PTR sys_preadv 418 PTR sys_preadv
491 PTR sys_pwritev /* 5390 */ 419 PTR sys_pwritev /* 5390 */
492 PTR sys_rt_tgsigqueueinfo 420 PTR sys_rt_tgsigqueueinfo
493 PTR sys_perf_counter_open 421 PTR sys_perf_event_open
494 PTR sys_accept4 422 PTR sys_accept4
495 .size sys_call_table,.-sys_call_table 423 .size sys_call_table,.-sys_call_table
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S
index 1a6ae124635b..6ebc07976694 100644
--- a/arch/mips/kernel/scall64-n32.S
+++ b/arch/mips/kernel/scall64-n32.S
@@ -416,6 +416,6 @@ EXPORT(sysn32_call_table)
416 PTR sys_preadv 416 PTR sys_preadv
417 PTR sys_pwritev 417 PTR sys_pwritev
418 PTR compat_sys_rt_tgsigqueueinfo /* 5295 */ 418 PTR compat_sys_rt_tgsigqueueinfo /* 5295 */
419 PTR sys_perf_counter_open 419 PTR sys_perf_event_open
420 PTR sys_accept4 420 PTR sys_accept4
421 .size sysn32_call_table,.-sysn32_call_table 421 .size sysn32_call_table,.-sysn32_call_table
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S
index cd31087a651f..9bbf9775e0bd 100644
--- a/arch/mips/kernel/scall64-o32.S
+++ b/arch/mips/kernel/scall64-o32.S
@@ -536,6 +536,6 @@ sys_call_table:
536 PTR compat_sys_preadv /* 4330 */ 536 PTR compat_sys_preadv /* 4330 */
537 PTR compat_sys_pwritev 537 PTR compat_sys_pwritev
538 PTR compat_sys_rt_tgsigqueueinfo 538 PTR compat_sys_rt_tgsigqueueinfo
539 PTR sys_perf_counter_open 539 PTR sys_perf_event_open
540 PTR sys_accept4 540 PTR sys_accept4
541 .size sys_call_table,.-sys_call_table 541 .size sys_call_table,.-sys_call_table
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
index 2950b97253b7..2b290d70083e 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -441,7 +441,7 @@ static void __init bootmem_init(void)
441 * initialization hook for anything else was introduced. 441 * initialization hook for anything else was introduced.
442 */ 442 */
443 443
444static int usermem __initdata = 0; 444static int usermem __initdata;
445 445
446static int __init early_parse_mem(char *p) 446static int __init early_parse_mem(char *p)
447{ 447{
diff --git a/arch/mips/kernel/smp-cmp.c b/arch/mips/kernel/smp-cmp.c
index ad0ff5dc4d59..cc81771b882c 100644
--- a/arch/mips/kernel/smp-cmp.c
+++ b/arch/mips/kernel/smp-cmp.c
@@ -80,11 +80,11 @@ void cmp_send_ipi_single(int cpu, unsigned int action)
80 local_irq_restore(flags); 80 local_irq_restore(flags);
81} 81}
82 82
83static void cmp_send_ipi_mask(cpumask_t mask, unsigned int action) 83static void cmp_send_ipi_mask(const struct cpumask *mask, unsigned int action)
84{ 84{
85 unsigned int i; 85 unsigned int i;
86 86
87 for_each_cpu_mask(i, mask) 87 for_each_cpu(i, mask)
88 cmp_send_ipi_single(i, action); 88 cmp_send_ipi_single(i, action);
89} 89}
90 90
@@ -171,7 +171,7 @@ void __init cmp_smp_setup(void)
171 171
172 for (i = 1; i < NR_CPUS; i++) { 172 for (i = 1; i < NR_CPUS; i++) {
173 if (amon_cpu_avail(i)) { 173 if (amon_cpu_avail(i)) {
174 cpu_set(i, cpu_possible_map); 174 set_cpu_possible(i, true);
175 __cpu_number_map[i] = ++ncpu; 175 __cpu_number_map[i] = ++ncpu;
176 __cpu_logical_map[ncpu] = i; 176 __cpu_logical_map[ncpu] = i;
177 } 177 }
diff --git a/arch/mips/kernel/smp-mt.c b/arch/mips/kernel/smp-mt.c
index 6f7ee5ac46ee..43e7cdc5ded2 100644
--- a/arch/mips/kernel/smp-mt.c
+++ b/arch/mips/kernel/smp-mt.c
@@ -70,7 +70,7 @@ static unsigned int __init smvp_vpe_init(unsigned int tc, unsigned int mvpconf0,
70 write_vpe_c0_vpeconf0(tmp); 70 write_vpe_c0_vpeconf0(tmp);
71 71
72 /* Record this as available CPU */ 72 /* Record this as available CPU */
73 cpu_set(tc, cpu_possible_map); 73 set_cpu_possible(tc, true);
74 __cpu_number_map[tc] = ++ncpu; 74 __cpu_number_map[tc] = ++ncpu;
75 __cpu_logical_map[ncpu] = tc; 75 __cpu_logical_map[ncpu] = tc;
76 } 76 }
@@ -141,11 +141,11 @@ static void vsmp_send_ipi_single(int cpu, unsigned int action)
141 local_irq_restore(flags); 141 local_irq_restore(flags);
142} 142}
143 143
144static void vsmp_send_ipi_mask(cpumask_t mask, unsigned int action) 144static void vsmp_send_ipi_mask(const struct cpumask *mask, unsigned int action)
145{ 145{
146 unsigned int i; 146 unsigned int i;
147 147
148 for_each_cpu_mask(i, mask) 148 for_each_cpu(i, mask)
149 vsmp_send_ipi_single(i, action); 149 vsmp_send_ipi_single(i, action);
150} 150}
151 151
diff --git a/arch/mips/kernel/smp-up.c b/arch/mips/kernel/smp-up.c
index 2508d55d68fd..00500fea2750 100644
--- a/arch/mips/kernel/smp-up.c
+++ b/arch/mips/kernel/smp-up.c
@@ -18,7 +18,8 @@ static void up_send_ipi_single(int cpu, unsigned int action)
18 panic(KERN_ERR "%s called", __func__); 18 panic(KERN_ERR "%s called", __func__);
19} 19}
20 20
21static inline void up_send_ipi_mask(cpumask_t mask, unsigned int action) 21static inline void up_send_ipi_mask(const struct cpumask *mask,
22 unsigned int action)
22{ 23{
23 panic(KERN_ERR "%s called", __func__); 24 panic(KERN_ERR "%s called", __func__);
24} 25}
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c
index bc7d9b05e2f4..4eb106c6a3ec 100644
--- a/arch/mips/kernel/smp.c
+++ b/arch/mips/kernel/smp.c
@@ -32,6 +32,7 @@
32#include <linux/cpumask.h> 32#include <linux/cpumask.h>
33#include <linux/cpu.h> 33#include <linux/cpu.h>
34#include <linux/err.h> 34#include <linux/err.h>
35#include <linux/smp.h>
35 36
36#include <asm/atomic.h> 37#include <asm/atomic.h>
37#include <asm/cpu.h> 38#include <asm/cpu.h>
@@ -49,8 +50,6 @@ volatile cpumask_t cpu_callin_map; /* Bitmask of started secondaries */
49int __cpu_number_map[NR_CPUS]; /* Map physical to logical */ 50int __cpu_number_map[NR_CPUS]; /* Map physical to logical */
50int __cpu_logical_map[NR_CPUS]; /* Map logical to physical */ 51int __cpu_logical_map[NR_CPUS]; /* Map logical to physical */
51 52
52extern void cpu_idle(void);
53
54/* Number of TCs (or siblings in Intel speak) per CPU core */ 53/* Number of TCs (or siblings in Intel speak) per CPU core */
55int smp_num_siblings = 1; 54int smp_num_siblings = 1;
56EXPORT_SYMBOL(smp_num_siblings); 55EXPORT_SYMBOL(smp_num_siblings);
@@ -129,7 +128,7 @@ asmlinkage __cpuinit void start_secondary(void)
129 cpu_idle(); 128 cpu_idle();
130} 129}
131 130
132void arch_send_call_function_ipi(cpumask_t mask) 131void arch_send_call_function_ipi_mask(const struct cpumask *mask)
133{ 132{
134 mp_ops->send_ipi_mask(mask, SMP_CALL_FUNCTION); 133 mp_ops->send_ipi_mask(mask, SMP_CALL_FUNCTION);
135} 134}
@@ -184,15 +183,15 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
184 mp_ops->prepare_cpus(max_cpus); 183 mp_ops->prepare_cpus(max_cpus);
185 set_cpu_sibling_map(0); 184 set_cpu_sibling_map(0);
186#ifndef CONFIG_HOTPLUG_CPU 185#ifndef CONFIG_HOTPLUG_CPU
187 cpu_present_map = cpu_possible_map; 186 init_cpu_present(&cpu_possible_map);
188#endif 187#endif
189} 188}
190 189
191/* preload SMP state for boot cpu */ 190/* preload SMP state for boot cpu */
192void __devinit smp_prepare_boot_cpu(void) 191void __devinit smp_prepare_boot_cpu(void)
193{ 192{
194 cpu_set(0, cpu_possible_map); 193 set_cpu_possible(0, true);
195 cpu_set(0, cpu_online_map); 194 set_cpu_online(0, true);
196 cpu_set(0, cpu_callin_map); 195 cpu_set(0, cpu_callin_map);
197} 196}
198 197
diff --git a/arch/mips/kernel/smtc.c b/arch/mips/kernel/smtc.c
index c16bb6d6c25c..67153a0dc267 100644
--- a/arch/mips/kernel/smtc.c
+++ b/arch/mips/kernel/smtc.c
@@ -95,14 +95,14 @@ void init_smtc_stats(void);
95 95
96/* Global SMTC Status */ 96/* Global SMTC Status */
97 97
98unsigned int smtc_status = 0; 98unsigned int smtc_status;
99 99
100/* Boot command line configuration overrides */ 100/* Boot command line configuration overrides */
101 101
102static int vpe0limit; 102static int vpe0limit;
103static int ipibuffers = 0; 103static int ipibuffers;
104static int nostlb = 0; 104static int nostlb;
105static int asidmask = 0; 105static int asidmask;
106unsigned long smtc_asid_mask = 0xff; 106unsigned long smtc_asid_mask = 0xff;
107 107
108static int __init vpe0tcs(char *str) 108static int __init vpe0tcs(char *str)
@@ -151,7 +151,7 @@ __setup("asidmask=", asidmask_set);
151 151
152#ifdef CONFIG_SMTC_IDLE_HOOK_DEBUG 152#ifdef CONFIG_SMTC_IDLE_HOOK_DEBUG
153 153
154static int hang_trig = 0; 154static int hang_trig;
155 155
156static int __init hangtrig_enable(char *s) 156static int __init hangtrig_enable(char *s)
157{ 157{
@@ -305,7 +305,7 @@ int __init smtc_build_cpu_map(int start_cpu_slot)
305 */ 305 */
306 ntcs = ((read_c0_mvpconf0() & MVPCONF0_PTC) >> MVPCONF0_PTC_SHIFT) + 1; 306 ntcs = ((read_c0_mvpconf0() & MVPCONF0_PTC) >> MVPCONF0_PTC_SHIFT) + 1;
307 for (i=start_cpu_slot; i<NR_CPUS && i<ntcs; i++) { 307 for (i=start_cpu_slot; i<NR_CPUS && i<ntcs; i++) {
308 cpu_set(i, cpu_possible_map); 308 set_cpu_possible(i, true);
309 __cpu_number_map[i] = i; 309 __cpu_number_map[i] = i;
310 __cpu_logical_map[i] = i; 310 __cpu_logical_map[i] = i;
311 } 311 }
@@ -525,8 +525,8 @@ void smtc_prepare_cpus(int cpus)
525 * Pull any physically present but unused TCs out of circulation. 525 * Pull any physically present but unused TCs out of circulation.
526 */ 526 */
527 while (tc < (((val & MVPCONF0_PTC) >> MVPCONF0_PTC_SHIFT) + 1)) { 527 while (tc < (((val & MVPCONF0_PTC) >> MVPCONF0_PTC_SHIFT) + 1)) {
528 cpu_clear(tc, cpu_possible_map); 528 set_cpu_possible(tc, false);
529 cpu_clear(tc, cpu_present_map); 529 set_cpu_present(tc, false);
530 tc++; 530 tc++;
531 } 531 }
532 532
diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c
index 8cf384644040..3fe1fcfa2e73 100644
--- a/arch/mips/kernel/syscall.c
+++ b/arch/mips/kernel/syscall.c
@@ -28,7 +28,9 @@
28#include <linux/compiler.h> 28#include <linux/compiler.h>
29#include <linux/module.h> 29#include <linux/module.h>
30#include <linux/ipc.h> 30#include <linux/ipc.h>
31#include <linux/uaccess.h>
31 32
33#include <asm/asm.h>
32#include <asm/branch.h> 34#include <asm/branch.h>
33#include <asm/cachectl.h> 35#include <asm/cachectl.h>
34#include <asm/cacheflush.h> 36#include <asm/cacheflush.h>
@@ -290,12 +292,116 @@ SYSCALL_DEFINE1(set_thread_area, unsigned long, addr)
290 return 0; 292 return 0;
291} 293}
292 294
293asmlinkage int _sys_sysmips(long cmd, long arg1, long arg2, long arg3) 295static inline int mips_atomic_set(struct pt_regs *regs,
296 unsigned long addr, unsigned long new)
294{ 297{
298 unsigned long old, tmp;
299 unsigned int err;
300
301 if (unlikely(addr & 3))
302 return -EINVAL;
303
304 if (unlikely(!access_ok(VERIFY_WRITE, addr, 4)))
305 return -EINVAL;
306
307 if (cpu_has_llsc && R10000_LLSC_WAR) {
308 __asm__ __volatile__ (
309 " li %[err], 0 \n"
310 "1: ll %[old], (%[addr]) \n"
311 " move %[tmp], %[new] \n"
312 "2: sc %[tmp], (%[addr]) \n"
313 " beqzl %[tmp], 1b \n"
314 "3: \n"
315 " .section .fixup,\"ax\" \n"
316 "4: li %[err], %[efault] \n"
317 " j 3b \n"
318 " .previous \n"
319 " .section __ex_table,\"a\" \n"
320 " "STR(PTR)" 1b, 4b \n"
321 " "STR(PTR)" 2b, 4b \n"
322 " .previous \n"
323 : [old] "=&r" (old),
324 [err] "=&r" (err),
325 [tmp] "=&r" (tmp)
326 : [addr] "r" (addr),
327 [new] "r" (new),
328 [efault] "i" (-EFAULT)
329 : "memory");
330 } else if (cpu_has_llsc) {
331 __asm__ __volatile__ (
332 " li %[err], 0 \n"
333 "1: ll %[old], (%[addr]) \n"
334 " move %[tmp], %[new] \n"
335 "2: sc %[tmp], (%[addr]) \n"
336 " bnez %[tmp], 4f \n"
337 "3: \n"
338 " .subsection 2 \n"
339 "4: b 1b \n"
340 " .previous \n"
341 " \n"
342 " .section .fixup,\"ax\" \n"
343 "5: li %[err], %[efault] \n"
344 " j 3b \n"
345 " .previous \n"
346 " .section __ex_table,\"a\" \n"
347 " "STR(PTR)" 1b, 5b \n"
348 " "STR(PTR)" 2b, 5b \n"
349 " .previous \n"
350 : [old] "=&r" (old),
351 [err] "=&r" (err),
352 [tmp] "=&r" (tmp)
353 : [addr] "r" (addr),
354 [new] "r" (new),
355 [efault] "i" (-EFAULT)
356 : "memory");
357 } else {
358 do {
359 preempt_disable();
360 ll_bit = 1;
361 ll_task = current;
362 preempt_enable();
363
364 err = __get_user(old, (unsigned int *) addr);
365 err |= __put_user(new, (unsigned int *) addr);
366 if (err)
367 break;
368 rmb();
369 } while (!ll_bit);
370 }
371
372 if (unlikely(err))
373 return err;
374
375 regs->regs[2] = old;
376 regs->regs[7] = 0; /* No error */
377
378 /*
379 * Don't let your children do this ...
380 */
381 __asm__ __volatile__(
382 " move $29, %0 \n"
383 " j syscall_exit \n"
384 : /* no outputs */
385 : "r" (regs));
386
387 /* unreached. Honestly. */
388 while (1);
389}
390
391save_static_function(sys_sysmips);
392static int __used noinline
393_sys_sysmips(nabi_no_regargs struct pt_regs regs)
394{
395 long cmd, arg1, arg2, arg3;
396
397 cmd = regs.regs[4];
398 arg1 = regs.regs[5];
399 arg2 = regs.regs[6];
400 arg3 = regs.regs[7];
401
295 switch (cmd) { 402 switch (cmd) {
296 case MIPS_ATOMIC_SET: 403 case MIPS_ATOMIC_SET:
297 printk(KERN_CRIT "How did I get here?\n"); 404 return mips_atomic_set(&regs, arg1, arg2);
298 return -EINVAL;
299 405
300 case MIPS_FIXADE: 406 case MIPS_FIXADE:
301 if (arg1 & ~3) 407 if (arg1 & ~3)
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index 08f1edf355e8..0a18b4c62afb 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -466,9 +466,8 @@ asmlinkage void do_be(struct pt_regs *regs)
466 * The ll_bit is cleared by r*_switch.S 466 * The ll_bit is cleared by r*_switch.S
467 */ 467 */
468 468
469unsigned long ll_bit; 469unsigned int ll_bit;
470 470struct task_struct *ll_task;
471static struct task_struct *ll_task = NULL;
472 471
473static inline int simulate_ll(struct pt_regs *regs, unsigned int opcode) 472static inline int simulate_ll(struct pt_regs *regs, unsigned int opcode)
474{ 473{
diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S
index 1474c18fb777..9bf0e3df7c5a 100644
--- a/arch/mips/kernel/vmlinux.lds.S
+++ b/arch/mips/kernel/vmlinux.lds.S
@@ -1,4 +1,5 @@
1#include <asm/asm-offsets.h> 1#include <asm/asm-offsets.h>
2#include <asm/page.h>
2#include <asm-generic/vmlinux.lds.h> 3#include <asm-generic/vmlinux.lds.h>
3 4
4#undef mips 5#undef mips
@@ -9,7 +10,16 @@ PHDRS {
9 text PT_LOAD FLAGS(7); /* RWX */ 10 text PT_LOAD FLAGS(7); /* RWX */
10 note PT_NOTE FLAGS(4); /* R__ */ 11 note PT_NOTE FLAGS(4); /* R__ */
11} 12}
12jiffies = JIFFIES; 13
14ifdef CONFIG_32BIT
15 ifdef CONFIG_CPU_LITTLE_ENDIAN
16 jiffies = jiffies_64;
17 else
18 jiffies = jiffies_64 + 4;
19 endif
20else
21 jiffies = jiffies_64;
22endif
13 23
14SECTIONS 24SECTIONS
15{ 25{
@@ -28,7 +38,7 @@ SECTIONS
28 /* . = 0xa800000000300000; */ 38 /* . = 0xa800000000300000; */
29 . = 0xffffffff80300000; 39 . = 0xffffffff80300000;
30#endif 40#endif
31 . = LOADADDR; 41 . = VMLINUX_LOAD_ADDRESS;
32 /* read-only */ 42 /* read-only */
33 _text = .; /* Text and read-only data */ 43 _text = .; /* Text and read-only data */
34 .text : { 44 .text : {
@@ -42,13 +52,7 @@ SECTIONS
42 } :text = 0 52 } :text = 0
43 _etext = .; /* End of text section */ 53 _etext = .; /* End of text section */
44 54
45 /* Exception table */ 55 EXCEPTION_TABLE(16)
46 . = ALIGN(16);
47 __ex_table : {
48 __start___ex_table = .;
49 *(__ex_table)
50 __stop___ex_table = .;
51 }
52 56
53 /* Exception table for data bus errors */ 57 /* Exception table for data bus errors */
54 __dbe_table : { 58 __dbe_table : {
@@ -65,20 +69,10 @@ SECTIONS
65 /* writeable */ 69 /* writeable */
66 .data : { /* Data */ 70 .data : { /* Data */
67 . = . + DATAOFFSET; /* for CONFIG_MAPPED_KERNEL */ 71 . = . + DATAOFFSET; /* for CONFIG_MAPPED_KERNEL */
68 /*
69 * This ALIGN is needed as a workaround for a bug a
70 * gcc bug upto 4.1 which limits the maximum alignment
71 * to at most 32kB and results in the following
72 * warning:
73 *
74 * CC arch/mips/kernel/init_task.o
75 * arch/mips/kernel/init_task.c:30: warning: alignment
76 * of ‘init_thread_union’ is greater than maximum
77 * object file alignment. Using 32768
78 */
79 . = ALIGN(_PAGE_SIZE);
80 *(.data.init_task)
81 72
73 INIT_TASK_DATA(PAGE_SIZE)
74 NOSAVE_DATA
75 CACHELINE_ALIGNED_DATA(1 << CONFIG_MIPS_L1_CACHE_SHIFT)
82 DATA_DATA 76 DATA_DATA
83 CONSTRUCTORS 77 CONSTRUCTORS
84 } 78 }
@@ -95,51 +89,13 @@ SECTIONS
95 .sdata : { 89 .sdata : {
96 *(.sdata) 90 *(.sdata)
97 } 91 }
98
99 . = ALIGN(_PAGE_SIZE);
100 .data_nosave : {
101 __nosave_begin = .;
102 *(.data.nosave)
103 }
104 . = ALIGN(_PAGE_SIZE);
105 __nosave_end = .;
106
107 . = ALIGN(1 << CONFIG_MIPS_L1_CACHE_SHIFT);
108 .data.cacheline_aligned : {
109 *(.data.cacheline_aligned)
110 }
111 _edata = .; /* End of data section */ 92 _edata = .; /* End of data section */
112 93
113 /* will be freed after init */ 94 /* will be freed after init */
114 . = ALIGN(_PAGE_SIZE); /* Init code and data */ 95 . = ALIGN(PAGE_SIZE); /* Init code and data */
115 __init_begin = .; 96 __init_begin = .;
116 .init.text : { 97 INIT_TEXT_SECTION(PAGE_SIZE)
117 _sinittext = .; 98 INIT_DATA_SECTION(16)
118 INIT_TEXT
119 _einittext = .;
120 }
121 .init.data : {
122 INIT_DATA
123 }
124 . = ALIGN(16);
125 .init.setup : {
126 __setup_start = .;
127 *(.init.setup)
128 __setup_end = .;
129 }
130
131 .initcall.init : {
132 __initcall_start = .;
133 INITCALLS
134 __initcall_end = .;
135 }
136
137 .con_initcall.init : {
138 __con_initcall_start = .;
139 *(.con_initcall.init)
140 __con_initcall_end = .;
141 }
142 SECURITY_INIT
143 99
144 /* .exit.text is discarded at runtime, not link time, to deal with 100 /* .exit.text is discarded at runtime, not link time, to deal with
145 * references from .rodata 101 * references from .rodata
@@ -150,29 +106,13 @@ SECTIONS
150 .exit.data : { 106 .exit.data : {
151 EXIT_DATA 107 EXIT_DATA
152 } 108 }
153#if defined(CONFIG_BLK_DEV_INITRD) 109
154 . = ALIGN(_PAGE_SIZE); 110 PERCPU(PAGE_SIZE)
155 .init.ramfs : { 111 . = ALIGN(PAGE_SIZE);
156 __initramfs_start = .;
157 *(.init.ramfs)
158 __initramfs_end = .;
159 }
160#endif
161 PERCPU(_PAGE_SIZE)
162 . = ALIGN(_PAGE_SIZE);
163 __init_end = .; 112 __init_end = .;
164 /* freed after init ends here */ 113 /* freed after init ends here */
165 114
166 __bss_start = .; /* BSS */ 115 BSS_SECTION(0, 0, 0)
167 .sbss : {
168 *(.sbss)
169 *(.scommon)
170 }
171 .bss : {
172 *(.bss)
173 *(COMMON)
174 }
175 __bss_stop = .;
176 116
177 _end = . ; 117 _end = . ;
178 118
diff --git a/arch/mips/kernel/vpe.c b/arch/mips/kernel/vpe.c
index 9a1ab7e87fd4..eb6c4c5b7fbe 100644
--- a/arch/mips/kernel/vpe.c
+++ b/arch/mips/kernel/vpe.c
@@ -74,7 +74,7 @@ static const int minor = 1; /* fixed for now */
74 74
75#ifdef CONFIG_MIPS_APSP_KSPD 75#ifdef CONFIG_MIPS_APSP_KSPD
76static struct kspd_notifications kspd_events; 76static struct kspd_notifications kspd_events;
77static int kspd_events_reqd = 0; 77static int kspd_events_reqd;
78#endif 78#endif
79 79
80/* grab the likely amount of memory we will need. */ 80/* grab the likely amount of memory we will need. */
diff --git a/arch/mips/lasat/ds1603.c b/arch/mips/lasat/ds1603.c
index 52cb1436a12a..c6fd96ff118d 100644
--- a/arch/mips/lasat/ds1603.c
+++ b/arch/mips/lasat/ds1603.c
@@ -135,7 +135,7 @@ static void rtc_end_op(void)
135 lasat_ndelay(1000); 135 lasat_ndelay(1000);
136} 136}
137 137
138unsigned long read_persistent_clock(void) 138void read_persistent_clock(struct timespec *ts)
139{ 139{
140 unsigned long word; 140 unsigned long word;
141 unsigned long flags; 141 unsigned long flags;
@@ -147,7 +147,8 @@ unsigned long read_persistent_clock(void)
147 rtc_end_op(); 147 rtc_end_op();
148 spin_unlock_irqrestore(&rtc_lock, flags); 148 spin_unlock_irqrestore(&rtc_lock, flags);
149 149
150 return word; 150 ts->tv_sec = word;
151 ts->tv_nsec = 0;
151} 152}
152 153
153int rtc_mips_set_mmss(unsigned long time) 154int rtc_mips_set_mmss(unsigned long time)
diff --git a/arch/mips/lasat/sysctl.c b/arch/mips/lasat/sysctl.c
index 8f88886feb12..b3deed8db619 100644
--- a/arch/mips/lasat/sysctl.c
+++ b/arch/mips/lasat/sysctl.c
@@ -56,12 +56,12 @@ int sysctl_lasatstring(ctl_table *table,
56 56
57 57
58/* And the same for proc */ 58/* And the same for proc */
59int proc_dolasatstring(ctl_table *table, int write, struct file *filp, 59int proc_dolasatstring(ctl_table *table, int write,
60 void *buffer, size_t *lenp, loff_t *ppos) 60 void *buffer, size_t *lenp, loff_t *ppos)
61{ 61{
62 int r; 62 int r;
63 63
64 r = proc_dostring(table, write, filp, buffer, lenp, ppos); 64 r = proc_dostring(table, write, buffer, lenp, ppos);
65 if ((!write) || r) 65 if ((!write) || r)
66 return r; 66 return r;
67 67
@@ -71,12 +71,12 @@ int proc_dolasatstring(ctl_table *table, int write, struct file *filp,
71} 71}
72 72
73/* proc function to write EEPROM after changing int entry */ 73/* proc function to write EEPROM after changing int entry */
74int proc_dolasatint(ctl_table *table, int write, struct file *filp, 74int proc_dolasatint(ctl_table *table, int write,
75 void *buffer, size_t *lenp, loff_t *ppos) 75 void *buffer, size_t *lenp, loff_t *ppos)
76{ 76{
77 int r; 77 int r;
78 78
79 r = proc_dointvec(table, write, filp, buffer, lenp, ppos); 79 r = proc_dointvec(table, write, buffer, lenp, ppos);
80 if ((!write) || r) 80 if ((!write) || r)
81 return r; 81 return r;
82 82
@@ -89,18 +89,20 @@ int proc_dolasatint(ctl_table *table, int write, struct file *filp,
89static int rtctmp; 89static int rtctmp;
90 90
91/* proc function to read/write RealTime Clock */ 91/* proc function to read/write RealTime Clock */
92int proc_dolasatrtc(ctl_table *table, int write, struct file *filp, 92int proc_dolasatrtc(ctl_table *table, int write,
93 void *buffer, size_t *lenp, loff_t *ppos) 93 void *buffer, size_t *lenp, loff_t *ppos)
94{ 94{
95 struct timespec ts;
95 int r; 96 int r;
96 97
97 if (!write) { 98 if (!write) {
98 rtctmp = read_persistent_clock(); 99 read_persistent_clock(&ts);
100 rtctmp = ts.tv_sec;
99 /* check for time < 0 and set to 0 */ 101 /* check for time < 0 and set to 0 */
100 if (rtctmp < 0) 102 if (rtctmp < 0)
101 rtctmp = 0; 103 rtctmp = 0;
102 } 104 }
103 r = proc_dointvec(table, write, filp, buffer, lenp, ppos); 105 r = proc_dointvec(table, write, buffer, lenp, ppos);
104 if (r) 106 if (r)
105 return r; 107 return r;
106 108
@@ -134,9 +136,11 @@ int sysctl_lasat_rtc(ctl_table *table,
134 void *oldval, size_t *oldlenp, 136 void *oldval, size_t *oldlenp,
135 void *newval, size_t newlen) 137 void *newval, size_t newlen)
136{ 138{
139 struct timespec ts;
137 int r; 140 int r;
138 141
139 rtctmp = read_persistent_clock(); 142 read_persistent_clock(&ts);
143 rtctmp = ts.tv_sec;
140 if (rtctmp < 0) 144 if (rtctmp < 0)
141 rtctmp = 0; 145 rtctmp = 0;
142 r = sysctl_intvec(table, oldval, oldlenp, newval, newlen); 146 r = sysctl_intvec(table, oldval, oldlenp, newval, newlen);
@@ -150,7 +154,7 @@ int sysctl_lasat_rtc(ctl_table *table,
150#endif 154#endif
151 155
152#ifdef CONFIG_INET 156#ifdef CONFIG_INET
153int proc_lasat_ip(ctl_table *table, int write, struct file *filp, 157int proc_lasat_ip(ctl_table *table, int write,
154 void *buffer, size_t *lenp, loff_t *ppos) 158 void *buffer, size_t *lenp, loff_t *ppos)
155{ 159{
156 unsigned int ip; 160 unsigned int ip;
@@ -227,12 +231,12 @@ static int sysctl_lasat_prid(ctl_table *table,
227 return 0; 231 return 0;
228} 232}
229 233
230int proc_lasat_prid(ctl_table *table, int write, struct file *filp, 234int proc_lasat_prid(ctl_table *table, int write,
231 void *buffer, size_t *lenp, loff_t *ppos) 235 void *buffer, size_t *lenp, loff_t *ppos)
232{ 236{
233 int r; 237 int r;
234 238
235 r = proc_dointvec(table, write, filp, buffer, lenp, ppos); 239 r = proc_dointvec(table, write, buffer, lenp, ppos);
236 if (r < 0) 240 if (r < 0)
237 return r; 241 return r;
238 if (write) { 242 if (write) {
diff --git a/arch/mips/lemote/lm2e/Makefile b/arch/mips/lemote/lm2e/Makefile
deleted file mode 100644
index d34671d1b899..000000000000
--- a/arch/mips/lemote/lm2e/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
1#
2# Makefile for Lemote Fulong mini-PC board.
3#
4
5obj-y += setup.o prom.o reset.o irq.o pci.o bonito-irq.o dbg_io.o mem.o
6
7EXTRA_CFLAGS += -Werror
diff --git a/arch/mips/lemote/lm2e/dbg_io.c b/arch/mips/lemote/lm2e/dbg_io.c
deleted file mode 100644
index 6c95da3ca76f..000000000000
--- a/arch/mips/lemote/lm2e/dbg_io.c
+++ /dev/null
@@ -1,146 +0,0 @@
1/*
2 * Copyright 2001 MontaVista Software Inc.
3 * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net
4 * Copyright (C) 2000, 2001 Ralf Baechle (ralf@gnu.org)
5 *
6 * Copyright (C) 2007 Lemote Inc. & Insititute of Computing Technology
7 * Author: Fuxin Zhang, zhangfx@lemote.com
8 *
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the
11 * Free Software Foundation; either version 2 of the License, or (at your
12 * option) any later version.
13 *
14 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
15 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
16 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
17 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
20 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
21 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 *
25 * You should have received a copy of the GNU General Public License along
26 * with this program; if not, write to the Free Software Foundation, Inc.,
27 * 675 Mass Ave, Cambridge, MA 02139, USA.
28 *
29 */
30
31#include <linux/io.h>
32#include <linux/init.h>
33#include <linux/types.h>
34
35#include <asm/serial.h>
36
37#define UART16550_BAUD_2400 2400
38#define UART16550_BAUD_4800 4800
39#define UART16550_BAUD_9600 9600
40#define UART16550_BAUD_19200 19200
41#define UART16550_BAUD_38400 38400
42#define UART16550_BAUD_57600 57600
43#define UART16550_BAUD_115200 115200
44
45#define UART16550_PARITY_NONE 0
46#define UART16550_PARITY_ODD 0x08
47#define UART16550_PARITY_EVEN 0x18
48#define UART16550_PARITY_MARK 0x28
49#define UART16550_PARITY_SPACE 0x38
50
51#define UART16550_DATA_5BIT 0x0
52#define UART16550_DATA_6BIT 0x1
53#define UART16550_DATA_7BIT 0x2
54#define UART16550_DATA_8BIT 0x3
55
56#define UART16550_STOP_1BIT 0x0
57#define UART16550_STOP_2BIT 0x4
58
59/* ----------------------------------------------------- */
60
61/* === CONFIG === */
62#ifdef CONFIG_64BIT
63#define BASE (0xffffffffbfd003f8)
64#else
65#define BASE (0xbfd003f8)
66#endif
67
68#define MAX_BAUD BASE_BAUD
69/* === END OF CONFIG === */
70
71#define REG_OFFSET 1
72
73/* register offset */
74#define OFS_RCV_BUFFER 0
75#define OFS_TRANS_HOLD 0
76#define OFS_SEND_BUFFER 0
77#define OFS_INTR_ENABLE (1*REG_OFFSET)
78#define OFS_INTR_ID (2*REG_OFFSET)
79#define OFS_DATA_FORMAT (3*REG_OFFSET)
80#define OFS_LINE_CONTROL (3*REG_OFFSET)
81#define OFS_MODEM_CONTROL (4*REG_OFFSET)
82#define OFS_RS232_OUTPUT (4*REG_OFFSET)
83#define OFS_LINE_STATUS (5*REG_OFFSET)
84#define OFS_MODEM_STATUS (6*REG_OFFSET)
85#define OFS_RS232_INPUT (6*REG_OFFSET)
86#define OFS_SCRATCH_PAD (7*REG_OFFSET)
87
88#define OFS_DIVISOR_LSB (0*REG_OFFSET)
89#define OFS_DIVISOR_MSB (1*REG_OFFSET)
90
91/* memory-mapped read/write of the port */
92#define UART16550_READ(y) readb((char *)BASE + (y))
93#define UART16550_WRITE(y, z) writeb(z, (char *)BASE + (y))
94
95void debugInit(u32 baud, u8 data, u8 parity, u8 stop)
96{
97 u32 divisor;
98
99 /* disable interrupts */
100 UART16550_WRITE(OFS_INTR_ENABLE, 0);
101
102 /* set up buad rate */
103 /* set DIAB bit */
104 UART16550_WRITE(OFS_LINE_CONTROL, 0x80);
105
106 /* set divisor */
107 divisor = MAX_BAUD / baud;
108 UART16550_WRITE(OFS_DIVISOR_LSB, divisor & 0xff);
109 UART16550_WRITE(OFS_DIVISOR_MSB, (divisor & 0xff00) >> 8);
110
111 /* clear DIAB bit */
112 UART16550_WRITE(OFS_LINE_CONTROL, 0x0);
113
114 /* set data format */
115 UART16550_WRITE(OFS_DATA_FORMAT, data | parity | stop);
116}
117
118static int remoteDebugInitialized;
119
120u8 getDebugChar(void)
121{
122 if (!remoteDebugInitialized) {
123 remoteDebugInitialized = 1;
124 debugInit(UART16550_BAUD_115200,
125 UART16550_DATA_8BIT,
126 UART16550_PARITY_NONE, UART16550_STOP_1BIT);
127 }
128
129 while ((UART16550_READ(OFS_LINE_STATUS) & 0x1) == 0) ;
130 return UART16550_READ(OFS_RCV_BUFFER);
131}
132
133int putDebugChar(u8 byte)
134{
135 if (!remoteDebugInitialized) {
136 remoteDebugInitialized = 1;
137 /*
138 debugInit(UART16550_BAUD_115200,
139 UART16550_DATA_8BIT,
140 UART16550_PARITY_NONE, UART16550_STOP_1BIT); */
141 }
142
143 while ((UART16550_READ(OFS_LINE_STATUS) & 0x20) == 0) ;
144 UART16550_WRITE(OFS_SEND_BUFFER, byte);
145 return 1;
146}
diff --git a/arch/mips/lemote/lm2e/irq.c b/arch/mips/lemote/lm2e/irq.c
deleted file mode 100644
index 1d0a09f3b832..000000000000
--- a/arch/mips/lemote/lm2e/irq.c
+++ /dev/null
@@ -1,143 +0,0 @@
1/*
2 * Copyright (C) 2007 Lemote Inc. & Insititute of Computing Technology
3 * Author: Fuxin Zhang, zhangfx@lemote.com
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version.
9 *
10 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
11 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
13 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
14 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
15 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
16 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
17 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
18 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
19 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
20 *
21 * You should have received a copy of the GNU General Public License along
22 * with this program; if not, write to the Free Software Foundation, Inc.,
23 * 675 Mass Ave, Cambridge, MA 02139, USA.
24 *
25 */
26#include <linux/delay.h>
27#include <linux/io.h>
28#include <linux/init.h>
29#include <linux/interrupt.h>
30#include <linux/irq.h>
31
32#include <asm/irq_cpu.h>
33#include <asm/i8259.h>
34#include <asm/mipsregs.h>
35#include <asm/mips-boards/bonito64.h>
36
37
38/*
39 * the first level int-handler will jump here if it is a bonito irq
40 */
41static void bonito_irqdispatch(void)
42{
43 u32 int_status;
44 int i;
45
46 /* workaround the IO dma problem: let cpu looping to allow DMA finish */
47 int_status = BONITO_INTISR;
48 if (int_status & (1 << 10)) {
49 while (int_status & (1 << 10)) {
50 udelay(1);
51 int_status = BONITO_INTISR;
52 }
53 }
54
55 /* Get pending sources, masked by current enables */
56 int_status = BONITO_INTISR & BONITO_INTEN;
57
58 if (int_status != 0) {
59 i = __ffs(int_status);
60 int_status &= ~(1 << i);
61 do_IRQ(BONITO_IRQ_BASE + i);
62 }
63}
64
65static void i8259_irqdispatch(void)
66{
67 int irq;
68
69 irq = i8259_irq();
70 if (irq >= 0) {
71 do_IRQ(irq);
72 } else {
73 spurious_interrupt();
74 }
75
76}
77
78asmlinkage void plat_irq_dispatch(void)
79{
80 unsigned int pending = read_c0_cause() & read_c0_status() & ST0_IM;
81
82 if (pending & CAUSEF_IP7) {
83 do_IRQ(MIPS_CPU_IRQ_BASE + 7);
84 } else if (pending & CAUSEF_IP5) {
85 i8259_irqdispatch();
86 } else if (pending & CAUSEF_IP2) {
87 bonito_irqdispatch();
88 } else {
89 spurious_interrupt();
90 }
91}
92
93static struct irqaction cascade_irqaction = {
94 .handler = no_action,
95 .name = "cascade",
96};
97
98void __init arch_init_irq(void)
99{
100 extern void bonito_irq_init(void);
101
102 /*
103 * Clear all of the interrupts while we change the able around a bit.
104 * int-handler is not on bootstrap
105 */
106 clear_c0_status(ST0_IM | ST0_BEV);
107 local_irq_disable();
108
109 /* most bonito irq should be level triggered */
110 BONITO_INTEDGE = BONITO_ICU_SYSTEMERR | BONITO_ICU_MASTERERR |
111 BONITO_ICU_RETRYERR | BONITO_ICU_MBOXES;
112 BONITO_INTSTEER = 0;
113
114 /*
115 * Mask out all interrupt by writing "1" to all bit position in
116 * the interrupt reset reg.
117 */
118 BONITO_INTENCLR = ~0;
119
120 /* init all controller
121 * 0-15 ------> i8259 interrupt
122 * 16-23 ------> mips cpu interrupt
123 * 32-63 ------> bonito irq
124 */
125
126 /* Sets the first-level interrupt dispatcher. */
127 mips_cpu_irq_init();
128 init_i8259_irqs();
129 bonito_irq_init();
130
131 /*
132 printk("GPIODATA=%x, GPIOIE=%x\n", BONITO_GPIODATA, BONITO_GPIOIE);
133 printk("INTEN=%x, INTSET=%x, INTCLR=%x, INTISR=%x\n",
134 BONITO_INTEN, BONITO_INTENSET,
135 BONITO_INTENCLR, BONITO_INTISR);
136 */
137
138 /* bonito irq at IP2 */
139 setup_irq(MIPS_CPU_IRQ_BASE + 2, &cascade_irqaction);
140 /* 8259 irq at IP5 */
141 setup_irq(MIPS_CPU_IRQ_BASE + 5, &cascade_irqaction);
142
143}
diff --git a/arch/mips/lemote/lm2e/pci.c b/arch/mips/lemote/lm2e/pci.c
deleted file mode 100644
index 8be03a8e1ad4..000000000000
--- a/arch/mips/lemote/lm2e/pci.c
+++ /dev/null
@@ -1,97 +0,0 @@
1/*
2 * pci.c
3 *
4 * Copyright (C) 2007 Lemote, Inc. & Institute of Computing Technology
5 * Author: Fuxin Zhang, zhangfx@lemote.com
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 *
12 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
13 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
14 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
15 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
16 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
17 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
18 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
19 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
20 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
21 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22 *
23 * You should have received a copy of the GNU General Public License along
24 * with this program; if not, write to the Free Software Foundation, Inc.,
25 * 675 Mass Ave, Cambridge, MA 02139, USA.
26 *
27 */
28#include <linux/types.h>
29#include <linux/pci.h>
30#include <linux/kernel.h>
31#include <linux/init.h>
32#include <asm/mips-boards/bonito64.h>
33#include <asm/mach-lemote/pci.h>
34
35extern struct pci_ops bonito64_pci_ops;
36
37static struct resource loongson2e_pci_mem_resource = {
38 .name = "LOONGSON2E PCI MEM",
39 .start = LOONGSON2E_PCI_MEM_START,
40 .end = LOONGSON2E_PCI_MEM_END,
41 .flags = IORESOURCE_MEM,
42};
43
44static struct resource loongson2e_pci_io_resource = {
45 .name = "LOONGSON2E PCI IO MEM",
46 .start = LOONGSON2E_PCI_IO_START,
47 .end = IO_SPACE_LIMIT,
48 .flags = IORESOURCE_IO,
49};
50
51static struct pci_controller loongson2e_pci_controller = {
52 .pci_ops = &bonito64_pci_ops,
53 .io_resource = &loongson2e_pci_io_resource,
54 .mem_resource = &loongson2e_pci_mem_resource,
55 .mem_offset = 0x00000000UL,
56 .io_offset = 0x00000000UL,
57};
58
59static void __init ict_pcimap(void)
60{
61 /*
62 * local to PCI mapping: [256M,512M] -> [256M,512M]; differ from PMON
63 *
64 * CPU address space [256M,448M] is window for accessing pci space
65 * we set pcimap_lo[0,1,2] to map it to pci space [256M,448M]
66 * pcimap: bit18,pcimap_2; bit[17-12],lo2;bit[11-6],lo1;bit[5-0],lo0
67 */
68 /* 1,00 0110 ,0001 01,00 0000 */
69 BONITO_PCIMAP = 0x46140;
70
71 /* 1, 00 0010, 0000,01, 00 0000 */
72 /* BONITO_PCIMAP = 0x42040; */
73
74 /*
75 * PCI to local mapping: [2G,2G+256M] -> [0,256M]
76 */
77 BONITO_PCIBASE0 = 0x80000000;
78 BONITO_PCIBASE1 = 0x00800000;
79 BONITO_PCIBASE2 = 0x90000000;
80
81}
82
83static int __init pcibios_init(void)
84{
85 ict_pcimap();
86
87 loongson2e_pci_controller.io_map_base =
88 (unsigned long) ioremap(LOONGSON2E_IO_PORT_BASE,
89 loongson2e_pci_io_resource.end -
90 loongson2e_pci_io_resource.start + 1);
91
92 register_pci_controller(&loongson2e_pci_controller);
93
94 return 0;
95}
96
97arch_initcall(pcibios_init);
diff --git a/arch/mips/lemote/lm2e/prom.c b/arch/mips/lemote/lm2e/prom.c
deleted file mode 100644
index 7edc15dfed6c..000000000000
--- a/arch/mips/lemote/lm2e/prom.c
+++ /dev/null
@@ -1,97 +0,0 @@
1/*
2 * Based on Ocelot Linux port, which is
3 * Copyright 2001 MontaVista Software Inc.
4 * Author: jsun@mvista.com or jsun@junsun.net
5 *
6 * Copyright 2003 ICT CAS
7 * Author: Michael Guo <guoyi@ict.ac.cn>
8 *
9 * Copyright (C) 2007 Lemote Inc. & Insititute of Computing Technology
10 * Author: Fuxin Zhang, zhangfx@lemote.com
11 *
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by the
14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version.
16 */
17#include <linux/init.h>
18#include <linux/bootmem.h>
19#include <asm/bootinfo.h>
20
21extern unsigned long bus_clock;
22extern unsigned long cpu_clock_freq;
23extern unsigned int memsize, highmemsize;
24extern int putDebugChar(unsigned char byte);
25
26static int argc;
27/* pmon passes arguments in 32bit pointers */
28static int *arg;
29static int *env;
30
31const char *get_system_type(void)
32{
33 return "lemote-fulong";
34}
35
36void __init prom_init_cmdline(void)
37{
38 int i;
39 long l;
40
41 /* arg[0] is "g", the rest is boot parameters */
42 arcs_cmdline[0] = '\0';
43 for (i = 1; i < argc; i++) {
44 l = (long)arg[i];
45 if (strlen(arcs_cmdline) + strlen(((char *)l) + 1)
46 >= sizeof(arcs_cmdline))
47 break;
48 strcat(arcs_cmdline, ((char *)l));
49 strcat(arcs_cmdline, " ");
50 }
51}
52
53void __init prom_init(void)
54{
55 long l;
56 argc = fw_arg0;
57 arg = (int *)fw_arg1;
58 env = (int *)fw_arg2;
59
60 prom_init_cmdline();
61
62 if ((strstr(arcs_cmdline, "console=")) == NULL)
63 strcat(arcs_cmdline, " console=ttyS0,115200");
64 if ((strstr(arcs_cmdline, "root=")) == NULL)
65 strcat(arcs_cmdline, " root=/dev/hda1");
66
67#define parse_even_earlier(res, option, p) \
68do { \
69 if (strncmp(option, (char *)p, strlen(option)) == 0) \
70 res = simple_strtol((char *)p + strlen(option"="), \
71 NULL, 10); \
72} while (0)
73
74 l = (long)*env;
75 while (l != 0) {
76 parse_even_earlier(bus_clock, "busclock", l);
77 parse_even_earlier(cpu_clock_freq, "cpuclock", l);
78 parse_even_earlier(memsize, "memsize", l);
79 parse_even_earlier(highmemsize, "highmemsize", l);
80 env++;
81 l = (long)*env;
82 }
83 if (memsize == 0)
84 memsize = 256;
85
86 pr_info("busclock=%ld, cpuclock=%ld,memsize=%d,highmemsize=%d\n",
87 bus_clock, cpu_clock_freq, memsize, highmemsize);
88}
89
90void __init prom_free_prom_memory(void)
91{
92}
93
94void prom_putchar(char c)
95{
96 putDebugChar(c);
97}
diff --git a/arch/mips/lemote/lm2e/reset.c b/arch/mips/lemote/lm2e/reset.c
deleted file mode 100644
index 099387a3827a..000000000000
--- a/arch/mips/lemote/lm2e/reset.c
+++ /dev/null
@@ -1,41 +0,0 @@
1/*
2 * This program is free software; you can redistribute it and/or modify it
3 * under the terms of the GNU General Public License as published by the
4 * Free Software Foundation; either version 2 of the License, or (at your
5 * option) any later version.
6 *
7 * Copyright (C) 2007 Lemote, Inc. & Institute of Computing Technology
8 * Author: Fuxin Zhang, zhangfx@lemote.com
9 */
10#include <linux/pm.h>
11
12#include <asm/reboot.h>
13
14static void loongson2e_restart(char *command)
15{
16#ifdef CONFIG_32BIT
17 *(unsigned long *)0xbfe00104 &= ~(1 << 2);
18 *(unsigned long *)0xbfe00104 |= (1 << 2);
19#else
20 *(unsigned long *)0xffffffffbfe00104 &= ~(1 << 2);
21 *(unsigned long *)0xffffffffbfe00104 |= (1 << 2);
22#endif
23 __asm__ __volatile__("jr\t%0"::"r"(0xbfc00000));
24}
25
26static void loongson2e_halt(void)
27{
28 while (1) ;
29}
30
31static void loongson2e_power_off(void)
32{
33 loongson2e_halt();
34}
35
36void mips_reboot_setup(void)
37{
38 _machine_restart = loongson2e_restart;
39 _machine_halt = loongson2e_halt;
40 pm_power_off = loongson2e_power_off;
41}
diff --git a/arch/mips/lemote/lm2e/setup.c b/arch/mips/lemote/lm2e/setup.c
deleted file mode 100644
index ebd6ceaef2fd..000000000000
--- a/arch/mips/lemote/lm2e/setup.c
+++ /dev/null
@@ -1,111 +0,0 @@
1/*
2 * BRIEF MODULE DESCRIPTION
3 * setup.c - board dependent boot routines
4 *
5 * Copyright (C) 2007 Lemote Inc. & Insititute of Computing Technology
6 * Author: Fuxin Zhang, zhangfx@lemote.com
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version.
12 *
13 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
14 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
15 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
16 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
19 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 *
24 * You should have received a copy of the GNU General Public License along
25 * with this program; if not, write to the Free Software Foundation, Inc.,
26 * 675 Mass Ave, Cambridge, MA 02139, USA.
27 *
28 */
29#include <linux/bootmem.h>
30#include <linux/init.h>
31#include <linux/irq.h>
32
33#include <asm/bootinfo.h>
34#include <asm/mc146818-time.h>
35#include <asm/time.h>
36#include <asm/wbflush.h>
37#include <asm/mach-lemote/pci.h>
38
39#ifdef CONFIG_VT
40#include <linux/console.h>
41#include <linux/screen_info.h>
42#endif
43
44extern void mips_reboot_setup(void);
45
46unsigned long cpu_clock_freq;
47unsigned long bus_clock;
48unsigned int memsize;
49unsigned int highmemsize = 0;
50
51void __init plat_time_init(void)
52{
53 /* setup mips r4k timer */
54 mips_hpt_frequency = cpu_clock_freq / 2;
55}
56
57unsigned long read_persistent_clock(void)
58{
59 return mc146818_get_cmos_time();
60}
61
62void (*__wbflush)(void);
63EXPORT_SYMBOL(__wbflush);
64
65static void wbflush_loongson2e(void)
66{
67 asm(".set\tpush\n\t"
68 ".set\tnoreorder\n\t"
69 ".set mips3\n\t"
70 "sync\n\t"
71 "nop\n\t"
72 ".set\tpop\n\t"
73 ".set mips0\n\t");
74}
75
76void __init plat_mem_setup(void)
77{
78 set_io_port_base((unsigned long)ioremap(LOONGSON2E_IO_PORT_BASE,
79 IO_SPACE_LIMIT - LOONGSON2E_PCI_IO_START + 1));
80 mips_reboot_setup();
81
82 __wbflush = wbflush_loongson2e;
83
84 add_memory_region(0x0, (memsize << 20), BOOT_MEM_RAM);
85#ifdef CONFIG_64BIT
86 if (highmemsize > 0) {
87 add_memory_region(0x20000000, highmemsize << 20, BOOT_MEM_RAM);
88 }
89#endif
90
91#ifdef CONFIG_VT
92#if defined(CONFIG_VGA_CONSOLE)
93 conswitchp = &vga_con;
94
95 screen_info = (struct screen_info) {
96 0, 25, /* orig-x, orig-y */
97 0, /* unused */
98 0, /* orig-video-page */
99 0, /* orig-video-mode */
100 80, /* orig-video-cols */
101 0, 0, 0, /* ega_ax, ega_bx, ega_cx */
102 25, /* orig-video-lines */
103 VIDEO_TYPE_VGAC, /* orig-video-isVGA */
104 16 /* orig-video-points */
105 };
106#elif defined(CONFIG_DUMMY_CONSOLE)
107 conswitchp = &dummy_con;
108#endif
109#endif
110
111}
diff --git a/arch/mips/loongson/Kconfig b/arch/mips/loongson/Kconfig
new file mode 100644
index 000000000000..d45092505fa1
--- /dev/null
+++ b/arch/mips/loongson/Kconfig
@@ -0,0 +1,31 @@
1choice
2 prompt "Machine Type"
3 depends on MACH_LOONGSON
4
5config LEMOTE_FULOONG2E
6 bool "Lemote Fuloong(2e) mini-PC"
7 select ARCH_SPARSEMEM_ENABLE
8 select CEVT_R4K
9 select CSRC_R4K
10 select SYS_HAS_CPU_LOONGSON2E
11 select DMA_NONCOHERENT
12 select BOOT_ELF32
13 select BOARD_SCACHE
14 select HW_HAS_PCI
15 select I8259
16 select ISA
17 select IRQ_CPU
18 select SYS_SUPPORTS_32BIT_KERNEL
19 select SYS_SUPPORTS_64BIT_KERNEL
20 select SYS_SUPPORTS_LITTLE_ENDIAN
21 select SYS_SUPPORTS_HIGHMEM
22 select SYS_HAS_EARLY_PRINTK
23 select GENERIC_HARDIRQS_NO__DO_IRQ
24 select GENERIC_ISA_DMA_SUPPORT_BROKEN
25 select CPU_HAS_WB
26 help
27 Lemote Fuloong(2e) mini-PC board based on the Chinese Loongson-2E CPU and
28 an FPGA northbridge
29
30 Lemote Fuloong(2e) mini PC have a VIA686B south bridge.
31endchoice
diff --git a/arch/mips/loongson/Makefile b/arch/mips/loongson/Makefile
new file mode 100644
index 000000000000..39048c455d7d
--- /dev/null
+++ b/arch/mips/loongson/Makefile
@@ -0,0 +1,11 @@
1#
2# Common code for all Loongson based systems
3#
4
5obj-$(CONFIG_MACH_LOONGSON) += common/
6
7#
8# Lemote Fuloong mini-PC (Loongson 2E-based)
9#
10
11obj-$(CONFIG_LEMOTE_FULOONG2E) += fuloong-2e/
diff --git a/arch/mips/loongson/common/Makefile b/arch/mips/loongson/common/Makefile
new file mode 100644
index 000000000000..656b3cc0a2a6
--- /dev/null
+++ b/arch/mips/loongson/common/Makefile
@@ -0,0 +1,11 @@
1#
2# Makefile for loongson based machines.
3#
4
5obj-y += setup.o init.o cmdline.o env.o time.o reset.o irq.o \
6 pci.o bonito-irq.o mem.o machtype.o
7
8#
9# Early printk support
10#
11obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
diff --git a/arch/mips/lemote/lm2e/bonito-irq.c b/arch/mips/loongson/common/bonito-irq.c
index 8fc3bce7075b..3e31e7ad713e 100644
--- a/arch/mips/lemote/lm2e/bonito-irq.c
+++ b/arch/mips/loongson/common/bonito-irq.c
@@ -10,32 +10,10 @@
10 * under the terms of the GNU General Public License as published by the 10 * under the terms of the GNU General Public License as published by the
11 * Free Software Foundation; either version 2 of the License, or (at your 11 * Free Software Foundation; either version 2 of the License, or (at your
12 * option) any later version. 12 * option) any later version.
13 *
14 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
15 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
16 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
17 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
20 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
21 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 *
25 * You should have received a copy of the GNU General Public License along
26 * with this program; if not, write to the Free Software Foundation, Inc.,
27 * 675 Mass Ave, Cambridge, MA 02139, USA.
28 *
29 */ 13 */
30#include <linux/errno.h>
31#include <linux/init.h>
32#include <linux/io.h>
33#include <linux/types.h>
34#include <linux/interrupt.h> 14#include <linux/interrupt.h>
35#include <linux/irq.h>
36
37#include <asm/mips-boards/bonito64.h>
38 15
16#include <loongson.h>
39 17
40static inline void bonito_irq_enable(unsigned int irq) 18static inline void bonito_irq_enable(unsigned int irq)
41{ 19{
@@ -66,9 +44,8 @@ void bonito_irq_init(void)
66{ 44{
67 u32 i; 45 u32 i;
68 46
69 for (i = BONITO_IRQ_BASE; i < BONITO_IRQ_BASE + 32; i++) { 47 for (i = BONITO_IRQ_BASE; i < BONITO_IRQ_BASE + 32; i++)
70 set_irq_chip_and_handler(i, &bonito_irq_type, handle_level_irq); 48 set_irq_chip_and_handler(i, &bonito_irq_type, handle_level_irq);
71 }
72 49
73 setup_irq(BONITO_IRQ_BASE + 10, &dma_timeout_irqaction); 50 setup_irq(BONITO_IRQ_BASE + 10, &dma_timeout_irqaction);
74} 51}
diff --git a/arch/mips/loongson/common/cmdline.c b/arch/mips/loongson/common/cmdline.c
new file mode 100644
index 000000000000..75f1b243ee4e
--- /dev/null
+++ b/arch/mips/loongson/common/cmdline.c
@@ -0,0 +1,52 @@
1/*
2 * Based on Ocelot Linux port, which is
3 * Copyright 2001 MontaVista Software Inc.
4 * Author: jsun@mvista.com or jsun@junsun.net
5 *
6 * Copyright 2003 ICT CAS
7 * Author: Michael Guo <guoyi@ict.ac.cn>
8 *
9 * Copyright (C) 2007 Lemote Inc. & Insititute of Computing Technology
10 * Author: Fuxin Zhang, zhangfx@lemote.com
11 *
12 * Copyright (C) 2009 Lemote Inc. & Insititute of Computing Technology
13 * Author: Wu Zhangjin, wuzj@lemote.com
14 *
15 * This program is free software; you can redistribute it and/or modify it
16 * under the terms of the GNU General Public License as published by the
17 * Free Software Foundation; either version 2 of the License, or (at your
18 * option) any later version.
19 */
20#include <asm/bootinfo.h>
21
22#include <loongson.h>
23
24int prom_argc;
25/* pmon passes arguments in 32bit pointers */
26int *_prom_argv;
27
28void __init prom_init_cmdline(void)
29{
30 int i;
31 long l;
32
33 /* firmware arguments are initialized in head.S */
34 prom_argc = fw_arg0;
35 _prom_argv = (int *)fw_arg1;
36
37 /* arg[0] is "g", the rest is boot parameters */
38 arcs_cmdline[0] = '\0';
39 for (i = 1; i < prom_argc; i++) {
40 l = (long)_prom_argv[i];
41 if (strlen(arcs_cmdline) + strlen(((char *)l) + 1)
42 >= sizeof(arcs_cmdline))
43 break;
44 strcat(arcs_cmdline, ((char *)l));
45 strcat(arcs_cmdline, " ");
46 }
47
48 if ((strstr(arcs_cmdline, "console=")) == NULL)
49 strcat(arcs_cmdline, " console=ttyS0,115200");
50 if ((strstr(arcs_cmdline, "root=")) == NULL)
51 strcat(arcs_cmdline, " root=/dev/hda1");
52}
diff --git a/arch/mips/loongson/common/early_printk.c b/arch/mips/loongson/common/early_printk.c
new file mode 100644
index 000000000000..bc73edc0cfd8
--- /dev/null
+++ b/arch/mips/loongson/common/early_printk.c
@@ -0,0 +1,38 @@
1/* early printk support
2 *
3 * Copyright (c) 2009 Philippe Vachon <philippe@cowpig.ca>
4 * Copyright (C) 2009 Lemote Inc. & Insititute of Computing Technology
5 * Author: Wu Zhangjin, wuzj@lemote.com
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 */
12#include <linux/serial_reg.h>
13
14#include <loongson.h>
15#include <machine.h>
16
17#define PORT(base, offset) (u8 *)(base + offset)
18
19static inline unsigned int serial_in(phys_addr_t base, int offset)
20{
21 return readb(PORT(base, offset));
22}
23
24static inline void serial_out(phys_addr_t base, int offset, int value)
25{
26 writeb(value, PORT(base, offset));
27}
28
29void prom_putchar(char c)
30{
31 phys_addr_t uart_base =
32 (phys_addr_t) ioremap_nocache(LOONGSON_UART_BASE, 8);
33
34 while ((serial_in(uart_base, UART_LSR) & UART_LSR_THRE) == 0)
35 ;
36
37 serial_out(uart_base, UART_TX, c);
38}
diff --git a/arch/mips/loongson/common/env.c b/arch/mips/loongson/common/env.c
new file mode 100644
index 000000000000..b9ef50385541
--- /dev/null
+++ b/arch/mips/loongson/common/env.c
@@ -0,0 +1,58 @@
1/*
2 * Based on Ocelot Linux port, which is
3 * Copyright 2001 MontaVista Software Inc.
4 * Author: jsun@mvista.com or jsun@junsun.net
5 *
6 * Copyright 2003 ICT CAS
7 * Author: Michael Guo <guoyi@ict.ac.cn>
8 *
9 * Copyright (C) 2007 Lemote Inc. & Insititute of Computing Technology
10 * Author: Fuxin Zhang, zhangfx@lemote.com
11 *
12 * Copyright (C) 2009 Lemote Inc. & Insititute of Computing Technology
13 * Author: Wu Zhangjin, wuzj@lemote.com
14 *
15 * This program is free software; you can redistribute it and/or modify it
16 * under the terms of the GNU General Public License as published by the
17 * Free Software Foundation; either version 2 of the License, or (at your
18 * option) any later version.
19 */
20#include <asm/bootinfo.h>
21
22#include <loongson.h>
23
24unsigned long bus_clock, cpu_clock_freq;
25unsigned long memsize, highmemsize;
26
27/* pmon passes arguments in 32bit pointers */
28int *_prom_envp;
29
30#define parse_even_earlier(res, option, p) \
31do { \
32 if (strncmp(option, (char *)p, strlen(option)) == 0) \
33 strict_strtol((char *)p + strlen(option"="), \
34 10, &res); \
35} while (0)
36
37void __init prom_init_env(void)
38{
39 long l;
40
41 /* firmware arguments are initialized in head.S */
42 _prom_envp = (int *)fw_arg2;
43
44 l = (long)*_prom_envp;
45 while (l != 0) {
46 parse_even_earlier(bus_clock, "busclock", l);
47 parse_even_earlier(cpu_clock_freq, "cpuclock", l);
48 parse_even_earlier(memsize, "memsize", l);
49 parse_even_earlier(highmemsize, "highmemsize", l);
50 _prom_envp++;
51 l = (long)*_prom_envp;
52 }
53 if (memsize == 0)
54 memsize = 256;
55
56 pr_info("busclock=%ld, cpuclock=%ld, memsize=%ld, highmemsize=%ld\n",
57 bus_clock, cpu_clock_freq, memsize, highmemsize);
58}
diff --git a/arch/mips/loongson/common/init.c b/arch/mips/loongson/common/init.c
new file mode 100644
index 000000000000..3abe927422a3
--- /dev/null
+++ b/arch/mips/loongson/common/init.c
@@ -0,0 +1,30 @@
1/*
2 * Copyright (C) 2009 Lemote Inc. & Insititute of Computing Technology
3 * Author: Wu Zhangjin, wuzj@lemote.com
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version.
9 */
10
11#include <linux/bootmem.h>
12
13#include <asm/bootinfo.h>
14
15#include <loongson.h>
16
17void __init prom_init(void)
18{
19 /* init base address of io space */
20 set_io_port_base((unsigned long)
21 ioremap(BONITO_PCIIO_BASE, BONITO_PCIIO_SIZE));
22
23 prom_init_cmdline();
24 prom_init_env();
25 prom_init_memory();
26}
27
28void __init prom_free_prom_memory(void)
29{
30}
diff --git a/arch/mips/loongson/common/irq.c b/arch/mips/loongson/common/irq.c
new file mode 100644
index 000000000000..f368c735cbd3
--- /dev/null
+++ b/arch/mips/loongson/common/irq.c
@@ -0,0 +1,74 @@
1/*
2 * Copyright (C) 2007 Lemote Inc. & Insititute of Computing Technology
3 * Author: Fuxin Zhang, zhangfx@lemote.com
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version.
9 */
10#include <linux/delay.h>
11#include <linux/interrupt.h>
12
13#include <loongson.h>
14/*
15 * the first level int-handler will jump here if it is a bonito irq
16 */
17void bonito_irqdispatch(void)
18{
19 u32 int_status;
20 int i;
21
22 /* workaround the IO dma problem: let cpu looping to allow DMA finish */
23 int_status = BONITO_INTISR;
24 if (int_status & (1 << 10)) {
25 while (int_status & (1 << 10)) {
26 udelay(1);
27 int_status = BONITO_INTISR;
28 }
29 }
30
31 /* Get pending sources, masked by current enables */
32 int_status = BONITO_INTISR & BONITO_INTEN;
33
34 if (int_status != 0) {
35 i = __ffs(int_status);
36 int_status &= ~(1 << i);
37 do_IRQ(BONITO_IRQ_BASE + i);
38 }
39}
40
41asmlinkage void plat_irq_dispatch(void)
42{
43 unsigned int pending;
44
45 pending = read_c0_cause() & read_c0_status() & ST0_IM;
46
47 /* machine-specific plat_irq_dispatch */
48 mach_irq_dispatch(pending);
49}
50
51void __init arch_init_irq(void)
52{
53 /*
54 * Clear all of the interrupts while we change the able around a bit.
55 * int-handler is not on bootstrap
56 */
57 clear_c0_status(ST0_IM | ST0_BEV);
58 local_irq_disable();
59
60 /* setting irq trigger mode */
61 set_irq_trigger_mode();
62
63 /* no steer */
64 BONITO_INTSTEER = 0;
65
66 /*
67 * Mask out all interrupt by writing "1" to all bit position in
68 * the interrupt reset reg.
69 */
70 BONITO_INTENCLR = ~0;
71
72 /* machine specific irq init */
73 mach_init_irq();
74}
diff --git a/arch/mips/loongson/common/machtype.c b/arch/mips/loongson/common/machtype.c
new file mode 100644
index 000000000000..7b348248de7d
--- /dev/null
+++ b/arch/mips/loongson/common/machtype.c
@@ -0,0 +1,50 @@
1/*
2 * Copyright (C) 2009 Lemote Inc. & Insititute of Computing Technology
3 * Author: Wu Zhangjin, wuzj@lemote.com
4 *
5 * Copyright (c) 2009 Zhang Le <r0bertz@gentoo.org>
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 */
12#include <linux/errno.h>
13#include <asm/bootinfo.h>
14
15#include <loongson.h>
16#include <machine.h>
17
18static const char *system_types[] = {
19 [MACH_LOONGSON_UNKNOWN] "unknown loongson machine",
20 [MACH_LEMOTE_FL2E] "lemote-fuloong-2e-box",
21 [MACH_LEMOTE_FL2F] "lemote-fuloong-2f-box",
22 [MACH_LEMOTE_ML2F7] "lemote-mengloong-2f-7inches",
23 [MACH_LEMOTE_YL2F89] "lemote-yeeloong-2f-8.9inches",
24 [MACH_DEXXON_GDIUM2F10] "dexxon-gidum-2f-10inches",
25 [MACH_LOONGSON_END] NULL,
26};
27
28const char *get_system_type(void)
29{
30 if (mips_machtype == MACH_UNKNOWN)
31 mips_machtype = LOONGSON_MACHTYPE;
32
33 return system_types[mips_machtype];
34}
35
36static __init int machtype_setup(char *str)
37{
38 int machtype = MACH_LEMOTE_FL2E;
39
40 if (!str)
41 return -EINVAL;
42
43 for (; system_types[machtype]; machtype++)
44 if (strstr(system_types[machtype], str)) {
45 mips_machtype = machtype;
46 break;
47 }
48 return 0;
49}
50__setup("machtype=", machtype_setup);
diff --git a/arch/mips/lemote/lm2e/mem.c b/arch/mips/loongson/common/mem.c
index 16cd21587d34..7c92f79b6480 100644
--- a/arch/mips/lemote/lm2e/mem.c
+++ b/arch/mips/loongson/common/mem.c
@@ -8,16 +8,28 @@
8#include <linux/fcntl.h> 8#include <linux/fcntl.h>
9#include <linux/mm.h> 9#include <linux/mm.h>
10 10
11#include <asm/bootinfo.h>
12
13#include <loongson.h>
14#include <mem.h>
15
16void __init prom_init_memory(void)
17{
18 add_memory_region(0x0, (memsize << 20), BOOT_MEM_RAM);
19#ifdef CONFIG_64BIT
20 if (highmemsize > 0)
21 add_memory_region(LOONGSON_HIGHMEM_START,
22 highmemsize << 20, BOOT_MEM_RAM);
23#endif /* CONFIG_64BIT */
24}
25
11/* override of arch/mips/mm/cache.c: __uncached_access */ 26/* override of arch/mips/mm/cache.c: __uncached_access */
12int __uncached_access(struct file *file, unsigned long addr) 27int __uncached_access(struct file *file, unsigned long addr)
13{ 28{
14 if (file->f_flags & O_SYNC) 29 if (file->f_flags & O_SYNC)
15 return 1; 30 return 1;
16 31
17 /*
18 * On the Lemote Loongson 2e system, the peripheral registers
19 * reside between 0x1000:0000 and 0x2000:0000.
20 */
21 return addr >= __pa(high_memory) || 32 return addr >= __pa(high_memory) ||
22 ((addr >= 0x10000000) && (addr < 0x20000000)); 33 ((addr >= LOONGSON_MMIO_MEM_START) &&
34 (addr < LOONGSON_MMIO_MEM_END));
23} 35}
diff --git a/arch/mips/loongson/common/pci.c b/arch/mips/loongson/common/pci.c
new file mode 100644
index 000000000000..a3a4abfb6c9a
--- /dev/null
+++ b/arch/mips/loongson/common/pci.c
@@ -0,0 +1,83 @@
1/*
2 * Copyright (C) 2007 Lemote, Inc. & Institute of Computing Technology
3 * Author: Fuxin Zhang, zhangfx@lemote.com
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version.
9 */
10#include <linux/pci.h>
11
12#include <pci.h>
13#include <loongson.h>
14
15static struct resource loongson_pci_mem_resource = {
16 .name = "pci memory space",
17 .start = LOONGSON_PCI_MEM_START,
18 .end = LOONGSON_PCI_MEM_END,
19 .flags = IORESOURCE_MEM,
20};
21
22static struct resource loongson_pci_io_resource = {
23 .name = "pci io space",
24 .start = LOONGSON_PCI_IO_START,
25 .end = IO_SPACE_LIMIT,
26 .flags = IORESOURCE_IO,
27};
28
29static struct pci_controller loongson_pci_controller = {
30 .pci_ops = &bonito64_pci_ops,
31 .io_resource = &loongson_pci_io_resource,
32 .mem_resource = &loongson_pci_mem_resource,
33 .mem_offset = 0x00000000UL,
34 .io_offset = 0x00000000UL,
35};
36
37static void __init setup_pcimap(void)
38{
39 /*
40 * local to PCI mapping for CPU accessing PCI space
41 * CPU address space [256M,448M] is window for accessing pci space
42 * we set pcimap_lo[0,1,2] to map it to pci space[0M,64M], [320M,448M]
43 *
44 * pcimap: PCI_MAP2 PCI_Mem_Lo2 PCI_Mem_Lo1 PCI_Mem_Lo0
45 * [<2G] [384M,448M] [320M,384M] [0M,64M]
46 */
47 BONITO_PCIMAP = BONITO_PCIMAP_PCIMAP_2 |
48 BONITO_PCIMAP_WIN(2, BONITO_PCILO2_BASE) |
49 BONITO_PCIMAP_WIN(1, BONITO_PCILO1_BASE) |
50 BONITO_PCIMAP_WIN(0, 0);
51
52 /*
53 * PCI-DMA to local mapping: [2G,2G+256M] -> [0M,256M]
54 */
55 BONITO_PCIBASE0 = 0x80000000ul; /* base: 2G -> mmap: 0M */
56 /* size: 256M, burst transmission, pre-fetch enable, 64bit */
57 LOONGSON_PCI_HIT0_SEL_L = 0xc000000cul;
58 LOONGSON_PCI_HIT0_SEL_H = 0xfffffffful;
59 LOONGSON_PCI_HIT1_SEL_L = 0x00000006ul; /* set this BAR as invalid */
60 LOONGSON_PCI_HIT1_SEL_H = 0x00000000ul;
61 LOONGSON_PCI_HIT2_SEL_L = 0x00000006ul; /* set this BAR as invalid */
62 LOONGSON_PCI_HIT2_SEL_H = 0x00000000ul;
63
64 /* avoid deadlock of PCI reading/writing lock operation */
65 LOONGSON_PCI_ISR4C = 0xd2000001ul;
66
67 /* can not change gnt to break pci transfer when device's gnt not
68 deassert for some broken device */
69 LOONGSON_PXARB_CFG = 0x00fe0105ul;
70}
71
72static int __init pcibios_init(void)
73{
74 setup_pcimap();
75
76 loongson_pci_controller.io_map_base = mips_io_port_base;
77
78 register_pci_controller(&loongson_pci_controller);
79
80 return 0;
81}
82
83arch_initcall(pcibios_init);
diff --git a/arch/mips/loongson/common/reset.c b/arch/mips/loongson/common/reset.c
new file mode 100644
index 000000000000..97e918251edd
--- /dev/null
+++ b/arch/mips/loongson/common/reset.c
@@ -0,0 +1,44 @@
1/*
2 * This program is free software; you can redistribute it and/or modify it
3 * under the terms of the GNU General Public License as published by the
4 * Free Software Foundation; either version 2 of the License, or (at your
5 * option) any later version.
6 *
7 * Copyright (C) 2007 Lemote, Inc. & Institute of Computing Technology
8 * Author: Fuxin Zhang, zhangfx@lemote.com
9 * Copyright (C) 2009 Lemote, Inc. & Institute of Computing Technology
10 * Author: Zhangjin Wu, wuzj@lemote.com
11 */
12#include <linux/init.h>
13#include <linux/pm.h>
14
15#include <asm/reboot.h>
16
17#include <loongson.h>
18
19static void loongson_restart(char *command)
20{
21 /* do preparation for reboot */
22 mach_prepare_reboot();
23
24 /* reboot via jumping to boot base address */
25 ((void (*)(void))ioremap_nocache(BONITO_BOOT_BASE, 4)) ();
26}
27
28static void loongson_halt(void)
29{
30 mach_prepare_shutdown();
31 while (1)
32 ;
33}
34
35static int __init mips_reboot_setup(void)
36{
37 _machine_restart = loongson_restart;
38 _machine_halt = loongson_halt;
39 pm_power_off = loongson_halt;
40
41 return 0;
42}
43
44arch_initcall(mips_reboot_setup);
diff --git a/arch/mips/loongson/common/setup.c b/arch/mips/loongson/common/setup.c
new file mode 100644
index 000000000000..4cd2aa9a342c
--- /dev/null
+++ b/arch/mips/loongson/common/setup.c
@@ -0,0 +1,58 @@
1/*
2 * Copyright (C) 2007 Lemote Inc. & Insititute of Computing Technology
3 * Author: Fuxin Zhang, zhangfx@lemote.com
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version.
9 */
10#include <linux/module.h>
11
12#include <asm/wbflush.h>
13
14#include <loongson.h>
15
16#ifdef CONFIG_VT
17#include <linux/console.h>
18#include <linux/screen_info.h>
19#endif
20
21void (*__wbflush)(void);
22EXPORT_SYMBOL(__wbflush);
23
24static void wbflush_loongson(void)
25{
26 asm(".set\tpush\n\t"
27 ".set\tnoreorder\n\t"
28 ".set mips3\n\t"
29 "sync\n\t"
30 "nop\n\t"
31 ".set\tpop\n\t"
32 ".set mips0\n\t");
33}
34
35void __init plat_mem_setup(void)
36{
37 __wbflush = wbflush_loongson;
38
39#ifdef CONFIG_VT
40#if defined(CONFIG_VGA_CONSOLE)
41 conswitchp = &vga_con;
42
43 screen_info = (struct screen_info) {
44 0, 25, /* orig-x, orig-y */
45 0, /* unused */
46 0, /* orig-video-page */
47 0, /* orig-video-mode */
48 80, /* orig-video-cols */
49 0, 0, 0, /* ega_ax, ega_bx, ega_cx */
50 25, /* orig-video-lines */
51 VIDEO_TYPE_VGAC, /* orig-video-isVGA */
52 16 /* orig-video-points */
53 };
54#elif defined(CONFIG_DUMMY_CONSOLE)
55 conswitchp = &dummy_con;
56#endif
57#endif
58}
diff --git a/arch/mips/loongson/common/time.c b/arch/mips/loongson/common/time.c
new file mode 100644
index 000000000000..6e08c8270abe
--- /dev/null
+++ b/arch/mips/loongson/common/time.c
@@ -0,0 +1,28 @@
1/*
2 * Copyright (C) 2007 Lemote, Inc. & Institute of Computing Technology
3 * Author: Fuxin Zhang, zhangfx@lemote.com
4 *
5 * Copyright (C) 2009 Lemote Inc. & Insititute of Computing Technology
6 * Author: Wu Zhangjin, wuzj@lemote.com
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version.
12 */
13#include <asm/mc146818-time.h>
14#include <asm/time.h>
15
16#include <loongson.h>
17
18void __init plat_time_init(void)
19{
20 /* setup mips r4k timer */
21 mips_hpt_frequency = cpu_clock_freq / 2;
22}
23
24void read_persistent_clock(struct timespec *ts)
25{
26 ts->tv_sec = mc146818_get_cmos_time();
27 ts->tv_nsec = 0;
28}
diff --git a/arch/mips/loongson/fuloong-2e/Makefile b/arch/mips/loongson/fuloong-2e/Makefile
new file mode 100644
index 000000000000..3aba5fcc09dc
--- /dev/null
+++ b/arch/mips/loongson/fuloong-2e/Makefile
@@ -0,0 +1,7 @@
1#
2# Makefile for Lemote Fuloong2e mini-PC board.
3#
4
5obj-y += irq.o reset.o
6
7EXTRA_CFLAGS += -Werror
diff --git a/arch/mips/loongson/fuloong-2e/irq.c b/arch/mips/loongson/fuloong-2e/irq.c
new file mode 100644
index 000000000000..7888cf69424a
--- /dev/null
+++ b/arch/mips/loongson/fuloong-2e/irq.c
@@ -0,0 +1,71 @@
1/*
2 * Copyright (C) 2007 Lemote Inc. & Insititute of Computing Technology
3 * Author: Fuxin Zhang, zhangfx@lemote.com
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version.
9 */
10#include <linux/interrupt.h>
11
12#include <asm/irq_cpu.h>
13#include <asm/i8259.h>
14
15#include <loongson.h>
16
17static void i8259_irqdispatch(void)
18{
19 int irq;
20
21 irq = i8259_irq();
22 if (irq >= 0)
23 do_IRQ(irq);
24 else
25 spurious_interrupt();
26}
27
28asmlinkage void mach_irq_dispatch(unsigned int pending)
29{
30 if (pending & CAUSEF_IP7)
31 do_IRQ(MIPS_CPU_IRQ_BASE + 7);
32 else if (pending & CAUSEF_IP6) /* perf counter loverflow */
33 do_IRQ(LOONGSON2_PERFCNT_IRQ);
34 else if (pending & CAUSEF_IP5)
35 i8259_irqdispatch();
36 else if (pending & CAUSEF_IP2)
37 bonito_irqdispatch();
38 else
39 spurious_interrupt();
40}
41
42static struct irqaction cascade_irqaction = {
43 .handler = no_action,
44 .name = "cascade",
45};
46
47void __init set_irq_trigger_mode(void)
48{
49 /* most bonito irq should be level triggered */
50 BONITO_INTEDGE = BONITO_ICU_SYSTEMERR | BONITO_ICU_MASTERERR |
51 BONITO_ICU_RETRYERR | BONITO_ICU_MBOXES;
52}
53
54void __init mach_init_irq(void)
55{
56 /* init all controller
57 * 0-15 ------> i8259 interrupt
58 * 16-23 ------> mips cpu interrupt
59 * 32-63 ------> bonito irq
60 */
61
62 /* Sets the first-level interrupt dispatcher. */
63 mips_cpu_irq_init();
64 init_i8259_irqs();
65 bonito_irq_init();
66
67 /* bonito irq at IP2 */
68 setup_irq(MIPS_CPU_IRQ_BASE + 2, &cascade_irqaction);
69 /* 8259 irq at IP5 */
70 setup_irq(MIPS_CPU_IRQ_BASE + 5, &cascade_irqaction);
71}
diff --git a/arch/mips/loongson/fuloong-2e/reset.c b/arch/mips/loongson/fuloong-2e/reset.c
new file mode 100644
index 000000000000..677fe186db95
--- /dev/null
+++ b/arch/mips/loongson/fuloong-2e/reset.c
@@ -0,0 +1,23 @@
1/* Board-specific reboot/shutdown routines
2 * Copyright (c) 2009 Philippe Vachon <philippe@cowpig.ca>
3 *
4 * Copyright (C) 2009 Lemote Inc. & Insititute of Computing Technology
5 * Author: Wu Zhangjin, wuzj@lemote.com
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 */
12
13#include <loongson.h>
14
15void mach_prepare_reboot(void)
16{
17 BONITO_BONGENCFG &= ~(1 << 2);
18 BONITO_BONGENCFG |= (1 << 2);
19}
20
21void mach_prepare_shutdown(void)
22{
23}
diff --git a/arch/mips/mipssim/sim_setup.c b/arch/mips/mipssim/sim_setup.c
index 7c7148ef2646..2877675c5f0d 100644
--- a/arch/mips/mipssim/sim_setup.c
+++ b/arch/mips/mipssim/sim_setup.c
@@ -37,7 +37,7 @@
37 37
38 38
39static void __init serial_init(void); 39static void __init serial_init(void);
40unsigned int _isbonito = 0; 40unsigned int _isbonito;
41 41
42const char *get_system_type(void) 42const char *get_system_type(void)
43{ 43{
diff --git a/arch/mips/mipssim/sim_smtc.c b/arch/mips/mipssim/sim_smtc.c
index d6e4f656ad14..5da30b6a65b7 100644
--- a/arch/mips/mipssim/sim_smtc.c
+++ b/arch/mips/mipssim/sim_smtc.c
@@ -43,11 +43,12 @@ static void ssmtc_send_ipi_single(int cpu, unsigned int action)
43 /* "CPU" may be TC of same VPE, VPE of same CPU, or different CPU */ 43 /* "CPU" may be TC of same VPE, VPE of same CPU, or different CPU */
44} 44}
45 45
46static inline void ssmtc_send_ipi_mask(cpumask_t mask, unsigned int action) 46static inline void ssmtc_send_ipi_mask(const struct cpumask *mask,
47 unsigned int action)
47{ 48{
48 unsigned int i; 49 unsigned int i;
49 50
50 for_each_cpu_mask(i, mask) 51 for_each_cpu(i, mask)
51 ssmtc_send_ipi_single(i, action); 52 ssmtc_send_ipi_single(i, action);
52} 53}
53 54
diff --git a/arch/mips/mm/c-octeon.c b/arch/mips/mm/c-octeon.c
index 10ab69f7183f..94e05e5733c1 100644
--- a/arch/mips/mm/c-octeon.c
+++ b/arch/mips/mm/c-octeon.c
@@ -79,7 +79,7 @@ static void octeon_flush_icache_all_cores(struct vm_area_struct *vma)
79 * cores it has been used on 79 * cores it has been used on
80 */ 80 */
81 if (vma) 81 if (vma)
82 mask = vma->vm_mm->cpu_vm_mask; 82 mask = *mm_cpumask(vma->vm_mm);
83 else 83 else
84 mask = cpu_online_map; 84 mask = cpu_online_map;
85 cpu_clear(cpu, mask); 85 cpu_clear(cpu, mask);
diff --git a/arch/mips/mm/fault.c b/arch/mips/mm/fault.c
index f956ecbb8136..e97a7a2fb2c0 100644
--- a/arch/mips/mm/fault.c
+++ b/arch/mips/mm/fault.c
@@ -58,11 +58,17 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long write,
58 * only copy the information from the master page table, 58 * only copy the information from the master page table,
59 * nothing more. 59 * nothing more.
60 */ 60 */
61#ifdef CONFIG_64BIT
62# define VMALLOC_FAULT_TARGET no_context
63#else
64# define VMALLOC_FAULT_TARGET vmalloc_fault
65#endif
66
61 if (unlikely(address >= VMALLOC_START && address <= VMALLOC_END)) 67 if (unlikely(address >= VMALLOC_START && address <= VMALLOC_END))
62 goto vmalloc_fault; 68 goto VMALLOC_FAULT_TARGET;
63#ifdef MODULE_START 69#ifdef MODULE_START
64 if (unlikely(address >= MODULE_START && address < MODULE_END)) 70 if (unlikely(address >= MODULE_START && address < MODULE_END))
65 goto vmalloc_fault; 71 goto VMALLOC_FAULT_TARGET;
66#endif 72#endif
67 73
68 /* 74 /*
@@ -203,6 +209,7 @@ do_sigbus:
203 force_sig_info(SIGBUS, &info, tsk); 209 force_sig_info(SIGBUS, &info, tsk);
204 210
205 return; 211 return;
212#ifndef CONFIG_64BIT
206vmalloc_fault: 213vmalloc_fault:
207 { 214 {
208 /* 215 /*
@@ -241,4 +248,5 @@ vmalloc_fault:
241 goto no_context; 248 goto no_context;
242 return; 249 return;
243 } 250 }
251#endif
244} 252}
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
index 0e820508ff23..15aa1902a788 100644
--- a/arch/mips/mm/init.c
+++ b/arch/mips/mm/init.c
@@ -352,7 +352,6 @@ void __init paging_init(void)
352 free_area_init_nodes(max_zone_pfns); 352 free_area_init_nodes(max_zone_pfns);
353} 353}
354 354
355static struct kcore_list kcore_mem, kcore_vmalloc;
356#ifdef CONFIG_64BIT 355#ifdef CONFIG_64BIT
357static struct kcore_list kcore_kseg0; 356static struct kcore_list kcore_kseg0;
358#endif 357#endif
@@ -409,15 +408,13 @@ void __init mem_init(void)
409 if ((unsigned long) &_text > (unsigned long) CKSEG0) 408 if ((unsigned long) &_text > (unsigned long) CKSEG0)
410 /* The -4 is a hack so that user tools don't have to handle 409 /* The -4 is a hack so that user tools don't have to handle
411 the overflow. */ 410 the overflow. */
412 kclist_add(&kcore_kseg0, (void *) CKSEG0, 0x80000000 - 4); 411 kclist_add(&kcore_kseg0, (void *) CKSEG0,
412 0x80000000 - 4, KCORE_TEXT);
413#endif 413#endif
414 kclist_add(&kcore_mem, __va(0), max_low_pfn << PAGE_SHIFT);
415 kclist_add(&kcore_vmalloc, (void *)VMALLOC_START,
416 VMALLOC_END-VMALLOC_START);
417 414
418 printk(KERN_INFO "Memory: %luk/%luk available (%ldk kernel code, " 415 printk(KERN_INFO "Memory: %luk/%luk available (%ldk kernel code, "
419 "%ldk reserved, %ldk data, %ldk init, %ldk highmem)\n", 416 "%ldk reserved, %ldk data, %ldk init, %ldk highmem)\n",
420 (unsigned long) nr_free_pages() << (PAGE_SHIFT-10), 417 nr_free_pages() << (PAGE_SHIFT-10),
421 ram << (PAGE_SHIFT-10), 418 ram << (PAGE_SHIFT-10),
422 codesize >> 10, 419 codesize >> 10,
423 reservedpages << (PAGE_SHIFT-10), 420 reservedpages << (PAGE_SHIFT-10),
@@ -475,9 +472,6 @@ unsigned long pgd_current[NR_CPUS];
475 */ 472 */
476pgd_t swapper_pg_dir[_PTRS_PER_PGD] __page_aligned(_PGD_ORDER); 473pgd_t swapper_pg_dir[_PTRS_PER_PGD] __page_aligned(_PGD_ORDER);
477#ifdef CONFIG_64BIT 474#ifdef CONFIG_64BIT
478#ifdef MODULE_START
479pgd_t module_pg_dir[PTRS_PER_PGD] __page_aligned(PGD_ORDER);
480#endif
481pmd_t invalid_pmd_table[PTRS_PER_PMD] __page_aligned(PMD_ORDER); 475pmd_t invalid_pmd_table[PTRS_PER_PMD] __page_aligned(PMD_ORDER);
482#endif 476#endif
483pte_t invalid_pte_table[PTRS_PER_PTE] __page_aligned(PTE_ORDER); 477pte_t invalid_pte_table[PTRS_PER_PTE] __page_aligned(PTE_ORDER);
diff --git a/arch/mips/mm/pgtable-64.c b/arch/mips/mm/pgtable-64.c
index e4b565aeb008..1121019fa456 100644
--- a/arch/mips/mm/pgtable-64.c
+++ b/arch/mips/mm/pgtable-64.c
@@ -59,9 +59,6 @@ void __init pagetable_init(void)
59 59
60 /* Initialize the entire pgd. */ 60 /* Initialize the entire pgd. */
61 pgd_init((unsigned long)swapper_pg_dir); 61 pgd_init((unsigned long)swapper_pg_dir);
62#ifdef MODULE_START
63 pgd_init((unsigned long)module_pg_dir);
64#endif
65 pmd_init((unsigned long)invalid_pmd_table, (unsigned long)invalid_pte_table); 62 pmd_init((unsigned long)invalid_pmd_table, (unsigned long)invalid_pte_table);
66 63
67 pgd_base = swapper_pg_dir; 64 pgd_base = swapper_pg_dir;
diff --git a/arch/mips/mm/tlb-r4k.c b/arch/mips/mm/tlb-r4k.c
index cee502caf398..d73428b18b0a 100644
--- a/arch/mips/mm/tlb-r4k.c
+++ b/arch/mips/mm/tlb-r4k.c
@@ -475,7 +475,7 @@ static void __cpuinit probe_tlb(unsigned long config)
475 c->tlbsize = ((reg >> 25) & 0x3f) + 1; 475 c->tlbsize = ((reg >> 25) & 0x3f) + 1;
476} 476}
477 477
478static int __cpuinitdata ntlb = 0; 478static int __cpuinitdata ntlb;
479static int __init set_ntlb(char *str) 479static int __init set_ntlb(char *str)
480{ 480{
481 get_option(&str, &ntlb); 481 get_option(&str, &ntlb);
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c
index 9a17bf8395df..bb1719a55d22 100644
--- a/arch/mips/mm/tlbex.c
+++ b/arch/mips/mm/tlbex.c
@@ -321,6 +321,10 @@ static void __cpuinit build_tlb_write_entry(u32 **p, struct uasm_label **l,
321 case CPU_BCM3302: 321 case CPU_BCM3302:
322 case CPU_BCM4710: 322 case CPU_BCM4710:
323 case CPU_LOONGSON2: 323 case CPU_LOONGSON2:
324 case CPU_BCM6338:
325 case CPU_BCM6345:
326 case CPU_BCM6348:
327 case CPU_BCM6358:
324 case CPU_R5500: 328 case CPU_R5500:
325 if (m4kc_tlbp_war()) 329 if (m4kc_tlbp_war())
326 uasm_i_nop(p); 330 uasm_i_nop(p);
@@ -499,11 +503,7 @@ build_get_pmde64(u32 **p, struct uasm_label **l, struct uasm_reloc **r,
499 * The vmalloc handling is not in the hotpath. 503 * The vmalloc handling is not in the hotpath.
500 */ 504 */
501 uasm_i_dmfc0(p, tmp, C0_BADVADDR); 505 uasm_i_dmfc0(p, tmp, C0_BADVADDR);
502#ifdef MODULE_START
503 uasm_il_bltz(p, r, tmp, label_module_alloc);
504#else
505 uasm_il_bltz(p, r, tmp, label_vmalloc); 506 uasm_il_bltz(p, r, tmp, label_vmalloc);
506#endif
507 /* No uasm_i_nop needed here, since the next insn doesn't touch TMP. */ 507 /* No uasm_i_nop needed here, since the next insn doesn't touch TMP. */
508 508
509#ifdef CONFIG_SMP 509#ifdef CONFIG_SMP
@@ -556,52 +556,7 @@ build_get_pgd_vmalloc64(u32 **p, struct uasm_label **l, struct uasm_reloc **r,
556{ 556{
557 long swpd = (long)swapper_pg_dir; 557 long swpd = (long)swapper_pg_dir;
558 558
559#ifdef MODULE_START
560 long modd = (long)module_pg_dir;
561
562 uasm_l_module_alloc(l, *p);
563 /*
564 * Assumption:
565 * VMALLOC_START >= 0xc000000000000000UL
566 * MODULE_START >= 0xe000000000000000UL
567 */
568 UASM_i_SLL(p, ptr, bvaddr, 2);
569 uasm_il_bgez(p, r, ptr, label_vmalloc);
570
571 if (uasm_in_compat_space_p(MODULE_START) &&
572 !uasm_rel_lo(MODULE_START)) {
573 uasm_i_lui(p, ptr, uasm_rel_hi(MODULE_START)); /* delay slot */
574 } else {
575 /* unlikely configuration */
576 uasm_i_nop(p); /* delay slot */
577 UASM_i_LA(p, ptr, MODULE_START);
578 }
579 uasm_i_dsubu(p, bvaddr, bvaddr, ptr);
580
581 if (uasm_in_compat_space_p(modd) && !uasm_rel_lo(modd)) {
582 uasm_il_b(p, r, label_vmalloc_done);
583 uasm_i_lui(p, ptr, uasm_rel_hi(modd));
584 } else {
585 UASM_i_LA_mostly(p, ptr, modd);
586 uasm_il_b(p, r, label_vmalloc_done);
587 if (uasm_in_compat_space_p(modd))
588 uasm_i_addiu(p, ptr, ptr, uasm_rel_lo(modd));
589 else
590 uasm_i_daddiu(p, ptr, ptr, uasm_rel_lo(modd));
591 }
592
593 uasm_l_vmalloc(l, *p); 559 uasm_l_vmalloc(l, *p);
594 if (uasm_in_compat_space_p(MODULE_START) &&
595 !uasm_rel_lo(MODULE_START) &&
596 MODULE_START << 32 == VMALLOC_START)
597 uasm_i_dsll32(p, ptr, ptr, 0); /* typical case */
598 else
599 UASM_i_LA(p, ptr, VMALLOC_START);
600#else
601 uasm_l_vmalloc(l, *p);
602 UASM_i_LA(p, ptr, VMALLOC_START);
603#endif
604 uasm_i_dsubu(p, bvaddr, bvaddr, ptr);
605 560
606 if (uasm_in_compat_space_p(swpd) && !uasm_rel_lo(swpd)) { 561 if (uasm_in_compat_space_p(swpd) && !uasm_rel_lo(swpd)) {
607 uasm_il_b(p, r, label_vmalloc_done); 562 uasm_il_b(p, r, label_vmalloc_done);
diff --git a/arch/mips/mti-malta/malta-init.c b/arch/mips/mti-malta/malta-init.c
index 27c807b67fea..f1b14c8a4a1c 100644
--- a/arch/mips/mti-malta/malta-init.c
+++ b/arch/mips/mti-malta/malta-init.c
@@ -47,7 +47,7 @@ int *_prom_argv, *_prom_envp;
47 */ 47 */
48#define prom_envp(index) ((char *)(long)_prom_envp[(index)]) 48#define prom_envp(index) ((char *)(long)_prom_envp[(index)])
49 49
50int init_debug = 0; 50int init_debug;
51 51
52static int mips_revision_corid; 52static int mips_revision_corid;
53int mips_revision_sconid; 53int mips_revision_sconid;
diff --git a/arch/mips/mti-malta/malta-reset.c b/arch/mips/mti-malta/malta-reset.c
index f48d60e84290..329420536241 100644
--- a/arch/mips/mti-malta/malta-reset.c
+++ b/arch/mips/mti-malta/malta-reset.c
@@ -22,6 +22,7 @@
22 * Reset the MIPS boards. 22 * Reset the MIPS boards.
23 * 23 *
24 */ 24 */
25#include <linux/init.h>
25#include <linux/pm.h> 26#include <linux/pm.h>
26 27
27#include <asm/io.h> 28#include <asm/io.h>
@@ -45,9 +46,13 @@ static void mips_machine_halt(void)
45} 46}
46 47
47 48
48void mips_reboot_setup(void) 49static int __init mips_reboot_setup(void)
49{ 50{
50 _machine_restart = mips_machine_restart; 51 _machine_restart = mips_machine_restart;
51 _machine_halt = mips_machine_halt; 52 _machine_halt = mips_machine_halt;
52 pm_power_off = mips_machine_halt; 53 pm_power_off = mips_machine_halt;
54
55 return 0;
53} 56}
57
58arch_initcall(mips_reboot_setup);
diff --git a/arch/mips/mti-malta/malta-setup.c b/arch/mips/mti-malta/malta-setup.c
index dc78b8983eeb..b7f37d4982fa 100644
--- a/arch/mips/mti-malta/malta-setup.c
+++ b/arch/mips/mti-malta/malta-setup.c
@@ -218,7 +218,6 @@ void __init plat_mem_setup(void)
218#if defined(CONFIG_VT) && defined(CONFIG_VGA_CONSOLE) 218#if defined(CONFIG_VT) && defined(CONFIG_VGA_CONSOLE)
219 screen_info_setup(); 219 screen_info_setup();
220#endif 220#endif
221 mips_reboot_setup();
222 221
223 board_be_init = malta_be_init; 222 board_be_init = malta_be_init;
224 board_be_handler = malta_be_handler; 223 board_be_handler = malta_be_handler;
diff --git a/arch/mips/mti-malta/malta-smtc.c b/arch/mips/mti-malta/malta-smtc.c
index 499ffe5475df..192cfd2a539c 100644
--- a/arch/mips/mti-malta/malta-smtc.c
+++ b/arch/mips/mti-malta/malta-smtc.c
@@ -21,11 +21,11 @@ static void msmtc_send_ipi_single(int cpu, unsigned int action)
21 smtc_send_ipi(cpu, LINUX_SMP_IPI, action); 21 smtc_send_ipi(cpu, LINUX_SMP_IPI, action);
22} 22}
23 23
24static void msmtc_send_ipi_mask(cpumask_t mask, unsigned int action) 24static void msmtc_send_ipi_mask(const struct cpumask *mask, unsigned int action)
25{ 25{
26 unsigned int i; 26 unsigned int i;
27 27
28 for_each_cpu_mask(i, mask) 28 for_each_cpu(i, mask)
29 msmtc_send_ipi_single(i, action); 29 msmtc_send_ipi_single(i, action);
30} 30}
31 31
diff --git a/arch/mips/mti-malta/malta-time.c b/arch/mips/mti-malta/malta-time.c
index 0b97d47691fc..3c6f190aa61c 100644
--- a/arch/mips/mti-malta/malta-time.c
+++ b/arch/mips/mti-malta/malta-time.c
@@ -100,9 +100,10 @@ static unsigned int __init estimate_cpu_frequency(void)
100 return count; 100 return count;
101} 101}
102 102
103unsigned long read_persistent_clock(void) 103void read_persistent_clock(struct timespec *ts)
104{ 104{
105 return mc146818_get_cmos_time(); 105 ts->tv_sec = mc146818_get_cmos_time();
106 ts->tv_nsec = 0;
106} 107}
107 108
108static void __init plat_perf_setup(void) 109static void __init plat_perf_setup(void)
diff --git a/arch/mips/nxp/pnx833x/stb22x/board.c b/arch/mips/nxp/pnx833x/stb22x/board.c
index 90cc604bdadf..644eb7c3210f 100644
--- a/arch/mips/nxp/pnx833x/stb22x/board.c
+++ b/arch/mips/nxp/pnx833x/stb22x/board.c
@@ -39,7 +39,7 @@
39#define PNX8335_DEBUG7 0x441c 39#define PNX8335_DEBUG7 0x441c
40 40
41int prom_argc; 41int prom_argc;
42char **prom_argv = 0, **prom_envp = 0; 42char **prom_argv, **prom_envp;
43 43
44extern void prom_init_cmdline(void); 44extern void prom_init_cmdline(void);
45extern char *prom_getenv(char *envname); 45extern char *prom_getenv(char *envname);
diff --git a/arch/mips/nxp/pnx8550/common/proc.c b/arch/mips/nxp/pnx8550/common/proc.c
index acf1fa889444..af094cd1d85b 100644
--- a/arch/mips/nxp/pnx8550/common/proc.c
+++ b/arch/mips/nxp/pnx8550/common/proc.c
@@ -69,9 +69,9 @@ static int pnx8550_registers_read(char* page, char** start, off_t offset, int co
69 return len; 69 return len;
70} 70}
71 71
72static struct proc_dir_entry* pnx8550_dir = NULL; 72static struct proc_dir_entry* pnx8550_dir;
73static struct proc_dir_entry* pnx8550_timers = NULL; 73static struct proc_dir_entry* pnx8550_timers;
74static struct proc_dir_entry* pnx8550_registers = NULL; 74static struct proc_dir_entry* pnx8550_registers;
75 75
76static int pnx8550_proc_init( void ) 76static int pnx8550_proc_init( void )
77{ 77{
diff --git a/arch/mips/oprofile/Makefile b/arch/mips/oprofile/Makefile
index bf3be6fcf7ff..02cc65e52d11 100644
--- a/arch/mips/oprofile/Makefile
+++ b/arch/mips/oprofile/Makefile
@@ -15,3 +15,4 @@ oprofile-$(CONFIG_CPU_MIPS64) += op_model_mipsxx.o
15oprofile-$(CONFIG_CPU_R10000) += op_model_mipsxx.o 15oprofile-$(CONFIG_CPU_R10000) += op_model_mipsxx.o
16oprofile-$(CONFIG_CPU_SB1) += op_model_mipsxx.o 16oprofile-$(CONFIG_CPU_SB1) += op_model_mipsxx.o
17oprofile-$(CONFIG_CPU_RM9000) += op_model_rm9000.o 17oprofile-$(CONFIG_CPU_RM9000) += op_model_rm9000.o
18oprofile-$(CONFIG_CPU_LOONGSON2) += op_model_loongson2.o
diff --git a/arch/mips/oprofile/common.c b/arch/mips/oprofile/common.c
index 3bf3354547f6..7832ad257a14 100644
--- a/arch/mips/oprofile/common.c
+++ b/arch/mips/oprofile/common.c
@@ -16,6 +16,7 @@
16 16
17extern struct op_mips_model op_model_mipsxx_ops __attribute__((weak)); 17extern struct op_mips_model op_model_mipsxx_ops __attribute__((weak));
18extern struct op_mips_model op_model_rm9000_ops __attribute__((weak)); 18extern struct op_mips_model op_model_rm9000_ops __attribute__((weak));
19extern struct op_mips_model op_model_loongson2_ops __attribute__((weak));
19 20
20static struct op_mips_model *model; 21static struct op_mips_model *model;
21 22
@@ -93,6 +94,9 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)
93 case CPU_RM9000: 94 case CPU_RM9000:
94 lmodel = &op_model_rm9000_ops; 95 lmodel = &op_model_rm9000_ops;
95 break; 96 break;
97 case CPU_LOONGSON2:
98 lmodel = &op_model_loongson2_ops;
99 break;
96 }; 100 };
97 101
98 if (!lmodel) 102 if (!lmodel)
diff --git a/arch/mips/oprofile/op_model_loongson2.c b/arch/mips/oprofile/op_model_loongson2.c
new file mode 100644
index 000000000000..655cb8dec340
--- /dev/null
+++ b/arch/mips/oprofile/op_model_loongson2.c
@@ -0,0 +1,177 @@
1/*
2 * Loongson2 performance counter driver for oprofile
3 *
4 * Copyright (C) 2009 Lemote Inc. & Insititute of Computing Technology
5 * Author: Yanhua <yanh@lemote.com>
6 * Author: Wu Zhangjin <wuzj@lemote.com>
7 *
8 * This file is subject to the terms and conditions of the GNU General Public
9 * License. See the file "COPYING" in the main directory of this archive
10 * for more details.
11 *
12 */
13#include <linux/init.h>
14#include <linux/oprofile.h>
15#include <linux/interrupt.h>
16
17#include <loongson.h> /* LOONGSON2_PERFCNT_IRQ */
18#include "op_impl.h"
19
20/*
21 * a patch should be sent to oprofile with the loongson-specific support.
22 * otherwise, the oprofile tool will not recognize this and complain about
23 * "cpu_type 'unset' is not valid".
24 */
25#define LOONGSON2_CPU_TYPE "mips/godson2"
26
27#define LOONGSON2_COUNTER1_EVENT(event) ((event & 0x0f) << 5)
28#define LOONGSON2_COUNTER2_EVENT(event) ((event & 0x0f) << 9)
29
30#define LOONGSON2_PERFCNT_EXL (1UL << 0)
31#define LOONGSON2_PERFCNT_KERNEL (1UL << 1)
32#define LOONGSON2_PERFCNT_SUPERVISOR (1UL << 2)
33#define LOONGSON2_PERFCNT_USER (1UL << 3)
34#define LOONGSON2_PERFCNT_INT_EN (1UL << 4)
35#define LOONGSON2_PERFCNT_OVERFLOW (1ULL << 31)
36
37/* Loongson2 performance counter register */
38#define read_c0_perfctrl() __read_64bit_c0_register($24, 0)
39#define write_c0_perfctrl(val) __write_64bit_c0_register($24, 0, val)
40#define read_c0_perfcnt() __read_64bit_c0_register($25, 0)
41#define write_c0_perfcnt(val) __write_64bit_c0_register($25, 0, val)
42
43static struct loongson2_register_config {
44 unsigned int ctrl;
45 unsigned long long reset_counter1;
46 unsigned long long reset_counter2;
47 int cnt1_enalbed, cnt2_enalbed;
48} reg;
49
50DEFINE_SPINLOCK(sample_lock);
51
52static char *oprofid = "LoongsonPerf";
53static irqreturn_t loongson2_perfcount_handler(int irq, void *dev_id);
54/* Compute all of the registers in preparation for enabling profiling. */
55
56static void loongson2_reg_setup(struct op_counter_config *cfg)
57{
58 unsigned int ctrl = 0;
59
60 reg.reset_counter1 = 0;
61 reg.reset_counter2 = 0;
62 /* Compute the performance counter ctrl word. */
63 /* For now count kernel and user mode */
64 if (cfg[0].enabled) {
65 ctrl |= LOONGSON2_COUNTER1_EVENT(cfg[0].event);
66 reg.reset_counter1 = 0x80000000ULL - cfg[0].count;
67 }
68
69 if (cfg[1].enabled) {
70 ctrl |= LOONGSON2_COUNTER2_EVENT(cfg[1].event);
71 reg.reset_counter2 = (0x80000000ULL - cfg[1].count);
72 }
73
74 if (cfg[0].enabled || cfg[1].enabled) {
75 ctrl |= LOONGSON2_PERFCNT_EXL | LOONGSON2_PERFCNT_INT_EN;
76 if (cfg[0].kernel || cfg[1].kernel)
77 ctrl |= LOONGSON2_PERFCNT_KERNEL;
78 if (cfg[0].user || cfg[1].user)
79 ctrl |= LOONGSON2_PERFCNT_USER;
80 }
81
82 reg.ctrl = ctrl;
83
84 reg.cnt1_enalbed = cfg[0].enabled;
85 reg.cnt2_enalbed = cfg[1].enabled;
86
87}
88
89/* Program all of the registers in preparation for enabling profiling. */
90
91static void loongson2_cpu_setup(void *args)
92{
93 uint64_t perfcount;
94
95 perfcount = (reg.reset_counter2 << 32) | reg.reset_counter1;
96 write_c0_perfcnt(perfcount);
97}
98
99static void loongson2_cpu_start(void *args)
100{
101 /* Start all counters on current CPU */
102 if (reg.cnt1_enalbed || reg.cnt2_enalbed)
103 write_c0_perfctrl(reg.ctrl);
104}
105
106static void loongson2_cpu_stop(void *args)
107{
108 /* Stop all counters on current CPU */
109 write_c0_perfctrl(0);
110 memset(&reg, 0, sizeof(reg));
111}
112
113static irqreturn_t loongson2_perfcount_handler(int irq, void *dev_id)
114{
115 uint64_t counter, counter1, counter2;
116 struct pt_regs *regs = get_irq_regs();
117 int enabled;
118 unsigned long flags;
119
120 /*
121 * LOONGSON2 defines two 32-bit performance counters.
122 * To avoid a race updating the registers we need to stop the counters
123 * while we're messing with
124 * them ...
125 */
126
127 /* Check whether the irq belongs to me */
128 enabled = reg.cnt1_enalbed | reg.cnt2_enalbed;
129 if (!enabled)
130 return IRQ_NONE;
131
132 counter = read_c0_perfcnt();
133 counter1 = counter & 0xffffffff;
134 counter2 = counter >> 32;
135
136 spin_lock_irqsave(&sample_lock, flags);
137
138 if (counter1 & LOONGSON2_PERFCNT_OVERFLOW) {
139 if (reg.cnt1_enalbed)
140 oprofile_add_sample(regs, 0);
141 counter1 = reg.reset_counter1;
142 }
143 if (counter2 & LOONGSON2_PERFCNT_OVERFLOW) {
144 if (reg.cnt2_enalbed)
145 oprofile_add_sample(regs, 1);
146 counter2 = reg.reset_counter2;
147 }
148
149 spin_unlock_irqrestore(&sample_lock, flags);
150
151 write_c0_perfcnt((counter2 << 32) | counter1);
152
153 return IRQ_HANDLED;
154}
155
156static int __init loongson2_init(void)
157{
158 return request_irq(LOONGSON2_PERFCNT_IRQ, loongson2_perfcount_handler,
159 IRQF_SHARED, "Perfcounter", oprofid);
160}
161
162static void loongson2_exit(void)
163{
164 write_c0_perfctrl(0);
165 free_irq(LOONGSON2_PERFCNT_IRQ, oprofid);
166}
167
168struct op_mips_model op_model_loongson2_ops = {
169 .reg_setup = loongson2_reg_setup,
170 .cpu_setup = loongson2_cpu_setup,
171 .init = loongson2_init,
172 .exit = loongson2_exit,
173 .cpu_start = loongson2_cpu_start,
174 .cpu_stop = loongson2_cpu_stop,
175 .cpu_type = LOONGSON2_CPU_TYPE,
176 .num_counters = 2
177};
diff --git a/arch/mips/pci/Makefile b/arch/mips/pci/Makefile
index 63d8a297c58d..91bfe73a7f60 100644
--- a/arch/mips/pci/Makefile
+++ b/arch/mips/pci/Makefile
@@ -16,6 +16,8 @@ obj-$(CONFIG_PCI_VR41XX) += ops-vr41xx.o pci-vr41xx.o
16obj-$(CONFIG_NEC_MARKEINS) += ops-emma2rh.o pci-emma2rh.o fixup-emma2rh.o 16obj-$(CONFIG_NEC_MARKEINS) += ops-emma2rh.o pci-emma2rh.o fixup-emma2rh.o
17obj-$(CONFIG_PCI_TX4927) += ops-tx4927.o 17obj-$(CONFIG_PCI_TX4927) += ops-tx4927.o
18obj-$(CONFIG_BCM47XX) += pci-bcm47xx.o 18obj-$(CONFIG_BCM47XX) += pci-bcm47xx.o
19obj-$(CONFIG_BCM63XX) += pci-bcm63xx.o fixup-bcm63xx.o \
20 ops-bcm63xx.o
19 21
20# 22#
21# These are still pretty much in the old state, watch, go blind. 23# These are still pretty much in the old state, watch, go blind.
@@ -26,7 +28,7 @@ obj-$(CONFIG_MIPS_COBALT) += fixup-cobalt.o
26obj-$(CONFIG_SOC_AU1500) += fixup-au1000.o ops-au1000.o 28obj-$(CONFIG_SOC_AU1500) += fixup-au1000.o ops-au1000.o
27obj-$(CONFIG_SOC_AU1550) += fixup-au1000.o ops-au1000.o 29obj-$(CONFIG_SOC_AU1550) += fixup-au1000.o ops-au1000.o
28obj-$(CONFIG_SOC_PNX8550) += fixup-pnx8550.o ops-pnx8550.o 30obj-$(CONFIG_SOC_PNX8550) += fixup-pnx8550.o ops-pnx8550.o
29obj-$(CONFIG_LEMOTE_FULONG) += fixup-lm2e.o ops-bonito64.o 31obj-$(CONFIG_LEMOTE_FULOONG2E) += fixup-fuloong2e.o ops-bonito64.o
30obj-$(CONFIG_MIPS_MALTA) += fixup-malta.o 32obj-$(CONFIG_MIPS_MALTA) += fixup-malta.o
31obj-$(CONFIG_PMC_MSP7120_GW) += fixup-pmcmsp.o ops-pmcmsp.o 33obj-$(CONFIG_PMC_MSP7120_GW) += fixup-pmcmsp.o ops-pmcmsp.o
32obj-$(CONFIG_PMC_MSP7120_EVAL) += fixup-pmcmsp.o ops-pmcmsp.o 34obj-$(CONFIG_PMC_MSP7120_EVAL) += fixup-pmcmsp.o ops-pmcmsp.o
diff --git a/arch/mips/pci/fixup-bcm63xx.c b/arch/mips/pci/fixup-bcm63xx.c
new file mode 100644
index 000000000000..340863009da9
--- /dev/null
+++ b/arch/mips/pci/fixup-bcm63xx.c
@@ -0,0 +1,21 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr>
7 */
8
9#include <linux/types.h>
10#include <linux/pci.h>
11#include <bcm63xx_cpu.h>
12
13int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
14{
15 return bcm63xx_get_irq_number(IRQ_PCI);
16}
17
18int pcibios_plat_dev_init(struct pci_dev *dev)
19{
20 return 0;
21}
diff --git a/arch/mips/pci/fixup-lm2e.c b/arch/mips/pci/fixup-fuloong2e.c
index e18ae4f574c1..0c4c7a81213f 100644
--- a/arch/mips/pci/fixup-lm2e.c
+++ b/arch/mips/pci/fixup-fuloong2e.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * fixup-lm2e.c
3 *
4 * Copyright (C) 2004 ICT CAS 2 * Copyright (C) 2004 ICT CAS
5 * Author: Li xiaoyu, ICT CAS 3 * Author: Li xiaoyu, ICT CAS
6 * lixy@ict.ac.cn 4 * lixy@ict.ac.cn
@@ -12,22 +10,6 @@
12 * under the terms of the GNU General Public License as published by the 10 * under the terms of the GNU General Public License as published by the
13 * Free Software Foundation; either version 2 of the License, or (at your 11 * Free Software Foundation; either version 2 of the License, or (at your
14 * option) any later version. 12 * option) any later version.
15 *
16 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
17 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
19 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
22 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
23 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 *
27 * You should have received a copy of the GNU General Public License along
28 * with this program; if not, write to the Free Software Foundation, Inc.,
29 * 675 Mass Ave, Cambridge, MA 02139, USA.
30 *
31 */ 13 */
32#include <linux/init.h> 14#include <linux/init.h>
33#include <linux/pci.h> 15#include <linux/pci.h>
diff --git a/arch/mips/pci/ops-bcm63xx.c b/arch/mips/pci/ops-bcm63xx.c
new file mode 100644
index 000000000000..822ae179bc56
--- /dev/null
+++ b/arch/mips/pci/ops-bcm63xx.c
@@ -0,0 +1,467 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr>
7 */
8
9#include <linux/types.h>
10#include <linux/pci.h>
11#include <linux/kernel.h>
12#include <linux/init.h>
13#include <linux/delay.h>
14#include <linux/io.h>
15
16#include "pci-bcm63xx.h"
17
18/*
19 * swizzle 32bits data to return only the needed part
20 */
21static int postprocess_read(u32 data, int where, unsigned int size)
22{
23 u32 ret;
24
25 ret = 0;
26 switch (size) {
27 case 1:
28 ret = (data >> ((where & 3) << 3)) & 0xff;
29 break;
30 case 2:
31 ret = (data >> ((where & 3) << 3)) & 0xffff;
32 break;
33 case 4:
34 ret = data;
35 break;
36 }
37 return ret;
38}
39
40static int preprocess_write(u32 orig_data, u32 val, int where,
41 unsigned int size)
42{
43 u32 ret;
44
45 ret = 0;
46 switch (size) {
47 case 1:
48 ret = (orig_data & ~(0xff << ((where & 3) << 3))) |
49 (val << ((where & 3) << 3));
50 break;
51 case 2:
52 ret = (orig_data & ~(0xffff << ((where & 3) << 3))) |
53 (val << ((where & 3) << 3));
54 break;
55 case 4:
56 ret = val;
57 break;
58 }
59 return ret;
60}
61
62/*
63 * setup hardware for a configuration cycle with given parameters
64 */
65static int bcm63xx_setup_cfg_access(int type, unsigned int busn,
66 unsigned int devfn, int where)
67{
68 unsigned int slot, func, reg;
69 u32 val;
70
71 slot = PCI_SLOT(devfn);
72 func = PCI_FUNC(devfn);
73 reg = where >> 2;
74
75 /* sanity check */
76 if (slot > (MPI_L2PCFG_DEVNUM_MASK >> MPI_L2PCFG_DEVNUM_SHIFT))
77 return 1;
78
79 if (func > (MPI_L2PCFG_FUNC_MASK >> MPI_L2PCFG_FUNC_SHIFT))
80 return 1;
81
82 if (reg > (MPI_L2PCFG_REG_MASK >> MPI_L2PCFG_REG_SHIFT))
83 return 1;
84
85 /* ok, setup config access */
86 val = (reg << MPI_L2PCFG_REG_SHIFT);
87 val |= (func << MPI_L2PCFG_FUNC_SHIFT);
88 val |= (slot << MPI_L2PCFG_DEVNUM_SHIFT);
89 val |= MPI_L2PCFG_CFG_USEREG_MASK;
90 val |= MPI_L2PCFG_CFG_SEL_MASK;
91 /* type 0 cycle for local bus, type 1 cycle for anything else */
92 if (type != 0) {
93 /* FIXME: how to specify bus ??? */
94 val |= (1 << MPI_L2PCFG_CFG_TYPE_SHIFT);
95 }
96 bcm_mpi_writel(val, MPI_L2PCFG_REG);
97
98 return 0;
99}
100
101static int bcm63xx_do_cfg_read(int type, unsigned int busn,
102 unsigned int devfn, int where, int size,
103 u32 *val)
104{
105 u32 data;
106
107 /* two phase cycle, first we write address, then read data at
108 * another location, caller already has a spinlock so no need
109 * to add one here */
110 if (bcm63xx_setup_cfg_access(type, busn, devfn, where))
111 return PCIBIOS_DEVICE_NOT_FOUND;
112 iob();
113 data = le32_to_cpu(__raw_readl(pci_iospace_start));
114 /* restore IO space normal behaviour */
115 bcm_mpi_writel(0, MPI_L2PCFG_REG);
116
117 *val = postprocess_read(data, where, size);
118
119 return PCIBIOS_SUCCESSFUL;
120}
121
122static int bcm63xx_do_cfg_write(int type, unsigned int busn,
123 unsigned int devfn, int where, int size,
124 u32 val)
125{
126 u32 data;
127
128 /* two phase cycle, first we write address, then write data to
129 * another location, caller already has a spinlock so no need
130 * to add one here */
131 if (bcm63xx_setup_cfg_access(type, busn, devfn, where))
132 return PCIBIOS_DEVICE_NOT_FOUND;
133 iob();
134
135 data = le32_to_cpu(__raw_readl(pci_iospace_start));
136 data = preprocess_write(data, val, where, size);
137
138 __raw_writel(cpu_to_le32(data), pci_iospace_start);
139 wmb();
140 /* no way to know the access is done, we have to wait */
141 udelay(500);
142 /* restore IO space normal behaviour */
143 bcm_mpi_writel(0, MPI_L2PCFG_REG);
144
145 return PCIBIOS_SUCCESSFUL;
146}
147
148static int bcm63xx_pci_read(struct pci_bus *bus, unsigned int devfn,
149 int where, int size, u32 *val)
150{
151 int type;
152
153 type = bus->parent ? 1 : 0;
154
155 if (type == 0 && PCI_SLOT(devfn) == CARDBUS_PCI_IDSEL)
156 return PCIBIOS_DEVICE_NOT_FOUND;
157
158 return bcm63xx_do_cfg_read(type, bus->number, devfn,
159 where, size, val);
160}
161
162static int bcm63xx_pci_write(struct pci_bus *bus, unsigned int devfn,
163 int where, int size, u32 val)
164{
165 int type;
166
167 type = bus->parent ? 1 : 0;
168
169 if (type == 0 && PCI_SLOT(devfn) == CARDBUS_PCI_IDSEL)
170 return PCIBIOS_DEVICE_NOT_FOUND;
171
172 return bcm63xx_do_cfg_write(type, bus->number, devfn,
173 where, size, val);
174}
175
176struct pci_ops bcm63xx_pci_ops = {
177 .read = bcm63xx_pci_read,
178 .write = bcm63xx_pci_write
179};
180
181#ifdef CONFIG_CARDBUS
182/*
183 * emulate configuration read access on a cardbus bridge
184 */
185#define FAKE_CB_BRIDGE_SLOT 0x1e
186
187static int fake_cb_bridge_bus_number = -1;
188
189static struct {
190 u16 pci_command;
191 u8 cb_latency;
192 u8 subordinate_busn;
193 u8 cardbus_busn;
194 u8 pci_busn;
195 int bus_assigned;
196 u16 bridge_control;
197
198 u32 mem_base0;
199 u32 mem_limit0;
200 u32 mem_base1;
201 u32 mem_limit1;
202
203 u32 io_base0;
204 u32 io_limit0;
205 u32 io_base1;
206 u32 io_limit1;
207} fake_cb_bridge_regs;
208
209static int fake_cb_bridge_read(int where, int size, u32 *val)
210{
211 unsigned int reg;
212 u32 data;
213
214 data = 0;
215 reg = where >> 2;
216 switch (reg) {
217 case (PCI_VENDOR_ID >> 2):
218 case (PCI_CB_SUBSYSTEM_VENDOR_ID >> 2):
219 /* create dummy vendor/device id from our cpu id */
220 data = (bcm63xx_get_cpu_id() << 16) | PCI_VENDOR_ID_BROADCOM;
221 break;
222
223 case (PCI_COMMAND >> 2):
224 data = (PCI_STATUS_DEVSEL_SLOW << 16);
225 data |= fake_cb_bridge_regs.pci_command;
226 break;
227
228 case (PCI_CLASS_REVISION >> 2):
229 data = (PCI_CLASS_BRIDGE_CARDBUS << 16);
230 break;
231
232 case (PCI_CACHE_LINE_SIZE >> 2):
233 data = (PCI_HEADER_TYPE_CARDBUS << 16);
234 break;
235
236 case (PCI_INTERRUPT_LINE >> 2):
237 /* bridge control */
238 data = (fake_cb_bridge_regs.bridge_control << 16);
239 /* pin:intA line:0xff */
240 data |= (0x1 << 8) | 0xff;
241 break;
242
243 case (PCI_CB_PRIMARY_BUS >> 2):
244 data = (fake_cb_bridge_regs.cb_latency << 24);
245 data |= (fake_cb_bridge_regs.subordinate_busn << 16);
246 data |= (fake_cb_bridge_regs.cardbus_busn << 8);
247 data |= fake_cb_bridge_regs.pci_busn;
248 break;
249
250 case (PCI_CB_MEMORY_BASE_0 >> 2):
251 data = fake_cb_bridge_regs.mem_base0;
252 break;
253
254 case (PCI_CB_MEMORY_LIMIT_0 >> 2):
255 data = fake_cb_bridge_regs.mem_limit0;
256 break;
257
258 case (PCI_CB_MEMORY_BASE_1 >> 2):
259 data = fake_cb_bridge_regs.mem_base1;
260 break;
261
262 case (PCI_CB_MEMORY_LIMIT_1 >> 2):
263 data = fake_cb_bridge_regs.mem_limit1;
264 break;
265
266 case (PCI_CB_IO_BASE_0 >> 2):
267 /* | 1 for 32bits io support */
268 data = fake_cb_bridge_regs.io_base0 | 0x1;
269 break;
270
271 case (PCI_CB_IO_LIMIT_0 >> 2):
272 data = fake_cb_bridge_regs.io_limit0;
273 break;
274
275 case (PCI_CB_IO_BASE_1 >> 2):
276 /* | 1 for 32bits io support */
277 data = fake_cb_bridge_regs.io_base1 | 0x1;
278 break;
279
280 case (PCI_CB_IO_LIMIT_1 >> 2):
281 data = fake_cb_bridge_regs.io_limit1;
282 break;
283 }
284
285 *val = postprocess_read(data, where, size);
286 return PCIBIOS_SUCCESSFUL;
287}
288
289/*
290 * emulate configuration write access on a cardbus bridge
291 */
292static int fake_cb_bridge_write(int where, int size, u32 val)
293{
294 unsigned int reg;
295 u32 data, tmp;
296 int ret;
297
298 ret = fake_cb_bridge_read((where & ~0x3), 4, &data);
299 if (ret != PCIBIOS_SUCCESSFUL)
300 return ret;
301
302 data = preprocess_write(data, val, where, size);
303
304 reg = where >> 2;
305 switch (reg) {
306 case (PCI_COMMAND >> 2):
307 fake_cb_bridge_regs.pci_command = (data & 0xffff);
308 break;
309
310 case (PCI_CB_PRIMARY_BUS >> 2):
311 fake_cb_bridge_regs.cb_latency = (data >> 24) & 0xff;
312 fake_cb_bridge_regs.subordinate_busn = (data >> 16) & 0xff;
313 fake_cb_bridge_regs.cardbus_busn = (data >> 8) & 0xff;
314 fake_cb_bridge_regs.pci_busn = data & 0xff;
315 if (fake_cb_bridge_regs.cardbus_busn)
316 fake_cb_bridge_regs.bus_assigned = 1;
317 break;
318
319 case (PCI_INTERRUPT_LINE >> 2):
320 tmp = (data >> 16) & 0xffff;
321 /* disable memory prefetch support */
322 tmp &= ~PCI_CB_BRIDGE_CTL_PREFETCH_MEM0;
323 tmp &= ~PCI_CB_BRIDGE_CTL_PREFETCH_MEM1;
324 fake_cb_bridge_regs.bridge_control = tmp;
325 break;
326
327 case (PCI_CB_MEMORY_BASE_0 >> 2):
328 fake_cb_bridge_regs.mem_base0 = data;
329 break;
330
331 case (PCI_CB_MEMORY_LIMIT_0 >> 2):
332 fake_cb_bridge_regs.mem_limit0 = data;
333 break;
334
335 case (PCI_CB_MEMORY_BASE_1 >> 2):
336 fake_cb_bridge_regs.mem_base1 = data;
337 break;
338
339 case (PCI_CB_MEMORY_LIMIT_1 >> 2):
340 fake_cb_bridge_regs.mem_limit1 = data;
341 break;
342
343 case (PCI_CB_IO_BASE_0 >> 2):
344 fake_cb_bridge_regs.io_base0 = data;
345 break;
346
347 case (PCI_CB_IO_LIMIT_0 >> 2):
348 fake_cb_bridge_regs.io_limit0 = data;
349 break;
350
351 case (PCI_CB_IO_BASE_1 >> 2):
352 fake_cb_bridge_regs.io_base1 = data;
353 break;
354
355 case (PCI_CB_IO_LIMIT_1 >> 2):
356 fake_cb_bridge_regs.io_limit1 = data;
357 break;
358 }
359
360 return PCIBIOS_SUCCESSFUL;
361}
362
363static int bcm63xx_cb_read(struct pci_bus *bus, unsigned int devfn,
364 int where, int size, u32 *val)
365{
366 /* snoop access to slot 0x1e on root bus, we fake a cardbus
367 * bridge at this location */
368 if (!bus->parent && PCI_SLOT(devfn) == FAKE_CB_BRIDGE_SLOT) {
369 fake_cb_bridge_bus_number = bus->number;
370 return fake_cb_bridge_read(where, size, val);
371 }
372
373 /* a configuration cycle for the device behind the cardbus
374 * bridge is actually done as a type 0 cycle on the primary
375 * bus. This means that only one device can be on the cardbus
376 * bus */
377 if (fake_cb_bridge_regs.bus_assigned &&
378 bus->number == fake_cb_bridge_regs.cardbus_busn &&
379 PCI_SLOT(devfn) == 0)
380 return bcm63xx_do_cfg_read(0, 0,
381 PCI_DEVFN(CARDBUS_PCI_IDSEL, 0),
382 where, size, val);
383
384 return PCIBIOS_DEVICE_NOT_FOUND;
385}
386
387static int bcm63xx_cb_write(struct pci_bus *bus, unsigned int devfn,
388 int where, int size, u32 val)
389{
390 if (!bus->parent && PCI_SLOT(devfn) == FAKE_CB_BRIDGE_SLOT) {
391 fake_cb_bridge_bus_number = bus->number;
392 return fake_cb_bridge_write(where, size, val);
393 }
394
395 if (fake_cb_bridge_regs.bus_assigned &&
396 bus->number == fake_cb_bridge_regs.cardbus_busn &&
397 PCI_SLOT(devfn) == 0)
398 return bcm63xx_do_cfg_write(0, 0,
399 PCI_DEVFN(CARDBUS_PCI_IDSEL, 0),
400 where, size, val);
401
402 return PCIBIOS_DEVICE_NOT_FOUND;
403}
404
405struct pci_ops bcm63xx_cb_ops = {
406 .read = bcm63xx_cb_read,
407 .write = bcm63xx_cb_write,
408};
409
410/*
411 * only one IO window, so it cannot be shared by PCI and cardbus, use
412 * fixup to choose and detect unhandled configuration
413 */
414static void bcm63xx_fixup(struct pci_dev *dev)
415{
416 static int io_window = -1;
417 int i, found, new_io_window;
418 u32 val;
419
420 /* look for any io resource */
421 found = 0;
422 for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
423 if (pci_resource_flags(dev, i) & IORESOURCE_IO) {
424 found = 1;
425 break;
426 }
427 }
428
429 if (!found)
430 return;
431
432 /* skip our fake bus with only cardbus bridge on it */
433 if (dev->bus->number == fake_cb_bridge_bus_number)
434 return;
435
436 /* find on which bus the device is */
437 if (fake_cb_bridge_regs.bus_assigned &&
438 dev->bus->number == fake_cb_bridge_regs.cardbus_busn &&
439 PCI_SLOT(dev->devfn) == 0)
440 new_io_window = 1;
441 else
442 new_io_window = 0;
443
444 if (new_io_window == io_window)
445 return;
446
447 if (io_window != -1) {
448 printk(KERN_ERR "bcm63xx: both PCI and cardbus devices "
449 "need IO, which hardware cannot do\n");
450 return;
451 }
452
453 printk(KERN_INFO "bcm63xx: PCI IO window assigned to %s\n",
454 (new_io_window == 0) ? "PCI" : "cardbus");
455
456 val = bcm_mpi_readl(MPI_L2PIOREMAP_REG);
457 if (io_window)
458 val |= MPI_L2PREMAP_IS_CARDBUS_MASK;
459 else
460 val &= ~MPI_L2PREMAP_IS_CARDBUS_MASK;
461 bcm_mpi_writel(val, MPI_L2PIOREMAP_REG);
462
463 io_window = new_io_window;
464}
465
466DECLARE_PCI_FIXUP_ENABLE(PCI_ANY_ID, PCI_ANY_ID, bcm63xx_fixup);
467#endif
diff --git a/arch/mips/pci/ops-bonito64.c b/arch/mips/pci/ops-bonito64.c
index f742c51acf0d..54e55e7a2431 100644
--- a/arch/mips/pci/ops-bonito64.c
+++ b/arch/mips/pci/ops-bonito64.c
@@ -29,7 +29,7 @@
29#define PCI_ACCESS_READ 0 29#define PCI_ACCESS_READ 0
30#define PCI_ACCESS_WRITE 1 30#define PCI_ACCESS_WRITE 1
31 31
32#ifdef CONFIG_LEMOTE_FULONG 32#ifdef CONFIG_LEMOTE_FULOONG2E
33#define CFG_SPACE_REG(offset) (void *)CKSEG1ADDR(BONITO_PCICFG_BASE | (offset)) 33#define CFG_SPACE_REG(offset) (void *)CKSEG1ADDR(BONITO_PCICFG_BASE | (offset))
34#define ID_SEL_BEGIN 11 34#define ID_SEL_BEGIN 11
35#else 35#else
@@ -77,7 +77,7 @@ static int bonito64_pcibios_config_access(unsigned char access_type,
77 addrp = CFG_SPACE_REG(addr & 0xffff); 77 addrp = CFG_SPACE_REG(addr & 0xffff);
78 if (access_type == PCI_ACCESS_WRITE) { 78 if (access_type == PCI_ACCESS_WRITE) {
79 writel(cpu_to_le32(*data), addrp); 79 writel(cpu_to_le32(*data), addrp);
80#ifndef CONFIG_LEMOTE_FULONG 80#ifndef CONFIG_LEMOTE_FULOONG2E
81 /* Wait till done */ 81 /* Wait till done */
82 while (BONITO_PCIMSTAT & 0xF); 82 while (BONITO_PCIMSTAT & 0xF);
83#endif 83#endif
diff --git a/arch/mips/pci/pci-bcm1480.c b/arch/mips/pci/pci-bcm1480.c
index a9060c771840..6f5e24c6ae67 100644
--- a/arch/mips/pci/pci-bcm1480.c
+++ b/arch/mips/pci/pci-bcm1480.c
@@ -57,7 +57,7 @@ static void *cfg_space;
57#define PCI_BUS_ENABLED 1 57#define PCI_BUS_ENABLED 1
58#define PCI_DEVICE_MODE 2 58#define PCI_DEVICE_MODE 2
59 59
60static int bcm1480_bus_status = 0; 60static int bcm1480_bus_status;
61 61
62#define PCI_BRIDGE_DEVICE 0 62#define PCI_BRIDGE_DEVICE 0
63 63
diff --git a/arch/mips/pci/pci-bcm1480ht.c b/arch/mips/pci/pci-bcm1480ht.c
index f54f45412b0b..50cc6e9e8240 100644
--- a/arch/mips/pci/pci-bcm1480ht.c
+++ b/arch/mips/pci/pci-bcm1480ht.c
@@ -56,7 +56,7 @@ static void *ht_cfg_space;
56#define PCI_BUS_ENABLED 1 56#define PCI_BUS_ENABLED 1
57#define PCI_DEVICE_MODE 2 57#define PCI_DEVICE_MODE 2
58 58
59static int bcm1480ht_bus_status = 0; 59static int bcm1480ht_bus_status;
60 60
61#define PCI_BRIDGE_DEVICE 0 61#define PCI_BRIDGE_DEVICE 0
62#define HT_BRIDGE_DEVICE 1 62#define HT_BRIDGE_DEVICE 1
diff --git a/arch/mips/pci/pci-bcm63xx.c b/arch/mips/pci/pci-bcm63xx.c
new file mode 100644
index 000000000000..82e0fde1dba0
--- /dev/null
+++ b/arch/mips/pci/pci-bcm63xx.c
@@ -0,0 +1,224 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr>
7 */
8
9#include <linux/types.h>
10#include <linux/pci.h>
11#include <linux/kernel.h>
12#include <linux/init.h>
13#include <asm/bootinfo.h>
14
15#include "pci-bcm63xx.h"
16
17/*
18 * Allow PCI to be disabled at runtime depending on board nvram
19 * configuration
20 */
21int bcm63xx_pci_enabled;
22
23static struct resource bcm_pci_mem_resource = {
24 .name = "bcm63xx PCI memory space",
25 .start = BCM_PCI_MEM_BASE_PA,
26 .end = BCM_PCI_MEM_END_PA,
27 .flags = IORESOURCE_MEM
28};
29
30static struct resource bcm_pci_io_resource = {
31 .name = "bcm63xx PCI IO space",
32 .start = BCM_PCI_IO_BASE_PA,
33#ifdef CONFIG_CARDBUS
34 .end = BCM_PCI_IO_HALF_PA,
35#else
36 .end = BCM_PCI_IO_END_PA,
37#endif
38 .flags = IORESOURCE_IO
39};
40
41struct pci_controller bcm63xx_controller = {
42 .pci_ops = &bcm63xx_pci_ops,
43 .io_resource = &bcm_pci_io_resource,
44 .mem_resource = &bcm_pci_mem_resource,
45};
46
47/*
48 * We handle cardbus via a fake Cardbus bridge, memory and io spaces
49 * have to be clearly separated from PCI one since we have different
50 * memory decoder.
51 */
52#ifdef CONFIG_CARDBUS
53static struct resource bcm_cb_mem_resource = {
54 .name = "bcm63xx Cardbus memory space",
55 .start = BCM_CB_MEM_BASE_PA,
56 .end = BCM_CB_MEM_END_PA,
57 .flags = IORESOURCE_MEM
58};
59
60static struct resource bcm_cb_io_resource = {
61 .name = "bcm63xx Cardbus IO space",
62 .start = BCM_PCI_IO_HALF_PA + 1,
63 .end = BCM_PCI_IO_END_PA,
64 .flags = IORESOURCE_IO
65};
66
67struct pci_controller bcm63xx_cb_controller = {
68 .pci_ops = &bcm63xx_cb_ops,
69 .io_resource = &bcm_cb_io_resource,
70 .mem_resource = &bcm_cb_mem_resource,
71};
72#endif
73
74static u32 bcm63xx_int_cfg_readl(u32 reg)
75{
76 u32 tmp;
77
78 tmp = reg & MPI_PCICFGCTL_CFGADDR_MASK;
79 tmp |= MPI_PCICFGCTL_WRITEEN_MASK;
80 bcm_mpi_writel(tmp, MPI_PCICFGCTL_REG);
81 iob();
82 return bcm_mpi_readl(MPI_PCICFGDATA_REG);
83}
84
85static void bcm63xx_int_cfg_writel(u32 val, u32 reg)
86{
87 u32 tmp;
88
89 tmp = reg & MPI_PCICFGCTL_CFGADDR_MASK;
90 tmp |= MPI_PCICFGCTL_WRITEEN_MASK;
91 bcm_mpi_writel(tmp, MPI_PCICFGCTL_REG);
92 bcm_mpi_writel(val, MPI_PCICFGDATA_REG);
93}
94
95void __iomem *pci_iospace_start;
96
97static int __init bcm63xx_pci_init(void)
98{
99 unsigned int mem_size;
100 u32 val;
101
102 if (!BCMCPU_IS_6348() && !BCMCPU_IS_6358())
103 return -ENODEV;
104
105 if (!bcm63xx_pci_enabled)
106 return -ENODEV;
107
108 /*
109 * configuration access are done through IO space, remap 4
110 * first bytes to access it from CPU.
111 *
112 * this means that no io access from CPU should happen while
113 * we do a configuration cycle, but there's no way we can add
114 * a spinlock for each io access, so this is currently kind of
115 * broken on SMP.
116 */
117 pci_iospace_start = ioremap_nocache(BCM_PCI_IO_BASE_PA, 4);
118 if (!pci_iospace_start)
119 return -ENOMEM;
120
121 /* setup local bus to PCI access (PCI memory) */
122 val = BCM_PCI_MEM_BASE_PA & MPI_L2P_BASE_MASK;
123 bcm_mpi_writel(val, MPI_L2PMEMBASE1_REG);
124 bcm_mpi_writel(~(BCM_PCI_MEM_SIZE - 1), MPI_L2PMEMRANGE1_REG);
125 bcm_mpi_writel(val | MPI_L2PREMAP_ENABLED_MASK, MPI_L2PMEMREMAP1_REG);
126
127 /* set Cardbus IDSEL (type 0 cfg access on primary bus for
128 * this IDSEL will be done on Cardbus instead) */
129 val = bcm_pcmcia_readl(PCMCIA_C1_REG);
130 val &= ~PCMCIA_C1_CBIDSEL_MASK;
131 val |= (CARDBUS_PCI_IDSEL << PCMCIA_C1_CBIDSEL_SHIFT);
132 bcm_pcmcia_writel(val, PCMCIA_C1_REG);
133
134#ifdef CONFIG_CARDBUS
135 /* setup local bus to PCI access (Cardbus memory) */
136 val = BCM_CB_MEM_BASE_PA & MPI_L2P_BASE_MASK;
137 bcm_mpi_writel(val, MPI_L2PMEMBASE2_REG);
138 bcm_mpi_writel(~(BCM_CB_MEM_SIZE - 1), MPI_L2PMEMRANGE2_REG);
139 val |= MPI_L2PREMAP_ENABLED_MASK | MPI_L2PREMAP_IS_CARDBUS_MASK;
140 bcm_mpi_writel(val, MPI_L2PMEMREMAP2_REG);
141#else
142 /* disable second access windows */
143 bcm_mpi_writel(0, MPI_L2PMEMREMAP2_REG);
144#endif
145
146 /* setup local bus to PCI access (IO memory), we have only 1
147 * IO window for both PCI and cardbus, but it cannot handle
148 * both at the same time, assume standard PCI for now, if
149 * cardbus card has IO zone, PCI fixup will change window to
150 * cardbus */
151 val = BCM_PCI_IO_BASE_PA & MPI_L2P_BASE_MASK;
152 bcm_mpi_writel(val, MPI_L2PIOBASE_REG);
153 bcm_mpi_writel(~(BCM_PCI_IO_SIZE - 1), MPI_L2PIORANGE_REG);
154 bcm_mpi_writel(val | MPI_L2PREMAP_ENABLED_MASK, MPI_L2PIOREMAP_REG);
155
156 /* enable PCI related GPIO pins */
157 bcm_mpi_writel(MPI_LOCBUSCTL_EN_PCI_GPIO_MASK, MPI_LOCBUSCTL_REG);
158
159 /* setup PCI to local bus access, used by PCI device to target
160 * local RAM while bus mastering */
161 bcm63xx_int_cfg_writel(0, PCI_BASE_ADDRESS_3);
162 if (BCMCPU_IS_6358())
163 val = MPI_SP0_REMAP_ENABLE_MASK;
164 else
165 val = 0;
166 bcm_mpi_writel(val, MPI_SP0_REMAP_REG);
167
168 bcm63xx_int_cfg_writel(0x0, PCI_BASE_ADDRESS_4);
169 bcm_mpi_writel(0, MPI_SP1_REMAP_REG);
170
171 mem_size = bcm63xx_get_memory_size();
172
173 /* 6348 before rev b0 exposes only 16 MB of RAM memory through
174 * PCI, throw a warning if we have more memory */
175 if (BCMCPU_IS_6348() && (bcm63xx_get_cpu_rev() & 0xf0) == 0xa0) {
176 if (mem_size > (16 * 1024 * 1024))
177 printk(KERN_WARNING "bcm63xx: this CPU "
178 "revision cannot handle more than 16MB "
179 "of RAM for PCI bus mastering\n");
180 } else {
181 /* setup sp0 range to local RAM size */
182 bcm_mpi_writel(~(mem_size - 1), MPI_SP0_RANGE_REG);
183 bcm_mpi_writel(0, MPI_SP1_RANGE_REG);
184 }
185
186 /* change host bridge retry counter to infinite number of
187 * retry, needed for some broadcom wifi cards with Silicon
188 * Backplane bus where access to srom seems very slow */
189 val = bcm63xx_int_cfg_readl(BCMPCI_REG_TIMERS);
190 val &= ~REG_TIMER_RETRY_MASK;
191 bcm63xx_int_cfg_writel(val, BCMPCI_REG_TIMERS);
192
193 /* enable memory decoder and bus mastering */
194 val = bcm63xx_int_cfg_readl(PCI_COMMAND);
195 val |= (PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER);
196 bcm63xx_int_cfg_writel(val, PCI_COMMAND);
197
198 /* enable read prefetching & disable byte swapping for bus
199 * mastering transfers */
200 val = bcm_mpi_readl(MPI_PCIMODESEL_REG);
201 val &= ~MPI_PCIMODESEL_BAR1_NOSWAP_MASK;
202 val &= ~MPI_PCIMODESEL_BAR2_NOSWAP_MASK;
203 val &= ~MPI_PCIMODESEL_PREFETCH_MASK;
204 val |= (8 << MPI_PCIMODESEL_PREFETCH_SHIFT);
205 bcm_mpi_writel(val, MPI_PCIMODESEL_REG);
206
207 /* enable pci interrupt */
208 val = bcm_mpi_readl(MPI_LOCINT_REG);
209 val |= MPI_LOCINT_MASK(MPI_LOCINT_EXT_PCI_INT);
210 bcm_mpi_writel(val, MPI_LOCINT_REG);
211
212 register_pci_controller(&bcm63xx_controller);
213
214#ifdef CONFIG_CARDBUS
215 register_pci_controller(&bcm63xx_cb_controller);
216#endif
217
218 /* mark memory space used for IO mapping as reserved */
219 request_mem_region(BCM_PCI_IO_BASE_PA, BCM_PCI_IO_SIZE,
220 "bcm63xx PCI IO space");
221 return 0;
222}
223
224arch_initcall(bcm63xx_pci_init);
diff --git a/arch/mips/pci/pci-bcm63xx.h b/arch/mips/pci/pci-bcm63xx.h
new file mode 100644
index 000000000000..a6e594ef3d6a
--- /dev/null
+++ b/arch/mips/pci/pci-bcm63xx.h
@@ -0,0 +1,27 @@
1#ifndef PCI_BCM63XX_H_
2#define PCI_BCM63XX_H_
3
4#include <bcm63xx_cpu.h>
5#include <bcm63xx_io.h>
6#include <bcm63xx_regs.h>
7#include <bcm63xx_dev_pci.h>
8
9/*
10 * Cardbus shares the PCI bus, but has no IDSEL, so a special id is
11 * reserved for it. If you have a standard PCI device at this id, you
12 * need to change the following definition.
13 */
14#define CARDBUS_PCI_IDSEL 0x8
15
16/*
17 * defined in ops-bcm63xx.c
18 */
19extern struct pci_ops bcm63xx_pci_ops;
20extern struct pci_ops bcm63xx_cb_ops;
21
22/*
23 * defined in pci-bcm63xx.c
24 */
25extern void __iomem *pci_iospace_start;
26
27#endif /* ! PCI_BCM63XX_H_ */
diff --git a/arch/mips/pci/pci-sb1250.c b/arch/mips/pci/pci-sb1250.c
index bf639590b8b2..ada24e6f951f 100644
--- a/arch/mips/pci/pci-sb1250.c
+++ b/arch/mips/pci/pci-sb1250.c
@@ -58,7 +58,7 @@ static void *cfg_space;
58#define LDT_BUS_ENABLED 2 58#define LDT_BUS_ENABLED 2
59#define PCI_DEVICE_MODE 4 59#define PCI_DEVICE_MODE 4
60 60
61static int sb1250_bus_status = 0; 61static int sb1250_bus_status;
62 62
63#define PCI_BRIDGE_DEVICE 0 63#define PCI_BRIDGE_DEVICE 0
64#define LDT_BRIDGE_DEVICE 1 64#define LDT_BRIDGE_DEVICE 1
diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c
index b0eb9e75c682..9a11c2226891 100644
--- a/arch/mips/pci/pci.c
+++ b/arch/mips/pci/pci.c
@@ -31,8 +31,8 @@ unsigned int pci_probe = PCI_ASSIGN_ALL_BUSSES;
31 31
32static struct pci_controller *hose_head, **hose_tail = &hose_head; 32static struct pci_controller *hose_head, **hose_tail = &hose_head;
33 33
34unsigned long PCIBIOS_MIN_IO = 0x0000; 34unsigned long PCIBIOS_MIN_IO;
35unsigned long PCIBIOS_MIN_MEM = 0; 35unsigned long PCIBIOS_MIN_MEM;
36 36
37static int pci_initialized; 37static int pci_initialized;
38 38
diff --git a/arch/mips/pmc-sierra/yosemite/setup.c b/arch/mips/pmc-sierra/yosemite/setup.c
index 2d3c0dca275d..3498ac9c35af 100644
--- a/arch/mips/pmc-sierra/yosemite/setup.c
+++ b/arch/mips/pmc-sierra/yosemite/setup.c
@@ -70,7 +70,7 @@ void __init bus_error_init(void)
70} 70}
71 71
72 72
73unsigned long read_persistent_clock(void) 73void read_persistent_clock(struct timespec *ts)
74{ 74{
75 unsigned int year, month, day, hour, min, sec; 75 unsigned int year, month, day, hour, min, sec;
76 unsigned long flags; 76 unsigned long flags;
@@ -92,7 +92,8 @@ unsigned long read_persistent_clock(void)
92 m48t37_base->control = 0x00; 92 m48t37_base->control = 0x00;
93 spin_unlock_irqrestore(&rtc_lock, flags); 93 spin_unlock_irqrestore(&rtc_lock, flags);
94 94
95 return mktime(year, month, day, hour, min, sec); 95 ts->tv_sec = mktime(year, month, day, hour, min, sec);
96 ts->tv_nsec = 0;
96} 97}
97 98
98int rtc_mips_set_time(unsigned long tim) 99int rtc_mips_set_time(unsigned long tim)
diff --git a/arch/mips/pmc-sierra/yosemite/smp.c b/arch/mips/pmc-sierra/yosemite/smp.c
index 8ace27716232..326fe7a392e8 100644
--- a/arch/mips/pmc-sierra/yosemite/smp.c
+++ b/arch/mips/pmc-sierra/yosemite/smp.c
@@ -97,11 +97,11 @@ static void yos_send_ipi_single(int cpu, unsigned int action)
97 } 97 }
98} 98}
99 99
100static void yos_send_ipi_mask(cpumask_t mask, unsigned int action) 100static void yos_send_ipi_mask(const struct cpumask *mask, unsigned int action)
101{ 101{
102 unsigned int i; 102 unsigned int i;
103 103
104 for_each_cpu_mask(i, mask) 104 for_each_cpu(i, mask)
105 yos_send_ipi_single(i, action); 105 yos_send_ipi_single(i, action);
106} 106}
107 107
diff --git a/arch/mips/power/hibernate.S b/arch/mips/power/hibernate.S
index 4b8174b382d7..0cf86fb32ec3 100644
--- a/arch/mips/power/hibernate.S
+++ b/arch/mips/power/hibernate.S
@@ -8,6 +8,7 @@
8 * Wu Zhangjin <wuzj@lemote.com> 8 * Wu Zhangjin <wuzj@lemote.com>
9 */ 9 */
10#include <asm/asm-offsets.h> 10#include <asm/asm-offsets.h>
11#include <asm/page.h>
11#include <asm/regdef.h> 12#include <asm/regdef.h>
12#include <asm/asm.h> 13#include <asm/asm.h>
13 14
@@ -34,7 +35,7 @@ LEAF(swsusp_arch_resume)
340: 350:
35 PTR_L t1, PBE_ADDRESS(t0) /* source */ 36 PTR_L t1, PBE_ADDRESS(t0) /* source */
36 PTR_L t2, PBE_ORIG_ADDRESS(t0) /* destination */ 37 PTR_L t2, PBE_ORIG_ADDRESS(t0) /* destination */
37 PTR_ADDIU t3, t1, _PAGE_SIZE 38 PTR_ADDIU t3, t1, PAGE_SIZE
381: 391:
39 REG_L t8, (t1) 40 REG_L t8, (t1)
40 REG_S t8, (t2) 41 REG_S t8, (t2)
diff --git a/arch/mips/sgi-ip22/Makefile b/arch/mips/sgi-ip22/Makefile
index ef1564e40c8d..416b18f9fa72 100644
--- a/arch/mips/sgi-ip22/Makefile
+++ b/arch/mips/sgi-ip22/Makefile
@@ -10,4 +10,4 @@ obj-$(CONFIG_SGI_IP22) += ip22-berr.o
10obj-$(CONFIG_SGI_IP28) += ip28-berr.o 10obj-$(CONFIG_SGI_IP28) += ip28-berr.o
11obj-$(CONFIG_EISA) += ip22-eisa.o 11obj-$(CONFIG_EISA) += ip22-eisa.o
12 12
13# EXTRA_CFLAGS += -Werror 13EXTRA_CFLAGS += -Werror
diff --git a/arch/mips/sgi-ip27/ip27-memory.c b/arch/mips/sgi-ip27/ip27-memory.c
index 060d853d7b35..f61c164d1e67 100644
--- a/arch/mips/sgi-ip27/ip27-memory.c
+++ b/arch/mips/sgi-ip27/ip27-memory.c
@@ -421,7 +421,7 @@ static void __init node_mem_init(cnodeid_t node)
421 421
422/* 422/*
423 * A node with nothing. We use it to avoid any special casing in 423 * A node with nothing. We use it to avoid any special casing in
424 * node_to_cpumask 424 * cpumask_of_node
425 */ 425 */
426static struct node_data null_node = { 426static struct node_data null_node = {
427 .hub = { 427 .hub = {
diff --git a/arch/mips/sgi-ip27/ip27-smp.c b/arch/mips/sgi-ip27/ip27-smp.c
index cbcd7eb83bd1..9aa8f2951df6 100644
--- a/arch/mips/sgi-ip27/ip27-smp.c
+++ b/arch/mips/sgi-ip27/ip27-smp.c
@@ -165,11 +165,11 @@ static void ip27_send_ipi_single(int destid, unsigned int action)
165 REMOTE_HUB_SEND_INTR(COMPACT_TO_NASID_NODEID(cpu_to_node(destid)), irq); 165 REMOTE_HUB_SEND_INTR(COMPACT_TO_NASID_NODEID(cpu_to_node(destid)), irq);
166} 166}
167 167
168static void ip27_send_ipi_mask(cpumask_t mask, unsigned int action) 168static void ip27_send_ipi(const struct cpumask *mask, unsigned int action)
169{ 169{
170 unsigned int i; 170 unsigned int i;
171 171
172 for_each_cpu_mask(i, mask) 172 for_each_cpu(i, mask)
173 ip27_send_ipi_single(i, action); 173 ip27_send_ipi_single(i, action);
174} 174}
175 175
diff --git a/arch/mips/sibyte/bcm1480/smp.c b/arch/mips/sibyte/bcm1480/smp.c
index 314691648c97..47b347c992ea 100644
--- a/arch/mips/sibyte/bcm1480/smp.c
+++ b/arch/mips/sibyte/bcm1480/smp.c
@@ -82,11 +82,12 @@ static void bcm1480_send_ipi_single(int cpu, unsigned int action)
82 __raw_writeq((((u64)action)<< 48), mailbox_0_set_regs[cpu]); 82 __raw_writeq((((u64)action)<< 48), mailbox_0_set_regs[cpu]);
83} 83}
84 84
85static void bcm1480_send_ipi_mask(cpumask_t mask, unsigned int action) 85static void bcm1480_send_ipi_mask(const struct cpumask *mask,
86 unsigned int action)
86{ 87{
87 unsigned int i; 88 unsigned int i;
88 89
89 for_each_cpu_mask(i, mask) 90 for_each_cpu(i, mask)
90 bcm1480_send_ipi_single(i, action); 91 bcm1480_send_ipi_single(i, action);
91} 92}
92 93
diff --git a/arch/mips/sibyte/sb1250/smp.c b/arch/mips/sibyte/sb1250/smp.c
index cad14003b84f..c00a5cb1128d 100644
--- a/arch/mips/sibyte/sb1250/smp.c
+++ b/arch/mips/sibyte/sb1250/smp.c
@@ -70,11 +70,12 @@ static void sb1250_send_ipi_single(int cpu, unsigned int action)
70 __raw_writeq((((u64)action) << 48), mailbox_set_regs[cpu]); 70 __raw_writeq((((u64)action) << 48), mailbox_set_regs[cpu]);
71} 71}
72 72
73static inline void sb1250_send_ipi_mask(cpumask_t mask, unsigned int action) 73static inline void sb1250_send_ipi_mask(const struct cpumask *mask,
74 unsigned int action)
74{ 75{
75 unsigned int i; 76 unsigned int i;
76 77
77 for_each_cpu_mask(i, mask) 78 for_each_cpu(i, mask)
78 sb1250_send_ipi_single(i, action); 79 sb1250_send_ipi_single(i, action);
79} 80}
80 81
diff --git a/arch/mips/sibyte/swarm/setup.c b/arch/mips/sibyte/swarm/setup.c
index 672e45d495a9..623ffc933c4c 100644
--- a/arch/mips/sibyte/swarm/setup.c
+++ b/arch/mips/sibyte/swarm/setup.c
@@ -87,19 +87,26 @@ enum swarm_rtc_type {
87 87
88enum swarm_rtc_type swarm_rtc_type; 88enum swarm_rtc_type swarm_rtc_type;
89 89
90unsigned long read_persistent_clock(void) 90void read_persistent_clock(struct timespec *ts)
91{ 91{
92 unsigned long sec;
93
92 switch (swarm_rtc_type) { 94 switch (swarm_rtc_type) {
93 case RTC_XICOR: 95 case RTC_XICOR:
94 return xicor_get_time(); 96 sec = xicor_get_time();
97 break;
95 98
96 case RTC_M4LT81: 99 case RTC_M4LT81:
97 return m41t81_get_time(); 100 sec = m41t81_get_time();
101 break;
98 102
99 case RTC_NONE: 103 case RTC_NONE:
100 default: 104 default:
101 return mktime(2000, 1, 1, 0, 0, 0); 105 sec = mktime(2000, 1, 1, 0, 0, 0);
106 break;
102 } 107 }
108 ts->tv_sec = sec;
109 tv->tv_nsec = 0;
103} 110}
104 111
105int rtc_mips_set_time(unsigned long sec) 112int rtc_mips_set_time(unsigned long sec)
diff --git a/arch/mips/sni/time.c b/arch/mips/sni/time.c
index 0d9ec1a5c24a..62df6a598e0a 100644
--- a/arch/mips/sni/time.c
+++ b/arch/mips/sni/time.c
@@ -182,7 +182,8 @@ void __init plat_time_init(void)
182 setup_pit_timer(); 182 setup_pit_timer();
183} 183}
184 184
185unsigned long read_persistent_clock(void) 185void read_persistent_clock(struct timespec *ts)
186{ 186{
187 return -1; 187 ts->tv_sec = -1;
188 ts->tv_nsec = 0;
188} 189}
diff --git a/arch/mips/txx9/generic/pci.c b/arch/mips/txx9/generic/pci.c
index 7b637a7c0e66..707cfa9c547d 100644
--- a/arch/mips/txx9/generic/pci.c
+++ b/arch/mips/txx9/generic/pci.c
@@ -341,6 +341,15 @@ static void quirk_slc90e66_ide(struct pci_dev *dev)
341} 341}
342#endif /* CONFIG_TOSHIBA_FPCIB0 */ 342#endif /* CONFIG_TOSHIBA_FPCIB0 */
343 343
344static void tc35815_fixup(struct pci_dev *dev)
345{
346 /* This device may have PM registers but not they are not suported. */
347 if (dev->pm_cap) {
348 dev_info(&dev->dev, "PM disabled\n");
349 dev->pm_cap = 0;
350 }
351}
352
344static void final_fixup(struct pci_dev *dev) 353static void final_fixup(struct pci_dev *dev)
345{ 354{
346 unsigned char bist; 355 unsigned char bist;
@@ -374,6 +383,10 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_EFAR, PCI_DEVICE_ID_EFAR_SLC90E66_1,
374DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_EFAR, PCI_DEVICE_ID_EFAR_SLC90E66_1, 383DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_EFAR, PCI_DEVICE_ID_EFAR_SLC90E66_1,
375 quirk_slc90e66_ide); 384 quirk_slc90e66_ide);
376#endif 385#endif
386DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_TOSHIBA_2,
387 PCI_DEVICE_ID_TOSHIBA_TC35815_NWU, tc35815_fixup);
388DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_TOSHIBA_2,
389 PCI_DEVICE_ID_TOSHIBA_TC35815_TX4939, tc35815_fixup);
377DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, final_fixup); 390DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, final_fixup);
378DECLARE_PCI_FIXUP_RESUME(PCI_ANY_ID, PCI_ANY_ID, final_fixup); 391DECLARE_PCI_FIXUP_RESUME(PCI_ANY_ID, PCI_ANY_ID, final_fixup);
379 392
diff --git a/arch/mips/txx9/generic/setup.c b/arch/mips/txx9/generic/setup.c
index a205e2ba8e7b..c860810722c0 100644
--- a/arch/mips/txx9/generic/setup.c
+++ b/arch/mips/txx9/generic/setup.c
@@ -782,7 +782,7 @@ void __init txx9_iocled_init(unsigned long baseaddr,
782 return; 782 return;
783 iocled->mmioaddr = ioremap(baseaddr, 1); 783 iocled->mmioaddr = ioremap(baseaddr, 1);
784 if (!iocled->mmioaddr) 784 if (!iocled->mmioaddr)
785 return; 785 goto out_free;
786 iocled->chip.get = txx9_iocled_get; 786 iocled->chip.get = txx9_iocled_get;
787 iocled->chip.set = txx9_iocled_set; 787 iocled->chip.set = txx9_iocled_set;
788 iocled->chip.direction_input = txx9_iocled_dir_in; 788 iocled->chip.direction_input = txx9_iocled_dir_in;
@@ -791,13 +791,13 @@ void __init txx9_iocled_init(unsigned long baseaddr,
791 iocled->chip.base = basenum; 791 iocled->chip.base = basenum;
792 iocled->chip.ngpio = num; 792 iocled->chip.ngpio = num;
793 if (gpiochip_add(&iocled->chip)) 793 if (gpiochip_add(&iocled->chip))
794 return; 794 goto out_unmap;
795 if (basenum < 0) 795 if (basenum < 0)
796 basenum = iocled->chip.base; 796 basenum = iocled->chip.base;
797 797
798 pdev = platform_device_alloc("leds-gpio", basenum); 798 pdev = platform_device_alloc("leds-gpio", basenum);
799 if (!pdev) 799 if (!pdev)
800 return; 800 goto out_gpio;
801 iocled->pdata.num_leds = num; 801 iocled->pdata.num_leds = num;
802 iocled->pdata.leds = iocled->leds; 802 iocled->pdata.leds = iocled->leds;
803 for (i = 0; i < num; i++) { 803 for (i = 0; i < num; i++) {
@@ -812,7 +812,16 @@ void __init txx9_iocled_init(unsigned long baseaddr,
812 } 812 }
813 pdev->dev.platform_data = &iocled->pdata; 813 pdev->dev.platform_data = &iocled->pdata;
814 if (platform_device_add(pdev)) 814 if (platform_device_add(pdev))
815 platform_device_put(pdev); 815 goto out_pdev;
816 return;
817out_pdev:
818 platform_device_put(pdev);
819out_gpio:
820 gpio_remove(&iocled->chip);
821out_unmap:
822 iounmap(iocled->mmioaddr);
823out_free:
824 kfree(iocled);
816} 825}
817#else /* CONFIG_LEDS_GPIO */ 826#else /* CONFIG_LEDS_GPIO */
818void __init txx9_iocled_init(unsigned long baseaddr, 827void __init txx9_iocled_init(unsigned long baseaddr,
diff --git a/arch/mn10300/include/asm/cacheflush.h b/arch/mn10300/include/asm/cacheflush.h
index 2db746a251f8..1a55d61f0d06 100644
--- a/arch/mn10300/include/asm/cacheflush.h
+++ b/arch/mn10300/include/asm/cacheflush.h
@@ -17,7 +17,7 @@
17#include <linux/mm.h> 17#include <linux/mm.h>
18 18
19/* 19/*
20 * virtually-indexed cache managment (our cache is physically indexed) 20 * virtually-indexed cache management (our cache is physically indexed)
21 */ 21 */
22#define flush_cache_all() do {} while (0) 22#define flush_cache_all() do {} while (0)
23#define flush_cache_mm(mm) do {} while (0) 23#define flush_cache_mm(mm) do {} while (0)
@@ -31,7 +31,7 @@
31#define flush_dcache_mmap_unlock(mapping) do {} while (0) 31#define flush_dcache_mmap_unlock(mapping) do {} while (0)
32 32
33/* 33/*
34 * physically-indexed cache managment 34 * physically-indexed cache management
35 */ 35 */
36#ifndef CONFIG_MN10300_CACHE_DISABLED 36#ifndef CONFIG_MN10300_CACHE_DISABLED
37 37
diff --git a/arch/mn10300/include/asm/gdb-stub.h b/arch/mn10300/include/asm/gdb-stub.h
index e5a6368559af..556cce992548 100644
--- a/arch/mn10300/include/asm/gdb-stub.h
+++ b/arch/mn10300/include/asm/gdb-stub.h
@@ -109,7 +109,6 @@ extern asmlinkage int gdbstub_intercept(struct pt_regs *, enum exception_code);
109extern asmlinkage void gdbstub_exception(struct pt_regs *, enum exception_code); 109extern asmlinkage void gdbstub_exception(struct pt_regs *, enum exception_code);
110extern asmlinkage void __gdbstub_bug_trap(void); 110extern asmlinkage void __gdbstub_bug_trap(void);
111extern asmlinkage void __gdbstub_pause(void); 111extern asmlinkage void __gdbstub_pause(void);
112extern asmlinkage void start_kernel(void);
113 112
114#ifndef CONFIG_MN10300_CACHE_DISABLED 113#ifndef CONFIG_MN10300_CACHE_DISABLED
115extern asmlinkage void gdbstub_purge_cache(void); 114extern asmlinkage void gdbstub_purge_cache(void);
diff --git a/arch/mn10300/include/asm/mman.h b/arch/mn10300/include/asm/mman.h
index d04fac1da5aa..8eebf89f5ab1 100644
--- a/arch/mn10300/include/asm/mman.h
+++ b/arch/mn10300/include/asm/mman.h
@@ -1,28 +1 @@
1/* MN10300 Constants for mmap and co. #include <asm-generic/mman.h>
2 *
3 * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
4 * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
5 * - Derived from asm-x86/mman.h
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public Licence
9 * as published by the Free Software Foundation; either version
10 * 2 of the Licence, or (at your option) any later version.
11 */
12#ifndef _ASM_MMAN_H
13#define _ASM_MMAN_H
14
15#include <asm-generic/mman-common.h>
16
17#define MAP_GROWSDOWN 0x0100 /* stack-like segment */
18#define MAP_DENYWRITE 0x0800 /* ETXTBSY */
19#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */
20#define MAP_LOCKED 0x2000 /* pages are locked */
21#define MAP_NORESERVE 0x4000 /* don't check for reservations */
22#define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */
23#define MAP_NONBLOCK 0x10000 /* do not block on IO */
24
25#define MCL_CURRENT 1 /* lock all current mappings */
26#define MCL_FUTURE 2 /* lock all future mappings */
27
28#endif /* _ASM_MMAN_H */
diff --git a/arch/mn10300/include/asm/mmu_context.h b/arch/mn10300/include/asm/mmu_context.h
index a9e2e34f69b0..cb294c244de3 100644
--- a/arch/mn10300/include/asm/mmu_context.h
+++ b/arch/mn10300/include/asm/mmu_context.h
@@ -38,13 +38,13 @@ extern unsigned long mmu_context_cache[NR_CPUS];
38#define enter_lazy_tlb(mm, tsk) do {} while (0) 38#define enter_lazy_tlb(mm, tsk) do {} while (0)
39 39
40#ifdef CONFIG_SMP 40#ifdef CONFIG_SMP
41#define cpu_ran_vm(cpu, task) \ 41#define cpu_ran_vm(cpu, mm) \
42 cpu_set((cpu), (task)->cpu_vm_mask) 42 cpumask_set_cpu((cpu), mm_cpumask(mm))
43#define cpu_maybe_ran_vm(cpu, task) \ 43#define cpu_maybe_ran_vm(cpu, mm) \
44 cpu_test_and_set((cpu), (task)->cpu_vm_mask) 44 cpumask_test_and_set_cpu((cpu), mm_cpumask(mm))
45#else 45#else
46#define cpu_ran_vm(cpu, task) do {} while (0) 46#define cpu_ran_vm(cpu, mm) do {} while (0)
47#define cpu_maybe_ran_vm(cpu, task) true 47#define cpu_maybe_ran_vm(cpu, mm) true
48#endif /* CONFIG_SMP */ 48#endif /* CONFIG_SMP */
49 49
50/* 50/*
diff --git a/arch/mn10300/include/asm/pci.h b/arch/mn10300/include/asm/pci.h
index 19aecc90f7a4..6095a28561dd 100644
--- a/arch/mn10300/include/asm/pci.h
+++ b/arch/mn10300/include/asm/pci.h
@@ -101,7 +101,18 @@ extern void pcibios_bus_to_resource(struct pci_dev *dev,
101 struct resource *res, 101 struct resource *res,
102 struct pci_bus_region *region); 102 struct pci_bus_region *region);
103 103
104#define pcibios_scan_all_fns(a, b) 0 104static inline struct resource *
105pcibios_select_root(struct pci_dev *pdev, struct resource *res)
106{
107 struct resource *root = NULL;
108
109 if (res->flags & IORESOURCE_IO)
110 root = &ioport_resource;
111 if (res->flags & IORESOURCE_MEM)
112 root = &iomem_resource;
113
114 return root;
115}
105 116
106static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) 117static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
107{ 118{
diff --git a/arch/mn10300/include/asm/unistd.h b/arch/mn10300/include/asm/unistd.h
index fad68616af32..2a983931c11f 100644
--- a/arch/mn10300/include/asm/unistd.h
+++ b/arch/mn10300/include/asm/unistd.h
@@ -347,7 +347,7 @@
347#define __NR_preadv 334 347#define __NR_preadv 334
348#define __NR_pwritev 335 348#define __NR_pwritev 335
349#define __NR_rt_tgsigqueueinfo 336 349#define __NR_rt_tgsigqueueinfo 336
350#define __NR_perf_counter_open 337 350#define __NR_perf_event_open 337
351 351
352#ifdef __KERNEL__ 352#ifdef __KERNEL__
353 353
diff --git a/arch/mn10300/kernel/asm-offsets.c b/arch/mn10300/kernel/asm-offsets.c
index 2646fcbd7d89..02dc7e461fef 100644
--- a/arch/mn10300/kernel/asm-offsets.c
+++ b/arch/mn10300/kernel/asm-offsets.c
@@ -85,7 +85,7 @@ void foo(void)
85 OFFSET(__rx_buffer, mn10300_serial_port, rx_buffer); 85 OFFSET(__rx_buffer, mn10300_serial_port, rx_buffer);
86 OFFSET(__rx_inp, mn10300_serial_port, rx_inp); 86 OFFSET(__rx_inp, mn10300_serial_port, rx_inp);
87 OFFSET(__rx_outp, mn10300_serial_port, rx_outp); 87 OFFSET(__rx_outp, mn10300_serial_port, rx_outp);
88 OFFSET(__tx_info_buffer, mn10300_serial_port, uart.info); 88 OFFSET(__uart_state, mn10300_serial_port, uart.state);
89 OFFSET(__tx_xchar, mn10300_serial_port, tx_xchar); 89 OFFSET(__tx_xchar, mn10300_serial_port, tx_xchar);
90 OFFSET(__tx_break, mn10300_serial_port, tx_break); 90 OFFSET(__tx_break, mn10300_serial_port, tx_break);
91 OFFSET(__intr_flags, mn10300_serial_port, intr_flags); 91 OFFSET(__intr_flags, mn10300_serial_port, intr_flags);
@@ -95,7 +95,7 @@ void foo(void)
95 OFFSET(__iobase, mn10300_serial_port, _iobase); 95 OFFSET(__iobase, mn10300_serial_port, _iobase);
96 96
97 DEFINE(__UART_XMIT_SIZE, UART_XMIT_SIZE); 97 DEFINE(__UART_XMIT_SIZE, UART_XMIT_SIZE);
98 OFFSET(__xmit_buffer, uart_info, xmit.buf); 98 OFFSET(__xmit_buffer, uart_state, xmit.buf);
99 OFFSET(__xmit_head, uart_info, xmit.head); 99 OFFSET(__xmit_head, uart_state, xmit.head);
100 OFFSET(__xmit_tail, uart_info, xmit.tail); 100 OFFSET(__xmit_tail, uart_state, xmit.tail);
101} 101}
diff --git a/arch/mn10300/kernel/entry.S b/arch/mn10300/kernel/entry.S
index e0d2563af4f2..a94e7ea3faa6 100644
--- a/arch/mn10300/kernel/entry.S
+++ b/arch/mn10300/kernel/entry.S
@@ -723,7 +723,7 @@ ENTRY(sys_call_table)
723 .long sys_preadv 723 .long sys_preadv
724 .long sys_pwritev /* 335 */ 724 .long sys_pwritev /* 335 */
725 .long sys_rt_tgsigqueueinfo 725 .long sys_rt_tgsigqueueinfo
726 .long sys_perf_counter_open 726 .long sys_perf_event_open
727 727
728 728
729nr_syscalls=(.-sys_call_table)/4 729nr_syscalls=(.-sys_call_table)/4
diff --git a/arch/mn10300/kernel/init_task.c b/arch/mn10300/kernel/init_task.c
index 80d423b80af3..a481b043bea7 100644
--- a/arch/mn10300/kernel/init_task.c
+++ b/arch/mn10300/kernel/init_task.c
@@ -27,9 +27,8 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
27 * way process stacks are handled. This is done by having a special 27 * way process stacks are handled. This is done by having a special
28 * "init_task" linker map entry.. 28 * "init_task" linker map entry..
29 */ 29 */
30union thread_union init_thread_union 30union thread_union init_thread_union __init_task_data =
31 __attribute__((__section__(".data.init_task"))) = 31 { INIT_THREAD_INFO(init_task) };
32 { INIT_THREAD_INFO(init_task) };
33 32
34/* 33/*
35 * Initial task structure. 34 * Initial task structure.
diff --git a/arch/mn10300/kernel/mn10300-serial-low.S b/arch/mn10300/kernel/mn10300-serial-low.S
index 224485388228..66702d256610 100644
--- a/arch/mn10300/kernel/mn10300-serial-low.S
+++ b/arch/mn10300/kernel/mn10300-serial-low.S
@@ -130,7 +130,7 @@ ENTRY(mn10300_serial_vdma_tx_handler)
130 or d2,d2 130 or d2,d2
131 bne mnsc_vdma_tx_xchar 131 bne mnsc_vdma_tx_xchar
132 132
133 mov (__tx_info_buffer,a3),a2 # get the uart_info struct for Tx 133 mov (__uart_state,a3),a2 # see if the TTY Tx queue has anything in it
134 mov (__xmit_tail,a2),d3 134 mov (__xmit_tail,a2),d3
135 mov (__xmit_head,a2),d2 135 mov (__xmit_head,a2),d2
136 cmp d3,d2 136 cmp d3,d2
diff --git a/arch/mn10300/kernel/mn10300-serial.c b/arch/mn10300/kernel/mn10300-serial.c
index 2fd59664d00a..229b710fc5d5 100644
--- a/arch/mn10300/kernel/mn10300-serial.c
+++ b/arch/mn10300/kernel/mn10300-serial.c
@@ -391,7 +391,7 @@ static int mask_test_and_clear(volatile u8 *ptr, u8 mask)
391static void mn10300_serial_receive_interrupt(struct mn10300_serial_port *port) 391static void mn10300_serial_receive_interrupt(struct mn10300_serial_port *port)
392{ 392{
393 struct uart_icount *icount = &port->uart.icount; 393 struct uart_icount *icount = &port->uart.icount;
394 struct tty_struct *tty = port->uart.info->port.tty; 394 struct tty_struct *tty = port->uart.state->port.tty;
395 unsigned ix; 395 unsigned ix;
396 int count; 396 int count;
397 u8 st, ch, push, status, overrun; 397 u8 st, ch, push, status, overrun;
@@ -566,16 +566,16 @@ static void mn10300_serial_transmit_interrupt(struct mn10300_serial_port *port)
566{ 566{
567 _enter("%s", port->name); 567 _enter("%s", port->name);
568 568
569 if (!port->uart.info || !port->uart.info->port.tty) { 569 if (!port->uart.state || !port->uart.state->port.tty) {
570 mn10300_serial_dis_tx_intr(port); 570 mn10300_serial_dis_tx_intr(port);
571 return; 571 return;
572 } 572 }
573 573
574 if (uart_tx_stopped(&port->uart) || 574 if (uart_tx_stopped(&port->uart) ||
575 uart_circ_empty(&port->uart.info->xmit)) 575 uart_circ_empty(&port->uart.state->xmit))
576 mn10300_serial_dis_tx_intr(port); 576 mn10300_serial_dis_tx_intr(port);
577 577
578 if (uart_circ_chars_pending(&port->uart.info->xmit) < WAKEUP_CHARS) 578 if (uart_circ_chars_pending(&port->uart.state->xmit) < WAKEUP_CHARS)
579 uart_write_wakeup(&port->uart); 579 uart_write_wakeup(&port->uart);
580} 580}
581 581
@@ -596,7 +596,7 @@ static void mn10300_serial_cts_changed(struct mn10300_serial_port *port, u8 st)
596 *port->_control = ctr; 596 *port->_control = ctr;
597 597
598 uart_handle_cts_change(&port->uart, st & SC2STR_CTS); 598 uart_handle_cts_change(&port->uart, st & SC2STR_CTS);
599 wake_up_interruptible(&port->uart.info->delta_msr_wait); 599 wake_up_interruptible(&port->uart.state->port.delta_msr_wait);
600} 600}
601 601
602/* 602/*
@@ -705,8 +705,8 @@ static void mn10300_serial_start_tx(struct uart_port *_port)
705 705
706 _enter("%s{%lu}", 706 _enter("%s{%lu}",
707 port->name, 707 port->name,
708 CIRC_CNT(&port->uart.info->xmit.head, 708 CIRC_CNT(&port->uart.state->xmit.head,
709 &port->uart.info->xmit.tail, 709 &port->uart.state->xmit.tail,
710 UART_XMIT_SIZE)); 710 UART_XMIT_SIZE));
711 711
712 /* kick the virtual DMA controller */ 712 /* kick the virtual DMA controller */
diff --git a/arch/mn10300/kernel/setup.c b/arch/mn10300/kernel/setup.c
index 79890edfd67a..3f24c298a3af 100644
--- a/arch/mn10300/kernel/setup.c
+++ b/arch/mn10300/kernel/setup.c
@@ -285,7 +285,7 @@ static void c_stop(struct seq_file *m, void *v)
285{ 285{
286} 286}
287 287
288struct seq_operations cpuinfo_op = { 288const struct seq_operations cpuinfo_op = {
289 .start = c_start, 289 .start = c_start,
290 .next = c_next, 290 .next = c_next,
291 .stop = c_stop, 291 .stop = c_stop,
diff --git a/arch/mn10300/kernel/sys_mn10300.c b/arch/mn10300/kernel/sys_mn10300.c
index 3e52a1054327..8ca5af00334c 100644
--- a/arch/mn10300/kernel/sys_mn10300.c
+++ b/arch/mn10300/kernel/sys_mn10300.c
@@ -19,7 +19,6 @@
19#include <linux/stat.h> 19#include <linux/stat.h>
20#include <linux/mman.h> 20#include <linux/mman.h>
21#include <linux/file.h> 21#include <linux/file.h>
22#include <linux/utsname.h>
23#include <linux/tty.h> 22#include <linux/tty.h>
24 23
25#include <asm/uaccess.h> 24#include <asm/uaccess.h>
diff --git a/arch/mn10300/kernel/vmlinux.lds.S b/arch/mn10300/kernel/vmlinux.lds.S
index 76f41bdb79c4..10549dcfb610 100644
--- a/arch/mn10300/kernel/vmlinux.lds.S
+++ b/arch/mn10300/kernel/vmlinux.lds.S
@@ -44,24 +44,8 @@ SECTIONS
44 RO_DATA(PAGE_SIZE) 44 RO_DATA(PAGE_SIZE)
45 45
46 /* writeable */ 46 /* writeable */
47 .data : { /* Data */ 47 RW_DATA_SECTION(32, PAGE_SIZE, THREAD_SIZE)
48 DATA_DATA 48 _edata = .;
49 CONSTRUCTORS
50 }
51
52 .data_nosave : { NOSAVE_DATA; }
53
54 .data.page_aligned : { PAGE_ALIGNED_DATA(PAGE_SIZE); }
55 .data.cacheline_aligned : { CACHELINE_ALIGNED_DATA(32); }
56
57 /* rarely changed data like cpu maps */
58 . = ALIGN(32);
59 .data.read_mostly : AT(ADDR(.data.read_mostly)) {
60 READ_MOSTLY_DATA(32);
61 _edata = .; /* End of data section */
62 }
63
64 .data.init_task : { INIT_TASK_DATA(THREAD_SIZE); }
65 49
66 /* might get freed after init */ 50 /* might get freed after init */
67 . = ALIGN(PAGE_SIZE); 51 . = ALIGN(PAGE_SIZE);
@@ -74,22 +58,8 @@ SECTIONS
74 /* will be freed after init */ 58 /* will be freed after init */
75 . = ALIGN(PAGE_SIZE); /* Init code and data */ 59 . = ALIGN(PAGE_SIZE); /* Init code and data */
76 __init_begin = .; 60 __init_begin = .;
77 .init.text : { 61 INIT_TEXT_SECTION(PAGE_SIZE)
78 _sinittext = .; 62 INIT_DATA_SECTION(16)
79 INIT_TEXT;
80 _einittext = .;
81 }
82 .init.data : { INIT_DATA; }
83 .setup.init : { INIT_SETUP(16); }
84
85 __initcall_start = .;
86 .initcall.init : {
87 INITCALLS
88 }
89 __initcall_end = .;
90 .con_initcall.init : { CON_INITCALL; }
91
92 SECURITY_INIT
93 . = ALIGN(4); 63 . = ALIGN(4);
94 __alt_instructions = .; 64 __alt_instructions = .;
95 .altinstructions : { *(.altinstructions) } 65 .altinstructions : { *(.altinstructions) }
@@ -100,8 +70,6 @@ SECTIONS
100 .exit.text : { EXIT_TEXT; } 70 .exit.text : { EXIT_TEXT; }
101 .exit.data : { EXIT_DATA; } 71 .exit.data : { EXIT_DATA; }
102 72
103 .init.ramfs : { INIT_RAM_FS; }
104
105 PERCPU(32) 73 PERCPU(32)
106 . = ALIGN(PAGE_SIZE); 74 . = ALIGN(PAGE_SIZE);
107 __init_end = .; 75 __init_end = .;
diff --git a/arch/mn10300/mm/init.c b/arch/mn10300/mm/init.c
index 8cee387a24fd..ec1420562dc7 100644
--- a/arch/mn10300/mm/init.c
+++ b/arch/mn10300/mm/init.c
@@ -112,7 +112,7 @@ void __init mem_init(void)
112 "Memory: %luk/%luk available" 112 "Memory: %luk/%luk available"
113 " (%dk kernel code, %dk reserved, %dk data, %dk init," 113 " (%dk kernel code, %dk reserved, %dk data, %dk init,"
114 " %ldk highmem)\n", 114 " %ldk highmem)\n",
115 (unsigned long) nr_free_pages() << (PAGE_SHIFT - 10), 115 nr_free_pages() << (PAGE_SHIFT - 10),
116 max_mapnr << (PAGE_SHIFT - 10), 116 max_mapnr << (PAGE_SHIFT - 10),
117 codesize >> 10, 117 codesize >> 10,
118 reservedpages << (PAGE_SHIFT - 10), 118 reservedpages << (PAGE_SHIFT - 10),
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index 06f8d5b5b0f9..f388dc68f605 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -16,7 +16,7 @@ config PARISC
16 select RTC_DRV_GENERIC 16 select RTC_DRV_GENERIC
17 select INIT_ALL_POSSIBLE 17 select INIT_ALL_POSSIBLE
18 select BUG 18 select BUG
19 select HAVE_PERF_COUNTERS 19 select HAVE_PERF_EVENTS
20 select GENERIC_ATOMIC64 if !64BIT 20 select GENERIC_ATOMIC64 if !64BIT
21 help 21 help
22 The PA-RISC microprocessor is designed by Hewlett-Packard and used 22 The PA-RISC microprocessor is designed by Hewlett-Packard and used
diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile
index da6f66901c92..55cca1dac431 100644
--- a/arch/parisc/Makefile
+++ b/arch/parisc/Makefile
@@ -118,8 +118,8 @@ define archhelp
118 @echo '* vmlinux - Uncompressed kernel image (./vmlinux)' 118 @echo '* vmlinux - Uncompressed kernel image (./vmlinux)'
119 @echo ' palo - Bootable image (./lifimage)' 119 @echo ' palo - Bootable image (./lifimage)'
120 @echo ' install - Install kernel using' 120 @echo ' install - Install kernel using'
121 @echo ' (your) ~/bin/installkernel or' 121 @echo ' (your) ~/bin/$(INSTALLKERNEL) or'
122 @echo ' (distribution) /sbin/installkernel or' 122 @echo ' (distribution) /sbin/$(INSTALLKERNEL) or'
123 @echo ' copy to $$(INSTALL_PATH)' 123 @echo ' copy to $$(INSTALL_PATH)'
124endef 124endef
125 125
diff --git a/arch/parisc/include/asm/fcntl.h b/arch/parisc/include/asm/fcntl.h
index 1e1c824764ee..5f39d5597ced 100644
--- a/arch/parisc/include/asm/fcntl.h
+++ b/arch/parisc/include/asm/fcntl.h
@@ -28,6 +28,8 @@
28#define F_SETOWN 12 /* for sockets. */ 28#define F_SETOWN 12 /* for sockets. */
29#define F_SETSIG 13 /* for sockets. */ 29#define F_SETSIG 13 /* for sockets. */
30#define F_GETSIG 14 /* for sockets. */ 30#define F_GETSIG 14 /* for sockets. */
31#define F_GETOWN_EX 15
32#define F_SETOWN_EX 16
31 33
32/* for posix fcntl() and lockf() */ 34/* for posix fcntl() and lockf() */
33#define F_RDLCK 01 35#define F_RDLCK 01
diff --git a/arch/parisc/include/asm/mman.h b/arch/parisc/include/asm/mman.h
index defe752cc996..9749c8afe83a 100644
--- a/arch/parisc/include/asm/mman.h
+++ b/arch/parisc/include/asm/mman.h
@@ -22,6 +22,8 @@
22#define MAP_GROWSDOWN 0x8000 /* stack-like segment */ 22#define MAP_GROWSDOWN 0x8000 /* stack-like segment */
23#define MAP_POPULATE 0x10000 /* populate (prefault) pagetables */ 23#define MAP_POPULATE 0x10000 /* populate (prefault) pagetables */
24#define MAP_NONBLOCK 0x20000 /* do not block on IO */ 24#define MAP_NONBLOCK 0x20000 /* do not block on IO */
25#define MAP_STACK 0x40000 /* give out an address that is best suited for process/thread stacks */
26#define MAP_HUGETLB 0x80000 /* create a huge page mapping */
25 27
26#define MS_SYNC 1 /* synchronous memory sync */ 28#define MS_SYNC 1 /* synchronous memory sync */
27#define MS_ASYNC 2 /* sync memory asynchronously */ 29#define MS_ASYNC 2 /* sync memory asynchronously */
@@ -54,6 +56,9 @@
54#define MADV_16M_PAGES 24 /* Use 16 Megabyte pages */ 56#define MADV_16M_PAGES 24 /* Use 16 Megabyte pages */
55#define MADV_64M_PAGES 26 /* Use 64 Megabyte pages */ 57#define MADV_64M_PAGES 26 /* Use 64 Megabyte pages */
56 58
59#define MADV_MERGEABLE 65 /* KSM may merge identical pages */
60#define MADV_UNMERGEABLE 66 /* KSM may not merge identical pages */
61
57/* compatibility flags */ 62/* compatibility flags */
58#define MAP_FILE 0 63#define MAP_FILE 0
59#define MAP_VARIABLE 0 64#define MAP_VARIABLE 0
diff --git a/arch/parisc/include/asm/pci.h b/arch/parisc/include/asm/pci.h
index 7d842d699df2..64c7aa590ae5 100644
--- a/arch/parisc/include/asm/pci.h
+++ b/arch/parisc/include/asm/pci.h
@@ -233,7 +233,6 @@ static inline void pcibios_register_hba(struct pci_hba_data *x)
233 * rp7420/8420 boxes and then revisit this issue. 233 * rp7420/8420 boxes and then revisit this issue.
234 */ 234 */
235#define pcibios_assign_all_busses() (1) 235#define pcibios_assign_all_busses() (1)
236#define pcibios_scan_all_fns(a, b) (0)
237 236
238#define PCIBIOS_MIN_IO 0x10 237#define PCIBIOS_MIN_IO 0x10
239#define PCIBIOS_MIN_MEM 0x1000 /* NBPG - but pci/setup-res.c dies */ 238#define PCIBIOS_MIN_MEM 0x1000 /* NBPG - but pci/setup-res.c dies */
diff --git a/arch/parisc/include/asm/perf_counter.h b/arch/parisc/include/asm/perf_counter.h
deleted file mode 100644
index dc9e829f7013..000000000000
--- a/arch/parisc/include/asm/perf_counter.h
+++ /dev/null
@@ -1,7 +0,0 @@
1#ifndef __ASM_PARISC_PERF_COUNTER_H
2#define __ASM_PARISC_PERF_COUNTER_H
3
4/* parisc only supports software counters through this interface. */
5static inline void set_perf_counter_pending(void) { }
6
7#endif /* __ASM_PARISC_PERF_COUNTER_H */
diff --git a/arch/parisc/include/asm/perf_event.h b/arch/parisc/include/asm/perf_event.h
new file mode 100644
index 000000000000..cc146427d8f9
--- /dev/null
+++ b/arch/parisc/include/asm/perf_event.h
@@ -0,0 +1,7 @@
1#ifndef __ASM_PARISC_PERF_EVENT_H
2#define __ASM_PARISC_PERF_EVENT_H
3
4/* parisc only supports software events through this interface. */
5static inline void set_perf_event_pending(void) { }
6
7#endif /* __ASM_PARISC_PERF_EVENT_H */
diff --git a/arch/parisc/include/asm/smp.h b/arch/parisc/include/asm/smp.h
index 21eb45a52629..2e73623feb6b 100644
--- a/arch/parisc/include/asm/smp.h
+++ b/arch/parisc/include/asm/smp.h
@@ -30,7 +30,6 @@ extern void smp_send_all_nop(void);
30 30
31extern void arch_send_call_function_single_ipi(int cpu); 31extern void arch_send_call_function_single_ipi(int cpu);
32extern void arch_send_call_function_ipi_mask(const struct cpumask *mask); 32extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
33#define arch_send_call_function_ipi_mask arch_send_call_function_ipi_mask
34 33
35#endif /* !ASSEMBLY */ 34#endif /* !ASSEMBLY */
36 35
diff --git a/arch/parisc/include/asm/unistd.h b/arch/parisc/include/asm/unistd.h
index f3d3b8b012c4..cda158318c62 100644
--- a/arch/parisc/include/asm/unistd.h
+++ b/arch/parisc/include/asm/unistd.h
@@ -810,9 +810,9 @@
810#define __NR_preadv (__NR_Linux + 315) 810#define __NR_preadv (__NR_Linux + 315)
811#define __NR_pwritev (__NR_Linux + 316) 811#define __NR_pwritev (__NR_Linux + 316)
812#define __NR_rt_tgsigqueueinfo (__NR_Linux + 317) 812#define __NR_rt_tgsigqueueinfo (__NR_Linux + 317)
813#define __NR_perf_counter_open (__NR_Linux + 318) 813#define __NR_perf_event_open (__NR_Linux + 318)
814 814
815#define __NR_Linux_syscalls (__NR_perf_counter_open + 1) 815#define __NR_Linux_syscalls (__NR_perf_event_open + 1)
816 816
817 817
818#define __IGNORE_select /* newselect */ 818#define __IGNORE_select /* newselect */
diff --git a/arch/parisc/install.sh b/arch/parisc/install.sh
index 9632b3e164c7..e593fc8d58bc 100644
--- a/arch/parisc/install.sh
+++ b/arch/parisc/install.sh
@@ -21,8 +21,8 @@
21 21
22# User may have a custom install script 22# User may have a custom install script
23 23
24if [ -x ~/bin/installkernel ]; then exec ~/bin/installkernel "$@"; fi 24if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi
25if [ -x /sbin/installkernel ]; then exec /sbin/installkernel "$@"; fi 25if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi
26 26
27# Default install 27# Default install
28 28
diff --git a/arch/parisc/kernel/init_task.c b/arch/parisc/kernel/init_task.c
index 82974b20fc10..d020eae6525c 100644
--- a/arch/parisc/kernel/init_task.c
+++ b/arch/parisc/kernel/init_task.c
@@ -43,8 +43,8 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
43 * way process stacks are handled. This is done by having a special 43 * way process stacks are handled. This is done by having a special
44 * "init_task" linker map entry.. 44 * "init_task" linker map entry..
45 */ 45 */
46union thread_union init_thread_union 46union thread_union init_thread_union __init_task_data
47 __attribute__((aligned(128))) __attribute__((__section__(".data.init_task"))) = 47 __attribute__((aligned(128))) =
48 { INIT_THREAD_INFO(init_task) }; 48 { INIT_THREAD_INFO(init_task) };
49 49
50#if PT_NLEVELS == 3 50#if PT_NLEVELS == 3
diff --git a/arch/parisc/kernel/sys_parisc32.c b/arch/parisc/kernel/sys_parisc32.c
index 92a0acaa0d12..561388b17c91 100644
--- a/arch/parisc/kernel/sys_parisc32.c
+++ b/arch/parisc/kernel/sys_parisc32.c
@@ -18,7 +18,6 @@
18#include <linux/signal.h> 18#include <linux/signal.h>
19#include <linux/resource.h> 19#include <linux/resource.h>
20#include <linux/times.h> 20#include <linux/times.h>
21#include <linux/utsname.h>
22#include <linux/time.h> 21#include <linux/time.h>
23#include <linux/smp.h> 22#include <linux/smp.h>
24#include <linux/smp_lock.h> 23#include <linux/smp_lock.h>
diff --git a/arch/parisc/kernel/syscall_table.S b/arch/parisc/kernel/syscall_table.S
index cf145eb026b3..843f423dec67 100644
--- a/arch/parisc/kernel/syscall_table.S
+++ b/arch/parisc/kernel/syscall_table.S
@@ -416,7 +416,7 @@
416 ENTRY_COMP(preadv) /* 315 */ 416 ENTRY_COMP(preadv) /* 315 */
417 ENTRY_COMP(pwritev) 417 ENTRY_COMP(pwritev)
418 ENTRY_COMP(rt_tgsigqueueinfo) 418 ENTRY_COMP(rt_tgsigqueueinfo)
419 ENTRY_SAME(perf_counter_open) 419 ENTRY_SAME(perf_event_open)
420 420
421 /* Nothing yet */ 421 /* Nothing yet */
422 422
diff --git a/arch/parisc/kernel/vmlinux.lds.S b/arch/parisc/kernel/vmlinux.lds.S
index aea1784edbd1..775be2791bc2 100644
--- a/arch/parisc/kernel/vmlinux.lds.S
+++ b/arch/parisc/kernel/vmlinux.lds.S
@@ -77,13 +77,7 @@ SECTIONS
77 */ 77 */
78 . = ALIGN(PAGE_SIZE); 78 . = ALIGN(PAGE_SIZE);
79 data_start = .; 79 data_start = .;
80 . = ALIGN(16); 80 EXCEPTION_TABLE(16)
81 /* Exception table */
82 __ex_table : {
83 __start___ex_table = .;
84 *(__ex_table)
85 __stop___ex_table = .;
86 }
87 81
88 NOTES 82 NOTES
89 83
@@ -94,23 +88,8 @@ SECTIONS
94 __stop___unwind = .; 88 __stop___unwind = .;
95 } 89 }
96 90
97 /* rarely changed data like cpu maps */
98 . = ALIGN(16);
99 .data.read_mostly : {
100 *(.data.read_mostly)
101 }
102
103 . = ALIGN(L1_CACHE_BYTES);
104 /* Data */ 91 /* Data */
105 .data : { 92 RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
106 DATA_DATA
107 CONSTRUCTORS
108 }
109
110 . = ALIGN(L1_CACHE_BYTES);
111 .data.cacheline_aligned : {
112 *(.data.cacheline_aligned)
113 }
114 93
115 /* PA-RISC locks requires 16-byte alignment */ 94 /* PA-RISC locks requires 16-byte alignment */
116 . = ALIGN(16); 95 . = ALIGN(16);
@@ -118,17 +97,6 @@ SECTIONS
118 *(.data.lock_aligned) 97 *(.data.lock_aligned)
119 } 98 }
120 99
121 /* nosave data is really only used for software suspend...it's here
122 * just in case we ever implement it
123 */
124 . = ALIGN(PAGE_SIZE);
125 __nosave_begin = .;
126 .data_nosave : {
127 *(.data.nosave)
128 }
129 . = ALIGN(PAGE_SIZE);
130 __nosave_end = .;
131
132 /* End of data section */ 100 /* End of data section */
133 _edata = .; 101 _edata = .;
134 102
@@ -147,14 +115,6 @@ SECTIONS
147 } 115 }
148 __bss_stop = .; 116 __bss_stop = .;
149 117
150
151 /* assembler code expects init_task to be 16k aligned */
152 . = ALIGN(16384);
153 /* init_task */
154 .data.init_task : {
155 *(.data.init_task)
156 }
157
158#ifdef CONFIG_64BIT 118#ifdef CONFIG_64BIT
159 . = ALIGN(16); 119 . = ALIGN(16);
160 /* Linkage tables */ 120 /* Linkage tables */
@@ -172,64 +132,8 @@ SECTIONS
172 /* reserve space for interrupt stack by aligning __init* to 16k */ 132 /* reserve space for interrupt stack by aligning __init* to 16k */
173 . = ALIGN(16384); 133 . = ALIGN(16384);
174 __init_begin = .; 134 __init_begin = .;
175 .init.text : { 135 INIT_TEXT_SECTION(16384)
176 _sinittext = .; 136 INIT_DATA_SECTION(16)
177 INIT_TEXT
178 _einittext = .;
179 }
180 .init.data : {
181 INIT_DATA
182 }
183 . = ALIGN(16);
184 .init.setup : {
185 __setup_start = .;
186 *(.init.setup)
187 __setup_end = .;
188 }
189 .initcall.init : {
190 __initcall_start = .;
191 INITCALLS
192 __initcall_end = .;
193 }
194 .con_initcall.init : {
195 __con_initcall_start = .;
196 *(.con_initcall.init)
197 __con_initcall_end = .;
198 }
199 SECURITY_INIT
200
201 /* alternate instruction replacement. This is a mechanism x86 uses
202 * to detect the CPU type and replace generic instruction sequences
203 * with CPU specific ones. We don't currently do this in PA, but
204 * it seems like a good idea...
205 */
206 . = ALIGN(4);
207 .altinstructions : {
208 __alt_instructions = .;
209 *(.altinstructions)
210 __alt_instructions_end = .;
211 }
212 .altinstr_replacement : {
213 *(.altinstr_replacement)
214 }
215
216 /* .exit.text is discard at runtime, not link time, to deal with references
217 * from .altinstructions and .eh_frame
218 */
219 .exit.text : {
220 EXIT_TEXT
221 }
222 .exit.data : {
223 EXIT_DATA
224 }
225#ifdef CONFIG_BLK_DEV_INITRD
226 . = ALIGN(PAGE_SIZE);
227 .init.ramfs : {
228 __initramfs_start = .;
229 *(.init.ramfs)
230 __initramfs_end = .;
231 }
232#endif
233 137
234 PERCPU(PAGE_SIZE) 138 PERCPU(PAGE_SIZE)
235 . = ALIGN(PAGE_SIZE); 139 . = ALIGN(PAGE_SIZE);
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c
index b0831d9e35cb..d5aca31fddbb 100644
--- a/arch/parisc/mm/init.c
+++ b/arch/parisc/mm/init.c
@@ -506,7 +506,7 @@ void __init mem_init(void)
506#endif 506#endif
507 507
508 printk(KERN_INFO "Memory: %luk/%luk available (%dk kernel code, %dk reserved, %dk data, %dk init)\n", 508 printk(KERN_INFO "Memory: %luk/%luk available (%dk kernel code, %dk reserved, %dk data, %dk init)\n",
509 (unsigned long)nr_free_pages() << (PAGE_SHIFT-10), 509 nr_free_pages() << (PAGE_SHIFT-10),
510 num_physpages << (PAGE_SHIFT-10), 510 num_physpages << (PAGE_SHIFT-10),
511 codesize >> 10, 511 codesize >> 10,
512 reservedpages << (PAGE_SHIFT-10), 512 reservedpages << (PAGE_SHIFT-10),
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 8250902265c6..10a0a5488a44 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -129,7 +129,7 @@ config PPC
129 select HAVE_OPROFILE 129 select HAVE_OPROFILE
130 select HAVE_SYSCALL_WRAPPERS if PPC64 130 select HAVE_SYSCALL_WRAPPERS if PPC64
131 select GENERIC_ATOMIC64 if PPC32 131 select GENERIC_ATOMIC64 if PPC32
132 select HAVE_PERF_COUNTERS 132 select HAVE_PERF_EVENTS
133 133
134config EARLY_PRINTK 134config EARLY_PRINTK
135 bool 135 bool
@@ -385,9 +385,15 @@ config NUMA
385 385
386config NODES_SHIFT 386config NODES_SHIFT
387 int 387 int
388 default "8" if PPC64
388 default "4" 389 default "4"
389 depends on NEED_MULTIPLE_NODES 390 depends on NEED_MULTIPLE_NODES
390 391
392config MAX_ACTIVE_REGIONS
393 int
394 default "256" if PPC64
395 default "32"
396
391config ARCH_SELECT_MEMORY_MODEL 397config ARCH_SELECT_MEMORY_MODEL
392 def_bool y 398 def_bool y
393 depends on PPC64 399 depends on PPC64
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 952a3963e9e8..1a54a3b3a3fa 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -158,14 +158,23 @@ drivers-$(CONFIG_OPROFILE) += arch/powerpc/oprofile/
158# Default to zImage, override when needed 158# Default to zImage, override when needed
159all: zImage 159all: zImage
160 160
161CPPFLAGS_vmlinux.lds := -Upowerpc
162
163BOOT_TARGETS = zImage zImage.initrd uImage zImage% dtbImage% treeImage.% cuImage.% simpleImage.% 161BOOT_TARGETS = zImage zImage.initrd uImage zImage% dtbImage% treeImage.% cuImage.% simpleImage.%
164 162
165PHONY += $(BOOT_TARGETS) 163PHONY += $(BOOT_TARGETS)
166 164
167boot := arch/$(ARCH)/boot 165boot := arch/$(ARCH)/boot
168 166
167ifeq ($(CONFIG_RELOCATABLE),y)
168quiet_cmd_relocs_check = CALL $<
169 cmd_relocs_check = perl $< "$(OBJDUMP)" "$(obj)/vmlinux"
170
171PHONY += relocs_check
172relocs_check: arch/powerpc/relocs_check.pl vmlinux
173 $(call cmd,relocs_check)
174
175zImage: relocs_check
176endif
177
169$(BOOT_TARGETS): vmlinux 178$(BOOT_TARGETS): vmlinux
170 $(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@) 179 $(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@)
171 180
@@ -182,8 +191,8 @@ define archhelp
182 @echo ' simpleImage.<dt> - Firmware independent image.' 191 @echo ' simpleImage.<dt> - Firmware independent image.'
183 @echo ' treeImage.<dt> - Support for older IBM 4xx firmware (not U-Boot)' 192 @echo ' treeImage.<dt> - Support for older IBM 4xx firmware (not U-Boot)'
184 @echo ' install - Install kernel using' 193 @echo ' install - Install kernel using'
185 @echo ' (your) ~/bin/installkernel or' 194 @echo ' (your) ~/bin/$(INSTALLKERNEL) or'
186 @echo ' (distribution) /sbin/installkernel or' 195 @echo ' (distribution) /sbin/$(INSTALLKERNEL) or'
187 @echo ' install to $$(INSTALL_PATH) and run lilo' 196 @echo ' install to $$(INSTALL_PATH) and run lilo'
188 @echo ' *_defconfig - Select default config from arch/$(ARCH)/configs' 197 @echo ' *_defconfig - Select default config from arch/$(ARCH)/configs'
189 @echo '' 198 @echo ''
diff --git a/arch/powerpc/boot/dts/mpc8377_mds.dts b/arch/powerpc/boot/dts/mpc8377_mds.dts
index f32c2811c6d9..855782c5e5ec 100644
--- a/arch/powerpc/boot/dts/mpc8377_mds.dts
+++ b/arch/powerpc/boot/dts/mpc8377_mds.dts
@@ -159,6 +159,7 @@
159 reg = <0x2e000 0x1000>; 159 reg = <0x2e000 0x1000>;
160 interrupts = <42 0x8>; 160 interrupts = <42 0x8>;
161 interrupt-parent = <&ipic>; 161 interrupt-parent = <&ipic>;
162 sdhci,wp-inverted;
162 /* Filled in by U-Boot */ 163 /* Filled in by U-Boot */
163 clock-frequency = <0>; 164 clock-frequency = <0>;
164 }; 165 };
diff --git a/arch/powerpc/boot/dts/mpc8377_rdb.dts b/arch/powerpc/boot/dts/mpc8377_rdb.dts
index 28e022ac4179..9e2264b10008 100644
--- a/arch/powerpc/boot/dts/mpc8377_rdb.dts
+++ b/arch/powerpc/boot/dts/mpc8377_rdb.dts
@@ -173,6 +173,7 @@
173 reg = <0x2e000 0x1000>; 173 reg = <0x2e000 0x1000>;
174 interrupts = <42 0x8>; 174 interrupts = <42 0x8>;
175 interrupt-parent = <&ipic>; 175 interrupt-parent = <&ipic>;
176 sdhci,wp-inverted;
176 /* Filled in by U-Boot */ 177 /* Filled in by U-Boot */
177 clock-frequency = <111111111>; 178 clock-frequency = <111111111>;
178 }; 179 };
diff --git a/arch/powerpc/boot/dts/mpc8377_wlan.dts b/arch/powerpc/boot/dts/mpc8377_wlan.dts
index 3febc4e91b10..9a603695723b 100644
--- a/arch/powerpc/boot/dts/mpc8377_wlan.dts
+++ b/arch/powerpc/boot/dts/mpc8377_wlan.dts
@@ -150,6 +150,7 @@
150 reg = <0x2e000 0x1000>; 150 reg = <0x2e000 0x1000>;
151 interrupts = <42 0x8>; 151 interrupts = <42 0x8>;
152 interrupt-parent = <&ipic>; 152 interrupt-parent = <&ipic>;
153 sdhci,wp-inverted;
153 clock-frequency = <133333333>; 154 clock-frequency = <133333333>;
154 }; 155 };
155 }; 156 };
diff --git a/arch/powerpc/boot/dts/mpc8378_mds.dts b/arch/powerpc/boot/dts/mpc8378_mds.dts
index f720ab9af30d..f70cf6000839 100644
--- a/arch/powerpc/boot/dts/mpc8378_mds.dts
+++ b/arch/powerpc/boot/dts/mpc8378_mds.dts
@@ -159,6 +159,7 @@
159 reg = <0x2e000 0x1000>; 159 reg = <0x2e000 0x1000>;
160 interrupts = <42 0x8>; 160 interrupts = <42 0x8>;
161 interrupt-parent = <&ipic>; 161 interrupt-parent = <&ipic>;
162 sdhci,wp-inverted;
162 /* Filled in by U-Boot */ 163 /* Filled in by U-Boot */
163 clock-frequency = <0>; 164 clock-frequency = <0>;
164 }; 165 };
diff --git a/arch/powerpc/boot/dts/mpc8378_rdb.dts b/arch/powerpc/boot/dts/mpc8378_rdb.dts
index a11ead8214b4..4e6a1a407bbd 100644
--- a/arch/powerpc/boot/dts/mpc8378_rdb.dts
+++ b/arch/powerpc/boot/dts/mpc8378_rdb.dts
@@ -173,6 +173,7 @@
173 reg = <0x2e000 0x1000>; 173 reg = <0x2e000 0x1000>;
174 interrupts = <42 0x8>; 174 interrupts = <42 0x8>;
175 interrupt-parent = <&ipic>; 175 interrupt-parent = <&ipic>;
176 sdhci,wp-inverted;
176 /* Filled in by U-Boot */ 177 /* Filled in by U-Boot */
177 clock-frequency = <111111111>; 178 clock-frequency = <111111111>;
178 }; 179 };
diff --git a/arch/powerpc/boot/dts/mpc8379_mds.dts b/arch/powerpc/boot/dts/mpc8379_mds.dts
index 4fa221fd9bdc..645ec51cc6e1 100644
--- a/arch/powerpc/boot/dts/mpc8379_mds.dts
+++ b/arch/powerpc/boot/dts/mpc8379_mds.dts
@@ -157,6 +157,7 @@
157 reg = <0x2e000 0x1000>; 157 reg = <0x2e000 0x1000>;
158 interrupts = <42 0x8>; 158 interrupts = <42 0x8>;
159 interrupt-parent = <&ipic>; 159 interrupt-parent = <&ipic>;
160 sdhci,wp-inverted;
160 /* Filled in by U-Boot */ 161 /* Filled in by U-Boot */
161 clock-frequency = <0>; 162 clock-frequency = <0>;
162 }; 163 };
diff --git a/arch/powerpc/boot/dts/mpc8379_rdb.dts b/arch/powerpc/boot/dts/mpc8379_rdb.dts
index e35dfba587c8..72336d504528 100644
--- a/arch/powerpc/boot/dts/mpc8379_rdb.dts
+++ b/arch/powerpc/boot/dts/mpc8379_rdb.dts
@@ -171,6 +171,7 @@
171 reg = <0x2e000 0x1000>; 171 reg = <0x2e000 0x1000>;
172 interrupts = <42 0x8>; 172 interrupts = <42 0x8>;
173 interrupt-parent = <&ipic>; 173 interrupt-parent = <&ipic>;
174 sdhci,wp-inverted;
174 /* Filled in by U-Boot */ 175 /* Filled in by U-Boot */
175 clock-frequency = <111111111>; 176 clock-frequency = <111111111>;
176 }; 177 };
diff --git a/arch/powerpc/boot/install.sh b/arch/powerpc/boot/install.sh
index 98312d169c85..b6a256bc96ee 100644
--- a/arch/powerpc/boot/install.sh
+++ b/arch/powerpc/boot/install.sh
@@ -23,8 +23,8 @@ set -e
23 23
24# User may have a custom install script 24# User may have a custom install script
25 25
26if [ -x ~/bin/${CROSS_COMPILE}installkernel ]; then exec ~/bin/${CROSS_COMPILE}installkernel "$@"; fi 26if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi
27if [ -x /sbin/${CROSS_COMPILE}installkernel ]; then exec /sbin/${CROSS_COMPILE}installkernel "$@"; fi 27if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi
28 28
29# Default install 29# Default install
30 30
diff --git a/arch/powerpc/include/asm/cputime.h b/arch/powerpc/include/asm/cputime.h
index f42e623030ee..fa19f3fe05ff 100644
--- a/arch/powerpc/include/asm/cputime.h
+++ b/arch/powerpc/include/asm/cputime.h
@@ -18,6 +18,9 @@
18 18
19#ifndef CONFIG_VIRT_CPU_ACCOUNTING 19#ifndef CONFIG_VIRT_CPU_ACCOUNTING
20#include <asm-generic/cputime.h> 20#include <asm-generic/cputime.h>
21#ifdef __KERNEL__
22static inline void setup_cputime_one_jiffy(void) { }
23#endif
21#else 24#else
22 25
23#include <linux/types.h> 26#include <linux/types.h>
@@ -49,6 +52,11 @@ typedef u64 cputime64_t;
49#ifdef __KERNEL__ 52#ifdef __KERNEL__
50 53
51/* 54/*
55 * One jiffy in timebase units computed during initialization
56 */
57extern cputime_t cputime_one_jiffy;
58
59/*
52 * Convert cputime <-> jiffies 60 * Convert cputime <-> jiffies
53 */ 61 */
54extern u64 __cputime_jiffies_factor; 62extern u64 __cputime_jiffies_factor;
@@ -89,6 +97,11 @@ static inline cputime_t jiffies_to_cputime(const unsigned long jif)
89 return ct; 97 return ct;
90} 98}
91 99
100static inline void setup_cputime_one_jiffy(void)
101{
102 cputime_one_jiffy = jiffies_to_cputime(1);
103}
104
92static inline cputime64_t jiffies64_to_cputime64(const u64 jif) 105static inline cputime64_t jiffies64_to_cputime64(const u64 jif)
93{ 106{
94 cputime_t ct; 107 cputime_t ct;
diff --git a/arch/powerpc/include/asm/device.h b/arch/powerpc/include/asm/device.h
index 9dade15d1ab4..6d94d27ed850 100644
--- a/arch/powerpc/include/asm/device.h
+++ b/arch/powerpc/include/asm/device.h
@@ -15,7 +15,16 @@ struct dev_archdata {
15 15
16 /* DMA operations on that device */ 16 /* DMA operations on that device */
17 struct dma_map_ops *dma_ops; 17 struct dma_map_ops *dma_ops;
18 void *dma_data; 18
19 /*
20 * When an iommu is in use, dma_data is used as a ptr to the base of the
21 * iommu_table. Otherwise, it is a simple numerical offset.
22 */
23 union {
24 dma_addr_t dma_offset;
25 void *iommu_table_base;
26 } dma_data;
27
19#ifdef CONFIG_SWIOTLB 28#ifdef CONFIG_SWIOTLB
20 dma_addr_t max_direct_dma_addr; 29 dma_addr_t max_direct_dma_addr;
21#endif 30#endif
diff --git a/arch/powerpc/include/asm/dma-mapping.h b/arch/powerpc/include/asm/dma-mapping.h
index cb2ca41dd526..e281daebddca 100644
--- a/arch/powerpc/include/asm/dma-mapping.h
+++ b/arch/powerpc/include/asm/dma-mapping.h
@@ -26,7 +26,6 @@ extern void *dma_direct_alloc_coherent(struct device *dev, size_t size,
26extern void dma_direct_free_coherent(struct device *dev, size_t size, 26extern void dma_direct_free_coherent(struct device *dev, size_t size,
27 void *vaddr, dma_addr_t dma_handle); 27 void *vaddr, dma_addr_t dma_handle);
28 28
29extern unsigned long get_dma_direct_offset(struct device *dev);
30 29
31#ifdef CONFIG_NOT_COHERENT_CACHE 30#ifdef CONFIG_NOT_COHERENT_CACHE
32/* 31/*
@@ -90,6 +89,28 @@ static inline void set_dma_ops(struct device *dev, struct dma_map_ops *ops)
90 dev->archdata.dma_ops = ops; 89 dev->archdata.dma_ops = ops;
91} 90}
92 91
92/*
93 * get_dma_offset()
94 *
95 * Get the dma offset on configurations where the dma address can be determined
96 * from the physical address by looking at a simple offset. Direct dma and
97 * swiotlb use this function, but it is typically not used by implementations
98 * with an iommu.
99 */
100static inline dma_addr_t get_dma_offset(struct device *dev)
101{
102 if (dev)
103 return dev->archdata.dma_data.dma_offset;
104
105 return PCI_DRAM_OFFSET;
106}
107
108static inline void set_dma_offset(struct device *dev, dma_addr_t off)
109{
110 if (dev)
111 dev->archdata.dma_data.dma_offset = off;
112}
113
93/* this will be removed soon */ 114/* this will be removed soon */
94#define flush_write_buffers() 115#define flush_write_buffers()
95 116
@@ -181,12 +202,12 @@ static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size)
181 202
182static inline dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr) 203static inline dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr)
183{ 204{
184 return paddr + get_dma_direct_offset(dev); 205 return paddr + get_dma_offset(dev);
185} 206}
186 207
187static inline phys_addr_t dma_to_phys(struct device *dev, dma_addr_t daddr) 208static inline phys_addr_t dma_to_phys(struct device *dev, dma_addr_t daddr)
188{ 209{
189 return daddr - get_dma_direct_offset(dev); 210 return daddr - get_dma_offset(dev);
190} 211}
191 212
192#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) 213#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
diff --git a/arch/powerpc/include/asm/fsldma.h b/arch/powerpc/include/asm/fsldma.h
new file mode 100644
index 000000000000..a67aeed17d40
--- /dev/null
+++ b/arch/powerpc/include/asm/fsldma.h
@@ -0,0 +1,136 @@
1/*
2 * Freescale MPC83XX / MPC85XX DMA Controller
3 *
4 * Copyright (c) 2009 Ira W. Snyder <iws@ovro.caltech.edu>
5 *
6 * This file is licensed under the terms of the GNU General Public License
7 * version 2. This program is licensed "as is" without any warranty of any
8 * kind, whether express or implied.
9 */
10
11#ifndef __ARCH_POWERPC_ASM_FSLDMA_H__
12#define __ARCH_POWERPC_ASM_FSLDMA_H__
13
14#include <linux/dmaengine.h>
15
16/*
17 * Definitions for the Freescale DMA controller's DMA_SLAVE implemention
18 *
19 * The Freescale DMA_SLAVE implementation was designed to handle many-to-many
20 * transfers. An example usage would be an accelerated copy between two
21 * scatterlists. Another example use would be an accelerated copy from
22 * multiple non-contiguous device buffers into a single scatterlist.
23 *
24 * A DMA_SLAVE transaction is defined by a struct fsl_dma_slave. This
25 * structure contains a list of hardware addresses that should be copied
26 * to/from the scatterlist passed into device_prep_slave_sg(). The structure
27 * also has some fields to enable hardware-specific features.
28 */
29
30/**
31 * struct fsl_dma_hw_addr
32 * @entry: linked list entry
33 * @address: the hardware address
34 * @length: length to transfer
35 *
36 * Holds a single physical hardware address / length pair for use
37 * with the DMAEngine DMA_SLAVE API.
38 */
39struct fsl_dma_hw_addr {
40 struct list_head entry;
41
42 dma_addr_t address;
43 size_t length;
44};
45
46/**
47 * struct fsl_dma_slave
48 * @addresses: a linked list of struct fsl_dma_hw_addr structures
49 * @request_count: value for DMA request count
50 * @src_loop_size: setup and enable constant source-address DMA transfers
51 * @dst_loop_size: setup and enable constant destination address DMA transfers
52 * @external_start: enable externally started DMA transfers
53 * @external_pause: enable externally paused DMA transfers
54 *
55 * Holds a list of address / length pairs for use with the DMAEngine
56 * DMA_SLAVE API implementation for the Freescale DMA controller.
57 */
58struct fsl_dma_slave {
59
60 /* List of hardware address/length pairs */
61 struct list_head addresses;
62
63 /* Support for extra controller features */
64 unsigned int request_count;
65 unsigned int src_loop_size;
66 unsigned int dst_loop_size;
67 bool external_start;
68 bool external_pause;
69};
70
71/**
72 * fsl_dma_slave_append - add an address/length pair to a struct fsl_dma_slave
73 * @slave: the &struct fsl_dma_slave to add to
74 * @address: the hardware address to add
75 * @length: the length of bytes to transfer from @address
76 *
77 * Add a hardware address/length pair to a struct fsl_dma_slave. Returns 0 on
78 * success, -ERRNO otherwise.
79 */
80static inline int fsl_dma_slave_append(struct fsl_dma_slave *slave,
81 dma_addr_t address, size_t length)
82{
83 struct fsl_dma_hw_addr *addr;
84
85 addr = kzalloc(sizeof(*addr), GFP_ATOMIC);
86 if (!addr)
87 return -ENOMEM;
88
89 INIT_LIST_HEAD(&addr->entry);
90 addr->address = address;
91 addr->length = length;
92
93 list_add_tail(&addr->entry, &slave->addresses);
94 return 0;
95}
96
97/**
98 * fsl_dma_slave_free - free a struct fsl_dma_slave
99 * @slave: the struct fsl_dma_slave to free
100 *
101 * Free a struct fsl_dma_slave and all associated address/length pairs
102 */
103static inline void fsl_dma_slave_free(struct fsl_dma_slave *slave)
104{
105 struct fsl_dma_hw_addr *addr, *tmp;
106
107 if (slave) {
108 list_for_each_entry_safe(addr, tmp, &slave->addresses, entry) {
109 list_del(&addr->entry);
110 kfree(addr);
111 }
112
113 kfree(slave);
114 }
115}
116
117/**
118 * fsl_dma_slave_alloc - allocate a struct fsl_dma_slave
119 * @gfp: the flags to pass to kmalloc when allocating this structure
120 *
121 * Allocate a struct fsl_dma_slave for use by the DMA_SLAVE API. Returns a new
122 * struct fsl_dma_slave on success, or NULL on failure.
123 */
124static inline struct fsl_dma_slave *fsl_dma_slave_alloc(gfp_t gfp)
125{
126 struct fsl_dma_slave *slave;
127
128 slave = kzalloc(sizeof(*slave), gfp);
129 if (!slave)
130 return NULL;
131
132 INIT_LIST_HEAD(&slave->addresses);
133 return slave;
134}
135
136#endif /* __ARCH_POWERPC_ASM_FSLDMA_H__ */
diff --git a/arch/powerpc/include/asm/hw_irq.h b/arch/powerpc/include/asm/hw_irq.h
index e73d554538dd..abbc2aaaced5 100644
--- a/arch/powerpc/include/asm/hw_irq.h
+++ b/arch/powerpc/include/asm/hw_irq.h
@@ -135,43 +135,43 @@ static inline int irqs_disabled_flags(unsigned long flags)
135 */ 135 */
136struct irq_chip; 136struct irq_chip;
137 137
138#ifdef CONFIG_PERF_COUNTERS 138#ifdef CONFIG_PERF_EVENTS
139 139
140#ifdef CONFIG_PPC64 140#ifdef CONFIG_PPC64
141static inline unsigned long test_perf_counter_pending(void) 141static inline unsigned long test_perf_event_pending(void)
142{ 142{
143 unsigned long x; 143 unsigned long x;
144 144
145 asm volatile("lbz %0,%1(13)" 145 asm volatile("lbz %0,%1(13)"
146 : "=r" (x) 146 : "=r" (x)
147 : "i" (offsetof(struct paca_struct, perf_counter_pending))); 147 : "i" (offsetof(struct paca_struct, perf_event_pending)));
148 return x; 148 return x;
149} 149}
150 150
151static inline void set_perf_counter_pending(void) 151static inline void set_perf_event_pending(void)
152{ 152{
153 asm volatile("stb %0,%1(13)" : : 153 asm volatile("stb %0,%1(13)" : :
154 "r" (1), 154 "r" (1),
155 "i" (offsetof(struct paca_struct, perf_counter_pending))); 155 "i" (offsetof(struct paca_struct, perf_event_pending)));
156} 156}
157 157
158static inline void clear_perf_counter_pending(void) 158static inline void clear_perf_event_pending(void)
159{ 159{
160 asm volatile("stb %0,%1(13)" : : 160 asm volatile("stb %0,%1(13)" : :
161 "r" (0), 161 "r" (0),
162 "i" (offsetof(struct paca_struct, perf_counter_pending))); 162 "i" (offsetof(struct paca_struct, perf_event_pending)));
163} 163}
164#endif /* CONFIG_PPC64 */ 164#endif /* CONFIG_PPC64 */
165 165
166#else /* CONFIG_PERF_COUNTERS */ 166#else /* CONFIG_PERF_EVENTS */
167 167
168static inline unsigned long test_perf_counter_pending(void) 168static inline unsigned long test_perf_event_pending(void)
169{ 169{
170 return 0; 170 return 0;
171} 171}
172 172
173static inline void clear_perf_counter_pending(void) {} 173static inline void clear_perf_event_pending(void) {}
174#endif /* CONFIG_PERF_COUNTERS */ 174#endif /* CONFIG_PERF_EVENTS */
175 175
176#endif /* __KERNEL__ */ 176#endif /* __KERNEL__ */
177#endif /* _ASM_POWERPC_HW_IRQ_H */ 177#endif /* _ASM_POWERPC_HW_IRQ_H */
diff --git a/arch/powerpc/include/asm/iommu.h b/arch/powerpc/include/asm/iommu.h
index 7464c0daddd1..edfc9803ec91 100644
--- a/arch/powerpc/include/asm/iommu.h
+++ b/arch/powerpc/include/asm/iommu.h
@@ -70,6 +70,16 @@ struct iommu_table {
70 70
71struct scatterlist; 71struct scatterlist;
72 72
73static inline void set_iommu_table_base(struct device *dev, void *base)
74{
75 dev->archdata.dma_data.iommu_table_base = base;
76}
77
78static inline void *get_iommu_table_base(struct device *dev)
79{
80 return dev->archdata.dma_data.iommu_table_base;
81}
82
73/* Frees table for an individual device node */ 83/* Frees table for an individual device node */
74extern void iommu_free_table(struct iommu_table *tbl, const char *node_name); 84extern void iommu_free_table(struct iommu_table *tbl, const char *node_name);
75 85
diff --git a/arch/powerpc/include/asm/mman.h b/arch/powerpc/include/asm/mman.h
index 7b1c49811a24..d4a7f645c5db 100644
--- a/arch/powerpc/include/asm/mman.h
+++ b/arch/powerpc/include/asm/mman.h
@@ -25,6 +25,8 @@
25 25
26#define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ 26#define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */
27#define MAP_NONBLOCK 0x10000 /* do not block on IO */ 27#define MAP_NONBLOCK 0x10000 /* do not block on IO */
28#define MAP_STACK 0x20000 /* give out an address that is best suited for process/thread stacks */
29#define MAP_HUGETLB 0x40000 /* create a huge page mapping */
28 30
29#ifdef __KERNEL__ 31#ifdef __KERNEL__
30#ifdef CONFIG_PPC64 32#ifdef CONFIG_PPC64
diff --git a/arch/powerpc/include/asm/paca.h b/arch/powerpc/include/asm/paca.h
index b634456ea893..7d8514ceceae 100644
--- a/arch/powerpc/include/asm/paca.h
+++ b/arch/powerpc/include/asm/paca.h
@@ -122,7 +122,7 @@ struct paca_struct {
122 u8 soft_enabled; /* irq soft-enable flag */ 122 u8 soft_enabled; /* irq soft-enable flag */
123 u8 hard_enabled; /* set if irqs are enabled in MSR */ 123 u8 hard_enabled; /* set if irqs are enabled in MSR */
124 u8 io_sync; /* writel() needs spin_unlock sync */ 124 u8 io_sync; /* writel() needs spin_unlock sync */
125 u8 perf_counter_pending; /* PM interrupt while soft-disabled */ 125 u8 perf_event_pending; /* PM interrupt while soft-disabled */
126 126
127 /* Stuff for accurate time accounting */ 127 /* Stuff for accurate time accounting */
128 u64 user_time; /* accumulated usermode TB ticks */ 128 u64 user_time; /* accumulated usermode TB ticks */
diff --git a/arch/powerpc/include/asm/pci.h b/arch/powerpc/include/asm/pci.h
index 7aca4839387b..b5ea626eea2d 100644
--- a/arch/powerpc/include/asm/pci.h
+++ b/arch/powerpc/include/asm/pci.h
@@ -45,7 +45,6 @@ struct pci_dev;
45 */ 45 */
46#define pcibios_assign_all_busses() \ 46#define pcibios_assign_all_busses() \
47 (ppc_pci_has_flag(PPC_PCI_REASSIGN_ALL_BUS)) 47 (ppc_pci_has_flag(PPC_PCI_REASSIGN_ALL_BUS))
48#define pcibios_scan_all_fns(a, b) 0
49 48
50static inline void pcibios_set_master(struct pci_dev *dev) 49static inline void pcibios_set_master(struct pci_dev *dev)
51{ 50{
diff --git a/arch/powerpc/include/asm/perf_counter.h b/arch/powerpc/include/asm/perf_event.h
index 0ea0639fcf75..3288ce3997e0 100644
--- a/arch/powerpc/include/asm/perf_counter.h
+++ b/arch/powerpc/include/asm/perf_event.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Performance counter support - PowerPC-specific definitions. 2 * Performance event support - PowerPC-specific definitions.
3 * 3 *
4 * Copyright 2008-2009 Paul Mackerras, IBM Corporation. 4 * Copyright 2008-2009 Paul Mackerras, IBM Corporation.
5 * 5 *
@@ -12,7 +12,7 @@
12 12
13#include <asm/hw_irq.h> 13#include <asm/hw_irq.h>
14 14
15#define MAX_HWCOUNTERS 8 15#define MAX_HWEVENTS 8
16#define MAX_EVENT_ALTERNATIVES 8 16#define MAX_EVENT_ALTERNATIVES 8
17#define MAX_LIMITED_HWCOUNTERS 2 17#define MAX_LIMITED_HWCOUNTERS 2
18 18
@@ -28,12 +28,12 @@ struct power_pmu {
28 unsigned long test_adder; 28 unsigned long test_adder;
29 int (*compute_mmcr)(u64 events[], int n_ev, 29 int (*compute_mmcr)(u64 events[], int n_ev,
30 unsigned int hwc[], unsigned long mmcr[]); 30 unsigned int hwc[], unsigned long mmcr[]);
31 int (*get_constraint)(u64 event, unsigned long *mskp, 31 int (*get_constraint)(u64 event_id, unsigned long *mskp,
32 unsigned long *valp); 32 unsigned long *valp);
33 int (*get_alternatives)(u64 event, unsigned int flags, 33 int (*get_alternatives)(u64 event_id, unsigned int flags,
34 u64 alt[]); 34 u64 alt[]);
35 void (*disable_pmc)(unsigned int pmc, unsigned long mmcr[]); 35 void (*disable_pmc)(unsigned int pmc, unsigned long mmcr[]);
36 int (*limited_pmc_event)(u64 event); 36 int (*limited_pmc_event)(u64 event_id);
37 u32 flags; 37 u32 flags;
38 int n_generic; 38 int n_generic;
39 int *generic_events; 39 int *generic_events;
@@ -61,10 +61,10 @@ struct pt_regs;
61extern unsigned long perf_misc_flags(struct pt_regs *regs); 61extern unsigned long perf_misc_flags(struct pt_regs *regs);
62extern unsigned long perf_instruction_pointer(struct pt_regs *regs); 62extern unsigned long perf_instruction_pointer(struct pt_regs *regs);
63 63
64#define PERF_COUNTER_INDEX_OFFSET 1 64#define PERF_EVENT_INDEX_OFFSET 1
65 65
66/* 66/*
67 * Only override the default definitions in include/linux/perf_counter.h 67 * Only override the default definitions in include/linux/perf_event.h
68 * if we have hardware PMU support. 68 * if we have hardware PMU support.
69 */ 69 */
70#ifdef CONFIG_PPC_PERF_CTRS 70#ifdef CONFIG_PPC_PERF_CTRS
@@ -73,14 +73,14 @@ extern unsigned long perf_instruction_pointer(struct pt_regs *regs);
73 73
74/* 74/*
75 * The power_pmu.get_constraint function returns a 32/64-bit value and 75 * The power_pmu.get_constraint function returns a 32/64-bit value and
76 * a 32/64-bit mask that express the constraints between this event and 76 * a 32/64-bit mask that express the constraints between this event_id and
77 * other events. 77 * other events.
78 * 78 *
79 * The value and mask are divided up into (non-overlapping) bitfields 79 * The value and mask are divided up into (non-overlapping) bitfields
80 * of three different types: 80 * of three different types:
81 * 81 *
82 * Select field: this expresses the constraint that some set of bits 82 * Select field: this expresses the constraint that some set of bits
83 * in MMCR* needs to be set to a specific value for this event. For a 83 * in MMCR* needs to be set to a specific value for this event_id. For a
84 * select field, the mask contains 1s in every bit of the field, and 84 * select field, the mask contains 1s in every bit of the field, and
85 * the value contains a unique value for each possible setting of the 85 * the value contains a unique value for each possible setting of the
86 * MMCR* bits. The constraint checking code will ensure that two events 86 * MMCR* bits. The constraint checking code will ensure that two events
@@ -102,9 +102,9 @@ extern unsigned long perf_instruction_pointer(struct pt_regs *regs);
102 * possible.) For N classes, the field is N+1 bits wide, and each class 102 * possible.) For N classes, the field is N+1 bits wide, and each class
103 * is assigned one bit from the least-significant N bits. The mask has 103 * is assigned one bit from the least-significant N bits. The mask has
104 * only the most-significant bit set, and the value has only the bit 104 * only the most-significant bit set, and the value has only the bit
105 * for the event's class set. The test_adder has the least significant 105 * for the event_id's class set. The test_adder has the least significant
106 * bit set in the field. 106 * bit set in the field.
107 * 107 *
108 * If an event is not subject to the constraint expressed by a particular 108 * If an event_id is not subject to the constraint expressed by a particular
109 * field, then it will have 0 in both the mask and value for that field. 109 * field, then it will have 0 in both the mask and value for that field.
110 */ 110 */
diff --git a/arch/powerpc/include/asm/pmc.h b/arch/powerpc/include/asm/pmc.h
index ccc68b50d05d..5a9ede4962cb 100644
--- a/arch/powerpc/include/asm/pmc.h
+++ b/arch/powerpc/include/asm/pmc.h
@@ -29,7 +29,7 @@ int reserve_pmc_hardware(perf_irq_t new_perf_irq);
29void release_pmc_hardware(void); 29void release_pmc_hardware(void);
30void ppc_enable_pmcs(void); 30void ppc_enable_pmcs(void);
31 31
32#ifdef CONFIG_PPC64 32#ifdef CONFIG_PPC_BOOK3S_64
33#include <asm/lppaca.h> 33#include <asm/lppaca.h>
34 34
35static inline void ppc_set_pmu_inuse(int inuse) 35static inline void ppc_set_pmu_inuse(int inuse)
diff --git a/arch/powerpc/include/asm/pte-40x.h b/arch/powerpc/include/asm/pte-40x.h
index 6c3e1f4378d4..ec0b0b0d1df9 100644
--- a/arch/powerpc/include/asm/pte-40x.h
+++ b/arch/powerpc/include/asm/pte-40x.h
@@ -43,6 +43,7 @@
43#define _PAGE_NO_CACHE 0x004 /* I: caching is inhibited */ 43#define _PAGE_NO_CACHE 0x004 /* I: caching is inhibited */
44#define _PAGE_WRITETHRU 0x008 /* W: caching is write-through */ 44#define _PAGE_WRITETHRU 0x008 /* W: caching is write-through */
45#define _PAGE_USER 0x010 /* matches one of the zone permission bits */ 45#define _PAGE_USER 0x010 /* matches one of the zone permission bits */
46#define _PAGE_SPECIAL 0x020 /* software: Special page */
46#define _PAGE_RW 0x040 /* software: Writes permitted */ 47#define _PAGE_RW 0x040 /* software: Writes permitted */
47#define _PAGE_DIRTY 0x080 /* software: dirty page */ 48#define _PAGE_DIRTY 0x080 /* software: dirty page */
48#define _PAGE_HWWRITE 0x100 /* hardware: Dirty & RW, set in exception */ 49#define _PAGE_HWWRITE 0x100 /* hardware: Dirty & RW, set in exception */
diff --git a/arch/powerpc/include/asm/pte-8xx.h b/arch/powerpc/include/asm/pte-8xx.h
index 94e979718dcf..dd5ea95fe61e 100644
--- a/arch/powerpc/include/asm/pte-8xx.h
+++ b/arch/powerpc/include/asm/pte-8xx.h
@@ -32,6 +32,7 @@
32#define _PAGE_FILE 0x0002 /* when !present: nonlinear file mapping */ 32#define _PAGE_FILE 0x0002 /* when !present: nonlinear file mapping */
33#define _PAGE_NO_CACHE 0x0002 /* I: cache inhibit */ 33#define _PAGE_NO_CACHE 0x0002 /* I: cache inhibit */
34#define _PAGE_SHARED 0x0004 /* No ASID (context) compare */ 34#define _PAGE_SHARED 0x0004 /* No ASID (context) compare */
35#define _PAGE_SPECIAL 0x0008 /* SW entry, forced to 0 by the TLB miss */
35 36
36/* These five software bits must be masked out when the entry is loaded 37/* These five software bits must be masked out when the entry is loaded
37 * into the TLB. 38 * into the TLB.
diff --git a/arch/powerpc/include/asm/pte-common.h b/arch/powerpc/include/asm/pte-common.h
index c3b65076a263..f2b370180a09 100644
--- a/arch/powerpc/include/asm/pte-common.h
+++ b/arch/powerpc/include/asm/pte-common.h
@@ -25,9 +25,6 @@
25#ifndef _PAGE_WRITETHRU 25#ifndef _PAGE_WRITETHRU
26#define _PAGE_WRITETHRU 0 26#define _PAGE_WRITETHRU 0
27#endif 27#endif
28#ifndef _PAGE_SPECIAL
29#define _PAGE_SPECIAL 0
30#endif
31#ifndef _PAGE_4K_PFN 28#ifndef _PAGE_4K_PFN
32#define _PAGE_4K_PFN 0 29#define _PAGE_4K_PFN 0
33#endif 30#endif
@@ -179,7 +176,5 @@ extern unsigned long bad_call_to_PMD_PAGE_SIZE(void);
179#define HAVE_PAGE_AGP 176#define HAVE_PAGE_AGP
180 177
181/* Advertise support for _PAGE_SPECIAL */ 178/* Advertise support for _PAGE_SPECIAL */
182#ifdef _PAGE_SPECIAL
183#define __HAVE_ARCH_PTE_SPECIAL 179#define __HAVE_ARCH_PTE_SPECIAL
184#endif
185 180
diff --git a/arch/powerpc/include/asm/smp.h b/arch/powerpc/include/asm/smp.h
index c0d3b8af9319..d9ea8d39c342 100644
--- a/arch/powerpc/include/asm/smp.h
+++ b/arch/powerpc/include/asm/smp.h
@@ -146,7 +146,7 @@ extern void smp_generic_take_timebase(void);
146extern struct smp_ops_t *smp_ops; 146extern struct smp_ops_t *smp_ops;
147 147
148extern void arch_send_call_function_single_ipi(int cpu); 148extern void arch_send_call_function_single_ipi(int cpu);
149extern void arch_send_call_function_ipi(cpumask_t mask); 149extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
150 150
151/* Definitions relative to the secondary CPU spin loop 151/* Definitions relative to the secondary CPU spin loop
152 * and entry point. Not all of them exist on both 32 and 152 * and entry point. Not all of them exist on both 32 and
diff --git a/arch/powerpc/include/asm/systbl.h b/arch/powerpc/include/asm/systbl.h
index ed24bd92fe49..c7d671a7d9a1 100644
--- a/arch/powerpc/include/asm/systbl.h
+++ b/arch/powerpc/include/asm/systbl.h
@@ -322,7 +322,7 @@ SYSCALL_SPU(epoll_create1)
322SYSCALL_SPU(dup3) 322SYSCALL_SPU(dup3)
323SYSCALL_SPU(pipe2) 323SYSCALL_SPU(pipe2)
324SYSCALL(inotify_init1) 324SYSCALL(inotify_init1)
325SYSCALL_SPU(perf_counter_open) 325SYSCALL_SPU(perf_event_open)
326COMPAT_SYS_SPU(preadv) 326COMPAT_SYS_SPU(preadv)
327COMPAT_SYS_SPU(pwritev) 327COMPAT_SYS_SPU(pwritev)
328COMPAT_SYS(rt_tgsigqueueinfo) 328COMPAT_SYS(rt_tgsigqueueinfo)
diff --git a/arch/powerpc/include/asm/topology.h b/arch/powerpc/include/asm/topology.h
index 054a16d68082..22f738d12ad9 100644
--- a/arch/powerpc/include/asm/topology.h
+++ b/arch/powerpc/include/asm/topology.h
@@ -17,11 +17,6 @@ static inline int cpu_to_node(int cpu)
17 17
18#define parent_node(node) (node) 18#define parent_node(node) (node)
19 19
20static inline cpumask_t node_to_cpumask(int node)
21{
22 return numa_cpumask_lookup_table[node];
23}
24
25#define cpumask_of_node(node) (&numa_cpumask_lookup_table[node]) 20#define cpumask_of_node(node) (&numa_cpumask_lookup_table[node])
26 21
27int of_node_to_nid(struct device_node *device); 22int of_node_to_nid(struct device_node *device);
@@ -36,11 +31,6 @@ static inline int pcibus_to_node(struct pci_bus *bus)
36} 31}
37#endif 32#endif
38 33
39#define pcibus_to_cpumask(bus) (pcibus_to_node(bus) == -1 ? \
40 CPU_MASK_ALL : \
41 node_to_cpumask(pcibus_to_node(bus)) \
42 )
43
44#define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ? \ 34#define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ? \
45 cpu_all_mask : \ 35 cpu_all_mask : \
46 cpumask_of_node(pcibus_to_node(bus))) 36 cpumask_of_node(pcibus_to_node(bus)))
@@ -57,14 +47,13 @@ static inline int pcibus_to_node(struct pci_bus *bus)
57 .cache_nice_tries = 1, \ 47 .cache_nice_tries = 1, \
58 .busy_idx = 3, \ 48 .busy_idx = 3, \
59 .idle_idx = 1, \ 49 .idle_idx = 1, \
60 .newidle_idx = 2, \ 50 .newidle_idx = 0, \
61 .wake_idx = 1, \ 51 .wake_idx = 0, \
62 .flags = SD_LOAD_BALANCE \ 52 .flags = SD_LOAD_BALANCE \
63 | SD_BALANCE_EXEC \ 53 | SD_BALANCE_EXEC \
54 | SD_BALANCE_FORK \
64 | SD_BALANCE_NEWIDLE \ 55 | SD_BALANCE_NEWIDLE \
65 | SD_WAKE_IDLE \ 56 | SD_SERIALIZE, \
66 | SD_SERIALIZE \
67 | SD_WAKE_BALANCE, \
68 .last_balance = jiffies, \ 57 .last_balance = jiffies, \
69 .balance_interval = 1, \ 58 .balance_interval = 1, \
70 .nr_balance_failed = 0, \ 59 .nr_balance_failed = 0, \
@@ -105,8 +94,6 @@ static inline void sysfs_remove_device_from_node(struct sys_device *dev,
105#ifdef CONFIG_PPC64 94#ifdef CONFIG_PPC64
106#include <asm/smp.h> 95#include <asm/smp.h>
107 96
108#define topology_thread_siblings(cpu) (per_cpu(cpu_sibling_map, cpu))
109#define topology_core_siblings(cpu) (per_cpu(cpu_core_map, cpu))
110#define topology_thread_cpumask(cpu) (&per_cpu(cpu_sibling_map, cpu)) 97#define topology_thread_cpumask(cpu) (&per_cpu(cpu_sibling_map, cpu))
111#define topology_core_cpumask(cpu) (&per_cpu(cpu_core_map, cpu)) 98#define topology_core_cpumask(cpu) (&per_cpu(cpu_core_map, cpu))
112#define topology_core_id(cpu) (cpu_to_core_id(cpu)) 99#define topology_core_id(cpu) (cpu_to_core_id(cpu))
diff --git a/arch/powerpc/include/asm/unistd.h b/arch/powerpc/include/asm/unistd.h
index cef080bfc607..f6ca76176766 100644
--- a/arch/powerpc/include/asm/unistd.h
+++ b/arch/powerpc/include/asm/unistd.h
@@ -341,7 +341,7 @@
341#define __NR_dup3 316 341#define __NR_dup3 316
342#define __NR_pipe2 317 342#define __NR_pipe2 317
343#define __NR_inotify_init1 318 343#define __NR_inotify_init1 318
344#define __NR_perf_counter_open 319 344#define __NR_perf_event_open 319
345#define __NR_preadv 320 345#define __NR_preadv 320
346#define __NR_pwritev 321 346#define __NR_pwritev 321
347#define __NR_rt_tgsigqueueinfo 322 347#define __NR_rt_tgsigqueueinfo 322
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
index 569f79ccd310..b23664a0b86c 100644
--- a/arch/powerpc/kernel/Makefile
+++ b/arch/powerpc/kernel/Makefile
@@ -97,7 +97,7 @@ obj64-$(CONFIG_AUDIT) += compat_audit.o
97 97
98obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o 98obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o
99obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o 99obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o
100obj-$(CONFIG_PPC_PERF_CTRS) += perf_counter.o perf_callchain.o 100obj-$(CONFIG_PPC_PERF_CTRS) += perf_event.o perf_callchain.o
101obj64-$(CONFIG_PPC_PERF_CTRS) += power4-pmu.o ppc970-pmu.o power5-pmu.o \ 101obj64-$(CONFIG_PPC_PERF_CTRS) += power4-pmu.o ppc970-pmu.o power5-pmu.o \
102 power5+-pmu.o power6-pmu.o power7-pmu.o 102 power5+-pmu.o power6-pmu.o power7-pmu.o
103obj32-$(CONFIG_PPC_PERF_CTRS) += mpc7450-pmu.o 103obj32-$(CONFIG_PPC_PERF_CTRS) += mpc7450-pmu.o
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c
index f0df285f0f87..0812b0f414bb 100644
--- a/arch/powerpc/kernel/asm-offsets.c
+++ b/arch/powerpc/kernel/asm-offsets.c
@@ -133,7 +133,7 @@ int main(void)
133 DEFINE(PACAKMSR, offsetof(struct paca_struct, kernel_msr)); 133 DEFINE(PACAKMSR, offsetof(struct paca_struct, kernel_msr));
134 DEFINE(PACASOFTIRQEN, offsetof(struct paca_struct, soft_enabled)); 134 DEFINE(PACASOFTIRQEN, offsetof(struct paca_struct, soft_enabled));
135 DEFINE(PACAHARDIRQEN, offsetof(struct paca_struct, hard_enabled)); 135 DEFINE(PACAHARDIRQEN, offsetof(struct paca_struct, hard_enabled));
136 DEFINE(PACAPERFPEND, offsetof(struct paca_struct, perf_counter_pending)); 136 DEFINE(PACAPERFPEND, offsetof(struct paca_struct, perf_event_pending));
137 DEFINE(PACACONTEXTID, offsetof(struct paca_struct, context.id)); 137 DEFINE(PACACONTEXTID, offsetof(struct paca_struct, context.id));
138#ifdef CONFIG_PPC_MM_SLICES 138#ifdef CONFIG_PPC_MM_SLICES
139 DEFINE(PACALOWSLICESPSIZE, offsetof(struct paca_struct, 139 DEFINE(PACALOWSLICESPSIZE, offsetof(struct paca_struct,
diff --git a/arch/powerpc/kernel/dma-iommu.c b/arch/powerpc/kernel/dma-iommu.c
index 87ddb3fb948c..37771a518119 100644
--- a/arch/powerpc/kernel/dma-iommu.c
+++ b/arch/powerpc/kernel/dma-iommu.c
@@ -18,7 +18,7 @@
18static void *dma_iommu_alloc_coherent(struct device *dev, size_t size, 18static void *dma_iommu_alloc_coherent(struct device *dev, size_t size,
19 dma_addr_t *dma_handle, gfp_t flag) 19 dma_addr_t *dma_handle, gfp_t flag)
20{ 20{
21 return iommu_alloc_coherent(dev, dev->archdata.dma_data, size, 21 return iommu_alloc_coherent(dev, get_iommu_table_base(dev), size,
22 dma_handle, device_to_mask(dev), flag, 22 dma_handle, device_to_mask(dev), flag,
23 dev_to_node(dev)); 23 dev_to_node(dev));
24} 24}
@@ -26,7 +26,7 @@ static void *dma_iommu_alloc_coherent(struct device *dev, size_t size,
26static void dma_iommu_free_coherent(struct device *dev, size_t size, 26static void dma_iommu_free_coherent(struct device *dev, size_t size,
27 void *vaddr, dma_addr_t dma_handle) 27 void *vaddr, dma_addr_t dma_handle)
28{ 28{
29 iommu_free_coherent(dev->archdata.dma_data, size, vaddr, dma_handle); 29 iommu_free_coherent(get_iommu_table_base(dev), size, vaddr, dma_handle);
30} 30}
31 31
32/* Creates TCEs for a user provided buffer. The user buffer must be 32/* Creates TCEs for a user provided buffer. The user buffer must be
@@ -39,8 +39,8 @@ static dma_addr_t dma_iommu_map_page(struct device *dev, struct page *page,
39 enum dma_data_direction direction, 39 enum dma_data_direction direction,
40 struct dma_attrs *attrs) 40 struct dma_attrs *attrs)
41{ 41{
42 return iommu_map_page(dev, dev->archdata.dma_data, page, offset, size, 42 return iommu_map_page(dev, get_iommu_table_base(dev), page, offset,
43 device_to_mask(dev), direction, attrs); 43 size, device_to_mask(dev), direction, attrs);
44} 44}
45 45
46 46
@@ -48,7 +48,7 @@ static void dma_iommu_unmap_page(struct device *dev, dma_addr_t dma_handle,
48 size_t size, enum dma_data_direction direction, 48 size_t size, enum dma_data_direction direction,
49 struct dma_attrs *attrs) 49 struct dma_attrs *attrs)
50{ 50{
51 iommu_unmap_page(dev->archdata.dma_data, dma_handle, size, direction, 51 iommu_unmap_page(get_iommu_table_base(dev), dma_handle, size, direction,
52 attrs); 52 attrs);
53} 53}
54 54
@@ -57,7 +57,7 @@ static int dma_iommu_map_sg(struct device *dev, struct scatterlist *sglist,
57 int nelems, enum dma_data_direction direction, 57 int nelems, enum dma_data_direction direction,
58 struct dma_attrs *attrs) 58 struct dma_attrs *attrs)
59{ 59{
60 return iommu_map_sg(dev, dev->archdata.dma_data, sglist, nelems, 60 return iommu_map_sg(dev, get_iommu_table_base(dev), sglist, nelems,
61 device_to_mask(dev), direction, attrs); 61 device_to_mask(dev), direction, attrs);
62} 62}
63 63
@@ -65,14 +65,14 @@ static void dma_iommu_unmap_sg(struct device *dev, struct scatterlist *sglist,
65 int nelems, enum dma_data_direction direction, 65 int nelems, enum dma_data_direction direction,
66 struct dma_attrs *attrs) 66 struct dma_attrs *attrs)
67{ 67{
68 iommu_unmap_sg(dev->archdata.dma_data, sglist, nelems, direction, 68 iommu_unmap_sg(get_iommu_table_base(dev), sglist, nelems, direction,
69 attrs); 69 attrs);
70} 70}
71 71
72/* We support DMA to/from any memory page via the iommu */ 72/* We support DMA to/from any memory page via the iommu */
73static int dma_iommu_dma_supported(struct device *dev, u64 mask) 73static int dma_iommu_dma_supported(struct device *dev, u64 mask)
74{ 74{
75 struct iommu_table *tbl = dev->archdata.dma_data; 75 struct iommu_table *tbl = get_iommu_table_base(dev);
76 76
77 if (!tbl || tbl->it_offset > mask) { 77 if (!tbl || tbl->it_offset > mask) {
78 printk(KERN_INFO 78 printk(KERN_INFO
diff --git a/arch/powerpc/kernel/dma.c b/arch/powerpc/kernel/dma.c
index 21b784d7e7d0..6215062caf8c 100644
--- a/arch/powerpc/kernel/dma.c
+++ b/arch/powerpc/kernel/dma.c
@@ -21,13 +21,6 @@
21 * default the offset is PCI_DRAM_OFFSET. 21 * default the offset is PCI_DRAM_OFFSET.
22 */ 22 */
23 23
24unsigned long get_dma_direct_offset(struct device *dev)
25{
26 if (dev)
27 return (unsigned long)dev->archdata.dma_data;
28
29 return PCI_DRAM_OFFSET;
30}
31 24
32void *dma_direct_alloc_coherent(struct device *dev, size_t size, 25void *dma_direct_alloc_coherent(struct device *dev, size_t size,
33 dma_addr_t *dma_handle, gfp_t flag) 26 dma_addr_t *dma_handle, gfp_t flag)
@@ -37,7 +30,7 @@ void *dma_direct_alloc_coherent(struct device *dev, size_t size,
37 ret = __dma_alloc_coherent(dev, size, dma_handle, flag); 30 ret = __dma_alloc_coherent(dev, size, dma_handle, flag);
38 if (ret == NULL) 31 if (ret == NULL)
39 return NULL; 32 return NULL;
40 *dma_handle += get_dma_direct_offset(dev); 33 *dma_handle += get_dma_offset(dev);
41 return ret; 34 return ret;
42#else 35#else
43 struct page *page; 36 struct page *page;
@@ -51,7 +44,7 @@ void *dma_direct_alloc_coherent(struct device *dev, size_t size,
51 return NULL; 44 return NULL;
52 ret = page_address(page); 45 ret = page_address(page);
53 memset(ret, 0, size); 46 memset(ret, 0, size);
54 *dma_handle = virt_to_abs(ret) + get_dma_direct_offset(dev); 47 *dma_handle = virt_to_abs(ret) + get_dma_offset(dev);
55 48
56 return ret; 49 return ret;
57#endif 50#endif
@@ -75,7 +68,7 @@ static int dma_direct_map_sg(struct device *dev, struct scatterlist *sgl,
75 int i; 68 int i;
76 69
77 for_each_sg(sgl, sg, nents, i) { 70 for_each_sg(sgl, sg, nents, i) {
78 sg->dma_address = sg_phys(sg) + get_dma_direct_offset(dev); 71 sg->dma_address = sg_phys(sg) + get_dma_offset(dev);
79 sg->dma_length = sg->length; 72 sg->dma_length = sg->length;
80 __dma_sync_page(sg_page(sg), sg->offset, sg->length, direction); 73 __dma_sync_page(sg_page(sg), sg->offset, sg->length, direction);
81 } 74 }
@@ -110,7 +103,7 @@ static inline dma_addr_t dma_direct_map_page(struct device *dev,
110{ 103{
111 BUG_ON(dir == DMA_NONE); 104 BUG_ON(dir == DMA_NONE);
112 __dma_sync_page(page, offset, size, dir); 105 __dma_sync_page(page, offset, size, dir);
113 return page_to_phys(page) + offset + get_dma_direct_offset(dev); 106 return page_to_phys(page) + offset + get_dma_offset(dev);
114} 107}
115 108
116static inline void dma_direct_unmap_page(struct device *dev, 109static inline void dma_direct_unmap_page(struct device *dev,
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
index 66bcda34a6bb..900e0eea0099 100644
--- a/arch/powerpc/kernel/entry_64.S
+++ b/arch/powerpc/kernel/entry_64.S
@@ -556,14 +556,14 @@ ALT_FW_FTR_SECTION_END_IFCLR(FW_FEATURE_ISERIES)
5562: 5562:
557 TRACE_AND_RESTORE_IRQ(r5); 557 TRACE_AND_RESTORE_IRQ(r5);
558 558
559#ifdef CONFIG_PERF_COUNTERS 559#ifdef CONFIG_PERF_EVENTS
560 /* check paca->perf_counter_pending if we're enabling ints */ 560 /* check paca->perf_event_pending if we're enabling ints */
561 lbz r3,PACAPERFPEND(r13) 561 lbz r3,PACAPERFPEND(r13)
562 and. r3,r3,r5 562 and. r3,r3,r5
563 beq 27f 563 beq 27f
564 bl .perf_counter_do_pending 564 bl .perf_event_do_pending
56527: 56527:
566#endif /* CONFIG_PERF_COUNTERS */ 566#endif /* CONFIG_PERF_EVENTS */
567 567
568 /* extract EE bit and use it to restore paca->hard_enabled */ 568 /* extract EE bit and use it to restore paca->hard_enabled */
569 ld r3,_MSR(r1) 569 ld r3,_MSR(r1)
diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc/kernel/exceptions-64e.S
index 9048f96237f6..24dcc0ecf246 100644
--- a/arch/powerpc/kernel/exceptions-64e.S
+++ b/arch/powerpc/kernel/exceptions-64e.S
@@ -17,7 +17,6 @@
17#include <asm/cputable.h> 17#include <asm/cputable.h>
18#include <asm/setup.h> 18#include <asm/setup.h>
19#include <asm/thread_info.h> 19#include <asm/thread_info.h>
20#include <asm/reg.h>
21#include <asm/exception-64e.h> 20#include <asm/exception-64e.h>
22#include <asm/bug.h> 21#include <asm/bug.h>
23#include <asm/irqflags.h> 22#include <asm/irqflags.h>
diff --git a/arch/powerpc/kernel/init_task.c b/arch/powerpc/kernel/init_task.c
index ffc4253fef55..2375b7eb1c76 100644
--- a/arch/powerpc/kernel/init_task.c
+++ b/arch/powerpc/kernel/init_task.c
@@ -16,9 +16,8 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
16 * way process stacks are handled. This is done by having a special 16 * way process stacks are handled. This is done by having a special
17 * "init_task" linker map entry.. 17 * "init_task" linker map entry..
18 */ 18 */
19union thread_union init_thread_union 19union thread_union init_thread_union __init_task_data =
20 __attribute__((__section__(".data.init_task"))) = 20 { INIT_THREAD_INFO(init_task) };
21 { INIT_THREAD_INFO(init_task) };
22 21
23/* 22/*
24 * Initial task structure. 23 * Initial task structure.
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index f7f376ea7b17..e5d121177984 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -53,7 +53,7 @@
53#include <linux/bootmem.h> 53#include <linux/bootmem.h>
54#include <linux/pci.h> 54#include <linux/pci.h>
55#include <linux/debugfs.h> 55#include <linux/debugfs.h>
56#include <linux/perf_counter.h> 56#include <linux/perf_event.h>
57 57
58#include <asm/uaccess.h> 58#include <asm/uaccess.h>
59#include <asm/system.h> 59#include <asm/system.h>
@@ -138,9 +138,9 @@ notrace void raw_local_irq_restore(unsigned long en)
138 } 138 }
139#endif /* CONFIG_PPC_STD_MMU_64 */ 139#endif /* CONFIG_PPC_STD_MMU_64 */
140 140
141 if (test_perf_counter_pending()) { 141 if (test_perf_event_pending()) {
142 clear_perf_counter_pending(); 142 clear_perf_event_pending();
143 perf_counter_do_pending(); 143 perf_event_do_pending();
144 } 144 }
145 145
146 /* 146 /*
diff --git a/arch/powerpc/kernel/machine_kexec_64.c b/arch/powerpc/kernel/machine_kexec_64.c
index 49e705fcee6d..040bd1de8d99 100644
--- a/arch/powerpc/kernel/machine_kexec_64.c
+++ b/arch/powerpc/kernel/machine_kexec_64.c
@@ -13,6 +13,7 @@
13#include <linux/kexec.h> 13#include <linux/kexec.h>
14#include <linux/smp.h> 14#include <linux/smp.h>
15#include <linux/thread_info.h> 15#include <linux/thread_info.h>
16#include <linux/init_task.h>
16#include <linux/errno.h> 17#include <linux/errno.h>
17 18
18#include <asm/page.h> 19#include <asm/page.h>
@@ -249,8 +250,8 @@ static void kexec_prepare_cpus(void)
249 * We could use a smaller stack if we don't care about anything using 250 * We could use a smaller stack if we don't care about anything using
250 * current, but that audit has not been performed. 251 * current, but that audit has not been performed.
251 */ 252 */
252static union thread_union kexec_stack 253static union thread_union kexec_stack __init_task_data =
253 __attribute__((__section__(".data.init_task"))) = { }; 254 { };
254 255
255/* Our assembly helper, in kexec_stub.S */ 256/* Our assembly helper, in kexec_stub.S */
256extern NORET_TYPE void kexec_sequence(void *newstack, unsigned long start, 257extern NORET_TYPE void kexec_sequence(void *newstack, unsigned long start,
diff --git a/arch/powerpc/kernel/mpc7450-pmu.c b/arch/powerpc/kernel/mpc7450-pmu.c
index cc466d039af6..09d72028f317 100644
--- a/arch/powerpc/kernel/mpc7450-pmu.c
+++ b/arch/powerpc/kernel/mpc7450-pmu.c
@@ -9,7 +9,7 @@
9 * 2 of the License, or (at your option) any later version. 9 * 2 of the License, or (at your option) any later version.
10 */ 10 */
11#include <linux/string.h> 11#include <linux/string.h>
12#include <linux/perf_counter.h> 12#include <linux/perf_event.h>
13#include <asm/reg.h> 13#include <asm/reg.h>
14#include <asm/cputable.h> 14#include <asm/cputable.h>
15 15
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index e9f4840096b3..bb8209e34931 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -1117,7 +1117,7 @@ void __devinit pcibios_setup_bus_devices(struct pci_bus *bus)
1117 1117
1118 /* Hook up default DMA ops */ 1118 /* Hook up default DMA ops */
1119 sd->dma_ops = pci_dma_ops; 1119 sd->dma_ops = pci_dma_ops;
1120 sd->dma_data = (void *)PCI_DRAM_OFFSET; 1120 set_dma_offset(&dev->dev, PCI_DRAM_OFFSET);
1121 1121
1122 /* Additional platform DMA/iommu setup */ 1122 /* Additional platform DMA/iommu setup */
1123 if (ppc_md.pci_dma_dev_setup) 1123 if (ppc_md.pci_dma_dev_setup)
diff --git a/arch/powerpc/kernel/pci_of_scan.c b/arch/powerpc/kernel/pci_of_scan.c
index 72c31bcb7aa4..7311fdfb9bf8 100644
--- a/arch/powerpc/kernel/pci_of_scan.c
+++ b/arch/powerpc/kernel/pci_of_scan.c
@@ -139,6 +139,7 @@ struct pci_dev *of_create_pci_dev(struct device_node *node,
139 dev->dev.bus = &pci_bus_type; 139 dev->dev.bus = &pci_bus_type;
140 dev->devfn = devfn; 140 dev->devfn = devfn;
141 dev->multifunction = 0; /* maybe a lie? */ 141 dev->multifunction = 0; /* maybe a lie? */
142 dev->needs_freset = 0; /* pcie fundamental reset required */
142 143
143 dev->vendor = get_int_prop(node, "vendor-id", 0xffff); 144 dev->vendor = get_int_prop(node, "vendor-id", 0xffff);
144 dev->device = get_int_prop(node, "device-id", 0xffff); 145 dev->device = get_int_prop(node, "device-id", 0xffff);
diff --git a/arch/powerpc/kernel/perf_callchain.c b/arch/powerpc/kernel/perf_callchain.c
index f74b62c67511..0a03cf70d247 100644
--- a/arch/powerpc/kernel/perf_callchain.c
+++ b/arch/powerpc/kernel/perf_callchain.c
@@ -10,7 +10,7 @@
10 */ 10 */
11#include <linux/kernel.h> 11#include <linux/kernel.h>
12#include <linux/sched.h> 12#include <linux/sched.h>
13#include <linux/perf_counter.h> 13#include <linux/perf_event.h>
14#include <linux/percpu.h> 14#include <linux/percpu.h>
15#include <linux/uaccess.h> 15#include <linux/uaccess.h>
16#include <linux/mm.h> 16#include <linux/mm.h>
diff --git a/arch/powerpc/kernel/perf_counter.c b/arch/powerpc/kernel/perf_event.c
index 7ceefaf3a7f5..bbcbae183e92 100644
--- a/arch/powerpc/kernel/perf_counter.c
+++ b/arch/powerpc/kernel/perf_event.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Performance counter support - powerpc architecture code 2 * Performance event support - powerpc architecture code
3 * 3 *
4 * Copyright 2008-2009 Paul Mackerras, IBM Corporation. 4 * Copyright 2008-2009 Paul Mackerras, IBM Corporation.
5 * 5 *
@@ -10,7 +10,7 @@
10 */ 10 */
11#include <linux/kernel.h> 11#include <linux/kernel.h>
12#include <linux/sched.h> 12#include <linux/sched.h>
13#include <linux/perf_counter.h> 13#include <linux/perf_event.h>
14#include <linux/percpu.h> 14#include <linux/percpu.h>
15#include <linux/hardirq.h> 15#include <linux/hardirq.h>
16#include <asm/reg.h> 16#include <asm/reg.h>
@@ -19,24 +19,24 @@
19#include <asm/firmware.h> 19#include <asm/firmware.h>
20#include <asm/ptrace.h> 20#include <asm/ptrace.h>
21 21
22struct cpu_hw_counters { 22struct cpu_hw_events {
23 int n_counters; 23 int n_events;
24 int n_percpu; 24 int n_percpu;
25 int disabled; 25 int disabled;
26 int n_added; 26 int n_added;
27 int n_limited; 27 int n_limited;
28 u8 pmcs_enabled; 28 u8 pmcs_enabled;
29 struct perf_counter *counter[MAX_HWCOUNTERS]; 29 struct perf_event *event[MAX_HWEVENTS];
30 u64 events[MAX_HWCOUNTERS]; 30 u64 events[MAX_HWEVENTS];
31 unsigned int flags[MAX_HWCOUNTERS]; 31 unsigned int flags[MAX_HWEVENTS];
32 unsigned long mmcr[3]; 32 unsigned long mmcr[3];
33 struct perf_counter *limited_counter[MAX_LIMITED_HWCOUNTERS]; 33 struct perf_event *limited_counter[MAX_LIMITED_HWCOUNTERS];
34 u8 limited_hwidx[MAX_LIMITED_HWCOUNTERS]; 34 u8 limited_hwidx[MAX_LIMITED_HWCOUNTERS];
35 u64 alternatives[MAX_HWCOUNTERS][MAX_EVENT_ALTERNATIVES]; 35 u64 alternatives[MAX_HWEVENTS][MAX_EVENT_ALTERNATIVES];
36 unsigned long amasks[MAX_HWCOUNTERS][MAX_EVENT_ALTERNATIVES]; 36 unsigned long amasks[MAX_HWEVENTS][MAX_EVENT_ALTERNATIVES];
37 unsigned long avalues[MAX_HWCOUNTERS][MAX_EVENT_ALTERNATIVES]; 37 unsigned long avalues[MAX_HWEVENTS][MAX_EVENT_ALTERNATIVES];
38}; 38};
39DEFINE_PER_CPU(struct cpu_hw_counters, cpu_hw_counters); 39DEFINE_PER_CPU(struct cpu_hw_events, cpu_hw_events);
40 40
41struct power_pmu *ppmu; 41struct power_pmu *ppmu;
42 42
@@ -47,7 +47,7 @@ struct power_pmu *ppmu;
47 * where the hypervisor bit is forced to 1 (as on Apple G5 processors), 47 * where the hypervisor bit is forced to 1 (as on Apple G5 processors),
48 * then we need to use the FCHV bit to ignore kernel events. 48 * then we need to use the FCHV bit to ignore kernel events.
49 */ 49 */
50static unsigned int freeze_counters_kernel = MMCR0_FCS; 50static unsigned int freeze_events_kernel = MMCR0_FCS;
51 51
52/* 52/*
53 * 32-bit doesn't have MMCRA but does have an MMCR2, 53 * 32-bit doesn't have MMCRA but does have an MMCR2,
@@ -122,14 +122,14 @@ static inline u32 perf_get_misc_flags(struct pt_regs *regs)
122 122
123 if (ppmu->flags & PPMU_ALT_SIPR) { 123 if (ppmu->flags & PPMU_ALT_SIPR) {
124 if (mmcra & POWER6_MMCRA_SIHV) 124 if (mmcra & POWER6_MMCRA_SIHV)
125 return PERF_EVENT_MISC_HYPERVISOR; 125 return PERF_RECORD_MISC_HYPERVISOR;
126 return (mmcra & POWER6_MMCRA_SIPR) ? 126 return (mmcra & POWER6_MMCRA_SIPR) ?
127 PERF_EVENT_MISC_USER : PERF_EVENT_MISC_KERNEL; 127 PERF_RECORD_MISC_USER : PERF_RECORD_MISC_KERNEL;
128 } 128 }
129 if (mmcra & MMCRA_SIHV) 129 if (mmcra & MMCRA_SIHV)
130 return PERF_EVENT_MISC_HYPERVISOR; 130 return PERF_RECORD_MISC_HYPERVISOR;
131 return (mmcra & MMCRA_SIPR) ? PERF_EVENT_MISC_USER : 131 return (mmcra & MMCRA_SIPR) ? PERF_RECORD_MISC_USER :
132 PERF_EVENT_MISC_KERNEL; 132 PERF_RECORD_MISC_KERNEL;
133} 133}
134 134
135/* 135/*
@@ -152,9 +152,9 @@ static inline int perf_intr_is_nmi(struct pt_regs *regs)
152 152
153#endif /* CONFIG_PPC64 */ 153#endif /* CONFIG_PPC64 */
154 154
155static void perf_counter_interrupt(struct pt_regs *regs); 155static void perf_event_interrupt(struct pt_regs *regs);
156 156
157void perf_counter_print_debug(void) 157void perf_event_print_debug(void)
158{ 158{
159} 159}
160 160
@@ -240,15 +240,15 @@ static void write_pmc(int idx, unsigned long val)
240 * Check if a set of events can all go on the PMU at once. 240 * Check if a set of events can all go on the PMU at once.
241 * If they can't, this will look at alternative codes for the events 241 * If they can't, this will look at alternative codes for the events
242 * and see if any combination of alternative codes is feasible. 242 * and see if any combination of alternative codes is feasible.
243 * The feasible set is returned in event[]. 243 * The feasible set is returned in event_id[].
244 */ 244 */
245static int power_check_constraints(struct cpu_hw_counters *cpuhw, 245static int power_check_constraints(struct cpu_hw_events *cpuhw,
246 u64 event[], unsigned int cflags[], 246 u64 event_id[], unsigned int cflags[],
247 int n_ev) 247 int n_ev)
248{ 248{
249 unsigned long mask, value, nv; 249 unsigned long mask, value, nv;
250 unsigned long smasks[MAX_HWCOUNTERS], svalues[MAX_HWCOUNTERS]; 250 unsigned long smasks[MAX_HWEVENTS], svalues[MAX_HWEVENTS];
251 int n_alt[MAX_HWCOUNTERS], choice[MAX_HWCOUNTERS]; 251 int n_alt[MAX_HWEVENTS], choice[MAX_HWEVENTS];
252 int i, j; 252 int i, j;
253 unsigned long addf = ppmu->add_fields; 253 unsigned long addf = ppmu->add_fields;
254 unsigned long tadd = ppmu->test_adder; 254 unsigned long tadd = ppmu->test_adder;
@@ -259,12 +259,12 @@ static int power_check_constraints(struct cpu_hw_counters *cpuhw,
259 /* First see if the events will go on as-is */ 259 /* First see if the events will go on as-is */
260 for (i = 0; i < n_ev; ++i) { 260 for (i = 0; i < n_ev; ++i) {
261 if ((cflags[i] & PPMU_LIMITED_PMC_REQD) 261 if ((cflags[i] & PPMU_LIMITED_PMC_REQD)
262 && !ppmu->limited_pmc_event(event[i])) { 262 && !ppmu->limited_pmc_event(event_id[i])) {
263 ppmu->get_alternatives(event[i], cflags[i], 263 ppmu->get_alternatives(event_id[i], cflags[i],
264 cpuhw->alternatives[i]); 264 cpuhw->alternatives[i]);
265 event[i] = cpuhw->alternatives[i][0]; 265 event_id[i] = cpuhw->alternatives[i][0];
266 } 266 }
267 if (ppmu->get_constraint(event[i], &cpuhw->amasks[i][0], 267 if (ppmu->get_constraint(event_id[i], &cpuhw->amasks[i][0],
268 &cpuhw->avalues[i][0])) 268 &cpuhw->avalues[i][0]))
269 return -1; 269 return -1;
270 } 270 }
@@ -287,7 +287,7 @@ static int power_check_constraints(struct cpu_hw_counters *cpuhw,
287 return -1; 287 return -1;
288 for (i = 0; i < n_ev; ++i) { 288 for (i = 0; i < n_ev; ++i) {
289 choice[i] = 0; 289 choice[i] = 0;
290 n_alt[i] = ppmu->get_alternatives(event[i], cflags[i], 290 n_alt[i] = ppmu->get_alternatives(event_id[i], cflags[i],
291 cpuhw->alternatives[i]); 291 cpuhw->alternatives[i]);
292 for (j = 1; j < n_alt[i]; ++j) 292 for (j = 1; j < n_alt[i]; ++j)
293 ppmu->get_constraint(cpuhw->alternatives[i][j], 293 ppmu->get_constraint(cpuhw->alternatives[i][j],
@@ -307,7 +307,7 @@ static int power_check_constraints(struct cpu_hw_counters *cpuhw,
307 j = choice[i]; 307 j = choice[i];
308 } 308 }
309 /* 309 /*
310 * See if any alternative k for event i, 310 * See if any alternative k for event_id i,
311 * where k > j, will satisfy the constraints. 311 * where k > j, will satisfy the constraints.
312 */ 312 */
313 while (++j < n_alt[i]) { 313 while (++j < n_alt[i]) {
@@ -321,16 +321,16 @@ static int power_check_constraints(struct cpu_hw_counters *cpuhw,
321 if (j >= n_alt[i]) { 321 if (j >= n_alt[i]) {
322 /* 322 /*
323 * No feasible alternative, backtrack 323 * No feasible alternative, backtrack
324 * to event i-1 and continue enumerating its 324 * to event_id i-1 and continue enumerating its
325 * alternatives from where we got up to. 325 * alternatives from where we got up to.
326 */ 326 */
327 if (--i < 0) 327 if (--i < 0)
328 return -1; 328 return -1;
329 } else { 329 } else {
330 /* 330 /*
331 * Found a feasible alternative for event i, 331 * Found a feasible alternative for event_id i,
332 * remember where we got up to with this event, 332 * remember where we got up to with this event_id,
333 * go on to the next event, and start with 333 * go on to the next event_id, and start with
334 * the first alternative for it. 334 * the first alternative for it.
335 */ 335 */
336 choice[i] = j; 336 choice[i] = j;
@@ -345,21 +345,21 @@ static int power_check_constraints(struct cpu_hw_counters *cpuhw,
345 345
346 /* OK, we have a feasible combination, tell the caller the solution */ 346 /* OK, we have a feasible combination, tell the caller the solution */
347 for (i = 0; i < n_ev; ++i) 347 for (i = 0; i < n_ev; ++i)
348 event[i] = cpuhw->alternatives[i][choice[i]]; 348 event_id[i] = cpuhw->alternatives[i][choice[i]];
349 return 0; 349 return 0;
350} 350}
351 351
352/* 352/*
353 * Check if newly-added counters have consistent settings for 353 * Check if newly-added events have consistent settings for
354 * exclude_{user,kernel,hv} with each other and any previously 354 * exclude_{user,kernel,hv} with each other and any previously
355 * added counters. 355 * added events.
356 */ 356 */
357static int check_excludes(struct perf_counter **ctrs, unsigned int cflags[], 357static int check_excludes(struct perf_event **ctrs, unsigned int cflags[],
358 int n_prev, int n_new) 358 int n_prev, int n_new)
359{ 359{
360 int eu = 0, ek = 0, eh = 0; 360 int eu = 0, ek = 0, eh = 0;
361 int i, n, first; 361 int i, n, first;
362 struct perf_counter *counter; 362 struct perf_event *event;
363 363
364 n = n_prev + n_new; 364 n = n_prev + n_new;
365 if (n <= 1) 365 if (n <= 1)
@@ -371,15 +371,15 @@ static int check_excludes(struct perf_counter **ctrs, unsigned int cflags[],
371 cflags[i] &= ~PPMU_LIMITED_PMC_REQD; 371 cflags[i] &= ~PPMU_LIMITED_PMC_REQD;
372 continue; 372 continue;
373 } 373 }
374 counter = ctrs[i]; 374 event = ctrs[i];
375 if (first) { 375 if (first) {
376 eu = counter->attr.exclude_user; 376 eu = event->attr.exclude_user;
377 ek = counter->attr.exclude_kernel; 377 ek = event->attr.exclude_kernel;
378 eh = counter->attr.exclude_hv; 378 eh = event->attr.exclude_hv;
379 first = 0; 379 first = 0;
380 } else if (counter->attr.exclude_user != eu || 380 } else if (event->attr.exclude_user != eu ||
381 counter->attr.exclude_kernel != ek || 381 event->attr.exclude_kernel != ek ||
382 counter->attr.exclude_hv != eh) { 382 event->attr.exclude_hv != eh) {
383 return -EAGAIN; 383 return -EAGAIN;
384 } 384 }
385 } 385 }
@@ -392,11 +392,11 @@ static int check_excludes(struct perf_counter **ctrs, unsigned int cflags[],
392 return 0; 392 return 0;
393} 393}
394 394
395static void power_pmu_read(struct perf_counter *counter) 395static void power_pmu_read(struct perf_event *event)
396{ 396{
397 s64 val, delta, prev; 397 s64 val, delta, prev;
398 398
399 if (!counter->hw.idx) 399 if (!event->hw.idx)
400 return; 400 return;
401 /* 401 /*
402 * Performance monitor interrupts come even when interrupts 402 * Performance monitor interrupts come even when interrupts
@@ -404,21 +404,21 @@ static void power_pmu_read(struct perf_counter *counter)
404 * Therefore we treat them like NMIs. 404 * Therefore we treat them like NMIs.
405 */ 405 */
406 do { 406 do {
407 prev = atomic64_read(&counter->hw.prev_count); 407 prev = atomic64_read(&event->hw.prev_count);
408 barrier(); 408 barrier();
409 val = read_pmc(counter->hw.idx); 409 val = read_pmc(event->hw.idx);
410 } while (atomic64_cmpxchg(&counter->hw.prev_count, prev, val) != prev); 410 } while (atomic64_cmpxchg(&event->hw.prev_count, prev, val) != prev);
411 411
412 /* The counters are only 32 bits wide */ 412 /* The counters are only 32 bits wide */
413 delta = (val - prev) & 0xfffffffful; 413 delta = (val - prev) & 0xfffffffful;
414 atomic64_add(delta, &counter->count); 414 atomic64_add(delta, &event->count);
415 atomic64_sub(delta, &counter->hw.period_left); 415 atomic64_sub(delta, &event->hw.period_left);
416} 416}
417 417
418/* 418/*
419 * On some machines, PMC5 and PMC6 can't be written, don't respect 419 * On some machines, PMC5 and PMC6 can't be written, don't respect
420 * the freeze conditions, and don't generate interrupts. This tells 420 * the freeze conditions, and don't generate interrupts. This tells
421 * us if `counter' is using such a PMC. 421 * us if `event' is using such a PMC.
422 */ 422 */
423static int is_limited_pmc(int pmcnum) 423static int is_limited_pmc(int pmcnum)
424{ 424{
@@ -426,53 +426,53 @@ static int is_limited_pmc(int pmcnum)
426 && (pmcnum == 5 || pmcnum == 6); 426 && (pmcnum == 5 || pmcnum == 6);
427} 427}
428 428
429static void freeze_limited_counters(struct cpu_hw_counters *cpuhw, 429static void freeze_limited_counters(struct cpu_hw_events *cpuhw,
430 unsigned long pmc5, unsigned long pmc6) 430 unsigned long pmc5, unsigned long pmc6)
431{ 431{
432 struct perf_counter *counter; 432 struct perf_event *event;
433 u64 val, prev, delta; 433 u64 val, prev, delta;
434 int i; 434 int i;
435 435
436 for (i = 0; i < cpuhw->n_limited; ++i) { 436 for (i = 0; i < cpuhw->n_limited; ++i) {
437 counter = cpuhw->limited_counter[i]; 437 event = cpuhw->limited_counter[i];
438 if (!counter->hw.idx) 438 if (!event->hw.idx)
439 continue; 439 continue;
440 val = (counter->hw.idx == 5) ? pmc5 : pmc6; 440 val = (event->hw.idx == 5) ? pmc5 : pmc6;
441 prev = atomic64_read(&counter->hw.prev_count); 441 prev = atomic64_read(&event->hw.prev_count);
442 counter->hw.idx = 0; 442 event->hw.idx = 0;
443 delta = (val - prev) & 0xfffffffful; 443 delta = (val - prev) & 0xfffffffful;
444 atomic64_add(delta, &counter->count); 444 atomic64_add(delta, &event->count);
445 } 445 }
446} 446}
447 447
448static void thaw_limited_counters(struct cpu_hw_counters *cpuhw, 448static void thaw_limited_counters(struct cpu_hw_events *cpuhw,
449 unsigned long pmc5, unsigned long pmc6) 449 unsigned long pmc5, unsigned long pmc6)
450{ 450{
451 struct perf_counter *counter; 451 struct perf_event *event;
452 u64 val; 452 u64 val;
453 int i; 453 int i;
454 454
455 for (i = 0; i < cpuhw->n_limited; ++i) { 455 for (i = 0; i < cpuhw->n_limited; ++i) {
456 counter = cpuhw->limited_counter[i]; 456 event = cpuhw->limited_counter[i];
457 counter->hw.idx = cpuhw->limited_hwidx[i]; 457 event->hw.idx = cpuhw->limited_hwidx[i];
458 val = (counter->hw.idx == 5) ? pmc5 : pmc6; 458 val = (event->hw.idx == 5) ? pmc5 : pmc6;
459 atomic64_set(&counter->hw.prev_count, val); 459 atomic64_set(&event->hw.prev_count, val);
460 perf_counter_update_userpage(counter); 460 perf_event_update_userpage(event);
461 } 461 }
462} 462}
463 463
464/* 464/*
465 * Since limited counters don't respect the freeze conditions, we 465 * Since limited events don't respect the freeze conditions, we
466 * have to read them immediately after freezing or unfreezing the 466 * have to read them immediately after freezing or unfreezing the
467 * other counters. We try to keep the values from the limited 467 * other events. We try to keep the values from the limited
468 * counters as consistent as possible by keeping the delay (in 468 * events as consistent as possible by keeping the delay (in
469 * cycles and instructions) between freezing/unfreezing and reading 469 * cycles and instructions) between freezing/unfreezing and reading
470 * the limited counters as small and consistent as possible. 470 * the limited events as small and consistent as possible.
471 * Therefore, if any limited counters are in use, we read them 471 * Therefore, if any limited events are in use, we read them
472 * both, and always in the same order, to minimize variability, 472 * both, and always in the same order, to minimize variability,
473 * and do it inside the same asm that writes MMCR0. 473 * and do it inside the same asm that writes MMCR0.
474 */ 474 */
475static void write_mmcr0(struct cpu_hw_counters *cpuhw, unsigned long mmcr0) 475static void write_mmcr0(struct cpu_hw_events *cpuhw, unsigned long mmcr0)
476{ 476{
477 unsigned long pmc5, pmc6; 477 unsigned long pmc5, pmc6;
478 478
@@ -485,7 +485,7 @@ static void write_mmcr0(struct cpu_hw_counters *cpuhw, unsigned long mmcr0)
485 * Write MMCR0, then read PMC5 and PMC6 immediately. 485 * Write MMCR0, then read PMC5 and PMC6 immediately.
486 * To ensure we don't get a performance monitor interrupt 486 * To ensure we don't get a performance monitor interrupt
487 * between writing MMCR0 and freezing/thawing the limited 487 * between writing MMCR0 and freezing/thawing the limited
488 * counters, we first write MMCR0 with the counter overflow 488 * events, we first write MMCR0 with the event overflow
489 * interrupt enable bits turned off. 489 * interrupt enable bits turned off.
490 */ 490 */
491 asm volatile("mtspr %3,%2; mfspr %0,%4; mfspr %1,%5" 491 asm volatile("mtspr %3,%2; mfspr %0,%4; mfspr %1,%5"
@@ -500,7 +500,7 @@ static void write_mmcr0(struct cpu_hw_counters *cpuhw, unsigned long mmcr0)
500 thaw_limited_counters(cpuhw, pmc5, pmc6); 500 thaw_limited_counters(cpuhw, pmc5, pmc6);
501 501
502 /* 502 /*
503 * Write the full MMCR0 including the counter overflow interrupt 503 * Write the full MMCR0 including the event overflow interrupt
504 * enable bits, if necessary. 504 * enable bits, if necessary.
505 */ 505 */
506 if (mmcr0 & (MMCR0_PMC1CE | MMCR0_PMCjCE)) 506 if (mmcr0 & (MMCR0_PMC1CE | MMCR0_PMCjCE))
@@ -508,18 +508,18 @@ static void write_mmcr0(struct cpu_hw_counters *cpuhw, unsigned long mmcr0)
508} 508}
509 509
510/* 510/*
511 * Disable all counters to prevent PMU interrupts and to allow 511 * Disable all events to prevent PMU interrupts and to allow
512 * counters to be added or removed. 512 * events to be added or removed.
513 */ 513 */
514void hw_perf_disable(void) 514void hw_perf_disable(void)
515{ 515{
516 struct cpu_hw_counters *cpuhw; 516 struct cpu_hw_events *cpuhw;
517 unsigned long flags; 517 unsigned long flags;
518 518
519 if (!ppmu) 519 if (!ppmu)
520 return; 520 return;
521 local_irq_save(flags); 521 local_irq_save(flags);
522 cpuhw = &__get_cpu_var(cpu_hw_counters); 522 cpuhw = &__get_cpu_var(cpu_hw_events);
523 523
524 if (!cpuhw->disabled) { 524 if (!cpuhw->disabled) {
525 cpuhw->disabled = 1; 525 cpuhw->disabled = 1;
@@ -545,7 +545,7 @@ void hw_perf_disable(void)
545 /* 545 /*
546 * Set the 'freeze counters' bit. 546 * Set the 'freeze counters' bit.
547 * The barrier is to make sure the mtspr has been 547 * The barrier is to make sure the mtspr has been
548 * executed and the PMU has frozen the counters 548 * executed and the PMU has frozen the events
549 * before we return. 549 * before we return.
550 */ 550 */
551 write_mmcr0(cpuhw, mfspr(SPRN_MMCR0) | MMCR0_FC); 551 write_mmcr0(cpuhw, mfspr(SPRN_MMCR0) | MMCR0_FC);
@@ -555,26 +555,26 @@ void hw_perf_disable(void)
555} 555}
556 556
557/* 557/*
558 * Re-enable all counters if disable == 0. 558 * Re-enable all events if disable == 0.
559 * If we were previously disabled and counters were added, then 559 * If we were previously disabled and events were added, then
560 * put the new config on the PMU. 560 * put the new config on the PMU.
561 */ 561 */
562void hw_perf_enable(void) 562void hw_perf_enable(void)
563{ 563{
564 struct perf_counter *counter; 564 struct perf_event *event;
565 struct cpu_hw_counters *cpuhw; 565 struct cpu_hw_events *cpuhw;
566 unsigned long flags; 566 unsigned long flags;
567 long i; 567 long i;
568 unsigned long val; 568 unsigned long val;
569 s64 left; 569 s64 left;
570 unsigned int hwc_index[MAX_HWCOUNTERS]; 570 unsigned int hwc_index[MAX_HWEVENTS];
571 int n_lim; 571 int n_lim;
572 int idx; 572 int idx;
573 573
574 if (!ppmu) 574 if (!ppmu)
575 return; 575 return;
576 local_irq_save(flags); 576 local_irq_save(flags);
577 cpuhw = &__get_cpu_var(cpu_hw_counters); 577 cpuhw = &__get_cpu_var(cpu_hw_events);
578 if (!cpuhw->disabled) { 578 if (!cpuhw->disabled) {
579 local_irq_restore(flags); 579 local_irq_restore(flags);
580 return; 580 return;
@@ -582,23 +582,23 @@ void hw_perf_enable(void)
582 cpuhw->disabled = 0; 582 cpuhw->disabled = 0;
583 583
584 /* 584 /*
585 * If we didn't change anything, or only removed counters, 585 * If we didn't change anything, or only removed events,
586 * no need to recalculate MMCR* settings and reset the PMCs. 586 * no need to recalculate MMCR* settings and reset the PMCs.
587 * Just reenable the PMU with the current MMCR* settings 587 * Just reenable the PMU with the current MMCR* settings
588 * (possibly updated for removal of counters). 588 * (possibly updated for removal of events).
589 */ 589 */
590 if (!cpuhw->n_added) { 590 if (!cpuhw->n_added) {
591 mtspr(SPRN_MMCRA, cpuhw->mmcr[2] & ~MMCRA_SAMPLE_ENABLE); 591 mtspr(SPRN_MMCRA, cpuhw->mmcr[2] & ~MMCRA_SAMPLE_ENABLE);
592 mtspr(SPRN_MMCR1, cpuhw->mmcr[1]); 592 mtspr(SPRN_MMCR1, cpuhw->mmcr[1]);
593 if (cpuhw->n_counters == 0) 593 if (cpuhw->n_events == 0)
594 ppc_set_pmu_inuse(0); 594 ppc_set_pmu_inuse(0);
595 goto out_enable; 595 goto out_enable;
596 } 596 }
597 597
598 /* 598 /*
599 * Compute MMCR* values for the new set of counters 599 * Compute MMCR* values for the new set of events
600 */ 600 */
601 if (ppmu->compute_mmcr(cpuhw->events, cpuhw->n_counters, hwc_index, 601 if (ppmu->compute_mmcr(cpuhw->events, cpuhw->n_events, hwc_index,
602 cpuhw->mmcr)) { 602 cpuhw->mmcr)) {
603 /* shouldn't ever get here */ 603 /* shouldn't ever get here */
604 printk(KERN_ERR "oops compute_mmcr failed\n"); 604 printk(KERN_ERR "oops compute_mmcr failed\n");
@@ -607,22 +607,22 @@ void hw_perf_enable(void)
607 607
608 /* 608 /*
609 * Add in MMCR0 freeze bits corresponding to the 609 * Add in MMCR0 freeze bits corresponding to the
610 * attr.exclude_* bits for the first counter. 610 * attr.exclude_* bits for the first event.
611 * We have already checked that all counters have the 611 * We have already checked that all events have the
612 * same values for these bits as the first counter. 612 * same values for these bits as the first event.
613 */ 613 */
614 counter = cpuhw->counter[0]; 614 event = cpuhw->event[0];
615 if (counter->attr.exclude_user) 615 if (event->attr.exclude_user)
616 cpuhw->mmcr[0] |= MMCR0_FCP; 616 cpuhw->mmcr[0] |= MMCR0_FCP;
617 if (counter->attr.exclude_kernel) 617 if (event->attr.exclude_kernel)
618 cpuhw->mmcr[0] |= freeze_counters_kernel; 618 cpuhw->mmcr[0] |= freeze_events_kernel;
619 if (counter->attr.exclude_hv) 619 if (event->attr.exclude_hv)
620 cpuhw->mmcr[0] |= MMCR0_FCHV; 620 cpuhw->mmcr[0] |= MMCR0_FCHV;
621 621
622 /* 622 /*
623 * Write the new configuration to MMCR* with the freeze 623 * Write the new configuration to MMCR* with the freeze
624 * bit set and set the hardware counters to their initial values. 624 * bit set and set the hardware events to their initial values.
625 * Then unfreeze the counters. 625 * Then unfreeze the events.
626 */ 626 */
627 ppc_set_pmu_inuse(1); 627 ppc_set_pmu_inuse(1);
628 mtspr(SPRN_MMCRA, cpuhw->mmcr[2] & ~MMCRA_SAMPLE_ENABLE); 628 mtspr(SPRN_MMCRA, cpuhw->mmcr[2] & ~MMCRA_SAMPLE_ENABLE);
@@ -631,43 +631,43 @@ void hw_perf_enable(void)
631 | MMCR0_FC); 631 | MMCR0_FC);
632 632
633 /* 633 /*
634 * Read off any pre-existing counters that need to move 634 * Read off any pre-existing events that need to move
635 * to another PMC. 635 * to another PMC.
636 */ 636 */
637 for (i = 0; i < cpuhw->n_counters; ++i) { 637 for (i = 0; i < cpuhw->n_events; ++i) {
638 counter = cpuhw->counter[i]; 638 event = cpuhw->event[i];
639 if (counter->hw.idx && counter->hw.idx != hwc_index[i] + 1) { 639 if (event->hw.idx && event->hw.idx != hwc_index[i] + 1) {
640 power_pmu_read(counter); 640 power_pmu_read(event);
641 write_pmc(counter->hw.idx, 0); 641 write_pmc(event->hw.idx, 0);
642 counter->hw.idx = 0; 642 event->hw.idx = 0;
643 } 643 }
644 } 644 }
645 645
646 /* 646 /*
647 * Initialize the PMCs for all the new and moved counters. 647 * Initialize the PMCs for all the new and moved events.
648 */ 648 */
649 cpuhw->n_limited = n_lim = 0; 649 cpuhw->n_limited = n_lim = 0;
650 for (i = 0; i < cpuhw->n_counters; ++i) { 650 for (i = 0; i < cpuhw->n_events; ++i) {
651 counter = cpuhw->counter[i]; 651 event = cpuhw->event[i];
652 if (counter->hw.idx) 652 if (event->hw.idx)
653 continue; 653 continue;
654 idx = hwc_index[i] + 1; 654 idx = hwc_index[i] + 1;
655 if (is_limited_pmc(idx)) { 655 if (is_limited_pmc(idx)) {
656 cpuhw->limited_counter[n_lim] = counter; 656 cpuhw->limited_counter[n_lim] = event;
657 cpuhw->limited_hwidx[n_lim] = idx; 657 cpuhw->limited_hwidx[n_lim] = idx;
658 ++n_lim; 658 ++n_lim;
659 continue; 659 continue;
660 } 660 }
661 val = 0; 661 val = 0;
662 if (counter->hw.sample_period) { 662 if (event->hw.sample_period) {
663 left = atomic64_read(&counter->hw.period_left); 663 left = atomic64_read(&event->hw.period_left);
664 if (left < 0x80000000L) 664 if (left < 0x80000000L)
665 val = 0x80000000L - left; 665 val = 0x80000000L - left;
666 } 666 }
667 atomic64_set(&counter->hw.prev_count, val); 667 atomic64_set(&event->hw.prev_count, val);
668 counter->hw.idx = idx; 668 event->hw.idx = idx;
669 write_pmc(idx, val); 669 write_pmc(idx, val);
670 perf_counter_update_userpage(counter); 670 perf_event_update_userpage(event);
671 } 671 }
672 cpuhw->n_limited = n_lim; 672 cpuhw->n_limited = n_lim;
673 cpuhw->mmcr[0] |= MMCR0_PMXE | MMCR0_FCECE; 673 cpuhw->mmcr[0] |= MMCR0_PMXE | MMCR0_FCECE;
@@ -688,85 +688,85 @@ void hw_perf_enable(void)
688 local_irq_restore(flags); 688 local_irq_restore(flags);
689} 689}
690 690
691static int collect_events(struct perf_counter *group, int max_count, 691static int collect_events(struct perf_event *group, int max_count,
692 struct perf_counter *ctrs[], u64 *events, 692 struct perf_event *ctrs[], u64 *events,
693 unsigned int *flags) 693 unsigned int *flags)
694{ 694{
695 int n = 0; 695 int n = 0;
696 struct perf_counter *counter; 696 struct perf_event *event;
697 697
698 if (!is_software_counter(group)) { 698 if (!is_software_event(group)) {
699 if (n >= max_count) 699 if (n >= max_count)
700 return -1; 700 return -1;
701 ctrs[n] = group; 701 ctrs[n] = group;
702 flags[n] = group->hw.counter_base; 702 flags[n] = group->hw.event_base;
703 events[n++] = group->hw.config; 703 events[n++] = group->hw.config;
704 } 704 }
705 list_for_each_entry(counter, &group->sibling_list, list_entry) { 705 list_for_each_entry(event, &group->sibling_list, group_entry) {
706 if (!is_software_counter(counter) && 706 if (!is_software_event(event) &&
707 counter->state != PERF_COUNTER_STATE_OFF) { 707 event->state != PERF_EVENT_STATE_OFF) {
708 if (n >= max_count) 708 if (n >= max_count)
709 return -1; 709 return -1;
710 ctrs[n] = counter; 710 ctrs[n] = event;
711 flags[n] = counter->hw.counter_base; 711 flags[n] = event->hw.event_base;
712 events[n++] = counter->hw.config; 712 events[n++] = event->hw.config;
713 } 713 }
714 } 714 }
715 return n; 715 return n;
716} 716}
717 717
718static void counter_sched_in(struct perf_counter *counter, int cpu) 718static void event_sched_in(struct perf_event *event, int cpu)
719{ 719{
720 counter->state = PERF_COUNTER_STATE_ACTIVE; 720 event->state = PERF_EVENT_STATE_ACTIVE;
721 counter->oncpu = cpu; 721 event->oncpu = cpu;
722 counter->tstamp_running += counter->ctx->time - counter->tstamp_stopped; 722 event->tstamp_running += event->ctx->time - event->tstamp_stopped;
723 if (is_software_counter(counter)) 723 if (is_software_event(event))
724 counter->pmu->enable(counter); 724 event->pmu->enable(event);
725} 725}
726 726
727/* 727/*
728 * Called to enable a whole group of counters. 728 * Called to enable a whole group of events.
729 * Returns 1 if the group was enabled, or -EAGAIN if it could not be. 729 * Returns 1 if the group was enabled, or -EAGAIN if it could not be.
730 * Assumes the caller has disabled interrupts and has 730 * Assumes the caller has disabled interrupts and has
731 * frozen the PMU with hw_perf_save_disable. 731 * frozen the PMU with hw_perf_save_disable.
732 */ 732 */
733int hw_perf_group_sched_in(struct perf_counter *group_leader, 733int hw_perf_group_sched_in(struct perf_event *group_leader,
734 struct perf_cpu_context *cpuctx, 734 struct perf_cpu_context *cpuctx,
735 struct perf_counter_context *ctx, int cpu) 735 struct perf_event_context *ctx, int cpu)
736{ 736{
737 struct cpu_hw_counters *cpuhw; 737 struct cpu_hw_events *cpuhw;
738 long i, n, n0; 738 long i, n, n0;
739 struct perf_counter *sub; 739 struct perf_event *sub;
740 740
741 if (!ppmu) 741 if (!ppmu)
742 return 0; 742 return 0;
743 cpuhw = &__get_cpu_var(cpu_hw_counters); 743 cpuhw = &__get_cpu_var(cpu_hw_events);
744 n0 = cpuhw->n_counters; 744 n0 = cpuhw->n_events;
745 n = collect_events(group_leader, ppmu->n_counter - n0, 745 n = collect_events(group_leader, ppmu->n_counter - n0,
746 &cpuhw->counter[n0], &cpuhw->events[n0], 746 &cpuhw->event[n0], &cpuhw->events[n0],
747 &cpuhw->flags[n0]); 747 &cpuhw->flags[n0]);
748 if (n < 0) 748 if (n < 0)
749 return -EAGAIN; 749 return -EAGAIN;
750 if (check_excludes(cpuhw->counter, cpuhw->flags, n0, n)) 750 if (check_excludes(cpuhw->event, cpuhw->flags, n0, n))
751 return -EAGAIN; 751 return -EAGAIN;
752 i = power_check_constraints(cpuhw, cpuhw->events, cpuhw->flags, n + n0); 752 i = power_check_constraints(cpuhw, cpuhw->events, cpuhw->flags, n + n0);
753 if (i < 0) 753 if (i < 0)
754 return -EAGAIN; 754 return -EAGAIN;
755 cpuhw->n_counters = n0 + n; 755 cpuhw->n_events = n0 + n;
756 cpuhw->n_added += n; 756 cpuhw->n_added += n;
757 757
758 /* 758 /*
759 * OK, this group can go on; update counter states etc., 759 * OK, this group can go on; update event states etc.,
760 * and enable any software counters 760 * and enable any software events
761 */ 761 */
762 for (i = n0; i < n0 + n; ++i) 762 for (i = n0; i < n0 + n; ++i)
763 cpuhw->counter[i]->hw.config = cpuhw->events[i]; 763 cpuhw->event[i]->hw.config = cpuhw->events[i];
764 cpuctx->active_oncpu += n; 764 cpuctx->active_oncpu += n;
765 n = 1; 765 n = 1;
766 counter_sched_in(group_leader, cpu); 766 event_sched_in(group_leader, cpu);
767 list_for_each_entry(sub, &group_leader->sibling_list, list_entry) { 767 list_for_each_entry(sub, &group_leader->sibling_list, group_entry) {
768 if (sub->state != PERF_COUNTER_STATE_OFF) { 768 if (sub->state != PERF_EVENT_STATE_OFF) {
769 counter_sched_in(sub, cpu); 769 event_sched_in(sub, cpu);
770 ++n; 770 ++n;
771 } 771 }
772 } 772 }
@@ -776,14 +776,14 @@ int hw_perf_group_sched_in(struct perf_counter *group_leader,
776} 776}
777 777
778/* 778/*
779 * Add a counter to the PMU. 779 * Add a event to the PMU.
780 * If all counters are not already frozen, then we disable and 780 * If all events are not already frozen, then we disable and
781 * re-enable the PMU in order to get hw_perf_enable to do the 781 * re-enable the PMU in order to get hw_perf_enable to do the
782 * actual work of reconfiguring the PMU. 782 * actual work of reconfiguring the PMU.
783 */ 783 */
784static int power_pmu_enable(struct perf_counter *counter) 784static int power_pmu_enable(struct perf_event *event)
785{ 785{
786 struct cpu_hw_counters *cpuhw; 786 struct cpu_hw_events *cpuhw;
787 unsigned long flags; 787 unsigned long flags;
788 int n0; 788 int n0;
789 int ret = -EAGAIN; 789 int ret = -EAGAIN;
@@ -792,23 +792,23 @@ static int power_pmu_enable(struct perf_counter *counter)
792 perf_disable(); 792 perf_disable();
793 793
794 /* 794 /*
795 * Add the counter to the list (if there is room) 795 * Add the event to the list (if there is room)
796 * and check whether the total set is still feasible. 796 * and check whether the total set is still feasible.
797 */ 797 */
798 cpuhw = &__get_cpu_var(cpu_hw_counters); 798 cpuhw = &__get_cpu_var(cpu_hw_events);
799 n0 = cpuhw->n_counters; 799 n0 = cpuhw->n_events;
800 if (n0 >= ppmu->n_counter) 800 if (n0 >= ppmu->n_counter)
801 goto out; 801 goto out;
802 cpuhw->counter[n0] = counter; 802 cpuhw->event[n0] = event;
803 cpuhw->events[n0] = counter->hw.config; 803 cpuhw->events[n0] = event->hw.config;
804 cpuhw->flags[n0] = counter->hw.counter_base; 804 cpuhw->flags[n0] = event->hw.event_base;
805 if (check_excludes(cpuhw->counter, cpuhw->flags, n0, 1)) 805 if (check_excludes(cpuhw->event, cpuhw->flags, n0, 1))
806 goto out; 806 goto out;
807 if (power_check_constraints(cpuhw, cpuhw->events, cpuhw->flags, n0 + 1)) 807 if (power_check_constraints(cpuhw, cpuhw->events, cpuhw->flags, n0 + 1))
808 goto out; 808 goto out;
809 809
810 counter->hw.config = cpuhw->events[n0]; 810 event->hw.config = cpuhw->events[n0];
811 ++cpuhw->n_counters; 811 ++cpuhw->n_events;
812 ++cpuhw->n_added; 812 ++cpuhw->n_added;
813 813
814 ret = 0; 814 ret = 0;
@@ -819,36 +819,36 @@ static int power_pmu_enable(struct perf_counter *counter)
819} 819}
820 820
821/* 821/*
822 * Remove a counter from the PMU. 822 * Remove a event from the PMU.
823 */ 823 */
824static void power_pmu_disable(struct perf_counter *counter) 824static void power_pmu_disable(struct perf_event *event)
825{ 825{
826 struct cpu_hw_counters *cpuhw; 826 struct cpu_hw_events *cpuhw;
827 long i; 827 long i;
828 unsigned long flags; 828 unsigned long flags;
829 829
830 local_irq_save(flags); 830 local_irq_save(flags);
831 perf_disable(); 831 perf_disable();
832 832
833 power_pmu_read(counter); 833 power_pmu_read(event);
834 834
835 cpuhw = &__get_cpu_var(cpu_hw_counters); 835 cpuhw = &__get_cpu_var(cpu_hw_events);
836 for (i = 0; i < cpuhw->n_counters; ++i) { 836 for (i = 0; i < cpuhw->n_events; ++i) {
837 if (counter == cpuhw->counter[i]) { 837 if (event == cpuhw->event[i]) {
838 while (++i < cpuhw->n_counters) 838 while (++i < cpuhw->n_events)
839 cpuhw->counter[i-1] = cpuhw->counter[i]; 839 cpuhw->event[i-1] = cpuhw->event[i];
840 --cpuhw->n_counters; 840 --cpuhw->n_events;
841 ppmu->disable_pmc(counter->hw.idx - 1, cpuhw->mmcr); 841 ppmu->disable_pmc(event->hw.idx - 1, cpuhw->mmcr);
842 if (counter->hw.idx) { 842 if (event->hw.idx) {
843 write_pmc(counter->hw.idx, 0); 843 write_pmc(event->hw.idx, 0);
844 counter->hw.idx = 0; 844 event->hw.idx = 0;
845 } 845 }
846 perf_counter_update_userpage(counter); 846 perf_event_update_userpage(event);
847 break; 847 break;
848 } 848 }
849 } 849 }
850 for (i = 0; i < cpuhw->n_limited; ++i) 850 for (i = 0; i < cpuhw->n_limited; ++i)
851 if (counter == cpuhw->limited_counter[i]) 851 if (event == cpuhw->limited_counter[i])
852 break; 852 break;
853 if (i < cpuhw->n_limited) { 853 if (i < cpuhw->n_limited) {
854 while (++i < cpuhw->n_limited) { 854 while (++i < cpuhw->n_limited) {
@@ -857,8 +857,8 @@ static void power_pmu_disable(struct perf_counter *counter)
857 } 857 }
858 --cpuhw->n_limited; 858 --cpuhw->n_limited;
859 } 859 }
860 if (cpuhw->n_counters == 0) { 860 if (cpuhw->n_events == 0) {
861 /* disable exceptions if no counters are running */ 861 /* disable exceptions if no events are running */
862 cpuhw->mmcr[0] &= ~(MMCR0_PMXE | MMCR0_FCECE); 862 cpuhw->mmcr[0] &= ~(MMCR0_PMXE | MMCR0_FCECE);
863 } 863 }
864 864
@@ -867,28 +867,28 @@ static void power_pmu_disable(struct perf_counter *counter)
867} 867}
868 868
869/* 869/*
870 * Re-enable interrupts on a counter after they were throttled 870 * Re-enable interrupts on a event after they were throttled
871 * because they were coming too fast. 871 * because they were coming too fast.
872 */ 872 */
873static void power_pmu_unthrottle(struct perf_counter *counter) 873static void power_pmu_unthrottle(struct perf_event *event)
874{ 874{
875 s64 val, left; 875 s64 val, left;
876 unsigned long flags; 876 unsigned long flags;
877 877
878 if (!counter->hw.idx || !counter->hw.sample_period) 878 if (!event->hw.idx || !event->hw.sample_period)
879 return; 879 return;
880 local_irq_save(flags); 880 local_irq_save(flags);
881 perf_disable(); 881 perf_disable();
882 power_pmu_read(counter); 882 power_pmu_read(event);
883 left = counter->hw.sample_period; 883 left = event->hw.sample_period;
884 counter->hw.last_period = left; 884 event->hw.last_period = left;
885 val = 0; 885 val = 0;
886 if (left < 0x80000000L) 886 if (left < 0x80000000L)
887 val = 0x80000000L - left; 887 val = 0x80000000L - left;
888 write_pmc(counter->hw.idx, val); 888 write_pmc(event->hw.idx, val);
889 atomic64_set(&counter->hw.prev_count, val); 889 atomic64_set(&event->hw.prev_count, val);
890 atomic64_set(&counter->hw.period_left, left); 890 atomic64_set(&event->hw.period_left, left);
891 perf_counter_update_userpage(counter); 891 perf_event_update_userpage(event);
892 perf_enable(); 892 perf_enable();
893 local_irq_restore(flags); 893 local_irq_restore(flags);
894} 894}
@@ -901,29 +901,29 @@ struct pmu power_pmu = {
901}; 901};
902 902
903/* 903/*
904 * Return 1 if we might be able to put counter on a limited PMC, 904 * Return 1 if we might be able to put event on a limited PMC,
905 * or 0 if not. 905 * or 0 if not.
906 * A counter can only go on a limited PMC if it counts something 906 * A event can only go on a limited PMC if it counts something
907 * that a limited PMC can count, doesn't require interrupts, and 907 * that a limited PMC can count, doesn't require interrupts, and
908 * doesn't exclude any processor mode. 908 * doesn't exclude any processor mode.
909 */ 909 */
910static int can_go_on_limited_pmc(struct perf_counter *counter, u64 ev, 910static int can_go_on_limited_pmc(struct perf_event *event, u64 ev,
911 unsigned int flags) 911 unsigned int flags)
912{ 912{
913 int n; 913 int n;
914 u64 alt[MAX_EVENT_ALTERNATIVES]; 914 u64 alt[MAX_EVENT_ALTERNATIVES];
915 915
916 if (counter->attr.exclude_user 916 if (event->attr.exclude_user
917 || counter->attr.exclude_kernel 917 || event->attr.exclude_kernel
918 || counter->attr.exclude_hv 918 || event->attr.exclude_hv
919 || counter->attr.sample_period) 919 || event->attr.sample_period)
920 return 0; 920 return 0;
921 921
922 if (ppmu->limited_pmc_event(ev)) 922 if (ppmu->limited_pmc_event(ev))
923 return 1; 923 return 1;
924 924
925 /* 925 /*
926 * The requested event isn't on a limited PMC already; 926 * The requested event_id isn't on a limited PMC already;
927 * see if any alternative code goes on a limited PMC. 927 * see if any alternative code goes on a limited PMC.
928 */ 928 */
929 if (!ppmu->get_alternatives) 929 if (!ppmu->get_alternatives)
@@ -936,9 +936,9 @@ static int can_go_on_limited_pmc(struct perf_counter *counter, u64 ev,
936} 936}
937 937
938/* 938/*
939 * Find an alternative event that goes on a normal PMC, if possible, 939 * Find an alternative event_id that goes on a normal PMC, if possible,
940 * and return the event code, or 0 if there is no such alternative. 940 * and return the event_id code, or 0 if there is no such alternative.
941 * (Note: event code 0 is "don't count" on all machines.) 941 * (Note: event_id code 0 is "don't count" on all machines.)
942 */ 942 */
943static u64 normal_pmc_alternative(u64 ev, unsigned long flags) 943static u64 normal_pmc_alternative(u64 ev, unsigned long flags)
944{ 944{
@@ -952,26 +952,26 @@ static u64 normal_pmc_alternative(u64 ev, unsigned long flags)
952 return alt[0]; 952 return alt[0];
953} 953}
954 954
955/* Number of perf_counters counting hardware events */ 955/* Number of perf_events counting hardware events */
956static atomic_t num_counters; 956static atomic_t num_events;
957/* Used to avoid races in calling reserve/release_pmc_hardware */ 957/* Used to avoid races in calling reserve/release_pmc_hardware */
958static DEFINE_MUTEX(pmc_reserve_mutex); 958static DEFINE_MUTEX(pmc_reserve_mutex);
959 959
960/* 960/*
961 * Release the PMU if this is the last perf_counter. 961 * Release the PMU if this is the last perf_event.
962 */ 962 */
963static void hw_perf_counter_destroy(struct perf_counter *counter) 963static void hw_perf_event_destroy(struct perf_event *event)
964{ 964{
965 if (!atomic_add_unless(&num_counters, -1, 1)) { 965 if (!atomic_add_unless(&num_events, -1, 1)) {
966 mutex_lock(&pmc_reserve_mutex); 966 mutex_lock(&pmc_reserve_mutex);
967 if (atomic_dec_return(&num_counters) == 0) 967 if (atomic_dec_return(&num_events) == 0)
968 release_pmc_hardware(); 968 release_pmc_hardware();
969 mutex_unlock(&pmc_reserve_mutex); 969 mutex_unlock(&pmc_reserve_mutex);
970 } 970 }
971} 971}
972 972
973/* 973/*
974 * Translate a generic cache event config to a raw event code. 974 * Translate a generic cache event_id config to a raw event_id code.
975 */ 975 */
976static int hw_perf_cache_event(u64 config, u64 *eventp) 976static int hw_perf_cache_event(u64 config, u64 *eventp)
977{ 977{
@@ -1000,39 +1000,39 @@ static int hw_perf_cache_event(u64 config, u64 *eventp)
1000 return 0; 1000 return 0;
1001} 1001}
1002 1002
1003const struct pmu *hw_perf_counter_init(struct perf_counter *counter) 1003const struct pmu *hw_perf_event_init(struct perf_event *event)
1004{ 1004{
1005 u64 ev; 1005 u64 ev;
1006 unsigned long flags; 1006 unsigned long flags;
1007 struct perf_counter *ctrs[MAX_HWCOUNTERS]; 1007 struct perf_event *ctrs[MAX_HWEVENTS];
1008 u64 events[MAX_HWCOUNTERS]; 1008 u64 events[MAX_HWEVENTS];
1009 unsigned int cflags[MAX_HWCOUNTERS]; 1009 unsigned int cflags[MAX_HWEVENTS];
1010 int n; 1010 int n;
1011 int err; 1011 int err;
1012 struct cpu_hw_counters *cpuhw; 1012 struct cpu_hw_events *cpuhw;
1013 1013
1014 if (!ppmu) 1014 if (!ppmu)
1015 return ERR_PTR(-ENXIO); 1015 return ERR_PTR(-ENXIO);
1016 switch (counter->attr.type) { 1016 switch (event->attr.type) {
1017 case PERF_TYPE_HARDWARE: 1017 case PERF_TYPE_HARDWARE:
1018 ev = counter->attr.config; 1018 ev = event->attr.config;
1019 if (ev >= ppmu->n_generic || ppmu->generic_events[ev] == 0) 1019 if (ev >= ppmu->n_generic || ppmu->generic_events[ev] == 0)
1020 return ERR_PTR(-EOPNOTSUPP); 1020 return ERR_PTR(-EOPNOTSUPP);
1021 ev = ppmu->generic_events[ev]; 1021 ev = ppmu->generic_events[ev];
1022 break; 1022 break;
1023 case PERF_TYPE_HW_CACHE: 1023 case PERF_TYPE_HW_CACHE:
1024 err = hw_perf_cache_event(counter->attr.config, &ev); 1024 err = hw_perf_cache_event(event->attr.config, &ev);
1025 if (err) 1025 if (err)
1026 return ERR_PTR(err); 1026 return ERR_PTR(err);
1027 break; 1027 break;
1028 case PERF_TYPE_RAW: 1028 case PERF_TYPE_RAW:
1029 ev = counter->attr.config; 1029 ev = event->attr.config;
1030 break; 1030 break;
1031 default: 1031 default:
1032 return ERR_PTR(-EINVAL); 1032 return ERR_PTR(-EINVAL);
1033 } 1033 }
1034 counter->hw.config_base = ev; 1034 event->hw.config_base = ev;
1035 counter->hw.idx = 0; 1035 event->hw.idx = 0;
1036 1036
1037 /* 1037 /*
1038 * If we are not running on a hypervisor, force the 1038 * If we are not running on a hypervisor, force the
@@ -1040,28 +1040,28 @@ const struct pmu *hw_perf_counter_init(struct perf_counter *counter)
1040 * the user set it to. 1040 * the user set it to.
1041 */ 1041 */
1042 if (!firmware_has_feature(FW_FEATURE_LPAR)) 1042 if (!firmware_has_feature(FW_FEATURE_LPAR))
1043 counter->attr.exclude_hv = 0; 1043 event->attr.exclude_hv = 0;
1044 1044
1045 /* 1045 /*
1046 * If this is a per-task counter, then we can use 1046 * If this is a per-task event, then we can use
1047 * PM_RUN_* events interchangeably with their non RUN_* 1047 * PM_RUN_* events interchangeably with their non RUN_*
1048 * equivalents, e.g. PM_RUN_CYC instead of PM_CYC. 1048 * equivalents, e.g. PM_RUN_CYC instead of PM_CYC.
1049 * XXX we should check if the task is an idle task. 1049 * XXX we should check if the task is an idle task.
1050 */ 1050 */
1051 flags = 0; 1051 flags = 0;
1052 if (counter->ctx->task) 1052 if (event->ctx->task)
1053 flags |= PPMU_ONLY_COUNT_RUN; 1053 flags |= PPMU_ONLY_COUNT_RUN;
1054 1054
1055 /* 1055 /*
1056 * If this machine has limited counters, check whether this 1056 * If this machine has limited events, check whether this
1057 * event could go on a limited counter. 1057 * event_id could go on a limited event.
1058 */ 1058 */
1059 if (ppmu->flags & PPMU_LIMITED_PMC5_6) { 1059 if (ppmu->flags & PPMU_LIMITED_PMC5_6) {
1060 if (can_go_on_limited_pmc(counter, ev, flags)) { 1060 if (can_go_on_limited_pmc(event, ev, flags)) {
1061 flags |= PPMU_LIMITED_PMC_OK; 1061 flags |= PPMU_LIMITED_PMC_OK;
1062 } else if (ppmu->limited_pmc_event(ev)) { 1062 } else if (ppmu->limited_pmc_event(ev)) {
1063 /* 1063 /*
1064 * The requested event is on a limited PMC, 1064 * The requested event_id is on a limited PMC,
1065 * but we can't use a limited PMC; see if any 1065 * but we can't use a limited PMC; see if any
1066 * alternative goes on a normal PMC. 1066 * alternative goes on a normal PMC.
1067 */ 1067 */
@@ -1073,50 +1073,50 @@ const struct pmu *hw_perf_counter_init(struct perf_counter *counter)
1073 1073
1074 /* 1074 /*
1075 * If this is in a group, check if it can go on with all the 1075 * If this is in a group, check if it can go on with all the
1076 * other hardware counters in the group. We assume the counter 1076 * other hardware events in the group. We assume the event
1077 * hasn't been linked into its leader's sibling list at this point. 1077 * hasn't been linked into its leader's sibling list at this point.
1078 */ 1078 */
1079 n = 0; 1079 n = 0;
1080 if (counter->group_leader != counter) { 1080 if (event->group_leader != event) {
1081 n = collect_events(counter->group_leader, ppmu->n_counter - 1, 1081 n = collect_events(event->group_leader, ppmu->n_counter - 1,
1082 ctrs, events, cflags); 1082 ctrs, events, cflags);
1083 if (n < 0) 1083 if (n < 0)
1084 return ERR_PTR(-EINVAL); 1084 return ERR_PTR(-EINVAL);
1085 } 1085 }
1086 events[n] = ev; 1086 events[n] = ev;
1087 ctrs[n] = counter; 1087 ctrs[n] = event;
1088 cflags[n] = flags; 1088 cflags[n] = flags;
1089 if (check_excludes(ctrs, cflags, n, 1)) 1089 if (check_excludes(ctrs, cflags, n, 1))
1090 return ERR_PTR(-EINVAL); 1090 return ERR_PTR(-EINVAL);
1091 1091
1092 cpuhw = &get_cpu_var(cpu_hw_counters); 1092 cpuhw = &get_cpu_var(cpu_hw_events);
1093 err = power_check_constraints(cpuhw, events, cflags, n + 1); 1093 err = power_check_constraints(cpuhw, events, cflags, n + 1);
1094 put_cpu_var(cpu_hw_counters); 1094 put_cpu_var(cpu_hw_events);
1095 if (err) 1095 if (err)
1096 return ERR_PTR(-EINVAL); 1096 return ERR_PTR(-EINVAL);
1097 1097
1098 counter->hw.config = events[n]; 1098 event->hw.config = events[n];
1099 counter->hw.counter_base = cflags[n]; 1099 event->hw.event_base = cflags[n];
1100 counter->hw.last_period = counter->hw.sample_period; 1100 event->hw.last_period = event->hw.sample_period;
1101 atomic64_set(&counter->hw.period_left, counter->hw.last_period); 1101 atomic64_set(&event->hw.period_left, event->hw.last_period);
1102 1102
1103 /* 1103 /*
1104 * See if we need to reserve the PMU. 1104 * See if we need to reserve the PMU.
1105 * If no counters are currently in use, then we have to take a 1105 * If no events are currently in use, then we have to take a
1106 * mutex to ensure that we don't race with another task doing 1106 * mutex to ensure that we don't race with another task doing
1107 * reserve_pmc_hardware or release_pmc_hardware. 1107 * reserve_pmc_hardware or release_pmc_hardware.
1108 */ 1108 */
1109 err = 0; 1109 err = 0;
1110 if (!atomic_inc_not_zero(&num_counters)) { 1110 if (!atomic_inc_not_zero(&num_events)) {
1111 mutex_lock(&pmc_reserve_mutex); 1111 mutex_lock(&pmc_reserve_mutex);
1112 if (atomic_read(&num_counters) == 0 && 1112 if (atomic_read(&num_events) == 0 &&
1113 reserve_pmc_hardware(perf_counter_interrupt)) 1113 reserve_pmc_hardware(perf_event_interrupt))
1114 err = -EBUSY; 1114 err = -EBUSY;
1115 else 1115 else
1116 atomic_inc(&num_counters); 1116 atomic_inc(&num_events);
1117 mutex_unlock(&pmc_reserve_mutex); 1117 mutex_unlock(&pmc_reserve_mutex);
1118 } 1118 }
1119 counter->destroy = hw_perf_counter_destroy; 1119 event->destroy = hw_perf_event_destroy;
1120 1120
1121 if (err) 1121 if (err)
1122 return ERR_PTR(err); 1122 return ERR_PTR(err);
@@ -1128,24 +1128,24 @@ const struct pmu *hw_perf_counter_init(struct perf_counter *counter)
1128 * things if requested. Note that interrupts are hard-disabled 1128 * things if requested. Note that interrupts are hard-disabled
1129 * here so there is no possibility of being interrupted. 1129 * here so there is no possibility of being interrupted.
1130 */ 1130 */
1131static void record_and_restart(struct perf_counter *counter, unsigned long val, 1131static void record_and_restart(struct perf_event *event, unsigned long val,
1132 struct pt_regs *regs, int nmi) 1132 struct pt_regs *regs, int nmi)
1133{ 1133{
1134 u64 period = counter->hw.sample_period; 1134 u64 period = event->hw.sample_period;
1135 s64 prev, delta, left; 1135 s64 prev, delta, left;
1136 int record = 0; 1136 int record = 0;
1137 1137
1138 /* we don't have to worry about interrupts here */ 1138 /* we don't have to worry about interrupts here */
1139 prev = atomic64_read(&counter->hw.prev_count); 1139 prev = atomic64_read(&event->hw.prev_count);
1140 delta = (val - prev) & 0xfffffffful; 1140 delta = (val - prev) & 0xfffffffful;
1141 atomic64_add(delta, &counter->count); 1141 atomic64_add(delta, &event->count);
1142 1142
1143 /* 1143 /*
1144 * See if the total period for this counter has expired, 1144 * See if the total period for this event has expired,
1145 * and update for the next period. 1145 * and update for the next period.
1146 */ 1146 */
1147 val = 0; 1147 val = 0;
1148 left = atomic64_read(&counter->hw.period_left) - delta; 1148 left = atomic64_read(&event->hw.period_left) - delta;
1149 if (period) { 1149 if (period) {
1150 if (left <= 0) { 1150 if (left <= 0) {
1151 left += period; 1151 left += period;
@@ -1162,20 +1162,19 @@ static void record_and_restart(struct perf_counter *counter, unsigned long val,
1162 */ 1162 */
1163 if (record) { 1163 if (record) {
1164 struct perf_sample_data data = { 1164 struct perf_sample_data data = {
1165 .regs = regs,
1166 .addr = 0, 1165 .addr = 0,
1167 .period = counter->hw.last_period, 1166 .period = event->hw.last_period,
1168 }; 1167 };
1169 1168
1170 if (counter->attr.sample_type & PERF_SAMPLE_ADDR) 1169 if (event->attr.sample_type & PERF_SAMPLE_ADDR)
1171 perf_get_data_addr(regs, &data.addr); 1170 perf_get_data_addr(regs, &data.addr);
1172 1171
1173 if (perf_counter_overflow(counter, nmi, &data)) { 1172 if (perf_event_overflow(event, nmi, &data, regs)) {
1174 /* 1173 /*
1175 * Interrupts are coming too fast - throttle them 1174 * Interrupts are coming too fast - throttle them
1176 * by setting the counter to 0, so it will be 1175 * by setting the event to 0, so it will be
1177 * at least 2^30 cycles until the next interrupt 1176 * at least 2^30 cycles until the next interrupt
1178 * (assuming each counter counts at most 2 counts 1177 * (assuming each event counts at most 2 counts
1179 * per cycle). 1178 * per cycle).
1180 */ 1179 */
1181 val = 0; 1180 val = 0;
@@ -1183,15 +1182,15 @@ static void record_and_restart(struct perf_counter *counter, unsigned long val,
1183 } 1182 }
1184 } 1183 }
1185 1184
1186 write_pmc(counter->hw.idx, val); 1185 write_pmc(event->hw.idx, val);
1187 atomic64_set(&counter->hw.prev_count, val); 1186 atomic64_set(&event->hw.prev_count, val);
1188 atomic64_set(&counter->hw.period_left, left); 1187 atomic64_set(&event->hw.period_left, left);
1189 perf_counter_update_userpage(counter); 1188 perf_event_update_userpage(event);
1190} 1189}
1191 1190
1192/* 1191/*
1193 * Called from generic code to get the misc flags (i.e. processor mode) 1192 * Called from generic code to get the misc flags (i.e. processor mode)
1194 * for an event. 1193 * for an event_id.
1195 */ 1194 */
1196unsigned long perf_misc_flags(struct pt_regs *regs) 1195unsigned long perf_misc_flags(struct pt_regs *regs)
1197{ 1196{
@@ -1199,13 +1198,13 @@ unsigned long perf_misc_flags(struct pt_regs *regs)
1199 1198
1200 if (flags) 1199 if (flags)
1201 return flags; 1200 return flags;
1202 return user_mode(regs) ? PERF_EVENT_MISC_USER : 1201 return user_mode(regs) ? PERF_RECORD_MISC_USER :
1203 PERF_EVENT_MISC_KERNEL; 1202 PERF_RECORD_MISC_KERNEL;
1204} 1203}
1205 1204
1206/* 1205/*
1207 * Called from generic code to get the instruction pointer 1206 * Called from generic code to get the instruction pointer
1208 * for an event. 1207 * for an event_id.
1209 */ 1208 */
1210unsigned long perf_instruction_pointer(struct pt_regs *regs) 1209unsigned long perf_instruction_pointer(struct pt_regs *regs)
1211{ 1210{
@@ -1221,11 +1220,11 @@ unsigned long perf_instruction_pointer(struct pt_regs *regs)
1221/* 1220/*
1222 * Performance monitor interrupt stuff 1221 * Performance monitor interrupt stuff
1223 */ 1222 */
1224static void perf_counter_interrupt(struct pt_regs *regs) 1223static void perf_event_interrupt(struct pt_regs *regs)
1225{ 1224{
1226 int i; 1225 int i;
1227 struct cpu_hw_counters *cpuhw = &__get_cpu_var(cpu_hw_counters); 1226 struct cpu_hw_events *cpuhw = &__get_cpu_var(cpu_hw_events);
1228 struct perf_counter *counter; 1227 struct perf_event *event;
1229 unsigned long val; 1228 unsigned long val;
1230 int found = 0; 1229 int found = 0;
1231 int nmi; 1230 int nmi;
@@ -1242,21 +1241,21 @@ static void perf_counter_interrupt(struct pt_regs *regs)
1242 else 1241 else
1243 irq_enter(); 1242 irq_enter();
1244 1243
1245 for (i = 0; i < cpuhw->n_counters; ++i) { 1244 for (i = 0; i < cpuhw->n_events; ++i) {
1246 counter = cpuhw->counter[i]; 1245 event = cpuhw->event[i];
1247 if (!counter->hw.idx || is_limited_pmc(counter->hw.idx)) 1246 if (!event->hw.idx || is_limited_pmc(event->hw.idx))
1248 continue; 1247 continue;
1249 val = read_pmc(counter->hw.idx); 1248 val = read_pmc(event->hw.idx);
1250 if ((int)val < 0) { 1249 if ((int)val < 0) {
1251 /* counter has overflowed */ 1250 /* event has overflowed */
1252 found = 1; 1251 found = 1;
1253 record_and_restart(counter, val, regs, nmi); 1252 record_and_restart(event, val, regs, nmi);
1254 } 1253 }
1255 } 1254 }
1256 1255
1257 /* 1256 /*
1258 * In case we didn't find and reset the counter that caused 1257 * In case we didn't find and reset the event that caused
1259 * the interrupt, scan all counters and reset any that are 1258 * the interrupt, scan all events and reset any that are
1260 * negative, to avoid getting continual interrupts. 1259 * negative, to avoid getting continual interrupts.
1261 * Any that we processed in the previous loop will not be negative. 1260 * Any that we processed in the previous loop will not be negative.
1262 */ 1261 */
@@ -1274,7 +1273,7 @@ static void perf_counter_interrupt(struct pt_regs *regs)
1274 * Reset MMCR0 to its normal value. This will set PMXE and 1273 * Reset MMCR0 to its normal value. This will set PMXE and
1275 * clear FC (freeze counters) and PMAO (perf mon alert occurred) 1274 * clear FC (freeze counters) and PMAO (perf mon alert occurred)
1276 * and thus allow interrupts to occur again. 1275 * and thus allow interrupts to occur again.
1277 * XXX might want to use MSR.PM to keep the counters frozen until 1276 * XXX might want to use MSR.PM to keep the events frozen until
1278 * we get back out of this interrupt. 1277 * we get back out of this interrupt.
1279 */ 1278 */
1280 write_mmcr0(cpuhw, cpuhw->mmcr[0]); 1279 write_mmcr0(cpuhw, cpuhw->mmcr[0]);
@@ -1285,9 +1284,9 @@ static void perf_counter_interrupt(struct pt_regs *regs)
1285 irq_exit(); 1284 irq_exit();
1286} 1285}
1287 1286
1288void hw_perf_counter_setup(int cpu) 1287void hw_perf_event_setup(int cpu)
1289{ 1288{
1290 struct cpu_hw_counters *cpuhw = &per_cpu(cpu_hw_counters, cpu); 1289 struct cpu_hw_events *cpuhw = &per_cpu(cpu_hw_events, cpu);
1291 1290
1292 if (!ppmu) 1291 if (!ppmu)
1293 return; 1292 return;
@@ -1309,7 +1308,7 @@ int register_power_pmu(struct power_pmu *pmu)
1309 * Use FCHV to ignore kernel events if MSR.HV is set. 1308 * Use FCHV to ignore kernel events if MSR.HV is set.
1310 */ 1309 */
1311 if (mfmsr() & MSR_HV) 1310 if (mfmsr() & MSR_HV)
1312 freeze_counters_kernel = MMCR0_FCHV; 1311 freeze_events_kernel = MMCR0_FCHV;
1313#endif /* CONFIG_PPC64 */ 1312#endif /* CONFIG_PPC64 */
1314 1313
1315 return 0; 1314 return 0;
diff --git a/arch/powerpc/kernel/power4-pmu.c b/arch/powerpc/kernel/power4-pmu.c
index 3c90a3d9173e..2a361cdda635 100644
--- a/arch/powerpc/kernel/power4-pmu.c
+++ b/arch/powerpc/kernel/power4-pmu.c
@@ -9,7 +9,7 @@
9 * 2 of the License, or (at your option) any later version. 9 * 2 of the License, or (at your option) any later version.
10 */ 10 */
11#include <linux/kernel.h> 11#include <linux/kernel.h>
12#include <linux/perf_counter.h> 12#include <linux/perf_event.h>
13#include <linux/string.h> 13#include <linux/string.h>
14#include <asm/reg.h> 14#include <asm/reg.h>
15#include <asm/cputable.h> 15#include <asm/cputable.h>
diff --git a/arch/powerpc/kernel/power5+-pmu.c b/arch/powerpc/kernel/power5+-pmu.c
index 31918af3e355..0f4c1c73a6ad 100644
--- a/arch/powerpc/kernel/power5+-pmu.c
+++ b/arch/powerpc/kernel/power5+-pmu.c
@@ -9,7 +9,7 @@
9 * 2 of the License, or (at your option) any later version. 9 * 2 of the License, or (at your option) any later version.
10 */ 10 */
11#include <linux/kernel.h> 11#include <linux/kernel.h>
12#include <linux/perf_counter.h> 12#include <linux/perf_event.h>
13#include <linux/string.h> 13#include <linux/string.h>
14#include <asm/reg.h> 14#include <asm/reg.h>
15#include <asm/cputable.h> 15#include <asm/cputable.h>
diff --git a/arch/powerpc/kernel/power5-pmu.c b/arch/powerpc/kernel/power5-pmu.c
index 867f6f663963..c351b3a57fbb 100644
--- a/arch/powerpc/kernel/power5-pmu.c
+++ b/arch/powerpc/kernel/power5-pmu.c
@@ -9,7 +9,7 @@
9 * 2 of the License, or (at your option) any later version. 9 * 2 of the License, or (at your option) any later version.
10 */ 10 */
11#include <linux/kernel.h> 11#include <linux/kernel.h>
12#include <linux/perf_counter.h> 12#include <linux/perf_event.h>
13#include <linux/string.h> 13#include <linux/string.h>
14#include <asm/reg.h> 14#include <asm/reg.h>
15#include <asm/cputable.h> 15#include <asm/cputable.h>
diff --git a/arch/powerpc/kernel/power6-pmu.c b/arch/powerpc/kernel/power6-pmu.c
index fa21890531da..ca399ba5034c 100644
--- a/arch/powerpc/kernel/power6-pmu.c
+++ b/arch/powerpc/kernel/power6-pmu.c
@@ -9,7 +9,7 @@
9 * 2 of the License, or (at your option) any later version. 9 * 2 of the License, or (at your option) any later version.
10 */ 10 */
11#include <linux/kernel.h> 11#include <linux/kernel.h>
12#include <linux/perf_counter.h> 12#include <linux/perf_event.h>
13#include <linux/string.h> 13#include <linux/string.h>
14#include <asm/reg.h> 14#include <asm/reg.h>
15#include <asm/cputable.h> 15#include <asm/cputable.h>
diff --git a/arch/powerpc/kernel/power7-pmu.c b/arch/powerpc/kernel/power7-pmu.c
index 018d094d92f9..28a4daacdc02 100644
--- a/arch/powerpc/kernel/power7-pmu.c
+++ b/arch/powerpc/kernel/power7-pmu.c
@@ -9,7 +9,7 @@
9 * 2 of the License, or (at your option) any later version. 9 * 2 of the License, or (at your option) any later version.
10 */ 10 */
11#include <linux/kernel.h> 11#include <linux/kernel.h>
12#include <linux/perf_counter.h> 12#include <linux/perf_event.h>
13#include <linux/string.h> 13#include <linux/string.h>
14#include <asm/reg.h> 14#include <asm/reg.h>
15#include <asm/cputable.h> 15#include <asm/cputable.h>
diff --git a/arch/powerpc/kernel/ppc970-pmu.c b/arch/powerpc/kernel/ppc970-pmu.c
index 75dccb71a043..479574413a93 100644
--- a/arch/powerpc/kernel/ppc970-pmu.c
+++ b/arch/powerpc/kernel/ppc970-pmu.c
@@ -9,7 +9,7 @@
9 * 2 of the License, or (at your option) any later version. 9 * 2 of the License, or (at your option) any later version.
10 */ 10 */
11#include <linux/string.h> 11#include <linux/string.h>
12#include <linux/perf_counter.h> 12#include <linux/perf_event.h>
13#include <asm/reg.h> 13#include <asm/reg.h>
14#include <asm/cputable.h> 14#include <asm/cputable.h>
15 15
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index 0a3216433051..1168c5f440ab 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -1165,7 +1165,22 @@ static inline unsigned long brk_rnd(void)
1165 1165
1166unsigned long arch_randomize_brk(struct mm_struct *mm) 1166unsigned long arch_randomize_brk(struct mm_struct *mm)
1167{ 1167{
1168 unsigned long ret = PAGE_ALIGN(mm->brk + brk_rnd()); 1168 unsigned long base = mm->brk;
1169 unsigned long ret;
1170
1171#ifdef CONFIG_PPC64
1172 /*
1173 * If we are using 1TB segments and we are allowed to randomise
1174 * the heap, we can put it above 1TB so it is backed by a 1TB
1175 * segment. Otherwise the heap will be in the bottom 1TB
1176 * which always uses 256MB segments and this may result in a
1177 * performance penalty.
1178 */
1179 if (!is_32bit_task() && (mmu_highuser_ssize == MMU_SEGSIZE_1T))
1180 base = max_t(unsigned long, mm->brk, 1UL << SID_SHIFT_1T);
1181#endif
1182
1183 ret = PAGE_ALIGN(base + brk_rnd());
1169 1184
1170 if (ret < mm->brk) 1185 if (ret < mm->brk)
1171 return mm->brk; 1186 return mm->brk;
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index 864334b337a3..bafac2e41ae1 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -800,7 +800,7 @@ static void __init prom_send_capabilities(void)
800 root = call_prom("open", 1, 1, ADDR("/")); 800 root = call_prom("open", 1, 1, ADDR("/"));
801 if (root != 0) { 801 if (root != 0) {
802 /* try calling the ibm,client-architecture-support method */ 802 /* try calling the ibm,client-architecture-support method */
803 prom_printf("Calling ibm,client-architecture..."); 803 prom_printf("Calling ibm,client-architecture-support...");
804 if (call_prom_ret("call-method", 3, 2, &ret, 804 if (call_prom_ret("call-method", 3, 2, &ret,
805 ADDR("ibm,client-architecture-support"), 805 ADDR("ibm,client-architecture-support"),
806 root, 806 root,
@@ -814,6 +814,7 @@ static void __init prom_send_capabilities(void)
814 return; 814 return;
815 } 815 }
816 call_prom("close", 1, 0, root); 816 call_prom("close", 1, 0, root);
817 prom_printf(" not implemented\n");
817 } 818 }
818 819
819 /* no ibm,client-architecture-support call, try the old way */ 820 /* no ibm,client-architecture-support call, try the old way */
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 02fed27af7f6..4271f7a655a3 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -24,7 +24,6 @@
24#include <linux/seq_file.h> 24#include <linux/seq_file.h>
25#include <linux/ioport.h> 25#include <linux/ioport.h>
26#include <linux/console.h> 26#include <linux/console.h>
27#include <linux/utsname.h>
28#include <linux/screen_info.h> 27#include <linux/screen_info.h>
29#include <linux/root_dev.h> 28#include <linux/root_dev.h>
30#include <linux/notifier.h> 29#include <linux/notifier.h>
@@ -328,7 +327,7 @@ static void c_stop(struct seq_file *m, void *v)
328{ 327{
329} 328}
330 329
331struct seq_operations cpuinfo_op = { 330const struct seq_operations cpuinfo_op = {
332 .start =c_start, 331 .start =c_start,
333 .next = c_next, 332 .next = c_next,
334 .stop = c_stop, 333 .stop = c_stop,
@@ -432,9 +431,9 @@ void __init smp_setup_cpu_maps(void)
432 for (j = 0; j < nthreads && cpu < NR_CPUS; j++) { 431 for (j = 0; j < nthreads && cpu < NR_CPUS; j++) {
433 DBG(" thread %d -> cpu %d (hard id %d)\n", 432 DBG(" thread %d -> cpu %d (hard id %d)\n",
434 j, cpu, intserv[j]); 433 j, cpu, intserv[j]);
435 cpu_set(cpu, cpu_present_map); 434 set_cpu_present(cpu, true);
436 set_hard_smp_processor_id(cpu, intserv[j]); 435 set_hard_smp_processor_id(cpu, intserv[j]);
437 cpu_set(cpu, cpu_possible_map); 436 set_cpu_possible(cpu, true);
438 cpu++; 437 cpu++;
439 } 438 }
440 } 439 }
@@ -480,7 +479,7 @@ void __init smp_setup_cpu_maps(void)
480 maxcpus); 479 maxcpus);
481 480
482 for (cpu = 0; cpu < maxcpus; cpu++) 481 for (cpu = 0; cpu < maxcpus; cpu++)
483 cpu_set(cpu, cpu_possible_map); 482 set_cpu_possible(cpu, true);
484 out: 483 out:
485 of_node_put(dn); 484 of_node_put(dn);
486 } 485 }
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index d387b3937ccc..9b86a74d2815 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -189,11 +189,11 @@ void arch_send_call_function_single_ipi(int cpu)
189 smp_ops->message_pass(cpu, PPC_MSG_CALL_FUNC_SINGLE); 189 smp_ops->message_pass(cpu, PPC_MSG_CALL_FUNC_SINGLE);
190} 190}
191 191
192void arch_send_call_function_ipi(cpumask_t mask) 192void arch_send_call_function_ipi_mask(const struct cpumask *mask)
193{ 193{
194 unsigned int cpu; 194 unsigned int cpu;
195 195
196 for_each_cpu_mask(cpu, mask) 196 for_each_cpu(cpu, mask)
197 smp_ops->message_pass(cpu, PPC_MSG_CALL_FUNCTION); 197 smp_ops->message_pass(cpu, PPC_MSG_CALL_FUNCTION);
198} 198}
199 199
@@ -287,7 +287,7 @@ void __devinit smp_prepare_boot_cpu(void)
287{ 287{
288 BUG_ON(smp_processor_id() != boot_cpuid); 288 BUG_ON(smp_processor_id() != boot_cpuid);
289 289
290 cpu_set(boot_cpuid, cpu_online_map); 290 set_cpu_online(boot_cpuid, true);
291 cpu_set(boot_cpuid, per_cpu(cpu_sibling_map, boot_cpuid)); 291 cpu_set(boot_cpuid, per_cpu(cpu_sibling_map, boot_cpuid));
292 cpu_set(boot_cpuid, per_cpu(cpu_core_map, boot_cpuid)); 292 cpu_set(boot_cpuid, per_cpu(cpu_core_map, boot_cpuid));
293#ifdef CONFIG_PPC64 293#ifdef CONFIG_PPC64
@@ -307,7 +307,7 @@ int generic_cpu_disable(void)
307 if (cpu == boot_cpuid) 307 if (cpu == boot_cpuid)
308 return -EBUSY; 308 return -EBUSY;
309 309
310 cpu_clear(cpu, cpu_online_map); 310 set_cpu_online(cpu, false);
311#ifdef CONFIG_PPC64 311#ifdef CONFIG_PPC64
312 vdso_data->processorCount--; 312 vdso_data->processorCount--;
313 fixup_irqs(cpu_online_map); 313 fixup_irqs(cpu_online_map);
@@ -361,7 +361,7 @@ void generic_mach_cpu_die(void)
361 smp_wmb(); 361 smp_wmb();
362 while (__get_cpu_var(cpu_state) != CPU_UP_PREPARE) 362 while (__get_cpu_var(cpu_state) != CPU_UP_PREPARE)
363 cpu_relax(); 363 cpu_relax();
364 cpu_set(cpu, cpu_online_map); 364 set_cpu_online(cpu, true);
365 local_irq_enable(); 365 local_irq_enable();
366} 366}
367#endif 367#endif
@@ -508,7 +508,7 @@ int __devinit start_secondary(void *unused)
508 508
509 ipi_call_lock(); 509 ipi_call_lock();
510 notify_cpu_starting(cpu); 510 notify_cpu_starting(cpu);
511 cpu_set(cpu, cpu_online_map); 511 set_cpu_online(cpu, true);
512 /* Update sibling maps */ 512 /* Update sibling maps */
513 base = cpu_first_thread_in_core(cpu); 513 base = cpu_first_thread_in_core(cpu);
514 for (i = 0; i < threads_per_core; i++) { 514 for (i = 0; i < threads_per_core; i++) {
diff --git a/arch/powerpc/kernel/sys_ppc32.c b/arch/powerpc/kernel/sys_ppc32.c
index 1cc5e9e5da96..b97c2d67f4ac 100644
--- a/arch/powerpc/kernel/sys_ppc32.c
+++ b/arch/powerpc/kernel/sys_ppc32.c
@@ -22,7 +22,6 @@
22#include <linux/signal.h> 22#include <linux/signal.h>
23#include <linux/resource.h> 23#include <linux/resource.h>
24#include <linux/times.h> 24#include <linux/times.h>
25#include <linux/utsname.h>
26#include <linux/smp.h> 25#include <linux/smp.h>
27#include <linux/smp_lock.h> 26#include <linux/smp_lock.h>
28#include <linux/sem.h> 27#include <linux/sem.h>
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index a180b4f9a4f6..92dc844299b6 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -53,7 +53,7 @@
53#include <linux/posix-timers.h> 53#include <linux/posix-timers.h>
54#include <linux/irq.h> 54#include <linux/irq.h>
55#include <linux/delay.h> 55#include <linux/delay.h>
56#include <linux/perf_counter.h> 56#include <linux/perf_event.h>
57 57
58#include <asm/io.h> 58#include <asm/io.h>
59#include <asm/processor.h> 59#include <asm/processor.h>
@@ -193,6 +193,8 @@ EXPORT_SYMBOL(__cputime_clockt_factor);
193DEFINE_PER_CPU(unsigned long, cputime_last_delta); 193DEFINE_PER_CPU(unsigned long, cputime_last_delta);
194DEFINE_PER_CPU(unsigned long, cputime_scaled_last_delta); 194DEFINE_PER_CPU(unsigned long, cputime_scaled_last_delta);
195 195
196cputime_t cputime_one_jiffy;
197
196static void calc_cputime_factors(void) 198static void calc_cputime_factors(void)
197{ 199{
198 struct div_result res; 200 struct div_result res;
@@ -501,6 +503,7 @@ static int __init iSeries_tb_recal(void)
501 tb_to_xs = divres.result_low; 503 tb_to_xs = divres.result_low;
502 vdso_data->tb_ticks_per_sec = tb_ticks_per_sec; 504 vdso_data->tb_ticks_per_sec = tb_ticks_per_sec;
503 vdso_data->tb_to_xs = tb_to_xs; 505 vdso_data->tb_to_xs = tb_to_xs;
506 setup_cputime_one_jiffy();
504 } 507 }
505 else { 508 else {
506 printk( "Titan recalibrate: FAILED (difference > 4 percent)\n" 509 printk( "Titan recalibrate: FAILED (difference > 4 percent)\n"
@@ -527,25 +530,25 @@ void __init iSeries_time_init_early(void)
527} 530}
528#endif /* CONFIG_PPC_ISERIES */ 531#endif /* CONFIG_PPC_ISERIES */
529 532
530#if defined(CONFIG_PERF_COUNTERS) && defined(CONFIG_PPC32) 533#if defined(CONFIG_PERF_EVENTS) && defined(CONFIG_PPC32)
531DEFINE_PER_CPU(u8, perf_counter_pending); 534DEFINE_PER_CPU(u8, perf_event_pending);
532 535
533void set_perf_counter_pending(void) 536void set_perf_event_pending(void)
534{ 537{
535 get_cpu_var(perf_counter_pending) = 1; 538 get_cpu_var(perf_event_pending) = 1;
536 set_dec(1); 539 set_dec(1);
537 put_cpu_var(perf_counter_pending); 540 put_cpu_var(perf_event_pending);
538} 541}
539 542
540#define test_perf_counter_pending() __get_cpu_var(perf_counter_pending) 543#define test_perf_event_pending() __get_cpu_var(perf_event_pending)
541#define clear_perf_counter_pending() __get_cpu_var(perf_counter_pending) = 0 544#define clear_perf_event_pending() __get_cpu_var(perf_event_pending) = 0
542 545
543#else /* CONFIG_PERF_COUNTERS && CONFIG_PPC32 */ 546#else /* CONFIG_PERF_EVENTS && CONFIG_PPC32 */
544 547
545#define test_perf_counter_pending() 0 548#define test_perf_event_pending() 0
546#define clear_perf_counter_pending() 549#define clear_perf_event_pending()
547 550
548#endif /* CONFIG_PERF_COUNTERS && CONFIG_PPC32 */ 551#endif /* CONFIG_PERF_EVENTS && CONFIG_PPC32 */
549 552
550/* 553/*
551 * For iSeries shared processors, we have to let the hypervisor 554 * For iSeries shared processors, we have to let the hypervisor
@@ -573,9 +576,9 @@ void timer_interrupt(struct pt_regs * regs)
573 set_dec(DECREMENTER_MAX); 576 set_dec(DECREMENTER_MAX);
574 577
575#ifdef CONFIG_PPC32 578#ifdef CONFIG_PPC32
576 if (test_perf_counter_pending()) { 579 if (test_perf_event_pending()) {
577 clear_perf_counter_pending(); 580 clear_perf_event_pending();
578 perf_counter_do_pending(); 581 perf_event_do_pending();
579 } 582 }
580 if (atomic_read(&ppc_n_lost_interrupts) != 0) 583 if (atomic_read(&ppc_n_lost_interrupts) != 0)
581 do_IRQ(regs); 584 do_IRQ(regs);
@@ -774,11 +777,12 @@ int update_persistent_clock(struct timespec now)
774 return ppc_md.set_rtc_time(&tm); 777 return ppc_md.set_rtc_time(&tm);
775} 778}
776 779
777unsigned long read_persistent_clock(void) 780void read_persistent_clock(struct timespec *ts)
778{ 781{
779 struct rtc_time tm; 782 struct rtc_time tm;
780 static int first = 1; 783 static int first = 1;
781 784
785 ts->tv_nsec = 0;
782 /* XXX this is a litle fragile but will work okay in the short term */ 786 /* XXX this is a litle fragile but will work okay in the short term */
783 if (first) { 787 if (first) {
784 first = 0; 788 first = 0;
@@ -786,14 +790,18 @@ unsigned long read_persistent_clock(void)
786 timezone_offset = ppc_md.time_init(); 790 timezone_offset = ppc_md.time_init();
787 791
788 /* get_boot_time() isn't guaranteed to be safe to call late */ 792 /* get_boot_time() isn't guaranteed to be safe to call late */
789 if (ppc_md.get_boot_time) 793 if (ppc_md.get_boot_time) {
790 return ppc_md.get_boot_time() -timezone_offset; 794 ts->tv_sec = ppc_md.get_boot_time() - timezone_offset;
795 return;
796 }
797 }
798 if (!ppc_md.get_rtc_time) {
799 ts->tv_sec = 0;
800 return;
791 } 801 }
792 if (!ppc_md.get_rtc_time)
793 return 0;
794 ppc_md.get_rtc_time(&tm); 802 ppc_md.get_rtc_time(&tm);
795 return mktime(tm.tm_year+1900, tm.tm_mon+1, tm.tm_mday, 803 ts->tv_sec = mktime(tm.tm_year+1900, tm.tm_mon+1, tm.tm_mday,
796 tm.tm_hour, tm.tm_min, tm.tm_sec); 804 tm.tm_hour, tm.tm_min, tm.tm_sec);
797} 805}
798 806
799/* clocksource code */ 807/* clocksource code */
@@ -955,6 +963,7 @@ void __init time_init(void)
955 tb_ticks_per_usec = ppc_tb_freq / 1000000; 963 tb_ticks_per_usec = ppc_tb_freq / 1000000;
956 tb_to_us = mulhwu_scale_factor(ppc_tb_freq, 1000000); 964 tb_to_us = mulhwu_scale_factor(ppc_tb_freq, 1000000);
957 calc_cputime_factors(); 965 calc_cputime_factors();
966 setup_cputime_one_jiffy();
958 967
959 /* 968 /*
960 * Calculate the length of each tick in ns. It will not be 969 * Calculate the length of each tick in ns. It will not be
diff --git a/arch/powerpc/kernel/udbg_16550.c b/arch/powerpc/kernel/udbg_16550.c
index acb74a17bbbf..b4b167b33643 100644
--- a/arch/powerpc/kernel/udbg_16550.c
+++ b/arch/powerpc/kernel/udbg_16550.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * udbg for for NS16550 compatable serial ports 2 * udbg for NS16550 compatable serial ports
3 * 3 *
4 * Copyright (C) 2001-2005 PPC 64 Team, IBM Corp 4 * Copyright (C) 2001-2005 PPC 64 Team, IBM Corp
5 * 5 *
diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c
index a0abce251d0a..94e2df3cae07 100644
--- a/arch/powerpc/kernel/vdso.c
+++ b/arch/powerpc/kernel/vdso.c
@@ -1,3 +1,4 @@
1
1/* 2/*
2 * Copyright (C) 2004 Benjamin Herrenschmidt, IBM Corp. 3 * Copyright (C) 2004 Benjamin Herrenschmidt, IBM Corp.
3 * <benh@kernel.crashing.org> 4 * <benh@kernel.crashing.org>
@@ -74,7 +75,7 @@ static int vdso_ready;
74static union { 75static union {
75 struct vdso_data data; 76 struct vdso_data data;
76 u8 page[PAGE_SIZE]; 77 u8 page[PAGE_SIZE];
77} vdso_data_store __attribute__((__section__(".data.page_aligned"))); 78} vdso_data_store __page_aligned_data;
78struct vdso_data *vdso_data = &vdso_data_store.data; 79struct vdso_data *vdso_data = &vdso_data_store.data;
79 80
80/* Format of the patch table */ 81/* Format of the patch table */
@@ -240,6 +241,13 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
240 } 241 }
241 242
242 /* 243 /*
244 * Put vDSO base into mm struct. We need to do this before calling
245 * install_special_mapping or the perf counter mmap tracking code
246 * will fail to recognise it as a vDSO (since arch_vma_name fails).
247 */
248 current->mm->context.vdso_base = vdso_base;
249
250 /*
243 * our vma flags don't have VM_WRITE so by default, the process isn't 251 * our vma flags don't have VM_WRITE so by default, the process isn't
244 * allowed to write those pages. 252 * allowed to write those pages.
245 * gdb can break that with ptrace interface, and thus trigger COW on 253 * gdb can break that with ptrace interface, and thus trigger COW on
@@ -259,11 +267,10 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
259 VM_MAYREAD|VM_MAYWRITE|VM_MAYEXEC| 267 VM_MAYREAD|VM_MAYWRITE|VM_MAYEXEC|
260 VM_ALWAYSDUMP, 268 VM_ALWAYSDUMP,
261 vdso_pagelist); 269 vdso_pagelist);
262 if (rc) 270 if (rc) {
271 current->mm->context.vdso_base = 0;
263 goto fail_mmapsem; 272 goto fail_mmapsem;
264 273 }
265 /* Put vDSO base into mm struct */
266 current->mm->context.vdso_base = vdso_base;
267 274
268 up_write(&mm->mmap_sem); 275 up_write(&mm->mmap_sem);
269 return 0; 276 return 0;
diff --git a/arch/powerpc/kernel/vdso32/Makefile b/arch/powerpc/kernel/vdso32/Makefile
index b54b81688132..51ead52141bd 100644
--- a/arch/powerpc/kernel/vdso32/Makefile
+++ b/arch/powerpc/kernel/vdso32/Makefile
@@ -16,7 +16,7 @@ GCOV_PROFILE := n
16 16
17EXTRA_CFLAGS := -shared -fno-common -fno-builtin 17EXTRA_CFLAGS := -shared -fno-common -fno-builtin
18EXTRA_CFLAGS += -nostdlib -Wl,-soname=linux-vdso32.so.1 \ 18EXTRA_CFLAGS += -nostdlib -Wl,-soname=linux-vdso32.so.1 \
19 $(call ld-option, -Wl$(comma)--hash-style=sysv) 19 $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
20EXTRA_AFLAGS := -D__VDSO32__ -s 20EXTRA_AFLAGS := -D__VDSO32__ -s
21 21
22obj-y += vdso32_wrapper.o 22obj-y += vdso32_wrapper.o
diff --git a/arch/powerpc/kernel/vdso32/vdso32_wrapper.S b/arch/powerpc/kernel/vdso32/vdso32_wrapper.S
index 556f0caa5d84..6e8f507ed32b 100644
--- a/arch/powerpc/kernel/vdso32/vdso32_wrapper.S
+++ b/arch/powerpc/kernel/vdso32/vdso32_wrapper.S
@@ -1,7 +1,8 @@
1#include <linux/init.h> 1#include <linux/init.h>
2#include <linux/linkage.h>
2#include <asm/page.h> 3#include <asm/page.h>
3 4
4 .section ".data.page_aligned" 5 __PAGE_ALIGNED_DATA
5 6
6 .globl vdso32_start, vdso32_end 7 .globl vdso32_start, vdso32_end
7 .balign PAGE_SIZE 8 .balign PAGE_SIZE
diff --git a/arch/powerpc/kernel/vdso64/Makefile b/arch/powerpc/kernel/vdso64/Makefile
index dd0c8e936775..79da65d44a2a 100644
--- a/arch/powerpc/kernel/vdso64/Makefile
+++ b/arch/powerpc/kernel/vdso64/Makefile
@@ -11,7 +11,7 @@ GCOV_PROFILE := n
11 11
12EXTRA_CFLAGS := -shared -fno-common -fno-builtin 12EXTRA_CFLAGS := -shared -fno-common -fno-builtin
13EXTRA_CFLAGS += -nostdlib -Wl,-soname=linux-vdso64.so.1 \ 13EXTRA_CFLAGS += -nostdlib -Wl,-soname=linux-vdso64.so.1 \
14 $(call ld-option, -Wl$(comma)--hash-style=sysv) 14 $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
15EXTRA_AFLAGS := -D__VDSO64__ -s 15EXTRA_AFLAGS := -D__VDSO64__ -s
16 16
17obj-y += vdso64_wrapper.o 17obj-y += vdso64_wrapper.o
diff --git a/arch/powerpc/kernel/vdso64/vdso64_wrapper.S b/arch/powerpc/kernel/vdso64/vdso64_wrapper.S
index 0529cb9e3b97..b8553d62b792 100644
--- a/arch/powerpc/kernel/vdso64/vdso64_wrapper.S
+++ b/arch/powerpc/kernel/vdso64/vdso64_wrapper.S
@@ -1,7 +1,8 @@
1#include <linux/init.h> 1#include <linux/init.h>
2#include <linux/linkage.h>
2#include <asm/page.h> 3#include <asm/page.h>
3 4
4 .section ".data.page_aligned" 5 __PAGE_ALIGNED_DATA
5 6
6 .globl vdso64_start, vdso64_end 7 .globl vdso64_start, vdso64_end
7 .balign PAGE_SIZE 8 .balign PAGE_SIZE
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c
index bc7b41edbdfc..77f64218abf3 100644
--- a/arch/powerpc/kernel/vio.c
+++ b/arch/powerpc/kernel/vio.c
@@ -1054,6 +1054,8 @@ static struct iommu_table *vio_build_iommu_table(struct vio_dev *dev)
1054 return NULL; 1054 return NULL;
1055 1055
1056 tbl = kmalloc(sizeof(*tbl), GFP_KERNEL); 1056 tbl = kmalloc(sizeof(*tbl), GFP_KERNEL);
1057 if (tbl == NULL)
1058 return NULL;
1057 1059
1058 of_parse_dma_window(dev->dev.archdata.of_node, dma_window, 1060 of_parse_dma_window(dev->dev.archdata.of_node, dma_window,
1059 &tbl->it_index, &offset, &size); 1061 &tbl->it_index, &offset, &size);
@@ -1233,7 +1235,7 @@ struct vio_dev *vio_register_device_node(struct device_node *of_node)
1233 vio_cmo_set_dma_ops(viodev); 1235 vio_cmo_set_dma_ops(viodev);
1234 else 1236 else
1235 viodev->dev.archdata.dma_ops = &dma_iommu_ops; 1237 viodev->dev.archdata.dma_ops = &dma_iommu_ops;
1236 viodev->dev.archdata.dma_data = vio_build_iommu_table(viodev); 1238 set_iommu_table_base(&viodev->dev, vio_build_iommu_table(viodev));
1237 set_dev_node(&viodev->dev, of_node_to_nid(of_node)); 1239 set_dev_node(&viodev->dev, of_node_to_nid(of_node));
1238 1240
1239 /* init generic 'struct device' fields: */ 1241 /* init generic 'struct device' fields: */
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
index 58da4070723d..f56429362a12 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -6,6 +6,7 @@
6#include <asm/page.h> 6#include <asm/page.h>
7#include <asm-generic/vmlinux.lds.h> 7#include <asm-generic/vmlinux.lds.h>
8#include <asm/cache.h> 8#include <asm/cache.h>
9#include <asm/thread_info.h>
9 10
10ENTRY(_stext) 11ENTRY(_stext)
11 12
@@ -71,12 +72,7 @@ SECTIONS
71 /* Read-only data */ 72 /* Read-only data */
72 RODATA 73 RODATA
73 74
74 /* Exception & bug tables */ 75 EXCEPTION_TABLE(0)
75 __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) {
76 __start___ex_table = .;
77 *(__ex_table)
78 __stop___ex_table = .;
79 }
80 76
81 NOTES :kernel :notes 77 NOTES :kernel :notes
82 78
@@ -93,12 +89,7 @@ SECTIONS
93 */ 89 */
94 . = ALIGN(PAGE_SIZE); 90 . = ALIGN(PAGE_SIZE);
95 __init_begin = .; 91 __init_begin = .;
96 92 INIT_TEXT_SECTION(PAGE_SIZE) :kernel
97 .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) {
98 _sinittext = .;
99 INIT_TEXT
100 _einittext = .;
101 } :kernel
102 93
103 /* .exit.text is discarded at runtime, not link time, 94 /* .exit.text is discarded at runtime, not link time,
104 * to deal with references from __bug_table 95 * to deal with references from __bug_table
@@ -122,23 +113,16 @@ SECTIONS
122#endif 113#endif
123 } 114 }
124 115
125 . = ALIGN(16);
126 .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) { 116 .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) {
127 __setup_start = .; 117 INIT_SETUP(16)
128 *(.init.setup)
129 __setup_end = .;
130 } 118 }
131 119
132 .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET) { 120 .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET) {
133 __initcall_start = .; 121 INIT_CALLS
134 INITCALLS 122 }
135 __initcall_end = .;
136 }
137 123
138 .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET) { 124 .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET) {
139 __con_initcall_start = .; 125 CON_INITCALL
140 *(.con_initcall.init)
141 __con_initcall_end = .;
142 } 126 }
143 127
144 SECURITY_INIT 128 SECURITY_INIT
@@ -169,14 +153,10 @@ SECTIONS
169 __stop___fw_ftr_fixup = .; 153 __stop___fw_ftr_fixup = .;
170 } 154 }
171#endif 155#endif
172#ifdef CONFIG_BLK_DEV_INITRD
173 . = ALIGN(PAGE_SIZE);
174 .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) { 156 .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) {
175 __initramfs_start = .; 157 INIT_RAM_FS
176 *(.init.ramfs)
177 __initramfs_end = .;
178 } 158 }
179#endif 159
180 PERCPU(PAGE_SIZE) 160 PERCPU(PAGE_SIZE)
181 161
182 . = ALIGN(8); 162 . = ALIGN(8);
@@ -240,36 +220,24 @@ SECTIONS
240#endif 220#endif
241 221
242 /* The initial task and kernel stack */ 222 /* The initial task and kernel stack */
243#ifdef CONFIG_PPC32
244 . = ALIGN(8192);
245#else
246 . = ALIGN(16384);
247#endif
248 .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) { 223 .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) {
249 *(.data.init_task) 224 INIT_TASK_DATA(THREAD_SIZE)
250 } 225 }
251 226
252 . = ALIGN(PAGE_SIZE);
253 .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) { 227 .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) {
254 *(.data.page_aligned) 228 PAGE_ALIGNED_DATA(PAGE_SIZE)
255 } 229 }
256 230
257 . = ALIGN(L1_CACHE_BYTES);
258 .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) { 231 .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) {
259 *(.data.cacheline_aligned) 232 CACHELINE_ALIGNED_DATA(L1_CACHE_BYTES)
260 } 233 }
261 234
262 . = ALIGN(L1_CACHE_BYTES);
263 .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET) { 235 .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET) {
264 *(.data.read_mostly) 236 READ_MOSTLY_DATA(L1_CACHE_BYTES)
265 } 237 }
266 238
267 . = ALIGN(PAGE_SIZE);
268 .data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) { 239 .data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) {
269 __nosave_begin = .; 240 NOSAVE_DATA
270 *(.data.nosave)
271 . = ALIGN(PAGE_SIZE);
272 __nosave_end = .;
273 } 241 }
274 242
275 . = ALIGN(PAGE_SIZE); 243 . = ALIGN(PAGE_SIZE);
@@ -280,14 +248,7 @@ SECTIONS
280 * And finally the bss 248 * And finally the bss
281 */ 249 */
282 250
283 .bss : AT(ADDR(.bss) - LOAD_OFFSET) { 251 BSS_SECTION(0, 0, 0)
284 __bss_start = .;
285 *(.sbss) *(.scommon)
286 *(.dynbss)
287 *(.bss)
288 *(COMMON)
289 __bss_stop = .;
290 }
291 252
292 . = ALIGN(PAGE_SIZE); 253 . = ALIGN(PAGE_SIZE);
293 _end = . ; 254 _end = . ;
diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c
index 830bef0a1131..e7dae82c1285 100644
--- a/arch/powerpc/mm/fault.c
+++ b/arch/powerpc/mm/fault.c
@@ -29,7 +29,7 @@
29#include <linux/module.h> 29#include <linux/module.h>
30#include <linux/kprobes.h> 30#include <linux/kprobes.h>
31#include <linux/kdebug.h> 31#include <linux/kdebug.h>
32#include <linux/perf_counter.h> 32#include <linux/perf_event.h>
33 33
34#include <asm/firmware.h> 34#include <asm/firmware.h>
35#include <asm/page.h> 35#include <asm/page.h>
@@ -171,7 +171,7 @@ int __kprobes do_page_fault(struct pt_regs *regs, unsigned long address,
171 die("Weird page fault", regs, SIGSEGV); 171 die("Weird page fault", regs, SIGSEGV);
172 } 172 }
173 173
174 perf_swcounter_event(PERF_COUNT_SW_PAGE_FAULTS, 1, 0, regs, address); 174 perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, 0, regs, address);
175 175
176 /* When running in the kernel we expect faults to occur only to 176 /* When running in the kernel we expect faults to occur only to
177 * addresses in user space. All other faults represent errors in the 177 * addresses in user space. All other faults represent errors in the
@@ -312,7 +312,7 @@ good_area:
312 } 312 }
313 if (ret & VM_FAULT_MAJOR) { 313 if (ret & VM_FAULT_MAJOR) {
314 current->maj_flt++; 314 current->maj_flt++;
315 perf_swcounter_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, 0, 315 perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, 0,
316 regs, address); 316 regs, address);
317#ifdef CONFIG_PPC_SMLPAR 317#ifdef CONFIG_PPC_SMLPAR
318 if (firmware_has_feature(FW_FEATURE_CMO)) { 318 if (firmware_has_feature(FW_FEATURE_CMO)) {
@@ -323,7 +323,7 @@ good_area:
323#endif 323#endif
324 } else { 324 } else {
325 current->min_flt++; 325 current->min_flt++;
326 perf_swcounter_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, 0, 326 perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, 0,
327 regs, address); 327 regs, address);
328 } 328 }
329 up_read(&mm->mmap_sem); 329 up_read(&mm->mmap_sem);
diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c
index 3ef5084b90ca..9ddcfb4dc139 100644
--- a/arch/powerpc/mm/init_32.c
+++ b/arch/powerpc/mm/init_32.c
@@ -242,39 +242,3 @@ void free_initrd_mem(unsigned long start, unsigned long end)
242} 242}
243#endif 243#endif
244 244
245#ifdef CONFIG_PROC_KCORE
246static struct kcore_list kcore_vmem;
247
248static int __init setup_kcore(void)
249{
250 int i;
251
252 for (i = 0; i < lmb.memory.cnt; i++) {
253 unsigned long base;
254 unsigned long size;
255 struct kcore_list *kcore_mem;
256
257 base = lmb.memory.region[i].base;
258 size = lmb.memory.region[i].size;
259
260 kcore_mem = kmalloc(sizeof(struct kcore_list), GFP_ATOMIC);
261 if (!kcore_mem)
262 panic("%s: kmalloc failed\n", __func__);
263
264 /* must stay under 32 bits */
265 if ( 0xfffffffful - (unsigned long)__va(base) < size) {
266 size = 0xfffffffful - (unsigned long)(__va(base));
267 printk(KERN_DEBUG "setup_kcore: restrict size=%lx\n",
268 size);
269 }
270
271 kclist_add(kcore_mem, __va(base), size);
272 }
273
274 kclist_add(&kcore_vmem, (void *)VMALLOC_START,
275 VMALLOC_END-VMALLOC_START);
276
277 return 0;
278}
279module_init(setup_kcore);
280#endif
diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c
index 31582329cd67..335c578b9cc3 100644
--- a/arch/powerpc/mm/init_64.c
+++ b/arch/powerpc/mm/init_64.c
@@ -109,35 +109,6 @@ void free_initrd_mem(unsigned long start, unsigned long end)
109} 109}
110#endif 110#endif
111 111
112#ifdef CONFIG_PROC_KCORE
113static struct kcore_list kcore_vmem;
114
115static int __init setup_kcore(void)
116{
117 int i;
118
119 for (i=0; i < lmb.memory.cnt; i++) {
120 unsigned long base, size;
121 struct kcore_list *kcore_mem;
122
123 base = lmb.memory.region[i].base;
124 size = lmb.memory.region[i].size;
125
126 /* GFP_ATOMIC to avoid might_sleep warnings during boot */
127 kcore_mem = kmalloc(sizeof(struct kcore_list), GFP_ATOMIC);
128 if (!kcore_mem)
129 panic("%s: kmalloc failed\n", __func__);
130
131 kclist_add(kcore_mem, __va(base), size);
132 }
133
134 kclist_add(&kcore_vmem, (void *)VMALLOC_START, VMALLOC_END-VMALLOC_START);
135
136 return 0;
137}
138module_init(setup_kcore);
139#endif
140
141static void pgd_ctor(void *addr) 112static void pgd_ctor(void *addr)
142{ 113{
143 memset(addr, 0, PGD_TABLE_SIZE); 114 memset(addr, 0, PGD_TABLE_SIZE);
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
index 579382c163a9..59736317bf0e 100644
--- a/arch/powerpc/mm/mem.c
+++ b/arch/powerpc/mm/mem.c
@@ -143,8 +143,8 @@ int arch_add_memory(int nid, u64 start, u64 size)
143 * memory regions, find holes and callback for contiguous regions. 143 * memory regions, find holes and callback for contiguous regions.
144 */ 144 */
145int 145int
146walk_memory_resource(unsigned long start_pfn, unsigned long nr_pages, void *arg, 146walk_system_ram_range(unsigned long start_pfn, unsigned long nr_pages,
147 int (*func)(unsigned long, unsigned long, void *)) 147 void *arg, int (*func)(unsigned long, unsigned long, void *))
148{ 148{
149 struct lmb_property res; 149 struct lmb_property res;
150 unsigned long pfn, len; 150 unsigned long pfn, len;
@@ -166,7 +166,7 @@ walk_memory_resource(unsigned long start_pfn, unsigned long nr_pages, void *arg,
166 } 166 }
167 return ret; 167 return ret;
168} 168}
169EXPORT_SYMBOL_GPL(walk_memory_resource); 169EXPORT_SYMBOL_GPL(walk_system_ram_range);
170 170
171/* 171/*
172 * Initialize the bootmem system and give it all the memory we 172 * Initialize the bootmem system and give it all the memory we
@@ -372,7 +372,7 @@ void __init mem_init(void)
372 372
373 printk(KERN_INFO "Memory: %luk/%luk available (%luk kernel code, " 373 printk(KERN_INFO "Memory: %luk/%luk available (%luk kernel code, "
374 "%luk reserved, %luk data, %luk bss, %luk init)\n", 374 "%luk reserved, %luk data, %luk bss, %luk init)\n",
375 (unsigned long)nr_free_pages() << (PAGE_SHIFT-10), 375 nr_free_pages() << (PAGE_SHIFT-10),
376 num_physpages << (PAGE_SHIFT-10), 376 num_physpages << (PAGE_SHIFT-10),
377 codesize >> 10, 377 codesize >> 10,
378 reservedpages << (PAGE_SHIFT-10), 378 reservedpages << (PAGE_SHIFT-10),
diff --git a/arch/powerpc/mm/pgtable.c b/arch/powerpc/mm/pgtable.c
index 83f1551ec2c9..53040931de32 100644
--- a/arch/powerpc/mm/pgtable.c
+++ b/arch/powerpc/mm/pgtable.c
@@ -30,6 +30,8 @@
30#include <asm/tlbflush.h> 30#include <asm/tlbflush.h>
31#include <asm/tlb.h> 31#include <asm/tlb.h>
32 32
33#include "mmu_decl.h"
34
33DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); 35DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
34 36
35#ifdef CONFIG_SMP 37#ifdef CONFIG_SMP
@@ -166,7 +168,7 @@ struct page * maybe_pte_to_page(pte_t pte)
166 * support falls into the same category. 168 * support falls into the same category.
167 */ 169 */
168 170
169static pte_t set_pte_filter(pte_t pte) 171static pte_t set_pte_filter(pte_t pte, unsigned long addr)
170{ 172{
171 pte = __pte(pte_val(pte) & ~_PAGE_HPTEFLAGS); 173 pte = __pte(pte_val(pte) & ~_PAGE_HPTEFLAGS);
172 if (pte_looks_normal(pte) && !(cpu_has_feature(CPU_FTR_COHERENT_ICACHE) || 174 if (pte_looks_normal(pte) && !(cpu_has_feature(CPU_FTR_COHERENT_ICACHE) ||
@@ -175,6 +177,17 @@ static pte_t set_pte_filter(pte_t pte)
175 if (!pg) 177 if (!pg)
176 return pte; 178 return pte;
177 if (!test_bit(PG_arch_1, &pg->flags)) { 179 if (!test_bit(PG_arch_1, &pg->flags)) {
180#ifdef CONFIG_8xx
181 /* On 8xx, cache control instructions (particularly
182 * "dcbst" from flush_dcache_icache) fault as write
183 * operation if there is an unpopulated TLB entry
184 * for the address in question. To workaround that,
185 * we invalidate the TLB here, thus avoiding dcbst
186 * misbehaviour.
187 */
188 /* 8xx doesn't care about PID, size or ind args */
189 _tlbil_va(addr, 0, 0, 0);
190#endif /* CONFIG_8xx */
178 flush_dcache_icache_page(pg); 191 flush_dcache_icache_page(pg);
179 set_bit(PG_arch_1, &pg->flags); 192 set_bit(PG_arch_1, &pg->flags);
180 } 193 }
@@ -194,7 +207,7 @@ static pte_t set_access_flags_filter(pte_t pte, struct vm_area_struct *vma,
194 * as we don't have two bits to spare for _PAGE_EXEC and _PAGE_HWEXEC so 207 * as we don't have two bits to spare for _PAGE_EXEC and _PAGE_HWEXEC so
195 * instead we "filter out" the exec permission for non clean pages. 208 * instead we "filter out" the exec permission for non clean pages.
196 */ 209 */
197static pte_t set_pte_filter(pte_t pte) 210static pte_t set_pte_filter(pte_t pte, unsigned long addr)
198{ 211{
199 struct page *pg; 212 struct page *pg;
200 213
@@ -276,7 +289,7 @@ void set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep,
276 * this context might not have been activated yet when this 289 * this context might not have been activated yet when this
277 * is called. 290 * is called.
278 */ 291 */
279 pte = set_pte_filter(pte); 292 pte = set_pte_filter(pte, addr);
280 293
281 /* Perform the setting of the PTE */ 294 /* Perform the setting of the PTE */
282 __set_pte_at(mm, addr, ptep, pte, 0); 295 __set_pte_at(mm, addr, ptep, pte, 0);
diff --git a/arch/powerpc/mm/tlb_low_64e.S b/arch/powerpc/mm/tlb_low_64e.S
index ef1cccf71173..f288279e679d 100644
--- a/arch/powerpc/mm/tlb_low_64e.S
+++ b/arch/powerpc/mm/tlb_low_64e.S
@@ -18,7 +18,6 @@
18#include <asm/asm-offsets.h> 18#include <asm/asm-offsets.h>
19#include <asm/cputable.h> 19#include <asm/cputable.h>
20#include <asm/pgtable.h> 20#include <asm/pgtable.h>
21#include <asm/reg.h>
22#include <asm/exception-64e.h> 21#include <asm/exception-64e.h>
23#include <asm/ppc-opcode.h> 22#include <asm/ppc-opcode.h>
24 23
diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
index 9efc8bda01b4..e382cae678b8 100644
--- a/arch/powerpc/platforms/Kconfig.cputype
+++ b/arch/powerpc/platforms/Kconfig.cputype
@@ -280,9 +280,9 @@ config PPC_HAVE_PMU_SUPPORT
280 280
281config PPC_PERF_CTRS 281config PPC_PERF_CTRS
282 def_bool y 282 def_bool y
283 depends on PERF_COUNTERS && PPC_HAVE_PMU_SUPPORT 283 depends on PERF_EVENTS && PPC_HAVE_PMU_SUPPORT
284 help 284 help
285 This enables the powerpc-specific perf_counter back-end. 285 This enables the powerpc-specific perf_event back-end.
286 286
287config SMP 287config SMP
288 depends on PPC_BOOK3S || PPC_BOOK3E || FSL_BOOKE 288 depends on PPC_BOOK3S || PPC_BOOK3E || FSL_BOOKE
diff --git a/arch/powerpc/platforms/cell/beat_iommu.c b/arch/powerpc/platforms/cell/beat_iommu.c
index 93b0efddd658..39d361c5c6d2 100644
--- a/arch/powerpc/platforms/cell/beat_iommu.c
+++ b/arch/powerpc/platforms/cell/beat_iommu.c
@@ -77,7 +77,7 @@ static void __init celleb_init_direct_mapping(void)
77static void celleb_dma_dev_setup(struct device *dev) 77static void celleb_dma_dev_setup(struct device *dev)
78{ 78{
79 dev->archdata.dma_ops = get_pci_dma_ops(); 79 dev->archdata.dma_ops = get_pci_dma_ops();
80 dev->archdata.dma_data = (void *)celleb_dma_direct_offset; 80 set_dma_offset(dev, celleb_dma_direct_offset);
81} 81}
82 82
83static void celleb_pci_dma_dev_setup(struct pci_dev *pdev) 83static void celleb_pci_dma_dev_setup(struct pci_dev *pdev)
diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c
index 416db17eb18f..ca5bfdfe47f2 100644
--- a/arch/powerpc/platforms/cell/iommu.c
+++ b/arch/powerpc/platforms/cell/iommu.c
@@ -657,15 +657,13 @@ static void cell_dma_dev_setup_fixed(struct device *dev);
657 657
658static void cell_dma_dev_setup(struct device *dev) 658static void cell_dma_dev_setup(struct device *dev)
659{ 659{
660 struct dev_archdata *archdata = &dev->archdata;
661
662 /* Order is important here, these are not mutually exclusive */ 660 /* Order is important here, these are not mutually exclusive */
663 if (get_dma_ops(dev) == &dma_iommu_fixed_ops) 661 if (get_dma_ops(dev) == &dma_iommu_fixed_ops)
664 cell_dma_dev_setup_fixed(dev); 662 cell_dma_dev_setup_fixed(dev);
665 else if (get_pci_dma_ops() == &dma_iommu_ops) 663 else if (get_pci_dma_ops() == &dma_iommu_ops)
666 archdata->dma_data = cell_get_iommu_table(dev); 664 set_iommu_table_base(dev, cell_get_iommu_table(dev));
667 else if (get_pci_dma_ops() == &dma_direct_ops) 665 else if (get_pci_dma_ops() == &dma_direct_ops)
668 archdata->dma_data = (void *)cell_dma_direct_offset; 666 set_dma_offset(dev, cell_dma_direct_offset);
669 else 667 else
670 BUG(); 668 BUG();
671} 669}
@@ -973,11 +971,10 @@ static int dma_set_mask_and_switch(struct device *dev, u64 dma_mask)
973 971
974static void cell_dma_dev_setup_fixed(struct device *dev) 972static void cell_dma_dev_setup_fixed(struct device *dev)
975{ 973{
976 struct dev_archdata *archdata = &dev->archdata;
977 u64 addr; 974 u64 addr;
978 975
979 addr = cell_iommu_get_fixed_address(dev) + dma_iommu_fixed_base; 976 addr = cell_iommu_get_fixed_address(dev) + dma_iommu_fixed_base;
980 archdata->dma_data = (void *)addr; 977 set_dma_offset(dev, addr);
981 978
982 dev_dbg(dev, "iommu: fixed addr = %llx\n", addr); 979 dev_dbg(dev, "iommu: fixed addr = %llx\n", addr);
983} 980}
diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c
index ab8aef9bb8ea..8f079b865ad0 100644
--- a/arch/powerpc/platforms/cell/spufs/file.c
+++ b/arch/powerpc/platforms/cell/spufs/file.c
@@ -29,7 +29,6 @@
29#include <linux/poll.h> 29#include <linux/poll.h>
30#include <linux/ptrace.h> 30#include <linux/ptrace.h>
31#include <linux/seq_file.h> 31#include <linux/seq_file.h>
32#include <linux/marker.h>
33 32
34#include <asm/io.h> 33#include <asm/io.h>
35#include <asm/time.h> 34#include <asm/time.h>
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c
index 24b30b6909c4..fc1b1c42b1dc 100644
--- a/arch/powerpc/platforms/cell/spufs/inode.c
+++ b/arch/powerpc/platforms/cell/spufs/inode.c
@@ -119,7 +119,7 @@ spufs_new_file(struct super_block *sb, struct dentry *dentry,
119 const struct file_operations *fops, int mode, 119 const struct file_operations *fops, int mode,
120 size_t size, struct spu_context *ctx) 120 size_t size, struct spu_context *ctx)
121{ 121{
122 static struct inode_operations spufs_file_iops = { 122 static const struct inode_operations spufs_file_iops = {
123 .setattr = spufs_setattr, 123 .setattr = spufs_setattr,
124 }; 124 };
125 struct inode *inode; 125 struct inode *inode;
@@ -773,7 +773,7 @@ static int
773spufs_fill_super(struct super_block *sb, void *data, int silent) 773spufs_fill_super(struct super_block *sb, void *data, int silent)
774{ 774{
775 struct spufs_sb_info *info; 775 struct spufs_sb_info *info;
776 static struct super_operations s_ops = { 776 static const struct super_operations s_ops = {
777 .alloc_inode = spufs_alloc_inode, 777 .alloc_inode = spufs_alloc_inode,
778 .destroy_inode = spufs_destroy_inode, 778 .destroy_inode = spufs_destroy_inode,
779 .statfs = simple_statfs, 779 .statfs = simple_statfs,
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c
index bb5b77c66d05..4678078fede8 100644
--- a/arch/powerpc/platforms/cell/spufs/sched.c
+++ b/arch/powerpc/platforms/cell/spufs/sched.c
@@ -39,7 +39,6 @@
39#include <linux/pid_namespace.h> 39#include <linux/pid_namespace.h>
40#include <linux/proc_fs.h> 40#include <linux/proc_fs.h>
41#include <linux/seq_file.h> 41#include <linux/seq_file.h>
42#include <linux/marker.h>
43 42
44#include <asm/io.h> 43#include <asm/io.h>
45#include <asm/mmu_context.h> 44#include <asm/mmu_context.h>
diff --git a/arch/powerpc/platforms/iseries/iommu.c b/arch/powerpc/platforms/iseries/iommu.c
index 6c1e1011959e..9d53cb481a7c 100644
--- a/arch/powerpc/platforms/iseries/iommu.c
+++ b/arch/powerpc/platforms/iseries/iommu.c
@@ -193,7 +193,7 @@ static void pci_dma_dev_setup_iseries(struct pci_dev *pdev)
193 pdn->iommu_table = iommu_init_table(tbl, -1); 193 pdn->iommu_table = iommu_init_table(tbl, -1);
194 else 194 else
195 kfree(tbl); 195 kfree(tbl);
196 pdev->dev.archdata.dma_data = pdn->iommu_table; 196 set_iommu_table_base(&pdev->dev, pdn->iommu_table);
197} 197}
198#else 198#else
199#define pci_dma_dev_setup_iseries NULL 199#define pci_dma_dev_setup_iseries NULL
diff --git a/arch/powerpc/platforms/pasemi/iommu.c b/arch/powerpc/platforms/pasemi/iommu.c
index a0ff03a3d8da..7b1d608ea3c8 100644
--- a/arch/powerpc/platforms/pasemi/iommu.c
+++ b/arch/powerpc/platforms/pasemi/iommu.c
@@ -189,7 +189,7 @@ static void pci_dma_dev_setup_pasemi(struct pci_dev *dev)
189 } 189 }
190#endif 190#endif
191 191
192 dev->dev.archdata.dma_data = &iommu_table_iobmap; 192 set_iommu_table_base(&dev->dev, &iommu_table_iobmap);
193} 193}
194 194
195static void pci_dma_bus_setup_null(struct pci_bus *b) { } 195static void pci_dma_bus_setup_null(struct pci_bus *b) { }
diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c
index 937a38e73178..b40c22d697f0 100644
--- a/arch/powerpc/platforms/powermac/smp.c
+++ b/arch/powerpc/platforms/powermac/smp.c
@@ -320,7 +320,7 @@ static int __init smp_psurge_probe(void)
320 if (ncpus > NR_CPUS) 320 if (ncpus > NR_CPUS)
321 ncpus = NR_CPUS; 321 ncpus = NR_CPUS;
322 for (i = 1; i < ncpus ; ++i) 322 for (i = 1; i < ncpus ; ++i)
323 cpu_set(i, cpu_present_map); 323 set_cpu_present(i, true);
324 324
325 if (ppc_md.progress) ppc_md.progress("smp_psurge_probe - done", 0x352); 325 if (ppc_md.progress) ppc_md.progress("smp_psurge_probe - done", 0x352);
326 326
@@ -867,7 +867,7 @@ static void __devinit smp_core99_setup_cpu(int cpu_nr)
867 867
868int smp_core99_cpu_disable(void) 868int smp_core99_cpu_disable(void)
869{ 869{
870 cpu_clear(smp_processor_id(), cpu_online_map); 870 set_cpu_online(smp_processor_id(), false);
871 871
872 /* XXX reset cpu affinity here */ 872 /* XXX reset cpu affinity here */
873 mpic_cpu_set_priority(0xf); 873 mpic_cpu_set_priority(0xf);
@@ -952,7 +952,7 @@ void __init pmac_setup_smp(void)
952 int cpu; 952 int cpu;
953 953
954 for (cpu = 1; cpu < 4 && cpu < NR_CPUS; ++cpu) 954 for (cpu = 1; cpu < 4 && cpu < NR_CPUS; ++cpu)
955 cpu_set(cpu, cpu_possible_map); 955 set_cpu_possible(cpu, true);
956 smp_ops = &psurge_smp_ops; 956 smp_ops = &psurge_smp_ops;
957 } 957 }
958#endif /* CONFIG_PPC32 */ 958#endif /* CONFIG_PPC32 */
diff --git a/arch/powerpc/platforms/powermac/udbg_scc.c b/arch/powerpc/platforms/powermac/udbg_scc.c
index 572771fd8463..9490157da62e 100644
--- a/arch/powerpc/platforms/powermac/udbg_scc.c
+++ b/arch/powerpc/platforms/powermac/udbg_scc.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * udbg for for zilog scc ports as found on Apple PowerMacs 2 * udbg for zilog scc ports as found on Apple PowerMacs
3 * 3 *
4 * Copyright (C) 2001-2005 PPC 64 Team, IBM Corp 4 * Copyright (C) 2001-2005 PPC 64 Team, IBM Corp
5 * 5 *
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c
index 989d6462c154..ccd8dd03b8c9 100644
--- a/arch/powerpc/platforms/pseries/eeh.c
+++ b/arch/powerpc/platforms/pseries/eeh.c
@@ -744,7 +744,15 @@ int pcibios_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state stat
744 744
745static void __rtas_set_slot_reset(struct pci_dn *pdn) 745static void __rtas_set_slot_reset(struct pci_dn *pdn)
746{ 746{
747 rtas_pci_slot_reset (pdn, 1); 747 struct pci_dev *dev = pdn->pcidev;
748
749 /* Determine type of EEH reset required by device,
750 * default hot reset or fundamental reset
751 */
752 if (dev->needs_freset)
753 rtas_pci_slot_reset(pdn, 3);
754 else
755 rtas_pci_slot_reset(pdn, 1);
748 756
749 /* The PCI bus requires that the reset be held high for at least 757 /* The PCI bus requires that the reset be held high for at least
750 * a 100 milliseconds. We wait a bit longer 'just in case'. */ 758 * a 100 milliseconds. We wait a bit longer 'just in case'. */
diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c
index a20ead87153d..ebff6d9a4e39 100644
--- a/arch/powerpc/platforms/pseries/hotplug-cpu.c
+++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c
@@ -94,7 +94,7 @@ static int pseries_cpu_disable(void)
94{ 94{
95 int cpu = smp_processor_id(); 95 int cpu = smp_processor_id();
96 96
97 cpu_clear(cpu, cpu_online_map); 97 set_cpu_online(cpu, false);
98 vdso_data->processorCount--; 98 vdso_data->processorCount--;
99 99
100 /*fix boot_cpuid here*/ 100 /*fix boot_cpuid here*/
@@ -185,7 +185,7 @@ static int pseries_add_processor(struct device_node *np)
185 185
186 for_each_cpu_mask(cpu, tmp) { 186 for_each_cpu_mask(cpu, tmp) {
187 BUG_ON(cpu_isset(cpu, cpu_present_map)); 187 BUG_ON(cpu_isset(cpu, cpu_present_map));
188 cpu_set(cpu, cpu_present_map); 188 set_cpu_present(cpu, true);
189 set_hard_smp_processor_id(cpu, *intserv++); 189 set_hard_smp_processor_id(cpu, *intserv++);
190 } 190 }
191 err = 0; 191 err = 0;
@@ -217,7 +217,7 @@ static void pseries_remove_processor(struct device_node *np)
217 if (get_hard_smp_processor_id(cpu) != intserv[i]) 217 if (get_hard_smp_processor_id(cpu) != intserv[i])
218 continue; 218 continue;
219 BUG_ON(cpu_online(cpu)); 219 BUG_ON(cpu_online(cpu));
220 cpu_clear(cpu, cpu_present_map); 220 set_cpu_present(cpu, false);
221 set_hard_smp_processor_id(cpu, -1); 221 set_hard_smp_processor_id(cpu, -1);
222 break; 222 break;
223 } 223 }
diff --git a/arch/powerpc/platforms/pseries/hvCall_inst.c b/arch/powerpc/platforms/pseries/hvCall_inst.c
index eae51ef9af24..3631a4f277eb 100644
--- a/arch/powerpc/platforms/pseries/hvCall_inst.c
+++ b/arch/powerpc/platforms/pseries/hvCall_inst.c
@@ -71,7 +71,7 @@ static int hc_show(struct seq_file *m, void *p)
71 return 0; 71 return 0;
72} 72}
73 73
74static struct seq_operations hcall_inst_seq_ops = { 74static const struct seq_operations hcall_inst_seq_ops = {
75 .start = hc_start, 75 .start = hc_start,
76 .next = hc_next, 76 .next = hc_next,
77 .stop = hc_stop, 77 .stop = hc_stop,
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c
index 661c8e02bcba..1a0000a4b6d6 100644
--- a/arch/powerpc/platforms/pseries/iommu.c
+++ b/arch/powerpc/platforms/pseries/iommu.c
@@ -482,7 +482,7 @@ static void pci_dma_dev_setup_pSeries(struct pci_dev *dev)
482 phb->node); 482 phb->node);
483 iommu_table_setparms(phb, dn, tbl); 483 iommu_table_setparms(phb, dn, tbl);
484 PCI_DN(dn)->iommu_table = iommu_init_table(tbl, phb->node); 484 PCI_DN(dn)->iommu_table = iommu_init_table(tbl, phb->node);
485 dev->dev.archdata.dma_data = PCI_DN(dn)->iommu_table; 485 set_iommu_table_base(&dev->dev, PCI_DN(dn)->iommu_table);
486 return; 486 return;
487 } 487 }
488 488
@@ -494,7 +494,7 @@ static void pci_dma_dev_setup_pSeries(struct pci_dev *dev)
494 dn = dn->parent; 494 dn = dn->parent;
495 495
496 if (dn && PCI_DN(dn)) 496 if (dn && PCI_DN(dn))
497 dev->dev.archdata.dma_data = PCI_DN(dn)->iommu_table; 497 set_iommu_table_base(&dev->dev, PCI_DN(dn)->iommu_table);
498 else 498 else
499 printk(KERN_WARNING "iommu: Device %s has no iommu table\n", 499 printk(KERN_WARNING "iommu: Device %s has no iommu table\n",
500 pci_name(dev)); 500 pci_name(dev));
@@ -538,7 +538,7 @@ static void pci_dma_dev_setup_pSeriesLP(struct pci_dev *dev)
538 */ 538 */
539 if (dma_window == NULL || pdn->parent == NULL) { 539 if (dma_window == NULL || pdn->parent == NULL) {
540 pr_debug(" no dma window for device, linking to parent\n"); 540 pr_debug(" no dma window for device, linking to parent\n");
541 dev->dev.archdata.dma_data = PCI_DN(pdn)->iommu_table; 541 set_iommu_table_base(&dev->dev, PCI_DN(pdn)->iommu_table);
542 return; 542 return;
543 } 543 }
544 544
@@ -554,7 +554,7 @@ static void pci_dma_dev_setup_pSeriesLP(struct pci_dev *dev)
554 pr_debug(" found DMA window, table: %p\n", pci->iommu_table); 554 pr_debug(" found DMA window, table: %p\n", pci->iommu_table);
555 } 555 }
556 556
557 dev->dev.archdata.dma_data = pci->iommu_table; 557 set_iommu_table_base(&dev->dev, pci->iommu_table);
558} 558}
559#else /* CONFIG_PCI */ 559#else /* CONFIG_PCI */
560#define pci_dma_bus_setup_pSeries NULL 560#define pci_dma_bus_setup_pSeries NULL
diff --git a/arch/powerpc/relocs_check.pl b/arch/powerpc/relocs_check.pl
new file mode 100755
index 000000000000..d2571096c3e9
--- /dev/null
+++ b/arch/powerpc/relocs_check.pl
@@ -0,0 +1,56 @@
1#!/usr/bin/perl
2
3# Copyright © 2009 IBM Corporation
4
5# This program is free software; you can redistribute it and/or
6# modify it under the terms of the GNU General Public License
7# as published by the Free Software Foundation; either version
8# 2 of the License, or (at your option) any later version.
9
10# This script checks the relcoations of a vmlinux for "suspicious"
11# relocations.
12
13use strict;
14use warnings;
15
16if ($#ARGV != 1) {
17 die "$0 [path to objdump] [path to vmlinux]\n";
18}
19
20# Have Kbuild supply the path to objdump so we handle cross compilation.
21my $objdump = shift;
22my $vmlinux = shift;
23my $bad_relocs_count = 0;
24my $bad_relocs = "";
25my $old_binutils = 0;
26
27open(FD, "$objdump -R $vmlinux|") or die;
28while (<FD>) {
29 study $_;
30
31 # Only look at relcoation lines.
32 next if (!/\s+R_/);
33
34 # These relocations are okay
35 next if (/R_PPC64_RELATIVE/ or /R_PPC64_NONE/ or
36 /R_PPC64_ADDR64\s+mach_/);
37
38 # If we see this type of relcoation it's an idication that
39 # we /may/ be using an old version of binutils.
40 if (/R_PPC64_UADDR64/) {
41 $old_binutils++;
42 }
43
44 $bad_relocs_count++;
45 $bad_relocs .= $_;
46}
47
48if ($bad_relocs_count) {
49 print "WARNING: $bad_relocs_count bad relocations\n";
50 print $bad_relocs;
51}
52
53if ($old_binutils) {
54 print "WARNING: You need at binutils >= 2.19 to build a ".
55 "CONFIG_RELCOATABLE kernel\n";
56}
diff --git a/arch/powerpc/sysdev/axonram.c b/arch/powerpc/sysdev/axonram.c
index a4779912a5ca..88f4ae787832 100644
--- a/arch/powerpc/sysdev/axonram.c
+++ b/arch/powerpc/sysdev/axonram.c
@@ -165,7 +165,7 @@ axon_ram_direct_access(struct block_device *device, sector_t sector,
165 return 0; 165 return 0;
166} 166}
167 167
168static struct block_device_operations axon_ram_devops = { 168static const struct block_device_operations axon_ram_devops = {
169 .owner = THIS_MODULE, 169 .owner = THIS_MODULE,
170 .direct_access = axon_ram_direct_access 170 .direct_access = axon_ram_direct_access
171}; 171};
diff --git a/arch/powerpc/sysdev/dart_iommu.c b/arch/powerpc/sysdev/dart_iommu.c
index 89639ecbf381..ae3c4db86fe8 100644
--- a/arch/powerpc/sysdev/dart_iommu.c
+++ b/arch/powerpc/sysdev/dart_iommu.c
@@ -297,7 +297,7 @@ static void pci_dma_dev_setup_dart(struct pci_dev *dev)
297 /* We only have one iommu table on the mac for now, which makes 297 /* We only have one iommu table on the mac for now, which makes
298 * things simple. Setup all PCI devices to point to this table 298 * things simple. Setup all PCI devices to point to this table
299 */ 299 */
300 dev->dev.archdata.dma_data = &iommu_table_dart; 300 set_iommu_table_base(&dev->dev, &iommu_table_dart);
301} 301}
302 302
303static void pci_dma_bus_setup_dart(struct pci_bus *bus) 303static void pci_dma_bus_setup_dart(struct pci_bus *bus)
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index 0e09a45ac79a..c6f0a71b405e 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -335,6 +335,16 @@ int cpus_are_in_xmon(void)
335} 335}
336#endif 336#endif
337 337
338static inline int unrecoverable_excp(struct pt_regs *regs)
339{
340#ifdef CONFIG_4xx
341 /* We have no MSR_RI bit on 4xx, so we simply return false */
342 return 0;
343#else
344 return ((regs->msr & MSR_RI) == 0);
345#endif
346}
347
338static int xmon_core(struct pt_regs *regs, int fromipi) 348static int xmon_core(struct pt_regs *regs, int fromipi)
339{ 349{
340 int cmd = 0; 350 int cmd = 0;
@@ -388,7 +398,7 @@ static int xmon_core(struct pt_regs *regs, int fromipi)
388 bp = NULL; 398 bp = NULL;
389 if ((regs->msr & (MSR_IR|MSR_PR|MSR_SF)) == (MSR_IR|MSR_SF)) 399 if ((regs->msr & (MSR_IR|MSR_PR|MSR_SF)) == (MSR_IR|MSR_SF))
390 bp = at_breakpoint(regs->nip); 400 bp = at_breakpoint(regs->nip);
391 if (bp || (regs->msr & MSR_RI) == 0) 401 if (bp || unrecoverable_excp(regs))
392 fromipi = 0; 402 fromipi = 0;
393 403
394 if (!fromipi) { 404 if (!fromipi) {
@@ -399,7 +409,7 @@ static int xmon_core(struct pt_regs *regs, int fromipi)
399 cpu, BP_NUM(bp)); 409 cpu, BP_NUM(bp));
400 xmon_print_symbol(regs->nip, " ", ")\n"); 410 xmon_print_symbol(regs->nip, " ", ")\n");
401 } 411 }
402 if ((regs->msr & MSR_RI) == 0) 412 if (unrecoverable_excp(regs))
403 printf("WARNING: exception is not recoverable, " 413 printf("WARNING: exception is not recoverable, "
404 "can't continue\n"); 414 "can't continue\n");
405 release_output_lock(); 415 release_output_lock();
@@ -490,7 +500,7 @@ static int xmon_core(struct pt_regs *regs, int fromipi)
490 printf("Stopped at breakpoint %x (", BP_NUM(bp)); 500 printf("Stopped at breakpoint %x (", BP_NUM(bp));
491 xmon_print_symbol(regs->nip, " ", ")\n"); 501 xmon_print_symbol(regs->nip, " ", ")\n");
492 } 502 }
493 if ((regs->msr & MSR_RI) == 0) 503 if (unrecoverable_excp(regs))
494 printf("WARNING: exception is not recoverable, " 504 printf("WARNING: exception is not recoverable, "
495 "can't continue\n"); 505 "can't continue\n");
496 remove_bpts(); 506 remove_bpts();
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index 1c866efd217d..43c0acad7160 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -94,7 +94,7 @@ config S390
94 select HAVE_KVM if 64BIT 94 select HAVE_KVM if 64BIT
95 select HAVE_ARCH_TRACEHOOK 95 select HAVE_ARCH_TRACEHOOK
96 select INIT_ALL_POSSIBLE 96 select INIT_ALL_POSSIBLE
97 select HAVE_PERF_COUNTERS 97 select HAVE_PERF_EVENTS
98 98
99config SCHED_OMIT_FRAME_POINTER 99config SCHED_OMIT_FRAME_POINTER
100 bool 100 bool
diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c
index 264528e4f58d..b55fd7ed1c31 100644
--- a/arch/s390/appldata/appldata_base.c
+++ b/arch/s390/appldata/appldata_base.c
@@ -50,10 +50,9 @@ static struct platform_device *appldata_pdev;
50 * /proc entries (sysctl) 50 * /proc entries (sysctl)
51 */ 51 */
52static const char appldata_proc_name[APPLDATA_PROC_NAME_LENGTH] = "appldata"; 52static const char appldata_proc_name[APPLDATA_PROC_NAME_LENGTH] = "appldata";
53static int appldata_timer_handler(ctl_table *ctl, int write, struct file *filp, 53static int appldata_timer_handler(ctl_table *ctl, int write,
54 void __user *buffer, size_t *lenp, loff_t *ppos); 54 void __user *buffer, size_t *lenp, loff_t *ppos);
55static int appldata_interval_handler(ctl_table *ctl, int write, 55static int appldata_interval_handler(ctl_table *ctl, int write,
56 struct file *filp,
57 void __user *buffer, 56 void __user *buffer,
58 size_t *lenp, loff_t *ppos); 57 size_t *lenp, loff_t *ppos);
59 58
@@ -247,7 +246,7 @@ __appldata_vtimer_setup(int cmd)
247 * Start/Stop timer, show status of timer (0 = not active, 1 = active) 246 * Start/Stop timer, show status of timer (0 = not active, 1 = active)
248 */ 247 */
249static int 248static int
250appldata_timer_handler(ctl_table *ctl, int write, struct file *filp, 249appldata_timer_handler(ctl_table *ctl, int write,
251 void __user *buffer, size_t *lenp, loff_t *ppos) 250 void __user *buffer, size_t *lenp, loff_t *ppos)
252{ 251{
253 int len; 252 int len;
@@ -289,7 +288,7 @@ out:
289 * current timer interval. 288 * current timer interval.
290 */ 289 */
291static int 290static int
292appldata_interval_handler(ctl_table *ctl, int write, struct file *filp, 291appldata_interval_handler(ctl_table *ctl, int write,
293 void __user *buffer, size_t *lenp, loff_t *ppos) 292 void __user *buffer, size_t *lenp, loff_t *ppos)
294{ 293{
295 int len, interval; 294 int len, interval;
@@ -335,7 +334,7 @@ out:
335 * monitoring (0 = not in process, 1 = in process) 334 * monitoring (0 = not in process, 1 = in process)
336 */ 335 */
337static int 336static int
338appldata_generic_handler(ctl_table *ctl, int write, struct file *filp, 337appldata_generic_handler(ctl_table *ctl, int write,
339 void __user *buffer, size_t *lenp, loff_t *ppos) 338 void __user *buffer, size_t *lenp, loff_t *ppos)
340{ 339{
341 struct appldata_ops *ops = NULL, *tmp_ops; 340 struct appldata_ops *ops = NULL, *tmp_ops;
diff --git a/arch/s390/boot/install.sh b/arch/s390/boot/install.sh
index d4026f62cb06..aed3069699bd 100644
--- a/arch/s390/boot/install.sh
+++ b/arch/s390/boot/install.sh
@@ -21,8 +21,8 @@
21 21
22# User may have a custom install script 22# User may have a custom install script
23 23
24if [ -x ~/bin/${CROSS_COMPILE}installkernel ]; then exec ~/bin/${CROSS_COMPILE}installkernel "$@"; fi 24if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi
25if [ -x /sbin/${CROSS_COMPILE}installkernel ]; then exec /sbin/${CROSS_COMPILE}installkernel "$@"; fi 25if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi
26 26
27# Default install - same as make zlilo 27# Default install - same as make zlilo
28 28
diff --git a/arch/s390/defconfig b/arch/s390/defconfig
index 4e91a2573cc4..ab4464486b7a 100644
--- a/arch/s390/defconfig
+++ b/arch/s390/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.30 3# Linux kernel version: 2.6.31
4# Mon Jun 22 11:08:16 2009 4# Tue Sep 22 17:43:13 2009
5# 5#
6CONFIG_SCHED_MC=y 6CONFIG_SCHED_MC=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -24,6 +24,7 @@ CONFIG_PGSTE=y
24CONFIG_VIRT_CPU_ACCOUNTING=y 24CONFIG_VIRT_CPU_ACCOUNTING=y
25CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 25CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
26CONFIG_S390=y 26CONFIG_S390=y
27CONFIG_SCHED_OMIT_FRAME_POINTER=y
27CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 28CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
28CONFIG_CONSTRUCTORS=y 29CONFIG_CONSTRUCTORS=y
29 30
@@ -48,11 +49,12 @@ CONFIG_AUDIT=y
48# 49#
49# RCU Subsystem 50# RCU Subsystem
50# 51#
51CONFIG_CLASSIC_RCU=y 52CONFIG_TREE_RCU=y
52# CONFIG_TREE_RCU is not set 53# CONFIG_TREE_PREEMPT_RCU is not set
53# CONFIG_PREEMPT_RCU is not set 54# CONFIG_RCU_TRACE is not set
55CONFIG_RCU_FANOUT=64
56# CONFIG_RCU_FANOUT_EXACT is not set
54# CONFIG_TREE_RCU_TRACE is not set 57# CONFIG_TREE_RCU_TRACE is not set
55# CONFIG_PREEMPT_RCU_TRACE is not set
56CONFIG_IKCONFIG=y 58CONFIG_IKCONFIG=y
57CONFIG_IKCONFIG_PROC=y 59CONFIG_IKCONFIG_PROC=y
58CONFIG_LOG_BUF_SHIFT=17 60CONFIG_LOG_BUF_SHIFT=17
@@ -103,11 +105,12 @@ CONFIG_TIMERFD=y
103CONFIG_EVENTFD=y 105CONFIG_EVENTFD=y
104CONFIG_SHMEM=y 106CONFIG_SHMEM=y
105CONFIG_AIO=y 107CONFIG_AIO=y
106CONFIG_HAVE_PERF_COUNTERS=y 108CONFIG_HAVE_PERF_EVENTS=y
107 109
108# 110#
109# Performance Counters 111# Kernel Performance Events And Counters
110# 112#
113# CONFIG_PERF_EVENTS is not set
111# CONFIG_PERF_COUNTERS is not set 114# CONFIG_PERF_COUNTERS is not set
112CONFIG_VM_EVENT_COUNTERS=y 115CONFIG_VM_EVENT_COUNTERS=y
113# CONFIG_STRIP_ASM_SYMS is not set 116# CONFIG_STRIP_ASM_SYMS is not set
@@ -116,7 +119,6 @@ CONFIG_SLAB=y
116# CONFIG_SLUB is not set 119# CONFIG_SLUB is not set
117# CONFIG_SLOB is not set 120# CONFIG_SLOB is not set
118# CONFIG_PROFILING is not set 121# CONFIG_PROFILING is not set
119# CONFIG_MARKERS is not set
120CONFIG_HAVE_OPROFILE=y 122CONFIG_HAVE_OPROFILE=y
121CONFIG_KPROBES=y 123CONFIG_KPROBES=y
122CONFIG_HAVE_SYSCALL_WRAPPERS=y 124CONFIG_HAVE_SYSCALL_WRAPPERS=y
@@ -176,6 +178,7 @@ CONFIG_NO_HZ=y
176CONFIG_HIGH_RES_TIMERS=y 178CONFIG_HIGH_RES_TIMERS=y
177CONFIG_GENERIC_CLOCKEVENTS_BUILD=y 179CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
178CONFIG_64BIT=y 180CONFIG_64BIT=y
181# CONFIG_KTIME_SCALAR is not set
179CONFIG_SMP=y 182CONFIG_SMP=y
180CONFIG_NR_CPUS=32 183CONFIG_NR_CPUS=32
181CONFIG_HOTPLUG_CPU=y 184CONFIG_HOTPLUG_CPU=y
@@ -257,7 +260,6 @@ CONFIG_FORCE_MAX_ZONEORDER=9
257CONFIG_PFAULT=y 260CONFIG_PFAULT=y
258# CONFIG_SHARED_KERNEL is not set 261# CONFIG_SHARED_KERNEL is not set
259# CONFIG_CMM is not set 262# CONFIG_CMM is not set
260# CONFIG_PAGE_STATES is not set
261# CONFIG_APPLDATA_BASE is not set 263# CONFIG_APPLDATA_BASE is not set
262CONFIG_HZ_100=y 264CONFIG_HZ_100=y
263# CONFIG_HZ_250 is not set 265# CONFIG_HZ_250 is not set
@@ -280,6 +282,7 @@ CONFIG_PM_SLEEP_SMP=y
280CONFIG_PM_SLEEP=y 282CONFIG_PM_SLEEP=y
281CONFIG_HIBERNATION=y 283CONFIG_HIBERNATION=y
282CONFIG_PM_STD_PARTITION="" 284CONFIG_PM_STD_PARTITION=""
285# CONFIG_PM_RUNTIME is not set
283CONFIG_NET=y 286CONFIG_NET=y
284 287
285# 288#
@@ -394,6 +397,7 @@ CONFIG_IP_SCTP=m
394# CONFIG_SCTP_HMAC_NONE is not set 397# CONFIG_SCTP_HMAC_NONE is not set
395# CONFIG_SCTP_HMAC_SHA1 is not set 398# CONFIG_SCTP_HMAC_SHA1 is not set
396CONFIG_SCTP_HMAC_MD5=y 399CONFIG_SCTP_HMAC_MD5=y
400# CONFIG_RDS is not set
397# CONFIG_TIPC is not set 401# CONFIG_TIPC is not set
398# CONFIG_ATM is not set 402# CONFIG_ATM is not set
399# CONFIG_BRIDGE is not set 403# CONFIG_BRIDGE is not set
@@ -487,6 +491,7 @@ CONFIG_CCW=y
487# Generic Driver Options 491# Generic Driver Options
488# 492#
489CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 493CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
494# CONFIG_DEVTMPFS is not set
490CONFIG_STANDALONE=y 495CONFIG_STANDALONE=y
491CONFIG_PREVENT_FIRMWARE_BUILD=y 496CONFIG_PREVENT_FIRMWARE_BUILD=y
492CONFIG_FW_LOADER=y 497CONFIG_FW_LOADER=y
@@ -501,6 +506,7 @@ CONFIG_BLK_DEV=y
501CONFIG_BLK_DEV_LOOP=m 506CONFIG_BLK_DEV_LOOP=m
502# CONFIG_BLK_DEV_CRYPTOLOOP is not set 507# CONFIG_BLK_DEV_CRYPTOLOOP is not set
503CONFIG_BLK_DEV_NBD=m 508CONFIG_BLK_DEV_NBD=m
509# CONFIG_BLK_DEV_OSD is not set
504CONFIG_BLK_DEV_RAM=y 510CONFIG_BLK_DEV_RAM=y
505CONFIG_BLK_DEV_RAM_COUNT=16 511CONFIG_BLK_DEV_RAM_COUNT=16
506CONFIG_BLK_DEV_RAM_SIZE=4096 512CONFIG_BLK_DEV_RAM_SIZE=4096
@@ -594,8 +600,11 @@ CONFIG_BLK_DEV_DM=y
594CONFIG_DM_CRYPT=y 600CONFIG_DM_CRYPT=y
595CONFIG_DM_SNAPSHOT=y 601CONFIG_DM_SNAPSHOT=y
596CONFIG_DM_MIRROR=y 602CONFIG_DM_MIRROR=y
603# CONFIG_DM_LOG_USERSPACE is not set
597CONFIG_DM_ZERO=y 604CONFIG_DM_ZERO=y
598CONFIG_DM_MULTIPATH=m 605CONFIG_DM_MULTIPATH=m
606# CONFIG_DM_MULTIPATH_QL is not set
607# CONFIG_DM_MULTIPATH_ST is not set
599# CONFIG_DM_DELAY is not set 608# CONFIG_DM_DELAY is not set
600# CONFIG_DM_UEVENT is not set 609# CONFIG_DM_UEVENT is not set
601CONFIG_NETDEVICES=y 610CONFIG_NETDEVICES=y
@@ -615,7 +624,6 @@ CONFIG_NET_ETHERNET=y
615# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set 624# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
616# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set 625# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
617# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 626# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
618# CONFIG_KS8842 is not set
619CONFIG_NETDEV_1000=y 627CONFIG_NETDEV_1000=y
620CONFIG_NETDEV_10000=y 628CONFIG_NETDEV_10000=y
621# CONFIG_TR is not set 629# CONFIG_TR is not set
@@ -678,6 +686,7 @@ CONFIG_SCLP_CONSOLE=y
678CONFIG_SCLP_VT220_TTY=y 686CONFIG_SCLP_VT220_TTY=y
679CONFIG_SCLP_VT220_CONSOLE=y 687CONFIG_SCLP_VT220_CONSOLE=y
680CONFIG_SCLP_CPI=m 688CONFIG_SCLP_CPI=m
689CONFIG_SCLP_ASYNC=m
681CONFIG_S390_TAPE=m 690CONFIG_S390_TAPE=m
682 691
683# 692#
@@ -737,6 +746,7 @@ CONFIG_FS_POSIX_ACL=y
737# CONFIG_GFS2_FS is not set 746# CONFIG_GFS2_FS is not set
738# CONFIG_OCFS2_FS is not set 747# CONFIG_OCFS2_FS is not set
739# CONFIG_BTRFS_FS is not set 748# CONFIG_BTRFS_FS is not set
749# CONFIG_NILFS2_FS is not set
740CONFIG_FILE_LOCKING=y 750CONFIG_FILE_LOCKING=y
741CONFIG_FSNOTIFY=y 751CONFIG_FSNOTIFY=y
742CONFIG_DNOTIFY=y 752CONFIG_DNOTIFY=y
@@ -798,7 +808,6 @@ CONFIG_MISC_FILESYSTEMS=y
798# CONFIG_SYSV_FS is not set 808# CONFIG_SYSV_FS is not set
799# CONFIG_UFS_FS is not set 809# CONFIG_UFS_FS is not set
800# CONFIG_EXOFS_FS is not set 810# CONFIG_EXOFS_FS is not set
801# CONFIG_NILFS2_FS is not set
802CONFIG_NETWORK_FILESYSTEMS=y 811CONFIG_NETWORK_FILESYSTEMS=y
803CONFIG_NFS_FS=y 812CONFIG_NFS_FS=y
804CONFIG_NFS_V3=y 813CONFIG_NFS_V3=y
@@ -885,11 +894,13 @@ CONFIG_DEBUG_MEMORY_INIT=y
885# CONFIG_DEBUG_LIST is not set 894# CONFIG_DEBUG_LIST is not set
886# CONFIG_DEBUG_SG is not set 895# CONFIG_DEBUG_SG is not set
887# CONFIG_DEBUG_NOTIFIERS is not set 896# CONFIG_DEBUG_NOTIFIERS is not set
897# CONFIG_DEBUG_CREDENTIALS is not set
888# CONFIG_RCU_TORTURE_TEST is not set 898# CONFIG_RCU_TORTURE_TEST is not set
889# CONFIG_RCU_CPU_STALL_DETECTOR is not set 899# CONFIG_RCU_CPU_STALL_DETECTOR is not set
890# CONFIG_KPROBES_SANITY_TEST is not set 900# CONFIG_KPROBES_SANITY_TEST is not set
891# CONFIG_BACKTRACE_SELF_TEST is not set 901# CONFIG_BACKTRACE_SELF_TEST is not set
892# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set 902# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
903CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y
893# CONFIG_LKDTM is not set 904# CONFIG_LKDTM is not set
894# CONFIG_FAULT_INJECTION is not set 905# CONFIG_FAULT_INJECTION is not set
895# CONFIG_LATENCYTOP is not set 906# CONFIG_LATENCYTOP is not set
@@ -979,11 +990,13 @@ CONFIG_CRYPTO_PCBC=m
979# 990#
980CONFIG_CRYPTO_HMAC=m 991CONFIG_CRYPTO_HMAC=m
981# CONFIG_CRYPTO_XCBC is not set 992# CONFIG_CRYPTO_XCBC is not set
993CONFIG_CRYPTO_VMAC=m
982 994
983# 995#
984# Digest 996# Digest
985# 997#
986CONFIG_CRYPTO_CRC32C=m 998CONFIG_CRYPTO_CRC32C=m
999CONFIG_CRYPTO_GHASH=m
987# CONFIG_CRYPTO_MD4 is not set 1000# CONFIG_CRYPTO_MD4 is not set
988CONFIG_CRYPTO_MD5=m 1001CONFIG_CRYPTO_MD5=m
989# CONFIG_CRYPTO_MICHAEL_MIC is not set 1002# CONFIG_CRYPTO_MICHAEL_MIC is not set
diff --git a/arch/s390/hypfs/inode.c b/arch/s390/hypfs/inode.c
index bd9914b89488..341aff2687a5 100644
--- a/arch/s390/hypfs/inode.c
+++ b/arch/s390/hypfs/inode.c
@@ -41,7 +41,7 @@ struct hypfs_sb_info {
41 41
42static const struct file_operations hypfs_file_ops; 42static const struct file_operations hypfs_file_ops;
43static struct file_system_type hypfs_type; 43static struct file_system_type hypfs_type;
44static struct super_operations hypfs_s_ops; 44static const struct super_operations hypfs_s_ops;
45 45
46/* start of list of all dentries, which have to be deleted on update */ 46/* start of list of all dentries, which have to be deleted on update */
47static struct dentry *hypfs_last_dentry; 47static struct dentry *hypfs_last_dentry;
@@ -472,7 +472,7 @@ static struct file_system_type hypfs_type = {
472 .kill_sb = hypfs_kill_super 472 .kill_sb = hypfs_kill_super
473}; 473};
474 474
475static struct super_operations hypfs_s_ops = { 475static const struct super_operations hypfs_s_ops = {
476 .statfs = simple_statfs, 476 .statfs = simple_statfs,
477 .drop_inode = hypfs_drop_inode, 477 .drop_inode = hypfs_drop_inode,
478 .show_options = hypfs_show_options, 478 .show_options = hypfs_show_options,
@@ -496,7 +496,7 @@ static int __init hypfs_init(void)
496 } 496 }
497 s390_kobj = kobject_create_and_add("s390", hypervisor_kobj); 497 s390_kobj = kobject_create_and_add("s390", hypervisor_kobj);
498 if (!s390_kobj) { 498 if (!s390_kobj) {
499 rc = -ENOMEM;; 499 rc = -ENOMEM;
500 goto fail_sysfs; 500 goto fail_sysfs;
501 } 501 }
502 rc = register_filesystem(&hypfs_type); 502 rc = register_filesystem(&hypfs_type);
diff --git a/arch/s390/include/asm/cputime.h b/arch/s390/include/asm/cputime.h
index 7a3817a656df..24b1244aadb9 100644
--- a/arch/s390/include/asm/cputime.h
+++ b/arch/s390/include/asm/cputime.h
@@ -42,6 +42,7 @@ __div(unsigned long long n, unsigned int base)
42#endif /* __s390x__ */ 42#endif /* __s390x__ */
43 43
44#define cputime_zero (0ULL) 44#define cputime_zero (0ULL)
45#define cputime_one_jiffy jiffies_to_cputime(1)
45#define cputime_max ((~0UL >> 1) - 1) 46#define cputime_max ((~0UL >> 1) - 1)
46#define cputime_add(__a, __b) ((__a) + (__b)) 47#define cputime_add(__a, __b) ((__a) + (__b))
47#define cputime_sub(__a, __b) ((__a) - (__b)) 48#define cputime_sub(__a, __b) ((__a) - (__b))
diff --git a/arch/s390/include/asm/lowcore.h b/arch/s390/include/asm/lowcore.h
index 6bc9426a6fbf..f2ef4b619ce1 100644
--- a/arch/s390/include/asm/lowcore.h
+++ b/arch/s390/include/asm/lowcore.h
@@ -86,6 +86,7 @@
86#define __LC_PGM_OLD_PSW 0x0150 86#define __LC_PGM_OLD_PSW 0x0150
87#define __LC_MCK_OLD_PSW 0x0160 87#define __LC_MCK_OLD_PSW 0x0160
88#define __LC_IO_OLD_PSW 0x0170 88#define __LC_IO_OLD_PSW 0x0170
89#define __LC_RESTART_PSW 0x01a0
89#define __LC_EXT_NEW_PSW 0x01b0 90#define __LC_EXT_NEW_PSW 0x01b0
90#define __LC_SVC_NEW_PSW 0x01c0 91#define __LC_SVC_NEW_PSW 0x01c0
91#define __LC_PGM_NEW_PSW 0x01d0 92#define __LC_PGM_NEW_PSW 0x01d0
@@ -189,6 +190,14 @@ union save_area {
189#define SAVE_AREA_BASE SAVE_AREA_BASE_S390X 190#define SAVE_AREA_BASE SAVE_AREA_BASE_S390X
190#endif 191#endif
191 192
193#ifndef __s390x__
194#define LC_ORDER 0
195#else
196#define LC_ORDER 1
197#endif
198
199#define LC_PAGES (1UL << LC_ORDER)
200
192struct _lowcore 201struct _lowcore
193{ 202{
194#ifndef __s390x__ 203#ifndef __s390x__
diff --git a/arch/s390/include/asm/mman.h b/arch/s390/include/asm/mman.h
index f63fe7b431ed..4e9c8ae0a637 100644
--- a/arch/s390/include/asm/mman.h
+++ b/arch/s390/include/asm/mman.h
@@ -9,18 +9,7 @@
9#ifndef __S390_MMAN_H__ 9#ifndef __S390_MMAN_H__
10#define __S390_MMAN_H__ 10#define __S390_MMAN_H__
11 11
12#include <asm-generic/mman-common.h> 12#include <asm-generic/mman.h>
13
14#define MAP_GROWSDOWN 0x0100 /* stack-like segment */
15#define MAP_DENYWRITE 0x0800 /* ETXTBSY */
16#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */
17#define MAP_LOCKED 0x2000 /* pages are locked */
18#define MAP_NORESERVE 0x4000 /* don't check for reservations */
19#define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */
20#define MAP_NONBLOCK 0x10000 /* do not block on IO */
21
22#define MCL_CURRENT 1 /* lock all current mappings */
23#define MCL_FUTURE 2 /* lock all future mappings */
24 13
25#if defined(__KERNEL__) && !defined(__ASSEMBLY__) && defined(CONFIG_64BIT) 14#if defined(__KERNEL__) && !defined(__ASSEMBLY__) && defined(CONFIG_64BIT)
26int s390_mmap_check(unsigned long addr, unsigned long len); 15int s390_mmap_check(unsigned long addr, unsigned long len);
diff --git a/arch/s390/include/asm/perf_counter.h b/arch/s390/include/asm/perf_counter.h
deleted file mode 100644
index 7015188c2cc2..000000000000
--- a/arch/s390/include/asm/perf_counter.h
+++ /dev/null
@@ -1,10 +0,0 @@
1/*
2 * Performance counter support - s390 specific definitions.
3 *
4 * Copyright 2009 Martin Schwidefsky, IBM Corporation.
5 */
6
7static inline void set_perf_counter_pending(void) {}
8static inline void clear_perf_counter_pending(void) {}
9
10#define PERF_COUNTER_INDEX_OFFSET 0
diff --git a/arch/s390/include/asm/perf_event.h b/arch/s390/include/asm/perf_event.h
new file mode 100644
index 000000000000..3840cbe77637
--- /dev/null
+++ b/arch/s390/include/asm/perf_event.h
@@ -0,0 +1,10 @@
1/*
2 * Performance event support - s390 specific definitions.
3 *
4 * Copyright 2009 Martin Schwidefsky, IBM Corporation.
5 */
6
7static inline void set_perf_event_pending(void) {}
8static inline void clear_perf_event_pending(void) {}
9
10#define PERF_EVENT_INDEX_OFFSET 0
diff --git a/arch/s390/include/asm/processor.h b/arch/s390/include/asm/processor.h
index cf8eed3fa779..b42715458312 100644
--- a/arch/s390/include/asm/processor.h
+++ b/arch/s390/include/asm/processor.h
@@ -295,7 +295,7 @@ static inline void ATTRIB_NORET disabled_wait(unsigned long code)
295 " oi 0x384(1),0x10\n"/* fake protection bit */ 295 " oi 0x384(1),0x10\n"/* fake protection bit */
296 " lpswe 0(%1)" 296 " lpswe 0(%1)"
297 : "=m" (ctl_buf) 297 : "=m" (ctl_buf)
298 : "a" (&dw_psw), "a" (&ctl_buf), "m" (dw_psw) : "cc", "0"); 298 : "a" (&dw_psw), "a" (&ctl_buf), "m" (dw_psw) : "cc", "0", "1");
299#endif /* __s390x__ */ 299#endif /* __s390x__ */
300 while (1); 300 while (1);
301} 301}
diff --git a/arch/s390/include/asm/smp.h b/arch/s390/include/asm/smp.h
index c991fe6473c9..a868b272c257 100644
--- a/arch/s390/include/asm/smp.h
+++ b/arch/s390/include/asm/smp.h
@@ -62,7 +62,7 @@ extern struct mutex smp_cpu_state_mutex;
62extern int smp_cpu_polarization[]; 62extern int smp_cpu_polarization[];
63 63
64extern void arch_send_call_function_single_ipi(int cpu); 64extern void arch_send_call_function_single_ipi(int cpu);
65extern void arch_send_call_function_ipi(cpumask_t mask); 65extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
66 66
67#endif 67#endif
68 68
diff --git a/arch/s390/include/asm/topology.h b/arch/s390/include/asm/topology.h
index 5e0ad618dc45..6e7211abd950 100644
--- a/arch/s390/include/asm/topology.h
+++ b/arch/s390/include/asm/topology.h
@@ -9,7 +9,6 @@ const struct cpumask *cpu_coregroup_mask(unsigned int cpu);
9 9
10extern cpumask_t cpu_core_map[NR_CPUS]; 10extern cpumask_t cpu_core_map[NR_CPUS];
11 11
12#define topology_core_siblings(cpu) (cpu_core_map[cpu])
13#define topology_core_cpumask(cpu) (&cpu_core_map[cpu]) 12#define topology_core_cpumask(cpu) (&cpu_core_map[cpu])
14 13
15int topology_set_cpu_management(int fc); 14int topology_set_cpu_management(int fc);
diff --git a/arch/s390/include/asm/unistd.h b/arch/s390/include/asm/unistd.h
index c80602d7c880..cb5232df151e 100644
--- a/arch/s390/include/asm/unistd.h
+++ b/arch/s390/include/asm/unistd.h
@@ -268,7 +268,7 @@
268#define __NR_preadv 328 268#define __NR_preadv 328
269#define __NR_pwritev 329 269#define __NR_pwritev 329
270#define __NR_rt_tgsigqueueinfo 330 270#define __NR_rt_tgsigqueueinfo 330
271#define __NR_perf_counter_open 331 271#define __NR_perf_event_open 331
272#define NR_syscalls 332 272#define NR_syscalls 332
273 273
274/* 274/*
diff --git a/arch/s390/kernel/asm-offsets.c b/arch/s390/kernel/asm-offsets.c
index fa9905ce7d0b..63e46433e81d 100644
--- a/arch/s390/kernel/asm-offsets.c
+++ b/arch/s390/kernel/asm-offsets.c
@@ -7,6 +7,7 @@
7#include <linux/sched.h> 7#include <linux/sched.h>
8#include <linux/kbuild.h> 8#include <linux/kbuild.h>
9#include <asm/vdso.h> 9#include <asm/vdso.h>
10#include <asm/sigp.h>
10 11
11int main(void) 12int main(void)
12{ 13{
@@ -59,6 +60,10 @@ int main(void)
59 DEFINE(CLOCK_REALTIME, CLOCK_REALTIME); 60 DEFINE(CLOCK_REALTIME, CLOCK_REALTIME);
60 DEFINE(CLOCK_MONOTONIC, CLOCK_MONOTONIC); 61 DEFINE(CLOCK_MONOTONIC, CLOCK_MONOTONIC);
61 DEFINE(CLOCK_REALTIME_RES, MONOTONIC_RES_NSEC); 62 DEFINE(CLOCK_REALTIME_RES, MONOTONIC_RES_NSEC);
62 63 /* constants for SIGP */
64 DEFINE(__SIGP_STOP, sigp_stop);
65 DEFINE(__SIGP_RESTART, sigp_restart);
66 DEFINE(__SIGP_SENSE, sigp_sense);
67 DEFINE(__SIGP_INITIAL_CPU_RESET, sigp_initial_cpu_reset);
63 return 0; 68 return 0;
64} 69}
diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c
index 9ab188d67a3d..0debcec23a39 100644
--- a/arch/s390/kernel/compat_linux.c
+++ b/arch/s390/kernel/compat_linux.c
@@ -24,7 +24,6 @@
24#include <linux/signal.h> 24#include <linux/signal.h>
25#include <linux/resource.h> 25#include <linux/resource.h>
26#include <linux/times.h> 26#include <linux/times.h>
27#include <linux/utsname.h>
28#include <linux/smp.h> 27#include <linux/smp.h>
29#include <linux/smp_lock.h> 28#include <linux/smp_lock.h>
30#include <linux/sem.h> 29#include <linux/sem.h>
@@ -443,66 +442,28 @@ sys32_rt_sigqueueinfo(int pid, int sig, compat_siginfo_t __user *uinfo)
443 * sys32_execve() executes a new program after the asm stub has set 442 * sys32_execve() executes a new program after the asm stub has set
444 * things up for us. This should basically do what I want it to. 443 * things up for us. This should basically do what I want it to.
445 */ 444 */
446asmlinkage long sys32_execve(void) 445asmlinkage long sys32_execve(char __user *name, compat_uptr_t __user *argv,
446 compat_uptr_t __user *envp)
447{ 447{
448 struct pt_regs *regs = task_pt_regs(current); 448 struct pt_regs *regs = task_pt_regs(current);
449 char *filename; 449 char *filename;
450 unsigned long result; 450 long rc;
451 int rc; 451
452 452 filename = getname(name);
453 filename = getname(compat_ptr(regs->orig_gpr2)); 453 rc = PTR_ERR(filename);
454 if (IS_ERR(filename)) { 454 if (IS_ERR(filename))
455 result = PTR_ERR(filename); 455 return rc;
456 goto out; 456 rc = compat_do_execve(filename, argv, envp, regs);
457 } 457 if (rc)
458 rc = compat_do_execve(filename, compat_ptr(regs->gprs[3]), 458 goto out;
459 compat_ptr(regs->gprs[4]), regs);
460 if (rc) {
461 result = rc;
462 goto out_putname;
463 }
464 current->thread.fp_regs.fpc=0; 459 current->thread.fp_regs.fpc=0;
465 asm volatile("sfpc %0,0" : : "d" (0)); 460 asm volatile("sfpc %0,0" : : "d" (0));
466 result = regs->gprs[2]; 461 rc = regs->gprs[2];
467out_putname:
468 putname(filename);
469out: 462out:
470 return result; 463 putname(filename);
471} 464 return rc;
472
473
474#ifdef CONFIG_MODULES
475
476asmlinkage long
477sys32_init_module(void __user *umod, unsigned long len,
478 const char __user *uargs)
479{
480 return sys_init_module(umod, len, uargs);
481}
482
483asmlinkage long
484sys32_delete_module(const char __user *name_user, unsigned int flags)
485{
486 return sys_delete_module(name_user, flags);
487}
488
489#else /* CONFIG_MODULES */
490
491asmlinkage long
492sys32_init_module(void __user *umod, unsigned long len,
493 const char __user *uargs)
494{
495 return -ENOSYS;
496} 465}
497 466
498asmlinkage long
499sys32_delete_module(const char __user *name_user, unsigned int flags)
500{
501 return -ENOSYS;
502}
503
504#endif /* CONFIG_MODULES */
505
506asmlinkage long sys32_pread64(unsigned int fd, char __user *ubuf, 467asmlinkage long sys32_pread64(unsigned int fd, char __user *ubuf,
507 size_t count, u32 poshi, u32 poslo) 468 size_t count, u32 poshi, u32 poslo)
508{ 469{
@@ -801,23 +762,6 @@ asmlinkage long sys32_write(unsigned int fd, char __user * buf, size_t count)
801 return sys_write(fd, buf, count); 762 return sys_write(fd, buf, count);
802} 763}
803 764
804asmlinkage long sys32_clone(void)
805{
806 struct pt_regs *regs = task_pt_regs(current);
807 unsigned long clone_flags;
808 unsigned long newsp;
809 int __user *parent_tidptr, *child_tidptr;
810
811 clone_flags = regs->gprs[3] & 0xffffffffUL;
812 newsp = regs->orig_gpr2 & 0x7fffffffUL;
813 parent_tidptr = compat_ptr(regs->gprs[4]);
814 child_tidptr = compat_ptr(regs->gprs[5]);
815 if (!newsp)
816 newsp = regs->gprs[15];
817 return do_fork(clone_flags, newsp, regs, 0,
818 parent_tidptr, child_tidptr);
819}
820
821/* 765/*
822 * 31 bit emulation wrapper functions for sys_fadvise64/fadvise64_64. 766 * 31 bit emulation wrapper functions for sys_fadvise64/fadvise64_64.
823 * These need to rewrite the advise values for POSIX_FADV_{DONTNEED,NOREUSE} 767 * These need to rewrite the advise values for POSIX_FADV_{DONTNEED,NOREUSE}
diff --git a/arch/s390/kernel/compat_linux.h b/arch/s390/kernel/compat_linux.h
index 836a28842900..c07f9ca05ade 100644
--- a/arch/s390/kernel/compat_linux.h
+++ b/arch/s390/kernel/compat_linux.h
@@ -198,7 +198,8 @@ long sys32_rt_sigprocmask(int how, compat_sigset_t __user *set,
198 compat_sigset_t __user *oset, size_t sigsetsize); 198 compat_sigset_t __user *oset, size_t sigsetsize);
199long sys32_rt_sigpending(compat_sigset_t __user *set, size_t sigsetsize); 199long sys32_rt_sigpending(compat_sigset_t __user *set, size_t sigsetsize);
200long sys32_rt_sigqueueinfo(int pid, int sig, compat_siginfo_t __user *uinfo); 200long sys32_rt_sigqueueinfo(int pid, int sig, compat_siginfo_t __user *uinfo);
201long sys32_execve(void); 201long sys32_execve(char __user *name, compat_uptr_t __user *argv,
202 compat_uptr_t __user *envp);
202long sys32_init_module(void __user *umod, unsigned long len, 203long sys32_init_module(void __user *umod, unsigned long len,
203 const char __user *uargs); 204 const char __user *uargs);
204long sys32_delete_module(const char __user *name_user, unsigned int flags); 205long sys32_delete_module(const char __user *name_user, unsigned int flags);
@@ -222,7 +223,6 @@ unsigned long old32_mmap(struct mmap_arg_struct_emu31 __user *arg);
222long sys32_mmap2(struct mmap_arg_struct_emu31 __user *arg); 223long sys32_mmap2(struct mmap_arg_struct_emu31 __user *arg);
223long sys32_read(unsigned int fd, char __user * buf, size_t count); 224long sys32_read(unsigned int fd, char __user * buf, size_t count);
224long sys32_write(unsigned int fd, char __user * buf, size_t count); 225long sys32_write(unsigned int fd, char __user * buf, size_t count);
225long sys32_clone(void);
226long sys32_fadvise64(int fd, loff_t offset, size_t len, int advise); 226long sys32_fadvise64(int fd, loff_t offset, size_t len, int advise);
227long sys32_fadvise64_64(struct fadvise64_64_args __user *args); 227long sys32_fadvise64_64(struct fadvise64_64_args __user *args);
228long sys32_sigaction(int sig, const struct old_sigaction32 __user *act, 228long sys32_sigaction(int sig, const struct old_sigaction32 __user *act,
diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S
index 88a83366819f..682fb69dba21 100644
--- a/arch/s390/kernel/compat_wrapper.S
+++ b/arch/s390/kernel/compat_wrapper.S
@@ -568,18 +568,18 @@ compat_sys_sigprocmask_wrapper:
568 llgtr %r4,%r4 # compat_old_sigset_t * 568 llgtr %r4,%r4 # compat_old_sigset_t *
569 jg compat_sys_sigprocmask # branch to system call 569 jg compat_sys_sigprocmask # branch to system call
570 570
571 .globl sys32_init_module_wrapper 571 .globl sys_init_module_wrapper
572sys32_init_module_wrapper: 572sys_init_module_wrapper:
573 llgtr %r2,%r2 # void * 573 llgtr %r2,%r2 # void *
574 llgfr %r3,%r3 # unsigned long 574 llgfr %r3,%r3 # unsigned long
575 llgtr %r4,%r4 # char * 575 llgtr %r4,%r4 # char *
576 jg sys32_init_module # branch to system call 576 jg sys_init_module # branch to system call
577 577
578 .globl sys32_delete_module_wrapper 578 .globl sys_delete_module_wrapper
579sys32_delete_module_wrapper: 579sys_delete_module_wrapper:
580 llgtr %r2,%r2 # const char * 580 llgtr %r2,%r2 # const char *
581 llgfr %r3,%r3 # unsigned int 581 llgfr %r3,%r3 # unsigned int
582 jg sys32_delete_module # branch to system call 582 jg sys_delete_module # branch to system call
583 583
584 .globl sys32_quotactl_wrapper 584 .globl sys32_quotactl_wrapper
585sys32_quotactl_wrapper: 585sys32_quotactl_wrapper:
@@ -1832,11 +1832,26 @@ compat_sys_rt_tgsigqueueinfo_wrapper:
1832 llgtr %r5,%r5 # struct compat_siginfo * 1832 llgtr %r5,%r5 # struct compat_siginfo *
1833 jg compat_sys_rt_tgsigqueueinfo_wrapper # branch to system call 1833 jg compat_sys_rt_tgsigqueueinfo_wrapper # branch to system call
1834 1834
1835 .globl sys_perf_counter_open_wrapper 1835 .globl sys_perf_event_open_wrapper
1836sys_perf_counter_open_wrapper: 1836sys_perf_event_open_wrapper:
1837 llgtr %r2,%r2 # const struct perf_counter_attr * 1837 llgtr %r2,%r2 # const struct perf_event_attr *
1838 lgfr %r3,%r3 # pid_t 1838 lgfr %r3,%r3 # pid_t
1839 lgfr %r4,%r4 # int 1839 lgfr %r4,%r4 # int
1840 lgfr %r5,%r5 # int 1840 lgfr %r5,%r5 # int
1841 llgfr %r6,%r6 # unsigned long 1841 llgfr %r6,%r6 # unsigned long
1842 jg sys_perf_counter_open # branch to system call 1842 jg sys_perf_event_open # branch to system call
1843
1844 .globl sys_clone_wrapper
1845sys_clone_wrapper:
1846 llgfr %r2,%r2 # unsigned long
1847 llgfr %r3,%r3 # unsigned long
1848 llgtr %r4,%r4 # int *
1849 llgtr %r5,%r5 # int *
1850 jg sys_clone # branch to system call
1851
1852 .globl sys32_execve_wrapper
1853sys32_execve_wrapper:
1854 llgtr %r2,%r2 # char *
1855 llgtr %r3,%r3 # compat_uptr_t *
1856 llgtr %r4,%r4 # compat_uptr_t *
1857 jg sys32_execve # branch to system call
diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c
index 4c512561687d..20f282c911c2 100644
--- a/arch/s390/kernel/debug.c
+++ b/arch/s390/kernel/debug.c
@@ -881,11 +881,11 @@ static int debug_active=1;
881 * if debug_active is already off 881 * if debug_active is already off
882 */ 882 */
883static int 883static int
884s390dbf_procactive(ctl_table *table, int write, struct file *filp, 884s390dbf_procactive(ctl_table *table, int write,
885 void __user *buffer, size_t *lenp, loff_t *ppos) 885 void __user *buffer, size_t *lenp, loff_t *ppos)
886{ 886{
887 if (!write || debug_stoppable || !debug_active) 887 if (!write || debug_stoppable || !debug_active)
888 return proc_dointvec(table, write, filp, buffer, lenp, ppos); 888 return proc_dointvec(table, write, buffer, lenp, ppos);
889 else 889 else
890 return 0; 890 return 0;
891} 891}
diff --git a/arch/s390/kernel/entry.h b/arch/s390/kernel/entry.h
index 950c59c6688b..e1e5e767ab56 100644
--- a/arch/s390/kernel/entry.h
+++ b/arch/s390/kernel/entry.h
@@ -42,10 +42,12 @@ long sys_s390_fadvise64_64(struct fadvise64_64_args __user *args);
42long sys_s390_fallocate(int fd, int mode, loff_t offset, u32 len_high, 42long sys_s390_fallocate(int fd, int mode, loff_t offset, u32 len_high,
43 u32 len_low); 43 u32 len_low);
44long sys_fork(void); 44long sys_fork(void);
45long sys_clone(void); 45long sys_clone(unsigned long newsp, unsigned long clone_flags,
46 int __user *parent_tidptr, int __user *child_tidptr);
46long sys_vfork(void); 47long sys_vfork(void);
47void execve_tail(void); 48void execve_tail(void);
48long sys_execve(void); 49long sys_execve(char __user *name, char __user * __user *argv,
50 char __user * __user *envp);
49long sys_sigsuspend(int history0, int history1, old_sigset_t mask); 51long sys_sigsuspend(int history0, int history1, old_sigset_t mask);
50long sys_sigaction(int sig, const struct old_sigaction __user *act, 52long sys_sigaction(int sig, const struct old_sigaction __user *act,
51 struct old_sigaction __user *oact); 53 struct old_sigaction __user *oact);
diff --git a/arch/s390/kernel/init_task.c b/arch/s390/kernel/init_task.c
index fe787f9e5f3f..4d1c9fb0b540 100644
--- a/arch/s390/kernel/init_task.c
+++ b/arch/s390/kernel/init_task.c
@@ -25,9 +25,8 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
25 * way process stacks are handled. This is done by having a special 25 * way process stacks are handled. This is done by having a special
26 * "init_task" linker map entry.. 26 * "init_task" linker map entry..
27 */ 27 */
28union thread_union init_thread_union 28union thread_union init_thread_union __init_task_data =
29 __attribute__((__section__(".data.init_task"))) = 29 { INIT_THREAD_INFO(init_task) };
30 { INIT_THREAD_INFO(init_task) };
31 30
32/* 31/*
33 * Initial task structure. 32 * Initial task structure.
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c
index 5a43f27eec13..5417eb57271a 100644
--- a/arch/s390/kernel/process.c
+++ b/arch/s390/kernel/process.c
@@ -27,11 +27,11 @@
27#include <linux/init.h> 27#include <linux/init.h>
28#include <linux/module.h> 28#include <linux/module.h>
29#include <linux/notifier.h> 29#include <linux/notifier.h>
30#include <linux/utsname.h>
31#include <linux/tick.h> 30#include <linux/tick.h>
32#include <linux/elfcore.h> 31#include <linux/elfcore.h>
33#include <linux/kernel_stat.h> 32#include <linux/kernel_stat.h>
34#include <linux/syscalls.h> 33#include <linux/syscalls.h>
34#include <linux/compat.h>
35#include <asm/compat.h> 35#include <asm/compat.h>
36#include <asm/uaccess.h> 36#include <asm/uaccess.h>
37#include <asm/pgtable.h> 37#include <asm/pgtable.h>
@@ -230,17 +230,11 @@ SYSCALL_DEFINE0(fork)
230 return do_fork(SIGCHLD, regs->gprs[15], regs, 0, NULL, NULL); 230 return do_fork(SIGCHLD, regs->gprs[15], regs, 0, NULL, NULL);
231} 231}
232 232
233SYSCALL_DEFINE0(clone) 233SYSCALL_DEFINE4(clone, unsigned long, newsp, unsigned long, clone_flags,
234 int __user *, parent_tidptr, int __user *, child_tidptr)
234{ 235{
235 struct pt_regs *regs = task_pt_regs(current); 236 struct pt_regs *regs = task_pt_regs(current);
236 unsigned long clone_flags;
237 unsigned long newsp;
238 int __user *parent_tidptr, *child_tidptr;
239 237
240 clone_flags = regs->gprs[3];
241 newsp = regs->orig_gpr2;
242 parent_tidptr = (int __user *) regs->gprs[4];
243 child_tidptr = (int __user *) regs->gprs[5];
244 if (!newsp) 238 if (!newsp)
245 newsp = regs->gprs[15]; 239 newsp = regs->gprs[15];
246 return do_fork(clone_flags, newsp, regs, 0, 240 return do_fork(clone_flags, newsp, regs, 0,
@@ -274,30 +268,25 @@ asmlinkage void execve_tail(void)
274/* 268/*
275 * sys_execve() executes a new program. 269 * sys_execve() executes a new program.
276 */ 270 */
277SYSCALL_DEFINE0(execve) 271SYSCALL_DEFINE3(execve, char __user *, name, char __user * __user *, argv,
272 char __user * __user *, envp)
278{ 273{
279 struct pt_regs *regs = task_pt_regs(current); 274 struct pt_regs *regs = task_pt_regs(current);
280 char *filename; 275 char *filename;
281 unsigned long result; 276 long rc;
282 int rc;
283 277
284 filename = getname((char __user *) regs->orig_gpr2); 278 filename = getname(name);
285 if (IS_ERR(filename)) { 279 rc = PTR_ERR(filename);
286 result = PTR_ERR(filename); 280 if (IS_ERR(filename))
281 return rc;
282 rc = do_execve(filename, argv, envp, regs);
283 if (rc)
287 goto out; 284 goto out;
288 }
289 rc = do_execve(filename, (char __user * __user *) regs->gprs[3],
290 (char __user * __user *) regs->gprs[4], regs);
291 if (rc) {
292 result = rc;
293 goto out_putname;
294 }
295 execve_tail(); 285 execve_tail();
296 result = regs->gprs[2]; 286 rc = regs->gprs[2];
297out_putname:
298 putname(filename);
299out: 287out:
300 return result; 288 putname(filename);
289 return rc;
301} 290}
302 291
303/* 292/*
diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c
index f3ddd7ac06c5..a8738676b26c 100644
--- a/arch/s390/kernel/ptrace.c
+++ b/arch/s390/kernel/ptrace.c
@@ -339,24 +339,10 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
339 int copied, ret; 339 int copied, ret;
340 340
341 switch (request) { 341 switch (request) {
342 case PTRACE_PEEKTEXT:
343 case PTRACE_PEEKDATA:
344 /* Remove high order bit from address (only for 31 bit). */
345 addr &= PSW_ADDR_INSN;
346 /* read word at location addr. */
347 return generic_ptrace_peekdata(child, addr, data);
348
349 case PTRACE_PEEKUSR: 342 case PTRACE_PEEKUSR:
350 /* read the word at location addr in the USER area. */ 343 /* read the word at location addr in the USER area. */
351 return peek_user(child, addr, data); 344 return peek_user(child, addr, data);
352 345
353 case PTRACE_POKETEXT:
354 case PTRACE_POKEDATA:
355 /* Remove high order bit from address (only for 31 bit). */
356 addr &= PSW_ADDR_INSN;
357 /* write the word at location addr. */
358 return generic_ptrace_pokedata(child, addr, data);
359
360 case PTRACE_POKEUSR: 346 case PTRACE_POKEUSR:
361 /* write the word at location addr in the USER area */ 347 /* write the word at location addr in the USER area */
362 return poke_user(child, addr, data); 348 return poke_user(child, addr, data);
@@ -386,8 +372,11 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
386 copied += sizeof(unsigned long); 372 copied += sizeof(unsigned long);
387 } 373 }
388 return 0; 374 return 0;
375 default:
376 /* Removing high order bit from addr (only for 31 bit). */
377 addr &= PSW_ADDR_INSN;
378 return ptrace_request(child, request, addr, data);
389 } 379 }
390 return ptrace_request(child, request, addr, data);
391} 380}
392 381
393#ifdef CONFIG_COMPAT 382#ifdef CONFIG_COMPAT
diff --git a/arch/s390/kernel/sclp.S b/arch/s390/kernel/sclp.S
index 20639dfe0c42..e27ca63076d1 100644
--- a/arch/s390/kernel/sclp.S
+++ b/arch/s390/kernel/sclp.S
@@ -24,8 +24,6 @@ LC_EXT_INT_CODE = 0x86 # addr of ext int code
24# R3 = external interruption parameter if R2=0 24# R3 = external interruption parameter if R2=0
25# 25#
26 26
27.section ".init.text","ax"
28
29_sclp_wait_int: 27_sclp_wait_int:
30 stm %r6,%r15,24(%r15) # save registers 28 stm %r6,%r15,24(%r15) # save registers
31 basr %r13,0 # get base register 29 basr %r13,0 # get base register
@@ -318,9 +316,8 @@ _sclp_print_early:
318 .long _sclp_work_area 316 .long _sclp_work_area
319.Lascebc: 317.Lascebc:
320 .long _ascebc 318 .long _ascebc
321.previous
322 319
323.section ".init.data","a" 320.section .data,"aw",@progbits
324 .balign 4096 321 .balign 4096
325_sclp_work_area: 322_sclp_work_area:
326 .fill 4096 323 .fill 4096
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index 56c16876b919..c932caa5e850 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -147,11 +147,11 @@ static void smp_ext_bitcall(int cpu, ec_bit_sig sig)
147 udelay(10); 147 udelay(10);
148} 148}
149 149
150void arch_send_call_function_ipi(cpumask_t mask) 150void arch_send_call_function_ipi_mask(const struct cpumask *mask)
151{ 151{
152 int cpu; 152 int cpu;
153 153
154 for_each_cpu_mask(cpu, mask) 154 for_each_cpu(cpu, mask)
155 smp_ext_bitcall(cpu, ec_call_function); 155 smp_ext_bitcall(cpu, ec_call_function);
156} 156}
157 157
@@ -475,10 +475,8 @@ static int __cpuinit smp_alloc_lowcore(int cpu)
475{ 475{
476 unsigned long async_stack, panic_stack; 476 unsigned long async_stack, panic_stack;
477 struct _lowcore *lowcore; 477 struct _lowcore *lowcore;
478 int lc_order;
479 478
480 lc_order = sizeof(long) == 8 ? 1 : 0; 479 lowcore = (void *) __get_free_pages(GFP_KERNEL | GFP_DMA, LC_ORDER);
481 lowcore = (void *) __get_free_pages(GFP_KERNEL | GFP_DMA, lc_order);
482 if (!lowcore) 480 if (!lowcore)
483 return -ENOMEM; 481 return -ENOMEM;
484 async_stack = __get_free_pages(GFP_KERNEL, ASYNC_ORDER); 482 async_stack = __get_free_pages(GFP_KERNEL, ASYNC_ORDER);
@@ -509,16 +507,14 @@ static int __cpuinit smp_alloc_lowcore(int cpu)
509out: 507out:
510 free_page(panic_stack); 508 free_page(panic_stack);
511 free_pages(async_stack, ASYNC_ORDER); 509 free_pages(async_stack, ASYNC_ORDER);
512 free_pages((unsigned long) lowcore, lc_order); 510 free_pages((unsigned long) lowcore, LC_ORDER);
513 return -ENOMEM; 511 return -ENOMEM;
514} 512}
515 513
516static void smp_free_lowcore(int cpu) 514static void smp_free_lowcore(int cpu)
517{ 515{
518 struct _lowcore *lowcore; 516 struct _lowcore *lowcore;
519 int lc_order;
520 517
521 lc_order = sizeof(long) == 8 ? 1 : 0;
522 lowcore = lowcore_ptr[cpu]; 518 lowcore = lowcore_ptr[cpu];
523#ifndef CONFIG_64BIT 519#ifndef CONFIG_64BIT
524 if (MACHINE_HAS_IEEE) 520 if (MACHINE_HAS_IEEE)
@@ -528,7 +524,7 @@ static void smp_free_lowcore(int cpu)
528#endif 524#endif
529 free_page(lowcore->panic_stack - PAGE_SIZE); 525 free_page(lowcore->panic_stack - PAGE_SIZE);
530 free_pages(lowcore->async_stack - ASYNC_SIZE, ASYNC_ORDER); 526 free_pages(lowcore->async_stack - ASYNC_SIZE, ASYNC_ORDER);
531 free_pages((unsigned long) lowcore, lc_order); 527 free_pages((unsigned long) lowcore, LC_ORDER);
532 lowcore_ptr[cpu] = NULL; 528 lowcore_ptr[cpu] = NULL;
533} 529}
534 530
@@ -664,7 +660,6 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
664 unsigned long async_stack, panic_stack; 660 unsigned long async_stack, panic_stack;
665 struct _lowcore *lowcore; 661 struct _lowcore *lowcore;
666 unsigned int cpu; 662 unsigned int cpu;
667 int lc_order;
668 663
669 smp_detect_cpus(); 664 smp_detect_cpus();
670 665
@@ -674,8 +669,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
674 print_cpu_info(); 669 print_cpu_info();
675 670
676 /* Reallocate current lowcore, but keep its contents. */ 671 /* Reallocate current lowcore, but keep its contents. */
677 lc_order = sizeof(long) == 8 ? 1 : 0; 672 lowcore = (void *) __get_free_pages(GFP_KERNEL | GFP_DMA, LC_ORDER);
678 lowcore = (void *) __get_free_pages(GFP_KERNEL | GFP_DMA, lc_order);
679 panic_stack = __get_free_page(GFP_KERNEL); 673 panic_stack = __get_free_page(GFP_KERNEL);
680 async_stack = __get_free_pages(GFP_KERNEL, ASYNC_ORDER); 674 async_stack = __get_free_pages(GFP_KERNEL, ASYNC_ORDER);
681 BUG_ON(!lowcore || !panic_stack || !async_stack); 675 BUG_ON(!lowcore || !panic_stack || !async_stack);
@@ -1047,42 +1041,6 @@ out:
1047static SYSDEV_CLASS_ATTR(dispatching, 0644, dispatching_show, 1041static SYSDEV_CLASS_ATTR(dispatching, 0644, dispatching_show,
1048 dispatching_store); 1042 dispatching_store);
1049 1043
1050/*
1051 * If the resume kernel runs on another cpu than the suspended kernel,
1052 * we have to switch the cpu IDs in the logical map.
1053 */
1054void smp_switch_boot_cpu_in_resume(u32 resume_phys_cpu_id,
1055 struct _lowcore *suspend_lowcore)
1056{
1057 int cpu, suspend_cpu_id, resume_cpu_id;
1058 u32 suspend_phys_cpu_id;
1059
1060 suspend_phys_cpu_id = __cpu_logical_map[suspend_lowcore->cpu_nr];
1061 suspend_cpu_id = suspend_lowcore->cpu_nr;
1062
1063 for_each_present_cpu(cpu) {
1064 if (__cpu_logical_map[cpu] == resume_phys_cpu_id) {
1065 resume_cpu_id = cpu;
1066 goto found;
1067 }
1068 }
1069 panic("Could not find resume cpu in logical map.\n");
1070
1071found:
1072 printk("Resume cpu ID: %i/%i\n", resume_phys_cpu_id, resume_cpu_id);
1073 printk("Suspend cpu ID: %i/%i\n", suspend_phys_cpu_id, suspend_cpu_id);
1074
1075 __cpu_logical_map[resume_cpu_id] = suspend_phys_cpu_id;
1076 __cpu_logical_map[suspend_cpu_id] = resume_phys_cpu_id;
1077
1078 lowcore_ptr[suspend_cpu_id]->cpu_addr = resume_phys_cpu_id;
1079}
1080
1081u32 smp_get_phys_cpu_id(void)
1082{
1083 return __cpu_logical_map[smp_processor_id()];
1084}
1085
1086static int __init topology_init(void) 1044static int __init topology_init(void)
1087{ 1045{
1088 int cpu; 1046 int cpu;
diff --git a/arch/s390/kernel/suspend.c b/arch/s390/kernel/suspend.c
index 086bee970cae..cf9e5c6d5527 100644
--- a/arch/s390/kernel/suspend.c
+++ b/arch/s390/kernel/suspend.c
@@ -6,36 +6,26 @@
6 * Author(s): Hans-Joachim Picht <hans@linux.vnet.ibm.com> 6 * Author(s): Hans-Joachim Picht <hans@linux.vnet.ibm.com>
7 */ 7 */
8 8
9#include <linux/suspend.h>
10#include <linux/reboot.h>
11#include <linux/pfn.h> 9#include <linux/pfn.h>
12#include <linux/mm.h>
13#include <asm/sections.h>
14#include <asm/system.h> 10#include <asm/system.h>
15#include <asm/ipl.h>
16 11
17/* 12/*
18 * References to section boundaries 13 * References to section boundaries
19 */ 14 */
20extern const void __nosave_begin, __nosave_end; 15extern const void __nosave_begin, __nosave_end;
21 16
22/*
23 * check if given pfn is in the 'nosave' or in the read only NSS section
24 */
25int pfn_is_nosave(unsigned long pfn) 17int pfn_is_nosave(unsigned long pfn)
26{ 18{
27 unsigned long nosave_begin_pfn = __pa(&__nosave_begin) >> PAGE_SHIFT; 19 unsigned long nosave_begin_pfn = PFN_DOWN(__pa(&__nosave_begin));
28 unsigned long nosave_end_pfn = PAGE_ALIGN(__pa(&__nosave_end)) 20 unsigned long nosave_end_pfn = PFN_DOWN(__pa(&__nosave_end));
29 >> PAGE_SHIFT;
30 unsigned long eshared_pfn = PFN_DOWN(__pa(&_eshared)) - 1;
31 unsigned long stext_pfn = PFN_DOWN(__pa(&_stext));
32 21
22 /* Always save lowcore pages (LC protection might be enabled). */
23 if (pfn <= LC_PAGES)
24 return 0;
33 if (pfn >= nosave_begin_pfn && pfn < nosave_end_pfn) 25 if (pfn >= nosave_begin_pfn && pfn < nosave_end_pfn)
34 return 1; 26 return 1;
35 if (pfn >= stext_pfn && pfn <= eshared_pfn) { 27 /* Skip memory holes and read-only pages (NSS, DCSS, ...). */
36 if (ipl_info.type == IPL_TYPE_NSS) 28 if (tprot(PFN_PHYS(pfn)))
37 return 1;
38 } else if ((tprot(pfn * PAGE_SIZE) && pfn > 0))
39 return 1; 29 return 1;
40 return 0; 30 return 0;
41} 31}
diff --git a/arch/s390/kernel/swsusp_asm64.S b/arch/s390/kernel/swsusp_asm64.S
index 7cd6b096f0d1..fe927d0bc20b 100644
--- a/arch/s390/kernel/swsusp_asm64.S
+++ b/arch/s390/kernel/swsusp_asm64.S
@@ -9,6 +9,7 @@
9 9
10#include <asm/page.h> 10#include <asm/page.h>
11#include <asm/ptrace.h> 11#include <asm/ptrace.h>
12#include <asm/thread_info.h>
12#include <asm/asm-offsets.h> 13#include <asm/asm-offsets.h>
13 14
14/* 15/*
@@ -41,6 +42,9 @@ swsusp_arch_suspend:
41 /* Get pointer to save area */ 42 /* Get pointer to save area */
42 lghi %r1,0x1000 43 lghi %r1,0x1000
43 44
45 /* Save CPU address */
46 stap __LC_CPU_ADDRESS(%r1)
47
44 /* Store registers */ 48 /* Store registers */
45 mvc 0x318(4,%r1),__SF_EMPTY(%r15) /* move prefix to lowcore */ 49 mvc 0x318(4,%r1),__SF_EMPTY(%r15) /* move prefix to lowcore */
46 stfpc 0x31c(%r1) /* store fpu control */ 50 stfpc 0x31c(%r1) /* store fpu control */
@@ -102,11 +106,10 @@ swsusp_arch_resume:
102 aghi %r15,-STACK_FRAME_OVERHEAD 106 aghi %r15,-STACK_FRAME_OVERHEAD
103 stg %r1,__SF_BACKCHAIN(%r15) 107 stg %r1,__SF_BACKCHAIN(%r15)
104 108
105#ifdef CONFIG_SMP 109 /* Make all free pages stable */
106 /* Save boot cpu number */ 110 lghi %r2,1
107 brasl %r14,smp_get_phys_cpu_id 111 brasl %r14,arch_set_page_states
108 lgr %r10,%r2 112
109#endif
110 /* Deactivate DAT */ 113 /* Deactivate DAT */
111 stnsm __SF_EMPTY(%r15),0xfb 114 stnsm __SF_EMPTY(%r15),0xfb
112 115
@@ -133,6 +136,69 @@ swsusp_arch_resume:
1332: 1362:
134 ptlb /* flush tlb */ 137 ptlb /* flush tlb */
135 138
139 /* Reset System */
140 larl %r1,restart_entry
141 larl %r2,.Lrestart_diag308_psw
142 og %r1,0(%r2)
143 stg %r1,0(%r0)
144 larl %r1,.Lnew_pgm_check_psw
145 epsw %r2,%r3
146 stm %r2,%r3,0(%r1)
147 mvc __LC_PGM_NEW_PSW(16,%r0),0(%r1)
148 lghi %r0,0
149 diag %r0,%r0,0x308
150restart_entry:
151 lhi %r1,1
152 sigp %r1,%r0,0x12
153 sam64
154 larl %r1,.Lnew_pgm_check_psw
155 lpswe 0(%r1)
156pgm_check_entry:
157
158 /* Switch to original suspend CPU */
159 larl %r1,.Lresume_cpu /* Resume CPU address: r2 */
160 stap 0(%r1)
161 llgh %r2,0(%r1)
162 lghi %r3,0x1000
163 llgh %r1,__LC_CPU_ADDRESS(%r3) /* Suspend CPU address: r1 */
164 cgr %r1,%r2
165 je restore_registers /* r1 = r2 -> nothing to do */
166 larl %r4,.Lrestart_suspend_psw /* Set new restart PSW */
167 mvc __LC_RESTART_PSW(16,%r0),0(%r4)
1683:
169 sigp %r9,%r1,__SIGP_INITIAL_CPU_RESET
170 brc 8,4f /* accepted */
171 brc 2,3b /* busy, try again */
172
173 /* Suspend CPU not available -> panic */
174 larl %r15,init_thread_union
175 ahi %r15,1<<(PAGE_SHIFT+THREAD_ORDER)
176 larl %r2,.Lpanic_string
177 larl %r3,_sclp_print_early
178 lghi %r1,0
179 sam31
180 sigp %r1,%r0,0x12
181 basr %r14,%r3
182 larl %r3,.Ldisabled_wait_31
183 lpsw 0(%r3)
1844:
185 /* Switch to suspend CPU */
186 sigp %r9,%r1,__SIGP_RESTART /* start suspend CPU */
187 brc 2,4b /* busy, try again */
1885:
189 sigp %r9,%r2,__SIGP_STOP /* stop resume (current) CPU */
1906: j 6b
191
192restart_suspend:
193 larl %r1,.Lresume_cpu
194 llgh %r2,0(%r1)
1957:
196 sigp %r9,%r2,__SIGP_SENSE /* Wait for resume CPU */
197 brc 2,7b /* busy, try again */
198 tmll %r9,0x40 /* Test if resume CPU is stopped */
199 jz 7b
200
201restore_registers:
136 /* Restore registers */ 202 /* Restore registers */
137 lghi %r13,0x1000 /* %r1 = pointer to save arae */ 203 lghi %r13,0x1000 /* %r1 = pointer to save arae */
138 204
@@ -166,19 +232,33 @@ swsusp_arch_resume:
166 /* Pointer to save area */ 232 /* Pointer to save area */
167 lghi %r13,0x1000 233 lghi %r13,0x1000
168 234
169#ifdef CONFIG_SMP
170 /* Switch CPUs */
171 lgr %r2,%r10 /* get cpu id */
172 llgf %r3,0x318(%r13)
173 brasl %r14,smp_switch_boot_cpu_in_resume
174#endif
175 /* Restore prefix register */ 235 /* Restore prefix register */
176 spx 0x318(%r13) 236 spx 0x318(%r13)
177 237
178 /* Activate DAT */ 238 /* Activate DAT */
179 stosm __SF_EMPTY(%r15),0x04 239 stosm __SF_EMPTY(%r15),0x04
180 240
241 /* Make all free pages unstable */
242 lghi %r2,0
243 brasl %r14,arch_set_page_states
244
181 /* Return 0 */ 245 /* Return 0 */
182 lmg %r6,%r15,STACK_FRAME_OVERHEAD + __SF_GPRS(%r15) 246 lmg %r6,%r15,STACK_FRAME_OVERHEAD + __SF_GPRS(%r15)
183 lghi %r2,0 247 lghi %r2,0
184 br %r14 248 br %r14
249
250 .section .data.nosave,"aw",@progbits
251 .align 8
252.Ldisabled_wait_31:
253 .long 0x000a0000,0x00000000
254.Lpanic_string:
255 .asciz "Resume not possible because suspend CPU is no longer available"
256 .align 8
257.Lrestart_diag308_psw:
258 .long 0x00080000,0x80000000
259.Lrestart_suspend_psw:
260 .quad 0x0000000180000000,restart_suspend
261.Lnew_pgm_check_psw:
262 .quad 0,pgm_check_entry
263.Lresume_cpu:
264 .byte 0,0
diff --git a/arch/s390/kernel/sys_s390.c b/arch/s390/kernel/sys_s390.c
index c7ae4b17e0e3..e9d94f61d500 100644
--- a/arch/s390/kernel/sys_s390.c
+++ b/arch/s390/kernel/sys_s390.c
@@ -29,7 +29,6 @@
29#include <linux/personality.h> 29#include <linux/personality.h>
30#include <linux/unistd.h> 30#include <linux/unistd.h>
31#include <linux/ipc.h> 31#include <linux/ipc.h>
32#include <linux/syscalls.h>
33#include <asm/uaccess.h> 32#include <asm/uaccess.h>
34#include "entry.h" 33#include "entry.h"
35 34
diff --git a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S
index ad1acd200385..30eca070d426 100644
--- a/arch/s390/kernel/syscalls.S
+++ b/arch/s390/kernel/syscalls.S
@@ -19,7 +19,7 @@ SYSCALL(sys_restart_syscall,sys_restart_syscall,sys_restart_syscall)
19SYSCALL(sys_creat,sys_creat,sys32_creat_wrapper) 19SYSCALL(sys_creat,sys_creat,sys32_creat_wrapper)
20SYSCALL(sys_link,sys_link,sys32_link_wrapper) 20SYSCALL(sys_link,sys_link,sys32_link_wrapper)
21SYSCALL(sys_unlink,sys_unlink,sys32_unlink_wrapper) /* 10 */ 21SYSCALL(sys_unlink,sys_unlink,sys32_unlink_wrapper) /* 10 */
22SYSCALL(sys_execve,sys_execve,sys32_execve) 22SYSCALL(sys_execve,sys_execve,sys32_execve_wrapper)
23SYSCALL(sys_chdir,sys_chdir,sys32_chdir_wrapper) 23SYSCALL(sys_chdir,sys_chdir,sys32_chdir_wrapper)
24SYSCALL(sys_time,sys_ni_syscall,sys32_time_wrapper) /* old time syscall */ 24SYSCALL(sys_time,sys_ni_syscall,sys32_time_wrapper) /* old time syscall */
25SYSCALL(sys_mknod,sys_mknod,sys32_mknod_wrapper) 25SYSCALL(sys_mknod,sys_mknod,sys32_mknod_wrapper)
@@ -128,7 +128,7 @@ SYSCALL(sys_sysinfo,sys_sysinfo,compat_sys_sysinfo_wrapper)
128SYSCALL(sys_ipc,sys_ipc,sys32_ipc_wrapper) 128SYSCALL(sys_ipc,sys_ipc,sys32_ipc_wrapper)
129SYSCALL(sys_fsync,sys_fsync,sys32_fsync_wrapper) 129SYSCALL(sys_fsync,sys_fsync,sys32_fsync_wrapper)
130SYSCALL(sys_sigreturn,sys_sigreturn,sys32_sigreturn) 130SYSCALL(sys_sigreturn,sys_sigreturn,sys32_sigreturn)
131SYSCALL(sys_clone,sys_clone,sys32_clone) /* 120 */ 131SYSCALL(sys_clone,sys_clone,sys_clone_wrapper) /* 120 */
132SYSCALL(sys_setdomainname,sys_setdomainname,sys32_setdomainname_wrapper) 132SYSCALL(sys_setdomainname,sys_setdomainname,sys32_setdomainname_wrapper)
133SYSCALL(sys_newuname,sys_s390_newuname,sys32_newuname_wrapper) 133SYSCALL(sys_newuname,sys_s390_newuname,sys32_newuname_wrapper)
134NI_SYSCALL /* modify_ldt for i386 */ 134NI_SYSCALL /* modify_ldt for i386 */
@@ -136,8 +136,8 @@ SYSCALL(sys_adjtimex,sys_adjtimex,compat_sys_adjtimex_wrapper)
136SYSCALL(sys_mprotect,sys_mprotect,sys32_mprotect_wrapper) /* 125 */ 136SYSCALL(sys_mprotect,sys_mprotect,sys32_mprotect_wrapper) /* 125 */
137SYSCALL(sys_sigprocmask,sys_sigprocmask,compat_sys_sigprocmask_wrapper) 137SYSCALL(sys_sigprocmask,sys_sigprocmask,compat_sys_sigprocmask_wrapper)
138NI_SYSCALL /* old "create module" */ 138NI_SYSCALL /* old "create module" */
139SYSCALL(sys_init_module,sys_init_module,sys32_init_module_wrapper) 139SYSCALL(sys_init_module,sys_init_module,sys_init_module_wrapper)
140SYSCALL(sys_delete_module,sys_delete_module,sys32_delete_module_wrapper) 140SYSCALL(sys_delete_module,sys_delete_module,sys_delete_module_wrapper)
141NI_SYSCALL /* 130: old get_kernel_syms */ 141NI_SYSCALL /* 130: old get_kernel_syms */
142SYSCALL(sys_quotactl,sys_quotactl,sys32_quotactl_wrapper) 142SYSCALL(sys_quotactl,sys_quotactl,sys32_quotactl_wrapper)
143SYSCALL(sys_getpgid,sys_getpgid,sys32_getpgid_wrapper) 143SYSCALL(sys_getpgid,sys_getpgid,sys32_getpgid_wrapper)
@@ -339,4 +339,4 @@ SYSCALL(sys_epoll_create1,sys_epoll_create1,sys_epoll_create1_wrapper)
339SYSCALL(sys_preadv,sys_preadv,compat_sys_preadv_wrapper) 339SYSCALL(sys_preadv,sys_preadv,compat_sys_preadv_wrapper)
340SYSCALL(sys_pwritev,sys_pwritev,compat_sys_pwritev_wrapper) 340SYSCALL(sys_pwritev,sys_pwritev,compat_sys_pwritev_wrapper)
341SYSCALL(sys_rt_tgsigqueueinfo,sys_rt_tgsigqueueinfo,compat_sys_rt_tgsigqueueinfo_wrapper) /* 330 */ 341SYSCALL(sys_rt_tgsigqueueinfo,sys_rt_tgsigqueueinfo,compat_sys_rt_tgsigqueueinfo_wrapper) /* 330 */
342SYSCALL(sys_perf_counter_open,sys_perf_counter_open,sys_perf_counter_open_wrapper) 342SYSCALL(sys_perf_event_open,sys_perf_event_open,sys_perf_event_open_wrapper)
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c
index e3dc28b8075d..34162a0b2caa 100644
--- a/arch/s390/kernel/time.c
+++ b/arch/s390/kernel/time.c
@@ -184,12 +184,14 @@ static void timing_alert_interrupt(__u16 code)
184static void etr_reset(void); 184static void etr_reset(void);
185static void stp_reset(void); 185static void stp_reset(void);
186 186
187unsigned long read_persistent_clock(void) 187void read_persistent_clock(struct timespec *ts)
188{ 188{
189 struct timespec ts; 189 tod_to_timeval(get_clock() - TOD_UNIX_EPOCH, ts);
190}
190 191
191 tod_to_timeval(get_clock() - TOD_UNIX_EPOCH, &ts); 192void read_boot_clock(struct timespec *ts)
192 return ts.tv_sec; 193{
194 tod_to_timeval(sched_clock_base_cc - TOD_UNIX_EPOCH, ts);
193} 195}
194 196
195static cycle_t read_tod_clock(struct clocksource *cs) 197static cycle_t read_tod_clock(struct clocksource *cs)
@@ -207,6 +209,10 @@ static struct clocksource clocksource_tod = {
207 .flags = CLOCK_SOURCE_IS_CONTINUOUS, 209 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
208}; 210};
209 211
212struct clocksource * __init clocksource_default_clock(void)
213{
214 return &clocksource_tod;
215}
210 216
211void update_vsyscall(struct timespec *wall_time, struct clocksource *clock) 217void update_vsyscall(struct timespec *wall_time, struct clocksource *clock)
212{ 218{
@@ -244,10 +250,6 @@ void update_vsyscall_tz(void)
244 */ 250 */
245void __init time_init(void) 251void __init time_init(void)
246{ 252{
247 struct timespec ts;
248 unsigned long flags;
249 cycle_t now;
250
251 /* Reset time synchronization interfaces. */ 253 /* Reset time synchronization interfaces. */
252 etr_reset(); 254 etr_reset();
253 stp_reset(); 255 stp_reset();
@@ -263,26 +265,6 @@ void __init time_init(void)
263 if (clocksource_register(&clocksource_tod) != 0) 265 if (clocksource_register(&clocksource_tod) != 0)
264 panic("Could not register TOD clock source"); 266 panic("Could not register TOD clock source");
265 267
266 /*
267 * The TOD clock is an accurate clock. The xtime should be
268 * initialized in a way that the difference between TOD and
269 * xtime is reasonably small. Too bad that timekeeping_init
270 * sets xtime.tv_nsec to zero. In addition the clock source
271 * change from the jiffies clock source to the TOD clock
272 * source add another error of up to 1/HZ second. The same
273 * function sets wall_to_monotonic to a value that is too
274 * small for /proc/uptime to be accurate.
275 * Reset xtime and wall_to_monotonic to sane values.
276 */
277 write_seqlock_irqsave(&xtime_lock, flags);
278 now = get_clock();
279 tod_to_timeval(now - TOD_UNIX_EPOCH, &xtime);
280 clocksource_tod.cycle_last = now;
281 clocksource_tod.raw_time = xtime;
282 tod_to_timeval(sched_clock_base_cc - TOD_UNIX_EPOCH, &ts);
283 set_normalized_timespec(&wall_to_monotonic, -ts.tv_sec, -ts.tv_nsec);
284 write_sequnlock_irqrestore(&xtime_lock, flags);
285
286 /* Enable TOD clock interrupts on the boot cpu. */ 268 /* Enable TOD clock interrupts on the boot cpu. */
287 init_cpu_timer(); 269 init_cpu_timer();
288 270
diff --git a/arch/s390/kernel/vdso.c b/arch/s390/kernel/vdso.c
index 45e1708b70fd..45a3e9a7ae21 100644
--- a/arch/s390/kernel/vdso.c
+++ b/arch/s390/kernel/vdso.c
@@ -75,7 +75,7 @@ __setup("vdso=", vdso_setup);
75static union { 75static union {
76 struct vdso_data data; 76 struct vdso_data data;
77 u8 page[PAGE_SIZE]; 77 u8 page[PAGE_SIZE];
78} vdso_data_store __attribute__((__section__(".data.page_aligned"))); 78} vdso_data_store __page_aligned_data;
79struct vdso_data *vdso_data = &vdso_data_store.data; 79struct vdso_data *vdso_data = &vdso_data_store.data;
80 80
81/* 81/*
diff --git a/arch/s390/kernel/vdso32/Makefile b/arch/s390/kernel/vdso32/Makefile
index ca78ad60ba24..d13e8755a8cc 100644
--- a/arch/s390/kernel/vdso32/Makefile
+++ b/arch/s390/kernel/vdso32/Makefile
@@ -13,7 +13,7 @@ KBUILD_AFLAGS_31 += -m31 -s
13KBUILD_CFLAGS_31 := $(filter-out -m64,$(KBUILD_CFLAGS)) 13KBUILD_CFLAGS_31 := $(filter-out -m64,$(KBUILD_CFLAGS))
14KBUILD_CFLAGS_31 += -m31 -fPIC -shared -fno-common -fno-builtin 14KBUILD_CFLAGS_31 += -m31 -fPIC -shared -fno-common -fno-builtin
15KBUILD_CFLAGS_31 += -nostdlib -Wl,-soname=linux-vdso32.so.1 \ 15KBUILD_CFLAGS_31 += -nostdlib -Wl,-soname=linux-vdso32.so.1 \
16 $(call ld-option, -Wl$(comma)--hash-style=sysv) 16 $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
17 17
18$(targets:%=$(obj)/%.dbg): KBUILD_CFLAGS = $(KBUILD_CFLAGS_31) 18$(targets:%=$(obj)/%.dbg): KBUILD_CFLAGS = $(KBUILD_CFLAGS_31)
19$(targets:%=$(obj)/%.dbg): KBUILD_AFLAGS = $(KBUILD_AFLAGS_31) 19$(targets:%=$(obj)/%.dbg): KBUILD_AFLAGS = $(KBUILD_AFLAGS_31)
diff --git a/arch/s390/kernel/vdso32/vdso32_wrapper.S b/arch/s390/kernel/vdso32/vdso32_wrapper.S
index 61639a89e70b..ae42f8ce350b 100644
--- a/arch/s390/kernel/vdso32/vdso32_wrapper.S
+++ b/arch/s390/kernel/vdso32/vdso32_wrapper.S
@@ -1,7 +1,8 @@
1#include <linux/init.h> 1#include <linux/init.h>
2#include <linux/linkage.h>
2#include <asm/page.h> 3#include <asm/page.h>
3 4
4 .section ".data.page_aligned" 5 __PAGE_ALIGNED_DATA
5 6
6 .globl vdso32_start, vdso32_end 7 .globl vdso32_start, vdso32_end
7 .balign PAGE_SIZE 8 .balign PAGE_SIZE
diff --git a/arch/s390/kernel/vdso64/Makefile b/arch/s390/kernel/vdso64/Makefile
index 6fc8e829258c..449352dda9cd 100644
--- a/arch/s390/kernel/vdso64/Makefile
+++ b/arch/s390/kernel/vdso64/Makefile
@@ -13,7 +13,7 @@ KBUILD_AFLAGS_64 += -m64 -s
13KBUILD_CFLAGS_64 := $(filter-out -m64,$(KBUILD_CFLAGS)) 13KBUILD_CFLAGS_64 := $(filter-out -m64,$(KBUILD_CFLAGS))
14KBUILD_CFLAGS_64 += -m64 -fPIC -shared -fno-common -fno-builtin 14KBUILD_CFLAGS_64 += -m64 -fPIC -shared -fno-common -fno-builtin
15KBUILD_CFLAGS_64 += -nostdlib -Wl,-soname=linux-vdso64.so.1 \ 15KBUILD_CFLAGS_64 += -nostdlib -Wl,-soname=linux-vdso64.so.1 \
16 $(call ld-option, -Wl$(comma)--hash-style=sysv) 16 $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
17 17
18$(targets:%=$(obj)/%.dbg): KBUILD_CFLAGS = $(KBUILD_CFLAGS_64) 18$(targets:%=$(obj)/%.dbg): KBUILD_CFLAGS = $(KBUILD_CFLAGS_64)
19$(targets:%=$(obj)/%.dbg): KBUILD_AFLAGS = $(KBUILD_AFLAGS_64) 19$(targets:%=$(obj)/%.dbg): KBUILD_AFLAGS = $(KBUILD_AFLAGS_64)
diff --git a/arch/s390/kernel/vdso64/vdso64_wrapper.S b/arch/s390/kernel/vdso64/vdso64_wrapper.S
index d8e2ac14d564..c245842b516f 100644
--- a/arch/s390/kernel/vdso64/vdso64_wrapper.S
+++ b/arch/s390/kernel/vdso64/vdso64_wrapper.S
@@ -1,7 +1,8 @@
1#include <linux/init.h> 1#include <linux/init.h>
2#include <linux/linkage.h>
2#include <asm/page.h> 3#include <asm/page.h>
3 4
4 .section ".data.page_aligned" 5 __PAGE_ALIGNED_DATA
5 6
6 .globl vdso64_start, vdso64_end 7 .globl vdso64_start, vdso64_end
7 .balign PAGE_SIZE 8 .balign PAGE_SIZE
diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c
index 2c2f98353415..43486c2408e1 100644
--- a/arch/s390/kvm/interrupt.c
+++ b/arch/s390/kvm/interrupt.c
@@ -478,7 +478,7 @@ int kvm_s390_inject_program_int(struct kvm_vcpu *vcpu, u16 code)
478 if (!inti) 478 if (!inti)
479 return -ENOMEM; 479 return -ENOMEM;
480 480
481 inti->type = KVM_S390_PROGRAM_INT;; 481 inti->type = KVM_S390_PROGRAM_INT;
482 inti->pgm.code = code; 482 inti->pgm.code = code;
483 483
484 VCPU_EVENT(vcpu, 3, "inject: program check %d (from kernel)", code); 484 VCPU_EVENT(vcpu, 3, "inject: program check %d (from kernel)", code);
diff --git a/arch/s390/mm/cmm.c b/arch/s390/mm/cmm.c
index 413c240cbca7..b201135cc18c 100644
--- a/arch/s390/mm/cmm.c
+++ b/arch/s390/mm/cmm.c
@@ -262,7 +262,7 @@ cmm_skip_blanks(char *cp, char **endp)
262static struct ctl_table cmm_table[]; 262static struct ctl_table cmm_table[];
263 263
264static int 264static int
265cmm_pages_handler(ctl_table *ctl, int write, struct file *filp, 265cmm_pages_handler(ctl_table *ctl, int write,
266 void __user *buffer, size_t *lenp, loff_t *ppos) 266 void __user *buffer, size_t *lenp, loff_t *ppos)
267{ 267{
268 char buf[16], *p; 268 char buf[16], *p;
@@ -303,7 +303,7 @@ cmm_pages_handler(ctl_table *ctl, int write, struct file *filp,
303} 303}
304 304
305static int 305static int
306cmm_timeout_handler(ctl_table *ctl, int write, struct file *filp, 306cmm_timeout_handler(ctl_table *ctl, int write,
307 void __user *buffer, size_t *lenp, loff_t *ppos) 307 void __user *buffer, size_t *lenp, loff_t *ppos)
308{ 308{
309 char buf[64], *p; 309 char buf[64], *p;
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c
index 1abbadd497e1..6d507462967a 100644
--- a/arch/s390/mm/fault.c
+++ b/arch/s390/mm/fault.c
@@ -10,7 +10,7 @@
10 * Copyright (C) 1995 Linus Torvalds 10 * Copyright (C) 1995 Linus Torvalds
11 */ 11 */
12 12
13#include <linux/perf_counter.h> 13#include <linux/perf_event.h>
14#include <linux/signal.h> 14#include <linux/signal.h>
15#include <linux/sched.h> 15#include <linux/sched.h>
16#include <linux/kernel.h> 16#include <linux/kernel.h>
@@ -306,7 +306,7 @@ do_exception(struct pt_regs *regs, unsigned long error_code, int write)
306 * interrupts again and then search the VMAs 306 * interrupts again and then search the VMAs
307 */ 307 */
308 local_irq_enable(); 308 local_irq_enable();
309 perf_swcounter_event(PERF_COUNT_SW_PAGE_FAULTS, 1, 0, regs, address); 309 perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, 0, regs, address);
310 down_read(&mm->mmap_sem); 310 down_read(&mm->mmap_sem);
311 311
312 si_code = SEGV_MAPERR; 312 si_code = SEGV_MAPERR;
@@ -366,11 +366,11 @@ good_area:
366 } 366 }
367 if (fault & VM_FAULT_MAJOR) { 367 if (fault & VM_FAULT_MAJOR) {
368 tsk->maj_flt++; 368 tsk->maj_flt++;
369 perf_swcounter_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, 0, 369 perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, 0,
370 regs, address); 370 regs, address);
371 } else { 371 } else {
372 tsk->min_flt++; 372 tsk->min_flt++;
373 perf_swcounter_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, 0, 373 perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, 0,
374 regs, address); 374 regs, address);
375 } 375 }
376 up_read(&mm->mmap_sem); 376 up_read(&mm->mmap_sem);
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c
index c634dfbe92e9..765647952221 100644
--- a/arch/s390/mm/init.c
+++ b/arch/s390/mm/init.c
@@ -105,7 +105,7 @@ void __init mem_init(void)
105 datasize = (unsigned long) &_edata - (unsigned long) &_etext; 105 datasize = (unsigned long) &_edata - (unsigned long) &_etext;
106 initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin; 106 initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin;
107 printk("Memory: %luk/%luk available (%ldk kernel code, %ldk reserved, %ldk data, %ldk init)\n", 107 printk("Memory: %luk/%luk available (%ldk kernel code, %ldk reserved, %ldk data, %ldk init)\n",
108 (unsigned long) nr_free_pages() << (PAGE_SHIFT-10), 108 nr_free_pages() << (PAGE_SHIFT-10),
109 max_mapnr << (PAGE_SHIFT-10), 109 max_mapnr << (PAGE_SHIFT-10),
110 codesize >> 10, 110 codesize >> 10,
111 reservedpages << (PAGE_SHIFT-10), 111 reservedpages << (PAGE_SHIFT-10),
diff --git a/arch/s390/mm/page-states.c b/arch/s390/mm/page-states.c
index f92ec203ad92..098923ae458f 100644
--- a/arch/s390/mm/page-states.c
+++ b/arch/s390/mm/page-states.c
@@ -50,28 +50,64 @@ void __init cmma_init(void)
50 cmma_flag = 0; 50 cmma_flag = 0;
51} 51}
52 52
53void arch_free_page(struct page *page, int order) 53static inline void set_page_unstable(struct page *page, int order)
54{ 54{
55 int i, rc; 55 int i, rc;
56 56
57 if (!cmma_flag)
58 return;
59 for (i = 0; i < (1 << order); i++) 57 for (i = 0; i < (1 << order); i++)
60 asm volatile(".insn rrf,0xb9ab0000,%0,%1,%2,0" 58 asm volatile(".insn rrf,0xb9ab0000,%0,%1,%2,0"
61 : "=&d" (rc) 59 : "=&d" (rc)
62 : "a" ((page_to_pfn(page) + i) << PAGE_SHIFT), 60 : "a" (page_to_phys(page + i)),
63 "i" (ESSA_SET_UNUSED)); 61 "i" (ESSA_SET_UNUSED));
64} 62}
65 63
66void arch_alloc_page(struct page *page, int order) 64void arch_free_page(struct page *page, int order)
67{ 65{
68 int i, rc;
69
70 if (!cmma_flag) 66 if (!cmma_flag)
71 return; 67 return;
68 set_page_unstable(page, order);
69}
70
71static inline void set_page_stable(struct page *page, int order)
72{
73 int i, rc;
74
72 for (i = 0; i < (1 << order); i++) 75 for (i = 0; i < (1 << order); i++)
73 asm volatile(".insn rrf,0xb9ab0000,%0,%1,%2,0" 76 asm volatile(".insn rrf,0xb9ab0000,%0,%1,%2,0"
74 : "=&d" (rc) 77 : "=&d" (rc)
75 : "a" ((page_to_pfn(page) + i) << PAGE_SHIFT), 78 : "a" (page_to_phys(page + i)),
76 "i" (ESSA_SET_STABLE)); 79 "i" (ESSA_SET_STABLE));
77} 80}
81
82void arch_alloc_page(struct page *page, int order)
83{
84 if (!cmma_flag)
85 return;
86 set_page_stable(page, order);
87}
88
89void arch_set_page_states(int make_stable)
90{
91 unsigned long flags, order, t;
92 struct list_head *l;
93 struct page *page;
94 struct zone *zone;
95
96 if (!cmma_flag)
97 return;
98 if (make_stable)
99 drain_local_pages(NULL);
100 for_each_populated_zone(zone) {
101 spin_lock_irqsave(&zone->lock, flags);
102 for_each_migratetype_order(order, t) {
103 list_for_each(l, &zone->free_area[order].free_list[t]) {
104 page = list_entry(l, struct page, lru);
105 if (make_stable)
106 set_page_stable(page, order);
107 else
108 set_page_unstable(page, order);
109 }
110 }
111 spin_unlock_irqrestore(&zone->lock, flags);
112 }
113}
diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c
index c70215247071..c60bfb309ce6 100644
--- a/arch/s390/mm/pgtable.c
+++ b/arch/s390/mm/pgtable.c
@@ -314,21 +314,18 @@ int s390_enable_sie(void)
314} 314}
315EXPORT_SYMBOL_GPL(s390_enable_sie); 315EXPORT_SYMBOL_GPL(s390_enable_sie);
316 316
317#ifdef CONFIG_DEBUG_PAGEALLOC 317#if defined(CONFIG_DEBUG_PAGEALLOC) && defined(CONFIG_HIBERNATION)
318#ifdef CONFIG_HIBERNATION
319bool kernel_page_present(struct page *page) 318bool kernel_page_present(struct page *page)
320{ 319{
321 unsigned long addr; 320 unsigned long addr;
322 int cc; 321 int cc;
323 322
324 addr = page_to_phys(page); 323 addr = page_to_phys(page);
325 asm("lra %1,0(%1)\n" 324 asm volatile(
326 "ipm %0\n" 325 " lra %1,0(%1)\n"
327 "srl %0,28" 326 " ipm %0\n"
328 :"=d"(cc),"+a"(addr)::"cc"); 327 " srl %0,28"
328 : "=d" (cc), "+a" (addr) : : "cc");
329 return cc == 0; 329 return cc == 0;
330} 330}
331 331#endif /* CONFIG_HIBERNATION && CONFIG_DEBUG_PAGEALLOC */
332#endif /* CONFIG_HIBERNATION */
333#endif /* CONFIG_DEBUG_PAGEALLOC */
334
diff --git a/arch/score/Kconfig b/arch/score/Kconfig
new file mode 100644
index 000000000000..55d413e6dcf2
--- /dev/null
+++ b/arch/score/Kconfig
@@ -0,0 +1,141 @@
1# For a description of the syntax of this configuration file,
2# see Documentation/kbuild/kconfig-language.txt.
3
4mainmenu "Linux/SCORE Kernel Configuration"
5
6menu "Machine selection"
7
8choice
9 prompt "System type"
10 default MACH_SPCT6600
11
12config ARCH_SCORE7
13 bool "SCORE7 processor"
14 select SYS_SUPPORTS_32BIT_KERNEL
15 select CPU_SCORE7
16 select GENERIC_HAS_IOMAP
17
18config MACH_SPCT6600
19 bool "SPCT6600 series based machines"
20 select SYS_SUPPORTS_32BIT_KERNEL
21 select CPU_SCORE7
22 select GENERIC_HAS_IOMAP
23
24config SCORE_SIM
25 bool "Score simulator"
26 select SYS_SUPPORTS_32BIT_KERNEL
27 select CPU_SCORE7
28 select GENERIC_HAS_IOMAP
29endchoice
30
31endmenu
32
33config CPU_SCORE7
34 bool
35
36config GENERIC_IOMAP
37 def_bool y
38
39config NO_DMA
40 bool
41 default y
42
43config RWSEM_GENERIC_SPINLOCK
44 def_bool y
45
46config GENERIC_FIND_NEXT_BIT
47 def_bool y
48
49config GENERIC_HWEIGHT
50 def_bool y
51
52config GENERIC_CALIBRATE_DELAY
53 def_bool y
54
55config GENERIC_CLOCKEVENTS
56 def_bool y
57
58config GENERIC_TIME
59 def_bool y
60
61config SCHED_NO_NO_OMIT_FRAME_POINTER
62 def_bool y
63
64config GENERIC_HARDIRQS_NO__DO_IRQ
65 def_bool y
66
67config GENERIC_SYSCALL_TABLE
68 def_bool y
69
70config SCORE_L1_CACHE_SHIFT
71 int
72 default "4"
73
74menu "Kernel type"
75
76config 32BIT
77 def_bool y
78
79config GENERIC_HARDIRQS
80 def_bool y
81
82config ARCH_FLATMEM_ENABLE
83 def_bool y
84
85config ARCH_POPULATES_NODE_MAP
86 def_bool y
87
88source "mm/Kconfig"
89
90config MEMORY_START
91 hex
92 default 0xa0000000
93
94source "kernel/time/Kconfig"
95source "kernel/Kconfig.hz"
96source "kernel/Kconfig.preempt"
97
98endmenu
99
100config RWSEM_GENERIC_SPINLOCK
101 def_bool y
102
103config LOCKDEP_SUPPORT
104 def_bool y
105
106config STACKTRACE_SUPPORT
107 def_bool y
108
109source "init/Kconfig"
110
111config PROBE_INITRD_HEADER
112 bool "Probe initrd header created by addinitrd"
113 depends on BLK_DEV_INITRD
114 help
115 Probe initrd header at the last page of kernel image.
116 Say Y here if you are using arch/score/boot/addinitrd.c to
117 add initrd or initramfs image to the kernel image.
118 Otherwise, say N.
119
120config MMU
121 def_bool y
122
123menu "Executable file formats"
124
125source "fs/Kconfig.binfmt"
126
127endmenu
128
129source "net/Kconfig"
130
131source "drivers/Kconfig"
132
133source "fs/Kconfig"
134
135source "arch/score/Kconfig.debug"
136
137source "security/Kconfig"
138
139source "crypto/Kconfig"
140
141source "lib/Kconfig"
diff --git a/arch/score/Kconfig.debug b/arch/score/Kconfig.debug
new file mode 100644
index 000000000000..451ed54ce646
--- /dev/null
+++ b/arch/score/Kconfig.debug
@@ -0,0 +1,37 @@
1menu "Kernel hacking"
2
3config TRACE_IRQFLAGS_SUPPORT
4 bool
5 default y
6
7source "lib/Kconfig.debug"
8
9config CMDLINE
10 string "Default kernel command string"
11 default ""
12 help
13 On some platforms, there is currently no way for the boot loader to
14 pass arguments to the kernel. For these platforms, you can supply
15 some command-line options at build time by entering them here. In
16 other cases you can specify kernel args so that you don't have
17 to set them up in board prom initialization routines.
18
19config DEBUG_STACK_USAGE
20 bool "Enable stack utilization instrumentation"
21 depends on DEBUG_KERNEL
22 help
23 Enables the display of the minimum amount of free stack which each
24 task has ever had available in the sysrq-T and sysrq-P debug output.
25
26 This option will slow down process creation somewhat.
27
28config RUNTIME_DEBUG
29 bool "Enable run-time debugging"
30 depends on DEBUG_KERNEL
31 help
32 If you say Y here, some debugging macros will do run-time checking.
33 If you say N here, those macros will mostly turn to no-ops. See
34 include/asm-score/debug.h for debuging macros.
35 If unsure, say N.
36
37endmenu
diff --git a/arch/score/Makefile b/arch/score/Makefile
new file mode 100644
index 000000000000..68e0cd06d5c9
--- /dev/null
+++ b/arch/score/Makefile
@@ -0,0 +1,43 @@
1#
2# arch/score/Makefile
3#
4# This file is subject to the terms and conditions of the GNU General Public
5# License. See the file "COPYING" in the main directory of this archive
6# for more details.
7#
8
9KBUILD_DEFCONFIG := spct6600_defconfig
10CROSS_COMPILE := score-linux-
11
12#
13# CPU-dependent compiler/assembler options for optimization.
14#
15cflags-y += -G0 -pipe -mel -mnhwloop -D__SCOREEL__ \
16 -D__linux__ -ffunction-sections -ffreestanding
17
18#
19# Board-dependent options and extra files
20#
21KBUILD_AFLAGS += $(cflags-y)
22KBUILD_CFLAGS += $(cflags-y)
23MODFLAGS += -mlong-calls
24LDFLAGS += --oformat elf32-littlescore
25LDFLAGS_vmlinux += -G0 -static -nostdlib
26
27head-y := arch/score/kernel/head.o
28libs-y += arch/score/lib/
29core-y += arch/score/kernel/ arch/score/mm/
30
31boot := arch/score/boot
32
33vmlinux.bin: vmlinux
34 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
35
36archclean:
37 @$(MAKE) $(clean)=$(boot)
38
39define archhelp
40 echo ' vmlinux.bin - Raw binary boot image'
41 echo
42 echo ' These will be default as apropriate for a configured platform.'
43endef
diff --git a/arch/score/boot/Makefile b/arch/score/boot/Makefile
new file mode 100644
index 000000000000..0c5fbd0fb696
--- /dev/null
+++ b/arch/score/boot/Makefile
@@ -0,0 +1,15 @@
1#
2# arch/score/boot/Makefile
3#
4# This file is subject to the terms and conditions of the GNU General Public
5# License. See the file "COPYING" in the main directory of this archive
6# for more details.
7#
8
9targets := vmlinux.bin
10
11$(obj)/vmlinux.bin: vmlinux FORCE
12 $(call if_changed,objcopy)
13 @echo 'Kernel: $@ is ready' ' (#'`cat .version`')'
14
15clean-files += vmlinux.bin
diff --git a/arch/arm/configs/zylonite_defconfig b/arch/score/configs/spct6600_defconfig
index 7949d04a3602..e064943b13d4 100644
--- a/arch/arm/configs/zylonite_defconfig
+++ b/arch/score/configs/spct6600_defconfig
@@ -1,29 +1,65 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.23 3# Linux kernel version: 2.6.30-rc5
4# Tue Oct 23 13:33:20 2007 4# Fri Jun 12 18:57:07 2009
5# 5#
6CONFIG_ARM=y 6
7CONFIG_SYS_SUPPORTS_APM_EMULATION=y 7#
8CONFIG_GENERIC_GPIO=y 8# Machine selection
9CONFIG_GENERIC_TIME=y 9#
10CONFIG_GENERIC_CLOCKEVENTS=y 10# CONFIG_ARCH_SCORE7 is not set
11CONFIG_MMU=y 11CONFIG_MACH_SPCT6600=y
12# CONFIG_NO_IOPORT is not set 12# CONFIG_SCORE_SIM is not set
13CONFIG_GENERIC_HARDIRQS=y 13CONFIG_CPU_SCORE7=y
14CONFIG_STACKTRACE_SUPPORT=y 14CONFIG_GENERIC_IOMAP=y
15CONFIG_LOCKDEP_SUPPORT=y 15CONFIG_NO_DMA=y
16CONFIG_TRACE_IRQFLAGS_SUPPORT=y
17CONFIG_HARDIRQS_SW_RESEND=y
18CONFIG_GENERIC_IRQ_PROBE=y
19CONFIG_RWSEM_GENERIC_SPINLOCK=y 16CONFIG_RWSEM_GENERIC_SPINLOCK=y
20# CONFIG_ARCH_HAS_ILOG2_U32 is not set 17CONFIG_GENERIC_FIND_NEXT_BIT=y
21# CONFIG_ARCH_HAS_ILOG2_U64 is not set
22CONFIG_GENERIC_HWEIGHT=y 18CONFIG_GENERIC_HWEIGHT=y
23CONFIG_GENERIC_CALIBRATE_DELAY=y 19CONFIG_GENERIC_CALIBRATE_DELAY=y
24CONFIG_ZONE_DMA=y 20CONFIG_GENERIC_CLOCKEVENTS=y
25CONFIG_ARCH_MTD_XIP=y 21CONFIG_GENERIC_TIME=y
26CONFIG_VECTORS_BASE=0xffff0000 22CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
23CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
24CONFIG_GENERIC_SYSCALL_TABLE=y
25CONFIG_SCORE_L1_CACHE_SHIFT=4
26
27#
28# Kernel type
29#
30CONFIG_32BIT=y
31CONFIG_GENERIC_HARDIRQS=y
32CONFIG_ARCH_FLATMEM_ENABLE=y
33CONFIG_ARCH_POPULATES_NODE_MAP=y
34CONFIG_SELECT_MEMORY_MODEL=y
35CONFIG_FLATMEM_MANUAL=y
36# CONFIG_DISCONTIGMEM_MANUAL is not set
37# CONFIG_SPARSEMEM_MANUAL is not set
38CONFIG_FLATMEM=y
39CONFIG_FLAT_NODE_MEM_MAP=y
40CONFIG_PAGEFLAGS_EXTENDED=y
41CONFIG_SPLIT_PTLOCK_CPUS=4
42# CONFIG_PHYS_ADDR_T_64BIT is not set
43CONFIG_ZONE_DMA_FLAG=0
44CONFIG_VIRT_TO_BUS=y
45CONFIG_UNEVICTABLE_LRU=y
46CONFIG_HAVE_MLOCK=y
47CONFIG_HAVE_MLOCKED_PAGE_BIT=y
48CONFIG_MEMORY_START=0xa0000000
49# CONFIG_NO_HZ is not set
50# CONFIG_HIGH_RES_TIMERS is not set
51CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
52CONFIG_HZ_100=y
53# CONFIG_HZ_250 is not set
54# CONFIG_HZ_300 is not set
55# CONFIG_HZ_1000 is not set
56CONFIG_HZ=100
57# CONFIG_SCHED_HRTICK is not set
58# CONFIG_PREEMPT_NONE is not set
59CONFIG_PREEMPT_VOLUNTARY=y
60# CONFIG_PREEMPT is not set
61CONFIG_LOCKDEP_SUPPORT=y
62CONFIG_STACKTRACE_SUPPORT=y
27CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 63CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
28 64
29# 65#
@@ -33,60 +69,79 @@ CONFIG_EXPERIMENTAL=y
33CONFIG_BROKEN_ON_SMP=y 69CONFIG_BROKEN_ON_SMP=y
34CONFIG_INIT_ENV_ARG_LIMIT=32 70CONFIG_INIT_ENV_ARG_LIMIT=32
35CONFIG_LOCALVERSION="" 71CONFIG_LOCALVERSION=""
36CONFIG_LOCALVERSION_AUTO=y 72# CONFIG_LOCALVERSION_AUTO is not set
37CONFIG_SWAP=y 73CONFIG_SWAP=y
38CONFIG_SYSVIPC=y 74CONFIG_SYSVIPC=y
39CONFIG_SYSVIPC_SYSCTL=y 75CONFIG_SYSVIPC_SYSCTL=y
40# CONFIG_POSIX_MQUEUE is not set 76CONFIG_POSIX_MQUEUE=y
41# CONFIG_BSD_PROCESS_ACCT is not set 77CONFIG_POSIX_MQUEUE_SYSCTL=y
78CONFIG_BSD_PROCESS_ACCT=y
79# CONFIG_BSD_PROCESS_ACCT_V3 is not set
42# CONFIG_TASKSTATS is not set 80# CONFIG_TASKSTATS is not set
43# CONFIG_USER_NS is not set
44# CONFIG_AUDIT is not set 81# CONFIG_AUDIT is not set
82
83#
84# RCU Subsystem
85#
86CONFIG_CLASSIC_RCU=y
87# CONFIG_TREE_RCU is not set
88# CONFIG_PREEMPT_RCU is not set
89# CONFIG_TREE_RCU_TRACE is not set
90# CONFIG_PREEMPT_RCU_TRACE is not set
45# CONFIG_IKCONFIG is not set 91# CONFIG_IKCONFIG is not set
46CONFIG_LOG_BUF_SHIFT=18 92CONFIG_LOG_BUF_SHIFT=12
93# CONFIG_GROUP_SCHED is not set
47# CONFIG_CGROUPS is not set 94# CONFIG_CGROUPS is not set
48CONFIG_FAIR_GROUP_SCHED=y
49CONFIG_FAIR_USER_SCHED=y
50# CONFIG_FAIR_CGROUP_SCHED is not set
51CONFIG_SYSFS_DEPRECATED=y 95CONFIG_SYSFS_DEPRECATED=y
96CONFIG_SYSFS_DEPRECATED_V2=y
52# CONFIG_RELAY is not set 97# CONFIG_RELAY is not set
53# CONFIG_BLK_DEV_INITRD is not set 98# CONFIG_NAMESPACES is not set
99CONFIG_BLK_DEV_INITRD=y
100CONFIG_INITRAMFS_SOURCE=""
101CONFIG_RD_GZIP=y
102# CONFIG_RD_BZIP2 is not set
103# CONFIG_RD_LZMA is not set
54# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 104# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
55CONFIG_SYSCTL=y 105CONFIG_SYSCTL=y
56# CONFIG_EMBEDDED is not set 106CONFIG_ANON_INODES=y
57CONFIG_UID16=y 107CONFIG_EMBEDDED=y
58CONFIG_SYSCTL_SYSCALL=y 108CONFIG_SYSCTL_SYSCALL=y
59CONFIG_KALLSYMS=y 109# CONFIG_KALLSYMS is not set
60# CONFIG_KALLSYMS_EXTRA_PASS is not set 110# CONFIG_STRIP_ASM_SYMS is not set
61CONFIG_HOTPLUG=y 111# CONFIG_HOTPLUG is not set
62CONFIG_PRINTK=y 112CONFIG_PRINTK=y
63CONFIG_BUG=y 113CONFIG_BUG=y
64CONFIG_ELF_CORE=y 114CONFIG_ELF_CORE=y
65CONFIG_BASE_FULL=y 115CONFIG_BASE_FULL=y
66CONFIG_FUTEX=y 116CONFIG_FUTEX=y
67CONFIG_ANON_INODES=y
68CONFIG_EPOLL=y 117CONFIG_EPOLL=y
69CONFIG_SIGNALFD=y 118CONFIG_SIGNALFD=y
119CONFIG_TIMERFD=y
70CONFIG_EVENTFD=y 120CONFIG_EVENTFD=y
71CONFIG_SHMEM=y 121CONFIG_SHMEM=y
122CONFIG_AIO=y
72CONFIG_VM_EVENT_COUNTERS=y 123CONFIG_VM_EVENT_COUNTERS=y
73CONFIG_SLUB_DEBUG=y 124CONFIG_COMPAT_BRK=y
74# CONFIG_SLAB is not set 125CONFIG_SLAB=y
75CONFIG_SLUB=y 126# CONFIG_SLUB is not set
76# CONFIG_SLOB is not set 127# CONFIG_SLOB is not set
128# CONFIG_PROFILING is not set
129# CONFIG_MARKERS is not set
130# CONFIG_SLOW_WORK is not set
131# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
132CONFIG_SLABINFO=y
77CONFIG_RT_MUTEXES=y 133CONFIG_RT_MUTEXES=y
78# CONFIG_TINY_SHMEM is not set
79CONFIG_BASE_SMALL=0 134CONFIG_BASE_SMALL=0
80CONFIG_MODULES=y 135CONFIG_MODULES=y
81# CONFIG_MODULE_UNLOAD is not set 136CONFIG_MODULE_FORCE_LOAD=y
137CONFIG_MODULE_UNLOAD=y
138CONFIG_MODULE_FORCE_UNLOAD=y
82# CONFIG_MODVERSIONS is not set 139# CONFIG_MODVERSIONS is not set
83# CONFIG_MODULE_SRCVERSION_ALL is not set 140# CONFIG_MODULE_SRCVERSION_ALL is not set
84# CONFIG_KMOD is not set
85CONFIG_BLOCK=y 141CONFIG_BLOCK=y
86# CONFIG_LBD is not set 142CONFIG_LBD=y
87# CONFIG_BLK_DEV_IO_TRACE is not set
88# CONFIG_LSF is not set
89# CONFIG_BLK_DEV_BSG is not set 143# CONFIG_BLK_DEV_BSG is not set
144# CONFIG_BLK_DEV_INTEGRITY is not set
90 145
91# 146#
92# IO Schedulers 147# IO Schedulers
@@ -100,203 +155,57 @@ CONFIG_IOSCHED_CFQ=y
100CONFIG_DEFAULT_CFQ=y 155CONFIG_DEFAULT_CFQ=y
101# CONFIG_DEFAULT_NOOP is not set 156# CONFIG_DEFAULT_NOOP is not set
102CONFIG_DEFAULT_IOSCHED="cfq" 157CONFIG_DEFAULT_IOSCHED="cfq"
158# CONFIG_PROBE_INITRD_HEADER is not set
159CONFIG_MMU=y
103 160
104# 161#
105# System Type 162# Executable file formats
106#
107# CONFIG_ARCH_AAEC2000 is not set
108# CONFIG_ARCH_INTEGRATOR is not set
109# CONFIG_ARCH_REALVIEW is not set
110# CONFIG_ARCH_VERSATILE is not set
111# CONFIG_ARCH_AT91 is not set
112# CONFIG_ARCH_CLPS7500 is not set
113# CONFIG_ARCH_CLPS711X is not set
114# CONFIG_ARCH_CO285 is not set
115# CONFIG_ARCH_EBSA110 is not set
116# CONFIG_ARCH_EP93XX is not set
117# CONFIG_ARCH_FOOTBRIDGE is not set
118# CONFIG_ARCH_NETX is not set
119# CONFIG_ARCH_H720X is not set
120# CONFIG_ARCH_IMX is not set
121# CONFIG_ARCH_IOP13XX is not set
122# CONFIG_ARCH_IOP32X is not set
123# CONFIG_ARCH_IOP33X is not set
124# CONFIG_ARCH_IXP23XX is not set
125# CONFIG_ARCH_IXP2000 is not set
126# CONFIG_ARCH_IXP4XX is not set
127# CONFIG_ARCH_L7200 is not set
128# CONFIG_ARCH_KS8695 is not set
129# CONFIG_ARCH_NS9XXX is not set
130# CONFIG_ARCH_MXC is not set
131# CONFIG_ARCH_PNX4008 is not set
132CONFIG_ARCH_PXA=y
133# CONFIG_ARCH_RPC is not set
134# CONFIG_ARCH_SA1100 is not set
135# CONFIG_ARCH_S3C2410 is not set
136# CONFIG_ARCH_SHARK is not set
137# CONFIG_ARCH_LH7A40X is not set
138# CONFIG_ARCH_DAVINCI is not set
139# CONFIG_ARCH_OMAP is not set
140
141#
142# Intel PXA2xx/PXA3xx Implementations
143#
144
145#
146# Supported PXA3xx Processor Variants
147#
148CONFIG_CPU_PXA300=y
149CONFIG_CPU_PXA310=y
150CONFIG_CPU_PXA320=y
151# CONFIG_ARCH_LUBBOCK is not set
152# CONFIG_MACH_LOGICPD_PXA270 is not set
153# CONFIG_MACH_MAINSTONE is not set
154# CONFIG_ARCH_PXA_IDP is not set
155# CONFIG_PXA_SHARPSL is not set
156# CONFIG_MACH_TRIZEPS4 is not set
157# CONFIG_MACH_EM_X270 is not set
158CONFIG_MACH_ZYLONITE=y
159# CONFIG_MACH_ARMCORE is not set
160CONFIG_PXA3xx=y
161
162#
163# Boot options
164#
165
166#
167# Power management
168#
169
170#
171# Processor Type
172#
173CONFIG_CPU_32=y
174CONFIG_CPU_XSC3=y
175CONFIG_CPU_32v5=y
176CONFIG_CPU_ABRT_EV5T=y
177CONFIG_CPU_CACHE_VIVT=y
178CONFIG_CPU_TLB_V4WBI=y
179CONFIG_CPU_CP15=y
180CONFIG_CPU_CP15_MMU=y
181CONFIG_IO_36=y
182
183#
184# Processor Features
185#
186# CONFIG_ARM_THUMB is not set
187# CONFIG_CPU_DCACHE_DISABLE is not set
188# CONFIG_CPU_BPREDICT_DISABLE is not set
189# CONFIG_OUTER_CACHE is not set
190CONFIG_IWMMXT=y
191
192#
193# Bus support
194#
195# CONFIG_PCI_SYSCALL is not set
196# CONFIG_ARCH_SUPPORTS_MSI is not set
197# CONFIG_PCCARD is not set
198
199#
200# Kernel Features
201#
202# CONFIG_TICK_ONESHOT is not set
203# CONFIG_NO_HZ is not set
204# CONFIG_HIGH_RES_TIMERS is not set
205CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
206# CONFIG_PREEMPT is not set
207CONFIG_HZ=100
208CONFIG_AEABI=y
209CONFIG_OABI_COMPAT=y
210# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
211CONFIG_SELECT_MEMORY_MODEL=y
212CONFIG_FLATMEM_MANUAL=y
213# CONFIG_DISCONTIGMEM_MANUAL is not set
214# CONFIG_SPARSEMEM_MANUAL is not set
215CONFIG_FLATMEM=y
216CONFIG_FLAT_NODE_MEM_MAP=y
217# CONFIG_SPARSEMEM_STATIC is not set
218# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
219CONFIG_SPLIT_PTLOCK_CPUS=4096
220# CONFIG_RESOURCES_64BIT is not set
221CONFIG_ZONE_DMA_FLAG=1
222CONFIG_BOUNCE=y
223CONFIG_VIRT_TO_BUS=y
224CONFIG_ALIGNMENT_TRAP=y
225
226#
227# Boot options
228#
229CONFIG_ZBOOT_ROM_TEXT=0x0
230CONFIG_ZBOOT_ROM_BSS=0x0
231CONFIG_CMDLINE="root=/dev/nfs rootfstype=nfs nfsroot=192.168.1.100:/nfs/rootfs/ ip=192.168.1.101:192.168.1.100::255.255.255.0::eth0:on console=ttyS0,38400 mem=64M debug"
232# CONFIG_XIP_KERNEL is not set
233# CONFIG_KEXEC is not set
234
235#
236# Floating point emulation
237#
238
239#
240# At least one emulation must be selected
241#
242CONFIG_FPE_NWFPE=y
243# CONFIG_FPE_NWFPE_XP is not set
244# CONFIG_FPE_FASTFPE is not set
245
246#
247# Userspace binary formats
248# 163#
249CONFIG_BINFMT_ELF=y 164CONFIG_BINFMT_ELF=y
250# CONFIG_BINFMT_AOUT is not set 165# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
251# CONFIG_BINFMT_MISC is not set 166# CONFIG_HAVE_AOUT is not set
252 167CONFIG_BINFMT_MISC=y
253#
254# Power management options
255#
256# CONFIG_PM is not set
257CONFIG_SUSPEND_UP_POSSIBLE=y
258
259#
260# Networking
261#
262CONFIG_NET=y 168CONFIG_NET=y
263 169
264# 170#
265# Networking options 171# Networking options
266# 172#
267CONFIG_PACKET=y 173# CONFIG_PACKET is not set
268# CONFIG_PACKET_MMAP is not set
269CONFIG_UNIX=y 174CONFIG_UNIX=y
270# CONFIG_NET_KEY is not set 175CONFIG_XFRM=y
176# CONFIG_XFRM_USER is not set
177# CONFIG_XFRM_SUB_POLICY is not set
178# CONFIG_XFRM_MIGRATE is not set
179# CONFIG_XFRM_STATISTICS is not set
180CONFIG_NET_KEY=y
181# CONFIG_NET_KEY_MIGRATE is not set
271CONFIG_INET=y 182CONFIG_INET=y
272# CONFIG_IP_MULTICAST is not set 183CONFIG_IP_MULTICAST=y
273# CONFIG_IP_ADVANCED_ROUTER is not set 184# CONFIG_IP_ADVANCED_ROUTER is not set
274CONFIG_IP_FIB_HASH=y 185CONFIG_IP_FIB_HASH=y
275CONFIG_IP_PNP=y 186# CONFIG_IP_PNP is not set
276CONFIG_IP_PNP_DHCP=y
277CONFIG_IP_PNP_BOOTP=y
278CONFIG_IP_PNP_RARP=y
279# CONFIG_NET_IPIP is not set 187# CONFIG_NET_IPIP is not set
280# CONFIG_NET_IPGRE is not set 188# CONFIG_NET_IPGRE is not set
281# CONFIG_ARPD is not set 189# CONFIG_IP_MROUTE is not set
190CONFIG_ARPD=y
282# CONFIG_SYN_COOKIES is not set 191# CONFIG_SYN_COOKIES is not set
283# CONFIG_INET_AH is not set 192# CONFIG_INET_AH is not set
284# CONFIG_INET_ESP is not set 193# CONFIG_INET_ESP is not set
285# CONFIG_INET_IPCOMP is not set 194# CONFIG_INET_IPCOMP is not set
286# CONFIG_INET_XFRM_TUNNEL is not set 195# CONFIG_INET_XFRM_TUNNEL is not set
287# CONFIG_INET_TUNNEL is not set 196# CONFIG_INET_TUNNEL is not set
288# CONFIG_INET_XFRM_MODE_TRANSPORT is not set 197CONFIG_INET_XFRM_MODE_TRANSPORT=y
289# CONFIG_INET_XFRM_MODE_TUNNEL is not set 198CONFIG_INET_XFRM_MODE_TUNNEL=y
290# CONFIG_INET_XFRM_MODE_BEET is not set 199CONFIG_INET_XFRM_MODE_BEET=y
291# CONFIG_INET_LRO is not set 200# CONFIG_INET_LRO is not set
292# CONFIG_INET_DIAG is not set 201CONFIG_INET_DIAG=y
202CONFIG_INET_TCP_DIAG=y
293# CONFIG_TCP_CONG_ADVANCED is not set 203# CONFIG_TCP_CONG_ADVANCED is not set
294CONFIG_TCP_CONG_CUBIC=y 204CONFIG_TCP_CONG_CUBIC=y
295CONFIG_DEFAULT_TCP_CONG="cubic" 205CONFIG_DEFAULT_TCP_CONG="cubic"
296# CONFIG_TCP_MD5SIG is not set 206# CONFIG_TCP_MD5SIG is not set
297# CONFIG_IPV6 is not set 207# CONFIG_IPV6 is not set
298# CONFIG_INET6_XFRM_TUNNEL is not set 208# CONFIG_NETLABEL is not set
299# CONFIG_INET6_TUNNEL is not set
300# CONFIG_NETWORK_SECMARK is not set 209# CONFIG_NETWORK_SECMARK is not set
301# CONFIG_NETFILTER is not set 210# CONFIG_NETFILTER is not set
302# CONFIG_IP_DCCP is not set 211# CONFIG_IP_DCCP is not set
@@ -304,6 +213,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
304# CONFIG_TIPC is not set 213# CONFIG_TIPC is not set
305# CONFIG_ATM is not set 214# CONFIG_ATM is not set
306# CONFIG_BRIDGE is not set 215# CONFIG_BRIDGE is not set
216# CONFIG_NET_DSA is not set
307# CONFIG_VLAN_8021Q is not set 217# CONFIG_VLAN_8021Q is not set
308# CONFIG_DECNET is not set 218# CONFIG_DECNET is not set
309# CONFIG_LLC2 is not set 219# CONFIG_LLC2 is not set
@@ -313,24 +223,21 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
313# CONFIG_LAPB is not set 223# CONFIG_LAPB is not set
314# CONFIG_ECONET is not set 224# CONFIG_ECONET is not set
315# CONFIG_WAN_ROUTER is not set 225# CONFIG_WAN_ROUTER is not set
226# CONFIG_PHONET is not set
316# CONFIG_NET_SCHED is not set 227# CONFIG_NET_SCHED is not set
228# CONFIG_DCB is not set
317 229
318# 230#
319# Network testing 231# Network testing
320# 232#
321# CONFIG_NET_PKTGEN is not set 233# CONFIG_NET_PKTGEN is not set
322# CONFIG_HAMRADIO is not set 234# CONFIG_HAMRADIO is not set
235# CONFIG_CAN is not set
323# CONFIG_IRDA is not set 236# CONFIG_IRDA is not set
324# CONFIG_BT is not set 237# CONFIG_BT is not set
325# CONFIG_AF_RXRPC is not set 238# CONFIG_AF_RXRPC is not set
326 239# CONFIG_WIRELESS is not set
327# 240# CONFIG_WIMAX is not set
328# Wireless
329#
330# CONFIG_CFG80211 is not set
331# CONFIG_WIRELESS_EXT is not set
332# CONFIG_MAC80211 is not set
333# CONFIG_IEEE80211 is not set
334# CONFIG_RFKILL is not set 241# CONFIG_RFKILL is not set
335# CONFIG_NET_9P is not set 242# CONFIG_NET_9P is not set
336 243
@@ -341,17 +248,24 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
341# 248#
342# Generic Driver Options 249# Generic Driver Options
343# 250#
344CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 251# CONFIG_STANDALONE is not set
345CONFIG_STANDALONE=y 252# CONFIG_PREVENT_FIRMWARE_BUILD is not set
346CONFIG_PREVENT_FIRMWARE_BUILD=y
347CONFIG_FW_LOADER=y
348# CONFIG_SYS_HYPERVISOR is not set 253# CONFIG_SYS_HYPERVISOR is not set
349# CONFIG_CONNECTOR is not set 254# CONFIG_CONNECTOR is not set
350# CONFIG_MTD is not set 255# CONFIG_MTD is not set
351# CONFIG_PARPORT is not set 256# CONFIG_PARPORT is not set
352# CONFIG_BLK_DEV is not set 257CONFIG_BLK_DEV=y
258# CONFIG_BLK_DEV_COW_COMMON is not set
259CONFIG_BLK_DEV_LOOP=y
260CONFIG_BLK_DEV_CRYPTOLOOP=y
261# CONFIG_BLK_DEV_NBD is not set
262CONFIG_BLK_DEV_RAM=y
263CONFIG_BLK_DEV_RAM_COUNT=1
264CONFIG_BLK_DEV_RAM_SIZE=4096
265# CONFIG_BLK_DEV_XIP is not set
266# CONFIG_CDROM_PKTCDVD is not set
267# CONFIG_ATA_OVER_ETH is not set
353# CONFIG_MISC_DEVICES is not set 268# CONFIG_MISC_DEVICES is not set
354# CONFIG_IDE is not set
355 269
356# 270#
357# SCSI device support 271# SCSI device support
@@ -360,28 +274,16 @@ CONFIG_FW_LOADER=y
360# CONFIG_SCSI is not set 274# CONFIG_SCSI is not set
361# CONFIG_SCSI_DMA is not set 275# CONFIG_SCSI_DMA is not set
362# CONFIG_SCSI_NETLINK is not set 276# CONFIG_SCSI_NETLINK is not set
363# CONFIG_ATA is not set
364# CONFIG_MD is not set 277# CONFIG_MD is not set
365CONFIG_NETDEVICES=y 278CONFIG_NETDEVICES=y
366# CONFIG_NETDEVICES_MULTIQUEUE is not set 279CONFIG_COMPAT_NET_DEV_OPS=y
367# CONFIG_DUMMY is not set 280# CONFIG_DUMMY is not set
368# CONFIG_BONDING is not set 281# CONFIG_BONDING is not set
369# CONFIG_MACVLAN is not set 282# CONFIG_MACVLAN is not set
370# CONFIG_EQUALIZER is not set 283# CONFIG_EQUALIZER is not set
371# CONFIG_TUN is not set 284# CONFIG_TUN is not set
372# CONFIG_VETH is not set 285# CONFIG_VETH is not set
373# CONFIG_PHYLIB is not set 286# CONFIG_NET_ETHERNET is not set
374CONFIG_NET_ETHERNET=y
375CONFIG_MII=y
376# CONFIG_AX88796 is not set
377CONFIG_SMC91X=y
378# CONFIG_DM9000 is not set
379# CONFIG_SMC911X is not set
380# CONFIG_IBM_NEW_EMAC_ZMII is not set
381# CONFIG_IBM_NEW_EMAC_RGMII is not set
382# CONFIG_IBM_NEW_EMAC_TAH is not set
383# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
384# CONFIG_B44 is not set
385# CONFIG_NETDEV_1000 is not set 287# CONFIG_NETDEV_1000 is not set
386# CONFIG_NETDEV_10000 is not set 288# CONFIG_NETDEV_10000 is not set
387 289
@@ -390,14 +292,18 @@ CONFIG_SMC91X=y
390# 292#
391# CONFIG_WLAN_PRE80211 is not set 293# CONFIG_WLAN_PRE80211 is not set
392# CONFIG_WLAN_80211 is not set 294# CONFIG_WLAN_80211 is not set
295
296#
297# Enable WiMAX (Networking options) to see the WiMAX drivers
298#
393# CONFIG_WAN is not set 299# CONFIG_WAN is not set
394# CONFIG_PPP is not set 300# CONFIG_PPP is not set
395# CONFIG_SLIP is not set 301# CONFIG_SLIP is not set
396# CONFIG_SHAPER is not set
397# CONFIG_NETCONSOLE is not set 302# CONFIG_NETCONSOLE is not set
398# CONFIG_NETPOLL is not set 303# CONFIG_NETPOLL is not set
399# CONFIG_NET_POLL_CONTROLLER is not set 304# CONFIG_NET_POLL_CONTROLLER is not set
400# CONFIG_ISDN is not set 305# CONFIG_ISDN is not set
306# CONFIG_PHONE is not set
401 307
402# 308#
403# Input device support 309# Input device support
@@ -409,10 +315,7 @@ CONFIG_INPUT=y
409# 315#
410# Userland interfaces 316# Userland interfaces
411# 317#
412CONFIG_INPUT_MOUSEDEV=y 318# CONFIG_INPUT_MOUSEDEV is not set
413# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
414CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
415CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
416# CONFIG_INPUT_JOYDEV is not set 319# CONFIG_INPUT_JOYDEV is not set
417# CONFIG_INPUT_EVDEV is not set 320# CONFIG_INPUT_EVDEV is not set
418# CONFIG_INPUT_EVBUG is not set 321# CONFIG_INPUT_EVBUG is not set
@@ -437,10 +340,17 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
437# Character devices 340# Character devices
438# 341#
439CONFIG_VT=y 342CONFIG_VT=y
343CONFIG_CONSOLE_TRANSLATIONS=y
440CONFIG_VT_CONSOLE=y 344CONFIG_VT_CONSOLE=y
441CONFIG_HW_CONSOLE=y 345CONFIG_HW_CONSOLE=y
442# CONFIG_VT_HW_CONSOLE_BINDING is not set 346# CONFIG_VT_HW_CONSOLE_BINDING is not set
443# CONFIG_SERIAL_NONSTANDARD is not set 347CONFIG_DEVKMEM=y
348CONFIG_SERIAL_NONSTANDARD=y
349# CONFIG_N_HDLC is not set
350# CONFIG_RISCOM8 is not set
351# CONFIG_SPECIALIX is not set
352# CONFIG_RIO is not set
353CONFIG_STALDRV=y
444 354
445# 355#
446# Serial drivers 356# Serial drivers
@@ -450,45 +360,50 @@ CONFIG_HW_CONSOLE=y
450# 360#
451# Non-8250 serial port support 361# Non-8250 serial port support
452# 362#
453CONFIG_SERIAL_PXA=y
454CONFIG_SERIAL_PXA_CONSOLE=y
455CONFIG_SERIAL_CORE=y
456CONFIG_SERIAL_CORE_CONSOLE=y
457CONFIG_UNIX98_PTYS=y 363CONFIG_UNIX98_PTYS=y
458# CONFIG_LEGACY_PTYS is not set 364# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
365CONFIG_LEGACY_PTYS=y
366CONFIG_LEGACY_PTY_COUNT=256
459# CONFIG_IPMI_HANDLER is not set 367# CONFIG_IPMI_HANDLER is not set
460# CONFIG_HW_RANDOM is not set 368# CONFIG_HW_RANDOM is not set
461# CONFIG_NVRAM is not set 369# CONFIG_RTC is not set
370# CONFIG_GEN_RTC is not set
462# CONFIG_R3964 is not set 371# CONFIG_R3964 is not set
463# CONFIG_RAW_DRIVER is not set 372CONFIG_RAW_DRIVER=y
373CONFIG_MAX_RAW_DEVS=8192
464# CONFIG_TCG_TPM is not set 374# CONFIG_TCG_TPM is not set
465# CONFIG_I2C is not set 375# CONFIG_I2C is not set
466
467#
468# SPI support
469#
470# CONFIG_SPI is not set 376# CONFIG_SPI is not set
471# CONFIG_SPI_MASTER is not set
472# CONFIG_W1 is not set 377# CONFIG_W1 is not set
473# CONFIG_POWER_SUPPLY is not set 378# CONFIG_POWER_SUPPLY is not set
474# CONFIG_HWMON is not set 379# CONFIG_HWMON is not set
475 380# CONFIG_THERMAL is not set
476# 381# CONFIG_THERMAL_HWMON is not set
477# Sonics Silicon Backplane 382# CONFIG_WATCHDOG is not set
478#
479CONFIG_SSB_POSSIBLE=y
480# CONFIG_SSB is not set
481 383
482# 384#
483# Multifunction device drivers 385# Multifunction device drivers
484# 386#
387# CONFIG_MFD_CORE is not set
485# CONFIG_MFD_SM501 is not set 388# CONFIG_MFD_SM501 is not set
389# CONFIG_HTC_PASIC3 is not set
390# CONFIG_MFD_TMIO is not set
391# CONFIG_REGULATOR is not set
486 392
487# 393#
488# Multimedia devices 394# Multimedia devices
489# 395#
396
397#
398# Multimedia core support
399#
490# CONFIG_VIDEO_DEV is not set 400# CONFIG_VIDEO_DEV is not set
491# CONFIG_DVB_CORE is not set 401# CONFIG_DVB_CORE is not set
402# CONFIG_VIDEO_MEDIA is not set
403
404#
405# Multimedia drivers
406#
492# CONFIG_DAB is not set 407# CONFIG_DAB is not set
493 408
494# 409#
@@ -496,32 +411,7 @@ CONFIG_SSB_POSSIBLE=y
496# 411#
497# CONFIG_VGASTATE is not set 412# CONFIG_VGASTATE is not set
498# CONFIG_VIDEO_OUTPUT_CONTROL is not set 413# CONFIG_VIDEO_OUTPUT_CONTROL is not set
499CONFIG_FB=y 414# CONFIG_FB is not set
500# CONFIG_FIRMWARE_EDID is not set
501# CONFIG_FB_DDC is not set
502CONFIG_FB_CFB_FILLRECT=y
503CONFIG_FB_CFB_COPYAREA=y
504CONFIG_FB_CFB_IMAGEBLIT=y
505# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
506# CONFIG_FB_SYS_FILLRECT is not set
507# CONFIG_FB_SYS_COPYAREA is not set
508# CONFIG_FB_SYS_IMAGEBLIT is not set
509# CONFIG_FB_SYS_FOPS is not set
510CONFIG_FB_DEFERRED_IO=y
511# CONFIG_FB_SVGALIB is not set
512# CONFIG_FB_MACMODES is not set
513# CONFIG_FB_BACKLIGHT is not set
514# CONFIG_FB_MODE_HELPERS is not set
515# CONFIG_FB_TILEBLITTING is not set
516
517#
518# Frame buffer hardware drivers
519#
520# CONFIG_FB_S1D13XXX is not set
521CONFIG_FB_PXA=y
522# CONFIG_FB_PXA_PARAMETERS is not set
523# CONFIG_FB_MBX is not set
524# CONFIG_FB_VIRTUAL is not set
525# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 415# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
526 416
527# 417#
@@ -534,56 +424,55 @@ CONFIG_FB_PXA=y
534# 424#
535# CONFIG_VGA_CONSOLE is not set 425# CONFIG_VGA_CONSOLE is not set
536CONFIG_DUMMY_CONSOLE=y 426CONFIG_DUMMY_CONSOLE=y
537CONFIG_FRAMEBUFFER_CONSOLE=y
538CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
539# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
540CONFIG_FONTS=y
541# CONFIG_FONT_8x8 is not set
542# CONFIG_FONT_8x16 is not set
543CONFIG_FONT_6x11=y
544# CONFIG_FONT_7x14 is not set
545# CONFIG_FONT_PEARL_8x8 is not set
546# CONFIG_FONT_ACORN_8x8 is not set
547# CONFIG_FONT_MINI_4x6 is not set
548# CONFIG_FONT_SUN8x16 is not set
549# CONFIG_FONT_SUN12x22 is not set
550# CONFIG_FONT_10x18 is not set
551CONFIG_LOGO=y
552CONFIG_LOGO_LINUX_MONO=y
553CONFIG_LOGO_LINUX_VGA16=y
554CONFIG_LOGO_LINUX_CLUT224=y
555
556#
557# Sound
558#
559# CONFIG_SOUND is not set 427# CONFIG_SOUND is not set
560# CONFIG_HID_SUPPORT is not set 428# CONFIG_HID_SUPPORT is not set
561# CONFIG_USB_SUPPORT is not set 429# CONFIG_USB_SUPPORT is not set
562# CONFIG_MMC is not set 430# CONFIG_MMC is not set
431# CONFIG_MEMSTICK is not set
563# CONFIG_NEW_LEDS is not set 432# CONFIG_NEW_LEDS is not set
564CONFIG_RTC_LIB=y 433# CONFIG_ACCESSIBILITY is not set
565# CONFIG_RTC_CLASS is not set 434# CONFIG_RTC_CLASS is not set
435# CONFIG_AUXDISPLAY is not set
436# CONFIG_UIO is not set
437# CONFIG_STAGING is not set
566 438
567# 439#
568# File systems 440# File systems
569# 441#
570# CONFIG_EXT2_FS is not set 442CONFIG_EXT2_FS=y
571# CONFIG_EXT3_FS is not set 443CONFIG_EXT2_FS_XATTR=y
572# CONFIG_EXT4DEV_FS is not set 444CONFIG_EXT2_FS_POSIX_ACL=y
445# CONFIG_EXT2_FS_SECURITY is not set
446# CONFIG_EXT2_FS_XIP is not set
447CONFIG_EXT3_FS=y
448# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
449CONFIG_EXT3_FS_XATTR=y
450CONFIG_EXT3_FS_POSIX_ACL=y
451# CONFIG_EXT3_FS_SECURITY is not set
452# CONFIG_EXT4_FS is not set
453CONFIG_JBD=y
454CONFIG_FS_MBCACHE=y
573# CONFIG_REISERFS_FS is not set 455# CONFIG_REISERFS_FS is not set
574# CONFIG_JFS_FS is not set 456# CONFIG_JFS_FS is not set
575CONFIG_FS_POSIX_ACL=y 457CONFIG_FS_POSIX_ACL=y
458CONFIG_FILE_LOCKING=y
576# CONFIG_XFS_FS is not set 459# CONFIG_XFS_FS is not set
577# CONFIG_GFS2_FS is not set 460# CONFIG_GFS2_FS is not set
578# CONFIG_OCFS2_FS is not set 461# CONFIG_OCFS2_FS is not set
579# CONFIG_MINIX_FS is not set 462# CONFIG_BTRFS_FS is not set
580# CONFIG_ROMFS_FS is not set
581# CONFIG_INOTIFY is not set
582# CONFIG_QUOTA is not set
583CONFIG_DNOTIFY=y 463CONFIG_DNOTIFY=y
584# CONFIG_AUTOFS_FS is not set 464CONFIG_INOTIFY=y
585# CONFIG_AUTOFS4_FS is not set 465CONFIG_INOTIFY_USER=y
466# CONFIG_QUOTA is not set
467CONFIG_AUTOFS_FS=y
468CONFIG_AUTOFS4_FS=y
586# CONFIG_FUSE_FS is not set 469# CONFIG_FUSE_FS is not set
470CONFIG_GENERIC_ACL=y
471
472#
473# Caches
474#
475# CONFIG_FSCACHE is not set
587 476
588# 477#
589# CD-ROM/DVD Filesystems 478# CD-ROM/DVD Filesystems
@@ -602,43 +491,51 @@ CONFIG_DNOTIFY=y
602# Pseudo filesystems 491# Pseudo filesystems
603# 492#
604CONFIG_PROC_FS=y 493CONFIG_PROC_FS=y
494CONFIG_PROC_KCORE=y
605CONFIG_PROC_SYSCTL=y 495CONFIG_PROC_SYSCTL=y
496# CONFIG_PROC_PAGE_MONITOR is not set
606CONFIG_SYSFS=y 497CONFIG_SYSFS=y
607# CONFIG_TMPFS is not set 498CONFIG_TMPFS=y
499CONFIG_TMPFS_POSIX_ACL=y
608# CONFIG_HUGETLB_PAGE is not set 500# CONFIG_HUGETLB_PAGE is not set
609# CONFIG_CONFIGFS_FS is not set 501# CONFIG_CONFIGFS_FS is not set
610 502CONFIG_MISC_FILESYSTEMS=y
611#
612# Miscellaneous filesystems
613#
614# CONFIG_ADFS_FS is not set 503# CONFIG_ADFS_FS is not set
615# CONFIG_AFFS_FS is not set 504# CONFIG_AFFS_FS is not set
505# CONFIG_ECRYPT_FS is not set
616# CONFIG_HFS_FS is not set 506# CONFIG_HFS_FS is not set
617# CONFIG_HFSPLUS_FS is not set 507# CONFIG_HFSPLUS_FS is not set
618# CONFIG_BEFS_FS is not set 508# CONFIG_BEFS_FS is not set
619# CONFIG_BFS_FS is not set 509# CONFIG_BFS_FS is not set
620# CONFIG_EFS_FS is not set 510# CONFIG_EFS_FS is not set
621# CONFIG_CRAMFS is not set 511# CONFIG_CRAMFS is not set
512# CONFIG_SQUASHFS is not set
622# CONFIG_VXFS_FS is not set 513# CONFIG_VXFS_FS is not set
514# CONFIG_MINIX_FS is not set
515# CONFIG_OMFS_FS is not set
623# CONFIG_HPFS_FS is not set 516# CONFIG_HPFS_FS is not set
624# CONFIG_QNX4FS_FS is not set 517# CONFIG_QNX4FS_FS is not set
518# CONFIG_ROMFS_FS is not set
625# CONFIG_SYSV_FS is not set 519# CONFIG_SYSV_FS is not set
626# CONFIG_UFS_FS is not set 520# CONFIG_UFS_FS is not set
521# CONFIG_NILFS2_FS is not set
627CONFIG_NETWORK_FILESYSTEMS=y 522CONFIG_NETWORK_FILESYSTEMS=y
628CONFIG_NFS_FS=y 523CONFIG_NFS_FS=y
629CONFIG_NFS_V3=y 524CONFIG_NFS_V3=y
630CONFIG_NFS_V3_ACL=y 525CONFIG_NFS_V3_ACL=y
631CONFIG_NFS_V4=y 526CONFIG_NFS_V4=y
632CONFIG_NFS_DIRECTIO=y 527CONFIG_NFSD=y
633# CONFIG_NFSD is not set 528CONFIG_NFSD_V2_ACL=y
634CONFIG_ROOT_NFS=y 529CONFIG_NFSD_V3=y
530CONFIG_NFSD_V3_ACL=y
531CONFIG_NFSD_V4=y
635CONFIG_LOCKD=y 532CONFIG_LOCKD=y
636CONFIG_LOCKD_V4=y 533CONFIG_LOCKD_V4=y
534CONFIG_EXPORTFS=y
637CONFIG_NFS_ACL_SUPPORT=y 535CONFIG_NFS_ACL_SUPPORT=y
638CONFIG_NFS_COMMON=y 536CONFIG_NFS_COMMON=y
639CONFIG_SUNRPC=y 537CONFIG_SUNRPC=y
640CONFIG_SUNRPC_GSS=y 538CONFIG_SUNRPC_GSS=y
641# CONFIG_SUNRPC_BIND34 is not set
642CONFIG_RPCSEC_GSS_KRB5=y 539CONFIG_RPCSEC_GSS_KRB5=y
643# CONFIG_RPCSEC_GSS_SPKM3 is not set 540# CONFIG_RPCSEC_GSS_SPKM3 is not set
644# CONFIG_SMB_FS is not set 541# CONFIG_SMB_FS is not set
@@ -654,83 +551,167 @@ CONFIG_RPCSEC_GSS_KRB5=y
654CONFIG_MSDOS_PARTITION=y 551CONFIG_MSDOS_PARTITION=y
655# CONFIG_NLS is not set 552# CONFIG_NLS is not set
656# CONFIG_DLM is not set 553# CONFIG_DLM is not set
657# CONFIG_INSTRUMENTATION is not set
658 554
659# 555#
660# Kernel hacking 556# Kernel hacking
661# 557#
558CONFIG_TRACE_IRQFLAGS_SUPPORT=y
662# CONFIG_PRINTK_TIME is not set 559# CONFIG_PRINTK_TIME is not set
560CONFIG_ENABLE_WARN_DEPRECATED=y
663CONFIG_ENABLE_MUST_CHECK=y 561CONFIG_ENABLE_MUST_CHECK=y
562CONFIG_FRAME_WARN=1024
664# CONFIG_MAGIC_SYSRQ is not set 563# CONFIG_MAGIC_SYSRQ is not set
665# CONFIG_UNUSED_SYMBOLS is not set 564# CONFIG_UNUSED_SYMBOLS is not set
666# CONFIG_DEBUG_FS is not set 565# CONFIG_DEBUG_FS is not set
667# CONFIG_HEADERS_CHECK is not set 566# CONFIG_HEADERS_CHECK is not set
668# CONFIG_DEBUG_KERNEL is not set 567# CONFIG_DEBUG_KERNEL is not set
669# CONFIG_SLUB_DEBUG_ON is not set 568# CONFIG_DEBUG_MEMORY_INIT is not set
670CONFIG_DEBUG_BUGVERBOSE=y 569# CONFIG_RCU_CPU_STALL_DETECTOR is not set
671CONFIG_FRAME_POINTER=y 570# CONFIG_SYSCTL_SYSCALL_CHECK is not set
571CONFIG_TRACING_SUPPORT=y
572
573#
574# Tracers
575#
576# CONFIG_IRQSOFF_TRACER is not set
577# CONFIG_SCHED_TRACER is not set
578# CONFIG_CONTEXT_SWITCH_TRACER is not set
579# CONFIG_EVENT_TRACER is not set
580# CONFIG_BOOT_TRACER is not set
581# CONFIG_TRACE_BRANCH_PROFILING is not set
582# CONFIG_KMEMTRACE is not set
583# CONFIG_WORKQUEUE_TRACER is not set
584# CONFIG_BLK_DEV_IO_TRACE is not set
672# CONFIG_SAMPLES is not set 585# CONFIG_SAMPLES is not set
673CONFIG_DEBUG_USER=y 586CONFIG_CMDLINE=""
674 587
675# 588#
676# Security options 589# Security options
677# 590#
678# CONFIG_KEYS is not set 591CONFIG_KEYS=y
679# CONFIG_SECURITY is not set 592CONFIG_KEYS_DEBUG_PROC_KEYS=y
680# CONFIG_SECURITY_FILE_CAPABILITIES is not set 593CONFIG_SECURITY=y
594# CONFIG_SECURITYFS is not set
595CONFIG_SECURITY_NETWORK=y
596# CONFIG_SECURITY_NETWORK_XFRM is not set
597# CONFIG_SECURITY_PATH is not set
598CONFIG_SECURITY_FILE_CAPABILITIES=y
599CONFIG_SECURITY_DEFAULT_MMAP_MIN_ADDR=0
600# CONFIG_SECURITY_TOMOYO is not set
681CONFIG_CRYPTO=y 601CONFIG_CRYPTO=y
602
603#
604# Crypto core or helper
605#
606# CONFIG_CRYPTO_FIPS is not set
682CONFIG_CRYPTO_ALGAPI=y 607CONFIG_CRYPTO_ALGAPI=y
608CONFIG_CRYPTO_ALGAPI2=y
609CONFIG_CRYPTO_AEAD=y
610CONFIG_CRYPTO_AEAD2=y
683CONFIG_CRYPTO_BLKCIPHER=y 611CONFIG_CRYPTO_BLKCIPHER=y
612CONFIG_CRYPTO_BLKCIPHER2=y
613CONFIG_CRYPTO_HASH=y
614CONFIG_CRYPTO_HASH2=y
615CONFIG_CRYPTO_RNG=y
616CONFIG_CRYPTO_RNG2=y
617CONFIG_CRYPTO_PCOMP=y
684CONFIG_CRYPTO_MANAGER=y 618CONFIG_CRYPTO_MANAGER=y
619CONFIG_CRYPTO_MANAGER2=y
620# CONFIG_CRYPTO_GF128MUL is not set
621CONFIG_CRYPTO_NULL=y
622CONFIG_CRYPTO_WORKQUEUE=y
623CONFIG_CRYPTO_CRYPTD=y
624# CONFIG_CRYPTO_AUTHENC is not set
625# CONFIG_CRYPTO_TEST is not set
626
627#
628# Authenticated Encryption with Associated Data
629#
630# CONFIG_CRYPTO_CCM is not set
631# CONFIG_CRYPTO_GCM is not set
632CONFIG_CRYPTO_SEQIV=y
633
634#
635# Block modes
636#
637CONFIG_CRYPTO_CBC=y
638# CONFIG_CRYPTO_CTR is not set
639# CONFIG_CRYPTO_CTS is not set
640# CONFIG_CRYPTO_ECB is not set
641# CONFIG_CRYPTO_LRW is not set
642# CONFIG_CRYPTO_PCBC is not set
643# CONFIG_CRYPTO_XTS is not set
644
645#
646# Hash modes
647#
685# CONFIG_CRYPTO_HMAC is not set 648# CONFIG_CRYPTO_HMAC is not set
686# CONFIG_CRYPTO_XCBC is not set 649# CONFIG_CRYPTO_XCBC is not set
687# CONFIG_CRYPTO_NULL is not set 650
688# CONFIG_CRYPTO_MD4 is not set 651#
652# Digest
653#
654CONFIG_CRYPTO_CRC32C=y
655CONFIG_CRYPTO_MD4=y
689CONFIG_CRYPTO_MD5=y 656CONFIG_CRYPTO_MD5=y
657CONFIG_CRYPTO_MICHAEL_MIC=y
658# CONFIG_CRYPTO_RMD128 is not set
659# CONFIG_CRYPTO_RMD160 is not set
660# CONFIG_CRYPTO_RMD256 is not set
661# CONFIG_CRYPTO_RMD320 is not set
690# CONFIG_CRYPTO_SHA1 is not set 662# CONFIG_CRYPTO_SHA1 is not set
691# CONFIG_CRYPTO_SHA256 is not set 663# CONFIG_CRYPTO_SHA256 is not set
692# CONFIG_CRYPTO_SHA512 is not set 664# CONFIG_CRYPTO_SHA512 is not set
693# CONFIG_CRYPTO_WP512 is not set
694# CONFIG_CRYPTO_TGR192 is not set 665# CONFIG_CRYPTO_TGR192 is not set
695# CONFIG_CRYPTO_GF128MUL is not set 666# CONFIG_CRYPTO_WP512 is not set
696# CONFIG_CRYPTO_ECB is not set 667
697CONFIG_CRYPTO_CBC=y 668#
698# CONFIG_CRYPTO_PCBC is not set 669# Ciphers
699# CONFIG_CRYPTO_LRW is not set 670#
700# CONFIG_CRYPTO_XTS is not set
701# CONFIG_CRYPTO_CRYPTD is not set
702CONFIG_CRYPTO_DES=y
703# CONFIG_CRYPTO_FCRYPT is not set
704# CONFIG_CRYPTO_BLOWFISH is not set
705# CONFIG_CRYPTO_TWOFISH is not set
706# CONFIG_CRYPTO_SERPENT is not set
707# CONFIG_CRYPTO_AES is not set 671# CONFIG_CRYPTO_AES is not set
672# CONFIG_CRYPTO_ANUBIS is not set
673# CONFIG_CRYPTO_ARC4 is not set
674# CONFIG_CRYPTO_BLOWFISH is not set
675# CONFIG_CRYPTO_CAMELLIA is not set
708# CONFIG_CRYPTO_CAST5 is not set 676# CONFIG_CRYPTO_CAST5 is not set
709# CONFIG_CRYPTO_CAST6 is not set 677# CONFIG_CRYPTO_CAST6 is not set
710# CONFIG_CRYPTO_TEA is not set 678CONFIG_CRYPTO_DES=y
711# CONFIG_CRYPTO_ARC4 is not set 679# CONFIG_CRYPTO_FCRYPT is not set
712# CONFIG_CRYPTO_KHAZAD is not set 680# CONFIG_CRYPTO_KHAZAD is not set
713# CONFIG_CRYPTO_ANUBIS is not set 681# CONFIG_CRYPTO_SALSA20 is not set
714# CONFIG_CRYPTO_SEED is not set 682# CONFIG_CRYPTO_SEED is not set
683# CONFIG_CRYPTO_SERPENT is not set
684# CONFIG_CRYPTO_TEA is not set
685# CONFIG_CRYPTO_TWOFISH is not set
686
687#
688# Compression
689#
715# CONFIG_CRYPTO_DEFLATE is not set 690# CONFIG_CRYPTO_DEFLATE is not set
716# CONFIG_CRYPTO_MICHAEL_MIC is not set 691# CONFIG_CRYPTO_ZLIB is not set
717# CONFIG_CRYPTO_CRC32C is not set 692# CONFIG_CRYPTO_LZO is not set
718# CONFIG_CRYPTO_CAMELLIA is not set 693
719# CONFIG_CRYPTO_TEST is not set 694#
720# CONFIG_CRYPTO_AUTHENC is not set 695# Random Number Generation
696#
697# CONFIG_CRYPTO_ANSI_CPRNG is not set
721# CONFIG_CRYPTO_HW is not set 698# CONFIG_CRYPTO_HW is not set
699# CONFIG_BINARY_PRINTF is not set
722 700
723# 701#
724# Library routines 702# Library routines
725# 703#
726CONFIG_BITREVERSE=y 704CONFIG_BITREVERSE=y
727# CONFIG_CRC_CCITT is not set 705CONFIG_GENERIC_FIND_LAST_BIT=y
728# CONFIG_CRC16 is not set 706CONFIG_CRC_CCITT=y
707CONFIG_CRC16=y
708# CONFIG_CRC_T10DIF is not set
729# CONFIG_CRC_ITU_T is not set 709# CONFIG_CRC_ITU_T is not set
730CONFIG_CRC32=y 710CONFIG_CRC32=y
731# CONFIG_CRC7 is not set 711# CONFIG_CRC7 is not set
732# CONFIG_LIBCRC32C is not set 712CONFIG_LIBCRC32C=y
733CONFIG_PLIST=y 713CONFIG_ZLIB_INFLATE=y
714CONFIG_DECOMPRESS_GZIP=y
734CONFIG_HAS_IOMEM=y 715CONFIG_HAS_IOMEM=y
735CONFIG_HAS_IOPORT=y 716CONFIG_HAS_IOPORT=y
736CONFIG_HAS_DMA=y 717CONFIG_NLATTR=y
diff --git a/arch/score/include/asm/Kbuild b/arch/score/include/asm/Kbuild
new file mode 100644
index 000000000000..b367abd4620f
--- /dev/null
+++ b/arch/score/include/asm/Kbuild
@@ -0,0 +1,3 @@
1include include/asm-generic/Kbuild.asm
2
3header-y +=
diff --git a/arch/score/include/asm/asmmacro.h b/arch/score/include/asm/asmmacro.h
new file mode 100644
index 000000000000..a04a54cea25d
--- /dev/null
+++ b/arch/score/include/asm/asmmacro.h
@@ -0,0 +1,161 @@
1#ifndef _ASM_SCORE_ASMMACRO_H
2#define _ASM_SCORE_ASMMACRO_H
3
4#include <asm/asm-offsets.h>
5
6#ifdef __ASSEMBLY__
7
8.macro SAVE_ALL
9 mfcr r30, cr0
10 mv r31, r0
11 nop
12 /* if UMs == 1, change stack. */
13 slli.c r30, r30, 28
14 bpl 1f
15 la r31, kernelsp
16 lw r31, [r31]
171:
18 mv r30, r0
19 addri r0, r31, -PT_SIZE
20
21 sw r30, [r0, PT_R0]
22 .set r1
23 sw r1, [r0, PT_R1]
24 .set nor1
25 sw r2, [r0, PT_R2]
26 sw r3, [r0, PT_R3]
27 sw r4, [r0, PT_R4]
28 sw r5, [r0, PT_R5]
29 sw r6, [r0, PT_R6]
30 sw r7, [r0, PT_R7]
31
32 sw r8, [r0, PT_R8]
33 sw r9, [r0, PT_R9]
34 sw r10, [r0, PT_R10]
35 sw r11, [r0, PT_R11]
36 sw r12, [r0, PT_R12]
37 sw r13, [r0, PT_R13]
38 sw r14, [r0, PT_R14]
39 sw r15, [r0, PT_R15]
40
41 sw r16, [r0, PT_R16]
42 sw r17, [r0, PT_R17]
43 sw r18, [r0, PT_R18]
44 sw r19, [r0, PT_R19]
45 sw r20, [r0, PT_R20]
46 sw r21, [r0, PT_R21]
47 sw r22, [r0, PT_R22]
48 sw r23, [r0, PT_R23]
49
50 sw r24, [r0, PT_R24]
51 sw r25, [r0, PT_R25]
52 sw r25, [r0, PT_R25]
53 sw r26, [r0, PT_R26]
54 sw r27, [r0, PT_R27]
55
56 sw r28, [r0, PT_R28]
57 sw r29, [r0, PT_R29]
58 orri r28, r0, 0x1fff
59 li r31, 0x00001fff
60 xor r28, r28, r31
61
62 mfcehl r30, r31
63 sw r30, [r0, PT_CEH]
64 sw r31, [r0, PT_CEL]
65
66 mfcr r31, cr0
67 sw r31, [r0, PT_PSR]
68
69 mfcr r31, cr1
70 sw r31, [r0, PT_CONDITION]
71
72 mfcr r31, cr2
73 sw r31, [r0, PT_ECR]
74
75 mfcr r31, cr5
76 srli r31, r31, 1
77 slli r31, r31, 1
78 sw r31, [r0, PT_EPC]
79.endm
80
81.macro RESTORE_ALL_AND_RET
82 mfcr r30, cr0
83 srli r30, r30, 1
84 slli r30, r30, 1
85 mtcr r30, cr0
86 nop
87 nop
88 nop
89 nop
90 nop
91
92 .set r1
93 ldis r1, 0x00ff
94 and r30, r30, r1
95 not r1, r1
96 lw r31, [r0, PT_PSR]
97 and r31, r31, r1
98 .set nor1
99 or r31, r31, r30
100 mtcr r31, cr0
101 nop
102 nop
103 nop
104 nop
105 nop
106
107 lw r30, [r0, PT_CONDITION]
108 mtcr r30, cr1
109 nop
110 nop
111 nop
112 nop
113 nop
114
115 lw r30, [r0, PT_CEH]
116 lw r31, [r0, PT_CEL]
117 mtcehl r30, r31
118
119 .set r1
120 lw r1, [r0, PT_R1]
121 .set nor1
122 lw r2, [r0, PT_R2]
123 lw r3, [r0, PT_R3]
124 lw r4, [r0, PT_R4]
125 lw r5, [r0, PT_R5]
126 lw r6, [r0, PT_R6]
127 lw r7, [r0, PT_R7]
128
129 lw r8, [r0, PT_R8]
130 lw r9, [r0, PT_R9]
131 lw r10, [r0, PT_R10]
132 lw r11, [r0, PT_R11]
133 lw r12, [r0, PT_R12]
134 lw r13, [r0, PT_R13]
135 lw r14, [r0, PT_R14]
136 lw r15, [r0, PT_R15]
137
138 lw r16, [r0, PT_R16]
139 lw r17, [r0, PT_R17]
140 lw r18, [r0, PT_R18]
141 lw r19, [r0, PT_R19]
142 lw r20, [r0, PT_R20]
143 lw r21, [r0, PT_R21]
144 lw r22, [r0, PT_R22]
145 lw r23, [r0, PT_R23]
146
147 lw r24, [r0, PT_R24]
148 lw r25, [r0, PT_R25]
149 lw r26, [r0, PT_R26]
150 lw r27, [r0, PT_R27]
151 lw r28, [r0, PT_R28]
152 lw r29, [r0, PT_R29]
153
154 lw r30, [r0, PT_EPC]
155 lw r0, [r0, PT_R0]
156 mtcr r30, cr5
157 rte
158.endm
159
160#endif /* __ASSEMBLY__ */
161#endif /* _ASM_SCORE_ASMMACRO_H */
diff --git a/arch/score/include/asm/atomic.h b/arch/score/include/asm/atomic.h
new file mode 100644
index 000000000000..84eb8ddf9f3f
--- /dev/null
+++ b/arch/score/include/asm/atomic.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_SCORE_ATOMIC_H
2#define _ASM_SCORE_ATOMIC_H
3
4#include <asm-generic/atomic.h>
5
6#endif /* _ASM_SCORE_ATOMIC_H */
diff --git a/arch/score/include/asm/auxvec.h b/arch/score/include/asm/auxvec.h
new file mode 100644
index 000000000000..f69151565aee
--- /dev/null
+++ b/arch/score/include/asm/auxvec.h
@@ -0,0 +1,4 @@
1#ifndef _ASM_SCORE_AUXVEC_H
2#define _ASM_SCORE_AUXVEC_H
3
4#endif /* _ASM_SCORE_AUXVEC_H */
diff --git a/arch/score/include/asm/bitops.h b/arch/score/include/asm/bitops.h
new file mode 100644
index 000000000000..2763b050fca8
--- /dev/null
+++ b/arch/score/include/asm/bitops.h
@@ -0,0 +1,16 @@
1#ifndef _ASM_SCORE_BITOPS_H
2#define _ASM_SCORE_BITOPS_H
3
4#include <asm/byteorder.h> /* swab32 */
5#include <asm/system.h> /* save_flags */
6
7/*
8 * clear_bit() doesn't provide any barrier for the compiler.
9 */
10#define smp_mb__before_clear_bit() barrier()
11#define smp_mb__after_clear_bit() barrier()
12
13#include <asm-generic/bitops.h>
14#include <asm-generic/bitops/__fls.h>
15
16#endif /* _ASM_SCORE_BITOPS_H */
diff --git a/arch/score/include/asm/bitsperlong.h b/arch/score/include/asm/bitsperlong.h
new file mode 100644
index 000000000000..86ff337aa459
--- /dev/null
+++ b/arch/score/include/asm/bitsperlong.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_SCORE_BITSPERLONG_H
2#define _ASM_SCORE_BITSPERLONG_H
3
4#include <asm-generic/bitsperlong.h>
5
6#endif /* _ASM_SCORE_BITSPERLONG_H */
diff --git a/arch/score/include/asm/bug.h b/arch/score/include/asm/bug.h
new file mode 100644
index 000000000000..bb76a330bcf1
--- /dev/null
+++ b/arch/score/include/asm/bug.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_SCORE_BUG_H
2#define _ASM_SCORE_BUG_H
3
4#include <asm-generic/bug.h>
5
6#endif /* _ASM_SCORE_BUG_H */
diff --git a/arch/score/include/asm/bugs.h b/arch/score/include/asm/bugs.h
new file mode 100644
index 000000000000..a062e1056bb3
--- /dev/null
+++ b/arch/score/include/asm/bugs.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_SCORE_BUGS_H
2#define _ASM_SCORE_BUGS_H
3
4#include <asm-generic/bugs.h>
5
6#endif /* _ASM_SCORE_BUGS_H */
diff --git a/arch/score/include/asm/byteorder.h b/arch/score/include/asm/byteorder.h
new file mode 100644
index 000000000000..88cbebc79212
--- /dev/null
+++ b/arch/score/include/asm/byteorder.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_SCORE_BYTEORDER_H
2#define _ASM_SCORE_BYTEORDER_H
3
4#include <linux/byteorder/little_endian.h>
5
6#endif /* _ASM_SCORE_BYTEORDER_H */
diff --git a/arch/score/include/asm/cache.h b/arch/score/include/asm/cache.h
new file mode 100644
index 000000000000..ae3d59f2d2c4
--- /dev/null
+++ b/arch/score/include/asm/cache.h
@@ -0,0 +1,7 @@
1#ifndef _ASM_SCORE_CACHE_H
2#define _ASM_SCORE_CACHE_H
3
4#define L1_CACHE_SHIFT 4
5#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
6
7#endif /* _ASM_SCORE_CACHE_H */
diff --git a/arch/score/include/asm/cacheflush.h b/arch/score/include/asm/cacheflush.h
new file mode 100644
index 000000000000..07cc8fc457cd
--- /dev/null
+++ b/arch/score/include/asm/cacheflush.h
@@ -0,0 +1,45 @@
1#ifndef _ASM_SCORE_CACHEFLUSH_H
2#define _ASM_SCORE_CACHEFLUSH_H
3
4/* Keep includes the same across arches. */
5#include <linux/mm.h>
6
7extern void flush_cache_all(void);
8extern void flush_cache_mm(struct mm_struct *mm);
9extern void flush_cache_range(struct vm_area_struct *vma,
10 unsigned long start, unsigned long end);
11extern void flush_cache_page(struct vm_area_struct *vma,
12 unsigned long page, unsigned long pfn);
13extern void flush_cache_sigtramp(unsigned long addr);
14extern void flush_icache_all(void);
15extern void flush_icache_range(unsigned long start, unsigned long end);
16extern void flush_dcache_range(unsigned long start, unsigned long end);
17
18#define flush_cache_dup_mm(mm) do {} while (0)
19#define flush_dcache_page(page) do {} while (0)
20#define flush_dcache_mmap_lock(mapping) do {} while (0)
21#define flush_dcache_mmap_unlock(mapping) do {} while (0)
22#define flush_cache_vmap(start, end) do {} while (0)
23#define flush_cache_vunmap(start, end) do {} while (0)
24
25static inline void flush_icache_page(struct vm_area_struct *vma,
26 struct page *page)
27{
28 if (vma->vm_flags & VM_EXEC) {
29 void *v = page_address(page);
30 flush_icache_range((unsigned long) v,
31 (unsigned long) v + PAGE_SIZE);
32 }
33}
34
35#define copy_from_user_page(vma, page, vaddr, dst, src, len) \
36 memcpy(dst, src, len)
37
38#define copy_to_user_page(vma, page, vaddr, dst, src, len) \
39 do { \
40 memcpy(dst, src, len); \
41 if ((vma->vm_flags & VM_EXEC)) \
42 flush_cache_page(vma, vaddr, page_to_pfn(page));\
43 } while (0)
44
45#endif /* _ASM_SCORE_CACHEFLUSH_H */
diff --git a/arch/score/include/asm/checksum.h b/arch/score/include/asm/checksum.h
new file mode 100644
index 000000000000..f909ac3144a4
--- /dev/null
+++ b/arch/score/include/asm/checksum.h
@@ -0,0 +1,235 @@
1#ifndef _ASM_SCORE_CHECKSUM_H
2#define _ASM_SCORE_CHECKSUM_H
3
4#include <linux/in6.h>
5#include <asm/uaccess.h>
6
7/*
8 * computes the checksum of a memory block at buff, length len,
9 * and adds in "sum" (32-bit)
10 *
11 * returns a 32-bit number suitable for feeding into itself
12 * or csum_tcpudp_magic
13 *
14 * this function must be called with even lengths, except
15 * for the last fragment, which may be odd
16 *
17 * it's best to have buff aligned on a 32-bit boundary
18 */
19unsigned int csum_partial(const void *buff, int len, __wsum sum);
20unsigned int csum_partial_copy_from_user(const char *src, char *dst, int len,
21 unsigned int sum, int *csum_err);
22unsigned int csum_partial_copy(const char *src, char *dst,
23 int len, unsigned int sum);
24
25/*
26 * this is a new version of the above that records errors it finds in *errp,
27 * but continues and zeros the rest of the buffer.
28 */
29
30/*
31 * Copy and checksum to user
32 */
33#define HAVE_CSUM_COPY_USER
34static inline
35__wsum csum_and_copy_to_user(const void *src, void __user *dst, int len,
36 __wsum sum, int *err_ptr)
37{
38 sum = csum_partial(src, len, sum);
39 if (copy_to_user(dst, src, len)) {
40 *err_ptr = -EFAULT;
41 return (__force __wsum) -1; /* invalid checksum */
42 }
43 return sum;
44}
45
46
47#define csum_partial_copy_nocheck csum_partial_copy
48/*
49 * Fold a partial checksum without adding pseudo headers
50 */
51
52static inline __sum16 csum_fold(__wsum sum)
53{
54 /* the while loop is unnecessary really, it's always enough with two
55 iterations */
56 __asm__ __volatile__(
57 ".set volatile\n\t"
58 ".set\tr1\n\t"
59 "slli\tr1,%0, 16\n\t"
60 "add\t%0,%0, r1\n\t"
61 "cmp.c\tr1, %0\n\t"
62 "srli\t%0, %0, 16\n\t"
63 "bleu\t1f\n\t"
64 "addi\t%0, 0x1\n\t"
65 "1:ldi\tr30, 0xffff\n\t"
66 "xor\t%0, %0, r30\n\t"
67 "slli\t%0, %0, 16\n\t"
68 "srli\t%0, %0, 16\n\t"
69 ".set\tnor1\n\t"
70 ".set optimize\n\t"
71 : "=r" (sum)
72 : "0" (sum));
73 return sum;
74}
75
76/*
77 * This is a version of ip_compute_csum() optimized for IP headers,
78 * which always checksum on 4 octet boundaries.
79 *
80 * By Jorge Cwik <jorge@laser.satlink.net>, adapted for linux by
81 * Arnt Gulbrandsen.
82 */
83static inline __sum16 ip_fast_csum(const void *iph, unsigned int ihl)
84{
85 unsigned int sum;
86 unsigned long dummy;
87
88 __asm__ __volatile__(
89 ".set volatile\n\t"
90 ".set\tnor1\n\t"
91 "lw\t%0, [%1]\n\t"
92 "subri\t%2, %2, 4\n\t"
93 "slli\t%2, %2, 2\n\t"
94 "lw\t%3, [%1, 4]\n\t"
95 "add\t%2, %2, %1\n\t"
96 "add\t%0, %0, %3\n\t"
97 "cmp.c\t%3, %0\n\t"
98 "lw\t%3, [%1, 8]\n\t"
99 "bleu\t1f\n\t"
100 "addi\t%0, 0x1\n\t"
101 "1:\n\t"
102 "add\t%0, %0, %3\n\t"
103 "cmp.c\t%3, %0\n\t"
104 "lw\t%3, [%1, 12]\n\t"
105 "bleu\t1f\n\t"
106 "addi\t%0, 0x1\n\t"
107 "1:add\t%0, %0, %3\n\t"
108 "cmp.c\t%3, %0\n\t"
109 "bleu\t1f\n\t"
110 "addi\t%0, 0x1\n"
111
112 "1:\tlw\t%3, [%1, 16]\n\t"
113 "addi\t%1, 4\n\t"
114 "add\t%0, %0, %3\n\t"
115 "cmp.c\t%3, %0\n\t"
116 "bleu\t2f\n\t"
117 "addi\t%0, 0x1\n"
118 "2:cmp.c\t%2, %1\n\t"
119 "bne\t1b\n\t"
120
121 ".set\tr1\n\t"
122 ".set optimize\n\t"
123 : "=&r" (sum), "=&r" (iph), "=&r" (ihl), "=&r" (dummy)
124 : "1" (iph), "2" (ihl));
125
126 return csum_fold(sum);
127}
128
129static inline __wsum
130csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len,
131 unsigned short proto, __wsum sum)
132{
133 unsigned long tmp = (ntohs(len) << 16) + proto * 256;
134 __asm__ __volatile__(
135 ".set volatile\n\t"
136 "add\t%0, %0, %2\n\t"
137 "cmp.c\t%2, %0\n\t"
138 "bleu\t1f\n\t"
139 "addi\t%0, 0x1\n\t"
140 "1:\n\t"
141 "add\t%0, %0, %3\n\t"
142 "cmp.c\t%3, %0\n\t"
143 "bleu\t1f\n\t"
144 "addi\t%0, 0x1\n\t"
145 "1:\n\t"
146 "add\t%0, %0, %4\n\t"
147 "cmp.c\t%4, %0\n\t"
148 "bleu\t1f\n\t"
149 "addi\t%0, 0x1\n\t"
150 "1:\n\t"
151 ".set optimize\n\t"
152 : "=r" (sum)
153 : "0" (daddr), "r"(saddr),
154 "r" (tmp),
155 "r" (sum));
156 return sum;
157}
158
159/*
160 * computes the checksum of the TCP/UDP pseudo-header
161 * returns a 16-bit checksum, already complemented
162 */
163static inline __sum16
164csum_tcpudp_magic(__be32 saddr, __be32 daddr, unsigned short len,
165 unsigned short proto, __wsum sum)
166{
167 return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum));
168}
169
170/*
171 * this routine is used for miscellaneous IP-like checksums, mainly
172 * in icmp.c
173 */
174
175static inline unsigned short ip_compute_csum(const void *buff, int len)
176{
177 return csum_fold(csum_partial(buff, len, 0));
178}
179
180#define _HAVE_ARCH_IPV6_CSUM
181static inline __sum16 csum_ipv6_magic(const struct in6_addr *saddr,
182 const struct in6_addr *daddr,
183 __u32 len, unsigned short proto,
184 __wsum sum)
185{
186 __asm__ __volatile__(
187 ".set\tnoreorder\t\t\t# csum_ipv6_magic\n\t"
188 ".set\tnoat\n\t"
189 "addu\t%0, %5\t\t\t# proto (long in network byte order)\n\t"
190 "sltu\t$1, %0, %5\n\t"
191 "addu\t%0, $1\n\t"
192 "addu\t%0, %6\t\t\t# csum\n\t"
193 "sltu\t$1, %0, %6\n\t"
194 "lw\t%1, 0(%2)\t\t\t# four words source address\n\t"
195 "addu\t%0, $1\n\t"
196 "addu\t%0, %1\n\t"
197 "sltu\t$1, %0, %1\n\t"
198 "lw\t%1, 4(%2)\n\t"
199 "addu\t%0, $1\n\t"
200 "addu\t%0, %1\n\t"
201 "sltu\t$1, %0, %1\n\t"
202 "lw\t%1, 8(%2)\n\t"
203 "addu\t%0, $1\n\t"
204 "addu\t%0, %1\n\t"
205 "sltu\t$1, %0, %1\n\t"
206 "lw\t%1, 12(%2)\n\t"
207 "addu\t%0, $1\n\t"
208 "addu\t%0, %1\n\t"
209 "sltu\t$1, %0, %1\n\t"
210 "lw\t%1, 0(%3)\n\t"
211 "addu\t%0, $1\n\t"
212 "addu\t%0, %1\n\t"
213 "sltu\t$1, %0, %1\n\t"
214 "lw\t%1, 4(%3)\n\t"
215 "addu\t%0, $1\n\t"
216 "addu\t%0, %1\n\t"
217 "sltu\t$1, %0, %1\n\t"
218 "lw\t%1, 8(%3)\n\t"
219 "addu\t%0, $1\n\t"
220 "addu\t%0, %1\n\t"
221 "sltu\t$1, %0, %1\n\t"
222 "lw\t%1, 12(%3)\n\t"
223 "addu\t%0, $1\n\t"
224 "addu\t%0, %1\n\t"
225 "sltu\t$1, %0, %1\n\t"
226 "addu\t%0, $1\t\t\t# Add final carry\n\t"
227 ".set\tnoat\n\t"
228 ".set\tnoreorder"
229 : "=r" (sum), "=r" (proto)
230 : "r" (saddr), "r" (daddr),
231 "0" (htonl(len)), "1" (htonl(proto)), "r" (sum));
232
233 return csum_fold(sum);
234}
235#endif /* _ASM_SCORE_CHECKSUM_H */
diff --git a/arch/score/include/asm/cputime.h b/arch/score/include/asm/cputime.h
new file mode 100644
index 000000000000..1fced99f0d67
--- /dev/null
+++ b/arch/score/include/asm/cputime.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_SCORE_CPUTIME_H
2#define _ASM_SCORE_CPUTIME_H
3
4#include <asm-generic/cputime.h>
5
6#endif /* _ASM_SCORE_CPUTIME_H */
diff --git a/arch/score/include/asm/current.h b/arch/score/include/asm/current.h
new file mode 100644
index 000000000000..16eae9cbaf1a
--- /dev/null
+++ b/arch/score/include/asm/current.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_SCORE_CURRENT_H
2#define _ASM_SCORE_CURRENT_H
3
4#include <asm-generic/current.h>
5
6#endif /* _ASM_SCORE_CURRENT_H */
diff --git a/arch/score/include/asm/delay.h b/arch/score/include/asm/delay.h
new file mode 100644
index 000000000000..6726ec199dc0
--- /dev/null
+++ b/arch/score/include/asm/delay.h
@@ -0,0 +1,26 @@
1#ifndef _ASM_SCORE_DELAY_H
2#define _ASM_SCORE_DELAY_H
3
4static inline void __delay(unsigned long loops)
5{
6 /* 3 cycles per loop. */
7 __asm__ __volatile__ (
8 "1:\tsubi\t%0, 3\n\t"
9 "cmpz.c\t%0\n\t"
10 "ble\t1b\n\t"
11 : "=r" (loops)
12 : "0" (loops));
13}
14
15static inline void __udelay(unsigned long usecs)
16{
17 unsigned long loops_per_usec;
18
19 loops_per_usec = (loops_per_jiffy * HZ) / 1000000;
20
21 __delay(usecs * loops_per_usec);
22}
23
24#define udelay(usecs) __udelay(usecs)
25
26#endif /* _ASM_SCORE_DELAY_H */
diff --git a/arch/score/include/asm/device.h b/arch/score/include/asm/device.h
new file mode 100644
index 000000000000..2dc7cc5d5ef9
--- /dev/null
+++ b/arch/score/include/asm/device.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_SCORE_DEVICE_H
2#define _ASM_SCORE_DEVICE_H
3
4#include <asm-generic/device.h>
5
6#endif /* _ASM_SCORE_DEVICE_H */
diff --git a/arch/score/include/asm/div64.h b/arch/score/include/asm/div64.h
new file mode 100644
index 000000000000..75fae19824eb
--- /dev/null
+++ b/arch/score/include/asm/div64.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_SCORE_DIV64_H
2#define _ASM_SCORE_DIV64_H
3
4#include <asm-generic/div64.h>
5
6#endif /* _ASM_SCORE_DIV64_H */
diff --git a/arch/score/include/asm/dma-mapping.h b/arch/score/include/asm/dma-mapping.h
new file mode 100644
index 000000000000..f9c0193c7a53
--- /dev/null
+++ b/arch/score/include/asm/dma-mapping.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_SCORE_DMA_MAPPING_H
2#define _ASM_SCORE_DMA_MAPPING_H
3
4#include <asm-generic/dma-mapping-broken.h>
5
6#endif /* _ASM_SCORE_DMA_MAPPING_H */
diff --git a/arch/score/include/asm/dma.h b/arch/score/include/asm/dma.h
new file mode 100644
index 000000000000..9f44185298bf
--- /dev/null
+++ b/arch/score/include/asm/dma.h
@@ -0,0 +1,8 @@
1#ifndef _ASM_SCORE_DMA_H
2#define _ASM_SCORE_DMA_H
3
4#include <asm/io.h>
5
6#define MAX_DMA_ADDRESS (0)
7
8#endif /* _ASM_SCORE_DMA_H */
diff --git a/arch/score/include/asm/elf.h b/arch/score/include/asm/elf.h
new file mode 100644
index 000000000000..43526d9fda93
--- /dev/null
+++ b/arch/score/include/asm/elf.h
@@ -0,0 +1,103 @@
1#ifndef _ASM_SCORE_ELF_H
2#define _ASM_SCORE_ELF_H
3
4#include <linux/ptrace.h>
5
6#define EM_SCORE7 135
7
8/* Relocation types. */
9#define R_SCORE_NONE 0
10#define R_SCORE_HI16 1
11#define R_SCORE_LO16 2
12#define R_SCORE_BCMP 3
13#define R_SCORE_24 4
14#define R_SCORE_PC19 5
15#define R_SCORE16_11 6
16#define R_SCORE16_PC8 7
17#define R_SCORE_ABS32 8
18#define R_SCORE_ABS16 9
19#define R_SCORE_DUMMY2 10
20#define R_SCORE_GP15 11
21#define R_SCORE_GNU_VTINHERIT 12
22#define R_SCORE_GNU_VTENTRY 13
23#define R_SCORE_GOT15 14
24#define R_SCORE_GOT_LO16 15
25#define R_SCORE_CALL15 16
26#define R_SCORE_GPREL32 17
27#define R_SCORE_REL32 18
28#define R_SCORE_DUMMY_HI16 19
29#define R_SCORE_IMM30 20
30#define R_SCORE_IMM32 21
31
32/* ELF register definitions */
33typedef unsigned long elf_greg_t;
34
35#define ELF_NGREG (sizeof(struct pt_regs) / sizeof(elf_greg_t))
36typedef elf_greg_t elf_gregset_t[ELF_NGREG];
37
38/* Score does not have fp regs. */
39typedef double elf_fpreg_t;
40typedef elf_fpreg_t elf_fpregset_t;
41
42#define elf_check_arch(x) ((x)->e_machine == EM_SCORE7)
43
44/*
45 * These are used to set parameters in the core dumps.
46 */
47#define ELF_CLASS ELFCLASS32
48
49/*
50 * These are used to set parameters in the core dumps.
51 */
52#define ELF_DATA ELFDATA2LSB
53#define ELF_ARCH EM_SCORE7
54
55#define SET_PERSONALITY(ex) \
56do { \
57 set_personality(PER_LINUX); \
58} while (0)
59
60struct task_struct;
61struct pt_regs;
62
63#define CORE_DUMP_USE_REGSET
64#define USE_ELF_CORE_DUMP
65#define ELF_EXEC_PAGESIZE PAGE_SIZE
66
67/* This yields a mask that user programs can use to figure out what
68 instruction set this cpu supports. This could be done in userspace,
69 but it's not easy, and we've already done it here. */
70
71#define ELF_HWCAP (0)
72
73/* This yields a string that ld.so will use to load implementation
74 specific libraries for optimization. This is more specific in
75 intent than poking at uname or /proc/cpuinfo.
76
77 For the moment, we have only optimizations for the Intel generations,
78 but that could change... */
79
80#define ELF_PLATFORM (NULL)
81
82#define ELF_PLAT_INIT(_r, load_addr) \
83do { \
84 _r->regs[1] = _r->regs[2] = _r->regs[3] = _r->regs[4] = 0; \
85 _r->regs[5] = _r->regs[6] = _r->regs[7] = _r->regs[8] = 0; \
86 _r->regs[9] = _r->regs[10] = _r->regs[11] = _r->regs[12] = 0; \
87 _r->regs[13] = _r->regs[14] = _r->regs[15] = _r->regs[16] = 0; \
88 _r->regs[17] = _r->regs[18] = _r->regs[19] = _r->regs[20] = 0; \
89 _r->regs[21] = _r->regs[22] = _r->regs[23] = _r->regs[24] = 0; \
90 _r->regs[25] = _r->regs[26] = _r->regs[27] = _r->regs[28] = 0; \
91 _r->regs[30] = _r->regs[31] = 0; \
92} while (0)
93
94/* This is the location that an ET_DYN program is loaded if exec'ed. Typical
95 use of this is to invoke "./ld.so someprog" to test out a new version of
96 the loader. We need to make sure that it is out of the way of the program
97 that it will "exec", and that there is sufficient room for the brk. */
98
99#ifndef ELF_ET_DYN_BASE
100#define ELF_ET_DYN_BASE (TASK_SIZE / 3 * 2)
101#endif
102
103#endif /* _ASM_SCORE_ELF_H */
diff --git a/arch/score/include/asm/emergency-restart.h b/arch/score/include/asm/emergency-restart.h
new file mode 100644
index 000000000000..ca31e9803a8a
--- /dev/null
+++ b/arch/score/include/asm/emergency-restart.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_SCORE_EMERGENCY_RESTART_H
2#define _ASM_SCORE_EMERGENCY_RESTART_H
3
4#include <asm-generic/emergency-restart.h>
5
6#endif /* _ASM_SCORE_EMERGENCY_RESTART_H */
diff --git a/arch/score/include/asm/errno.h b/arch/score/include/asm/errno.h
new file mode 100644
index 000000000000..29ff39d5ab47
--- /dev/null
+++ b/arch/score/include/asm/errno.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_SCORE_ERRNO_H
2#define _ASM_SCORE_ERRNO_H
3
4#include <asm-generic/errno.h>
5
6#endif /* _ASM_SCORE_ERRNO_H */
diff --git a/arch/score/include/asm/fcntl.h b/arch/score/include/asm/fcntl.h
new file mode 100644
index 000000000000..03968a3103a4
--- /dev/null
+++ b/arch/score/include/asm/fcntl.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_SCORE_FCNTL_H
2#define _ASM_SCORE_FCNTL_H
3
4#include <asm-generic/fcntl.h>
5
6#endif /* _ASM_SCORE_FCNTL_H */
diff --git a/arch/score/include/asm/fixmap.h b/arch/score/include/asm/fixmap.h
new file mode 100644
index 000000000000..ee1676694024
--- /dev/null
+++ b/arch/score/include/asm/fixmap.h
@@ -0,0 +1,82 @@
1#ifndef _ASM_SCORE_FIXMAP_H
2#define _ASM_SCORE_FIXMAP_H
3
4#include <asm/page.h>
5
6#define PHY_RAM_BASE 0x00000000
7#define PHY_IO_BASE 0x10000000
8
9#define VIRTUAL_RAM_BASE 0xa0000000
10#define VIRTUAL_IO_BASE 0xb0000000
11
12#define RAM_SPACE_SIZE 0x10000000
13#define IO_SPACE_SIZE 0x10000000
14
15/* Kernel unmapped, cached 512MB */
16#define KSEG1 0xa0000000
17
18/*
19 * Here we define all the compile-time 'special' virtual
20 * addresses. The point is to have a constant address at
21 * compile time, but to set the physical address only
22 * in the boot process. We allocate these special addresses
23 * from the end of virtual memory (0xfffff000) backwards.
24 * Also this lets us do fail-safe vmalloc(), we
25 * can guarantee that these special addresses and
26 * vmalloc()-ed addresses never overlap.
27 *
28 * these 'compile-time allocated' memory buffers are
29 * fixed-size 4k pages. (or larger if used with an increment
30 * highger than 1) use fixmap_set(idx,phys) to associate
31 * physical memory with fixmap indices.
32 *
33 * TLB entries of such buffers will not be flushed across
34 * task switches.
35 */
36
37/*
38 * on UP currently we will have no trace of the fixmap mechanizm,
39 * no page table allocations, etc. This might change in the
40 * future, say framebuffers for the console driver(s) could be
41 * fix-mapped?
42 */
43enum fixed_addresses {
44#define FIX_N_COLOURS 8
45 FIX_CMAP_BEGIN,
46 FIX_CMAP_END = FIX_CMAP_BEGIN + FIX_N_COLOURS,
47 __end_of_fixed_addresses
48};
49
50/*
51 * used by vmalloc.c.
52 *
53 * Leave one empty page between vmalloc'ed areas and
54 * the start of the fixmap, and leave one page empty
55 * at the top of mem..
56 */
57#define FIXADDR_TOP ((unsigned long)(long)(int)0xfefe0000)
58#define FIXADDR_SIZE (__end_of_fixed_addresses << PAGE_SHIFT)
59#define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE)
60
61#define __fix_to_virt(x) (FIXADDR_TOP - ((x) << PAGE_SHIFT))
62#define __virt_to_fix(x) \
63 ((FIXADDR_TOP - ((x) & PAGE_MASK)) >> PAGE_SHIFT)
64
65extern void __this_fixmap_does_not_exist(void);
66
67/*
68 * 'index to address' translation. If anyone tries to use the idx
69 * directly without tranlation, we catch the bug with a NULL-deference
70 * kernel oops. Illegal ranges of incoming indices are caught too.
71 */
72static inline unsigned long fix_to_virt(const unsigned int idx)
73{
74 return __fix_to_virt(idx);
75}
76
77static inline unsigned long virt_to_fix(const unsigned long vaddr)
78{
79 return __virt_to_fix(vaddr);
80}
81
82#endif /* _ASM_SCORE_FIXMAP_H */
diff --git a/arch/score/include/asm/ftrace.h b/arch/score/include/asm/ftrace.h
new file mode 100644
index 000000000000..79d6f10e1f5b
--- /dev/null
+++ b/arch/score/include/asm/ftrace.h
@@ -0,0 +1,4 @@
1#ifndef _ASM_SCORE_FTRACE_H
2#define _ASM_SCORE_FTRACE_H
3
4#endif /* _ASM_SCORE_FTRACE_H */
diff --git a/arch/score/include/asm/futex.h b/arch/score/include/asm/futex.h
new file mode 100644
index 000000000000..1dca2420f8db
--- /dev/null
+++ b/arch/score/include/asm/futex.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_SCORE_FUTEX_H
2#define _ASM_SCORE_FUTEX_H
3
4#include <asm-generic/futex.h>
5
6#endif /* _ASM_SCORE_FUTEX_H */
diff --git a/arch/score/include/asm/hardirq.h b/arch/score/include/asm/hardirq.h
new file mode 100644
index 000000000000..dc932c50d3ee
--- /dev/null
+++ b/arch/score/include/asm/hardirq.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_SCORE_HARDIRQ_H
2#define _ASM_SCORE_HARDIRQ_H
3
4#include <asm-generic/hardirq.h>
5
6#endif /* _ASM_SCORE_HARDIRQ_H */
diff --git a/arch/score/include/asm/hw_irq.h b/arch/score/include/asm/hw_irq.h
new file mode 100644
index 000000000000..4caafb2b509a
--- /dev/null
+++ b/arch/score/include/asm/hw_irq.h
@@ -0,0 +1,4 @@
1#ifndef _ASM_SCORE_HW_IRQ_H
2#define _ASM_SCORE_HW_IRQ_H
3
4#endif /* _ASM_SCORE_HW_IRQ_H */
diff --git a/arch/score/include/asm/io.h b/arch/score/include/asm/io.h
new file mode 100644
index 000000000000..fbbfd7132e3b
--- /dev/null
+++ b/arch/score/include/asm/io.h
@@ -0,0 +1,9 @@
1#ifndef _ASM_SCORE_IO_H
2#define _ASM_SCORE_IO_H
3
4#include <asm-generic/io.h>
5
6#define virt_to_bus virt_to_phys
7#define bus_to_virt phys_to_virt
8
9#endif /* _ASM_SCORE_IO_H */
diff --git a/arch/score/include/asm/ioctl.h b/arch/score/include/asm/ioctl.h
new file mode 100644
index 000000000000..a351d2194bfd
--- /dev/null
+++ b/arch/score/include/asm/ioctl.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_SCORE_IOCTL_H
2#define _ASM_SCORE_IOCTL_H
3
4#include <asm-generic/ioctl.h>
5
6#endif /* _ASM_SCORE_IOCTL_H */
diff --git a/arch/score/include/asm/ioctls.h b/arch/score/include/asm/ioctls.h
new file mode 100644
index 000000000000..ed01d2b9aeab
--- /dev/null
+++ b/arch/score/include/asm/ioctls.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_SCORE_IOCTLS_H
2#define _ASM_SCORE_IOCTLS_H
3
4#include <asm-generic/ioctls.h>
5
6#endif /* _ASM_SCORE_IOCTLS_H */
diff --git a/arch/score/include/asm/ipcbuf.h b/arch/score/include/asm/ipcbuf.h
new file mode 100644
index 000000000000..e082ceff1818
--- /dev/null
+++ b/arch/score/include/asm/ipcbuf.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_SCORE_IPCBUF_H
2#define _ASM_SCORE_IPCBUF_H
3
4#include <asm-generic/ipcbuf.h>
5
6#endif /* _ASM_SCORE_IPCBUF_H */
diff --git a/arch/score/include/asm/irq.h b/arch/score/include/asm/irq.h
new file mode 100644
index 000000000000..c883f3df33fa
--- /dev/null
+++ b/arch/score/include/asm/irq.h
@@ -0,0 +1,25 @@
1#ifndef _ASM_SCORE_IRQ_H
2#define _ASM_SCORE_IRQ_H
3
4#define EXCEPTION_VECTOR_BASE_ADDR 0xa0000000
5#define VECTOR_ADDRESS_OFFSET_MODE4 0
6#define VECTOR_ADDRESS_OFFSET_MODE16 1
7
8#define DEBUG_VECTOR_SIZE (0x4)
9#define DEBUG_VECTOR_BASE_ADDR ((EXCEPTION_VECTOR_BASE_ADDR) + 0x1fc)
10
11#define GENERAL_VECTOR_SIZE (0x10)
12#define GENERAL_VECTOR_BASE_ADDR ((EXCEPTION_VECTOR_BASE_ADDR) + 0x200)
13
14#define NR_IRQS 64
15#define IRQ_VECTOR_SIZE (0x10)
16#define IRQ_VECTOR_BASE_ADDR ((EXCEPTION_VECTOR_BASE_ADDR) + 0x210)
17#define IRQ_VECTOR_END_ADDR ((EXCEPTION_VECTOR_BASE_ADDR) + 0x5f0)
18
19#define irq_canonicalize(irq) (irq)
20
21#define IRQ_TIMER (7) /* Timer IRQ number of SPCT6600 */
22
23extern void interrupt_exception_vector(void);
24
25#endif /* _ASM_SCORE_IRQ_H */
diff --git a/arch/score/include/asm/irq_regs.h b/arch/score/include/asm/irq_regs.h
new file mode 100644
index 000000000000..b8e881c9a69f
--- /dev/null
+++ b/arch/score/include/asm/irq_regs.h
@@ -0,0 +1,11 @@
1#ifndef _ASM_SCORE_IRQ_REGS_H
2#define _ASM_SCORE_IRQ_REGS_H
3
4#include <linux/thread_info.h>
5
6static inline struct pt_regs *get_irq_regs(void)
7{
8 return current_thread_info()->regs;
9}
10
11#endif /* _ASM_SCORE_IRQ_REGS_H */
diff --git a/arch/score/include/asm/irqflags.h b/arch/score/include/asm/irqflags.h
new file mode 100644
index 000000000000..690a6cae7294
--- /dev/null
+++ b/arch/score/include/asm/irqflags.h
@@ -0,0 +1,109 @@
1#ifndef _ASM_SCORE_IRQFLAGS_H
2#define _ASM_SCORE_IRQFLAGS_H
3
4#ifndef __ASSEMBLY__
5
6#define raw_local_irq_save(x) \
7{ \
8 __asm__ __volatile__( \
9 "mfcr r8, cr0;" \
10 "li r9, 0xfffffffe;" \
11 "nop;" \
12 "mv %0, r8;" \
13 "and r8, r8, r9;" \
14 "mtcr r8, cr0;" \
15 "nop;" \
16 "nop;" \
17 "nop;" \
18 "nop;" \
19 "nop;" \
20 : "=r" (x) \
21 : \
22 : "r8", "r9" \
23 ); \
24}
25
26#define raw_local_irq_restore(x) \
27{ \
28 __asm__ __volatile__( \
29 "mfcr r8, cr0;" \
30 "ldi r9, 0x1;" \
31 "and %0, %0, r9;" \
32 "or r8, r8, %0;" \
33 "mtcr r8, cr0;" \
34 "nop;" \
35 "nop;" \
36 "nop;" \
37 "nop;" \
38 "nop;" \
39 : \
40 : "r"(x) \
41 : "r8", "r9" \
42 ); \
43}
44
45#define raw_local_irq_enable(void) \
46{ \
47 __asm__ __volatile__( \
48 "mfcr\tr8,cr0;" \
49 "nop;" \
50 "nop;" \
51 "ori\tr8,0x1;" \
52 "mtcr\tr8,cr0;" \
53 "nop;" \
54 "nop;" \
55 "nop;" \
56 "nop;" \
57 "nop;" \
58 : \
59 : \
60 : "r8"); \
61}
62
63#define raw_local_irq_disable(void) \
64{ \
65 __asm__ __volatile__( \
66 "mfcr\tr8,cr0;" \
67 "nop;" \
68 "nop;" \
69 "srli\tr8,r8,1;" \
70 "slli\tr8,r8,1;" \
71 "mtcr\tr8,cr0;" \
72 "nop;" \
73 "nop;" \
74 "nop;" \
75 "nop;" \
76 "nop;" \
77 : \
78 : \
79 : "r8"); \
80}
81
82#define raw_local_save_flags(x) \
83{ \
84 __asm__ __volatile__( \
85 "mfcr r8, cr0;" \
86 "nop;" \
87 "nop;" \
88 "mv %0, r8;" \
89 "nop;" \
90 "nop;" \
91 "nop;" \
92 "nop;" \
93 "nop;" \
94 "ldi r9, 0x1;" \
95 "and %0, %0, r9;" \
96 : "=r" (x) \
97 : \
98 : "r8", "r9" \
99 ); \
100}
101
102static inline int raw_irqs_disabled_flags(unsigned long flags)
103{
104 return !(flags & 1);
105}
106
107#endif
108
109#endif /* _ASM_SCORE_IRQFLAGS_H */
diff --git a/arch/score/include/asm/kdebug.h b/arch/score/include/asm/kdebug.h
new file mode 100644
index 000000000000..a666e513f747
--- /dev/null
+++ b/arch/score/include/asm/kdebug.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_SCORE_KDEBUG_H
2#define _ASM_SCORE_KDEBUG_H
3
4#include <asm-generic/kdebug.h>
5
6#endif /* _ASM_SCORE_KDEBUG_H */
diff --git a/arch/score/include/asm/kmap_types.h b/arch/score/include/asm/kmap_types.h
new file mode 100644
index 000000000000..6c46eb5077d3
--- /dev/null
+++ b/arch/score/include/asm/kmap_types.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_SCORE_KMAP_TYPES_H
2#define _ASM_SCORE_KMAP_TYPES_H
3
4#include <asm-generic/kmap_types.h>
5
6#endif /* _ASM_SCORE_KMAP_TYPES_H */
diff --git a/arch/score/include/asm/linkage.h b/arch/score/include/asm/linkage.h
new file mode 100644
index 000000000000..2323a8ecf445
--- /dev/null
+++ b/arch/score/include/asm/linkage.h
@@ -0,0 +1,7 @@
1#ifndef _ASM_SCORE_LINKAGE_H
2#define _ASM_SCORE_LINKAGE_H
3
4#define __ALIGN .align 2
5#define __ALIGN_STR ".align 2"
6
7#endif /* _ASM_SCORE_LINKAGE_H */
diff --git a/arch/score/include/asm/local.h b/arch/score/include/asm/local.h
new file mode 100644
index 000000000000..7e02f13dbba8
--- /dev/null
+++ b/arch/score/include/asm/local.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_SCORE_LOCAL_H
2#define _ASM_SCORE_LOCAL_H
3
4#include <asm-generic/local.h>
5
6#endif /* _ASM_SCORE_LOCAL_H */
diff --git a/arch/score/include/asm/mman.h b/arch/score/include/asm/mman.h
new file mode 100644
index 000000000000..84d85ddfed8d
--- /dev/null
+++ b/arch/score/include/asm/mman.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_SCORE_MMAN_H
2#define _ASM_SCORE_MMAN_H
3
4#include <asm-generic/mman.h>
5
6#endif /* _ASM_SCORE_MMAN_H */
diff --git a/arch/score/include/asm/mmu.h b/arch/score/include/asm/mmu.h
new file mode 100644
index 000000000000..676828e4c10a
--- /dev/null
+++ b/arch/score/include/asm/mmu.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_SCORE_MMU_H
2#define _ASM_SCORE_MMU_H
3
4typedef unsigned long mm_context_t;
5
6#endif /* _ASM_SCORE_MMU_H */
diff --git a/arch/score/include/asm/mmu_context.h b/arch/score/include/asm/mmu_context.h
new file mode 100644
index 000000000000..2644577c96e8
--- /dev/null
+++ b/arch/score/include/asm/mmu_context.h
@@ -0,0 +1,113 @@
1#ifndef _ASM_SCORE_MMU_CONTEXT_H
2#define _ASM_SCORE_MMU_CONTEXT_H
3
4#include <linux/errno.h>
5#include <linux/sched.h>
6#include <linux/slab.h>
7#include <asm-generic/mm_hooks.h>
8
9#include <asm/cacheflush.h>
10#include <asm/tlbflush.h>
11#include <asm/scoreregs.h>
12
13/*
14 * For the fast tlb miss handlers, we keep a per cpu array of pointers
15 * to the current pgd for each processor. Also, the proc. id is stuffed
16 * into the context register.
17 */
18extern unsigned long asid_cache;
19extern unsigned long pgd_current;
20
21#define TLBMISS_HANDLER_SETUP_PGD(pgd) (pgd_current = (unsigned long)(pgd))
22
23#define TLBMISS_HANDLER_SETUP() \
24do { \
25 write_c0_context(0); \
26 TLBMISS_HANDLER_SETUP_PGD(swapper_pg_dir) \
27} while (0)
28
29/*
30 * All unused by hardware upper bits will be considered
31 * as a software asid extension.
32 */
33#define ASID_VERSION_MASK 0xfffff000
34#define ASID_FIRST_VERSION 0x1000
35
36/* PEVN --------- VPN ---------- --ASID--- -NA- */
37/* binary: 0000 0000 0000 0000 0000 0000 0001 0000 */
38/* binary: 0000 0000 0000 0000 0000 1111 1111 0000 */
39#define ASID_INC 0x10
40#define ASID_MASK 0xff0
41
42static inline void enter_lazy_tlb(struct mm_struct *mm,
43 struct task_struct *tsk)
44{}
45
46static inline void
47get_new_mmu_context(struct mm_struct *mm)
48{
49 unsigned long asid = asid_cache + ASID_INC;
50
51 if (!(asid & ASID_MASK)) {
52 local_flush_tlb_all(); /* start new asid cycle */
53 if (!asid) /* fix version if needed */
54 asid = ASID_FIRST_VERSION;
55 }
56
57 mm->context = asid;
58 asid_cache = asid;
59}
60
61/*
62 * Initialize the context related info for a new mm_struct
63 * instance.
64 */
65static inline int
66init_new_context(struct task_struct *tsk, struct mm_struct *mm)
67{
68 mm->context = 0;
69 return 0;
70}
71
72static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
73 struct task_struct *tsk)
74{
75 unsigned long flags;
76
77 local_irq_save(flags);
78 if ((next->context ^ asid_cache) & ASID_VERSION_MASK)
79 get_new_mmu_context(next);
80
81 pevn_set(next->context);
82 TLBMISS_HANDLER_SETUP_PGD(next->pgd);
83 local_irq_restore(flags);
84}
85
86/*
87 * Destroy context related info for an mm_struct that is about
88 * to be put to rest.
89 */
90static inline void destroy_context(struct mm_struct *mm)
91{}
92
93static inline void
94deactivate_mm(struct task_struct *task, struct mm_struct *mm)
95{}
96
97/*
98 * After we have set current->mm to a new value, this activates
99 * the context for the new mm so we see the new mappings.
100 */
101static inline void
102activate_mm(struct mm_struct *prev, struct mm_struct *next)
103{
104 unsigned long flags;
105
106 local_irq_save(flags);
107 get_new_mmu_context(next);
108 pevn_set(next->context);
109 TLBMISS_HANDLER_SETUP_PGD(next->pgd);
110 local_irq_restore(flags);
111}
112
113#endif /* _ASM_SCORE_MMU_CONTEXT_H */
diff --git a/arch/score/include/asm/module.h b/arch/score/include/asm/module.h
new file mode 100644
index 000000000000..f0b5dc0bd023
--- /dev/null
+++ b/arch/score/include/asm/module.h
@@ -0,0 +1,39 @@
1#ifndef _ASM_SCORE_MODULE_H
2#define _ASM_SCORE_MODULE_H
3
4#include <linux/list.h>
5#include <asm/uaccess.h>
6
7struct mod_arch_specific {
8 /* Data Bus Error exception tables */
9 struct list_head dbe_list;
10 const struct exception_table_entry *dbe_start;
11 const struct exception_table_entry *dbe_end;
12};
13
14typedef uint8_t Elf64_Byte; /* Type for a 8-bit quantity. */
15
16#define Elf_Shdr Elf32_Shdr
17#define Elf_Sym Elf32_Sym
18#define Elf_Ehdr Elf32_Ehdr
19#define Elf_Addr Elf32_Addr
20
21/* Given an address, look for it in the exception tables. */
22#ifdef CONFIG_MODULES
23const struct exception_table_entry *search_module_dbetables(unsigned long addr);
24#else
25static inline const struct exception_table_entry
26*search_module_dbetables(unsigned long addr)
27{
28 return NULL;
29}
30#endif
31
32#define MODULE_PROC_FAMILY "SCORE7"
33#define MODULE_KERNEL_TYPE "32BIT "
34#define MODULE_KERNEL_SMTC ""
35
36#define MODULE_ARCH_VERMAGIC \
37 MODULE_PROC_FAMILY MODULE_KERNEL_TYPE MODULE_KERNEL_SMTC
38
39#endif /* _ASM_SCORE_MODULE_H */
diff --git a/arch/score/include/asm/msgbuf.h b/arch/score/include/asm/msgbuf.h
new file mode 100644
index 000000000000..7506721e29fa
--- /dev/null
+++ b/arch/score/include/asm/msgbuf.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_SCORE_MSGBUF_H
2#define _ASM_SCORE_MSGBUF_H
3
4#include <asm-generic/msgbuf.h>
5
6#endif /* _ASM_SCORE_MSGBUF_H */
diff --git a/arch/score/include/asm/mutex.h b/arch/score/include/asm/mutex.h
new file mode 100644
index 000000000000..10d48fe4db97
--- /dev/null
+++ b/arch/score/include/asm/mutex.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_SCORE_MUTEX_H
2#define _ASM_SCORE_MUTEX_H
3
4#include <asm-generic/mutex-dec.h>
5
6#endif /* _ASM_SCORE_MUTEX_H */
diff --git a/arch/score/include/asm/page.h b/arch/score/include/asm/page.h
new file mode 100644
index 000000000000..d92a5a2d36d4
--- /dev/null
+++ b/arch/score/include/asm/page.h
@@ -0,0 +1,93 @@
1#ifndef _ASM_SCORE_PAGE_H
2#define _ASM_SCORE_PAGE_H
3
4#include <linux/pfn.h>
5#include <linux/const.h>
6
7/* PAGE_SHIFT determines the page size */
8#define PAGE_SHIFT (12)
9#define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT)
10#define PAGE_MASK (~(PAGE_SIZE-1))
11
12#ifdef __KERNEL__
13
14#ifndef __ASSEMBLY__
15
16#define PAGE_UP(addr) (((addr)+((PAGE_SIZE)-1))&(~((PAGE_SIZE)-1)))
17#define PAGE_DOWN(addr) ((addr)&(~((PAGE_SIZE)-1)))
18
19/* align addr on a size boundary - adjust address up/down if needed */
20#define _ALIGN_UP(addr, size) (((addr)+((size)-1))&(~((size)-1)))
21#define _ALIGN_DOWN(addr, size) ((addr)&(~((size)-1)))
22
23/* align addr on a size boundary - adjust address up if needed */
24#define _ALIGN(addr, size) _ALIGN_UP(addr, size)
25
26/*
27 * PAGE_OFFSET -- the first address of the first page of memory. When not
28 * using MMU this corresponds to the first free page in physical memory (aligned
29 * on a page boundary).
30 */
31#define PAGE_OFFSET (0xA0000000UL)
32
33#define clear_page(pgaddr) memset((pgaddr), 0, PAGE_SIZE)
34#define copy_page(to, from) memcpy((to), (from), PAGE_SIZE)
35
36#define clear_user_page(pgaddr, vaddr, page) memset((pgaddr), 0, PAGE_SIZE)
37#define copy_user_page(vto, vfrom, vaddr, topg) \
38 memcpy((vto), (vfrom), PAGE_SIZE)
39
40/*
41 * These are used to make use of C type-checking..
42 */
43
44typedef struct { unsigned long pte; } pte_t; /* page table entry */
45typedef struct { unsigned long pgd; } pgd_t; /* PGD table entry */
46typedef struct { unsigned long pgprot; } pgprot_t;
47typedef struct page *pgtable_t;
48
49#define pte_val(x) ((x).pte)
50#define pgd_val(x) ((x).pgd)
51#define pgprot_val(x) ((x).pgprot)
52
53#define __pte(x) ((pte_t) { (x) })
54#define __pgd(x) ((pgd_t) { (x) })
55#define __pgprot(x) ((pgprot_t) { (x) })
56
57extern unsigned long max_low_pfn;
58extern unsigned long min_low_pfn;
59extern unsigned long max_pfn;
60
61#define __pa(x) ((unsigned long)(x) - PAGE_OFFSET)
62#define __va(x) ((void *)((unsigned long) (x) + PAGE_OFFSET))
63
64#define phys_to_pfn(phys) (PFN_DOWN(phys))
65#define pfn_to_phys(pfn) (PFN_PHYS(pfn))
66
67#define virt_to_pfn(vaddr) (phys_to_pfn((__pa(vaddr))))
68#define pfn_to_virt(pfn) __va(pfn_to_phys((pfn)))
69
70#define virt_to_page(vaddr) (pfn_to_page(virt_to_pfn(vaddr)))
71#define page_to_virt(page) (pfn_to_virt(page_to_pfn(page)))
72
73#define page_to_phys(page) (pfn_to_phys(page_to_pfn(page)))
74#define page_to_bus(page) (page_to_phys(page))
75#define phys_to_page(paddr) (pfn_to_page(phys_to_pfn(paddr)))
76
77#define pfn_valid(pfn) ((pfn) >= min_low_pfn && (pfn) < max_mapnr)
78
79#define ARCH_PFN_OFFSET (PAGE_OFFSET >> PAGE_SHIFT)
80
81#endif /* __ASSEMBLY__ */
82
83#define virt_addr_valid(vaddr) (pfn_valid(virt_to_pfn(vaddr)))
84
85#endif /* __KERNEL__ */
86
87#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
88 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
89
90#include <asm-generic/memory_model.h>
91#include <asm-generic/getorder.h>
92
93#endif /* _ASM_SCORE_PAGE_H */
diff --git a/arch/score/include/asm/param.h b/arch/score/include/asm/param.h
new file mode 100644
index 000000000000..916b8690b6aa
--- /dev/null
+++ b/arch/score/include/asm/param.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_SCORE_PARAM_H
2#define _ASM_SCORE_PARAM_H
3
4#include <asm-generic/param.h>
5
6#endif /* _ASM_SCORE_PARAM_H */
diff --git a/arch/score/include/asm/pci.h b/arch/score/include/asm/pci.h
new file mode 100644
index 000000000000..3f3cfd82549c
--- /dev/null
+++ b/arch/score/include/asm/pci.h
@@ -0,0 +1,4 @@
1#ifndef _ASM_SCORE_PCI_H
2#define _ASM_SCORE_PCI_H
3
4#endif /* _ASM_SCORE_PCI_H */
diff --git a/arch/score/include/asm/percpu.h b/arch/score/include/asm/percpu.h
new file mode 100644
index 000000000000..e7bd4e05b475
--- /dev/null
+++ b/arch/score/include/asm/percpu.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_SCORE_PERCPU_H
2#define _ASM_SCORE_PERCPU_H
3
4#include <asm-generic/percpu.h>
5
6#endif /* _ASM_SCORE_PERCPU_H */
diff --git a/arch/score/include/asm/pgalloc.h b/arch/score/include/asm/pgalloc.h
new file mode 100644
index 000000000000..059a61b7071b
--- /dev/null
+++ b/arch/score/include/asm/pgalloc.h
@@ -0,0 +1,83 @@
1#ifndef _ASM_SCORE_PGALLOC_H
2#define _ASM_SCORE_PGALLOC_H
3
4#include <linux/mm.h>
5
6static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd,
7 pte_t *pte)
8{
9 set_pmd(pmd, __pmd((unsigned long)pte));
10}
11
12static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd,
13 pgtable_t pte)
14{
15 set_pmd(pmd, __pmd((unsigned long)page_address(pte)));
16}
17
18#define pmd_pgtable(pmd) pmd_page(pmd)
19
20static inline pgd_t *pgd_alloc(struct mm_struct *mm)
21{
22 pgd_t *ret, *init;
23
24 ret = (pgd_t *) __get_free_pages(GFP_KERNEL, PGD_ORDER);
25 if (ret) {
26 init = pgd_offset(&init_mm, 0UL);
27 pgd_init((unsigned long)ret);
28 memcpy(ret + USER_PTRS_PER_PGD, init + USER_PTRS_PER_PGD,
29 (PTRS_PER_PGD - USER_PTRS_PER_PGD) * sizeof(pgd_t));
30 }
31
32 return ret;
33}
34
35static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd)
36{
37 free_pages((unsigned long)pgd, PGD_ORDER);
38}
39
40static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm,
41 unsigned long address)
42{
43 pte_t *pte;
44
45 pte = (pte_t *) __get_free_pages(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO,
46 PTE_ORDER);
47
48 return pte;
49}
50
51static inline struct page *pte_alloc_one(struct mm_struct *mm,
52 unsigned long address)
53{
54 struct page *pte;
55
56 pte = alloc_pages(GFP_KERNEL | __GFP_REPEAT, PTE_ORDER);
57 if (pte) {
58 clear_highpage(pte);
59 pgtable_page_ctor(pte);
60 }
61 return pte;
62}
63
64static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte)
65{
66 free_pages((unsigned long)pte, PTE_ORDER);
67}
68
69static inline void pte_free(struct mm_struct *mm, pgtable_t pte)
70{
71 pgtable_page_dtor(pte);
72 __free_pages(pte, PTE_ORDER);
73}
74
75#define __pte_free_tlb(tlb, pte, buf) \
76do { \
77 pgtable_page_dtor(pte); \
78 tlb_remove_page((tlb), pte); \
79} while (0)
80
81#define check_pgt_cache() do {} while (0)
82
83#endif /* _ASM_SCORE_PGALLOC_H */
diff --git a/arch/score/include/asm/pgtable-bits.h b/arch/score/include/asm/pgtable-bits.h
new file mode 100644
index 000000000000..7d65a96a82e5
--- /dev/null
+++ b/arch/score/include/asm/pgtable-bits.h
@@ -0,0 +1,25 @@
1#ifndef _ASM_SCORE_PGTABLE_BITS_H
2#define _ASM_SCORE_PGTABLE_BITS_H
3
4#define _PAGE_ACCESSED (1<<5) /* implemented in software */
5#define _PAGE_READ (1<<6) /* implemented in software */
6#define _PAGE_WRITE (1<<7) /* implemented in software */
7#define _PAGE_PRESENT (1<<9) /* implemented in software */
8#define _PAGE_MODIFIED (1<<10) /* implemented in software */
9#define _PAGE_FILE (1<<10)
10
11#define _PAGE_GLOBAL (1<<0)
12#define _PAGE_VALID (1<<1)
13#define _PAGE_SILENT_READ (1<<1) /* synonym */
14#define _PAGE_DIRTY (1<<2) /* Write bit */
15#define _PAGE_SILENT_WRITE (1<<2)
16#define _PAGE_CACHE (1<<3) /* cache */
17#define _CACHE_MASK (1<<3)
18#define _PAGE_BUFFERABLE (1<<4) /*Fallow Spec. */
19
20#define __READABLE (_PAGE_READ | _PAGE_SILENT_READ | _PAGE_ACCESSED)
21#define __WRITEABLE (_PAGE_WRITE | _PAGE_SILENT_WRITE | _PAGE_MODIFIED)
22#define _PAGE_CHG_MASK \
23 (PAGE_MASK | _PAGE_ACCESSED | _PAGE_MODIFIED | _PAGE_CACHE)
24
25#endif /* _ASM_SCORE_PGTABLE_BITS_H */
diff --git a/arch/score/include/asm/pgtable.h b/arch/score/include/asm/pgtable.h
new file mode 100644
index 000000000000..674934b40170
--- /dev/null
+++ b/arch/score/include/asm/pgtable.h
@@ -0,0 +1,287 @@
1#ifndef _ASM_SCORE_PGTABLE_H
2#define _ASM_SCORE_PGTABLE_H
3
4#include <linux/const.h>
5#include <asm-generic/pgtable-nopmd.h>
6
7#include <asm/fixmap.h>
8#include <asm/setup.h>
9#include <asm/pgtable-bits.h>
10
11extern void load_pgd(unsigned long pg_dir);
12extern pte_t invalid_pte_table[PAGE_SIZE/sizeof(pte_t)];
13
14/* PGDIR_SHIFT determines what a third-level page table entry can map */
15#define PGDIR_SHIFT 22
16#define PGDIR_SIZE (_AC(1, UL) << PGDIR_SHIFT)
17#define PGDIR_MASK (~(PGDIR_SIZE - 1))
18
19/*
20 * Entries per page directory level: we use two-level, so
21 * we don't really have any PUD/PMD directory physically.
22 */
23#define PGD_ORDER 0
24#define PTE_ORDER 0
25
26#define PTRS_PER_PGD 1024
27#define PTRS_PER_PTE 1024
28
29#define USER_PTRS_PER_PGD (0x80000000UL/PGDIR_SIZE)
30#define FIRST_USER_ADDRESS 0
31
32#define VMALLOC_START (0xc0000000UL)
33
34#define PKMAP_BASE (0xfd000000UL)
35
36#define VMALLOC_END (FIXADDR_START - 2*PAGE_SIZE)
37
38#define pte_ERROR(e) \
39 printk(KERN_ERR "%s:%d: bad pte %08lx.\n", \
40 __FILE__, __LINE__, pte_val(e))
41#define pgd_ERROR(e) \
42 printk(KERN_ERR "%s:%d: bad pgd %08lx.\n", \
43 __FILE__, __LINE__, pgd_val(e))
44
45/*
46 * Empty pgd/pmd entries point to the invalid_pte_table.
47 */
48static inline int pmd_none(pmd_t pmd)
49{
50 return pmd_val(pmd) == (unsigned long) invalid_pte_table;
51}
52
53#define pmd_bad(pmd) (pmd_val(pmd) & ~PAGE_MASK)
54
55static inline int pmd_present(pmd_t pmd)
56{
57 return pmd_val(pmd) != (unsigned long) invalid_pte_table;
58}
59
60static inline void pmd_clear(pmd_t *pmdp)
61{
62 pmd_val(*pmdp) = ((unsigned long) invalid_pte_table);
63}
64
65#define pte_page(x) pfn_to_page(pte_pfn(x))
66#define pte_pfn(x) ((unsigned long)((x).pte >> PAGE_SHIFT))
67#define pfn_pte(pfn, prot) \
68 __pte(((unsigned long long)(pfn) << PAGE_SHIFT) | pgprot_val(prot))
69
70#define __pgd_offset(address) pgd_index(address)
71#define __pud_offset(address) (((address) >> PUD_SHIFT) & (PTRS_PER_PUD-1))
72#define __pmd_offset(address) (((address) >> PMD_SHIFT) & (PTRS_PER_PMD-1))
73
74/* to find an entry in a kernel page-table-directory */
75#define pgd_offset_k(address) pgd_offset(&init_mm, address)
76#define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD-1))
77
78/* to find an entry in a page-table-directory */
79#define pgd_offset(mm, addr) ((mm)->pgd + pgd_index(addr))
80
81/* Find an entry in the third-level page table.. */
82#define __pte_offset(address) \
83 (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
84#define pte_offset(dir, address) \
85 ((pte_t *) pmd_page_vaddr(*(dir)) + __pte_offset(address))
86#define pte_offset_kernel(dir, address) \
87 ((pte_t *) pmd_page_vaddr(*(dir)) + __pte_offset(address))
88
89#define pte_offset_map(dir, address) \
90 ((pte_t *)page_address(pmd_page(*(dir))) + __pte_offset(address))
91#define pte_offset_map_nested(dir, address) \
92 ((pte_t *)page_address(pmd_page(*(dir))) + __pte_offset(address))
93#define pte_unmap(pte) ((void)(pte))
94#define pte_unmap_nested(pte) ((void)(pte))
95
96/*
97 * Bits 9(_PAGE_PRESENT) and 10(_PAGE_FILE)are taken,
98 * split up 30 bits of offset into this range:
99 */
100#define PTE_FILE_MAX_BITS 30
101#define pte_to_pgoff(_pte) \
102 (((_pte).pte & 0x1ff) | (((_pte).pte >> 11) << 9))
103#define pgoff_to_pte(off) \
104 ((pte_t) {((off) & 0x1ff) | (((off) >> 9) << 11) | _PAGE_FILE})
105#define __pte_to_swp_entry(pte) \
106 ((swp_entry_t) { pte_val(pte)})
107#define __swp_entry_to_pte(x) ((pte_t) {(x).val})
108
109#define pmd_phys(pmd) __pa((void *)pmd_val(pmd))
110#define pmd_page(pmd) (pfn_to_page(pmd_phys(pmd) >> PAGE_SHIFT))
111#define mk_pte(page, prot) pfn_pte(page_to_pfn(page), prot)
112static inline pte_t pte_mkspecial(pte_t pte) { return pte; }
113
114#define set_pte(pteptr, pteval) (*(pteptr) = pteval)
115#define set_pte_at(mm, addr, ptep, pteval) set_pte(ptep, pteval)
116#define pte_clear(mm, addr, xp) \
117 do { set_pte_at(mm, addr, xp, __pte(0)); } while (0)
118
119#define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \
120 remap_pfn_range(vma, vaddr, pfn, size, prot)
121
122/*
123 * The "pgd_xxx()" functions here are trivial for a folded two-level
124 * setup: the pgd is never bad, and a pmd always exists (as it's folded
125 * into the pgd entry)
126 */
127#define pgd_present(pgd) (1)
128#define pgd_none(pgd) (0)
129#define pgd_bad(pgd) (0)
130#define pgd_clear(pgdp) do { } while (0)
131
132#define kern_addr_valid(addr) (1)
133#define pmd_page_vaddr(pmd) pmd_val(pmd)
134
135#define pte_none(pte) (!(pte_val(pte) & ~_PAGE_GLOBAL))
136#define pte_present(pte) (pte_val(pte) & _PAGE_PRESENT)
137
138#define PAGE_NONE __pgprot(_PAGE_PRESENT | _PAGE_CACHE)
139#define PAGE_SHARED __pgprot(_PAGE_PRESENT | _PAGE_READ | _PAGE_WRITE | \
140 _PAGE_CACHE)
141#define PAGE_COPY __pgprot(_PAGE_PRESENT | _PAGE_READ | _PAGE_CACHE)
142#define PAGE_READONLY __pgprot(_PAGE_PRESENT | _PAGE_READ | _PAGE_CACHE)
143#define PAGE_KERNEL __pgprot(_PAGE_PRESENT | __READABLE | __WRITEABLE | \
144 _PAGE_GLOBAL | _PAGE_CACHE)
145#define PAGE_KERNEL_UNCACHED __pgprot(_PAGE_PRESENT | __READABLE | \
146 __WRITEABLE | _PAGE_GLOBAL & ~_PAGE_CACHE)
147
148#define __P000 PAGE_NONE
149#define __P001 PAGE_READONLY
150#define __P010 PAGE_COPY
151#define __P011 PAGE_COPY
152#define __P100 PAGE_READONLY
153#define __P101 PAGE_READONLY
154#define __P110 PAGE_COPY
155#define __P111 PAGE_COPY
156
157#define __S000 PAGE_NONE
158#define __S001 PAGE_READONLY
159#define __S010 PAGE_SHARED
160#define __S011 PAGE_SHARED
161#define __S100 PAGE_READONLY
162#define __S101 PAGE_READONLY
163#define __S110 PAGE_SHARED
164#define __S111 PAGE_SHARED
165
166#define pgprot_noncached pgprot_noncached
167
168static inline pgprot_t pgprot_noncached(pgprot_t _prot)
169{
170 unsigned long prot = pgprot_val(_prot);
171
172 prot = (prot & ~_CACHE_MASK);
173
174 return __pgprot(prot);
175}
176
177#define __swp_type(x) ((x).val & 0x1f)
178#define __swp_offset(x) ((x).val >> 11)
179#define __swp_entry(type, offset) ((swp_entry_t){(type) | ((offset) << 11)})
180
181extern unsigned long empty_zero_page;
182extern unsigned long zero_page_mask;
183
184#define ZERO_PAGE(vaddr) \
185 (virt_to_page((void *)(empty_zero_page + \
186 (((unsigned long)(vaddr)) & zero_page_mask))))
187
188#define pgtable_cache_init() do {} while (0)
189
190#define arch_enter_lazy_cpu_mode() do {} while (0)
191
192static inline int pte_write(pte_t pte)
193{
194 return pte_val(pte) & _PAGE_WRITE;
195}
196
197static inline int pte_dirty(pte_t pte)
198{
199 return pte_val(pte) & _PAGE_MODIFIED;
200}
201
202static inline int pte_young(pte_t pte)
203{
204 return pte_val(pte) & _PAGE_ACCESSED;
205}
206
207static inline int pte_file(pte_t pte)
208{
209 return pte_val(pte) & _PAGE_FILE;
210}
211
212#define pte_special(pte) (0)
213
214static inline pte_t pte_wrprotect(pte_t pte)
215{
216 pte_val(pte) &= ~(_PAGE_WRITE | _PAGE_SILENT_WRITE);
217 return pte;
218}
219
220static inline pte_t pte_mkclean(pte_t pte)
221{
222 pte_val(pte) &= ~(_PAGE_MODIFIED|_PAGE_SILENT_WRITE);
223 return pte;
224}
225
226static inline pte_t pte_mkold(pte_t pte)
227{
228 pte_val(pte) &= ~(_PAGE_ACCESSED|_PAGE_SILENT_READ);
229 return pte;
230}
231
232static inline pte_t pte_mkwrite(pte_t pte)
233{
234 pte_val(pte) |= _PAGE_WRITE;
235 if (pte_val(pte) & _PAGE_MODIFIED)
236 pte_val(pte) |= _PAGE_SILENT_WRITE;
237 return pte;
238}
239
240static inline pte_t pte_mkdirty(pte_t pte)
241{
242 pte_val(pte) |= _PAGE_MODIFIED;
243 if (pte_val(pte) & _PAGE_WRITE)
244 pte_val(pte) |= _PAGE_SILENT_WRITE;
245 return pte;
246}
247
248static inline pte_t pte_mkyoung(pte_t pte)
249{
250 pte_val(pte) |= _PAGE_ACCESSED;
251 if (pte_val(pte) & _PAGE_READ)
252 pte_val(pte) |= _PAGE_SILENT_READ;
253 return pte;
254}
255
256#define set_pmd(pmdptr, pmdval) \
257 do { *(pmdptr) = (pmdval); } while (0)
258#define pte_present(pte) (pte_val(pte) & _PAGE_PRESENT)
259
260extern unsigned long pgd_current;
261extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
262extern void paging_init(void);
263
264static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
265{
266 return __pte((pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot));
267}
268
269extern void __update_tlb(struct vm_area_struct *vma,
270 unsigned long address, pte_t pte);
271extern void __update_cache(struct vm_area_struct *vma,
272 unsigned long address, pte_t pte);
273
274static inline void update_mmu_cache(struct vm_area_struct *vma,
275 unsigned long address, pte_t pte)
276{
277 __update_tlb(vma, address, pte);
278 __update_cache(vma, address, pte);
279}
280
281#ifndef __ASSEMBLY__
282#include <asm-generic/pgtable.h>
283
284void setup_memory(void);
285#endif /* __ASSEMBLY__ */
286
287#endif /* _ASM_SCORE_PGTABLE_H */
diff --git a/arch/score/include/asm/poll.h b/arch/score/include/asm/poll.h
new file mode 100644
index 000000000000..18532db02861
--- /dev/null
+++ b/arch/score/include/asm/poll.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_SCORE_POLL_H
2#define _ASM_SCORE_POLL_H
3
4#include <asm-generic/poll.h>
5
6#endif /* _ASM_SCORE_POLL_H */
diff --git a/arch/score/include/asm/posix_types.h b/arch/score/include/asm/posix_types.h
new file mode 100644
index 000000000000..b88acf80048a
--- /dev/null
+++ b/arch/score/include/asm/posix_types.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_SCORE_POSIX_TYPES_H
2#define _ASM_SCORE_POSIX_TYPES_H
3
4#include <asm-generic/posix_types.h>
5
6#endif /* _ASM_SCORE_POSIX_TYPES_H */
diff --git a/arch/score/include/asm/processor.h b/arch/score/include/asm/processor.h
new file mode 100644
index 000000000000..7e22f216d771
--- /dev/null
+++ b/arch/score/include/asm/processor.h
@@ -0,0 +1,106 @@
1#ifndef _ASM_SCORE_PROCESSOR_H
2#define _ASM_SCORE_PROCESSOR_H
3
4#include <linux/cpumask.h>
5#include <linux/threads.h>
6
7#include <asm/segment.h>
8
9struct task_struct;
10
11/*
12 * System setup and hardware flags..
13 */
14extern void (*cpu_wait)(void);
15
16extern long kernel_thread(int (*fn)(void *), void *arg, unsigned long flags);
17extern unsigned long thread_saved_pc(struct task_struct *tsk);
18extern void start_thread(struct pt_regs *regs,
19 unsigned long pc, unsigned long sp);
20extern unsigned long get_wchan(struct task_struct *p);
21
22/*
23 * Return current * instruction pointer ("program counter").
24 */
25#define current_text_addr() ({ __label__ _l; _l: &&_l; })
26
27#define cpu_relax() barrier()
28#define release_thread(thread) do {} while (0)
29#define prepare_to_copy(tsk) do {} while (0)
30
31/*
32 * User space process size: 2GB. This is hardcoded into a few places,
33 * so don't change it unless you know what you are doing.
34 */
35#define TASK_SIZE 0x7fff8000UL
36
37/*
38 * This decides where the kernel will search for a free chunk of vm
39 * space during mmap's.
40 */
41#define TASK_UNMAPPED_BASE ((TASK_SIZE / 3) & ~(PAGE_SIZE))
42
43#ifdef __KERNEL__
44#define STACK_TOP TASK_SIZE
45#define STACK_TOP_MAX TASK_SIZE
46#endif
47
48/*
49 * If you change thread_struct remember to change the #defines below too!
50 */
51struct thread_struct {
52 unsigned long reg0, reg2, reg3;
53 unsigned long reg12, reg13, reg14, reg15, reg16;
54 unsigned long reg17, reg18, reg19, reg20, reg21;
55
56 unsigned long cp0_psr;
57 unsigned long cp0_ema; /* Last user fault */
58 unsigned long cp0_badvaddr; /* Last user fault */
59 unsigned long cp0_baduaddr; /* Last kernel fault accessing USEG */
60 unsigned long error_code;
61 unsigned long trap_no;
62
63 unsigned long mflags;
64 unsigned long reg29;
65
66 unsigned long single_step;
67 unsigned long ss_nextcnt;
68
69 unsigned long insn1_type;
70 unsigned long addr1;
71 unsigned long insn1;
72
73 unsigned long insn2_type;
74 unsigned long addr2;
75 unsigned long insn2;
76
77 mm_segment_t current_ds;
78};
79
80#define INIT_THREAD { \
81 .reg0 = 0, \
82 .reg2 = 0, \
83 .reg3 = 0, \
84 .reg12 = 0, \
85 .reg13 = 0, \
86 .reg14 = 0, \
87 .reg15 = 0, \
88 .reg16 = 0, \
89 .reg17 = 0, \
90 .reg18 = 0, \
91 .reg19 = 0, \
92 .reg20 = 0, \
93 .reg21 = 0, \
94 .cp0_psr = 0, \
95 .error_code = 0, \
96 .trap_no = 0, \
97}
98
99#define kstk_tos(tsk) \
100 ((unsigned long)task_stack_page(tsk) + THREAD_SIZE - 32)
101#define task_pt_regs(tsk) ((struct pt_regs *)kstk_tos(tsk) - 1)
102
103#define KSTK_EIP(tsk) (task_pt_regs(tsk)->cp0_epc)
104#define KSTK_ESP(tsk) (task_pt_regs(tsk)->regs[29])
105
106#endif /* _ASM_SCORE_PROCESSOR_H */
diff --git a/arch/score/include/asm/ptrace.h b/arch/score/include/asm/ptrace.h
new file mode 100644
index 000000000000..d40e691f23e2
--- /dev/null
+++ b/arch/score/include/asm/ptrace.h
@@ -0,0 +1,97 @@
1#ifndef _ASM_SCORE_PTRACE_H
2#define _ASM_SCORE_PTRACE_H
3
4#define PTRACE_GETREGS 12
5#define PTRACE_SETREGS 13
6
7#define PC 32
8#define CONDITION 33
9#define ECR 34
10#define EMA 35
11#define CEH 36
12#define CEL 37
13#define COUNTER 38
14#define LDCR 39
15#define STCR 40
16#define PSR 41
17
18#define SINGLESTEP16_INSN 0x7006
19#define SINGLESTEP32_INSN 0x840C8000
20#define BREAKPOINT16_INSN 0x7002 /* work on SPG300 */
21#define BREAKPOINT32_INSN 0x84048000 /* work on SPG300 */
22
23/* Define instruction mask */
24#define INSN32_MASK 0x80008000
25
26#define J32 0x88008000 /* 1_00010_0000000000_1_000000000000000 */
27#define J32M 0xFC008000 /* 1_11111_0000000000_1_000000000000000 */
28
29#define B32 0x90008000 /* 1_00100_0000000000_1_000000000000000 */
30#define B32M 0xFC008000
31#define BL32 0x90008001 /* 1_00100_0000000000_1_000000000000001 */
32#define BL32M B32
33#define BR32 0x80008008 /* 1_00000_0000000000_1_00000000_000100_0 */
34#define BR32M 0xFFE0807E
35#define BRL32 0x80008009 /* 1_00000_0000000000_1_00000000_000100_1 */
36#define BRL32M BR32M
37
38#define B32_SET (J32 | B32 | BL32 | BR32 | BRL32)
39
40#define J16 0x3000 /* 0_011_....... */
41#define J16M 0xF000
42#define B16 0x4000 /* 0_100_....... */
43#define B16M 0xF000
44#define BR16 0x0004 /* 0_000.......0100 */
45#define BR16M 0xF00F
46#define B16_SET (J16 | B16 | BR16)
47
48
49/*
50 * This struct defines the way the registers are stored on the stack during a
51 * system call/exception. As usual the registers k0/k1 aren't being saved.
52 */
53struct pt_regs {
54 unsigned long pad0[6]; /* stack arguments */
55 unsigned long orig_r4;
56 unsigned long orig_r7;
57 long is_syscall;
58
59 unsigned long regs[32];
60
61 unsigned long cel;
62 unsigned long ceh;
63
64 unsigned long sr0; /* cnt */
65 unsigned long sr1; /* lcr */
66 unsigned long sr2; /* scr */
67
68 unsigned long cp0_epc;
69 unsigned long cp0_ema;
70 unsigned long cp0_psr;
71 unsigned long cp0_ecr;
72 unsigned long cp0_condition;
73};
74
75#ifdef __KERNEL__
76
77struct task_struct;
78
79/*
80 * Does the process account for user or for system time?
81 */
82#define user_mode(regs) ((regs->cp0_psr & 8) == 8)
83
84#define instruction_pointer(regs) ((unsigned long)(regs)->cp0_epc)
85#define profile_pc(regs) instruction_pointer(regs)
86
87extern void do_syscall_trace(struct pt_regs *regs, int entryexit);
88extern int read_tsk_long(struct task_struct *, unsigned long, unsigned long *);
89extern int read_tsk_short(struct task_struct *, unsigned long,
90 unsigned short *);
91
92#define arch_has_single_step() (1)
93extern void user_enable_single_step(struct task_struct *);
94extern void user_disable_single_step(struct task_struct *);
95#endif /* __KERNEL__ */
96
97#endif /* _ASM_SCORE_PTRACE_H */
diff --git a/arch/score/include/asm/resource.h b/arch/score/include/asm/resource.h
new file mode 100644
index 000000000000..9ce22bc7b475
--- /dev/null
+++ b/arch/score/include/asm/resource.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_SCORE_RESOURCE_H
2#define _ASM_SCORE_RESOURCE_H
3
4#include <asm-generic/resource.h>
5
6#endif /* _ASM_SCORE_RESOURCE_H */
diff --git a/arch/score/include/asm/scatterlist.h b/arch/score/include/asm/scatterlist.h
new file mode 100644
index 000000000000..9f533b8362c7
--- /dev/null
+++ b/arch/score/include/asm/scatterlist.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_SCORE_SCATTERLIST_H
2#define _ASM_SCORE_SCATTERLIST_H
3
4#include <asm-generic/scatterlist.h>
5
6#endif /* _ASM_SCORE_SCATTERLIST_H */
diff --git a/arch/score/include/asm/scoreregs.h b/arch/score/include/asm/scoreregs.h
new file mode 100644
index 000000000000..d0ad29204518
--- /dev/null
+++ b/arch/score/include/asm/scoreregs.h
@@ -0,0 +1,51 @@
1#ifndef _ASM_SCORE_SCOREREGS_H
2#define _ASM_SCORE_SCOREREGS_H
3
4#include <linux/linkage.h>
5
6/* TIMER register */
7#define TIME0BASE 0x96080000
8#define P_TIMER0_CTRL (TIME0BASE + 0x00)
9#define P_TIMER0_CPP_CTRL (TIME0BASE + 0x04)
10#define P_TIMER0_PRELOAD (TIME0BASE + 0x08)
11#define P_TIMER0_CPP_REG (TIME0BASE + 0x0C)
12#define P_TIMER0_UPCNT (TIME0BASE + 0x10)
13
14/* Timer Controller Register */
15/* bit 0 Timer enable */
16#define TMR_DISABLE 0x0000
17#define TMR_ENABLE 0x0001
18
19/* bit 1 Interrupt enable */
20#define TMR_IE_DISABLE 0x0000
21#define TMR_IE_ENABLE 0x0002
22
23/* bit 2 Output enable */
24#define TMR_OE_DISABLE 0x0004
25#define TMR_OE_ENABLE 0x0000
26
27/* bit4 Up/Down counting selection */
28#define TMR_UD_DOWN 0x0000
29#define TMR_UD_UP 0x0010
30
31/* bit5 Up/Down counting control selection */
32#define TMR_UDS_UD 0x0000
33#define TMR_UDS_EXTUD 0x0020
34
35/* bit6 Time output mode */
36#define TMR_OM_TOGGLE 0x0000
37#define TMR_OM_PILSE 0x0040
38
39/* bit 8..9 External input active edge selection */
40#define TMR_ES_PE 0x0000
41#define TMR_ES_NE 0x0100
42#define TMR_ES_BOTH 0x0200
43
44/* bit 10..11 Operating mode */
45#define TMR_M_FREE 0x0000 /* free running timer mode */
46#define TMR_M_PERIODIC 0x0400 /* periodic timer mode */
47#define TMR_M_FC 0x0800 /* free running counter mode */
48#define TMR_M_PC 0x0c00 /* periodic counter mode */
49
50#define SYSTEM_CLOCK (27*1000000/4) /* 27 MHz */
51#endif /* _ASM_SCORE_SCOREREGS_H */
diff --git a/arch/score/include/asm/sections.h b/arch/score/include/asm/sections.h
new file mode 100644
index 000000000000..9441d23af005
--- /dev/null
+++ b/arch/score/include/asm/sections.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_SCORE_SECTIONS_H
2#define _ASM_SCORE_SECTIONS_H
3
4#include <asm-generic/sections.h>
5
6#endif /* _ASM_SCORE_SECTIONS_H */
diff --git a/arch/score/include/asm/segment.h b/arch/score/include/asm/segment.h
new file mode 100644
index 000000000000..e16cf6afb495
--- /dev/null
+++ b/arch/score/include/asm/segment.h
@@ -0,0 +1,21 @@
1#ifndef _ASM_SCORE_SEGMENT_H
2#define _ASM_SCORE_SEGMENT_H
3
4#ifndef __ASSEMBLY__
5
6typedef struct {
7 unsigned long seg;
8} mm_segment_t;
9
10#define KERNEL_DS ((mm_segment_t){0})
11#define USER_DS KERNEL_DS
12
13# define get_ds() (KERNEL_DS)
14# define get_fs() (current_thread_info()->addr_limit)
15# define set_fs(x) \
16 do { current_thread_info()->addr_limit = (x); } while (0)
17
18# define segment_eq(a, b) ((a).seg == (b).seg)
19
20# endif /* __ASSEMBLY__ */
21#endif /* _ASM_SCORE_SEGMENT_H */
diff --git a/arch/score/include/asm/sembuf.h b/arch/score/include/asm/sembuf.h
new file mode 100644
index 000000000000..dae5e835ce9e
--- /dev/null
+++ b/arch/score/include/asm/sembuf.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_SCORE_SEMBUF_H
2#define _ASM_SCORE_SEMBUF_H
3
4#include <asm-generic/sembuf.h>
5
6#endif /* _ASM_SCORE_SEMBUF_H */
diff --git a/arch/score/include/asm/setup.h b/arch/score/include/asm/setup.h
new file mode 100644
index 000000000000..3cb944dc68dc
--- /dev/null
+++ b/arch/score/include/asm/setup.h
@@ -0,0 +1,41 @@
1#ifndef _ASM_SCORE_SETUP_H
2#define _ASM_SCORE_SETUP_H
3
4#define COMMAND_LINE_SIZE 256
5#define MEMORY_START 0
6#define MEMORY_SIZE 0x2000000
7
8#ifdef __KERNEL__
9
10extern void pagetable_init(void);
11extern void pgd_init(unsigned long page);
12
13extern void setup_early_printk(void);
14extern void cpu_cache_init(void);
15extern void tlb_init(void);
16
17extern void handle_nmi(void);
18extern void handle_adelinsn(void);
19extern void handle_adedata(void);
20extern void handle_ibe(void);
21extern void handle_pel(void);
22extern void handle_sys(void);
23extern void handle_ccu(void);
24extern void handle_ri(void);
25extern void handle_tr(void);
26extern void handle_ades(void);
27extern void handle_cee(void);
28extern void handle_cpe(void);
29extern void handle_dve(void);
30extern void handle_dbe(void);
31extern void handle_reserved(void);
32extern void handle_tlb_refill(void);
33extern void handle_tlb_invaild(void);
34extern void handle_mod(void);
35extern void debug_exception_vector(void);
36extern void general_exception_vector(void);
37extern void interrupt_exception_vector(void);
38
39#endif /* __KERNEL__ */
40
41#endif /* _ASM_SCORE_SETUP_H */
diff --git a/arch/score/include/asm/shmbuf.h b/arch/score/include/asm/shmbuf.h
new file mode 100644
index 000000000000..c85b2429ba21
--- /dev/null
+++ b/arch/score/include/asm/shmbuf.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_SCORE_SHMBUF_H
2#define _ASM_SCORE_SHMBUF_H
3
4#include <asm-generic/shmbuf.h>
5
6#endif /* _ASM_SCORE_SHMBUF_H */
diff --git a/arch/score/include/asm/shmparam.h b/arch/score/include/asm/shmparam.h
new file mode 100644
index 000000000000..1d60813141b6
--- /dev/null
+++ b/arch/score/include/asm/shmparam.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_SCORE_SHMPARAM_H
2#define _ASM_SCORE_SHMPARAM_H
3
4#include <asm-generic/shmparam.h>
5
6#endif /* _ASM_SCORE_SHMPARAM_H */
diff --git a/arch/score/include/asm/sigcontext.h b/arch/score/include/asm/sigcontext.h
new file mode 100644
index 000000000000..5ffda39ddb90
--- /dev/null
+++ b/arch/score/include/asm/sigcontext.h
@@ -0,0 +1,22 @@
1#ifndef _ASM_SCORE_SIGCONTEXT_H
2#define _ASM_SCORE_SIGCONTEXT_H
3
4/*
5 * Keep this struct definition in sync with the sigcontext fragment
6 * in arch/score/tools/offset.c
7 */
8struct sigcontext {
9 unsigned int sc_regmask;
10 unsigned int sc_psr;
11 unsigned int sc_condition;
12 unsigned long sc_pc;
13 unsigned long sc_regs[32];
14 unsigned int sc_ssflags;
15 unsigned int sc_mdceh;
16 unsigned int sc_mdcel;
17 unsigned int sc_ecr;
18 unsigned long sc_ema;
19 unsigned long sc_sigset[4];
20};
21
22#endif /* _ASM_SCORE_SIGCONTEXT_H */
diff --git a/arch/score/include/asm/siginfo.h b/arch/score/include/asm/siginfo.h
new file mode 100644
index 000000000000..87ca35607a28
--- /dev/null
+++ b/arch/score/include/asm/siginfo.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_SCORE_SIGINFO_H
2#define _ASM_SCORE_SIGINFO_H
3
4#include <asm-generic/siginfo.h>
5
6#endif /* _ASM_SCORE_SIGINFO_H */
diff --git a/arch/score/include/asm/signal.h b/arch/score/include/asm/signal.h
new file mode 100644
index 000000000000..2605bc06b64f
--- /dev/null
+++ b/arch/score/include/asm/signal.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_SCORE_SIGNAL_H
2#define _ASM_SCORE_SIGNAL_H
3
4#include <asm-generic/signal.h>
5
6#endif /* _ASM_SCORE_SIGNAL_H */
diff --git a/arch/score/include/asm/socket.h b/arch/score/include/asm/socket.h
new file mode 100644
index 000000000000..612a70e385ba
--- /dev/null
+++ b/arch/score/include/asm/socket.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_SCORE_SOCKET_H
2#define _ASM_SCORE_SOCKET_H
3
4#include <asm-generic/socket.h>
5
6#endif /* _ASM_SCORE_SOCKET_H */
diff --git a/arch/score/include/asm/sockios.h b/arch/score/include/asm/sockios.h
new file mode 100644
index 000000000000..ba8256480189
--- /dev/null
+++ b/arch/score/include/asm/sockios.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_SCORE_SOCKIOS_H
2#define _ASM_SCORE_SOCKIOS_H
3
4#include <asm-generic/sockios.h>
5
6#endif /* _ASM_SCORE_SOCKIOS_H */
diff --git a/arch/score/include/asm/stat.h b/arch/score/include/asm/stat.h
new file mode 100644
index 000000000000..5037055500a2
--- /dev/null
+++ b/arch/score/include/asm/stat.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_SCORE_STAT_H
2#define _ASM_SCORE_STAT_H
3
4#include <asm-generic/stat.h>
5
6#endif /* _ASM_SCORE_STAT_H */
diff --git a/arch/score/include/asm/statfs.h b/arch/score/include/asm/statfs.h
new file mode 100644
index 000000000000..36e41004e996
--- /dev/null
+++ b/arch/score/include/asm/statfs.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_SCORE_STATFS_H
2#define _ASM_SCORE_STATFS_H
3
4#include <asm-generic/statfs.h>
5
6#endif /* _ASM_SCORE_STATFS_H */
diff --git a/arch/score/include/asm/string.h b/arch/score/include/asm/string.h
new file mode 100644
index 000000000000..8a6bf5063aa5
--- /dev/null
+++ b/arch/score/include/asm/string.h
@@ -0,0 +1,8 @@
1#ifndef _ASM_SCORE_STRING_H
2#define _ASM_SCORE_STRING_H
3
4extern void *memset(void *__s, int __c, size_t __count);
5extern void *memcpy(void *__to, __const__ void *__from, size_t __n);
6extern void *memmove(void *__dest, __const__ void *__src, size_t __n);
7
8#endif /* _ASM_SCORE_STRING_H */
diff --git a/arch/score/include/asm/swab.h b/arch/score/include/asm/swab.h
new file mode 100644
index 000000000000..fadc3cc6d8a2
--- /dev/null
+++ b/arch/score/include/asm/swab.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_SCORE_SWAB_H
2#define _ASM_SCORE_SWAB_H
3
4#include <asm-generic/swab.h>
5
6#endif /* _ASM_SCORE_SWAB_H */
diff --git a/arch/score/include/asm/syscalls.h b/arch/score/include/asm/syscalls.h
new file mode 100644
index 000000000000..1dd5e0d6b0c3
--- /dev/null
+++ b/arch/score/include/asm/syscalls.h
@@ -0,0 +1,11 @@
1#ifndef _ASM_SCORE_SYSCALLS_H
2#define _ASM_SCORE_SYSCALLS_H
3
4asmlinkage long score_clone(struct pt_regs *regs);
5asmlinkage long score_execve(struct pt_regs *regs);
6asmlinkage long score_sigaltstack(struct pt_regs *regs);
7asmlinkage long score_rt_sigreturn(struct pt_regs *regs);
8
9#include <asm-generic/syscalls.h>
10
11#endif /* _ASM_SCORE_SYSCALLS_H */
diff --git a/arch/score/include/asm/system.h b/arch/score/include/asm/system.h
new file mode 100644
index 000000000000..589d5c7e171c
--- /dev/null
+++ b/arch/score/include/asm/system.h
@@ -0,0 +1,90 @@
1#ifndef _ASM_SCORE_SYSTEM_H
2#define _ASM_SCORE_SYSTEM_H
3
4#include <linux/types.h>
5#include <linux/irqflags.h>
6
7struct pt_regs;
8struct task_struct;
9
10extern void *resume(void *last, void *next, void *next_ti);
11
12#define switch_to(prev, next, last) \
13do { \
14 (last) = resume(prev, next, task_thread_info(next)); \
15} while (0)
16
17#define finish_arch_switch(prev) do {} while (0)
18
19typedef void (*vi_handler_t)(void);
20extern unsigned long arch_align_stack(unsigned long sp);
21
22#define mb() barrier()
23#define rmb() barrier()
24#define wmb() barrier()
25#define smp_mb() barrier()
26#define smp_rmb() barrier()
27#define smp_wmb() barrier()
28
29#define read_barrier_depends() do {} while (0)
30#define smp_read_barrier_depends() do {} while (0)
31
32#define set_mb(var, value) do {var = value; wmb(); } while (0)
33
34#define __HAVE_ARCH_CMPXCHG 1
35
36#include <asm-generic/cmpxchg-local.h>
37
38#ifndef __ASSEMBLY__
39
40struct __xchg_dummy { unsigned long a[100]; };
41#define __xg(x) ((struct __xchg_dummy *)(x))
42
43static inline
44unsigned long __xchg(volatile unsigned long *m, unsigned long val)
45{
46 unsigned long retval;
47 unsigned long flags;
48
49 local_irq_save(flags);
50 retval = *m;
51 *m = val;
52 local_irq_restore(flags);
53 return retval;
54}
55
56#define xchg(ptr, v) \
57 ((__typeof__(*(ptr))) __xchg((unsigned long *)(ptr), \
58 (unsigned long)(v)))
59
60static inline unsigned long __cmpxchg(volatile unsigned long *m,
61 unsigned long old, unsigned long new)
62{
63 unsigned long retval;
64 unsigned long flags;
65
66 local_irq_save(flags);
67 retval = *m;
68 if (retval == old)
69 *m = new;
70 local_irq_restore(flags);
71 return retval;
72}
73
74#define cmpxchg(ptr, o, n) \
75 ((__typeof__(*(ptr))) __cmpxchg((unsigned long *)(ptr), \
76 (unsigned long)(o), \
77 (unsigned long)(n)))
78
79extern void __die(const char *, struct pt_regs *, const char *,
80 const char *, unsigned long) __attribute__((noreturn));
81extern void __die_if_kernel(const char *, struct pt_regs *, const char *,
82 const char *, unsigned long);
83
84#define die(msg, regs) \
85 __die(msg, regs, __FILE__ ":", __func__, __LINE__)
86#define die_if_kernel(msg, regs) \
87 __die_if_kernel(msg, regs, __FILE__ ":", __func__, __LINE__)
88
89#endif /* !__ASSEMBLY__ */
90#endif /* _ASM_SCORE_SYSTEM_H */
diff --git a/arch/score/include/asm/termbits.h b/arch/score/include/asm/termbits.h
new file mode 100644
index 000000000000..9a95c1412437
--- /dev/null
+++ b/arch/score/include/asm/termbits.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_SCORE_TERMBITS_H
2#define _ASM_SCORE_TERMBITS_H
3
4#include <asm-generic/termbits.h>
5
6#endif /* _ASM_SCORE_TERMBITS_H */
diff --git a/arch/score/include/asm/termios.h b/arch/score/include/asm/termios.h
new file mode 100644
index 000000000000..40984e811ad6
--- /dev/null
+++ b/arch/score/include/asm/termios.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_SCORE_TERMIOS_H
2#define _ASM_SCORE_TERMIOS_H
3
4#include <asm-generic/termios.h>
5
6#endif /* _ASM_SCORE_TERMIOS_H */
diff --git a/arch/score/include/asm/thread_info.h b/arch/score/include/asm/thread_info.h
new file mode 100644
index 000000000000..55939992c27d
--- /dev/null
+++ b/arch/score/include/asm/thread_info.h
@@ -0,0 +1,108 @@
1#ifndef _ASM_SCORE_THREAD_INFO_H
2#define _ASM_SCORE_THREAD_INFO_H
3
4#ifdef __KERNEL__
5
6#define KU_MASK 0x08
7#define KU_USER 0x08
8#define KU_KERN 0x00
9
10#include <asm/page.h>
11#include <linux/const.h>
12
13/* thread information allocation */
14#define THREAD_SIZE_ORDER (1)
15#define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER)
16#define THREAD_MASK (THREAD_SIZE - _AC(1,UL))
17#define __HAVE_ARCH_THREAD_INFO_ALLOCATOR
18
19#ifndef __ASSEMBLY__
20
21#include <asm/processor.h>
22
23/*
24 * low level task data that entry.S needs immediate access to
25 * - this struct should fit entirely inside of one cache line
26 * - this struct shares the supervisor stack pages
27 * - if the contents of this structure are changed, the assembly constants
28 * must also be changed
29 */
30struct thread_info {
31 struct task_struct *task; /* main task structure */
32 struct exec_domain *exec_domain; /* execution domain */
33 unsigned long flags; /* low level flags */
34 unsigned long tp_value; /* thread pointer */
35 __u32 cpu; /* current CPU */
36
37 /* 0 => preemptable, < 0 => BUG */
38 int preempt_count;
39
40 /*
41 * thread address space:
42 * 0-0xBFFFFFFF for user-thead
43 * 0-0xFFFFFFFF for kernel-thread
44 */
45 mm_segment_t addr_limit;
46 struct restart_block restart_block;
47 struct pt_regs *regs;
48};
49
50/*
51 * macros/functions for gaining access to the thread information structure
52 *
53 * preempt_count needs to be 1 initially, until the scheduler is functional.
54 */
55#define INIT_THREAD_INFO(tsk) \
56{ \
57 .task = &tsk, \
58 .exec_domain = &default_exec_domain, \
59 .cpu = 0, \
60 .preempt_count = 1, \
61 .addr_limit = KERNEL_DS, \
62 .restart_block = { \
63 .fn = do_no_restart_syscall, \
64 }, \
65}
66
67#define init_thread_info (init_thread_union.thread_info)
68#define init_stack (init_thread_union.stack)
69
70/* How to get the thread information struct from C. */
71register struct thread_info *__current_thread_info __asm__("r28");
72#define current_thread_info() __current_thread_info
73
74#define alloc_thread_info(tsk) kmalloc(THREAD_SIZE, GFP_KERNEL)
75#define free_thread_info(info) kfree(info)
76
77#endif /* !__ASSEMBLY__ */
78
79#define PREEMPT_ACTIVE 0x10000000
80
81/*
82 * thread information flags
83 * - these are process state flags that various assembly files may need to
84 * access
85 * - pending work-to-be-done flags are in LSW
86 * - other flags in MSW
87 */
88#define TIF_SYSCALL_TRACE 0 /* syscall trace active */
89#define TIF_SIGPENDING 1 /* signal pending */
90#define TIF_NEED_RESCHED 2 /* rescheduling necessary */
91#define TIF_NOTIFY_RESUME 5 /* callback before returning to user */
92#define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal() */
93#define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling
94 TIF_NEED_RESCHED */
95#define TIF_MEMDIE 18
96
97#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
98#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
99#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
100#define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
101#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK)
102#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
103
104#define _TIF_WORK_MASK (0x0000ffff)
105
106#endif /* __KERNEL__ */
107
108#endif /* _ASM_SCORE_THREAD_INFO_H */
diff --git a/arch/score/include/asm/timex.h b/arch/score/include/asm/timex.h
new file mode 100644
index 000000000000..a524ae0c5e7b
--- /dev/null
+++ b/arch/score/include/asm/timex.h
@@ -0,0 +1,8 @@
1#ifndef _ASM_SCORE_TIMEX_H
2#define _ASM_SCORE_TIMEX_H
3
4#define CLOCK_TICK_RATE 27000000 /* Timer input freq. */
5
6#include <asm-generic/timex.h>
7
8#endif /* _ASM_SCORE_TIMEX_H */
diff --git a/arch/score/include/asm/tlb.h b/arch/score/include/asm/tlb.h
new file mode 100644
index 000000000000..46882ed524e6
--- /dev/null
+++ b/arch/score/include/asm/tlb.h
@@ -0,0 +1,17 @@
1#ifndef _ASM_SCORE_TLB_H
2#define _ASM_SCORE_TLB_H
3
4/*
5 * SCORE doesn't need any special per-pte or per-vma handling, except
6 * we need to flush cache for area to be unmapped.
7 */
8#define tlb_start_vma(tlb, vma) do {} while (0)
9#define tlb_end_vma(tlb, vma) do {} while (0)
10#define __tlb_remove_tlb_entry(tlb, ptep, address) do {} while (0)
11#define tlb_flush(tlb) flush_tlb_mm((tlb)->mm)
12
13extern void score7_FTLB_refill_Handler(void);
14
15#include <asm-generic/tlb.h>
16
17#endif /* _ASM_SCORE_TLB_H */
diff --git a/arch/score/include/asm/tlbflush.h b/arch/score/include/asm/tlbflush.h
new file mode 100644
index 000000000000..9cce978367d5
--- /dev/null
+++ b/arch/score/include/asm/tlbflush.h
@@ -0,0 +1,142 @@
1#ifndef _ASM_SCORE_TLBFLUSH_H
2#define _ASM_SCORE_TLBFLUSH_H
3
4#include <linux/mm.h>
5
6/*
7 * TLB flushing:
8 *
9 * - flush_tlb_all() flushes all processes TLB entries
10 * - flush_tlb_mm(mm) flushes the specified mm context TLB entries
11 * - flush_tlb_page(vma, vmaddr) flushes one page
12 * - flush_tlb_range(vma, start, end) flushes a range of pages
13 * - flush_tlb_kernel_range(start, end) flushes a range of kernel pages
14 */
15extern void local_flush_tlb_all(void);
16extern void local_flush_tlb_mm(struct mm_struct *mm);
17extern void local_flush_tlb_range(struct vm_area_struct *vma,
18 unsigned long start, unsigned long end);
19extern void local_flush_tlb_kernel_range(unsigned long start,
20 unsigned long end);
21extern void local_flush_tlb_page(struct vm_area_struct *vma,
22 unsigned long page);
23extern void local_flush_tlb_one(unsigned long vaddr);
24
25#define flush_tlb_all() local_flush_tlb_all()
26#define flush_tlb_mm(mm) local_flush_tlb_mm(mm)
27#define flush_tlb_range(vma, vmaddr, end) \
28 local_flush_tlb_range(vma, vmaddr, end)
29#define flush_tlb_kernel_range(vmaddr, end) \
30 local_flush_tlb_kernel_range(vmaddr, end)
31#define flush_tlb_page(vma, page) local_flush_tlb_page(vma, page)
32#define flush_tlb_one(vaddr) local_flush_tlb_one(vaddr)
33
34#ifndef __ASSEMBLY__
35
36static inline unsigned long pevn_get(void)
37{
38 unsigned long val;
39
40 __asm__ __volatile__(
41 "mfcr %0, cr11\n"
42 "nop\nnop\n"
43 : "=r" (val));
44
45 return val;
46}
47
48static inline void pevn_set(unsigned long val)
49{
50 __asm__ __volatile__(
51 "mtcr %0, cr11\n"
52 "nop\nnop\nnop\nnop\nnop\n"
53 : : "r" (val));
54}
55
56static inline void pectx_set(unsigned long val)
57{
58 __asm__ __volatile__(
59 "mtcr %0, cr12\n"
60 "nop\nnop\nnop\nnop\nnop\n"
61 : : "r" (val));
62}
63
64static inline unsigned long pectx_get(void)
65{
66 unsigned long val;
67 __asm__ __volatile__(
68 "mfcr %0, cr12\n"
69 "nop\nnop\n"
70 : "=r" (val));
71 return val;
72}
73static inline unsigned long tlblock_get(void)
74{
75 unsigned long val;
76
77 __asm__ __volatile__(
78 "mfcr %0, cr7\n"
79 "nop\nnop\n"
80 : "=r" (val));
81 return val;
82}
83static inline void tlblock_set(unsigned long val)
84{
85 __asm__ __volatile__(
86 "mtcr %0, cr7\n"
87 "nop\nnop\nnop\nnop\nnop\n"
88 : : "r" (val));
89}
90
91static inline void tlbpt_set(unsigned long val)
92{
93 __asm__ __volatile__(
94 "mtcr %0, cr8\n"
95 "nop\nnop\nnop\nnop\nnop\n"
96 : : "r" (val));
97}
98
99static inline long tlbpt_get(void)
100{
101 long val;
102
103 __asm__ __volatile__(
104 "mfcr %0, cr8\n"
105 "nop\nnop\n"
106 : "=r" (val));
107
108 return val;
109}
110
111static inline void peaddr_set(unsigned long val)
112{
113 __asm__ __volatile__(
114 "mtcr %0, cr9\n"
115 "nop\nnop\nnop\nnop\nnop\n"
116 : : "r" (val));
117}
118
119/* TLB operations. */
120static inline void tlb_probe(void)
121{
122 __asm__ __volatile__("stlb;nop;nop;nop;nop;nop");
123}
124
125static inline void tlb_read(void)
126{
127 __asm__ __volatile__("mftlb;nop;nop;nop;nop;nop");
128}
129
130static inline void tlb_write_indexed(void)
131{
132 __asm__ __volatile__("mtptlb;nop;nop;nop;nop;nop");
133}
134
135static inline void tlb_write_random(void)
136{
137 __asm__ __volatile__("mtrtlb;nop;nop;nop;nop;nop");
138}
139
140#endif /* Not __ASSEMBLY__ */
141
142#endif /* _ASM_SCORE_TLBFLUSH_H */
diff --git a/arch/score/include/asm/topology.h b/arch/score/include/asm/topology.h
new file mode 100644
index 000000000000..425fba381f88
--- /dev/null
+++ b/arch/score/include/asm/topology.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_SCORE_TOPOLOGY_H
2#define _ASM_SCORE_TOPOLOGY_H
3
4#include <asm-generic/topology.h>
5
6#endif /* _ASM_SCORE_TOPOLOGY_H */
diff --git a/arch/score/include/asm/types.h b/arch/score/include/asm/types.h
new file mode 100644
index 000000000000..2140032778ee
--- /dev/null
+++ b/arch/score/include/asm/types.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_SCORE_TYPES_H
2#define _ASM_SCORE_TYPES_H
3
4#include <asm-generic/types.h>
5
6#endif /* _ASM_SCORE_TYPES_H */
diff --git a/arch/score/include/asm/uaccess.h b/arch/score/include/asm/uaccess.h
new file mode 100644
index 000000000000..ab66ddde777b
--- /dev/null
+++ b/arch/score/include/asm/uaccess.h
@@ -0,0 +1,424 @@
1#ifndef __SCORE_UACCESS_H
2#define __SCORE_UACCESS_H
3
4#include <linux/kernel.h>
5#include <linux/errno.h>
6#include <linux/thread_info.h>
7
8#define VERIFY_READ 0
9#define VERIFY_WRITE 1
10
11#define get_ds() (KERNEL_DS)
12#define get_fs() (current_thread_info()->addr_limit)
13#define segment_eq(a, b) ((a).seg == (b).seg)
14
15/*
16 * Is a address valid? This does a straighforward calculation rather
17 * than tests.
18 *
19 * Address valid if:
20 * - "addr" doesn't have any high-bits set
21 * - AND "size" doesn't have any high-bits set
22 * - AND "addr+size" doesn't have any high-bits set
23 * - OR we are in kernel mode.
24 *
25 * __ua_size() is a trick to avoid runtime checking of positive constant
26 * sizes; for those we already know at compile time that the size is ok.
27 */
28#define __ua_size(size) \
29 ((__builtin_constant_p(size) && (signed long) (size) > 0) ? 0 : (size))
30
31/*
32 * access_ok: - Checks if a user space pointer is valid
33 * @type: Type of access: %VERIFY_READ or %VERIFY_WRITE. Note that
34 * %VERIFY_WRITE is a superset of %VERIFY_READ - if it is safe
35 * to write to a block, it is always safe to read from it.
36 * @addr: User space pointer to start of block to check
37 * @size: Size of block to check
38 *
39 * Context: User context only. This function may sleep.
40 *
41 * Checks if a pointer to a block of memory in user space is valid.
42 *
43 * Returns true (nonzero) if the memory block may be valid, false (zero)
44 * if it is definitely invalid.
45 *
46 * Note that, depending on architecture, this function probably just
47 * checks that the pointer is in the user space range - after calling
48 * this function, memory access functions may still return -EFAULT.
49 */
50
51#define __access_ok(addr, size) \
52 (((long)((get_fs().seg) & \
53 ((addr) | ((addr) + (size)) | \
54 __ua_size(size)))) == 0)
55
56#define access_ok(type, addr, size) \
57 likely(__access_ok((unsigned long)(addr), (size)))
58
59/*
60 * put_user: - Write a simple value into user space.
61 * @x: Value to copy to user space.
62 * @ptr: Destination address, in user space.
63 *
64 * Context: User context only. This function may sleep.
65 *
66 * This macro copies a single simple value from kernel space to user
67 * space. It supports simple types like char and int, but not larger
68 * data types like structures or arrays.
69 *
70 * @ptr must have pointer-to-simple-variable type, and @x must be assignable
71 * to the result of dereferencing @ptr.
72 *
73 * Returns zero on success, or -EFAULT on error.
74 */
75#define put_user(x, ptr) __put_user_check((x), (ptr), sizeof(*(ptr)))
76
77/*
78 * get_user: - Get a simple variable from user space.
79 * @x: Variable to store result.
80 * @ptr: Source address, in user space.
81 *
82 * Context: User context only. This function may sleep.
83 *
84 * This macro copies a single simple variable from user space to kernel
85 * space. It supports simple types like char and int, but not larger
86 * data types like structures or arrays.
87 *
88 * @ptr must have pointer-to-simple-variable type, and the result of
89 * dereferencing @ptr must be assignable to @x without a cast.
90 *
91 * Returns zero on success, or -EFAULT on error.
92 * On error, the variable @x is set to zero.
93 */
94#define get_user(x, ptr) __get_user_check((x), (ptr), sizeof(*(ptr)))
95
96/*
97 * __put_user: - Write a simple value into user space, with less checking.
98 * @x: Value to copy to user space.
99 * @ptr: Destination address, in user space.
100 *
101 * Context: User context only. This function may sleep.
102 *
103 * This macro copies a single simple value from kernel space to user
104 * space. It supports simple types like char and int, but not larger
105 * data types like structures or arrays.
106 *
107 * @ptr must have pointer-to-simple-variable type, and @x must be assignable
108 * to the result of dereferencing @ptr.
109 *
110 * Caller must check the pointer with access_ok() before calling this
111 * function.
112 *
113 * Returns zero on success, or -EFAULT on error.
114 */
115#define __put_user(x, ptr) __put_user_nocheck((x), (ptr), sizeof(*(ptr)))
116
117/*
118 * __get_user: - Get a simple variable from user space, with less checking.
119 * @x: Variable to store result.
120 * @ptr: Source address, in user space.
121 *
122 * Context: User context only. This function may sleep.
123 *
124 * This macro copies a single simple variable from user space to kernel
125 * space. It supports simple types like char and int, but not larger
126 * data types like structures or arrays.
127 *
128 * @ptr must have pointer-to-simple-variable type, and the result of
129 * dereferencing @ptr must be assignable to @x without a cast.
130 *
131 * Caller must check the pointer with access_ok() before calling this
132 * function.
133 *
134 * Returns zero on success, or -EFAULT on error.
135 * On error, the variable @x is set to zero.
136 */
137#define __get_user(x, ptr) __get_user_nocheck((x), (ptr), sizeof(*(ptr)))
138
139struct __large_struct { unsigned long buf[100]; };
140#define __m(x) (*(struct __large_struct __user *)(x))
141
142/*
143 * Yuck. We need two variants, one for 64bit operation and one
144 * for 32 bit mode and old iron.
145 */
146extern void __get_user_unknown(void);
147
148#define __get_user_common(val, size, ptr) \
149do { \
150 switch (size) { \
151 case 1: \
152 __get_user_asm(val, "lb", ptr); \
153 break; \
154 case 2: \
155 __get_user_asm(val, "lh", ptr); \
156 break; \
157 case 4: \
158 __get_user_asm(val, "lw", ptr); \
159 break; \
160 case 8: \
161 if ((copy_from_user((void *)&val, ptr, 8)) == 0) \
162 __gu_err = 0; \
163 else \
164 __gu_err = -EFAULT; \
165 break; \
166 default: \
167 __get_user_unknown(); \
168 break; \
169 } \
170} while (0)
171
172#define __get_user_nocheck(x, ptr, size) \
173({ \
174 long __gu_err = 0; \
175 __get_user_common((x), size, ptr); \
176 __gu_err; \
177})
178
179#define __get_user_check(x, ptr, size) \
180({ \
181 long __gu_err = -EFAULT; \
182 const __typeof__(*(ptr)) __user *__gu_ptr = (ptr); \
183 \
184 if (likely(access_ok(VERIFY_READ, __gu_ptr, size))) \
185 __get_user_common((x), size, __gu_ptr); \
186 \
187 __gu_err; \
188})
189
190#define __get_user_asm(val, insn, addr) \
191{ \
192 long __gu_tmp; \
193 \
194 __asm__ __volatile__( \
195 "1:" insn " %1, %3\n" \
196 "2:\n" \
197 ".section .fixup,\"ax\"\n" \
198 "3:li %0, %4\n" \
199 "j 2b\n" \
200 ".previous\n" \
201 ".section __ex_table,\"a\"\n" \
202 ".word 1b, 3b\n" \
203 ".previous\n" \
204 : "=r" (__gu_err), "=r" (__gu_tmp) \
205 : "0" (0), "o" (__m(addr)), "i" (-EFAULT)); \
206 \
207 (val) = (__typeof__(*(addr))) __gu_tmp; \
208}
209
210/*
211 * Yuck. We need two variants, one for 64bit operation and one
212 * for 32 bit mode and old iron.
213 */
214#define __put_user_nocheck(val, ptr, size) \
215({ \
216 __typeof__(*(ptr)) __pu_val; \
217 long __pu_err = 0; \
218 \
219 __pu_val = (val); \
220 switch (size) { \
221 case 1: \
222 __put_user_asm("sb", ptr); \
223 break; \
224 case 2: \
225 __put_user_asm("sh", ptr); \
226 break; \
227 case 4: \
228 __put_user_asm("sw", ptr); \
229 break; \
230 case 8: \
231 if ((__copy_to_user((void *)ptr, &__pu_val, 8)) == 0) \
232 __pu_err = 0; \
233 else \
234 __pu_err = -EFAULT; \
235 break; \
236 default: \
237 __put_user_unknown(); \
238 break; \
239 } \
240 __pu_err; \
241})
242
243
244#define __put_user_check(val, ptr, size) \
245({ \
246 __typeof__(*(ptr)) __user *__pu_addr = (ptr); \
247 __typeof__(*(ptr)) __pu_val = (val); \
248 long __pu_err = -EFAULT; \
249 \
250 if (likely(access_ok(VERIFY_WRITE, __pu_addr, size))) { \
251 switch (size) { \
252 case 1: \
253 __put_user_asm("sb", __pu_addr); \
254 break; \
255 case 2: \
256 __put_user_asm("sh", __pu_addr); \
257 break; \
258 case 4: \
259 __put_user_asm("sw", __pu_addr); \
260 break; \
261 case 8: \
262 if ((__copy_to_user((void *)__pu_addr, &__pu_val, 8)) == 0)\
263 __pu_err = 0; \
264 else \
265 __pu_err = -EFAULT; \
266 break; \
267 default: \
268 __put_user_unknown(); \
269 break; \
270 } \
271 } \
272 __pu_err; \
273})
274
275#define __put_user_asm(insn, ptr) \
276 __asm__ __volatile__( \
277 "1:" insn " %2, %3\n" \
278 "2:\n" \
279 ".section .fixup,\"ax\"\n" \
280 "3:li %0, %4\n" \
281 "j 2b\n" \
282 ".previous\n" \
283 ".section __ex_table,\"a\"\n" \
284 ".word 1b, 3b\n" \
285 ".previous\n" \
286 : "=r" (__pu_err) \
287 : "0" (0), "r" (__pu_val), "o" (__m(ptr)), \
288 "i" (-EFAULT));
289
290extern void __put_user_unknown(void);
291extern int __copy_tofrom_user(void *to, const void *from, unsigned long len);
292
293static inline unsigned long
294copy_from_user(void *to, const void *from, unsigned long len)
295{
296 unsigned long over;
297
298 if (access_ok(VERIFY_READ, from, len))
299 return __copy_tofrom_user(to, from, len);
300
301 if ((unsigned long)from < TASK_SIZE) {
302 over = (unsigned long)from + len - TASK_SIZE;
303 return __copy_tofrom_user(to, from, len - over) + over;
304 }
305 return len;
306}
307
308static inline unsigned long
309copy_to_user(void *to, const void *from, unsigned long len)
310{
311 unsigned long over;
312
313 if (access_ok(VERIFY_WRITE, to, len))
314 return __copy_tofrom_user(to, from, len);
315
316 if ((unsigned long)to < TASK_SIZE) {
317 over = (unsigned long)to + len - TASK_SIZE;
318 return __copy_tofrom_user(to, from, len - over) + over;
319 }
320 return len;
321}
322
323#define __copy_from_user(to, from, len) \
324 __copy_tofrom_user((to), (from), (len))
325
326#define __copy_to_user(to, from, len) \
327 __copy_tofrom_user((to), (from), (len))
328
329static inline unsigned long
330__copy_to_user_inatomic(void *to, const void *from, unsigned long len)
331{
332 return __copy_to_user(to, from, len);
333}
334
335static inline unsigned long
336__copy_from_user_inatomic(void *to, const void *from, unsigned long len)
337{
338 return __copy_from_user(to, from, len);
339}
340
341#define __copy_in_user(to, from, len) __copy_from_user(to, from, len)
342
343static inline unsigned long
344copy_in_user(void *to, const void *from, unsigned long len)
345{
346 if (access_ok(VERIFY_READ, from, len) &&
347 access_ok(VERFITY_WRITE, to, len))
348 return copy_from_user(to, from, len);
349}
350
351/*
352 * __clear_user: - Zero a block of memory in user space, with less checking.
353 * @to: Destination address, in user space.
354 * @n: Number of bytes to zero.
355 *
356 * Zero a block of memory in user space. Caller must check
357 * the specified block with access_ok() before calling this function.
358 *
359 * Returns number of bytes that could not be cleared.
360 * On success, this will be zero.
361 */
362extern unsigned long __clear_user(void __user *src, unsigned long size);
363
364static inline unsigned long clear_user(char *src, unsigned long size)
365{
366 if (access_ok(VERIFY_WRITE, src, size))
367 return __clear_user(src, size);
368
369 return -EFAULT;
370}
371/*
372 * __strncpy_from_user: - Copy a NUL terminated string from userspace, with less checking.
373 * @dst: Destination address, in kernel space. This buffer must be at
374 * least @count bytes long.
375 * @src: Source address, in user space.
376 * @count: Maximum number of bytes to copy, including the trailing NUL.
377 *
378 * Copies a NUL-terminated string from userspace to kernel space.
379 * Caller must check the specified block with access_ok() before calling
380 * this function.
381 *
382 * On success, returns the length of the string (not including the trailing
383 * NUL).
384 *
385 * If access to userspace fails, returns -EFAULT (some data may have been
386 * copied).
387 *
388 * If @count is smaller than the length of the string, copies @count bytes
389 * and returns @count.
390 */
391extern int __strncpy_from_user(char *dst, const char *src, long len);
392
393static inline int strncpy_from_user(char *dst, const char *src, long len)
394{
395 if (access_ok(VERIFY_READ, src, 1))
396 return __strncpy_from_user(dst, src, len);
397
398 return -EFAULT;
399}
400
401extern int __strlen_user(const char *src);
402static inline long strlen_user(const char __user *src)
403{
404 return __strlen_user(src);
405}
406
407extern int __strnlen_user(const char *str, long len);
408static inline long strnlen_user(const char __user *str, long len)
409{
410 if (!access_ok(VERIFY_READ, str, 0))
411 return 0;
412 else
413 return __strnlen_user(str, len);
414}
415
416struct exception_table_entry {
417 unsigned long insn;
418 unsigned long fixup;
419};
420
421extern int fixup_exception(struct pt_regs *regs);
422
423#endif /* __SCORE_UACCESS_H */
424
diff --git a/arch/score/include/asm/ucontext.h b/arch/score/include/asm/ucontext.h
new file mode 100644
index 000000000000..9bc07b9f30fb
--- /dev/null
+++ b/arch/score/include/asm/ucontext.h
@@ -0,0 +1 @@
#include <asm-generic/ucontext.h>
diff --git a/arch/score/include/asm/unaligned.h b/arch/score/include/asm/unaligned.h
new file mode 100644
index 000000000000..2fc06de51c62
--- /dev/null
+++ b/arch/score/include/asm/unaligned.h
@@ -0,0 +1,6 @@
1#ifndef _ASM_SCORE_UNALIGNED_H
2#define _ASM_SCORE_UNALIGNED_H
3
4#include <asm-generic/unaligned.h>
5
6#endif /* _ASM_SCORE_UNALIGNED_H */
diff --git a/arch/score/include/asm/unistd.h b/arch/score/include/asm/unistd.h
new file mode 100644
index 000000000000..4aa957364d4d
--- /dev/null
+++ b/arch/score/include/asm/unistd.h
@@ -0,0 +1,13 @@
1#if !defined(_ASM_SCORE_UNISTD_H) || defined(__SYSCALL)
2#define _ASM_SCORE_UNISTD_H
3
4#define __ARCH_HAVE_MMU
5
6#define __ARCH_WANT_SYSCALL_NO_AT
7#define __ARCH_WANT_SYSCALL_NO_FLAGS
8#define __ARCH_WANT_SYSCALL_OFF_T
9#define __ARCH_WANT_SYSCALL_DEPRECATED
10
11#include <asm-generic/unistd.h>
12
13#endif /* _ASM_SCORE_UNISTD_H */
diff --git a/arch/score/include/asm/user.h b/arch/score/include/asm/user.h
new file mode 100644
index 000000000000..7bfb8e2c8054
--- /dev/null
+++ b/arch/score/include/asm/user.h
@@ -0,0 +1,21 @@
1#ifndef _ASM_SCORE_USER_H
2#define _ASM_SCORE_USER_H
3
4struct user_regs_struct {
5 unsigned long regs[32];
6
7 unsigned long cel;
8 unsigned long ceh;
9
10 unsigned long sr0; /* cnt */
11 unsigned long sr1; /* lcr */
12 unsigned long sr2; /* scr */
13
14 unsigned long cp0_epc;
15 unsigned long cp0_ema;
16 unsigned long cp0_psr;
17 unsigned long cp0_ecr;
18 unsigned long cp0_condition;
19};
20
21#endif /* _ASM_SCORE_USER_H */
diff --git a/arch/score/kernel/Makefile b/arch/score/kernel/Makefile
new file mode 100644
index 000000000000..f218673b5d3d
--- /dev/null
+++ b/arch/score/kernel/Makefile
@@ -0,0 +1,11 @@
1#
2# Makefile for the Linux/SCORE kernel.
3#
4
5extra-y := head.o vmlinux.lds
6
7obj-y += entry.o init_task.o irq.o process.o ptrace.o \
8 setup.o signal.o sys_score.o time.o traps.o \
9 sys_call_table.o
10
11obj-$(CONFIG_MODULES) += module.o
diff --git a/arch/score/kernel/asm-offsets.c b/arch/score/kernel/asm-offsets.c
new file mode 100644
index 000000000000..57788f44c6fb
--- /dev/null
+++ b/arch/score/kernel/asm-offsets.c
@@ -0,0 +1,216 @@
1/*
2 * arch/score/kernel/asm-offsets.c
3 *
4 * Score Processor version.
5 *
6 * Copyright (C) 2009 Sunplus Core Technology Co., Ltd.
7 * Chen Liqin <liqin.chen@sunplusct.com>
8 * Lennox Wu <lennox.wu@sunplusct.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, see the file COPYING, or write
22 * to the Free Software Foundation, Inc.,
23 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 */
25
26#include <linux/kbuild.h>
27#include <linux/interrupt.h>
28#include <linux/mm.h>
29#include <linux/sched.h>
30
31#include <asm-generic/cmpxchg-local.h>
32
33void output_ptreg_defines(void)
34{
35 COMMENT("SCORE pt_regs offsets.");
36 OFFSET(PT_R0, pt_regs, regs[0]);
37 OFFSET(PT_R1, pt_regs, regs[1]);
38 OFFSET(PT_R2, pt_regs, regs[2]);
39 OFFSET(PT_R3, pt_regs, regs[3]);
40 OFFSET(PT_R4, pt_regs, regs[4]);
41 OFFSET(PT_R5, pt_regs, regs[5]);
42 OFFSET(PT_R6, pt_regs, regs[6]);
43 OFFSET(PT_R7, pt_regs, regs[7]);
44 OFFSET(PT_R8, pt_regs, regs[8]);
45 OFFSET(PT_R9, pt_regs, regs[9]);
46 OFFSET(PT_R10, pt_regs, regs[10]);
47 OFFSET(PT_R11, pt_regs, regs[11]);
48 OFFSET(PT_R12, pt_regs, regs[12]);
49 OFFSET(PT_R13, pt_regs, regs[13]);
50 OFFSET(PT_R14, pt_regs, regs[14]);
51 OFFSET(PT_R15, pt_regs, regs[15]);
52 OFFSET(PT_R16, pt_regs, regs[16]);
53 OFFSET(PT_R17, pt_regs, regs[17]);
54 OFFSET(PT_R18, pt_regs, regs[18]);
55 OFFSET(PT_R19, pt_regs, regs[19]);
56 OFFSET(PT_R20, pt_regs, regs[20]);
57 OFFSET(PT_R21, pt_regs, regs[21]);
58 OFFSET(PT_R22, pt_regs, regs[22]);
59 OFFSET(PT_R23, pt_regs, regs[23]);
60 OFFSET(PT_R24, pt_regs, regs[24]);
61 OFFSET(PT_R25, pt_regs, regs[25]);
62 OFFSET(PT_R26, pt_regs, regs[26]);
63 OFFSET(PT_R27, pt_regs, regs[27]);
64 OFFSET(PT_R28, pt_regs, regs[28]);
65 OFFSET(PT_R29, pt_regs, regs[29]);
66 OFFSET(PT_R30, pt_regs, regs[30]);
67 OFFSET(PT_R31, pt_regs, regs[31]);
68
69 OFFSET(PT_ORIG_R4, pt_regs, orig_r4);
70 OFFSET(PT_ORIG_R7, pt_regs, orig_r7);
71 OFFSET(PT_CEL, pt_regs, cel);
72 OFFSET(PT_CEH, pt_regs, ceh);
73 OFFSET(PT_SR0, pt_regs, sr0);
74 OFFSET(PT_SR1, pt_regs, sr1);
75 OFFSET(PT_SR2, pt_regs, sr2);
76 OFFSET(PT_EPC, pt_regs, cp0_epc);
77 OFFSET(PT_EMA, pt_regs, cp0_ema);
78 OFFSET(PT_PSR, pt_regs, cp0_psr);
79 OFFSET(PT_ECR, pt_regs, cp0_ecr);
80 OFFSET(PT_CONDITION, pt_regs, cp0_condition);
81 OFFSET(PT_IS_SYSCALL, pt_regs, is_syscall);
82
83 DEFINE(PT_SIZE, sizeof(struct pt_regs));
84 BLANK();
85}
86
87void output_task_defines(void)
88{
89 COMMENT("SCORE task_struct offsets.");
90 OFFSET(TASK_STATE, task_struct, state);
91 OFFSET(TASK_THREAD_INFO, task_struct, stack);
92 OFFSET(TASK_FLAGS, task_struct, flags);
93 OFFSET(TASK_MM, task_struct, mm);
94 OFFSET(TASK_PID, task_struct, pid);
95 DEFINE(TASK_STRUCT_SIZE, sizeof(struct task_struct));
96 BLANK();
97}
98
99void output_thread_info_defines(void)
100{
101 COMMENT("SCORE thread_info offsets.");
102 OFFSET(TI_TASK, thread_info, task);
103 OFFSET(TI_EXEC_DOMAIN, thread_info, exec_domain);
104 OFFSET(TI_FLAGS, thread_info, flags);
105 OFFSET(TI_TP_VALUE, thread_info, tp_value);
106 OFFSET(TI_CPU, thread_info, cpu);
107 OFFSET(TI_PRE_COUNT, thread_info, preempt_count);
108 OFFSET(TI_ADDR_LIMIT, thread_info, addr_limit);
109 OFFSET(TI_RESTART_BLOCK, thread_info, restart_block);
110 OFFSET(TI_REGS, thread_info, regs);
111 DEFINE(KERNEL_STACK_SIZE, THREAD_SIZE);
112 DEFINE(KERNEL_STACK_MASK, THREAD_MASK);
113 BLANK();
114}
115
116void output_thread_defines(void)
117{
118 COMMENT("SCORE specific thread_struct offsets.");
119 OFFSET(THREAD_REG0, task_struct, thread.reg0);
120 OFFSET(THREAD_REG2, task_struct, thread.reg2);
121 OFFSET(THREAD_REG3, task_struct, thread.reg3);
122 OFFSET(THREAD_REG12, task_struct, thread.reg12);
123 OFFSET(THREAD_REG13, task_struct, thread.reg13);
124 OFFSET(THREAD_REG14, task_struct, thread.reg14);
125 OFFSET(THREAD_REG15, task_struct, thread.reg15);
126 OFFSET(THREAD_REG16, task_struct, thread.reg16);
127 OFFSET(THREAD_REG17, task_struct, thread.reg17);
128 OFFSET(THREAD_REG18, task_struct, thread.reg18);
129 OFFSET(THREAD_REG19, task_struct, thread.reg19);
130 OFFSET(THREAD_REG20, task_struct, thread.reg20);
131 OFFSET(THREAD_REG21, task_struct, thread.reg21);
132 OFFSET(THREAD_REG29, task_struct, thread.reg29);
133
134 OFFSET(THREAD_PSR, task_struct, thread.cp0_psr);
135 OFFSET(THREAD_EMA, task_struct, thread.cp0_ema);
136 OFFSET(THREAD_BADUADDR, task_struct, thread.cp0_baduaddr);
137 OFFSET(THREAD_ECODE, task_struct, thread.error_code);
138 OFFSET(THREAD_TRAPNO, task_struct, thread.trap_no);
139 BLANK();
140}
141
142void output_mm_defines(void)
143{
144 COMMENT("Size of struct page");
145 DEFINE(STRUCT_PAGE_SIZE, sizeof(struct page));
146 BLANK();
147 COMMENT("Linux mm_struct offsets.");
148 OFFSET(MM_USERS, mm_struct, mm_users);
149 OFFSET(MM_PGD, mm_struct, pgd);
150 OFFSET(MM_CONTEXT, mm_struct, context);
151 BLANK();
152 DEFINE(_PAGE_SIZE, PAGE_SIZE);
153 DEFINE(_PAGE_SHIFT, PAGE_SHIFT);
154 BLANK();
155 DEFINE(_PGD_T_SIZE, sizeof(pgd_t));
156 DEFINE(_PTE_T_SIZE, sizeof(pte_t));
157 BLANK();
158 DEFINE(_PGD_ORDER, PGD_ORDER);
159 DEFINE(_PTE_ORDER, PTE_ORDER);
160 BLANK();
161 DEFINE(_PGDIR_SHIFT, PGDIR_SHIFT);
162 BLANK();
163 DEFINE(_PTRS_PER_PGD, PTRS_PER_PGD);
164 DEFINE(_PTRS_PER_PTE, PTRS_PER_PTE);
165 BLANK();
166}
167
168void output_sc_defines(void)
169{
170 COMMENT("Linux sigcontext offsets.");
171 OFFSET(SC_REGS, sigcontext, sc_regs);
172 OFFSET(SC_MDCEH, sigcontext, sc_mdceh);
173 OFFSET(SC_MDCEL, sigcontext, sc_mdcel);
174 OFFSET(SC_PC, sigcontext, sc_pc);
175 OFFSET(SC_PSR, sigcontext, sc_psr);
176 OFFSET(SC_ECR, sigcontext, sc_ecr);
177 OFFSET(SC_EMA, sigcontext, sc_ema);
178 BLANK();
179}
180
181void output_signal_defined(void)
182{
183 COMMENT("Linux signal numbers.");
184 DEFINE(_SIGHUP, SIGHUP);
185 DEFINE(_SIGINT, SIGINT);
186 DEFINE(_SIGQUIT, SIGQUIT);
187 DEFINE(_SIGILL, SIGILL);
188 DEFINE(_SIGTRAP, SIGTRAP);
189 DEFINE(_SIGIOT, SIGIOT);
190 DEFINE(_SIGABRT, SIGABRT);
191 DEFINE(_SIGFPE, SIGFPE);
192 DEFINE(_SIGKILL, SIGKILL);
193 DEFINE(_SIGBUS, SIGBUS);
194 DEFINE(_SIGSEGV, SIGSEGV);
195 DEFINE(_SIGSYS, SIGSYS);
196 DEFINE(_SIGPIPE, SIGPIPE);
197 DEFINE(_SIGALRM, SIGALRM);
198 DEFINE(_SIGTERM, SIGTERM);
199 DEFINE(_SIGUSR1, SIGUSR1);
200 DEFINE(_SIGUSR2, SIGUSR2);
201 DEFINE(_SIGCHLD, SIGCHLD);
202 DEFINE(_SIGPWR, SIGPWR);
203 DEFINE(_SIGWINCH, SIGWINCH);
204 DEFINE(_SIGURG, SIGURG);
205 DEFINE(_SIGIO, SIGIO);
206 DEFINE(_SIGSTOP, SIGSTOP);
207 DEFINE(_SIGTSTP, SIGTSTP);
208 DEFINE(_SIGCONT, SIGCONT);
209 DEFINE(_SIGTTIN, SIGTTIN);
210 DEFINE(_SIGTTOU, SIGTTOU);
211 DEFINE(_SIGVTALRM, SIGVTALRM);
212 DEFINE(_SIGPROF, SIGPROF);
213 DEFINE(_SIGXCPU, SIGXCPU);
214 DEFINE(_SIGXFSZ, SIGXFSZ);
215 BLANK();
216}
diff --git a/arch/score/kernel/entry.S b/arch/score/kernel/entry.S
new file mode 100644
index 000000000000..577abba3fac6
--- /dev/null
+++ b/arch/score/kernel/entry.S
@@ -0,0 +1,514 @@
1/*
2 * arch/score/kernel/entry.S
3 *
4 * Score Processor version.
5 *
6 * Copyright (C) 2009 Sunplus Core Technology Co., Ltd.
7 * Chen Liqin <liqin.chen@sunplusct.com>
8 * Lennox Wu <lennox.wu@sunplusct.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, see the file COPYING, or write
22 * to the Free Software Foundation, Inc.,
23 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 */
25
26#include <linux/err.h>
27#include <linux/init.h>
28#include <linux/linkage.h>
29
30#include <asm/asmmacro.h>
31#include <asm/thread_info.h>
32#include <asm/unistd.h>
33
34/*
35 * disable interrupts.
36 */
37.macro disable_irq
38 mfcr r8, cr0
39 srli r8, r8, 1
40 slli r8, r8, 1
41 mtcr r8, cr0
42 nop
43 nop
44 nop
45 nop
46 nop
47.endm
48
49/*
50 * enable interrupts.
51 */
52.macro enable_irq
53 mfcr r8, cr0
54 ori r8, 1
55 mtcr r8, cr0
56 nop
57 nop
58 nop
59 nop
60 nop
61.endm
62
63__INIT
64ENTRY(debug_exception_vector)
65 nop!
66 nop!
67 nop!
68 nop!
69 nop!
70 nop!
71 nop!
72 nop!
73
74ENTRY(general_exception_vector) # should move to addr 0x200
75 j general_exception
76 nop!
77 nop!
78 nop!
79 nop!
80 nop!
81 nop!
82
83ENTRY(interrupt_exception_vector) # should move to addr 0x210
84 j interrupt_exception
85 nop!
86 nop!
87 nop!
88 nop!
89 nop!
90 nop!
91
92 .section ".text", "ax"
93 .align 2;
94general_exception:
95 mfcr r31, cr2
96 nop
97 la r30, exception_handlers
98 andi r31, 0x1f # get ecr.exc_code
99 slli r31, r31, 2
100 add r30, r30, r31
101 lw r30, [r30]
102 br r30
103
104interrupt_exception:
105 SAVE_ALL
106 mfcr r4, cr2
107 nop
108 lw r16, [r28, TI_REGS]
109 sw r0, [r28, TI_REGS]
110 la r3, ret_from_irq
111 srli r4, r4, 18 # get ecr.ip[7:2], interrupt No.
112 mv r5, r0
113 j do_IRQ
114
115ENTRY(handle_nmi) # NMI #1
116 SAVE_ALL
117 mv r4, r0
118 la r8, nmi_exception_handler
119 brl r8
120 j restore_all
121
122ENTRY(handle_adelinsn) # AdEL-instruction #2
123 SAVE_ALL
124 mfcr r8, cr6
125 nop
126 nop
127 sw r8, [r0, PT_EMA]
128 mv r4, r0
129 la r8, do_adelinsn
130 brl r8
131 mv r4, r0
132 j ret_from_exception
133 nop
134
135ENTRY(handle_ibe) # BusEL-instruction #5
136 SAVE_ALL
137 mv r4, r0
138 la r8, do_be
139 brl r8
140 mv r4, r0
141 j ret_from_exception
142 nop
143
144ENTRY(handle_pel) # P-EL #6
145 SAVE_ALL
146 mv r4, r0
147 la r8, do_pel
148 brl r8
149 mv r4, r0
150 j ret_from_exception
151 nop
152
153ENTRY(handle_ccu) # CCU #8
154 SAVE_ALL
155 mv r4, r0
156 la r8, do_ccu
157 brl r8
158 mv r4, r0
159 j ret_from_exception
160 nop
161
162ENTRY(handle_ri) # RI #9
163 SAVE_ALL
164 mv r4, r0
165 la r8, do_ri
166 brl r8
167 mv r4, r0
168 j ret_from_exception
169 nop
170
171ENTRY(handle_tr) # Trap #10
172 SAVE_ALL
173 mv r4, r0
174 la r8, do_tr
175 brl r8
176 mv r4, r0
177 j ret_from_exception
178 nop
179
180ENTRY(handle_adedata) # AdES-instruction #12
181 SAVE_ALL
182 mfcr r8, cr6
183 nop
184 nop
185 sw r8, [r0, PT_EMA]
186 mv r4, r0
187 la r8, do_adedata
188 brl r8
189 mv r4, r0
190 j ret_from_exception
191 nop
192
193ENTRY(handle_cee) # CeE #16
194 SAVE_ALL
195 mv r4, r0
196 la r8, do_cee
197 brl r8
198 mv r4, r0
199 j ret_from_exception
200 nop
201
202ENTRY(handle_cpe) # CpE #17
203 SAVE_ALL
204 mv r4, r0
205 la r8, do_cpe
206 brl r8
207 mv r4, r0
208 j ret_from_exception
209 nop
210
211ENTRY(handle_dbe) # BusEL-data #18
212 SAVE_ALL
213 mv r4, r0
214 la r8, do_be
215 brl r8
216 mv r4, r0
217 j ret_from_exception
218 nop
219
220ENTRY(handle_reserved) # others
221 SAVE_ALL
222 mv r4, r0
223 la r8, do_reserved
224 brl r8
225 mv r4, r0
226 j ret_from_exception
227 nop
228
229#ifndef CONFIG_PREEMPT
230#define resume_kernel restore_all
231#else
232#define __ret_from_irq ret_from_exception
233#endif
234
235 .align 2
236#ifndef CONFIG_PREEMPT
237ENTRY(ret_from_exception)
238 disable_irq # preempt stop
239 nop
240 j __ret_from_irq
241 nop
242#endif
243
244ENTRY(ret_from_irq)
245 sw r16, [r28, TI_REGS]
246
247ENTRY(__ret_from_irq)
248 lw r8, [r0, PT_PSR] # returning to kernel mode?
249 andri.c r8, r8, KU_USER
250 beq resume_kernel
251
252resume_userspace:
253 disable_irq
254 lw r6, [r28, TI_FLAGS] # current->work
255 li r8, _TIF_WORK_MASK
256 and.c r8, r8, r6 # ignoring syscall_trace
257 bne work_pending
258 nop
259 j restore_all
260 nop
261
262#ifdef CONFIG_PREEMPT
263resume_kernel:
264 disable_irq
265 lw r8, [r28, TI_PRE_COUNT]
266 cmpz.c r8
267 bne r8, restore_all
268need_resched:
269 lw r8, [r28, TI_FLAGS]
270 andri.c r9, r8, _TIF_NEED_RESCHED
271 beq restore_all
272 lw r8, [r28, PT_PSR] # Interrupts off?
273 andri.c r8, r8, 1
274 beq restore_all
275 bl preempt_schedule_irq
276 nop
277 j need_resched
278 nop
279#endif
280
281ENTRY(ret_from_fork)
282 bl schedule_tail # r4=struct task_struct *prev
283
284ENTRY(syscall_exit)
285 nop
286 disable_irq
287 lw r6, [r28, TI_FLAGS] # current->work
288 li r8, _TIF_WORK_MASK
289 and.c r8, r6, r8
290 bne syscall_exit_work
291
292ENTRY(restore_all) # restore full frame
293 RESTORE_ALL_AND_RET
294
295work_pending:
296 andri.c r8, r6, _TIF_NEED_RESCHED # r6 is preloaded with TI_FLAGS
297 beq work_notifysig
298work_resched:
299 bl schedule
300 nop
301 disable_irq
302 lw r6, [r28, TI_FLAGS]
303 li r8, _TIF_WORK_MASK
304 and.c r8, r6, r8 # is there any work to be done
305 # other than syscall tracing?
306 beq restore_all
307 andri.c r8, r6, _TIF_NEED_RESCHED
308 bne work_resched
309
310work_notifysig:
311 mv r4, r0
312 li r5, 0
313 bl do_notify_resume # r6 already loaded
314 nop
315 j resume_userspace
316 nop
317
318ENTRY(syscall_exit_work)
319 li r8, _TIF_SYSCALL_TRACE
320 and.c r8, r8, r6 # r6 is preloaded with TI_FLAGS
321 beq work_pending # trace bit set?
322 nop
323 enable_irq
324 mv r4, r0
325 li r5, 1
326 bl do_syscall_trace
327 nop
328 b resume_userspace
329 nop
330
331.macro save_context reg
332 sw r12, [\reg, THREAD_REG12];
333 sw r13, [\reg, THREAD_REG13];
334 sw r14, [\reg, THREAD_REG14];
335 sw r15, [\reg, THREAD_REG15];
336 sw r16, [\reg, THREAD_REG16];
337 sw r17, [\reg, THREAD_REG17];
338 sw r18, [\reg, THREAD_REG18];
339 sw r19, [\reg, THREAD_REG19];
340 sw r20, [\reg, THREAD_REG20];
341 sw r21, [\reg, THREAD_REG21];
342 sw r29, [\reg, THREAD_REG29];
343 sw r2, [\reg, THREAD_REG2];
344 sw r0, [\reg, THREAD_REG0]
345.endm
346
347.macro restore_context reg
348 lw r12, [\reg, THREAD_REG12];
349 lw r13, [\reg, THREAD_REG13];
350 lw r14, [\reg, THREAD_REG14];
351 lw r15, [\reg, THREAD_REG15];
352 lw r16, [\reg, THREAD_REG16];
353 lw r17, [\reg, THREAD_REG17];
354 lw r18, [\reg, THREAD_REG18];
355 lw r19, [\reg, THREAD_REG19];
356 lw r20, [\reg, THREAD_REG20];
357 lw r21, [\reg, THREAD_REG21];
358 lw r29, [\reg, THREAD_REG29];
359 lw r0, [\reg, THREAD_REG0];
360 lw r2, [\reg, THREAD_REG2];
361 lw r3, [\reg, THREAD_REG3]
362.endm
363
364/*
365 * task_struct *resume(task_struct *prev, task_struct *next,
366 * struct thread_info *next_ti)
367 */
368ENTRY(resume)
369 mfcr r9, cr0
370 nop
371 nop
372 sw r9, [r4, THREAD_PSR]
373 save_context r4
374 sw r3, [r4, THREAD_REG3]
375
376 mv r28, r6
377 restore_context r5
378 mv r8, r6
379 addi r8, KERNEL_STACK_SIZE
380 subi r8, 32
381 la r9, kernelsp;
382 sw r8, [r9];
383
384 mfcr r9, cr0
385 ldis r7, 0x00ff
386 nop
387 and r9, r9, r7
388 lw r6, [r5, THREAD_PSR]
389 not r7, r7
390 and r6, r6, r7
391 or r6, r6, r9
392 mtcr r6, cr0
393 nop; nop; nop; nop; nop
394 br r3
395
396ENTRY(handle_sys)
397 SAVE_ALL
398 sw r8, [r0, 16] # argument 5 from user r8
399 sw r9, [r0, 20] # argument 6 from user r9
400 enable_irq
401
402 sw r4, [r0, PT_ORIG_R4] #for restart syscall
403 sw r7, [r0, PT_ORIG_R7] #for restart syscall
404 sw r27, [r0, PT_IS_SYSCALL] # it from syscall
405
406 lw r9, [r0, PT_EPC] # skip syscall on return
407 addi r9, 4
408 sw r9, [r0, PT_EPC]
409
410 cmpi.c r27, __NR_syscalls # check syscall number
411 bgtu illegal_syscall
412
413 slli r8, r27, 2 # get syscall routine
414 la r11, sys_call_table
415 add r11, r11, r8
416 lw r10, [r11] # get syscall entry
417
418 cmpz.c r10
419 beq illegal_syscall
420
421 lw r8, [r28, TI_FLAGS]
422 li r9, _TIF_SYSCALL_TRACE
423 and.c r8, r8, r9
424 bne syscall_trace_entry
425
426 brl r10 # Do The Real system call
427
428 cmpi.c r4, 0
429 blt 1f
430 ldi r8, 0
431 sw r8, [r0, PT_R7]
432 b 2f
4331:
434 cmpi.c r4, -MAX_ERRNO - 1
435 ble 2f
436 ldi r8, 0x1;
437 sw r8, [r0, PT_R7]
438 neg r4, r4
4392:
440 sw r4, [r0, PT_R4] # save result
441
442syscall_return:
443 disable_irq
444 lw r6, [r28, TI_FLAGS] # current->work
445 li r8, _TIF_WORK_MASK
446 and.c r8, r6, r8
447 bne syscall_return_work
448 j restore_all
449
450syscall_return_work:
451 j syscall_exit_work
452
453syscall_trace_entry:
454 mv r16, r10
455 mv r4, r0
456 li r5, 0
457 bl do_syscall_trace
458
459 mv r8, r16
460 lw r4, [r0, PT_R4] # Restore argument registers
461 lw r5, [r0, PT_R5]
462 lw r6, [r0, PT_R6]
463 lw r7, [r0, PT_R7]
464 brl r8
465
466 li r8, -MAX_ERRNO - 1
467 sw r8, [r0, PT_R7] # set error flag
468
469 neg r4, r4 # error
470 sw r4, [r0, PT_R0] # set flag for syscall
471 # restarting
4721: sw r4, [r0, PT_R2] # result
473 j syscall_exit
474
475illegal_syscall:
476 ldi r4, -ENOSYS # error
477 sw r4, [r0, PT_ORIG_R4]
478 sw r4, [r0, PT_R4]
479 ldi r9, 1 # set error flag
480 sw r9, [r0, PT_R7]
481 j syscall_return
482
483ENTRY(sys_execve)
484 mv r4, r0
485 la r8, score_execve
486 br r8
487
488ENTRY(sys_clone)
489 mv r4, r0
490 la r8, score_clone
491 br r8
492
493ENTRY(sys_rt_sigreturn)
494 mv r4, r0
495 la r8, score_rt_sigreturn
496 br r8
497
498ENTRY(sys_sigaltstack)
499 mv r4, r0
500 la r8, score_sigaltstack
501 br r8
502
503#ifdef __ARCH_WANT_SYSCALL_DEPRECATED
504ENTRY(sys_fork)
505 mv r4, r0
506 la r8, score_fork
507 br r8
508
509ENTRY(sys_vfork)
510 mv r4, r0
511 la r8, score_vfork
512 br r8
513#endif /* __ARCH_WANT_SYSCALL_DEPRECATED */
514
diff --git a/arch/score/kernel/head.S b/arch/score/kernel/head.S
new file mode 100644
index 000000000000..22a7e3c7292b
--- /dev/null
+++ b/arch/score/kernel/head.S
@@ -0,0 +1,70 @@
1/*
2 * arch/score/kernel/head.S
3 *
4 * Score Processor version.
5 *
6 * Copyright (C) 2009 Sunplus Core Technology Co., Ltd.
7 * Chen Liqin <liqin.chen@sunplusct.com>
8 * Lennox Wu <lennox.wu@sunplusct.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, see the file COPYING, or write
22 * to the Free Software Foundation, Inc.,
23 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 */
25#include <linux/init.h>
26#include <linux/linkage.h>
27
28#include <asm/asm-offsets.h>
29
30 .extern start_kernel
31 .global init_thread_union
32 .global kernelsp
33
34__INIT
35ENTRY(_stext)
36 la r30, __bss_start /* initialize BSS segment. */
37 la r31, _end
38 xor r8, r8, r8
39
401: cmp.c r31, r30
41 beq 2f
42
43 sw r8, [r30] /* clean memory. */
44 addi r30, 4
45 b 1b
46
472: la r28, init_thread_union /* set kernel stack. */
48 mv r0, r28
49 addi r0, KERNEL_STACK_SIZE - 32
50 la r30, kernelsp
51 sw r0, [r30]
52 subi r0, 4*4
53 xor r30, r30, r30
54 ori r30, 0x02 /* enable MMU. */
55 mtcr r30, cr4
56 nop
57 nop
58 nop
59 nop
60 nop
61 nop
62 nop
63
64 /* there is no parameter */
65 xor r4, r4, r4
66 xor r5, r5, r5
67 xor r6, r6, r6
68 xor r7, r7, r7
69 la r30, start_kernel /* jump to init_arch */
70 br r30
diff --git a/arch/score/kernel/init_task.c b/arch/score/kernel/init_task.c
new file mode 100644
index 000000000000..baa03ee217d1
--- /dev/null
+++ b/arch/score/kernel/init_task.c
@@ -0,0 +1,46 @@
1/*
2 * arch/score/kernel/init_task.c
3 *
4 * Score Processor version.
5 *
6 * Copyright (C) 2009 Sunplus Core Technology Co., 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 as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, see the file COPYING, or write
20 * to the Free Software Foundation, Inc.,
21 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 */
23
24#include <linux/init_task.h>
25#include <linux/mqueue.h>
26
27static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
28static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
29
30/*
31 * Initial thread structure.
32 *
33 * We need to make sure that this is THREAD_SIZE aligned due to the
34 * way process stacks are handled. This is done by having a special
35 * "init_task" linker map entry..
36 */
37union thread_union init_thread_union __init_task_data =
38 { INIT_THREAD_INFO(init_task) };
39
40/*
41 * Initial task structure.
42 *
43 * All other task structs will be allocated on slabs in fork.c
44 */
45struct task_struct init_task = INIT_TASK(init_task);
46EXPORT_SYMBOL(init_task);
diff --git a/arch/score/kernel/irq.c b/arch/score/kernel/irq.c
new file mode 100644
index 000000000000..47647dde09ca
--- /dev/null
+++ b/arch/score/kernel/irq.c
@@ -0,0 +1,148 @@
1/*
2 * arch/score/kernel/irq.c
3 *
4 * Score Processor version.
5 *
6 * Copyright (C) 2009 Sunplus Core Technology Co., Ltd.
7 * Chen Liqin <liqin.chen@sunplusct.com>
8 * Lennox Wu <lennox.wu@sunplusct.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, see the file COPYING, or write
22 * to the Free Software Foundation, Inc.,
23 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 */
25
26#include <linux/interrupt.h>
27#include <linux/kernel_stat.h>
28#include <linux/seq_file.h>
29
30#include <asm/io.h>
31
32/* the interrupt controller is hardcoded at this address */
33#define SCORE_PIC ((u32 __iomem __force *)0x95F50000)
34
35#define INT_PNDL 0
36#define INT_PNDH 1
37#define INT_PRIORITY_M 2
38#define INT_PRIORITY_SG0 4
39#define INT_PRIORITY_SG1 5
40#define INT_PRIORITY_SG2 6
41#define INT_PRIORITY_SG3 7
42#define INT_MASKL 8
43#define INT_MASKH 9
44
45/*
46 * handles all normal device IRQs
47 */
48asmlinkage void do_IRQ(int irq)
49{
50 irq_enter();
51 generic_handle_irq(irq);
52 irq_exit();
53}
54
55static void score_mask(unsigned int irq_nr)
56{
57 unsigned int irq_source = 63 - irq_nr;
58
59 if (irq_source < 32)
60 __raw_writel((__raw_readl(SCORE_PIC + INT_MASKL) | \
61 (1 << irq_source)), SCORE_PIC + INT_MASKL);
62 else
63 __raw_writel((__raw_readl(SCORE_PIC + INT_MASKH) | \
64 (1 << (irq_source - 32))), SCORE_PIC + INT_MASKH);
65}
66
67static void score_unmask(unsigned int irq_nr)
68{
69 unsigned int irq_source = 63 - irq_nr;
70
71 if (irq_source < 32)
72 __raw_writel((__raw_readl(SCORE_PIC + INT_MASKL) & \
73 ~(1 << irq_source)), SCORE_PIC + INT_MASKL);
74 else
75 __raw_writel((__raw_readl(SCORE_PIC + INT_MASKH) & \
76 ~(1 << (irq_source - 32))), SCORE_PIC + INT_MASKH);
77}
78
79struct irq_chip score_irq_chip = {
80 .name = "Score7-level",
81 .mask = score_mask,
82 .mask_ack = score_mask,
83 .unmask = score_unmask,
84};
85
86/*
87 * initialise the interrupt system
88 */
89void __init init_IRQ(void)
90{
91 int index;
92 unsigned long target_addr;
93
94 for (index = 0; index < NR_IRQS; ++index)
95 set_irq_chip_and_handler(index, &score_irq_chip,
96 handle_level_irq);
97
98 for (target_addr = IRQ_VECTOR_BASE_ADDR;
99 target_addr <= IRQ_VECTOR_END_ADDR;
100 target_addr += IRQ_VECTOR_SIZE)
101 memcpy((void *)target_addr, \
102 interrupt_exception_vector, IRQ_VECTOR_SIZE);
103
104 __raw_writel(0xffffffff, SCORE_PIC + INT_MASKL);
105 __raw_writel(0xffffffff, SCORE_PIC + INT_MASKH);
106
107 __asm__ __volatile__(
108 "mtcr %0, cr3\n\t"
109 : : "r" (EXCEPTION_VECTOR_BASE_ADDR | \
110 VECTOR_ADDRESS_OFFSET_MODE16));
111}
112
113/*
114 * Generic, controller-independent functions:
115 */
116int show_interrupts(struct seq_file *p, void *v)
117{
118 int i = *(loff_t *)v, cpu;
119 struct irqaction *action;
120 unsigned long flags;
121
122 if (i == 0) {
123 seq_puts(p, " ");
124 for_each_online_cpu(cpu)
125 seq_printf(p, "CPU%d ", cpu);
126 seq_putc(p, '\n');
127 }
128
129 if (i < NR_IRQS) {
130 spin_lock_irqsave(&irq_desc[i].lock, flags);
131 action = irq_desc[i].action;
132 if (!action)
133 goto unlock;
134
135 seq_printf(p, "%3d: ", i);
136 seq_printf(p, "%10u ", kstat_irqs(i));
137 seq_printf(p, " %8s", irq_desc[i].chip->name ? : "-");
138 seq_printf(p, " %s", action->name);
139 for (action = action->next; action; action = action->next)
140 seq_printf(p, ", %s", action->name);
141
142 seq_putc(p, '\n');
143unlock:
144 spin_unlock_irqrestore(&irq_desc[i].lock, flags);
145 }
146
147 return 0;
148}
diff --git a/arch/score/kernel/module.c b/arch/score/kernel/module.c
new file mode 100644
index 000000000000..4de8d47becd3
--- /dev/null
+++ b/arch/score/kernel/module.c
@@ -0,0 +1,165 @@
1/*
2 * arch/score/kernel/module.c
3 *
4 * Score Processor version.
5 *
6 * Copyright (C) 2009 Sunplus Core Technology Co., Ltd.
7 * Chen Liqin <liqin.chen@sunplusct.com>
8 * Lennox Wu <lennox.wu@sunplusct.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, see the file COPYING, or write
22 * to the Free Software Foundation, Inc.,
23 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 */
25
26#include <linux/moduleloader.h>
27#include <linux/module.h>
28#include <linux/vmalloc.h>
29
30void *module_alloc(unsigned long size)
31{
32 return size ? vmalloc(size) : NULL;
33}
34
35/* Free memory returned from module_alloc */
36void module_free(struct module *mod, void *module_region)
37{
38 vfree(module_region);
39}
40
41int module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs,
42 char *secstrings, struct module *mod)
43{
44 return 0;
45}
46
47int apply_relocate(Elf_Shdr *sechdrs, const char *strtab,
48 unsigned int symindex, unsigned int relindex,
49 struct module *me)
50{
51 Elf32_Shdr *symsec = sechdrs + symindex;
52 Elf32_Shdr *relsec = sechdrs + relindex;
53 Elf32_Shdr *dstsec = sechdrs + relsec->sh_info;
54 Elf32_Rel *rel = (void *)relsec->sh_addr;
55 unsigned int i;
56
57 for (i = 0; i < relsec->sh_size / sizeof(Elf32_Rel); i++, rel++) {
58 unsigned long loc;
59 Elf32_Sym *sym;
60 s32 r_offset;
61
62 r_offset = ELF32_R_SYM(rel->r_info);
63 if ((r_offset < 0) ||
64 (r_offset > (symsec->sh_size / sizeof(Elf32_Sym)))) {
65 printk(KERN_ERR "%s: bad relocation, section %d reloc %d\n",
66 me->name, relindex, i);
67 return -ENOEXEC;
68 }
69
70 sym = ((Elf32_Sym *)symsec->sh_addr) + r_offset;
71
72 if ((rel->r_offset < 0) ||
73 (rel->r_offset > dstsec->sh_size - sizeof(u32))) {
74 printk(KERN_ERR "%s: out of bounds relocation, "
75 "section %d reloc %d offset %d size %d\n",
76 me->name, relindex, i, rel->r_offset,
77 dstsec->sh_size);
78 return -ENOEXEC;
79 }
80
81 loc = dstsec->sh_addr + rel->r_offset;
82 switch (ELF32_R_TYPE(rel->r_info)) {
83 case R_SCORE_NONE:
84 break;
85 case R_SCORE_ABS32:
86 *(unsigned long *)loc += sym->st_value;
87 break;
88 case R_SCORE_HI16:
89 break;
90 case R_SCORE_LO16: {
91 unsigned long hi16_offset, offset;
92 unsigned long uvalue;
93 unsigned long temp, temp_hi;
94 temp_hi = *((unsigned long *)loc - 1);
95 temp = *(unsigned long *)loc;
96
97 hi16_offset = (((((temp_hi) >> 16) & 0x3) << 15) |
98 ((temp_hi) & 0x7fff)) >> 1;
99 offset = ((temp >> 16 & 0x03) << 15) |
100 ((temp & 0x7fff) >> 1);
101 offset = (hi16_offset << 16) | (offset & 0xffff);
102 uvalue = sym->st_value + offset;
103 hi16_offset = (uvalue >> 16) << 1;
104
105 temp_hi = ((temp_hi) & (~(0x37fff))) |
106 (hi16_offset & 0x7fff) |
107 ((hi16_offset << 1) & 0x30000);
108 *((unsigned long *)loc - 1) = temp_hi;
109
110 offset = (uvalue & 0xffff) << 1;
111 temp = (temp & (~(0x37fff))) | (offset & 0x7fff) |
112 ((offset << 1) & 0x30000);
113 *(unsigned long *)loc = temp;
114 break;
115 }
116 case R_SCORE_24: {
117 unsigned long hi16_offset, offset;
118 unsigned long uvalue;
119 unsigned long temp;
120
121 temp = *(unsigned long *)loc;
122 offset = (temp & 0x03FF7FFE);
123 hi16_offset = (offset & 0xFFFF0000);
124 offset = (hi16_offset | ((offset & 0xFFFF) << 1)) >> 2;
125
126 uvalue = (sym->st_value + offset) >> 1;
127 uvalue = uvalue & 0x00ffffff;
128
129 temp = (temp & 0xfc008001) |
130 ((uvalue << 2) & 0x3ff0000) |
131 ((uvalue & 0x3fff) << 1);
132 *(unsigned long *)loc = temp;
133 break;
134 }
135 default:
136 printk(KERN_ERR "%s: unknown relocation: %u\n",
137 me->name, ELF32_R_TYPE(rel->r_info));
138 return -ENOEXEC;
139 }
140 }
141
142 return 0;
143}
144
145int apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab,
146 unsigned int symindex, unsigned int relsec,
147 struct module *me)
148{
149 return 0;
150}
151
152/* Given an address, look for it in the module exception tables. */
153const struct exception_table_entry *search_module_dbetables(unsigned long addr)
154{
155 return NULL;
156}
157
158/* Put in dbe list if necessary. */
159int module_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs,
160 struct module *me)
161{
162 return 0;
163}
164
165void module_arch_cleanup(struct module *mod) {}
diff --git a/arch/score/kernel/process.c b/arch/score/kernel/process.c
new file mode 100644
index 000000000000..25d08030a883
--- /dev/null
+++ b/arch/score/kernel/process.c
@@ -0,0 +1,168 @@
1/*
2 * arch/score/kernel/process.c
3 *
4 * Score Processor version.
5 *
6 * Copyright (C) 2009 Sunplus Core Technology Co., Ltd.
7 * Chen Liqin <liqin.chen@sunplusct.com>
8 * Lennox Wu <lennox.wu@sunplusct.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, see the file COPYING, or write
22 * to the Free Software Foundation, Inc.,
23 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 */
25
26#include <linux/module.h>
27#include <linux/reboot.h>
28#include <linux/elfcore.h>
29#include <linux/pm.h>
30
31void (*pm_power_off)(void);
32EXPORT_SYMBOL(pm_power_off);
33
34/* If or when software machine-restart is implemented, add code here. */
35void machine_restart(char *command) {}
36
37/* If or when software machine-halt is implemented, add code here. */
38void machine_halt(void) {}
39
40/* If or when software machine-power-off is implemented, add code here. */
41void machine_power_off(void) {}
42
43/*
44 * The idle thread. There's no useful work to be
45 * done, so just try to conserve power and have a
46 * low exit latency (ie sit in a loop waiting for
47 * somebody to say that they'd like to reschedule)
48 */
49void __noreturn cpu_idle(void)
50{
51 /* endless idle loop with no priority at all */
52 while (1) {
53 while (!need_resched())
54 barrier();
55
56 preempt_enable_no_resched();
57 schedule();
58 preempt_disable();
59 }
60}
61
62void ret_from_fork(void);
63
64void start_thread(struct pt_regs *regs, unsigned long pc, unsigned long sp)
65{
66 unsigned long status;
67
68 /* New thread loses kernel privileges. */
69 status = regs->cp0_psr & ~(KU_MASK);
70 status |= KU_USER;
71 regs->cp0_psr = status;
72 regs->cp0_epc = pc;
73 regs->regs[0] = sp;
74}
75
76void exit_thread(void) {}
77
78/*
79 * When a process does an "exec", machine state like FPU and debug
80 * registers need to be reset. This is a hook function for that.
81 * Currently we don't have any such state to reset, so this is empty.
82 */
83void flush_thread(void) {}
84
85/*
86 * set up the kernel stack and exception frames for a new process
87 */
88int copy_thread(unsigned long clone_flags, unsigned long usp,
89 unsigned long unused,
90 struct task_struct *p, struct pt_regs *regs)
91{
92 struct thread_info *ti = task_thread_info(p);
93 struct pt_regs *childregs = task_pt_regs(p);
94
95 p->set_child_tid = NULL;
96 p->clear_child_tid = NULL;
97
98 *childregs = *regs;
99 childregs->regs[7] = 0; /* Clear error flag */
100 childregs->regs[4] = 0; /* Child gets zero as return value */
101 regs->regs[4] = p->pid;
102
103 if (childregs->cp0_psr & 0x8) { /* test kernel fork or user fork */
104 childregs->regs[0] = usp; /* user fork */
105 } else {
106 childregs->regs[28] = (unsigned long) ti; /* kernel fork */
107 childregs->regs[0] = (unsigned long) childregs;
108 }
109
110 p->thread.reg0 = (unsigned long) childregs;
111 p->thread.reg3 = (unsigned long) ret_from_fork;
112 p->thread.cp0_psr = 0;
113
114 return 0;
115}
116
117/* Fill in the fpu structure for a core dump. */
118int dump_fpu(struct pt_regs *regs, elf_fpregset_t *r)
119{
120 return 1;
121}
122
123static void __noreturn
124kernel_thread_helper(void *unused0, int (*fn)(void *),
125 void *arg, void *unused1)
126{
127 do_exit(fn(arg));
128}
129
130/*
131 * Create a kernel thread.
132 */
133long kernel_thread(int (*fn)(void *), void *arg, unsigned long flags)
134{
135 struct pt_regs regs;
136
137 memset(&regs, 0, sizeof(regs));
138
139 regs.regs[6] = (unsigned long) arg;
140 regs.regs[5] = (unsigned long) fn;
141 regs.cp0_epc = (unsigned long) kernel_thread_helper;
142 regs.cp0_psr = (regs.cp0_psr & ~(0x1|0x4|0x8)) | \
143 ((regs.cp0_psr & 0x3) << 2);
144
145 return do_fork(flags | CLONE_VM | CLONE_UNTRACED, \
146 0, &regs, 0, NULL, NULL);
147}
148
149unsigned long thread_saved_pc(struct task_struct *tsk)
150{
151 return task_pt_regs(tsk)->cp0_epc;
152}
153
154unsigned long get_wchan(struct task_struct *task)
155{
156 if (!task || task == current || task->state == TASK_RUNNING)
157 return 0;
158
159 if (!task_stack_page(task))
160 return 0;
161
162 return task_pt_regs(task)->cp0_epc;
163}
164
165unsigned long arch_align_stack(unsigned long sp)
166{
167 return sp;
168}
diff --git a/arch/score/kernel/ptrace.c b/arch/score/kernel/ptrace.c
new file mode 100644
index 000000000000..174c6422b096
--- /dev/null
+++ b/arch/score/kernel/ptrace.c
@@ -0,0 +1,382 @@
1/*
2 * arch/score/kernel/ptrace.c
3 *
4 * Score Processor version.
5 *
6 * Copyright (C) 2009 Sunplus Core Technology Co., Ltd.
7 * Chen Liqin <liqin.chen@sunplusct.com>
8 * Lennox Wu <lennox.wu@sunplusct.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, see the file COPYING, or write
22 * to the Free Software Foundation, Inc.,
23 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 */
25
26#include <linux/elf.h>
27#include <linux/kernel.h>
28#include <linux/mm.h>
29#include <linux/ptrace.h>
30#include <linux/regset.h>
31
32#include <asm/uaccess.h>
33
34/*
35 * retrieve the contents of SCORE userspace general registers
36 */
37static int genregs_get(struct task_struct *target,
38 const struct user_regset *regset,
39 unsigned int pos, unsigned int count,
40 void *kbuf, void __user *ubuf)
41{
42 const struct pt_regs *regs = task_pt_regs(target);
43 int ret;
44
45 /* skip 9 * sizeof(unsigned long) not use for pt_regs */
46 ret = user_regset_copyout_zero(&pos, &count, &kbuf, &ubuf,
47 0, offsetof(struct pt_regs, regs));
48
49 /* r0 - r31, cel, ceh, sr0, sr1, sr2, epc, ema, psr, ecr, condition */
50 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf,
51 regs->regs,
52 offsetof(struct pt_regs, regs),
53 offsetof(struct pt_regs, cp0_condition));
54
55 if (!ret)
56 ret = user_regset_copyout_zero(&pos, &count, &kbuf, &ubuf,
57 sizeof(struct pt_regs), -1);
58
59 return ret;
60}
61
62/*
63 * update the contents of the SCORE userspace general registers
64 */
65static int genregs_set(struct task_struct *target,
66 const struct user_regset *regset,
67 unsigned int pos, unsigned int count,
68 const void *kbuf, const void __user *ubuf)
69{
70 struct pt_regs *regs = task_pt_regs(target);
71 int ret;
72
73 /* skip 9 * sizeof(unsigned long) */
74 ret = user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf,
75 0, offsetof(struct pt_regs, regs));
76
77 /* r0 - r31, cel, ceh, sr0, sr1, sr2, epc, ema, psr, ecr, condition */
78 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf,
79 regs->regs,
80 offsetof(struct pt_regs, regs),
81 offsetof(struct pt_regs, cp0_condition));
82
83 if (!ret)
84 ret = user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf,
85 sizeof(struct pt_regs), -1);
86
87 return ret;
88}
89
90/*
91 * Define the register sets available on the score7 under Linux
92 */
93enum score7_regset {
94 REGSET_GENERAL,
95};
96
97static const struct user_regset score7_regsets[] = {
98 [REGSET_GENERAL] = {
99 .core_note_type = NT_PRSTATUS,
100 .n = ELF_NGREG,
101 .size = sizeof(long),
102 .align = sizeof(long),
103 .get = genregs_get,
104 .set = genregs_set,
105 },
106};
107
108static const struct user_regset_view user_score_native_view = {
109 .name = "score7",
110 .e_machine = EM_SCORE7,
111 .regsets = score7_regsets,
112 .n = ARRAY_SIZE(score7_regsets),
113};
114
115const struct user_regset_view *task_user_regset_view(struct task_struct *task)
116{
117 return &user_score_native_view;
118}
119
120static int is_16bitinsn(unsigned long insn)
121{
122 if ((insn & INSN32_MASK) == INSN32_MASK)
123 return 0;
124 else
125 return 1;
126}
127
128int
129read_tsk_long(struct task_struct *child,
130 unsigned long addr, unsigned long *res)
131{
132 int copied;
133
134 copied = access_process_vm(child, addr, res, sizeof(*res), 0);
135
136 return copied != sizeof(*res) ? -EIO : 0;
137}
138
139int
140read_tsk_short(struct task_struct *child,
141 unsigned long addr, unsigned short *res)
142{
143 int copied;
144
145 copied = access_process_vm(child, addr, res, sizeof(*res), 0);
146
147 return copied != sizeof(*res) ? -EIO : 0;
148}
149
150static int
151write_tsk_short(struct task_struct *child,
152 unsigned long addr, unsigned short val)
153{
154 int copied;
155
156 copied = access_process_vm(child, addr, &val, sizeof(val), 1);
157
158 return copied != sizeof(val) ? -EIO : 0;
159}
160
161static int
162write_tsk_long(struct task_struct *child,
163 unsigned long addr, unsigned long val)
164{
165 int copied;
166
167 copied = access_process_vm(child, addr, &val, sizeof(val), 1);
168
169 return copied != sizeof(val) ? -EIO : 0;
170}
171
172void user_enable_single_step(struct task_struct *child)
173{
174 /* far_epc is the target of branch */
175 unsigned int epc, far_epc = 0;
176 unsigned long epc_insn, far_epc_insn;
177 int ninsn_type; /* next insn type 0=16b, 1=32b */
178 unsigned int tmp, tmp2;
179 struct pt_regs *regs = task_pt_regs(child);
180 child->thread.single_step = 1;
181 child->thread.ss_nextcnt = 1;
182 epc = regs->cp0_epc;
183
184 read_tsk_long(child, epc, &epc_insn);
185
186 if (is_16bitinsn(epc_insn)) {
187 if ((epc_insn & J16M) == J16) {
188 tmp = epc_insn & 0xFFE;
189 epc = (epc & 0xFFFFF000) | tmp;
190 } else if ((epc_insn & B16M) == B16) {
191 child->thread.ss_nextcnt = 2;
192 tmp = (epc_insn & 0xFF) << 1;
193 tmp = tmp << 23;
194 tmp = (unsigned int)((int) tmp >> 23);
195 far_epc = epc + tmp;
196 epc += 2;
197 } else if ((epc_insn & BR16M) == BR16) {
198 child->thread.ss_nextcnt = 2;
199 tmp = (epc_insn >> 4) & 0xF;
200 far_epc = regs->regs[tmp];
201 epc += 2;
202 } else
203 epc += 2;
204 } else {
205 if ((epc_insn & J32M) == J32) {
206 tmp = epc_insn & 0x03FFFFFE;
207 tmp2 = tmp & 0x7FFF;
208 tmp = (((tmp >> 16) & 0x3FF) << 15) | tmp2;
209 epc = (epc & 0xFFC00000) | tmp;
210 } else if ((epc_insn & B32M) == B32) {
211 child->thread.ss_nextcnt = 2;
212 tmp = epc_insn & 0x03FFFFFE; /* discard LK bit */
213 tmp2 = tmp & 0x3FF;
214 tmp = (((tmp >> 16) & 0x3FF) << 10) | tmp2; /* 20bit */
215 tmp = tmp << 12;
216 tmp = (unsigned int)((int) tmp >> 12);
217 far_epc = epc + tmp;
218 epc += 4;
219 } else if ((epc_insn & BR32M) == BR32) {
220 child->thread.ss_nextcnt = 2;
221 tmp = (epc_insn >> 16) & 0x1F;
222 far_epc = regs->regs[tmp];
223 epc += 4;
224 } else
225 epc += 4;
226 }
227
228 if (child->thread.ss_nextcnt == 1) {
229 read_tsk_long(child, epc, &epc_insn);
230
231 if (is_16bitinsn(epc_insn)) {
232 write_tsk_short(child, epc, SINGLESTEP16_INSN);
233 ninsn_type = 0;
234 } else {
235 write_tsk_long(child, epc, SINGLESTEP32_INSN);
236 ninsn_type = 1;
237 }
238
239 if (ninsn_type == 0) { /* 16bits */
240 child->thread.insn1_type = 0;
241 child->thread.addr1 = epc;
242 /* the insn may have 32bit data */
243 child->thread.insn1 = (short)epc_insn;
244 } else {
245 child->thread.insn1_type = 1;
246 child->thread.addr1 = epc;
247 child->thread.insn1 = epc_insn;
248 }
249 } else {
250 /* branch! have two target child->thread.ss_nextcnt=2 */
251 read_tsk_long(child, epc, &epc_insn);
252 read_tsk_long(child, far_epc, &far_epc_insn);
253 if (is_16bitinsn(epc_insn)) {
254 write_tsk_short(child, epc, SINGLESTEP16_INSN);
255 ninsn_type = 0;
256 } else {
257 write_tsk_long(child, epc, SINGLESTEP32_INSN);
258 ninsn_type = 1;
259 }
260
261 if (ninsn_type == 0) { /* 16bits */
262 child->thread.insn1_type = 0;
263 child->thread.addr1 = epc;
264 /* the insn may have 32bit data */
265 child->thread.insn1 = (short)epc_insn;
266 } else {
267 child->thread.insn1_type = 1;
268 child->thread.addr1 = epc;
269 child->thread.insn1 = epc_insn;
270 }
271
272 if (is_16bitinsn(far_epc_insn)) {
273 write_tsk_short(child, far_epc, SINGLESTEP16_INSN);
274 ninsn_type = 0;
275 } else {
276 write_tsk_long(child, far_epc, SINGLESTEP32_INSN);
277 ninsn_type = 1;
278 }
279
280 if (ninsn_type == 0) { /* 16bits */
281 child->thread.insn2_type = 0;
282 child->thread.addr2 = far_epc;
283 /* the insn may have 32bit data */
284 child->thread.insn2 = (short)far_epc_insn;
285 } else {
286 child->thread.insn2_type = 1;
287 child->thread.addr2 = far_epc;
288 child->thread.insn2 = far_epc_insn;
289 }
290 }
291}
292
293void user_disable_single_step(struct task_struct *child)
294{
295 if (child->thread.insn1_type == 0)
296 write_tsk_short(child, child->thread.addr1,
297 child->thread.insn1);
298
299 if (child->thread.insn1_type == 1)
300 write_tsk_long(child, child->thread.addr1,
301 child->thread.insn1);
302
303 if (child->thread.ss_nextcnt == 2) { /* branch */
304 if (child->thread.insn1_type == 0)
305 write_tsk_short(child, child->thread.addr1,
306 child->thread.insn1);
307 if (child->thread.insn1_type == 1)
308 write_tsk_long(child, child->thread.addr1,
309 child->thread.insn1);
310 if (child->thread.insn2_type == 0)
311 write_tsk_short(child, child->thread.addr2,
312 child->thread.insn2);
313 if (child->thread.insn2_type == 1)
314 write_tsk_long(child, child->thread.addr2,
315 child->thread.insn2);
316 }
317
318 child->thread.single_step = 0;
319 child->thread.ss_nextcnt = 0;
320}
321
322void ptrace_disable(struct task_struct *child)
323{
324 user_disable_single_step(child);
325}
326
327long
328arch_ptrace(struct task_struct *child, long request, long addr, long data)
329{
330 int ret;
331 unsigned long __user *datap = (void __user *)data;
332
333 switch (request) {
334 case PTRACE_GETREGS:
335 ret = copy_regset_to_user(child, &user_score_native_view,
336 REGSET_GENERAL,
337 0, sizeof(struct pt_regs),
338 (void __user *)datap);
339 break;
340
341 case PTRACE_SETREGS:
342 ret = copy_regset_from_user(child, &user_score_native_view,
343 REGSET_GENERAL,
344 0, sizeof(struct pt_regs),
345 (const void __user *)datap);
346 break;
347
348 default:
349 ret = ptrace_request(child, request, addr, data);
350 break;
351 }
352
353 return ret;
354}
355
356/*
357 * Notification of system call entry/exit
358 * - triggered by current->work.syscall_trace
359 */
360asmlinkage void do_syscall_trace(struct pt_regs *regs, int entryexit)
361{
362 if (!(current->ptrace & PT_PTRACED))
363 return;
364
365 if (!test_thread_flag(TIF_SYSCALL_TRACE))
366 return;
367
368 /* The 0x80 provides a way for the tracing parent to distinguish
369 between a syscall stop and SIGTRAP delivery. */
370 ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) ?
371 0x80 : 0));
372
373 /*
374 * this isn't the same as continuing with a signal, but it will do
375 * for normal use. strace only continues with a signal if the
376 * stopping signal is not SIGTRAP. -brl
377 */
378 if (current->exit_code) {
379 send_sig(current->exit_code, current, 1);
380 current->exit_code = 0;
381 }
382}
diff --git a/arch/score/kernel/setup.c b/arch/score/kernel/setup.c
new file mode 100644
index 000000000000..6a2503c75c4e
--- /dev/null
+++ b/arch/score/kernel/setup.c
@@ -0,0 +1,159 @@
1/*
2 * arch/score/kernel/setup.c
3 *
4 * Score Processor version.
5 *
6 * Copyright (C) 2009 Sunplus Core Technology Co., Ltd.
7 * Chen Liqin <liqin.chen@sunplusct.com>
8 * Lennox Wu <lennox.wu@sunplusct.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, see the file COPYING, or write
22 * to the Free Software Foundation, Inc.,
23 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 */
25
26#include <linux/bootmem.h>
27#include <linux/initrd.h>
28#include <linux/ioport.h>
29#include <linux/mm.h>
30#include <linux/seq_file.h>
31#include <linux/screen_info.h>
32
33#include <asm-generic/sections.h>
34#include <asm/setup.h>
35
36struct screen_info screen_info;
37unsigned long kernelsp;
38
39static char command_line[COMMAND_LINE_SIZE];
40static struct resource code_resource = { .name = "Kernel code",};
41static struct resource data_resource = { .name = "Kernel data",};
42
43static void __init bootmem_init(void)
44{
45 unsigned long start_pfn, bootmap_size;
46 unsigned long size = initrd_end - initrd_start;
47
48 start_pfn = PFN_UP(__pa(&_end));
49
50 min_low_pfn = PFN_UP(MEMORY_START);
51 max_low_pfn = PFN_UP(MEMORY_START + MEMORY_SIZE);
52
53 /* Initialize the boot-time allocator with low memory only. */
54 bootmap_size = init_bootmem_node(NODE_DATA(0), start_pfn,
55 min_low_pfn, max_low_pfn);
56 add_active_range(0, min_low_pfn, max_low_pfn);
57
58 free_bootmem(PFN_PHYS(start_pfn),
59 (max_low_pfn - start_pfn) << PAGE_SHIFT);
60 memory_present(0, start_pfn, max_low_pfn);
61
62 /* Reserve space for the bootmem bitmap. */
63 reserve_bootmem(PFN_PHYS(start_pfn), bootmap_size, BOOTMEM_DEFAULT);
64
65 if (size == 0) {
66 printk(KERN_INFO "Initrd not found or empty");
67 goto disable;
68 }
69
70 if (__pa(initrd_end) > PFN_PHYS(max_low_pfn)) {
71 printk(KERN_ERR "Initrd extends beyond end of memory");
72 goto disable;
73 }
74
75 /* Reserve space for the initrd bitmap. */
76 reserve_bootmem(__pa(initrd_start), size, BOOTMEM_DEFAULT);
77 initrd_below_start_ok = 1;
78
79 pr_info("Initial ramdisk at: 0x%lx (%lu bytes)\n",
80 initrd_start, size);
81 return;
82disable:
83 printk(KERN_CONT " - disabling initrd\n");
84 initrd_start = 0;
85 initrd_end = 0;
86}
87
88static void __init resource_init(void)
89{
90 struct resource *res;
91
92 code_resource.start = __pa(&_text);
93 code_resource.end = __pa(&_etext) - 1;
94 data_resource.start = __pa(&_etext);
95 data_resource.end = __pa(&_edata) - 1;
96
97 res = alloc_bootmem(sizeof(struct resource));
98 res->name = "System RAM";
99 res->start = MEMORY_START;
100 res->end = MEMORY_START + MEMORY_SIZE - 1;
101 res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
102 request_resource(&iomem_resource, res);
103
104 request_resource(res, &code_resource);
105 request_resource(res, &data_resource);
106}
107
108void __init setup_arch(char **cmdline_p)
109{
110 randomize_va_space = 0;
111 *cmdline_p = command_line;
112
113 cpu_cache_init();
114 tlb_init();
115 bootmem_init();
116 paging_init();
117 resource_init();
118}
119
120static int show_cpuinfo(struct seq_file *m, void *v)
121{
122 unsigned long n = (unsigned long) v - 1;
123
124 seq_printf(m, "processor\t\t: %ld\n", n);
125 seq_printf(m, "\n");
126
127 return 0;
128}
129
130static void *c_start(struct seq_file *m, loff_t *pos)
131{
132 unsigned long i = *pos;
133
134 return i < 1 ? (void *) (i + 1) : NULL;
135}
136
137static void *c_next(struct seq_file *m, void *v, loff_t *pos)
138{
139 ++*pos;
140 return c_start(m, pos);
141}
142
143static void c_stop(struct seq_file *m, void *v)
144{
145}
146
147const struct seq_operations cpuinfo_op = {
148 .start = c_start,
149 .next = c_next,
150 .stop = c_stop,
151 .show = show_cpuinfo,
152};
153
154static int __init topology_init(void)
155{
156 return 0;
157}
158
159subsys_initcall(topology_init);
diff --git a/arch/score/kernel/signal.c b/arch/score/kernel/signal.c
new file mode 100644
index 000000000000..aa57440e4973
--- /dev/null
+++ b/arch/score/kernel/signal.c
@@ -0,0 +1,361 @@
1/*
2 * arch/score/kernel/signal.c
3 *
4 * Score Processor version.
5 *
6 * Copyright (C) 2009 Sunplus Core Technology Co., Ltd.
7 * Chen Liqin <liqin.chen@sunplusct.com>
8 * Lennox Wu <lennox.wu@sunplusct.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, see the file COPYING, or write
22 * to the Free Software Foundation, Inc.,
23 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 */
25
26#include <linux/errno.h>
27#include <linux/signal.h>
28#include <linux/ptrace.h>
29#include <linux/unistd.h>
30#include <linux/uaccess.h>
31
32#include <asm/cacheflush.h>
33#include <asm/syscalls.h>
34#include <asm/ucontext.h>
35
36#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
37
38struct rt_sigframe {
39 u32 rs_ass[4]; /* argument save space */
40 u32 rs_code[2]; /* signal trampoline */
41 struct siginfo rs_info;
42 struct ucontext rs_uc;
43};
44
45static int setup_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc)
46{
47 int err = 0;
48 unsigned long reg;
49
50 reg = regs->cp0_epc; err |= __put_user(reg, &sc->sc_pc);
51 err |= __put_user(regs->cp0_psr, &sc->sc_psr);
52 err |= __put_user(regs->cp0_condition, &sc->sc_condition);
53
54
55#define save_gp_reg(i) { \
56 reg = regs->regs[i]; \
57 err |= __put_user(reg, &sc->sc_regs[i]); \
58} while (0)
59 save_gp_reg(0); save_gp_reg(1); save_gp_reg(2);
60 save_gp_reg(3); save_gp_reg(4); save_gp_reg(5);
61 save_gp_reg(6); save_gp_reg(7); save_gp_reg(8);
62 save_gp_reg(9); save_gp_reg(10); save_gp_reg(11);
63 save_gp_reg(12); save_gp_reg(13); save_gp_reg(14);
64 save_gp_reg(15); save_gp_reg(16); save_gp_reg(17);
65 save_gp_reg(18); save_gp_reg(19); save_gp_reg(20);
66 save_gp_reg(21); save_gp_reg(22); save_gp_reg(23);
67 save_gp_reg(24); save_gp_reg(25); save_gp_reg(26);
68 save_gp_reg(27); save_gp_reg(28); save_gp_reg(29);
69#undef save_gp_reg
70
71 reg = regs->ceh; err |= __put_user(reg, &sc->sc_mdceh);
72 reg = regs->cel; err |= __put_user(reg, &sc->sc_mdcel);
73 err |= __put_user(regs->cp0_ecr, &sc->sc_ecr);
74 err |= __put_user(regs->cp0_ema, &sc->sc_ema);
75
76 return err;
77}
78
79static int restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc)
80{
81 int err = 0;
82 u32 reg;
83
84 err |= __get_user(regs->cp0_epc, &sc->sc_pc);
85 err |= __get_user(regs->cp0_condition, &sc->sc_condition);
86
87 err |= __get_user(reg, &sc->sc_mdceh);
88 regs->ceh = (int) reg;
89 err |= __get_user(reg, &sc->sc_mdcel);
90 regs->cel = (int) reg;
91
92 err |= __get_user(reg, &sc->sc_psr);
93 regs->cp0_psr = (int) reg;
94 err |= __get_user(reg, &sc->sc_ecr);
95 regs->cp0_ecr = (int) reg;
96 err |= __get_user(reg, &sc->sc_ema);
97 regs->cp0_ema = (int) reg;
98
99#define restore_gp_reg(i) do { \
100 err |= __get_user(reg, &sc->sc_regs[i]); \
101 regs->regs[i] = reg; \
102} while (0)
103 restore_gp_reg(0); restore_gp_reg(1); restore_gp_reg(2);
104 restore_gp_reg(3); restore_gp_reg(4); restore_gp_reg(5);
105 restore_gp_reg(6); restore_gp_reg(7); restore_gp_reg(8);
106 restore_gp_reg(9); restore_gp_reg(10); restore_gp_reg(11);
107 restore_gp_reg(12); restore_gp_reg(13); restore_gp_reg(14);
108 restore_gp_reg(15); restore_gp_reg(16); restore_gp_reg(17);
109 restore_gp_reg(18); restore_gp_reg(19); restore_gp_reg(20);
110 restore_gp_reg(21); restore_gp_reg(22); restore_gp_reg(23);
111 restore_gp_reg(24); restore_gp_reg(25); restore_gp_reg(26);
112 restore_gp_reg(27); restore_gp_reg(28); restore_gp_reg(29);
113#undef restore_gp_reg
114
115 return err;
116}
117
118/*
119 * Determine which stack to use..
120 */
121static void __user *get_sigframe(struct k_sigaction *ka,
122 struct pt_regs *regs, size_t frame_size)
123{
124 unsigned long sp;
125
126 /* Default to using normal stack */
127 sp = regs->regs[0];
128 sp -= 32;
129
130 /* This is the X/Open sanctioned signal stack switching. */
131 if ((ka->sa.sa_flags & SA_ONSTACK) && (!on_sig_stack(sp)))
132 sp = current->sas_ss_sp + current->sas_ss_size;
133
134 return (void __user*)((sp - frame_size) & ~7);
135}
136
137asmlinkage long
138score_sigaltstack(struct pt_regs *regs)
139{
140 const stack_t __user *uss = (const stack_t __user *) regs->regs[4];
141 stack_t __user *uoss = (stack_t __user *) regs->regs[5];
142 unsigned long usp = regs->regs[0];
143
144 return do_sigaltstack(uss, uoss, usp);
145}
146
147asmlinkage long
148score_rt_sigreturn(struct pt_regs *regs)
149{
150 struct rt_sigframe __user *frame;
151 sigset_t set;
152 stack_t st;
153 int sig;
154
155 frame = (struct rt_sigframe __user *) regs->regs[0];
156 if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
157 goto badframe;
158 if (__copy_from_user(&set, &frame->rs_uc.uc_sigmask, sizeof(set)))
159 goto badframe;
160
161 sigdelsetmask(&set, ~_BLOCKABLE);
162 spin_lock_irq(&current->sighand->siglock);
163 current->blocked = set;
164 recalc_sigpending();
165 spin_unlock_irq(&current->sighand->siglock);
166
167 sig = restore_sigcontext(regs, &frame->rs_uc.uc_mcontext);
168 if (sig < 0)
169 goto badframe;
170 else if (sig)
171 force_sig(sig, current);
172
173 if (__copy_from_user(&st, &frame->rs_uc.uc_stack, sizeof(st)))
174 goto badframe;
175
176 /* It is more difficult to avoid calling this function than to
177 call it and ignore errors. */
178 do_sigaltstack((stack_t __user *)&st, NULL, regs->regs[0]);
179
180 __asm__ __volatile__(
181 "mv\tr0, %0\n\t"
182 "la\tr8, syscall_exit\n\t"
183 "br\tr8\n\t"
184 : : "r" (regs) : "r8");
185
186badframe:
187 force_sig(SIGSEGV, current);
188
189 return 0;
190}
191
192static int setup_rt_frame(struct k_sigaction *ka, struct pt_regs *regs,
193 int signr, sigset_t *set, siginfo_t *info)
194{
195 struct rt_sigframe __user *frame;
196 int err = 0;
197
198 frame = get_sigframe(ka, regs, sizeof(*frame));
199 if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
200 goto give_sigsegv;
201
202 /*
203 * Set up the return code ...
204 *
205 * li v0, __NR_rt_sigreturn
206 * syscall
207 */
208 err |= __put_user(0x87788000 + __NR_rt_sigreturn*2,
209 frame->rs_code + 0);
210 err |= __put_user(0x80008002, frame->rs_code + 1);
211 flush_cache_sigtramp((unsigned long) frame->rs_code);
212
213 err |= copy_siginfo_to_user(&frame->rs_info, info);
214 err |= __put_user(0, &frame->rs_uc.uc_flags);
215 err |= __put_user(NULL, &frame->rs_uc.uc_link);
216 err |= __put_user((void __user *)current->sas_ss_sp,
217 &frame->rs_uc.uc_stack.ss_sp);
218 err |= __put_user(sas_ss_flags(regs->regs[0]),
219 &frame->rs_uc.uc_stack.ss_flags);
220 err |= __put_user(current->sas_ss_size,
221 &frame->rs_uc.uc_stack.ss_size);
222 err |= setup_sigcontext(regs, &frame->rs_uc.uc_mcontext);
223 err |= __copy_to_user(&frame->rs_uc.uc_sigmask, set, sizeof(*set));
224
225 if (err)
226 goto give_sigsegv;
227
228 regs->regs[0] = (unsigned long) frame;
229 regs->regs[3] = (unsigned long) frame->rs_code;
230 regs->regs[4] = signr;
231 regs->regs[5] = (unsigned long) &frame->rs_info;
232 regs->regs[6] = (unsigned long) &frame->rs_uc;
233 regs->regs[29] = (unsigned long) ka->sa.sa_handler;
234 regs->cp0_epc = (unsigned long) ka->sa.sa_handler;
235
236 return 0;
237
238give_sigsegv:
239 if (signr == SIGSEGV)
240 ka->sa.sa_handler = SIG_DFL;
241 force_sig(SIGSEGV, current);
242 return -EFAULT;
243}
244
245static int handle_signal(unsigned long sig, siginfo_t *info,
246 struct k_sigaction *ka, sigset_t *oldset, struct pt_regs *regs)
247{
248 int ret;
249
250 if (regs->is_syscall) {
251 switch (regs->regs[4]) {
252 case ERESTART_RESTARTBLOCK:
253 case ERESTARTNOHAND:
254 regs->regs[4] = EINTR;
255 break;
256 case ERESTARTSYS:
257 if (!(ka->sa.sa_flags & SA_RESTART)) {
258 regs->regs[4] = EINTR;
259 break;
260 }
261 case ERESTARTNOINTR:
262 regs->regs[4] = regs->orig_r4;
263 regs->regs[7] = regs->orig_r7;
264 regs->cp0_epc -= 8;
265 }
266
267 regs->is_syscall = 0;
268 }
269
270 /*
271 * Set up the stack frame
272 */
273 ret = setup_rt_frame(ka, regs, sig, oldset, info);
274
275 spin_lock_irq(&current->sighand->siglock);
276 sigorsets(&current->blocked, &current->blocked, &ka->sa.sa_mask);
277 if (!(ka->sa.sa_flags & SA_NODEFER))
278 sigaddset(&current->blocked, sig);
279 recalc_sigpending();
280 spin_unlock_irq(&current->sighand->siglock);
281
282 return ret;
283}
284
285static void do_signal(struct pt_regs *regs)
286{
287 struct k_sigaction ka;
288 sigset_t *oldset;
289 siginfo_t info;
290 int signr;
291
292 /*
293 * We want the common case to go fast, which is why we may in certain
294 * cases get here from kernel mode. Just return without doing anything
295 * if so.
296 */
297 if (!user_mode(regs))
298 return;
299
300 if (test_thread_flag(TIF_RESTORE_SIGMASK))
301 oldset = &current->saved_sigmask;
302 else
303 oldset = &current->blocked;
304
305 signr = get_signal_to_deliver(&info, &ka, regs, NULL);
306 if (signr > 0) {
307 /* Actually deliver the signal. */
308 if (handle_signal(signr, &info, &ka, oldset, regs) == 0) {
309 /*
310 * A signal was successfully delivered; the saved
311 * sigmask will have been stored in the signal frame,
312 * and will be restored by sigreturn, so we can simply
313 * clear the TIF_RESTORE_SIGMASK flag.
314 */
315 if (test_thread_flag(TIF_RESTORE_SIGMASK))
316 clear_thread_flag(TIF_RESTORE_SIGMASK);
317 }
318
319 return;
320 }
321
322 if (regs->is_syscall) {
323 if (regs->regs[4] == ERESTARTNOHAND ||
324 regs->regs[4] == ERESTARTSYS ||
325 regs->regs[4] == ERESTARTNOINTR) {
326 regs->regs[4] = regs->orig_r4;
327 regs->regs[7] = regs->orig_r7;
328 regs->cp0_epc -= 8;
329 }
330
331 if (regs->regs[4] == ERESTART_RESTARTBLOCK) {
332 regs->regs[27] = __NR_restart_syscall;
333 regs->regs[4] = regs->orig_r4;
334 regs->regs[7] = regs->orig_r7;
335 regs->cp0_epc -= 8;
336 }
337
338 regs->is_syscall = 0; /* Don't deal with this again. */
339 }
340
341 /*
342 * If there's no signal to deliver, we just put the saved sigmask
343 * back
344 */
345 if (test_thread_flag(TIF_RESTORE_SIGMASK)) {
346 clear_thread_flag(TIF_RESTORE_SIGMASK);
347 sigprocmask(SIG_SETMASK, &current->saved_sigmask, NULL);
348 }
349}
350
351/*
352 * notification of userspace execution resumption
353 * - triggered by the TIF_WORK_MASK flags
354 */
355asmlinkage void do_notify_resume(struct pt_regs *regs, void *unused,
356 __u32 thread_info_flags)
357{
358 /* deal with pending signal delivery */
359 if (thread_info_flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK))
360 do_signal(regs);
361}
diff --git a/arch/score/kernel/sys_call_table.c b/arch/score/kernel/sys_call_table.c
new file mode 100644
index 000000000000..287369b88c43
--- /dev/null
+++ b/arch/score/kernel/sys_call_table.c
@@ -0,0 +1,12 @@
1#include <linux/syscalls.h>
2#include <linux/signal.h>
3#include <linux/unistd.h>
4
5#include <asm/syscalls.h>
6
7#undef __SYSCALL
8#define __SYSCALL(nr, call) [nr] = (call),
9
10void *sys_call_table[__NR_syscalls] = {
11#include <asm/unistd.h>
12};
diff --git a/arch/score/kernel/sys_score.c b/arch/score/kernel/sys_score.c
new file mode 100644
index 000000000000..001249469866
--- /dev/null
+++ b/arch/score/kernel/sys_score.c
@@ -0,0 +1,151 @@
1/*
2 * arch/score/kernel/syscall.c
3 *
4 * Score Processor version.
5 *
6 * Copyright (C) 2009 Sunplus Core Technology Co., Ltd.
7 * Chen Liqin <liqin.chen@sunplusct.com>
8 * Lennox Wu <lennox.wu@sunplusct.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, see the file COPYING, or write
22 * to the Free Software Foundation, Inc.,
23 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 */
25
26#include <linux/file.h>
27#include <linux/fs.h>
28#include <linux/mm.h>
29#include <linux/mman.h>
30#include <linux/module.h>
31#include <linux/unistd.h>
32#include <linux/syscalls.h>
33#include <asm/syscalls.h>
34
35asmlinkage long
36sys_mmap2(unsigned long addr, unsigned long len, unsigned long prot,
37 unsigned long flags, unsigned long fd, unsigned long pgoff)
38{
39 int error = -EBADF;
40 struct file *file = NULL;
41
42 if (pgoff & (~PAGE_MASK >> 12))
43 return -EINVAL;
44
45 flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
46 if (!(flags & MAP_ANONYMOUS)) {
47 file = fget(fd);
48 if (!file)
49 return error;
50 }
51
52 down_write(&current->mm->mmap_sem);
53 error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
54 up_write(&current->mm->mmap_sem);
55
56 if (file)
57 fput(file);
58
59 return error;
60}
61
62asmlinkage long
63sys_mmap(unsigned long addr, unsigned long len, unsigned long prot,
64 unsigned long flags, unsigned long fd, off_t pgoff)
65{
66 return sys_mmap2(addr, len, prot, flags, fd, pgoff >> PAGE_SHIFT);
67}
68
69asmlinkage long
70score_fork(struct pt_regs *regs)
71{
72 return do_fork(SIGCHLD, regs->regs[0], regs, 0, NULL, NULL);
73}
74
75/*
76 * Clone a task - this clones the calling program thread.
77 * This is called indirectly via a small wrapper
78 */
79asmlinkage long
80score_clone(struct pt_regs *regs)
81{
82 unsigned long clone_flags;
83 unsigned long newsp;
84 int __user *parent_tidptr, *child_tidptr;
85
86 clone_flags = regs->regs[4];
87 newsp = regs->regs[5];
88 if (!newsp)
89 newsp = regs->regs[0];
90 parent_tidptr = (int __user *)regs->regs[6];
91 child_tidptr = (int __user *)regs->regs[8];
92
93 return do_fork(clone_flags, newsp, regs, 0,
94 parent_tidptr, child_tidptr);
95}
96
97asmlinkage long
98score_vfork(struct pt_regs *regs)
99{
100 return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD,
101 regs->regs[0], regs, 0, NULL, NULL);
102}
103
104/*
105 * sys_execve() executes a new program.
106 * This is called indirectly via a small wrapper
107 */
108asmlinkage long
109score_execve(struct pt_regs *regs)
110{
111 int error;
112 char *filename;
113
114 filename = getname((char __user*)regs->regs[4]);
115 error = PTR_ERR(filename);
116 if (IS_ERR(filename))
117 return error;
118
119 error = do_execve(filename, (char __user *__user*)regs->regs[5],
120 (char __user *__user *) regs->regs[6], regs);
121
122 putname(filename);
123 return error;
124}
125
126/*
127 * Do a system call from kernel instead of calling sys_execve so we
128 * end up with proper pt_regs.
129 */
130int kernel_execve(const char *filename, char *const argv[], char *const envp[])
131{
132 register unsigned long __r4 asm("r4") = (unsigned long) filename;
133 register unsigned long __r5 asm("r5") = (unsigned long) argv;
134 register unsigned long __r6 asm("r6") = (unsigned long) envp;
135 register unsigned long __r7 asm("r7");
136
137 __asm__ __volatile__ (" \n"
138 "ldi r27, %5 \n"
139 "syscall \n"
140 "mv %0, r4 \n"
141 "mv %1, r7 \n"
142 : "=&r" (__r4), "=r" (__r7)
143 : "r" (__r4), "r" (__r5), "r" (__r6), "i" (__NR_execve)
144 : "r8", "r9", "r10", "r11", "r22", "r23", "r24", "r25",
145 "r26", "r27", "memory");
146
147 if (__r7 == 0)
148 return __r4;
149
150 return -__r4;
151}
diff --git a/arch/score/kernel/time.c b/arch/score/kernel/time.c
new file mode 100644
index 000000000000..f0a43affb201
--- /dev/null
+++ b/arch/score/kernel/time.c
@@ -0,0 +1,99 @@
1/*
2 * arch/score/kernel/time.c
3 *
4 * Score Processor version.
5 *
6 * Copyright (C) 2009 Sunplus Core Technology Co., Ltd.
7 * Chen Liqin <liqin.chen@sunplusct.com>
8 * Lennox Wu <lennox.wu@sunplusct.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, see the file COPYING, or write
22 * to the Free Software Foundation, Inc.,
23 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 */
25
26#include <linux/clockchips.h>
27#include <linux/interrupt.h>
28
29#include <asm/scoreregs.h>
30
31static irqreturn_t timer_interrupt(int irq, void *dev_id)
32{
33 struct clock_event_device *evdev = dev_id;
34
35 /* clear timer interrupt flag */
36 outl(1, P_TIMER0_CPP_REG);
37 evdev->event_handler(evdev);
38
39 return IRQ_HANDLED;
40}
41
42static struct irqaction timer_irq = {
43 .handler = timer_interrupt,
44 .flags = IRQF_DISABLED | IRQF_TIMER,
45 .name = "timer",
46};
47
48static int score_timer_set_next_event(unsigned long delta,
49 struct clock_event_device *evdev)
50{
51 outl((TMR_M_PERIODIC | TMR_IE_ENABLE), P_TIMER0_CTRL);
52 outl(delta, P_TIMER0_PRELOAD);
53 outl(inl(P_TIMER0_CTRL) | TMR_ENABLE, P_TIMER0_CTRL);
54
55 return 0;
56}
57
58static void score_timer_set_mode(enum clock_event_mode mode,
59 struct clock_event_device *evdev)
60{
61 switch (mode) {
62 case CLOCK_EVT_MODE_PERIODIC:
63 outl((TMR_M_PERIODIC | TMR_IE_ENABLE), P_TIMER0_CTRL);
64 outl(SYSTEM_CLOCK/HZ, P_TIMER0_PRELOAD);
65 outl(inl(P_TIMER0_CTRL) | TMR_ENABLE, P_TIMER0_CTRL);
66 break;
67 case CLOCK_EVT_MODE_ONESHOT:
68 case CLOCK_EVT_MODE_SHUTDOWN:
69 case CLOCK_EVT_MODE_RESUME:
70 case CLOCK_EVT_MODE_UNUSED:
71 break;
72 default:
73 BUG();
74 }
75}
76
77static struct clock_event_device score_clockevent = {
78 .name = "score_clockevent",
79 .features = CLOCK_EVT_FEAT_PERIODIC,
80 .shift = 16,
81 .set_next_event = score_timer_set_next_event,
82 .set_mode = score_timer_set_mode,
83};
84
85void __init time_init(void)
86{
87 timer_irq.dev_id = &score_clockevent;
88 setup_irq(IRQ_TIMER , &timer_irq);
89
90 /* setup COMPARE clockevent */
91 score_clockevent.mult = div_sc(SYSTEM_CLOCK, NSEC_PER_SEC,
92 score_clockevent.shift);
93 score_clockevent.max_delta_ns = clockevent_delta2ns((u32)~0,
94 &score_clockevent);
95 score_clockevent.min_delta_ns = clockevent_delta2ns(50,
96 &score_clockevent) + 1;
97 score_clockevent.cpumask = cpumask_of(0);
98 clockevents_register_device(&score_clockevent);
99}
diff --git a/arch/score/kernel/traps.c b/arch/score/kernel/traps.c
new file mode 100644
index 000000000000..0e46fb19a848
--- /dev/null
+++ b/arch/score/kernel/traps.c
@@ -0,0 +1,349 @@
1/*
2 * arch/score/kernel/traps.c
3 *
4 * Score Processor version.
5 *
6 * Copyright (C) 2009 Sunplus Core Technology Co., Ltd.
7 * Chen Liqin <liqin.chen@sunplusct.com>
8 * Lennox Wu <lennox.wu@sunplusct.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, see the file COPYING, or write
22 * to the Free Software Foundation, Inc.,
23 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 */
25
26#include <linux/module.h>
27#include <linux/sched.h>
28
29#include <asm/cacheflush.h>
30#include <asm/irq.h>
31#include <asm/irq_regs.h>
32
33unsigned long exception_handlers[32];
34
35/*
36 * The architecture-independent show_stack generator
37 */
38void show_stack(struct task_struct *task, unsigned long *sp)
39{
40 int i;
41 long stackdata;
42
43 sp = sp ? sp : (unsigned long *)&sp;
44
45 printk(KERN_NOTICE "Stack: ");
46 i = 1;
47 while ((long) sp & (PAGE_SIZE - 1)) {
48 if (i && ((i % 8) == 0))
49 printk(KERN_NOTICE "\n");
50 if (i > 40) {
51 printk(KERN_NOTICE " ...");
52 break;
53 }
54
55 if (__get_user(stackdata, sp++)) {
56 printk(KERN_NOTICE " (Bad stack address)");
57 break;
58 }
59
60 printk(KERN_NOTICE " %08lx", stackdata);
61 i++;
62 }
63 printk(KERN_NOTICE "\n");
64}
65
66static void show_trace(long *sp)
67{
68 int i;
69 long addr;
70
71 sp = sp ? sp : (long *) &sp;
72
73 printk(KERN_NOTICE "Call Trace: ");
74 i = 1;
75 while ((long) sp & (PAGE_SIZE - 1)) {
76 if (__get_user(addr, sp++)) {
77 if (i && ((i % 6) == 0))
78 printk(KERN_NOTICE "\n");
79 printk(KERN_NOTICE " (Bad stack address)\n");
80 break;
81 }
82
83 if (kernel_text_address(addr)) {
84 if (i && ((i % 6) == 0))
85 printk(KERN_NOTICE "\n");
86 if (i > 40) {
87 printk(KERN_NOTICE " ...");
88 break;
89 }
90
91 printk(KERN_NOTICE " [<%08lx>]", addr);
92 i++;
93 }
94 }
95 printk(KERN_NOTICE "\n");
96}
97
98static void show_code(unsigned int *pc)
99{
100 long i;
101
102 printk(KERN_NOTICE "\nCode:");
103
104 for (i = -3; i < 6; i++) {
105 unsigned long insn;
106 if (__get_user(insn, pc + i)) {
107 printk(KERN_NOTICE " (Bad address in epc)\n");
108 break;
109 }
110 printk(KERN_NOTICE "%c%08lx%c", (i ? ' ' : '<'),
111 insn, (i ? ' ' : '>'));
112 }
113}
114
115/*
116 * FIXME: really the generic show_regs should take a const pointer argument.
117 */
118void show_regs(struct pt_regs *regs)
119{
120 printk("r0 : %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
121 regs->regs[0], regs->regs[1], regs->regs[2], regs->regs[3],
122 regs->regs[4], regs->regs[5], regs->regs[6], regs->regs[7]);
123 printk("r8 : %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
124 regs->regs[8], regs->regs[9], regs->regs[10], regs->regs[11],
125 regs->regs[12], regs->regs[13], regs->regs[14], regs->regs[15]);
126 printk("r16: %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
127 regs->regs[16], regs->regs[17], regs->regs[18], regs->regs[19],
128 regs->regs[20], regs->regs[21], regs->regs[22], regs->regs[23]);
129 printk("r24: %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
130 regs->regs[24], regs->regs[25], regs->regs[26], regs->regs[27],
131 regs->regs[28], regs->regs[29], regs->regs[30], regs->regs[31]);
132
133 printk("CEH : %08lx\n", regs->ceh);
134 printk("CEL : %08lx\n", regs->cel);
135
136 printk("EMA:%08lx, epc:%08lx %s\nPSR: %08lx\nECR:%08lx\nCondition : %08lx\n",
137 regs->cp0_ema, regs->cp0_epc, print_tainted(), regs->cp0_psr,
138 regs->cp0_ecr, regs->cp0_condition);
139}
140
141static void show_registers(struct pt_regs *regs)
142{
143 show_regs(regs);
144 printk(KERN_NOTICE "Process %s (pid: %d, stackpage=%08lx)\n",
145 current->comm, current->pid, (unsigned long) current);
146 show_stack(current_thread_info()->task, (long *) regs->regs[0]);
147 show_trace((long *) regs->regs[0]);
148 show_code((unsigned int *) regs->cp0_epc);
149 printk(KERN_NOTICE "\n");
150}
151
152/*
153 * The architecture-independent dump_stack generator
154 */
155void dump_stack(void)
156{
157 show_stack(current_thread_info()->task,
158 (long *) get_irq_regs()->regs[0]);
159}
160EXPORT_SYMBOL(dump_stack);
161
162void __die(const char *str, struct pt_regs *regs, const char *file,
163 const char *func, unsigned long line)
164{
165 console_verbose();
166 printk("%s", str);
167 if (file && func)
168 printk(" in %s:%s, line %ld", file, func, line);
169 printk(":\n");
170 show_registers(regs);
171 do_exit(SIGSEGV);
172}
173
174void __die_if_kernel(const char *str, struct pt_regs *regs,
175 const char *file, const char *func, unsigned long line)
176{
177 if (!user_mode(regs))
178 __die(str, regs, file, func, line);
179}
180
181asmlinkage void do_adelinsn(struct pt_regs *regs)
182{
183 printk("do_ADE-linsn:ema:0x%08lx:epc:0x%08lx\n",
184 regs->cp0_ema, regs->cp0_epc);
185 die_if_kernel("do_ade execution Exception\n", regs);
186 force_sig(SIGBUS, current);
187}
188
189asmlinkage void do_adedata(struct pt_regs *regs)
190{
191 const struct exception_table_entry *fixup;
192 fixup = search_exception_tables(regs->cp0_epc);
193 if (fixup) {
194 regs->cp0_epc = fixup->fixup;
195 return;
196 }
197 printk("do_ADE-data:ema:0x%08lx:epc:0x%08lx\n",
198 regs->cp0_ema, regs->cp0_epc);
199 die_if_kernel("do_ade execution Exception\n", regs);
200 force_sig(SIGBUS, current);
201}
202
203asmlinkage void do_pel(struct pt_regs *regs)
204{
205 die_if_kernel("do_pel execution Exception", regs);
206 force_sig(SIGFPE, current);
207}
208
209asmlinkage void do_cee(struct pt_regs *regs)
210{
211 die_if_kernel("do_cee execution Exception", regs);
212 force_sig(SIGFPE, current);
213}
214
215asmlinkage void do_cpe(struct pt_regs *regs)
216{
217 die_if_kernel("do_cpe execution Exception", regs);
218 force_sig(SIGFPE, current);
219}
220
221asmlinkage void do_be(struct pt_regs *regs)
222{
223 die_if_kernel("do_be execution Exception", regs);
224 force_sig(SIGBUS, current);
225}
226
227asmlinkage void do_ov(struct pt_regs *regs)
228{
229 siginfo_t info;
230
231 die_if_kernel("do_ov execution Exception", regs);
232
233 info.si_code = FPE_INTOVF;
234 info.si_signo = SIGFPE;
235 info.si_errno = 0;
236 info.si_addr = (void *)regs->cp0_epc;
237 force_sig_info(SIGFPE, &info, current);
238}
239
240asmlinkage void do_tr(struct pt_regs *regs)
241{
242 die_if_kernel("do_tr execution Exception", regs);
243 force_sig(SIGTRAP, current);
244}
245
246asmlinkage void do_ri(struct pt_regs *regs)
247{
248 unsigned long epc_insn;
249 unsigned long epc = regs->cp0_epc;
250
251 read_tsk_long(current, epc, &epc_insn);
252 if (current->thread.single_step == 1) {
253 if ((epc == current->thread.addr1) ||
254 (epc == current->thread.addr2)) {
255 user_disable_single_step(current);
256 force_sig(SIGTRAP, current);
257 return;
258 } else
259 BUG();
260 } else if ((epc_insn == BREAKPOINT32_INSN) ||
261 ((epc_insn & 0x0000FFFF) == 0x7002) ||
262 ((epc_insn & 0xFFFF0000) == 0x70020000)) {
263 force_sig(SIGTRAP, current);
264 return;
265 } else {
266 die_if_kernel("do_ri execution Exception", regs);
267 force_sig(SIGILL, current);
268 }
269}
270
271asmlinkage void do_ccu(struct pt_regs *regs)
272{
273 die_if_kernel("do_ccu execution Exception", regs);
274 force_sig(SIGILL, current);
275}
276
277asmlinkage void do_reserved(struct pt_regs *regs)
278{
279 /*
280 * Game over - no way to handle this if it ever occurs. Most probably
281 * caused by a new unknown cpu type or after another deadly
282 * hard/software error.
283 */
284 die_if_kernel("do_reserved execution Exception", regs);
285 show_regs(regs);
286 panic("Caught reserved exception - should not happen.");
287}
288
289/*
290 * NMI exception handler.
291 */
292void nmi_exception_handler(struct pt_regs *regs)
293{
294 die_if_kernel("nmi_exception_handler execution Exception", regs);
295 die("NMI", regs);
296}
297
298/* Install CPU exception handler */
299void *set_except_vector(int n, void *addr)
300{
301 unsigned long handler = (unsigned long) addr;
302 unsigned long old_handler = exception_handlers[n];
303
304 exception_handlers[n] = handler;
305 return (void *)old_handler;
306}
307
308void __init trap_init(void)
309{
310 int i;
311
312 pgd_current = (unsigned long)init_mm.pgd;
313 /* DEBUG EXCEPTION */
314 memcpy((void *)DEBUG_VECTOR_BASE_ADDR,
315 &debug_exception_vector, DEBUG_VECTOR_SIZE);
316 /* NMI EXCEPTION */
317 memcpy((void *)GENERAL_VECTOR_BASE_ADDR,
318 &general_exception_vector, GENERAL_VECTOR_SIZE);
319
320 /*
321 * Initialise exception handlers
322 */
323 for (i = 0; i <= 31; i++)
324 set_except_vector(i, handle_reserved);
325
326 set_except_vector(1, handle_nmi);
327 set_except_vector(2, handle_adelinsn);
328 set_except_vector(3, handle_tlb_refill);
329 set_except_vector(4, handle_tlb_invaild);
330 set_except_vector(5, handle_ibe);
331 set_except_vector(6, handle_pel);
332 set_except_vector(7, handle_sys);
333 set_except_vector(8, handle_ccu);
334 set_except_vector(9, handle_ri);
335 set_except_vector(10, handle_tr);
336 set_except_vector(11, handle_adedata);
337 set_except_vector(12, handle_adedata);
338 set_except_vector(13, handle_tlb_refill);
339 set_except_vector(14, handle_tlb_invaild);
340 set_except_vector(15, handle_mod);
341 set_except_vector(16, handle_cee);
342 set_except_vector(17, handle_cpe);
343 set_except_vector(18, handle_dbe);
344 flush_icache_range(DEBUG_VECTOR_BASE_ADDR, IRQ_VECTOR_BASE_ADDR);
345
346 atomic_inc(&init_mm.mm_count);
347 current->active_mm = &init_mm;
348 cpu_cache_init();
349}
diff --git a/arch/score/kernel/vmlinux.lds.S b/arch/score/kernel/vmlinux.lds.S
new file mode 100644
index 000000000000..eebcbaa4e978
--- /dev/null
+++ b/arch/score/kernel/vmlinux.lds.S
@@ -0,0 +1,89 @@
1/*
2 * arch/score/kernel/vmlinux.lds.S
3 *
4 * Score Processor version.
5 *
6 * Copyright (C) 2009 Sunplus Core Technology Co., Ltd.
7 * Chen Liqin <liqin.chen@sunplusct.com>
8 * Lennox Wu <lennox.wu@sunplusct.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, see the file COPYING, or write
22 * to the Free Software Foundation, Inc.,
23 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 */
25
26#include <asm-generic/vmlinux.lds.h>
27#include <asm/thread_info.h>
28#include <asm/page.h>
29
30OUTPUT_ARCH(score)
31ENTRY(_stext)
32
33jiffies = jiffies_64;
34
35SECTIONS
36{
37 . = CONFIG_MEMORY_START + 0x2000;
38 /* read-only */
39 .text : {
40 _text = .; /* Text and read-only data */
41 TEXT_TEXT
42 SCHED_TEXT
43 LOCK_TEXT
44 KPROBES_TEXT
45 *(.text.*)
46 *(.fixup)
47 . = ALIGN (4) ;
48 _etext = .; /* End of text section */
49 }
50
51 . = ALIGN(16);
52 RODATA
53
54 EXCEPTION_TABLE(16)
55
56 RW_DATA_SECTION(32, PAGE_SIZE, THREAD_SIZE)
57
58 /* We want the small data sections together, so single-instruction offsets
59 can access them all, and initialized data all before uninitialized, so
60 we can shorten the on-disk segment size. */
61 . = ALIGN(8);
62 .sdata : {
63 *(.sdata)
64 }
65 _edata = .; /* End of data section */
66
67 /* will be freed after init */
68 . = ALIGN(PAGE_SIZE); /* Init code and data */
69 __init_begin = .;
70
71 INIT_TEXT_SECTION(PAGE_SIZE)
72 INIT_DATA_SECTION(16)
73
74 /* .exit.text is discarded at runtime, not link time, to deal with
75 * references from .rodata
76 */
77 .exit.text : {
78 EXIT_TEXT
79 }
80 .exit.data : {
81 EXIT_DATA
82 }
83 . = ALIGN(PAGE_SIZE);
84 __init_end = .;
85 /* freed after init ends here */
86
87 BSS_SECTION(0, 0, 0)
88 _end = .;
89}
diff --git a/arch/score/lib/Makefile b/arch/score/lib/Makefile
new file mode 100644
index 000000000000..553e30e81faf
--- /dev/null
+++ b/arch/score/lib/Makefile
@@ -0,0 +1,8 @@
1#
2# Makefile for SCORE-specific library files..
3#
4
5lib-y += string.o checksum.o checksum_copy.o
6
7# libgcc-style stuff needed in the kernel
8obj-y += ashldi3.o ashrdi3.o cmpdi2.o lshrdi3.o ucmpdi2.o
diff --git a/arch/score/lib/ashldi3.c b/arch/score/lib/ashldi3.c
new file mode 100644
index 000000000000..15691a910431
--- /dev/null
+++ b/arch/score/lib/ashldi3.c
@@ -0,0 +1,46 @@
1/*
2 * arch/score/lib/ashldi3.c
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, see the file COPYING, or write
16 * to the Free Software Foundation, Inc.,
17 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20#include <linux/module.h>
21#include "libgcc.h"
22
23long long __ashldi3(long long u, word_type b)
24{
25 DWunion uu, w;
26 word_type bm;
27
28 if (b == 0)
29 return u;
30
31 uu.ll = u;
32 bm = 32 - b;
33
34 if (bm <= 0) {
35 w.s.low = 0;
36 w.s.high = (unsigned int) uu.s.low << -bm;
37 } else {
38 const unsigned int carries = (unsigned int) uu.s.low >> bm;
39
40 w.s.low = (unsigned int) uu.s.low << b;
41 w.s.high = ((unsigned int) uu.s.high << b) | carries;
42 }
43
44 return w.ll;
45}
46EXPORT_SYMBOL(__ashldi3);
diff --git a/arch/score/lib/ashrdi3.c b/arch/score/lib/ashrdi3.c
new file mode 100644
index 000000000000..d9814a5d8d30
--- /dev/null
+++ b/arch/score/lib/ashrdi3.c
@@ -0,0 +1,48 @@
1/*
2 * arch/score/lib/ashrdi3.c
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, see the file COPYING, or write
16 * to the Free Software Foundation, Inc.,
17 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20#include <linux/module.h>
21#include "libgcc.h"
22
23long long __ashrdi3(long long u, word_type b)
24{
25 DWunion uu, w;
26 word_type bm;
27
28 if (b == 0)
29 return u;
30
31 uu.ll = u;
32 bm = 32 - b;
33
34 if (bm <= 0) {
35 /* w.s.high = 1..1 or 0..0 */
36 w.s.high =
37 uu.s.high >> 31;
38 w.s.low = uu.s.high >> -bm;
39 } else {
40 const unsigned int carries = (unsigned int) uu.s.high << bm;
41
42 w.s.high = uu.s.high >> b;
43 w.s.low = ((unsigned int) uu.s.low >> b) | carries;
44 }
45
46 return w.ll;
47}
48EXPORT_SYMBOL(__ashrdi3);
diff --git a/arch/score/lib/checksum.S b/arch/score/lib/checksum.S
new file mode 100644
index 000000000000..706157edc7d5
--- /dev/null
+++ b/arch/score/lib/checksum.S
@@ -0,0 +1,255 @@
1/*
2 * arch/score/lib/csum_partial.S
3 *
4 * Score Processor version.
5 *
6 * Copyright (C) 2009 Sunplus Core Technology Co., Ltd.
7 * Lennox Wu <lennox.wu@sunplusct.com>
8 * Chen Liqin <liqin.chen@sunplusct.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, see the file COPYING, or write
22 * to the Free Software Foundation, Inc.,
23 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 */
25#include <linux/linkage.h>
26
27#define ADDC(sum,reg) \
28 add sum, sum, reg; \
29 cmp.c reg, sum; \
30 bleu 9f; \
31 addi sum, 0x1; \
329:
33
34#define CSUM_BIGCHUNK(src, offset, sum) \
35 lw r8, [src, offset + 0x00]; \
36 lw r9, [src, offset + 0x04]; \
37 lw r10, [src, offset + 0x08]; \
38 lw r11, [src, offset + 0x0c]; \
39 ADDC(sum, r8); \
40 ADDC(sum, r9); \
41 ADDC(sum, r10); \
42 ADDC(sum, r11); \
43 lw r8, [src, offset + 0x10]; \
44 lw r9, [src, offset + 0x14]; \
45 lw r10, [src, offset + 0x18]; \
46 lw r11, [src, offset + 0x1c]; \
47 ADDC(sum, r8); \
48 ADDC(sum, r9); \
49 ADDC(sum, r10); \
50 ADDC(sum, r11); \
51
52#define src r4
53#define dest r5
54#define sum r27
55
56 .text
57/* unknown src alignment and < 8 bytes to go */
58small_csumcpy:
59 mv r5, r10
60 ldi r9, 0x0
61 cmpi.c r25, 0x1
62 beq pass_small_set_t7 /*already set, jump to pass_small_set_t7*/
63 andri.c r25,r4 , 0x1 /*Is src 2 bytes aligned?*/
64
65pass_small_set_t7:
66 beq aligned
67 cmpi.c r5, 0x0
68 beq fold
69 lbu r9, [src]
70 slli r9,r9, 0x8 /*Little endian*/
71 ADDC(sum, r9)
72 addi src, 0x1
73 subi.c r5, 0x1
74
75 /*len still a full word */
76aligned:
77 andri.c r8, r5, 0x4 /*Len >= 4?*/
78 beq len_less_4bytes
79
80 /* Still a full word (4byte) to go,and the src is word aligned.*/
81 andri.c r8, src, 0x3 /*src is 4bytes aligned, so use LW!!*/
82 beq four_byte_aligned
83 lhu r9, [src]
84 addi src, 2
85 ADDC(sum, r9)
86 lhu r9, [src]
87 addi src, 2
88 ADDC(sum, r9)
89 b len_less_4bytes
90
91four_byte_aligned: /* Len >=4 and four byte aligned */
92 lw r9, [src]
93 addi src, 4
94 ADDC(sum, r9)
95
96len_less_4bytes: /* 2 byte aligned aligned and length<4B */
97 andri.c r8, r5, 0x2
98 beq len_less_2bytes
99 lhu r9, [src]
100 addi src, 0x2 /* src+=2 */
101 ADDC(sum, r9)
102
103len_less_2bytes: /* len = 1 */
104 andri.c r8, r5, 0x1
105 beq fold /* less than 2 and not equal 1--> len=0 -> fold */
106 lbu r9, [src]
107
108fold_ADDC:
109 ADDC(sum, r9)
110fold:
111 /* fold checksum */
112 slli r26, sum, 16
113 add sum, sum, r26
114 cmp.c r26, sum
115 srli sum, sum, 16
116 bleu 1f /* if r26<=sum */
117 addi sum, 0x1 /* r26>sum */
1181:
119 /* odd buffer alignment? r25 was set in csum_partial */
120 cmpi.c r25, 0x0
121 beq 1f
122 slli r26, sum, 8
123 srli sum, sum, 8
124 or sum, sum, r26
125 andi sum, 0xffff
1261:
127 .set optimize
128 /* Add the passed partial csum. */
129 ADDC(sum, r6)
130 mv r4, sum
131 br r3
132 .set volatile
133
134 .align 5
135ENTRY(csum_partial)
136 ldi sum, 0
137 ldi r25, 0
138 mv r10, r5
139 cmpi.c r5, 0x8
140 blt small_csumcpy /* < 8(singed) bytes to copy */
141 cmpi.c r5, 0x0
142 beq out
143 andri.c r25, src, 0x1 /* odd buffer? */
144
145 beq word_align
146hword_align: /* 1 byte */
147 lbu r8, [src]
148 subi r5, 0x1
149 slli r8, r8, 8
150 ADDC(sum, r8)
151 addi src, 0x1
152
153word_align: /* 2 bytes */
154 andri.c r8, src, 0x2 /* 4bytes(dword)_aligned? */
155 beq dword_align /* not, maybe dword_align */
156 lhu r8, [src]
157 subi r5, 0x2
158 ADDC(sum, r8)
159 addi src, 0x2
160
161dword_align: /* 4bytes */
162 mv r26, r5 /* maybe useless when len >=56 */
163 ldi r8, 56
164 cmp.c r8, r5
165 bgtu do_end_words /* if a1(len)<t0(56) ,unsigned */
166 andri.c r26, src, 0x4
167 beq qword_align
168 lw r8, [src]
169 subi r5, 0x4
170 ADDC(sum, r8)
171 addi src, 0x4
172
173qword_align: /* 8 bytes */
174 andri.c r26, src, 0x8
175 beq oword_align
176 lw r8, [src, 0x0]
177 lw r9, [src, 0x4]
178 subi r5, 0x8 /* len-=0x8 */
179 ADDC(sum, r8)
180 ADDC(sum, r9)
181 addi src, 0x8
182
183oword_align: /* 16bytes */
184 andri.c r26, src, 0x10
185 beq begin_movement
186 lw r10, [src, 0x08]
187 lw r11, [src, 0x0c]
188 lw r8, [src, 0x00]
189 lw r9, [src, 0x04]
190 ADDC(sum, r10)
191 ADDC(sum, r11)
192 ADDC(sum, r8)
193 ADDC(sum, r9)
194 subi r5, 0x10
195 addi src, 0x10
196
197begin_movement:
198 srli.c r26, r5, 0x7 /* len>=128? */
199 beq 1f /* len<128 */
200
201/* r26 is the result that computed in oword_align */
202move_128bytes:
203 CSUM_BIGCHUNK(src, 0x00, sum)
204 CSUM_BIGCHUNK(src, 0x20, sum)
205 CSUM_BIGCHUNK(src, 0x40, sum)
206 CSUM_BIGCHUNK(src, 0x60, sum)
207 subi.c r26, 0x01 /* r26 equals len/128 */
208 addi src, 0x80
209 bne move_128bytes
210
2111: /* len<128,we process 64byte here */
212 andri.c r10, r5, 0x40
213 beq 1f
214
215move_64bytes:
216 CSUM_BIGCHUNK(src, 0x00, sum)
217 CSUM_BIGCHUNK(src, 0x20, sum)
218 addi src, 0x40
219
2201: /* len<64 */
221 andri r26, r5, 0x1c /* 0x1c=28 */
222 andri.c r10, r5, 0x20
223 beq do_end_words /* decided by andri */
224
225move_32bytes:
226 CSUM_BIGCHUNK(src, 0x00, sum)
227 andri r26, r5, 0x1c
228 addri src, src, 0x20
229
230do_end_words: /* len<32 */
231 /* r26 was set already in dword_align */
232 cmpi.c r26, 0x0
233 beq maybe_end_cruft /* len<28 or len<56 */
234 srli r26, r26, 0x2
235
236end_words:
237 lw r8, [src]
238 subi.c r26, 0x1 /* unit is 4 byte */
239 ADDC(sum, r8)
240 addi src, 0x4
241 cmpi.c r26, 0x0
242 bne end_words /* r26!=0 */
243
244maybe_end_cruft: /* len<4 */
245 andri r10, r5, 0x3
246
247small_memcpy:
248 mv r5, r10
249 j small_csumcpy
250
251out:
252 mv r4, sum
253 br r3
254
255END(csum_partial)
diff --git a/arch/score/lib/checksum_copy.c b/arch/score/lib/checksum_copy.c
new file mode 100644
index 000000000000..04565dd3ded8
--- /dev/null
+++ b/arch/score/lib/checksum_copy.c
@@ -0,0 +1,52 @@
1/*
2 * arch/score/lib/csum_partial_copy.c
3 *
4 * Score Processor version.
5 *
6 * Copyright (C) 2009 Sunplus Core Technology Co., Ltd.
7 * Lennox Wu <lennox.wu@sunplusct.com>
8 * Chen Liqin <liqin.chen@sunplusct.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, see the file COPYING, or write
22 * to the Free Software Foundation, Inc.,
23 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 */
25
26#include <net/checksum.h>
27
28#include <asm/uaccess.h>
29
30unsigned int csum_partial_copy(const char *src, char *dst,
31 int len, unsigned int sum)
32{
33 sum = csum_partial(src, len, sum);
34 memcpy(dst, src, len);
35
36 return sum;
37}
38
39unsigned int csum_partial_copy_from_user(const char *src, char *dst,
40 int len, unsigned int sum,
41 int *err_ptr)
42{
43 int missing;
44
45 missing = copy_from_user(dst, src, len);
46 if (missing) {
47 memset(dst + len - missing, 0, missing);
48 *err_ptr = -EFAULT;
49 }
50
51 return csum_partial(dst, len, sum);
52}
diff --git a/arch/score/lib/cmpdi2.c b/arch/score/lib/cmpdi2.c
new file mode 100644
index 000000000000..1ed5290c66ed
--- /dev/null
+++ b/arch/score/lib/cmpdi2.c
@@ -0,0 +1,44 @@
1/*
2 * arch/score/lib/cmpdi2.c
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, see the file COPYING, or write
16 * to the Free Software Foundation, Inc.,
17 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20#include <linux/module.h>
21#include "libgcc.h"
22
23word_type __cmpdi2(long long a, long long b)
24{
25 const DWunion au = {
26 .ll = a
27 };
28 const DWunion bu = {
29 .ll = b
30 };
31
32 if (au.s.high < bu.s.high)
33 return 0;
34 else if (au.s.high > bu.s.high)
35 return 2;
36
37 if ((unsigned int) au.s.low < (unsigned int) bu.s.low)
38 return 0;
39 else if ((unsigned int) au.s.low > (unsigned int) bu.s.low)
40 return 2;
41
42 return 1;
43}
44EXPORT_SYMBOL(__cmpdi2);
diff --git a/arch/score/lib/libgcc.h b/arch/score/lib/libgcc.h
new file mode 100644
index 000000000000..0f12543d9f31
--- /dev/null
+++ b/arch/score/lib/libgcc.h
@@ -0,0 +1,37 @@
1/*
2 * arch/score/lib/libgcc.h
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, see the file COPYING, or write
16 * to the Free Software Foundation, Inc.,
17 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20
21#ifndef __ASM_LIBGCC_H
22#define __ASM_LIBGCC_H
23
24#include <asm/byteorder.h>
25
26typedef int word_type __attribute__((mode(__word__)));
27
28struct DWstruct {
29 int low, high;
30};
31
32typedef union {
33 struct DWstruct s;
34 long long ll;
35} DWunion;
36
37#endif /* __ASM_LIBGCC_H */
diff --git a/arch/score/lib/lshrdi3.c b/arch/score/lib/lshrdi3.c
new file mode 100644
index 000000000000..ce21175fd791
--- /dev/null
+++ b/arch/score/lib/lshrdi3.c
@@ -0,0 +1,47 @@
1/*
2 * arch/score/lib/lshrdi3.c
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, see the file COPYING, or write
16 * to the Free Software Foundation, Inc.,
17 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20
21#include <linux/module.h>
22#include "libgcc.h"
23
24long long __lshrdi3(long long u, word_type b)
25{
26 DWunion uu, w;
27 word_type bm;
28
29 if (b == 0)
30 return u;
31
32 uu.ll = u;
33 bm = 32 - b;
34
35 if (bm <= 0) {
36 w.s.high = 0;
37 w.s.low = (unsigned int) uu.s.high >> -bm;
38 } else {
39 const unsigned int carries = (unsigned int) uu.s.high << bm;
40
41 w.s.high = (unsigned int) uu.s.high >> b;
42 w.s.low = ((unsigned int) uu.s.low >> b) | carries;
43 }
44
45 return w.ll;
46}
47EXPORT_SYMBOL(__lshrdi3);
diff --git a/arch/score/lib/string.S b/arch/score/lib/string.S
new file mode 100644
index 000000000000..00b7d3a2fc60
--- /dev/null
+++ b/arch/score/lib/string.S
@@ -0,0 +1,184 @@
1/*
2 * arch/score/lib/string.S
3 *
4 * Score Processor version.
5 *
6 * Copyright (C) 2009 Sunplus Core Technology Co., Ltd.
7 * Chen Liqin <liqin.chen@sunplusct.com>
8 * Lennox Wu <lennox.wu@sunplusct.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, see the file COPYING, or write
22 * to the Free Software Foundation, Inc.,
23 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 */
25
26#include <linux/linkage.h>
27#include <asm-generic/errno.h>
28
29 .text
30 .align 2
31ENTRY(__strncpy_from_user)
32 cmpi.c r6, 0
33 mv r9, r6
34 ble .L2
350: lbu r7, [r5]
36 ldi r8, 0
371: sb r7, [r4]
382: lb r6, [r5]
39 cmp.c r6, r8
40 beq .L2
41
42.L5:
43 addi r8, 1
44 cmp.c r8, r9
45 beq .L7
463: lbu r6, [r5, 1]+
474: sb r6, [r4, 1]+
485: lb r7, [r5]
49 cmpi.c r7, 0
50 bne .L5
51.L7:
52 mv r4, r8
53 br r3
54.L2:
55 ldi r8, 0
56 mv r4, r8
57 br r3
58 .section .fixup, "ax"
5999:
60 ldi r4, -EFAULT
61 br r3
62 .previous
63 .section __ex_table, "a"
64 .align 2
65 .word 0b ,99b
66 .word 1b ,99b
67 .word 2b ,99b
68 .word 3b ,99b
69 .word 4b ,99b
70 .word 5b ,99b
71 .previous
72
73 .align 2
74ENTRY(__strnlen_user)
75 cmpi.c r5, 0
76 ble .L11
770: lb r6, [r4]
78 ldi r7, 0
79 cmp.c r6, r7
80 beq .L11
81.L15:
82 addi r7, 1
83 cmp.c r7, r5
84 beq .L23
851: lb r6, [r4,1]+
86 cmpi.c r6, 0
87 bne .L15
88.L23:
89 addri r4, r7, 1
90 br r3
91
92.L11:
93 ldi r4, 1
94 br r3
95 .section .fixup, "ax"
9699:
97 ldi r4, 0
98 br r3
99
100 .section __ex_table,"a"
101 .align 2
102 .word 0b, 99b
103 .word 1b, 99b
104 .previous
105
106 .align 2
107ENTRY(__strlen_user)
1080: lb r6, [r4]
109 mv r7, r4
110 extsb r6, r6
111 cmpi.c r6, 0
112 mv r4, r6
113 beq .L27
114.L28:
1151: lb r6, [r7, 1]+
116 addi r6, 1
117 cmpi.c r6, 0
118 bne .L28
119.L27:
120 br r3
121 .section .fixup, "ax"
122 ldi r4, 0x0
123 br r3
12499:
125 ldi r4, 0
126 br r3
127 .previous
128 .section __ex_table, "a"
129 .align 2
130 .word 0b ,99b
131 .word 1b ,99b
132 .previous
133
134 .align 2
135ENTRY(__copy_tofrom_user)
136 cmpi.c r6, 0
137 mv r10,r6
138 beq .L32
139 ldi r9, 0
140.L34:
141 add r6, r5, r9
1420: lbu r8, [r6]
143 add r7, r4, r9
1441: sb r8, [r7]
145 addi r9, 1
146 cmp.c r9, r10
147 bne .L34
148.L32:
149 ldi r4, 0
150 br r3
151 .section .fixup, "ax"
15299:
153 sub r4, r10, r9
154 br r3
155 .previous
156 .section __ex_table, "a"
157 .align 2
158 .word 0b, 99b
159 .word 1b, 99b
160 .previous
161
162 .align 2
163ENTRY(__clear_user)
164 cmpi.c r5, 0
165 beq .L38
166 ldi r6, 0
167 mv r7, r6
168.L40:
169 addi r6, 1
1700: sb r7, [r4]+, 1
171 cmp.c r6, r5
172 bne .L40
173.L38:
174 ldi r4, 0
175 br r3
176
177 .section .fixup, "ax"
178 br r3
179 .previous
180 .section __ex_table, "a"
181 .align 2
18299:
183 .word 0b, 99b
184 .previous
diff --git a/arch/score/lib/ucmpdi2.c b/arch/score/lib/ucmpdi2.c
new file mode 100644
index 000000000000..b15241e0b079
--- /dev/null
+++ b/arch/score/lib/ucmpdi2.c
@@ -0,0 +1,38 @@
1/*
2 * arch/score/lib/ucmpdi2.c
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, see the file COPYING, or write
16 * to the Free Software Foundation, Inc.,
17 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20#include <linux/module.h>
21#include "libgcc.h"
22
23word_type __ucmpdi2(unsigned long long a, unsigned long long b)
24{
25 const DWunion au = {.ll = a};
26 const DWunion bu = {.ll = b};
27
28 if ((unsigned int) au.s.high < (unsigned int) bu.s.high)
29 return 0;
30 else if ((unsigned int) au.s.high > (unsigned int) bu.s.high)
31 return 2;
32 if ((unsigned int) au.s.low < (unsigned int) bu.s.low)
33 return 0;
34 else if ((unsigned int) au.s.low > (unsigned int) bu.s.low)
35 return 2;
36 return 1;
37}
38EXPORT_SYMBOL(__ucmpdi2);
diff --git a/arch/score/mm/Makefile b/arch/score/mm/Makefile
new file mode 100644
index 000000000000..7b1e29b1f8cd
--- /dev/null
+++ b/arch/score/mm/Makefile
@@ -0,0 +1,6 @@
1#
2# Makefile for the Linux/SCORE-specific parts of the memory manager.
3#
4
5obj-y += cache.o extable.o fault.o init.o \
6 tlb-miss.o tlb-score.o pgtable.o
diff --git a/arch/score/mm/cache.c b/arch/score/mm/cache.c
new file mode 100644
index 000000000000..dbac9d9dfddd
--- /dev/null
+++ b/arch/score/mm/cache.c
@@ -0,0 +1,257 @@
1/*
2 * arch/score/mm/cache.c
3 *
4 * Score Processor version.
5 *
6 * Copyright (C) 2009 Sunplus Core Technology Co., Ltd.
7 * Lennox Wu <lennox.wu@sunplusct.com>
8 * Chen Liqin <liqin.chen@sunplusct.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, see the file COPYING, or write
22 * to the Free Software Foundation, Inc.,
23 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 */
25
26#include <linux/init.h>
27#include <linux/linkage.h>
28#include <linux/kernel.h>
29#include <linux/mm.h>
30#include <linux/module.h>
31#include <linux/sched.h>
32
33#include <asm/mmu_context.h>
34
35/*
36Just flush entire Dcache!!
37You must ensure the page doesn't include instructions, because
38the function will not flush the Icache.
39The addr must be cache aligned.
40*/
41static void flush_data_cache_page(unsigned long addr)
42{
43 unsigned int i;
44 for (i = 0; i < (PAGE_SIZE / L1_CACHE_BYTES); i += L1_CACHE_BYTES) {
45 __asm__ __volatile__(
46 "cache 0x0e, [%0, 0]\n"
47 "cache 0x1a, [%0, 0]\n"
48 "nop\n"
49 : : "r" (addr));
50 addr += L1_CACHE_BYTES;
51 }
52}
53
54/* called by update_mmu_cache. */
55void __update_cache(struct vm_area_struct *vma, unsigned long address,
56 pte_t pte)
57{
58 struct page *page;
59 unsigned long pfn, addr;
60 int exec = (vma->vm_flags & VM_EXEC);
61
62 pfn = pte_pfn(pte);
63 if (unlikely(!pfn_valid(pfn)))
64 return;
65 page = pfn_to_page(pfn);
66 if (page_mapping(page) && test_bit(PG_arch_1, &page->flags)) {
67 addr = (unsigned long) page_address(page);
68 if (exec)
69 flush_data_cache_page(addr);
70 clear_bit(PG_arch_1, &page->flags);
71 }
72}
73
74static inline void setup_protection_map(void)
75{
76 protection_map[0] = PAGE_NONE;
77 protection_map[1] = PAGE_READONLY;
78 protection_map[2] = PAGE_COPY;
79 protection_map[3] = PAGE_COPY;
80 protection_map[4] = PAGE_READONLY;
81 protection_map[5] = PAGE_READONLY;
82 protection_map[6] = PAGE_COPY;
83 protection_map[7] = PAGE_COPY;
84 protection_map[8] = PAGE_NONE;
85 protection_map[9] = PAGE_READONLY;
86 protection_map[10] = PAGE_SHARED;
87 protection_map[11] = PAGE_SHARED;
88 protection_map[12] = PAGE_READONLY;
89 protection_map[13] = PAGE_READONLY;
90 protection_map[14] = PAGE_SHARED;
91 protection_map[15] = PAGE_SHARED;
92}
93
94void __devinit cpu_cache_init(void)
95{
96 setup_protection_map();
97}
98
99void flush_icache_all(void)
100{
101 __asm__ __volatile__(
102 "la r8, flush_icache_all\n"
103 "cache 0x10, [r8, 0]\n"
104 "nop\nnop\nnop\nnop\nnop\nnop\n"
105 : : : "r8");
106}
107
108void flush_dcache_all(void)
109{
110 __asm__ __volatile__(
111 "la r8, flush_dcache_all\n"
112 "cache 0x1f, [r8, 0]\n"
113 "nop\nnop\nnop\nnop\nnop\nnop\n"
114 "cache 0x1a, [r8, 0]\n"
115 "nop\nnop\nnop\nnop\nnop\nnop\n"
116 : : : "r8");
117}
118
119void flush_cache_all(void)
120{
121 __asm__ __volatile__(
122 "la r8, flush_cache_all\n"
123 "cache 0x10, [r8, 0]\n"
124 "nop\nnop\nnop\nnop\nnop\nnop\n"
125 "cache 0x1f, [r8, 0]\n"
126 "nop\nnop\nnop\nnop\nnop\nnop\n"
127 "cache 0x1a, [r8, 0]\n"
128 "nop\nnop\nnop\nnop\nnop\nnop\n"
129 : : : "r8");
130}
131
132void flush_cache_mm(struct mm_struct *mm)
133{
134 if (!(mm->context))
135 return;
136 flush_cache_all();
137}
138
139/*if we flush a range precisely , the processing may be very long.
140We must check each page in the range whether present. If the page is present,
141we can flush the range in the page. Be careful, the range may be cross two
142page, a page is present and another is not present.
143*/
144/*
145The interface is provided in hopes that the port can find
146a suitably efficient method for removing multiple page
147sized regions from the cache.
148*/
149void flush_cache_range(struct vm_area_struct *vma,
150 unsigned long start, unsigned long end)
151{
152 struct mm_struct *mm = vma->vm_mm;
153 int exec = vma->vm_flags & VM_EXEC;
154 pgd_t *pgdp;
155 pud_t *pudp;
156 pmd_t *pmdp;
157 pte_t *ptep;
158
159 if (!(mm->context))
160 return;
161
162 pgdp = pgd_offset(mm, start);
163 pudp = pud_offset(pgdp, start);
164 pmdp = pmd_offset(pudp, start);
165 ptep = pte_offset(pmdp, start);
166
167 while (start <= end) {
168 unsigned long tmpend;
169 pgdp = pgd_offset(mm, start);
170 pudp = pud_offset(pgdp, start);
171 pmdp = pmd_offset(pudp, start);
172 ptep = pte_offset(pmdp, start);
173
174 if (!(pte_val(*ptep) & _PAGE_PRESENT)) {
175 start = (start + PAGE_SIZE) & ~(PAGE_SIZE - 1);
176 continue;
177 }
178 tmpend = (start | (PAGE_SIZE-1)) > end ?
179 end : (start | (PAGE_SIZE-1));
180
181 flush_dcache_range(start, tmpend);
182 if (exec)
183 flush_icache_range(start, tmpend);
184 start = (start + PAGE_SIZE) & ~(PAGE_SIZE - 1);
185 }
186}
187
188void flush_cache_page(struct vm_area_struct *vma,
189 unsigned long addr, unsigned long pfn)
190{
191 int exec = vma->vm_flags & VM_EXEC;
192 unsigned long kaddr = 0xa0000000 | (pfn << PAGE_SHIFT);
193
194 flush_dcache_range(kaddr, kaddr + PAGE_SIZE);
195
196 if (exec)
197 flush_icache_range(kaddr, kaddr + PAGE_SIZE);
198}
199
200void flush_cache_sigtramp(unsigned long addr)
201{
202 __asm__ __volatile__(
203 "cache 0x02, [%0, 0]\n"
204 "nop\nnop\nnop\nnop\nnop\n"
205 "cache 0x02, [%0, 0x4]\n"
206 "nop\nnop\nnop\nnop\nnop\n"
207
208 "cache 0x0d, [%0, 0]\n"
209 "nop\nnop\nnop\nnop\nnop\n"
210 "cache 0x0d, [%0, 0x4]\n"
211 "nop\nnop\nnop\nnop\nnop\n"
212
213 "cache 0x1a, [%0, 0]\n"
214 "nop\nnop\nnop\nnop\nnop\n"
215 : : "r" (addr));
216}
217
218/*
2191. WB and invalid a cache line of Dcache
2202. Drain Write Buffer
221the range must be smaller than PAGE_SIZE
222*/
223void flush_dcache_range(unsigned long start, unsigned long end)
224{
225 int size, i;
226
227 start = start & ~(L1_CACHE_BYTES - 1);
228 end = end & ~(L1_CACHE_BYTES - 1);
229 size = end - start;
230 /* flush dcache to ram, and invalidate dcache lines. */
231 for (i = 0; i < size; i += L1_CACHE_BYTES) {
232 __asm__ __volatile__(
233 "cache 0x0e, [%0, 0]\n"
234 "nop\nnop\nnop\nnop\nnop\n"
235 "cache 0x1a, [%0, 0]\n"
236 "nop\nnop\nnop\nnop\nnop\n"
237 : : "r" (start));
238 start += L1_CACHE_BYTES;
239 }
240}
241
242void flush_icache_range(unsigned long start, unsigned long end)
243{
244 int size, i;
245 start = start & ~(L1_CACHE_BYTES - 1);
246 end = end & ~(L1_CACHE_BYTES - 1);
247
248 size = end - start;
249 /* invalidate icache lines. */
250 for (i = 0; i < size; i += L1_CACHE_BYTES) {
251 __asm__ __volatile__(
252 "cache 0x02, [%0, 0]\n"
253 "nop\nnop\nnop\nnop\nnop\n"
254 : : "r" (start));
255 start += L1_CACHE_BYTES;
256 }
257}
diff --git a/arch/score/mm/extable.c b/arch/score/mm/extable.c
new file mode 100644
index 000000000000..01ff6445171c
--- /dev/null
+++ b/arch/score/mm/extable.c
@@ -0,0 +1,38 @@
1/*
2 * arch/score/mm/extable.c
3 *
4 * Score Processor version.
5 *
6 * Copyright (C) 2009 Sunplus Core Technology Co., Ltd.
7 * Lennox Wu <lennox.wu@sunplusct.com>
8 * Chen Liqin <liqin.chen@sunplusct.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, see the file COPYING, or write
22 * to the Free Software Foundation, Inc.,
23 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 */
25
26#include <linux/module.h>
27
28int fixup_exception(struct pt_regs *regs)
29{
30 const struct exception_table_entry *fixup;
31
32 fixup = search_exception_tables(regs->cp0_epc);
33 if (fixup) {
34 regs->cp0_epc = fixup->fixup;
35 return 1;
36 }
37 return 0;
38}
diff --git a/arch/score/mm/fault.c b/arch/score/mm/fault.c
new file mode 100644
index 000000000000..47b600e4b2c5
--- /dev/null
+++ b/arch/score/mm/fault.c
@@ -0,0 +1,235 @@
1/*
2 * arch/score/mm/fault.c
3 *
4 * Score Processor version.
5 *
6 * Copyright (C) 2009 Sunplus Core Technology Co., Ltd.
7 * Lennox Wu <lennox.wu@sunplusct.com>
8 * Chen Liqin <liqin.chen@sunplusct.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, see the file COPYING, or write
22 * to the Free Software Foundation, Inc.,
23 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 */
25
26#include <linux/errno.h>
27#include <linux/interrupt.h>
28#include <linux/kernel.h>
29#include <linux/mm.h>
30#include <linux/mman.h>
31#include <linux/module.h>
32#include <linux/signal.h>
33#include <linux/sched.h>
34#include <linux/string.h>
35#include <linux/types.h>
36#include <linux/ptrace.h>
37
38/*
39 * This routine handles page faults. It determines the address,
40 * and the problem, and then passes it off to one of the appropriate
41 * routines.
42 */
43asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long write,
44 unsigned long address)
45{
46 struct vm_area_struct *vma = NULL;
47 struct task_struct *tsk = current;
48 struct mm_struct *mm = tsk->mm;
49 const int field = sizeof(unsigned long) * 2;
50 siginfo_t info;
51 int fault;
52
53 info.si_code = SEGV_MAPERR;
54
55 /*
56 * We fault-in kernel-space virtual memory on-demand. The
57 * 'reference' page table is init_mm.pgd.
58 *
59 * NOTE! We MUST NOT take any locks for this case. We may
60 * be in an interrupt or a critical region, and should
61 * only copy the information from the master page table,
62 * nothing more.
63 */
64 if (unlikely(address >= VMALLOC_START && address <= VMALLOC_END))
65 goto vmalloc_fault;
66#ifdef MODULE_START
67 if (unlikely(address >= MODULE_START && address < MODULE_END))
68 goto vmalloc_fault;
69#endif
70
71 /*
72 * If we're in an interrupt or have no user
73 * context, we must not take the fault..
74 */
75 if (in_atomic() || !mm)
76 goto bad_area_nosemaphore;
77
78 down_read(&mm->mmap_sem);
79 vma = find_vma(mm, address);
80 if (!vma)
81 goto bad_area;
82 if (vma->vm_start <= address)
83 goto good_area;
84 if (!(vma->vm_flags & VM_GROWSDOWN))
85 goto bad_area;
86 if (expand_stack(vma, address))
87 goto bad_area;
88 /*
89 * Ok, we have a good vm_area for this memory access, so
90 * we can handle it..
91 */
92good_area:
93 info.si_code = SEGV_ACCERR;
94
95 if (write) {
96 if (!(vma->vm_flags & VM_WRITE))
97 goto bad_area;
98 } else {
99 if (!(vma->vm_flags & (VM_READ | VM_WRITE | VM_EXEC)))
100 goto bad_area;
101 }
102
103survive:
104 /*
105 * If for any reason at all we couldn't handle the fault,
106 * make sure we exit gracefully rather than endlessly redo
107 * the fault.
108 */
109 fault = handle_mm_fault(mm, vma, address, write);
110 if (unlikely(fault & VM_FAULT_ERROR)) {
111 if (fault & VM_FAULT_OOM)
112 goto out_of_memory;
113 else if (fault & VM_FAULT_SIGBUS)
114 goto do_sigbus;
115 BUG();
116 }
117 if (fault & VM_FAULT_MAJOR)
118 tsk->maj_flt++;
119 else
120 tsk->min_flt++;
121
122 up_read(&mm->mmap_sem);
123 return;
124
125 /*
126 * Something tried to access memory that isn't in our memory map..
127 * Fix it, but check if it's kernel or user first..
128 */
129bad_area:
130 up_read(&mm->mmap_sem);
131
132bad_area_nosemaphore:
133 /* User mode accesses just cause a SIGSEGV */
134 if (user_mode(regs)) {
135 tsk->thread.cp0_badvaddr = address;
136 tsk->thread.error_code = write;
137 info.si_signo = SIGSEGV;
138 info.si_errno = 0;
139 /* info.si_code has been set above */
140 info.si_addr = (void __user *) address;
141 force_sig_info(SIGSEGV, &info, tsk);
142 return;
143 }
144
145no_context:
146 /* Are we prepared to handle this kernel fault? */
147 if (fixup_exception(regs)) {
148 current->thread.cp0_baduaddr = address;
149 return;
150 }
151
152 /*
153 * Oops. The kernel tried to access some bad page. We'll have to
154 * terminate things with extreme prejudice.
155 */
156 bust_spinlocks(1);
157
158 printk(KERN_ALERT "CPU %d Unable to handle kernel paging request at "
159 "virtual address %0*lx, epc == %0*lx, ra == %0*lx\n",
160 0, field, address, field, regs->cp0_epc,
161 field, regs->regs[3]);
162 die("Oops", regs);
163
164 /*
165 * We ran out of memory, or some other thing happened to us that made
166 * us unable to handle the page fault gracefully.
167 */
168out_of_memory:
169 up_read(&mm->mmap_sem);
170 if (is_global_init(tsk)) {
171 yield();
172 down_read(&mm->mmap_sem);
173 goto survive;
174 }
175 printk("VM: killing process %s\n", tsk->comm);
176 if (user_mode(regs))
177 do_group_exit(SIGKILL);
178 goto no_context;
179
180do_sigbus:
181 up_read(&mm->mmap_sem);
182 /* Kernel mode? Handle exceptions or die */
183 if (!user_mode(regs))
184 goto no_context;
185 else
186 /*
187 * Send a sigbus, regardless of whether we were in kernel
188 * or user mode.
189 */
190 tsk->thread.cp0_badvaddr = address;
191 info.si_signo = SIGBUS;
192 info.si_errno = 0;
193 info.si_code = BUS_ADRERR;
194 info.si_addr = (void __user *) address;
195 force_sig_info(SIGBUS, &info, tsk);
196 return;
197vmalloc_fault:
198 {
199 /*
200 * Synchronize this task's top level page-table
201 * with the 'reference' page table.
202 *
203 * Do _not_ use "tsk" here. We might be inside
204 * an interrupt in the middle of a task switch..
205 */
206 int offset = __pgd_offset(address);
207 pgd_t *pgd, *pgd_k;
208 pud_t *pud, *pud_k;
209 pmd_t *pmd, *pmd_k;
210 pte_t *pte_k;
211
212 pgd = (pgd_t *) pgd_current + offset;
213 pgd_k = init_mm.pgd + offset;
214
215 if (!pgd_present(*pgd_k))
216 goto no_context;
217 set_pgd(pgd, *pgd_k);
218
219 pud = pud_offset(pgd, address);
220 pud_k = pud_offset(pgd_k, address);
221 if (!pud_present(*pud_k))
222 goto no_context;
223
224 pmd = pmd_offset(pud, address);
225 pmd_k = pmd_offset(pud_k, address);
226 if (!pmd_present(*pmd_k))
227 goto no_context;
228 set_pmd(pmd, *pmd_k);
229
230 pte_k = pte_offset_kernel(pmd_k, address);
231 if (!pte_present(*pte_k))
232 goto no_context;
233 return;
234 }
235}
diff --git a/arch/score/mm/init.c b/arch/score/mm/init.c
new file mode 100644
index 000000000000..4e3dcd0c4716
--- /dev/null
+++ b/arch/score/mm/init.c
@@ -0,0 +1,161 @@
1/*
2 * arch/score/mm/init.c
3 *
4 * Score Processor version.
5 *
6 * Copyright (C) 2009 Sunplus Core Technology Co., Ltd.
7 * Lennox Wu <lennox.wu@sunplusct.com>
8 * Chen Liqin <liqin.chen@sunplusct.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, see the file COPYING, or write
22 * to the Free Software Foundation, Inc.,
23 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 */
25
26#include <linux/errno.h>
27#include <linux/bootmem.h>
28#include <linux/kernel.h>
29#include <linux/init.h>
30#include <linux/mm.h>
31#include <linux/mman.h>
32#include <linux/pagemap.h>
33#include <linux/proc_fs.h>
34#include <linux/sched.h>
35#include <linux/initrd.h>
36
37#include <asm/sections.h>
38#include <asm/tlb.h>
39
40DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
41
42unsigned long empty_zero_page;
43EXPORT_SYMBOL_GPL(empty_zero_page);
44
45static struct kcore_list kcore_mem, kcore_vmalloc;
46
47static unsigned long setup_zero_page(void)
48{
49 struct page *page;
50
51 empty_zero_page = __get_free_pages(GFP_KERNEL | __GFP_ZERO, 0);
52 if (!empty_zero_page)
53 panic("Oh boy, that early out of memory?");
54
55 page = virt_to_page((void *) empty_zero_page);
56 SetPageReserved(page);
57
58 return 1UL;
59}
60
61#ifndef CONFIG_NEED_MULTIPLE_NODES
62static int __init page_is_ram(unsigned long pagenr)
63{
64 if (pagenr >= min_low_pfn && pagenr < max_low_pfn)
65 return 1;
66 else
67 return 0;
68}
69
70void __init paging_init(void)
71{
72 unsigned long max_zone_pfns[MAX_NR_ZONES];
73 unsigned long lastpfn;
74
75 pagetable_init();
76 max_zone_pfns[ZONE_NORMAL] = max_low_pfn;
77 lastpfn = max_low_pfn;
78 free_area_init_nodes(max_zone_pfns);
79}
80
81void __init mem_init(void)
82{
83 unsigned long codesize, reservedpages, datasize, initsize;
84 unsigned long tmp, ram = 0;
85
86 max_mapnr = max_low_pfn;
87 high_memory = (void *) __va(max_low_pfn << PAGE_SHIFT);
88 totalram_pages += free_all_bootmem();
89 totalram_pages -= setup_zero_page(); /* Setup zeroed pages. */
90 reservedpages = 0;
91
92 for (tmp = 0; tmp < max_low_pfn; tmp++)
93 if (page_is_ram(tmp)) {
94 ram++;
95 if (PageReserved(pfn_to_page(tmp)))
96 reservedpages++;
97 }
98
99 num_physpages = ram;
100 codesize = (unsigned long) &_etext - (unsigned long) &_text;
101 datasize = (unsigned long) &_edata - (unsigned long) &_etext;
102 initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin;
103
104 kclist_add(&kcore_mem, __va(0), max_low_pfn << PAGE_SHIFT);
105 kclist_add(&kcore_vmalloc, (void *) VMALLOC_START,
106 VMALLOC_END - VMALLOC_START);
107
108 printk(KERN_INFO "Memory: %luk/%luk available (%ldk kernel code, "
109 "%ldk reserved, %ldk data, %ldk init, %ldk highmem)\n",
110 (unsigned long) nr_free_pages() << (PAGE_SHIFT-10),
111 ram << (PAGE_SHIFT-10), codesize >> 10,
112 reservedpages << (PAGE_SHIFT-10), datasize >> 10,
113 initsize >> 10,
114 (unsigned long) (totalhigh_pages << (PAGE_SHIFT-10)));
115}
116#endif /* !CONFIG_NEED_MULTIPLE_NODES */
117
118static void free_init_pages(const char *what, unsigned long begin, unsigned long end)
119{
120 unsigned long pfn;
121
122 for (pfn = PFN_UP(begin); pfn < PFN_DOWN(end); pfn++) {
123 struct page *page = pfn_to_page(pfn);
124 void *addr = phys_to_virt(PFN_PHYS(pfn));
125
126 ClearPageReserved(page);
127 init_page_count(page);
128 memset(addr, POISON_FREE_INITMEM, PAGE_SIZE);
129 __free_page(page);
130 totalram_pages++;
131 }
132 printk(KERN_INFO "Freeing %s: %ldk freed\n", what, (end - begin) >> 10);
133}
134
135#ifdef CONFIG_BLK_DEV_INITRD
136void free_initrd_mem(unsigned long start, unsigned long end)
137{
138 free_init_pages("initrd memory",
139 virt_to_phys((void *) start),
140 virt_to_phys((void *) end));
141}
142#endif
143
144void __init_refok free_initmem(void)
145{
146 free_init_pages("unused kernel memory",
147 __pa(&__init_begin),
148 __pa(&__init_end));
149}
150
151unsigned long pgd_current;
152
153#define __page_aligned(order) __attribute__((__aligned__(PAGE_SIZE<<order)))
154
155/*
156 * gcc 3.3 and older have trouble determining that PTRS_PER_PGD and PGD_ORDER
157 * are constants. So we use the variants from asm-offset.h until that gcc
158 * will officially be retired.
159 */
160pgd_t swapper_pg_dir[PTRS_PER_PGD] __page_aligned(PTE_ORDER);
161pte_t invalid_pte_table[PTRS_PER_PTE] __page_aligned(PTE_ORDER);
diff --git a/arch/score/mm/pgtable.c b/arch/score/mm/pgtable.c
new file mode 100644
index 000000000000..6408bb73d3cc
--- /dev/null
+++ b/arch/score/mm/pgtable.c
@@ -0,0 +1,52 @@
1/*
2 * arch/score/mm/pgtable-32.c
3 *
4 * Score Processor version.
5 *
6 * Copyright (C) 2009 Sunplus Core Technology Co., Ltd.
7 * Lennox Wu <lennox.wu@sunplusct.com>
8 * Chen Liqin <liqin.chen@sunplusct.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, see the file COPYING, or write
22 * to the Free Software Foundation, Inc.,
23 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 */
25
26#include <linux/bootmem.h>
27#include <linux/init.h>
28#include <linux/pfn.h>
29#include <linux/mm.h>
30
31void pgd_init(unsigned long page)
32{
33 unsigned long *p = (unsigned long *) page;
34 int i;
35
36 for (i = 0; i < USER_PTRS_PER_PGD; i += 8) {
37 p[i + 0] = (unsigned long) invalid_pte_table;
38 p[i + 1] = (unsigned long) invalid_pte_table;
39 p[i + 2] = (unsigned long) invalid_pte_table;
40 p[i + 3] = (unsigned long) invalid_pte_table;
41 p[i + 4] = (unsigned long) invalid_pte_table;
42 p[i + 5] = (unsigned long) invalid_pte_table;
43 p[i + 6] = (unsigned long) invalid_pte_table;
44 p[i + 7] = (unsigned long) invalid_pte_table;
45 }
46}
47
48void __init pagetable_init(void)
49{
50 /* Initialize the entire pgd. */
51 pgd_init((unsigned long)swapper_pg_dir);
52}
diff --git a/arch/score/mm/tlb-miss.S b/arch/score/mm/tlb-miss.S
new file mode 100644
index 000000000000..f27651914e8d
--- /dev/null
+++ b/arch/score/mm/tlb-miss.S
@@ -0,0 +1,199 @@
1/*
2 * arch/score/mm/tlbex.S
3 *
4 * Score Processor version.
5 *
6 * Copyright (C) 2009 Sunplus Core Technology Co., Ltd.
7 * Lennox Wu <lennox.wu@sunplusct.com>
8 * Chen Liqin <liqin.chen@sunplusct.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, see the file COPYING, or write
22 * to the Free Software Foundation, Inc.,
23 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 */
25
26#include <asm/asmmacro.h>
27#include <asm/pgtable-bits.h>
28#include <asm/scoreregs.h>
29
30/*
31* After this macro runs, the pte faulted on is
32* in register PTE, a ptr into the table in which
33* the pte belongs is in PTR.
34*/
35 .macro load_pte, pte, ptr
36 la \ptr, pgd_current
37 lw \ptr, [\ptr, 0]
38 mfcr \pte, cr6
39 srli \pte, \pte, 22
40 slli \pte, \pte, 2
41 add \ptr, \ptr, \pte
42 lw \ptr, [\ptr, 0]
43 mfcr \pte, cr6
44 srli \pte, \pte, 10
45 andi \pte, 0xffc
46 add \ptr, \ptr, \pte
47 lw \pte, [\ptr, 0]
48 .endm
49
50 .macro pte_reload, ptr
51 lw \ptr, [\ptr, 0]
52 mtcr \ptr, cr12
53 nop
54 nop
55 nop
56 nop
57 nop
58 .endm
59
60 .macro do_fault, write
61 SAVE_ALL
62 mfcr r6, cr6
63 mv r4, r0
64 ldi r5, \write
65 la r8, do_page_fault
66 brl r8
67 j ret_from_exception
68 .endm
69
70 .macro pte_writable, pte, ptr, label
71 andi \pte, 0x280
72 cmpi.c \pte, 0x280
73 bne \label
74 lw \pte, [\ptr, 0] /*reload PTE*/
75 .endm
76
77/*
78 * Make PTE writable, update software status bits as well,
79 * then store at PTR.
80 */
81 .macro pte_makewrite, pte, ptr
82 ori \pte, 0x426
83 sw \pte, [\ptr, 0]
84 .endm
85
86 .text
87ENTRY(score7_FTLB_refill_Handler)
88 la r31, pgd_current /* get pgd pointer */
89 lw r31, [r31, 0] /* get the address of PGD */
90 mfcr r30, cr6
91 srli r30, r30, 22 /* PGDIR_SHIFT = 22*/
92 slli r30, r30, 2
93 add r31, r31, r30
94 lw r31, [r31, 0] /* get the address of the start address of PTE table */
95
96 mfcr r30, cr9
97 andi r30, 0xfff /* equivalent to get PET index and right shift 2 bits */
98 add r31, r31, r30
99 lw r30, [r31, 0] /* load pte entry */
100 mtcr r30, cr12
101 nop
102 nop
103 nop
104 nop
105 nop
106 mtrtlb
107 nop
108 nop
109 nop
110 nop
111 nop
112 rte /* 6 cycles to make sure tlb entry works */
113
114ENTRY(score7_KSEG_refill_Handler)
115 la r31, pgd_current /* get pgd pointer */
116 lw r31, [r31, 0] /* get the address of PGD */
117 mfcr r30, cr6
118 srli r30, r30, 22 /* PGDIR_SHIFT = 22 */
119 slli r30, r30, 2
120 add r31, r31, r30
121 lw r31, [r31, 0] /* get the address of the start address of PTE table */
122
123 mfcr r30, cr6 /* get Bad VPN */
124 srli r30, r30, 10
125 andi r30, 0xffc /* PTE VPN mask (bit 11~2) */
126
127 add r31, r31, r30
128 lw r30, [r31, 0] /* load pte entry */
129 mtcr r30, cr12
130 nop
131 nop
132 nop
133 nop
134 nop
135 mtrtlb
136 nop
137 nop
138 nop
139 nop
140 nop
141 rte /* 6 cycles to make sure tlb entry works */
142
143nopage_tlbl:
144 do_fault 0 /* Read */
145
146ENTRY(handle_tlb_refill)
147 load_pte r30, r31
148 pte_writable r30, r31, handle_tlb_refill_nopage
149 pte_makewrite r30, r31 /* Access|Modify|Dirty|Valid */
150 pte_reload r31
151 mtrtlb
152 nop
153 nop
154 nop
155 nop
156 nop
157 rte
158handle_tlb_refill_nopage:
159 do_fault 0 /* Read */
160
161ENTRY(handle_tlb_invaild)
162 load_pte r30, r31
163 stlb /* find faulting entry */
164 pte_writable r30, r31, handle_tlb_invaild_nopage
165 pte_makewrite r30, r31 /* Access|Modify|Dirty|Valid */
166 pte_reload r31
167 mtptlb
168 nop
169 nop
170 nop
171 nop
172 nop
173 rte
174handle_tlb_invaild_nopage:
175 do_fault 0 /* Read */
176
177ENTRY(handle_mod)
178 load_pte r30, r31
179 stlb /* find faulting entry */
180 andi r30, _PAGE_WRITE /* Writable? */
181 cmpz.c r30
182 beq nowrite_mod
183 lw r30, [r31, 0] /* reload into r30 */
184
185 /* Present and writable bits set, set accessed and dirty bits. */
186 pte_makewrite r30, r31
187
188 /* Now reload the entry into the tlb. */
189 pte_reload r31
190 mtptlb
191 nop
192 nop
193 nop
194 nop
195 nop
196 rte
197
198nowrite_mod:
199 do_fault 1 /* Write */
diff --git a/arch/score/mm/tlb-score.c b/arch/score/mm/tlb-score.c
new file mode 100644
index 000000000000..4fa5aa5afecc
--- /dev/null
+++ b/arch/score/mm/tlb-score.c
@@ -0,0 +1,251 @@
1/*
2 * arch/score/mm/tlb-score.c
3 *
4 * Score Processor version.
5 *
6 * Copyright (C) 2009 Sunplus Core Technology Co., Ltd.
7 * Lennox Wu <lennox.wu@sunplusct.com>
8 * Chen Liqin <liqin.chen@sunplusct.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, see the file COPYING, or write
22 * to the Free Software Foundation, Inc.,
23 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 */
25
26#include <linux/highmem.h>
27#include <linux/module.h>
28
29#include <asm/irq.h>
30#include <asm/mmu_context.h>
31#include <asm/tlb.h>
32
33#define TLBSIZE 32
34
35unsigned long asid_cache = ASID_FIRST_VERSION;
36EXPORT_SYMBOL(asid_cache);
37
38void local_flush_tlb_all(void)
39{
40 unsigned long flags;
41 unsigned long old_ASID;
42 int entry;
43
44 local_irq_save(flags);
45 old_ASID = pevn_get() & ASID_MASK;
46 pectx_set(0); /* invalid */
47 entry = tlblock_get(); /* skip locked entries*/
48
49 for (; entry < TLBSIZE; entry++) {
50 tlbpt_set(entry);
51 pevn_set(KSEG1);
52 barrier();
53 tlb_write_indexed();
54 }
55 pevn_set(old_ASID);
56 local_irq_restore(flags);
57}
58
59/*
60 * If mm is currently active_mm, we can't really drop it. Instead,
61 * we will get a new one for it.
62 */
63static inline void
64drop_mmu_context(struct mm_struct *mm)
65{
66 unsigned long flags;
67
68 local_irq_save(flags);
69 get_new_mmu_context(mm);
70 pevn_set(mm->context & ASID_MASK);
71 local_irq_restore(flags);
72}
73
74void local_flush_tlb_mm(struct mm_struct *mm)
75{
76 if (mm->context != 0)
77 drop_mmu_context(mm);
78}
79
80void local_flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
81 unsigned long end)
82{
83 struct mm_struct *mm = vma->vm_mm;
84 unsigned long vma_mm_context = mm->context;
85 if (mm->context != 0) {
86 unsigned long flags;
87 int size;
88
89 local_irq_save(flags);
90 size = (end - start + (PAGE_SIZE - 1)) >> PAGE_SHIFT;
91 if (size <= TLBSIZE) {
92 int oldpid = pevn_get() & ASID_MASK;
93 int newpid = vma_mm_context & ASID_MASK;
94
95 start &= PAGE_MASK;
96 end += (PAGE_SIZE - 1);
97 end &= PAGE_MASK;
98 while (start < end) {
99 int idx;
100
101 pevn_set(start | newpid);
102 start += PAGE_SIZE;
103 barrier();
104 tlb_probe();
105 idx = tlbpt_get();
106 pectx_set(0);
107 pevn_set(KSEG1);
108 if (idx < 0)
109 continue;
110 tlb_write_indexed();
111 }
112 pevn_set(oldpid);
113 } else {
114 /* Bigger than TLBSIZE, get new ASID directly */
115 get_new_mmu_context(mm);
116 if (mm == current->active_mm)
117 pevn_set(vma_mm_context & ASID_MASK);
118 }
119 local_irq_restore(flags);
120 }
121}
122
123void local_flush_tlb_kernel_range(unsigned long start, unsigned long end)
124{
125 unsigned long flags;
126 int size;
127
128 local_irq_save(flags);
129 size = (end - start + (PAGE_SIZE - 1)) >> PAGE_SHIFT;
130 if (size <= TLBSIZE) {
131 int pid = pevn_get();
132
133 start &= PAGE_MASK;
134 end += PAGE_SIZE - 1;
135 end &= PAGE_MASK;
136
137 while (start < end) {
138 long idx;
139
140 pevn_set(start);
141 start += PAGE_SIZE;
142 tlb_probe();
143 idx = tlbpt_get();
144 if (idx < 0)
145 continue;
146 pectx_set(0);
147 pevn_set(KSEG1);
148 barrier();
149 tlb_write_indexed();
150 }
151 pevn_set(pid);
152 } else {
153 local_flush_tlb_all();
154 }
155
156 local_irq_restore(flags);
157}
158
159void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long page)
160{
161 if (!vma || vma->vm_mm->context != 0) {
162 unsigned long flags;
163 int oldpid, newpid, idx;
164 unsigned long vma_ASID = vma->vm_mm->context;
165
166 newpid = vma_ASID & ASID_MASK;
167 page &= PAGE_MASK;
168 local_irq_save(flags);
169 oldpid = pevn_get() & ASID_MASK;
170 pevn_set(page | newpid);
171 barrier();
172 tlb_probe();
173 idx = tlbpt_get();
174 pectx_set(0);
175 pevn_set(KSEG1);
176 if (idx < 0) /* p_bit(31) - 1: miss, 0: hit*/
177 goto finish;
178 barrier();
179 tlb_write_indexed();
180finish:
181 pevn_set(oldpid);
182 local_irq_restore(flags);
183 }
184}
185
186/*
187 * This one is only used for pages with the global bit set so we don't care
188 * much about the ASID.
189 */
190void local_flush_tlb_one(unsigned long page)
191{
192 unsigned long flags;
193 int oldpid, idx;
194
195 local_irq_save(flags);
196 oldpid = pevn_get();
197 page &= (PAGE_MASK << 1);
198 pevn_set(page);
199 barrier();
200 tlb_probe();
201 idx = tlbpt_get();
202 pectx_set(0);
203 if (idx >= 0) {
204 /* Make sure all entries differ. */
205 pevn_set(KSEG1);
206 barrier();
207 tlb_write_indexed();
208 }
209 pevn_set(oldpid);
210 local_irq_restore(flags);
211}
212
213void __update_tlb(struct vm_area_struct *vma, unsigned long address, pte_t pte)
214{
215 unsigned long flags;
216 int idx, pid;
217
218 /*
219 * Handle debugger faulting in for debugee.
220 */
221 if (current->active_mm != vma->vm_mm)
222 return;
223
224 pid = pevn_get() & ASID_MASK;
225
226 local_irq_save(flags);
227 address &= PAGE_MASK;
228 pevn_set(address | pid);
229 barrier();
230 tlb_probe();
231 idx = tlbpt_get();
232 pectx_set(pte_val(pte));
233 pevn_set(address | pid);
234 if (idx < 0)
235 tlb_write_random();
236 else
237 tlb_write_indexed();
238
239 pevn_set(pid);
240 local_irq_restore(flags);
241}
242
243void __cpuinit tlb_init(void)
244{
245 tlblock_set(0);
246 local_flush_tlb_all();
247 memcpy((void *)(EXCEPTION_VECTOR_BASE_ADDR + 0x100),
248 &score7_FTLB_refill_Handler, 0xFC);
249 flush_icache_range(EXCEPTION_VECTOR_BASE_ADDR + 0x100,
250 EXCEPTION_VECTOR_BASE_ADDR + 0x1FC);
251}
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index e2bdd7b94fd9..b940424f8ccc 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -10,12 +10,17 @@ config SUPERH
10 select EMBEDDED 10 select EMBEDDED
11 select HAVE_CLK 11 select HAVE_CLK
12 select HAVE_IDE 12 select HAVE_IDE
13 select HAVE_LMB
13 select HAVE_OPROFILE 14 select HAVE_OPROFILE
14 select HAVE_GENERIC_DMA_COHERENT 15 select HAVE_GENERIC_DMA_COHERENT
15 select HAVE_IOREMAP_PROT if MMU 16 select HAVE_IOREMAP_PROT if MMU
16 select HAVE_ARCH_TRACEHOOK 17 select HAVE_ARCH_TRACEHOOK
17 select HAVE_DMA_API_DEBUG 18 select HAVE_DMA_API_DEBUG
18 select HAVE_PERF_COUNTERS 19 select HAVE_PERF_EVENTS
20 select HAVE_KERNEL_GZIP
21 select HAVE_KERNEL_BZIP2
22 select HAVE_KERNEL_LZMA
23 select HAVE_SYSCALL_TRACEPOINTS
19 select RTC_LIB 24 select RTC_LIB
20 select GENERIC_ATOMIC64 25 select GENERIC_ATOMIC64
21 help 26 help
@@ -31,6 +36,9 @@ config SUPERH32
31 select HAVE_FUNCTION_TRACER 36 select HAVE_FUNCTION_TRACER
32 select HAVE_FTRACE_MCOUNT_RECORD 37 select HAVE_FTRACE_MCOUNT_RECORD
33 select HAVE_DYNAMIC_FTRACE 38 select HAVE_DYNAMIC_FTRACE
39 select HAVE_FUNCTION_TRACE_MCOUNT_TEST
40 select HAVE_FTRACE_SYSCALLS
41 select HAVE_FUNCTION_GRAPH_TRACER
34 select HAVE_ARCH_KGDB 42 select HAVE_ARCH_KGDB
35 select ARCH_HIBERNATION_POSSIBLE if MMU 43 select ARCH_HIBERNATION_POSSIBLE if MMU
36 44
@@ -212,6 +220,8 @@ config CPU_SHX3
212config ARCH_SHMOBILE 220config ARCH_SHMOBILE
213 bool 221 bool
214 select ARCH_SUSPEND_POSSIBLE 222 select ARCH_SUSPEND_POSSIBLE
223 select PM
224 select PM_RUNTIME
215 225
216if SUPERH32 226if SUPERH32
217 227
@@ -389,6 +399,13 @@ config CPU_SUBTYPE_SH7724
389 help 399 help
390 Select SH7724 if you have an SH-MobileR2R CPU. 400 Select SH7724 if you have an SH-MobileR2R CPU.
391 401
402config CPU_SUBTYPE_SH7757
403 bool "Support SH7757 processor"
404 select CPU_SH4A
405 select CPU_SHX2
406 help
407 Select SH7757 if you have a SH4A SH7757 CPU.
408
392config CPU_SUBTYPE_SH7763 409config CPU_SUBTYPE_SH7763
393 bool "Support SH7763 processor" 410 bool "Support SH7763 processor"
394 select CPU_SH4A 411 select CPU_SH4A
@@ -751,12 +768,31 @@ config UBC_WAKEUP
751 768
752 If unsure, say N. 769 If unsure, say N.
753 770
754config CMDLINE_BOOL 771choice
755 bool "Default bootloader kernel arguments" 772 prompt "Kernel command line"
773 optional
774 default CMDLINE_OVERWRITE
775 help
776 Setting this option allows the kernel command line arguments
777 to be set.
778
779config CMDLINE_OVERWRITE
780 bool "Overwrite bootloader kernel arguments"
781 help
782 Given string will overwrite any arguments passed in by
783 a bootloader.
784
785config CMDLINE_EXTEND
786 bool "Extend bootloader kernel arguments"
787 help
788 Given string will be concatenated with arguments passed in
789 by a bootloader.
790
791endchoice
756 792
757config CMDLINE 793config CMDLINE
758 string "Initial kernel command string" 794 string "Kernel command line arguments string"
759 depends on CMDLINE_BOOL 795 depends on CMDLINE_OVERWRITE || CMDLINE_EXTEND
760 default "console=ttySC1,115200" 796 default "console=ttySC1,115200"
761 797
762endmenu 798endmenu
diff --git a/arch/sh/Kconfig.debug b/arch/sh/Kconfig.debug
index 39224b57c6ef..55907af1dc25 100644
--- a/arch/sh/Kconfig.debug
+++ b/arch/sh/Kconfig.debug
@@ -38,11 +38,13 @@ config EARLY_SCIF_CONSOLE_PORT
38 default "0xffe00000" if CPU_SUBTYPE_SH7780 || CPU_SUBTYPE_SH7763 || \ 38 default "0xffe00000" if CPU_SUBTYPE_SH7780 || CPU_SUBTYPE_SH7763 || \
39 CPU_SUBTYPE_SH7722 || CPU_SUBTYPE_SH7366 || \ 39 CPU_SUBTYPE_SH7722 || CPU_SUBTYPE_SH7366 || \
40 CPU_SUBTYPE_SH7343 40 CPU_SUBTYPE_SH7343
41 default "0xffea0000" if CPU_SUBTYPE_SH7785 41 default "0xfe4c0000" if CPU_SUBTYPE_SH7757
42 default "0xffeb0000" if CPU_SUBTYPE_SH7785
42 default "0xffeb0000" if CPU_SUBTYPE_SH7786 43 default "0xffeb0000" if CPU_SUBTYPE_SH7786
43 default "0xfffe8000" if CPU_SUBTYPE_SH7203 44 default "0xfffe8000" if CPU_SUBTYPE_SH7203
44 default "0xfffe9800" if CPU_SUBTYPE_SH7206 || CPU_SUBTYPE_SH7263 45 default "0xfffe9800" if CPU_SUBTYPE_SH7206 || CPU_SUBTYPE_SH7263
45 default "0xffe80000" if CPU_SH4 46 default "0xffe80000" if CPU_SH4
47 default "0xa4000150" if CPU_SH3
46 default "0x00000000" 48 default "0x00000000"
47 49
48config EARLY_PRINTK 50config EARLY_PRINTK
@@ -61,12 +63,14 @@ config EARLY_PRINTK
61 select both the EARLY_SCIF_CONSOLE and SH_STANDARD_BIOS, using 63 select both the EARLY_SCIF_CONSOLE and SH_STANDARD_BIOS, using
62 the kernel command line option to toggle back and forth. 64 the kernel command line option to toggle back and forth.
63 65
64config DEBUG_STACKOVERFLOW 66config STACK_DEBUG
65 bool "Check for stack overflows" 67 bool "Check for stack overflows"
66 depends on DEBUG_KERNEL && SUPERH32 68 depends on DEBUG_KERNEL && SUPERH32
67 help 69 help
68 This option will cause messages to be printed if free stack space 70 This option will cause messages to be printed if free stack space
69 drops below a certain limit. 71 drops below a certain limit. Saying Y here will add overhead to
72 every function call and will therefore incur a major
73 performance hit. Most users should say N.
70 74
71config DEBUG_STACK_USAGE 75config DEBUG_STACK_USAGE
72 bool "Stack utilization instrumentation" 76 bool "Stack utilization instrumentation"
@@ -107,6 +111,14 @@ config DUMP_CODE
107 111
108 Those looking for more verbose debugging output should say Y. 112 Those looking for more verbose debugging output should say Y.
109 113
114config DWARF_UNWINDER
115 bool "Enable the DWARF unwinder for stacktraces"
116 select FRAME_POINTER
117 default n
118 help
119 Enabling this option will make stacktraces more accurate, at
120 the cost of an increase in overall kernel size.
121
110config SH_NO_BSS_INIT 122config SH_NO_BSS_INIT
111 bool "Avoid zeroing BSS (to speed-up startup on suitable platforms)" 123 bool "Avoid zeroing BSS (to speed-up startup on suitable platforms)"
112 depends on DEBUG_KERNEL 124 depends on DEBUG_KERNEL
@@ -123,4 +135,9 @@ config SH64_SR_WATCH
123 bool "Debug: set SR.WATCH to enable hardware watchpoints and trace" 135 bool "Debug: set SR.WATCH to enable hardware watchpoints and trace"
124 depends on SUPERH64 136 depends on SUPERH64
125 137
138config MCOUNT
139 def_bool y
140 depends on SUPERH32
141 depends on STACK_DEBUG || FUNCTION_TRACER
142
126endmenu 143endmenu
diff --git a/arch/sh/Makefile b/arch/sh/Makefile
index 75d049b03f7e..fc51a918b31a 100644
--- a/arch/sh/Makefile
+++ b/arch/sh/Makefile
@@ -136,6 +136,8 @@ machdir-$(CONFIG_SH_7751_SYSTEMH) += mach-systemh
136machdir-$(CONFIG_SH_EDOSK7705) += mach-edosk7705 136machdir-$(CONFIG_SH_EDOSK7705) += mach-edosk7705
137machdir-$(CONFIG_SH_HIGHLANDER) += mach-highlander 137machdir-$(CONFIG_SH_HIGHLANDER) += mach-highlander
138machdir-$(CONFIG_SH_MIGOR) += mach-migor 138machdir-$(CONFIG_SH_MIGOR) += mach-migor
139machdir-$(CONFIG_SH_KFR2R09) += mach-kfr2r09
140machdir-$(CONFIG_SH_ECOVEC) += mach-ecovec24
139machdir-$(CONFIG_SH_SDK7780) += mach-sdk7780 141machdir-$(CONFIG_SH_SDK7780) += mach-sdk7780
140machdir-$(CONFIG_SH_X3PROTO) += mach-x3proto 142machdir-$(CONFIG_SH_X3PROTO) += mach-x3proto
141machdir-$(CONFIG_SH_SH7763RDP) += mach-sh7763rdp 143machdir-$(CONFIG_SH_SH7763RDP) += mach-sh7763rdp
@@ -186,17 +188,27 @@ KBUILD_CFLAGS += -pipe $(cflags-y)
186KBUILD_CPPFLAGS += $(cflags-y) 188KBUILD_CPPFLAGS += $(cflags-y)
187KBUILD_AFLAGS += $(cflags-y) 189KBUILD_AFLAGS += $(cflags-y)
188 190
191ifeq ($(CONFIG_MCOUNT),y)
192 KBUILD_CFLAGS += -pg
193endif
194
195ifeq ($(CONFIG_DWARF_UNWINDER),y)
196 KBUILD_CFLAGS += -fasynchronous-unwind-tables
197endif
198
189libs-$(CONFIG_SUPERH32) := arch/sh/lib/ $(libs-y) 199libs-$(CONFIG_SUPERH32) := arch/sh/lib/ $(libs-y)
190libs-$(CONFIG_SUPERH64) := arch/sh/lib64/ $(libs-y) 200libs-$(CONFIG_SUPERH64) := arch/sh/lib64/ $(libs-y)
191 201
192PHONY += maketools FORCE 202BOOT_TARGETS = uImage uImage.bz2 uImage.gz uImage.lzma uImage.srec \
203 zImage vmlinux.srec romImage
204PHONY += maketools $(BOOT_TARGETS) FORCE
193 205
194maketools: include/linux/version.h FORCE 206maketools: include/linux/version.h FORCE
195 $(Q)$(MAKE) $(build)=arch/sh/tools include/asm-sh/machtypes.h 207 $(Q)$(MAKE) $(build)=arch/sh/tools include/asm-sh/machtypes.h
196 208
197all: $(KBUILD_IMAGE) 209all: $(KBUILD_IMAGE)
198 210
199zImage uImage uImage.srec vmlinux.srec: vmlinux 211$(BOOT_TARGETS): vmlinux
200 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ 212 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
201 213
202compressed: zImage 214compressed: zImage
@@ -208,10 +220,14 @@ archclean:
208 $(Q)$(MAKE) $(clean)=arch/sh/kernel/vsyscall 220 $(Q)$(MAKE) $(clean)=arch/sh/kernel/vsyscall
209 221
210define archhelp 222define archhelp
211 @echo '* zImage - Compressed kernel image' 223 @echo ' zImage - Compressed kernel image'
224 @echo ' romImage - Compressed ROM image, if supported'
212 @echo ' vmlinux.srec - Create an ELF S-record' 225 @echo ' vmlinux.srec - Create an ELF S-record'
213 @echo ' uImage - Create a bootable image for U-Boot' 226 @echo '* uImage - Alias to bootable U-Boot image'
214 @echo ' uImage.srec - Create an S-record for U-Boot' 227 @echo ' uImage.srec - Create an S-record for U-Boot'
228 @echo '* uImage.gz - Kernel-only image for U-Boot (gzip)'
229 @echo ' uImage.bz2 - Kernel-only image for U-Boot (bzip2)'
230 @echo ' uImage.lzma - Kernel-only image for U-Boot (lzma)'
215endef 231endef
216 232
217CLEAN_FILES += include/asm-sh/machtypes.h 233CLEAN_FILES += include/asm-sh/machtypes.h
diff --git a/arch/sh/boards/Kconfig b/arch/sh/boards/Kconfig
index 2b1af0eefa6a..aedd9deb5de2 100644
--- a/arch/sh/boards/Kconfig
+++ b/arch/sh/boards/Kconfig
@@ -160,7 +160,6 @@ config SH_SH7785LCR
160 bool "SH7785LCR" 160 bool "SH7785LCR"
161 depends on CPU_SUBTYPE_SH7785 161 depends on CPU_SUBTYPE_SH7785
162 select SYS_SUPPORTS_PCI 162 select SYS_SUPPORTS_PCI
163 select IO_TRAPPED if MMU
164 163
165config SH_SH7785LCR_29BIT_PHYSMAPS 164config SH_SH7785LCR_29BIT_PHYSMAPS
166 bool "SH7785LCR 29bit physmaps" 165 bool "SH7785LCR 29bit physmaps"
@@ -171,6 +170,13 @@ config SH_SH7785LCR_29BIT_PHYSMAPS
171 DIP switch(S2-5). If you set the DIP switch for S2-5 = ON, 170 DIP switch(S2-5). If you set the DIP switch for S2-5 = ON,
172 you can access all on-board device in 29bit address mode. 171 you can access all on-board device in 29bit address mode.
173 172
173config SH_SH7785LCR_PT
174 bool "SH7785LCR prototype board on 32-bit MMU mode"
175 depends on SH_SH7785LCR && 32BIT
176 default n
177 help
178 If you use prototype board, this option is enabled.
179
174config SH_URQUELL 180config SH_URQUELL
175 bool "Urquell" 181 bool "Urquell"
176 depends on CPU_SUBTYPE_SH7786 182 depends on CPU_SUBTYPE_SH7786
@@ -193,6 +199,20 @@ config SH_AP325RXA
193 Renesas "AP-325RXA" support. 199 Renesas "AP-325RXA" support.
194 Compatible with ALGO SYSTEM CO.,LTD. "AP-320A" 200 Compatible with ALGO SYSTEM CO.,LTD. "AP-320A"
195 201
202config SH_KFR2R09
203 bool "KFR2R09"
204 depends on CPU_SUBTYPE_SH7724
205 select ARCH_REQUIRE_GPIOLIB
206 help
207 "Kit For R2R for 2009" support.
208
209config SH_ECOVEC
210 bool "EcoVec"
211 depends on CPU_SUBTYPE_SH7724
212 select ARCH_REQUIRE_GPIOLIB
213 help
214 Renesas "R0P7724LC0011/21RL (EcoVec)" support.
215
196config SH_SH7763RDP 216config SH_SH7763RDP
197 bool "SH7763RDP" 217 bool "SH7763RDP"
198 depends on CPU_SUBTYPE_SH7763 218 depends on CPU_SUBTYPE_SH7763
diff --git a/arch/sh/boards/board-ap325rxa.c b/arch/sh/boards/board-ap325rxa.c
index b9c88cc519e2..2d080732a964 100644
--- a/arch/sh/boards/board-ap325rxa.c
+++ b/arch/sh/boards/board-ap325rxa.c
@@ -188,7 +188,7 @@ static struct sh_mobile_lcdc_info lcdc_info = {
188 .name = "LB070WV1", 188 .name = "LB070WV1",
189 .xres = 800, 189 .xres = 800,
190 .yres = 480, 190 .yres = 480,
191 .left_margin = 40, 191 .left_margin = 32,
192 .right_margin = 160, 192 .right_margin = 160,
193 .hsync_len = 8, 193 .hsync_len = 8,
194 .upper_margin = 63, 194 .upper_margin = 63,
@@ -211,7 +211,7 @@ static struct resource lcdc_resources[] = {
211 [0] = { 211 [0] = {
212 .name = "LCDC", 212 .name = "LCDC",
213 .start = 0xfe940000, /* P4-only space */ 213 .start = 0xfe940000, /* P4-only space */
214 .end = 0xfe941fff, 214 .end = 0xfe942fff,
215 .flags = IORESOURCE_MEM, 215 .flags = IORESOURCE_MEM,
216 }, 216 },
217 [1] = { 217 [1] = {
@@ -227,6 +227,9 @@ static struct platform_device lcdc_device = {
227 .dev = { 227 .dev = {
228 .platform_data = &lcdc_info, 228 .platform_data = &lcdc_info,
229 }, 229 },
230 .archdata = {
231 .hwblk_id = HWBLK_LCDC,
232 },
230}; 233};
231 234
232static void camera_power(int val) 235static void camera_power(int val)
@@ -307,8 +310,10 @@ static int camera_set_capture(struct soc_camera_platform_info *info,
307 return ret; 310 return ret;
308} 311}
309 312
313static int ap325rxa_camera_add(struct soc_camera_link *icl, struct device *dev);
314static void ap325rxa_camera_del(struct soc_camera_link *icl);
315
310static struct soc_camera_platform_info camera_info = { 316static struct soc_camera_platform_info camera_info = {
311 .iface = 0,
312 .format_name = "UYVY", 317 .format_name = "UYVY",
313 .format_depth = 16, 318 .format_depth = 16,
314 .format = { 319 .format = {
@@ -320,24 +325,46 @@ static struct soc_camera_platform_info camera_info = {
320 .bus_param = SOCAM_PCLK_SAMPLE_RISING | SOCAM_HSYNC_ACTIVE_HIGH | 325 .bus_param = SOCAM_PCLK_SAMPLE_RISING | SOCAM_HSYNC_ACTIVE_HIGH |
321 SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_MASTER | SOCAM_DATAWIDTH_8, 326 SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_MASTER | SOCAM_DATAWIDTH_8,
322 .set_capture = camera_set_capture, 327 .set_capture = camera_set_capture,
328 .link = {
329 .bus_id = 0,
330 .add_device = ap325rxa_camera_add,
331 .del_device = ap325rxa_camera_del,
332 .module_name = "soc_camera_platform",
333 },
323}; 334};
324 335
336static void dummy_release(struct device *dev)
337{
338}
339
325static struct platform_device camera_device = { 340static struct platform_device camera_device = {
326 .name = "soc_camera_platform", 341 .name = "soc_camera_platform",
327 .dev = { 342 .dev = {
328 .platform_data = &camera_info, 343 .platform_data = &camera_info,
344 .release = dummy_release,
329 }, 345 },
330}; 346};
331 347
332static int __init camera_setup(void) 348static int ap325rxa_camera_add(struct soc_camera_link *icl,
349 struct device *dev)
333{ 350{
334 if (camera_probe() > 0) 351 if (icl != &camera_info.link || camera_probe() <= 0)
335 platform_device_register(&camera_device); 352 return -ENODEV;
336 353
337 return 0; 354 camera_info.dev = dev;
355
356 return platform_device_register(&camera_device);
338} 357}
339late_initcall(camera_setup);
340 358
359static void ap325rxa_camera_del(struct soc_camera_link *icl)
360{
361 if (icl != &camera_info.link)
362 return;
363
364 platform_device_unregister(&camera_device);
365 memset(&camera_device.dev.kobj, 0,
366 sizeof(camera_device.dev.kobj));
367}
341#endif /* CONFIG_I2C */ 368#endif /* CONFIG_I2C */
342 369
343static int ov7725_power(struct device *dev, int mode) 370static int ov7725_power(struct device *dev, int mode)
@@ -377,6 +404,9 @@ static struct platform_device ceu_device = {
377 .dev = { 404 .dev = {
378 .platform_data = &sh_mobile_ceu_info, 405 .platform_data = &sh_mobile_ceu_info,
379 }, 406 },
407 .archdata = {
408 .hwblk_id = HWBLK_CEU,
409 },
380}; 410};
381 411
382struct spi_gpio_platform_data sdcard_cn3_platform_data = { 412struct spi_gpio_platform_data sdcard_cn3_platform_data = {
@@ -410,6 +440,7 @@ static struct ov772x_camera_info ov7725_info = {
410 .flags = OV772X_FLAG_VFLIP | OV772X_FLAG_HFLIP, 440 .flags = OV772X_FLAG_VFLIP | OV772X_FLAG_HFLIP,
411 .edgectrl = OV772X_AUTO_EDGECTRL(0xf, 0), 441 .edgectrl = OV772X_AUTO_EDGECTRL(0xf, 0),
412 .link = { 442 .link = {
443 .bus_id = 0,
413 .power = ov7725_power, 444 .power = ov7725_power,
414 .board_info = &ap325rxa_i2c_camera[0], 445 .board_info = &ap325rxa_i2c_camera[0],
415 .i2c_adapter_id = 0, 446 .i2c_adapter_id = 0,
@@ -417,11 +448,19 @@ static struct ov772x_camera_info ov7725_info = {
417 }, 448 },
418}; 449};
419 450
420static struct platform_device ap325rxa_camera = { 451static struct platform_device ap325rxa_camera[] = {
421 .name = "soc-camera-pdrv", 452 {
422 .id = 0, 453 .name = "soc-camera-pdrv",
423 .dev = { 454 .id = 0,
424 .platform_data = &ov7725_info.link, 455 .dev = {
456 .platform_data = &ov7725_info.link,
457 },
458 }, {
459 .name = "soc-camera-pdrv",
460 .id = 1,
461 .dev = {
462 .platform_data = &camera_info.link,
463 },
425 }, 464 },
426}; 465};
427 466
@@ -432,7 +471,8 @@ static struct platform_device *ap325rxa_devices[] __initdata = {
432 &ceu_device, 471 &ceu_device,
433 &nand_flash_device, 472 &nand_flash_device,
434 &sdcard_cn3_device, 473 &sdcard_cn3_device,
435 &ap325rxa_camera, 474 &ap325rxa_camera[0],
475 &ap325rxa_camera[1],
436}; 476};
437 477
438static struct spi_board_info ap325rxa_spi_devices[] = { 478static struct spi_board_info ap325rxa_spi_devices[] = {
diff --git a/arch/sh/boards/board-sh7785lcr.c b/arch/sh/boards/board-sh7785lcr.c
index 42410a15d255..e5a8a2fde39c 100644
--- a/arch/sh/boards/board-sh7785lcr.c
+++ b/arch/sh/boards/board-sh7785lcr.c
@@ -223,6 +223,19 @@ static struct platform_device sm501_device = {
223 .resource = sm501_resources, 223 .resource = sm501_resources,
224}; 224};
225 225
226static struct resource i2c_proto_resources[] = {
227 [0] = {
228 .start = PCA9564_PROTO_32BIT_ADDR,
229 .end = PCA9564_PROTO_32BIT_ADDR + PCA9564_SIZE - 1,
230 .flags = IORESOURCE_MEM | IORESOURCE_MEM_8BIT,
231 },
232 [1] = {
233 .start = 12,
234 .end = 12,
235 .flags = IORESOURCE_IRQ,
236 },
237};
238
226static struct resource i2c_resources[] = { 239static struct resource i2c_resources[] = {
227 [0] = { 240 [0] = {
228 .start = PCA9564_ADDR, 241 .start = PCA9564_ADDR,
@@ -271,6 +284,11 @@ static int __init sh7785lcr_devices_setup(void)
271 i2c_register_board_info(0, sh7785lcr_i2c_devices, 284 i2c_register_board_info(0, sh7785lcr_i2c_devices,
272 ARRAY_SIZE(sh7785lcr_i2c_devices)); 285 ARRAY_SIZE(sh7785lcr_i2c_devices));
273 286
287 if (mach_is_sh7785lcr_pt()) {
288 i2c_device.resource = i2c_proto_resources;
289 i2c_device.num_resources = ARRAY_SIZE(i2c_proto_resources);
290 }
291
274 return platform_add_devices(sh7785lcr_devices, 292 return platform_add_devices(sh7785lcr_devices,
275 ARRAY_SIZE(sh7785lcr_devices)); 293 ARRAY_SIZE(sh7785lcr_devices));
276} 294}
diff --git a/arch/sh/boards/mach-ecovec24/Makefile b/arch/sh/boards/mach-ecovec24/Makefile
new file mode 100644
index 000000000000..51f852151655
--- /dev/null
+++ b/arch/sh/boards/mach-ecovec24/Makefile
@@ -0,0 +1,9 @@
1#
2# Makefile for the R0P7724LC0011/21RL (EcoVec)
3#
4# This file is subject to the terms and conditions of the GNU General Public
5# License. See the file "COPYING" in the main directory of this archive
6# for more details.
7#
8
9obj-y := setup.o \ No newline at end of file
diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c
new file mode 100644
index 000000000000..5f9881e16e2f
--- /dev/null
+++ b/arch/sh/boards/mach-ecovec24/setup.c
@@ -0,0 +1,671 @@
1/*
2 * Copyright (C) 2009 Renesas Solutions Corp.
3 *
4 * Kuninori Morimoto <morimoto.kuninori@renesas.com>
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 */
10
11#include <linux/init.h>
12#include <linux/device.h>
13#include <linux/platform_device.h>
14#include <linux/mtd/physmap.h>
15#include <linux/gpio.h>
16#include <linux/interrupt.h>
17#include <linux/io.h>
18#include <linux/delay.h>
19#include <linux/usb/r8a66597.h>
20#include <linux/i2c.h>
21#include <linux/input.h>
22#include <video/sh_mobile_lcdc.h>
23#include <media/sh_mobile_ceu.h>
24#include <asm/heartbeat.h>
25#include <asm/sh_eth.h>
26#include <asm/sh_keysc.h>
27#include <asm/clock.h>
28#include <cpu/sh7724.h>
29
30/*
31 * Address Interface BusWidth
32 *-----------------------------------------
33 * 0x0000_0000 uboot 16bit
34 * 0x0004_0000 Linux romImage 16bit
35 * 0x0014_0000 MTD for Linux 16bit
36 * 0x0400_0000 Internal I/O 16/32bit
37 * 0x0800_0000 DRAM 32bit
38 * 0x1800_0000 MFI 16bit
39 */
40
41/* Heartbeat */
42static unsigned char led_pos[] = { 0, 1, 2, 3 };
43static struct heartbeat_data heartbeat_data = {
44 .regsize = 8,
45 .nr_bits = 4,
46 .bit_pos = led_pos,
47};
48
49static struct resource heartbeat_resources[] = {
50 [0] = {
51 .start = 0xA405012C, /* PTG */
52 .end = 0xA405012E - 1,
53 .flags = IORESOURCE_MEM,
54 },
55};
56
57static struct platform_device heartbeat_device = {
58 .name = "heartbeat",
59 .id = -1,
60 .dev = {
61 .platform_data = &heartbeat_data,
62 },
63 .num_resources = ARRAY_SIZE(heartbeat_resources),
64 .resource = heartbeat_resources,
65};
66
67/* MTD */
68static struct mtd_partition nor_flash_partitions[] = {
69 {
70 .name = "boot loader",
71 .offset = 0,
72 .size = (5 * 1024 * 1024),
73 .mask_flags = MTD_CAP_ROM,
74 }, {
75 .name = "free-area",
76 .offset = MTDPART_OFS_APPEND,
77 .size = MTDPART_SIZ_FULL,
78 },
79};
80
81static struct physmap_flash_data nor_flash_data = {
82 .width = 2,
83 .parts = nor_flash_partitions,
84 .nr_parts = ARRAY_SIZE(nor_flash_partitions),
85};
86
87static struct resource nor_flash_resources[] = {
88 [0] = {
89 .name = "NOR Flash",
90 .start = 0x00000000,
91 .end = 0x03ffffff,
92 .flags = IORESOURCE_MEM,
93 }
94};
95
96static struct platform_device nor_flash_device = {
97 .name = "physmap-flash",
98 .resource = nor_flash_resources,
99 .num_resources = ARRAY_SIZE(nor_flash_resources),
100 .dev = {
101 .platform_data = &nor_flash_data,
102 },
103};
104
105/* SH Eth */
106#define SH_ETH_ADDR (0xA4600000)
107#define SH_ETH_MAHR (SH_ETH_ADDR + 0x1C0)
108#define SH_ETH_MALR (SH_ETH_ADDR + 0x1C8)
109static struct resource sh_eth_resources[] = {
110 [0] = {
111 .start = SH_ETH_ADDR,
112 .end = SH_ETH_ADDR + 0x1FC,
113 .flags = IORESOURCE_MEM,
114 },
115 [1] = {
116 .start = 91,
117 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
118 },
119};
120
121struct sh_eth_plat_data sh_eth_plat = {
122 .phy = 0x1f, /* SMSC LAN8700 */
123 .edmac_endian = EDMAC_LITTLE_ENDIAN,
124 .ether_link_active_low = 1
125};
126
127static struct platform_device sh_eth_device = {
128 .name = "sh-eth",
129 .id = 0,
130 .dev = {
131 .platform_data = &sh_eth_plat,
132 },
133 .num_resources = ARRAY_SIZE(sh_eth_resources),
134 .resource = sh_eth_resources,
135};
136
137/* USB0 host */
138void usb0_port_power(int port, int power)
139{
140 gpio_set_value(GPIO_PTB4, power);
141}
142
143static struct r8a66597_platdata usb0_host_data = {
144 .on_chip = 1,
145 .port_power = usb0_port_power,
146};
147
148static struct resource usb0_host_resources[] = {
149 [0] = {
150 .start = 0xa4d80000,
151 .end = 0xa4d80124 - 1,
152 .flags = IORESOURCE_MEM,
153 },
154 [1] = {
155 .start = 65,
156 .end = 65,
157 .flags = IORESOURCE_IRQ | IRQF_TRIGGER_LOW,
158 },
159};
160
161static struct platform_device usb0_host_device = {
162 .name = "r8a66597_hcd",
163 .id = 0,
164 .dev = {
165 .dma_mask = NULL, /* not use dma */
166 .coherent_dma_mask = 0xffffffff,
167 .platform_data = &usb0_host_data,
168 },
169 .num_resources = ARRAY_SIZE(usb0_host_resources),
170 .resource = usb0_host_resources,
171};
172
173/*
174 * USB1
175 *
176 * CN5 can use both host/function,
177 * and we can determine it by checking PTB[3]
178 *
179 * This time only USB1 host is supported.
180 */
181void usb1_port_power(int port, int power)
182{
183 if (!gpio_get_value(GPIO_PTB3)) {
184 printk(KERN_ERR "USB1 function is not supported\n");
185 return;
186 }
187
188 gpio_set_value(GPIO_PTB5, power);
189}
190
191static struct r8a66597_platdata usb1_host_data = {
192 .on_chip = 1,
193 .port_power = usb1_port_power,
194};
195
196static struct resource usb1_host_resources[] = {
197 [0] = {
198 .start = 0xa4d90000,
199 .end = 0xa4d90124 - 1,
200 .flags = IORESOURCE_MEM,
201 },
202 [1] = {
203 .start = 66,
204 .end = 66,
205 .flags = IORESOURCE_IRQ | IRQF_TRIGGER_LOW,
206 },
207};
208
209static struct platform_device usb1_host_device = {
210 .name = "r8a66597_hcd",
211 .id = 1,
212 .dev = {
213 .dma_mask = NULL, /* not use dma */
214 .coherent_dma_mask = 0xffffffff,
215 .platform_data = &usb1_host_data,
216 },
217 .num_resources = ARRAY_SIZE(usb1_host_resources),
218 .resource = usb1_host_resources,
219};
220
221/* LCDC */
222static struct sh_mobile_lcdc_info lcdc_info = {
223 .ch[0] = {
224 .interface_type = RGB18,
225 .chan = LCDC_CHAN_MAINLCD,
226 .bpp = 16,
227 .lcd_cfg = {
228 .sync = 0, /* hsync and vsync are active low */
229 },
230 .lcd_size_cfg = { /* 7.0 inch */
231 .width = 152,
232 .height = 91,
233 },
234 .board_cfg = {
235 },
236 }
237};
238
239static struct resource lcdc_resources[] = {
240 [0] = {
241 .name = "LCDC",
242 .start = 0xfe940000,
243 .end = 0xfe942fff,
244 .flags = IORESOURCE_MEM,
245 },
246 [1] = {
247 .start = 106,
248 .flags = IORESOURCE_IRQ,
249 },
250};
251
252static struct platform_device lcdc_device = {
253 .name = "sh_mobile_lcdc_fb",
254 .num_resources = ARRAY_SIZE(lcdc_resources),
255 .resource = lcdc_resources,
256 .dev = {
257 .platform_data = &lcdc_info,
258 },
259 .archdata = {
260 .hwblk_id = HWBLK_LCDC,
261 },
262};
263
264/* CEU0 */
265static struct sh_mobile_ceu_info sh_mobile_ceu0_info = {
266 .flags = SH_CEU_FLAG_USE_8BIT_BUS,
267};
268
269static struct resource ceu0_resources[] = {
270 [0] = {
271 .name = "CEU0",
272 .start = 0xfe910000,
273 .end = 0xfe91009f,
274 .flags = IORESOURCE_MEM,
275 },
276 [1] = {
277 .start = 52,
278 .flags = IORESOURCE_IRQ,
279 },
280 [2] = {
281 /* place holder for contiguous memory */
282 },
283};
284
285static struct platform_device ceu0_device = {
286 .name = "sh_mobile_ceu",
287 .id = 0, /* "ceu0" clock */
288 .num_resources = ARRAY_SIZE(ceu0_resources),
289 .resource = ceu0_resources,
290 .dev = {
291 .platform_data = &sh_mobile_ceu0_info,
292 },
293 .archdata = {
294 .hwblk_id = HWBLK_CEU0,
295 },
296};
297
298/* CEU1 */
299static struct sh_mobile_ceu_info sh_mobile_ceu1_info = {
300 .flags = SH_CEU_FLAG_USE_8BIT_BUS,
301};
302
303static struct resource ceu1_resources[] = {
304 [0] = {
305 .name = "CEU1",
306 .start = 0xfe914000,
307 .end = 0xfe91409f,
308 .flags = IORESOURCE_MEM,
309 },
310 [1] = {
311 .start = 63,
312 .flags = IORESOURCE_IRQ,
313 },
314 [2] = {
315 /* place holder for contiguous memory */
316 },
317};
318
319static struct platform_device ceu1_device = {
320 .name = "sh_mobile_ceu",
321 .id = 1, /* "ceu1" clock */
322 .num_resources = ARRAY_SIZE(ceu1_resources),
323 .resource = ceu1_resources,
324 .dev = {
325 .platform_data = &sh_mobile_ceu1_info,
326 },
327 .archdata = {
328 .hwblk_id = HWBLK_CEU1,
329 },
330};
331
332/* I2C device */
333static struct i2c_board_info i2c1_devices[] = {
334 {
335 I2C_BOARD_INFO("r2025sd", 0x32),
336 },
337};
338
339/* KEYSC */
340static struct sh_keysc_info keysc_info = {
341 .mode = SH_KEYSC_MODE_1,
342 .scan_timing = 3,
343 .delay = 50,
344 .kycr2_delay = 100,
345 .keycodes = { KEY_1, 0, 0, 0, 0,
346 KEY_2, 0, 0, 0, 0,
347 KEY_3, 0, 0, 0, 0,
348 KEY_4, 0, 0, 0, 0,
349 KEY_5, 0, 0, 0, 0,
350 KEY_6, 0, 0, 0, 0, },
351};
352
353static struct resource keysc_resources[] = {
354 [0] = {
355 .name = "KEYSC",
356 .start = 0x044b0000,
357 .end = 0x044b000f,
358 .flags = IORESOURCE_MEM,
359 },
360 [1] = {
361 .start = 79,
362 .flags = IORESOURCE_IRQ,
363 },
364};
365
366static struct platform_device keysc_device = {
367 .name = "sh_keysc",
368 .id = 0, /* keysc0 clock */
369 .num_resources = ARRAY_SIZE(keysc_resources),
370 .resource = keysc_resources,
371 .dev = {
372 .platform_data = &keysc_info,
373 },
374 .archdata = {
375 .hwblk_id = HWBLK_KEYSC,
376 },
377};
378
379static struct platform_device *ecovec_devices[] __initdata = {
380 &heartbeat_device,
381 &nor_flash_device,
382 &sh_eth_device,
383 &usb0_host_device,
384 &usb1_host_device, /* USB1 host support */
385 &lcdc_device,
386 &ceu0_device,
387 &ceu1_device,
388 &keysc_device,
389};
390
391#define EEPROM_ADDR 0x50
392static u8 mac_read(struct i2c_adapter *a, u8 command)
393{
394 struct i2c_msg msg[2];
395 u8 buf;
396 int ret;
397
398 msg[0].addr = EEPROM_ADDR;
399 msg[0].flags = 0;
400 msg[0].len = 1;
401 msg[0].buf = &command;
402
403 msg[1].addr = EEPROM_ADDR;
404 msg[1].flags = I2C_M_RD;
405 msg[1].len = 1;
406 msg[1].buf = &buf;
407
408 ret = i2c_transfer(a, msg, 2);
409 if (ret < 0) {
410 printk(KERN_ERR "error %d\n", ret);
411 buf = 0xff;
412 }
413
414 return buf;
415}
416
417#define MAC_LEN 6
418static void __init sh_eth_init(void)
419{
420 struct i2c_adapter *a = i2c_get_adapter(1);
421 struct clk *eth_clk;
422 u8 mac[MAC_LEN];
423 int i;
424
425 if (!a) {
426 pr_err("can not get I2C 1\n");
427 return;
428 }
429
430 eth_clk = clk_get(NULL, "eth0");
431 if (!eth_clk) {
432 pr_err("can not get eth0 clk\n");
433 return;
434 }
435
436 /* read MAC address frome EEPROM */
437 for (i = 0; i < MAC_LEN; i++) {
438 mac[i] = mac_read(a, 0x10 + i);
439 msleep(10);
440 }
441
442 /* clock enable */
443 clk_enable(eth_clk);
444
445 /* reset sh-eth */
446 ctrl_outl(0x1, SH_ETH_ADDR + 0x0);
447
448 /* set MAC addr */
449 ctrl_outl((mac[0] << 24) |
450 (mac[1] << 16) |
451 (mac[2] << 8) |
452 (mac[3] << 0), SH_ETH_MAHR);
453 ctrl_outl((mac[4] << 8) |
454 (mac[5] << 0), SH_ETH_MALR);
455
456 clk_put(eth_clk);
457}
458
459#define PORT_HIZA 0xA4050158
460#define IODRIVEA 0xA405018A
461static int __init arch_setup(void)
462{
463 /* enable SCIFA0 */
464 gpio_request(GPIO_FN_SCIF0_TXD, NULL);
465 gpio_request(GPIO_FN_SCIF0_RXD, NULL);
466
467 /* enable debug LED */
468 gpio_request(GPIO_PTG0, NULL);
469 gpio_request(GPIO_PTG1, NULL);
470 gpio_request(GPIO_PTG2, NULL);
471 gpio_request(GPIO_PTG3, NULL);
472 gpio_direction_output(GPIO_PTG0, 0);
473 gpio_direction_output(GPIO_PTG1, 0);
474 gpio_direction_output(GPIO_PTG2, 0);
475 gpio_direction_output(GPIO_PTG3, 0);
476 ctrl_outw((ctrl_inw(PORT_HIZA) & ~(0x1 << 1)) , PORT_HIZA);
477
478 /* enable SH-Eth */
479 gpio_request(GPIO_PTA1, NULL);
480 gpio_direction_output(GPIO_PTA1, 1);
481 mdelay(20);
482
483 gpio_request(GPIO_FN_RMII_RXD0, NULL);
484 gpio_request(GPIO_FN_RMII_RXD1, NULL);
485 gpio_request(GPIO_FN_RMII_TXD0, NULL);
486 gpio_request(GPIO_FN_RMII_TXD1, NULL);
487 gpio_request(GPIO_FN_RMII_REF_CLK, NULL);
488 gpio_request(GPIO_FN_RMII_TX_EN, NULL);
489 gpio_request(GPIO_FN_RMII_RX_ER, NULL);
490 gpio_request(GPIO_FN_RMII_CRS_DV, NULL);
491 gpio_request(GPIO_FN_MDIO, NULL);
492 gpio_request(GPIO_FN_MDC, NULL);
493 gpio_request(GPIO_FN_LNKSTA, NULL);
494
495 /* enable USB */
496 ctrl_outw(0x0000, 0xA4D80000);
497 ctrl_outw(0x0000, 0xA4D90000);
498 gpio_request(GPIO_PTB3, NULL);
499 gpio_request(GPIO_PTB4, NULL);
500 gpio_request(GPIO_PTB5, NULL);
501 gpio_direction_input(GPIO_PTB3);
502 gpio_direction_output(GPIO_PTB4, 0);
503 gpio_direction_output(GPIO_PTB5, 0);
504 ctrl_outw(0x0600, 0xa40501d4);
505 ctrl_outw(0x0600, 0xa4050192);
506
507 /* enable LCDC */
508 gpio_request(GPIO_FN_LCDD23, NULL);
509 gpio_request(GPIO_FN_LCDD22, NULL);
510 gpio_request(GPIO_FN_LCDD21, NULL);
511 gpio_request(GPIO_FN_LCDD20, NULL);
512 gpio_request(GPIO_FN_LCDD19, NULL);
513 gpio_request(GPIO_FN_LCDD18, NULL);
514 gpio_request(GPIO_FN_LCDD17, NULL);
515 gpio_request(GPIO_FN_LCDD16, NULL);
516 gpio_request(GPIO_FN_LCDD15, NULL);
517 gpio_request(GPIO_FN_LCDD14, NULL);
518 gpio_request(GPIO_FN_LCDD13, NULL);
519 gpio_request(GPIO_FN_LCDD12, NULL);
520 gpio_request(GPIO_FN_LCDD11, NULL);
521 gpio_request(GPIO_FN_LCDD10, NULL);
522 gpio_request(GPIO_FN_LCDD9, NULL);
523 gpio_request(GPIO_FN_LCDD8, NULL);
524 gpio_request(GPIO_FN_LCDD7, NULL);
525 gpio_request(GPIO_FN_LCDD6, NULL);
526 gpio_request(GPIO_FN_LCDD5, NULL);
527 gpio_request(GPIO_FN_LCDD4, NULL);
528 gpio_request(GPIO_FN_LCDD3, NULL);
529 gpio_request(GPIO_FN_LCDD2, NULL);
530 gpio_request(GPIO_FN_LCDD1, NULL);
531 gpio_request(GPIO_FN_LCDD0, NULL);
532 gpio_request(GPIO_FN_LCDDISP, NULL);
533 gpio_request(GPIO_FN_LCDHSYN, NULL);
534 gpio_request(GPIO_FN_LCDDCK, NULL);
535 gpio_request(GPIO_FN_LCDVSYN, NULL);
536 gpio_request(GPIO_FN_LCDDON, NULL);
537 gpio_request(GPIO_FN_LCDLCLK, NULL);
538 ctrl_outw((ctrl_inw(PORT_HIZA) & ~0x0001), PORT_HIZA);
539
540 gpio_request(GPIO_PTE6, NULL);
541 gpio_request(GPIO_PTU1, NULL);
542 gpio_request(GPIO_PTR1, NULL);
543 gpio_request(GPIO_PTA2, NULL);
544 gpio_direction_input(GPIO_PTE6);
545 gpio_direction_output(GPIO_PTU1, 0);
546 gpio_direction_output(GPIO_PTR1, 0);
547 gpio_direction_output(GPIO_PTA2, 0);
548
549 /* I/O buffer drive ability is low */
550 ctrl_outw((ctrl_inw(IODRIVEA) & ~0x00c0) | 0x0040 , IODRIVEA);
551
552 if (gpio_get_value(GPIO_PTE6)) {
553 /* DVI */
554 lcdc_info.clock_source = LCDC_CLK_EXTERNAL;
555 lcdc_info.ch[0].clock_divider = 1,
556 lcdc_info.ch[0].lcd_cfg.name = "DVI";
557 lcdc_info.ch[0].lcd_cfg.xres = 1280;
558 lcdc_info.ch[0].lcd_cfg.yres = 720;
559 lcdc_info.ch[0].lcd_cfg.left_margin = 220;
560 lcdc_info.ch[0].lcd_cfg.right_margin = 110;
561 lcdc_info.ch[0].lcd_cfg.hsync_len = 40;
562 lcdc_info.ch[0].lcd_cfg.upper_margin = 20;
563 lcdc_info.ch[0].lcd_cfg.lower_margin = 5;
564 lcdc_info.ch[0].lcd_cfg.vsync_len = 5;
565
566 gpio_set_value(GPIO_PTA2, 1);
567 gpio_set_value(GPIO_PTU1, 1);
568 } else {
569 /* Panel */
570
571 lcdc_info.clock_source = LCDC_CLK_PERIPHERAL;
572 lcdc_info.ch[0].clock_divider = 2,
573 lcdc_info.ch[0].lcd_cfg.name = "Panel";
574 lcdc_info.ch[0].lcd_cfg.xres = 800;
575 lcdc_info.ch[0].lcd_cfg.yres = 480;
576 lcdc_info.ch[0].lcd_cfg.left_margin = 220;
577 lcdc_info.ch[0].lcd_cfg.right_margin = 110;
578 lcdc_info.ch[0].lcd_cfg.hsync_len = 70;
579 lcdc_info.ch[0].lcd_cfg.upper_margin = 20;
580 lcdc_info.ch[0].lcd_cfg.lower_margin = 5;
581 lcdc_info.ch[0].lcd_cfg.vsync_len = 5;
582
583 gpio_set_value(GPIO_PTR1, 1);
584
585 /* FIXME
586 *
587 * LCDDON control is needed for Panel,
588 * but current sh_mobile_lcdc driver doesn't control it.
589 * It is temporary correspondence
590 */
591 gpio_request(GPIO_PTF4, NULL);
592 gpio_direction_output(GPIO_PTF4, 1);
593 }
594
595 /* enable CEU0 */
596 gpio_request(GPIO_FN_VIO0_D15, NULL);
597 gpio_request(GPIO_FN_VIO0_D14, NULL);
598 gpio_request(GPIO_FN_VIO0_D13, NULL);
599 gpio_request(GPIO_FN_VIO0_D12, NULL);
600 gpio_request(GPIO_FN_VIO0_D11, NULL);
601 gpio_request(GPIO_FN_VIO0_D10, NULL);
602 gpio_request(GPIO_FN_VIO0_D9, NULL);
603 gpio_request(GPIO_FN_VIO0_D8, NULL);
604 gpio_request(GPIO_FN_VIO0_D7, NULL);
605 gpio_request(GPIO_FN_VIO0_D6, NULL);
606 gpio_request(GPIO_FN_VIO0_D5, NULL);
607 gpio_request(GPIO_FN_VIO0_D4, NULL);
608 gpio_request(GPIO_FN_VIO0_D3, NULL);
609 gpio_request(GPIO_FN_VIO0_D2, NULL);
610 gpio_request(GPIO_FN_VIO0_D1, NULL);
611 gpio_request(GPIO_FN_VIO0_D0, NULL);
612 gpio_request(GPIO_FN_VIO0_VD, NULL);
613 gpio_request(GPIO_FN_VIO0_CLK, NULL);
614 gpio_request(GPIO_FN_VIO0_FLD, NULL);
615 gpio_request(GPIO_FN_VIO0_HD, NULL);
616 platform_resource_setup_memory(&ceu0_device, "ceu0", 4 << 20);
617
618 /* enable CEU1 */
619 gpio_request(GPIO_FN_VIO1_D7, NULL);
620 gpio_request(GPIO_FN_VIO1_D6, NULL);
621 gpio_request(GPIO_FN_VIO1_D5, NULL);
622 gpio_request(GPIO_FN_VIO1_D4, NULL);
623 gpio_request(GPIO_FN_VIO1_D3, NULL);
624 gpio_request(GPIO_FN_VIO1_D2, NULL);
625 gpio_request(GPIO_FN_VIO1_D1, NULL);
626 gpio_request(GPIO_FN_VIO1_D0, NULL);
627 gpio_request(GPIO_FN_VIO1_FLD, NULL);
628 gpio_request(GPIO_FN_VIO1_HD, NULL);
629 gpio_request(GPIO_FN_VIO1_VD, NULL);
630 gpio_request(GPIO_FN_VIO1_CLK, NULL);
631 platform_resource_setup_memory(&ceu1_device, "ceu1", 4 << 20);
632
633 /* enable KEYSC */
634 gpio_request(GPIO_FN_KEYOUT5_IN5, NULL);
635 gpio_request(GPIO_FN_KEYOUT4_IN6, NULL);
636 gpio_request(GPIO_FN_KEYOUT3, NULL);
637 gpio_request(GPIO_FN_KEYOUT2, NULL);
638 gpio_request(GPIO_FN_KEYOUT1, NULL);
639 gpio_request(GPIO_FN_KEYOUT0, NULL);
640 gpio_request(GPIO_FN_KEYIN0, NULL);
641
642 /* enable user debug switch */
643 gpio_request(GPIO_PTR0, NULL);
644 gpio_request(GPIO_PTR4, NULL);
645 gpio_request(GPIO_PTR5, NULL);
646 gpio_request(GPIO_PTR6, NULL);
647 gpio_direction_input(GPIO_PTR0);
648 gpio_direction_input(GPIO_PTR4);
649 gpio_direction_input(GPIO_PTR5);
650 gpio_direction_input(GPIO_PTR6);
651
652 /* enable I2C device */
653 i2c_register_board_info(1, i2c1_devices,
654 ARRAY_SIZE(i2c1_devices));
655
656 return platform_add_devices(ecovec_devices,
657 ARRAY_SIZE(ecovec_devices));
658}
659arch_initcall(arch_setup);
660
661static int __init devices_setup(void)
662{
663 sh_eth_init();
664 return 0;
665}
666device_initcall(devices_setup);
667
668
669static struct sh_machine_vector mv_ecovec __initmv = {
670 .mv_name = "R0P7724 (EcoVec)",
671};
diff --git a/arch/sh/boards/mach-highlander/setup.c b/arch/sh/boards/mach-highlander/setup.c
index 1639f8915000..566e69d8d729 100644
--- a/arch/sh/boards/mach-highlander/setup.c
+++ b/arch/sh/boards/mach-highlander/setup.c
@@ -22,6 +22,7 @@
22#include <linux/irq.h> 22#include <linux/irq.h>
23#include <linux/interrupt.h> 23#include <linux/interrupt.h>
24#include <linux/usb/r8a66597.h> 24#include <linux/usb/r8a66597.h>
25#include <linux/usb/m66592.h>
25#include <net/ax88796.h> 26#include <net/ax88796.h>
26#include <asm/machvec.h> 27#include <asm/machvec.h>
27#include <mach/highlander.h> 28#include <mach/highlander.h>
@@ -60,6 +61,11 @@ static struct platform_device r8a66597_usb_host_device = {
60 .resource = r8a66597_usb_host_resources, 61 .resource = r8a66597_usb_host_resources,
61}; 62};
62 63
64static struct m66592_platdata usbf_platdata = {
65 .xtal = M66592_PLATDATA_XTAL_24MHZ,
66 .vif = 1,
67};
68
63static struct resource m66592_usb_peripheral_resources[] = { 69static struct resource m66592_usb_peripheral_resources[] = {
64 [0] = { 70 [0] = {
65 .name = "m66592_udc", 71 .name = "m66592_udc",
@@ -81,6 +87,7 @@ static struct platform_device m66592_usb_peripheral_device = {
81 .dev = { 87 .dev = {
82 .dma_mask = NULL, /* don't use dma */ 88 .dma_mask = NULL, /* don't use dma */
83 .coherent_dma_mask = 0xffffffff, 89 .coherent_dma_mask = 0xffffffff,
90 .platform_data = &usbf_platdata,
84 }, 91 },
85 .num_resources = ARRAY_SIZE(m66592_usb_peripheral_resources), 92 .num_resources = ARRAY_SIZE(m66592_usb_peripheral_resources),
86 .resource = m66592_usb_peripheral_resources, 93 .resource = m66592_usb_peripheral_resources,
diff --git a/arch/sh/boards/mach-kfr2r09/Makefile b/arch/sh/boards/mach-kfr2r09/Makefile
new file mode 100644
index 000000000000..5d5867826e3b
--- /dev/null
+++ b/arch/sh/boards/mach-kfr2r09/Makefile
@@ -0,0 +1,2 @@
1obj-y := setup.o
2obj-$(CONFIG_FB_SH_MOBILE_LCDC) += lcd_wqvga.o
diff --git a/arch/sh/boards/mach-kfr2r09/lcd_wqvga.c b/arch/sh/boards/mach-kfr2r09/lcd_wqvga.c
new file mode 100644
index 000000000000..8ccb1cc8b589
--- /dev/null
+++ b/arch/sh/boards/mach-kfr2r09/lcd_wqvga.c
@@ -0,0 +1,332 @@
1/*
2 * KFR2R09 LCD panel support
3 *
4 * Copyright (C) 2009 Magnus Damm
5 *
6 * Register settings based on the out-of-tree t33fb.c driver
7 * Copyright (C) 2008 Lineo Solutions, Inc.
8 *
9 * This file is subject to the terms and conditions of the GNU General Public
10 * License. See the file COPYING in the main directory of this archive for
11 * more details.
12 */
13
14#include <linux/delay.h>
15#include <linux/err.h>
16#include <linux/fb.h>
17#include <linux/init.h>
18#include <linux/kernel.h>
19#include <linux/module.h>
20#include <linux/gpio.h>
21#include <video/sh_mobile_lcdc.h>
22#include <mach/kfr2r09.h>
23#include <cpu/sh7724.h>
24
25/* The on-board LCD module is a Hitachi TX07D34VM0AAA. This module is made
26 * up of a 240x400 LCD hooked up to a R61517 driver IC. The driver IC is
27 * communicating with the main port of the LCDC using an 18-bit SYS interface.
28 *
29 * The device code for this LCD module is 0x01221517.
30 */
31
32static const unsigned char data_frame_if[] = {
33 0x02, /* WEMODE: 1=cont, 0=one-shot */
34 0x00, 0x00,
35 0x00, /* EPF, DFM */
36 0x02, /* RIM[1] : 1 (18bpp) */
37};
38
39static const unsigned char data_panel[] = {
40 0x0b,
41 0x63, /* 400 lines */
42 0x04, 0x00, 0x00, 0x04, 0x11, 0x00, 0x00,
43};
44
45static const unsigned char data_timing[] = {
46 0x00, 0x00, 0x13, 0x08, 0x08,
47};
48
49static const unsigned char data_timing_src[] = {
50 0x11, 0x01, 0x00, 0x01,
51};
52
53static const unsigned char data_gamma[] = {
54 0x01, 0x02, 0x08, 0x23, 0x03, 0x0c, 0x00, 0x06, 0x00, 0x00,
55 0x01, 0x00, 0x0c, 0x23, 0x03, 0x08, 0x02, 0x06, 0x00, 0x00,
56};
57
58static const unsigned char data_power[] = {
59 0x07, 0xc5, 0xdc, 0x02, 0x33, 0x0a,
60};
61
62static unsigned long read_reg(void *sohandle,
63 struct sh_mobile_lcdc_sys_bus_ops *so)
64{
65 return so->read_data(sohandle);
66}
67
68static void write_reg(void *sohandle,
69 struct sh_mobile_lcdc_sys_bus_ops *so,
70 int i, unsigned long v)
71{
72 if (i)
73 so->write_data(sohandle, v); /* PTH4/LCDRS High [param, 17:0] */
74 else
75 so->write_index(sohandle, v); /* PTH4/LCDRS Low [cmd, 7:0] */
76}
77
78static void write_data(void *sohandle,
79 struct sh_mobile_lcdc_sys_bus_ops *so,
80 unsigned char const *data, int no_data)
81{
82 int i;
83
84 for (i = 0; i < no_data; i++)
85 write_reg(sohandle, so, 1, data[i]);
86}
87
88static unsigned long read_device_code(void *sohandle,
89 struct sh_mobile_lcdc_sys_bus_ops *so)
90{
91 unsigned long device_code;
92
93 /* access protect OFF */
94 write_reg(sohandle, so, 0, 0xb0);
95 write_reg(sohandle, so, 1, 0x00);
96
97 /* deep standby OFF */
98 write_reg(sohandle, so, 0, 0xb1);
99 write_reg(sohandle, so, 1, 0x00);
100
101 /* device code command */
102 write_reg(sohandle, so, 0, 0xbf);
103 mdelay(50);
104
105 /* dummy read */
106 read_reg(sohandle, so);
107
108 /* read device code */
109 device_code = ((read_reg(sohandle, so) & 0xff) << 24);
110 device_code |= ((read_reg(sohandle, so) & 0xff) << 16);
111 device_code |= ((read_reg(sohandle, so) & 0xff) << 8);
112 device_code |= (read_reg(sohandle, so) & 0xff);
113
114 return device_code;
115}
116
117static void write_memory_start(void *sohandle,
118 struct sh_mobile_lcdc_sys_bus_ops *so)
119{
120 write_reg(sohandle, so, 0, 0x2c);
121}
122
123static void clear_memory(void *sohandle,
124 struct sh_mobile_lcdc_sys_bus_ops *so)
125{
126 int i;
127
128 /* write start */
129 write_memory_start(sohandle, so);
130
131 /* paint it black */
132 for (i = 0; i < (240 * 400); i++)
133 write_reg(sohandle, so, 1, 0x00);
134}
135
136static void display_on(void *sohandle,
137 struct sh_mobile_lcdc_sys_bus_ops *so)
138{
139 /* access protect off */
140 write_reg(sohandle, so, 0, 0xb0);
141 write_reg(sohandle, so, 1, 0x00);
142
143 /* exit deep standby mode */
144 write_reg(sohandle, so, 0, 0xb1);
145 write_reg(sohandle, so, 1, 0x00);
146
147 /* frame memory I/F */
148 write_reg(sohandle, so, 0, 0xb3);
149 write_data(sohandle, so, data_frame_if, ARRAY_SIZE(data_frame_if));
150
151 /* display mode and frame memory write mode */
152 write_reg(sohandle, so, 0, 0xb4);
153 write_reg(sohandle, so, 1, 0x00); /* DBI, internal clock */
154
155 /* panel */
156 write_reg(sohandle, so, 0, 0xc0);
157 write_data(sohandle, so, data_panel, ARRAY_SIZE(data_panel));
158
159 /* timing (normal) */
160 write_reg(sohandle, so, 0, 0xc1);
161 write_data(sohandle, so, data_timing, ARRAY_SIZE(data_timing));
162
163 /* timing (partial) */
164 write_reg(sohandle, so, 0, 0xc2);
165 write_data(sohandle, so, data_timing, ARRAY_SIZE(data_timing));
166
167 /* timing (idle) */
168 write_reg(sohandle, so, 0, 0xc3);
169 write_data(sohandle, so, data_timing, ARRAY_SIZE(data_timing));
170
171 /* timing (source/VCOM/gate driving) */
172 write_reg(sohandle, so, 0, 0xc4);
173 write_data(sohandle, so, data_timing_src, ARRAY_SIZE(data_timing_src));
174
175 /* gamma (red) */
176 write_reg(sohandle, so, 0, 0xc8);
177 write_data(sohandle, so, data_gamma, ARRAY_SIZE(data_gamma));
178
179 /* gamma (green) */
180 write_reg(sohandle, so, 0, 0xc9);
181 write_data(sohandle, so, data_gamma, ARRAY_SIZE(data_gamma));
182
183 /* gamma (blue) */
184 write_reg(sohandle, so, 0, 0xca);
185 write_data(sohandle, so, data_gamma, ARRAY_SIZE(data_gamma));
186
187 /* power (common) */
188 write_reg(sohandle, so, 0, 0xd0);
189 write_data(sohandle, so, data_power, ARRAY_SIZE(data_power));
190
191 /* VCOM */
192 write_reg(sohandle, so, 0, 0xd1);
193 write_reg(sohandle, so, 1, 0x00);
194 write_reg(sohandle, so, 1, 0x0f);
195 write_reg(sohandle, so, 1, 0x02);
196
197 /* power (normal) */
198 write_reg(sohandle, so, 0, 0xd2);
199 write_reg(sohandle, so, 1, 0x63);
200 write_reg(sohandle, so, 1, 0x24);
201
202 /* power (partial) */
203 write_reg(sohandle, so, 0, 0xd3);
204 write_reg(sohandle, so, 1, 0x63);
205 write_reg(sohandle, so, 1, 0x24);
206
207 /* power (idle) */
208 write_reg(sohandle, so, 0, 0xd4);
209 write_reg(sohandle, so, 1, 0x63);
210 write_reg(sohandle, so, 1, 0x24);
211
212 write_reg(sohandle, so, 0, 0xd8);
213 write_reg(sohandle, so, 1, 0x77);
214 write_reg(sohandle, so, 1, 0x77);
215
216 /* TE signal */
217 write_reg(sohandle, so, 0, 0x35);
218 write_reg(sohandle, so, 1, 0x00);
219
220 /* TE signal line */
221 write_reg(sohandle, so, 0, 0x44);
222 write_reg(sohandle, so, 1, 0x00);
223 write_reg(sohandle, so, 1, 0x00);
224
225 /* column address */
226 write_reg(sohandle, so, 0, 0x2a);
227 write_reg(sohandle, so, 1, 0x00);
228 write_reg(sohandle, so, 1, 0x00);
229 write_reg(sohandle, so, 1, 0x00);
230 write_reg(sohandle, so, 1, 0xef);
231
232 /* page address */
233 write_reg(sohandle, so, 0, 0x2b);
234 write_reg(sohandle, so, 1, 0x00);
235 write_reg(sohandle, so, 1, 0x00);
236 write_reg(sohandle, so, 1, 0x01);
237 write_reg(sohandle, so, 1, 0x8f);
238
239 /* exit sleep mode */
240 write_reg(sohandle, so, 0, 0x11);
241
242 mdelay(120);
243
244 /* clear vram */
245 clear_memory(sohandle, so);
246
247 /* display ON */
248 write_reg(sohandle, so, 0, 0x29);
249 mdelay(1);
250
251 write_memory_start(sohandle, so);
252}
253
254int kfr2r09_lcd_setup(void *board_data, void *sohandle,
255 struct sh_mobile_lcdc_sys_bus_ops *so)
256{
257 /* power on */
258 gpio_set_value(GPIO_PTF4, 0); /* PROTECT/ -> L */
259 gpio_set_value(GPIO_PTE4, 0); /* LCD_RST/ -> L */
260 gpio_set_value(GPIO_PTF4, 1); /* PROTECT/ -> H */
261 udelay(1100);
262 gpio_set_value(GPIO_PTE4, 1); /* LCD_RST/ -> H */
263 udelay(10);
264 gpio_set_value(GPIO_PTF4, 0); /* PROTECT/ -> L */
265 mdelay(20);
266
267 if (read_device_code(sohandle, so) != 0x01221517)
268 return -ENODEV;
269
270 pr_info("KFR2R09 WQVGA LCD Module detected.\n");
271
272 display_on(sohandle, so);
273 return 0;
274}
275
276#define CTRL_CKSW 0x10
277#define CTRL_C10 0x20
278#define CTRL_CPSW 0x80
279#define MAIN_MLED4 0x40
280#define MAIN_MSW 0x80
281
282static int kfr2r09_lcd_backlight(int on)
283{
284 struct i2c_adapter *a;
285 struct i2c_msg msg;
286 unsigned char buf[2];
287 int ret;
288
289 a = i2c_get_adapter(0);
290 if (!a)
291 return -ENODEV;
292
293 buf[0] = 0x00;
294 if (on)
295 buf[1] = CTRL_CPSW | CTRL_C10 | CTRL_CKSW;
296 else
297 buf[1] = 0;
298
299 msg.addr = 0x75;
300 msg.buf = buf;
301 msg.len = 2;
302 msg.flags = 0;
303 ret = i2c_transfer(a, &msg, 1);
304 if (ret != 1)
305 return -ENODEV;
306
307 buf[0] = 0x01;
308 if (on)
309 buf[1] = MAIN_MSW | MAIN_MLED4 | 0x0c;
310 else
311 buf[1] = 0;
312
313 msg.addr = 0x75;
314 msg.buf = buf;
315 msg.len = 2;
316 msg.flags = 0;
317 ret = i2c_transfer(a, &msg, 1);
318 if (ret != 1)
319 return -ENODEV;
320
321 return 0;
322}
323
324void kfr2r09_lcd_on(void *board_data)
325{
326 kfr2r09_lcd_backlight(1);
327}
328
329void kfr2r09_lcd_off(void *board_data)
330{
331 kfr2r09_lcd_backlight(0);
332}
diff --git a/arch/sh/boards/mach-kfr2r09/setup.c b/arch/sh/boards/mach-kfr2r09/setup.c
new file mode 100644
index 000000000000..c08d33fe2104
--- /dev/null
+++ b/arch/sh/boards/mach-kfr2r09/setup.c
@@ -0,0 +1,386 @@
1/*
2 * KFR2R09 board support code
3 *
4 * Copyright (C) 2009 Magnus Damm
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 */
10#include <linux/init.h>
11#include <linux/platform_device.h>
12#include <linux/interrupt.h>
13#include <linux/mtd/physmap.h>
14#include <linux/mtd/onenand.h>
15#include <linux/delay.h>
16#include <linux/clk.h>
17#include <linux/gpio.h>
18#include <linux/input.h>
19#include <linux/i2c.h>
20#include <linux/usb/r8a66597.h>
21#include <video/sh_mobile_lcdc.h>
22#include <asm/clock.h>
23#include <asm/machvec.h>
24#include <asm/io.h>
25#include <asm/sh_keysc.h>
26#include <cpu/sh7724.h>
27#include <mach/kfr2r09.h>
28
29static struct mtd_partition kfr2r09_nor_flash_partitions[] =
30{
31 {
32 .name = "boot",
33 .offset = 0,
34 .size = (4 * 1024 * 1024),
35 .mask_flags = MTD_WRITEABLE, /* Read-only */
36 },
37 {
38 .name = "other",
39 .offset = MTDPART_OFS_APPEND,
40 .size = MTDPART_SIZ_FULL,
41 },
42};
43
44static struct physmap_flash_data kfr2r09_nor_flash_data = {
45 .width = 2,
46 .parts = kfr2r09_nor_flash_partitions,
47 .nr_parts = ARRAY_SIZE(kfr2r09_nor_flash_partitions),
48};
49
50static struct resource kfr2r09_nor_flash_resources[] = {
51 [0] = {
52 .name = "NOR Flash",
53 .start = 0x00000000,
54 .end = 0x03ffffff,
55 .flags = IORESOURCE_MEM,
56 }
57};
58
59static struct platform_device kfr2r09_nor_flash_device = {
60 .name = "physmap-flash",
61 .resource = kfr2r09_nor_flash_resources,
62 .num_resources = ARRAY_SIZE(kfr2r09_nor_flash_resources),
63 .dev = {
64 .platform_data = &kfr2r09_nor_flash_data,
65 },
66};
67
68static struct resource kfr2r09_nand_flash_resources[] = {
69 [0] = {
70 .name = "NAND Flash",
71 .start = 0x10000000,
72 .end = 0x1001ffff,
73 .flags = IORESOURCE_MEM,
74 }
75};
76
77static struct platform_device kfr2r09_nand_flash_device = {
78 .name = "onenand-flash",
79 .resource = kfr2r09_nand_flash_resources,
80 .num_resources = ARRAY_SIZE(kfr2r09_nand_flash_resources),
81};
82
83static struct sh_keysc_info kfr2r09_sh_keysc_info = {
84 .mode = SH_KEYSC_MODE_1, /* KEYOUT0->4, KEYIN0->4 */
85 .scan_timing = 3,
86 .delay = 10,
87 .keycodes = {
88 KEY_PHONE, KEY_CLEAR, KEY_MAIL, KEY_WWW, KEY_ENTER,
89 KEY_1, KEY_2, KEY_3, 0, KEY_UP,
90 KEY_4, KEY_5, KEY_6, 0, KEY_LEFT,
91 KEY_7, KEY_8, KEY_9, KEY_PROG1, KEY_RIGHT,
92 KEY_S, KEY_0, KEY_P, KEY_PROG2, KEY_DOWN,
93 0, 0, 0, 0, 0
94 },
95};
96
97static struct resource kfr2r09_sh_keysc_resources[] = {
98 [0] = {
99 .name = "KEYSC",
100 .start = 0x044b0000,
101 .end = 0x044b000f,
102 .flags = IORESOURCE_MEM,
103 },
104 [1] = {
105 .start = 79,
106 .flags = IORESOURCE_IRQ,
107 },
108};
109
110static struct platform_device kfr2r09_sh_keysc_device = {
111 .name = "sh_keysc",
112 .id = 0, /* "keysc0" clock */
113 .num_resources = ARRAY_SIZE(kfr2r09_sh_keysc_resources),
114 .resource = kfr2r09_sh_keysc_resources,
115 .dev = {
116 .platform_data = &kfr2r09_sh_keysc_info,
117 },
118 .archdata = {
119 .hwblk_id = HWBLK_KEYSC,
120 },
121};
122
123static struct sh_mobile_lcdc_info kfr2r09_sh_lcdc_info = {
124 .clock_source = LCDC_CLK_BUS,
125 .ch[0] = {
126 .chan = LCDC_CHAN_MAINLCD,
127 .bpp = 16,
128 .interface_type = SYS18,
129 .clock_divider = 6,
130 .flags = LCDC_FLAGS_DWPOL,
131 .lcd_cfg = {
132 .name = "TX07D34VM0AAA",
133 .xres = 240,
134 .yres = 400,
135 .left_margin = 0,
136 .right_margin = 16,
137 .hsync_len = 8,
138 .upper_margin = 0,
139 .lower_margin = 1,
140 .vsync_len = 1,
141 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
142 },
143 .lcd_size_cfg = {
144 .width = 35,
145 .height = 58,
146 },
147 .board_cfg = {
148 .setup_sys = kfr2r09_lcd_setup,
149 .display_on = kfr2r09_lcd_on,
150 .display_off = kfr2r09_lcd_off,
151 },
152 .sys_bus_cfg = {
153 .ldmt2r = 0x07010904,
154 .ldmt3r = 0x14012914,
155 /* set 1s delay to encourage fsync() */
156 .deferred_io_msec = 1000,
157 },
158 }
159};
160
161static struct resource kfr2r09_sh_lcdc_resources[] = {
162 [0] = {
163 .name = "LCDC",
164 .start = 0xfe940000, /* P4-only space */
165 .end = 0xfe942fff,
166 .flags = IORESOURCE_MEM,
167 },
168 [1] = {
169 .start = 106,
170 .flags = IORESOURCE_IRQ,
171 },
172};
173
174static struct platform_device kfr2r09_sh_lcdc_device = {
175 .name = "sh_mobile_lcdc_fb",
176 .num_resources = ARRAY_SIZE(kfr2r09_sh_lcdc_resources),
177 .resource = kfr2r09_sh_lcdc_resources,
178 .dev = {
179 .platform_data = &kfr2r09_sh_lcdc_info,
180 },
181 .archdata = {
182 .hwblk_id = HWBLK_LCDC,
183 },
184};
185
186static struct r8a66597_platdata kfr2r09_usb0_gadget_data = {
187 .on_chip = 1,
188};
189
190static struct resource kfr2r09_usb0_gadget_resources[] = {
191 [0] = {
192 .start = 0x04d80000,
193 .end = 0x04d80123,
194 .flags = IORESOURCE_MEM,
195 },
196 [1] = {
197 .start = 65,
198 .end = 65,
199 .flags = IORESOURCE_IRQ | IRQF_TRIGGER_LOW,
200 },
201};
202
203static struct platform_device kfr2r09_usb0_gadget_device = {
204 .name = "r8a66597_udc",
205 .id = 0,
206 .dev = {
207 .dma_mask = NULL, /* not use dma */
208 .coherent_dma_mask = 0xffffffff,
209 .platform_data = &kfr2r09_usb0_gadget_data,
210 },
211 .num_resources = ARRAY_SIZE(kfr2r09_usb0_gadget_resources),
212 .resource = kfr2r09_usb0_gadget_resources,
213};
214
215static struct platform_device *kfr2r09_devices[] __initdata = {
216 &kfr2r09_nor_flash_device,
217 &kfr2r09_nand_flash_device,
218 &kfr2r09_sh_keysc_device,
219 &kfr2r09_sh_lcdc_device,
220};
221
222#define BSC_CS0BCR 0xfec10004
223#define BSC_CS0WCR 0xfec10024
224#define BSC_CS4BCR 0xfec10010
225#define BSC_CS4WCR 0xfec10030
226#define PORT_MSELCRB 0xa4050182
227
228#ifdef CONFIG_I2C
229static int kfr2r09_usb0_gadget_i2c_setup(void)
230{
231 struct i2c_adapter *a;
232 struct i2c_msg msg;
233 unsigned char buf[2];
234 int ret;
235
236 a = i2c_get_adapter(0);
237 if (!a)
238 return -ENODEV;
239
240 /* set bit 1 (the second bit) of chip at 0x09, register 0x13 */
241 buf[0] = 0x13;
242 msg.addr = 0x09;
243 msg.buf = buf;
244 msg.len = 1;
245 msg.flags = 0;
246 ret = i2c_transfer(a, &msg, 1);
247 if (ret != 1)
248 return -ENODEV;
249
250 buf[0] = 0;
251 msg.addr = 0x09;
252 msg.buf = buf;
253 msg.len = 1;
254 msg.flags = I2C_M_RD;
255 ret = i2c_transfer(a, &msg, 1);
256 if (ret != 1)
257 return -ENODEV;
258
259 buf[1] = buf[0] | (1 << 1);
260 buf[0] = 0x13;
261 msg.addr = 0x09;
262 msg.buf = buf;
263 msg.len = 2;
264 msg.flags = 0;
265 ret = i2c_transfer(a, &msg, 1);
266 if (ret != 1)
267 return -ENODEV;
268
269 return 0;
270}
271#else
272static int kfr2r09_usb0_gadget_i2c_setup(void)
273{
274 return -ENODEV;
275}
276#endif
277
278static int kfr2r09_usb0_gadget_setup(void)
279{
280 int plugged_in;
281
282 gpio_request(GPIO_PTN4, NULL); /* USB_DET */
283 gpio_direction_input(GPIO_PTN4);
284 plugged_in = gpio_get_value(GPIO_PTN4);
285 if (!plugged_in)
286 return -ENODEV; /* no cable plugged in */
287
288 if (kfr2r09_usb0_gadget_i2c_setup() != 0)
289 return -ENODEV; /* unable to configure using i2c */
290
291 ctrl_outw((ctrl_inw(PORT_MSELCRB) & ~0xc000) | 0x8000, PORT_MSELCRB);
292 gpio_request(GPIO_FN_PDSTATUS, NULL); /* R-standby disables USB clock */
293 gpio_request(GPIO_PTV6, NULL); /* USBCLK_ON */
294 gpio_direction_output(GPIO_PTV6, 1); /* USBCLK_ON = H */
295 msleep(20); /* wait 20ms to let the clock settle */
296 clk_enable(clk_get(NULL, "usb0"));
297 ctrl_outw(0x0600, 0xa40501d4);
298
299 return 0;
300}
301
302static int __init kfr2r09_devices_setup(void)
303{
304 /* enable SCIF1 serial port for YC401 console support */
305 gpio_request(GPIO_FN_SCIF1_RXD, NULL);
306 gpio_request(GPIO_FN_SCIF1_TXD, NULL);
307
308 /* setup NOR flash at CS0 */
309 ctrl_outl(0x36db0400, BSC_CS0BCR);
310 ctrl_outl(0x00000500, BSC_CS0WCR);
311
312 /* setup NAND flash at CS4 */
313 ctrl_outl(0x36db0400, BSC_CS4BCR);
314 ctrl_outl(0x00000500, BSC_CS4WCR);
315
316 /* setup KEYSC pins */
317 gpio_request(GPIO_FN_KEYOUT0, NULL);
318 gpio_request(GPIO_FN_KEYOUT1, NULL);
319 gpio_request(GPIO_FN_KEYOUT2, NULL);
320 gpio_request(GPIO_FN_KEYOUT3, NULL);
321 gpio_request(GPIO_FN_KEYOUT4_IN6, NULL);
322 gpio_request(GPIO_FN_KEYIN0, NULL);
323 gpio_request(GPIO_FN_KEYIN1, NULL);
324 gpio_request(GPIO_FN_KEYIN2, NULL);
325 gpio_request(GPIO_FN_KEYIN3, NULL);
326 gpio_request(GPIO_FN_KEYIN4, NULL);
327 gpio_request(GPIO_FN_KEYOUT5_IN5, NULL);
328
329 /* setup LCDC pins for SYS panel */
330 gpio_request(GPIO_FN_LCDD17, NULL);
331 gpio_request(GPIO_FN_LCDD16, NULL);
332 gpio_request(GPIO_FN_LCDD15, NULL);
333 gpio_request(GPIO_FN_LCDD14, NULL);
334 gpio_request(GPIO_FN_LCDD13, NULL);
335 gpio_request(GPIO_FN_LCDD12, NULL);
336 gpio_request(GPIO_FN_LCDD11, NULL);
337 gpio_request(GPIO_FN_LCDD10, NULL);
338 gpio_request(GPIO_FN_LCDD9, NULL);
339 gpio_request(GPIO_FN_LCDD8, NULL);
340 gpio_request(GPIO_FN_LCDD7, NULL);
341 gpio_request(GPIO_FN_LCDD6, NULL);
342 gpio_request(GPIO_FN_LCDD5, NULL);
343 gpio_request(GPIO_FN_LCDD4, NULL);
344 gpio_request(GPIO_FN_LCDD3, NULL);
345 gpio_request(GPIO_FN_LCDD2, NULL);
346 gpio_request(GPIO_FN_LCDD1, NULL);
347 gpio_request(GPIO_FN_LCDD0, NULL);
348 gpio_request(GPIO_FN_LCDRS, NULL); /* LCD_RS */
349 gpio_request(GPIO_FN_LCDCS, NULL); /* LCD_CS/ */
350 gpio_request(GPIO_FN_LCDRD, NULL); /* LCD_RD/ */
351 gpio_request(GPIO_FN_LCDWR, NULL); /* LCD_WR/ */
352 gpio_request(GPIO_FN_LCDVSYN, NULL); /* LCD_VSYNC */
353 gpio_request(GPIO_PTE4, NULL); /* LCD_RST/ */
354 gpio_direction_output(GPIO_PTE4, 1);
355 gpio_request(GPIO_PTF4, NULL); /* PROTECT/ */
356 gpio_direction_output(GPIO_PTF4, 1);
357 gpio_request(GPIO_PTU0, NULL); /* LEDSTDBY/ */
358 gpio_direction_output(GPIO_PTU0, 1);
359
360 /* setup USB function */
361 if (kfr2r09_usb0_gadget_setup() == 0)
362 platform_device_register(&kfr2r09_usb0_gadget_device);
363
364 return platform_add_devices(kfr2r09_devices,
365 ARRAY_SIZE(kfr2r09_devices));
366}
367device_initcall(kfr2r09_devices_setup);
368
369/* Return the board specific boot mode pin configuration */
370static int kfr2r09_mode_pins(void)
371{
372 /* MD0=1, MD1=1, MD2=0: Clock Mode 3
373 * MD3=0: 16-bit Area0 Bus Width
374 * MD5=1: Little Endian
375 * MD8=1: Test Mode Disabled
376 */
377 return MODE_PIN0 | MODE_PIN1 | MODE_PIN5 | MODE_PIN8;
378}
379
380/*
381 * The Machine Vector
382 */
383static struct sh_machine_vector mv_kfr2r09 __initmv = {
384 .mv_name = "kfr2r09",
385 .mv_mode_pins = kfr2r09_mode_pins,
386};
diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c
index f9b2e4df35b9..6ed1fd32369e 100644
--- a/arch/sh/boards/mach-migor/setup.c
+++ b/arch/sh/boards/mach-migor/setup.c
@@ -98,6 +98,9 @@ static struct platform_device sh_keysc_device = {
98 .dev = { 98 .dev = {
99 .platform_data = &sh_keysc_info, 99 .platform_data = &sh_keysc_info,
100 }, 100 },
101 .archdata = {
102 .hwblk_id = HWBLK_KEYSC,
103 },
101}; 104};
102 105
103static struct mtd_partition migor_nor_flash_partitions[] = 106static struct mtd_partition migor_nor_flash_partitions[] =
@@ -276,7 +279,7 @@ static struct resource migor_lcdc_resources[] = {
276 [0] = { 279 [0] = {
277 .name = "LCDC", 280 .name = "LCDC",
278 .start = 0xfe940000, /* P4-only space */ 281 .start = 0xfe940000, /* P4-only space */
279 .end = 0xfe941fff, 282 .end = 0xfe942fff,
280 .flags = IORESOURCE_MEM, 283 .flags = IORESOURCE_MEM,
281 }, 284 },
282 [1] = { 285 [1] = {
@@ -292,6 +295,9 @@ static struct platform_device migor_lcdc_device = {
292 .dev = { 295 .dev = {
293 .platform_data = &sh_mobile_lcdc_info, 296 .platform_data = &sh_mobile_lcdc_info,
294 }, 297 },
298 .archdata = {
299 .hwblk_id = HWBLK_LCDC,
300 },
295}; 301};
296 302
297static struct clk *camera_clk; 303static struct clk *camera_clk;
@@ -379,6 +385,9 @@ static struct platform_device migor_ceu_device = {
379 .dev = { 385 .dev = {
380 .platform_data = &sh_mobile_ceu_info, 386 .platform_data = &sh_mobile_ceu_info,
381 }, 387 },
388 .archdata = {
389 .hwblk_id = HWBLK_CEU,
390 },
382}; 391};
383 392
384struct spi_gpio_platform_data sdcard_cn9_platform_data = { 393struct spi_gpio_platform_data sdcard_cn9_platform_data = {
diff --git a/arch/sh/boards/mach-se/7722/setup.c b/arch/sh/boards/mach-se/7722/setup.c
index af84904ed86f..36374078e521 100644
--- a/arch/sh/boards/mach-se/7722/setup.c
+++ b/arch/sh/boards/mach-se/7722/setup.c
@@ -22,6 +22,7 @@
22#include <asm/io.h> 22#include <asm/io.h>
23#include <asm/heartbeat.h> 23#include <asm/heartbeat.h>
24#include <asm/sh_keysc.h> 24#include <asm/sh_keysc.h>
25#include <cpu/sh7722.h>
25 26
26/* Heartbeat */ 27/* Heartbeat */
27static struct heartbeat_data heartbeat_data = { 28static struct heartbeat_data heartbeat_data = {
@@ -137,6 +138,9 @@ static struct platform_device sh_keysc_device = {
137 .dev = { 138 .dev = {
138 .platform_data = &sh_keysc_info, 139 .platform_data = &sh_keysc_info,
139 }, 140 },
141 .archdata = {
142 .hwblk_id = HWBLK_KEYSC,
143 },
140}; 144};
141 145
142static struct platform_device *se7722_devices[] __initdata = { 146static struct platform_device *se7722_devices[] __initdata = {
diff --git a/arch/sh/boards/mach-se/7724/setup.c b/arch/sh/boards/mach-se/7724/setup.c
index 15456a0773bf..e78c3be8ad2f 100644
--- a/arch/sh/boards/mach-se/7724/setup.c
+++ b/arch/sh/boards/mach-se/7724/setup.c
@@ -22,6 +22,7 @@
22#include <linux/usb/r8a66597.h> 22#include <linux/usb/r8a66597.h>
23#include <video/sh_mobile_lcdc.h> 23#include <video/sh_mobile_lcdc.h>
24#include <media/sh_mobile_ceu.h> 24#include <media/sh_mobile_ceu.h>
25#include <sound/sh_fsi.h>
25#include <asm/io.h> 26#include <asm/io.h>
26#include <asm/heartbeat.h> 27#include <asm/heartbeat.h>
27#include <asm/sh_eth.h> 28#include <asm/sh_eth.h>
@@ -39,7 +40,15 @@
39 * SW41 : abxx xxxx -> a = 0 : Analog monitor 40 * SW41 : abxx xxxx -> a = 0 : Analog monitor
40 * 1 : Digital monitor 41 * 1 : Digital monitor
41 * b = 0 : VGA 42 * b = 0 : VGA
42 * 1 : SVGA 43 * 1 : 720p
44 */
45
46/*
47 * about 720p
48 *
49 * When you use 1280 x 720 lcdc output,
50 * you should change OSC6 lcdc clock from 25.175MHz to 74.25MHz,
51 * and change SW41 to use 720p
43 */ 52 */
44 53
45/* Heartbeat */ 54/* Heartbeat */
@@ -158,7 +167,7 @@ static struct resource lcdc_resources[] = {
158 [0] = { 167 [0] = {
159 .name = "LCDC", 168 .name = "LCDC",
160 .start = 0xfe940000, 169 .start = 0xfe940000,
161 .end = 0xfe941fff, 170 .end = 0xfe942fff,
162 .flags = IORESOURCE_MEM, 171 .flags = IORESOURCE_MEM,
163 }, 172 },
164 [1] = { 173 [1] = {
@@ -174,6 +183,9 @@ static struct platform_device lcdc_device = {
174 .dev = { 183 .dev = {
175 .platform_data = &lcdc_info, 184 .platform_data = &lcdc_info,
176 }, 185 },
186 .archdata = {
187 .hwblk_id = HWBLK_LCDC,
188 },
177}; 189};
178 190
179/* CEU0 */ 191/* CEU0 */
@@ -205,6 +217,9 @@ static struct platform_device ceu0_device = {
205 .dev = { 217 .dev = {
206 .platform_data = &sh_mobile_ceu0_info, 218 .platform_data = &sh_mobile_ceu0_info,
207 }, 219 },
220 .archdata = {
221 .hwblk_id = HWBLK_CEU0,
222 },
208}; 223};
209 224
210/* CEU1 */ 225/* CEU1 */
@@ -236,6 +251,68 @@ static struct platform_device ceu1_device = {
236 .dev = { 251 .dev = {
237 .platform_data = &sh_mobile_ceu1_info, 252 .platform_data = &sh_mobile_ceu1_info,
238 }, 253 },
254 .archdata = {
255 .hwblk_id = HWBLK_CEU1,
256 },
257};
258
259/* FSI */
260/*
261 * FSI-A use external clock which came from ak464x.
262 * So, we should change parent of fsi
263 */
264#define FCLKACR 0xa4150008
265static void fsimck_init(struct clk *clk)
266{
267 u32 status = ctrl_inl(clk->enable_reg);
268
269 /* use external clock */
270 status &= ~0x000000ff;
271 status |= 0x00000080;
272 ctrl_outl(status, clk->enable_reg);
273}
274
275static struct clk_ops fsimck_clk_ops = {
276 .init = fsimck_init,
277};
278
279static struct clk fsimcka_clk = {
280 .name = "fsimcka_clk",
281 .id = -1,
282 .ops = &fsimck_clk_ops,
283 .enable_reg = (void __iomem *)FCLKACR,
284 .rate = 0, /* unknown */
285};
286
287struct sh_fsi_platform_info fsi_info = {
288 .porta_flags = SH_FSI_BRS_INV |
289 SH_FSI_OUT_SLAVE_MODE |
290 SH_FSI_IN_SLAVE_MODE |
291 SH_FSI_OFMT(PCM) |
292 SH_FSI_IFMT(PCM),
293};
294
295static struct resource fsi_resources[] = {
296 [0] = {
297 .name = "FSI",
298 .start = 0xFE3C0000,
299 .end = 0xFE3C021d,
300 .flags = IORESOURCE_MEM,
301 },
302 [1] = {
303 .start = 108,
304 .flags = IORESOURCE_IRQ,
305 },
306};
307
308static struct platform_device fsi_device = {
309 .name = "sh_fsi",
310 .id = 0,
311 .num_resources = ARRAY_SIZE(fsi_resources),
312 .resource = fsi_resources,
313 .dev = {
314 .platform_data = &fsi_info,
315 },
239}; 316};
240 317
241/* KEYSC in SoC (Needs SW33-2 set to ON) */ 318/* KEYSC in SoC (Needs SW33-2 set to ON) */
@@ -274,6 +351,9 @@ static struct platform_device keysc_device = {
274 .dev = { 351 .dev = {
275 .platform_data = &keysc_info, 352 .platform_data = &keysc_info,
276 }, 353 },
354 .archdata = {
355 .hwblk_id = HWBLK_KEYSC,
356 },
277}; 357};
278 358
279/* SH Eth */ 359/* SH Eth */
@@ -302,15 +382,19 @@ static struct platform_device sh_eth_device = {
302 }, 382 },
303 .num_resources = ARRAY_SIZE(sh_eth_resources), 383 .num_resources = ARRAY_SIZE(sh_eth_resources),
304 .resource = sh_eth_resources, 384 .resource = sh_eth_resources,
385 .archdata = {
386 .hwblk_id = HWBLK_ETHER,
387 },
305}; 388};
306 389
307static struct r8a66597_platdata sh7724_usb0_host_data = { 390static struct r8a66597_platdata sh7724_usb0_host_data = {
391 .on_chip = 1,
308}; 392};
309 393
310static struct resource sh7724_usb0_host_resources[] = { 394static struct resource sh7724_usb0_host_resources[] = {
311 [0] = { 395 [0] = {
312 .start = 0xa4d80000, 396 .start = 0xa4d80000,
313 .end = 0xa4d800ff, 397 .end = 0xa4d80124 - 1,
314 .flags = IORESOURCE_MEM, 398 .flags = IORESOURCE_MEM,
315 }, 399 },
316 [1] = { 400 [1] = {
@@ -330,6 +414,38 @@ static struct platform_device sh7724_usb0_host_device = {
330 }, 414 },
331 .num_resources = ARRAY_SIZE(sh7724_usb0_host_resources), 415 .num_resources = ARRAY_SIZE(sh7724_usb0_host_resources),
332 .resource = sh7724_usb0_host_resources, 416 .resource = sh7724_usb0_host_resources,
417 .archdata = {
418 .hwblk_id = HWBLK_USB0,
419 },
420};
421
422static struct r8a66597_platdata sh7724_usb1_gadget_data = {
423 .on_chip = 1,
424};
425
426static struct resource sh7724_usb1_gadget_resources[] = {
427 [0] = {
428 .start = 0xa4d90000,
429 .end = 0xa4d90123,
430 .flags = IORESOURCE_MEM,
431 },
432 [1] = {
433 .start = 66,
434 .end = 66,
435 .flags = IORESOURCE_IRQ | IRQF_TRIGGER_LOW,
436 },
437};
438
439static struct platform_device sh7724_usb1_gadget_device = {
440 .name = "r8a66597_udc",
441 .id = 1, /* USB1 */
442 .dev = {
443 .dma_mask = NULL, /* not use dma */
444 .coherent_dma_mask = 0xffffffff,
445 .platform_data = &sh7724_usb1_gadget_data,
446 },
447 .num_resources = ARRAY_SIZE(sh7724_usb1_gadget_resources),
448 .resource = sh7724_usb1_gadget_resources,
333}; 449};
334 450
335static struct platform_device *ms7724se_devices[] __initdata = { 451static struct platform_device *ms7724se_devices[] __initdata = {
@@ -342,6 +458,8 @@ static struct platform_device *ms7724se_devices[] __initdata = {
342 &keysc_device, 458 &keysc_device,
343 &sh_eth_device, 459 &sh_eth_device,
344 &sh7724_usb0_host_device, 460 &sh7724_usb0_host_device,
461 &sh7724_usb1_gadget_device,
462 &fsi_device,
345}; 463};
346 464
347#define EEPROM_OP 0xBA206000 465#define EEPROM_OP 0xBA206000
@@ -409,11 +527,13 @@ static void __init sh_eth_init(void)
409static int __init devices_setup(void) 527static int __init devices_setup(void)
410{ 528{
411 u16 sw = ctrl_inw(SW4140); /* select camera, monitor */ 529 u16 sw = ctrl_inw(SW4140); /* select camera, monitor */
530 struct clk *fsia_clk;
412 531
413 /* Reset Release */ 532 /* Reset Release */
414 ctrl_outw(ctrl_inw(FPGA_OUT) & 533 ctrl_outw(ctrl_inw(FPGA_OUT) &
415 ~((1 << 1) | /* LAN */ 534 ~((1 << 1) | /* LAN */
416 (1 << 6) | /* VIDEO DAC */ 535 (1 << 6) | /* VIDEO DAC */
536 (1 << 7) | /* AK4643 */
417 (1 << 12) | /* USB0 */ 537 (1 << 12) | /* USB0 */
418 (1 << 14)), /* RMII */ 538 (1 << 14)), /* RMII */
419 FPGA_OUT); 539 FPGA_OUT);
@@ -421,9 +541,38 @@ static int __init devices_setup(void)
421 /* turn on USB clocks, use external clock */ 541 /* turn on USB clocks, use external clock */
422 ctrl_outw((ctrl_inw(PORT_MSELCRB) & ~0xc000) | 0x8000, PORT_MSELCRB); 542 ctrl_outw((ctrl_inw(PORT_MSELCRB) & ~0xc000) | 0x8000, PORT_MSELCRB);
423 543
544#ifdef CONFIG_PM
545 /* Let LED9 show STATUS2 */
546 gpio_request(GPIO_FN_STATUS2, NULL);
547
548 /* Lit LED10 show STATUS0 */
549 gpio_request(GPIO_FN_STATUS0, NULL);
550
551 /* Lit LED11 show PDSTATUS */
552 gpio_request(GPIO_FN_PDSTATUS, NULL);
553#else
554 /* Lit LED9 */
555 gpio_request(GPIO_PTJ6, NULL);
556 gpio_direction_output(GPIO_PTJ6, 1);
557 gpio_export(GPIO_PTJ6, 0);
558
559 /* Lit LED10 */
560 gpio_request(GPIO_PTJ5, NULL);
561 gpio_direction_output(GPIO_PTJ5, 1);
562 gpio_export(GPIO_PTJ5, 0);
563
564 /* Lit LED11 */
565 gpio_request(GPIO_PTJ7, NULL);
566 gpio_direction_output(GPIO_PTJ7, 1);
567 gpio_export(GPIO_PTJ7, 0);
568#endif
569
424 /* enable USB0 port */ 570 /* enable USB0 port */
425 ctrl_outw(0x0600, 0xa40501d4); 571 ctrl_outw(0x0600, 0xa40501d4);
426 572
573 /* enable USB1 port */
574 ctrl_outw(0x0600, 0xa4050192);
575
427 /* enable IRQ 0,1,2 */ 576 /* enable IRQ 0,1,2 */
428 gpio_request(GPIO_FN_INTC_IRQ0, NULL); 577 gpio_request(GPIO_FN_INTC_IRQ0, NULL);
429 gpio_request(GPIO_FN_INTC_IRQ1, NULL); 578 gpio_request(GPIO_FN_INTC_IRQ1, NULL);
@@ -523,6 +672,32 @@ static int __init devices_setup(void)
523 gpio_request(GPIO_FN_KEYOUT1, NULL); 672 gpio_request(GPIO_FN_KEYOUT1, NULL);
524 gpio_request(GPIO_FN_KEYOUT0, NULL); 673 gpio_request(GPIO_FN_KEYOUT0, NULL);
525 674
675 /* enable FSI */
676 gpio_request(GPIO_FN_FSIMCKB, NULL);
677 gpio_request(GPIO_FN_FSIMCKA, NULL);
678 gpio_request(GPIO_FN_FSIOASD, NULL);
679 gpio_request(GPIO_FN_FSIIABCK, NULL);
680 gpio_request(GPIO_FN_FSIIALRCK, NULL);
681 gpio_request(GPIO_FN_FSIOABCK, NULL);
682 gpio_request(GPIO_FN_FSIOALRCK, NULL);
683 gpio_request(GPIO_FN_CLKAUDIOAO, NULL);
684 gpio_request(GPIO_FN_FSIIBSD, NULL);
685 gpio_request(GPIO_FN_FSIOBSD, NULL);
686 gpio_request(GPIO_FN_FSIIBBCK, NULL);
687 gpio_request(GPIO_FN_FSIIBLRCK, NULL);
688 gpio_request(GPIO_FN_FSIOBBCK, NULL);
689 gpio_request(GPIO_FN_FSIOBLRCK, NULL);
690 gpio_request(GPIO_FN_CLKAUDIOBO, NULL);
691 gpio_request(GPIO_FN_FSIIASD, NULL);
692
693 /* change parent of FSI A */
694 fsia_clk = clk_get(NULL, "fsia_clk");
695 clk_register(&fsimcka_clk);
696 clk_set_parent(fsia_clk, &fsimcka_clk);
697 clk_set_rate(fsia_clk, 11000);
698 clk_set_rate(&fsimcka_clk, 11000);
699 clk_put(fsia_clk);
700
526 /* 701 /*
527 * enable SH-Eth 702 * enable SH-Eth
528 * 703 *
@@ -546,15 +721,15 @@ static int __init devices_setup(void)
546 sh_eth_init(); 721 sh_eth_init();
547 722
548 if (sw & SW41_B) { 723 if (sw & SW41_B) {
549 /* SVGA */ 724 /* 720p */
550 lcdc_info.ch[0].lcd_cfg.xres = 800; 725 lcdc_info.ch[0].lcd_cfg.xres = 1280;
551 lcdc_info.ch[0].lcd_cfg.yres = 600; 726 lcdc_info.ch[0].lcd_cfg.yres = 720;
552 lcdc_info.ch[0].lcd_cfg.left_margin = 142; 727 lcdc_info.ch[0].lcd_cfg.left_margin = 220;
553 lcdc_info.ch[0].lcd_cfg.right_margin = 52; 728 lcdc_info.ch[0].lcd_cfg.right_margin = 110;
554 lcdc_info.ch[0].lcd_cfg.hsync_len = 96; 729 lcdc_info.ch[0].lcd_cfg.hsync_len = 40;
555 lcdc_info.ch[0].lcd_cfg.upper_margin = 24; 730 lcdc_info.ch[0].lcd_cfg.upper_margin = 20;
556 lcdc_info.ch[0].lcd_cfg.lower_margin = 2; 731 lcdc_info.ch[0].lcd_cfg.lower_margin = 5;
557 lcdc_info.ch[0].lcd_cfg.vsync_len = 2; 732 lcdc_info.ch[0].lcd_cfg.vsync_len = 5;
558 } else { 733 } else {
559 /* VGA */ 734 /* VGA */
560 lcdc_info.ch[0].lcd_cfg.xres = 640; 735 lcdc_info.ch[0].lcd_cfg.xres = 640;
diff --git a/arch/sh/boards/mach-x3proto/setup.c b/arch/sh/boards/mach-x3proto/setup.c
index 8913ae39a802..efe4cb9f8a77 100644
--- a/arch/sh/boards/mach-x3proto/setup.c
+++ b/arch/sh/boards/mach-x3proto/setup.c
@@ -17,6 +17,7 @@
17#include <linux/irq.h> 17#include <linux/irq.h>
18#include <linux/interrupt.h> 18#include <linux/interrupt.h>
19#include <linux/usb/r8a66597.h> 19#include <linux/usb/r8a66597.h>
20#include <linux/usb/m66592.h>
20#include <asm/ilsel.h> 21#include <asm/ilsel.h>
21 22
22static struct resource heartbeat_resources[] = { 23static struct resource heartbeat_resources[] = {
@@ -89,6 +90,11 @@ static struct platform_device r8a66597_usb_host_device = {
89 .resource = r8a66597_usb_host_resources, 90 .resource = r8a66597_usb_host_resources,
90}; 91};
91 92
93static struct m66592_platdata usbf_platdata = {
94 .xtal = M66592_PLATDATA_XTAL_24MHZ,
95 .vif = 1,
96};
97
92static struct resource m66592_usb_peripheral_resources[] = { 98static struct resource m66592_usb_peripheral_resources[] = {
93 [0] = { 99 [0] = {
94 .name = "m66592_udc", 100 .name = "m66592_udc",
@@ -109,6 +115,7 @@ static struct platform_device m66592_usb_peripheral_device = {
109 .dev = { 115 .dev = {
110 .dma_mask = NULL, /* don't use dma */ 116 .dma_mask = NULL, /* don't use dma */
111 .coherent_dma_mask = 0xffffffff, 117 .coherent_dma_mask = 0xffffffff,
118 .platform_data = &usbf_platdata,
112 }, 119 },
113 .num_resources = ARRAY_SIZE(m66592_usb_peripheral_resources), 120 .num_resources = ARRAY_SIZE(m66592_usb_peripheral_resources),
114 .resource = m66592_usb_peripheral_resources, 121 .resource = m66592_usb_peripheral_resources,
diff --git a/arch/sh/boot/.gitignore b/arch/sh/boot/.gitignore
index aad5edddf93b..541087d2029c 100644
--- a/arch/sh/boot/.gitignore
+++ b/arch/sh/boot/.gitignore
@@ -1,4 +1,3 @@
1zImage 1zImage
2vmlinux.srec 2vmlinux*
3uImage 3uImage*
4uImage.srec
diff --git a/arch/sh/boot/Makefile b/arch/sh/boot/Makefile
index 78efb04c28f3..a1316872be6f 100644
--- a/arch/sh/boot/Makefile
+++ b/arch/sh/boot/Makefile
@@ -20,8 +20,13 @@ CONFIG_BOOT_LINK_OFFSET ?= 0x00800000
20CONFIG_ZERO_PAGE_OFFSET ?= 0x00001000 20CONFIG_ZERO_PAGE_OFFSET ?= 0x00001000
21CONFIG_ENTRY_OFFSET ?= 0x00001000 21CONFIG_ENTRY_OFFSET ?= 0x00001000
22 22
23targets := zImage vmlinux.srec uImage uImage.srec 23suffix-$(CONFIG_KERNEL_GZIP) := gz
24subdir- := compressed 24suffix-$(CONFIG_KERNEL_BZIP2) := bz2
25suffix-$(CONFIG_KERNEL_LZMA) := lzma
26
27targets := zImage vmlinux.srec romImage uImage uImage.srec uImage.gz uImage.bz2 uImage.lzma
28extra-y += vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma
29subdir- := compressed romimage
25 30
26$(obj)/zImage: $(obj)/compressed/vmlinux FORCE 31$(obj)/zImage: $(obj)/compressed/vmlinux FORCE
27 $(call if_changed,objcopy) 32 $(call if_changed,objcopy)
@@ -30,6 +35,13 @@ $(obj)/zImage: $(obj)/compressed/vmlinux FORCE
30$(obj)/compressed/vmlinux: FORCE 35$(obj)/compressed/vmlinux: FORCE
31 $(Q)$(MAKE) $(build)=$(obj)/compressed $@ 36 $(Q)$(MAKE) $(build)=$(obj)/compressed $@
32 37
38$(obj)/romImage: $(obj)/romimage/vmlinux FORCE
39 $(call if_changed,objcopy)
40 @echo ' Kernel: $@ is ready'
41
42$(obj)/romimage/vmlinux: $(obj)/zImage FORCE
43 $(Q)$(MAKE) $(build)=$(obj)/romimage $@
44
33KERNEL_MEMORY := 0x00000000 45KERNEL_MEMORY := 0x00000000
34ifeq ($(CONFIG_PMB_FIXED),y) 46ifeq ($(CONFIG_PMB_FIXED),y)
35KERNEL_MEMORY := $(shell /bin/bash -c 'printf "0x%08x" \ 47KERNEL_MEMORY := $(shell /bin/bash -c 'printf "0x%08x" \
@@ -40,9 +52,6 @@ KERNEL_MEMORY := $(shell /bin/bash -c 'printf "0x%08x" \
40 $$[$(CONFIG_MEMORY_START)]') 52 $$[$(CONFIG_MEMORY_START)]')
41endif 53endif
42 54
43export CONFIG_PAGE_OFFSET CONFIG_MEMORY_START CONFIG_BOOT_LINK_OFFSET \
44 CONFIG_ZERO_PAGE_OFFSET CONFIG_ENTRY_OFFSET KERNEL_MEMORY
45
46KERNEL_LOAD := $(shell /bin/bash -c 'printf "0x%08x" \ 55KERNEL_LOAD := $(shell /bin/bash -c 'printf "0x%08x" \
47 $$[$(CONFIG_PAGE_OFFSET) + \ 56 $$[$(CONFIG_PAGE_OFFSET) + \
48 $(KERNEL_MEMORY) + \ 57 $(KERNEL_MEMORY) + \
@@ -55,19 +64,30 @@ KERNEL_ENTRY := $(shell /bin/bash -c 'printf "0x%08x" \
55 64
56quiet_cmd_uimage = UIMAGE $@ 65quiet_cmd_uimage = UIMAGE $@
57 cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A sh -O linux -T kernel \ 66 cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A sh -O linux -T kernel \
58 -C gzip -a $(KERNEL_LOAD) -e $(KERNEL_ENTRY) \ 67 -C $(2) -a $(KERNEL_LOAD) -e $(KERNEL_ENTRY) \
59 -n 'Linux-$(KERNELRELEASE)' -d $< $@ 68 -n 'Linux-$(KERNELRELEASE)' -d $< $@
60 69
61$(obj)/uImage: $(obj)/vmlinux.bin.gz FORCE
62 $(call if_changed,uimage)
63 @echo ' Image $@ is ready'
64
65$(obj)/vmlinux.bin: vmlinux FORCE 70$(obj)/vmlinux.bin: vmlinux FORCE
66 $(call if_changed,objcopy) 71 $(call if_changed,objcopy)
67 72
68$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE 73$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
69 $(call if_changed,gzip) 74 $(call if_changed,gzip)
70 75
76$(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin FORCE
77 $(call if_changed,bzip2)
78
79$(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE
80 $(call if_changed,lzma)
81
82$(obj)/uImage.bz2: $(obj)/vmlinux.bin.bz2
83 $(call if_changed,uimage,bzip2)
84
85$(obj)/uImage.gz: $(obj)/vmlinux.bin.gz
86 $(call if_changed,uimage,gzip)
87
88$(obj)/uImage.lzma: $(obj)/vmlinux.bin.lzma
89 $(call if_changed,uimage,lzma)
90
71OBJCOPYFLAGS_vmlinux.srec := -I binary -O srec 91OBJCOPYFLAGS_vmlinux.srec := -I binary -O srec
72$(obj)/vmlinux.srec: $(obj)/compressed/vmlinux 92$(obj)/vmlinux.srec: $(obj)/compressed/vmlinux
73 $(call if_changed,objcopy) 93 $(call if_changed,objcopy)
@@ -76,5 +96,9 @@ OBJCOPYFLAGS_uImage.srec := -I binary -O srec
76$(obj)/uImage.srec: $(obj)/uImage 96$(obj)/uImage.srec: $(obj)/uImage
77 $(call if_changed,objcopy) 97 $(call if_changed,objcopy)
78 98
79clean-files += uImage uImage.srec vmlinux.srec \ 99$(obj)/uImage: $(obj)/uImage.$(suffix-y)
80 vmlinux.bin vmlinux.bin.gz 100 @ln -sf $(notdir $<) $@
101 @echo ' Image $@ is ready'
102
103export CONFIG_PAGE_OFFSET CONFIG_MEMORY_START CONFIG_BOOT_LINK_OFFSET \
104 CONFIG_ZERO_PAGE_OFFSET CONFIG_ENTRY_OFFSET KERNEL_MEMORY suffix-y
diff --git a/arch/sh/boot/compressed/.gitignore b/arch/sh/boot/compressed/.gitignore
new file mode 100644
index 000000000000..2374a83d87b2
--- /dev/null
+++ b/arch/sh/boot/compressed/.gitignore
@@ -0,0 +1 @@
vmlinux.bin.*
diff --git a/arch/sh/boot/compressed/Makefile b/arch/sh/boot/compressed/Makefile
index 9531bf1b7c2f..6182eca5180a 100644
--- a/arch/sh/boot/compressed/Makefile
+++ b/arch/sh/boot/compressed/Makefile
@@ -5,9 +5,10 @@
5# 5#
6 6
7targets := vmlinux vmlinux.bin vmlinux.bin.gz \ 7targets := vmlinux vmlinux.bin vmlinux.bin.gz \
8 head_$(BITS).o misc_$(BITS).o piggy.o 8 vmlinux.bin.bz2 vmlinux.bin.lzma \
9 head_$(BITS).o misc.o piggy.o
9 10
10OBJECTS = $(obj)/head_$(BITS).o $(obj)/misc_$(BITS).o $(obj)/cache.o 11OBJECTS = $(obj)/head_$(BITS).o $(obj)/misc.o $(obj)/cache.o
11 12
12ifdef CONFIG_SH_STANDARD_BIOS 13ifdef CONFIG_SH_STANDARD_BIOS
13OBJECTS += $(obj)/../../kernel/sh_bios.o 14OBJECTS += $(obj)/../../kernel/sh_bios.o
@@ -23,7 +24,7 @@ IMAGE_OFFSET := $(shell /bin/bash -c 'printf "0x%08x" \
23 24
24LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) 25LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
25 26
26ifeq ($(CONFIG_FUNCTION_TRACER),y) 27ifeq ($(CONFIG_MCOUNT),y)
27ORIG_CFLAGS := $(KBUILD_CFLAGS) 28ORIG_CFLAGS := $(KBUILD_CFLAGS)
28KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS)) 29KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS))
29endif 30endif
@@ -38,10 +39,18 @@ $(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o $(LIBGCC) FORCE
38$(obj)/vmlinux.bin: vmlinux FORCE 39$(obj)/vmlinux.bin: vmlinux FORCE
39 $(call if_changed,objcopy) 40 $(call if_changed,objcopy)
40 41
41$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE 42vmlinux.bin.all-y := $(obj)/vmlinux.bin
43
44$(obj)/vmlinux.bin.gz: $(vmlinux.bin.all-y) FORCE
42 $(call if_changed,gzip) 45 $(call if_changed,gzip)
46$(obj)/vmlinux.bin.bz2: $(vmlinux.bin.all-y) FORCE
47 $(call if_changed,bzip2)
48$(obj)/vmlinux.bin.lzma: $(vmlinux.bin.all-y) FORCE
49 $(call if_changed,lzma)
43 50
44OBJCOPYFLAGS += -R .empty_zero_page 51OBJCOPYFLAGS += -R .empty_zero_page
45 52
46$(obj)/piggy.o: $(obj)/piggy.S $(obj)/vmlinux.bin.gz FORCE 53LDFLAGS_piggy.o := -r --format binary --oformat $(ld-bfd) -T
47 $(call if_changed,as_o_S) 54
55$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix-y) FORCE
56 $(call if_changed,ld)
diff --git a/arch/sh/boot/compressed/head_32.S b/arch/sh/boot/compressed/head_32.S
index 06ac31f3be88..02a30935f0b9 100644
--- a/arch/sh/boot/compressed/head_32.S
+++ b/arch/sh/boot/compressed/head_32.S
@@ -22,7 +22,7 @@ startup:
22 bt clear_bss 22 bt clear_bss
23 sub r0, r2 23 sub r0, r2
24 mov.l bss_start_addr, r0 24 mov.l bss_start_addr, r0
25 mov #0xe0, r1 25 mov #0xffffffe0, r1
26 and r1, r0 ! align cache line 26 and r1, r0 ! align cache line
27 mov.l text_start_addr, r3 27 mov.l text_start_addr, r3
28 mov r0, r1 28 mov r0, r1
diff --git a/arch/sh/boot/compressed/install.sh b/arch/sh/boot/compressed/install.sh
index 90589f0fec12..f9f41818b17e 100644
--- a/arch/sh/boot/compressed/install.sh
+++ b/arch/sh/boot/compressed/install.sh
@@ -23,8 +23,8 @@
23 23
24# User may have a custom install script 24# User may have a custom install script
25 25
26if [ -x /sbin/installkernel ]; then 26if [ -x /sbin/${INSTALLKERNEL} ]; then
27 exec /sbin/installkernel "$@" 27 exec /sbin/${INSTALLKERNEL} "$@"
28fi 28fi
29 29
30if [ "$2" = "zImage" ]; then 30if [ "$2" = "zImage" ]; then
diff --git a/arch/sh/boot/compressed/misc.c b/arch/sh/boot/compressed/misc.c
new file mode 100644
index 000000000000..fd56a71ca9d9
--- /dev/null
+++ b/arch/sh/boot/compressed/misc.c
@@ -0,0 +1,149 @@
1/*
2 * arch/sh/boot/compressed/misc.c
3 *
4 * This is a collection of several routines from gzip-1.0.3
5 * adapted for Linux.
6 *
7 * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994
8 *
9 * Adapted for SH by Stuart Menefy, Aug 1999
10 *
11 * Modified to use standard LinuxSH BIOS by Greg Banks 7Jul2000
12 */
13
14#include <asm/uaccess.h>
15#include <asm/addrspace.h>
16#include <asm/page.h>
17#include <asm/sh_bios.h>
18
19/*
20 * gzip declarations
21 */
22
23#define STATIC static
24
25#undef memset
26#undef memcpy
27#define memzero(s, n) memset ((s), 0, (n))
28
29/* cache.c */
30#define CACHE_ENABLE 0
31#define CACHE_DISABLE 1
32int cache_control(unsigned int command);
33
34extern char input_data[];
35extern int input_len;
36static unsigned char *output;
37
38static void error(char *m);
39
40int puts(const char *);
41
42extern int _text; /* Defined in vmlinux.lds.S */
43extern int _end;
44static unsigned long free_mem_ptr;
45static unsigned long free_mem_end_ptr;
46
47#ifdef CONFIG_HAVE_KERNEL_BZIP2
48#define HEAP_SIZE 0x400000
49#else
50#define HEAP_SIZE 0x10000
51#endif
52
53#ifdef CONFIG_KERNEL_GZIP
54#include "../../../../lib/decompress_inflate.c"
55#endif
56
57#ifdef CONFIG_KERNEL_BZIP2
58#include "../../../../lib/decompress_bunzip2.c"
59#endif
60
61#ifdef CONFIG_KERNEL_LZMA
62#include "../../../../lib/decompress_unlzma.c"
63#endif
64
65#ifdef CONFIG_SH_STANDARD_BIOS
66size_t strlen(const char *s)
67{
68 int i = 0;
69
70 while (*s++)
71 i++;
72 return i;
73}
74
75int puts(const char *s)
76{
77 int len = strlen(s);
78 sh_bios_console_write(s, len);
79 return len;
80}
81#else
82int puts(const char *s)
83{
84 /* This should be updated to use the sh-sci routines */
85 return 0;
86}
87#endif
88
89void* memset(void* s, int c, size_t n)
90{
91 int i;
92 char *ss = (char*)s;
93
94 for (i=0;i<n;i++) ss[i] = c;
95 return s;
96}
97
98void* memcpy(void* __dest, __const void* __src,
99 size_t __n)
100{
101 int i;
102 char *d = (char *)__dest, *s = (char *)__src;
103
104 for (i=0;i<__n;i++) d[i] = s[i];
105 return __dest;
106}
107
108static void error(char *x)
109{
110 puts("\n\n");
111 puts(x);
112 puts("\n\n -- System halted");
113
114 while(1); /* Halt */
115}
116
117#ifdef CONFIG_SUPERH64
118#define stackalign 8
119#else
120#define stackalign 4
121#endif
122
123#define STACK_SIZE (4096)
124long __attribute__ ((aligned(stackalign))) user_stack[STACK_SIZE];
125long *stack_start = &user_stack[STACK_SIZE];
126
127void decompress_kernel(void)
128{
129 unsigned long output_addr;
130
131#ifdef CONFIG_SUPERH64
132 output_addr = (CONFIG_MEMORY_START + 0x2000);
133#else
134 output_addr = PHYSADDR((unsigned long)&_text+PAGE_SIZE);
135#ifdef CONFIG_29BIT
136 output_addr |= P2SEG;
137#endif
138#endif
139
140 output = (unsigned char *)output_addr;
141 free_mem_ptr = (unsigned long)&_end;
142 free_mem_end_ptr = free_mem_ptr + HEAP_SIZE;
143
144 puts("Uncompressing Linux... ");
145 cache_control(CACHE_ENABLE);
146 decompress(input_data, input_len, NULL, NULL, output, NULL, error);
147 cache_control(CACHE_DISABLE);
148 puts("Ok, booting the kernel.\n");
149}
diff --git a/arch/sh/boot/compressed/misc_32.c b/arch/sh/boot/compressed/misc_32.c
deleted file mode 100644
index efdba6b29572..000000000000
--- a/arch/sh/boot/compressed/misc_32.c
+++ /dev/null
@@ -1,206 +0,0 @@
1/*
2 * arch/sh/boot/compressed/misc.c
3 *
4 * This is a collection of several routines from gzip-1.0.3
5 * adapted for Linux.
6 *
7 * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994
8 *
9 * Adapted for SH by Stuart Menefy, Aug 1999
10 *
11 * Modified to use standard LinuxSH BIOS by Greg Banks 7Jul2000
12 */
13
14#include <asm/uaccess.h>
15#include <asm/addrspace.h>
16#include <asm/page.h>
17#ifdef CONFIG_SH_STANDARD_BIOS
18#include <asm/sh_bios.h>
19#endif
20
21/*
22 * gzip declarations
23 */
24
25#define OF(args) args
26#define STATIC static
27
28#undef memset
29#undef memcpy
30#define memzero(s, n) memset ((s), 0, (n))
31
32typedef unsigned char uch;
33typedef unsigned short ush;
34typedef unsigned long ulg;
35
36#define WSIZE 0x8000 /* Window size must be at least 32k, */
37 /* and a power of two */
38
39static uch *inbuf; /* input buffer */
40static uch window[WSIZE]; /* Sliding window buffer */
41
42static unsigned insize = 0; /* valid bytes in inbuf */
43static unsigned inptr = 0; /* index of next byte to be processed in inbuf */
44static unsigned outcnt = 0; /* bytes in output buffer */
45
46/* gzip flag byte */
47#define ASCII_FLAG 0x01 /* bit 0 set: file probably ASCII text */
48#define CONTINUATION 0x02 /* bit 1 set: continuation of multi-part gzip file */
49#define EXTRA_FIELD 0x04 /* bit 2 set: extra field present */
50#define ORIG_NAME 0x08 /* bit 3 set: original file name present */
51#define COMMENT 0x10 /* bit 4 set: file comment present */
52#define ENCRYPTED 0x20 /* bit 5 set: file is encrypted */
53#define RESERVED 0xC0 /* bit 6,7: reserved */
54
55#define get_byte() (inptr < insize ? inbuf[inptr++] : fill_inbuf())
56
57/* Diagnostic functions */
58#ifdef DEBUG
59# define Assert(cond,msg) {if(!(cond)) error(msg);}
60# define Trace(x) fprintf x
61# define Tracev(x) {if (verbose) fprintf x ;}
62# define Tracevv(x) {if (verbose>1) fprintf x ;}
63# define Tracec(c,x) {if (verbose && (c)) fprintf x ;}
64# define Tracecv(c,x) {if (verbose>1 && (c)) fprintf x ;}
65#else
66# define Assert(cond,msg)
67# define Trace(x)
68# define Tracev(x)
69# define Tracevv(x)
70# define Tracec(c,x)
71# define Tracecv(c,x)
72#endif
73
74static int fill_inbuf(void);
75static void flush_window(void);
76static void error(char *m);
77
78extern char input_data[];
79extern int input_len;
80
81static long bytes_out = 0;
82static uch *output_data;
83static unsigned long output_ptr = 0;
84
85static void error(char *m);
86
87int puts(const char *);
88
89extern int _text; /* Defined in vmlinux.lds.S */
90extern int _end;
91static unsigned long free_mem_ptr;
92static unsigned long free_mem_end_ptr;
93
94#define HEAP_SIZE 0x10000
95
96#include "../../../../lib/inflate.c"
97
98#ifdef CONFIG_SH_STANDARD_BIOS
99size_t strlen(const char *s)
100{
101 int i = 0;
102
103 while (*s++)
104 i++;
105 return i;
106}
107
108int puts(const char *s)
109{
110 int len = strlen(s);
111 sh_bios_console_write(s, len);
112 return len;
113}
114#else
115int puts(const char *s)
116{
117 /* This should be updated to use the sh-sci routines */
118 return 0;
119}
120#endif
121
122void* memset(void* s, int c, size_t n)
123{
124 int i;
125 char *ss = (char*)s;
126
127 for (i=0;i<n;i++) ss[i] = c;
128 return s;
129}
130
131void* memcpy(void* __dest, __const void* __src,
132 size_t __n)
133{
134 int i;
135 char *d = (char *)__dest, *s = (char *)__src;
136
137 for (i=0;i<__n;i++) d[i] = s[i];
138 return __dest;
139}
140
141/* ===========================================================================
142 * Fill the input buffer. This is called only when the buffer is empty
143 * and at least one byte is really needed.
144 */
145static int fill_inbuf(void)
146{
147 if (insize != 0) {
148 error("ran out of input data");
149 }
150
151 inbuf = input_data;
152 insize = input_len;
153 inptr = 1;
154 return inbuf[0];
155}
156
157/* ===========================================================================
158 * Write the output window window[0..outcnt-1] and update crc and bytes_out.
159 * (Used for the decompressed data only.)
160 */
161static void flush_window(void)
162{
163 ulg c = crc; /* temporary variable */
164 unsigned n;
165 uch *in, *out, ch;
166
167 in = window;
168 out = &output_data[output_ptr];
169 for (n = 0; n < outcnt; n++) {
170 ch = *out++ = *in++;
171 c = crc_32_tab[((int)c ^ ch) & 0xff] ^ (c >> 8);
172 }
173 crc = c;
174 bytes_out += (ulg)outcnt;
175 output_ptr += (ulg)outcnt;
176 outcnt = 0;
177}
178
179static void error(char *x)
180{
181 puts("\n\n");
182 puts(x);
183 puts("\n\n -- System halted");
184
185 while(1); /* Halt */
186}
187
188#define STACK_SIZE (4096)
189long user_stack [STACK_SIZE];
190long* stack_start = &user_stack[STACK_SIZE];
191
192void decompress_kernel(void)
193{
194 output_data = NULL;
195 output_ptr = PHYSADDR((unsigned long)&_text+PAGE_SIZE);
196#ifdef CONFIG_29BIT
197 output_ptr |= P2SEG;
198#endif
199 free_mem_ptr = (unsigned long)&_end;
200 free_mem_end_ptr = free_mem_ptr + HEAP_SIZE;
201
202 makecrc();
203 puts("Uncompressing Linux... ");
204 gunzip();
205 puts("Ok, booting the kernel.\n");
206}
diff --git a/arch/sh/boot/compressed/misc_64.c b/arch/sh/boot/compressed/misc_64.c
deleted file mode 100644
index 2941657e18aa..000000000000
--- a/arch/sh/boot/compressed/misc_64.c
+++ /dev/null
@@ -1,210 +0,0 @@
1/*
2 * arch/sh/boot/compressed/misc_64.c
3 *
4 * This is a collection of several routines from gzip-1.0.3
5 * adapted for Linux.
6 *
7 * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994
8 *
9 * Adapted for SHmedia from sh by Stuart Menefy, May 2002
10 */
11
12#include <asm/uaccess.h>
13
14/* cache.c */
15#define CACHE_ENABLE 0
16#define CACHE_DISABLE 1
17int cache_control(unsigned int command);
18
19/*
20 * gzip declarations
21 */
22
23#define OF(args) args
24#define STATIC static
25
26#undef memset
27#undef memcpy
28#define memzero(s, n) memset ((s), 0, (n))
29
30typedef unsigned char uch;
31typedef unsigned short ush;
32typedef unsigned long ulg;
33
34#define WSIZE 0x8000 /* Window size must be at least 32k, */
35 /* and a power of two */
36
37static uch *inbuf; /* input buffer */
38static uch window[WSIZE]; /* Sliding window buffer */
39
40static unsigned insize = 0; /* valid bytes in inbuf */
41static unsigned inptr = 0; /* index of next byte to be processed in inbuf */
42static unsigned outcnt = 0; /* bytes in output buffer */
43
44/* gzip flag byte */
45#define ASCII_FLAG 0x01 /* bit 0 set: file probably ASCII text */
46#define CONTINUATION 0x02 /* bit 1 set: continuation of multi-part gzip file */
47#define EXTRA_FIELD 0x04 /* bit 2 set: extra field present */
48#define ORIG_NAME 0x08 /* bit 3 set: original file name present */
49#define COMMENT 0x10 /* bit 4 set: file comment present */
50#define ENCRYPTED 0x20 /* bit 5 set: file is encrypted */
51#define RESERVED 0xC0 /* bit 6,7: reserved */
52
53#define get_byte() (inptr < insize ? inbuf[inptr++] : fill_inbuf())
54
55/* Diagnostic functions */
56#ifdef DEBUG
57# define Assert(cond,msg) {if(!(cond)) error(msg);}
58# define Trace(x) fprintf x
59# define Tracev(x) {if (verbose) fprintf x ;}
60# define Tracevv(x) {if (verbose>1) fprintf x ;}
61# define Tracec(c,x) {if (verbose && (c)) fprintf x ;}
62# define Tracecv(c,x) {if (verbose>1 && (c)) fprintf x ;}
63#else
64# define Assert(cond,msg)
65# define Trace(x)
66# define Tracev(x)
67# define Tracevv(x)
68# define Tracec(c,x)
69# define Tracecv(c,x)
70#endif
71
72static int fill_inbuf(void);
73static void flush_window(void);
74static void error(char *m);
75
76extern char input_data[];
77extern int input_len;
78
79static long bytes_out = 0;
80static uch *output_data;
81static unsigned long output_ptr = 0;
82
83static void error(char *m);
84
85static void puts(const char *);
86
87extern int _text; /* Defined in vmlinux.lds.S */
88extern int _end;
89static unsigned long free_mem_ptr;
90static unsigned long free_mem_end_ptr;
91
92#define HEAP_SIZE 0x10000
93
94#include "../../../../lib/inflate.c"
95
96void puts(const char *s)
97{
98}
99
100void *memset(void *s, int c, size_t n)
101{
102 int i;
103 char *ss = (char *) s;
104
105 for (i = 0; i < n; i++)
106 ss[i] = c;
107 return s;
108}
109
110void *memcpy(void *__dest, __const void *__src, size_t __n)
111{
112 int i;
113 char *d = (char *) __dest, *s = (char *) __src;
114
115 for (i = 0; i < __n; i++)
116 d[i] = s[i];
117 return __dest;
118}
119
120/* ===========================================================================
121 * Fill the input buffer. This is called only when the buffer is empty
122 * and at least one byte is really needed.
123 */
124static int fill_inbuf(void)
125{
126 if (insize != 0) {
127 error("ran out of input data\n");
128 }
129
130 inbuf = input_data;
131 insize = input_len;
132 inptr = 1;
133 return inbuf[0];
134}
135
136/* ===========================================================================
137 * Write the output window window[0..outcnt-1] and update crc and bytes_out.
138 * (Used for the decompressed data only.)
139 */
140static void flush_window(void)
141{
142 ulg c = crc; /* temporary variable */
143 unsigned n;
144 uch *in, *out, ch;
145
146 in = window;
147 out = &output_data[output_ptr];
148 for (n = 0; n < outcnt; n++) {
149 ch = *out++ = *in++;
150 c = crc_32_tab[((int) c ^ ch) & 0xff] ^ (c >> 8);
151 }
152 crc = c;
153 bytes_out += (ulg) outcnt;
154 output_ptr += (ulg) outcnt;
155 outcnt = 0;
156 puts(".");
157}
158
159static void error(char *x)
160{
161 puts("\n\n");
162 puts(x);
163 puts("\n\n -- System halted");
164
165 while (1) ; /* Halt */
166}
167
168#define STACK_SIZE (4096)
169long __attribute__ ((aligned(8))) user_stack[STACK_SIZE];
170long *stack_start = &user_stack[STACK_SIZE];
171
172void decompress_kernel(void)
173{
174 output_data = (uch *) (CONFIG_MEMORY_START + 0x2000);
175 free_mem_ptr = (unsigned long) &_end;
176 free_mem_end_ptr = free_mem_ptr + HEAP_SIZE;
177
178 makecrc();
179 puts("Uncompressing Linux... ");
180 cache_control(CACHE_ENABLE);
181 gunzip();
182 puts("\n");
183
184#if 0
185 /* When booting from ROM may want to do something like this if the
186 * boot loader doesn't.
187 */
188
189 /* Set up the parameters and command line */
190 {
191 volatile unsigned int *parambase =
192 (int *) (CONFIG_MEMORY_START + 0x1000);
193
194 parambase[0] = 0x1; /* MOUNT_ROOT_RDONLY */
195 parambase[1] = 0x0; /* RAMDISK_FLAGS */
196 parambase[2] = 0x0200; /* ORIG_ROOT_DEV */
197 parambase[3] = 0x0; /* LOADER_TYPE */
198 parambase[4] = 0x0; /* INITRD_START */
199 parambase[5] = 0x0; /* INITRD_SIZE */
200 parambase[6] = 0;
201
202 strcpy((char *) ((int) parambase + 0x100),
203 "console=ttySC0,38400");
204 }
205#endif
206
207 puts("Ok, booting the kernel.\n");
208
209 cache_control(CACHE_DISABLE);
210}
diff --git a/arch/sh/boot/compressed/piggy.S b/arch/sh/boot/compressed/piggy.S
deleted file mode 100644
index 566071926b13..000000000000
--- a/arch/sh/boot/compressed/piggy.S
+++ /dev/null
@@ -1,8 +0,0 @@
1 .global input_len, input_data
2 .data
3input_len:
4 .long input_data_end - input_data
5input_data:
6 .incbin "arch/sh/boot/compressed/vmlinux.bin.gz"
7input_data_end:
8 .end
diff --git a/arch/sh/boot/compressed/vmlinux.scr b/arch/sh/boot/compressed/vmlinux.scr
new file mode 100644
index 000000000000..f02382ae5c48
--- /dev/null
+++ b/arch/sh/boot/compressed/vmlinux.scr
@@ -0,0 +1,10 @@
1SECTIONS
2{
3 .rodata.compressed : {
4 input_len = .;
5 LONG(input_data_end - input_data) input_data = .;
6 *(.data)
7 output_len = . - 4;
8 input_data_end = .;
9 }
10}
diff --git a/arch/sh/boot/romimage/Makefile b/arch/sh/boot/romimage/Makefile
new file mode 100644
index 000000000000..5806eee84f6f
--- /dev/null
+++ b/arch/sh/boot/romimage/Makefile
@@ -0,0 +1,19 @@
1#
2# linux/arch/sh/boot/romimage/Makefile
3#
4# create an image suitable for burning to flash from zImage
5#
6
7targets := vmlinux head.o
8
9OBJECTS = $(obj)/head.o
10LDFLAGS_vmlinux := --oformat $(ld-bfd) -Ttext 0 -e romstart
11
12$(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o FORCE
13 $(call if_changed,ld)
14 @:
15
16LDFLAGS_piggy.o := -r --format binary --oformat $(ld-bfd) -T
17
18$(obj)/piggy.o: $(obj)/vmlinux.scr arch/sh/boot/zImage FORCE
19 $(call if_changed,ld)
diff --git a/arch/sh/boot/romimage/head.S b/arch/sh/boot/romimage/head.S
new file mode 100644
index 000000000000..219bc626dd71
--- /dev/null
+++ b/arch/sh/boot/romimage/head.S
@@ -0,0 +1,10 @@
1/*
2 * linux/arch/sh/boot/romimage/head.S
3 *
4 * Board specific setup code, executed before zImage loader
5 */
6
7.text
8 .global romstart
9romstart:
10#include <mach/romimage.h>
diff --git a/arch/sh/boot/romimage/vmlinux.scr b/arch/sh/boot/romimage/vmlinux.scr
new file mode 100644
index 000000000000..287c08f8b4bb
--- /dev/null
+++ b/arch/sh/boot/romimage/vmlinux.scr
@@ -0,0 +1,6 @@
1SECTIONS
2{
3 .text : {
4 *(.data)
5 }
6}
diff --git a/arch/sh/configs/ap325rxa_defconfig b/arch/sh/configs/ap325rxa_defconfig
index 6c38a43594fc..2f78d01cc6c0 100644
--- a/arch/sh/configs/ap325rxa_defconfig
+++ b/arch/sh/configs/ap325rxa_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.30 3# Linux kernel version: 2.6.31
4# Thu Jun 18 16:04:11 2009 4# Fri Sep 25 11:22:50 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -14,6 +14,7 @@ CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y 14CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
16CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_IRQ_PER_CPU=y
17CONFIG_GENERIC_GPIO=y 18CONFIG_GENERIC_GPIO=y
18CONFIG_GENERIC_TIME=y 19CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 20CONFIG_GENERIC_CLOCKEVENTS=y
@@ -28,7 +29,9 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
28# CONFIG_ARCH_HAS_ILOG2_U64 is not set 29# CONFIG_ARCH_HAS_ILOG2_U64 is not set
29CONFIG_ARCH_NO_VIRT_TO_BUS=y 30CONFIG_ARCH_NO_VIRT_TO_BUS=y
30CONFIG_ARCH_HAS_DEFAULT_IDLE=y 31CONFIG_ARCH_HAS_DEFAULT_IDLE=y
32CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
31CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 33CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
34CONFIG_CONSTRUCTORS=y
32 35
33# 36#
34# General setup 37# General setup
@@ -39,6 +42,12 @@ CONFIG_LOCK_KERNEL=y
39CONFIG_INIT_ENV_ARG_LIMIT=32 42CONFIG_INIT_ENV_ARG_LIMIT=32
40CONFIG_LOCALVERSION="" 43CONFIG_LOCALVERSION=""
41# CONFIG_LOCALVERSION_AUTO is not set 44# CONFIG_LOCALVERSION_AUTO is not set
45CONFIG_HAVE_KERNEL_GZIP=y
46CONFIG_HAVE_KERNEL_BZIP2=y
47CONFIG_HAVE_KERNEL_LZMA=y
48CONFIG_KERNEL_GZIP=y
49# CONFIG_KERNEL_BZIP2 is not set
50# CONFIG_KERNEL_LZMA is not set
42CONFIG_SWAP=y 51CONFIG_SWAP=y
43CONFIG_SYSVIPC=y 52CONFIG_SYSVIPC=y
44CONFIG_SYSVIPC_SYSCTL=y 53CONFIG_SYSVIPC_SYSCTL=y
@@ -51,11 +60,12 @@ CONFIG_BSD_PROCESS_ACCT=y
51# 60#
52# RCU Subsystem 61# RCU Subsystem
53# 62#
54CONFIG_CLASSIC_RCU=y 63CONFIG_TREE_RCU=y
55# CONFIG_TREE_RCU is not set 64# CONFIG_TREE_PREEMPT_RCU is not set
56# CONFIG_PREEMPT_RCU is not set 65# CONFIG_RCU_TRACE is not set
66CONFIG_RCU_FANOUT=32
67# CONFIG_RCU_FANOUT_EXACT is not set
57# CONFIG_TREE_RCU_TRACE is not set 68# CONFIG_TREE_RCU_TRACE is not set
58# CONFIG_PREEMPT_RCU_TRACE is not set
59# CONFIG_IKCONFIG is not set 69# CONFIG_IKCONFIG is not set
60CONFIG_LOG_BUF_SHIFT=14 70CONFIG_LOG_BUF_SHIFT=14
61CONFIG_GROUP_SCHED=y 71CONFIG_GROUP_SCHED=y
@@ -88,18 +98,19 @@ CONFIG_TIMERFD=y
88CONFIG_EVENTFD=y 98CONFIG_EVENTFD=y
89CONFIG_SHMEM=y 99CONFIG_SHMEM=y
90CONFIG_AIO=y 100CONFIG_AIO=y
101CONFIG_HAVE_PERF_EVENTS=y
91 102
92# 103#
93# Performance Counters 104# Kernel Performance Events And Counters
94# 105#
106# CONFIG_PERF_EVENTS is not set
107# CONFIG_PERF_COUNTERS is not set
95CONFIG_VM_EVENT_COUNTERS=y 108CONFIG_VM_EVENT_COUNTERS=y
96# CONFIG_STRIP_ASM_SYMS is not set
97CONFIG_COMPAT_BRK=y 109CONFIG_COMPAT_BRK=y
98CONFIG_SLAB=y 110CONFIG_SLAB=y
99# CONFIG_SLUB is not set 111# CONFIG_SLUB is not set
100# CONFIG_SLOB is not set 112# CONFIG_SLOB is not set
101# CONFIG_PROFILING is not set 113# CONFIG_PROFILING is not set
102# CONFIG_MARKERS is not set
103CONFIG_HAVE_OPROFILE=y 114CONFIG_HAVE_OPROFILE=y
104CONFIG_HAVE_IOREMAP_PROT=y 115CONFIG_HAVE_IOREMAP_PROT=y
105CONFIG_HAVE_KPROBES=y 116CONFIG_HAVE_KPROBES=y
@@ -107,6 +118,10 @@ CONFIG_HAVE_KRETPROBES=y
107CONFIG_HAVE_ARCH_TRACEHOOK=y 118CONFIG_HAVE_ARCH_TRACEHOOK=y
108CONFIG_HAVE_CLK=y 119CONFIG_HAVE_CLK=y
109CONFIG_HAVE_DMA_API_DEBUG=y 120CONFIG_HAVE_DMA_API_DEBUG=y
121
122#
123# GCOV-based kernel profiling
124#
110# CONFIG_SLOW_WORK is not set 125# CONFIG_SLOW_WORK is not set
111CONFIG_HAVE_GENERIC_DMA_COHERENT=y 126CONFIG_HAVE_GENERIC_DMA_COHERENT=y
112CONFIG_SLABINFO=y 127CONFIG_SLABINFO=y
@@ -119,7 +134,7 @@ CONFIG_MODULE_UNLOAD=y
119# CONFIG_MODVERSIONS is not set 134# CONFIG_MODVERSIONS is not set
120# CONFIG_MODULE_SRCVERSION_ALL is not set 135# CONFIG_MODULE_SRCVERSION_ALL is not set
121CONFIG_BLOCK=y 136CONFIG_BLOCK=y
122# CONFIG_LBD is not set 137CONFIG_LBDAF=y
123# CONFIG_BLK_DEV_BSG is not set 138# CONFIG_BLK_DEV_BSG is not set
124# CONFIG_BLK_DEV_INTEGRITY is not set 139# CONFIG_BLK_DEV_INTEGRITY is not set
125 140
@@ -135,7 +150,7 @@ CONFIG_IOSCHED_CFQ=y
135CONFIG_DEFAULT_CFQ=y 150CONFIG_DEFAULT_CFQ=y
136# CONFIG_DEFAULT_NOOP is not set 151# CONFIG_DEFAULT_NOOP is not set
137CONFIG_DEFAULT_IOSCHED="cfq" 152CONFIG_DEFAULT_IOSCHED="cfq"
138# CONFIG_FREEZER is not set 153CONFIG_FREEZER=y
139 154
140# 155#
141# System type 156# System type
@@ -169,6 +184,7 @@ CONFIG_ARCH_SHMOBILE=y
169# CONFIG_CPU_SUBTYPE_SH4_202 is not set 184# CONFIG_CPU_SUBTYPE_SH4_202 is not set
170CONFIG_CPU_SUBTYPE_SH7723=y 185CONFIG_CPU_SUBTYPE_SH7723=y
171# CONFIG_CPU_SUBTYPE_SH7724 is not set 186# CONFIG_CPU_SUBTYPE_SH7724 is not set
187# CONFIG_CPU_SUBTYPE_SH7757 is not set
172# CONFIG_CPU_SUBTYPE_SH7763 is not set 188# CONFIG_CPU_SUBTYPE_SH7763 is not set
173# CONFIG_CPU_SUBTYPE_SH7770 is not set 189# CONFIG_CPU_SUBTYPE_SH7770 is not set
174# CONFIG_CPU_SUBTYPE_SH7780 is not set 190# CONFIG_CPU_SUBTYPE_SH7780 is not set
@@ -215,6 +231,7 @@ CONFIG_ZONE_DMA_FLAG=0
215CONFIG_NR_QUICK=2 231CONFIG_NR_QUICK=2
216CONFIG_HAVE_MLOCK=y 232CONFIG_HAVE_MLOCK=y
217CONFIG_HAVE_MLOCKED_PAGE_BIT=y 233CONFIG_HAVE_MLOCKED_PAGE_BIT=y
234# CONFIG_KSM is not set
218CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 235CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
219 236
220# 237#
@@ -296,7 +313,8 @@ CONFIG_GUSA=y
296CONFIG_ZERO_PAGE_OFFSET=0x00001000 313CONFIG_ZERO_PAGE_OFFSET=0x00001000
297CONFIG_BOOT_LINK_OFFSET=0x00800000 314CONFIG_BOOT_LINK_OFFSET=0x00800000
298CONFIG_ENTRY_OFFSET=0x00001000 315CONFIG_ENTRY_OFFSET=0x00001000
299CONFIG_CMDLINE_BOOL=y 316CONFIG_CMDLINE_OVERWRITE=y
317# CONFIG_CMDLINE_EXTEND is not set
300CONFIG_CMDLINE="console=tty1 console=ttySC5,38400 root=/dev/nfs ip=dhcp" 318CONFIG_CMDLINE="console=tty1 console=ttySC5,38400 root=/dev/nfs ip=dhcp"
301 319
302# 320#
@@ -316,7 +334,13 @@ CONFIG_BINFMT_ELF=y
316# 334#
317# Power management options (EXPERIMENTAL) 335# Power management options (EXPERIMENTAL)
318# 336#
319# CONFIG_PM is not set 337CONFIG_PM=y
338# CONFIG_PM_DEBUG is not set
339CONFIG_PM_SLEEP=y
340CONFIG_SUSPEND=y
341CONFIG_SUSPEND_FREEZER=y
342# CONFIG_HIBERNATION is not set
343CONFIG_PM_RUNTIME=y
320# CONFIG_CPU_IDLE is not set 344# CONFIG_CPU_IDLE is not set
321CONFIG_NET=y 345CONFIG_NET=y
322 346
@@ -364,6 +388,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
364# CONFIG_NETFILTER is not set 388# CONFIG_NETFILTER is not set
365# CONFIG_IP_DCCP is not set 389# CONFIG_IP_DCCP is not set
366# CONFIG_IP_SCTP is not set 390# CONFIG_IP_SCTP is not set
391# CONFIG_RDS is not set
367# CONFIG_TIPC is not set 392# CONFIG_TIPC is not set
368# CONFIG_ATM is not set 393# CONFIG_ATM is not set
369# CONFIG_BRIDGE is not set 394# CONFIG_BRIDGE is not set
@@ -393,6 +418,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
393# CONFIG_AF_RXRPC is not set 418# CONFIG_AF_RXRPC is not set
394CONFIG_WIRELESS=y 419CONFIG_WIRELESS=y
395# CONFIG_CFG80211 is not set 420# CONFIG_CFG80211 is not set
421CONFIG_CFG80211_DEFAULT_PS_VALUE=0
396# CONFIG_WIRELESS_OLD_REGULATORY is not set 422# CONFIG_WIRELESS_OLD_REGULATORY is not set
397# CONFIG_WIRELESS_EXT is not set 423# CONFIG_WIRELESS_EXT is not set
398# CONFIG_LIB80211 is not set 424# CONFIG_LIB80211 is not set
@@ -400,7 +426,6 @@ CONFIG_WIRELESS=y
400# 426#
401# CFG80211 needs to be enabled for MAC80211 427# CFG80211 needs to be enabled for MAC80211
402# 428#
403CONFIG_MAC80211_DEFAULT_PS_VALUE=0
404# CONFIG_WIMAX is not set 429# CONFIG_WIMAX is not set
405# CONFIG_RFKILL is not set 430# CONFIG_RFKILL is not set
406# CONFIG_NET_9P is not set 431# CONFIG_NET_9P is not set
@@ -413,6 +438,7 @@ CONFIG_MAC80211_DEFAULT_PS_VALUE=0
413# Generic Driver Options 438# Generic Driver Options
414# 439#
415CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 440CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
441# CONFIG_DEVTMPFS is not set
416CONFIG_STANDALONE=y 442CONFIG_STANDALONE=y
417CONFIG_PREVENT_FIRMWARE_BUILD=y 443CONFIG_PREVENT_FIRMWARE_BUILD=y
418CONFIG_FW_LOADER=y 444CONFIG_FW_LOADER=y
@@ -422,9 +448,9 @@ CONFIG_EXTRA_FIRMWARE=""
422# CONFIG_CONNECTOR is not set 448# CONFIG_CONNECTOR is not set
423CONFIG_MTD=y 449CONFIG_MTD=y
424# CONFIG_MTD_DEBUG is not set 450# CONFIG_MTD_DEBUG is not set
451# CONFIG_MTD_TESTS is not set
425CONFIG_MTD_CONCAT=y 452CONFIG_MTD_CONCAT=y
426CONFIG_MTD_PARTITIONS=y 453CONFIG_MTD_PARTITIONS=y
427# CONFIG_MTD_TESTS is not set
428# CONFIG_MTD_REDBOOT_PARTS is not set 454# CONFIG_MTD_REDBOOT_PARTS is not set
429CONFIG_MTD_CMDLINE_PARTS=y 455CONFIG_MTD_CMDLINE_PARTS=y
430# CONFIG_MTD_AR7_PARTS is not set 456# CONFIG_MTD_AR7_PARTS is not set
@@ -480,6 +506,7 @@ CONFIG_MTD_PHYSMAP=y
480# 506#
481# CONFIG_MTD_DATAFLASH is not set 507# CONFIG_MTD_DATAFLASH is not set
482# CONFIG_MTD_M25P80 is not set 508# CONFIG_MTD_M25P80 is not set
509# CONFIG_MTD_SST25L is not set
483# CONFIG_MTD_SLRAM is not set 510# CONFIG_MTD_SLRAM is not set
484# CONFIG_MTD_PHRAM is not set 511# CONFIG_MTD_PHRAM is not set
485# CONFIG_MTD_MTDRAM is not set 512# CONFIG_MTD_MTDRAM is not set
@@ -583,7 +610,6 @@ CONFIG_SCSI_WAIT_SCAN=m
583# CONFIG_SCSI_SRP_ATTRS is not set 610# CONFIG_SCSI_SRP_ATTRS is not set
584CONFIG_SCSI_LOWLEVEL=y 611CONFIG_SCSI_LOWLEVEL=y
585# CONFIG_ISCSI_TCP is not set 612# CONFIG_ISCSI_TCP is not set
586# CONFIG_SCSI_BNX2_ISCSI is not set
587# CONFIG_LIBFC is not set 613# CONFIG_LIBFC is not set
588# CONFIG_LIBFCOE is not set 614# CONFIG_LIBFCOE is not set
589# CONFIG_SCSI_DEBUG is not set 615# CONFIG_SCSI_DEBUG is not set
@@ -637,12 +663,10 @@ CONFIG_SMSC911X=y
637# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 663# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
638# CONFIG_B44 is not set 664# CONFIG_B44 is not set
639# CONFIG_KS8842 is not set 665# CONFIG_KS8842 is not set
666# CONFIG_KS8851 is not set
640# CONFIG_NETDEV_1000 is not set 667# CONFIG_NETDEV_1000 is not set
641# CONFIG_NETDEV_10000 is not set 668# CONFIG_NETDEV_10000 is not set
642 669CONFIG_WLAN=y
643#
644# Wireless LAN
645#
646# CONFIG_WLAN_PRE80211 is not set 670# CONFIG_WLAN_PRE80211 is not set
647# CONFIG_WLAN_80211 is not set 671# CONFIG_WLAN_80211 is not set
648 672
@@ -726,6 +750,7 @@ CONFIG_HW_RANDOM=y
726# CONFIG_TCG_TPM is not set 750# CONFIG_TCG_TPM is not set
727CONFIG_I2C=y 751CONFIG_I2C=y
728CONFIG_I2C_BOARDINFO=y 752CONFIG_I2C_BOARDINFO=y
753CONFIG_I2C_COMPAT=y
729CONFIG_I2C_CHARDEV=y 754CONFIG_I2C_CHARDEV=y
730CONFIG_I2C_HELPER_AUTO=y 755CONFIG_I2C_HELPER_AUTO=y
731 756
@@ -736,6 +761,7 @@ CONFIG_I2C_HELPER_AUTO=y
736# 761#
737# I2C system bus drivers (mostly embedded / system-on-chip) 762# I2C system bus drivers (mostly embedded / system-on-chip)
738# 763#
764# CONFIG_I2C_DESIGNWARE is not set
739# CONFIG_I2C_GPIO is not set 765# CONFIG_I2C_GPIO is not set
740# CONFIG_I2C_OCORES is not set 766# CONFIG_I2C_OCORES is not set
741CONFIG_I2C_SH_MOBILE=y 767CONFIG_I2C_SH_MOBILE=y
@@ -757,9 +783,6 @@ CONFIG_I2C_SH_MOBILE=y
757# Miscellaneous I2C Chip support 783# Miscellaneous I2C Chip support
758# 784#
759# CONFIG_DS1682 is not set 785# CONFIG_DS1682 is not set
760# CONFIG_SENSORS_PCF8574 is not set
761# CONFIG_PCF8575 is not set
762# CONFIG_SENSORS_PCA9539 is not set
763# CONFIG_SENSORS_TSL2550 is not set 786# CONFIG_SENSORS_TSL2550 is not set
764# CONFIG_I2C_DEBUG_CORE is not set 787# CONFIG_I2C_DEBUG_CORE is not set
765# CONFIG_I2C_DEBUG_ALGO is not set 788# CONFIG_I2C_DEBUG_ALGO is not set
@@ -780,6 +803,11 @@ CONFIG_SPI_GPIO=y
780# 803#
781# CONFIG_SPI_SPIDEV is not set 804# CONFIG_SPI_SPIDEV is not set
782# CONFIG_SPI_TLE62X0 is not set 805# CONFIG_SPI_TLE62X0 is not set
806
807#
808# PPS support
809#
810# CONFIG_PPS is not set
783CONFIG_ARCH_REQUIRE_GPIOLIB=y 811CONFIG_ARCH_REQUIRE_GPIOLIB=y
784CONFIG_GPIOLIB=y 812CONFIG_GPIOLIB=y
785# CONFIG_GPIO_SYSFS is not set 813# CONFIG_GPIO_SYSFS is not set
@@ -804,11 +832,15 @@ CONFIG_GPIOLIB=y
804# 832#
805# CONFIG_GPIO_MAX7301 is not set 833# CONFIG_GPIO_MAX7301 is not set
806# CONFIG_GPIO_MCP23S08 is not set 834# CONFIG_GPIO_MCP23S08 is not set
835# CONFIG_GPIO_MC33880 is not set
836
837#
838# AC97 GPIO expanders:
839#
807# CONFIG_W1 is not set 840# CONFIG_W1 is not set
808# CONFIG_POWER_SUPPLY is not set 841# CONFIG_POWER_SUPPLY is not set
809# CONFIG_HWMON is not set 842# CONFIG_HWMON is not set
810# CONFIG_THERMAL is not set 843# CONFIG_THERMAL is not set
811# CONFIG_THERMAL_HWMON is not set
812# CONFIG_WATCHDOG is not set 844# CONFIG_WATCHDOG is not set
813CONFIG_SSB_POSSIBLE=y 845CONFIG_SSB_POSSIBLE=y
814 846
@@ -828,8 +860,12 @@ CONFIG_SSB_POSSIBLE=y
828# CONFIG_MFD_TMIO is not set 860# CONFIG_MFD_TMIO is not set
829# CONFIG_PMIC_DA903X is not set 861# CONFIG_PMIC_DA903X is not set
830# CONFIG_MFD_WM8400 is not set 862# CONFIG_MFD_WM8400 is not set
863# CONFIG_MFD_WM831X is not set
831# CONFIG_MFD_WM8350_I2C is not set 864# CONFIG_MFD_WM8350_I2C is not set
832# CONFIG_MFD_PCF50633 is not set 865# CONFIG_MFD_PCF50633 is not set
866# CONFIG_MFD_MC13783 is not set
867# CONFIG_AB3100_CORE is not set
868# CONFIG_EZX_PCAP is not set
833# CONFIG_REGULATOR is not set 869# CONFIG_REGULATOR is not set
834CONFIG_MEDIA_SUPPORT=y 870CONFIG_MEDIA_SUPPORT=y
835 871
@@ -957,6 +993,8 @@ CONFIG_MMC_BLOCK_BOUNCE=y
957# MMC/SD/SDIO Host Controller Drivers 993# MMC/SD/SDIO Host Controller Drivers
958# 994#
959# CONFIG_MMC_SDHCI is not set 995# CONFIG_MMC_SDHCI is not set
996# CONFIG_MMC_AT91 is not set
997# CONFIG_MMC_ATMELMCI is not set
960CONFIG_MMC_SPI=y 998CONFIG_MMC_SPI=y
961# CONFIG_MEMSTICK is not set 999# CONFIG_MEMSTICK is not set
962# CONFIG_NEW_LEDS is not set 1000# CONFIG_NEW_LEDS is not set
@@ -992,6 +1030,7 @@ CONFIG_RTC_DRV_PCF8563=y
992# CONFIG_RTC_DRV_S35390A is not set 1030# CONFIG_RTC_DRV_S35390A is not set
993# CONFIG_RTC_DRV_FM3130 is not set 1031# CONFIG_RTC_DRV_FM3130 is not set
994# CONFIG_RTC_DRV_RX8581 is not set 1032# CONFIG_RTC_DRV_RX8581 is not set
1033# CONFIG_RTC_DRV_RX8025 is not set
995 1034
996# 1035#
997# SPI RTC drivers 1036# SPI RTC drivers
@@ -1003,6 +1042,7 @@ CONFIG_RTC_DRV_PCF8563=y
1003# CONFIG_RTC_DRV_R9701 is not set 1042# CONFIG_RTC_DRV_R9701 is not set
1004# CONFIG_RTC_DRV_RS5C348 is not set 1043# CONFIG_RTC_DRV_RS5C348 is not set
1005# CONFIG_RTC_DRV_DS3234 is not set 1044# CONFIG_RTC_DRV_DS3234 is not set
1045# CONFIG_RTC_DRV_PCF2123 is not set
1006 1046
1007# 1047#
1008# Platform RTC drivers 1048# Platform RTC drivers
@@ -1056,8 +1096,10 @@ CONFIG_FS_MBCACHE=y
1056# CONFIG_JFS_FS is not set 1096# CONFIG_JFS_FS is not set
1057CONFIG_FS_POSIX_ACL=y 1097CONFIG_FS_POSIX_ACL=y
1058# CONFIG_XFS_FS is not set 1098# CONFIG_XFS_FS is not set
1099# CONFIG_GFS2_FS is not set
1059# CONFIG_OCFS2_FS is not set 1100# CONFIG_OCFS2_FS is not set
1060# CONFIG_BTRFS_FS is not set 1101# CONFIG_BTRFS_FS is not set
1102# CONFIG_NILFS2_FS is not set
1061CONFIG_FILE_LOCKING=y 1103CONFIG_FILE_LOCKING=y
1062CONFIG_FSNOTIFY=y 1104CONFIG_FSNOTIFY=y
1063CONFIG_DNOTIFY=y 1105CONFIG_DNOTIFY=y
@@ -1122,7 +1164,6 @@ CONFIG_MISC_FILESYSTEMS=y
1122# CONFIG_ROMFS_FS is not set 1164# CONFIG_ROMFS_FS is not set
1123# CONFIG_SYSV_FS is not set 1165# CONFIG_SYSV_FS is not set
1124# CONFIG_UFS_FS is not set 1166# CONFIG_UFS_FS is not set
1125# CONFIG_NILFS2_FS is not set
1126CONFIG_NETWORK_FILESYSTEMS=y 1167CONFIG_NETWORK_FILESYSTEMS=y
1127CONFIG_NFS_FS=y 1168CONFIG_NFS_FS=y
1128CONFIG_NFS_V3=y 1169CONFIG_NFS_V3=y
@@ -1202,6 +1243,7 @@ CONFIG_ENABLE_WARN_DEPRECATED=y
1202# CONFIG_ENABLE_MUST_CHECK is not set 1243# CONFIG_ENABLE_MUST_CHECK is not set
1203CONFIG_FRAME_WARN=1024 1244CONFIG_FRAME_WARN=1024
1204# CONFIG_MAGIC_SYSRQ is not set 1245# CONFIG_MAGIC_SYSRQ is not set
1246# CONFIG_STRIP_ASM_SYMS is not set
1205# CONFIG_UNUSED_SYMBOLS is not set 1247# CONFIG_UNUSED_SYMBOLS is not set
1206# CONFIG_DEBUG_FS is not set 1248# CONFIG_DEBUG_FS is not set
1207# CONFIG_HEADERS_CHECK is not set 1249# CONFIG_HEADERS_CHECK is not set
@@ -1212,8 +1254,11 @@ CONFIG_FRAME_WARN=1024
1212# CONFIG_LATENCYTOP is not set 1254# CONFIG_LATENCYTOP is not set
1213CONFIG_SYSCTL_SYSCALL_CHECK=y 1255CONFIG_SYSCTL_SYSCALL_CHECK=y
1214CONFIG_HAVE_FUNCTION_TRACER=y 1256CONFIG_HAVE_FUNCTION_TRACER=y
1257CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1258CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
1215CONFIG_HAVE_DYNAMIC_FTRACE=y 1259CONFIG_HAVE_DYNAMIC_FTRACE=y
1216CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1260CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1261CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
1217CONFIG_TRACING_SUPPORT=y 1262CONFIG_TRACING_SUPPORT=y
1218# CONFIG_FTRACE is not set 1263# CONFIG_FTRACE is not set
1219# CONFIG_DMA_API_DEBUG is not set 1264# CONFIG_DMA_API_DEBUG is not set
@@ -1221,6 +1266,7 @@ CONFIG_TRACING_SUPPORT=y
1221CONFIG_HAVE_ARCH_KGDB=y 1266CONFIG_HAVE_ARCH_KGDB=y
1222# CONFIG_SH_STANDARD_BIOS is not set 1267# CONFIG_SH_STANDARD_BIOS is not set
1223# CONFIG_EARLY_SCIF_CONSOLE is not set 1268# CONFIG_EARLY_SCIF_CONSOLE is not set
1269# CONFIG_DWARF_UNWINDER is not set
1224 1270
1225# 1271#
1226# Security options 1272# Security options
@@ -1234,7 +1280,6 @@ CONFIG_CRYPTO=y
1234# 1280#
1235# Crypto core or helper 1281# Crypto core or helper
1236# 1282#
1237# CONFIG_CRYPTO_FIPS is not set
1238CONFIG_CRYPTO_ALGAPI=y 1283CONFIG_CRYPTO_ALGAPI=y
1239CONFIG_CRYPTO_ALGAPI2=y 1284CONFIG_CRYPTO_ALGAPI2=y
1240CONFIG_CRYPTO_AEAD2=y 1285CONFIG_CRYPTO_AEAD2=y
@@ -1275,11 +1320,13 @@ CONFIG_CRYPTO_CBC=y
1275# 1320#
1276# CONFIG_CRYPTO_HMAC is not set 1321# CONFIG_CRYPTO_HMAC is not set
1277# CONFIG_CRYPTO_XCBC is not set 1322# CONFIG_CRYPTO_XCBC is not set
1323# CONFIG_CRYPTO_VMAC is not set
1278 1324
1279# 1325#
1280# Digest 1326# Digest
1281# 1327#
1282# CONFIG_CRYPTO_CRC32C is not set 1328# CONFIG_CRYPTO_CRC32C is not set
1329# CONFIG_CRYPTO_GHASH is not set
1283# CONFIG_CRYPTO_MD4 is not set 1330# CONFIG_CRYPTO_MD4 is not set
1284# CONFIG_CRYPTO_MD5 is not set 1331# CONFIG_CRYPTO_MD5 is not set
1285# CONFIG_CRYPTO_MICHAEL_MIC is not set 1332# CONFIG_CRYPTO_MICHAEL_MIC is not set
@@ -1341,5 +1388,6 @@ CONFIG_CRC7=y
1341CONFIG_HAS_IOMEM=y 1388CONFIG_HAS_IOMEM=y
1342CONFIG_HAS_IOPORT=y 1389CONFIG_HAS_IOPORT=y
1343CONFIG_HAS_DMA=y 1390CONFIG_HAS_DMA=y
1391CONFIG_HAVE_LMB=y
1344CONFIG_NLATTR=y 1392CONFIG_NLATTR=y
1345CONFIG_GENERIC_ATOMIC64=y 1393CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/dreamcast_defconfig b/arch/sh/configs/dreamcast_defconfig
index 95717a041ed6..aedbd4f13046 100644
--- a/arch/sh/configs/dreamcast_defconfig
+++ b/arch/sh/configs/dreamcast_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.30 3# Linux kernel version: 2.6.31
4# Thu Jun 18 12:24:48 2009 4# Thu Sep 24 17:56:07 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -14,6 +14,7 @@ CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y 14CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
16CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_IRQ_PER_CPU=y
17# CONFIG_GENERIC_GPIO is not set 18# CONFIG_GENERIC_GPIO is not set
18CONFIG_GENERIC_TIME=y 19CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 20CONFIG_GENERIC_CLOCKEVENTS=y
@@ -29,7 +30,9 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
29# CONFIG_ARCH_HAS_ILOG2_U64 is not set 30# CONFIG_ARCH_HAS_ILOG2_U64 is not set
30CONFIG_ARCH_NO_VIRT_TO_BUS=y 31CONFIG_ARCH_NO_VIRT_TO_BUS=y
31CONFIG_ARCH_HAS_DEFAULT_IDLE=y 32CONFIG_ARCH_HAS_DEFAULT_IDLE=y
33CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
32CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 34CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
35CONFIG_CONSTRUCTORS=y
33 36
34# 37#
35# General setup 38# General setup
@@ -40,6 +43,12 @@ CONFIG_LOCK_KERNEL=y
40CONFIG_INIT_ENV_ARG_LIMIT=32 43CONFIG_INIT_ENV_ARG_LIMIT=32
41CONFIG_LOCALVERSION="" 44CONFIG_LOCALVERSION=""
42CONFIG_LOCALVERSION_AUTO=y 45CONFIG_LOCALVERSION_AUTO=y
46CONFIG_HAVE_KERNEL_GZIP=y
47CONFIG_HAVE_KERNEL_BZIP2=y
48CONFIG_HAVE_KERNEL_LZMA=y
49CONFIG_KERNEL_GZIP=y
50# CONFIG_KERNEL_BZIP2 is not set
51# CONFIG_KERNEL_LZMA is not set
43CONFIG_SWAP=y 52CONFIG_SWAP=y
44CONFIG_SYSVIPC=y 53CONFIG_SYSVIPC=y
45CONFIG_SYSVIPC_SYSCTL=y 54CONFIG_SYSVIPC_SYSCTL=y
@@ -52,11 +61,12 @@ CONFIG_BSD_PROCESS_ACCT=y
52# 61#
53# RCU Subsystem 62# RCU Subsystem
54# 63#
55CONFIG_CLASSIC_RCU=y 64CONFIG_TREE_RCU=y
56# CONFIG_TREE_RCU is not set 65# CONFIG_TREE_PREEMPT_RCU is not set
57# CONFIG_PREEMPT_RCU is not set 66# CONFIG_RCU_TRACE is not set
67CONFIG_RCU_FANOUT=32
68# CONFIG_RCU_FANOUT_EXACT is not set
58# CONFIG_TREE_RCU_TRACE is not set 69# CONFIG_TREE_RCU_TRACE is not set
59# CONFIG_PREEMPT_RCU_TRACE is not set
60# CONFIG_IKCONFIG is not set 70# CONFIG_IKCONFIG is not set
61CONFIG_LOG_BUF_SHIFT=14 71CONFIG_LOG_BUF_SHIFT=14
62# CONFIG_GROUP_SCHED is not set 72# CONFIG_GROUP_SCHED is not set
@@ -86,19 +96,20 @@ CONFIG_TIMERFD=y
86CONFIG_EVENTFD=y 96CONFIG_EVENTFD=y
87CONFIG_SHMEM=y 97CONFIG_SHMEM=y
88CONFIG_AIO=y 98CONFIG_AIO=y
99CONFIG_HAVE_PERF_EVENTS=y
89 100
90# 101#
91# Performance Counters 102# Kernel Performance Events And Counters
92# 103#
104CONFIG_PERF_EVENTS=y
105# CONFIG_PERF_COUNTERS is not set
93CONFIG_VM_EVENT_COUNTERS=y 106CONFIG_VM_EVENT_COUNTERS=y
94CONFIG_PCI_QUIRKS=y 107CONFIG_PCI_QUIRKS=y
95# CONFIG_STRIP_ASM_SYMS is not set
96CONFIG_COMPAT_BRK=y 108CONFIG_COMPAT_BRK=y
97CONFIG_SLAB=y 109CONFIG_SLAB=y
98# CONFIG_SLUB is not set 110# CONFIG_SLUB is not set
99# CONFIG_SLOB is not set 111# CONFIG_SLOB is not set
100CONFIG_PROFILING=y 112CONFIG_PROFILING=y
101# CONFIG_MARKERS is not set
102# CONFIG_OPROFILE is not set 113# CONFIG_OPROFILE is not set
103CONFIG_HAVE_OPROFILE=y 114CONFIG_HAVE_OPROFILE=y
104# CONFIG_KPROBES is not set 115# CONFIG_KPROBES is not set
@@ -108,6 +119,10 @@ CONFIG_HAVE_KRETPROBES=y
108CONFIG_HAVE_ARCH_TRACEHOOK=y 119CONFIG_HAVE_ARCH_TRACEHOOK=y
109CONFIG_HAVE_CLK=y 120CONFIG_HAVE_CLK=y
110CONFIG_HAVE_DMA_API_DEBUG=y 121CONFIG_HAVE_DMA_API_DEBUG=y
122
123#
124# GCOV-based kernel profiling
125#
111# CONFIG_SLOW_WORK is not set 126# CONFIG_SLOW_WORK is not set
112CONFIG_HAVE_GENERIC_DMA_COHERENT=y 127CONFIG_HAVE_GENERIC_DMA_COHERENT=y
113CONFIG_SLABINFO=y 128CONFIG_SLABINFO=y
@@ -120,7 +135,7 @@ CONFIG_MODULE_UNLOAD=y
120# CONFIG_MODVERSIONS is not set 135# CONFIG_MODVERSIONS is not set
121# CONFIG_MODULE_SRCVERSION_ALL is not set 136# CONFIG_MODULE_SRCVERSION_ALL is not set
122CONFIG_BLOCK=y 137CONFIG_BLOCK=y
123# CONFIG_LBD is not set 138CONFIG_LBDAF=y
124# CONFIG_BLK_DEV_BSG is not set 139# CONFIG_BLK_DEV_BSG is not set
125# CONFIG_BLK_DEV_INTEGRITY is not set 140# CONFIG_BLK_DEV_INTEGRITY is not set
126 141
@@ -167,6 +182,7 @@ CONFIG_CPU_SUBTYPE_SH7091=y
167# CONFIG_CPU_SUBTYPE_SH4_202 is not set 182# CONFIG_CPU_SUBTYPE_SH4_202 is not set
168# CONFIG_CPU_SUBTYPE_SH7723 is not set 183# CONFIG_CPU_SUBTYPE_SH7723 is not set
169# CONFIG_CPU_SUBTYPE_SH7724 is not set 184# CONFIG_CPU_SUBTYPE_SH7724 is not set
185# CONFIG_CPU_SUBTYPE_SH7757 is not set
170# CONFIG_CPU_SUBTYPE_SH7763 is not set 186# CONFIG_CPU_SUBTYPE_SH7763 is not set
171# CONFIG_CPU_SUBTYPE_SH7770 is not set 187# CONFIG_CPU_SUBTYPE_SH7770 is not set
172# CONFIG_CPU_SUBTYPE_SH7780 is not set 188# CONFIG_CPU_SUBTYPE_SH7780 is not set
@@ -218,6 +234,7 @@ CONFIG_ZONE_DMA_FLAG=0
218CONFIG_NR_QUICK=2 234CONFIG_NR_QUICK=2
219CONFIG_HAVE_MLOCK=y 235CONFIG_HAVE_MLOCK=y
220CONFIG_HAVE_MLOCKED_PAGE_BIT=y 236CONFIG_HAVE_MLOCKED_PAGE_BIT=y
237# CONFIG_KSM is not set
221CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 238CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
222 239
223# 240#
@@ -322,7 +339,8 @@ CONFIG_ZERO_PAGE_OFFSET=0x00001000
322CONFIG_BOOT_LINK_OFFSET=0x00800000 339CONFIG_BOOT_LINK_OFFSET=0x00800000
323CONFIG_ENTRY_OFFSET=0x00001000 340CONFIG_ENTRY_OFFSET=0x00001000
324# CONFIG_UBC_WAKEUP is not set 341# CONFIG_UBC_WAKEUP is not set
325CONFIG_CMDLINE_BOOL=y 342CONFIG_CMDLINE_OVERWRITE=y
343# CONFIG_CMDLINE_EXTEND is not set
326CONFIG_CMDLINE="console=ttySC1,115200 panic=3" 344CONFIG_CMDLINE="console=ttySC1,115200 panic=3"
327 345
328# 346#
@@ -395,6 +413,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
395# CONFIG_NETFILTER is not set 413# CONFIG_NETFILTER is not set
396# CONFIG_IP_DCCP is not set 414# CONFIG_IP_DCCP is not set
397# CONFIG_IP_SCTP is not set 415# CONFIG_IP_SCTP is not set
416# CONFIG_RDS is not set
398# CONFIG_TIPC is not set 417# CONFIG_TIPC is not set
399# CONFIG_ATM is not set 418# CONFIG_ATM is not set
400# CONFIG_BRIDGE is not set 419# CONFIG_BRIDGE is not set
@@ -424,6 +443,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
424# CONFIG_AF_RXRPC is not set 443# CONFIG_AF_RXRPC is not set
425CONFIG_WIRELESS=y 444CONFIG_WIRELESS=y
426# CONFIG_CFG80211 is not set 445# CONFIG_CFG80211 is not set
446CONFIG_CFG80211_DEFAULT_PS_VALUE=0
427# CONFIG_WIRELESS_OLD_REGULATORY is not set 447# CONFIG_WIRELESS_OLD_REGULATORY is not set
428# CONFIG_WIRELESS_EXT is not set 448# CONFIG_WIRELESS_EXT is not set
429# CONFIG_LIB80211 is not set 449# CONFIG_LIB80211 is not set
@@ -431,7 +451,6 @@ CONFIG_WIRELESS=y
431# 451#
432# CFG80211 needs to be enabled for MAC80211 452# CFG80211 needs to be enabled for MAC80211
433# 453#
434CONFIG_MAC80211_DEFAULT_PS_VALUE=0
435# CONFIG_WIMAX is not set 454# CONFIG_WIMAX is not set
436# CONFIG_RFKILL is not set 455# CONFIG_RFKILL is not set
437# CONFIG_NET_9P is not set 456# CONFIG_NET_9P is not set
@@ -444,6 +463,7 @@ CONFIG_MAC80211_DEFAULT_PS_VALUE=0
444# Generic Driver Options 463# Generic Driver Options
445# 464#
446CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 465CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
466# CONFIG_DEVTMPFS is not set
447# CONFIG_STANDALONE is not set 467# CONFIG_STANDALONE is not set
448CONFIG_PREVENT_FIRMWARE_BUILD=y 468CONFIG_PREVENT_FIRMWARE_BUILD=y
449# CONFIG_FW_LOADER is not set 469# CONFIG_FW_LOADER is not set
@@ -496,7 +516,11 @@ CONFIG_HAVE_IDE=y
496# 516#
497 517
498# 518#
499# Enable only one of the two stacks, unless you know what you are doing 519# You can enable one or both FireWire driver stacks.
520#
521
522#
523# See the help texts for more information.
500# 524#
501# CONFIG_FIREWIRE is not set 525# CONFIG_FIREWIRE is not set
502# CONFIG_IEEE1394 is not set 526# CONFIG_IEEE1394 is not set
@@ -561,10 +585,7 @@ CONFIG_8139TOO=y
561# CONFIG_NETDEV_1000 is not set 585# CONFIG_NETDEV_1000 is not set
562# CONFIG_NETDEV_10000 is not set 586# CONFIG_NETDEV_10000 is not set
563# CONFIG_TR is not set 587# CONFIG_TR is not set
564 588CONFIG_WLAN=y
565#
566# Wireless LAN
567#
568# CONFIG_WLAN_PRE80211 is not set 589# CONFIG_WLAN_PRE80211 is not set
569# CONFIG_WLAN_80211 is not set 590# CONFIG_WLAN_80211 is not set
570 591
@@ -605,13 +626,14 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
605# 626#
606CONFIG_INPUT_KEYBOARD=y 627CONFIG_INPUT_KEYBOARD=y
607# CONFIG_KEYBOARD_ATKBD is not set 628# CONFIG_KEYBOARD_ATKBD is not set
608# CONFIG_KEYBOARD_SUNKBD is not set
609# CONFIG_KEYBOARD_LKKBD is not set 629# CONFIG_KEYBOARD_LKKBD is not set
610# CONFIG_KEYBOARD_XTKBD is not set 630CONFIG_KEYBOARD_MAPLE=y
611# CONFIG_KEYBOARD_NEWTON is not set 631# CONFIG_KEYBOARD_NEWTON is not set
632# CONFIG_KEYBOARD_OPENCORES is not set
612# CONFIG_KEYBOARD_STOWAWAY is not set 633# CONFIG_KEYBOARD_STOWAWAY is not set
613CONFIG_KEYBOARD_MAPLE=y 634# CONFIG_KEYBOARD_SUNKBD is not set
614# CONFIG_KEYBOARD_SH_KEYSC is not set 635# CONFIG_KEYBOARD_SH_KEYSC is not set
636# CONFIG_KEYBOARD_XTKBD is not set
615CONFIG_INPUT_MOUSE=y 637CONFIG_INPUT_MOUSE=y
616# CONFIG_MOUSE_PS2 is not set 638# CONFIG_MOUSE_PS2 is not set
617# CONFIG_MOUSE_SERIAL is not set 639# CONFIG_MOUSE_SERIAL is not set
@@ -675,11 +697,15 @@ CONFIG_HW_RANDOM=y
675CONFIG_DEVPORT=y 697CONFIG_DEVPORT=y
676# CONFIG_I2C is not set 698# CONFIG_I2C is not set
677# CONFIG_SPI is not set 699# CONFIG_SPI is not set
700
701#
702# PPS support
703#
704# CONFIG_PPS is not set
678# CONFIG_W1 is not set 705# CONFIG_W1 is not set
679# CONFIG_POWER_SUPPLY is not set 706# CONFIG_POWER_SUPPLY is not set
680# CONFIG_HWMON is not set 707# CONFIG_HWMON is not set
681# CONFIG_THERMAL is not set 708# CONFIG_THERMAL is not set
682# CONFIG_THERMAL_HWMON is not set
683CONFIG_WATCHDOG=y 709CONFIG_WATCHDOG=y
684# CONFIG_WATCHDOG_NOWAYOUT is not set 710# CONFIG_WATCHDOG_NOWAYOUT is not set
685 711
@@ -716,6 +742,7 @@ CONFIG_SSB_POSSIBLE=y
716# 742#
717# Graphics support 743# Graphics support
718# 744#
745CONFIG_VGA_ARB=y
719# CONFIG_DRM is not set 746# CONFIG_DRM is not set
720# CONFIG_VGASTATE is not set 747# CONFIG_VGASTATE is not set
721CONFIG_VIDEO_OUTPUT_CONTROL=m 748CONFIG_VIDEO_OUTPUT_CONTROL=m
@@ -807,7 +834,6 @@ CONFIG_LOGO_SUPERH_CLUT224=y
807# CONFIG_SOUND is not set 834# CONFIG_SOUND is not set
808CONFIG_HID_SUPPORT=y 835CONFIG_HID_SUPPORT=y
809CONFIG_HID=y 836CONFIG_HID=y
810# CONFIG_HID_DEBUG is not set
811# CONFIG_HIDRAW is not set 837# CONFIG_HIDRAW is not set
812# CONFIG_HID_PID is not set 838# CONFIG_HID_PID is not set
813 839
@@ -861,8 +887,10 @@ CONFIG_RTC_LIB=y
861# CONFIG_JFS_FS is not set 887# CONFIG_JFS_FS is not set
862# CONFIG_FS_POSIX_ACL is not set 888# CONFIG_FS_POSIX_ACL is not set
863# CONFIG_XFS_FS is not set 889# CONFIG_XFS_FS is not set
890# CONFIG_GFS2_FS is not set
864# CONFIG_OCFS2_FS is not set 891# CONFIG_OCFS2_FS is not set
865# CONFIG_BTRFS_FS is not set 892# CONFIG_BTRFS_FS is not set
893# CONFIG_NILFS2_FS is not set
866CONFIG_FILE_LOCKING=y 894CONFIG_FILE_LOCKING=y
867CONFIG_FSNOTIFY=y 895CONFIG_FSNOTIFY=y
868# CONFIG_DNOTIFY is not set 896# CONFIG_DNOTIFY is not set
@@ -922,7 +950,6 @@ CONFIG_MISC_FILESYSTEMS=y
922# CONFIG_ROMFS_FS is not set 950# CONFIG_ROMFS_FS is not set
923# CONFIG_SYSV_FS is not set 951# CONFIG_SYSV_FS is not set
924# CONFIG_UFS_FS is not set 952# CONFIG_UFS_FS is not set
925# CONFIG_NILFS2_FS is not set
926CONFIG_NETWORK_FILESYSTEMS=y 953CONFIG_NETWORK_FILESYSTEMS=y
927# CONFIG_NFS_FS is not set 954# CONFIG_NFS_FS is not set
928# CONFIG_NFSD is not set 955# CONFIG_NFSD is not set
@@ -949,6 +976,7 @@ CONFIG_ENABLE_WARN_DEPRECATED=y
949CONFIG_ENABLE_MUST_CHECK=y 976CONFIG_ENABLE_MUST_CHECK=y
950CONFIG_FRAME_WARN=1024 977CONFIG_FRAME_WARN=1024
951# CONFIG_MAGIC_SYSRQ is not set 978# CONFIG_MAGIC_SYSRQ is not set
979# CONFIG_STRIP_ASM_SYMS is not set
952# CONFIG_UNUSED_SYMBOLS is not set 980# CONFIG_UNUSED_SYMBOLS is not set
953# CONFIG_DEBUG_FS is not set 981# CONFIG_DEBUG_FS is not set
954# CONFIG_HEADERS_CHECK is not set 982# CONFIG_HEADERS_CHECK is not set
@@ -958,8 +986,11 @@ CONFIG_FRAME_WARN=1024
958# CONFIG_RCU_CPU_STALL_DETECTOR is not set 986# CONFIG_RCU_CPU_STALL_DETECTOR is not set
959# CONFIG_LATENCYTOP is not set 987# CONFIG_LATENCYTOP is not set
960CONFIG_HAVE_FUNCTION_TRACER=y 988CONFIG_HAVE_FUNCTION_TRACER=y
989CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
990CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
961CONFIG_HAVE_DYNAMIC_FTRACE=y 991CONFIG_HAVE_DYNAMIC_FTRACE=y
962CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 992CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
993CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
963CONFIG_TRACING_SUPPORT=y 994CONFIG_TRACING_SUPPORT=y
964# CONFIG_FTRACE is not set 995# CONFIG_FTRACE is not set
965# CONFIG_DMA_API_DEBUG is not set 996# CONFIG_DMA_API_DEBUG is not set
@@ -967,6 +998,7 @@ CONFIG_TRACING_SUPPORT=y
967CONFIG_HAVE_ARCH_KGDB=y 998CONFIG_HAVE_ARCH_KGDB=y
968# CONFIG_SH_STANDARD_BIOS is not set 999# CONFIG_SH_STANDARD_BIOS is not set
969# CONFIG_EARLY_SCIF_CONSOLE is not set 1000# CONFIG_EARLY_SCIF_CONSOLE is not set
1001# CONFIG_DWARF_UNWINDER is not set
970 1002
971# 1003#
972# Security options 1004# Security options
@@ -980,7 +1012,6 @@ CONFIG_CRYPTO=y
980# 1012#
981# Crypto core or helper 1013# Crypto core or helper
982# 1014#
983# CONFIG_CRYPTO_FIPS is not set
984# CONFIG_CRYPTO_MANAGER is not set 1015# CONFIG_CRYPTO_MANAGER is not set
985# CONFIG_CRYPTO_MANAGER2 is not set 1016# CONFIG_CRYPTO_MANAGER2 is not set
986# CONFIG_CRYPTO_GF128MUL is not set 1017# CONFIG_CRYPTO_GF128MUL is not set
@@ -1012,11 +1043,13 @@ CONFIG_CRYPTO=y
1012# 1043#
1013# CONFIG_CRYPTO_HMAC is not set 1044# CONFIG_CRYPTO_HMAC is not set
1014# CONFIG_CRYPTO_XCBC is not set 1045# CONFIG_CRYPTO_XCBC is not set
1046# CONFIG_CRYPTO_VMAC is not set
1015 1047
1016# 1048#
1017# Digest 1049# Digest
1018# 1050#
1019# CONFIG_CRYPTO_CRC32C is not set 1051# CONFIG_CRYPTO_CRC32C is not set
1052# CONFIG_CRYPTO_GHASH is not set
1020# CONFIG_CRYPTO_MD4 is not set 1053# CONFIG_CRYPTO_MD4 is not set
1021# CONFIG_CRYPTO_MD5 is not set 1054# CONFIG_CRYPTO_MD5 is not set
1022# CONFIG_CRYPTO_MICHAEL_MIC is not set 1055# CONFIG_CRYPTO_MICHAEL_MIC is not set
@@ -1079,5 +1112,6 @@ CONFIG_CRC32=y
1079CONFIG_HAS_IOMEM=y 1112CONFIG_HAS_IOMEM=y
1080CONFIG_HAS_IOPORT=y 1113CONFIG_HAS_IOPORT=y
1081CONFIG_HAS_DMA=y 1114CONFIG_HAS_DMA=y
1115CONFIG_HAVE_LMB=y
1082CONFIG_NLATTR=y 1116CONFIG_NLATTR=y
1083CONFIG_GENERIC_ATOMIC64=y 1117CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/ecovec24-romimage_defconfig b/arch/sh/configs/ecovec24-romimage_defconfig
new file mode 100644
index 000000000000..0774924623cc
--- /dev/null
+++ b/arch/sh/configs/ecovec24-romimage_defconfig
@@ -0,0 +1,1032 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.31
4# Thu Sep 24 17:56:41 2009
5#
6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y
8# CONFIG_SUPERH64 is not set
9CONFIG_ARCH_DEFCONFIG="arch/sh/configs/shx3_defconfig"
10CONFIG_RWSEM_GENERIC_SPINLOCK=y
11CONFIG_GENERIC_BUG=y
12CONFIG_GENERIC_FIND_NEXT_BIT=y
13CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
16CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_IRQ_PER_CPU=y
18CONFIG_GENERIC_GPIO=y
19CONFIG_GENERIC_TIME=y
20CONFIG_GENERIC_CLOCKEVENTS=y
21CONFIG_ARCH_SUSPEND_POSSIBLE=y
22CONFIG_ARCH_HIBERNATION_POSSIBLE=y
23CONFIG_SYS_SUPPORTS_CMT=y
24CONFIG_SYS_SUPPORTS_TMU=y
25CONFIG_STACKTRACE_SUPPORT=y
26CONFIG_LOCKDEP_SUPPORT=y
27CONFIG_HAVE_LATENCYTOP_SUPPORT=y
28# CONFIG_ARCH_HAS_ILOG2_U32 is not set
29# CONFIG_ARCH_HAS_ILOG2_U64 is not set
30CONFIG_ARCH_NO_VIRT_TO_BUS=y
31CONFIG_ARCH_HAS_DEFAULT_IDLE=y
32CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
33CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
34CONFIG_CONSTRUCTORS=y
35
36#
37# General setup
38#
39CONFIG_EXPERIMENTAL=y
40CONFIG_BROKEN_ON_SMP=y
41CONFIG_INIT_ENV_ARG_LIMIT=32
42CONFIG_LOCALVERSION=""
43# CONFIG_LOCALVERSION_AUTO is not set
44CONFIG_HAVE_KERNEL_GZIP=y
45CONFIG_HAVE_KERNEL_BZIP2=y
46CONFIG_HAVE_KERNEL_LZMA=y
47CONFIG_KERNEL_GZIP=y
48# CONFIG_KERNEL_BZIP2 is not set
49# CONFIG_KERNEL_LZMA is not set
50CONFIG_SWAP=y
51CONFIG_SYSVIPC=y
52CONFIG_SYSVIPC_SYSCTL=y
53# CONFIG_POSIX_MQUEUE is not set
54CONFIG_BSD_PROCESS_ACCT=y
55# CONFIG_BSD_PROCESS_ACCT_V3 is not set
56# CONFIG_TASKSTATS is not set
57# CONFIG_AUDIT is not set
58
59#
60# RCU Subsystem
61#
62CONFIG_TREE_RCU=y
63# CONFIG_TREE_PREEMPT_RCU is not set
64# CONFIG_RCU_TRACE is not set
65CONFIG_RCU_FANOUT=32
66# CONFIG_RCU_FANOUT_EXACT is not set
67# CONFIG_TREE_RCU_TRACE is not set
68CONFIG_IKCONFIG=y
69CONFIG_IKCONFIG_PROC=y
70CONFIG_LOG_BUF_SHIFT=14
71CONFIG_GROUP_SCHED=y
72CONFIG_FAIR_GROUP_SCHED=y
73# CONFIG_RT_GROUP_SCHED is not set
74CONFIG_USER_SCHED=y
75# CONFIG_CGROUP_SCHED is not set
76# CONFIG_CGROUPS is not set
77CONFIG_SYSFS_DEPRECATED=y
78CONFIG_SYSFS_DEPRECATED_V2=y
79# CONFIG_RELAY is not set
80# CONFIG_NAMESPACES is not set
81CONFIG_BLK_DEV_INITRD=y
82CONFIG_INITRAMFS_SOURCE=""
83CONFIG_RD_GZIP=y
84# CONFIG_RD_BZIP2 is not set
85# CONFIG_RD_LZMA is not set
86CONFIG_CC_OPTIMIZE_FOR_SIZE=y
87CONFIG_SYSCTL=y
88CONFIG_ANON_INODES=y
89CONFIG_EMBEDDED=y
90CONFIG_UID16=y
91CONFIG_SYSCTL_SYSCALL=y
92# CONFIG_KALLSYMS is not set
93CONFIG_HOTPLUG=y
94CONFIG_PRINTK=y
95CONFIG_BUG=y
96CONFIG_ELF_CORE=y
97CONFIG_BASE_FULL=y
98CONFIG_FUTEX=y
99CONFIG_EPOLL=y
100CONFIG_SIGNALFD=y
101CONFIG_TIMERFD=y
102CONFIG_EVENTFD=y
103CONFIG_SHMEM=y
104CONFIG_AIO=y
105CONFIG_HAVE_PERF_EVENTS=y
106
107#
108# Kernel Performance Events And Counters
109#
110# CONFIG_PERF_EVENTS is not set
111# CONFIG_PERF_COUNTERS is not set
112CONFIG_VM_EVENT_COUNTERS=y
113CONFIG_COMPAT_BRK=y
114CONFIG_SLAB=y
115# CONFIG_SLUB is not set
116# CONFIG_SLOB is not set
117# CONFIG_PROFILING is not set
118CONFIG_HAVE_OPROFILE=y
119CONFIG_HAVE_IOREMAP_PROT=y
120CONFIG_HAVE_KPROBES=y
121CONFIG_HAVE_KRETPROBES=y
122CONFIG_HAVE_ARCH_TRACEHOOK=y
123CONFIG_HAVE_CLK=y
124CONFIG_HAVE_DMA_API_DEBUG=y
125
126#
127# GCOV-based kernel profiling
128#
129# CONFIG_GCOV_KERNEL is not set
130# CONFIG_SLOW_WORK is not set
131CONFIG_HAVE_GENERIC_DMA_COHERENT=y
132CONFIG_SLABINFO=y
133CONFIG_RT_MUTEXES=y
134CONFIG_BASE_SMALL=0
135# CONFIG_MODULES is not set
136CONFIG_BLOCK=y
137# CONFIG_LBDAF is not set
138# CONFIG_BLK_DEV_BSG is not set
139# CONFIG_BLK_DEV_INTEGRITY is not set
140
141#
142# IO Schedulers
143#
144CONFIG_IOSCHED_NOOP=y
145CONFIG_IOSCHED_AS=y
146CONFIG_IOSCHED_DEADLINE=y
147CONFIG_IOSCHED_CFQ=y
148# CONFIG_DEFAULT_AS is not set
149# CONFIG_DEFAULT_DEADLINE is not set
150CONFIG_DEFAULT_CFQ=y
151# CONFIG_DEFAULT_NOOP is not set
152CONFIG_DEFAULT_IOSCHED="cfq"
153# CONFIG_FREEZER is not set
154
155#
156# System type
157#
158CONFIG_CPU_SH4=y
159CONFIG_CPU_SH4A=y
160CONFIG_CPU_SHX2=y
161CONFIG_ARCH_SHMOBILE=y
162# CONFIG_CPU_SUBTYPE_SH7619 is not set
163# CONFIG_CPU_SUBTYPE_SH7201 is not set
164# CONFIG_CPU_SUBTYPE_SH7203 is not set
165# CONFIG_CPU_SUBTYPE_SH7206 is not set
166# CONFIG_CPU_SUBTYPE_SH7263 is not set
167# CONFIG_CPU_SUBTYPE_MXG is not set
168# CONFIG_CPU_SUBTYPE_SH7705 is not set
169# CONFIG_CPU_SUBTYPE_SH7706 is not set
170# CONFIG_CPU_SUBTYPE_SH7707 is not set
171# CONFIG_CPU_SUBTYPE_SH7708 is not set
172# CONFIG_CPU_SUBTYPE_SH7709 is not set
173# CONFIG_CPU_SUBTYPE_SH7710 is not set
174# CONFIG_CPU_SUBTYPE_SH7712 is not set
175# CONFIG_CPU_SUBTYPE_SH7720 is not set
176# CONFIG_CPU_SUBTYPE_SH7721 is not set
177# CONFIG_CPU_SUBTYPE_SH7750 is not set
178# CONFIG_CPU_SUBTYPE_SH7091 is not set
179# CONFIG_CPU_SUBTYPE_SH7750R is not set
180# CONFIG_CPU_SUBTYPE_SH7750S is not set
181# CONFIG_CPU_SUBTYPE_SH7751 is not set
182# CONFIG_CPU_SUBTYPE_SH7751R is not set
183# CONFIG_CPU_SUBTYPE_SH7760 is not set
184# CONFIG_CPU_SUBTYPE_SH4_202 is not set
185# CONFIG_CPU_SUBTYPE_SH7723 is not set
186CONFIG_CPU_SUBTYPE_SH7724=y
187# CONFIG_CPU_SUBTYPE_SH7757 is not set
188# CONFIG_CPU_SUBTYPE_SH7763 is not set
189# CONFIG_CPU_SUBTYPE_SH7770 is not set
190# CONFIG_CPU_SUBTYPE_SH7780 is not set
191# CONFIG_CPU_SUBTYPE_SH7785 is not set
192# CONFIG_CPU_SUBTYPE_SH7786 is not set
193# CONFIG_CPU_SUBTYPE_SHX3 is not set
194# CONFIG_CPU_SUBTYPE_SH7343 is not set
195# CONFIG_CPU_SUBTYPE_SH7722 is not set
196# CONFIG_CPU_SUBTYPE_SH7366 is not set
197
198#
199# Memory management options
200#
201CONFIG_QUICKLIST=y
202CONFIG_MMU=y
203CONFIG_PAGE_OFFSET=0x80000000
204CONFIG_FORCE_MAX_ZONEORDER=11
205CONFIG_MEMORY_START=0x08000000
206CONFIG_MEMORY_SIZE=0x08000000
207CONFIG_29BIT=y
208# CONFIG_X2TLB is not set
209CONFIG_VSYSCALL=y
210CONFIG_ARCH_FLATMEM_ENABLE=y
211CONFIG_ARCH_SPARSEMEM_ENABLE=y
212CONFIG_ARCH_SPARSEMEM_DEFAULT=y
213CONFIG_MAX_ACTIVE_REGIONS=1
214CONFIG_ARCH_POPULATES_NODE_MAP=y
215CONFIG_ARCH_SELECT_MEMORY_MODEL=y
216CONFIG_PAGE_SIZE_4KB=y
217# CONFIG_PAGE_SIZE_8KB is not set
218# CONFIG_PAGE_SIZE_16KB is not set
219# CONFIG_PAGE_SIZE_64KB is not set
220CONFIG_SELECT_MEMORY_MODEL=y
221CONFIG_FLATMEM_MANUAL=y
222# CONFIG_DISCONTIGMEM_MANUAL is not set
223# CONFIG_SPARSEMEM_MANUAL is not set
224CONFIG_FLATMEM=y
225CONFIG_FLAT_NODE_MEM_MAP=y
226CONFIG_SPARSEMEM_STATIC=y
227CONFIG_PAGEFLAGS_EXTENDED=y
228CONFIG_SPLIT_PTLOCK_CPUS=4
229# CONFIG_PHYS_ADDR_T_64BIT is not set
230CONFIG_ZONE_DMA_FLAG=0
231CONFIG_NR_QUICK=2
232CONFIG_HAVE_MLOCK=y
233CONFIG_HAVE_MLOCKED_PAGE_BIT=y
234# CONFIG_KSM is not set
235CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
236
237#
238# Cache configuration
239#
240CONFIG_CACHE_WRITEBACK=y
241# CONFIG_CACHE_WRITETHROUGH is not set
242# CONFIG_CACHE_OFF is not set
243
244#
245# Processor features
246#
247CONFIG_CPU_LITTLE_ENDIAN=y
248# CONFIG_CPU_BIG_ENDIAN is not set
249CONFIG_SH_FPU=y
250# CONFIG_SH_STORE_QUEUES is not set
251CONFIG_CPU_HAS_INTEVT=y
252CONFIG_CPU_HAS_SR_RB=y
253CONFIG_CPU_HAS_FPU=y
254
255#
256# Board support
257#
258# CONFIG_SH_7724_SOLUTION_ENGINE is not set
259# CONFIG_SH_KFR2R09 is not set
260CONFIG_SH_ECOVEC=y
261
262#
263# Timer and clock configuration
264#
265# CONFIG_SH_TIMER_TMU is not set
266CONFIG_SH_TIMER_CMT=y
267CONFIG_SH_PCLK_FREQ=33333333
268CONFIG_SH_CLK_CPG=y
269# CONFIG_NO_HZ is not set
270# CONFIG_HIGH_RES_TIMERS is not set
271CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
272
273#
274# CPU Frequency scaling
275#
276# CONFIG_CPU_FREQ is not set
277
278#
279# DMA support
280#
281# CONFIG_SH_DMA is not set
282
283#
284# Companion Chips
285#
286
287#
288# Additional SuperH Device Drivers
289#
290# CONFIG_HEARTBEAT is not set
291# CONFIG_PUSH_SWITCH is not set
292
293#
294# Kernel features
295#
296# CONFIG_HZ_100 is not set
297CONFIG_HZ_250=y
298# CONFIG_HZ_300 is not set
299# CONFIG_HZ_1000 is not set
300CONFIG_HZ=250
301# CONFIG_SCHED_HRTICK is not set
302CONFIG_KEXEC=y
303# CONFIG_CRASH_DUMP is not set
304# CONFIG_SECCOMP is not set
305CONFIG_PREEMPT_NONE=y
306# CONFIG_PREEMPT_VOLUNTARY is not set
307# CONFIG_PREEMPT is not set
308CONFIG_GUSA=y
309# CONFIG_SPARSE_IRQ is not set
310
311#
312# Boot options
313#
314CONFIG_ZERO_PAGE_OFFSET=0x00001000
315CONFIG_BOOT_LINK_OFFSET=0x00800000
316CONFIG_ENTRY_OFFSET=0x00001000
317CONFIG_CMDLINE_OVERWRITE=y
318# CONFIG_CMDLINE_EXTEND is not set
319CONFIG_CMDLINE="console=ttySC0,115200"
320
321#
322# Bus options
323#
324# CONFIG_ARCH_SUPPORTS_MSI is not set
325# CONFIG_PCCARD is not set
326
327#
328# Executable file formats
329#
330CONFIG_BINFMT_ELF=y
331# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
332# CONFIG_HAVE_AOUT is not set
333# CONFIG_BINFMT_MISC is not set
334
335#
336# Power management options (EXPERIMENTAL)
337#
338CONFIG_PM=y
339# CONFIG_PM_DEBUG is not set
340# CONFIG_SUSPEND is not set
341# CONFIG_HIBERNATION is not set
342CONFIG_PM_RUNTIME=y
343# CONFIG_CPU_IDLE is not set
344CONFIG_NET=y
345
346#
347# Networking options
348#
349CONFIG_PACKET=y
350CONFIG_PACKET_MMAP=y
351CONFIG_UNIX=y
352# CONFIG_NET_KEY is not set
353CONFIG_INET=y
354# CONFIG_IP_MULTICAST is not set
355# CONFIG_IP_ADVANCED_ROUTER is not set
356CONFIG_IP_FIB_HASH=y
357# CONFIG_IP_PNP is not set
358# CONFIG_NET_IPIP is not set
359# CONFIG_NET_IPGRE is not set
360# CONFIG_ARPD is not set
361# CONFIG_SYN_COOKIES is not set
362# CONFIG_INET_AH is not set
363# CONFIG_INET_ESP is not set
364# CONFIG_INET_IPCOMP is not set
365# CONFIG_INET_XFRM_TUNNEL is not set
366# CONFIG_INET_TUNNEL is not set
367# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
368# CONFIG_INET_XFRM_MODE_TUNNEL is not set
369# CONFIG_INET_XFRM_MODE_BEET is not set
370# CONFIG_INET_LRO is not set
371# CONFIG_INET_DIAG is not set
372# CONFIG_TCP_CONG_ADVANCED is not set
373CONFIG_TCP_CONG_CUBIC=y
374CONFIG_DEFAULT_TCP_CONG="cubic"
375# CONFIG_TCP_MD5SIG is not set
376# CONFIG_IPV6 is not set
377# CONFIG_NETWORK_SECMARK is not set
378# CONFIG_NETFILTER is not set
379# CONFIG_IP_DCCP is not set
380# CONFIG_IP_SCTP is not set
381# CONFIG_RDS is not set
382# CONFIG_TIPC is not set
383# CONFIG_ATM is not set
384# CONFIG_BRIDGE is not set
385# CONFIG_NET_DSA is not set
386# CONFIG_VLAN_8021Q is not set
387# CONFIG_DECNET is not set
388# CONFIG_LLC2 is not set
389# CONFIG_IPX is not set
390# CONFIG_ATALK is not set
391# CONFIG_X25 is not set
392# CONFIG_LAPB is not set
393# CONFIG_ECONET is not set
394# CONFIG_WAN_ROUTER is not set
395# CONFIG_PHONET is not set
396# CONFIG_IEEE802154 is not set
397# CONFIG_NET_SCHED is not set
398# CONFIG_DCB is not set
399
400#
401# Network testing
402#
403# CONFIG_NET_PKTGEN is not set
404# CONFIG_HAMRADIO is not set
405# CONFIG_CAN is not set
406# CONFIG_IRDA is not set
407# CONFIG_BT is not set
408# CONFIG_AF_RXRPC is not set
409# CONFIG_WIRELESS is not set
410# CONFIG_WIMAX is not set
411# CONFIG_RFKILL is not set
412# CONFIG_NET_9P is not set
413
414#
415# Device Drivers
416#
417
418#
419# Generic Driver Options
420#
421CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
422# CONFIG_DEVTMPFS is not set
423CONFIG_STANDALONE=y
424CONFIG_PREVENT_FIRMWARE_BUILD=y
425CONFIG_FW_LOADER=y
426CONFIG_FIRMWARE_IN_KERNEL=y
427CONFIG_EXTRA_FIRMWARE=""
428# CONFIG_SYS_HYPERVISOR is not set
429# CONFIG_CONNECTOR is not set
430# CONFIG_MTD is not set
431# CONFIG_PARPORT is not set
432CONFIG_BLK_DEV=y
433# CONFIG_BLK_DEV_COW_COMMON is not set
434# CONFIG_BLK_DEV_LOOP is not set
435# CONFIG_BLK_DEV_NBD is not set
436# CONFIG_BLK_DEV_UB is not set
437# CONFIG_BLK_DEV_RAM is not set
438# CONFIG_CDROM_PKTCDVD is not set
439# CONFIG_ATA_OVER_ETH is not set
440# CONFIG_BLK_DEV_HD is not set
441# CONFIG_MISC_DEVICES is not set
442CONFIG_HAVE_IDE=y
443# CONFIG_IDE is not set
444
445#
446# SCSI device support
447#
448# CONFIG_RAID_ATTRS is not set
449CONFIG_SCSI=y
450CONFIG_SCSI_DMA=y
451# CONFIG_SCSI_TGT is not set
452# CONFIG_SCSI_NETLINK is not set
453CONFIG_SCSI_PROC_FS=y
454
455#
456# SCSI support type (disk, tape, CD-ROM)
457#
458CONFIG_BLK_DEV_SD=y
459# CONFIG_CHR_DEV_ST is not set
460# CONFIG_CHR_DEV_OSST is not set
461# CONFIG_BLK_DEV_SR is not set
462# CONFIG_CHR_DEV_SG is not set
463# CONFIG_CHR_DEV_SCH is not set
464# CONFIG_SCSI_MULTI_LUN is not set
465# CONFIG_SCSI_CONSTANTS is not set
466# CONFIG_SCSI_LOGGING is not set
467# CONFIG_SCSI_SCAN_ASYNC is not set
468
469#
470# SCSI Transports
471#
472# CONFIG_SCSI_SPI_ATTRS is not set
473# CONFIG_SCSI_FC_ATTRS is not set
474# CONFIG_SCSI_ISCSI_ATTRS is not set
475# CONFIG_SCSI_SAS_LIBSAS is not set
476# CONFIG_SCSI_SRP_ATTRS is not set
477# CONFIG_SCSI_LOWLEVEL is not set
478# CONFIG_SCSI_DH is not set
479# CONFIG_SCSI_OSD_INITIATOR is not set
480# CONFIG_ATA is not set
481# CONFIG_MD is not set
482CONFIG_NETDEVICES=y
483# CONFIG_DUMMY is not set
484# CONFIG_BONDING is not set
485# CONFIG_MACVLAN is not set
486# CONFIG_EQUALIZER is not set
487# CONFIG_TUN is not set
488# CONFIG_VETH is not set
489CONFIG_PHYLIB=y
490
491#
492# MII PHY device drivers
493#
494# CONFIG_MARVELL_PHY is not set
495# CONFIG_DAVICOM_PHY is not set
496# CONFIG_QSEMI_PHY is not set
497# CONFIG_LXT_PHY is not set
498# CONFIG_CICADA_PHY is not set
499# CONFIG_VITESSE_PHY is not set
500# CONFIG_SMSC_PHY is not set
501# CONFIG_BROADCOM_PHY is not set
502# CONFIG_ICPLUS_PHY is not set
503# CONFIG_REALTEK_PHY is not set
504# CONFIG_NATIONAL_PHY is not set
505# CONFIG_STE10XP is not set
506# CONFIG_LSI_ET1011C_PHY is not set
507# CONFIG_FIXED_PHY is not set
508CONFIG_MDIO_BITBANG=y
509# CONFIG_MDIO_GPIO is not set
510CONFIG_NET_ETHERNET=y
511CONFIG_MII=y
512# CONFIG_AX88796 is not set
513# CONFIG_STNIC is not set
514CONFIG_SH_ETH=y
515# CONFIG_SMC91X is not set
516# CONFIG_ETHOC is not set
517# CONFIG_SMC911X is not set
518# CONFIG_SMSC911X is not set
519# CONFIG_DNET is not set
520# CONFIG_IBM_NEW_EMAC_ZMII is not set
521# CONFIG_IBM_NEW_EMAC_RGMII is not set
522# CONFIG_IBM_NEW_EMAC_TAH is not set
523# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
524# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
525# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
526# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
527# CONFIG_B44 is not set
528# CONFIG_KS8842 is not set
529# CONFIG_NETDEV_1000 is not set
530# CONFIG_NETDEV_10000 is not set
531CONFIG_WLAN=y
532# CONFIG_WLAN_PRE80211 is not set
533# CONFIG_WLAN_80211 is not set
534
535#
536# Enable WiMAX (Networking options) to see the WiMAX drivers
537#
538
539#
540# USB Network Adapters
541#
542# CONFIG_USB_CATC is not set
543# CONFIG_USB_KAWETH is not set
544# CONFIG_USB_PEGASUS is not set
545# CONFIG_USB_RTL8150 is not set
546# CONFIG_USB_USBNET is not set
547# CONFIG_WAN is not set
548# CONFIG_PPP is not set
549# CONFIG_SLIP is not set
550# CONFIG_NETCONSOLE is not set
551# CONFIG_NETPOLL is not set
552# CONFIG_NET_POLL_CONTROLLER is not set
553# CONFIG_ISDN is not set
554# CONFIG_PHONE is not set
555
556#
557# Input device support
558#
559CONFIG_INPUT=y
560# CONFIG_INPUT_FF_MEMLESS is not set
561# CONFIG_INPUT_POLLDEV is not set
562
563#
564# Userland interfaces
565#
566# CONFIG_INPUT_MOUSEDEV is not set
567# CONFIG_INPUT_JOYDEV is not set
568# CONFIG_INPUT_EVDEV is not set
569# CONFIG_INPUT_EVBUG is not set
570
571#
572# Input Device Drivers
573#
574# CONFIG_INPUT_KEYBOARD is not set
575# CONFIG_INPUT_MOUSE is not set
576# CONFIG_INPUT_JOYSTICK is not set
577# CONFIG_INPUT_TABLET is not set
578# CONFIG_INPUT_TOUCHSCREEN is not set
579# CONFIG_INPUT_MISC is not set
580
581#
582# Hardware I/O ports
583#
584# CONFIG_SERIO is not set
585# CONFIG_GAMEPORT is not set
586
587#
588# Character devices
589#
590CONFIG_VT=y
591CONFIG_CONSOLE_TRANSLATIONS=y
592CONFIG_VT_CONSOLE=y
593CONFIG_HW_CONSOLE=y
594CONFIG_VT_HW_CONSOLE_BINDING=y
595CONFIG_DEVKMEM=y
596# CONFIG_SERIAL_NONSTANDARD is not set
597
598#
599# Serial drivers
600#
601# CONFIG_SERIAL_8250 is not set
602
603#
604# Non-8250 serial port support
605#
606CONFIG_SERIAL_SH_SCI=y
607CONFIG_SERIAL_SH_SCI_NR_UARTS=6
608CONFIG_SERIAL_SH_SCI_CONSOLE=y
609CONFIG_SERIAL_CORE=y
610CONFIG_SERIAL_CORE_CONSOLE=y
611CONFIG_UNIX98_PTYS=y
612# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
613CONFIG_LEGACY_PTYS=y
614CONFIG_LEGACY_PTY_COUNT=256
615# CONFIG_IPMI_HANDLER is not set
616CONFIG_HW_RANDOM=y
617# CONFIG_HW_RANDOM_TIMERIOMEM is not set
618# CONFIG_R3964 is not set
619# CONFIG_RAW_DRIVER is not set
620# CONFIG_TCG_TPM is not set
621CONFIG_I2C=y
622CONFIG_I2C_BOARDINFO=y
623CONFIG_I2C_COMPAT=y
624# CONFIG_I2C_CHARDEV is not set
625CONFIG_I2C_HELPER_AUTO=y
626
627#
628# I2C Hardware Bus support
629#
630
631#
632# I2C system bus drivers (mostly embedded / system-on-chip)
633#
634# CONFIG_I2C_DESIGNWARE is not set
635# CONFIG_I2C_GPIO is not set
636# CONFIG_I2C_OCORES is not set
637CONFIG_I2C_SH_MOBILE=y
638# CONFIG_I2C_SIMTEC is not set
639
640#
641# External I2C/SMBus adapter drivers
642#
643# CONFIG_I2C_PARPORT_LIGHT is not set
644# CONFIG_I2C_TAOS_EVM is not set
645# CONFIG_I2C_TINY_USB is not set
646
647#
648# Other I2C/SMBus bus drivers
649#
650# CONFIG_I2C_PCA_PLATFORM is not set
651
652#
653# Miscellaneous I2C Chip support
654#
655# CONFIG_DS1682 is not set
656# CONFIG_SENSORS_TSL2550 is not set
657# CONFIG_I2C_DEBUG_CORE is not set
658# CONFIG_I2C_DEBUG_ALGO is not set
659# CONFIG_I2C_DEBUG_BUS is not set
660# CONFIG_I2C_DEBUG_CHIP is not set
661# CONFIG_SPI is not set
662
663#
664# PPS support
665#
666# CONFIG_PPS is not set
667CONFIG_ARCH_REQUIRE_GPIOLIB=y
668CONFIG_GPIOLIB=y
669CONFIG_GPIO_SYSFS=y
670
671#
672# Memory mapped GPIO expanders:
673#
674
675#
676# I2C GPIO expanders:
677#
678# CONFIG_GPIO_MAX732X is not set
679# CONFIG_GPIO_PCA953X is not set
680# CONFIG_GPIO_PCF857X is not set
681
682#
683# PCI GPIO expanders:
684#
685
686#
687# SPI GPIO expanders:
688#
689
690#
691# AC97 GPIO expanders:
692#
693# CONFIG_W1 is not set
694# CONFIG_POWER_SUPPLY is not set
695# CONFIG_HWMON is not set
696# CONFIG_THERMAL is not set
697# CONFIG_WATCHDOG is not set
698CONFIG_SSB_POSSIBLE=y
699
700#
701# Sonics Silicon Backplane
702#
703# CONFIG_SSB is not set
704
705#
706# Multifunction device drivers
707#
708# CONFIG_MFD_CORE is not set
709# CONFIG_MFD_SM501 is not set
710# CONFIG_HTC_PASIC3 is not set
711# CONFIG_TPS65010 is not set
712# CONFIG_TWL4030_CORE is not set
713# CONFIG_MFD_TMIO is not set
714# CONFIG_PMIC_DA903X is not set
715# CONFIG_MFD_WM8400 is not set
716# CONFIG_MFD_WM831X is not set
717# CONFIG_MFD_WM8350_I2C is not set
718# CONFIG_MFD_PCF50633 is not set
719# CONFIG_AB3100_CORE is not set
720# CONFIG_REGULATOR is not set
721# CONFIG_MEDIA_SUPPORT is not set
722
723#
724# Graphics support
725#
726# CONFIG_VGASTATE is not set
727# CONFIG_VIDEO_OUTPUT_CONTROL is not set
728# CONFIG_FB is not set
729# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
730
731#
732# Display device support
733#
734# CONFIG_DISPLAY_SUPPORT is not set
735
736#
737# Console display driver support
738#
739CONFIG_DUMMY_CONSOLE=y
740# CONFIG_SOUND is not set
741# CONFIG_HID_SUPPORT is not set
742CONFIG_USB_SUPPORT=y
743CONFIG_USB_ARCH_HAS_HCD=y
744# CONFIG_USB_ARCH_HAS_OHCI is not set
745# CONFIG_USB_ARCH_HAS_EHCI is not set
746CONFIG_USB=y
747# CONFIG_USB_DEBUG is not set
748# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
749
750#
751# Miscellaneous USB options
752#
753# CONFIG_USB_DEVICEFS is not set
754CONFIG_USB_DEVICE_CLASS=y
755# CONFIG_USB_DYNAMIC_MINORS is not set
756# CONFIG_USB_SUSPEND is not set
757# CONFIG_USB_OTG is not set
758# CONFIG_USB_OTG_WHITELIST is not set
759# CONFIG_USB_OTG_BLACKLIST_HUB is not set
760# CONFIG_USB_MON is not set
761# CONFIG_USB_WUSB is not set
762# CONFIG_USB_WUSB_CBAF is not set
763
764#
765# USB Host Controller Drivers
766#
767# CONFIG_USB_C67X00_HCD is not set
768# CONFIG_USB_OXU210HP_HCD is not set
769# CONFIG_USB_ISP116X_HCD is not set
770# CONFIG_USB_ISP1760_HCD is not set
771# CONFIG_USB_ISP1362_HCD is not set
772# CONFIG_USB_SL811_HCD is not set
773CONFIG_USB_R8A66597_HCD=y
774# CONFIG_USB_HWA_HCD is not set
775
776#
777# USB Device Class drivers
778#
779# CONFIG_USB_ACM is not set
780# CONFIG_USB_PRINTER is not set
781# CONFIG_USB_WDM is not set
782# CONFIG_USB_TMC is not set
783
784#
785# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
786#
787
788#
789# also be needed; see USB_STORAGE Help for more info
790#
791CONFIG_USB_STORAGE=y
792# CONFIG_USB_STORAGE_DEBUG is not set
793# CONFIG_USB_STORAGE_DATAFAB is not set
794# CONFIG_USB_STORAGE_FREECOM is not set
795# CONFIG_USB_STORAGE_ISD200 is not set
796# CONFIG_USB_STORAGE_USBAT is not set
797# CONFIG_USB_STORAGE_SDDR09 is not set
798# CONFIG_USB_STORAGE_SDDR55 is not set
799# CONFIG_USB_STORAGE_JUMPSHOT is not set
800# CONFIG_USB_STORAGE_ALAUDA is not set
801# CONFIG_USB_STORAGE_ONETOUCH is not set
802# CONFIG_USB_STORAGE_KARMA is not set
803# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
804# CONFIG_USB_LIBUSUAL is not set
805
806#
807# USB Imaging devices
808#
809# CONFIG_USB_MDC800 is not set
810# CONFIG_USB_MICROTEK is not set
811
812#
813# USB port drivers
814#
815# CONFIG_USB_SERIAL is not set
816
817#
818# USB Miscellaneous drivers
819#
820# CONFIG_USB_EMI62 is not set
821# CONFIG_USB_EMI26 is not set
822# CONFIG_USB_ADUTUX is not set
823# CONFIG_USB_SEVSEG is not set
824# CONFIG_USB_RIO500 is not set
825# CONFIG_USB_LEGOTOWER is not set
826# CONFIG_USB_LCD is not set
827# CONFIG_USB_BERRY_CHARGE is not set
828# CONFIG_USB_LED is not set
829# CONFIG_USB_CYPRESS_CY7C63 is not set
830# CONFIG_USB_CYTHERM is not set
831# CONFIG_USB_IDMOUSE is not set
832# CONFIG_USB_FTDI_ELAN is not set
833# CONFIG_USB_APPLEDISPLAY is not set
834# CONFIG_USB_LD is not set
835# CONFIG_USB_TRANCEVIBRATOR is not set
836# CONFIG_USB_IOWARRIOR is not set
837# CONFIG_USB_TEST is not set
838# CONFIG_USB_ISIGHTFW is not set
839# CONFIG_USB_VST is not set
840# CONFIG_USB_GADGET is not set
841
842#
843# OTG and related infrastructure
844#
845# CONFIG_USB_GPIO_VBUS is not set
846# CONFIG_NOP_USB_XCEIV is not set
847# CONFIG_MMC is not set
848# CONFIG_MEMSTICK is not set
849# CONFIG_NEW_LEDS is not set
850# CONFIG_ACCESSIBILITY is not set
851CONFIG_RTC_LIB=y
852# CONFIG_RTC_CLASS is not set
853# CONFIG_DMADEVICES is not set
854# CONFIG_AUXDISPLAY is not set
855# CONFIG_UIO is not set
856
857#
858# TI VLYNQ
859#
860# CONFIG_STAGING is not set
861
862#
863# File systems
864#
865CONFIG_EXT2_FS=y
866# CONFIG_EXT2_FS_XATTR is not set
867# CONFIG_EXT2_FS_XIP is not set
868# CONFIG_EXT3_FS is not set
869# CONFIG_EXT4_FS is not set
870# CONFIG_REISERFS_FS is not set
871# CONFIG_JFS_FS is not set
872# CONFIG_FS_POSIX_ACL is not set
873# CONFIG_XFS_FS is not set
874# CONFIG_OCFS2_FS is not set
875# CONFIG_BTRFS_FS is not set
876# CONFIG_NILFS2_FS is not set
877CONFIG_FILE_LOCKING=y
878# CONFIG_FSNOTIFY is not set
879# CONFIG_DNOTIFY is not set
880# CONFIG_INOTIFY is not set
881# CONFIG_INOTIFY_USER is not set
882# CONFIG_QUOTA is not set
883# CONFIG_AUTOFS_FS is not set
884# CONFIG_AUTOFS4_FS is not set
885# CONFIG_FUSE_FS is not set
886
887#
888# Caches
889#
890# CONFIG_FSCACHE is not set
891
892#
893# CD-ROM/DVD Filesystems
894#
895# CONFIG_ISO9660_FS is not set
896# CONFIG_UDF_FS is not set
897
898#
899# DOS/FAT/NT Filesystems
900#
901# CONFIG_MSDOS_FS is not set
902# CONFIG_VFAT_FS is not set
903# CONFIG_NTFS_FS is not set
904
905#
906# Pseudo filesystems
907#
908CONFIG_PROC_FS=y
909CONFIG_PROC_KCORE=y
910CONFIG_PROC_SYSCTL=y
911CONFIG_PROC_PAGE_MONITOR=y
912CONFIG_SYSFS=y
913CONFIG_TMPFS=y
914# CONFIG_TMPFS_POSIX_ACL is not set
915# CONFIG_HUGETLBFS is not set
916# CONFIG_HUGETLB_PAGE is not set
917# CONFIG_CONFIGFS_FS is not set
918# CONFIG_MISC_FILESYSTEMS is not set
919# CONFIG_NETWORK_FILESYSTEMS is not set
920
921#
922# Partition Types
923#
924# CONFIG_PARTITION_ADVANCED is not set
925CONFIG_MSDOS_PARTITION=y
926CONFIG_NLS=y
927CONFIG_NLS_DEFAULT="iso8859-1"
928# CONFIG_NLS_CODEPAGE_437 is not set
929# CONFIG_NLS_CODEPAGE_737 is not set
930# CONFIG_NLS_CODEPAGE_775 is not set
931# CONFIG_NLS_CODEPAGE_850 is not set
932# CONFIG_NLS_CODEPAGE_852 is not set
933# CONFIG_NLS_CODEPAGE_855 is not set
934# CONFIG_NLS_CODEPAGE_857 is not set
935# CONFIG_NLS_CODEPAGE_860 is not set
936# CONFIG_NLS_CODEPAGE_861 is not set
937# CONFIG_NLS_CODEPAGE_862 is not set
938# CONFIG_NLS_CODEPAGE_863 is not set
939# CONFIG_NLS_CODEPAGE_864 is not set
940# CONFIG_NLS_CODEPAGE_865 is not set
941# CONFIG_NLS_CODEPAGE_866 is not set
942# CONFIG_NLS_CODEPAGE_869 is not set
943# CONFIG_NLS_CODEPAGE_936 is not set
944# CONFIG_NLS_CODEPAGE_950 is not set
945# CONFIG_NLS_CODEPAGE_932 is not set
946# CONFIG_NLS_CODEPAGE_949 is not set
947# CONFIG_NLS_CODEPAGE_874 is not set
948# CONFIG_NLS_ISO8859_8 is not set
949# CONFIG_NLS_CODEPAGE_1250 is not set
950# CONFIG_NLS_CODEPAGE_1251 is not set
951# CONFIG_NLS_ASCII is not set
952# CONFIG_NLS_ISO8859_1 is not set
953# CONFIG_NLS_ISO8859_2 is not set
954# CONFIG_NLS_ISO8859_3 is not set
955# CONFIG_NLS_ISO8859_4 is not set
956# CONFIG_NLS_ISO8859_5 is not set
957# CONFIG_NLS_ISO8859_6 is not set
958# CONFIG_NLS_ISO8859_7 is not set
959# CONFIG_NLS_ISO8859_9 is not set
960# CONFIG_NLS_ISO8859_13 is not set
961# CONFIG_NLS_ISO8859_14 is not set
962# CONFIG_NLS_ISO8859_15 is not set
963# CONFIG_NLS_KOI8_R is not set
964# CONFIG_NLS_KOI8_U is not set
965# CONFIG_NLS_UTF8 is not set
966# CONFIG_DLM is not set
967
968#
969# Kernel hacking
970#
971CONFIG_TRACE_IRQFLAGS_SUPPORT=y
972# CONFIG_PRINTK_TIME is not set
973CONFIG_ENABLE_WARN_DEPRECATED=y
974# CONFIG_ENABLE_MUST_CHECK is not set
975CONFIG_FRAME_WARN=1024
976# CONFIG_MAGIC_SYSRQ is not set
977# CONFIG_STRIP_ASM_SYMS is not set
978# CONFIG_UNUSED_SYMBOLS is not set
979CONFIG_DEBUG_FS=y
980# CONFIG_HEADERS_CHECK is not set
981# CONFIG_DEBUG_KERNEL is not set
982# CONFIG_DEBUG_BUGVERBOSE is not set
983# CONFIG_DEBUG_MEMORY_INIT is not set
984# CONFIG_RCU_CPU_STALL_DETECTOR is not set
985# CONFIG_LATENCYTOP is not set
986# CONFIG_SYSCTL_SYSCALL_CHECK is not set
987CONFIG_HAVE_FUNCTION_TRACER=y
988CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
989CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
990CONFIG_HAVE_DYNAMIC_FTRACE=y
991CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
992CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
993CONFIG_TRACING_SUPPORT=y
994# CONFIG_FTRACE is not set
995# CONFIG_DYNAMIC_DEBUG is not set
996# CONFIG_DMA_API_DEBUG is not set
997# CONFIG_SAMPLES is not set
998CONFIG_HAVE_ARCH_KGDB=y
999# CONFIG_SH_STANDARD_BIOS is not set
1000# CONFIG_EARLY_SCIF_CONSOLE is not set
1001# CONFIG_DWARF_UNWINDER is not set
1002
1003#
1004# Security options
1005#
1006# CONFIG_KEYS is not set
1007# CONFIG_SECURITY is not set
1008# CONFIG_SECURITYFS is not set
1009# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1010# CONFIG_CRYPTO is not set
1011# CONFIG_BINARY_PRINTF is not set
1012
1013#
1014# Library routines
1015#
1016CONFIG_BITREVERSE=y
1017CONFIG_GENERIC_FIND_LAST_BIT=y
1018# CONFIG_CRC_CCITT is not set
1019# CONFIG_CRC16 is not set
1020# CONFIG_CRC_T10DIF is not set
1021# CONFIG_CRC_ITU_T is not set
1022CONFIG_CRC32=y
1023# CONFIG_CRC7 is not set
1024# CONFIG_LIBCRC32C is not set
1025CONFIG_ZLIB_INFLATE=y
1026CONFIG_DECOMPRESS_GZIP=y
1027CONFIG_HAS_IOMEM=y
1028CONFIG_HAS_IOPORT=y
1029CONFIG_HAS_DMA=y
1030CONFIG_HAVE_LMB=y
1031CONFIG_NLATTR=y
1032CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/ecovec24_defconfig b/arch/sh/configs/ecovec24_defconfig
new file mode 100644
index 000000000000..ac6469718a2c
--- /dev/null
+++ b/arch/sh/configs/ecovec24_defconfig
@@ -0,0 +1,1576 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.31
4# Thu Sep 24 17:45:39 2009
5#
6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y
8# CONFIG_SUPERH64 is not set
9CONFIG_ARCH_DEFCONFIG="arch/sh/configs/shx3_defconfig"
10CONFIG_RWSEM_GENERIC_SPINLOCK=y
11CONFIG_GENERIC_BUG=y
12CONFIG_GENERIC_FIND_NEXT_BIT=y
13CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
16CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_IRQ_PER_CPU=y
18CONFIG_GENERIC_GPIO=y
19CONFIG_GENERIC_TIME=y
20CONFIG_GENERIC_CLOCKEVENTS=y
21CONFIG_ARCH_SUSPEND_POSSIBLE=y
22CONFIG_ARCH_HIBERNATION_POSSIBLE=y
23CONFIG_SYS_SUPPORTS_CMT=y
24CONFIG_SYS_SUPPORTS_TMU=y
25CONFIG_STACKTRACE_SUPPORT=y
26CONFIG_LOCKDEP_SUPPORT=y
27CONFIG_HAVE_LATENCYTOP_SUPPORT=y
28# CONFIG_ARCH_HAS_ILOG2_U32 is not set
29# CONFIG_ARCH_HAS_ILOG2_U64 is not set
30CONFIG_ARCH_NO_VIRT_TO_BUS=y
31CONFIG_ARCH_HAS_DEFAULT_IDLE=y
32CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
33CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
34CONFIG_CONSTRUCTORS=y
35
36#
37# General setup
38#
39CONFIG_EXPERIMENTAL=y
40CONFIG_BROKEN_ON_SMP=y
41CONFIG_LOCK_KERNEL=y
42CONFIG_INIT_ENV_ARG_LIMIT=32
43CONFIG_LOCALVERSION=""
44# CONFIG_LOCALVERSION_AUTO is not set
45CONFIG_HAVE_KERNEL_GZIP=y
46CONFIG_HAVE_KERNEL_BZIP2=y
47CONFIG_HAVE_KERNEL_LZMA=y
48CONFIG_KERNEL_GZIP=y
49# CONFIG_KERNEL_BZIP2 is not set
50# CONFIG_KERNEL_LZMA is not set
51CONFIG_SWAP=y
52CONFIG_SYSVIPC=y
53CONFIG_SYSVIPC_SYSCTL=y
54# CONFIG_POSIX_MQUEUE is not set
55CONFIG_BSD_PROCESS_ACCT=y
56# CONFIG_BSD_PROCESS_ACCT_V3 is not set
57# CONFIG_TASKSTATS is not set
58# CONFIG_AUDIT is not set
59
60#
61# RCU Subsystem
62#
63CONFIG_TREE_RCU=y
64# CONFIG_TREE_PREEMPT_RCU is not set
65# CONFIG_RCU_TRACE is not set
66CONFIG_RCU_FANOUT=32
67# CONFIG_RCU_FANOUT_EXACT is not set
68# CONFIG_TREE_RCU_TRACE is not set
69# CONFIG_IKCONFIG is not set
70CONFIG_LOG_BUF_SHIFT=14
71CONFIG_GROUP_SCHED=y
72CONFIG_FAIR_GROUP_SCHED=y
73# CONFIG_RT_GROUP_SCHED is not set
74CONFIG_USER_SCHED=y
75# CONFIG_CGROUP_SCHED is not set
76# CONFIG_CGROUPS is not set
77CONFIG_SYSFS_DEPRECATED=y
78CONFIG_SYSFS_DEPRECATED_V2=y
79# CONFIG_RELAY is not set
80# CONFIG_NAMESPACES is not set
81# CONFIG_BLK_DEV_INITRD is not set
82CONFIG_CC_OPTIMIZE_FOR_SIZE=y
83CONFIG_SYSCTL=y
84CONFIG_ANON_INODES=y
85CONFIG_EMBEDDED=y
86CONFIG_UID16=y
87CONFIG_SYSCTL_SYSCALL=y
88# CONFIG_KALLSYMS is not set
89CONFIG_HOTPLUG=y
90CONFIG_PRINTK=y
91CONFIG_BUG=y
92CONFIG_ELF_CORE=y
93CONFIG_BASE_FULL=y
94CONFIG_FUTEX=y
95CONFIG_EPOLL=y
96CONFIG_SIGNALFD=y
97CONFIG_TIMERFD=y
98CONFIG_EVENTFD=y
99CONFIG_SHMEM=y
100CONFIG_AIO=y
101CONFIG_HAVE_PERF_EVENTS=y
102
103#
104# Kernel Performance Events And Counters
105#
106# CONFIG_PERF_EVENTS is not set
107# CONFIG_PERF_COUNTERS is not set
108CONFIG_VM_EVENT_COUNTERS=y
109CONFIG_COMPAT_BRK=y
110CONFIG_SLAB=y
111# CONFIG_SLUB is not set
112# CONFIG_SLOB is not set
113# CONFIG_PROFILING is not set
114CONFIG_HAVE_OPROFILE=y
115CONFIG_HAVE_IOREMAP_PROT=y
116CONFIG_HAVE_KPROBES=y
117CONFIG_HAVE_KRETPROBES=y
118CONFIG_HAVE_ARCH_TRACEHOOK=y
119CONFIG_HAVE_CLK=y
120CONFIG_HAVE_DMA_API_DEBUG=y
121
122#
123# GCOV-based kernel profiling
124#
125# CONFIG_GCOV_KERNEL is not set
126# CONFIG_SLOW_WORK is not set
127CONFIG_HAVE_GENERIC_DMA_COHERENT=y
128CONFIG_SLABINFO=y
129CONFIG_RT_MUTEXES=y
130CONFIG_BASE_SMALL=0
131CONFIG_MODULES=y
132# CONFIG_MODULE_FORCE_LOAD is not set
133CONFIG_MODULE_UNLOAD=y
134# CONFIG_MODULE_FORCE_UNLOAD is not set
135# CONFIG_MODVERSIONS is not set
136# CONFIG_MODULE_SRCVERSION_ALL is not set
137CONFIG_BLOCK=y
138CONFIG_LBDAF=y
139# CONFIG_BLK_DEV_BSG is not set
140# CONFIG_BLK_DEV_INTEGRITY is not set
141
142#
143# IO Schedulers
144#
145CONFIG_IOSCHED_NOOP=y
146CONFIG_IOSCHED_AS=y
147CONFIG_IOSCHED_DEADLINE=y
148CONFIG_IOSCHED_CFQ=y
149# CONFIG_DEFAULT_AS is not set
150# CONFIG_DEFAULT_DEADLINE is not set
151CONFIG_DEFAULT_CFQ=y
152# CONFIG_DEFAULT_NOOP is not set
153CONFIG_DEFAULT_IOSCHED="cfq"
154CONFIG_FREEZER=y
155
156#
157# System type
158#
159CONFIG_CPU_SH4=y
160CONFIG_CPU_SH4A=y
161CONFIG_CPU_SHX2=y
162CONFIG_ARCH_SHMOBILE=y
163# CONFIG_CPU_SUBTYPE_SH7619 is not set
164# CONFIG_CPU_SUBTYPE_SH7201 is not set
165# CONFIG_CPU_SUBTYPE_SH7203 is not set
166# CONFIG_CPU_SUBTYPE_SH7206 is not set
167# CONFIG_CPU_SUBTYPE_SH7263 is not set
168# CONFIG_CPU_SUBTYPE_MXG is not set
169# CONFIG_CPU_SUBTYPE_SH7705 is not set
170# CONFIG_CPU_SUBTYPE_SH7706 is not set
171# CONFIG_CPU_SUBTYPE_SH7707 is not set
172# CONFIG_CPU_SUBTYPE_SH7708 is not set
173# CONFIG_CPU_SUBTYPE_SH7709 is not set
174# CONFIG_CPU_SUBTYPE_SH7710 is not set
175# CONFIG_CPU_SUBTYPE_SH7712 is not set
176# CONFIG_CPU_SUBTYPE_SH7720 is not set
177# CONFIG_CPU_SUBTYPE_SH7721 is not set
178# CONFIG_CPU_SUBTYPE_SH7750 is not set
179# CONFIG_CPU_SUBTYPE_SH7091 is not set
180# CONFIG_CPU_SUBTYPE_SH7750R is not set
181# CONFIG_CPU_SUBTYPE_SH7750S is not set
182# CONFIG_CPU_SUBTYPE_SH7751 is not set
183# CONFIG_CPU_SUBTYPE_SH7751R is not set
184# CONFIG_CPU_SUBTYPE_SH7760 is not set
185# CONFIG_CPU_SUBTYPE_SH4_202 is not set
186# CONFIG_CPU_SUBTYPE_SH7723 is not set
187CONFIG_CPU_SUBTYPE_SH7724=y
188# CONFIG_CPU_SUBTYPE_SH7757 is not set
189# CONFIG_CPU_SUBTYPE_SH7763 is not set
190# CONFIG_CPU_SUBTYPE_SH7770 is not set
191# CONFIG_CPU_SUBTYPE_SH7780 is not set
192# CONFIG_CPU_SUBTYPE_SH7785 is not set
193# CONFIG_CPU_SUBTYPE_SH7786 is not set
194# CONFIG_CPU_SUBTYPE_SHX3 is not set
195# CONFIG_CPU_SUBTYPE_SH7343 is not set
196# CONFIG_CPU_SUBTYPE_SH7722 is not set
197# CONFIG_CPU_SUBTYPE_SH7366 is not set
198
199#
200# Memory management options
201#
202CONFIG_QUICKLIST=y
203CONFIG_MMU=y
204CONFIG_PAGE_OFFSET=0x80000000
205CONFIG_FORCE_MAX_ZONEORDER=11
206CONFIG_MEMORY_START=0x08000000
207CONFIG_MEMORY_SIZE=0x08000000
208CONFIG_29BIT=y
209# CONFIG_X2TLB is not set
210CONFIG_VSYSCALL=y
211CONFIG_ARCH_FLATMEM_ENABLE=y
212CONFIG_ARCH_SPARSEMEM_ENABLE=y
213CONFIG_ARCH_SPARSEMEM_DEFAULT=y
214CONFIG_MAX_ACTIVE_REGIONS=1
215CONFIG_ARCH_POPULATES_NODE_MAP=y
216CONFIG_ARCH_SELECT_MEMORY_MODEL=y
217CONFIG_PAGE_SIZE_4KB=y
218# CONFIG_PAGE_SIZE_8KB is not set
219# CONFIG_PAGE_SIZE_16KB is not set
220# CONFIG_PAGE_SIZE_64KB is not set
221CONFIG_SELECT_MEMORY_MODEL=y
222CONFIG_FLATMEM_MANUAL=y
223# CONFIG_DISCONTIGMEM_MANUAL is not set
224# CONFIG_SPARSEMEM_MANUAL is not set
225CONFIG_FLATMEM=y
226CONFIG_FLAT_NODE_MEM_MAP=y
227CONFIG_SPARSEMEM_STATIC=y
228CONFIG_PAGEFLAGS_EXTENDED=y
229CONFIG_SPLIT_PTLOCK_CPUS=4
230# CONFIG_PHYS_ADDR_T_64BIT is not set
231CONFIG_ZONE_DMA_FLAG=0
232CONFIG_NR_QUICK=2
233CONFIG_HAVE_MLOCK=y
234CONFIG_HAVE_MLOCKED_PAGE_BIT=y
235# CONFIG_KSM is not set
236CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
237
238#
239# Cache configuration
240#
241CONFIG_CACHE_WRITEBACK=y
242# CONFIG_CACHE_WRITETHROUGH is not set
243# CONFIG_CACHE_OFF is not set
244
245#
246# Processor features
247#
248CONFIG_CPU_LITTLE_ENDIAN=y
249# CONFIG_CPU_BIG_ENDIAN is not set
250CONFIG_SH_FPU=y
251# CONFIG_SH_STORE_QUEUES is not set
252CONFIG_CPU_HAS_INTEVT=y
253CONFIG_CPU_HAS_SR_RB=y
254CONFIG_CPU_HAS_FPU=y
255
256#
257# Board support
258#
259# CONFIG_SH_7724_SOLUTION_ENGINE is not set
260# CONFIG_SH_KFR2R09 is not set
261CONFIG_SH_ECOVEC=y
262
263#
264# Timer and clock configuration
265#
266CONFIG_SH_TIMER_TMU=y
267# CONFIG_SH_TIMER_CMT is not set
268CONFIG_SH_PCLK_FREQ=33333333
269CONFIG_SH_CLK_CPG=y
270# CONFIG_NO_HZ is not set
271# CONFIG_HIGH_RES_TIMERS is not set
272CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
273
274#
275# CPU Frequency scaling
276#
277# CONFIG_CPU_FREQ is not set
278
279#
280# DMA support
281#
282# CONFIG_SH_DMA is not set
283
284#
285# Companion Chips
286#
287
288#
289# Additional SuperH Device Drivers
290#
291CONFIG_HEARTBEAT=y
292# CONFIG_PUSH_SWITCH is not set
293
294#
295# Kernel features
296#
297# CONFIG_HZ_100 is not set
298CONFIG_HZ_250=y
299# CONFIG_HZ_300 is not set
300# CONFIG_HZ_1000 is not set
301CONFIG_HZ=250
302# CONFIG_SCHED_HRTICK is not set
303# CONFIG_KEXEC is not set
304# CONFIG_CRASH_DUMP is not set
305CONFIG_SECCOMP=y
306# CONFIG_PREEMPT_NONE is not set
307# CONFIG_PREEMPT_VOLUNTARY is not set
308CONFIG_PREEMPT=y
309CONFIG_GUSA=y
310# CONFIG_SPARSE_IRQ is not set
311
312#
313# Boot options
314#
315CONFIG_ZERO_PAGE_OFFSET=0x00001000
316CONFIG_BOOT_LINK_OFFSET=0x00800000
317CONFIG_ENTRY_OFFSET=0x00001000
318CONFIG_CMDLINE_OVERWRITE=y
319# CONFIG_CMDLINE_EXTEND is not set
320CONFIG_CMDLINE="console=tty0, console=ttySC0,115200 root=/dev/nfs ip=dhcp mem=120M memchunk.vpu=4m"
321
322#
323# Bus options
324#
325# CONFIG_ARCH_SUPPORTS_MSI is not set
326# CONFIG_PCCARD is not set
327
328#
329# Executable file formats
330#
331CONFIG_BINFMT_ELF=y
332# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
333# CONFIG_HAVE_AOUT is not set
334# CONFIG_BINFMT_MISC is not set
335
336#
337# Power management options (EXPERIMENTAL)
338#
339CONFIG_PM=y
340# CONFIG_PM_DEBUG is not set
341CONFIG_PM_SLEEP=y
342CONFIG_SUSPEND=y
343CONFIG_SUSPEND_FREEZER=y
344# CONFIG_HIBERNATION is not set
345CONFIG_PM_RUNTIME=y
346# CONFIG_CPU_IDLE is not set
347CONFIG_NET=y
348
349#
350# Networking options
351#
352CONFIG_PACKET=y
353# CONFIG_PACKET_MMAP is not set
354CONFIG_UNIX=y
355# CONFIG_NET_KEY is not set
356CONFIG_INET=y
357# CONFIG_IP_MULTICAST is not set
358CONFIG_IP_ADVANCED_ROUTER=y
359CONFIG_ASK_IP_FIB_HASH=y
360# CONFIG_IP_FIB_TRIE is not set
361CONFIG_IP_FIB_HASH=y
362# CONFIG_IP_MULTIPLE_TABLES is not set
363# CONFIG_IP_ROUTE_MULTIPATH is not set
364# CONFIG_IP_ROUTE_VERBOSE is not set
365CONFIG_IP_PNP=y
366CONFIG_IP_PNP_DHCP=y
367# CONFIG_IP_PNP_BOOTP is not set
368# CONFIG_IP_PNP_RARP is not set
369# CONFIG_NET_IPIP is not set
370# CONFIG_NET_IPGRE is not set
371# CONFIG_ARPD is not set
372# CONFIG_SYN_COOKIES is not set
373# CONFIG_INET_AH is not set
374# CONFIG_INET_ESP is not set
375# CONFIG_INET_IPCOMP is not set
376# CONFIG_INET_XFRM_TUNNEL is not set
377# CONFIG_INET_TUNNEL is not set
378# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
379# CONFIG_INET_XFRM_MODE_TUNNEL is not set
380# CONFIG_INET_XFRM_MODE_BEET is not set
381# CONFIG_INET_LRO is not set
382CONFIG_INET_DIAG=y
383CONFIG_INET_TCP_DIAG=y
384# CONFIG_TCP_CONG_ADVANCED is not set
385CONFIG_TCP_CONG_CUBIC=y
386CONFIG_DEFAULT_TCP_CONG="cubic"
387# CONFIG_TCP_MD5SIG is not set
388# CONFIG_IPV6 is not set
389# CONFIG_NETWORK_SECMARK is not set
390# CONFIG_NETFILTER is not set
391# CONFIG_IP_DCCP is not set
392# CONFIG_IP_SCTP is not set
393# CONFIG_RDS is not set
394# CONFIG_TIPC is not set
395# CONFIG_ATM is not set
396# CONFIG_BRIDGE is not set
397# CONFIG_NET_DSA is not set
398# CONFIG_VLAN_8021Q is not set
399# CONFIG_DECNET is not set
400# CONFIG_LLC2 is not set
401# CONFIG_IPX is not set
402# CONFIG_ATALK is not set
403# CONFIG_X25 is not set
404# CONFIG_LAPB is not set
405# CONFIG_ECONET is not set
406# CONFIG_WAN_ROUTER is not set
407# CONFIG_PHONET is not set
408# CONFIG_IEEE802154 is not set
409# CONFIG_NET_SCHED is not set
410# CONFIG_DCB is not set
411
412#
413# Network testing
414#
415# CONFIG_NET_PKTGEN is not set
416# CONFIG_HAMRADIO is not set
417# CONFIG_CAN is not set
418# CONFIG_IRDA is not set
419# CONFIG_BT is not set
420# CONFIG_AF_RXRPC is not set
421CONFIG_WIRELESS=y
422# CONFIG_CFG80211 is not set
423CONFIG_CFG80211_DEFAULT_PS_VALUE=0
424# CONFIG_WIRELESS_OLD_REGULATORY is not set
425# CONFIG_WIRELESS_EXT is not set
426# CONFIG_LIB80211 is not set
427
428#
429# CFG80211 needs to be enabled for MAC80211
430#
431# CONFIG_WIMAX is not set
432# CONFIG_RFKILL is not set
433# CONFIG_NET_9P is not set
434
435#
436# Device Drivers
437#
438
439#
440# Generic Driver Options
441#
442CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
443# CONFIG_DEVTMPFS is not set
444CONFIG_STANDALONE=y
445CONFIG_PREVENT_FIRMWARE_BUILD=y
446CONFIG_FW_LOADER=y
447CONFIG_FIRMWARE_IN_KERNEL=y
448CONFIG_EXTRA_FIRMWARE=""
449# CONFIG_SYS_HYPERVISOR is not set
450# CONFIG_CONNECTOR is not set
451CONFIG_MTD=y
452# CONFIG_MTD_DEBUG is not set
453# CONFIG_MTD_TESTS is not set
454CONFIG_MTD_CONCAT=y
455CONFIG_MTD_PARTITIONS=y
456# CONFIG_MTD_REDBOOT_PARTS is not set
457CONFIG_MTD_CMDLINE_PARTS=y
458# CONFIG_MTD_AR7_PARTS is not set
459
460#
461# User Modules And Translation Layers
462#
463CONFIG_MTD_CHAR=y
464CONFIG_MTD_BLKDEVS=y
465CONFIG_MTD_BLOCK=y
466# CONFIG_FTL is not set
467# CONFIG_NFTL is not set
468# CONFIG_INFTL is not set
469# CONFIG_RFD_FTL is not set
470# CONFIG_SSFDC is not set
471# CONFIG_MTD_OOPS is not set
472
473#
474# RAM/ROM/Flash chip drivers
475#
476CONFIG_MTD_CFI=y
477# CONFIG_MTD_JEDECPROBE is not set
478CONFIG_MTD_GEN_PROBE=y
479# CONFIG_MTD_CFI_ADV_OPTIONS is not set
480CONFIG_MTD_MAP_BANK_WIDTH_1=y
481CONFIG_MTD_MAP_BANK_WIDTH_2=y
482CONFIG_MTD_MAP_BANK_WIDTH_4=y
483# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
484# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
485# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
486CONFIG_MTD_CFI_I1=y
487CONFIG_MTD_CFI_I2=y
488# CONFIG_MTD_CFI_I4 is not set
489# CONFIG_MTD_CFI_I8 is not set
490# CONFIG_MTD_CFI_INTELEXT is not set
491CONFIG_MTD_CFI_AMDSTD=y
492# CONFIG_MTD_CFI_STAA is not set
493CONFIG_MTD_CFI_UTIL=y
494# CONFIG_MTD_RAM is not set
495# CONFIG_MTD_ROM is not set
496# CONFIG_MTD_ABSENT is not set
497
498#
499# Mapping drivers for chip access
500#
501# CONFIG_MTD_COMPLEX_MAPPINGS is not set
502CONFIG_MTD_PHYSMAP=y
503# CONFIG_MTD_PHYSMAP_COMPAT is not set
504# CONFIG_MTD_PLATRAM is not set
505
506#
507# Self-contained MTD device drivers
508#
509# CONFIG_MTD_DATAFLASH is not set
510# CONFIG_MTD_M25P80 is not set
511# CONFIG_MTD_SST25L is not set
512# CONFIG_MTD_SLRAM is not set
513# CONFIG_MTD_PHRAM is not set
514# CONFIG_MTD_MTDRAM is not set
515# CONFIG_MTD_BLOCK2MTD is not set
516
517#
518# Disk-On-Chip Device Drivers
519#
520# CONFIG_MTD_DOC2000 is not set
521# CONFIG_MTD_DOC2001 is not set
522# CONFIG_MTD_DOC2001PLUS is not set
523CONFIG_MTD_NAND=y
524# CONFIG_MTD_NAND_VERIFY_WRITE is not set
525# CONFIG_MTD_NAND_ECC_SMC is not set
526# CONFIG_MTD_NAND_MUSEUM_IDS is not set
527CONFIG_MTD_NAND_IDS=y
528# CONFIG_MTD_NAND_DISKONCHIP is not set
529# CONFIG_MTD_NAND_NANDSIM is not set
530# CONFIG_MTD_NAND_PLATFORM is not set
531# CONFIG_MTD_ALAUDA is not set
532# CONFIG_MTD_ONENAND is not set
533
534#
535# LPDDR flash memory drivers
536#
537# CONFIG_MTD_LPDDR is not set
538
539#
540# UBI - Unsorted block images
541#
542CONFIG_MTD_UBI=y
543CONFIG_MTD_UBI_WL_THRESHOLD=4096
544CONFIG_MTD_UBI_BEB_RESERVE=1
545# CONFIG_MTD_UBI_GLUEBI is not set
546
547#
548# UBI debugging options
549#
550# CONFIG_MTD_UBI_DEBUG is not set
551# CONFIG_PARPORT is not set
552CONFIG_BLK_DEV=y
553# CONFIG_BLK_DEV_COW_COMMON is not set
554# CONFIG_BLK_DEV_LOOP is not set
555# CONFIG_BLK_DEV_NBD is not set
556# CONFIG_BLK_DEV_UB is not set
557CONFIG_BLK_DEV_RAM=y
558CONFIG_BLK_DEV_RAM_COUNT=4
559CONFIG_BLK_DEV_RAM_SIZE=4096
560# CONFIG_BLK_DEV_XIP is not set
561# CONFIG_CDROM_PKTCDVD is not set
562# CONFIG_ATA_OVER_ETH is not set
563# CONFIG_BLK_DEV_HD is not set
564CONFIG_MISC_DEVICES=y
565# CONFIG_ICS932S401 is not set
566# CONFIG_ENCLOSURE_SERVICES is not set
567# CONFIG_ISL29003 is not set
568# CONFIG_C2PORT is not set
569
570#
571# EEPROM support
572#
573# CONFIG_EEPROM_AT24 is not set
574# CONFIG_EEPROM_AT25 is not set
575# CONFIG_EEPROM_LEGACY is not set
576# CONFIG_EEPROM_MAX6875 is not set
577# CONFIG_EEPROM_93CX6 is not set
578CONFIG_HAVE_IDE=y
579# CONFIG_IDE is not set
580
581#
582# SCSI device support
583#
584# CONFIG_RAID_ATTRS is not set
585CONFIG_SCSI=y
586CONFIG_SCSI_DMA=y
587# CONFIG_SCSI_TGT is not set
588# CONFIG_SCSI_NETLINK is not set
589CONFIG_SCSI_PROC_FS=y
590
591#
592# SCSI support type (disk, tape, CD-ROM)
593#
594CONFIG_BLK_DEV_SD=y
595# CONFIG_CHR_DEV_ST is not set
596# CONFIG_CHR_DEV_OSST is not set
597# CONFIG_BLK_DEV_SR is not set
598# CONFIG_CHR_DEV_SG is not set
599# CONFIG_CHR_DEV_SCH is not set
600# CONFIG_SCSI_MULTI_LUN is not set
601# CONFIG_SCSI_CONSTANTS is not set
602# CONFIG_SCSI_LOGGING is not set
603# CONFIG_SCSI_SCAN_ASYNC is not set
604CONFIG_SCSI_WAIT_SCAN=m
605
606#
607# SCSI Transports
608#
609# CONFIG_SCSI_SPI_ATTRS is not set
610# CONFIG_SCSI_FC_ATTRS is not set
611# CONFIG_SCSI_ISCSI_ATTRS is not set
612# CONFIG_SCSI_SAS_LIBSAS is not set
613# CONFIG_SCSI_SRP_ATTRS is not set
614CONFIG_SCSI_LOWLEVEL=y
615# CONFIG_ISCSI_TCP is not set
616# CONFIG_LIBFC is not set
617# CONFIG_LIBFCOE is not set
618# CONFIG_SCSI_DEBUG is not set
619# CONFIG_SCSI_DH is not set
620# CONFIG_SCSI_OSD_INITIATOR is not set
621# CONFIG_ATA is not set
622# CONFIG_MD is not set
623CONFIG_NETDEVICES=y
624# CONFIG_DUMMY is not set
625# CONFIG_BONDING is not set
626# CONFIG_MACVLAN is not set
627# CONFIG_EQUALIZER is not set
628# CONFIG_TUN is not set
629# CONFIG_VETH is not set
630CONFIG_PHYLIB=y
631
632#
633# MII PHY device drivers
634#
635# CONFIG_MARVELL_PHY is not set
636# CONFIG_DAVICOM_PHY is not set
637# CONFIG_QSEMI_PHY is not set
638# CONFIG_LXT_PHY is not set
639# CONFIG_CICADA_PHY is not set
640# CONFIG_VITESSE_PHY is not set
641CONFIG_SMSC_PHY=y
642# CONFIG_BROADCOM_PHY is not set
643# CONFIG_ICPLUS_PHY is not set
644# CONFIG_REALTEK_PHY is not set
645# CONFIG_NATIONAL_PHY is not set
646# CONFIG_STE10XP is not set
647# CONFIG_LSI_ET1011C_PHY is not set
648# CONFIG_FIXED_PHY is not set
649CONFIG_MDIO_BITBANG=y
650# CONFIG_MDIO_GPIO is not set
651CONFIG_NET_ETHERNET=y
652CONFIG_MII=y
653# CONFIG_AX88796 is not set
654# CONFIG_STNIC is not set
655CONFIG_SH_ETH=y
656# CONFIG_SMC91X is not set
657# CONFIG_ENC28J60 is not set
658# CONFIG_ETHOC is not set
659# CONFIG_SMC911X is not set
660# CONFIG_SMSC911X is not set
661# CONFIG_DNET is not set
662# CONFIG_IBM_NEW_EMAC_ZMII is not set
663# CONFIG_IBM_NEW_EMAC_RGMII is not set
664# CONFIG_IBM_NEW_EMAC_TAH is not set
665# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
666# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
667# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
668# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
669# CONFIG_B44 is not set
670# CONFIG_KS8842 is not set
671# CONFIG_KS8851 is not set
672# CONFIG_NETDEV_1000 is not set
673# CONFIG_NETDEV_10000 is not set
674CONFIG_WLAN=y
675# CONFIG_WLAN_PRE80211 is not set
676# CONFIG_WLAN_80211 is not set
677
678#
679# Enable WiMAX (Networking options) to see the WiMAX drivers
680#
681
682#
683# USB Network Adapters
684#
685# CONFIG_USB_CATC is not set
686# CONFIG_USB_KAWETH is not set
687# CONFIG_USB_PEGASUS is not set
688# CONFIG_USB_RTL8150 is not set
689# CONFIG_USB_USBNET is not set
690# CONFIG_WAN is not set
691# CONFIG_PPP is not set
692# CONFIG_SLIP is not set
693# CONFIG_NETCONSOLE is not set
694# CONFIG_NETPOLL is not set
695# CONFIG_NET_POLL_CONTROLLER is not set
696# CONFIG_ISDN is not set
697# CONFIG_PHONE is not set
698
699#
700# Input device support
701#
702CONFIG_INPUT=y
703# CONFIG_INPUT_FF_MEMLESS is not set
704# CONFIG_INPUT_POLLDEV is not set
705
706#
707# Userland interfaces
708#
709# CONFIG_INPUT_MOUSEDEV is not set
710# CONFIG_INPUT_JOYDEV is not set
711CONFIG_INPUT_EVDEV=y
712# CONFIG_INPUT_EVBUG is not set
713
714#
715# Input Device Drivers
716#
717CONFIG_INPUT_KEYBOARD=y
718# CONFIG_KEYBOARD_ADP5588 is not set
719# CONFIG_KEYBOARD_ATKBD is not set
720# CONFIG_QT2160 is not set
721# CONFIG_KEYBOARD_LKKBD is not set
722# CONFIG_KEYBOARD_GPIO is not set
723# CONFIG_KEYBOARD_MATRIX is not set
724# CONFIG_KEYBOARD_MAX7359 is not set
725# CONFIG_KEYBOARD_NEWTON is not set
726# CONFIG_KEYBOARD_OPENCORES is not set
727# CONFIG_KEYBOARD_STOWAWAY is not set
728# CONFIG_KEYBOARD_SUNKBD is not set
729CONFIG_KEYBOARD_SH_KEYSC=y
730# CONFIG_KEYBOARD_XTKBD is not set
731# CONFIG_INPUT_MOUSE is not set
732# CONFIG_INPUT_JOYSTICK is not set
733# CONFIG_INPUT_TABLET is not set
734# CONFIG_INPUT_TOUCHSCREEN is not set
735# CONFIG_INPUT_MISC is not set
736
737#
738# Hardware I/O ports
739#
740# CONFIG_SERIO is not set
741# CONFIG_GAMEPORT is not set
742
743#
744# Character devices
745#
746CONFIG_VT=y
747CONFIG_CONSOLE_TRANSLATIONS=y
748CONFIG_VT_CONSOLE=y
749CONFIG_HW_CONSOLE=y
750CONFIG_VT_HW_CONSOLE_BINDING=y
751CONFIG_DEVKMEM=y
752# CONFIG_SERIAL_NONSTANDARD is not set
753
754#
755# Serial drivers
756#
757# CONFIG_SERIAL_8250 is not set
758
759#
760# Non-8250 serial port support
761#
762# CONFIG_SERIAL_MAX3100 is not set
763CONFIG_SERIAL_SH_SCI=y
764CONFIG_SERIAL_SH_SCI_NR_UARTS=6
765CONFIG_SERIAL_SH_SCI_CONSOLE=y
766CONFIG_SERIAL_CORE=y
767CONFIG_SERIAL_CORE_CONSOLE=y
768CONFIG_UNIX98_PTYS=y
769# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
770CONFIG_LEGACY_PTYS=y
771CONFIG_LEGACY_PTY_COUNT=256
772# CONFIG_IPMI_HANDLER is not set
773CONFIG_HW_RANDOM=y
774# CONFIG_HW_RANDOM_TIMERIOMEM is not set
775# CONFIG_R3964 is not set
776# CONFIG_RAW_DRIVER is not set
777# CONFIG_TCG_TPM is not set
778CONFIG_I2C=y
779CONFIG_I2C_BOARDINFO=y
780CONFIG_I2C_COMPAT=y
781CONFIG_I2C_CHARDEV=y
782CONFIG_I2C_HELPER_AUTO=y
783
784#
785# I2C Hardware Bus support
786#
787
788#
789# I2C system bus drivers (mostly embedded / system-on-chip)
790#
791# CONFIG_I2C_DESIGNWARE is not set
792# CONFIG_I2C_GPIO is not set
793# CONFIG_I2C_OCORES is not set
794CONFIG_I2C_SH_MOBILE=y
795# CONFIG_I2C_SIMTEC is not set
796
797#
798# External I2C/SMBus adapter drivers
799#
800# CONFIG_I2C_PARPORT_LIGHT is not set
801# CONFIG_I2C_TAOS_EVM is not set
802# CONFIG_I2C_TINY_USB is not set
803
804#
805# Other I2C/SMBus bus drivers
806#
807# CONFIG_I2C_PCA_PLATFORM is not set
808# CONFIG_I2C_STUB is not set
809
810#
811# Miscellaneous I2C Chip support
812#
813# CONFIG_DS1682 is not set
814# CONFIG_SENSORS_TSL2550 is not set
815# CONFIG_I2C_DEBUG_CORE is not set
816# CONFIG_I2C_DEBUG_ALGO is not set
817# CONFIG_I2C_DEBUG_BUS is not set
818# CONFIG_I2C_DEBUG_CHIP is not set
819CONFIG_SPI=y
820CONFIG_SPI_MASTER=y
821
822#
823# SPI Master Controller Drivers
824#
825CONFIG_SPI_BITBANG=y
826# CONFIG_SPI_GPIO is not set
827# CONFIG_SPI_SH_SCI is not set
828
829#
830# SPI Protocol Masters
831#
832# CONFIG_SPI_SPIDEV is not set
833# CONFIG_SPI_TLE62X0 is not set
834
835#
836# PPS support
837#
838# CONFIG_PPS is not set
839CONFIG_ARCH_REQUIRE_GPIOLIB=y
840CONFIG_GPIOLIB=y
841# CONFIG_GPIO_SYSFS is not set
842
843#
844# Memory mapped GPIO expanders:
845#
846
847#
848# I2C GPIO expanders:
849#
850# CONFIG_GPIO_MAX732X is not set
851# CONFIG_GPIO_PCA953X is not set
852# CONFIG_GPIO_PCF857X is not set
853
854#
855# PCI GPIO expanders:
856#
857
858#
859# SPI GPIO expanders:
860#
861# CONFIG_GPIO_MAX7301 is not set
862# CONFIG_GPIO_MCP23S08 is not set
863# CONFIG_GPIO_MC33880 is not set
864
865#
866# AC97 GPIO expanders:
867#
868# CONFIG_W1 is not set
869# CONFIG_POWER_SUPPLY is not set
870# CONFIG_HWMON is not set
871# CONFIG_THERMAL is not set
872# CONFIG_WATCHDOG is not set
873CONFIG_SSB_POSSIBLE=y
874
875#
876# Sonics Silicon Backplane
877#
878# CONFIG_SSB is not set
879
880#
881# Multifunction device drivers
882#
883# CONFIG_MFD_CORE is not set
884# CONFIG_MFD_SM501 is not set
885# CONFIG_HTC_PASIC3 is not set
886# CONFIG_TPS65010 is not set
887# CONFIG_TWL4030_CORE is not set
888# CONFIG_MFD_TMIO is not set
889# CONFIG_PMIC_DA903X is not set
890# CONFIG_MFD_WM8400 is not set
891# CONFIG_MFD_WM831X is not set
892# CONFIG_MFD_WM8350_I2C is not set
893# CONFIG_MFD_PCF50633 is not set
894# CONFIG_MFD_MC13783 is not set
895# CONFIG_AB3100_CORE is not set
896# CONFIG_EZX_PCAP is not set
897# CONFIG_REGULATOR is not set
898CONFIG_MEDIA_SUPPORT=y
899
900#
901# Multimedia core support
902#
903CONFIG_VIDEO_DEV=y
904CONFIG_VIDEO_V4L2_COMMON=y
905CONFIG_VIDEO_ALLOW_V4L1=y
906CONFIG_VIDEO_V4L1_COMPAT=y
907# CONFIG_DVB_CORE is not set
908CONFIG_VIDEO_MEDIA=y
909
910#
911# Multimedia drivers
912#
913# CONFIG_MEDIA_ATTACH is not set
914CONFIG_MEDIA_TUNER=y
915# CONFIG_MEDIA_TUNER_CUSTOMISE is not set
916CONFIG_MEDIA_TUNER_SIMPLE=y
917CONFIG_MEDIA_TUNER_TDA8290=y
918CONFIG_MEDIA_TUNER_TDA9887=y
919CONFIG_MEDIA_TUNER_TEA5761=y
920CONFIG_MEDIA_TUNER_TEA5767=y
921CONFIG_MEDIA_TUNER_MT20XX=y
922CONFIG_MEDIA_TUNER_XC2028=y
923CONFIG_MEDIA_TUNER_XC5000=y
924CONFIG_MEDIA_TUNER_MC44S803=y
925CONFIG_VIDEO_V4L2=y
926CONFIG_VIDEO_V4L1=y
927CONFIG_VIDEOBUF_GEN=y
928CONFIG_VIDEOBUF_DMA_CONTIG=y
929CONFIG_VIDEO_CAPTURE_DRIVERS=y
930# CONFIG_VIDEO_ADV_DEBUG is not set
931# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
932CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
933# CONFIG_VIDEO_VIVI is not set
934# CONFIG_VIDEO_CPIA is not set
935# CONFIG_VIDEO_CPIA2 is not set
936# CONFIG_VIDEO_SAA5246A is not set
937# CONFIG_VIDEO_SAA5249 is not set
938CONFIG_SOC_CAMERA=y
939# CONFIG_SOC_CAMERA_MT9M001 is not set
940# CONFIG_SOC_CAMERA_MT9M111 is not set
941# CONFIG_SOC_CAMERA_MT9T031 is not set
942# CONFIG_SOC_CAMERA_MT9V022 is not set
943# CONFIG_SOC_CAMERA_TW9910 is not set
944# CONFIG_SOC_CAMERA_PLATFORM is not set
945# CONFIG_SOC_CAMERA_OV772X is not set
946CONFIG_VIDEO_SH_MOBILE_CEU=y
947# CONFIG_V4L_USB_DRIVERS is not set
948CONFIG_RADIO_ADAPTERS=y
949# CONFIG_I2C_SI4713 is not set
950# CONFIG_RADIO_SI4713 is not set
951# CONFIG_USB_DSBR is not set
952# CONFIG_RADIO_SI470X is not set
953# CONFIG_USB_MR800 is not set
954# CONFIG_RADIO_TEA5764 is not set
955# CONFIG_DAB is not set
956
957#
958# Graphics support
959#
960# CONFIG_VGASTATE is not set
961# CONFIG_VIDEO_OUTPUT_CONTROL is not set
962CONFIG_FB=y
963# CONFIG_FIRMWARE_EDID is not set
964# CONFIG_FB_DDC is not set
965# CONFIG_FB_BOOT_VESA_SUPPORT is not set
966# CONFIG_FB_CFB_FILLRECT is not set
967# CONFIG_FB_CFB_COPYAREA is not set
968# CONFIG_FB_CFB_IMAGEBLIT is not set
969# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
970CONFIG_FB_SYS_FILLRECT=y
971CONFIG_FB_SYS_COPYAREA=y
972CONFIG_FB_SYS_IMAGEBLIT=y
973# CONFIG_FB_FOREIGN_ENDIAN is not set
974CONFIG_FB_SYS_FOPS=y
975CONFIG_FB_DEFERRED_IO=y
976# CONFIG_FB_SVGALIB is not set
977# CONFIG_FB_MACMODES is not set
978# CONFIG_FB_BACKLIGHT is not set
979# CONFIG_FB_MODE_HELPERS is not set
980# CONFIG_FB_TILEBLITTING is not set
981
982#
983# Frame buffer hardware drivers
984#
985# CONFIG_FB_S1D13XXX is not set
986CONFIG_FB_SH_MOBILE_LCDC=y
987# CONFIG_FB_VIRTUAL is not set
988# CONFIG_FB_METRONOME is not set
989# CONFIG_FB_MB862XX is not set
990# CONFIG_FB_BROADSHEET is not set
991# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
992
993#
994# Display device support
995#
996# CONFIG_DISPLAY_SUPPORT is not set
997
998#
999# Console display driver support
1000#
1001CONFIG_DUMMY_CONSOLE=y
1002CONFIG_FRAMEBUFFER_CONSOLE=y
1003# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
1004# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
1005# CONFIG_FONTS is not set
1006CONFIG_FONT_8x8=y
1007CONFIG_FONT_8x16=y
1008CONFIG_LOGO=y
1009# CONFIG_LOGO_LINUX_MONO is not set
1010# CONFIG_LOGO_LINUX_VGA16 is not set
1011# CONFIG_LOGO_LINUX_CLUT224 is not set
1012# CONFIG_LOGO_SUPERH_MONO is not set
1013# CONFIG_LOGO_SUPERH_VGA16 is not set
1014CONFIG_LOGO_SUPERH_CLUT224=y
1015# CONFIG_SOUND is not set
1016CONFIG_HID_SUPPORT=y
1017CONFIG_HID=y
1018# CONFIG_HIDRAW is not set
1019
1020#
1021# USB Input Devices
1022#
1023CONFIG_USB_HID=y
1024# CONFIG_HID_PID is not set
1025# CONFIG_USB_HIDDEV is not set
1026
1027#
1028# Special HID drivers
1029#
1030# CONFIG_HID_A4TECH is not set
1031# CONFIG_HID_APPLE is not set
1032# CONFIG_HID_BELKIN is not set
1033# CONFIG_HID_CHERRY is not set
1034# CONFIG_HID_CHICONY is not set
1035# CONFIG_HID_CYPRESS is not set
1036# CONFIG_HID_DRAGONRISE is not set
1037# CONFIG_HID_EZKEY is not set
1038# CONFIG_HID_KYE is not set
1039# CONFIG_HID_GYRATION is not set
1040# CONFIG_HID_TWINHAN is not set
1041# CONFIG_HID_KENSINGTON is not set
1042# CONFIG_HID_LOGITECH is not set
1043# CONFIG_HID_MICROSOFT is not set
1044# CONFIG_HID_MONTEREY is not set
1045# CONFIG_HID_NTRIG is not set
1046# CONFIG_HID_PANTHERLORD is not set
1047# CONFIG_HID_PETALYNX is not set
1048# CONFIG_HID_SAMSUNG is not set
1049# CONFIG_HID_SONY is not set
1050# CONFIG_HID_SUNPLUS is not set
1051# CONFIG_HID_GREENASIA is not set
1052# CONFIG_HID_SMARTJOYPLUS is not set
1053# CONFIG_HID_TOPSEED is not set
1054# CONFIG_HID_THRUSTMASTER is not set
1055# CONFIG_HID_ZEROPLUS is not set
1056CONFIG_USB_SUPPORT=y
1057CONFIG_USB_ARCH_HAS_HCD=y
1058# CONFIG_USB_ARCH_HAS_OHCI is not set
1059# CONFIG_USB_ARCH_HAS_EHCI is not set
1060CONFIG_USB=y
1061# CONFIG_USB_DEBUG is not set
1062# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
1063
1064#
1065# Miscellaneous USB options
1066#
1067CONFIG_USB_DEVICEFS=y
1068CONFIG_USB_DEVICE_CLASS=y
1069# CONFIG_USB_DYNAMIC_MINORS is not set
1070# CONFIG_USB_SUSPEND is not set
1071# CONFIG_USB_OTG is not set
1072# CONFIG_USB_OTG_WHITELIST is not set
1073# CONFIG_USB_OTG_BLACKLIST_HUB is not set
1074CONFIG_USB_MON=y
1075# CONFIG_USB_WUSB is not set
1076# CONFIG_USB_WUSB_CBAF is not set
1077
1078#
1079# USB Host Controller Drivers
1080#
1081# CONFIG_USB_C67X00_HCD is not set
1082# CONFIG_USB_OXU210HP_HCD is not set
1083# CONFIG_USB_ISP116X_HCD is not set
1084# CONFIG_USB_ISP1760_HCD is not set
1085# CONFIG_USB_ISP1362_HCD is not set
1086# CONFIG_USB_SL811_HCD is not set
1087CONFIG_USB_R8A66597_HCD=y
1088# CONFIG_USB_HWA_HCD is not set
1089
1090#
1091# USB Device Class drivers
1092#
1093# CONFIG_USB_ACM is not set
1094# CONFIG_USB_PRINTER is not set
1095# CONFIG_USB_WDM is not set
1096# CONFIG_USB_TMC is not set
1097
1098#
1099# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
1100#
1101
1102#
1103# also be needed; see USB_STORAGE Help for more info
1104#
1105CONFIG_USB_STORAGE=y
1106# CONFIG_USB_STORAGE_DEBUG is not set
1107# CONFIG_USB_STORAGE_DATAFAB is not set
1108# CONFIG_USB_STORAGE_FREECOM is not set
1109# CONFIG_USB_STORAGE_ISD200 is not set
1110# CONFIG_USB_STORAGE_USBAT is not set
1111# CONFIG_USB_STORAGE_SDDR09 is not set
1112# CONFIG_USB_STORAGE_SDDR55 is not set
1113# CONFIG_USB_STORAGE_JUMPSHOT is not set
1114# CONFIG_USB_STORAGE_ALAUDA is not set
1115# CONFIG_USB_STORAGE_ONETOUCH is not set
1116# CONFIG_USB_STORAGE_KARMA is not set
1117# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
1118# CONFIG_USB_LIBUSUAL is not set
1119
1120#
1121# USB Imaging devices
1122#
1123# CONFIG_USB_MDC800 is not set
1124# CONFIG_USB_MICROTEK is not set
1125
1126#
1127# USB port drivers
1128#
1129# CONFIG_USB_SERIAL is not set
1130
1131#
1132# USB Miscellaneous drivers
1133#
1134# CONFIG_USB_EMI62 is not set
1135# CONFIG_USB_EMI26 is not set
1136# CONFIG_USB_ADUTUX is not set
1137# CONFIG_USB_SEVSEG is not set
1138# CONFIG_USB_RIO500 is not set
1139# CONFIG_USB_LEGOTOWER is not set
1140# CONFIG_USB_LCD is not set
1141# CONFIG_USB_BERRY_CHARGE is not set
1142# CONFIG_USB_LED is not set
1143# CONFIG_USB_CYPRESS_CY7C63 is not set
1144# CONFIG_USB_CYTHERM is not set
1145# CONFIG_USB_IDMOUSE is not set
1146# CONFIG_USB_FTDI_ELAN is not set
1147# CONFIG_USB_APPLEDISPLAY is not set
1148# CONFIG_USB_LD is not set
1149# CONFIG_USB_TRANCEVIBRATOR is not set
1150# CONFIG_USB_IOWARRIOR is not set
1151# CONFIG_USB_TEST is not set
1152# CONFIG_USB_ISIGHTFW is not set
1153# CONFIG_USB_VST is not set
1154# CONFIG_USB_GADGET is not set
1155
1156#
1157# OTG and related infrastructure
1158#
1159# CONFIG_USB_GPIO_VBUS is not set
1160# CONFIG_NOP_USB_XCEIV is not set
1161CONFIG_MMC=y
1162# CONFIG_MMC_DEBUG is not set
1163# CONFIG_MMC_UNSAFE_RESUME is not set
1164
1165#
1166# MMC/SD/SDIO Card Drivers
1167#
1168CONFIG_MMC_BLOCK=y
1169CONFIG_MMC_BLOCK_BOUNCE=y
1170# CONFIG_SDIO_UART is not set
1171# CONFIG_MMC_TEST is not set
1172
1173#
1174# MMC/SD/SDIO Host Controller Drivers
1175#
1176# CONFIG_MMC_SDHCI is not set
1177# CONFIG_MMC_AT91 is not set
1178# CONFIG_MMC_ATMELMCI is not set
1179CONFIG_MMC_SPI=y
1180# CONFIG_MEMSTICK is not set
1181# CONFIG_NEW_LEDS is not set
1182# CONFIG_ACCESSIBILITY is not set
1183CONFIG_RTC_LIB=y
1184CONFIG_RTC_CLASS=y
1185CONFIG_RTC_HCTOSYS=y
1186CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
1187# CONFIG_RTC_DEBUG is not set
1188
1189#
1190# RTC interfaces
1191#
1192CONFIG_RTC_INTF_SYSFS=y
1193CONFIG_RTC_INTF_PROC=y
1194CONFIG_RTC_INTF_DEV=y
1195# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
1196# CONFIG_RTC_DRV_TEST is not set
1197
1198#
1199# I2C RTC drivers
1200#
1201# CONFIG_RTC_DRV_DS1307 is not set
1202# CONFIG_RTC_DRV_DS1374 is not set
1203# CONFIG_RTC_DRV_DS1672 is not set
1204# CONFIG_RTC_DRV_MAX6900 is not set
1205# CONFIG_RTC_DRV_RS5C372 is not set
1206# CONFIG_RTC_DRV_ISL1208 is not set
1207# CONFIG_RTC_DRV_X1205 is not set
1208CONFIG_RTC_DRV_PCF8563=y
1209# CONFIG_RTC_DRV_PCF8583 is not set
1210# CONFIG_RTC_DRV_M41T80 is not set
1211# CONFIG_RTC_DRV_S35390A is not set
1212# CONFIG_RTC_DRV_FM3130 is not set
1213# CONFIG_RTC_DRV_RX8581 is not set
1214# CONFIG_RTC_DRV_RX8025 is not set
1215
1216#
1217# SPI RTC drivers
1218#
1219# CONFIG_RTC_DRV_M41T94 is not set
1220# CONFIG_RTC_DRV_DS1305 is not set
1221# CONFIG_RTC_DRV_DS1390 is not set
1222# CONFIG_RTC_DRV_MAX6902 is not set
1223# CONFIG_RTC_DRV_R9701 is not set
1224# CONFIG_RTC_DRV_RS5C348 is not set
1225# CONFIG_RTC_DRV_DS3234 is not set
1226# CONFIG_RTC_DRV_PCF2123 is not set
1227
1228#
1229# Platform RTC drivers
1230#
1231# CONFIG_RTC_DRV_DS1286 is not set
1232# CONFIG_RTC_DRV_DS1511 is not set
1233# CONFIG_RTC_DRV_DS1553 is not set
1234# CONFIG_RTC_DRV_DS1742 is not set
1235# CONFIG_RTC_DRV_STK17TA8 is not set
1236# CONFIG_RTC_DRV_M48T86 is not set
1237# CONFIG_RTC_DRV_M48T35 is not set
1238# CONFIG_RTC_DRV_M48T59 is not set
1239# CONFIG_RTC_DRV_BQ4802 is not set
1240# CONFIG_RTC_DRV_V3020 is not set
1241
1242#
1243# on-CPU RTC drivers
1244#
1245# CONFIG_RTC_DRV_SH is not set
1246# CONFIG_RTC_DRV_GENERIC is not set
1247# CONFIG_DMADEVICES is not set
1248# CONFIG_AUXDISPLAY is not set
1249CONFIG_UIO=y
1250# CONFIG_UIO_PDRV is not set
1251CONFIG_UIO_PDRV_GENIRQ=y
1252# CONFIG_UIO_SMX is not set
1253# CONFIG_UIO_SERCOS3 is not set
1254
1255#
1256# TI VLYNQ
1257#
1258# CONFIG_STAGING is not set
1259
1260#
1261# File systems
1262#
1263CONFIG_EXT2_FS=y
1264CONFIG_EXT2_FS_XATTR=y
1265CONFIG_EXT2_FS_POSIX_ACL=y
1266CONFIG_EXT2_FS_SECURITY=y
1267# CONFIG_EXT2_FS_XIP is not set
1268CONFIG_EXT3_FS=y
1269# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
1270CONFIG_EXT3_FS_XATTR=y
1271CONFIG_EXT3_FS_POSIX_ACL=y
1272CONFIG_EXT3_FS_SECURITY=y
1273# CONFIG_EXT4_FS is not set
1274CONFIG_JBD=y
1275# CONFIG_JBD_DEBUG is not set
1276CONFIG_FS_MBCACHE=y
1277# CONFIG_REISERFS_FS is not set
1278# CONFIG_JFS_FS is not set
1279CONFIG_FS_POSIX_ACL=y
1280# CONFIG_XFS_FS is not set
1281# CONFIG_GFS2_FS is not set
1282# CONFIG_OCFS2_FS is not set
1283# CONFIG_BTRFS_FS is not set
1284# CONFIG_NILFS2_FS is not set
1285CONFIG_FILE_LOCKING=y
1286CONFIG_FSNOTIFY=y
1287CONFIG_DNOTIFY=y
1288CONFIG_INOTIFY=y
1289CONFIG_INOTIFY_USER=y
1290# CONFIG_QUOTA is not set
1291# CONFIG_AUTOFS_FS is not set
1292# CONFIG_AUTOFS4_FS is not set
1293# CONFIG_FUSE_FS is not set
1294
1295#
1296# Caches
1297#
1298# CONFIG_FSCACHE is not set
1299
1300#
1301# CD-ROM/DVD Filesystems
1302#
1303# CONFIG_ISO9660_FS is not set
1304# CONFIG_UDF_FS is not set
1305
1306#
1307# DOS/FAT/NT Filesystems
1308#
1309CONFIG_FAT_FS=y
1310# CONFIG_MSDOS_FS is not set
1311CONFIG_VFAT_FS=y
1312CONFIG_FAT_DEFAULT_CODEPAGE=437
1313CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1314# CONFIG_NTFS_FS is not set
1315
1316#
1317# Pseudo filesystems
1318#
1319CONFIG_PROC_FS=y
1320CONFIG_PROC_KCORE=y
1321CONFIG_PROC_SYSCTL=y
1322CONFIG_PROC_PAGE_MONITOR=y
1323CONFIG_SYSFS=y
1324CONFIG_TMPFS=y
1325# CONFIG_TMPFS_POSIX_ACL is not set
1326# CONFIG_HUGETLBFS is not set
1327# CONFIG_HUGETLB_PAGE is not set
1328# CONFIG_CONFIGFS_FS is not set
1329CONFIG_MISC_FILESYSTEMS=y
1330# CONFIG_ADFS_FS is not set
1331# CONFIG_AFFS_FS is not set
1332# CONFIG_HFS_FS is not set
1333# CONFIG_HFSPLUS_FS is not set
1334# CONFIG_BEFS_FS is not set
1335# CONFIG_BFS_FS is not set
1336# CONFIG_EFS_FS is not set
1337# CONFIG_JFFS2_FS is not set
1338# CONFIG_UBIFS_FS is not set
1339# CONFIG_CRAMFS is not set
1340# CONFIG_SQUASHFS is not set
1341# CONFIG_VXFS_FS is not set
1342# CONFIG_MINIX_FS is not set
1343# CONFIG_OMFS_FS is not set
1344# CONFIG_HPFS_FS is not set
1345# CONFIG_QNX4FS_FS is not set
1346# CONFIG_ROMFS_FS is not set
1347# CONFIG_SYSV_FS is not set
1348# CONFIG_UFS_FS is not set
1349CONFIG_NETWORK_FILESYSTEMS=y
1350CONFIG_NFS_FS=y
1351CONFIG_NFS_V3=y
1352# CONFIG_NFS_V3_ACL is not set
1353# CONFIG_NFS_V4 is not set
1354CONFIG_ROOT_NFS=y
1355CONFIG_NFSD=y
1356CONFIG_NFSD_V3=y
1357# CONFIG_NFSD_V3_ACL is not set
1358# CONFIG_NFSD_V4 is not set
1359CONFIG_LOCKD=y
1360CONFIG_LOCKD_V4=y
1361CONFIG_EXPORTFS=y
1362CONFIG_NFS_COMMON=y
1363CONFIG_SUNRPC=y
1364# CONFIG_RPCSEC_GSS_KRB5 is not set
1365# CONFIG_RPCSEC_GSS_SPKM3 is not set
1366# CONFIG_SMB_FS is not set
1367# CONFIG_CIFS is not set
1368# CONFIG_NCP_FS is not set
1369# CONFIG_CODA_FS is not set
1370# CONFIG_AFS_FS is not set
1371
1372#
1373# Partition Types
1374#
1375# CONFIG_PARTITION_ADVANCED is not set
1376CONFIG_MSDOS_PARTITION=y
1377CONFIG_NLS=y
1378CONFIG_NLS_DEFAULT="iso8859-1"
1379CONFIG_NLS_CODEPAGE_437=y
1380# CONFIG_NLS_CODEPAGE_737 is not set
1381# CONFIG_NLS_CODEPAGE_775 is not set
1382# CONFIG_NLS_CODEPAGE_850 is not set
1383# CONFIG_NLS_CODEPAGE_852 is not set
1384# CONFIG_NLS_CODEPAGE_855 is not set
1385# CONFIG_NLS_CODEPAGE_857 is not set
1386# CONFIG_NLS_CODEPAGE_860 is not set
1387# CONFIG_NLS_CODEPAGE_861 is not set
1388# CONFIG_NLS_CODEPAGE_862 is not set
1389# CONFIG_NLS_CODEPAGE_863 is not set
1390# CONFIG_NLS_CODEPAGE_864 is not set
1391# CONFIG_NLS_CODEPAGE_865 is not set
1392# CONFIG_NLS_CODEPAGE_866 is not set
1393# CONFIG_NLS_CODEPAGE_869 is not set
1394# CONFIG_NLS_CODEPAGE_936 is not set
1395# CONFIG_NLS_CODEPAGE_950 is not set
1396CONFIG_NLS_CODEPAGE_932=y
1397# CONFIG_NLS_CODEPAGE_949 is not set
1398# CONFIG_NLS_CODEPAGE_874 is not set
1399# CONFIG_NLS_ISO8859_8 is not set
1400# CONFIG_NLS_CODEPAGE_1250 is not set
1401# CONFIG_NLS_CODEPAGE_1251 is not set
1402# CONFIG_NLS_ASCII is not set
1403CONFIG_NLS_ISO8859_1=y
1404# CONFIG_NLS_ISO8859_2 is not set
1405# CONFIG_NLS_ISO8859_3 is not set
1406# CONFIG_NLS_ISO8859_4 is not set
1407# CONFIG_NLS_ISO8859_5 is not set
1408# CONFIG_NLS_ISO8859_6 is not set
1409# CONFIG_NLS_ISO8859_7 is not set
1410# CONFIG_NLS_ISO8859_9 is not set
1411# CONFIG_NLS_ISO8859_13 is not set
1412# CONFIG_NLS_ISO8859_14 is not set
1413# CONFIG_NLS_ISO8859_15 is not set
1414# CONFIG_NLS_KOI8_R is not set
1415# CONFIG_NLS_KOI8_U is not set
1416# CONFIG_NLS_UTF8 is not set
1417# CONFIG_DLM is not set
1418
1419#
1420# Kernel hacking
1421#
1422CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1423# CONFIG_PRINTK_TIME is not set
1424CONFIG_ENABLE_WARN_DEPRECATED=y
1425# CONFIG_ENABLE_MUST_CHECK is not set
1426CONFIG_FRAME_WARN=1024
1427# CONFIG_MAGIC_SYSRQ is not set
1428# CONFIG_STRIP_ASM_SYMS is not set
1429# CONFIG_UNUSED_SYMBOLS is not set
1430CONFIG_DEBUG_FS=y
1431# CONFIG_HEADERS_CHECK is not set
1432# CONFIG_DEBUG_KERNEL is not set
1433# CONFIG_DEBUG_BUGVERBOSE is not set
1434# CONFIG_DEBUG_MEMORY_INIT is not set
1435# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1436# CONFIG_LATENCYTOP is not set
1437CONFIG_SYSCTL_SYSCALL_CHECK=y
1438CONFIG_HAVE_FUNCTION_TRACER=y
1439CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1440CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
1441CONFIG_HAVE_DYNAMIC_FTRACE=y
1442CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1443CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
1444CONFIG_TRACING_SUPPORT=y
1445# CONFIG_FTRACE is not set
1446# CONFIG_DYNAMIC_DEBUG is not set
1447# CONFIG_DMA_API_DEBUG is not set
1448# CONFIG_SAMPLES is not set
1449CONFIG_HAVE_ARCH_KGDB=y
1450# CONFIG_SH_STANDARD_BIOS is not set
1451# CONFIG_EARLY_SCIF_CONSOLE is not set
1452# CONFIG_DWARF_UNWINDER is not set
1453
1454#
1455# Security options
1456#
1457# CONFIG_KEYS is not set
1458# CONFIG_SECURITY is not set
1459# CONFIG_SECURITYFS is not set
1460# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1461CONFIG_CRYPTO=y
1462
1463#
1464# Crypto core or helper
1465#
1466CONFIG_CRYPTO_ALGAPI=y
1467CONFIG_CRYPTO_ALGAPI2=y
1468CONFIG_CRYPTO_AEAD2=y
1469CONFIG_CRYPTO_BLKCIPHER=y
1470CONFIG_CRYPTO_BLKCIPHER2=y
1471CONFIG_CRYPTO_HASH2=y
1472CONFIG_CRYPTO_RNG2=y
1473CONFIG_CRYPTO_PCOMP=y
1474CONFIG_CRYPTO_MANAGER=y
1475CONFIG_CRYPTO_MANAGER2=y
1476# CONFIG_CRYPTO_GF128MUL is not set
1477# CONFIG_CRYPTO_NULL is not set
1478CONFIG_CRYPTO_WORKQUEUE=y
1479# CONFIG_CRYPTO_CRYPTD is not set
1480# CONFIG_CRYPTO_AUTHENC is not set
1481# CONFIG_CRYPTO_TEST is not set
1482
1483#
1484# Authenticated Encryption with Associated Data
1485#
1486# CONFIG_CRYPTO_CCM is not set
1487# CONFIG_CRYPTO_GCM is not set
1488# CONFIG_CRYPTO_SEQIV is not set
1489
1490#
1491# Block modes
1492#
1493CONFIG_CRYPTO_CBC=y
1494# CONFIG_CRYPTO_CTR is not set
1495# CONFIG_CRYPTO_CTS is not set
1496# CONFIG_CRYPTO_ECB is not set
1497# CONFIG_CRYPTO_LRW is not set
1498# CONFIG_CRYPTO_PCBC is not set
1499# CONFIG_CRYPTO_XTS is not set
1500
1501#
1502# Hash modes
1503#
1504# CONFIG_CRYPTO_HMAC is not set
1505# CONFIG_CRYPTO_XCBC is not set
1506# CONFIG_CRYPTO_VMAC is not set
1507
1508#
1509# Digest
1510#
1511# CONFIG_CRYPTO_CRC32C is not set
1512# CONFIG_CRYPTO_GHASH is not set
1513# CONFIG_CRYPTO_MD4 is not set
1514# CONFIG_CRYPTO_MD5 is not set
1515# CONFIG_CRYPTO_MICHAEL_MIC is not set
1516# CONFIG_CRYPTO_RMD128 is not set
1517# CONFIG_CRYPTO_RMD160 is not set
1518# CONFIG_CRYPTO_RMD256 is not set
1519# CONFIG_CRYPTO_RMD320 is not set
1520# CONFIG_CRYPTO_SHA1 is not set
1521# CONFIG_CRYPTO_SHA256 is not set
1522# CONFIG_CRYPTO_SHA512 is not set
1523# CONFIG_CRYPTO_TGR192 is not set
1524# CONFIG_CRYPTO_WP512 is not set
1525
1526#
1527# Ciphers
1528#
1529# CONFIG_CRYPTO_AES is not set
1530# CONFIG_CRYPTO_ANUBIS is not set
1531# CONFIG_CRYPTO_ARC4 is not set
1532# CONFIG_CRYPTO_BLOWFISH is not set
1533# CONFIG_CRYPTO_CAMELLIA is not set
1534# CONFIG_CRYPTO_CAST5 is not set
1535# CONFIG_CRYPTO_CAST6 is not set
1536# CONFIG_CRYPTO_DES is not set
1537# CONFIG_CRYPTO_FCRYPT is not set
1538# CONFIG_CRYPTO_KHAZAD is not set
1539# CONFIG_CRYPTO_SALSA20 is not set
1540# CONFIG_CRYPTO_SEED is not set
1541# CONFIG_CRYPTO_SERPENT is not set
1542# CONFIG_CRYPTO_TEA is not set
1543# CONFIG_CRYPTO_TWOFISH is not set
1544
1545#
1546# Compression
1547#
1548# CONFIG_CRYPTO_DEFLATE is not set
1549# CONFIG_CRYPTO_ZLIB is not set
1550# CONFIG_CRYPTO_LZO is not set
1551
1552#
1553# Random Number Generation
1554#
1555# CONFIG_CRYPTO_ANSI_CPRNG is not set
1556CONFIG_CRYPTO_HW=y
1557# CONFIG_BINARY_PRINTF is not set
1558
1559#
1560# Library routines
1561#
1562CONFIG_BITREVERSE=y
1563CONFIG_GENERIC_FIND_LAST_BIT=y
1564# CONFIG_CRC_CCITT is not set
1565# CONFIG_CRC16 is not set
1566CONFIG_CRC_T10DIF=y
1567CONFIG_CRC_ITU_T=y
1568CONFIG_CRC32=y
1569CONFIG_CRC7=y
1570# CONFIG_LIBCRC32C is not set
1571CONFIG_HAS_IOMEM=y
1572CONFIG_HAS_IOPORT=y
1573CONFIG_HAS_DMA=y
1574CONFIG_HAVE_LMB=y
1575CONFIG_NLATTR=y
1576CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/edosk7705_defconfig b/arch/sh/configs/edosk7705_defconfig
index 497414c439f4..86c9bc050629 100644
--- a/arch/sh/configs/edosk7705_defconfig
+++ b/arch/sh/configs/edosk7705_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.30 3# Linux kernel version: 2.6.31
4# Thu Jun 18 12:25:35 2009 4# Thu Sep 24 17:57:13 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -13,6 +13,7 @@ CONFIG_GENERIC_HWEIGHT=y
13CONFIG_GENERIC_HARDIRQS=y 13CONFIG_GENERIC_HARDIRQS=y
14CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 14CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
15CONFIG_GENERIC_IRQ_PROBE=y 15CONFIG_GENERIC_IRQ_PROBE=y
16CONFIG_IRQ_PER_CPU=y
16# CONFIG_GENERIC_GPIO is not set 17# CONFIG_GENERIC_GPIO is not set
17CONFIG_GENERIC_TIME=y 18CONFIG_GENERIC_TIME=y
18CONFIG_GENERIC_CLOCKEVENTS=y 19CONFIG_GENERIC_CLOCKEVENTS=y
@@ -26,7 +27,9 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
26# CONFIG_ARCH_HAS_ILOG2_U64 is not set 27# CONFIG_ARCH_HAS_ILOG2_U64 is not set
27CONFIG_ARCH_NO_VIRT_TO_BUS=y 28CONFIG_ARCH_NO_VIRT_TO_BUS=y
28CONFIG_ARCH_HAS_DEFAULT_IDLE=y 29CONFIG_ARCH_HAS_DEFAULT_IDLE=y
30CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
29CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 31CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
32CONFIG_CONSTRUCTORS=y
30 33
31# 34#
32# General setup 35# General setup
@@ -36,17 +39,24 @@ CONFIG_BROKEN_ON_SMP=y
36CONFIG_INIT_ENV_ARG_LIMIT=32 39CONFIG_INIT_ENV_ARG_LIMIT=32
37CONFIG_LOCALVERSION="" 40CONFIG_LOCALVERSION=""
38# CONFIG_LOCALVERSION_AUTO is not set 41# CONFIG_LOCALVERSION_AUTO is not set
42CONFIG_HAVE_KERNEL_GZIP=y
43CONFIG_HAVE_KERNEL_BZIP2=y
44CONFIG_HAVE_KERNEL_LZMA=y
45CONFIG_KERNEL_GZIP=y
46# CONFIG_KERNEL_BZIP2 is not set
47# CONFIG_KERNEL_LZMA is not set
39# CONFIG_SYSVIPC is not set 48# CONFIG_SYSVIPC is not set
40# CONFIG_BSD_PROCESS_ACCT is not set 49# CONFIG_BSD_PROCESS_ACCT is not set
41 50
42# 51#
43# RCU Subsystem 52# RCU Subsystem
44# 53#
45CONFIG_CLASSIC_RCU=y 54CONFIG_TREE_RCU=y
46# CONFIG_TREE_RCU is not set 55# CONFIG_TREE_PREEMPT_RCU is not set
47# CONFIG_PREEMPT_RCU is not set 56# CONFIG_RCU_TRACE is not set
57CONFIG_RCU_FANOUT=32
58# CONFIG_RCU_FANOUT_EXACT is not set
48# CONFIG_TREE_RCU_TRACE is not set 59# CONFIG_TREE_RCU_TRACE is not set
49# CONFIG_PREEMPT_RCU_TRACE is not set
50# CONFIG_IKCONFIG is not set 60# CONFIG_IKCONFIG is not set
51CONFIG_LOG_BUF_SHIFT=17 61CONFIG_LOG_BUF_SHIFT=17
52# CONFIG_CGROUPS is not set 62# CONFIG_CGROUPS is not set
@@ -70,18 +80,19 @@ CONFIG_EMBEDDED=y
70# CONFIG_EVENTFD is not set 80# CONFIG_EVENTFD is not set
71CONFIG_SHMEM=y 81CONFIG_SHMEM=y
72# CONFIG_AIO is not set 82# CONFIG_AIO is not set
83CONFIG_HAVE_PERF_EVENTS=y
73 84
74# 85#
75# Performance Counters 86# Kernel Performance Events And Counters
76# 87#
88# CONFIG_PERF_EVENTS is not set
89# CONFIG_PERF_COUNTERS is not set
77# CONFIG_VM_EVENT_COUNTERS is not set 90# CONFIG_VM_EVENT_COUNTERS is not set
78# CONFIG_STRIP_ASM_SYMS is not set
79# CONFIG_COMPAT_BRK is not set 91# CONFIG_COMPAT_BRK is not set
80# CONFIG_SLAB is not set 92# CONFIG_SLAB is not set
81CONFIG_SLUB=y 93CONFIG_SLUB=y
82# CONFIG_SLOB is not set 94# CONFIG_SLOB is not set
83# CONFIG_PROFILING is not set 95# CONFIG_PROFILING is not set
84# CONFIG_MARKERS is not set
85CONFIG_HAVE_OPROFILE=y 96CONFIG_HAVE_OPROFILE=y
86CONFIG_HAVE_IOREMAP_PROT=y 97CONFIG_HAVE_IOREMAP_PROT=y
87CONFIG_HAVE_KPROBES=y 98CONFIG_HAVE_KPROBES=y
@@ -89,6 +100,10 @@ CONFIG_HAVE_KRETPROBES=y
89CONFIG_HAVE_ARCH_TRACEHOOK=y 100CONFIG_HAVE_ARCH_TRACEHOOK=y
90CONFIG_HAVE_CLK=y 101CONFIG_HAVE_CLK=y
91CONFIG_HAVE_DMA_API_DEBUG=y 102CONFIG_HAVE_DMA_API_DEBUG=y
103
104#
105# GCOV-based kernel profiling
106#
92# CONFIG_SLOW_WORK is not set 107# CONFIG_SLOW_WORK is not set
93CONFIG_HAVE_GENERIC_DMA_COHERENT=y 108CONFIG_HAVE_GENERIC_DMA_COHERENT=y
94CONFIG_BASE_SMALL=1 109CONFIG_BASE_SMALL=1
@@ -125,6 +140,7 @@ CONFIG_CPU_SUBTYPE_SH7705=y
125# CONFIG_CPU_SUBTYPE_SH4_202 is not set 140# CONFIG_CPU_SUBTYPE_SH4_202 is not set
126# CONFIG_CPU_SUBTYPE_SH7723 is not set 141# CONFIG_CPU_SUBTYPE_SH7723 is not set
127# CONFIG_CPU_SUBTYPE_SH7724 is not set 142# CONFIG_CPU_SUBTYPE_SH7724 is not set
143# CONFIG_CPU_SUBTYPE_SH7757 is not set
128# CONFIG_CPU_SUBTYPE_SH7763 is not set 144# CONFIG_CPU_SUBTYPE_SH7763 is not set
129# CONFIG_CPU_SUBTYPE_SH7770 is not set 145# CONFIG_CPU_SUBTYPE_SH7770 is not set
130# CONFIG_CPU_SUBTYPE_SH7780 is not set 146# CONFIG_CPU_SUBTYPE_SH7780 is not set
@@ -165,7 +181,6 @@ CONFIG_SPARSEMEM_MANUAL=y
165CONFIG_SPARSEMEM=y 181CONFIG_SPARSEMEM=y
166CONFIG_HAVE_MEMORY_PRESENT=y 182CONFIG_HAVE_MEMORY_PRESENT=y
167CONFIG_SPARSEMEM_STATIC=y 183CONFIG_SPARSEMEM_STATIC=y
168CONFIG_PAGEFLAGS_EXTENDED=y
169CONFIG_SPLIT_PTLOCK_CPUS=4 184CONFIG_SPLIT_PTLOCK_CPUS=4
170CONFIG_MIGRATION=y 185CONFIG_MIGRATION=y
171# CONFIG_PHYS_ADDR_T_64BIT is not set 186# CONFIG_PHYS_ADDR_T_64BIT is not set
@@ -173,6 +188,7 @@ CONFIG_ZONE_DMA_FLAG=0
173CONFIG_NR_QUICK=2 188CONFIG_NR_QUICK=2
174CONFIG_HAVE_MLOCK=y 189CONFIG_HAVE_MLOCK=y
175CONFIG_HAVE_MLOCKED_PAGE_BIT=y 190CONFIG_HAVE_MLOCKED_PAGE_BIT=y
191# CONFIG_KSM is not set
176CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 192CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
177 193
178# 194#
@@ -250,7 +266,8 @@ CONFIG_GUSA=y
250CONFIG_ZERO_PAGE_OFFSET=0x00001000 266CONFIG_ZERO_PAGE_OFFSET=0x00001000
251CONFIG_BOOT_LINK_OFFSET=0x00800000 267CONFIG_BOOT_LINK_OFFSET=0x00800000
252CONFIG_ENTRY_OFFSET=0x00001000 268CONFIG_ENTRY_OFFSET=0x00001000
253# CONFIG_CMDLINE_BOOL is not set 269# CONFIG_CMDLINE_OVERWRITE is not set
270# CONFIG_CMDLINE_EXTEND is not set
254 271
255# 272#
256# Bus options 273# Bus options
@@ -321,11 +338,14 @@ CONFIG_HAVE_IDE=y
321# CONFIG_R3964 is not set 338# CONFIG_R3964 is not set
322# CONFIG_I2C is not set 339# CONFIG_I2C is not set
323# CONFIG_SPI is not set 340# CONFIG_SPI is not set
341
342#
343# PPS support
344#
324# CONFIG_W1 is not set 345# CONFIG_W1 is not set
325# CONFIG_POWER_SUPPLY is not set 346# CONFIG_POWER_SUPPLY is not set
326# CONFIG_HWMON is not set 347# CONFIG_HWMON is not set
327# CONFIG_THERMAL is not set 348# CONFIG_THERMAL is not set
328# CONFIG_THERMAL_HWMON is not set
329# CONFIG_WATCHDOG is not set 349# CONFIG_WATCHDOG is not set
330CONFIG_SSB_POSSIBLE=y 350CONFIG_SSB_POSSIBLE=y
331 351
@@ -409,6 +429,7 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y
409# CONFIG_ENABLE_MUST_CHECK is not set 429# CONFIG_ENABLE_MUST_CHECK is not set
410CONFIG_FRAME_WARN=1024 430CONFIG_FRAME_WARN=1024
411# CONFIG_MAGIC_SYSRQ is not set 431# CONFIG_MAGIC_SYSRQ is not set
432# CONFIG_STRIP_ASM_SYMS is not set
412# CONFIG_UNUSED_SYMBOLS is not set 433# CONFIG_UNUSED_SYMBOLS is not set
413# CONFIG_HEADERS_CHECK is not set 434# CONFIG_HEADERS_CHECK is not set
414# CONFIG_DEBUG_KERNEL is not set 435# CONFIG_DEBUG_KERNEL is not set
@@ -416,8 +437,11 @@ CONFIG_FRAME_WARN=1024
416# CONFIG_RCU_CPU_STALL_DETECTOR is not set 437# CONFIG_RCU_CPU_STALL_DETECTOR is not set
417# CONFIG_LATENCYTOP is not set 438# CONFIG_LATENCYTOP is not set
418CONFIG_HAVE_FUNCTION_TRACER=y 439CONFIG_HAVE_FUNCTION_TRACER=y
440CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
441CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
419CONFIG_HAVE_DYNAMIC_FTRACE=y 442CONFIG_HAVE_DYNAMIC_FTRACE=y
420CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 443CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
444CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
421CONFIG_TRACING_SUPPORT=y 445CONFIG_TRACING_SUPPORT=y
422# CONFIG_FTRACE is not set 446# CONFIG_FTRACE is not set
423# CONFIG_DMA_API_DEBUG is not set 447# CONFIG_DMA_API_DEBUG is not set
@@ -425,6 +449,7 @@ CONFIG_TRACING_SUPPORT=y
425CONFIG_HAVE_ARCH_KGDB=y 449CONFIG_HAVE_ARCH_KGDB=y
426# CONFIG_SH_STANDARD_BIOS is not set 450# CONFIG_SH_STANDARD_BIOS is not set
427# CONFIG_EARLY_SCIF_CONSOLE is not set 451# CONFIG_EARLY_SCIF_CONSOLE is not set
452# CONFIG_DWARF_UNWINDER is not set
428 453
429# 454#
430# Security options 455# Security options
@@ -449,4 +474,5 @@ CONFIG_GENERIC_FIND_LAST_BIT=y
449CONFIG_HAS_IOMEM=y 474CONFIG_HAS_IOMEM=y
450CONFIG_HAS_IOPORT=y 475CONFIG_HAS_IOPORT=y
451CONFIG_HAS_DMA=y 476CONFIG_HAS_DMA=y
477CONFIG_HAVE_LMB=y
452CONFIG_GENERIC_ATOMIC64=y 478CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/edosk7760_defconfig b/arch/sh/configs/edosk7760_defconfig
index 77684ed91270..4c0f82b7def2 100644
--- a/arch/sh/configs/edosk7760_defconfig
+++ b/arch/sh/configs/edosk7760_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.30 3# Linux kernel version: 2.6.31
4# Thu Jun 18 12:25:55 2009 4# Thu Sep 24 17:57:30 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -14,6 +14,7 @@ CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y 14CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
16CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_IRQ_PER_CPU=y
17# CONFIG_GENERIC_GPIO is not set 18# CONFIG_GENERIC_GPIO is not set
18CONFIG_GENERIC_TIME=y 19CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 20CONFIG_GENERIC_CLOCKEVENTS=y
@@ -27,7 +28,9 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
27# CONFIG_ARCH_HAS_ILOG2_U64 is not set 28# CONFIG_ARCH_HAS_ILOG2_U64 is not set
28CONFIG_ARCH_NO_VIRT_TO_BUS=y 29CONFIG_ARCH_NO_VIRT_TO_BUS=y
29CONFIG_ARCH_HAS_DEFAULT_IDLE=y 30CONFIG_ARCH_HAS_DEFAULT_IDLE=y
31CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
30CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 32CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
33CONFIG_CONSTRUCTORS=y
31 34
32# 35#
33# General setup 36# General setup
@@ -38,6 +41,12 @@ CONFIG_LOCK_KERNEL=y
38CONFIG_INIT_ENV_ARG_LIMIT=32 41CONFIG_INIT_ENV_ARG_LIMIT=32
39CONFIG_LOCALVERSION="_edosk7760" 42CONFIG_LOCALVERSION="_edosk7760"
40CONFIG_LOCALVERSION_AUTO=y 43CONFIG_LOCALVERSION_AUTO=y
44CONFIG_HAVE_KERNEL_GZIP=y
45CONFIG_HAVE_KERNEL_BZIP2=y
46CONFIG_HAVE_KERNEL_LZMA=y
47CONFIG_KERNEL_GZIP=y
48# CONFIG_KERNEL_BZIP2 is not set
49# CONFIG_KERNEL_LZMA is not set
41CONFIG_SWAP=y 50CONFIG_SWAP=y
42CONFIG_SYSVIPC=y 51CONFIG_SYSVIPC=y
43CONFIG_SYSVIPC_SYSCTL=y 52CONFIG_SYSVIPC_SYSCTL=y
@@ -51,11 +60,12 @@ CONFIG_BSD_PROCESS_ACCT=y
51# 60#
52# RCU Subsystem 61# RCU Subsystem
53# 62#
54CONFIG_CLASSIC_RCU=y 63CONFIG_TREE_RCU=y
55# CONFIG_TREE_RCU is not set 64# CONFIG_TREE_PREEMPT_RCU is not set
56# CONFIG_PREEMPT_RCU is not set 65# CONFIG_RCU_TRACE is not set
66CONFIG_RCU_FANOUT=32
67# CONFIG_RCU_FANOUT_EXACT is not set
57# CONFIG_TREE_RCU_TRACE is not set 68# CONFIG_TREE_RCU_TRACE is not set
58# CONFIG_PREEMPT_RCU_TRACE is not set
59CONFIG_IKCONFIG=y 69CONFIG_IKCONFIG=y
60CONFIG_IKCONFIG_PROC=y 70CONFIG_IKCONFIG_PROC=y
61CONFIG_LOG_BUF_SHIFT=17 71CONFIG_LOG_BUF_SHIFT=17
@@ -91,19 +101,20 @@ CONFIG_TIMERFD=y
91CONFIG_EVENTFD=y 101CONFIG_EVENTFD=y
92CONFIG_SHMEM=y 102CONFIG_SHMEM=y
93CONFIG_AIO=y 103CONFIG_AIO=y
104CONFIG_HAVE_PERF_EVENTS=y
94 105
95# 106#
96# Performance Counters 107# Kernel Performance Events And Counters
97# 108#
109# CONFIG_PERF_EVENTS is not set
110# CONFIG_PERF_COUNTERS is not set
98CONFIG_VM_EVENT_COUNTERS=y 111CONFIG_VM_EVENT_COUNTERS=y
99CONFIG_SLUB_DEBUG=y 112CONFIG_SLUB_DEBUG=y
100# CONFIG_STRIP_ASM_SYMS is not set
101CONFIG_COMPAT_BRK=y 113CONFIG_COMPAT_BRK=y
102# CONFIG_SLAB is not set 114# CONFIG_SLAB is not set
103CONFIG_SLUB=y 115CONFIG_SLUB=y
104# CONFIG_SLOB is not set 116# CONFIG_SLOB is not set
105# CONFIG_PROFILING is not set 117# CONFIG_PROFILING is not set
106# CONFIG_MARKERS is not set
107CONFIG_HAVE_OPROFILE=y 118CONFIG_HAVE_OPROFILE=y
108# CONFIG_KPROBES is not set 119# CONFIG_KPROBES is not set
109CONFIG_HAVE_IOREMAP_PROT=y 120CONFIG_HAVE_IOREMAP_PROT=y
@@ -112,6 +123,10 @@ CONFIG_HAVE_KRETPROBES=y
112CONFIG_HAVE_ARCH_TRACEHOOK=y 123CONFIG_HAVE_ARCH_TRACEHOOK=y
113CONFIG_HAVE_CLK=y 124CONFIG_HAVE_CLK=y
114CONFIG_HAVE_DMA_API_DEBUG=y 125CONFIG_HAVE_DMA_API_DEBUG=y
126
127#
128# GCOV-based kernel profiling
129#
115# CONFIG_SLOW_WORK is not set 130# CONFIG_SLOW_WORK is not set
116CONFIG_HAVE_GENERIC_DMA_COHERENT=y 131CONFIG_HAVE_GENERIC_DMA_COHERENT=y
117CONFIG_SLABINFO=y 132CONFIG_SLABINFO=y
@@ -124,7 +139,7 @@ CONFIG_MODULE_FORCE_UNLOAD=y
124# CONFIG_MODVERSIONS is not set 139# CONFIG_MODVERSIONS is not set
125# CONFIG_MODULE_SRCVERSION_ALL is not set 140# CONFIG_MODULE_SRCVERSION_ALL is not set
126CONFIG_BLOCK=y 141CONFIG_BLOCK=y
127# CONFIG_LBD is not set 142CONFIG_LBDAF=y
128# CONFIG_BLK_DEV_BSG is not set 143# CONFIG_BLK_DEV_BSG is not set
129# CONFIG_BLK_DEV_INTEGRITY is not set 144# CONFIG_BLK_DEV_INTEGRITY is not set
130 145
@@ -171,6 +186,7 @@ CONFIG_CPU_SUBTYPE_SH7760=y
171# CONFIG_CPU_SUBTYPE_SH4_202 is not set 186# CONFIG_CPU_SUBTYPE_SH4_202 is not set
172# CONFIG_CPU_SUBTYPE_SH7723 is not set 187# CONFIG_CPU_SUBTYPE_SH7723 is not set
173# CONFIG_CPU_SUBTYPE_SH7724 is not set 188# CONFIG_CPU_SUBTYPE_SH7724 is not set
189# CONFIG_CPU_SUBTYPE_SH7757 is not set
174# CONFIG_CPU_SUBTYPE_SH7763 is not set 190# CONFIG_CPU_SUBTYPE_SH7763 is not set
175# CONFIG_CPU_SUBTYPE_SH7770 is not set 191# CONFIG_CPU_SUBTYPE_SH7770 is not set
176# CONFIG_CPU_SUBTYPE_SH7780 is not set 192# CONFIG_CPU_SUBTYPE_SH7780 is not set
@@ -216,6 +232,7 @@ CONFIG_ZONE_DMA_FLAG=0
216CONFIG_NR_QUICK=2 232CONFIG_NR_QUICK=2
217CONFIG_HAVE_MLOCK=y 233CONFIG_HAVE_MLOCK=y
218CONFIG_HAVE_MLOCKED_PAGE_BIT=y 234CONFIG_HAVE_MLOCKED_PAGE_BIT=y
235# CONFIG_KSM is not set
219CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 236CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
220 237
221# 238#
@@ -304,7 +321,8 @@ CONFIG_ZERO_PAGE_OFFSET=0x00001000
304CONFIG_BOOT_LINK_OFFSET=0x02000000 321CONFIG_BOOT_LINK_OFFSET=0x02000000
305CONFIG_ENTRY_OFFSET=0x00001000 322CONFIG_ENTRY_OFFSET=0x00001000
306# CONFIG_UBC_WAKEUP is not set 323# CONFIG_UBC_WAKEUP is not set
307CONFIG_CMDLINE_BOOL=y 324CONFIG_CMDLINE_OVERWRITE=y
325# CONFIG_CMDLINE_EXTEND is not set
308CONFIG_CMDLINE="mem=64M console=ttySC2,115200 root=/dev/nfs rw nfsroot=192.168.0.3:/scripts/filesys ip=192.168.0.4" 326CONFIG_CMDLINE="mem=64M console=ttySC2,115200 root=/dev/nfs rw nfsroot=192.168.0.3:/scripts/filesys ip=192.168.0.4"
309 327
310# 328#
@@ -367,6 +385,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
367# CONFIG_NETFILTER is not set 385# CONFIG_NETFILTER is not set
368# CONFIG_IP_DCCP is not set 386# CONFIG_IP_DCCP is not set
369# CONFIG_IP_SCTP is not set 387# CONFIG_IP_SCTP is not set
388# CONFIG_RDS is not set
370# CONFIG_TIPC is not set 389# CONFIG_TIPC is not set
371# CONFIG_ATM is not set 390# CONFIG_ATM is not set
372# CONFIG_BRIDGE is not set 391# CONFIG_BRIDGE is not set
@@ -396,6 +415,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
396# CONFIG_AF_RXRPC is not set 415# CONFIG_AF_RXRPC is not set
397CONFIG_WIRELESS=y 416CONFIG_WIRELESS=y
398# CONFIG_CFG80211 is not set 417# CONFIG_CFG80211 is not set
418CONFIG_CFG80211_DEFAULT_PS_VALUE=0
399# CONFIG_WIRELESS_OLD_REGULATORY is not set 419# CONFIG_WIRELESS_OLD_REGULATORY is not set
400# CONFIG_WIRELESS_EXT is not set 420# CONFIG_WIRELESS_EXT is not set
401# CONFIG_LIB80211 is not set 421# CONFIG_LIB80211 is not set
@@ -403,7 +423,6 @@ CONFIG_WIRELESS=y
403# 423#
404# CFG80211 needs to be enabled for MAC80211 424# CFG80211 needs to be enabled for MAC80211
405# 425#
406CONFIG_MAC80211_DEFAULT_PS_VALUE=0
407# CONFIG_WIMAX is not set 426# CONFIG_WIMAX is not set
408# CONFIG_RFKILL is not set 427# CONFIG_RFKILL is not set
409# CONFIG_NET_9P is not set 428# CONFIG_NET_9P is not set
@@ -416,6 +435,7 @@ CONFIG_MAC80211_DEFAULT_PS_VALUE=0
416# Generic Driver Options 435# Generic Driver Options
417# 436#
418CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 437CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
438# CONFIG_DEVTMPFS is not set
419CONFIG_STANDALONE=y 439CONFIG_STANDALONE=y
420CONFIG_PREVENT_FIRMWARE_BUILD=y 440CONFIG_PREVENT_FIRMWARE_BUILD=y
421# CONFIG_FW_LOADER is not set 441# CONFIG_FW_LOADER is not set
@@ -426,9 +446,9 @@ CONFIG_DEBUG_DEVRES=y
426CONFIG_MTD=y 446CONFIG_MTD=y
427CONFIG_MTD_DEBUG=y 447CONFIG_MTD_DEBUG=y
428CONFIG_MTD_DEBUG_VERBOSE=0 448CONFIG_MTD_DEBUG_VERBOSE=0
449# CONFIG_MTD_TESTS is not set
429CONFIG_MTD_CONCAT=y 450CONFIG_MTD_CONCAT=y
430CONFIG_MTD_PARTITIONS=y 451CONFIG_MTD_PARTITIONS=y
431# CONFIG_MTD_TESTS is not set
432# CONFIG_MTD_REDBOOT_PARTS is not set 452# CONFIG_MTD_REDBOOT_PARTS is not set
433CONFIG_MTD_CMDLINE_PARTS=y 453CONFIG_MTD_CMDLINE_PARTS=y
434# CONFIG_MTD_AR7_PARTS is not set 454# CONFIG_MTD_AR7_PARTS is not set
@@ -563,10 +583,7 @@ CONFIG_SMC91X=y
563# CONFIG_KS8842 is not set 583# CONFIG_KS8842 is not set
564# CONFIG_NETDEV_1000 is not set 584# CONFIG_NETDEV_1000 is not set
565# CONFIG_NETDEV_10000 is not set 585# CONFIG_NETDEV_10000 is not set
566 586CONFIG_WLAN=y
567#
568# Wireless LAN
569#
570# CONFIG_WLAN_PRE80211 is not set 587# CONFIG_WLAN_PRE80211 is not set
571# CONFIG_WLAN_80211 is not set 588# CONFIG_WLAN_80211 is not set
572 589
@@ -649,6 +666,7 @@ CONFIG_HW_RANDOM=y
649# CONFIG_TCG_TPM is not set 666# CONFIG_TCG_TPM is not set
650CONFIG_I2C=y 667CONFIG_I2C=y
651CONFIG_I2C_BOARDINFO=y 668CONFIG_I2C_BOARDINFO=y
669CONFIG_I2C_COMPAT=y
652CONFIG_I2C_CHARDEV=y 670CONFIG_I2C_CHARDEV=y
653CONFIG_I2C_HELPER_AUTO=y 671CONFIG_I2C_HELPER_AUTO=y
654 672
@@ -659,6 +677,7 @@ CONFIG_I2C_HELPER_AUTO=y
659# 677#
660# I2C system bus drivers (mostly embedded / system-on-chip) 678# I2C system bus drivers (mostly embedded / system-on-chip)
661# 679#
680# CONFIG_I2C_DESIGNWARE is not set
662# CONFIG_I2C_OCORES is not set 681# CONFIG_I2C_OCORES is not set
663CONFIG_I2C_SH7760=y 682CONFIG_I2C_SH7760=y
664# CONFIG_I2C_SH_MOBILE is not set 683# CONFIG_I2C_SH_MOBILE is not set
@@ -680,20 +699,21 @@ CONFIG_I2C_SH7760=y
680# Miscellaneous I2C Chip support 699# Miscellaneous I2C Chip support
681# 700#
682# CONFIG_DS1682 is not set 701# CONFIG_DS1682 is not set
683# CONFIG_SENSORS_PCF8574 is not set
684# CONFIG_PCF8575 is not set
685# CONFIG_SENSORS_PCA9539 is not set
686# CONFIG_SENSORS_TSL2550 is not set 702# CONFIG_SENSORS_TSL2550 is not set
687CONFIG_I2C_DEBUG_CORE=y 703CONFIG_I2C_DEBUG_CORE=y
688CONFIG_I2C_DEBUG_ALGO=y 704CONFIG_I2C_DEBUG_ALGO=y
689CONFIG_I2C_DEBUG_BUS=y 705CONFIG_I2C_DEBUG_BUS=y
690CONFIG_I2C_DEBUG_CHIP=y 706CONFIG_I2C_DEBUG_CHIP=y
691# CONFIG_SPI is not set 707# CONFIG_SPI is not set
708
709#
710# PPS support
711#
712# CONFIG_PPS is not set
692# CONFIG_W1 is not set 713# CONFIG_W1 is not set
693# CONFIG_POWER_SUPPLY is not set 714# CONFIG_POWER_SUPPLY is not set
694# CONFIG_HWMON is not set 715# CONFIG_HWMON is not set
695# CONFIG_THERMAL is not set 716# CONFIG_THERMAL is not set
696# CONFIG_THERMAL_HWMON is not set
697# CONFIG_WATCHDOG is not set 717# CONFIG_WATCHDOG is not set
698CONFIG_SSB_POSSIBLE=y 718CONFIG_SSB_POSSIBLE=y
699 719
@@ -712,8 +732,10 @@ CONFIG_SSB_POSSIBLE=y
712# CONFIG_MFD_TMIO is not set 732# CONFIG_MFD_TMIO is not set
713# CONFIG_PMIC_DA903X is not set 733# CONFIG_PMIC_DA903X is not set
714# CONFIG_MFD_WM8400 is not set 734# CONFIG_MFD_WM8400 is not set
735# CONFIG_MFD_WM831X is not set
715# CONFIG_MFD_WM8350_I2C is not set 736# CONFIG_MFD_WM8350_I2C is not set
716# CONFIG_MFD_PCF50633 is not set 737# CONFIG_MFD_PCF50633 is not set
738# CONFIG_AB3100_CORE is not set
717# CONFIG_REGULATOR is not set 739# CONFIG_REGULATOR is not set
718# CONFIG_MEDIA_SUPPORT is not set 740# CONFIG_MEDIA_SUPPORT is not set
719 741
@@ -837,8 +859,10 @@ CONFIG_FS_MBCACHE=y
837# CONFIG_JFS_FS is not set 859# CONFIG_JFS_FS is not set
838CONFIG_FS_POSIX_ACL=y 860CONFIG_FS_POSIX_ACL=y
839# CONFIG_XFS_FS is not set 861# CONFIG_XFS_FS is not set
862# CONFIG_GFS2_FS is not set
840# CONFIG_OCFS2_FS is not set 863# CONFIG_OCFS2_FS is not set
841# CONFIG_BTRFS_FS is not set 864# CONFIG_BTRFS_FS is not set
865# CONFIG_NILFS2_FS is not set
842CONFIG_FILE_LOCKING=y 866CONFIG_FILE_LOCKING=y
843CONFIG_FSNOTIFY=y 867CONFIG_FSNOTIFY=y
844CONFIG_DNOTIFY=y 868CONFIG_DNOTIFY=y
@@ -900,7 +924,6 @@ CONFIG_MISC_FILESYSTEMS=y
900# CONFIG_ROMFS_FS is not set 924# CONFIG_ROMFS_FS is not set
901# CONFIG_SYSV_FS is not set 925# CONFIG_SYSV_FS is not set
902# CONFIG_UFS_FS is not set 926# CONFIG_UFS_FS is not set
903# CONFIG_NILFS2_FS is not set
904CONFIG_NETWORK_FILESYSTEMS=y 927CONFIG_NETWORK_FILESYSTEMS=y
905CONFIG_NFS_FS=y 928CONFIG_NFS_FS=y
906# CONFIG_NFS_V3 is not set 929# CONFIG_NFS_V3 is not set
@@ -974,6 +997,7 @@ CONFIG_ENABLE_WARN_DEPRECATED=y
974# CONFIG_ENABLE_MUST_CHECK is not set 997# CONFIG_ENABLE_MUST_CHECK is not set
975CONFIG_FRAME_WARN=1024 998CONFIG_FRAME_WARN=1024
976CONFIG_MAGIC_SYSRQ=y 999CONFIG_MAGIC_SYSRQ=y
1000# CONFIG_STRIP_ASM_SYMS is not set
977CONFIG_UNUSED_SYMBOLS=y 1001CONFIG_UNUSED_SYMBOLS=y
978# CONFIG_DEBUG_FS is not set 1002# CONFIG_DEBUG_FS is not set
979# CONFIG_HEADERS_CHECK is not set 1003# CONFIG_HEADERS_CHECK is not set
@@ -1010,18 +1034,23 @@ CONFIG_DEBUG_INFO=y
1010# CONFIG_DEBUG_LIST is not set 1034# CONFIG_DEBUG_LIST is not set
1011# CONFIG_DEBUG_SG is not set 1035# CONFIG_DEBUG_SG is not set
1012# CONFIG_DEBUG_NOTIFIERS is not set 1036# CONFIG_DEBUG_NOTIFIERS is not set
1037# CONFIG_DEBUG_CREDENTIALS is not set
1013# CONFIG_FRAME_POINTER is not set 1038# CONFIG_FRAME_POINTER is not set
1014# CONFIG_RCU_TORTURE_TEST is not set 1039# CONFIG_RCU_TORTURE_TEST is not set
1015# CONFIG_RCU_CPU_STALL_DETECTOR is not set 1040# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1016# CONFIG_BACKTRACE_SELF_TEST is not set 1041# CONFIG_BACKTRACE_SELF_TEST is not set
1017# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set 1042# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
1043# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
1018# CONFIG_FAULT_INJECTION is not set 1044# CONFIG_FAULT_INJECTION is not set
1019# CONFIG_LATENCYTOP is not set 1045# CONFIG_LATENCYTOP is not set
1020CONFIG_SYSCTL_SYSCALL_CHECK=y 1046CONFIG_SYSCTL_SYSCALL_CHECK=y
1021# CONFIG_PAGE_POISONING is not set 1047# CONFIG_PAGE_POISONING is not set
1022CONFIG_HAVE_FUNCTION_TRACER=y 1048CONFIG_HAVE_FUNCTION_TRACER=y
1049CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1050CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
1023CONFIG_HAVE_DYNAMIC_FTRACE=y 1051CONFIG_HAVE_DYNAMIC_FTRACE=y
1024CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1052CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1053CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
1025CONFIG_TRACING_SUPPORT=y 1054CONFIG_TRACING_SUPPORT=y
1026CONFIG_FTRACE=y 1055CONFIG_FTRACE=y
1027# CONFIG_FUNCTION_TRACER is not set 1056# CONFIG_FUNCTION_TRACER is not set
@@ -1029,6 +1058,7 @@ CONFIG_FTRACE=y
1029# CONFIG_PREEMPT_TRACER is not set 1058# CONFIG_PREEMPT_TRACER is not set
1030# CONFIG_SCHED_TRACER is not set 1059# CONFIG_SCHED_TRACER is not set
1031# CONFIG_ENABLE_DEFAULT_TRACERS is not set 1060# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1061# CONFIG_FTRACE_SYSCALLS is not set
1032# CONFIG_BOOT_TRACER is not set 1062# CONFIG_BOOT_TRACER is not set
1033CONFIG_BRANCH_PROFILE_NONE=y 1063CONFIG_BRANCH_PROFILE_NONE=y
1034# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set 1064# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
@@ -1045,11 +1075,11 @@ CONFIG_HAVE_ARCH_KGDB=y
1045CONFIG_EARLY_SCIF_CONSOLE=y 1075CONFIG_EARLY_SCIF_CONSOLE=y
1046CONFIG_EARLY_SCIF_CONSOLE_PORT=0xffe80000 1076CONFIG_EARLY_SCIF_CONSOLE_PORT=0xffe80000
1047CONFIG_EARLY_PRINTK=y 1077CONFIG_EARLY_PRINTK=y
1048# CONFIG_DEBUG_BOOTMEM is not set 1078# CONFIG_STACK_DEBUG is not set
1049CONFIG_DEBUG_STACKOVERFLOW=y
1050# CONFIG_DEBUG_STACK_USAGE is not set 1079# CONFIG_DEBUG_STACK_USAGE is not set
1051# CONFIG_4KSTACKS is not set 1080# CONFIG_4KSTACKS is not set
1052CONFIG_DUMP_CODE=y 1081CONFIG_DUMP_CODE=y
1082# CONFIG_DWARF_UNWINDER is not set
1053# CONFIG_SH_NO_BSS_INIT is not set 1083# CONFIG_SH_NO_BSS_INIT is not set
1054 1084
1055# 1085#
@@ -1064,7 +1094,6 @@ CONFIG_CRYPTO=y
1064# 1094#
1065# Crypto core or helper 1095# Crypto core or helper
1066# 1096#
1067# CONFIG_CRYPTO_FIPS is not set
1068CONFIG_CRYPTO_ALGAPI=y 1097CONFIG_CRYPTO_ALGAPI=y
1069CONFIG_CRYPTO_ALGAPI2=y 1098CONFIG_CRYPTO_ALGAPI2=y
1070CONFIG_CRYPTO_HASH=y 1099CONFIG_CRYPTO_HASH=y
@@ -1100,11 +1129,13 @@ CONFIG_CRYPTO_HASH2=y
1100# 1129#
1101# CONFIG_CRYPTO_HMAC is not set 1130# CONFIG_CRYPTO_HMAC is not set
1102# CONFIG_CRYPTO_XCBC is not set 1131# CONFIG_CRYPTO_XCBC is not set
1132# CONFIG_CRYPTO_VMAC is not set
1103 1133
1104# 1134#
1105# Digest 1135# Digest
1106# 1136#
1107# CONFIG_CRYPTO_CRC32C is not set 1137# CONFIG_CRYPTO_CRC32C is not set
1138# CONFIG_CRYPTO_GHASH is not set
1108# CONFIG_CRYPTO_MD4 is not set 1139# CONFIG_CRYPTO_MD4 is not set
1109CONFIG_CRYPTO_MD5=y 1140CONFIG_CRYPTO_MD5=y
1110# CONFIG_CRYPTO_MICHAEL_MIC is not set 1141# CONFIG_CRYPTO_MICHAEL_MIC is not set
@@ -1168,5 +1199,6 @@ CONFIG_DECOMPRESS_GZIP=y
1168CONFIG_HAS_IOMEM=y 1199CONFIG_HAS_IOMEM=y
1169CONFIG_HAS_IOPORT=y 1200CONFIG_HAS_IOPORT=y
1170CONFIG_HAS_DMA=y 1201CONFIG_HAS_DMA=y
1202CONFIG_HAVE_LMB=y
1171CONFIG_NLATTR=y 1203CONFIG_NLATTR=y
1172CONFIG_GENERIC_ATOMIC64=y 1204CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/espt_defconfig b/arch/sh/configs/espt_defconfig
index 881128eeab35..9b785517abcf 100644
--- a/arch/sh/configs/espt_defconfig
+++ b/arch/sh/configs/espt_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.30 3# Linux kernel version: 2.6.31
4# Thu Jun 18 12:27:21 2009 4# Thu Sep 24 17:58:18 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -14,6 +14,7 @@ CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y 14CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
16CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_IRQ_PER_CPU=y
17# CONFIG_GENERIC_GPIO is not set 18# CONFIG_GENERIC_GPIO is not set
18CONFIG_GENERIC_TIME=y 19CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 20CONFIG_GENERIC_CLOCKEVENTS=y
@@ -27,7 +28,9 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
27# CONFIG_ARCH_HAS_ILOG2_U64 is not set 28# CONFIG_ARCH_HAS_ILOG2_U64 is not set
28CONFIG_ARCH_NO_VIRT_TO_BUS=y 29CONFIG_ARCH_NO_VIRT_TO_BUS=y
29CONFIG_ARCH_HAS_DEFAULT_IDLE=y 30CONFIG_ARCH_HAS_DEFAULT_IDLE=y
31CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
30CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 32CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
33CONFIG_CONSTRUCTORS=y
31 34
32# 35#
33# General setup 36# General setup
@@ -37,6 +40,12 @@ CONFIG_BROKEN_ON_SMP=y
37CONFIG_INIT_ENV_ARG_LIMIT=32 40CONFIG_INIT_ENV_ARG_LIMIT=32
38CONFIG_LOCALVERSION="" 41CONFIG_LOCALVERSION=""
39CONFIG_LOCALVERSION_AUTO=y 42CONFIG_LOCALVERSION_AUTO=y
43CONFIG_HAVE_KERNEL_GZIP=y
44CONFIG_HAVE_KERNEL_BZIP2=y
45CONFIG_HAVE_KERNEL_LZMA=y
46CONFIG_KERNEL_GZIP=y
47# CONFIG_KERNEL_BZIP2 is not set
48# CONFIG_KERNEL_LZMA is not set
40CONFIG_SWAP=y 49CONFIG_SWAP=y
41CONFIG_SYSVIPC=y 50CONFIG_SYSVIPC=y
42CONFIG_SYSVIPC_SYSCTL=y 51CONFIG_SYSVIPC_SYSCTL=y
@@ -48,11 +57,12 @@ CONFIG_SYSVIPC_SYSCTL=y
48# 57#
49# RCU Subsystem 58# RCU Subsystem
50# 59#
51CONFIG_CLASSIC_RCU=y 60CONFIG_TREE_RCU=y
52# CONFIG_TREE_RCU is not set 61# CONFIG_TREE_PREEMPT_RCU is not set
53# CONFIG_PREEMPT_RCU is not set 62# CONFIG_RCU_TRACE is not set
63CONFIG_RCU_FANOUT=32
64# CONFIG_RCU_FANOUT_EXACT is not set
54# CONFIG_TREE_RCU_TRACE is not set 65# CONFIG_TREE_RCU_TRACE is not set
55# CONFIG_PREEMPT_RCU_TRACE is not set
56CONFIG_IKCONFIG=y 66CONFIG_IKCONFIG=y
57CONFIG_IKCONFIG_PROC=y 67CONFIG_IKCONFIG_PROC=y
58CONFIG_LOG_BUF_SHIFT=14 68CONFIG_LOG_BUF_SHIFT=14
@@ -92,19 +102,21 @@ CONFIG_TIMERFD=y
92CONFIG_EVENTFD=y 102CONFIG_EVENTFD=y
93CONFIG_SHMEM=y 103CONFIG_SHMEM=y
94CONFIG_AIO=y 104CONFIG_AIO=y
105CONFIG_HAVE_PERF_EVENTS=y
95 106
96# 107#
97# Performance Counters 108# Kernel Performance Events And Counters
98# 109#
110CONFIG_PERF_EVENTS=y
111CONFIG_EVENT_PROFILE=y
112# CONFIG_PERF_COUNTERS is not set
99CONFIG_VM_EVENT_COUNTERS=y 113CONFIG_VM_EVENT_COUNTERS=y
100# CONFIG_STRIP_ASM_SYMS is not set
101CONFIG_COMPAT_BRK=y 114CONFIG_COMPAT_BRK=y
102CONFIG_SLAB=y 115CONFIG_SLAB=y
103# CONFIG_SLUB is not set 116# CONFIG_SLUB is not set
104# CONFIG_SLOB is not set 117# CONFIG_SLOB is not set
105CONFIG_PROFILING=y 118CONFIG_PROFILING=y
106CONFIG_TRACEPOINTS=y 119CONFIG_TRACEPOINTS=y
107CONFIG_MARKERS=y
108CONFIG_OPROFILE=y 120CONFIG_OPROFILE=y
109CONFIG_HAVE_OPROFILE=y 121CONFIG_HAVE_OPROFILE=y
110# CONFIG_KPROBES is not set 122# CONFIG_KPROBES is not set
@@ -114,6 +126,11 @@ CONFIG_HAVE_KRETPROBES=y
114CONFIG_HAVE_ARCH_TRACEHOOK=y 126CONFIG_HAVE_ARCH_TRACEHOOK=y
115CONFIG_HAVE_CLK=y 127CONFIG_HAVE_CLK=y
116CONFIG_HAVE_DMA_API_DEBUG=y 128CONFIG_HAVE_DMA_API_DEBUG=y
129
130#
131# GCOV-based kernel profiling
132#
133# CONFIG_GCOV_KERNEL is not set
117# CONFIG_SLOW_WORK is not set 134# CONFIG_SLOW_WORK is not set
118CONFIG_HAVE_GENERIC_DMA_COHERENT=y 135CONFIG_HAVE_GENERIC_DMA_COHERENT=y
119CONFIG_SLABINFO=y 136CONFIG_SLABINFO=y
@@ -125,7 +142,7 @@ CONFIG_MODULES=y
125# CONFIG_MODVERSIONS is not set 142# CONFIG_MODVERSIONS is not set
126# CONFIG_MODULE_SRCVERSION_ALL is not set 143# CONFIG_MODULE_SRCVERSION_ALL is not set
127CONFIG_BLOCK=y 144CONFIG_BLOCK=y
128# CONFIG_LBD is not set 145CONFIG_LBDAF=y
129# CONFIG_BLK_DEV_BSG is not set 146# CONFIG_BLK_DEV_BSG is not set
130# CONFIG_BLK_DEV_INTEGRITY is not set 147# CONFIG_BLK_DEV_INTEGRITY is not set
131 148
@@ -173,6 +190,7 @@ CONFIG_CPU_SH4A=y
173# CONFIG_CPU_SUBTYPE_SH4_202 is not set 190# CONFIG_CPU_SUBTYPE_SH4_202 is not set
174# CONFIG_CPU_SUBTYPE_SH7723 is not set 191# CONFIG_CPU_SUBTYPE_SH7723 is not set
175# CONFIG_CPU_SUBTYPE_SH7724 is not set 192# CONFIG_CPU_SUBTYPE_SH7724 is not set
193# CONFIG_CPU_SUBTYPE_SH7757 is not set
176CONFIG_CPU_SUBTYPE_SH7763=y 194CONFIG_CPU_SUBTYPE_SH7763=y
177# CONFIG_CPU_SUBTYPE_SH7770 is not set 195# CONFIG_CPU_SUBTYPE_SH7770 is not set
178# CONFIG_CPU_SUBTYPE_SH7780 is not set 196# CONFIG_CPU_SUBTYPE_SH7780 is not set
@@ -214,7 +232,6 @@ CONFIG_SPARSEMEM=y
214CONFIG_HAVE_MEMORY_PRESENT=y 232CONFIG_HAVE_MEMORY_PRESENT=y
215CONFIG_SPARSEMEM_STATIC=y 233CONFIG_SPARSEMEM_STATIC=y
216# CONFIG_MEMORY_HOTPLUG is not set 234# CONFIG_MEMORY_HOTPLUG is not set
217CONFIG_PAGEFLAGS_EXTENDED=y
218CONFIG_SPLIT_PTLOCK_CPUS=4 235CONFIG_SPLIT_PTLOCK_CPUS=4
219CONFIG_MIGRATION=y 236CONFIG_MIGRATION=y
220# CONFIG_PHYS_ADDR_T_64BIT is not set 237# CONFIG_PHYS_ADDR_T_64BIT is not set
@@ -222,6 +239,7 @@ CONFIG_ZONE_DMA_FLAG=0
222CONFIG_NR_QUICK=2 239CONFIG_NR_QUICK=2
223CONFIG_HAVE_MLOCK=y 240CONFIG_HAVE_MLOCK=y
224CONFIG_HAVE_MLOCKED_PAGE_BIT=y 241CONFIG_HAVE_MLOCKED_PAGE_BIT=y
242# CONFIG_KSM is not set
225CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 243CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
226 244
227# 245#
@@ -303,7 +321,8 @@ CONFIG_GUSA=y
303CONFIG_ZERO_PAGE_OFFSET=0x00001000 321CONFIG_ZERO_PAGE_OFFSET=0x00001000
304CONFIG_BOOT_LINK_OFFSET=0x00800000 322CONFIG_BOOT_LINK_OFFSET=0x00800000
305CONFIG_ENTRY_OFFSET=0x00001000 323CONFIG_ENTRY_OFFSET=0x00001000
306CONFIG_CMDLINE_BOOL=y 324CONFIG_CMDLINE_OVERWRITE=y
325# CONFIG_CMDLINE_EXTEND is not set
307CONFIG_CMDLINE="console=ttySC0,115200 root=/dev/nfs ip=bootp" 326CONFIG_CMDLINE="console=ttySC0,115200 root=/dev/nfs ip=bootp"
308 327
309# 328#
@@ -371,6 +390,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
371# CONFIG_NETFILTER is not set 390# CONFIG_NETFILTER is not set
372# CONFIG_IP_DCCP is not set 391# CONFIG_IP_DCCP is not set
373# CONFIG_IP_SCTP is not set 392# CONFIG_IP_SCTP is not set
393# CONFIG_RDS is not set
374# CONFIG_TIPC is not set 394# CONFIG_TIPC is not set
375# CONFIG_ATM is not set 395# CONFIG_ATM is not set
376# CONFIG_BRIDGE is not set 396# CONFIG_BRIDGE is not set
@@ -412,6 +432,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
412# Generic Driver Options 432# Generic Driver Options
413# 433#
414CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 434CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
435# CONFIG_DEVTMPFS is not set
415CONFIG_STANDALONE=y 436CONFIG_STANDALONE=y
416CONFIG_PREVENT_FIRMWARE_BUILD=y 437CONFIG_PREVENT_FIRMWARE_BUILD=y
417CONFIG_FW_LOADER=y 438CONFIG_FW_LOADER=y
@@ -421,9 +442,9 @@ CONFIG_EXTRA_FIRMWARE=""
421# CONFIG_CONNECTOR is not set 442# CONFIG_CONNECTOR is not set
422CONFIG_MTD=y 443CONFIG_MTD=y
423# CONFIG_MTD_DEBUG is not set 444# CONFIG_MTD_DEBUG is not set
445# CONFIG_MTD_TESTS is not set
424# CONFIG_MTD_CONCAT is not set 446# CONFIG_MTD_CONCAT is not set
425CONFIG_MTD_PARTITIONS=y 447CONFIG_MTD_PARTITIONS=y
426# CONFIG_MTD_TESTS is not set
427# CONFIG_MTD_REDBOOT_PARTS is not set 448# CONFIG_MTD_REDBOOT_PARTS is not set
428CONFIG_MTD_CMDLINE_PARTS=y 449CONFIG_MTD_CMDLINE_PARTS=y
429# CONFIG_MTD_AR7_PARTS is not set 450# CONFIG_MTD_AR7_PARTS is not set
@@ -477,6 +498,7 @@ CONFIG_MTD_CFI_UTIL=y
477CONFIG_MTD_COMPLEX_MAPPINGS=y 498CONFIG_MTD_COMPLEX_MAPPINGS=y
478CONFIG_MTD_PHYSMAP=y 499CONFIG_MTD_PHYSMAP=y
479# CONFIG_MTD_PHYSMAP_COMPAT is not set 500# CONFIG_MTD_PHYSMAP_COMPAT is not set
501# CONFIG_MTD_GPIO_ADDR is not set
480# CONFIG_MTD_PLATRAM is not set 502# CONFIG_MTD_PLATRAM is not set
481 503
482# 504#
@@ -554,7 +576,6 @@ CONFIG_SCSI_WAIT_SCAN=m
554# CONFIG_SCSI_SRP_ATTRS is not set 576# CONFIG_SCSI_SRP_ATTRS is not set
555CONFIG_SCSI_LOWLEVEL=y 577CONFIG_SCSI_LOWLEVEL=y
556# CONFIG_ISCSI_TCP is not set 578# CONFIG_ISCSI_TCP is not set
557# CONFIG_SCSI_BNX2_ISCSI is not set
558# CONFIG_LIBFC is not set 579# CONFIG_LIBFC is not set
559# CONFIG_LIBFCOE is not set 580# CONFIG_LIBFCOE is not set
560# CONFIG_SCSI_DEBUG is not set 581# CONFIG_SCSI_DEBUG is not set
@@ -610,10 +631,7 @@ CONFIG_SH_ETH=y
610# CONFIG_KS8842 is not set 631# CONFIG_KS8842 is not set
611# CONFIG_NETDEV_1000 is not set 632# CONFIG_NETDEV_1000 is not set
612# CONFIG_NETDEV_10000 is not set 633# CONFIG_NETDEV_10000 is not set
613 634CONFIG_WLAN=y
614#
615# Wireless LAN
616#
617# CONFIG_WLAN_PRE80211 is not set 635# CONFIG_WLAN_PRE80211 is not set
618# CONFIG_WLAN_80211 is not set 636# CONFIG_WLAN_80211 is not set
619 637
@@ -705,11 +723,15 @@ CONFIG_HW_RANDOM=y
705# CONFIG_TCG_TPM is not set 723# CONFIG_TCG_TPM is not set
706# CONFIG_I2C is not set 724# CONFIG_I2C is not set
707# CONFIG_SPI is not set 725# CONFIG_SPI is not set
726
727#
728# PPS support
729#
730# CONFIG_PPS is not set
708# CONFIG_W1 is not set 731# CONFIG_W1 is not set
709# CONFIG_POWER_SUPPLY is not set 732# CONFIG_POWER_SUPPLY is not set
710# CONFIG_HWMON is not set 733# CONFIG_HWMON is not set
711# CONFIG_THERMAL is not set 734# CONFIG_THERMAL is not set
712# CONFIG_THERMAL_HWMON is not set
713# CONFIG_WATCHDOG is not set 735# CONFIG_WATCHDOG is not set
714CONFIG_SSB_POSSIBLE=y 736CONFIG_SSB_POSSIBLE=y
715 737
@@ -819,6 +841,7 @@ CONFIG_USB_MON=y
819# CONFIG_USB_OXU210HP_HCD is not set 841# CONFIG_USB_OXU210HP_HCD is not set
820# CONFIG_USB_ISP116X_HCD is not set 842# CONFIG_USB_ISP116X_HCD is not set
821# CONFIG_USB_ISP1760_HCD is not set 843# CONFIG_USB_ISP1760_HCD is not set
844# CONFIG_USB_ISP1362_HCD is not set
822CONFIG_USB_OHCI_HCD=y 845CONFIG_USB_OHCI_HCD=y
823# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set 846# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
824# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set 847# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
@@ -888,6 +911,7 @@ CONFIG_USB_STORAGE=y
888# CONFIG_USB_LD is not set 911# CONFIG_USB_LD is not set
889# CONFIG_USB_TRANCEVIBRATOR is not set 912# CONFIG_USB_TRANCEVIBRATOR is not set
890# CONFIG_USB_IOWARRIOR is not set 913# CONFIG_USB_IOWARRIOR is not set
914# CONFIG_USB_TEST is not set
891# CONFIG_USB_ISIGHTFW is not set 915# CONFIG_USB_ISIGHTFW is not set
892# CONFIG_USB_VST is not set 916# CONFIG_USB_VST is not set
893# CONFIG_USB_GADGET is not set 917# CONFIG_USB_GADGET is not set
@@ -930,8 +954,10 @@ CONFIG_FS_MBCACHE=y
930# CONFIG_JFS_FS is not set 954# CONFIG_JFS_FS is not set
931CONFIG_FS_POSIX_ACL=y 955CONFIG_FS_POSIX_ACL=y
932# CONFIG_XFS_FS is not set 956# CONFIG_XFS_FS is not set
957# CONFIG_GFS2_FS is not set
933# CONFIG_OCFS2_FS is not set 958# CONFIG_OCFS2_FS is not set
934# CONFIG_BTRFS_FS is not set 959# CONFIG_BTRFS_FS is not set
960# CONFIG_NILFS2_FS is not set
935CONFIG_FILE_LOCKING=y 961CONFIG_FILE_LOCKING=y
936CONFIG_FSNOTIFY=y 962CONFIG_FSNOTIFY=y
937CONFIG_DNOTIFY=y 963CONFIG_DNOTIFY=y
@@ -997,7 +1023,6 @@ CONFIG_ROMFS_BACKED_BY_BLOCK=y
997CONFIG_ROMFS_ON_BLOCK=y 1023CONFIG_ROMFS_ON_BLOCK=y
998# CONFIG_SYSV_FS is not set 1024# CONFIG_SYSV_FS is not set
999# CONFIG_UFS_FS is not set 1025# CONFIG_UFS_FS is not set
1000# CONFIG_NILFS2_FS is not set
1001CONFIG_NETWORK_FILESYSTEMS=y 1026CONFIG_NETWORK_FILESYSTEMS=y
1002CONFIG_NFS_FS=y 1027CONFIG_NFS_FS=y
1003# CONFIG_NFS_V3 is not set 1028# CONFIG_NFS_V3 is not set
@@ -1071,6 +1096,7 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1071# CONFIG_ENABLE_MUST_CHECK is not set 1096# CONFIG_ENABLE_MUST_CHECK is not set
1072CONFIG_FRAME_WARN=1024 1097CONFIG_FRAME_WARN=1024
1073# CONFIG_MAGIC_SYSRQ is not set 1098# CONFIG_MAGIC_SYSRQ is not set
1099# CONFIG_STRIP_ASM_SYMS is not set
1074# CONFIG_UNUSED_SYMBOLS is not set 1100# CONFIG_UNUSED_SYMBOLS is not set
1075CONFIG_DEBUG_FS=y 1101CONFIG_DEBUG_FS=y
1076# CONFIG_HEADERS_CHECK is not set 1102# CONFIG_HEADERS_CHECK is not set
@@ -1082,11 +1108,15 @@ CONFIG_STACKTRACE=y
1082# CONFIG_LATENCYTOP is not set 1108# CONFIG_LATENCYTOP is not set
1083CONFIG_NOP_TRACER=y 1109CONFIG_NOP_TRACER=y
1084CONFIG_HAVE_FUNCTION_TRACER=y 1110CONFIG_HAVE_FUNCTION_TRACER=y
1111CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1112CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
1085CONFIG_HAVE_DYNAMIC_FTRACE=y 1113CONFIG_HAVE_DYNAMIC_FTRACE=y
1086CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1114CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1115CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
1087CONFIG_RING_BUFFER=y 1116CONFIG_RING_BUFFER=y
1088CONFIG_EVENT_TRACING=y 1117CONFIG_EVENT_TRACING=y
1089CONFIG_CONTEXT_SWITCH_TRACER=y 1118CONFIG_CONTEXT_SWITCH_TRACER=y
1119CONFIG_RING_BUFFER_ALLOW_SWAP=y
1090CONFIG_TRACING=y 1120CONFIG_TRACING=y
1091CONFIG_TRACING_SUPPORT=y 1121CONFIG_TRACING_SUPPORT=y
1092# CONFIG_FTRACE is not set 1122# CONFIG_FTRACE is not set
@@ -1096,6 +1126,7 @@ CONFIG_TRACING_SUPPORT=y
1096CONFIG_HAVE_ARCH_KGDB=y 1126CONFIG_HAVE_ARCH_KGDB=y
1097# CONFIG_SH_STANDARD_BIOS is not set 1127# CONFIG_SH_STANDARD_BIOS is not set
1098# CONFIG_EARLY_SCIF_CONSOLE is not set 1128# CONFIG_EARLY_SCIF_CONSOLE is not set
1129# CONFIG_DWARF_UNWINDER is not set
1099 1130
1100# 1131#
1101# Security options 1132# Security options
@@ -1109,7 +1140,6 @@ CONFIG_CRYPTO=y
1109# 1140#
1110# Crypto core or helper 1141# Crypto core or helper
1111# 1142#
1112# CONFIG_CRYPTO_FIPS is not set
1113# CONFIG_CRYPTO_MANAGER is not set 1143# CONFIG_CRYPTO_MANAGER is not set
1114# CONFIG_CRYPTO_MANAGER2 is not set 1144# CONFIG_CRYPTO_MANAGER2 is not set
1115# CONFIG_CRYPTO_GF128MUL is not set 1145# CONFIG_CRYPTO_GF128MUL is not set
@@ -1141,11 +1171,13 @@ CONFIG_CRYPTO=y
1141# 1171#
1142# CONFIG_CRYPTO_HMAC is not set 1172# CONFIG_CRYPTO_HMAC is not set
1143# CONFIG_CRYPTO_XCBC is not set 1173# CONFIG_CRYPTO_XCBC is not set
1174# CONFIG_CRYPTO_VMAC is not set
1144 1175
1145# 1176#
1146# Digest 1177# Digest
1147# 1178#
1148# CONFIG_CRYPTO_CRC32C is not set 1179# CONFIG_CRYPTO_CRC32C is not set
1180# CONFIG_CRYPTO_GHASH is not set
1149# CONFIG_CRYPTO_MD4 is not set 1181# CONFIG_CRYPTO_MD4 is not set
1150# CONFIG_CRYPTO_MD5 is not set 1182# CONFIG_CRYPTO_MD5 is not set
1151# CONFIG_CRYPTO_MICHAEL_MIC is not set 1183# CONFIG_CRYPTO_MICHAEL_MIC is not set
@@ -1208,5 +1240,6 @@ CONFIG_ZLIB_INFLATE=y
1208CONFIG_HAS_IOMEM=y 1240CONFIG_HAS_IOMEM=y
1209CONFIG_HAS_IOPORT=y 1241CONFIG_HAS_IOPORT=y
1210CONFIG_HAS_DMA=y 1242CONFIG_HAS_DMA=y
1243CONFIG_HAVE_LMB=y
1211CONFIG_NLATTR=y 1244CONFIG_NLATTR=y
1212CONFIG_GENERIC_ATOMIC64=y 1245CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/hp6xx_defconfig b/arch/sh/configs/hp6xx_defconfig
index 3249d46fdc13..f59be446f829 100644
--- a/arch/sh/configs/hp6xx_defconfig
+++ b/arch/sh/configs/hp6xx_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.30 3# Linux kernel version: 2.6.31
4# Thu Jun 18 12:28:12 2009 4# Thu Sep 24 17:59:45 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -14,6 +14,7 @@ CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y 14CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
16CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_IRQ_PER_CPU=y
17# CONFIG_GENERIC_GPIO is not set 18# CONFIG_GENERIC_GPIO is not set
18CONFIG_GENERIC_TIME=y 19CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 20CONFIG_GENERIC_CLOCKEVENTS=y
@@ -28,7 +29,9 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
28# CONFIG_ARCH_HAS_ILOG2_U64 is not set 29# CONFIG_ARCH_HAS_ILOG2_U64 is not set
29CONFIG_ARCH_NO_VIRT_TO_BUS=y 30CONFIG_ARCH_NO_VIRT_TO_BUS=y
30CONFIG_ARCH_HAS_DEFAULT_IDLE=y 31CONFIG_ARCH_HAS_DEFAULT_IDLE=y
32CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
31CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 33CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
34CONFIG_CONSTRUCTORS=y
32 35
33# 36#
34# General setup 37# General setup
@@ -38,6 +41,12 @@ CONFIG_BROKEN_ON_SMP=y
38CONFIG_INIT_ENV_ARG_LIMIT=32 41CONFIG_INIT_ENV_ARG_LIMIT=32
39CONFIG_LOCALVERSION="" 42CONFIG_LOCALVERSION=""
40CONFIG_LOCALVERSION_AUTO=y 43CONFIG_LOCALVERSION_AUTO=y
44CONFIG_HAVE_KERNEL_GZIP=y
45CONFIG_HAVE_KERNEL_BZIP2=y
46CONFIG_HAVE_KERNEL_LZMA=y
47CONFIG_KERNEL_GZIP=y
48# CONFIG_KERNEL_BZIP2 is not set
49# CONFIG_KERNEL_LZMA is not set
41CONFIG_SWAP=y 50CONFIG_SWAP=y
42# CONFIG_SYSVIPC is not set 51# CONFIG_SYSVIPC is not set
43CONFIG_BSD_PROCESS_ACCT=y 52CONFIG_BSD_PROCESS_ACCT=y
@@ -46,11 +55,12 @@ CONFIG_BSD_PROCESS_ACCT=y
46# 55#
47# RCU Subsystem 56# RCU Subsystem
48# 57#
49CONFIG_CLASSIC_RCU=y 58CONFIG_TREE_RCU=y
50# CONFIG_TREE_RCU is not set 59# CONFIG_TREE_PREEMPT_RCU is not set
51# CONFIG_PREEMPT_RCU is not set 60# CONFIG_RCU_TRACE is not set
61CONFIG_RCU_FANOUT=32
62# CONFIG_RCU_FANOUT_EXACT is not set
52# CONFIG_TREE_RCU_TRACE is not set 63# CONFIG_TREE_RCU_TRACE is not set
53# CONFIG_PREEMPT_RCU_TRACE is not set
54CONFIG_IKCONFIG=y 64CONFIG_IKCONFIG=y
55CONFIG_IKCONFIG_PROC=y 65CONFIG_IKCONFIG_PROC=y
56CONFIG_LOG_BUF_SHIFT=14 66CONFIG_LOG_BUF_SHIFT=14
@@ -81,18 +91,19 @@ CONFIG_TIMERFD=y
81CONFIG_EVENTFD=y 91CONFIG_EVENTFD=y
82CONFIG_SHMEM=y 92CONFIG_SHMEM=y
83CONFIG_AIO=y 93CONFIG_AIO=y
94CONFIG_HAVE_PERF_EVENTS=y
84 95
85# 96#
86# Performance Counters 97# Kernel Performance Events And Counters
87# 98#
99# CONFIG_PERF_EVENTS is not set
100# CONFIG_PERF_COUNTERS is not set
88CONFIG_VM_EVENT_COUNTERS=y 101CONFIG_VM_EVENT_COUNTERS=y
89# CONFIG_STRIP_ASM_SYMS is not set
90CONFIG_COMPAT_BRK=y 102CONFIG_COMPAT_BRK=y
91CONFIG_SLAB=y 103CONFIG_SLAB=y
92# CONFIG_SLUB is not set 104# CONFIG_SLUB is not set
93# CONFIG_SLOB is not set 105# CONFIG_SLOB is not set
94# CONFIG_PROFILING is not set 106# CONFIG_PROFILING is not set
95# CONFIG_MARKERS is not set
96CONFIG_HAVE_OPROFILE=y 107CONFIG_HAVE_OPROFILE=y
97CONFIG_HAVE_IOREMAP_PROT=y 108CONFIG_HAVE_IOREMAP_PROT=y
98CONFIG_HAVE_KPROBES=y 109CONFIG_HAVE_KPROBES=y
@@ -100,6 +111,10 @@ CONFIG_HAVE_KRETPROBES=y
100CONFIG_HAVE_ARCH_TRACEHOOK=y 111CONFIG_HAVE_ARCH_TRACEHOOK=y
101CONFIG_HAVE_CLK=y 112CONFIG_HAVE_CLK=y
102CONFIG_HAVE_DMA_API_DEBUG=y 113CONFIG_HAVE_DMA_API_DEBUG=y
114
115#
116# GCOV-based kernel profiling
117#
103# CONFIG_SLOW_WORK is not set 118# CONFIG_SLOW_WORK is not set
104CONFIG_HAVE_GENERIC_DMA_COHERENT=y 119CONFIG_HAVE_GENERIC_DMA_COHERENT=y
105CONFIG_SLABINFO=y 120CONFIG_SLABINFO=y
@@ -107,7 +122,7 @@ CONFIG_RT_MUTEXES=y
107CONFIG_BASE_SMALL=0 122CONFIG_BASE_SMALL=0
108# CONFIG_MODULES is not set 123# CONFIG_MODULES is not set
109CONFIG_BLOCK=y 124CONFIG_BLOCK=y
110# CONFIG_LBD is not set 125CONFIG_LBDAF=y
111# CONFIG_BLK_DEV_BSG is not set 126# CONFIG_BLK_DEV_BSG is not set
112# CONFIG_BLK_DEV_INTEGRITY is not set 127# CONFIG_BLK_DEV_INTEGRITY is not set
113 128
@@ -154,6 +169,7 @@ CONFIG_CPU_SUBTYPE_SH7709=y
154# CONFIG_CPU_SUBTYPE_SH4_202 is not set 169# CONFIG_CPU_SUBTYPE_SH4_202 is not set
155# CONFIG_CPU_SUBTYPE_SH7723 is not set 170# CONFIG_CPU_SUBTYPE_SH7723 is not set
156# CONFIG_CPU_SUBTYPE_SH7724 is not set 171# CONFIG_CPU_SUBTYPE_SH7724 is not set
172# CONFIG_CPU_SUBTYPE_SH7757 is not set
157# CONFIG_CPU_SUBTYPE_SH7763 is not set 173# CONFIG_CPU_SUBTYPE_SH7763 is not set
158# CONFIG_CPU_SUBTYPE_SH7770 is not set 174# CONFIG_CPU_SUBTYPE_SH7770 is not set
159# CONFIG_CPU_SUBTYPE_SH7780 is not set 175# CONFIG_CPU_SUBTYPE_SH7780 is not set
@@ -199,6 +215,7 @@ CONFIG_ZONE_DMA_FLAG=0
199CONFIG_NR_QUICK=2 215CONFIG_NR_QUICK=2
200CONFIG_HAVE_MLOCK=y 216CONFIG_HAVE_MLOCK=y
201CONFIG_HAVE_MLOCKED_PAGE_BIT=y 217CONFIG_HAVE_MLOCKED_PAGE_BIT=y
218# CONFIG_KSM is not set
202CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 219CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
203 220
204# 221#
@@ -288,7 +305,8 @@ CONFIG_GUSA=y
288CONFIG_ZERO_PAGE_OFFSET=0x00001000 305CONFIG_ZERO_PAGE_OFFSET=0x00001000
289CONFIG_BOOT_LINK_OFFSET=0x00800000 306CONFIG_BOOT_LINK_OFFSET=0x00800000
290CONFIG_ENTRY_OFFSET=0x00001000 307CONFIG_ENTRY_OFFSET=0x00001000
291# CONFIG_CMDLINE_BOOL is not set 308# CONFIG_CMDLINE_OVERWRITE is not set
309# CONFIG_CMDLINE_EXTEND is not set
292 310
293# 311#
294# Bus options 312# Bus options
@@ -322,6 +340,7 @@ CONFIG_SUSPEND=y
322CONFIG_SUSPEND_FREEZER=y 340CONFIG_SUSPEND_FREEZER=y
323# CONFIG_HIBERNATION is not set 341# CONFIG_HIBERNATION is not set
324CONFIG_APM_EMULATION=y 342CONFIG_APM_EMULATION=y
343# CONFIG_PM_RUNTIME is not set
325# CONFIG_CPU_IDLE is not set 344# CONFIG_CPU_IDLE is not set
326# CONFIG_NET is not set 345# CONFIG_NET is not set
327 346
@@ -390,7 +409,6 @@ CONFIG_BLK_DEV_SD=y
390# CONFIG_SCSI_SAS_LIBSAS is not set 409# CONFIG_SCSI_SAS_LIBSAS is not set
391# CONFIG_SCSI_SRP_ATTRS is not set 410# CONFIG_SCSI_SRP_ATTRS is not set
392CONFIG_SCSI_LOWLEVEL=y 411CONFIG_SCSI_LOWLEVEL=y
393# CONFIG_SCSI_BNX2_ISCSI is not set
394# CONFIG_LIBFC is not set 412# CONFIG_LIBFC is not set
395# CONFIG_LIBFCOE is not set 413# CONFIG_LIBFCOE is not set
396# CONFIG_SCSI_DEBUG is not set 414# CONFIG_SCSI_DEBUG is not set
@@ -399,6 +417,7 @@ CONFIG_SCSI_LOWLEVEL=y
399# CONFIG_SCSI_OSD_INITIATOR is not set 417# CONFIG_SCSI_OSD_INITIATOR is not set
400CONFIG_ATA=y 418CONFIG_ATA=y
401# CONFIG_ATA_NONSTANDARD is not set 419# CONFIG_ATA_NONSTANDARD is not set
420CONFIG_ATA_VERBOSE_ERROR=y
402CONFIG_SATA_PMP=y 421CONFIG_SATA_PMP=y
403CONFIG_ATA_SFF=y 422CONFIG_ATA_SFF=y
404# CONFIG_SATA_MV is not set 423# CONFIG_SATA_MV is not set
@@ -428,13 +447,14 @@ CONFIG_INPUT_EVDEV=y
428# 447#
429CONFIG_INPUT_KEYBOARD=y 448CONFIG_INPUT_KEYBOARD=y
430# CONFIG_KEYBOARD_ATKBD is not set 449# CONFIG_KEYBOARD_ATKBD is not set
431# CONFIG_KEYBOARD_SUNKBD is not set
432# CONFIG_KEYBOARD_LKKBD is not set 450# CONFIG_KEYBOARD_LKKBD is not set
433# CONFIG_KEYBOARD_XTKBD is not set 451CONFIG_KEYBOARD_HP6XX=y
434# CONFIG_KEYBOARD_NEWTON is not set 452# CONFIG_KEYBOARD_NEWTON is not set
453# CONFIG_KEYBOARD_OPENCORES is not set
435# CONFIG_KEYBOARD_STOWAWAY is not set 454# CONFIG_KEYBOARD_STOWAWAY is not set
436CONFIG_KEYBOARD_HP6XX=y 455# CONFIG_KEYBOARD_SUNKBD is not set
437# CONFIG_KEYBOARD_SH_KEYSC is not set 456# CONFIG_KEYBOARD_SH_KEYSC is not set
457# CONFIG_KEYBOARD_XTKBD is not set
438# CONFIG_INPUT_MOUSE is not set 458# CONFIG_INPUT_MOUSE is not set
439# CONFIG_INPUT_JOYSTICK is not set 459# CONFIG_INPUT_JOYSTICK is not set
440# CONFIG_INPUT_TABLET is not set 460# CONFIG_INPUT_TABLET is not set
@@ -452,6 +472,7 @@ CONFIG_TOUCHSCREEN_HP600=y
452# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set 472# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
453# CONFIG_TOUCHSCREEN_TOUCHWIN is not set 473# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
454# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set 474# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
475# CONFIG_TOUCHSCREEN_W90X900 is not set
455# CONFIG_INPUT_MISC is not set 476# CONFIG_INPUT_MISC is not set
456 477
457# 478#
@@ -507,11 +528,15 @@ CONFIG_HW_RANDOM=y
507# CONFIG_TCG_TPM is not set 528# CONFIG_TCG_TPM is not set
508# CONFIG_I2C is not set 529# CONFIG_I2C is not set
509# CONFIG_SPI is not set 530# CONFIG_SPI is not set
531
532#
533# PPS support
534#
535# CONFIG_PPS is not set
510# CONFIG_W1 is not set 536# CONFIG_W1 is not set
511# CONFIG_POWER_SUPPLY is not set 537# CONFIG_POWER_SUPPLY is not set
512# CONFIG_HWMON is not set 538# CONFIG_HWMON is not set
513# CONFIG_THERMAL is not set 539# CONFIG_THERMAL is not set
514# CONFIG_THERMAL_HWMON is not set
515# CONFIG_WATCHDOG is not set 540# CONFIG_WATCHDOG is not set
516CONFIG_SSB_POSSIBLE=y 541CONFIG_SSB_POSSIBLE=y
517 542
@@ -663,7 +688,9 @@ CONFIG_EXT2_FS=y
663# CONFIG_JFS_FS is not set 688# CONFIG_JFS_FS is not set
664# CONFIG_FS_POSIX_ACL is not set 689# CONFIG_FS_POSIX_ACL is not set
665# CONFIG_XFS_FS is not set 690# CONFIG_XFS_FS is not set
691# CONFIG_GFS2_FS is not set
666# CONFIG_BTRFS_FS is not set 692# CONFIG_BTRFS_FS is not set
693# CONFIG_NILFS2_FS is not set
667CONFIG_FILE_LOCKING=y 694CONFIG_FILE_LOCKING=y
668CONFIG_FSNOTIFY=y 695CONFIG_FSNOTIFY=y
669CONFIG_DNOTIFY=y 696CONFIG_DNOTIFY=y
@@ -725,7 +752,6 @@ CONFIG_MISC_FILESYSTEMS=y
725# CONFIG_ROMFS_FS is not set 752# CONFIG_ROMFS_FS is not set
726# CONFIG_SYSV_FS is not set 753# CONFIG_SYSV_FS is not set
727# CONFIG_UFS_FS is not set 754# CONFIG_UFS_FS is not set
728# CONFIG_NILFS2_FS is not set
729 755
730# 756#
731# Partition Types 757# Partition Types
@@ -782,6 +808,7 @@ CONFIG_ENABLE_WARN_DEPRECATED=y
782CONFIG_ENABLE_MUST_CHECK=y 808CONFIG_ENABLE_MUST_CHECK=y
783CONFIG_FRAME_WARN=1024 809CONFIG_FRAME_WARN=1024
784# CONFIG_MAGIC_SYSRQ is not set 810# CONFIG_MAGIC_SYSRQ is not set
811# CONFIG_STRIP_ASM_SYMS is not set
785# CONFIG_UNUSED_SYMBOLS is not set 812# CONFIG_UNUSED_SYMBOLS is not set
786# CONFIG_DEBUG_FS is not set 813# CONFIG_DEBUG_FS is not set
787# CONFIG_HEADERS_CHECK is not set 814# CONFIG_HEADERS_CHECK is not set
@@ -791,8 +818,11 @@ CONFIG_FRAME_WARN=1024
791# CONFIG_RCU_CPU_STALL_DETECTOR is not set 818# CONFIG_RCU_CPU_STALL_DETECTOR is not set
792# CONFIG_LATENCYTOP is not set 819# CONFIG_LATENCYTOP is not set
793CONFIG_HAVE_FUNCTION_TRACER=y 820CONFIG_HAVE_FUNCTION_TRACER=y
821CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
822CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
794CONFIG_HAVE_DYNAMIC_FTRACE=y 823CONFIG_HAVE_DYNAMIC_FTRACE=y
795CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 824CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
825CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
796CONFIG_TRACING_SUPPORT=y 826CONFIG_TRACING_SUPPORT=y
797# CONFIG_FTRACE is not set 827# CONFIG_FTRACE is not set
798# CONFIG_DMA_API_DEBUG is not set 828# CONFIG_DMA_API_DEBUG is not set
@@ -800,6 +830,7 @@ CONFIG_TRACING_SUPPORT=y
800CONFIG_HAVE_ARCH_KGDB=y 830CONFIG_HAVE_ARCH_KGDB=y
801# CONFIG_SH_STANDARD_BIOS is not set 831# CONFIG_SH_STANDARD_BIOS is not set
802# CONFIG_EARLY_SCIF_CONSOLE is not set 832# CONFIG_EARLY_SCIF_CONSOLE is not set
833# CONFIG_DWARF_UNWINDER is not set
803 834
804# 835#
805# Security options 836# Security options
@@ -813,7 +844,6 @@ CONFIG_CRYPTO=y
813# 844#
814# Crypto core or helper 845# Crypto core or helper
815# 846#
816# CONFIG_CRYPTO_FIPS is not set
817CONFIG_CRYPTO_ALGAPI=y 847CONFIG_CRYPTO_ALGAPI=y
818CONFIG_CRYPTO_ALGAPI2=y 848CONFIG_CRYPTO_ALGAPI2=y
819CONFIG_CRYPTO_AEAD2=y 849CONFIG_CRYPTO_AEAD2=y
@@ -854,11 +884,13 @@ CONFIG_CRYPTO_PCBC=y
854# 884#
855# CONFIG_CRYPTO_HMAC is not set 885# CONFIG_CRYPTO_HMAC is not set
856# CONFIG_CRYPTO_XCBC is not set 886# CONFIG_CRYPTO_XCBC is not set
887# CONFIG_CRYPTO_VMAC is not set
857 888
858# 889#
859# Digest 890# Digest
860# 891#
861# CONFIG_CRYPTO_CRC32C is not set 892# CONFIG_CRYPTO_CRC32C is not set
893# CONFIG_CRYPTO_GHASH is not set
862# CONFIG_CRYPTO_MD4 is not set 894# CONFIG_CRYPTO_MD4 is not set
863CONFIG_CRYPTO_MD5=y 895CONFIG_CRYPTO_MD5=y
864# CONFIG_CRYPTO_MICHAEL_MIC is not set 896# CONFIG_CRYPTO_MICHAEL_MIC is not set
@@ -920,4 +952,5 @@ CONFIG_CRC32=y
920CONFIG_HAS_IOMEM=y 952CONFIG_HAS_IOMEM=y
921CONFIG_HAS_IOPORT=y 953CONFIG_HAS_IOPORT=y
922CONFIG_HAS_DMA=y 954CONFIG_HAS_DMA=y
955CONFIG_HAVE_LMB=y
923CONFIG_GENERIC_ATOMIC64=y 956CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/kfr2r09-romimage_defconfig b/arch/sh/configs/kfr2r09-romimage_defconfig
new file mode 100644
index 000000000000..02590e127f74
--- /dev/null
+++ b/arch/sh/configs/kfr2r09-romimage_defconfig
@@ -0,0 +1,777 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.31
4# Thu Sep 24 18:01:48 2009
5#
6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y
8# CONFIG_SUPERH64 is not set
9CONFIG_ARCH_DEFCONFIG="arch/sh/configs/shx3_defconfig"
10CONFIG_RWSEM_GENERIC_SPINLOCK=y
11CONFIG_GENERIC_BUG=y
12CONFIG_GENERIC_FIND_NEXT_BIT=y
13CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
16CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_IRQ_PER_CPU=y
18CONFIG_GENERIC_GPIO=y
19CONFIG_GENERIC_TIME=y
20CONFIG_GENERIC_CLOCKEVENTS=y
21CONFIG_ARCH_SUSPEND_POSSIBLE=y
22CONFIG_ARCH_HIBERNATION_POSSIBLE=y
23CONFIG_SYS_SUPPORTS_CMT=y
24CONFIG_SYS_SUPPORTS_TMU=y
25CONFIG_STACKTRACE_SUPPORT=y
26CONFIG_LOCKDEP_SUPPORT=y
27CONFIG_HAVE_LATENCYTOP_SUPPORT=y
28# CONFIG_ARCH_HAS_ILOG2_U32 is not set
29# CONFIG_ARCH_HAS_ILOG2_U64 is not set
30CONFIG_ARCH_NO_VIRT_TO_BUS=y
31CONFIG_ARCH_HAS_DEFAULT_IDLE=y
32CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
33CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
34CONFIG_CONSTRUCTORS=y
35
36#
37# General setup
38#
39CONFIG_EXPERIMENTAL=y
40CONFIG_BROKEN_ON_SMP=y
41CONFIG_INIT_ENV_ARG_LIMIT=32
42CONFIG_LOCALVERSION=""
43# CONFIG_LOCALVERSION_AUTO is not set
44CONFIG_HAVE_KERNEL_GZIP=y
45CONFIG_HAVE_KERNEL_BZIP2=y
46CONFIG_HAVE_KERNEL_LZMA=y
47CONFIG_KERNEL_GZIP=y
48# CONFIG_KERNEL_BZIP2 is not set
49# CONFIG_KERNEL_LZMA is not set
50CONFIG_SYSVIPC=y
51CONFIG_SYSVIPC_SYSCTL=y
52# CONFIG_POSIX_MQUEUE is not set
53CONFIG_BSD_PROCESS_ACCT=y
54# CONFIG_BSD_PROCESS_ACCT_V3 is not set
55# CONFIG_TASKSTATS is not set
56# CONFIG_AUDIT is not set
57
58#
59# RCU Subsystem
60#
61CONFIG_TREE_RCU=y
62# CONFIG_TREE_PREEMPT_RCU is not set
63# CONFIG_RCU_TRACE is not set
64CONFIG_RCU_FANOUT=32
65# CONFIG_RCU_FANOUT_EXACT is not set
66# CONFIG_TREE_RCU_TRACE is not set
67CONFIG_IKCONFIG=y
68CONFIG_IKCONFIG_PROC=y
69CONFIG_LOG_BUF_SHIFT=14
70CONFIG_GROUP_SCHED=y
71CONFIG_FAIR_GROUP_SCHED=y
72# CONFIG_RT_GROUP_SCHED is not set
73CONFIG_USER_SCHED=y
74# CONFIG_CGROUP_SCHED is not set
75# CONFIG_CGROUPS is not set
76CONFIG_SYSFS_DEPRECATED=y
77CONFIG_SYSFS_DEPRECATED_V2=y
78# CONFIG_RELAY is not set
79# CONFIG_NAMESPACES is not set
80CONFIG_BLK_DEV_INITRD=y
81CONFIG_INITRAMFS_SOURCE=""
82CONFIG_RD_GZIP=y
83# CONFIG_RD_BZIP2 is not set
84# CONFIG_RD_LZMA is not set
85CONFIG_CC_OPTIMIZE_FOR_SIZE=y
86CONFIG_SYSCTL=y
87CONFIG_ANON_INODES=y
88CONFIG_EMBEDDED=y
89CONFIG_UID16=y
90CONFIG_SYSCTL_SYSCALL=y
91# CONFIG_KALLSYMS is not set
92CONFIG_HOTPLUG=y
93CONFIG_PRINTK=y
94CONFIG_BUG=y
95CONFIG_ELF_CORE=y
96CONFIG_BASE_FULL=y
97CONFIG_FUTEX=y
98CONFIG_EPOLL=y
99CONFIG_SIGNALFD=y
100CONFIG_TIMERFD=y
101CONFIG_EVENTFD=y
102CONFIG_SHMEM=y
103CONFIG_AIO=y
104CONFIG_HAVE_PERF_EVENTS=y
105
106#
107# Kernel Performance Events And Counters
108#
109# CONFIG_PERF_EVENTS is not set
110# CONFIG_PERF_COUNTERS is not set
111CONFIG_VM_EVENT_COUNTERS=y
112CONFIG_COMPAT_BRK=y
113CONFIG_SLAB=y
114# CONFIG_SLUB is not set
115# CONFIG_SLOB is not set
116# CONFIG_PROFILING is not set
117CONFIG_HAVE_OPROFILE=y
118CONFIG_HAVE_IOREMAP_PROT=y
119CONFIG_HAVE_KPROBES=y
120CONFIG_HAVE_KRETPROBES=y
121CONFIG_HAVE_ARCH_TRACEHOOK=y
122CONFIG_HAVE_CLK=y
123CONFIG_HAVE_DMA_API_DEBUG=y
124
125#
126# GCOV-based kernel profiling
127#
128# CONFIG_GCOV_KERNEL is not set
129# CONFIG_SLOW_WORK is not set
130CONFIG_HAVE_GENERIC_DMA_COHERENT=y
131CONFIG_SLABINFO=y
132CONFIG_RT_MUTEXES=y
133CONFIG_BASE_SMALL=0
134# CONFIG_MODULES is not set
135# CONFIG_BLOCK is not set
136# CONFIG_FREEZER is not set
137
138#
139# System type
140#
141CONFIG_CPU_SH4=y
142CONFIG_CPU_SH4A=y
143CONFIG_CPU_SHX2=y
144CONFIG_ARCH_SHMOBILE=y
145# CONFIG_CPU_SUBTYPE_SH7619 is not set
146# CONFIG_CPU_SUBTYPE_SH7201 is not set
147# CONFIG_CPU_SUBTYPE_SH7203 is not set
148# CONFIG_CPU_SUBTYPE_SH7206 is not set
149# CONFIG_CPU_SUBTYPE_SH7263 is not set
150# CONFIG_CPU_SUBTYPE_MXG is not set
151# CONFIG_CPU_SUBTYPE_SH7705 is not set
152# CONFIG_CPU_SUBTYPE_SH7706 is not set
153# CONFIG_CPU_SUBTYPE_SH7707 is not set
154# CONFIG_CPU_SUBTYPE_SH7708 is not set
155# CONFIG_CPU_SUBTYPE_SH7709 is not set
156# CONFIG_CPU_SUBTYPE_SH7710 is not set
157# CONFIG_CPU_SUBTYPE_SH7712 is not set
158# CONFIG_CPU_SUBTYPE_SH7720 is not set
159# CONFIG_CPU_SUBTYPE_SH7721 is not set
160# CONFIG_CPU_SUBTYPE_SH7750 is not set
161# CONFIG_CPU_SUBTYPE_SH7091 is not set
162# CONFIG_CPU_SUBTYPE_SH7750R is not set
163# CONFIG_CPU_SUBTYPE_SH7750S is not set
164# CONFIG_CPU_SUBTYPE_SH7751 is not set
165# CONFIG_CPU_SUBTYPE_SH7751R is not set
166# CONFIG_CPU_SUBTYPE_SH7760 is not set
167# CONFIG_CPU_SUBTYPE_SH4_202 is not set
168# CONFIG_CPU_SUBTYPE_SH7723 is not set
169CONFIG_CPU_SUBTYPE_SH7724=y
170# CONFIG_CPU_SUBTYPE_SH7757 is not set
171# CONFIG_CPU_SUBTYPE_SH7763 is not set
172# CONFIG_CPU_SUBTYPE_SH7770 is not set
173# CONFIG_CPU_SUBTYPE_SH7780 is not set
174# CONFIG_CPU_SUBTYPE_SH7785 is not set
175# CONFIG_CPU_SUBTYPE_SH7786 is not set
176# CONFIG_CPU_SUBTYPE_SHX3 is not set
177# CONFIG_CPU_SUBTYPE_SH7343 is not set
178# CONFIG_CPU_SUBTYPE_SH7722 is not set
179# CONFIG_CPU_SUBTYPE_SH7366 is not set
180
181#
182# Memory management options
183#
184CONFIG_QUICKLIST=y
185CONFIG_MMU=y
186CONFIG_PAGE_OFFSET=0x80000000
187CONFIG_FORCE_MAX_ZONEORDER=11
188CONFIG_MEMORY_START=0x08000000
189CONFIG_MEMORY_SIZE=0x08000000
190CONFIG_29BIT=y
191# CONFIG_X2TLB is not set
192CONFIG_VSYSCALL=y
193CONFIG_ARCH_FLATMEM_ENABLE=y
194CONFIG_ARCH_SPARSEMEM_ENABLE=y
195CONFIG_ARCH_SPARSEMEM_DEFAULT=y
196CONFIG_MAX_ACTIVE_REGIONS=1
197CONFIG_ARCH_POPULATES_NODE_MAP=y
198CONFIG_ARCH_SELECT_MEMORY_MODEL=y
199CONFIG_PAGE_SIZE_4KB=y
200# CONFIG_PAGE_SIZE_8KB is not set
201# CONFIG_PAGE_SIZE_16KB is not set
202# CONFIG_PAGE_SIZE_64KB is not set
203CONFIG_SELECT_MEMORY_MODEL=y
204CONFIG_FLATMEM_MANUAL=y
205# CONFIG_DISCONTIGMEM_MANUAL is not set
206# CONFIG_SPARSEMEM_MANUAL is not set
207CONFIG_FLATMEM=y
208CONFIG_FLAT_NODE_MEM_MAP=y
209CONFIG_SPARSEMEM_STATIC=y
210CONFIG_PAGEFLAGS_EXTENDED=y
211CONFIG_SPLIT_PTLOCK_CPUS=4
212# CONFIG_PHYS_ADDR_T_64BIT is not set
213CONFIG_ZONE_DMA_FLAG=0
214CONFIG_NR_QUICK=2
215CONFIG_HAVE_MLOCK=y
216CONFIG_HAVE_MLOCKED_PAGE_BIT=y
217# CONFIG_KSM is not set
218CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
219
220#
221# Cache configuration
222#
223CONFIG_CACHE_WRITEBACK=y
224# CONFIG_CACHE_WRITETHROUGH is not set
225# CONFIG_CACHE_OFF is not set
226
227#
228# Processor features
229#
230CONFIG_CPU_LITTLE_ENDIAN=y
231# CONFIG_CPU_BIG_ENDIAN is not set
232CONFIG_SH_FPU=y
233# CONFIG_SH_STORE_QUEUES is not set
234CONFIG_CPU_HAS_INTEVT=y
235CONFIG_CPU_HAS_SR_RB=y
236CONFIG_CPU_HAS_FPU=y
237
238#
239# Board support
240#
241# CONFIG_SH_7724_SOLUTION_ENGINE is not set
242CONFIG_SH_KFR2R09=y
243# CONFIG_SH_ECOVEC is not set
244
245#
246# Timer and clock configuration
247#
248# CONFIG_SH_TIMER_TMU is not set
249CONFIG_SH_TIMER_CMT=y
250CONFIG_SH_PCLK_FREQ=33333333
251CONFIG_SH_CLK_CPG=y
252# CONFIG_NO_HZ is not set
253# CONFIG_HIGH_RES_TIMERS is not set
254CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
255
256#
257# CPU Frequency scaling
258#
259# CONFIG_CPU_FREQ is not set
260
261#
262# DMA support
263#
264# CONFIG_SH_DMA is not set
265
266#
267# Companion Chips
268#
269
270#
271# Additional SuperH Device Drivers
272#
273# CONFIG_HEARTBEAT is not set
274# CONFIG_PUSH_SWITCH is not set
275
276#
277# Kernel features
278#
279CONFIG_HZ_100=y
280# CONFIG_HZ_250 is not set
281# CONFIG_HZ_300 is not set
282# CONFIG_HZ_1000 is not set
283CONFIG_HZ=100
284# CONFIG_SCHED_HRTICK is not set
285CONFIG_KEXEC=y
286# CONFIG_CRASH_DUMP is not set
287# CONFIG_SECCOMP is not set
288CONFIG_PREEMPT_NONE=y
289# CONFIG_PREEMPT_VOLUNTARY is not set
290# CONFIG_PREEMPT is not set
291CONFIG_GUSA=y
292# CONFIG_SPARSE_IRQ is not set
293
294#
295# Boot options
296#
297CONFIG_ZERO_PAGE_OFFSET=0x00001000
298CONFIG_BOOT_LINK_OFFSET=0x00800000
299CONFIG_ENTRY_OFFSET=0x00001000
300CONFIG_CMDLINE_OVERWRITE=y
301# CONFIG_CMDLINE_EXTEND is not set
302CONFIG_CMDLINE="console=ttySC1,115200 quiet"
303
304#
305# Bus options
306#
307# CONFIG_ARCH_SUPPORTS_MSI is not set
308# CONFIG_PCCARD is not set
309
310#
311# Executable file formats
312#
313CONFIG_BINFMT_ELF=y
314# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
315# CONFIG_HAVE_AOUT is not set
316# CONFIG_BINFMT_MISC is not set
317
318#
319# Power management options (EXPERIMENTAL)
320#
321CONFIG_PM=y
322# CONFIG_PM_DEBUG is not set
323# CONFIG_SUSPEND is not set
324CONFIG_PM_RUNTIME=y
325# CONFIG_CPU_IDLE is not set
326CONFIG_NET=y
327
328#
329# Networking options
330#
331CONFIG_PACKET=y
332CONFIG_PACKET_MMAP=y
333CONFIG_UNIX=y
334# CONFIG_NET_KEY is not set
335CONFIG_INET=y
336# CONFIG_IP_MULTICAST is not set
337# CONFIG_IP_ADVANCED_ROUTER is not set
338CONFIG_IP_FIB_HASH=y
339# CONFIG_IP_PNP is not set
340# CONFIG_NET_IPIP is not set
341# CONFIG_NET_IPGRE is not set
342# CONFIG_ARPD is not set
343# CONFIG_SYN_COOKIES is not set
344# CONFIG_INET_AH is not set
345# CONFIG_INET_ESP is not set
346# CONFIG_INET_IPCOMP is not set
347# CONFIG_INET_XFRM_TUNNEL is not set
348# CONFIG_INET_TUNNEL is not set
349# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
350# CONFIG_INET_XFRM_MODE_TUNNEL is not set
351# CONFIG_INET_XFRM_MODE_BEET is not set
352# CONFIG_INET_LRO is not set
353# CONFIG_INET_DIAG is not set
354# CONFIG_TCP_CONG_ADVANCED is not set
355CONFIG_TCP_CONG_CUBIC=y
356CONFIG_DEFAULT_TCP_CONG="cubic"
357# CONFIG_TCP_MD5SIG is not set
358# CONFIG_IPV6 is not set
359# CONFIG_NETWORK_SECMARK is not set
360# CONFIG_NETFILTER is not set
361# CONFIG_IP_DCCP is not set
362# CONFIG_IP_SCTP is not set
363# CONFIG_RDS is not set
364# CONFIG_TIPC is not set
365# CONFIG_ATM is not set
366# CONFIG_BRIDGE is not set
367# CONFIG_NET_DSA is not set
368# CONFIG_VLAN_8021Q is not set
369# CONFIG_DECNET is not set
370# CONFIG_LLC2 is not set
371# CONFIG_IPX is not set
372# CONFIG_ATALK is not set
373# CONFIG_X25 is not set
374# CONFIG_LAPB is not set
375# CONFIG_ECONET is not set
376# CONFIG_WAN_ROUTER is not set
377# CONFIG_PHONET is not set
378# CONFIG_IEEE802154 is not set
379# CONFIG_NET_SCHED is not set
380# CONFIG_DCB is not set
381
382#
383# Network testing
384#
385# CONFIG_NET_PKTGEN is not set
386# CONFIG_HAMRADIO is not set
387# CONFIG_CAN is not set
388# CONFIG_IRDA is not set
389# CONFIG_BT is not set
390# CONFIG_AF_RXRPC is not set
391# CONFIG_WIRELESS is not set
392# CONFIG_WIMAX is not set
393# CONFIG_RFKILL is not set
394# CONFIG_NET_9P is not set
395
396#
397# Device Drivers
398#
399
400#
401# Generic Driver Options
402#
403CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
404# CONFIG_DEVTMPFS is not set
405CONFIG_STANDALONE=y
406CONFIG_PREVENT_FIRMWARE_BUILD=y
407CONFIG_FW_LOADER=y
408CONFIG_FIRMWARE_IN_KERNEL=y
409CONFIG_EXTRA_FIRMWARE=""
410# CONFIG_SYS_HYPERVISOR is not set
411# CONFIG_CONNECTOR is not set
412# CONFIG_MTD is not set
413# CONFIG_PARPORT is not set
414# CONFIG_MISC_DEVICES is not set
415CONFIG_HAVE_IDE=y
416
417#
418# SCSI device support
419#
420# CONFIG_SCSI_DMA is not set
421# CONFIG_SCSI_NETLINK is not set
422# CONFIG_NETDEVICES is not set
423# CONFIG_ISDN is not set
424# CONFIG_PHONE is not set
425
426#
427# Input device support
428#
429CONFIG_INPUT=y
430# CONFIG_INPUT_FF_MEMLESS is not set
431# CONFIG_INPUT_POLLDEV is not set
432
433#
434# Userland interfaces
435#
436# CONFIG_INPUT_MOUSEDEV is not set
437# CONFIG_INPUT_JOYDEV is not set
438# CONFIG_INPUT_EVDEV is not set
439# CONFIG_INPUT_EVBUG is not set
440
441#
442# Input Device Drivers
443#
444# CONFIG_INPUT_KEYBOARD is not set
445# CONFIG_INPUT_MOUSE is not set
446# CONFIG_INPUT_JOYSTICK is not set
447# CONFIG_INPUT_TABLET is not set
448# CONFIG_INPUT_TOUCHSCREEN is not set
449# CONFIG_INPUT_MISC is not set
450
451#
452# Hardware I/O ports
453#
454# CONFIG_SERIO is not set
455# CONFIG_GAMEPORT is not set
456
457#
458# Character devices
459#
460CONFIG_VT=y
461CONFIG_CONSOLE_TRANSLATIONS=y
462CONFIG_VT_CONSOLE=y
463CONFIG_HW_CONSOLE=y
464CONFIG_VT_HW_CONSOLE_BINDING=y
465CONFIG_DEVKMEM=y
466# CONFIG_SERIAL_NONSTANDARD is not set
467
468#
469# Serial drivers
470#
471# CONFIG_SERIAL_8250 is not set
472
473#
474# Non-8250 serial port support
475#
476CONFIG_SERIAL_SH_SCI=y
477CONFIG_SERIAL_SH_SCI_NR_UARTS=6
478CONFIG_SERIAL_SH_SCI_CONSOLE=y
479CONFIG_SERIAL_CORE=y
480CONFIG_SERIAL_CORE_CONSOLE=y
481CONFIG_UNIX98_PTYS=y
482# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
483CONFIG_LEGACY_PTYS=y
484CONFIG_LEGACY_PTY_COUNT=256
485# CONFIG_IPMI_HANDLER is not set
486CONFIG_HW_RANDOM=y
487# CONFIG_HW_RANDOM_TIMERIOMEM is not set
488# CONFIG_R3964 is not set
489# CONFIG_TCG_TPM is not set
490CONFIG_I2C=y
491CONFIG_I2C_BOARDINFO=y
492CONFIG_I2C_COMPAT=y
493# CONFIG_I2C_CHARDEV is not set
494CONFIG_I2C_HELPER_AUTO=y
495
496#
497# I2C Hardware Bus support
498#
499
500#
501# I2C system bus drivers (mostly embedded / system-on-chip)
502#
503# CONFIG_I2C_DESIGNWARE is not set
504# CONFIG_I2C_GPIO is not set
505# CONFIG_I2C_OCORES is not set
506CONFIG_I2C_SH_MOBILE=y
507# CONFIG_I2C_SIMTEC is not set
508
509#
510# External I2C/SMBus adapter drivers
511#
512# CONFIG_I2C_PARPORT_LIGHT is not set
513# CONFIG_I2C_TAOS_EVM is not set
514
515#
516# Other I2C/SMBus bus drivers
517#
518# CONFIG_I2C_PCA_PLATFORM is not set
519
520#
521# Miscellaneous I2C Chip support
522#
523# CONFIG_DS1682 is not set
524# CONFIG_SENSORS_TSL2550 is not set
525# CONFIG_I2C_DEBUG_CORE is not set
526# CONFIG_I2C_DEBUG_ALGO is not set
527# CONFIG_I2C_DEBUG_BUS is not set
528# CONFIG_I2C_DEBUG_CHIP is not set
529# CONFIG_SPI is not set
530
531#
532# PPS support
533#
534# CONFIG_PPS is not set
535CONFIG_ARCH_REQUIRE_GPIOLIB=y
536CONFIG_GPIOLIB=y
537CONFIG_GPIO_SYSFS=y
538
539#
540# Memory mapped GPIO expanders:
541#
542
543#
544# I2C GPIO expanders:
545#
546# CONFIG_GPIO_MAX732X is not set
547# CONFIG_GPIO_PCA953X is not set
548# CONFIG_GPIO_PCF857X is not set
549
550#
551# PCI GPIO expanders:
552#
553
554#
555# SPI GPIO expanders:
556#
557
558#
559# AC97 GPIO expanders:
560#
561# CONFIG_W1 is not set
562# CONFIG_POWER_SUPPLY is not set
563# CONFIG_HWMON is not set
564# CONFIG_THERMAL is not set
565# CONFIG_WATCHDOG is not set
566CONFIG_SSB_POSSIBLE=y
567
568#
569# Sonics Silicon Backplane
570#
571# CONFIG_SSB is not set
572
573#
574# Multifunction device drivers
575#
576# CONFIG_MFD_CORE is not set
577# CONFIG_MFD_SM501 is not set
578# CONFIG_HTC_PASIC3 is not set
579# CONFIG_TPS65010 is not set
580# CONFIG_TWL4030_CORE is not set
581# CONFIG_MFD_TMIO is not set
582# CONFIG_PMIC_DA903X is not set
583# CONFIG_MFD_WM8400 is not set
584# CONFIG_MFD_WM831X is not set
585# CONFIG_MFD_WM8350_I2C is not set
586# CONFIG_MFD_PCF50633 is not set
587# CONFIG_AB3100_CORE is not set
588# CONFIG_REGULATOR is not set
589# CONFIG_MEDIA_SUPPORT is not set
590
591#
592# Graphics support
593#
594# CONFIG_VGASTATE is not set
595# CONFIG_VIDEO_OUTPUT_CONTROL is not set
596# CONFIG_FB is not set
597# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
598
599#
600# Display device support
601#
602# CONFIG_DISPLAY_SUPPORT is not set
603
604#
605# Console display driver support
606#
607CONFIG_DUMMY_CONSOLE=y
608# CONFIG_SOUND is not set
609# CONFIG_HID_SUPPORT is not set
610CONFIG_USB_SUPPORT=y
611CONFIG_USB_ARCH_HAS_HCD=y
612# CONFIG_USB_ARCH_HAS_OHCI is not set
613# CONFIG_USB_ARCH_HAS_EHCI is not set
614# CONFIG_USB is not set
615# CONFIG_USB_OTG_WHITELIST is not set
616# CONFIG_USB_OTG_BLACKLIST_HUB is not set
617# CONFIG_USB_GADGET_MUSB_HDRC is not set
618
619#
620# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
621#
622CONFIG_USB_GADGET=y
623# CONFIG_USB_GADGET_DEBUG_FILES is not set
624# CONFIG_USB_GADGET_DEBUG_FS is not set
625CONFIG_USB_GADGET_VBUS_DRAW=2
626CONFIG_USB_GADGET_SELECTED=y
627# CONFIG_USB_GADGET_AT91 is not set
628# CONFIG_USB_GADGET_ATMEL_USBA is not set
629# CONFIG_USB_GADGET_FSL_USB2 is not set
630# CONFIG_USB_GADGET_LH7A40X is not set
631# CONFIG_USB_GADGET_OMAP is not set
632# CONFIG_USB_GADGET_PXA25X is not set
633CONFIG_USB_GADGET_R8A66597=y
634CONFIG_USB_R8A66597=y
635# CONFIG_USB_GADGET_PXA27X is not set
636# CONFIG_USB_GADGET_S3C_HSOTG is not set
637# CONFIG_USB_GADGET_IMX is not set
638# CONFIG_USB_GADGET_S3C2410 is not set
639# CONFIG_USB_GADGET_M66592 is not set
640# CONFIG_USB_GADGET_AMD5536UDC is not set
641# CONFIG_USB_GADGET_FSL_QE is not set
642# CONFIG_USB_GADGET_CI13XXX is not set
643# CONFIG_USB_GADGET_NET2280 is not set
644# CONFIG_USB_GADGET_GOKU is not set
645# CONFIG_USB_GADGET_LANGWELL is not set
646# CONFIG_USB_GADGET_DUMMY_HCD is not set
647CONFIG_USB_GADGET_DUALSPEED=y
648# CONFIG_USB_ZERO is not set
649# CONFIG_USB_AUDIO is not set
650# CONFIG_USB_ETH is not set
651# CONFIG_USB_GADGETFS is not set
652# CONFIG_USB_FILE_STORAGE is not set
653# CONFIG_USB_G_SERIAL is not set
654# CONFIG_USB_MIDI_GADGET is not set
655# CONFIG_USB_G_PRINTER is not set
656CONFIG_USB_CDC_COMPOSITE=y
657
658#
659# OTG and related infrastructure
660#
661# CONFIG_USB_GPIO_VBUS is not set
662# CONFIG_NOP_USB_XCEIV is not set
663# CONFIG_MMC is not set
664# CONFIG_MEMSTICK is not set
665# CONFIG_NEW_LEDS is not set
666# CONFIG_ACCESSIBILITY is not set
667CONFIG_RTC_LIB=y
668# CONFIG_RTC_CLASS is not set
669# CONFIG_DMADEVICES is not set
670# CONFIG_AUXDISPLAY is not set
671# CONFIG_UIO is not set
672
673#
674# TI VLYNQ
675#
676# CONFIG_STAGING is not set
677
678#
679# File systems
680#
681CONFIG_FILE_LOCKING=y
682# CONFIG_FSNOTIFY is not set
683# CONFIG_DNOTIFY is not set
684# CONFIG_INOTIFY is not set
685# CONFIG_INOTIFY_USER is not set
686# CONFIG_QUOTA is not set
687# CONFIG_AUTOFS_FS is not set
688# CONFIG_AUTOFS4_FS is not set
689# CONFIG_FUSE_FS is not set
690
691#
692# Caches
693#
694# CONFIG_FSCACHE is not set
695
696#
697# Pseudo filesystems
698#
699CONFIG_PROC_FS=y
700CONFIG_PROC_KCORE=y
701CONFIG_PROC_SYSCTL=y
702CONFIG_PROC_PAGE_MONITOR=y
703CONFIG_SYSFS=y
704CONFIG_TMPFS=y
705# CONFIG_TMPFS_POSIX_ACL is not set
706# CONFIG_HUGETLBFS is not set
707# CONFIG_HUGETLB_PAGE is not set
708# CONFIG_CONFIGFS_FS is not set
709# CONFIG_MISC_FILESYSTEMS is not set
710# CONFIG_NETWORK_FILESYSTEMS is not set
711# CONFIG_NLS is not set
712# CONFIG_DLM is not set
713
714#
715# Kernel hacking
716#
717CONFIG_TRACE_IRQFLAGS_SUPPORT=y
718# CONFIG_PRINTK_TIME is not set
719CONFIG_ENABLE_WARN_DEPRECATED=y
720# CONFIG_ENABLE_MUST_CHECK is not set
721CONFIG_FRAME_WARN=1024
722# CONFIG_MAGIC_SYSRQ is not set
723# CONFIG_STRIP_ASM_SYMS is not set
724# CONFIG_UNUSED_SYMBOLS is not set
725CONFIG_DEBUG_FS=y
726# CONFIG_HEADERS_CHECK is not set
727# CONFIG_DEBUG_KERNEL is not set
728# CONFIG_DEBUG_BUGVERBOSE is not set
729# CONFIG_DEBUG_MEMORY_INIT is not set
730# CONFIG_RCU_CPU_STALL_DETECTOR is not set
731# CONFIG_LATENCYTOP is not set
732# CONFIG_SYSCTL_SYSCALL_CHECK is not set
733CONFIG_HAVE_FUNCTION_TRACER=y
734CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
735CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
736CONFIG_HAVE_DYNAMIC_FTRACE=y
737CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
738CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
739CONFIG_TRACING_SUPPORT=y
740# CONFIG_FTRACE is not set
741# CONFIG_DYNAMIC_DEBUG is not set
742# CONFIG_DMA_API_DEBUG is not set
743# CONFIG_SAMPLES is not set
744CONFIG_HAVE_ARCH_KGDB=y
745# CONFIG_SH_STANDARD_BIOS is not set
746# CONFIG_EARLY_SCIF_CONSOLE is not set
747# CONFIG_DWARF_UNWINDER is not set
748
749#
750# Security options
751#
752# CONFIG_KEYS is not set
753# CONFIG_SECURITY is not set
754# CONFIG_SECURITYFS is not set
755# CONFIG_SECURITY_FILE_CAPABILITIES is not set
756# CONFIG_CRYPTO is not set
757# CONFIG_BINARY_PRINTF is not set
758
759#
760# Library routines
761#
762CONFIG_GENERIC_FIND_LAST_BIT=y
763# CONFIG_CRC_CCITT is not set
764# CONFIG_CRC16 is not set
765# CONFIG_CRC_T10DIF is not set
766# CONFIG_CRC_ITU_T is not set
767# CONFIG_CRC32 is not set
768# CONFIG_CRC7 is not set
769# CONFIG_LIBCRC32C is not set
770CONFIG_ZLIB_INFLATE=y
771CONFIG_DECOMPRESS_GZIP=y
772CONFIG_HAS_IOMEM=y
773CONFIG_HAS_IOPORT=y
774CONFIG_HAS_DMA=y
775CONFIG_HAVE_LMB=y
776CONFIG_NLATTR=y
777CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/kfr2r09_defconfig b/arch/sh/configs/kfr2r09_defconfig
new file mode 100644
index 000000000000..8ae65d294b11
--- /dev/null
+++ b/arch/sh/configs/kfr2r09_defconfig
@@ -0,0 +1,1080 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.31
4# Fri Sep 25 11:54:22 2009
5#
6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y
8# CONFIG_SUPERH64 is not set
9CONFIG_ARCH_DEFCONFIG="arch/sh/configs/shx3_defconfig"
10CONFIG_RWSEM_GENERIC_SPINLOCK=y
11CONFIG_GENERIC_BUG=y
12CONFIG_GENERIC_FIND_NEXT_BIT=y
13CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
16CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_IRQ_PER_CPU=y
18CONFIG_GENERIC_GPIO=y
19CONFIG_GENERIC_TIME=y
20CONFIG_GENERIC_CLOCKEVENTS=y
21CONFIG_ARCH_SUSPEND_POSSIBLE=y
22CONFIG_ARCH_HIBERNATION_POSSIBLE=y
23CONFIG_SYS_SUPPORTS_CMT=y
24CONFIG_SYS_SUPPORTS_TMU=y
25CONFIG_STACKTRACE_SUPPORT=y
26CONFIG_LOCKDEP_SUPPORT=y
27CONFIG_HAVE_LATENCYTOP_SUPPORT=y
28# CONFIG_ARCH_HAS_ILOG2_U32 is not set
29# CONFIG_ARCH_HAS_ILOG2_U64 is not set
30CONFIG_ARCH_NO_VIRT_TO_BUS=y
31CONFIG_ARCH_HAS_DEFAULT_IDLE=y
32CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
33CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
34CONFIG_CONSTRUCTORS=y
35
36#
37# General setup
38#
39CONFIG_EXPERIMENTAL=y
40CONFIG_BROKEN_ON_SMP=y
41CONFIG_LOCK_KERNEL=y
42CONFIG_INIT_ENV_ARG_LIMIT=32
43CONFIG_LOCALVERSION=""
44# CONFIG_LOCALVERSION_AUTO is not set
45CONFIG_HAVE_KERNEL_GZIP=y
46CONFIG_HAVE_KERNEL_BZIP2=y
47CONFIG_HAVE_KERNEL_LZMA=y
48CONFIG_KERNEL_GZIP=y
49# CONFIG_KERNEL_BZIP2 is not set
50# CONFIG_KERNEL_LZMA is not set
51CONFIG_SWAP=y
52CONFIG_SYSVIPC=y
53CONFIG_SYSVIPC_SYSCTL=y
54# CONFIG_POSIX_MQUEUE is not set
55CONFIG_BSD_PROCESS_ACCT=y
56# CONFIG_BSD_PROCESS_ACCT_V3 is not set
57# CONFIG_TASKSTATS is not set
58# CONFIG_AUDIT is not set
59
60#
61# RCU Subsystem
62#
63CONFIG_TREE_RCU=y
64# CONFIG_TREE_PREEMPT_RCU is not set
65# CONFIG_RCU_TRACE is not set
66CONFIG_RCU_FANOUT=32
67# CONFIG_RCU_FANOUT_EXACT is not set
68# CONFIG_TREE_RCU_TRACE is not set
69CONFIG_IKCONFIG=y
70CONFIG_IKCONFIG_PROC=y
71CONFIG_LOG_BUF_SHIFT=14
72CONFIG_GROUP_SCHED=y
73CONFIG_FAIR_GROUP_SCHED=y
74# CONFIG_RT_GROUP_SCHED is not set
75CONFIG_USER_SCHED=y
76# CONFIG_CGROUP_SCHED is not set
77# CONFIG_CGROUPS is not set
78CONFIG_SYSFS_DEPRECATED=y
79CONFIG_SYSFS_DEPRECATED_V2=y
80# CONFIG_RELAY is not set
81# CONFIG_NAMESPACES is not set
82CONFIG_BLK_DEV_INITRD=y
83CONFIG_INITRAMFS_SOURCE=""
84CONFIG_RD_GZIP=y
85# CONFIG_RD_BZIP2 is not set
86# CONFIG_RD_LZMA is not set
87CONFIG_CC_OPTIMIZE_FOR_SIZE=y
88CONFIG_SYSCTL=y
89CONFIG_ANON_INODES=y
90CONFIG_EMBEDDED=y
91CONFIG_UID16=y
92CONFIG_SYSCTL_SYSCALL=y
93# CONFIG_KALLSYMS is not set
94CONFIG_HOTPLUG=y
95CONFIG_PRINTK=y
96CONFIG_BUG=y
97CONFIG_ELF_CORE=y
98CONFIG_BASE_FULL=y
99CONFIG_FUTEX=y
100CONFIG_EPOLL=y
101CONFIG_SIGNALFD=y
102CONFIG_TIMERFD=y
103CONFIG_EVENTFD=y
104CONFIG_SHMEM=y
105CONFIG_AIO=y
106CONFIG_HAVE_PERF_EVENTS=y
107
108#
109# Kernel Performance Events And Counters
110#
111# CONFIG_PERF_EVENTS is not set
112# CONFIG_PERF_COUNTERS is not set
113CONFIG_VM_EVENT_COUNTERS=y
114CONFIG_COMPAT_BRK=y
115CONFIG_SLAB=y
116# CONFIG_SLUB is not set
117# CONFIG_SLOB is not set
118# CONFIG_PROFILING is not set
119CONFIG_HAVE_OPROFILE=y
120CONFIG_HAVE_IOREMAP_PROT=y
121CONFIG_HAVE_KPROBES=y
122CONFIG_HAVE_KRETPROBES=y
123CONFIG_HAVE_ARCH_TRACEHOOK=y
124CONFIG_HAVE_CLK=y
125CONFIG_HAVE_DMA_API_DEBUG=y
126
127#
128# GCOV-based kernel profiling
129#
130# CONFIG_GCOV_KERNEL is not set
131# CONFIG_SLOW_WORK is not set
132CONFIG_HAVE_GENERIC_DMA_COHERENT=y
133CONFIG_SLABINFO=y
134CONFIG_RT_MUTEXES=y
135CONFIG_BASE_SMALL=0
136CONFIG_MODULES=y
137# CONFIG_MODULE_FORCE_LOAD is not set
138CONFIG_MODULE_UNLOAD=y
139# CONFIG_MODULE_FORCE_UNLOAD is not set
140# CONFIG_MODVERSIONS is not set
141# CONFIG_MODULE_SRCVERSION_ALL is not set
142CONFIG_BLOCK=y
143CONFIG_LBDAF=y
144# CONFIG_BLK_DEV_BSG is not set
145# CONFIG_BLK_DEV_INTEGRITY is not set
146
147#
148# IO Schedulers
149#
150CONFIG_IOSCHED_NOOP=y
151# CONFIG_IOSCHED_AS is not set
152# CONFIG_IOSCHED_DEADLINE is not set
153# CONFIG_IOSCHED_CFQ is not set
154# CONFIG_DEFAULT_AS is not set
155# CONFIG_DEFAULT_DEADLINE is not set
156# CONFIG_DEFAULT_CFQ is not set
157CONFIG_DEFAULT_NOOP=y
158CONFIG_DEFAULT_IOSCHED="noop"
159# CONFIG_FREEZER is not set
160
161#
162# System type
163#
164CONFIG_CPU_SH4=y
165CONFIG_CPU_SH4A=y
166CONFIG_CPU_SHX2=y
167CONFIG_ARCH_SHMOBILE=y
168# CONFIG_CPU_SUBTYPE_SH7619 is not set
169# CONFIG_CPU_SUBTYPE_SH7201 is not set
170# CONFIG_CPU_SUBTYPE_SH7203 is not set
171# CONFIG_CPU_SUBTYPE_SH7206 is not set
172# CONFIG_CPU_SUBTYPE_SH7263 is not set
173# CONFIG_CPU_SUBTYPE_MXG is not set
174# CONFIG_CPU_SUBTYPE_SH7705 is not set
175# CONFIG_CPU_SUBTYPE_SH7706 is not set
176# CONFIG_CPU_SUBTYPE_SH7707 is not set
177# CONFIG_CPU_SUBTYPE_SH7708 is not set
178# CONFIG_CPU_SUBTYPE_SH7709 is not set
179# CONFIG_CPU_SUBTYPE_SH7710 is not set
180# CONFIG_CPU_SUBTYPE_SH7712 is not set
181# CONFIG_CPU_SUBTYPE_SH7720 is not set
182# CONFIG_CPU_SUBTYPE_SH7721 is not set
183# CONFIG_CPU_SUBTYPE_SH7750 is not set
184# CONFIG_CPU_SUBTYPE_SH7091 is not set
185# CONFIG_CPU_SUBTYPE_SH7750R is not set
186# CONFIG_CPU_SUBTYPE_SH7750S is not set
187# CONFIG_CPU_SUBTYPE_SH7751 is not set
188# CONFIG_CPU_SUBTYPE_SH7751R is not set
189# CONFIG_CPU_SUBTYPE_SH7760 is not set
190# CONFIG_CPU_SUBTYPE_SH4_202 is not set
191# CONFIG_CPU_SUBTYPE_SH7723 is not set
192CONFIG_CPU_SUBTYPE_SH7724=y
193# CONFIG_CPU_SUBTYPE_SH7757 is not set
194# CONFIG_CPU_SUBTYPE_SH7763 is not set
195# CONFIG_CPU_SUBTYPE_SH7770 is not set
196# CONFIG_CPU_SUBTYPE_SH7780 is not set
197# CONFIG_CPU_SUBTYPE_SH7785 is not set
198# CONFIG_CPU_SUBTYPE_SH7786 is not set
199# CONFIG_CPU_SUBTYPE_SHX3 is not set
200# CONFIG_CPU_SUBTYPE_SH7343 is not set
201# CONFIG_CPU_SUBTYPE_SH7722 is not set
202# CONFIG_CPU_SUBTYPE_SH7366 is not set
203
204#
205# Memory management options
206#
207CONFIG_QUICKLIST=y
208CONFIG_MMU=y
209CONFIG_PAGE_OFFSET=0x80000000
210CONFIG_FORCE_MAX_ZONEORDER=11
211CONFIG_MEMORY_START=0x08000000
212CONFIG_MEMORY_SIZE=0x08000000
213CONFIG_29BIT=y
214# CONFIG_X2TLB is not set
215CONFIG_VSYSCALL=y
216CONFIG_ARCH_FLATMEM_ENABLE=y
217CONFIG_ARCH_SPARSEMEM_ENABLE=y
218CONFIG_ARCH_SPARSEMEM_DEFAULT=y
219CONFIG_MAX_ACTIVE_REGIONS=1
220CONFIG_ARCH_POPULATES_NODE_MAP=y
221CONFIG_ARCH_SELECT_MEMORY_MODEL=y
222CONFIG_PAGE_SIZE_4KB=y
223# CONFIG_PAGE_SIZE_8KB is not set
224# CONFIG_PAGE_SIZE_16KB is not set
225# CONFIG_PAGE_SIZE_64KB is not set
226CONFIG_SELECT_MEMORY_MODEL=y
227CONFIG_FLATMEM_MANUAL=y
228# CONFIG_DISCONTIGMEM_MANUAL is not set
229# CONFIG_SPARSEMEM_MANUAL is not set
230CONFIG_FLATMEM=y
231CONFIG_FLAT_NODE_MEM_MAP=y
232CONFIG_SPARSEMEM_STATIC=y
233CONFIG_PAGEFLAGS_EXTENDED=y
234CONFIG_SPLIT_PTLOCK_CPUS=4
235# CONFIG_PHYS_ADDR_T_64BIT is not set
236CONFIG_ZONE_DMA_FLAG=0
237CONFIG_NR_QUICK=2
238CONFIG_HAVE_MLOCK=y
239CONFIG_HAVE_MLOCKED_PAGE_BIT=y
240# CONFIG_KSM is not set
241CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
242
243#
244# Cache configuration
245#
246CONFIG_CACHE_WRITEBACK=y
247# CONFIG_CACHE_WRITETHROUGH is not set
248# CONFIG_CACHE_OFF is not set
249
250#
251# Processor features
252#
253CONFIG_CPU_LITTLE_ENDIAN=y
254# CONFIG_CPU_BIG_ENDIAN is not set
255CONFIG_SH_FPU=y
256# CONFIG_SH_STORE_QUEUES is not set
257CONFIG_CPU_HAS_INTEVT=y
258CONFIG_CPU_HAS_SR_RB=y
259CONFIG_CPU_HAS_FPU=y
260
261#
262# Board support
263#
264# CONFIG_SH_7724_SOLUTION_ENGINE is not set
265CONFIG_SH_KFR2R09=y
266# CONFIG_SH_ECOVEC is not set
267
268#
269# Timer and clock configuration
270#
271# CONFIG_SH_TIMER_TMU is not set
272CONFIG_SH_TIMER_CMT=y
273CONFIG_SH_PCLK_FREQ=33333333
274CONFIG_SH_CLK_CPG=y
275CONFIG_TICK_ONESHOT=y
276CONFIG_NO_HZ=y
277# CONFIG_HIGH_RES_TIMERS is not set
278CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
279
280#
281# CPU Frequency scaling
282#
283# CONFIG_CPU_FREQ is not set
284
285#
286# DMA support
287#
288# CONFIG_SH_DMA is not set
289
290#
291# Companion Chips
292#
293
294#
295# Additional SuperH Device Drivers
296#
297# CONFIG_HEARTBEAT is not set
298# CONFIG_PUSH_SWITCH is not set
299
300#
301# Kernel features
302#
303# CONFIG_HZ_100 is not set
304# CONFIG_HZ_250 is not set
305# CONFIG_HZ_300 is not set
306CONFIG_HZ_1000=y
307CONFIG_HZ=1000
308# CONFIG_SCHED_HRTICK is not set
309CONFIG_KEXEC=y
310# CONFIG_CRASH_DUMP is not set
311# CONFIG_SECCOMP is not set
312# CONFIG_PREEMPT_NONE is not set
313# CONFIG_PREEMPT_VOLUNTARY is not set
314CONFIG_PREEMPT=y
315CONFIG_GUSA=y
316# CONFIG_SPARSE_IRQ is not set
317
318#
319# Boot options
320#
321CONFIG_ZERO_PAGE_OFFSET=0x00001000
322CONFIG_BOOT_LINK_OFFSET=0x00800000
323CONFIG_ENTRY_OFFSET=0x00001000
324CONFIG_CMDLINE_OVERWRITE=y
325# CONFIG_CMDLINE_EXTEND is not set
326CONFIG_CMDLINE="console=tty0 console=ttySC1,115200"
327
328#
329# Bus options
330#
331# CONFIG_ARCH_SUPPORTS_MSI is not set
332# CONFIG_PCCARD is not set
333
334#
335# Executable file formats
336#
337CONFIG_BINFMT_ELF=y
338# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
339# CONFIG_HAVE_AOUT is not set
340# CONFIG_BINFMT_MISC is not set
341
342#
343# Power management options (EXPERIMENTAL)
344#
345CONFIG_PM=y
346# CONFIG_PM_DEBUG is not set
347# CONFIG_SUSPEND is not set
348# CONFIG_HIBERNATION is not set
349CONFIG_PM_RUNTIME=y
350CONFIG_CPU_IDLE=y
351CONFIG_CPU_IDLE_GOV_LADDER=y
352CONFIG_CPU_IDLE_GOV_MENU=y
353CONFIG_NET=y
354
355#
356# Networking options
357#
358CONFIG_PACKET=y
359CONFIG_PACKET_MMAP=y
360CONFIG_UNIX=y
361# CONFIG_NET_KEY is not set
362CONFIG_INET=y
363# CONFIG_IP_MULTICAST is not set
364# CONFIG_IP_ADVANCED_ROUTER is not set
365CONFIG_IP_FIB_HASH=y
366# CONFIG_IP_PNP is not set
367# CONFIG_NET_IPIP is not set
368# CONFIG_NET_IPGRE is not set
369# CONFIG_ARPD is not set
370# CONFIG_SYN_COOKIES is not set
371# CONFIG_INET_AH is not set
372# CONFIG_INET_ESP is not set
373# CONFIG_INET_IPCOMP is not set
374# CONFIG_INET_XFRM_TUNNEL is not set
375# CONFIG_INET_TUNNEL is not set
376# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
377# CONFIG_INET_XFRM_MODE_TUNNEL is not set
378# CONFIG_INET_XFRM_MODE_BEET is not set
379# CONFIG_INET_LRO is not set
380# CONFIG_INET_DIAG is not set
381# CONFIG_TCP_CONG_ADVANCED is not set
382CONFIG_TCP_CONG_CUBIC=y
383CONFIG_DEFAULT_TCP_CONG="cubic"
384# CONFIG_TCP_MD5SIG is not set
385# CONFIG_IPV6 is not set
386# CONFIG_NETWORK_SECMARK is not set
387# CONFIG_NETFILTER is not set
388# CONFIG_IP_DCCP is not set
389# CONFIG_IP_SCTP is not set
390# CONFIG_RDS is not set
391# CONFIG_TIPC is not set
392# CONFIG_ATM is not set
393# CONFIG_BRIDGE is not set
394# CONFIG_NET_DSA is not set
395# CONFIG_VLAN_8021Q is not set
396# CONFIG_DECNET is not set
397# CONFIG_LLC2 is not set
398# CONFIG_IPX is not set
399# CONFIG_ATALK is not set
400# CONFIG_X25 is not set
401# CONFIG_LAPB is not set
402# CONFIG_ECONET is not set
403# CONFIG_WAN_ROUTER is not set
404# CONFIG_PHONET is not set
405# CONFIG_IEEE802154 is not set
406# CONFIG_NET_SCHED is not set
407# CONFIG_DCB is not set
408
409#
410# Network testing
411#
412# CONFIG_NET_PKTGEN is not set
413# CONFIG_HAMRADIO is not set
414# CONFIG_CAN is not set
415# CONFIG_IRDA is not set
416# CONFIG_BT is not set
417# CONFIG_AF_RXRPC is not set
418# CONFIG_WIRELESS is not set
419# CONFIG_WIMAX is not set
420# CONFIG_RFKILL is not set
421# CONFIG_NET_9P is not set
422
423#
424# Device Drivers
425#
426
427#
428# Generic Driver Options
429#
430CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
431# CONFIG_DEVTMPFS is not set
432CONFIG_STANDALONE=y
433CONFIG_PREVENT_FIRMWARE_BUILD=y
434CONFIG_FW_LOADER=y
435CONFIG_FIRMWARE_IN_KERNEL=y
436CONFIG_EXTRA_FIRMWARE=""
437# CONFIG_SYS_HYPERVISOR is not set
438# CONFIG_CONNECTOR is not set
439CONFIG_MTD=y
440# CONFIG_MTD_DEBUG is not set
441# CONFIG_MTD_TESTS is not set
442CONFIG_MTD_CONCAT=y
443CONFIG_MTD_PARTITIONS=y
444# CONFIG_MTD_REDBOOT_PARTS is not set
445CONFIG_MTD_CMDLINE_PARTS=y
446# CONFIG_MTD_AR7_PARTS is not set
447
448#
449# User Modules And Translation Layers
450#
451CONFIG_MTD_CHAR=y
452CONFIG_MTD_BLKDEVS=y
453CONFIG_MTD_BLOCK=y
454# CONFIG_FTL is not set
455# CONFIG_NFTL is not set
456# CONFIG_INFTL is not set
457# CONFIG_RFD_FTL is not set
458# CONFIG_SSFDC is not set
459# CONFIG_MTD_OOPS is not set
460
461#
462# RAM/ROM/Flash chip drivers
463#
464CONFIG_MTD_CFI=y
465# CONFIG_MTD_JEDECPROBE is not set
466CONFIG_MTD_GEN_PROBE=y
467# CONFIG_MTD_CFI_ADV_OPTIONS is not set
468CONFIG_MTD_MAP_BANK_WIDTH_1=y
469CONFIG_MTD_MAP_BANK_WIDTH_2=y
470CONFIG_MTD_MAP_BANK_WIDTH_4=y
471# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
472# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
473# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
474CONFIG_MTD_CFI_I1=y
475CONFIG_MTD_CFI_I2=y
476# CONFIG_MTD_CFI_I4 is not set
477# CONFIG_MTD_CFI_I8 is not set
478CONFIG_MTD_CFI_INTELEXT=y
479# CONFIG_MTD_CFI_AMDSTD is not set
480# CONFIG_MTD_CFI_STAA is not set
481CONFIG_MTD_CFI_UTIL=y
482# CONFIG_MTD_RAM is not set
483# CONFIG_MTD_ROM is not set
484# CONFIG_MTD_ABSENT is not set
485
486#
487# Mapping drivers for chip access
488#
489# CONFIG_MTD_COMPLEX_MAPPINGS is not set
490CONFIG_MTD_PHYSMAP=y
491# CONFIG_MTD_PHYSMAP_COMPAT is not set
492# CONFIG_MTD_PLATRAM is not set
493
494#
495# Self-contained MTD device drivers
496#
497# CONFIG_MTD_SLRAM is not set
498# CONFIG_MTD_PHRAM is not set
499# CONFIG_MTD_MTDRAM is not set
500# CONFIG_MTD_BLOCK2MTD is not set
501
502#
503# Disk-On-Chip Device Drivers
504#
505# CONFIG_MTD_DOC2000 is not set
506# CONFIG_MTD_DOC2001 is not set
507# CONFIG_MTD_DOC2001PLUS is not set
508# CONFIG_MTD_NAND is not set
509CONFIG_MTD_ONENAND=y
510# CONFIG_MTD_ONENAND_VERIFY_WRITE is not set
511CONFIG_MTD_ONENAND_GENERIC=y
512# CONFIG_MTD_ONENAND_OTP is not set
513# CONFIG_MTD_ONENAND_2X_PROGRAM is not set
514# CONFIG_MTD_ONENAND_SIM is not set
515
516#
517# LPDDR flash memory drivers
518#
519# CONFIG_MTD_LPDDR is not set
520
521#
522# UBI - Unsorted block images
523#
524CONFIG_MTD_UBI=y
525CONFIG_MTD_UBI_WL_THRESHOLD=4096
526CONFIG_MTD_UBI_BEB_RESERVE=1
527# CONFIG_MTD_UBI_GLUEBI is not set
528
529#
530# UBI debugging options
531#
532# CONFIG_MTD_UBI_DEBUG is not set
533# CONFIG_PARPORT is not set
534CONFIG_BLK_DEV=y
535# CONFIG_BLK_DEV_COW_COMMON is not set
536# CONFIG_BLK_DEV_LOOP is not set
537# CONFIG_BLK_DEV_NBD is not set
538# CONFIG_BLK_DEV_RAM is not set
539# CONFIG_CDROM_PKTCDVD is not set
540# CONFIG_ATA_OVER_ETH is not set
541# CONFIG_BLK_DEV_HD is not set
542# CONFIG_MISC_DEVICES is not set
543CONFIG_HAVE_IDE=y
544# CONFIG_IDE is not set
545
546#
547# SCSI device support
548#
549# CONFIG_RAID_ATTRS is not set
550# CONFIG_SCSI is not set
551# CONFIG_SCSI_DMA is not set
552# CONFIG_SCSI_NETLINK is not set
553# CONFIG_ATA is not set
554# CONFIG_MD is not set
555# CONFIG_NETDEVICES is not set
556# CONFIG_ISDN is not set
557# CONFIG_PHONE is not set
558
559#
560# Input device support
561#
562CONFIG_INPUT=y
563# CONFIG_INPUT_FF_MEMLESS is not set
564# CONFIG_INPUT_POLLDEV is not set
565
566#
567# Userland interfaces
568#
569# CONFIG_INPUT_MOUSEDEV is not set
570# CONFIG_INPUT_JOYDEV is not set
571CONFIG_INPUT_EVDEV=y
572# CONFIG_INPUT_EVBUG is not set
573
574#
575# Input Device Drivers
576#
577CONFIG_INPUT_KEYBOARD=y
578# CONFIG_KEYBOARD_ADP5588 is not set
579# CONFIG_KEYBOARD_ATKBD is not set
580# CONFIG_QT2160 is not set
581# CONFIG_KEYBOARD_LKKBD is not set
582# CONFIG_KEYBOARD_GPIO is not set
583# CONFIG_KEYBOARD_MATRIX is not set
584# CONFIG_KEYBOARD_MAX7359 is not set
585# CONFIG_KEYBOARD_NEWTON is not set
586# CONFIG_KEYBOARD_OPENCORES is not set
587# CONFIG_KEYBOARD_STOWAWAY is not set
588# CONFIG_KEYBOARD_SUNKBD is not set
589CONFIG_KEYBOARD_SH_KEYSC=y
590# CONFIG_KEYBOARD_XTKBD is not set
591# CONFIG_INPUT_MOUSE is not set
592# CONFIG_INPUT_JOYSTICK is not set
593# CONFIG_INPUT_TABLET is not set
594# CONFIG_INPUT_TOUCHSCREEN is not set
595# CONFIG_INPUT_MISC is not set
596
597#
598# Hardware I/O ports
599#
600# CONFIG_SERIO is not set
601# CONFIG_GAMEPORT is not set
602
603#
604# Character devices
605#
606CONFIG_VT=y
607CONFIG_CONSOLE_TRANSLATIONS=y
608CONFIG_VT_CONSOLE=y
609CONFIG_HW_CONSOLE=y
610CONFIG_VT_HW_CONSOLE_BINDING=y
611CONFIG_DEVKMEM=y
612# CONFIG_SERIAL_NONSTANDARD is not set
613
614#
615# Serial drivers
616#
617# CONFIG_SERIAL_8250 is not set
618
619#
620# Non-8250 serial port support
621#
622CONFIG_SERIAL_SH_SCI=y
623CONFIG_SERIAL_SH_SCI_NR_UARTS=6
624CONFIG_SERIAL_SH_SCI_CONSOLE=y
625CONFIG_SERIAL_CORE=y
626CONFIG_SERIAL_CORE_CONSOLE=y
627CONFIG_UNIX98_PTYS=y
628# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
629CONFIG_LEGACY_PTYS=y
630CONFIG_LEGACY_PTY_COUNT=256
631# CONFIG_IPMI_HANDLER is not set
632CONFIG_HW_RANDOM=y
633# CONFIG_HW_RANDOM_TIMERIOMEM is not set
634# CONFIG_R3964 is not set
635# CONFIG_RAW_DRIVER is not set
636# CONFIG_TCG_TPM is not set
637CONFIG_I2C=y
638CONFIG_I2C_BOARDINFO=y
639CONFIG_I2C_COMPAT=y
640# CONFIG_I2C_CHARDEV is not set
641CONFIG_I2C_HELPER_AUTO=y
642
643#
644# I2C Hardware Bus support
645#
646
647#
648# I2C system bus drivers (mostly embedded / system-on-chip)
649#
650# CONFIG_I2C_DESIGNWARE is not set
651# CONFIG_I2C_GPIO is not set
652# CONFIG_I2C_OCORES is not set
653CONFIG_I2C_SH_MOBILE=y
654# CONFIG_I2C_SIMTEC is not set
655
656#
657# External I2C/SMBus adapter drivers
658#
659# CONFIG_I2C_PARPORT_LIGHT is not set
660# CONFIG_I2C_TAOS_EVM is not set
661
662#
663# Other I2C/SMBus bus drivers
664#
665# CONFIG_I2C_PCA_PLATFORM is not set
666# CONFIG_I2C_STUB is not set
667
668#
669# Miscellaneous I2C Chip support
670#
671# CONFIG_DS1682 is not set
672# CONFIG_SENSORS_TSL2550 is not set
673# CONFIG_I2C_DEBUG_CORE is not set
674# CONFIG_I2C_DEBUG_ALGO is not set
675# CONFIG_I2C_DEBUG_BUS is not set
676# CONFIG_I2C_DEBUG_CHIP is not set
677# CONFIG_SPI is not set
678
679#
680# PPS support
681#
682# CONFIG_PPS is not set
683CONFIG_ARCH_REQUIRE_GPIOLIB=y
684CONFIG_GPIOLIB=y
685CONFIG_GPIO_SYSFS=y
686
687#
688# Memory mapped GPIO expanders:
689#
690
691#
692# I2C GPIO expanders:
693#
694# CONFIG_GPIO_MAX732X is not set
695# CONFIG_GPIO_PCA953X is not set
696# CONFIG_GPIO_PCF857X is not set
697
698#
699# PCI GPIO expanders:
700#
701
702#
703# SPI GPIO expanders:
704#
705
706#
707# AC97 GPIO expanders:
708#
709# CONFIG_W1 is not set
710# CONFIG_POWER_SUPPLY is not set
711# CONFIG_HWMON is not set
712# CONFIG_THERMAL is not set
713# CONFIG_WATCHDOG is not set
714CONFIG_SSB_POSSIBLE=y
715
716#
717# Sonics Silicon Backplane
718#
719# CONFIG_SSB is not set
720
721#
722# Multifunction device drivers
723#
724# CONFIG_MFD_CORE is not set
725# CONFIG_MFD_SM501 is not set
726# CONFIG_HTC_PASIC3 is not set
727# CONFIG_TPS65010 is not set
728# CONFIG_TWL4030_CORE is not set
729# CONFIG_MFD_TMIO is not set
730# CONFIG_PMIC_DA903X is not set
731# CONFIG_MFD_WM8400 is not set
732# CONFIG_MFD_WM831X is not set
733# CONFIG_MFD_WM8350_I2C is not set
734# CONFIG_MFD_PCF50633 is not set
735# CONFIG_AB3100_CORE is not set
736# CONFIG_REGULATOR is not set
737# CONFIG_MEDIA_SUPPORT is not set
738
739#
740# Graphics support
741#
742# CONFIG_VGASTATE is not set
743# CONFIG_VIDEO_OUTPUT_CONTROL is not set
744CONFIG_FB=y
745# CONFIG_FIRMWARE_EDID is not set
746# CONFIG_FB_DDC is not set
747# CONFIG_FB_BOOT_VESA_SUPPORT is not set
748# CONFIG_FB_CFB_FILLRECT is not set
749# CONFIG_FB_CFB_COPYAREA is not set
750# CONFIG_FB_CFB_IMAGEBLIT is not set
751# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
752CONFIG_FB_SYS_FILLRECT=y
753CONFIG_FB_SYS_COPYAREA=y
754CONFIG_FB_SYS_IMAGEBLIT=y
755# CONFIG_FB_FOREIGN_ENDIAN is not set
756CONFIG_FB_SYS_FOPS=y
757CONFIG_FB_DEFERRED_IO=y
758# CONFIG_FB_SVGALIB is not set
759# CONFIG_FB_MACMODES is not set
760# CONFIG_FB_BACKLIGHT is not set
761# CONFIG_FB_MODE_HELPERS is not set
762# CONFIG_FB_TILEBLITTING is not set
763
764#
765# Frame buffer hardware drivers
766#
767# CONFIG_FB_S1D13XXX is not set
768CONFIG_FB_SH_MOBILE_LCDC=y
769# CONFIG_FB_VIRTUAL is not set
770# CONFIG_FB_METRONOME is not set
771# CONFIG_FB_MB862XX is not set
772# CONFIG_FB_BROADSHEET is not set
773# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
774
775#
776# Display device support
777#
778# CONFIG_DISPLAY_SUPPORT is not set
779
780#
781# Console display driver support
782#
783CONFIG_DUMMY_CONSOLE=y
784CONFIG_FRAMEBUFFER_CONSOLE=y
785CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
786# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
787CONFIG_FONTS=y
788# CONFIG_FONT_8x8 is not set
789# CONFIG_FONT_8x16 is not set
790# CONFIG_FONT_6x11 is not set
791# CONFIG_FONT_7x14 is not set
792# CONFIG_FONT_PEARL_8x8 is not set
793# CONFIG_FONT_ACORN_8x8 is not set
794CONFIG_FONT_MINI_4x6=y
795# CONFIG_FONT_SUN8x16 is not set
796# CONFIG_FONT_SUN12x22 is not set
797# CONFIG_FONT_10x18 is not set
798CONFIG_LOGO=y
799# CONFIG_LOGO_LINUX_MONO is not set
800# CONFIG_LOGO_LINUX_VGA16 is not set
801# CONFIG_LOGO_LINUX_CLUT224 is not set
802# CONFIG_LOGO_SUPERH_MONO is not set
803CONFIG_LOGO_SUPERH_VGA16=y
804# CONFIG_LOGO_SUPERH_CLUT224 is not set
805# CONFIG_SOUND is not set
806# CONFIG_HID_SUPPORT is not set
807CONFIG_USB_SUPPORT=y
808CONFIG_USB_ARCH_HAS_HCD=y
809# CONFIG_USB_ARCH_HAS_OHCI is not set
810# CONFIG_USB_ARCH_HAS_EHCI is not set
811# CONFIG_USB is not set
812# CONFIG_USB_OTG_WHITELIST is not set
813# CONFIG_USB_OTG_BLACKLIST_HUB is not set
814# CONFIG_USB_GADGET_MUSB_HDRC is not set
815
816#
817# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
818#
819CONFIG_USB_GADGET=y
820# CONFIG_USB_GADGET_DEBUG_FILES is not set
821# CONFIG_USB_GADGET_DEBUG_FS is not set
822CONFIG_USB_GADGET_VBUS_DRAW=2
823CONFIG_USB_GADGET_SELECTED=y
824# CONFIG_USB_GADGET_AT91 is not set
825# CONFIG_USB_GADGET_ATMEL_USBA is not set
826# CONFIG_USB_GADGET_FSL_USB2 is not set
827# CONFIG_USB_GADGET_LH7A40X is not set
828# CONFIG_USB_GADGET_OMAP is not set
829# CONFIG_USB_GADGET_PXA25X is not set
830CONFIG_USB_GADGET_R8A66597=y
831CONFIG_USB_R8A66597=y
832# CONFIG_USB_GADGET_PXA27X is not set
833# CONFIG_USB_GADGET_S3C_HSOTG is not set
834# CONFIG_USB_GADGET_IMX is not set
835# CONFIG_USB_GADGET_S3C2410 is not set
836# CONFIG_USB_GADGET_M66592 is not set
837# CONFIG_USB_GADGET_AMD5536UDC is not set
838# CONFIG_USB_GADGET_FSL_QE is not set
839# CONFIG_USB_GADGET_CI13XXX is not set
840# CONFIG_USB_GADGET_NET2280 is not set
841# CONFIG_USB_GADGET_GOKU is not set
842# CONFIG_USB_GADGET_LANGWELL is not set
843# CONFIG_USB_GADGET_DUMMY_HCD is not set
844CONFIG_USB_GADGET_DUALSPEED=y
845# CONFIG_USB_ZERO is not set
846# CONFIG_USB_AUDIO is not set
847# CONFIG_USB_ETH is not set
848# CONFIG_USB_GADGETFS is not set
849# CONFIG_USB_FILE_STORAGE is not set
850# CONFIG_USB_G_SERIAL is not set
851# CONFIG_USB_MIDI_GADGET is not set
852# CONFIG_USB_G_PRINTER is not set
853CONFIG_USB_CDC_COMPOSITE=y
854
855#
856# OTG and related infrastructure
857#
858# CONFIG_USB_GPIO_VBUS is not set
859# CONFIG_NOP_USB_XCEIV is not set
860CONFIG_MMC=y
861# CONFIG_MMC_DEBUG is not set
862# CONFIG_MMC_UNSAFE_RESUME is not set
863
864#
865# MMC/SD/SDIO Card Drivers
866#
867CONFIG_MMC_BLOCK=y
868CONFIG_MMC_BLOCK_BOUNCE=y
869# CONFIG_SDIO_UART is not set
870# CONFIG_MMC_TEST is not set
871
872#
873# MMC/SD/SDIO Host Controller Drivers
874#
875# CONFIG_MMC_SDHCI is not set
876# CONFIG_MMC_AT91 is not set
877# CONFIG_MMC_ATMELMCI is not set
878# CONFIG_MEMSTICK is not set
879# CONFIG_NEW_LEDS is not set
880# CONFIG_ACCESSIBILITY is not set
881CONFIG_RTC_LIB=y
882CONFIG_RTC_CLASS=y
883CONFIG_RTC_HCTOSYS=y
884CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
885# CONFIG_RTC_DEBUG is not set
886
887#
888# RTC interfaces
889#
890CONFIG_RTC_INTF_SYSFS=y
891CONFIG_RTC_INTF_PROC=y
892CONFIG_RTC_INTF_DEV=y
893# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
894# CONFIG_RTC_DRV_TEST is not set
895
896#
897# I2C RTC drivers
898#
899# CONFIG_RTC_DRV_DS1307 is not set
900# CONFIG_RTC_DRV_DS1374 is not set
901# CONFIG_RTC_DRV_DS1672 is not set
902# CONFIG_RTC_DRV_MAX6900 is not set
903# CONFIG_RTC_DRV_RS5C372 is not set
904# CONFIG_RTC_DRV_ISL1208 is not set
905# CONFIG_RTC_DRV_X1205 is not set
906# CONFIG_RTC_DRV_PCF8563 is not set
907# CONFIG_RTC_DRV_PCF8583 is not set
908# CONFIG_RTC_DRV_M41T80 is not set
909# CONFIG_RTC_DRV_S35390A is not set
910# CONFIG_RTC_DRV_FM3130 is not set
911# CONFIG_RTC_DRV_RX8581 is not set
912# CONFIG_RTC_DRV_RX8025 is not set
913
914#
915# SPI RTC drivers
916#
917
918#
919# Platform RTC drivers
920#
921# CONFIG_RTC_DRV_DS1286 is not set
922# CONFIG_RTC_DRV_DS1511 is not set
923# CONFIG_RTC_DRV_DS1553 is not set
924# CONFIG_RTC_DRV_DS1742 is not set
925# CONFIG_RTC_DRV_STK17TA8 is not set
926# CONFIG_RTC_DRV_M48T86 is not set
927# CONFIG_RTC_DRV_M48T35 is not set
928# CONFIG_RTC_DRV_M48T59 is not set
929# CONFIG_RTC_DRV_BQ4802 is not set
930# CONFIG_RTC_DRV_V3020 is not set
931
932#
933# on-CPU RTC drivers
934#
935CONFIG_RTC_DRV_SH=y
936# CONFIG_RTC_DRV_GENERIC is not set
937# CONFIG_DMADEVICES is not set
938# CONFIG_AUXDISPLAY is not set
939CONFIG_UIO=y
940# CONFIG_UIO_PDRV is not set
941CONFIG_UIO_PDRV_GENIRQ=y
942# CONFIG_UIO_SMX is not set
943# CONFIG_UIO_SERCOS3 is not set
944
945#
946# TI VLYNQ
947#
948# CONFIG_STAGING is not set
949
950#
951# File systems
952#
953# CONFIG_EXT2_FS is not set
954# CONFIG_EXT3_FS is not set
955# CONFIG_EXT4_FS is not set
956# CONFIG_REISERFS_FS is not set
957# CONFIG_JFS_FS is not set
958# CONFIG_FS_POSIX_ACL is not set
959# CONFIG_XFS_FS is not set
960# CONFIG_GFS2_FS is not set
961# CONFIG_OCFS2_FS is not set
962# CONFIG_BTRFS_FS is not set
963# CONFIG_NILFS2_FS is not set
964CONFIG_FILE_LOCKING=y
965CONFIG_FSNOTIFY=y
966CONFIG_DNOTIFY=y
967# CONFIG_INOTIFY is not set
968CONFIG_INOTIFY_USER=y
969# CONFIG_QUOTA is not set
970# CONFIG_AUTOFS_FS is not set
971# CONFIG_AUTOFS4_FS is not set
972# CONFIG_FUSE_FS is not set
973
974#
975# Caches
976#
977# CONFIG_FSCACHE is not set
978
979#
980# CD-ROM/DVD Filesystems
981#
982# CONFIG_ISO9660_FS is not set
983# CONFIG_UDF_FS is not set
984
985#
986# DOS/FAT/NT Filesystems
987#
988# CONFIG_MSDOS_FS is not set
989# CONFIG_VFAT_FS is not set
990# CONFIG_NTFS_FS is not set
991
992#
993# Pseudo filesystems
994#
995CONFIG_PROC_FS=y
996CONFIG_PROC_KCORE=y
997CONFIG_PROC_SYSCTL=y
998CONFIG_PROC_PAGE_MONITOR=y
999CONFIG_SYSFS=y
1000CONFIG_TMPFS=y
1001# CONFIG_TMPFS_POSIX_ACL is not set
1002# CONFIG_HUGETLBFS is not set
1003# CONFIG_HUGETLB_PAGE is not set
1004# CONFIG_CONFIGFS_FS is not set
1005# CONFIG_MISC_FILESYSTEMS is not set
1006# CONFIG_NETWORK_FILESYSTEMS is not set
1007
1008#
1009# Partition Types
1010#
1011# CONFIG_PARTITION_ADVANCED is not set
1012CONFIG_MSDOS_PARTITION=y
1013# CONFIG_NLS is not set
1014# CONFIG_DLM is not set
1015
1016#
1017# Kernel hacking
1018#
1019CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1020# CONFIG_PRINTK_TIME is not set
1021CONFIG_ENABLE_WARN_DEPRECATED=y
1022# CONFIG_ENABLE_MUST_CHECK is not set
1023CONFIG_FRAME_WARN=1024
1024# CONFIG_MAGIC_SYSRQ is not set
1025# CONFIG_STRIP_ASM_SYMS is not set
1026# CONFIG_UNUSED_SYMBOLS is not set
1027CONFIG_DEBUG_FS=y
1028# CONFIG_HEADERS_CHECK is not set
1029# CONFIG_DEBUG_KERNEL is not set
1030# CONFIG_DEBUG_BUGVERBOSE is not set
1031# CONFIG_DEBUG_MEMORY_INIT is not set
1032# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1033# CONFIG_LATENCYTOP is not set
1034# CONFIG_SYSCTL_SYSCALL_CHECK is not set
1035CONFIG_HAVE_FUNCTION_TRACER=y
1036CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1037CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
1038CONFIG_HAVE_DYNAMIC_FTRACE=y
1039CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1040CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
1041CONFIG_TRACING_SUPPORT=y
1042# CONFIG_FTRACE is not set
1043# CONFIG_DYNAMIC_DEBUG is not set
1044# CONFIG_DMA_API_DEBUG is not set
1045# CONFIG_SAMPLES is not set
1046CONFIG_HAVE_ARCH_KGDB=y
1047# CONFIG_SH_STANDARD_BIOS is not set
1048# CONFIG_EARLY_SCIF_CONSOLE is not set
1049# CONFIG_DWARF_UNWINDER is not set
1050
1051#
1052# Security options
1053#
1054# CONFIG_KEYS is not set
1055# CONFIG_SECURITY is not set
1056# CONFIG_SECURITYFS is not set
1057# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1058# CONFIG_CRYPTO is not set
1059# CONFIG_BINARY_PRINTF is not set
1060
1061#
1062# Library routines
1063#
1064CONFIG_BITREVERSE=y
1065CONFIG_GENERIC_FIND_LAST_BIT=y
1066# CONFIG_CRC_CCITT is not set
1067# CONFIG_CRC16 is not set
1068# CONFIG_CRC_T10DIF is not set
1069# CONFIG_CRC_ITU_T is not set
1070CONFIG_CRC32=y
1071# CONFIG_CRC7 is not set
1072# CONFIG_LIBCRC32C is not set
1073CONFIG_ZLIB_INFLATE=y
1074CONFIG_DECOMPRESS_GZIP=y
1075CONFIG_HAS_IOMEM=y
1076CONFIG_HAS_IOPORT=y
1077CONFIG_HAS_DMA=y
1078CONFIG_HAVE_LMB=y
1079CONFIG_NLATTR=y
1080CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/landisk_defconfig b/arch/sh/configs/landisk_defconfig
index ba05739fda21..c2a9a3996388 100644
--- a/arch/sh/configs/landisk_defconfig
+++ b/arch/sh/configs/landisk_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.30 3# Linux kernel version: 2.6.31
4# Thu Jun 18 12:28:45 2009 4# Thu Sep 24 18:05:49 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -14,6 +14,7 @@ CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y 14CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
16CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_IRQ_PER_CPU=y
17# CONFIG_GENERIC_GPIO is not set 18# CONFIG_GENERIC_GPIO is not set
18CONFIG_GENERIC_TIME=y 19CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 20CONFIG_GENERIC_CLOCKEVENTS=y
@@ -28,7 +29,9 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
28# CONFIG_ARCH_HAS_ILOG2_U64 is not set 29# CONFIG_ARCH_HAS_ILOG2_U64 is not set
29CONFIG_ARCH_NO_VIRT_TO_BUS=y 30CONFIG_ARCH_NO_VIRT_TO_BUS=y
30CONFIG_ARCH_HAS_DEFAULT_IDLE=y 31CONFIG_ARCH_HAS_DEFAULT_IDLE=y
32CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
31CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 33CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
34CONFIG_CONSTRUCTORS=y
32 35
33# 36#
34# General setup 37# General setup
@@ -38,6 +41,12 @@ CONFIG_BROKEN_ON_SMP=y
38CONFIG_INIT_ENV_ARG_LIMIT=32 41CONFIG_INIT_ENV_ARG_LIMIT=32
39CONFIG_LOCALVERSION="" 42CONFIG_LOCALVERSION=""
40CONFIG_LOCALVERSION_AUTO=y 43CONFIG_LOCALVERSION_AUTO=y
44CONFIG_HAVE_KERNEL_GZIP=y
45CONFIG_HAVE_KERNEL_BZIP2=y
46CONFIG_HAVE_KERNEL_LZMA=y
47CONFIG_KERNEL_GZIP=y
48# CONFIG_KERNEL_BZIP2 is not set
49# CONFIG_KERNEL_LZMA is not set
41CONFIG_SWAP=y 50CONFIG_SWAP=y
42CONFIG_SYSVIPC=y 51CONFIG_SYSVIPC=y
43CONFIG_SYSVIPC_SYSCTL=y 52CONFIG_SYSVIPC_SYSCTL=y
@@ -49,11 +58,12 @@ CONFIG_SYSVIPC_SYSCTL=y
49# 58#
50# RCU Subsystem 59# RCU Subsystem
51# 60#
52CONFIG_CLASSIC_RCU=y 61CONFIG_TREE_RCU=y
53# CONFIG_TREE_RCU is not set 62# CONFIG_TREE_PREEMPT_RCU is not set
54# CONFIG_PREEMPT_RCU is not set 63# CONFIG_RCU_TRACE is not set
64CONFIG_RCU_FANOUT=32
65# CONFIG_RCU_FANOUT_EXACT is not set
55# CONFIG_TREE_RCU_TRACE is not set 66# CONFIG_TREE_RCU_TRACE is not set
56# CONFIG_PREEMPT_RCU_TRACE is not set
57# CONFIG_IKCONFIG is not set 67# CONFIG_IKCONFIG is not set
58CONFIG_LOG_BUF_SHIFT=14 68CONFIG_LOG_BUF_SHIFT=14
59# CONFIG_GROUP_SCHED is not set 69# CONFIG_GROUP_SCHED is not set
@@ -83,19 +93,20 @@ CONFIG_TIMERFD=y
83CONFIG_EVENTFD=y 93CONFIG_EVENTFD=y
84CONFIG_SHMEM=y 94CONFIG_SHMEM=y
85CONFIG_AIO=y 95CONFIG_AIO=y
96CONFIG_HAVE_PERF_EVENTS=y
86 97
87# 98#
88# Performance Counters 99# Kernel Performance Events And Counters
89# 100#
101# CONFIG_PERF_EVENTS is not set
102# CONFIG_PERF_COUNTERS is not set
90CONFIG_VM_EVENT_COUNTERS=y 103CONFIG_VM_EVENT_COUNTERS=y
91CONFIG_PCI_QUIRKS=y 104CONFIG_PCI_QUIRKS=y
92# CONFIG_STRIP_ASM_SYMS is not set
93CONFIG_COMPAT_BRK=y 105CONFIG_COMPAT_BRK=y
94CONFIG_SLAB=y 106CONFIG_SLAB=y
95# CONFIG_SLUB is not set 107# CONFIG_SLUB is not set
96# CONFIG_SLOB is not set 108# CONFIG_SLOB is not set
97# CONFIG_PROFILING is not set 109# CONFIG_PROFILING is not set
98# CONFIG_MARKERS is not set
99CONFIG_HAVE_OPROFILE=y 110CONFIG_HAVE_OPROFILE=y
100# CONFIG_KPROBES is not set 111# CONFIG_KPROBES is not set
101CONFIG_HAVE_IOREMAP_PROT=y 112CONFIG_HAVE_IOREMAP_PROT=y
@@ -104,6 +115,10 @@ CONFIG_HAVE_KRETPROBES=y
104CONFIG_HAVE_ARCH_TRACEHOOK=y 115CONFIG_HAVE_ARCH_TRACEHOOK=y
105CONFIG_HAVE_CLK=y 116CONFIG_HAVE_CLK=y
106CONFIG_HAVE_DMA_API_DEBUG=y 117CONFIG_HAVE_DMA_API_DEBUG=y
118
119#
120# GCOV-based kernel profiling
121#
107# CONFIG_SLOW_WORK is not set 122# CONFIG_SLOW_WORK is not set
108CONFIG_HAVE_GENERIC_DMA_COHERENT=y 123CONFIG_HAVE_GENERIC_DMA_COHERENT=y
109CONFIG_SLABINFO=y 124CONFIG_SLABINFO=y
@@ -116,7 +131,7 @@ CONFIG_MODULE_FORCE_UNLOAD=y
116# CONFIG_MODVERSIONS is not set 131# CONFIG_MODVERSIONS is not set
117# CONFIG_MODULE_SRCVERSION_ALL is not set 132# CONFIG_MODULE_SRCVERSION_ALL is not set
118CONFIG_BLOCK=y 133CONFIG_BLOCK=y
119# CONFIG_LBD is not set 134CONFIG_LBDAF=y
120# CONFIG_BLK_DEV_BSG is not set 135# CONFIG_BLK_DEV_BSG is not set
121# CONFIG_BLK_DEV_INTEGRITY is not set 136# CONFIG_BLK_DEV_INTEGRITY is not set
122 137
@@ -163,6 +178,7 @@ CONFIG_CPU_SUBTYPE_SH7751R=y
163# CONFIG_CPU_SUBTYPE_SH4_202 is not set 178# CONFIG_CPU_SUBTYPE_SH4_202 is not set
164# CONFIG_CPU_SUBTYPE_SH7723 is not set 179# CONFIG_CPU_SUBTYPE_SH7723 is not set
165# CONFIG_CPU_SUBTYPE_SH7724 is not set 180# CONFIG_CPU_SUBTYPE_SH7724 is not set
181# CONFIG_CPU_SUBTYPE_SH7757 is not set
166# CONFIG_CPU_SUBTYPE_SH7763 is not set 182# CONFIG_CPU_SUBTYPE_SH7763 is not set
167# CONFIG_CPU_SUBTYPE_SH7770 is not set 183# CONFIG_CPU_SUBTYPE_SH7770 is not set
168# CONFIG_CPU_SUBTYPE_SH7780 is not set 184# CONFIG_CPU_SUBTYPE_SH7780 is not set
@@ -208,6 +224,7 @@ CONFIG_ZONE_DMA_FLAG=0
208CONFIG_NR_QUICK=2 224CONFIG_NR_QUICK=2
209CONFIG_HAVE_MLOCK=y 225CONFIG_HAVE_MLOCK=y
210CONFIG_HAVE_MLOCKED_PAGE_BIT=y 226CONFIG_HAVE_MLOCKED_PAGE_BIT=y
227# CONFIG_KSM is not set
211CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 228CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
212 229
213# 230#
@@ -295,7 +312,8 @@ CONFIG_ZERO_PAGE_OFFSET=0x00001000
295CONFIG_BOOT_LINK_OFFSET=0x00800000 312CONFIG_BOOT_LINK_OFFSET=0x00800000
296CONFIG_ENTRY_OFFSET=0x00001000 313CONFIG_ENTRY_OFFSET=0x00001000
297# CONFIG_UBC_WAKEUP is not set 314# CONFIG_UBC_WAKEUP is not set
298# CONFIG_CMDLINE_BOOL is not set 315# CONFIG_CMDLINE_OVERWRITE is not set
316# CONFIG_CMDLINE_EXTEND is not set
299 317
300# 318#
301# Bus options 319# Bus options
@@ -411,6 +429,7 @@ CONFIG_IP_NF_QUEUE=m
411# CONFIG_IP_NF_ARPTABLES is not set 429# CONFIG_IP_NF_ARPTABLES is not set
412# CONFIG_IP_DCCP is not set 430# CONFIG_IP_DCCP is not set
413# CONFIG_IP_SCTP is not set 431# CONFIG_IP_SCTP is not set
432# CONFIG_RDS is not set
414# CONFIG_TIPC is not set 433# CONFIG_TIPC is not set
415# CONFIG_ATM is not set 434# CONFIG_ATM is not set
416# CONFIG_BRIDGE is not set 435# CONFIG_BRIDGE is not set
@@ -442,6 +461,7 @@ CONFIG_ATALK=m
442# CONFIG_AF_RXRPC is not set 461# CONFIG_AF_RXRPC is not set
443CONFIG_WIRELESS=y 462CONFIG_WIRELESS=y
444# CONFIG_CFG80211 is not set 463# CONFIG_CFG80211 is not set
464CONFIG_CFG80211_DEFAULT_PS_VALUE=0
445# CONFIG_WIRELESS_OLD_REGULATORY is not set 465# CONFIG_WIRELESS_OLD_REGULATORY is not set
446# CONFIG_WIRELESS_EXT is not set 466# CONFIG_WIRELESS_EXT is not set
447# CONFIG_LIB80211 is not set 467# CONFIG_LIB80211 is not set
@@ -449,7 +469,6 @@ CONFIG_WIRELESS=y
449# 469#
450# CFG80211 needs to be enabled for MAC80211 470# CFG80211 needs to be enabled for MAC80211
451# 471#
452CONFIG_MAC80211_DEFAULT_PS_VALUE=0
453# CONFIG_WIMAX is not set 472# CONFIG_WIMAX is not set
454# CONFIG_RFKILL is not set 473# CONFIG_RFKILL is not set
455# CONFIG_NET_9P is not set 474# CONFIG_NET_9P is not set
@@ -462,6 +481,7 @@ CONFIG_MAC80211_DEFAULT_PS_VALUE=0
462# Generic Driver Options 481# Generic Driver Options
463# 482#
464CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 483CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
484# CONFIG_DEVTMPFS is not set
465CONFIG_STANDALONE=y 485CONFIG_STANDALONE=y
466CONFIG_PREVENT_FIRMWARE_BUILD=y 486CONFIG_PREVENT_FIRMWARE_BUILD=y
467CONFIG_FW_LOADER=y 487CONFIG_FW_LOADER=y
@@ -631,6 +651,7 @@ CONFIG_SCSI_LOWLEVEL=y
631# CONFIG_SCSI_DC390T is not set 651# CONFIG_SCSI_DC390T is not set
632# CONFIG_SCSI_NSP32 is not set 652# CONFIG_SCSI_NSP32 is not set
633# CONFIG_SCSI_DEBUG is not set 653# CONFIG_SCSI_DEBUG is not set
654# CONFIG_SCSI_PMCRAID is not set
634# CONFIG_SCSI_SRP is not set 655# CONFIG_SCSI_SRP is not set
635# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set 656# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
636# CONFIG_SCSI_DH is not set 657# CONFIG_SCSI_DH is not set
@@ -653,7 +674,11 @@ CONFIG_MD_RAID1=m
653# 674#
654 675
655# 676#
656# Enable only one of the two stacks, unless you know what you are doing 677# You can enable one or both FireWire driver stacks.
678#
679
680#
681# See the help texts for more information.
657# 682#
658# CONFIG_FIREWIRE is not set 683# CONFIG_FIREWIRE is not set
659# CONFIG_IEEE1394 is not set 684# CONFIG_IEEE1394 is not set
@@ -729,6 +754,7 @@ CONFIG_NETDEV_1000=y
729# CONFIG_VIA_VELOCITY is not set 754# CONFIG_VIA_VELOCITY is not set
730# CONFIG_TIGON3 is not set 755# CONFIG_TIGON3 is not set
731# CONFIG_BNX2 is not set 756# CONFIG_BNX2 is not set
757# CONFIG_CNIC is not set
732# CONFIG_QLA3XXX is not set 758# CONFIG_QLA3XXX is not set
733# CONFIG_ATL1 is not set 759# CONFIG_ATL1 is not set
734# CONFIG_ATL1E is not set 760# CONFIG_ATL1E is not set
@@ -754,10 +780,7 @@ CONFIG_CHELSIO_T3_DEPENDS=y
754# CONFIG_SFC is not set 780# CONFIG_SFC is not set
755# CONFIG_BE2NET is not set 781# CONFIG_BE2NET is not set
756# CONFIG_TR is not set 782# CONFIG_TR is not set
757 783CONFIG_WLAN=y
758#
759# Wireless LAN
760#
761# CONFIG_WLAN_PRE80211 is not set 784# CONFIG_WLAN_PRE80211 is not set
762# CONFIG_WLAN_80211 is not set 785# CONFIG_WLAN_80211 is not set
763 786
@@ -868,10 +891,20 @@ CONFIG_HW_RANDOM=y
868CONFIG_DEVPORT=y 891CONFIG_DEVPORT=y
869# CONFIG_I2C is not set 892# CONFIG_I2C is not set
870# CONFIG_SPI is not set 893# CONFIG_SPI is not set
894
895#
896# PPS support
897#
898# CONFIG_PPS is not set
871# CONFIG_W1 is not set 899# CONFIG_W1 is not set
872# CONFIG_POWER_SUPPLY is not set 900# CONFIG_POWER_SUPPLY is not set
873CONFIG_HWMON=y 901CONFIG_HWMON=y
874# CONFIG_HWMON_VID is not set 902# CONFIG_HWMON_VID is not set
903# CONFIG_HWMON_DEBUG_CHIP is not set
904
905#
906# Native drivers
907#
875# CONFIG_SENSORS_I5K_AMB is not set 908# CONFIG_SENSORS_I5K_AMB is not set
876# CONFIG_SENSORS_F71805F is not set 909# CONFIG_SENSORS_F71805F is not set
877# CONFIG_SENSORS_F71882FG is not set 910# CONFIG_SENSORS_F71882FG is not set
@@ -886,9 +919,7 @@ CONFIG_HWMON=y
886# CONFIG_SENSORS_VT8231 is not set 919# CONFIG_SENSORS_VT8231 is not set
887# CONFIG_SENSORS_W83627HF is not set 920# CONFIG_SENSORS_W83627HF is not set
888# CONFIG_SENSORS_W83627EHF is not set 921# CONFIG_SENSORS_W83627EHF is not set
889# CONFIG_HWMON_DEBUG_CHIP is not set
890# CONFIG_THERMAL is not set 922# CONFIG_THERMAL is not set
891# CONFIG_THERMAL_HWMON is not set
892# CONFIG_WATCHDOG is not set 923# CONFIG_WATCHDOG is not set
893CONFIG_SSB_POSSIBLE=y 924CONFIG_SSB_POSSIBLE=y
894 925
@@ -910,6 +941,7 @@ CONFIG_SSB_POSSIBLE=y
910# 941#
911# Graphics support 942# Graphics support
912# 943#
944CONFIG_VGA_ARB=y
913# CONFIG_DRM is not set 945# CONFIG_DRM is not set
914# CONFIG_VGASTATE is not set 946# CONFIG_VGASTATE is not set
915# CONFIG_VIDEO_OUTPUT_CONTROL is not set 947# CONFIG_VIDEO_OUTPUT_CONTROL is not set
@@ -928,11 +960,11 @@ CONFIG_DUMMY_CONSOLE=y
928CONFIG_FONT_8x16=y 960CONFIG_FONT_8x16=y
929CONFIG_SOUND=m 961CONFIG_SOUND=m
930CONFIG_SOUND_OSS_CORE=y 962CONFIG_SOUND_OSS_CORE=y
963CONFIG_SOUND_OSS_CORE_PRECLAIM=y
931# CONFIG_SND is not set 964# CONFIG_SND is not set
932CONFIG_SOUND_PRIME=m 965CONFIG_SOUND_PRIME=m
933CONFIG_HID_SUPPORT=y 966CONFIG_HID_SUPPORT=y
934CONFIG_HID=y 967CONFIG_HID=y
935# CONFIG_HID_DEBUG is not set
936# CONFIG_HIDRAW is not set 968# CONFIG_HIDRAW is not set
937 969
938# 970#
@@ -961,6 +993,7 @@ CONFIG_HID_CYPRESS=m
961CONFIG_HID_EZKEY=m 993CONFIG_HID_EZKEY=m
962# CONFIG_HID_KYE is not set 994# CONFIG_HID_KYE is not set
963CONFIG_HID_GYRATION=m 995CONFIG_HID_GYRATION=m
996# CONFIG_HID_TWINHAN is not set
964# CONFIG_HID_KENSINGTON is not set 997# CONFIG_HID_KENSINGTON is not set
965CONFIG_HID_LOGITECH=m 998CONFIG_HID_LOGITECH=m
966# CONFIG_LOGITECH_FF is not set 999# CONFIG_LOGITECH_FF is not set
@@ -1011,6 +1044,7 @@ CONFIG_USB_EHCI_HCD=y
1011# CONFIG_USB_OXU210HP_HCD is not set 1044# CONFIG_USB_OXU210HP_HCD is not set
1012# CONFIG_USB_ISP116X_HCD is not set 1045# CONFIG_USB_ISP116X_HCD is not set
1013# CONFIG_USB_ISP1760_HCD is not set 1046# CONFIG_USB_ISP1760_HCD is not set
1047# CONFIG_USB_ISP1362_HCD is not set
1014CONFIG_USB_OHCI_HCD=y 1048CONFIG_USB_OHCI_HCD=y
1015# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set 1049# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
1016# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set 1050# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
@@ -1177,8 +1211,10 @@ CONFIG_REISERFS_FS=y
1177# CONFIG_JFS_FS is not set 1211# CONFIG_JFS_FS is not set
1178# CONFIG_FS_POSIX_ACL is not set 1212# CONFIG_FS_POSIX_ACL is not set
1179# CONFIG_XFS_FS is not set 1213# CONFIG_XFS_FS is not set
1214# CONFIG_GFS2_FS is not set
1180# CONFIG_OCFS2_FS is not set 1215# CONFIG_OCFS2_FS is not set
1181# CONFIG_BTRFS_FS is not set 1216# CONFIG_BTRFS_FS is not set
1217# CONFIG_NILFS2_FS is not set
1182CONFIG_FILE_LOCKING=y 1218CONFIG_FILE_LOCKING=y
1183CONFIG_FSNOTIFY=y 1219CONFIG_FSNOTIFY=y
1184CONFIG_DNOTIFY=y 1220CONFIG_DNOTIFY=y
@@ -1251,7 +1287,6 @@ CONFIG_ROMFS_ON_BLOCK=y
1251CONFIG_UFS_FS=m 1287CONFIG_UFS_FS=m
1252# CONFIG_UFS_FS_WRITE is not set 1288# CONFIG_UFS_FS_WRITE is not set
1253# CONFIG_UFS_DEBUG is not set 1289# CONFIG_UFS_DEBUG is not set
1254# CONFIG_NILFS2_FS is not set
1255CONFIG_NETWORK_FILESYSTEMS=y 1290CONFIG_NETWORK_FILESYSTEMS=y
1256CONFIG_NFS_FS=m 1291CONFIG_NFS_FS=m
1257CONFIG_NFS_V3=y 1292CONFIG_NFS_V3=y
@@ -1331,6 +1366,7 @@ CONFIG_ENABLE_WARN_DEPRECATED=y
1331CONFIG_ENABLE_MUST_CHECK=y 1366CONFIG_ENABLE_MUST_CHECK=y
1332CONFIG_FRAME_WARN=1024 1367CONFIG_FRAME_WARN=1024
1333# CONFIG_MAGIC_SYSRQ is not set 1368# CONFIG_MAGIC_SYSRQ is not set
1369# CONFIG_STRIP_ASM_SYMS is not set
1334# CONFIG_UNUSED_SYMBOLS is not set 1370# CONFIG_UNUSED_SYMBOLS is not set
1335# CONFIG_DEBUG_FS is not set 1371# CONFIG_DEBUG_FS is not set
1336# CONFIG_HEADERS_CHECK is not set 1372# CONFIG_HEADERS_CHECK is not set
@@ -1340,8 +1376,11 @@ CONFIG_FRAME_WARN=1024
1340# CONFIG_RCU_CPU_STALL_DETECTOR is not set 1376# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1341# CONFIG_LATENCYTOP is not set 1377# CONFIG_LATENCYTOP is not set
1342CONFIG_HAVE_FUNCTION_TRACER=y 1378CONFIG_HAVE_FUNCTION_TRACER=y
1379CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1380CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
1343CONFIG_HAVE_DYNAMIC_FTRACE=y 1381CONFIG_HAVE_DYNAMIC_FTRACE=y
1344CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1382CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1383CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
1345CONFIG_TRACING_SUPPORT=y 1384CONFIG_TRACING_SUPPORT=y
1346# CONFIG_FTRACE is not set 1385# CONFIG_FTRACE is not set
1347# CONFIG_DMA_API_DEBUG is not set 1386# CONFIG_DMA_API_DEBUG is not set
@@ -1350,6 +1389,7 @@ CONFIG_HAVE_ARCH_KGDB=y
1350CONFIG_SH_STANDARD_BIOS=y 1389CONFIG_SH_STANDARD_BIOS=y
1351# CONFIG_EARLY_SCIF_CONSOLE is not set 1390# CONFIG_EARLY_SCIF_CONSOLE is not set
1352# CONFIG_EARLY_PRINTK is not set 1391# CONFIG_EARLY_PRINTK is not set
1392# CONFIG_DWARF_UNWINDER is not set
1353 1393
1354# 1394#
1355# Security options 1395# Security options
@@ -1363,7 +1403,6 @@ CONFIG_CRYPTO=y
1363# 1403#
1364# Crypto core or helper 1404# Crypto core or helper
1365# 1405#
1366# CONFIG_CRYPTO_FIPS is not set
1367# CONFIG_CRYPTO_MANAGER is not set 1406# CONFIG_CRYPTO_MANAGER is not set
1368# CONFIG_CRYPTO_MANAGER2 is not set 1407# CONFIG_CRYPTO_MANAGER2 is not set
1369# CONFIG_CRYPTO_GF128MUL is not set 1408# CONFIG_CRYPTO_GF128MUL is not set
@@ -1395,11 +1434,13 @@ CONFIG_CRYPTO=y
1395# 1434#
1396# CONFIG_CRYPTO_HMAC is not set 1435# CONFIG_CRYPTO_HMAC is not set
1397# CONFIG_CRYPTO_XCBC is not set 1436# CONFIG_CRYPTO_XCBC is not set
1437# CONFIG_CRYPTO_VMAC is not set
1398 1438
1399# 1439#
1400# Digest 1440# Digest
1401# 1441#
1402# CONFIG_CRYPTO_CRC32C is not set 1442# CONFIG_CRYPTO_CRC32C is not set
1443# CONFIG_CRYPTO_GHASH is not set
1403# CONFIG_CRYPTO_MD4 is not set 1444# CONFIG_CRYPTO_MD4 is not set
1404# CONFIG_CRYPTO_MD5 is not set 1445# CONFIG_CRYPTO_MD5 is not set
1405# CONFIG_CRYPTO_MICHAEL_MIC is not set 1446# CONFIG_CRYPTO_MICHAEL_MIC is not set
@@ -1462,5 +1503,6 @@ CONFIG_CRC32=y
1462CONFIG_HAS_IOMEM=y 1503CONFIG_HAS_IOMEM=y
1463CONFIG_HAS_IOPORT=y 1504CONFIG_HAS_IOPORT=y
1464CONFIG_HAS_DMA=y 1505CONFIG_HAS_DMA=y
1506CONFIG_HAVE_LMB=y
1465CONFIG_NLATTR=y 1507CONFIG_NLATTR=y
1466CONFIG_GENERIC_ATOMIC64=y 1508CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/lboxre2_defconfig b/arch/sh/configs/lboxre2_defconfig
index c0bc2fd033b9..ec0c0b432c74 100644
--- a/arch/sh/configs/lboxre2_defconfig
+++ b/arch/sh/configs/lboxre2_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.30 3# Linux kernel version: 2.6.31
4# Thu Jun 18 12:29:50 2009 4# Thu Sep 24 18:09:59 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -14,6 +14,7 @@ CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y 14CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
16CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_IRQ_PER_CPU=y
17# CONFIG_GENERIC_GPIO is not set 18# CONFIG_GENERIC_GPIO is not set
18CONFIG_GENERIC_TIME=y 19CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 20CONFIG_GENERIC_CLOCKEVENTS=y
@@ -28,7 +29,9 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
28# CONFIG_ARCH_HAS_ILOG2_U64 is not set 29# CONFIG_ARCH_HAS_ILOG2_U64 is not set
29CONFIG_ARCH_NO_VIRT_TO_BUS=y 30CONFIG_ARCH_NO_VIRT_TO_BUS=y
30CONFIG_ARCH_HAS_DEFAULT_IDLE=y 31CONFIG_ARCH_HAS_DEFAULT_IDLE=y
32CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
31CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 33CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
34CONFIG_CONSTRUCTORS=y
32 35
33# 36#
34# General setup 37# General setup
@@ -38,6 +41,12 @@ CONFIG_BROKEN_ON_SMP=y
38CONFIG_INIT_ENV_ARG_LIMIT=32 41CONFIG_INIT_ENV_ARG_LIMIT=32
39CONFIG_LOCALVERSION="" 42CONFIG_LOCALVERSION=""
40CONFIG_LOCALVERSION_AUTO=y 43CONFIG_LOCALVERSION_AUTO=y
44CONFIG_HAVE_KERNEL_GZIP=y
45CONFIG_HAVE_KERNEL_BZIP2=y
46CONFIG_HAVE_KERNEL_LZMA=y
47CONFIG_KERNEL_GZIP=y
48# CONFIG_KERNEL_BZIP2 is not set
49# CONFIG_KERNEL_LZMA is not set
41CONFIG_SWAP=y 50CONFIG_SWAP=y
42CONFIG_SYSVIPC=y 51CONFIG_SYSVIPC=y
43CONFIG_SYSVIPC_SYSCTL=y 52CONFIG_SYSVIPC_SYSCTL=y
@@ -49,11 +58,12 @@ CONFIG_SYSVIPC_SYSCTL=y
49# 58#
50# RCU Subsystem 59# RCU Subsystem
51# 60#
52CONFIG_CLASSIC_RCU=y 61CONFIG_TREE_RCU=y
53# CONFIG_TREE_RCU is not set 62# CONFIG_TREE_PREEMPT_RCU is not set
54# CONFIG_PREEMPT_RCU is not set 63# CONFIG_RCU_TRACE is not set
64CONFIG_RCU_FANOUT=32
65# CONFIG_RCU_FANOUT_EXACT is not set
55# CONFIG_TREE_RCU_TRACE is not set 66# CONFIG_TREE_RCU_TRACE is not set
56# CONFIG_PREEMPT_RCU_TRACE is not set
57# CONFIG_IKCONFIG is not set 67# CONFIG_IKCONFIG is not set
58CONFIG_LOG_BUF_SHIFT=14 68CONFIG_LOG_BUF_SHIFT=14
59# CONFIG_GROUP_SCHED is not set 69# CONFIG_GROUP_SCHED is not set
@@ -83,19 +93,20 @@ CONFIG_TIMERFD=y
83CONFIG_EVENTFD=y 93CONFIG_EVENTFD=y
84CONFIG_SHMEM=y 94CONFIG_SHMEM=y
85CONFIG_AIO=y 95CONFIG_AIO=y
96CONFIG_HAVE_PERF_EVENTS=y
86 97
87# 98#
88# Performance Counters 99# Kernel Performance Events And Counters
89# 100#
101# CONFIG_PERF_EVENTS is not set
102# CONFIG_PERF_COUNTERS is not set
90CONFIG_VM_EVENT_COUNTERS=y 103CONFIG_VM_EVENT_COUNTERS=y
91CONFIG_PCI_QUIRKS=y 104CONFIG_PCI_QUIRKS=y
92# CONFIG_STRIP_ASM_SYMS is not set
93CONFIG_COMPAT_BRK=y 105CONFIG_COMPAT_BRK=y
94CONFIG_SLAB=y 106CONFIG_SLAB=y
95# CONFIG_SLUB is not set 107# CONFIG_SLUB is not set
96# CONFIG_SLOB is not set 108# CONFIG_SLOB is not set
97# CONFIG_PROFILING is not set 109# CONFIG_PROFILING is not set
98# CONFIG_MARKERS is not set
99CONFIG_HAVE_OPROFILE=y 110CONFIG_HAVE_OPROFILE=y
100# CONFIG_KPROBES is not set 111# CONFIG_KPROBES is not set
101CONFIG_HAVE_IOREMAP_PROT=y 112CONFIG_HAVE_IOREMAP_PROT=y
@@ -104,6 +115,10 @@ CONFIG_HAVE_KRETPROBES=y
104CONFIG_HAVE_ARCH_TRACEHOOK=y 115CONFIG_HAVE_ARCH_TRACEHOOK=y
105CONFIG_HAVE_CLK=y 116CONFIG_HAVE_CLK=y
106CONFIG_HAVE_DMA_API_DEBUG=y 117CONFIG_HAVE_DMA_API_DEBUG=y
118
119#
120# GCOV-based kernel profiling
121#
107# CONFIG_SLOW_WORK is not set 122# CONFIG_SLOW_WORK is not set
108CONFIG_HAVE_GENERIC_DMA_COHERENT=y 123CONFIG_HAVE_GENERIC_DMA_COHERENT=y
109CONFIG_SLABINFO=y 124CONFIG_SLABINFO=y
@@ -116,7 +131,7 @@ CONFIG_MODULE_FORCE_UNLOAD=y
116# CONFIG_MODVERSIONS is not set 131# CONFIG_MODVERSIONS is not set
117# CONFIG_MODULE_SRCVERSION_ALL is not set 132# CONFIG_MODULE_SRCVERSION_ALL is not set
118CONFIG_BLOCK=y 133CONFIG_BLOCK=y
119# CONFIG_LBD is not set 134CONFIG_LBDAF=y
120# CONFIG_BLK_DEV_BSG is not set 135# CONFIG_BLK_DEV_BSG is not set
121# CONFIG_BLK_DEV_INTEGRITY is not set 136# CONFIG_BLK_DEV_INTEGRITY is not set
122 137
@@ -163,6 +178,7 @@ CONFIG_CPU_SUBTYPE_SH7751R=y
163# CONFIG_CPU_SUBTYPE_SH4_202 is not set 178# CONFIG_CPU_SUBTYPE_SH4_202 is not set
164# CONFIG_CPU_SUBTYPE_SH7723 is not set 179# CONFIG_CPU_SUBTYPE_SH7723 is not set
165# CONFIG_CPU_SUBTYPE_SH7724 is not set 180# CONFIG_CPU_SUBTYPE_SH7724 is not set
181# CONFIG_CPU_SUBTYPE_SH7757 is not set
166# CONFIG_CPU_SUBTYPE_SH7763 is not set 182# CONFIG_CPU_SUBTYPE_SH7763 is not set
167# CONFIG_CPU_SUBTYPE_SH7770 is not set 183# CONFIG_CPU_SUBTYPE_SH7770 is not set
168# CONFIG_CPU_SUBTYPE_SH7780 is not set 184# CONFIG_CPU_SUBTYPE_SH7780 is not set
@@ -208,6 +224,7 @@ CONFIG_ZONE_DMA_FLAG=0
208CONFIG_NR_QUICK=2 224CONFIG_NR_QUICK=2
209CONFIG_HAVE_MLOCK=y 225CONFIG_HAVE_MLOCK=y
210CONFIG_HAVE_MLOCKED_PAGE_BIT=y 226CONFIG_HAVE_MLOCKED_PAGE_BIT=y
227# CONFIG_KSM is not set
211CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 228CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
212 229
213# 230#
@@ -295,7 +312,8 @@ CONFIG_ZERO_PAGE_OFFSET=0x00001000
295CONFIG_BOOT_LINK_OFFSET=0x00800000 312CONFIG_BOOT_LINK_OFFSET=0x00800000
296CONFIG_ENTRY_OFFSET=0x00001000 313CONFIG_ENTRY_OFFSET=0x00001000
297# CONFIG_UBC_WAKEUP is not set 314# CONFIG_UBC_WAKEUP is not set
298CONFIG_CMDLINE_BOOL=y 315CONFIG_CMDLINE_OVERWRITE=y
316# CONFIG_CMDLINE_EXTEND is not set
299CONFIG_CMDLINE="console=ttySC1,115200 root=/dev/sda1" 317CONFIG_CMDLINE="console=ttySC1,115200 root=/dev/sda1"
300 318
301# 319#
@@ -411,6 +429,7 @@ CONFIG_NETFILTER_ADVANCED=y
411# CONFIG_IP_NF_ARPTABLES is not set 429# CONFIG_IP_NF_ARPTABLES is not set
412# CONFIG_IP_DCCP is not set 430# CONFIG_IP_DCCP is not set
413# CONFIG_IP_SCTP is not set 431# CONFIG_IP_SCTP is not set
432# CONFIG_RDS is not set
414# CONFIG_TIPC is not set 433# CONFIG_TIPC is not set
415# CONFIG_ATM is not set 434# CONFIG_ATM is not set
416# CONFIG_BRIDGE is not set 435# CONFIG_BRIDGE is not set
@@ -440,6 +459,7 @@ CONFIG_NETFILTER_ADVANCED=y
440# CONFIG_AF_RXRPC is not set 459# CONFIG_AF_RXRPC is not set
441CONFIG_WIRELESS=y 460CONFIG_WIRELESS=y
442# CONFIG_CFG80211 is not set 461# CONFIG_CFG80211 is not set
462CONFIG_CFG80211_DEFAULT_PS_VALUE=0
443# CONFIG_WIRELESS_OLD_REGULATORY is not set 463# CONFIG_WIRELESS_OLD_REGULATORY is not set
444# CONFIG_WIRELESS_EXT is not set 464# CONFIG_WIRELESS_EXT is not set
445# CONFIG_LIB80211 is not set 465# CONFIG_LIB80211 is not set
@@ -447,7 +467,6 @@ CONFIG_WIRELESS=y
447# 467#
448# CFG80211 needs to be enabled for MAC80211 468# CFG80211 needs to be enabled for MAC80211
449# 469#
450CONFIG_MAC80211_DEFAULT_PS_VALUE=0
451# CONFIG_WIMAX is not set 470# CONFIG_WIMAX is not set
452# CONFIG_RFKILL is not set 471# CONFIG_RFKILL is not set
453# CONFIG_NET_9P is not set 472# CONFIG_NET_9P is not set
@@ -460,6 +479,7 @@ CONFIG_MAC80211_DEFAULT_PS_VALUE=0
460# Generic Driver Options 479# Generic Driver Options
461# 480#
462CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 481CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
482# CONFIG_DEVTMPFS is not set
463CONFIG_STANDALONE=y 483CONFIG_STANDALONE=y
464CONFIG_PREVENT_FIRMWARE_BUILD=y 484CONFIG_PREVENT_FIRMWARE_BUILD=y
465CONFIG_FW_LOADER=y 485CONFIG_FW_LOADER=y
@@ -572,12 +592,14 @@ CONFIG_SCSI_LOWLEVEL=y
572# CONFIG_SCSI_DC390T is not set 592# CONFIG_SCSI_DC390T is not set
573# CONFIG_SCSI_NSP32 is not set 593# CONFIG_SCSI_NSP32 is not set
574# CONFIG_SCSI_DEBUG is not set 594# CONFIG_SCSI_DEBUG is not set
595# CONFIG_SCSI_PMCRAID is not set
575# CONFIG_SCSI_SRP is not set 596# CONFIG_SCSI_SRP is not set
576# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set 597# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
577# CONFIG_SCSI_DH is not set 598# CONFIG_SCSI_DH is not set
578# CONFIG_SCSI_OSD_INITIATOR is not set 599# CONFIG_SCSI_OSD_INITIATOR is not set
579CONFIG_ATA=y 600CONFIG_ATA=y
580# CONFIG_ATA_NONSTANDARD is not set 601# CONFIG_ATA_NONSTANDARD is not set
602CONFIG_ATA_VERBOSE_ERROR=y
581CONFIG_SATA_PMP=y 603CONFIG_SATA_PMP=y
582# CONFIG_SATA_AHCI is not set 604# CONFIG_SATA_AHCI is not set
583# CONFIG_SATA_SIL24 is not set 605# CONFIG_SATA_SIL24 is not set
@@ -599,6 +621,7 @@ CONFIG_ATA_SFF=y
599# CONFIG_PATA_ALI is not set 621# CONFIG_PATA_ALI is not set
600# CONFIG_PATA_AMD is not set 622# CONFIG_PATA_AMD is not set
601# CONFIG_PATA_ARTOP is not set 623# CONFIG_PATA_ARTOP is not set
624# CONFIG_PATA_ATP867X is not set
602# CONFIG_PATA_ATIIXP is not set 625# CONFIG_PATA_ATIIXP is not set
603# CONFIG_PATA_CMD640_PCI is not set 626# CONFIG_PATA_CMD640_PCI is not set
604# CONFIG_PATA_CMD64X is not set 627# CONFIG_PATA_CMD64X is not set
@@ -627,6 +650,7 @@ CONFIG_ATA_SFF=y
627# CONFIG_PATA_PCMCIA is not set 650# CONFIG_PATA_PCMCIA is not set
628# CONFIG_PATA_PDC_OLD is not set 651# CONFIG_PATA_PDC_OLD is not set
629# CONFIG_PATA_RADISYS is not set 652# CONFIG_PATA_RADISYS is not set
653# CONFIG_PATA_RDC is not set
630# CONFIG_PATA_RZ1000 is not set 654# CONFIG_PATA_RZ1000 is not set
631# CONFIG_PATA_SC1200 is not set 655# CONFIG_PATA_SC1200 is not set
632# CONFIG_PATA_SERVERWORKS is not set 656# CONFIG_PATA_SERVERWORKS is not set
@@ -645,7 +669,11 @@ CONFIG_PATA_PLATFORM=y
645# 669#
646 670
647# 671#
648# Enable only one of the two stacks, unless you know what you are doing 672# You can enable one or both FireWire driver stacks.
673#
674
675#
676# See the help texts for more information.
649# 677#
650# CONFIG_FIREWIRE is not set 678# CONFIG_FIREWIRE is not set
651# CONFIG_IEEE1394 is not set 679# CONFIG_IEEE1394 is not set
@@ -725,6 +753,7 @@ CONFIG_NETDEV_1000=y
725# CONFIG_VIA_VELOCITY is not set 753# CONFIG_VIA_VELOCITY is not set
726# CONFIG_TIGON3 is not set 754# CONFIG_TIGON3 is not set
727# CONFIG_BNX2 is not set 755# CONFIG_BNX2 is not set
756# CONFIG_CNIC is not set
728# CONFIG_QLA3XXX is not set 757# CONFIG_QLA3XXX is not set
729# CONFIG_ATL1 is not set 758# CONFIG_ATL1 is not set
730# CONFIG_ATL1E is not set 759# CONFIG_ATL1E is not set
@@ -750,10 +779,7 @@ CONFIG_CHELSIO_T3_DEPENDS=y
750# CONFIG_SFC is not set 779# CONFIG_SFC is not set
751# CONFIG_BE2NET is not set 780# CONFIG_BE2NET is not set
752# CONFIG_TR is not set 781# CONFIG_TR is not set
753 782CONFIG_WLAN=y
754#
755# Wireless LAN
756#
757# CONFIG_WLAN_PRE80211 is not set 783# CONFIG_WLAN_PRE80211 is not set
758# CONFIG_WLAN_80211 is not set 784# CONFIG_WLAN_80211 is not set
759 785
@@ -863,10 +889,20 @@ CONFIG_HW_RANDOM=y
863CONFIG_DEVPORT=y 889CONFIG_DEVPORT=y
864# CONFIG_I2C is not set 890# CONFIG_I2C is not set
865# CONFIG_SPI is not set 891# CONFIG_SPI is not set
892
893#
894# PPS support
895#
896# CONFIG_PPS is not set
866# CONFIG_W1 is not set 897# CONFIG_W1 is not set
867# CONFIG_POWER_SUPPLY is not set 898# CONFIG_POWER_SUPPLY is not set
868CONFIG_HWMON=y 899CONFIG_HWMON=y
869# CONFIG_HWMON_VID is not set 900# CONFIG_HWMON_VID is not set
901# CONFIG_HWMON_DEBUG_CHIP is not set
902
903#
904# Native drivers
905#
870# CONFIG_SENSORS_I5K_AMB is not set 906# CONFIG_SENSORS_I5K_AMB is not set
871# CONFIG_SENSORS_F71805F is not set 907# CONFIG_SENSORS_F71805F is not set
872# CONFIG_SENSORS_F71882FG is not set 908# CONFIG_SENSORS_F71882FG is not set
@@ -881,9 +917,7 @@ CONFIG_HWMON=y
881# CONFIG_SENSORS_VT8231 is not set 917# CONFIG_SENSORS_VT8231 is not set
882# CONFIG_SENSORS_W83627HF is not set 918# CONFIG_SENSORS_W83627HF is not set
883# CONFIG_SENSORS_W83627EHF is not set 919# CONFIG_SENSORS_W83627EHF is not set
884# CONFIG_HWMON_DEBUG_CHIP is not set
885# CONFIG_THERMAL is not set 920# CONFIG_THERMAL is not set
886# CONFIG_THERMAL_HWMON is not set
887# CONFIG_WATCHDOG is not set 921# CONFIG_WATCHDOG is not set
888CONFIG_SSB_POSSIBLE=y 922CONFIG_SSB_POSSIBLE=y
889 923
@@ -905,6 +939,7 @@ CONFIG_SSB_POSSIBLE=y
905# 939#
906# Graphics support 940# Graphics support
907# 941#
942CONFIG_VGA_ARB=y
908# CONFIG_DRM is not set 943# CONFIG_DRM is not set
909# CONFIG_VGASTATE is not set 944# CONFIG_VGASTATE is not set
910# CONFIG_VIDEO_OUTPUT_CONTROL is not set 945# CONFIG_VIDEO_OUTPUT_CONTROL is not set
@@ -923,7 +958,6 @@ CONFIG_DUMMY_CONSOLE=y
923# CONFIG_SOUND is not set 958# CONFIG_SOUND is not set
924CONFIG_HID_SUPPORT=y 959CONFIG_HID_SUPPORT=y
925CONFIG_HID=y 960CONFIG_HID=y
926# CONFIG_HID_DEBUG is not set
927# CONFIG_HIDRAW is not set 961# CONFIG_HIDRAW is not set
928# CONFIG_HID_PID is not set 962# CONFIG_HID_PID is not set
929 963
@@ -1021,8 +1055,10 @@ CONFIG_FS_MBCACHE=y
1021# CONFIG_JFS_FS is not set 1055# CONFIG_JFS_FS is not set
1022# CONFIG_FS_POSIX_ACL is not set 1056# CONFIG_FS_POSIX_ACL is not set
1023# CONFIG_XFS_FS is not set 1057# CONFIG_XFS_FS is not set
1058# CONFIG_GFS2_FS is not set
1024# CONFIG_OCFS2_FS is not set 1059# CONFIG_OCFS2_FS is not set
1025# CONFIG_BTRFS_FS is not set 1060# CONFIG_BTRFS_FS is not set
1061# CONFIG_NILFS2_FS is not set
1026CONFIG_FILE_LOCKING=y 1062CONFIG_FILE_LOCKING=y
1027CONFIG_FSNOTIFY=y 1063CONFIG_FSNOTIFY=y
1028CONFIG_DNOTIFY=y 1064CONFIG_DNOTIFY=y
@@ -1089,7 +1125,6 @@ CONFIG_ROMFS_BACKED_BY_BLOCK=y
1089CONFIG_ROMFS_ON_BLOCK=y 1125CONFIG_ROMFS_ON_BLOCK=y
1090# CONFIG_SYSV_FS is not set 1126# CONFIG_SYSV_FS is not set
1091# CONFIG_UFS_FS is not set 1127# CONFIG_UFS_FS is not set
1092# CONFIG_NILFS2_FS is not set
1093CONFIG_NETWORK_FILESYSTEMS=y 1128CONFIG_NETWORK_FILESYSTEMS=y
1094# CONFIG_NFS_FS is not set 1129# CONFIG_NFS_FS is not set
1095# CONFIG_NFSD is not set 1130# CONFIG_NFSD is not set
@@ -1155,6 +1190,7 @@ CONFIG_ENABLE_WARN_DEPRECATED=y
1155CONFIG_ENABLE_MUST_CHECK=y 1190CONFIG_ENABLE_MUST_CHECK=y
1156CONFIG_FRAME_WARN=1024 1191CONFIG_FRAME_WARN=1024
1157# CONFIG_MAGIC_SYSRQ is not set 1192# CONFIG_MAGIC_SYSRQ is not set
1193# CONFIG_STRIP_ASM_SYMS is not set
1158# CONFIG_UNUSED_SYMBOLS is not set 1194# CONFIG_UNUSED_SYMBOLS is not set
1159# CONFIG_DEBUG_FS is not set 1195# CONFIG_DEBUG_FS is not set
1160# CONFIG_HEADERS_CHECK is not set 1196# CONFIG_HEADERS_CHECK is not set
@@ -1164,8 +1200,11 @@ CONFIG_FRAME_WARN=1024
1164# CONFIG_RCU_CPU_STALL_DETECTOR is not set 1200# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1165# CONFIG_LATENCYTOP is not set 1201# CONFIG_LATENCYTOP is not set
1166CONFIG_HAVE_FUNCTION_TRACER=y 1202CONFIG_HAVE_FUNCTION_TRACER=y
1203CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1204CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
1167CONFIG_HAVE_DYNAMIC_FTRACE=y 1205CONFIG_HAVE_DYNAMIC_FTRACE=y
1168CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1206CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1207CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
1169CONFIG_TRACING_SUPPORT=y 1208CONFIG_TRACING_SUPPORT=y
1170# CONFIG_FTRACE is not set 1209# CONFIG_FTRACE is not set
1171# CONFIG_DMA_API_DEBUG is not set 1210# CONFIG_DMA_API_DEBUG is not set
@@ -1174,6 +1213,7 @@ CONFIG_HAVE_ARCH_KGDB=y
1174CONFIG_SH_STANDARD_BIOS=y 1213CONFIG_SH_STANDARD_BIOS=y
1175# CONFIG_EARLY_SCIF_CONSOLE is not set 1214# CONFIG_EARLY_SCIF_CONSOLE is not set
1176# CONFIG_EARLY_PRINTK is not set 1215# CONFIG_EARLY_PRINTK is not set
1216# CONFIG_DWARF_UNWINDER is not set
1177 1217
1178# 1218#
1179# Security options 1219# Security options
@@ -1187,7 +1227,6 @@ CONFIG_CRYPTO=y
1187# 1227#
1188# Crypto core or helper 1228# Crypto core or helper
1189# 1229#
1190# CONFIG_CRYPTO_FIPS is not set
1191# CONFIG_CRYPTO_MANAGER is not set 1230# CONFIG_CRYPTO_MANAGER is not set
1192# CONFIG_CRYPTO_MANAGER2 is not set 1231# CONFIG_CRYPTO_MANAGER2 is not set
1193# CONFIG_CRYPTO_GF128MUL is not set 1232# CONFIG_CRYPTO_GF128MUL is not set
@@ -1219,11 +1258,13 @@ CONFIG_CRYPTO=y
1219# 1258#
1220# CONFIG_CRYPTO_HMAC is not set 1259# CONFIG_CRYPTO_HMAC is not set
1221# CONFIG_CRYPTO_XCBC is not set 1260# CONFIG_CRYPTO_XCBC is not set
1261# CONFIG_CRYPTO_VMAC is not set
1222 1262
1223# 1263#
1224# Digest 1264# Digest
1225# 1265#
1226# CONFIG_CRYPTO_CRC32C is not set 1266# CONFIG_CRYPTO_CRC32C is not set
1267# CONFIG_CRYPTO_GHASH is not set
1227# CONFIG_CRYPTO_MD4 is not set 1268# CONFIG_CRYPTO_MD4 is not set
1228# CONFIG_CRYPTO_MD5 is not set 1269# CONFIG_CRYPTO_MD5 is not set
1229# CONFIG_CRYPTO_MICHAEL_MIC is not set 1270# CONFIG_CRYPTO_MICHAEL_MIC is not set
@@ -1286,5 +1327,6 @@ CONFIG_CRC32=y
1286CONFIG_HAS_IOMEM=y 1327CONFIG_HAS_IOMEM=y
1287CONFIG_HAS_IOPORT=y 1328CONFIG_HAS_IOPORT=y
1288CONFIG_HAS_DMA=y 1329CONFIG_HAS_DMA=y
1330CONFIG_HAVE_LMB=y
1289CONFIG_NLATTR=y 1331CONFIG_NLATTR=y
1290CONFIG_GENERIC_ATOMIC64=y 1332CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/magicpanelr2_defconfig b/arch/sh/configs/magicpanelr2_defconfig
index c5859e82d916..79091e3e32c4 100644
--- a/arch/sh/configs/magicpanelr2_defconfig
+++ b/arch/sh/configs/magicpanelr2_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.30 3# Linux kernel version: 2.6.31
4# Thu Jun 18 12:30:31 2009 4# Thu Sep 24 18:10:49 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -14,6 +14,7 @@ CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y 14CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
16CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_IRQ_PER_CPU=y
17CONFIG_GENERIC_GPIO=y 18CONFIG_GENERIC_GPIO=y
18CONFIG_GENERIC_TIME=y 19CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 20CONFIG_GENERIC_CLOCKEVENTS=y
@@ -28,7 +29,9 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
28# CONFIG_ARCH_HAS_ILOG2_U64 is not set 29# CONFIG_ARCH_HAS_ILOG2_U64 is not set
29CONFIG_ARCH_NO_VIRT_TO_BUS=y 30CONFIG_ARCH_NO_VIRT_TO_BUS=y
30CONFIG_ARCH_HAS_DEFAULT_IDLE=y 31CONFIG_ARCH_HAS_DEFAULT_IDLE=y
32CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
31CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 33CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
34CONFIG_CONSTRUCTORS=y
32 35
33# 36#
34# General setup 37# General setup
@@ -38,6 +41,12 @@ CONFIG_BROKEN_ON_SMP=y
38CONFIG_INIT_ENV_ARG_LIMIT=32 41CONFIG_INIT_ENV_ARG_LIMIT=32
39CONFIG_LOCALVERSION="" 42CONFIG_LOCALVERSION=""
40# CONFIG_LOCALVERSION_AUTO is not set 43# CONFIG_LOCALVERSION_AUTO is not set
44CONFIG_HAVE_KERNEL_GZIP=y
45CONFIG_HAVE_KERNEL_BZIP2=y
46CONFIG_HAVE_KERNEL_LZMA=y
47CONFIG_KERNEL_GZIP=y
48# CONFIG_KERNEL_BZIP2 is not set
49# CONFIG_KERNEL_LZMA is not set
41CONFIG_SWAP=y 50CONFIG_SWAP=y
42CONFIG_SYSVIPC=y 51CONFIG_SYSVIPC=y
43CONFIG_SYSVIPC_SYSCTL=y 52CONFIG_SYSVIPC_SYSCTL=y
@@ -52,11 +61,12 @@ CONFIG_AUDIT=y
52# 61#
53# RCU Subsystem 62# RCU Subsystem
54# 63#
55CONFIG_CLASSIC_RCU=y 64CONFIG_TREE_RCU=y
56# CONFIG_TREE_RCU is not set 65# CONFIG_TREE_PREEMPT_RCU is not set
57# CONFIG_PREEMPT_RCU is not set 66# CONFIG_RCU_TRACE is not set
67CONFIG_RCU_FANOUT=32
68# CONFIG_RCU_FANOUT_EXACT is not set
58# CONFIG_TREE_RCU_TRACE is not set 69# CONFIG_TREE_RCU_TRACE is not set
59# CONFIG_PREEMPT_RCU_TRACE is not set
60# CONFIG_IKCONFIG is not set 70# CONFIG_IKCONFIG is not set
61CONFIG_LOG_BUF_SHIFT=17 71CONFIG_LOG_BUF_SHIFT=17
62# CONFIG_GROUP_SCHED is not set 72# CONFIG_GROUP_SCHED is not set
@@ -91,18 +101,19 @@ CONFIG_TIMERFD=y
91CONFIG_EVENTFD=y 101CONFIG_EVENTFD=y
92CONFIG_SHMEM=y 102CONFIG_SHMEM=y
93CONFIG_AIO=y 103CONFIG_AIO=y
104CONFIG_HAVE_PERF_EVENTS=y
94 105
95# 106#
96# Performance Counters 107# Kernel Performance Events And Counters
97# 108#
109# CONFIG_PERF_EVENTS is not set
110# CONFIG_PERF_COUNTERS is not set
98CONFIG_VM_EVENT_COUNTERS=y 111CONFIG_VM_EVENT_COUNTERS=y
99# CONFIG_STRIP_ASM_SYMS is not set
100CONFIG_COMPAT_BRK=y 112CONFIG_COMPAT_BRK=y
101CONFIG_SLAB=y 113CONFIG_SLAB=y
102# CONFIG_SLUB is not set 114# CONFIG_SLUB is not set
103# CONFIG_SLOB is not set 115# CONFIG_SLOB is not set
104# CONFIG_PROFILING is not set 116# CONFIG_PROFILING is not set
105# CONFIG_MARKERS is not set
106CONFIG_HAVE_OPROFILE=y 117CONFIG_HAVE_OPROFILE=y
107# CONFIG_KPROBES is not set 118# CONFIG_KPROBES is not set
108CONFIG_HAVE_IOREMAP_PROT=y 119CONFIG_HAVE_IOREMAP_PROT=y
@@ -111,6 +122,10 @@ CONFIG_HAVE_KRETPROBES=y
111CONFIG_HAVE_ARCH_TRACEHOOK=y 122CONFIG_HAVE_ARCH_TRACEHOOK=y
112CONFIG_HAVE_CLK=y 123CONFIG_HAVE_CLK=y
113CONFIG_HAVE_DMA_API_DEBUG=y 124CONFIG_HAVE_DMA_API_DEBUG=y
125
126#
127# GCOV-based kernel profiling
128#
114# CONFIG_SLOW_WORK is not set 129# CONFIG_SLOW_WORK is not set
115CONFIG_HAVE_GENERIC_DMA_COHERENT=y 130CONFIG_HAVE_GENERIC_DMA_COHERENT=y
116CONFIG_SLABINFO=y 131CONFIG_SLABINFO=y
@@ -123,7 +138,7 @@ CONFIG_MODULE_UNLOAD=y
123CONFIG_MODVERSIONS=y 138CONFIG_MODVERSIONS=y
124CONFIG_MODULE_SRCVERSION_ALL=y 139CONFIG_MODULE_SRCVERSION_ALL=y
125CONFIG_BLOCK=y 140CONFIG_BLOCK=y
126# CONFIG_LBD is not set 141CONFIG_LBDAF=y
127# CONFIG_BLK_DEV_BSG is not set 142# CONFIG_BLK_DEV_BSG is not set
128# CONFIG_BLK_DEV_INTEGRITY is not set 143# CONFIG_BLK_DEV_INTEGRITY is not set
129 144
@@ -170,6 +185,7 @@ CONFIG_CPU_SUBTYPE_SH7720=y
170# CONFIG_CPU_SUBTYPE_SH4_202 is not set 185# CONFIG_CPU_SUBTYPE_SH4_202 is not set
171# CONFIG_CPU_SUBTYPE_SH7723 is not set 186# CONFIG_CPU_SUBTYPE_SH7723 is not set
172# CONFIG_CPU_SUBTYPE_SH7724 is not set 187# CONFIG_CPU_SUBTYPE_SH7724 is not set
188# CONFIG_CPU_SUBTYPE_SH7757 is not set
173# CONFIG_CPU_SUBTYPE_SH7763 is not set 189# CONFIG_CPU_SUBTYPE_SH7763 is not set
174# CONFIG_CPU_SUBTYPE_SH7770 is not set 190# CONFIG_CPU_SUBTYPE_SH7770 is not set
175# CONFIG_CPU_SUBTYPE_SH7780 is not set 191# CONFIG_CPU_SUBTYPE_SH7780 is not set
@@ -215,6 +231,7 @@ CONFIG_ZONE_DMA_FLAG=0
215CONFIG_NR_QUICK=2 231CONFIG_NR_QUICK=2
216CONFIG_HAVE_MLOCK=y 232CONFIG_HAVE_MLOCK=y
217CONFIG_HAVE_MLOCKED_PAGE_BIT=y 233CONFIG_HAVE_MLOCKED_PAGE_BIT=y
234# CONFIG_KSM is not set
218CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 235CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
219 236
220# 237#
@@ -306,7 +323,8 @@ CONFIG_GUSA=y
306CONFIG_ZERO_PAGE_OFFSET=0x00001000 323CONFIG_ZERO_PAGE_OFFSET=0x00001000
307CONFIG_BOOT_LINK_OFFSET=0x00800000 324CONFIG_BOOT_LINK_OFFSET=0x00800000
308CONFIG_ENTRY_OFFSET=0x00001000 325CONFIG_ENTRY_OFFSET=0x00001000
309# CONFIG_CMDLINE_BOOL is not set 326# CONFIG_CMDLINE_OVERWRITE is not set
327# CONFIG_CMDLINE_EXTEND is not set
310 328
311# 329#
312# Bus options 330# Bus options
@@ -368,6 +386,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
368# CONFIG_NETFILTER is not set 386# CONFIG_NETFILTER is not set
369# CONFIG_IP_DCCP is not set 387# CONFIG_IP_DCCP is not set
370# CONFIG_IP_SCTP is not set 388# CONFIG_IP_SCTP is not set
389# CONFIG_RDS is not set
371# CONFIG_TIPC is not set 390# CONFIG_TIPC is not set
372# CONFIG_ATM is not set 391# CONFIG_ATM is not set
373# CONFIG_BRIDGE is not set 392# CONFIG_BRIDGE is not set
@@ -397,6 +416,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
397# CONFIG_AF_RXRPC is not set 416# CONFIG_AF_RXRPC is not set
398CONFIG_WIRELESS=y 417CONFIG_WIRELESS=y
399# CONFIG_CFG80211 is not set 418# CONFIG_CFG80211 is not set
419CONFIG_CFG80211_DEFAULT_PS_VALUE=0
400# CONFIG_WIRELESS_OLD_REGULATORY is not set 420# CONFIG_WIRELESS_OLD_REGULATORY is not set
401# CONFIG_WIRELESS_EXT is not set 421# CONFIG_WIRELESS_EXT is not set
402# CONFIG_LIB80211 is not set 422# CONFIG_LIB80211 is not set
@@ -404,7 +424,6 @@ CONFIG_WIRELESS=y
404# 424#
405# CFG80211 needs to be enabled for MAC80211 425# CFG80211 needs to be enabled for MAC80211
406# 426#
407CONFIG_MAC80211_DEFAULT_PS_VALUE=0
408# CONFIG_WIMAX is not set 427# CONFIG_WIMAX is not set
409# CONFIG_RFKILL is not set 428# CONFIG_RFKILL is not set
410# CONFIG_NET_9P is not set 429# CONFIG_NET_9P is not set
@@ -417,6 +436,7 @@ CONFIG_MAC80211_DEFAULT_PS_VALUE=0
417# Generic Driver Options 436# Generic Driver Options
418# 437#
419CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 438CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
439# CONFIG_DEVTMPFS is not set
420# CONFIG_STANDALONE is not set 440# CONFIG_STANDALONE is not set
421# CONFIG_PREVENT_FIRMWARE_BUILD is not set 441# CONFIG_PREVENT_FIRMWARE_BUILD is not set
422CONFIG_FW_LOADER=y 442CONFIG_FW_LOADER=y
@@ -428,9 +448,9 @@ CONFIG_EXTRA_FIRMWARE=""
428# CONFIG_CONNECTOR is not set 448# CONFIG_CONNECTOR is not set
429CONFIG_MTD=y 449CONFIG_MTD=y
430# CONFIG_MTD_DEBUG is not set 450# CONFIG_MTD_DEBUG is not set
451# CONFIG_MTD_TESTS is not set
431# CONFIG_MTD_CONCAT is not set 452# CONFIG_MTD_CONCAT is not set
432CONFIG_MTD_PARTITIONS=y 453CONFIG_MTD_PARTITIONS=y
433# CONFIG_MTD_TESTS is not set
434CONFIG_MTD_REDBOOT_PARTS=y 454CONFIG_MTD_REDBOOT_PARTS=y
435CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 455CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
436# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set 456# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
@@ -589,10 +609,7 @@ CONFIG_SMSC911X=y
589# CONFIG_KS8842 is not set 609# CONFIG_KS8842 is not set
590# CONFIG_NETDEV_1000 is not set 610# CONFIG_NETDEV_1000 is not set
591# CONFIG_NETDEV_10000 is not set 611# CONFIG_NETDEV_10000 is not set
592 612CONFIG_WLAN=y
593#
594# Wireless LAN
595#
596# CONFIG_WLAN_PRE80211 is not set 613# CONFIG_WLAN_PRE80211 is not set
597# CONFIG_WLAN_80211 is not set 614# CONFIG_WLAN_80211 is not set
598 615
@@ -631,13 +648,15 @@ CONFIG_INPUT_EVDEV=y
631# 648#
632CONFIG_INPUT_KEYBOARD=y 649CONFIG_INPUT_KEYBOARD=y
633CONFIG_KEYBOARD_ATKBD=y 650CONFIG_KEYBOARD_ATKBD=y
634# CONFIG_KEYBOARD_SUNKBD is not set
635# CONFIG_KEYBOARD_LKKBD is not set 651# CONFIG_KEYBOARD_LKKBD is not set
636# CONFIG_KEYBOARD_XTKBD is not set 652# CONFIG_KEYBOARD_GPIO is not set
653# CONFIG_KEYBOARD_MATRIX is not set
637# CONFIG_KEYBOARD_NEWTON is not set 654# CONFIG_KEYBOARD_NEWTON is not set
655# CONFIG_KEYBOARD_OPENCORES is not set
638# CONFIG_KEYBOARD_STOWAWAY is not set 656# CONFIG_KEYBOARD_STOWAWAY is not set
639# CONFIG_KEYBOARD_GPIO is not set 657# CONFIG_KEYBOARD_SUNKBD is not set
640# CONFIG_KEYBOARD_SH_KEYSC is not set 658# CONFIG_KEYBOARD_SH_KEYSC is not set
659# CONFIG_KEYBOARD_XTKBD is not set
641CONFIG_INPUT_MOUSE=y 660CONFIG_INPUT_MOUSE=y
642# CONFIG_MOUSE_PS2 is not set 661# CONFIG_MOUSE_PS2 is not set
643# CONFIG_MOUSE_SERIAL is not set 662# CONFIG_MOUSE_SERIAL is not set
@@ -701,6 +720,11 @@ CONFIG_LEGACY_PTY_COUNT=256
701# CONFIG_TCG_TPM is not set 720# CONFIG_TCG_TPM is not set
702# CONFIG_I2C is not set 721# CONFIG_I2C is not set
703# CONFIG_SPI is not set 722# CONFIG_SPI is not set
723
724#
725# PPS support
726#
727# CONFIG_PPS is not set
704CONFIG_ARCH_REQUIRE_GPIOLIB=y 728CONFIG_ARCH_REQUIRE_GPIOLIB=y
705CONFIG_GPIOLIB=y 729CONFIG_GPIOLIB=y
706# CONFIG_DEBUG_GPIO is not set 730# CONFIG_DEBUG_GPIO is not set
@@ -721,11 +745,14 @@ CONFIG_GPIOLIB=y
721# 745#
722# SPI GPIO expanders: 746# SPI GPIO expanders:
723# 747#
748
749#
750# AC97 GPIO expanders:
751#
724# CONFIG_W1 is not set 752# CONFIG_W1 is not set
725# CONFIG_POWER_SUPPLY is not set 753# CONFIG_POWER_SUPPLY is not set
726# CONFIG_HWMON is not set 754# CONFIG_HWMON is not set
727# CONFIG_THERMAL is not set 755# CONFIG_THERMAL is not set
728# CONFIG_THERMAL_HWMON is not set
729# CONFIG_WATCHDOG is not set 756# CONFIG_WATCHDOG is not set
730CONFIG_SSB_POSSIBLE=y 757CONFIG_SSB_POSSIBLE=y
731 758
@@ -829,8 +856,10 @@ CONFIG_JBD=y
829# CONFIG_JFS_FS is not set 856# CONFIG_JFS_FS is not set
830# CONFIG_FS_POSIX_ACL is not set 857# CONFIG_FS_POSIX_ACL is not set
831# CONFIG_XFS_FS is not set 858# CONFIG_XFS_FS is not set
859# CONFIG_GFS2_FS is not set
832# CONFIG_OCFS2_FS is not set 860# CONFIG_OCFS2_FS is not set
833# CONFIG_BTRFS_FS is not set 861# CONFIG_BTRFS_FS is not set
862# CONFIG_NILFS2_FS is not set
834CONFIG_FILE_LOCKING=y 863CONFIG_FILE_LOCKING=y
835CONFIG_FSNOTIFY=y 864CONFIG_FSNOTIFY=y
836# CONFIG_DNOTIFY is not set 865# CONFIG_DNOTIFY is not set
@@ -900,7 +929,6 @@ CONFIG_JFFS2_RTIME=y
900# CONFIG_ROMFS_FS is not set 929# CONFIG_ROMFS_FS is not set
901# CONFIG_SYSV_FS is not set 930# CONFIG_SYSV_FS is not set
902# CONFIG_UFS_FS is not set 931# CONFIG_UFS_FS is not set
903# CONFIG_NILFS2_FS is not set
904CONFIG_NETWORK_FILESYSTEMS=y 932CONFIG_NETWORK_FILESYSTEMS=y
905CONFIG_NFS_FS=y 933CONFIG_NFS_FS=y
906CONFIG_NFS_V3=y 934CONFIG_NFS_V3=y
@@ -976,6 +1004,7 @@ CONFIG_ENABLE_WARN_DEPRECATED=y
976CONFIG_ENABLE_MUST_CHECK=y 1004CONFIG_ENABLE_MUST_CHECK=y
977CONFIG_FRAME_WARN=1024 1005CONFIG_FRAME_WARN=1024
978CONFIG_MAGIC_SYSRQ=y 1006CONFIG_MAGIC_SYSRQ=y
1007# CONFIG_STRIP_ASM_SYMS is not set
979# CONFIG_UNUSED_SYMBOLS is not set 1008# CONFIG_UNUSED_SYMBOLS is not set
980# CONFIG_DEBUG_FS is not set 1009# CONFIG_DEBUG_FS is not set
981# CONFIG_HEADERS_CHECK is not set 1010# CONFIG_HEADERS_CHECK is not set
@@ -1006,24 +1035,30 @@ CONFIG_DEBUG_INFO=y
1006# CONFIG_DEBUG_LIST is not set 1035# CONFIG_DEBUG_LIST is not set
1007# CONFIG_DEBUG_SG is not set 1036# CONFIG_DEBUG_SG is not set
1008# CONFIG_DEBUG_NOTIFIERS is not set 1037# CONFIG_DEBUG_NOTIFIERS is not set
1038# CONFIG_DEBUG_CREDENTIALS is not set
1009CONFIG_FRAME_POINTER=y 1039CONFIG_FRAME_POINTER=y
1010# CONFIG_RCU_TORTURE_TEST is not set 1040# CONFIG_RCU_TORTURE_TEST is not set
1011# CONFIG_RCU_CPU_STALL_DETECTOR is not set 1041# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1012# CONFIG_BACKTRACE_SELF_TEST is not set 1042# CONFIG_BACKTRACE_SELF_TEST is not set
1013# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set 1043# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
1044# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
1014# CONFIG_FAULT_INJECTION is not set 1045# CONFIG_FAULT_INJECTION is not set
1015# CONFIG_LATENCYTOP is not set 1046# CONFIG_LATENCYTOP is not set
1016CONFIG_SYSCTL_SYSCALL_CHECK=y 1047CONFIG_SYSCTL_SYSCALL_CHECK=y
1017# CONFIG_PAGE_POISONING is not set 1048# CONFIG_PAGE_POISONING is not set
1018CONFIG_HAVE_FUNCTION_TRACER=y 1049CONFIG_HAVE_FUNCTION_TRACER=y
1050CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1051CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
1019CONFIG_HAVE_DYNAMIC_FTRACE=y 1052CONFIG_HAVE_DYNAMIC_FTRACE=y
1020CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1053CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1054CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
1021CONFIG_TRACING_SUPPORT=y 1055CONFIG_TRACING_SUPPORT=y
1022CONFIG_FTRACE=y 1056CONFIG_FTRACE=y
1023# CONFIG_FUNCTION_TRACER is not set 1057# CONFIG_FUNCTION_TRACER is not set
1024# CONFIG_IRQSOFF_TRACER is not set 1058# CONFIG_IRQSOFF_TRACER is not set
1025# CONFIG_SCHED_TRACER is not set 1059# CONFIG_SCHED_TRACER is not set
1026# CONFIG_ENABLE_DEFAULT_TRACERS is not set 1060# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1061# CONFIG_FTRACE_SYSCALLS is not set
1027# CONFIG_BOOT_TRACER is not set 1062# CONFIG_BOOT_TRACER is not set
1028CONFIG_BRANCH_PROFILE_NONE=y 1063CONFIG_BRANCH_PROFILE_NONE=y
1029# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set 1064# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
@@ -1036,16 +1071,15 @@ CONFIG_BRANCH_PROFILE_NONE=y
1036# CONFIG_SAMPLES is not set 1071# CONFIG_SAMPLES is not set
1037CONFIG_HAVE_ARCH_KGDB=y 1072CONFIG_HAVE_ARCH_KGDB=y
1038# CONFIG_KGDB is not set 1073# CONFIG_KGDB is not set
1039# CONFIG_KMEMCHECK is not set
1040# CONFIG_SH_STANDARD_BIOS is not set 1074# CONFIG_SH_STANDARD_BIOS is not set
1041CONFIG_EARLY_SCIF_CONSOLE=y 1075CONFIG_EARLY_SCIF_CONSOLE=y
1042CONFIG_EARLY_SCIF_CONSOLE_PORT=0xa4430000 1076CONFIG_EARLY_SCIF_CONSOLE_PORT=0xa4430000
1043CONFIG_EARLY_PRINTK=y 1077CONFIG_EARLY_PRINTK=y
1044# CONFIG_DEBUG_BOOTMEM is not set 1078# CONFIG_STACK_DEBUG is not set
1045# CONFIG_DEBUG_STACKOVERFLOW is not set
1046# CONFIG_DEBUG_STACK_USAGE is not set 1079# CONFIG_DEBUG_STACK_USAGE is not set
1047# CONFIG_4KSTACKS is not set 1080# CONFIG_4KSTACKS is not set
1048CONFIG_DUMP_CODE=y 1081CONFIG_DUMP_CODE=y
1082# CONFIG_DWARF_UNWINDER is not set
1049# CONFIG_SH_NO_BSS_INIT is not set 1083# CONFIG_SH_NO_BSS_INIT is not set
1050 1084
1051# 1085#
@@ -1077,5 +1111,6 @@ CONFIG_DECOMPRESS_GZIP=y
1077CONFIG_HAS_IOMEM=y 1111CONFIG_HAS_IOMEM=y
1078CONFIG_HAS_IOPORT=y 1112CONFIG_HAS_IOPORT=y
1079CONFIG_HAS_DMA=y 1113CONFIG_HAS_DMA=y
1114CONFIG_HAVE_LMB=y
1080CONFIG_NLATTR=y 1115CONFIG_NLATTR=y
1081CONFIG_GENERIC_ATOMIC64=y 1116CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/microdev_defconfig b/arch/sh/configs/microdev_defconfig
index e5a21e1d625c..6bb5976aff2a 100644
--- a/arch/sh/configs/microdev_defconfig
+++ b/arch/sh/configs/microdev_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.30 3# Linux kernel version: 2.6.31
4# Thu Jun 18 12:31:56 2009 4# Thu Sep 24 18:14:35 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -14,6 +14,7 @@ CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y 14CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
16CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_IRQ_PER_CPU=y
17# CONFIG_GENERIC_GPIO is not set 18# CONFIG_GENERIC_GPIO is not set
18CONFIG_GENERIC_TIME=y 19CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 20CONFIG_GENERIC_CLOCKEVENTS=y
@@ -27,7 +28,9 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
27# CONFIG_ARCH_HAS_ILOG2_U64 is not set 28# CONFIG_ARCH_HAS_ILOG2_U64 is not set
28CONFIG_ARCH_NO_VIRT_TO_BUS=y 29CONFIG_ARCH_NO_VIRT_TO_BUS=y
29CONFIG_ARCH_HAS_DEFAULT_IDLE=y 30CONFIG_ARCH_HAS_DEFAULT_IDLE=y
31CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
30CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 32CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
33CONFIG_CONSTRUCTORS=y
31 34
32# 35#
33# General setup 36# General setup
@@ -38,6 +41,12 @@ CONFIG_LOCK_KERNEL=y
38CONFIG_INIT_ENV_ARG_LIMIT=32 41CONFIG_INIT_ENV_ARG_LIMIT=32
39CONFIG_LOCALVERSION="" 42CONFIG_LOCALVERSION=""
40CONFIG_LOCALVERSION_AUTO=y 43CONFIG_LOCALVERSION_AUTO=y
44CONFIG_HAVE_KERNEL_GZIP=y
45CONFIG_HAVE_KERNEL_BZIP2=y
46CONFIG_HAVE_KERNEL_LZMA=y
47CONFIG_KERNEL_GZIP=y
48# CONFIG_KERNEL_BZIP2 is not set
49# CONFIG_KERNEL_LZMA is not set
41CONFIG_SWAP=y 50CONFIG_SWAP=y
42# CONFIG_SYSVIPC is not set 51# CONFIG_SYSVIPC is not set
43# CONFIG_POSIX_MQUEUE is not set 52# CONFIG_POSIX_MQUEUE is not set
@@ -49,11 +58,12 @@ CONFIG_BSD_PROCESS_ACCT=y
49# 58#
50# RCU Subsystem 59# RCU Subsystem
51# 60#
52CONFIG_CLASSIC_RCU=y 61CONFIG_TREE_RCU=y
53# CONFIG_TREE_RCU is not set 62# CONFIG_TREE_PREEMPT_RCU is not set
54# CONFIG_PREEMPT_RCU is not set 63# CONFIG_RCU_TRACE is not set
64CONFIG_RCU_FANOUT=32
65# CONFIG_RCU_FANOUT_EXACT is not set
55# CONFIG_TREE_RCU_TRACE is not set 66# CONFIG_TREE_RCU_TRACE is not set
56# CONFIG_PREEMPT_RCU_TRACE is not set
57# CONFIG_IKCONFIG is not set 67# CONFIG_IKCONFIG is not set
58CONFIG_LOG_BUF_SHIFT=14 68CONFIG_LOG_BUF_SHIFT=14
59# CONFIG_GROUP_SCHED is not set 69# CONFIG_GROUP_SCHED is not set
@@ -87,18 +97,19 @@ CONFIG_TIMERFD=y
87CONFIG_EVENTFD=y 97CONFIG_EVENTFD=y
88CONFIG_SHMEM=y 98CONFIG_SHMEM=y
89CONFIG_AIO=y 99CONFIG_AIO=y
100CONFIG_HAVE_PERF_EVENTS=y
90 101
91# 102#
92# Performance Counters 103# Kernel Performance Events And Counters
93# 104#
105# CONFIG_PERF_EVENTS is not set
106# CONFIG_PERF_COUNTERS is not set
94CONFIG_VM_EVENT_COUNTERS=y 107CONFIG_VM_EVENT_COUNTERS=y
95# CONFIG_STRIP_ASM_SYMS is not set
96CONFIG_COMPAT_BRK=y 108CONFIG_COMPAT_BRK=y
97CONFIG_SLAB=y 109CONFIG_SLAB=y
98# CONFIG_SLUB is not set 110# CONFIG_SLUB is not set
99# CONFIG_SLOB is not set 111# CONFIG_SLOB is not set
100# CONFIG_PROFILING is not set 112# CONFIG_PROFILING is not set
101# CONFIG_MARKERS is not set
102CONFIG_HAVE_OPROFILE=y 113CONFIG_HAVE_OPROFILE=y
103CONFIG_HAVE_IOREMAP_PROT=y 114CONFIG_HAVE_IOREMAP_PROT=y
104CONFIG_HAVE_KPROBES=y 115CONFIG_HAVE_KPROBES=y
@@ -106,6 +117,10 @@ CONFIG_HAVE_KRETPROBES=y
106CONFIG_HAVE_ARCH_TRACEHOOK=y 117CONFIG_HAVE_ARCH_TRACEHOOK=y
107CONFIG_HAVE_CLK=y 118CONFIG_HAVE_CLK=y
108CONFIG_HAVE_DMA_API_DEBUG=y 119CONFIG_HAVE_DMA_API_DEBUG=y
120
121#
122# GCOV-based kernel profiling
123#
109# CONFIG_SLOW_WORK is not set 124# CONFIG_SLOW_WORK is not set
110CONFIG_HAVE_GENERIC_DMA_COHERENT=y 125CONFIG_HAVE_GENERIC_DMA_COHERENT=y
111CONFIG_SLABINFO=y 126CONFIG_SLABINFO=y
@@ -113,7 +128,7 @@ CONFIG_RT_MUTEXES=y
113CONFIG_BASE_SMALL=0 128CONFIG_BASE_SMALL=0
114# CONFIG_MODULES is not set 129# CONFIG_MODULES is not set
115CONFIG_BLOCK=y 130CONFIG_BLOCK=y
116# CONFIG_LBD is not set 131CONFIG_LBDAF=y
117# CONFIG_BLK_DEV_BSG is not set 132# CONFIG_BLK_DEV_BSG is not set
118# CONFIG_BLK_DEV_INTEGRITY is not set 133# CONFIG_BLK_DEV_INTEGRITY is not set
119 134
@@ -160,6 +175,7 @@ CONFIG_CPU_SH4=y
160CONFIG_CPU_SUBTYPE_SH4_202=y 175CONFIG_CPU_SUBTYPE_SH4_202=y
161# CONFIG_CPU_SUBTYPE_SH7723 is not set 176# CONFIG_CPU_SUBTYPE_SH7723 is not set
162# CONFIG_CPU_SUBTYPE_SH7724 is not set 177# CONFIG_CPU_SUBTYPE_SH7724 is not set
178# CONFIG_CPU_SUBTYPE_SH7757 is not set
163# CONFIG_CPU_SUBTYPE_SH7763 is not set 179# CONFIG_CPU_SUBTYPE_SH7763 is not set
164# CONFIG_CPU_SUBTYPE_SH7770 is not set 180# CONFIG_CPU_SUBTYPE_SH7770 is not set
165# CONFIG_CPU_SUBTYPE_SH7780 is not set 181# CONFIG_CPU_SUBTYPE_SH7780 is not set
@@ -211,6 +227,7 @@ CONFIG_ZONE_DMA_FLAG=0
211CONFIG_NR_QUICK=2 227CONFIG_NR_QUICK=2
212CONFIG_HAVE_MLOCK=y 228CONFIG_HAVE_MLOCK=y
213CONFIG_HAVE_MLOCKED_PAGE_BIT=y 229CONFIG_HAVE_MLOCKED_PAGE_BIT=y
230# CONFIG_KSM is not set
214CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 231CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
215 232
216# 233#
@@ -296,7 +313,8 @@ CONFIG_ZERO_PAGE_OFFSET=0x00001000
296CONFIG_BOOT_LINK_OFFSET=0x00800000 313CONFIG_BOOT_LINK_OFFSET=0x00800000
297CONFIG_ENTRY_OFFSET=0x00001000 314CONFIG_ENTRY_OFFSET=0x00001000
298# CONFIG_UBC_WAKEUP is not set 315# CONFIG_UBC_WAKEUP is not set
299CONFIG_CMDLINE_BOOL=y 316CONFIG_CMDLINE_OVERWRITE=y
317# CONFIG_CMDLINE_EXTEND is not set
300CONFIG_CMDLINE="console=ttySC0,115200 root=/dev/hda1" 318CONFIG_CMDLINE="console=ttySC0,115200 root=/dev/hda1"
301 319
302# 320#
@@ -364,6 +382,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
364# CONFIG_NETFILTER is not set 382# CONFIG_NETFILTER is not set
365# CONFIG_IP_DCCP is not set 383# CONFIG_IP_DCCP is not set
366# CONFIG_IP_SCTP is not set 384# CONFIG_IP_SCTP is not set
385# CONFIG_RDS is not set
367# CONFIG_TIPC is not set 386# CONFIG_TIPC is not set
368# CONFIG_ATM is not set 387# CONFIG_ATM is not set
369# CONFIG_BRIDGE is not set 388# CONFIG_BRIDGE is not set
@@ -393,6 +412,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
393# CONFIG_AF_RXRPC is not set 412# CONFIG_AF_RXRPC is not set
394CONFIG_WIRELESS=y 413CONFIG_WIRELESS=y
395# CONFIG_CFG80211 is not set 414# CONFIG_CFG80211 is not set
415CONFIG_CFG80211_DEFAULT_PS_VALUE=0
396# CONFIG_WIRELESS_OLD_REGULATORY is not set 416# CONFIG_WIRELESS_OLD_REGULATORY is not set
397# CONFIG_WIRELESS_EXT is not set 417# CONFIG_WIRELESS_EXT is not set
398# CONFIG_LIB80211 is not set 418# CONFIG_LIB80211 is not set
@@ -400,7 +420,6 @@ CONFIG_WIRELESS=y
400# 420#
401# CFG80211 needs to be enabled for MAC80211 421# CFG80211 needs to be enabled for MAC80211
402# 422#
403CONFIG_MAC80211_DEFAULT_PS_VALUE=0
404# CONFIG_WIMAX is not set 423# CONFIG_WIMAX is not set
405# CONFIG_RFKILL is not set 424# CONFIG_RFKILL is not set
406# CONFIG_NET_9P is not set 425# CONFIG_NET_9P is not set
@@ -413,6 +432,7 @@ CONFIG_MAC80211_DEFAULT_PS_VALUE=0
413# Generic Driver Options 432# Generic Driver Options
414# 433#
415CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 434CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
435# CONFIG_DEVTMPFS is not set
416CONFIG_STANDALONE=y 436CONFIG_STANDALONE=y
417CONFIG_PREVENT_FIRMWARE_BUILD=y 437CONFIG_PREVENT_FIRMWARE_BUILD=y
418# CONFIG_FW_LOADER is not set 438# CONFIG_FW_LOADER is not set
@@ -499,10 +519,7 @@ CONFIG_SMC91X=y
499# CONFIG_KS8842 is not set 519# CONFIG_KS8842 is not set
500CONFIG_NETDEV_1000=y 520CONFIG_NETDEV_1000=y
501CONFIG_NETDEV_10000=y 521CONFIG_NETDEV_10000=y
502 522CONFIG_WLAN=y
503#
504# Wireless LAN
505#
506# CONFIG_WLAN_PRE80211 is not set 523# CONFIG_WLAN_PRE80211 is not set
507# CONFIG_WLAN_80211 is not set 524# CONFIG_WLAN_80211 is not set
508 525
@@ -561,10 +578,20 @@ CONFIG_HW_RANDOM=y
561# CONFIG_TCG_TPM is not set 578# CONFIG_TCG_TPM is not set
562# CONFIG_I2C is not set 579# CONFIG_I2C is not set
563# CONFIG_SPI is not set 580# CONFIG_SPI is not set
581
582#
583# PPS support
584#
585# CONFIG_PPS is not set
564# CONFIG_W1 is not set 586# CONFIG_W1 is not set
565# CONFIG_POWER_SUPPLY is not set 587# CONFIG_POWER_SUPPLY is not set
566CONFIG_HWMON=y 588CONFIG_HWMON=y
567# CONFIG_HWMON_VID is not set 589# CONFIG_HWMON_VID is not set
590# CONFIG_HWMON_DEBUG_CHIP is not set
591
592#
593# Native drivers
594#
568# CONFIG_SENSORS_F71805F is not set 595# CONFIG_SENSORS_F71805F is not set
569# CONFIG_SENSORS_F71882FG is not set 596# CONFIG_SENSORS_F71882FG is not set
570# CONFIG_SENSORS_IT87 is not set 597# CONFIG_SENSORS_IT87 is not set
@@ -575,9 +602,7 @@ CONFIG_HWMON=y
575# CONFIG_SENSORS_VT1211 is not set 602# CONFIG_SENSORS_VT1211 is not set
576# CONFIG_SENSORS_W83627HF is not set 603# CONFIG_SENSORS_W83627HF is not set
577# CONFIG_SENSORS_W83627EHF is not set 604# CONFIG_SENSORS_W83627EHF is not set
578# CONFIG_HWMON_DEBUG_CHIP is not set
579# CONFIG_THERMAL is not set 605# CONFIG_THERMAL is not set
580# CONFIG_THERMAL_HWMON is not set
581# CONFIG_WATCHDOG is not set 606# CONFIG_WATCHDOG is not set
582CONFIG_SSB_POSSIBLE=y 607CONFIG_SSB_POSSIBLE=y
583 608
@@ -662,8 +687,10 @@ CONFIG_FS_MBCACHE=y
662# CONFIG_JFS_FS is not set 687# CONFIG_JFS_FS is not set
663# CONFIG_FS_POSIX_ACL is not set 688# CONFIG_FS_POSIX_ACL is not set
664# CONFIG_XFS_FS is not set 689# CONFIG_XFS_FS is not set
690# CONFIG_GFS2_FS is not set
665# CONFIG_OCFS2_FS is not set 691# CONFIG_OCFS2_FS is not set
666# CONFIG_BTRFS_FS is not set 692# CONFIG_BTRFS_FS is not set
693# CONFIG_NILFS2_FS is not set
667CONFIG_FILE_LOCKING=y 694CONFIG_FILE_LOCKING=y
668CONFIG_FSNOTIFY=y 695CONFIG_FSNOTIFY=y
669CONFIG_DNOTIFY=y 696CONFIG_DNOTIFY=y
@@ -726,12 +753,12 @@ CONFIG_MISC_FILESYSTEMS=y
726# CONFIG_ROMFS_FS is not set 753# CONFIG_ROMFS_FS is not set
727# CONFIG_SYSV_FS is not set 754# CONFIG_SYSV_FS is not set
728# CONFIG_UFS_FS is not set 755# CONFIG_UFS_FS is not set
729# CONFIG_NILFS2_FS is not set
730CONFIG_NETWORK_FILESYSTEMS=y 756CONFIG_NETWORK_FILESYSTEMS=y
731CONFIG_NFS_FS=y 757CONFIG_NFS_FS=y
732CONFIG_NFS_V3=y 758CONFIG_NFS_V3=y
733# CONFIG_NFS_V3_ACL is not set 759# CONFIG_NFS_V3_ACL is not set
734CONFIG_NFS_V4=y 760CONFIG_NFS_V4=y
761# CONFIG_NFS_V4_1 is not set
735CONFIG_ROOT_NFS=y 762CONFIG_ROOT_NFS=y
736# CONFIG_NFSD is not set 763# CONFIG_NFSD is not set
737CONFIG_LOCKD=y 764CONFIG_LOCKD=y
@@ -803,6 +830,7 @@ CONFIG_ENABLE_WARN_DEPRECATED=y
803CONFIG_ENABLE_MUST_CHECK=y 830CONFIG_ENABLE_MUST_CHECK=y
804CONFIG_FRAME_WARN=1024 831CONFIG_FRAME_WARN=1024
805# CONFIG_MAGIC_SYSRQ is not set 832# CONFIG_MAGIC_SYSRQ is not set
833# CONFIG_STRIP_ASM_SYMS is not set
806# CONFIG_UNUSED_SYMBOLS is not set 834# CONFIG_UNUSED_SYMBOLS is not set
807# CONFIG_DEBUG_FS is not set 835# CONFIG_DEBUG_FS is not set
808# CONFIG_HEADERS_CHECK is not set 836# CONFIG_HEADERS_CHECK is not set
@@ -812,8 +840,11 @@ CONFIG_FRAME_WARN=1024
812# CONFIG_RCU_CPU_STALL_DETECTOR is not set 840# CONFIG_RCU_CPU_STALL_DETECTOR is not set
813# CONFIG_LATENCYTOP is not set 841# CONFIG_LATENCYTOP is not set
814CONFIG_HAVE_FUNCTION_TRACER=y 842CONFIG_HAVE_FUNCTION_TRACER=y
843CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
844CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
815CONFIG_HAVE_DYNAMIC_FTRACE=y 845CONFIG_HAVE_DYNAMIC_FTRACE=y
816CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 846CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
847CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
817CONFIG_TRACING_SUPPORT=y 848CONFIG_TRACING_SUPPORT=y
818# CONFIG_FTRACE is not set 849# CONFIG_FTRACE is not set
819# CONFIG_DMA_API_DEBUG is not set 850# CONFIG_DMA_API_DEBUG is not set
@@ -821,6 +852,7 @@ CONFIG_TRACING_SUPPORT=y
821CONFIG_HAVE_ARCH_KGDB=y 852CONFIG_HAVE_ARCH_KGDB=y
822# CONFIG_SH_STANDARD_BIOS is not set 853# CONFIG_SH_STANDARD_BIOS is not set
823# CONFIG_EARLY_SCIF_CONSOLE is not set 854# CONFIG_EARLY_SCIF_CONSOLE is not set
855# CONFIG_DWARF_UNWINDER is not set
824 856
825# 857#
826# Security options 858# Security options
@@ -834,7 +866,6 @@ CONFIG_CRYPTO=y
834# 866#
835# Crypto core or helper 867# Crypto core or helper
836# 868#
837# CONFIG_CRYPTO_FIPS is not set
838CONFIG_CRYPTO_ALGAPI=y 869CONFIG_CRYPTO_ALGAPI=y
839CONFIG_CRYPTO_ALGAPI2=y 870CONFIG_CRYPTO_ALGAPI2=y
840CONFIG_CRYPTO_AEAD2=y 871CONFIG_CRYPTO_AEAD2=y
@@ -875,11 +906,13 @@ CONFIG_CRYPTO_ECB=y
875# 906#
876# CONFIG_CRYPTO_HMAC is not set 907# CONFIG_CRYPTO_HMAC is not set
877# CONFIG_CRYPTO_XCBC is not set 908# CONFIG_CRYPTO_XCBC is not set
909# CONFIG_CRYPTO_VMAC is not set
878 910
879# 911#
880# Digest 912# Digest
881# 913#
882# CONFIG_CRYPTO_CRC32C is not set 914# CONFIG_CRYPTO_CRC32C is not set
915# CONFIG_CRYPTO_GHASH is not set
883# CONFIG_CRYPTO_MD4 is not set 916# CONFIG_CRYPTO_MD4 is not set
884CONFIG_CRYPTO_MD5=y 917CONFIG_CRYPTO_MD5=y
885# CONFIG_CRYPTO_MICHAEL_MIC is not set 918# CONFIG_CRYPTO_MICHAEL_MIC is not set
@@ -943,5 +976,6 @@ CONFIG_DECOMPRESS_GZIP=y
943CONFIG_HAS_IOMEM=y 976CONFIG_HAS_IOMEM=y
944CONFIG_HAS_IOPORT=y 977CONFIG_HAS_IOPORT=y
945CONFIG_HAS_DMA=y 978CONFIG_HAS_DMA=y
979CONFIG_HAVE_LMB=y
946CONFIG_NLATTR=y 980CONFIG_NLATTR=y
947CONFIG_GENERIC_ATOMIC64=y 981CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/migor_defconfig b/arch/sh/configs/migor_defconfig
index b18cfd39cac6..65018283c3a8 100644
--- a/arch/sh/configs/migor_defconfig
+++ b/arch/sh/configs/migor_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.30 3# Linux kernel version: 2.6.31
4# Thu Jun 18 16:06:48 2009 4# Thu Sep 24 18:17:41 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -14,6 +14,7 @@ CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y 14CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
16CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_IRQ_PER_CPU=y
17CONFIG_GENERIC_GPIO=y 18CONFIG_GENERIC_GPIO=y
18CONFIG_GENERIC_TIME=y 19CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 20CONFIG_GENERIC_CLOCKEVENTS=y
@@ -29,7 +30,9 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
29# CONFIG_ARCH_HAS_ILOG2_U64 is not set 30# CONFIG_ARCH_HAS_ILOG2_U64 is not set
30CONFIG_ARCH_NO_VIRT_TO_BUS=y 31CONFIG_ARCH_NO_VIRT_TO_BUS=y
31CONFIG_ARCH_HAS_DEFAULT_IDLE=y 32CONFIG_ARCH_HAS_DEFAULT_IDLE=y
33CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
32CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 34CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
35CONFIG_CONSTRUCTORS=y
33 36
34# 37#
35# General setup 38# General setup
@@ -39,6 +42,12 @@ CONFIG_BROKEN_ON_SMP=y
39CONFIG_INIT_ENV_ARG_LIMIT=32 42CONFIG_INIT_ENV_ARG_LIMIT=32
40CONFIG_LOCALVERSION="" 43CONFIG_LOCALVERSION=""
41CONFIG_LOCALVERSION_AUTO=y 44CONFIG_LOCALVERSION_AUTO=y
45CONFIG_HAVE_KERNEL_GZIP=y
46CONFIG_HAVE_KERNEL_BZIP2=y
47CONFIG_HAVE_KERNEL_LZMA=y
48CONFIG_KERNEL_GZIP=y
49# CONFIG_KERNEL_BZIP2 is not set
50# CONFIG_KERNEL_LZMA is not set
42CONFIG_SWAP=y 51CONFIG_SWAP=y
43CONFIG_SYSVIPC=y 52CONFIG_SYSVIPC=y
44CONFIG_SYSVIPC_SYSCTL=y 53CONFIG_SYSVIPC_SYSCTL=y
@@ -50,11 +59,12 @@ CONFIG_SYSVIPC_SYSCTL=y
50# 59#
51# RCU Subsystem 60# RCU Subsystem
52# 61#
53CONFIG_CLASSIC_RCU=y 62CONFIG_TREE_RCU=y
54# CONFIG_TREE_RCU is not set 63# CONFIG_TREE_PREEMPT_RCU is not set
55# CONFIG_PREEMPT_RCU is not set 64# CONFIG_RCU_TRACE is not set
65CONFIG_RCU_FANOUT=32
66# CONFIG_RCU_FANOUT_EXACT is not set
56# CONFIG_TREE_RCU_TRACE is not set 67# CONFIG_TREE_RCU_TRACE is not set
57# CONFIG_PREEMPT_RCU_TRACE is not set
58CONFIG_IKCONFIG=y 68CONFIG_IKCONFIG=y
59CONFIG_IKCONFIG_PROC=y 69CONFIG_IKCONFIG_PROC=y
60CONFIG_LOG_BUF_SHIFT=14 70CONFIG_LOG_BUF_SHIFT=14
@@ -89,19 +99,21 @@ CONFIG_TIMERFD=y
89CONFIG_EVENTFD=y 99CONFIG_EVENTFD=y
90CONFIG_SHMEM=y 100CONFIG_SHMEM=y
91CONFIG_AIO=y 101CONFIG_AIO=y
102CONFIG_HAVE_PERF_EVENTS=y
92 103
93# 104#
94# Performance Counters 105# Kernel Performance Events And Counters
95# 106#
107CONFIG_PERF_EVENTS=y
108CONFIG_EVENT_PROFILE=y
109# CONFIG_PERF_COUNTERS is not set
96CONFIG_VM_EVENT_COUNTERS=y 110CONFIG_VM_EVENT_COUNTERS=y
97# CONFIG_STRIP_ASM_SYMS is not set
98CONFIG_COMPAT_BRK=y 111CONFIG_COMPAT_BRK=y
99CONFIG_SLAB=y 112CONFIG_SLAB=y
100# CONFIG_SLUB is not set 113# CONFIG_SLUB is not set
101# CONFIG_SLOB is not set 114# CONFIG_SLOB is not set
102CONFIG_PROFILING=y 115CONFIG_PROFILING=y
103CONFIG_TRACEPOINTS=y 116CONFIG_TRACEPOINTS=y
104CONFIG_MARKERS=y
105CONFIG_OPROFILE=y 117CONFIG_OPROFILE=y
106CONFIG_HAVE_OPROFILE=y 118CONFIG_HAVE_OPROFILE=y
107# CONFIG_KPROBES is not set 119# CONFIG_KPROBES is not set
@@ -111,6 +123,11 @@ CONFIG_HAVE_KRETPROBES=y
111CONFIG_HAVE_ARCH_TRACEHOOK=y 123CONFIG_HAVE_ARCH_TRACEHOOK=y
112CONFIG_HAVE_CLK=y 124CONFIG_HAVE_CLK=y
113CONFIG_HAVE_DMA_API_DEBUG=y 125CONFIG_HAVE_DMA_API_DEBUG=y
126
127#
128# GCOV-based kernel profiling
129#
130# CONFIG_GCOV_KERNEL is not set
114# CONFIG_SLOW_WORK is not set 131# CONFIG_SLOW_WORK is not set
115CONFIG_HAVE_GENERIC_DMA_COHERENT=y 132CONFIG_HAVE_GENERIC_DMA_COHERENT=y
116CONFIG_SLABINFO=y 133CONFIG_SLABINFO=y
@@ -122,7 +139,7 @@ CONFIG_MODULES=y
122# CONFIG_MODVERSIONS is not set 139# CONFIG_MODVERSIONS is not set
123# CONFIG_MODULE_SRCVERSION_ALL is not set 140# CONFIG_MODULE_SRCVERSION_ALL is not set
124CONFIG_BLOCK=y 141CONFIG_BLOCK=y
125# CONFIG_LBD is not set 142CONFIG_LBDAF=y
126# CONFIG_BLK_DEV_BSG is not set 143# CONFIG_BLK_DEV_BSG is not set
127# CONFIG_BLK_DEV_INTEGRITY is not set 144# CONFIG_BLK_DEV_INTEGRITY is not set
128 145
@@ -138,7 +155,7 @@ CONFIG_DEFAULT_AS=y
138# CONFIG_DEFAULT_CFQ is not set 155# CONFIG_DEFAULT_CFQ is not set
139# CONFIG_DEFAULT_NOOP is not set 156# CONFIG_DEFAULT_NOOP is not set
140CONFIG_DEFAULT_IOSCHED="anticipatory" 157CONFIG_DEFAULT_IOSCHED="anticipatory"
141# CONFIG_FREEZER is not set 158CONFIG_FREEZER=y
142 159
143# 160#
144# System type 161# System type
@@ -173,6 +190,7 @@ CONFIG_ARCH_SHMOBILE=y
173# CONFIG_CPU_SUBTYPE_SH4_202 is not set 190# CONFIG_CPU_SUBTYPE_SH4_202 is not set
174# CONFIG_CPU_SUBTYPE_SH7723 is not set 191# CONFIG_CPU_SUBTYPE_SH7723 is not set
175# CONFIG_CPU_SUBTYPE_SH7724 is not set 192# CONFIG_CPU_SUBTYPE_SH7724 is not set
193# CONFIG_CPU_SUBTYPE_SH7757 is not set
176# CONFIG_CPU_SUBTYPE_SH7763 is not set 194# CONFIG_CPU_SUBTYPE_SH7763 is not set
177# CONFIG_CPU_SUBTYPE_SH7770 is not set 195# CONFIG_CPU_SUBTYPE_SH7770 is not set
178# CONFIG_CPU_SUBTYPE_SH7780 is not set 196# CONFIG_CPU_SUBTYPE_SH7780 is not set
@@ -224,6 +242,7 @@ CONFIG_ZONE_DMA_FLAG=0
224CONFIG_NR_QUICK=2 242CONFIG_NR_QUICK=2
225CONFIG_HAVE_MLOCK=y 243CONFIG_HAVE_MLOCK=y
226CONFIG_HAVE_MLOCKED_PAGE_BIT=y 244CONFIG_HAVE_MLOCKED_PAGE_BIT=y
245# CONFIG_KSM is not set
227CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 246CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
228 247
229# 248#
@@ -308,7 +327,8 @@ CONFIG_GUSA=y
308CONFIG_ZERO_PAGE_OFFSET=0x00001000 327CONFIG_ZERO_PAGE_OFFSET=0x00001000
309CONFIG_BOOT_LINK_OFFSET=0x00800000 328CONFIG_BOOT_LINK_OFFSET=0x00800000
310CONFIG_ENTRY_OFFSET=0x00001000 329CONFIG_ENTRY_OFFSET=0x00001000
311CONFIG_CMDLINE_BOOL=y 330CONFIG_CMDLINE_OVERWRITE=y
331# CONFIG_CMDLINE_EXTEND is not set
312CONFIG_CMDLINE="console=tty0 console=ttySC0,115200 earlyprintk=serial ip=on root=/dev/nfs ip=dhcp" 332CONFIG_CMDLINE="console=tty0 console=ttySC0,115200 earlyprintk=serial ip=on root=/dev/nfs ip=dhcp"
313 333
314# 334#
@@ -328,7 +348,13 @@ CONFIG_BINFMT_ELF=y
328# 348#
329# Power management options (EXPERIMENTAL) 349# Power management options (EXPERIMENTAL)
330# 350#
331# CONFIG_PM is not set 351CONFIG_PM=y
352# CONFIG_PM_DEBUG is not set
353CONFIG_PM_SLEEP=y
354CONFIG_SUSPEND=y
355CONFIG_SUSPEND_FREEZER=y
356# CONFIG_HIBERNATION is not set
357CONFIG_PM_RUNTIME=y
332# CONFIG_CPU_IDLE is not set 358# CONFIG_CPU_IDLE is not set
333CONFIG_NET=y 359CONFIG_NET=y
334 360
@@ -376,6 +402,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
376# CONFIG_NETFILTER is not set 402# CONFIG_NETFILTER is not set
377# CONFIG_IP_DCCP is not set 403# CONFIG_IP_DCCP is not set
378# CONFIG_IP_SCTP is not set 404# CONFIG_IP_SCTP is not set
405# CONFIG_RDS is not set
379# CONFIG_TIPC is not set 406# CONFIG_TIPC is not set
380# CONFIG_ATM is not set 407# CONFIG_ATM is not set
381# CONFIG_BRIDGE is not set 408# CONFIG_BRIDGE is not set
@@ -406,6 +433,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
406# CONFIG_AF_RXRPC is not set 433# CONFIG_AF_RXRPC is not set
407CONFIG_WIRELESS=y 434CONFIG_WIRELESS=y
408# CONFIG_CFG80211 is not set 435# CONFIG_CFG80211 is not set
436CONFIG_CFG80211_DEFAULT_PS_VALUE=0
409# CONFIG_WIRELESS_OLD_REGULATORY is not set 437# CONFIG_WIRELESS_OLD_REGULATORY is not set
410CONFIG_WIRELESS_EXT=y 438CONFIG_WIRELESS_EXT=y
411CONFIG_WIRELESS_EXT_SYSFS=y 439CONFIG_WIRELESS_EXT_SYSFS=y
@@ -414,7 +442,6 @@ CONFIG_WIRELESS_EXT_SYSFS=y
414# 442#
415# CFG80211 needs to be enabled for MAC80211 443# CFG80211 needs to be enabled for MAC80211
416# 444#
417CONFIG_MAC80211_DEFAULT_PS_VALUE=0
418# CONFIG_WIMAX is not set 445# CONFIG_WIMAX is not set
419# CONFIG_RFKILL is not set 446# CONFIG_RFKILL is not set
420# CONFIG_NET_9P is not set 447# CONFIG_NET_9P is not set
@@ -427,6 +454,7 @@ CONFIG_MAC80211_DEFAULT_PS_VALUE=0
427# Generic Driver Options 454# Generic Driver Options
428# 455#
429CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 456CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
457# CONFIG_DEVTMPFS is not set
430CONFIG_STANDALONE=y 458CONFIG_STANDALONE=y
431CONFIG_PREVENT_FIRMWARE_BUILD=y 459CONFIG_PREVENT_FIRMWARE_BUILD=y
432CONFIG_FW_LOADER=m 460CONFIG_FW_LOADER=m
@@ -436,9 +464,9 @@ CONFIG_EXTRA_FIRMWARE=""
436# CONFIG_CONNECTOR is not set 464# CONFIG_CONNECTOR is not set
437CONFIG_MTD=y 465CONFIG_MTD=y
438# CONFIG_MTD_DEBUG is not set 466# CONFIG_MTD_DEBUG is not set
467# CONFIG_MTD_TESTS is not set
439CONFIG_MTD_CONCAT=y 468CONFIG_MTD_CONCAT=y
440CONFIG_MTD_PARTITIONS=y 469CONFIG_MTD_PARTITIONS=y
441# CONFIG_MTD_TESTS is not set
442# CONFIG_MTD_REDBOOT_PARTS is not set 470# CONFIG_MTD_REDBOOT_PARTS is not set
443CONFIG_MTD_CMDLINE_PARTS=y 471CONFIG_MTD_CMDLINE_PARTS=y
444# CONFIG_MTD_AR7_PARTS is not set 472# CONFIG_MTD_AR7_PARTS is not set
@@ -585,7 +613,6 @@ CONFIG_SCSI_WAIT_SCAN=m
585# CONFIG_SCSI_SRP_ATTRS is not set 613# CONFIG_SCSI_SRP_ATTRS is not set
586CONFIG_SCSI_LOWLEVEL=y 614CONFIG_SCSI_LOWLEVEL=y
587# CONFIG_ISCSI_TCP is not set 615# CONFIG_ISCSI_TCP is not set
588# CONFIG_SCSI_BNX2_ISCSI is not set
589# CONFIG_LIBFC is not set 616# CONFIG_LIBFC is not set
590# CONFIG_LIBFCOE is not set 617# CONFIG_LIBFCOE is not set
591# CONFIG_SCSI_DEBUG is not set 618# CONFIG_SCSI_DEBUG is not set
@@ -621,10 +648,7 @@ CONFIG_SMC91X=y
621# CONFIG_KS8842 is not set 648# CONFIG_KS8842 is not set
622# CONFIG_NETDEV_1000 is not set 649# CONFIG_NETDEV_1000 is not set
623# CONFIG_NETDEV_10000 is not set 650# CONFIG_NETDEV_10000 is not set
624 651CONFIG_WLAN=y
625#
626# Wireless LAN
627#
628# CONFIG_WLAN_PRE80211 is not set 652# CONFIG_WLAN_PRE80211 is not set
629# CONFIG_WLAN_80211 is not set 653# CONFIG_WLAN_80211 is not set
630 654
@@ -659,14 +683,19 @@ CONFIG_INPUT_EVDEV=y
659# Input Device Drivers 683# Input Device Drivers
660# 684#
661CONFIG_INPUT_KEYBOARD=y 685CONFIG_INPUT_KEYBOARD=y
686# CONFIG_KEYBOARD_ADP5588 is not set
662# CONFIG_KEYBOARD_ATKBD is not set 687# CONFIG_KEYBOARD_ATKBD is not set
663# CONFIG_KEYBOARD_SUNKBD is not set 688# CONFIG_QT2160 is not set
664# CONFIG_KEYBOARD_LKKBD is not set 689# CONFIG_KEYBOARD_LKKBD is not set
665# CONFIG_KEYBOARD_XTKBD is not set 690# CONFIG_KEYBOARD_GPIO is not set
691# CONFIG_KEYBOARD_MATRIX is not set
692# CONFIG_KEYBOARD_MAX7359 is not set
666# CONFIG_KEYBOARD_NEWTON is not set 693# CONFIG_KEYBOARD_NEWTON is not set
694# CONFIG_KEYBOARD_OPENCORES is not set
667# CONFIG_KEYBOARD_STOWAWAY is not set 695# CONFIG_KEYBOARD_STOWAWAY is not set
668# CONFIG_KEYBOARD_GPIO is not set 696# CONFIG_KEYBOARD_SUNKBD is not set
669CONFIG_KEYBOARD_SH_KEYSC=y 697CONFIG_KEYBOARD_SH_KEYSC=y
698# CONFIG_KEYBOARD_XTKBD is not set
670# CONFIG_INPUT_MOUSE is not set 699# CONFIG_INPUT_MOUSE is not set
671# CONFIG_INPUT_JOYSTICK is not set 700# CONFIG_INPUT_JOYSTICK is not set
672# CONFIG_INPUT_TABLET is not set 701# CONFIG_INPUT_TABLET is not set
@@ -715,6 +744,7 @@ CONFIG_HW_RANDOM=y
715# CONFIG_TCG_TPM is not set 744# CONFIG_TCG_TPM is not set
716CONFIG_I2C=y 745CONFIG_I2C=y
717CONFIG_I2C_BOARDINFO=y 746CONFIG_I2C_BOARDINFO=y
747CONFIG_I2C_COMPAT=y
718# CONFIG_I2C_CHARDEV is not set 748# CONFIG_I2C_CHARDEV is not set
719CONFIG_I2C_HELPER_AUTO=y 749CONFIG_I2C_HELPER_AUTO=y
720 750
@@ -725,6 +755,7 @@ CONFIG_I2C_HELPER_AUTO=y
725# 755#
726# I2C system bus drivers (mostly embedded / system-on-chip) 756# I2C system bus drivers (mostly embedded / system-on-chip)
727# 757#
758# CONFIG_I2C_DESIGNWARE is not set
728# CONFIG_I2C_GPIO is not set 759# CONFIG_I2C_GPIO is not set
729# CONFIG_I2C_OCORES is not set 760# CONFIG_I2C_OCORES is not set
730CONFIG_I2C_SH_MOBILE=y 761CONFIG_I2C_SH_MOBILE=y
@@ -746,15 +777,17 @@ CONFIG_I2C_SH_MOBILE=y
746# Miscellaneous I2C Chip support 777# Miscellaneous I2C Chip support
747# 778#
748# CONFIG_DS1682 is not set 779# CONFIG_DS1682 is not set
749# CONFIG_SENSORS_PCF8574 is not set
750# CONFIG_PCF8575 is not set
751# CONFIG_SENSORS_PCA9539 is not set
752# CONFIG_SENSORS_TSL2550 is not set 780# CONFIG_SENSORS_TSL2550 is not set
753# CONFIG_I2C_DEBUG_CORE is not set 781# CONFIG_I2C_DEBUG_CORE is not set
754# CONFIG_I2C_DEBUG_ALGO is not set 782# CONFIG_I2C_DEBUG_ALGO is not set
755# CONFIG_I2C_DEBUG_BUS is not set 783# CONFIG_I2C_DEBUG_BUS is not set
756# CONFIG_I2C_DEBUG_CHIP is not set 784# CONFIG_I2C_DEBUG_CHIP is not set
757# CONFIG_SPI is not set 785# CONFIG_SPI is not set
786
787#
788# PPS support
789#
790# CONFIG_PPS is not set
758CONFIG_ARCH_REQUIRE_GPIOLIB=y 791CONFIG_ARCH_REQUIRE_GPIOLIB=y
759CONFIG_GPIOLIB=y 792CONFIG_GPIOLIB=y
760# CONFIG_GPIO_SYSFS is not set 793# CONFIG_GPIO_SYSFS is not set
@@ -777,11 +810,14 @@ CONFIG_GPIOLIB=y
777# 810#
778# SPI GPIO expanders: 811# SPI GPIO expanders:
779# 812#
813
814#
815# AC97 GPIO expanders:
816#
780# CONFIG_W1 is not set 817# CONFIG_W1 is not set
781# CONFIG_POWER_SUPPLY is not set 818# CONFIG_POWER_SUPPLY is not set
782# CONFIG_HWMON is not set 819# CONFIG_HWMON is not set
783# CONFIG_THERMAL is not set 820# CONFIG_THERMAL is not set
784# CONFIG_THERMAL_HWMON is not set
785# CONFIG_WATCHDOG is not set 821# CONFIG_WATCHDOG is not set
786CONFIG_SSB_POSSIBLE=y 822CONFIG_SSB_POSSIBLE=y
787 823
@@ -801,8 +837,10 @@ CONFIG_SSB_POSSIBLE=y
801# CONFIG_MFD_TMIO is not set 837# CONFIG_MFD_TMIO is not set
802# CONFIG_PMIC_DA903X is not set 838# CONFIG_PMIC_DA903X is not set
803# CONFIG_MFD_WM8400 is not set 839# CONFIG_MFD_WM8400 is not set
840# CONFIG_MFD_WM831X is not set
804# CONFIG_MFD_WM8350_I2C is not set 841# CONFIG_MFD_WM8350_I2C is not set
805# CONFIG_MFD_PCF50633 is not set 842# CONFIG_MFD_PCF50633 is not set
843# CONFIG_AB3100_CORE is not set
806# CONFIG_REGULATOR is not set 844# CONFIG_REGULATOR is not set
807CONFIG_MEDIA_SUPPORT=y 845CONFIG_MEDIA_SUPPORT=y
808 846
@@ -922,7 +960,6 @@ CONFIG_LOGO_SUPERH_VGA16=y
922# CONFIG_SOUND is not set 960# CONFIG_SOUND is not set
923CONFIG_HID_SUPPORT=y 961CONFIG_HID_SUPPORT=y
924CONFIG_HID=y 962CONFIG_HID=y
925# CONFIG_HID_DEBUG is not set
926# CONFIG_HIDRAW is not set 963# CONFIG_HIDRAW is not set
927# CONFIG_HID_PID is not set 964# CONFIG_HID_PID is not set
928 965
@@ -952,13 +989,13 @@ CONFIG_USB_GADGET_SELECTED=y
952# CONFIG_USB_GADGET_LH7A40X is not set 989# CONFIG_USB_GADGET_LH7A40X is not set
953# CONFIG_USB_GADGET_OMAP is not set 990# CONFIG_USB_GADGET_OMAP is not set
954# CONFIG_USB_GADGET_PXA25X is not set 991# CONFIG_USB_GADGET_PXA25X is not set
992# CONFIG_USB_GADGET_R8A66597 is not set
955# CONFIG_USB_GADGET_PXA27X is not set 993# CONFIG_USB_GADGET_PXA27X is not set
956# CONFIG_USB_GADGET_S3C_HSOTG is not set 994# CONFIG_USB_GADGET_S3C_HSOTG is not set
957# CONFIG_USB_GADGET_S3C2410 is not set
958# CONFIG_USB_GADGET_IMX is not set 995# CONFIG_USB_GADGET_IMX is not set
996# CONFIG_USB_GADGET_S3C2410 is not set
959CONFIG_USB_GADGET_M66592=y 997CONFIG_USB_GADGET_M66592=y
960CONFIG_USB_M66592=y 998CONFIG_USB_M66592=y
961CONFIG_SUPERH_BUILT_IN_M66592=y
962# CONFIG_USB_GADGET_AMD5536UDC is not set 999# CONFIG_USB_GADGET_AMD5536UDC is not set
963# CONFIG_USB_GADGET_FSL_QE is not set 1000# CONFIG_USB_GADGET_FSL_QE is not set
964# CONFIG_USB_GADGET_CI13XXX is not set 1001# CONFIG_USB_GADGET_CI13XXX is not set
@@ -1017,6 +1054,7 @@ CONFIG_RTC_DRV_RS5C372=y
1017# CONFIG_RTC_DRV_S35390A is not set 1054# CONFIG_RTC_DRV_S35390A is not set
1018# CONFIG_RTC_DRV_FM3130 is not set 1055# CONFIG_RTC_DRV_FM3130 is not set
1019# CONFIG_RTC_DRV_RX8581 is not set 1056# CONFIG_RTC_DRV_RX8581 is not set
1057# CONFIG_RTC_DRV_RX8025 is not set
1020 1058
1021# 1059#
1022# SPI RTC drivers 1060# SPI RTC drivers
@@ -1064,8 +1102,10 @@ CONFIG_UIO_PDRV_GENIRQ=y
1064# CONFIG_JFS_FS is not set 1102# CONFIG_JFS_FS is not set
1065# CONFIG_FS_POSIX_ACL is not set 1103# CONFIG_FS_POSIX_ACL is not set
1066# CONFIG_XFS_FS is not set 1104# CONFIG_XFS_FS is not set
1105# CONFIG_GFS2_FS is not set
1067# CONFIG_OCFS2_FS is not set 1106# CONFIG_OCFS2_FS is not set
1068# CONFIG_BTRFS_FS is not set 1107# CONFIG_BTRFS_FS is not set
1108# CONFIG_NILFS2_FS is not set
1069CONFIG_FILE_LOCKING=y 1109CONFIG_FILE_LOCKING=y
1070CONFIG_FSNOTIFY=y 1110CONFIG_FSNOTIFY=y
1071# CONFIG_DNOTIFY is not set 1111# CONFIG_DNOTIFY is not set
@@ -1126,7 +1166,6 @@ CONFIG_MISC_FILESYSTEMS=y
1126# CONFIG_ROMFS_FS is not set 1166# CONFIG_ROMFS_FS is not set
1127# CONFIG_SYSV_FS is not set 1167# CONFIG_SYSV_FS is not set
1128# CONFIG_UFS_FS is not set 1168# CONFIG_UFS_FS is not set
1129# CONFIG_NILFS2_FS is not set
1130CONFIG_NETWORK_FILESYSTEMS=y 1169CONFIG_NETWORK_FILESYSTEMS=y
1131CONFIG_NFS_FS=y 1170CONFIG_NFS_FS=y
1132# CONFIG_NFS_V3 is not set 1171# CONFIG_NFS_V3 is not set
@@ -1161,6 +1200,7 @@ CONFIG_ENABLE_WARN_DEPRECATED=y
1161CONFIG_ENABLE_MUST_CHECK=y 1200CONFIG_ENABLE_MUST_CHECK=y
1162CONFIG_FRAME_WARN=1024 1201CONFIG_FRAME_WARN=1024
1163# CONFIG_MAGIC_SYSRQ is not set 1202# CONFIG_MAGIC_SYSRQ is not set
1203# CONFIG_STRIP_ASM_SYMS is not set
1164# CONFIG_UNUSED_SYMBOLS is not set 1204# CONFIG_UNUSED_SYMBOLS is not set
1165CONFIG_DEBUG_FS=y 1205CONFIG_DEBUG_FS=y
1166# CONFIG_HEADERS_CHECK is not set 1206# CONFIG_HEADERS_CHECK is not set
@@ -1172,11 +1212,15 @@ CONFIG_STACKTRACE=y
1172# CONFIG_LATENCYTOP is not set 1212# CONFIG_LATENCYTOP is not set
1173CONFIG_NOP_TRACER=y 1213CONFIG_NOP_TRACER=y
1174CONFIG_HAVE_FUNCTION_TRACER=y 1214CONFIG_HAVE_FUNCTION_TRACER=y
1215CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1216CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
1175CONFIG_HAVE_DYNAMIC_FTRACE=y 1217CONFIG_HAVE_DYNAMIC_FTRACE=y
1176CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1218CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1219CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
1177CONFIG_RING_BUFFER=y 1220CONFIG_RING_BUFFER=y
1178CONFIG_EVENT_TRACING=y 1221CONFIG_EVENT_TRACING=y
1179CONFIG_CONTEXT_SWITCH_TRACER=y 1222CONFIG_CONTEXT_SWITCH_TRACER=y
1223CONFIG_RING_BUFFER_ALLOW_SWAP=y
1180CONFIG_TRACING=y 1224CONFIG_TRACING=y
1181CONFIG_TRACING_SUPPORT=y 1225CONFIG_TRACING_SUPPORT=y
1182# CONFIG_FTRACE is not set 1226# CONFIG_FTRACE is not set
@@ -1188,6 +1232,7 @@ CONFIG_HAVE_ARCH_KGDB=y
1188CONFIG_EARLY_SCIF_CONSOLE=y 1232CONFIG_EARLY_SCIF_CONSOLE=y
1189CONFIG_EARLY_SCIF_CONSOLE_PORT=0xffe00000 1233CONFIG_EARLY_SCIF_CONSOLE_PORT=0xffe00000
1190CONFIG_EARLY_PRINTK=y 1234CONFIG_EARLY_PRINTK=y
1235# CONFIG_DWARF_UNWINDER is not set
1191 1236
1192# 1237#
1193# Security options 1238# Security options
@@ -1201,7 +1246,6 @@ CONFIG_CRYPTO=y
1201# 1246#
1202# Crypto core or helper 1247# Crypto core or helper
1203# 1248#
1204# CONFIG_CRYPTO_FIPS is not set
1205CONFIG_CRYPTO_ALGAPI2=y 1249CONFIG_CRYPTO_ALGAPI2=y
1206CONFIG_CRYPTO_AEAD2=y 1250CONFIG_CRYPTO_AEAD2=y
1207CONFIG_CRYPTO_BLKCIPHER2=y 1251CONFIG_CRYPTO_BLKCIPHER2=y
@@ -1240,11 +1284,13 @@ CONFIG_CRYPTO_WORKQUEUE=y
1240# 1284#
1241# CONFIG_CRYPTO_HMAC is not set 1285# CONFIG_CRYPTO_HMAC is not set
1242# CONFIG_CRYPTO_XCBC is not set 1286# CONFIG_CRYPTO_XCBC is not set
1287# CONFIG_CRYPTO_VMAC is not set
1243 1288
1244# 1289#
1245# Digest 1290# Digest
1246# 1291#
1247# CONFIG_CRYPTO_CRC32C is not set 1292# CONFIG_CRYPTO_CRC32C is not set
1293# CONFIG_CRYPTO_GHASH is not set
1248# CONFIG_CRYPTO_MD4 is not set 1294# CONFIG_CRYPTO_MD4 is not set
1249# CONFIG_CRYPTO_MD5 is not set 1295# CONFIG_CRYPTO_MD5 is not set
1250# CONFIG_CRYPTO_MICHAEL_MIC is not set 1296# CONFIG_CRYPTO_MICHAEL_MIC is not set
@@ -1308,5 +1354,6 @@ CONFIG_DECOMPRESS_GZIP=y
1308CONFIG_HAS_IOMEM=y 1354CONFIG_HAS_IOMEM=y
1309CONFIG_HAS_IOPORT=y 1355CONFIG_HAS_IOPORT=y
1310CONFIG_HAS_DMA=y 1356CONFIG_HAS_DMA=y
1357CONFIG_HAVE_LMB=y
1311CONFIG_NLATTR=y 1358CONFIG_NLATTR=y
1312CONFIG_GENERIC_ATOMIC64=y 1359CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/polaris_defconfig b/arch/sh/configs/polaris_defconfig
index 67edd3f3f9ba..7fc1952419aa 100644
--- a/arch/sh/configs/polaris_defconfig
+++ b/arch/sh/configs/polaris_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.30 3# Linux kernel version: 2.6.31
4# Thu Jun 18 12:33:28 2009 4# Thu Sep 24 18:20:53 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -14,6 +14,7 @@ CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y 14CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
16CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_IRQ_PER_CPU=y
17# CONFIG_GENERIC_GPIO is not set 18# CONFIG_GENERIC_GPIO is not set
18CONFIG_GENERIC_TIME=y 19CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 20CONFIG_GENERIC_CLOCKEVENTS=y
@@ -27,7 +28,9 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
27# CONFIG_ARCH_HAS_ILOG2_U64 is not set 28# CONFIG_ARCH_HAS_ILOG2_U64 is not set
28CONFIG_ARCH_NO_VIRT_TO_BUS=y 29CONFIG_ARCH_NO_VIRT_TO_BUS=y
29CONFIG_ARCH_HAS_DEFAULT_IDLE=y 30CONFIG_ARCH_HAS_DEFAULT_IDLE=y
31CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
30CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 32CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
33CONFIG_CONSTRUCTORS=y
31 34
32# 35#
33# General setup 36# General setup
@@ -38,6 +41,12 @@ CONFIG_LOCK_KERNEL=y
38CONFIG_INIT_ENV_ARG_LIMIT=32 41CONFIG_INIT_ENV_ARG_LIMIT=32
39CONFIG_LOCALVERSION="" 42CONFIG_LOCALVERSION=""
40# CONFIG_LOCALVERSION_AUTO is not set 43# CONFIG_LOCALVERSION_AUTO is not set
44CONFIG_HAVE_KERNEL_GZIP=y
45CONFIG_HAVE_KERNEL_BZIP2=y
46CONFIG_HAVE_KERNEL_LZMA=y
47CONFIG_KERNEL_GZIP=y
48# CONFIG_KERNEL_BZIP2 is not set
49# CONFIG_KERNEL_LZMA is not set
41# CONFIG_SWAP is not set 50# CONFIG_SWAP is not set
42CONFIG_SYSVIPC=y 51CONFIG_SYSVIPC=y
43CONFIG_SYSVIPC_SYSCTL=y 52CONFIG_SYSVIPC_SYSCTL=y
@@ -52,11 +61,12 @@ CONFIG_AUDIT=y
52# 61#
53# RCU Subsystem 62# RCU Subsystem
54# 63#
55CONFIG_CLASSIC_RCU=y 64CONFIG_TREE_RCU=y
56# CONFIG_TREE_RCU is not set 65# CONFIG_TREE_PREEMPT_RCU is not set
57# CONFIG_PREEMPT_RCU is not set 66# CONFIG_RCU_TRACE is not set
67CONFIG_RCU_FANOUT=32
68# CONFIG_RCU_FANOUT_EXACT is not set
58# CONFIG_TREE_RCU_TRACE is not set 69# CONFIG_TREE_RCU_TRACE is not set
59# CONFIG_PREEMPT_RCU_TRACE is not set
60# CONFIG_IKCONFIG is not set 70# CONFIG_IKCONFIG is not set
61CONFIG_LOG_BUF_SHIFT=14 71CONFIG_LOG_BUF_SHIFT=14
62CONFIG_GROUP_SCHED=y 72CONFIG_GROUP_SCHED=y
@@ -91,18 +101,19 @@ CONFIG_TIMERFD=y
91CONFIG_EVENTFD=y 101CONFIG_EVENTFD=y
92CONFIG_SHMEM=y 102CONFIG_SHMEM=y
93CONFIG_AIO=y 103CONFIG_AIO=y
104CONFIG_HAVE_PERF_EVENTS=y
94 105
95# 106#
96# Performance Counters 107# Kernel Performance Events And Counters
97# 108#
109# CONFIG_PERF_EVENTS is not set
110# CONFIG_PERF_COUNTERS is not set
98CONFIG_VM_EVENT_COUNTERS=y 111CONFIG_VM_EVENT_COUNTERS=y
99# CONFIG_STRIP_ASM_SYMS is not set
100CONFIG_COMPAT_BRK=y 112CONFIG_COMPAT_BRK=y
101CONFIG_SLAB=y 113CONFIG_SLAB=y
102# CONFIG_SLUB is not set 114# CONFIG_SLUB is not set
103# CONFIG_SLOB is not set 115# CONFIG_SLOB is not set
104# CONFIG_PROFILING is not set 116# CONFIG_PROFILING is not set
105# CONFIG_MARKERS is not set
106CONFIG_HAVE_OPROFILE=y 117CONFIG_HAVE_OPROFILE=y
107# CONFIG_KPROBES is not set 118# CONFIG_KPROBES is not set
108CONFIG_HAVE_IOREMAP_PROT=y 119CONFIG_HAVE_IOREMAP_PROT=y
@@ -111,6 +122,10 @@ CONFIG_HAVE_KRETPROBES=y
111CONFIG_HAVE_ARCH_TRACEHOOK=y 122CONFIG_HAVE_ARCH_TRACEHOOK=y
112CONFIG_HAVE_CLK=y 123CONFIG_HAVE_CLK=y
113CONFIG_HAVE_DMA_API_DEBUG=y 124CONFIG_HAVE_DMA_API_DEBUG=y
125
126#
127# GCOV-based kernel profiling
128#
114# CONFIG_SLOW_WORK is not set 129# CONFIG_SLOW_WORK is not set
115CONFIG_HAVE_GENERIC_DMA_COHERENT=y 130CONFIG_HAVE_GENERIC_DMA_COHERENT=y
116CONFIG_SLABINFO=y 131CONFIG_SLABINFO=y
@@ -123,7 +138,7 @@ CONFIG_MODULE_UNLOAD=y
123CONFIG_MODVERSIONS=y 138CONFIG_MODVERSIONS=y
124# CONFIG_MODULE_SRCVERSION_ALL is not set 139# CONFIG_MODULE_SRCVERSION_ALL is not set
125CONFIG_BLOCK=y 140CONFIG_BLOCK=y
126# CONFIG_LBD is not set 141CONFIG_LBDAF=y
127# CONFIG_BLK_DEV_BSG is not set 142# CONFIG_BLK_DEV_BSG is not set
128# CONFIG_BLK_DEV_INTEGRITY is not set 143# CONFIG_BLK_DEV_INTEGRITY is not set
129 144
@@ -170,6 +185,7 @@ CONFIG_CPU_SUBTYPE_SH7709=y
170# CONFIG_CPU_SUBTYPE_SH4_202 is not set 185# CONFIG_CPU_SUBTYPE_SH4_202 is not set
171# CONFIG_CPU_SUBTYPE_SH7723 is not set 186# CONFIG_CPU_SUBTYPE_SH7723 is not set
172# CONFIG_CPU_SUBTYPE_SH7724 is not set 187# CONFIG_CPU_SUBTYPE_SH7724 is not set
188# CONFIG_CPU_SUBTYPE_SH7757 is not set
173# CONFIG_CPU_SUBTYPE_SH7763 is not set 189# CONFIG_CPU_SUBTYPE_SH7763 is not set
174# CONFIG_CPU_SUBTYPE_SH7770 is not set 190# CONFIG_CPU_SUBTYPE_SH7770 is not set
175# CONFIG_CPU_SUBTYPE_SH7780 is not set 191# CONFIG_CPU_SUBTYPE_SH7780 is not set
@@ -215,6 +231,7 @@ CONFIG_ZONE_DMA_FLAG=0
215CONFIG_NR_QUICK=2 231CONFIG_NR_QUICK=2
216CONFIG_HAVE_MLOCK=y 232CONFIG_HAVE_MLOCK=y
217CONFIG_HAVE_MLOCKED_PAGE_BIT=y 233CONFIG_HAVE_MLOCKED_PAGE_BIT=y
234# CONFIG_KSM is not set
218CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 235CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
219 236
220# 237#
@@ -302,7 +319,8 @@ CONFIG_GUSA=y
302CONFIG_ZERO_PAGE_OFFSET=0x00001000 319CONFIG_ZERO_PAGE_OFFSET=0x00001000
303CONFIG_BOOT_LINK_OFFSET=0x00800000 320CONFIG_BOOT_LINK_OFFSET=0x00800000
304CONFIG_ENTRY_OFFSET=0x00001000 321CONFIG_ENTRY_OFFSET=0x00001000
305CONFIG_CMDLINE_BOOL=y 322CONFIG_CMDLINE_OVERWRITE=y
323# CONFIG_CMDLINE_EXTEND is not set
306CONFIG_CMDLINE="console=ttySC1,115200 root=/dev/mtdblock2 rootfstype=jffs2 mem=63M mtdparts=physmap-flash.0:0x00100000(bootloader)ro,0x00500000(Kernel)ro,0x00A00000(Filesystem)" 324CONFIG_CMDLINE="console=ttySC1,115200 root=/dev/mtdblock2 rootfstype=jffs2 mem=63M mtdparts=physmap-flash.0:0x00100000(bootloader)ro,0x00500000(Kernel)ro,0x00A00000(Filesystem)"
307 325
308# 326#
@@ -363,6 +381,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
363# CONFIG_NETFILTER is not set 381# CONFIG_NETFILTER is not set
364# CONFIG_IP_DCCP is not set 382# CONFIG_IP_DCCP is not set
365# CONFIG_IP_SCTP is not set 383# CONFIG_IP_SCTP is not set
384# CONFIG_RDS is not set
366# CONFIG_TIPC is not set 385# CONFIG_TIPC is not set
367# CONFIG_ATM is not set 386# CONFIG_ATM is not set
368# CONFIG_BRIDGE is not set 387# CONFIG_BRIDGE is not set
@@ -403,6 +422,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
403# Generic Driver Options 422# Generic Driver Options
404# 423#
405CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 424CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
425# CONFIG_DEVTMPFS is not set
406CONFIG_STANDALONE=y 426CONFIG_STANDALONE=y
407CONFIG_PREVENT_FIRMWARE_BUILD=y 427CONFIG_PREVENT_FIRMWARE_BUILD=y
408CONFIG_FW_LOADER=y 428CONFIG_FW_LOADER=y
@@ -414,9 +434,9 @@ CONFIG_EXTRA_FIRMWARE=""
414# CONFIG_CONNECTOR is not set 434# CONFIG_CONNECTOR is not set
415CONFIG_MTD=y 435CONFIG_MTD=y
416# CONFIG_MTD_DEBUG is not set 436# CONFIG_MTD_DEBUG is not set
437# CONFIG_MTD_TESTS is not set
417# CONFIG_MTD_CONCAT is not set 438# CONFIG_MTD_CONCAT is not set
418CONFIG_MTD_PARTITIONS=y 439CONFIG_MTD_PARTITIONS=y
419# CONFIG_MTD_TESTS is not set
420# CONFIG_MTD_REDBOOT_PARTS is not set 440# CONFIG_MTD_REDBOOT_PARTS is not set
421CONFIG_MTD_CMDLINE_PARTS=y 441CONFIG_MTD_CMDLINE_PARTS=y
422# CONFIG_MTD_AR7_PARTS is not set 442# CONFIG_MTD_AR7_PARTS is not set
@@ -577,10 +597,7 @@ CONFIG_SMSC911X=y
577# CONFIG_KS8842 is not set 597# CONFIG_KS8842 is not set
578# CONFIG_NETDEV_1000 is not set 598# CONFIG_NETDEV_1000 is not set
579# CONFIG_NETDEV_10000 is not set 599# CONFIG_NETDEV_10000 is not set
580 600CONFIG_WLAN=y
581#
582# Wireless LAN
583#
584# CONFIG_WLAN_PRE80211 is not set 601# CONFIG_WLAN_PRE80211 is not set
585# CONFIG_WLAN_80211 is not set 602# CONFIG_WLAN_80211 is not set
586 603
@@ -666,11 +683,15 @@ CONFIG_UNIX98_PTYS=y
666# CONFIG_TCG_TPM is not set 683# CONFIG_TCG_TPM is not set
667# CONFIG_I2C is not set 684# CONFIG_I2C is not set
668# CONFIG_SPI is not set 685# CONFIG_SPI is not set
686
687#
688# PPS support
689#
690# CONFIG_PPS is not set
669# CONFIG_W1 is not set 691# CONFIG_W1 is not set
670# CONFIG_POWER_SUPPLY is not set 692# CONFIG_POWER_SUPPLY is not set
671# CONFIG_HWMON is not set 693# CONFIG_HWMON is not set
672# CONFIG_THERMAL is not set 694# CONFIG_THERMAL is not set
673# CONFIG_THERMAL_HWMON is not set
674# CONFIG_WATCHDOG is not set 695# CONFIG_WATCHDOG is not set
675CONFIG_SSB_POSSIBLE=y 696CONFIG_SSB_POSSIBLE=y
676 697
@@ -770,8 +791,10 @@ CONFIG_RTC_DRV_SH=y
770# CONFIG_JFS_FS is not set 791# CONFIG_JFS_FS is not set
771# CONFIG_FS_POSIX_ACL is not set 792# CONFIG_FS_POSIX_ACL is not set
772# CONFIG_XFS_FS is not set 793# CONFIG_XFS_FS is not set
794# CONFIG_GFS2_FS is not set
773# CONFIG_OCFS2_FS is not set 795# CONFIG_OCFS2_FS is not set
774# CONFIG_BTRFS_FS is not set 796# CONFIG_BTRFS_FS is not set
797# CONFIG_NILFS2_FS is not set
775CONFIG_FILE_LOCKING=y 798CONFIG_FILE_LOCKING=y
776CONFIG_FSNOTIFY=y 799CONFIG_FSNOTIFY=y
777# CONFIG_DNOTIFY is not set 800# CONFIG_DNOTIFY is not set
@@ -841,7 +864,6 @@ CONFIG_JFFS2_RTIME=y
841# CONFIG_ROMFS_FS is not set 864# CONFIG_ROMFS_FS is not set
842# CONFIG_SYSV_FS is not set 865# CONFIG_SYSV_FS is not set
843# CONFIG_UFS_FS is not set 866# CONFIG_UFS_FS is not set
844# CONFIG_NILFS2_FS is not set
845CONFIG_NETWORK_FILESYSTEMS=y 867CONFIG_NETWORK_FILESYSTEMS=y
846CONFIG_NFS_FS=y 868CONFIG_NFS_FS=y
847CONFIG_NFS_V3=y 869CONFIG_NFS_V3=y
@@ -877,6 +899,7 @@ CONFIG_ENABLE_WARN_DEPRECATED=y
877CONFIG_ENABLE_MUST_CHECK=y 899CONFIG_ENABLE_MUST_CHECK=y
878CONFIG_FRAME_WARN=1024 900CONFIG_FRAME_WARN=1024
879# CONFIG_MAGIC_SYSRQ is not set 901# CONFIG_MAGIC_SYSRQ is not set
902# CONFIG_STRIP_ASM_SYMS is not set
880# CONFIG_UNUSED_SYMBOLS is not set 903# CONFIG_UNUSED_SYMBOLS is not set
881# CONFIG_DEBUG_FS is not set 904# CONFIG_DEBUG_FS is not set
882# CONFIG_HEADERS_CHECK is not set 905# CONFIG_HEADERS_CHECK is not set
@@ -916,18 +939,23 @@ CONFIG_DEBUG_INFO=y
916# CONFIG_DEBUG_LIST is not set 939# CONFIG_DEBUG_LIST is not set
917CONFIG_DEBUG_SG=y 940CONFIG_DEBUG_SG=y
918# CONFIG_DEBUG_NOTIFIERS is not set 941# CONFIG_DEBUG_NOTIFIERS is not set
942# CONFIG_DEBUG_CREDENTIALS is not set
919CONFIG_FRAME_POINTER=y 943CONFIG_FRAME_POINTER=y
920# CONFIG_RCU_TORTURE_TEST is not set 944# CONFIG_RCU_TORTURE_TEST is not set
921# CONFIG_RCU_CPU_STALL_DETECTOR is not set 945# CONFIG_RCU_CPU_STALL_DETECTOR is not set
922# CONFIG_BACKTRACE_SELF_TEST is not set 946# CONFIG_BACKTRACE_SELF_TEST is not set
923# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set 947# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
948# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
924# CONFIG_FAULT_INJECTION is not set 949# CONFIG_FAULT_INJECTION is not set
925# CONFIG_LATENCYTOP is not set 950# CONFIG_LATENCYTOP is not set
926CONFIG_SYSCTL_SYSCALL_CHECK=y 951CONFIG_SYSCTL_SYSCALL_CHECK=y
927# CONFIG_PAGE_POISONING is not set 952# CONFIG_PAGE_POISONING is not set
928CONFIG_HAVE_FUNCTION_TRACER=y 953CONFIG_HAVE_FUNCTION_TRACER=y
954CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
955CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
929CONFIG_HAVE_DYNAMIC_FTRACE=y 956CONFIG_HAVE_DYNAMIC_FTRACE=y
930CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 957CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
958CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
931CONFIG_TRACING_SUPPORT=y 959CONFIG_TRACING_SUPPORT=y
932CONFIG_FTRACE=y 960CONFIG_FTRACE=y
933# CONFIG_FUNCTION_TRACER is not set 961# CONFIG_FUNCTION_TRACER is not set
@@ -935,6 +963,7 @@ CONFIG_FTRACE=y
935# CONFIG_PREEMPT_TRACER is not set 963# CONFIG_PREEMPT_TRACER is not set
936# CONFIG_SCHED_TRACER is not set 964# CONFIG_SCHED_TRACER is not set
937# CONFIG_ENABLE_DEFAULT_TRACERS is not set 965# CONFIG_ENABLE_DEFAULT_TRACERS is not set
966# CONFIG_FTRACE_SYSCALLS is not set
938# CONFIG_BOOT_TRACER is not set 967# CONFIG_BOOT_TRACER is not set
939CONFIG_BRANCH_PROFILE_NONE=y 968CONFIG_BRANCH_PROFILE_NONE=y
940# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set 969# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
@@ -947,16 +976,15 @@ CONFIG_BRANCH_PROFILE_NONE=y
947# CONFIG_SAMPLES is not set 976# CONFIG_SAMPLES is not set
948CONFIG_HAVE_ARCH_KGDB=y 977CONFIG_HAVE_ARCH_KGDB=y
949# CONFIG_KGDB is not set 978# CONFIG_KGDB is not set
950# CONFIG_KMEMCHECK is not set
951# CONFIG_SH_STANDARD_BIOS is not set 979# CONFIG_SH_STANDARD_BIOS is not set
952CONFIG_EARLY_SCIF_CONSOLE=y 980CONFIG_EARLY_SCIF_CONSOLE=y
953CONFIG_EARLY_SCIF_CONSOLE_PORT=0x00000000 981CONFIG_EARLY_SCIF_CONSOLE_PORT=0xa4000150
954CONFIG_EARLY_PRINTK=y 982CONFIG_EARLY_PRINTK=y
955# CONFIG_DEBUG_BOOTMEM is not set 983# CONFIG_STACK_DEBUG is not set
956# CONFIG_DEBUG_STACKOVERFLOW is not set
957# CONFIG_DEBUG_STACK_USAGE is not set 984# CONFIG_DEBUG_STACK_USAGE is not set
958# CONFIG_4KSTACKS is not set 985# CONFIG_4KSTACKS is not set
959CONFIG_DUMP_CODE=y 986CONFIG_DUMP_CODE=y
987# CONFIG_DWARF_UNWINDER is not set
960# CONFIG_SH_NO_BSS_INIT is not set 988# CONFIG_SH_NO_BSS_INIT is not set
961 989
962# 990#
@@ -987,5 +1015,6 @@ CONFIG_ZLIB_DEFLATE=y
987CONFIG_HAS_IOMEM=y 1015CONFIG_HAS_IOMEM=y
988CONFIG_HAS_IOPORT=y 1016CONFIG_HAS_IOPORT=y
989CONFIG_HAS_DMA=y 1017CONFIG_HAS_DMA=y
1018CONFIG_HAVE_LMB=y
990CONFIG_NLATTR=y 1019CONFIG_NLATTR=y
991CONFIG_GENERIC_ATOMIC64=y 1020CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/r7780mp_defconfig b/arch/sh/configs/r7780mp_defconfig
index 107a8e337ecc..903b021e8d93 100644
--- a/arch/sh/configs/r7780mp_defconfig
+++ b/arch/sh/configs/r7780mp_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.30 3# Linux kernel version: 2.6.31
4# Thu Jun 18 12:34:44 2009 4# Thu Sep 24 18:24:31 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -14,6 +14,7 @@ CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y 14CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
16CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_IRQ_PER_CPU=y
17# CONFIG_GENERIC_GPIO is not set 18# CONFIG_GENERIC_GPIO is not set
18CONFIG_GENERIC_TIME=y 19CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 20CONFIG_GENERIC_CLOCKEVENTS=y
@@ -28,8 +29,10 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
28# CONFIG_ARCH_HAS_ILOG2_U64 is not set 29# CONFIG_ARCH_HAS_ILOG2_U64 is not set
29CONFIG_ARCH_NO_VIRT_TO_BUS=y 30CONFIG_ARCH_NO_VIRT_TO_BUS=y
30CONFIG_ARCH_HAS_DEFAULT_IDLE=y 31CONFIG_ARCH_HAS_DEFAULT_IDLE=y
32CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
31CONFIG_IO_TRAPPED=y 33CONFIG_IO_TRAPPED=y
32CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 34CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
35CONFIG_CONSTRUCTORS=y
33 36
34# 37#
35# General setup 38# General setup
@@ -40,6 +43,12 @@ CONFIG_LOCK_KERNEL=y
40CONFIG_INIT_ENV_ARG_LIMIT=32 43CONFIG_INIT_ENV_ARG_LIMIT=32
41CONFIG_LOCALVERSION="" 44CONFIG_LOCALVERSION=""
42CONFIG_LOCALVERSION_AUTO=y 45CONFIG_LOCALVERSION_AUTO=y
46CONFIG_HAVE_KERNEL_GZIP=y
47CONFIG_HAVE_KERNEL_BZIP2=y
48CONFIG_HAVE_KERNEL_LZMA=y
49CONFIG_KERNEL_GZIP=y
50# CONFIG_KERNEL_BZIP2 is not set
51# CONFIG_KERNEL_LZMA is not set
43CONFIG_SWAP=y 52CONFIG_SWAP=y
44CONFIG_SYSVIPC=y 53CONFIG_SYSVIPC=y
45CONFIG_SYSVIPC_SYSCTL=y 54CONFIG_SYSVIPC_SYSCTL=y
@@ -52,11 +61,12 @@ CONFIG_BSD_PROCESS_ACCT=y
52# 61#
53# RCU Subsystem 62# RCU Subsystem
54# 63#
55CONFIG_CLASSIC_RCU=y 64CONFIG_TREE_RCU=y
56# CONFIG_TREE_RCU is not set 65# CONFIG_TREE_PREEMPT_RCU is not set
57# CONFIG_PREEMPT_RCU is not set 66# CONFIG_RCU_TRACE is not set
67CONFIG_RCU_FANOUT=32
68# CONFIG_RCU_FANOUT_EXACT is not set
58# CONFIG_TREE_RCU_TRACE is not set 69# CONFIG_TREE_RCU_TRACE is not set
59# CONFIG_PREEMPT_RCU_TRACE is not set
60CONFIG_IKCONFIG=y 70CONFIG_IKCONFIG=y
61CONFIG_IKCONFIG_PROC=y 71CONFIG_IKCONFIG_PROC=y
62CONFIG_LOG_BUF_SHIFT=14 72CONFIG_LOG_BUF_SHIFT=14
@@ -92,20 +102,22 @@ CONFIG_TIMERFD=y
92CONFIG_EVENTFD=y 102CONFIG_EVENTFD=y
93CONFIG_SHMEM=y 103CONFIG_SHMEM=y
94CONFIG_AIO=y 104CONFIG_AIO=y
105CONFIG_HAVE_PERF_EVENTS=y
95 106
96# 107#
97# Performance Counters 108# Kernel Performance Events And Counters
98# 109#
110CONFIG_PERF_EVENTS=y
111CONFIG_EVENT_PROFILE=y
112# CONFIG_PERF_COUNTERS is not set
99CONFIG_VM_EVENT_COUNTERS=y 113CONFIG_VM_EVENT_COUNTERS=y
100CONFIG_PCI_QUIRKS=y 114CONFIG_PCI_QUIRKS=y
101# CONFIG_STRIP_ASM_SYMS is not set
102CONFIG_COMPAT_BRK=y 115CONFIG_COMPAT_BRK=y
103CONFIG_SLAB=y 116CONFIG_SLAB=y
104# CONFIG_SLUB is not set 117# CONFIG_SLUB is not set
105# CONFIG_SLOB is not set 118# CONFIG_SLOB is not set
106CONFIG_PROFILING=y 119CONFIG_PROFILING=y
107CONFIG_TRACEPOINTS=y 120CONFIG_TRACEPOINTS=y
108CONFIG_MARKERS=y
109CONFIG_OPROFILE=m 121CONFIG_OPROFILE=m
110CONFIG_HAVE_OPROFILE=y 122CONFIG_HAVE_OPROFILE=y
111# CONFIG_KPROBES is not set 123# CONFIG_KPROBES is not set
@@ -115,6 +127,11 @@ CONFIG_HAVE_KRETPROBES=y
115CONFIG_HAVE_ARCH_TRACEHOOK=y 127CONFIG_HAVE_ARCH_TRACEHOOK=y
116CONFIG_HAVE_CLK=y 128CONFIG_HAVE_CLK=y
117CONFIG_HAVE_DMA_API_DEBUG=y 129CONFIG_HAVE_DMA_API_DEBUG=y
130
131#
132# GCOV-based kernel profiling
133#
134# CONFIG_GCOV_KERNEL is not set
118# CONFIG_SLOW_WORK is not set 135# CONFIG_SLOW_WORK is not set
119CONFIG_HAVE_GENERIC_DMA_COHERENT=y 136CONFIG_HAVE_GENERIC_DMA_COHERENT=y
120CONFIG_SLABINFO=y 137CONFIG_SLABINFO=y
@@ -126,7 +143,7 @@ CONFIG_MODULE_UNLOAD=y
126# CONFIG_MODVERSIONS is not set 143# CONFIG_MODVERSIONS is not set
127# CONFIG_MODULE_SRCVERSION_ALL is not set 144# CONFIG_MODULE_SRCVERSION_ALL is not set
128CONFIG_BLOCK=y 145CONFIG_BLOCK=y
129# CONFIG_LBD is not set 146CONFIG_LBDAF=y
130# CONFIG_BLK_DEV_BSG is not set 147# CONFIG_BLK_DEV_BSG is not set
131# CONFIG_BLK_DEV_INTEGRITY is not set 148# CONFIG_BLK_DEV_INTEGRITY is not set
132 149
@@ -174,6 +191,7 @@ CONFIG_CPU_SH4A=y
174# CONFIG_CPU_SUBTYPE_SH4_202 is not set 191# CONFIG_CPU_SUBTYPE_SH4_202 is not set
175# CONFIG_CPU_SUBTYPE_SH7723 is not set 192# CONFIG_CPU_SUBTYPE_SH7723 is not set
176# CONFIG_CPU_SUBTYPE_SH7724 is not set 193# CONFIG_CPU_SUBTYPE_SH7724 is not set
194# CONFIG_CPU_SUBTYPE_SH7757 is not set
177# CONFIG_CPU_SUBTYPE_SH7763 is not set 195# CONFIG_CPU_SUBTYPE_SH7763 is not set
178# CONFIG_CPU_SUBTYPE_SH7770 is not set 196# CONFIG_CPU_SUBTYPE_SH7770 is not set
179CONFIG_CPU_SUBTYPE_SH7780=y 197CONFIG_CPU_SUBTYPE_SH7780=y
@@ -229,6 +247,7 @@ CONFIG_ZONE_DMA_FLAG=0
229CONFIG_NR_QUICK=2 247CONFIG_NR_QUICK=2
230CONFIG_HAVE_MLOCK=y 248CONFIG_HAVE_MLOCK=y
231CONFIG_HAVE_MLOCKED_PAGE_BIT=y 249CONFIG_HAVE_MLOCKED_PAGE_BIT=y
250# CONFIG_KSM is not set
232CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 251CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
233 252
234# 253#
@@ -315,7 +334,8 @@ CONFIG_GUSA=y
315CONFIG_ZERO_PAGE_OFFSET=0x00001000 334CONFIG_ZERO_PAGE_OFFSET=0x00001000
316CONFIG_BOOT_LINK_OFFSET=0x00800000 335CONFIG_BOOT_LINK_OFFSET=0x00800000
317CONFIG_ENTRY_OFFSET=0x00001000 336CONFIG_ENTRY_OFFSET=0x00001000
318CONFIG_CMDLINE_BOOL=y 337CONFIG_CMDLINE_OVERWRITE=y
338# CONFIG_CMDLINE_EXTEND is not set
319CONFIG_CMDLINE="console=ttySC0,115200 root=/dev/sda1" 339CONFIG_CMDLINE="console=ttySC0,115200 root=/dev/sda1"
320 340
321# 341#
@@ -396,6 +416,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
396# CONFIG_NETFILTER is not set 416# CONFIG_NETFILTER is not set
397# CONFIG_IP_DCCP is not set 417# CONFIG_IP_DCCP is not set
398# CONFIG_IP_SCTP is not set 418# CONFIG_IP_SCTP is not set
419# CONFIG_RDS is not set
399# CONFIG_TIPC is not set 420# CONFIG_TIPC is not set
400# CONFIG_ATM is not set 421# CONFIG_ATM is not set
401CONFIG_STP=m 422CONFIG_STP=m
@@ -428,6 +449,7 @@ CONFIG_LLC=m
428# CONFIG_AF_RXRPC is not set 449# CONFIG_AF_RXRPC is not set
429CONFIG_WIRELESS=y 450CONFIG_WIRELESS=y
430# CONFIG_CFG80211 is not set 451# CONFIG_CFG80211 is not set
452CONFIG_CFG80211_DEFAULT_PS_VALUE=0
431# CONFIG_WIRELESS_OLD_REGULATORY is not set 453# CONFIG_WIRELESS_OLD_REGULATORY is not set
432CONFIG_WIRELESS_EXT=y 454CONFIG_WIRELESS_EXT=y
433CONFIG_WIRELESS_EXT_SYSFS=y 455CONFIG_WIRELESS_EXT_SYSFS=y
@@ -436,7 +458,6 @@ CONFIG_WIRELESS_EXT_SYSFS=y
436# 458#
437# CFG80211 needs to be enabled for MAC80211 459# CFG80211 needs to be enabled for MAC80211
438# 460#
439CONFIG_MAC80211_DEFAULT_PS_VALUE=0
440# CONFIG_WIMAX is not set 461# CONFIG_WIMAX is not set
441# CONFIG_RFKILL is not set 462# CONFIG_RFKILL is not set
442# CONFIG_NET_9P is not set 463# CONFIG_NET_9P is not set
@@ -449,6 +470,7 @@ CONFIG_MAC80211_DEFAULT_PS_VALUE=0
449# Generic Driver Options 470# Generic Driver Options
450# 471#
451CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 472CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
473# CONFIG_DEVTMPFS is not set
452CONFIG_STANDALONE=y 474CONFIG_STANDALONE=y
453CONFIG_PREVENT_FIRMWARE_BUILD=y 475CONFIG_PREVENT_FIRMWARE_BUILD=y
454CONFIG_FW_LOADER=m 476CONFIG_FW_LOADER=m
@@ -460,9 +482,9 @@ CONFIG_EXTRA_FIRMWARE=""
460# CONFIG_CONNECTOR is not set 482# CONFIG_CONNECTOR is not set
461CONFIG_MTD=y 483CONFIG_MTD=y
462# CONFIG_MTD_DEBUG is not set 484# CONFIG_MTD_DEBUG is not set
485# CONFIG_MTD_TESTS is not set
463# CONFIG_MTD_CONCAT is not set 486# CONFIG_MTD_CONCAT is not set
464CONFIG_MTD_PARTITIONS=y 487CONFIG_MTD_PARTITIONS=y
465# CONFIG_MTD_TESTS is not set
466# CONFIG_MTD_REDBOOT_PARTS is not set 488# CONFIG_MTD_REDBOOT_PARTS is not set
467# CONFIG_MTD_CMDLINE_PARTS is not set 489# CONFIG_MTD_CMDLINE_PARTS is not set
468# CONFIG_MTD_AR7_PARTS is not set 490# CONFIG_MTD_AR7_PARTS is not set
@@ -513,6 +535,7 @@ CONFIG_MTD_COMPLEX_MAPPINGS=y
513CONFIG_MTD_PHYSMAP=y 535CONFIG_MTD_PHYSMAP=y
514# CONFIG_MTD_PHYSMAP_COMPAT is not set 536# CONFIG_MTD_PHYSMAP_COMPAT is not set
515# CONFIG_MTD_PCI is not set 537# CONFIG_MTD_PCI is not set
538# CONFIG_MTD_GPIO_ADDR is not set
516# CONFIG_MTD_INTEL_VR_NOR is not set 539# CONFIG_MTD_INTEL_VR_NOR is not set
517# CONFIG_MTD_PLATRAM is not set 540# CONFIG_MTD_PLATRAM is not set
518 541
@@ -651,11 +674,13 @@ CONFIG_SCSI_LOWLEVEL=y
651# CONFIG_SCSI_DC390T is not set 674# CONFIG_SCSI_DC390T is not set
652# CONFIG_SCSI_NSP32 is not set 675# CONFIG_SCSI_NSP32 is not set
653# CONFIG_SCSI_DEBUG is not set 676# CONFIG_SCSI_DEBUG is not set
677# CONFIG_SCSI_PMCRAID is not set
654# CONFIG_SCSI_SRP is not set 678# CONFIG_SCSI_SRP is not set
655# CONFIG_SCSI_DH is not set 679# CONFIG_SCSI_DH is not set
656# CONFIG_SCSI_OSD_INITIATOR is not set 680# CONFIG_SCSI_OSD_INITIATOR is not set
657CONFIG_ATA=y 681CONFIG_ATA=y
658# CONFIG_ATA_NONSTANDARD is not set 682# CONFIG_ATA_NONSTANDARD is not set
683CONFIG_ATA_VERBOSE_ERROR=y
659CONFIG_SATA_PMP=y 684CONFIG_SATA_PMP=y
660# CONFIG_SATA_AHCI is not set 685# CONFIG_SATA_AHCI is not set
661# CONFIG_SATA_SIL24 is not set 686# CONFIG_SATA_SIL24 is not set
@@ -677,6 +702,7 @@ CONFIG_SATA_SIL=y
677# CONFIG_PATA_ALI is not set 702# CONFIG_PATA_ALI is not set
678# CONFIG_PATA_AMD is not set 703# CONFIG_PATA_AMD is not set
679# CONFIG_PATA_ARTOP is not set 704# CONFIG_PATA_ARTOP is not set
705# CONFIG_PATA_ATP867X is not set
680# CONFIG_PATA_ATIIXP is not set 706# CONFIG_PATA_ATIIXP is not set
681# CONFIG_PATA_CMD640_PCI is not set 707# CONFIG_PATA_CMD640_PCI is not set
682# CONFIG_PATA_CMD64X is not set 708# CONFIG_PATA_CMD64X is not set
@@ -704,6 +730,7 @@ CONFIG_SATA_SIL=y
704# CONFIG_PATA_OPTIDMA is not set 730# CONFIG_PATA_OPTIDMA is not set
705# CONFIG_PATA_PDC_OLD is not set 731# CONFIG_PATA_PDC_OLD is not set
706# CONFIG_PATA_RADISYS is not set 732# CONFIG_PATA_RADISYS is not set
733# CONFIG_PATA_RDC is not set
707# CONFIG_PATA_RZ1000 is not set 734# CONFIG_PATA_RZ1000 is not set
708# CONFIG_PATA_SC1200 is not set 735# CONFIG_PATA_SC1200 is not set
709# CONFIG_PATA_SERVERWORKS is not set 736# CONFIG_PATA_SERVERWORKS is not set
@@ -722,7 +749,11 @@ CONFIG_PATA_PLATFORM=y
722# 749#
723 750
724# 751#
725# Enable only one of the two stacks, unless you know what you are doing 752# You can enable one or both FireWire driver stacks.
753#
754
755#
756# See the help texts for more information.
726# 757#
727# CONFIG_FIREWIRE is not set 758# CONFIG_FIREWIRE is not set
728# CONFIG_IEEE1394 is not set 759# CONFIG_IEEE1394 is not set
@@ -804,6 +835,7 @@ CONFIG_R8169=y
804# CONFIG_VIA_VELOCITY is not set 835# CONFIG_VIA_VELOCITY is not set
805# CONFIG_TIGON3 is not set 836# CONFIG_TIGON3 is not set
806# CONFIG_BNX2 is not set 837# CONFIG_BNX2 is not set
838# CONFIG_CNIC is not set
807# CONFIG_QLA3XXX is not set 839# CONFIG_QLA3XXX is not set
808# CONFIG_ATL1 is not set 840# CONFIG_ATL1 is not set
809# CONFIG_ATL1E is not set 841# CONFIG_ATL1E is not set
@@ -829,10 +861,7 @@ CONFIG_CHELSIO_T3_DEPENDS=y
829# CONFIG_SFC is not set 861# CONFIG_SFC is not set
830# CONFIG_BE2NET is not set 862# CONFIG_BE2NET is not set
831# CONFIG_TR is not set 863# CONFIG_TR is not set
832 864CONFIG_WLAN=y
833#
834# Wireless LAN
835#
836# CONFIG_WLAN_PRE80211 is not set 865# CONFIG_WLAN_PRE80211 is not set
837# CONFIG_WLAN_80211 is not set 866# CONFIG_WLAN_80211 is not set
838 867
@@ -873,13 +902,17 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
873# Input Device Drivers 902# Input Device Drivers
874# 903#
875CONFIG_INPUT_KEYBOARD=y 904CONFIG_INPUT_KEYBOARD=y
905# CONFIG_KEYBOARD_ADP5588 is not set
876CONFIG_KEYBOARD_ATKBD=y 906CONFIG_KEYBOARD_ATKBD=y
877# CONFIG_KEYBOARD_SUNKBD is not set 907# CONFIG_QT2160 is not set
878# CONFIG_KEYBOARD_LKKBD is not set 908# CONFIG_KEYBOARD_LKKBD is not set
879# CONFIG_KEYBOARD_XTKBD is not set 909# CONFIG_KEYBOARD_MAX7359 is not set
880# CONFIG_KEYBOARD_NEWTON is not set 910# CONFIG_KEYBOARD_NEWTON is not set
911# CONFIG_KEYBOARD_OPENCORES is not set
881# CONFIG_KEYBOARD_STOWAWAY is not set 912# CONFIG_KEYBOARD_STOWAWAY is not set
913# CONFIG_KEYBOARD_SUNKBD is not set
882# CONFIG_KEYBOARD_SH_KEYSC is not set 914# CONFIG_KEYBOARD_SH_KEYSC is not set
915# CONFIG_KEYBOARD_XTKBD is not set
883# CONFIG_INPUT_MOUSE is not set 916# CONFIG_INPUT_MOUSE is not set
884# CONFIG_INPUT_JOYSTICK is not set 917# CONFIG_INPUT_JOYSTICK is not set
885# CONFIG_INPUT_TABLET is not set 918# CONFIG_INPUT_TABLET is not set
@@ -933,6 +966,7 @@ CONFIG_HW_RANDOM=y
933CONFIG_DEVPORT=y 966CONFIG_DEVPORT=y
934CONFIG_I2C=y 967CONFIG_I2C=y
935CONFIG_I2C_BOARDINFO=y 968CONFIG_I2C_BOARDINFO=y
969CONFIG_I2C_COMPAT=y
936CONFIG_I2C_CHARDEV=y 970CONFIG_I2C_CHARDEV=y
937CONFIG_I2C_HELPER_AUTO=y 971CONFIG_I2C_HELPER_AUTO=y
938 972
@@ -961,6 +995,7 @@ CONFIG_I2C_HELPER_AUTO=y
961# 995#
962# I2C system bus drivers (mostly embedded / system-on-chip) 996# I2C system bus drivers (mostly embedded / system-on-chip)
963# 997#
998# CONFIG_I2C_DESIGNWARE is not set
964CONFIG_I2C_HIGHLANDER=y 999CONFIG_I2C_HIGHLANDER=y
965# CONFIG_I2C_OCORES is not set 1000# CONFIG_I2C_OCORES is not set
966# CONFIG_I2C_SH_MOBILE is not set 1001# CONFIG_I2C_SH_MOBILE is not set
@@ -987,19 +1022,26 @@ CONFIG_I2C_HIGHLANDER=y
987# Miscellaneous I2C Chip support 1022# Miscellaneous I2C Chip support
988# 1023#
989# CONFIG_DS1682 is not set 1024# CONFIG_DS1682 is not set
990# CONFIG_SENSORS_PCF8574 is not set
991# CONFIG_PCF8575 is not set
992# CONFIG_SENSORS_PCA9539 is not set
993# CONFIG_SENSORS_TSL2550 is not set 1025# CONFIG_SENSORS_TSL2550 is not set
994# CONFIG_I2C_DEBUG_CORE is not set 1026# CONFIG_I2C_DEBUG_CORE is not set
995# CONFIG_I2C_DEBUG_ALGO is not set 1027# CONFIG_I2C_DEBUG_ALGO is not set
996# CONFIG_I2C_DEBUG_BUS is not set 1028# CONFIG_I2C_DEBUG_BUS is not set
997# CONFIG_I2C_DEBUG_CHIP is not set 1029# CONFIG_I2C_DEBUG_CHIP is not set
998# CONFIG_SPI is not set 1030# CONFIG_SPI is not set
1031
1032#
1033# PPS support
1034#
1035# CONFIG_PPS is not set
999# CONFIG_W1 is not set 1036# CONFIG_W1 is not set
1000# CONFIG_POWER_SUPPLY is not set 1037# CONFIG_POWER_SUPPLY is not set
1001CONFIG_HWMON=y 1038CONFIG_HWMON=y
1002# CONFIG_HWMON_VID is not set 1039# CONFIG_HWMON_VID is not set
1040# CONFIG_HWMON_DEBUG_CHIP is not set
1041
1042#
1043# Native drivers
1044#
1003# CONFIG_SENSORS_AD7414 is not set 1045# CONFIG_SENSORS_AD7414 is not set
1004# CONFIG_SENSORS_AD7418 is not set 1046# CONFIG_SENSORS_AD7418 is not set
1005# CONFIG_SENSORS_ADM1021 is not set 1047# CONFIG_SENSORS_ADM1021 is not set
@@ -1049,6 +1091,7 @@ CONFIG_HWMON=y
1049# CONFIG_SENSORS_ADS7828 is not set 1091# CONFIG_SENSORS_ADS7828 is not set
1050# CONFIG_SENSORS_THMC50 is not set 1092# CONFIG_SENSORS_THMC50 is not set
1051# CONFIG_SENSORS_TMP401 is not set 1093# CONFIG_SENSORS_TMP401 is not set
1094# CONFIG_SENSORS_TMP421 is not set
1052# CONFIG_SENSORS_VIA686A is not set 1095# CONFIG_SENSORS_VIA686A is not set
1053# CONFIG_SENSORS_VT1211 is not set 1096# CONFIG_SENSORS_VT1211 is not set
1054# CONFIG_SENSORS_VT8231 is not set 1097# CONFIG_SENSORS_VT8231 is not set
@@ -1060,7 +1103,6 @@ CONFIG_HWMON=y
1060# CONFIG_SENSORS_W83L786NG is not set 1103# CONFIG_SENSORS_W83L786NG is not set
1061# CONFIG_SENSORS_W83627HF is not set 1104# CONFIG_SENSORS_W83627HF is not set
1062# CONFIG_SENSORS_W83627EHF is not set 1105# CONFIG_SENSORS_W83627EHF is not set
1063# CONFIG_HWMON_DEBUG_CHIP is not set
1064CONFIG_THERMAL=y 1106CONFIG_THERMAL=y
1065# CONFIG_THERMAL_HWMON is not set 1107# CONFIG_THERMAL_HWMON is not set
1066# CONFIG_WATCHDOG is not set 1108# CONFIG_WATCHDOG is not set
@@ -1081,14 +1123,17 @@ CONFIG_SSB_POSSIBLE=y
1081# CONFIG_MFD_TMIO is not set 1123# CONFIG_MFD_TMIO is not set
1082# CONFIG_PMIC_DA903X is not set 1124# CONFIG_PMIC_DA903X is not set
1083# CONFIG_MFD_WM8400 is not set 1125# CONFIG_MFD_WM8400 is not set
1126# CONFIG_MFD_WM831X is not set
1084# CONFIG_MFD_WM8350_I2C is not set 1127# CONFIG_MFD_WM8350_I2C is not set
1085# CONFIG_MFD_PCF50633 is not set 1128# CONFIG_MFD_PCF50633 is not set
1129# CONFIG_AB3100_CORE is not set
1086# CONFIG_REGULATOR is not set 1130# CONFIG_REGULATOR is not set
1087# CONFIG_MEDIA_SUPPORT is not set 1131# CONFIG_MEDIA_SUPPORT is not set
1088 1132
1089# 1133#
1090# Graphics support 1134# Graphics support
1091# 1135#
1136CONFIG_VGA_ARB=y
1092# CONFIG_DRM is not set 1137# CONFIG_DRM is not set
1093# CONFIG_VGASTATE is not set 1138# CONFIG_VGASTATE is not set
1094# CONFIG_VIDEO_OUTPUT_CONTROL is not set 1139# CONFIG_VIDEO_OUTPUT_CONTROL is not set
@@ -1101,11 +1146,11 @@ CONFIG_SSB_POSSIBLE=y
1101# CONFIG_DISPLAY_SUPPORT is not set 1146# CONFIG_DISPLAY_SUPPORT is not set
1102CONFIG_SOUND=m 1147CONFIG_SOUND=m
1103CONFIG_SOUND_OSS_CORE=y 1148CONFIG_SOUND_OSS_CORE=y
1149CONFIG_SOUND_OSS_CORE_PRECLAIM=y
1104# CONFIG_SND is not set 1150# CONFIG_SND is not set
1105CONFIG_SOUND_PRIME=m 1151CONFIG_SOUND_PRIME=m
1106CONFIG_HID_SUPPORT=y 1152CONFIG_HID_SUPPORT=y
1107CONFIG_HID=y 1153CONFIG_HID=y
1108# CONFIG_HID_DEBUG is not set
1109# CONFIG_HIDRAW is not set 1154# CONFIG_HIDRAW is not set
1110# CONFIG_HID_PID is not set 1155# CONFIG_HID_PID is not set
1111 1156
@@ -1169,6 +1214,7 @@ CONFIG_RTC_DRV_RS5C372=y
1169# CONFIG_RTC_DRV_S35390A is not set 1214# CONFIG_RTC_DRV_S35390A is not set
1170# CONFIG_RTC_DRV_FM3130 is not set 1215# CONFIG_RTC_DRV_FM3130 is not set
1171# CONFIG_RTC_DRV_RX8581 is not set 1216# CONFIG_RTC_DRV_RX8581 is not set
1217# CONFIG_RTC_DRV_RX8025 is not set
1172 1218
1173# 1219#
1174# SPI RTC drivers 1220# SPI RTC drivers
@@ -1221,8 +1267,10 @@ CONFIG_FS_MBCACHE=y
1221# CONFIG_JFS_FS is not set 1267# CONFIG_JFS_FS is not set
1222CONFIG_FS_POSIX_ACL=y 1268CONFIG_FS_POSIX_ACL=y
1223# CONFIG_XFS_FS is not set 1269# CONFIG_XFS_FS is not set
1270# CONFIG_GFS2_FS is not set
1224# CONFIG_OCFS2_FS is not set 1271# CONFIG_OCFS2_FS is not set
1225# CONFIG_BTRFS_FS is not set 1272# CONFIG_BTRFS_FS is not set
1273# CONFIG_NILFS2_FS is not set
1226CONFIG_FILE_LOCKING=y 1274CONFIG_FILE_LOCKING=y
1227CONFIG_FSNOTIFY=y 1275CONFIG_FSNOTIFY=y
1228CONFIG_DNOTIFY=y 1276CONFIG_DNOTIFY=y
@@ -1289,12 +1337,12 @@ CONFIG_MINIX_FS=y
1289# CONFIG_ROMFS_FS is not set 1337# CONFIG_ROMFS_FS is not set
1290# CONFIG_SYSV_FS is not set 1338# CONFIG_SYSV_FS is not set
1291# CONFIG_UFS_FS is not set 1339# CONFIG_UFS_FS is not set
1292# CONFIG_NILFS2_FS is not set
1293CONFIG_NETWORK_FILESYSTEMS=y 1340CONFIG_NETWORK_FILESYSTEMS=y
1294CONFIG_NFS_FS=y 1341CONFIG_NFS_FS=y
1295CONFIG_NFS_V3=y 1342CONFIG_NFS_V3=y
1296# CONFIG_NFS_V3_ACL is not set 1343# CONFIG_NFS_V3_ACL is not set
1297CONFIG_NFS_V4=y 1344CONFIG_NFS_V4=y
1345# CONFIG_NFS_V4_1 is not set
1298CONFIG_ROOT_NFS=y 1346CONFIG_ROOT_NFS=y
1299CONFIG_NFSD=y 1347CONFIG_NFSD=y
1300CONFIG_NFSD_V3=y 1348CONFIG_NFSD_V3=y
@@ -1370,6 +1418,7 @@ CONFIG_ENABLE_WARN_DEPRECATED=y
1370CONFIG_ENABLE_MUST_CHECK=y 1418CONFIG_ENABLE_MUST_CHECK=y
1371CONFIG_FRAME_WARN=1024 1419CONFIG_FRAME_WARN=1024
1372CONFIG_MAGIC_SYSRQ=y 1420CONFIG_MAGIC_SYSRQ=y
1421# CONFIG_STRIP_ASM_SYMS is not set
1373# CONFIG_UNUSED_SYMBOLS is not set 1422# CONFIG_UNUSED_SYMBOLS is not set
1374CONFIG_DEBUG_FS=y 1423CONFIG_DEBUG_FS=y
1375# CONFIG_HEADERS_CHECK is not set 1424# CONFIG_HEADERS_CHECK is not set
@@ -1404,21 +1453,27 @@ CONFIG_DEBUG_INFO=y
1404# CONFIG_DEBUG_LIST is not set 1453# CONFIG_DEBUG_LIST is not set
1405# CONFIG_DEBUG_SG is not set 1454# CONFIG_DEBUG_SG is not set
1406# CONFIG_DEBUG_NOTIFIERS is not set 1455# CONFIG_DEBUG_NOTIFIERS is not set
1456# CONFIG_DEBUG_CREDENTIALS is not set
1407# CONFIG_FRAME_POINTER is not set 1457# CONFIG_FRAME_POINTER is not set
1408# CONFIG_RCU_TORTURE_TEST is not set 1458# CONFIG_RCU_TORTURE_TEST is not set
1409# CONFIG_RCU_CPU_STALL_DETECTOR is not set 1459# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1410# CONFIG_BACKTRACE_SELF_TEST is not set 1460# CONFIG_BACKTRACE_SELF_TEST is not set
1411# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set 1461# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
1462# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
1412# CONFIG_FAULT_INJECTION is not set 1463# CONFIG_FAULT_INJECTION is not set
1413# CONFIG_LATENCYTOP is not set 1464# CONFIG_LATENCYTOP is not set
1414# CONFIG_PAGE_POISONING is not set 1465# CONFIG_PAGE_POISONING is not set
1415CONFIG_NOP_TRACER=y 1466CONFIG_NOP_TRACER=y
1416CONFIG_HAVE_FUNCTION_TRACER=y 1467CONFIG_HAVE_FUNCTION_TRACER=y
1468CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1469CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
1417CONFIG_HAVE_DYNAMIC_FTRACE=y 1470CONFIG_HAVE_DYNAMIC_FTRACE=y
1418CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1471CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1472CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
1419CONFIG_RING_BUFFER=y 1473CONFIG_RING_BUFFER=y
1420CONFIG_EVENT_TRACING=y 1474CONFIG_EVENT_TRACING=y
1421CONFIG_CONTEXT_SWITCH_TRACER=y 1475CONFIG_CONTEXT_SWITCH_TRACER=y
1476CONFIG_RING_BUFFER_ALLOW_SWAP=y
1422CONFIG_TRACING=y 1477CONFIG_TRACING=y
1423CONFIG_TRACING_SUPPORT=y 1478CONFIG_TRACING_SUPPORT=y
1424CONFIG_FTRACE=y 1479CONFIG_FTRACE=y
@@ -1427,6 +1482,7 @@ CONFIG_FTRACE=y
1427# CONFIG_PREEMPT_TRACER is not set 1482# CONFIG_PREEMPT_TRACER is not set
1428# CONFIG_SCHED_TRACER is not set 1483# CONFIG_SCHED_TRACER is not set
1429# CONFIG_ENABLE_DEFAULT_TRACERS is not set 1484# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1485# CONFIG_FTRACE_SYSCALLS is not set
1430# CONFIG_BOOT_TRACER is not set 1486# CONFIG_BOOT_TRACER is not set
1431CONFIG_BRANCH_PROFILE_NONE=y 1487CONFIG_BRANCH_PROFILE_NONE=y
1432# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set 1488# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
@@ -1445,11 +1501,11 @@ CONFIG_HAVE_ARCH_KGDB=y
1445CONFIG_EARLY_SCIF_CONSOLE=y 1501CONFIG_EARLY_SCIF_CONSOLE=y
1446CONFIG_EARLY_SCIF_CONSOLE_PORT=0xffe00000 1502CONFIG_EARLY_SCIF_CONSOLE_PORT=0xffe00000
1447# CONFIG_EARLY_PRINTK is not set 1503# CONFIG_EARLY_PRINTK is not set
1448# CONFIG_DEBUG_BOOTMEM is not set 1504# CONFIG_STACK_DEBUG is not set
1449CONFIG_DEBUG_STACKOVERFLOW=y
1450# CONFIG_DEBUG_STACK_USAGE is not set 1505# CONFIG_DEBUG_STACK_USAGE is not set
1451# CONFIG_4KSTACKS is not set 1506# CONFIG_4KSTACKS is not set
1452CONFIG_DUMP_CODE=y 1507CONFIG_DUMP_CODE=y
1508# CONFIG_DWARF_UNWINDER is not set
1453# CONFIG_SH_NO_BSS_INIT is not set 1509# CONFIG_SH_NO_BSS_INIT is not set
1454 1510
1455# 1511#
@@ -1464,7 +1520,6 @@ CONFIG_CRYPTO=y
1464# 1520#
1465# Crypto core or helper 1521# Crypto core or helper
1466# 1522#
1467# CONFIG_CRYPTO_FIPS is not set
1468CONFIG_CRYPTO_ALGAPI=y 1523CONFIG_CRYPTO_ALGAPI=y
1469CONFIG_CRYPTO_ALGAPI2=y 1524CONFIG_CRYPTO_ALGAPI2=y
1470CONFIG_CRYPTO_AEAD2=y 1525CONFIG_CRYPTO_AEAD2=y
@@ -1506,11 +1561,13 @@ CONFIG_CRYPTO_PCBC=m
1506# 1561#
1507CONFIG_CRYPTO_HMAC=y 1562CONFIG_CRYPTO_HMAC=y
1508# CONFIG_CRYPTO_XCBC is not set 1563# CONFIG_CRYPTO_XCBC is not set
1564# CONFIG_CRYPTO_VMAC is not set
1509 1565
1510# 1566#
1511# Digest 1567# Digest
1512# 1568#
1513# CONFIG_CRYPTO_CRC32C is not set 1569# CONFIG_CRYPTO_CRC32C is not set
1570# CONFIG_CRYPTO_GHASH is not set
1514# CONFIG_CRYPTO_MD4 is not set 1571# CONFIG_CRYPTO_MD4 is not set
1515CONFIG_CRYPTO_MD5=y 1572CONFIG_CRYPTO_MD5=y
1516# CONFIG_CRYPTO_MICHAEL_MIC is not set 1573# CONFIG_CRYPTO_MICHAEL_MIC is not set
@@ -1573,5 +1630,6 @@ CONFIG_CRC32=y
1573CONFIG_HAS_IOMEM=y 1630CONFIG_HAS_IOMEM=y
1574CONFIG_HAS_IOPORT=y 1631CONFIG_HAS_IOPORT=y
1575CONFIG_HAS_DMA=y 1632CONFIG_HAS_DMA=y
1633CONFIG_HAVE_LMB=y
1576CONFIG_NLATTR=y 1634CONFIG_NLATTR=y
1577CONFIG_GENERIC_ATOMIC64=y 1635CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/r7785rp_defconfig b/arch/sh/configs/r7785rp_defconfig
index 8a3dc300db4a..27ff46c13a87 100644
--- a/arch/sh/configs/r7785rp_defconfig
+++ b/arch/sh/configs/r7785rp_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.30 3# Linux kernel version: 2.6.31
4# Thu Jun 18 12:37:20 2009 4# Thu Sep 24 18:29:23 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -14,6 +14,7 @@ CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y 14CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
16CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_IRQ_PER_CPU=y
17CONFIG_GENERIC_GPIO=y 18CONFIG_GENERIC_GPIO=y
18CONFIG_GENERIC_TIME=y 19CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 20CONFIG_GENERIC_CLOCKEVENTS=y
@@ -29,8 +30,10 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
29# CONFIG_ARCH_HAS_ILOG2_U64 is not set 30# CONFIG_ARCH_HAS_ILOG2_U64 is not set
30CONFIG_ARCH_NO_VIRT_TO_BUS=y 31CONFIG_ARCH_NO_VIRT_TO_BUS=y
31CONFIG_ARCH_HAS_DEFAULT_IDLE=y 32CONFIG_ARCH_HAS_DEFAULT_IDLE=y
33CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
32CONFIG_IO_TRAPPED=y 34CONFIG_IO_TRAPPED=y
33CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 35CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
36CONFIG_CONSTRUCTORS=y
34 37
35# 38#
36# General setup 39# General setup
@@ -41,6 +44,12 @@ CONFIG_LOCK_KERNEL=y
41CONFIG_INIT_ENV_ARG_LIMIT=32 44CONFIG_INIT_ENV_ARG_LIMIT=32
42CONFIG_LOCALVERSION="" 45CONFIG_LOCALVERSION=""
43CONFIG_LOCALVERSION_AUTO=y 46CONFIG_LOCALVERSION_AUTO=y
47CONFIG_HAVE_KERNEL_GZIP=y
48CONFIG_HAVE_KERNEL_BZIP2=y
49CONFIG_HAVE_KERNEL_LZMA=y
50CONFIG_KERNEL_GZIP=y
51# CONFIG_KERNEL_BZIP2 is not set
52# CONFIG_KERNEL_LZMA is not set
44CONFIG_SWAP=y 53CONFIG_SWAP=y
45CONFIG_SYSVIPC=y 54CONFIG_SYSVIPC=y
46CONFIG_SYSVIPC_SYSCTL=y 55CONFIG_SYSVIPC_SYSCTL=y
@@ -56,12 +65,12 @@ CONFIG_AUDIT_TREE=y
56# 65#
57# RCU Subsystem 66# RCU Subsystem
58# 67#
59# CONFIG_CLASSIC_RCU is not set 68CONFIG_TREE_RCU=y
60# CONFIG_TREE_RCU is not set 69# CONFIG_TREE_PREEMPT_RCU is not set
61CONFIG_PREEMPT_RCU=y
62CONFIG_RCU_TRACE=y 70CONFIG_RCU_TRACE=y
63# CONFIG_TREE_RCU_TRACE is not set 71CONFIG_RCU_FANOUT=32
64CONFIG_PREEMPT_RCU_TRACE=y 72# CONFIG_RCU_FANOUT_EXACT is not set
73CONFIG_TREE_RCU_TRACE=y
65CONFIG_IKCONFIG=y 74CONFIG_IKCONFIG=y
66CONFIG_IKCONFIG_PROC=y 75CONFIG_IKCONFIG_PROC=y
67CONFIG_LOG_BUF_SHIFT=14 76CONFIG_LOG_BUF_SHIFT=14
@@ -93,20 +102,22 @@ CONFIG_TIMERFD=y
93CONFIG_EVENTFD=y 102CONFIG_EVENTFD=y
94CONFIG_SHMEM=y 103CONFIG_SHMEM=y
95CONFIG_AIO=y 104CONFIG_AIO=y
105CONFIG_HAVE_PERF_EVENTS=y
96 106
97# 107#
98# Performance Counters 108# Kernel Performance Events And Counters
99# 109#
110CONFIG_PERF_EVENTS=y
111CONFIG_EVENT_PROFILE=y
112# CONFIG_PERF_COUNTERS is not set
100CONFIG_VM_EVENT_COUNTERS=y 113CONFIG_VM_EVENT_COUNTERS=y
101CONFIG_PCI_QUIRKS=y 114CONFIG_PCI_QUIRKS=y
102# CONFIG_STRIP_ASM_SYMS is not set
103CONFIG_COMPAT_BRK=y 115CONFIG_COMPAT_BRK=y
104CONFIG_SLAB=y 116CONFIG_SLAB=y
105# CONFIG_SLUB is not set 117# CONFIG_SLUB is not set
106# CONFIG_SLOB is not set 118# CONFIG_SLOB is not set
107CONFIG_PROFILING=y 119CONFIG_PROFILING=y
108CONFIG_TRACEPOINTS=y 120CONFIG_TRACEPOINTS=y
109CONFIG_MARKERS=y
110CONFIG_OPROFILE=y 121CONFIG_OPROFILE=y
111CONFIG_HAVE_OPROFILE=y 122CONFIG_HAVE_OPROFILE=y
112CONFIG_KPROBES=y 123CONFIG_KPROBES=y
@@ -117,6 +128,11 @@ CONFIG_HAVE_KRETPROBES=y
117CONFIG_HAVE_ARCH_TRACEHOOK=y 128CONFIG_HAVE_ARCH_TRACEHOOK=y
118CONFIG_HAVE_CLK=y 129CONFIG_HAVE_CLK=y
119CONFIG_HAVE_DMA_API_DEBUG=y 130CONFIG_HAVE_DMA_API_DEBUG=y
131
132#
133# GCOV-based kernel profiling
134#
135# CONFIG_GCOV_KERNEL is not set
120# CONFIG_SLOW_WORK is not set 136# CONFIG_SLOW_WORK is not set
121CONFIG_HAVE_GENERIC_DMA_COHERENT=y 137CONFIG_HAVE_GENERIC_DMA_COHERENT=y
122CONFIG_SLABINFO=y 138CONFIG_SLABINFO=y
@@ -129,7 +145,7 @@ CONFIG_MODULE_UNLOAD=y
129# CONFIG_MODVERSIONS is not set 145# CONFIG_MODVERSIONS is not set
130# CONFIG_MODULE_SRCVERSION_ALL is not set 146# CONFIG_MODULE_SRCVERSION_ALL is not set
131CONFIG_BLOCK=y 147CONFIG_BLOCK=y
132# CONFIG_LBD is not set 148CONFIG_LBDAF=y
133# CONFIG_BLK_DEV_BSG is not set 149# CONFIG_BLK_DEV_BSG is not set
134# CONFIG_BLK_DEV_INTEGRITY is not set 150# CONFIG_BLK_DEV_INTEGRITY is not set
135 151
@@ -178,6 +194,7 @@ CONFIG_CPU_SHX2=y
178# CONFIG_CPU_SUBTYPE_SH4_202 is not set 194# CONFIG_CPU_SUBTYPE_SH4_202 is not set
179# CONFIG_CPU_SUBTYPE_SH7723 is not set 195# CONFIG_CPU_SUBTYPE_SH7723 is not set
180# CONFIG_CPU_SUBTYPE_SH7724 is not set 196# CONFIG_CPU_SUBTYPE_SH7724 is not set
197# CONFIG_CPU_SUBTYPE_SH7757 is not set
181# CONFIG_CPU_SUBTYPE_SH7763 is not set 198# CONFIG_CPU_SUBTYPE_SH7763 is not set
182# CONFIG_CPU_SUBTYPE_SH7770 is not set 199# CONFIG_CPU_SUBTYPE_SH7770 is not set
183# CONFIG_CPU_SUBTYPE_SH7780 is not set 200# CONFIG_CPU_SUBTYPE_SH7780 is not set
@@ -231,7 +248,6 @@ CONFIG_SPARSEMEM=y
231CONFIG_HAVE_MEMORY_PRESENT=y 248CONFIG_HAVE_MEMORY_PRESENT=y
232CONFIG_SPARSEMEM_STATIC=y 249CONFIG_SPARSEMEM_STATIC=y
233# CONFIG_MEMORY_HOTPLUG is not set 250# CONFIG_MEMORY_HOTPLUG is not set
234CONFIG_PAGEFLAGS_EXTENDED=y
235CONFIG_SPLIT_PTLOCK_CPUS=4 251CONFIG_SPLIT_PTLOCK_CPUS=4
236CONFIG_MIGRATION=y 252CONFIG_MIGRATION=y
237# CONFIG_PHYS_ADDR_T_64BIT is not set 253# CONFIG_PHYS_ADDR_T_64BIT is not set
@@ -239,6 +255,7 @@ CONFIG_ZONE_DMA_FLAG=0
239CONFIG_NR_QUICK=2 255CONFIG_NR_QUICK=2
240CONFIG_HAVE_MLOCK=y 256CONFIG_HAVE_MLOCK=y
241CONFIG_HAVE_MLOCKED_PAGE_BIT=y 257CONFIG_HAVE_MLOCKED_PAGE_BIT=y
258# CONFIG_KSM is not set
242CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 259CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
243 260
244# 261#
@@ -338,7 +355,8 @@ CONFIG_GUSA=y
338CONFIG_ZERO_PAGE_OFFSET=0x00001000 355CONFIG_ZERO_PAGE_OFFSET=0x00001000
339CONFIG_BOOT_LINK_OFFSET=0x00800000 356CONFIG_BOOT_LINK_OFFSET=0x00800000
340CONFIG_ENTRY_OFFSET=0x00001000 357CONFIG_ENTRY_OFFSET=0x00001000
341CONFIG_CMDLINE_BOOL=y 358CONFIG_CMDLINE_OVERWRITE=y
359# CONFIG_CMDLINE_EXTEND is not set
342CONFIG_CMDLINE="console=ttySC0,115200 root=/dev/sda1" 360CONFIG_CMDLINE="console=ttySC0,115200 root=/dev/sda1"
343 361
344# 362#
@@ -419,6 +437,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
419# CONFIG_NETFILTER is not set 437# CONFIG_NETFILTER is not set
420# CONFIG_IP_DCCP is not set 438# CONFIG_IP_DCCP is not set
421# CONFIG_IP_SCTP is not set 439# CONFIG_IP_SCTP is not set
440# CONFIG_RDS is not set
422# CONFIG_TIPC is not set 441# CONFIG_TIPC is not set
423# CONFIG_ATM is not set 442# CONFIG_ATM is not set
424CONFIG_STP=m 443CONFIG_STP=m
@@ -452,6 +471,7 @@ CONFIG_LLC=m
452# CONFIG_AF_RXRPC is not set 471# CONFIG_AF_RXRPC is not set
453CONFIG_WIRELESS=y 472CONFIG_WIRELESS=y
454# CONFIG_CFG80211 is not set 473# CONFIG_CFG80211 is not set
474CONFIG_CFG80211_DEFAULT_PS_VALUE=0
455# CONFIG_WIRELESS_OLD_REGULATORY is not set 475# CONFIG_WIRELESS_OLD_REGULATORY is not set
456CONFIG_WIRELESS_EXT=y 476CONFIG_WIRELESS_EXT=y
457CONFIG_WIRELESS_EXT_SYSFS=y 477CONFIG_WIRELESS_EXT_SYSFS=y
@@ -460,7 +480,6 @@ CONFIG_WIRELESS_EXT_SYSFS=y
460# 480#
461# CFG80211 needs to be enabled for MAC80211 481# CFG80211 needs to be enabled for MAC80211
462# 482#
463CONFIG_MAC80211_DEFAULT_PS_VALUE=0
464# CONFIG_WIMAX is not set 483# CONFIG_WIMAX is not set
465# CONFIG_RFKILL is not set 484# CONFIG_RFKILL is not set
466# CONFIG_NET_9P is not set 485# CONFIG_NET_9P is not set
@@ -473,6 +492,7 @@ CONFIG_MAC80211_DEFAULT_PS_VALUE=0
473# Generic Driver Options 492# Generic Driver Options
474# 493#
475CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 494CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
495# CONFIG_DEVTMPFS is not set
476CONFIG_STANDALONE=y 496CONFIG_STANDALONE=y
477CONFIG_PREVENT_FIRMWARE_BUILD=y 497CONFIG_PREVENT_FIRMWARE_BUILD=y
478CONFIG_FW_LOADER=m 498CONFIG_FW_LOADER=m
@@ -591,11 +611,13 @@ CONFIG_SCSI_LOWLEVEL=y
591# CONFIG_SCSI_DC390T is not set 611# CONFIG_SCSI_DC390T is not set
592# CONFIG_SCSI_NSP32 is not set 612# CONFIG_SCSI_NSP32 is not set
593# CONFIG_SCSI_DEBUG is not set 613# CONFIG_SCSI_DEBUG is not set
614# CONFIG_SCSI_PMCRAID is not set
594# CONFIG_SCSI_SRP is not set 615# CONFIG_SCSI_SRP is not set
595# CONFIG_SCSI_DH is not set 616# CONFIG_SCSI_DH is not set
596# CONFIG_SCSI_OSD_INITIATOR is not set 617# CONFIG_SCSI_OSD_INITIATOR is not set
597CONFIG_ATA=y 618CONFIG_ATA=y
598# CONFIG_ATA_NONSTANDARD is not set 619# CONFIG_ATA_NONSTANDARD is not set
620CONFIG_ATA_VERBOSE_ERROR=y
599CONFIG_SATA_PMP=y 621CONFIG_SATA_PMP=y
600# CONFIG_SATA_AHCI is not set 622# CONFIG_SATA_AHCI is not set
601# CONFIG_SATA_SIL24 is not set 623# CONFIG_SATA_SIL24 is not set
@@ -617,6 +639,7 @@ CONFIG_SATA_SIL=y
617# CONFIG_PATA_ALI is not set 639# CONFIG_PATA_ALI is not set
618# CONFIG_PATA_AMD is not set 640# CONFIG_PATA_AMD is not set
619# CONFIG_PATA_ARTOP is not set 641# CONFIG_PATA_ARTOP is not set
642# CONFIG_PATA_ATP867X is not set
620# CONFIG_PATA_ATIIXP is not set 643# CONFIG_PATA_ATIIXP is not set
621# CONFIG_PATA_CMD640_PCI is not set 644# CONFIG_PATA_CMD640_PCI is not set
622# CONFIG_PATA_CMD64X is not set 645# CONFIG_PATA_CMD64X is not set
@@ -644,6 +667,7 @@ CONFIG_SATA_SIL=y
644# CONFIG_PATA_OPTIDMA is not set 667# CONFIG_PATA_OPTIDMA is not set
645# CONFIG_PATA_PDC_OLD is not set 668# CONFIG_PATA_PDC_OLD is not set
646# CONFIG_PATA_RADISYS is not set 669# CONFIG_PATA_RADISYS is not set
670# CONFIG_PATA_RDC is not set
647# CONFIG_PATA_RZ1000 is not set 671# CONFIG_PATA_RZ1000 is not set
648# CONFIG_PATA_SC1200 is not set 672# CONFIG_PATA_SC1200 is not set
649# CONFIG_PATA_SERVERWORKS is not set 673# CONFIG_PATA_SERVERWORKS is not set
@@ -662,7 +686,11 @@ CONFIG_PATA_PLATFORM=y
662# 686#
663 687
664# 688#
665# Enable only one of the two stacks, unless you know what you are doing 689# You can enable one or both FireWire driver stacks.
690#
691
692#
693# See the help texts for more information.
666# 694#
667# CONFIG_FIREWIRE is not set 695# CONFIG_FIREWIRE is not set
668# CONFIG_IEEE1394 is not set 696# CONFIG_IEEE1394 is not set
@@ -721,6 +749,7 @@ CONFIG_R8169=y
721# CONFIG_VIA_VELOCITY is not set 749# CONFIG_VIA_VELOCITY is not set
722# CONFIG_TIGON3 is not set 750# CONFIG_TIGON3 is not set
723# CONFIG_BNX2 is not set 751# CONFIG_BNX2 is not set
752# CONFIG_CNIC is not set
724# CONFIG_QLA3XXX is not set 753# CONFIG_QLA3XXX is not set
725# CONFIG_ATL1 is not set 754# CONFIG_ATL1 is not set
726# CONFIG_ATL1E is not set 755# CONFIG_ATL1E is not set
@@ -746,10 +775,7 @@ CONFIG_CHELSIO_T3_DEPENDS=y
746# CONFIG_SFC is not set 775# CONFIG_SFC is not set
747# CONFIG_BE2NET is not set 776# CONFIG_BE2NET is not set
748# CONFIG_TR is not set 777# CONFIG_TR is not set
749 778CONFIG_WLAN=y
750#
751# Wireless LAN
752#
753# CONFIG_WLAN_PRE80211 is not set 779# CONFIG_WLAN_PRE80211 is not set
754# CONFIG_WLAN_80211 is not set 780# CONFIG_WLAN_80211 is not set
755 781
@@ -790,14 +816,19 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
790# Input Device Drivers 816# Input Device Drivers
791# 817#
792CONFIG_INPUT_KEYBOARD=y 818CONFIG_INPUT_KEYBOARD=y
819# CONFIG_KEYBOARD_ADP5588 is not set
793CONFIG_KEYBOARD_ATKBD=y 820CONFIG_KEYBOARD_ATKBD=y
794# CONFIG_KEYBOARD_SUNKBD is not set 821# CONFIG_QT2160 is not set
795# CONFIG_KEYBOARD_LKKBD is not set 822# CONFIG_KEYBOARD_LKKBD is not set
796# CONFIG_KEYBOARD_XTKBD is not set 823# CONFIG_KEYBOARD_GPIO is not set
824# CONFIG_KEYBOARD_MATRIX is not set
825# CONFIG_KEYBOARD_MAX7359 is not set
797# CONFIG_KEYBOARD_NEWTON is not set 826# CONFIG_KEYBOARD_NEWTON is not set
827# CONFIG_KEYBOARD_OPENCORES is not set
798# CONFIG_KEYBOARD_STOWAWAY is not set 828# CONFIG_KEYBOARD_STOWAWAY is not set
799# CONFIG_KEYBOARD_GPIO is not set 829# CONFIG_KEYBOARD_SUNKBD is not set
800# CONFIG_KEYBOARD_SH_KEYSC is not set 830# CONFIG_KEYBOARD_SH_KEYSC is not set
831# CONFIG_KEYBOARD_XTKBD is not set
801# CONFIG_INPUT_MOUSE is not set 832# CONFIG_INPUT_MOUSE is not set
802# CONFIG_INPUT_JOYSTICK is not set 833# CONFIG_INPUT_JOYSTICK is not set
803# CONFIG_INPUT_TABLET is not set 834# CONFIG_INPUT_TABLET is not set
@@ -851,6 +882,7 @@ CONFIG_HW_RANDOM=y
851CONFIG_DEVPORT=y 882CONFIG_DEVPORT=y
852CONFIG_I2C=y 883CONFIG_I2C=y
853CONFIG_I2C_BOARDINFO=y 884CONFIG_I2C_BOARDINFO=y
885CONFIG_I2C_COMPAT=y
854CONFIG_I2C_CHARDEV=y 886CONFIG_I2C_CHARDEV=y
855CONFIG_I2C_HELPER_AUTO=y 887CONFIG_I2C_HELPER_AUTO=y
856 888
@@ -879,6 +911,7 @@ CONFIG_I2C_HELPER_AUTO=y
879# 911#
880# I2C system bus drivers (mostly embedded / system-on-chip) 912# I2C system bus drivers (mostly embedded / system-on-chip)
881# 913#
914# CONFIG_I2C_DESIGNWARE is not set
882# CONFIG_I2C_GPIO is not set 915# CONFIG_I2C_GPIO is not set
883CONFIG_I2C_HIGHLANDER=y 916CONFIG_I2C_HIGHLANDER=y
884# CONFIG_I2C_OCORES is not set 917# CONFIG_I2C_OCORES is not set
@@ -906,15 +939,17 @@ CONFIG_I2C_HIGHLANDER=y
906# Miscellaneous I2C Chip support 939# Miscellaneous I2C Chip support
907# 940#
908# CONFIG_DS1682 is not set 941# CONFIG_DS1682 is not set
909# CONFIG_SENSORS_PCF8574 is not set
910# CONFIG_PCF8575 is not set
911# CONFIG_SENSORS_PCA9539 is not set
912# CONFIG_SENSORS_TSL2550 is not set 942# CONFIG_SENSORS_TSL2550 is not set
913# CONFIG_I2C_DEBUG_CORE is not set 943# CONFIG_I2C_DEBUG_CORE is not set
914# CONFIG_I2C_DEBUG_ALGO is not set 944# CONFIG_I2C_DEBUG_ALGO is not set
915# CONFIG_I2C_DEBUG_BUS is not set 945# CONFIG_I2C_DEBUG_BUS is not set
916# CONFIG_I2C_DEBUG_CHIP is not set 946# CONFIG_I2C_DEBUG_CHIP is not set
917# CONFIG_SPI is not set 947# CONFIG_SPI is not set
948
949#
950# PPS support
951#
952# CONFIG_PPS is not set
918CONFIG_ARCH_REQUIRE_GPIOLIB=y 953CONFIG_ARCH_REQUIRE_GPIOLIB=y
919CONFIG_GPIOLIB=y 954CONFIG_GPIOLIB=y
920# CONFIG_DEBUG_GPIO is not set 955# CONFIG_DEBUG_GPIO is not set
@@ -935,14 +970,24 @@ CONFIG_GPIOLIB=y
935# PCI GPIO expanders: 970# PCI GPIO expanders:
936# 971#
937# CONFIG_GPIO_BT8XX is not set 972# CONFIG_GPIO_BT8XX is not set
973# CONFIG_GPIO_LANGWELL is not set
938 974
939# 975#
940# SPI GPIO expanders: 976# SPI GPIO expanders:
941# 977#
978
979#
980# AC97 GPIO expanders:
981#
942# CONFIG_W1 is not set 982# CONFIG_W1 is not set
943# CONFIG_POWER_SUPPLY is not set 983# CONFIG_POWER_SUPPLY is not set
944CONFIG_HWMON=y 984CONFIG_HWMON=y
945# CONFIG_HWMON_VID is not set 985# CONFIG_HWMON_VID is not set
986# CONFIG_HWMON_DEBUG_CHIP is not set
987
988#
989# Native drivers
990#
946# CONFIG_SENSORS_AD7414 is not set 991# CONFIG_SENSORS_AD7414 is not set
947# CONFIG_SENSORS_AD7418 is not set 992# CONFIG_SENSORS_AD7418 is not set
948# CONFIG_SENSORS_ADM1021 is not set 993# CONFIG_SENSORS_ADM1021 is not set
@@ -993,6 +1038,7 @@ CONFIG_HWMON=y
993# CONFIG_SENSORS_ADS7828 is not set 1038# CONFIG_SENSORS_ADS7828 is not set
994# CONFIG_SENSORS_THMC50 is not set 1039# CONFIG_SENSORS_THMC50 is not set
995# CONFIG_SENSORS_TMP401 is not set 1040# CONFIG_SENSORS_TMP401 is not set
1041# CONFIG_SENSORS_TMP421 is not set
996# CONFIG_SENSORS_VIA686A is not set 1042# CONFIG_SENSORS_VIA686A is not set
997# CONFIG_SENSORS_VT1211 is not set 1043# CONFIG_SENSORS_VT1211 is not set
998# CONFIG_SENSORS_VT8231 is not set 1044# CONFIG_SENSORS_VT8231 is not set
@@ -1004,9 +1050,7 @@ CONFIG_HWMON=y
1004# CONFIG_SENSORS_W83L786NG is not set 1050# CONFIG_SENSORS_W83L786NG is not set
1005# CONFIG_SENSORS_W83627HF is not set 1051# CONFIG_SENSORS_W83627HF is not set
1006# CONFIG_SENSORS_W83627EHF is not set 1052# CONFIG_SENSORS_W83627EHF is not set
1007# CONFIG_HWMON_DEBUG_CHIP is not set
1008# CONFIG_THERMAL is not set 1053# CONFIG_THERMAL is not set
1009# CONFIG_THERMAL_HWMON is not set
1010# CONFIG_WATCHDOG is not set 1054# CONFIG_WATCHDOG is not set
1011CONFIG_SSB_POSSIBLE=y 1055CONFIG_SSB_POSSIBLE=y
1012 1056
@@ -1026,14 +1070,17 @@ CONFIG_SSB_POSSIBLE=y
1026# CONFIG_MFD_TMIO is not set 1070# CONFIG_MFD_TMIO is not set
1027# CONFIG_PMIC_DA903X is not set 1071# CONFIG_PMIC_DA903X is not set
1028# CONFIG_MFD_WM8400 is not set 1072# CONFIG_MFD_WM8400 is not set
1073# CONFIG_MFD_WM831X is not set
1029# CONFIG_MFD_WM8350_I2C is not set 1074# CONFIG_MFD_WM8350_I2C is not set
1030# CONFIG_MFD_PCF50633 is not set 1075# CONFIG_MFD_PCF50633 is not set
1076# CONFIG_AB3100_CORE is not set
1031# CONFIG_REGULATOR is not set 1077# CONFIG_REGULATOR is not set
1032# CONFIG_MEDIA_SUPPORT is not set 1078# CONFIG_MEDIA_SUPPORT is not set
1033 1079
1034# 1080#
1035# Graphics support 1081# Graphics support
1036# 1082#
1083CONFIG_VGA_ARB=y
1037# CONFIG_DRM is not set 1084# CONFIG_DRM is not set
1038# CONFIG_VGASTATE is not set 1085# CONFIG_VGASTATE is not set
1039# CONFIG_VIDEO_OUTPUT_CONTROL is not set 1086# CONFIG_VIDEO_OUTPUT_CONTROL is not set
@@ -1099,11 +1146,11 @@ CONFIG_FB_SH_MOBILE_LCDC=m
1099# CONFIG_LOGO is not set 1146# CONFIG_LOGO is not set
1100CONFIG_SOUND=m 1147CONFIG_SOUND=m
1101CONFIG_SOUND_OSS_CORE=y 1148CONFIG_SOUND_OSS_CORE=y
1149CONFIG_SOUND_OSS_CORE_PRECLAIM=y
1102# CONFIG_SND is not set 1150# CONFIG_SND is not set
1103CONFIG_SOUND_PRIME=m 1151CONFIG_SOUND_PRIME=m
1104CONFIG_HID_SUPPORT=y 1152CONFIG_HID_SUPPORT=y
1105CONFIG_HID=y 1153CONFIG_HID=y
1106# CONFIG_HID_DEBUG is not set
1107# CONFIG_HIDRAW is not set 1154# CONFIG_HIDRAW is not set
1108# CONFIG_HID_PID is not set 1155# CONFIG_HID_PID is not set
1109 1156
@@ -1167,6 +1214,7 @@ CONFIG_RTC_DRV_RS5C372=y
1167# CONFIG_RTC_DRV_S35390A is not set 1214# CONFIG_RTC_DRV_S35390A is not set
1168# CONFIG_RTC_DRV_FM3130 is not set 1215# CONFIG_RTC_DRV_FM3130 is not set
1169# CONFIG_RTC_DRV_RX8581 is not set 1216# CONFIG_RTC_DRV_RX8581 is not set
1217# CONFIG_RTC_DRV_RX8025 is not set
1170 1218
1171# 1219#
1172# SPI RTC drivers 1220# SPI RTC drivers
@@ -1219,8 +1267,10 @@ CONFIG_FS_MBCACHE=y
1219# CONFIG_JFS_FS is not set 1267# CONFIG_JFS_FS is not set
1220CONFIG_FS_POSIX_ACL=y 1268CONFIG_FS_POSIX_ACL=y
1221# CONFIG_XFS_FS is not set 1269# CONFIG_XFS_FS is not set
1270# CONFIG_GFS2_FS is not set
1222# CONFIG_OCFS2_FS is not set 1271# CONFIG_OCFS2_FS is not set
1223# CONFIG_BTRFS_FS is not set 1272# CONFIG_BTRFS_FS is not set
1273# CONFIG_NILFS2_FS is not set
1224CONFIG_FILE_LOCKING=y 1274CONFIG_FILE_LOCKING=y
1225CONFIG_FSNOTIFY=y 1275CONFIG_FSNOTIFY=y
1226CONFIG_DNOTIFY=y 1276CONFIG_DNOTIFY=y
@@ -1286,12 +1336,12 @@ CONFIG_MINIX_FS=y
1286# CONFIG_ROMFS_FS is not set 1336# CONFIG_ROMFS_FS is not set
1287# CONFIG_SYSV_FS is not set 1337# CONFIG_SYSV_FS is not set
1288# CONFIG_UFS_FS is not set 1338# CONFIG_UFS_FS is not set
1289# CONFIG_NILFS2_FS is not set
1290CONFIG_NETWORK_FILESYSTEMS=y 1339CONFIG_NETWORK_FILESYSTEMS=y
1291CONFIG_NFS_FS=y 1340CONFIG_NFS_FS=y
1292CONFIG_NFS_V3=y 1341CONFIG_NFS_V3=y
1293# CONFIG_NFS_V3_ACL is not set 1342# CONFIG_NFS_V3_ACL is not set
1294CONFIG_NFS_V4=y 1343CONFIG_NFS_V4=y
1344# CONFIG_NFS_V4_1 is not set
1295CONFIG_ROOT_NFS=y 1345CONFIG_ROOT_NFS=y
1296CONFIG_NFSD=y 1346CONFIG_NFSD=y
1297CONFIG_NFSD_V3=y 1347CONFIG_NFSD_V3=y
@@ -1367,6 +1417,7 @@ CONFIG_ENABLE_WARN_DEPRECATED=y
1367CONFIG_ENABLE_MUST_CHECK=y 1417CONFIG_ENABLE_MUST_CHECK=y
1368CONFIG_FRAME_WARN=1024 1418CONFIG_FRAME_WARN=1024
1369CONFIG_MAGIC_SYSRQ=y 1419CONFIG_MAGIC_SYSRQ=y
1420# CONFIG_STRIP_ASM_SYMS is not set
1370# CONFIG_UNUSED_SYMBOLS is not set 1421# CONFIG_UNUSED_SYMBOLS is not set
1371CONFIG_DEBUG_FS=y 1422CONFIG_DEBUG_FS=y
1372# CONFIG_HEADERS_CHECK is not set 1423# CONFIG_HEADERS_CHECK is not set
@@ -1401,22 +1452,29 @@ CONFIG_DEBUG_INFO=y
1401# CONFIG_DEBUG_LIST is not set 1452# CONFIG_DEBUG_LIST is not set
1402# CONFIG_DEBUG_SG is not set 1453# CONFIG_DEBUG_SG is not set
1403# CONFIG_DEBUG_NOTIFIERS is not set 1454# CONFIG_DEBUG_NOTIFIERS is not set
1455# CONFIG_DEBUG_CREDENTIALS is not set
1404CONFIG_FRAME_POINTER=y 1456CONFIG_FRAME_POINTER=y
1405# CONFIG_RCU_TORTURE_TEST is not set 1457# CONFIG_RCU_TORTURE_TEST is not set
1458# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1406# CONFIG_KPROBES_SANITY_TEST is not set 1459# CONFIG_KPROBES_SANITY_TEST is not set
1407# CONFIG_BACKTRACE_SELF_TEST is not set 1460# CONFIG_BACKTRACE_SELF_TEST is not set
1408# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set 1461# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
1462# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
1409# CONFIG_LKDTM is not set 1463# CONFIG_LKDTM is not set
1410# CONFIG_FAULT_INJECTION is not set 1464# CONFIG_FAULT_INJECTION is not set
1411# CONFIG_LATENCYTOP is not set 1465# CONFIG_LATENCYTOP is not set
1412# CONFIG_PAGE_POISONING is not set 1466# CONFIG_PAGE_POISONING is not set
1413CONFIG_NOP_TRACER=y 1467CONFIG_NOP_TRACER=y
1414CONFIG_HAVE_FUNCTION_TRACER=y 1468CONFIG_HAVE_FUNCTION_TRACER=y
1469CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1470CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
1415CONFIG_HAVE_DYNAMIC_FTRACE=y 1471CONFIG_HAVE_DYNAMIC_FTRACE=y
1416CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1472CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1473CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
1417CONFIG_RING_BUFFER=y 1474CONFIG_RING_BUFFER=y
1418CONFIG_EVENT_TRACING=y 1475CONFIG_EVENT_TRACING=y
1419CONFIG_CONTEXT_SWITCH_TRACER=y 1476CONFIG_CONTEXT_SWITCH_TRACER=y
1477CONFIG_RING_BUFFER_ALLOW_SWAP=y
1420CONFIG_TRACING=y 1478CONFIG_TRACING=y
1421CONFIG_TRACING_SUPPORT=y 1479CONFIG_TRACING_SUPPORT=y
1422CONFIG_FTRACE=y 1480CONFIG_FTRACE=y
@@ -1425,6 +1483,7 @@ CONFIG_FTRACE=y
1425# CONFIG_PREEMPT_TRACER is not set 1483# CONFIG_PREEMPT_TRACER is not set
1426# CONFIG_SCHED_TRACER is not set 1484# CONFIG_SCHED_TRACER is not set
1427# CONFIG_ENABLE_DEFAULT_TRACERS is not set 1485# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1486# CONFIG_FTRACE_SYSCALLS is not set
1428# CONFIG_BOOT_TRACER is not set 1487# CONFIG_BOOT_TRACER is not set
1429CONFIG_BRANCH_PROFILE_NONE=y 1488CONFIG_BRANCH_PROFILE_NONE=y
1430# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set 1489# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
@@ -1442,11 +1501,11 @@ CONFIG_HAVE_ARCH_KGDB=y
1442CONFIG_SH_STANDARD_BIOS=y 1501CONFIG_SH_STANDARD_BIOS=y
1443# CONFIG_EARLY_SCIF_CONSOLE is not set 1502# CONFIG_EARLY_SCIF_CONSOLE is not set
1444CONFIG_EARLY_PRINTK=y 1503CONFIG_EARLY_PRINTK=y
1445# CONFIG_DEBUG_BOOTMEM is not set 1504# CONFIG_STACK_DEBUG is not set
1446CONFIG_DEBUG_STACKOVERFLOW=y
1447CONFIG_DEBUG_STACK_USAGE=y 1505CONFIG_DEBUG_STACK_USAGE=y
1448CONFIG_4KSTACKS=y 1506CONFIG_4KSTACKS=y
1449CONFIG_DUMP_CODE=y 1507CONFIG_DUMP_CODE=y
1508# CONFIG_DWARF_UNWINDER is not set
1450# CONFIG_SH_NO_BSS_INIT is not set 1509# CONFIG_SH_NO_BSS_INIT is not set
1451 1510
1452# 1511#
@@ -1461,7 +1520,6 @@ CONFIG_CRYPTO=y
1461# 1520#
1462# Crypto core or helper 1521# Crypto core or helper
1463# 1522#
1464# CONFIG_CRYPTO_FIPS is not set
1465CONFIG_CRYPTO_ALGAPI=y 1523CONFIG_CRYPTO_ALGAPI=y
1466CONFIG_CRYPTO_ALGAPI2=y 1524CONFIG_CRYPTO_ALGAPI2=y
1467CONFIG_CRYPTO_AEAD2=y 1525CONFIG_CRYPTO_AEAD2=y
@@ -1503,11 +1561,13 @@ CONFIG_CRYPTO_PCBC=m
1503# 1561#
1504CONFIG_CRYPTO_HMAC=y 1562CONFIG_CRYPTO_HMAC=y
1505# CONFIG_CRYPTO_XCBC is not set 1563# CONFIG_CRYPTO_XCBC is not set
1564# CONFIG_CRYPTO_VMAC is not set
1506 1565
1507# 1566#
1508# Digest 1567# Digest
1509# 1568#
1510# CONFIG_CRYPTO_CRC32C is not set 1569# CONFIG_CRYPTO_CRC32C is not set
1570# CONFIG_CRYPTO_GHASH is not set
1511# CONFIG_CRYPTO_MD4 is not set 1571# CONFIG_CRYPTO_MD4 is not set
1512CONFIG_CRYPTO_MD5=y 1572CONFIG_CRYPTO_MD5=y
1513# CONFIG_CRYPTO_MICHAEL_MIC is not set 1573# CONFIG_CRYPTO_MICHAEL_MIC is not set
@@ -1571,5 +1631,6 @@ CONFIG_AUDIT_GENERIC=y
1571CONFIG_HAS_IOMEM=y 1631CONFIG_HAS_IOMEM=y
1572CONFIG_HAS_IOPORT=y 1632CONFIG_HAS_IOPORT=y
1573CONFIG_HAS_DMA=y 1633CONFIG_HAS_DMA=y
1634CONFIG_HAVE_LMB=y
1574CONFIG_NLATTR=y 1635CONFIG_NLATTR=y
1575CONFIG_GENERIC_ATOMIC64=y 1636CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/rsk7201_defconfig b/arch/sh/configs/rsk7201_defconfig
index 55c3656a75c1..c40db12e9ad7 100644
--- a/arch/sh/configs/rsk7201_defconfig
+++ b/arch/sh/configs/rsk7201_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.30 3# Linux kernel version: 2.6.31
4# Thu Jun 18 12:39:54 2009 4# Thu Sep 24 18:34:29 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -14,6 +14,7 @@ CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y 14CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
16CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_IRQ_PER_CPU=y
17# CONFIG_GENERIC_GPIO is not set 18# CONFIG_GENERIC_GPIO is not set
18CONFIG_GENERIC_TIME=y 19CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 20CONFIG_GENERIC_CLOCKEVENTS=y
@@ -27,7 +28,9 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
27# CONFIG_ARCH_HAS_ILOG2_U64 is not set 28# CONFIG_ARCH_HAS_ILOG2_U64 is not set
28CONFIG_ARCH_NO_VIRT_TO_BUS=y 29CONFIG_ARCH_NO_VIRT_TO_BUS=y
29CONFIG_ARCH_HAS_DEFAULT_IDLE=y 30CONFIG_ARCH_HAS_DEFAULT_IDLE=y
31CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
30CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 32CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
33CONFIG_CONSTRUCTORS=y
31 34
32# 35#
33# General setup 36# General setup
@@ -37,6 +40,12 @@ CONFIG_BROKEN_ON_SMP=y
37CONFIG_INIT_ENV_ARG_LIMIT=32 40CONFIG_INIT_ENV_ARG_LIMIT=32
38CONFIG_LOCALVERSION="" 41CONFIG_LOCALVERSION=""
39# CONFIG_LOCALVERSION_AUTO is not set 42# CONFIG_LOCALVERSION_AUTO is not set
43CONFIG_HAVE_KERNEL_GZIP=y
44CONFIG_HAVE_KERNEL_BZIP2=y
45CONFIG_HAVE_KERNEL_LZMA=y
46CONFIG_KERNEL_GZIP=y
47# CONFIG_KERNEL_BZIP2 is not set
48# CONFIG_KERNEL_LZMA is not set
40CONFIG_SYSVIPC=y 49CONFIG_SYSVIPC=y
41CONFIG_SYSVIPC_SYSCTL=y 50CONFIG_SYSVIPC_SYSCTL=y
42CONFIG_BSD_PROCESS_ACCT=y 51CONFIG_BSD_PROCESS_ACCT=y
@@ -45,11 +54,12 @@ CONFIG_BSD_PROCESS_ACCT=y
45# 54#
46# RCU Subsystem 55# RCU Subsystem
47# 56#
48CONFIG_CLASSIC_RCU=y 57CONFIG_TREE_RCU=y
49# CONFIG_TREE_RCU is not set 58# CONFIG_TREE_PREEMPT_RCU is not set
50# CONFIG_PREEMPT_RCU is not set 59# CONFIG_RCU_TRACE is not set
60CONFIG_RCU_FANOUT=32
61# CONFIG_RCU_FANOUT_EXACT is not set
51# CONFIG_TREE_RCU_TRACE is not set 62# CONFIG_TREE_RCU_TRACE is not set
52# CONFIG_PREEMPT_RCU_TRACE is not set
53CONFIG_IKCONFIG=y 63CONFIG_IKCONFIG=y
54# CONFIG_IKCONFIG_PROC is not set 64# CONFIG_IKCONFIG_PROC is not set
55CONFIG_LOG_BUF_SHIFT=14 65CONFIG_LOG_BUF_SHIFT=14
@@ -86,19 +96,21 @@ CONFIG_SIGNALFD=y
86CONFIG_TIMERFD=y 96CONFIG_TIMERFD=y
87CONFIG_EVENTFD=y 97CONFIG_EVENTFD=y
88# CONFIG_AIO is not set 98# CONFIG_AIO is not set
99CONFIG_HAVE_PERF_EVENTS=y
89 100
90# 101#
91# Performance Counters 102# Kernel Performance Events And Counters
92# 103#
104CONFIG_PERF_EVENTS=y
105CONFIG_EVENT_PROFILE=y
106# CONFIG_PERF_COUNTERS is not set
93CONFIG_VM_EVENT_COUNTERS=y 107CONFIG_VM_EVENT_COUNTERS=y
94# CONFIG_STRIP_ASM_SYMS is not set
95CONFIG_COMPAT_BRK=y 108CONFIG_COMPAT_BRK=y
96# CONFIG_SLAB is not set 109# CONFIG_SLAB is not set
97# CONFIG_SLUB is not set 110# CONFIG_SLUB is not set
98CONFIG_SLOB=y 111CONFIG_SLOB=y
99CONFIG_PROFILING=y 112CONFIG_PROFILING=y
100CONFIG_TRACEPOINTS=y 113CONFIG_TRACEPOINTS=y
101CONFIG_MARKERS=y
102CONFIG_OPROFILE=y 114CONFIG_OPROFILE=y
103CONFIG_HAVE_OPROFILE=y 115CONFIG_HAVE_OPROFILE=y
104# CONFIG_KPROBES is not set 116# CONFIG_KPROBES is not set
@@ -107,6 +119,11 @@ CONFIG_HAVE_KRETPROBES=y
107CONFIG_HAVE_ARCH_TRACEHOOK=y 119CONFIG_HAVE_ARCH_TRACEHOOK=y
108CONFIG_HAVE_CLK=y 120CONFIG_HAVE_CLK=y
109CONFIG_HAVE_DMA_API_DEBUG=y 121CONFIG_HAVE_DMA_API_DEBUG=y
122
123#
124# GCOV-based kernel profiling
125#
126# CONFIG_GCOV_KERNEL is not set
110# CONFIG_SLOW_WORK is not set 127# CONFIG_SLOW_WORK is not set
111CONFIG_HAVE_GENERIC_DMA_COHERENT=y 128CONFIG_HAVE_GENERIC_DMA_COHERENT=y
112CONFIG_RT_MUTEXES=y 129CONFIG_RT_MUTEXES=y
@@ -117,7 +134,7 @@ CONFIG_MODULES=y
117# CONFIG_MODVERSIONS is not set 134# CONFIG_MODVERSIONS is not set
118# CONFIG_MODULE_SRCVERSION_ALL is not set 135# CONFIG_MODULE_SRCVERSION_ALL is not set
119CONFIG_BLOCK=y 136CONFIG_BLOCK=y
120# CONFIG_LBD is not set 137CONFIG_LBDAF=y
121# CONFIG_BLK_DEV_BSG is not set 138# CONFIG_BLK_DEV_BSG is not set
122# CONFIG_BLK_DEV_INTEGRITY is not set 139# CONFIG_BLK_DEV_INTEGRITY is not set
123 140
@@ -165,6 +182,7 @@ CONFIG_CPU_SUBTYPE_SH7201=y
165# CONFIG_CPU_SUBTYPE_SH4_202 is not set 182# CONFIG_CPU_SUBTYPE_SH4_202 is not set
166# CONFIG_CPU_SUBTYPE_SH7723 is not set 183# CONFIG_CPU_SUBTYPE_SH7723 is not set
167# CONFIG_CPU_SUBTYPE_SH7724 is not set 184# CONFIG_CPU_SUBTYPE_SH7724 is not set
185# CONFIG_CPU_SUBTYPE_SH7757 is not set
168# CONFIG_CPU_SUBTYPE_SH7763 is not set 186# CONFIG_CPU_SUBTYPE_SH7763 is not set
169# CONFIG_CPU_SUBTYPE_SH7770 is not set 187# CONFIG_CPU_SUBTYPE_SH7770 is not set
170# CONFIG_CPU_SUBTYPE_SH7780 is not set 188# CONFIG_CPU_SUBTYPE_SH7780 is not set
@@ -285,7 +303,8 @@ CONFIG_GUSA=y
285CONFIG_ZERO_PAGE_OFFSET=0x00001000 303CONFIG_ZERO_PAGE_OFFSET=0x00001000
286CONFIG_BOOT_LINK_OFFSET=0x00800000 304CONFIG_BOOT_LINK_OFFSET=0x00800000
287CONFIG_ENTRY_OFFSET=0x00001000 305CONFIG_ENTRY_OFFSET=0x00001000
288CONFIG_CMDLINE_BOOL=y 306CONFIG_CMDLINE_OVERWRITE=y
307# CONFIG_CMDLINE_EXTEND is not set
289CONFIG_CMDLINE="console=ttySC0,115200 earlyprintk=serial ignore_loglevel" 308CONFIG_CMDLINE="console=ttySC0,115200 earlyprintk=serial ignore_loglevel"
290 309
291# 310#
@@ -309,6 +328,7 @@ CONFIG_BINFMT_SHARED_FLAT=y
309# 328#
310CONFIG_PM=y 329CONFIG_PM=y
311# CONFIG_PM_DEBUG is not set 330# CONFIG_PM_DEBUG is not set
331# CONFIG_PM_RUNTIME is not set
312CONFIG_CPU_IDLE=y 332CONFIG_CPU_IDLE=y
313CONFIG_CPU_IDLE_GOV_LADDER=y 333CONFIG_CPU_IDLE_GOV_LADDER=y
314# CONFIG_NET is not set 334# CONFIG_NET is not set
@@ -327,9 +347,9 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
327# CONFIG_SYS_HYPERVISOR is not set 347# CONFIG_SYS_HYPERVISOR is not set
328CONFIG_MTD=y 348CONFIG_MTD=y
329# CONFIG_MTD_DEBUG is not set 349# CONFIG_MTD_DEBUG is not set
350# CONFIG_MTD_TESTS is not set
330CONFIG_MTD_CONCAT=y 351CONFIG_MTD_CONCAT=y
331CONFIG_MTD_PARTITIONS=y 352CONFIG_MTD_PARTITIONS=y
332# CONFIG_MTD_TESTS is not set
333CONFIG_MTD_REDBOOT_PARTS=y 353CONFIG_MTD_REDBOOT_PARTS=y
334CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 354CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
335# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set 355# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
@@ -498,6 +518,11 @@ CONFIG_SERIAL_CORE_CONSOLE=y
498# CONFIG_TCG_TPM is not set 518# CONFIG_TCG_TPM is not set
499# CONFIG_I2C is not set 519# CONFIG_I2C is not set
500# CONFIG_SPI is not set 520# CONFIG_SPI is not set
521
522#
523# PPS support
524#
525# CONFIG_PPS is not set
501# CONFIG_W1 is not set 526# CONFIG_W1 is not set
502# CONFIG_POWER_SUPPLY is not set 527# CONFIG_POWER_SUPPLY is not set
503# CONFIG_HWMON is not set 528# CONFIG_HWMON is not set
@@ -597,7 +622,9 @@ CONFIG_EXT2_FS=y
597# CONFIG_JFS_FS is not set 622# CONFIG_JFS_FS is not set
598# CONFIG_FS_POSIX_ACL is not set 623# CONFIG_FS_POSIX_ACL is not set
599# CONFIG_XFS_FS is not set 624# CONFIG_XFS_FS is not set
625# CONFIG_GFS2_FS is not set
600# CONFIG_BTRFS_FS is not set 626# CONFIG_BTRFS_FS is not set
627# CONFIG_NILFS2_FS is not set
601# CONFIG_FILE_LOCKING is not set 628# CONFIG_FILE_LOCKING is not set
602CONFIG_FSNOTIFY=y 629CONFIG_FSNOTIFY=y
603# CONFIG_DNOTIFY is not set 630# CONFIG_DNOTIFY is not set
@@ -632,7 +659,6 @@ CONFIG_INOTIFY_USER=y
632CONFIG_PROC_FS=y 659CONFIG_PROC_FS=y
633CONFIG_PROC_SYSCTL=y 660CONFIG_PROC_SYSCTL=y
634CONFIG_SYSFS=y 661CONFIG_SYSFS=y
635# CONFIG_TMPFS is not set
636# CONFIG_HUGETLB_PAGE is not set 662# CONFIG_HUGETLB_PAGE is not set
637# CONFIG_CONFIGFS_FS is not set 663# CONFIG_CONFIGFS_FS is not set
638CONFIG_MISC_FILESYSTEMS=y 664CONFIG_MISC_FILESYSTEMS=y
@@ -668,7 +694,6 @@ CONFIG_ROMFS_BACKED_BY_BLOCK=y
668CONFIG_ROMFS_ON_BLOCK=y 694CONFIG_ROMFS_ON_BLOCK=y
669# CONFIG_SYSV_FS is not set 695# CONFIG_SYSV_FS is not set
670# CONFIG_UFS_FS is not set 696# CONFIG_UFS_FS is not set
671# CONFIG_NILFS2_FS is not set
672 697
673# 698#
674# Partition Types 699# Partition Types
@@ -686,6 +711,7 @@ CONFIG_ENABLE_WARN_DEPRECATED=y
686# CONFIG_ENABLE_MUST_CHECK is not set 711# CONFIG_ENABLE_MUST_CHECK is not set
687CONFIG_FRAME_WARN=1024 712CONFIG_FRAME_WARN=1024
688CONFIG_MAGIC_SYSRQ=y 713CONFIG_MAGIC_SYSRQ=y
714# CONFIG_STRIP_ASM_SYMS is not set
689# CONFIG_UNUSED_SYMBOLS is not set 715# CONFIG_UNUSED_SYMBOLS is not set
690CONFIG_DEBUG_FS=y 716CONFIG_DEBUG_FS=y
691# CONFIG_HEADERS_CHECK is not set 717# CONFIG_HEADERS_CHECK is not set
@@ -698,11 +724,15 @@ CONFIG_STACKTRACE=y
698CONFIG_SYSCTL_SYSCALL_CHECK=y 724CONFIG_SYSCTL_SYSCALL_CHECK=y
699CONFIG_NOP_TRACER=y 725CONFIG_NOP_TRACER=y
700CONFIG_HAVE_FUNCTION_TRACER=y 726CONFIG_HAVE_FUNCTION_TRACER=y
727CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
728CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
701CONFIG_HAVE_DYNAMIC_FTRACE=y 729CONFIG_HAVE_DYNAMIC_FTRACE=y
702CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 730CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
731CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
703CONFIG_RING_BUFFER=y 732CONFIG_RING_BUFFER=y
704CONFIG_EVENT_TRACING=y 733CONFIG_EVENT_TRACING=y
705CONFIG_CONTEXT_SWITCH_TRACER=y 734CONFIG_CONTEXT_SWITCH_TRACER=y
735CONFIG_RING_BUFFER_ALLOW_SWAP=y
706CONFIG_TRACING=y 736CONFIG_TRACING=y
707CONFIG_TRACING_SUPPORT=y 737CONFIG_TRACING_SUPPORT=y
708# CONFIG_FTRACE is not set 738# CONFIG_FTRACE is not set
@@ -712,6 +742,7 @@ CONFIG_TRACING_SUPPORT=y
712CONFIG_HAVE_ARCH_KGDB=y 742CONFIG_HAVE_ARCH_KGDB=y
713# CONFIG_SH_STANDARD_BIOS is not set 743# CONFIG_SH_STANDARD_BIOS is not set
714# CONFIG_EARLY_SCIF_CONSOLE is not set 744# CONFIG_EARLY_SCIF_CONSOLE is not set
745# CONFIG_DWARF_UNWINDER is not set
715 746
716# 747#
717# Security options 748# Security options
@@ -741,4 +772,5 @@ CONFIG_DECOMPRESS_GZIP=y
741CONFIG_HAS_IOMEM=y 772CONFIG_HAS_IOMEM=y
742CONFIG_HAS_IOPORT=y 773CONFIG_HAS_IOPORT=y
743CONFIG_HAS_DMA=y 774CONFIG_HAS_DMA=y
775CONFIG_HAVE_LMB=y
744CONFIG_GENERIC_ATOMIC64=y 776CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/rsk7203_defconfig b/arch/sh/configs/rsk7203_defconfig
index 69e619967b7b..5cabdb3a84fb 100644
--- a/arch/sh/configs/rsk7203_defconfig
+++ b/arch/sh/configs/rsk7203_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.30 3# Linux kernel version: 2.6.31
4# Thu Jun 18 12:40:44 2009 4# Thu Sep 24 18:35:04 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -14,6 +14,7 @@ CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y 14CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
16CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_IRQ_PER_CPU=y
17CONFIG_GENERIC_GPIO=y 18CONFIG_GENERIC_GPIO=y
18CONFIG_GENERIC_TIME=y 19CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 20CONFIG_GENERIC_CLOCKEVENTS=y
@@ -28,7 +29,9 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
28# CONFIG_ARCH_HAS_ILOG2_U64 is not set 29# CONFIG_ARCH_HAS_ILOG2_U64 is not set
29CONFIG_ARCH_NO_VIRT_TO_BUS=y 30CONFIG_ARCH_NO_VIRT_TO_BUS=y
30CONFIG_ARCH_HAS_DEFAULT_IDLE=y 31CONFIG_ARCH_HAS_DEFAULT_IDLE=y
32CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
31CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 33CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
34CONFIG_CONSTRUCTORS=y
32 35
33# 36#
34# General setup 37# General setup
@@ -38,6 +41,12 @@ CONFIG_BROKEN_ON_SMP=y
38CONFIG_INIT_ENV_ARG_LIMIT=32 41CONFIG_INIT_ENV_ARG_LIMIT=32
39CONFIG_LOCALVERSION="" 42CONFIG_LOCALVERSION=""
40# CONFIG_LOCALVERSION_AUTO is not set 43# CONFIG_LOCALVERSION_AUTO is not set
44CONFIG_HAVE_KERNEL_GZIP=y
45CONFIG_HAVE_KERNEL_BZIP2=y
46CONFIG_HAVE_KERNEL_LZMA=y
47CONFIG_KERNEL_GZIP=y
48# CONFIG_KERNEL_BZIP2 is not set
49# CONFIG_KERNEL_LZMA is not set
41CONFIG_SYSVIPC=y 50CONFIG_SYSVIPC=y
42CONFIG_SYSVIPC_SYSCTL=y 51CONFIG_SYSVIPC_SYSCTL=y
43CONFIG_POSIX_MQUEUE=y 52CONFIG_POSIX_MQUEUE=y
@@ -50,11 +59,12 @@ CONFIG_BSD_PROCESS_ACCT=y
50# 59#
51# RCU Subsystem 60# RCU Subsystem
52# 61#
53CONFIG_CLASSIC_RCU=y 62CONFIG_TREE_RCU=y
54# CONFIG_TREE_RCU is not set 63# CONFIG_TREE_PREEMPT_RCU is not set
55# CONFIG_PREEMPT_RCU is not set 64# CONFIG_RCU_TRACE is not set
65CONFIG_RCU_FANOUT=32
66# CONFIG_RCU_FANOUT_EXACT is not set
56# CONFIG_TREE_RCU_TRACE is not set 67# CONFIG_TREE_RCU_TRACE is not set
57# CONFIG_PREEMPT_RCU_TRACE is not set
58CONFIG_IKCONFIG=y 68CONFIG_IKCONFIG=y
59# CONFIG_IKCONFIG_PROC is not set 69# CONFIG_IKCONFIG_PROC is not set
60CONFIG_LOG_BUF_SHIFT=14 70CONFIG_LOG_BUF_SHIFT=14
@@ -93,19 +103,21 @@ CONFIG_SIGNALFD=y
93CONFIG_TIMERFD=y 103CONFIG_TIMERFD=y
94CONFIG_EVENTFD=y 104CONFIG_EVENTFD=y
95CONFIG_AIO=y 105CONFIG_AIO=y
106CONFIG_HAVE_PERF_EVENTS=y
96 107
97# 108#
98# Performance Counters 109# Kernel Performance Events And Counters
99# 110#
111CONFIG_PERF_EVENTS=y
112CONFIG_EVENT_PROFILE=y
113# CONFIG_PERF_COUNTERS is not set
100CONFIG_VM_EVENT_COUNTERS=y 114CONFIG_VM_EVENT_COUNTERS=y
101# CONFIG_STRIP_ASM_SYMS is not set
102CONFIG_COMPAT_BRK=y 115CONFIG_COMPAT_BRK=y
103# CONFIG_SLAB is not set 116# CONFIG_SLAB is not set
104# CONFIG_SLUB is not set 117# CONFIG_SLUB is not set
105CONFIG_SLOB=y 118CONFIG_SLOB=y
106CONFIG_PROFILING=y 119CONFIG_PROFILING=y
107CONFIG_TRACEPOINTS=y 120CONFIG_TRACEPOINTS=y
108CONFIG_MARKERS=y
109CONFIG_OPROFILE=y 121CONFIG_OPROFILE=y
110CONFIG_HAVE_OPROFILE=y 122CONFIG_HAVE_OPROFILE=y
111# CONFIG_KPROBES is not set 123# CONFIG_KPROBES is not set
@@ -114,6 +126,11 @@ CONFIG_HAVE_KRETPROBES=y
114CONFIG_HAVE_ARCH_TRACEHOOK=y 126CONFIG_HAVE_ARCH_TRACEHOOK=y
115CONFIG_HAVE_CLK=y 127CONFIG_HAVE_CLK=y
116CONFIG_HAVE_DMA_API_DEBUG=y 128CONFIG_HAVE_DMA_API_DEBUG=y
129
130#
131# GCOV-based kernel profiling
132#
133# CONFIG_GCOV_KERNEL is not set
117# CONFIG_SLOW_WORK is not set 134# CONFIG_SLOW_WORK is not set
118CONFIG_HAVE_GENERIC_DMA_COHERENT=y 135CONFIG_HAVE_GENERIC_DMA_COHERENT=y
119CONFIG_RT_MUTEXES=y 136CONFIG_RT_MUTEXES=y
@@ -124,7 +141,7 @@ CONFIG_MODULES=y
124# CONFIG_MODVERSIONS is not set 141# CONFIG_MODVERSIONS is not set
125# CONFIG_MODULE_SRCVERSION_ALL is not set 142# CONFIG_MODULE_SRCVERSION_ALL is not set
126CONFIG_BLOCK=y 143CONFIG_BLOCK=y
127# CONFIG_LBD is not set 144CONFIG_LBDAF=y
128# CONFIG_BLK_DEV_BSG is not set 145# CONFIG_BLK_DEV_BSG is not set
129# CONFIG_BLK_DEV_INTEGRITY is not set 146# CONFIG_BLK_DEV_INTEGRITY is not set
130 147
@@ -172,6 +189,7 @@ CONFIG_CPU_SUBTYPE_SH7203=y
172# CONFIG_CPU_SUBTYPE_SH4_202 is not set 189# CONFIG_CPU_SUBTYPE_SH4_202 is not set
173# CONFIG_CPU_SUBTYPE_SH7723 is not set 190# CONFIG_CPU_SUBTYPE_SH7723 is not set
174# CONFIG_CPU_SUBTYPE_SH7724 is not set 191# CONFIG_CPU_SUBTYPE_SH7724 is not set
192# CONFIG_CPU_SUBTYPE_SH7757 is not set
175# CONFIG_CPU_SUBTYPE_SH7763 is not set 193# CONFIG_CPU_SUBTYPE_SH7763 is not set
176# CONFIG_CPU_SUBTYPE_SH7770 is not set 194# CONFIG_CPU_SUBTYPE_SH7770 is not set
177# CONFIG_CPU_SUBTYPE_SH7780 is not set 195# CONFIG_CPU_SUBTYPE_SH7780 is not set
@@ -308,7 +326,8 @@ CONFIG_GUSA=y
308CONFIG_ZERO_PAGE_OFFSET=0x00001000 326CONFIG_ZERO_PAGE_OFFSET=0x00001000
309CONFIG_BOOT_LINK_OFFSET=0x00800000 327CONFIG_BOOT_LINK_OFFSET=0x00800000
310CONFIG_ENTRY_OFFSET=0x00001000 328CONFIG_ENTRY_OFFSET=0x00001000
311CONFIG_CMDLINE_BOOL=y 329CONFIG_CMDLINE_OVERWRITE=y
330# CONFIG_CMDLINE_EXTEND is not set
312CONFIG_CMDLINE="console=ttySC0,115200 earlyprintk=serial ignore_loglevel" 331CONFIG_CMDLINE="console=ttySC0,115200 earlyprintk=serial ignore_loglevel"
313 332
314# 333#
@@ -332,6 +351,7 @@ CONFIG_BINFMT_SHARED_FLAT=y
332# 351#
333CONFIG_PM=y 352CONFIG_PM=y
334# CONFIG_PM_DEBUG is not set 353# CONFIG_PM_DEBUG is not set
354# CONFIG_PM_RUNTIME is not set
335CONFIG_CPU_IDLE=y 355CONFIG_CPU_IDLE=y
336CONFIG_CPU_IDLE_GOV_LADDER=y 356CONFIG_CPU_IDLE_GOV_LADDER=y
337CONFIG_NET=y 357CONFIG_NET=y
@@ -373,6 +393,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
373# CONFIG_NETFILTER is not set 393# CONFIG_NETFILTER is not set
374# CONFIG_IP_DCCP is not set 394# CONFIG_IP_DCCP is not set
375# CONFIG_IP_SCTP is not set 395# CONFIG_IP_SCTP is not set
396# CONFIG_RDS is not set
376# CONFIG_TIPC is not set 397# CONFIG_TIPC is not set
377# CONFIG_ATM is not set 398# CONFIG_ATM is not set
378# CONFIG_BRIDGE is not set 399# CONFIG_BRIDGE is not set
@@ -403,6 +424,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
403# CONFIG_AF_RXRPC is not set 424# CONFIG_AF_RXRPC is not set
404CONFIG_WIRELESS=y 425CONFIG_WIRELESS=y
405# CONFIG_CFG80211 is not set 426# CONFIG_CFG80211 is not set
427CONFIG_CFG80211_DEFAULT_PS_VALUE=0
406# CONFIG_WIRELESS_OLD_REGULATORY is not set 428# CONFIG_WIRELESS_OLD_REGULATORY is not set
407# CONFIG_WIRELESS_EXT is not set 429# CONFIG_WIRELESS_EXT is not set
408# CONFIG_LIB80211 is not set 430# CONFIG_LIB80211 is not set
@@ -410,7 +432,6 @@ CONFIG_WIRELESS=y
410# 432#
411# CFG80211 needs to be enabled for MAC80211 433# CFG80211 needs to be enabled for MAC80211
412# 434#
413CONFIG_MAC80211_DEFAULT_PS_VALUE=0
414# CONFIG_WIMAX is not set 435# CONFIG_WIMAX is not set
415# CONFIG_RFKILL is not set 436# CONFIG_RFKILL is not set
416# CONFIG_NET_9P is not set 437# CONFIG_NET_9P is not set
@@ -432,9 +453,9 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
432# CONFIG_CONNECTOR is not set 453# CONFIG_CONNECTOR is not set
433CONFIG_MTD=y 454CONFIG_MTD=y
434# CONFIG_MTD_DEBUG is not set 455# CONFIG_MTD_DEBUG is not set
456# CONFIG_MTD_TESTS is not set
435CONFIG_MTD_CONCAT=y 457CONFIG_MTD_CONCAT=y
436CONFIG_MTD_PARTITIONS=y 458CONFIG_MTD_PARTITIONS=y
437# CONFIG_MTD_TESTS is not set
438CONFIG_MTD_REDBOOT_PARTS=y 459CONFIG_MTD_REDBOOT_PARTS=y
439CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 460CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
440# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set 461# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
@@ -591,10 +612,7 @@ CONFIG_SMSC911X=y
591# CONFIG_KS8842 is not set 612# CONFIG_KS8842 is not set
592# CONFIG_NETDEV_1000 is not set 613# CONFIG_NETDEV_1000 is not set
593# CONFIG_NETDEV_10000 is not set 614# CONFIG_NETDEV_10000 is not set
594 615CONFIG_WLAN=y
595#
596# Wireless LAN
597#
598# CONFIG_WLAN_PRE80211 is not set 616# CONFIG_WLAN_PRE80211 is not set
599# CONFIG_WLAN_80211 is not set 617# CONFIG_WLAN_80211 is not set
600 618
@@ -679,6 +697,11 @@ CONFIG_SERIAL_CORE_CONSOLE=y
679# CONFIG_TCG_TPM is not set 697# CONFIG_TCG_TPM is not set
680# CONFIG_I2C is not set 698# CONFIG_I2C is not set
681# CONFIG_SPI is not set 699# CONFIG_SPI is not set
700
701#
702# PPS support
703#
704# CONFIG_PPS is not set
682CONFIG_ARCH_REQUIRE_GPIOLIB=y 705CONFIG_ARCH_REQUIRE_GPIOLIB=y
683CONFIG_GPIOLIB=y 706CONFIG_GPIOLIB=y
684# CONFIG_DEBUG_GPIO is not set 707# CONFIG_DEBUG_GPIO is not set
@@ -699,6 +722,10 @@ CONFIG_GPIOLIB=y
699# 722#
700# SPI GPIO expanders: 723# SPI GPIO expanders:
701# 724#
725
726#
727# AC97 GPIO expanders:
728#
702# CONFIG_W1 is not set 729# CONFIG_W1 is not set
703# CONFIG_POWER_SUPPLY is not set 730# CONFIG_POWER_SUPPLY is not set
704# CONFIG_HWMON is not set 731# CONFIG_HWMON is not set
@@ -741,7 +768,6 @@ CONFIG_VIDEO_OUTPUT_CONTROL=y
741# CONFIG_SOUND is not set 768# CONFIG_SOUND is not set
742CONFIG_HID_SUPPORT=y 769CONFIG_HID_SUPPORT=y
743CONFIG_HID=y 770CONFIG_HID=y
744# CONFIG_HID_DEBUG is not set
745# CONFIG_HIDRAW is not set 771# CONFIG_HIDRAW is not set
746 772
747# 773#
@@ -764,6 +790,7 @@ CONFIG_HID_CYPRESS=y
764CONFIG_HID_EZKEY=y 790CONFIG_HID_EZKEY=y
765# CONFIG_HID_KYE is not set 791# CONFIG_HID_KYE is not set
766CONFIG_HID_GYRATION=y 792CONFIG_HID_GYRATION=y
793# CONFIG_HID_TWINHAN is not set
767# CONFIG_HID_KENSINGTON is not set 794# CONFIG_HID_KENSINGTON is not set
768CONFIG_HID_LOGITECH=y 795CONFIG_HID_LOGITECH=y
769# CONFIG_LOGITECH_FF is not set 796# CONFIG_LOGITECH_FF is not set
@@ -811,6 +838,7 @@ CONFIG_USB_MON=y
811# CONFIG_USB_OXU210HP_HCD is not set 838# CONFIG_USB_OXU210HP_HCD is not set
812# CONFIG_USB_ISP116X_HCD is not set 839# CONFIG_USB_ISP116X_HCD is not set
813# CONFIG_USB_ISP1760_HCD is not set 840# CONFIG_USB_ISP1760_HCD is not set
841# CONFIG_USB_ISP1362_HCD is not set
814# CONFIG_USB_SL811_HCD is not set 842# CONFIG_USB_SL811_HCD is not set
815CONFIG_USB_R8A66597_HCD=y 843CONFIG_USB_R8A66597_HCD=y
816# CONFIG_USB_HWA_HCD is not set 844# CONFIG_USB_HWA_HCD is not set
@@ -954,8 +982,10 @@ CONFIG_RTC_DRV_SH=y
954# CONFIG_JFS_FS is not set 982# CONFIG_JFS_FS is not set
955# CONFIG_FS_POSIX_ACL is not set 983# CONFIG_FS_POSIX_ACL is not set
956# CONFIG_XFS_FS is not set 984# CONFIG_XFS_FS is not set
985# CONFIG_GFS2_FS is not set
957# CONFIG_OCFS2_FS is not set 986# CONFIG_OCFS2_FS is not set
958# CONFIG_BTRFS_FS is not set 987# CONFIG_BTRFS_FS is not set
988# CONFIG_NILFS2_FS is not set
959CONFIG_FILE_LOCKING=y 989CONFIG_FILE_LOCKING=y
960CONFIG_FSNOTIFY=y 990CONFIG_FSNOTIFY=y
961# CONFIG_DNOTIFY is not set 991# CONFIG_DNOTIFY is not set
@@ -990,7 +1020,6 @@ CONFIG_INOTIFY_USER=y
990CONFIG_PROC_FS=y 1020CONFIG_PROC_FS=y
991CONFIG_PROC_SYSCTL=y 1021CONFIG_PROC_SYSCTL=y
992CONFIG_SYSFS=y 1022CONFIG_SYSFS=y
993# CONFIG_TMPFS is not set
994# CONFIG_HUGETLB_PAGE is not set 1023# CONFIG_HUGETLB_PAGE is not set
995# CONFIG_CONFIGFS_FS is not set 1024# CONFIG_CONFIGFS_FS is not set
996CONFIG_MISC_FILESYSTEMS=y 1025CONFIG_MISC_FILESYSTEMS=y
@@ -1016,7 +1045,6 @@ CONFIG_ROMFS_BACKED_BY_BLOCK=y
1016CONFIG_ROMFS_ON_BLOCK=y 1045CONFIG_ROMFS_ON_BLOCK=y
1017# CONFIG_SYSV_FS is not set 1046# CONFIG_SYSV_FS is not set
1018# CONFIG_UFS_FS is not set 1047# CONFIG_UFS_FS is not set
1019# CONFIG_NILFS2_FS is not set
1020CONFIG_NETWORK_FILESYSTEMS=y 1048CONFIG_NETWORK_FILESYSTEMS=y
1021CONFIG_NFS_FS=y 1049CONFIG_NFS_FS=y
1022# CONFIG_NFS_V3 is not set 1050# CONFIG_NFS_V3 is not set
@@ -1090,6 +1118,7 @@ CONFIG_ENABLE_WARN_DEPRECATED=y
1090# CONFIG_ENABLE_MUST_CHECK is not set 1118# CONFIG_ENABLE_MUST_CHECK is not set
1091CONFIG_FRAME_WARN=1024 1119CONFIG_FRAME_WARN=1024
1092CONFIG_MAGIC_SYSRQ=y 1120CONFIG_MAGIC_SYSRQ=y
1121# CONFIG_STRIP_ASM_SYMS is not set
1093# CONFIG_UNUSED_SYMBOLS is not set 1122# CONFIG_UNUSED_SYMBOLS is not set
1094CONFIG_DEBUG_FS=y 1123CONFIG_DEBUG_FS=y
1095# CONFIG_HEADERS_CHECK is not set 1124# CONFIG_HEADERS_CHECK is not set
@@ -1129,22 +1158,28 @@ CONFIG_DEBUG_WRITECOUNT=y
1129CONFIG_DEBUG_LIST=y 1158CONFIG_DEBUG_LIST=y
1130CONFIG_DEBUG_SG=y 1159CONFIG_DEBUG_SG=y
1131# CONFIG_DEBUG_NOTIFIERS is not set 1160# CONFIG_DEBUG_NOTIFIERS is not set
1161# CONFIG_DEBUG_CREDENTIALS is not set
1132CONFIG_FRAME_POINTER=y 1162CONFIG_FRAME_POINTER=y
1133# CONFIG_RCU_TORTURE_TEST is not set 1163# CONFIG_RCU_TORTURE_TEST is not set
1134# CONFIG_RCU_CPU_STALL_DETECTOR is not set 1164# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1135# CONFIG_BACKTRACE_SELF_TEST is not set 1165# CONFIG_BACKTRACE_SELF_TEST is not set
1136# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set 1166# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
1167# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
1137# CONFIG_FAULT_INJECTION is not set 1168# CONFIG_FAULT_INJECTION is not set
1138# CONFIG_LATENCYTOP is not set 1169# CONFIG_LATENCYTOP is not set
1139CONFIG_SYSCTL_SYSCALL_CHECK=y 1170CONFIG_SYSCTL_SYSCALL_CHECK=y
1140# CONFIG_PAGE_POISONING is not set 1171# CONFIG_PAGE_POISONING is not set
1141CONFIG_NOP_TRACER=y 1172CONFIG_NOP_TRACER=y
1142CONFIG_HAVE_FUNCTION_TRACER=y 1173CONFIG_HAVE_FUNCTION_TRACER=y
1174CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1175CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
1143CONFIG_HAVE_DYNAMIC_FTRACE=y 1176CONFIG_HAVE_DYNAMIC_FTRACE=y
1144CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1177CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1178CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
1145CONFIG_RING_BUFFER=y 1179CONFIG_RING_BUFFER=y
1146CONFIG_EVENT_TRACING=y 1180CONFIG_EVENT_TRACING=y
1147CONFIG_CONTEXT_SWITCH_TRACER=y 1181CONFIG_CONTEXT_SWITCH_TRACER=y
1182CONFIG_RING_BUFFER_ALLOW_SWAP=y
1148CONFIG_TRACING=y 1183CONFIG_TRACING=y
1149CONFIG_TRACING_SUPPORT=y 1184CONFIG_TRACING_SUPPORT=y
1150CONFIG_FTRACE=y 1185CONFIG_FTRACE=y
@@ -1152,6 +1187,7 @@ CONFIG_FTRACE=y
1152# CONFIG_IRQSOFF_TRACER is not set 1187# CONFIG_IRQSOFF_TRACER is not set
1153# CONFIG_SCHED_TRACER is not set 1188# CONFIG_SCHED_TRACER is not set
1154# CONFIG_ENABLE_DEFAULT_TRACERS is not set 1189# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1190# CONFIG_FTRACE_SYSCALLS is not set
1155# CONFIG_BOOT_TRACER is not set 1191# CONFIG_BOOT_TRACER is not set
1156CONFIG_BRANCH_PROFILE_NONE=y 1192CONFIG_BRANCH_PROFILE_NONE=y
1157# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set 1193# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
@@ -1170,10 +1206,10 @@ CONFIG_HAVE_ARCH_KGDB=y
1170CONFIG_EARLY_SCIF_CONSOLE=y 1206CONFIG_EARLY_SCIF_CONSOLE=y
1171CONFIG_EARLY_SCIF_CONSOLE_PORT=0xfffe8000 1207CONFIG_EARLY_SCIF_CONSOLE_PORT=0xfffe8000
1172CONFIG_EARLY_PRINTK=y 1208CONFIG_EARLY_PRINTK=y
1173CONFIG_DEBUG_BOOTMEM=y 1209# CONFIG_STACK_DEBUG is not set
1174CONFIG_DEBUG_STACKOVERFLOW=y
1175CONFIG_DEBUG_STACK_USAGE=y 1210CONFIG_DEBUG_STACK_USAGE=y
1176CONFIG_DUMP_CODE=y 1211CONFIG_DUMP_CODE=y
1212# CONFIG_DWARF_UNWINDER is not set
1177# CONFIG_SH_NO_BSS_INIT is not set 1213# CONFIG_SH_NO_BSS_INIT is not set
1178 1214
1179# 1215#
@@ -1203,5 +1239,6 @@ CONFIG_DECOMPRESS_GZIP=y
1203CONFIG_HAS_IOMEM=y 1239CONFIG_HAS_IOMEM=y
1204CONFIG_HAS_IOPORT=y 1240CONFIG_HAS_IOPORT=y
1205CONFIG_HAS_DMA=y 1241CONFIG_HAS_DMA=y
1242CONFIG_HAVE_LMB=y
1206CONFIG_NLATTR=y 1243CONFIG_NLATTR=y
1207CONFIG_GENERIC_ATOMIC64=y 1244CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/rts7751r2d1_defconfig b/arch/sh/configs/rts7751r2d1_defconfig
index c6e9b1c0fa3e..f521e82cc19e 100644
--- a/arch/sh/configs/rts7751r2d1_defconfig
+++ b/arch/sh/configs/rts7751r2d1_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.30 3# Linux kernel version: 2.6.31
4# Thu Jun 18 12:42:26 2009 4# Thu Sep 24 18:36:25 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -14,6 +14,7 @@ CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y 14CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
16CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_IRQ_PER_CPU=y
17# CONFIG_GENERIC_GPIO is not set 18# CONFIG_GENERIC_GPIO is not set
18CONFIG_GENERIC_TIME=y 19CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 20CONFIG_GENERIC_CLOCKEVENTS=y
@@ -28,8 +29,10 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
28# CONFIG_ARCH_HAS_ILOG2_U64 is not set 29# CONFIG_ARCH_HAS_ILOG2_U64 is not set
29CONFIG_ARCH_NO_VIRT_TO_BUS=y 30CONFIG_ARCH_NO_VIRT_TO_BUS=y
30CONFIG_ARCH_HAS_DEFAULT_IDLE=y 31CONFIG_ARCH_HAS_DEFAULT_IDLE=y
32CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
31CONFIG_IO_TRAPPED=y 33CONFIG_IO_TRAPPED=y
32CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 34CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
35CONFIG_CONSTRUCTORS=y
33 36
34# 37#
35# General setup 38# General setup
@@ -39,6 +42,12 @@ CONFIG_BROKEN_ON_SMP=y
39CONFIG_INIT_ENV_ARG_LIMIT=32 42CONFIG_INIT_ENV_ARG_LIMIT=32
40CONFIG_LOCALVERSION="" 43CONFIG_LOCALVERSION=""
41CONFIG_LOCALVERSION_AUTO=y 44CONFIG_LOCALVERSION_AUTO=y
45CONFIG_HAVE_KERNEL_GZIP=y
46CONFIG_HAVE_KERNEL_BZIP2=y
47CONFIG_HAVE_KERNEL_LZMA=y
48CONFIG_KERNEL_GZIP=y
49# CONFIG_KERNEL_BZIP2 is not set
50# CONFIG_KERNEL_LZMA is not set
42CONFIG_SWAP=y 51CONFIG_SWAP=y
43CONFIG_SYSVIPC=y 52CONFIG_SYSVIPC=y
44CONFIG_SYSVIPC_SYSCTL=y 53CONFIG_SYSVIPC_SYSCTL=y
@@ -50,11 +59,12 @@ CONFIG_SYSVIPC_SYSCTL=y
50# 59#
51# RCU Subsystem 60# RCU Subsystem
52# 61#
53CONFIG_CLASSIC_RCU=y 62CONFIG_TREE_RCU=y
54# CONFIG_TREE_RCU is not set 63# CONFIG_TREE_PREEMPT_RCU is not set
55# CONFIG_PREEMPT_RCU is not set 64# CONFIG_RCU_TRACE is not set
65CONFIG_RCU_FANOUT=32
66# CONFIG_RCU_FANOUT_EXACT is not set
56# CONFIG_TREE_RCU_TRACE is not set 67# CONFIG_TREE_RCU_TRACE is not set
57# CONFIG_PREEMPT_RCU_TRACE is not set
58# CONFIG_IKCONFIG is not set 68# CONFIG_IKCONFIG is not set
59CONFIG_LOG_BUF_SHIFT=14 69CONFIG_LOG_BUF_SHIFT=14
60# CONFIG_GROUP_SCHED is not set 70# CONFIG_GROUP_SCHED is not set
@@ -84,20 +94,22 @@ CONFIG_TIMERFD=y
84CONFIG_EVENTFD=y 94CONFIG_EVENTFD=y
85CONFIG_SHMEM=y 95CONFIG_SHMEM=y
86CONFIG_AIO=y 96CONFIG_AIO=y
97CONFIG_HAVE_PERF_EVENTS=y
87 98
88# 99#
89# Performance Counters 100# Kernel Performance Events And Counters
90# 101#
102CONFIG_PERF_EVENTS=y
103CONFIG_EVENT_PROFILE=y
104# CONFIG_PERF_COUNTERS is not set
91CONFIG_VM_EVENT_COUNTERS=y 105CONFIG_VM_EVENT_COUNTERS=y
92CONFIG_PCI_QUIRKS=y 106CONFIG_PCI_QUIRKS=y
93# CONFIG_STRIP_ASM_SYMS is not set
94CONFIG_COMPAT_BRK=y 107CONFIG_COMPAT_BRK=y
95CONFIG_SLAB=y 108CONFIG_SLAB=y
96# CONFIG_SLUB is not set 109# CONFIG_SLUB is not set
97# CONFIG_SLOB is not set 110# CONFIG_SLOB is not set
98CONFIG_PROFILING=y 111CONFIG_PROFILING=y
99CONFIG_TRACEPOINTS=y 112CONFIG_TRACEPOINTS=y
100CONFIG_MARKERS=y
101CONFIG_OPROFILE=y 113CONFIG_OPROFILE=y
102CONFIG_HAVE_OPROFILE=y 114CONFIG_HAVE_OPROFILE=y
103# CONFIG_KPROBES is not set 115# CONFIG_KPROBES is not set
@@ -107,6 +119,11 @@ CONFIG_HAVE_KRETPROBES=y
107CONFIG_HAVE_ARCH_TRACEHOOK=y 119CONFIG_HAVE_ARCH_TRACEHOOK=y
108CONFIG_HAVE_CLK=y 120CONFIG_HAVE_CLK=y
109CONFIG_HAVE_DMA_API_DEBUG=y 121CONFIG_HAVE_DMA_API_DEBUG=y
122
123#
124# GCOV-based kernel profiling
125#
126# CONFIG_GCOV_KERNEL is not set
110# CONFIG_SLOW_WORK is not set 127# CONFIG_SLOW_WORK is not set
111CONFIG_HAVE_GENERIC_DMA_COHERENT=y 128CONFIG_HAVE_GENERIC_DMA_COHERENT=y
112CONFIG_SLABINFO=y 129CONFIG_SLABINFO=y
@@ -118,7 +135,7 @@ CONFIG_MODULES=y
118# CONFIG_MODVERSIONS is not set 135# CONFIG_MODVERSIONS is not set
119# CONFIG_MODULE_SRCVERSION_ALL is not set 136# CONFIG_MODULE_SRCVERSION_ALL is not set
120CONFIG_BLOCK=y 137CONFIG_BLOCK=y
121# CONFIG_LBD is not set 138CONFIG_LBDAF=y
122# CONFIG_BLK_DEV_BSG is not set 139# CONFIG_BLK_DEV_BSG is not set
123# CONFIG_BLK_DEV_INTEGRITY is not set 140# CONFIG_BLK_DEV_INTEGRITY is not set
124 141
@@ -165,6 +182,7 @@ CONFIG_CPU_SUBTYPE_SH7751R=y
165# CONFIG_CPU_SUBTYPE_SH4_202 is not set 182# CONFIG_CPU_SUBTYPE_SH4_202 is not set
166# CONFIG_CPU_SUBTYPE_SH7723 is not set 183# CONFIG_CPU_SUBTYPE_SH7723 is not set
167# CONFIG_CPU_SUBTYPE_SH7724 is not set 184# CONFIG_CPU_SUBTYPE_SH7724 is not set
185# CONFIG_CPU_SUBTYPE_SH7757 is not set
168# CONFIG_CPU_SUBTYPE_SH7763 is not set 186# CONFIG_CPU_SUBTYPE_SH7763 is not set
169# CONFIG_CPU_SUBTYPE_SH7770 is not set 187# CONFIG_CPU_SUBTYPE_SH7770 is not set
170# CONFIG_CPU_SUBTYPE_SH7780 is not set 188# CONFIG_CPU_SUBTYPE_SH7780 is not set
@@ -210,6 +228,7 @@ CONFIG_ZONE_DMA_FLAG=0
210CONFIG_NR_QUICK=2 228CONFIG_NR_QUICK=2
211CONFIG_HAVE_MLOCK=y 229CONFIG_HAVE_MLOCK=y
212CONFIG_HAVE_MLOCKED_PAGE_BIT=y 230CONFIG_HAVE_MLOCKED_PAGE_BIT=y
231# CONFIG_KSM is not set
213CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 232CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
214 233
215# 234#
@@ -303,7 +322,8 @@ CONFIG_ZERO_PAGE_OFFSET=0x00010000
303CONFIG_BOOT_LINK_OFFSET=0x00800000 322CONFIG_BOOT_LINK_OFFSET=0x00800000
304CONFIG_ENTRY_OFFSET=0x00001000 323CONFIG_ENTRY_OFFSET=0x00001000
305# CONFIG_UBC_WAKEUP is not set 324# CONFIG_UBC_WAKEUP is not set
306CONFIG_CMDLINE_BOOL=y 325CONFIG_CMDLINE_OVERWRITE=y
326# CONFIG_CMDLINE_EXTEND is not set
307CONFIG_CMDLINE="console=tty0 console=ttySC0,115200 root=/dev/sda1 earlyprintk=serial" 327CONFIG_CMDLINE="console=tty0 console=ttySC0,115200 root=/dev/sda1 earlyprintk=serial"
308 328
309# 329#
@@ -378,6 +398,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
378# CONFIG_NETFILTER is not set 398# CONFIG_NETFILTER is not set
379# CONFIG_IP_DCCP is not set 399# CONFIG_IP_DCCP is not set
380# CONFIG_IP_SCTP is not set 400# CONFIG_IP_SCTP is not set
401# CONFIG_RDS is not set
381# CONFIG_TIPC is not set 402# CONFIG_TIPC is not set
382# CONFIG_ATM is not set 403# CONFIG_ATM is not set
383# CONFIG_BRIDGE is not set 404# CONFIG_BRIDGE is not set
@@ -408,6 +429,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
408# CONFIG_AF_RXRPC is not set 429# CONFIG_AF_RXRPC is not set
409CONFIG_WIRELESS=y 430CONFIG_WIRELESS=y
410# CONFIG_CFG80211 is not set 431# CONFIG_CFG80211 is not set
432CONFIG_CFG80211_DEFAULT_PS_VALUE=0
411# CONFIG_WIRELESS_OLD_REGULATORY is not set 433# CONFIG_WIRELESS_OLD_REGULATORY is not set
412CONFIG_WIRELESS_EXT=y 434CONFIG_WIRELESS_EXT=y
413CONFIG_WIRELESS_EXT_SYSFS=y 435CONFIG_WIRELESS_EXT_SYSFS=y
@@ -416,7 +438,6 @@ CONFIG_WIRELESS_EXT_SYSFS=y
416# 438#
417# CFG80211 needs to be enabled for MAC80211 439# CFG80211 needs to be enabled for MAC80211
418# 440#
419CONFIG_MAC80211_DEFAULT_PS_VALUE=0
420# CONFIG_WIMAX is not set 441# CONFIG_WIMAX is not set
421# CONFIG_RFKILL is not set 442# CONFIG_RFKILL is not set
422# CONFIG_NET_9P is not set 443# CONFIG_NET_9P is not set
@@ -429,6 +450,7 @@ CONFIG_MAC80211_DEFAULT_PS_VALUE=0
429# Generic Driver Options 450# Generic Driver Options
430# 451#
431CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 452CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
453# CONFIG_DEVTMPFS is not set
432CONFIG_STANDALONE=y 454CONFIG_STANDALONE=y
433CONFIG_PREVENT_FIRMWARE_BUILD=y 455CONFIG_PREVENT_FIRMWARE_BUILD=y
434CONFIG_FW_LOADER=m 456CONFIG_FW_LOADER=m
@@ -542,11 +564,13 @@ CONFIG_SCSI_LOWLEVEL=y
542# CONFIG_SCSI_DC390T is not set 564# CONFIG_SCSI_DC390T is not set
543# CONFIG_SCSI_NSP32 is not set 565# CONFIG_SCSI_NSP32 is not set
544# CONFIG_SCSI_DEBUG is not set 566# CONFIG_SCSI_DEBUG is not set
567# CONFIG_SCSI_PMCRAID is not set
545# CONFIG_SCSI_SRP is not set 568# CONFIG_SCSI_SRP is not set
546# CONFIG_SCSI_DH is not set 569# CONFIG_SCSI_DH is not set
547# CONFIG_SCSI_OSD_INITIATOR is not set 570# CONFIG_SCSI_OSD_INITIATOR is not set
548CONFIG_ATA=y 571CONFIG_ATA=y
549# CONFIG_ATA_NONSTANDARD is not set 572# CONFIG_ATA_NONSTANDARD is not set
573CONFIG_ATA_VERBOSE_ERROR=y
550CONFIG_SATA_PMP=y 574CONFIG_SATA_PMP=y
551# CONFIG_SATA_AHCI is not set 575# CONFIG_SATA_AHCI is not set
552# CONFIG_SATA_SIL24 is not set 576# CONFIG_SATA_SIL24 is not set
@@ -568,6 +592,7 @@ CONFIG_ATA_SFF=y
568# CONFIG_PATA_ALI is not set 592# CONFIG_PATA_ALI is not set
569# CONFIG_PATA_AMD is not set 593# CONFIG_PATA_AMD is not set
570# CONFIG_PATA_ARTOP is not set 594# CONFIG_PATA_ARTOP is not set
595# CONFIG_PATA_ATP867X is not set
571# CONFIG_PATA_ATIIXP is not set 596# CONFIG_PATA_ATIIXP is not set
572# CONFIG_PATA_CMD640_PCI is not set 597# CONFIG_PATA_CMD640_PCI is not set
573# CONFIG_PATA_CMD64X is not set 598# CONFIG_PATA_CMD64X is not set
@@ -595,6 +620,7 @@ CONFIG_ATA_SFF=y
595# CONFIG_PATA_OPTIDMA is not set 620# CONFIG_PATA_OPTIDMA is not set
596# CONFIG_PATA_PDC_OLD is not set 621# CONFIG_PATA_PDC_OLD is not set
597# CONFIG_PATA_RADISYS is not set 622# CONFIG_PATA_RADISYS is not set
623# CONFIG_PATA_RDC is not set
598# CONFIG_PATA_RZ1000 is not set 624# CONFIG_PATA_RZ1000 is not set
599# CONFIG_PATA_SC1200 is not set 625# CONFIG_PATA_SC1200 is not set
600# CONFIG_PATA_SERVERWORKS is not set 626# CONFIG_PATA_SERVERWORKS is not set
@@ -613,7 +639,11 @@ CONFIG_PATA_PLATFORM=y
613# 639#
614 640
615# 641#
616# Enable only one of the two stacks, unless you know what you are doing 642# You can enable one or both FireWire driver stacks.
643#
644
645#
646# See the help texts for more information.
617# 647#
618# CONFIG_FIREWIRE is not set 648# CONFIG_FIREWIRE is not set
619# CONFIG_IEEE1394 is not set 649# CONFIG_IEEE1394 is not set
@@ -673,6 +703,7 @@ CONFIG_8139TOO=y
673# CONFIG_SUNDANCE is not set 703# CONFIG_SUNDANCE is not set
674# CONFIG_TLAN is not set 704# CONFIG_TLAN is not set
675# CONFIG_KS8842 is not set 705# CONFIG_KS8842 is not set
706# CONFIG_KS8851 is not set
676# CONFIG_VIA_RHINE is not set 707# CONFIG_VIA_RHINE is not set
677# CONFIG_SC92031 is not set 708# CONFIG_SC92031 is not set
678# CONFIG_ATL2 is not set 709# CONFIG_ATL2 is not set
@@ -694,6 +725,7 @@ CONFIG_NETDEV_1000=y
694# CONFIG_VIA_VELOCITY is not set 725# CONFIG_VIA_VELOCITY is not set
695# CONFIG_TIGON3 is not set 726# CONFIG_TIGON3 is not set
696# CONFIG_BNX2 is not set 727# CONFIG_BNX2 is not set
728# CONFIG_CNIC is not set
697# CONFIG_QLA3XXX is not set 729# CONFIG_QLA3XXX is not set
698# CONFIG_ATL1 is not set 730# CONFIG_ATL1 is not set
699# CONFIG_ATL1E is not set 731# CONFIG_ATL1E is not set
@@ -719,10 +751,7 @@ CONFIG_CHELSIO_T3_DEPENDS=y
719# CONFIG_SFC is not set 751# CONFIG_SFC is not set
720# CONFIG_BE2NET is not set 752# CONFIG_BE2NET is not set
721# CONFIG_TR is not set 753# CONFIG_TR is not set
722 754CONFIG_WLAN=y
723#
724# Wireless LAN
725#
726# CONFIG_WLAN_PRE80211 is not set 755# CONFIG_WLAN_PRE80211 is not set
727# CONFIG_WLAN_80211 is not set 756# CONFIG_WLAN_80211 is not set
728 757
@@ -840,10 +869,20 @@ CONFIG_SPI_SH_SCI=y
840# 869#
841# CONFIG_SPI_SPIDEV is not set 870# CONFIG_SPI_SPIDEV is not set
842# CONFIG_SPI_TLE62X0 is not set 871# CONFIG_SPI_TLE62X0 is not set
872
873#
874# PPS support
875#
876# CONFIG_PPS is not set
843# CONFIG_W1 is not set 877# CONFIG_W1 is not set
844# CONFIG_POWER_SUPPLY is not set 878# CONFIG_POWER_SUPPLY is not set
845CONFIG_HWMON=y 879CONFIG_HWMON=y
846# CONFIG_HWMON_VID is not set 880# CONFIG_HWMON_VID is not set
881# CONFIG_HWMON_DEBUG_CHIP is not set
882
883#
884# Native drivers
885#
847# CONFIG_SENSORS_ADCXX is not set 886# CONFIG_SENSORS_ADCXX is not set
848# CONFIG_SENSORS_I5K_AMB is not set 887# CONFIG_SENSORS_I5K_AMB is not set
849# CONFIG_SENSORS_F71805F is not set 888# CONFIG_SENSORS_F71805F is not set
@@ -862,9 +901,7 @@ CONFIG_HWMON=y
862# CONFIG_SENSORS_W83627HF is not set 901# CONFIG_SENSORS_W83627HF is not set
863# CONFIG_SENSORS_W83627EHF is not set 902# CONFIG_SENSORS_W83627EHF is not set
864# CONFIG_SENSORS_LIS3_SPI is not set 903# CONFIG_SENSORS_LIS3_SPI is not set
865# CONFIG_HWMON_DEBUG_CHIP is not set
866# CONFIG_THERMAL is not set 904# CONFIG_THERMAL is not set
867# CONFIG_THERMAL_HWMON is not set
868# CONFIG_WATCHDOG is not set 905# CONFIG_WATCHDOG is not set
869CONFIG_SSB_POSSIBLE=y 906CONFIG_SSB_POSSIBLE=y
870 907
@@ -880,12 +917,15 @@ CONFIG_SSB_POSSIBLE=y
880CONFIG_MFD_SM501=y 917CONFIG_MFD_SM501=y
881# CONFIG_HTC_PASIC3 is not set 918# CONFIG_HTC_PASIC3 is not set
882# CONFIG_MFD_TMIO is not set 919# CONFIG_MFD_TMIO is not set
920# CONFIG_MFD_MC13783 is not set
921# CONFIG_EZX_PCAP is not set
883# CONFIG_REGULATOR is not set 922# CONFIG_REGULATOR is not set
884# CONFIG_MEDIA_SUPPORT is not set 923# CONFIG_MEDIA_SUPPORT is not set
885 924
886# 925#
887# Graphics support 926# Graphics support
888# 927#
928CONFIG_VGA_ARB=y
889# CONFIG_DRM is not set 929# CONFIG_DRM is not set
890# CONFIG_VGASTATE is not set 930# CONFIG_VGASTATE is not set
891CONFIG_VIDEO_OUTPUT_CONTROL=m 931CONFIG_VIDEO_OUTPUT_CONTROL=m
@@ -969,6 +1009,7 @@ CONFIG_LOGO=y
969CONFIG_LOGO_SUPERH_CLUT224=y 1009CONFIG_LOGO_SUPERH_CLUT224=y
970CONFIG_SOUND=y 1010CONFIG_SOUND=y
971CONFIG_SOUND_OSS_CORE=y 1011CONFIG_SOUND_OSS_CORE=y
1012CONFIG_SOUND_OSS_CORE_PRECLAIM=y
972CONFIG_SND=m 1013CONFIG_SND=m
973CONFIG_SND_TIMER=m 1014CONFIG_SND_TIMER=m
974CONFIG_SND_PCM=m 1015CONFIG_SND_PCM=m
@@ -1071,7 +1112,6 @@ CONFIG_SOUND_PRIME=m
1071CONFIG_AC97_BUS=m 1112CONFIG_AC97_BUS=m
1072CONFIG_HID_SUPPORT=y 1113CONFIG_HID_SUPPORT=y
1073CONFIG_HID=y 1114CONFIG_HID=y
1074# CONFIG_HID_DEBUG is not set
1075# CONFIG_HIDRAW is not set 1115# CONFIG_HIDRAW is not set
1076 1116
1077# 1117#
@@ -1094,6 +1134,7 @@ CONFIG_HID_CYPRESS=y
1094CONFIG_HID_EZKEY=y 1134CONFIG_HID_EZKEY=y
1095# CONFIG_HID_KYE is not set 1135# CONFIG_HID_KYE is not set
1096CONFIG_HID_GYRATION=y 1136CONFIG_HID_GYRATION=y
1137# CONFIG_HID_TWINHAN is not set
1097# CONFIG_HID_KENSINGTON is not set 1138# CONFIG_HID_KENSINGTON is not set
1098CONFIG_HID_LOGITECH=y 1139CONFIG_HID_LOGITECH=y
1099# CONFIG_LOGITECH_FF is not set 1140# CONFIG_LOGITECH_FF is not set
@@ -1142,6 +1183,7 @@ CONFIG_USB_DEVICE_CLASS=y
1142# CONFIG_USB_OXU210HP_HCD is not set 1183# CONFIG_USB_OXU210HP_HCD is not set
1143# CONFIG_USB_ISP116X_HCD is not set 1184# CONFIG_USB_ISP116X_HCD is not set
1144# CONFIG_USB_ISP1760_HCD is not set 1185# CONFIG_USB_ISP1760_HCD is not set
1186# CONFIG_USB_ISP1362_HCD is not set
1145CONFIG_USB_OHCI_HCD=y 1187CONFIG_USB_OHCI_HCD=y
1146# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set 1188# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
1147# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set 1189# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
@@ -1213,6 +1255,7 @@ CONFIG_USB_LIBUSUAL=y
1213# CONFIG_USB_LD is not set 1255# CONFIG_USB_LD is not set
1214# CONFIG_USB_TRANCEVIBRATOR is not set 1256# CONFIG_USB_TRANCEVIBRATOR is not set
1215# CONFIG_USB_IOWARRIOR is not set 1257# CONFIG_USB_IOWARRIOR is not set
1258# CONFIG_USB_TEST is not set
1216# CONFIG_USB_ISIGHTFW is not set 1259# CONFIG_USB_ISIGHTFW is not set
1217# CONFIG_USB_VST is not set 1260# CONFIG_USB_VST is not set
1218# CONFIG_USB_GADGET is not set 1261# CONFIG_USB_GADGET is not set
@@ -1252,6 +1295,7 @@ CONFIG_RTC_INTF_DEV=y
1252CONFIG_RTC_DRV_R9701=y 1295CONFIG_RTC_DRV_R9701=y
1253# CONFIG_RTC_DRV_RS5C348 is not set 1296# CONFIG_RTC_DRV_RS5C348 is not set
1254# CONFIG_RTC_DRV_DS3234 is not set 1297# CONFIG_RTC_DRV_DS3234 is not set
1298# CONFIG_RTC_DRV_PCF2123 is not set
1255 1299
1256# 1300#
1257# Platform RTC drivers 1301# Platform RTC drivers
@@ -1293,8 +1337,10 @@ CONFIG_EXT2_FS=y
1293# CONFIG_JFS_FS is not set 1337# CONFIG_JFS_FS is not set
1294# CONFIG_FS_POSIX_ACL is not set 1338# CONFIG_FS_POSIX_ACL is not set
1295# CONFIG_XFS_FS is not set 1339# CONFIG_XFS_FS is not set
1340# CONFIG_GFS2_FS is not set
1296# CONFIG_OCFS2_FS is not set 1341# CONFIG_OCFS2_FS is not set
1297# CONFIG_BTRFS_FS is not set 1342# CONFIG_BTRFS_FS is not set
1343# CONFIG_NILFS2_FS is not set
1298CONFIG_FILE_LOCKING=y 1344CONFIG_FILE_LOCKING=y
1299CONFIG_FSNOTIFY=y 1345CONFIG_FSNOTIFY=y
1300CONFIG_DNOTIFY=y 1346CONFIG_DNOTIFY=y
@@ -1357,7 +1403,6 @@ CONFIG_MINIX_FS=y
1357# CONFIG_ROMFS_FS is not set 1403# CONFIG_ROMFS_FS is not set
1358# CONFIG_SYSV_FS is not set 1404# CONFIG_SYSV_FS is not set
1359# CONFIG_UFS_FS is not set 1405# CONFIG_UFS_FS is not set
1360# CONFIG_NILFS2_FS is not set
1361CONFIG_NETWORK_FILESYSTEMS=y 1406CONFIG_NETWORK_FILESYSTEMS=y
1362# CONFIG_NFS_FS is not set 1407# CONFIG_NFS_FS is not set
1363# CONFIG_NFSD is not set 1408# CONFIG_NFSD is not set
@@ -1423,6 +1468,7 @@ CONFIG_ENABLE_WARN_DEPRECATED=y
1423CONFIG_ENABLE_MUST_CHECK=y 1468CONFIG_ENABLE_MUST_CHECK=y
1424CONFIG_FRAME_WARN=1024 1469CONFIG_FRAME_WARN=1024
1425# CONFIG_MAGIC_SYSRQ is not set 1470# CONFIG_MAGIC_SYSRQ is not set
1471# CONFIG_STRIP_ASM_SYMS is not set
1426# CONFIG_UNUSED_SYMBOLS is not set 1472# CONFIG_UNUSED_SYMBOLS is not set
1427CONFIG_DEBUG_FS=y 1473CONFIG_DEBUG_FS=y
1428# CONFIG_HEADERS_CHECK is not set 1474# CONFIG_HEADERS_CHECK is not set
@@ -1434,11 +1480,15 @@ CONFIG_STACKTRACE=y
1434# CONFIG_LATENCYTOP is not set 1480# CONFIG_LATENCYTOP is not set
1435CONFIG_NOP_TRACER=y 1481CONFIG_NOP_TRACER=y
1436CONFIG_HAVE_FUNCTION_TRACER=y 1482CONFIG_HAVE_FUNCTION_TRACER=y
1483CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1484CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
1437CONFIG_HAVE_DYNAMIC_FTRACE=y 1485CONFIG_HAVE_DYNAMIC_FTRACE=y
1438CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1486CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1487CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
1439CONFIG_RING_BUFFER=y 1488CONFIG_RING_BUFFER=y
1440CONFIG_EVENT_TRACING=y 1489CONFIG_EVENT_TRACING=y
1441CONFIG_CONTEXT_SWITCH_TRACER=y 1490CONFIG_CONTEXT_SWITCH_TRACER=y
1491CONFIG_RING_BUFFER_ALLOW_SWAP=y
1442CONFIG_TRACING=y 1492CONFIG_TRACING=y
1443CONFIG_TRACING_SUPPORT=y 1493CONFIG_TRACING_SUPPORT=y
1444# CONFIG_FTRACE is not set 1494# CONFIG_FTRACE is not set
@@ -1450,6 +1500,7 @@ CONFIG_HAVE_ARCH_KGDB=y
1450CONFIG_EARLY_SCIF_CONSOLE=y 1500CONFIG_EARLY_SCIF_CONSOLE=y
1451CONFIG_EARLY_SCIF_CONSOLE_PORT=0xffe80000 1501CONFIG_EARLY_SCIF_CONSOLE_PORT=0xffe80000
1452CONFIG_EARLY_PRINTK=y 1502CONFIG_EARLY_PRINTK=y
1503# CONFIG_DWARF_UNWINDER is not set
1453 1504
1454# 1505#
1455# Security options 1506# Security options
@@ -1463,7 +1514,6 @@ CONFIG_CRYPTO=y
1463# 1514#
1464# Crypto core or helper 1515# Crypto core or helper
1465# 1516#
1466# CONFIG_CRYPTO_FIPS is not set
1467# CONFIG_CRYPTO_MANAGER is not set 1517# CONFIG_CRYPTO_MANAGER is not set
1468# CONFIG_CRYPTO_MANAGER2 is not set 1518# CONFIG_CRYPTO_MANAGER2 is not set
1469# CONFIG_CRYPTO_GF128MUL is not set 1519# CONFIG_CRYPTO_GF128MUL is not set
@@ -1495,11 +1545,13 @@ CONFIG_CRYPTO=y
1495# 1545#
1496# CONFIG_CRYPTO_HMAC is not set 1546# CONFIG_CRYPTO_HMAC is not set
1497# CONFIG_CRYPTO_XCBC is not set 1547# CONFIG_CRYPTO_XCBC is not set
1548# CONFIG_CRYPTO_VMAC is not set
1498 1549
1499# 1550#
1500# Digest 1551# Digest
1501# 1552#
1502# CONFIG_CRYPTO_CRC32C is not set 1553# CONFIG_CRYPTO_CRC32C is not set
1554# CONFIG_CRYPTO_GHASH is not set
1503# CONFIG_CRYPTO_MD4 is not set 1555# CONFIG_CRYPTO_MD4 is not set
1504# CONFIG_CRYPTO_MD5 is not set 1556# CONFIG_CRYPTO_MD5 is not set
1505# CONFIG_CRYPTO_MICHAEL_MIC is not set 1557# CONFIG_CRYPTO_MICHAEL_MIC is not set
@@ -1562,5 +1614,6 @@ CONFIG_CRC32=y
1562CONFIG_HAS_IOMEM=y 1614CONFIG_HAS_IOMEM=y
1563CONFIG_HAS_IOPORT=y 1615CONFIG_HAS_IOPORT=y
1564CONFIG_HAS_DMA=y 1616CONFIG_HAS_DMA=y
1617CONFIG_HAVE_LMB=y
1565CONFIG_NLATTR=y 1618CONFIG_NLATTR=y
1566CONFIG_GENERIC_ATOMIC64=y 1619CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/rts7751r2dplus_defconfig b/arch/sh/configs/rts7751r2dplus_defconfig
index bc10469d31f0..a156cd1e0617 100644
--- a/arch/sh/configs/rts7751r2dplus_defconfig
+++ b/arch/sh/configs/rts7751r2dplus_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.30 3# Linux kernel version: 2.6.31
4# Thu Jun 18 12:43:19 2009 4# Thu Sep 24 18:39:48 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -14,6 +14,7 @@ CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y 14CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
16CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_IRQ_PER_CPU=y
17# CONFIG_GENERIC_GPIO is not set 18# CONFIG_GENERIC_GPIO is not set
18CONFIG_GENERIC_TIME=y 19CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 20CONFIG_GENERIC_CLOCKEVENTS=y
@@ -28,8 +29,10 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
28# CONFIG_ARCH_HAS_ILOG2_U64 is not set 29# CONFIG_ARCH_HAS_ILOG2_U64 is not set
29CONFIG_ARCH_NO_VIRT_TO_BUS=y 30CONFIG_ARCH_NO_VIRT_TO_BUS=y
30CONFIG_ARCH_HAS_DEFAULT_IDLE=y 31CONFIG_ARCH_HAS_DEFAULT_IDLE=y
32CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
31CONFIG_IO_TRAPPED=y 33CONFIG_IO_TRAPPED=y
32CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 34CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
35CONFIG_CONSTRUCTORS=y
33 36
34# 37#
35# General setup 38# General setup
@@ -39,6 +42,12 @@ CONFIG_BROKEN_ON_SMP=y
39CONFIG_INIT_ENV_ARG_LIMIT=32 42CONFIG_INIT_ENV_ARG_LIMIT=32
40CONFIG_LOCALVERSION="" 43CONFIG_LOCALVERSION=""
41CONFIG_LOCALVERSION_AUTO=y 44CONFIG_LOCALVERSION_AUTO=y
45CONFIG_HAVE_KERNEL_GZIP=y
46CONFIG_HAVE_KERNEL_BZIP2=y
47CONFIG_HAVE_KERNEL_LZMA=y
48CONFIG_KERNEL_GZIP=y
49# CONFIG_KERNEL_BZIP2 is not set
50# CONFIG_KERNEL_LZMA is not set
42CONFIG_SWAP=y 51CONFIG_SWAP=y
43CONFIG_SYSVIPC=y 52CONFIG_SYSVIPC=y
44CONFIG_SYSVIPC_SYSCTL=y 53CONFIG_SYSVIPC_SYSCTL=y
@@ -50,11 +59,12 @@ CONFIG_SYSVIPC_SYSCTL=y
50# 59#
51# RCU Subsystem 60# RCU Subsystem
52# 61#
53CONFIG_CLASSIC_RCU=y 62CONFIG_TREE_RCU=y
54# CONFIG_TREE_RCU is not set 63# CONFIG_TREE_PREEMPT_RCU is not set
55# CONFIG_PREEMPT_RCU is not set 64# CONFIG_RCU_TRACE is not set
65CONFIG_RCU_FANOUT=32
66# CONFIG_RCU_FANOUT_EXACT is not set
56# CONFIG_TREE_RCU_TRACE is not set 67# CONFIG_TREE_RCU_TRACE is not set
57# CONFIG_PREEMPT_RCU_TRACE is not set
58# CONFIG_IKCONFIG is not set 68# CONFIG_IKCONFIG is not set
59CONFIG_LOG_BUF_SHIFT=14 69CONFIG_LOG_BUF_SHIFT=14
60# CONFIG_GROUP_SCHED is not set 70# CONFIG_GROUP_SCHED is not set
@@ -84,20 +94,22 @@ CONFIG_TIMERFD=y
84CONFIG_EVENTFD=y 94CONFIG_EVENTFD=y
85CONFIG_SHMEM=y 95CONFIG_SHMEM=y
86CONFIG_AIO=y 96CONFIG_AIO=y
97CONFIG_HAVE_PERF_EVENTS=y
87 98
88# 99#
89# Performance Counters 100# Kernel Performance Events And Counters
90# 101#
102CONFIG_PERF_EVENTS=y
103CONFIG_EVENT_PROFILE=y
104# CONFIG_PERF_COUNTERS is not set
91CONFIG_VM_EVENT_COUNTERS=y 105CONFIG_VM_EVENT_COUNTERS=y
92CONFIG_PCI_QUIRKS=y 106CONFIG_PCI_QUIRKS=y
93# CONFIG_STRIP_ASM_SYMS is not set
94CONFIG_COMPAT_BRK=y 107CONFIG_COMPAT_BRK=y
95CONFIG_SLAB=y 108CONFIG_SLAB=y
96# CONFIG_SLUB is not set 109# CONFIG_SLUB is not set
97# CONFIG_SLOB is not set 110# CONFIG_SLOB is not set
98CONFIG_PROFILING=y 111CONFIG_PROFILING=y
99CONFIG_TRACEPOINTS=y 112CONFIG_TRACEPOINTS=y
100CONFIG_MARKERS=y
101CONFIG_OPROFILE=y 113CONFIG_OPROFILE=y
102CONFIG_HAVE_OPROFILE=y 114CONFIG_HAVE_OPROFILE=y
103# CONFIG_KPROBES is not set 115# CONFIG_KPROBES is not set
@@ -107,6 +119,11 @@ CONFIG_HAVE_KRETPROBES=y
107CONFIG_HAVE_ARCH_TRACEHOOK=y 119CONFIG_HAVE_ARCH_TRACEHOOK=y
108CONFIG_HAVE_CLK=y 120CONFIG_HAVE_CLK=y
109CONFIG_HAVE_DMA_API_DEBUG=y 121CONFIG_HAVE_DMA_API_DEBUG=y
122
123#
124# GCOV-based kernel profiling
125#
126# CONFIG_GCOV_KERNEL is not set
110# CONFIG_SLOW_WORK is not set 127# CONFIG_SLOW_WORK is not set
111CONFIG_HAVE_GENERIC_DMA_COHERENT=y 128CONFIG_HAVE_GENERIC_DMA_COHERENT=y
112CONFIG_SLABINFO=y 129CONFIG_SLABINFO=y
@@ -118,7 +135,7 @@ CONFIG_MODULES=y
118# CONFIG_MODVERSIONS is not set 135# CONFIG_MODVERSIONS is not set
119# CONFIG_MODULE_SRCVERSION_ALL is not set 136# CONFIG_MODULE_SRCVERSION_ALL is not set
120CONFIG_BLOCK=y 137CONFIG_BLOCK=y
121# CONFIG_LBD is not set 138CONFIG_LBDAF=y
122# CONFIG_BLK_DEV_BSG is not set 139# CONFIG_BLK_DEV_BSG is not set
123# CONFIG_BLK_DEV_INTEGRITY is not set 140# CONFIG_BLK_DEV_INTEGRITY is not set
124 141
@@ -165,6 +182,7 @@ CONFIG_CPU_SUBTYPE_SH7751R=y
165# CONFIG_CPU_SUBTYPE_SH4_202 is not set 182# CONFIG_CPU_SUBTYPE_SH4_202 is not set
166# CONFIG_CPU_SUBTYPE_SH7723 is not set 183# CONFIG_CPU_SUBTYPE_SH7723 is not set
167# CONFIG_CPU_SUBTYPE_SH7724 is not set 184# CONFIG_CPU_SUBTYPE_SH7724 is not set
185# CONFIG_CPU_SUBTYPE_SH7757 is not set
168# CONFIG_CPU_SUBTYPE_SH7763 is not set 186# CONFIG_CPU_SUBTYPE_SH7763 is not set
169# CONFIG_CPU_SUBTYPE_SH7770 is not set 187# CONFIG_CPU_SUBTYPE_SH7770 is not set
170# CONFIG_CPU_SUBTYPE_SH7780 is not set 188# CONFIG_CPU_SUBTYPE_SH7780 is not set
@@ -210,6 +228,7 @@ CONFIG_ZONE_DMA_FLAG=0
210CONFIG_NR_QUICK=2 228CONFIG_NR_QUICK=2
211CONFIG_HAVE_MLOCK=y 229CONFIG_HAVE_MLOCK=y
212CONFIG_HAVE_MLOCKED_PAGE_BIT=y 230CONFIG_HAVE_MLOCKED_PAGE_BIT=y
231# CONFIG_KSM is not set
213CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 232CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
214 233
215# 234#
@@ -303,7 +322,8 @@ CONFIG_ZERO_PAGE_OFFSET=0x00010000
303CONFIG_BOOT_LINK_OFFSET=0x00800000 322CONFIG_BOOT_LINK_OFFSET=0x00800000
304CONFIG_ENTRY_OFFSET=0x00001000 323CONFIG_ENTRY_OFFSET=0x00001000
305# CONFIG_UBC_WAKEUP is not set 324# CONFIG_UBC_WAKEUP is not set
306CONFIG_CMDLINE_BOOL=y 325CONFIG_CMDLINE_OVERWRITE=y
326# CONFIG_CMDLINE_EXTEND is not set
307CONFIG_CMDLINE="console=tty0 console=ttySC0,115200 root=/dev/sda1 earlyprintk=serial" 327CONFIG_CMDLINE="console=tty0 console=ttySC0,115200 root=/dev/sda1 earlyprintk=serial"
308 328
309# 329#
@@ -378,6 +398,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
378# CONFIG_NETFILTER is not set 398# CONFIG_NETFILTER is not set
379# CONFIG_IP_DCCP is not set 399# CONFIG_IP_DCCP is not set
380# CONFIG_IP_SCTP is not set 400# CONFIG_IP_SCTP is not set
401# CONFIG_RDS is not set
381# CONFIG_TIPC is not set 402# CONFIG_TIPC is not set
382# CONFIG_ATM is not set 403# CONFIG_ATM is not set
383# CONFIG_BRIDGE is not set 404# CONFIG_BRIDGE is not set
@@ -408,6 +429,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
408# CONFIG_AF_RXRPC is not set 429# CONFIG_AF_RXRPC is not set
409CONFIG_WIRELESS=y 430CONFIG_WIRELESS=y
410# CONFIG_CFG80211 is not set 431# CONFIG_CFG80211 is not set
432CONFIG_CFG80211_DEFAULT_PS_VALUE=0
411# CONFIG_WIRELESS_OLD_REGULATORY is not set 433# CONFIG_WIRELESS_OLD_REGULATORY is not set
412CONFIG_WIRELESS_EXT=y 434CONFIG_WIRELESS_EXT=y
413CONFIG_WIRELESS_EXT_SYSFS=y 435CONFIG_WIRELESS_EXT_SYSFS=y
@@ -416,7 +438,6 @@ CONFIG_WIRELESS_EXT_SYSFS=y
416# 438#
417# CFG80211 needs to be enabled for MAC80211 439# CFG80211 needs to be enabled for MAC80211
418# 440#
419CONFIG_MAC80211_DEFAULT_PS_VALUE=0
420# CONFIG_WIMAX is not set 441# CONFIG_WIMAX is not set
421# CONFIG_RFKILL is not set 442# CONFIG_RFKILL is not set
422# CONFIG_NET_9P is not set 443# CONFIG_NET_9P is not set
@@ -429,6 +450,7 @@ CONFIG_MAC80211_DEFAULT_PS_VALUE=0
429# Generic Driver Options 450# Generic Driver Options
430# 451#
431CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 452CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
453# CONFIG_DEVTMPFS is not set
432CONFIG_STANDALONE=y 454CONFIG_STANDALONE=y
433CONFIG_PREVENT_FIRMWARE_BUILD=y 455CONFIG_PREVENT_FIRMWARE_BUILD=y
434CONFIG_FW_LOADER=m 456CONFIG_FW_LOADER=m
@@ -438,9 +460,9 @@ CONFIG_EXTRA_FIRMWARE=""
438# CONFIG_CONNECTOR is not set 460# CONFIG_CONNECTOR is not set
439CONFIG_MTD=y 461CONFIG_MTD=y
440# CONFIG_MTD_DEBUG is not set 462# CONFIG_MTD_DEBUG is not set
463# CONFIG_MTD_TESTS is not set
441CONFIG_MTD_CONCAT=y 464CONFIG_MTD_CONCAT=y
442CONFIG_MTD_PARTITIONS=y 465CONFIG_MTD_PARTITIONS=y
443# CONFIG_MTD_TESTS is not set
444# CONFIG_MTD_REDBOOT_PARTS is not set 466# CONFIG_MTD_REDBOOT_PARTS is not set
445CONFIG_MTD_CMDLINE_PARTS=y 467CONFIG_MTD_CMDLINE_PARTS=y
446# CONFIG_MTD_AR7_PARTS is not set 468# CONFIG_MTD_AR7_PARTS is not set
@@ -499,6 +521,7 @@ CONFIG_MTD_PHYSMAP=y
499# CONFIG_MTD_PMC551 is not set 521# CONFIG_MTD_PMC551 is not set
500# CONFIG_MTD_DATAFLASH is not set 522# CONFIG_MTD_DATAFLASH is not set
501# CONFIG_MTD_M25P80 is not set 523# CONFIG_MTD_M25P80 is not set
524# CONFIG_MTD_SST25L is not set
502# CONFIG_MTD_SLRAM is not set 525# CONFIG_MTD_SLRAM is not set
503# CONFIG_MTD_PHRAM is not set 526# CONFIG_MTD_PHRAM is not set
504# CONFIG_MTD_MTDRAM is not set 527# CONFIG_MTD_MTDRAM is not set
@@ -627,11 +650,13 @@ CONFIG_SCSI_LOWLEVEL=y
627# CONFIG_SCSI_DC390T is not set 650# CONFIG_SCSI_DC390T is not set
628# CONFIG_SCSI_NSP32 is not set 651# CONFIG_SCSI_NSP32 is not set
629# CONFIG_SCSI_DEBUG is not set 652# CONFIG_SCSI_DEBUG is not set
653# CONFIG_SCSI_PMCRAID is not set
630# CONFIG_SCSI_SRP is not set 654# CONFIG_SCSI_SRP is not set
631# CONFIG_SCSI_DH is not set 655# CONFIG_SCSI_DH is not set
632# CONFIG_SCSI_OSD_INITIATOR is not set 656# CONFIG_SCSI_OSD_INITIATOR is not set
633CONFIG_ATA=y 657CONFIG_ATA=y
634# CONFIG_ATA_NONSTANDARD is not set 658# CONFIG_ATA_NONSTANDARD is not set
659CONFIG_ATA_VERBOSE_ERROR=y
635CONFIG_SATA_PMP=y 660CONFIG_SATA_PMP=y
636# CONFIG_SATA_AHCI is not set 661# CONFIG_SATA_AHCI is not set
637# CONFIG_SATA_SIL24 is not set 662# CONFIG_SATA_SIL24 is not set
@@ -653,6 +678,7 @@ CONFIG_ATA_SFF=y
653# CONFIG_PATA_ALI is not set 678# CONFIG_PATA_ALI is not set
654# CONFIG_PATA_AMD is not set 679# CONFIG_PATA_AMD is not set
655# CONFIG_PATA_ARTOP is not set 680# CONFIG_PATA_ARTOP is not set
681# CONFIG_PATA_ATP867X is not set
656# CONFIG_PATA_ATIIXP is not set 682# CONFIG_PATA_ATIIXP is not set
657# CONFIG_PATA_CMD640_PCI is not set 683# CONFIG_PATA_CMD640_PCI is not set
658# CONFIG_PATA_CMD64X is not set 684# CONFIG_PATA_CMD64X is not set
@@ -680,6 +706,7 @@ CONFIG_ATA_SFF=y
680# CONFIG_PATA_OPTIDMA is not set 706# CONFIG_PATA_OPTIDMA is not set
681# CONFIG_PATA_PDC_OLD is not set 707# CONFIG_PATA_PDC_OLD is not set
682# CONFIG_PATA_RADISYS is not set 708# CONFIG_PATA_RADISYS is not set
709# CONFIG_PATA_RDC is not set
683# CONFIG_PATA_RZ1000 is not set 710# CONFIG_PATA_RZ1000 is not set
684# CONFIG_PATA_SC1200 is not set 711# CONFIG_PATA_SC1200 is not set
685# CONFIG_PATA_SERVERWORKS is not set 712# CONFIG_PATA_SERVERWORKS is not set
@@ -698,7 +725,11 @@ CONFIG_PATA_PLATFORM=y
698# 725#
699 726
700# 727#
701# Enable only one of the two stacks, unless you know what you are doing 728# You can enable one or both FireWire driver stacks.
729#
730
731#
732# See the help texts for more information.
702# 733#
703# CONFIG_FIREWIRE is not set 734# CONFIG_FIREWIRE is not set
704# CONFIG_IEEE1394 is not set 735# CONFIG_IEEE1394 is not set
@@ -758,6 +789,7 @@ CONFIG_8139TOO=y
758# CONFIG_SUNDANCE is not set 789# CONFIG_SUNDANCE is not set
759# CONFIG_TLAN is not set 790# CONFIG_TLAN is not set
760# CONFIG_KS8842 is not set 791# CONFIG_KS8842 is not set
792# CONFIG_KS8851 is not set
761# CONFIG_VIA_RHINE is not set 793# CONFIG_VIA_RHINE is not set
762# CONFIG_SC92031 is not set 794# CONFIG_SC92031 is not set
763# CONFIG_ATL2 is not set 795# CONFIG_ATL2 is not set
@@ -779,6 +811,7 @@ CONFIG_NETDEV_1000=y
779# CONFIG_VIA_VELOCITY is not set 811# CONFIG_VIA_VELOCITY is not set
780# CONFIG_TIGON3 is not set 812# CONFIG_TIGON3 is not set
781# CONFIG_BNX2 is not set 813# CONFIG_BNX2 is not set
814# CONFIG_CNIC is not set
782# CONFIG_QLA3XXX is not set 815# CONFIG_QLA3XXX is not set
783# CONFIG_ATL1 is not set 816# CONFIG_ATL1 is not set
784# CONFIG_ATL1E is not set 817# CONFIG_ATL1E is not set
@@ -804,10 +837,7 @@ CONFIG_CHELSIO_T3_DEPENDS=y
804# CONFIG_SFC is not set 837# CONFIG_SFC is not set
805# CONFIG_BE2NET is not set 838# CONFIG_BE2NET is not set
806# CONFIG_TR is not set 839# CONFIG_TR is not set
807 840CONFIG_WLAN=y
808#
809# Wireless LAN
810#
811# CONFIG_WLAN_PRE80211 is not set 841# CONFIG_WLAN_PRE80211 is not set
812# CONFIG_WLAN_80211 is not set 842# CONFIG_WLAN_80211 is not set
813 843
@@ -925,10 +955,20 @@ CONFIG_SPI_SH_SCI=y
925# 955#
926# CONFIG_SPI_SPIDEV is not set 956# CONFIG_SPI_SPIDEV is not set
927# CONFIG_SPI_TLE62X0 is not set 957# CONFIG_SPI_TLE62X0 is not set
958
959#
960# PPS support
961#
962# CONFIG_PPS is not set
928# CONFIG_W1 is not set 963# CONFIG_W1 is not set
929# CONFIG_POWER_SUPPLY is not set 964# CONFIG_POWER_SUPPLY is not set
930CONFIG_HWMON=y 965CONFIG_HWMON=y
931# CONFIG_HWMON_VID is not set 966# CONFIG_HWMON_VID is not set
967# CONFIG_HWMON_DEBUG_CHIP is not set
968
969#
970# Native drivers
971#
932# CONFIG_SENSORS_ADCXX is not set 972# CONFIG_SENSORS_ADCXX is not set
933# CONFIG_SENSORS_I5K_AMB is not set 973# CONFIG_SENSORS_I5K_AMB is not set
934# CONFIG_SENSORS_F71805F is not set 974# CONFIG_SENSORS_F71805F is not set
@@ -947,9 +987,7 @@ CONFIG_HWMON=y
947# CONFIG_SENSORS_W83627HF is not set 987# CONFIG_SENSORS_W83627HF is not set
948# CONFIG_SENSORS_W83627EHF is not set 988# CONFIG_SENSORS_W83627EHF is not set
949# CONFIG_SENSORS_LIS3_SPI is not set 989# CONFIG_SENSORS_LIS3_SPI is not set
950# CONFIG_HWMON_DEBUG_CHIP is not set
951# CONFIG_THERMAL is not set 990# CONFIG_THERMAL is not set
952# CONFIG_THERMAL_HWMON is not set
953# CONFIG_WATCHDOG is not set 991# CONFIG_WATCHDOG is not set
954CONFIG_SSB_POSSIBLE=y 992CONFIG_SSB_POSSIBLE=y
955 993
@@ -965,12 +1003,15 @@ CONFIG_SSB_POSSIBLE=y
965CONFIG_MFD_SM501=y 1003CONFIG_MFD_SM501=y
966# CONFIG_HTC_PASIC3 is not set 1004# CONFIG_HTC_PASIC3 is not set
967# CONFIG_MFD_TMIO is not set 1005# CONFIG_MFD_TMIO is not set
1006# CONFIG_MFD_MC13783 is not set
1007# CONFIG_EZX_PCAP is not set
968# CONFIG_REGULATOR is not set 1008# CONFIG_REGULATOR is not set
969# CONFIG_MEDIA_SUPPORT is not set 1009# CONFIG_MEDIA_SUPPORT is not set
970 1010
971# 1011#
972# Graphics support 1012# Graphics support
973# 1013#
1014CONFIG_VGA_ARB=y
974# CONFIG_DRM is not set 1015# CONFIG_DRM is not set
975# CONFIG_VGASTATE is not set 1016# CONFIG_VGASTATE is not set
976CONFIG_VIDEO_OUTPUT_CONTROL=m 1017CONFIG_VIDEO_OUTPUT_CONTROL=m
@@ -1054,6 +1095,7 @@ CONFIG_LOGO=y
1054CONFIG_LOGO_SUPERH_CLUT224=y 1095CONFIG_LOGO_SUPERH_CLUT224=y
1055CONFIG_SOUND=y 1096CONFIG_SOUND=y
1056CONFIG_SOUND_OSS_CORE=y 1097CONFIG_SOUND_OSS_CORE=y
1098CONFIG_SOUND_OSS_CORE_PRECLAIM=y
1057CONFIG_SND=m 1099CONFIG_SND=m
1058CONFIG_SND_TIMER=m 1100CONFIG_SND_TIMER=m
1059CONFIG_SND_PCM=m 1101CONFIG_SND_PCM=m
@@ -1156,7 +1198,6 @@ CONFIG_SOUND_PRIME=m
1156CONFIG_AC97_BUS=m 1198CONFIG_AC97_BUS=m
1157CONFIG_HID_SUPPORT=y 1199CONFIG_HID_SUPPORT=y
1158CONFIG_HID=y 1200CONFIG_HID=y
1159# CONFIG_HID_DEBUG is not set
1160# CONFIG_HIDRAW is not set 1201# CONFIG_HIDRAW is not set
1161 1202
1162# 1203#
@@ -1179,6 +1220,7 @@ CONFIG_HID_CYPRESS=y
1179CONFIG_HID_EZKEY=y 1220CONFIG_HID_EZKEY=y
1180# CONFIG_HID_KYE is not set 1221# CONFIG_HID_KYE is not set
1181CONFIG_HID_GYRATION=y 1222CONFIG_HID_GYRATION=y
1223# CONFIG_HID_TWINHAN is not set
1182# CONFIG_HID_KENSINGTON is not set 1224# CONFIG_HID_KENSINGTON is not set
1183CONFIG_HID_LOGITECH=y 1225CONFIG_HID_LOGITECH=y
1184# CONFIG_LOGITECH_FF is not set 1226# CONFIG_LOGITECH_FF is not set
@@ -1227,6 +1269,7 @@ CONFIG_USB_DEVICE_CLASS=y
1227# CONFIG_USB_OXU210HP_HCD is not set 1269# CONFIG_USB_OXU210HP_HCD is not set
1228# CONFIG_USB_ISP116X_HCD is not set 1270# CONFIG_USB_ISP116X_HCD is not set
1229# CONFIG_USB_ISP1760_HCD is not set 1271# CONFIG_USB_ISP1760_HCD is not set
1272# CONFIG_USB_ISP1362_HCD is not set
1230CONFIG_USB_OHCI_HCD=y 1273CONFIG_USB_OHCI_HCD=y
1231# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set 1274# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
1232# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set 1275# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
@@ -1298,6 +1341,7 @@ CONFIG_USB_LIBUSUAL=y
1298# CONFIG_USB_LD is not set 1341# CONFIG_USB_LD is not set
1299# CONFIG_USB_TRANCEVIBRATOR is not set 1342# CONFIG_USB_TRANCEVIBRATOR is not set
1300# CONFIG_USB_IOWARRIOR is not set 1343# CONFIG_USB_IOWARRIOR is not set
1344# CONFIG_USB_TEST is not set
1301# CONFIG_USB_ISIGHTFW is not set 1345# CONFIG_USB_ISIGHTFW is not set
1302# CONFIG_USB_VST is not set 1346# CONFIG_USB_VST is not set
1303# CONFIG_USB_GADGET is not set 1347# CONFIG_USB_GADGET is not set
@@ -1337,6 +1381,7 @@ CONFIG_RTC_INTF_DEV=y
1337CONFIG_RTC_DRV_R9701=y 1381CONFIG_RTC_DRV_R9701=y
1338# CONFIG_RTC_DRV_RS5C348 is not set 1382# CONFIG_RTC_DRV_RS5C348 is not set
1339# CONFIG_RTC_DRV_DS3234 is not set 1383# CONFIG_RTC_DRV_DS3234 is not set
1384# CONFIG_RTC_DRV_PCF2123 is not set
1340 1385
1341# 1386#
1342# Platform RTC drivers 1387# Platform RTC drivers
@@ -1378,8 +1423,10 @@ CONFIG_EXT2_FS=y
1378# CONFIG_JFS_FS is not set 1423# CONFIG_JFS_FS is not set
1379# CONFIG_FS_POSIX_ACL is not set 1424# CONFIG_FS_POSIX_ACL is not set
1380# CONFIG_XFS_FS is not set 1425# CONFIG_XFS_FS is not set
1426# CONFIG_GFS2_FS is not set
1381# CONFIG_OCFS2_FS is not set 1427# CONFIG_OCFS2_FS is not set
1382# CONFIG_BTRFS_FS is not set 1428# CONFIG_BTRFS_FS is not set
1429# CONFIG_NILFS2_FS is not set
1383CONFIG_FILE_LOCKING=y 1430CONFIG_FILE_LOCKING=y
1384CONFIG_FSNOTIFY=y 1431CONFIG_FSNOTIFY=y
1385CONFIG_DNOTIFY=y 1432CONFIG_DNOTIFY=y
@@ -1443,7 +1490,6 @@ CONFIG_MINIX_FS=y
1443# CONFIG_ROMFS_FS is not set 1490# CONFIG_ROMFS_FS is not set
1444# CONFIG_SYSV_FS is not set 1491# CONFIG_SYSV_FS is not set
1445# CONFIG_UFS_FS is not set 1492# CONFIG_UFS_FS is not set
1446# CONFIG_NILFS2_FS is not set
1447CONFIG_NETWORK_FILESYSTEMS=y 1493CONFIG_NETWORK_FILESYSTEMS=y
1448# CONFIG_NFS_FS is not set 1494# CONFIG_NFS_FS is not set
1449# CONFIG_NFSD is not set 1495# CONFIG_NFSD is not set
@@ -1509,6 +1555,7 @@ CONFIG_ENABLE_WARN_DEPRECATED=y
1509CONFIG_ENABLE_MUST_CHECK=y 1555CONFIG_ENABLE_MUST_CHECK=y
1510CONFIG_FRAME_WARN=1024 1556CONFIG_FRAME_WARN=1024
1511# CONFIG_MAGIC_SYSRQ is not set 1557# CONFIG_MAGIC_SYSRQ is not set
1558# CONFIG_STRIP_ASM_SYMS is not set
1512# CONFIG_UNUSED_SYMBOLS is not set 1559# CONFIG_UNUSED_SYMBOLS is not set
1513CONFIG_DEBUG_FS=y 1560CONFIG_DEBUG_FS=y
1514# CONFIG_HEADERS_CHECK is not set 1561# CONFIG_HEADERS_CHECK is not set
@@ -1520,11 +1567,15 @@ CONFIG_STACKTRACE=y
1520# CONFIG_LATENCYTOP is not set 1567# CONFIG_LATENCYTOP is not set
1521CONFIG_NOP_TRACER=y 1568CONFIG_NOP_TRACER=y
1522CONFIG_HAVE_FUNCTION_TRACER=y 1569CONFIG_HAVE_FUNCTION_TRACER=y
1570CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1571CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
1523CONFIG_HAVE_DYNAMIC_FTRACE=y 1572CONFIG_HAVE_DYNAMIC_FTRACE=y
1524CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1573CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1574CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
1525CONFIG_RING_BUFFER=y 1575CONFIG_RING_BUFFER=y
1526CONFIG_EVENT_TRACING=y 1576CONFIG_EVENT_TRACING=y
1527CONFIG_CONTEXT_SWITCH_TRACER=y 1577CONFIG_CONTEXT_SWITCH_TRACER=y
1578CONFIG_RING_BUFFER_ALLOW_SWAP=y
1528CONFIG_TRACING=y 1579CONFIG_TRACING=y
1529CONFIG_TRACING_SUPPORT=y 1580CONFIG_TRACING_SUPPORT=y
1530# CONFIG_FTRACE is not set 1581# CONFIG_FTRACE is not set
@@ -1536,6 +1587,7 @@ CONFIG_HAVE_ARCH_KGDB=y
1536CONFIG_EARLY_SCIF_CONSOLE=y 1587CONFIG_EARLY_SCIF_CONSOLE=y
1537CONFIG_EARLY_SCIF_CONSOLE_PORT=0xffe80000 1588CONFIG_EARLY_SCIF_CONSOLE_PORT=0xffe80000
1538CONFIG_EARLY_PRINTK=y 1589CONFIG_EARLY_PRINTK=y
1590# CONFIG_DWARF_UNWINDER is not set
1539 1591
1540# 1592#
1541# Security options 1593# Security options
@@ -1549,7 +1601,6 @@ CONFIG_CRYPTO=y
1549# 1601#
1550# Crypto core or helper 1602# Crypto core or helper
1551# 1603#
1552# CONFIG_CRYPTO_FIPS is not set
1553# CONFIG_CRYPTO_MANAGER is not set 1604# CONFIG_CRYPTO_MANAGER is not set
1554# CONFIG_CRYPTO_MANAGER2 is not set 1605# CONFIG_CRYPTO_MANAGER2 is not set
1555# CONFIG_CRYPTO_GF128MUL is not set 1606# CONFIG_CRYPTO_GF128MUL is not set
@@ -1581,11 +1632,13 @@ CONFIG_CRYPTO=y
1581# 1632#
1582# CONFIG_CRYPTO_HMAC is not set 1633# CONFIG_CRYPTO_HMAC is not set
1583# CONFIG_CRYPTO_XCBC is not set 1634# CONFIG_CRYPTO_XCBC is not set
1635# CONFIG_CRYPTO_VMAC is not set
1584 1636
1585# 1637#
1586# Digest 1638# Digest
1587# 1639#
1588# CONFIG_CRYPTO_CRC32C is not set 1640# CONFIG_CRYPTO_CRC32C is not set
1641# CONFIG_CRYPTO_GHASH is not set
1589# CONFIG_CRYPTO_MD4 is not set 1642# CONFIG_CRYPTO_MD4 is not set
1590# CONFIG_CRYPTO_MD5 is not set 1643# CONFIG_CRYPTO_MD5 is not set
1591# CONFIG_CRYPTO_MICHAEL_MIC is not set 1644# CONFIG_CRYPTO_MICHAEL_MIC is not set
@@ -1648,5 +1701,6 @@ CONFIG_CRC32=y
1648CONFIG_HAS_IOMEM=y 1701CONFIG_HAS_IOMEM=y
1649CONFIG_HAS_IOPORT=y 1702CONFIG_HAS_IOPORT=y
1650CONFIG_HAS_DMA=y 1703CONFIG_HAS_DMA=y
1704CONFIG_HAVE_LMB=y
1651CONFIG_NLATTR=y 1705CONFIG_NLATTR=y
1652CONFIG_GENERIC_ATOMIC64=y 1706CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/sdk7780_defconfig b/arch/sh/configs/sdk7780_defconfig
index 753fb276e9f5..055536b5c5cd 100644
--- a/arch/sh/configs/sdk7780_defconfig
+++ b/arch/sh/configs/sdk7780_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.30 3# Linux kernel version: 2.6.31
4# Thu Jun 18 12:43:54 2009 4# Thu Sep 24 18:40:25 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -14,6 +14,7 @@ CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y 14CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
16CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_IRQ_PER_CPU=y
17# CONFIG_GENERIC_GPIO is not set 18# CONFIG_GENERIC_GPIO is not set
18CONFIG_GENERIC_TIME=y 19CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 20CONFIG_GENERIC_CLOCKEVENTS=y
@@ -28,7 +29,9 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
28# CONFIG_ARCH_HAS_ILOG2_U64 is not set 29# CONFIG_ARCH_HAS_ILOG2_U64 is not set
29CONFIG_ARCH_NO_VIRT_TO_BUS=y 30CONFIG_ARCH_NO_VIRT_TO_BUS=y
30CONFIG_ARCH_HAS_DEFAULT_IDLE=y 31CONFIG_ARCH_HAS_DEFAULT_IDLE=y
32CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
31CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 33CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
34CONFIG_CONSTRUCTORS=y
32 35
33# 36#
34# General setup 37# General setup
@@ -39,6 +42,12 @@ CONFIG_LOCK_KERNEL=y
39CONFIG_INIT_ENV_ARG_LIMIT=32 42CONFIG_INIT_ENV_ARG_LIMIT=32
40CONFIG_LOCALVERSION="_SDK7780" 43CONFIG_LOCALVERSION="_SDK7780"
41CONFIG_LOCALVERSION_AUTO=y 44CONFIG_LOCALVERSION_AUTO=y
45CONFIG_HAVE_KERNEL_GZIP=y
46CONFIG_HAVE_KERNEL_BZIP2=y
47CONFIG_HAVE_KERNEL_LZMA=y
48CONFIG_KERNEL_GZIP=y
49# CONFIG_KERNEL_BZIP2 is not set
50# CONFIG_KERNEL_LZMA is not set
42CONFIG_SWAP=y 51CONFIG_SWAP=y
43CONFIG_SYSVIPC=y 52CONFIG_SYSVIPC=y
44CONFIG_SYSVIPC_SYSCTL=y 53CONFIG_SYSVIPC_SYSCTL=y
@@ -52,11 +61,12 @@ CONFIG_BSD_PROCESS_ACCT=y
52# 61#
53# RCU Subsystem 62# RCU Subsystem
54# 63#
55CONFIG_CLASSIC_RCU=y 64CONFIG_TREE_RCU=y
56# CONFIG_TREE_RCU is not set 65# CONFIG_TREE_PREEMPT_RCU is not set
57# CONFIG_PREEMPT_RCU is not set 66# CONFIG_RCU_TRACE is not set
67CONFIG_RCU_FANOUT=32
68# CONFIG_RCU_FANOUT_EXACT is not set
58# CONFIG_TREE_RCU_TRACE is not set 69# CONFIG_TREE_RCU_TRACE is not set
59# CONFIG_PREEMPT_RCU_TRACE is not set
60CONFIG_IKCONFIG=y 70CONFIG_IKCONFIG=y
61CONFIG_IKCONFIG_PROC=y 71CONFIG_IKCONFIG_PROC=y
62CONFIG_LOG_BUF_SHIFT=18 72CONFIG_LOG_BUF_SHIFT=18
@@ -88,20 +98,21 @@ CONFIG_TIMERFD=y
88CONFIG_EVENTFD=y 98CONFIG_EVENTFD=y
89CONFIG_SHMEM=y 99CONFIG_SHMEM=y
90CONFIG_AIO=y 100CONFIG_AIO=y
101CONFIG_HAVE_PERF_EVENTS=y
91 102
92# 103#
93# Performance Counters 104# Kernel Performance Events And Counters
94# 105#
106# CONFIG_PERF_EVENTS is not set
107# CONFIG_PERF_COUNTERS is not set
95CONFIG_VM_EVENT_COUNTERS=y 108CONFIG_VM_EVENT_COUNTERS=y
96CONFIG_PCI_QUIRKS=y 109CONFIG_PCI_QUIRKS=y
97CONFIG_SLUB_DEBUG=y 110CONFIG_SLUB_DEBUG=y
98# CONFIG_STRIP_ASM_SYMS is not set
99CONFIG_COMPAT_BRK=y 111CONFIG_COMPAT_BRK=y
100# CONFIG_SLAB is not set 112# CONFIG_SLAB is not set
101CONFIG_SLUB=y 113CONFIG_SLUB=y
102# CONFIG_SLOB is not set 114# CONFIG_SLOB is not set
103# CONFIG_PROFILING is not set 115# CONFIG_PROFILING is not set
104# CONFIG_MARKERS is not set
105CONFIG_HAVE_OPROFILE=y 116CONFIG_HAVE_OPROFILE=y
106# CONFIG_KPROBES is not set 117# CONFIG_KPROBES is not set
107CONFIG_HAVE_IOREMAP_PROT=y 118CONFIG_HAVE_IOREMAP_PROT=y
@@ -110,6 +121,10 @@ CONFIG_HAVE_KRETPROBES=y
110CONFIG_HAVE_ARCH_TRACEHOOK=y 121CONFIG_HAVE_ARCH_TRACEHOOK=y
111CONFIG_HAVE_CLK=y 122CONFIG_HAVE_CLK=y
112CONFIG_HAVE_DMA_API_DEBUG=y 123CONFIG_HAVE_DMA_API_DEBUG=y
124
125#
126# GCOV-based kernel profiling
127#
113# CONFIG_SLOW_WORK is not set 128# CONFIG_SLOW_WORK is not set
114CONFIG_HAVE_GENERIC_DMA_COHERENT=y 129CONFIG_HAVE_GENERIC_DMA_COHERENT=y
115CONFIG_SLABINFO=y 130CONFIG_SLABINFO=y
@@ -122,7 +137,7 @@ CONFIG_MODULE_FORCE_UNLOAD=y
122# CONFIG_MODVERSIONS is not set 137# CONFIG_MODVERSIONS is not set
123# CONFIG_MODULE_SRCVERSION_ALL is not set 138# CONFIG_MODULE_SRCVERSION_ALL is not set
124CONFIG_BLOCK=y 139CONFIG_BLOCK=y
125CONFIG_LBD=y 140CONFIG_LBDAF=y
126# CONFIG_BLK_DEV_BSG is not set 141# CONFIG_BLK_DEV_BSG is not set
127# CONFIG_BLK_DEV_INTEGRITY is not set 142# CONFIG_BLK_DEV_INTEGRITY is not set
128 143
@@ -170,6 +185,7 @@ CONFIG_CPU_SH4A=y
170# CONFIG_CPU_SUBTYPE_SH4_202 is not set 185# CONFIG_CPU_SUBTYPE_SH4_202 is not set
171# CONFIG_CPU_SUBTYPE_SH7723 is not set 186# CONFIG_CPU_SUBTYPE_SH7723 is not set
172# CONFIG_CPU_SUBTYPE_SH7724 is not set 187# CONFIG_CPU_SUBTYPE_SH7724 is not set
188# CONFIG_CPU_SUBTYPE_SH7757 is not set
173# CONFIG_CPU_SUBTYPE_SH7763 is not set 189# CONFIG_CPU_SUBTYPE_SH7763 is not set
174# CONFIG_CPU_SUBTYPE_SH7770 is not set 190# CONFIG_CPU_SUBTYPE_SH7770 is not set
175CONFIG_CPU_SUBTYPE_SH7780=y 191CONFIG_CPU_SUBTYPE_SH7780=y
@@ -225,6 +241,7 @@ CONFIG_ZONE_DMA_FLAG=0
225CONFIG_NR_QUICK=2 241CONFIG_NR_QUICK=2
226CONFIG_HAVE_MLOCK=y 242CONFIG_HAVE_MLOCK=y
227CONFIG_HAVE_MLOCKED_PAGE_BIT=y 243CONFIG_HAVE_MLOCKED_PAGE_BIT=y
244# CONFIG_KSM is not set
228CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 245CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
229 246
230# 247#
@@ -314,7 +331,8 @@ CONFIG_GUSA=y
314CONFIG_ZERO_PAGE_OFFSET=0x00001000 331CONFIG_ZERO_PAGE_OFFSET=0x00001000
315CONFIG_BOOT_LINK_OFFSET=0x01800000 332CONFIG_BOOT_LINK_OFFSET=0x01800000
316CONFIG_ENTRY_OFFSET=0x00001000 333CONFIG_ENTRY_OFFSET=0x00001000
317CONFIG_CMDLINE_BOOL=y 334CONFIG_CMDLINE_OVERWRITE=y
335# CONFIG_CMDLINE_EXTEND is not set
318CONFIG_CMDLINE="mem=128M console=tty0 console=ttySC0,115200 ip=bootp root=/dev/nfs nfsroot=192.168.0.1:/home/rootfs" 336CONFIG_CMDLINE="mem=128M console=tty0 console=ttySC0,115200 ip=bootp root=/dev/nfs nfsroot=192.168.0.1:/home/rootfs"
319 337
320# 338#
@@ -435,6 +453,7 @@ CONFIG_IPV6_NDISC_NODETYPE=y
435# CONFIG_NETFILTER is not set 453# CONFIG_NETFILTER is not set
436# CONFIG_IP_DCCP is not set 454# CONFIG_IP_DCCP is not set
437# CONFIG_IP_SCTP is not set 455# CONFIG_IP_SCTP is not set
456# CONFIG_RDS is not set
438# CONFIG_TIPC is not set 457# CONFIG_TIPC is not set
439# CONFIG_ATM is not set 458# CONFIG_ATM is not set
440# CONFIG_BRIDGE is not set 459# CONFIG_BRIDGE is not set
@@ -496,6 +515,7 @@ CONFIG_NET_SCH_FIFO=y
496# CONFIG_AF_RXRPC is not set 515# CONFIG_AF_RXRPC is not set
497CONFIG_WIRELESS=y 516CONFIG_WIRELESS=y
498# CONFIG_CFG80211 is not set 517# CONFIG_CFG80211 is not set
518CONFIG_CFG80211_DEFAULT_PS_VALUE=0
499# CONFIG_WIRELESS_OLD_REGULATORY is not set 519# CONFIG_WIRELESS_OLD_REGULATORY is not set
500# CONFIG_WIRELESS_EXT is not set 520# CONFIG_WIRELESS_EXT is not set
501# CONFIG_LIB80211 is not set 521# CONFIG_LIB80211 is not set
@@ -503,7 +523,6 @@ CONFIG_WIRELESS=y
503# 523#
504# CFG80211 needs to be enabled for MAC80211 524# CFG80211 needs to be enabled for MAC80211
505# 525#
506CONFIG_MAC80211_DEFAULT_PS_VALUE=0
507# CONFIG_WIMAX is not set 526# CONFIG_WIMAX is not set
508# CONFIG_RFKILL is not set 527# CONFIG_RFKILL is not set
509# CONFIG_NET_9P is not set 528# CONFIG_NET_9P is not set
@@ -516,6 +535,7 @@ CONFIG_MAC80211_DEFAULT_PS_VALUE=0
516# Generic Driver Options 535# Generic Driver Options
517# 536#
518CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 537CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
538# CONFIG_DEVTMPFS is not set
519CONFIG_STANDALONE=y 539CONFIG_STANDALONE=y
520CONFIG_PREVENT_FIRMWARE_BUILD=y 540CONFIG_PREVENT_FIRMWARE_BUILD=y
521CONFIG_FW_LOADER=y 541CONFIG_FW_LOADER=y
@@ -677,12 +697,14 @@ CONFIG_SCSI_LOWLEVEL=y
677# CONFIG_SCSI_DC390T is not set 697# CONFIG_SCSI_DC390T is not set
678# CONFIG_SCSI_NSP32 is not set 698# CONFIG_SCSI_NSP32 is not set
679# CONFIG_SCSI_DEBUG is not set 699# CONFIG_SCSI_DEBUG is not set
700# CONFIG_SCSI_PMCRAID is not set
680# CONFIG_SCSI_SRP is not set 701# CONFIG_SCSI_SRP is not set
681# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set 702# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
682# CONFIG_SCSI_DH is not set 703# CONFIG_SCSI_DH is not set
683# CONFIG_SCSI_OSD_INITIATOR is not set 704# CONFIG_SCSI_OSD_INITIATOR is not set
684CONFIG_ATA=y 705CONFIG_ATA=y
685# CONFIG_ATA_NONSTANDARD is not set 706# CONFIG_ATA_NONSTANDARD is not set
707CONFIG_ATA_VERBOSE_ERROR=y
686CONFIG_SATA_PMP=y 708CONFIG_SATA_PMP=y
687# CONFIG_SATA_AHCI is not set 709# CONFIG_SATA_AHCI is not set
688# CONFIG_SATA_SIL24 is not set 710# CONFIG_SATA_SIL24 is not set
@@ -704,6 +726,7 @@ CONFIG_ATA_SFF=y
704# CONFIG_PATA_ALI is not set 726# CONFIG_PATA_ALI is not set
705# CONFIG_PATA_AMD is not set 727# CONFIG_PATA_AMD is not set
706# CONFIG_PATA_ARTOP is not set 728# CONFIG_PATA_ARTOP is not set
729# CONFIG_PATA_ATP867X is not set
707# CONFIG_PATA_ATIIXP is not set 730# CONFIG_PATA_ATIIXP is not set
708# CONFIG_PATA_CMD640_PCI is not set 731# CONFIG_PATA_CMD640_PCI is not set
709# CONFIG_PATA_CMD64X is not set 732# CONFIG_PATA_CMD64X is not set
@@ -732,6 +755,7 @@ CONFIG_ATA_SFF=y
732# CONFIG_PATA_PCMCIA is not set 755# CONFIG_PATA_PCMCIA is not set
733# CONFIG_PATA_PDC_OLD is not set 756# CONFIG_PATA_PDC_OLD is not set
734# CONFIG_PATA_RADISYS is not set 757# CONFIG_PATA_RADISYS is not set
758# CONFIG_PATA_RDC is not set
735# CONFIG_PATA_RZ1000 is not set 759# CONFIG_PATA_RZ1000 is not set
736# CONFIG_PATA_SC1200 is not set 760# CONFIG_PATA_SC1200 is not set
737# CONFIG_PATA_SERVERWORKS is not set 761# CONFIG_PATA_SERVERWORKS is not set
@@ -760,7 +784,11 @@ CONFIG_BLK_DEV_DM=y
760# 784#
761 785
762# 786#
763# Enable only one of the two stacks, unless you know what you are doing 787# You can enable one or both FireWire driver stacks.
788#
789
790#
791# See the help texts for more information.
764# 792#
765# CONFIG_FIREWIRE is not set 793# CONFIG_FIREWIRE is not set
766# CONFIG_IEEE1394 is not set 794# CONFIG_IEEE1394 is not set
@@ -804,10 +832,7 @@ CONFIG_SMC91X=y
804# CONFIG_NETDEV_1000 is not set 832# CONFIG_NETDEV_1000 is not set
805# CONFIG_NETDEV_10000 is not set 833# CONFIG_NETDEV_10000 is not set
806# CONFIG_TR is not set 834# CONFIG_TR is not set
807 835CONFIG_WLAN=y
808#
809# Wireless LAN
810#
811# CONFIG_WLAN_PRE80211 is not set 836# CONFIG_WLAN_PRE80211 is not set
812# CONFIG_WLAN_80211 is not set 837# CONFIG_WLAN_80211 is not set
813 838
@@ -862,12 +887,13 @@ CONFIG_INPUT_EVDEV=y
862# 887#
863CONFIG_INPUT_KEYBOARD=y 888CONFIG_INPUT_KEYBOARD=y
864CONFIG_KEYBOARD_ATKBD=y 889CONFIG_KEYBOARD_ATKBD=y
865# CONFIG_KEYBOARD_SUNKBD is not set
866# CONFIG_KEYBOARD_LKKBD is not set 890# CONFIG_KEYBOARD_LKKBD is not set
867# CONFIG_KEYBOARD_XTKBD is not set
868# CONFIG_KEYBOARD_NEWTON is not set 891# CONFIG_KEYBOARD_NEWTON is not set
892# CONFIG_KEYBOARD_OPENCORES is not set
869# CONFIG_KEYBOARD_STOWAWAY is not set 893# CONFIG_KEYBOARD_STOWAWAY is not set
894# CONFIG_KEYBOARD_SUNKBD is not set
870# CONFIG_KEYBOARD_SH_KEYSC is not set 895# CONFIG_KEYBOARD_SH_KEYSC is not set
896# CONFIG_KEYBOARD_XTKBD is not set
871CONFIG_INPUT_MOUSE=y 897CONFIG_INPUT_MOUSE=y
872CONFIG_MOUSE_PS2=y 898CONFIG_MOUSE_PS2=y
873CONFIG_MOUSE_PS2_ALPS=y 899CONFIG_MOUSE_PS2_ALPS=y
@@ -875,6 +901,7 @@ CONFIG_MOUSE_PS2_LOGIPS2PP=y
875CONFIG_MOUSE_PS2_SYNAPTICS=y 901CONFIG_MOUSE_PS2_SYNAPTICS=y
876CONFIG_MOUSE_PS2_TRACKPOINT=y 902CONFIG_MOUSE_PS2_TRACKPOINT=y
877# CONFIG_MOUSE_PS2_ELANTECH is not set 903# CONFIG_MOUSE_PS2_ELANTECH is not set
904# CONFIG_MOUSE_PS2_SENTELIC is not set
878# CONFIG_MOUSE_PS2_TOUCHKIT is not set 905# CONFIG_MOUSE_PS2_TOUCHKIT is not set
879# CONFIG_MOUSE_SERIAL is not set 906# CONFIG_MOUSE_SERIAL is not set
880# CONFIG_MOUSE_APPLETOUCH is not set 907# CONFIG_MOUSE_APPLETOUCH is not set
@@ -947,6 +974,11 @@ CONFIG_HW_RANDOM=y
947CONFIG_DEVPORT=y 974CONFIG_DEVPORT=y
948# CONFIG_I2C is not set 975# CONFIG_I2C is not set
949# CONFIG_SPI is not set 976# CONFIG_SPI is not set
977
978#
979# PPS support
980#
981# CONFIG_PPS is not set
950# CONFIG_W1 is not set 982# CONFIG_W1 is not set
951CONFIG_POWER_SUPPLY=y 983CONFIG_POWER_SUPPLY=y
952# CONFIG_POWER_SUPPLY_DEBUG is not set 984# CONFIG_POWER_SUPPLY_DEBUG is not set
@@ -954,7 +986,6 @@ CONFIG_POWER_SUPPLY=y
954# CONFIG_BATTERY_DS2760 is not set 986# CONFIG_BATTERY_DS2760 is not set
955# CONFIG_HWMON is not set 987# CONFIG_HWMON is not set
956# CONFIG_THERMAL is not set 988# CONFIG_THERMAL is not set
957# CONFIG_THERMAL_HWMON is not set
958# CONFIG_WATCHDOG is not set 989# CONFIG_WATCHDOG is not set
959CONFIG_SSB_POSSIBLE=y 990CONFIG_SSB_POSSIBLE=y
960 991
@@ -986,6 +1017,7 @@ CONFIG_SSB_DRIVER_PCICORE=y
986# 1017#
987# Graphics support 1018# Graphics support
988# 1019#
1020CONFIG_VGA_ARB=y
989# CONFIG_DRM is not set 1021# CONFIG_DRM is not set
990# CONFIG_VGASTATE is not set 1022# CONFIG_VGASTATE is not set
991# CONFIG_VIDEO_OUTPUT_CONTROL is not set 1023# CONFIG_VIDEO_OUTPUT_CONTROL is not set
@@ -1072,11 +1104,11 @@ CONFIG_LOGO_SUPERH_VGA16=y
1072CONFIG_LOGO_SUPERH_CLUT224=y 1104CONFIG_LOGO_SUPERH_CLUT224=y
1073CONFIG_SOUND=y 1105CONFIG_SOUND=y
1074CONFIG_SOUND_OSS_CORE=y 1106CONFIG_SOUND_OSS_CORE=y
1107CONFIG_SOUND_OSS_CORE_PRECLAIM=y
1075# CONFIG_SND is not set 1108# CONFIG_SND is not set
1076CONFIG_SOUND_PRIME=y 1109CONFIG_SOUND_PRIME=y
1077CONFIG_HID_SUPPORT=y 1110CONFIG_HID_SUPPORT=y
1078CONFIG_HID=y 1111CONFIG_HID=y
1079# CONFIG_HID_DEBUG is not set
1080# CONFIG_HIDRAW is not set 1112# CONFIG_HIDRAW is not set
1081 1113
1082# 1114#
@@ -1099,6 +1131,7 @@ CONFIG_HID_CYPRESS=y
1099CONFIG_HID_EZKEY=y 1131CONFIG_HID_EZKEY=y
1100# CONFIG_HID_KYE is not set 1132# CONFIG_HID_KYE is not set
1101CONFIG_HID_GYRATION=y 1133CONFIG_HID_GYRATION=y
1134# CONFIG_HID_TWINHAN is not set
1102# CONFIG_HID_KENSINGTON is not set 1135# CONFIG_HID_KENSINGTON is not set
1103CONFIG_HID_LOGITECH=y 1136CONFIG_HID_LOGITECH=y
1104# CONFIG_LOGITECH_FF is not set 1137# CONFIG_LOGITECH_FF is not set
@@ -1149,6 +1182,7 @@ CONFIG_USB_EHCI_HCD=y
1149# CONFIG_USB_OXU210HP_HCD is not set 1182# CONFIG_USB_OXU210HP_HCD is not set
1150# CONFIG_USB_ISP116X_HCD is not set 1183# CONFIG_USB_ISP116X_HCD is not set
1151# CONFIG_USB_ISP1760_HCD is not set 1184# CONFIG_USB_ISP1760_HCD is not set
1185# CONFIG_USB_ISP1362_HCD is not set
1152# CONFIG_USB_OHCI_HCD is not set 1186# CONFIG_USB_OHCI_HCD is not set
1153# CONFIG_USB_UHCI_HCD is not set 1187# CONFIG_USB_UHCI_HCD is not set
1154# CONFIG_USB_SL811_HCD is not set 1188# CONFIG_USB_SL811_HCD is not set
@@ -1278,6 +1312,7 @@ CONFIG_FS_POSIX_ACL=y
1278# CONFIG_GFS2_FS is not set 1312# CONFIG_GFS2_FS is not set
1279# CONFIG_OCFS2_FS is not set 1313# CONFIG_OCFS2_FS is not set
1280# CONFIG_BTRFS_FS is not set 1314# CONFIG_BTRFS_FS is not set
1315# CONFIG_NILFS2_FS is not set
1281CONFIG_FILE_LOCKING=y 1316CONFIG_FILE_LOCKING=y
1282CONFIG_FSNOTIFY=y 1317CONFIG_FSNOTIFY=y
1283CONFIG_DNOTIFY=y 1318CONFIG_DNOTIFY=y
@@ -1345,7 +1380,6 @@ CONFIG_MINIX_FS=y
1345# CONFIG_ROMFS_FS is not set 1380# CONFIG_ROMFS_FS is not set
1346# CONFIG_SYSV_FS is not set 1381# CONFIG_SYSV_FS is not set
1347# CONFIG_UFS_FS is not set 1382# CONFIG_UFS_FS is not set
1348# CONFIG_NILFS2_FS is not set
1349CONFIG_NETWORK_FILESYSTEMS=y 1383CONFIG_NETWORK_FILESYSTEMS=y
1350CONFIG_NFS_FS=y 1384CONFIG_NFS_FS=y
1351CONFIG_NFS_V3=y 1385CONFIG_NFS_V3=y
@@ -1425,6 +1459,7 @@ CONFIG_ENABLE_WARN_DEPRECATED=y
1425# CONFIG_ENABLE_MUST_CHECK is not set 1459# CONFIG_ENABLE_MUST_CHECK is not set
1426CONFIG_FRAME_WARN=1024 1460CONFIG_FRAME_WARN=1024
1427CONFIG_MAGIC_SYSRQ=y 1461CONFIG_MAGIC_SYSRQ=y
1462# CONFIG_STRIP_ASM_SYMS is not set
1428CONFIG_UNUSED_SYMBOLS=y 1463CONFIG_UNUSED_SYMBOLS=y
1429# CONFIG_DEBUG_FS is not set 1464# CONFIG_DEBUG_FS is not set
1430# CONFIG_HEADERS_CHECK is not set 1465# CONFIG_HEADERS_CHECK is not set
@@ -1461,18 +1496,23 @@ CONFIG_DEBUG_INFO=y
1461# CONFIG_DEBUG_LIST is not set 1496# CONFIG_DEBUG_LIST is not set
1462# CONFIG_DEBUG_SG is not set 1497# CONFIG_DEBUG_SG is not set
1463# CONFIG_DEBUG_NOTIFIERS is not set 1498# CONFIG_DEBUG_NOTIFIERS is not set
1499# CONFIG_DEBUG_CREDENTIALS is not set
1464# CONFIG_FRAME_POINTER is not set 1500# CONFIG_FRAME_POINTER is not set
1465# CONFIG_RCU_TORTURE_TEST is not set 1501# CONFIG_RCU_TORTURE_TEST is not set
1466# CONFIG_RCU_CPU_STALL_DETECTOR is not set 1502# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1467# CONFIG_BACKTRACE_SELF_TEST is not set 1503# CONFIG_BACKTRACE_SELF_TEST is not set
1468# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set 1504# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
1505# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
1469# CONFIG_FAULT_INJECTION is not set 1506# CONFIG_FAULT_INJECTION is not set
1470# CONFIG_LATENCYTOP is not set 1507# CONFIG_LATENCYTOP is not set
1471CONFIG_SYSCTL_SYSCALL_CHECK=y 1508CONFIG_SYSCTL_SYSCALL_CHECK=y
1472# CONFIG_PAGE_POISONING is not set 1509# CONFIG_PAGE_POISONING is not set
1473CONFIG_HAVE_FUNCTION_TRACER=y 1510CONFIG_HAVE_FUNCTION_TRACER=y
1511CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1512CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
1474CONFIG_HAVE_DYNAMIC_FTRACE=y 1513CONFIG_HAVE_DYNAMIC_FTRACE=y
1475CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1514CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1515CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
1476CONFIG_TRACING_SUPPORT=y 1516CONFIG_TRACING_SUPPORT=y
1477CONFIG_FTRACE=y 1517CONFIG_FTRACE=y
1478# CONFIG_FUNCTION_TRACER is not set 1518# CONFIG_FUNCTION_TRACER is not set
@@ -1480,6 +1520,7 @@ CONFIG_FTRACE=y
1480# CONFIG_PREEMPT_TRACER is not set 1520# CONFIG_PREEMPT_TRACER is not set
1481# CONFIG_SCHED_TRACER is not set 1521# CONFIG_SCHED_TRACER is not set
1482# CONFIG_ENABLE_DEFAULT_TRACERS is not set 1522# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1523# CONFIG_FTRACE_SYSCALLS is not set
1483# CONFIG_BOOT_TRACER is not set 1524# CONFIG_BOOT_TRACER is not set
1484CONFIG_BRANCH_PROFILE_NONE=y 1525CONFIG_BRANCH_PROFILE_NONE=y
1485# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set 1526# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
@@ -1495,11 +1536,11 @@ CONFIG_HAVE_ARCH_KGDB=y
1495CONFIG_SH_STANDARD_BIOS=y 1536CONFIG_SH_STANDARD_BIOS=y
1496# CONFIG_EARLY_SCIF_CONSOLE is not set 1537# CONFIG_EARLY_SCIF_CONSOLE is not set
1497# CONFIG_EARLY_PRINTK is not set 1538# CONFIG_EARLY_PRINTK is not set
1498# CONFIG_DEBUG_BOOTMEM is not set 1539# CONFIG_STACK_DEBUG is not set
1499CONFIG_DEBUG_STACKOVERFLOW=y
1500# CONFIG_DEBUG_STACK_USAGE is not set 1540# CONFIG_DEBUG_STACK_USAGE is not set
1501# CONFIG_4KSTACKS is not set 1541# CONFIG_4KSTACKS is not set
1502CONFIG_DUMP_CODE=y 1542CONFIG_DUMP_CODE=y
1543# CONFIG_DWARF_UNWINDER is not set
1503# CONFIG_SH_NO_BSS_INIT is not set 1544# CONFIG_SH_NO_BSS_INIT is not set
1504 1545
1505# 1546#
@@ -1514,7 +1555,6 @@ CONFIG_CRYPTO=y
1514# 1555#
1515# Crypto core or helper 1556# Crypto core or helper
1516# 1557#
1517# CONFIG_CRYPTO_FIPS is not set
1518CONFIG_CRYPTO_ALGAPI=y 1558CONFIG_CRYPTO_ALGAPI=y
1519CONFIG_CRYPTO_ALGAPI2=y 1559CONFIG_CRYPTO_ALGAPI2=y
1520CONFIG_CRYPTO_HASH=y 1560CONFIG_CRYPTO_HASH=y
@@ -1550,11 +1590,13 @@ CONFIG_CRYPTO_HASH2=y
1550# 1590#
1551# CONFIG_CRYPTO_HMAC is not set 1591# CONFIG_CRYPTO_HMAC is not set
1552# CONFIG_CRYPTO_XCBC is not set 1592# CONFIG_CRYPTO_XCBC is not set
1593# CONFIG_CRYPTO_VMAC is not set
1553 1594
1554# 1595#
1555# Digest 1596# Digest
1556# 1597#
1557# CONFIG_CRYPTO_CRC32C is not set 1598# CONFIG_CRYPTO_CRC32C is not set
1599# CONFIG_CRYPTO_GHASH is not set
1558# CONFIG_CRYPTO_MD4 is not set 1600# CONFIG_CRYPTO_MD4 is not set
1559CONFIG_CRYPTO_MD5=y 1601CONFIG_CRYPTO_MD5=y
1560# CONFIG_CRYPTO_MICHAEL_MIC is not set 1602# CONFIG_CRYPTO_MICHAEL_MIC is not set
@@ -1617,5 +1659,6 @@ CONFIG_CRC32=y
1617CONFIG_HAS_IOMEM=y 1659CONFIG_HAS_IOMEM=y
1618CONFIG_HAS_IOPORT=y 1660CONFIG_HAS_IOPORT=y
1619CONFIG_HAS_DMA=y 1661CONFIG_HAS_DMA=y
1662CONFIG_HAVE_LMB=y
1620CONFIG_NLATTR=y 1663CONFIG_NLATTR=y
1621CONFIG_GENERIC_ATOMIC64=y 1664CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/se7206_defconfig b/arch/sh/configs/se7206_defconfig
index 8dd2f130e491..1cd1777aa436 100644
--- a/arch/sh/configs/se7206_defconfig
+++ b/arch/sh/configs/se7206_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.30 3# Linux kernel version: 2.6.31
4# Thu Jun 18 12:46:15 2009 4# Thu Sep 24 18:45:28 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -14,6 +14,7 @@ CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y 14CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
16CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_IRQ_PER_CPU=y
17# CONFIG_GENERIC_GPIO is not set 18# CONFIG_GENERIC_GPIO is not set
18CONFIG_GENERIC_TIME=y 19CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 20CONFIG_GENERIC_CLOCKEVENTS=y
@@ -28,7 +29,9 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
28# CONFIG_ARCH_HAS_ILOG2_U64 is not set 29# CONFIG_ARCH_HAS_ILOG2_U64 is not set
29CONFIG_ARCH_NO_VIRT_TO_BUS=y 30CONFIG_ARCH_NO_VIRT_TO_BUS=y
30CONFIG_ARCH_HAS_DEFAULT_IDLE=y 31CONFIG_ARCH_HAS_DEFAULT_IDLE=y
32CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
31CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 33CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
34CONFIG_CONSTRUCTORS=y
32 35
33# 36#
34# General setup 37# General setup
@@ -39,6 +42,12 @@ CONFIG_LOCK_KERNEL=y
39CONFIG_INIT_ENV_ARG_LIMIT=32 42CONFIG_INIT_ENV_ARG_LIMIT=32
40CONFIG_LOCALVERSION="" 43CONFIG_LOCALVERSION=""
41CONFIG_LOCALVERSION_AUTO=y 44CONFIG_LOCALVERSION_AUTO=y
45CONFIG_HAVE_KERNEL_GZIP=y
46CONFIG_HAVE_KERNEL_BZIP2=y
47CONFIG_HAVE_KERNEL_LZMA=y
48CONFIG_KERNEL_GZIP=y
49# CONFIG_KERNEL_BZIP2 is not set
50# CONFIG_KERNEL_LZMA is not set
42CONFIG_SYSVIPC=y 51CONFIG_SYSVIPC=y
43CONFIG_SYSVIPC_SYSCTL=y 52CONFIG_SYSVIPC_SYSCTL=y
44CONFIG_POSIX_MQUEUE=y 53CONFIG_POSIX_MQUEUE=y
@@ -53,12 +62,12 @@ CONFIG_AUDIT_TREE=y
53# 62#
54# RCU Subsystem 63# RCU Subsystem
55# 64#
56# CONFIG_CLASSIC_RCU is not set 65CONFIG_TREE_RCU=y
57# CONFIG_TREE_RCU is not set 66# CONFIG_TREE_PREEMPT_RCU is not set
58CONFIG_PREEMPT_RCU=y
59CONFIG_RCU_TRACE=y 67CONFIG_RCU_TRACE=y
60# CONFIG_TREE_RCU_TRACE is not set 68CONFIG_RCU_FANOUT=32
61CONFIG_PREEMPT_RCU_TRACE=y 69# CONFIG_RCU_FANOUT_EXACT is not set
70CONFIG_TREE_RCU_TRACE=y
62# CONFIG_IKCONFIG is not set 71# CONFIG_IKCONFIG is not set
63CONFIG_LOG_BUF_SHIFT=14 72CONFIG_LOG_BUF_SHIFT=14
64# CONFIG_GROUP_SCHED is not set 73# CONFIG_GROUP_SCHED is not set
@@ -105,19 +114,21 @@ CONFIG_SIGNALFD=y
105CONFIG_TIMERFD=y 114CONFIG_TIMERFD=y
106CONFIG_EVENTFD=y 115CONFIG_EVENTFD=y
107CONFIG_AIO=y 116CONFIG_AIO=y
117CONFIG_HAVE_PERF_EVENTS=y
108 118
109# 119#
110# Performance Counters 120# Kernel Performance Events And Counters
111# 121#
122CONFIG_PERF_EVENTS=y
123CONFIG_EVENT_PROFILE=y
124# CONFIG_PERF_COUNTERS is not set
112CONFIG_VM_EVENT_COUNTERS=y 125CONFIG_VM_EVENT_COUNTERS=y
113# CONFIG_STRIP_ASM_SYMS is not set
114# CONFIG_COMPAT_BRK is not set 126# CONFIG_COMPAT_BRK is not set
115# CONFIG_SLAB is not set 127# CONFIG_SLAB is not set
116# CONFIG_SLUB is not set 128# CONFIG_SLUB is not set
117CONFIG_SLOB=y 129CONFIG_SLOB=y
118CONFIG_PROFILING=y 130CONFIG_PROFILING=y
119CONFIG_TRACEPOINTS=y 131CONFIG_TRACEPOINTS=y
120CONFIG_MARKERS=y
121CONFIG_OPROFILE=y 132CONFIG_OPROFILE=y
122CONFIG_HAVE_OPROFILE=y 133CONFIG_HAVE_OPROFILE=y
123# CONFIG_KPROBES is not set 134# CONFIG_KPROBES is not set
@@ -126,6 +137,11 @@ CONFIG_HAVE_KRETPROBES=y
126CONFIG_HAVE_ARCH_TRACEHOOK=y 137CONFIG_HAVE_ARCH_TRACEHOOK=y
127CONFIG_HAVE_CLK=y 138CONFIG_HAVE_CLK=y
128CONFIG_HAVE_DMA_API_DEBUG=y 139CONFIG_HAVE_DMA_API_DEBUG=y
140
141#
142# GCOV-based kernel profiling
143#
144# CONFIG_GCOV_KERNEL is not set
129# CONFIG_SLOW_WORK is not set 145# CONFIG_SLOW_WORK is not set
130CONFIG_HAVE_GENERIC_DMA_COHERENT=y 146CONFIG_HAVE_GENERIC_DMA_COHERENT=y
131CONFIG_RT_MUTEXES=y 147CONFIG_RT_MUTEXES=y
@@ -137,7 +153,7 @@ CONFIG_MODULE_UNLOAD=y
137# CONFIG_MODVERSIONS is not set 153# CONFIG_MODVERSIONS is not set
138# CONFIG_MODULE_SRCVERSION_ALL is not set 154# CONFIG_MODULE_SRCVERSION_ALL is not set
139CONFIG_BLOCK=y 155CONFIG_BLOCK=y
140# CONFIG_LBD is not set 156CONFIG_LBDAF=y
141# CONFIG_BLK_DEV_BSG is not set 157# CONFIG_BLK_DEV_BSG is not set
142# CONFIG_BLK_DEV_INTEGRITY is not set 158# CONFIG_BLK_DEV_INTEGRITY is not set
143 159
@@ -185,6 +201,7 @@ CONFIG_CPU_SUBTYPE_SH7206=y
185# CONFIG_CPU_SUBTYPE_SH4_202 is not set 201# CONFIG_CPU_SUBTYPE_SH4_202 is not set
186# CONFIG_CPU_SUBTYPE_SH7723 is not set 202# CONFIG_CPU_SUBTYPE_SH7723 is not set
187# CONFIG_CPU_SUBTYPE_SH7724 is not set 203# CONFIG_CPU_SUBTYPE_SH7724 is not set
204# CONFIG_CPU_SUBTYPE_SH7757 is not set
188# CONFIG_CPU_SUBTYPE_SH7763 is not set 205# CONFIG_CPU_SUBTYPE_SH7763 is not set
189# CONFIG_CPU_SUBTYPE_SH7770 is not set 206# CONFIG_CPU_SUBTYPE_SH7770 is not set
190# CONFIG_CPU_SUBTYPE_SH7780 is not set 207# CONFIG_CPU_SUBTYPE_SH7780 is not set
@@ -319,7 +336,8 @@ CONFIG_GUSA=y
319CONFIG_ZERO_PAGE_OFFSET=0x00001000 336CONFIG_ZERO_PAGE_OFFSET=0x00001000
320CONFIG_BOOT_LINK_OFFSET=0x00800000 337CONFIG_BOOT_LINK_OFFSET=0x00800000
321CONFIG_ENTRY_OFFSET=0x00001000 338CONFIG_ENTRY_OFFSET=0x00001000
322CONFIG_CMDLINE_BOOL=y 339CONFIG_CMDLINE_OVERWRITE=y
340# CONFIG_CMDLINE_EXTEND is not set
323CONFIG_CMDLINE="console=ttySC3,115200 ignore_loglevel earlyprintk=serial" 341CONFIG_CMDLINE="console=ttySC3,115200 ignore_loglevel earlyprintk=serial"
324 342
325# 343#
@@ -389,6 +407,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
389# CONFIG_NETFILTER is not set 407# CONFIG_NETFILTER is not set
390# CONFIG_IP_DCCP is not set 408# CONFIG_IP_DCCP is not set
391# CONFIG_IP_SCTP is not set 409# CONFIG_IP_SCTP is not set
410# CONFIG_RDS is not set
392# CONFIG_TIPC is not set 411# CONFIG_TIPC is not set
393# CONFIG_ATM is not set 412# CONFIG_ATM is not set
394# CONFIG_BRIDGE is not set 413# CONFIG_BRIDGE is not set
@@ -419,6 +438,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
419# CONFIG_AF_RXRPC is not set 438# CONFIG_AF_RXRPC is not set
420CONFIG_WIRELESS=y 439CONFIG_WIRELESS=y
421# CONFIG_CFG80211 is not set 440# CONFIG_CFG80211 is not set
441CONFIG_CFG80211_DEFAULT_PS_VALUE=0
422# CONFIG_WIRELESS_OLD_REGULATORY is not set 442# CONFIG_WIRELESS_OLD_REGULATORY is not set
423# CONFIG_WIRELESS_EXT is not set 443# CONFIG_WIRELESS_EXT is not set
424# CONFIG_LIB80211 is not set 444# CONFIG_LIB80211 is not set
@@ -426,7 +446,6 @@ CONFIG_WIRELESS=y
426# 446#
427# CFG80211 needs to be enabled for MAC80211 447# CFG80211 needs to be enabled for MAC80211
428# 448#
429CONFIG_MAC80211_DEFAULT_PS_VALUE=0
430# CONFIG_WIMAX is not set 449# CONFIG_WIMAX is not set
431# CONFIG_RFKILL is not set 450# CONFIG_RFKILL is not set
432# CONFIG_NET_9P is not set 451# CONFIG_NET_9P is not set
@@ -448,9 +467,9 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
448# CONFIG_CONNECTOR is not set 467# CONFIG_CONNECTOR is not set
449CONFIG_MTD=y 468CONFIG_MTD=y
450# CONFIG_MTD_DEBUG is not set 469# CONFIG_MTD_DEBUG is not set
470# CONFIG_MTD_TESTS is not set
451CONFIG_MTD_CONCAT=y 471CONFIG_MTD_CONCAT=y
452CONFIG_MTD_PARTITIONS=y 472CONFIG_MTD_PARTITIONS=y
453# CONFIG_MTD_TESTS is not set
454# CONFIG_MTD_REDBOOT_PARTS is not set 473# CONFIG_MTD_REDBOOT_PARTS is not set
455# CONFIG_MTD_CMDLINE_PARTS is not set 474# CONFIG_MTD_CMDLINE_PARTS is not set
456# CONFIG_MTD_AR7_PARTS is not set 475# CONFIG_MTD_AR7_PARTS is not set
@@ -588,10 +607,7 @@ CONFIG_SMC91X=y
588# CONFIG_KS8842 is not set 607# CONFIG_KS8842 is not set
589# CONFIG_NETDEV_1000 is not set 608# CONFIG_NETDEV_1000 is not set
590# CONFIG_NETDEV_10000 is not set 609# CONFIG_NETDEV_10000 is not set
591 610CONFIG_WLAN=y
592#
593# Wireless LAN
594#
595# CONFIG_WLAN_PRE80211 is not set 611# CONFIG_WLAN_PRE80211 is not set
596# CONFIG_WLAN_80211 is not set 612# CONFIG_WLAN_80211 is not set
597 613
@@ -647,11 +663,15 @@ CONFIG_SERIAL_CORE_CONSOLE=y
647# CONFIG_TCG_TPM is not set 663# CONFIG_TCG_TPM is not set
648# CONFIG_I2C is not set 664# CONFIG_I2C is not set
649# CONFIG_SPI is not set 665# CONFIG_SPI is not set
666
667#
668# PPS support
669#
670# CONFIG_PPS is not set
650# CONFIG_W1 is not set 671# CONFIG_W1 is not set
651# CONFIG_POWER_SUPPLY is not set 672# CONFIG_POWER_SUPPLY is not set
652# CONFIG_HWMON is not set 673# CONFIG_HWMON is not set
653# CONFIG_THERMAL is not set 674# CONFIG_THERMAL is not set
654# CONFIG_THERMAL_HWMON is not set
655# CONFIG_WATCHDOG is not set 675# CONFIG_WATCHDOG is not set
656CONFIG_SSB_POSSIBLE=y 676CONFIG_SSB_POSSIBLE=y
657 677
@@ -746,8 +766,10 @@ CONFIG_EXT2_FS=y
746# CONFIG_JFS_FS is not set 766# CONFIG_JFS_FS is not set
747# CONFIG_FS_POSIX_ACL is not set 767# CONFIG_FS_POSIX_ACL is not set
748# CONFIG_XFS_FS is not set 768# CONFIG_XFS_FS is not set
769# CONFIG_GFS2_FS is not set
749# CONFIG_OCFS2_FS is not set 770# CONFIG_OCFS2_FS is not set
750# CONFIG_BTRFS_FS is not set 771# CONFIG_BTRFS_FS is not set
772# CONFIG_NILFS2_FS is not set
751CONFIG_FILE_LOCKING=y 773CONFIG_FILE_LOCKING=y
752CONFIG_FSNOTIFY=y 774CONFIG_FSNOTIFY=y
753# CONFIG_DNOTIFY is not set 775# CONFIG_DNOTIFY is not set
@@ -782,8 +804,6 @@ CONFIG_INOTIFY_USER=y
782CONFIG_PROC_FS=y 804CONFIG_PROC_FS=y
783CONFIG_PROC_SYSCTL=y 805CONFIG_PROC_SYSCTL=y
784CONFIG_SYSFS=y 806CONFIG_SYSFS=y
785CONFIG_TMPFS=y
786# CONFIG_TMPFS_POSIX_ACL is not set
787# CONFIG_HUGETLB_PAGE is not set 807# CONFIG_HUGETLB_PAGE is not set
788CONFIG_CONFIGFS_FS=y 808CONFIG_CONFIGFS_FS=y
789CONFIG_MISC_FILESYSTEMS=y 809CONFIG_MISC_FILESYSTEMS=y
@@ -809,7 +829,6 @@ CONFIG_ROMFS_BACKED_BY_BLOCK=y
809CONFIG_ROMFS_ON_BLOCK=y 829CONFIG_ROMFS_ON_BLOCK=y
810# CONFIG_SYSV_FS is not set 830# CONFIG_SYSV_FS is not set
811# CONFIG_UFS_FS is not set 831# CONFIG_UFS_FS is not set
812# CONFIG_NILFS2_FS is not set
813CONFIG_NETWORK_FILESYSTEMS=y 832CONFIG_NETWORK_FILESYSTEMS=y
814CONFIG_NFS_FS=y 833CONFIG_NFS_FS=y
815CONFIG_NFS_V3=y 834CONFIG_NFS_V3=y
@@ -846,6 +865,7 @@ CONFIG_ENABLE_WARN_DEPRECATED=y
846# CONFIG_ENABLE_MUST_CHECK is not set 865# CONFIG_ENABLE_MUST_CHECK is not set
847CONFIG_FRAME_WARN=1024 866CONFIG_FRAME_WARN=1024
848# CONFIG_MAGIC_SYSRQ is not set 867# CONFIG_MAGIC_SYSRQ is not set
868# CONFIG_STRIP_ASM_SYMS is not set
849# CONFIG_UNUSED_SYMBOLS is not set 869# CONFIG_UNUSED_SYMBOLS is not set
850CONFIG_DEBUG_FS=y 870CONFIG_DEBUG_FS=y
851# CONFIG_HEADERS_CHECK is not set 871# CONFIG_HEADERS_CHECK is not set
@@ -882,20 +902,27 @@ CONFIG_DEBUG_VM=y
882CONFIG_DEBUG_LIST=y 902CONFIG_DEBUG_LIST=y
883# CONFIG_DEBUG_SG is not set 903# CONFIG_DEBUG_SG is not set
884# CONFIG_DEBUG_NOTIFIERS is not set 904# CONFIG_DEBUG_NOTIFIERS is not set
905# CONFIG_DEBUG_CREDENTIALS is not set
885CONFIG_FRAME_POINTER=y 906CONFIG_FRAME_POINTER=y
886# CONFIG_RCU_TORTURE_TEST is not set 907# CONFIG_RCU_TORTURE_TEST is not set
908# CONFIG_RCU_CPU_STALL_DETECTOR is not set
887# CONFIG_BACKTRACE_SELF_TEST is not set 909# CONFIG_BACKTRACE_SELF_TEST is not set
888# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set 910# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
911# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
889# CONFIG_FAULT_INJECTION is not set 912# CONFIG_FAULT_INJECTION is not set
890# CONFIG_LATENCYTOP is not set 913# CONFIG_LATENCYTOP is not set
891# CONFIG_PAGE_POISONING is not set 914# CONFIG_PAGE_POISONING is not set
892CONFIG_NOP_TRACER=y 915CONFIG_NOP_TRACER=y
893CONFIG_HAVE_FUNCTION_TRACER=y 916CONFIG_HAVE_FUNCTION_TRACER=y
917CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
918CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
894CONFIG_HAVE_DYNAMIC_FTRACE=y 919CONFIG_HAVE_DYNAMIC_FTRACE=y
895CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 920CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
921CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
896CONFIG_RING_BUFFER=y 922CONFIG_RING_BUFFER=y
897CONFIG_EVENT_TRACING=y 923CONFIG_EVENT_TRACING=y
898CONFIG_CONTEXT_SWITCH_TRACER=y 924CONFIG_CONTEXT_SWITCH_TRACER=y
925CONFIG_RING_BUFFER_ALLOW_SWAP=y
899CONFIG_TRACING=y 926CONFIG_TRACING=y
900CONFIG_TRACING_SUPPORT=y 927CONFIG_TRACING_SUPPORT=y
901CONFIG_FTRACE=y 928CONFIG_FTRACE=y
@@ -904,6 +931,7 @@ CONFIG_FTRACE=y
904# CONFIG_PREEMPT_TRACER is not set 931# CONFIG_PREEMPT_TRACER is not set
905# CONFIG_SCHED_TRACER is not set 932# CONFIG_SCHED_TRACER is not set
906# CONFIG_ENABLE_DEFAULT_TRACERS is not set 933# CONFIG_ENABLE_DEFAULT_TRACERS is not set
934# CONFIG_FTRACE_SYSCALLS is not set
907# CONFIG_BOOT_TRACER is not set 935# CONFIG_BOOT_TRACER is not set
908CONFIG_BRANCH_PROFILE_NONE=y 936CONFIG_BRANCH_PROFILE_NONE=y
909# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set 937# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
@@ -920,10 +948,10 @@ CONFIG_HAVE_ARCH_KGDB=y
920# CONFIG_KGDB is not set 948# CONFIG_KGDB is not set
921# CONFIG_SH_STANDARD_BIOS is not set 949# CONFIG_SH_STANDARD_BIOS is not set
922# CONFIG_EARLY_SCIF_CONSOLE is not set 950# CONFIG_EARLY_SCIF_CONSOLE is not set
923# CONFIG_DEBUG_BOOTMEM is not set 951# CONFIG_STACK_DEBUG is not set
924CONFIG_DEBUG_STACKOVERFLOW=y
925CONFIG_DEBUG_STACK_USAGE=y 952CONFIG_DEBUG_STACK_USAGE=y
926CONFIG_DUMP_CODE=y 953CONFIG_DUMP_CODE=y
954# CONFIG_DWARF_UNWINDER is not set
927# CONFIG_SH_NO_BSS_INIT is not set 955# CONFIG_SH_NO_BSS_INIT is not set
928 956
929# 957#
@@ -938,7 +966,6 @@ CONFIG_CRYPTO=y
938# 966#
939# Crypto core or helper 967# Crypto core or helper
940# 968#
941# CONFIG_CRYPTO_FIPS is not set
942CONFIG_CRYPTO_ALGAPI=y 969CONFIG_CRYPTO_ALGAPI=y
943CONFIG_CRYPTO_ALGAPI2=y 970CONFIG_CRYPTO_ALGAPI2=y
944CONFIG_CRYPTO_HASH=y 971CONFIG_CRYPTO_HASH=y
@@ -974,11 +1001,13 @@ CONFIG_CRYPTO_HASH2=y
974# 1001#
975# CONFIG_CRYPTO_HMAC is not set 1002# CONFIG_CRYPTO_HMAC is not set
976# CONFIG_CRYPTO_XCBC is not set 1003# CONFIG_CRYPTO_XCBC is not set
1004# CONFIG_CRYPTO_VMAC is not set
977 1005
978# 1006#
979# Digest 1007# Digest
980# 1008#
981CONFIG_CRYPTO_CRC32C=y 1009CONFIG_CRYPTO_CRC32C=y
1010# CONFIG_CRYPTO_GHASH is not set
982# CONFIG_CRYPTO_MD4 is not set 1011# CONFIG_CRYPTO_MD4 is not set
983# CONFIG_CRYPTO_MD5 is not set 1012# CONFIG_CRYPTO_MD5 is not set
984# CONFIG_CRYPTO_MICHAEL_MIC is not set 1013# CONFIG_CRYPTO_MICHAEL_MIC is not set
@@ -1046,5 +1075,6 @@ CONFIG_DECOMPRESS_GZIP=y
1046CONFIG_HAS_IOMEM=y 1075CONFIG_HAS_IOMEM=y
1047CONFIG_HAS_IOPORT=y 1076CONFIG_HAS_IOPORT=y
1048CONFIG_HAS_DMA=y 1077CONFIG_HAS_DMA=y
1078CONFIG_HAVE_LMB=y
1049CONFIG_NLATTR=y 1079CONFIG_NLATTR=y
1050CONFIG_GENERIC_ATOMIC64=y 1080CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/se7343_defconfig b/arch/sh/configs/se7343_defconfig
index 18f46debf92a..5531444b808c 100644
--- a/arch/sh/configs/se7343_defconfig
+++ b/arch/sh/configs/se7343_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.30 3# Linux kernel version: 2.6.31
4# Thu Jun 18 12:47:07 2009 4# Thu Sep 24 18:46:55 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -14,6 +14,7 @@ CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y 14CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
16CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_IRQ_PER_CPU=y
17# CONFIG_GENERIC_GPIO is not set 18# CONFIG_GENERIC_GPIO is not set
18CONFIG_GENERIC_TIME=y 19CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 20CONFIG_GENERIC_CLOCKEVENTS=y
@@ -28,7 +29,9 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
28# CONFIG_ARCH_HAS_ILOG2_U64 is not set 29# CONFIG_ARCH_HAS_ILOG2_U64 is not set
29CONFIG_ARCH_NO_VIRT_TO_BUS=y 30CONFIG_ARCH_NO_VIRT_TO_BUS=y
30CONFIG_ARCH_HAS_DEFAULT_IDLE=y 31CONFIG_ARCH_HAS_DEFAULT_IDLE=y
32CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
31CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 33CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
34CONFIG_CONSTRUCTORS=y
32 35
33# 36#
34# General setup 37# General setup
@@ -38,6 +41,12 @@ CONFIG_BROKEN_ON_SMP=y
38CONFIG_INIT_ENV_ARG_LIMIT=32 41CONFIG_INIT_ENV_ARG_LIMIT=32
39CONFIG_LOCALVERSION="" 42CONFIG_LOCALVERSION=""
40CONFIG_LOCALVERSION_AUTO=y 43CONFIG_LOCALVERSION_AUTO=y
44CONFIG_HAVE_KERNEL_GZIP=y
45CONFIG_HAVE_KERNEL_BZIP2=y
46CONFIG_HAVE_KERNEL_LZMA=y
47CONFIG_KERNEL_GZIP=y
48# CONFIG_KERNEL_BZIP2 is not set
49# CONFIG_KERNEL_LZMA is not set
41# CONFIG_SWAP is not set 50# CONFIG_SWAP is not set
42CONFIG_SYSVIPC=y 51CONFIG_SYSVIPC=y
43CONFIG_SYSVIPC_SYSCTL=y 52CONFIG_SYSVIPC_SYSCTL=y
@@ -50,11 +59,12 @@ CONFIG_POSIX_MQUEUE_SYSCTL=y
50# 59#
51# RCU Subsystem 60# RCU Subsystem
52# 61#
53CONFIG_CLASSIC_RCU=y 62CONFIG_TREE_RCU=y
54# CONFIG_TREE_RCU is not set 63# CONFIG_TREE_PREEMPT_RCU is not set
55# CONFIG_PREEMPT_RCU is not set 64# CONFIG_RCU_TRACE is not set
65CONFIG_RCU_FANOUT=32
66# CONFIG_RCU_FANOUT_EXACT is not set
56# CONFIG_TREE_RCU_TRACE is not set 67# CONFIG_TREE_RCU_TRACE is not set
57# CONFIG_PREEMPT_RCU_TRACE is not set
58# CONFIG_IKCONFIG is not set 68# CONFIG_IKCONFIG is not set
59CONFIG_LOG_BUF_SHIFT=14 69CONFIG_LOG_BUF_SHIFT=14
60CONFIG_GROUP_SCHED=y 70CONFIG_GROUP_SCHED=y
@@ -88,18 +98,19 @@ CONFIG_TIMERFD=y
88CONFIG_EVENTFD=y 98CONFIG_EVENTFD=y
89# CONFIG_SHMEM is not set 99# CONFIG_SHMEM is not set
90CONFIG_AIO=y 100CONFIG_AIO=y
101CONFIG_HAVE_PERF_EVENTS=y
91 102
92# 103#
93# Performance Counters 104# Kernel Performance Events And Counters
94# 105#
106# CONFIG_PERF_EVENTS is not set
107# CONFIG_PERF_COUNTERS is not set
95CONFIG_VM_EVENT_COUNTERS=y 108CONFIG_VM_EVENT_COUNTERS=y
96# CONFIG_STRIP_ASM_SYMS is not set
97CONFIG_COMPAT_BRK=y 109CONFIG_COMPAT_BRK=y
98CONFIG_SLAB=y 110CONFIG_SLAB=y
99# CONFIG_SLUB is not set 111# CONFIG_SLUB is not set
100# CONFIG_SLOB is not set 112# CONFIG_SLOB is not set
101# CONFIG_PROFILING is not set 113# CONFIG_PROFILING is not set
102# CONFIG_MARKERS is not set
103CONFIG_HAVE_OPROFILE=y 114CONFIG_HAVE_OPROFILE=y
104# CONFIG_KPROBES is not set 115# CONFIG_KPROBES is not set
105CONFIG_HAVE_IOREMAP_PROT=y 116CONFIG_HAVE_IOREMAP_PROT=y
@@ -108,6 +119,10 @@ CONFIG_HAVE_KRETPROBES=y
108CONFIG_HAVE_ARCH_TRACEHOOK=y 119CONFIG_HAVE_ARCH_TRACEHOOK=y
109CONFIG_HAVE_CLK=y 120CONFIG_HAVE_CLK=y
110CONFIG_HAVE_DMA_API_DEBUG=y 121CONFIG_HAVE_DMA_API_DEBUG=y
122
123#
124# GCOV-based kernel profiling
125#
111# CONFIG_SLOW_WORK is not set 126# CONFIG_SLOW_WORK is not set
112CONFIG_HAVE_GENERIC_DMA_COHERENT=y 127CONFIG_HAVE_GENERIC_DMA_COHERENT=y
113CONFIG_SLABINFO=y 128CONFIG_SLABINFO=y
@@ -119,7 +134,7 @@ CONFIG_MODULE_FORCE_UNLOAD=y
119# CONFIG_MODVERSIONS is not set 134# CONFIG_MODVERSIONS is not set
120# CONFIG_MODULE_SRCVERSION_ALL is not set 135# CONFIG_MODULE_SRCVERSION_ALL is not set
121CONFIG_BLOCK=y 136CONFIG_BLOCK=y
122# CONFIG_LBD is not set 137CONFIG_LBDAF=y
123# CONFIG_BLK_DEV_BSG is not set 138# CONFIG_BLK_DEV_BSG is not set
124# CONFIG_BLK_DEV_INTEGRITY is not set 139# CONFIG_BLK_DEV_INTEGRITY is not set
125 140
@@ -135,7 +150,7 @@ CONFIG_DEFAULT_DEADLINE=y
135# CONFIG_DEFAULT_CFQ is not set 150# CONFIG_DEFAULT_CFQ is not set
136# CONFIG_DEFAULT_NOOP is not set 151# CONFIG_DEFAULT_NOOP is not set
137CONFIG_DEFAULT_IOSCHED="deadline" 152CONFIG_DEFAULT_IOSCHED="deadline"
138# CONFIG_FREEZER is not set 153CONFIG_FREEZER=y
139 154
140# 155#
141# System type 156# System type
@@ -169,6 +184,7 @@ CONFIG_ARCH_SHMOBILE=y
169# CONFIG_CPU_SUBTYPE_SH4_202 is not set 184# CONFIG_CPU_SUBTYPE_SH4_202 is not set
170# CONFIG_CPU_SUBTYPE_SH7723 is not set 185# CONFIG_CPU_SUBTYPE_SH7723 is not set
171# CONFIG_CPU_SUBTYPE_SH7724 is not set 186# CONFIG_CPU_SUBTYPE_SH7724 is not set
187# CONFIG_CPU_SUBTYPE_SH7757 is not set
172# CONFIG_CPU_SUBTYPE_SH7763 is not set 188# CONFIG_CPU_SUBTYPE_SH7763 is not set
173# CONFIG_CPU_SUBTYPE_SH7770 is not set 189# CONFIG_CPU_SUBTYPE_SH7770 is not set
174# CONFIG_CPU_SUBTYPE_SH7780 is not set 190# CONFIG_CPU_SUBTYPE_SH7780 is not set
@@ -214,6 +230,7 @@ CONFIG_ZONE_DMA_FLAG=0
214CONFIG_NR_QUICK=2 230CONFIG_NR_QUICK=2
215CONFIG_HAVE_MLOCK=y 231CONFIG_HAVE_MLOCK=y
216CONFIG_HAVE_MLOCKED_PAGE_BIT=y 232CONFIG_HAVE_MLOCKED_PAGE_BIT=y
233# CONFIG_KSM is not set
217CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 234CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
218 235
219# 236#
@@ -296,7 +313,8 @@ CONFIG_GUSA=y
296CONFIG_ZERO_PAGE_OFFSET=0x00001000 313CONFIG_ZERO_PAGE_OFFSET=0x00001000
297CONFIG_BOOT_LINK_OFFSET=0x00800000 314CONFIG_BOOT_LINK_OFFSET=0x00800000
298CONFIG_ENTRY_OFFSET=0x00001000 315CONFIG_ENTRY_OFFSET=0x00001000
299CONFIG_CMDLINE_BOOL=y 316CONFIG_CMDLINE_OVERWRITE=y
317# CONFIG_CMDLINE_EXTEND is not set
300CONFIG_CMDLINE="console=ttySC0,115200" 318CONFIG_CMDLINE="console=ttySC0,115200"
301 319
302# 320#
@@ -316,7 +334,12 @@ CONFIG_BINFMT_ELF=y
316# 334#
317# Power management options (EXPERIMENTAL) 335# Power management options (EXPERIMENTAL)
318# 336#
319# CONFIG_PM is not set 337CONFIG_PM=y
338# CONFIG_PM_DEBUG is not set
339CONFIG_PM_SLEEP=y
340CONFIG_SUSPEND=y
341CONFIG_SUSPEND_FREEZER=y
342CONFIG_PM_RUNTIME=y
320# CONFIG_CPU_IDLE is not set 343# CONFIG_CPU_IDLE is not set
321CONFIG_NET=y 344CONFIG_NET=y
322 345
@@ -360,6 +383,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
360# CONFIG_NETFILTER is not set 383# CONFIG_NETFILTER is not set
361# CONFIG_IP_DCCP is not set 384# CONFIG_IP_DCCP is not set
362# CONFIG_IP_SCTP is not set 385# CONFIG_IP_SCTP is not set
386# CONFIG_RDS is not set
363# CONFIG_TIPC is not set 387# CONFIG_TIPC is not set
364# CONFIG_ATM is not set 388# CONFIG_ATM is not set
365# CONFIG_BRIDGE is not set 389# CONFIG_BRIDGE is not set
@@ -389,6 +413,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
389# CONFIG_AF_RXRPC is not set 413# CONFIG_AF_RXRPC is not set
390CONFIG_WIRELESS=y 414CONFIG_WIRELESS=y
391# CONFIG_CFG80211 is not set 415# CONFIG_CFG80211 is not set
416CONFIG_CFG80211_DEFAULT_PS_VALUE=0
392# CONFIG_WIRELESS_OLD_REGULATORY is not set 417# CONFIG_WIRELESS_OLD_REGULATORY is not set
393# CONFIG_WIRELESS_EXT is not set 418# CONFIG_WIRELESS_EXT is not set
394# CONFIG_LIB80211 is not set 419# CONFIG_LIB80211 is not set
@@ -396,7 +421,6 @@ CONFIG_WIRELESS=y
396# 421#
397# CFG80211 needs to be enabled for MAC80211 422# CFG80211 needs to be enabled for MAC80211
398# 423#
399CONFIG_MAC80211_DEFAULT_PS_VALUE=0
400# CONFIG_WIMAX is not set 424# CONFIG_WIMAX is not set
401# CONFIG_RFKILL is not set 425# CONFIG_RFKILL is not set
402# CONFIG_NET_9P is not set 426# CONFIG_NET_9P is not set
@@ -418,9 +442,9 @@ CONFIG_EXTRA_FIRMWARE=""
418# CONFIG_CONNECTOR is not set 442# CONFIG_CONNECTOR is not set
419CONFIG_MTD=y 443CONFIG_MTD=y
420# CONFIG_MTD_DEBUG is not set 444# CONFIG_MTD_DEBUG is not set
445# CONFIG_MTD_TESTS is not set
421CONFIG_MTD_CONCAT=y 446CONFIG_MTD_CONCAT=y
422CONFIG_MTD_PARTITIONS=y 447CONFIG_MTD_PARTITIONS=y
423# CONFIG_MTD_TESTS is not set
424# CONFIG_MTD_REDBOOT_PARTS is not set 448# CONFIG_MTD_REDBOOT_PARTS is not set
425# CONFIG_MTD_CMDLINE_PARTS is not set 449# CONFIG_MTD_CMDLINE_PARTS is not set
426# CONFIG_MTD_AR7_PARTS is not set 450# CONFIG_MTD_AR7_PARTS is not set
@@ -560,10 +584,7 @@ CONFIG_NETDEVICES=y
560CONFIG_MII=y 584CONFIG_MII=y
561# CONFIG_NETDEV_1000 is not set 585# CONFIG_NETDEV_1000 is not set
562# CONFIG_NETDEV_10000 is not set 586# CONFIG_NETDEV_10000 is not set
563 587CONFIG_WLAN=y
564#
565# Wireless LAN
566#
567# CONFIG_WLAN_PRE80211 is not set 588# CONFIG_WLAN_PRE80211 is not set
568# CONFIG_WLAN_80211 is not set 589# CONFIG_WLAN_80211 is not set
569 590
@@ -671,6 +692,7 @@ CONFIG_HW_RANDOM=y
671# CONFIG_TCG_TPM is not set 692# CONFIG_TCG_TPM is not set
672CONFIG_I2C=y 693CONFIG_I2C=y
673CONFIG_I2C_BOARDINFO=y 694CONFIG_I2C_BOARDINFO=y
695CONFIG_I2C_COMPAT=y
674# CONFIG_I2C_CHARDEV is not set 696# CONFIG_I2C_CHARDEV is not set
675CONFIG_I2C_HELPER_AUTO=y 697CONFIG_I2C_HELPER_AUTO=y
676 698
@@ -681,6 +703,7 @@ CONFIG_I2C_HELPER_AUTO=y
681# 703#
682# I2C system bus drivers (mostly embedded / system-on-chip) 704# I2C system bus drivers (mostly embedded / system-on-chip)
683# 705#
706# CONFIG_I2C_DESIGNWARE is not set
684# CONFIG_I2C_OCORES is not set 707# CONFIG_I2C_OCORES is not set
685CONFIG_I2C_SH_MOBILE=y 708CONFIG_I2C_SH_MOBILE=y
686# CONFIG_I2C_SIMTEC is not set 709# CONFIG_I2C_SIMTEC is not set
@@ -702,20 +725,21 @@ CONFIG_I2C_SH_MOBILE=y
702# Miscellaneous I2C Chip support 725# Miscellaneous I2C Chip support
703# 726#
704# CONFIG_DS1682 is not set 727# CONFIG_DS1682 is not set
705# CONFIG_SENSORS_PCF8574 is not set
706# CONFIG_PCF8575 is not set
707# CONFIG_SENSORS_PCA9539 is not set
708# CONFIG_SENSORS_TSL2550 is not set 728# CONFIG_SENSORS_TSL2550 is not set
709# CONFIG_I2C_DEBUG_CORE is not set 729# CONFIG_I2C_DEBUG_CORE is not set
710# CONFIG_I2C_DEBUG_ALGO is not set 730# CONFIG_I2C_DEBUG_ALGO is not set
711# CONFIG_I2C_DEBUG_BUS is not set 731# CONFIG_I2C_DEBUG_BUS is not set
712# CONFIG_I2C_DEBUG_CHIP is not set 732# CONFIG_I2C_DEBUG_CHIP is not set
713# CONFIG_SPI is not set 733# CONFIG_SPI is not set
734
735#
736# PPS support
737#
738# CONFIG_PPS is not set
714# CONFIG_W1 is not set 739# CONFIG_W1 is not set
715# CONFIG_POWER_SUPPLY is not set 740# CONFIG_POWER_SUPPLY is not set
716# CONFIG_HWMON is not set 741# CONFIG_HWMON is not set
717# CONFIG_THERMAL is not set 742# CONFIG_THERMAL is not set
718# CONFIG_THERMAL_HWMON is not set
719# CONFIG_WATCHDOG is not set 743# CONFIG_WATCHDOG is not set
720CONFIG_SSB_POSSIBLE=y 744CONFIG_SSB_POSSIBLE=y
721 745
@@ -734,8 +758,10 @@ CONFIG_SSB_POSSIBLE=y
734# CONFIG_MFD_TMIO is not set 758# CONFIG_MFD_TMIO is not set
735# CONFIG_PMIC_DA903X is not set 759# CONFIG_PMIC_DA903X is not set
736# CONFIG_MFD_WM8400 is not set 760# CONFIG_MFD_WM8400 is not set
761# CONFIG_MFD_WM831X is not set
737# CONFIG_MFD_WM8350_I2C is not set 762# CONFIG_MFD_WM8350_I2C is not set
738# CONFIG_MFD_PCF50633 is not set 763# CONFIG_MFD_PCF50633 is not set
764# CONFIG_AB3100_CORE is not set
739# CONFIG_REGULATOR is not set 765# CONFIG_REGULATOR is not set
740# CONFIG_MEDIA_SUPPORT is not set 766# CONFIG_MEDIA_SUPPORT is not set
741 767
@@ -788,6 +814,7 @@ CONFIG_DUMMY_CONSOLE=y
788# CONFIG_LOGO is not set 814# CONFIG_LOGO is not set
789CONFIG_SOUND=y 815CONFIG_SOUND=y
790CONFIG_SOUND_OSS_CORE=y 816CONFIG_SOUND_OSS_CORE=y
817CONFIG_SOUND_OSS_CORE_PRECLAIM=y
791CONFIG_SND=y 818CONFIG_SND=y
792CONFIG_SND_TIMER=y 819CONFIG_SND_TIMER=y
793CONFIG_SND_PCM=y 820CONFIG_SND_PCM=y
@@ -822,7 +849,6 @@ CONFIG_SND_USB=y
822# CONFIG_SOUND_PRIME is not set 849# CONFIG_SOUND_PRIME is not set
823CONFIG_HID_SUPPORT=y 850CONFIG_HID_SUPPORT=y
824CONFIG_HID=y 851CONFIG_HID=y
825# CONFIG_HID_DEBUG is not set
826# CONFIG_HIDRAW is not set 852# CONFIG_HIDRAW is not set
827 853
828# 854#
@@ -845,6 +871,7 @@ CONFIG_HID_CYPRESS=y
845CONFIG_HID_EZKEY=y 871CONFIG_HID_EZKEY=y
846# CONFIG_HID_KYE is not set 872# CONFIG_HID_KYE is not set
847CONFIG_HID_GYRATION=y 873CONFIG_HID_GYRATION=y
874# CONFIG_HID_TWINHAN is not set
848# CONFIG_HID_KENSINGTON is not set 875# CONFIG_HID_KENSINGTON is not set
849CONFIG_HID_LOGITECH=y 876CONFIG_HID_LOGITECH=y
850# CONFIG_LOGITECH_FF is not set 877# CONFIG_LOGITECH_FF is not set
@@ -877,6 +904,7 @@ CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
877CONFIG_USB_DEVICEFS=y 904CONFIG_USB_DEVICEFS=y
878CONFIG_USB_DEVICE_CLASS=y 905CONFIG_USB_DEVICE_CLASS=y
879# CONFIG_USB_DYNAMIC_MINORS is not set 906# CONFIG_USB_DYNAMIC_MINORS is not set
907# CONFIG_USB_SUSPEND is not set
880# CONFIG_USB_OTG is not set 908# CONFIG_USB_OTG is not set
881# CONFIG_USB_OTG_WHITELIST is not set 909# CONFIG_USB_OTG_WHITELIST is not set
882# CONFIG_USB_OTG_BLACKLIST_HUB is not set 910# CONFIG_USB_OTG_BLACKLIST_HUB is not set
@@ -891,6 +919,7 @@ CONFIG_USB_DEVICE_CLASS=y
891# CONFIG_USB_OXU210HP_HCD is not set 919# CONFIG_USB_OXU210HP_HCD is not set
892CONFIG_USB_ISP116X_HCD=y 920CONFIG_USB_ISP116X_HCD=y
893# CONFIG_USB_ISP1760_HCD is not set 921# CONFIG_USB_ISP1760_HCD is not set
922# CONFIG_USB_ISP1362_HCD is not set
894# CONFIG_USB_SL811_HCD is not set 923# CONFIG_USB_SL811_HCD is not set
895# CONFIG_USB_R8A66597_HCD is not set 924# CONFIG_USB_R8A66597_HCD is not set
896# CONFIG_USB_HWA_HCD is not set 925# CONFIG_USB_HWA_HCD is not set
@@ -990,8 +1019,10 @@ CONFIG_FS_MBCACHE=y
990# CONFIG_JFS_FS is not set 1019# CONFIG_JFS_FS is not set
991# CONFIG_FS_POSIX_ACL is not set 1020# CONFIG_FS_POSIX_ACL is not set
992# CONFIG_XFS_FS is not set 1021# CONFIG_XFS_FS is not set
1022# CONFIG_GFS2_FS is not set
993# CONFIG_OCFS2_FS is not set 1023# CONFIG_OCFS2_FS is not set
994# CONFIG_BTRFS_FS is not set 1024# CONFIG_BTRFS_FS is not set
1025# CONFIG_NILFS2_FS is not set
995CONFIG_FILE_LOCKING=y 1026CONFIG_FILE_LOCKING=y
996CONFIG_FSNOTIFY=y 1027CONFIG_FSNOTIFY=y
997# CONFIG_DNOTIFY is not set 1028# CONFIG_DNOTIFY is not set
@@ -1028,8 +1059,6 @@ CONFIG_PROC_FS=y
1028CONFIG_PROC_SYSCTL=y 1059CONFIG_PROC_SYSCTL=y
1029CONFIG_PROC_PAGE_MONITOR=y 1060CONFIG_PROC_PAGE_MONITOR=y
1030CONFIG_SYSFS=y 1061CONFIG_SYSFS=y
1031CONFIG_TMPFS=y
1032# CONFIG_TMPFS_POSIX_ACL is not set
1033# CONFIG_HUGETLBFS is not set 1062# CONFIG_HUGETLBFS is not set
1034# CONFIG_HUGETLB_PAGE is not set 1063# CONFIG_HUGETLB_PAGE is not set
1035# CONFIG_CONFIGFS_FS is not set 1064# CONFIG_CONFIGFS_FS is not set
@@ -1062,7 +1091,6 @@ CONFIG_CRAMFS=y
1062# CONFIG_ROMFS_FS is not set 1091# CONFIG_ROMFS_FS is not set
1063# CONFIG_SYSV_FS is not set 1092# CONFIG_SYSV_FS is not set
1064# CONFIG_UFS_FS is not set 1093# CONFIG_UFS_FS is not set
1065# CONFIG_NILFS2_FS is not set
1066CONFIG_NETWORK_FILESYSTEMS=y 1094CONFIG_NETWORK_FILESYSTEMS=y
1067CONFIG_NFS_FS=y 1095CONFIG_NFS_FS=y
1068CONFIG_NFS_V3=y 1096CONFIG_NFS_V3=y
@@ -1140,6 +1168,7 @@ CONFIG_ENABLE_WARN_DEPRECATED=y
1140CONFIG_ENABLE_MUST_CHECK=y 1168CONFIG_ENABLE_MUST_CHECK=y
1141CONFIG_FRAME_WARN=1024 1169CONFIG_FRAME_WARN=1024
1142# CONFIG_MAGIC_SYSRQ is not set 1170# CONFIG_MAGIC_SYSRQ is not set
1171# CONFIG_STRIP_ASM_SYMS is not set
1143# CONFIG_UNUSED_SYMBOLS is not set 1172# CONFIG_UNUSED_SYMBOLS is not set
1144# CONFIG_DEBUG_FS is not set 1173# CONFIG_DEBUG_FS is not set
1145# CONFIG_HEADERS_CHECK is not set 1174# CONFIG_HEADERS_CHECK is not set
@@ -1149,8 +1178,11 @@ CONFIG_FRAME_WARN=1024
1149# CONFIG_RCU_CPU_STALL_DETECTOR is not set 1178# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1150# CONFIG_LATENCYTOP is not set 1179# CONFIG_LATENCYTOP is not set
1151CONFIG_HAVE_FUNCTION_TRACER=y 1180CONFIG_HAVE_FUNCTION_TRACER=y
1181CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1182CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
1152CONFIG_HAVE_DYNAMIC_FTRACE=y 1183CONFIG_HAVE_DYNAMIC_FTRACE=y
1153CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1184CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1185CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
1154CONFIG_TRACING_SUPPORT=y 1186CONFIG_TRACING_SUPPORT=y
1155# CONFIG_FTRACE is not set 1187# CONFIG_FTRACE is not set
1156# CONFIG_DMA_API_DEBUG is not set 1188# CONFIG_DMA_API_DEBUG is not set
@@ -1160,6 +1192,7 @@ CONFIG_HAVE_ARCH_KGDB=y
1160CONFIG_EARLY_SCIF_CONSOLE=y 1192CONFIG_EARLY_SCIF_CONSOLE=y
1161CONFIG_EARLY_SCIF_CONSOLE_PORT=0xffe00000 1193CONFIG_EARLY_SCIF_CONSOLE_PORT=0xffe00000
1162CONFIG_EARLY_PRINTK=y 1194CONFIG_EARLY_PRINTK=y
1195# CONFIG_DWARF_UNWINDER is not set
1163 1196
1164# 1197#
1165# Security options 1198# Security options
@@ -1173,7 +1206,6 @@ CONFIG_CRYPTO=y
1173# 1206#
1174# Crypto core or helper 1207# Crypto core or helper
1175# 1208#
1176# CONFIG_CRYPTO_FIPS is not set
1177# CONFIG_CRYPTO_MANAGER is not set 1209# CONFIG_CRYPTO_MANAGER is not set
1178# CONFIG_CRYPTO_MANAGER2 is not set 1210# CONFIG_CRYPTO_MANAGER2 is not set
1179# CONFIG_CRYPTO_GF128MUL is not set 1211# CONFIG_CRYPTO_GF128MUL is not set
@@ -1205,11 +1237,13 @@ CONFIG_CRYPTO=y
1205# 1237#
1206# CONFIG_CRYPTO_HMAC is not set 1238# CONFIG_CRYPTO_HMAC is not set
1207# CONFIG_CRYPTO_XCBC is not set 1239# CONFIG_CRYPTO_XCBC is not set
1240# CONFIG_CRYPTO_VMAC is not set
1208 1241
1209# 1242#
1210# Digest 1243# Digest
1211# 1244#
1212# CONFIG_CRYPTO_CRC32C is not set 1245# CONFIG_CRYPTO_CRC32C is not set
1246# CONFIG_CRYPTO_GHASH is not set
1213# CONFIG_CRYPTO_MD4 is not set 1247# CONFIG_CRYPTO_MD4 is not set
1214# CONFIG_CRYPTO_MD5 is not set 1248# CONFIG_CRYPTO_MD5 is not set
1215# CONFIG_CRYPTO_MICHAEL_MIC is not set 1249# CONFIG_CRYPTO_MICHAEL_MIC is not set
@@ -1273,5 +1307,6 @@ CONFIG_ZLIB_DEFLATE=y
1273CONFIG_HAS_IOMEM=y 1307CONFIG_HAS_IOMEM=y
1274CONFIG_HAS_IOPORT=y 1308CONFIG_HAS_IOPORT=y
1275CONFIG_HAS_DMA=y 1309CONFIG_HAS_DMA=y
1310CONFIG_HAVE_LMB=y
1276CONFIG_NLATTR=y 1311CONFIG_NLATTR=y
1277CONFIG_GENERIC_ATOMIC64=y 1312CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/se7619_defconfig b/arch/sh/configs/se7619_defconfig
index 724bb77c9dc9..6921b199b1d6 100644
--- a/arch/sh/configs/se7619_defconfig
+++ b/arch/sh/configs/se7619_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.30 3# Linux kernel version: 2.6.31
4# Thu Jun 18 12:47:56 2009 4# Thu Sep 24 18:50:05 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -14,6 +14,7 @@ CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y 14CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
16CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_IRQ_PER_CPU=y
17# CONFIG_GENERIC_GPIO is not set 18# CONFIG_GENERIC_GPIO is not set
18CONFIG_GENERIC_TIME=y 19CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 20CONFIG_GENERIC_CLOCKEVENTS=y
@@ -27,7 +28,9 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
27# CONFIG_ARCH_HAS_ILOG2_U64 is not set 28# CONFIG_ARCH_HAS_ILOG2_U64 is not set
28CONFIG_ARCH_NO_VIRT_TO_BUS=y 29CONFIG_ARCH_NO_VIRT_TO_BUS=y
29CONFIG_ARCH_HAS_DEFAULT_IDLE=y 30CONFIG_ARCH_HAS_DEFAULT_IDLE=y
31CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
30CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 32CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
33CONFIG_CONSTRUCTORS=y
31 34
32# 35#
33# General setup 36# General setup
@@ -37,17 +40,24 @@ CONFIG_BROKEN_ON_SMP=y
37CONFIG_INIT_ENV_ARG_LIMIT=32 40CONFIG_INIT_ENV_ARG_LIMIT=32
38CONFIG_LOCALVERSION="" 41CONFIG_LOCALVERSION=""
39# CONFIG_LOCALVERSION_AUTO is not set 42# CONFIG_LOCALVERSION_AUTO is not set
43CONFIG_HAVE_KERNEL_GZIP=y
44CONFIG_HAVE_KERNEL_BZIP2=y
45CONFIG_HAVE_KERNEL_LZMA=y
46CONFIG_KERNEL_GZIP=y
47# CONFIG_KERNEL_BZIP2 is not set
48# CONFIG_KERNEL_LZMA is not set
40# CONFIG_SYSVIPC is not set 49# CONFIG_SYSVIPC is not set
41# CONFIG_BSD_PROCESS_ACCT is not set 50# CONFIG_BSD_PROCESS_ACCT is not set
42 51
43# 52#
44# RCU Subsystem 53# RCU Subsystem
45# 54#
46CONFIG_CLASSIC_RCU=y 55CONFIG_TREE_RCU=y
47# CONFIG_TREE_RCU is not set 56# CONFIG_TREE_PREEMPT_RCU is not set
48# CONFIG_PREEMPT_RCU is not set 57# CONFIG_RCU_TRACE is not set
58CONFIG_RCU_FANOUT=32
59# CONFIG_RCU_FANOUT_EXACT is not set
49# CONFIG_TREE_RCU_TRACE is not set 60# CONFIG_TREE_RCU_TRACE is not set
50# CONFIG_PREEMPT_RCU_TRACE is not set
51# CONFIG_IKCONFIG is not set 61# CONFIG_IKCONFIG is not set
52CONFIG_LOG_BUF_SHIFT=14 62CONFIG_LOG_BUF_SHIFT=14
53# CONFIG_GROUP_SCHED is not set 63# CONFIG_GROUP_SCHED is not set
@@ -73,31 +83,36 @@ CONFIG_SIGNALFD=y
73CONFIG_TIMERFD=y 83CONFIG_TIMERFD=y
74CONFIG_EVENTFD=y 84CONFIG_EVENTFD=y
75CONFIG_AIO=y 85CONFIG_AIO=y
86CONFIG_HAVE_PERF_EVENTS=y
76 87
77# 88#
78# Performance Counters 89# Kernel Performance Events And Counters
79# 90#
91# CONFIG_PERF_EVENTS is not set
92# CONFIG_PERF_COUNTERS is not set
80# CONFIG_VM_EVENT_COUNTERS is not set 93# CONFIG_VM_EVENT_COUNTERS is not set
81# CONFIG_STRIP_ASM_SYMS is not set
82CONFIG_COMPAT_BRK=y 94CONFIG_COMPAT_BRK=y
83CONFIG_SLAB=y 95CONFIG_SLAB=y
84# CONFIG_SLUB is not set 96# CONFIG_SLUB is not set
85# CONFIG_SLOB is not set 97# CONFIG_SLOB is not set
86# CONFIG_PROFILING is not set 98# CONFIG_PROFILING is not set
87# CONFIG_MARKERS is not set
88CONFIG_HAVE_OPROFILE=y 99CONFIG_HAVE_OPROFILE=y
89CONFIG_HAVE_KPROBES=y 100CONFIG_HAVE_KPROBES=y
90CONFIG_HAVE_KRETPROBES=y 101CONFIG_HAVE_KRETPROBES=y
91CONFIG_HAVE_ARCH_TRACEHOOK=y 102CONFIG_HAVE_ARCH_TRACEHOOK=y
92CONFIG_HAVE_CLK=y 103CONFIG_HAVE_CLK=y
93CONFIG_HAVE_DMA_API_DEBUG=y 104CONFIG_HAVE_DMA_API_DEBUG=y
105
106#
107# GCOV-based kernel profiling
108#
94# CONFIG_SLOW_WORK is not set 109# CONFIG_SLOW_WORK is not set
95CONFIG_HAVE_GENERIC_DMA_COHERENT=y 110CONFIG_HAVE_GENERIC_DMA_COHERENT=y
96CONFIG_SLABINFO=y 111CONFIG_SLABINFO=y
97CONFIG_BASE_SMALL=1 112CONFIG_BASE_SMALL=1
98# CONFIG_MODULES is not set 113# CONFIG_MODULES is not set
99CONFIG_BLOCK=y 114CONFIG_BLOCK=y
100# CONFIG_LBD is not set 115CONFIG_LBDAF=y
101# CONFIG_BLK_DEV_BSG is not set 116# CONFIG_BLK_DEV_BSG is not set
102# CONFIG_BLK_DEV_INTEGRITY is not set 117# CONFIG_BLK_DEV_INTEGRITY is not set
103 118
@@ -144,6 +159,7 @@ CONFIG_CPU_SUBTYPE_SH7619=y
144# CONFIG_CPU_SUBTYPE_SH4_202 is not set 159# CONFIG_CPU_SUBTYPE_SH4_202 is not set
145# CONFIG_CPU_SUBTYPE_SH7723 is not set 160# CONFIG_CPU_SUBTYPE_SH7723 is not set
146# CONFIG_CPU_SUBTYPE_SH7724 is not set 161# CONFIG_CPU_SUBTYPE_SH7724 is not set
162# CONFIG_CPU_SUBTYPE_SH7757 is not set
147# CONFIG_CPU_SUBTYPE_SH7763 is not set 163# CONFIG_CPU_SUBTYPE_SH7763 is not set
148# CONFIG_CPU_SUBTYPE_SH7770 is not set 164# CONFIG_CPU_SUBTYPE_SH7770 is not set
149# CONFIG_CPU_SUBTYPE_SH7780 is not set 165# CONFIG_CPU_SUBTYPE_SH7780 is not set
@@ -262,7 +278,8 @@ CONFIG_GUSA=y
262CONFIG_ZERO_PAGE_OFFSET=0x00001000 278CONFIG_ZERO_PAGE_OFFSET=0x00001000
263CONFIG_BOOT_LINK_OFFSET=0x00800000 279CONFIG_BOOT_LINK_OFFSET=0x00800000
264CONFIG_ENTRY_OFFSET=0x00001000 280CONFIG_ENTRY_OFFSET=0x00001000
265# CONFIG_CMDLINE_BOOL is not set 281# CONFIG_CMDLINE_OVERWRITE is not set
282# CONFIG_CMDLINE_EXTEND is not set
266 283
267# 284#
268# Bus options 285# Bus options
@@ -469,11 +486,15 @@ CONFIG_SERIAL_CORE_CONSOLE=y
469# CONFIG_TCG_TPM is not set 486# CONFIG_TCG_TPM is not set
470# CONFIG_I2C is not set 487# CONFIG_I2C is not set
471# CONFIG_SPI is not set 488# CONFIG_SPI is not set
489
490#
491# PPS support
492#
493# CONFIG_PPS is not set
472# CONFIG_W1 is not set 494# CONFIG_W1 is not set
473# CONFIG_POWER_SUPPLY is not set 495# CONFIG_POWER_SUPPLY is not set
474# CONFIG_HWMON is not set 496# CONFIG_HWMON is not set
475# CONFIG_THERMAL is not set 497# CONFIG_THERMAL is not set
476# CONFIG_THERMAL_HWMON is not set
477# CONFIG_WATCHDOG is not set 498# CONFIG_WATCHDOG is not set
478CONFIG_SSB_POSSIBLE=y 499CONFIG_SSB_POSSIBLE=y
479 500
@@ -507,7 +528,6 @@ CONFIG_SSB_POSSIBLE=y
507# CONFIG_SOUND is not set 528# CONFIG_SOUND is not set
508CONFIG_HID_SUPPORT=y 529CONFIG_HID_SUPPORT=y
509CONFIG_HID=y 530CONFIG_HID=y
510# CONFIG_HID_DEBUG is not set
511# CONFIG_HIDRAW is not set 531# CONFIG_HIDRAW is not set
512# CONFIG_HID_PID is not set 532# CONFIG_HID_PID is not set
513 533
@@ -559,7 +579,9 @@ CONFIG_RTC_LIB=y
559# CONFIG_JFS_FS is not set 579# CONFIG_JFS_FS is not set
560# CONFIG_FS_POSIX_ACL is not set 580# CONFIG_FS_POSIX_ACL is not set
561# CONFIG_XFS_FS is not set 581# CONFIG_XFS_FS is not set
582# CONFIG_GFS2_FS is not set
562# CONFIG_BTRFS_FS is not set 583# CONFIG_BTRFS_FS is not set
584# CONFIG_NILFS2_FS is not set
563CONFIG_FILE_LOCKING=y 585CONFIG_FILE_LOCKING=y
564CONFIG_FSNOTIFY=y 586CONFIG_FSNOTIFY=y
565# CONFIG_DNOTIFY is not set 587# CONFIG_DNOTIFY is not set
@@ -594,7 +616,6 @@ CONFIG_INOTIFY_USER=y
594CONFIG_PROC_FS=y 616CONFIG_PROC_FS=y
595CONFIG_PROC_SYSCTL=y 617CONFIG_PROC_SYSCTL=y
596# CONFIG_SYSFS is not set 618# CONFIG_SYSFS is not set
597# CONFIG_TMPFS is not set
598# CONFIG_HUGETLB_PAGE is not set 619# CONFIG_HUGETLB_PAGE is not set
599CONFIG_MISC_FILESYSTEMS=y 620CONFIG_MISC_FILESYSTEMS=y
600# CONFIG_ADFS_FS is not set 621# CONFIG_ADFS_FS is not set
@@ -619,7 +640,6 @@ CONFIG_ROMFS_BACKED_BY_BLOCK=y
619CONFIG_ROMFS_ON_BLOCK=y 640CONFIG_ROMFS_ON_BLOCK=y
620# CONFIG_SYSV_FS is not set 641# CONFIG_SYSV_FS is not set
621# CONFIG_UFS_FS is not set 642# CONFIG_UFS_FS is not set
622# CONFIG_NILFS2_FS is not set
623 643
624# 644#
625# Partition Types 645# Partition Types
@@ -637,6 +657,7 @@ CONFIG_ENABLE_WARN_DEPRECATED=y
637# CONFIG_ENABLE_MUST_CHECK is not set 657# CONFIG_ENABLE_MUST_CHECK is not set
638CONFIG_FRAME_WARN=1024 658CONFIG_FRAME_WARN=1024
639# CONFIG_MAGIC_SYSRQ is not set 659# CONFIG_MAGIC_SYSRQ is not set
660# CONFIG_STRIP_ASM_SYMS is not set
640# CONFIG_UNUSED_SYMBOLS is not set 661# CONFIG_UNUSED_SYMBOLS is not set
641# CONFIG_HEADERS_CHECK is not set 662# CONFIG_HEADERS_CHECK is not set
642# CONFIG_DEBUG_KERNEL is not set 663# CONFIG_DEBUG_KERNEL is not set
@@ -645,8 +666,11 @@ CONFIG_FRAME_WARN=1024
645# CONFIG_RCU_CPU_STALL_DETECTOR is not set 666# CONFIG_RCU_CPU_STALL_DETECTOR is not set
646# CONFIG_LATENCYTOP is not set 667# CONFIG_LATENCYTOP is not set
647CONFIG_HAVE_FUNCTION_TRACER=y 668CONFIG_HAVE_FUNCTION_TRACER=y
669CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
670CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
648CONFIG_HAVE_DYNAMIC_FTRACE=y 671CONFIG_HAVE_DYNAMIC_FTRACE=y
649CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 672CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
673CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
650CONFIG_TRACING_SUPPORT=y 674CONFIG_TRACING_SUPPORT=y
651# CONFIG_FTRACE is not set 675# CONFIG_FTRACE is not set
652# CONFIG_DMA_API_DEBUG is not set 676# CONFIG_DMA_API_DEBUG is not set
@@ -654,6 +678,7 @@ CONFIG_TRACING_SUPPORT=y
654CONFIG_HAVE_ARCH_KGDB=y 678CONFIG_HAVE_ARCH_KGDB=y
655# CONFIG_SH_STANDARD_BIOS is not set 679# CONFIG_SH_STANDARD_BIOS is not set
656# CONFIG_EARLY_SCIF_CONSOLE is not set 680# CONFIG_EARLY_SCIF_CONSOLE is not set
681# CONFIG_DWARF_UNWINDER is not set
657 682
658# 683#
659# Security options 684# Security options
@@ -680,4 +705,5 @@ CONFIG_ZLIB_INFLATE=y
680CONFIG_HAS_IOMEM=y 705CONFIG_HAS_IOMEM=y
681CONFIG_HAS_IOPORT=y 706CONFIG_HAS_IOPORT=y
682CONFIG_HAS_DMA=y 707CONFIG_HAS_DMA=y
708CONFIG_HAVE_LMB=y
683CONFIG_GENERIC_ATOMIC64=y 709CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/se7705_defconfig b/arch/sh/configs/se7705_defconfig
index 6ca6a2fc06e9..3abb06879f02 100644
--- a/arch/sh/configs/se7705_defconfig
+++ b/arch/sh/configs/se7705_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.30 3# Linux kernel version: 2.6.31
4# Thu Jun 18 12:48:18 2009 4# Thu Sep 24 18:50:52 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -14,6 +14,7 @@ CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y 14CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
16CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_IRQ_PER_CPU=y
17# CONFIG_GENERIC_GPIO is not set 18# CONFIG_GENERIC_GPIO is not set
18CONFIG_GENERIC_TIME=y 19CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 20CONFIG_GENERIC_CLOCKEVENTS=y
@@ -27,7 +28,9 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
27# CONFIG_ARCH_HAS_ILOG2_U64 is not set 28# CONFIG_ARCH_HAS_ILOG2_U64 is not set
28CONFIG_ARCH_NO_VIRT_TO_BUS=y 29CONFIG_ARCH_NO_VIRT_TO_BUS=y
29CONFIG_ARCH_HAS_DEFAULT_IDLE=y 30CONFIG_ARCH_HAS_DEFAULT_IDLE=y
31CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
30CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 32CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
33CONFIG_CONSTRUCTORS=y
31 34
32# 35#
33# General setup 36# General setup
@@ -38,6 +41,12 @@ CONFIG_LOCK_KERNEL=y
38CONFIG_INIT_ENV_ARG_LIMIT=32 41CONFIG_INIT_ENV_ARG_LIMIT=32
39CONFIG_LOCALVERSION="" 42CONFIG_LOCALVERSION=""
40CONFIG_LOCALVERSION_AUTO=y 43CONFIG_LOCALVERSION_AUTO=y
44CONFIG_HAVE_KERNEL_GZIP=y
45CONFIG_HAVE_KERNEL_BZIP2=y
46CONFIG_HAVE_KERNEL_LZMA=y
47CONFIG_KERNEL_GZIP=y
48# CONFIG_KERNEL_BZIP2 is not set
49# CONFIG_KERNEL_LZMA is not set
41# CONFIG_SWAP is not set 50# CONFIG_SWAP is not set
42# CONFIG_SYSVIPC is not set 51# CONFIG_SYSVIPC is not set
43# CONFIG_POSIX_MQUEUE is not set 52# CONFIG_POSIX_MQUEUE is not set
@@ -48,11 +57,12 @@ CONFIG_LOCALVERSION_AUTO=y
48# 57#
49# RCU Subsystem 58# RCU Subsystem
50# 59#
51CONFIG_CLASSIC_RCU=y 60CONFIG_TREE_RCU=y
52# CONFIG_TREE_RCU is not set 61# CONFIG_TREE_PREEMPT_RCU is not set
53# CONFIG_PREEMPT_RCU is not set 62# CONFIG_RCU_TRACE is not set
63CONFIG_RCU_FANOUT=32
64# CONFIG_RCU_FANOUT_EXACT is not set
54# CONFIG_TREE_RCU_TRACE is not set 65# CONFIG_TREE_RCU_TRACE is not set
55# CONFIG_PREEMPT_RCU_TRACE is not set
56# CONFIG_IKCONFIG is not set 66# CONFIG_IKCONFIG is not set
57CONFIG_LOG_BUF_SHIFT=14 67CONFIG_LOG_BUF_SHIFT=14
58# CONFIG_GROUP_SCHED is not set 68# CONFIG_GROUP_SCHED is not set
@@ -83,18 +93,19 @@ CONFIG_TIMERFD=y
83CONFIG_EVENTFD=y 93CONFIG_EVENTFD=y
84CONFIG_SHMEM=y 94CONFIG_SHMEM=y
85CONFIG_AIO=y 95CONFIG_AIO=y
96CONFIG_HAVE_PERF_EVENTS=y
86 97
87# 98#
88# Performance Counters 99# Kernel Performance Events And Counters
89# 100#
101# CONFIG_PERF_EVENTS is not set
102# CONFIG_PERF_COUNTERS is not set
90CONFIG_VM_EVENT_COUNTERS=y 103CONFIG_VM_EVENT_COUNTERS=y
91# CONFIG_STRIP_ASM_SYMS is not set
92CONFIG_COMPAT_BRK=y 104CONFIG_COMPAT_BRK=y
93CONFIG_SLAB=y 105CONFIG_SLAB=y
94# CONFIG_SLUB is not set 106# CONFIG_SLUB is not set
95# CONFIG_SLOB is not set 107# CONFIG_SLOB is not set
96# CONFIG_PROFILING is not set 108# CONFIG_PROFILING is not set
97# CONFIG_MARKERS is not set
98CONFIG_HAVE_OPROFILE=y 109CONFIG_HAVE_OPROFILE=y
99CONFIG_HAVE_IOREMAP_PROT=y 110CONFIG_HAVE_IOREMAP_PROT=y
100CONFIG_HAVE_KPROBES=y 111CONFIG_HAVE_KPROBES=y
@@ -102,6 +113,10 @@ CONFIG_HAVE_KRETPROBES=y
102CONFIG_HAVE_ARCH_TRACEHOOK=y 113CONFIG_HAVE_ARCH_TRACEHOOK=y
103CONFIG_HAVE_CLK=y 114CONFIG_HAVE_CLK=y
104CONFIG_HAVE_DMA_API_DEBUG=y 115CONFIG_HAVE_DMA_API_DEBUG=y
116
117#
118# GCOV-based kernel profiling
119#
105# CONFIG_SLOW_WORK is not set 120# CONFIG_SLOW_WORK is not set
106CONFIG_HAVE_GENERIC_DMA_COHERENT=y 121CONFIG_HAVE_GENERIC_DMA_COHERENT=y
107CONFIG_SLABINFO=y 122CONFIG_SLABINFO=y
@@ -113,7 +128,7 @@ CONFIG_MODULES=y
113# CONFIG_MODVERSIONS is not set 128# CONFIG_MODVERSIONS is not set
114# CONFIG_MODULE_SRCVERSION_ALL is not set 129# CONFIG_MODULE_SRCVERSION_ALL is not set
115CONFIG_BLOCK=y 130CONFIG_BLOCK=y
116# CONFIG_LBD is not set 131CONFIG_LBDAF=y
117# CONFIG_BLK_DEV_BSG is not set 132# CONFIG_BLK_DEV_BSG is not set
118# CONFIG_BLK_DEV_INTEGRITY is not set 133# CONFIG_BLK_DEV_INTEGRITY is not set
119 134
@@ -160,6 +175,7 @@ CONFIG_CPU_SUBTYPE_SH7705=y
160# CONFIG_CPU_SUBTYPE_SH4_202 is not set 175# CONFIG_CPU_SUBTYPE_SH4_202 is not set
161# CONFIG_CPU_SUBTYPE_SH7723 is not set 176# CONFIG_CPU_SUBTYPE_SH7723 is not set
162# CONFIG_CPU_SUBTYPE_SH7724 is not set 177# CONFIG_CPU_SUBTYPE_SH7724 is not set
178# CONFIG_CPU_SUBTYPE_SH7757 is not set
163# CONFIG_CPU_SUBTYPE_SH7763 is not set 179# CONFIG_CPU_SUBTYPE_SH7763 is not set
164# CONFIG_CPU_SUBTYPE_SH7770 is not set 180# CONFIG_CPU_SUBTYPE_SH7770 is not set
165# CONFIG_CPU_SUBTYPE_SH7780 is not set 181# CONFIG_CPU_SUBTYPE_SH7780 is not set
@@ -205,6 +221,7 @@ CONFIG_ZONE_DMA_FLAG=0
205CONFIG_NR_QUICK=2 221CONFIG_NR_QUICK=2
206CONFIG_HAVE_MLOCK=y 222CONFIG_HAVE_MLOCK=y
207CONFIG_HAVE_MLOCKED_PAGE_BIT=y 223CONFIG_HAVE_MLOCKED_PAGE_BIT=y
224# CONFIG_KSM is not set
208CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 225CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
209 226
210# 227#
@@ -289,7 +306,8 @@ CONFIG_GUSA=y
289CONFIG_ZERO_PAGE_OFFSET=0x00001000 306CONFIG_ZERO_PAGE_OFFSET=0x00001000
290CONFIG_BOOT_LINK_OFFSET=0x00800000 307CONFIG_BOOT_LINK_OFFSET=0x00800000
291CONFIG_ENTRY_OFFSET=0x00001000 308CONFIG_ENTRY_OFFSET=0x00001000
292# CONFIG_CMDLINE_BOOL is not set 309# CONFIG_CMDLINE_OVERWRITE is not set
310# CONFIG_CMDLINE_EXTEND is not set
293 311
294# 312#
295# Bus options 313# Bus options
@@ -355,6 +373,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
355# CONFIG_NETFILTER is not set 373# CONFIG_NETFILTER is not set
356# CONFIG_IP_DCCP is not set 374# CONFIG_IP_DCCP is not set
357# CONFIG_IP_SCTP is not set 375# CONFIG_IP_SCTP is not set
376# CONFIG_RDS is not set
358# CONFIG_TIPC is not set 377# CONFIG_TIPC is not set
359# CONFIG_ATM is not set 378# CONFIG_ATM is not set
360# CONFIG_BRIDGE is not set 379# CONFIG_BRIDGE is not set
@@ -384,6 +403,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
384# CONFIG_AF_RXRPC is not set 403# CONFIG_AF_RXRPC is not set
385CONFIG_WIRELESS=y 404CONFIG_WIRELESS=y
386# CONFIG_CFG80211 is not set 405# CONFIG_CFG80211 is not set
406CONFIG_CFG80211_DEFAULT_PS_VALUE=0
387# CONFIG_WIRELESS_OLD_REGULATORY is not set 407# CONFIG_WIRELESS_OLD_REGULATORY is not set
388# CONFIG_WIRELESS_EXT is not set 408# CONFIG_WIRELESS_EXT is not set
389# CONFIG_LIB80211 is not set 409# CONFIG_LIB80211 is not set
@@ -391,7 +411,6 @@ CONFIG_WIRELESS=y
391# 411#
392# CFG80211 needs to be enabled for MAC80211 412# CFG80211 needs to be enabled for MAC80211
393# 413#
394CONFIG_MAC80211_DEFAULT_PS_VALUE=0
395# CONFIG_WIMAX is not set 414# CONFIG_WIMAX is not set
396# CONFIG_RFKILL is not set 415# CONFIG_RFKILL is not set
397# CONFIG_NET_9P is not set 416# CONFIG_NET_9P is not set
@@ -409,9 +428,9 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
409# CONFIG_CONNECTOR is not set 428# CONFIG_CONNECTOR is not set
410CONFIG_MTD=y 429CONFIG_MTD=y
411# CONFIG_MTD_DEBUG is not set 430# CONFIG_MTD_DEBUG is not set
431# CONFIG_MTD_TESTS is not set
412# CONFIG_MTD_CONCAT is not set 432# CONFIG_MTD_CONCAT is not set
413CONFIG_MTD_PARTITIONS=y 433CONFIG_MTD_PARTITIONS=y
414# CONFIG_MTD_TESTS is not set
415# CONFIG_MTD_REDBOOT_PARTS is not set 434# CONFIG_MTD_REDBOOT_PARTS is not set
416# CONFIG_MTD_CMDLINE_PARTS is not set 435# CONFIG_MTD_CMDLINE_PARTS is not set
417# CONFIG_MTD_AR7_PARTS is not set 436# CONFIG_MTD_AR7_PARTS is not set
@@ -547,10 +566,7 @@ CONFIG_STNIC=y
547# CONFIG_KS8842 is not set 566# CONFIG_KS8842 is not set
548CONFIG_NETDEV_1000=y 567CONFIG_NETDEV_1000=y
549CONFIG_NETDEV_10000=y 568CONFIG_NETDEV_10000=y
550 569CONFIG_WLAN=y
551#
552# Wireless LAN
553#
554# CONFIG_WLAN_PRE80211 is not set 570# CONFIG_WLAN_PRE80211 is not set
555# CONFIG_WLAN_80211 is not set 571# CONFIG_WLAN_80211 is not set
556 572
@@ -642,10 +658,20 @@ CONFIG_HW_RANDOM=y
642# CONFIG_TCG_TPM is not set 658# CONFIG_TCG_TPM is not set
643# CONFIG_I2C is not set 659# CONFIG_I2C is not set
644# CONFIG_SPI is not set 660# CONFIG_SPI is not set
661
662#
663# PPS support
664#
665# CONFIG_PPS is not set
645# CONFIG_W1 is not set 666# CONFIG_W1 is not set
646# CONFIG_POWER_SUPPLY is not set 667# CONFIG_POWER_SUPPLY is not set
647CONFIG_HWMON=y 668CONFIG_HWMON=y
648# CONFIG_HWMON_VID is not set 669# CONFIG_HWMON_VID is not set
670# CONFIG_HWMON_DEBUG_CHIP is not set
671
672#
673# Native drivers
674#
649# CONFIG_SENSORS_F71805F is not set 675# CONFIG_SENSORS_F71805F is not set
650# CONFIG_SENSORS_F71882FG is not set 676# CONFIG_SENSORS_F71882FG is not set
651# CONFIG_SENSORS_IT87 is not set 677# CONFIG_SENSORS_IT87 is not set
@@ -656,9 +682,7 @@ CONFIG_HWMON=y
656# CONFIG_SENSORS_VT1211 is not set 682# CONFIG_SENSORS_VT1211 is not set
657# CONFIG_SENSORS_W83627HF is not set 683# CONFIG_SENSORS_W83627HF is not set
658# CONFIG_SENSORS_W83627EHF is not set 684# CONFIG_SENSORS_W83627EHF is not set
659# CONFIG_HWMON_DEBUG_CHIP is not set
660# CONFIG_THERMAL is not set 685# CONFIG_THERMAL is not set
661# CONFIG_THERMAL_HWMON is not set
662# CONFIG_WATCHDOG is not set 686# CONFIG_WATCHDOG is not set
663CONFIG_SSB_POSSIBLE=y 687CONFIG_SSB_POSSIBLE=y
664 688
@@ -692,7 +716,6 @@ CONFIG_SSB_POSSIBLE=y
692# CONFIG_SOUND is not set 716# CONFIG_SOUND is not set
693CONFIG_HID_SUPPORT=y 717CONFIG_HID_SUPPORT=y
694CONFIG_HID=y 718CONFIG_HID=y
695# CONFIG_HID_DEBUG is not set
696# CONFIG_HIDRAW is not set 719# CONFIG_HIDRAW is not set
697# CONFIG_HID_PID is not set 720# CONFIG_HID_PID is not set
698 721
@@ -746,7 +769,9 @@ CONFIG_EXT2_FS=y
746# CONFIG_JFS_FS is not set 769# CONFIG_JFS_FS is not set
747# CONFIG_FS_POSIX_ACL is not set 770# CONFIG_FS_POSIX_ACL is not set
748# CONFIG_XFS_FS is not set 771# CONFIG_XFS_FS is not set
772# CONFIG_GFS2_FS is not set
749# CONFIG_BTRFS_FS is not set 773# CONFIG_BTRFS_FS is not set
774# CONFIG_NILFS2_FS is not set
750CONFIG_FILE_LOCKING=y 775CONFIG_FILE_LOCKING=y
751CONFIG_FSNOTIFY=y 776CONFIG_FSNOTIFY=y
752CONFIG_DNOTIFY=y 777CONFIG_DNOTIFY=y
@@ -815,7 +840,6 @@ CONFIG_JFFS2_RTIME=y
815# CONFIG_ROMFS_FS is not set 840# CONFIG_ROMFS_FS is not set
816# CONFIG_SYSV_FS is not set 841# CONFIG_SYSV_FS is not set
817# CONFIG_UFS_FS is not set 842# CONFIG_UFS_FS is not set
818# CONFIG_NILFS2_FS is not set
819CONFIG_NETWORK_FILESYSTEMS=y 843CONFIG_NETWORK_FILESYSTEMS=y
820CONFIG_NFS_FS=y 844CONFIG_NFS_FS=y
821# CONFIG_NFS_V3 is not set 845# CONFIG_NFS_V3 is not set
@@ -849,6 +873,7 @@ CONFIG_ENABLE_WARN_DEPRECATED=y
849CONFIG_ENABLE_MUST_CHECK=y 873CONFIG_ENABLE_MUST_CHECK=y
850CONFIG_FRAME_WARN=1024 874CONFIG_FRAME_WARN=1024
851# CONFIG_MAGIC_SYSRQ is not set 875# CONFIG_MAGIC_SYSRQ is not set
876# CONFIG_STRIP_ASM_SYMS is not set
852# CONFIG_UNUSED_SYMBOLS is not set 877# CONFIG_UNUSED_SYMBOLS is not set
853# CONFIG_HEADERS_CHECK is not set 878# CONFIG_HEADERS_CHECK is not set
854# CONFIG_DEBUG_KERNEL is not set 879# CONFIG_DEBUG_KERNEL is not set
@@ -857,8 +882,11 @@ CONFIG_FRAME_WARN=1024
857# CONFIG_RCU_CPU_STALL_DETECTOR is not set 882# CONFIG_RCU_CPU_STALL_DETECTOR is not set
858# CONFIG_LATENCYTOP is not set 883# CONFIG_LATENCYTOP is not set
859CONFIG_HAVE_FUNCTION_TRACER=y 884CONFIG_HAVE_FUNCTION_TRACER=y
885CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
886CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
860CONFIG_HAVE_DYNAMIC_FTRACE=y 887CONFIG_HAVE_DYNAMIC_FTRACE=y
861CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 888CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
889CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
862CONFIG_TRACING_SUPPORT=y 890CONFIG_TRACING_SUPPORT=y
863# CONFIG_FTRACE is not set 891# CONFIG_FTRACE is not set
864# CONFIG_DMA_API_DEBUG is not set 892# CONFIG_DMA_API_DEBUG is not set
@@ -866,6 +894,7 @@ CONFIG_TRACING_SUPPORT=y
866CONFIG_HAVE_ARCH_KGDB=y 894CONFIG_HAVE_ARCH_KGDB=y
867# CONFIG_SH_STANDARD_BIOS is not set 895# CONFIG_SH_STANDARD_BIOS is not set
868# CONFIG_EARLY_SCIF_CONSOLE is not set 896# CONFIG_EARLY_SCIF_CONSOLE is not set
897# CONFIG_DWARF_UNWINDER is not set
869 898
870# 899#
871# Security options 900# Security options
@@ -878,7 +907,6 @@ CONFIG_CRYPTO=y
878# 907#
879# Crypto core or helper 908# Crypto core or helper
880# 909#
881# CONFIG_CRYPTO_FIPS is not set
882# CONFIG_CRYPTO_MANAGER is not set 910# CONFIG_CRYPTO_MANAGER is not set
883# CONFIG_CRYPTO_MANAGER2 is not set 911# CONFIG_CRYPTO_MANAGER2 is not set
884# CONFIG_CRYPTO_GF128MUL is not set 912# CONFIG_CRYPTO_GF128MUL is not set
@@ -910,11 +938,13 @@ CONFIG_CRYPTO=y
910# 938#
911# CONFIG_CRYPTO_HMAC is not set 939# CONFIG_CRYPTO_HMAC is not set
912# CONFIG_CRYPTO_XCBC is not set 940# CONFIG_CRYPTO_XCBC is not set
941# CONFIG_CRYPTO_VMAC is not set
913 942
914# 943#
915# Digest 944# Digest
916# 945#
917# CONFIG_CRYPTO_CRC32C is not set 946# CONFIG_CRYPTO_CRC32C is not set
947# CONFIG_CRYPTO_GHASH is not set
918# CONFIG_CRYPTO_MD4 is not set 948# CONFIG_CRYPTO_MD4 is not set
919# CONFIG_CRYPTO_MD5 is not set 949# CONFIG_CRYPTO_MD5 is not set
920# CONFIG_CRYPTO_MICHAEL_MIC is not set 950# CONFIG_CRYPTO_MICHAEL_MIC is not set
@@ -979,5 +1009,6 @@ CONFIG_DECOMPRESS_GZIP=y
979CONFIG_HAS_IOMEM=y 1009CONFIG_HAS_IOMEM=y
980CONFIG_HAS_IOPORT=y 1010CONFIG_HAS_IOPORT=y
981CONFIG_HAS_DMA=y 1011CONFIG_HAS_DMA=y
1012CONFIG_HAVE_LMB=y
982CONFIG_NLATTR=y 1013CONFIG_NLATTR=y
983CONFIG_GENERIC_ATOMIC64=y 1014CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/se7712_defconfig b/arch/sh/configs/se7712_defconfig
index b8aae11bc8fa..1a43cfecb392 100644
--- a/arch/sh/configs/se7712_defconfig
+++ b/arch/sh/configs/se7712_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.30 3# Linux kernel version: 2.6.31
4# Thu Jun 18 12:49:00 2009 4# Thu Sep 24 18:53:32 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -13,6 +13,7 @@ CONFIG_GENERIC_HWEIGHT=y
13CONFIG_GENERIC_HARDIRQS=y 13CONFIG_GENERIC_HARDIRQS=y
14CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 14CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
15CONFIG_GENERIC_IRQ_PROBE=y 15CONFIG_GENERIC_IRQ_PROBE=y
16CONFIG_IRQ_PER_CPU=y
16# CONFIG_GENERIC_GPIO is not set 17# CONFIG_GENERIC_GPIO is not set
17CONFIG_GENERIC_TIME=y 18CONFIG_GENERIC_TIME=y
18CONFIG_GENERIC_CLOCKEVENTS=y 19CONFIG_GENERIC_CLOCKEVENTS=y
@@ -26,7 +27,9 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
26# CONFIG_ARCH_HAS_ILOG2_U64 is not set 27# CONFIG_ARCH_HAS_ILOG2_U64 is not set
27CONFIG_ARCH_NO_VIRT_TO_BUS=y 28CONFIG_ARCH_NO_VIRT_TO_BUS=y
28CONFIG_ARCH_HAS_DEFAULT_IDLE=y 29CONFIG_ARCH_HAS_DEFAULT_IDLE=y
30CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
29CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 31CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
32CONFIG_CONSTRUCTORS=y
30 33
31# 34#
32# General setup 35# General setup
@@ -36,6 +39,12 @@ CONFIG_BROKEN_ON_SMP=y
36CONFIG_INIT_ENV_ARG_LIMIT=32 39CONFIG_INIT_ENV_ARG_LIMIT=32
37CONFIG_LOCALVERSION="" 40CONFIG_LOCALVERSION=""
38# CONFIG_LOCALVERSION_AUTO is not set 41# CONFIG_LOCALVERSION_AUTO is not set
42CONFIG_HAVE_KERNEL_GZIP=y
43CONFIG_HAVE_KERNEL_BZIP2=y
44CONFIG_HAVE_KERNEL_LZMA=y
45CONFIG_KERNEL_GZIP=y
46# CONFIG_KERNEL_BZIP2 is not set
47# CONFIG_KERNEL_LZMA is not set
39# CONFIG_SWAP is not set 48# CONFIG_SWAP is not set
40CONFIG_SYSVIPC=y 49CONFIG_SYSVIPC=y
41CONFIG_SYSVIPC_SYSCTL=y 50CONFIG_SYSVIPC_SYSCTL=y
@@ -49,11 +58,12 @@ CONFIG_BSD_PROCESS_ACCT=y
49# 58#
50# RCU Subsystem 59# RCU Subsystem
51# 60#
52CONFIG_CLASSIC_RCU=y 61CONFIG_TREE_RCU=y
53# CONFIG_TREE_RCU is not set 62# CONFIG_TREE_PREEMPT_RCU is not set
54# CONFIG_PREEMPT_RCU is not set 63# CONFIG_RCU_TRACE is not set
64CONFIG_RCU_FANOUT=32
65# CONFIG_RCU_FANOUT_EXACT is not set
55# CONFIG_TREE_RCU_TRACE is not set 66# CONFIG_TREE_RCU_TRACE is not set
56# CONFIG_PREEMPT_RCU_TRACE is not set
57# CONFIG_IKCONFIG is not set 67# CONFIG_IKCONFIG is not set
58CONFIG_LOG_BUF_SHIFT=14 68CONFIG_LOG_BUF_SHIFT=14
59# CONFIG_GROUP_SCHED is not set 69# CONFIG_GROUP_SCHED is not set
@@ -84,18 +94,19 @@ CONFIG_TIMERFD=y
84CONFIG_EVENTFD=y 94CONFIG_EVENTFD=y
85# CONFIG_SHMEM is not set 95# CONFIG_SHMEM is not set
86CONFIG_AIO=y 96CONFIG_AIO=y
97CONFIG_HAVE_PERF_EVENTS=y
87 98
88# 99#
89# Performance Counters 100# Kernel Performance Events And Counters
90# 101#
102# CONFIG_PERF_EVENTS is not set
103# CONFIG_PERF_COUNTERS is not set
91CONFIG_VM_EVENT_COUNTERS=y 104CONFIG_VM_EVENT_COUNTERS=y
92# CONFIG_STRIP_ASM_SYMS is not set
93CONFIG_COMPAT_BRK=y 105CONFIG_COMPAT_BRK=y
94CONFIG_SLAB=y 106CONFIG_SLAB=y
95# CONFIG_SLUB is not set 107# CONFIG_SLUB is not set
96# CONFIG_SLOB is not set 108# CONFIG_SLOB is not set
97# CONFIG_PROFILING is not set 109# CONFIG_PROFILING is not set
98# CONFIG_MARKERS is not set
99CONFIG_HAVE_OPROFILE=y 110CONFIG_HAVE_OPROFILE=y
100# CONFIG_KPROBES is not set 111# CONFIG_KPROBES is not set
101CONFIG_HAVE_IOREMAP_PROT=y 112CONFIG_HAVE_IOREMAP_PROT=y
@@ -104,6 +115,10 @@ CONFIG_HAVE_KRETPROBES=y
104CONFIG_HAVE_ARCH_TRACEHOOK=y 115CONFIG_HAVE_ARCH_TRACEHOOK=y
105CONFIG_HAVE_CLK=y 116CONFIG_HAVE_CLK=y
106CONFIG_HAVE_DMA_API_DEBUG=y 117CONFIG_HAVE_DMA_API_DEBUG=y
118
119#
120# GCOV-based kernel profiling
121#
107# CONFIG_SLOW_WORK is not set 122# CONFIG_SLOW_WORK is not set
108CONFIG_HAVE_GENERIC_DMA_COHERENT=y 123CONFIG_HAVE_GENERIC_DMA_COHERENT=y
109CONFIG_SLABINFO=y 124CONFIG_SLABINFO=y
@@ -115,7 +130,7 @@ CONFIG_MODULES=y
115# CONFIG_MODVERSIONS is not set 130# CONFIG_MODVERSIONS is not set
116# CONFIG_MODULE_SRCVERSION_ALL is not set 131# CONFIG_MODULE_SRCVERSION_ALL is not set
117CONFIG_BLOCK=y 132CONFIG_BLOCK=y
118# CONFIG_LBD is not set 133CONFIG_LBDAF=y
119# CONFIG_BLK_DEV_BSG is not set 134# CONFIG_BLK_DEV_BSG is not set
120# CONFIG_BLK_DEV_INTEGRITY is not set 135# CONFIG_BLK_DEV_INTEGRITY is not set
121 136
@@ -162,6 +177,7 @@ CONFIG_CPU_SUBTYPE_SH7712=y
162# CONFIG_CPU_SUBTYPE_SH4_202 is not set 177# CONFIG_CPU_SUBTYPE_SH4_202 is not set
163# CONFIG_CPU_SUBTYPE_SH7723 is not set 178# CONFIG_CPU_SUBTYPE_SH7723 is not set
164# CONFIG_CPU_SUBTYPE_SH7724 is not set 179# CONFIG_CPU_SUBTYPE_SH7724 is not set
180# CONFIG_CPU_SUBTYPE_SH7757 is not set
165# CONFIG_CPU_SUBTYPE_SH7763 is not set 181# CONFIG_CPU_SUBTYPE_SH7763 is not set
166# CONFIG_CPU_SUBTYPE_SH7770 is not set 182# CONFIG_CPU_SUBTYPE_SH7770 is not set
167# CONFIG_CPU_SUBTYPE_SH7780 is not set 183# CONFIG_CPU_SUBTYPE_SH7780 is not set
@@ -207,6 +223,7 @@ CONFIG_ZONE_DMA_FLAG=0
207CONFIG_NR_QUICK=2 223CONFIG_NR_QUICK=2
208CONFIG_HAVE_MLOCK=y 224CONFIG_HAVE_MLOCK=y
209CONFIG_HAVE_MLOCKED_PAGE_BIT=y 225CONFIG_HAVE_MLOCKED_PAGE_BIT=y
226# CONFIG_KSM is not set
210CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 227CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
211 228
212# 229#
@@ -291,7 +308,8 @@ CONFIG_GUSA=y
291CONFIG_ZERO_PAGE_OFFSET=0x00001000 308CONFIG_ZERO_PAGE_OFFSET=0x00001000
292CONFIG_BOOT_LINK_OFFSET=0x00800000 309CONFIG_BOOT_LINK_OFFSET=0x00800000
293CONFIG_ENTRY_OFFSET=0x00001000 310CONFIG_ENTRY_OFFSET=0x00001000
294CONFIG_CMDLINE_BOOL=y 311CONFIG_CMDLINE_OVERWRITE=y
312# CONFIG_CMDLINE_EXTEND is not set
295CONFIG_CMDLINE="console=ttySC0,115200 root=/dev/sda1" 313CONFIG_CMDLINE="console=ttySC0,115200 root=/dev/sda1"
296 314
297# 315#
@@ -368,6 +386,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
368# CONFIG_NETFILTER is not set 386# CONFIG_NETFILTER is not set
369# CONFIG_IP_DCCP is not set 387# CONFIG_IP_DCCP is not set
370# CONFIG_IP_SCTP is not set 388# CONFIG_IP_SCTP is not set
389# CONFIG_RDS is not set
371# CONFIG_TIPC is not set 390# CONFIG_TIPC is not set
372# CONFIG_ATM is not set 391# CONFIG_ATM is not set
373# CONFIG_BRIDGE is not set 392# CONFIG_BRIDGE is not set
@@ -433,6 +452,7 @@ CONFIG_NET_SCH_FIFO=y
433CONFIG_FIB_RULES=y 452CONFIG_FIB_RULES=y
434CONFIG_WIRELESS=y 453CONFIG_WIRELESS=y
435# CONFIG_CFG80211 is not set 454# CONFIG_CFG80211 is not set
455CONFIG_CFG80211_DEFAULT_PS_VALUE=0
436# CONFIG_WIRELESS_OLD_REGULATORY is not set 456# CONFIG_WIRELESS_OLD_REGULATORY is not set
437# CONFIG_WIRELESS_EXT is not set 457# CONFIG_WIRELESS_EXT is not set
438# CONFIG_LIB80211 is not set 458# CONFIG_LIB80211 is not set
@@ -440,7 +460,6 @@ CONFIG_WIRELESS=y
440# 460#
441# CFG80211 needs to be enabled for MAC80211 461# CFG80211 needs to be enabled for MAC80211
442# 462#
443CONFIG_MAC80211_DEFAULT_PS_VALUE=0
444# CONFIG_WIMAX is not set 463# CONFIG_WIMAX is not set
445# CONFIG_RFKILL is not set 464# CONFIG_RFKILL is not set
446# CONFIG_NET_9P is not set 465# CONFIG_NET_9P is not set
@@ -464,9 +483,9 @@ CONFIG_EXTRA_FIRMWARE=""
464# CONFIG_CONNECTOR is not set 483# CONFIG_CONNECTOR is not set
465CONFIG_MTD=y 484CONFIG_MTD=y
466# CONFIG_MTD_DEBUG is not set 485# CONFIG_MTD_DEBUG is not set
486# CONFIG_MTD_TESTS is not set
467CONFIG_MTD_CONCAT=y 487CONFIG_MTD_CONCAT=y
468CONFIG_MTD_PARTITIONS=y 488CONFIG_MTD_PARTITIONS=y
469# CONFIG_MTD_TESTS is not set
470# CONFIG_MTD_REDBOOT_PARTS is not set 489# CONFIG_MTD_REDBOOT_PARTS is not set
471# CONFIG_MTD_CMDLINE_PARTS is not set 490# CONFIG_MTD_CMDLINE_PARTS is not set
472# CONFIG_MTD_AR7_PARTS is not set 491# CONFIG_MTD_AR7_PARTS is not set
@@ -597,7 +616,6 @@ CONFIG_SCSI_WAIT_SCAN=m
597# CONFIG_SCSI_SRP_ATTRS is not set 616# CONFIG_SCSI_SRP_ATTRS is not set
598CONFIG_SCSI_LOWLEVEL=y 617CONFIG_SCSI_LOWLEVEL=y
599# CONFIG_ISCSI_TCP is not set 618# CONFIG_ISCSI_TCP is not set
600# CONFIG_SCSI_BNX2_ISCSI is not set
601# CONFIG_LIBFC is not set 619# CONFIG_LIBFC is not set
602# CONFIG_LIBFCOE is not set 620# CONFIG_LIBFCOE is not set
603# CONFIG_SCSI_DEBUG is not set 621# CONFIG_SCSI_DEBUG is not set
@@ -605,6 +623,7 @@ CONFIG_SCSI_LOWLEVEL=y
605# CONFIG_SCSI_OSD_INITIATOR is not set 623# CONFIG_SCSI_OSD_INITIATOR is not set
606CONFIG_ATA=y 624CONFIG_ATA=y
607# CONFIG_ATA_NONSTANDARD is not set 625# CONFIG_ATA_NONSTANDARD is not set
626CONFIG_ATA_VERBOSE_ERROR=y
608CONFIG_SATA_PMP=y 627CONFIG_SATA_PMP=y
609CONFIG_ATA_SFF=y 628CONFIG_ATA_SFF=y
610# CONFIG_SATA_MV is not set 629# CONFIG_SATA_MV is not set
@@ -658,10 +677,7 @@ CONFIG_SH_ETH=y
658# CONFIG_KS8842 is not set 677# CONFIG_KS8842 is not set
659CONFIG_NETDEV_1000=y 678CONFIG_NETDEV_1000=y
660CONFIG_NETDEV_10000=y 679CONFIG_NETDEV_10000=y
661 680CONFIG_WLAN=y
662#
663# Wireless LAN
664#
665# CONFIG_WLAN_PRE80211 is not set 681# CONFIG_WLAN_PRE80211 is not set
666# CONFIG_WLAN_80211 is not set 682# CONFIG_WLAN_80211 is not set
667 683
@@ -719,11 +735,15 @@ CONFIG_HW_RANDOM=m
719# CONFIG_TCG_TPM is not set 735# CONFIG_TCG_TPM is not set
720# CONFIG_I2C is not set 736# CONFIG_I2C is not set
721# CONFIG_SPI is not set 737# CONFIG_SPI is not set
738
739#
740# PPS support
741#
742# CONFIG_PPS is not set
722# CONFIG_W1 is not set 743# CONFIG_W1 is not set
723# CONFIG_POWER_SUPPLY is not set 744# CONFIG_POWER_SUPPLY is not set
724# CONFIG_HWMON is not set 745# CONFIG_HWMON is not set
725# CONFIG_THERMAL is not set 746# CONFIG_THERMAL is not set
726# CONFIG_THERMAL_HWMON is not set
727# CONFIG_WATCHDOG is not set 747# CONFIG_WATCHDOG is not set
728CONFIG_SSB_POSSIBLE=y 748CONFIG_SSB_POSSIBLE=y
729 749
@@ -828,8 +848,10 @@ CONFIG_FS_MBCACHE=y
828# CONFIG_JFS_FS is not set 848# CONFIG_JFS_FS is not set
829CONFIG_FS_POSIX_ACL=y 849CONFIG_FS_POSIX_ACL=y
830# CONFIG_XFS_FS is not set 850# CONFIG_XFS_FS is not set
851# CONFIG_GFS2_FS is not set
831# CONFIG_OCFS2_FS is not set 852# CONFIG_OCFS2_FS is not set
832# CONFIG_BTRFS_FS is not set 853# CONFIG_BTRFS_FS is not set
854# CONFIG_NILFS2_FS is not set
833CONFIG_FILE_LOCKING=y 855CONFIG_FILE_LOCKING=y
834CONFIG_FSNOTIFY=y 856CONFIG_FSNOTIFY=y
835# CONFIG_DNOTIFY is not set 857# CONFIG_DNOTIFY is not set
@@ -866,8 +888,6 @@ CONFIG_PROC_FS=y
866CONFIG_PROC_SYSCTL=y 888CONFIG_PROC_SYSCTL=y
867CONFIG_PROC_PAGE_MONITOR=y 889CONFIG_PROC_PAGE_MONITOR=y
868CONFIG_SYSFS=y 890CONFIG_SYSFS=y
869CONFIG_TMPFS=y
870# CONFIG_TMPFS_POSIX_ACL is not set
871# CONFIG_HUGETLBFS is not set 891# CONFIG_HUGETLBFS is not set
872# CONFIG_HUGETLB_PAGE is not set 892# CONFIG_HUGETLB_PAGE is not set
873# CONFIG_CONFIGFS_FS is not set 893# CONFIG_CONFIGFS_FS is not set
@@ -900,7 +920,6 @@ CONFIG_CRAMFS=y
900# CONFIG_ROMFS_FS is not set 920# CONFIG_ROMFS_FS is not set
901# CONFIG_SYSV_FS is not set 921# CONFIG_SYSV_FS is not set
902# CONFIG_UFS_FS is not set 922# CONFIG_UFS_FS is not set
903# CONFIG_NILFS2_FS is not set
904CONFIG_NETWORK_FILESYSTEMS=y 923CONFIG_NETWORK_FILESYSTEMS=y
905CONFIG_NFS_FS=y 924CONFIG_NFS_FS=y
906# CONFIG_NFS_V3 is not set 925# CONFIG_NFS_V3 is not set
@@ -935,6 +954,7 @@ CONFIG_ENABLE_WARN_DEPRECATED=y
935CONFIG_ENABLE_MUST_CHECK=y 954CONFIG_ENABLE_MUST_CHECK=y
936CONFIG_FRAME_WARN=1024 955CONFIG_FRAME_WARN=1024
937# CONFIG_MAGIC_SYSRQ is not set 956# CONFIG_MAGIC_SYSRQ is not set
957# CONFIG_STRIP_ASM_SYMS is not set
938# CONFIG_UNUSED_SYMBOLS is not set 958# CONFIG_UNUSED_SYMBOLS is not set
939# CONFIG_DEBUG_FS is not set 959# CONFIG_DEBUG_FS is not set
940# CONFIG_HEADERS_CHECK is not set 960# CONFIG_HEADERS_CHECK is not set
@@ -964,24 +984,30 @@ CONFIG_DEBUG_INFO=y
964# CONFIG_DEBUG_LIST is not set 984# CONFIG_DEBUG_LIST is not set
965# CONFIG_DEBUG_SG is not set 985# CONFIG_DEBUG_SG is not set
966# CONFIG_DEBUG_NOTIFIERS is not set 986# CONFIG_DEBUG_NOTIFIERS is not set
987# CONFIG_DEBUG_CREDENTIALS is not set
967CONFIG_FRAME_POINTER=y 988CONFIG_FRAME_POINTER=y
968# CONFIG_RCU_TORTURE_TEST is not set 989# CONFIG_RCU_TORTURE_TEST is not set
969# CONFIG_RCU_CPU_STALL_DETECTOR is not set 990# CONFIG_RCU_CPU_STALL_DETECTOR is not set
970# CONFIG_BACKTRACE_SELF_TEST is not set 991# CONFIG_BACKTRACE_SELF_TEST is not set
971# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set 992# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
993# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
972# CONFIG_FAULT_INJECTION is not set 994# CONFIG_FAULT_INJECTION is not set
973# CONFIG_LATENCYTOP is not set 995# CONFIG_LATENCYTOP is not set
974CONFIG_SYSCTL_SYSCALL_CHECK=y 996CONFIG_SYSCTL_SYSCALL_CHECK=y
975# CONFIG_PAGE_POISONING is not set 997# CONFIG_PAGE_POISONING is not set
976CONFIG_HAVE_FUNCTION_TRACER=y 998CONFIG_HAVE_FUNCTION_TRACER=y
999CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1000CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
977CONFIG_HAVE_DYNAMIC_FTRACE=y 1001CONFIG_HAVE_DYNAMIC_FTRACE=y
978CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1002CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1003CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
979CONFIG_TRACING_SUPPORT=y 1004CONFIG_TRACING_SUPPORT=y
980CONFIG_FTRACE=y 1005CONFIG_FTRACE=y
981# CONFIG_FUNCTION_TRACER is not set 1006# CONFIG_FUNCTION_TRACER is not set
982# CONFIG_IRQSOFF_TRACER is not set 1007# CONFIG_IRQSOFF_TRACER is not set
983# CONFIG_SCHED_TRACER is not set 1008# CONFIG_SCHED_TRACER is not set
984# CONFIG_ENABLE_DEFAULT_TRACERS is not set 1009# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1010# CONFIG_FTRACE_SYSCALLS is not set
985# CONFIG_BOOT_TRACER is not set 1011# CONFIG_BOOT_TRACER is not set
986CONFIG_BRANCH_PROFILE_NONE=y 1012CONFIG_BRANCH_PROFILE_NONE=y
987# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set 1013# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
@@ -994,14 +1020,13 @@ CONFIG_BRANCH_PROFILE_NONE=y
994# CONFIG_SAMPLES is not set 1020# CONFIG_SAMPLES is not set
995CONFIG_HAVE_ARCH_KGDB=y 1021CONFIG_HAVE_ARCH_KGDB=y
996# CONFIG_KGDB is not set 1022# CONFIG_KGDB is not set
997# CONFIG_KMEMCHECK is not set
998# CONFIG_SH_STANDARD_BIOS is not set 1023# CONFIG_SH_STANDARD_BIOS is not set
999# CONFIG_EARLY_SCIF_CONSOLE is not set 1024# CONFIG_EARLY_SCIF_CONSOLE is not set
1000# CONFIG_DEBUG_BOOTMEM is not set 1025# CONFIG_STACK_DEBUG is not set
1001# CONFIG_DEBUG_STACKOVERFLOW is not set
1002# CONFIG_DEBUG_STACK_USAGE is not set 1026# CONFIG_DEBUG_STACK_USAGE is not set
1003# CONFIG_4KSTACKS is not set 1027# CONFIG_4KSTACKS is not set
1004# CONFIG_DUMP_CODE is not set 1028# CONFIG_DUMP_CODE is not set
1029# CONFIG_DWARF_UNWINDER is not set
1005# CONFIG_SH_NO_BSS_INIT is not set 1030# CONFIG_SH_NO_BSS_INIT is not set
1006 1031
1007# 1032#
@@ -1016,7 +1041,6 @@ CONFIG_CRYPTO=y
1016# 1041#
1017# Crypto core or helper 1042# Crypto core or helper
1018# 1043#
1019# CONFIG_CRYPTO_FIPS is not set
1020CONFIG_CRYPTO_ALGAPI=y 1044CONFIG_CRYPTO_ALGAPI=y
1021CONFIG_CRYPTO_ALGAPI2=y 1045CONFIG_CRYPTO_ALGAPI2=y
1022CONFIG_CRYPTO_AEAD=y 1046CONFIG_CRYPTO_AEAD=y
@@ -1059,11 +1083,13 @@ CONFIG_CRYPTO_PCBC=m
1059# 1083#
1060CONFIG_CRYPTO_HMAC=y 1084CONFIG_CRYPTO_HMAC=y
1061# CONFIG_CRYPTO_XCBC is not set 1085# CONFIG_CRYPTO_XCBC is not set
1086# CONFIG_CRYPTO_VMAC is not set
1062 1087
1063# 1088#
1064# Digest 1089# Digest
1065# 1090#
1066# CONFIG_CRYPTO_CRC32C is not set 1091# CONFIG_CRYPTO_CRC32C is not set
1092# CONFIG_CRYPTO_GHASH is not set
1067# CONFIG_CRYPTO_MD4 is not set 1093# CONFIG_CRYPTO_MD4 is not set
1068CONFIG_CRYPTO_MD5=y 1094CONFIG_CRYPTO_MD5=y
1069# CONFIG_CRYPTO_MICHAEL_MIC is not set 1095# CONFIG_CRYPTO_MICHAEL_MIC is not set
@@ -1127,5 +1153,6 @@ CONFIG_ZLIB_DEFLATE=y
1127CONFIG_HAS_IOMEM=y 1153CONFIG_HAS_IOMEM=y
1128CONFIG_HAS_IOPORT=y 1154CONFIG_HAS_IOPORT=y
1129CONFIG_HAS_DMA=y 1155CONFIG_HAS_DMA=y
1156CONFIG_HAVE_LMB=y
1130CONFIG_NLATTR=y 1157CONFIG_NLATTR=y
1131CONFIG_GENERIC_ATOMIC64=y 1158CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/se7721_defconfig b/arch/sh/configs/se7721_defconfig
index 306e21c4253d..b8a3c8c4bac3 100644
--- a/arch/sh/configs/se7721_defconfig
+++ b/arch/sh/configs/se7721_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.30 3# Linux kernel version: 2.6.31
4# Thu Jun 18 12:50:49 2009 4# Thu Sep 24 18:57:11 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -13,6 +13,7 @@ CONFIG_GENERIC_HWEIGHT=y
13CONFIG_GENERIC_HARDIRQS=y 13CONFIG_GENERIC_HARDIRQS=y
14CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 14CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
15CONFIG_GENERIC_IRQ_PROBE=y 15CONFIG_GENERIC_IRQ_PROBE=y
16CONFIG_IRQ_PER_CPU=y
16# CONFIG_GENERIC_GPIO is not set 17# CONFIG_GENERIC_GPIO is not set
17CONFIG_GENERIC_TIME=y 18CONFIG_GENERIC_TIME=y
18CONFIG_GENERIC_CLOCKEVENTS=y 19CONFIG_GENERIC_CLOCKEVENTS=y
@@ -27,7 +28,9 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
27# CONFIG_ARCH_HAS_ILOG2_U64 is not set 28# CONFIG_ARCH_HAS_ILOG2_U64 is not set
28CONFIG_ARCH_NO_VIRT_TO_BUS=y 29CONFIG_ARCH_NO_VIRT_TO_BUS=y
29CONFIG_ARCH_HAS_DEFAULT_IDLE=y 30CONFIG_ARCH_HAS_DEFAULT_IDLE=y
31CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
30CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 32CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
33CONFIG_CONSTRUCTORS=y
31 34
32# 35#
33# General setup 36# General setup
@@ -37,6 +40,12 @@ CONFIG_BROKEN_ON_SMP=y
37CONFIG_INIT_ENV_ARG_LIMIT=32 40CONFIG_INIT_ENV_ARG_LIMIT=32
38CONFIG_LOCALVERSION="" 41CONFIG_LOCALVERSION=""
39# CONFIG_LOCALVERSION_AUTO is not set 42# CONFIG_LOCALVERSION_AUTO is not set
43CONFIG_HAVE_KERNEL_GZIP=y
44CONFIG_HAVE_KERNEL_BZIP2=y
45CONFIG_HAVE_KERNEL_LZMA=y
46CONFIG_KERNEL_GZIP=y
47# CONFIG_KERNEL_BZIP2 is not set
48# CONFIG_KERNEL_LZMA is not set
40# CONFIG_SWAP is not set 49# CONFIG_SWAP is not set
41CONFIG_SYSVIPC=y 50CONFIG_SYSVIPC=y
42CONFIG_SYSVIPC_SYSCTL=y 51CONFIG_SYSVIPC_SYSCTL=y
@@ -50,11 +59,12 @@ CONFIG_BSD_PROCESS_ACCT=y
50# 59#
51# RCU Subsystem 60# RCU Subsystem
52# 61#
53CONFIG_CLASSIC_RCU=y 62CONFIG_TREE_RCU=y
54# CONFIG_TREE_RCU is not set 63# CONFIG_TREE_PREEMPT_RCU is not set
55# CONFIG_PREEMPT_RCU is not set 64# CONFIG_RCU_TRACE is not set
65CONFIG_RCU_FANOUT=32
66# CONFIG_RCU_FANOUT_EXACT is not set
56# CONFIG_TREE_RCU_TRACE is not set 67# CONFIG_TREE_RCU_TRACE is not set
57# CONFIG_PREEMPT_RCU_TRACE is not set
58# CONFIG_IKCONFIG is not set 68# CONFIG_IKCONFIG is not set
59CONFIG_LOG_BUF_SHIFT=14 69CONFIG_LOG_BUF_SHIFT=14
60CONFIG_GROUP_SCHED=y 70CONFIG_GROUP_SCHED=y
@@ -89,18 +99,19 @@ CONFIG_TIMERFD=y
89CONFIG_EVENTFD=y 99CONFIG_EVENTFD=y
90# CONFIG_SHMEM is not set 100# CONFIG_SHMEM is not set
91CONFIG_AIO=y 101CONFIG_AIO=y
102CONFIG_HAVE_PERF_EVENTS=y
92 103
93# 104#
94# Performance Counters 105# Kernel Performance Events And Counters
95# 106#
107# CONFIG_PERF_EVENTS is not set
108# CONFIG_PERF_COUNTERS is not set
96CONFIG_VM_EVENT_COUNTERS=y 109CONFIG_VM_EVENT_COUNTERS=y
97# CONFIG_STRIP_ASM_SYMS is not set
98CONFIG_COMPAT_BRK=y 110CONFIG_COMPAT_BRK=y
99CONFIG_SLAB=y 111CONFIG_SLAB=y
100# CONFIG_SLUB is not set 112# CONFIG_SLUB is not set
101# CONFIG_SLOB is not set 113# CONFIG_SLOB is not set
102# CONFIG_PROFILING is not set 114# CONFIG_PROFILING is not set
103# CONFIG_MARKERS is not set
104CONFIG_HAVE_OPROFILE=y 115CONFIG_HAVE_OPROFILE=y
105# CONFIG_KPROBES is not set 116# CONFIG_KPROBES is not set
106CONFIG_HAVE_IOREMAP_PROT=y 117CONFIG_HAVE_IOREMAP_PROT=y
@@ -109,6 +120,10 @@ CONFIG_HAVE_KRETPROBES=y
109CONFIG_HAVE_ARCH_TRACEHOOK=y 120CONFIG_HAVE_ARCH_TRACEHOOK=y
110CONFIG_HAVE_CLK=y 121CONFIG_HAVE_CLK=y
111CONFIG_HAVE_DMA_API_DEBUG=y 122CONFIG_HAVE_DMA_API_DEBUG=y
123
124#
125# GCOV-based kernel profiling
126#
112# CONFIG_SLOW_WORK is not set 127# CONFIG_SLOW_WORK is not set
113CONFIG_HAVE_GENERIC_DMA_COHERENT=y 128CONFIG_HAVE_GENERIC_DMA_COHERENT=y
114CONFIG_SLABINFO=y 129CONFIG_SLABINFO=y
@@ -120,7 +135,7 @@ CONFIG_MODULES=y
120# CONFIG_MODVERSIONS is not set 135# CONFIG_MODVERSIONS is not set
121# CONFIG_MODULE_SRCVERSION_ALL is not set 136# CONFIG_MODULE_SRCVERSION_ALL is not set
122CONFIG_BLOCK=y 137CONFIG_BLOCK=y
123# CONFIG_LBD is not set 138CONFIG_LBDAF=y
124# CONFIG_BLK_DEV_BSG is not set 139# CONFIG_BLK_DEV_BSG is not set
125# CONFIG_BLK_DEV_INTEGRITY is not set 140# CONFIG_BLK_DEV_INTEGRITY is not set
126 141
@@ -167,6 +182,7 @@ CONFIG_CPU_SUBTYPE_SH7721=y
167# CONFIG_CPU_SUBTYPE_SH4_202 is not set 182# CONFIG_CPU_SUBTYPE_SH4_202 is not set
168# CONFIG_CPU_SUBTYPE_SH7723 is not set 183# CONFIG_CPU_SUBTYPE_SH7723 is not set
169# CONFIG_CPU_SUBTYPE_SH7724 is not set 184# CONFIG_CPU_SUBTYPE_SH7724 is not set
185# CONFIG_CPU_SUBTYPE_SH7757 is not set
170# CONFIG_CPU_SUBTYPE_SH7763 is not set 186# CONFIG_CPU_SUBTYPE_SH7763 is not set
171# CONFIG_CPU_SUBTYPE_SH7770 is not set 187# CONFIG_CPU_SUBTYPE_SH7770 is not set
172# CONFIG_CPU_SUBTYPE_SH7780 is not set 188# CONFIG_CPU_SUBTYPE_SH7780 is not set
@@ -212,6 +228,7 @@ CONFIG_ZONE_DMA_FLAG=0
212CONFIG_NR_QUICK=2 228CONFIG_NR_QUICK=2
213CONFIG_HAVE_MLOCK=y 229CONFIG_HAVE_MLOCK=y
214CONFIG_HAVE_MLOCKED_PAGE_BIT=y 230CONFIG_HAVE_MLOCKED_PAGE_BIT=y
231# CONFIG_KSM is not set
215CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 232CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
216 233
217# 234#
@@ -296,7 +313,8 @@ CONFIG_GUSA=y
296CONFIG_ZERO_PAGE_OFFSET=0x00001000 313CONFIG_ZERO_PAGE_OFFSET=0x00001000
297CONFIG_BOOT_LINK_OFFSET=0x00800000 314CONFIG_BOOT_LINK_OFFSET=0x00800000
298CONFIG_ENTRY_OFFSET=0x00001000 315CONFIG_ENTRY_OFFSET=0x00001000
299CONFIG_CMDLINE_BOOL=y 316CONFIG_CMDLINE_OVERWRITE=y
317# CONFIG_CMDLINE_EXTEND is not set
300CONFIG_CMDLINE="console=ttySC0,115200 root=/dev/sda2" 318CONFIG_CMDLINE="console=ttySC0,115200 root=/dev/sda2"
301 319
302# 320#
@@ -373,6 +391,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
373# CONFIG_NETFILTER is not set 391# CONFIG_NETFILTER is not set
374# CONFIG_IP_DCCP is not set 392# CONFIG_IP_DCCP is not set
375# CONFIG_IP_SCTP is not set 393# CONFIG_IP_SCTP is not set
394# CONFIG_RDS is not set
376# CONFIG_TIPC is not set 395# CONFIG_TIPC is not set
377# CONFIG_ATM is not set 396# CONFIG_ATM is not set
378# CONFIG_BRIDGE is not set 397# CONFIG_BRIDGE is not set
@@ -438,6 +457,7 @@ CONFIG_NET_SCH_FIFO=y
438CONFIG_FIB_RULES=y 457CONFIG_FIB_RULES=y
439CONFIG_WIRELESS=y 458CONFIG_WIRELESS=y
440# CONFIG_CFG80211 is not set 459# CONFIG_CFG80211 is not set
460CONFIG_CFG80211_DEFAULT_PS_VALUE=0
441# CONFIG_WIRELESS_OLD_REGULATORY is not set 461# CONFIG_WIRELESS_OLD_REGULATORY is not set
442# CONFIG_WIRELESS_EXT is not set 462# CONFIG_WIRELESS_EXT is not set
443# CONFIG_LIB80211 is not set 463# CONFIG_LIB80211 is not set
@@ -445,7 +465,6 @@ CONFIG_WIRELESS=y
445# 465#
446# CFG80211 needs to be enabled for MAC80211 466# CFG80211 needs to be enabled for MAC80211
447# 467#
448CONFIG_MAC80211_DEFAULT_PS_VALUE=0
449# CONFIG_WIMAX is not set 468# CONFIG_WIMAX is not set
450# CONFIG_RFKILL is not set 469# CONFIG_RFKILL is not set
451# CONFIG_NET_9P is not set 470# CONFIG_NET_9P is not set
@@ -469,9 +488,9 @@ CONFIG_EXTRA_FIRMWARE=""
469# CONFIG_CONNECTOR is not set 488# CONFIG_CONNECTOR is not set
470CONFIG_MTD=y 489CONFIG_MTD=y
471# CONFIG_MTD_DEBUG is not set 490# CONFIG_MTD_DEBUG is not set
491# CONFIG_MTD_TESTS is not set
472CONFIG_MTD_CONCAT=y 492CONFIG_MTD_CONCAT=y
473CONFIG_MTD_PARTITIONS=y 493CONFIG_MTD_PARTITIONS=y
474# CONFIG_MTD_TESTS is not set
475# CONFIG_MTD_REDBOOT_PARTS is not set 494# CONFIG_MTD_REDBOOT_PARTS is not set
476# CONFIG_MTD_CMDLINE_PARTS is not set 495# CONFIG_MTD_CMDLINE_PARTS is not set
477# CONFIG_MTD_AR7_PARTS is not set 496# CONFIG_MTD_AR7_PARTS is not set
@@ -606,6 +625,7 @@ CONFIG_SCSI_WAIT_SCAN=m
606# CONFIG_SCSI_OSD_INITIATOR is not set 625# CONFIG_SCSI_OSD_INITIATOR is not set
607CONFIG_ATA=y 626CONFIG_ATA=y
608# CONFIG_ATA_NONSTANDARD is not set 627# CONFIG_ATA_NONSTANDARD is not set
628CONFIG_ATA_VERBOSE_ERROR=y
609CONFIG_SATA_PMP=y 629CONFIG_SATA_PMP=y
610CONFIG_ATA_SFF=y 630CONFIG_ATA_SFF=y
611# CONFIG_SATA_MV is not set 631# CONFIG_SATA_MV is not set
@@ -621,10 +641,7 @@ CONFIG_NETDEVICES=y
621# CONFIG_NET_ETHERNET is not set 641# CONFIG_NET_ETHERNET is not set
622CONFIG_NETDEV_1000=y 642CONFIG_NETDEV_1000=y
623CONFIG_NETDEV_10000=y 643CONFIG_NETDEV_10000=y
624 644CONFIG_WLAN=y
625#
626# Wireless LAN
627#
628# CONFIG_WLAN_PRE80211 is not set 645# CONFIG_WLAN_PRE80211 is not set
629# CONFIG_WLAN_80211 is not set 646# CONFIG_WLAN_80211 is not set
630 647
@@ -672,12 +689,13 @@ CONFIG_INPUT_EVDEV=y
672# 689#
673CONFIG_INPUT_KEYBOARD=y 690CONFIG_INPUT_KEYBOARD=y
674# CONFIG_KEYBOARD_ATKBD is not set 691# CONFIG_KEYBOARD_ATKBD is not set
675# CONFIG_KEYBOARD_SUNKBD is not set
676# CONFIG_KEYBOARD_LKKBD is not set 692# CONFIG_KEYBOARD_LKKBD is not set
677# CONFIG_KEYBOARD_XTKBD is not set
678# CONFIG_KEYBOARD_NEWTON is not set 693# CONFIG_KEYBOARD_NEWTON is not set
694# CONFIG_KEYBOARD_OPENCORES is not set
679# CONFIG_KEYBOARD_STOWAWAY is not set 695# CONFIG_KEYBOARD_STOWAWAY is not set
696# CONFIG_KEYBOARD_SUNKBD is not set
680# CONFIG_KEYBOARD_SH_KEYSC is not set 697# CONFIG_KEYBOARD_SH_KEYSC is not set
698# CONFIG_KEYBOARD_XTKBD is not set
681CONFIG_INPUT_MOUSE=y 699CONFIG_INPUT_MOUSE=y
682# CONFIG_MOUSE_PS2 is not set 700# CONFIG_MOUSE_PS2 is not set
683# CONFIG_MOUSE_SERIAL is not set 701# CONFIG_MOUSE_SERIAL is not set
@@ -725,6 +743,11 @@ CONFIG_UNIX98_PTYS=y
725# CONFIG_TCG_TPM is not set 743# CONFIG_TCG_TPM is not set
726# CONFIG_I2C is not set 744# CONFIG_I2C is not set
727# CONFIG_SPI is not set 745# CONFIG_SPI is not set
746
747#
748# PPS support
749#
750# CONFIG_PPS is not set
728# CONFIG_W1 is not set 751# CONFIG_W1 is not set
729# CONFIG_POWER_SUPPLY is not set 752# CONFIG_POWER_SUPPLY is not set
730# CONFIG_HWMON is not set 753# CONFIG_HWMON is not set
@@ -762,7 +785,6 @@ CONFIG_SSB_POSSIBLE=y
762# CONFIG_SOUND is not set 785# CONFIG_SOUND is not set
763CONFIG_HID_SUPPORT=y 786CONFIG_HID_SUPPORT=y
764CONFIG_HID=y 787CONFIG_HID=y
765# CONFIG_HID_DEBUG is not set
766# CONFIG_HIDRAW is not set 788# CONFIG_HIDRAW is not set
767 789
768# 790#
@@ -785,6 +807,7 @@ CONFIG_HID_CYPRESS=y
785CONFIG_HID_EZKEY=y 807CONFIG_HID_EZKEY=y
786# CONFIG_HID_KYE is not set 808# CONFIG_HID_KYE is not set
787CONFIG_HID_GYRATION=y 809CONFIG_HID_GYRATION=y
810# CONFIG_HID_TWINHAN is not set
788# CONFIG_HID_KENSINGTON is not set 811# CONFIG_HID_KENSINGTON is not set
789CONFIG_HID_LOGITECH=y 812CONFIG_HID_LOGITECH=y
790# CONFIG_LOGITECH_FF is not set 813# CONFIG_LOGITECH_FF is not set
@@ -831,6 +854,7 @@ CONFIG_USB_MON=y
831# CONFIG_USB_OXU210HP_HCD is not set 854# CONFIG_USB_OXU210HP_HCD is not set
832# CONFIG_USB_ISP116X_HCD is not set 855# CONFIG_USB_ISP116X_HCD is not set
833# CONFIG_USB_ISP1760_HCD is not set 856# CONFIG_USB_ISP1760_HCD is not set
857# CONFIG_USB_ISP1362_HCD is not set
834CONFIG_USB_OHCI_HCD=y 858CONFIG_USB_OHCI_HCD=y
835# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set 859# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
836# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set 860# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
@@ -900,6 +924,7 @@ CONFIG_USB_STORAGE=y
900# CONFIG_USB_LD is not set 924# CONFIG_USB_LD is not set
901# CONFIG_USB_TRANCEVIBRATOR is not set 925# CONFIG_USB_TRANCEVIBRATOR is not set
902# CONFIG_USB_IOWARRIOR is not set 926# CONFIG_USB_IOWARRIOR is not set
927# CONFIG_USB_TEST is not set
903# CONFIG_USB_ISIGHTFW is not set 928# CONFIG_USB_ISIGHTFW is not set
904# CONFIG_USB_VST is not set 929# CONFIG_USB_VST is not set
905# CONFIG_USB_GADGET is not set 930# CONFIG_USB_GADGET is not set
@@ -961,8 +986,10 @@ CONFIG_FS_MBCACHE=y
961# CONFIG_JFS_FS is not set 986# CONFIG_JFS_FS is not set
962CONFIG_FS_POSIX_ACL=y 987CONFIG_FS_POSIX_ACL=y
963# CONFIG_XFS_FS is not set 988# CONFIG_XFS_FS is not set
989# CONFIG_GFS2_FS is not set
964# CONFIG_OCFS2_FS is not set 990# CONFIG_OCFS2_FS is not set
965# CONFIG_BTRFS_FS is not set 991# CONFIG_BTRFS_FS is not set
992# CONFIG_NILFS2_FS is not set
966CONFIG_FILE_LOCKING=y 993CONFIG_FILE_LOCKING=y
967CONFIG_FSNOTIFY=y 994CONFIG_FSNOTIFY=y
968# CONFIG_DNOTIFY is not set 995# CONFIG_DNOTIFY is not set
@@ -1002,8 +1029,6 @@ CONFIG_PROC_FS=y
1002CONFIG_PROC_SYSCTL=y 1029CONFIG_PROC_SYSCTL=y
1003CONFIG_PROC_PAGE_MONITOR=y 1030CONFIG_PROC_PAGE_MONITOR=y
1004CONFIG_SYSFS=y 1031CONFIG_SYSFS=y
1005CONFIG_TMPFS=y
1006# CONFIG_TMPFS_POSIX_ACL is not set
1007# CONFIG_HUGETLBFS is not set 1032# CONFIG_HUGETLBFS is not set
1008# CONFIG_HUGETLB_PAGE is not set 1033# CONFIG_HUGETLB_PAGE is not set
1009# CONFIG_CONFIGFS_FS is not set 1034# CONFIG_CONFIGFS_FS is not set
@@ -1036,7 +1061,6 @@ CONFIG_CRAMFS=y
1036# CONFIG_ROMFS_FS is not set 1061# CONFIG_ROMFS_FS is not set
1037# CONFIG_SYSV_FS is not set 1062# CONFIG_SYSV_FS is not set
1038# CONFIG_UFS_FS is not set 1063# CONFIG_UFS_FS is not set
1039# CONFIG_NILFS2_FS is not set
1040# CONFIG_NETWORK_FILESYSTEMS is not set 1064# CONFIG_NETWORK_FILESYSTEMS is not set
1041 1065
1042# 1066#
@@ -1095,6 +1119,7 @@ CONFIG_ENABLE_WARN_DEPRECATED=y
1095CONFIG_ENABLE_MUST_CHECK=y 1119CONFIG_ENABLE_MUST_CHECK=y
1096CONFIG_FRAME_WARN=1024 1120CONFIG_FRAME_WARN=1024
1097# CONFIG_MAGIC_SYSRQ is not set 1121# CONFIG_MAGIC_SYSRQ is not set
1122# CONFIG_STRIP_ASM_SYMS is not set
1098# CONFIG_UNUSED_SYMBOLS is not set 1123# CONFIG_UNUSED_SYMBOLS is not set
1099# CONFIG_DEBUG_FS is not set 1124# CONFIG_DEBUG_FS is not set
1100# CONFIG_HEADERS_CHECK is not set 1125# CONFIG_HEADERS_CHECK is not set
@@ -1124,24 +1149,30 @@ CONFIG_DEBUG_INFO=y
1124# CONFIG_DEBUG_LIST is not set 1149# CONFIG_DEBUG_LIST is not set
1125# CONFIG_DEBUG_SG is not set 1150# CONFIG_DEBUG_SG is not set
1126# CONFIG_DEBUG_NOTIFIERS is not set 1151# CONFIG_DEBUG_NOTIFIERS is not set
1152# CONFIG_DEBUG_CREDENTIALS is not set
1127CONFIG_FRAME_POINTER=y 1153CONFIG_FRAME_POINTER=y
1128# CONFIG_RCU_TORTURE_TEST is not set 1154# CONFIG_RCU_TORTURE_TEST is not set
1129# CONFIG_RCU_CPU_STALL_DETECTOR is not set 1155# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1130# CONFIG_BACKTRACE_SELF_TEST is not set 1156# CONFIG_BACKTRACE_SELF_TEST is not set
1131# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set 1157# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
1158# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
1132# CONFIG_FAULT_INJECTION is not set 1159# CONFIG_FAULT_INJECTION is not set
1133# CONFIG_LATENCYTOP is not set 1160# CONFIG_LATENCYTOP is not set
1134# CONFIG_SYSCTL_SYSCALL_CHECK is not set 1161# CONFIG_SYSCTL_SYSCALL_CHECK is not set
1135# CONFIG_PAGE_POISONING is not set 1162# CONFIG_PAGE_POISONING is not set
1136CONFIG_HAVE_FUNCTION_TRACER=y 1163CONFIG_HAVE_FUNCTION_TRACER=y
1164CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1165CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
1137CONFIG_HAVE_DYNAMIC_FTRACE=y 1166CONFIG_HAVE_DYNAMIC_FTRACE=y
1138CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1167CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1168CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
1139CONFIG_TRACING_SUPPORT=y 1169CONFIG_TRACING_SUPPORT=y
1140CONFIG_FTRACE=y 1170CONFIG_FTRACE=y
1141# CONFIG_FUNCTION_TRACER is not set 1171# CONFIG_FUNCTION_TRACER is not set
1142# CONFIG_IRQSOFF_TRACER is not set 1172# CONFIG_IRQSOFF_TRACER is not set
1143# CONFIG_SCHED_TRACER is not set 1173# CONFIG_SCHED_TRACER is not set
1144# CONFIG_ENABLE_DEFAULT_TRACERS is not set 1174# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1175# CONFIG_FTRACE_SYSCALLS is not set
1145# CONFIG_BOOT_TRACER is not set 1176# CONFIG_BOOT_TRACER is not set
1146CONFIG_BRANCH_PROFILE_NONE=y 1177CONFIG_BRANCH_PROFILE_NONE=y
1147# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set 1178# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
@@ -1154,14 +1185,13 @@ CONFIG_BRANCH_PROFILE_NONE=y
1154# CONFIG_SAMPLES is not set 1185# CONFIG_SAMPLES is not set
1155CONFIG_HAVE_ARCH_KGDB=y 1186CONFIG_HAVE_ARCH_KGDB=y
1156# CONFIG_KGDB is not set 1187# CONFIG_KGDB is not set
1157# CONFIG_KMEMCHECK is not set
1158# CONFIG_SH_STANDARD_BIOS is not set 1188# CONFIG_SH_STANDARD_BIOS is not set
1159# CONFIG_EARLY_SCIF_CONSOLE is not set 1189# CONFIG_EARLY_SCIF_CONSOLE is not set
1160# CONFIG_DEBUG_BOOTMEM is not set 1190# CONFIG_STACK_DEBUG is not set
1161# CONFIG_DEBUG_STACKOVERFLOW is not set
1162# CONFIG_DEBUG_STACK_USAGE is not set 1191# CONFIG_DEBUG_STACK_USAGE is not set
1163# CONFIG_4KSTACKS is not set 1192# CONFIG_4KSTACKS is not set
1164# CONFIG_DUMP_CODE is not set 1193# CONFIG_DUMP_CODE is not set
1194# CONFIG_DWARF_UNWINDER is not set
1165# CONFIG_SH_NO_BSS_INIT is not set 1195# CONFIG_SH_NO_BSS_INIT is not set
1166 1196
1167# 1197#
@@ -1176,7 +1206,6 @@ CONFIG_CRYPTO=y
1176# 1206#
1177# Crypto core or helper 1207# Crypto core or helper
1178# 1208#
1179# CONFIG_CRYPTO_FIPS is not set
1180CONFIG_CRYPTO_ALGAPI=y 1209CONFIG_CRYPTO_ALGAPI=y
1181CONFIG_CRYPTO_ALGAPI2=y 1210CONFIG_CRYPTO_ALGAPI2=y
1182CONFIG_CRYPTO_AEAD=y 1211CONFIG_CRYPTO_AEAD=y
@@ -1219,11 +1248,13 @@ CONFIG_CRYPTO_CBC=y
1219# 1248#
1220CONFIG_CRYPTO_HMAC=y 1249CONFIG_CRYPTO_HMAC=y
1221# CONFIG_CRYPTO_XCBC is not set 1250# CONFIG_CRYPTO_XCBC is not set
1251# CONFIG_CRYPTO_VMAC is not set
1222 1252
1223# 1253#
1224# Digest 1254# Digest
1225# 1255#
1226# CONFIG_CRYPTO_CRC32C is not set 1256# CONFIG_CRYPTO_CRC32C is not set
1257# CONFIG_CRYPTO_GHASH is not set
1227# CONFIG_CRYPTO_MD4 is not set 1258# CONFIG_CRYPTO_MD4 is not set
1228CONFIG_CRYPTO_MD5=y 1259CONFIG_CRYPTO_MD5=y
1229# CONFIG_CRYPTO_MICHAEL_MIC is not set 1260# CONFIG_CRYPTO_MICHAEL_MIC is not set
@@ -1287,5 +1318,6 @@ CONFIG_ZLIB_DEFLATE=y
1287CONFIG_HAS_IOMEM=y 1318CONFIG_HAS_IOMEM=y
1288CONFIG_HAS_IOPORT=y 1319CONFIG_HAS_IOPORT=y
1289CONFIG_HAS_DMA=y 1320CONFIG_HAS_DMA=y
1321CONFIG_HAVE_LMB=y
1290CONFIG_NLATTR=y 1322CONFIG_NLATTR=y
1291CONFIG_GENERIC_ATOMIC64=y 1323CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/se7722_defconfig b/arch/sh/configs/se7722_defconfig
index 619438299847..d709b7f35ace 100644
--- a/arch/sh/configs/se7722_defconfig
+++ b/arch/sh/configs/se7722_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.30 3# Linux kernel version: 2.6.31
4# Thu Jun 18 12:54:24 2009 4# Thu Sep 24 18:57:41 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -14,6 +14,7 @@ CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y 14CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
16CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_IRQ_PER_CPU=y
17# CONFIG_GENERIC_GPIO is not set 18# CONFIG_GENERIC_GPIO is not set
18CONFIG_GENERIC_TIME=y 19CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 20CONFIG_GENERIC_CLOCKEVENTS=y
@@ -29,7 +30,9 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
29# CONFIG_ARCH_HAS_ILOG2_U64 is not set 30# CONFIG_ARCH_HAS_ILOG2_U64 is not set
30CONFIG_ARCH_NO_VIRT_TO_BUS=y 31CONFIG_ARCH_NO_VIRT_TO_BUS=y
31CONFIG_ARCH_HAS_DEFAULT_IDLE=y 32CONFIG_ARCH_HAS_DEFAULT_IDLE=y
33CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
32CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 34CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
35CONFIG_CONSTRUCTORS=y
33 36
34# 37#
35# General setup 38# General setup
@@ -40,6 +43,12 @@ CONFIG_LOCK_KERNEL=y
40CONFIG_INIT_ENV_ARG_LIMIT=32 43CONFIG_INIT_ENV_ARG_LIMIT=32
41CONFIG_LOCALVERSION="" 44CONFIG_LOCALVERSION=""
42CONFIG_LOCALVERSION_AUTO=y 45CONFIG_LOCALVERSION_AUTO=y
46CONFIG_HAVE_KERNEL_GZIP=y
47CONFIG_HAVE_KERNEL_BZIP2=y
48CONFIG_HAVE_KERNEL_LZMA=y
49CONFIG_KERNEL_GZIP=y
50# CONFIG_KERNEL_BZIP2 is not set
51# CONFIG_KERNEL_LZMA is not set
43CONFIG_SWAP=y 52CONFIG_SWAP=y
44CONFIG_SYSVIPC=y 53CONFIG_SYSVIPC=y
45CONFIG_SYSVIPC_SYSCTL=y 54CONFIG_SYSVIPC_SYSCTL=y
@@ -52,11 +61,12 @@ CONFIG_BSD_PROCESS_ACCT=y
52# 61#
53# RCU Subsystem 62# RCU Subsystem
54# 63#
55CONFIG_CLASSIC_RCU=y 64CONFIG_TREE_RCU=y
56# CONFIG_TREE_RCU is not set 65# CONFIG_TREE_PREEMPT_RCU is not set
57# CONFIG_PREEMPT_RCU is not set 66# CONFIG_RCU_TRACE is not set
67CONFIG_RCU_FANOUT=32
68# CONFIG_RCU_FANOUT_EXACT is not set
58# CONFIG_TREE_RCU_TRACE is not set 69# CONFIG_TREE_RCU_TRACE is not set
59# CONFIG_PREEMPT_RCU_TRACE is not set
60CONFIG_IKCONFIG=y 70CONFIG_IKCONFIG=y
61CONFIG_IKCONFIG_PROC=y 71CONFIG_IKCONFIG_PROC=y
62CONFIG_LOG_BUF_SHIFT=14 72CONFIG_LOG_BUF_SHIFT=14
@@ -91,19 +101,20 @@ CONFIG_TIMERFD=y
91CONFIG_EVENTFD=y 101CONFIG_EVENTFD=y
92CONFIG_SHMEM=y 102CONFIG_SHMEM=y
93CONFIG_AIO=y 103CONFIG_AIO=y
104CONFIG_HAVE_PERF_EVENTS=y
94 105
95# 106#
96# Performance Counters 107# Kernel Performance Events And Counters
97# 108#
109CONFIG_PERF_EVENTS=y
110# CONFIG_PERF_COUNTERS is not set
98CONFIG_VM_EVENT_COUNTERS=y 111CONFIG_VM_EVENT_COUNTERS=y
99CONFIG_SLUB_DEBUG=y 112CONFIG_SLUB_DEBUG=y
100# CONFIG_STRIP_ASM_SYMS is not set
101CONFIG_COMPAT_BRK=y 113CONFIG_COMPAT_BRK=y
102# CONFIG_SLAB is not set 114# CONFIG_SLAB is not set
103CONFIG_SLUB=y 115CONFIG_SLUB=y
104# CONFIG_SLOB is not set 116# CONFIG_SLOB is not set
105CONFIG_PROFILING=y 117CONFIG_PROFILING=y
106# CONFIG_MARKERS is not set
107# CONFIG_OPROFILE is not set 118# CONFIG_OPROFILE is not set
108CONFIG_HAVE_OPROFILE=y 119CONFIG_HAVE_OPROFILE=y
109# CONFIG_KPROBES is not set 120# CONFIG_KPROBES is not set
@@ -113,6 +124,11 @@ CONFIG_HAVE_KRETPROBES=y
113CONFIG_HAVE_ARCH_TRACEHOOK=y 124CONFIG_HAVE_ARCH_TRACEHOOK=y
114CONFIG_HAVE_CLK=y 125CONFIG_HAVE_CLK=y
115CONFIG_HAVE_DMA_API_DEBUG=y 126CONFIG_HAVE_DMA_API_DEBUG=y
127
128#
129# GCOV-based kernel profiling
130#
131# CONFIG_GCOV_KERNEL is not set
116# CONFIG_SLOW_WORK is not set 132# CONFIG_SLOW_WORK is not set
117CONFIG_HAVE_GENERIC_DMA_COHERENT=y 133CONFIG_HAVE_GENERIC_DMA_COHERENT=y
118CONFIG_SLABINFO=y 134CONFIG_SLABINFO=y
@@ -125,7 +141,7 @@ CONFIG_MODULE_UNLOAD=y
125# CONFIG_MODVERSIONS is not set 141# CONFIG_MODVERSIONS is not set
126# CONFIG_MODULE_SRCVERSION_ALL is not set 142# CONFIG_MODULE_SRCVERSION_ALL is not set
127CONFIG_BLOCK=y 143CONFIG_BLOCK=y
128# CONFIG_LBD is not set 144CONFIG_LBDAF=y
129# CONFIG_BLK_DEV_BSG is not set 145# CONFIG_BLK_DEV_BSG is not set
130# CONFIG_BLK_DEV_INTEGRITY is not set 146# CONFIG_BLK_DEV_INTEGRITY is not set
131 147
@@ -141,7 +157,7 @@ CONFIG_IOSCHED_NOOP=y
141# CONFIG_DEFAULT_CFQ is not set 157# CONFIG_DEFAULT_CFQ is not set
142CONFIG_DEFAULT_NOOP=y 158CONFIG_DEFAULT_NOOP=y
143CONFIG_DEFAULT_IOSCHED="noop" 159CONFIG_DEFAULT_IOSCHED="noop"
144# CONFIG_FREEZER is not set 160CONFIG_FREEZER=y
145 161
146# 162#
147# System type 163# System type
@@ -176,6 +192,7 @@ CONFIG_ARCH_SHMOBILE=y
176# CONFIG_CPU_SUBTYPE_SH4_202 is not set 192# CONFIG_CPU_SUBTYPE_SH4_202 is not set
177# CONFIG_CPU_SUBTYPE_SH7723 is not set 193# CONFIG_CPU_SUBTYPE_SH7723 is not set
178# CONFIG_CPU_SUBTYPE_SH7724 is not set 194# CONFIG_CPU_SUBTYPE_SH7724 is not set
195# CONFIG_CPU_SUBTYPE_SH7757 is not set
179# CONFIG_CPU_SUBTYPE_SH7763 is not set 196# CONFIG_CPU_SUBTYPE_SH7763 is not set
180# CONFIG_CPU_SUBTYPE_SH7770 is not set 197# CONFIG_CPU_SUBTYPE_SH7770 is not set
181# CONFIG_CPU_SUBTYPE_SH7780 is not set 198# CONFIG_CPU_SUBTYPE_SH7780 is not set
@@ -233,6 +250,7 @@ CONFIG_ZONE_DMA_FLAG=0
233CONFIG_NR_QUICK=2 250CONFIG_NR_QUICK=2
234CONFIG_HAVE_MLOCK=y 251CONFIG_HAVE_MLOCK=y
235CONFIG_HAVE_MLOCKED_PAGE_BIT=y 252CONFIG_HAVE_MLOCKED_PAGE_BIT=y
253# CONFIG_KSM is not set
236CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 254CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
237 255
238# 256#
@@ -317,7 +335,8 @@ CONFIG_GUSA=y
317CONFIG_ZERO_PAGE_OFFSET=0x00001000 335CONFIG_ZERO_PAGE_OFFSET=0x00001000
318CONFIG_BOOT_LINK_OFFSET=0x00800000 336CONFIG_BOOT_LINK_OFFSET=0x00800000
319CONFIG_ENTRY_OFFSET=0x00001000 337CONFIG_ENTRY_OFFSET=0x00001000
320# CONFIG_CMDLINE_BOOL is not set 338# CONFIG_CMDLINE_OVERWRITE is not set
339# CONFIG_CMDLINE_EXTEND is not set
321 340
322# 341#
323# Bus options 342# Bus options
@@ -336,7 +355,13 @@ CONFIG_BINFMT_ELF=y
336# 355#
337# Power management options (EXPERIMENTAL) 356# Power management options (EXPERIMENTAL)
338# 357#
339# CONFIG_PM is not set 358CONFIG_PM=y
359# CONFIG_PM_DEBUG is not set
360CONFIG_PM_SLEEP=y
361CONFIG_SUSPEND=y
362CONFIG_SUSPEND_FREEZER=y
363# CONFIG_HIBERNATION is not set
364CONFIG_PM_RUNTIME=y
340# CONFIG_CPU_IDLE is not set 365# CONFIG_CPU_IDLE is not set
341CONFIG_NET=y 366CONFIG_NET=y
342 367
@@ -381,6 +406,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
381# CONFIG_NETFILTER is not set 406# CONFIG_NETFILTER is not set
382# CONFIG_IP_DCCP is not set 407# CONFIG_IP_DCCP is not set
383# CONFIG_IP_SCTP is not set 408# CONFIG_IP_SCTP is not set
409# CONFIG_RDS is not set
384# CONFIG_TIPC is not set 410# CONFIG_TIPC is not set
385# CONFIG_ATM is not set 411# CONFIG_ATM is not set
386# CONFIG_BRIDGE is not set 412# CONFIG_BRIDGE is not set
@@ -410,6 +436,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
410# CONFIG_AF_RXRPC is not set 436# CONFIG_AF_RXRPC is not set
411CONFIG_WIRELESS=y 437CONFIG_WIRELESS=y
412# CONFIG_CFG80211 is not set 438# CONFIG_CFG80211 is not set
439CONFIG_CFG80211_DEFAULT_PS_VALUE=0
413# CONFIG_WIRELESS_OLD_REGULATORY is not set 440# CONFIG_WIRELESS_OLD_REGULATORY is not set
414# CONFIG_WIRELESS_EXT is not set 441# CONFIG_WIRELESS_EXT is not set
415# CONFIG_LIB80211 is not set 442# CONFIG_LIB80211 is not set
@@ -417,7 +444,6 @@ CONFIG_WIRELESS=y
417# 444#
418# CFG80211 needs to be enabled for MAC80211 445# CFG80211 needs to be enabled for MAC80211
419# 446#
420CONFIG_MAC80211_DEFAULT_PS_VALUE=0
421# CONFIG_WIMAX is not set 447# CONFIG_WIMAX is not set
422# CONFIG_RFKILL is not set 448# CONFIG_RFKILL is not set
423# CONFIG_NET_9P is not set 449# CONFIG_NET_9P is not set
@@ -430,6 +456,7 @@ CONFIG_MAC80211_DEFAULT_PS_VALUE=0
430# Generic Driver Options 456# Generic Driver Options
431# 457#
432CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 458CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
459# CONFIG_DEVTMPFS is not set
433CONFIG_STANDALONE=y 460CONFIG_STANDALONE=y
434CONFIG_PREVENT_FIRMWARE_BUILD=y 461CONFIG_PREVENT_FIRMWARE_BUILD=y
435# CONFIG_FW_LOADER is not set 462# CONFIG_FW_LOADER is not set
@@ -494,7 +521,6 @@ CONFIG_SCSI_WAIT_SCAN=m
494# CONFIG_SCSI_SRP_ATTRS is not set 521# CONFIG_SCSI_SRP_ATTRS is not set
495CONFIG_SCSI_LOWLEVEL=y 522CONFIG_SCSI_LOWLEVEL=y
496# CONFIG_ISCSI_TCP is not set 523# CONFIG_ISCSI_TCP is not set
497# CONFIG_SCSI_BNX2_ISCSI is not set
498# CONFIG_LIBFC is not set 524# CONFIG_LIBFC is not set
499# CONFIG_LIBFCOE is not set 525# CONFIG_LIBFCOE is not set
500# CONFIG_SCSI_DEBUG is not set 526# CONFIG_SCSI_DEBUG is not set
@@ -502,6 +528,7 @@ CONFIG_SCSI_LOWLEVEL=y
502# CONFIG_SCSI_OSD_INITIATOR is not set 528# CONFIG_SCSI_OSD_INITIATOR is not set
503CONFIG_ATA=y 529CONFIG_ATA=y
504# CONFIG_ATA_NONSTANDARD is not set 530# CONFIG_ATA_NONSTANDARD is not set
531CONFIG_ATA_VERBOSE_ERROR=y
505CONFIG_SATA_PMP=y 532CONFIG_SATA_PMP=y
506CONFIG_ATA_SFF=y 533CONFIG_ATA_SFF=y
507# CONFIG_SATA_MV is not set 534# CONFIG_SATA_MV is not set
@@ -535,10 +562,7 @@ CONFIG_SMC91X=y
535# CONFIG_KS8842 is not set 562# CONFIG_KS8842 is not set
536CONFIG_NETDEV_1000=y 563CONFIG_NETDEV_1000=y
537CONFIG_NETDEV_10000=y 564CONFIG_NETDEV_10000=y
538 565CONFIG_WLAN=y
539#
540# Wireless LAN
541#
542# CONFIG_WLAN_PRE80211 is not set 566# CONFIG_WLAN_PRE80211 is not set
543# CONFIG_WLAN_80211 is not set 567# CONFIG_WLAN_80211 is not set
544 568
@@ -577,12 +601,13 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
577# 601#
578CONFIG_INPUT_KEYBOARD=y 602CONFIG_INPUT_KEYBOARD=y
579CONFIG_KEYBOARD_ATKBD=y 603CONFIG_KEYBOARD_ATKBD=y
580# CONFIG_KEYBOARD_SUNKBD is not set
581# CONFIG_KEYBOARD_LKKBD is not set 604# CONFIG_KEYBOARD_LKKBD is not set
582# CONFIG_KEYBOARD_XTKBD is not set
583# CONFIG_KEYBOARD_NEWTON is not set 605# CONFIG_KEYBOARD_NEWTON is not set
606# CONFIG_KEYBOARD_OPENCORES is not set
584# CONFIG_KEYBOARD_STOWAWAY is not set 607# CONFIG_KEYBOARD_STOWAWAY is not set
608# CONFIG_KEYBOARD_SUNKBD is not set
585# CONFIG_KEYBOARD_SH_KEYSC is not set 609# CONFIG_KEYBOARD_SH_KEYSC is not set
610# CONFIG_KEYBOARD_XTKBD is not set
586# CONFIG_INPUT_MOUSE is not set 611# CONFIG_INPUT_MOUSE is not set
587# CONFIG_INPUT_JOYSTICK is not set 612# CONFIG_INPUT_JOYSTICK is not set
588# CONFIG_INPUT_TABLET is not set 613# CONFIG_INPUT_TABLET is not set
@@ -631,10 +656,20 @@ CONFIG_HW_RANDOM=y
631# CONFIG_TCG_TPM is not set 656# CONFIG_TCG_TPM is not set
632# CONFIG_I2C is not set 657# CONFIG_I2C is not set
633# CONFIG_SPI is not set 658# CONFIG_SPI is not set
659
660#
661# PPS support
662#
663# CONFIG_PPS is not set
634# CONFIG_W1 is not set 664# CONFIG_W1 is not set
635# CONFIG_POWER_SUPPLY is not set 665# CONFIG_POWER_SUPPLY is not set
636CONFIG_HWMON=y 666CONFIG_HWMON=y
637# CONFIG_HWMON_VID is not set 667# CONFIG_HWMON_VID is not set
668# CONFIG_HWMON_DEBUG_CHIP is not set
669
670#
671# Native drivers
672#
638# CONFIG_SENSORS_F71805F is not set 673# CONFIG_SENSORS_F71805F is not set
639# CONFIG_SENSORS_F71882FG is not set 674# CONFIG_SENSORS_F71882FG is not set
640# CONFIG_SENSORS_IT87 is not set 675# CONFIG_SENSORS_IT87 is not set
@@ -645,9 +680,7 @@ CONFIG_HWMON=y
645# CONFIG_SENSORS_VT1211 is not set 680# CONFIG_SENSORS_VT1211 is not set
646# CONFIG_SENSORS_W83627HF is not set 681# CONFIG_SENSORS_W83627HF is not set
647# CONFIG_SENSORS_W83627EHF is not set 682# CONFIG_SENSORS_W83627EHF is not set
648# CONFIG_HWMON_DEBUG_CHIP is not set
649# CONFIG_THERMAL is not set 683# CONFIG_THERMAL is not set
650# CONFIG_THERMAL_HWMON is not set
651# CONFIG_WATCHDOG is not set 684# CONFIG_WATCHDOG is not set
652CONFIG_SSB_POSSIBLE=y 685CONFIG_SSB_POSSIBLE=y
653 686
@@ -681,7 +714,6 @@ CONFIG_SSB_POSSIBLE=y
681# CONFIG_SOUND is not set 714# CONFIG_SOUND is not set
682CONFIG_HID_SUPPORT=y 715CONFIG_HID_SUPPORT=y
683CONFIG_HID=y 716CONFIG_HID=y
684# CONFIG_HID_DEBUG is not set
685# CONFIG_HIDRAW is not set 717# CONFIG_HIDRAW is not set
686# CONFIG_HID_PID is not set 718# CONFIG_HID_PID is not set
687 719
@@ -778,8 +810,10 @@ CONFIG_FS_MBCACHE=y
778# CONFIG_JFS_FS is not set 810# CONFIG_JFS_FS is not set
779# CONFIG_FS_POSIX_ACL is not set 811# CONFIG_FS_POSIX_ACL is not set
780# CONFIG_XFS_FS is not set 812# CONFIG_XFS_FS is not set
813# CONFIG_GFS2_FS is not set
781# CONFIG_OCFS2_FS is not set 814# CONFIG_OCFS2_FS is not set
782# CONFIG_BTRFS_FS is not set 815# CONFIG_BTRFS_FS is not set
816# CONFIG_NILFS2_FS is not set
783CONFIG_FILE_LOCKING=y 817CONFIG_FILE_LOCKING=y
784CONFIG_FSNOTIFY=y 818CONFIG_FSNOTIFY=y
785CONFIG_DNOTIFY=y 819CONFIG_DNOTIFY=y
@@ -839,7 +873,6 @@ CONFIG_MISC_FILESYSTEMS=y
839# CONFIG_ROMFS_FS is not set 873# CONFIG_ROMFS_FS is not set
840# CONFIG_SYSV_FS is not set 874# CONFIG_SYSV_FS is not set
841# CONFIG_UFS_FS is not set 875# CONFIG_UFS_FS is not set
842# CONFIG_NILFS2_FS is not set
843CONFIG_NETWORK_FILESYSTEMS=y 876CONFIG_NETWORK_FILESYSTEMS=y
844# CONFIG_NFS_FS is not set 877# CONFIG_NFS_FS is not set
845# CONFIG_NFSD is not set 878# CONFIG_NFSD is not set
@@ -866,6 +899,7 @@ CONFIG_ENABLE_WARN_DEPRECATED=y
866# CONFIG_ENABLE_MUST_CHECK is not set 899# CONFIG_ENABLE_MUST_CHECK is not set
867CONFIG_FRAME_WARN=1024 900CONFIG_FRAME_WARN=1024
868CONFIG_MAGIC_SYSRQ=y 901CONFIG_MAGIC_SYSRQ=y
902# CONFIG_STRIP_ASM_SYMS is not set
869# CONFIG_UNUSED_SYMBOLS is not set 903# CONFIG_UNUSED_SYMBOLS is not set
870CONFIG_DEBUG_FS=y 904CONFIG_DEBUG_FS=y
871# CONFIG_HEADERS_CHECK is not set 905# CONFIG_HEADERS_CHECK is not set
@@ -878,8 +912,11 @@ CONFIG_DEBUG_FS=y
878# CONFIG_LATENCYTOP is not set 912# CONFIG_LATENCYTOP is not set
879# CONFIG_SYSCTL_SYSCALL_CHECK is not set 913# CONFIG_SYSCTL_SYSCALL_CHECK is not set
880CONFIG_HAVE_FUNCTION_TRACER=y 914CONFIG_HAVE_FUNCTION_TRACER=y
915CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
916CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
881CONFIG_HAVE_DYNAMIC_FTRACE=y 917CONFIG_HAVE_DYNAMIC_FTRACE=y
882CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 918CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
919CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
883CONFIG_TRACING_SUPPORT=y 920CONFIG_TRACING_SUPPORT=y
884# CONFIG_FTRACE is not set 921# CONFIG_FTRACE is not set
885# CONFIG_DYNAMIC_DEBUG is not set 922# CONFIG_DYNAMIC_DEBUG is not set
@@ -889,6 +926,7 @@ CONFIG_HAVE_ARCH_KGDB=y
889CONFIG_SH_STANDARD_BIOS=y 926CONFIG_SH_STANDARD_BIOS=y
890# CONFIG_EARLY_SCIF_CONSOLE is not set 927# CONFIG_EARLY_SCIF_CONSOLE is not set
891# CONFIG_EARLY_PRINTK is not set 928# CONFIG_EARLY_PRINTK is not set
929# CONFIG_DWARF_UNWINDER is not set
892 930
893# 931#
894# Security options 932# Security options
@@ -902,7 +940,6 @@ CONFIG_CRYPTO=y
902# 940#
903# Crypto core or helper 941# Crypto core or helper
904# 942#
905# CONFIG_CRYPTO_FIPS is not set
906# CONFIG_CRYPTO_MANAGER is not set 943# CONFIG_CRYPTO_MANAGER is not set
907# CONFIG_CRYPTO_MANAGER2 is not set 944# CONFIG_CRYPTO_MANAGER2 is not set
908# CONFIG_CRYPTO_GF128MUL is not set 945# CONFIG_CRYPTO_GF128MUL is not set
@@ -934,11 +971,13 @@ CONFIG_CRYPTO=y
934# 971#
935# CONFIG_CRYPTO_HMAC is not set 972# CONFIG_CRYPTO_HMAC is not set
936# CONFIG_CRYPTO_XCBC is not set 973# CONFIG_CRYPTO_XCBC is not set
974# CONFIG_CRYPTO_VMAC is not set
937 975
938# 976#
939# Digest 977# Digest
940# 978#
941# CONFIG_CRYPTO_CRC32C is not set 979# CONFIG_CRYPTO_CRC32C is not set
980# CONFIG_CRYPTO_GHASH is not set
942# CONFIG_CRYPTO_MD4 is not set 981# CONFIG_CRYPTO_MD4 is not set
943# CONFIG_CRYPTO_MD5 is not set 982# CONFIG_CRYPTO_MD5 is not set
944# CONFIG_CRYPTO_MICHAEL_MIC is not set 983# CONFIG_CRYPTO_MICHAEL_MIC is not set
@@ -1002,5 +1041,6 @@ CONFIG_DECOMPRESS_GZIP=y
1002CONFIG_HAS_IOMEM=y 1041CONFIG_HAS_IOMEM=y
1003CONFIG_HAS_IOPORT=y 1042CONFIG_HAS_IOPORT=y
1004CONFIG_HAS_DMA=y 1043CONFIG_HAS_DMA=y
1044CONFIG_HAVE_LMB=y
1005CONFIG_NLATTR=y 1045CONFIG_NLATTR=y
1006CONFIG_GENERIC_ATOMIC64=y 1046CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/se7724_defconfig b/arch/sh/configs/se7724_defconfig
index 3ee783a0a075..56b0b9ff9e05 100644
--- a/arch/sh/configs/se7724_defconfig
+++ b/arch/sh/configs/se7724_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.30 3# Linux kernel version: 2.6.31
4# Mon Jun 29 16:28:43 2009 4# Fri Sep 25 11:50:59 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -42,6 +42,12 @@ CONFIG_LOCK_KERNEL=y
42CONFIG_INIT_ENV_ARG_LIMIT=32 42CONFIG_INIT_ENV_ARG_LIMIT=32
43CONFIG_LOCALVERSION="" 43CONFIG_LOCALVERSION=""
44# CONFIG_LOCALVERSION_AUTO is not set 44# CONFIG_LOCALVERSION_AUTO is not set
45CONFIG_HAVE_KERNEL_GZIP=y
46CONFIG_HAVE_KERNEL_BZIP2=y
47CONFIG_HAVE_KERNEL_LZMA=y
48CONFIG_KERNEL_GZIP=y
49# CONFIG_KERNEL_BZIP2 is not set
50# CONFIG_KERNEL_LZMA is not set
45CONFIG_SWAP=y 51CONFIG_SWAP=y
46CONFIG_SYSVIPC=y 52CONFIG_SYSVIPC=y
47CONFIG_SYSVIPC_SYSCTL=y 53CONFIG_SYSVIPC_SYSCTL=y
@@ -54,11 +60,12 @@ CONFIG_BSD_PROCESS_ACCT=y
54# 60#
55# RCU Subsystem 61# RCU Subsystem
56# 62#
57CONFIG_CLASSIC_RCU=y 63CONFIG_TREE_RCU=y
58# CONFIG_TREE_RCU is not set 64# CONFIG_TREE_PREEMPT_RCU is not set
59# CONFIG_PREEMPT_RCU is not set 65# CONFIG_RCU_TRACE is not set
66CONFIG_RCU_FANOUT=32
67# CONFIG_RCU_FANOUT_EXACT is not set
60# CONFIG_TREE_RCU_TRACE is not set 68# CONFIG_TREE_RCU_TRACE is not set
61# CONFIG_PREEMPT_RCU_TRACE is not set
62# CONFIG_IKCONFIG is not set 69# CONFIG_IKCONFIG is not set
63CONFIG_LOG_BUF_SHIFT=14 70CONFIG_LOG_BUF_SHIFT=14
64CONFIG_GROUP_SCHED=y 71CONFIG_GROUP_SCHED=y
@@ -91,20 +98,19 @@ CONFIG_TIMERFD=y
91CONFIG_EVENTFD=y 98CONFIG_EVENTFD=y
92CONFIG_SHMEM=y 99CONFIG_SHMEM=y
93CONFIG_AIO=y 100CONFIG_AIO=y
94CONFIG_HAVE_PERF_COUNTERS=y 101CONFIG_HAVE_PERF_EVENTS=y
95 102
96# 103#
97# Performance Counters 104# Kernel Performance Events And Counters
98# 105#
106# CONFIG_PERF_EVENTS is not set
99# CONFIG_PERF_COUNTERS is not set 107# CONFIG_PERF_COUNTERS is not set
100CONFIG_VM_EVENT_COUNTERS=y 108CONFIG_VM_EVENT_COUNTERS=y
101# CONFIG_STRIP_ASM_SYMS is not set
102CONFIG_COMPAT_BRK=y 109CONFIG_COMPAT_BRK=y
103CONFIG_SLAB=y 110CONFIG_SLAB=y
104# CONFIG_SLUB is not set 111# CONFIG_SLUB is not set
105# CONFIG_SLOB is not set 112# CONFIG_SLOB is not set
106# CONFIG_PROFILING is not set 113# CONFIG_PROFILING is not set
107# CONFIG_MARKERS is not set
108CONFIG_HAVE_OPROFILE=y 114CONFIG_HAVE_OPROFILE=y
109CONFIG_HAVE_IOREMAP_PROT=y 115CONFIG_HAVE_IOREMAP_PROT=y
110CONFIG_HAVE_KPROBES=y 116CONFIG_HAVE_KPROBES=y
@@ -144,7 +150,7 @@ CONFIG_IOSCHED_CFQ=y
144CONFIG_DEFAULT_CFQ=y 150CONFIG_DEFAULT_CFQ=y
145# CONFIG_DEFAULT_NOOP is not set 151# CONFIG_DEFAULT_NOOP is not set
146CONFIG_DEFAULT_IOSCHED="cfq" 152CONFIG_DEFAULT_IOSCHED="cfq"
147# CONFIG_FREEZER is not set 153CONFIG_FREEZER=y
148 154
149# 155#
150# System type 156# System type
@@ -178,6 +184,7 @@ CONFIG_ARCH_SHMOBILE=y
178# CONFIG_CPU_SUBTYPE_SH4_202 is not set 184# CONFIG_CPU_SUBTYPE_SH4_202 is not set
179# CONFIG_CPU_SUBTYPE_SH7723 is not set 185# CONFIG_CPU_SUBTYPE_SH7723 is not set
180CONFIG_CPU_SUBTYPE_SH7724=y 186CONFIG_CPU_SUBTYPE_SH7724=y
187# CONFIG_CPU_SUBTYPE_SH7757 is not set
181# CONFIG_CPU_SUBTYPE_SH7763 is not set 188# CONFIG_CPU_SUBTYPE_SH7763 is not set
182# CONFIG_CPU_SUBTYPE_SH7770 is not set 189# CONFIG_CPU_SUBTYPE_SH7770 is not set
183# CONFIG_CPU_SUBTYPE_SH7780 is not set 190# CONFIG_CPU_SUBTYPE_SH7780 is not set
@@ -224,6 +231,7 @@ CONFIG_ZONE_DMA_FLAG=0
224CONFIG_NR_QUICK=2 231CONFIG_NR_QUICK=2
225CONFIG_HAVE_MLOCK=y 232CONFIG_HAVE_MLOCK=y
226CONFIG_HAVE_MLOCKED_PAGE_BIT=y 233CONFIG_HAVE_MLOCKED_PAGE_BIT=y
234# CONFIG_KSM is not set
227CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 235CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
228 236
229# 237#
@@ -249,6 +257,8 @@ CONFIG_CPU_HAS_FPU=y
249# 257#
250CONFIG_SOLUTION_ENGINE=y 258CONFIG_SOLUTION_ENGINE=y
251CONFIG_SH_7724_SOLUTION_ENGINE=y 259CONFIG_SH_7724_SOLUTION_ENGINE=y
260# CONFIG_SH_KFR2R09 is not set
261# CONFIG_SH_ECOVEC is not set
252 262
253# 263#
254# Timer and clock configuration 264# Timer and clock configuration
@@ -269,7 +279,10 @@ CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
269# 279#
270# DMA support 280# DMA support
271# 281#
272# CONFIG_SH_DMA is not set 282CONFIG_SH_DMA_API=y
283CONFIG_SH_DMA=y
284CONFIG_NR_ONCHIP_DMA_CHANNELS=12
285# CONFIG_NR_DMA_CHANNELS_BOOL is not set
273 286
274# 287#
275# Companion Chips 288# Companion Chips
@@ -305,7 +318,8 @@ CONFIG_GUSA=y
305CONFIG_ZERO_PAGE_OFFSET=0x00001000 318CONFIG_ZERO_PAGE_OFFSET=0x00001000
306CONFIG_BOOT_LINK_OFFSET=0x00800000 319CONFIG_BOOT_LINK_OFFSET=0x00800000
307CONFIG_ENTRY_OFFSET=0x00001000 320CONFIG_ENTRY_OFFSET=0x00001000
308CONFIG_CMDLINE_BOOL=y 321CONFIG_CMDLINE_OVERWRITE=y
322# CONFIG_CMDLINE_EXTEND is not set
309CONFIG_CMDLINE="console=tty1 console=ttySC3,115200 root=/dev/nfs ip=dhcp memchunk.vpu=4m" 323CONFIG_CMDLINE="console=tty1 console=ttySC3,115200 root=/dev/nfs ip=dhcp memchunk.vpu=4m"
310 324
311# 325#
@@ -325,7 +339,13 @@ CONFIG_BINFMT_ELF=y
325# 339#
326# Power management options (EXPERIMENTAL) 340# Power management options (EXPERIMENTAL)
327# 341#
328# CONFIG_PM is not set 342CONFIG_PM=y
343# CONFIG_PM_DEBUG is not set
344CONFIG_PM_SLEEP=y
345CONFIG_SUSPEND=y
346CONFIG_SUSPEND_FREEZER=y
347# CONFIG_HIBERNATION is not set
348CONFIG_PM_RUNTIME=y
329# CONFIG_CPU_IDLE is not set 349# CONFIG_CPU_IDLE is not set
330CONFIG_NET=y 350CONFIG_NET=y
331 351
@@ -373,6 +393,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
373# CONFIG_NETFILTER is not set 393# CONFIG_NETFILTER is not set
374# CONFIG_IP_DCCP is not set 394# CONFIG_IP_DCCP is not set
375# CONFIG_IP_SCTP is not set 395# CONFIG_IP_SCTP is not set
396# CONFIG_RDS is not set
376# CONFIG_TIPC is not set 397# CONFIG_TIPC is not set
377# CONFIG_ATM is not set 398# CONFIG_ATM is not set
378# CONFIG_BRIDGE is not set 399# CONFIG_BRIDGE is not set
@@ -402,6 +423,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
402# CONFIG_AF_RXRPC is not set 423# CONFIG_AF_RXRPC is not set
403CONFIG_WIRELESS=y 424CONFIG_WIRELESS=y
404# CONFIG_CFG80211 is not set 425# CONFIG_CFG80211 is not set
426CONFIG_CFG80211_DEFAULT_PS_VALUE=0
405# CONFIG_WIRELESS_OLD_REGULATORY is not set 427# CONFIG_WIRELESS_OLD_REGULATORY is not set
406# CONFIG_WIRELESS_EXT is not set 428# CONFIG_WIRELESS_EXT is not set
407# CONFIG_LIB80211 is not set 429# CONFIG_LIB80211 is not set
@@ -409,7 +431,6 @@ CONFIG_WIRELESS=y
409# 431#
410# CFG80211 needs to be enabled for MAC80211 432# CFG80211 needs to be enabled for MAC80211
411# 433#
412CONFIG_MAC80211_DEFAULT_PS_VALUE=0
413# CONFIG_WIMAX is not set 434# CONFIG_WIMAX is not set
414# CONFIG_RFKILL is not set 435# CONFIG_RFKILL is not set
415# CONFIG_NET_9P is not set 436# CONFIG_NET_9P is not set
@@ -422,6 +443,7 @@ CONFIG_MAC80211_DEFAULT_PS_VALUE=0
422# Generic Driver Options 443# Generic Driver Options
423# 444#
424CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 445CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
446# CONFIG_DEVTMPFS is not set
425CONFIG_STANDALONE=y 447CONFIG_STANDALONE=y
426CONFIG_PREVENT_FIRMWARE_BUILD=y 448CONFIG_PREVENT_FIRMWARE_BUILD=y
427CONFIG_FW_LOADER=y 449CONFIG_FW_LOADER=y
@@ -431,9 +453,9 @@ CONFIG_EXTRA_FIRMWARE=""
431# CONFIG_CONNECTOR is not set 453# CONFIG_CONNECTOR is not set
432CONFIG_MTD=y 454CONFIG_MTD=y
433# CONFIG_MTD_DEBUG is not set 455# CONFIG_MTD_DEBUG is not set
456# CONFIG_MTD_TESTS is not set
434CONFIG_MTD_CONCAT=y 457CONFIG_MTD_CONCAT=y
435CONFIG_MTD_PARTITIONS=y 458CONFIG_MTD_PARTITIONS=y
436# CONFIG_MTD_TESTS is not set
437# CONFIG_MTD_REDBOOT_PARTS is not set 459# CONFIG_MTD_REDBOOT_PARTS is not set
438CONFIG_MTD_CMDLINE_PARTS=y 460CONFIG_MTD_CMDLINE_PARTS=y
439# CONFIG_MTD_AR7_PARTS is not set 461# CONFIG_MTD_AR7_PARTS is not set
@@ -489,6 +511,7 @@ CONFIG_MTD_PHYSMAP=y
489# 511#
490# CONFIG_MTD_DATAFLASH is not set 512# CONFIG_MTD_DATAFLASH is not set
491# CONFIG_MTD_M25P80 is not set 513# CONFIG_MTD_M25P80 is not set
514# CONFIG_MTD_SST25L is not set
492# CONFIG_MTD_SLRAM is not set 515# CONFIG_MTD_SLRAM is not set
493# CONFIG_MTD_PHRAM is not set 516# CONFIG_MTD_PHRAM is not set
494# CONFIG_MTD_MTDRAM is not set 517# CONFIG_MTD_MTDRAM is not set
@@ -648,12 +671,10 @@ CONFIG_SMC91X=y
648# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 671# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
649# CONFIG_B44 is not set 672# CONFIG_B44 is not set
650# CONFIG_KS8842 is not set 673# CONFIG_KS8842 is not set
674# CONFIG_KS8851 is not set
651# CONFIG_NETDEV_1000 is not set 675# CONFIG_NETDEV_1000 is not set
652# CONFIG_NETDEV_10000 is not set 676# CONFIG_NETDEV_10000 is not set
653 677CONFIG_WLAN=y
654#
655# Wireless LAN
656#
657# CONFIG_WLAN_PRE80211 is not set 678# CONFIG_WLAN_PRE80211 is not set
658# CONFIG_WLAN_80211 is not set 679# CONFIG_WLAN_80211 is not set
659 680
@@ -697,14 +718,19 @@ CONFIG_INPUT_EVDEV=y
697# Input Device Drivers 718# Input Device Drivers
698# 719#
699CONFIG_INPUT_KEYBOARD=y 720CONFIG_INPUT_KEYBOARD=y
721# CONFIG_KEYBOARD_ADP5588 is not set
700# CONFIG_KEYBOARD_ATKBD is not set 722# CONFIG_KEYBOARD_ATKBD is not set
701# CONFIG_KEYBOARD_SUNKBD is not set 723# CONFIG_QT2160 is not set
702# CONFIG_KEYBOARD_LKKBD is not set 724# CONFIG_KEYBOARD_LKKBD is not set
703# CONFIG_KEYBOARD_XTKBD is not set 725# CONFIG_KEYBOARD_GPIO is not set
726# CONFIG_KEYBOARD_MATRIX is not set
727# CONFIG_KEYBOARD_MAX7359 is not set
704# CONFIG_KEYBOARD_NEWTON is not set 728# CONFIG_KEYBOARD_NEWTON is not set
729# CONFIG_KEYBOARD_OPENCORES is not set
705# CONFIG_KEYBOARD_STOWAWAY is not set 730# CONFIG_KEYBOARD_STOWAWAY is not set
706# CONFIG_KEYBOARD_GPIO is not set 731# CONFIG_KEYBOARD_SUNKBD is not set
707CONFIG_KEYBOARD_SH_KEYSC=y 732CONFIG_KEYBOARD_SH_KEYSC=y
733# CONFIG_KEYBOARD_XTKBD is not set
708# CONFIG_INPUT_MOUSE is not set 734# CONFIG_INPUT_MOUSE is not set
709# CONFIG_INPUT_JOYSTICK is not set 735# CONFIG_INPUT_JOYSTICK is not set
710# CONFIG_INPUT_TABLET is not set 736# CONFIG_INPUT_TABLET is not set
@@ -754,6 +780,7 @@ CONFIG_HW_RANDOM=y
754# CONFIG_TCG_TPM is not set 780# CONFIG_TCG_TPM is not set
755CONFIG_I2C=y 781CONFIG_I2C=y
756CONFIG_I2C_BOARDINFO=y 782CONFIG_I2C_BOARDINFO=y
783CONFIG_I2C_COMPAT=y
757CONFIG_I2C_CHARDEV=y 784CONFIG_I2C_CHARDEV=y
758CONFIG_I2C_HELPER_AUTO=y 785CONFIG_I2C_HELPER_AUTO=y
759 786
@@ -764,6 +791,7 @@ CONFIG_I2C_HELPER_AUTO=y
764# 791#
765# I2C system bus drivers (mostly embedded / system-on-chip) 792# I2C system bus drivers (mostly embedded / system-on-chip)
766# 793#
794# CONFIG_I2C_DESIGNWARE is not set
767# CONFIG_I2C_GPIO is not set 795# CONFIG_I2C_GPIO is not set
768# CONFIG_I2C_OCORES is not set 796# CONFIG_I2C_OCORES is not set
769CONFIG_I2C_SH_MOBILE=y 797CONFIG_I2C_SH_MOBILE=y
@@ -786,9 +814,6 @@ CONFIG_I2C_SH_MOBILE=y
786# Miscellaneous I2C Chip support 814# Miscellaneous I2C Chip support
787# 815#
788# CONFIG_DS1682 is not set 816# CONFIG_DS1682 is not set
789# CONFIG_SENSORS_PCF8574 is not set
790# CONFIG_PCF8575 is not set
791# CONFIG_SENSORS_PCA9539 is not set
792# CONFIG_SENSORS_TSL2550 is not set 817# CONFIG_SENSORS_TSL2550 is not set
793# CONFIG_I2C_DEBUG_CORE is not set 818# CONFIG_I2C_DEBUG_CORE is not set
794# CONFIG_I2C_DEBUG_ALGO is not set 819# CONFIG_I2C_DEBUG_ALGO is not set
@@ -838,11 +863,15 @@ CONFIG_GPIOLIB=y
838# 863#
839# CONFIG_GPIO_MAX7301 is not set 864# CONFIG_GPIO_MAX7301 is not set
840# CONFIG_GPIO_MCP23S08 is not set 865# CONFIG_GPIO_MCP23S08 is not set
866# CONFIG_GPIO_MC33880 is not set
867
868#
869# AC97 GPIO expanders:
870#
841# CONFIG_W1 is not set 871# CONFIG_W1 is not set
842# CONFIG_POWER_SUPPLY is not set 872# CONFIG_POWER_SUPPLY is not set
843# CONFIG_HWMON is not set 873# CONFIG_HWMON is not set
844# CONFIG_THERMAL is not set 874# CONFIG_THERMAL is not set
845# CONFIG_THERMAL_HWMON is not set
846# CONFIG_WATCHDOG is not set 875# CONFIG_WATCHDOG is not set
847CONFIG_SSB_POSSIBLE=y 876CONFIG_SSB_POSSIBLE=y
848 877
@@ -862,8 +891,10 @@ CONFIG_SSB_POSSIBLE=y
862# CONFIG_MFD_TMIO is not set 891# CONFIG_MFD_TMIO is not set
863# CONFIG_PMIC_DA903X is not set 892# CONFIG_PMIC_DA903X is not set
864# CONFIG_MFD_WM8400 is not set 893# CONFIG_MFD_WM8400 is not set
894# CONFIG_MFD_WM831X is not set
865# CONFIG_MFD_WM8350_I2C is not set 895# CONFIG_MFD_WM8350_I2C is not set
866# CONFIG_MFD_PCF50633 is not set 896# CONFIG_MFD_PCF50633 is not set
897# CONFIG_MFD_MC13783 is not set
867# CONFIG_AB3100_CORE is not set 898# CONFIG_AB3100_CORE is not set
868# CONFIG_EZX_PCAP is not set 899# CONFIG_EZX_PCAP is not set
869# CONFIG_REGULATOR is not set 900# CONFIG_REGULATOR is not set
@@ -876,24 +907,24 @@ CONFIG_VIDEO_DEV=y
876CONFIG_VIDEO_V4L2_COMMON=y 907CONFIG_VIDEO_V4L2_COMMON=y
877# CONFIG_VIDEO_ALLOW_V4L1 is not set 908# CONFIG_VIDEO_ALLOW_V4L1 is not set
878CONFIG_VIDEO_V4L1_COMPAT=y 909CONFIG_VIDEO_V4L1_COMPAT=y
879# CONFIG_DVB_CORE is not set 910CONFIG_DVB_CORE=m
880CONFIG_VIDEO_MEDIA=y 911CONFIG_VIDEO_MEDIA=m
881 912
882# 913#
883# Multimedia drivers 914# Multimedia drivers
884# 915#
885# CONFIG_MEDIA_ATTACH is not set 916# CONFIG_MEDIA_ATTACH is not set
886CONFIG_MEDIA_TUNER=y 917CONFIG_MEDIA_TUNER=m
887# CONFIG_MEDIA_TUNER_CUSTOMISE is not set 918# CONFIG_MEDIA_TUNER_CUSTOMISE is not set
888CONFIG_MEDIA_TUNER_SIMPLE=y 919CONFIG_MEDIA_TUNER_SIMPLE=m
889CONFIG_MEDIA_TUNER_TDA8290=y 920CONFIG_MEDIA_TUNER_TDA8290=m
890CONFIG_MEDIA_TUNER_TDA9887=y 921CONFIG_MEDIA_TUNER_TDA9887=m
891CONFIG_MEDIA_TUNER_TEA5761=y 922CONFIG_MEDIA_TUNER_TEA5761=m
892CONFIG_MEDIA_TUNER_TEA5767=y 923CONFIG_MEDIA_TUNER_TEA5767=m
893CONFIG_MEDIA_TUNER_MT20XX=y 924CONFIG_MEDIA_TUNER_MT20XX=m
894CONFIG_MEDIA_TUNER_XC2028=y 925CONFIG_MEDIA_TUNER_XC2028=m
895CONFIG_MEDIA_TUNER_XC5000=y 926CONFIG_MEDIA_TUNER_XC5000=m
896CONFIG_MEDIA_TUNER_MC44S803=y 927CONFIG_MEDIA_TUNER_MC44S803=m
897CONFIG_VIDEO_V4L2=y 928CONFIG_VIDEO_V4L2=y
898CONFIG_VIDEOBUF_GEN=y 929CONFIG_VIDEOBUF_GEN=y
899CONFIG_VIDEOBUF_DMA_CONTIG=y 930CONFIG_VIDEOBUF_DMA_CONTIG=y
@@ -904,6 +935,7 @@ CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
904# CONFIG_VIDEO_VIVI is not set 935# CONFIG_VIDEO_VIVI is not set
905# CONFIG_VIDEO_SAA5246A is not set 936# CONFIG_VIDEO_SAA5246A is not set
906# CONFIG_VIDEO_SAA5249 is not set 937# CONFIG_VIDEO_SAA5249 is not set
938# CONFIG_VIDEO_AU0828 is not set
907CONFIG_SOC_CAMERA=y 939CONFIG_SOC_CAMERA=y
908# CONFIG_SOC_CAMERA_MT9M001 is not set 940# CONFIG_SOC_CAMERA_MT9M001 is not set
909# CONFIG_SOC_CAMERA_MT9M111 is not set 941# CONFIG_SOC_CAMERA_MT9M111 is not set
@@ -919,15 +951,18 @@ CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
919CONFIG_USB_GSPCA=m 951CONFIG_USB_GSPCA=m
920# CONFIG_USB_M5602 is not set 952# CONFIG_USB_M5602 is not set
921# CONFIG_USB_STV06XX is not set 953# CONFIG_USB_STV06XX is not set
954# CONFIG_USB_GL860 is not set
922# CONFIG_USB_GSPCA_CONEX is not set 955# CONFIG_USB_GSPCA_CONEX is not set
923# CONFIG_USB_GSPCA_ETOMS is not set 956# CONFIG_USB_GSPCA_ETOMS is not set
924# CONFIG_USB_GSPCA_FINEPIX is not set 957# CONFIG_USB_GSPCA_FINEPIX is not set
958# CONFIG_USB_GSPCA_JEILINJ is not set
925# CONFIG_USB_GSPCA_MARS is not set 959# CONFIG_USB_GSPCA_MARS is not set
926# CONFIG_USB_GSPCA_MR97310A is not set 960# CONFIG_USB_GSPCA_MR97310A is not set
927# CONFIG_USB_GSPCA_OV519 is not set 961# CONFIG_USB_GSPCA_OV519 is not set
928# CONFIG_USB_GSPCA_OV534 is not set 962# CONFIG_USB_GSPCA_OV534 is not set
929# CONFIG_USB_GSPCA_PAC207 is not set 963# CONFIG_USB_GSPCA_PAC207 is not set
930# CONFIG_USB_GSPCA_PAC7311 is not set 964# CONFIG_USB_GSPCA_PAC7311 is not set
965# CONFIG_USB_GSPCA_SN9C20X is not set
931# CONFIG_USB_GSPCA_SONIXB is not set 966# CONFIG_USB_GSPCA_SONIXB is not set
932# CONFIG_USB_GSPCA_SONIXJ is not set 967# CONFIG_USB_GSPCA_SONIXJ is not set
933# CONFIG_USB_GSPCA_SPCA500 is not set 968# CONFIG_USB_GSPCA_SPCA500 is not set
@@ -957,6 +992,26 @@ CONFIG_USB_PWC_INPUT_EVDEV=y
957# CONFIG_USB_STKWEBCAM is not set 992# CONFIG_USB_STKWEBCAM is not set
958# CONFIG_USB_S2255 is not set 993# CONFIG_USB_S2255 is not set
959# CONFIG_RADIO_ADAPTERS is not set 994# CONFIG_RADIO_ADAPTERS is not set
995CONFIG_DVB_MAX_ADAPTERS=8
996# CONFIG_DVB_DYNAMIC_MINORS is not set
997CONFIG_DVB_CAPTURE_DRIVERS=y
998# CONFIG_TTPCI_EEPROM is not set
999
1000#
1001# Supported USB Adapters
1002#
1003# CONFIG_DVB_USB is not set
1004# CONFIG_SMS_SIANO_MDTV is not set
1005
1006#
1007# Supported FlexCopII (B2C2) Adapters
1008#
1009# CONFIG_DVB_B2C2_FLEXCOP is not set
1010
1011#
1012# Supported DVB Frontends
1013#
1014# CONFIG_DVB_FE_CUSTOMISE is not set
960# CONFIG_DAB is not set 1015# CONFIG_DAB is not set
961 1016
962# 1017#
@@ -1017,10 +1072,80 @@ CONFIG_LOGO=y
1017# CONFIG_LOGO_SUPERH_MONO is not set 1072# CONFIG_LOGO_SUPERH_MONO is not set
1018# CONFIG_LOGO_SUPERH_VGA16 is not set 1073# CONFIG_LOGO_SUPERH_VGA16 is not set
1019CONFIG_LOGO_SUPERH_CLUT224=y 1074CONFIG_LOGO_SUPERH_CLUT224=y
1020# CONFIG_SOUND is not set 1075CONFIG_SOUND=y
1076# CONFIG_SOUND_OSS_CORE is not set
1077CONFIG_SND=m
1078CONFIG_SND_TIMER=m
1079CONFIG_SND_PCM=m
1080CONFIG_SND_JACK=y
1081# CONFIG_SND_SEQUENCER is not set
1082# CONFIG_SND_MIXER_OSS is not set
1083# CONFIG_SND_PCM_OSS is not set
1084# CONFIG_SND_DYNAMIC_MINORS is not set
1085# CONFIG_SND_SUPPORT_OLD_API is not set
1086CONFIG_SND_VERBOSE_PROCFS=y
1087# CONFIG_SND_VERBOSE_PRINTK is not set
1088# CONFIG_SND_DEBUG is not set
1089# CONFIG_SND_RAWMIDI_SEQ is not set
1090# CONFIG_SND_OPL3_LIB_SEQ is not set
1091# CONFIG_SND_OPL4_LIB_SEQ is not set
1092# CONFIG_SND_SBAWE_SEQ is not set
1093# CONFIG_SND_EMU10K1_SEQ is not set
1094# CONFIG_SND_DRIVERS is not set
1095# CONFIG_SND_SPI is not set
1096# CONFIG_SND_SUPERH is not set
1097CONFIG_SND_USB=y
1098# CONFIG_SND_USB_AUDIO is not set
1099# CONFIG_SND_USB_CAIAQ is not set
1100CONFIG_SND_SOC=m
1101
1102#
1103# SoC Audio support for SuperH
1104#
1105CONFIG_SND_SOC_SH4_FSI=m
1106CONFIG_SND_FSI_AK4642=y
1107CONFIG_SND_SOC_I2C_AND_SPI=m
1108CONFIG_SND_SOC_ALL_CODECS=m
1109CONFIG_SND_SOC_WM_HUBS=m
1110CONFIG_SND_SOC_AD1836=m
1111CONFIG_SND_SOC_AD1938=m
1112CONFIG_SND_SOC_AD73311=m
1113CONFIG_SND_SOC_AK4104=m
1114CONFIG_SND_SOC_AK4535=m
1115CONFIG_SND_SOC_AK4642=m
1116CONFIG_SND_SOC_CS4270=m
1117CONFIG_SND_SOC_L3=m
1118CONFIG_SND_SOC_PCM3008=m
1119CONFIG_SND_SOC_SPDIF=m
1120CONFIG_SND_SOC_SSM2602=m
1121CONFIG_SND_SOC_TLV320AIC23=m
1122CONFIG_SND_SOC_TLV320AIC26=m
1123CONFIG_SND_SOC_TLV320AIC3X=m
1124CONFIG_SND_SOC_UDA134X=m
1125CONFIG_SND_SOC_UDA1380=m
1126CONFIG_SND_SOC_WM8510=m
1127CONFIG_SND_SOC_WM8523=m
1128CONFIG_SND_SOC_WM8580=m
1129CONFIG_SND_SOC_WM8728=m
1130CONFIG_SND_SOC_WM8731=m
1131CONFIG_SND_SOC_WM8750=m
1132CONFIG_SND_SOC_WM8753=m
1133CONFIG_SND_SOC_WM8776=m
1134CONFIG_SND_SOC_WM8900=m
1135CONFIG_SND_SOC_WM8903=m
1136CONFIG_SND_SOC_WM8940=m
1137CONFIG_SND_SOC_WM8960=m
1138CONFIG_SND_SOC_WM8961=m
1139CONFIG_SND_SOC_WM8971=m
1140CONFIG_SND_SOC_WM8974=m
1141CONFIG_SND_SOC_WM8988=m
1142CONFIG_SND_SOC_WM8990=m
1143CONFIG_SND_SOC_WM8993=m
1144CONFIG_SND_SOC_WM9081=m
1145CONFIG_SND_SOC_MAX9877=m
1146# CONFIG_SOUND_PRIME is not set
1021CONFIG_HID_SUPPORT=y 1147CONFIG_HID_SUPPORT=y
1022CONFIG_HID=y 1148CONFIG_HID=y
1023# CONFIG_HID_DEBUG is not set
1024# CONFIG_HIDRAW is not set 1149# CONFIG_HIDRAW is not set
1025 1150
1026# 1151#
@@ -1043,6 +1168,7 @@ CONFIG_USB_HID=y
1043# CONFIG_HID_EZKEY is not set 1168# CONFIG_HID_EZKEY is not set
1044# CONFIG_HID_KYE is not set 1169# CONFIG_HID_KYE is not set
1045# CONFIG_HID_GYRATION is not set 1170# CONFIG_HID_GYRATION is not set
1171# CONFIG_HID_TWINHAN is not set
1046# CONFIG_HID_KENSINGTON is not set 1172# CONFIG_HID_KENSINGTON is not set
1047# CONFIG_HID_LOGITECH is not set 1173# CONFIG_HID_LOGITECH is not set
1048# CONFIG_HID_MICROSOFT is not set 1174# CONFIG_HID_MICROSOFT is not set
@@ -1072,6 +1198,7 @@ CONFIG_USB=y
1072# CONFIG_USB_DEVICEFS is not set 1198# CONFIG_USB_DEVICEFS is not set
1073CONFIG_USB_DEVICE_CLASS=y 1199CONFIG_USB_DEVICE_CLASS=y
1074# CONFIG_USB_DYNAMIC_MINORS is not set 1200# CONFIG_USB_DYNAMIC_MINORS is not set
1201# CONFIG_USB_SUSPEND is not set
1075# CONFIG_USB_OTG is not set 1202# CONFIG_USB_OTG is not set
1076# CONFIG_USB_OTG_WHITELIST is not set 1203# CONFIG_USB_OTG_WHITELIST is not set
1077# CONFIG_USB_OTG_BLACKLIST_HUB is not set 1204# CONFIG_USB_OTG_BLACKLIST_HUB is not set
@@ -1086,9 +1213,11 @@ CONFIG_USB_MON=y
1086# CONFIG_USB_OXU210HP_HCD is not set 1213# CONFIG_USB_OXU210HP_HCD is not set
1087# CONFIG_USB_ISP116X_HCD is not set 1214# CONFIG_USB_ISP116X_HCD is not set
1088# CONFIG_USB_ISP1760_HCD is not set 1215# CONFIG_USB_ISP1760_HCD is not set
1216# CONFIG_USB_ISP1362_HCD is not set
1089# CONFIG_USB_SL811_HCD is not set 1217# CONFIG_USB_SL811_HCD is not set
1090CONFIG_USB_R8A66597_HCD=y 1218CONFIG_USB_R8A66597_HCD=y
1091# CONFIG_USB_HWA_HCD is not set 1219# CONFIG_USB_HWA_HCD is not set
1220# CONFIG_USB_GADGET_MUSB_HDRC is not set
1092 1221
1093# 1222#
1094# USB Device Class drivers 1223# USB Device Class drivers
@@ -1151,9 +1280,46 @@ CONFIG_USB_STORAGE=y
1151# CONFIG_USB_LD is not set 1280# CONFIG_USB_LD is not set
1152# CONFIG_USB_TRANCEVIBRATOR is not set 1281# CONFIG_USB_TRANCEVIBRATOR is not set
1153# CONFIG_USB_IOWARRIOR is not set 1282# CONFIG_USB_IOWARRIOR is not set
1283# CONFIG_USB_TEST is not set
1154# CONFIG_USB_ISIGHTFW is not set 1284# CONFIG_USB_ISIGHTFW is not set
1155# CONFIG_USB_VST is not set 1285# CONFIG_USB_VST is not set
1156# CONFIG_USB_GADGET is not set 1286CONFIG_USB_GADGET=y
1287# CONFIG_USB_GADGET_DEBUG_FILES is not set
1288CONFIG_USB_GADGET_VBUS_DRAW=2
1289CONFIG_USB_GADGET_SELECTED=y
1290# CONFIG_USB_GADGET_AT91 is not set
1291# CONFIG_USB_GADGET_ATMEL_USBA is not set
1292# CONFIG_USB_GADGET_FSL_USB2 is not set
1293# CONFIG_USB_GADGET_LH7A40X is not set
1294# CONFIG_USB_GADGET_OMAP is not set
1295# CONFIG_USB_GADGET_PXA25X is not set
1296CONFIG_USB_GADGET_R8A66597=y
1297CONFIG_USB_R8A66597=y
1298# CONFIG_USB_GADGET_PXA27X is not set
1299# CONFIG_USB_GADGET_S3C_HSOTG is not set
1300# CONFIG_USB_GADGET_IMX is not set
1301# CONFIG_USB_GADGET_S3C2410 is not set
1302# CONFIG_USB_GADGET_M66592 is not set
1303# CONFIG_USB_GADGET_AMD5536UDC is not set
1304# CONFIG_USB_GADGET_FSL_QE is not set
1305# CONFIG_USB_GADGET_CI13XXX is not set
1306# CONFIG_USB_GADGET_NET2280 is not set
1307# CONFIG_USB_GADGET_GOKU is not set
1308# CONFIG_USB_GADGET_LANGWELL is not set
1309# CONFIG_USB_GADGET_DUMMY_HCD is not set
1310CONFIG_USB_GADGET_DUALSPEED=y
1311# CONFIG_USB_ZERO is not set
1312# CONFIG_USB_AUDIO is not set
1313CONFIG_USB_ETH=m
1314CONFIG_USB_ETH_RNDIS=y
1315# CONFIG_USB_ETH_EEM is not set
1316CONFIG_USB_GADGETFS=m
1317CONFIG_USB_FILE_STORAGE=m
1318# CONFIG_USB_FILE_STORAGE_TEST is not set
1319CONFIG_USB_G_SERIAL=m
1320# CONFIG_USB_MIDI_GADGET is not set
1321# CONFIG_USB_G_PRINTER is not set
1322# CONFIG_USB_CDC_COMPOSITE is not set
1157 1323
1158# 1324#
1159# OTG and related infrastructure 1325# OTG and related infrastructure
@@ -1176,6 +1342,8 @@ CONFIG_MMC_BLOCK_BOUNCE=y
1176# MMC/SD/SDIO Host Controller Drivers 1342# MMC/SD/SDIO Host Controller Drivers
1177# 1343#
1178# CONFIG_MMC_SDHCI is not set 1344# CONFIG_MMC_SDHCI is not set
1345# CONFIG_MMC_AT91 is not set
1346# CONFIG_MMC_ATMELMCI is not set
1179CONFIG_MMC_SPI=y 1347CONFIG_MMC_SPI=y
1180# CONFIG_MEMSTICK is not set 1348# CONFIG_MEMSTICK is not set
1181# CONFIG_NEW_LEDS is not set 1349# CONFIG_NEW_LEDS is not set
@@ -1223,6 +1391,7 @@ CONFIG_RTC_DRV_PCF8563=y
1223# CONFIG_RTC_DRV_R9701 is not set 1391# CONFIG_RTC_DRV_R9701 is not set
1224# CONFIG_RTC_DRV_RS5C348 is not set 1392# CONFIG_RTC_DRV_RS5C348 is not set
1225# CONFIG_RTC_DRV_DS3234 is not set 1393# CONFIG_RTC_DRV_DS3234 is not set
1394# CONFIG_RTC_DRV_PCF2123 is not set
1226 1395
1227# 1396#
1228# Platform RTC drivers 1397# Platform RTC drivers
@@ -1279,6 +1448,7 @@ CONFIG_FS_POSIX_ACL=y
1279# CONFIG_GFS2_FS is not set 1448# CONFIG_GFS2_FS is not set
1280# CONFIG_OCFS2_FS is not set 1449# CONFIG_OCFS2_FS is not set
1281# CONFIG_BTRFS_FS is not set 1450# CONFIG_BTRFS_FS is not set
1451# CONFIG_NILFS2_FS is not set
1282CONFIG_FILE_LOCKING=y 1452CONFIG_FILE_LOCKING=y
1283CONFIG_FSNOTIFY=y 1453CONFIG_FSNOTIFY=y
1284CONFIG_DNOTIFY=y 1454CONFIG_DNOTIFY=y
@@ -1343,7 +1513,6 @@ CONFIG_MISC_FILESYSTEMS=y
1343# CONFIG_ROMFS_FS is not set 1513# CONFIG_ROMFS_FS is not set
1344# CONFIG_SYSV_FS is not set 1514# CONFIG_SYSV_FS is not set
1345# CONFIG_UFS_FS is not set 1515# CONFIG_UFS_FS is not set
1346# CONFIG_NILFS2_FS is not set
1347CONFIG_NETWORK_FILESYSTEMS=y 1516CONFIG_NETWORK_FILESYSTEMS=y
1348CONFIG_NFS_FS=y 1517CONFIG_NFS_FS=y
1349CONFIG_NFS_V3=y 1518CONFIG_NFS_V3=y
@@ -1423,6 +1592,7 @@ CONFIG_ENABLE_WARN_DEPRECATED=y
1423# CONFIG_ENABLE_MUST_CHECK is not set 1592# CONFIG_ENABLE_MUST_CHECK is not set
1424CONFIG_FRAME_WARN=1024 1593CONFIG_FRAME_WARN=1024
1425# CONFIG_MAGIC_SYSRQ is not set 1594# CONFIG_MAGIC_SYSRQ is not set
1595# CONFIG_STRIP_ASM_SYMS is not set
1426# CONFIG_UNUSED_SYMBOLS is not set 1596# CONFIG_UNUSED_SYMBOLS is not set
1427# CONFIG_DEBUG_FS is not set 1597# CONFIG_DEBUG_FS is not set
1428# CONFIG_HEADERS_CHECK is not set 1598# CONFIG_HEADERS_CHECK is not set
@@ -1433,8 +1603,11 @@ CONFIG_FRAME_WARN=1024
1433# CONFIG_LATENCYTOP is not set 1603# CONFIG_LATENCYTOP is not set
1434CONFIG_SYSCTL_SYSCALL_CHECK=y 1604CONFIG_SYSCTL_SYSCALL_CHECK=y
1435CONFIG_HAVE_FUNCTION_TRACER=y 1605CONFIG_HAVE_FUNCTION_TRACER=y
1606CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1607CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
1436CONFIG_HAVE_DYNAMIC_FTRACE=y 1608CONFIG_HAVE_DYNAMIC_FTRACE=y
1437CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1609CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1610CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
1438CONFIG_TRACING_SUPPORT=y 1611CONFIG_TRACING_SUPPORT=y
1439# CONFIG_FTRACE is not set 1612# CONFIG_FTRACE is not set
1440# CONFIG_DMA_API_DEBUG is not set 1613# CONFIG_DMA_API_DEBUG is not set
@@ -1442,6 +1615,7 @@ CONFIG_TRACING_SUPPORT=y
1442CONFIG_HAVE_ARCH_KGDB=y 1615CONFIG_HAVE_ARCH_KGDB=y
1443# CONFIG_SH_STANDARD_BIOS is not set 1616# CONFIG_SH_STANDARD_BIOS is not set
1444# CONFIG_EARLY_SCIF_CONSOLE is not set 1617# CONFIG_EARLY_SCIF_CONSOLE is not set
1618# CONFIG_DWARF_UNWINDER is not set
1445 1619
1446# 1620#
1447# Security options 1621# Security options
@@ -1455,7 +1629,6 @@ CONFIG_CRYPTO=y
1455# 1629#
1456# Crypto core or helper 1630# Crypto core or helper
1457# 1631#
1458# CONFIG_CRYPTO_FIPS is not set
1459CONFIG_CRYPTO_ALGAPI=y 1632CONFIG_CRYPTO_ALGAPI=y
1460CONFIG_CRYPTO_ALGAPI2=y 1633CONFIG_CRYPTO_ALGAPI2=y
1461CONFIG_CRYPTO_AEAD2=y 1634CONFIG_CRYPTO_AEAD2=y
@@ -1496,11 +1669,13 @@ CONFIG_CRYPTO_CBC=y
1496# 1669#
1497# CONFIG_CRYPTO_HMAC is not set 1670# CONFIG_CRYPTO_HMAC is not set
1498# CONFIG_CRYPTO_XCBC is not set 1671# CONFIG_CRYPTO_XCBC is not set
1672# CONFIG_CRYPTO_VMAC is not set
1499 1673
1500# 1674#
1501# Digest 1675# Digest
1502# 1676#
1503# CONFIG_CRYPTO_CRC32C is not set 1677# CONFIG_CRYPTO_CRC32C is not set
1678# CONFIG_CRYPTO_GHASH is not set
1504# CONFIG_CRYPTO_MD4 is not set 1679# CONFIG_CRYPTO_MD4 is not set
1505# CONFIG_CRYPTO_MD5 is not set 1680# CONFIG_CRYPTO_MD5 is not set
1506# CONFIG_CRYPTO_MICHAEL_MIC is not set 1681# CONFIG_CRYPTO_MICHAEL_MIC is not set
@@ -1562,5 +1737,6 @@ CONFIG_CRC7=y
1562CONFIG_HAS_IOMEM=y 1737CONFIG_HAS_IOMEM=y
1563CONFIG_HAS_IOPORT=y 1738CONFIG_HAS_IOPORT=y
1564CONFIG_HAS_DMA=y 1739CONFIG_HAS_DMA=y
1740CONFIG_HAVE_LMB=y
1565CONFIG_NLATTR=y 1741CONFIG_NLATTR=y
1566CONFIG_GENERIC_ATOMIC64=y 1742CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/se7750_defconfig b/arch/sh/configs/se7750_defconfig
index 564bf7bdce6b..7bc926c17b79 100644
--- a/arch/sh/configs/se7750_defconfig
+++ b/arch/sh/configs/se7750_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.30 3# Linux kernel version: 2.6.31
4# Thu Jun 18 13:00:01 2009 4# Thu Sep 24 18:58:58 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -14,6 +14,7 @@ CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y 14CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
16CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_IRQ_PER_CPU=y
17# CONFIG_GENERIC_GPIO is not set 18# CONFIG_GENERIC_GPIO is not set
18CONFIG_GENERIC_TIME=y 19CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 20CONFIG_GENERIC_CLOCKEVENTS=y
@@ -27,7 +28,9 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
27# CONFIG_ARCH_HAS_ILOG2_U64 is not set 28# CONFIG_ARCH_HAS_ILOG2_U64 is not set
28CONFIG_ARCH_NO_VIRT_TO_BUS=y 29CONFIG_ARCH_NO_VIRT_TO_BUS=y
29CONFIG_ARCH_HAS_DEFAULT_IDLE=y 30CONFIG_ARCH_HAS_DEFAULT_IDLE=y
31CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
30CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 32CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
33CONFIG_CONSTRUCTORS=y
31 34
32# 35#
33# General setup 36# General setup
@@ -37,6 +40,12 @@ CONFIG_BROKEN_ON_SMP=y
37CONFIG_INIT_ENV_ARG_LIMIT=32 40CONFIG_INIT_ENV_ARG_LIMIT=32
38CONFIG_LOCALVERSION="" 41CONFIG_LOCALVERSION=""
39CONFIG_LOCALVERSION_AUTO=y 42CONFIG_LOCALVERSION_AUTO=y
43CONFIG_HAVE_KERNEL_GZIP=y
44CONFIG_HAVE_KERNEL_BZIP2=y
45CONFIG_HAVE_KERNEL_LZMA=y
46CONFIG_KERNEL_GZIP=y
47# CONFIG_KERNEL_BZIP2 is not set
48# CONFIG_KERNEL_LZMA is not set
40# CONFIG_SWAP is not set 49# CONFIG_SWAP is not set
41CONFIG_SYSVIPC=y 50CONFIG_SYSVIPC=y
42CONFIG_SYSVIPC_SYSCTL=y 51CONFIG_SYSVIPC_SYSCTL=y
@@ -49,11 +58,12 @@ CONFIG_BSD_PROCESS_ACCT=y
49# 58#
50# RCU Subsystem 59# RCU Subsystem
51# 60#
52CONFIG_CLASSIC_RCU=y 61CONFIG_TREE_RCU=y
53# CONFIG_TREE_RCU is not set 62# CONFIG_TREE_PREEMPT_RCU is not set
54# CONFIG_PREEMPT_RCU is not set 63# CONFIG_RCU_TRACE is not set
64CONFIG_RCU_FANOUT=32
65# CONFIG_RCU_FANOUT_EXACT is not set
55# CONFIG_TREE_RCU_TRACE is not set 66# CONFIG_TREE_RCU_TRACE is not set
56# CONFIG_PREEMPT_RCU_TRACE is not set
57CONFIG_IKCONFIG=y 67CONFIG_IKCONFIG=y
58CONFIG_IKCONFIG_PROC=y 68CONFIG_IKCONFIG_PROC=y
59CONFIG_LOG_BUF_SHIFT=14 69CONFIG_LOG_BUF_SHIFT=14
@@ -84,18 +94,19 @@ CONFIG_TIMERFD=y
84CONFIG_EVENTFD=y 94CONFIG_EVENTFD=y
85CONFIG_SHMEM=y 95CONFIG_SHMEM=y
86CONFIG_AIO=y 96CONFIG_AIO=y
97CONFIG_HAVE_PERF_EVENTS=y
87 98
88# 99#
89# Performance Counters 100# Kernel Performance Events And Counters
90# 101#
102# CONFIG_PERF_EVENTS is not set
103# CONFIG_PERF_COUNTERS is not set
91CONFIG_VM_EVENT_COUNTERS=y 104CONFIG_VM_EVENT_COUNTERS=y
92# CONFIG_STRIP_ASM_SYMS is not set
93CONFIG_COMPAT_BRK=y 105CONFIG_COMPAT_BRK=y
94CONFIG_SLAB=y 106CONFIG_SLAB=y
95# CONFIG_SLUB is not set 107# CONFIG_SLUB is not set
96# CONFIG_SLOB is not set 108# CONFIG_SLOB is not set
97# CONFIG_PROFILING is not set 109# CONFIG_PROFILING is not set
98# CONFIG_MARKERS is not set
99CONFIG_HAVE_OPROFILE=y 110CONFIG_HAVE_OPROFILE=y
100# CONFIG_KPROBES is not set 111# CONFIG_KPROBES is not set
101CONFIG_HAVE_IOREMAP_PROT=y 112CONFIG_HAVE_IOREMAP_PROT=y
@@ -104,6 +115,10 @@ CONFIG_HAVE_KRETPROBES=y
104CONFIG_HAVE_ARCH_TRACEHOOK=y 115CONFIG_HAVE_ARCH_TRACEHOOK=y
105CONFIG_HAVE_CLK=y 116CONFIG_HAVE_CLK=y
106CONFIG_HAVE_DMA_API_DEBUG=y 117CONFIG_HAVE_DMA_API_DEBUG=y
118
119#
120# GCOV-based kernel profiling
121#
107# CONFIG_SLOW_WORK is not set 122# CONFIG_SLOW_WORK is not set
108CONFIG_HAVE_GENERIC_DMA_COHERENT=y 123CONFIG_HAVE_GENERIC_DMA_COHERENT=y
109CONFIG_SLABINFO=y 124CONFIG_SLABINFO=y
@@ -115,7 +130,7 @@ CONFIG_MODULES=y
115# CONFIG_MODVERSIONS is not set 130# CONFIG_MODVERSIONS is not set
116# CONFIG_MODULE_SRCVERSION_ALL is not set 131# CONFIG_MODULE_SRCVERSION_ALL is not set
117CONFIG_BLOCK=y 132CONFIG_BLOCK=y
118# CONFIG_LBD is not set 133CONFIG_LBDAF=y
119# CONFIG_BLK_DEV_BSG is not set 134# CONFIG_BLK_DEV_BSG is not set
120# CONFIG_BLK_DEV_INTEGRITY is not set 135# CONFIG_BLK_DEV_INTEGRITY is not set
121 136
@@ -162,6 +177,7 @@ CONFIG_CPU_SUBTYPE_SH7750=y
162# CONFIG_CPU_SUBTYPE_SH4_202 is not set 177# CONFIG_CPU_SUBTYPE_SH4_202 is not set
163# CONFIG_CPU_SUBTYPE_SH7723 is not set 178# CONFIG_CPU_SUBTYPE_SH7723 is not set
164# CONFIG_CPU_SUBTYPE_SH7724 is not set 179# CONFIG_CPU_SUBTYPE_SH7724 is not set
180# CONFIG_CPU_SUBTYPE_SH7757 is not set
165# CONFIG_CPU_SUBTYPE_SH7763 is not set 181# CONFIG_CPU_SUBTYPE_SH7763 is not set
166# CONFIG_CPU_SUBTYPE_SH7770 is not set 182# CONFIG_CPU_SUBTYPE_SH7770 is not set
167# CONFIG_CPU_SUBTYPE_SH7780 is not set 183# CONFIG_CPU_SUBTYPE_SH7780 is not set
@@ -207,6 +223,7 @@ CONFIG_ZONE_DMA_FLAG=0
207CONFIG_NR_QUICK=2 223CONFIG_NR_QUICK=2
208CONFIG_HAVE_MLOCK=y 224CONFIG_HAVE_MLOCK=y
209CONFIG_HAVE_MLOCKED_PAGE_BIT=y 225CONFIG_HAVE_MLOCKED_PAGE_BIT=y
226# CONFIG_KSM is not set
210CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 227CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
211 228
212# 229#
@@ -291,7 +308,8 @@ CONFIG_ZERO_PAGE_OFFSET=0x00001000
291CONFIG_BOOT_LINK_OFFSET=0x00800000 308CONFIG_BOOT_LINK_OFFSET=0x00800000
292CONFIG_ENTRY_OFFSET=0x00001000 309CONFIG_ENTRY_OFFSET=0x00001000
293# CONFIG_UBC_WAKEUP is not set 310# CONFIG_UBC_WAKEUP is not set
294# CONFIG_CMDLINE_BOOL is not set 311# CONFIG_CMDLINE_OVERWRITE is not set
312# CONFIG_CMDLINE_EXTEND is not set
295 313
296# 314#
297# Bus options 315# Bus options
@@ -358,6 +376,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
358# CONFIG_NETFILTER is not set 376# CONFIG_NETFILTER is not set
359# CONFIG_IP_DCCP is not set 377# CONFIG_IP_DCCP is not set
360# CONFIG_IP_SCTP is not set 378# CONFIG_IP_SCTP is not set
379# CONFIG_RDS is not set
361# CONFIG_TIPC is not set 380# CONFIG_TIPC is not set
362# CONFIG_ATM is not set 381# CONFIG_ATM is not set
363# CONFIG_BRIDGE is not set 382# CONFIG_BRIDGE is not set
@@ -387,6 +406,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
387# CONFIG_AF_RXRPC is not set 406# CONFIG_AF_RXRPC is not set
388CONFIG_WIRELESS=y 407CONFIG_WIRELESS=y
389# CONFIG_CFG80211 is not set 408# CONFIG_CFG80211 is not set
409CONFIG_CFG80211_DEFAULT_PS_VALUE=0
390# CONFIG_WIRELESS_OLD_REGULATORY is not set 410# CONFIG_WIRELESS_OLD_REGULATORY is not set
391# CONFIG_WIRELESS_EXT is not set 411# CONFIG_WIRELESS_EXT is not set
392# CONFIG_LIB80211 is not set 412# CONFIG_LIB80211 is not set
@@ -394,7 +414,6 @@ CONFIG_WIRELESS=y
394# 414#
395# CFG80211 needs to be enabled for MAC80211 415# CFG80211 needs to be enabled for MAC80211
396# 416#
397CONFIG_MAC80211_DEFAULT_PS_VALUE=0
398# CONFIG_WIMAX is not set 417# CONFIG_WIMAX is not set
399# CONFIG_RFKILL is not set 418# CONFIG_RFKILL is not set
400# CONFIG_NET_9P is not set 419# CONFIG_NET_9P is not set
@@ -412,9 +431,9 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
412# CONFIG_CONNECTOR is not set 431# CONFIG_CONNECTOR is not set
413CONFIG_MTD=y 432CONFIG_MTD=y
414# CONFIG_MTD_DEBUG is not set 433# CONFIG_MTD_DEBUG is not set
434# CONFIG_MTD_TESTS is not set
415# CONFIG_MTD_CONCAT is not set 435# CONFIG_MTD_CONCAT is not set
416CONFIG_MTD_PARTITIONS=y 436CONFIG_MTD_PARTITIONS=y
417# CONFIG_MTD_TESTS is not set
418# CONFIG_MTD_REDBOOT_PARTS is not set 437# CONFIG_MTD_REDBOOT_PARTS is not set
419# CONFIG_MTD_CMDLINE_PARTS is not set 438# CONFIG_MTD_CMDLINE_PARTS is not set
420# CONFIG_MTD_AR7_PARTS is not set 439# CONFIG_MTD_AR7_PARTS is not set
@@ -563,7 +582,6 @@ CONFIG_SCSI_WAIT_SCAN=m
563# CONFIG_SCSI_SRP_ATTRS is not set 582# CONFIG_SCSI_SRP_ATTRS is not set
564CONFIG_SCSI_LOWLEVEL=y 583CONFIG_SCSI_LOWLEVEL=y
565# CONFIG_ISCSI_TCP is not set 584# CONFIG_ISCSI_TCP is not set
566# CONFIG_SCSI_BNX2_ISCSI is not set
567# CONFIG_LIBFC is not set 585# CONFIG_LIBFC is not set
568# CONFIG_LIBFCOE is not set 586# CONFIG_LIBFCOE is not set
569# CONFIG_SCSI_DEBUG is not set 587# CONFIG_SCSI_DEBUG is not set
@@ -599,10 +617,7 @@ CONFIG_STNIC=y
599# CONFIG_KS8842 is not set 617# CONFIG_KS8842 is not set
600CONFIG_NETDEV_1000=y 618CONFIG_NETDEV_1000=y
601CONFIG_NETDEV_10000=y 619CONFIG_NETDEV_10000=y
602 620CONFIG_WLAN=y
603#
604# Wireless LAN
605#
606# CONFIG_WLAN_PRE80211 is not set 621# CONFIG_WLAN_PRE80211 is not set
607# CONFIG_WLAN_80211 is not set 622# CONFIG_WLAN_80211 is not set
608 623
@@ -665,10 +680,20 @@ CONFIG_HW_RANDOM=y
665# CONFIG_TCG_TPM is not set 680# CONFIG_TCG_TPM is not set
666# CONFIG_I2C is not set 681# CONFIG_I2C is not set
667# CONFIG_SPI is not set 682# CONFIG_SPI is not set
683
684#
685# PPS support
686#
687# CONFIG_PPS is not set
668# CONFIG_W1 is not set 688# CONFIG_W1 is not set
669# CONFIG_POWER_SUPPLY is not set 689# CONFIG_POWER_SUPPLY is not set
670CONFIG_HWMON=y 690CONFIG_HWMON=y
671# CONFIG_HWMON_VID is not set 691# CONFIG_HWMON_VID is not set
692# CONFIG_HWMON_DEBUG_CHIP is not set
693
694#
695# Native drivers
696#
672# CONFIG_SENSORS_F71805F is not set 697# CONFIG_SENSORS_F71805F is not set
673# CONFIG_SENSORS_F71882FG is not set 698# CONFIG_SENSORS_F71882FG is not set
674# CONFIG_SENSORS_IT87 is not set 699# CONFIG_SENSORS_IT87 is not set
@@ -679,9 +704,7 @@ CONFIG_HWMON=y
679# CONFIG_SENSORS_VT1211 is not set 704# CONFIG_SENSORS_VT1211 is not set
680# CONFIG_SENSORS_W83627HF is not set 705# CONFIG_SENSORS_W83627HF is not set
681# CONFIG_SENSORS_W83627EHF is not set 706# CONFIG_SENSORS_W83627EHF is not set
682# CONFIG_HWMON_DEBUG_CHIP is not set
683# CONFIG_THERMAL is not set 707# CONFIG_THERMAL is not set
684# CONFIG_THERMAL_HWMON is not set
685CONFIG_WATCHDOG=y 708CONFIG_WATCHDOG=y
686# CONFIG_WATCHDOG_NOWAYOUT is not set 709# CONFIG_WATCHDOG_NOWAYOUT is not set
687 710
@@ -766,8 +789,10 @@ CONFIG_RTC_LIB=y
766# CONFIG_JFS_FS is not set 789# CONFIG_JFS_FS is not set
767# CONFIG_FS_POSIX_ACL is not set 790# CONFIG_FS_POSIX_ACL is not set
768# CONFIG_XFS_FS is not set 791# CONFIG_XFS_FS is not set
792# CONFIG_GFS2_FS is not set
769# CONFIG_OCFS2_FS is not set 793# CONFIG_OCFS2_FS is not set
770# CONFIG_BTRFS_FS is not set 794# CONFIG_BTRFS_FS is not set
795# CONFIG_NILFS2_FS is not set
771CONFIG_FILE_LOCKING=y 796CONFIG_FILE_LOCKING=y
772CONFIG_FSNOTIFY=y 797CONFIG_FSNOTIFY=y
773CONFIG_DNOTIFY=y 798CONFIG_DNOTIFY=y
@@ -838,7 +863,6 @@ CONFIG_JFFS2_RTIME=y
838# CONFIG_ROMFS_FS is not set 863# CONFIG_ROMFS_FS is not set
839# CONFIG_SYSV_FS is not set 864# CONFIG_SYSV_FS is not set
840# CONFIG_UFS_FS is not set 865# CONFIG_UFS_FS is not set
841# CONFIG_NILFS2_FS is not set
842CONFIG_NETWORK_FILESYSTEMS=y 866CONFIG_NETWORK_FILESYSTEMS=y
843CONFIG_NFS_FS=y 867CONFIG_NFS_FS=y
844# CONFIG_NFS_V3 is not set 868# CONFIG_NFS_V3 is not set
@@ -885,6 +909,7 @@ CONFIG_ENABLE_WARN_DEPRECATED=y
885# CONFIG_ENABLE_MUST_CHECK is not set 909# CONFIG_ENABLE_MUST_CHECK is not set
886CONFIG_FRAME_WARN=1024 910CONFIG_FRAME_WARN=1024
887# CONFIG_MAGIC_SYSRQ is not set 911# CONFIG_MAGIC_SYSRQ is not set
912# CONFIG_STRIP_ASM_SYMS is not set
888# CONFIG_UNUSED_SYMBOLS is not set 913# CONFIG_UNUSED_SYMBOLS is not set
889# CONFIG_DEBUG_FS is not set 914# CONFIG_DEBUG_FS is not set
890# CONFIG_HEADERS_CHECK is not set 915# CONFIG_HEADERS_CHECK is not set
@@ -894,8 +919,11 @@ CONFIG_FRAME_WARN=1024
894# CONFIG_RCU_CPU_STALL_DETECTOR is not set 919# CONFIG_RCU_CPU_STALL_DETECTOR is not set
895# CONFIG_LATENCYTOP is not set 920# CONFIG_LATENCYTOP is not set
896CONFIG_HAVE_FUNCTION_TRACER=y 921CONFIG_HAVE_FUNCTION_TRACER=y
922CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
923CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
897CONFIG_HAVE_DYNAMIC_FTRACE=y 924CONFIG_HAVE_DYNAMIC_FTRACE=y
898CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 925CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
926CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
899CONFIG_TRACING_SUPPORT=y 927CONFIG_TRACING_SUPPORT=y
900# CONFIG_FTRACE is not set 928# CONFIG_FTRACE is not set
901# CONFIG_DMA_API_DEBUG is not set 929# CONFIG_DMA_API_DEBUG is not set
@@ -903,6 +931,7 @@ CONFIG_TRACING_SUPPORT=y
903CONFIG_HAVE_ARCH_KGDB=y 931CONFIG_HAVE_ARCH_KGDB=y
904# CONFIG_SH_STANDARD_BIOS is not set 932# CONFIG_SH_STANDARD_BIOS is not set
905# CONFIG_EARLY_SCIF_CONSOLE is not set 933# CONFIG_EARLY_SCIF_CONSOLE is not set
934# CONFIG_DWARF_UNWINDER is not set
906 935
907# 936#
908# Security options 937# Security options
@@ -916,7 +945,6 @@ CONFIG_CRYPTO=y
916# 945#
917# Crypto core or helper 946# Crypto core or helper
918# 947#
919# CONFIG_CRYPTO_FIPS is not set
920# CONFIG_CRYPTO_MANAGER is not set 948# CONFIG_CRYPTO_MANAGER is not set
921# CONFIG_CRYPTO_MANAGER2 is not set 949# CONFIG_CRYPTO_MANAGER2 is not set
922# CONFIG_CRYPTO_GF128MUL is not set 950# CONFIG_CRYPTO_GF128MUL is not set
@@ -948,11 +976,13 @@ CONFIG_CRYPTO=y
948# 976#
949# CONFIG_CRYPTO_HMAC is not set 977# CONFIG_CRYPTO_HMAC is not set
950# CONFIG_CRYPTO_XCBC is not set 978# CONFIG_CRYPTO_XCBC is not set
979# CONFIG_CRYPTO_VMAC is not set
951 980
952# 981#
953# Digest 982# Digest
954# 983#
955# CONFIG_CRYPTO_CRC32C is not set 984# CONFIG_CRYPTO_CRC32C is not set
985# CONFIG_CRYPTO_GHASH is not set
956# CONFIG_CRYPTO_MD4 is not set 986# CONFIG_CRYPTO_MD4 is not set
957# CONFIG_CRYPTO_MD5 is not set 987# CONFIG_CRYPTO_MD5 is not set
958# CONFIG_CRYPTO_MICHAEL_MIC is not set 988# CONFIG_CRYPTO_MICHAEL_MIC is not set
@@ -1016,5 +1046,6 @@ CONFIG_ZLIB_DEFLATE=y
1016CONFIG_HAS_IOMEM=y 1046CONFIG_HAS_IOMEM=y
1017CONFIG_HAS_IOPORT=y 1047CONFIG_HAS_IOPORT=y
1018CONFIG_HAS_DMA=y 1048CONFIG_HAS_DMA=y
1049CONFIG_HAVE_LMB=y
1019CONFIG_NLATTR=y 1050CONFIG_NLATTR=y
1020CONFIG_GENERIC_ATOMIC64=y 1051CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/se7751_defconfig b/arch/sh/configs/se7751_defconfig
index eb431c43e994..c20ae5e35c81 100644
--- a/arch/sh/configs/se7751_defconfig
+++ b/arch/sh/configs/se7751_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.30 3# Linux kernel version: 2.6.31
4# Thu Jun 18 13:02:26 2009 4# Thu Sep 24 19:01:41 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -14,6 +14,7 @@ CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y 14CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
16CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_IRQ_PER_CPU=y
17# CONFIG_GENERIC_GPIO is not set 18# CONFIG_GENERIC_GPIO is not set
18CONFIG_GENERIC_TIME=y 19CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 20CONFIG_GENERIC_CLOCKEVENTS=y
@@ -27,7 +28,9 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
27# CONFIG_ARCH_HAS_ILOG2_U64 is not set 28# CONFIG_ARCH_HAS_ILOG2_U64 is not set
28CONFIG_ARCH_NO_VIRT_TO_BUS=y 29CONFIG_ARCH_NO_VIRT_TO_BUS=y
29CONFIG_ARCH_HAS_DEFAULT_IDLE=y 30CONFIG_ARCH_HAS_DEFAULT_IDLE=y
31CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
30CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 32CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
33CONFIG_CONSTRUCTORS=y
31 34
32# 35#
33# General setup 36# General setup
@@ -37,6 +40,12 @@ CONFIG_BROKEN_ON_SMP=y
37CONFIG_INIT_ENV_ARG_LIMIT=32 40CONFIG_INIT_ENV_ARG_LIMIT=32
38CONFIG_LOCALVERSION="" 41CONFIG_LOCALVERSION=""
39CONFIG_LOCALVERSION_AUTO=y 42CONFIG_LOCALVERSION_AUTO=y
43CONFIG_HAVE_KERNEL_GZIP=y
44CONFIG_HAVE_KERNEL_BZIP2=y
45CONFIG_HAVE_KERNEL_LZMA=y
46CONFIG_KERNEL_GZIP=y
47# CONFIG_KERNEL_BZIP2 is not set
48# CONFIG_KERNEL_LZMA is not set
40CONFIG_SWAP=y 49CONFIG_SWAP=y
41CONFIG_SYSVIPC=y 50CONFIG_SYSVIPC=y
42CONFIG_SYSVIPC_SYSCTL=y 51CONFIG_SYSVIPC_SYSCTL=y
@@ -49,11 +58,12 @@ CONFIG_BSD_PROCESS_ACCT=y
49# 58#
50# RCU Subsystem 59# RCU Subsystem
51# 60#
52CONFIG_CLASSIC_RCU=y 61CONFIG_TREE_RCU=y
53# CONFIG_TREE_RCU is not set 62# CONFIG_TREE_PREEMPT_RCU is not set
54# CONFIG_PREEMPT_RCU is not set 63# CONFIG_RCU_TRACE is not set
64CONFIG_RCU_FANOUT=32
65# CONFIG_RCU_FANOUT_EXACT is not set
55# CONFIG_TREE_RCU_TRACE is not set 66# CONFIG_TREE_RCU_TRACE is not set
56# CONFIG_PREEMPT_RCU_TRACE is not set
57# CONFIG_IKCONFIG is not set 67# CONFIG_IKCONFIG is not set
58CONFIG_LOG_BUF_SHIFT=14 68CONFIG_LOG_BUF_SHIFT=14
59# CONFIG_GROUP_SCHED is not set 69# CONFIG_GROUP_SCHED is not set
@@ -87,18 +97,19 @@ CONFIG_TIMERFD=y
87CONFIG_EVENTFD=y 97CONFIG_EVENTFD=y
88CONFIG_SHMEM=y 98CONFIG_SHMEM=y
89CONFIG_AIO=y 99CONFIG_AIO=y
100CONFIG_HAVE_PERF_EVENTS=y
90 101
91# 102#
92# Performance Counters 103# Kernel Performance Events And Counters
93# 104#
105# CONFIG_PERF_EVENTS is not set
106# CONFIG_PERF_COUNTERS is not set
94CONFIG_VM_EVENT_COUNTERS=y 107CONFIG_VM_EVENT_COUNTERS=y
95# CONFIG_STRIP_ASM_SYMS is not set
96CONFIG_COMPAT_BRK=y 108CONFIG_COMPAT_BRK=y
97CONFIG_SLAB=y 109CONFIG_SLAB=y
98# CONFIG_SLUB is not set 110# CONFIG_SLUB is not set
99# CONFIG_SLOB is not set 111# CONFIG_SLOB is not set
100# CONFIG_PROFILING is not set 112# CONFIG_PROFILING is not set
101# CONFIG_MARKERS is not set
102CONFIG_HAVE_OPROFILE=y 113CONFIG_HAVE_OPROFILE=y
103# CONFIG_KPROBES is not set 114# CONFIG_KPROBES is not set
104CONFIG_HAVE_IOREMAP_PROT=y 115CONFIG_HAVE_IOREMAP_PROT=y
@@ -107,6 +118,10 @@ CONFIG_HAVE_KRETPROBES=y
107CONFIG_HAVE_ARCH_TRACEHOOK=y 118CONFIG_HAVE_ARCH_TRACEHOOK=y
108CONFIG_HAVE_CLK=y 119CONFIG_HAVE_CLK=y
109CONFIG_HAVE_DMA_API_DEBUG=y 120CONFIG_HAVE_DMA_API_DEBUG=y
121
122#
123# GCOV-based kernel profiling
124#
110# CONFIG_SLOW_WORK is not set 125# CONFIG_SLOW_WORK is not set
111CONFIG_HAVE_GENERIC_DMA_COHERENT=y 126CONFIG_HAVE_GENERIC_DMA_COHERENT=y
112CONFIG_SLABINFO=y 127CONFIG_SLABINFO=y
@@ -118,7 +133,7 @@ CONFIG_MODULES=y
118# CONFIG_MODVERSIONS is not set 133# CONFIG_MODVERSIONS is not set
119# CONFIG_MODULE_SRCVERSION_ALL is not set 134# CONFIG_MODULE_SRCVERSION_ALL is not set
120CONFIG_BLOCK=y 135CONFIG_BLOCK=y
121# CONFIG_LBD is not set 136CONFIG_LBDAF=y
122# CONFIG_BLK_DEV_BSG is not set 137# CONFIG_BLK_DEV_BSG is not set
123# CONFIG_BLK_DEV_INTEGRITY is not set 138# CONFIG_BLK_DEV_INTEGRITY is not set
124 139
@@ -165,6 +180,7 @@ CONFIG_CPU_SUBTYPE_SH7751=y
165# CONFIG_CPU_SUBTYPE_SH4_202 is not set 180# CONFIG_CPU_SUBTYPE_SH4_202 is not set
166# CONFIG_CPU_SUBTYPE_SH7723 is not set 181# CONFIG_CPU_SUBTYPE_SH7723 is not set
167# CONFIG_CPU_SUBTYPE_SH7724 is not set 182# CONFIG_CPU_SUBTYPE_SH7724 is not set
183# CONFIG_CPU_SUBTYPE_SH7757 is not set
168# CONFIG_CPU_SUBTYPE_SH7763 is not set 184# CONFIG_CPU_SUBTYPE_SH7763 is not set
169# CONFIG_CPU_SUBTYPE_SH7770 is not set 185# CONFIG_CPU_SUBTYPE_SH7770 is not set
170# CONFIG_CPU_SUBTYPE_SH7780 is not set 186# CONFIG_CPU_SUBTYPE_SH7780 is not set
@@ -210,6 +226,7 @@ CONFIG_ZONE_DMA_FLAG=0
210CONFIG_NR_QUICK=2 226CONFIG_NR_QUICK=2
211CONFIG_HAVE_MLOCK=y 227CONFIG_HAVE_MLOCK=y
212CONFIG_HAVE_MLOCKED_PAGE_BIT=y 228CONFIG_HAVE_MLOCKED_PAGE_BIT=y
229# CONFIG_KSM is not set
213CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 230CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
214 231
215# 232#
@@ -295,7 +312,8 @@ CONFIG_ZERO_PAGE_OFFSET=0x00010000
295CONFIG_BOOT_LINK_OFFSET=0x00800000 312CONFIG_BOOT_LINK_OFFSET=0x00800000
296CONFIG_ENTRY_OFFSET=0x00001000 313CONFIG_ENTRY_OFFSET=0x00001000
297# CONFIG_UBC_WAKEUP is not set 314# CONFIG_UBC_WAKEUP is not set
298CONFIG_CMDLINE_BOOL=y 315CONFIG_CMDLINE_OVERWRITE=y
316# CONFIG_CMDLINE_EXTEND is not set
299CONFIG_CMDLINE="console=ttySC1,38400" 317CONFIG_CMDLINE="console=ttySC1,38400"
300 318
301# 319#
@@ -382,6 +400,7 @@ CONFIG_IP_NF_QUEUE=y
382# CONFIG_IP_NF_ARPTABLES is not set 400# CONFIG_IP_NF_ARPTABLES is not set
383# CONFIG_IP_DCCP is not set 401# CONFIG_IP_DCCP is not set
384# CONFIG_IP_SCTP is not set 402# CONFIG_IP_SCTP is not set
403# CONFIG_RDS is not set
385# CONFIG_TIPC is not set 404# CONFIG_TIPC is not set
386# CONFIG_ATM is not set 405# CONFIG_ATM is not set
387# CONFIG_BRIDGE is not set 406# CONFIG_BRIDGE is not set
@@ -411,6 +430,7 @@ CONFIG_IP_NF_QUEUE=y
411# CONFIG_AF_RXRPC is not set 430# CONFIG_AF_RXRPC is not set
412CONFIG_WIRELESS=y 431CONFIG_WIRELESS=y
413# CONFIG_CFG80211 is not set 432# CONFIG_CFG80211 is not set
433CONFIG_CFG80211_DEFAULT_PS_VALUE=0
414# CONFIG_WIRELESS_OLD_REGULATORY is not set 434# CONFIG_WIRELESS_OLD_REGULATORY is not set
415# CONFIG_WIRELESS_EXT is not set 435# CONFIG_WIRELESS_EXT is not set
416# CONFIG_LIB80211 is not set 436# CONFIG_LIB80211 is not set
@@ -418,7 +438,6 @@ CONFIG_WIRELESS=y
418# 438#
419# CFG80211 needs to be enabled for MAC80211 439# CFG80211 needs to be enabled for MAC80211
420# 440#
421CONFIG_MAC80211_DEFAULT_PS_VALUE=0
422# CONFIG_WIMAX is not set 441# CONFIG_WIMAX is not set
423# CONFIG_RFKILL is not set 442# CONFIG_RFKILL is not set
424# CONFIG_NET_9P is not set 443# CONFIG_NET_9P is not set
@@ -436,9 +455,9 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
436# CONFIG_CONNECTOR is not set 455# CONFIG_CONNECTOR is not set
437CONFIG_MTD=y 456CONFIG_MTD=y
438# CONFIG_MTD_DEBUG is not set 457# CONFIG_MTD_DEBUG is not set
458# CONFIG_MTD_TESTS is not set
439# CONFIG_MTD_CONCAT is not set 459# CONFIG_MTD_CONCAT is not set
440CONFIG_MTD_PARTITIONS=y 460CONFIG_MTD_PARTITIONS=y
441# CONFIG_MTD_TESTS is not set
442# CONFIG_MTD_REDBOOT_PARTS is not set 461# CONFIG_MTD_REDBOOT_PARTS is not set
443# CONFIG_MTD_CMDLINE_PARTS is not set 462# CONFIG_MTD_CMDLINE_PARTS is not set
444# CONFIG_MTD_AR7_PARTS is not set 463# CONFIG_MTD_AR7_PARTS is not set
@@ -574,10 +593,7 @@ CONFIG_MII=y
574# CONFIG_KS8842 is not set 593# CONFIG_KS8842 is not set
575CONFIG_NETDEV_1000=y 594CONFIG_NETDEV_1000=y
576CONFIG_NETDEV_10000=y 595CONFIG_NETDEV_10000=y
577 596CONFIG_WLAN=y
578#
579# Wireless LAN
580#
581# CONFIG_WLAN_PRE80211 is not set 597# CONFIG_WLAN_PRE80211 is not set
582# CONFIG_WLAN_80211 is not set 598# CONFIG_WLAN_80211 is not set
583 599
@@ -632,10 +648,20 @@ CONFIG_HW_RANDOM=y
632# CONFIG_TCG_TPM is not set 648# CONFIG_TCG_TPM is not set
633# CONFIG_I2C is not set 649# CONFIG_I2C is not set
634# CONFIG_SPI is not set 650# CONFIG_SPI is not set
651
652#
653# PPS support
654#
655# CONFIG_PPS is not set
635# CONFIG_W1 is not set 656# CONFIG_W1 is not set
636# CONFIG_POWER_SUPPLY is not set 657# CONFIG_POWER_SUPPLY is not set
637CONFIG_HWMON=y 658CONFIG_HWMON=y
638# CONFIG_HWMON_VID is not set 659# CONFIG_HWMON_VID is not set
660# CONFIG_HWMON_DEBUG_CHIP is not set
661
662#
663# Native drivers
664#
639# CONFIG_SENSORS_F71805F is not set 665# CONFIG_SENSORS_F71805F is not set
640# CONFIG_SENSORS_F71882FG is not set 666# CONFIG_SENSORS_F71882FG is not set
641# CONFIG_SENSORS_IT87 is not set 667# CONFIG_SENSORS_IT87 is not set
@@ -646,9 +672,7 @@ CONFIG_HWMON=y
646# CONFIG_SENSORS_VT1211 is not set 672# CONFIG_SENSORS_VT1211 is not set
647# CONFIG_SENSORS_W83627HF is not set 673# CONFIG_SENSORS_W83627HF is not set
648# CONFIG_SENSORS_W83627EHF is not set 674# CONFIG_SENSORS_W83627EHF is not set
649# CONFIG_HWMON_DEBUG_CHIP is not set
650# CONFIG_THERMAL is not set 675# CONFIG_THERMAL is not set
651# CONFIG_THERMAL_HWMON is not set
652CONFIG_WATCHDOG=y 676CONFIG_WATCHDOG=y
653# CONFIG_WATCHDOG_NOWAYOUT is not set 677# CONFIG_WATCHDOG_NOWAYOUT is not set
654 678
@@ -734,8 +758,10 @@ CONFIG_EXT2_FS=y
734# CONFIG_JFS_FS is not set 758# CONFIG_JFS_FS is not set
735# CONFIG_FS_POSIX_ACL is not set 759# CONFIG_FS_POSIX_ACL is not set
736# CONFIG_XFS_FS is not set 760# CONFIG_XFS_FS is not set
761# CONFIG_GFS2_FS is not set
737# CONFIG_OCFS2_FS is not set 762# CONFIG_OCFS2_FS is not set
738# CONFIG_BTRFS_FS is not set 763# CONFIG_BTRFS_FS is not set
764# CONFIG_NILFS2_FS is not set
739CONFIG_FILE_LOCKING=y 765CONFIG_FILE_LOCKING=y
740CONFIG_FSNOTIFY=y 766CONFIG_FSNOTIFY=y
741CONFIG_DNOTIFY=y 767CONFIG_DNOTIFY=y
@@ -806,7 +832,6 @@ CONFIG_JFFS2_RTIME=y
806# CONFIG_ROMFS_FS is not set 832# CONFIG_ROMFS_FS is not set
807# CONFIG_SYSV_FS is not set 833# CONFIG_SYSV_FS is not set
808# CONFIG_UFS_FS is not set 834# CONFIG_UFS_FS is not set
809# CONFIG_NILFS2_FS is not set
810CONFIG_NETWORK_FILESYSTEMS=y 835CONFIG_NETWORK_FILESYSTEMS=y
811# CONFIG_NFS_FS is not set 836# CONFIG_NFS_FS is not set
812# CONFIG_NFSD is not set 837# CONFIG_NFSD is not set
@@ -833,6 +858,7 @@ CONFIG_ENABLE_WARN_DEPRECATED=y
833CONFIG_ENABLE_MUST_CHECK=y 858CONFIG_ENABLE_MUST_CHECK=y
834CONFIG_FRAME_WARN=1024 859CONFIG_FRAME_WARN=1024
835# CONFIG_MAGIC_SYSRQ is not set 860# CONFIG_MAGIC_SYSRQ is not set
861# CONFIG_STRIP_ASM_SYMS is not set
836# CONFIG_UNUSED_SYMBOLS is not set 862# CONFIG_UNUSED_SYMBOLS is not set
837# CONFIG_DEBUG_FS is not set 863# CONFIG_DEBUG_FS is not set
838# CONFIG_HEADERS_CHECK is not set 864# CONFIG_HEADERS_CHECK is not set
@@ -842,8 +868,11 @@ CONFIG_FRAME_WARN=1024
842# CONFIG_RCU_CPU_STALL_DETECTOR is not set 868# CONFIG_RCU_CPU_STALL_DETECTOR is not set
843# CONFIG_LATENCYTOP is not set 869# CONFIG_LATENCYTOP is not set
844CONFIG_HAVE_FUNCTION_TRACER=y 870CONFIG_HAVE_FUNCTION_TRACER=y
871CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
872CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
845CONFIG_HAVE_DYNAMIC_FTRACE=y 873CONFIG_HAVE_DYNAMIC_FTRACE=y
846CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 874CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
875CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
847CONFIG_TRACING_SUPPORT=y 876CONFIG_TRACING_SUPPORT=y
848# CONFIG_FTRACE is not set 877# CONFIG_FTRACE is not set
849# CONFIG_DMA_API_DEBUG is not set 878# CONFIG_DMA_API_DEBUG is not set
@@ -851,6 +880,7 @@ CONFIG_TRACING_SUPPORT=y
851CONFIG_HAVE_ARCH_KGDB=y 880CONFIG_HAVE_ARCH_KGDB=y
852# CONFIG_SH_STANDARD_BIOS is not set 881# CONFIG_SH_STANDARD_BIOS is not set
853# CONFIG_EARLY_SCIF_CONSOLE is not set 882# CONFIG_EARLY_SCIF_CONSOLE is not set
883# CONFIG_DWARF_UNWINDER is not set
854 884
855# 885#
856# Security options 886# Security options
@@ -864,7 +894,6 @@ CONFIG_CRYPTO=y
864# 894#
865# Crypto core or helper 895# Crypto core or helper
866# 896#
867# CONFIG_CRYPTO_FIPS is not set
868# CONFIG_CRYPTO_MANAGER is not set 897# CONFIG_CRYPTO_MANAGER is not set
869# CONFIG_CRYPTO_MANAGER2 is not set 898# CONFIG_CRYPTO_MANAGER2 is not set
870# CONFIG_CRYPTO_GF128MUL is not set 899# CONFIG_CRYPTO_GF128MUL is not set
@@ -896,11 +925,13 @@ CONFIG_CRYPTO=y
896# 925#
897# CONFIG_CRYPTO_HMAC is not set 926# CONFIG_CRYPTO_HMAC is not set
898# CONFIG_CRYPTO_XCBC is not set 927# CONFIG_CRYPTO_XCBC is not set
928# CONFIG_CRYPTO_VMAC is not set
899 929
900# 930#
901# Digest 931# Digest
902# 932#
903# CONFIG_CRYPTO_CRC32C is not set 933# CONFIG_CRYPTO_CRC32C is not set
934# CONFIG_CRYPTO_GHASH is not set
904# CONFIG_CRYPTO_MD4 is not set 935# CONFIG_CRYPTO_MD4 is not set
905# CONFIG_CRYPTO_MD5 is not set 936# CONFIG_CRYPTO_MD5 is not set
906# CONFIG_CRYPTO_MICHAEL_MIC is not set 937# CONFIG_CRYPTO_MICHAEL_MIC is not set
@@ -965,5 +996,6 @@ CONFIG_DECOMPRESS_GZIP=y
965CONFIG_HAS_IOMEM=y 996CONFIG_HAS_IOMEM=y
966CONFIG_HAS_IOPORT=y 997CONFIG_HAS_IOPORT=y
967CONFIG_HAS_DMA=y 998CONFIG_HAS_DMA=y
999CONFIG_HAVE_LMB=y
968CONFIG_NLATTR=y 1000CONFIG_NLATTR=y
969CONFIG_GENERIC_ATOMIC64=y 1001CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/se7780_defconfig b/arch/sh/configs/se7780_defconfig
index 756beec5fb28..82baeef40a96 100644
--- a/arch/sh/configs/se7780_defconfig
+++ b/arch/sh/configs/se7780_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.30 3# Linux kernel version: 2.6.31
4# Thu Jun 18 13:03:56 2009 4# Thu Sep 24 19:03:59 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -14,6 +14,7 @@ CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y 14CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
16CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_IRQ_PER_CPU=y
17# CONFIG_GENERIC_GPIO is not set 18# CONFIG_GENERIC_GPIO is not set
18CONFIG_GENERIC_TIME=y 19CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 20CONFIG_GENERIC_CLOCKEVENTS=y
@@ -28,7 +29,9 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
28# CONFIG_ARCH_HAS_ILOG2_U64 is not set 29# CONFIG_ARCH_HAS_ILOG2_U64 is not set
29CONFIG_ARCH_NO_VIRT_TO_BUS=y 30CONFIG_ARCH_NO_VIRT_TO_BUS=y
30CONFIG_ARCH_HAS_DEFAULT_IDLE=y 31CONFIG_ARCH_HAS_DEFAULT_IDLE=y
32CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
31CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 33CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
34CONFIG_CONSTRUCTORS=y
32 35
33# 36#
34# General setup 37# General setup
@@ -38,6 +41,12 @@ CONFIG_BROKEN_ON_SMP=y
38CONFIG_INIT_ENV_ARG_LIMIT=32 41CONFIG_INIT_ENV_ARG_LIMIT=32
39CONFIG_LOCALVERSION="" 42CONFIG_LOCALVERSION=""
40CONFIG_LOCALVERSION_AUTO=y 43CONFIG_LOCALVERSION_AUTO=y
44CONFIG_HAVE_KERNEL_GZIP=y
45CONFIG_HAVE_KERNEL_BZIP2=y
46CONFIG_HAVE_KERNEL_LZMA=y
47CONFIG_KERNEL_GZIP=y
48# CONFIG_KERNEL_BZIP2 is not set
49# CONFIG_KERNEL_LZMA is not set
41# CONFIG_SWAP is not set 50# CONFIG_SWAP is not set
42CONFIG_SYSVIPC=y 51CONFIG_SYSVIPC=y
43CONFIG_SYSVIPC_SYSCTL=y 52CONFIG_SYSVIPC_SYSCTL=y
@@ -48,11 +57,12 @@ CONFIG_SYSVIPC_SYSCTL=y
48# 57#
49# RCU Subsystem 58# RCU Subsystem
50# 59#
51CONFIG_CLASSIC_RCU=y 60CONFIG_TREE_RCU=y
52# CONFIG_TREE_RCU is not set 61# CONFIG_TREE_PREEMPT_RCU is not set
53# CONFIG_PREEMPT_RCU is not set 62# CONFIG_RCU_TRACE is not set
63CONFIG_RCU_FANOUT=32
64# CONFIG_RCU_FANOUT_EXACT is not set
54# CONFIG_TREE_RCU_TRACE is not set 65# CONFIG_TREE_RCU_TRACE is not set
55# CONFIG_PREEMPT_RCU_TRACE is not set
56CONFIG_IKCONFIG=y 66CONFIG_IKCONFIG=y
57CONFIG_IKCONFIG_PROC=y 67CONFIG_IKCONFIG_PROC=y
58CONFIG_LOG_BUF_SHIFT=14 68CONFIG_LOG_BUF_SHIFT=14
@@ -81,19 +91,20 @@ CONFIG_TIMERFD=y
81CONFIG_EVENTFD=y 91CONFIG_EVENTFD=y
82CONFIG_SHMEM=y 92CONFIG_SHMEM=y
83CONFIG_AIO=y 93CONFIG_AIO=y
94CONFIG_HAVE_PERF_EVENTS=y
84 95
85# 96#
86# Performance Counters 97# Kernel Performance Events And Counters
87# 98#
99# CONFIG_PERF_EVENTS is not set
100# CONFIG_PERF_COUNTERS is not set
88CONFIG_VM_EVENT_COUNTERS=y 101CONFIG_VM_EVENT_COUNTERS=y
89CONFIG_PCI_QUIRKS=y 102CONFIG_PCI_QUIRKS=y
90# CONFIG_STRIP_ASM_SYMS is not set
91CONFIG_COMPAT_BRK=y 103CONFIG_COMPAT_BRK=y
92CONFIG_SLAB=y 104CONFIG_SLAB=y
93# CONFIG_SLUB is not set 105# CONFIG_SLUB is not set
94# CONFIG_SLOB is not set 106# CONFIG_SLOB is not set
95# CONFIG_PROFILING is not set 107# CONFIG_PROFILING is not set
96# CONFIG_MARKERS is not set
97CONFIG_HAVE_OPROFILE=y 108CONFIG_HAVE_OPROFILE=y
98CONFIG_HAVE_IOREMAP_PROT=y 109CONFIG_HAVE_IOREMAP_PROT=y
99CONFIG_HAVE_KPROBES=y 110CONFIG_HAVE_KPROBES=y
@@ -101,6 +112,11 @@ CONFIG_HAVE_KRETPROBES=y
101CONFIG_HAVE_ARCH_TRACEHOOK=y 112CONFIG_HAVE_ARCH_TRACEHOOK=y
102CONFIG_HAVE_CLK=y 113CONFIG_HAVE_CLK=y
103CONFIG_HAVE_DMA_API_DEBUG=y 114CONFIG_HAVE_DMA_API_DEBUG=y
115
116#
117# GCOV-based kernel profiling
118#
119# CONFIG_GCOV_KERNEL is not set
104# CONFIG_SLOW_WORK is not set 120# CONFIG_SLOW_WORK is not set
105CONFIG_HAVE_GENERIC_DMA_COHERENT=y 121CONFIG_HAVE_GENERIC_DMA_COHERENT=y
106CONFIG_SLABINFO=y 122CONFIG_SLABINFO=y
@@ -112,7 +128,8 @@ CONFIG_MODULE_UNLOAD=y
112# CONFIG_MODVERSIONS is not set 128# CONFIG_MODVERSIONS is not set
113# CONFIG_MODULE_SRCVERSION_ALL is not set 129# CONFIG_MODULE_SRCVERSION_ALL is not set
114CONFIG_BLOCK=y 130CONFIG_BLOCK=y
115# CONFIG_LBD is not set 131CONFIG_LBDAF=y
132CONFIG_BLK_DEV_BSG=y
116# CONFIG_BLK_DEV_INTEGRITY is not set 133# CONFIG_BLK_DEV_INTEGRITY is not set
117 134
118# 135#
@@ -159,6 +176,7 @@ CONFIG_CPU_SH4A=y
159# CONFIG_CPU_SUBTYPE_SH4_202 is not set 176# CONFIG_CPU_SUBTYPE_SH4_202 is not set
160# CONFIG_CPU_SUBTYPE_SH7723 is not set 177# CONFIG_CPU_SUBTYPE_SH7723 is not set
161# CONFIG_CPU_SUBTYPE_SH7724 is not set 178# CONFIG_CPU_SUBTYPE_SH7724 is not set
179# CONFIG_CPU_SUBTYPE_SH7757 is not set
162# CONFIG_CPU_SUBTYPE_SH7763 is not set 180# CONFIG_CPU_SUBTYPE_SH7763 is not set
163# CONFIG_CPU_SUBTYPE_SH7770 is not set 181# CONFIG_CPU_SUBTYPE_SH7770 is not set
164CONFIG_CPU_SUBTYPE_SH7780=y 182CONFIG_CPU_SUBTYPE_SH7780=y
@@ -199,7 +217,6 @@ CONFIG_SPARSEMEM_MANUAL=y
199CONFIG_SPARSEMEM=y 217CONFIG_SPARSEMEM=y
200CONFIG_HAVE_MEMORY_PRESENT=y 218CONFIG_HAVE_MEMORY_PRESENT=y
201CONFIG_SPARSEMEM_STATIC=y 219CONFIG_SPARSEMEM_STATIC=y
202CONFIG_PAGEFLAGS_EXTENDED=y
203CONFIG_SPLIT_PTLOCK_CPUS=4 220CONFIG_SPLIT_PTLOCK_CPUS=4
204CONFIG_MIGRATION=y 221CONFIG_MIGRATION=y
205# CONFIG_PHYS_ADDR_T_64BIT is not set 222# CONFIG_PHYS_ADDR_T_64BIT is not set
@@ -207,6 +224,7 @@ CONFIG_ZONE_DMA_FLAG=0
207CONFIG_NR_QUICK=2 224CONFIG_NR_QUICK=2
208CONFIG_HAVE_MLOCK=y 225CONFIG_HAVE_MLOCK=y
209CONFIG_HAVE_MLOCKED_PAGE_BIT=y 226CONFIG_HAVE_MLOCKED_PAGE_BIT=y
227# CONFIG_KSM is not set
210CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 228CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
211 229
212# 230#
@@ -287,8 +305,9 @@ CONFIG_GUSA=y
287CONFIG_ZERO_PAGE_OFFSET=0x00001000 305CONFIG_ZERO_PAGE_OFFSET=0x00001000
288CONFIG_BOOT_LINK_OFFSET=0x00810000 306CONFIG_BOOT_LINK_OFFSET=0x00810000
289CONFIG_ENTRY_OFFSET=0x00001000 307CONFIG_ENTRY_OFFSET=0x00001000
290CONFIG_CMDLINE_BOOL=y 308CONFIG_CMDLINE_OVERWRITE=y
291CONFIG_CMDLINE="console=ttySC0.115200 root=/dev/sda1" 309# CONFIG_CMDLINE_EXTEND is not set
310CONFIG_CMDLINE="console=ttySC0,115200 root=/dev/sda1"
292 311
293# 312#
294# Bus options 313# Bus options
@@ -382,6 +401,7 @@ CONFIG_IPV6=y
382# CONFIG_BT is not set 401# CONFIG_BT is not set
383CONFIG_WIRELESS=y 402CONFIG_WIRELESS=y
384# CONFIG_CFG80211 is not set 403# CONFIG_CFG80211 is not set
404CONFIG_CFG80211_DEFAULT_PS_VALUE=0
385# CONFIG_WIRELESS_OLD_REGULATORY is not set 405# CONFIG_WIRELESS_OLD_REGULATORY is not set
386# CONFIG_WIRELESS_EXT is not set 406# CONFIG_WIRELESS_EXT is not set
387# CONFIG_LIB80211 is not set 407# CONFIG_LIB80211 is not set
@@ -389,7 +409,6 @@ CONFIG_WIRELESS=y
389# 409#
390# CFG80211 needs to be enabled for MAC80211 410# CFG80211 needs to be enabled for MAC80211
391# 411#
392CONFIG_MAC80211_DEFAULT_PS_VALUE=0
393# CONFIG_WIMAX is not set 412# CONFIG_WIMAX is not set
394# CONFIG_RFKILL is not set 413# CONFIG_RFKILL is not set
395 414
@@ -406,9 +425,9 @@ CONFIG_STANDALONE=y
406# CONFIG_CONNECTOR is not set 425# CONFIG_CONNECTOR is not set
407CONFIG_MTD=y 426CONFIG_MTD=y
408# CONFIG_MTD_DEBUG is not set 427# CONFIG_MTD_DEBUG is not set
428# CONFIG_MTD_TESTS is not set
409# CONFIG_MTD_CONCAT is not set 429# CONFIG_MTD_CONCAT is not set
410CONFIG_MTD_PARTITIONS=y 430CONFIG_MTD_PARTITIONS=y
411# CONFIG_MTD_TESTS is not set
412# CONFIG_MTD_REDBOOT_PARTS is not set 431# CONFIG_MTD_REDBOOT_PARTS is not set
413# CONFIG_MTD_CMDLINE_PARTS is not set 432# CONFIG_MTD_CMDLINE_PARTS is not set
414# CONFIG_MTD_AR7_PARTS is not set 433# CONFIG_MTD_AR7_PARTS is not set
@@ -549,6 +568,7 @@ CONFIG_SCSI_WAIT_SCAN=m
549# CONFIG_SCSI_SPI_ATTRS is not set 568# CONFIG_SCSI_SPI_ATTRS is not set
550# CONFIG_SCSI_FC_ATTRS is not set 569# CONFIG_SCSI_FC_ATTRS is not set
551# CONFIG_SCSI_ISCSI_ATTRS is not set 570# CONFIG_SCSI_ISCSI_ATTRS is not set
571# CONFIG_SCSI_SAS_ATTRS is not set
552# CONFIG_SCSI_SAS_LIBSAS is not set 572# CONFIG_SCSI_SAS_LIBSAS is not set
553# CONFIG_SCSI_SRP_ATTRS is not set 573# CONFIG_SCSI_SRP_ATTRS is not set
554CONFIG_SCSI_LOWLEVEL=y 574CONFIG_SCSI_LOWLEVEL=y
@@ -587,11 +607,13 @@ CONFIG_SCSI_LOWLEVEL=y
587# CONFIG_SCSI_DC390T is not set 607# CONFIG_SCSI_DC390T is not set
588# CONFIG_SCSI_NSP32 is not set 608# CONFIG_SCSI_NSP32 is not set
589# CONFIG_SCSI_DEBUG is not set 609# CONFIG_SCSI_DEBUG is not set
610# CONFIG_SCSI_PMCRAID is not set
590# CONFIG_SCSI_SRP is not set 611# CONFIG_SCSI_SRP is not set
591# CONFIG_SCSI_DH is not set 612# CONFIG_SCSI_DH is not set
592# CONFIG_SCSI_OSD_INITIATOR is not set 613# CONFIG_SCSI_OSD_INITIATOR is not set
593CONFIG_ATA=y 614CONFIG_ATA=y
594# CONFIG_ATA_NONSTANDARD is not set 615# CONFIG_ATA_NONSTANDARD is not set
616CONFIG_ATA_VERBOSE_ERROR=y
595CONFIG_SATA_PMP=y 617CONFIG_SATA_PMP=y
596# CONFIG_SATA_AHCI is not set 618# CONFIG_SATA_AHCI is not set
597# CONFIG_SATA_SIL24 is not set 619# CONFIG_SATA_SIL24 is not set
@@ -612,6 +634,7 @@ CONFIG_SATA_SIL=y
612# CONFIG_PATA_ALI is not set 634# CONFIG_PATA_ALI is not set
613# CONFIG_PATA_AMD is not set 635# CONFIG_PATA_AMD is not set
614# CONFIG_PATA_ARTOP is not set 636# CONFIG_PATA_ARTOP is not set
637# CONFIG_PATA_ATP867X is not set
615# CONFIG_PATA_ATIIXP is not set 638# CONFIG_PATA_ATIIXP is not set
616# CONFIG_PATA_CMD64X is not set 639# CONFIG_PATA_CMD64X is not set
617# CONFIG_PATA_CS5520 is not set 640# CONFIG_PATA_CS5520 is not set
@@ -630,6 +653,7 @@ CONFIG_SATA_SIL=y
630# CONFIG_PATA_NS87410 is not set 653# CONFIG_PATA_NS87410 is not set
631# CONFIG_PATA_NS87415 is not set 654# CONFIG_PATA_NS87415 is not set
632# CONFIG_PATA_PDC_OLD is not set 655# CONFIG_PATA_PDC_OLD is not set
656# CONFIG_PATA_RDC is not set
633# CONFIG_PATA_RZ1000 is not set 657# CONFIG_PATA_RZ1000 is not set
634# CONFIG_PATA_SC1200 is not set 658# CONFIG_PATA_SC1200 is not set
635# CONFIG_PATA_SERVERWORKS is not set 659# CONFIG_PATA_SERVERWORKS is not set
@@ -648,8 +672,13 @@ CONFIG_SATA_SIL=y
648# 672#
649 673
650# 674#
651# A new alternative FireWire stack is available with EXPERIMENTAL=y 675# You can enable one or both FireWire driver stacks.
652# 676#
677
678#
679# See the help texts for more information.
680#
681# CONFIG_FIREWIRE is not set
653# CONFIG_IEEE1394 is not set 682# CONFIG_IEEE1394 is not set
654# CONFIG_I2O is not set 683# CONFIG_I2O is not set
655CONFIG_NETDEVICES=y 684CONFIG_NETDEVICES=y
@@ -724,10 +753,7 @@ CONFIG_NET_PCI=y
724# CONFIG_NETDEV_1000 is not set 753# CONFIG_NETDEV_1000 is not set
725# CONFIG_NETDEV_10000 is not set 754# CONFIG_NETDEV_10000 is not set
726# CONFIG_TR is not set 755# CONFIG_TR is not set
727 756CONFIG_WLAN=y
728#
729# Wireless LAN
730#
731# CONFIG_WLAN_PRE80211 is not set 757# CONFIG_WLAN_PRE80211 is not set
732# CONFIG_WLAN_80211 is not set 758# CONFIG_WLAN_80211 is not set
733 759
@@ -821,10 +847,19 @@ CONFIG_UNIX98_PTYS=y
821CONFIG_DEVPORT=y 847CONFIG_DEVPORT=y
822# CONFIG_I2C is not set 848# CONFIG_I2C is not set
823# CONFIG_SPI is not set 849# CONFIG_SPI is not set
850
851#
852# PPS support
853#
824# CONFIG_W1 is not set 854# CONFIG_W1 is not set
825# CONFIG_POWER_SUPPLY is not set 855# CONFIG_POWER_SUPPLY is not set
826CONFIG_HWMON=y 856CONFIG_HWMON=y
827# CONFIG_HWMON_VID is not set 857# CONFIG_HWMON_VID is not set
858# CONFIG_HWMON_DEBUG_CHIP is not set
859
860#
861# Native drivers
862#
828# CONFIG_SENSORS_IT87 is not set 863# CONFIG_SENSORS_IT87 is not set
829# CONFIG_SENSORS_PC87360 is not set 864# CONFIG_SENSORS_PC87360 is not set
830# CONFIG_SENSORS_SIS5595 is not set 865# CONFIG_SENSORS_SIS5595 is not set
@@ -833,7 +868,6 @@ CONFIG_HWMON=y
833# CONFIG_SENSORS_VT8231 is not set 868# CONFIG_SENSORS_VT8231 is not set
834# CONFIG_SENSORS_W83627HF is not set 869# CONFIG_SENSORS_W83627HF is not set
835# CONFIG_SENSORS_W83627EHF is not set 870# CONFIG_SENSORS_W83627EHF is not set
836# CONFIG_HWMON_DEBUG_CHIP is not set
837CONFIG_THERMAL=y 871CONFIG_THERMAL=y
838# CONFIG_THERMAL_HWMON is not set 872# CONFIG_THERMAL_HWMON is not set
839# CONFIG_WATCHDOG is not set 873# CONFIG_WATCHDOG is not set
@@ -857,6 +891,7 @@ CONFIG_SSB_POSSIBLE=y
857# 891#
858# Graphics support 892# Graphics support
859# 893#
894CONFIG_VGA_ARB=y
860# CONFIG_DRM is not set 895# CONFIG_DRM is not set
861# CONFIG_VGASTATE is not set 896# CONFIG_VGASTATE is not set
862# CONFIG_VIDEO_OUTPUT_CONTROL is not set 897# CONFIG_VIDEO_OUTPUT_CONTROL is not set
@@ -937,11 +972,11 @@ CONFIG_LOGO_LINUX_CLUT224=y
937CONFIG_LOGO_SUPERH_CLUT224=y 972CONFIG_LOGO_SUPERH_CLUT224=y
938CONFIG_SOUND=y 973CONFIG_SOUND=y
939CONFIG_SOUND_OSS_CORE=y 974CONFIG_SOUND_OSS_CORE=y
975CONFIG_SOUND_OSS_CORE_PRECLAIM=y
940# CONFIG_SND is not set 976# CONFIG_SND is not set
941CONFIG_SOUND_PRIME=y 977CONFIG_SOUND_PRIME=y
942CONFIG_HID_SUPPORT=y 978CONFIG_HID_SUPPORT=y
943CONFIG_HID=y 979CONFIG_HID=y
944# CONFIG_HID_DEBUG is not set
945# CONFIG_HIDRAW is not set 980# CONFIG_HIDRAW is not set
946 981
947# 982#
@@ -964,6 +999,7 @@ CONFIG_HID_CYPRESS=y
964CONFIG_HID_EZKEY=y 999CONFIG_HID_EZKEY=y
965# CONFIG_HID_KYE is not set 1000# CONFIG_HID_KYE is not set
966CONFIG_HID_GYRATION=y 1001CONFIG_HID_GYRATION=y
1002# CONFIG_HID_TWINHAN is not set
967# CONFIG_HID_KENSINGTON is not set 1003# CONFIG_HID_KENSINGTON is not set
968CONFIG_HID_LOGITECH=y 1004CONFIG_HID_LOGITECH=y
969# CONFIG_LOGITECH_FF is not set 1005# CONFIG_LOGITECH_FF is not set
@@ -1009,6 +1045,7 @@ CONFIG_USB_EHCI_HCD=y
1009# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1045# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1010# CONFIG_USB_OXU210HP_HCD is not set 1046# CONFIG_USB_OXU210HP_HCD is not set
1011# CONFIG_USB_ISP116X_HCD is not set 1047# CONFIG_USB_ISP116X_HCD is not set
1048# CONFIG_USB_ISP1362_HCD is not set
1012CONFIG_USB_OHCI_HCD=y 1049CONFIG_USB_OHCI_HCD=y
1013# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set 1050# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
1014# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set 1051# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
@@ -1243,6 +1280,7 @@ CONFIG_ENABLE_WARN_DEPRECATED=y
1243CONFIG_ENABLE_MUST_CHECK=y 1280CONFIG_ENABLE_MUST_CHECK=y
1244CONFIG_FRAME_WARN=1024 1281CONFIG_FRAME_WARN=1024
1245# CONFIG_MAGIC_SYSRQ is not set 1282# CONFIG_MAGIC_SYSRQ is not set
1283# CONFIG_STRIP_ASM_SYMS is not set
1246# CONFIG_UNUSED_SYMBOLS is not set 1284# CONFIG_UNUSED_SYMBOLS is not set
1247CONFIG_DEBUG_FS=y 1285CONFIG_DEBUG_FS=y
1248# CONFIG_HEADERS_CHECK is not set 1286# CONFIG_HEADERS_CHECK is not set
@@ -1253,8 +1291,11 @@ CONFIG_DEBUG_FS=y
1253# CONFIG_LATENCYTOP is not set 1291# CONFIG_LATENCYTOP is not set
1254# CONFIG_SYSCTL_SYSCALL_CHECK is not set 1292# CONFIG_SYSCTL_SYSCALL_CHECK is not set
1255CONFIG_HAVE_FUNCTION_TRACER=y 1293CONFIG_HAVE_FUNCTION_TRACER=y
1294CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1295CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
1256CONFIG_HAVE_DYNAMIC_FTRACE=y 1296CONFIG_HAVE_DYNAMIC_FTRACE=y
1257CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1297CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1298CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
1258CONFIG_TRACING_SUPPORT=y 1299CONFIG_TRACING_SUPPORT=y
1259# CONFIG_FTRACE is not set 1300# CONFIG_FTRACE is not set
1260# CONFIG_DYNAMIC_DEBUG is not set 1301# CONFIG_DYNAMIC_DEBUG is not set
@@ -1263,6 +1304,7 @@ CONFIG_TRACING_SUPPORT=y
1263CONFIG_HAVE_ARCH_KGDB=y 1304CONFIG_HAVE_ARCH_KGDB=y
1264# CONFIG_SH_STANDARD_BIOS is not set 1305# CONFIG_SH_STANDARD_BIOS is not set
1265# CONFIG_EARLY_SCIF_CONSOLE is not set 1306# CONFIG_EARLY_SCIF_CONSOLE is not set
1307# CONFIG_DWARF_UNWINDER is not set
1266 1308
1267# 1309#
1268# Security options 1310# Security options
@@ -1276,7 +1318,6 @@ CONFIG_CRYPTO=y
1276# 1318#
1277# Crypto core or helper 1319# Crypto core or helper
1278# 1320#
1279# CONFIG_CRYPTO_FIPS is not set
1280# CONFIG_CRYPTO_MANAGER is not set 1321# CONFIG_CRYPTO_MANAGER is not set
1281# CONFIG_CRYPTO_MANAGER2 is not set 1322# CONFIG_CRYPTO_MANAGER2 is not set
1282# CONFIG_CRYPTO_NULL is not set 1323# CONFIG_CRYPTO_NULL is not set
@@ -1309,6 +1350,7 @@ CONFIG_CRYPTO=y
1309# Digest 1350# Digest
1310# 1351#
1311# CONFIG_CRYPTO_CRC32C is not set 1352# CONFIG_CRYPTO_CRC32C is not set
1353# CONFIG_CRYPTO_GHASH is not set
1312# CONFIG_CRYPTO_MD4 is not set 1354# CONFIG_CRYPTO_MD4 is not set
1313# CONFIG_CRYPTO_MD5 is not set 1355# CONFIG_CRYPTO_MD5 is not set
1314# CONFIG_CRYPTO_MICHAEL_MIC is not set 1356# CONFIG_CRYPTO_MICHAEL_MIC is not set
@@ -1371,5 +1413,6 @@ CONFIG_ZLIB_INFLATE=y
1371CONFIG_HAS_IOMEM=y 1413CONFIG_HAS_IOMEM=y
1372CONFIG_HAS_IOPORT=y 1414CONFIG_HAS_IOPORT=y
1373CONFIG_HAS_DMA=y 1415CONFIG_HAS_DMA=y
1416CONFIG_HAVE_LMB=y
1374CONFIG_NLATTR=y 1417CONFIG_NLATTR=y
1375CONFIG_GENERIC_ATOMIC64=y 1418CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/sh03_defconfig b/arch/sh/configs/sh03_defconfig
index 7fedaaee861d..dd0e8900afb7 100644
--- a/arch/sh/configs/sh03_defconfig
+++ b/arch/sh/configs/sh03_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.30 3# Linux kernel version: 2.6.31
4# Thu Jun 18 13:04:41 2009 4# Thu Sep 24 19:07:14 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -14,6 +14,7 @@ CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y 14CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
16CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_IRQ_PER_CPU=y
17# CONFIG_GENERIC_GPIO is not set 18# CONFIG_GENERIC_GPIO is not set
18CONFIG_GENERIC_TIME=y 19CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 20CONFIG_GENERIC_CLOCKEVENTS=y
@@ -29,7 +30,9 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
29# CONFIG_ARCH_HAS_ILOG2_U64 is not set 30# CONFIG_ARCH_HAS_ILOG2_U64 is not set
30CONFIG_ARCH_NO_VIRT_TO_BUS=y 31CONFIG_ARCH_NO_VIRT_TO_BUS=y
31CONFIG_ARCH_HAS_DEFAULT_IDLE=y 32CONFIG_ARCH_HAS_DEFAULT_IDLE=y
33CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
32CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 34CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
35CONFIG_CONSTRUCTORS=y
33 36
34# 37#
35# General setup 38# General setup
@@ -40,6 +43,12 @@ CONFIG_LOCK_KERNEL=y
40CONFIG_INIT_ENV_ARG_LIMIT=32 43CONFIG_INIT_ENV_ARG_LIMIT=32
41CONFIG_LOCALVERSION="" 44CONFIG_LOCALVERSION=""
42CONFIG_LOCALVERSION_AUTO=y 45CONFIG_LOCALVERSION_AUTO=y
46CONFIG_HAVE_KERNEL_GZIP=y
47CONFIG_HAVE_KERNEL_BZIP2=y
48CONFIG_HAVE_KERNEL_LZMA=y
49CONFIG_KERNEL_GZIP=y
50# CONFIG_KERNEL_BZIP2 is not set
51# CONFIG_KERNEL_LZMA is not set
43CONFIG_SWAP=y 52CONFIG_SWAP=y
44CONFIG_SYSVIPC=y 53CONFIG_SYSVIPC=y
45CONFIG_SYSVIPC_SYSCTL=y 54CONFIG_SYSVIPC_SYSCTL=y
@@ -53,11 +62,12 @@ CONFIG_BSD_PROCESS_ACCT=y
53# 62#
54# RCU Subsystem 63# RCU Subsystem
55# 64#
56CONFIG_CLASSIC_RCU=y 65CONFIG_TREE_RCU=y
57# CONFIG_TREE_RCU is not set 66# CONFIG_TREE_PREEMPT_RCU is not set
58# CONFIG_PREEMPT_RCU is not set 67# CONFIG_RCU_TRACE is not set
68CONFIG_RCU_FANOUT=32
69# CONFIG_RCU_FANOUT_EXACT is not set
59# CONFIG_TREE_RCU_TRACE is not set 70# CONFIG_TREE_RCU_TRACE is not set
60# CONFIG_PREEMPT_RCU_TRACE is not set
61# CONFIG_IKCONFIG is not set 71# CONFIG_IKCONFIG is not set
62CONFIG_LOG_BUF_SHIFT=14 72CONFIG_LOG_BUF_SHIFT=14
63# CONFIG_GROUP_SCHED is not set 73# CONFIG_GROUP_SCHED is not set
@@ -91,20 +101,22 @@ CONFIG_TIMERFD=y
91CONFIG_EVENTFD=y 101CONFIG_EVENTFD=y
92CONFIG_SHMEM=y 102CONFIG_SHMEM=y
93CONFIG_AIO=y 103CONFIG_AIO=y
104CONFIG_HAVE_PERF_EVENTS=y
94 105
95# 106#
96# Performance Counters 107# Kernel Performance Events And Counters
97# 108#
109CONFIG_PERF_EVENTS=y
110CONFIG_EVENT_PROFILE=y
111# CONFIG_PERF_COUNTERS is not set
98CONFIG_VM_EVENT_COUNTERS=y 112CONFIG_VM_EVENT_COUNTERS=y
99CONFIG_PCI_QUIRKS=y 113CONFIG_PCI_QUIRKS=y
100# CONFIG_STRIP_ASM_SYMS is not set
101CONFIG_COMPAT_BRK=y 114CONFIG_COMPAT_BRK=y
102CONFIG_SLAB=y 115CONFIG_SLAB=y
103# CONFIG_SLUB is not set 116# CONFIG_SLUB is not set
104# CONFIG_SLOB is not set 117# CONFIG_SLOB is not set
105CONFIG_PROFILING=y 118CONFIG_PROFILING=y
106CONFIG_TRACEPOINTS=y 119CONFIG_TRACEPOINTS=y
107CONFIG_MARKERS=y
108CONFIG_OPROFILE=m 120CONFIG_OPROFILE=m
109CONFIG_HAVE_OPROFILE=y 121CONFIG_HAVE_OPROFILE=y
110# CONFIG_KPROBES is not set 122# CONFIG_KPROBES is not set
@@ -114,6 +126,11 @@ CONFIG_HAVE_KRETPROBES=y
114CONFIG_HAVE_ARCH_TRACEHOOK=y 126CONFIG_HAVE_ARCH_TRACEHOOK=y
115CONFIG_HAVE_CLK=y 127CONFIG_HAVE_CLK=y
116CONFIG_HAVE_DMA_API_DEBUG=y 128CONFIG_HAVE_DMA_API_DEBUG=y
129
130#
131# GCOV-based kernel profiling
132#
133# CONFIG_GCOV_KERNEL is not set
117# CONFIG_SLOW_WORK is not set 134# CONFIG_SLOW_WORK is not set
118CONFIG_HAVE_GENERIC_DMA_COHERENT=y 135CONFIG_HAVE_GENERIC_DMA_COHERENT=y
119CONFIG_SLABINFO=y 136CONFIG_SLABINFO=y
@@ -126,7 +143,7 @@ CONFIG_MODULE_FORCE_UNLOAD=y
126CONFIG_MODVERSIONS=y 143CONFIG_MODVERSIONS=y
127# CONFIG_MODULE_SRCVERSION_ALL is not set 144# CONFIG_MODULE_SRCVERSION_ALL is not set
128CONFIG_BLOCK=y 145CONFIG_BLOCK=y
129# CONFIG_LBD is not set 146CONFIG_LBDAF=y
130# CONFIG_BLK_DEV_BSG is not set 147# CONFIG_BLK_DEV_BSG is not set
131# CONFIG_BLK_DEV_INTEGRITY is not set 148# CONFIG_BLK_DEV_INTEGRITY is not set
132 149
@@ -173,6 +190,7 @@ CONFIG_CPU_SUBTYPE_SH7751=y
173# CONFIG_CPU_SUBTYPE_SH4_202 is not set 190# CONFIG_CPU_SUBTYPE_SH4_202 is not set
174# CONFIG_CPU_SUBTYPE_SH7723 is not set 191# CONFIG_CPU_SUBTYPE_SH7723 is not set
175# CONFIG_CPU_SUBTYPE_SH7724 is not set 192# CONFIG_CPU_SUBTYPE_SH7724 is not set
193# CONFIG_CPU_SUBTYPE_SH7757 is not set
176# CONFIG_CPU_SUBTYPE_SH7763 is not set 194# CONFIG_CPU_SUBTYPE_SH7763 is not set
177# CONFIG_CPU_SUBTYPE_SH7770 is not set 195# CONFIG_CPU_SUBTYPE_SH7770 is not set
178# CONFIG_CPU_SUBTYPE_SH7780 is not set 196# CONFIG_CPU_SUBTYPE_SH7780 is not set
@@ -218,6 +236,7 @@ CONFIG_ZONE_DMA_FLAG=0
218CONFIG_NR_QUICK=2 236CONFIG_NR_QUICK=2
219CONFIG_HAVE_MLOCK=y 237CONFIG_HAVE_MLOCK=y
220CONFIG_HAVE_MLOCKED_PAGE_BIT=y 238CONFIG_HAVE_MLOCKED_PAGE_BIT=y
239# CONFIG_KSM is not set
221CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 240CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
222 241
223# 242#
@@ -302,7 +321,8 @@ CONFIG_ZERO_PAGE_OFFSET=0x00004000
302CONFIG_BOOT_LINK_OFFSET=0x00800000 321CONFIG_BOOT_LINK_OFFSET=0x00800000
303CONFIG_ENTRY_OFFSET=0x00001000 322CONFIG_ENTRY_OFFSET=0x00001000
304# CONFIG_UBC_WAKEUP is not set 323# CONFIG_UBC_WAKEUP is not set
305CONFIG_CMDLINE_BOOL=y 324CONFIG_CMDLINE_OVERWRITE=y
325# CONFIG_CMDLINE_EXTEND is not set
306CONFIG_CMDLINE="console=ttySC1,115200 mem=64M root=/dev/nfs" 326CONFIG_CMDLINE="console=ttySC1,115200 mem=64M root=/dev/nfs"
307 327
308# 328#
@@ -382,6 +402,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
382# CONFIG_NETFILTER is not set 402# CONFIG_NETFILTER is not set
383# CONFIG_IP_DCCP is not set 403# CONFIG_IP_DCCP is not set
384# CONFIG_IP_SCTP is not set 404# CONFIG_IP_SCTP is not set
405# CONFIG_RDS is not set
385# CONFIG_TIPC is not set 406# CONFIG_TIPC is not set
386# CONFIG_ATM is not set 407# CONFIG_ATM is not set
387# CONFIG_BRIDGE is not set 408# CONFIG_BRIDGE is not set
@@ -412,6 +433,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
412# CONFIG_AF_RXRPC is not set 433# CONFIG_AF_RXRPC is not set
413CONFIG_WIRELESS=y 434CONFIG_WIRELESS=y
414# CONFIG_CFG80211 is not set 435# CONFIG_CFG80211 is not set
436CONFIG_CFG80211_DEFAULT_PS_VALUE=0
415# CONFIG_WIRELESS_OLD_REGULATORY is not set 437# CONFIG_WIRELESS_OLD_REGULATORY is not set
416# CONFIG_WIRELESS_EXT is not set 438# CONFIG_WIRELESS_EXT is not set
417# CONFIG_LIB80211 is not set 439# CONFIG_LIB80211 is not set
@@ -419,7 +441,6 @@ CONFIG_WIRELESS=y
419# 441#
420# CFG80211 needs to be enabled for MAC80211 442# CFG80211 needs to be enabled for MAC80211
421# 443#
422CONFIG_MAC80211_DEFAULT_PS_VALUE=0
423# CONFIG_WIMAX is not set 444# CONFIG_WIMAX is not set
424# CONFIG_RFKILL is not set 445# CONFIG_RFKILL is not set
425# CONFIG_NET_9P is not set 446# CONFIG_NET_9P is not set
@@ -432,6 +453,7 @@ CONFIG_MAC80211_DEFAULT_PS_VALUE=0
432# Generic Driver Options 453# Generic Driver Options
433# 454#
434CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 455CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
456# CONFIG_DEVTMPFS is not set
435# CONFIG_STANDALONE is not set 457# CONFIG_STANDALONE is not set
436# CONFIG_PREVENT_FIRMWARE_BUILD is not set 458# CONFIG_PREVENT_FIRMWARE_BUILD is not set
437# CONFIG_FW_LOADER is not set 459# CONFIG_FW_LOADER is not set
@@ -591,6 +613,7 @@ CONFIG_SCSI_LOWLEVEL=y
591# CONFIG_SCSI_DC390T is not set 613# CONFIG_SCSI_DC390T is not set
592# CONFIG_SCSI_NSP32 is not set 614# CONFIG_SCSI_NSP32 is not set
593# CONFIG_SCSI_DEBUG is not set 615# CONFIG_SCSI_DEBUG is not set
616# CONFIG_SCSI_PMCRAID is not set
594# CONFIG_SCSI_SRP is not set 617# CONFIG_SCSI_SRP is not set
595# CONFIG_SCSI_DH is not set 618# CONFIG_SCSI_DH is not set
596# CONFIG_SCSI_OSD_INITIATOR is not set 619# CONFIG_SCSI_OSD_INITIATOR is not set
@@ -603,7 +626,11 @@ CONFIG_SCSI_LOWLEVEL=y
603# 626#
604 627
605# 628#
606# Enable only one of the two stacks, unless you know what you are doing 629# You can enable one or both FireWire driver stacks.
630#
631
632#
633# See the help texts for more information.
607# 634#
608# CONFIG_FIREWIRE is not set 635# CONFIG_FIREWIRE is not set
609# CONFIG_IEEE1394 is not set 636# CONFIG_IEEE1394 is not set
@@ -679,6 +706,7 @@ CONFIG_NETDEV_1000=y
679# CONFIG_VIA_VELOCITY is not set 706# CONFIG_VIA_VELOCITY is not set
680# CONFIG_TIGON3 is not set 707# CONFIG_TIGON3 is not set
681# CONFIG_BNX2 is not set 708# CONFIG_BNX2 is not set
709# CONFIG_CNIC is not set
682# CONFIG_QLA3XXX is not set 710# CONFIG_QLA3XXX is not set
683# CONFIG_ATL1 is not set 711# CONFIG_ATL1 is not set
684# CONFIG_ATL1E is not set 712# CONFIG_ATL1E is not set
@@ -704,10 +732,7 @@ CONFIG_CHELSIO_T3_DEPENDS=y
704# CONFIG_SFC is not set 732# CONFIG_SFC is not set
705# CONFIG_BE2NET is not set 733# CONFIG_BE2NET is not set
706# CONFIG_TR is not set 734# CONFIG_TR is not set
707 735CONFIG_WLAN=y
708#
709# Wireless LAN
710#
711# CONFIG_WLAN_PRE80211 is not set 736# CONFIG_WLAN_PRE80211 is not set
712# CONFIG_WLAN_80211 is not set 737# CONFIG_WLAN_80211 is not set
713 738
@@ -804,10 +829,20 @@ CONFIG_HW_RANDOM=y
804CONFIG_DEVPORT=y 829CONFIG_DEVPORT=y
805# CONFIG_I2C is not set 830# CONFIG_I2C is not set
806# CONFIG_SPI is not set 831# CONFIG_SPI is not set
832
833#
834# PPS support
835#
836# CONFIG_PPS is not set
807# CONFIG_W1 is not set 837# CONFIG_W1 is not set
808# CONFIG_POWER_SUPPLY is not set 838# CONFIG_POWER_SUPPLY is not set
809CONFIG_HWMON=y 839CONFIG_HWMON=y
810# CONFIG_HWMON_VID is not set 840# CONFIG_HWMON_VID is not set
841# CONFIG_HWMON_DEBUG_CHIP is not set
842
843#
844# Native drivers
845#
811# CONFIG_SENSORS_I5K_AMB is not set 846# CONFIG_SENSORS_I5K_AMB is not set
812# CONFIG_SENSORS_F71805F is not set 847# CONFIG_SENSORS_F71805F is not set
813# CONFIG_SENSORS_F71882FG is not set 848# CONFIG_SENSORS_F71882FG is not set
@@ -822,9 +857,7 @@ CONFIG_HWMON=y
822# CONFIG_SENSORS_VT8231 is not set 857# CONFIG_SENSORS_VT8231 is not set
823# CONFIG_SENSORS_W83627HF is not set 858# CONFIG_SENSORS_W83627HF is not set
824# CONFIG_SENSORS_W83627EHF is not set 859# CONFIG_SENSORS_W83627EHF is not set
825# CONFIG_HWMON_DEBUG_CHIP is not set
826# CONFIG_THERMAL is not set 860# CONFIG_THERMAL is not set
827# CONFIG_THERMAL_HWMON is not set
828CONFIG_WATCHDOG=y 861CONFIG_WATCHDOG=y
829# CONFIG_WATCHDOG_NOWAYOUT is not set 862# CONFIG_WATCHDOG_NOWAYOUT is not set
830 863
@@ -861,6 +894,7 @@ CONFIG_SSB_POSSIBLE=y
861# 894#
862# Graphics support 895# Graphics support
863# 896#
897CONFIG_VGA_ARB=y
864# CONFIG_DRM is not set 898# CONFIG_DRM is not set
865# CONFIG_VGASTATE is not set 899# CONFIG_VGASTATE is not set
866# CONFIG_VIDEO_OUTPUT_CONTROL is not set 900# CONFIG_VIDEO_OUTPUT_CONTROL is not set
@@ -879,7 +913,6 @@ CONFIG_DUMMY_CONSOLE=y
879# CONFIG_SOUND is not set 913# CONFIG_SOUND is not set
880CONFIG_HID_SUPPORT=y 914CONFIG_HID_SUPPORT=y
881CONFIG_HID=y 915CONFIG_HID=y
882# CONFIG_HID_DEBUG is not set
883# CONFIG_HIDRAW is not set 916# CONFIG_HIDRAW is not set
884# CONFIG_HID_PID is not set 917# CONFIG_HID_PID is not set
885 918
@@ -944,8 +977,10 @@ CONFIG_FS_MBCACHE=y
944# CONFIG_JFS_FS is not set 977# CONFIG_JFS_FS is not set
945CONFIG_FS_POSIX_ACL=y 978CONFIG_FS_POSIX_ACL=y
946# CONFIG_XFS_FS is not set 979# CONFIG_XFS_FS is not set
980# CONFIG_GFS2_FS is not set
947# CONFIG_OCFS2_FS is not set 981# CONFIG_OCFS2_FS is not set
948# CONFIG_BTRFS_FS is not set 982# CONFIG_BTRFS_FS is not set
983# CONFIG_NILFS2_FS is not set
949CONFIG_FILE_LOCKING=y 984CONFIG_FILE_LOCKING=y
950CONFIG_FSNOTIFY=y 985CONFIG_FSNOTIFY=y
951CONFIG_DNOTIFY=y 986CONFIG_DNOTIFY=y
@@ -1011,12 +1046,12 @@ CONFIG_MISC_FILESYSTEMS=y
1011# CONFIG_ROMFS_FS is not set 1046# CONFIG_ROMFS_FS is not set
1012# CONFIG_SYSV_FS is not set 1047# CONFIG_SYSV_FS is not set
1013# CONFIG_UFS_FS is not set 1048# CONFIG_UFS_FS is not set
1014# CONFIG_NILFS2_FS is not set
1015CONFIG_NETWORK_FILESYSTEMS=y 1049CONFIG_NETWORK_FILESYSTEMS=y
1016CONFIG_NFS_FS=y 1050CONFIG_NFS_FS=y
1017CONFIG_NFS_V3=y 1051CONFIG_NFS_V3=y
1018# CONFIG_NFS_V3_ACL is not set 1052# CONFIG_NFS_V3_ACL is not set
1019CONFIG_NFS_V4=y 1053CONFIG_NFS_V4=y
1054# CONFIG_NFS_V4_1 is not set
1020CONFIG_ROOT_NFS=y 1055CONFIG_ROOT_NFS=y
1021CONFIG_NFSD=y 1056CONFIG_NFSD=y
1022CONFIG_NFSD_V3=y 1057CONFIG_NFSD_V3=y
@@ -1108,6 +1143,7 @@ CONFIG_ENABLE_WARN_DEPRECATED=y
1108CONFIG_ENABLE_MUST_CHECK=y 1143CONFIG_ENABLE_MUST_CHECK=y
1109CONFIG_FRAME_WARN=1024 1144CONFIG_FRAME_WARN=1024
1110# CONFIG_MAGIC_SYSRQ is not set 1145# CONFIG_MAGIC_SYSRQ is not set
1146# CONFIG_STRIP_ASM_SYMS is not set
1111# CONFIG_UNUSED_SYMBOLS is not set 1147# CONFIG_UNUSED_SYMBOLS is not set
1112CONFIG_DEBUG_FS=y 1148CONFIG_DEBUG_FS=y
1113# CONFIG_HEADERS_CHECK is not set 1149# CONFIG_HEADERS_CHECK is not set
@@ -1119,11 +1155,15 @@ CONFIG_STACKTRACE=y
1119# CONFIG_LATENCYTOP is not set 1155# CONFIG_LATENCYTOP is not set
1120CONFIG_NOP_TRACER=y 1156CONFIG_NOP_TRACER=y
1121CONFIG_HAVE_FUNCTION_TRACER=y 1157CONFIG_HAVE_FUNCTION_TRACER=y
1158CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1159CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
1122CONFIG_HAVE_DYNAMIC_FTRACE=y 1160CONFIG_HAVE_DYNAMIC_FTRACE=y
1123CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1161CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1162CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
1124CONFIG_RING_BUFFER=y 1163CONFIG_RING_BUFFER=y
1125CONFIG_EVENT_TRACING=y 1164CONFIG_EVENT_TRACING=y
1126CONFIG_CONTEXT_SWITCH_TRACER=y 1165CONFIG_CONTEXT_SWITCH_TRACER=y
1166CONFIG_RING_BUFFER_ALLOW_SWAP=y
1127CONFIG_TRACING=y 1167CONFIG_TRACING=y
1128CONFIG_TRACING_SUPPORT=y 1168CONFIG_TRACING_SUPPORT=y
1129# CONFIG_FTRACE is not set 1169# CONFIG_FTRACE is not set
@@ -1134,6 +1174,7 @@ CONFIG_HAVE_ARCH_KGDB=y
1134CONFIG_SH_STANDARD_BIOS=y 1174CONFIG_SH_STANDARD_BIOS=y
1135# CONFIG_EARLY_SCIF_CONSOLE is not set 1175# CONFIG_EARLY_SCIF_CONSOLE is not set
1136# CONFIG_EARLY_PRINTK is not set 1176# CONFIG_EARLY_PRINTK is not set
1177# CONFIG_DWARF_UNWINDER is not set
1137 1178
1138# 1179#
1139# Security options 1180# Security options
@@ -1147,7 +1188,6 @@ CONFIG_CRYPTO=y
1147# 1188#
1148# Crypto core or helper 1189# Crypto core or helper
1149# 1190#
1150# CONFIG_CRYPTO_FIPS is not set
1151CONFIG_CRYPTO_ALGAPI=y 1191CONFIG_CRYPTO_ALGAPI=y
1152CONFIG_CRYPTO_ALGAPI2=y 1192CONFIG_CRYPTO_ALGAPI2=y
1153CONFIG_CRYPTO_AEAD2=y 1193CONFIG_CRYPTO_AEAD2=y
@@ -1189,11 +1229,13 @@ CONFIG_CRYPTO_ECB=m
1189# 1229#
1190CONFIG_CRYPTO_HMAC=y 1230CONFIG_CRYPTO_HMAC=y
1191# CONFIG_CRYPTO_XCBC is not set 1231# CONFIG_CRYPTO_XCBC is not set
1232# CONFIG_CRYPTO_VMAC is not set
1192 1233
1193# 1234#
1194# Digest 1235# Digest
1195# 1236#
1196# CONFIG_CRYPTO_CRC32C is not set 1237# CONFIG_CRYPTO_CRC32C is not set
1238# CONFIG_CRYPTO_GHASH is not set
1197# CONFIG_CRYPTO_MD4 is not set 1239# CONFIG_CRYPTO_MD4 is not set
1198CONFIG_CRYPTO_MD5=y 1240CONFIG_CRYPTO_MD5=y
1199# CONFIG_CRYPTO_MICHAEL_MIC is not set 1241# CONFIG_CRYPTO_MICHAEL_MIC is not set
@@ -1259,5 +1301,6 @@ CONFIG_DECOMPRESS_GZIP=y
1259CONFIG_HAS_IOMEM=y 1301CONFIG_HAS_IOMEM=y
1260CONFIG_HAS_IOPORT=y 1302CONFIG_HAS_IOPORT=y
1261CONFIG_HAS_DMA=y 1303CONFIG_HAS_DMA=y
1304CONFIG_HAVE_LMB=y
1262CONFIG_NLATTR=y 1305CONFIG_NLATTR=y
1263CONFIG_GENERIC_ATOMIC64=y 1306CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/sh7710voipgw_defconfig b/arch/sh/configs/sh7710voipgw_defconfig
index c296ca5d95cb..662156ec9211 100644
--- a/arch/sh/configs/sh7710voipgw_defconfig
+++ b/arch/sh/configs/sh7710voipgw_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.30 3# Linux kernel version: 2.6.31
4# Thu Jun 18 13:06:13 2009 4# Thu Sep 24 19:11:49 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -14,6 +14,7 @@ CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y 14CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
16CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_IRQ_PER_CPU=y
17# CONFIG_GENERIC_GPIO is not set 18# CONFIG_GENERIC_GPIO is not set
18CONFIG_GENERIC_TIME=y 19CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 20CONFIG_GENERIC_CLOCKEVENTS=y
@@ -27,7 +28,9 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
27# CONFIG_ARCH_HAS_ILOG2_U64 is not set 28# CONFIG_ARCH_HAS_ILOG2_U64 is not set
28CONFIG_ARCH_NO_VIRT_TO_BUS=y 29CONFIG_ARCH_NO_VIRT_TO_BUS=y
29CONFIG_ARCH_HAS_DEFAULT_IDLE=y 30CONFIG_ARCH_HAS_DEFAULT_IDLE=y
31CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
30CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 32CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
33CONFIG_CONSTRUCTORS=y
31 34
32# 35#
33# General setup 36# General setup
@@ -37,6 +40,12 @@ CONFIG_BROKEN_ON_SMP=y
37CONFIG_INIT_ENV_ARG_LIMIT=32 40CONFIG_INIT_ENV_ARG_LIMIT=32
38CONFIG_LOCALVERSION="" 41CONFIG_LOCALVERSION=""
39CONFIG_LOCALVERSION_AUTO=y 42CONFIG_LOCALVERSION_AUTO=y
43CONFIG_HAVE_KERNEL_GZIP=y
44CONFIG_HAVE_KERNEL_BZIP2=y
45CONFIG_HAVE_KERNEL_LZMA=y
46CONFIG_KERNEL_GZIP=y
47# CONFIG_KERNEL_BZIP2 is not set
48# CONFIG_KERNEL_LZMA is not set
40# CONFIG_SWAP is not set 49# CONFIG_SWAP is not set
41CONFIG_SYSVIPC=y 50CONFIG_SYSVIPC=y
42CONFIG_SYSVIPC_SYSCTL=y 51CONFIG_SYSVIPC_SYSCTL=y
@@ -49,11 +58,12 @@ CONFIG_POSIX_MQUEUE_SYSCTL=y
49# 58#
50# RCU Subsystem 59# RCU Subsystem
51# 60#
52CONFIG_CLASSIC_RCU=y 61CONFIG_TREE_RCU=y
53# CONFIG_TREE_RCU is not set 62# CONFIG_TREE_PREEMPT_RCU is not set
54# CONFIG_PREEMPT_RCU is not set 63# CONFIG_RCU_TRACE is not set
64CONFIG_RCU_FANOUT=32
65# CONFIG_RCU_FANOUT_EXACT is not set
55# CONFIG_TREE_RCU_TRACE is not set 66# CONFIG_TREE_RCU_TRACE is not set
56# CONFIG_PREEMPT_RCU_TRACE is not set
57# CONFIG_IKCONFIG is not set 67# CONFIG_IKCONFIG is not set
58CONFIG_LOG_BUF_SHIFT=14 68CONFIG_LOG_BUF_SHIFT=14
59CONFIG_GROUP_SCHED=y 69CONFIG_GROUP_SCHED=y
@@ -87,18 +97,19 @@ CONFIG_TIMERFD=y
87CONFIG_EVENTFD=y 97CONFIG_EVENTFD=y
88# CONFIG_SHMEM is not set 98# CONFIG_SHMEM is not set
89CONFIG_AIO=y 99CONFIG_AIO=y
100CONFIG_HAVE_PERF_EVENTS=y
90 101
91# 102#
92# Performance Counters 103# Kernel Performance Events And Counters
93# 104#
105# CONFIG_PERF_EVENTS is not set
106# CONFIG_PERF_COUNTERS is not set
94CONFIG_VM_EVENT_COUNTERS=y 107CONFIG_VM_EVENT_COUNTERS=y
95# CONFIG_STRIP_ASM_SYMS is not set
96CONFIG_COMPAT_BRK=y 108CONFIG_COMPAT_BRK=y
97CONFIG_SLAB=y 109CONFIG_SLAB=y
98# CONFIG_SLUB is not set 110# CONFIG_SLUB is not set
99# CONFIG_SLOB is not set 111# CONFIG_SLOB is not set
100# CONFIG_PROFILING is not set 112# CONFIG_PROFILING is not set
101# CONFIG_MARKERS is not set
102CONFIG_HAVE_OPROFILE=y 113CONFIG_HAVE_OPROFILE=y
103# CONFIG_KPROBES is not set 114# CONFIG_KPROBES is not set
104CONFIG_HAVE_IOREMAP_PROT=y 115CONFIG_HAVE_IOREMAP_PROT=y
@@ -107,6 +118,11 @@ CONFIG_HAVE_KRETPROBES=y
107CONFIG_HAVE_ARCH_TRACEHOOK=y 118CONFIG_HAVE_ARCH_TRACEHOOK=y
108CONFIG_HAVE_CLK=y 119CONFIG_HAVE_CLK=y
109CONFIG_HAVE_DMA_API_DEBUG=y 120CONFIG_HAVE_DMA_API_DEBUG=y
121
122#
123# GCOV-based kernel profiling
124#
125# CONFIG_GCOV_KERNEL is not set
110# CONFIG_SLOW_WORK is not set 126# CONFIG_SLOW_WORK is not set
111CONFIG_HAVE_GENERIC_DMA_COHERENT=y 127CONFIG_HAVE_GENERIC_DMA_COHERENT=y
112CONFIG_SLABINFO=y 128CONFIG_SLABINFO=y
@@ -118,7 +134,7 @@ CONFIG_MODULE_FORCE_UNLOAD=y
118# CONFIG_MODVERSIONS is not set 134# CONFIG_MODVERSIONS is not set
119# CONFIG_MODULE_SRCVERSION_ALL is not set 135# CONFIG_MODULE_SRCVERSION_ALL is not set
120CONFIG_BLOCK=y 136CONFIG_BLOCK=y
121# CONFIG_LBD is not set 137CONFIG_LBDAF=y
122# CONFIG_BLK_DEV_BSG is not set 138# CONFIG_BLK_DEV_BSG is not set
123# CONFIG_BLK_DEV_INTEGRITY is not set 139# CONFIG_BLK_DEV_INTEGRITY is not set
124 140
@@ -165,6 +181,7 @@ CONFIG_CPU_SUBTYPE_SH7710=y
165# CONFIG_CPU_SUBTYPE_SH4_202 is not set 181# CONFIG_CPU_SUBTYPE_SH4_202 is not set
166# CONFIG_CPU_SUBTYPE_SH7723 is not set 182# CONFIG_CPU_SUBTYPE_SH7723 is not set
167# CONFIG_CPU_SUBTYPE_SH7724 is not set 183# CONFIG_CPU_SUBTYPE_SH7724 is not set
184# CONFIG_CPU_SUBTYPE_SH7757 is not set
168# CONFIG_CPU_SUBTYPE_SH7763 is not set 185# CONFIG_CPU_SUBTYPE_SH7763 is not set
169# CONFIG_CPU_SUBTYPE_SH7770 is not set 186# CONFIG_CPU_SUBTYPE_SH7770 is not set
170# CONFIG_CPU_SUBTYPE_SH7780 is not set 187# CONFIG_CPU_SUBTYPE_SH7780 is not set
@@ -210,6 +227,7 @@ CONFIG_ZONE_DMA_FLAG=0
210CONFIG_NR_QUICK=2 227CONFIG_NR_QUICK=2
211CONFIG_HAVE_MLOCK=y 228CONFIG_HAVE_MLOCK=y
212CONFIG_HAVE_MLOCKED_PAGE_BIT=y 229CONFIG_HAVE_MLOCKED_PAGE_BIT=y
230# CONFIG_KSM is not set
213CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 231CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
214 232
215# 233#
@@ -292,7 +310,8 @@ CONFIG_GUSA=y
292CONFIG_ZERO_PAGE_OFFSET=0x00001000 310CONFIG_ZERO_PAGE_OFFSET=0x00001000
293CONFIG_BOOT_LINK_OFFSET=0x00800000 311CONFIG_BOOT_LINK_OFFSET=0x00800000
294CONFIG_ENTRY_OFFSET=0x00001000 312CONFIG_ENTRY_OFFSET=0x00001000
295# CONFIG_CMDLINE_BOOL is not set 313# CONFIG_CMDLINE_OVERWRITE is not set
314# CONFIG_CMDLINE_EXTEND is not set
296 315
297# 316#
298# Bus options 317# Bus options
@@ -374,6 +393,7 @@ CONFIG_NETFILTER_ADVANCED=y
374# CONFIG_IP_NF_ARPTABLES is not set 393# CONFIG_IP_NF_ARPTABLES is not set
375# CONFIG_IP_DCCP is not set 394# CONFIG_IP_DCCP is not set
376# CONFIG_IP_SCTP is not set 395# CONFIG_IP_SCTP is not set
396# CONFIG_RDS is not set
377# CONFIG_TIPC is not set 397# CONFIG_TIPC is not set
378# CONFIG_ATM is not set 398# CONFIG_ATM is not set
379# CONFIG_BRIDGE is not set 399# CONFIG_BRIDGE is not set
@@ -440,6 +460,7 @@ CONFIG_NET_SCH_FIFO=y
440# CONFIG_AF_RXRPC is not set 460# CONFIG_AF_RXRPC is not set
441CONFIG_WIRELESS=y 461CONFIG_WIRELESS=y
442# CONFIG_CFG80211 is not set 462# CONFIG_CFG80211 is not set
463CONFIG_CFG80211_DEFAULT_PS_VALUE=0
443# CONFIG_WIRELESS_OLD_REGULATORY is not set 464# CONFIG_WIRELESS_OLD_REGULATORY is not set
444# CONFIG_WIRELESS_EXT is not set 465# CONFIG_WIRELESS_EXT is not set
445# CONFIG_LIB80211 is not set 466# CONFIG_LIB80211 is not set
@@ -447,7 +468,6 @@ CONFIG_WIRELESS=y
447# 468#
448# CFG80211 needs to be enabled for MAC80211 469# CFG80211 needs to be enabled for MAC80211
449# 470#
450CONFIG_MAC80211_DEFAULT_PS_VALUE=0
451# CONFIG_WIMAX is not set 471# CONFIG_WIMAX is not set
452# CONFIG_RFKILL is not set 472# CONFIG_RFKILL is not set
453# CONFIG_NET_9P is not set 473# CONFIG_NET_9P is not set
@@ -469,9 +489,9 @@ CONFIG_EXTRA_FIRMWARE=""
469# CONFIG_CONNECTOR is not set 489# CONFIG_CONNECTOR is not set
470CONFIG_MTD=y 490CONFIG_MTD=y
471# CONFIG_MTD_DEBUG is not set 491# CONFIG_MTD_DEBUG is not set
492# CONFIG_MTD_TESTS is not set
472# CONFIG_MTD_CONCAT is not set 493# CONFIG_MTD_CONCAT is not set
473CONFIG_MTD_PARTITIONS=y 494CONFIG_MTD_PARTITIONS=y
474# CONFIG_MTD_TESTS is not set
475# CONFIG_MTD_REDBOOT_PARTS is not set 495# CONFIG_MTD_REDBOOT_PARTS is not set
476# CONFIG_MTD_CMDLINE_PARTS is not set 496# CONFIG_MTD_CMDLINE_PARTS is not set
477# CONFIG_MTD_AR7_PARTS is not set 497# CONFIG_MTD_AR7_PARTS is not set
@@ -605,10 +625,7 @@ CONFIG_NET_ETHERNET=y
605# CONFIG_KS8842 is not set 625# CONFIG_KS8842 is not set
606CONFIG_NETDEV_1000=y 626CONFIG_NETDEV_1000=y
607CONFIG_NETDEV_10000=y 627CONFIG_NETDEV_10000=y
608 628CONFIG_WLAN=y
609#
610# Wireless LAN
611#
612# CONFIG_WLAN_PRE80211 is not set 629# CONFIG_WLAN_PRE80211 is not set
613# CONFIG_WLAN_80211 is not set 630# CONFIG_WLAN_80211 is not set
614 631
@@ -686,6 +703,11 @@ CONFIG_HW_RANDOM=y
686# CONFIG_TCG_TPM is not set 703# CONFIG_TCG_TPM is not set
687# CONFIG_I2C is not set 704# CONFIG_I2C is not set
688# CONFIG_SPI is not set 705# CONFIG_SPI is not set
706
707#
708# PPS support
709#
710# CONFIG_PPS is not set
689# CONFIG_W1 is not set 711# CONFIG_W1 is not set
690# CONFIG_POWER_SUPPLY is not set 712# CONFIG_POWER_SUPPLY is not set
691# CONFIG_HWMON is not set 713# CONFIG_HWMON is not set
@@ -723,7 +745,6 @@ CONFIG_SSB_POSSIBLE=y
723# CONFIG_SOUND is not set 745# CONFIG_SOUND is not set
724CONFIG_HID_SUPPORT=y 746CONFIG_HID_SUPPORT=y
725CONFIG_HID=y 747CONFIG_HID=y
726# CONFIG_HID_DEBUG is not set
727# CONFIG_HIDRAW is not set 748# CONFIG_HIDRAW is not set
728# CONFIG_HID_PID is not set 749# CONFIG_HID_PID is not set
729 750
@@ -775,8 +796,10 @@ CONFIG_RTC_LIB=y
775# CONFIG_JFS_FS is not set 796# CONFIG_JFS_FS is not set
776# CONFIG_FS_POSIX_ACL is not set 797# CONFIG_FS_POSIX_ACL is not set
777# CONFIG_XFS_FS is not set 798# CONFIG_XFS_FS is not set
799# CONFIG_GFS2_FS is not set
778# CONFIG_OCFS2_FS is not set 800# CONFIG_OCFS2_FS is not set
779# CONFIG_BTRFS_FS is not set 801# CONFIG_BTRFS_FS is not set
802# CONFIG_NILFS2_FS is not set
780CONFIG_FILE_LOCKING=y 803CONFIG_FILE_LOCKING=y
781CONFIG_FSNOTIFY=y 804CONFIG_FSNOTIFY=y
782# CONFIG_DNOTIFY is not set 805# CONFIG_DNOTIFY is not set
@@ -813,8 +836,6 @@ CONFIG_PROC_FS=y
813CONFIG_PROC_SYSCTL=y 836CONFIG_PROC_SYSCTL=y
814CONFIG_PROC_PAGE_MONITOR=y 837CONFIG_PROC_PAGE_MONITOR=y
815CONFIG_SYSFS=y 838CONFIG_SYSFS=y
816CONFIG_TMPFS=y
817# CONFIG_TMPFS_POSIX_ACL is not set
818# CONFIG_HUGETLBFS is not set 839# CONFIG_HUGETLBFS is not set
819# CONFIG_HUGETLB_PAGE is not set 840# CONFIG_HUGETLB_PAGE is not set
820# CONFIG_CONFIGFS_FS is not set 841# CONFIG_CONFIGFS_FS is not set
@@ -847,7 +868,6 @@ CONFIG_JFFS2_RTIME=y
847# CONFIG_ROMFS_FS is not set 868# CONFIG_ROMFS_FS is not set
848# CONFIG_SYSV_FS is not set 869# CONFIG_SYSV_FS is not set
849# CONFIG_UFS_FS is not set 870# CONFIG_UFS_FS is not set
850# CONFIG_NILFS2_FS is not set
851CONFIG_NETWORK_FILESYSTEMS=y 871CONFIG_NETWORK_FILESYSTEMS=y
852# CONFIG_NFS_FS is not set 872# CONFIG_NFS_FS is not set
853# CONFIG_NFSD is not set 873# CONFIG_NFSD is not set
@@ -874,6 +894,7 @@ CONFIG_ENABLE_WARN_DEPRECATED=y
874CONFIG_ENABLE_MUST_CHECK=y 894CONFIG_ENABLE_MUST_CHECK=y
875CONFIG_FRAME_WARN=1024 895CONFIG_FRAME_WARN=1024
876# CONFIG_MAGIC_SYSRQ is not set 896# CONFIG_MAGIC_SYSRQ is not set
897# CONFIG_STRIP_ASM_SYMS is not set
877# CONFIG_UNUSED_SYMBOLS is not set 898# CONFIG_UNUSED_SYMBOLS is not set
878CONFIG_DEBUG_FS=y 899CONFIG_DEBUG_FS=y
879# CONFIG_HEADERS_CHECK is not set 900# CONFIG_HEADERS_CHECK is not set
@@ -883,8 +904,11 @@ CONFIG_DEBUG_FS=y
883# CONFIG_RCU_CPU_STALL_DETECTOR is not set 904# CONFIG_RCU_CPU_STALL_DETECTOR is not set
884# CONFIG_LATENCYTOP is not set 905# CONFIG_LATENCYTOP is not set
885CONFIG_HAVE_FUNCTION_TRACER=y 906CONFIG_HAVE_FUNCTION_TRACER=y
907CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
908CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
886CONFIG_HAVE_DYNAMIC_FTRACE=y 909CONFIG_HAVE_DYNAMIC_FTRACE=y
887CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 910CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
911CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
888CONFIG_TRACING_SUPPORT=y 912CONFIG_TRACING_SUPPORT=y
889# CONFIG_FTRACE is not set 913# CONFIG_FTRACE is not set
890# CONFIG_DYNAMIC_DEBUG is not set 914# CONFIG_DYNAMIC_DEBUG is not set
@@ -893,6 +917,7 @@ CONFIG_TRACING_SUPPORT=y
893CONFIG_HAVE_ARCH_KGDB=y 917CONFIG_HAVE_ARCH_KGDB=y
894# CONFIG_SH_STANDARD_BIOS is not set 918# CONFIG_SH_STANDARD_BIOS is not set
895# CONFIG_EARLY_SCIF_CONSOLE is not set 919# CONFIG_EARLY_SCIF_CONSOLE is not set
920# CONFIG_DWARF_UNWINDER is not set
896 921
897# 922#
898# Security options 923# Security options
@@ -906,7 +931,6 @@ CONFIG_CRYPTO=y
906# 931#
907# Crypto core or helper 932# Crypto core or helper
908# 933#
909# CONFIG_CRYPTO_FIPS is not set
910# CONFIG_CRYPTO_MANAGER is not set 934# CONFIG_CRYPTO_MANAGER is not set
911# CONFIG_CRYPTO_MANAGER2 is not set 935# CONFIG_CRYPTO_MANAGER2 is not set
912# CONFIG_CRYPTO_GF128MUL is not set 936# CONFIG_CRYPTO_GF128MUL is not set
@@ -938,11 +962,13 @@ CONFIG_CRYPTO=y
938# 962#
939# CONFIG_CRYPTO_HMAC is not set 963# CONFIG_CRYPTO_HMAC is not set
940# CONFIG_CRYPTO_XCBC is not set 964# CONFIG_CRYPTO_XCBC is not set
965# CONFIG_CRYPTO_VMAC is not set
941 966
942# 967#
943# Digest 968# Digest
944# 969#
945# CONFIG_CRYPTO_CRC32C is not set 970# CONFIG_CRYPTO_CRC32C is not set
971# CONFIG_CRYPTO_GHASH is not set
946# CONFIG_CRYPTO_MD4 is not set 972# CONFIG_CRYPTO_MD4 is not set
947# CONFIG_CRYPTO_MD5 is not set 973# CONFIG_CRYPTO_MD5 is not set
948# CONFIG_CRYPTO_MICHAEL_MIC is not set 974# CONFIG_CRYPTO_MICHAEL_MIC is not set
@@ -1006,5 +1032,6 @@ CONFIG_ZLIB_DEFLATE=y
1006CONFIG_HAS_IOMEM=y 1032CONFIG_HAS_IOMEM=y
1007CONFIG_HAS_IOPORT=y 1033CONFIG_HAS_IOPORT=y
1008CONFIG_HAS_DMA=y 1034CONFIG_HAS_DMA=y
1035CONFIG_HAVE_LMB=y
1009CONFIG_NLATTR=y 1036CONFIG_NLATTR=y
1010CONFIG_GENERIC_ATOMIC64=y 1037CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/sh7724_generic_defconfig b/arch/sh/configs/sh7724_generic_defconfig
index ba26be1b4134..e06719a30ba1 100644
--- a/arch/sh/configs/sh7724_generic_defconfig
+++ b/arch/sh/configs/sh7724_generic_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.30 3# Linux kernel version: 2.6.31
4# Thu Jun 18 13:06:48 2009 4# Thu Sep 24 19:14:00 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -14,6 +14,7 @@ CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y 14CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
16CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_IRQ_PER_CPU=y
17# CONFIG_GENERIC_GPIO is not set 18# CONFIG_GENERIC_GPIO is not set
18CONFIG_GENERIC_TIME=y 19CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 20CONFIG_GENERIC_CLOCKEVENTS=y
@@ -28,7 +29,9 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
28# CONFIG_ARCH_HAS_ILOG2_U64 is not set 29# CONFIG_ARCH_HAS_ILOG2_U64 is not set
29CONFIG_ARCH_NO_VIRT_TO_BUS=y 30CONFIG_ARCH_NO_VIRT_TO_BUS=y
30CONFIG_ARCH_HAS_DEFAULT_IDLE=y 31CONFIG_ARCH_HAS_DEFAULT_IDLE=y
32CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
31CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 33CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
34CONFIG_CONSTRUCTORS=y
32 35
33# 36#
34# General setup 37# General setup
@@ -38,6 +41,12 @@ CONFIG_BROKEN_ON_SMP=y
38CONFIG_INIT_ENV_ARG_LIMIT=32 41CONFIG_INIT_ENV_ARG_LIMIT=32
39CONFIG_LOCALVERSION="" 42CONFIG_LOCALVERSION=""
40# CONFIG_LOCALVERSION_AUTO is not set 43# CONFIG_LOCALVERSION_AUTO is not set
44CONFIG_HAVE_KERNEL_GZIP=y
45CONFIG_HAVE_KERNEL_BZIP2=y
46CONFIG_HAVE_KERNEL_LZMA=y
47CONFIG_KERNEL_GZIP=y
48# CONFIG_KERNEL_BZIP2 is not set
49# CONFIG_KERNEL_LZMA is not set
41CONFIG_SWAP=y 50CONFIG_SWAP=y
42CONFIG_SYSVIPC=y 51CONFIG_SYSVIPC=y
43CONFIG_SYSVIPC_SYSCTL=y 52CONFIG_SYSVIPC_SYSCTL=y
@@ -46,14 +55,12 @@ CONFIG_SYSVIPC_SYSCTL=y
46# 55#
47# RCU Subsystem 56# RCU Subsystem
48# 57#
49# CONFIG_CLASSIC_RCU is not set
50CONFIG_TREE_RCU=y 58CONFIG_TREE_RCU=y
51# CONFIG_PREEMPT_RCU is not set 59# CONFIG_TREE_PREEMPT_RCU is not set
52# CONFIG_RCU_TRACE is not set 60# CONFIG_RCU_TRACE is not set
53CONFIG_RCU_FANOUT=32 61CONFIG_RCU_FANOUT=32
54# CONFIG_RCU_FANOUT_EXACT is not set 62# CONFIG_RCU_FANOUT_EXACT is not set
55# CONFIG_TREE_RCU_TRACE is not set 63# CONFIG_TREE_RCU_TRACE is not set
56# CONFIG_PREEMPT_RCU_TRACE is not set
57# CONFIG_IKCONFIG is not set 64# CONFIG_IKCONFIG is not set
58CONFIG_LOG_BUF_SHIFT=17 65CONFIG_LOG_BUF_SHIFT=17
59CONFIG_GROUP_SCHED=y 66CONFIG_GROUP_SCHED=y
@@ -92,19 +99,21 @@ CONFIG_TIMERFD=y
92CONFIG_EVENTFD=y 99CONFIG_EVENTFD=y
93CONFIG_SHMEM=y 100CONFIG_SHMEM=y
94CONFIG_AIO=y 101CONFIG_AIO=y
102CONFIG_HAVE_PERF_EVENTS=y
95 103
96# 104#
97# Performance Counters 105# Kernel Performance Events And Counters
98# 106#
107CONFIG_PERF_EVENTS=y
108CONFIG_EVENT_PROFILE=y
109# CONFIG_PERF_COUNTERS is not set
99CONFIG_VM_EVENT_COUNTERS=y 110CONFIG_VM_EVENT_COUNTERS=y
100# CONFIG_STRIP_ASM_SYMS is not set
101# CONFIG_COMPAT_BRK is not set 111# CONFIG_COMPAT_BRK is not set
102# CONFIG_SLAB is not set 112# CONFIG_SLAB is not set
103CONFIG_SLUB=y 113CONFIG_SLUB=y
104# CONFIG_SLOB is not set 114# CONFIG_SLOB is not set
105CONFIG_PROFILING=y 115CONFIG_PROFILING=y
106CONFIG_TRACEPOINTS=y 116CONFIG_TRACEPOINTS=y
107CONFIG_MARKERS=y
108CONFIG_OPROFILE=y 117CONFIG_OPROFILE=y
109CONFIG_HAVE_OPROFILE=y 118CONFIG_HAVE_OPROFILE=y
110CONFIG_HAVE_IOREMAP_PROT=y 119CONFIG_HAVE_IOREMAP_PROT=y
@@ -113,13 +122,18 @@ CONFIG_HAVE_KRETPROBES=y
113CONFIG_HAVE_ARCH_TRACEHOOK=y 122CONFIG_HAVE_ARCH_TRACEHOOK=y
114CONFIG_HAVE_CLK=y 123CONFIG_HAVE_CLK=y
115CONFIG_HAVE_DMA_API_DEBUG=y 124CONFIG_HAVE_DMA_API_DEBUG=y
125
126#
127# GCOV-based kernel profiling
128#
129# CONFIG_GCOV_KERNEL is not set
116# CONFIG_SLOW_WORK is not set 130# CONFIG_SLOW_WORK is not set
117CONFIG_HAVE_GENERIC_DMA_COHERENT=y 131CONFIG_HAVE_GENERIC_DMA_COHERENT=y
118CONFIG_RT_MUTEXES=y 132CONFIG_RT_MUTEXES=y
119CONFIG_BASE_SMALL=0 133CONFIG_BASE_SMALL=0
120# CONFIG_MODULES is not set 134# CONFIG_MODULES is not set
121CONFIG_BLOCK=y 135CONFIG_BLOCK=y
122# CONFIG_LBD is not set 136CONFIG_LBDAF=y
123# CONFIG_BLK_DEV_BSG is not set 137# CONFIG_BLK_DEV_BSG is not set
124# CONFIG_BLK_DEV_INTEGRITY is not set 138# CONFIG_BLK_DEV_INTEGRITY is not set
125 139
@@ -169,6 +183,7 @@ CONFIG_ARCH_SHMOBILE=y
169# CONFIG_CPU_SUBTYPE_SH4_202 is not set 183# CONFIG_CPU_SUBTYPE_SH4_202 is not set
170# CONFIG_CPU_SUBTYPE_SH7723 is not set 184# CONFIG_CPU_SUBTYPE_SH7723 is not set
171CONFIG_CPU_SUBTYPE_SH7724=y 185CONFIG_CPU_SUBTYPE_SH7724=y
186# CONFIG_CPU_SUBTYPE_SH7757 is not set
172# CONFIG_CPU_SUBTYPE_SH7763 is not set 187# CONFIG_CPU_SUBTYPE_SH7763 is not set
173# CONFIG_CPU_SUBTYPE_SH7770 is not set 188# CONFIG_CPU_SUBTYPE_SH7770 is not set
174# CONFIG_CPU_SUBTYPE_SH7780 is not set 189# CONFIG_CPU_SUBTYPE_SH7780 is not set
@@ -214,7 +229,6 @@ CONFIG_SPARSEMEM_STATIC=y
214# 229#
215# Memory hotplug is currently incompatible with Software Suspend 230# Memory hotplug is currently incompatible with Software Suspend
216# 231#
217CONFIG_PAGEFLAGS_EXTENDED=y
218CONFIG_SPLIT_PTLOCK_CPUS=4 232CONFIG_SPLIT_PTLOCK_CPUS=4
219CONFIG_MIGRATION=y 233CONFIG_MIGRATION=y
220# CONFIG_PHYS_ADDR_T_64BIT is not set 234# CONFIG_PHYS_ADDR_T_64BIT is not set
@@ -222,6 +236,7 @@ CONFIG_ZONE_DMA_FLAG=0
222CONFIG_NR_QUICK=2 236CONFIG_NR_QUICK=2
223CONFIG_HAVE_MLOCK=y 237CONFIG_HAVE_MLOCK=y
224CONFIG_HAVE_MLOCKED_PAGE_BIT=y 238CONFIG_HAVE_MLOCKED_PAGE_BIT=y
239# CONFIG_KSM is not set
225CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 240CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
226 241
227# 242#
@@ -246,6 +261,8 @@ CONFIG_CPU_HAS_FPU=y
246# Board support 261# Board support
247# 262#
248# CONFIG_SH_7724_SOLUTION_ENGINE is not set 263# CONFIG_SH_7724_SOLUTION_ENGINE is not set
264# CONFIG_SH_KFR2R09 is not set
265# CONFIG_SH_ECOVEC is not set
249 266
250# 267#
251# Timer and clock configuration 268# Timer and clock configuration
@@ -318,7 +335,8 @@ CONFIG_GUSA=y
318CONFIG_ZERO_PAGE_OFFSET=0x00001000 335CONFIG_ZERO_PAGE_OFFSET=0x00001000
319CONFIG_BOOT_LINK_OFFSET=0x00800000 336CONFIG_BOOT_LINK_OFFSET=0x00800000
320CONFIG_ENTRY_OFFSET=0x00001000 337CONFIG_ENTRY_OFFSET=0x00001000
321# CONFIG_CMDLINE_BOOL is not set 338# CONFIG_CMDLINE_OVERWRITE is not set
339# CONFIG_CMDLINE_EXTEND is not set
322 340
323# 341#
324# Bus options 342# Bus options
@@ -345,6 +363,7 @@ CONFIG_SUSPEND_FREEZER=y
345CONFIG_HIBERNATION_NVS=y 363CONFIG_HIBERNATION_NVS=y
346CONFIG_HIBERNATION=y 364CONFIG_HIBERNATION=y
347CONFIG_PM_STD_PARTITION="" 365CONFIG_PM_STD_PARTITION=""
366CONFIG_PM_RUNTIME=y
348CONFIG_CPU_IDLE=y 367CONFIG_CPU_IDLE=y
349CONFIG_CPU_IDLE_GOV_LADDER=y 368CONFIG_CPU_IDLE_GOV_LADDER=y
350CONFIG_CPU_IDLE_GOV_MENU=y 369CONFIG_CPU_IDLE_GOV_MENU=y
@@ -427,6 +446,7 @@ CONFIG_SERIAL_CORE_CONSOLE=y
427# CONFIG_TCG_TPM is not set 446# CONFIG_TCG_TPM is not set
428CONFIG_I2C=y 447CONFIG_I2C=y
429CONFIG_I2C_BOARDINFO=y 448CONFIG_I2C_BOARDINFO=y
449CONFIG_I2C_COMPAT=y
430CONFIG_I2C_CHARDEV=y 450CONFIG_I2C_CHARDEV=y
431CONFIG_I2C_HELPER_AUTO=y 451CONFIG_I2C_HELPER_AUTO=y
432 452
@@ -437,6 +457,7 @@ CONFIG_I2C_HELPER_AUTO=y
437# 457#
438# I2C system bus drivers (mostly embedded / system-on-chip) 458# I2C system bus drivers (mostly embedded / system-on-chip)
439# 459#
460# CONFIG_I2C_DESIGNWARE is not set
440# CONFIG_I2C_OCORES is not set 461# CONFIG_I2C_OCORES is not set
441CONFIG_I2C_SH_MOBILE=y 462CONFIG_I2C_SH_MOBILE=y
442# CONFIG_I2C_SIMTEC is not set 463# CONFIG_I2C_SIMTEC is not set
@@ -456,20 +477,21 @@ CONFIG_I2C_SH_MOBILE=y
456# Miscellaneous I2C Chip support 477# Miscellaneous I2C Chip support
457# 478#
458# CONFIG_DS1682 is not set 479# CONFIG_DS1682 is not set
459# CONFIG_SENSORS_PCF8574 is not set
460# CONFIG_PCF8575 is not set
461# CONFIG_SENSORS_PCA9539 is not set
462# CONFIG_SENSORS_TSL2550 is not set 480# CONFIG_SENSORS_TSL2550 is not set
463# CONFIG_I2C_DEBUG_CORE is not set 481# CONFIG_I2C_DEBUG_CORE is not set
464# CONFIG_I2C_DEBUG_ALGO is not set 482# CONFIG_I2C_DEBUG_ALGO is not set
465# CONFIG_I2C_DEBUG_BUS is not set 483# CONFIG_I2C_DEBUG_BUS is not set
466# CONFIG_I2C_DEBUG_CHIP is not set 484# CONFIG_I2C_DEBUG_CHIP is not set
467# CONFIG_SPI is not set 485# CONFIG_SPI is not set
486
487#
488# PPS support
489#
490# CONFIG_PPS is not set
468# CONFIG_W1 is not set 491# CONFIG_W1 is not set
469# CONFIG_POWER_SUPPLY is not set 492# CONFIG_POWER_SUPPLY is not set
470# CONFIG_HWMON is not set 493# CONFIG_HWMON is not set
471# CONFIG_THERMAL is not set 494# CONFIG_THERMAL is not set
472# CONFIG_THERMAL_HWMON is not set
473# CONFIG_WATCHDOG is not set 495# CONFIG_WATCHDOG is not set
474CONFIG_SSB_POSSIBLE=y 496CONFIG_SSB_POSSIBLE=y
475 497
@@ -488,8 +510,10 @@ CONFIG_SSB_POSSIBLE=y
488# CONFIG_MFD_TMIO is not set 510# CONFIG_MFD_TMIO is not set
489# CONFIG_PMIC_DA903X is not set 511# CONFIG_PMIC_DA903X is not set
490# CONFIG_MFD_WM8400 is not set 512# CONFIG_MFD_WM8400 is not set
513# CONFIG_MFD_WM831X is not set
491# CONFIG_MFD_WM8350_I2C is not set 514# CONFIG_MFD_WM8350_I2C is not set
492# CONFIG_MFD_PCF50633 is not set 515# CONFIG_MFD_PCF50633 is not set
516# CONFIG_AB3100_CORE is not set
493# CONFIG_REGULATOR is not set 517# CONFIG_REGULATOR is not set
494# CONFIG_MEDIA_SUPPORT is not set 518# CONFIG_MEDIA_SUPPORT is not set
495 519
@@ -540,6 +564,7 @@ CONFIG_RTC_INTF_DEV=y
540# CONFIG_RTC_DRV_S35390A is not set 564# CONFIG_RTC_DRV_S35390A is not set
541# CONFIG_RTC_DRV_FM3130 is not set 565# CONFIG_RTC_DRV_FM3130 is not set
542# CONFIG_RTC_DRV_RX8581 is not set 566# CONFIG_RTC_DRV_RX8581 is not set
567# CONFIG_RTC_DRV_RX8025 is not set
543 568
544# 569#
545# SPI RTC drivers 570# SPI RTC drivers
@@ -587,7 +612,9 @@ CONFIG_UIO_PDRV_GENIRQ=y
587# CONFIG_JFS_FS is not set 612# CONFIG_JFS_FS is not set
588# CONFIG_FS_POSIX_ACL is not set 613# CONFIG_FS_POSIX_ACL is not set
589# CONFIG_XFS_FS is not set 614# CONFIG_XFS_FS is not set
615# CONFIG_GFS2_FS is not set
590# CONFIG_BTRFS_FS is not set 616# CONFIG_BTRFS_FS is not set
617# CONFIG_NILFS2_FS is not set
591CONFIG_FILE_LOCKING=y 618CONFIG_FILE_LOCKING=y
592CONFIG_FSNOTIFY=y 619CONFIG_FSNOTIFY=y
593# CONFIG_DNOTIFY is not set 620# CONFIG_DNOTIFY is not set
@@ -642,6 +669,7 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y
642# CONFIG_ENABLE_MUST_CHECK is not set 669# CONFIG_ENABLE_MUST_CHECK is not set
643CONFIG_FRAME_WARN=1024 670CONFIG_FRAME_WARN=1024
644# CONFIG_MAGIC_SYSRQ is not set 671# CONFIG_MAGIC_SYSRQ is not set
672# CONFIG_STRIP_ASM_SYMS is not set
645# CONFIG_UNUSED_SYMBOLS is not set 673# CONFIG_UNUSED_SYMBOLS is not set
646CONFIG_DEBUG_FS=y 674CONFIG_DEBUG_FS=y
647# CONFIG_HEADERS_CHECK is not set 675# CONFIG_HEADERS_CHECK is not set
@@ -654,11 +682,15 @@ CONFIG_STACKTRACE=y
654# CONFIG_SYSCTL_SYSCALL_CHECK is not set 682# CONFIG_SYSCTL_SYSCALL_CHECK is not set
655CONFIG_NOP_TRACER=y 683CONFIG_NOP_TRACER=y
656CONFIG_HAVE_FUNCTION_TRACER=y 684CONFIG_HAVE_FUNCTION_TRACER=y
685CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
686CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
657CONFIG_HAVE_DYNAMIC_FTRACE=y 687CONFIG_HAVE_DYNAMIC_FTRACE=y
658CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 688CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
689CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
659CONFIG_RING_BUFFER=y 690CONFIG_RING_BUFFER=y
660CONFIG_EVENT_TRACING=y 691CONFIG_EVENT_TRACING=y
661CONFIG_CONTEXT_SWITCH_TRACER=y 692CONFIG_CONTEXT_SWITCH_TRACER=y
693CONFIG_RING_BUFFER_ALLOW_SWAP=y
662CONFIG_TRACING=y 694CONFIG_TRACING=y
663CONFIG_TRACING_SUPPORT=y 695CONFIG_TRACING_SUPPORT=y
664# CONFIG_FTRACE is not set 696# CONFIG_FTRACE is not set
@@ -668,6 +700,7 @@ CONFIG_TRACING_SUPPORT=y
668CONFIG_HAVE_ARCH_KGDB=y 700CONFIG_HAVE_ARCH_KGDB=y
669# CONFIG_SH_STANDARD_BIOS is not set 701# CONFIG_SH_STANDARD_BIOS is not set
670# CONFIG_EARLY_SCIF_CONSOLE is not set 702# CONFIG_EARLY_SCIF_CONSOLE is not set
703# CONFIG_DWARF_UNWINDER is not set
671 704
672# 705#
673# Security options 706# Security options
@@ -692,4 +725,5 @@ CONFIG_GENERIC_FIND_LAST_BIT=y
692CONFIG_HAS_IOMEM=y 725CONFIG_HAS_IOMEM=y
693CONFIG_HAS_IOPORT=y 726CONFIG_HAS_IOPORT=y
694CONFIG_HAS_DMA=y 727CONFIG_HAS_DMA=y
728CONFIG_HAVE_LMB=y
695CONFIG_GENERIC_ATOMIC64=y 729CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/sh7763rdp_defconfig b/arch/sh/configs/sh7763rdp_defconfig
index b1d9b2311e3c..194ff703e23d 100644
--- a/arch/sh/configs/sh7763rdp_defconfig
+++ b/arch/sh/configs/sh7763rdp_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.30 3# Linux kernel version: 2.6.31
4# Thu Jun 18 13:07:15 2009 4# Thu Sep 24 19:15:37 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -14,6 +14,7 @@ CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y 14CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
16CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_IRQ_PER_CPU=y
17# CONFIG_GENERIC_GPIO is not set 18# CONFIG_GENERIC_GPIO is not set
18CONFIG_GENERIC_TIME=y 19CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 20CONFIG_GENERIC_CLOCKEVENTS=y
@@ -27,7 +28,9 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
27# CONFIG_ARCH_HAS_ILOG2_U64 is not set 28# CONFIG_ARCH_HAS_ILOG2_U64 is not set
28CONFIG_ARCH_NO_VIRT_TO_BUS=y 29CONFIG_ARCH_NO_VIRT_TO_BUS=y
29CONFIG_ARCH_HAS_DEFAULT_IDLE=y 30CONFIG_ARCH_HAS_DEFAULT_IDLE=y
31CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
30CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 32CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
33CONFIG_CONSTRUCTORS=y
31 34
32# 35#
33# General setup 36# General setup
@@ -37,6 +40,12 @@ CONFIG_BROKEN_ON_SMP=y
37CONFIG_INIT_ENV_ARG_LIMIT=32 40CONFIG_INIT_ENV_ARG_LIMIT=32
38CONFIG_LOCALVERSION="" 41CONFIG_LOCALVERSION=""
39CONFIG_LOCALVERSION_AUTO=y 42CONFIG_LOCALVERSION_AUTO=y
43CONFIG_HAVE_KERNEL_GZIP=y
44CONFIG_HAVE_KERNEL_BZIP2=y
45CONFIG_HAVE_KERNEL_LZMA=y
46CONFIG_KERNEL_GZIP=y
47# CONFIG_KERNEL_BZIP2 is not set
48# CONFIG_KERNEL_LZMA is not set
40CONFIG_SWAP=y 49CONFIG_SWAP=y
41CONFIG_SYSVIPC=y 50CONFIG_SYSVIPC=y
42CONFIG_SYSVIPC_SYSCTL=y 51CONFIG_SYSVIPC_SYSCTL=y
@@ -48,11 +57,12 @@ CONFIG_SYSVIPC_SYSCTL=y
48# 57#
49# RCU Subsystem 58# RCU Subsystem
50# 59#
51CONFIG_CLASSIC_RCU=y 60CONFIG_TREE_RCU=y
52# CONFIG_TREE_RCU is not set 61# CONFIG_TREE_PREEMPT_RCU is not set
53# CONFIG_PREEMPT_RCU is not set 62# CONFIG_RCU_TRACE is not set
63CONFIG_RCU_FANOUT=32
64# CONFIG_RCU_FANOUT_EXACT is not set
54# CONFIG_TREE_RCU_TRACE is not set 65# CONFIG_TREE_RCU_TRACE is not set
55# CONFIG_PREEMPT_RCU_TRACE is not set
56CONFIG_IKCONFIG=y 66CONFIG_IKCONFIG=y
57CONFIG_IKCONFIG_PROC=y 67CONFIG_IKCONFIG_PROC=y
58CONFIG_LOG_BUF_SHIFT=14 68CONFIG_LOG_BUF_SHIFT=14
@@ -92,19 +102,21 @@ CONFIG_TIMERFD=y
92CONFIG_EVENTFD=y 102CONFIG_EVENTFD=y
93CONFIG_SHMEM=y 103CONFIG_SHMEM=y
94CONFIG_AIO=y 104CONFIG_AIO=y
105CONFIG_HAVE_PERF_EVENTS=y
95 106
96# 107#
97# Performance Counters 108# Kernel Performance Events And Counters
98# 109#
110CONFIG_PERF_EVENTS=y
111CONFIG_EVENT_PROFILE=y
112# CONFIG_PERF_COUNTERS is not set
99CONFIG_VM_EVENT_COUNTERS=y 113CONFIG_VM_EVENT_COUNTERS=y
100# CONFIG_STRIP_ASM_SYMS is not set
101CONFIG_COMPAT_BRK=y 114CONFIG_COMPAT_BRK=y
102CONFIG_SLAB=y 115CONFIG_SLAB=y
103# CONFIG_SLUB is not set 116# CONFIG_SLUB is not set
104# CONFIG_SLOB is not set 117# CONFIG_SLOB is not set
105CONFIG_PROFILING=y 118CONFIG_PROFILING=y
106CONFIG_TRACEPOINTS=y 119CONFIG_TRACEPOINTS=y
107CONFIG_MARKERS=y
108CONFIG_OPROFILE=y 120CONFIG_OPROFILE=y
109CONFIG_HAVE_OPROFILE=y 121CONFIG_HAVE_OPROFILE=y
110# CONFIG_KPROBES is not set 122# CONFIG_KPROBES is not set
@@ -114,6 +126,11 @@ CONFIG_HAVE_KRETPROBES=y
114CONFIG_HAVE_ARCH_TRACEHOOK=y 126CONFIG_HAVE_ARCH_TRACEHOOK=y
115CONFIG_HAVE_CLK=y 127CONFIG_HAVE_CLK=y
116CONFIG_HAVE_DMA_API_DEBUG=y 128CONFIG_HAVE_DMA_API_DEBUG=y
129
130#
131# GCOV-based kernel profiling
132#
133# CONFIG_GCOV_KERNEL is not set
117# CONFIG_SLOW_WORK is not set 134# CONFIG_SLOW_WORK is not set
118CONFIG_HAVE_GENERIC_DMA_COHERENT=y 135CONFIG_HAVE_GENERIC_DMA_COHERENT=y
119CONFIG_SLABINFO=y 136CONFIG_SLABINFO=y
@@ -125,7 +142,7 @@ CONFIG_MODULES=y
125# CONFIG_MODVERSIONS is not set 142# CONFIG_MODVERSIONS is not set
126# CONFIG_MODULE_SRCVERSION_ALL is not set 143# CONFIG_MODULE_SRCVERSION_ALL is not set
127CONFIG_BLOCK=y 144CONFIG_BLOCK=y
128# CONFIG_LBD is not set 145CONFIG_LBDAF=y
129# CONFIG_BLK_DEV_BSG is not set 146# CONFIG_BLK_DEV_BSG is not set
130# CONFIG_BLK_DEV_INTEGRITY is not set 147# CONFIG_BLK_DEV_INTEGRITY is not set
131 148
@@ -173,6 +190,7 @@ CONFIG_CPU_SH4A=y
173# CONFIG_CPU_SUBTYPE_SH4_202 is not set 190# CONFIG_CPU_SUBTYPE_SH4_202 is not set
174# CONFIG_CPU_SUBTYPE_SH7723 is not set 191# CONFIG_CPU_SUBTYPE_SH7723 is not set
175# CONFIG_CPU_SUBTYPE_SH7724 is not set 192# CONFIG_CPU_SUBTYPE_SH7724 is not set
193# CONFIG_CPU_SUBTYPE_SH7757 is not set
176CONFIG_CPU_SUBTYPE_SH7763=y 194CONFIG_CPU_SUBTYPE_SH7763=y
177# CONFIG_CPU_SUBTYPE_SH7770 is not set 195# CONFIG_CPU_SUBTYPE_SH7770 is not set
178# CONFIG_CPU_SUBTYPE_SH7780 is not set 196# CONFIG_CPU_SUBTYPE_SH7780 is not set
@@ -214,7 +232,6 @@ CONFIG_SPARSEMEM=y
214CONFIG_HAVE_MEMORY_PRESENT=y 232CONFIG_HAVE_MEMORY_PRESENT=y
215CONFIG_SPARSEMEM_STATIC=y 233CONFIG_SPARSEMEM_STATIC=y
216# CONFIG_MEMORY_HOTPLUG is not set 234# CONFIG_MEMORY_HOTPLUG is not set
217CONFIG_PAGEFLAGS_EXTENDED=y
218CONFIG_SPLIT_PTLOCK_CPUS=4 235CONFIG_SPLIT_PTLOCK_CPUS=4
219CONFIG_MIGRATION=y 236CONFIG_MIGRATION=y
220# CONFIG_PHYS_ADDR_T_64BIT is not set 237# CONFIG_PHYS_ADDR_T_64BIT is not set
@@ -222,6 +239,7 @@ CONFIG_ZONE_DMA_FLAG=0
222CONFIG_NR_QUICK=2 239CONFIG_NR_QUICK=2
223CONFIG_HAVE_MLOCK=y 240CONFIG_HAVE_MLOCK=y
224CONFIG_HAVE_MLOCKED_PAGE_BIT=y 241CONFIG_HAVE_MLOCKED_PAGE_BIT=y
242# CONFIG_KSM is not set
225CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 243CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
226 244
227# 245#
@@ -303,7 +321,8 @@ CONFIG_GUSA=y
303CONFIG_ZERO_PAGE_OFFSET=0x00001000 321CONFIG_ZERO_PAGE_OFFSET=0x00001000
304CONFIG_BOOT_LINK_OFFSET=0x00800000 322CONFIG_BOOT_LINK_OFFSET=0x00800000
305CONFIG_ENTRY_OFFSET=0x00001000 323CONFIG_ENTRY_OFFSET=0x00001000
306CONFIG_CMDLINE_BOOL=y 324CONFIG_CMDLINE_OVERWRITE=y
325# CONFIG_CMDLINE_EXTEND is not set
307CONFIG_CMDLINE="console=ttySC2,115200 root=/dev/sda1 rootdelay=10" 326CONFIG_CMDLINE="console=ttySC2,115200 root=/dev/sda1 rootdelay=10"
308 327
309# 328#
@@ -371,6 +390,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
371# CONFIG_NETFILTER is not set 390# CONFIG_NETFILTER is not set
372# CONFIG_IP_DCCP is not set 391# CONFIG_IP_DCCP is not set
373# CONFIG_IP_SCTP is not set 392# CONFIG_IP_SCTP is not set
393# CONFIG_RDS is not set
374# CONFIG_TIPC is not set 394# CONFIG_TIPC is not set
375# CONFIG_ATM is not set 395# CONFIG_ATM is not set
376# CONFIG_BRIDGE is not set 396# CONFIG_BRIDGE is not set
@@ -401,6 +421,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
401# CONFIG_AF_RXRPC is not set 421# CONFIG_AF_RXRPC is not set
402CONFIG_WIRELESS=y 422CONFIG_WIRELESS=y
403# CONFIG_CFG80211 is not set 423# CONFIG_CFG80211 is not set
424CONFIG_CFG80211_DEFAULT_PS_VALUE=0
404# CONFIG_WIRELESS_OLD_REGULATORY is not set 425# CONFIG_WIRELESS_OLD_REGULATORY is not set
405CONFIG_WIRELESS_EXT=y 426CONFIG_WIRELESS_EXT=y
406CONFIG_WIRELESS_EXT_SYSFS=y 427CONFIG_WIRELESS_EXT_SYSFS=y
@@ -409,7 +430,6 @@ CONFIG_WIRELESS_EXT_SYSFS=y
409# 430#
410# CFG80211 needs to be enabled for MAC80211 431# CFG80211 needs to be enabled for MAC80211
411# 432#
412CONFIG_MAC80211_DEFAULT_PS_VALUE=0
413# CONFIG_WIMAX is not set 433# CONFIG_WIMAX is not set
414# CONFIG_RFKILL is not set 434# CONFIG_RFKILL is not set
415# CONFIG_NET_9P is not set 435# CONFIG_NET_9P is not set
@@ -422,6 +442,7 @@ CONFIG_MAC80211_DEFAULT_PS_VALUE=0
422# Generic Driver Options 442# Generic Driver Options
423# 443#
424CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 444CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
445# CONFIG_DEVTMPFS is not set
425CONFIG_STANDALONE=y 446CONFIG_STANDALONE=y
426CONFIG_PREVENT_FIRMWARE_BUILD=y 447CONFIG_PREVENT_FIRMWARE_BUILD=y
427CONFIG_FW_LOADER=y 448CONFIG_FW_LOADER=y
@@ -431,9 +452,9 @@ CONFIG_EXTRA_FIRMWARE=""
431# CONFIG_CONNECTOR is not set 452# CONFIG_CONNECTOR is not set
432CONFIG_MTD=y 453CONFIG_MTD=y
433# CONFIG_MTD_DEBUG is not set 454# CONFIG_MTD_DEBUG is not set
455# CONFIG_MTD_TESTS is not set
434# CONFIG_MTD_CONCAT is not set 456# CONFIG_MTD_CONCAT is not set
435CONFIG_MTD_PARTITIONS=y 457CONFIG_MTD_PARTITIONS=y
436# CONFIG_MTD_TESTS is not set
437# CONFIG_MTD_REDBOOT_PARTS is not set 458# CONFIG_MTD_REDBOOT_PARTS is not set
438CONFIG_MTD_CMDLINE_PARTS=y 459CONFIG_MTD_CMDLINE_PARTS=y
439# CONFIG_MTD_AR7_PARTS is not set 460# CONFIG_MTD_AR7_PARTS is not set
@@ -488,6 +509,7 @@ CONFIG_MTD_CFI_UTIL=y
488CONFIG_MTD_COMPLEX_MAPPINGS=y 509CONFIG_MTD_COMPLEX_MAPPINGS=y
489CONFIG_MTD_PHYSMAP=y 510CONFIG_MTD_PHYSMAP=y
490# CONFIG_MTD_PHYSMAP_COMPAT is not set 511# CONFIG_MTD_PHYSMAP_COMPAT is not set
512# CONFIG_MTD_GPIO_ADDR is not set
491# CONFIG_MTD_PLATRAM is not set 513# CONFIG_MTD_PLATRAM is not set
492 514
493# 515#
@@ -565,7 +587,6 @@ CONFIG_SCSI_WAIT_SCAN=m
565# CONFIG_SCSI_SRP_ATTRS is not set 587# CONFIG_SCSI_SRP_ATTRS is not set
566CONFIG_SCSI_LOWLEVEL=y 588CONFIG_SCSI_LOWLEVEL=y
567# CONFIG_ISCSI_TCP is not set 589# CONFIG_ISCSI_TCP is not set
568# CONFIG_SCSI_BNX2_ISCSI is not set
569# CONFIG_LIBFC is not set 590# CONFIG_LIBFC is not set
570# CONFIG_LIBFCOE is not set 591# CONFIG_LIBFCOE is not set
571# CONFIG_SCSI_DEBUG is not set 592# CONFIG_SCSI_DEBUG is not set
@@ -621,10 +642,7 @@ CONFIG_SH_ETH=y
621# CONFIG_KS8842 is not set 642# CONFIG_KS8842 is not set
622# CONFIG_NETDEV_1000 is not set 643# CONFIG_NETDEV_1000 is not set
623# CONFIG_NETDEV_10000 is not set 644# CONFIG_NETDEV_10000 is not set
624 645CONFIG_WLAN=y
625#
626# Wireless LAN
627#
628# CONFIG_WLAN_PRE80211 is not set 646# CONFIG_WLAN_PRE80211 is not set
629# CONFIG_WLAN_80211 is not set 647# CONFIG_WLAN_80211 is not set
630 648
@@ -716,11 +734,15 @@ CONFIG_HW_RANDOM=y
716# CONFIG_TCG_TPM is not set 734# CONFIG_TCG_TPM is not set
717# CONFIG_I2C is not set 735# CONFIG_I2C is not set
718# CONFIG_SPI is not set 736# CONFIG_SPI is not set
737
738#
739# PPS support
740#
741# CONFIG_PPS is not set
719# CONFIG_W1 is not set 742# CONFIG_W1 is not set
720# CONFIG_POWER_SUPPLY is not set 743# CONFIG_POWER_SUPPLY is not set
721# CONFIG_HWMON is not set 744# CONFIG_HWMON is not set
722# CONFIG_THERMAL is not set 745# CONFIG_THERMAL is not set
723# CONFIG_THERMAL_HWMON is not set
724# CONFIG_WATCHDOG is not set 746# CONFIG_WATCHDOG is not set
725CONFIG_SSB_POSSIBLE=y 747CONFIG_SSB_POSSIBLE=y
726 748
@@ -830,6 +852,7 @@ CONFIG_USB_MON=y
830# CONFIG_USB_OXU210HP_HCD is not set 852# CONFIG_USB_OXU210HP_HCD is not set
831# CONFIG_USB_ISP116X_HCD is not set 853# CONFIG_USB_ISP116X_HCD is not set
832# CONFIG_USB_ISP1760_HCD is not set 854# CONFIG_USB_ISP1760_HCD is not set
855# CONFIG_USB_ISP1362_HCD is not set
833CONFIG_USB_OHCI_HCD=y 856CONFIG_USB_OHCI_HCD=y
834# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set 857# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
835# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set 858# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
@@ -899,6 +922,7 @@ CONFIG_USB_STORAGE=y
899# CONFIG_USB_LD is not set 922# CONFIG_USB_LD is not set
900# CONFIG_USB_TRANCEVIBRATOR is not set 923# CONFIG_USB_TRANCEVIBRATOR is not set
901# CONFIG_USB_IOWARRIOR is not set 924# CONFIG_USB_IOWARRIOR is not set
925# CONFIG_USB_TEST is not set
902# CONFIG_USB_ISIGHTFW is not set 926# CONFIG_USB_ISIGHTFW is not set
903# CONFIG_USB_VST is not set 927# CONFIG_USB_VST is not set
904# CONFIG_USB_GADGET is not set 928# CONFIG_USB_GADGET is not set
@@ -923,6 +947,8 @@ CONFIG_MMC_BLOCK_BOUNCE=y
923# MMC/SD/SDIO Host Controller Drivers 947# MMC/SD/SDIO Host Controller Drivers
924# 948#
925# CONFIG_MMC_SDHCI is not set 949# CONFIG_MMC_SDHCI is not set
950# CONFIG_MMC_AT91 is not set
951# CONFIG_MMC_ATMELMCI is not set
926# CONFIG_MEMSTICK is not set 952# CONFIG_MEMSTICK is not set
927# CONFIG_NEW_LEDS is not set 953# CONFIG_NEW_LEDS is not set
928# CONFIG_ACCESSIBILITY is not set 954# CONFIG_ACCESSIBILITY is not set
@@ -956,8 +982,10 @@ CONFIG_FS_MBCACHE=y
956# CONFIG_JFS_FS is not set 982# CONFIG_JFS_FS is not set
957CONFIG_FS_POSIX_ACL=y 983CONFIG_FS_POSIX_ACL=y
958# CONFIG_XFS_FS is not set 984# CONFIG_XFS_FS is not set
985# CONFIG_GFS2_FS is not set
959# CONFIG_OCFS2_FS is not set 986# CONFIG_OCFS2_FS is not set
960# CONFIG_BTRFS_FS is not set 987# CONFIG_BTRFS_FS is not set
988# CONFIG_NILFS2_FS is not set
961CONFIG_FILE_LOCKING=y 989CONFIG_FILE_LOCKING=y
962CONFIG_FSNOTIFY=y 990CONFIG_FSNOTIFY=y
963CONFIG_DNOTIFY=y 991CONFIG_DNOTIFY=y
@@ -1022,7 +1050,6 @@ CONFIG_MISC_FILESYSTEMS=y
1022# CONFIG_ROMFS_FS is not set 1050# CONFIG_ROMFS_FS is not set
1023# CONFIG_SYSV_FS is not set 1051# CONFIG_SYSV_FS is not set
1024# CONFIG_UFS_FS is not set 1052# CONFIG_UFS_FS is not set
1025# CONFIG_NILFS2_FS is not set
1026CONFIG_NETWORK_FILESYSTEMS=y 1053CONFIG_NETWORK_FILESYSTEMS=y
1027CONFIG_NFS_FS=y 1054CONFIG_NFS_FS=y
1028# CONFIG_NFS_V3 is not set 1055# CONFIG_NFS_V3 is not set
@@ -1096,6 +1123,7 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1096# CONFIG_ENABLE_MUST_CHECK is not set 1123# CONFIG_ENABLE_MUST_CHECK is not set
1097CONFIG_FRAME_WARN=1024 1124CONFIG_FRAME_WARN=1024
1098# CONFIG_MAGIC_SYSRQ is not set 1125# CONFIG_MAGIC_SYSRQ is not set
1126# CONFIG_STRIP_ASM_SYMS is not set
1099# CONFIG_UNUSED_SYMBOLS is not set 1127# CONFIG_UNUSED_SYMBOLS is not set
1100CONFIG_DEBUG_FS=y 1128CONFIG_DEBUG_FS=y
1101# CONFIG_HEADERS_CHECK is not set 1129# CONFIG_HEADERS_CHECK is not set
@@ -1107,11 +1135,15 @@ CONFIG_STACKTRACE=y
1107# CONFIG_LATENCYTOP is not set 1135# CONFIG_LATENCYTOP is not set
1108CONFIG_NOP_TRACER=y 1136CONFIG_NOP_TRACER=y
1109CONFIG_HAVE_FUNCTION_TRACER=y 1137CONFIG_HAVE_FUNCTION_TRACER=y
1138CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1139CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
1110CONFIG_HAVE_DYNAMIC_FTRACE=y 1140CONFIG_HAVE_DYNAMIC_FTRACE=y
1111CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1141CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1142CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
1112CONFIG_RING_BUFFER=y 1143CONFIG_RING_BUFFER=y
1113CONFIG_EVENT_TRACING=y 1144CONFIG_EVENT_TRACING=y
1114CONFIG_CONTEXT_SWITCH_TRACER=y 1145CONFIG_CONTEXT_SWITCH_TRACER=y
1146CONFIG_RING_BUFFER_ALLOW_SWAP=y
1115CONFIG_TRACING=y 1147CONFIG_TRACING=y
1116CONFIG_TRACING_SUPPORT=y 1148CONFIG_TRACING_SUPPORT=y
1117# CONFIG_FTRACE is not set 1149# CONFIG_FTRACE is not set
@@ -1121,6 +1153,7 @@ CONFIG_TRACING_SUPPORT=y
1121CONFIG_HAVE_ARCH_KGDB=y 1153CONFIG_HAVE_ARCH_KGDB=y
1122# CONFIG_SH_STANDARD_BIOS is not set 1154# CONFIG_SH_STANDARD_BIOS is not set
1123# CONFIG_EARLY_SCIF_CONSOLE is not set 1155# CONFIG_EARLY_SCIF_CONSOLE is not set
1156# CONFIG_DWARF_UNWINDER is not set
1124 1157
1125# 1158#
1126# Security options 1159# Security options
@@ -1134,7 +1167,6 @@ CONFIG_CRYPTO=y
1134# 1167#
1135# Crypto core or helper 1168# Crypto core or helper
1136# 1169#
1137# CONFIG_CRYPTO_FIPS is not set
1138# CONFIG_CRYPTO_MANAGER is not set 1170# CONFIG_CRYPTO_MANAGER is not set
1139# CONFIG_CRYPTO_MANAGER2 is not set 1171# CONFIG_CRYPTO_MANAGER2 is not set
1140# CONFIG_CRYPTO_GF128MUL is not set 1172# CONFIG_CRYPTO_GF128MUL is not set
@@ -1166,11 +1198,13 @@ CONFIG_CRYPTO=y
1166# 1198#
1167# CONFIG_CRYPTO_HMAC is not set 1199# CONFIG_CRYPTO_HMAC is not set
1168# CONFIG_CRYPTO_XCBC is not set 1200# CONFIG_CRYPTO_XCBC is not set
1201# CONFIG_CRYPTO_VMAC is not set
1169 1202
1170# 1203#
1171# Digest 1204# Digest
1172# 1205#
1173# CONFIG_CRYPTO_CRC32C is not set 1206# CONFIG_CRYPTO_CRC32C is not set
1207# CONFIG_CRYPTO_GHASH is not set
1174# CONFIG_CRYPTO_MD4 is not set 1208# CONFIG_CRYPTO_MD4 is not set
1175# CONFIG_CRYPTO_MD5 is not set 1209# CONFIG_CRYPTO_MD5 is not set
1176# CONFIG_CRYPTO_MICHAEL_MIC is not set 1210# CONFIG_CRYPTO_MICHAEL_MIC is not set
@@ -1232,5 +1266,6 @@ CONFIG_CRC32=y
1232CONFIG_HAS_IOMEM=y 1266CONFIG_HAS_IOMEM=y
1233CONFIG_HAS_IOPORT=y 1267CONFIG_HAS_IOPORT=y
1234CONFIG_HAS_DMA=y 1268CONFIG_HAS_DMA=y
1269CONFIG_HAVE_LMB=y
1235CONFIG_NLATTR=y 1270CONFIG_NLATTR=y
1236CONFIG_GENERIC_ATOMIC64=y 1271CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/sh7770_generic_defconfig b/arch/sh/configs/sh7770_generic_defconfig
index 426a88f7a23b..34bed5541f31 100644
--- a/arch/sh/configs/sh7770_generic_defconfig
+++ b/arch/sh/configs/sh7770_generic_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.30 3# Linux kernel version: 2.6.31
4# Thu Jun 18 13:08:05 2009 4# Thu Sep 24 19:17:16 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -14,6 +14,7 @@ CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y 14CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
16CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_IRQ_PER_CPU=y
17# CONFIG_GENERIC_GPIO is not set 18# CONFIG_GENERIC_GPIO is not set
18CONFIG_GENERIC_TIME=y 19CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 20CONFIG_GENERIC_CLOCKEVENTS=y
@@ -27,7 +28,9 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
27# CONFIG_ARCH_HAS_ILOG2_U64 is not set 28# CONFIG_ARCH_HAS_ILOG2_U64 is not set
28CONFIG_ARCH_NO_VIRT_TO_BUS=y 29CONFIG_ARCH_NO_VIRT_TO_BUS=y
29CONFIG_ARCH_HAS_DEFAULT_IDLE=y 30CONFIG_ARCH_HAS_DEFAULT_IDLE=y
31CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
30CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 32CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
33CONFIG_CONSTRUCTORS=y
31 34
32# 35#
33# General setup 36# General setup
@@ -37,6 +40,12 @@ CONFIG_BROKEN_ON_SMP=y
37CONFIG_INIT_ENV_ARG_LIMIT=32 40CONFIG_INIT_ENV_ARG_LIMIT=32
38CONFIG_LOCALVERSION="" 41CONFIG_LOCALVERSION=""
39# CONFIG_LOCALVERSION_AUTO is not set 42# CONFIG_LOCALVERSION_AUTO is not set
43CONFIG_HAVE_KERNEL_GZIP=y
44CONFIG_HAVE_KERNEL_BZIP2=y
45CONFIG_HAVE_KERNEL_LZMA=y
46CONFIG_KERNEL_GZIP=y
47# CONFIG_KERNEL_BZIP2 is not set
48# CONFIG_KERNEL_LZMA is not set
40CONFIG_SWAP=y 49CONFIG_SWAP=y
41CONFIG_SYSVIPC=y 50CONFIG_SYSVIPC=y
42CONFIG_SYSVIPC_SYSCTL=y 51CONFIG_SYSVIPC_SYSCTL=y
@@ -45,14 +54,12 @@ CONFIG_SYSVIPC_SYSCTL=y
45# 54#
46# RCU Subsystem 55# RCU Subsystem
47# 56#
48# CONFIG_CLASSIC_RCU is not set
49CONFIG_TREE_RCU=y 57CONFIG_TREE_RCU=y
50# CONFIG_PREEMPT_RCU is not set 58# CONFIG_TREE_PREEMPT_RCU is not set
51# CONFIG_RCU_TRACE is not set 59# CONFIG_RCU_TRACE is not set
52CONFIG_RCU_FANOUT=32 60CONFIG_RCU_FANOUT=32
53# CONFIG_RCU_FANOUT_EXACT is not set 61# CONFIG_RCU_FANOUT_EXACT is not set
54# CONFIG_TREE_RCU_TRACE is not set 62# CONFIG_TREE_RCU_TRACE is not set
55# CONFIG_PREEMPT_RCU_TRACE is not set
56# CONFIG_IKCONFIG is not set 63# CONFIG_IKCONFIG is not set
57CONFIG_LOG_BUF_SHIFT=17 64CONFIG_LOG_BUF_SHIFT=17
58CONFIG_GROUP_SCHED=y 65CONFIG_GROUP_SCHED=y
@@ -91,19 +98,21 @@ CONFIG_TIMERFD=y
91CONFIG_EVENTFD=y 98CONFIG_EVENTFD=y
92CONFIG_SHMEM=y 99CONFIG_SHMEM=y
93CONFIG_AIO=y 100CONFIG_AIO=y
101CONFIG_HAVE_PERF_EVENTS=y
94 102
95# 103#
96# Performance Counters 104# Kernel Performance Events And Counters
97# 105#
106CONFIG_PERF_EVENTS=y
107CONFIG_EVENT_PROFILE=y
108# CONFIG_PERF_COUNTERS is not set
98CONFIG_VM_EVENT_COUNTERS=y 109CONFIG_VM_EVENT_COUNTERS=y
99# CONFIG_STRIP_ASM_SYMS is not set
100# CONFIG_COMPAT_BRK is not set 110# CONFIG_COMPAT_BRK is not set
101# CONFIG_SLAB is not set 111# CONFIG_SLAB is not set
102CONFIG_SLUB=y 112CONFIG_SLUB=y
103# CONFIG_SLOB is not set 113# CONFIG_SLOB is not set
104CONFIG_PROFILING=y 114CONFIG_PROFILING=y
105CONFIG_TRACEPOINTS=y 115CONFIG_TRACEPOINTS=y
106CONFIG_MARKERS=y
107CONFIG_OPROFILE=y 116CONFIG_OPROFILE=y
108CONFIG_HAVE_OPROFILE=y 117CONFIG_HAVE_OPROFILE=y
109CONFIG_HAVE_IOREMAP_PROT=y 118CONFIG_HAVE_IOREMAP_PROT=y
@@ -112,13 +121,18 @@ CONFIG_HAVE_KRETPROBES=y
112CONFIG_HAVE_ARCH_TRACEHOOK=y 121CONFIG_HAVE_ARCH_TRACEHOOK=y
113CONFIG_HAVE_CLK=y 122CONFIG_HAVE_CLK=y
114CONFIG_HAVE_DMA_API_DEBUG=y 123CONFIG_HAVE_DMA_API_DEBUG=y
124
125#
126# GCOV-based kernel profiling
127#
128# CONFIG_GCOV_KERNEL is not set
115# CONFIG_SLOW_WORK is not set 129# CONFIG_SLOW_WORK is not set
116CONFIG_HAVE_GENERIC_DMA_COHERENT=y 130CONFIG_HAVE_GENERIC_DMA_COHERENT=y
117CONFIG_RT_MUTEXES=y 131CONFIG_RT_MUTEXES=y
118CONFIG_BASE_SMALL=0 132CONFIG_BASE_SMALL=0
119# CONFIG_MODULES is not set 133# CONFIG_MODULES is not set
120CONFIG_BLOCK=y 134CONFIG_BLOCK=y
121# CONFIG_LBD is not set 135CONFIG_LBDAF=y
122# CONFIG_BLK_DEV_BSG is not set 136# CONFIG_BLK_DEV_BSG is not set
123# CONFIG_BLK_DEV_INTEGRITY is not set 137# CONFIG_BLK_DEV_INTEGRITY is not set
124 138
@@ -166,6 +180,7 @@ CONFIG_CPU_SH4A=y
166# CONFIG_CPU_SUBTYPE_SH4_202 is not set 180# CONFIG_CPU_SUBTYPE_SH4_202 is not set
167# CONFIG_CPU_SUBTYPE_SH7723 is not set 181# CONFIG_CPU_SUBTYPE_SH7723 is not set
168# CONFIG_CPU_SUBTYPE_SH7724 is not set 182# CONFIG_CPU_SUBTYPE_SH7724 is not set
183# CONFIG_CPU_SUBTYPE_SH7757 is not set
169# CONFIG_CPU_SUBTYPE_SH7763 is not set 184# CONFIG_CPU_SUBTYPE_SH7763 is not set
170CONFIG_CPU_SUBTYPE_SH7770=y 185CONFIG_CPU_SUBTYPE_SH7770=y
171# CONFIG_CPU_SUBTYPE_SH7780 is not set 186# CONFIG_CPU_SUBTYPE_SH7780 is not set
@@ -210,7 +225,6 @@ CONFIG_SPARSEMEM_STATIC=y
210# 225#
211# Memory hotplug is currently incompatible with Software Suspend 226# Memory hotplug is currently incompatible with Software Suspend
212# 227#
213CONFIG_PAGEFLAGS_EXTENDED=y
214CONFIG_SPLIT_PTLOCK_CPUS=4 228CONFIG_SPLIT_PTLOCK_CPUS=4
215CONFIG_MIGRATION=y 229CONFIG_MIGRATION=y
216# CONFIG_PHYS_ADDR_T_64BIT is not set 230# CONFIG_PHYS_ADDR_T_64BIT is not set
@@ -218,6 +232,7 @@ CONFIG_ZONE_DMA_FLAG=0
218CONFIG_NR_QUICK=2 232CONFIG_NR_QUICK=2
219CONFIG_HAVE_MLOCK=y 233CONFIG_HAVE_MLOCK=y
220CONFIG_HAVE_MLOCKED_PAGE_BIT=y 234CONFIG_HAVE_MLOCKED_PAGE_BIT=y
235# CONFIG_KSM is not set
221CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 236CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
222 237
223# 238#
@@ -313,7 +328,8 @@ CONFIG_GUSA=y
313CONFIG_ZERO_PAGE_OFFSET=0x00001000 328CONFIG_ZERO_PAGE_OFFSET=0x00001000
314CONFIG_BOOT_LINK_OFFSET=0x00800000 329CONFIG_BOOT_LINK_OFFSET=0x00800000
315CONFIG_ENTRY_OFFSET=0x00001000 330CONFIG_ENTRY_OFFSET=0x00001000
316# CONFIG_CMDLINE_BOOL is not set 331# CONFIG_CMDLINE_OVERWRITE is not set
332# CONFIG_CMDLINE_EXTEND is not set
317 333
318# 334#
319# Bus options 335# Bus options
@@ -338,6 +354,7 @@ CONFIG_PM_SLEEP=y
338CONFIG_HIBERNATION_NVS=y 354CONFIG_HIBERNATION_NVS=y
339CONFIG_HIBERNATION=y 355CONFIG_HIBERNATION=y
340CONFIG_PM_STD_PARTITION="" 356CONFIG_PM_STD_PARTITION=""
357# CONFIG_PM_RUNTIME is not set
341CONFIG_CPU_IDLE=y 358CONFIG_CPU_IDLE=y
342CONFIG_CPU_IDLE_GOV_LADDER=y 359CONFIG_CPU_IDLE_GOV_LADDER=y
343CONFIG_CPU_IDLE_GOV_MENU=y 360CONFIG_CPU_IDLE_GOV_MENU=y
@@ -420,6 +437,7 @@ CONFIG_SERIAL_CORE_CONSOLE=y
420# CONFIG_TCG_TPM is not set 437# CONFIG_TCG_TPM is not set
421CONFIG_I2C=y 438CONFIG_I2C=y
422CONFIG_I2C_BOARDINFO=y 439CONFIG_I2C_BOARDINFO=y
440CONFIG_I2C_COMPAT=y
423CONFIG_I2C_CHARDEV=y 441CONFIG_I2C_CHARDEV=y
424CONFIG_I2C_HELPER_AUTO=y 442CONFIG_I2C_HELPER_AUTO=y
425 443
@@ -430,6 +448,7 @@ CONFIG_I2C_HELPER_AUTO=y
430# 448#
431# I2C system bus drivers (mostly embedded / system-on-chip) 449# I2C system bus drivers (mostly embedded / system-on-chip)
432# 450#
451# CONFIG_I2C_DESIGNWARE is not set
433# CONFIG_I2C_OCORES is not set 452# CONFIG_I2C_OCORES is not set
434CONFIG_I2C_SH_MOBILE=y 453CONFIG_I2C_SH_MOBILE=y
435# CONFIG_I2C_SIMTEC is not set 454# CONFIG_I2C_SIMTEC is not set
@@ -449,20 +468,21 @@ CONFIG_I2C_SH_MOBILE=y
449# Miscellaneous I2C Chip support 468# Miscellaneous I2C Chip support
450# 469#
451# CONFIG_DS1682 is not set 470# CONFIG_DS1682 is not set
452# CONFIG_SENSORS_PCF8574 is not set
453# CONFIG_PCF8575 is not set
454# CONFIG_SENSORS_PCA9539 is not set
455# CONFIG_SENSORS_TSL2550 is not set 471# CONFIG_SENSORS_TSL2550 is not set
456# CONFIG_I2C_DEBUG_CORE is not set 472# CONFIG_I2C_DEBUG_CORE is not set
457# CONFIG_I2C_DEBUG_ALGO is not set 473# CONFIG_I2C_DEBUG_ALGO is not set
458# CONFIG_I2C_DEBUG_BUS is not set 474# CONFIG_I2C_DEBUG_BUS is not set
459# CONFIG_I2C_DEBUG_CHIP is not set 475# CONFIG_I2C_DEBUG_CHIP is not set
460# CONFIG_SPI is not set 476# CONFIG_SPI is not set
477
478#
479# PPS support
480#
481# CONFIG_PPS is not set
461# CONFIG_W1 is not set 482# CONFIG_W1 is not set
462# CONFIG_POWER_SUPPLY is not set 483# CONFIG_POWER_SUPPLY is not set
463# CONFIG_HWMON is not set 484# CONFIG_HWMON is not set
464# CONFIG_THERMAL is not set 485# CONFIG_THERMAL is not set
465# CONFIG_THERMAL_HWMON is not set
466# CONFIG_WATCHDOG is not set 486# CONFIG_WATCHDOG is not set
467CONFIG_SSB_POSSIBLE=y 487CONFIG_SSB_POSSIBLE=y
468 488
@@ -481,8 +501,10 @@ CONFIG_SSB_POSSIBLE=y
481# CONFIG_MFD_TMIO is not set 501# CONFIG_MFD_TMIO is not set
482# CONFIG_PMIC_DA903X is not set 502# CONFIG_PMIC_DA903X is not set
483# CONFIG_MFD_WM8400 is not set 503# CONFIG_MFD_WM8400 is not set
504# CONFIG_MFD_WM831X is not set
484# CONFIG_MFD_WM8350_I2C is not set 505# CONFIG_MFD_WM8350_I2C is not set
485# CONFIG_MFD_PCF50633 is not set 506# CONFIG_MFD_PCF50633 is not set
507# CONFIG_AB3100_CORE is not set
486# CONFIG_REGULATOR is not set 508# CONFIG_REGULATOR is not set
487# CONFIG_MEDIA_SUPPORT is not set 509# CONFIG_MEDIA_SUPPORT is not set
488 510
@@ -533,6 +555,7 @@ CONFIG_RTC_INTF_DEV=y
533# CONFIG_RTC_DRV_S35390A is not set 555# CONFIG_RTC_DRV_S35390A is not set
534# CONFIG_RTC_DRV_FM3130 is not set 556# CONFIG_RTC_DRV_FM3130 is not set
535# CONFIG_RTC_DRV_RX8581 is not set 557# CONFIG_RTC_DRV_RX8581 is not set
558# CONFIG_RTC_DRV_RX8025 is not set
536 559
537# 560#
538# SPI RTC drivers 561# SPI RTC drivers
@@ -580,7 +603,9 @@ CONFIG_UIO_PDRV_GENIRQ=y
580# CONFIG_JFS_FS is not set 603# CONFIG_JFS_FS is not set
581# CONFIG_FS_POSIX_ACL is not set 604# CONFIG_FS_POSIX_ACL is not set
582# CONFIG_XFS_FS is not set 605# CONFIG_XFS_FS is not set
606# CONFIG_GFS2_FS is not set
583# CONFIG_BTRFS_FS is not set 607# CONFIG_BTRFS_FS is not set
608# CONFIG_NILFS2_FS is not set
584CONFIG_FILE_LOCKING=y 609CONFIG_FILE_LOCKING=y
585CONFIG_FSNOTIFY=y 610CONFIG_FSNOTIFY=y
586# CONFIG_DNOTIFY is not set 611# CONFIG_DNOTIFY is not set
@@ -635,6 +660,7 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y
635# CONFIG_ENABLE_MUST_CHECK is not set 660# CONFIG_ENABLE_MUST_CHECK is not set
636CONFIG_FRAME_WARN=1024 661CONFIG_FRAME_WARN=1024
637# CONFIG_MAGIC_SYSRQ is not set 662# CONFIG_MAGIC_SYSRQ is not set
663# CONFIG_STRIP_ASM_SYMS is not set
638# CONFIG_UNUSED_SYMBOLS is not set 664# CONFIG_UNUSED_SYMBOLS is not set
639CONFIG_DEBUG_FS=y 665CONFIG_DEBUG_FS=y
640# CONFIG_HEADERS_CHECK is not set 666# CONFIG_HEADERS_CHECK is not set
@@ -647,11 +673,15 @@ CONFIG_STACKTRACE=y
647# CONFIG_SYSCTL_SYSCALL_CHECK is not set 673# CONFIG_SYSCTL_SYSCALL_CHECK is not set
648CONFIG_NOP_TRACER=y 674CONFIG_NOP_TRACER=y
649CONFIG_HAVE_FUNCTION_TRACER=y 675CONFIG_HAVE_FUNCTION_TRACER=y
676CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
677CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
650CONFIG_HAVE_DYNAMIC_FTRACE=y 678CONFIG_HAVE_DYNAMIC_FTRACE=y
651CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 679CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
680CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
652CONFIG_RING_BUFFER=y 681CONFIG_RING_BUFFER=y
653CONFIG_EVENT_TRACING=y 682CONFIG_EVENT_TRACING=y
654CONFIG_CONTEXT_SWITCH_TRACER=y 683CONFIG_CONTEXT_SWITCH_TRACER=y
684CONFIG_RING_BUFFER_ALLOW_SWAP=y
655CONFIG_TRACING=y 685CONFIG_TRACING=y
656CONFIG_TRACING_SUPPORT=y 686CONFIG_TRACING_SUPPORT=y
657# CONFIG_FTRACE is not set 687# CONFIG_FTRACE is not set
@@ -661,6 +691,7 @@ CONFIG_TRACING_SUPPORT=y
661CONFIG_HAVE_ARCH_KGDB=y 691CONFIG_HAVE_ARCH_KGDB=y
662# CONFIG_SH_STANDARD_BIOS is not set 692# CONFIG_SH_STANDARD_BIOS is not set
663# CONFIG_EARLY_SCIF_CONSOLE is not set 693# CONFIG_EARLY_SCIF_CONSOLE is not set
694# CONFIG_DWARF_UNWINDER is not set
664 695
665# 696#
666# Security options 697# Security options
@@ -685,4 +716,5 @@ CONFIG_GENERIC_FIND_LAST_BIT=y
685CONFIG_HAS_IOMEM=y 716CONFIG_HAS_IOMEM=y
686CONFIG_HAS_IOPORT=y 717CONFIG_HAS_IOPORT=y
687CONFIG_HAS_DMA=y 718CONFIG_HAS_DMA=y
719CONFIG_HAVE_LMB=y
688CONFIG_GENERIC_ATOMIC64=y 720CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/sh7785lcr_32bit_defconfig b/arch/sh/configs/sh7785lcr_32bit_defconfig
index ed316f602db6..51cbaedf7a56 100644
--- a/arch/sh/configs/sh7785lcr_32bit_defconfig
+++ b/arch/sh/configs/sh7785lcr_32bit_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.30 3# Linux kernel version: 2.6.31
4# Thu Jun 18 13:08:29 2009 4# Fri Sep 25 11:39:20 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -14,6 +14,7 @@ CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y 14CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
16CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_IRQ_PER_CPU=y
17# CONFIG_GENERIC_GPIO is not set 18# CONFIG_GENERIC_GPIO is not set
18CONFIG_GENERIC_TIME=y 19CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 20CONFIG_GENERIC_CLOCKEVENTS=y
@@ -29,8 +30,9 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
29# CONFIG_ARCH_HAS_ILOG2_U64 is not set 30# CONFIG_ARCH_HAS_ILOG2_U64 is not set
30CONFIG_ARCH_NO_VIRT_TO_BUS=y 31CONFIG_ARCH_NO_VIRT_TO_BUS=y
31CONFIG_ARCH_HAS_DEFAULT_IDLE=y 32CONFIG_ARCH_HAS_DEFAULT_IDLE=y
32CONFIG_IO_TRAPPED=y 33CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
33CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 34CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
35CONFIG_CONSTRUCTORS=y
34 36
35# 37#
36# General setup 38# General setup
@@ -41,10 +43,17 @@ CONFIG_LOCK_KERNEL=y
41CONFIG_INIT_ENV_ARG_LIMIT=32 43CONFIG_INIT_ENV_ARG_LIMIT=32
42CONFIG_LOCALVERSION="" 44CONFIG_LOCALVERSION=""
43CONFIG_LOCALVERSION_AUTO=y 45CONFIG_LOCALVERSION_AUTO=y
46CONFIG_HAVE_KERNEL_GZIP=y
47CONFIG_HAVE_KERNEL_BZIP2=y
48CONFIG_HAVE_KERNEL_LZMA=y
49CONFIG_KERNEL_GZIP=y
50# CONFIG_KERNEL_BZIP2 is not set
51# CONFIG_KERNEL_LZMA is not set
44CONFIG_SWAP=y 52CONFIG_SWAP=y
45CONFIG_SYSVIPC=y 53CONFIG_SYSVIPC=y
46CONFIG_SYSVIPC_SYSCTL=y 54CONFIG_SYSVIPC_SYSCTL=y
47# CONFIG_POSIX_MQUEUE is not set 55CONFIG_POSIX_MQUEUE=y
56CONFIG_POSIX_MQUEUE_SYSCTL=y
48CONFIG_BSD_PROCESS_ACCT=y 57CONFIG_BSD_PROCESS_ACCT=y
49# CONFIG_BSD_PROCESS_ACCT_V3 is not set 58# CONFIG_BSD_PROCESS_ACCT_V3 is not set
50# CONFIG_TASKSTATS is not set 59# CONFIG_TASKSTATS is not set
@@ -53,11 +62,12 @@ CONFIG_BSD_PROCESS_ACCT=y
53# 62#
54# RCU Subsystem 63# RCU Subsystem
55# 64#
56CONFIG_CLASSIC_RCU=y 65CONFIG_TREE_RCU=y
57# CONFIG_TREE_RCU is not set 66# CONFIG_TREE_PREEMPT_RCU is not set
58# CONFIG_PREEMPT_RCU is not set 67# CONFIG_RCU_TRACE is not set
68CONFIG_RCU_FANOUT=32
69# CONFIG_RCU_FANOUT_EXACT is not set
59# CONFIG_TREE_RCU_TRACE is not set 70# CONFIG_TREE_RCU_TRACE is not set
60# CONFIG_PREEMPT_RCU_TRACE is not set
61CONFIG_IKCONFIG=y 71CONFIG_IKCONFIG=y
62CONFIG_IKCONFIG_PROC=y 72CONFIG_IKCONFIG_PROC=y
63CONFIG_LOG_BUF_SHIFT=14 73CONFIG_LOG_BUF_SHIFT=14
@@ -67,8 +77,7 @@ CONFIG_FAIR_GROUP_SCHED=y
67CONFIG_USER_SCHED=y 77CONFIG_USER_SCHED=y
68# CONFIG_CGROUP_SCHED is not set 78# CONFIG_CGROUP_SCHED is not set
69# CONFIG_CGROUPS is not set 79# CONFIG_CGROUPS is not set
70CONFIG_SYSFS_DEPRECATED=y 80# CONFIG_SYSFS_DEPRECATED_V2 is not set
71CONFIG_SYSFS_DEPRECATED_V2=y
72# CONFIG_RELAY is not set 81# CONFIG_RELAY is not set
73# CONFIG_NAMESPACES is not set 82# CONFIG_NAMESPACES is not set
74# CONFIG_BLK_DEV_INITRD is not set 83# CONFIG_BLK_DEV_INITRD is not set
@@ -79,7 +88,7 @@ CONFIG_EMBEDDED=y
79CONFIG_UID16=y 88CONFIG_UID16=y
80CONFIG_SYSCTL_SYSCALL=y 89CONFIG_SYSCTL_SYSCALL=y
81CONFIG_KALLSYMS=y 90CONFIG_KALLSYMS=y
82# CONFIG_KALLSYMS_ALL is not set 91CONFIG_KALLSYMS_ALL=y
83# CONFIG_KALLSYMS_EXTRA_PASS is not set 92# CONFIG_KALLSYMS_EXTRA_PASS is not set
84CONFIG_HOTPLUG=y 93CONFIG_HOTPLUG=y
85CONFIG_PRINTK=y 94CONFIG_PRINTK=y
@@ -93,28 +102,37 @@ CONFIG_TIMERFD=y
93CONFIG_EVENTFD=y 102CONFIG_EVENTFD=y
94CONFIG_SHMEM=y 103CONFIG_SHMEM=y
95CONFIG_AIO=y 104CONFIG_AIO=y
105CONFIG_HAVE_PERF_EVENTS=y
96 106
97# 107#
98# Performance Counters 108# Kernel Performance Events And Counters
99# 109#
110CONFIG_PERF_EVENTS=y
111CONFIG_EVENT_PROFILE=y
112CONFIG_PERF_COUNTERS=y
100CONFIG_VM_EVENT_COUNTERS=y 113CONFIG_VM_EVENT_COUNTERS=y
101CONFIG_PCI_QUIRKS=y 114CONFIG_PCI_QUIRKS=y
102# CONFIG_STRIP_ASM_SYMS is not set
103CONFIG_COMPAT_BRK=y 115CONFIG_COMPAT_BRK=y
104CONFIG_SLAB=y 116CONFIG_SLAB=y
105# CONFIG_SLUB is not set 117# CONFIG_SLUB is not set
106# CONFIG_SLOB is not set 118# CONFIG_SLOB is not set
107CONFIG_PROFILING=y 119CONFIG_PROFILING=y
108# CONFIG_MARKERS is not set 120CONFIG_TRACEPOINTS=y
109# CONFIG_OPROFILE is not set 121CONFIG_OPROFILE=y
110CONFIG_HAVE_OPROFILE=y 122CONFIG_HAVE_OPROFILE=y
111# CONFIG_KPROBES is not set 123CONFIG_KPROBES=y
124CONFIG_KRETPROBES=y
112CONFIG_HAVE_IOREMAP_PROT=y 125CONFIG_HAVE_IOREMAP_PROT=y
113CONFIG_HAVE_KPROBES=y 126CONFIG_HAVE_KPROBES=y
114CONFIG_HAVE_KRETPROBES=y 127CONFIG_HAVE_KRETPROBES=y
115CONFIG_HAVE_ARCH_TRACEHOOK=y 128CONFIG_HAVE_ARCH_TRACEHOOK=y
116CONFIG_HAVE_CLK=y 129CONFIG_HAVE_CLK=y
117CONFIG_HAVE_DMA_API_DEBUG=y 130CONFIG_HAVE_DMA_API_DEBUG=y
131
132#
133# GCOV-based kernel profiling
134#
135CONFIG_GCOV_KERNEL=y
118# CONFIG_SLOW_WORK is not set 136# CONFIG_SLOW_WORK is not set
119CONFIG_HAVE_GENERIC_DMA_COHERENT=y 137CONFIG_HAVE_GENERIC_DMA_COHERENT=y
120CONFIG_SLABINFO=y 138CONFIG_SLABINFO=y
@@ -127,7 +145,7 @@ CONFIG_MODULE_UNLOAD=y
127# CONFIG_MODVERSIONS is not set 145# CONFIG_MODVERSIONS is not set
128# CONFIG_MODULE_SRCVERSION_ALL is not set 146# CONFIG_MODULE_SRCVERSION_ALL is not set
129CONFIG_BLOCK=y 147CONFIG_BLOCK=y
130# CONFIG_LBD is not set 148# CONFIG_LBDAF is not set
131# CONFIG_BLK_DEV_BSG is not set 149# CONFIG_BLK_DEV_BSG is not set
132# CONFIG_BLK_DEV_INTEGRITY is not set 150# CONFIG_BLK_DEV_INTEGRITY is not set
133 151
@@ -176,6 +194,7 @@ CONFIG_CPU_SHX2=y
176# CONFIG_CPU_SUBTYPE_SH4_202 is not set 194# CONFIG_CPU_SUBTYPE_SH4_202 is not set
177# CONFIG_CPU_SUBTYPE_SH7723 is not set 195# CONFIG_CPU_SUBTYPE_SH7723 is not set
178# CONFIG_CPU_SUBTYPE_SH7724 is not set 196# CONFIG_CPU_SUBTYPE_SH7724 is not set
197# CONFIG_CPU_SUBTYPE_SH7757 is not set
179# CONFIG_CPU_SUBTYPE_SH7763 is not set 198# CONFIG_CPU_SUBTYPE_SH7763 is not set
180# CONFIG_CPU_SUBTYPE_SH7770 is not set 199# CONFIG_CPU_SUBTYPE_SH7770 is not set
181# CONFIG_CPU_SUBTYPE_SH7780 is not set 200# CONFIG_CPU_SUBTYPE_SH7780 is not set
@@ -215,6 +234,12 @@ CONFIG_PAGE_SIZE_4KB=y
215# CONFIG_PAGE_SIZE_8KB is not set 234# CONFIG_PAGE_SIZE_8KB is not set
216# CONFIG_PAGE_SIZE_16KB is not set 235# CONFIG_PAGE_SIZE_16KB is not set
217# CONFIG_PAGE_SIZE_64KB is not set 236# CONFIG_PAGE_SIZE_64KB is not set
237CONFIG_HUGETLB_PAGE_SIZE_64K=y
238# CONFIG_HUGETLB_PAGE_SIZE_256K is not set
239# CONFIG_HUGETLB_PAGE_SIZE_1MB is not set
240# CONFIG_HUGETLB_PAGE_SIZE_4MB is not set
241# CONFIG_HUGETLB_PAGE_SIZE_64MB is not set
242# CONFIG_HUGETLB_PAGE_SIZE_512MB is not set
218CONFIG_SELECT_MEMORY_MODEL=y 243CONFIG_SELECT_MEMORY_MODEL=y
219# CONFIG_FLATMEM_MANUAL is not set 244# CONFIG_FLATMEM_MANUAL is not set
220# CONFIG_DISCONTIGMEM_MANUAL is not set 245# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -223,7 +248,6 @@ CONFIG_SPARSEMEM=y
223CONFIG_HAVE_MEMORY_PRESENT=y 248CONFIG_HAVE_MEMORY_PRESENT=y
224CONFIG_SPARSEMEM_STATIC=y 249CONFIG_SPARSEMEM_STATIC=y
225# CONFIG_MEMORY_HOTPLUG is not set 250# CONFIG_MEMORY_HOTPLUG is not set
226CONFIG_PAGEFLAGS_EXTENDED=y
227CONFIG_SPLIT_PTLOCK_CPUS=4 251CONFIG_SPLIT_PTLOCK_CPUS=4
228CONFIG_MIGRATION=y 252CONFIG_MIGRATION=y
229# CONFIG_PHYS_ADDR_T_64BIT is not set 253# CONFIG_PHYS_ADDR_T_64BIT is not set
@@ -231,6 +255,7 @@ CONFIG_ZONE_DMA_FLAG=0
231CONFIG_NR_QUICK=2 255CONFIG_NR_QUICK=2
232CONFIG_HAVE_MLOCK=y 256CONFIG_HAVE_MLOCK=y
233CONFIG_HAVE_MLOCKED_PAGE_BIT=y 257CONFIG_HAVE_MLOCKED_PAGE_BIT=y
258# CONFIG_KSM is not set
234CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 259CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
235 260
236# 261#
@@ -256,6 +281,7 @@ CONFIG_CPU_HAS_FPU=y
256# 281#
257# CONFIG_SH_HIGHLANDER is not set 282# CONFIG_SH_HIGHLANDER is not set
258CONFIG_SH_SH7785LCR=y 283CONFIG_SH_SH7785LCR=y
284# CONFIG_SH_SH7785LCR_PT is not set
259 285
260# 286#
261# Timer and clock configuration 287# Timer and clock configuration
@@ -264,14 +290,29 @@ CONFIG_SH_TIMER_TMU=y
264CONFIG_SH_PCLK_FREQ=50000000 290CONFIG_SH_PCLK_FREQ=50000000
265CONFIG_SH_CLK_CPG=y 291CONFIG_SH_CLK_CPG=y
266CONFIG_TICK_ONESHOT=y 292CONFIG_TICK_ONESHOT=y
267# CONFIG_NO_HZ is not set 293CONFIG_NO_HZ=y
268CONFIG_HIGH_RES_TIMERS=y 294CONFIG_HIGH_RES_TIMERS=y
269CONFIG_GENERIC_CLOCKEVENTS_BUILD=y 295CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
270 296
271# 297#
272# CPU Frequency scaling 298# CPU Frequency scaling
273# 299#
274# CONFIG_CPU_FREQ is not set 300CONFIG_CPU_FREQ=y
301CONFIG_CPU_FREQ_TABLE=y
302# CONFIG_CPU_FREQ_DEBUG is not set
303CONFIG_CPU_FREQ_STAT=y
304CONFIG_CPU_FREQ_STAT_DETAILS=y
305# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
306# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
307# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
308CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
309# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
310CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
311# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
312# CONFIG_CPU_FREQ_GOV_USERSPACE is not set
313CONFIG_CPU_FREQ_GOV_ONDEMAND=y
314# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
315CONFIG_SH_CPU_FREQ=y
275 316
276# 317#
277# DMA support 318# DMA support
@@ -299,12 +340,12 @@ CONFIG_HZ=250
299CONFIG_SCHED_HRTICK=y 340CONFIG_SCHED_HRTICK=y
300CONFIG_KEXEC=y 341CONFIG_KEXEC=y
301# CONFIG_CRASH_DUMP is not set 342# CONFIG_CRASH_DUMP is not set
302# CONFIG_SECCOMP is not set 343CONFIG_SECCOMP=y
303# CONFIG_PREEMPT_NONE is not set 344# CONFIG_PREEMPT_NONE is not set
304# CONFIG_PREEMPT_VOLUNTARY is not set 345# CONFIG_PREEMPT_VOLUNTARY is not set
305CONFIG_PREEMPT=y 346CONFIG_PREEMPT=y
306CONFIG_GUSA=y 347CONFIG_GUSA=y
307# CONFIG_SPARSE_IRQ is not set 348CONFIG_SPARSE_IRQ=y
308 349
309# 350#
310# Boot options 351# Boot options
@@ -312,7 +353,8 @@ CONFIG_GUSA=y
312CONFIG_ZERO_PAGE_OFFSET=0x00001000 353CONFIG_ZERO_PAGE_OFFSET=0x00001000
313CONFIG_BOOT_LINK_OFFSET=0x00800000 354CONFIG_BOOT_LINK_OFFSET=0x00800000
314CONFIG_ENTRY_OFFSET=0x00001000 355CONFIG_ENTRY_OFFSET=0x00001000
315# CONFIG_CMDLINE_BOOL is not set 356# CONFIG_CMDLINE_OVERWRITE is not set
357# CONFIG_CMDLINE_EXTEND is not set
316 358
317# 359#
318# Bus options 360# Bus options
@@ -321,8 +363,7 @@ CONFIG_PCI=y
321CONFIG_SH_PCIDMA_NONCOHERENT=y 363CONFIG_SH_PCIDMA_NONCOHERENT=y
322# CONFIG_PCIEPORTBUS is not set 364# CONFIG_PCIEPORTBUS is not set
323# CONFIG_ARCH_SUPPORTS_MSI is not set 365# CONFIG_ARCH_SUPPORTS_MSI is not set
324CONFIG_PCI_LEGACY=y 366# CONFIG_PCI_LEGACY is not set
325# CONFIG_PCI_DEBUG is not set
326# CONFIG_PCI_STUB is not set 367# CONFIG_PCI_STUB is not set
327# CONFIG_PCI_IOV is not set 368# CONFIG_PCI_IOV is not set
328# CONFIG_PCCARD is not set 369# CONFIG_PCCARD is not set
@@ -339,8 +380,13 @@ CONFIG_BINFMT_ELF=y
339# 380#
340# Power management options (EXPERIMENTAL) 381# Power management options (EXPERIMENTAL)
341# 382#
342# CONFIG_PM is not set 383CONFIG_PM=y
343# CONFIG_CPU_IDLE is not set 384# CONFIG_PM_DEBUG is not set
385# CONFIG_HIBERNATION is not set
386# CONFIG_PM_RUNTIME is not set
387CONFIG_CPU_IDLE=y
388CONFIG_CPU_IDLE_GOV_LADDER=y
389CONFIG_CPU_IDLE_GOV_MENU=y
344CONFIG_NET=y 390CONFIG_NET=y
345 391
346# 392#
@@ -392,6 +438,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
392# CONFIG_NETFILTER is not set 438# CONFIG_NETFILTER is not set
393# CONFIG_IP_DCCP is not set 439# CONFIG_IP_DCCP is not set
394# CONFIG_IP_SCTP is not set 440# CONFIG_IP_SCTP is not set
441# CONFIG_RDS is not set
395# CONFIG_TIPC is not set 442# CONFIG_TIPC is not set
396# CONFIG_ATM is not set 443# CONFIG_ATM is not set
397# CONFIG_BRIDGE is not set 444# CONFIG_BRIDGE is not set
@@ -414,6 +461,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
414# Network testing 461# Network testing
415# 462#
416# CONFIG_NET_PKTGEN is not set 463# CONFIG_NET_PKTGEN is not set
464# CONFIG_NET_TCPPROBE is not set
465# CONFIG_NET_DROP_MONITOR is not set
417# CONFIG_HAMRADIO is not set 466# CONFIG_HAMRADIO is not set
418# CONFIG_CAN is not set 467# CONFIG_CAN is not set
419# CONFIG_IRDA is not set 468# CONFIG_IRDA is not set
@@ -421,6 +470,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
421# CONFIG_AF_RXRPC is not set 470# CONFIG_AF_RXRPC is not set
422CONFIG_WIRELESS=y 471CONFIG_WIRELESS=y
423# CONFIG_CFG80211 is not set 472# CONFIG_CFG80211 is not set
473CONFIG_CFG80211_DEFAULT_PS_VALUE=0
424# CONFIG_WIRELESS_OLD_REGULATORY is not set 474# CONFIG_WIRELESS_OLD_REGULATORY is not set
425CONFIG_WIRELESS_EXT=y 475CONFIG_WIRELESS_EXT=y
426CONFIG_WIRELESS_EXT_SYSFS=y 476CONFIG_WIRELESS_EXT_SYSFS=y
@@ -429,7 +479,6 @@ CONFIG_WIRELESS_EXT_SYSFS=y
429# 479#
430# CFG80211 needs to be enabled for MAC80211 480# CFG80211 needs to be enabled for MAC80211
431# 481#
432CONFIG_MAC80211_DEFAULT_PS_VALUE=0
433# CONFIG_WIMAX is not set 482# CONFIG_WIMAX is not set
434# CONFIG_RFKILL is not set 483# CONFIG_RFKILL is not set
435# CONFIG_NET_9P is not set 484# CONFIG_NET_9P is not set
@@ -442,18 +491,17 @@ CONFIG_MAC80211_DEFAULT_PS_VALUE=0
442# Generic Driver Options 491# Generic Driver Options
443# 492#
444CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 493CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
494# CONFIG_DEVTMPFS is not set
445CONFIG_STANDALONE=y 495CONFIG_STANDALONE=y
446CONFIG_PREVENT_FIRMWARE_BUILD=y 496CONFIG_PREVENT_FIRMWARE_BUILD=y
447# CONFIG_FW_LOADER is not set 497# CONFIG_FW_LOADER is not set
448# CONFIG_DEBUG_DRIVER is not set
449# CONFIG_DEBUG_DEVRES is not set
450# CONFIG_SYS_HYPERVISOR is not set 498# CONFIG_SYS_HYPERVISOR is not set
451# CONFIG_CONNECTOR is not set 499# CONFIG_CONNECTOR is not set
452CONFIG_MTD=y 500CONFIG_MTD=y
453# CONFIG_MTD_DEBUG is not set 501# CONFIG_MTD_DEBUG is not set
502# CONFIG_MTD_TESTS is not set
454CONFIG_MTD_CONCAT=y 503CONFIG_MTD_CONCAT=y
455CONFIG_MTD_PARTITIONS=y 504CONFIG_MTD_PARTITIONS=y
456# CONFIG_MTD_TESTS is not set
457# CONFIG_MTD_REDBOOT_PARTS is not set 505# CONFIG_MTD_REDBOOT_PARTS is not set
458# CONFIG_MTD_CMDLINE_PARTS is not set 506# CONFIG_MTD_CMDLINE_PARTS is not set
459# CONFIG_MTD_AR7_PARTS is not set 507# CONFIG_MTD_AR7_PARTS is not set
@@ -538,7 +586,8 @@ CONFIG_BLK_DEV=y
538# CONFIG_BLK_DEV_DAC960 is not set 586# CONFIG_BLK_DEV_DAC960 is not set
539# CONFIG_BLK_DEV_UMEM is not set 587# CONFIG_BLK_DEV_UMEM is not set
540# CONFIG_BLK_DEV_COW_COMMON is not set 588# CONFIG_BLK_DEV_COW_COMMON is not set
541# CONFIG_BLK_DEV_LOOP is not set 589CONFIG_BLK_DEV_LOOP=y
590CONFIG_BLK_DEV_CRYPTOLOOP=m
542# CONFIG_BLK_DEV_NBD is not set 591# CONFIG_BLK_DEV_NBD is not set
543# CONFIG_BLK_DEV_SX8 is not set 592# CONFIG_BLK_DEV_SX8 is not set
544# CONFIG_BLK_DEV_UB is not set 593# CONFIG_BLK_DEV_UB is not set
@@ -561,7 +610,7 @@ CONFIG_SCSI=y
561CONFIG_SCSI_DMA=y 610CONFIG_SCSI_DMA=y
562# CONFIG_SCSI_TGT is not set 611# CONFIG_SCSI_TGT is not set
563# CONFIG_SCSI_NETLINK is not set 612# CONFIG_SCSI_NETLINK is not set
564CONFIG_SCSI_PROC_FS=y 613# CONFIG_SCSI_PROC_FS is not set
565 614
566# 615#
567# SCSI support type (disk, tape, CD-ROM) 616# SCSI support type (disk, tape, CD-ROM)
@@ -591,6 +640,7 @@ CONFIG_SCSI_WAIT_SCAN=m
591# CONFIG_SCSI_OSD_INITIATOR is not set 640# CONFIG_SCSI_OSD_INITIATOR is not set
592CONFIG_ATA=y 641CONFIG_ATA=y
593# CONFIG_ATA_NONSTANDARD is not set 642# CONFIG_ATA_NONSTANDARD is not set
643CONFIG_ATA_VERBOSE_ERROR=y
594CONFIG_SATA_PMP=y 644CONFIG_SATA_PMP=y
595# CONFIG_SATA_AHCI is not set 645# CONFIG_SATA_AHCI is not set
596# CONFIG_SATA_SIL24 is not set 646# CONFIG_SATA_SIL24 is not set
@@ -612,6 +662,7 @@ CONFIG_SATA_SIL=y
612# CONFIG_PATA_ALI is not set 662# CONFIG_PATA_ALI is not set
613# CONFIG_PATA_AMD is not set 663# CONFIG_PATA_AMD is not set
614# CONFIG_PATA_ARTOP is not set 664# CONFIG_PATA_ARTOP is not set
665# CONFIG_PATA_ATP867X is not set
615# CONFIG_PATA_ATIIXP is not set 666# CONFIG_PATA_ATIIXP is not set
616# CONFIG_PATA_CMD640_PCI is not set 667# CONFIG_PATA_CMD640_PCI is not set
617# CONFIG_PATA_CMD64X is not set 668# CONFIG_PATA_CMD64X is not set
@@ -639,6 +690,7 @@ CONFIG_SATA_SIL=y
639# CONFIG_PATA_OPTIDMA is not set 690# CONFIG_PATA_OPTIDMA is not set
640# CONFIG_PATA_PDC_OLD is not set 691# CONFIG_PATA_PDC_OLD is not set
641# CONFIG_PATA_RADISYS is not set 692# CONFIG_PATA_RADISYS is not set
693# CONFIG_PATA_RDC is not set
642# CONFIG_PATA_RZ1000 is not set 694# CONFIG_PATA_RZ1000 is not set
643# CONFIG_PATA_SC1200 is not set 695# CONFIG_PATA_SC1200 is not set
644# CONFIG_PATA_SERVERWORKS is not set 696# CONFIG_PATA_SERVERWORKS is not set
@@ -657,7 +709,11 @@ CONFIG_SATA_SIL=y
657# 709#
658 710
659# 711#
660# Enable only one of the two stacks, unless you know what you are doing 712# You can enable one or both FireWire driver stacks.
713#
714
715#
716# See the help texts for more information.
661# 717#
662# CONFIG_FIREWIRE is not set 718# CONFIG_FIREWIRE is not set
663# CONFIG_IEEE1394 is not set 719# CONFIG_IEEE1394 is not set
@@ -690,6 +746,7 @@ CONFIG_R8169=y
690# CONFIG_VIA_VELOCITY is not set 746# CONFIG_VIA_VELOCITY is not set
691# CONFIG_TIGON3 is not set 747# CONFIG_TIGON3 is not set
692# CONFIG_BNX2 is not set 748# CONFIG_BNX2 is not set
749# CONFIG_CNIC is not set
693# CONFIG_QLA3XXX is not set 750# CONFIG_QLA3XXX is not set
694# CONFIG_ATL1 is not set 751# CONFIG_ATL1 is not set
695# CONFIG_ATL1E is not set 752# CONFIG_ATL1E is not set
@@ -697,12 +754,7 @@ CONFIG_R8169=y
697# CONFIG_JME is not set 754# CONFIG_JME is not set
698# CONFIG_NETDEV_10000 is not set 755# CONFIG_NETDEV_10000 is not set
699# CONFIG_TR is not set 756# CONFIG_TR is not set
700 757# CONFIG_WLAN is not set
701#
702# Wireless LAN
703#
704# CONFIG_WLAN_PRE80211 is not set
705# CONFIG_WLAN_80211 is not set
706 758
707# 759#
708# Enable WiMAX (Networking options) to see the WiMAX drivers 760# Enable WiMAX (Networking options) to see the WiMAX drivers
@@ -739,25 +791,42 @@ CONFIG_INPUT_FF_MEMLESS=m
739# Userland interfaces 791# Userland interfaces
740# 792#
741CONFIG_INPUT_MOUSEDEV=y 793CONFIG_INPUT_MOUSEDEV=y
742# CONFIG_INPUT_MOUSEDEV_PSAUX is not set 794CONFIG_INPUT_MOUSEDEV_PSAUX=y
743CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 795CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
744CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 796CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
745# CONFIG_INPUT_JOYDEV is not set 797# CONFIG_INPUT_JOYDEV is not set
746# CONFIG_INPUT_EVDEV is not set 798CONFIG_INPUT_EVDEV=y
747# CONFIG_INPUT_EVBUG is not set 799CONFIG_INPUT_EVBUG=m
748 800
749# 801#
750# Input Device Drivers 802# Input Device Drivers
751# 803#
752CONFIG_INPUT_KEYBOARD=y 804CONFIG_INPUT_KEYBOARD=y
753# CONFIG_KEYBOARD_ATKBD is not set 805# CONFIG_KEYBOARD_ADP5588 is not set
754# CONFIG_KEYBOARD_SUNKBD is not set 806CONFIG_KEYBOARD_ATKBD=y
807# CONFIG_QT2160 is not set
755# CONFIG_KEYBOARD_LKKBD is not set 808# CONFIG_KEYBOARD_LKKBD is not set
756# CONFIG_KEYBOARD_XTKBD is not set 809# CONFIG_KEYBOARD_MAX7359 is not set
757# CONFIG_KEYBOARD_NEWTON is not set 810# CONFIG_KEYBOARD_NEWTON is not set
811# CONFIG_KEYBOARD_OPENCORES is not set
758# CONFIG_KEYBOARD_STOWAWAY is not set 812# CONFIG_KEYBOARD_STOWAWAY is not set
813# CONFIG_KEYBOARD_SUNKBD is not set
759# CONFIG_KEYBOARD_SH_KEYSC is not set 814# CONFIG_KEYBOARD_SH_KEYSC is not set
760# CONFIG_INPUT_MOUSE is not set 815# CONFIG_KEYBOARD_XTKBD is not set
816CONFIG_INPUT_MOUSE=y
817CONFIG_MOUSE_PS2=y
818CONFIG_MOUSE_PS2_ALPS=y
819CONFIG_MOUSE_PS2_LOGIPS2PP=y
820CONFIG_MOUSE_PS2_SYNAPTICS=y
821CONFIG_MOUSE_PS2_TRACKPOINT=y
822# CONFIG_MOUSE_PS2_ELANTECH is not set
823# CONFIG_MOUSE_PS2_SENTELIC is not set
824# CONFIG_MOUSE_PS2_TOUCHKIT is not set
825# CONFIG_MOUSE_SERIAL is not set
826# CONFIG_MOUSE_APPLETOUCH is not set
827# CONFIG_MOUSE_BCM5974 is not set
828# CONFIG_MOUSE_VSXXXAA is not set
829# CONFIG_MOUSE_SYNAPTICS_I2C is not set
761# CONFIG_INPUT_JOYSTICK is not set 830# CONFIG_INPUT_JOYSTICK is not set
762# CONFIG_INPUT_TABLET is not set 831# CONFIG_INPUT_TABLET is not set
763# CONFIG_INPUT_TOUCHSCREEN is not set 832# CONFIG_INPUT_TOUCHSCREEN is not set
@@ -766,7 +835,12 @@ CONFIG_INPUT_KEYBOARD=y
766# 835#
767# Hardware I/O ports 836# Hardware I/O ports
768# 837#
769# CONFIG_SERIO is not set 838CONFIG_SERIO=y
839CONFIG_SERIO_I8042=y
840CONFIG_SERIO_SERPORT=y
841# CONFIG_SERIO_PCIPS2 is not set
842CONFIG_SERIO_LIBPS2=y
843# CONFIG_SERIO_RAW is not set
770# CONFIG_GAMEPORT is not set 844# CONFIG_GAMEPORT is not set
771 845
772# 846#
@@ -777,7 +851,7 @@ CONFIG_CONSOLE_TRANSLATIONS=y
777CONFIG_VT_CONSOLE=y 851CONFIG_VT_CONSOLE=y
778CONFIG_HW_CONSOLE=y 852CONFIG_HW_CONSOLE=y
779CONFIG_VT_HW_CONSOLE_BINDING=y 853CONFIG_VT_HW_CONSOLE_BINDING=y
780CONFIG_DEVKMEM=y 854# CONFIG_DEVKMEM is not set
781# CONFIG_SERIAL_NONSTANDARD is not set 855# CONFIG_SERIAL_NONSTANDARD is not set
782# CONFIG_NOZOMI is not set 856# CONFIG_NOZOMI is not set
783 857
@@ -796,12 +870,10 @@ CONFIG_SERIAL_CORE=y
796CONFIG_SERIAL_CORE_CONSOLE=y 870CONFIG_SERIAL_CORE_CONSOLE=y
797# CONFIG_SERIAL_JSM is not set 871# CONFIG_SERIAL_JSM is not set
798CONFIG_UNIX98_PTYS=y 872CONFIG_UNIX98_PTYS=y
799# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set 873CONFIG_DEVPTS_MULTIPLE_INSTANCES=y
800CONFIG_LEGACY_PTYS=y 874# CONFIG_LEGACY_PTYS is not set
801CONFIG_LEGACY_PTY_COUNT=256
802# CONFIG_IPMI_HANDLER is not set 875# CONFIG_IPMI_HANDLER is not set
803CONFIG_HW_RANDOM=y 876# CONFIG_HW_RANDOM is not set
804# CONFIG_HW_RANDOM_TIMERIOMEM is not set
805# CONFIG_R3964 is not set 877# CONFIG_R3964 is not set
806# CONFIG_APPLICOM is not set 878# CONFIG_APPLICOM is not set
807# CONFIG_RAW_DRIVER is not set 879# CONFIG_RAW_DRIVER is not set
@@ -809,6 +881,7 @@ CONFIG_HW_RANDOM=y
809CONFIG_DEVPORT=y 881CONFIG_DEVPORT=y
810CONFIG_I2C=y 882CONFIG_I2C=y
811CONFIG_I2C_BOARDINFO=y 883CONFIG_I2C_BOARDINFO=y
884CONFIG_I2C_COMPAT=y
812# CONFIG_I2C_CHARDEV is not set 885# CONFIG_I2C_CHARDEV is not set
813CONFIG_I2C_HELPER_AUTO=y 886CONFIG_I2C_HELPER_AUTO=y
814CONFIG_I2C_ALGOPCA=y 887CONFIG_I2C_ALGOPCA=y
@@ -838,6 +911,7 @@ CONFIG_I2C_ALGOPCA=y
838# 911#
839# I2C system bus drivers (mostly embedded / system-on-chip) 912# I2C system bus drivers (mostly embedded / system-on-chip)
840# 913#
914# CONFIG_I2C_DESIGNWARE is not set
841# CONFIG_I2C_OCORES is not set 915# CONFIG_I2C_OCORES is not set
842# CONFIG_I2C_SH_MOBILE is not set 916# CONFIG_I2C_SH_MOBILE is not set
843# CONFIG_I2C_SIMTEC is not set 917# CONFIG_I2C_SIMTEC is not set
@@ -864,21 +938,42 @@ CONFIG_I2C_PCA_PLATFORM=y
864# Miscellaneous I2C Chip support 938# Miscellaneous I2C Chip support
865# 939#
866# CONFIG_DS1682 is not set 940# CONFIG_DS1682 is not set
867# CONFIG_SENSORS_PCF8574 is not set
868# CONFIG_PCF8575 is not set
869# CONFIG_SENSORS_PCA9539 is not set
870# CONFIG_SENSORS_TSL2550 is not set 941# CONFIG_SENSORS_TSL2550 is not set
871# CONFIG_I2C_DEBUG_CORE is not set 942# CONFIG_I2C_DEBUG_CORE is not set
872# CONFIG_I2C_DEBUG_ALGO is not set 943# CONFIG_I2C_DEBUG_ALGO is not set
873# CONFIG_I2C_DEBUG_BUS is not set 944# CONFIG_I2C_DEBUG_BUS is not set
874# CONFIG_I2C_DEBUG_CHIP is not set 945# CONFIG_I2C_DEBUG_CHIP is not set
875# CONFIG_SPI is not set 946# CONFIG_SPI is not set
947
948#
949# PPS support
950#
951# CONFIG_PPS is not set
876# CONFIG_W1 is not set 952# CONFIG_W1 is not set
877# CONFIG_POWER_SUPPLY is not set 953# CONFIG_POWER_SUPPLY is not set
878# CONFIG_HWMON is not set 954# CONFIG_HWMON is not set
879# CONFIG_THERMAL is not set 955# CONFIG_THERMAL is not set
880# CONFIG_THERMAL_HWMON is not set 956CONFIG_WATCHDOG=y
881# CONFIG_WATCHDOG is not set 957# CONFIG_WATCHDOG_NOWAYOUT is not set
958
959#
960# Watchdog Device Drivers
961#
962# CONFIG_SOFT_WATCHDOG is not set
963# CONFIG_ALIM7101_WDT is not set
964CONFIG_SH_WDT=y
965# CONFIG_SH_WDT_MMAP is not set
966
967#
968# PCI-based Watchdog Cards
969#
970# CONFIG_PCIPCWATCHDOG is not set
971# CONFIG_WDTPCI is not set
972
973#
974# USB-based Watchdog Cards
975#
976# CONFIG_USBPCWATCHDOG is not set
882CONFIG_SSB_POSSIBLE=y 977CONFIG_SSB_POSSIBLE=y
883 978
884# 979#
@@ -896,14 +991,17 @@ CONFIG_MFD_SM501=y
896# CONFIG_MFD_TMIO is not set 991# CONFIG_MFD_TMIO is not set
897# CONFIG_PMIC_DA903X is not set 992# CONFIG_PMIC_DA903X is not set
898# CONFIG_MFD_WM8400 is not set 993# CONFIG_MFD_WM8400 is not set
994# CONFIG_MFD_WM831X is not set
899# CONFIG_MFD_WM8350_I2C is not set 995# CONFIG_MFD_WM8350_I2C is not set
900# CONFIG_MFD_PCF50633 is not set 996# CONFIG_MFD_PCF50633 is not set
997# CONFIG_AB3100_CORE is not set
901# CONFIG_REGULATOR is not set 998# CONFIG_REGULATOR is not set
902# CONFIG_MEDIA_SUPPORT is not set 999# CONFIG_MEDIA_SUPPORT is not set
903 1000
904# 1001#
905# Graphics support 1002# Graphics support
906# 1003#
1004# CONFIG_VGA_ARB is not set
907# CONFIG_DRM is not set 1005# CONFIG_DRM is not set
908# CONFIG_VGASTATE is not set 1006# CONFIG_VGASTATE is not set
909# CONFIG_VIDEO_OUTPUT_CONTROL is not set 1007# CONFIG_VIDEO_OUTPUT_CONTROL is not set
@@ -915,12 +1013,11 @@ CONFIG_FB_CFB_FILLRECT=y
915CONFIG_FB_CFB_COPYAREA=y 1013CONFIG_FB_CFB_COPYAREA=y
916CONFIG_FB_CFB_IMAGEBLIT=y 1014CONFIG_FB_CFB_IMAGEBLIT=y
917# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set 1015# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
918CONFIG_FB_SYS_FILLRECT=m 1016# CONFIG_FB_SYS_FILLRECT is not set
919CONFIG_FB_SYS_COPYAREA=m 1017# CONFIG_FB_SYS_COPYAREA is not set
920CONFIG_FB_SYS_IMAGEBLIT=m 1018# CONFIG_FB_SYS_IMAGEBLIT is not set
921# CONFIG_FB_FOREIGN_ENDIAN is not set 1019# CONFIG_FB_FOREIGN_ENDIAN is not set
922CONFIG_FB_SYS_FOPS=m 1020# CONFIG_FB_SYS_FOPS is not set
923CONFIG_FB_DEFERRED_IO=y
924# CONFIG_FB_SVGALIB is not set 1021# CONFIG_FB_SVGALIB is not set
925# CONFIG_FB_MACMODES is not set 1022# CONFIG_FB_MACMODES is not set
926# CONFIG_FB_BACKLIGHT is not set 1023# CONFIG_FB_BACKLIGHT is not set
@@ -955,7 +1052,7 @@ CONFIG_FB_DEFERRED_IO=y
955# CONFIG_FB_ARK is not set 1052# CONFIG_FB_ARK is not set
956# CONFIG_FB_PM3 is not set 1053# CONFIG_FB_PM3 is not set
957# CONFIG_FB_CARMINE is not set 1054# CONFIG_FB_CARMINE is not set
958CONFIG_FB_SH_MOBILE_LCDC=m 1055# CONFIG_FB_SH_MOBILE_LCDC is not set
959CONFIG_FB_SM501=y 1056CONFIG_FB_SM501=y
960# CONFIG_FB_VIRTUAL is not set 1057# CONFIG_FB_VIRTUAL is not set
961# CONFIG_FB_METRONOME is not set 1058# CONFIG_FB_METRONOME is not set
@@ -981,14 +1078,112 @@ CONFIG_FONT_8x16=y
981CONFIG_LOGO=y 1078CONFIG_LOGO=y
982# CONFIG_LOGO_LINUX_MONO is not set 1079# CONFIG_LOGO_LINUX_MONO is not set
983# CONFIG_LOGO_LINUX_VGA16 is not set 1080# CONFIG_LOGO_LINUX_VGA16 is not set
984CONFIG_LOGO_LINUX_CLUT224=y 1081# CONFIG_LOGO_LINUX_CLUT224 is not set
985# CONFIG_LOGO_SUPERH_MONO is not set 1082CONFIG_LOGO_SUPERH_MONO=y
986# CONFIG_LOGO_SUPERH_VGA16 is not set 1083CONFIG_LOGO_SUPERH_VGA16=y
987# CONFIG_LOGO_SUPERH_CLUT224 is not set 1084CONFIG_LOGO_SUPERH_CLUT224=y
988# CONFIG_SOUND is not set 1085CONFIG_SOUND=y
1086CONFIG_SOUND_OSS_CORE=y
1087CONFIG_SOUND_OSS_CORE_PRECLAIM=y
1088CONFIG_SND=y
1089CONFIG_SND_TIMER=y
1090CONFIG_SND_PCM=y
1091CONFIG_SND_HWDEP=y
1092CONFIG_SND_RAWMIDI=y
1093CONFIG_SND_SEQUENCER=y
1094# CONFIG_SND_SEQ_DUMMY is not set
1095CONFIG_SND_OSSEMUL=y
1096CONFIG_SND_MIXER_OSS=y
1097CONFIG_SND_PCM_OSS=y
1098CONFIG_SND_PCM_OSS_PLUGINS=y
1099CONFIG_SND_SEQUENCER_OSS=y
1100CONFIG_SND_HRTIMER=y
1101CONFIG_SND_SEQ_HRTIMER_DEFAULT=y
1102CONFIG_SND_DYNAMIC_MINORS=y
1103# CONFIG_SND_SUPPORT_OLD_API is not set
1104# CONFIG_SND_VERBOSE_PROCFS is not set
1105# CONFIG_SND_VERBOSE_PRINTK is not set
1106# CONFIG_SND_DEBUG is not set
1107CONFIG_SND_RAWMIDI_SEQ=y
1108CONFIG_SND_OPL3_LIB_SEQ=y
1109# CONFIG_SND_OPL4_LIB_SEQ is not set
1110# CONFIG_SND_SBAWE_SEQ is not set
1111# CONFIG_SND_EMU10K1_SEQ is not set
1112CONFIG_SND_MPU401_UART=y
1113CONFIG_SND_OPL3_LIB=y
1114# CONFIG_SND_DRIVERS is not set
1115CONFIG_SND_PCI=y
1116# CONFIG_SND_AD1889 is not set
1117# CONFIG_SND_ALS300 is not set
1118# CONFIG_SND_ALI5451 is not set
1119# CONFIG_SND_ATIIXP is not set
1120# CONFIG_SND_ATIIXP_MODEM is not set
1121# CONFIG_SND_AU8810 is not set
1122# CONFIG_SND_AU8820 is not set
1123# CONFIG_SND_AU8830 is not set
1124# CONFIG_SND_AW2 is not set
1125# CONFIG_SND_AZT3328 is not set
1126# CONFIG_SND_BT87X is not set
1127# CONFIG_SND_CA0106 is not set
1128CONFIG_SND_CMIPCI=y
1129# CONFIG_SND_OXYGEN is not set
1130# CONFIG_SND_CS4281 is not set
1131# CONFIG_SND_CS46XX is not set
1132# CONFIG_SND_CTXFI is not set
1133# CONFIG_SND_DARLA20 is not set
1134# CONFIG_SND_GINA20 is not set
1135# CONFIG_SND_LAYLA20 is not set
1136# CONFIG_SND_DARLA24 is not set
1137# CONFIG_SND_GINA24 is not set
1138# CONFIG_SND_LAYLA24 is not set
1139# CONFIG_SND_MONA is not set
1140# CONFIG_SND_MIA is not set
1141# CONFIG_SND_ECHO3G is not set
1142# CONFIG_SND_INDIGO is not set
1143# CONFIG_SND_INDIGOIO is not set
1144# CONFIG_SND_INDIGODJ is not set
1145# CONFIG_SND_INDIGOIOX is not set
1146# CONFIG_SND_INDIGODJX is not set
1147# CONFIG_SND_EMU10K1 is not set
1148# CONFIG_SND_EMU10K1X is not set
1149# CONFIG_SND_ENS1370 is not set
1150# CONFIG_SND_ENS1371 is not set
1151# CONFIG_SND_ES1938 is not set
1152# CONFIG_SND_ES1968 is not set
1153# CONFIG_SND_FM801 is not set
1154# CONFIG_SND_HDA_INTEL is not set
1155# CONFIG_SND_HDSP is not set
1156# CONFIG_SND_HDSPM is not set
1157# CONFIG_SND_HIFIER is not set
1158# CONFIG_SND_ICE1712 is not set
1159# CONFIG_SND_ICE1724 is not set
1160# CONFIG_SND_INTEL8X0 is not set
1161# CONFIG_SND_INTEL8X0M is not set
1162# CONFIG_SND_KORG1212 is not set
1163# CONFIG_SND_LX6464ES is not set
1164# CONFIG_SND_MAESTRO3 is not set
1165# CONFIG_SND_MIXART is not set
1166# CONFIG_SND_NM256 is not set
1167# CONFIG_SND_PCXHR is not set
1168# CONFIG_SND_RIPTIDE is not set
1169# CONFIG_SND_RME32 is not set
1170# CONFIG_SND_RME96 is not set
1171# CONFIG_SND_RME9652 is not set
1172# CONFIG_SND_SONICVIBES is not set
1173# CONFIG_SND_TRIDENT is not set
1174# CONFIG_SND_VIA82XX is not set
1175# CONFIG_SND_VIA82XX_MODEM is not set
1176# CONFIG_SND_VIRTUOSO is not set
1177# CONFIG_SND_VX222 is not set
1178# CONFIG_SND_YMFPCI is not set
1179# CONFIG_SND_SUPERH is not set
1180CONFIG_SND_USB=y
1181# CONFIG_SND_USB_AUDIO is not set
1182# CONFIG_SND_USB_CAIAQ is not set
1183# CONFIG_SND_SOC is not set
1184# CONFIG_SOUND_PRIME is not set
989CONFIG_HID_SUPPORT=y 1185CONFIG_HID_SUPPORT=y
990CONFIG_HID=y 1186CONFIG_HID=y
991# CONFIG_HID_DEBUG is not set
992# CONFIG_HIDRAW is not set 1187# CONFIG_HIDRAW is not set
993 1188
994# 1189#
@@ -1001,34 +1196,39 @@ CONFIG_USB_HID=y
1001# 1196#
1002# Special HID drivers 1197# Special HID drivers
1003# 1198#
1004CONFIG_HID_A4TECH=y 1199CONFIG_HID_A4TECH=m
1005CONFIG_HID_APPLE=y 1200CONFIG_HID_APPLE=m
1006CONFIG_HID_BELKIN=y 1201CONFIG_HID_BELKIN=m
1007CONFIG_HID_CHERRY=y 1202CONFIG_HID_CHERRY=m
1008CONFIG_HID_CHICONY=y 1203CONFIG_HID_CHICONY=m
1009CONFIG_HID_CYPRESS=y 1204CONFIG_HID_CYPRESS=m
1010# CONFIG_HID_DRAGONRISE is not set 1205CONFIG_HID_DRAGONRISE=m
1011CONFIG_HID_EZKEY=y 1206# CONFIG_DRAGONRISE_FF is not set
1012# CONFIG_HID_KYE is not set 1207CONFIG_HID_EZKEY=m
1013CONFIG_HID_GYRATION=y 1208CONFIG_HID_KYE=m
1014# CONFIG_HID_KENSINGTON is not set 1209CONFIG_HID_GYRATION=m
1015CONFIG_HID_LOGITECH=y 1210CONFIG_HID_TWINHAN=m
1211CONFIG_HID_KENSINGTON=m
1212CONFIG_HID_LOGITECH=m
1016# CONFIG_LOGITECH_FF is not set 1213# CONFIG_LOGITECH_FF is not set
1017# CONFIG_LOGIRUMBLEPAD2_FF is not set 1214# CONFIG_LOGIRUMBLEPAD2_FF is not set
1018CONFIG_HID_MICROSOFT=y 1215CONFIG_HID_MICROSOFT=m
1019CONFIG_HID_MONTEREY=y 1216CONFIG_HID_MONTEREY=m
1020# CONFIG_HID_NTRIG is not set 1217CONFIG_HID_NTRIG=m
1021CONFIG_HID_PANTHERLORD=y 1218CONFIG_HID_PANTHERLORD=m
1022# CONFIG_PANTHERLORD_FF is not set 1219# CONFIG_PANTHERLORD_FF is not set
1023CONFIG_HID_PETALYNX=y 1220CONFIG_HID_PETALYNX=m
1024CONFIG_HID_SAMSUNG=y 1221CONFIG_HID_SAMSUNG=m
1025CONFIG_HID_SONY=y 1222CONFIG_HID_SONY=m
1026CONFIG_HID_SUNPLUS=y 1223CONFIG_HID_SUNPLUS=m
1027# CONFIG_HID_GREENASIA is not set 1224CONFIG_HID_GREENASIA=m
1028# CONFIG_HID_SMARTJOYPLUS is not set 1225# CONFIG_GREENASIA_FF is not set
1029# CONFIG_HID_TOPSEED is not set 1226CONFIG_HID_SMARTJOYPLUS=m
1227# CONFIG_SMARTJOYPLUS_FF is not set
1228CONFIG_HID_TOPSEED=m
1030# CONFIG_HID_THRUSTMASTER is not set 1229# CONFIG_HID_THRUSTMASTER is not set
1031# CONFIG_HID_ZEROPLUS is not set 1230CONFIG_HID_ZEROPLUS=m
1231# CONFIG_ZEROPLUS_FF is not set
1032CONFIG_USB_SUPPORT=y 1232CONFIG_USB_SUPPORT=y
1033CONFIG_USB_ARCH_HAS_HCD=y 1233CONFIG_USB_ARCH_HAS_HCD=y
1034CONFIG_USB_ARCH_HAS_OHCI=y 1234CONFIG_USB_ARCH_HAS_OHCI=y
@@ -1040,13 +1240,14 @@ CONFIG_USB=y
1040# 1240#
1041# Miscellaneous USB options 1241# Miscellaneous USB options
1042# 1242#
1043CONFIG_USB_DEVICEFS=y 1243# CONFIG_USB_DEVICEFS is not set
1044CONFIG_USB_DEVICE_CLASS=y 1244CONFIG_USB_DEVICE_CLASS=y
1045# CONFIG_USB_DYNAMIC_MINORS is not set 1245# CONFIG_USB_DYNAMIC_MINORS is not set
1246# CONFIG_USB_SUSPEND is not set
1046# CONFIG_USB_OTG is not set 1247# CONFIG_USB_OTG is not set
1047# CONFIG_USB_OTG_WHITELIST is not set 1248# CONFIG_USB_OTG_WHITELIST is not set
1048# CONFIG_USB_OTG_BLACKLIST_HUB is not set 1249# CONFIG_USB_OTG_BLACKLIST_HUB is not set
1049CONFIG_USB_MON=y 1250# CONFIG_USB_MON is not set
1050# CONFIG_USB_WUSB is not set 1251# CONFIG_USB_WUSB is not set
1051# CONFIG_USB_WUSB_CBAF is not set 1252# CONFIG_USB_WUSB_CBAF is not set
1052 1253
@@ -1061,10 +1262,8 @@ CONFIG_USB_EHCI_HCD=m
1061# CONFIG_USB_OXU210HP_HCD is not set 1262# CONFIG_USB_OXU210HP_HCD is not set
1062# CONFIG_USB_ISP116X_HCD is not set 1263# CONFIG_USB_ISP116X_HCD is not set
1063# CONFIG_USB_ISP1760_HCD is not set 1264# CONFIG_USB_ISP1760_HCD is not set
1064CONFIG_USB_OHCI_HCD=m 1265# CONFIG_USB_ISP1362_HCD is not set
1065# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set 1266# CONFIG_USB_OHCI_HCD is not set
1066# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
1067CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1068# CONFIG_USB_UHCI_HCD is not set 1267# CONFIG_USB_UHCI_HCD is not set
1069# CONFIG_USB_SL811_HCD is not set 1268# CONFIG_USB_SL811_HCD is not set
1070CONFIG_USB_R8A66597_HCD=y 1269CONFIG_USB_R8A66597_HCD=y
@@ -1133,7 +1332,7 @@ CONFIG_USB_STORAGE=y
1133# CONFIG_USB_LD is not set 1332# CONFIG_USB_LD is not set
1134# CONFIG_USB_TRANCEVIBRATOR is not set 1333# CONFIG_USB_TRANCEVIBRATOR is not set
1135# CONFIG_USB_IOWARRIOR is not set 1334# CONFIG_USB_IOWARRIOR is not set
1136CONFIG_USB_TEST=m 1335# CONFIG_USB_TEST is not set
1137# CONFIG_USB_ISIGHTFW is not set 1336# CONFIG_USB_ISIGHTFW is not set
1138# CONFIG_USB_VST is not set 1337# CONFIG_USB_VST is not set
1139# CONFIG_USB_GADGET is not set 1338# CONFIG_USB_GADGET is not set
@@ -1143,7 +1342,29 @@ CONFIG_USB_TEST=m
1143# 1342#
1144# CONFIG_NOP_USB_XCEIV is not set 1343# CONFIG_NOP_USB_XCEIV is not set
1145# CONFIG_UWB is not set 1344# CONFIG_UWB is not set
1146# CONFIG_MMC is not set 1345CONFIG_MMC=y
1346# CONFIG_MMC_DEBUG is not set
1347# CONFIG_MMC_UNSAFE_RESUME is not set
1348
1349#
1350# MMC/SD/SDIO Card Drivers
1351#
1352CONFIG_MMC_BLOCK=y
1353CONFIG_MMC_BLOCK_BOUNCE=y
1354# CONFIG_SDIO_UART is not set
1355# CONFIG_MMC_TEST is not set
1356
1357#
1358# MMC/SD/SDIO Host Controller Drivers
1359#
1360CONFIG_MMC_SDHCI=m
1361# CONFIG_MMC_SDHCI_PCI is not set
1362CONFIG_MMC_SDHCI_PLTFM=m
1363# CONFIG_MMC_AT91 is not set
1364# CONFIG_MMC_ATMELMCI is not set
1365# CONFIG_MMC_TIFM_SD is not set
1366# CONFIG_MMC_CB710 is not set
1367# CONFIG_MMC_VIA_SDMMC is not set
1147# CONFIG_MEMSTICK is not set 1368# CONFIG_MEMSTICK is not set
1148# CONFIG_NEW_LEDS is not set 1369# CONFIG_NEW_LEDS is not set
1149# CONFIG_ACCESSIBILITY is not set 1370# CONFIG_ACCESSIBILITY is not set
@@ -1179,6 +1400,7 @@ CONFIG_RTC_DRV_RS5C372=y
1179# CONFIG_RTC_DRV_S35390A is not set 1400# CONFIG_RTC_DRV_S35390A is not set
1180# CONFIG_RTC_DRV_FM3130 is not set 1401# CONFIG_RTC_DRV_FM3130 is not set
1181# CONFIG_RTC_DRV_RX8581 is not set 1402# CONFIG_RTC_DRV_RX8581 is not set
1403# CONFIG_RTC_DRV_RX8025 is not set
1182 1404
1183# 1405#
1184# SPI RTC drivers 1406# SPI RTC drivers
@@ -1203,9 +1425,20 @@ CONFIG_RTC_DRV_RS5C372=y
1203# 1425#
1204# CONFIG_RTC_DRV_SH is not set 1426# CONFIG_RTC_DRV_SH is not set
1205# CONFIG_RTC_DRV_GENERIC is not set 1427# CONFIG_RTC_DRV_GENERIC is not set
1206# CONFIG_DMADEVICES is not set 1428CONFIG_DMADEVICES=y
1429
1430#
1431# DMA Devices
1432#
1207# CONFIG_AUXDISPLAY is not set 1433# CONFIG_AUXDISPLAY is not set
1208# CONFIG_UIO is not set 1434CONFIG_UIO=m
1435# CONFIG_UIO_CIF is not set
1436# CONFIG_UIO_PDRV is not set
1437# CONFIG_UIO_PDRV_GENIRQ is not set
1438# CONFIG_UIO_SMX is not set
1439# CONFIG_UIO_AEC is not set
1440# CONFIG_UIO_SERCOS3 is not set
1441# CONFIG_UIO_PCI_GENERIC is not set
1209 1442
1210# 1443#
1211# TI VLYNQ 1444# TI VLYNQ
@@ -1225,13 +1458,15 @@ CONFIG_EXT3_FS_XATTR=y
1225# CONFIG_EXT3_FS_SECURITY is not set 1458# CONFIG_EXT3_FS_SECURITY is not set
1226# CONFIG_EXT4_FS is not set 1459# CONFIG_EXT4_FS is not set
1227CONFIG_JBD=y 1460CONFIG_JBD=y
1461# CONFIG_JBD_DEBUG is not set
1228CONFIG_FS_MBCACHE=y 1462CONFIG_FS_MBCACHE=y
1229# CONFIG_REISERFS_FS is not set 1463# CONFIG_REISERFS_FS is not set
1230# CONFIG_JFS_FS is not set 1464# CONFIG_JFS_FS is not set
1231CONFIG_FS_POSIX_ACL=y 1465# CONFIG_FS_POSIX_ACL is not set
1232# CONFIG_XFS_FS is not set 1466# CONFIG_XFS_FS is not set
1233# CONFIG_OCFS2_FS is not set 1467# CONFIG_OCFS2_FS is not set
1234# CONFIG_BTRFS_FS is not set 1468# CONFIG_BTRFS_FS is not set
1469# CONFIG_NILFS2_FS is not set
1235CONFIG_FILE_LOCKING=y 1470CONFIG_FILE_LOCKING=y
1236CONFIG_FSNOTIFY=y 1471CONFIG_FSNOTIFY=y
1237CONFIG_DNOTIFY=y 1472CONFIG_DNOTIFY=y
@@ -1275,9 +1510,9 @@ CONFIG_PROC_PAGE_MONITOR=y
1275CONFIG_SYSFS=y 1510CONFIG_SYSFS=y
1276CONFIG_TMPFS=y 1511CONFIG_TMPFS=y
1277# CONFIG_TMPFS_POSIX_ACL is not set 1512# CONFIG_TMPFS_POSIX_ACL is not set
1278# CONFIG_HUGETLBFS is not set 1513CONFIG_HUGETLBFS=y
1279# CONFIG_HUGETLB_PAGE is not set 1514CONFIG_HUGETLB_PAGE=y
1280# CONFIG_CONFIGFS_FS is not set 1515CONFIG_CONFIGFS_FS=y
1281CONFIG_MISC_FILESYSTEMS=y 1516CONFIG_MISC_FILESYSTEMS=y
1282# CONFIG_ADFS_FS is not set 1517# CONFIG_ADFS_FS is not set
1283# CONFIG_AFFS_FS is not set 1518# CONFIG_AFFS_FS is not set
@@ -1297,20 +1532,20 @@ CONFIG_MINIX_FS=y
1297# CONFIG_ROMFS_FS is not set 1532# CONFIG_ROMFS_FS is not set
1298# CONFIG_SYSV_FS is not set 1533# CONFIG_SYSV_FS is not set
1299# CONFIG_UFS_FS is not set 1534# CONFIG_UFS_FS is not set
1300# CONFIG_NILFS2_FS is not set
1301CONFIG_NETWORK_FILESYSTEMS=y 1535CONFIG_NETWORK_FILESYSTEMS=y
1302CONFIG_NFS_FS=y 1536CONFIG_NFS_FS=y
1303CONFIG_NFS_V3=y 1537CONFIG_NFS_V3=y
1304# CONFIG_NFS_V3_ACL is not set 1538# CONFIG_NFS_V3_ACL is not set
1305CONFIG_NFS_V4=y 1539CONFIG_NFS_V4=y
1540# CONFIG_NFS_V4_1 is not set
1306CONFIG_ROOT_NFS=y 1541CONFIG_ROOT_NFS=y
1307CONFIG_NFSD=y 1542CONFIG_NFSD=m
1308CONFIG_NFSD_V3=y 1543CONFIG_NFSD_V3=y
1309# CONFIG_NFSD_V3_ACL is not set 1544# CONFIG_NFSD_V3_ACL is not set
1310CONFIG_NFSD_V4=y 1545# CONFIG_NFSD_V4 is not set
1311CONFIG_LOCKD=y 1546CONFIG_LOCKD=y
1312CONFIG_LOCKD_V4=y 1547CONFIG_LOCKD_V4=y
1313CONFIG_EXPORTFS=y 1548CONFIG_EXPORTFS=m
1314CONFIG_NFS_COMMON=y 1549CONFIG_NFS_COMMON=y
1315CONFIG_SUNRPC=y 1550CONFIG_SUNRPC=y
1316CONFIG_SUNRPC_GSS=y 1551CONFIG_SUNRPC_GSS=y
@@ -1373,85 +1608,69 @@ CONFIG_NLS_ISO8859_1=y
1373# Kernel hacking 1608# Kernel hacking
1374# 1609#
1375CONFIG_TRACE_IRQFLAGS_SUPPORT=y 1610CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1376# CONFIG_PRINTK_TIME is not set 1611CONFIG_PRINTK_TIME=y
1377# CONFIG_ENABLE_WARN_DEPRECATED is not set 1612CONFIG_ENABLE_WARN_DEPRECATED=y
1378# CONFIG_ENABLE_MUST_CHECK is not set 1613# CONFIG_ENABLE_MUST_CHECK is not set
1379CONFIG_FRAME_WARN=1024 1614CONFIG_FRAME_WARN=1024
1380# CONFIG_MAGIC_SYSRQ is not set 1615CONFIG_MAGIC_SYSRQ=y
1616# CONFIG_STRIP_ASM_SYMS is not set
1381# CONFIG_UNUSED_SYMBOLS is not set 1617# CONFIG_UNUSED_SYMBOLS is not set
1382# CONFIG_DEBUG_FS is not set 1618CONFIG_DEBUG_FS=y
1383# CONFIG_HEADERS_CHECK is not set 1619# CONFIG_HEADERS_CHECK is not set
1384CONFIG_DEBUG_KERNEL=y 1620# CONFIG_DEBUG_KERNEL is not set
1385# CONFIG_DEBUG_SHIRQ is not set
1386CONFIG_DETECT_SOFTLOCKUP=y
1387# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
1388CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
1389CONFIG_DETECT_HUNG_TASK=y
1390# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
1391CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
1392CONFIG_SCHED_DEBUG=y 1621CONFIG_SCHED_DEBUG=y
1393# CONFIG_SCHEDSTATS is not set 1622CONFIG_SCHEDSTATS=y
1394# CONFIG_TIMER_STATS is not set 1623CONFIG_TRACE_IRQFLAGS=y
1395# CONFIG_DEBUG_OBJECTS is not set 1624CONFIG_STACKTRACE=y
1396# CONFIG_DEBUG_SLAB is not set
1397CONFIG_DEBUG_PREEMPT=y
1398# CONFIG_DEBUG_RT_MUTEXES is not set
1399# CONFIG_RT_MUTEX_TESTER is not set
1400# CONFIG_DEBUG_SPINLOCK is not set
1401# CONFIG_DEBUG_MUTEXES is not set
1402# CONFIG_DEBUG_LOCK_ALLOC is not set
1403# CONFIG_PROVE_LOCKING is not set
1404# CONFIG_LOCK_STAT is not set
1405# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1406# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1407# CONFIG_DEBUG_KOBJECT is not set
1408# CONFIG_DEBUG_BUGVERBOSE is not set 1625# CONFIG_DEBUG_BUGVERBOSE is not set
1409# CONFIG_DEBUG_INFO is not set
1410# CONFIG_DEBUG_VM is not set
1411# CONFIG_DEBUG_WRITECOUNT is not set
1412# CONFIG_DEBUG_MEMORY_INIT is not set 1626# CONFIG_DEBUG_MEMORY_INIT is not set
1413# CONFIG_DEBUG_LIST is not set 1627CONFIG_FRAME_POINTER=y
1414# CONFIG_DEBUG_SG is not set
1415# CONFIG_DEBUG_NOTIFIERS is not set
1416# CONFIG_FRAME_POINTER is not set
1417# CONFIG_RCU_TORTURE_TEST is not set
1418# CONFIG_RCU_CPU_STALL_DETECTOR is not set 1628# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1419# CONFIG_BACKTRACE_SELF_TEST is not set 1629CONFIG_LATENCYTOP=y
1420# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
1421# CONFIG_FAULT_INJECTION is not set
1422# CONFIG_LATENCYTOP is not set
1423CONFIG_SYSCTL_SYSCALL_CHECK=y 1630CONFIG_SYSCTL_SYSCALL_CHECK=y
1424# CONFIG_PAGE_POISONING is not set 1631CONFIG_NOP_TRACER=y
1425CONFIG_HAVE_FUNCTION_TRACER=y 1632CONFIG_HAVE_FUNCTION_TRACER=y
1633CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1634CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
1426CONFIG_HAVE_DYNAMIC_FTRACE=y 1635CONFIG_HAVE_DYNAMIC_FTRACE=y
1427CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1636CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1637CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
1638CONFIG_TRACER_MAX_TRACE=y
1639CONFIG_RING_BUFFER=y
1640CONFIG_EVENT_TRACING=y
1641CONFIG_CONTEXT_SWITCH_TRACER=y
1642CONFIG_RING_BUFFER_ALLOW_SWAP=y
1643CONFIG_TRACING=y
1644CONFIG_GENERIC_TRACER=y
1428CONFIG_TRACING_SUPPORT=y 1645CONFIG_TRACING_SUPPORT=y
1429CONFIG_FTRACE=y 1646CONFIG_FTRACE=y
1430# CONFIG_FUNCTION_TRACER is not set 1647CONFIG_FUNCTION_TRACER=y
1431# CONFIG_IRQSOFF_TRACER is not set 1648CONFIG_FUNCTION_GRAPH_TRACER=y
1649CONFIG_IRQSOFF_TRACER=y
1432# CONFIG_PREEMPT_TRACER is not set 1650# CONFIG_PREEMPT_TRACER is not set
1433# CONFIG_SCHED_TRACER is not set 1651CONFIG_SCHED_TRACER=y
1434# CONFIG_ENABLE_DEFAULT_TRACERS is not set 1652# CONFIG_FTRACE_SYSCALLS is not set
1435# CONFIG_BOOT_TRACER is not set 1653# CONFIG_BOOT_TRACER is not set
1436CONFIG_BRANCH_PROFILE_NONE=y 1654CONFIG_BRANCH_PROFILE_NONE=y
1437# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set 1655# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1438# CONFIG_PROFILE_ALL_BRANCHES is not set 1656# CONFIG_PROFILE_ALL_BRANCHES is not set
1439# CONFIG_STACK_TRACER is not set 1657CONFIG_STACK_TRACER=y
1440# CONFIG_KMEMTRACE is not set 1658CONFIG_KMEMTRACE=y
1441# CONFIG_WORKQUEUE_TRACER is not set 1659CONFIG_WORKQUEUE_TRACER=y
1442# CONFIG_BLK_DEV_IO_TRACE is not set 1660# CONFIG_BLK_DEV_IO_TRACE is not set
1661CONFIG_DYNAMIC_FTRACE=y
1662# CONFIG_FUNCTION_PROFILER is not set
1663CONFIG_FTRACE_MCOUNT_RECORD=y
1664# CONFIG_FTRACE_STARTUP_TEST is not set
1665# CONFIG_RING_BUFFER_BENCHMARK is not set
1666# CONFIG_DYNAMIC_DEBUG is not set
1443# CONFIG_DMA_API_DEBUG is not set 1667# CONFIG_DMA_API_DEBUG is not set
1444# CONFIG_SAMPLES is not set 1668# CONFIG_SAMPLES is not set
1445CONFIG_HAVE_ARCH_KGDB=y 1669CONFIG_HAVE_ARCH_KGDB=y
1446# CONFIG_KGDB is not set
1447# CONFIG_SH_STANDARD_BIOS is not set 1670# CONFIG_SH_STANDARD_BIOS is not set
1448# CONFIG_EARLY_SCIF_CONSOLE is not set 1671# CONFIG_EARLY_SCIF_CONSOLE is not set
1449# CONFIG_DEBUG_BOOTMEM is not set 1672CONFIG_DWARF_UNWINDER=y
1450# CONFIG_DEBUG_STACKOVERFLOW is not set 1673CONFIG_MCOUNT=y
1451# CONFIG_DEBUG_STACK_USAGE is not set
1452# CONFIG_4KSTACKS is not set
1453# CONFIG_DUMP_CODE is not set
1454# CONFIG_SH_NO_BSS_INIT is not set
1455 1674
1456# 1675#
1457# Security options 1676# Security options
@@ -1465,7 +1684,6 @@ CONFIG_CRYPTO=y
1465# 1684#
1466# Crypto core or helper 1685# Crypto core or helper
1467# 1686#
1468# CONFIG_CRYPTO_FIPS is not set
1469CONFIG_CRYPTO_ALGAPI=y 1687CONFIG_CRYPTO_ALGAPI=y
1470CONFIG_CRYPTO_ALGAPI2=y 1688CONFIG_CRYPTO_ALGAPI2=y
1471CONFIG_CRYPTO_AEAD2=y 1689CONFIG_CRYPTO_AEAD2=y
@@ -1507,11 +1725,13 @@ CONFIG_CRYPTO_CBC=y
1507# 1725#
1508CONFIG_CRYPTO_HMAC=y 1726CONFIG_CRYPTO_HMAC=y
1509# CONFIG_CRYPTO_XCBC is not set 1727# CONFIG_CRYPTO_XCBC is not set
1728# CONFIG_CRYPTO_VMAC is not set
1510 1729
1511# 1730#
1512# Digest 1731# Digest
1513# 1732#
1514# CONFIG_CRYPTO_CRC32C is not set 1733# CONFIG_CRYPTO_CRC32C is not set
1734# CONFIG_CRYPTO_GHASH is not set
1515# CONFIG_CRYPTO_MD4 is not set 1735# CONFIG_CRYPTO_MD4 is not set
1516CONFIG_CRYPTO_MD5=y 1736CONFIG_CRYPTO_MD5=y
1517# CONFIG_CRYPTO_MICHAEL_MIC is not set 1737# CONFIG_CRYPTO_MICHAEL_MIC is not set
@@ -1556,7 +1776,7 @@ CONFIG_CRYPTO_DES=y
1556# 1776#
1557# CONFIG_CRYPTO_ANSI_CPRNG is not set 1777# CONFIG_CRYPTO_ANSI_CPRNG is not set
1558# CONFIG_CRYPTO_HW is not set 1778# CONFIG_CRYPTO_HW is not set
1559# CONFIG_BINARY_PRINTF is not set 1779CONFIG_BINARY_PRINTF=y
1560 1780
1561# 1781#
1562# Library routines 1782# Library routines
@@ -1573,5 +1793,6 @@ CONFIG_CRC32=y
1573CONFIG_HAS_IOMEM=y 1793CONFIG_HAS_IOMEM=y
1574CONFIG_HAS_IOPORT=y 1794CONFIG_HAS_IOPORT=y
1575CONFIG_HAS_DMA=y 1795CONFIG_HAS_DMA=y
1796CONFIG_HAVE_LMB=y
1576CONFIG_NLATTR=y 1797CONFIG_NLATTR=y
1577CONFIG_GENERIC_ATOMIC64=y 1798CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/sh7785lcr_defconfig b/arch/sh/configs/sh7785lcr_defconfig
index 004e6f5e8a68..8c2c47ed3991 100644
--- a/arch/sh/configs/sh7785lcr_defconfig
+++ b/arch/sh/configs/sh7785lcr_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.30 3# Linux kernel version: 2.6.31
4# Thu Jun 18 13:09:34 2009 4# Thu Sep 24 19:23:18 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -14,6 +14,7 @@ CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y 14CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
16CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_IRQ_PER_CPU=y
17# CONFIG_GENERIC_GPIO is not set 18# CONFIG_GENERIC_GPIO is not set
18CONFIG_GENERIC_TIME=y 19CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 20CONFIG_GENERIC_CLOCKEVENTS=y
@@ -29,8 +30,9 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
29# CONFIG_ARCH_HAS_ILOG2_U64 is not set 30# CONFIG_ARCH_HAS_ILOG2_U64 is not set
30CONFIG_ARCH_NO_VIRT_TO_BUS=y 31CONFIG_ARCH_NO_VIRT_TO_BUS=y
31CONFIG_ARCH_HAS_DEFAULT_IDLE=y 32CONFIG_ARCH_HAS_DEFAULT_IDLE=y
32CONFIG_IO_TRAPPED=y 33CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
33CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 34CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
35CONFIG_CONSTRUCTORS=y
34 36
35# 37#
36# General setup 38# General setup
@@ -41,6 +43,12 @@ CONFIG_LOCK_KERNEL=y
41CONFIG_INIT_ENV_ARG_LIMIT=32 43CONFIG_INIT_ENV_ARG_LIMIT=32
42CONFIG_LOCALVERSION="" 44CONFIG_LOCALVERSION=""
43CONFIG_LOCALVERSION_AUTO=y 45CONFIG_LOCALVERSION_AUTO=y
46CONFIG_HAVE_KERNEL_GZIP=y
47CONFIG_HAVE_KERNEL_BZIP2=y
48CONFIG_HAVE_KERNEL_LZMA=y
49CONFIG_KERNEL_GZIP=y
50# CONFIG_KERNEL_BZIP2 is not set
51# CONFIG_KERNEL_LZMA is not set
44CONFIG_SWAP=y 52CONFIG_SWAP=y
45CONFIG_SYSVIPC=y 53CONFIG_SYSVIPC=y
46CONFIG_SYSVIPC_SYSCTL=y 54CONFIG_SYSVIPC_SYSCTL=y
@@ -53,11 +61,12 @@ CONFIG_BSD_PROCESS_ACCT=y
53# 61#
54# RCU Subsystem 62# RCU Subsystem
55# 63#
56CONFIG_CLASSIC_RCU=y 64CONFIG_TREE_RCU=y
57# CONFIG_TREE_RCU is not set 65# CONFIG_TREE_PREEMPT_RCU is not set
58# CONFIG_PREEMPT_RCU is not set 66# CONFIG_RCU_TRACE is not set
67CONFIG_RCU_FANOUT=32
68# CONFIG_RCU_FANOUT_EXACT is not set
59# CONFIG_TREE_RCU_TRACE is not set 69# CONFIG_TREE_RCU_TRACE is not set
60# CONFIG_PREEMPT_RCU_TRACE is not set
61CONFIG_IKCONFIG=y 70CONFIG_IKCONFIG=y
62CONFIG_IKCONFIG_PROC=y 71CONFIG_IKCONFIG_PROC=y
63CONFIG_LOG_BUF_SHIFT=14 72CONFIG_LOG_BUF_SHIFT=14
@@ -93,19 +102,20 @@ CONFIG_TIMERFD=y
93CONFIG_EVENTFD=y 102CONFIG_EVENTFD=y
94CONFIG_SHMEM=y 103CONFIG_SHMEM=y
95CONFIG_AIO=y 104CONFIG_AIO=y
105CONFIG_HAVE_PERF_EVENTS=y
96 106
97# 107#
98# Performance Counters 108# Kernel Performance Events And Counters
99# 109#
110CONFIG_PERF_EVENTS=y
111# CONFIG_PERF_COUNTERS is not set
100CONFIG_VM_EVENT_COUNTERS=y 112CONFIG_VM_EVENT_COUNTERS=y
101CONFIG_PCI_QUIRKS=y 113CONFIG_PCI_QUIRKS=y
102# CONFIG_STRIP_ASM_SYMS is not set
103CONFIG_COMPAT_BRK=y 114CONFIG_COMPAT_BRK=y
104CONFIG_SLAB=y 115CONFIG_SLAB=y
105# CONFIG_SLUB is not set 116# CONFIG_SLUB is not set
106# CONFIG_SLOB is not set 117# CONFIG_SLOB is not set
107CONFIG_PROFILING=y 118CONFIG_PROFILING=y
108# CONFIG_MARKERS is not set
109# CONFIG_OPROFILE is not set 119# CONFIG_OPROFILE is not set
110CONFIG_HAVE_OPROFILE=y 120CONFIG_HAVE_OPROFILE=y
111# CONFIG_KPROBES is not set 121# CONFIG_KPROBES is not set
@@ -115,6 +125,10 @@ CONFIG_HAVE_KRETPROBES=y
115CONFIG_HAVE_ARCH_TRACEHOOK=y 125CONFIG_HAVE_ARCH_TRACEHOOK=y
116CONFIG_HAVE_CLK=y 126CONFIG_HAVE_CLK=y
117CONFIG_HAVE_DMA_API_DEBUG=y 127CONFIG_HAVE_DMA_API_DEBUG=y
128
129#
130# GCOV-based kernel profiling
131#
118# CONFIG_SLOW_WORK is not set 132# CONFIG_SLOW_WORK is not set
119CONFIG_HAVE_GENERIC_DMA_COHERENT=y 133CONFIG_HAVE_GENERIC_DMA_COHERENT=y
120CONFIG_SLABINFO=y 134CONFIG_SLABINFO=y
@@ -127,7 +141,7 @@ CONFIG_MODULE_UNLOAD=y
127# CONFIG_MODVERSIONS is not set 141# CONFIG_MODVERSIONS is not set
128# CONFIG_MODULE_SRCVERSION_ALL is not set 142# CONFIG_MODULE_SRCVERSION_ALL is not set
129CONFIG_BLOCK=y 143CONFIG_BLOCK=y
130# CONFIG_LBD is not set 144CONFIG_LBDAF=y
131# CONFIG_BLK_DEV_BSG is not set 145# CONFIG_BLK_DEV_BSG is not set
132# CONFIG_BLK_DEV_INTEGRITY is not set 146# CONFIG_BLK_DEV_INTEGRITY is not set
133 147
@@ -176,6 +190,7 @@ CONFIG_CPU_SHX2=y
176# CONFIG_CPU_SUBTYPE_SH4_202 is not set 190# CONFIG_CPU_SUBTYPE_SH4_202 is not set
177# CONFIG_CPU_SUBTYPE_SH7723 is not set 191# CONFIG_CPU_SUBTYPE_SH7723 is not set
178# CONFIG_CPU_SUBTYPE_SH7724 is not set 192# CONFIG_CPU_SUBTYPE_SH7724 is not set
193# CONFIG_CPU_SUBTYPE_SH7757 is not set
179# CONFIG_CPU_SUBTYPE_SH7763 is not set 194# CONFIG_CPU_SUBTYPE_SH7763 is not set
180# CONFIG_CPU_SUBTYPE_SH7770 is not set 195# CONFIG_CPU_SUBTYPE_SH7770 is not set
181# CONFIG_CPU_SUBTYPE_SH7780 is not set 196# CONFIG_CPU_SUBTYPE_SH7780 is not set
@@ -224,6 +239,7 @@ CONFIG_ZONE_DMA_FLAG=0
224CONFIG_NR_QUICK=2 239CONFIG_NR_QUICK=2
225CONFIG_HAVE_MLOCK=y 240CONFIG_HAVE_MLOCK=y
226CONFIG_HAVE_MLOCKED_PAGE_BIT=y 241CONFIG_HAVE_MLOCKED_PAGE_BIT=y
242# CONFIG_KSM is not set
227CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 243CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
228 244
229# 245#
@@ -306,7 +322,8 @@ CONFIG_GUSA=y
306CONFIG_ZERO_PAGE_OFFSET=0x00001000 322CONFIG_ZERO_PAGE_OFFSET=0x00001000
307CONFIG_BOOT_LINK_OFFSET=0x00800000 323CONFIG_BOOT_LINK_OFFSET=0x00800000
308CONFIG_ENTRY_OFFSET=0x00001000 324CONFIG_ENTRY_OFFSET=0x00001000
309# CONFIG_CMDLINE_BOOL is not set 325# CONFIG_CMDLINE_OVERWRITE is not set
326# CONFIG_CMDLINE_EXTEND is not set
310 327
311# 328#
312# Bus options 329# Bus options
@@ -386,6 +403,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
386# CONFIG_NETFILTER is not set 403# CONFIG_NETFILTER is not set
387# CONFIG_IP_DCCP is not set 404# CONFIG_IP_DCCP is not set
388# CONFIG_IP_SCTP is not set 405# CONFIG_IP_SCTP is not set
406# CONFIG_RDS is not set
389# CONFIG_TIPC is not set 407# CONFIG_TIPC is not set
390# CONFIG_ATM is not set 408# CONFIG_ATM is not set
391# CONFIG_BRIDGE is not set 409# CONFIG_BRIDGE is not set
@@ -415,6 +433,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
415# CONFIG_AF_RXRPC is not set 433# CONFIG_AF_RXRPC is not set
416CONFIG_WIRELESS=y 434CONFIG_WIRELESS=y
417# CONFIG_CFG80211 is not set 435# CONFIG_CFG80211 is not set
436CONFIG_CFG80211_DEFAULT_PS_VALUE=0
418# CONFIG_WIRELESS_OLD_REGULATORY is not set 437# CONFIG_WIRELESS_OLD_REGULATORY is not set
419CONFIG_WIRELESS_EXT=y 438CONFIG_WIRELESS_EXT=y
420CONFIG_WIRELESS_EXT_SYSFS=y 439CONFIG_WIRELESS_EXT_SYSFS=y
@@ -423,7 +442,6 @@ CONFIG_WIRELESS_EXT_SYSFS=y
423# 442#
424# CFG80211 needs to be enabled for MAC80211 443# CFG80211 needs to be enabled for MAC80211
425# 444#
426CONFIG_MAC80211_DEFAULT_PS_VALUE=0
427# CONFIG_WIMAX is not set 445# CONFIG_WIMAX is not set
428# CONFIG_RFKILL is not set 446# CONFIG_RFKILL is not set
429# CONFIG_NET_9P is not set 447# CONFIG_NET_9P is not set
@@ -436,6 +454,7 @@ CONFIG_MAC80211_DEFAULT_PS_VALUE=0
436# Generic Driver Options 454# Generic Driver Options
437# 455#
438CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 456CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
457# CONFIG_DEVTMPFS is not set
439CONFIG_STANDALONE=y 458CONFIG_STANDALONE=y
440CONFIG_PREVENT_FIRMWARE_BUILD=y 459CONFIG_PREVENT_FIRMWARE_BUILD=y
441# CONFIG_FW_LOADER is not set 460# CONFIG_FW_LOADER is not set
@@ -445,9 +464,9 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
445# CONFIG_CONNECTOR is not set 464# CONFIG_CONNECTOR is not set
446CONFIG_MTD=y 465CONFIG_MTD=y
447# CONFIG_MTD_DEBUG is not set 466# CONFIG_MTD_DEBUG is not set
467# CONFIG_MTD_TESTS is not set
448CONFIG_MTD_CONCAT=y 468CONFIG_MTD_CONCAT=y
449CONFIG_MTD_PARTITIONS=y 469CONFIG_MTD_PARTITIONS=y
450# CONFIG_MTD_TESTS is not set
451# CONFIG_MTD_REDBOOT_PARTS is not set 470# CONFIG_MTD_REDBOOT_PARTS is not set
452# CONFIG_MTD_CMDLINE_PARTS is not set 471# CONFIG_MTD_CMDLINE_PARTS is not set
453# CONFIG_MTD_AR7_PARTS is not set 472# CONFIG_MTD_AR7_PARTS is not set
@@ -585,6 +604,7 @@ CONFIG_SCSI_WAIT_SCAN=m
585# CONFIG_SCSI_OSD_INITIATOR is not set 604# CONFIG_SCSI_OSD_INITIATOR is not set
586CONFIG_ATA=y 605CONFIG_ATA=y
587# CONFIG_ATA_NONSTANDARD is not set 606# CONFIG_ATA_NONSTANDARD is not set
607CONFIG_ATA_VERBOSE_ERROR=y
588CONFIG_SATA_PMP=y 608CONFIG_SATA_PMP=y
589# CONFIG_SATA_AHCI is not set 609# CONFIG_SATA_AHCI is not set
590# CONFIG_SATA_SIL24 is not set 610# CONFIG_SATA_SIL24 is not set
@@ -606,6 +626,7 @@ CONFIG_SATA_SIL=y
606# CONFIG_PATA_ALI is not set 626# CONFIG_PATA_ALI is not set
607# CONFIG_PATA_AMD is not set 627# CONFIG_PATA_AMD is not set
608# CONFIG_PATA_ARTOP is not set 628# CONFIG_PATA_ARTOP is not set
629# CONFIG_PATA_ATP867X is not set
609# CONFIG_PATA_ATIIXP is not set 630# CONFIG_PATA_ATIIXP is not set
610# CONFIG_PATA_CMD640_PCI is not set 631# CONFIG_PATA_CMD640_PCI is not set
611# CONFIG_PATA_CMD64X is not set 632# CONFIG_PATA_CMD64X is not set
@@ -633,6 +654,7 @@ CONFIG_SATA_SIL=y
633# CONFIG_PATA_OPTIDMA is not set 654# CONFIG_PATA_OPTIDMA is not set
634# CONFIG_PATA_PDC_OLD is not set 655# CONFIG_PATA_PDC_OLD is not set
635# CONFIG_PATA_RADISYS is not set 656# CONFIG_PATA_RADISYS is not set
657# CONFIG_PATA_RDC is not set
636# CONFIG_PATA_RZ1000 is not set 658# CONFIG_PATA_RZ1000 is not set
637# CONFIG_PATA_SC1200 is not set 659# CONFIG_PATA_SC1200 is not set
638# CONFIG_PATA_SERVERWORKS is not set 660# CONFIG_PATA_SERVERWORKS is not set
@@ -651,7 +673,11 @@ CONFIG_SATA_SIL=y
651# 673#
652 674
653# 675#
654# Enable only one of the two stacks, unless you know what you are doing 676# You can enable one or both FireWire driver stacks.
677#
678
679#
680# See the help texts for more information.
655# 681#
656# CONFIG_FIREWIRE is not set 682# CONFIG_FIREWIRE is not set
657# CONFIG_IEEE1394 is not set 683# CONFIG_IEEE1394 is not set
@@ -684,6 +710,7 @@ CONFIG_R8169=y
684# CONFIG_VIA_VELOCITY is not set 710# CONFIG_VIA_VELOCITY is not set
685# CONFIG_TIGON3 is not set 711# CONFIG_TIGON3 is not set
686# CONFIG_BNX2 is not set 712# CONFIG_BNX2 is not set
713# CONFIG_CNIC is not set
687# CONFIG_QLA3XXX is not set 714# CONFIG_QLA3XXX is not set
688# CONFIG_ATL1 is not set 715# CONFIG_ATL1 is not set
689# CONFIG_ATL1E is not set 716# CONFIG_ATL1E is not set
@@ -691,10 +718,7 @@ CONFIG_R8169=y
691# CONFIG_JME is not set 718# CONFIG_JME is not set
692# CONFIG_NETDEV_10000 is not set 719# CONFIG_NETDEV_10000 is not set
693# CONFIG_TR is not set 720# CONFIG_TR is not set
694 721CONFIG_WLAN=y
695#
696# Wireless LAN
697#
698# CONFIG_WLAN_PRE80211 is not set 722# CONFIG_WLAN_PRE80211 is not set
699# CONFIG_WLAN_80211 is not set 723# CONFIG_WLAN_80211 is not set
700 724
@@ -744,13 +768,17 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
744# Input Device Drivers 768# Input Device Drivers
745# 769#
746CONFIG_INPUT_KEYBOARD=y 770CONFIG_INPUT_KEYBOARD=y
771# CONFIG_KEYBOARD_ADP5588 is not set
747# CONFIG_KEYBOARD_ATKBD is not set 772# CONFIG_KEYBOARD_ATKBD is not set
748# CONFIG_KEYBOARD_SUNKBD is not set 773# CONFIG_QT2160 is not set
749# CONFIG_KEYBOARD_LKKBD is not set 774# CONFIG_KEYBOARD_LKKBD is not set
750# CONFIG_KEYBOARD_XTKBD is not set 775# CONFIG_KEYBOARD_MAX7359 is not set
751# CONFIG_KEYBOARD_NEWTON is not set 776# CONFIG_KEYBOARD_NEWTON is not set
777# CONFIG_KEYBOARD_OPENCORES is not set
752# CONFIG_KEYBOARD_STOWAWAY is not set 778# CONFIG_KEYBOARD_STOWAWAY is not set
779# CONFIG_KEYBOARD_SUNKBD is not set
753# CONFIG_KEYBOARD_SH_KEYSC is not set 780# CONFIG_KEYBOARD_SH_KEYSC is not set
781# CONFIG_KEYBOARD_XTKBD is not set
754# CONFIG_INPUT_MOUSE is not set 782# CONFIG_INPUT_MOUSE is not set
755# CONFIG_INPUT_JOYSTICK is not set 783# CONFIG_INPUT_JOYSTICK is not set
756# CONFIG_INPUT_TABLET is not set 784# CONFIG_INPUT_TABLET is not set
@@ -803,6 +831,7 @@ CONFIG_HW_RANDOM=y
803CONFIG_DEVPORT=y 831CONFIG_DEVPORT=y
804CONFIG_I2C=y 832CONFIG_I2C=y
805CONFIG_I2C_BOARDINFO=y 833CONFIG_I2C_BOARDINFO=y
834CONFIG_I2C_COMPAT=y
806# CONFIG_I2C_CHARDEV is not set 835# CONFIG_I2C_CHARDEV is not set
807CONFIG_I2C_HELPER_AUTO=y 836CONFIG_I2C_HELPER_AUTO=y
808CONFIG_I2C_ALGOPCA=y 837CONFIG_I2C_ALGOPCA=y
@@ -832,6 +861,7 @@ CONFIG_I2C_ALGOPCA=y
832# 861#
833# I2C system bus drivers (mostly embedded / system-on-chip) 862# I2C system bus drivers (mostly embedded / system-on-chip)
834# 863#
864# CONFIG_I2C_DESIGNWARE is not set
835# CONFIG_I2C_OCORES is not set 865# CONFIG_I2C_OCORES is not set
836# CONFIG_I2C_SH_MOBILE is not set 866# CONFIG_I2C_SH_MOBILE is not set
837# CONFIG_I2C_SIMTEC is not set 867# CONFIG_I2C_SIMTEC is not set
@@ -858,20 +888,21 @@ CONFIG_I2C_PCA_PLATFORM=y
858# Miscellaneous I2C Chip support 888# Miscellaneous I2C Chip support
859# 889#
860# CONFIG_DS1682 is not set 890# CONFIG_DS1682 is not set
861# CONFIG_SENSORS_PCF8574 is not set
862# CONFIG_PCF8575 is not set
863# CONFIG_SENSORS_PCA9539 is not set
864# CONFIG_SENSORS_TSL2550 is not set 891# CONFIG_SENSORS_TSL2550 is not set
865# CONFIG_I2C_DEBUG_CORE is not set 892# CONFIG_I2C_DEBUG_CORE is not set
866# CONFIG_I2C_DEBUG_ALGO is not set 893# CONFIG_I2C_DEBUG_ALGO is not set
867# CONFIG_I2C_DEBUG_BUS is not set 894# CONFIG_I2C_DEBUG_BUS is not set
868# CONFIG_I2C_DEBUG_CHIP is not set 895# CONFIG_I2C_DEBUG_CHIP is not set
869# CONFIG_SPI is not set 896# CONFIG_SPI is not set
897
898#
899# PPS support
900#
901# CONFIG_PPS is not set
870# CONFIG_W1 is not set 902# CONFIG_W1 is not set
871# CONFIG_POWER_SUPPLY is not set 903# CONFIG_POWER_SUPPLY is not set
872# CONFIG_HWMON is not set 904# CONFIG_HWMON is not set
873# CONFIG_THERMAL is not set 905# CONFIG_THERMAL is not set
874# CONFIG_THERMAL_HWMON is not set
875# CONFIG_WATCHDOG is not set 906# CONFIG_WATCHDOG is not set
876CONFIG_SSB_POSSIBLE=y 907CONFIG_SSB_POSSIBLE=y
877 908
@@ -890,14 +921,17 @@ CONFIG_MFD_SM501=y
890# CONFIG_MFD_TMIO is not set 921# CONFIG_MFD_TMIO is not set
891# CONFIG_PMIC_DA903X is not set 922# CONFIG_PMIC_DA903X is not set
892# CONFIG_MFD_WM8400 is not set 923# CONFIG_MFD_WM8400 is not set
924# CONFIG_MFD_WM831X is not set
893# CONFIG_MFD_WM8350_I2C is not set 925# CONFIG_MFD_WM8350_I2C is not set
894# CONFIG_MFD_PCF50633 is not set 926# CONFIG_MFD_PCF50633 is not set
927# CONFIG_AB3100_CORE is not set
895# CONFIG_REGULATOR is not set 928# CONFIG_REGULATOR is not set
896# CONFIG_MEDIA_SUPPORT is not set 929# CONFIG_MEDIA_SUPPORT is not set
897 930
898# 931#
899# Graphics support 932# Graphics support
900# 933#
934CONFIG_VGA_ARB=y
901# CONFIG_DRM is not set 935# CONFIG_DRM is not set
902# CONFIG_VGASTATE is not set 936# CONFIG_VGASTATE is not set
903# CONFIG_VIDEO_OUTPUT_CONTROL is not set 937# CONFIG_VIDEO_OUTPUT_CONTROL is not set
@@ -982,7 +1016,6 @@ CONFIG_LOGO_LINUX_CLUT224=y
982# CONFIG_SOUND is not set 1016# CONFIG_SOUND is not set
983CONFIG_HID_SUPPORT=y 1017CONFIG_HID_SUPPORT=y
984CONFIG_HID=y 1018CONFIG_HID=y
985# CONFIG_HID_DEBUG is not set
986# CONFIG_HIDRAW is not set 1019# CONFIG_HIDRAW is not set
987 1020
988# 1021#
@@ -1005,6 +1038,7 @@ CONFIG_HID_CYPRESS=y
1005CONFIG_HID_EZKEY=y 1038CONFIG_HID_EZKEY=y
1006# CONFIG_HID_KYE is not set 1039# CONFIG_HID_KYE is not set
1007CONFIG_HID_GYRATION=y 1040CONFIG_HID_GYRATION=y
1041# CONFIG_HID_TWINHAN is not set
1008# CONFIG_HID_KENSINGTON is not set 1042# CONFIG_HID_KENSINGTON is not set
1009CONFIG_HID_LOGITECH=y 1043CONFIG_HID_LOGITECH=y
1010# CONFIG_LOGITECH_FF is not set 1044# CONFIG_LOGITECH_FF is not set
@@ -1055,6 +1089,7 @@ CONFIG_USB_EHCI_HCD=m
1055# CONFIG_USB_OXU210HP_HCD is not set 1089# CONFIG_USB_OXU210HP_HCD is not set
1056# CONFIG_USB_ISP116X_HCD is not set 1090# CONFIG_USB_ISP116X_HCD is not set
1057# CONFIG_USB_ISP1760_HCD is not set 1091# CONFIG_USB_ISP1760_HCD is not set
1092# CONFIG_USB_ISP1362_HCD is not set
1058CONFIG_USB_OHCI_HCD=m 1093CONFIG_USB_OHCI_HCD=m
1059# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set 1094# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
1060# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set 1095# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
@@ -1173,6 +1208,7 @@ CONFIG_RTC_DRV_RS5C372=y
1173# CONFIG_RTC_DRV_S35390A is not set 1208# CONFIG_RTC_DRV_S35390A is not set
1174# CONFIG_RTC_DRV_FM3130 is not set 1209# CONFIG_RTC_DRV_FM3130 is not set
1175# CONFIG_RTC_DRV_RX8581 is not set 1210# CONFIG_RTC_DRV_RX8581 is not set
1211# CONFIG_RTC_DRV_RX8025 is not set
1176 1212
1177# 1213#
1178# SPI RTC drivers 1214# SPI RTC drivers
@@ -1224,8 +1260,10 @@ CONFIG_FS_MBCACHE=y
1224# CONFIG_JFS_FS is not set 1260# CONFIG_JFS_FS is not set
1225CONFIG_FS_POSIX_ACL=y 1261CONFIG_FS_POSIX_ACL=y
1226# CONFIG_XFS_FS is not set 1262# CONFIG_XFS_FS is not set
1263# CONFIG_GFS2_FS is not set
1227# CONFIG_OCFS2_FS is not set 1264# CONFIG_OCFS2_FS is not set
1228# CONFIG_BTRFS_FS is not set 1265# CONFIG_BTRFS_FS is not set
1266# CONFIG_NILFS2_FS is not set
1229CONFIG_FILE_LOCKING=y 1267CONFIG_FILE_LOCKING=y
1230CONFIG_FSNOTIFY=y 1268CONFIG_FSNOTIFY=y
1231CONFIG_DNOTIFY=y 1269CONFIG_DNOTIFY=y
@@ -1291,12 +1329,12 @@ CONFIG_MINIX_FS=y
1291# CONFIG_ROMFS_FS is not set 1329# CONFIG_ROMFS_FS is not set
1292# CONFIG_SYSV_FS is not set 1330# CONFIG_SYSV_FS is not set
1293# CONFIG_UFS_FS is not set 1331# CONFIG_UFS_FS is not set
1294# CONFIG_NILFS2_FS is not set
1295CONFIG_NETWORK_FILESYSTEMS=y 1332CONFIG_NETWORK_FILESYSTEMS=y
1296CONFIG_NFS_FS=y 1333CONFIG_NFS_FS=y
1297CONFIG_NFS_V3=y 1334CONFIG_NFS_V3=y
1298# CONFIG_NFS_V3_ACL is not set 1335# CONFIG_NFS_V3_ACL is not set
1299CONFIG_NFS_V4=y 1336CONFIG_NFS_V4=y
1337# CONFIG_NFS_V4_1 is not set
1300CONFIG_ROOT_NFS=y 1338CONFIG_ROOT_NFS=y
1301CONFIG_NFSD=y 1339CONFIG_NFSD=y
1302CONFIG_NFSD_V3=y 1340CONFIG_NFSD_V3=y
@@ -1372,6 +1410,7 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1372# CONFIG_ENABLE_MUST_CHECK is not set 1410# CONFIG_ENABLE_MUST_CHECK is not set
1373CONFIG_FRAME_WARN=1024 1411CONFIG_FRAME_WARN=1024
1374# CONFIG_MAGIC_SYSRQ is not set 1412# CONFIG_MAGIC_SYSRQ is not set
1413# CONFIG_STRIP_ASM_SYMS is not set
1375# CONFIG_UNUSED_SYMBOLS is not set 1414# CONFIG_UNUSED_SYMBOLS is not set
1376# CONFIG_DEBUG_FS is not set 1415# CONFIG_DEBUG_FS is not set
1377# CONFIG_HEADERS_CHECK is not set 1416# CONFIG_HEADERS_CHECK is not set
@@ -1407,18 +1446,23 @@ CONFIG_DEBUG_PREEMPT=y
1407# CONFIG_DEBUG_LIST is not set 1446# CONFIG_DEBUG_LIST is not set
1408# CONFIG_DEBUG_SG is not set 1447# CONFIG_DEBUG_SG is not set
1409# CONFIG_DEBUG_NOTIFIERS is not set 1448# CONFIG_DEBUG_NOTIFIERS is not set
1449# CONFIG_DEBUG_CREDENTIALS is not set
1410# CONFIG_FRAME_POINTER is not set 1450# CONFIG_FRAME_POINTER is not set
1411# CONFIG_RCU_TORTURE_TEST is not set 1451# CONFIG_RCU_TORTURE_TEST is not set
1412# CONFIG_RCU_CPU_STALL_DETECTOR is not set 1452# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1413# CONFIG_BACKTRACE_SELF_TEST is not set 1453# CONFIG_BACKTRACE_SELF_TEST is not set
1414# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set 1454# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
1455# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
1415# CONFIG_FAULT_INJECTION is not set 1456# CONFIG_FAULT_INJECTION is not set
1416# CONFIG_LATENCYTOP is not set 1457# CONFIG_LATENCYTOP is not set
1417CONFIG_SYSCTL_SYSCALL_CHECK=y 1458CONFIG_SYSCTL_SYSCALL_CHECK=y
1418# CONFIG_PAGE_POISONING is not set 1459# CONFIG_PAGE_POISONING is not set
1419CONFIG_HAVE_FUNCTION_TRACER=y 1460CONFIG_HAVE_FUNCTION_TRACER=y
1461CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1462CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
1420CONFIG_HAVE_DYNAMIC_FTRACE=y 1463CONFIG_HAVE_DYNAMIC_FTRACE=y
1421CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1464CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1465CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
1422CONFIG_TRACING_SUPPORT=y 1466CONFIG_TRACING_SUPPORT=y
1423CONFIG_FTRACE=y 1467CONFIG_FTRACE=y
1424# CONFIG_FUNCTION_TRACER is not set 1468# CONFIG_FUNCTION_TRACER is not set
@@ -1426,6 +1470,7 @@ CONFIG_FTRACE=y
1426# CONFIG_PREEMPT_TRACER is not set 1470# CONFIG_PREEMPT_TRACER is not set
1427# CONFIG_SCHED_TRACER is not set 1471# CONFIG_SCHED_TRACER is not set
1428# CONFIG_ENABLE_DEFAULT_TRACERS is not set 1472# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1473# CONFIG_FTRACE_SYSCALLS is not set
1429# CONFIG_BOOT_TRACER is not set 1474# CONFIG_BOOT_TRACER is not set
1430CONFIG_BRANCH_PROFILE_NONE=y 1475CONFIG_BRANCH_PROFILE_NONE=y
1431# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set 1476# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
@@ -1440,11 +1485,11 @@ CONFIG_HAVE_ARCH_KGDB=y
1440# CONFIG_KGDB is not set 1485# CONFIG_KGDB is not set
1441# CONFIG_SH_STANDARD_BIOS is not set 1486# CONFIG_SH_STANDARD_BIOS is not set
1442# CONFIG_EARLY_SCIF_CONSOLE is not set 1487# CONFIG_EARLY_SCIF_CONSOLE is not set
1443# CONFIG_DEBUG_BOOTMEM is not set 1488# CONFIG_STACK_DEBUG is not set
1444# CONFIG_DEBUG_STACKOVERFLOW is not set
1445# CONFIG_DEBUG_STACK_USAGE is not set 1489# CONFIG_DEBUG_STACK_USAGE is not set
1446# CONFIG_4KSTACKS is not set 1490# CONFIG_4KSTACKS is not set
1447# CONFIG_DUMP_CODE is not set 1491# CONFIG_DUMP_CODE is not set
1492# CONFIG_DWARF_UNWINDER is not set
1448# CONFIG_SH_NO_BSS_INIT is not set 1493# CONFIG_SH_NO_BSS_INIT is not set
1449 1494
1450# 1495#
@@ -1459,7 +1504,6 @@ CONFIG_CRYPTO=y
1459# 1504#
1460# Crypto core or helper 1505# Crypto core or helper
1461# 1506#
1462# CONFIG_CRYPTO_FIPS is not set
1463CONFIG_CRYPTO_ALGAPI=y 1507CONFIG_CRYPTO_ALGAPI=y
1464CONFIG_CRYPTO_ALGAPI2=y 1508CONFIG_CRYPTO_ALGAPI2=y
1465CONFIG_CRYPTO_AEAD2=y 1509CONFIG_CRYPTO_AEAD2=y
@@ -1501,11 +1545,13 @@ CONFIG_CRYPTO_CBC=y
1501# 1545#
1502CONFIG_CRYPTO_HMAC=y 1546CONFIG_CRYPTO_HMAC=y
1503# CONFIG_CRYPTO_XCBC is not set 1547# CONFIG_CRYPTO_XCBC is not set
1548# CONFIG_CRYPTO_VMAC is not set
1504 1549
1505# 1550#
1506# Digest 1551# Digest
1507# 1552#
1508# CONFIG_CRYPTO_CRC32C is not set 1553# CONFIG_CRYPTO_CRC32C is not set
1554# CONFIG_CRYPTO_GHASH is not set
1509# CONFIG_CRYPTO_MD4 is not set 1555# CONFIG_CRYPTO_MD4 is not set
1510CONFIG_CRYPTO_MD5=y 1556CONFIG_CRYPTO_MD5=y
1511# CONFIG_CRYPTO_MICHAEL_MIC is not set 1557# CONFIG_CRYPTO_MICHAEL_MIC is not set
@@ -1567,5 +1613,6 @@ CONFIG_CRC32=y
1567CONFIG_HAS_IOMEM=y 1613CONFIG_HAS_IOMEM=y
1568CONFIG_HAS_IOPORT=y 1614CONFIG_HAS_IOPORT=y
1569CONFIG_HAS_DMA=y 1615CONFIG_HAS_DMA=y
1616CONFIG_HAVE_LMB=y
1570CONFIG_NLATTR=y 1617CONFIG_NLATTR=y
1571CONFIG_GENERIC_ATOMIC64=y 1618CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/shmin_defconfig b/arch/sh/configs/shmin_defconfig
index ad7d60972fcf..92115e612750 100644
--- a/arch/sh/configs/shmin_defconfig
+++ b/arch/sh/configs/shmin_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.30 3# Linux kernel version: 2.6.31
4# Thu Jun 18 13:10:33 2009 4# Thu Sep 24 19:27:17 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -13,6 +13,7 @@ CONFIG_GENERIC_HWEIGHT=y
13CONFIG_GENERIC_HARDIRQS=y 13CONFIG_GENERIC_HARDIRQS=y
14CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 14CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
15CONFIG_GENERIC_IRQ_PROBE=y 15CONFIG_GENERIC_IRQ_PROBE=y
16CONFIG_IRQ_PER_CPU=y
16# CONFIG_GENERIC_GPIO is not set 17# CONFIG_GENERIC_GPIO is not set
17CONFIG_GENERIC_TIME=y 18CONFIG_GENERIC_TIME=y
18CONFIG_GENERIC_CLOCKEVENTS=y 19CONFIG_GENERIC_CLOCKEVENTS=y
@@ -26,7 +27,9 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
26# CONFIG_ARCH_HAS_ILOG2_U64 is not set 27# CONFIG_ARCH_HAS_ILOG2_U64 is not set
27CONFIG_ARCH_NO_VIRT_TO_BUS=y 28CONFIG_ARCH_NO_VIRT_TO_BUS=y
28CONFIG_ARCH_HAS_DEFAULT_IDLE=y 29CONFIG_ARCH_HAS_DEFAULT_IDLE=y
30CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
29CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 31CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
32CONFIG_CONSTRUCTORS=y
30 33
31# 34#
32# General setup 35# General setup
@@ -36,6 +39,12 @@ CONFIG_BROKEN_ON_SMP=y
36CONFIG_INIT_ENV_ARG_LIMIT=32 39CONFIG_INIT_ENV_ARG_LIMIT=32
37CONFIG_LOCALVERSION="" 40CONFIG_LOCALVERSION=""
38CONFIG_LOCALVERSION_AUTO=y 41CONFIG_LOCALVERSION_AUTO=y
42CONFIG_HAVE_KERNEL_GZIP=y
43CONFIG_HAVE_KERNEL_BZIP2=y
44CONFIG_HAVE_KERNEL_LZMA=y
45CONFIG_KERNEL_GZIP=y
46# CONFIG_KERNEL_BZIP2 is not set
47# CONFIG_KERNEL_LZMA is not set
39# CONFIG_SWAP is not set 48# CONFIG_SWAP is not set
40# CONFIG_SYSVIPC is not set 49# CONFIG_SYSVIPC is not set
41# CONFIG_POSIX_MQUEUE is not set 50# CONFIG_POSIX_MQUEUE is not set
@@ -46,11 +55,12 @@ CONFIG_LOCALVERSION_AUTO=y
46# 55#
47# RCU Subsystem 56# RCU Subsystem
48# 57#
49CONFIG_CLASSIC_RCU=y 58CONFIG_TREE_RCU=y
50# CONFIG_TREE_RCU is not set 59# CONFIG_TREE_PREEMPT_RCU is not set
51# CONFIG_PREEMPT_RCU is not set 60# CONFIG_RCU_TRACE is not set
61CONFIG_RCU_FANOUT=32
62# CONFIG_RCU_FANOUT_EXACT is not set
52# CONFIG_TREE_RCU_TRACE is not set 63# CONFIG_TREE_RCU_TRACE is not set
53# CONFIG_PREEMPT_RCU_TRACE is not set
54# CONFIG_IKCONFIG is not set 64# CONFIG_IKCONFIG is not set
55CONFIG_LOG_BUF_SHIFT=14 65CONFIG_LOG_BUF_SHIFT=14
56# CONFIG_GROUP_SCHED is not set 66# CONFIG_GROUP_SCHED is not set
@@ -77,18 +87,19 @@ CONFIG_TIMERFD=y
77CONFIG_EVENTFD=y 87CONFIG_EVENTFD=y
78# CONFIG_SHMEM is not set 88# CONFIG_SHMEM is not set
79CONFIG_AIO=y 89CONFIG_AIO=y
90CONFIG_HAVE_PERF_EVENTS=y
80 91
81# 92#
82# Performance Counters 93# Kernel Performance Events And Counters
83# 94#
95# CONFIG_PERF_EVENTS is not set
96# CONFIG_PERF_COUNTERS is not set
84CONFIG_VM_EVENT_COUNTERS=y 97CONFIG_VM_EVENT_COUNTERS=y
85# CONFIG_STRIP_ASM_SYMS is not set
86CONFIG_COMPAT_BRK=y 98CONFIG_COMPAT_BRK=y
87# CONFIG_SLAB is not set 99# CONFIG_SLAB is not set
88# CONFIG_SLUB is not set 100# CONFIG_SLUB is not set
89CONFIG_SLOB=y 101CONFIG_SLOB=y
90# CONFIG_PROFILING is not set 102# CONFIG_PROFILING is not set
91# CONFIG_MARKERS is not set
92CONFIG_HAVE_OPROFILE=y 103CONFIG_HAVE_OPROFILE=y
93CONFIG_HAVE_IOREMAP_PROT=y 104CONFIG_HAVE_IOREMAP_PROT=y
94CONFIG_HAVE_KPROBES=y 105CONFIG_HAVE_KPROBES=y
@@ -96,12 +107,16 @@ CONFIG_HAVE_KRETPROBES=y
96CONFIG_HAVE_ARCH_TRACEHOOK=y 107CONFIG_HAVE_ARCH_TRACEHOOK=y
97CONFIG_HAVE_CLK=y 108CONFIG_HAVE_CLK=y
98CONFIG_HAVE_DMA_API_DEBUG=y 109CONFIG_HAVE_DMA_API_DEBUG=y
110
111#
112# GCOV-based kernel profiling
113#
99# CONFIG_SLOW_WORK is not set 114# CONFIG_SLOW_WORK is not set
100CONFIG_HAVE_GENERIC_DMA_COHERENT=y 115CONFIG_HAVE_GENERIC_DMA_COHERENT=y
101CONFIG_BASE_SMALL=1 116CONFIG_BASE_SMALL=1
102# CONFIG_MODULES is not set 117# CONFIG_MODULES is not set
103CONFIG_BLOCK=y 118CONFIG_BLOCK=y
104# CONFIG_LBD is not set 119CONFIG_LBDAF=y
105# CONFIG_BLK_DEV_BSG is not set 120# CONFIG_BLK_DEV_BSG is not set
106# CONFIG_BLK_DEV_INTEGRITY is not set 121# CONFIG_BLK_DEV_INTEGRITY is not set
107 122
@@ -148,6 +163,7 @@ CONFIG_CPU_SUBTYPE_SH7706=y
148# CONFIG_CPU_SUBTYPE_SH4_202 is not set 163# CONFIG_CPU_SUBTYPE_SH4_202 is not set
149# CONFIG_CPU_SUBTYPE_SH7723 is not set 164# CONFIG_CPU_SUBTYPE_SH7723 is not set
150# CONFIG_CPU_SUBTYPE_SH7724 is not set 165# CONFIG_CPU_SUBTYPE_SH7724 is not set
166# CONFIG_CPU_SUBTYPE_SH7757 is not set
151# CONFIG_CPU_SUBTYPE_SH7763 is not set 167# CONFIG_CPU_SUBTYPE_SH7763 is not set
152# CONFIG_CPU_SUBTYPE_SH7770 is not set 168# CONFIG_CPU_SUBTYPE_SH7770 is not set
153# CONFIG_CPU_SUBTYPE_SH7780 is not set 169# CONFIG_CPU_SUBTYPE_SH7780 is not set
@@ -193,6 +209,7 @@ CONFIG_ZONE_DMA_FLAG=0
193CONFIG_NR_QUICK=2 209CONFIG_NR_QUICK=2
194CONFIG_HAVE_MLOCK=y 210CONFIG_HAVE_MLOCK=y
195CONFIG_HAVE_MLOCKED_PAGE_BIT=y 211CONFIG_HAVE_MLOCKED_PAGE_BIT=y
212# CONFIG_KSM is not set
196CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 213CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
197 214
198# 215#
@@ -274,7 +291,8 @@ CONFIG_GUSA=y
274CONFIG_ZERO_PAGE_OFFSET=0x00001000 291CONFIG_ZERO_PAGE_OFFSET=0x00001000
275CONFIG_BOOT_LINK_OFFSET=0x00210000 292CONFIG_BOOT_LINK_OFFSET=0x00210000
276CONFIG_ENTRY_OFFSET=0x00001000 293CONFIG_ENTRY_OFFSET=0x00001000
277CONFIG_CMDLINE_BOOL=y 294CONFIG_CMDLINE_OVERWRITE=y
295# CONFIG_CMDLINE_EXTEND is not set
278CONFIG_CMDLINE="console=ttySC1,115200 root=1f01 mtdparts=phys_mapped_flash:64k(firm)ro,-(sys) netdev=34,0x300,eth0 " 296CONFIG_CMDLINE="console=ttySC1,115200 root=1f01 mtdparts=phys_mapped_flash:64k(firm)ro,-(sys) netdev=34,0x300,eth0 "
279 297
280# 298#
@@ -339,6 +357,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
339# CONFIG_NETFILTER is not set 357# CONFIG_NETFILTER is not set
340# CONFIG_IP_DCCP is not set 358# CONFIG_IP_DCCP is not set
341# CONFIG_IP_SCTP is not set 359# CONFIG_IP_SCTP is not set
360# CONFIG_RDS is not set
342# CONFIG_TIPC is not set 361# CONFIG_TIPC is not set
343# CONFIG_ATM is not set 362# CONFIG_ATM is not set
344# CONFIG_BRIDGE is not set 363# CONFIG_BRIDGE is not set
@@ -368,6 +387,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
368# CONFIG_AF_RXRPC is not set 387# CONFIG_AF_RXRPC is not set
369CONFIG_WIRELESS=y 388CONFIG_WIRELESS=y
370# CONFIG_CFG80211 is not set 389# CONFIG_CFG80211 is not set
390CONFIG_CFG80211_DEFAULT_PS_VALUE=0
371# CONFIG_WIRELESS_OLD_REGULATORY is not set 391# CONFIG_WIRELESS_OLD_REGULATORY is not set
372# CONFIG_WIRELESS_EXT is not set 392# CONFIG_WIRELESS_EXT is not set
373# CONFIG_LIB80211 is not set 393# CONFIG_LIB80211 is not set
@@ -375,7 +395,6 @@ CONFIG_WIRELESS=y
375# 395#
376# CFG80211 needs to be enabled for MAC80211 396# CFG80211 needs to be enabled for MAC80211
377# 397#
378CONFIG_MAC80211_DEFAULT_PS_VALUE=0
379# CONFIG_WIMAX is not set 398# CONFIG_WIMAX is not set
380# CONFIG_RFKILL is not set 399# CONFIG_RFKILL is not set
381# CONFIG_NET_9P is not set 400# CONFIG_NET_9P is not set
@@ -529,10 +548,7 @@ CONFIG_NET_ETHERNET=y
529# CONFIG_KS8842 is not set 548# CONFIG_KS8842 is not set
530CONFIG_NETDEV_1000=y 549CONFIG_NETDEV_1000=y
531CONFIG_NETDEV_10000=y 550CONFIG_NETDEV_10000=y
532 551CONFIG_WLAN=y
533#
534# Wireless LAN
535#
536# CONFIG_WLAN_PRE80211 is not set 552# CONFIG_WLAN_PRE80211 is not set
537# CONFIG_WLAN_80211 is not set 553# CONFIG_WLAN_80211 is not set
538 554
@@ -591,11 +607,15 @@ CONFIG_HW_RANDOM=y
591# CONFIG_TCG_TPM is not set 607# CONFIG_TCG_TPM is not set
592# CONFIG_I2C is not set 608# CONFIG_I2C is not set
593# CONFIG_SPI is not set 609# CONFIG_SPI is not set
610
611#
612# PPS support
613#
614# CONFIG_PPS is not set
594# CONFIG_W1 is not set 615# CONFIG_W1 is not set
595# CONFIG_POWER_SUPPLY is not set 616# CONFIG_POWER_SUPPLY is not set
596# CONFIG_HWMON is not set 617# CONFIG_HWMON is not set
597# CONFIG_THERMAL is not set 618# CONFIG_THERMAL is not set
598# CONFIG_THERMAL_HWMON is not set
599# CONFIG_WATCHDOG is not set 619# CONFIG_WATCHDOG is not set
600CONFIG_SSB_POSSIBLE=y 620CONFIG_SSB_POSSIBLE=y
601 621
@@ -672,7 +692,9 @@ CONFIG_RTC_LIB=y
672# CONFIG_JFS_FS is not set 692# CONFIG_JFS_FS is not set
673# CONFIG_FS_POSIX_ACL is not set 693# CONFIG_FS_POSIX_ACL is not set
674# CONFIG_XFS_FS is not set 694# CONFIG_XFS_FS is not set
695# CONFIG_GFS2_FS is not set
675# CONFIG_BTRFS_FS is not set 696# CONFIG_BTRFS_FS is not set
697# CONFIG_NILFS2_FS is not set
676CONFIG_FILE_LOCKING=y 698CONFIG_FILE_LOCKING=y
677CONFIG_FSNOTIFY=y 699CONFIG_FSNOTIFY=y
678# CONFIG_DNOTIFY is not set 700# CONFIG_DNOTIFY is not set
@@ -709,8 +731,6 @@ CONFIG_PROC_FS=y
709CONFIG_PROC_SYSCTL=y 731CONFIG_PROC_SYSCTL=y
710CONFIG_PROC_PAGE_MONITOR=y 732CONFIG_PROC_PAGE_MONITOR=y
711# CONFIG_SYSFS is not set 733# CONFIG_SYSFS is not set
712CONFIG_TMPFS=y
713# CONFIG_TMPFS_POSIX_ACL is not set
714# CONFIG_HUGETLBFS is not set 734# CONFIG_HUGETLBFS is not set
715# CONFIG_HUGETLB_PAGE is not set 735# CONFIG_HUGETLB_PAGE is not set
716CONFIG_MISC_FILESYSTEMS=y 736CONFIG_MISC_FILESYSTEMS=y
@@ -732,7 +752,6 @@ CONFIG_CRAMFS=y
732# CONFIG_ROMFS_FS is not set 752# CONFIG_ROMFS_FS is not set
733# CONFIG_SYSV_FS is not set 753# CONFIG_SYSV_FS is not set
734# CONFIG_UFS_FS is not set 754# CONFIG_UFS_FS is not set
735# CONFIG_NILFS2_FS is not set
736CONFIG_NETWORK_FILESYSTEMS=y 755CONFIG_NETWORK_FILESYSTEMS=y
737CONFIG_NFS_FS=y 756CONFIG_NFS_FS=y
738CONFIG_NFS_V3=y 757CONFIG_NFS_V3=y
@@ -768,6 +787,7 @@ CONFIG_ENABLE_WARN_DEPRECATED=y
768CONFIG_ENABLE_MUST_CHECK=y 787CONFIG_ENABLE_MUST_CHECK=y
769CONFIG_FRAME_WARN=1024 788CONFIG_FRAME_WARN=1024
770# CONFIG_MAGIC_SYSRQ is not set 789# CONFIG_MAGIC_SYSRQ is not set
790# CONFIG_STRIP_ASM_SYMS is not set
771# CONFIG_UNUSED_SYMBOLS is not set 791# CONFIG_UNUSED_SYMBOLS is not set
772# CONFIG_HEADERS_CHECK is not set 792# CONFIG_HEADERS_CHECK is not set
773# CONFIG_DEBUG_KERNEL is not set 793# CONFIG_DEBUG_KERNEL is not set
@@ -775,8 +795,11 @@ CONFIG_FRAME_WARN=1024
775# CONFIG_RCU_CPU_STALL_DETECTOR is not set 795# CONFIG_RCU_CPU_STALL_DETECTOR is not set
776# CONFIG_LATENCYTOP is not set 796# CONFIG_LATENCYTOP is not set
777CONFIG_HAVE_FUNCTION_TRACER=y 797CONFIG_HAVE_FUNCTION_TRACER=y
798CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
799CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
778CONFIG_HAVE_DYNAMIC_FTRACE=y 800CONFIG_HAVE_DYNAMIC_FTRACE=y
779CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 801CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
802CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
780CONFIG_TRACING_SUPPORT=y 803CONFIG_TRACING_SUPPORT=y
781# CONFIG_FTRACE is not set 804# CONFIG_FTRACE is not set
782# CONFIG_DMA_API_DEBUG is not set 805# CONFIG_DMA_API_DEBUG is not set
@@ -785,6 +808,7 @@ CONFIG_HAVE_ARCH_KGDB=y
785CONFIG_SH_STANDARD_BIOS=y 808CONFIG_SH_STANDARD_BIOS=y
786# CONFIG_EARLY_SCIF_CONSOLE is not set 809# CONFIG_EARLY_SCIF_CONSOLE is not set
787CONFIG_EARLY_PRINTK=y 810CONFIG_EARLY_PRINTK=y
811# CONFIG_DWARF_UNWINDER is not set
788 812
789# 813#
790# Security options 814# Security options
@@ -797,7 +821,6 @@ CONFIG_CRYPTO=y
797# 821#
798# Crypto core or helper 822# Crypto core or helper
799# 823#
800# CONFIG_CRYPTO_FIPS is not set
801# CONFIG_CRYPTO_MANAGER is not set 824# CONFIG_CRYPTO_MANAGER is not set
802# CONFIG_CRYPTO_MANAGER2 is not set 825# CONFIG_CRYPTO_MANAGER2 is not set
803# CONFIG_CRYPTO_GF128MUL is not set 826# CONFIG_CRYPTO_GF128MUL is not set
@@ -828,11 +851,13 @@ CONFIG_CRYPTO=y
828# 851#
829# CONFIG_CRYPTO_HMAC is not set 852# CONFIG_CRYPTO_HMAC is not set
830# CONFIG_CRYPTO_XCBC is not set 853# CONFIG_CRYPTO_XCBC is not set
854# CONFIG_CRYPTO_VMAC is not set
831 855
832# 856#
833# Digest 857# Digest
834# 858#
835# CONFIG_CRYPTO_CRC32C is not set 859# CONFIG_CRYPTO_CRC32C is not set
860# CONFIG_CRYPTO_GHASH is not set
836# CONFIG_CRYPTO_MD4 is not set 861# CONFIG_CRYPTO_MD4 is not set
837# CONFIG_CRYPTO_MD5 is not set 862# CONFIG_CRYPTO_MD5 is not set
838# CONFIG_CRYPTO_MICHAEL_MIC is not set 863# CONFIG_CRYPTO_MICHAEL_MIC is not set
@@ -895,5 +920,6 @@ CONFIG_ZLIB_INFLATE=y
895CONFIG_HAS_IOMEM=y 920CONFIG_HAS_IOMEM=y
896CONFIG_HAS_IOPORT=y 921CONFIG_HAS_IOPORT=y
897CONFIG_HAS_DMA=y 922CONFIG_HAS_DMA=y
923CONFIG_HAVE_LMB=y
898CONFIG_NLATTR=y 924CONFIG_NLATTR=y
899CONFIG_GENERIC_ATOMIC64=y 925CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/shx3_defconfig b/arch/sh/configs/shx3_defconfig
index 207b0c9a8cdf..e3858d757d5e 100644
--- a/arch/sh/configs/shx3_defconfig
+++ b/arch/sh/configs/shx3_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.30 3# Linux kernel version: 2.6.31
4# Thu Jun 18 13:11:03 2009 4# Thu Sep 24 19:29:26 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -14,6 +14,7 @@ CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y 14CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
16CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_IRQ_PER_CPU=y
17# CONFIG_GENERIC_GPIO is not set 18# CONFIG_GENERIC_GPIO is not set
18CONFIG_GENERIC_TIME=y 19CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 20CONFIG_GENERIC_CLOCKEVENTS=y
@@ -30,7 +31,9 @@ CONFIG_LOCKDEP_SUPPORT=y
30# CONFIG_ARCH_HAS_ILOG2_U64 is not set 31# CONFIG_ARCH_HAS_ILOG2_U64 is not set
31CONFIG_ARCH_NO_VIRT_TO_BUS=y 32CONFIG_ARCH_NO_VIRT_TO_BUS=y
32CONFIG_ARCH_HAS_DEFAULT_IDLE=y 33CONFIG_ARCH_HAS_DEFAULT_IDLE=y
34CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
33CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 35CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
36CONFIG_CONSTRUCTORS=y
34 37
35# 38#
36# General setup 39# General setup
@@ -40,6 +43,12 @@ CONFIG_LOCK_KERNEL=y
40CONFIG_INIT_ENV_ARG_LIMIT=32 43CONFIG_INIT_ENV_ARG_LIMIT=32
41CONFIG_LOCALVERSION="" 44CONFIG_LOCALVERSION=""
42CONFIG_LOCALVERSION_AUTO=y 45CONFIG_LOCALVERSION_AUTO=y
46CONFIG_HAVE_KERNEL_GZIP=y
47CONFIG_HAVE_KERNEL_BZIP2=y
48CONFIG_HAVE_KERNEL_LZMA=y
49CONFIG_KERNEL_GZIP=y
50# CONFIG_KERNEL_BZIP2 is not set
51# CONFIG_KERNEL_LZMA is not set
43CONFIG_SWAP=y 52CONFIG_SWAP=y
44CONFIG_SYSVIPC=y 53CONFIG_SYSVIPC=y
45CONFIG_SYSVIPC_SYSCTL=y 54CONFIG_SYSVIPC_SYSCTL=y
@@ -55,12 +64,12 @@ CONFIG_AUDIT_TREE=y
55# 64#
56# RCU Subsystem 65# RCU Subsystem
57# 66#
58# CONFIG_CLASSIC_RCU is not set 67CONFIG_TREE_RCU=y
59# CONFIG_TREE_RCU is not set 68# CONFIG_TREE_PREEMPT_RCU is not set
60CONFIG_PREEMPT_RCU=y
61CONFIG_RCU_TRACE=y 69CONFIG_RCU_TRACE=y
62# CONFIG_TREE_RCU_TRACE is not set 70CONFIG_RCU_FANOUT=32
63CONFIG_PREEMPT_RCU_TRACE=y 71# CONFIG_RCU_FANOUT_EXACT is not set
72CONFIG_TREE_RCU_TRACE=y
64CONFIG_IKCONFIG=y 73CONFIG_IKCONFIG=y
65CONFIG_IKCONFIG_PROC=y 74CONFIG_IKCONFIG_PROC=y
66CONFIG_LOG_BUF_SHIFT=14 75CONFIG_LOG_BUF_SHIFT=14
@@ -111,19 +120,21 @@ CONFIG_TIMERFD=y
111CONFIG_EVENTFD=y 120CONFIG_EVENTFD=y
112CONFIG_SHMEM=y 121CONFIG_SHMEM=y
113CONFIG_AIO=y 122CONFIG_AIO=y
123CONFIG_HAVE_PERF_EVENTS=y
114 124
115# 125#
116# Performance Counters 126# Kernel Performance Events And Counters
117# 127#
128CONFIG_PERF_EVENTS=y
129CONFIG_EVENT_PROFILE=y
130# CONFIG_PERF_COUNTERS is not set
118CONFIG_VM_EVENT_COUNTERS=y 131CONFIG_VM_EVENT_COUNTERS=y
119# CONFIG_STRIP_ASM_SYMS is not set
120CONFIG_COMPAT_BRK=y 132CONFIG_COMPAT_BRK=y
121# CONFIG_SLAB is not set 133# CONFIG_SLAB is not set
122# CONFIG_SLUB is not set 134# CONFIG_SLUB is not set
123CONFIG_SLOB=y 135CONFIG_SLOB=y
124CONFIG_PROFILING=y 136CONFIG_PROFILING=y
125CONFIG_TRACEPOINTS=y 137CONFIG_TRACEPOINTS=y
126CONFIG_MARKERS=y
127CONFIG_OPROFILE=y 138CONFIG_OPROFILE=y
128CONFIG_HAVE_OPROFILE=y 139CONFIG_HAVE_OPROFILE=y
129CONFIG_KPROBES=y 140CONFIG_KPROBES=y
@@ -135,6 +146,11 @@ CONFIG_HAVE_ARCH_TRACEHOOK=y
135CONFIG_USE_GENERIC_SMP_HELPERS=y 146CONFIG_USE_GENERIC_SMP_HELPERS=y
136CONFIG_HAVE_CLK=y 147CONFIG_HAVE_CLK=y
137CONFIG_HAVE_DMA_API_DEBUG=y 148CONFIG_HAVE_DMA_API_DEBUG=y
149
150#
151# GCOV-based kernel profiling
152#
153# CONFIG_GCOV_KERNEL is not set
138# CONFIG_SLOW_WORK is not set 154# CONFIG_SLOW_WORK is not set
139CONFIG_HAVE_GENERIC_DMA_COHERENT=y 155CONFIG_HAVE_GENERIC_DMA_COHERENT=y
140CONFIG_RT_MUTEXES=y 156CONFIG_RT_MUTEXES=y
@@ -147,7 +163,7 @@ CONFIG_MODULE_UNLOAD=y
147# CONFIG_MODULE_SRCVERSION_ALL is not set 163# CONFIG_MODULE_SRCVERSION_ALL is not set
148CONFIG_STOP_MACHINE=y 164CONFIG_STOP_MACHINE=y
149CONFIG_BLOCK=y 165CONFIG_BLOCK=y
150# CONFIG_LBD is not set 166CONFIG_LBDAF=y
151# CONFIG_BLK_DEV_BSG is not set 167# CONFIG_BLK_DEV_BSG is not set
152# CONFIG_BLK_DEV_INTEGRITY is not set 168# CONFIG_BLK_DEV_INTEGRITY is not set
153 169
@@ -196,6 +212,7 @@ CONFIG_CPU_SHX3=y
196# CONFIG_CPU_SUBTYPE_SH4_202 is not set 212# CONFIG_CPU_SUBTYPE_SH4_202 is not set
197# CONFIG_CPU_SUBTYPE_SH7723 is not set 213# CONFIG_CPU_SUBTYPE_SH7723 is not set
198# CONFIG_CPU_SUBTYPE_SH7724 is not set 214# CONFIG_CPU_SUBTYPE_SH7724 is not set
215# CONFIG_CPU_SUBTYPE_SH7757 is not set
199# CONFIG_CPU_SUBTYPE_SH7763 is not set 216# CONFIG_CPU_SUBTYPE_SH7763 is not set
200# CONFIG_CPU_SUBTYPE_SH7770 is not set 217# CONFIG_CPU_SUBTYPE_SH7770 is not set
201# CONFIG_CPU_SUBTYPE_SH7780 is not set 218# CONFIG_CPU_SUBTYPE_SH7780 is not set
@@ -256,6 +273,7 @@ CONFIG_ZONE_DMA_FLAG=0
256CONFIG_NR_QUICK=2 273CONFIG_NR_QUICK=2
257CONFIG_HAVE_MLOCK=y 274CONFIG_HAVE_MLOCK=y
258CONFIG_HAVE_MLOCKED_PAGE_BIT=y 275CONFIG_HAVE_MLOCKED_PAGE_BIT=y
276# CONFIG_KSM is not set
259CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 277CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
260 278
261# 279#
@@ -353,7 +371,8 @@ CONFIG_PREEMPT=y
353CONFIG_ZERO_PAGE_OFFSET=0x00010000 371CONFIG_ZERO_PAGE_OFFSET=0x00010000
354CONFIG_BOOT_LINK_OFFSET=0x00800000 372CONFIG_BOOT_LINK_OFFSET=0x00800000
355CONFIG_ENTRY_OFFSET=0x00010000 373CONFIG_ENTRY_OFFSET=0x00010000
356CONFIG_CMDLINE_BOOL=y 374CONFIG_CMDLINE_OVERWRITE=y
375# CONFIG_CMDLINE_EXTEND is not set
357CONFIG_CMDLINE="console=ttySC0,115200 earlyprintk=bios ignore_loglevel" 376CONFIG_CMDLINE="console=ttySC0,115200 earlyprintk=bios ignore_loglevel"
358 377
359# 378#
@@ -438,6 +457,7 @@ CONFIG_IPV6_NDISC_NODETYPE=y
438# CONFIG_NETFILTER is not set 457# CONFIG_NETFILTER is not set
439# CONFIG_IP_DCCP is not set 458# CONFIG_IP_DCCP is not set
440# CONFIG_IP_SCTP is not set 459# CONFIG_IP_SCTP is not set
460# CONFIG_RDS is not set
441# CONFIG_TIPC is not set 461# CONFIG_TIPC is not set
442# CONFIG_ATM is not set 462# CONFIG_ATM is not set
443# CONFIG_BRIDGE is not set 463# CONFIG_BRIDGE is not set
@@ -489,6 +509,7 @@ CONFIG_CAN_VCAN=m
489# Generic Driver Options 509# Generic Driver Options
490# 510#
491CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 511CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
512# CONFIG_DEVTMPFS is not set
492CONFIG_STANDALONE=y 513CONFIG_STANDALONE=y
493CONFIG_PREVENT_FIRMWARE_BUILD=y 514CONFIG_PREVENT_FIRMWARE_BUILD=y
494# CONFIG_FW_LOADER is not set 515# CONFIG_FW_LOADER is not set
@@ -562,7 +583,6 @@ CONFIG_SCSI_WAIT_SCAN=m
562# CONFIG_SCSI_SRP_ATTRS is not set 583# CONFIG_SCSI_SRP_ATTRS is not set
563CONFIG_SCSI_LOWLEVEL=y 584CONFIG_SCSI_LOWLEVEL=y
564# CONFIG_ISCSI_TCP is not set 585# CONFIG_ISCSI_TCP is not set
565# CONFIG_SCSI_BNX2_ISCSI is not set
566# CONFIG_LIBFC is not set 586# CONFIG_LIBFC is not set
567# CONFIG_LIBFCOE is not set 587# CONFIG_LIBFCOE is not set
568# CONFIG_SCSI_DEBUG is not set 588# CONFIG_SCSI_DEBUG is not set
@@ -570,6 +590,7 @@ CONFIG_SCSI_LOWLEVEL=y
570# CONFIG_SCSI_OSD_INITIATOR is not set 590# CONFIG_SCSI_OSD_INITIATOR is not set
571CONFIG_ATA=y 591CONFIG_ATA=y
572# CONFIG_ATA_NONSTANDARD is not set 592# CONFIG_ATA_NONSTANDARD is not set
593CONFIG_ATA_VERBOSE_ERROR=y
573CONFIG_SATA_PMP=y 594CONFIG_SATA_PMP=y
574CONFIG_ATA_SFF=y 595CONFIG_ATA_SFF=y
575# CONFIG_SATA_MV is not set 596# CONFIG_SATA_MV is not set
@@ -602,12 +623,10 @@ CONFIG_SMC91X=y
602# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 623# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
603# CONFIG_B44 is not set 624# CONFIG_B44 is not set
604# CONFIG_KS8842 is not set 625# CONFIG_KS8842 is not set
626# CONFIG_KS8851 is not set
605# CONFIG_NETDEV_1000 is not set 627# CONFIG_NETDEV_1000 is not set
606# CONFIG_NETDEV_10000 is not set 628# CONFIG_NETDEV_10000 is not set
607 629CONFIG_WLAN=y
608#
609# Wireless LAN
610#
611# CONFIG_WLAN_PRE80211 is not set 630# CONFIG_WLAN_PRE80211 is not set
612# CONFIG_WLAN_80211 is not set 631# CONFIG_WLAN_80211 is not set
613 632
@@ -675,6 +694,7 @@ CONFIG_LEGACY_PTY_COUNT=256
675# CONFIG_TCG_TPM is not set 694# CONFIG_TCG_TPM is not set
676CONFIG_I2C=m 695CONFIG_I2C=m
677CONFIG_I2C_BOARDINFO=y 696CONFIG_I2C_BOARDINFO=y
697CONFIG_I2C_COMPAT=y
678# CONFIG_I2C_CHARDEV is not set 698# CONFIG_I2C_CHARDEV is not set
679CONFIG_I2C_HELPER_AUTO=y 699CONFIG_I2C_HELPER_AUTO=y
680 700
@@ -685,6 +705,7 @@ CONFIG_I2C_HELPER_AUTO=y
685# 705#
686# I2C system bus drivers (mostly embedded / system-on-chip) 706# I2C system bus drivers (mostly embedded / system-on-chip)
687# 707#
708# CONFIG_I2C_DESIGNWARE is not set
688# CONFIG_I2C_OCORES is not set 709# CONFIG_I2C_OCORES is not set
689# CONFIG_I2C_SH_MOBILE is not set 710# CONFIG_I2C_SH_MOBILE is not set
690# CONFIG_I2C_SIMTEC is not set 711# CONFIG_I2C_SIMTEC is not set
@@ -706,9 +727,6 @@ CONFIG_I2C_HELPER_AUTO=y
706# Miscellaneous I2C Chip support 727# Miscellaneous I2C Chip support
707# 728#
708# CONFIG_DS1682 is not set 729# CONFIG_DS1682 is not set
709# CONFIG_SENSORS_PCF8574 is not set
710# CONFIG_PCF8575 is not set
711# CONFIG_SENSORS_PCA9539 is not set
712# CONFIG_SENSORS_TSL2550 is not set 730# CONFIG_SENSORS_TSL2550 is not set
713# CONFIG_I2C_DEBUG_CORE is not set 731# CONFIG_I2C_DEBUG_CORE is not set
714# CONFIG_I2C_DEBUG_ALGO is not set 732# CONFIG_I2C_DEBUG_ALGO is not set
@@ -729,11 +747,15 @@ CONFIG_SPI_MASTER=y
729# 747#
730# CONFIG_SPI_SPIDEV is not set 748# CONFIG_SPI_SPIDEV is not set
731# CONFIG_SPI_TLE62X0 is not set 749# CONFIG_SPI_TLE62X0 is not set
750
751#
752# PPS support
753#
754# CONFIG_PPS is not set
732# CONFIG_W1 is not set 755# CONFIG_W1 is not set
733# CONFIG_POWER_SUPPLY is not set 756# CONFIG_POWER_SUPPLY is not set
734# CONFIG_HWMON is not set 757# CONFIG_HWMON is not set
735# CONFIG_THERMAL is not set 758# CONFIG_THERMAL is not set
736# CONFIG_THERMAL_HWMON is not set
737CONFIG_WATCHDOG=y 759CONFIG_WATCHDOG=y
738# CONFIG_WATCHDOG_NOWAYOUT is not set 760# CONFIG_WATCHDOG_NOWAYOUT is not set
739 761
@@ -762,8 +784,12 @@ CONFIG_SSB_POSSIBLE=y
762# CONFIG_HTC_PASIC3 is not set 784# CONFIG_HTC_PASIC3 is not set
763# CONFIG_MFD_TMIO is not set 785# CONFIG_MFD_TMIO is not set
764# CONFIG_MFD_WM8400 is not set 786# CONFIG_MFD_WM8400 is not set
787# CONFIG_MFD_WM831X is not set
765# CONFIG_MFD_WM8350_I2C is not set 788# CONFIG_MFD_WM8350_I2C is not set
766# CONFIG_MFD_PCF50633 is not set 789# CONFIG_MFD_PCF50633 is not set
790# CONFIG_MFD_MC13783 is not set
791# CONFIG_AB3100_CORE is not set
792# CONFIG_EZX_PCAP is not set
767# CONFIG_REGULATOR is not set 793# CONFIG_REGULATOR is not set
768# CONFIG_MEDIA_SUPPORT is not set 794# CONFIG_MEDIA_SUPPORT is not set
769 795
@@ -808,6 +834,7 @@ CONFIG_USB_MON=y
808# CONFIG_USB_OXU210HP_HCD is not set 834# CONFIG_USB_OXU210HP_HCD is not set
809# CONFIG_USB_ISP116X_HCD is not set 835# CONFIG_USB_ISP116X_HCD is not set
810# CONFIG_USB_ISP1760_HCD is not set 836# CONFIG_USB_ISP1760_HCD is not set
837# CONFIG_USB_ISP1362_HCD is not set
811# CONFIG_USB_SL811_HCD is not set 838# CONFIG_USB_SL811_HCD is not set
812CONFIG_USB_R8A66597_HCD=m 839CONFIG_USB_R8A66597_HCD=m
813# CONFIG_USB_HWA_HCD is not set 840# CONFIG_USB_HWA_HCD is not set
@@ -862,6 +889,7 @@ CONFIG_USB_R8A66597_HCD=m
862# CONFIG_USB_LD is not set 889# CONFIG_USB_LD is not set
863# CONFIG_USB_TRANCEVIBRATOR is not set 890# CONFIG_USB_TRANCEVIBRATOR is not set
864# CONFIG_USB_IOWARRIOR is not set 891# CONFIG_USB_IOWARRIOR is not set
892# CONFIG_USB_TEST is not set
865# CONFIG_USB_ISIGHTFW is not set 893# CONFIG_USB_ISIGHTFW is not set
866# CONFIG_USB_VST is not set 894# CONFIG_USB_VST is not set
867CONFIG_USB_GADGET=y 895CONFIG_USB_GADGET=y
@@ -876,10 +904,11 @@ CONFIG_USB_GADGET_SELECTED=y
876# CONFIG_USB_GADGET_LH7A40X is not set 904# CONFIG_USB_GADGET_LH7A40X is not set
877# CONFIG_USB_GADGET_OMAP is not set 905# CONFIG_USB_GADGET_OMAP is not set
878# CONFIG_USB_GADGET_PXA25X is not set 906# CONFIG_USB_GADGET_PXA25X is not set
907# CONFIG_USB_GADGET_R8A66597 is not set
879# CONFIG_USB_GADGET_PXA27X is not set 908# CONFIG_USB_GADGET_PXA27X is not set
880# CONFIG_USB_GADGET_S3C_HSOTG is not set 909# CONFIG_USB_GADGET_S3C_HSOTG is not set
881# CONFIG_USB_GADGET_S3C2410 is not set
882# CONFIG_USB_GADGET_IMX is not set 910# CONFIG_USB_GADGET_IMX is not set
911# CONFIG_USB_GADGET_S3C2410 is not set
883CONFIG_USB_GADGET_M66592=y 912CONFIG_USB_GADGET_M66592=y
884CONFIG_USB_M66592=y 913CONFIG_USB_M66592=y
885# CONFIG_USB_GADGET_AMD5536UDC is not set 914# CONFIG_USB_GADGET_AMD5536UDC is not set
@@ -939,6 +968,7 @@ CONFIG_RTC_INTF_DEV=y
939# CONFIG_RTC_DRV_S35390A is not set 968# CONFIG_RTC_DRV_S35390A is not set
940# CONFIG_RTC_DRV_FM3130 is not set 969# CONFIG_RTC_DRV_FM3130 is not set
941# CONFIG_RTC_DRV_RX8581 is not set 970# CONFIG_RTC_DRV_RX8581 is not set
971# CONFIG_RTC_DRV_RX8025 is not set
942 972
943# 973#
944# SPI RTC drivers 974# SPI RTC drivers
@@ -950,6 +980,7 @@ CONFIG_RTC_INTF_DEV=y
950# CONFIG_RTC_DRV_R9701 is not set 980# CONFIG_RTC_DRV_R9701 is not set
951# CONFIG_RTC_DRV_RS5C348 is not set 981# CONFIG_RTC_DRV_RS5C348 is not set
952# CONFIG_RTC_DRV_DS3234 is not set 982# CONFIG_RTC_DRV_DS3234 is not set
983# CONFIG_RTC_DRV_PCF2123 is not set
953 984
954# 985#
955# Platform RTC drivers 986# Platform RTC drivers
@@ -1002,8 +1033,10 @@ CONFIG_FS_MBCACHE=y
1002# CONFIG_JFS_FS is not set 1033# CONFIG_JFS_FS is not set
1003# CONFIG_FS_POSIX_ACL is not set 1034# CONFIG_FS_POSIX_ACL is not set
1004# CONFIG_XFS_FS is not set 1035# CONFIG_XFS_FS is not set
1036# CONFIG_GFS2_FS is not set
1005# CONFIG_OCFS2_FS is not set 1037# CONFIG_OCFS2_FS is not set
1006# CONFIG_BTRFS_FS is not set 1038# CONFIG_BTRFS_FS is not set
1039# CONFIG_NILFS2_FS is not set
1007CONFIG_FILE_LOCKING=y 1040CONFIG_FILE_LOCKING=y
1008CONFIG_FSNOTIFY=y 1041CONFIG_FSNOTIFY=y
1009CONFIG_DNOTIFY=y 1042CONFIG_DNOTIFY=y
@@ -1063,7 +1096,6 @@ CONFIG_MISC_FILESYSTEMS=y
1063# CONFIG_ROMFS_FS is not set 1096# CONFIG_ROMFS_FS is not set
1064# CONFIG_SYSV_FS is not set 1097# CONFIG_SYSV_FS is not set
1065# CONFIG_UFS_FS is not set 1098# CONFIG_UFS_FS is not set
1066# CONFIG_NILFS2_FS is not set
1067CONFIG_NETWORK_FILESYSTEMS=y 1099CONFIG_NETWORK_FILESYSTEMS=y
1068# CONFIG_NFS_FS is not set 1100# CONFIG_NFS_FS is not set
1069# CONFIG_NFSD is not set 1101# CONFIG_NFSD is not set
@@ -1129,6 +1161,7 @@ CONFIG_ENABLE_WARN_DEPRECATED=y
1129# CONFIG_ENABLE_MUST_CHECK is not set 1161# CONFIG_ENABLE_MUST_CHECK is not set
1130CONFIG_FRAME_WARN=1024 1162CONFIG_FRAME_WARN=1024
1131CONFIG_MAGIC_SYSRQ=y 1163CONFIG_MAGIC_SYSRQ=y
1164# CONFIG_STRIP_ASM_SYMS is not set
1132# CONFIG_UNUSED_SYMBOLS is not set 1165# CONFIG_UNUSED_SYMBOLS is not set
1133CONFIG_DEBUG_FS=y 1166CONFIG_DEBUG_FS=y
1134# CONFIG_HEADERS_CHECK is not set 1167# CONFIG_HEADERS_CHECK is not set
@@ -1164,22 +1197,29 @@ CONFIG_DEBUG_VM=y
1164# CONFIG_DEBUG_LIST is not set 1197# CONFIG_DEBUG_LIST is not set
1165# CONFIG_DEBUG_SG is not set 1198# CONFIG_DEBUG_SG is not set
1166# CONFIG_DEBUG_NOTIFIERS is not set 1199# CONFIG_DEBUG_NOTIFIERS is not set
1200# CONFIG_DEBUG_CREDENTIALS is not set
1167CONFIG_FRAME_POINTER=y 1201CONFIG_FRAME_POINTER=y
1168# CONFIG_RCU_TORTURE_TEST is not set 1202# CONFIG_RCU_TORTURE_TEST is not set
1203# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1169# CONFIG_KPROBES_SANITY_TEST is not set 1204# CONFIG_KPROBES_SANITY_TEST is not set
1170# CONFIG_BACKTRACE_SELF_TEST is not set 1205# CONFIG_BACKTRACE_SELF_TEST is not set
1171# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set 1206# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
1207# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
1172# CONFIG_LKDTM is not set 1208# CONFIG_LKDTM is not set
1173# CONFIG_FAULT_INJECTION is not set 1209# CONFIG_FAULT_INJECTION is not set
1174# CONFIG_SYSCTL_SYSCALL_CHECK is not set 1210# CONFIG_SYSCTL_SYSCALL_CHECK is not set
1175# CONFIG_PAGE_POISONING is not set 1211# CONFIG_PAGE_POISONING is not set
1176CONFIG_NOP_TRACER=y 1212CONFIG_NOP_TRACER=y
1177CONFIG_HAVE_FUNCTION_TRACER=y 1213CONFIG_HAVE_FUNCTION_TRACER=y
1214CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1215CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
1178CONFIG_HAVE_DYNAMIC_FTRACE=y 1216CONFIG_HAVE_DYNAMIC_FTRACE=y
1179CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1217CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1218CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
1180CONFIG_RING_BUFFER=y 1219CONFIG_RING_BUFFER=y
1181CONFIG_EVENT_TRACING=y 1220CONFIG_EVENT_TRACING=y
1182CONFIG_CONTEXT_SWITCH_TRACER=y 1221CONFIG_CONTEXT_SWITCH_TRACER=y
1222CONFIG_RING_BUFFER_ALLOW_SWAP=y
1183CONFIG_TRACING=y 1223CONFIG_TRACING=y
1184CONFIG_TRACING_SUPPORT=y 1224CONFIG_TRACING_SUPPORT=y
1185CONFIG_FTRACE=y 1225CONFIG_FTRACE=y
@@ -1188,6 +1228,7 @@ CONFIG_FTRACE=y
1188# CONFIG_PREEMPT_TRACER is not set 1228# CONFIG_PREEMPT_TRACER is not set
1189# CONFIG_SCHED_TRACER is not set 1229# CONFIG_SCHED_TRACER is not set
1190# CONFIG_ENABLE_DEFAULT_TRACERS is not set 1230# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1231# CONFIG_FTRACE_SYSCALLS is not set
1191# CONFIG_BOOT_TRACER is not set 1232# CONFIG_BOOT_TRACER is not set
1192CONFIG_BRANCH_PROFILE_NONE=y 1233CONFIG_BRANCH_PROFILE_NONE=y
1193# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set 1234# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
@@ -1205,10 +1246,10 @@ CONFIG_HAVE_ARCH_KGDB=y
1205CONFIG_SH_STANDARD_BIOS=y 1246CONFIG_SH_STANDARD_BIOS=y
1206# CONFIG_EARLY_SCIF_CONSOLE is not set 1247# CONFIG_EARLY_SCIF_CONSOLE is not set
1207CONFIG_EARLY_PRINTK=y 1248CONFIG_EARLY_PRINTK=y
1208# CONFIG_DEBUG_BOOTMEM is not set 1249# CONFIG_STACK_DEBUG is not set
1209CONFIG_DEBUG_STACKOVERFLOW=y
1210CONFIG_DEBUG_STACK_USAGE=y 1250CONFIG_DEBUG_STACK_USAGE=y
1211CONFIG_DUMP_CODE=y 1251CONFIG_DUMP_CODE=y
1252# CONFIG_DWARF_UNWINDER is not set
1212# CONFIG_SH_NO_BSS_INIT is not set 1253# CONFIG_SH_NO_BSS_INIT is not set
1213 1254
1214# 1255#
@@ -1223,7 +1264,6 @@ CONFIG_CRYPTO=y
1223# 1264#
1224# Crypto core or helper 1265# Crypto core or helper
1225# 1266#
1226# CONFIG_CRYPTO_FIPS is not set
1227# CONFIG_CRYPTO_MANAGER is not set 1267# CONFIG_CRYPTO_MANAGER is not set
1228# CONFIG_CRYPTO_MANAGER2 is not set 1268# CONFIG_CRYPTO_MANAGER2 is not set
1229# CONFIG_CRYPTO_GF128MUL is not set 1269# CONFIG_CRYPTO_GF128MUL is not set
@@ -1255,11 +1295,13 @@ CONFIG_CRYPTO=y
1255# 1295#
1256# CONFIG_CRYPTO_HMAC is not set 1296# CONFIG_CRYPTO_HMAC is not set
1257# CONFIG_CRYPTO_XCBC is not set 1297# CONFIG_CRYPTO_XCBC is not set
1298# CONFIG_CRYPTO_VMAC is not set
1258 1299
1259# 1300#
1260# Digest 1301# Digest
1261# 1302#
1262# CONFIG_CRYPTO_CRC32C is not set 1303# CONFIG_CRYPTO_CRC32C is not set
1304# CONFIG_CRYPTO_GHASH is not set
1263# CONFIG_CRYPTO_MD4 is not set 1305# CONFIG_CRYPTO_MD4 is not set
1264# CONFIG_CRYPTO_MD5 is not set 1306# CONFIG_CRYPTO_MD5 is not set
1265# CONFIG_CRYPTO_MICHAEL_MIC is not set 1307# CONFIG_CRYPTO_MICHAEL_MIC is not set
@@ -1322,5 +1364,6 @@ CONFIG_AUDIT_GENERIC=y
1322CONFIG_HAS_IOMEM=y 1364CONFIG_HAS_IOMEM=y
1323CONFIG_HAS_IOPORT=y 1365CONFIG_HAS_IOPORT=y
1324CONFIG_HAS_DMA=y 1366CONFIG_HAS_DMA=y
1367CONFIG_HAVE_LMB=y
1325CONFIG_NLATTR=y 1368CONFIG_NLATTR=y
1326CONFIG_GENERIC_ATOMIC64=y 1369CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/snapgear_defconfig b/arch/sh/configs/snapgear_defconfig
index ca3c88a88021..cb919a0de4b2 100644
--- a/arch/sh/configs/snapgear_defconfig
+++ b/arch/sh/configs/snapgear_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.30 3# Linux kernel version: 2.6.31
4# Thu Jun 18 13:11:58 2009 4# Thu Sep 24 19:33:00 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -14,6 +14,7 @@ CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y 14CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
16CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_IRQ_PER_CPU=y
17# CONFIG_GENERIC_GPIO is not set 18# CONFIG_GENERIC_GPIO is not set
18CONFIG_GENERIC_TIME=y 19CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 20CONFIG_GENERIC_CLOCKEVENTS=y
@@ -28,7 +29,9 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
28# CONFIG_ARCH_HAS_ILOG2_U64 is not set 29# CONFIG_ARCH_HAS_ILOG2_U64 is not set
29CONFIG_ARCH_NO_VIRT_TO_BUS=y 30CONFIG_ARCH_NO_VIRT_TO_BUS=y
30CONFIG_ARCH_HAS_DEFAULT_IDLE=y 31CONFIG_ARCH_HAS_DEFAULT_IDLE=y
32CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
31CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 33CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
34CONFIG_CONSTRUCTORS=y
32 35
33# 36#
34# General setup 37# General setup
@@ -38,6 +41,12 @@ CONFIG_BROKEN_ON_SMP=y
38CONFIG_INIT_ENV_ARG_LIMIT=32 41CONFIG_INIT_ENV_ARG_LIMIT=32
39CONFIG_LOCALVERSION="" 42CONFIG_LOCALVERSION=""
40CONFIG_LOCALVERSION_AUTO=y 43CONFIG_LOCALVERSION_AUTO=y
44CONFIG_HAVE_KERNEL_GZIP=y
45CONFIG_HAVE_KERNEL_BZIP2=y
46CONFIG_HAVE_KERNEL_LZMA=y
47CONFIG_KERNEL_GZIP=y
48# CONFIG_KERNEL_BZIP2 is not set
49# CONFIG_KERNEL_LZMA is not set
41# CONFIG_SWAP is not set 50# CONFIG_SWAP is not set
42# CONFIG_SYSVIPC is not set 51# CONFIG_SYSVIPC is not set
43# CONFIG_POSIX_MQUEUE is not set 52# CONFIG_POSIX_MQUEUE is not set
@@ -48,11 +57,12 @@ CONFIG_LOCALVERSION_AUTO=y
48# 57#
49# RCU Subsystem 58# RCU Subsystem
50# 59#
51CONFIG_CLASSIC_RCU=y 60CONFIG_TREE_RCU=y
52# CONFIG_TREE_RCU is not set 61# CONFIG_TREE_PREEMPT_RCU is not set
53# CONFIG_PREEMPT_RCU is not set 62# CONFIG_RCU_TRACE is not set
63CONFIG_RCU_FANOUT=32
64# CONFIG_RCU_FANOUT_EXACT is not set
54# CONFIG_TREE_RCU_TRACE is not set 65# CONFIG_TREE_RCU_TRACE is not set
55# CONFIG_PREEMPT_RCU_TRACE is not set
56# CONFIG_IKCONFIG is not set 66# CONFIG_IKCONFIG is not set
57CONFIG_LOG_BUF_SHIFT=14 67CONFIG_LOG_BUF_SHIFT=14
58# CONFIG_GROUP_SCHED is not set 68# CONFIG_GROUP_SCHED is not set
@@ -86,19 +96,20 @@ CONFIG_TIMERFD=y
86CONFIG_EVENTFD=y 96CONFIG_EVENTFD=y
87CONFIG_SHMEM=y 97CONFIG_SHMEM=y
88CONFIG_AIO=y 98CONFIG_AIO=y
99CONFIG_HAVE_PERF_EVENTS=y
89 100
90# 101#
91# Performance Counters 102# Kernel Performance Events And Counters
92# 103#
104# CONFIG_PERF_EVENTS is not set
105# CONFIG_PERF_COUNTERS is not set
93CONFIG_VM_EVENT_COUNTERS=y 106CONFIG_VM_EVENT_COUNTERS=y
94CONFIG_PCI_QUIRKS=y 107CONFIG_PCI_QUIRKS=y
95# CONFIG_STRIP_ASM_SYMS is not set
96CONFIG_COMPAT_BRK=y 108CONFIG_COMPAT_BRK=y
97CONFIG_SLAB=y 109CONFIG_SLAB=y
98# CONFIG_SLUB is not set 110# CONFIG_SLUB is not set
99# CONFIG_SLOB is not set 111# CONFIG_SLOB is not set
100# CONFIG_PROFILING is not set 112# CONFIG_PROFILING is not set
101# CONFIG_MARKERS is not set
102CONFIG_HAVE_OPROFILE=y 113CONFIG_HAVE_OPROFILE=y
103CONFIG_HAVE_IOREMAP_PROT=y 114CONFIG_HAVE_IOREMAP_PROT=y
104CONFIG_HAVE_KPROBES=y 115CONFIG_HAVE_KPROBES=y
@@ -106,6 +117,10 @@ CONFIG_HAVE_KRETPROBES=y
106CONFIG_HAVE_ARCH_TRACEHOOK=y 117CONFIG_HAVE_ARCH_TRACEHOOK=y
107CONFIG_HAVE_CLK=y 118CONFIG_HAVE_CLK=y
108CONFIG_HAVE_DMA_API_DEBUG=y 119CONFIG_HAVE_DMA_API_DEBUG=y
120
121#
122# GCOV-based kernel profiling
123#
109# CONFIG_SLOW_WORK is not set 124# CONFIG_SLOW_WORK is not set
110CONFIG_HAVE_GENERIC_DMA_COHERENT=y 125CONFIG_HAVE_GENERIC_DMA_COHERENT=y
111CONFIG_SLABINFO=y 126CONFIG_SLABINFO=y
@@ -113,7 +128,7 @@ CONFIG_RT_MUTEXES=y
113CONFIG_BASE_SMALL=0 128CONFIG_BASE_SMALL=0
114# CONFIG_MODULES is not set 129# CONFIG_MODULES is not set
115CONFIG_BLOCK=y 130CONFIG_BLOCK=y
116# CONFIG_LBD is not set 131CONFIG_LBDAF=y
117# CONFIG_BLK_DEV_BSG is not set 132# CONFIG_BLK_DEV_BSG is not set
118# CONFIG_BLK_DEV_INTEGRITY is not set 133# CONFIG_BLK_DEV_INTEGRITY is not set
119 134
@@ -160,6 +175,7 @@ CONFIG_CPU_SUBTYPE_SH7751R=y
160# CONFIG_CPU_SUBTYPE_SH4_202 is not set 175# CONFIG_CPU_SUBTYPE_SH4_202 is not set
161# CONFIG_CPU_SUBTYPE_SH7723 is not set 176# CONFIG_CPU_SUBTYPE_SH7723 is not set
162# CONFIG_CPU_SUBTYPE_SH7724 is not set 177# CONFIG_CPU_SUBTYPE_SH7724 is not set
178# CONFIG_CPU_SUBTYPE_SH7757 is not set
163# CONFIG_CPU_SUBTYPE_SH7763 is not set 179# CONFIG_CPU_SUBTYPE_SH7763 is not set
164# CONFIG_CPU_SUBTYPE_SH7770 is not set 180# CONFIG_CPU_SUBTYPE_SH7770 is not set
165# CONFIG_CPU_SUBTYPE_SH7780 is not set 181# CONFIG_CPU_SUBTYPE_SH7780 is not set
@@ -205,6 +221,7 @@ CONFIG_ZONE_DMA_FLAG=0
205CONFIG_NR_QUICK=2 221CONFIG_NR_QUICK=2
206CONFIG_HAVE_MLOCK=y 222CONFIG_HAVE_MLOCK=y
207CONFIG_HAVE_MLOCKED_PAGE_BIT=y 223CONFIG_HAVE_MLOCKED_PAGE_BIT=y
224# CONFIG_KSM is not set
208CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 225CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
209 226
210# 227#
@@ -297,7 +314,8 @@ CONFIG_ZERO_PAGE_OFFSET=0x00001000
297CONFIG_BOOT_LINK_OFFSET=0x00800000 314CONFIG_BOOT_LINK_OFFSET=0x00800000
298CONFIG_ENTRY_OFFSET=0x00001000 315CONFIG_ENTRY_OFFSET=0x00001000
299# CONFIG_UBC_WAKEUP is not set 316# CONFIG_UBC_WAKEUP is not set
300# CONFIG_CMDLINE_BOOL is not set 317# CONFIG_CMDLINE_OVERWRITE is not set
318# CONFIG_CMDLINE_EXTEND is not set
301 319
302# 320#
303# Bus options 321# Bus options
@@ -359,6 +377,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
359# CONFIG_NETFILTER is not set 377# CONFIG_NETFILTER is not set
360# CONFIG_IP_DCCP is not set 378# CONFIG_IP_DCCP is not set
361# CONFIG_IP_SCTP is not set 379# CONFIG_IP_SCTP is not set
380# CONFIG_RDS is not set
362# CONFIG_TIPC is not set 381# CONFIG_TIPC is not set
363# CONFIG_ATM is not set 382# CONFIG_ATM is not set
364# CONFIG_BRIDGE is not set 383# CONFIG_BRIDGE is not set
@@ -388,6 +407,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
388# CONFIG_AF_RXRPC is not set 407# CONFIG_AF_RXRPC is not set
389CONFIG_WIRELESS=y 408CONFIG_WIRELESS=y
390# CONFIG_CFG80211 is not set 409# CONFIG_CFG80211 is not set
410CONFIG_CFG80211_DEFAULT_PS_VALUE=0
391# CONFIG_WIRELESS_OLD_REGULATORY is not set 411# CONFIG_WIRELESS_OLD_REGULATORY is not set
392# CONFIG_WIRELESS_EXT is not set 412# CONFIG_WIRELESS_EXT is not set
393# CONFIG_LIB80211 is not set 413# CONFIG_LIB80211 is not set
@@ -395,7 +415,6 @@ CONFIG_WIRELESS=y
395# 415#
396# CFG80211 needs to be enabled for MAC80211 416# CFG80211 needs to be enabled for MAC80211
397# 417#
398CONFIG_MAC80211_DEFAULT_PS_VALUE=0
399# CONFIG_WIMAX is not set 418# CONFIG_WIMAX is not set
400# CONFIG_RFKILL is not set 419# CONFIG_RFKILL is not set
401# CONFIG_NET_9P is not set 420# CONFIG_NET_9P is not set
@@ -534,7 +553,11 @@ CONFIG_HAVE_IDE=y
534# 553#
535 554
536# 555#
537# Enable only one of the two stacks, unless you know what you are doing 556# You can enable one or both FireWire driver stacks.
557#
558
559#
560# See the help texts for more information.
538# 561#
539# CONFIG_FIREWIRE is not set 562# CONFIG_FIREWIRE is not set
540# CONFIG_IEEE1394 is not set 563# CONFIG_IEEE1394 is not set
@@ -599,10 +622,7 @@ CONFIG_8139TOO_PIO=y
599# CONFIG_NETDEV_1000 is not set 622# CONFIG_NETDEV_1000 is not set
600# CONFIG_NETDEV_10000 is not set 623# CONFIG_NETDEV_10000 is not set
601# CONFIG_TR is not set 624# CONFIG_TR is not set
602 625CONFIG_WLAN=y
603#
604# Wireless LAN
605#
606# CONFIG_WLAN_PRE80211 is not set 626# CONFIG_WLAN_PRE80211 is not set
607# CONFIG_WLAN_80211 is not set 627# CONFIG_WLAN_80211 is not set
608 628
@@ -686,11 +706,15 @@ CONFIG_LEGACY_PTY_COUNT=256
686CONFIG_DEVPORT=y 706CONFIG_DEVPORT=y
687# CONFIG_I2C is not set 707# CONFIG_I2C is not set
688# CONFIG_SPI is not set 708# CONFIG_SPI is not set
709
710#
711# PPS support
712#
713# CONFIG_PPS is not set
689# CONFIG_W1 is not set 714# CONFIG_W1 is not set
690# CONFIG_POWER_SUPPLY is not set 715# CONFIG_POWER_SUPPLY is not set
691# CONFIG_HWMON is not set 716# CONFIG_HWMON is not set
692# CONFIG_THERMAL is not set 717# CONFIG_THERMAL is not set
693# CONFIG_THERMAL_HWMON is not set
694# CONFIG_WATCHDOG is not set 718# CONFIG_WATCHDOG is not set
695CONFIG_SSB_POSSIBLE=y 719CONFIG_SSB_POSSIBLE=y
696 720
@@ -712,6 +736,7 @@ CONFIG_SSB_POSSIBLE=y
712# 736#
713# Graphics support 737# Graphics support
714# 738#
739CONFIG_VGA_ARB=y
715# CONFIG_DRM is not set 740# CONFIG_DRM is not set
716# CONFIG_VGASTATE is not set 741# CONFIG_VGASTATE is not set
717# CONFIG_VIDEO_OUTPUT_CONTROL is not set 742# CONFIG_VIDEO_OUTPUT_CONTROL is not set
@@ -732,7 +757,44 @@ CONFIG_SSB_POSSIBLE=y
732# CONFIG_ACCESSIBILITY is not set 757# CONFIG_ACCESSIBILITY is not set
733# CONFIG_INFINIBAND is not set 758# CONFIG_INFINIBAND is not set
734CONFIG_RTC_LIB=y 759CONFIG_RTC_LIB=y
735# CONFIG_RTC_CLASS is not set 760CONFIG_RTC_CLASS=y
761CONFIG_RTC_HCTOSYS=y
762CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
763# CONFIG_RTC_DEBUG is not set
764
765#
766# RTC interfaces
767#
768CONFIG_RTC_INTF_SYSFS=y
769CONFIG_RTC_INTF_PROC=y
770CONFIG_RTC_INTF_DEV=y
771# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
772# CONFIG_RTC_DRV_TEST is not set
773
774#
775# SPI RTC drivers
776#
777
778#
779# Platform RTC drivers
780#
781# CONFIG_RTC_DRV_DS1286 is not set
782CONFIG_RTC_DRV_DS1302=y
783# CONFIG_RTC_DRV_DS1511 is not set
784# CONFIG_RTC_DRV_DS1553 is not set
785# CONFIG_RTC_DRV_DS1742 is not set
786# CONFIG_RTC_DRV_STK17TA8 is not set
787# CONFIG_RTC_DRV_M48T86 is not set
788# CONFIG_RTC_DRV_M48T35 is not set
789# CONFIG_RTC_DRV_M48T59 is not set
790# CONFIG_RTC_DRV_BQ4802 is not set
791# CONFIG_RTC_DRV_V3020 is not set
792
793#
794# on-CPU RTC drivers
795#
796# CONFIG_RTC_DRV_SH is not set
797# CONFIG_RTC_DRV_GENERIC is not set
736# CONFIG_DMADEVICES is not set 798# CONFIG_DMADEVICES is not set
737# CONFIG_AUXDISPLAY is not set 799# CONFIG_AUXDISPLAY is not set
738# CONFIG_UIO is not set 800# CONFIG_UIO is not set
@@ -754,8 +816,10 @@ CONFIG_EXT2_FS=y
754# CONFIG_JFS_FS is not set 816# CONFIG_JFS_FS is not set
755# CONFIG_FS_POSIX_ACL is not set 817# CONFIG_FS_POSIX_ACL is not set
756# CONFIG_XFS_FS is not set 818# CONFIG_XFS_FS is not set
819# CONFIG_GFS2_FS is not set
757# CONFIG_OCFS2_FS is not set 820# CONFIG_OCFS2_FS is not set
758# CONFIG_BTRFS_FS is not set 821# CONFIG_BTRFS_FS is not set
822# CONFIG_NILFS2_FS is not set
759CONFIG_FILE_LOCKING=y 823CONFIG_FILE_LOCKING=y
760CONFIG_FSNOTIFY=y 824CONFIG_FSNOTIFY=y
761# CONFIG_DNOTIFY is not set 825# CONFIG_DNOTIFY is not set
@@ -820,7 +884,6 @@ CONFIG_ROMFS_BACKED_BY_BLOCK=y
820CONFIG_ROMFS_ON_BLOCK=y 884CONFIG_ROMFS_ON_BLOCK=y
821# CONFIG_SYSV_FS is not set 885# CONFIG_SYSV_FS is not set
822# CONFIG_UFS_FS is not set 886# CONFIG_UFS_FS is not set
823# CONFIG_NILFS2_FS is not set
824CONFIG_NETWORK_FILESYSTEMS=y 887CONFIG_NETWORK_FILESYSTEMS=y
825# CONFIG_NFS_FS is not set 888# CONFIG_NFS_FS is not set
826# CONFIG_NFSD is not set 889# CONFIG_NFSD is not set
@@ -847,6 +910,7 @@ CONFIG_ENABLE_WARN_DEPRECATED=y
847CONFIG_ENABLE_MUST_CHECK=y 910CONFIG_ENABLE_MUST_CHECK=y
848CONFIG_FRAME_WARN=1024 911CONFIG_FRAME_WARN=1024
849# CONFIG_MAGIC_SYSRQ is not set 912# CONFIG_MAGIC_SYSRQ is not set
913# CONFIG_STRIP_ASM_SYMS is not set
850# CONFIG_UNUSED_SYMBOLS is not set 914# CONFIG_UNUSED_SYMBOLS is not set
851# CONFIG_DEBUG_FS is not set 915# CONFIG_DEBUG_FS is not set
852# CONFIG_HEADERS_CHECK is not set 916# CONFIG_HEADERS_CHECK is not set
@@ -856,8 +920,11 @@ CONFIG_FRAME_WARN=1024
856# CONFIG_RCU_CPU_STALL_DETECTOR is not set 920# CONFIG_RCU_CPU_STALL_DETECTOR is not set
857# CONFIG_LATENCYTOP is not set 921# CONFIG_LATENCYTOP is not set
858CONFIG_HAVE_FUNCTION_TRACER=y 922CONFIG_HAVE_FUNCTION_TRACER=y
923CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
924CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
859CONFIG_HAVE_DYNAMIC_FTRACE=y 925CONFIG_HAVE_DYNAMIC_FTRACE=y
860CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 926CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
927CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
861CONFIG_TRACING_SUPPORT=y 928CONFIG_TRACING_SUPPORT=y
862# CONFIG_FTRACE is not set 929# CONFIG_FTRACE is not set
863# CONFIG_DMA_API_DEBUG is not set 930# CONFIG_DMA_API_DEBUG is not set
@@ -865,6 +932,7 @@ CONFIG_TRACING_SUPPORT=y
865CONFIG_HAVE_ARCH_KGDB=y 932CONFIG_HAVE_ARCH_KGDB=y
866# CONFIG_SH_STANDARD_BIOS is not set 933# CONFIG_SH_STANDARD_BIOS is not set
867# CONFIG_EARLY_SCIF_CONSOLE is not set 934# CONFIG_EARLY_SCIF_CONSOLE is not set
935# CONFIG_DWARF_UNWINDER is not set
868 936
869# 937#
870# Security options 938# Security options
@@ -893,5 +961,6 @@ CONFIG_DECOMPRESS_GZIP=y
893CONFIG_HAS_IOMEM=y 961CONFIG_HAS_IOMEM=y
894CONFIG_HAS_IOPORT=y 962CONFIG_HAS_IOPORT=y
895CONFIG_HAS_DMA=y 963CONFIG_HAS_DMA=y
964CONFIG_HAVE_LMB=y
896CONFIG_NLATTR=y 965CONFIG_NLATTR=y
897CONFIG_GENERIC_ATOMIC64=y 966CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/systemh_defconfig b/arch/sh/configs/systemh_defconfig
index 5d970263c096..b9fe960309f5 100644
--- a/arch/sh/configs/systemh_defconfig
+++ b/arch/sh/configs/systemh_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.30 3# Linux kernel version: 2.6.31
4# Thu Jun 18 13:12:28 2009 4# Thu Sep 24 19:35:03 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -14,6 +14,7 @@ CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y 14CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
16CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_IRQ_PER_CPU=y
17# CONFIG_GENERIC_GPIO is not set 18# CONFIG_GENERIC_GPIO is not set
18CONFIG_GENERIC_TIME=y 19CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 20CONFIG_GENERIC_CLOCKEVENTS=y
@@ -27,7 +28,9 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
27# CONFIG_ARCH_HAS_ILOG2_U64 is not set 28# CONFIG_ARCH_HAS_ILOG2_U64 is not set
28CONFIG_ARCH_NO_VIRT_TO_BUS=y 29CONFIG_ARCH_NO_VIRT_TO_BUS=y
29CONFIG_ARCH_HAS_DEFAULT_IDLE=y 30CONFIG_ARCH_HAS_DEFAULT_IDLE=y
31CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
30CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 32CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
33CONFIG_CONSTRUCTORS=y
31 34
32# 35#
33# General setup 36# General setup
@@ -38,6 +41,12 @@ CONFIG_LOCK_KERNEL=y
38CONFIG_INIT_ENV_ARG_LIMIT=32 41CONFIG_INIT_ENV_ARG_LIMIT=32
39CONFIG_LOCALVERSION="" 42CONFIG_LOCALVERSION=""
40CONFIG_LOCALVERSION_AUTO=y 43CONFIG_LOCALVERSION_AUTO=y
44CONFIG_HAVE_KERNEL_GZIP=y
45CONFIG_HAVE_KERNEL_BZIP2=y
46CONFIG_HAVE_KERNEL_LZMA=y
47CONFIG_KERNEL_GZIP=y
48# CONFIG_KERNEL_BZIP2 is not set
49# CONFIG_KERNEL_LZMA is not set
41CONFIG_SWAP=y 50CONFIG_SWAP=y
42# CONFIG_SYSVIPC is not set 51# CONFIG_SYSVIPC is not set
43# CONFIG_BSD_PROCESS_ACCT is not set 52# CONFIG_BSD_PROCESS_ACCT is not set
@@ -45,11 +54,12 @@ CONFIG_SWAP=y
45# 54#
46# RCU Subsystem 55# RCU Subsystem
47# 56#
48CONFIG_CLASSIC_RCU=y 57CONFIG_TREE_RCU=y
49# CONFIG_TREE_RCU is not set 58# CONFIG_TREE_PREEMPT_RCU is not set
50# CONFIG_PREEMPT_RCU is not set 59# CONFIG_RCU_TRACE is not set
60CONFIG_RCU_FANOUT=32
61# CONFIG_RCU_FANOUT_EXACT is not set
51# CONFIG_TREE_RCU_TRACE is not set 62# CONFIG_TREE_RCU_TRACE is not set
52# CONFIG_PREEMPT_RCU_TRACE is not set
53# CONFIG_IKCONFIG is not set 63# CONFIG_IKCONFIG is not set
54CONFIG_LOG_BUF_SHIFT=14 64CONFIG_LOG_BUF_SHIFT=14
55# CONFIG_GROUP_SCHED is not set 65# CONFIG_GROUP_SCHED is not set
@@ -83,18 +93,19 @@ CONFIG_TIMERFD=y
83CONFIG_EVENTFD=y 93CONFIG_EVENTFD=y
84CONFIG_SHMEM=y 94CONFIG_SHMEM=y
85CONFIG_AIO=y 95CONFIG_AIO=y
96CONFIG_HAVE_PERF_EVENTS=y
86 97
87# 98#
88# Performance Counters 99# Kernel Performance Events And Counters
89# 100#
101# CONFIG_PERF_EVENTS is not set
102# CONFIG_PERF_COUNTERS is not set
90CONFIG_VM_EVENT_COUNTERS=y 103CONFIG_VM_EVENT_COUNTERS=y
91# CONFIG_STRIP_ASM_SYMS is not set
92CONFIG_COMPAT_BRK=y 104CONFIG_COMPAT_BRK=y
93CONFIG_SLAB=y 105CONFIG_SLAB=y
94# CONFIG_SLUB is not set 106# CONFIG_SLUB is not set
95# CONFIG_SLOB is not set 107# CONFIG_SLOB is not set
96# CONFIG_PROFILING is not set 108# CONFIG_PROFILING is not set
97# CONFIG_MARKERS is not set
98CONFIG_HAVE_OPROFILE=y 109CONFIG_HAVE_OPROFILE=y
99# CONFIG_KPROBES is not set 110# CONFIG_KPROBES is not set
100CONFIG_HAVE_IOREMAP_PROT=y 111CONFIG_HAVE_IOREMAP_PROT=y
@@ -103,6 +114,10 @@ CONFIG_HAVE_KRETPROBES=y
103CONFIG_HAVE_ARCH_TRACEHOOK=y 114CONFIG_HAVE_ARCH_TRACEHOOK=y
104CONFIG_HAVE_CLK=y 115CONFIG_HAVE_CLK=y
105CONFIG_HAVE_DMA_API_DEBUG=y 116CONFIG_HAVE_DMA_API_DEBUG=y
117
118#
119# GCOV-based kernel profiling
120#
106# CONFIG_SLOW_WORK is not set 121# CONFIG_SLOW_WORK is not set
107CONFIG_HAVE_GENERIC_DMA_COHERENT=y 122CONFIG_HAVE_GENERIC_DMA_COHERENT=y
108CONFIG_SLABINFO=y 123CONFIG_SLABINFO=y
@@ -115,7 +130,7 @@ CONFIG_MODULE_UNLOAD=y
115# CONFIG_MODVERSIONS is not set 130# CONFIG_MODVERSIONS is not set
116# CONFIG_MODULE_SRCVERSION_ALL is not set 131# CONFIG_MODULE_SRCVERSION_ALL is not set
117CONFIG_BLOCK=y 132CONFIG_BLOCK=y
118# CONFIG_LBD is not set 133CONFIG_LBDAF=y
119# CONFIG_BLK_DEV_BSG is not set 134# CONFIG_BLK_DEV_BSG is not set
120# CONFIG_BLK_DEV_INTEGRITY is not set 135# CONFIG_BLK_DEV_INTEGRITY is not set
121 136
@@ -162,6 +177,7 @@ CONFIG_CPU_SUBTYPE_SH7751R=y
162# CONFIG_CPU_SUBTYPE_SH4_202 is not set 177# CONFIG_CPU_SUBTYPE_SH4_202 is not set
163# CONFIG_CPU_SUBTYPE_SH7723 is not set 178# CONFIG_CPU_SUBTYPE_SH7723 is not set
164# CONFIG_CPU_SUBTYPE_SH7724 is not set 179# CONFIG_CPU_SUBTYPE_SH7724 is not set
180# CONFIG_CPU_SUBTYPE_SH7757 is not set
165# CONFIG_CPU_SUBTYPE_SH7763 is not set 181# CONFIG_CPU_SUBTYPE_SH7763 is not set
166# CONFIG_CPU_SUBTYPE_SH7770 is not set 182# CONFIG_CPU_SUBTYPE_SH7770 is not set
167# CONFIG_CPU_SUBTYPE_SH7780 is not set 183# CONFIG_CPU_SUBTYPE_SH7780 is not set
@@ -207,6 +223,7 @@ CONFIG_ZONE_DMA_FLAG=0
207CONFIG_NR_QUICK=2 223CONFIG_NR_QUICK=2
208CONFIG_HAVE_MLOCK=y 224CONFIG_HAVE_MLOCK=y
209CONFIG_HAVE_MLOCKED_PAGE_BIT=y 225CONFIG_HAVE_MLOCKED_PAGE_BIT=y
226# CONFIG_KSM is not set
210CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 227CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
211 228
212# 229#
@@ -294,7 +311,8 @@ CONFIG_ZERO_PAGE_OFFSET=0x00001000
294CONFIG_BOOT_LINK_OFFSET=0x00800000 311CONFIG_BOOT_LINK_OFFSET=0x00800000
295CONFIG_ENTRY_OFFSET=0x00001000 312CONFIG_ENTRY_OFFSET=0x00001000
296# CONFIG_UBC_WAKEUP is not set 313# CONFIG_UBC_WAKEUP is not set
297# CONFIG_CMDLINE_BOOL is not set 314# CONFIG_CMDLINE_OVERWRITE is not set
315# CONFIG_CMDLINE_EXTEND is not set
298 316
299# 317#
300# Bus options 318# Bus options
@@ -402,10 +420,20 @@ CONFIG_HW_RANDOM=y
402# CONFIG_TCG_TPM is not set 420# CONFIG_TCG_TPM is not set
403# CONFIG_I2C is not set 421# CONFIG_I2C is not set
404# CONFIG_SPI is not set 422# CONFIG_SPI is not set
423
424#
425# PPS support
426#
427# CONFIG_PPS is not set
405# CONFIG_W1 is not set 428# CONFIG_W1 is not set
406# CONFIG_POWER_SUPPLY is not set 429# CONFIG_POWER_SUPPLY is not set
407CONFIG_HWMON=y 430CONFIG_HWMON=y
408# CONFIG_HWMON_VID is not set 431# CONFIG_HWMON_VID is not set
432# CONFIG_HWMON_DEBUG_CHIP is not set
433
434#
435# Native drivers
436#
409# CONFIG_SENSORS_F71805F is not set 437# CONFIG_SENSORS_F71805F is not set
410# CONFIG_SENSORS_F71882FG is not set 438# CONFIG_SENSORS_F71882FG is not set
411# CONFIG_SENSORS_IT87 is not set 439# CONFIG_SENSORS_IT87 is not set
@@ -416,9 +444,7 @@ CONFIG_HWMON=y
416# CONFIG_SENSORS_VT1211 is not set 444# CONFIG_SENSORS_VT1211 is not set
417# CONFIG_SENSORS_W83627HF is not set 445# CONFIG_SENSORS_W83627HF is not set
418# CONFIG_SENSORS_W83627EHF is not set 446# CONFIG_SENSORS_W83627EHF is not set
419# CONFIG_HWMON_DEBUG_CHIP is not set
420# CONFIG_THERMAL is not set 447# CONFIG_THERMAL is not set
421# CONFIG_THERMAL_HWMON is not set
422# CONFIG_WATCHDOG is not set 448# CONFIG_WATCHDOG is not set
423CONFIG_SSB_POSSIBLE=y 449CONFIG_SSB_POSSIBLE=y
424 450
@@ -495,7 +521,9 @@ CONFIG_RTC_LIB=y
495# CONFIG_JFS_FS is not set 521# CONFIG_JFS_FS is not set
496# CONFIG_FS_POSIX_ACL is not set 522# CONFIG_FS_POSIX_ACL is not set
497# CONFIG_XFS_FS is not set 523# CONFIG_XFS_FS is not set
524# CONFIG_GFS2_FS is not set
498# CONFIG_BTRFS_FS is not set 525# CONFIG_BTRFS_FS is not set
526# CONFIG_NILFS2_FS is not set
499CONFIG_FILE_LOCKING=y 527CONFIG_FILE_LOCKING=y
500CONFIG_FSNOTIFY=y 528CONFIG_FSNOTIFY=y
501CONFIG_DNOTIFY=y 529CONFIG_DNOTIFY=y
@@ -559,7 +587,6 @@ CONFIG_ROMFS_BACKED_BY_BLOCK=y
559CONFIG_ROMFS_ON_BLOCK=y 587CONFIG_ROMFS_ON_BLOCK=y
560# CONFIG_SYSV_FS is not set 588# CONFIG_SYSV_FS is not set
561# CONFIG_UFS_FS is not set 589# CONFIG_UFS_FS is not set
562# CONFIG_NILFS2_FS is not set
563 590
564# 591#
565# Partition Types 592# Partition Types
@@ -577,6 +604,7 @@ CONFIG_ENABLE_WARN_DEPRECATED=y
577CONFIG_ENABLE_MUST_CHECK=y 604CONFIG_ENABLE_MUST_CHECK=y
578CONFIG_FRAME_WARN=1024 605CONFIG_FRAME_WARN=1024
579# CONFIG_MAGIC_SYSRQ is not set 606# CONFIG_MAGIC_SYSRQ is not set
607# CONFIG_STRIP_ASM_SYMS is not set
580# CONFIG_UNUSED_SYMBOLS is not set 608# CONFIG_UNUSED_SYMBOLS is not set
581# CONFIG_DEBUG_FS is not set 609# CONFIG_DEBUG_FS is not set
582# CONFIG_HEADERS_CHECK is not set 610# CONFIG_HEADERS_CHECK is not set
@@ -586,8 +614,11 @@ CONFIG_FRAME_WARN=1024
586# CONFIG_RCU_CPU_STALL_DETECTOR is not set 614# CONFIG_RCU_CPU_STALL_DETECTOR is not set
587# CONFIG_LATENCYTOP is not set 615# CONFIG_LATENCYTOP is not set
588CONFIG_HAVE_FUNCTION_TRACER=y 616CONFIG_HAVE_FUNCTION_TRACER=y
617CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
618CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
589CONFIG_HAVE_DYNAMIC_FTRACE=y 619CONFIG_HAVE_DYNAMIC_FTRACE=y
590CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 620CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
621CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
591CONFIG_TRACING_SUPPORT=y 622CONFIG_TRACING_SUPPORT=y
592# CONFIG_FTRACE is not set 623# CONFIG_FTRACE is not set
593# CONFIG_DMA_API_DEBUG is not set 624# CONFIG_DMA_API_DEBUG is not set
@@ -595,6 +626,7 @@ CONFIG_TRACING_SUPPORT=y
595CONFIG_HAVE_ARCH_KGDB=y 626CONFIG_HAVE_ARCH_KGDB=y
596# CONFIG_SH_STANDARD_BIOS is not set 627# CONFIG_SH_STANDARD_BIOS is not set
597# CONFIG_EARLY_SCIF_CONSOLE is not set 628# CONFIG_EARLY_SCIF_CONSOLE is not set
629# CONFIG_DWARF_UNWINDER is not set
598 630
599# 631#
600# Security options 632# Security options
@@ -623,4 +655,5 @@ CONFIG_DECOMPRESS_GZIP=y
623CONFIG_HAS_IOMEM=y 655CONFIG_HAS_IOMEM=y
624CONFIG_HAS_IOPORT=y 656CONFIG_HAS_IOPORT=y
625CONFIG_HAS_DMA=y 657CONFIG_HAS_DMA=y
658CONFIG_HAVE_LMB=y
626CONFIG_GENERIC_ATOMIC64=y 659CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/titan_defconfig b/arch/sh/configs/titan_defconfig
index 7ad080e820ce..2ca79ed9fb62 100644
--- a/arch/sh/configs/titan_defconfig
+++ b/arch/sh/configs/titan_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.30 3# Linux kernel version: 2.6.31
4# Thu Jun 18 13:12:54 2009 4# Thu Sep 24 19:36:36 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -14,6 +14,7 @@ CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y 14CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
16CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_IRQ_PER_CPU=y
17# CONFIG_GENERIC_GPIO is not set 18# CONFIG_GENERIC_GPIO is not set
18CONFIG_GENERIC_TIME=y 19CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 20CONFIG_GENERIC_CLOCKEVENTS=y
@@ -28,7 +29,9 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
28# CONFIG_ARCH_HAS_ILOG2_U64 is not set 29# CONFIG_ARCH_HAS_ILOG2_U64 is not set
29CONFIG_ARCH_NO_VIRT_TO_BUS=y 30CONFIG_ARCH_NO_VIRT_TO_BUS=y
30CONFIG_ARCH_HAS_DEFAULT_IDLE=y 31CONFIG_ARCH_HAS_DEFAULT_IDLE=y
32CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
31CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 33CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
34CONFIG_CONSTRUCTORS=y
32 35
33# 36#
34# General setup 37# General setup
@@ -38,6 +41,12 @@ CONFIG_BROKEN_ON_SMP=y
38CONFIG_INIT_ENV_ARG_LIMIT=32 41CONFIG_INIT_ENV_ARG_LIMIT=32
39CONFIG_LOCALVERSION="" 42CONFIG_LOCALVERSION=""
40# CONFIG_LOCALVERSION_AUTO is not set 43# CONFIG_LOCALVERSION_AUTO is not set
44CONFIG_HAVE_KERNEL_GZIP=y
45CONFIG_HAVE_KERNEL_BZIP2=y
46CONFIG_HAVE_KERNEL_LZMA=y
47CONFIG_KERNEL_GZIP=y
48# CONFIG_KERNEL_BZIP2 is not set
49# CONFIG_KERNEL_LZMA is not set
41CONFIG_SWAP=y 50CONFIG_SWAP=y
42CONFIG_SYSVIPC=y 51CONFIG_SYSVIPC=y
43CONFIG_SYSVIPC_SYSCTL=y 52CONFIG_SYSVIPC_SYSCTL=y
@@ -50,11 +59,12 @@ CONFIG_POSIX_MQUEUE_SYSCTL=y
50# 59#
51# RCU Subsystem 60# RCU Subsystem
52# 61#
53CONFIG_CLASSIC_RCU=y 62CONFIG_TREE_RCU=y
54# CONFIG_TREE_RCU is not set 63# CONFIG_TREE_PREEMPT_RCU is not set
55# CONFIG_PREEMPT_RCU is not set 64# CONFIG_RCU_TRACE is not set
65CONFIG_RCU_FANOUT=32
66# CONFIG_RCU_FANOUT_EXACT is not set
56# CONFIG_TREE_RCU_TRACE is not set 67# CONFIG_TREE_RCU_TRACE is not set
57# CONFIG_PREEMPT_RCU_TRACE is not set
58CONFIG_IKCONFIG=y 68CONFIG_IKCONFIG=y
59CONFIG_IKCONFIG_PROC=y 69CONFIG_IKCONFIG_PROC=y
60CONFIG_LOG_BUF_SHIFT=16 70CONFIG_LOG_BUF_SHIFT=16
@@ -90,19 +100,20 @@ CONFIG_TIMERFD=y
90CONFIG_EVENTFD=y 100CONFIG_EVENTFD=y
91CONFIG_SHMEM=y 101CONFIG_SHMEM=y
92CONFIG_AIO=y 102CONFIG_AIO=y
103CONFIG_HAVE_PERF_EVENTS=y
93 104
94# 105#
95# Performance Counters 106# Kernel Performance Events And Counters
96# 107#
108# CONFIG_PERF_EVENTS is not set
109# CONFIG_PERF_COUNTERS is not set
97CONFIG_VM_EVENT_COUNTERS=y 110CONFIG_VM_EVENT_COUNTERS=y
98CONFIG_PCI_QUIRKS=y 111CONFIG_PCI_QUIRKS=y
99# CONFIG_STRIP_ASM_SYMS is not set
100CONFIG_COMPAT_BRK=y 112CONFIG_COMPAT_BRK=y
101CONFIG_SLAB=y 113CONFIG_SLAB=y
102# CONFIG_SLUB is not set 114# CONFIG_SLUB is not set
103# CONFIG_SLOB is not set 115# CONFIG_SLOB is not set
104# CONFIG_PROFILING is not set 116# CONFIG_PROFILING is not set
105# CONFIG_MARKERS is not set
106CONFIG_HAVE_OPROFILE=y 117CONFIG_HAVE_OPROFILE=y
107# CONFIG_KPROBES is not set 118# CONFIG_KPROBES is not set
108CONFIG_HAVE_IOREMAP_PROT=y 119CONFIG_HAVE_IOREMAP_PROT=y
@@ -111,6 +122,10 @@ CONFIG_HAVE_KRETPROBES=y
111CONFIG_HAVE_ARCH_TRACEHOOK=y 122CONFIG_HAVE_ARCH_TRACEHOOK=y
112CONFIG_HAVE_CLK=y 123CONFIG_HAVE_CLK=y
113CONFIG_HAVE_DMA_API_DEBUG=y 124CONFIG_HAVE_DMA_API_DEBUG=y
125
126#
127# GCOV-based kernel profiling
128#
114# CONFIG_SLOW_WORK is not set 129# CONFIG_SLOW_WORK is not set
115CONFIG_HAVE_GENERIC_DMA_COHERENT=y 130CONFIG_HAVE_GENERIC_DMA_COHERENT=y
116CONFIG_SLABINFO=y 131CONFIG_SLABINFO=y
@@ -123,7 +138,7 @@ CONFIG_MODULE_FORCE_UNLOAD=y
123# CONFIG_MODVERSIONS is not set 138# CONFIG_MODVERSIONS is not set
124# CONFIG_MODULE_SRCVERSION_ALL is not set 139# CONFIG_MODULE_SRCVERSION_ALL is not set
125CONFIG_BLOCK=y 140CONFIG_BLOCK=y
126# CONFIG_LBD is not set 141CONFIG_LBDAF=y
127# CONFIG_BLK_DEV_BSG is not set 142# CONFIG_BLK_DEV_BSG is not set
128# CONFIG_BLK_DEV_INTEGRITY is not set 143# CONFIG_BLK_DEV_INTEGRITY is not set
129 144
@@ -170,6 +185,7 @@ CONFIG_CPU_SUBTYPE_SH7751R=y
170# CONFIG_CPU_SUBTYPE_SH4_202 is not set 185# CONFIG_CPU_SUBTYPE_SH4_202 is not set
171# CONFIG_CPU_SUBTYPE_SH7723 is not set 186# CONFIG_CPU_SUBTYPE_SH7723 is not set
172# CONFIG_CPU_SUBTYPE_SH7724 is not set 187# CONFIG_CPU_SUBTYPE_SH7724 is not set
188# CONFIG_CPU_SUBTYPE_SH7757 is not set
173# CONFIG_CPU_SUBTYPE_SH7763 is not set 189# CONFIG_CPU_SUBTYPE_SH7763 is not set
174# CONFIG_CPU_SUBTYPE_SH7770 is not set 190# CONFIG_CPU_SUBTYPE_SH7770 is not set
175# CONFIG_CPU_SUBTYPE_SH7780 is not set 191# CONFIG_CPU_SUBTYPE_SH7780 is not set
@@ -215,6 +231,7 @@ CONFIG_ZONE_DMA_FLAG=0
215CONFIG_NR_QUICK=2 231CONFIG_NR_QUICK=2
216CONFIG_HAVE_MLOCK=y 232CONFIG_HAVE_MLOCK=y
217CONFIG_HAVE_MLOCKED_PAGE_BIT=y 233CONFIG_HAVE_MLOCKED_PAGE_BIT=y
234# CONFIG_KSM is not set
218CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 235CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
219 236
220# 237#
@@ -307,7 +324,8 @@ CONFIG_ZERO_PAGE_OFFSET=0x00001000
307CONFIG_BOOT_LINK_OFFSET=0x009e0000 324CONFIG_BOOT_LINK_OFFSET=0x009e0000
308CONFIG_ENTRY_OFFSET=0x00001000 325CONFIG_ENTRY_OFFSET=0x00001000
309# CONFIG_UBC_WAKEUP is not set 326# CONFIG_UBC_WAKEUP is not set
310CONFIG_CMDLINE_BOOL=y 327CONFIG_CMDLINE_OVERWRITE=y
328# CONFIG_CMDLINE_EXTEND is not set
311CONFIG_CMDLINE="console=ttySC1,38400N81 root=/dev/nfs ip=:::::eth1:autoconf rw" 329CONFIG_CMDLINE="console=ttySC1,38400N81 root=/dev/nfs ip=:::::eth1:autoconf rw"
312 330
313# 331#
@@ -509,6 +527,7 @@ CONFIG_IP6_NF_RAW=m
509# CONFIG_BRIDGE_NF_EBTABLES is not set 527# CONFIG_BRIDGE_NF_EBTABLES is not set
510# CONFIG_IP_DCCP is not set 528# CONFIG_IP_DCCP is not set
511# CONFIG_IP_SCTP is not set 529# CONFIG_IP_SCTP is not set
530# CONFIG_RDS is not set
512# CONFIG_TIPC is not set 531# CONFIG_TIPC is not set
513# CONFIG_ATM is not set 532# CONFIG_ATM is not set
514CONFIG_STP=y 533CONFIG_STP=y
@@ -595,6 +614,7 @@ CONFIG_NET_SCH_FIFO=y
595CONFIG_FIB_RULES=y 614CONFIG_FIB_RULES=y
596CONFIG_WIRELESS=y 615CONFIG_WIRELESS=y
597# CONFIG_CFG80211 is not set 616# CONFIG_CFG80211 is not set
617CONFIG_CFG80211_DEFAULT_PS_VALUE=0
598# CONFIG_WIRELESS_OLD_REGULATORY is not set 618# CONFIG_WIRELESS_OLD_REGULATORY is not set
599CONFIG_WIRELESS_EXT=y 619CONFIG_WIRELESS_EXT=y
600CONFIG_WIRELESS_EXT_SYSFS=y 620CONFIG_WIRELESS_EXT_SYSFS=y
@@ -603,7 +623,6 @@ CONFIG_WIRELESS_EXT_SYSFS=y
603# 623#
604# CFG80211 needs to be enabled for MAC80211 624# CFG80211 needs to be enabled for MAC80211
605# 625#
606CONFIG_MAC80211_DEFAULT_PS_VALUE=0
607# CONFIG_WIMAX is not set 626# CONFIG_WIMAX is not set
608# CONFIG_RFKILL is not set 627# CONFIG_RFKILL is not set
609# CONFIG_NET_9P is not set 628# CONFIG_NET_9P is not set
@@ -616,6 +635,7 @@ CONFIG_MAC80211_DEFAULT_PS_VALUE=0
616# Generic Driver Options 635# Generic Driver Options
617# 636#
618CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 637CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
638# CONFIG_DEVTMPFS is not set
619CONFIG_STANDALONE=y 639CONFIG_STANDALONE=y
620CONFIG_PREVENT_FIRMWARE_BUILD=y 640CONFIG_PREVENT_FIRMWARE_BUILD=y
621CONFIG_FW_LOADER=m 641CONFIG_FW_LOADER=m
@@ -628,9 +648,9 @@ CONFIG_CONNECTOR=m
628CONFIG_MTD=m 648CONFIG_MTD=m
629CONFIG_MTD_DEBUG=y 649CONFIG_MTD_DEBUG=y
630CONFIG_MTD_DEBUG_VERBOSE=0 650CONFIG_MTD_DEBUG_VERBOSE=0
651# CONFIG_MTD_TESTS is not set
631# CONFIG_MTD_CONCAT is not set 652# CONFIG_MTD_CONCAT is not set
632# CONFIG_MTD_PARTITIONS is not set 653# CONFIG_MTD_PARTITIONS is not set
633# CONFIG_MTD_TESTS is not set
634 654
635# 655#
636# User Modules And Translation Layers 656# User Modules And Translation Layers
@@ -820,6 +840,7 @@ CONFIG_SCSI_LOWLEVEL=y
820# CONFIG_SCSI_DC390T is not set 840# CONFIG_SCSI_DC390T is not set
821# CONFIG_SCSI_NSP32 is not set 841# CONFIG_SCSI_NSP32 is not set
822# CONFIG_SCSI_DEBUG is not set 842# CONFIG_SCSI_DEBUG is not set
843# CONFIG_SCSI_PMCRAID is not set
823# CONFIG_SCSI_SRP is not set 844# CONFIG_SCSI_SRP is not set
824# CONFIG_SCSI_DH is not set 845# CONFIG_SCSI_DH is not set
825# CONFIG_SCSI_OSD_INITIATOR is not set 846# CONFIG_SCSI_OSD_INITIATOR is not set
@@ -832,7 +853,11 @@ CONFIG_SCSI_LOWLEVEL=y
832# 853#
833 854
834# 855#
835# Enable only one of the two stacks, unless you know what you are doing 856# You can enable one or both FireWire driver stacks.
857#
858
859#
860# See the help texts for more information.
836# 861#
837# CONFIG_FIREWIRE is not set 862# CONFIG_FIREWIRE is not set
838# CONFIG_IEEE1394 is not set 863# CONFIG_IEEE1394 is not set
@@ -931,6 +956,7 @@ CONFIG_NETDEV_1000=y
931# CONFIG_VIA_VELOCITY is not set 956# CONFIG_VIA_VELOCITY is not set
932# CONFIG_TIGON3 is not set 957# CONFIG_TIGON3 is not set
933# CONFIG_BNX2 is not set 958# CONFIG_BNX2 is not set
959# CONFIG_CNIC is not set
934# CONFIG_QLA3XXX is not set 960# CONFIG_QLA3XXX is not set
935# CONFIG_ATL1 is not set 961# CONFIG_ATL1 is not set
936# CONFIG_ATL1E is not set 962# CONFIG_ATL1E is not set
@@ -956,10 +982,7 @@ CONFIG_CHELSIO_T3_DEPENDS=y
956# CONFIG_SFC is not set 982# CONFIG_SFC is not set
957# CONFIG_BE2NET is not set 983# CONFIG_BE2NET is not set
958# CONFIG_TR is not set 984# CONFIG_TR is not set
959 985CONFIG_WLAN=y
960#
961# Wireless LAN
962#
963# CONFIG_WLAN_PRE80211 is not set 986# CONFIG_WLAN_PRE80211 is not set
964# CONFIG_WLAN_80211 is not set 987# CONFIG_WLAN_80211 is not set
965 988
@@ -1087,10 +1110,20 @@ CONFIG_HW_RANDOM=y
1087CONFIG_DEVPORT=y 1110CONFIG_DEVPORT=y
1088# CONFIG_I2C is not set 1111# CONFIG_I2C is not set
1089# CONFIG_SPI is not set 1112# CONFIG_SPI is not set
1113
1114#
1115# PPS support
1116#
1117# CONFIG_PPS is not set
1090# CONFIG_W1 is not set 1118# CONFIG_W1 is not set
1091# CONFIG_POWER_SUPPLY is not set 1119# CONFIG_POWER_SUPPLY is not set
1092CONFIG_HWMON=y 1120CONFIG_HWMON=y
1093# CONFIG_HWMON_VID is not set 1121# CONFIG_HWMON_VID is not set
1122# CONFIG_HWMON_DEBUG_CHIP is not set
1123
1124#
1125# Native drivers
1126#
1094# CONFIG_SENSORS_I5K_AMB is not set 1127# CONFIG_SENSORS_I5K_AMB is not set
1095# CONFIG_SENSORS_F71805F is not set 1128# CONFIG_SENSORS_F71805F is not set
1096# CONFIG_SENSORS_F71882FG is not set 1129# CONFIG_SENSORS_F71882FG is not set
@@ -1105,9 +1138,7 @@ CONFIG_HWMON=y
1105# CONFIG_SENSORS_VT8231 is not set 1138# CONFIG_SENSORS_VT8231 is not set
1106# CONFIG_SENSORS_W83627HF is not set 1139# CONFIG_SENSORS_W83627HF is not set
1107# CONFIG_SENSORS_W83627EHF is not set 1140# CONFIG_SENSORS_W83627EHF is not set
1108# CONFIG_HWMON_DEBUG_CHIP is not set
1109# CONFIG_THERMAL is not set 1141# CONFIG_THERMAL is not set
1110# CONFIG_THERMAL_HWMON is not set
1111CONFIG_WATCHDOG=y 1142CONFIG_WATCHDOG=y
1112# CONFIG_WATCHDOG_NOWAYOUT is not set 1143# CONFIG_WATCHDOG_NOWAYOUT is not set
1113 1144
@@ -1149,6 +1180,7 @@ CONFIG_SSB_POSSIBLE=y
1149# 1180#
1150# Graphics support 1181# Graphics support
1151# 1182#
1183CONFIG_VGA_ARB=y
1152# CONFIG_DRM is not set 1184# CONFIG_DRM is not set
1153# CONFIG_VGASTATE is not set 1185# CONFIG_VGASTATE is not set
1154# CONFIG_VIDEO_OUTPUT_CONTROL is not set 1186# CONFIG_VIDEO_OUTPUT_CONTROL is not set
@@ -1167,7 +1199,6 @@ CONFIG_DUMMY_CONSOLE=y
1167# CONFIG_SOUND is not set 1199# CONFIG_SOUND is not set
1168CONFIG_HID_SUPPORT=y 1200CONFIG_HID_SUPPORT=y
1169CONFIG_HID=y 1201CONFIG_HID=y
1170# CONFIG_HID_DEBUG is not set
1171# CONFIG_HIDRAW is not set 1202# CONFIG_HIDRAW is not set
1172 1203
1173# 1204#
@@ -1217,6 +1248,7 @@ CONFIG_USB_EHCI_TT_NEWSCHED=y
1217# CONFIG_USB_OXU210HP_HCD is not set 1248# CONFIG_USB_OXU210HP_HCD is not set
1218# CONFIG_USB_ISP116X_HCD is not set 1249# CONFIG_USB_ISP116X_HCD is not set
1219# CONFIG_USB_ISP1760_HCD is not set 1250# CONFIG_USB_ISP1760_HCD is not set
1251# CONFIG_USB_ISP1362_HCD is not set
1220CONFIG_USB_OHCI_HCD=y 1252CONFIG_USB_OHCI_HCD=y
1221# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set 1253# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
1222# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set 1254# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
@@ -1416,8 +1448,10 @@ CONFIG_XFS_FS=m
1416# CONFIG_XFS_POSIX_ACL is not set 1448# CONFIG_XFS_POSIX_ACL is not set
1417# CONFIG_XFS_RT is not set 1449# CONFIG_XFS_RT is not set
1418# CONFIG_XFS_DEBUG is not set 1450# CONFIG_XFS_DEBUG is not set
1451# CONFIG_GFS2_FS is not set
1419# CONFIG_OCFS2_FS is not set 1452# CONFIG_OCFS2_FS is not set
1420# CONFIG_BTRFS_FS is not set 1453# CONFIG_BTRFS_FS is not set
1454# CONFIG_NILFS2_FS is not set
1421CONFIG_FILE_LOCKING=y 1455CONFIG_FILE_LOCKING=y
1422CONFIG_FSNOTIFY=y 1456CONFIG_FSNOTIFY=y
1423CONFIG_DNOTIFY=y 1457CONFIG_DNOTIFY=y
@@ -1489,7 +1523,6 @@ CONFIG_ROMFS_BACKED_BY_BLOCK=y
1489CONFIG_ROMFS_ON_BLOCK=y 1523CONFIG_ROMFS_ON_BLOCK=y
1490# CONFIG_SYSV_FS is not set 1524# CONFIG_SYSV_FS is not set
1491# CONFIG_UFS_FS is not set 1525# CONFIG_UFS_FS is not set
1492# CONFIG_NILFS2_FS is not set
1493CONFIG_NETWORK_FILESYSTEMS=y 1526CONFIG_NETWORK_FILESYSTEMS=y
1494CONFIG_NFS_FS=y 1527CONFIG_NFS_FS=y
1495CONFIG_NFS_V3=y 1528CONFIG_NFS_V3=y
@@ -1591,6 +1624,7 @@ CONFIG_ENABLE_WARN_DEPRECATED=y
1591CONFIG_ENABLE_MUST_CHECK=y 1624CONFIG_ENABLE_MUST_CHECK=y
1592CONFIG_FRAME_WARN=1024 1625CONFIG_FRAME_WARN=1024
1593CONFIG_MAGIC_SYSRQ=y 1626CONFIG_MAGIC_SYSRQ=y
1627# CONFIG_STRIP_ASM_SYMS is not set
1594# CONFIG_UNUSED_SYMBOLS is not set 1628# CONFIG_UNUSED_SYMBOLS is not set
1595# CONFIG_DEBUG_FS is not set 1629# CONFIG_DEBUG_FS is not set
1596# CONFIG_HEADERS_CHECK is not set 1630# CONFIG_HEADERS_CHECK is not set
@@ -1621,23 +1655,29 @@ CONFIG_SCHED_DEBUG=y
1621# CONFIG_DEBUG_LIST is not set 1655# CONFIG_DEBUG_LIST is not set
1622# CONFIG_DEBUG_SG is not set 1656# CONFIG_DEBUG_SG is not set
1623# CONFIG_DEBUG_NOTIFIERS is not set 1657# CONFIG_DEBUG_NOTIFIERS is not set
1658# CONFIG_DEBUG_CREDENTIALS is not set
1624# CONFIG_FRAME_POINTER is not set 1659# CONFIG_FRAME_POINTER is not set
1625# CONFIG_RCU_TORTURE_TEST is not set 1660# CONFIG_RCU_TORTURE_TEST is not set
1626# CONFIG_RCU_CPU_STALL_DETECTOR is not set 1661# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1627# CONFIG_BACKTRACE_SELF_TEST is not set 1662# CONFIG_BACKTRACE_SELF_TEST is not set
1628# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set 1663# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
1664# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
1629# CONFIG_FAULT_INJECTION is not set 1665# CONFIG_FAULT_INJECTION is not set
1630# CONFIG_LATENCYTOP is not set 1666# CONFIG_LATENCYTOP is not set
1631# CONFIG_PAGE_POISONING is not set 1667# CONFIG_PAGE_POISONING is not set
1632CONFIG_HAVE_FUNCTION_TRACER=y 1668CONFIG_HAVE_FUNCTION_TRACER=y
1669CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1670CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
1633CONFIG_HAVE_DYNAMIC_FTRACE=y 1671CONFIG_HAVE_DYNAMIC_FTRACE=y
1634CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1672CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1673CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
1635CONFIG_TRACING_SUPPORT=y 1674CONFIG_TRACING_SUPPORT=y
1636CONFIG_FTRACE=y 1675CONFIG_FTRACE=y
1637# CONFIG_FUNCTION_TRACER is not set 1676# CONFIG_FUNCTION_TRACER is not set
1638# CONFIG_IRQSOFF_TRACER is not set 1677# CONFIG_IRQSOFF_TRACER is not set
1639# CONFIG_SCHED_TRACER is not set 1678# CONFIG_SCHED_TRACER is not set
1640# CONFIG_ENABLE_DEFAULT_TRACERS is not set 1679# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1680# CONFIG_FTRACE_SYSCALLS is not set
1641# CONFIG_BOOT_TRACER is not set 1681# CONFIG_BOOT_TRACER is not set
1642CONFIG_BRANCH_PROFILE_NONE=y 1682CONFIG_BRANCH_PROFILE_NONE=y
1643# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set 1683# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
@@ -1650,14 +1690,13 @@ CONFIG_BRANCH_PROFILE_NONE=y
1650# CONFIG_SAMPLES is not set 1690# CONFIG_SAMPLES is not set
1651CONFIG_HAVE_ARCH_KGDB=y 1691CONFIG_HAVE_ARCH_KGDB=y
1652# CONFIG_KGDB is not set 1692# CONFIG_KGDB is not set
1653# CONFIG_KMEMCHECK is not set
1654# CONFIG_SH_STANDARD_BIOS is not set 1693# CONFIG_SH_STANDARD_BIOS is not set
1655# CONFIG_EARLY_SCIF_CONSOLE is not set 1694# CONFIG_EARLY_SCIF_CONSOLE is not set
1656# CONFIG_DEBUG_BOOTMEM is not set 1695# CONFIG_STACK_DEBUG is not set
1657# CONFIG_DEBUG_STACKOVERFLOW is not set
1658# CONFIG_DEBUG_STACK_USAGE is not set 1696# CONFIG_DEBUG_STACK_USAGE is not set
1659# CONFIG_4KSTACKS is not set 1697# CONFIG_4KSTACKS is not set
1660# CONFIG_DUMP_CODE is not set 1698# CONFIG_DUMP_CODE is not set
1699# CONFIG_DWARF_UNWINDER is not set
1661# CONFIG_SH_NO_BSS_INIT is not set 1700# CONFIG_SH_NO_BSS_INIT is not set
1662 1701
1663# 1702#
@@ -1672,7 +1711,6 @@ CONFIG_CRYPTO=y
1672# 1711#
1673# Crypto core or helper 1712# Crypto core or helper
1674# 1713#
1675# CONFIG_CRYPTO_FIPS is not set
1676CONFIG_CRYPTO_ALGAPI=y 1714CONFIG_CRYPTO_ALGAPI=y
1677CONFIG_CRYPTO_ALGAPI2=y 1715CONFIG_CRYPTO_ALGAPI2=y
1678CONFIG_CRYPTO_AEAD=y 1716CONFIG_CRYPTO_AEAD=y
@@ -1715,11 +1753,13 @@ CONFIG_CRYPTO_ECB=y
1715# 1753#
1716CONFIG_CRYPTO_HMAC=y 1754CONFIG_CRYPTO_HMAC=y
1717# CONFIG_CRYPTO_XCBC is not set 1755# CONFIG_CRYPTO_XCBC is not set
1756# CONFIG_CRYPTO_VMAC is not set
1718 1757
1719# 1758#
1720# Digest 1759# Digest
1721# 1760#
1722CONFIG_CRYPTO_CRC32C=m 1761CONFIG_CRYPTO_CRC32C=m
1762# CONFIG_CRYPTO_GHASH is not set
1723CONFIG_CRYPTO_MD4=m 1763CONFIG_CRYPTO_MD4=m
1724CONFIG_CRYPTO_MD5=y 1764CONFIG_CRYPTO_MD5=y
1725CONFIG_CRYPTO_MICHAEL_MIC=y 1765CONFIG_CRYPTO_MICHAEL_MIC=y
@@ -1790,5 +1830,6 @@ CONFIG_TEXTSEARCH_FSM=m
1790CONFIG_HAS_IOMEM=y 1830CONFIG_HAS_IOMEM=y
1791CONFIG_HAS_IOPORT=y 1831CONFIG_HAS_IOPORT=y
1792CONFIG_HAS_DMA=y 1832CONFIG_HAS_DMA=y
1833CONFIG_HAVE_LMB=y
1793CONFIG_NLATTR=y 1834CONFIG_NLATTR=y
1794CONFIG_GENERIC_ATOMIC64=y 1835CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/ul2_defconfig b/arch/sh/configs/ul2_defconfig
index 608fe563614c..b012ca77f029 100644
--- a/arch/sh/configs/ul2_defconfig
+++ b/arch/sh/configs/ul2_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.30 3# Linux kernel version: 2.6.31
4# Thu Jun 18 13:14:36 2009 4# Thu Sep 24 19:42:33 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -14,6 +14,7 @@ CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y 14CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
16CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_IRQ_PER_CPU=y
17# CONFIG_GENERIC_GPIO is not set 18# CONFIG_GENERIC_GPIO is not set
18CONFIG_GENERIC_TIME=y 19CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 20CONFIG_GENERIC_CLOCKEVENTS=y
@@ -29,7 +30,9 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
29# CONFIG_ARCH_HAS_ILOG2_U64 is not set 30# CONFIG_ARCH_HAS_ILOG2_U64 is not set
30CONFIG_ARCH_NO_VIRT_TO_BUS=y 31CONFIG_ARCH_NO_VIRT_TO_BUS=y
31CONFIG_ARCH_HAS_DEFAULT_IDLE=y 32CONFIG_ARCH_HAS_DEFAULT_IDLE=y
33CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
32CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 34CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
35CONFIG_CONSTRUCTORS=y
33 36
34# 37#
35# General setup 38# General setup
@@ -40,6 +43,12 @@ CONFIG_LOCK_KERNEL=y
40CONFIG_INIT_ENV_ARG_LIMIT=32 43CONFIG_INIT_ENV_ARG_LIMIT=32
41CONFIG_LOCALVERSION="" 44CONFIG_LOCALVERSION=""
42CONFIG_LOCALVERSION_AUTO=y 45CONFIG_LOCALVERSION_AUTO=y
46CONFIG_HAVE_KERNEL_GZIP=y
47CONFIG_HAVE_KERNEL_BZIP2=y
48CONFIG_HAVE_KERNEL_LZMA=y
49CONFIG_KERNEL_GZIP=y
50# CONFIG_KERNEL_BZIP2 is not set
51# CONFIG_KERNEL_LZMA is not set
43CONFIG_SWAP=y 52CONFIG_SWAP=y
44CONFIG_SYSVIPC=y 53CONFIG_SYSVIPC=y
45CONFIG_SYSVIPC_SYSCTL=y 54CONFIG_SYSVIPC_SYSCTL=y
@@ -52,11 +61,12 @@ CONFIG_BSD_PROCESS_ACCT=y
52# 61#
53# RCU Subsystem 62# RCU Subsystem
54# 63#
55CONFIG_CLASSIC_RCU=y 64CONFIG_TREE_RCU=y
56# CONFIG_TREE_RCU is not set 65# CONFIG_TREE_PREEMPT_RCU is not set
57# CONFIG_PREEMPT_RCU is not set 66# CONFIG_RCU_TRACE is not set
67CONFIG_RCU_FANOUT=32
68# CONFIG_RCU_FANOUT_EXACT is not set
58# CONFIG_TREE_RCU_TRACE is not set 69# CONFIG_TREE_RCU_TRACE is not set
59# CONFIG_PREEMPT_RCU_TRACE is not set
60CONFIG_IKCONFIG=y 70CONFIG_IKCONFIG=y
61CONFIG_IKCONFIG_PROC=y 71CONFIG_IKCONFIG_PROC=y
62CONFIG_LOG_BUF_SHIFT=14 72CONFIG_LOG_BUF_SHIFT=14
@@ -91,19 +101,20 @@ CONFIG_TIMERFD=y
91CONFIG_EVENTFD=y 101CONFIG_EVENTFD=y
92CONFIG_SHMEM=y 102CONFIG_SHMEM=y
93CONFIG_AIO=y 103CONFIG_AIO=y
104CONFIG_HAVE_PERF_EVENTS=y
94 105
95# 106#
96# Performance Counters 107# Kernel Performance Events And Counters
97# 108#
109CONFIG_PERF_EVENTS=y
110# CONFIG_PERF_COUNTERS is not set
98CONFIG_VM_EVENT_COUNTERS=y 111CONFIG_VM_EVENT_COUNTERS=y
99CONFIG_SLUB_DEBUG=y 112CONFIG_SLUB_DEBUG=y
100# CONFIG_STRIP_ASM_SYMS is not set
101CONFIG_COMPAT_BRK=y 113CONFIG_COMPAT_BRK=y
102# CONFIG_SLAB is not set 114# CONFIG_SLAB is not set
103CONFIG_SLUB=y 115CONFIG_SLUB=y
104# CONFIG_SLOB is not set 116# CONFIG_SLOB is not set
105CONFIG_PROFILING=y 117CONFIG_PROFILING=y
106# CONFIG_MARKERS is not set
107# CONFIG_OPROFILE is not set 118# CONFIG_OPROFILE is not set
108CONFIG_HAVE_OPROFILE=y 119CONFIG_HAVE_OPROFILE=y
109# CONFIG_KPROBES is not set 120# CONFIG_KPROBES is not set
@@ -113,6 +124,10 @@ CONFIG_HAVE_KRETPROBES=y
113CONFIG_HAVE_ARCH_TRACEHOOK=y 124CONFIG_HAVE_ARCH_TRACEHOOK=y
114CONFIG_HAVE_CLK=y 125CONFIG_HAVE_CLK=y
115CONFIG_HAVE_DMA_API_DEBUG=y 126CONFIG_HAVE_DMA_API_DEBUG=y
127
128#
129# GCOV-based kernel profiling
130#
116# CONFIG_SLOW_WORK is not set 131# CONFIG_SLOW_WORK is not set
117CONFIG_HAVE_GENERIC_DMA_COHERENT=y 132CONFIG_HAVE_GENERIC_DMA_COHERENT=y
118CONFIG_SLABINFO=y 133CONFIG_SLABINFO=y
@@ -125,7 +140,7 @@ CONFIG_MODULE_UNLOAD=y
125# CONFIG_MODVERSIONS is not set 140# CONFIG_MODVERSIONS is not set
126# CONFIG_MODULE_SRCVERSION_ALL is not set 141# CONFIG_MODULE_SRCVERSION_ALL is not set
127CONFIG_BLOCK=y 142CONFIG_BLOCK=y
128# CONFIG_LBD is not set 143CONFIG_LBDAF=y
129# CONFIG_BLK_DEV_BSG is not set 144# CONFIG_BLK_DEV_BSG is not set
130# CONFIG_BLK_DEV_INTEGRITY is not set 145# CONFIG_BLK_DEV_INTEGRITY is not set
131 146
@@ -141,7 +156,7 @@ CONFIG_IOSCHED_NOOP=y
141# CONFIG_DEFAULT_CFQ is not set 156# CONFIG_DEFAULT_CFQ is not set
142CONFIG_DEFAULT_NOOP=y 157CONFIG_DEFAULT_NOOP=y
143CONFIG_DEFAULT_IOSCHED="noop" 158CONFIG_DEFAULT_IOSCHED="noop"
144# CONFIG_FREEZER is not set 159CONFIG_FREEZER=y
145 160
146# 161#
147# System type 162# System type
@@ -176,6 +191,7 @@ CONFIG_ARCH_SHMOBILE=y
176# CONFIG_CPU_SUBTYPE_SH4_202 is not set 191# CONFIG_CPU_SUBTYPE_SH4_202 is not set
177# CONFIG_CPU_SUBTYPE_SH7723 is not set 192# CONFIG_CPU_SUBTYPE_SH7723 is not set
178# CONFIG_CPU_SUBTYPE_SH7724 is not set 193# CONFIG_CPU_SUBTYPE_SH7724 is not set
194# CONFIG_CPU_SUBTYPE_SH7757 is not set
179# CONFIG_CPU_SUBTYPE_SH7763 is not set 195# CONFIG_CPU_SUBTYPE_SH7763 is not set
180# CONFIG_CPU_SUBTYPE_SH7770 is not set 196# CONFIG_CPU_SUBTYPE_SH7770 is not set
181# CONFIG_CPU_SUBTYPE_SH7780 is not set 197# CONFIG_CPU_SUBTYPE_SH7780 is not set
@@ -233,6 +249,7 @@ CONFIG_ZONE_DMA_FLAG=0
233CONFIG_NR_QUICK=2 249CONFIG_NR_QUICK=2
234CONFIG_HAVE_MLOCK=y 250CONFIG_HAVE_MLOCK=y
235CONFIG_HAVE_MLOCKED_PAGE_BIT=y 251CONFIG_HAVE_MLOCKED_PAGE_BIT=y
252# CONFIG_KSM is not set
236CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 253CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
237 254
238# 255#
@@ -314,7 +331,8 @@ CONFIG_GUSA=y
314CONFIG_ZERO_PAGE_OFFSET=0x00001000 331CONFIG_ZERO_PAGE_OFFSET=0x00001000
315CONFIG_BOOT_LINK_OFFSET=0x00800000 332CONFIG_BOOT_LINK_OFFSET=0x00800000
316CONFIG_ENTRY_OFFSET=0x00001000 333CONFIG_ENTRY_OFFSET=0x00001000
317CONFIG_CMDLINE_BOOL=y 334CONFIG_CMDLINE_OVERWRITE=y
335# CONFIG_CMDLINE_EXTEND is not set
318CONFIG_CMDLINE="console=ttySC0,115200 root=/dev/nfs ip=dhcp" 336CONFIG_CMDLINE="console=ttySC0,115200 root=/dev/nfs ip=dhcp"
319 337
320# 338#
@@ -334,7 +352,13 @@ CONFIG_BINFMT_ELF=y
334# 352#
335# Power management options (EXPERIMENTAL) 353# Power management options (EXPERIMENTAL)
336# 354#
337# CONFIG_PM is not set 355CONFIG_PM=y
356# CONFIG_PM_DEBUG is not set
357CONFIG_PM_SLEEP=y
358CONFIG_SUSPEND=y
359CONFIG_SUSPEND_FREEZER=y
360# CONFIG_HIBERNATION is not set
361CONFIG_PM_RUNTIME=y
338# CONFIG_CPU_IDLE is not set 362# CONFIG_CPU_IDLE is not set
339CONFIG_NET=y 363CONFIG_NET=y
340 364
@@ -382,6 +406,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
382# CONFIG_NETFILTER is not set 406# CONFIG_NETFILTER is not set
383# CONFIG_IP_DCCP is not set 407# CONFIG_IP_DCCP is not set
384# CONFIG_IP_SCTP is not set 408# CONFIG_IP_SCTP is not set
409# CONFIG_RDS is not set
385# CONFIG_TIPC is not set 410# CONFIG_TIPC is not set
386# CONFIG_ATM is not set 411# CONFIG_ATM is not set
387# CONFIG_BRIDGE is not set 412# CONFIG_BRIDGE is not set
@@ -411,19 +436,17 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
411# CONFIG_AF_RXRPC is not set 436# CONFIG_AF_RXRPC is not set
412CONFIG_WIRELESS=y 437CONFIG_WIRELESS=y
413CONFIG_CFG80211=y 438CONFIG_CFG80211=y
439# CONFIG_NL80211_TESTMODE is not set
440# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set
414# CONFIG_CFG80211_REG_DEBUG is not set 441# CONFIG_CFG80211_REG_DEBUG is not set
442CONFIG_CFG80211_DEFAULT_PS=y
443CONFIG_CFG80211_DEFAULT_PS_VALUE=1
415# CONFIG_WIRELESS_OLD_REGULATORY is not set 444# CONFIG_WIRELESS_OLD_REGULATORY is not set
416CONFIG_WIRELESS_EXT=y 445CONFIG_WIRELESS_EXT=y
417CONFIG_WIRELESS_EXT_SYSFS=y 446CONFIG_WIRELESS_EXT_SYSFS=y
418CONFIG_LIB80211=m 447CONFIG_LIB80211=m
419# CONFIG_LIB80211_DEBUG is not set 448# CONFIG_LIB80211_DEBUG is not set
420CONFIG_MAC80211=y 449CONFIG_MAC80211=y
421CONFIG_MAC80211_DEFAULT_PS=y
422CONFIG_MAC80211_DEFAULT_PS_VALUE=1
423
424#
425# Rate control algorithm selection
426#
427CONFIG_MAC80211_RC_PID=y 450CONFIG_MAC80211_RC_PID=y
428# CONFIG_MAC80211_RC_MINSTREL is not set 451# CONFIG_MAC80211_RC_MINSTREL is not set
429CONFIG_MAC80211_RC_DEFAULT_PID=y 452CONFIG_MAC80211_RC_DEFAULT_PID=y
@@ -444,6 +467,7 @@ CONFIG_MAC80211_RC_DEFAULT="pid"
444# Generic Driver Options 467# Generic Driver Options
445# 468#
446CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 469CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
470# CONFIG_DEVTMPFS is not set
447CONFIG_STANDALONE=y 471CONFIG_STANDALONE=y
448CONFIG_PREVENT_FIRMWARE_BUILD=y 472CONFIG_PREVENT_FIRMWARE_BUILD=y
449CONFIG_FW_LOADER=y 473CONFIG_FW_LOADER=y
@@ -453,9 +477,9 @@ CONFIG_EXTRA_FIRMWARE=""
453# CONFIG_CONNECTOR is not set 477# CONFIG_CONNECTOR is not set
454CONFIG_MTD=y 478CONFIG_MTD=y
455# CONFIG_MTD_DEBUG is not set 479# CONFIG_MTD_DEBUG is not set
480# CONFIG_MTD_TESTS is not set
456CONFIG_MTD_CONCAT=y 481CONFIG_MTD_CONCAT=y
457CONFIG_MTD_PARTITIONS=y 482CONFIG_MTD_PARTITIONS=y
458# CONFIG_MTD_TESTS is not set
459# CONFIG_MTD_REDBOOT_PARTS is not set 483# CONFIG_MTD_REDBOOT_PARTS is not set
460# CONFIG_MTD_CMDLINE_PARTS is not set 484# CONFIG_MTD_CMDLINE_PARTS is not set
461# CONFIG_MTD_AR7_PARTS is not set 485# CONFIG_MTD_AR7_PARTS is not set
@@ -590,7 +614,6 @@ CONFIG_SCSI_WAIT_SCAN=m
590# CONFIG_SCSI_SRP_ATTRS is not set 614# CONFIG_SCSI_SRP_ATTRS is not set
591CONFIG_SCSI_LOWLEVEL=y 615CONFIG_SCSI_LOWLEVEL=y
592# CONFIG_ISCSI_TCP is not set 616# CONFIG_ISCSI_TCP is not set
593# CONFIG_SCSI_BNX2_ISCSI is not set
594# CONFIG_LIBFC is not set 617# CONFIG_LIBFC is not set
595# CONFIG_LIBFCOE is not set 618# CONFIG_LIBFCOE is not set
596# CONFIG_SCSI_DEBUG is not set 619# CONFIG_SCSI_DEBUG is not set
@@ -598,6 +621,7 @@ CONFIG_SCSI_LOWLEVEL=y
598# CONFIG_SCSI_OSD_INITIATOR is not set 621# CONFIG_SCSI_OSD_INITIATOR is not set
599CONFIG_ATA=y 622CONFIG_ATA=y
600# CONFIG_ATA_NONSTANDARD is not set 623# CONFIG_ATA_NONSTANDARD is not set
624CONFIG_ATA_VERBOSE_ERROR=y
601CONFIG_SATA_PMP=y 625CONFIG_SATA_PMP=y
602CONFIG_ATA_SFF=y 626CONFIG_ATA_SFF=y
603# CONFIG_SATA_MV is not set 627# CONFIG_SATA_MV is not set
@@ -631,10 +655,7 @@ CONFIG_MII=y
631# CONFIG_KS8842 is not set 655# CONFIG_KS8842 is not set
632# CONFIG_NETDEV_1000 is not set 656# CONFIG_NETDEV_1000 is not set
633# CONFIG_NETDEV_10000 is not set 657# CONFIG_NETDEV_10000 is not set
634 658CONFIG_WLAN=y
635#
636# Wireless LAN
637#
638# CONFIG_WLAN_PRE80211 is not set 659# CONFIG_WLAN_PRE80211 is not set
639CONFIG_WLAN_80211=y 660CONFIG_WLAN_80211=y
640CONFIG_LIBERTAS=m 661CONFIG_LIBERTAS=m
@@ -648,12 +669,13 @@ CONFIG_LIBERTAS_DEBUG=y
648# CONFIG_RTL8187 is not set 669# CONFIG_RTL8187 is not set
649# CONFIG_MAC80211_HWSIM is not set 670# CONFIG_MAC80211_HWSIM is not set
650# CONFIG_P54_COMMON is not set 671# CONFIG_P54_COMMON is not set
651# CONFIG_AR9170_USB is not set 672# CONFIG_ATH_COMMON is not set
652# CONFIG_HOSTAP is not set 673# CONFIG_HOSTAP is not set
653# CONFIG_B43 is not set 674# CONFIG_B43 is not set
654# CONFIG_B43LEGACY is not set 675# CONFIG_B43LEGACY is not set
655# CONFIG_ZD1211RW is not set 676# CONFIG_ZD1211RW is not set
656# CONFIG_RT2X00 is not set 677# CONFIG_RT2X00 is not set
678# CONFIG_WL12XX is not set
657# CONFIG_IWM is not set 679# CONFIG_IWM is not set
658 680
659# 681#
@@ -750,10 +772,20 @@ CONFIG_SERIAL_CORE_CONSOLE=y
750# CONFIG_TCG_TPM is not set 772# CONFIG_TCG_TPM is not set
751# CONFIG_I2C is not set 773# CONFIG_I2C is not set
752# CONFIG_SPI is not set 774# CONFIG_SPI is not set
775
776#
777# PPS support
778#
779# CONFIG_PPS is not set
753# CONFIG_W1 is not set 780# CONFIG_W1 is not set
754# CONFIG_POWER_SUPPLY is not set 781# CONFIG_POWER_SUPPLY is not set
755CONFIG_HWMON=y 782CONFIG_HWMON=y
756# CONFIG_HWMON_VID is not set 783# CONFIG_HWMON_VID is not set
784# CONFIG_HWMON_DEBUG_CHIP is not set
785
786#
787# Native drivers
788#
757# CONFIG_SENSORS_F71805F is not set 789# CONFIG_SENSORS_F71805F is not set
758# CONFIG_SENSORS_F71882FG is not set 790# CONFIG_SENSORS_F71882FG is not set
759# CONFIG_SENSORS_IT87 is not set 791# CONFIG_SENSORS_IT87 is not set
@@ -764,9 +796,7 @@ CONFIG_HWMON=y
764# CONFIG_SENSORS_VT1211 is not set 796# CONFIG_SENSORS_VT1211 is not set
765# CONFIG_SENSORS_W83627HF is not set 797# CONFIG_SENSORS_W83627HF is not set
766# CONFIG_SENSORS_W83627EHF is not set 798# CONFIG_SENSORS_W83627EHF is not set
767# CONFIG_HWMON_DEBUG_CHIP is not set
768# CONFIG_THERMAL is not set 799# CONFIG_THERMAL is not set
769# CONFIG_THERMAL_HWMON is not set
770# CONFIG_WATCHDOG is not set 800# CONFIG_WATCHDOG is not set
771CONFIG_SSB_POSSIBLE=y 801CONFIG_SSB_POSSIBLE=y
772 802
@@ -813,6 +843,7 @@ CONFIG_USB=y
813# CONFIG_USB_DEVICEFS is not set 843# CONFIG_USB_DEVICEFS is not set
814CONFIG_USB_DEVICE_CLASS=y 844CONFIG_USB_DEVICE_CLASS=y
815# CONFIG_USB_DYNAMIC_MINORS is not set 845# CONFIG_USB_DYNAMIC_MINORS is not set
846# CONFIG_USB_SUSPEND is not set
816# CONFIG_USB_OTG is not set 847# CONFIG_USB_OTG is not set
817# CONFIG_USB_OTG_WHITELIST is not set 848# CONFIG_USB_OTG_WHITELIST is not set
818# CONFIG_USB_OTG_BLACKLIST_HUB is not set 849# CONFIG_USB_OTG_BLACKLIST_HUB is not set
@@ -827,9 +858,9 @@ CONFIG_USB_MON=y
827# CONFIG_USB_OXU210HP_HCD is not set 858# CONFIG_USB_OXU210HP_HCD is not set
828# CONFIG_USB_ISP116X_HCD is not set 859# CONFIG_USB_ISP116X_HCD is not set
829# CONFIG_USB_ISP1760_HCD is not set 860# CONFIG_USB_ISP1760_HCD is not set
861# CONFIG_USB_ISP1362_HCD is not set
830# CONFIG_USB_SL811_HCD is not set 862# CONFIG_USB_SL811_HCD is not set
831CONFIG_USB_R8A66597_HCD=y 863CONFIG_USB_R8A66597_HCD=y
832# CONFIG_SUPERH_ON_CHIP_R8A66597 is not set
833# CONFIG_USB_HWA_HCD is not set 864# CONFIG_USB_HWA_HCD is not set
834 865
835# 866#
@@ -893,6 +924,7 @@ CONFIG_USB_STORAGE=y
893# CONFIG_USB_LD is not set 924# CONFIG_USB_LD is not set
894# CONFIG_USB_TRANCEVIBRATOR is not set 925# CONFIG_USB_TRANCEVIBRATOR is not set
895# CONFIG_USB_IOWARRIOR is not set 926# CONFIG_USB_IOWARRIOR is not set
927# CONFIG_USB_TEST is not set
896# CONFIG_USB_ISIGHTFW is not set 928# CONFIG_USB_ISIGHTFW is not set
897# CONFIG_USB_VST is not set 929# CONFIG_USB_VST is not set
898# CONFIG_USB_GADGET is not set 930# CONFIG_USB_GADGET is not set
@@ -917,6 +949,8 @@ CONFIG_MMC_BLOCK_BOUNCE=y
917# MMC/SD/SDIO Host Controller Drivers 949# MMC/SD/SDIO Host Controller Drivers
918# 950#
919# CONFIG_MMC_SDHCI is not set 951# CONFIG_MMC_SDHCI is not set
952# CONFIG_MMC_AT91 is not set
953# CONFIG_MMC_ATMELMCI is not set
920# CONFIG_MEMSTICK is not set 954# CONFIG_MEMSTICK is not set
921# CONFIG_NEW_LEDS is not set 955# CONFIG_NEW_LEDS is not set
922# CONFIG_ACCESSIBILITY is not set 956# CONFIG_ACCESSIBILITY is not set
@@ -949,8 +983,10 @@ CONFIG_FS_MBCACHE=y
949# CONFIG_JFS_FS is not set 983# CONFIG_JFS_FS is not set
950# CONFIG_FS_POSIX_ACL is not set 984# CONFIG_FS_POSIX_ACL is not set
951# CONFIG_XFS_FS is not set 985# CONFIG_XFS_FS is not set
986# CONFIG_GFS2_FS is not set
952# CONFIG_OCFS2_FS is not set 987# CONFIG_OCFS2_FS is not set
953# CONFIG_BTRFS_FS is not set 988# CONFIG_BTRFS_FS is not set
989# CONFIG_NILFS2_FS is not set
954CONFIG_FILE_LOCKING=y 990CONFIG_FILE_LOCKING=y
955CONFIG_FSNOTIFY=y 991CONFIG_FSNOTIFY=y
956CONFIG_DNOTIFY=y 992CONFIG_DNOTIFY=y
@@ -1014,7 +1050,6 @@ CONFIG_CRAMFS=y
1014# CONFIG_ROMFS_FS is not set 1050# CONFIG_ROMFS_FS is not set
1015# CONFIG_SYSV_FS is not set 1051# CONFIG_SYSV_FS is not set
1016# CONFIG_UFS_FS is not set 1052# CONFIG_UFS_FS is not set
1017# CONFIG_NILFS2_FS is not set
1018CONFIG_NETWORK_FILESYSTEMS=y 1053CONFIG_NETWORK_FILESYSTEMS=y
1019CONFIG_NFS_FS=y 1054CONFIG_NFS_FS=y
1020# CONFIG_NFS_V3 is not set 1055# CONFIG_NFS_V3 is not set
@@ -1091,6 +1126,7 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1091# CONFIG_ENABLE_MUST_CHECK is not set 1126# CONFIG_ENABLE_MUST_CHECK is not set
1092CONFIG_FRAME_WARN=1024 1127CONFIG_FRAME_WARN=1024
1093# CONFIG_MAGIC_SYSRQ is not set 1128# CONFIG_MAGIC_SYSRQ is not set
1129# CONFIG_STRIP_ASM_SYMS is not set
1094# CONFIG_UNUSED_SYMBOLS is not set 1130# CONFIG_UNUSED_SYMBOLS is not set
1095# CONFIG_DEBUG_FS is not set 1131# CONFIG_DEBUG_FS is not set
1096# CONFIG_HEADERS_CHECK is not set 1132# CONFIG_HEADERS_CHECK is not set
@@ -1103,8 +1139,11 @@ CONFIG_FRAME_WARN=1024
1103# CONFIG_LATENCYTOP is not set 1139# CONFIG_LATENCYTOP is not set
1104# CONFIG_SYSCTL_SYSCALL_CHECK is not set 1140# CONFIG_SYSCTL_SYSCALL_CHECK is not set
1105CONFIG_HAVE_FUNCTION_TRACER=y 1141CONFIG_HAVE_FUNCTION_TRACER=y
1142CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1143CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
1106CONFIG_HAVE_DYNAMIC_FTRACE=y 1144CONFIG_HAVE_DYNAMIC_FTRACE=y
1107CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1145CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1146CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
1108CONFIG_TRACING_SUPPORT=y 1147CONFIG_TRACING_SUPPORT=y
1109# CONFIG_FTRACE is not set 1148# CONFIG_FTRACE is not set
1110# CONFIG_DMA_API_DEBUG is not set 1149# CONFIG_DMA_API_DEBUG is not set
@@ -1112,6 +1151,7 @@ CONFIG_TRACING_SUPPORT=y
1112CONFIG_HAVE_ARCH_KGDB=y 1151CONFIG_HAVE_ARCH_KGDB=y
1113# CONFIG_SH_STANDARD_BIOS is not set 1152# CONFIG_SH_STANDARD_BIOS is not set
1114# CONFIG_EARLY_SCIF_CONSOLE is not set 1153# CONFIG_EARLY_SCIF_CONSOLE is not set
1154# CONFIG_DWARF_UNWINDER is not set
1115 1155
1116# 1156#
1117# Security options 1157# Security options
@@ -1125,7 +1165,6 @@ CONFIG_CRYPTO=y
1125# 1165#
1126# Crypto core or helper 1166# Crypto core or helper
1127# 1167#
1128# CONFIG_CRYPTO_FIPS is not set
1129CONFIG_CRYPTO_ALGAPI=y 1168CONFIG_CRYPTO_ALGAPI=y
1130CONFIG_CRYPTO_ALGAPI2=y 1169CONFIG_CRYPTO_ALGAPI2=y
1131CONFIG_CRYPTO_AEAD2=y 1170CONFIG_CRYPTO_AEAD2=y
@@ -1167,11 +1206,13 @@ CONFIG_CRYPTO_ECB=y
1167# 1206#
1168# CONFIG_CRYPTO_HMAC is not set 1207# CONFIG_CRYPTO_HMAC is not set
1169# CONFIG_CRYPTO_XCBC is not set 1208# CONFIG_CRYPTO_XCBC is not set
1209# CONFIG_CRYPTO_VMAC is not set
1170 1210
1171# 1211#
1172# Digest 1212# Digest
1173# 1213#
1174# CONFIG_CRYPTO_CRC32C is not set 1214# CONFIG_CRYPTO_CRC32C is not set
1215# CONFIG_CRYPTO_GHASH is not set
1175# CONFIG_CRYPTO_MD4 is not set 1216# CONFIG_CRYPTO_MD4 is not set
1176# CONFIG_CRYPTO_MD5 is not set 1217# CONFIG_CRYPTO_MD5 is not set
1177CONFIG_CRYPTO_MICHAEL_MIC=y 1218CONFIG_CRYPTO_MICHAEL_MIC=y
@@ -1235,5 +1276,6 @@ CONFIG_DECOMPRESS_GZIP=y
1235CONFIG_HAS_IOMEM=y 1276CONFIG_HAS_IOMEM=y
1236CONFIG_HAS_IOPORT=y 1277CONFIG_HAS_IOPORT=y
1237CONFIG_HAS_DMA=y 1278CONFIG_HAS_DMA=y
1279CONFIG_HAVE_LMB=y
1238CONFIG_NLATTR=y 1280CONFIG_NLATTR=y
1239CONFIG_GENERIC_ATOMIC64=y 1281CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/urquell_defconfig b/arch/sh/configs/urquell_defconfig
index ee1987e6cc59..9f8aee5bc559 100644
--- a/arch/sh/configs/urquell_defconfig
+++ b/arch/sh/configs/urquell_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.30 3# Linux kernel version: 2.6.31
4# Thu Jun 18 13:15:28 2009 4# Thu Sep 24 19:46:13 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -14,11 +14,13 @@ CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y 14CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
16CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_IRQ_PER_CPU=y
17CONFIG_GENERIC_GPIO=y 18CONFIG_GENERIC_GPIO=y
18CONFIG_GENERIC_TIME=y 19CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 20CONFIG_GENERIC_CLOCKEVENTS=y
20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 21# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
21CONFIG_ARCH_HIBERNATION_POSSIBLE=y 22CONFIG_ARCH_HIBERNATION_POSSIBLE=y
23CONFIG_SYS_SUPPORTS_SMP=y
22CONFIG_SYS_SUPPORTS_NUMA=y 24CONFIG_SYS_SUPPORTS_NUMA=y
23CONFIG_SYS_SUPPORTS_PCI=y 25CONFIG_SYS_SUPPORTS_PCI=y
24CONFIG_SYS_SUPPORTS_TMU=y 26CONFIG_SYS_SUPPORTS_TMU=y
@@ -29,7 +31,9 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y
29# CONFIG_ARCH_HAS_ILOG2_U64 is not set 31# CONFIG_ARCH_HAS_ILOG2_U64 is not set
30CONFIG_ARCH_NO_VIRT_TO_BUS=y 32CONFIG_ARCH_NO_VIRT_TO_BUS=y
31CONFIG_ARCH_HAS_DEFAULT_IDLE=y 33CONFIG_ARCH_HAS_DEFAULT_IDLE=y
34CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
32CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 35CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
36CONFIG_CONSTRUCTORS=y
33 37
34# 38#
35# General setup 39# General setup
@@ -39,6 +43,12 @@ CONFIG_BROKEN_ON_SMP=y
39CONFIG_INIT_ENV_ARG_LIMIT=32 43CONFIG_INIT_ENV_ARG_LIMIT=32
40CONFIG_LOCALVERSION="" 44CONFIG_LOCALVERSION=""
41CONFIG_LOCALVERSION_AUTO=y 45CONFIG_LOCALVERSION_AUTO=y
46CONFIG_HAVE_KERNEL_GZIP=y
47CONFIG_HAVE_KERNEL_BZIP2=y
48CONFIG_HAVE_KERNEL_LZMA=y
49CONFIG_KERNEL_GZIP=y
50# CONFIG_KERNEL_BZIP2 is not set
51# CONFIG_KERNEL_LZMA is not set
42CONFIG_SWAP=y 52CONFIG_SWAP=y
43CONFIG_SYSVIPC=y 53CONFIG_SYSVIPC=y
44CONFIG_SYSVIPC_SYSCTL=y 54CONFIG_SYSVIPC_SYSCTL=y
@@ -54,14 +64,12 @@ CONFIG_AUDIT_TREE=y
54# 64#
55# RCU Subsystem 65# RCU Subsystem
56# 66#
57# CONFIG_CLASSIC_RCU is not set
58CONFIG_TREE_RCU=y 67CONFIG_TREE_RCU=y
59# CONFIG_PREEMPT_RCU is not set 68# CONFIG_TREE_PREEMPT_RCU is not set
60# CONFIG_RCU_TRACE is not set 69# CONFIG_RCU_TRACE is not set
61CONFIG_RCU_FANOUT=32 70CONFIG_RCU_FANOUT=32
62# CONFIG_RCU_FANOUT_EXACT is not set 71# CONFIG_RCU_FANOUT_EXACT is not set
63# CONFIG_TREE_RCU_TRACE is not set 72# CONFIG_TREE_RCU_TRACE is not set
64# CONFIG_PREEMPT_RCU_TRACE is not set
65CONFIG_IKCONFIG=y 73CONFIG_IKCONFIG=y
66CONFIG_IKCONFIG_PROC=y 74CONFIG_IKCONFIG_PROC=y
67CONFIG_LOG_BUF_SHIFT=14 75CONFIG_LOG_BUF_SHIFT=14
@@ -111,20 +119,20 @@ CONFIG_TIMERFD=y
111CONFIG_EVENTFD=y 119CONFIG_EVENTFD=y
112CONFIG_SHMEM=y 120CONFIG_SHMEM=y
113CONFIG_AIO=y 121CONFIG_AIO=y
122CONFIG_HAVE_PERF_EVENTS=y
114 123
115# 124#
116# Performance Counters 125# Kernel Performance Events And Counters
117# 126#
127CONFIG_PERF_EVENTS=y
128# CONFIG_PERF_COUNTERS is not set
118CONFIG_VM_EVENT_COUNTERS=y 129CONFIG_VM_EVENT_COUNTERS=y
119CONFIG_PCI_QUIRKS=y 130CONFIG_PCI_QUIRKS=y
120# CONFIG_STRIP_ASM_SYMS is not set
121CONFIG_COMPAT_BRK=y 131CONFIG_COMPAT_BRK=y
122CONFIG_SLAB=y 132CONFIG_SLAB=y
123# CONFIG_SLUB is not set 133# CONFIG_SLUB is not set
124# CONFIG_SLOB is not set 134# CONFIG_SLOB is not set
125CONFIG_PROFILING=y 135CONFIG_PROFILING=y
126CONFIG_TRACEPOINTS=y
127CONFIG_MARKERS=y
128# CONFIG_OPROFILE is not set 136# CONFIG_OPROFILE is not set
129CONFIG_HAVE_OPROFILE=y 137CONFIG_HAVE_OPROFILE=y
130# CONFIG_KPROBES is not set 138# CONFIG_KPROBES is not set
@@ -134,6 +142,11 @@ CONFIG_HAVE_KRETPROBES=y
134CONFIG_HAVE_ARCH_TRACEHOOK=y 142CONFIG_HAVE_ARCH_TRACEHOOK=y
135CONFIG_HAVE_CLK=y 143CONFIG_HAVE_CLK=y
136CONFIG_HAVE_DMA_API_DEBUG=y 144CONFIG_HAVE_DMA_API_DEBUG=y
145
146#
147# GCOV-based kernel profiling
148#
149# CONFIG_GCOV_KERNEL is not set
137# CONFIG_SLOW_WORK is not set 150# CONFIG_SLOW_WORK is not set
138CONFIG_HAVE_GENERIC_DMA_COHERENT=y 151CONFIG_HAVE_GENERIC_DMA_COHERENT=y
139CONFIG_SLABINFO=y 152CONFIG_SLABINFO=y
@@ -146,7 +159,7 @@ CONFIG_MODULE_UNLOAD=y
146# CONFIG_MODVERSIONS is not set 159# CONFIG_MODVERSIONS is not set
147# CONFIG_MODULE_SRCVERSION_ALL is not set 160# CONFIG_MODULE_SRCVERSION_ALL is not set
148CONFIG_BLOCK=y 161CONFIG_BLOCK=y
149# CONFIG_LBD is not set 162CONFIG_LBDAF=y
150# CONFIG_BLK_DEV_BSG is not set 163# CONFIG_BLK_DEV_BSG is not set
151# CONFIG_BLK_DEV_INTEGRITY is not set 164# CONFIG_BLK_DEV_INTEGRITY is not set
152 165
@@ -195,6 +208,7 @@ CONFIG_CPU_SHX3=y
195# CONFIG_CPU_SUBTYPE_SH4_202 is not set 208# CONFIG_CPU_SUBTYPE_SH4_202 is not set
196# CONFIG_CPU_SUBTYPE_SH7723 is not set 209# CONFIG_CPU_SUBTYPE_SH7723 is not set
197# CONFIG_CPU_SUBTYPE_SH7724 is not set 210# CONFIG_CPU_SUBTYPE_SH7724 is not set
211# CONFIG_CPU_SUBTYPE_SH7757 is not set
198# CONFIG_CPU_SUBTYPE_SH7763 is not set 212# CONFIG_CPU_SUBTYPE_SH7763 is not set
199# CONFIG_CPU_SUBTYPE_SH7770 is not set 213# CONFIG_CPU_SUBTYPE_SH7770 is not set
200# CONFIG_CPU_SUBTYPE_SH7780 is not set 214# CONFIG_CPU_SUBTYPE_SH7780 is not set
@@ -244,7 +258,6 @@ CONFIG_SPARSEMEM=y
244CONFIG_HAVE_MEMORY_PRESENT=y 258CONFIG_HAVE_MEMORY_PRESENT=y
245CONFIG_SPARSEMEM_STATIC=y 259CONFIG_SPARSEMEM_STATIC=y
246# CONFIG_MEMORY_HOTPLUG is not set 260# CONFIG_MEMORY_HOTPLUG is not set
247CONFIG_PAGEFLAGS_EXTENDED=y
248CONFIG_SPLIT_PTLOCK_CPUS=4 261CONFIG_SPLIT_PTLOCK_CPUS=4
249CONFIG_MIGRATION=y 262CONFIG_MIGRATION=y
250# CONFIG_PHYS_ADDR_T_64BIT is not set 263# CONFIG_PHYS_ADDR_T_64BIT is not set
@@ -252,6 +265,7 @@ CONFIG_ZONE_DMA_FLAG=0
252CONFIG_NR_QUICK=2 265CONFIG_NR_QUICK=2
253CONFIG_HAVE_MLOCK=y 266CONFIG_HAVE_MLOCK=y
254CONFIG_HAVE_MLOCKED_PAGE_BIT=y 267CONFIG_HAVE_MLOCKED_PAGE_BIT=y
268# CONFIG_KSM is not set
255CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 269CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
256 270
257# 271#
@@ -322,6 +336,7 @@ CONFIG_SCHED_HRTICK=y
322CONFIG_KEXEC=y 336CONFIG_KEXEC=y
323# CONFIG_CRASH_DUMP is not set 337# CONFIG_CRASH_DUMP is not set
324CONFIG_SECCOMP=y 338CONFIG_SECCOMP=y
339# CONFIG_SMP is not set
325CONFIG_PREEMPT_NONE=y 340CONFIG_PREEMPT_NONE=y
326# CONFIG_PREEMPT_VOLUNTARY is not set 341# CONFIG_PREEMPT_VOLUNTARY is not set
327# CONFIG_PREEMPT is not set 342# CONFIG_PREEMPT is not set
@@ -334,7 +349,8 @@ CONFIG_SPARSE_IRQ=y
334CONFIG_ZERO_PAGE_OFFSET=0x00001000 349CONFIG_ZERO_PAGE_OFFSET=0x00001000
335CONFIG_BOOT_LINK_OFFSET=0x00800000 350CONFIG_BOOT_LINK_OFFSET=0x00800000
336CONFIG_ENTRY_OFFSET=0x00001000 351CONFIG_ENTRY_OFFSET=0x00001000
337# CONFIG_CMDLINE_BOOL is not set 352# CONFIG_CMDLINE_OVERWRITE is not set
353# CONFIG_CMDLINE_EXTEND is not set
338 354
339# 355#
340# Bus options 356# Bus options
@@ -343,6 +359,8 @@ CONFIG_PCI=y
343# CONFIG_SH_PCIDMA_NONCOHERENT is not set 359# CONFIG_SH_PCIDMA_NONCOHERENT is not set
344CONFIG_PCIEPORTBUS=y 360CONFIG_PCIEPORTBUS=y
345CONFIG_PCIEAER=y 361CONFIG_PCIEAER=y
362# CONFIG_PCIE_ECRC is not set
363# CONFIG_PCIEAER_INJECT is not set
346CONFIG_PCIEASPM=y 364CONFIG_PCIEASPM=y
347CONFIG_PCIEASPM_DEBUG=y 365CONFIG_PCIEASPM_DEBUG=y
348# CONFIG_ARCH_SUPPORTS_MSI is not set 366# CONFIG_ARCH_SUPPORTS_MSI is not set
@@ -367,6 +385,7 @@ CONFIG_BINFMT_MISC=y
367CONFIG_PM=y 385CONFIG_PM=y
368# CONFIG_PM_DEBUG is not set 386# CONFIG_PM_DEBUG is not set
369# CONFIG_HIBERNATION is not set 387# CONFIG_HIBERNATION is not set
388# CONFIG_PM_RUNTIME is not set
370CONFIG_CPU_IDLE=y 389CONFIG_CPU_IDLE=y
371CONFIG_CPU_IDLE_GOV_LADDER=y 390CONFIG_CPU_IDLE_GOV_LADDER=y
372CONFIG_NET=y 391CONFIG_NET=y
@@ -420,6 +439,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
420# CONFIG_NETFILTER is not set 439# CONFIG_NETFILTER is not set
421# CONFIG_IP_DCCP is not set 440# CONFIG_IP_DCCP is not set
422# CONFIG_IP_SCTP is not set 441# CONFIG_IP_SCTP is not set
442# CONFIG_RDS is not set
423# CONFIG_TIPC is not set 443# CONFIG_TIPC is not set
424# CONFIG_ATM is not set 444# CONFIG_ATM is not set
425# CONFIG_BRIDGE is not set 445# CONFIG_BRIDGE is not set
@@ -442,7 +462,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
442# Network testing 462# Network testing
443# 463#
444# CONFIG_NET_PKTGEN is not set 464# CONFIG_NET_PKTGEN is not set
445# CONFIG_NET_DROP_MONITOR is not set
446# CONFIG_HAMRADIO is not set 465# CONFIG_HAMRADIO is not set
447# CONFIG_CAN is not set 466# CONFIG_CAN is not set
448# CONFIG_IRDA is not set 467# CONFIG_IRDA is not set
@@ -450,6 +469,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
450# CONFIG_AF_RXRPC is not set 469# CONFIG_AF_RXRPC is not set
451CONFIG_WIRELESS=y 470CONFIG_WIRELESS=y
452# CONFIG_CFG80211 is not set 471# CONFIG_CFG80211 is not set
472CONFIG_CFG80211_DEFAULT_PS_VALUE=0
453# CONFIG_WIRELESS_OLD_REGULATORY is not set 473# CONFIG_WIRELESS_OLD_REGULATORY is not set
454CONFIG_WIRELESS_EXT=y 474CONFIG_WIRELESS_EXT=y
455CONFIG_WIRELESS_EXT_SYSFS=y 475CONFIG_WIRELESS_EXT_SYSFS=y
@@ -458,7 +478,6 @@ CONFIG_WIRELESS_EXT_SYSFS=y
458# 478#
459# CFG80211 needs to be enabled for MAC80211 479# CFG80211 needs to be enabled for MAC80211
460# 480#
461CONFIG_MAC80211_DEFAULT_PS_VALUE=0
462# CONFIG_WIMAX is not set 481# CONFIG_WIMAX is not set
463# CONFIG_RFKILL is not set 482# CONFIG_RFKILL is not set
464# CONFIG_NET_9P is not set 483# CONFIG_NET_9P is not set
@@ -471,6 +490,7 @@ CONFIG_MAC80211_DEFAULT_PS_VALUE=0
471# Generic Driver Options 490# Generic Driver Options
472# 491#
473CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 492CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
493# CONFIG_DEVTMPFS is not set
474CONFIG_STANDALONE=y 494CONFIG_STANDALONE=y
475CONFIG_PREVENT_FIRMWARE_BUILD=y 495CONFIG_PREVENT_FIRMWARE_BUILD=y
476# CONFIG_FW_LOADER is not set 496# CONFIG_FW_LOADER is not set
@@ -480,9 +500,9 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
480# CONFIG_CONNECTOR is not set 500# CONFIG_CONNECTOR is not set
481CONFIG_MTD=y 501CONFIG_MTD=y
482# CONFIG_MTD_DEBUG is not set 502# CONFIG_MTD_DEBUG is not set
503# CONFIG_MTD_TESTS is not set
483CONFIG_MTD_CONCAT=y 504CONFIG_MTD_CONCAT=y
484CONFIG_MTD_PARTITIONS=y 505CONFIG_MTD_PARTITIONS=y
485# CONFIG_MTD_TESTS is not set
486# CONFIG_MTD_REDBOOT_PARTS is not set 506# CONFIG_MTD_REDBOOT_PARTS is not set
487# CONFIG_MTD_CMDLINE_PARTS is not set 507# CONFIG_MTD_CMDLINE_PARTS is not set
488# CONFIG_MTD_AR7_PARTS is not set 508# CONFIG_MTD_AR7_PARTS is not set
@@ -620,6 +640,7 @@ CONFIG_SCSI_WAIT_SCAN=m
620# CONFIG_SCSI_OSD_INITIATOR is not set 640# CONFIG_SCSI_OSD_INITIATOR is not set
621CONFIG_ATA=y 641CONFIG_ATA=y
622# CONFIG_ATA_NONSTANDARD is not set 642# CONFIG_ATA_NONSTANDARD is not set
643CONFIG_ATA_VERBOSE_ERROR=y
623CONFIG_SATA_PMP=y 644CONFIG_SATA_PMP=y
624# CONFIG_SATA_AHCI is not set 645# CONFIG_SATA_AHCI is not set
625CONFIG_SATA_SIL24=y 646CONFIG_SATA_SIL24=y
@@ -641,6 +662,7 @@ CONFIG_ATA_SFF=y
641# CONFIG_PATA_ALI is not set 662# CONFIG_PATA_ALI is not set
642# CONFIG_PATA_AMD is not set 663# CONFIG_PATA_AMD is not set
643# CONFIG_PATA_ARTOP is not set 664# CONFIG_PATA_ARTOP is not set
665# CONFIG_PATA_ATP867X is not set
644# CONFIG_PATA_ATIIXP is not set 666# CONFIG_PATA_ATIIXP is not set
645# CONFIG_PATA_CMD640_PCI is not set 667# CONFIG_PATA_CMD640_PCI is not set
646# CONFIG_PATA_CMD64X is not set 668# CONFIG_PATA_CMD64X is not set
@@ -668,6 +690,7 @@ CONFIG_ATA_SFF=y
668# CONFIG_PATA_OPTIDMA is not set 690# CONFIG_PATA_OPTIDMA is not set
669# CONFIG_PATA_PDC_OLD is not set 691# CONFIG_PATA_PDC_OLD is not set
670# CONFIG_PATA_RADISYS is not set 692# CONFIG_PATA_RADISYS is not set
693# CONFIG_PATA_RDC is not set
671# CONFIG_PATA_RZ1000 is not set 694# CONFIG_PATA_RZ1000 is not set
672# CONFIG_PATA_SC1200 is not set 695# CONFIG_PATA_SC1200 is not set
673# CONFIG_PATA_SERVERWORKS is not set 696# CONFIG_PATA_SERVERWORKS is not set
@@ -686,7 +709,11 @@ CONFIG_ATA_SFF=y
686# 709#
687 710
688# 711#
689# Enable only one of the two stacks, unless you know what you are doing 712# You can enable one or both FireWire driver stacks.
713#
714
715#
716# See the help texts for more information.
690# 717#
691# CONFIG_FIREWIRE is not set 718# CONFIG_FIREWIRE is not set
692# CONFIG_IEEE1394 is not set 719# CONFIG_IEEE1394 is not set
@@ -782,6 +809,7 @@ CONFIG_SKY2_DEBUG=y
782# CONFIG_VIA_VELOCITY is not set 809# CONFIG_VIA_VELOCITY is not set
783# CONFIG_TIGON3 is not set 810# CONFIG_TIGON3 is not set
784# CONFIG_BNX2 is not set 811# CONFIG_BNX2 is not set
812# CONFIG_CNIC is not set
785# CONFIG_QLA3XXX is not set 813# CONFIG_QLA3XXX is not set
786# CONFIG_ATL1 is not set 814# CONFIG_ATL1 is not set
787# CONFIG_ATL1E is not set 815# CONFIG_ATL1E is not set
@@ -789,10 +817,7 @@ CONFIG_SKY2_DEBUG=y
789# CONFIG_JME is not set 817# CONFIG_JME is not set
790# CONFIG_NETDEV_10000 is not set 818# CONFIG_NETDEV_10000 is not set
791# CONFIG_TR is not set 819# CONFIG_TR is not set
792 820CONFIG_WLAN=y
793#
794# Wireless LAN
795#
796# CONFIG_WLAN_PRE80211 is not set 821# CONFIG_WLAN_PRE80211 is not set
797# CONFIG_WLAN_80211 is not set 822# CONFIG_WLAN_80211 is not set
798 823
@@ -842,14 +867,19 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
842# Input Device Drivers 867# Input Device Drivers
843# 868#
844CONFIG_INPUT_KEYBOARD=y 869CONFIG_INPUT_KEYBOARD=y
870# CONFIG_KEYBOARD_ADP5588 is not set
845# CONFIG_KEYBOARD_ATKBD is not set 871# CONFIG_KEYBOARD_ATKBD is not set
846# CONFIG_KEYBOARD_SUNKBD is not set 872# CONFIG_QT2160 is not set
847# CONFIG_KEYBOARD_LKKBD is not set 873# CONFIG_KEYBOARD_LKKBD is not set
848# CONFIG_KEYBOARD_XTKBD is not set 874# CONFIG_KEYBOARD_GPIO is not set
875# CONFIG_KEYBOARD_MATRIX is not set
876# CONFIG_KEYBOARD_MAX7359 is not set
849# CONFIG_KEYBOARD_NEWTON is not set 877# CONFIG_KEYBOARD_NEWTON is not set
878# CONFIG_KEYBOARD_OPENCORES is not set
850# CONFIG_KEYBOARD_STOWAWAY is not set 879# CONFIG_KEYBOARD_STOWAWAY is not set
851# CONFIG_KEYBOARD_GPIO is not set 880# CONFIG_KEYBOARD_SUNKBD is not set
852# CONFIG_KEYBOARD_SH_KEYSC is not set 881# CONFIG_KEYBOARD_SH_KEYSC is not set
882# CONFIG_KEYBOARD_XTKBD is not set
853# CONFIG_INPUT_MOUSE is not set 883# CONFIG_INPUT_MOUSE is not set
854# CONFIG_INPUT_JOYSTICK is not set 884# CONFIG_INPUT_JOYSTICK is not set
855# CONFIG_INPUT_TABLET is not set 885# CONFIG_INPUT_TABLET is not set
@@ -902,6 +932,7 @@ CONFIG_HW_RANDOM=y
902CONFIG_DEVPORT=y 932CONFIG_DEVPORT=y
903CONFIG_I2C=y 933CONFIG_I2C=y
904CONFIG_I2C_BOARDINFO=y 934CONFIG_I2C_BOARDINFO=y
935CONFIG_I2C_COMPAT=y
905# CONFIG_I2C_CHARDEV is not set 936# CONFIG_I2C_CHARDEV is not set
906CONFIG_I2C_HELPER_AUTO=y 937CONFIG_I2C_HELPER_AUTO=y
907CONFIG_I2C_ALGOPCA=y 938CONFIG_I2C_ALGOPCA=y
@@ -931,6 +962,7 @@ CONFIG_I2C_ALGOPCA=y
931# 962#
932# I2C system bus drivers (mostly embedded / system-on-chip) 963# I2C system bus drivers (mostly embedded / system-on-chip)
933# 964#
965# CONFIG_I2C_DESIGNWARE is not set
934# CONFIG_I2C_GPIO is not set 966# CONFIG_I2C_GPIO is not set
935# CONFIG_I2C_OCORES is not set 967# CONFIG_I2C_OCORES is not set
936# CONFIG_I2C_SH_MOBILE is not set 968# CONFIG_I2C_SH_MOBILE is not set
@@ -958,15 +990,17 @@ CONFIG_I2C_PCA_PLATFORM=y
958# Miscellaneous I2C Chip support 990# Miscellaneous I2C Chip support
959# 991#
960# CONFIG_DS1682 is not set 992# CONFIG_DS1682 is not set
961# CONFIG_SENSORS_PCF8574 is not set
962# CONFIG_PCF8575 is not set
963# CONFIG_SENSORS_PCA9539 is not set
964# CONFIG_SENSORS_TSL2550 is not set 993# CONFIG_SENSORS_TSL2550 is not set
965# CONFIG_I2C_DEBUG_CORE is not set 994# CONFIG_I2C_DEBUG_CORE is not set
966# CONFIG_I2C_DEBUG_ALGO is not set 995# CONFIG_I2C_DEBUG_ALGO is not set
967# CONFIG_I2C_DEBUG_BUS is not set 996# CONFIG_I2C_DEBUG_BUS is not set
968# CONFIG_I2C_DEBUG_CHIP is not set 997# CONFIG_I2C_DEBUG_CHIP is not set
969# CONFIG_SPI is not set 998# CONFIG_SPI is not set
999
1000#
1001# PPS support
1002#
1003# CONFIG_PPS is not set
970CONFIG_ARCH_REQUIRE_GPIOLIB=y 1004CONFIG_ARCH_REQUIRE_GPIOLIB=y
971CONFIG_GPIOLIB=y 1005CONFIG_GPIOLIB=y
972# CONFIG_DEBUG_GPIO is not set 1006# CONFIG_DEBUG_GPIO is not set
@@ -987,14 +1021,24 @@ CONFIG_GPIOLIB=y
987# PCI GPIO expanders: 1021# PCI GPIO expanders:
988# 1022#
989# CONFIG_GPIO_BT8XX is not set 1023# CONFIG_GPIO_BT8XX is not set
1024# CONFIG_GPIO_LANGWELL is not set
990 1025
991# 1026#
992# SPI GPIO expanders: 1027# SPI GPIO expanders:
993# 1028#
1029
1030#
1031# AC97 GPIO expanders:
1032#
994# CONFIG_W1 is not set 1033# CONFIG_W1 is not set
995# CONFIG_POWER_SUPPLY is not set 1034# CONFIG_POWER_SUPPLY is not set
996CONFIG_HWMON=y 1035CONFIG_HWMON=y
997# CONFIG_HWMON_VID is not set 1036# CONFIG_HWMON_VID is not set
1037# CONFIG_HWMON_DEBUG_CHIP is not set
1038
1039#
1040# Native drivers
1041#
998# CONFIG_SENSORS_AD7414 is not set 1042# CONFIG_SENSORS_AD7414 is not set
999# CONFIG_SENSORS_AD7418 is not set 1043# CONFIG_SENSORS_AD7418 is not set
1000# CONFIG_SENSORS_ADM1021 is not set 1044# CONFIG_SENSORS_ADM1021 is not set
@@ -1045,6 +1089,7 @@ CONFIG_HWMON=y
1045# CONFIG_SENSORS_ADS7828 is not set 1089# CONFIG_SENSORS_ADS7828 is not set
1046# CONFIG_SENSORS_THMC50 is not set 1090# CONFIG_SENSORS_THMC50 is not set
1047# CONFIG_SENSORS_TMP401 is not set 1091# CONFIG_SENSORS_TMP401 is not set
1092# CONFIG_SENSORS_TMP421 is not set
1048# CONFIG_SENSORS_VIA686A is not set 1093# CONFIG_SENSORS_VIA686A is not set
1049# CONFIG_SENSORS_VT1211 is not set 1094# CONFIG_SENSORS_VT1211 is not set
1050# CONFIG_SENSORS_VT8231 is not set 1095# CONFIG_SENSORS_VT8231 is not set
@@ -1056,9 +1101,7 @@ CONFIG_HWMON=y
1056# CONFIG_SENSORS_W83L786NG is not set 1101# CONFIG_SENSORS_W83L786NG is not set
1057# CONFIG_SENSORS_W83627HF is not set 1102# CONFIG_SENSORS_W83627HF is not set
1058# CONFIG_SENSORS_W83627EHF is not set 1103# CONFIG_SENSORS_W83627EHF is not set
1059# CONFIG_HWMON_DEBUG_CHIP is not set
1060# CONFIG_THERMAL is not set 1104# CONFIG_THERMAL is not set
1061CONFIG_THERMAL_HWMON=y
1062# CONFIG_WATCHDOG is not set 1105# CONFIG_WATCHDOG is not set
1063CONFIG_SSB_POSSIBLE=y 1106CONFIG_SSB_POSSIBLE=y
1064 1107
@@ -1079,8 +1122,10 @@ CONFIG_MFD_SM501=y
1079# CONFIG_MFD_TMIO is not set 1122# CONFIG_MFD_TMIO is not set
1080# CONFIG_PMIC_DA903X is not set 1123# CONFIG_PMIC_DA903X is not set
1081# CONFIG_MFD_WM8400 is not set 1124# CONFIG_MFD_WM8400 is not set
1125# CONFIG_MFD_WM831X is not set
1082# CONFIG_MFD_WM8350_I2C is not set 1126# CONFIG_MFD_WM8350_I2C is not set
1083# CONFIG_MFD_PCF50633 is not set 1127# CONFIG_MFD_PCF50633 is not set
1128# CONFIG_AB3100_CORE is not set
1084# CONFIG_REGULATOR is not set 1129# CONFIG_REGULATOR is not set
1085CONFIG_MEDIA_SUPPORT=y 1130CONFIG_MEDIA_SUPPORT=y
1086 1131
@@ -1099,6 +1144,7 @@ CONFIG_MEDIA_SUPPORT=y
1099# 1144#
1100# Graphics support 1145# Graphics support
1101# 1146#
1147CONFIG_VGA_ARB=y
1102# CONFIG_DRM is not set 1148# CONFIG_DRM is not set
1103# CONFIG_VGASTATE is not set 1149# CONFIG_VGASTATE is not set
1104# CONFIG_VIDEO_OUTPUT_CONTROL is not set 1150# CONFIG_VIDEO_OUTPUT_CONTROL is not set
@@ -1183,7 +1229,6 @@ CONFIG_LOGO_LINUX_CLUT224=y
1183# CONFIG_SOUND is not set 1229# CONFIG_SOUND is not set
1184CONFIG_HID_SUPPORT=y 1230CONFIG_HID_SUPPORT=y
1185CONFIG_HID=y 1231CONFIG_HID=y
1186# CONFIG_HID_DEBUG is not set
1187# CONFIG_HIDRAW is not set 1232# CONFIG_HIDRAW is not set
1188 1233
1189# 1234#
@@ -1206,6 +1251,7 @@ CONFIG_HID_CYPRESS=y
1206CONFIG_HID_EZKEY=y 1251CONFIG_HID_EZKEY=y
1207# CONFIG_HID_KYE is not set 1252# CONFIG_HID_KYE is not set
1208CONFIG_HID_GYRATION=y 1253CONFIG_HID_GYRATION=y
1254# CONFIG_HID_TWINHAN is not set
1209# CONFIG_HID_KENSINGTON is not set 1255# CONFIG_HID_KENSINGTON is not set
1210CONFIG_HID_LOGITECH=y 1256CONFIG_HID_LOGITECH=y
1211# CONFIG_LOGITECH_FF is not set 1257# CONFIG_LOGITECH_FF is not set
@@ -1255,6 +1301,7 @@ CONFIG_USB_MON=y
1255# CONFIG_USB_OXU210HP_HCD is not set 1301# CONFIG_USB_OXU210HP_HCD is not set
1256# CONFIG_USB_ISP116X_HCD is not set 1302# CONFIG_USB_ISP116X_HCD is not set
1257# CONFIG_USB_ISP1760_HCD is not set 1303# CONFIG_USB_ISP1760_HCD is not set
1304# CONFIG_USB_ISP1362_HCD is not set
1258CONFIG_USB_OHCI_HCD=y 1305CONFIG_USB_OHCI_HCD=y
1259# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set 1306# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
1260# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set 1307# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
@@ -1373,6 +1420,7 @@ CONFIG_RTC_INTF_DEV=y
1373# CONFIG_RTC_DRV_S35390A is not set 1420# CONFIG_RTC_DRV_S35390A is not set
1374# CONFIG_RTC_DRV_FM3130 is not set 1421# CONFIG_RTC_DRV_FM3130 is not set
1375# CONFIG_RTC_DRV_RX8581 is not set 1422# CONFIG_RTC_DRV_RX8581 is not set
1423# CONFIG_RTC_DRV_RX8025 is not set
1376 1424
1377# 1425#
1378# SPI RTC drivers 1426# SPI RTC drivers
@@ -1422,6 +1470,7 @@ CONFIG_EXT4_FS=y
1422CONFIG_EXT4_FS_XATTR=y 1470CONFIG_EXT4_FS_XATTR=y
1423# CONFIG_EXT4_FS_POSIX_ACL is not set 1471# CONFIG_EXT4_FS_POSIX_ACL is not set
1424# CONFIG_EXT4_FS_SECURITY is not set 1472# CONFIG_EXT4_FS_SECURITY is not set
1473# CONFIG_EXT4_DEBUG is not set
1425CONFIG_JBD=y 1474CONFIG_JBD=y
1426# CONFIG_JBD_DEBUG is not set 1475# CONFIG_JBD_DEBUG is not set
1427CONFIG_JBD2=y 1476CONFIG_JBD2=y
@@ -1431,9 +1480,11 @@ CONFIG_FS_MBCACHE=y
1431# CONFIG_JFS_FS is not set 1480# CONFIG_JFS_FS is not set
1432# CONFIG_FS_POSIX_ACL is not set 1481# CONFIG_FS_POSIX_ACL is not set
1433# CONFIG_XFS_FS is not set 1482# CONFIG_XFS_FS is not set
1483# CONFIG_GFS2_FS is not set
1434# CONFIG_OCFS2_FS is not set 1484# CONFIG_OCFS2_FS is not set
1435CONFIG_BTRFS_FS=y 1485CONFIG_BTRFS_FS=y
1436# CONFIG_BTRFS_FS_POSIX_ACL is not set 1486# CONFIG_BTRFS_FS_POSIX_ACL is not set
1487# CONFIG_NILFS2_FS is not set
1437CONFIG_FILE_LOCKING=y 1488CONFIG_FILE_LOCKING=y
1438CONFIG_FSNOTIFY=y 1489CONFIG_FSNOTIFY=y
1439CONFIG_DNOTIFY=y 1490CONFIG_DNOTIFY=y
@@ -1499,12 +1550,12 @@ CONFIG_MISC_FILESYSTEMS=y
1499# CONFIG_ROMFS_FS is not set 1550# CONFIG_ROMFS_FS is not set
1500# CONFIG_SYSV_FS is not set 1551# CONFIG_SYSV_FS is not set
1501# CONFIG_UFS_FS is not set 1552# CONFIG_UFS_FS is not set
1502# CONFIG_NILFS2_FS is not set
1503CONFIG_NETWORK_FILESYSTEMS=y 1553CONFIG_NETWORK_FILESYSTEMS=y
1504CONFIG_NFS_FS=y 1554CONFIG_NFS_FS=y
1505CONFIG_NFS_V3=y 1555CONFIG_NFS_V3=y
1506# CONFIG_NFS_V3_ACL is not set 1556# CONFIG_NFS_V3_ACL is not set
1507CONFIG_NFS_V4=y 1557CONFIG_NFS_V4=y
1558# CONFIG_NFS_V4_1 is not set
1508CONFIG_ROOT_NFS=y 1559CONFIG_ROOT_NFS=y
1509# CONFIG_NFSD is not set 1560# CONFIG_NFSD is not set
1510CONFIG_LOCKD=y 1561CONFIG_LOCKD=y
@@ -1576,6 +1627,7 @@ CONFIG_PRINTK_TIME=y
1576# CONFIG_ENABLE_MUST_CHECK is not set 1627# CONFIG_ENABLE_MUST_CHECK is not set
1577CONFIG_FRAME_WARN=1024 1628CONFIG_FRAME_WARN=1024
1578# CONFIG_MAGIC_SYSRQ is not set 1629# CONFIG_MAGIC_SYSRQ is not set
1630# CONFIG_STRIP_ASM_SYMS is not set
1579# CONFIG_UNUSED_SYMBOLS is not set 1631# CONFIG_UNUSED_SYMBOLS is not set
1580CONFIG_DEBUG_FS=y 1632CONFIG_DEBUG_FS=y
1581# CONFIG_HEADERS_CHECK is not set 1633# CONFIG_HEADERS_CHECK is not set
@@ -1610,18 +1662,23 @@ CONFIG_DEBUG_INFO=y
1610# CONFIG_DEBUG_LIST is not set 1662# CONFIG_DEBUG_LIST is not set
1611# CONFIG_DEBUG_SG is not set 1663# CONFIG_DEBUG_SG is not set
1612# CONFIG_DEBUG_NOTIFIERS is not set 1664# CONFIG_DEBUG_NOTIFIERS is not set
1665# CONFIG_DEBUG_CREDENTIALS is not set
1613CONFIG_FRAME_POINTER=y 1666CONFIG_FRAME_POINTER=y
1614# CONFIG_RCU_TORTURE_TEST is not set 1667# CONFIG_RCU_TORTURE_TEST is not set
1615# CONFIG_RCU_CPU_STALL_DETECTOR is not set 1668# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1616# CONFIG_BACKTRACE_SELF_TEST is not set 1669# CONFIG_BACKTRACE_SELF_TEST is not set
1617# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set 1670# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
1671# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
1618# CONFIG_FAULT_INJECTION is not set 1672# CONFIG_FAULT_INJECTION is not set
1619# CONFIG_LATENCYTOP is not set 1673# CONFIG_LATENCYTOP is not set
1620CONFIG_SYSCTL_SYSCALL_CHECK=y 1674CONFIG_SYSCTL_SYSCALL_CHECK=y
1621# CONFIG_PAGE_POISONING is not set 1675# CONFIG_PAGE_POISONING is not set
1622CONFIG_HAVE_FUNCTION_TRACER=y 1676CONFIG_HAVE_FUNCTION_TRACER=y
1677CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1678CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
1623CONFIG_HAVE_DYNAMIC_FTRACE=y 1679CONFIG_HAVE_DYNAMIC_FTRACE=y
1624CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1680CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1681CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
1625CONFIG_TRACING_SUPPORT=y 1682CONFIG_TRACING_SUPPORT=y
1626# CONFIG_FTRACE is not set 1683# CONFIG_FTRACE is not set
1627# CONFIG_DYNAMIC_DEBUG is not set 1684# CONFIG_DYNAMIC_DEBUG is not set
@@ -1633,11 +1690,11 @@ CONFIG_HAVE_ARCH_KGDB=y
1633CONFIG_EARLY_SCIF_CONSOLE=y 1690CONFIG_EARLY_SCIF_CONSOLE=y
1634CONFIG_EARLY_SCIF_CONSOLE_PORT=0xffeb0000 1691CONFIG_EARLY_SCIF_CONSOLE_PORT=0xffeb0000
1635CONFIG_EARLY_PRINTK=y 1692CONFIG_EARLY_PRINTK=y
1636# CONFIG_DEBUG_BOOTMEM is not set 1693# CONFIG_STACK_DEBUG is not set
1637# CONFIG_DEBUG_STACKOVERFLOW is not set
1638# CONFIG_DEBUG_STACK_USAGE is not set 1694# CONFIG_DEBUG_STACK_USAGE is not set
1639# CONFIG_4KSTACKS is not set 1695# CONFIG_4KSTACKS is not set
1640# CONFIG_DUMP_CODE is not set 1696# CONFIG_DUMP_CODE is not set
1697# CONFIG_DWARF_UNWINDER is not set
1641# CONFIG_SH_NO_BSS_INIT is not set 1698# CONFIG_SH_NO_BSS_INIT is not set
1642 1699
1643# 1700#
@@ -1652,7 +1709,6 @@ CONFIG_CRYPTO=y
1652# 1709#
1653# Crypto core or helper 1710# Crypto core or helper
1654# 1711#
1655# CONFIG_CRYPTO_FIPS is not set
1656CONFIG_CRYPTO_ALGAPI=y 1712CONFIG_CRYPTO_ALGAPI=y
1657CONFIG_CRYPTO_ALGAPI2=y 1713CONFIG_CRYPTO_ALGAPI2=y
1658CONFIG_CRYPTO_AEAD2=y 1714CONFIG_CRYPTO_AEAD2=y
@@ -1694,11 +1750,13 @@ CONFIG_CRYPTO_CBC=y
1694# 1750#
1695CONFIG_CRYPTO_HMAC=y 1751CONFIG_CRYPTO_HMAC=y
1696# CONFIG_CRYPTO_XCBC is not set 1752# CONFIG_CRYPTO_XCBC is not set
1753# CONFIG_CRYPTO_VMAC is not set
1697 1754
1698# 1755#
1699# Digest 1756# Digest
1700# 1757#
1701CONFIG_CRYPTO_CRC32C=y 1758CONFIG_CRYPTO_CRC32C=y
1759# CONFIG_CRYPTO_GHASH is not set
1702# CONFIG_CRYPTO_MD4 is not set 1760# CONFIG_CRYPTO_MD4 is not set
1703CONFIG_CRYPTO_MD5=y 1761CONFIG_CRYPTO_MD5=y
1704# CONFIG_CRYPTO_MICHAEL_MIC is not set 1762# CONFIG_CRYPTO_MICHAEL_MIC is not set
@@ -1764,5 +1822,6 @@ CONFIG_DECOMPRESS_GZIP=y
1764CONFIG_HAS_IOMEM=y 1822CONFIG_HAS_IOMEM=y
1765CONFIG_HAS_IOPORT=y 1823CONFIG_HAS_IOPORT=y
1766CONFIG_HAS_DMA=y 1824CONFIG_HAS_DMA=y
1825CONFIG_HAVE_LMB=y
1767CONFIG_NLATTR=y 1826CONFIG_NLATTR=y
1768CONFIG_GENERIC_ATOMIC64=y 1827CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/drivers/dma/Kconfig b/arch/sh/drivers/dma/Kconfig
index 63e9dd30b41c..4d58eb0973d4 100644
--- a/arch/sh/drivers/dma/Kconfig
+++ b/arch/sh/drivers/dma/Kconfig
@@ -1,12 +1,9 @@
1menu "DMA support" 1menu "DMA support"
2 2
3config SH_DMA_API
4 bool
5 3
6config SH_DMA 4config SH_DMA
7 bool "SuperH on-chip DMA controller (DMAC) support" 5 bool "SuperH on-chip DMA controller (DMAC) support"
8 depends on CPU_SH3 || CPU_SH4 6 depends on CPU_SH3 || CPU_SH4
9 select SH_DMA_API
10 default n 7 default n
11 8
12config SH_DMA_IRQ_MULTI 9config SH_DMA_IRQ_MULTI
@@ -19,6 +16,15 @@ config SH_DMA_IRQ_MULTI
19 CPU_SUBTYPE_SH7780 || CPU_SUBTYPE_SH7785 || \ 16 CPU_SUBTYPE_SH7780 || CPU_SUBTYPE_SH7785 || \
20 CPU_SUBTYPE_SH7760 17 CPU_SUBTYPE_SH7760
21 18
19config SH_DMA_API
20 depends on SH_DMA
21 bool "SuperH DMA API support"
22 default n
23 help
24 SH_DMA_API always enabled DMA API of used SuperH.
25 If you want to use DMA ENGINE, you must not enable this.
26 Please enable DMA_ENGINE and SH_DMAE.
27
22config NR_ONCHIP_DMA_CHANNELS 28config NR_ONCHIP_DMA_CHANNELS
23 int 29 int
24 depends on SH_DMA 30 depends on SH_DMA
@@ -27,12 +33,12 @@ config NR_ONCHIP_DMA_CHANNELS
27 default "8" if CPU_SUBTYPE_SH7750R || CPU_SUBTYPE_SH7751R || \ 33 default "8" if CPU_SUBTYPE_SH7750R || CPU_SUBTYPE_SH7751R || \
28 CPU_SUBTYPE_SH7760 34 CPU_SUBTYPE_SH7760
29 default "12" if CPU_SUBTYPE_SH7723 || CPU_SUBTYPE_SH7780 || \ 35 default "12" if CPU_SUBTYPE_SH7723 || CPU_SUBTYPE_SH7780 || \
30 CPU_SUBTYPE_SH7785 36 CPU_SUBTYPE_SH7785 || CPU_SUBTYPE_SH7724
31 default "6" 37 default "6"
32 help 38 help
33 This allows you to specify the number of channels that the on-chip 39 This allows you to specify the number of channels that the on-chip
34 DMAC supports. This will be 4 for SH7091/SH7750/SH7751 and 8 for the 40 DMAC supports. This will be 4 for SH7750/SH7751/Sh7750S/SH7091 and 8 for the
35 SH7750R/SH7751R. 41 SH7750R/SH7751R/SH7760, 12 for the SH7723/SH7780/SH7785/SH7724, default is 6.
36 42
37config NR_DMA_CHANNELS_BOOL 43config NR_DMA_CHANNELS_BOOL
38 depends on SH_DMA 44 depends on SH_DMA
diff --git a/arch/sh/drivers/dma/Makefile b/arch/sh/drivers/dma/Makefile
index c6068137b46f..d88c9484762c 100644
--- a/arch/sh/drivers/dma/Makefile
+++ b/arch/sh/drivers/dma/Makefile
@@ -2,8 +2,7 @@
2# Makefile for the SuperH DMA specific kernel interface routines under Linux. 2# Makefile for the SuperH DMA specific kernel interface routines under Linux.
3# 3#
4 4
5obj-$(CONFIG_SH_DMA_API) += dma-api.o dma-sysfs.o 5obj-$(CONFIG_SH_DMA_API) += dma-sh.o dma-api.o dma-sysfs.o
6obj-$(CONFIG_SH_DMA) += dma-sh.o
7obj-$(CONFIG_PVR2_DMA) += dma-pvr2.o 6obj-$(CONFIG_PVR2_DMA) += dma-pvr2.o
8obj-$(CONFIG_G2_DMA) += dma-g2.o 7obj-$(CONFIG_G2_DMA) += dma-g2.o
9obj-$(CONFIG_SH_DMABRG) += dmabrg.o 8obj-$(CONFIG_SH_DMABRG) += dmabrg.o
diff --git a/arch/sh/drivers/heartbeat.c b/arch/sh/drivers/heartbeat.c
index 938817e34e2b..a9339a6174fc 100644
--- a/arch/sh/drivers/heartbeat.c
+++ b/arch/sh/drivers/heartbeat.c
@@ -40,14 +40,19 @@ static inline void heartbeat_toggle_bit(struct heartbeat_data *hd,
40 if (inverted) 40 if (inverted)
41 new = ~new; 41 new = ~new;
42 42
43 new &= hd->mask;
44
43 switch (hd->regsize) { 45 switch (hd->regsize) {
44 case 32: 46 case 32:
47 new |= ioread32(hd->base) & ~hd->mask;
45 iowrite32(new, hd->base); 48 iowrite32(new, hd->base);
46 break; 49 break;
47 case 16: 50 case 16:
51 new |= ioread16(hd->base) & ~hd->mask;
48 iowrite16(new, hd->base); 52 iowrite16(new, hd->base);
49 break; 53 break;
50 default: 54 default:
55 new |= ioread8(hd->base) & ~hd->mask;
51 iowrite8(new, hd->base); 56 iowrite8(new, hd->base);
52 break; 57 break;
53 } 58 }
@@ -72,6 +77,7 @@ static int heartbeat_drv_probe(struct platform_device *pdev)
72{ 77{
73 struct resource *res; 78 struct resource *res;
74 struct heartbeat_data *hd; 79 struct heartbeat_data *hd;
80 int i;
75 81
76 if (unlikely(pdev->num_resources != 1)) { 82 if (unlikely(pdev->num_resources != 1)) {
77 dev_err(&pdev->dev, "invalid number of resources\n"); 83 dev_err(&pdev->dev, "invalid number of resources\n");
@@ -107,6 +113,10 @@ static int heartbeat_drv_probe(struct platform_device *pdev)
107 hd->nr_bits = ARRAY_SIZE(default_bit_pos); 113 hd->nr_bits = ARRAY_SIZE(default_bit_pos);
108 } 114 }
109 115
116 hd->mask = 0;
117 for (i = 0; i < hd->nr_bits; i++)
118 hd->mask |= (1 << hd->bit_pos[i]);
119
110 if (!hd->regsize) 120 if (!hd->regsize)
111 hd->regsize = 8; /* default access size */ 121 hd->regsize = 8; /* default access size */
112 122
diff --git a/arch/sh/drivers/pci/pci.c b/arch/sh/drivers/pci/pci.c
index 9a1c423ad167..c481df639022 100644
--- a/arch/sh/drivers/pci/pci.c
+++ b/arch/sh/drivers/pci/pci.c
@@ -295,6 +295,8 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
295 vma->vm_page_prot); 295 vma->vm_page_prot);
296} 296}
297 297
298#ifndef CONFIG_GENERIC_IOMAP
299
298static void __iomem *ioport_map_pci(struct pci_dev *dev, 300static void __iomem *ioport_map_pci(struct pci_dev *dev,
299 unsigned long port, unsigned int nr) 301 unsigned long port, unsigned int nr)
300{ 302{
@@ -346,6 +348,8 @@ void pci_iounmap(struct pci_dev *dev, void __iomem *addr)
346} 348}
347EXPORT_SYMBOL(pci_iounmap); 349EXPORT_SYMBOL(pci_iounmap);
348 350
351#endif /* CONFIG_GENERIC_IOMAP */
352
349#ifdef CONFIG_HOTPLUG 353#ifdef CONFIG_HOTPLUG
350EXPORT_SYMBOL(pcibios_resource_to_bus); 354EXPORT_SYMBOL(pcibios_resource_to_bus);
351EXPORT_SYMBOL(pcibios_bus_to_resource); 355EXPORT_SYMBOL(pcibios_bus_to_resource);
diff --git a/arch/sh/include/asm/Kbuild b/arch/sh/include/asm/Kbuild
index 43910cdf78a5..e121c30f797d 100644
--- a/arch/sh/include/asm/Kbuild
+++ b/arch/sh/include/asm/Kbuild
@@ -1,6 +1,6 @@
1include include/asm-generic/Kbuild.asm 1include include/asm-generic/Kbuild.asm
2 2
3header-y += cpu-features.h 3header-y += cachectl.h cpu-features.h
4 4
5unifdef-y += unistd_32.h 5unifdef-y += unistd_32.h
6unifdef-y += unistd_64.h 6unifdef-y += unistd_64.h
diff --git a/arch/sh/include/asm/bug.h b/arch/sh/include/asm/bug.h
index c01718040166..d02c01b3e6b9 100644
--- a/arch/sh/include/asm/bug.h
+++ b/arch/sh/include/asm/bug.h
@@ -2,6 +2,7 @@
2#define __ASM_SH_BUG_H 2#define __ASM_SH_BUG_H
3 3
4#define TRAPA_BUG_OPCODE 0xc33e /* trapa #0x3e */ 4#define TRAPA_BUG_OPCODE 0xc33e /* trapa #0x3e */
5#define BUGFLAG_UNWINDER (1 << 1)
5 6
6#ifdef CONFIG_GENERIC_BUG 7#ifdef CONFIG_GENERIC_BUG
7#define HAVE_ARCH_BUG 8#define HAVE_ARCH_BUG
@@ -72,6 +73,36 @@ do { \
72 unlikely(__ret_warn_on); \ 73 unlikely(__ret_warn_on); \
73}) 74})
74 75
76#define UNWINDER_BUG() \
77do { \
78 __asm__ __volatile__ ( \
79 "1:\t.short %O0\n" \
80 _EMIT_BUG_ENTRY \
81 : \
82 : "n" (TRAPA_BUG_OPCODE), \
83 "i" (__FILE__), \
84 "i" (__LINE__), \
85 "i" (BUGFLAG_UNWINDER), \
86 "i" (sizeof(struct bug_entry))); \
87} while (0)
88
89#define UNWINDER_BUG_ON(x) ({ \
90 int __ret_unwinder_on = !!(x); \
91 if (__builtin_constant_p(__ret_unwinder_on)) { \
92 if (__ret_unwinder_on) \
93 UNWINDER_BUG(); \
94 } else { \
95 if (unlikely(__ret_unwinder_on)) \
96 UNWINDER_BUG(); \
97 } \
98 unlikely(__ret_unwinder_on); \
99})
100
101#else
102
103#define UNWINDER_BUG BUG
104#define UNWINDER_BUG_ON BUG_ON
105
75#endif /* CONFIG_GENERIC_BUG */ 106#endif /* CONFIG_GENERIC_BUG */
76 107
77#include <asm-generic/bug.h> 108#include <asm-generic/bug.h>
diff --git a/arch/sh/include/asm/bugs.h b/arch/sh/include/asm/bugs.h
index 4924ff6f5439..46260fcbdf4b 100644
--- a/arch/sh/include/asm/bugs.h
+++ b/arch/sh/include/asm/bugs.h
@@ -21,25 +21,25 @@ static void __init check_bugs(void)
21 21
22 current_cpu_data.loops_per_jiffy = loops_per_jiffy; 22 current_cpu_data.loops_per_jiffy = loops_per_jiffy;
23 23
24 switch (current_cpu_data.type) { 24 switch (current_cpu_data.family) {
25 case CPU_SH7619: 25 case CPU_FAMILY_SH2:
26 *p++ = '2'; 26 *p++ = '2';
27 break; 27 break;
28 case CPU_SH7201 ... CPU_MXG: 28 case CPU_FAMILY_SH2A:
29 *p++ = '2'; 29 *p++ = '2';
30 *p++ = 'a'; 30 *p++ = 'a';
31 break; 31 break;
32 case CPU_SH7705 ... CPU_SH7729: 32 case CPU_FAMILY_SH3:
33 *p++ = '3'; 33 *p++ = '3';
34 break; 34 break;
35 case CPU_SH7750 ... CPU_SH4_501: 35 case CPU_FAMILY_SH4:
36 *p++ = '4'; 36 *p++ = '4';
37 break; 37 break;
38 case CPU_SH7763 ... CPU_SHX3: 38 case CPU_FAMILY_SH4A:
39 *p++ = '4'; 39 *p++ = '4';
40 *p++ = 'a'; 40 *p++ = 'a';
41 break; 41 break;
42 case CPU_SH7343 ... CPU_SH7366: 42 case CPU_FAMILY_SH4AL_DSP:
43 *p++ = '4'; 43 *p++ = '4';
44 *p++ = 'a'; 44 *p++ = 'a';
45 *p++ = 'l'; 45 *p++ = 'l';
@@ -48,15 +48,15 @@ static void __init check_bugs(void)
48 *p++ = 's'; 48 *p++ = 's';
49 *p++ = 'p'; 49 *p++ = 'p';
50 break; 50 break;
51 case CPU_SH5_101 ... CPU_SH5_103: 51 case CPU_FAMILY_SH5:
52 *p++ = '6'; 52 *p++ = '6';
53 *p++ = '4'; 53 *p++ = '4';
54 break; 54 break;
55 case CPU_SH_NONE: 55 case CPU_FAMILY_UNKNOWN:
56 /* 56 /*
57 * Specifically use CPU_SH_NONE rather than default:, 57 * Specifically use CPU_FAMILY_UNKNOWN rather than
58 * so we're able to have the compiler whine about 58 * default:, so we're able to have the compiler whine
59 * unhandled enumerations. 59 * about unhandled enumerations.
60 */ 60 */
61 break; 61 break;
62 } 62 }
diff --git a/arch/sh/include/asm/cachectl.h b/arch/sh/include/asm/cachectl.h
new file mode 100644
index 000000000000..6ffb4b7a212e
--- /dev/null
+++ b/arch/sh/include/asm/cachectl.h
@@ -0,0 +1,19 @@
1#ifndef _SH_CACHECTL_H
2#define _SH_CACHECTL_H
3
4/* Definitions for the cacheflush system call. */
5
6#define CACHEFLUSH_D_INVAL 0x1 /* invalidate (without write back) */
7#define CACHEFLUSH_D_WB 0x2 /* write back (without invalidate) */
8#define CACHEFLUSH_D_PURGE 0x3 /* writeback and invalidate */
9
10#define CACHEFLUSH_I 0x4
11
12/*
13 * Options for cacheflush system call
14 */
15#define ICACHE CACHEFLUSH_I /* flush instruction cache */
16#define DCACHE CACHEFLUSH_D_PURGE /* writeback and flush data cache */
17#define BCACHE (ICACHE|DCACHE) /* flush both caches */
18
19#endif /* _SH_CACHECTL_H */
diff --git a/arch/sh/include/asm/cacheflush.h b/arch/sh/include/asm/cacheflush.h
index 4c5462daa74c..c29918f3c819 100644
--- a/arch/sh/include/asm/cacheflush.h
+++ b/arch/sh/include/asm/cacheflush.h
@@ -3,45 +3,65 @@
3 3
4#ifdef __KERNEL__ 4#ifdef __KERNEL__
5 5
6#ifdef CONFIG_CACHE_OFF 6#include <linux/mm.h>
7
7/* 8/*
8 * Nothing to do when the cache is disabled, initial flush and explicit 9 * Cache flushing:
9 * disabling is handled at CPU init time. 10 *
11 * - flush_cache_all() flushes entire cache
12 * - flush_cache_mm(mm) flushes the specified mm context's cache lines
13 * - flush_cache_dup mm(mm) handles cache flushing when forking
14 * - flush_cache_page(mm, vmaddr, pfn) flushes a single page
15 * - flush_cache_range(vma, start, end) flushes a range of pages
10 * 16 *
11 * See arch/sh/kernel/cpu/init.c:cache_init(). 17 * - flush_dcache_page(pg) flushes(wback&invalidates) a page for dcache
18 * - flush_icache_range(start, end) flushes(invalidates) a range for icache
19 * - flush_icache_page(vma, pg) flushes(invalidates) a page for icache
20 * - flush_cache_sigtramp(vaddr) flushes the signal trampoline
12 */ 21 */
13#define p3_cache_init() do { } while (0) 22extern void (*local_flush_cache_all)(void *args);
14#define flush_cache_all() do { } while (0) 23extern void (*local_flush_cache_mm)(void *args);
15#define flush_cache_mm(mm) do { } while (0) 24extern void (*local_flush_cache_dup_mm)(void *args);
16#define flush_cache_dup_mm(mm) do { } while (0) 25extern void (*local_flush_cache_page)(void *args);
17#define flush_cache_range(vma, start, end) do { } while (0) 26extern void (*local_flush_cache_range)(void *args);
18#define flush_cache_page(vma, vmaddr, pfn) do { } while (0) 27extern void (*local_flush_dcache_page)(void *args);
19#define flush_dcache_page(page) do { } while (0) 28extern void (*local_flush_icache_range)(void *args);
20#define flush_icache_range(start, end) do { } while (0) 29extern void (*local_flush_icache_page)(void *args);
21#define flush_icache_page(vma,pg) do { } while (0) 30extern void (*local_flush_cache_sigtramp)(void *args);
22#define flush_dcache_mmap_lock(mapping) do { } while (0)
23#define flush_dcache_mmap_unlock(mapping) do { } while (0)
24#define flush_cache_sigtramp(vaddr) do { } while (0)
25#define flush_icache_user_range(vma,pg,adr,len) do { } while (0)
26#define __flush_wback_region(start, size) do { (void)(start); } while (0)
27#define __flush_purge_region(start, size) do { (void)(start); } while (0)
28#define __flush_invalidate_region(start, size) do { (void)(start); } while (0)
29#else
30#include <cpu/cacheflush.h>
31 31
32/* 32static inline void cache_noop(void *args) { }
33 * Consistent DMA requires that the __flush_xxx() primitives must be set 33
34 * for any of the enabled non-coherent caches (most of the UP CPUs), 34extern void (*__flush_wback_region)(void *start, int size);
35 * regardless of PIPT or VIPT cache configurations. 35extern void (*__flush_purge_region)(void *start, int size);
36 */ 36extern void (*__flush_invalidate_region)(void *start, int size);
37
38extern void flush_cache_all(void);
39extern void flush_cache_mm(struct mm_struct *mm);
40extern void flush_cache_dup_mm(struct mm_struct *mm);
41extern void flush_cache_page(struct vm_area_struct *vma,
42 unsigned long addr, unsigned long pfn);
43extern void flush_cache_range(struct vm_area_struct *vma,
44 unsigned long start, unsigned long end);
45extern void flush_dcache_page(struct page *page);
46extern void flush_icache_range(unsigned long start, unsigned long end);
47extern void flush_icache_page(struct vm_area_struct *vma,
48 struct page *page);
49extern void flush_cache_sigtramp(unsigned long address);
50
51struct flusher_data {
52 struct vm_area_struct *vma;
53 unsigned long addr1, addr2;
54};
37 55
38/* Flush (write-back only) a region (smaller than a page) */ 56#define ARCH_HAS_FLUSH_ANON_PAGE
39extern void __flush_wback_region(void *start, int size); 57extern void __flush_anon_page(struct page *page, unsigned long);
40/* Flush (write-back & invalidate) a region (smaller than a page) */ 58
41extern void __flush_purge_region(void *start, int size); 59static inline void flush_anon_page(struct vm_area_struct *vma,
42/* Flush (invalidate only) a region (smaller than a page) */ 60 struct page *page, unsigned long vmaddr)
43extern void __flush_invalidate_region(void *start, int size); 61{
44#endif 62 if (boot_cpu_data.dcache.n_aliases && PageAnon(page))
63 __flush_anon_page(page, vmaddr);
64}
45 65
46#define ARCH_HAS_FLUSH_KERNEL_DCACHE_PAGE 66#define ARCH_HAS_FLUSH_KERNEL_DCACHE_PAGE
47static inline void flush_kernel_dcache_page(struct page *page) 67static inline void flush_kernel_dcache_page(struct page *page)
@@ -49,7 +69,6 @@ static inline void flush_kernel_dcache_page(struct page *page)
49 flush_dcache_page(page); 69 flush_dcache_page(page);
50} 70}
51 71
52#if defined(CONFIG_CPU_SH4) && !defined(CONFIG_CACHE_OFF)
53extern void copy_to_user_page(struct vm_area_struct *vma, 72extern void copy_to_user_page(struct vm_area_struct *vma,
54 struct page *page, unsigned long vaddr, void *dst, const void *src, 73 struct page *page, unsigned long vaddr, void *dst, const void *src,
55 unsigned long len); 74 unsigned long len);
@@ -57,23 +76,20 @@ extern void copy_to_user_page(struct vm_area_struct *vma,
57extern void copy_from_user_page(struct vm_area_struct *vma, 76extern void copy_from_user_page(struct vm_area_struct *vma,
58 struct page *page, unsigned long vaddr, void *dst, const void *src, 77 struct page *page, unsigned long vaddr, void *dst, const void *src,
59 unsigned long len); 78 unsigned long len);
60#else
61#define copy_to_user_page(vma, page, vaddr, dst, src, len) \
62 do { \
63 flush_cache_page(vma, vaddr, page_to_pfn(page));\
64 memcpy(dst, src, len); \
65 flush_icache_user_range(vma, page, vaddr, len); \
66 } while (0)
67
68#define copy_from_user_page(vma, page, vaddr, dst, src, len) \
69 do { \
70 flush_cache_page(vma, vaddr, page_to_pfn(page));\
71 memcpy(dst, src, len); \
72 } while (0)
73#endif
74 79
75#define flush_cache_vmap(start, end) flush_cache_all() 80#define flush_cache_vmap(start, end) flush_cache_all()
76#define flush_cache_vunmap(start, end) flush_cache_all() 81#define flush_cache_vunmap(start, end) flush_cache_all()
77 82
83#define flush_dcache_mmap_lock(mapping) do { } while (0)
84#define flush_dcache_mmap_unlock(mapping) do { } while (0)
85
86void kmap_coherent_init(void);
87void *kmap_coherent(struct page *page, unsigned long addr);
88void kunmap_coherent(void *kvaddr);
89
90#define PG_dcache_dirty PG_arch_1
91
92void cpu_cache_init(void);
93
78#endif /* __KERNEL__ */ 94#endif /* __KERNEL__ */
79#endif /* __ASM_SH_CACHEFLUSH_H */ 95#endif /* __ASM_SH_CACHEFLUSH_H */
diff --git a/arch/sh/include/asm/device.h b/arch/sh/include/asm/device.h
index 8688a88303ee..b16debfe8c1e 100644
--- a/arch/sh/include/asm/device.h
+++ b/arch/sh/include/asm/device.h
@@ -3,7 +3,9 @@
3 * 3 *
4 * This file is released under the GPLv2 4 * This file is released under the GPLv2
5 */ 5 */
6#include <asm-generic/device.h> 6
7struct dev_archdata {
8};
7 9
8struct platform_device; 10struct platform_device;
9/* allocate contiguous memory chunk and fill in struct resource */ 11/* allocate contiguous memory chunk and fill in struct resource */
@@ -12,3 +14,15 @@ int platform_resource_setup_memory(struct platform_device *pdev,
12 14
13void plat_early_device_setup(void); 15void plat_early_device_setup(void);
14 16
17#define PDEV_ARCHDATA_FLAG_INIT 0
18#define PDEV_ARCHDATA_FLAG_IDLE 1
19#define PDEV_ARCHDATA_FLAG_SUSP 2
20
21struct pdev_archdata {
22 int hwblk_id;
23#ifdef CONFIG_PM_RUNTIME
24 unsigned long flags;
25 struct list_head entry;
26 struct mutex mutex;
27#endif
28};
diff --git a/arch/sh/include/asm/dma-sh.h b/arch/sh/include/asm/dma-sh.h
index 0c8f8e14622a..78eed3e0bdf5 100644
--- a/arch/sh/include/asm/dma-sh.h
+++ b/arch/sh/include/asm/dma-sh.h
@@ -16,6 +16,7 @@
16 16
17/* DMAOR contorl: The DMAOR access size is different by CPU.*/ 17/* DMAOR contorl: The DMAOR access size is different by CPU.*/
18#if defined(CONFIG_CPU_SUBTYPE_SH7723) || \ 18#if defined(CONFIG_CPU_SUBTYPE_SH7723) || \
19 defined(CONFIG_CPU_SUBTYPE_SH7724) || \
19 defined(CONFIG_CPU_SUBTYPE_SH7780) || \ 20 defined(CONFIG_CPU_SUBTYPE_SH7780) || \
20 defined(CONFIG_CPU_SUBTYPE_SH7785) 21 defined(CONFIG_CPU_SUBTYPE_SH7785)
21#define dmaor_read_reg(n) \ 22#define dmaor_read_reg(n) \
@@ -115,4 +116,17 @@ static u32 dma_base_addr[] __maybe_unused = {
115#define CHCR 0x0C 116#define CHCR 0x0C
116#define DMAOR 0x40 117#define DMAOR 0x40
117 118
119/*
120 * for dma engine
121 *
122 * SuperH DMA mode
123 */
124#define SHDMA_MIX_IRQ (1 << 1)
125#define SHDMA_DMAOR1 (1 << 2)
126#define SHDMA_DMAE1 (1 << 3)
127
128struct sh_dmae_pdata {
129 unsigned int mode;
130};
131
118#endif /* __DMA_SH_H */ 132#endif /* __DMA_SH_H */
diff --git a/arch/sh/include/asm/dwarf.h b/arch/sh/include/asm/dwarf.h
new file mode 100644
index 000000000000..ced6795891a6
--- /dev/null
+++ b/arch/sh/include/asm/dwarf.h
@@ -0,0 +1,398 @@
1/*
2 * Copyright (C) 2009 Matt Fleming <matt@console-pimps.org>
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 *
8 */
9#ifndef __ASM_SH_DWARF_H
10#define __ASM_SH_DWARF_H
11
12#ifdef CONFIG_DWARF_UNWINDER
13
14/*
15 * DWARF expression operations
16 */
17#define DW_OP_addr 0x03
18#define DW_OP_deref 0x06
19#define DW_OP_const1u 0x08
20#define DW_OP_const1s 0x09
21#define DW_OP_const2u 0x0a
22#define DW_OP_const2s 0x0b
23#define DW_OP_const4u 0x0c
24#define DW_OP_const4s 0x0d
25#define DW_OP_const8u 0x0e
26#define DW_OP_const8s 0x0f
27#define DW_OP_constu 0x10
28#define DW_OP_consts 0x11
29#define DW_OP_dup 0x12
30#define DW_OP_drop 0x13
31#define DW_OP_over 0x14
32#define DW_OP_pick 0x15
33#define DW_OP_swap 0x16
34#define DW_OP_rot 0x17
35#define DW_OP_xderef 0x18
36#define DW_OP_abs 0x19
37#define DW_OP_and 0x1a
38#define DW_OP_div 0x1b
39#define DW_OP_minus 0x1c
40#define DW_OP_mod 0x1d
41#define DW_OP_mul 0x1e
42#define DW_OP_neg 0x1f
43#define DW_OP_not 0x20
44#define DW_OP_or 0x21
45#define DW_OP_plus 0x22
46#define DW_OP_plus_uconst 0x23
47#define DW_OP_shl 0x24
48#define DW_OP_shr 0x25
49#define DW_OP_shra 0x26
50#define DW_OP_xor 0x27
51#define DW_OP_skip 0x2f
52#define DW_OP_bra 0x28
53#define DW_OP_eq 0x29
54#define DW_OP_ge 0x2a
55#define DW_OP_gt 0x2b
56#define DW_OP_le 0x2c
57#define DW_OP_lt 0x2d
58#define DW_OP_ne 0x2e
59#define DW_OP_lit0 0x30
60#define DW_OP_lit1 0x31
61#define DW_OP_lit2 0x32
62#define DW_OP_lit3 0x33
63#define DW_OP_lit4 0x34
64#define DW_OP_lit5 0x35
65#define DW_OP_lit6 0x36
66#define DW_OP_lit7 0x37
67#define DW_OP_lit8 0x38
68#define DW_OP_lit9 0x39
69#define DW_OP_lit10 0x3a
70#define DW_OP_lit11 0x3b
71#define DW_OP_lit12 0x3c
72#define DW_OP_lit13 0x3d
73#define DW_OP_lit14 0x3e
74#define DW_OP_lit15 0x3f
75#define DW_OP_lit16 0x40
76#define DW_OP_lit17 0x41
77#define DW_OP_lit18 0x42
78#define DW_OP_lit19 0x43
79#define DW_OP_lit20 0x44
80#define DW_OP_lit21 0x45
81#define DW_OP_lit22 0x46
82#define DW_OP_lit23 0x47
83#define DW_OP_lit24 0x48
84#define DW_OP_lit25 0x49
85#define DW_OP_lit26 0x4a
86#define DW_OP_lit27 0x4b
87#define DW_OP_lit28 0x4c
88#define DW_OP_lit29 0x4d
89#define DW_OP_lit30 0x4e
90#define DW_OP_lit31 0x4f
91#define DW_OP_reg0 0x50
92#define DW_OP_reg1 0x51
93#define DW_OP_reg2 0x52
94#define DW_OP_reg3 0x53
95#define DW_OP_reg4 0x54
96#define DW_OP_reg5 0x55
97#define DW_OP_reg6 0x56
98#define DW_OP_reg7 0x57
99#define DW_OP_reg8 0x58
100#define DW_OP_reg9 0x59
101#define DW_OP_reg10 0x5a
102#define DW_OP_reg11 0x5b
103#define DW_OP_reg12 0x5c
104#define DW_OP_reg13 0x5d
105#define DW_OP_reg14 0x5e
106#define DW_OP_reg15 0x5f
107#define DW_OP_reg16 0x60
108#define DW_OP_reg17 0x61
109#define DW_OP_reg18 0x62
110#define DW_OP_reg19 0x63
111#define DW_OP_reg20 0x64
112#define DW_OP_reg21 0x65
113#define DW_OP_reg22 0x66
114#define DW_OP_reg23 0x67
115#define DW_OP_reg24 0x68
116#define DW_OP_reg25 0x69
117#define DW_OP_reg26 0x6a
118#define DW_OP_reg27 0x6b
119#define DW_OP_reg28 0x6c
120#define DW_OP_reg29 0x6d
121#define DW_OP_reg30 0x6e
122#define DW_OP_reg31 0x6f
123#define DW_OP_breg0 0x70
124#define DW_OP_breg1 0x71
125#define DW_OP_breg2 0x72
126#define DW_OP_breg3 0x73
127#define DW_OP_breg4 0x74
128#define DW_OP_breg5 0x75
129#define DW_OP_breg6 0x76
130#define DW_OP_breg7 0x77
131#define DW_OP_breg8 0x78
132#define DW_OP_breg9 0x79
133#define DW_OP_breg10 0x7a
134#define DW_OP_breg11 0x7b
135#define DW_OP_breg12 0x7c
136#define DW_OP_breg13 0x7d
137#define DW_OP_breg14 0x7e
138#define DW_OP_breg15 0x7f
139#define DW_OP_breg16 0x80
140#define DW_OP_breg17 0x81
141#define DW_OP_breg18 0x82
142#define DW_OP_breg19 0x83
143#define DW_OP_breg20 0x84
144#define DW_OP_breg21 0x85
145#define DW_OP_breg22 0x86
146#define DW_OP_breg23 0x87
147#define DW_OP_breg24 0x88
148#define DW_OP_breg25 0x89
149#define DW_OP_breg26 0x8a
150#define DW_OP_breg27 0x8b
151#define DW_OP_breg28 0x8c
152#define DW_OP_breg29 0x8d
153#define DW_OP_breg30 0x8e
154#define DW_OP_breg31 0x8f
155#define DW_OP_regx 0x90
156#define DW_OP_fbreg 0x91
157#define DW_OP_bregx 0x92
158#define DW_OP_piece 0x93
159#define DW_OP_deref_size 0x94
160#define DW_OP_xderef_size 0x95
161#define DW_OP_nop 0x96
162#define DW_OP_push_object_address 0x97
163#define DW_OP_call2 0x98
164#define DW_OP_call4 0x99
165#define DW_OP_call_ref 0x9a
166#define DW_OP_form_tls_address 0x9b
167#define DW_OP_call_frame_cfa 0x9c
168#define DW_OP_bit_piece 0x9d
169#define DW_OP_lo_user 0xe0
170#define DW_OP_hi_user 0xff
171
172/*
173 * Addresses used in FDE entries in the .eh_frame section may be encoded
174 * using one of the following encodings.
175 */
176#define DW_EH_PE_absptr 0x00
177#define DW_EH_PE_omit 0xff
178#define DW_EH_PE_uleb128 0x01
179#define DW_EH_PE_udata2 0x02
180#define DW_EH_PE_udata4 0x03
181#define DW_EH_PE_udata8 0x04
182#define DW_EH_PE_sleb128 0x09
183#define DW_EH_PE_sdata2 0x0a
184#define DW_EH_PE_sdata4 0x0b
185#define DW_EH_PE_sdata8 0x0c
186#define DW_EH_PE_signed 0x09
187
188#define DW_EH_PE_pcrel 0x10
189
190/*
191 * The architecture-specific register number that contains the return
192 * address in the .debug_frame table.
193 */
194#define DWARF_ARCH_RA_REG 17
195
196#ifndef __ASSEMBLY__
197/*
198 * Read either the frame pointer (r14) or the stack pointer (r15).
199 * NOTE: this MUST be inlined.
200 */
201static __always_inline unsigned long dwarf_read_arch_reg(unsigned int reg)
202{
203 unsigned long value = 0;
204
205 switch (reg) {
206 case 14:
207 __asm__ __volatile__("mov r14, %0\n" : "=r" (value));
208 break;
209 case 15:
210 __asm__ __volatile__("mov r15, %0\n" : "=r" (value));
211 break;
212 default:
213 BUG();
214 }
215
216 return value;
217}
218
219/**
220 * dwarf_cie - Common Information Entry
221 */
222struct dwarf_cie {
223 unsigned long length;
224 unsigned long cie_id;
225 unsigned char version;
226 const char *augmentation;
227 unsigned int code_alignment_factor;
228 int data_alignment_factor;
229
230 /* Which column in the rule table represents return addr of func. */
231 unsigned int return_address_reg;
232
233 unsigned char *initial_instructions;
234 unsigned char *instructions_end;
235
236 unsigned char encoding;
237
238 unsigned long cie_pointer;
239
240 struct list_head link;
241
242 unsigned long flags;
243#define DWARF_CIE_Z_AUGMENTATION (1 << 0)
244};
245
246/**
247 * dwarf_fde - Frame Description Entry
248 */
249struct dwarf_fde {
250 unsigned long length;
251 unsigned long cie_pointer;
252 struct dwarf_cie *cie;
253 unsigned long initial_location;
254 unsigned long address_range;
255 unsigned char *instructions;
256 unsigned char *end;
257 struct list_head link;
258};
259
260/**
261 * dwarf_frame - DWARF information for a frame in the call stack
262 */
263struct dwarf_frame {
264 struct dwarf_frame *prev, *next;
265
266 unsigned long pc;
267
268 struct list_head reg_list;
269
270 unsigned long cfa;
271
272 /* Valid when DW_FRAME_CFA_REG_OFFSET is set in flags */
273 unsigned int cfa_register;
274 unsigned int cfa_offset;
275
276 /* Valid when DW_FRAME_CFA_REG_EXP is set in flags */
277 unsigned char *cfa_expr;
278 unsigned int cfa_expr_len;
279
280 unsigned long flags;
281#define DWARF_FRAME_CFA_REG_OFFSET (1 << 0)
282#define DWARF_FRAME_CFA_REG_EXP (1 << 1)
283
284 unsigned long return_addr;
285};
286
287/**
288 * dwarf_reg - DWARF register
289 * @flags: Describes how to calculate the value of this register
290 */
291struct dwarf_reg {
292 struct list_head link;
293
294 unsigned int number;
295
296 unsigned long addr;
297 unsigned long flags;
298#define DWARF_REG_OFFSET (1 << 0)
299#define DWARF_VAL_OFFSET (1 << 1)
300#define DWARF_UNDEFINED (1 << 2)
301};
302
303/*
304 * Call Frame instruction opcodes.
305 */
306#define DW_CFA_advance_loc 0x40
307#define DW_CFA_offset 0x80
308#define DW_CFA_restore 0xc0
309#define DW_CFA_nop 0x00
310#define DW_CFA_set_loc 0x01
311#define DW_CFA_advance_loc1 0x02
312#define DW_CFA_advance_loc2 0x03
313#define DW_CFA_advance_loc4 0x04
314#define DW_CFA_offset_extended 0x05
315#define DW_CFA_restore_extended 0x06
316#define DW_CFA_undefined 0x07
317#define DW_CFA_same_value 0x08
318#define DW_CFA_register 0x09
319#define DW_CFA_remember_state 0x0a
320#define DW_CFA_restore_state 0x0b
321#define DW_CFA_def_cfa 0x0c
322#define DW_CFA_def_cfa_register 0x0d
323#define DW_CFA_def_cfa_offset 0x0e
324#define DW_CFA_def_cfa_expression 0x0f
325#define DW_CFA_expression 0x10
326#define DW_CFA_offset_extended_sf 0x11
327#define DW_CFA_def_cfa_sf 0x12
328#define DW_CFA_def_cfa_offset_sf 0x13
329#define DW_CFA_val_offset 0x14
330#define DW_CFA_val_offset_sf 0x15
331#define DW_CFA_val_expression 0x16
332#define DW_CFA_lo_user 0x1c
333#define DW_CFA_hi_user 0x3f
334
335/* GNU extension opcodes */
336#define DW_CFA_GNU_args_size 0x2e
337#define DW_CFA_GNU_negative_offset_extended 0x2f
338
339/*
340 * Some call frame instructions encode their operands in the opcode. We
341 * need some helper functions to extract both the opcode and operands
342 * from an instruction.
343 */
344static inline unsigned int DW_CFA_opcode(unsigned long insn)
345{
346 return (insn & 0xc0);
347}
348
349static inline unsigned int DW_CFA_operand(unsigned long insn)
350{
351 return (insn & 0x3f);
352}
353
354#define DW_EH_FRAME_CIE 0 /* .eh_frame CIE IDs are 0 */
355#define DW_CIE_ID 0xffffffff
356#define DW64_CIE_ID 0xffffffffffffffffULL
357
358/*
359 * DWARF FDE/CIE length field values.
360 */
361#define DW_EXT_LO 0xfffffff0
362#define DW_EXT_HI 0xffffffff
363#define DW_EXT_DWARF64 DW_EXT_HI
364
365extern struct dwarf_frame *dwarf_unwind_stack(unsigned long,
366 struct dwarf_frame *);
367#endif /* !__ASSEMBLY__ */
368
369#define CFI_STARTPROC .cfi_startproc
370#define CFI_ENDPROC .cfi_endproc
371#define CFI_DEF_CFA .cfi_def_cfa
372#define CFI_REGISTER .cfi_register
373#define CFI_REL_OFFSET .cfi_rel_offset
374#define CFI_UNDEFINED .cfi_undefined
375
376#else
377
378/*
379 * Use the asm comment character to ignore the rest of the line.
380 */
381#define CFI_IGNORE !
382
383#define CFI_STARTPROC CFI_IGNORE
384#define CFI_ENDPROC CFI_IGNORE
385#define CFI_DEF_CFA CFI_IGNORE
386#define CFI_REGISTER CFI_IGNORE
387#define CFI_REL_OFFSET CFI_IGNORE
388#define CFI_UNDEFINED CFI_IGNORE
389
390#ifndef __ASSEMBLY__
391static inline void dwarf_unwinder_init(void)
392{
393}
394#endif
395
396#endif /* CONFIG_DWARF_UNWINDER */
397
398#endif /* __ASM_SH_DWARF_H */
diff --git a/arch/sh/include/asm/entry-macros.S b/arch/sh/include/asm/entry-macros.S
index 3a4752a65722..cc43a55e1fcf 100644
--- a/arch/sh/include/asm/entry-macros.S
+++ b/arch/sh/include/asm/entry-macros.S
@@ -7,7 +7,7 @@
7 .endm 7 .endm
8 8
9 .macro sti 9 .macro sti
10 mov #0xf0, r11 10 mov #0xfffffff0, r11
11 extu.b r11, r11 11 extu.b r11, r11
12 not r11, r11 12 not r11, r11
13 stc sr, r10 13 stc sr, r10
@@ -31,8 +31,92 @@
31#endif 31#endif
32 .endm 32 .endm
33 33
34#ifdef CONFIG_TRACE_IRQFLAGS
35
36 .macro TRACE_IRQS_ON
37 mov.l r0, @-r15
38 mov.l r1, @-r15
39 mov.l r2, @-r15
40 mov.l r3, @-r15
41 mov.l r4, @-r15
42 mov.l r5, @-r15
43 mov.l r6, @-r15
44 mov.l r7, @-r15
45
46 mov.l 7834f, r0
47 jsr @r0
48 nop
49
50 mov.l @r15+, r7
51 mov.l @r15+, r6
52 mov.l @r15+, r5
53 mov.l @r15+, r4
54 mov.l @r15+, r3
55 mov.l @r15+, r2
56 mov.l @r15+, r1
57 mov.l @r15+, r0
58 mov.l 7834f, r0
59
60 bra 7835f
61 nop
62 .balign 4
637834: .long trace_hardirqs_on
647835:
65 .endm
66 .macro TRACE_IRQS_OFF
67
68 mov.l r0, @-r15
69 mov.l r1, @-r15
70 mov.l r2, @-r15
71 mov.l r3, @-r15
72 mov.l r4, @-r15
73 mov.l r5, @-r15
74 mov.l r6, @-r15
75 mov.l r7, @-r15
76
77 mov.l 7834f, r0
78 jsr @r0
79 nop
80
81 mov.l @r15+, r7
82 mov.l @r15+, r6
83 mov.l @r15+, r5
84 mov.l @r15+, r4
85 mov.l @r15+, r3
86 mov.l @r15+, r2
87 mov.l @r15+, r1
88 mov.l @r15+, r0
89 mov.l 7834f, r0
90
91 bra 7835f
92 nop
93 .balign 4
947834: .long trace_hardirqs_off
957835:
96 .endm
97
98#else
99 .macro TRACE_IRQS_ON
100 .endm
101
102 .macro TRACE_IRQS_OFF
103 .endm
104#endif
105
34#if defined(CONFIG_CPU_SH2A) || defined(CONFIG_CPU_SH4) 106#if defined(CONFIG_CPU_SH2A) || defined(CONFIG_CPU_SH4)
35# define PREF(x) pref @x 107# define PREF(x) pref @x
36#else 108#else
37# define PREF(x) nop 109# define PREF(x) nop
38#endif 110#endif
111
112 /*
113 * Macro for use within assembly. Because the DWARF unwinder
114 * needs to use the frame register to unwind the stack, we
115 * need to setup r14 with the value of the stack pointer as
116 * the return address is usually on the stack somewhere.
117 */
118 .macro setup_frame_reg
119#ifdef CONFIG_DWARF_UNWINDER
120 mov r15, r14
121#endif
122 .endm
diff --git a/arch/sh/include/asm/ftrace.h b/arch/sh/include/asm/ftrace.h
index 8fea7d8c8258..12f3a31f20af 100644
--- a/arch/sh/include/asm/ftrace.h
+++ b/arch/sh/include/asm/ftrace.h
@@ -4,6 +4,7 @@
4#ifdef CONFIG_FUNCTION_TRACER 4#ifdef CONFIG_FUNCTION_TRACER
5 5
6#define MCOUNT_INSN_SIZE 4 /* sizeof mcount call */ 6#define MCOUNT_INSN_SIZE 4 /* sizeof mcount call */
7#define FTRACE_SYSCALL_MAX NR_syscalls
7 8
8#ifndef __ASSEMBLY__ 9#ifndef __ASSEMBLY__
9extern void mcount(void); 10extern void mcount(void);
@@ -11,10 +12,13 @@ extern void mcount(void);
11#define MCOUNT_ADDR ((long)(mcount)) 12#define MCOUNT_ADDR ((long)(mcount))
12 13
13#ifdef CONFIG_DYNAMIC_FTRACE 14#ifdef CONFIG_DYNAMIC_FTRACE
14#define CALLER_ADDR ((long)(ftrace_caller)) 15#define CALL_ADDR ((long)(ftrace_call))
15#define STUB_ADDR ((long)(ftrace_stub)) 16#define STUB_ADDR ((long)(ftrace_stub))
17#define GRAPH_ADDR ((long)(ftrace_graph_call))
18#define CALLER_ADDR ((long)(ftrace_caller))
16 19
17#define MCOUNT_INSN_OFFSET ((STUB_ADDR - CALLER_ADDR) >> 1) 20#define MCOUNT_INSN_OFFSET ((STUB_ADDR - CALL_ADDR) - 4)
21#define GRAPH_INSN_OFFSET ((CALLER_ADDR - GRAPH_ADDR) - 4)
18 22
19struct dyn_arch_ftrace { 23struct dyn_arch_ftrace {
20 /* No extra data needed on sh */ 24 /* No extra data needed on sh */
diff --git a/arch/sh/include/asm/hardirq.h b/arch/sh/include/asm/hardirq.h
index 715ee237fc77..a5be4afa790b 100644
--- a/arch/sh/include/asm/hardirq.h
+++ b/arch/sh/include/asm/hardirq.h
@@ -1,16 +1,9 @@
1#ifndef __ASM_SH_HARDIRQ_H 1#ifndef __ASM_SH_HARDIRQ_H
2#define __ASM_SH_HARDIRQ_H 2#define __ASM_SH_HARDIRQ_H
3 3
4#include <linux/threads.h>
5#include <linux/irq.h>
6
7/* entry.S is sensitive to the offsets of these fields */
8typedef struct {
9 unsigned int __softirq_pending;
10} ____cacheline_aligned irq_cpustat_t;
11
12#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
13
14extern void ack_bad_irq(unsigned int irq); 4extern void ack_bad_irq(unsigned int irq);
5#define ack_bad_irq ack_bad_irq
6
7#include <asm-generic/hardirq.h>
15 8
16#endif /* __ASM_SH_HARDIRQ_H */ 9#endif /* __ASM_SH_HARDIRQ_H */
diff --git a/arch/sh/include/asm/heartbeat.h b/arch/sh/include/asm/heartbeat.h
index 724a43ed245e..caaafe5a3ef1 100644
--- a/arch/sh/include/asm/heartbeat.h
+++ b/arch/sh/include/asm/heartbeat.h
@@ -11,6 +11,7 @@ struct heartbeat_data {
11 unsigned int nr_bits; 11 unsigned int nr_bits;
12 struct timer_list timer; 12 struct timer_list timer;
13 unsigned int regsize; 13 unsigned int regsize;
14 unsigned int mask;
14 unsigned long flags; 15 unsigned long flags;
15}; 16};
16 17
diff --git a/arch/sh/include/asm/hwblk.h b/arch/sh/include/asm/hwblk.h
new file mode 100644
index 000000000000..5d3ccae4202b
--- /dev/null
+++ b/arch/sh/include/asm/hwblk.h
@@ -0,0 +1,72 @@
1#ifndef __ASM_SH_HWBLK_H
2#define __ASM_SH_HWBLK_H
3
4#include <asm/clock.h>
5#include <asm/io.h>
6
7#define HWBLK_CNT_USAGE 0
8#define HWBLK_CNT_IDLE 1
9#define HWBLK_CNT_DEVICES 2
10#define HWBLK_CNT_NR 3
11
12#define HWBLK_AREA_FLAG_PARENT (1 << 0) /* valid parent */
13
14#define HWBLK_AREA(_flags, _parent) \
15{ \
16 .flags = _flags, \
17 .parent = _parent, \
18}
19
20struct hwblk_area {
21 int cnt[HWBLK_CNT_NR];
22 unsigned char parent;
23 unsigned char flags;
24};
25
26#define HWBLK(_mstp, _bit, _area) \
27{ \
28 .mstp = (void __iomem *)_mstp, \
29 .bit = _bit, \
30 .area = _area, \
31}
32
33struct hwblk {
34 void __iomem *mstp;
35 unsigned char bit;
36 unsigned char area;
37 int cnt[HWBLK_CNT_NR];
38};
39
40struct hwblk_info {
41 struct hwblk_area *areas;
42 int nr_areas;
43 struct hwblk *hwblks;
44 int nr_hwblks;
45};
46
47/* Should be defined by processor-specific code */
48int arch_hwblk_init(void);
49int arch_hwblk_sleep_mode(void);
50
51int hwblk_register(struct hwblk_info *info);
52int hwblk_init(void);
53
54void hwblk_enable(struct hwblk_info *info, int hwblk);
55void hwblk_disable(struct hwblk_info *info, int hwblk);
56
57void hwblk_cnt_inc(struct hwblk_info *info, int hwblk, int cnt);
58void hwblk_cnt_dec(struct hwblk_info *info, int hwblk, int cnt);
59
60/* allow clocks to enable and disable hardware blocks */
61#define SH_HWBLK_CLK(_name, _id, _parent, _hwblk, _flags) \
62{ \
63 .name = _name, \
64 .id = _id, \
65 .parent = _parent, \
66 .arch_flags = _hwblk, \
67 .flags = _flags, \
68}
69
70int sh_hwblk_clk_register(struct clk *clks, int nr);
71
72#endif /* __ASM_SH_HWBLK_H */
diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h
index 25348141674b..5be45ea4dfec 100644
--- a/arch/sh/include/asm/io.h
+++ b/arch/sh/include/asm/io.h
@@ -92,8 +92,12 @@
92 92
93static inline void ctrl_delay(void) 93static inline void ctrl_delay(void)
94{ 94{
95#ifdef P2SEG 95#ifdef CONFIG_CPU_SH4
96 __raw_readw(CCN_PVR);
97#elif defined(P2SEG)
96 __raw_readw(P2SEG); 98 __raw_readw(P2SEG);
99#else
100#error "Need a dummy address for delay"
97#endif 101#endif
98} 102}
99 103
@@ -146,6 +150,7 @@ __BUILD_MEMORY_STRING(q, u64)
146#define readl_relaxed(a) readl(a) 150#define readl_relaxed(a) readl(a)
147#define readq_relaxed(a) readq(a) 151#define readq_relaxed(a) readq(a)
148 152
153#ifndef CONFIG_GENERIC_IOMAP
149/* Simple MMIO */ 154/* Simple MMIO */
150#define ioread8(a) __raw_readb(a) 155#define ioread8(a) __raw_readb(a)
151#define ioread16(a) __raw_readw(a) 156#define ioread16(a) __raw_readw(a)
@@ -166,6 +171,15 @@ __BUILD_MEMORY_STRING(q, u64)
166#define iowrite8_rep(a, s, c) __raw_writesb((a), (s), (c)) 171#define iowrite8_rep(a, s, c) __raw_writesb((a), (s), (c))
167#define iowrite16_rep(a, s, c) __raw_writesw((a), (s), (c)) 172#define iowrite16_rep(a, s, c) __raw_writesw((a), (s), (c))
168#define iowrite32_rep(a, s, c) __raw_writesl((a), (s), (c)) 173#define iowrite32_rep(a, s, c) __raw_writesl((a), (s), (c))
174#endif
175
176#define mmio_insb(p,d,c) __raw_readsb(p,d,c)
177#define mmio_insw(p,d,c) __raw_readsw(p,d,c)
178#define mmio_insl(p,d,c) __raw_readsl(p,d,c)
179
180#define mmio_outsb(p,s,c) __raw_writesb(p,s,c)
181#define mmio_outsw(p,s,c) __raw_writesw(p,s,c)
182#define mmio_outsl(p,s,c) __raw_writesl(p,s,c)
169 183
170/* synco on SH-4A, otherwise a nop */ 184/* synco on SH-4A, otherwise a nop */
171#define mmiowb() wmb() 185#define mmiowb() wmb()
diff --git a/arch/sh/include/asm/kdebug.h b/arch/sh/include/asm/kdebug.h
index 0b9f896f203c..985219f9759e 100644
--- a/arch/sh/include/asm/kdebug.h
+++ b/arch/sh/include/asm/kdebug.h
@@ -4,6 +4,7 @@
4/* Grossly misnamed. */ 4/* Grossly misnamed. */
5enum die_val { 5enum die_val {
6 DIE_TRAP, 6 DIE_TRAP,
7 DIE_NMI,
7 DIE_OOPS, 8 DIE_OOPS,
8}; 9};
9 10
diff --git a/arch/sh/include/asm/kgdb.h b/arch/sh/include/asm/kgdb.h
index 72704ed725e5..4235e228d921 100644
--- a/arch/sh/include/asm/kgdb.h
+++ b/arch/sh/include/asm/kgdb.h
@@ -30,9 +30,6 @@ static inline void arch_kgdb_breakpoint(void)
30 __asm__ __volatile__ ("trapa #0x3c\n"); 30 __asm__ __volatile__ ("trapa #0x3c\n");
31} 31}
32 32
33/* State info */
34extern char in_nmi; /* Debounce flag to prevent NMI reentry*/
35
36#define BUFMAX 2048 33#define BUFMAX 2048
37 34
38#define CACHE_FLUSH_IS_SAFE 1 35#define CACHE_FLUSH_IS_SAFE 1
diff --git a/arch/sh/include/asm/lmb.h b/arch/sh/include/asm/lmb.h
new file mode 100644
index 000000000000..9b437f657ffa
--- /dev/null
+++ b/arch/sh/include/asm/lmb.h
@@ -0,0 +1,6 @@
1#ifndef __ASM_SH_LMB_H
2#define __ASM_SH_LMB_H
3
4#define LMB_REAL_LIMIT 0
5
6#endif /* __ASM_SH_LMB_H */
diff --git a/arch/sh/include/asm/mmu_context.h b/arch/sh/include/asm/mmu_context.h
index 67d8946db193..41080b173a7a 100644
--- a/arch/sh/include/asm/mmu_context.h
+++ b/arch/sh/include/asm/mmu_context.h
@@ -69,7 +69,7 @@ static inline void get_mmu_context(struct mm_struct *mm, unsigned int cpu)
69 * We exhaust ASID of this version. 69 * We exhaust ASID of this version.
70 * Flush all TLB and start new cycle. 70 * Flush all TLB and start new cycle.
71 */ 71 */
72 flush_tlb_all(); 72 local_flush_tlb_all();
73 73
74#ifdef CONFIG_SUPERH64 74#ifdef CONFIG_SUPERH64
75 /* 75 /*
diff --git a/arch/sh/include/asm/page.h b/arch/sh/include/asm/page.h
index 49592c780a6e..81bffc0d6860 100644
--- a/arch/sh/include/asm/page.h
+++ b/arch/sh/include/asm/page.h
@@ -50,26 +50,24 @@ extern unsigned long shm_align_mask;
50extern unsigned long max_low_pfn, min_low_pfn; 50extern unsigned long max_low_pfn, min_low_pfn;
51extern unsigned long memory_start, memory_end; 51extern unsigned long memory_start, memory_end;
52 52
53extern void clear_page(void *to); 53static inline unsigned long
54pages_do_alias(unsigned long addr1, unsigned long addr2)
55{
56 return (addr1 ^ addr2) & shm_align_mask;
57}
58
59
60#define clear_page(page) memset((void *)(page), 0, PAGE_SIZE)
54extern void copy_page(void *to, void *from); 61extern void copy_page(void *to, void *from);
55 62
56#if !defined(CONFIG_CACHE_OFF) && defined(CONFIG_MMU) && \
57 (defined(CONFIG_CPU_SH5) || defined(CONFIG_CPU_SH4) || \
58 defined(CONFIG_SH7705_CACHE_32KB))
59struct page; 63struct page;
60struct vm_area_struct; 64struct vm_area_struct;
61extern void clear_user_page(void *to, unsigned long address, struct page *page); 65
62extern void copy_user_page(void *to, void *from, unsigned long address,
63 struct page *page);
64#if defined(CONFIG_CPU_SH4)
65extern void copy_user_highpage(struct page *to, struct page *from, 66extern void copy_user_highpage(struct page *to, struct page *from,
66 unsigned long vaddr, struct vm_area_struct *vma); 67 unsigned long vaddr, struct vm_area_struct *vma);
67#define __HAVE_ARCH_COPY_USER_HIGHPAGE 68#define __HAVE_ARCH_COPY_USER_HIGHPAGE
68#endif 69extern void clear_user_highpage(struct page *page, unsigned long vaddr);
69#else 70#define clear_user_highpage clear_user_highpage
70#define clear_user_page(page, vaddr, pg) clear_page(page)
71#define copy_user_page(to, from, vaddr, pg) copy_page(to, from)
72#endif
73 71
74/* 72/*
75 * These are used to make use of C type-checking.. 73 * These are used to make use of C type-checking..
diff --git a/arch/sh/include/asm/pci.h b/arch/sh/include/asm/pci.h
index d3633f513ebc..4163950cd1c6 100644
--- a/arch/sh/include/asm/pci.h
+++ b/arch/sh/include/asm/pci.h
@@ -10,7 +10,6 @@
10 or architectures with incomplete PCI setup by the loader */ 10 or architectures with incomplete PCI setup by the loader */
11 11
12#define pcibios_assign_all_busses() 1 12#define pcibios_assign_all_busses() 1
13#define pcibios_scan_all_fns(a, b) 0
14 13
15/* 14/*
16 * A board can define one or more PCI channels that represent built-in (or 15 * A board can define one or more PCI channels that represent built-in (or
diff --git a/arch/sh/include/asm/perf_counter.h b/arch/sh/include/asm/perf_counter.h
deleted file mode 100644
index d8e6bb9c0ccc..000000000000
--- a/arch/sh/include/asm/perf_counter.h
+++ /dev/null
@@ -1,9 +0,0 @@
1#ifndef __ASM_SH_PERF_COUNTER_H
2#define __ASM_SH_PERF_COUNTER_H
3
4/* SH only supports software counters through this interface. */
5static inline void set_perf_counter_pending(void) {}
6
7#define PERF_COUNTER_INDEX_OFFSET 0
8
9#endif /* __ASM_SH_PERF_COUNTER_H */
diff --git a/arch/sh/include/asm/perf_event.h b/arch/sh/include/asm/perf_event.h
new file mode 100644
index 000000000000..11a302297ab7
--- /dev/null
+++ b/arch/sh/include/asm/perf_event.h
@@ -0,0 +1,9 @@
1#ifndef __ASM_SH_PERF_EVENT_H
2#define __ASM_SH_PERF_EVENT_H
3
4/* SH only supports software events through this interface. */
5static inline void set_perf_event_pending(void) {}
6
7#define PERF_EVENT_INDEX_OFFSET 0
8
9#endif /* __ASM_SH_PERF_EVENT_H */
diff --git a/arch/sh/include/asm/pgtable.h b/arch/sh/include/asm/pgtable.h
index 2a011b18090b..4f3efa7d5a64 100644
--- a/arch/sh/include/asm/pgtable.h
+++ b/arch/sh/include/asm/pgtable.h
@@ -36,6 +36,12 @@ extern unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)];
36#define NEFF_SIGN (1LL << (NEFF - 1)) 36#define NEFF_SIGN (1LL << (NEFF - 1))
37#define NEFF_MASK (-1LL << NEFF) 37#define NEFF_MASK (-1LL << NEFF)
38 38
39static inline unsigned long long neff_sign_extend(unsigned long val)
40{
41 unsigned long long extended = val;
42 return (extended & NEFF_SIGN) ? (extended | NEFF_MASK) : extended;
43}
44
39#ifdef CONFIG_29BIT 45#ifdef CONFIG_29BIT
40#define NPHYS 29 46#define NPHYS 29
41#else 47#else
@@ -133,27 +139,25 @@ typedef pte_t *pte_addr_t;
133 */ 139 */
134#define pgtable_cache_init() do { } while (0) 140#define pgtable_cache_init() do { } while (0)
135 141
136#if !defined(CONFIG_CACHE_OFF) && (defined(CONFIG_CPU_SH4) || \
137 defined(CONFIG_SH7705_CACHE_32KB))
138struct mm_struct;
139#define __HAVE_ARCH_PTEP_GET_AND_CLEAR
140pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep);
141#endif
142
143struct vm_area_struct; 142struct vm_area_struct;
144extern void update_mmu_cache(struct vm_area_struct * vma, 143
145 unsigned long address, pte_t pte); 144extern void __update_cache(struct vm_area_struct *vma,
145 unsigned long address, pte_t pte);
146extern void __update_tlb(struct vm_area_struct *vma,
147 unsigned long address, pte_t pte);
148
149static inline void
150update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t pte)
151{
152 __update_cache(vma, address, pte);
153 __update_tlb(vma, address, pte);
154}
155
146extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; 156extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
147extern void paging_init(void); 157extern void paging_init(void);
148extern void page_table_range_init(unsigned long start, unsigned long end, 158extern void page_table_range_init(unsigned long start, unsigned long end,
149 pgd_t *pgd); 159 pgd_t *pgd);
150 160
151#if !defined(CONFIG_CACHE_OFF) && defined(CONFIG_CPU_SH4) && defined(CONFIG_MMU)
152extern void kmap_coherent_init(void);
153#else
154#define kmap_coherent_init() do { } while (0)
155#endif
156
157/* arch/sh/mm/mmap.c */ 161/* arch/sh/mm/mmap.c */
158#define HAVE_ARCH_UNMAPPED_AREA 162#define HAVE_ARCH_UNMAPPED_AREA
159#define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN 163#define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN
diff --git a/arch/sh/include/asm/pgtable_32.h b/arch/sh/include/asm/pgtable_32.h
index 72ea209195bd..c0d359ce337b 100644
--- a/arch/sh/include/asm/pgtable_32.h
+++ b/arch/sh/include/asm/pgtable_32.h
@@ -20,7 +20,7 @@
20 * - Bit 9 is reserved by everyone and used by _PAGE_PROTNONE. 20 * - Bit 9 is reserved by everyone and used by _PAGE_PROTNONE.
21 * 21 *
22 * - Bits 10 and 11 are low bits of the PPN that are reserved on >= 4K pages. 22 * - Bits 10 and 11 are low bits of the PPN that are reserved on >= 4K pages.
23 * Bit 10 is used for _PAGE_ACCESSED, bit 11 remains unused. 23 * Bit 10 is used for _PAGE_ACCESSED, and bit 11 is used for _PAGE_SPECIAL.
24 * 24 *
25 * - On 29 bit platforms, bits 31 to 29 are used for the space attributes 25 * - On 29 bit platforms, bits 31 to 29 are used for the space attributes
26 * and timing control which (together with bit 0) are moved into the 26 * and timing control which (together with bit 0) are moved into the
@@ -52,6 +52,7 @@
52#define _PAGE_PROTNONE 0x200 /* software: if not present */ 52#define _PAGE_PROTNONE 0x200 /* software: if not present */
53#define _PAGE_ACCESSED 0x400 /* software: page referenced */ 53#define _PAGE_ACCESSED 0x400 /* software: page referenced */
54#define _PAGE_FILE _PAGE_WT /* software: pagecache or swap? */ 54#define _PAGE_FILE _PAGE_WT /* software: pagecache or swap? */
55#define _PAGE_SPECIAL 0x800 /* software: special page */
55 56
56#define _PAGE_SZ_MASK (_PAGE_SZ0 | _PAGE_SZ1) 57#define _PAGE_SZ_MASK (_PAGE_SZ0 | _PAGE_SZ1)
57#define _PAGE_PR_MASK (_PAGE_RW | _PAGE_USER) 58#define _PAGE_PR_MASK (_PAGE_RW | _PAGE_USER)
@@ -86,6 +87,14 @@
86#define _PAGE_PCC_ATR8 0x60000000 /* Attribute Memory space, 8 bit bus */ 87#define _PAGE_PCC_ATR8 0x60000000 /* Attribute Memory space, 8 bit bus */
87#define _PAGE_PCC_ATR16 0x60000001 /* Attribute Memory space, 6 bit bus */ 88#define _PAGE_PCC_ATR16 0x60000001 /* Attribute Memory space, 6 bit bus */
88 89
90#ifndef CONFIG_X2TLB
91/* copy the ptea attributes */
92static inline unsigned long copy_ptea_attributes(unsigned long x)
93{
94 return ((x >> 28) & 0xe) | (x & 0x1);
95}
96#endif
97
89/* Mask which drops unused bits from the PTEL value */ 98/* Mask which drops unused bits from the PTEL value */
90#if defined(CONFIG_CPU_SH3) 99#if defined(CONFIG_CPU_SH3)
91#define _PAGE_CLEAR_FLAGS (_PAGE_PROTNONE | _PAGE_ACCESSED| \ 100#define _PAGE_CLEAR_FLAGS (_PAGE_PROTNONE | _PAGE_ACCESSED| \
@@ -148,8 +157,12 @@
148# define _PAGE_SZHUGE (_PAGE_FLAGS_HARD) 157# define _PAGE_SZHUGE (_PAGE_FLAGS_HARD)
149#endif 158#endif
150 159
160/*
161 * Mask of bits that are to be preserved accross pgprot changes.
162 */
151#define _PAGE_CHG_MASK \ 163#define _PAGE_CHG_MASK \
152 (PTE_MASK | _PAGE_ACCESSED | _PAGE_CACHABLE | _PAGE_DIRTY) 164 (PTE_MASK | _PAGE_ACCESSED | _PAGE_CACHABLE | \
165 _PAGE_DIRTY | _PAGE_SPECIAL)
153 166
154#ifndef __ASSEMBLY__ 167#ifndef __ASSEMBLY__
155 168
@@ -328,7 +341,7 @@ static inline void set_pte(pte_t *ptep, pte_t pte)
328#define pte_dirty(pte) ((pte).pte_low & _PAGE_DIRTY) 341#define pte_dirty(pte) ((pte).pte_low & _PAGE_DIRTY)
329#define pte_young(pte) ((pte).pte_low & _PAGE_ACCESSED) 342#define pte_young(pte) ((pte).pte_low & _PAGE_ACCESSED)
330#define pte_file(pte) ((pte).pte_low & _PAGE_FILE) 343#define pte_file(pte) ((pte).pte_low & _PAGE_FILE)
331#define pte_special(pte) (0) 344#define pte_special(pte) ((pte).pte_low & _PAGE_SPECIAL)
332 345
333#ifdef CONFIG_X2TLB 346#ifdef CONFIG_X2TLB
334#define pte_write(pte) ((pte).pte_high & _PAGE_EXT_USER_WRITE) 347#define pte_write(pte) ((pte).pte_high & _PAGE_EXT_USER_WRITE)
@@ -358,8 +371,9 @@ PTE_BIT_FUNC(low, mkclean, &= ~_PAGE_DIRTY);
358PTE_BIT_FUNC(low, mkdirty, |= _PAGE_DIRTY); 371PTE_BIT_FUNC(low, mkdirty, |= _PAGE_DIRTY);
359PTE_BIT_FUNC(low, mkold, &= ~_PAGE_ACCESSED); 372PTE_BIT_FUNC(low, mkold, &= ~_PAGE_ACCESSED);
360PTE_BIT_FUNC(low, mkyoung, |= _PAGE_ACCESSED); 373PTE_BIT_FUNC(low, mkyoung, |= _PAGE_ACCESSED);
374PTE_BIT_FUNC(low, mkspecial, |= _PAGE_SPECIAL);
361 375
362static inline pte_t pte_mkspecial(pte_t pte) { return pte; } 376#define __HAVE_ARCH_PTE_SPECIAL
363 377
364/* 378/*
365 * Macro and implementation to make a page protection as uncachable. 379 * Macro and implementation to make a page protection as uncachable.
@@ -394,13 +408,19 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
394 408
395/* to find an entry in a page-table-directory. */ 409/* to find an entry in a page-table-directory. */
396#define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD-1)) 410#define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD-1))
397#define pgd_offset(mm, address) ((mm)->pgd+pgd_index(address)) 411#define pgd_offset(mm, address) ((mm)->pgd + pgd_index(address))
412#define __pgd_offset(address) pgd_index(address)
398 413
399/* to find an entry in a kernel page-table-directory */ 414/* to find an entry in a kernel page-table-directory */
400#define pgd_offset_k(address) pgd_offset(&init_mm, address) 415#define pgd_offset_k(address) pgd_offset(&init_mm, address)
401 416
417#define __pud_offset(address) (((address) >> PUD_SHIFT) & (PTRS_PER_PUD-1))
418#define __pmd_offset(address) (((address) >> PMD_SHIFT) & (PTRS_PER_PMD-1))
419
402/* Find an entry in the third-level page table.. */ 420/* Find an entry in the third-level page table.. */
403#define pte_index(address) ((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)) 421#define pte_index(address) ((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
422#define __pte_offset(address) pte_index(address)
423
404#define pte_offset_kernel(dir, address) \ 424#define pte_offset_kernel(dir, address) \
405 ((pte_t *) pmd_page_vaddr(*(dir)) + pte_index(address)) 425 ((pte_t *) pmd_page_vaddr(*(dir)) + pte_index(address))
406#define pte_offset_map(dir, address) pte_offset_kernel(dir, address) 426#define pte_offset_map(dir, address) pte_offset_kernel(dir, address)
diff --git a/arch/sh/include/asm/pgtable_64.h b/arch/sh/include/asm/pgtable_64.h
index c78990cda557..17cdbecc3adc 100644
--- a/arch/sh/include/asm/pgtable_64.h
+++ b/arch/sh/include/asm/pgtable_64.h
@@ -60,6 +60,9 @@ static __inline__ void pmd_set(pmd_t *pmdp,pte_t *ptep)
60/* To find an entry in a kernel PGD. */ 60/* To find an entry in a kernel PGD. */
61#define pgd_offset_k(address) pgd_offset(&init_mm, address) 61#define pgd_offset_k(address) pgd_offset(&init_mm, address)
62 62
63#define __pud_offset(address) (((address) >> PUD_SHIFT) & (PTRS_PER_PUD-1))
64#define __pmd_offset(address) (((address) >> PMD_SHIFT) & (PTRS_PER_PMD-1))
65
63/* 66/*
64 * PMD level access routines. Same notes as above. 67 * PMD level access routines. Same notes as above.
65 */ 68 */
@@ -80,6 +83,8 @@ static __inline__ void pmd_set(pmd_t *pmdp,pte_t *ptep)
80#define pte_index(address) \ 83#define pte_index(address) \
81 ((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)) 84 ((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
82 85
86#define __pte_offset(address) pte_index(address)
87
83#define pte_offset_kernel(dir, addr) \ 88#define pte_offset_kernel(dir, addr) \
84 ((pte_t *) ((pmd_val(*(dir))) & PAGE_MASK) + pte_index((addr))) 89 ((pte_t *) ((pmd_val(*(dir))) & PAGE_MASK) + pte_index((addr)))
85 90
diff --git a/arch/sh/include/asm/processor.h b/arch/sh/include/asm/processor.h
index ff7daaf9a620..017e0c1807b2 100644
--- a/arch/sh/include/asm/processor.h
+++ b/arch/sh/include/asm/processor.h
@@ -32,7 +32,7 @@ enum cpu_type {
32 32
33 /* SH-4A types */ 33 /* SH-4A types */
34 CPU_SH7763, CPU_SH7770, CPU_SH7780, CPU_SH7781, CPU_SH7785, CPU_SH7786, 34 CPU_SH7763, CPU_SH7770, CPU_SH7780, CPU_SH7781, CPU_SH7785, CPU_SH7786,
35 CPU_SH7723, CPU_SH7724, CPU_SHX3, 35 CPU_SH7723, CPU_SH7724, CPU_SH7757, CPU_SHX3,
36 36
37 /* SH4AL-DSP types */ 37 /* SH4AL-DSP types */
38 CPU_SH7343, CPU_SH7722, CPU_SH7366, 38 CPU_SH7343, CPU_SH7722, CPU_SH7366,
@@ -44,6 +44,17 @@ enum cpu_type {
44 CPU_SH_NONE 44 CPU_SH_NONE
45}; 45};
46 46
47enum cpu_family {
48 CPU_FAMILY_SH2,
49 CPU_FAMILY_SH2A,
50 CPU_FAMILY_SH3,
51 CPU_FAMILY_SH4,
52 CPU_FAMILY_SH4A,
53 CPU_FAMILY_SH4AL_DSP,
54 CPU_FAMILY_SH5,
55 CPU_FAMILY_UNKNOWN,
56};
57
47/* 58/*
48 * TLB information structure 59 * TLB information structure
49 * 60 *
@@ -61,7 +72,7 @@ struct tlb_info {
61}; 72};
62 73
63struct sh_cpuinfo { 74struct sh_cpuinfo {
64 unsigned int type; 75 unsigned int type, family;
65 int cut_major, cut_minor; 76 int cut_major, cut_minor;
66 unsigned long loops_per_jiffy; 77 unsigned long loops_per_jiffy;
67 unsigned long asid_cache; 78 unsigned long asid_cache;
diff --git a/arch/sh/include/asm/romimage-macros.h b/arch/sh/include/asm/romimage-macros.h
new file mode 100644
index 000000000000..ae17a150bb58
--- /dev/null
+++ b/arch/sh/include/asm/romimage-macros.h
@@ -0,0 +1,73 @@
1#ifndef __ROMIMAGE_MACRO_H
2#define __ROMIMAGE_MACRO_H
3
4/* The LIST command is used to include comments in the script */
5.macro LIST comment
6.endm
7
8/* The ED command is used to write a 32-bit word */
9.macro ED, addr, data
10 mov.l 1f, r1
11 mov.l 2f, r0
12 mov.l r0, @r1
13 bra 3f
14 nop
15 .align 2
161 : .long \addr
172 : .long \data
183 :
19.endm
20
21/* The EW command is used to write a 16-bit word */
22.macro EW, addr, data
23 mov.l 1f, r1
24 mov.l 2f, r0
25 mov.w r0, @r1
26 bra 3f
27 nop
28 .align 2
291 : .long \addr
302 : .long \data
313 :
32.endm
33
34/* The EB command is used to write an 8-bit word */
35.macro EB, addr, data
36 mov.l 1f, r1
37 mov.l 2f, r0
38 mov.b r0, @r1
39 bra 3f
40 nop
41 .align 2
421 : .long \addr
432 : .long \data
443 :
45.endm
46
47/* The WAIT command is used to delay the execution */
48.macro WAIT, time
49 mov.l 2f, r3
501 :
51 nop
52 tst r3, r3
53 bf/s 1b
54 dt r3
55 bra 3f
56 nop
57 .align 2
582 : .long \time * 100
593 :
60.endm
61
62/* The DD command is used to read a 32-bit word */
63.macro DD, addr, addr2, nr
64 mov.l 1f, r1
65 mov.l @r1, r0
66 bra 2f
67 nop
68 .align 2
691 : .long \addr
702 :
71.endm
72
73#endif /* __ROMIMAGE_MACRO_H */
diff --git a/arch/sh/include/asm/sections.h b/arch/sh/include/asm/sections.h
index 01a4076a3719..a78701da775b 100644
--- a/arch/sh/include/asm/sections.h
+++ b/arch/sh/include/asm/sections.h
@@ -7,6 +7,7 @@ extern void __nosave_begin, __nosave_end;
7extern long __machvec_start, __machvec_end; 7extern long __machvec_start, __machvec_end;
8extern char __uncached_start, __uncached_end; 8extern char __uncached_start, __uncached_end;
9extern char _ebss[]; 9extern char _ebss[];
10extern char __start_eh_frame[], __stop_eh_frame[];
10 11
11#endif /* __ASM_SH_SECTIONS_H */ 12#endif /* __ASM_SH_SECTIONS_H */
12 13
diff --git a/arch/sh/include/asm/sh_keysc.h b/arch/sh/include/asm/sh_keysc.h
index b5a4dd5a9729..4a65b1e40eab 100644
--- a/arch/sh/include/asm/sh_keysc.h
+++ b/arch/sh/include/asm/sh_keysc.h
@@ -7,6 +7,7 @@ struct sh_keysc_info {
7 enum { SH_KEYSC_MODE_1, SH_KEYSC_MODE_2, SH_KEYSC_MODE_3 } mode; 7 enum { SH_KEYSC_MODE_1, SH_KEYSC_MODE_2, SH_KEYSC_MODE_3 } mode;
8 int scan_timing; /* 0 -> 7, see KYCR1, SCN[2:0] */ 8 int scan_timing; /* 0 -> 7, see KYCR1, SCN[2:0] */
9 int delay; 9 int delay;
10 int kycr2_delay;
10 int keycodes[SH_KEYSC_MAXKEYS]; 11 int keycodes[SH_KEYSC_MAXKEYS];
11}; 12};
12 13
diff --git a/arch/sh/include/asm/smp.h b/arch/sh/include/asm/smp.h
index ca64f43abe67..53ef26ced75f 100644
--- a/arch/sh/include/asm/smp.h
+++ b/arch/sh/include/asm/smp.h
@@ -44,7 +44,6 @@ void plat_send_ipi(unsigned int cpu, unsigned int message);
44 44
45void arch_send_call_function_single_ipi(int cpu); 45void arch_send_call_function_single_ipi(int cpu);
46extern void arch_send_call_function_ipi_mask(const struct cpumask *mask); 46extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
47#define arch_send_call_function_ipi_mask arch_send_call_function_ipi_mask
48 47
49#else 48#else
50 49
diff --git a/arch/sh/include/asm/stacktrace.h b/arch/sh/include/asm/stacktrace.h
new file mode 100644
index 000000000000..797018213718
--- /dev/null
+++ b/arch/sh/include/asm/stacktrace.h
@@ -0,0 +1,25 @@
1/*
2 * Copyright (C) 2009 Matt Fleming
3 *
4 * Based on:
5 * The x86 implementation - arch/x86/include/asm/stacktrace.h
6 */
7#ifndef _ASM_SH_STACKTRACE_H
8#define _ASM_SH_STACKTRACE_H
9
10/* Generic stack tracer with callbacks */
11
12struct stacktrace_ops {
13 void (*warning)(void *data, char *msg);
14 /* msg must contain %s for the symbol */
15 void (*warning_symbol)(void *data, char *msg, unsigned long symbol);
16 void (*address)(void *data, unsigned long address, int reliable);
17 /* On negative return stop dumping */
18 int (*stack)(void *data, char *name);
19};
20
21void dump_trace(struct task_struct *tsk, struct pt_regs *regs,
22 unsigned long *stack,
23 const struct stacktrace_ops *ops, void *data);
24
25#endif /* _ASM_SH_STACKTRACE_H */
diff --git a/arch/sh/include/asm/suspend.h b/arch/sh/include/asm/suspend.h
index b1b995370e79..5c8ea28ff7a4 100644
--- a/arch/sh/include/asm/suspend.h
+++ b/arch/sh/include/asm/suspend.h
@@ -10,6 +10,15 @@ struct swsusp_arch_regs {
10 struct pt_regs user_regs; 10 struct pt_regs user_regs;
11 unsigned long bank1_regs[8]; 11 unsigned long bank1_regs[8];
12}; 12};
13
14void sh_mobile_call_standby(unsigned long mode);
15
16#ifdef CONFIG_CPU_IDLE
17void sh_mobile_setup_cpuidle(void);
18#else
19static inline void sh_mobile_setup_cpuidle(void) {}
20#endif
21
13#endif 22#endif
14 23
15/* flags passed to assembly suspend code */ 24/* flags passed to assembly suspend code */
diff --git a/arch/sh/include/asm/syscall_32.h b/arch/sh/include/asm/syscall_32.h
index 6f83f2cc45c1..7d80df4f09cb 100644
--- a/arch/sh/include/asm/syscall_32.h
+++ b/arch/sh/include/asm/syscall_32.h
@@ -65,6 +65,7 @@ static inline void syscall_get_arguments(struct task_struct *task,
65 case 3: args[2] = regs->regs[6]; 65 case 3: args[2] = regs->regs[6];
66 case 2: args[1] = regs->regs[5]; 66 case 2: args[1] = regs->regs[5];
67 case 1: args[0] = regs->regs[4]; 67 case 1: args[0] = regs->regs[4];
68 case 0:
68 break; 69 break;
69 default: 70 default:
70 BUG(); 71 BUG();
diff --git a/arch/sh/include/asm/system.h b/arch/sh/include/asm/system.h
index ab79e1f4fbe0..b5c5acdc8c0e 100644
--- a/arch/sh/include/asm/system.h
+++ b/arch/sh/include/asm/system.h
@@ -14,18 +14,6 @@
14 14
15#define AT_VECTOR_SIZE_ARCH 5 /* entries in ARCH_DLINFO */ 15#define AT_VECTOR_SIZE_ARCH 5 /* entries in ARCH_DLINFO */
16 16
17#if defined(CONFIG_CPU_SH4A) || defined(CONFIG_CPU_SH5)
18#define __icbi() \
19{ \
20 unsigned long __addr; \
21 __addr = 0xa8000000; \
22 __asm__ __volatile__( \
23 "icbi %0\n\t" \
24 : /* no output */ \
25 : "m" (__m(__addr))); \
26}
27#endif
28
29/* 17/*
30 * A brief note on ctrl_barrier(), the control register write barrier. 18 * A brief note on ctrl_barrier(), the control register write barrier.
31 * 19 *
@@ -44,7 +32,7 @@
44#define mb() __asm__ __volatile__ ("synco": : :"memory") 32#define mb() __asm__ __volatile__ ("synco": : :"memory")
45#define rmb() mb() 33#define rmb() mb()
46#define wmb() __asm__ __volatile__ ("synco": : :"memory") 34#define wmb() __asm__ __volatile__ ("synco": : :"memory")
47#define ctrl_barrier() __icbi() 35#define ctrl_barrier() __icbi(0xa8000000)
48#define read_barrier_depends() do { } while(0) 36#define read_barrier_depends() do { } while(0)
49#else 37#else
50#define mb() __asm__ __volatile__ ("": : :"memory") 38#define mb() __asm__ __volatile__ ("": : :"memory")
@@ -181,6 +169,11 @@ BUILD_TRAP_HANDLER(breakpoint);
181BUILD_TRAP_HANDLER(singlestep); 169BUILD_TRAP_HANDLER(singlestep);
182BUILD_TRAP_HANDLER(fpu_error); 170BUILD_TRAP_HANDLER(fpu_error);
183BUILD_TRAP_HANDLER(fpu_state_restore); 171BUILD_TRAP_HANDLER(fpu_state_restore);
172BUILD_TRAP_HANDLER(nmi);
173
174#ifdef CONFIG_BUG
175extern void handle_BUG(struct pt_regs *);
176#endif
184 177
185#define arch_align_stack(x) (x) 178#define arch_align_stack(x) (x)
186 179
diff --git a/arch/sh/include/asm/system_32.h b/arch/sh/include/asm/system_32.h
index 6c68a51f1cc5..607d413f6168 100644
--- a/arch/sh/include/asm/system_32.h
+++ b/arch/sh/include/asm/system_32.h
@@ -14,12 +14,12 @@ do { \
14 (u32 *)&tsk->thread.dsp_status; \ 14 (u32 *)&tsk->thread.dsp_status; \
15 __asm__ __volatile__ ( \ 15 __asm__ __volatile__ ( \
16 ".balign 4\n\t" \ 16 ".balign 4\n\t" \
17 "movs.l @r2+, a0\n\t" \
17 "movs.l @r2+, a1\n\t" \ 18 "movs.l @r2+, a1\n\t" \
18 "movs.l @r2+, a0g\n\t" \ 19 "movs.l @r2+, a0g\n\t" \
19 "movs.l @r2+, a1g\n\t" \ 20 "movs.l @r2+, a1g\n\t" \
20 "movs.l @r2+, m0\n\t" \ 21 "movs.l @r2+, m0\n\t" \
21 "movs.l @r2+, m1\n\t" \ 22 "movs.l @r2+, m1\n\t" \
22 "movs.l @r2+, a0\n\t" \
23 "movs.l @r2+, x0\n\t" \ 23 "movs.l @r2+, x0\n\t" \
24 "movs.l @r2+, x1\n\t" \ 24 "movs.l @r2+, x1\n\t" \
25 "movs.l @r2+, y0\n\t" \ 25 "movs.l @r2+, y0\n\t" \
@@ -39,20 +39,20 @@ do { \
39 \ 39 \
40 __asm__ __volatile__ ( \ 40 __asm__ __volatile__ ( \
41 ".balign 4\n\t" \ 41 ".balign 4\n\t" \
42 "stc.l mod, @-r2\n\t" \ 42 "stc.l mod, @-r2\n\t" \
43 "stc.l re, @-r2\n\t" \ 43 "stc.l re, @-r2\n\t" \
44 "stc.l rs, @-r2\n\t" \ 44 "stc.l rs, @-r2\n\t" \
45 "sts.l dsr, @-r2\n\t" \ 45 "sts.l dsr, @-r2\n\t" \
46 "sts.l y1, @-r2\n\t" \ 46 "movs.l y1, @-r2\n\t" \
47 "sts.l y0, @-r2\n\t" \ 47 "movs.l y0, @-r2\n\t" \
48 "sts.l x1, @-r2\n\t" \ 48 "movs.l x1, @-r2\n\t" \
49 "sts.l x0, @-r2\n\t" \ 49 "movs.l x0, @-r2\n\t" \
50 "sts.l a0, @-r2\n\t" \ 50 "movs.l m1, @-r2\n\t" \
51 ".word 0xf653 ! movs.l a1, @-r2\n\t" \ 51 "movs.l m0, @-r2\n\t" \
52 ".word 0xf6f3 ! movs.l a0g, @-r2\n\t" \ 52 "movs.l a1g, @-r2\n\t" \
53 ".word 0xf6d3 ! movs.l a1g, @-r2\n\t" \ 53 "movs.l a0g, @-r2\n\t" \
54 ".word 0xf6c3 ! movs.l m0, @-r2\n\t" \ 54 "movs.l a1, @-r2\n\t" \
55 ".word 0xf6e3 ! movs.l m1, @-r2\n\t" \ 55 "movs.l a0, @-r2\n\t" \
56 : : "r" (__ts2)); \ 56 : : "r" (__ts2)); \
57} while (0) 57} while (0)
58 58
@@ -63,6 +63,16 @@ do { \
63#define __restore_dsp(tsk) do { } while (0) 63#define __restore_dsp(tsk) do { } while (0)
64#endif 64#endif
65 65
66#if defined(CONFIG_CPU_SH4A)
67#define __icbi(addr) __asm__ __volatile__ ( "icbi @%0\n\t" : : "r" (addr))
68#else
69#define __icbi(addr) mb()
70#endif
71
72#define __ocbp(addr) __asm__ __volatile__ ( "ocbp @%0\n\t" : : "r" (addr))
73#define __ocbi(addr) __asm__ __volatile__ ( "ocbi @%0\n\t" : : "r" (addr))
74#define __ocbwb(addr) __asm__ __volatile__ ( "ocbwb @%0\n\t" : : "r" (addr))
75
66struct task_struct *__switch_to(struct task_struct *prev, 76struct task_struct *__switch_to(struct task_struct *prev,
67 struct task_struct *next); 77 struct task_struct *next);
68 78
@@ -198,8 +208,13 @@ do { \
198}) 208})
199#endif 209#endif
200 210
211static inline reg_size_t register_align(void *val)
212{
213 return (unsigned long)(signed long)val;
214}
215
201int handle_unaligned_access(insn_size_t instruction, struct pt_regs *regs, 216int handle_unaligned_access(insn_size_t instruction, struct pt_regs *regs,
202 struct mem_access *ma); 217 struct mem_access *ma, int);
203 218
204asmlinkage void do_address_error(struct pt_regs *regs, 219asmlinkage void do_address_error(struct pt_regs *regs,
205 unsigned long writeaccess, 220 unsigned long writeaccess,
diff --git a/arch/sh/include/asm/system_64.h b/arch/sh/include/asm/system_64.h
index 943acf5ea07c..8e4a03e7966c 100644
--- a/arch/sh/include/asm/system_64.h
+++ b/arch/sh/include/asm/system_64.h
@@ -37,4 +37,14 @@ do { \
37#define jump_to_uncached() do { } while (0) 37#define jump_to_uncached() do { } while (0)
38#define back_to_cached() do { } while (0) 38#define back_to_cached() do { } while (0)
39 39
40#define __icbi(addr) __asm__ __volatile__ ( "icbi %0, 0\n\t" : : "r" (addr))
41#define __ocbp(addr) __asm__ __volatile__ ( "ocbp %0, 0\n\t" : : "r" (addr))
42#define __ocbi(addr) __asm__ __volatile__ ( "ocbi %0, 0\n\t" : : "r" (addr))
43#define __ocbwb(addr) __asm__ __volatile__ ( "ocbwb %0, 0\n\t" : : "r" (addr))
44
45static inline reg_size_t register_align(void *val)
46{
47 return (unsigned long long)(signed long long)(signed long)val;
48}
49
40#endif /* __ASM_SH_SYSTEM_64_H */ 50#endif /* __ASM_SH_SYSTEM_64_H */
diff --git a/arch/sh/include/asm/thread_info.h b/arch/sh/include/asm/thread_info.h
index d570ac2e5cb9..bdeb9d46d17d 100644
--- a/arch/sh/include/asm/thread_info.h
+++ b/arch/sh/include/asm/thread_info.h
@@ -97,7 +97,7 @@ static inline struct thread_info *current_thread_info(void)
97 97
98extern struct thread_info *alloc_thread_info(struct task_struct *tsk); 98extern struct thread_info *alloc_thread_info(struct task_struct *tsk);
99extern void free_thread_info(struct thread_info *ti); 99extern void free_thread_info(struct thread_info *ti);
100 100
101#endif /* THREAD_SHIFT < PAGE_SHIFT */ 101#endif /* THREAD_SHIFT < PAGE_SHIFT */
102 102
103#endif /* __ASSEMBLY__ */ 103#endif /* __ASSEMBLY__ */
@@ -116,6 +116,7 @@ extern void free_thread_info(struct thread_info *ti);
116#define TIF_SYSCALL_AUDIT 5 /* syscall auditing active */ 116#define TIF_SYSCALL_AUDIT 5 /* syscall auditing active */
117#define TIF_SECCOMP 6 /* secure computing */ 117#define TIF_SECCOMP 6 /* secure computing */
118#define TIF_NOTIFY_RESUME 7 /* callback before returning to user */ 118#define TIF_NOTIFY_RESUME 7 /* callback before returning to user */
119#define TIF_SYSCALL_TRACEPOINT 8 /* for ftrace syscall instrumentation */
119#define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */ 120#define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */
120#define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */ 121#define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */
121#define TIF_MEMDIE 18 122#define TIF_MEMDIE 18
@@ -129,25 +130,27 @@ extern void free_thread_info(struct thread_info *ti);
129#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) 130#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT)
130#define _TIF_SECCOMP (1 << TIF_SECCOMP) 131#define _TIF_SECCOMP (1 << TIF_SECCOMP)
131#define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) 132#define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME)
133#define _TIF_SYSCALL_TRACEPOINT (1 << TIF_SYSCALL_TRACEPOINT)
132#define _TIF_USEDFPU (1 << TIF_USEDFPU) 134#define _TIF_USEDFPU (1 << TIF_USEDFPU)
133#define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) 135#define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG)
134#define _TIF_FREEZE (1 << TIF_FREEZE) 136#define _TIF_FREEZE (1 << TIF_FREEZE)
135 137
136/* 138/*
137 * _TIF_ALLWORK_MASK and _TIF_WORK_MASK need to fit within a byte, or we 139 * _TIF_ALLWORK_MASK and _TIF_WORK_MASK need to fit within 2 bytes, or we
138 * blow the tst immediate size constraints and need to fix up 140 * blow the tst immediate size constraints and need to fix up
139 * arch/sh/kernel/entry-common.S. 141 * arch/sh/kernel/entry-common.S.
140 */ 142 */
141 143
142/* work to do in syscall trace */ 144/* work to do in syscall trace */
143#define _TIF_WORK_SYSCALL_MASK (_TIF_SYSCALL_TRACE | _TIF_SINGLESTEP | \ 145#define _TIF_WORK_SYSCALL_MASK (_TIF_SYSCALL_TRACE | _TIF_SINGLESTEP | \
144 _TIF_SYSCALL_AUDIT | _TIF_SECCOMP) 146 _TIF_SYSCALL_AUDIT | _TIF_SECCOMP | \
147 _TIF_SYSCALL_TRACEPOINT)
145 148
146/* work to do on any return to u-space */ 149/* work to do on any return to u-space */
147#define _TIF_ALLWORK_MASK (_TIF_SYSCALL_TRACE | _TIF_SIGPENDING | \ 150#define _TIF_ALLWORK_MASK (_TIF_SYSCALL_TRACE | _TIF_SIGPENDING | \
148 _TIF_NEED_RESCHED | _TIF_SYSCALL_AUDIT | \ 151 _TIF_NEED_RESCHED | _TIF_SYSCALL_AUDIT | \
149 _TIF_SINGLESTEP | _TIF_RESTORE_SIGMASK | \ 152 _TIF_SINGLESTEP | _TIF_RESTORE_SIGMASK | \
150 _TIF_NOTIFY_RESUME) 153 _TIF_NOTIFY_RESUME | _TIF_SYSCALL_TRACEPOINT)
151 154
152/* work to do on interrupt/exception return */ 155/* work to do on interrupt/exception return */
153#define _TIF_WORK_MASK (_TIF_ALLWORK_MASK & ~(_TIF_SYSCALL_TRACE | \ 156#define _TIF_WORK_MASK (_TIF_ALLWORK_MASK & ~(_TIF_SYSCALL_TRACE | \
diff --git a/arch/sh/include/asm/topology.h b/arch/sh/include/asm/topology.h
index b69ee850906d..65e7bd2f2240 100644
--- a/arch/sh/include/asm/topology.h
+++ b/arch/sh/include/asm/topology.h
@@ -15,14 +15,14 @@
15 .cache_nice_tries = 2, \ 15 .cache_nice_tries = 2, \
16 .busy_idx = 3, \ 16 .busy_idx = 3, \
17 .idle_idx = 2, \ 17 .idle_idx = 2, \
18 .newidle_idx = 2, \ 18 .newidle_idx = 0, \
19 .wake_idx = 1, \ 19 .wake_idx = 0, \
20 .forkexec_idx = 1, \ 20 .forkexec_idx = 0, \
21 .flags = SD_LOAD_BALANCE \ 21 .flags = SD_LOAD_BALANCE \
22 | SD_BALANCE_FORK \ 22 | SD_BALANCE_FORK \
23 | SD_BALANCE_EXEC \ 23 | SD_BALANCE_EXEC \
24 | SD_SERIALIZE \ 24 | SD_BALANCE_NEWIDLE \
25 | SD_WAKE_BALANCE, \ 25 | SD_SERIALIZE, \
26 .last_balance = jiffies, \ 26 .last_balance = jiffies, \
27 .balance_interval = 1, \ 27 .balance_interval = 1, \
28 .nr_balance_failed = 0, \ 28 .nr_balance_failed = 0, \
@@ -31,7 +31,6 @@
31#define cpu_to_node(cpu) ((void)(cpu),0) 31#define cpu_to_node(cpu) ((void)(cpu),0)
32#define parent_node(node) ((void)(node),0) 32#define parent_node(node) ((void)(node),0)
33 33
34#define node_to_cpumask(node) ((void)node, cpu_online_map)
35#define cpumask_of_node(node) ((void)node, cpu_online_mask) 34#define cpumask_of_node(node) ((void)node, cpu_online_mask)
36 35
37#define pcibus_to_node(bus) ((void)(bus), -1) 36#define pcibus_to_node(bus) ((void)(bus), -1)
diff --git a/arch/sh/include/asm/types.h b/arch/sh/include/asm/types.h
index c7f3c94837dd..f8421f7ad63a 100644
--- a/arch/sh/include/asm/types.h
+++ b/arch/sh/include/asm/types.h
@@ -11,8 +11,10 @@
11 11
12#ifdef CONFIG_SUPERH32 12#ifdef CONFIG_SUPERH32
13typedef u16 insn_size_t; 13typedef u16 insn_size_t;
14typedef u32 reg_size_t;
14#else 15#else
15typedef u32 insn_size_t; 16typedef u32 insn_size_t;
17typedef u64 reg_size_t;
16#endif 18#endif
17 19
18#endif /* __ASSEMBLY__ */ 20#endif /* __ASSEMBLY__ */
diff --git a/arch/sh/include/asm/unistd_32.h b/arch/sh/include/asm/unistd_32.h
index 61d6ad93d786..f3fd1b9eb6b1 100644
--- a/arch/sh/include/asm/unistd_32.h
+++ b/arch/sh/include/asm/unistd_32.h
@@ -132,7 +132,7 @@
132#define __NR_clone 120 132#define __NR_clone 120
133#define __NR_setdomainname 121 133#define __NR_setdomainname 121
134#define __NR_uname 122 134#define __NR_uname 122
135#define __NR_modify_ldt 123 135#define __NR_cacheflush 123
136#define __NR_adjtimex 124 136#define __NR_adjtimex 124
137#define __NR_mprotect 125 137#define __NR_mprotect 125
138#define __NR_sigprocmask 126 138#define __NR_sigprocmask 126
@@ -344,7 +344,7 @@
344#define __NR_preadv 333 344#define __NR_preadv 333
345#define __NR_pwritev 334 345#define __NR_pwritev 334
346#define __NR_rt_tgsigqueueinfo 335 346#define __NR_rt_tgsigqueueinfo 335
347#define __NR_perf_counter_open 336 347#define __NR_perf_event_open 336
348 348
349#define NR_syscalls 337 349#define NR_syscalls 337
350 350
diff --git a/arch/sh/include/asm/unistd_64.h b/arch/sh/include/asm/unistd_64.h
index a751699afda3..343ce8f073ea 100644
--- a/arch/sh/include/asm/unistd_64.h
+++ b/arch/sh/include/asm/unistd_64.h
@@ -137,7 +137,7 @@
137#define __NR_clone 120 137#define __NR_clone 120
138#define __NR_setdomainname 121 138#define __NR_setdomainname 121
139#define __NR_uname 122 139#define __NR_uname 122
140#define __NR_modify_ldt 123 140#define __NR_cacheflush 123
141#define __NR_adjtimex 124 141#define __NR_adjtimex 124
142#define __NR_mprotect 125 142#define __NR_mprotect 125
143#define __NR_sigprocmask 126 143#define __NR_sigprocmask 126
@@ -384,7 +384,7 @@
384#define __NR_preadv 361 384#define __NR_preadv 361
385#define __NR_pwritev 362 385#define __NR_pwritev 362
386#define __NR_rt_tgsigqueueinfo 363 386#define __NR_rt_tgsigqueueinfo 363
387#define __NR_perf_counter_open 364 387#define __NR_perf_event_open 364
388 388
389#ifdef __KERNEL__ 389#ifdef __KERNEL__
390 390
diff --git a/arch/sh/include/asm/unwinder.h b/arch/sh/include/asm/unwinder.h
new file mode 100644
index 000000000000..1e65c07b3e18
--- /dev/null
+++ b/arch/sh/include/asm/unwinder.h
@@ -0,0 +1,31 @@
1#ifndef _LINUX_UNWINDER_H
2#define _LINUX_UNWINDER_H
3
4#include <asm/stacktrace.h>
5
6struct unwinder {
7 const char *name;
8 struct list_head list;
9 int rating;
10 void (*dump)(struct task_struct *, struct pt_regs *,
11 unsigned long *, const struct stacktrace_ops *, void *);
12};
13
14extern int unwinder_init(void);
15extern int unwinder_register(struct unwinder *);
16
17extern void unwind_stack(struct task_struct *, struct pt_regs *,
18 unsigned long *, const struct stacktrace_ops *,
19 void *);
20
21extern void stack_reader_dump(struct task_struct *, struct pt_regs *,
22 unsigned long *, const struct stacktrace_ops *,
23 void *);
24
25/*
26 * Used by fault handling code to signal to the unwinder code that it
27 * should switch to a different unwinder.
28 */
29extern int unwinder_faulted;
30
31#endif /* _LINUX_UNWINDER_H */
diff --git a/arch/sh/include/asm/vmlinux.lds.h b/arch/sh/include/asm/vmlinux.lds.h
new file mode 100644
index 000000000000..244ec4ad9a79
--- /dev/null
+++ b/arch/sh/include/asm/vmlinux.lds.h
@@ -0,0 +1,17 @@
1#ifndef __ASM_SH_VMLINUX_LDS_H
2#define __ASM_SH_VMLINUX_LDS_H
3
4#include <asm-generic/vmlinux.lds.h>
5
6#ifdef CONFIG_DWARF_UNWINDER
7#define DWARF_EH_FRAME \
8 .eh_frame : AT(ADDR(.eh_frame) - LOAD_OFFSET) { \
9 VMLINUX_SYMBOL(__start_eh_frame) = .; \
10 *(.eh_frame) \
11 VMLINUX_SYMBOL(__stop_eh_frame) = .; \
12 }
13#else
14#define DWARF_EH_FRAME
15#endif
16
17#endif /* __ASM_SH_VMLINUX_LDS_H */
diff --git a/arch/sh/include/asm/watchdog.h b/arch/sh/include/asm/watchdog.h
index f024fed00a72..2fe7cee9e43a 100644
--- a/arch/sh/include/asm/watchdog.h
+++ b/arch/sh/include/asm/watchdog.h
@@ -13,10 +13,18 @@
13#ifdef __KERNEL__ 13#ifdef __KERNEL__
14 14
15#include <linux/types.h> 15#include <linux/types.h>
16#include <linux/io.h>
17
18#define WTCNT_HIGH 0x5a
19#define WTCSR_HIGH 0xa5
20
21#define WTCSR_CKS2 0x04
22#define WTCSR_CKS1 0x02
23#define WTCSR_CKS0 0x01
24
16#include <cpu/watchdog.h> 25#include <cpu/watchdog.h>
17#include <asm/io.h>
18 26
19/* 27/*
20 * See cpu-sh2/watchdog.h for explanation of this stupidity.. 28 * See cpu-sh2/watchdog.h for explanation of this stupidity..
21 */ 29 */
22#ifndef WTCNT_R 30#ifndef WTCNT_R
@@ -27,13 +35,6 @@
27# define WTCSR_R WTCSR 35# define WTCSR_R WTCSR
28#endif 36#endif
29 37
30#define WTCNT_HIGH 0x5a
31#define WTCSR_HIGH 0xa5
32
33#define WTCSR_CKS2 0x04
34#define WTCSR_CKS1 0x02
35#define WTCSR_CKS0 0x01
36
37/* 38/*
38 * CKS0-2 supports a number of clock division ratios. At the time the watchdog 39 * CKS0-2 supports a number of clock division ratios. At the time the watchdog
39 * is enabled, it defaults to a 41 usec overflow period .. we overload this to 40 * is enabled, it defaults to a 41 usec overflow period .. we overload this to
diff --git a/arch/sh/include/cpu-common/cpu/cacheflush.h b/arch/sh/include/cpu-common/cpu/cacheflush.h
deleted file mode 100644
index c3db00b73605..000000000000
--- a/arch/sh/include/cpu-common/cpu/cacheflush.h
+++ /dev/null
@@ -1,44 +0,0 @@
1/*
2 * include/asm-sh/cpu-sh2/cacheflush.h
3 *
4 * Copyright (C) 2003 Paul Mundt
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 */
10#ifndef __ASM_CPU_SH2_CACHEFLUSH_H
11#define __ASM_CPU_SH2_CACHEFLUSH_H
12
13/*
14 * Cache flushing:
15 *
16 * - flush_cache_all() flushes entire cache
17 * - flush_cache_mm(mm) flushes the specified mm context's cache lines
18 * - flush_cache_dup mm(mm) handles cache flushing when forking
19 * - flush_cache_page(mm, vmaddr, pfn) flushes a single page
20 * - flush_cache_range(vma, start, end) flushes a range of pages
21 *
22 * - flush_dcache_page(pg) flushes(wback&invalidates) a page for dcache
23 * - flush_icache_range(start, end) flushes(invalidates) a range for icache
24 * - flush_icache_page(vma, pg) flushes(invalidates) a page for icache
25 *
26 * Caches are indexed (effectively) by physical address on SH-2, so
27 * we don't need them.
28 */
29#define flush_cache_all() do { } while (0)
30#define flush_cache_mm(mm) do { } while (0)
31#define flush_cache_dup_mm(mm) do { } while (0)
32#define flush_cache_range(vma, start, end) do { } while (0)
33#define flush_cache_page(vma, vmaddr, pfn) do { } while (0)
34#define flush_dcache_page(page) do { } while (0)
35#define flush_dcache_mmap_lock(mapping) do { } while (0)
36#define flush_dcache_mmap_unlock(mapping) do { } while (0)
37#define flush_icache_range(start, end) do { } while (0)
38#define flush_icache_page(vma,pg) do { } while (0)
39#define flush_icache_user_range(vma,pg,adr,len) do { } while (0)
40#define flush_cache_sigtramp(vaddr) do { } while (0)
41
42#define p3_cache_init() do { } while (0)
43
44#endif /* __ASM_CPU_SH2_CACHEFLUSH_H */
diff --git a/arch/sh/include/cpu-sh2a/cpu/cacheflush.h b/arch/sh/include/cpu-sh2a/cpu/cacheflush.h
deleted file mode 100644
index 3d3b9205d2ac..000000000000
--- a/arch/sh/include/cpu-sh2a/cpu/cacheflush.h
+++ /dev/null
@@ -1,34 +0,0 @@
1#ifndef __ASM_CPU_SH2A_CACHEFLUSH_H
2#define __ASM_CPU_SH2A_CACHEFLUSH_H
3
4/*
5 * Cache flushing:
6 *
7 * - flush_cache_all() flushes entire cache
8 * - flush_cache_mm(mm) flushes the specified mm context's cache lines
9 * - flush_cache_dup mm(mm) handles cache flushing when forking
10 * - flush_cache_page(mm, vmaddr, pfn) flushes a single page
11 * - flush_cache_range(vma, start, end) flushes a range of pages
12 *
13 * - flush_dcache_page(pg) flushes(wback&invalidates) a page for dcache
14 * - flush_icache_range(start, end) flushes(invalidates) a range for icache
15 * - flush_icache_page(vma, pg) flushes(invalidates) a page for icache
16 *
17 * Caches are indexed (effectively) by physical address on SH-2, so
18 * we don't need them.
19 */
20#define flush_cache_all() do { } while (0)
21#define flush_cache_mm(mm) do { } while (0)
22#define flush_cache_dup_mm(mm) do { } while (0)
23#define flush_cache_range(vma, start, end) do { } while (0)
24#define flush_cache_page(vma, vmaddr, pfn) do { } while (0)
25#define flush_dcache_page(page) do { } while (0)
26#define flush_dcache_mmap_lock(mapping) do { } while (0)
27#define flush_dcache_mmap_unlock(mapping) do { } while (0)
28void flush_icache_range(unsigned long start, unsigned long end);
29#define flush_icache_page(vma,pg) do { } while (0)
30#define flush_icache_user_range(vma,pg,adr,len) do { } while (0)
31#define flush_cache_sigtramp(vaddr) do { } while (0)
32
33#define p3_cache_init() do { } while (0)
34#endif /* __ASM_CPU_SH2A_CACHEFLUSH_H */
diff --git a/arch/sh/include/cpu-sh3/cpu/cacheflush.h b/arch/sh/include/cpu-sh3/cpu/cacheflush.h
deleted file mode 100644
index 1ac27aae6700..000000000000
--- a/arch/sh/include/cpu-sh3/cpu/cacheflush.h
+++ /dev/null
@@ -1,46 +0,0 @@
1/*
2 * include/asm-sh/cpu-sh3/cacheflush.h
3 *
4 * Copyright (C) 1999 Niibe Yutaka
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 */
10#ifndef __ASM_CPU_SH3_CACHEFLUSH_H
11#define __ASM_CPU_SH3_CACHEFLUSH_H
12
13#if defined(CONFIG_SH7705_CACHE_32KB)
14/* SH7705 is an SH3 processor with 32KB cache. This has alias issues like the
15 * SH4. Unlike the SH4 this is a unified cache so we need to do some work
16 * in mmap when 'exec'ing a new binary
17 */
18 /* 32KB cache, 4kb PAGE sizes need to check bit 12 */
19#define CACHE_ALIAS 0x00001000
20
21#define PG_mapped PG_arch_1
22
23void flush_cache_all(void);
24void flush_cache_mm(struct mm_struct *mm);
25#define flush_cache_dup_mm(mm) flush_cache_mm(mm)
26void flush_cache_range(struct vm_area_struct *vma, unsigned long start,
27 unsigned long end);
28void flush_cache_page(struct vm_area_struct *vma, unsigned long addr, unsigned long pfn);
29void flush_dcache_page(struct page *pg);
30void flush_icache_range(unsigned long start, unsigned long end);
31void flush_icache_page(struct vm_area_struct *vma, struct page *page);
32
33#define flush_dcache_mmap_lock(mapping) do { } while (0)
34#define flush_dcache_mmap_unlock(mapping) do { } while (0)
35
36/* SH3 has unified cache so no special action needed here */
37#define flush_cache_sigtramp(vaddr) do { } while (0)
38#define flush_icache_user_range(vma,pg,adr,len) do { } while (0)
39
40#define p3_cache_init() do { } while (0)
41
42#else
43#include <cpu-common/cpu/cacheflush.h>
44#endif
45
46#endif /* __ASM_CPU_SH3_CACHEFLUSH_H */
diff --git a/arch/sh/include/cpu-sh4/cpu/cacheflush.h b/arch/sh/include/cpu-sh4/cpu/cacheflush.h
deleted file mode 100644
index 065306d376eb..000000000000
--- a/arch/sh/include/cpu-sh4/cpu/cacheflush.h
+++ /dev/null
@@ -1,43 +0,0 @@
1/*
2 * include/asm-sh/cpu-sh4/cacheflush.h
3 *
4 * Copyright (C) 1999 Niibe Yutaka
5 * Copyright (C) 2003 Paul Mundt
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#ifndef __ASM_CPU_SH4_CACHEFLUSH_H
12#define __ASM_CPU_SH4_CACHEFLUSH_H
13
14/*
15 * Caches are broken on SH-4 (unless we use write-through
16 * caching; in which case they're only semi-broken),
17 * so we need them.
18 */
19void flush_cache_all(void);
20void flush_dcache_all(void);
21void flush_cache_mm(struct mm_struct *mm);
22#define flush_cache_dup_mm(mm) flush_cache_mm(mm)
23void flush_cache_range(struct vm_area_struct *vma, unsigned long start,
24 unsigned long end);
25void flush_cache_page(struct vm_area_struct *vma, unsigned long addr,
26 unsigned long pfn);
27void flush_dcache_page(struct page *pg);
28
29#define flush_dcache_mmap_lock(mapping) do { } while (0)
30#define flush_dcache_mmap_unlock(mapping) do { } while (0)
31
32void flush_icache_range(unsigned long start, unsigned long end);
33void flush_icache_user_range(struct vm_area_struct *vma, struct page *page,
34 unsigned long addr, int len);
35
36#define flush_icache_page(vma,pg) do { } while (0)
37
38/* Initialization of P3 area for copy_user_page */
39void p3_cache_init(void);
40
41#define PG_mapped PG_arch_1
42
43#endif /* __ASM_CPU_SH4_CACHEFLUSH_H */
diff --git a/arch/sh/include/cpu-sh4/cpu/dma-sh4a.h b/arch/sh/include/cpu-sh4/cpu/dma-sh4a.h
index 0ed5178fed69..f0886bc880e0 100644
--- a/arch/sh/include/cpu-sh4/cpu/dma-sh4a.h
+++ b/arch/sh/include/cpu-sh4/cpu/dma-sh4a.h
@@ -16,7 +16,8 @@
16#define DMAE0_IRQ 38 16#define DMAE0_IRQ 38
17#define SH_DMAC_BASE0 0xFF608020 17#define SH_DMAC_BASE0 0xFF608020
18#define SH_DMARS_BASE 0xFF609000 18#define SH_DMARS_BASE 0xFF609000
19#elif defined(CONFIG_CPU_SUBTYPE_SH7723) 19#elif defined(CONFIG_CPU_SUBTYPE_SH7723) || \
20 defined(CONFIG_CPU_SUBTYPE_SH7724)
20#define DMTE0_IRQ 48 /* DMAC0A*/ 21#define DMTE0_IRQ 48 /* DMAC0A*/
21#define DMTE4_IRQ 40 /* DMAC0B */ 22#define DMTE4_IRQ 40 /* DMAC0B */
22#define DMTE6_IRQ 42 23#define DMTE6_IRQ 42
diff --git a/arch/sh/include/cpu-sh4/cpu/freq.h b/arch/sh/include/cpu-sh4/cpu/freq.h
index ccf1d999db6d..e1e90960ee9a 100644
--- a/arch/sh/include/cpu-sh4/cpu/freq.h
+++ b/arch/sh/include/cpu-sh4/cpu/freq.h
@@ -22,6 +22,10 @@
22#define MSTPCR0 0xa4150030 22#define MSTPCR0 0xa4150030
23#define MSTPCR1 0xa4150034 23#define MSTPCR1 0xa4150034
24#define MSTPCR2 0xa4150038 24#define MSTPCR2 0xa4150038
25#elif defined(CONFIG_CPU_SUBTYPE_SH7757)
26#define FRQCR 0xffc80000
27#define OSCCR 0xffc80018
28#define PLLCR 0xffc80024
25#elif defined(CONFIG_CPU_SUBTYPE_SH7763) || \ 29#elif defined(CONFIG_CPU_SUBTYPE_SH7763) || \
26 defined(CONFIG_CPU_SUBTYPE_SH7780) 30 defined(CONFIG_CPU_SUBTYPE_SH7780)
27#define FRQCR 0xffc80000 31#define FRQCR 0xffc80000
diff --git a/arch/sh/include/cpu-sh4/cpu/sh7722.h b/arch/sh/include/cpu-sh4/cpu/sh7722.h
index 738ea43c5038..48560407cbe1 100644
--- a/arch/sh/include/cpu-sh4/cpu/sh7722.h
+++ b/arch/sh/include/cpu-sh4/cpu/sh7722.h
@@ -221,4 +221,18 @@ enum {
221 GPIO_FN_KEYOUT3, GPIO_FN_KEYOUT4_IN6, GPIO_FN_KEYOUT5_IN5, 221 GPIO_FN_KEYOUT3, GPIO_FN_KEYOUT4_IN6, GPIO_FN_KEYOUT5_IN5,
222}; 222};
223 223
224enum {
225 HWBLK_UNKNOWN = 0,
226 HWBLK_TLB, HWBLK_IC, HWBLK_OC, HWBLK_URAM, HWBLK_XYMEM,
227 HWBLK_INTC, HWBLK_DMAC, HWBLK_SHYWAY, HWBLK_HUDI,
228 HWBLK_UBC, HWBLK_TMU, HWBLK_CMT, HWBLK_RWDT, HWBLK_FLCTL,
229 HWBLK_SCIF0, HWBLK_SCIF1, HWBLK_SCIF2, HWBLK_SIO,
230 HWBLK_SIOF0, HWBLK_SIOF1, HWBLK_IIC, HWBLK_RTC,
231 HWBLK_TPU, HWBLK_IRDA, HWBLK_SDHI, HWBLK_SIM, HWBLK_KEYSC,
232 HWBLK_TSIF, HWBLK_USBF, HWBLK_2DG, HWBLK_SIU, HWBLK_VOU,
233 HWBLK_JPU, HWBLK_BEU, HWBLK_CEU, HWBLK_VEU, HWBLK_VPU,
234 HWBLK_LCDC,
235 HWBLK_NR,
236};
237
224#endif /* __ASM_SH7722_H__ */ 238#endif /* __ASM_SH7722_H__ */
diff --git a/arch/sh/include/cpu-sh4/cpu/sh7723.h b/arch/sh/include/cpu-sh4/cpu/sh7723.h
index 14c8ca936781..9b36fae72324 100644
--- a/arch/sh/include/cpu-sh4/cpu/sh7723.h
+++ b/arch/sh/include/cpu-sh4/cpu/sh7723.h
@@ -265,4 +265,21 @@ enum {
265 GPIO_FN_IDEA1, GPIO_FN_IDEA0, 265 GPIO_FN_IDEA1, GPIO_FN_IDEA0,
266}; 266};
267 267
268enum {
269 HWBLK_UNKNOWN = 0,
270 HWBLK_TLB, HWBLK_IC, HWBLK_OC, HWBLK_L2C, HWBLK_ILMEM, HWBLK_FPU,
271 HWBLK_INTC, HWBLK_DMAC0, HWBLK_SHYWAY,
272 HWBLK_HUDI, HWBLK_DBG, HWBLK_UBC, HWBLK_SUBC,
273 HWBLK_TMU0, HWBLK_CMT, HWBLK_RWDT, HWBLK_DMAC1, HWBLK_TMU1,
274 HWBLK_FLCTL,
275 HWBLK_SCIF0, HWBLK_SCIF1, HWBLK_SCIF2,
276 HWBLK_SCIF3, HWBLK_SCIF4, HWBLK_SCIF5,
277 HWBLK_MSIOF0, HWBLK_MSIOF1, HWBLK_MERAM, HWBLK_IIC, HWBLK_RTC,
278 HWBLK_ATAPI, HWBLK_ADC, HWBLK_TPU, HWBLK_IRDA, HWBLK_TSIF, HWBLK_ICB,
279 HWBLK_SDHI0, HWBLK_SDHI1, HWBLK_KEYSC, HWBLK_USB,
280 HWBLK_2DG, HWBLK_SIU, HWBLK_VEU2H1, HWBLK_VOU, HWBLK_BEU, HWBLK_CEU,
281 HWBLK_VEU2H0, HWBLK_VPU, HWBLK_LCDC,
282 HWBLK_NR,
283};
284
268#endif /* __ASM_SH7723_H__ */ 285#endif /* __ASM_SH7723_H__ */
diff --git a/arch/sh/include/cpu-sh4/cpu/sh7724.h b/arch/sh/include/cpu-sh4/cpu/sh7724.h
index 66fd1184359e..0cd1f71a1116 100644
--- a/arch/sh/include/cpu-sh4/cpu/sh7724.h
+++ b/arch/sh/include/cpu-sh4/cpu/sh7724.h
@@ -266,4 +266,21 @@ enum {
266 GPIO_FN_INTC_IRQ1, GPIO_FN_INTC_IRQ0, 266 GPIO_FN_INTC_IRQ1, GPIO_FN_INTC_IRQ0,
267}; 267};
268 268
269enum {
270 HWBLK_UNKNOWN = 0,
271 HWBLK_TLB, HWBLK_IC, HWBLK_OC, HWBLK_RSMEM, HWBLK_ILMEM, HWBLK_L2C,
272 HWBLK_FPU, HWBLK_INTC, HWBLK_DMAC0, HWBLK_SHYWAY,
273 HWBLK_HUDI, HWBLK_DBG, HWBLK_UBC,
274 HWBLK_TMU0, HWBLK_CMT, HWBLK_RWDT, HWBLK_DMAC1, HWBLK_TMU1,
275 HWBLK_SCIF0, HWBLK_SCIF1, HWBLK_SCIF2, HWBLK_SCIF3,
276 HWBLK_SCIF4, HWBLK_SCIF5, HWBLK_MSIOF0, HWBLK_MSIOF1,
277 HWBLK_KEYSC, HWBLK_RTC, HWBLK_IIC0, HWBLK_IIC1,
278 HWBLK_MMC, HWBLK_ETHER, HWBLK_ATAPI, HWBLK_TPU, HWBLK_IRDA,
279 HWBLK_TSIF, HWBLK_USB1, HWBLK_USB0, HWBLK_2DG,
280 HWBLK_SDHI0, HWBLK_SDHI1, HWBLK_VEU1, HWBLK_CEU1, HWBLK_BEU1,
281 HWBLK_2DDMAC, HWBLK_SPU, HWBLK_JPU, HWBLK_VOU,
282 HWBLK_BEU0, HWBLK_CEU0, HWBLK_VEU0, HWBLK_VPU, HWBLK_LCDC,
283 HWBLK_NR,
284};
285
269#endif /* __ASM_SH7724_H__ */ 286#endif /* __ASM_SH7724_H__ */
diff --git a/arch/sh/include/cpu-sh4/cpu/sh7757.h b/arch/sh/include/cpu-sh4/cpu/sh7757.h
new file mode 100644
index 000000000000..f4d267efad71
--- /dev/null
+++ b/arch/sh/include/cpu-sh4/cpu/sh7757.h
@@ -0,0 +1,243 @@
1#ifndef __ASM_SH7757_H__
2#define __ASM_SH7757_H__
3
4enum {
5 /* PTA */
6 GPIO_PTA7, GPIO_PTA6, GPIO_PTA5, GPIO_PTA4,
7 GPIO_PTA3, GPIO_PTA2, GPIO_PTA1, GPIO_PTA0,
8
9 /* PTB */
10 GPIO_PTB7, GPIO_PTB6, GPIO_PTB5, GPIO_PTB4,
11 GPIO_PTB3, GPIO_PTB2, GPIO_PTB1, GPIO_PTB0,
12
13 /* PTC */
14 GPIO_PTC7, GPIO_PTC6, GPIO_PTC5, GPIO_PTC4,
15 GPIO_PTC3, GPIO_PTC2, GPIO_PTC1, GPIO_PTC0,
16
17 /* PTD */
18 GPIO_PTD7, GPIO_PTD6, GPIO_PTD5, GPIO_PTD4,
19 GPIO_PTD3, GPIO_PTD2, GPIO_PTD1, GPIO_PTD0,
20
21 /* PTE */
22 GPIO_PTE7, GPIO_PTE6, GPIO_PTE5, GPIO_PTE4,
23 GPIO_PTE3, GPIO_PTE2, GPIO_PTE1, GPIO_PTE0,
24
25 /* PTF */
26 GPIO_PTF7, GPIO_PTF6, GPIO_PTF5, GPIO_PTF4,
27 GPIO_PTF3, GPIO_PTF2, GPIO_PTF1, GPIO_PTF0,
28
29 /* PTG */
30 GPIO_PTG7, GPIO_PTG6, GPIO_PTG5, GPIO_PTG4,
31 GPIO_PTG3, GPIO_PTG2, GPIO_PTG1, GPIO_PTG0,
32
33 /* PTH */
34 GPIO_PTH7, GPIO_PTH6, GPIO_PTH5, GPIO_PTH4,
35 GPIO_PTH3, GPIO_PTH2, GPIO_PTH1, GPIO_PTH0,
36
37 /* PTI */
38 GPIO_PTI7, GPIO_PTI6, GPIO_PTI5, GPIO_PTI4,
39 GPIO_PTI3, GPIO_PTI2, GPIO_PTI1, GPIO_PTI0,
40
41 /* PTJ */
42 GPIO_PTJ7, GPIO_PTJ6, GPIO_PTJ5, GPIO_PTJ4,
43 GPIO_PTJ3, GPIO_PTJ2, GPIO_PTJ1, GPIO_PTJ0,
44
45 /* PTK */
46 GPIO_PTK7, GPIO_PTK6, GPIO_PTK5, GPIO_PTK4,
47 GPIO_PTK3, GPIO_PTK2, GPIO_PTK1, GPIO_PTK0,
48
49 /* PTL */
50 GPIO_PTL7, GPIO_PTL6, GPIO_PTL5, GPIO_PTL4,
51 GPIO_PTL3, GPIO_PTL2, GPIO_PTL1, GPIO_PTL0,
52
53 /* PTM */
54 GPIO_PTM6, GPIO_PTM5, GPIO_PTM4,
55 GPIO_PTM3, GPIO_PTM2, GPIO_PTM1, GPIO_PTM0,
56
57 /* PTN */
58 GPIO_PTN7, GPIO_PTN6, GPIO_PTN5, GPIO_PTN4,
59 GPIO_PTN3, GPIO_PTN2, GPIO_PTN1, GPIO_PTN0,
60
61 /* PTO */
62 GPIO_PTO7, GPIO_PTO6, GPIO_PTO5, GPIO_PTO4,
63 GPIO_PTO3, GPIO_PTO2, GPIO_PTO1, GPIO_PTO0,
64
65 /* PTP */
66 GPIO_PTP6, GPIO_PTP5, GPIO_PTP4,
67 GPIO_PTP3, GPIO_PTP2, GPIO_PTP1, GPIO_PTP0,
68
69 /* PTQ */
70 GPIO_PTQ6, GPIO_PTQ5, GPIO_PTQ4,
71 GPIO_PTQ3, GPIO_PTQ2, GPIO_PTQ1, GPIO_PTQ0,
72
73 /* PTR */
74 GPIO_PTR7, GPIO_PTR6, GPIO_PTR5, GPIO_PTR4,
75 GPIO_PTR3, GPIO_PTR2, GPIO_PTR1, GPIO_PTR0,
76
77 /* PTS */
78 GPIO_PTS7, GPIO_PTS6, GPIO_PTS5, GPIO_PTS4,
79 GPIO_PTS3, GPIO_PTS2, GPIO_PTS1, GPIO_PTS0,
80
81 /* PTT */
82 GPIO_PTT5, GPIO_PTT4,
83 GPIO_PTT3, GPIO_PTT2, GPIO_PTT1, GPIO_PTT0,
84
85 /* PTU */
86 GPIO_PTU7, GPIO_PTU6, GPIO_PTU5, GPIO_PTU4,
87 GPIO_PTU3, GPIO_PTU2, GPIO_PTU1, GPIO_PTU0,
88
89 /* PTV */
90 GPIO_PTV7, GPIO_PTV6, GPIO_PTV5, GPIO_PTV4,
91 GPIO_PTV3, GPIO_PTV2, GPIO_PTV1, GPIO_PTV0,
92
93 /* PTW */
94 GPIO_PTW7, GPIO_PTW6, GPIO_PTW5, GPIO_PTW4,
95 GPIO_PTW3, GPIO_PTW2, GPIO_PTW1, GPIO_PTW0,
96
97 /* PTX */
98 GPIO_PTX7, GPIO_PTX6, GPIO_PTX5, GPIO_PTX4,
99 GPIO_PTX3, GPIO_PTX2, GPIO_PTX1, GPIO_PTX0,
100
101 /* PTY */
102 GPIO_PTY7, GPIO_PTY6, GPIO_PTY5, GPIO_PTY4,
103 GPIO_PTY3, GPIO_PTY2, GPIO_PTY1, GPIO_PTY0,
104
105 /* PTZ */
106 GPIO_PTZ7, GPIO_PTZ6, GPIO_PTZ5, GPIO_PTZ4,
107 GPIO_PTZ3, GPIO_PTZ2, GPIO_PTZ1, GPIO_PTZ0,
108
109
110 /* PTA (mobule: LBSC, CPG, LPC) */
111 GPIO_FN_BS, GPIO_FN_RDWR, GPIO_FN_WE1, GPIO_FN_RDY,
112 GPIO_FN_MD10, GPIO_FN_MD9, GPIO_FN_MD8,
113 GPIO_FN_LGPIO7, GPIO_FN_LGPIO6, GPIO_FN_LGPIO5, GPIO_FN_LGPIO4,
114 GPIO_FN_LGPIO3, GPIO_FN_LGPIO2, GPIO_FN_LGPIO1, GPIO_FN_LGPIO0,
115
116 /* PTB (mobule: LBSC, EtherC, SIM, LPC) */
117 GPIO_FN_D15, GPIO_FN_D14, GPIO_FN_D13, GPIO_FN_D12,
118 GPIO_FN_D11, GPIO_FN_D10, GPIO_FN_D9, GPIO_FN_D8,
119 GPIO_FN_ET0_MDC, GPIO_FN_ET0_MDIO,
120 GPIO_FN_ET1_MDC, GPIO_FN_ET1_MDIO,
121 GPIO_FN_SIM_D, GPIO_FN_SIM_CLK, GPIO_FN_SIM_RST,
122 GPIO_FN_WPSZ1, GPIO_FN_WPSZ0, GPIO_FN_FWID, GPIO_FN_FLSHSZ,
123 GPIO_FN_LPC_SPIEN, GPIO_FN_BASEL,
124
125 /* PTC (mobule: SD) */
126 GPIO_FN_SD_WP, GPIO_FN_SD_CD, GPIO_FN_SD_CLK, GPIO_FN_SD_CMD,
127 GPIO_FN_SD_D3, GPIO_FN_SD_D2, GPIO_FN_SD_D1, GPIO_FN_SD_D0,
128
129 /* PTD (mobule: INTC, SPI0, LBSC, CPG, ADC) */
130 GPIO_FN_IRQ7, GPIO_FN_IRQ6, GPIO_FN_IRQ5, GPIO_FN_IRQ4,
131 GPIO_FN_IRQ3, GPIO_FN_IRQ2, GPIO_FN_IRQ1, GPIO_FN_IRQ0,
132 GPIO_FN_MD6, GPIO_FN_MD5, GPIO_FN_MD3, GPIO_FN_MD2,
133 GPIO_FN_MD1, GPIO_FN_MD0, GPIO_FN_ADTRG1, GPIO_FN_ADTRG0,
134
135 /* PTE (mobule: EtherC) */
136 GPIO_FN_ET0_CRS_DV, GPIO_FN_ET0_TXD1,
137 GPIO_FN_ET0_TXD0, GPIO_FN_ET0_TX_EN,
138 GPIO_FN_ET0_REF_CLK, GPIO_FN_ET0_RXD1,
139 GPIO_FN_ET0_RXD0, GPIO_FN_ET0_RX_ER,
140
141 /* PTF (mobule: EtherC) */
142 GPIO_FN_ET1_CRS_DV, GPIO_FN_ET1_TXD1,
143 GPIO_FN_ET1_TXD0, GPIO_FN_ET1_TX_EN,
144 GPIO_FN_ET1_REF_CLK, GPIO_FN_ET1_RXD1,
145 GPIO_FN_ET1_RXD0, GPIO_FN_ET1_RX_ER,
146
147 /* PTG (mobule: SYSTEM, PWMX, LPC) */
148 GPIO_FN_STATUS0, GPIO_FN_STATUS1,
149 GPIO_FN_PWX0, GPIO_FN_PWX1, GPIO_FN_PWX2, GPIO_FN_PWX3,
150 GPIO_FN_SERIRQ, GPIO_FN_CLKRUN, GPIO_FN_LPCPD, GPIO_FN_LDRQ,
151
152 /* PTH (mobule: TMU, SCIF234, SPI1, SPI0) */
153 GPIO_FN_TCLK, GPIO_FN_RXD4, GPIO_FN_TXD4,
154 GPIO_FN_SP1_MOSI, GPIO_FN_SP1_MISO,
155 GPIO_FN_SP1_SCK, GPIO_FN_SP1_SCK_FB,
156 GPIO_FN_SP1_SS0, GPIO_FN_SP1_SS1,
157 GPIO_FN_SP0_SS1,
158
159 /* PTI (mobule: INTC) */
160 GPIO_FN_IRQ15, GPIO_FN_IRQ14, GPIO_FN_IRQ13, GPIO_FN_IRQ12,
161 GPIO_FN_IRQ11, GPIO_FN_IRQ10, GPIO_FN_IRQ9, GPIO_FN_IRQ8,
162
163 /* PTJ (mobule: SCIF234, SERMUX) */
164 GPIO_FN_RXD3, GPIO_FN_TXD3, GPIO_FN_RXD2, GPIO_FN_TXD2,
165 GPIO_FN_COM1_TXD, GPIO_FN_COM1_RXD,
166 GPIO_FN_COM1_RTS, GPIO_FN_COM1_CTS,
167
168 /* PTK (mobule: SERMUX) */
169 GPIO_FN_COM2_TXD, GPIO_FN_COM2_RXD,
170 GPIO_FN_COM2_RTS, GPIO_FN_COM2_CTS,
171 GPIO_FN_COM2_DTR, GPIO_FN_COM2_DSR,
172 GPIO_FN_COM2_DCD, GPIO_FN_COM2_RI,
173
174 /* PTL (mobule: SERMUX) */
175 GPIO_FN_RAC_TXD, GPIO_FN_RAC_RXD,
176 GPIO_FN_RAC_RTS, GPIO_FN_RAC_CTS,
177 GPIO_FN_RAC_DTR, GPIO_FN_RAC_DSR,
178 GPIO_FN_RAC_DCD, GPIO_FN_RAC_RI,
179
180 /* PTM (mobule: IIC, LPC) */
181 GPIO_FN_SDA6, GPIO_FN_SCL6, GPIO_FN_SDA7, GPIO_FN_SCL7,
182 GPIO_FN_WP, GPIO_FN_FMS0, GPIO_FN_FMS1,
183
184 /* PTN (mobule: SCIF234, EVC) */
185 GPIO_FN_SCK2, GPIO_FN_RTS4, GPIO_FN_RTS3, GPIO_FN_RTS2,
186 GPIO_FN_CTS4, GPIO_FN_CTS3, GPIO_FN_CTS2,
187 GPIO_FN_EVENT7, GPIO_FN_EVENT6, GPIO_FN_EVENT5, GPIO_FN_EVENT4,
188 GPIO_FN_EVENT3, GPIO_FN_EVENT2, GPIO_FN_EVENT1, GPIO_FN_EVENT0,
189
190 /* PTO (mobule: SGPIO) */
191 GPIO_FN_SGPIO0_CLK, GPIO_FN_SGPIO0_LOAD,
192 GPIO_FN_SGPIO0_DI, GPIO_FN_SGPIO0_DO,
193 GPIO_FN_SGPIO1_CLK, GPIO_FN_SGPIO1_LOAD,
194 GPIO_FN_SGPIO1_DI, GPIO_FN_SGPIO1_DO,
195
196 /* PTP (mobule: JMC, SCIF234) */
197 GPIO_FN_JMCTCK, GPIO_FN_JMCTMS, GPIO_FN_JMCTDO, GPIO_FN_JMCTDI,
198 GPIO_FN_JMCRST, GPIO_FN_SCK4, GPIO_FN_SCK3,
199
200 /* PTQ (mobule: LPC) */
201 GPIO_FN_LAD3, GPIO_FN_LAD2, GPIO_FN_LAD1, GPIO_FN_LAD0,
202 GPIO_FN_LFRAME, GPIO_FN_LRESET, GPIO_FN_LCLK,
203
204 /* PTR (mobule: GRA, IIC) */
205 GPIO_FN_DDC3, GPIO_FN_DDC2,
206 GPIO_FN_SDA8, GPIO_FN_SCL8, GPIO_FN_SDA2, GPIO_FN_SCL2,
207 GPIO_FN_SDA1, GPIO_FN_SCL1, GPIO_FN_SDA0, GPIO_FN_SCL0,
208
209 /* PTS (mobule: GRA, IIC) */
210 GPIO_FN_DDC1, GPIO_FN_DDC0,
211 GPIO_FN_SDA9, GPIO_FN_SCL9, GPIO_FN_SDA5, GPIO_FN_SCL5,
212 GPIO_FN_SDA4, GPIO_FN_SCL4, GPIO_FN_SDA3, GPIO_FN_SCL3,
213
214 /* PTT (mobule: SYSTEM, PWMX) */
215 GPIO_FN_AUDSYNC, GPIO_FN_AUDCK,
216 GPIO_FN_AUDATA3, GPIO_FN_AUDATA2,
217 GPIO_FN_AUDATA1, GPIO_FN_AUDATA0,
218 GPIO_FN_PWX7, GPIO_FN_PWX6, GPIO_FN_PWX5, GPIO_FN_PWX4,
219
220 /* PTU (mobule: LBSC, DMAC) */
221 GPIO_FN_CS6, GPIO_FN_CS5, GPIO_FN_CS4, GPIO_FN_CS0,
222 GPIO_FN_RD, GPIO_FN_WE0, GPIO_FN_A25, GPIO_FN_A24,
223 GPIO_FN_DREQ0, GPIO_FN_DACK0,
224
225 /* PTV (mobule: LBSC, DMAC) */
226 GPIO_FN_A23, GPIO_FN_A22, GPIO_FN_A21, GPIO_FN_A20,
227 GPIO_FN_A19, GPIO_FN_A18, GPIO_FN_A17, GPIO_FN_A16,
228 GPIO_FN_TEND0, GPIO_FN_DREQ1, GPIO_FN_DACK1, GPIO_FN_TEND1,
229
230 /* PTW (mobule: LBSC) */
231 GPIO_FN_A15, GPIO_FN_A14, GPIO_FN_A13, GPIO_FN_A12,
232 GPIO_FN_A11, GPIO_FN_A10, GPIO_FN_A9, GPIO_FN_A8,
233
234 /* PTX (mobule: LBSC) */
235 GPIO_FN_A7, GPIO_FN_A6, GPIO_FN_A5, GPIO_FN_A4,
236 GPIO_FN_A3, GPIO_FN_A2, GPIO_FN_A1, GPIO_FN_A0,
237
238 /* PTY (mobule: LBSC) */
239 GPIO_FN_D7, GPIO_FN_D6, GPIO_FN_D5, GPIO_FN_D4,
240 GPIO_FN_D3, GPIO_FN_D2, GPIO_FN_D1, GPIO_FN_D0,
241};
242
243#endif /* __ASM_SH7757_H__ */
diff --git a/arch/sh/include/cpu-sh5/cpu/cacheflush.h b/arch/sh/include/cpu-sh5/cpu/cacheflush.h
deleted file mode 100644
index 5a11f0b7e66a..000000000000
--- a/arch/sh/include/cpu-sh5/cpu/cacheflush.h
+++ /dev/null
@@ -1,33 +0,0 @@
1#ifndef __ASM_SH_CPU_SH5_CACHEFLUSH_H
2#define __ASM_SH_CPU_SH5_CACHEFLUSH_H
3
4#ifndef __ASSEMBLY__
5
6struct vm_area_struct;
7struct page;
8struct mm_struct;
9
10extern void flush_cache_all(void);
11extern void flush_cache_mm(struct mm_struct *mm);
12extern void flush_cache_sigtramp(unsigned long vaddr);
13extern void flush_cache_range(struct vm_area_struct *vma, unsigned long start,
14 unsigned long end);
15extern void flush_cache_page(struct vm_area_struct *vma, unsigned long addr, unsigned long pfn);
16extern void flush_dcache_page(struct page *pg);
17extern void flush_icache_range(unsigned long start, unsigned long end);
18extern void flush_icache_user_range(struct vm_area_struct *vma,
19 struct page *page, unsigned long addr,
20 int len);
21
22#define flush_cache_dup_mm(mm) flush_cache_mm(mm)
23
24#define flush_dcache_mmap_lock(mapping) do { } while (0)
25#define flush_dcache_mmap_unlock(mapping) do { } while (0)
26
27#define flush_icache_page(vma, page) do { } while (0)
28void p3_cache_init(void);
29
30#endif /* __ASSEMBLY__ */
31
32#endif /* __ASM_SH_CPU_SH5_CACHEFLUSH_H */
33
diff --git a/arch/sh/include/mach-common/mach/migor.h b/arch/sh/include/mach-common/mach/migor.h
deleted file mode 100644
index e451f0229e00..000000000000
--- a/arch/sh/include/mach-common/mach/migor.h
+++ /dev/null
@@ -1,64 +0,0 @@
1#ifndef __ASM_SH_MIGOR_H
2#define __ASM_SH_MIGOR_H
3
4/*
5 * linux/include/asm-sh/migor.h
6 *
7 * Copyright (C) 2008 Renesas Solutions
8 *
9 * Portions Copyright (C) 2007 Nobuhiro Iwamatsu
10 *
11 * This file is subject to the terms and conditions of the GNU General Public
12 * License. See the file "COPYING" in the main directory of this archive
13 * for more details.
14 *
15 */
16#include <asm/addrspace.h>
17
18/* GPIO */
19#define PORT_PACR 0xa4050100
20#define PORT_PDCR 0xa4050106
21#define PORT_PECR 0xa4050108
22#define PORT_PHCR 0xa405010e
23#define PORT_PJCR 0xa4050110
24#define PORT_PKCR 0xa4050112
25#define PORT_PLCR 0xa4050114
26#define PORT_PMCR 0xa4050116
27#define PORT_PRCR 0xa405011c
28#define PORT_PTCR 0xa4050140
29#define PORT_PUCR 0xa4050142
30#define PORT_PVCR 0xa4050144
31#define PORT_PWCR 0xa4050146
32#define PORT_PXCR 0xa4050148
33#define PORT_PYCR 0xa405014a
34#define PORT_PZCR 0xa405014c
35#define PORT_PADR 0xa4050120
36#define PORT_PHDR 0xa405012e
37#define PORT_PTDR 0xa4050160
38#define PORT_PWDR 0xa4050166
39
40#define PORT_HIZCRA 0xa4050158
41#define PORT_HIZCRC 0xa405015c
42
43#define PORT_MSELCRB 0xa4050182
44
45#define PORT_PSELA 0xa405014e
46#define PORT_PSELB 0xa4050150
47#define PORT_PSELC 0xa4050152
48#define PORT_PSELD 0xa4050154
49#define PORT_PSELE 0xa4050156
50
51#define PORT_HIZCRA 0xa4050158
52#define PORT_HIZCRB 0xa405015a
53#define PORT_HIZCRC 0xa405015c
54
55#define BSC_CS4BCR 0xfec10010
56#define BSC_CS6ABCR 0xfec1001c
57#define BSC_CS4WCR 0xfec10030
58
59#include <video/sh_mobile_lcdc.h>
60
61int migor_lcd_qvga_setup(void *board_data, void *sys_ops_handle,
62 struct sh_mobile_lcdc_sys_bus_ops *sys_ops);
63
64#endif /* __ASM_SH_MIGOR_H */
diff --git a/arch/sh/include/mach-common/mach/romimage.h b/arch/sh/include/mach-common/mach/romimage.h
new file mode 100644
index 000000000000..267e24112d82
--- /dev/null
+++ b/arch/sh/include/mach-common/mach/romimage.h
@@ -0,0 +1 @@
/* do nothing here by default */
diff --git a/arch/sh/include/mach-common/mach/sh7785lcr.h b/arch/sh/include/mach-common/mach/sh7785lcr.h
index 90011d435f30..1292ae5c21b3 100644
--- a/arch/sh/include/mach-common/mach/sh7785lcr.h
+++ b/arch/sh/include/mach-common/mach/sh7785lcr.h
@@ -35,6 +35,8 @@
35#define PCA9564_ADDR 0x06000000 /* I2C */ 35#define PCA9564_ADDR 0x06000000 /* I2C */
36#define PCA9564_SIZE 0x00000100 36#define PCA9564_SIZE 0x00000100
37 37
38#define PCA9564_PROTO_32BIT_ADDR 0x14000000
39
38#define SM107_MEM_ADDR 0x10000000 40#define SM107_MEM_ADDR 0x10000000
39#define SM107_MEM_SIZE 0x00e00000 41#define SM107_MEM_SIZE 0x00e00000
40#define SM107_REG_ADDR 0x13e00000 42#define SM107_REG_ADDR 0x13e00000
diff --git a/arch/sh/include/mach-ecovec24/mach/partner-jet-setup.txt b/arch/sh/include/mach-ecovec24/mach/partner-jet-setup.txt
new file mode 100644
index 000000000000..8b8e4fa1fee9
--- /dev/null
+++ b/arch/sh/include/mach-ecovec24/mach/partner-jet-setup.txt
@@ -0,0 +1,82 @@
1LIST "partner-jet-setup.txt"
2LIST "(C) Copyright 2009 Renesas Solutions Corp"
3LIST "Kuninori Morimoto <morimoto.kuninori@renesas.com>"
4LIST "--------------------------------"
5LIST "zImage (RAM boot)"
6LIST "This script can be used to boot the kernel from RAM via JTAG:"
7LIST "> < partner-jet-setup.txt"
8LIST "> RD zImage, 0xa8800000"
9LIST "> G=0xa8800000"
10LIST "--------------------------------"
11LIST "romImage (Flash boot)"
12LIST "Use the following command to burn the zImage to flash via JTAG:"
13LIST "> RD romImage, 0"
14LIST "--------------------------------"
15
16LIST "disable watchdog"
17EW 0xa4520004, 0xa507
18
19LIST "MMU"
20ED 0xff000010, 0x00000004
21
22LIST "setup clocks"
23ED 0xa4150024, 0x00004000
24ED 0xa4150000, 0x8E003508
25ED 0xa4150004, 0x00000000
26
27WAIT 1
28
29LIST "BSC"
30ED 0xff800020, 0xa5a50000
31ED 0xfec10000, 0x00000013
32ED 0xfec10004, 0x11110400
33ED 0xfec10024, 0x00000440
34
35WAIT 1
36
37LIST "setup sdram"
38ED 0xfd000108, 0x00000181
39ED 0xfd000020, 0x015B0002
40ED 0xfd000030, 0x03061502
41ED 0xfd000034, 0x02020102
42ED 0xfd000038, 0x01090305
43ED 0xfd00003c, 0x00000002
44ED 0xfd000008, 0x00000005
45ED 0xfd000018, 0x00000001
46
47WAIT 1
48
49ED 0xfd000014, 0x00000002
50ED 0xfd000060, 0x00020000
51ED 0xfd000060, 0x00030000
52ED 0xfd000060, 0x00010040
53ED 0xfd000060, 0x00000532
54ED 0xfd000014, 0x00000002
55ED 0xfd000014, 0x00000004
56ED 0xfd000014, 0x00000004
57ED 0xfd000060, 0x00000432
58ED 0xfd000060, 0x000103C0
59ED 0xfd000060, 0x00010040
60
61WAIT 1
62
63ED 0xfd000010, 0x00000001
64ED 0xfd000044, 0x00000613
65ED 0xfd000048, 0x238C003A
66ED 0xfd000014, 0x00000002
67
68LIST "Dummy read"
69DD 0x0c400000, 0x0c400000
70
71ED 0xfd000014, 0x00000002
72ED 0xfd000014, 0x00000004
73ED 0xfd000108, 0x00000080
74ED 0xfd000040, 0x00010000
75
76WAIT 1
77
78LIST "setup cache"
79ED 0xff00001c, 0x0000090b
80
81LIST "disable USB"
82EW 0xA4D80000, 0x0000
diff --git a/arch/sh/include/mach-ecovec24/mach/romimage.h b/arch/sh/include/mach-ecovec24/mach/romimage.h
new file mode 100644
index 000000000000..1c8787ecb1c1
--- /dev/null
+++ b/arch/sh/include/mach-ecovec24/mach/romimage.h
@@ -0,0 +1,20 @@
1/* EcoVec board specific boot code:
2 * converts the "partner-jet-script.txt" script into assembly
3 * the assembly code is the first code to be executed in the romImage
4 */
5
6#include <asm/romimage-macros.h>
7#include "partner-jet-setup.txt"
8
9 /* execute icbi after enabling cache */
10 mov.l 1f, r0
11 icbi @r0
12
13 /* jump to cached area */
14 mova 2f, r0
15 jmp @r0
16 nop
17
18 .align 2
191 : .long 0xa8000000
202 :
diff --git a/arch/sh/include/mach-kfr2r09/mach/kfr2r09.h b/arch/sh/include/mach-kfr2r09/mach/kfr2r09.h
new file mode 100644
index 000000000000..174374e19547
--- /dev/null
+++ b/arch/sh/include/mach-kfr2r09/mach/kfr2r09.h
@@ -0,0 +1,21 @@
1#ifndef __ASM_SH_KFR2R09_H
2#define __ASM_SH_KFR2R09_H
3
4#include <video/sh_mobile_lcdc.h>
5
6#ifdef CONFIG_FB_SH_MOBILE_LCDC
7void kfr2r09_lcd_on(void *board_data);
8void kfr2r09_lcd_off(void *board_data);
9int kfr2r09_lcd_setup(void *board_data, void *sys_ops_handle,
10 struct sh_mobile_lcdc_sys_bus_ops *sys_ops);
11#else
12static inline void kfr2r09_lcd_on(void *board_data) {}
13static inline void kfr2r09_lcd_off(void *board_data) {}
14static inline int kfr2r09_lcd_setup(void *board_data, void *sys_ops_handle,
15 struct sh_mobile_lcdc_sys_bus_ops *sys_ops)
16{
17 return -ENODEV;
18}
19#endif
20
21#endif /* __ASM_SH_KFR2R09_H */
diff --git a/arch/sh/include/mach-kfr2r09/mach/partner-jet-setup.txt b/arch/sh/include/mach-kfr2r09/mach/partner-jet-setup.txt
new file mode 100644
index 000000000000..3a65503714ee
--- /dev/null
+++ b/arch/sh/include/mach-kfr2r09/mach/partner-jet-setup.txt
@@ -0,0 +1,143 @@
1LIST "partner-jet-setup.txt - 20090729 Magnus Damm"
2LIST "set up enough of the kfr2r09 hardware to boot the kernel"
3
4LIST "zImage (RAM boot)"
5LIST "This script can be used to boot the kernel from RAM via JTAG:"
6LIST "> < partner-jet-setup.txt"
7LIST "> RD zImage, 0xa8800000"
8LIST "> G=0xa8800000"
9
10LIST "romImage (Flash boot)"
11LIST "Use the following command to burn the zImage to flash via JTAG:"
12LIST "> RD romImage, 0"
13
14LIST "--------------------------------"
15
16LIST "disable watchdog"
17EW 0xa4520004, 0xa507
18
19LIST "invalidate instruction cache"
20ED 0xff00001c, 0x00000800
21
22LIST "invalidate TLBs"
23ED 0xff000010, 0x00000004
24
25LIST "select mode for cs5 + cs6"
26ED 0xff800020, 0xa5a50001
27ED 0xfec10000, 0x0000001b
28
29LIST "setup clocks"
30LIST "The PLL and FLL values are updated here for the optimal"
31LIST "RF frequency and improved reception sensitivity."
32ED 0xa4150004, 0x00000050
33ED 0xa4150000, 0x91053508
34WAIT 1
35ED 0xa4150050, 0x00000340
36ED 0xa4150024, 0x00005000
37
38LIST "setup pins"
39EB 0xa4050120, 0x00
40EB 0xa4050122, 0x00
41EB 0xa4050124, 0x00
42EB 0xa4050126, 0x00
43EB 0xa4050128, 0xA0
44EB 0xa405012A, 0x10
45EB 0xa405012C, 0x00
46EB 0xa405012E, 0x00
47EB 0xa4050130, 0x00
48EB 0xa4050132, 0x00
49EB 0xa4050134, 0x01
50EB 0xa4050136, 0x40
51EB 0xa4050138, 0x00
52EB 0xa405013A, 0x00
53EB 0xa405013C, 0x00
54EB 0xa405013E, 0x20
55EB 0xa4050160, 0x00
56EB 0xa4050162, 0x40
57EB 0xa4050164, 0x03
58EB 0xa4050166, 0x00
59EB 0xa4050168, 0x00
60EB 0xa405016A, 0x00
61EB 0xa405016C, 0x00
62
63EW 0xa405014E, 0x5660
64EW 0xa4050150, 0x0145
65EW 0xa4050152, 0x1550
66EW 0xa4050154, 0x0200
67EW 0xa4050156, 0x0040
68
69EW 0xa4050158, 0x0000
70EW 0xa405015a, 0x0000
71EW 0xa405015c, 0x0000
72EW 0xa405015e, 0x0000
73
74EW 0xa4050180, 0x0000
75EW 0xa4050182, 0x8002
76EW 0xa4050184, 0x0000
77
78EW 0xa405018a, 0x9991
79EW 0xa405018c, 0x8011
80EW 0xa405018e, 0x9550
81
82EW 0xa4050100, 0x0000
83EW 0xa4050102, 0x5540
84EW 0xa4050104, 0x0000
85EW 0xa4050106, 0x0000
86EW 0xa4050108, 0x4550
87EW 0xa405010a, 0x0130
88EW 0xa405010c, 0x0555
89EW 0xa405010e, 0x0000
90EW 0xa4050110, 0x0000
91EW 0xa4050112, 0xAAA8
92EW 0xa4050114, 0x8305
93EW 0xa4050116, 0x10F0
94EW 0xa4050118, 0x0F50
95EW 0xa405011a, 0x0000
96EW 0xa405011c, 0x0000
97EW 0xa405011e, 0x0555
98EW 0xa4050140, 0x0000
99EW 0xa4050142, 0x5141
100EW 0xa4050144, 0x5005
101EW 0xa4050146, 0xAAA9
102EW 0xa4050148, 0xFAA9
103EW 0xa405014a, 0x3000
104EW 0xa405014c, 0x0000
105
106LIST "setup sdram"
107ED 0xFD000108, 0x40000301
108ED 0xFD000020, 0x011B0002
109ED 0xFD000030, 0x03060E02
110ED 0xFD000034, 0x01020102
111ED 0xFD000038, 0x01090406
112ED 0xFD000008, 0x00000004
113ED 0xFD000040, 0x00000001
114ED 0xFD000040, 0x00000000
115ED 0xFD000018, 0x00000001
116
117WAIT 1
118
119ED 0xFD000014, 0x00000002
120ED 0xFD000060, 0x00000032
121ED 0xFD000060, 0x00020000
122ED 0xFD000014, 0x00000004
123ED 0xFD000014, 0x00000004
124ED 0xFD000010, 0x00000001
125ED 0xFD000044, 0x000004AF
126ED 0xFD000048, 0x20CF0037
127
128LIST "read 16 bytes from sdram"
129DD 0xa8000000, 0xa8000000, 1
130DD 0xa8000004, 0xa8000004, 1
131DD 0xa8000008, 0xa8000008, 1
132DD 0xa800000c, 0xa800000c, 1
133
134ED 0xFD000014, 0x00000002
135ED 0xFD000014, 0x00000004
136ED 0xFD000108, 0x40000300
137ED 0xFD000040, 0x00010000
138
139LIST "write to internal ram"
140ED 0xfd8007fc, 0
141
142LIST "setup cache"
143ED 0xff00001c, 0x0000090b
diff --git a/arch/sh/include/mach-kfr2r09/mach/romimage.h b/arch/sh/include/mach-kfr2r09/mach/romimage.h
new file mode 100644
index 000000000000..a110823f2bde
--- /dev/null
+++ b/arch/sh/include/mach-kfr2r09/mach/romimage.h
@@ -0,0 +1,20 @@
1/* kfr2r09 board specific boot code:
2 * converts the "partner-jet-script.txt" script into assembly
3 * the assembly code is the first code to be executed in the romImage
4 */
5
6#include <asm/romimage-macros.h>
7#include "partner-jet-setup.txt"
8
9 /* execute icbi after enabling cache */
10 mov.l 1f, r0
11 icbi @r0
12
13 /* jump to cached area */
14 mova 2f, r0
15 jmp @r0
16 nop
17
18 .align 2
191: .long 0xa8000000
202:
diff --git a/arch/sh/include/mach-migor/mach/migor.h b/arch/sh/include/mach-migor/mach/migor.h
new file mode 100644
index 000000000000..cee6cb88e020
--- /dev/null
+++ b/arch/sh/include/mach-migor/mach/migor.h
@@ -0,0 +1,14 @@
1#ifndef __ASM_SH_MIGOR_H
2#define __ASM_SH_MIGOR_H
3
4#define PORT_MSELCRB 0xa4050182
5#define BSC_CS4BCR 0xfec10010
6#define BSC_CS6ABCR 0xfec1001c
7#define BSC_CS4WCR 0xfec10030
8
9#include <video/sh_mobile_lcdc.h>
10
11int migor_lcd_qvga_setup(void *board_data, void *sys_ops_handle,
12 struct sh_mobile_lcdc_sys_bus_ops *sys_ops);
13
14#endif /* __ASM_SH_MIGOR_H */
diff --git a/arch/sh/kernel/Makefile b/arch/sh/kernel/Makefile
index 349d833deab5..a2d0a40f3848 100644
--- a/arch/sh/kernel/Makefile
+++ b/arch/sh/kernel/Makefile
@@ -1,5 +1,41 @@
1ifeq ($(CONFIG_SUPERH32),y) 1#
2include ${srctree}/arch/sh/kernel/Makefile_32 2# Makefile for the Linux/SuperH kernel.
3else 3#
4include ${srctree}/arch/sh/kernel/Makefile_64 4
5extra-y := head_$(BITS).o init_task.o vmlinux.lds
6
7ifdef CONFIG_FUNCTION_TRACER
8# Do not profile debug and lowlevel utilities
9CFLAGS_REMOVE_ftrace.o = -pg
5endif 10endif
11
12obj-y := debugtraps.o dumpstack.o idle.o io.o io_generic.o irq.o \
13 machvec.o nmi_debug.o process_$(BITS).o ptrace_$(BITS).o \
14 setup.o signal_$(BITS).o sys_sh.o sys_sh$(BITS).o \
15 syscalls_$(BITS).o time.o topology.o traps.o \
16 traps_$(BITS).o unwinder.o
17
18obj-y += cpu/
19obj-$(CONFIG_VSYSCALL) += vsyscall/
20obj-$(CONFIG_SMP) += smp.o
21obj-$(CONFIG_SH_STANDARD_BIOS) += sh_bios.o
22obj-$(CONFIG_KGDB) += kgdb.o
23obj-$(CONFIG_SH_CPU_FREQ) += cpufreq.o
24obj-$(CONFIG_MODULES) += sh_ksyms_$(BITS).o module.o
25obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
26obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o
27obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
28obj-$(CONFIG_STACKTRACE) += stacktrace.o
29obj-$(CONFIG_IO_TRAPPED) += io_trapped.o
30obj-$(CONFIG_KPROBES) += kprobes.o
31obj-$(CONFIG_GENERIC_GPIO) += gpio.o
32obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o
33obj-$(CONFIG_FTRACE_SYSCALLS) += ftrace.o
34obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o
35obj-$(CONFIG_DUMP_CODE) += disassemble.o
36obj-$(CONFIG_HIBERNATION) += swsusp.o
37obj-$(CONFIG_DWARF_UNWINDER) += dwarf.o
38
39obj-$(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST) += localtimer.o
40
41EXTRA_CFLAGS += -Werror
diff --git a/arch/sh/kernel/Makefile_32 b/arch/sh/kernel/Makefile_32
deleted file mode 100644
index 9411e3e31e68..000000000000
--- a/arch/sh/kernel/Makefile_32
+++ /dev/null
@@ -1,37 +0,0 @@
1#
2# Makefile for the Linux/SuperH kernel.
3#
4
5extra-y := head_32.o init_task.o vmlinux.lds
6
7ifdef CONFIG_FUNCTION_TRACER
8# Do not profile debug and lowlevel utilities
9CFLAGS_REMOVE_ftrace.o = -pg
10endif
11
12obj-y := debugtraps.o idle.o io.o io_generic.o irq.o \
13 machvec.o process_32.o ptrace_32.o setup.o signal_32.o \
14 sys_sh.o sys_sh32.o syscalls_32.o time.o topology.o \
15 traps.o traps_32.o
16
17obj-y += cpu/
18obj-$(CONFIG_VSYSCALL) += vsyscall/
19obj-$(CONFIG_SMP) += smp.o
20obj-$(CONFIG_SH_STANDARD_BIOS) += sh_bios.o
21obj-$(CONFIG_KGDB) += kgdb.o
22obj-$(CONFIG_SH_CPU_FREQ) += cpufreq.o
23obj-$(CONFIG_MODULES) += sh_ksyms_32.o module.o
24obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
25obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o
26obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
27obj-$(CONFIG_STACKTRACE) += stacktrace.o
28obj-$(CONFIG_IO_TRAPPED) += io_trapped.o
29obj-$(CONFIG_KPROBES) += kprobes.o
30obj-$(CONFIG_GENERIC_GPIO) += gpio.o
31obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o
32obj-$(CONFIG_DUMP_CODE) += disassemble.o
33obj-$(CONFIG_HIBERNATION) += swsusp.o
34
35obj-$(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST) += localtimer.o
36
37EXTRA_CFLAGS += -Werror
diff --git a/arch/sh/kernel/Makefile_64 b/arch/sh/kernel/Makefile_64
deleted file mode 100644
index 67b9f6c6326b..000000000000
--- a/arch/sh/kernel/Makefile_64
+++ /dev/null
@@ -1,19 +0,0 @@
1extra-y := head_64.o init_task.o vmlinux.lds
2
3obj-y := debugtraps.o idle.o io.o io_generic.o irq.o machvec.o process_64.o \
4 ptrace_64.o setup.o signal_64.o sys_sh.o sys_sh64.o \
5 syscalls_64.o time.o topology.o traps.o traps_64.o
6
7obj-y += cpu/
8obj-$(CONFIG_SMP) += smp.o
9obj-$(CONFIG_SH_CPU_FREQ) += cpufreq.o
10obj-$(CONFIG_MODULES) += sh_ksyms_64.o module.o
11obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
12obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
13obj-$(CONFIG_STACKTRACE) += stacktrace.o
14obj-$(CONFIG_IO_TRAPPED) += io_trapped.o
15obj-$(CONFIG_GENERIC_GPIO) += gpio.o
16
17obj-$(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST) += localtimer.o
18
19EXTRA_CFLAGS += -Werror
diff --git a/arch/sh/kernel/asm-offsets.c b/arch/sh/kernel/asm-offsets.c
index 99aceb28ee24..d218e808294e 100644
--- a/arch/sh/kernel/asm-offsets.c
+++ b/arch/sh/kernel/asm-offsets.c
@@ -26,6 +26,7 @@ int main(void)
26 DEFINE(TI_CPU, offsetof(struct thread_info, cpu)); 26 DEFINE(TI_CPU, offsetof(struct thread_info, cpu));
27 DEFINE(TI_PRE_COUNT, offsetof(struct thread_info, preempt_count)); 27 DEFINE(TI_PRE_COUNT, offsetof(struct thread_info, preempt_count));
28 DEFINE(TI_RESTART_BLOCK,offsetof(struct thread_info, restart_block)); 28 DEFINE(TI_RESTART_BLOCK,offsetof(struct thread_info, restart_block));
29 DEFINE(TI_SIZE, sizeof(struct thread_info));
29 30
30#ifdef CONFIG_HIBERNATION 31#ifdef CONFIG_HIBERNATION
31 DEFINE(PBE_ADDRESS, offsetof(struct pbe, address)); 32 DEFINE(PBE_ADDRESS, offsetof(struct pbe, address));
diff --git a/arch/sh/kernel/cpu/Makefile b/arch/sh/kernel/cpu/Makefile
index eecad7cbd61e..3d6b9312dc47 100644
--- a/arch/sh/kernel/cpu/Makefile
+++ b/arch/sh/kernel/cpu/Makefile
@@ -19,4 +19,4 @@ obj-$(CONFIG_UBC_WAKEUP) += ubc.o
19obj-$(CONFIG_SH_ADC) += adc.o 19obj-$(CONFIG_SH_ADC) += adc.o
20obj-$(CONFIG_SH_CLK_CPG) += clock-cpg.o 20obj-$(CONFIG_SH_CLK_CPG) += clock-cpg.o
21 21
22obj-y += irq/ init.o clock.o 22obj-y += irq/ init.o clock.o hwblk.o
diff --git a/arch/sh/kernel/cpu/hwblk.c b/arch/sh/kernel/cpu/hwblk.c
new file mode 100644
index 000000000000..c0ad7d46e784
--- /dev/null
+++ b/arch/sh/kernel/cpu/hwblk.c
@@ -0,0 +1,155 @@
1#include <linux/clk.h>
2#include <linux/compiler.h>
3#include <linux/slab.h>
4#include <linux/io.h>
5#include <linux/spinlock.h>
6#include <asm/suspend.h>
7#include <asm/hwblk.h>
8#include <asm/clock.h>
9
10static DEFINE_SPINLOCK(hwblk_lock);
11
12static void hwblk_area_mod_cnt(struct hwblk_info *info,
13 int area, int counter, int value, int goal)
14{
15 struct hwblk_area *hap = info->areas + area;
16
17 hap->cnt[counter] += value;
18
19 if (hap->cnt[counter] != goal)
20 return;
21
22 if (hap->flags & HWBLK_AREA_FLAG_PARENT)
23 hwblk_area_mod_cnt(info, hap->parent, counter, value, goal);
24}
25
26
27static int __hwblk_mod_cnt(struct hwblk_info *info, int hwblk,
28 int counter, int value, int goal)
29{
30 struct hwblk *hp = info->hwblks + hwblk;
31
32 hp->cnt[counter] += value;
33 if (hp->cnt[counter] == goal)
34 hwblk_area_mod_cnt(info, hp->area, counter, value, goal);
35
36 return hp->cnt[counter];
37}
38
39static void hwblk_mod_cnt(struct hwblk_info *info, int hwblk,
40 int counter, int value, int goal)
41{
42 unsigned long flags;
43
44 spin_lock_irqsave(&hwblk_lock, flags);
45 __hwblk_mod_cnt(info, hwblk, counter, value, goal);
46 spin_unlock_irqrestore(&hwblk_lock, flags);
47}
48
49void hwblk_cnt_inc(struct hwblk_info *info, int hwblk, int counter)
50{
51 hwblk_mod_cnt(info, hwblk, counter, 1, 1);
52}
53
54void hwblk_cnt_dec(struct hwblk_info *info, int hwblk, int counter)
55{
56 hwblk_mod_cnt(info, hwblk, counter, -1, 0);
57}
58
59void hwblk_enable(struct hwblk_info *info, int hwblk)
60{
61 struct hwblk *hp = info->hwblks + hwblk;
62 unsigned long tmp;
63 unsigned long flags;
64 int ret;
65
66 spin_lock_irqsave(&hwblk_lock, flags);
67
68 ret = __hwblk_mod_cnt(info, hwblk, HWBLK_CNT_USAGE, 1, 1);
69 if (ret == 1) {
70 tmp = __raw_readl(hp->mstp);
71 tmp &= ~(1 << hp->bit);
72 __raw_writel(tmp, hp->mstp);
73 }
74
75 spin_unlock_irqrestore(&hwblk_lock, flags);
76}
77
78void hwblk_disable(struct hwblk_info *info, int hwblk)
79{
80 struct hwblk *hp = info->hwblks + hwblk;
81 unsigned long tmp;
82 unsigned long flags;
83 int ret;
84
85 spin_lock_irqsave(&hwblk_lock, flags);
86
87 ret = __hwblk_mod_cnt(info, hwblk, HWBLK_CNT_USAGE, -1, 0);
88 if (ret == 0) {
89 tmp = __raw_readl(hp->mstp);
90 tmp |= 1 << hp->bit;
91 __raw_writel(tmp, hp->mstp);
92 }
93
94 spin_unlock_irqrestore(&hwblk_lock, flags);
95}
96
97struct hwblk_info *hwblk_info;
98
99int __init hwblk_register(struct hwblk_info *info)
100{
101 hwblk_info = info;
102 return 0;
103}
104
105int __init __weak arch_hwblk_init(void)
106{
107 return 0;
108}
109
110int __weak arch_hwblk_sleep_mode(void)
111{
112 return SUSP_SH_SLEEP;
113}
114
115int __init hwblk_init(void)
116{
117 return arch_hwblk_init();
118}
119
120/* allow clocks to enable and disable hardware blocks */
121static int sh_hwblk_clk_enable(struct clk *clk)
122{
123 if (!hwblk_info)
124 return -ENOENT;
125
126 hwblk_enable(hwblk_info, clk->arch_flags);
127 return 0;
128}
129
130static void sh_hwblk_clk_disable(struct clk *clk)
131{
132 if (hwblk_info)
133 hwblk_disable(hwblk_info, clk->arch_flags);
134}
135
136static struct clk_ops sh_hwblk_clk_ops = {
137 .enable = sh_hwblk_clk_enable,
138 .disable = sh_hwblk_clk_disable,
139 .recalc = followparent_recalc,
140};
141
142int __init sh_hwblk_clk_register(struct clk *clks, int nr)
143{
144 struct clk *clkp;
145 int ret = 0;
146 int k;
147
148 for (k = 0; !ret && (k < nr); k++) {
149 clkp = clks + k;
150 clkp->ops = &sh_hwblk_clk_ops;
151 ret |= clk_register(clkp);
152 }
153
154 return ret;
155}
diff --git a/arch/sh/kernel/cpu/init.c b/arch/sh/kernel/cpu/init.c
index ad85421099cd..e932ebef4738 100644
--- a/arch/sh/kernel/cpu/init.c
+++ b/arch/sh/kernel/cpu/init.c
@@ -3,7 +3,7 @@
3 * 3 *
4 * CPU init code 4 * CPU init code
5 * 5 *
6 * Copyright (C) 2002 - 2007 Paul Mundt 6 * Copyright (C) 2002 - 2009 Paul Mundt
7 * Copyright (C) 2003 Richard Curnow 7 * Copyright (C) 2003 Richard Curnow
8 * 8 *
9 * This file is subject to the terms and conditions of the GNU General Public 9 * This file is subject to the terms and conditions of the GNU General Public
@@ -62,6 +62,37 @@ static void __init speculative_execution_init(void)
62#define speculative_execution_init() do { } while (0) 62#define speculative_execution_init() do { } while (0)
63#endif 63#endif
64 64
65#ifdef CONFIG_CPU_SH4A
66#define EXPMASK 0xff2f0004
67#define EXPMASK_RTEDS (1 << 0)
68#define EXPMASK_BRDSSLP (1 << 1)
69#define EXPMASK_MMCAW (1 << 4)
70
71static void __init expmask_init(void)
72{
73 unsigned long expmask = __raw_readl(EXPMASK);
74
75 /*
76 * Future proofing.
77 *
78 * Disable support for slottable sleep instruction
79 * and non-nop instructions in the rte delay slot.
80 */
81 expmask &= ~(EXPMASK_RTEDS | EXPMASK_BRDSSLP);
82
83 /*
84 * Enable associative writes to the memory-mapped cache array
85 * until the cache flush ops have been rewritten.
86 */
87 expmask |= EXPMASK_MMCAW;
88
89 __raw_writel(expmask, EXPMASK);
90 ctrl_barrier();
91}
92#else
93#define expmask_init() do { } while (0)
94#endif
95
65/* 2nd-level cache init */ 96/* 2nd-level cache init */
66void __uses_jump_to_uncached __attribute__ ((weak)) l2_cache_init(void) 97void __uses_jump_to_uncached __attribute__ ((weak)) l2_cache_init(void)
67{ 98{
@@ -268,11 +299,9 @@ asmlinkage void __init sh_cpu_init(void)
268 cache_init(); 299 cache_init();
269 300
270 if (raw_smp_processor_id() == 0) { 301 if (raw_smp_processor_id() == 0) {
271#ifdef CONFIG_MMU
272 shm_align_mask = max_t(unsigned long, 302 shm_align_mask = max_t(unsigned long,
273 current_cpu_data.dcache.way_size - 1, 303 current_cpu_data.dcache.way_size - 1,
274 PAGE_SIZE - 1); 304 PAGE_SIZE - 1);
275#endif
276 305
277 /* Boot CPU sets the cache shape */ 306 /* Boot CPU sets the cache shape */
278 detect_cache_shape(); 307 detect_cache_shape();
@@ -321,4 +350,5 @@ asmlinkage void __init sh_cpu_init(void)
321#endif 350#endif
322 351
323 speculative_execution_init(); 352 speculative_execution_init();
353 expmask_init();
324} 354}
diff --git a/arch/sh/kernel/cpu/irq/ipr.c b/arch/sh/kernel/cpu/irq/ipr.c
index 808d99a48efb..c1508a90fc6a 100644
--- a/arch/sh/kernel/cpu/irq/ipr.c
+++ b/arch/sh/kernel/cpu/irq/ipr.c
@@ -35,6 +35,7 @@ static void disable_ipr_irq(unsigned int irq)
35 unsigned long addr = get_ipr_desc(irq)->ipr_offsets[p->ipr_idx]; 35 unsigned long addr = get_ipr_desc(irq)->ipr_offsets[p->ipr_idx];
36 /* Set the priority in IPR to 0 */ 36 /* Set the priority in IPR to 0 */
37 __raw_writew(__raw_readw(addr) & (0xffff ^ (0xf << p->shift)), addr); 37 __raw_writew(__raw_readw(addr) & (0xffff ^ (0xf << p->shift)), addr);
38 (void)__raw_readw(addr); /* Read back to flush write posting */
38} 39}
39 40
40static void enable_ipr_irq(unsigned int irq) 41static void enable_ipr_irq(unsigned int irq)
diff --git a/arch/sh/kernel/cpu/sh2/entry.S b/arch/sh/kernel/cpu/sh2/entry.S
index becc54c45692..c8a4331d9b8d 100644
--- a/arch/sh/kernel/cpu/sh2/entry.S
+++ b/arch/sh/kernel/cpu/sh2/entry.S
@@ -227,8 +227,9 @@ ENTRY(sh_bios_handler)
227 mov.l @r15+, r14 227 mov.l @r15+, r14
228 add #8,r15 228 add #8,r15
229 lds.l @r15+, pr 229 lds.l @r15+, pr
230 mov.l @r15+,r15
230 rte 231 rte
231 mov.l @r15+,r15 232 nop
232 .align 2 233 .align 2
2331: .long gdb_vbr_vector 2341: .long gdb_vbr_vector
234#endif /* CONFIG_SH_STANDARD_BIOS */ 235#endif /* CONFIG_SH_STANDARD_BIOS */
diff --git a/arch/sh/kernel/cpu/sh2/probe.c b/arch/sh/kernel/cpu/sh2/probe.c
index 5916d9096b99..1db6d8883888 100644
--- a/arch/sh/kernel/cpu/sh2/probe.c
+++ b/arch/sh/kernel/cpu/sh2/probe.c
@@ -29,6 +29,7 @@ int __init detect_cpu_and_cache_system(void)
29 */ 29 */
30 boot_cpu_data.dcache.flags |= SH_CACHE_COMBINED; 30 boot_cpu_data.dcache.flags |= SH_CACHE_COMBINED;
31 boot_cpu_data.icache = boot_cpu_data.dcache; 31 boot_cpu_data.icache = boot_cpu_data.dcache;
32 boot_cpu_data.family = CPU_FAMILY_SH2;
32 33
33 return 0; 34 return 0;
34} 35}
diff --git a/arch/sh/kernel/cpu/sh2a/entry.S b/arch/sh/kernel/cpu/sh2a/entry.S
index ab3903eeda5c..222742ddc0d6 100644
--- a/arch/sh/kernel/cpu/sh2a/entry.S
+++ b/arch/sh/kernel/cpu/sh2a/entry.S
@@ -176,8 +176,9 @@ ENTRY(sh_bios_handler)
176 movml.l @r15+,r14 176 movml.l @r15+,r14
177 add #8,r15 177 add #8,r15
178 lds.l @r15+, pr 178 lds.l @r15+, pr
179 mov.l @r15+,r15
179 rte 180 rte
180 mov.l @r15+,r15 181 nop
181 .align 2 182 .align 2
1821: .long gdb_vbr_vector 1831: .long gdb_vbr_vector
183#endif /* CONFIG_SH_STANDARD_BIOS */ 184#endif /* CONFIG_SH_STANDARD_BIOS */
diff --git a/arch/sh/kernel/cpu/sh2a/probe.c b/arch/sh/kernel/cpu/sh2a/probe.c
index e098e2f6aa08..6825d6507164 100644
--- a/arch/sh/kernel/cpu/sh2a/probe.c
+++ b/arch/sh/kernel/cpu/sh2a/probe.c
@@ -15,6 +15,8 @@
15 15
16int __init detect_cpu_and_cache_system(void) 16int __init detect_cpu_and_cache_system(void)
17{ 17{
18 boot_cpu_data.family = CPU_FAMILY_SH2A;
19
18 /* All SH-2A CPUs have support for 16 and 32-bit opcodes.. */ 20 /* All SH-2A CPUs have support for 16 and 32-bit opcodes.. */
19 boot_cpu_data.flags |= CPU_HAS_OP32; 21 boot_cpu_data.flags |= CPU_HAS_OP32;
20 22
diff --git a/arch/sh/kernel/cpu/sh3/clock-sh7709.c b/arch/sh/kernel/cpu/sh3/clock-sh7709.c
index fa30b6017730..e8749505bd2a 100644
--- a/arch/sh/kernel/cpu/sh3/clock-sh7709.c
+++ b/arch/sh/kernel/cpu/sh3/clock-sh7709.c
@@ -22,13 +22,6 @@ static int stc_multipliers[] = { 1, 2, 4, 8, 3, 6, 1, 1 };
22static int ifc_divisors[] = { 1, 2, 4, 1, 3, 1, 1, 1 }; 22static int ifc_divisors[] = { 1, 2, 4, 1, 3, 1, 1, 1 };
23static int pfc_divisors[] = { 1, 2, 4, 1, 3, 6, 1, 1 }; 23static int pfc_divisors[] = { 1, 2, 4, 1, 3, 6, 1, 1 };
24 24
25static void set_bus_parent(struct clk *clk)
26{
27 struct clk *bus_clk = clk_get(NULL, "bus_clk");
28 clk->parent = bus_clk;
29 clk_put(bus_clk);
30}
31
32static void master_clk_init(struct clk *clk) 25static void master_clk_init(struct clk *clk)
33{ 26{
34 int frqcr = ctrl_inw(FRQCR); 27 int frqcr = ctrl_inw(FRQCR);
@@ -50,9 +43,6 @@ static unsigned long module_clk_recalc(struct clk *clk)
50} 43}
51 44
52static struct clk_ops sh7709_module_clk_ops = { 45static struct clk_ops sh7709_module_clk_ops = {
53#ifdef CLOCK_MODE_0_1_2_7
54 .init = set_bus_parent,
55#endif
56 .recalc = module_clk_recalc, 46 .recalc = module_clk_recalc,
57}; 47};
58 48
@@ -78,7 +68,6 @@ static unsigned long cpu_clk_recalc(struct clk *clk)
78} 68}
79 69
80static struct clk_ops sh7709_cpu_clk_ops = { 70static struct clk_ops sh7709_cpu_clk_ops = {
81 .init = set_bus_parent,
82 .recalc = cpu_clk_recalc, 71 .recalc = cpu_clk_recalc,
83}; 72};
84 73
diff --git a/arch/sh/kernel/cpu/sh3/entry.S b/arch/sh/kernel/cpu/sh3/entry.S
index 3cb531f233f2..0151933e5253 100644
--- a/arch/sh/kernel/cpu/sh3/entry.S
+++ b/arch/sh/kernel/cpu/sh3/entry.S
@@ -53,10 +53,6 @@
53 * syscall # 53 * syscall #
54 * 54 *
55 */ 55 */
56#if defined(CONFIG_KGDB)
57NMI_VEC = 0x1c0 ! Must catch early for debounce
58#endif
59
60/* Offsets to the stack */ 56/* Offsets to the stack */
61OFF_R0 = 0 /* Return value. New ABI also arg4 */ 57OFF_R0 = 0 /* Return value. New ABI also arg4 */
62OFF_R1 = 4 /* New ABI: arg5 */ 58OFF_R1 = 4 /* New ABI: arg5 */
@@ -71,7 +67,6 @@ OFF_PC = (16*4)
71OFF_SR = (16*4+8) 67OFF_SR = (16*4+8)
72OFF_TRA = (16*4+6*4) 68OFF_TRA = (16*4+6*4)
73 69
74
75#define k0 r0 70#define k0 r0
76#define k1 r1 71#define k1 r1
77#define k2 r2 72#define k2 r2
@@ -113,34 +108,34 @@ OFF_TRA = (16*4+6*4)
113#if defined(CONFIG_MMU) 108#if defined(CONFIG_MMU)
114 .align 2 109 .align 2
115ENTRY(tlb_miss_load) 110ENTRY(tlb_miss_load)
116 bra call_dpf 111 bra call_handle_tlbmiss
117 mov #0, r5 112 mov #0, r5
118 113
119 .align 2 114 .align 2
120ENTRY(tlb_miss_store) 115ENTRY(tlb_miss_store)
121 bra call_dpf 116 bra call_handle_tlbmiss
122 mov #1, r5 117 mov #1, r5
123 118
124 .align 2 119 .align 2
125ENTRY(initial_page_write) 120ENTRY(initial_page_write)
126 bra call_dpf 121 bra call_handle_tlbmiss
127 mov #1, r5 122 mov #2, r5
128 123
129 .align 2 124 .align 2
130ENTRY(tlb_protection_violation_load) 125ENTRY(tlb_protection_violation_load)
131 bra call_dpf 126 bra call_do_page_fault
132 mov #0, r5 127 mov #0, r5
133 128
134 .align 2 129 .align 2
135ENTRY(tlb_protection_violation_store) 130ENTRY(tlb_protection_violation_store)
136 bra call_dpf 131 bra call_do_page_fault
137 mov #1, r5 132 mov #1, r5
138 133
139call_dpf: 134call_handle_tlbmiss:
135 setup_frame_reg
140 mov.l 1f, r0 136 mov.l 1f, r0
141 mov r5, r8 137 mov r5, r8
142 mov.l @r0, r6 138 mov.l @r0, r6
143 mov r6, r9
144 mov.l 2f, r0 139 mov.l 2f, r0
145 sts pr, r10 140 sts pr, r10
146 jsr @r0 141 jsr @r0
@@ -151,16 +146,25 @@ call_dpf:
151 lds r10, pr 146 lds r10, pr
152 rts 147 rts
153 nop 148 nop
1540: mov.l 3f, r0 1490:
155 mov r9, r6
156 mov r8, r5 150 mov r8, r5
151call_do_page_fault:
152 mov.l 1f, r0
153 mov.l @r0, r6
154
155 sti
156
157 mov.l 3f, r0
158 mov.l 4f, r1
159 mov r15, r4
157 jmp @r0 160 jmp @r0
158 mov r15, r4 161 lds r1, pr
159 162
160 .align 2 163 .align 2
1611: .long MMU_TEA 1641: .long MMU_TEA
1622: .long __do_page_fault 1652: .long handle_tlbmiss
1633: .long do_page_fault 1663: .long do_page_fault
1674: .long ret_from_exception
164 168
165 .align 2 169 .align 2
166ENTRY(address_error_load) 170ENTRY(address_error_load)
@@ -256,7 +260,7 @@ restore_all:
256 ! 260 !
257 ! Calculate new SR value 261 ! Calculate new SR value
258 mov k3, k2 ! original SR value 262 mov k3, k2 ! original SR value
259 mov #0xf0, k1 263 mov #0xfffffff0, k1
260 extu.b k1, k1 264 extu.b k1, k1
261 not k1, k1 265 not k1, k1
262 and k1, k2 ! Mask original SR value 266 and k1, k2 ! Mask original SR value
@@ -272,21 +276,12 @@ restore_all:
2726: or k0, k2 ! Set the IMASK-bits 2766: or k0, k2 ! Set the IMASK-bits
273 ldc k2, ssr 277 ldc k2, ssr
274 ! 278 !
275#if defined(CONFIG_KGDB)
276 ! Clear in_nmi
277 mov.l 6f, k0
278 mov #0, k1
279 mov.b k1, @k0
280#endif
281 mov k4, r15 279 mov k4, r15
282 rte 280 rte
283 nop 281 nop
284 282
285 .align 2 283 .align 2
2865: .long 0x00001000 ! DSP 2845: .long 0x00001000 ! DSP
287#ifdef CONFIG_KGDB
2886: .long in_nmi
289#endif
2907: .long 0x30000000 2857: .long 0x30000000
291 286
292! common exception handler 287! common exception handler
@@ -478,23 +473,6 @@ ENTRY(save_low_regs)
478! 473!
479 .balign 512,0,512 474 .balign 512,0,512
480ENTRY(handle_interrupt) 475ENTRY(handle_interrupt)
481#if defined(CONFIG_KGDB)
482 mov.l 2f, k2
483 ! Debounce (filter nested NMI)
484 mov.l @k2, k0
485 mov.l 9f, k1
486 cmp/eq k1, k0
487 bf 11f
488 mov.l 10f, k1
489 tas.b @k1
490 bt 11f
491 rte
492 nop
493 .align 2
4949: .long NMI_VEC
49510: .long in_nmi
49611:
497#endif /* defined(CONFIG_KGDB) */
498 sts pr, k3 ! save original pr value in k3 476 sts pr, k3 ! save original pr value in k3
499 mova exception_data, k0 477 mova exception_data, k0
500 478
@@ -507,13 +485,49 @@ ENTRY(handle_interrupt)
507 bsr save_regs ! needs original pr value in k3 485 bsr save_regs ! needs original pr value in k3
508 mov #-1, k2 ! default vector kept in k2 486 mov #-1, k2 ! default vector kept in k2
509 487
488 setup_frame_reg
489
490 stc sr, r0 ! get status register
491 shlr2 r0
492 and #0x3c, r0
493 cmp/eq #0x3c, r0
494 bf 9f
495 TRACE_IRQS_OFF
4969:
497
510 ! Setup return address and jump to do_IRQ 498 ! Setup return address and jump to do_IRQ
511 mov.l 4f, r9 ! fetch return address 499 mov.l 4f, r9 ! fetch return address
512 lds r9, pr ! put return address in pr 500 lds r9, pr ! put return address in pr
513 mov.l 2f, r4 501 mov.l 2f, r4
514 mov.l 3f, r9 502 mov.l 3f, r9
515 mov.l @r4, r4 ! pass INTEVT vector as arg0 503 mov.l @r4, r4 ! pass INTEVT vector as arg0
504
505 shlr2 r4
506 shlr r4
507 mov r4, r0 ! save vector->jmp table offset for later
508
509 shlr2 r4 ! vector to IRQ# conversion
510 add #-0x10, r4
511
512 cmp/pz r4 ! is it a valid IRQ?
513 bt 10f
514
515 /*
516 * We got here as a result of taking the INTEVT path for something
517 * that isn't a valid hard IRQ, therefore we bypass the do_IRQ()
518 * path and special case the event dispatch instead. This is the
519 * expected path for the NMI (and any other brilliantly implemented
520 * exception), which effectively wants regular exception dispatch
521 * but is unfortunately reported through INTEVT rather than
522 * EXPEVT. Grr.
523 */
524 mov.l 6f, r9
525 mov.l @(r0, r9), r9
516 jmp @r9 526 jmp @r9
527 mov r15, r8 ! trap handlers take saved regs in r8
528
52910:
530 jmp @r9 ! Off to do_IRQ() we go.
517 mov r15, r5 ! pass saved registers as arg1 531 mov r15, r5 ! pass saved registers as arg1
518 532
519ENTRY(exception_none) 533ENTRY(exception_none)
diff --git a/arch/sh/kernel/cpu/sh3/ex.S b/arch/sh/kernel/cpu/sh3/ex.S
index e5a0de39a2db..46610c35c232 100644
--- a/arch/sh/kernel/cpu/sh3/ex.S
+++ b/arch/sh/kernel/cpu/sh3/ex.S
@@ -48,9 +48,7 @@ ENTRY(exception_handling_table)
48 .long system_call ! Unconditional Trap /* 160 */ 48 .long system_call ! Unconditional Trap /* 160 */
49 .long exception_error ! reserved_instruction (filled by trap_init) /* 180 */ 49 .long exception_error ! reserved_instruction (filled by trap_init) /* 180 */
50 .long exception_error ! illegal_slot_instruction (filled by trap_init) /*1A0*/ 50 .long exception_error ! illegal_slot_instruction (filled by trap_init) /*1A0*/
51ENTRY(nmi_slot) 51 .long nmi_trap_handler /* 1C0 */ ! Allow trap to debugger
52 .long kgdb_handle_exception /* 1C0 */ ! Allow trap to debugger
53ENTRY(user_break_point_trap)
54 .long break_point_trap /* 1E0 */ 52 .long break_point_trap /* 1E0 */
55 53
56 /* 54 /*
diff --git a/arch/sh/kernel/cpu/sh3/probe.c b/arch/sh/kernel/cpu/sh3/probe.c
index 10f2a760c5ee..f9c7df64eb01 100644
--- a/arch/sh/kernel/cpu/sh3/probe.c
+++ b/arch/sh/kernel/cpu/sh3/probe.c
@@ -107,5 +107,7 @@ int __uses_jump_to_uncached detect_cpu_and_cache_system(void)
107 boot_cpu_data.dcache.flags |= SH_CACHE_COMBINED; 107 boot_cpu_data.dcache.flags |= SH_CACHE_COMBINED;
108 boot_cpu_data.icache = boot_cpu_data.dcache; 108 boot_cpu_data.icache = boot_cpu_data.dcache;
109 109
110 boot_cpu_data.family = CPU_FAMILY_SH3;
111
110 return 0; 112 return 0;
111} 113}
diff --git a/arch/sh/kernel/cpu/sh4/probe.c b/arch/sh/kernel/cpu/sh4/probe.c
index 6c78d0a9c857..d36f0c45f55f 100644
--- a/arch/sh/kernel/cpu/sh4/probe.c
+++ b/arch/sh/kernel/cpu/sh4/probe.c
@@ -57,8 +57,12 @@ int __init detect_cpu_and_cache_system(void)
57 * Setup some generic flags we can probe on SH-4A parts 57 * Setup some generic flags we can probe on SH-4A parts
58 */ 58 */
59 if (((pvr >> 16) & 0xff) == 0x10) { 59 if (((pvr >> 16) & 0xff) == 0x10) {
60 if ((cvr & 0x10000000) == 0) 60 boot_cpu_data.family = CPU_FAMILY_SH4A;
61
62 if ((cvr & 0x10000000) == 0) {
61 boot_cpu_data.flags |= CPU_HAS_DSP; 63 boot_cpu_data.flags |= CPU_HAS_DSP;
64 boot_cpu_data.family = CPU_FAMILY_SH4AL_DSP;
65 }
62 66
63 boot_cpu_data.flags |= CPU_HAS_LLSC | CPU_HAS_PERF_COUNTER; 67 boot_cpu_data.flags |= CPU_HAS_LLSC | CPU_HAS_PERF_COUNTER;
64 boot_cpu_data.cut_major = pvr & 0x7f; 68 boot_cpu_data.cut_major = pvr & 0x7f;
@@ -68,6 +72,7 @@ int __init detect_cpu_and_cache_system(void)
68 } else { 72 } else {
69 /* And some SH-4 defaults.. */ 73 /* And some SH-4 defaults.. */
70 boot_cpu_data.flags |= CPU_HAS_PTEA; 74 boot_cpu_data.flags |= CPU_HAS_PTEA;
75 boot_cpu_data.family = CPU_FAMILY_SH4;
71 } 76 }
72 77
73 /* FPU detection works for everyone */ 78 /* FPU detection works for everyone */
@@ -139,8 +144,15 @@ int __init detect_cpu_and_cache_system(void)
139 } 144 }
140 break; 145 break;
141 case 0x300b: 146 case 0x300b:
142 boot_cpu_data.type = CPU_SH7724; 147 switch (prr) {
143 boot_cpu_data.flags |= CPU_HAS_L2_CACHE; 148 case 0x20:
149 boot_cpu_data.type = CPU_SH7724;
150 boot_cpu_data.flags |= CPU_HAS_L2_CACHE;
151 break;
152 case 0x50:
153 boot_cpu_data.type = CPU_SH7757;
154 break;
155 }
144 break; 156 break;
145 case 0x4000: /* 1st cut */ 157 case 0x4000: /* 1st cut */
146 case 0x4001: /* 2nd cut */ 158 case 0x4001: /* 2nd cut */
@@ -173,9 +185,6 @@ int __init detect_cpu_and_cache_system(void)
173 boot_cpu_data.dcache.ways = 2; 185 boot_cpu_data.dcache.ways = 2;
174 186
175 break; 187 break;
176 default:
177 boot_cpu_data.type = CPU_SH_NONE;
178 break;
179 } 188 }
180 189
181 /* 190 /*
diff --git a/arch/sh/kernel/cpu/sh4a/Makefile b/arch/sh/kernel/cpu/sh4a/Makefile
index ebdd391d5f42..490d5dc9e372 100644
--- a/arch/sh/kernel/cpu/sh4a/Makefile
+++ b/arch/sh/kernel/cpu/sh4a/Makefile
@@ -3,6 +3,7 @@
3# 3#
4 4
5# CPU subtype setup 5# CPU subtype setup
6obj-$(CONFIG_CPU_SUBTYPE_SH7757) += setup-sh7757.o
6obj-$(CONFIG_CPU_SUBTYPE_SH7763) += setup-sh7763.o 7obj-$(CONFIG_CPU_SUBTYPE_SH7763) += setup-sh7763.o
7obj-$(CONFIG_CPU_SUBTYPE_SH7770) += setup-sh7770.o 8obj-$(CONFIG_CPU_SUBTYPE_SH7770) += setup-sh7770.o
8obj-$(CONFIG_CPU_SUBTYPE_SH7780) += setup-sh7780.o 9obj-$(CONFIG_CPU_SUBTYPE_SH7780) += setup-sh7780.o
@@ -19,15 +20,16 @@ obj-$(CONFIG_CPU_SUBTYPE_SHX3) += setup-shx3.o
19smp-$(CONFIG_CPU_SHX3) := smp-shx3.o 20smp-$(CONFIG_CPU_SHX3) := smp-shx3.o
20 21
21# Primary on-chip clocks (common) 22# Primary on-chip clocks (common)
23clock-$(CONFIG_CPU_SUBTYPE_SH7757) := clock-sh7757.o
22clock-$(CONFIG_CPU_SUBTYPE_SH7763) := clock-sh7763.o 24clock-$(CONFIG_CPU_SUBTYPE_SH7763) := clock-sh7763.o
23clock-$(CONFIG_CPU_SUBTYPE_SH7770) := clock-sh7770.o 25clock-$(CONFIG_CPU_SUBTYPE_SH7770) := clock-sh7770.o
24clock-$(CONFIG_CPU_SUBTYPE_SH7780) := clock-sh7780.o 26clock-$(CONFIG_CPU_SUBTYPE_SH7780) := clock-sh7780.o
25clock-$(CONFIG_CPU_SUBTYPE_SH7785) := clock-sh7785.o 27clock-$(CONFIG_CPU_SUBTYPE_SH7785) := clock-sh7785.o
26clock-$(CONFIG_CPU_SUBTYPE_SH7786) := clock-sh7786.o 28clock-$(CONFIG_CPU_SUBTYPE_SH7786) := clock-sh7786.o
27clock-$(CONFIG_CPU_SUBTYPE_SH7343) := clock-sh7343.o 29clock-$(CONFIG_CPU_SUBTYPE_SH7343) := clock-sh7343.o
28clock-$(CONFIG_CPU_SUBTYPE_SH7722) := clock-sh7722.o 30clock-$(CONFIG_CPU_SUBTYPE_SH7722) := clock-sh7722.o hwblk-sh7722.o
29clock-$(CONFIG_CPU_SUBTYPE_SH7723) := clock-sh7723.o 31clock-$(CONFIG_CPU_SUBTYPE_SH7723) := clock-sh7723.o hwblk-sh7723.o
30clock-$(CONFIG_CPU_SUBTYPE_SH7724) := clock-sh7724.o 32clock-$(CONFIG_CPU_SUBTYPE_SH7724) := clock-sh7724.o hwblk-sh7724.o
31clock-$(CONFIG_CPU_SUBTYPE_SH7366) := clock-sh7366.o 33clock-$(CONFIG_CPU_SUBTYPE_SH7366) := clock-sh7366.o
32clock-$(CONFIG_CPU_SUBTYPE_SHX3) := clock-shx3.o 34clock-$(CONFIG_CPU_SUBTYPE_SHX3) := clock-shx3.o
33 35
@@ -35,6 +37,7 @@ clock-$(CONFIG_CPU_SUBTYPE_SHX3) := clock-shx3.o
35pinmux-$(CONFIG_CPU_SUBTYPE_SH7722) := pinmux-sh7722.o 37pinmux-$(CONFIG_CPU_SUBTYPE_SH7722) := pinmux-sh7722.o
36pinmux-$(CONFIG_CPU_SUBTYPE_SH7723) := pinmux-sh7723.o 38pinmux-$(CONFIG_CPU_SUBTYPE_SH7723) := pinmux-sh7723.o
37pinmux-$(CONFIG_CPU_SUBTYPE_SH7724) := pinmux-sh7724.o 39pinmux-$(CONFIG_CPU_SUBTYPE_SH7724) := pinmux-sh7724.o
40pinmux-$(CONFIG_CPU_SUBTYPE_SH7757) := pinmux-sh7757.o
38pinmux-$(CONFIG_CPU_SUBTYPE_SH7785) := pinmux-sh7785.o 41pinmux-$(CONFIG_CPU_SUBTYPE_SH7785) := pinmux-sh7785.o
39pinmux-$(CONFIG_CPU_SUBTYPE_SH7786) := pinmux-sh7786.o 42pinmux-$(CONFIG_CPU_SUBTYPE_SH7786) := pinmux-sh7786.o
40 43
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7722.c b/arch/sh/kernel/cpu/sh4a/clock-sh7722.c
index 40f859354f79..ea38b554dc05 100644
--- a/arch/sh/kernel/cpu/sh4a/clock-sh7722.c
+++ b/arch/sh/kernel/cpu/sh4a/clock-sh7722.c
@@ -22,6 +22,8 @@
22#include <linux/kernel.h> 22#include <linux/kernel.h>
23#include <linux/io.h> 23#include <linux/io.h>
24#include <asm/clock.h> 24#include <asm/clock.h>
25#include <asm/hwblk.h>
26#include <cpu/sh7722.h>
25 27
26/* SH7722 registers */ 28/* SH7722 registers */
27#define FRQCR 0xa4150000 29#define FRQCR 0xa4150000
@@ -30,9 +32,6 @@
30#define SCLKBCR 0xa415000c 32#define SCLKBCR 0xa415000c
31#define IRDACLKCR 0xa4150018 33#define IRDACLKCR 0xa4150018
32#define PLLCR 0xa4150024 34#define PLLCR 0xa4150024
33#define MSTPCR0 0xa4150030
34#define MSTPCR1 0xa4150034
35#define MSTPCR2 0xa4150038
36#define DLLFRQ 0xa4150050 35#define DLLFRQ 0xa4150050
37 36
38/* Fixed 32 KHz root clock for RTC and Power Management purposes */ 37/* Fixed 32 KHz root clock for RTC and Power Management purposes */
@@ -140,35 +139,37 @@ struct clk div6_clks[] = {
140 SH_CLK_DIV6("video_clk", &pll_clk, VCLKCR, 0), 139 SH_CLK_DIV6("video_clk", &pll_clk, VCLKCR, 0),
141}; 140};
142 141
143#define MSTP(_str, _parent, _reg, _bit, _flags) \ 142#define R_CLK &r_clk
144 SH_CLK_MSTP32(_str, -1, _parent, _reg, _bit, _flags) 143#define P_CLK &div4_clks[DIV4_P]
144#define B_CLK &div4_clks[DIV4_B]
145#define U_CLK &div4_clks[DIV4_U]
145 146
146static struct clk mstp_clks[] = { 147static struct clk mstp_clks[] = {
147 MSTP("uram0", &div4_clks[DIV4_U], MSTPCR0, 28, CLK_ENABLE_ON_INIT), 148 SH_HWBLK_CLK("uram0", -1, U_CLK, HWBLK_URAM, CLK_ENABLE_ON_INIT),
148 MSTP("xymem0", &div4_clks[DIV4_B], MSTPCR0, 26, CLK_ENABLE_ON_INIT), 149 SH_HWBLK_CLK("xymem0", -1, B_CLK, HWBLK_XYMEM, CLK_ENABLE_ON_INIT),
149 MSTP("tmu0", &div4_clks[DIV4_P], MSTPCR0, 15, 0), 150 SH_HWBLK_CLK("tmu0", -1, P_CLK, HWBLK_TMU, 0),
150 MSTP("cmt0", &r_clk, MSTPCR0, 14, 0), 151 SH_HWBLK_CLK("cmt0", -1, R_CLK, HWBLK_CMT, 0),
151 MSTP("rwdt0", &r_clk, MSTPCR0, 13, 0), 152 SH_HWBLK_CLK("rwdt0", -1, R_CLK, HWBLK_RWDT, 0),
152 MSTP("flctl0", &div4_clks[DIV4_P], MSTPCR0, 10, 0), 153 SH_HWBLK_CLK("flctl0", -1, P_CLK, HWBLK_FLCTL, 0),
153 MSTP("scif0", &div4_clks[DIV4_P], MSTPCR0, 7, 0), 154 SH_HWBLK_CLK("scif0", -1, P_CLK, HWBLK_SCIF0, 0),
154 MSTP("scif1", &div4_clks[DIV4_P], MSTPCR0, 6, 0), 155 SH_HWBLK_CLK("scif1", -1, P_CLK, HWBLK_SCIF1, 0),
155 MSTP("scif2", &div4_clks[DIV4_P], MSTPCR0, 5, 0), 156 SH_HWBLK_CLK("scif2", -1, P_CLK, HWBLK_SCIF2, 0),
156 157
157 MSTP("i2c0", &div4_clks[DIV4_P], MSTPCR1, 9, 0), 158 SH_HWBLK_CLK("i2c0", -1, P_CLK, HWBLK_IIC, 0),
158 MSTP("rtc0", &r_clk, MSTPCR1, 8, 0), 159 SH_HWBLK_CLK("rtc0", -1, R_CLK, HWBLK_RTC, 0),
159 160
160 MSTP("sdhi0", &div4_clks[DIV4_P], MSTPCR2, 18, 0), 161 SH_HWBLK_CLK("sdhi0", -1, P_CLK, HWBLK_SDHI, 0),
161 MSTP("keysc0", &r_clk, MSTPCR2, 14, 0), 162 SH_HWBLK_CLK("keysc0", -1, R_CLK, HWBLK_KEYSC, 0),
162 MSTP("usbf0", &div4_clks[DIV4_P], MSTPCR2, 11, 0), 163 SH_HWBLK_CLK("usbf0", -1, P_CLK, HWBLK_USBF, 0),
163 MSTP("2dg0", &div4_clks[DIV4_B], MSTPCR2, 9, 0), 164 SH_HWBLK_CLK("2dg0", -1, B_CLK, HWBLK_2DG, 0),
164 MSTP("siu0", &div4_clks[DIV4_B], MSTPCR2, 8, 0), 165 SH_HWBLK_CLK("siu0", -1, B_CLK, HWBLK_SIU, 0),
165 MSTP("vou0", &div4_clks[DIV4_B], MSTPCR2, 5, 0), 166 SH_HWBLK_CLK("vou0", -1, B_CLK, HWBLK_VOU, 0),
166 MSTP("jpu0", &div4_clks[DIV4_B], MSTPCR2, 6, CLK_ENABLE_ON_INIT), 167 SH_HWBLK_CLK("jpu0", -1, B_CLK, HWBLK_JPU, 0),
167 MSTP("beu0", &div4_clks[DIV4_B], MSTPCR2, 4, 0), 168 SH_HWBLK_CLK("beu0", -1, B_CLK, HWBLK_BEU, 0),
168 MSTP("ceu0", &div4_clks[DIV4_B], MSTPCR2, 3, 0), 169 SH_HWBLK_CLK("ceu0", -1, B_CLK, HWBLK_CEU, 0),
169 MSTP("veu0", &div4_clks[DIV4_B], MSTPCR2, 2, CLK_ENABLE_ON_INIT), 170 SH_HWBLK_CLK("veu0", -1, B_CLK, HWBLK_VEU, 0),
170 MSTP("vpu0", &div4_clks[DIV4_B], MSTPCR2, 1, CLK_ENABLE_ON_INIT), 171 SH_HWBLK_CLK("vpu0", -1, B_CLK, HWBLK_VPU, 0),
171 MSTP("lcdc0", &div4_clks[DIV4_B], MSTPCR2, 0, 0), 172 SH_HWBLK_CLK("lcdc0", -1, P_CLK, HWBLK_LCDC, 0),
172}; 173};
173 174
174int __init arch_clk_init(void) 175int __init arch_clk_init(void)
@@ -191,7 +192,7 @@ int __init arch_clk_init(void)
191 ret = sh_clk_div6_register(div6_clks, ARRAY_SIZE(div6_clks)); 192 ret = sh_clk_div6_register(div6_clks, ARRAY_SIZE(div6_clks));
192 193
193 if (!ret) 194 if (!ret)
194 ret = sh_clk_mstp32_register(mstp_clks, ARRAY_SIZE(mstp_clks)); 195 ret = sh_hwblk_clk_register(mstp_clks, ARRAY_SIZE(mstp_clks));
195 196
196 return ret; 197 return ret;
197} 198}
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7723.c b/arch/sh/kernel/cpu/sh4a/clock-sh7723.c
index e67c2678b8ae..20a31c2255a8 100644
--- a/arch/sh/kernel/cpu/sh4a/clock-sh7723.c
+++ b/arch/sh/kernel/cpu/sh4a/clock-sh7723.c
@@ -22,6 +22,8 @@
22#include <linux/kernel.h> 22#include <linux/kernel.h>
23#include <linux/io.h> 23#include <linux/io.h>
24#include <asm/clock.h> 24#include <asm/clock.h>
25#include <asm/hwblk.h>
26#include <cpu/sh7723.h>
25 27
26/* SH7723 registers */ 28/* SH7723 registers */
27#define FRQCR 0xa4150000 29#define FRQCR 0xa4150000
@@ -30,9 +32,6 @@
30#define SCLKBCR 0xa415000c 32#define SCLKBCR 0xa415000c
31#define IRDACLKCR 0xa4150018 33#define IRDACLKCR 0xa4150018
32#define PLLCR 0xa4150024 34#define PLLCR 0xa4150024
33#define MSTPCR0 0xa4150030
34#define MSTPCR1 0xa4150034
35#define MSTPCR2 0xa4150038
36#define DLLFRQ 0xa4150050 35#define DLLFRQ 0xa4150050
37 36
38/* Fixed 32 KHz root clock for RTC and Power Management purposes */ 37/* Fixed 32 KHz root clock for RTC and Power Management purposes */
@@ -140,60 +139,64 @@ struct clk div6_clks[] = {
140 SH_CLK_DIV6("video_clk", &pll_clk, VCLKCR, 0), 139 SH_CLK_DIV6("video_clk", &pll_clk, VCLKCR, 0),
141}; 140};
142 141
143#define MSTP(_str, _parent, _reg, _bit, _force_on, _need_cpg, _need_ram) \ 142#define R_CLK (&r_clk)
144 SH_CLK_MSTP32(_str, -1, _parent, _reg, _bit, _force_on * CLK_ENABLE_ON_INIT) 143#define P_CLK (&div4_clks[DIV4_P])
144#define B_CLK (&div4_clks[DIV4_B])
145#define U_CLK (&div4_clks[DIV4_U])
146#define I_CLK (&div4_clks[DIV4_I])
147#define SH_CLK (&div4_clks[DIV4_SH])
145 148
146static struct clk mstp_clks[] = { 149static struct clk mstp_clks[] = {
147 /* See page 60 of Datasheet V1.0: Overview -> Block Diagram */ 150 /* See page 60 of Datasheet V1.0: Overview -> Block Diagram */
148 MSTP("tlb0", &div4_clks[DIV4_I], MSTPCR0, 31, 1, 1, 0), 151 SH_HWBLK_CLK("tlb0", -1, I_CLK, HWBLK_TLB, CLK_ENABLE_ON_INIT),
149 MSTP("ic0", &div4_clks[DIV4_I], MSTPCR0, 30, 1, 1, 0), 152 SH_HWBLK_CLK("ic0", -1, I_CLK, HWBLK_IC, CLK_ENABLE_ON_INIT),
150 MSTP("oc0", &div4_clks[DIV4_I], MSTPCR0, 29, 1, 1, 0), 153 SH_HWBLK_CLK("oc0", -1, I_CLK, HWBLK_OC, CLK_ENABLE_ON_INIT),
151 MSTP("l2c0", &div4_clks[DIV4_SH], MSTPCR0, 28, 1, 1, 0), 154 SH_HWBLK_CLK("l2c0", -1, SH_CLK, HWBLK_L2C, CLK_ENABLE_ON_INIT),
152 MSTP("ilmem0", &div4_clks[DIV4_I], MSTPCR0, 27, 1, 1, 0), 155 SH_HWBLK_CLK("ilmem0", -1, I_CLK, HWBLK_ILMEM, CLK_ENABLE_ON_INIT),
153 MSTP("fpu0", &div4_clks[DIV4_I], MSTPCR0, 24, 1, 1, 0), 156 SH_HWBLK_CLK("fpu0", -1, I_CLK, HWBLK_FPU, CLK_ENABLE_ON_INIT),
154 MSTP("intc0", &div4_clks[DIV4_I], MSTPCR0, 22, 1, 1, 0), 157 SH_HWBLK_CLK("intc0", -1, I_CLK, HWBLK_INTC, CLK_ENABLE_ON_INIT),
155 MSTP("dmac0", &div4_clks[DIV4_B], MSTPCR0, 21, 0, 1, 1), 158 SH_HWBLK_CLK("dmac0", -1, B_CLK, HWBLK_DMAC0, 0),
156 MSTP("sh0", &div4_clks[DIV4_SH], MSTPCR0, 20, 0, 1, 0), 159 SH_HWBLK_CLK("sh0", -1, SH_CLK, HWBLK_SHYWAY, CLK_ENABLE_ON_INIT),
157 MSTP("hudi0", &div4_clks[DIV4_P], MSTPCR0, 19, 0, 1, 0), 160 SH_HWBLK_CLK("hudi0", -1, P_CLK, HWBLK_HUDI, 0),
158 MSTP("ubc0", &div4_clks[DIV4_I], MSTPCR0, 17, 0, 1, 0), 161 SH_HWBLK_CLK("ubc0", -1, I_CLK, HWBLK_UBC, 0),
159 MSTP("tmu0", &div4_clks[DIV4_P], MSTPCR0, 15, 0, 1, 0), 162 SH_HWBLK_CLK("tmu0", -1, P_CLK, HWBLK_TMU0, 0),
160 MSTP("cmt0", &r_clk, MSTPCR0, 14, 0, 0, 0), 163 SH_HWBLK_CLK("cmt0", -1, R_CLK, HWBLK_CMT, 0),
161 MSTP("rwdt0", &r_clk, MSTPCR0, 13, 0, 0, 0), 164 SH_HWBLK_CLK("rwdt0", -1, R_CLK, HWBLK_RWDT, 0),
162 MSTP("dmac1", &div4_clks[DIV4_B], MSTPCR0, 12, 0, 1, 1), 165 SH_HWBLK_CLK("dmac1", -1, B_CLK, HWBLK_DMAC1, 0),
163 MSTP("tmu1", &div4_clks[DIV4_P], MSTPCR0, 11, 0, 1, 0), 166 SH_HWBLK_CLK("tmu1", -1, P_CLK, HWBLK_TMU1, 0),
164 MSTP("flctl0", &div4_clks[DIV4_P], MSTPCR0, 10, 0, 1, 0), 167 SH_HWBLK_CLK("flctl0", -1, P_CLK, HWBLK_FLCTL, 0),
165 MSTP("scif0", &div4_clks[DIV4_P], MSTPCR0, 9, 0, 1, 0), 168 SH_HWBLK_CLK("scif0", -1, P_CLK, HWBLK_SCIF0, 0),
166 MSTP("scif1", &div4_clks[DIV4_P], MSTPCR0, 8, 0, 1, 0), 169 SH_HWBLK_CLK("scif1", -1, P_CLK, HWBLK_SCIF1, 0),
167 MSTP("scif2", &div4_clks[DIV4_P], MSTPCR0, 7, 0, 1, 0), 170 SH_HWBLK_CLK("scif2", -1, P_CLK, HWBLK_SCIF2, 0),
168 MSTP("scif3", &div4_clks[DIV4_B], MSTPCR0, 6, 0, 1, 0), 171 SH_HWBLK_CLK("scif3", -1, B_CLK, HWBLK_SCIF3, 0),
169 MSTP("scif4", &div4_clks[DIV4_B], MSTPCR0, 5, 0, 1, 0), 172 SH_HWBLK_CLK("scif4", -1, B_CLK, HWBLK_SCIF4, 0),
170 MSTP("scif5", &div4_clks[DIV4_B], MSTPCR0, 4, 0, 1, 0), 173 SH_HWBLK_CLK("scif5", -1, B_CLK, HWBLK_SCIF5, 0),
171 MSTP("msiof0", &div4_clks[DIV4_B], MSTPCR0, 2, 0, 1, 0), 174 SH_HWBLK_CLK("msiof0", -1, B_CLK, HWBLK_MSIOF0, 0),
172 MSTP("msiof1", &div4_clks[DIV4_B], MSTPCR0, 1, 0, 1, 0), 175 SH_HWBLK_CLK("msiof1", -1, B_CLK, HWBLK_MSIOF1, 0),
173 MSTP("meram0", &div4_clks[DIV4_SH], MSTPCR0, 0, 1, 1, 0), 176 SH_HWBLK_CLK("meram0", -1, SH_CLK, HWBLK_MERAM, 0),
174 177
175 MSTP("i2c0", &div4_clks[DIV4_P], MSTPCR1, 9, 0, 1, 0), 178 SH_HWBLK_CLK("i2c0", -1, P_CLK, HWBLK_IIC, 0),
176 MSTP("rtc0", &r_clk, MSTPCR1, 8, 0, 0, 0), 179 SH_HWBLK_CLK("rtc0", -1, R_CLK, HWBLK_RTC, 0),
177 180
178 MSTP("atapi0", &div4_clks[DIV4_SH], MSTPCR2, 28, 0, 1, 0), 181 SH_HWBLK_CLK("atapi0", -1, SH_CLK, HWBLK_ATAPI, 0),
179 MSTP("adc0", &div4_clks[DIV4_P], MSTPCR2, 27, 0, 1, 0), 182 SH_HWBLK_CLK("adc0", -1, P_CLK, HWBLK_ADC, 0),
180 MSTP("tpu0", &div4_clks[DIV4_B], MSTPCR2, 25, 0, 1, 0), 183 SH_HWBLK_CLK("tpu0", -1, B_CLK, HWBLK_TPU, 0),
181 MSTP("irda0", &div4_clks[DIV4_P], MSTPCR2, 24, 0, 1, 0), 184 SH_HWBLK_CLK("irda0", -1, P_CLK, HWBLK_IRDA, 0),
182 MSTP("tsif0", &div4_clks[DIV4_B], MSTPCR2, 22, 0, 1, 0), 185 SH_HWBLK_CLK("tsif0", -1, B_CLK, HWBLK_TSIF, 0),
183 MSTP("icb0", &div4_clks[DIV4_B], MSTPCR2, 21, 0, 1, 1), 186 SH_HWBLK_CLK("icb0", -1, B_CLK, HWBLK_ICB, CLK_ENABLE_ON_INIT),
184 MSTP("sdhi0", &div4_clks[DIV4_B], MSTPCR2, 18, 0, 1, 0), 187 SH_HWBLK_CLK("sdhi0", -1, B_CLK, HWBLK_SDHI0, 0),
185 MSTP("sdhi1", &div4_clks[DIV4_B], MSTPCR2, 17, 0, 1, 0), 188 SH_HWBLK_CLK("sdhi1", -1, B_CLK, HWBLK_SDHI1, 0),
186 MSTP("keysc0", &r_clk, MSTPCR2, 14, 0, 0, 0), 189 SH_HWBLK_CLK("keysc0", -1, R_CLK, HWBLK_KEYSC, 0),
187 MSTP("usb0", &div4_clks[DIV4_B], MSTPCR2, 11, 0, 1, 0), 190 SH_HWBLK_CLK("usb0", -1, B_CLK, HWBLK_USB, 0),
188 MSTP("2dg0", &div4_clks[DIV4_B], MSTPCR2, 10, 0, 1, 1), 191 SH_HWBLK_CLK("2dg0", -1, B_CLK, HWBLK_2DG, 0),
189 MSTP("siu0", &div4_clks[DIV4_B], MSTPCR2, 8, 0, 1, 0), 192 SH_HWBLK_CLK("siu0", -1, B_CLK, HWBLK_SIU, 0),
190 MSTP("veu1", &div4_clks[DIV4_B], MSTPCR2, 6, 1, 1, 1), 193 SH_HWBLK_CLK("veu1", -1, B_CLK, HWBLK_VEU2H1, 0),
191 MSTP("vou0", &div4_clks[DIV4_B], MSTPCR2, 5, 0, 1, 1), 194 SH_HWBLK_CLK("vou0", -1, B_CLK, HWBLK_VOU, 0),
192 MSTP("beu0", &div4_clks[DIV4_B], MSTPCR2, 4, 0, 1, 1), 195 SH_HWBLK_CLK("beu0", -1, B_CLK, HWBLK_BEU, 0),
193 MSTP("ceu0", &div4_clks[DIV4_B], MSTPCR2, 3, 0, 1, 1), 196 SH_HWBLK_CLK("ceu0", -1, B_CLK, HWBLK_CEU, 0),
194 MSTP("veu0", &div4_clks[DIV4_B], MSTPCR2, 2, 1, 1, 1), 197 SH_HWBLK_CLK("veu0", -1, B_CLK, HWBLK_VEU2H0, 0),
195 MSTP("vpu0", &div4_clks[DIV4_B], MSTPCR2, 1, 1, 1, 1), 198 SH_HWBLK_CLK("vpu0", -1, B_CLK, HWBLK_VPU, 0),
196 MSTP("lcdc0", &div4_clks[DIV4_B], MSTPCR2, 0, 0, 1, 1), 199 SH_HWBLK_CLK("lcdc0", -1, B_CLK, HWBLK_LCDC, 0),
197}; 200};
198 201
199int __init arch_clk_init(void) 202int __init arch_clk_init(void)
@@ -216,7 +219,7 @@ int __init arch_clk_init(void)
216 ret = sh_clk_div6_register(div6_clks, ARRAY_SIZE(div6_clks)); 219 ret = sh_clk_div6_register(div6_clks, ARRAY_SIZE(div6_clks));
217 220
218 if (!ret) 221 if (!ret)
219 ret = sh_clk_mstp32_register(mstp_clks, ARRAY_SIZE(mstp_clks)); 222 ret = sh_hwblk_clk_register(mstp_clks, ARRAY_SIZE(mstp_clks));
220 223
221 return ret; 224 return ret;
222} 225}
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7724.c b/arch/sh/kernel/cpu/sh4a/clock-sh7724.c
index 5d5c9b952883..dfe9192be63e 100644
--- a/arch/sh/kernel/cpu/sh4a/clock-sh7724.c
+++ b/arch/sh/kernel/cpu/sh4a/clock-sh7724.c
@@ -22,6 +22,8 @@
22#include <linux/kernel.h> 22#include <linux/kernel.h>
23#include <linux/io.h> 23#include <linux/io.h>
24#include <asm/clock.h> 24#include <asm/clock.h>
25#include <asm/hwblk.h>
26#include <cpu/sh7724.h>
25 27
26/* SH7724 registers */ 28/* SH7724 registers */
27#define FRQCRA 0xa4150000 29#define FRQCRA 0xa4150000
@@ -31,9 +33,6 @@
31#define FCLKBCR 0xa415000c 33#define FCLKBCR 0xa415000c
32#define IRDACLKCR 0xa4150018 34#define IRDACLKCR 0xa4150018
33#define PLLCR 0xa4150024 35#define PLLCR 0xa4150024
34#define MSTPCR0 0xa4150030
35#define MSTPCR1 0xa4150034
36#define MSTPCR2 0xa4150038
37#define SPUCLKCR 0xa415003c 36#define SPUCLKCR 0xa415003c
38#define FLLFRQ 0xa4150050 37#define FLLFRQ 0xa4150050
39#define LSTATS 0xa4150060 38#define LSTATS 0xa4150060
@@ -128,7 +127,7 @@ struct clk *main_clks[] = {
128 &div3_clk, 127 &div3_clk,
129}; 128};
130 129
131static int divisors[] = { 2, 0, 4, 6, 8, 12, 16, 0, 24, 32, 36, 48, 0, 72 }; 130static int divisors[] = { 2, 3, 4, 6, 8, 12, 16, 0, 24, 32, 36, 48, 0, 72 };
132 131
133static struct clk_div_mult_table div4_table = { 132static struct clk_div_mult_table div4_table = {
134 .divisors = divisors, 133 .divisors = divisors,
@@ -156,64 +155,67 @@ struct clk div6_clks[] = {
156 SH_CLK_DIV6("spu_clk", &div3_clk, SPUCLKCR, 0), 155 SH_CLK_DIV6("spu_clk", &div3_clk, SPUCLKCR, 0),
157}; 156};
158 157
159#define MSTP(_str, _parent, _reg, _bit, _force_on, _need_cpg, _need_ram) \ 158#define R_CLK (&r_clk)
160 SH_CLK_MSTP32(_str, -1, _parent, _reg, _bit, _force_on * CLK_ENABLE_ON_INIT) 159#define P_CLK (&div4_clks[DIV4_P])
160#define B_CLK (&div4_clks[DIV4_B])
161#define I_CLK (&div4_clks[DIV4_I])
162#define SH_CLK (&div4_clks[DIV4_SH])
161 163
162static struct clk mstp_clks[] = { 164static struct clk mstp_clks[] = {
163 MSTP("tlb0", &div4_clks[DIV4_I], MSTPCR0, 31, 1, 1, 0), 165 SH_HWBLK_CLK("tlb0", -1, I_CLK, HWBLK_TLB, CLK_ENABLE_ON_INIT),
164 MSTP("ic0", &div4_clks[DIV4_I], MSTPCR0, 30, 1, 1, 0), 166 SH_HWBLK_CLK("ic0", -1, I_CLK, HWBLK_IC, CLK_ENABLE_ON_INIT),
165 MSTP("oc0", &div4_clks[DIV4_I], MSTPCR0, 29, 1, 1, 0), 167 SH_HWBLK_CLK("oc0", -1, I_CLK, HWBLK_OC, CLK_ENABLE_ON_INIT),
166 MSTP("rs0", &div4_clks[DIV4_B], MSTPCR0, 28, 1, 1, 0), 168 SH_HWBLK_CLK("rs0", -1, B_CLK, HWBLK_RSMEM, CLK_ENABLE_ON_INIT),
167 MSTP("ilmem0", &div4_clks[DIV4_I], MSTPCR0, 27, 1, 1, 0), 169 SH_HWBLK_CLK("ilmem0", -1, I_CLK, HWBLK_ILMEM, CLK_ENABLE_ON_INIT),
168 MSTP("l2c0", &div4_clks[DIV4_SH], MSTPCR0, 26, 1, 1, 0), 170 SH_HWBLK_CLK("l2c0", -1, SH_CLK, HWBLK_L2C, CLK_ENABLE_ON_INIT),
169 MSTP("fpu0", &div4_clks[DIV4_I], MSTPCR0, 24, 1, 1, 0), 171 SH_HWBLK_CLK("fpu0", -1, I_CLK, HWBLK_FPU, CLK_ENABLE_ON_INIT),
170 MSTP("intc0", &div4_clks[DIV4_P], MSTPCR0, 22, 1, 1, 0), 172 SH_HWBLK_CLK("intc0", -1, P_CLK, HWBLK_INTC, CLK_ENABLE_ON_INIT),
171 MSTP("dmac0", &div4_clks[DIV4_B], MSTPCR0, 21, 0, 1, 1), 173 SH_HWBLK_CLK("dmac0", -1, B_CLK, HWBLK_DMAC0, 0),
172 MSTP("sh0", &div4_clks[DIV4_SH], MSTPCR0, 20, 0, 1, 0), 174 SH_HWBLK_CLK("sh0", -1, SH_CLK, HWBLK_SHYWAY, CLK_ENABLE_ON_INIT),
173 MSTP("hudi0", &div4_clks[DIV4_P], MSTPCR0, 19, 0, 1, 0), 175 SH_HWBLK_CLK("hudi0", -1, P_CLK, HWBLK_HUDI, 0),
174 MSTP("ubc0", &div4_clks[DIV4_I], MSTPCR0, 17, 0, 1, 0), 176 SH_HWBLK_CLK("ubc0", -1, I_CLK, HWBLK_UBC, 0),
175 MSTP("tmu0", &div4_clks[DIV4_P], MSTPCR0, 15, 0, 1, 0), 177 SH_HWBLK_CLK("tmu0", -1, P_CLK, HWBLK_TMU0, 0),
176 MSTP("cmt0", &r_clk, MSTPCR0, 14, 0, 0, 0), 178 SH_HWBLK_CLK("cmt0", -1, R_CLK, HWBLK_CMT, 0),
177 MSTP("rwdt0", &r_clk, MSTPCR0, 13, 0, 0, 0), 179 SH_HWBLK_CLK("rwdt0", -1, R_CLK, HWBLK_RWDT, 0),
178 MSTP("dmac1", &div4_clks[DIV4_B], MSTPCR0, 12, 0, 1, 1), 180 SH_HWBLK_CLK("dmac1", -1, B_CLK, HWBLK_DMAC1, 0),
179 MSTP("tmu1", &div4_clks[DIV4_P], MSTPCR0, 10, 0, 1, 0), 181 SH_HWBLK_CLK("tmu1", -1, P_CLK, HWBLK_TMU1, 0),
180 MSTP("scif0", &div4_clks[DIV4_P], MSTPCR0, 9, 0, 1, 0), 182 SH_HWBLK_CLK("scif0", -1, P_CLK, HWBLK_SCIF0, 0),
181 MSTP("scif1", &div4_clks[DIV4_P], MSTPCR0, 8, 0, 1, 0), 183 SH_HWBLK_CLK("scif1", -1, P_CLK, HWBLK_SCIF1, 0),
182 MSTP("scif2", &div4_clks[DIV4_P], MSTPCR0, 7, 0, 1, 0), 184 SH_HWBLK_CLK("scif2", -1, P_CLK, HWBLK_SCIF2, 0),
183 MSTP("scif3", &div4_clks[DIV4_B], MSTPCR0, 6, 0, 1, 0), 185 SH_HWBLK_CLK("scif3", -1, B_CLK, HWBLK_SCIF3, 0),
184 MSTP("scif4", &div4_clks[DIV4_B], MSTPCR0, 5, 0, 1, 0), 186 SH_HWBLK_CLK("scif4", -1, B_CLK, HWBLK_SCIF4, 0),
185 MSTP("scif5", &div4_clks[DIV4_B], MSTPCR0, 4, 0, 1, 0), 187 SH_HWBLK_CLK("scif5", -1, B_CLK, HWBLK_SCIF5, 0),
186 MSTP("msiof0", &div4_clks[DIV4_B], MSTPCR0, 2, 0, 1, 0), 188 SH_HWBLK_CLK("msiof0", -1, B_CLK, HWBLK_MSIOF0, 0),
187 MSTP("msiof1", &div4_clks[DIV4_B], MSTPCR0, 1, 0, 1, 0), 189 SH_HWBLK_CLK("msiof1", -1, B_CLK, HWBLK_MSIOF1, 0),
188 190
189 MSTP("keysc0", &r_clk, MSTPCR1, 12, 0, 0, 0), 191 SH_HWBLK_CLK("keysc0", -1, R_CLK, HWBLK_KEYSC, 0),
190 MSTP("rtc0", &r_clk, MSTPCR1, 11, 0, 0, 0), 192 SH_HWBLK_CLK("rtc0", -1, R_CLK, HWBLK_RTC, 0),
191 MSTP("i2c0", &div4_clks[DIV4_P], MSTPCR1, 9, 0, 1, 0), 193 SH_HWBLK_CLK("i2c0", -1, P_CLK, HWBLK_IIC0, 0),
192 MSTP("i2c1", &div4_clks[DIV4_P], MSTPCR1, 8, 0, 1, 0), 194 SH_HWBLK_CLK("i2c1", -1, P_CLK, HWBLK_IIC1, 0),
193 195
194 MSTP("mmc0", &div4_clks[DIV4_B], MSTPCR2, 29, 0, 1, 0), 196 SH_HWBLK_CLK("mmc0", -1, B_CLK, HWBLK_MMC, 0),
195 MSTP("eth0", &div4_clks[DIV4_B], MSTPCR2, 28, 0, 1, 0), 197 SH_HWBLK_CLK("eth0", -1, B_CLK, HWBLK_ETHER, 0),
196 MSTP("atapi0", &div4_clks[DIV4_B], MSTPCR2, 26, 0, 1, 0), 198 SH_HWBLK_CLK("atapi0", -1, B_CLK, HWBLK_ATAPI, 0),
197 MSTP("tpu0", &div4_clks[DIV4_B], MSTPCR2, 25, 0, 1, 0), 199 SH_HWBLK_CLK("tpu0", -1, B_CLK, HWBLK_TPU, 0),
198 MSTP("irda0", &div4_clks[DIV4_P], MSTPCR2, 24, 0, 1, 0), 200 SH_HWBLK_CLK("irda0", -1, P_CLK, HWBLK_IRDA, 0),
199 MSTP("tsif0", &div4_clks[DIV4_B], MSTPCR2, 22, 0, 1, 0), 201 SH_HWBLK_CLK("tsif0", -1, B_CLK, HWBLK_TSIF, 0),
200 MSTP("usb1", &div4_clks[DIV4_B], MSTPCR2, 21, 0, 1, 1), 202 SH_HWBLK_CLK("usb1", -1, B_CLK, HWBLK_USB1, 0),
201 MSTP("usb0", &div4_clks[DIV4_B], MSTPCR2, 20, 0, 1, 1), 203 SH_HWBLK_CLK("usb0", -1, B_CLK, HWBLK_USB0, 0),
202 MSTP("2dg0", &div4_clks[DIV4_B], MSTPCR2, 19, 0, 1, 1), 204 SH_HWBLK_CLK("2dg0", -1, B_CLK, HWBLK_2DG, 0),
203 MSTP("sdhi0", &div4_clks[DIV4_B], MSTPCR2, 18, 0, 1, 0), 205 SH_HWBLK_CLK("sdhi0", -1, B_CLK, HWBLK_SDHI0, 0),
204 MSTP("sdhi1", &div4_clks[DIV4_B], MSTPCR2, 17, 0, 1, 0), 206 SH_HWBLK_CLK("sdhi1", -1, B_CLK, HWBLK_SDHI1, 0),
205 MSTP("veu1", &div4_clks[DIV4_B], MSTPCR2, 15, 1, 1, 1), 207 SH_HWBLK_CLK("veu1", -1, B_CLK, HWBLK_VEU1, 0),
206 MSTP("ceu1", &div4_clks[DIV4_B], MSTPCR2, 13, 0, 1, 1), 208 SH_HWBLK_CLK("ceu1", -1, B_CLK, HWBLK_CEU1, 0),
207 MSTP("beu1", &div4_clks[DIV4_B], MSTPCR2, 12, 0, 1, 1), 209 SH_HWBLK_CLK("beu1", -1, B_CLK, HWBLK_BEU1, 0),
208 MSTP("2ddmac0", &div4_clks[DIV4_SH], MSTPCR2, 10, 0, 1, 1), 210 SH_HWBLK_CLK("2ddmac0", -1, SH_CLK, HWBLK_2DDMAC, 0),
209 MSTP("spu0", &div4_clks[DIV4_B], MSTPCR2, 9, 0, 1, 0), 211 SH_HWBLK_CLK("spu0", -1, B_CLK, HWBLK_SPU, 0),
210 MSTP("jpu0", &div4_clks[DIV4_B], MSTPCR2, 6, 1, 1, 1), 212 SH_HWBLK_CLK("jpu0", -1, B_CLK, HWBLK_JPU, 0),
211 MSTP("vou0", &div4_clks[DIV4_B], MSTPCR2, 5, 0, 1, 1), 213 SH_HWBLK_CLK("vou0", -1, B_CLK, HWBLK_VOU, 0),
212 MSTP("beu0", &div4_clks[DIV4_B], MSTPCR2, 4, 0, 1, 1), 214 SH_HWBLK_CLK("beu0", -1, B_CLK, HWBLK_BEU0, 0),
213 MSTP("ceu0", &div4_clks[DIV4_B], MSTPCR2, 3, 0, 1, 1), 215 SH_HWBLK_CLK("ceu0", -1, B_CLK, HWBLK_CEU0, 0),
214 MSTP("veu0", &div4_clks[DIV4_B], MSTPCR2, 2, 1, 1, 1), 216 SH_HWBLK_CLK("veu0", -1, B_CLK, HWBLK_VEU0, 0),
215 MSTP("vpu0", &div4_clks[DIV4_B], MSTPCR2, 1, 1, 1, 1), 217 SH_HWBLK_CLK("vpu0", -1, B_CLK, HWBLK_VPU, 0),
216 MSTP("lcdc0", &div4_clks[DIV4_B], MSTPCR2, 0, 0, 1, 1), 218 SH_HWBLK_CLK("lcdc0", -1, B_CLK, HWBLK_LCDC, 0),
217}; 219};
218 220
219int __init arch_clk_init(void) 221int __init arch_clk_init(void)
@@ -236,7 +238,7 @@ int __init arch_clk_init(void)
236 ret = sh_clk_div6_register(div6_clks, ARRAY_SIZE(div6_clks)); 238 ret = sh_clk_div6_register(div6_clks, ARRAY_SIZE(div6_clks));
237 239
238 if (!ret) 240 if (!ret)
239 ret = sh_clk_mstp32_register(mstp_clks, ARRAY_SIZE(mstp_clks)); 241 ret = sh_hwblk_clk_register(mstp_clks, ARRAY_SIZE(mstp_clks));
240 242
241 return ret; 243 return ret;
242} 244}
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7757.c b/arch/sh/kernel/cpu/sh4a/clock-sh7757.c
new file mode 100644
index 000000000000..ddc235ca9664
--- /dev/null
+++ b/arch/sh/kernel/cpu/sh4a/clock-sh7757.c
@@ -0,0 +1,130 @@
1/*
2 * arch/sh/kernel/cpu/sh4/clock-sh7757.c
3 *
4 * SH7757 support for the clock framework
5 *
6 * Copyright (C) 2009 Renesas Solutions Corp.
7 *
8 * This file is subject to the terms and conditions of the GNU General Public
9 * License. See the file "COPYING" in the main directory of this archive
10 * for more details.
11 */
12#include <linux/init.h>
13#include <linux/kernel.h>
14#include <linux/io.h>
15#include <asm/clock.h>
16#include <asm/freq.h>
17
18static int ifc_divisors[] = { 2, 1, 4, 1, 1, 8, 1, 1,
19 16, 1, 1, 32, 1, 1, 1, 1 };
20static int sfc_divisors[] = { 2, 1, 4, 1, 1, 8, 1, 1,
21 16, 1, 1, 32, 1, 1, 1, 1 };
22static int bfc_divisors[] = { 2, 1, 4, 1, 1, 8, 1, 1,
23 16, 1, 1, 32, 1, 1, 1, 1 };
24static int p1fc_divisors[] = { 2, 1, 4, 1, 1, 8, 1, 1,
25 16, 1, 1, 32, 1, 1, 1, 1 };
26
27static void master_clk_init(struct clk *clk)
28{
29 clk->rate = CONFIG_SH_PCLK_FREQ * 16;
30}
31
32static struct clk_ops sh7757_master_clk_ops = {
33 .init = master_clk_init,
34};
35
36static void module_clk_recalc(struct clk *clk)
37{
38 int idx = ctrl_inl(FRQCR) & 0x0000000f;
39 clk->rate = clk->parent->rate / p1fc_divisors[idx];
40}
41
42static struct clk_ops sh7757_module_clk_ops = {
43 .recalc = module_clk_recalc,
44};
45
46static void bus_clk_recalc(struct clk *clk)
47{
48 int idx = (ctrl_inl(FRQCR) >> 8) & 0x0000000f;
49 clk->rate = clk->parent->rate / bfc_divisors[idx];
50}
51
52static struct clk_ops sh7757_bus_clk_ops = {
53 .recalc = bus_clk_recalc,
54};
55
56static void cpu_clk_recalc(struct clk *clk)
57{
58 int idx = (ctrl_inl(FRQCR) >> 20) & 0x0000000f;
59 clk->rate = clk->parent->rate / ifc_divisors[idx];
60}
61
62static struct clk_ops sh7757_cpu_clk_ops = {
63 .recalc = cpu_clk_recalc,
64};
65
66static struct clk_ops *sh7757_clk_ops[] = {
67 &sh7757_master_clk_ops,
68 &sh7757_module_clk_ops,
69 &sh7757_bus_clk_ops,
70 &sh7757_cpu_clk_ops,
71};
72
73void __init arch_init_clk_ops(struct clk_ops **ops, int idx)
74{
75 if (idx < ARRAY_SIZE(sh7757_clk_ops))
76 *ops = sh7757_clk_ops[idx];
77}
78
79static void shyway_clk_recalc(struct clk *clk)
80{
81 int idx = (ctrl_inl(FRQCR) >> 12) & 0x0000000f;
82 clk->rate = clk->parent->rate / sfc_divisors[idx];
83}
84
85static struct clk_ops sh7757_shyway_clk_ops = {
86 .recalc = shyway_clk_recalc,
87};
88
89static struct clk sh7757_shyway_clk = {
90 .name = "shyway_clk",
91 .flags = CLK_ENABLE_ON_INIT,
92 .ops = &sh7757_shyway_clk_ops,
93};
94
95/*
96 * Additional sh7757-specific on-chip clocks that aren't already part of the
97 * clock framework
98 */
99static struct clk *sh7757_onchip_clocks[] = {
100 &sh7757_shyway_clk,
101};
102
103static int __init sh7757_clk_init(void)
104{
105 struct clk *clk = clk_get(NULL, "master_clk");
106 int i;
107
108 for (i = 0; i < ARRAY_SIZE(sh7757_onchip_clocks); i++) {
109 struct clk *clkp = sh7757_onchip_clocks[i];
110
111 clkp->parent = clk;
112 clk_register(clkp);
113 clk_enable(clkp);
114 }
115
116 /*
117 * Now that we have the rest of the clocks registered, we need to
118 * force the parent clock to propagate so that these clocks will
119 * automatically figure out their rate. We cheat by handing the
120 * parent clock its current rate and forcing child propagation.
121 */
122 clk_set_rate(clk, clk_get_rate(clk));
123
124 clk_put(clk);
125
126 return 0;
127}
128
129arch_initcall(sh7757_clk_init);
130
diff --git a/arch/sh/kernel/cpu/sh4a/hwblk-sh7722.c b/arch/sh/kernel/cpu/sh4a/hwblk-sh7722.c
new file mode 100644
index 000000000000..a288b5d92341
--- /dev/null
+++ b/arch/sh/kernel/cpu/sh4a/hwblk-sh7722.c
@@ -0,0 +1,106 @@
1/*
2 * arch/sh/kernel/cpu/sh4a/hwblk-sh7722.c
3 *
4 * SH7722 hardware block support
5 *
6 * Copyright (C) 2009 Magnus Damm
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21#include <linux/init.h>
22#include <linux/kernel.h>
23#include <linux/io.h>
24#include <asm/suspend.h>
25#include <asm/hwblk.h>
26#include <cpu/sh7722.h>
27
28/* SH7722 registers */
29#define MSTPCR0 0xa4150030
30#define MSTPCR1 0xa4150034
31#define MSTPCR2 0xa4150038
32
33/* SH7722 Power Domains */
34enum { CORE_AREA, SUB_AREA, CORE_AREA_BM };
35static struct hwblk_area sh7722_hwblk_area[] = {
36 [CORE_AREA] = HWBLK_AREA(0, 0),
37 [CORE_AREA_BM] = HWBLK_AREA(HWBLK_AREA_FLAG_PARENT, CORE_AREA),
38 [SUB_AREA] = HWBLK_AREA(0, 0),
39};
40
41/* Table mapping HWBLK to Module Stop Bit and Power Domain */
42static struct hwblk sh7722_hwblk[HWBLK_NR] = {
43 [HWBLK_TLB] = HWBLK(MSTPCR0, 31, CORE_AREA),
44 [HWBLK_IC] = HWBLK(MSTPCR0, 30, CORE_AREA),
45 [HWBLK_OC] = HWBLK(MSTPCR0, 29, CORE_AREA),
46 [HWBLK_URAM] = HWBLK(MSTPCR0, 28, CORE_AREA),
47 [HWBLK_XYMEM] = HWBLK(MSTPCR0, 26, CORE_AREA),
48 [HWBLK_INTC] = HWBLK(MSTPCR0, 22, CORE_AREA),
49 [HWBLK_DMAC] = HWBLK(MSTPCR0, 21, CORE_AREA_BM),
50 [HWBLK_SHYWAY] = HWBLK(MSTPCR0, 20, CORE_AREA),
51 [HWBLK_HUDI] = HWBLK(MSTPCR0, 19, CORE_AREA),
52 [HWBLK_UBC] = HWBLK(MSTPCR0, 17, CORE_AREA),
53 [HWBLK_TMU] = HWBLK(MSTPCR0, 15, CORE_AREA),
54 [HWBLK_CMT] = HWBLK(MSTPCR0, 14, SUB_AREA),
55 [HWBLK_RWDT] = HWBLK(MSTPCR0, 13, SUB_AREA),
56 [HWBLK_FLCTL] = HWBLK(MSTPCR0, 10, CORE_AREA),
57 [HWBLK_SCIF0] = HWBLK(MSTPCR0, 7, CORE_AREA),
58 [HWBLK_SCIF1] = HWBLK(MSTPCR0, 6, CORE_AREA),
59 [HWBLK_SCIF2] = HWBLK(MSTPCR0, 5, CORE_AREA),
60 [HWBLK_SIO] = HWBLK(MSTPCR0, 3, CORE_AREA),
61 [HWBLK_SIOF0] = HWBLK(MSTPCR0, 2, CORE_AREA),
62 [HWBLK_SIOF1] = HWBLK(MSTPCR0, 1, CORE_AREA),
63
64 [HWBLK_IIC] = HWBLK(MSTPCR1, 9, CORE_AREA),
65 [HWBLK_RTC] = HWBLK(MSTPCR1, 8, SUB_AREA),
66
67 [HWBLK_TPU] = HWBLK(MSTPCR2, 25, CORE_AREA),
68 [HWBLK_IRDA] = HWBLK(MSTPCR2, 24, CORE_AREA),
69 [HWBLK_SDHI] = HWBLK(MSTPCR2, 18, CORE_AREA),
70 [HWBLK_SIM] = HWBLK(MSTPCR2, 16, CORE_AREA),
71 [HWBLK_KEYSC] = HWBLK(MSTPCR2, 14, SUB_AREA),
72 [HWBLK_TSIF] = HWBLK(MSTPCR2, 13, SUB_AREA),
73 [HWBLK_USBF] = HWBLK(MSTPCR2, 11, CORE_AREA),
74 [HWBLK_2DG] = HWBLK(MSTPCR2, 9, CORE_AREA_BM),
75 [HWBLK_SIU] = HWBLK(MSTPCR2, 8, CORE_AREA),
76 [HWBLK_JPU] = HWBLK(MSTPCR2, 6, CORE_AREA_BM),
77 [HWBLK_VOU] = HWBLK(MSTPCR2, 5, CORE_AREA_BM),
78 [HWBLK_BEU] = HWBLK(MSTPCR2, 4, CORE_AREA_BM),
79 [HWBLK_CEU] = HWBLK(MSTPCR2, 3, CORE_AREA_BM),
80 [HWBLK_VEU] = HWBLK(MSTPCR2, 2, CORE_AREA_BM),
81 [HWBLK_VPU] = HWBLK(MSTPCR2, 1, CORE_AREA_BM),
82 [HWBLK_LCDC] = HWBLK(MSTPCR2, 0, CORE_AREA_BM),
83};
84
85static struct hwblk_info sh7722_hwblk_info = {
86 .areas = sh7722_hwblk_area,
87 .nr_areas = ARRAY_SIZE(sh7722_hwblk_area),
88 .hwblks = sh7722_hwblk,
89 .nr_hwblks = ARRAY_SIZE(sh7722_hwblk),
90};
91
92int arch_hwblk_sleep_mode(void)
93{
94 if (!sh7722_hwblk_area[CORE_AREA].cnt[HWBLK_CNT_USAGE])
95 return SUSP_SH_STANDBY | SUSP_SH_SF;
96
97 if (!sh7722_hwblk_area[CORE_AREA_BM].cnt[HWBLK_CNT_USAGE])
98 return SUSP_SH_SLEEP | SUSP_SH_SF;
99
100 return SUSP_SH_SLEEP;
101}
102
103int __init arch_hwblk_init(void)
104{
105 return hwblk_register(&sh7722_hwblk_info);
106}
diff --git a/arch/sh/kernel/cpu/sh4a/hwblk-sh7723.c b/arch/sh/kernel/cpu/sh4a/hwblk-sh7723.c
new file mode 100644
index 000000000000..a7f4684d2032
--- /dev/null
+++ b/arch/sh/kernel/cpu/sh4a/hwblk-sh7723.c
@@ -0,0 +1,117 @@
1/*
2 * arch/sh/kernel/cpu/sh4a/hwblk-sh7723.c
3 *
4 * SH7723 hardware block support
5 *
6 * Copyright (C) 2009 Magnus Damm
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21#include <linux/init.h>
22#include <linux/kernel.h>
23#include <linux/io.h>
24#include <asm/suspend.h>
25#include <asm/hwblk.h>
26#include <cpu/sh7723.h>
27
28/* SH7723 registers */
29#define MSTPCR0 0xa4150030
30#define MSTPCR1 0xa4150034
31#define MSTPCR2 0xa4150038
32
33/* SH7723 Power Domains */
34enum { CORE_AREA, SUB_AREA, CORE_AREA_BM };
35static struct hwblk_area sh7723_hwblk_area[] = {
36 [CORE_AREA] = HWBLK_AREA(0, 0),
37 [CORE_AREA_BM] = HWBLK_AREA(HWBLK_AREA_FLAG_PARENT, CORE_AREA),
38 [SUB_AREA] = HWBLK_AREA(0, 0),
39};
40
41/* Table mapping HWBLK to Module Stop Bit and Power Domain */
42static struct hwblk sh7723_hwblk[HWBLK_NR] = {
43 [HWBLK_TLB] = HWBLK(MSTPCR0, 31, CORE_AREA),
44 [HWBLK_IC] = HWBLK(MSTPCR0, 30, CORE_AREA),
45 [HWBLK_OC] = HWBLK(MSTPCR0, 29, CORE_AREA),
46 [HWBLK_L2C] = HWBLK(MSTPCR0, 28, CORE_AREA),
47 [HWBLK_ILMEM] = HWBLK(MSTPCR0, 27, CORE_AREA),
48 [HWBLK_FPU] = HWBLK(MSTPCR0, 24, CORE_AREA),
49 [HWBLK_INTC] = HWBLK(MSTPCR0, 22, CORE_AREA),
50 [HWBLK_DMAC0] = HWBLK(MSTPCR0, 21, CORE_AREA_BM),
51 [HWBLK_SHYWAY] = HWBLK(MSTPCR0, 20, CORE_AREA),
52 [HWBLK_HUDI] = HWBLK(MSTPCR0, 19, CORE_AREA),
53 [HWBLK_DBG] = HWBLK(MSTPCR0, 18, CORE_AREA),
54 [HWBLK_UBC] = HWBLK(MSTPCR0, 17, CORE_AREA),
55 [HWBLK_SUBC] = HWBLK(MSTPCR0, 16, CORE_AREA),
56 [HWBLK_TMU0] = HWBLK(MSTPCR0, 15, CORE_AREA),
57 [HWBLK_CMT] = HWBLK(MSTPCR0, 14, SUB_AREA),
58 [HWBLK_RWDT] = HWBLK(MSTPCR0, 13, SUB_AREA),
59 [HWBLK_DMAC1] = HWBLK(MSTPCR0, 12, CORE_AREA_BM),
60 [HWBLK_TMU1] = HWBLK(MSTPCR0, 11, CORE_AREA),
61 [HWBLK_FLCTL] = HWBLK(MSTPCR0, 10, CORE_AREA),
62 [HWBLK_SCIF0] = HWBLK(MSTPCR0, 9, CORE_AREA),
63 [HWBLK_SCIF1] = HWBLK(MSTPCR0, 8, CORE_AREA),
64 [HWBLK_SCIF2] = HWBLK(MSTPCR0, 7, CORE_AREA),
65 [HWBLK_SCIF3] = HWBLK(MSTPCR0, 6, CORE_AREA),
66 [HWBLK_SCIF4] = HWBLK(MSTPCR0, 5, CORE_AREA),
67 [HWBLK_SCIF5] = HWBLK(MSTPCR0, 4, CORE_AREA),
68 [HWBLK_MSIOF0] = HWBLK(MSTPCR0, 2, CORE_AREA),
69 [HWBLK_MSIOF1] = HWBLK(MSTPCR0, 1, CORE_AREA),
70 [HWBLK_MERAM] = HWBLK(MSTPCR0, 0, CORE_AREA),
71
72 [HWBLK_IIC] = HWBLK(MSTPCR1, 9, CORE_AREA),
73 [HWBLK_RTC] = HWBLK(MSTPCR1, 8, SUB_AREA),
74
75 [HWBLK_ATAPI] = HWBLK(MSTPCR2, 28, CORE_AREA_BM),
76 [HWBLK_ADC] = HWBLK(MSTPCR2, 27, CORE_AREA),
77 [HWBLK_TPU] = HWBLK(MSTPCR2, 25, CORE_AREA),
78 [HWBLK_IRDA] = HWBLK(MSTPCR2, 24, CORE_AREA),
79 [HWBLK_TSIF] = HWBLK(MSTPCR2, 22, CORE_AREA),
80 [HWBLK_ICB] = HWBLK(MSTPCR2, 21, CORE_AREA_BM),
81 [HWBLK_SDHI0] = HWBLK(MSTPCR2, 18, CORE_AREA),
82 [HWBLK_SDHI1] = HWBLK(MSTPCR2, 17, CORE_AREA),
83 [HWBLK_KEYSC] = HWBLK(MSTPCR2, 14, SUB_AREA),
84 [HWBLK_USB] = HWBLK(MSTPCR2, 11, CORE_AREA),
85 [HWBLK_2DG] = HWBLK(MSTPCR2, 10, CORE_AREA_BM),
86 [HWBLK_SIU] = HWBLK(MSTPCR2, 8, CORE_AREA),
87 [HWBLK_VEU2H1] = HWBLK(MSTPCR2, 6, CORE_AREA_BM),
88 [HWBLK_VOU] = HWBLK(MSTPCR2, 5, CORE_AREA_BM),
89 [HWBLK_BEU] = HWBLK(MSTPCR2, 4, CORE_AREA_BM),
90 [HWBLK_CEU] = HWBLK(MSTPCR2, 3, CORE_AREA_BM),
91 [HWBLK_VEU2H0] = HWBLK(MSTPCR2, 2, CORE_AREA_BM),
92 [HWBLK_VPU] = HWBLK(MSTPCR2, 1, CORE_AREA_BM),
93 [HWBLK_LCDC] = HWBLK(MSTPCR2, 0, CORE_AREA_BM),
94};
95
96static struct hwblk_info sh7723_hwblk_info = {
97 .areas = sh7723_hwblk_area,
98 .nr_areas = ARRAY_SIZE(sh7723_hwblk_area),
99 .hwblks = sh7723_hwblk,
100 .nr_hwblks = ARRAY_SIZE(sh7723_hwblk),
101};
102
103int arch_hwblk_sleep_mode(void)
104{
105 if (!sh7723_hwblk_area[CORE_AREA].cnt[HWBLK_CNT_USAGE])
106 return SUSP_SH_STANDBY | SUSP_SH_SF;
107
108 if (!sh7723_hwblk_area[CORE_AREA_BM].cnt[HWBLK_CNT_USAGE])
109 return SUSP_SH_SLEEP | SUSP_SH_SF;
110
111 return SUSP_SH_SLEEP;
112}
113
114int __init arch_hwblk_init(void)
115{
116 return hwblk_register(&sh7723_hwblk_info);
117}
diff --git a/arch/sh/kernel/cpu/sh4a/hwblk-sh7724.c b/arch/sh/kernel/cpu/sh4a/hwblk-sh7724.c
new file mode 100644
index 000000000000..1613ad6013c3
--- /dev/null
+++ b/arch/sh/kernel/cpu/sh4a/hwblk-sh7724.c
@@ -0,0 +1,121 @@
1/*
2 * arch/sh/kernel/cpu/sh4a/hwblk-sh7724.c
3 *
4 * SH7724 hardware block support
5 *
6 * Copyright (C) 2009 Magnus Damm
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21#include <linux/init.h>
22#include <linux/kernel.h>
23#include <linux/io.h>
24#include <asm/suspend.h>
25#include <asm/hwblk.h>
26#include <cpu/sh7724.h>
27
28/* SH7724 registers */
29#define MSTPCR0 0xa4150030
30#define MSTPCR1 0xa4150034
31#define MSTPCR2 0xa4150038
32
33/* SH7724 Power Domains */
34enum { CORE_AREA, SUB_AREA, CORE_AREA_BM };
35static struct hwblk_area sh7724_hwblk_area[] = {
36 [CORE_AREA] = HWBLK_AREA(0, 0),
37 [CORE_AREA_BM] = HWBLK_AREA(HWBLK_AREA_FLAG_PARENT, CORE_AREA),
38 [SUB_AREA] = HWBLK_AREA(0, 0),
39};
40
41/* Table mapping HWBLK to Module Stop Bit and Power Domain */
42static struct hwblk sh7724_hwblk[HWBLK_NR] = {
43 [HWBLK_TLB] = HWBLK(MSTPCR0, 31, CORE_AREA),
44 [HWBLK_IC] = HWBLK(MSTPCR0, 30, CORE_AREA),
45 [HWBLK_OC] = HWBLK(MSTPCR0, 29, CORE_AREA),
46 [HWBLK_RSMEM] = HWBLK(MSTPCR0, 28, CORE_AREA),
47 [HWBLK_ILMEM] = HWBLK(MSTPCR0, 27, CORE_AREA),
48 [HWBLK_L2C] = HWBLK(MSTPCR0, 26, CORE_AREA),
49 [HWBLK_FPU] = HWBLK(MSTPCR0, 24, CORE_AREA),
50 [HWBLK_INTC] = HWBLK(MSTPCR0, 22, CORE_AREA),
51 [HWBLK_DMAC0] = HWBLK(MSTPCR0, 21, CORE_AREA_BM),
52 [HWBLK_SHYWAY] = HWBLK(MSTPCR0, 20, CORE_AREA),
53 [HWBLK_HUDI] = HWBLK(MSTPCR0, 19, CORE_AREA),
54 [HWBLK_DBG] = HWBLK(MSTPCR0, 18, CORE_AREA),
55 [HWBLK_UBC] = HWBLK(MSTPCR0, 17, CORE_AREA),
56 [HWBLK_TMU0] = HWBLK(MSTPCR0, 15, CORE_AREA),
57 [HWBLK_CMT] = HWBLK(MSTPCR0, 14, SUB_AREA),
58 [HWBLK_RWDT] = HWBLK(MSTPCR0, 13, SUB_AREA),
59 [HWBLK_DMAC1] = HWBLK(MSTPCR0, 12, CORE_AREA_BM),
60 [HWBLK_TMU1] = HWBLK(MSTPCR0, 10, CORE_AREA),
61 [HWBLK_SCIF0] = HWBLK(MSTPCR0, 9, CORE_AREA),
62 [HWBLK_SCIF1] = HWBLK(MSTPCR0, 8, CORE_AREA),
63 [HWBLK_SCIF2] = HWBLK(MSTPCR0, 7, CORE_AREA),
64 [HWBLK_SCIF3] = HWBLK(MSTPCR0, 6, CORE_AREA),
65 [HWBLK_SCIF4] = HWBLK(MSTPCR0, 5, CORE_AREA),
66 [HWBLK_SCIF5] = HWBLK(MSTPCR0, 4, CORE_AREA),
67 [HWBLK_MSIOF0] = HWBLK(MSTPCR0, 2, CORE_AREA),
68 [HWBLK_MSIOF1] = HWBLK(MSTPCR0, 1, CORE_AREA),
69
70 [HWBLK_KEYSC] = HWBLK(MSTPCR1, 12, SUB_AREA),
71 [HWBLK_RTC] = HWBLK(MSTPCR1, 11, SUB_AREA),
72 [HWBLK_IIC0] = HWBLK(MSTPCR1, 9, CORE_AREA),
73 [HWBLK_IIC1] = HWBLK(MSTPCR1, 8, CORE_AREA),
74
75 [HWBLK_MMC] = HWBLK(MSTPCR2, 29, CORE_AREA),
76 [HWBLK_ETHER] = HWBLK(MSTPCR2, 28, CORE_AREA_BM),
77 [HWBLK_ATAPI] = HWBLK(MSTPCR2, 26, CORE_AREA_BM),
78 [HWBLK_TPU] = HWBLK(MSTPCR2, 25, CORE_AREA),
79 [HWBLK_IRDA] = HWBLK(MSTPCR2, 24, CORE_AREA),
80 [HWBLK_TSIF] = HWBLK(MSTPCR2, 22, CORE_AREA),
81 [HWBLK_USB1] = HWBLK(MSTPCR2, 21, CORE_AREA),
82 [HWBLK_USB0] = HWBLK(MSTPCR2, 20, CORE_AREA),
83 [HWBLK_2DG] = HWBLK(MSTPCR2, 19, CORE_AREA_BM),
84 [HWBLK_SDHI0] = HWBLK(MSTPCR2, 18, CORE_AREA),
85 [HWBLK_SDHI1] = HWBLK(MSTPCR2, 17, CORE_AREA),
86 [HWBLK_VEU1] = HWBLK(MSTPCR2, 15, CORE_AREA_BM),
87 [HWBLK_CEU1] = HWBLK(MSTPCR2, 13, CORE_AREA_BM),
88 [HWBLK_BEU1] = HWBLK(MSTPCR2, 12, CORE_AREA_BM),
89 [HWBLK_2DDMAC] = HWBLK(MSTPCR2, 10, CORE_AREA_BM),
90 [HWBLK_SPU] = HWBLK(MSTPCR2, 9, CORE_AREA_BM),
91 [HWBLK_JPU] = HWBLK(MSTPCR2, 6, CORE_AREA_BM),
92 [HWBLK_VOU] = HWBLK(MSTPCR2, 5, CORE_AREA_BM),
93 [HWBLK_BEU0] = HWBLK(MSTPCR2, 4, CORE_AREA_BM),
94 [HWBLK_CEU0] = HWBLK(MSTPCR2, 3, CORE_AREA_BM),
95 [HWBLK_VEU0] = HWBLK(MSTPCR2, 2, CORE_AREA_BM),
96 [HWBLK_VPU] = HWBLK(MSTPCR2, 1, CORE_AREA_BM),
97 [HWBLK_LCDC] = HWBLK(MSTPCR2, 0, CORE_AREA_BM),
98};
99
100static struct hwblk_info sh7724_hwblk_info = {
101 .areas = sh7724_hwblk_area,
102 .nr_areas = ARRAY_SIZE(sh7724_hwblk_area),
103 .hwblks = sh7724_hwblk,
104 .nr_hwblks = ARRAY_SIZE(sh7724_hwblk),
105};
106
107int arch_hwblk_sleep_mode(void)
108{
109 if (!sh7724_hwblk_area[CORE_AREA].cnt[HWBLK_CNT_USAGE])
110 return SUSP_SH_STANDBY | SUSP_SH_SF;
111
112 if (!sh7724_hwblk_area[CORE_AREA_BM].cnt[HWBLK_CNT_USAGE])
113 return SUSP_SH_SLEEP | SUSP_SH_SF;
114
115 return SUSP_SH_SLEEP;
116}
117
118int __init arch_hwblk_init(void)
119{
120 return hwblk_register(&sh7724_hwblk_info);
121}
diff --git a/arch/sh/kernel/cpu/sh4a/pinmux-sh7757.c b/arch/sh/kernel/cpu/sh4a/pinmux-sh7757.c
new file mode 100644
index 000000000000..ed23b155c097
--- /dev/null
+++ b/arch/sh/kernel/cpu/sh4a/pinmux-sh7757.c
@@ -0,0 +1,2019 @@
1/*
2 * SH7757 (A0 step) Pinmux
3 *
4 * Copyright (C) 2009 Renesas Solutions Corp.
5 *
6 * Author : Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
7 *
8 * Based on SH7757 Pinmux
9 * Copyright (C) 2008 Magnus Damm
10 *
11 * This file is subject to the terms and conditions of the GNU General Public
12 * License. See the file "COPYING" in the main directory of this archive
13 * for more details.
14 */
15
16#include <linux/init.h>
17#include <linux/kernel.h>
18#include <linux/gpio.h>
19#include <cpu/sh7757.h>
20
21enum {
22 PINMUX_RESERVED = 0,
23
24 PINMUX_DATA_BEGIN,
25 PTA7_DATA, PTA6_DATA, PTA5_DATA, PTA4_DATA,
26 PTA3_DATA, PTA2_DATA, PTA1_DATA, PTA0_DATA,
27 PTB7_DATA, PTB6_DATA, PTB5_DATA, PTB4_DATA,
28 PTB3_DATA, PTB2_DATA, PTB1_DATA, PTB0_DATA,
29 PTC7_DATA, PTC6_DATA, PTC5_DATA, PTC4_DATA,
30 PTC3_DATA, PTC2_DATA, PTC1_DATA, PTC0_DATA,
31 PTD7_DATA, PTD6_DATA, PTD5_DATA, PTD4_DATA,
32 PTD3_DATA, PTD2_DATA, PTD1_DATA, PTD0_DATA,
33 PTE7_DATA, PTE6_DATA, PTE5_DATA, PTE4_DATA,
34 PTE3_DATA, PTE2_DATA, PTE1_DATA, PTE0_DATA,
35 PTF7_DATA, PTF6_DATA, PTF5_DATA, PTF4_DATA,
36 PTF3_DATA, PTF2_DATA, PTF1_DATA, PTF0_DATA,
37 PTG7_DATA, PTG6_DATA, PTG5_DATA, PTG4_DATA,
38 PTG3_DATA, PTG2_DATA, PTG1_DATA, PTG0_DATA,
39 PTH7_DATA, PTH6_DATA, PTH5_DATA, PTH4_DATA,
40 PTH3_DATA, PTH2_DATA, PTH1_DATA, PTH0_DATA,
41 PTI7_DATA, PTI6_DATA, PTI5_DATA, PTI4_DATA,
42 PTI3_DATA, PTI2_DATA, PTI1_DATA, PTI0_DATA,
43 PTJ7_DATA, PTJ6_DATA, PTJ5_DATA, PTJ4_DATA,
44 PTJ3_DATA, PTJ2_DATA, PTJ1_DATA, PTJ0_DATA,
45 PTK7_DATA, PTK6_DATA, PTK5_DATA, PTK4_DATA,
46 PTK3_DATA, PTK2_DATA, PTK1_DATA, PTK0_DATA,
47 PTL7_DATA, PTL6_DATA, PTL5_DATA, PTL4_DATA,
48 PTL3_DATA, PTL2_DATA, PTL1_DATA, PTL0_DATA,
49 PTM6_DATA, PTM5_DATA, PTM4_DATA,
50 PTM3_DATA, PTM2_DATA, PTM1_DATA, PTM0_DATA,
51 PTN7_DATA, PTN6_DATA, PTN5_DATA, PTN4_DATA,
52 PTN3_DATA, PTN2_DATA, PTN1_DATA, PTN0_DATA,
53 PTO7_DATA, PTO6_DATA, PTO5_DATA, PTO4_DATA,
54 PTO3_DATA, PTO2_DATA, PTO1_DATA, PTO0_DATA,
55 PTP6_DATA, PTP5_DATA, PTP4_DATA,
56 PTP3_DATA, PTP2_DATA, PTP1_DATA, PTP0_DATA,
57 PTQ6_DATA, PTQ5_DATA, PTQ4_DATA,
58 PTQ3_DATA, PTQ2_DATA, PTQ1_DATA, PTQ0_DATA,
59 PTR7_DATA, PTR6_DATA, PTR5_DATA, PTR4_DATA,
60 PTR3_DATA, PTR2_DATA, PTR1_DATA, PTR0_DATA,
61 PTS7_DATA, PTS6_DATA, PTS5_DATA, PTS4_DATA,
62 PTS3_DATA, PTS2_DATA, PTS1_DATA, PTS0_DATA,
63 PTT5_DATA, PTT4_DATA,
64 PTT3_DATA, PTT2_DATA, PTT1_DATA, PTT0_DATA,
65 PTU7_DATA, PTU6_DATA, PTU5_DATA, PTU4_DATA,
66 PTU3_DATA, PTU2_DATA, PTU1_DATA, PTU0_DATA,
67 PTV7_DATA, PTV6_DATA, PTV5_DATA, PTV4_DATA,
68 PTV3_DATA, PTV2_DATA, PTV1_DATA, PTV0_DATA,
69 PTW7_DATA, PTW6_DATA, PTW5_DATA, PTW4_DATA,
70 PTW3_DATA, PTW2_DATA, PTW1_DATA, PTW0_DATA,
71 PTX7_DATA, PTX6_DATA, PTX5_DATA, PTX4_DATA,
72 PTX3_DATA, PTX2_DATA, PTX1_DATA, PTX0_DATA,
73 PTY7_DATA, PTY6_DATA, PTY5_DATA, PTY4_DATA,
74 PTY3_DATA, PTY2_DATA, PTY1_DATA, PTY0_DATA,
75 PTZ7_DATA, PTZ6_DATA, PTZ5_DATA, PTZ4_DATA,
76 PTZ3_DATA, PTZ2_DATA, PTZ1_DATA, PTZ0_DATA,
77 PINMUX_DATA_END,
78
79 PINMUX_INPUT_BEGIN,
80 PTA7_IN, PTA6_IN, PTA5_IN, PTA4_IN,
81 PTA3_IN, PTA2_IN, PTA1_IN, PTA0_IN,
82 PTB7_IN, PTB6_IN, PTB5_IN, PTB4_IN,
83 PTB3_IN, PTB2_IN, PTB1_IN, PTB0_IN,
84 PTC7_IN, PTC6_IN, PTC5_IN, PTC4_IN,
85 PTC3_IN, PTC2_IN, PTC1_IN, PTC0_IN,
86 PTD7_IN, PTD6_IN, PTD5_IN, PTD4_IN,
87 PTD3_IN, PTD2_IN, PTD1_IN, PTD0_IN,
88 PTE7_IN, PTE6_IN, PTE5_IN, PTE4_IN,
89 PTE3_IN, PTE2_IN, PTE1_IN, PTE0_IN,
90 PTF7_IN, PTF6_IN, PTF5_IN, PTF4_IN,
91 PTF3_IN, PTF2_IN, PTF1_IN, PTF0_IN,
92 PTG7_IN, PTG6_IN, PTG5_IN, PTG4_IN,
93 PTG3_IN, PTG2_IN, PTG1_IN, PTG0_IN,
94 PTH7_IN, PTH6_IN, PTH5_IN, PTH4_IN,
95 PTH3_IN, PTH2_IN, PTH1_IN, PTH0_IN,
96 PTI7_IN, PTI6_IN, PTI5_IN, PTI4_IN,
97 PTI3_IN, PTI2_IN, PTI1_IN, PTI0_IN,
98 PTJ7_IN, PTJ6_IN, PTJ5_IN, PTJ4_IN,
99 PTJ3_IN, PTJ2_IN, PTJ1_IN, PTJ0_IN,
100 PTK7_IN, PTK6_IN, PTK5_IN, PTK4_IN,
101 PTK3_IN, PTK2_IN, PTK1_IN, PTK0_IN,
102 PTL7_IN, PTL6_IN, PTL5_IN, PTL4_IN,
103 PTL3_IN, PTL2_IN, PTL1_IN, PTL0_IN,
104 PTM6_IN, PTM5_IN, PTM4_IN,
105 PTM3_IN, PTM2_IN, PTM1_IN, PTM0_IN,
106 PTN7_IN, PTN6_IN, PTN5_IN, PTN4_IN,
107 PTN3_IN, PTN2_IN, PTN1_IN, PTN0_IN,
108 PTO7_IN, PTO6_IN, PTO5_IN, PTO4_IN,
109 PTO3_IN, PTO2_IN, PTO1_IN, PTO0_IN,
110 PTP6_IN, PTP5_IN, PTP4_IN,
111 PTP3_IN, PTP2_IN, PTP1_IN, PTP0_IN,
112 PTQ6_IN, PTQ5_IN, PTQ4_IN,
113 PTQ3_IN, PTQ2_IN, PTQ1_IN, PTQ0_IN,
114 PTR7_IN, PTR6_IN, PTR5_IN, PTR4_IN,
115 PTR3_IN, PTR2_IN, PTR1_IN, PTR0_IN,
116 PTS7_IN, PTS6_IN, PTS5_IN, PTS4_IN,
117 PTS3_IN, PTS2_IN, PTS1_IN, PTS0_IN,
118 PTT5_IN, PTT4_IN,
119 PTT3_IN, PTT2_IN, PTT1_IN, PTT0_IN,
120 PTU7_IN, PTU6_IN, PTU5_IN, PTU4_IN,
121 PTU3_IN, PTU2_IN, PTU1_IN, PTU0_IN,
122 PTV7_IN, PTV6_IN, PTV5_IN, PTV4_IN,
123 PTV3_IN, PTV2_IN, PTV1_IN, PTV0_IN,
124 PTW7_IN, PTW6_IN, PTW5_IN, PTW4_IN,
125 PTW3_IN, PTW2_IN, PTW1_IN, PTW0_IN,
126 PTX7_IN, PTX6_IN, PTX5_IN, PTX4_IN,
127 PTX3_IN, PTX2_IN, PTX1_IN, PTX0_IN,
128 PTY7_IN, PTY6_IN, PTY5_IN, PTY4_IN,
129 PTY3_IN, PTY2_IN, PTY1_IN, PTY0_IN,
130 PTZ7_IN, PTZ6_IN, PTZ5_IN, PTZ4_IN,
131 PTZ3_IN, PTZ2_IN, PTZ1_IN, PTZ0_IN,
132 PINMUX_INPUT_END,
133
134 PINMUX_INPUT_PULLUP_BEGIN,
135 PTU7_IN_PU, PTU6_IN_PU, PTU5_IN_PU, PTU4_IN_PU,
136 PTU3_IN_PU, PTU2_IN_PU, PTU1_IN_PU, PTU0_IN_PU,
137 PTV7_IN_PU, PTV6_IN_PU, PTV5_IN_PU, PTV4_IN_PU,
138 PTV3_IN_PU, PTV2_IN_PU, PTV1_IN_PU, PTV0_IN_PU,
139 PTW7_IN_PU, PTW6_IN_PU, PTW5_IN_PU, PTW4_IN_PU,
140 PTW3_IN_PU, PTW2_IN_PU, PTW1_IN_PU, PTW0_IN_PU,
141 PTX7_IN_PU, PTX6_IN_PU, PTX5_IN_PU, PTX4_IN_PU,
142 PTX3_IN_PU, PTX2_IN_PU, PTX1_IN_PU, PTX0_IN_PU,
143 PTY7_IN_PU, PTY6_IN_PU, PTY5_IN_PU, PTY4_IN_PU,
144 PTY3_IN_PU, PTY2_IN_PU, PTY1_IN_PU, PTY0_IN_PU,
145 PINMUX_INPUT_PULLUP_END,
146
147 PINMUX_OUTPUT_BEGIN,
148 PTA7_OUT, PTA6_OUT, PTA5_OUT, PTA4_OUT,
149 PTA3_OUT, PTA2_OUT, PTA1_OUT, PTA0_OUT,
150 PTB7_OUT, PTB6_OUT, PTB5_OUT, PTB4_OUT,
151 PTB3_OUT, PTB2_OUT, PTB1_OUT, PTB0_OUT,
152 PTC7_OUT, PTC6_OUT, PTC5_OUT, PTC4_OUT,
153 PTC3_OUT, PTC2_OUT, PTC1_OUT, PTC0_OUT,
154 PTD7_OUT, PTD6_OUT, PTD5_OUT, PTD4_OUT,
155 PTD3_OUT, PTD2_OUT, PTD1_OUT, PTD0_OUT,
156 PTE7_OUT, PTE6_OUT, PTE5_OUT, PTE4_OUT,
157 PTE3_OUT, PTE2_OUT, PTE1_OUT, PTE0_OUT,
158 PTF7_OUT, PTF6_OUT, PTF5_OUT, PTF4_OUT,
159 PTF3_OUT, PTF2_OUT, PTF1_OUT, PTF0_OUT,
160 PTG7_OUT, PTG6_OUT, PTG5_OUT, PTG4_OUT,
161 PTG3_OUT, PTG2_OUT, PTG1_OUT, PTG0_OUT,
162 PTH7_OUT, PTH6_OUT, PTH5_OUT, PTH4_OUT,
163 PTH3_OUT, PTH2_OUT, PTH1_OUT, PTH0_OUT,
164 PTI7_OUT, PTI6_OUT, PTI5_OUT, PTI4_OUT,
165 PTI3_OUT, PTI2_OUT, PTI1_OUT, PTI0_OUT,
166 PTJ7_OUT, PTJ6_OUT, PTJ5_OUT, PTJ4_OUT,
167 PTJ3_OUT, PTJ2_OUT, PTJ1_OUT, PTJ0_OUT,
168 PTK7_OUT, PTK6_OUT, PTK5_OUT, PTK4_OUT,
169 PTK3_OUT, PTK2_OUT, PTK1_OUT, PTK0_OUT,
170 PTL7_OUT, PTL6_OUT, PTL5_OUT, PTL4_OUT,
171 PTL3_OUT, PTL2_OUT, PTL1_OUT, PTL0_OUT,
172 PTM6_OUT, PTM5_OUT, PTM4_OUT,
173 PTM3_OUT, PTM2_OUT, PTM1_OUT, PTM0_OUT,
174 PTN7_OUT, PTN6_OUT, PTN5_OUT, PTN4_OUT,
175 PTN3_OUT, PTN2_OUT, PTN1_OUT, PTN0_OUT,
176 PTO7_OUT, PTO6_OUT, PTO5_OUT, PTO4_OUT,
177 PTO3_OUT, PTO2_OUT, PTO1_OUT, PTO0_OUT,
178 PTP6_OUT, PTP5_OUT, PTP4_OUT,
179 PTP3_OUT, PTP2_OUT, PTP1_OUT, PTP0_OUT,
180 PTQ6_OUT, PTQ5_OUT, PTQ4_OUT,
181 PTQ3_OUT, PTQ2_OUT, PTQ1_OUT, PTQ0_OUT,
182 PTR7_OUT, PTR6_OUT, PTR5_OUT, PTR4_OUT,
183 PTR3_OUT, PTR2_OUT, PTR1_OUT, PTR0_OUT,
184 PTS7_OUT, PTS6_OUT, PTS5_OUT, PTS4_OUT,
185 PTS3_OUT, PTS2_OUT, PTS1_OUT, PTS0_OUT,
186 PTT5_OUT, PTT4_OUT,
187 PTT3_OUT, PTT2_OUT, PTT1_OUT, PTT0_OUT,
188 PTU7_OUT, PTU6_OUT, PTU5_OUT, PTU4_OUT,
189 PTU3_OUT, PTU2_OUT, PTU1_OUT, PTU0_OUT,
190 PTV7_OUT, PTV6_OUT, PTV5_OUT, PTV4_OUT,
191 PTV3_OUT, PTV2_OUT, PTV1_OUT, PTV0_OUT,
192 PTW7_OUT, PTW6_OUT, PTW5_OUT, PTW4_OUT,
193 PTW3_OUT, PTW2_OUT, PTW1_OUT, PTW0_OUT,
194 PTX7_OUT, PTX6_OUT, PTX5_OUT, PTX4_OUT,
195 PTX3_OUT, PTX2_OUT, PTX1_OUT, PTX0_OUT,
196 PTY7_OUT, PTY6_OUT, PTY5_OUT, PTY4_OUT,
197 PTY3_OUT, PTY2_OUT, PTY1_OUT, PTY0_OUT,
198 PTZ7_OUT, PTZ6_OUT, PTZ5_OUT, PTZ4_OUT,
199 PTZ3_OUT, PTZ2_OUT, PTZ1_OUT, PTZ0_OUT,
200 PINMUX_OUTPUT_END,
201
202 PINMUX_FUNCTION_BEGIN,
203 PTA7_FN, PTA6_FN, PTA5_FN, PTA4_FN,
204 PTA3_FN, PTA2_FN, PTA1_FN, PTA0_FN,
205 PTB7_FN, PTB6_FN, PTB5_FN, PTB4_FN,
206 PTB3_FN, PTB2_FN, PTB1_FN, PTB0_FN,
207 PTC7_FN, PTC6_FN, PTC5_FN, PTC4_FN,
208 PTC3_FN, PTC2_FN, PTC1_FN, PTC0_FN,
209 PTD7_FN, PTD6_FN, PTD5_FN, PTD4_FN,
210 PTD3_FN, PTD2_FN, PTD1_FN, PTD0_FN,
211 PTE7_FN, PTE6_FN, PTE5_FN, PTE4_FN,
212 PTE3_FN, PTE2_FN, PTE1_FN, PTE0_FN,
213 PTF7_FN, PTF6_FN, PTF5_FN, PTF4_FN,
214 PTF3_FN, PTF2_FN, PTF1_FN, PTF0_FN,
215 PTG7_FN, PTG6_FN, PTG5_FN, PTG4_FN,
216 PTG3_FN, PTG2_FN, PTG1_FN, PTG0_FN,
217 PTH7_FN, PTH6_FN, PTH5_FN, PTH4_FN,
218 PTH3_FN, PTH2_FN, PTH1_FN, PTH0_FN,
219 PTI7_FN, PTI6_FN, PTI5_FN, PTI4_FN,
220 PTI3_FN, PTI2_FN, PTI1_FN, PTI0_FN,
221 PTJ7_FN, PTJ6_FN, PTJ5_FN, PTJ4_FN,
222 PTJ3_FN, PTJ2_FN, PTJ1_FN, PTJ0_FN,
223 PTK7_FN, PTK6_FN, PTK5_FN, PTK4_FN,
224 PTK3_FN, PTK2_FN, PTK1_FN, PTK0_FN,
225 PTL7_FN, PTL6_FN, PTL5_FN, PTL4_FN,
226 PTL3_FN, PTL2_FN, PTL1_FN, PTL0_FN,
227 PTM6_FN, PTM5_FN, PTM4_FN,
228 PTM3_FN, PTM2_FN, PTM1_FN, PTM0_FN,
229 PTN7_FN, PTN6_FN, PTN5_FN, PTN4_FN,
230 PTN3_FN, PTN2_FN, PTN1_FN, PTN0_FN,
231 PTO7_FN, PTO6_FN, PTO5_FN, PTO4_FN,
232 PTO3_FN, PTO2_FN, PTO1_FN, PTO0_FN,
233 PTP6_FN, PTP5_FN, PTP4_FN,
234 PTP3_FN, PTP2_FN, PTP1_FN, PTP0_FN,
235 PTQ6_FN, PTQ5_FN, PTQ4_FN,
236 PTQ3_FN, PTQ2_FN, PTQ1_FN, PTQ0_FN,
237 PTR7_FN, PTR6_FN, PTR5_FN, PTR4_FN,
238 PTR3_FN, PTR2_FN, PTR1_FN, PTR0_FN,
239 PTS7_FN, PTS6_FN, PTS5_FN, PTS4_FN,
240 PTS3_FN, PTS2_FN, PTS1_FN, PTS0_FN,
241 PTT5_FN, PTT4_FN,
242 PTT3_FN, PTT2_FN, PTT1_FN, PTT0_FN,
243 PTU7_FN, PTU6_FN, PTU5_FN, PTU4_FN,
244 PTU3_FN, PTU2_FN, PTU1_FN, PTU0_FN,
245 PTV7_FN, PTV6_FN, PTV5_FN, PTV4_FN,
246 PTV3_FN, PTV2_FN, PTV1_FN, PTV0_FN,
247 PTW7_FN, PTW6_FN, PTW5_FN, PTW4_FN,
248 PTW3_FN, PTW2_FN, PTW1_FN, PTW0_FN,
249 PTX7_FN, PTX6_FN, PTX5_FN, PTX4_FN,
250 PTX3_FN, PTX2_FN, PTX1_FN, PTX0_FN,
251 PTY7_FN, PTY6_FN, PTY5_FN, PTY4_FN,
252 PTY3_FN, PTY2_FN, PTY1_FN, PTY0_FN,
253 PTZ7_FN, PTZ6_FN, PTZ5_FN, PTZ4_FN,
254 PTZ3_FN, PTZ2_FN, PTZ1_FN, PTZ0_FN,
255
256 PS0_15_FN1, PS0_15_FN3,
257 PS0_14_FN1, PS0_14_FN3,
258 PS0_13_FN1, PS0_13_FN3,
259 PS0_12_FN1, PS0_12_FN3,
260 PS0_7_FN1, PS0_7_FN2,
261 PS0_6_FN1, PS0_6_FN2,
262 PS0_5_FN1, PS0_5_FN2,
263 PS0_4_FN1, PS0_4_FN2,
264 PS0_3_FN1, PS0_3_FN2,
265 PS0_2_FN1, PS0_2_FN2,
266 PS0_1_FN1, PS0_1_FN2,
267
268 PS1_7_FN1, PS1_7_FN3,
269 PS1_6_FN1, PS1_6_FN3,
270
271 PS2_13_FN1, PS2_13_FN3,
272 PS2_12_FN1, PS2_12_FN3,
273 PS2_1_FN1, PS2_1_FN2,
274 PS2_0_FN1, PS2_0_FN2,
275
276 PS4_15_FN1, PS4_15_FN2,
277 PS4_14_FN1, PS4_14_FN2,
278 PS4_13_FN1, PS4_13_FN2,
279 PS4_12_FN1, PS4_12_FN2,
280 PS4_11_FN1, PS4_11_FN2,
281 PS4_10_FN1, PS4_10_FN2,
282 PS4_9_FN1, PS4_9_FN2,
283 PS4_3_FN1, PS4_3_FN2,
284 PS4_2_FN1, PS4_2_FN2,
285 PS4_1_FN1, PS4_1_FN2,
286 PS4_0_FN1, PS4_0_FN2,
287
288 PS5_9_FN1, PS5_9_FN2,
289 PS5_8_FN1, PS5_8_FN2,
290 PS5_7_FN1, PS5_7_FN2,
291 PS5_6_FN1, PS5_6_FN2,
292 PS5_5_FN1, PS5_5_FN2,
293 PS5_4_FN1, PS5_4_FN2,
294
295 /* AN15 to 8 : EVENT15 to 8 */
296 PS6_7_FN_AN, PS6_7_FN_EV,
297 PS6_6_FN_AN, PS6_6_FN_EV,
298 PS6_5_FN_AN, PS6_5_FN_EV,
299 PS6_4_FN_AN, PS6_4_FN_EV,
300 PS6_3_FN_AN, PS6_3_FN_EV,
301 PS6_2_FN_AN, PS6_2_FN_EV,
302 PS6_1_FN_AN, PS6_1_FN_EV,
303 PS6_0_FN_AN, PS6_0_FN_EV,
304
305 PINMUX_FUNCTION_END,
306
307 PINMUX_MARK_BEGIN,
308 /* PTA (mobule: LBSC, CPG, LPC) */
309 BS_MARK, RDWR_MARK, WE1_MARK, RDY_MARK,
310 MD10_MARK, MD9_MARK, MD8_MARK,
311 LGPIO7_MARK, LGPIO6_MARK, LGPIO5_MARK, LGPIO4_MARK,
312 LGPIO3_MARK, LGPIO2_MARK, LGPIO1_MARK, LGPIO0_MARK,
313
314 /* PTB (mobule: LBSC, EtherC, SIM, LPC) */
315 D15_MARK, D14_MARK, D13_MARK, D12_MARK,
316 D11_MARK, D10_MARK, D9_MARK, D8_MARK,
317 ET0_MDC_MARK, ET0_MDIO_MARK, ET1_MDC_MARK, ET1_MDIO_MARK,
318 SIM_D_MARK, SIM_CLK_MARK, SIM_RST_MARK,
319 WPSZ1_MARK, WPSZ0_MARK, FWID_MARK, FLSHSZ_MARK,
320 LPC_SPIEN_MARK, BASEL_MARK,
321
322 /* PTC (mobule: SD) */
323 SD_WP_MARK, SD_CD_MARK, SD_CLK_MARK, SD_CMD_MARK,
324 SD_D3_MARK, SD_D2_MARK, SD_D1_MARK, SD_D0_MARK,
325
326 /* PTD (mobule: INTC, SPI0, LBSC, CPG, ADC) */
327 IRQ7_MARK, IRQ6_MARK, IRQ5_MARK, IRQ4_MARK,
328 IRQ3_MARK, IRQ2_MARK, IRQ1_MARK, IRQ0_MARK,
329 MD6_MARK, MD5_MARK, MD3_MARK, MD2_MARK,
330 MD1_MARK, MD0_MARK, ADTRG1_MARK, ADTRG0_MARK,
331
332 /* PTE (mobule: EtherC) */
333 ET0_CRS_DV_MARK, ET0_TXD1_MARK,
334 ET0_TXD0_MARK, ET0_TX_EN_MARK,
335 ET0_REF_CLK_MARK, ET0_RXD1_MARK,
336 ET0_RXD0_MARK, ET0_RX_ER_MARK,
337
338 /* PTF (mobule: EtherC) */
339 ET1_CRS_DV_MARK, ET1_TXD1_MARK,
340 ET1_TXD0_MARK, ET1_TX_EN_MARK,
341 ET1_REF_CLK_MARK, ET1_RXD1_MARK,
342 ET1_RXD0_MARK, ET1_RX_ER_MARK,
343
344 /* PTG (mobule: SYSTEM, PWMX, LPC) */
345 STATUS0_MARK, STATUS1_MARK,
346 PWX0_MARK, PWX1_MARK, PWX2_MARK, PWX3_MARK,
347 SERIRQ_MARK, CLKRUN_MARK, LPCPD_MARK, LDRQ_MARK,
348
349 /* PTH (mobule: TMU, SCIF234, SPI1, SPI0) */
350 TCLK_MARK, RXD4_MARK, TXD4_MARK,
351 SP1_MOSI_MARK, SP1_MISO_MARK, SP1_SCK_MARK, SP1_SCK_FB_MARK,
352 SP1_SS0_MARK, SP1_SS1_MARK, SP0_SS1_MARK,
353
354 /* PTI (mobule: INTC) */
355 IRQ15_MARK, IRQ14_MARK, IRQ13_MARK, IRQ12_MARK,
356 IRQ11_MARK, IRQ10_MARK, IRQ9_MARK, IRQ8_MARK,
357
358 /* PTJ (mobule: SCIF234, SERMUX) */
359 RXD3_MARK, TXD3_MARK, RXD2_MARK, TXD2_MARK,
360 COM1_TXD_MARK, COM1_RXD_MARK, COM1_RTS_MARK, COM1_CTS_MARK,
361
362 /* PTK (mobule: SERMUX) */
363 COM2_TXD_MARK, COM2_RXD_MARK, COM2_RTS_MARK, COM2_CTS_MARK,
364 COM2_DTR_MARK, COM2_DSR_MARK, COM2_DCD_MARK, COM2_RI_MARK,
365
366 /* PTL (mobule: SERMUX) */
367 RAC_TXD_MARK, RAC_RXD_MARK, RAC_RTS_MARK, RAC_CTS_MARK,
368 RAC_DTR_MARK, RAC_DSR_MARK, RAC_DCD_MARK, RAC_RI_MARK,
369
370 /* PTM (mobule: IIC, LPC) */
371 SDA6_MARK, SCL6_MARK, SDA7_MARK, SCL7_MARK,
372 WP_MARK, FMS0_MARK, FMS1_MARK,
373
374 /* PTN (mobule: SCIF234, EVC) */
375 SCK2_MARK, RTS4_MARK, RTS3_MARK, RTS2_MARK,
376 CTS4_MARK, CTS3_MARK, CTS2_MARK,
377 EVENT7_MARK, EVENT6_MARK, EVENT5_MARK, EVENT4_MARK,
378 EVENT3_MARK, EVENT2_MARK, EVENT1_MARK, EVENT0_MARK,
379
380 /* PTO (mobule: SGPIO) */
381 SGPIO0_CLK_MARK, SGPIO0_LOAD_MARK,
382 SGPIO0_DI_MARK, SGPIO0_DO_MARK,
383 SGPIO1_CLK_MARK, SGPIO1_LOAD_MARK,
384 SGPIO1_DI_MARK, SGPIO1_DO_MARK,
385
386 /* PTP (mobule: JMC, SCIF234) */
387 JMCTCK_MARK, JMCTMS_MARK, JMCTDO_MARK, JMCTDI_MARK,
388 JMCRST_MARK, SCK4_MARK, SCK3_MARK,
389
390 /* PTQ (mobule: LPC) */
391 LAD3_MARK, LAD2_MARK, LAD1_MARK, LAD0_MARK,
392 LFRAME_MARK, LRESET_MARK, LCLK_MARK,
393
394 /* PTR (mobule: GRA, IIC) */
395 DDC3_MARK, DDC2_MARK,
396 SDA8_MARK, SCL8_MARK, SDA2_MARK, SCL2_MARK,
397 SDA1_MARK, SCL1_MARK, SDA0_MARK, SCL0_MARK,
398
399 /* PTS (mobule: GRA, IIC) */
400 DDC1_MARK, DDC0_MARK,
401 SDA9_MARK, SCL9_MARK, SDA5_MARK, SCL5_MARK,
402 SDA4_MARK, SCL4_MARK, SDA3_MARK, SCL3_MARK,
403
404 /* PTT (mobule: SYSTEM, PWMX) */
405 AUDSYNC_MARK, AUDCK_MARK,
406 AUDATA3_MARK, AUDATA2_MARK,
407 AUDATA1_MARK, AUDATA0_MARK,
408 PWX7_MARK, PWX6_MARK, PWX5_MARK, PWX4_MARK,
409
410 /* PTU (mobule: LBSC, DMAC) */
411 CS6_MARK, CS5_MARK, CS4_MARK, CS0_MARK,
412 RD_MARK, WE0_MARK, A25_MARK, A24_MARK,
413 DREQ0_MARK, DACK0_MARK,
414
415 /* PTV (mobule: LBSC, DMAC) */
416 A23_MARK, A22_MARK, A21_MARK, A20_MARK,
417 A19_MARK, A18_MARK, A17_MARK, A16_MARK,
418 TEND0_MARK, DREQ1_MARK, DACK1_MARK, TEND1_MARK,
419
420 /* PTW (mobule: LBSC) */
421 A15_MARK, A14_MARK, A13_MARK, A12_MARK,
422 A11_MARK, A10_MARK, A9_MARK, A8_MARK,
423
424 /* PTX (mobule: LBSC) */
425 A7_MARK, A6_MARK, A5_MARK, A4_MARK,
426 A3_MARK, A2_MARK, A1_MARK, A0_MARK,
427
428 /* PTY (mobule: LBSC) */
429 D7_MARK, D6_MARK, D5_MARK, D4_MARK,
430 D3_MARK, D2_MARK, D1_MARK, D0_MARK,
431 PINMUX_MARK_END,
432};
433
434static pinmux_enum_t pinmux_data[] = {
435 /* PTA GPIO */
436 PINMUX_DATA(PTA7_DATA, PTA7_IN, PTA7_OUT),
437 PINMUX_DATA(PTA6_DATA, PTA6_IN, PTA6_OUT),
438 PINMUX_DATA(PTA5_DATA, PTA5_IN, PTA5_OUT),
439 PINMUX_DATA(PTA4_DATA, PTA4_IN, PTA4_OUT),
440 PINMUX_DATA(PTA3_DATA, PTA3_IN, PTA3_OUT),
441 PINMUX_DATA(PTA2_DATA, PTA2_IN, PTA2_OUT),
442 PINMUX_DATA(PTA1_DATA, PTA1_IN, PTA1_OUT),
443 PINMUX_DATA(PTA0_DATA, PTA0_IN, PTA0_OUT),
444
445 /* PTB GPIO */
446 PINMUX_DATA(PTB7_DATA, PTB7_IN, PTB7_OUT),
447 PINMUX_DATA(PTB6_DATA, PTB6_IN, PTB6_OUT),
448 PINMUX_DATA(PTB5_DATA, PTB5_IN, PTB5_OUT),
449 PINMUX_DATA(PTB4_DATA, PTB4_IN, PTB4_OUT),
450 PINMUX_DATA(PTB3_DATA, PTB3_IN, PTB3_OUT),
451 PINMUX_DATA(PTB2_DATA, PTB2_IN, PTB2_OUT),
452 PINMUX_DATA(PTB1_DATA, PTB1_IN, PTB1_OUT),
453 PINMUX_DATA(PTB0_DATA, PTB0_IN, PTB0_OUT),
454
455 /* PTC GPIO */
456 PINMUX_DATA(PTC7_DATA, PTC7_IN, PTC7_OUT),
457 PINMUX_DATA(PTC6_DATA, PTC6_IN, PTC6_OUT),
458 PINMUX_DATA(PTC5_DATA, PTC5_IN, PTC5_OUT),
459 PINMUX_DATA(PTC4_DATA, PTC4_IN, PTC4_OUT),
460 PINMUX_DATA(PTC3_DATA, PTC3_IN, PTC3_OUT),
461 PINMUX_DATA(PTC2_DATA, PTC2_IN, PTC2_OUT),
462 PINMUX_DATA(PTC1_DATA, PTC1_IN, PTC1_OUT),
463 PINMUX_DATA(PTC0_DATA, PTC0_IN, PTC0_OUT),
464
465 /* PTD GPIO */
466 PINMUX_DATA(PTD7_DATA, PTD7_IN, PTD7_OUT),
467 PINMUX_DATA(PTD6_DATA, PTD6_IN, PTD6_OUT),
468 PINMUX_DATA(PTD5_DATA, PTD5_IN, PTD5_OUT),
469 PINMUX_DATA(PTD4_DATA, PTD4_IN, PTD4_OUT),
470 PINMUX_DATA(PTD3_DATA, PTD3_IN, PTD3_OUT),
471 PINMUX_DATA(PTD2_DATA, PTD2_IN, PTD2_OUT),
472 PINMUX_DATA(PTD1_DATA, PTD1_IN, PTD1_OUT),
473 PINMUX_DATA(PTD0_DATA, PTD0_IN, PTD0_OUT),
474
475 /* PTE GPIO */
476 PINMUX_DATA(PTE5_DATA, PTE5_IN, PTE5_OUT),
477 PINMUX_DATA(PTE4_DATA, PTE4_IN, PTE4_OUT),
478 PINMUX_DATA(PTE3_DATA, PTE3_IN, PTE3_OUT),
479 PINMUX_DATA(PTE2_DATA, PTE2_IN, PTE2_OUT),
480 PINMUX_DATA(PTE1_DATA, PTE1_IN, PTE1_OUT),
481 PINMUX_DATA(PTE0_DATA, PTE0_IN, PTE0_OUT),
482
483 /* PTF GPIO */
484 PINMUX_DATA(PTF7_DATA, PTF7_IN, PTF7_OUT),
485 PINMUX_DATA(PTF6_DATA, PTF6_IN, PTF6_OUT),
486 PINMUX_DATA(PTF5_DATA, PTF5_IN, PTF5_OUT),
487 PINMUX_DATA(PTF4_DATA, PTF4_IN, PTF4_OUT),
488 PINMUX_DATA(PTF3_DATA, PTF3_IN, PTF3_OUT),
489 PINMUX_DATA(PTF2_DATA, PTF2_IN, PTF2_OUT),
490 PINMUX_DATA(PTF1_DATA, PTF1_IN, PTF1_OUT),
491 PINMUX_DATA(PTF0_DATA, PTF0_IN, PTF0_OUT),
492
493 /* PTG GPIO */
494 PINMUX_DATA(PTG7_DATA, PTG7_IN, PTG7_OUT),
495 PINMUX_DATA(PTG6_DATA, PTG6_IN, PTG6_OUT),
496 PINMUX_DATA(PTG5_DATA, PTG5_IN, PTG5_OUT),
497 PINMUX_DATA(PTG4_DATA, PTG4_IN, PTG4_OUT),
498 PINMUX_DATA(PTG3_DATA, PTG3_IN, PTG3_OUT),
499 PINMUX_DATA(PTG2_DATA, PTG2_IN, PTG2_OUT),
500 PINMUX_DATA(PTG1_DATA, PTG1_IN, PTG1_OUT),
501 PINMUX_DATA(PTG0_DATA, PTG0_IN, PTG0_OUT),
502
503 /* PTH GPIO */
504 PINMUX_DATA(PTH7_DATA, PTH7_IN, PTH7_OUT),
505 PINMUX_DATA(PTH6_DATA, PTH6_IN, PTH6_OUT),
506 PINMUX_DATA(PTH5_DATA, PTH5_IN, PTH5_OUT),
507 PINMUX_DATA(PTH4_DATA, PTH4_IN, PTH4_OUT),
508 PINMUX_DATA(PTH3_DATA, PTH3_IN, PTH3_OUT),
509 PINMUX_DATA(PTH2_DATA, PTH2_IN, PTH2_OUT),
510 PINMUX_DATA(PTH1_DATA, PTH1_IN, PTH1_OUT),
511 PINMUX_DATA(PTH0_DATA, PTH0_IN, PTH0_OUT),
512
513 /* PTI GPIO */
514 PINMUX_DATA(PTI7_DATA, PTI7_IN, PTI7_OUT),
515 PINMUX_DATA(PTI6_DATA, PTI6_IN, PTI6_OUT),
516 PINMUX_DATA(PTI5_DATA, PTI5_IN, PTI5_OUT),
517 PINMUX_DATA(PTI4_DATA, PTI4_IN, PTI4_OUT),
518 PINMUX_DATA(PTI3_DATA, PTI3_IN, PTI3_OUT),
519 PINMUX_DATA(PTI2_DATA, PTI2_IN, PTI2_OUT),
520 PINMUX_DATA(PTI1_DATA, PTI1_IN, PTI1_OUT),
521 PINMUX_DATA(PTI0_DATA, PTI0_IN, PTI0_OUT),
522
523 /* PTJ GPIO */
524 PINMUX_DATA(PTJ7_DATA, PTJ7_IN, PTJ7_OUT),
525 PINMUX_DATA(PTJ6_DATA, PTJ6_IN, PTJ6_OUT),
526 PINMUX_DATA(PTJ5_DATA, PTJ5_IN, PTJ5_OUT),
527 PINMUX_DATA(PTJ4_DATA, PTJ4_IN, PTJ4_OUT),
528 PINMUX_DATA(PTJ3_DATA, PTJ3_IN, PTJ3_OUT),
529 PINMUX_DATA(PTJ2_DATA, PTJ2_IN, PTJ2_OUT),
530 PINMUX_DATA(PTJ1_DATA, PTJ1_IN, PTJ1_OUT),
531 PINMUX_DATA(PTJ0_DATA, PTJ0_IN, PTJ0_OUT),
532
533 /* PTK GPIO */
534 PINMUX_DATA(PTK7_DATA, PTK7_IN, PTK7_OUT),
535 PINMUX_DATA(PTK6_DATA, PTK6_IN, PTK6_OUT),
536 PINMUX_DATA(PTK5_DATA, PTK5_IN, PTK5_OUT),
537 PINMUX_DATA(PTK4_DATA, PTK4_IN, PTK4_OUT),
538 PINMUX_DATA(PTK3_DATA, PTK3_IN, PTK3_OUT),
539 PINMUX_DATA(PTK2_DATA, PTK2_IN, PTK2_OUT),
540 PINMUX_DATA(PTK1_DATA, PTK1_IN, PTK1_OUT),
541 PINMUX_DATA(PTK0_DATA, PTK0_IN, PTK0_OUT),
542
543 /* PTL GPIO */
544 PINMUX_DATA(PTL7_DATA, PTL7_IN, PTL7_OUT),
545 PINMUX_DATA(PTL6_DATA, PTL6_IN, PTL6_OUT),
546 PINMUX_DATA(PTL5_DATA, PTL5_IN, PTL5_OUT),
547 PINMUX_DATA(PTL4_DATA, PTL4_IN, PTL4_OUT),
548 PINMUX_DATA(PTL3_DATA, PTL3_IN, PTL3_OUT),
549 PINMUX_DATA(PTL2_DATA, PTL2_IN, PTL2_OUT),
550 PINMUX_DATA(PTL1_DATA, PTL1_IN, PTL1_OUT),
551 PINMUX_DATA(PTL0_DATA, PTL0_IN, PTL0_OUT),
552
553 /* PTM GPIO */
554 PINMUX_DATA(PTM6_DATA, PTM6_IN, PTM6_OUT),
555 PINMUX_DATA(PTM5_DATA, PTM5_IN, PTM5_OUT),
556 PINMUX_DATA(PTM4_DATA, PTM4_IN, PTM4_OUT),
557 PINMUX_DATA(PTM3_DATA, PTM3_IN, PTM3_OUT),
558 PINMUX_DATA(PTM2_DATA, PTM2_IN, PTM2_OUT),
559 PINMUX_DATA(PTM1_DATA, PTM1_IN, PTM1_OUT),
560 PINMUX_DATA(PTM0_DATA, PTM0_IN, PTM0_OUT),
561
562 /* PTN GPIO */
563 PINMUX_DATA(PTN7_DATA, PTN7_IN, PTN7_OUT),
564 PINMUX_DATA(PTN6_DATA, PTN6_IN, PTN6_OUT),
565 PINMUX_DATA(PTN5_DATA, PTN5_IN, PTN5_OUT),
566 PINMUX_DATA(PTN4_DATA, PTN4_IN, PTN4_OUT),
567 PINMUX_DATA(PTN3_DATA, PTN3_IN, PTN3_OUT),
568 PINMUX_DATA(PTN2_DATA, PTN2_IN, PTN2_OUT),
569 PINMUX_DATA(PTN1_DATA, PTN1_IN, PTN1_OUT),
570 PINMUX_DATA(PTN0_DATA, PTN0_IN, PTN0_OUT),
571
572 /* PTO GPIO */
573 PINMUX_DATA(PTO7_DATA, PTO7_IN, PTO7_OUT),
574 PINMUX_DATA(PTO6_DATA, PTO6_IN, PTO6_OUT),
575 PINMUX_DATA(PTO5_DATA, PTO5_IN, PTO5_OUT),
576 PINMUX_DATA(PTO4_DATA, PTO4_IN, PTO4_OUT),
577 PINMUX_DATA(PTO3_DATA, PTO3_IN, PTO3_OUT),
578 PINMUX_DATA(PTO2_DATA, PTO2_IN, PTO2_OUT),
579 PINMUX_DATA(PTO1_DATA, PTO1_IN, PTO1_OUT),
580 PINMUX_DATA(PTO0_DATA, PTO0_IN, PTO0_OUT),
581
582 /* PTQ GPIO */
583 PINMUX_DATA(PTQ6_DATA, PTQ6_IN, PTQ6_OUT),
584 PINMUX_DATA(PTQ5_DATA, PTQ5_IN, PTQ5_OUT),
585 PINMUX_DATA(PTQ4_DATA, PTQ4_IN, PTQ4_OUT),
586 PINMUX_DATA(PTQ3_DATA, PTQ3_IN, PTQ3_OUT),
587 PINMUX_DATA(PTQ2_DATA, PTQ2_IN, PTQ2_OUT),
588 PINMUX_DATA(PTQ1_DATA, PTQ1_IN, PTQ1_OUT),
589 PINMUX_DATA(PTQ0_DATA, PTQ0_IN, PTQ0_OUT),
590
591 /* PTR GPIO */
592 PINMUX_DATA(PTR7_DATA, PTR7_IN, PTR7_OUT),
593 PINMUX_DATA(PTR6_DATA, PTR6_IN, PTR6_OUT),
594 PINMUX_DATA(PTR5_DATA, PTR5_IN, PTR5_OUT),
595 PINMUX_DATA(PTR4_DATA, PTR4_IN, PTR4_OUT),
596 PINMUX_DATA(PTR3_DATA, PTR3_IN, PTR3_OUT),
597 PINMUX_DATA(PTR2_DATA, PTR2_IN, PTR2_OUT),
598 PINMUX_DATA(PTR1_DATA, PTR1_IN, PTR1_OUT),
599 PINMUX_DATA(PTR0_DATA, PTR0_IN, PTR0_OUT),
600
601 /* PTS GPIO */
602 PINMUX_DATA(PTS7_DATA, PTS7_IN, PTS7_OUT),
603 PINMUX_DATA(PTS6_DATA, PTS6_IN, PTS6_OUT),
604 PINMUX_DATA(PTS5_DATA, PTS5_IN, PTS5_OUT),
605 PINMUX_DATA(PTS4_DATA, PTS4_IN, PTS4_OUT),
606 PINMUX_DATA(PTS3_DATA, PTS3_IN, PTS3_OUT),
607 PINMUX_DATA(PTS2_DATA, PTS2_IN, PTS2_OUT),
608 PINMUX_DATA(PTS1_DATA, PTS1_IN, PTS1_OUT),
609 PINMUX_DATA(PTS0_DATA, PTS0_IN, PTS0_OUT),
610
611 /* PTT GPIO */
612 PINMUX_DATA(PTT5_DATA, PTT5_IN, PTT5_OUT),
613 PINMUX_DATA(PTT4_DATA, PTT4_IN, PTT4_OUT),
614 PINMUX_DATA(PTT3_DATA, PTT3_IN, PTT3_OUT),
615 PINMUX_DATA(PTT2_DATA, PTT2_IN, PTT2_OUT),
616 PINMUX_DATA(PTT1_DATA, PTT1_IN, PTT1_OUT),
617 PINMUX_DATA(PTT0_DATA, PTT0_IN, PTT0_OUT),
618
619 /* PTU GPIO */
620 PINMUX_DATA(PTU7_DATA, PTU7_IN, PTU7_OUT),
621 PINMUX_DATA(PTU6_DATA, PTU6_IN, PTU6_OUT),
622 PINMUX_DATA(PTU5_DATA, PTU5_IN, PTU5_OUT),
623 PINMUX_DATA(PTU4_DATA, PTU4_IN, PTU4_OUT),
624 PINMUX_DATA(PTU3_DATA, PTU3_IN, PTU3_OUT),
625 PINMUX_DATA(PTU2_DATA, PTU2_IN, PTU2_OUT),
626 PINMUX_DATA(PTU1_DATA, PTU1_IN, PTU1_OUT),
627 PINMUX_DATA(PTU0_DATA, PTU0_IN, PTU0_OUT),
628
629 /* PTV GPIO */
630 PINMUX_DATA(PTV7_DATA, PTV7_IN, PTV7_OUT),
631 PINMUX_DATA(PTV6_DATA, PTV6_IN, PTV6_OUT),
632 PINMUX_DATA(PTV5_DATA, PTV5_IN, PTV5_OUT),
633 PINMUX_DATA(PTV4_DATA, PTV4_IN, PTV4_OUT),
634 PINMUX_DATA(PTV3_DATA, PTV3_IN, PTV3_OUT),
635 PINMUX_DATA(PTV2_DATA, PTV2_IN, PTV2_OUT),
636 PINMUX_DATA(PTV1_DATA, PTV1_IN, PTV1_OUT),
637 PINMUX_DATA(PTV0_DATA, PTV0_IN, PTV0_OUT),
638
639 /* PTW GPIO */
640 PINMUX_DATA(PTW7_DATA, PTW7_IN, PTW7_OUT),
641 PINMUX_DATA(PTW6_DATA, PTW6_IN, PTW6_OUT),
642 PINMUX_DATA(PTW5_DATA, PTW5_IN, PTW5_OUT),
643 PINMUX_DATA(PTW4_DATA, PTW4_IN, PTW4_OUT),
644 PINMUX_DATA(PTW3_DATA, PTW3_IN, PTW3_OUT),
645 PINMUX_DATA(PTW2_DATA, PTW2_IN, PTW2_OUT),
646 PINMUX_DATA(PTW1_DATA, PTW1_IN, PTW1_OUT),
647 PINMUX_DATA(PTW0_DATA, PTW0_IN, PTW0_OUT),
648
649 /* PTX GPIO */
650 PINMUX_DATA(PTX7_DATA, PTX7_IN, PTX7_OUT),
651 PINMUX_DATA(PTX6_DATA, PTX6_IN, PTX6_OUT),
652 PINMUX_DATA(PTX5_DATA, PTX5_IN, PTX5_OUT),
653 PINMUX_DATA(PTX4_DATA, PTX4_IN, PTX4_OUT),
654 PINMUX_DATA(PTX3_DATA, PTX3_IN, PTX3_OUT),
655 PINMUX_DATA(PTX2_DATA, PTX2_IN, PTX2_OUT),
656 PINMUX_DATA(PTX1_DATA, PTX1_IN, PTX1_OUT),
657 PINMUX_DATA(PTX0_DATA, PTX0_IN, PTX0_OUT),
658
659 /* PTY GPIO */
660 PINMUX_DATA(PTY7_DATA, PTY7_IN, PTY7_OUT),
661 PINMUX_DATA(PTY6_DATA, PTY6_IN, PTY6_OUT),
662 PINMUX_DATA(PTY5_DATA, PTY5_IN, PTY5_OUT),
663 PINMUX_DATA(PTY4_DATA, PTY4_IN, PTY4_OUT),
664 PINMUX_DATA(PTY3_DATA, PTY3_IN, PTY3_OUT),
665 PINMUX_DATA(PTY2_DATA, PTY2_IN, PTY2_OUT),
666 PINMUX_DATA(PTY1_DATA, PTY1_IN, PTY1_OUT),
667 PINMUX_DATA(PTY0_DATA, PTY0_IN, PTY0_OUT),
668
669 /* PTZ GPIO */
670 PINMUX_DATA(PTZ7_DATA, PTZ7_IN, PTZ7_OUT),
671 PINMUX_DATA(PTZ6_DATA, PTZ6_IN, PTZ6_OUT),
672 PINMUX_DATA(PTZ5_DATA, PTZ5_IN, PTZ5_OUT),
673 PINMUX_DATA(PTZ4_DATA, PTZ4_IN, PTZ4_OUT),
674 PINMUX_DATA(PTZ3_DATA, PTZ3_IN, PTZ3_OUT),
675 PINMUX_DATA(PTZ2_DATA, PTZ2_IN, PTZ2_OUT),
676 PINMUX_DATA(PTZ1_DATA, PTZ1_IN, PTZ1_OUT),
677 PINMUX_DATA(PTZ0_DATA, PTZ0_IN, PTZ0_OUT),
678
679 /* PTA FN */
680 PINMUX_DATA(BS_MARK, PS0_15_FN1, PTA7_FN),
681 PINMUX_DATA(LGPIO7_MARK, PS0_15_FN3, PTA7_FN),
682 PINMUX_DATA(RDWR_MARK, PS0_14_FN1, PTA6_FN),
683 PINMUX_DATA(LGPIO6_MARK, PS0_14_FN3, PTA6_FN),
684 PINMUX_DATA(WE1_MARK, PS0_13_FN1, PTA5_FN),
685 PINMUX_DATA(LGPIO5_MARK, PS0_13_FN3, PTA5_FN),
686 PINMUX_DATA(RDY_MARK, PS0_12_FN1, PTA4_FN),
687 PINMUX_DATA(LGPIO4_MARK, PS0_12_FN3, PTA4_FN),
688 PINMUX_DATA(LGPIO3_MARK, PTA3_FN),
689 PINMUX_DATA(LGPIO2_MARK, PTA2_FN),
690 PINMUX_DATA(LGPIO1_MARK, PTA1_FN),
691 PINMUX_DATA(LGPIO0_MARK, PTA0_FN),
692
693 /* PTB FN */
694 PINMUX_DATA(D15_MARK, PS0_7_FN1, PTB7_FN),
695 PINMUX_DATA(ET0_MDC_MARK, PS0_7_FN2, PTB7_FN),
696 PINMUX_DATA(D14_MARK, PS0_6_FN1, PTB6_FN),
697 PINMUX_DATA(ET0_MDIO_MARK, PS0_6_FN2, PTB6_FN),
698 PINMUX_DATA(D13_MARK, PS0_5_FN1, PTB5_FN),
699 PINMUX_DATA(ET1_MDC_MARK, PS0_5_FN2, PTB5_FN),
700 PINMUX_DATA(D12_MARK, PS0_4_FN1, PTB4_FN),
701 PINMUX_DATA(ET1_MDIO_MARK, PS0_4_FN2, PTB4_FN),
702 PINMUX_DATA(D11_MARK, PS0_3_FN1, PTB3_FN),
703 PINMUX_DATA(SIM_D_MARK, PS0_3_FN2, PTB3_FN),
704 PINMUX_DATA(D10_MARK, PS0_2_FN1, PTB2_FN),
705 PINMUX_DATA(SIM_CLK_MARK, PS0_2_FN2, PTB2_FN),
706 PINMUX_DATA(D9_MARK, PS0_1_FN1, PTB1_FN),
707 PINMUX_DATA(SIM_RST_MARK, PS0_1_FN2, PTB1_FN),
708 PINMUX_DATA(D8_MARK, PTB0_FN),
709
710 /* PTC FN */
711 PINMUX_DATA(SD_WP_MARK, PTC7_FN),
712 PINMUX_DATA(SD_CD_MARK, PTC6_FN),
713 PINMUX_DATA(SD_CLK_MARK, PTC5_FN),
714 PINMUX_DATA(SD_CMD_MARK, PTC4_FN),
715 PINMUX_DATA(SD_D3_MARK, PTC3_FN),
716 PINMUX_DATA(SD_D2_MARK, PTC2_FN),
717 PINMUX_DATA(SD_D1_MARK, PTC1_FN),
718 PINMUX_DATA(SD_D0_MARK, PTC0_FN),
719
720 /* PTD FN */
721 PINMUX_DATA(IRQ7_MARK, PS1_7_FN1, PTD7_FN),
722 PINMUX_DATA(ADTRG1_MARK, PS1_7_FN3, PTD7_FN),
723 PINMUX_DATA(IRQ6_MARK, PS1_6_FN1, PTD6_FN),
724 PINMUX_DATA(ADTRG0_MARK, PS1_6_FN3, PTD6_FN),
725 PINMUX_DATA(IRQ5_MARK, PTD5_FN),
726 PINMUX_DATA(IRQ4_MARK, PTD4_FN),
727 PINMUX_DATA(IRQ3_MARK, PTD3_FN),
728 PINMUX_DATA(IRQ2_MARK, PTD2_FN),
729 PINMUX_DATA(IRQ1_MARK, PTD1_FN),
730 PINMUX_DATA(IRQ0_MARK, PTD0_FN),
731
732 /* PTE FN */
733 PINMUX_DATA(ET0_CRS_DV_MARK, PTE7_FN),
734 PINMUX_DATA(ET0_TXD1_MARK, PTE6_FN),
735 PINMUX_DATA(ET0_TXD0_MARK, PTE5_FN),
736 PINMUX_DATA(ET0_TX_EN_MARK, PTE4_FN),
737 PINMUX_DATA(ET0_REF_CLK_MARK, PTE3_FN),
738 PINMUX_DATA(ET0_RXD1_MARK, PTE2_FN),
739 PINMUX_DATA(ET0_RXD0_MARK, PTE1_FN),
740 PINMUX_DATA(ET0_RX_ER_MARK, PTE0_FN),
741
742 /* PTF FN */
743 PINMUX_DATA(ET1_CRS_DV_MARK, PTF7_FN),
744 PINMUX_DATA(ET1_TXD1_MARK, PTF6_FN),
745 PINMUX_DATA(ET1_TXD0_MARK, PTF5_FN),
746 PINMUX_DATA(ET1_TX_EN_MARK, PTF4_FN),
747 PINMUX_DATA(ET1_REF_CLK_MARK, PTF3_FN),
748 PINMUX_DATA(ET1_RXD1_MARK, PTF2_FN),
749 PINMUX_DATA(ET1_RXD0_MARK, PTF1_FN),
750 PINMUX_DATA(ET1_RX_ER_MARK, PTF0_FN),
751
752 /* PTG FN */
753 PINMUX_DATA(PWX0_MARK, PTG7_FN),
754 PINMUX_DATA(PWX1_MARK, PTG6_FN),
755 PINMUX_DATA(STATUS0_MARK, PS2_13_FN1, PTG5_FN),
756 PINMUX_DATA(PWX2_MARK, PS2_13_FN3, PTG5_FN),
757 PINMUX_DATA(STATUS1_MARK, PS2_12_FN1, PTG4_FN),
758 PINMUX_DATA(PWX3_MARK, PS2_12_FN3, PTG4_FN),
759 PINMUX_DATA(SERIRQ_MARK, PTG3_FN),
760 PINMUX_DATA(CLKRUN_MARK, PTG2_FN),
761 PINMUX_DATA(LPCPD_MARK, PTG1_FN),
762 PINMUX_DATA(LDRQ_MARK, PTG0_FN),
763
764 /* PTH FN */
765 PINMUX_DATA(SP1_MOSI_MARK, PTH7_FN),
766 PINMUX_DATA(SP1_MISO_MARK, PTH6_FN),
767 PINMUX_DATA(SP1_SCK_MARK, PTH5_FN),
768 PINMUX_DATA(SP1_SCK_FB_MARK, PTH4_FN),
769 PINMUX_DATA(SP1_SS0_MARK, PTH3_FN),
770 PINMUX_DATA(TCLK_MARK, PTH2_FN),
771 PINMUX_DATA(RXD4_MARK, PS2_1_FN1, PTH1_FN),
772 PINMUX_DATA(SP1_SS1_MARK, PS2_1_FN2, PTH1_FN),
773 PINMUX_DATA(TXD4_MARK, PS2_0_FN1, PTH0_FN),
774 PINMUX_DATA(SP0_SS1_MARK, PS2_0_FN2, PTH0_FN),
775
776 /* PTI FN */
777 PINMUX_DATA(IRQ15_MARK, PTI7_FN),
778 PINMUX_DATA(IRQ14_MARK, PTI6_FN),
779 PINMUX_DATA(IRQ13_MARK, PTI5_FN),
780 PINMUX_DATA(IRQ12_MARK, PTI4_FN),
781 PINMUX_DATA(IRQ11_MARK, PTI3_FN),
782 PINMUX_DATA(IRQ10_MARK, PTI2_FN),
783 PINMUX_DATA(IRQ9_MARK, PTI1_FN),
784 PINMUX_DATA(IRQ8_MARK, PTI0_FN),
785
786 /* PTJ FN */
787 PINMUX_DATA(RXD3_MARK, PTJ7_FN),
788 PINMUX_DATA(TXD3_MARK, PTJ6_FN),
789 PINMUX_DATA(RXD2_MARK, PTJ5_FN),
790 PINMUX_DATA(TXD2_MARK, PTJ4_FN),
791 PINMUX_DATA(COM1_TXD_MARK, PTJ3_FN),
792 PINMUX_DATA(COM1_RXD_MARK, PTJ2_FN),
793 PINMUX_DATA(COM1_RTS_MARK, PTJ1_FN),
794 PINMUX_DATA(COM1_CTS_MARK, PTJ0_FN),
795
796 /* PTK FN */
797 PINMUX_DATA(COM2_TXD_MARK, PTK7_FN),
798 PINMUX_DATA(COM2_RXD_MARK, PTK6_FN),
799 PINMUX_DATA(COM2_RTS_MARK, PTK5_FN),
800 PINMUX_DATA(COM2_CTS_MARK, PTK4_FN),
801 PINMUX_DATA(COM2_DTR_MARK, PTK3_FN),
802 PINMUX_DATA(COM2_DSR_MARK, PTK2_FN),
803 PINMUX_DATA(COM2_DCD_MARK, PTK1_FN),
804 PINMUX_DATA(COM2_RI_MARK, PTK0_FN),
805
806 /* PTL FN */
807 PINMUX_DATA(RAC_TXD_MARK, PTL7_FN),
808 PINMUX_DATA(RAC_RXD_MARK, PTL6_FN),
809 PINMUX_DATA(RAC_RTS_MARK, PTL5_FN),
810 PINMUX_DATA(RAC_CTS_MARK, PTL4_FN),
811 PINMUX_DATA(RAC_DTR_MARK, PTL3_FN),
812 PINMUX_DATA(RAC_DSR_MARK, PTL2_FN),
813 PINMUX_DATA(RAC_DCD_MARK, PTL1_FN),
814 PINMUX_DATA(RAC_RI_MARK, PTL0_FN),
815
816 /* PTM FN */
817 PINMUX_DATA(WP_MARK, PTM6_FN),
818 PINMUX_DATA(FMS0_MARK, PTM5_FN),
819 PINMUX_DATA(FMS1_MARK, PTM4_FN),
820 PINMUX_DATA(SDA6_MARK, PTM3_FN),
821 PINMUX_DATA(SCL6_MARK, PTM2_FN),
822 PINMUX_DATA(SDA7_MARK, PTM1_FN),
823 PINMUX_DATA(SCL7_MARK, PTM0_FN),
824
825 /* PTN FN */
826 PINMUX_DATA(SCK2_MARK, PS4_15_FN1, PTN7_FN),
827 PINMUX_DATA(EVENT7_MARK, PS4_15_FN2, PTN7_FN),
828 PINMUX_DATA(RTS4_MARK, PS4_14_FN1, PTN6_FN),
829 PINMUX_DATA(EVENT6_MARK, PS4_14_FN2, PTN6_FN),
830 PINMUX_DATA(RTS3_MARK, PS4_13_FN1, PTN5_FN),
831 PINMUX_DATA(EVENT5_MARK, PS4_13_FN2, PTN5_FN),
832 PINMUX_DATA(RTS2_MARK, PS4_12_FN1, PTN4_FN),
833 PINMUX_DATA(EVENT4_MARK, PS4_12_FN2, PTN4_FN),
834 PINMUX_DATA(CTS4_MARK, PS4_11_FN1, PTN3_FN),
835 PINMUX_DATA(EVENT3_MARK, PS4_11_FN2, PTN3_FN),
836 PINMUX_DATA(CTS3_MARK, PS4_10_FN1, PTN2_FN),
837 PINMUX_DATA(EVENT2_MARK, PS4_10_FN2, PTN2_FN),
838 PINMUX_DATA(CTS2_MARK, PS4_9_FN1, PTN1_FN),
839 PINMUX_DATA(EVENT1_MARK, PS4_9_FN2, PTN1_FN),
840 PINMUX_DATA(EVENT0_MARK, PTN0_FN),
841
842 /* PTO FN */
843 PINMUX_DATA(SGPIO0_CLK_MARK, PTO7_FN),
844 PINMUX_DATA(SGPIO0_LOAD_MARK, PTO6_FN),
845 PINMUX_DATA(SGPIO0_DI_MARK, PTO5_FN),
846 PINMUX_DATA(SGPIO0_DO_MARK, PTO4_FN),
847 PINMUX_DATA(SGPIO1_CLK_MARK, PTO3_FN),
848 PINMUX_DATA(SGPIO1_LOAD_MARK, PTO2_FN),
849 PINMUX_DATA(SGPIO1_DI_MARK, PTO1_FN),
850 PINMUX_DATA(SGPIO1_DO_MARK, PTO0_FN),
851
852 /* PTP FN */
853 PINMUX_DATA(JMCTCK_MARK, PTP6_FN),
854 PINMUX_DATA(JMCTMS_MARK, PTP5_FN),
855 PINMUX_DATA(JMCTDO_MARK, PTP4_FN),
856 PINMUX_DATA(JMCTDI_MARK, PTP3_FN),
857 PINMUX_DATA(JMCRST_MARK, PTP2_FN),
858 PINMUX_DATA(SCK4_MARK, PTP1_FN),
859 PINMUX_DATA(SCK3_MARK, PTP0_FN),
860
861 /* PTQ FN */
862 PINMUX_DATA(LAD3_MARK, PTQ6_FN),
863 PINMUX_DATA(LAD2_MARK, PTQ5_FN),
864 PINMUX_DATA(LAD1_MARK, PTQ4_FN),
865 PINMUX_DATA(LAD0_MARK, PTQ3_FN),
866 PINMUX_DATA(LFRAME_MARK, PTQ2_FN),
867 PINMUX_DATA(SCK4_MARK, PTQ1_FN),
868 PINMUX_DATA(SCK3_MARK, PTQ0_FN),
869
870 /* PTR FN */
871 PINMUX_DATA(SDA8_MARK, PTR7_FN), /* DDC3? */
872 PINMUX_DATA(SCL8_MARK, PTR6_FN), /* DDC2? */
873 PINMUX_DATA(SDA2_MARK, PTR5_FN),
874 PINMUX_DATA(SCL2_MARK, PTR4_FN),
875 PINMUX_DATA(SDA1_MARK, PTR3_FN),
876 PINMUX_DATA(SCL1_MARK, PTR2_FN),
877 PINMUX_DATA(SDA0_MARK, PTR1_FN),
878 PINMUX_DATA(SCL0_MARK, PTR0_FN),
879
880 /* PTS FN */
881 PINMUX_DATA(SDA9_MARK, PTS7_FN), /* DDC1? */
882 PINMUX_DATA(SCL9_MARK, PTS6_FN), /* DDC0? */
883 PINMUX_DATA(SDA5_MARK, PTS5_FN),
884 PINMUX_DATA(SCL5_MARK, PTS4_FN),
885 PINMUX_DATA(SDA4_MARK, PTS3_FN),
886 PINMUX_DATA(SCL4_MARK, PTS2_FN),
887 PINMUX_DATA(SDA3_MARK, PTS1_FN),
888 PINMUX_DATA(SCL3_MARK, PTS0_FN),
889
890 /* PTT FN */
891 PINMUX_DATA(AUDSYNC_MARK, PTS5_FN),
892 PINMUX_DATA(AUDCK_MARK, PTS4_FN),
893 PINMUX_DATA(AUDATA3_MARK, PS4_3_FN1, PTS3_FN),
894 PINMUX_DATA(PWX7_MARK, PS4_3_FN2, PTS3_FN),
895 PINMUX_DATA(AUDATA2_MARK, PS4_2_FN1, PTS2_FN),
896 PINMUX_DATA(PWX6_MARK, PS4_2_FN2, PTS2_FN),
897 PINMUX_DATA(AUDATA1_MARK, PS4_1_FN1, PTS1_FN),
898 PINMUX_DATA(PWX5_MARK, PS4_1_FN2, PTS1_FN),
899 PINMUX_DATA(AUDATA0_MARK, PS4_0_FN1, PTS0_FN),
900 PINMUX_DATA(PWX4_MARK, PS4_0_FN2, PTS0_FN),
901
902 /* PTU FN */
903 PINMUX_DATA(CS6_MARK, PTU7_FN),
904 PINMUX_DATA(CS5_MARK, PTU6_FN),
905 PINMUX_DATA(CS4_MARK, PTU5_FN),
906 PINMUX_DATA(CS0_MARK, PTU4_FN),
907 PINMUX_DATA(RD_MARK, PTU3_FN),
908 PINMUX_DATA(WE0_MARK, PTU2_FN),
909 PINMUX_DATA(A25_MARK, PS5_9_FN1, PTU1_FN),
910 PINMUX_DATA(DREQ0_MARK, PS5_9_FN2, PTU1_FN),
911 PINMUX_DATA(A24_MARK, PS5_8_FN1, PTU0_FN),
912 PINMUX_DATA(DACK0_MARK, PS5_8_FN2, PTU0_FN),
913
914 /* PTV FN */
915 PINMUX_DATA(A23_MARK, PS5_7_FN1, PTV7_FN),
916 PINMUX_DATA(TEND0_MARK, PS5_7_FN2, PTV7_FN),
917 PINMUX_DATA(A22_MARK, PS5_6_FN1, PTV6_FN),
918 PINMUX_DATA(DREQ1_MARK, PS5_6_FN2, PTV6_FN),
919 PINMUX_DATA(A21_MARK, PS5_5_FN1, PTV5_FN),
920 PINMUX_DATA(DACK1_MARK, PS5_5_FN2, PTV5_FN),
921 PINMUX_DATA(A20_MARK, PS5_4_FN1, PTV4_FN),
922 PINMUX_DATA(TEND1_MARK, PS5_4_FN2, PTV4_FN),
923 PINMUX_DATA(A19_MARK, PTV3_FN),
924 PINMUX_DATA(A18_MARK, PTV2_FN),
925 PINMUX_DATA(A17_MARK, PTV1_FN),
926 PINMUX_DATA(A16_MARK, PTV0_FN),
927
928 /* PTW FN */
929 PINMUX_DATA(A15_MARK, PTW7_FN),
930 PINMUX_DATA(A14_MARK, PTW6_FN),
931 PINMUX_DATA(A13_MARK, PTW5_FN),
932 PINMUX_DATA(A12_MARK, PTW4_FN),
933 PINMUX_DATA(A11_MARK, PTW3_FN),
934 PINMUX_DATA(A10_MARK, PTW2_FN),
935 PINMUX_DATA(A9_MARK, PTW1_FN),
936 PINMUX_DATA(A8_MARK, PTW0_FN),
937
938 /* PTX FN */
939 PINMUX_DATA(A7_MARK, PTX7_FN),
940 PINMUX_DATA(A6_MARK, PTX6_FN),
941 PINMUX_DATA(A5_MARK, PTX5_FN),
942 PINMUX_DATA(A4_MARK, PTX4_FN),
943 PINMUX_DATA(A3_MARK, PTX3_FN),
944 PINMUX_DATA(A2_MARK, PTX2_FN),
945 PINMUX_DATA(A1_MARK, PTX1_FN),
946 PINMUX_DATA(A0_MARK, PTX0_FN),
947
948 /* PTY FN */
949 PINMUX_DATA(D7_MARK, PTY7_FN),
950 PINMUX_DATA(D6_MARK, PTY6_FN),
951 PINMUX_DATA(D5_MARK, PTY5_FN),
952 PINMUX_DATA(D4_MARK, PTY4_FN),
953 PINMUX_DATA(D3_MARK, PTY3_FN),
954 PINMUX_DATA(D2_MARK, PTY2_FN),
955 PINMUX_DATA(D1_MARK, PTY1_FN),
956 PINMUX_DATA(D0_MARK, PTY0_FN),
957};
958
959static struct pinmux_gpio pinmux_gpios[] = {
960 /* PTA */
961 PINMUX_GPIO(GPIO_PTA7, PTA7_DATA),
962 PINMUX_GPIO(GPIO_PTA6, PTA6_DATA),
963 PINMUX_GPIO(GPIO_PTA5, PTA5_DATA),
964 PINMUX_GPIO(GPIO_PTA4, PTA4_DATA),
965 PINMUX_GPIO(GPIO_PTA3, PTA3_DATA),
966 PINMUX_GPIO(GPIO_PTA2, PTA2_DATA),
967 PINMUX_GPIO(GPIO_PTA1, PTA1_DATA),
968 PINMUX_GPIO(GPIO_PTA0, PTA0_DATA),
969
970 /* PTB */
971 PINMUX_GPIO(GPIO_PTB7, PTB7_DATA),
972 PINMUX_GPIO(GPIO_PTB6, PTB6_DATA),
973 PINMUX_GPIO(GPIO_PTB5, PTB5_DATA),
974 PINMUX_GPIO(GPIO_PTB4, PTB4_DATA),
975 PINMUX_GPIO(GPIO_PTB3, PTB3_DATA),
976 PINMUX_GPIO(GPIO_PTB2, PTB2_DATA),
977 PINMUX_GPIO(GPIO_PTB1, PTB1_DATA),
978 PINMUX_GPIO(GPIO_PTB0, PTB0_DATA),
979
980 /* PTC */
981 PINMUX_GPIO(GPIO_PTC7, PTC7_DATA),
982 PINMUX_GPIO(GPIO_PTC6, PTC6_DATA),
983 PINMUX_GPIO(GPIO_PTC5, PTC5_DATA),
984 PINMUX_GPIO(GPIO_PTC4, PTC4_DATA),
985 PINMUX_GPIO(GPIO_PTC3, PTC3_DATA),
986 PINMUX_GPIO(GPIO_PTC2, PTC2_DATA),
987 PINMUX_GPIO(GPIO_PTC1, PTC1_DATA),
988 PINMUX_GPIO(GPIO_PTC0, PTC0_DATA),
989
990 /* PTD */
991 PINMUX_GPIO(GPIO_PTD7, PTD7_DATA),
992 PINMUX_GPIO(GPIO_PTD6, PTD6_DATA),
993 PINMUX_GPIO(GPIO_PTD5, PTD5_DATA),
994 PINMUX_GPIO(GPIO_PTD4, PTD4_DATA),
995 PINMUX_GPIO(GPIO_PTD3, PTD3_DATA),
996 PINMUX_GPIO(GPIO_PTD2, PTD2_DATA),
997 PINMUX_GPIO(GPIO_PTD1, PTD1_DATA),
998 PINMUX_GPIO(GPIO_PTD0, PTD0_DATA),
999
1000 /* PTE */
1001 PINMUX_GPIO(GPIO_PTE7, PTE7_DATA),
1002 PINMUX_GPIO(GPIO_PTE6, PTE6_DATA),
1003 PINMUX_GPIO(GPIO_PTE5, PTE5_DATA),
1004 PINMUX_GPIO(GPIO_PTE4, PTE4_DATA),
1005 PINMUX_GPIO(GPIO_PTE3, PTE3_DATA),
1006 PINMUX_GPIO(GPIO_PTE2, PTE2_DATA),
1007 PINMUX_GPIO(GPIO_PTE1, PTE1_DATA),
1008 PINMUX_GPIO(GPIO_PTE0, PTE0_DATA),
1009
1010 /* PTF */
1011 PINMUX_GPIO(GPIO_PTF7, PTF7_DATA),
1012 PINMUX_GPIO(GPIO_PTF6, PTF6_DATA),
1013 PINMUX_GPIO(GPIO_PTF5, PTF5_DATA),
1014 PINMUX_GPIO(GPIO_PTF4, PTF4_DATA),
1015 PINMUX_GPIO(GPIO_PTF3, PTF3_DATA),
1016 PINMUX_GPIO(GPIO_PTF2, PTF2_DATA),
1017 PINMUX_GPIO(GPIO_PTF1, PTF1_DATA),
1018 PINMUX_GPIO(GPIO_PTF0, PTF0_DATA),
1019
1020 /* PTG */
1021 PINMUX_GPIO(GPIO_PTG7, PTG7_DATA),
1022 PINMUX_GPIO(GPIO_PTG6, PTG6_DATA),
1023 PINMUX_GPIO(GPIO_PTG5, PTG5_DATA),
1024 PINMUX_GPIO(GPIO_PTG4, PTG4_DATA),
1025 PINMUX_GPIO(GPIO_PTG3, PTG3_DATA),
1026 PINMUX_GPIO(GPIO_PTG2, PTG2_DATA),
1027 PINMUX_GPIO(GPIO_PTG1, PTG1_DATA),
1028 PINMUX_GPIO(GPIO_PTG0, PTG0_DATA),
1029
1030 /* PTH */
1031 PINMUX_GPIO(GPIO_PTH7, PTH7_DATA),
1032 PINMUX_GPIO(GPIO_PTH6, PTH6_DATA),
1033 PINMUX_GPIO(GPIO_PTH5, PTH5_DATA),
1034 PINMUX_GPIO(GPIO_PTH4, PTH4_DATA),
1035 PINMUX_GPIO(GPIO_PTH3, PTH3_DATA),
1036 PINMUX_GPIO(GPIO_PTH2, PTH2_DATA),
1037 PINMUX_GPIO(GPIO_PTH1, PTH1_DATA),
1038 PINMUX_GPIO(GPIO_PTH0, PTH0_DATA),
1039
1040 /* PTI */
1041 PINMUX_GPIO(GPIO_PTI7, PTI7_DATA),
1042 PINMUX_GPIO(GPIO_PTI6, PTI6_DATA),
1043 PINMUX_GPIO(GPIO_PTI5, PTI5_DATA),
1044 PINMUX_GPIO(GPIO_PTI4, PTI4_DATA),
1045 PINMUX_GPIO(GPIO_PTI3, PTI3_DATA),
1046 PINMUX_GPIO(GPIO_PTI2, PTI2_DATA),
1047 PINMUX_GPIO(GPIO_PTI1, PTI1_DATA),
1048 PINMUX_GPIO(GPIO_PTI0, PTI0_DATA),
1049
1050 /* PTJ */
1051 PINMUX_GPIO(GPIO_PTJ7, PTJ7_DATA),
1052 PINMUX_GPIO(GPIO_PTJ6, PTJ6_DATA),
1053 PINMUX_GPIO(GPIO_PTJ5, PTJ5_DATA),
1054 PINMUX_GPIO(GPIO_PTJ4, PTJ4_DATA),
1055 PINMUX_GPIO(GPIO_PTJ3, PTJ3_DATA),
1056 PINMUX_GPIO(GPIO_PTJ2, PTJ2_DATA),
1057 PINMUX_GPIO(GPIO_PTJ1, PTJ1_DATA),
1058 PINMUX_GPIO(GPIO_PTJ0, PTJ0_DATA),
1059
1060 /* PTK */
1061 PINMUX_GPIO(GPIO_PTK7, PTK7_DATA),
1062 PINMUX_GPIO(GPIO_PTK6, PTK6_DATA),
1063 PINMUX_GPIO(GPIO_PTK5, PTK5_DATA),
1064 PINMUX_GPIO(GPIO_PTK4, PTK4_DATA),
1065 PINMUX_GPIO(GPIO_PTK3, PTK3_DATA),
1066 PINMUX_GPIO(GPIO_PTK2, PTK2_DATA),
1067 PINMUX_GPIO(GPIO_PTK1, PTK1_DATA),
1068 PINMUX_GPIO(GPIO_PTK0, PTK0_DATA),
1069
1070 /* PTL */
1071 PINMUX_GPIO(GPIO_PTL7, PTL7_DATA),
1072 PINMUX_GPIO(GPIO_PTL6, PTL6_DATA),
1073 PINMUX_GPIO(GPIO_PTL5, PTL5_DATA),
1074 PINMUX_GPIO(GPIO_PTL4, PTL4_DATA),
1075 PINMUX_GPIO(GPIO_PTL3, PTL3_DATA),
1076 PINMUX_GPIO(GPIO_PTL2, PTL2_DATA),
1077 PINMUX_GPIO(GPIO_PTL1, PTL1_DATA),
1078 PINMUX_GPIO(GPIO_PTL0, PTL0_DATA),
1079
1080 /* PTM */
1081 PINMUX_GPIO(GPIO_PTM6, PTM6_DATA),
1082 PINMUX_GPIO(GPIO_PTM5, PTM5_DATA),
1083 PINMUX_GPIO(GPIO_PTM4, PTM4_DATA),
1084 PINMUX_GPIO(GPIO_PTM3, PTM3_DATA),
1085 PINMUX_GPIO(GPIO_PTM2, PTM2_DATA),
1086 PINMUX_GPIO(GPIO_PTM1, PTM1_DATA),
1087 PINMUX_GPIO(GPIO_PTM0, PTM0_DATA),
1088
1089 /* PTN */
1090 PINMUX_GPIO(GPIO_PTN7, PTN7_DATA),
1091 PINMUX_GPIO(GPIO_PTN6, PTN6_DATA),
1092 PINMUX_GPIO(GPIO_PTN5, PTN5_DATA),
1093 PINMUX_GPIO(GPIO_PTN4, PTN4_DATA),
1094 PINMUX_GPIO(GPIO_PTN3, PTN3_DATA),
1095 PINMUX_GPIO(GPIO_PTN2, PTN2_DATA),
1096 PINMUX_GPIO(GPIO_PTN1, PTN1_DATA),
1097 PINMUX_GPIO(GPIO_PTN0, PTN0_DATA),
1098
1099 /* PTO */
1100 PINMUX_GPIO(GPIO_PTO7, PTO7_DATA),
1101 PINMUX_GPIO(GPIO_PTO6, PTO6_DATA),
1102 PINMUX_GPIO(GPIO_PTO5, PTO5_DATA),
1103 PINMUX_GPIO(GPIO_PTO4, PTO4_DATA),
1104 PINMUX_GPIO(GPIO_PTO3, PTO3_DATA),
1105 PINMUX_GPIO(GPIO_PTO2, PTO2_DATA),
1106 PINMUX_GPIO(GPIO_PTO1, PTO1_DATA),
1107 PINMUX_GPIO(GPIO_PTO0, PTO0_DATA),
1108
1109 /* PTP */
1110 PINMUX_GPIO(GPIO_PTP6, PTP6_DATA),
1111 PINMUX_GPIO(GPIO_PTP5, PTP5_DATA),
1112 PINMUX_GPIO(GPIO_PTP4, PTP4_DATA),
1113 PINMUX_GPIO(GPIO_PTP3, PTP3_DATA),
1114 PINMUX_GPIO(GPIO_PTP2, PTP2_DATA),
1115 PINMUX_GPIO(GPIO_PTP1, PTP1_DATA),
1116 PINMUX_GPIO(GPIO_PTP0, PTP0_DATA),
1117
1118 /* PTQ */
1119 PINMUX_GPIO(GPIO_PTQ6, PTQ6_DATA),
1120 PINMUX_GPIO(GPIO_PTQ5, PTQ5_DATA),
1121 PINMUX_GPIO(GPIO_PTQ4, PTQ4_DATA),
1122 PINMUX_GPIO(GPIO_PTQ3, PTQ3_DATA),
1123 PINMUX_GPIO(GPIO_PTQ2, PTQ2_DATA),
1124 PINMUX_GPIO(GPIO_PTQ1, PTQ1_DATA),
1125 PINMUX_GPIO(GPIO_PTQ0, PTQ0_DATA),
1126
1127 /* PTR */
1128 PINMUX_GPIO(GPIO_PTR7, PTR7_DATA),
1129 PINMUX_GPIO(GPIO_PTR6, PTR6_DATA),
1130 PINMUX_GPIO(GPIO_PTR5, PTR5_DATA),
1131 PINMUX_GPIO(GPIO_PTR4, PTR4_DATA),
1132 PINMUX_GPIO(GPIO_PTR3, PTR3_DATA),
1133 PINMUX_GPIO(GPIO_PTR2, PTR2_DATA),
1134 PINMUX_GPIO(GPIO_PTR1, PTR1_DATA),
1135 PINMUX_GPIO(GPIO_PTR0, PTR0_DATA),
1136
1137 /* PTS */
1138 PINMUX_GPIO(GPIO_PTS7, PTS7_DATA),
1139 PINMUX_GPIO(GPIO_PTS6, PTS6_DATA),
1140 PINMUX_GPIO(GPIO_PTS5, PTS5_DATA),
1141 PINMUX_GPIO(GPIO_PTS4, PTS4_DATA),
1142 PINMUX_GPIO(GPIO_PTS3, PTS3_DATA),
1143 PINMUX_GPIO(GPIO_PTS2, PTS2_DATA),
1144 PINMUX_GPIO(GPIO_PTS1, PTS1_DATA),
1145 PINMUX_GPIO(GPIO_PTS0, PTS0_DATA),
1146
1147 /* PTT */
1148 PINMUX_GPIO(GPIO_PTT5, PTT5_DATA),
1149 PINMUX_GPIO(GPIO_PTT4, PTT4_DATA),
1150 PINMUX_GPIO(GPIO_PTT3, PTT3_DATA),
1151 PINMUX_GPIO(GPIO_PTT2, PTT2_DATA),
1152 PINMUX_GPIO(GPIO_PTT1, PTT1_DATA),
1153 PINMUX_GPIO(GPIO_PTT0, PTT0_DATA),
1154
1155 /* PTU */
1156 PINMUX_GPIO(GPIO_PTU7, PTU7_DATA),
1157 PINMUX_GPIO(GPIO_PTU6, PTU6_DATA),
1158 PINMUX_GPIO(GPIO_PTU5, PTU5_DATA),
1159 PINMUX_GPIO(GPIO_PTU4, PTU4_DATA),
1160 PINMUX_GPIO(GPIO_PTU3, PTU3_DATA),
1161 PINMUX_GPIO(GPIO_PTU2, PTU2_DATA),
1162 PINMUX_GPIO(GPIO_PTU1, PTU1_DATA),
1163 PINMUX_GPIO(GPIO_PTU0, PTU0_DATA),
1164
1165 /* PTV */
1166 PINMUX_GPIO(GPIO_PTV7, PTV7_DATA),
1167 PINMUX_GPIO(GPIO_PTV6, PTV6_DATA),
1168 PINMUX_GPIO(GPIO_PTV5, PTV5_DATA),
1169 PINMUX_GPIO(GPIO_PTV4, PTV4_DATA),
1170 PINMUX_GPIO(GPIO_PTV3, PTV3_DATA),
1171 PINMUX_GPIO(GPIO_PTV2, PTV2_DATA),
1172 PINMUX_GPIO(GPIO_PTV1, PTV1_DATA),
1173 PINMUX_GPIO(GPIO_PTV0, PTV0_DATA),
1174
1175 /* PTW */
1176 PINMUX_GPIO(GPIO_PTW7, PTW7_DATA),
1177 PINMUX_GPIO(GPIO_PTW6, PTW6_DATA),
1178 PINMUX_GPIO(GPIO_PTW5, PTW5_DATA),
1179 PINMUX_GPIO(GPIO_PTW4, PTW4_DATA),
1180 PINMUX_GPIO(GPIO_PTW3, PTW3_DATA),
1181 PINMUX_GPIO(GPIO_PTW2, PTW2_DATA),
1182 PINMUX_GPIO(GPIO_PTW1, PTW1_DATA),
1183 PINMUX_GPIO(GPIO_PTW0, PTW0_DATA),
1184
1185 /* PTX */
1186 PINMUX_GPIO(GPIO_PTX7, PTX7_DATA),
1187 PINMUX_GPIO(GPIO_PTX6, PTX6_DATA),
1188 PINMUX_GPIO(GPIO_PTX5, PTX5_DATA),
1189 PINMUX_GPIO(GPIO_PTX4, PTX4_DATA),
1190 PINMUX_GPIO(GPIO_PTX3, PTX3_DATA),
1191 PINMUX_GPIO(GPIO_PTX2, PTX2_DATA),
1192 PINMUX_GPIO(GPIO_PTX1, PTX1_DATA),
1193 PINMUX_GPIO(GPIO_PTX0, PTX0_DATA),
1194
1195 /* PTY */
1196 PINMUX_GPIO(GPIO_PTY7, PTY7_DATA),
1197 PINMUX_GPIO(GPIO_PTY6, PTY6_DATA),
1198 PINMUX_GPIO(GPIO_PTY5, PTY5_DATA),
1199 PINMUX_GPIO(GPIO_PTY4, PTY4_DATA),
1200 PINMUX_GPIO(GPIO_PTY3, PTY3_DATA),
1201 PINMUX_GPIO(GPIO_PTY2, PTY2_DATA),
1202 PINMUX_GPIO(GPIO_PTY1, PTY1_DATA),
1203 PINMUX_GPIO(GPIO_PTY0, PTY0_DATA),
1204
1205 /* PTZ */
1206 PINMUX_GPIO(GPIO_PTZ7, PTZ7_DATA),
1207 PINMUX_GPIO(GPIO_PTZ6, PTZ6_DATA),
1208 PINMUX_GPIO(GPIO_PTZ5, PTZ5_DATA),
1209 PINMUX_GPIO(GPIO_PTZ4, PTZ4_DATA),
1210 PINMUX_GPIO(GPIO_PTZ3, PTZ3_DATA),
1211 PINMUX_GPIO(GPIO_PTZ2, PTZ2_DATA),
1212 PINMUX_GPIO(GPIO_PTZ1, PTZ1_DATA),
1213 PINMUX_GPIO(GPIO_PTZ0, PTZ0_DATA),
1214
1215 /* PTA (mobule: LBSC, CPG, LPC) */
1216 PINMUX_GPIO(GPIO_FN_BS, BS_MARK),
1217 PINMUX_GPIO(GPIO_FN_RDWR, RDWR_MARK),
1218 PINMUX_GPIO(GPIO_FN_WE1, WE1_MARK),
1219 PINMUX_GPIO(GPIO_FN_RDY, RDY_MARK),
1220 PINMUX_GPIO(GPIO_FN_MD10, MD10_MARK),
1221 PINMUX_GPIO(GPIO_FN_MD9, MD9_MARK),
1222 PINMUX_GPIO(GPIO_FN_MD8, MD8_MARK),
1223 PINMUX_GPIO(GPIO_FN_LGPIO7, LGPIO7_MARK),
1224 PINMUX_GPIO(GPIO_FN_LGPIO6, LGPIO6_MARK),
1225 PINMUX_GPIO(GPIO_FN_LGPIO5, LGPIO5_MARK),
1226 PINMUX_GPIO(GPIO_FN_LGPIO4, LGPIO4_MARK),
1227 PINMUX_GPIO(GPIO_FN_LGPIO3, LGPIO3_MARK),
1228 PINMUX_GPIO(GPIO_FN_LGPIO2, LGPIO2_MARK),
1229 PINMUX_GPIO(GPIO_FN_LGPIO1, LGPIO1_MARK),
1230 PINMUX_GPIO(GPIO_FN_LGPIO0, LGPIO0_MARK),
1231
1232 /* PTB (mobule: LBSC, EtherC, SIM, LPC) */
1233 PINMUX_GPIO(GPIO_FN_D15, D15_MARK),
1234 PINMUX_GPIO(GPIO_FN_D14, D14_MARK),
1235 PINMUX_GPIO(GPIO_FN_D13, D13_MARK),
1236 PINMUX_GPIO(GPIO_FN_D12, D12_MARK),
1237 PINMUX_GPIO(GPIO_FN_D11, D11_MARK),
1238 PINMUX_GPIO(GPIO_FN_D10, D10_MARK),
1239 PINMUX_GPIO(GPIO_FN_D9, D9_MARK),
1240 PINMUX_GPIO(GPIO_FN_D8, D8_MARK),
1241 PINMUX_GPIO(GPIO_FN_ET0_MDC, ET0_MDC_MARK),
1242 PINMUX_GPIO(GPIO_FN_ET0_MDIO, ET0_MDIO_MARK),
1243 PINMUX_GPIO(GPIO_FN_ET1_MDC, ET1_MDC_MARK),
1244 PINMUX_GPIO(GPIO_FN_ET1_MDIO, ET1_MDIO_MARK),
1245 PINMUX_GPIO(GPIO_FN_WPSZ1, WPSZ1_MARK),
1246 PINMUX_GPIO(GPIO_FN_WPSZ0, WPSZ0_MARK),
1247 PINMUX_GPIO(GPIO_FN_FWID, FWID_MARK),
1248 PINMUX_GPIO(GPIO_FN_FLSHSZ, FLSHSZ_MARK),
1249 PINMUX_GPIO(GPIO_FN_LPC_SPIEN, LPC_SPIEN_MARK),
1250 PINMUX_GPIO(GPIO_FN_BASEL, BASEL_MARK),
1251
1252 /* PTC (mobule: SD) */
1253 PINMUX_GPIO(GPIO_FN_SD_WP, SD_WP_MARK),
1254 PINMUX_GPIO(GPIO_FN_SD_CD, SD_CD_MARK),
1255 PINMUX_GPIO(GPIO_FN_SD_CLK, SD_CLK_MARK),
1256 PINMUX_GPIO(GPIO_FN_SD_CMD, SD_CMD_MARK),
1257 PINMUX_GPIO(GPIO_FN_SD_D3, SD_D3_MARK),
1258 PINMUX_GPIO(GPIO_FN_SD_D2, SD_D2_MARK),
1259 PINMUX_GPIO(GPIO_FN_SD_D1, SD_D1_MARK),
1260 PINMUX_GPIO(GPIO_FN_SD_D0, SD_D0_MARK),
1261
1262 /* PTD (mobule: INTC, SPI0, LBSC, CPG, ADC) */
1263 PINMUX_GPIO(GPIO_FN_IRQ7, IRQ7_MARK),
1264 PINMUX_GPIO(GPIO_FN_IRQ6, IRQ6_MARK),
1265 PINMUX_GPIO(GPIO_FN_IRQ5, IRQ5_MARK),
1266 PINMUX_GPIO(GPIO_FN_IRQ4, IRQ4_MARK),
1267 PINMUX_GPIO(GPIO_FN_IRQ3, IRQ3_MARK),
1268 PINMUX_GPIO(GPIO_FN_IRQ2, IRQ2_MARK),
1269 PINMUX_GPIO(GPIO_FN_IRQ1, IRQ1_MARK),
1270 PINMUX_GPIO(GPIO_FN_IRQ0, IRQ0_MARK),
1271 PINMUX_GPIO(GPIO_FN_MD6, MD6_MARK),
1272 PINMUX_GPIO(GPIO_FN_MD5, MD5_MARK),
1273 PINMUX_GPIO(GPIO_FN_MD3, MD3_MARK),
1274 PINMUX_GPIO(GPIO_FN_MD2, MD2_MARK),
1275 PINMUX_GPIO(GPIO_FN_MD1, MD1_MARK),
1276 PINMUX_GPIO(GPIO_FN_MD0, MD0_MARK),
1277 PINMUX_GPIO(GPIO_FN_ADTRG1, ADTRG1_MARK),
1278 PINMUX_GPIO(GPIO_FN_ADTRG0, ADTRG0_MARK),
1279
1280 /* PTE (mobule: EtherC) */
1281 PINMUX_GPIO(GPIO_FN_ET0_CRS_DV, ET0_CRS_DV_MARK),
1282 PINMUX_GPIO(GPIO_FN_ET0_TXD1, ET0_TXD1_MARK),
1283 PINMUX_GPIO(GPIO_FN_ET0_TXD0, ET0_TXD0_MARK),
1284 PINMUX_GPIO(GPIO_FN_ET0_TX_EN, ET0_TX_EN_MARK),
1285 PINMUX_GPIO(GPIO_FN_ET0_REF_CLK, ET0_REF_CLK_MARK),
1286 PINMUX_GPIO(GPIO_FN_ET0_RXD1, ET0_RXD1_MARK),
1287 PINMUX_GPIO(GPIO_FN_ET0_RXD0, ET0_RXD0_MARK),
1288 PINMUX_GPIO(GPIO_FN_ET0_RX_ER, ET0_RX_ER_MARK),
1289
1290 /* PTF (mobule: EtherC) */
1291 PINMUX_GPIO(GPIO_FN_ET1_CRS_DV, ET1_CRS_DV_MARK),
1292 PINMUX_GPIO(GPIO_FN_ET1_TXD1, ET1_TXD1_MARK),
1293 PINMUX_GPIO(GPIO_FN_ET1_TXD0, ET1_TXD0_MARK),
1294 PINMUX_GPIO(GPIO_FN_ET1_TX_EN, ET1_TX_EN_MARK),
1295 PINMUX_GPIO(GPIO_FN_ET1_REF_CLK, ET1_REF_CLK_MARK),
1296 PINMUX_GPIO(GPIO_FN_ET1_RXD1, ET1_RXD1_MARK),
1297 PINMUX_GPIO(GPIO_FN_ET1_RXD0, ET1_RXD0_MARK),
1298 PINMUX_GPIO(GPIO_FN_ET1_RX_ER, ET1_RX_ER_MARK),
1299
1300 /* PTG (mobule: SYSTEM, PWMX, LPC) */
1301 PINMUX_GPIO(GPIO_FN_STATUS0, STATUS0_MARK),
1302 PINMUX_GPIO(GPIO_FN_STATUS1, STATUS1_MARK),
1303 PINMUX_GPIO(GPIO_FN_PWX0, PWX0_MARK),
1304 PINMUX_GPIO(GPIO_FN_PWX1, PWX1_MARK),
1305 PINMUX_GPIO(GPIO_FN_PWX2, PWX2_MARK),
1306 PINMUX_GPIO(GPIO_FN_PWX3, PWX3_MARK),
1307 PINMUX_GPIO(GPIO_FN_SERIRQ, SERIRQ_MARK),
1308 PINMUX_GPIO(GPIO_FN_CLKRUN, CLKRUN_MARK),
1309 PINMUX_GPIO(GPIO_FN_LPCPD, LPCPD_MARK),
1310 PINMUX_GPIO(GPIO_FN_LDRQ, LDRQ_MARK),
1311
1312 /* PTH (mobule: TMU, SCIF234, SPI1, SPI0) */
1313 PINMUX_GPIO(GPIO_FN_TCLK, TCLK_MARK),
1314 PINMUX_GPIO(GPIO_FN_RXD4, RXD4_MARK),
1315 PINMUX_GPIO(GPIO_FN_TXD4, TXD4_MARK),
1316 PINMUX_GPIO(GPIO_FN_SP1_MOSI, SP1_MOSI_MARK),
1317 PINMUX_GPIO(GPIO_FN_SP1_MISO, SP1_MISO_MARK),
1318 PINMUX_GPIO(GPIO_FN_SP1_SCK, SP1_SCK_MARK),
1319 PINMUX_GPIO(GPIO_FN_SP1_SCK_FB, SP1_SCK_FB_MARK),
1320 PINMUX_GPIO(GPIO_FN_SP1_SS0, SP1_SS0_MARK),
1321 PINMUX_GPIO(GPIO_FN_SP1_SS1, SP1_SS1_MARK),
1322 PINMUX_GPIO(GPIO_FN_SP0_SS1, SP0_SS1_MARK),
1323
1324 /* PTI (mobule: INTC) */
1325 PINMUX_GPIO(GPIO_FN_IRQ15, IRQ15_MARK),
1326 PINMUX_GPIO(GPIO_FN_IRQ14, IRQ14_MARK),
1327 PINMUX_GPIO(GPIO_FN_IRQ13, IRQ13_MARK),
1328 PINMUX_GPIO(GPIO_FN_IRQ12, IRQ12_MARK),
1329 PINMUX_GPIO(GPIO_FN_IRQ11, IRQ11_MARK),
1330 PINMUX_GPIO(GPIO_FN_IRQ10, IRQ10_MARK),
1331 PINMUX_GPIO(GPIO_FN_IRQ9, IRQ9_MARK),
1332 PINMUX_GPIO(GPIO_FN_IRQ8, IRQ8_MARK),
1333
1334 /* PTJ (mobule: SCIF234, SERMUX) */
1335 PINMUX_GPIO(GPIO_FN_RXD3, RXD3_MARK),
1336 PINMUX_GPIO(GPIO_FN_TXD3, TXD3_MARK),
1337 PINMUX_GPIO(GPIO_FN_RXD2, RXD2_MARK),
1338 PINMUX_GPIO(GPIO_FN_TXD2, TXD2_MARK),
1339 PINMUX_GPIO(GPIO_FN_COM1_TXD, COM1_TXD_MARK),
1340 PINMUX_GPIO(GPIO_FN_COM1_RXD, COM1_RXD_MARK),
1341 PINMUX_GPIO(GPIO_FN_COM1_RTS, COM1_RTS_MARK),
1342 PINMUX_GPIO(GPIO_FN_COM1_CTS, COM1_CTS_MARK),
1343
1344 /* PTK (mobule: SERMUX) */
1345 PINMUX_GPIO(GPIO_FN_COM2_TXD, COM2_TXD_MARK),
1346 PINMUX_GPIO(GPIO_FN_COM2_RXD, COM2_RXD_MARK),
1347 PINMUX_GPIO(GPIO_FN_COM2_RTS, COM2_RTS_MARK),
1348 PINMUX_GPIO(GPIO_FN_COM2_CTS, COM2_CTS_MARK),
1349 PINMUX_GPIO(GPIO_FN_COM2_DTR, COM2_DTR_MARK),
1350 PINMUX_GPIO(GPIO_FN_COM2_DSR, COM2_DSR_MARK),
1351 PINMUX_GPIO(GPIO_FN_COM2_DCD, COM2_DCD_MARK),
1352 PINMUX_GPIO(GPIO_FN_COM2_RI, COM2_RI_MARK),
1353
1354 /* PTL (mobule: SERMUX) */
1355 PINMUX_GPIO(GPIO_FN_RAC_TXD, RAC_TXD_MARK),
1356 PINMUX_GPIO(GPIO_FN_RAC_RXD, RAC_RXD_MARK),
1357 PINMUX_GPIO(GPIO_FN_RAC_RTS, RAC_RTS_MARK),
1358 PINMUX_GPIO(GPIO_FN_RAC_CTS, RAC_CTS_MARK),
1359 PINMUX_GPIO(GPIO_FN_RAC_DTR, RAC_DTR_MARK),
1360 PINMUX_GPIO(GPIO_FN_RAC_DSR, RAC_DSR_MARK),
1361 PINMUX_GPIO(GPIO_FN_RAC_DCD, RAC_DCD_MARK),
1362 PINMUX_GPIO(GPIO_FN_RAC_RI, RAC_RI_MARK),
1363
1364 /* PTM (mobule: IIC, LPC) */
1365 PINMUX_GPIO(GPIO_FN_SDA6, SDA6_MARK),
1366 PINMUX_GPIO(GPIO_FN_SCL6, SCL6_MARK),
1367 PINMUX_GPIO(GPIO_FN_SDA7, SDA7_MARK),
1368 PINMUX_GPIO(GPIO_FN_SCL7, SCL7_MARK),
1369 PINMUX_GPIO(GPIO_FN_WP, WP_MARK),
1370 PINMUX_GPIO(GPIO_FN_FMS0, FMS0_MARK),
1371 PINMUX_GPIO(GPIO_FN_FMS1, FMS1_MARK),
1372
1373 /* PTN (mobule: SCIF234, EVC) */
1374 PINMUX_GPIO(GPIO_FN_SCK2, SCK2_MARK),
1375 PINMUX_GPIO(GPIO_FN_RTS4, RTS4_MARK),
1376 PINMUX_GPIO(GPIO_FN_RTS3, RTS3_MARK),
1377 PINMUX_GPIO(GPIO_FN_RTS2, RTS2_MARK),
1378 PINMUX_GPIO(GPIO_FN_CTS4, CTS4_MARK),
1379 PINMUX_GPIO(GPIO_FN_CTS3, CTS3_MARK),
1380 PINMUX_GPIO(GPIO_FN_CTS2, CTS2_MARK),
1381 PINMUX_GPIO(GPIO_FN_EVENT7, EVENT7_MARK),
1382 PINMUX_GPIO(GPIO_FN_EVENT6, EVENT6_MARK),
1383 PINMUX_GPIO(GPIO_FN_EVENT5, EVENT5_MARK),
1384 PINMUX_GPIO(GPIO_FN_EVENT4, EVENT4_MARK),
1385 PINMUX_GPIO(GPIO_FN_EVENT3, EVENT3_MARK),
1386 PINMUX_GPIO(GPIO_FN_EVENT2, EVENT2_MARK),
1387 PINMUX_GPIO(GPIO_FN_EVENT1, EVENT1_MARK),
1388 PINMUX_GPIO(GPIO_FN_EVENT0, EVENT0_MARK),
1389
1390 /* PTO (mobule: SGPIO) */
1391 PINMUX_GPIO(GPIO_FN_SGPIO0_CLK, SGPIO0_CLK_MARK),
1392 PINMUX_GPIO(GPIO_FN_SGPIO0_LOAD, SGPIO0_LOAD_MARK),
1393 PINMUX_GPIO(GPIO_FN_SGPIO0_DI, SGPIO0_DI_MARK),
1394 PINMUX_GPIO(GPIO_FN_SGPIO0_DO, SGPIO0_DO_MARK),
1395 PINMUX_GPIO(GPIO_FN_SGPIO1_CLK, SGPIO1_CLK_MARK),
1396 PINMUX_GPIO(GPIO_FN_SGPIO1_LOAD, SGPIO1_LOAD_MARK),
1397 PINMUX_GPIO(GPIO_FN_SGPIO1_DI, SGPIO1_DI_MARK),
1398 PINMUX_GPIO(GPIO_FN_SGPIO1_DO, SGPIO1_DO_MARK),
1399
1400 /* PTP (mobule: JMC, SCIF234) */
1401 PINMUX_GPIO(GPIO_FN_JMCTCK, JMCTCK_MARK),
1402 PINMUX_GPIO(GPIO_FN_JMCTMS, JMCTMS_MARK),
1403 PINMUX_GPIO(GPIO_FN_JMCTDO, JMCTDO_MARK),
1404 PINMUX_GPIO(GPIO_FN_JMCTDI, JMCTDI_MARK),
1405 PINMUX_GPIO(GPIO_FN_JMCRST, JMCRST_MARK),
1406 PINMUX_GPIO(GPIO_FN_SCK4, SCK4_MARK),
1407 PINMUX_GPIO(GPIO_FN_SCK3, SCK3_MARK),
1408
1409 /* PTQ (mobule: LPC) */
1410 PINMUX_GPIO(GPIO_FN_LAD3, LAD3_MARK),
1411 PINMUX_GPIO(GPIO_FN_LAD2, LAD2_MARK),
1412 PINMUX_GPIO(GPIO_FN_LAD1, LAD1_MARK),
1413 PINMUX_GPIO(GPIO_FN_LAD0, LAD0_MARK),
1414 PINMUX_GPIO(GPIO_FN_LFRAME, LFRAME_MARK),
1415 PINMUX_GPIO(GPIO_FN_LRESET, LRESET_MARK),
1416 PINMUX_GPIO(GPIO_FN_LCLK, LCLK_MARK),
1417
1418 /* PTR (mobule: GRA, IIC) */
1419 PINMUX_GPIO(GPIO_FN_DDC3, DDC3_MARK),
1420 PINMUX_GPIO(GPIO_FN_DDC2, DDC2_MARK),
1421 PINMUX_GPIO(GPIO_FN_SDA8, SDA8_MARK),
1422 PINMUX_GPIO(GPIO_FN_SCL8, SCL8_MARK),
1423 PINMUX_GPIO(GPIO_FN_SDA2, SDA2_MARK),
1424 PINMUX_GPIO(GPIO_FN_SCL2, SCL2_MARK),
1425 PINMUX_GPIO(GPIO_FN_SDA1, SDA1_MARK),
1426 PINMUX_GPIO(GPIO_FN_SCL1, SCL1_MARK),
1427 PINMUX_GPIO(GPIO_FN_SDA0, SDA0_MARK),
1428 PINMUX_GPIO(GPIO_FN_SCL0, SCL0_MARK),
1429
1430 /* PTS (mobule: GRA, IIC) */
1431 PINMUX_GPIO(GPIO_FN_DDC1, DDC1_MARK),
1432 PINMUX_GPIO(GPIO_FN_DDC0, DDC0_MARK),
1433 PINMUX_GPIO(GPIO_FN_SDA9, SDA9_MARK),
1434 PINMUX_GPIO(GPIO_FN_SCL9, SCL9_MARK),
1435 PINMUX_GPIO(GPIO_FN_SDA5, SDA5_MARK),
1436 PINMUX_GPIO(GPIO_FN_SCL5, SCL5_MARK),
1437 PINMUX_GPIO(GPIO_FN_SDA4, SDA4_MARK),
1438 PINMUX_GPIO(GPIO_FN_SCL4, SCL4_MARK),
1439 PINMUX_GPIO(GPIO_FN_SDA3, SDA3_MARK),
1440 PINMUX_GPIO(GPIO_FN_SCL3, SCL3_MARK),
1441
1442 /* PTT (mobule: SYSTEM, PWMX) */
1443 PINMUX_GPIO(GPIO_FN_AUDSYNC, AUDSYNC_MARK),
1444 PINMUX_GPIO(GPIO_FN_AUDCK, AUDCK_MARK),
1445 PINMUX_GPIO(GPIO_FN_AUDATA3, AUDATA3_MARK),
1446 PINMUX_GPIO(GPIO_FN_AUDATA2, AUDATA2_MARK),
1447 PINMUX_GPIO(GPIO_FN_AUDATA1, AUDATA1_MARK),
1448 PINMUX_GPIO(GPIO_FN_AUDATA0, AUDATA0_MARK),
1449 PINMUX_GPIO(GPIO_FN_PWX7, PWX7_MARK),
1450 PINMUX_GPIO(GPIO_FN_PWX6, PWX6_MARK),
1451 PINMUX_GPIO(GPIO_FN_PWX5, PWX5_MARK),
1452 PINMUX_GPIO(GPIO_FN_PWX4, PWX4_MARK),
1453
1454 /* PTU (mobule: LBSC, DMAC) */
1455 PINMUX_GPIO(GPIO_FN_CS6, CS6_MARK),
1456 PINMUX_GPIO(GPIO_FN_CS5, CS5_MARK),
1457 PINMUX_GPIO(GPIO_FN_CS4, CS4_MARK),
1458 PINMUX_GPIO(GPIO_FN_CS0, CS0_MARK),
1459 PINMUX_GPIO(GPIO_FN_RD, RD_MARK),
1460 PINMUX_GPIO(GPIO_FN_WE0, WE0_MARK),
1461 PINMUX_GPIO(GPIO_FN_A25, A25_MARK),
1462 PINMUX_GPIO(GPIO_FN_A24, A24_MARK),
1463 PINMUX_GPIO(GPIO_FN_DREQ0, DREQ0_MARK),
1464 PINMUX_GPIO(GPIO_FN_DACK0, DACK0_MARK),
1465
1466 /* PTV (mobule: LBSC, DMAC) */
1467 PINMUX_GPIO(GPIO_FN_A23, A23_MARK),
1468 PINMUX_GPIO(GPIO_FN_A22, A22_MARK),
1469 PINMUX_GPIO(GPIO_FN_A21, A21_MARK),
1470 PINMUX_GPIO(GPIO_FN_A20, A20_MARK),
1471 PINMUX_GPIO(GPIO_FN_A19, A19_MARK),
1472 PINMUX_GPIO(GPIO_FN_A18, A18_MARK),
1473 PINMUX_GPIO(GPIO_FN_A17, A17_MARK),
1474 PINMUX_GPIO(GPIO_FN_A16, A16_MARK),
1475 PINMUX_GPIO(GPIO_FN_TEND0, TEND0_MARK),
1476 PINMUX_GPIO(GPIO_FN_DREQ1, DREQ1_MARK),
1477 PINMUX_GPIO(GPIO_FN_DACK1, DACK1_MARK),
1478 PINMUX_GPIO(GPIO_FN_TEND1, TEND1_MARK),
1479
1480 /* PTW (mobule: LBSC) */
1481 PINMUX_GPIO(GPIO_FN_A16, A16_MARK),
1482 PINMUX_GPIO(GPIO_FN_A15, A15_MARK),
1483 PINMUX_GPIO(GPIO_FN_A14, A14_MARK),
1484 PINMUX_GPIO(GPIO_FN_A13, A13_MARK),
1485 PINMUX_GPIO(GPIO_FN_A12, A12_MARK),
1486 PINMUX_GPIO(GPIO_FN_A11, A11_MARK),
1487 PINMUX_GPIO(GPIO_FN_A10, A10_MARK),
1488 PINMUX_GPIO(GPIO_FN_A9, A9_MARK),
1489 PINMUX_GPIO(GPIO_FN_A8, A8_MARK),
1490
1491 /* PTX (mobule: LBSC) */
1492 PINMUX_GPIO(GPIO_FN_A7, A7_MARK),
1493 PINMUX_GPIO(GPIO_FN_A6, A6_MARK),
1494 PINMUX_GPIO(GPIO_FN_A5, A5_MARK),
1495 PINMUX_GPIO(GPIO_FN_A4, A4_MARK),
1496 PINMUX_GPIO(GPIO_FN_A3, A3_MARK),
1497 PINMUX_GPIO(GPIO_FN_A2, A2_MARK),
1498 PINMUX_GPIO(GPIO_FN_A1, A1_MARK),
1499 PINMUX_GPIO(GPIO_FN_A0, A0_MARK),
1500
1501 /* PTY (mobule: LBSC) */
1502 PINMUX_GPIO(GPIO_FN_D7, D7_MARK),
1503 PINMUX_GPIO(GPIO_FN_D6, D6_MARK),
1504 PINMUX_GPIO(GPIO_FN_D5, D5_MARK),
1505 PINMUX_GPIO(GPIO_FN_D4, D4_MARK),
1506 PINMUX_GPIO(GPIO_FN_D3, D3_MARK),
1507 PINMUX_GPIO(GPIO_FN_D2, D2_MARK),
1508 PINMUX_GPIO(GPIO_FN_D1, D1_MARK),
1509 PINMUX_GPIO(GPIO_FN_D0, D0_MARK),
1510 };
1511
1512static struct pinmux_cfg_reg pinmux_config_regs[] = {
1513 { PINMUX_CFG_REG("PACR", 0xffec0000, 16, 2) {
1514 PTA7_FN, PTA7_OUT, PTA7_IN, 0,
1515 PTA6_FN, PTA6_OUT, PTA6_IN, 0,
1516 PTA5_FN, PTA5_OUT, PTA5_IN, 0,
1517 PTA4_FN, PTA4_OUT, PTA4_IN, 0,
1518 PTA3_FN, PTA3_OUT, PTA3_IN, 0,
1519 PTA2_FN, PTA2_OUT, PTA2_IN, 0,
1520 PTA1_FN, PTA1_OUT, PTA1_IN, 0,
1521 PTA0_FN, PTA0_OUT, PTA0_IN, 0 }
1522 },
1523 { PINMUX_CFG_REG("PBCR", 0xffec0002, 16, 2) {
1524 PTB7_FN, PTB7_OUT, PTB7_IN, 0,
1525 PTB6_FN, PTB6_OUT, PTB6_IN, 0,
1526 PTB5_FN, PTB5_OUT, PTB5_IN, 0,
1527 PTB4_FN, PTB4_OUT, PTB4_IN, 0,
1528 PTB3_FN, PTB3_OUT, PTB3_IN, 0,
1529 PTB2_FN, PTB2_OUT, PTB2_IN, 0,
1530 PTB1_FN, PTB1_OUT, PTB1_IN, 0,
1531 PTB0_FN, PTB0_OUT, PTB0_IN, 0 }
1532 },
1533 { PINMUX_CFG_REG("PCCR", 0xffec0004, 16, 2) {
1534 PTC7_FN, PTC7_OUT, PTC7_IN, 0,
1535 PTC6_FN, PTC6_OUT, PTC6_IN, 0,
1536 PTC5_FN, PTC5_OUT, PTC5_IN, 0,
1537 PTC4_FN, PTC4_OUT, PTC4_IN, 0,
1538 PTC3_FN, PTC3_OUT, PTC3_IN, 0,
1539 PTC2_FN, PTC2_OUT, PTC2_IN, 0,
1540 PTC1_FN, PTC1_OUT, PTC1_IN, 0,
1541 PTC0_FN, PTC0_OUT, PTC0_IN, 0 }
1542 },
1543 { PINMUX_CFG_REG("PDCR", 0xffec0006, 16, 2) {
1544 PTD7_FN, PTD7_OUT, PTD7_IN, 0,
1545 PTD6_FN, PTD6_OUT, PTD6_IN, 0,
1546 PTD5_FN, PTD5_OUT, PTD5_IN, 0,
1547 PTD4_FN, PTD4_OUT, PTD4_IN, 0,
1548 PTD3_FN, PTD3_OUT, PTD3_IN, 0,
1549 PTD2_FN, PTD2_OUT, PTD2_IN, 0,
1550 PTD1_FN, PTD1_OUT, PTD1_IN, 0,
1551 PTD0_FN, PTD0_OUT, PTD0_IN, 0 }
1552 },
1553 { PINMUX_CFG_REG("PECR", 0xffec0008, 16, 2) {
1554 PTE7_FN, PTE7_OUT, PTE7_IN, 0,
1555 PTE6_FN, PTE6_OUT, PTE6_IN, 0,
1556 PTE5_FN, PTE5_OUT, PTE5_IN, 0,
1557 PTE4_FN, PTE4_OUT, PTE4_IN, 0,
1558 PTE3_FN, PTE3_OUT, PTE3_IN, 0,
1559 PTE2_FN, PTE2_OUT, PTE2_IN, 0,
1560 PTE1_FN, PTE1_OUT, PTE1_IN, 0,
1561 PTE0_FN, PTE0_OUT, PTE0_IN, 0 }
1562 },
1563 { PINMUX_CFG_REG("PFCR", 0xffec000a, 16, 2) {
1564 PTF7_FN, PTF7_OUT, PTF7_IN, 0,
1565 PTF6_FN, PTF6_OUT, PTF6_IN, 0,
1566 PTF5_FN, PTF5_OUT, PTF5_IN, 0,
1567 PTF4_FN, PTF4_OUT, PTF4_IN, 0,
1568 PTF3_FN, PTF3_OUT, PTF3_IN, 0,
1569 PTF2_FN, PTF2_OUT, PTF2_IN, 0,
1570 PTF1_FN, PTF1_OUT, PTF1_IN, 0,
1571 PTF0_FN, PTF0_OUT, PTF0_IN, 0 }
1572 },
1573 { PINMUX_CFG_REG("PGCR", 0xffec000c, 16, 2) {
1574 PTG7_FN, PTG7_OUT, PTG7_IN, 0,
1575 PTG6_FN, PTG6_OUT, PTG6_IN, 0,
1576 PTG5_FN, PTG5_OUT, PTG5_IN, 0,
1577 PTG4_FN, PTG4_OUT, PTG4_IN, 0,
1578 PTG3_FN, PTG3_OUT, PTG3_IN, 0,
1579 PTG2_FN, PTG2_OUT, PTG2_IN, 0,
1580 PTG1_FN, PTG1_OUT, PTG1_IN, 0,
1581 PTG0_FN, PTG0_OUT, PTG0_IN, 0 }
1582 },
1583 { PINMUX_CFG_REG("PHCR", 0xffec000e, 16, 2) {
1584 PTH7_FN, PTH7_OUT, PTH7_IN, 0,
1585 PTH6_FN, PTH6_OUT, PTH6_IN, 0,
1586 PTH5_FN, PTH5_OUT, PTH5_IN, 0,
1587 PTH4_FN, PTH4_OUT, PTH4_IN, 0,
1588 PTH3_FN, PTH3_OUT, PTH3_IN, 0,
1589 PTH2_FN, PTH2_OUT, PTH2_IN, 0,
1590 PTH1_FN, PTH1_OUT, PTH1_IN, 0,
1591 PTH0_FN, PTH0_OUT, PTH0_IN, 0 }
1592 },
1593 { PINMUX_CFG_REG("PICR", 0xffec0010, 16, 2) {
1594 PTI7_FN, PTI7_OUT, PTI7_IN, 0,
1595 PTI6_FN, PTI6_OUT, PTI6_IN, 0,
1596 PTI5_FN, PTI5_OUT, PTI5_IN, 0,
1597 PTI4_FN, PTI4_OUT, PTI4_IN, 0,
1598 PTI3_FN, PTI3_OUT, PTI3_IN, 0,
1599 PTI2_FN, PTI2_OUT, PTI2_IN, 0,
1600 PTI1_FN, PTI1_OUT, PTI1_IN, 0,
1601 PTI0_FN, PTI0_OUT, PTI0_IN, 0 }
1602 },
1603 { PINMUX_CFG_REG("PJCR", 0xffec0012, 16, 2) {
1604 PTJ7_FN, PTJ7_OUT, PTJ7_IN, 0,
1605 PTJ6_FN, PTJ6_OUT, PTJ6_IN, 0,
1606 PTJ5_FN, PTJ5_OUT, PTJ5_IN, 0,
1607 PTJ4_FN, PTJ4_OUT, PTJ4_IN, 0,
1608 PTJ3_FN, PTJ3_OUT, PTJ3_IN, 0,
1609 PTJ2_FN, PTJ2_OUT, PTJ2_IN, 0,
1610 PTJ1_FN, PTJ1_OUT, PTJ1_IN, 0,
1611 PTJ0_FN, PTJ0_OUT, PTJ0_IN, 0 }
1612 },
1613 { PINMUX_CFG_REG("PKCR", 0xffec0014, 16, 2) {
1614 PTK7_FN, PTK7_OUT, PTK7_IN, 0,
1615 PTK6_FN, PTK6_OUT, PTK6_IN, 0,
1616 PTK5_FN, PTK5_OUT, PTK5_IN, 0,
1617 PTK4_FN, PTK4_OUT, PTK4_IN, 0,
1618 PTK3_FN, PTK3_OUT, PTK3_IN, 0,
1619 PTK2_FN, PTK2_OUT, PTK2_IN, 0,
1620 PTK1_FN, PTK1_OUT, PTK1_IN, 0,
1621 PTK0_FN, PTK0_OUT, PTK0_IN, 0 }
1622 },
1623 { PINMUX_CFG_REG("PLCR", 0xffec0016, 16, 2) {
1624 PTL7_FN, PTL7_OUT, PTL7_IN, 0,
1625 PTL6_FN, PTL6_OUT, PTL6_IN, 0,
1626 PTL5_FN, PTL5_OUT, PTL5_IN, 0,
1627 PTL4_FN, PTL4_OUT, PTL4_IN, 0,
1628 PTL3_FN, PTL3_OUT, PTL3_IN, 0,
1629 PTL2_FN, PTL2_OUT, PTL2_IN, 0,
1630 PTL1_FN, PTL1_OUT, PTL1_IN, 0,
1631 PTL0_FN, PTL0_OUT, PTL0_IN, 0 }
1632 },
1633 { PINMUX_CFG_REG("PMCR", 0xffec0018, 16, 2) {
1634 0, 0, 0, 0, /* reserved: always set 1 */
1635 PTM6_FN, PTM6_OUT, PTM6_IN, 0,
1636 PTM5_FN, PTM5_OUT, PTM5_IN, 0,
1637 PTM4_FN, PTM4_OUT, PTM4_IN, 0,
1638 PTM3_FN, PTM3_OUT, PTM3_IN, 0,
1639 PTM2_FN, PTM2_OUT, PTM2_IN, 0,
1640 PTM1_FN, PTM1_OUT, PTM1_IN, 0,
1641 PTM0_FN, PTM0_OUT, PTM0_IN, 0 }
1642 },
1643 { PINMUX_CFG_REG("PNCR", 0xffec001a, 16, 2) {
1644 PTN7_FN, PTN7_OUT, PTN7_IN, 0,
1645 PTN6_FN, PTN6_OUT, PTN6_IN, 0,
1646 PTN5_FN, PTN5_OUT, PTN5_IN, 0,
1647 PTN4_FN, PTN4_OUT, PTN4_IN, 0,
1648 PTN3_FN, PTN3_OUT, PTN3_IN, 0,
1649 PTN2_FN, PTN2_OUT, PTN2_IN, 0,
1650 PTN1_FN, PTN1_OUT, PTN1_IN, 0,
1651 PTN0_FN, PTN0_OUT, PTN0_IN, 0 }
1652 },
1653 { PINMUX_CFG_REG("POCR", 0xffec001c, 16, 2) {
1654 PTO7_FN, PTO7_OUT, PTO7_IN, 0,
1655 PTO6_FN, PTO6_OUT, PTO6_IN, 0,
1656 PTO5_FN, PTO5_OUT, PTO5_IN, 0,
1657 PTO4_FN, PTO4_OUT, PTO4_IN, 0,
1658 PTO3_FN, PTO3_OUT, PTO3_IN, 0,
1659 PTO2_FN, PTO2_OUT, PTO2_IN, 0,
1660 PTO1_FN, PTO1_OUT, PTO1_IN, 0,
1661 PTO0_FN, PTO0_OUT, PTO0_IN, 0 }
1662 },
1663 { PINMUX_CFG_REG("PPCR", 0xffec001e, 16, 2) {
1664 0, 0, 0, 0, /* reserved: always set 1 */
1665 PTP6_FN, PTP6_OUT, PTP6_IN, 0,
1666 PTP5_FN, PTP5_OUT, PTP5_IN, 0,
1667 PTP4_FN, PTP4_OUT, PTP4_IN, 0,
1668 PTP3_FN, PTP3_OUT, PTP3_IN, 0,
1669 PTP2_FN, PTP2_OUT, PTP2_IN, 0,
1670 PTP1_FN, PTP1_OUT, PTP1_IN, 0,
1671 PTP0_FN, PTP0_OUT, PTP0_IN, 0 }
1672 },
1673 { PINMUX_CFG_REG("PQCR", 0xffec0020, 16, 2) {
1674 0, 0, 0, 0, /* reserved: always set 1 */
1675 PTQ6_FN, PTQ6_OUT, PTQ6_IN, 0,
1676 PTQ5_FN, PTQ5_OUT, PTQ5_IN, 0,
1677 PTQ4_FN, PTQ4_OUT, PTQ4_IN, 0,
1678 PTQ3_FN, PTQ3_OUT, PTQ3_IN, 0,
1679 PTQ2_FN, PTQ2_OUT, PTQ2_IN, 0,
1680 PTQ1_FN, PTQ1_OUT, PTQ1_IN, 0,
1681 PTQ0_FN, PTQ0_OUT, PTQ0_IN, 0 }
1682 },
1683 { PINMUX_CFG_REG("PRCR", 0xffec0022, 16, 2) {
1684 PTR7_FN, PTR7_OUT, PTR7_IN, 0,
1685 PTR6_FN, PTR6_OUT, PTR6_IN, 0,
1686 PTR5_FN, PTR5_OUT, PTR5_IN, 0,
1687 PTR4_FN, PTR4_OUT, PTR4_IN, 0,
1688 PTR3_FN, PTR3_OUT, PTR3_IN, 0,
1689 PTR2_FN, PTR2_OUT, PTR2_IN, 0,
1690 PTR1_FN, PTR1_OUT, PTR1_IN, 0,
1691 PTR0_FN, PTR0_OUT, PTR0_IN, 0 }
1692 },
1693 { PINMUX_CFG_REG("PSCR", 0xffec0024, 16, 2) {
1694 PTS7_FN, PTS7_OUT, PTS7_IN, 0,
1695 PTS6_FN, PTS6_OUT, PTS6_IN, 0,
1696 PTS5_FN, PTS5_OUT, PTS5_IN, 0,
1697 PTS4_FN, PTS4_OUT, PTS4_IN, 0,
1698 PTS3_FN, PTS3_OUT, PTS3_IN, 0,
1699 PTS2_FN, PTS2_OUT, PTS2_IN, 0,
1700 PTS1_FN, PTS1_OUT, PTS1_IN, 0,
1701 PTS0_FN, PTS0_OUT, PTS0_IN, 0 }
1702 },
1703 { PINMUX_CFG_REG("PTCR", 0xffec0026, 16, 2) {
1704 0, 0, 0, 0, /* reserved: always set 1 */
1705 0, 0, 0, 0, /* reserved: always set 1 */
1706 PTT5_FN, PTT5_OUT, PTT5_IN, 0,
1707 PTT4_FN, PTT4_OUT, PTT4_IN, 0,
1708 PTT3_FN, PTT3_OUT, PTT3_IN, 0,
1709 PTT2_FN, PTT2_OUT, PTT2_IN, 0,
1710 PTT1_FN, PTT1_OUT, PTT1_IN, 0,
1711 PTT0_FN, PTT0_OUT, PTT0_IN, 0 }
1712 },
1713 { PINMUX_CFG_REG("PUCR", 0xffec0028, 16, 2) {
1714 PTU7_FN, PTU7_OUT, PTU7_IN, PTU7_IN_PU,
1715 PTU6_FN, PTU6_OUT, PTU6_IN, PTU6_IN_PU,
1716 PTU5_FN, PTU5_OUT, PTU5_IN, PTU5_IN_PU,
1717 PTU4_FN, PTU4_OUT, PTU4_IN, PTU4_IN_PU,
1718 PTU3_FN, PTU3_OUT, PTU3_IN, PTU3_IN_PU,
1719 PTU2_FN, PTU2_OUT, PTU2_IN, PTU2_IN_PU,
1720 PTU1_FN, PTU1_OUT, PTU1_IN, PTU1_IN_PU,
1721 PTU0_FN, PTU0_OUT, PTU0_IN, PTU0_IN_PU }
1722 },
1723 { PINMUX_CFG_REG("PVCR", 0xffec002a, 16, 2) {
1724 PTV7_FN, PTV7_OUT, PTV7_IN, PTV7_IN_PU,
1725 PTV6_FN, PTV6_OUT, PTV6_IN, PTV6_IN_PU,
1726 PTV5_FN, PTV5_OUT, PTV5_IN, PTV5_IN_PU,
1727 PTV4_FN, PTV4_OUT, PTV4_IN, PTV4_IN_PU,
1728 PTV3_FN, PTV3_OUT, PTV3_IN, PTV3_IN_PU,
1729 PTV2_FN, PTV2_OUT, PTV2_IN, PTV2_IN_PU,
1730 PTV1_FN, PTV1_OUT, PTV1_IN, PTV1_IN_PU,
1731 PTV0_FN, PTV0_OUT, PTV0_IN, PTV0_IN_PU }
1732 },
1733 { PINMUX_CFG_REG("PWCR", 0xffec002c, 16, 2) {
1734 PTW7_FN, PTW7_OUT, PTW7_IN, PTW7_IN_PU,
1735 PTW6_FN, PTW6_OUT, PTW6_IN, PTW6_IN_PU,
1736 PTW5_FN, PTW5_OUT, PTW5_IN, PTW5_IN_PU,
1737 PTW4_FN, PTW4_OUT, PTW4_IN, PTW4_IN_PU,
1738 PTW3_FN, PTW3_OUT, PTW3_IN, PTW3_IN_PU,
1739 PTW2_FN, PTW2_OUT, PTW2_IN, PTW2_IN_PU,
1740 PTW1_FN, PTW1_OUT, PTW1_IN, PTW1_IN_PU,
1741 PTW0_FN, PTW0_OUT, PTW0_IN, PTW0_IN_PU }
1742 },
1743 { PINMUX_CFG_REG("PXCR", 0xffec002e, 16, 2) {
1744 PTX7_FN, PTX7_OUT, PTX7_IN, PTX7_IN_PU,
1745 PTX6_FN, PTX6_OUT, PTX6_IN, PTX6_IN_PU,
1746 PTX5_FN, PTX5_OUT, PTX5_IN, PTX5_IN_PU,
1747 PTX4_FN, PTX4_OUT, PTX4_IN, PTX4_IN_PU,
1748 PTX3_FN, PTX3_OUT, PTX3_IN, PTX3_IN_PU,
1749 PTX2_FN, PTX2_OUT, PTX2_IN, PTX2_IN_PU,
1750 PTX1_FN, PTX1_OUT, PTX1_IN, PTX1_IN_PU,
1751 PTX0_FN, PTX0_OUT, PTX0_IN, PTX0_IN_PU }
1752 },
1753 { PINMUX_CFG_REG("PYCR", 0xffec0030, 16, 2) {
1754 PTY7_FN, PTY7_OUT, PTY7_IN, PTY7_IN_PU,
1755 PTY6_FN, PTY6_OUT, PTY6_IN, PTY6_IN_PU,
1756 PTY5_FN, PTY5_OUT, PTY5_IN, PTY5_IN_PU,
1757 PTY4_FN, PTY4_OUT, PTY4_IN, PTY4_IN_PU,
1758 PTY3_FN, PTY3_OUT, PTY3_IN, PTY3_IN_PU,
1759 PTY2_FN, PTY2_OUT, PTY2_IN, PTY2_IN_PU,
1760 PTY1_FN, PTY1_OUT, PTY1_IN, PTY1_IN_PU,
1761 PTY0_FN, PTY0_OUT, PTY0_IN, PTY0_IN_PU }
1762 },
1763 { PINMUX_CFG_REG("PZCR", 0xffec0032, 16, 2) {
1764 0, PTZ7_OUT, PTZ7_IN, 0,
1765 0, PTZ6_OUT, PTZ6_IN, 0,
1766 0, PTZ5_OUT, PTZ5_IN, 0,
1767 0, PTZ4_OUT, PTZ4_IN, 0,
1768 0, PTZ3_OUT, PTZ3_IN, 0,
1769 0, PTZ2_OUT, PTZ2_IN, 0,
1770 0, PTZ1_OUT, PTZ1_IN, 0,
1771 0, PTZ0_OUT, PTZ0_IN, 0 }
1772 },
1773
1774 { PINMUX_CFG_REG("PSEL0", 0xffec0070, 16, 1) {
1775 PS0_15_FN3, PS0_15_FN1,
1776 PS0_14_FN3, PS0_14_FN1,
1777 PS0_13_FN3, PS0_13_FN1,
1778 PS0_12_FN3, PS0_12_FN1,
1779 0, 0,
1780 0, 0,
1781 0, 0,
1782 0, 0,
1783 PS0_7_FN2, PS0_7_FN1,
1784 PS0_6_FN2, PS0_6_FN1,
1785 PS0_5_FN2, PS0_5_FN1,
1786 PS0_4_FN2, PS0_4_FN1,
1787 PS0_3_FN2, PS0_3_FN1,
1788 PS0_2_FN2, PS0_2_FN1,
1789 PS0_1_FN2, PS0_1_FN1,
1790 0, 0, }
1791 },
1792 { PINMUX_CFG_REG("PSEL1", 0xffec0072, 16, 1) {
1793 0, 0,
1794 0, 0,
1795 0, 0,
1796 0, 0,
1797 0, 0,
1798 0, 0,
1799 0, 0,
1800 0, 0,
1801 PS1_7_FN1, PS1_7_FN3,
1802 PS1_6_FN1, PS1_6_FN3,
1803 0, 0,
1804 0, 0,
1805 0, 0,
1806 0, 0,
1807 0, 0,
1808 0, 0, }
1809 },
1810 { PINMUX_CFG_REG("PSEL2", 0xffec0074, 16, 1) {
1811 0, 0,
1812 0, 0,
1813 PS2_13_FN3, PS2_13_FN1,
1814 PS2_12_FN3, PS2_12_FN1,
1815 0, 0,
1816 0, 0,
1817 0, 0,
1818 0, 0,
1819 0, 0,
1820 0, 0,
1821 0, 0,
1822 0, 0,
1823 0, 0,
1824 0, 0,
1825 PS2_1_FN1, PS2_1_FN2,
1826 PS2_0_FN1, PS2_0_FN2, }
1827 },
1828 { PINMUX_CFG_REG("PSEL4", 0xffec0078, 16, 1) {
1829 PS4_15_FN2, PS4_15_FN1,
1830 PS4_14_FN2, PS4_14_FN1,
1831 PS4_13_FN2, PS4_13_FN1,
1832 PS4_12_FN2, PS4_12_FN1,
1833 PS4_11_FN2, PS4_11_FN1,
1834 PS4_10_FN2, PS4_10_FN1,
1835 PS4_9_FN2, PS4_9_FN1,
1836 0, 0,
1837 0, 0,
1838 0, 0,
1839 0, 0,
1840 0, 0,
1841 PS4_3_FN2, PS4_3_FN1,
1842 PS4_2_FN2, PS4_2_FN1,
1843 PS4_1_FN2, PS4_1_FN1,
1844 PS4_0_FN2, PS4_0_FN1, }
1845 },
1846 { PINMUX_CFG_REG("PSEL5", 0xffec007a, 16, 1) {
1847 0, 0,
1848 0, 0,
1849 0, 0,
1850 0, 0,
1851 0, 0,
1852 0, 0,
1853 PS5_9_FN1, PS5_9_FN2,
1854 PS5_8_FN1, PS5_8_FN2,
1855 PS5_7_FN1, PS5_7_FN2,
1856 PS5_6_FN1, PS5_6_FN2,
1857 PS5_5_FN1, PS5_5_FN2,
1858 0, 0,
1859 0, 0,
1860 0, 0,
1861 0, 0,
1862 0, 0, }
1863 },
1864 { PINMUX_CFG_REG("PSEL6", 0xffec007c, 16, 1) {
1865 0, 0,
1866 0, 0,
1867 0, 0,
1868 0, 0,
1869 0, 0,
1870 0, 0,
1871 0, 0,
1872 0, 0,
1873 PS6_7_FN_AN, PS6_7_FN_EV,
1874 PS6_6_FN_AN, PS6_6_FN_EV,
1875 PS6_5_FN_AN, PS6_5_FN_EV,
1876 PS6_4_FN_AN, PS6_4_FN_EV,
1877 PS6_3_FN_AN, PS6_3_FN_EV,
1878 PS6_2_FN_AN, PS6_2_FN_EV,
1879 PS6_1_FN_AN, PS6_1_FN_EV,
1880 PS6_0_FN_AN, PS6_0_FN_EV, }
1881 },
1882 {}
1883};
1884
1885static struct pinmux_data_reg pinmux_data_regs[] = {
1886 { PINMUX_DATA_REG("PADR", 0xffec0034, 8) {
1887 PTA7_DATA, PTA6_DATA, PTA5_DATA, PTA4_DATA,
1888 PTA3_DATA, PTA2_DATA, PTA1_DATA, PTA0_DATA }
1889 },
1890 { PINMUX_DATA_REG("PBDR", 0xffec0036, 8) {
1891 PTB7_DATA, PTB6_DATA, PTB5_DATA, PTB4_DATA,
1892 PTB3_DATA, PTB2_DATA, PTB1_DATA, PTB0_DATA }
1893 },
1894 { PINMUX_DATA_REG("PCDR", 0xffec0038, 8) {
1895 PTC7_DATA, PTC6_DATA, PTC5_DATA, PTC4_DATA,
1896 PTC3_DATA, PTC2_DATA, PTC1_DATA, PTC0_DATA }
1897 },
1898 { PINMUX_DATA_REG("PDDR", 0xffec003a, 8) {
1899 PTD7_DATA, PTD6_DATA, PTD5_DATA, PTD4_DATA,
1900 PTD3_DATA, PTD2_DATA, PTD1_DATA, PTD0_DATA }
1901 },
1902 { PINMUX_DATA_REG("PEDR", 0xffec003c, 8) {
1903 PTE7_DATA, PTE6_DATA, PTE5_DATA, PTE4_DATA,
1904 PTE3_DATA, PTE2_DATA, PTE1_DATA, PTE0_DATA }
1905 },
1906 { PINMUX_DATA_REG("PFDR", 0xffec003e, 8) {
1907 PTF7_DATA, PTF6_DATA, PTF5_DATA, PTF4_DATA,
1908 PTF3_DATA, PTF2_DATA, PTF1_DATA, PTF0_DATA }
1909 },
1910 { PINMUX_DATA_REG("PGDR", 0xffec0040, 8) {
1911 PTG7_DATA, PTG6_DATA, PTG5_DATA, PTG4_DATA,
1912 PTG3_DATA, PTG2_DATA, PTG1_DATA, PTG0_DATA }
1913 },
1914 { PINMUX_DATA_REG("PHDR", 0xffec0042, 8) {
1915 PTH7_DATA, PTH6_DATA, PTH5_DATA, PTH4_DATA,
1916 PTH3_DATA, PTH2_DATA, PTH1_DATA, PTH0_DATA }
1917 },
1918 { PINMUX_DATA_REG("PIDR", 0xffec0044, 8) {
1919 PTI7_DATA, PTI6_DATA, PTI5_DATA, PTI4_DATA,
1920 PTI3_DATA, PTI2_DATA, PTI1_DATA, PTI0_DATA }
1921 },
1922 { PINMUX_DATA_REG("PJDR", 0xffec0046, 8) {
1923 PTJ7_DATA, PTJ6_DATA, PTJ5_DATA, PTJ4_DATA,
1924 PTJ3_DATA, PTJ2_DATA, PTJ1_DATA, PTJ0_DATA }
1925 },
1926 { PINMUX_DATA_REG("PKDR", 0xffec0048, 8) {
1927 PTK7_DATA, PTK6_DATA, PTK5_DATA, PTK4_DATA,
1928 PTK3_DATA, PTK2_DATA, PTK1_DATA, PTK0_DATA }
1929 },
1930 { PINMUX_DATA_REG("PLDR", 0xffec004a, 8) {
1931 PTL7_DATA, PTL6_DATA, PTL5_DATA, PTL4_DATA,
1932 PTL3_DATA, PTL2_DATA, PTL1_DATA, PTL0_DATA }
1933 },
1934 { PINMUX_DATA_REG("PMDR", 0xffec004c, 8) {
1935 0, PTM6_DATA, PTM5_DATA, PTM4_DATA,
1936 PTM3_DATA, PTM2_DATA, PTM1_DATA, PTM0_DATA }
1937 },
1938 { PINMUX_DATA_REG("PNDR", 0xffec004e, 8) {
1939 PTN7_DATA, PTN6_DATA, PTN5_DATA, PTN4_DATA,
1940 PTN3_DATA, PTN2_DATA, PTN1_DATA, PTN0_DATA }
1941 },
1942 { PINMUX_DATA_REG("PODR", 0xffec0050, 8) {
1943 PTO7_DATA, PTO6_DATA, PTO5_DATA, PTO4_DATA,
1944 PTO3_DATA, PTO2_DATA, PTO1_DATA, PTO0_DATA }
1945 },
1946 { PINMUX_DATA_REG("PPDR", 0xffec0052, 8) {
1947 0, PTP6_DATA, PTP5_DATA, PTP4_DATA,
1948 PTP3_DATA, PTP2_DATA, PTP1_DATA, PTP0_DATA }
1949 },
1950 { PINMUX_DATA_REG("PQDR", 0xffec0054, 8) {
1951 0, PTQ6_DATA, PTQ5_DATA, PTQ4_DATA,
1952 PTQ3_DATA, PTQ2_DATA, PTQ1_DATA, PTQ0_DATA }
1953 },
1954 { PINMUX_DATA_REG("PRDR", 0xffec0056, 8) {
1955 PTR7_DATA, PTR6_DATA, PTR5_DATA, PTR4_DATA,
1956 PTR3_DATA, PTR2_DATA, PTR1_DATA, PTR0_DATA }
1957 },
1958 { PINMUX_DATA_REG("PSDR", 0xffec0058, 8) {
1959 PTS7_DATA, PTS6_DATA, PTS5_DATA, PTS4_DATA,
1960 PTS3_DATA, PTS2_DATA, PTS1_DATA, PTS0_DATA }
1961 },
1962 { PINMUX_DATA_REG("PTDR", 0xffec005a, 8) {
1963 0, 0, PTT5_DATA, PTT4_DATA,
1964 PTT3_DATA, PTT2_DATA, PTT1_DATA, PTT0_DATA }
1965 },
1966 { PINMUX_DATA_REG("PUDR", 0xffec005c, 8) {
1967 PTU7_DATA, PTU6_DATA, PTU5_DATA, PTU4_DATA,
1968 PTU3_DATA, PTU2_DATA, PTU1_DATA, PTU0_DATA }
1969 },
1970 { PINMUX_DATA_REG("PVDR", 0xffec005e, 8) {
1971 PTV7_DATA, PTV6_DATA, PTV5_DATA, PTV4_DATA,
1972 PTV3_DATA, PTV2_DATA, PTV1_DATA, PTV0_DATA }
1973 },
1974 { PINMUX_DATA_REG("PWDR", 0xffec0060, 8) {
1975 PTW7_DATA, PTW6_DATA, PTW5_DATA, PTW4_DATA,
1976 PTW3_DATA, PTW2_DATA, PTW1_DATA, PTW0_DATA }
1977 },
1978 { PINMUX_DATA_REG("PXDR", 0xffec0062, 8) {
1979 PTX7_DATA, PTX6_DATA, PTX5_DATA, PTX4_DATA,
1980 PTX3_DATA, PTX2_DATA, PTX1_DATA, PTX0_DATA }
1981 },
1982 { PINMUX_DATA_REG("PYDR", 0xffec0064, 8) {
1983 PTY7_DATA, PTY6_DATA, PTY5_DATA, PTY4_DATA,
1984 PTY3_DATA, PTY2_DATA, PTY1_DATA, PTY0_DATA }
1985 },
1986 { PINMUX_DATA_REG("PZDR", 0xffec0066, 8) {
1987 PTZ7_DATA, PTZ6_DATA, PTZ5_DATA, PTZ4_DATA,
1988 PTZ3_DATA, PTZ2_DATA, PTZ1_DATA, PTZ0_DATA }
1989 },
1990 { },
1991};
1992
1993static struct pinmux_info sh7757_pinmux_info = {
1994 .name = "sh7757_pfc",
1995 .reserved_id = PINMUX_RESERVED,
1996 .data = { PINMUX_DATA_BEGIN, PINMUX_DATA_END },
1997 .input = { PINMUX_INPUT_BEGIN, PINMUX_INPUT_END },
1998 .input_pu = { PINMUX_INPUT_PULLUP_BEGIN, PINMUX_INPUT_PULLUP_END },
1999 .output = { PINMUX_OUTPUT_BEGIN, PINMUX_OUTPUT_END },
2000 .mark = { PINMUX_MARK_BEGIN, PINMUX_MARK_END },
2001 .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END },
2002
2003 .first_gpio = GPIO_PTA7,
2004 .last_gpio = GPIO_FN_D0,
2005
2006 .gpios = pinmux_gpios,
2007 .cfg_regs = pinmux_config_regs,
2008 .data_regs = pinmux_data_regs,
2009
2010 .gpio_data = pinmux_data,
2011 .gpio_data_size = ARRAY_SIZE(pinmux_data),
2012};
2013
2014static int __init plat_pinmux_setup(void)
2015{
2016 return register_pinmux(&sh7757_pinmux_info);
2017}
2018
2019arch_initcall(plat_pinmux_setup);
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7366.c b/arch/sh/kernel/cpu/sh4a/setup-sh7366.c
index 1a956b1beccc..4a9010bf4fd3 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7366.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7366.c
@@ -40,7 +40,7 @@ static struct platform_device iic_device = {
40}; 40};
41 41
42static struct r8a66597_platdata r8a66597_data = { 42static struct r8a66597_platdata r8a66597_data = {
43 /* This set zero to all members */ 43 .on_chip = 1,
44}; 44};
45 45
46static struct resource usb_host_resources[] = { 46static struct resource usb_host_resources[] = {
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
index cda76ebf87c3..5491b094cf05 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
@@ -13,9 +13,12 @@
13#include <linux/serial_sci.h> 13#include <linux/serial_sci.h>
14#include <linux/mm.h> 14#include <linux/mm.h>
15#include <linux/uio_driver.h> 15#include <linux/uio_driver.h>
16#include <linux/usb/m66592.h>
16#include <linux/sh_timer.h> 17#include <linux/sh_timer.h>
17#include <asm/clock.h> 18#include <asm/clock.h>
18#include <asm/mmzone.h> 19#include <asm/mmzone.h>
20#include <asm/dma-sh.h>
21#include <cpu/sh7722.h>
19 22
20static struct resource rtc_resources[] = { 23static struct resource rtc_resources[] = {
21 [0] = { 24 [0] = {
@@ -45,11 +48,18 @@ static struct platform_device rtc_device = {
45 .id = -1, 48 .id = -1,
46 .num_resources = ARRAY_SIZE(rtc_resources), 49 .num_resources = ARRAY_SIZE(rtc_resources),
47 .resource = rtc_resources, 50 .resource = rtc_resources,
51 .archdata = {
52 .hwblk_id = HWBLK_RTC,
53 },
54};
55
56static struct m66592_platdata usbf_platdata = {
57 .on_chip = 1,
48}; 58};
49 59
50static struct resource usbf_resources[] = { 60static struct resource usbf_resources[] = {
51 [0] = { 61 [0] = {
52 .name = "m66592_udc", 62 .name = "USBF",
53 .start = 0x04480000, 63 .start = 0x04480000,
54 .end = 0x044800FF, 64 .end = 0x044800FF,
55 .flags = IORESOURCE_MEM, 65 .flags = IORESOURCE_MEM,
@@ -67,9 +77,13 @@ static struct platform_device usbf_device = {
67 .dev = { 77 .dev = {
68 .dma_mask = NULL, 78 .dma_mask = NULL,
69 .coherent_dma_mask = 0xffffffff, 79 .coherent_dma_mask = 0xffffffff,
80 .platform_data = &usbf_platdata,
70 }, 81 },
71 .num_resources = ARRAY_SIZE(usbf_resources), 82 .num_resources = ARRAY_SIZE(usbf_resources),
72 .resource = usbf_resources, 83 .resource = usbf_resources,
84 .archdata = {
85 .hwblk_id = HWBLK_USBF,
86 },
73}; 87};
74 88
75static struct resource iic_resources[] = { 89static struct resource iic_resources[] = {
@@ -91,6 +105,9 @@ static struct platform_device iic_device = {
91 .id = 0, /* "i2c0" clock */ 105 .id = 0, /* "i2c0" clock */
92 .num_resources = ARRAY_SIZE(iic_resources), 106 .num_resources = ARRAY_SIZE(iic_resources),
93 .resource = iic_resources, 107 .resource = iic_resources,
108 .archdata = {
109 .hwblk_id = HWBLK_IIC,
110 },
94}; 111};
95 112
96static struct uio_info vpu_platform_data = { 113static struct uio_info vpu_platform_data = {
@@ -119,6 +136,9 @@ static struct platform_device vpu_device = {
119 }, 136 },
120 .resource = vpu_resources, 137 .resource = vpu_resources,
121 .num_resources = ARRAY_SIZE(vpu_resources), 138 .num_resources = ARRAY_SIZE(vpu_resources),
139 .archdata = {
140 .hwblk_id = HWBLK_VPU,
141 },
122}; 142};
123 143
124static struct uio_info veu_platform_data = { 144static struct uio_info veu_platform_data = {
@@ -147,6 +167,9 @@ static struct platform_device veu_device = {
147 }, 167 },
148 .resource = veu_resources, 168 .resource = veu_resources,
149 .num_resources = ARRAY_SIZE(veu_resources), 169 .num_resources = ARRAY_SIZE(veu_resources),
170 .archdata = {
171 .hwblk_id = HWBLK_VEU,
172 },
150}; 173};
151 174
152static struct uio_info jpu_platform_data = { 175static struct uio_info jpu_platform_data = {
@@ -175,6 +198,9 @@ static struct platform_device jpu_device = {
175 }, 198 },
176 .resource = jpu_resources, 199 .resource = jpu_resources,
177 .num_resources = ARRAY_SIZE(jpu_resources), 200 .num_resources = ARRAY_SIZE(jpu_resources),
201 .archdata = {
202 .hwblk_id = HWBLK_JPU,
203 },
178}; 204};
179 205
180static struct sh_timer_config cmt_platform_data = { 206static struct sh_timer_config cmt_platform_data = {
@@ -207,6 +233,9 @@ static struct platform_device cmt_device = {
207 }, 233 },
208 .resource = cmt_resources, 234 .resource = cmt_resources,
209 .num_resources = ARRAY_SIZE(cmt_resources), 235 .num_resources = ARRAY_SIZE(cmt_resources),
236 .archdata = {
237 .hwblk_id = HWBLK_CMT,
238 },
210}; 239};
211 240
212static struct sh_timer_config tmu0_platform_data = { 241static struct sh_timer_config tmu0_platform_data = {
@@ -238,6 +267,9 @@ static struct platform_device tmu0_device = {
238 }, 267 },
239 .resource = tmu0_resources, 268 .resource = tmu0_resources,
240 .num_resources = ARRAY_SIZE(tmu0_resources), 269 .num_resources = ARRAY_SIZE(tmu0_resources),
270 .archdata = {
271 .hwblk_id = HWBLK_TMU,
272 },
241}; 273};
242 274
243static struct sh_timer_config tmu1_platform_data = { 275static struct sh_timer_config tmu1_platform_data = {
@@ -269,6 +301,9 @@ static struct platform_device tmu1_device = {
269 }, 301 },
270 .resource = tmu1_resources, 302 .resource = tmu1_resources,
271 .num_resources = ARRAY_SIZE(tmu1_resources), 303 .num_resources = ARRAY_SIZE(tmu1_resources),
304 .archdata = {
305 .hwblk_id = HWBLK_TMU,
306 },
272}; 307};
273 308
274static struct sh_timer_config tmu2_platform_data = { 309static struct sh_timer_config tmu2_platform_data = {
@@ -299,6 +334,9 @@ static struct platform_device tmu2_device = {
299 }, 334 },
300 .resource = tmu2_resources, 335 .resource = tmu2_resources,
301 .num_resources = ARRAY_SIZE(tmu2_resources), 336 .num_resources = ARRAY_SIZE(tmu2_resources),
337 .archdata = {
338 .hwblk_id = HWBLK_TMU,
339 },
302}; 340};
303 341
304static struct plat_sci_port sci_platform_data[] = { 342static struct plat_sci_port sci_platform_data[] = {
@@ -336,6 +374,18 @@ static struct platform_device sci_device = {
336 }, 374 },
337}; 375};
338 376
377static struct sh_dmae_pdata dma_platform_data = {
378 .mode = 0,
379};
380
381static struct platform_device dma_device = {
382 .name = "sh-dma-engine",
383 .id = -1,
384 .dev = {
385 .platform_data = &dma_platform_data,
386 },
387};
388
339static struct platform_device *sh7722_devices[] __initdata = { 389static struct platform_device *sh7722_devices[] __initdata = {
340 &cmt_device, 390 &cmt_device,
341 &tmu0_device, 391 &tmu0_device,
@@ -348,6 +398,7 @@ static struct platform_device *sh7722_devices[] __initdata = {
348 &vpu_device, 398 &vpu_device,
349 &veu_device, 399 &veu_device,
350 &jpu_device, 400 &jpu_device,
401 &dma_device,
351}; 402};
352 403
353static int __init sh7722_devices_setup(void) 404static int __init sh7722_devices_setup(void)
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c
index b45dace9539f..4caa5a7ca86e 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c
@@ -18,6 +18,7 @@
18#include <linux/io.h> 18#include <linux/io.h>
19#include <asm/clock.h> 19#include <asm/clock.h>
20#include <asm/mmzone.h> 20#include <asm/mmzone.h>
21#include <cpu/sh7723.h>
21 22
22static struct uio_info vpu_platform_data = { 23static struct uio_info vpu_platform_data = {
23 .name = "VPU5", 24 .name = "VPU5",
@@ -45,6 +46,9 @@ static struct platform_device vpu_device = {
45 }, 46 },
46 .resource = vpu_resources, 47 .resource = vpu_resources,
47 .num_resources = ARRAY_SIZE(vpu_resources), 48 .num_resources = ARRAY_SIZE(vpu_resources),
49 .archdata = {
50 .hwblk_id = HWBLK_VPU,
51 },
48}; 52};
49 53
50static struct uio_info veu0_platform_data = { 54static struct uio_info veu0_platform_data = {
@@ -73,6 +77,9 @@ static struct platform_device veu0_device = {
73 }, 77 },
74 .resource = veu0_resources, 78 .resource = veu0_resources,
75 .num_resources = ARRAY_SIZE(veu0_resources), 79 .num_resources = ARRAY_SIZE(veu0_resources),
80 .archdata = {
81 .hwblk_id = HWBLK_VEU2H0,
82 },
76}; 83};
77 84
78static struct uio_info veu1_platform_data = { 85static struct uio_info veu1_platform_data = {
@@ -101,6 +108,9 @@ static struct platform_device veu1_device = {
101 }, 108 },
102 .resource = veu1_resources, 109 .resource = veu1_resources,
103 .num_resources = ARRAY_SIZE(veu1_resources), 110 .num_resources = ARRAY_SIZE(veu1_resources),
111 .archdata = {
112 .hwblk_id = HWBLK_VEU2H1,
113 },
104}; 114};
105 115
106static struct sh_timer_config cmt_platform_data = { 116static struct sh_timer_config cmt_platform_data = {
@@ -133,6 +143,9 @@ static struct platform_device cmt_device = {
133 }, 143 },
134 .resource = cmt_resources, 144 .resource = cmt_resources,
135 .num_resources = ARRAY_SIZE(cmt_resources), 145 .num_resources = ARRAY_SIZE(cmt_resources),
146 .archdata = {
147 .hwblk_id = HWBLK_CMT,
148 },
136}; 149};
137 150
138static struct sh_timer_config tmu0_platform_data = { 151static struct sh_timer_config tmu0_platform_data = {
@@ -164,6 +177,9 @@ static struct platform_device tmu0_device = {
164 }, 177 },
165 .resource = tmu0_resources, 178 .resource = tmu0_resources,
166 .num_resources = ARRAY_SIZE(tmu0_resources), 179 .num_resources = ARRAY_SIZE(tmu0_resources),
180 .archdata = {
181 .hwblk_id = HWBLK_TMU0,
182 },
167}; 183};
168 184
169static struct sh_timer_config tmu1_platform_data = { 185static struct sh_timer_config tmu1_platform_data = {
@@ -195,6 +211,9 @@ static struct platform_device tmu1_device = {
195 }, 211 },
196 .resource = tmu1_resources, 212 .resource = tmu1_resources,
197 .num_resources = ARRAY_SIZE(tmu1_resources), 213 .num_resources = ARRAY_SIZE(tmu1_resources),
214 .archdata = {
215 .hwblk_id = HWBLK_TMU0,
216 },
198}; 217};
199 218
200static struct sh_timer_config tmu2_platform_data = { 219static struct sh_timer_config tmu2_platform_data = {
@@ -225,6 +244,9 @@ static struct platform_device tmu2_device = {
225 }, 244 },
226 .resource = tmu2_resources, 245 .resource = tmu2_resources,
227 .num_resources = ARRAY_SIZE(tmu2_resources), 246 .num_resources = ARRAY_SIZE(tmu2_resources),
247 .archdata = {
248 .hwblk_id = HWBLK_TMU0,
249 },
228}; 250};
229 251
230static struct sh_timer_config tmu3_platform_data = { 252static struct sh_timer_config tmu3_platform_data = {
@@ -255,6 +277,9 @@ static struct platform_device tmu3_device = {
255 }, 277 },
256 .resource = tmu3_resources, 278 .resource = tmu3_resources,
257 .num_resources = ARRAY_SIZE(tmu3_resources), 279 .num_resources = ARRAY_SIZE(tmu3_resources),
280 .archdata = {
281 .hwblk_id = HWBLK_TMU1,
282 },
258}; 283};
259 284
260static struct sh_timer_config tmu4_platform_data = { 285static struct sh_timer_config tmu4_platform_data = {
@@ -285,6 +310,9 @@ static struct platform_device tmu4_device = {
285 }, 310 },
286 .resource = tmu4_resources, 311 .resource = tmu4_resources,
287 .num_resources = ARRAY_SIZE(tmu4_resources), 312 .num_resources = ARRAY_SIZE(tmu4_resources),
313 .archdata = {
314 .hwblk_id = HWBLK_TMU1,
315 },
288}; 316};
289 317
290static struct sh_timer_config tmu5_platform_data = { 318static struct sh_timer_config tmu5_platform_data = {
@@ -315,6 +343,9 @@ static struct platform_device tmu5_device = {
315 }, 343 },
316 .resource = tmu5_resources, 344 .resource = tmu5_resources,
317 .num_resources = ARRAY_SIZE(tmu5_resources), 345 .num_resources = ARRAY_SIZE(tmu5_resources),
346 .archdata = {
347 .hwblk_id = HWBLK_TMU1,
348 },
318}; 349};
319 350
320static struct plat_sci_port sci_platform_data[] = { 351static struct plat_sci_port sci_platform_data[] = {
@@ -395,10 +426,13 @@ static struct platform_device rtc_device = {
395 .id = -1, 426 .id = -1,
396 .num_resources = ARRAY_SIZE(rtc_resources), 427 .num_resources = ARRAY_SIZE(rtc_resources),
397 .resource = rtc_resources, 428 .resource = rtc_resources,
429 .archdata = {
430 .hwblk_id = HWBLK_RTC,
431 },
398}; 432};
399 433
400static struct r8a66597_platdata r8a66597_data = { 434static struct r8a66597_platdata r8a66597_data = {
401 /* This set zero to all members */ 435 .on_chip = 1,
402}; 436};
403 437
404static struct resource sh7723_usb_host_resources[] = { 438static struct resource sh7723_usb_host_resources[] = {
@@ -424,6 +458,9 @@ static struct platform_device sh7723_usb_host_device = {
424 }, 458 },
425 .num_resources = ARRAY_SIZE(sh7723_usb_host_resources), 459 .num_resources = ARRAY_SIZE(sh7723_usb_host_resources),
426 .resource = sh7723_usb_host_resources, 460 .resource = sh7723_usb_host_resources,
461 .archdata = {
462 .hwblk_id = HWBLK_USB,
463 },
427}; 464};
428 465
429static struct resource iic_resources[] = { 466static struct resource iic_resources[] = {
@@ -445,6 +482,9 @@ static struct platform_device iic_device = {
445 .id = 0, /* "i2c0" clock */ 482 .id = 0, /* "i2c0" clock */
446 .num_resources = ARRAY_SIZE(iic_resources), 483 .num_resources = ARRAY_SIZE(iic_resources),
447 .resource = iic_resources, 484 .resource = iic_resources,
485 .archdata = {
486 .hwblk_id = HWBLK_IIC,
487 },
448}; 488};
449 489
450static struct platform_device *sh7723_devices[] __initdata = { 490static struct platform_device *sh7723_devices[] __initdata = {
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c
index a04edaab9a29..f3851fd757ec 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c
@@ -22,6 +22,7 @@
22#include <linux/io.h> 22#include <linux/io.h>
23#include <asm/clock.h> 23#include <asm/clock.h>
24#include <asm/mmzone.h> 24#include <asm/mmzone.h>
25#include <cpu/sh7724.h>
25 26
26/* Serial */ 27/* Serial */
27static struct plat_sci_port sci_platform_data[] = { 28static struct plat_sci_port sci_platform_data[] = {
@@ -103,6 +104,9 @@ static struct platform_device rtc_device = {
103 .id = -1, 104 .id = -1,
104 .num_resources = ARRAY_SIZE(rtc_resources), 105 .num_resources = ARRAY_SIZE(rtc_resources),
105 .resource = rtc_resources, 106 .resource = rtc_resources,
107 .archdata = {
108 .hwblk_id = HWBLK_RTC,
109 },
106}; 110};
107 111
108/* I2C0 */ 112/* I2C0 */
@@ -125,6 +129,9 @@ static struct platform_device iic0_device = {
125 .id = 0, /* "i2c0" clock */ 129 .id = 0, /* "i2c0" clock */
126 .num_resources = ARRAY_SIZE(iic0_resources), 130 .num_resources = ARRAY_SIZE(iic0_resources),
127 .resource = iic0_resources, 131 .resource = iic0_resources,
132 .archdata = {
133 .hwblk_id = HWBLK_IIC0,
134 },
128}; 135};
129 136
130/* I2C1 */ 137/* I2C1 */
@@ -147,6 +154,9 @@ static struct platform_device iic1_device = {
147 .id = 1, /* "i2c1" clock */ 154 .id = 1, /* "i2c1" clock */
148 .num_resources = ARRAY_SIZE(iic1_resources), 155 .num_resources = ARRAY_SIZE(iic1_resources),
149 .resource = iic1_resources, 156 .resource = iic1_resources,
157 .archdata = {
158 .hwblk_id = HWBLK_IIC1,
159 },
150}; 160};
151 161
152/* VPU */ 162/* VPU */
@@ -176,6 +186,9 @@ static struct platform_device vpu_device = {
176 }, 186 },
177 .resource = vpu_resources, 187 .resource = vpu_resources,
178 .num_resources = ARRAY_SIZE(vpu_resources), 188 .num_resources = ARRAY_SIZE(vpu_resources),
189 .archdata = {
190 .hwblk_id = HWBLK_VPU,
191 },
179}; 192};
180 193
181/* VEU0 */ 194/* VEU0 */
@@ -205,6 +218,9 @@ static struct platform_device veu0_device = {
205 }, 218 },
206 .resource = veu0_resources, 219 .resource = veu0_resources,
207 .num_resources = ARRAY_SIZE(veu0_resources), 220 .num_resources = ARRAY_SIZE(veu0_resources),
221 .archdata = {
222 .hwblk_id = HWBLK_VEU0,
223 },
208}; 224};
209 225
210/* VEU1 */ 226/* VEU1 */
@@ -234,6 +250,9 @@ static struct platform_device veu1_device = {
234 }, 250 },
235 .resource = veu1_resources, 251 .resource = veu1_resources,
236 .num_resources = ARRAY_SIZE(veu1_resources), 252 .num_resources = ARRAY_SIZE(veu1_resources),
253 .archdata = {
254 .hwblk_id = HWBLK_VEU1,
255 },
237}; 256};
238 257
239static struct sh_timer_config cmt_platform_data = { 258static struct sh_timer_config cmt_platform_data = {
@@ -266,6 +285,9 @@ static struct platform_device cmt_device = {
266 }, 285 },
267 .resource = cmt_resources, 286 .resource = cmt_resources,
268 .num_resources = ARRAY_SIZE(cmt_resources), 287 .num_resources = ARRAY_SIZE(cmt_resources),
288 .archdata = {
289 .hwblk_id = HWBLK_CMT,
290 },
269}; 291};
270 292
271static struct sh_timer_config tmu0_platform_data = { 293static struct sh_timer_config tmu0_platform_data = {
@@ -297,6 +319,9 @@ static struct platform_device tmu0_device = {
297 }, 319 },
298 .resource = tmu0_resources, 320 .resource = tmu0_resources,
299 .num_resources = ARRAY_SIZE(tmu0_resources), 321 .num_resources = ARRAY_SIZE(tmu0_resources),
322 .archdata = {
323 .hwblk_id = HWBLK_TMU0,
324 },
300}; 325};
301 326
302static struct sh_timer_config tmu1_platform_data = { 327static struct sh_timer_config tmu1_platform_data = {
@@ -328,6 +353,9 @@ static struct platform_device tmu1_device = {
328 }, 353 },
329 .resource = tmu1_resources, 354 .resource = tmu1_resources,
330 .num_resources = ARRAY_SIZE(tmu1_resources), 355 .num_resources = ARRAY_SIZE(tmu1_resources),
356 .archdata = {
357 .hwblk_id = HWBLK_TMU0,
358 },
331}; 359};
332 360
333static struct sh_timer_config tmu2_platform_data = { 361static struct sh_timer_config tmu2_platform_data = {
@@ -358,6 +386,9 @@ static struct platform_device tmu2_device = {
358 }, 386 },
359 .resource = tmu2_resources, 387 .resource = tmu2_resources,
360 .num_resources = ARRAY_SIZE(tmu2_resources), 388 .num_resources = ARRAY_SIZE(tmu2_resources),
389 .archdata = {
390 .hwblk_id = HWBLK_TMU0,
391 },
361}; 392};
362 393
363 394
@@ -389,6 +420,9 @@ static struct platform_device tmu3_device = {
389 }, 420 },
390 .resource = tmu3_resources, 421 .resource = tmu3_resources,
391 .num_resources = ARRAY_SIZE(tmu3_resources), 422 .num_resources = ARRAY_SIZE(tmu3_resources),
423 .archdata = {
424 .hwblk_id = HWBLK_TMU1,
425 },
392}; 426};
393 427
394static struct sh_timer_config tmu4_platform_data = { 428static struct sh_timer_config tmu4_platform_data = {
@@ -419,6 +453,9 @@ static struct platform_device tmu4_device = {
419 }, 453 },
420 .resource = tmu4_resources, 454 .resource = tmu4_resources,
421 .num_resources = ARRAY_SIZE(tmu4_resources), 455 .num_resources = ARRAY_SIZE(tmu4_resources),
456 .archdata = {
457 .hwblk_id = HWBLK_TMU1,
458 },
422}; 459};
423 460
424static struct sh_timer_config tmu5_platform_data = { 461static struct sh_timer_config tmu5_platform_data = {
@@ -449,6 +486,9 @@ static struct platform_device tmu5_device = {
449 }, 486 },
450 .resource = tmu5_resources, 487 .resource = tmu5_resources,
451 .num_resources = ARRAY_SIZE(tmu5_resources), 488 .num_resources = ARRAY_SIZE(tmu5_resources),
489 .archdata = {
490 .hwblk_id = HWBLK_TMU1,
491 },
452}; 492};
453 493
454/* JPU */ 494/* JPU */
@@ -478,6 +518,9 @@ static struct platform_device jpu_device = {
478 }, 518 },
479 .resource = jpu_resources, 519 .resource = jpu_resources,
480 .num_resources = ARRAY_SIZE(jpu_resources), 520 .num_resources = ARRAY_SIZE(jpu_resources),
521 .archdata = {
522 .hwblk_id = HWBLK_JPU,
523 },
481}; 524};
482 525
483static struct platform_device *sh7724_devices[] __initdata = { 526static struct platform_device *sh7724_devices[] __initdata = {
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7757.c b/arch/sh/kernel/cpu/sh4a/setup-sh7757.c
new file mode 100644
index 000000000000..c470e15f2e03
--- /dev/null
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7757.c
@@ -0,0 +1,513 @@
1/*
2 * SH7757 Setup
3 *
4 * Copyright (C) 2009 Renesas Solutions Corp.
5 *
6 * based on setup-sh7785.c : Copyright (C) 2007 Paul Mundt
7 *
8 * This file is subject to the terms and conditions of the GNU General Public
9 * License. See the file "COPYING" in the main directory of this archive
10 * for more details.
11 */
12#include <linux/platform_device.h>
13#include <linux/init.h>
14#include <linux/serial.h>
15#include <linux/serial_sci.h>
16#include <linux/io.h>
17#include <linux/mm.h>
18#include <linux/sh_timer.h>
19
20static struct sh_timer_config tmu0_platform_data = {
21 .name = "TMU0",
22 .channel_offset = 0x04,
23 .timer_bit = 0,
24 .clk = "peripheral_clk",
25 .clockevent_rating = 200,
26};
27
28static struct resource tmu0_resources[] = {
29 [0] = {
30 .name = "TMU0",
31 .start = 0xfe430008,
32 .end = 0xfe430013,
33 .flags = IORESOURCE_MEM,
34 },
35 [1] = {
36 .start = 28,
37 .flags = IORESOURCE_IRQ,
38 },
39};
40
41static struct platform_device tmu0_device = {
42 .name = "sh_tmu",
43 .id = 0,
44 .dev = {
45 .platform_data = &tmu0_platform_data,
46 },
47 .resource = tmu0_resources,
48 .num_resources = ARRAY_SIZE(tmu0_resources),
49};
50
51static struct sh_timer_config tmu1_platform_data = {
52 .name = "TMU1",
53 .channel_offset = 0x10,
54 .timer_bit = 1,
55 .clk = "peripheral_clk",
56 .clocksource_rating = 200,
57};
58
59static struct resource tmu1_resources[] = {
60 [0] = {
61 .name = "TMU1",
62 .start = 0xfe430014,
63 .end = 0xfe43001f,
64 .flags = IORESOURCE_MEM,
65 },
66 [1] = {
67 .start = 29,
68 .flags = IORESOURCE_IRQ,
69 },
70};
71
72static struct platform_device tmu1_device = {
73 .name = "sh_tmu",
74 .id = 1,
75 .dev = {
76 .platform_data = &tmu1_platform_data,
77 },
78 .resource = tmu1_resources,
79 .num_resources = ARRAY_SIZE(tmu1_resources),
80};
81
82static struct plat_sci_port sci_platform_data[] = {
83 {
84 .mapbase = 0xfe4b0000, /* SCIF2 */
85 .flags = UPF_BOOT_AUTOCONF,
86 .type = PORT_SCIF,
87 .irqs = { 40, 40, 40, 40 },
88 }, {
89 .mapbase = 0xfe4c0000, /* SCIF3 */
90 .flags = UPF_BOOT_AUTOCONF,
91 .type = PORT_SCIF,
92 .irqs = { 76, 76, 76, 76 },
93 }, {
94 .mapbase = 0xfe4d0000, /* SCIF4 */
95 .flags = UPF_BOOT_AUTOCONF,
96 .type = PORT_SCIF,
97 .irqs = { 104, 104, 104, 104 },
98 }, {
99 .flags = 0,
100 }
101};
102
103static struct platform_device sci_device = {
104 .name = "sh-sci",
105 .id = -1,
106 .dev = {
107 .platform_data = sci_platform_data,
108 },
109};
110
111static struct platform_device *sh7757_devices[] __initdata = {
112 &tmu0_device,
113 &tmu1_device,
114 &sci_device,
115};
116
117static int __init sh7757_devices_setup(void)
118{
119 return platform_add_devices(sh7757_devices,
120 ARRAY_SIZE(sh7757_devices));
121}
122arch_initcall(sh7757_devices_setup);
123
124enum {
125 UNUSED = 0,
126
127 /* interrupt sources */
128
129 IRL0_LLLL, IRL0_LLLH, IRL0_LLHL, IRL0_LLHH,
130 IRL0_LHLL, IRL0_LHLH, IRL0_LHHL, IRL0_LHHH,
131 IRL0_HLLL, IRL0_HLLH, IRL0_HLHL, IRL0_HLHH,
132 IRL0_HHLL, IRL0_HHLH, IRL0_HHHL,
133
134 IRL4_LLLL, IRL4_LLLH, IRL4_LLHL, IRL4_LLHH,
135 IRL4_LHLL, IRL4_LHLH, IRL4_LHHL, IRL4_LHHH,
136 IRL4_HLLL, IRL4_HLLH, IRL4_HLHL, IRL4_HLHH,
137 IRL4_HHLL, IRL4_HHLH, IRL4_HHHL,
138 IRQ0, IRQ1, IRQ2, IRQ3, IRQ4, IRQ5, IRQ6, IRQ7,
139
140 SDHI,
141 DVC,
142 IRQ8, IRQ9, IRQ10,
143 WDT0,
144 TMU0, TMU1, TMU2, TMU2_TICPI,
145 HUDI,
146
147 ARC4,
148 DMAC0,
149 IRQ11,
150 SCIF2,
151 DMAC1_6,
152 USB0,
153 IRQ12,
154 JMC,
155 SPI1,
156 IRQ13, IRQ14,
157 USB1,
158 TMR01, TMR23, TMR45,
159 WDT1,
160 FRT,
161 LPC,
162 SCIF0, SCIF1, SCIF3,
163 PECI0I, PECI1I, PECI2I,
164 IRQ15,
165 ETHERC,
166 SPI0,
167 ADC1,
168 DMAC1_8,
169 SIM,
170 TMU3, TMU4, TMU5,
171 ADC0,
172 SCIF4,
173 IIC0_0, IIC0_1, IIC0_2, IIC0_3,
174 IIC1_0, IIC1_1, IIC1_2, IIC1_3,
175 IIC2_0, IIC2_1, IIC2_2, IIC2_3,
176 IIC3_0, IIC3_1, IIC3_2, IIC3_3,
177 IIC4_0, IIC4_1, IIC4_2, IIC4_3,
178 IIC5_0, IIC5_1, IIC5_2, IIC5_3,
179 IIC6_0, IIC6_1, IIC6_2, IIC6_3,
180 IIC7_0, IIC7_1, IIC7_2, IIC7_3,
181 IIC8_0, IIC8_1, IIC8_2, IIC8_3,
182 IIC9_0, IIC9_1, IIC9_2, IIC9_3,
183 PCIINTA,
184 PCIE,
185 SGPIO,
186
187 /* interrupt groups */
188
189 TMU012, TMU345,
190};
191
192static struct intc_vect vectors[] __initdata = {
193 INTC_VECT(SDHI, 0x480), INTC_VECT(SDHI, 0x04a0),
194 INTC_VECT(SDHI, 0x4c0),
195 INTC_VECT(DVC, 0x4e0),
196 INTC_VECT(IRQ8, 0x500), INTC_VECT(IRQ9, 0x520),
197 INTC_VECT(IRQ10, 0x540),
198 INTC_VECT(WDT0, 0x560),
199 INTC_VECT(TMU0, 0x580), INTC_VECT(TMU1, 0x5a0),
200 INTC_VECT(TMU2, 0x5c0), INTC_VECT(TMU2_TICPI, 0x5e0),
201 INTC_VECT(HUDI, 0x600),
202 INTC_VECT(ARC4, 0x620),
203 INTC_VECT(DMAC0, 0x640), INTC_VECT(DMAC0, 0x660),
204 INTC_VECT(DMAC0, 0x680), INTC_VECT(DMAC0, 0x6a0),
205 INTC_VECT(DMAC0, 0x6c0),
206 INTC_VECT(IRQ11, 0x6e0),
207 INTC_VECT(SCIF2, 0x700), INTC_VECT(SCIF2, 0x720),
208 INTC_VECT(SCIF2, 0x740), INTC_VECT(SCIF2, 0x760),
209 INTC_VECT(DMAC0, 0x780), INTC_VECT(DMAC0, 0x7a0),
210 INTC_VECT(DMAC1_6, 0x7c0), INTC_VECT(DMAC1_6, 0x7e0),
211 INTC_VECT(USB0, 0x840),
212 INTC_VECT(IRQ12, 0x880),
213 INTC_VECT(JMC, 0x8a0),
214 INTC_VECT(SPI1, 0x8c0),
215 INTC_VECT(IRQ13, 0x8e0), INTC_VECT(IRQ14, 0x900),
216 INTC_VECT(USB1, 0x920),
217 INTC_VECT(TMR01, 0xa00), INTC_VECT(TMR23, 0xa20),
218 INTC_VECT(TMR45, 0xa40),
219 INTC_VECT(WDT1, 0xa60),
220 INTC_VECT(FRT, 0xa80),
221 INTC_VECT(LPC, 0xaa0), INTC_VECT(LPC, 0xac0),
222 INTC_VECT(LPC, 0xae0), INTC_VECT(LPC, 0xb00),
223 INTC_VECT(LPC, 0xb20),
224 INTC_VECT(SCIF0, 0xb40), INTC_VECT(SCIF1, 0xb60),
225 INTC_VECT(SCIF3, 0xb80), INTC_VECT(SCIF3, 0xba0),
226 INTC_VECT(SCIF3, 0xbc0), INTC_VECT(SCIF3, 0xbe0),
227 INTC_VECT(PECI0I, 0xc00), INTC_VECT(PECI1I, 0xc20),
228 INTC_VECT(PECI2I, 0xc40),
229 INTC_VECT(IRQ15, 0xc60),
230 INTC_VECT(ETHERC, 0xc80), INTC_VECT(ETHERC, 0xca0),
231 INTC_VECT(SPI0, 0xcc0),
232 INTC_VECT(ADC1, 0xce0),
233 INTC_VECT(DMAC1_8, 0xd00), INTC_VECT(DMAC1_8, 0xd20),
234 INTC_VECT(DMAC1_8, 0xd40), INTC_VECT(DMAC1_8, 0xd60),
235 INTC_VECT(SIM, 0xd80), INTC_VECT(SIM, 0xda0),
236 INTC_VECT(SIM, 0xdc0), INTC_VECT(SIM, 0xde0),
237 INTC_VECT(TMU3, 0xe00), INTC_VECT(TMU4, 0xe20),
238 INTC_VECT(TMU5, 0xe40),
239 INTC_VECT(ADC0, 0xe60),
240 INTC_VECT(SCIF4, 0xf00), INTC_VECT(SCIF4, 0xf20),
241 INTC_VECT(SCIF4, 0xf40), INTC_VECT(SCIF4, 0xf60),
242 INTC_VECT(IIC0_0, 0x1400), INTC_VECT(IIC0_1, 0x1420),
243 INTC_VECT(IIC0_2, 0x1440), INTC_VECT(IIC0_3, 0x1460),
244 INTC_VECT(IIC1_0, 0x1480), INTC_VECT(IIC1_1, 0x14e0),
245 INTC_VECT(IIC1_2, 0x1500), INTC_VECT(IIC1_3, 0x1520),
246 INTC_VECT(IIC2_0, 0x1540), INTC_VECT(IIC2_1, 0x1560),
247 INTC_VECT(IIC2_2, 0x1580), INTC_VECT(IIC2_3, 0x1600),
248 INTC_VECT(IIC3_0, 0x1620), INTC_VECT(IIC3_1, 0x1640),
249 INTC_VECT(IIC3_2, 0x16e0), INTC_VECT(IIC3_3, 0x1700),
250 INTC_VECT(IIC4_0, 0x17c0), INTC_VECT(IIC4_1, 0x1800),
251 INTC_VECT(IIC4_2, 0x1820), INTC_VECT(IIC4_3, 0x1840),
252 INTC_VECT(IIC5_0, 0x1860), INTC_VECT(IIC5_1, 0x1880),
253 INTC_VECT(IIC5_2, 0x18a0), INTC_VECT(IIC5_3, 0x18c0),
254 INTC_VECT(IIC6_0, 0x18e0), INTC_VECT(IIC6_1, 0x1900),
255 INTC_VECT(IIC6_2, 0x1920), INTC_VECT(IIC6_3, 0x1980),
256 INTC_VECT(IIC7_0, 0x19a0), INTC_VECT(IIC7_1, 0x1a00),
257 INTC_VECT(IIC7_2, 0x1a20), INTC_VECT(IIC7_3, 0x1a40),
258 INTC_VECT(IIC8_0, 0x1a60), INTC_VECT(IIC8_1, 0x1a80),
259 INTC_VECT(IIC8_2, 0x1aa0), INTC_VECT(IIC8_3, 0x1b40),
260 INTC_VECT(IIC9_0, 0x1b60), INTC_VECT(IIC9_1, 0x1b80),
261 INTC_VECT(IIC9_2, 0x1c00), INTC_VECT(IIC9_3, 0x1c20),
262 INTC_VECT(PCIINTA, 0x1ce0),
263 INTC_VECT(PCIE, 0x1e00),
264 INTC_VECT(SGPIO, 0x1f80),
265 INTC_VECT(SGPIO, 0x1fa0),
266};
267
268static struct intc_group groups[] __initdata = {
269 INTC_GROUP(TMU012, TMU0, TMU1, TMU2, TMU2_TICPI),
270 INTC_GROUP(TMU345, TMU3, TMU4, TMU5),
271};
272
273static struct intc_mask_reg mask_registers[] __initdata = {
274 { 0xffd00044, 0xffd00064, 32, /* INTMSK0 / INTMSKCLR0 */
275 { IRQ0, IRQ1, IRQ2, IRQ3, IRQ4, IRQ5, IRQ6, IRQ7 } },
276
277 { 0xffd40080, 0xffd40084, 32, /* INTMSK2 / INTMSKCLR2 */
278 { IRL0_LLLL, IRL0_LLLH, IRL0_LLHL, IRL0_LLHH,
279 IRL0_LHLL, IRL0_LHLH, IRL0_LHHL, IRL0_LHHH,
280 IRL0_HLLL, IRL0_HLLH, IRL0_HLHL, IRL0_HLHH,
281 IRL0_HHLL, IRL0_HHLH, IRL0_HHHL, 0,
282 IRL4_LLLL, IRL4_LLLH, IRL4_LLHL, IRL4_LLHH,
283 IRL4_LHLL, IRL4_LHLH, IRL4_LHHL, IRL4_LHHH,
284 IRL4_HLLL, IRL4_HLLH, IRL4_HLHL, IRL4_HLHH,
285 IRL4_HHLL, IRL4_HHLH, IRL4_HHHL, 0, } },
286
287 { 0xffd40038, 0xffd4003c, 32, /* INT2MSKR / INT2MSKCR */
288 { 0, 0, 0, 0, 0, 0, 0, 0,
289 0, DMAC1_8, 0, PECI0I, LPC, FRT, WDT1, TMR45,
290 TMR23, TMR01, 0, 0, 0, 0, 0, DMAC0,
291 HUDI, 0, WDT0, SCIF3, SCIF2, SDHI, TMU345, TMU012
292 } },
293
294 { 0xffd400d0, 0xffd400d4, 32, /* INT2MSKR1 / INT2MSKCR1 */
295 { IRQ15, IRQ14, IRQ13, IRQ12, IRQ11, IRQ10, SCIF4, ETHERC,
296 IRQ9, IRQ8, SCIF1, SCIF0, USB0, 0, 0, USB1,
297 ADC1, 0, DMAC1_6, ADC0, SPI0, SIM, PECI2I, PECI1I,
298 ARC4, 0, SPI1, JMC, 0, 0, 0, DVC
299 } },
300
301 { 0xffd10038, 0xffd1003c, 32, /* INT2MSKR2 / INT2MSKCR2 */
302 { IIC4_1, IIC4_2, IIC5_0, 0, 0, 0, SGPIO, 0,
303 0, 0, 0, IIC9_2, IIC8_2, IIC8_1, IIC8_0, IIC7_3,
304 IIC7_2, IIC7_1, IIC6_3, IIC0_0, IIC0_1, IIC0_2, IIC0_3, IIC3_1,
305 IIC2_3, 0, IIC2_1, IIC9_1, IIC3_3, IIC1_0, PCIE, IIC2_2
306 } },
307
308 { 0xffd100d0, 0xff1400d4, 32, /* INT2MSKR3 / INT2MSKCR4 */
309 { 0, IIC6_1, IIC6_0, IIC5_1, IIC3_2, IIC2_0, 0, 0,
310 IIC1_3, IIC1_2, IIC9_0, IIC8_3, IIC4_3, IIC7_0, 0, IIC6_2,
311 PCIINTA, 0, IIC4_0, 0, 0, 0, 0, IIC9_3,
312 IIC3_0, 0, IIC5_3, IIC5_2, 0, 0, 0, IIC1_1
313 } },
314};
315
316#define INTPRI 0xffd00010
317#define INT2PRI0 0xffd40000
318#define INT2PRI1 0xffd40004
319#define INT2PRI2 0xffd40008
320#define INT2PRI3 0xffd4000c
321#define INT2PRI4 0xffd40010
322#define INT2PRI5 0xffd40014
323#define INT2PRI6 0xffd40018
324#define INT2PRI7 0xffd4001c
325#define INT2PRI8 0xffd400a0
326#define INT2PRI9 0xffd400a4
327#define INT2PRI10 0xffd400a8
328#define INT2PRI11 0xffd400ac
329#define INT2PRI12 0xffd400b0
330#define INT2PRI13 0xffd400b4
331#define INT2PRI14 0xffd400b8
332#define INT2PRI15 0xffd400bc
333#define INT2PRI16 0xffd10000
334#define INT2PRI17 0xffd10004
335#define INT2PRI18 0xffd10008
336#define INT2PRI19 0xffd1000c
337#define INT2PRI20 0xffd10010
338#define INT2PRI21 0xffd10014
339#define INT2PRI22 0xffd10018
340#define INT2PRI23 0xffd1001c
341#define INT2PRI24 0xffd100a0
342#define INT2PRI25 0xffd100a4
343#define INT2PRI26 0xffd100a8
344#define INT2PRI27 0xffd100ac
345#define INT2PRI28 0xffd100b0
346#define INT2PRI29 0xffd100b4
347#define INT2PRI30 0xffd100b8
348#define INT2PRI31 0xffd100bc
349
350static struct intc_prio_reg prio_registers[] __initdata = {
351 { INTPRI, 0, 32, 4, { IRQ0, IRQ1, IRQ2, IRQ3,
352 IRQ4, IRQ5, IRQ6, IRQ7 } },
353
354 { INT2PRI0, 0, 32, 8, { TMU0, TMU1, TMU2, TMU2_TICPI } },
355 { INT2PRI1, 0, 32, 8, { TMU3, TMU4, TMU5, SDHI } },
356 { INT2PRI2, 0, 32, 8, { SCIF2, SCIF3, WDT0, IRQ8 } },
357 { INT2PRI3, 0, 32, 8, { HUDI, DMAC0, ADC0, IRQ9 } },
358 { INT2PRI4, 0, 32, 8, { IRQ10, 0, TMR01, TMR23 } },
359 { INT2PRI5, 0, 32, 8, { TMR45, WDT1, FRT, LPC } },
360 { INT2PRI6, 0, 32, 8, { PECI0I, ETHERC, DMAC1_8, 0 } },
361 { INT2PRI7, 0, 32, 8, { SCIF4, 0, IRQ11, IRQ12 } },
362 { INT2PRI8, 0, 32, 8, { 0, 0, 0, DVC } },
363 { INT2PRI9, 0, 32, 8, { ARC4, 0, SPI1, JMC } },
364 { INT2PRI10, 0, 32, 8, { SPI0, SIM, PECI2I, PECI1I } },
365 { INT2PRI11, 0, 32, 8, { ADC1, IRQ13, DMAC1_6, IRQ14 } },
366 { INT2PRI12, 0, 32, 8, { USB0, 0, IRQ15, USB1 } },
367 { INT2PRI13, 0, 32, 8, { 0, 0, SCIF1, SCIF0 } },
368
369 { INT2PRI16, 0, 32, 8, { IIC2_2, 0, 0, 0 } },
370 { INT2PRI17, 0, 32, 8, { PCIE, 0, 0, IIC1_0 } },
371 { INT2PRI18, 0, 32, 8, { IIC3_3, IIC9_1, IIC2_1, IIC1_2 } },
372 { INT2PRI19, 0, 32, 8, { IIC2_3, IIC3_1, 0, IIC1_3 } },
373 { INT2PRI20, 0, 32, 8, { IIC2_0, IIC6_3, IIC7_1, IIC7_2 } },
374 { INT2PRI21, 0, 32, 8, { IIC7_3, IIC8_0, IIC8_1, IIC8_2 } },
375 { INT2PRI22, 0, 32, 8, { IIC9_2, 0, 0, 0 } },
376 { INT2PRI23, 0, 32, 8, { 0, SGPIO, IIC3_2, IIC5_1 } },
377 { INT2PRI24, 0, 32, 8, { 0, 0, 0, IIC1_1 } },
378 { INT2PRI25, 0, 32, 8, { IIC3_0, 0, IIC5_3, IIC5_2 } },
379 { INT2PRI26, 0, 32, 8, { 0, 0, 0, IIC9_3 } },
380 { INT2PRI27, 0, 32, 8, { PCIINTA, IIC6_0, IIC4_0, IIC6_1 } },
381 { INT2PRI28, 0, 32, 8, { IIC4_3, IIC7_0, 0, IIC6_2 } },
382 { INT2PRI29, 0, 32, 8, { 0, 0, IIC9_0, IIC8_3 } },
383 { INT2PRI30, 0, 32, 8, { IIC4_1, IIC4_2, IIC5_0, 0 } },
384 { INT2PRI31, 0, 32, 8, { IIC0_0, IIC0_1, IIC0_2, IIC0_3 } },
385};
386
387static DECLARE_INTC_DESC(intc_desc, "sh7757", vectors, groups,
388 mask_registers, prio_registers, NULL);
389
390/* Support for external interrupt pins in IRQ mode */
391static struct intc_vect vectors_irq0123[] __initdata = {
392 INTC_VECT(IRQ0, 0x240), INTC_VECT(IRQ1, 0x280),
393 INTC_VECT(IRQ2, 0x2c0), INTC_VECT(IRQ3, 0x300),
394};
395
396static struct intc_vect vectors_irq4567[] __initdata = {
397 INTC_VECT(IRQ4, 0x340), INTC_VECT(IRQ5, 0x380),
398 INTC_VECT(IRQ6, 0x3c0), INTC_VECT(IRQ7, 0x200),
399};
400
401static struct intc_sense_reg sense_registers[] __initdata = {
402 { 0xffd0001c, 32, 2, /* ICR1 */ { IRQ0, IRQ1, IRQ2, IRQ3,
403 IRQ4, IRQ5, IRQ6, IRQ7 } },
404};
405
406static struct intc_mask_reg ack_registers[] __initdata = {
407 { 0xffd00024, 0, 32, /* INTREQ */
408 { IRQ0, IRQ1, IRQ2, IRQ3, IRQ4, IRQ5, IRQ6, IRQ7 } },
409};
410
411static DECLARE_INTC_DESC_ACK(intc_desc_irq0123, "sh7757-irq0123",
412 vectors_irq0123, NULL, mask_registers,
413 prio_registers, sense_registers, ack_registers);
414
415static DECLARE_INTC_DESC_ACK(intc_desc_irq4567, "sh7757-irq4567",
416 vectors_irq4567, NULL, mask_registers,
417 prio_registers, sense_registers, ack_registers);
418
419/* External interrupt pins in IRL mode */
420static struct intc_vect vectors_irl0123[] __initdata = {
421 INTC_VECT(IRL0_LLLL, 0x200), INTC_VECT(IRL0_LLLH, 0x220),
422 INTC_VECT(IRL0_LLHL, 0x240), INTC_VECT(IRL0_LLHH, 0x260),
423 INTC_VECT(IRL0_LHLL, 0x280), INTC_VECT(IRL0_LHLH, 0x2a0),
424 INTC_VECT(IRL0_LHHL, 0x2c0), INTC_VECT(IRL0_LHHH, 0x2e0),
425 INTC_VECT(IRL0_HLLL, 0x300), INTC_VECT(IRL0_HLLH, 0x320),
426 INTC_VECT(IRL0_HLHL, 0x340), INTC_VECT(IRL0_HLHH, 0x360),
427 INTC_VECT(IRL0_HHLL, 0x380), INTC_VECT(IRL0_HHLH, 0x3a0),
428 INTC_VECT(IRL0_HHHL, 0x3c0),
429};
430
431static struct intc_vect vectors_irl4567[] __initdata = {
432 INTC_VECT(IRL4_LLLL, 0xb00), INTC_VECT(IRL4_LLLH, 0xb20),
433 INTC_VECT(IRL4_LLHL, 0xb40), INTC_VECT(IRL4_LLHH, 0xb60),
434 INTC_VECT(IRL4_LHLL, 0xb80), INTC_VECT(IRL4_LHLH, 0xba0),
435 INTC_VECT(IRL4_LHHL, 0xbc0), INTC_VECT(IRL4_LHHH, 0xbe0),
436 INTC_VECT(IRL4_HLLL, 0xc00), INTC_VECT(IRL4_HLLH, 0xc20),
437 INTC_VECT(IRL4_HLHL, 0xc40), INTC_VECT(IRL4_HLHH, 0xc60),
438 INTC_VECT(IRL4_HHLL, 0xc80), INTC_VECT(IRL4_HHLH, 0xca0),
439 INTC_VECT(IRL4_HHHL, 0xcc0),
440};
441
442static DECLARE_INTC_DESC(intc_desc_irl0123, "sh7757-irl0123", vectors_irl0123,
443 NULL, mask_registers, NULL, NULL);
444
445static DECLARE_INTC_DESC(intc_desc_irl4567, "sh7757-irl4567", vectors_irl4567,
446 NULL, mask_registers, NULL, NULL);
447
448#define INTC_ICR0 0xffd00000
449#define INTC_INTMSK0 0xffd00044
450#define INTC_INTMSK1 0xffd00048
451#define INTC_INTMSK2 0xffd40080
452#define INTC_INTMSKCLR1 0xffd00068
453#define INTC_INTMSKCLR2 0xffd40084
454
455void __init plat_irq_setup(void)
456{
457 /* disable IRQ3-0 + IRQ7-4 */
458 ctrl_outl(0xff000000, INTC_INTMSK0);
459
460 /* disable IRL3-0 + IRL7-4 */
461 ctrl_outl(0xc0000000, INTC_INTMSK1);
462 ctrl_outl(0xfffefffe, INTC_INTMSK2);
463
464 /* select IRL mode for IRL3-0 + IRL7-4 */
465 ctrl_outl(ctrl_inl(INTC_ICR0) & ~0x00c00000, INTC_ICR0);
466
467 /* disable holding function, ie enable "SH-4 Mode" */
468 ctrl_outl(ctrl_inl(INTC_ICR0) | 0x00200000, INTC_ICR0);
469
470 register_intc_controller(&intc_desc);
471}
472
473void __init plat_irq_setup_pins(int mode)
474{
475 switch (mode) {
476 case IRQ_MODE_IRQ7654:
477 /* select IRQ mode for IRL7-4 */
478 ctrl_outl(ctrl_inl(INTC_ICR0) | 0x00400000, INTC_ICR0);
479 register_intc_controller(&intc_desc_irq4567);
480 break;
481 case IRQ_MODE_IRQ3210:
482 /* select IRQ mode for IRL3-0 */
483 ctrl_outl(ctrl_inl(INTC_ICR0) | 0x00800000, INTC_ICR0);
484 register_intc_controller(&intc_desc_irq0123);
485 break;
486 case IRQ_MODE_IRL7654:
487 /* enable IRL7-4 but don't provide any masking */
488 ctrl_outl(0x40000000, INTC_INTMSKCLR1);
489 ctrl_outl(0x0000fffe, INTC_INTMSKCLR2);
490 break;
491 case IRQ_MODE_IRL3210:
492 /* enable IRL0-3 but don't provide any masking */
493 ctrl_outl(0x80000000, INTC_INTMSKCLR1);
494 ctrl_outl(0xfffe0000, INTC_INTMSKCLR2);
495 break;
496 case IRQ_MODE_IRL7654_MASK:
497 /* enable IRL7-4 and mask using cpu intc controller */
498 ctrl_outl(0x40000000, INTC_INTMSKCLR1);
499 register_intc_controller(&intc_desc_irl4567);
500 break;
501 case IRQ_MODE_IRL3210_MASK:
502 /* enable IRL0-3 and mask using cpu intc controller */
503 ctrl_outl(0x80000000, INTC_INTMSKCLR1);
504 register_intc_controller(&intc_desc_irl0123);
505 break;
506 default:
507 BUG();
508 }
509}
510
511void __init plat_mem_setup(void)
512{
513}
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7780.c b/arch/sh/kernel/cpu/sh4a/setup-sh7780.c
index 2c901f446959..12ff56f19c5c 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7780.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7780.c
@@ -13,6 +13,7 @@
13#include <linux/io.h> 13#include <linux/io.h>
14#include <linux/serial_sci.h> 14#include <linux/serial_sci.h>
15#include <linux/sh_timer.h> 15#include <linux/sh_timer.h>
16#include <asm/dma-sh.h>
16 17
17static struct sh_timer_config tmu0_platform_data = { 18static struct sh_timer_config tmu0_platform_data = {
18 .name = "TMU0", 19 .name = "TMU0",
@@ -240,6 +241,18 @@ static struct platform_device sci_device = {
240 }, 241 },
241}; 242};
242 243
244static struct sh_dmae_pdata dma_platform_data = {
245 .mode = (SHDMA_MIX_IRQ | SHDMA_DMAOR1),
246};
247
248static struct platform_device dma_device = {
249 .name = "sh-dma-engine",
250 .id = -1,
251 .dev = {
252 .platform_data = &dma_platform_data,
253 },
254};
255
243static struct platform_device *sh7780_devices[] __initdata = { 256static struct platform_device *sh7780_devices[] __initdata = {
244 &tmu0_device, 257 &tmu0_device,
245 &tmu1_device, 258 &tmu1_device,
@@ -249,6 +262,7 @@ static struct platform_device *sh7780_devices[] __initdata = {
249 &tmu5_device, 262 &tmu5_device,
250 &rtc_device, 263 &rtc_device,
251 &sci_device, 264 &sci_device,
265 &dma_device,
252}; 266};
253 267
254static int __init sh7780_devices_setup(void) 268static int __init sh7780_devices_setup(void)
diff --git a/arch/sh/kernel/cpu/sh4a/setup-shx3.c b/arch/sh/kernel/cpu/sh4a/setup-shx3.c
index 07f078961c71..e848443deeb9 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-shx3.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-shx3.c
@@ -268,11 +268,7 @@ enum {
268 UNUSED = 0, 268 UNUSED = 0,
269 269
270 /* interrupt sources */ 270 /* interrupt sources */
271 IRL_LLLL, IRL_LLLH, IRL_LLHL, IRL_LLHH, 271 IRL, IRQ0, IRQ1, IRQ2, IRQ3,
272 IRL_LHLL, IRL_LHLH, IRL_LHHL, IRL_LHHH,
273 IRL_HLLL, IRL_HLLH, IRL_HLHL, IRL_HLHH,
274 IRL_HHLL, IRL_HHLH, IRL_HHHL,
275 IRQ0, IRQ1, IRQ2, IRQ3,
276 HUDII, 272 HUDII,
277 TMU0, TMU1, TMU2, TMU3, TMU4, TMU5, 273 TMU0, TMU1, TMU2, TMU3, TMU4, TMU5,
278 PCII0, PCII1, PCII2, PCII3, PCII4, 274 PCII0, PCII1, PCII2, PCII3, PCII4,
@@ -287,10 +283,7 @@ enum {
287 DMAC1_DMINT6, DMAC1_DMINT7, DMAC1_DMINT8, DMAC1_DMINT9, 283 DMAC1_DMINT6, DMAC1_DMINT7, DMAC1_DMINT8, DMAC1_DMINT9,
288 DMAC1_DMINT10, DMAC1_DMINT11, DMAC1_DMAE, 284 DMAC1_DMINT10, DMAC1_DMINT11, DMAC1_DMAE,
289 IIC, VIN0, VIN1, VCORE0, ATAPI, 285 IIC, VIN0, VIN1, VCORE0, ATAPI,
290 DTU0_TEND, DTU0_AE, DTU0_TMISS, 286 DTU0, DTU1, DTU2, DTU3,
291 DTU1_TEND, DTU1_AE, DTU1_TMISS,
292 DTU2_TEND, DTU2_AE, DTU2_TMISS,
293 DTU3_TEND, DTU3_AE, DTU3_TMISS,
294 FE0, FE1, 287 FE0, FE1,
295 GPIO0, GPIO1, GPIO2, GPIO3, 288 GPIO0, GPIO1, GPIO2, GPIO3,
296 PAM, IRM, 289 PAM, IRM,
@@ -298,8 +291,8 @@ enum {
298 INTICI4, INTICI5, INTICI6, INTICI7, 291 INTICI4, INTICI5, INTICI6, INTICI7,
299 292
300 /* interrupt groups */ 293 /* interrupt groups */
301 IRL, PCII56789, SCIF0, SCIF1, SCIF2, SCIF3, 294 PCII56789, SCIF0, SCIF1, SCIF2, SCIF3,
302 DMAC0, DMAC1, DTU0, DTU1, DTU2, DTU3, 295 DMAC0, DMAC1,
303}; 296};
304 297
305static struct intc_vect vectors[] __initdata = { 298static struct intc_vect vectors[] __initdata = {
@@ -332,14 +325,14 @@ static struct intc_vect vectors[] __initdata = {
332 INTC_VECT(IIC, 0xae0), 325 INTC_VECT(IIC, 0xae0),
333 INTC_VECT(VIN0, 0xb00), INTC_VECT(VIN1, 0xb20), 326 INTC_VECT(VIN0, 0xb00), INTC_VECT(VIN1, 0xb20),
334 INTC_VECT(VCORE0, 0xb00), INTC_VECT(ATAPI, 0xb60), 327 INTC_VECT(VCORE0, 0xb00), INTC_VECT(ATAPI, 0xb60),
335 INTC_VECT(DTU0_TEND, 0xc00), INTC_VECT(DTU0_AE, 0xc20), 328 INTC_VECT(DTU0, 0xc00), INTC_VECT(DTU0, 0xc20),
336 INTC_VECT(DTU0_TMISS, 0xc40), 329 INTC_VECT(DTU0, 0xc40),
337 INTC_VECT(DTU1_TEND, 0xc60), INTC_VECT(DTU1_AE, 0xc80), 330 INTC_VECT(DTU1, 0xc60), INTC_VECT(DTU1, 0xc80),
338 INTC_VECT(DTU1_TMISS, 0xca0), 331 INTC_VECT(DTU1, 0xca0),
339 INTC_VECT(DTU2_TEND, 0xcc0), INTC_VECT(DTU2_AE, 0xce0), 332 INTC_VECT(DTU2, 0xcc0), INTC_VECT(DTU2, 0xce0),
340 INTC_VECT(DTU2_TMISS, 0xd00), 333 INTC_VECT(DTU2, 0xd00),
341 INTC_VECT(DTU3_TEND, 0xd20), INTC_VECT(DTU3_AE, 0xd40), 334 INTC_VECT(DTU3, 0xd20), INTC_VECT(DTU3, 0xd40),
342 INTC_VECT(DTU3_TMISS, 0xd60), 335 INTC_VECT(DTU3, 0xd60),
343 INTC_VECT(FE0, 0xe00), INTC_VECT(FE1, 0xe20), 336 INTC_VECT(FE0, 0xe00), INTC_VECT(FE1, 0xe20),
344 INTC_VECT(GPIO0, 0xe40), INTC_VECT(GPIO1, 0xe60), 337 INTC_VECT(GPIO0, 0xe40), INTC_VECT(GPIO1, 0xe60),
345 INTC_VECT(GPIO2, 0xe80), INTC_VECT(GPIO3, 0xea0), 338 INTC_VECT(GPIO2, 0xe80), INTC_VECT(GPIO3, 0xea0),
@@ -351,10 +344,6 @@ static struct intc_vect vectors[] __initdata = {
351}; 344};
352 345
353static struct intc_group groups[] __initdata = { 346static struct intc_group groups[] __initdata = {
354 INTC_GROUP(IRL, IRL_LLLL, IRL_LLLH, IRL_LLHL, IRL_LLHH,
355 IRL_LHLL, IRL_LHLH, IRL_LHHL, IRL_LHHH,
356 IRL_HLLL, IRL_HLLH, IRL_HLHL, IRL_HLHH,
357 IRL_HHLL, IRL_HHLH, IRL_HHHL),
358 INTC_GROUP(PCII56789, PCII5, PCII6, PCII7, PCII8, PCII9), 347 INTC_GROUP(PCII56789, PCII5, PCII6, PCII7, PCII8, PCII9),
359 INTC_GROUP(SCIF0, SCIF0_ERI, SCIF0_RXI, SCIF0_BRI, SCIF0_TXI), 348 INTC_GROUP(SCIF0, SCIF0_ERI, SCIF0_RXI, SCIF0_BRI, SCIF0_TXI),
360 INTC_GROUP(SCIF1, SCIF1_ERI, SCIF1_RXI, SCIF1_BRI, SCIF1_TXI), 349 INTC_GROUP(SCIF1, SCIF1_ERI, SCIF1_RXI, SCIF1_BRI, SCIF1_TXI),
@@ -364,10 +353,6 @@ static struct intc_group groups[] __initdata = {
364 DMAC0_DMINT3, DMAC0_DMINT4, DMAC0_DMINT5, DMAC0_DMAE), 353 DMAC0_DMINT3, DMAC0_DMINT4, DMAC0_DMINT5, DMAC0_DMAE),
365 INTC_GROUP(DMAC1, DMAC1_DMINT6, DMAC1_DMINT7, DMAC1_DMINT8, 354 INTC_GROUP(DMAC1, DMAC1_DMINT6, DMAC1_DMINT7, DMAC1_DMINT8,
366 DMAC1_DMINT9, DMAC1_DMINT10, DMAC1_DMINT11), 355 DMAC1_DMINT9, DMAC1_DMINT10, DMAC1_DMINT11),
367 INTC_GROUP(DTU0, DTU0_TEND, DTU0_AE, DTU0_TMISS),
368 INTC_GROUP(DTU1, DTU1_TEND, DTU1_AE, DTU1_TMISS),
369 INTC_GROUP(DTU2, DTU2_TEND, DTU2_AE, DTU2_TMISS),
370 INTC_GROUP(DTU3, DTU3_TEND, DTU3_AE, DTU3_TMISS),
371}; 356};
372 357
373static struct intc_mask_reg mask_registers[] __initdata = { 358static struct intc_mask_reg mask_registers[] __initdata = {
@@ -434,14 +419,14 @@ static DECLARE_INTC_DESC(intc_desc_irq, "shx3-irq", vectors_irq, groups,
434 419
435/* External interrupt pins in IRL mode */ 420/* External interrupt pins in IRL mode */
436static struct intc_vect vectors_irl[] __initdata = { 421static struct intc_vect vectors_irl[] __initdata = {
437 INTC_VECT(IRL_LLLL, 0x200), INTC_VECT(IRL_LLLH, 0x220), 422 INTC_VECT(IRL, 0x200), INTC_VECT(IRL, 0x220),
438 INTC_VECT(IRL_LLHL, 0x240), INTC_VECT(IRL_LLHH, 0x260), 423 INTC_VECT(IRL, 0x240), INTC_VECT(IRL, 0x260),
439 INTC_VECT(IRL_LHLL, 0x280), INTC_VECT(IRL_LHLH, 0x2a0), 424 INTC_VECT(IRL, 0x280), INTC_VECT(IRL, 0x2a0),
440 INTC_VECT(IRL_LHHL, 0x2c0), INTC_VECT(IRL_LHHH, 0x2e0), 425 INTC_VECT(IRL, 0x2c0), INTC_VECT(IRL, 0x2e0),
441 INTC_VECT(IRL_HLLL, 0x300), INTC_VECT(IRL_HLLH, 0x320), 426 INTC_VECT(IRL, 0x300), INTC_VECT(IRL, 0x320),
442 INTC_VECT(IRL_HLHL, 0x340), INTC_VECT(IRL_HLHH, 0x360), 427 INTC_VECT(IRL, 0x340), INTC_VECT(IRL, 0x360),
443 INTC_VECT(IRL_HHLL, 0x380), INTC_VECT(IRL_HHLH, 0x3a0), 428 INTC_VECT(IRL, 0x380), INTC_VECT(IRL, 0x3a0),
444 INTC_VECT(IRL_HHHL, 0x3c0), 429 INTC_VECT(IRL, 0x3c0),
445}; 430};
446 431
447static DECLARE_INTC_DESC(intc_desc_irl, "shx3-irl", vectors_irl, groups, 432static DECLARE_INTC_DESC(intc_desc_irl, "shx3-irl", vectors_irl, groups,
diff --git a/arch/sh/kernel/cpu/sh4a/smp-shx3.c b/arch/sh/kernel/cpu/sh4a/smp-shx3.c
index 2b6b0d50c576..185ec3976a25 100644
--- a/arch/sh/kernel/cpu/sh4a/smp-shx3.c
+++ b/arch/sh/kernel/cpu/sh4a/smp-shx3.c
@@ -57,6 +57,8 @@ void __init plat_prepare_cpus(unsigned int max_cpus)
57{ 57{
58 int i; 58 int i;
59 59
60 local_timer_setup(0);
61
60 BUILD_BUG_ON(SMP_MSG_NR >= 8); 62 BUILD_BUG_ON(SMP_MSG_NR >= 8);
61 63
62 for (i = 0; i < SMP_MSG_NR; i++) 64 for (i = 0; i < SMP_MSG_NR; i++)
diff --git a/arch/sh/kernel/cpu/sh5/probe.c b/arch/sh/kernel/cpu/sh5/probe.c
index 92ad844b5c12..521d05b3f7ba 100644
--- a/arch/sh/kernel/cpu/sh5/probe.c
+++ b/arch/sh/kernel/cpu/sh5/probe.c
@@ -34,6 +34,8 @@ int __init detect_cpu_and_cache_system(void)
34 /* CPU.VCR aliased at CIR address on SH5-101 */ 34 /* CPU.VCR aliased at CIR address on SH5-101 */
35 boot_cpu_data.type = CPU_SH5_101; 35 boot_cpu_data.type = CPU_SH5_101;
36 36
37 boot_cpu_data.family = CPU_FAMILY_SH5;
38
37 /* 39 /*
38 * First, setup some sane values for the I-cache. 40 * First, setup some sane values for the I-cache.
39 */ 41 */
diff --git a/arch/sh/kernel/cpu/shmobile/Makefile b/arch/sh/kernel/cpu/shmobile/Makefile
index 08bfa7c7db29..a39f88ea1a85 100644
--- a/arch/sh/kernel/cpu/shmobile/Makefile
+++ b/arch/sh/kernel/cpu/shmobile/Makefile
@@ -4,3 +4,5 @@
4 4
5# Power Management & Sleep mode 5# Power Management & Sleep mode
6obj-$(CONFIG_PM) += pm.o sleep.o 6obj-$(CONFIG_PM) += pm.o sleep.o
7obj-$(CONFIG_CPU_IDLE) += cpuidle.o
8obj-$(CONFIG_PM_RUNTIME) += pm_runtime.o
diff --git a/arch/sh/kernel/cpu/shmobile/cpuidle.c b/arch/sh/kernel/cpu/shmobile/cpuidle.c
new file mode 100644
index 000000000000..1c504bd972c3
--- /dev/null
+++ b/arch/sh/kernel/cpu/shmobile/cpuidle.c
@@ -0,0 +1,113 @@
1/*
2 * arch/sh/kernel/cpu/shmobile/cpuidle.c
3 *
4 * Cpuidle support code for SuperH Mobile
5 *
6 * Copyright (C) 2009 Magnus Damm
7 *
8 * This file is subject to the terms and conditions of the GNU General Public
9 * License. See the file "COPYING" in the main directory of this archive
10 * for more details.
11 */
12#include <linux/init.h>
13#include <linux/kernel.h>
14#include <linux/io.h>
15#include <linux/suspend.h>
16#include <linux/cpuidle.h>
17#include <asm/suspend.h>
18#include <asm/uaccess.h>
19#include <asm/hwblk.h>
20
21static unsigned long cpuidle_mode[] = {
22 SUSP_SH_SLEEP, /* regular sleep mode */
23 SUSP_SH_SLEEP | SUSP_SH_SF, /* sleep mode + self refresh */
24 SUSP_SH_STANDBY | SUSP_SH_SF, /* software standby mode + self refresh */
25};
26
27static int cpuidle_sleep_enter(struct cpuidle_device *dev,
28 struct cpuidle_state *state)
29{
30 unsigned long allowed_mode = arch_hwblk_sleep_mode();
31 ktime_t before, after;
32 int requested_state = state - &dev->states[0];
33 int allowed_state;
34 int k;
35
36 /* convert allowed mode to allowed state */
37 for (k = ARRAY_SIZE(cpuidle_mode) - 1; k > 0; k--)
38 if (cpuidle_mode[k] == allowed_mode)
39 break;
40
41 allowed_state = k;
42
43 /* take the following into account for sleep mode selection:
44 * - allowed_state: best mode allowed by hardware (clock deps)
45 * - requested_state: best mode allowed by software (latencies)
46 */
47 k = min_t(int, allowed_state, requested_state);
48
49 dev->last_state = &dev->states[k];
50 before = ktime_get();
51 sh_mobile_call_standby(cpuidle_mode[k]);
52 after = ktime_get();
53 return ktime_to_ns(ktime_sub(after, before)) >> 10;
54}
55
56static struct cpuidle_device cpuidle_dev;
57static struct cpuidle_driver cpuidle_driver = {
58 .name = "sh_idle",
59 .owner = THIS_MODULE,
60};
61
62void sh_mobile_setup_cpuidle(void)
63{
64 struct cpuidle_device *dev = &cpuidle_dev;
65 struct cpuidle_state *state;
66 int i;
67
68 cpuidle_register_driver(&cpuidle_driver);
69
70 for (i = 0; i < CPUIDLE_STATE_MAX; i++) {
71 dev->states[i].name[0] = '\0';
72 dev->states[i].desc[0] = '\0';
73 }
74
75 i = CPUIDLE_DRIVER_STATE_START;
76
77 state = &dev->states[i++];
78 snprintf(state->name, CPUIDLE_NAME_LEN, "C0");
79 strncpy(state->desc, "SuperH Sleep Mode", CPUIDLE_DESC_LEN);
80 state->exit_latency = 1;
81 state->target_residency = 1 * 2;
82 state->power_usage = 3;
83 state->flags = 0;
84 state->flags |= CPUIDLE_FLAG_SHALLOW;
85 state->flags |= CPUIDLE_FLAG_TIME_VALID;
86 state->enter = cpuidle_sleep_enter;
87
88 dev->safe_state = state;
89
90 state = &dev->states[i++];
91 snprintf(state->name, CPUIDLE_NAME_LEN, "C1");
92 strncpy(state->desc, "SuperH Sleep Mode [SF]", CPUIDLE_DESC_LEN);
93 state->exit_latency = 100;
94 state->target_residency = 1 * 2;
95 state->power_usage = 1;
96 state->flags = 0;
97 state->flags |= CPUIDLE_FLAG_TIME_VALID;
98 state->enter = cpuidle_sleep_enter;
99
100 state = &dev->states[i++];
101 snprintf(state->name, CPUIDLE_NAME_LEN, "C2");
102 strncpy(state->desc, "SuperH Mobile Standby Mode [SF]", CPUIDLE_DESC_LEN);
103 state->exit_latency = 2300;
104 state->target_residency = 1 * 2;
105 state->power_usage = 1;
106 state->flags = 0;
107 state->flags |= CPUIDLE_FLAG_TIME_VALID;
108 state->enter = cpuidle_sleep_enter;
109
110 dev->state_count = i;
111
112 cpuidle_register_device(dev);
113}
diff --git a/arch/sh/kernel/cpu/shmobile/pm.c b/arch/sh/kernel/cpu/shmobile/pm.c
index 8c067adf6830..ee3c2aaf66fb 100644
--- a/arch/sh/kernel/cpu/shmobile/pm.c
+++ b/arch/sh/kernel/cpu/shmobile/pm.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * arch/sh/kernel/cpu/sh4a/pm-sh_mobile.c 2 * arch/sh/kernel/cpu/shmobile/pm.c
3 * 3 *
4 * Power management support code for SuperH Mobile 4 * Power management support code for SuperH Mobile
5 * 5 *
@@ -32,40 +32,20 @@
32 * 32 *
33 * R-standby mode is unsupported, but will be added in the future 33 * R-standby mode is unsupported, but will be added in the future
34 * U-standby mode is low priority since it needs bootloader hacks 34 * U-standby mode is low priority since it needs bootloader hacks
35 *
36 * All modes should be tied in with cpuidle. But before that can
37 * happen we need to keep track of enabled hardware blocks so we
38 * can avoid entering sleep modes that stop clocks to hardware
39 * blocks that are in use even though the cpu core is idle.
40 */ 35 */
41 36
37#define ILRAM_BASE 0xe5200000
38
42extern const unsigned char sh_mobile_standby[]; 39extern const unsigned char sh_mobile_standby[];
43extern const unsigned int sh_mobile_standby_size; 40extern const unsigned int sh_mobile_standby_size;
44 41
45static void sh_mobile_call_standby(unsigned long mode) 42void sh_mobile_call_standby(unsigned long mode)
46{ 43{
47 extern void *vbr_base; 44 void *onchip_mem = (void *)ILRAM_BASE;
48 void *onchip_mem = (void *)0xe5200000; /* ILRAM */ 45 void (*standby_onchip_mem)(unsigned long, unsigned long) = onchip_mem;
49 void (*standby_onchip_mem)(unsigned long) = onchip_mem;
50
51 /* Note: Wake up from sleep may generate exceptions!
52 * Setup VBR to point to on-chip ram if self-refresh is
53 * going to be used.
54 */
55 if (mode & SUSP_SH_SF)
56 asm volatile("ldc %0, vbr" : : "r" (onchip_mem) : "memory");
57
58 /* Copy the assembly snippet to the otherwise ununsed ILRAM */
59 memcpy(onchip_mem, sh_mobile_standby, sh_mobile_standby_size);
60 wmb();
61 ctrl_barrier();
62 46
63 /* Let assembly snippet in on-chip memory handle the rest */ 47 /* Let assembly snippet in on-chip memory handle the rest */
64 standby_onchip_mem(mode); 48 standby_onchip_mem(mode, ILRAM_BASE);
65
66 /* Put VBR back in System RAM again */
67 if (mode & SUSP_SH_SF)
68 asm volatile("ldc %0, vbr" : : "r" (&vbr_base) : "memory");
69} 49}
70 50
71static int sh_pm_enter(suspend_state_t state) 51static int sh_pm_enter(suspend_state_t state)
@@ -85,7 +65,15 @@ static struct platform_suspend_ops sh_pm_ops = {
85 65
86static int __init sh_pm_init(void) 66static int __init sh_pm_init(void)
87{ 67{
68 void *onchip_mem = (void *)ILRAM_BASE;
69
70 /* Copy the assembly snippet to the otherwise ununsed ILRAM */
71 memcpy(onchip_mem, sh_mobile_standby, sh_mobile_standby_size);
72 wmb();
73 ctrl_barrier();
74
88 suspend_set_ops(&sh_pm_ops); 75 suspend_set_ops(&sh_pm_ops);
76 sh_mobile_setup_cpuidle();
89 return 0; 77 return 0;
90} 78}
91 79
diff --git a/arch/sh/kernel/cpu/shmobile/pm_runtime.c b/arch/sh/kernel/cpu/shmobile/pm_runtime.c
new file mode 100644
index 000000000000..7c615b17e209
--- /dev/null
+++ b/arch/sh/kernel/cpu/shmobile/pm_runtime.c
@@ -0,0 +1,303 @@
1/*
2 * arch/sh/kernel/cpu/shmobile/pm_runtime.c
3 *
4 * Runtime PM support code for SuperH Mobile
5 *
6 * Copyright (C) 2009 Magnus Damm
7 *
8 * This file is subject to the terms and conditions of the GNU General Public
9 * License. See the file "COPYING" in the main directory of this archive
10 * for more details.
11 */
12#include <linux/init.h>
13#include <linux/kernel.h>
14#include <linux/io.h>
15#include <linux/pm_runtime.h>
16#include <linux/platform_device.h>
17#include <linux/mutex.h>
18#include <asm/hwblk.h>
19
20static DEFINE_SPINLOCK(hwblk_lock);
21static LIST_HEAD(hwblk_idle_list);
22static struct work_struct hwblk_work;
23
24extern struct hwblk_info *hwblk_info;
25
26static void platform_pm_runtime_not_idle(struct platform_device *pdev)
27{
28 unsigned long flags;
29
30 /* remove device from idle list */
31 spin_lock_irqsave(&hwblk_lock, flags);
32 if (test_bit(PDEV_ARCHDATA_FLAG_IDLE, &pdev->archdata.flags)) {
33 list_del(&pdev->archdata.entry);
34 __clear_bit(PDEV_ARCHDATA_FLAG_IDLE, &pdev->archdata.flags);
35 }
36 spin_unlock_irqrestore(&hwblk_lock, flags);
37}
38
39static int __platform_pm_runtime_resume(struct platform_device *pdev)
40{
41 struct device *d = &pdev->dev;
42 struct pdev_archdata *ad = &pdev->archdata;
43 int hwblk = ad->hwblk_id;
44 int ret = -ENOSYS;
45
46 dev_dbg(d, "__platform_pm_runtime_resume() [%d]\n", hwblk);
47
48 if (d->driver && d->driver->pm && d->driver->pm->runtime_resume) {
49 hwblk_enable(hwblk_info, hwblk);
50 ret = 0;
51
52 if (test_bit(PDEV_ARCHDATA_FLAG_SUSP, &ad->flags)) {
53 ret = d->driver->pm->runtime_resume(d);
54 if (!ret)
55 clear_bit(PDEV_ARCHDATA_FLAG_SUSP, &ad->flags);
56 else
57 hwblk_disable(hwblk_info, hwblk);
58 }
59 }
60
61 dev_dbg(d, "__platform_pm_runtime_resume() [%d] - returns %d\n",
62 hwblk, ret);
63
64 return ret;
65}
66
67static int __platform_pm_runtime_suspend(struct platform_device *pdev)
68{
69 struct device *d = &pdev->dev;
70 struct pdev_archdata *ad = &pdev->archdata;
71 int hwblk = ad->hwblk_id;
72 int ret = -ENOSYS;
73
74 dev_dbg(d, "__platform_pm_runtime_suspend() [%d]\n", hwblk);
75
76 if (d->driver && d->driver->pm && d->driver->pm->runtime_suspend) {
77 BUG_ON(!test_bit(PDEV_ARCHDATA_FLAG_IDLE, &ad->flags));
78
79 hwblk_enable(hwblk_info, hwblk);
80 ret = d->driver->pm->runtime_suspend(d);
81 hwblk_disable(hwblk_info, hwblk);
82
83 if (!ret) {
84 set_bit(PDEV_ARCHDATA_FLAG_SUSP, &ad->flags);
85 platform_pm_runtime_not_idle(pdev);
86 hwblk_cnt_dec(hwblk_info, hwblk, HWBLK_CNT_IDLE);
87 }
88 }
89
90 dev_dbg(d, "__platform_pm_runtime_suspend() [%d] - returns %d\n",
91 hwblk, ret);
92
93 return ret;
94}
95
96static void platform_pm_runtime_work(struct work_struct *work)
97{
98 struct platform_device *pdev;
99 unsigned long flags;
100 int ret;
101
102 /* go through the idle list and suspend one device at a time */
103 do {
104 spin_lock_irqsave(&hwblk_lock, flags);
105 if (list_empty(&hwblk_idle_list))
106 pdev = NULL;
107 else
108 pdev = list_first_entry(&hwblk_idle_list,
109 struct platform_device,
110 archdata.entry);
111 spin_unlock_irqrestore(&hwblk_lock, flags);
112
113 if (pdev) {
114 mutex_lock(&pdev->archdata.mutex);
115 ret = __platform_pm_runtime_suspend(pdev);
116
117 /* at this point the platform device may be:
118 * suspended: ret = 0, FLAG_SUSP set, clock stopped
119 * failed: ret < 0, FLAG_IDLE set, clock stopped
120 */
121 mutex_unlock(&pdev->archdata.mutex);
122 } else {
123 ret = -ENODEV;
124 }
125 } while (!ret);
126}
127
128/* this function gets called from cpuidle context when all devices in the
129 * main power domain are unused but some are counted as idle, ie the hwblk
130 * counter values are (HWBLK_CNT_USAGE == 0) && (HWBLK_CNT_IDLE != 0)
131 */
132void platform_pm_runtime_suspend_idle(void)
133{
134 queue_work(pm_wq, &hwblk_work);
135}
136
137int platform_pm_runtime_suspend(struct device *dev)
138{
139 struct platform_device *pdev = to_platform_device(dev);
140 struct pdev_archdata *ad = &pdev->archdata;
141 unsigned long flags;
142 int hwblk = ad->hwblk_id;
143 int ret = 0;
144
145 dev_dbg(dev, "platform_pm_runtime_suspend() [%d]\n", hwblk);
146
147 /* ignore off-chip platform devices */
148 if (!hwblk)
149 goto out;
150
151 /* interrupt context not allowed */
152 might_sleep();
153
154 /* catch misconfigured drivers not starting with resume */
155 if (test_bit(PDEV_ARCHDATA_FLAG_INIT, &pdev->archdata.flags)) {
156 ret = -EINVAL;
157 goto out;
158 }
159
160 /* serialize */
161 mutex_lock(&ad->mutex);
162
163 /* disable clock */
164 hwblk_disable(hwblk_info, hwblk);
165
166 /* put device on idle list */
167 spin_lock_irqsave(&hwblk_lock, flags);
168 list_add_tail(&pdev->archdata.entry, &hwblk_idle_list);
169 __set_bit(PDEV_ARCHDATA_FLAG_IDLE, &pdev->archdata.flags);
170 spin_unlock_irqrestore(&hwblk_lock, flags);
171
172 /* increase idle count */
173 hwblk_cnt_inc(hwblk_info, hwblk, HWBLK_CNT_IDLE);
174
175 /* at this point the platform device is:
176 * idle: ret = 0, FLAG_IDLE set, clock stopped
177 */
178 mutex_unlock(&ad->mutex);
179
180out:
181 dev_dbg(dev, "platform_pm_runtime_suspend() [%d] returns %d\n",
182 hwblk, ret);
183
184 return ret;
185}
186
187int platform_pm_runtime_resume(struct device *dev)
188{
189 struct platform_device *pdev = to_platform_device(dev);
190 struct pdev_archdata *ad = &pdev->archdata;
191 int hwblk = ad->hwblk_id;
192 int ret = 0;
193
194 dev_dbg(dev, "platform_pm_runtime_resume() [%d]\n", hwblk);
195
196 /* ignore off-chip platform devices */
197 if (!hwblk)
198 goto out;
199
200 /* interrupt context not allowed */
201 might_sleep();
202
203 /* serialize */
204 mutex_lock(&ad->mutex);
205
206 /* make sure device is removed from idle list */
207 platform_pm_runtime_not_idle(pdev);
208
209 /* decrease idle count */
210 if (!test_bit(PDEV_ARCHDATA_FLAG_INIT, &pdev->archdata.flags) &&
211 !test_bit(PDEV_ARCHDATA_FLAG_SUSP, &pdev->archdata.flags))
212 hwblk_cnt_dec(hwblk_info, hwblk, HWBLK_CNT_IDLE);
213
214 /* resume the device if needed */
215 ret = __platform_pm_runtime_resume(pdev);
216
217 /* the driver has been initialized now, so clear the init flag */
218 clear_bit(PDEV_ARCHDATA_FLAG_INIT, &pdev->archdata.flags);
219
220 /* at this point the platform device may be:
221 * resumed: ret = 0, flags = 0, clock started
222 * failed: ret < 0, FLAG_SUSP set, clock stopped
223 */
224 mutex_unlock(&ad->mutex);
225out:
226 dev_dbg(dev, "platform_pm_runtime_resume() [%d] returns %d\n",
227 hwblk, ret);
228
229 return ret;
230}
231
232int platform_pm_runtime_idle(struct device *dev)
233{
234 struct platform_device *pdev = to_platform_device(dev);
235 int hwblk = pdev->archdata.hwblk_id;
236 int ret = 0;
237
238 dev_dbg(dev, "platform_pm_runtime_idle() [%d]\n", hwblk);
239
240 /* ignore off-chip platform devices */
241 if (!hwblk)
242 goto out;
243
244 /* interrupt context not allowed, use pm_runtime_put()! */
245 might_sleep();
246
247 /* suspend synchronously to disable clocks immediately */
248 ret = pm_runtime_suspend(dev);
249out:
250 dev_dbg(dev, "platform_pm_runtime_idle() [%d] done!\n", hwblk);
251 return ret;
252}
253
254static int platform_bus_notify(struct notifier_block *nb,
255 unsigned long action, void *data)
256{
257 struct device *dev = data;
258 struct platform_device *pdev = to_platform_device(dev);
259 int hwblk = pdev->archdata.hwblk_id;
260
261 /* ignore off-chip platform devices */
262 if (!hwblk)
263 return 0;
264
265 switch (action) {
266 case BUS_NOTIFY_ADD_DEVICE:
267 INIT_LIST_HEAD(&pdev->archdata.entry);
268 mutex_init(&pdev->archdata.mutex);
269 /* platform devices without drivers should be disabled */
270 hwblk_enable(hwblk_info, hwblk);
271 hwblk_disable(hwblk_info, hwblk);
272 /* make sure driver re-inits itself once */
273 __set_bit(PDEV_ARCHDATA_FLAG_INIT, &pdev->archdata.flags);
274 break;
275 /* TODO: add BUS_NOTIFY_BIND_DRIVER and increase idle count */
276 case BUS_NOTIFY_BOUND_DRIVER:
277 /* keep track of number of devices in use per hwblk */
278 hwblk_cnt_inc(hwblk_info, hwblk, HWBLK_CNT_DEVICES);
279 break;
280 case BUS_NOTIFY_UNBOUND_DRIVER:
281 /* keep track of number of devices in use per hwblk */
282 hwblk_cnt_dec(hwblk_info, hwblk, HWBLK_CNT_DEVICES);
283 /* make sure driver re-inits itself once */
284 __set_bit(PDEV_ARCHDATA_FLAG_INIT, &pdev->archdata.flags);
285 break;
286 case BUS_NOTIFY_DEL_DEVICE:
287 break;
288 }
289 return 0;
290}
291
292static struct notifier_block platform_bus_notifier = {
293 .notifier_call = platform_bus_notify
294};
295
296static int __init sh_pm_runtime_init(void)
297{
298 INIT_WORK(&hwblk_work, platform_pm_runtime_work);
299
300 bus_register_notifier(&platform_bus_type, &platform_bus_notifier);
301 return 0;
302}
303core_initcall(sh_pm_runtime_init);
diff --git a/arch/sh/kernel/cpu/shmobile/sleep.S b/arch/sh/kernel/cpu/shmobile/sleep.S
index baf2d7d46b05..a439e6c7824f 100644
--- a/arch/sh/kernel/cpu/shmobile/sleep.S
+++ b/arch/sh/kernel/cpu/shmobile/sleep.S
@@ -16,19 +16,52 @@
16#include <asm/asm-offsets.h> 16#include <asm/asm-offsets.h>
17#include <asm/suspend.h> 17#include <asm/suspend.h>
18 18
19/*
20 * Kernel mode register usage, see entry.S:
21 * k0 scratch
22 * k1 scratch
23 * k4 scratch
24 */
25#define k0 r0
26#define k1 r1
27#define k4 r4
28
19/* manage self-refresh and enter standby mode. 29/* manage self-refresh and enter standby mode.
20 * this code will be copied to on-chip memory and executed from there. 30 * this code will be copied to on-chip memory and executed from there.
21 */ 31 */
22 32
23 .balign 4096,0,4096 33 .balign 4096,0,4096
24ENTRY(sh_mobile_standby) 34ENTRY(sh_mobile_standby)
35
36 /* save original vbr */
37 stc vbr, r1
38 mova saved_vbr, r0
39 mov.l r1, @r0
40
41 /* point vbr to our on-chip memory page */
42 ldc r5, vbr
43
44 /* save return address */
45 mova saved_spc, r0
46 sts pr, r5
47 mov.l r5, @r0
48
49 /* save sr */
50 mova saved_sr, r0
51 stc sr, r5
52 mov.l r5, @r0
53
54 /* save mode flags */
55 mova saved_mode, r0
56 mov.l r4, @r0
57
58 /* put mode flags in r0 */
25 mov r4, r0 59 mov r4, r0
26 60
27 tst #SUSP_SH_SF, r0 61 tst #SUSP_SH_SF, r0
28 bt skip_set_sf 62 bt skip_set_sf
29#ifdef CONFIG_CPU_SUBTYPE_SH7724 63#ifdef CONFIG_CPU_SUBTYPE_SH7724
30 /* DBSC: put memory in self-refresh mode */ 64 /* DBSC: put memory in self-refresh mode */
31
32 mov.l dben_reg, r4 65 mov.l dben_reg, r4
33 mov.l dben_data0, r1 66 mov.l dben_data0, r1
34 mov.l r1, @r4 67 mov.l r1, @r4
@@ -60,14 +93,6 @@ ENTRY(sh_mobile_standby)
60#endif 93#endif
61 94
62skip_set_sf: 95skip_set_sf:
63 tst #SUSP_SH_SLEEP, r0
64 bt test_standby
65
66 /* set mode to "sleep mode" */
67 bra do_sleep
68 mov #0x00, r1
69
70test_standby:
71 tst #SUSP_SH_STANDBY, r0 96 tst #SUSP_SH_STANDBY, r0
72 bt test_rstandby 97 bt test_rstandby
73 98
@@ -85,77 +110,107 @@ test_rstandby:
85 110
86test_ustandby: 111test_ustandby:
87 tst #SUSP_SH_USTANDBY, r0 112 tst #SUSP_SH_USTANDBY, r0
88 bt done_sleep 113 bt force_sleep
89 114
90 /* set mode to "u-standby mode" */ 115 /* set mode to "u-standby mode" */
91 mov #0x10, r1 116 bra do_sleep
117 mov #0x10, r1
92 118
93 /* fall-through */ 119force_sleep:
120
121 /* set mode to "sleep mode" */
122 mov #0x00, r1
94 123
95do_sleep: 124do_sleep:
96 /* setup and enter selected standby mode */ 125 /* setup and enter selected standby mode */
97 mov.l 5f, r4 126 mov.l 5f, r4
98 mov.l r1, @r4 127 mov.l r1, @r4
128again:
99 sleep 129 sleep
130 bra again
131 nop
132
133restore_jump_vbr:
134 /* setup spc with return address to c code */
135 mov.l saved_spc, k0
136 ldc k0, spc
137
138 /* restore vbr */
139 mov.l saved_vbr, k0
140 ldc k0, vbr
141
142 /* setup ssr with saved sr */
143 mov.l saved_sr, k0
144 ldc k0, ssr
145
146 /* get mode flags */
147 mov.l saved_mode, k0
100 148
101done_sleep: 149done_sleep:
102 /* reset standby mode to sleep mode */ 150 /* reset standby mode to sleep mode */
103 mov.l 5f, r4 151 mov.l 5f, k4
104 mov #0x00, r1 152 mov #0x00, k1
105 mov.l r1, @r4 153 mov.l k1, @k4
106 154
107 tst #SUSP_SH_SF, r0 155 tst #SUSP_SH_SF, k0
108 bt skip_restore_sf 156 bt skip_restore_sf
109 157
110#ifdef CONFIG_CPU_SUBTYPE_SH7724 158#ifdef CONFIG_CPU_SUBTYPE_SH7724
111 /* DBSC: put memory in auto-refresh mode */ 159 /* DBSC: put memory in auto-refresh mode */
160 mov.l dbrfpdn0_reg, k4
161 mov.l dbrfpdn0_data0, k1
162 mov.l k1, @k4
112 163
113 mov.l dbrfpdn0_reg, r4 164 nop /* sleep 140 ns */
114 mov.l dbrfpdn0_data0, r1
115 mov.l r1, @r4
116
117 /* sleep 140 ns */
118 nop
119 nop 165 nop
120 nop 166 nop
121 nop 167 nop
122 168
123 mov.l dbcmdcnt_reg, r4 169 mov.l dbcmdcnt_reg, k4
124 mov.l dbcmdcnt_data0, r1 170 mov.l dbcmdcnt_data0, k1
125 mov.l r1, @r4 171 mov.l k1, @k4
126 172
127 mov.l dbcmdcnt_reg, r4 173 mov.l dbcmdcnt_reg, k4
128 mov.l dbcmdcnt_data1, r1 174 mov.l dbcmdcnt_data1, k1
129 mov.l r1, @r4 175 mov.l k1, @k4
130 176
131 mov.l dben_reg, r4 177 mov.l dben_reg, k4
132 mov.l dben_data1, r1 178 mov.l dben_data1, k1
133 mov.l r1, @r4 179 mov.l k1, @k4
134 180
135 mov.l dbrfpdn0_reg, r4 181 mov.l dbrfpdn0_reg, k4
136 mov.l dbrfpdn0_data2, r1 182 mov.l dbrfpdn0_data2, k1
137 mov.l r1, @r4 183 mov.l k1, @k4
138#else 184#else
139 /* SBSC: set auto-refresh mode */ 185 /* SBSC: set auto-refresh mode */
140 mov.l 1f, r4 186 mov.l 1f, k4
141 mov.l @r4, r2 187 mov.l @k4, k0
142 mov.l 4f, r3 188 mov.l 4f, k1
143 and r3, r2 189 and k1, k0
144 mov.l r2, @r4 190 mov.l k0, @k4
145 mov.l 6f, r4 191 mov.l 6f, k4
146 mov.l 7f, r1 192 mov.l 8f, k0
147 mov.l 8f, r2 193 mov.l @k4, k1
148 mov.l @r4, r3 194 mov #-1, k4
149 mov #-1, r4 195 add k4, k1
150 add r4, r3 196 or k1, k0
151 or r2, r3 197 mov.l 7f, k1
152 mov.l r3, @r1 198 mov.l k0, @k1
153#endif 199#endif
154skip_restore_sf: 200skip_restore_sf:
155 rts 201 /* jump to vbr vector */
202 mov.l saved_vbr, k0
203 mov.l offset_vbr, k4
204 add k4, k0
205 jmp @k0
156 nop 206 nop
157 207
158 .balign 4 208 .balign 4
209saved_mode: .long 0
210saved_spc: .long 0
211saved_sr: .long 0
212saved_vbr: .long 0
213offset_vbr: .long 0x600
159#ifdef CONFIG_CPU_SUBTYPE_SH7724 214#ifdef CONFIG_CPU_SUBTYPE_SH7724
160dben_reg: .long 0xfd000010 /* DBEN */ 215dben_reg: .long 0xfd000010 /* DBEN */
161dben_data0: .long 0 216dben_data0: .long 0
@@ -178,12 +233,12 @@ dbcmdcnt_data1: .long 4
1787: .long 0xfe400018 /* RTCNT */ 2337: .long 0xfe400018 /* RTCNT */
1798: .long 0xa55a0000 2348: .long 0xa55a0000
180 235
236
181/* interrupt vector @ 0x600 */ 237/* interrupt vector @ 0x600 */
182 .balign 0x400,0,0x400 238 .balign 0x400,0,0x400
183 .long 0xdeadbeef 239 .long 0xdeadbeef
184 .balign 0x200,0,0x200 240 .balign 0x200,0,0x200
185 /* sh7722 will end up here in sleep mode */ 241 bra restore_jump_vbr
186 rte
187 nop 242 nop
188sh_mobile_standby_end: 243sh_mobile_standby_end:
189 244
diff --git a/arch/sh/kernel/cpufreq.c b/arch/sh/kernel/cpufreq.c
index e0590ffebd73..dce4f3ff0932 100644
--- a/arch/sh/kernel/cpufreq.c
+++ b/arch/sh/kernel/cpufreq.c
@@ -82,7 +82,8 @@ static int sh_cpufreq_cpu_init(struct cpufreq_policy *policy)
82 82
83 cpuclk = clk_get(NULL, "cpu_clk"); 83 cpuclk = clk_get(NULL, "cpu_clk");
84 if (IS_ERR(cpuclk)) { 84 if (IS_ERR(cpuclk)) {
85 printk(KERN_ERR "cpufreq: couldn't get CPU clk\n"); 85 printk(KERN_ERR "cpufreq: couldn't get CPU#%d clk\n",
86 policy->cpu);
86 return PTR_ERR(cpuclk); 87 return PTR_ERR(cpuclk);
87 } 88 }
88 89
@@ -95,22 +96,21 @@ static int sh_cpufreq_cpu_init(struct cpufreq_policy *policy)
95 policy->min = policy->cpuinfo.min_freq; 96 policy->min = policy->cpuinfo.min_freq;
96 policy->max = policy->cpuinfo.max_freq; 97 policy->max = policy->cpuinfo.max_freq;
97 98
98
99 /* 99 /*
100 * Catch the cases where the clock framework hasn't been wired up 100 * Catch the cases where the clock framework hasn't been wired up
101 * properly to support scaling. 101 * properly to support scaling.
102 */ 102 */
103 if (unlikely(policy->min == policy->max)) { 103 if (unlikely(policy->min == policy->max)) {
104 printk(KERN_ERR "cpufreq: clock framework rate rounding " 104 printk(KERN_ERR "cpufreq: clock framework rate rounding "
105 "not supported on this CPU.\n"); 105 "not supported on CPU#%d.\n", policy->cpu);
106 106
107 clk_put(cpuclk); 107 clk_put(cpuclk);
108 return -EINVAL; 108 return -EINVAL;
109 } 109 }
110 110
111 printk(KERN_INFO "cpufreq: Frequencies - Minimum %u.%03u MHz, " 111 printk(KERN_INFO "cpufreq: CPU#%d Frequencies - Minimum %u.%03u MHz, "
112 "Maximum %u.%03u MHz.\n", 112 "Maximum %u.%03u MHz.\n",
113 policy->min / 1000, policy->min % 1000, 113 policy->cpu, policy->min / 1000, policy->min % 1000,
114 policy->max / 1000, policy->max % 1000); 114 policy->max / 1000, policy->max % 1000);
115 115
116 return 0; 116 return 0;
diff --git a/arch/sh/kernel/dumpstack.c b/arch/sh/kernel/dumpstack.c
new file mode 100644
index 000000000000..6f5ad1513409
--- /dev/null
+++ b/arch/sh/kernel/dumpstack.c
@@ -0,0 +1,123 @@
1/*
2 * Copyright (C) 1991, 1992 Linus Torvalds
3 * Copyright (C) 2000, 2001, 2002 Andi Kleen, SuSE Labs
4 * Copyright (C) 2009 Matt Fleming
5 */
6#include <linux/kallsyms.h>
7#include <linux/ftrace.h>
8#include <linux/debug_locks.h>
9#include <asm/unwinder.h>
10#include <asm/stacktrace.h>
11
12void printk_address(unsigned long address, int reliable)
13{
14 printk(" [<%p>] %s%pS\n", (void *) address,
15 reliable ? "" : "? ", (void *) address);
16}
17
18#ifdef CONFIG_FUNCTION_GRAPH_TRACER
19static void
20print_ftrace_graph_addr(unsigned long addr, void *data,
21 const struct stacktrace_ops *ops,
22 struct thread_info *tinfo, int *graph)
23{
24 struct task_struct *task = tinfo->task;
25 unsigned long ret_addr;
26 int index = task->curr_ret_stack;
27
28 if (addr != (unsigned long)return_to_handler)
29 return;
30
31 if (!task->ret_stack || index < *graph)
32 return;
33
34 index -= *graph;
35 ret_addr = task->ret_stack[index].ret;
36
37 ops->address(data, ret_addr, 1);
38
39 (*graph)++;
40}
41#else
42static inline void
43print_ftrace_graph_addr(unsigned long addr, void *data,
44 const struct stacktrace_ops *ops,
45 struct thread_info *tinfo, int *graph)
46{ }
47#endif
48
49void
50stack_reader_dump(struct task_struct *task, struct pt_regs *regs,
51 unsigned long *sp, const struct stacktrace_ops *ops,
52 void *data)
53{
54 struct thread_info *context;
55 int graph = 0;
56
57 context = (struct thread_info *)
58 ((unsigned long)sp & (~(THREAD_SIZE - 1)));
59
60 while (!kstack_end(sp)) {
61 unsigned long addr = *sp++;
62
63 if (__kernel_text_address(addr)) {
64 ops->address(data, addr, 1);
65
66 print_ftrace_graph_addr(addr, data, ops,
67 context, &graph);
68 }
69 }
70}
71
72static void
73print_trace_warning_symbol(void *data, char *msg, unsigned long symbol)
74{
75 printk(data);
76 print_symbol(msg, symbol);
77 printk("\n");
78}
79
80static void print_trace_warning(void *data, char *msg)
81{
82 printk("%s%s\n", (char *)data, msg);
83}
84
85static int print_trace_stack(void *data, char *name)
86{
87 printk("%s <%s> ", (char *)data, name);
88 return 0;
89}
90
91/*
92 * Print one address/symbol entries per line.
93 */
94static void print_trace_address(void *data, unsigned long addr, int reliable)
95{
96 printk(data);
97 printk_address(addr, reliable);
98}
99
100static const struct stacktrace_ops print_trace_ops = {
101 .warning = print_trace_warning,
102 .warning_symbol = print_trace_warning_symbol,
103 .stack = print_trace_stack,
104 .address = print_trace_address,
105};
106
107void show_trace(struct task_struct *tsk, unsigned long *sp,
108 struct pt_regs *regs)
109{
110 if (regs && user_mode(regs))
111 return;
112
113 printk("\nCall trace:\n");
114
115 unwind_stack(tsk, regs, sp, &print_trace_ops, "");
116
117 printk("\n");
118
119 if (!tsk)
120 tsk = current;
121
122 debug_show_held_locks(tsk);
123}
diff --git a/arch/sh/kernel/dwarf.c b/arch/sh/kernel/dwarf.c
new file mode 100644
index 000000000000..03b3616c80a5
--- /dev/null
+++ b/arch/sh/kernel/dwarf.c
@@ -0,0 +1,971 @@
1/*
2 * Copyright (C) 2009 Matt Fleming <matt@console-pimps.org>
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 *
8 * This is an implementation of a DWARF unwinder. Its main purpose is
9 * for generating stacktrace information. Based on the DWARF 3
10 * specification from http://www.dwarfstd.org.
11 *
12 * TODO:
13 * - DWARF64 doesn't work.
14 * - Registers with DWARF_VAL_OFFSET rules aren't handled properly.
15 */
16
17/* #define DEBUG */
18#include <linux/kernel.h>
19#include <linux/io.h>
20#include <linux/list.h>
21#include <linux/mempool.h>
22#include <linux/mm.h>
23#include <asm/dwarf.h>
24#include <asm/unwinder.h>
25#include <asm/sections.h>
26#include <asm/unaligned.h>
27#include <asm/stacktrace.h>
28
29/* Reserve enough memory for two stack frames */
30#define DWARF_FRAME_MIN_REQ 2
31/* ... with 4 registers per frame. */
32#define DWARF_REG_MIN_REQ (DWARF_FRAME_MIN_REQ * 4)
33
34static struct kmem_cache *dwarf_frame_cachep;
35static mempool_t *dwarf_frame_pool;
36
37static struct kmem_cache *dwarf_reg_cachep;
38static mempool_t *dwarf_reg_pool;
39
40static LIST_HEAD(dwarf_cie_list);
41static DEFINE_SPINLOCK(dwarf_cie_lock);
42
43static LIST_HEAD(dwarf_fde_list);
44static DEFINE_SPINLOCK(dwarf_fde_lock);
45
46static struct dwarf_cie *cached_cie;
47
48/**
49 * dwarf_frame_alloc_reg - allocate memory for a DWARF register
50 * @frame: the DWARF frame whose list of registers we insert on
51 * @reg_num: the register number
52 *
53 * Allocate space for, and initialise, a dwarf reg from
54 * dwarf_reg_pool and insert it onto the (unsorted) linked-list of
55 * dwarf registers for @frame.
56 *
57 * Return the initialised DWARF reg.
58 */
59static struct dwarf_reg *dwarf_frame_alloc_reg(struct dwarf_frame *frame,
60 unsigned int reg_num)
61{
62 struct dwarf_reg *reg;
63
64 reg = mempool_alloc(dwarf_reg_pool, GFP_ATOMIC);
65 if (!reg) {
66 printk(KERN_WARNING "Unable to allocate a DWARF register\n");
67 /*
68 * Let's just bomb hard here, we have no way to
69 * gracefully recover.
70 */
71 UNWINDER_BUG();
72 }
73
74 reg->number = reg_num;
75 reg->addr = 0;
76 reg->flags = 0;
77
78 list_add(&reg->link, &frame->reg_list);
79
80 return reg;
81}
82
83static void dwarf_frame_free_regs(struct dwarf_frame *frame)
84{
85 struct dwarf_reg *reg, *n;
86
87 list_for_each_entry_safe(reg, n, &frame->reg_list, link) {
88 list_del(&reg->link);
89 mempool_free(reg, dwarf_reg_pool);
90 }
91}
92
93/**
94 * dwarf_frame_reg - return a DWARF register
95 * @frame: the DWARF frame to search in for @reg_num
96 * @reg_num: the register number to search for
97 *
98 * Lookup and return the dwarf reg @reg_num for this frame. Return
99 * NULL if @reg_num is an register invalid number.
100 */
101static struct dwarf_reg *dwarf_frame_reg(struct dwarf_frame *frame,
102 unsigned int reg_num)
103{
104 struct dwarf_reg *reg;
105
106 list_for_each_entry(reg, &frame->reg_list, link) {
107 if (reg->number == reg_num)
108 return reg;
109 }
110
111 return NULL;
112}
113
114/**
115 * dwarf_read_addr - read dwarf data
116 * @src: source address of data
117 * @dst: destination address to store the data to
118 *
119 * Read 'n' bytes from @src, where 'n' is the size of an address on
120 * the native machine. We return the number of bytes read, which
121 * should always be 'n'. We also have to be careful when reading
122 * from @src and writing to @dst, because they can be arbitrarily
123 * aligned. Return 'n' - the number of bytes read.
124 */
125static inline int dwarf_read_addr(unsigned long *src, unsigned long *dst)
126{
127 u32 val = get_unaligned(src);
128 put_unaligned(val, dst);
129 return sizeof(unsigned long *);
130}
131
132/**
133 * dwarf_read_uleb128 - read unsigned LEB128 data
134 * @addr: the address where the ULEB128 data is stored
135 * @ret: address to store the result
136 *
137 * Decode an unsigned LEB128 encoded datum. The algorithm is taken
138 * from Appendix C of the DWARF 3 spec. For information on the
139 * encodings refer to section "7.6 - Variable Length Data". Return
140 * the number of bytes read.
141 */
142static inline unsigned long dwarf_read_uleb128(char *addr, unsigned int *ret)
143{
144 unsigned int result;
145 unsigned char byte;
146 int shift, count;
147
148 result = 0;
149 shift = 0;
150 count = 0;
151
152 while (1) {
153 byte = __raw_readb(addr);
154 addr++;
155 count++;
156
157 result |= (byte & 0x7f) << shift;
158 shift += 7;
159
160 if (!(byte & 0x80))
161 break;
162 }
163
164 *ret = result;
165
166 return count;
167}
168
169/**
170 * dwarf_read_leb128 - read signed LEB128 data
171 * @addr: the address of the LEB128 encoded data
172 * @ret: address to store the result
173 *
174 * Decode signed LEB128 data. The algorithm is taken from Appendix
175 * C of the DWARF 3 spec. Return the number of bytes read.
176 */
177static inline unsigned long dwarf_read_leb128(char *addr, int *ret)
178{
179 unsigned char byte;
180 int result, shift;
181 int num_bits;
182 int count;
183
184 result = 0;
185 shift = 0;
186 count = 0;
187
188 while (1) {
189 byte = __raw_readb(addr);
190 addr++;
191 result |= (byte & 0x7f) << shift;
192 shift += 7;
193 count++;
194
195 if (!(byte & 0x80))
196 break;
197 }
198
199 /* The number of bits in a signed integer. */
200 num_bits = 8 * sizeof(result);
201
202 if ((shift < num_bits) && (byte & 0x40))
203 result |= (-1 << shift);
204
205 *ret = result;
206
207 return count;
208}
209
210/**
211 * dwarf_read_encoded_value - return the decoded value at @addr
212 * @addr: the address of the encoded value
213 * @val: where to write the decoded value
214 * @encoding: the encoding with which we can decode @addr
215 *
216 * GCC emits encoded address in the .eh_frame FDE entries. Decode
217 * the value at @addr using @encoding. The decoded value is written
218 * to @val and the number of bytes read is returned.
219 */
220static int dwarf_read_encoded_value(char *addr, unsigned long *val,
221 char encoding)
222{
223 unsigned long decoded_addr = 0;
224 int count = 0;
225
226 switch (encoding & 0x70) {
227 case DW_EH_PE_absptr:
228 break;
229 case DW_EH_PE_pcrel:
230 decoded_addr = (unsigned long)addr;
231 break;
232 default:
233 pr_debug("encoding=0x%x\n", (encoding & 0x70));
234 UNWINDER_BUG();
235 }
236
237 if ((encoding & 0x07) == 0x00)
238 encoding |= DW_EH_PE_udata4;
239
240 switch (encoding & 0x0f) {
241 case DW_EH_PE_sdata4:
242 case DW_EH_PE_udata4:
243 count += 4;
244 decoded_addr += get_unaligned((u32 *)addr);
245 __raw_writel(decoded_addr, val);
246 break;
247 default:
248 pr_debug("encoding=0x%x\n", encoding);
249 UNWINDER_BUG();
250 }
251
252 return count;
253}
254
255/**
256 * dwarf_entry_len - return the length of an FDE or CIE
257 * @addr: the address of the entry
258 * @len: the length of the entry
259 *
260 * Read the initial_length field of the entry and store the size of
261 * the entry in @len. We return the number of bytes read. Return a
262 * count of 0 on error.
263 */
264static inline int dwarf_entry_len(char *addr, unsigned long *len)
265{
266 u32 initial_len;
267 int count;
268
269 initial_len = get_unaligned((u32 *)addr);
270 count = 4;
271
272 /*
273 * An initial length field value in the range DW_LEN_EXT_LO -
274 * DW_LEN_EXT_HI indicates an extension, and should not be
275 * interpreted as a length. The only extension that we currently
276 * understand is the use of DWARF64 addresses.
277 */
278 if (initial_len >= DW_EXT_LO && initial_len <= DW_EXT_HI) {
279 /*
280 * The 64-bit length field immediately follows the
281 * compulsory 32-bit length field.
282 */
283 if (initial_len == DW_EXT_DWARF64) {
284 *len = get_unaligned((u64 *)addr + 4);
285 count = 12;
286 } else {
287 printk(KERN_WARNING "Unknown DWARF extension\n");
288 count = 0;
289 }
290 } else
291 *len = initial_len;
292
293 return count;
294}
295
296/**
297 * dwarf_lookup_cie - locate the cie
298 * @cie_ptr: pointer to help with lookup
299 */
300static struct dwarf_cie *dwarf_lookup_cie(unsigned long cie_ptr)
301{
302 struct dwarf_cie *cie;
303 unsigned long flags;
304
305 spin_lock_irqsave(&dwarf_cie_lock, flags);
306
307 /*
308 * We've cached the last CIE we looked up because chances are
309 * that the FDE wants this CIE.
310 */
311 if (cached_cie && cached_cie->cie_pointer == cie_ptr) {
312 cie = cached_cie;
313 goto out;
314 }
315
316 list_for_each_entry(cie, &dwarf_cie_list, link) {
317 if (cie->cie_pointer == cie_ptr) {
318 cached_cie = cie;
319 break;
320 }
321 }
322
323 /* Couldn't find the entry in the list. */
324 if (&cie->link == &dwarf_cie_list)
325 cie = NULL;
326out:
327 spin_unlock_irqrestore(&dwarf_cie_lock, flags);
328 return cie;
329}
330
331/**
332 * dwarf_lookup_fde - locate the FDE that covers pc
333 * @pc: the program counter
334 */
335struct dwarf_fde *dwarf_lookup_fde(unsigned long pc)
336{
337 struct dwarf_fde *fde;
338 unsigned long flags;
339
340 spin_lock_irqsave(&dwarf_fde_lock, flags);
341
342 list_for_each_entry(fde, &dwarf_fde_list, link) {
343 unsigned long start, end;
344
345 start = fde->initial_location;
346 end = fde->initial_location + fde->address_range;
347
348 if (pc >= start && pc < end)
349 break;
350 }
351
352 /* Couldn't find the entry in the list. */
353 if (&fde->link == &dwarf_fde_list)
354 fde = NULL;
355
356 spin_unlock_irqrestore(&dwarf_fde_lock, flags);
357
358 return fde;
359}
360
361/**
362 * dwarf_cfa_execute_insns - execute instructions to calculate a CFA
363 * @insn_start: address of the first instruction
364 * @insn_end: address of the last instruction
365 * @cie: the CIE for this function
366 * @fde: the FDE for this function
367 * @frame: the instructions calculate the CFA for this frame
368 * @pc: the program counter of the address we're interested in
369 *
370 * Execute the Call Frame instruction sequence starting at
371 * @insn_start and ending at @insn_end. The instructions describe
372 * how to calculate the Canonical Frame Address of a stackframe.
373 * Store the results in @frame.
374 */
375static int dwarf_cfa_execute_insns(unsigned char *insn_start,
376 unsigned char *insn_end,
377 struct dwarf_cie *cie,
378 struct dwarf_fde *fde,
379 struct dwarf_frame *frame,
380 unsigned long pc)
381{
382 unsigned char insn;
383 unsigned char *current_insn;
384 unsigned int count, delta, reg, expr_len, offset;
385 struct dwarf_reg *regp;
386
387 current_insn = insn_start;
388
389 while (current_insn < insn_end && frame->pc <= pc) {
390 insn = __raw_readb(current_insn++);
391
392 /*
393 * Firstly, handle the opcodes that embed their operands
394 * in the instructions.
395 */
396 switch (DW_CFA_opcode(insn)) {
397 case DW_CFA_advance_loc:
398 delta = DW_CFA_operand(insn);
399 delta *= cie->code_alignment_factor;
400 frame->pc += delta;
401 continue;
402 /* NOTREACHED */
403 case DW_CFA_offset:
404 reg = DW_CFA_operand(insn);
405 count = dwarf_read_uleb128(current_insn, &offset);
406 current_insn += count;
407 offset *= cie->data_alignment_factor;
408 regp = dwarf_frame_alloc_reg(frame, reg);
409 regp->addr = offset;
410 regp->flags |= DWARF_REG_OFFSET;
411 continue;
412 /* NOTREACHED */
413 case DW_CFA_restore:
414 reg = DW_CFA_operand(insn);
415 continue;
416 /* NOTREACHED */
417 }
418
419 /*
420 * Secondly, handle the opcodes that don't embed their
421 * operands in the instruction.
422 */
423 switch (insn) {
424 case DW_CFA_nop:
425 continue;
426 case DW_CFA_advance_loc1:
427 delta = *current_insn++;
428 frame->pc += delta * cie->code_alignment_factor;
429 break;
430 case DW_CFA_advance_loc2:
431 delta = get_unaligned((u16 *)current_insn);
432 current_insn += 2;
433 frame->pc += delta * cie->code_alignment_factor;
434 break;
435 case DW_CFA_advance_loc4:
436 delta = get_unaligned((u32 *)current_insn);
437 current_insn += 4;
438 frame->pc += delta * cie->code_alignment_factor;
439 break;
440 case DW_CFA_offset_extended:
441 count = dwarf_read_uleb128(current_insn, &reg);
442 current_insn += count;
443 count = dwarf_read_uleb128(current_insn, &offset);
444 current_insn += count;
445 offset *= cie->data_alignment_factor;
446 break;
447 case DW_CFA_restore_extended:
448 count = dwarf_read_uleb128(current_insn, &reg);
449 current_insn += count;
450 break;
451 case DW_CFA_undefined:
452 count = dwarf_read_uleb128(current_insn, &reg);
453 current_insn += count;
454 regp = dwarf_frame_alloc_reg(frame, reg);
455 regp->flags |= DWARF_UNDEFINED;
456 break;
457 case DW_CFA_def_cfa:
458 count = dwarf_read_uleb128(current_insn,
459 &frame->cfa_register);
460 current_insn += count;
461 count = dwarf_read_uleb128(current_insn,
462 &frame->cfa_offset);
463 current_insn += count;
464
465 frame->flags |= DWARF_FRAME_CFA_REG_OFFSET;
466 break;
467 case DW_CFA_def_cfa_register:
468 count = dwarf_read_uleb128(current_insn,
469 &frame->cfa_register);
470 current_insn += count;
471 frame->flags |= DWARF_FRAME_CFA_REG_OFFSET;
472 break;
473 case DW_CFA_def_cfa_offset:
474 count = dwarf_read_uleb128(current_insn, &offset);
475 current_insn += count;
476 frame->cfa_offset = offset;
477 break;
478 case DW_CFA_def_cfa_expression:
479 count = dwarf_read_uleb128(current_insn, &expr_len);
480 current_insn += count;
481
482 frame->cfa_expr = current_insn;
483 frame->cfa_expr_len = expr_len;
484 current_insn += expr_len;
485
486 frame->flags |= DWARF_FRAME_CFA_REG_EXP;
487 break;
488 case DW_CFA_offset_extended_sf:
489 count = dwarf_read_uleb128(current_insn, &reg);
490 current_insn += count;
491 count = dwarf_read_leb128(current_insn, &offset);
492 current_insn += count;
493 offset *= cie->data_alignment_factor;
494 regp = dwarf_frame_alloc_reg(frame, reg);
495 regp->flags |= DWARF_REG_OFFSET;
496 regp->addr = offset;
497 break;
498 case DW_CFA_val_offset:
499 count = dwarf_read_uleb128(current_insn, &reg);
500 current_insn += count;
501 count = dwarf_read_leb128(current_insn, &offset);
502 offset *= cie->data_alignment_factor;
503 regp = dwarf_frame_alloc_reg(frame, reg);
504 regp->flags |= DWARF_VAL_OFFSET;
505 regp->addr = offset;
506 break;
507 case DW_CFA_GNU_args_size:
508 count = dwarf_read_uleb128(current_insn, &offset);
509 current_insn += count;
510 break;
511 case DW_CFA_GNU_negative_offset_extended:
512 count = dwarf_read_uleb128(current_insn, &reg);
513 current_insn += count;
514 count = dwarf_read_uleb128(current_insn, &offset);
515 offset *= cie->data_alignment_factor;
516
517 regp = dwarf_frame_alloc_reg(frame, reg);
518 regp->flags |= DWARF_REG_OFFSET;
519 regp->addr = -offset;
520 break;
521 default:
522 pr_debug("unhandled DWARF instruction 0x%x\n", insn);
523 UNWINDER_BUG();
524 break;
525 }
526 }
527
528 return 0;
529}
530
531/**
532 * dwarf_unwind_stack - recursively unwind the stack
533 * @pc: address of the function to unwind
534 * @prev: struct dwarf_frame of the previous stackframe on the callstack
535 *
536 * Return a struct dwarf_frame representing the most recent frame
537 * on the callstack. Each of the lower (older) stack frames are
538 * linked via the "prev" member.
539 */
540struct dwarf_frame * dwarf_unwind_stack(unsigned long pc,
541 struct dwarf_frame *prev)
542{
543 struct dwarf_frame *frame;
544 struct dwarf_cie *cie;
545 struct dwarf_fde *fde;
546 struct dwarf_reg *reg;
547 unsigned long addr;
548
549 /*
550 * If this is the first invocation of this recursive function we
551 * need get the contents of a physical register to get the CFA
552 * in order to begin the virtual unwinding of the stack.
553 *
554 * NOTE: the return address is guaranteed to be setup by the
555 * time this function makes its first function call.
556 */
557 if (!pc && !prev)
558 pc = (unsigned long)current_text_addr();
559
560 frame = mempool_alloc(dwarf_frame_pool, GFP_ATOMIC);
561 if (!frame) {
562 printk(KERN_ERR "Unable to allocate a dwarf frame\n");
563 UNWINDER_BUG();
564 }
565
566 INIT_LIST_HEAD(&frame->reg_list);
567 frame->flags = 0;
568 frame->prev = prev;
569 frame->return_addr = 0;
570
571 fde = dwarf_lookup_fde(pc);
572 if (!fde) {
573 /*
574 * This is our normal exit path - the one that stops the
575 * recursion. There's two reasons why we might exit
576 * here,
577 *
578 * a) pc has no asscociated DWARF frame info and so
579 * we don't know how to unwind this frame. This is
580 * usually the case when we're trying to unwind a
581 * frame that was called from some assembly code
582 * that has no DWARF info, e.g. syscalls.
583 *
584 * b) the DEBUG info for pc is bogus. There's
585 * really no way to distinguish this case from the
586 * case above, which sucks because we could print a
587 * warning here.
588 */
589 goto bail;
590 }
591
592 cie = dwarf_lookup_cie(fde->cie_pointer);
593
594 frame->pc = fde->initial_location;
595
596 /* CIE initial instructions */
597 dwarf_cfa_execute_insns(cie->initial_instructions,
598 cie->instructions_end, cie, fde,
599 frame, pc);
600
601 /* FDE instructions */
602 dwarf_cfa_execute_insns(fde->instructions, fde->end, cie,
603 fde, frame, pc);
604
605 /* Calculate the CFA */
606 switch (frame->flags) {
607 case DWARF_FRAME_CFA_REG_OFFSET:
608 if (prev) {
609 reg = dwarf_frame_reg(prev, frame->cfa_register);
610 UNWINDER_BUG_ON(!reg);
611 UNWINDER_BUG_ON(reg->flags != DWARF_REG_OFFSET);
612
613 addr = prev->cfa + reg->addr;
614 frame->cfa = __raw_readl(addr);
615
616 } else {
617 /*
618 * Again, this is the first invocation of this
619 * recurisve function. We need to physically
620 * read the contents of a register in order to
621 * get the Canonical Frame Address for this
622 * function.
623 */
624 frame->cfa = dwarf_read_arch_reg(frame->cfa_register);
625 }
626
627 frame->cfa += frame->cfa_offset;
628 break;
629 default:
630 UNWINDER_BUG();
631 }
632
633 reg = dwarf_frame_reg(frame, DWARF_ARCH_RA_REG);
634
635 /*
636 * If we haven't seen the return address register or the return
637 * address column is undefined then we must assume that this is
638 * the end of the callstack.
639 */
640 if (!reg || reg->flags == DWARF_UNDEFINED)
641 goto bail;
642
643 UNWINDER_BUG_ON(reg->flags != DWARF_REG_OFFSET);
644
645 addr = frame->cfa + reg->addr;
646 frame->return_addr = __raw_readl(addr);
647
648 return frame;
649
650bail:
651 dwarf_frame_free_regs(frame);
652 mempool_free(frame, dwarf_frame_pool);
653 return NULL;
654}
655
656static int dwarf_parse_cie(void *entry, void *p, unsigned long len,
657 unsigned char *end)
658{
659 struct dwarf_cie *cie;
660 unsigned long flags;
661 int count;
662
663 cie = kzalloc(sizeof(*cie), GFP_KERNEL);
664 if (!cie)
665 return -ENOMEM;
666
667 cie->length = len;
668
669 /*
670 * Record the offset into the .eh_frame section
671 * for this CIE. It allows this CIE to be
672 * quickly and easily looked up from the
673 * corresponding FDE.
674 */
675 cie->cie_pointer = (unsigned long)entry;
676
677 cie->version = *(char *)p++;
678 UNWINDER_BUG_ON(cie->version != 1);
679
680 cie->augmentation = p;
681 p += strlen(cie->augmentation) + 1;
682
683 count = dwarf_read_uleb128(p, &cie->code_alignment_factor);
684 p += count;
685
686 count = dwarf_read_leb128(p, &cie->data_alignment_factor);
687 p += count;
688
689 /*
690 * Which column in the rule table contains the
691 * return address?
692 */
693 if (cie->version == 1) {
694 cie->return_address_reg = __raw_readb(p);
695 p++;
696 } else {
697 count = dwarf_read_uleb128(p, &cie->return_address_reg);
698 p += count;
699 }
700
701 if (cie->augmentation[0] == 'z') {
702 unsigned int length, count;
703 cie->flags |= DWARF_CIE_Z_AUGMENTATION;
704
705 count = dwarf_read_uleb128(p, &length);
706 p += count;
707
708 UNWINDER_BUG_ON((unsigned char *)p > end);
709
710 cie->initial_instructions = p + length;
711 cie->augmentation++;
712 }
713
714 while (*cie->augmentation) {
715 /*
716 * "L" indicates a byte showing how the
717 * LSDA pointer is encoded. Skip it.
718 */
719 if (*cie->augmentation == 'L') {
720 p++;
721 cie->augmentation++;
722 } else if (*cie->augmentation == 'R') {
723 /*
724 * "R" indicates a byte showing
725 * how FDE addresses are
726 * encoded.
727 */
728 cie->encoding = *(char *)p++;
729 cie->augmentation++;
730 } else if (*cie->augmentation == 'P') {
731 /*
732 * "R" indicates a personality
733 * routine in the CIE
734 * augmentation.
735 */
736 UNWINDER_BUG();
737 } else if (*cie->augmentation == 'S') {
738 UNWINDER_BUG();
739 } else {
740 /*
741 * Unknown augmentation. Assume
742 * 'z' augmentation.
743 */
744 p = cie->initial_instructions;
745 UNWINDER_BUG_ON(!p);
746 break;
747 }
748 }
749
750 cie->initial_instructions = p;
751 cie->instructions_end = end;
752
753 /* Add to list */
754 spin_lock_irqsave(&dwarf_cie_lock, flags);
755 list_add_tail(&cie->link, &dwarf_cie_list);
756 spin_unlock_irqrestore(&dwarf_cie_lock, flags);
757
758 return 0;
759}
760
761static int dwarf_parse_fde(void *entry, u32 entry_type,
762 void *start, unsigned long len,
763 unsigned char *end)
764{
765 struct dwarf_fde *fde;
766 struct dwarf_cie *cie;
767 unsigned long flags;
768 int count;
769 void *p = start;
770
771 fde = kzalloc(sizeof(*fde), GFP_KERNEL);
772 if (!fde)
773 return -ENOMEM;
774
775 fde->length = len;
776
777 /*
778 * In a .eh_frame section the CIE pointer is the
779 * delta between the address within the FDE
780 */
781 fde->cie_pointer = (unsigned long)(p - entry_type - 4);
782
783 cie = dwarf_lookup_cie(fde->cie_pointer);
784 fde->cie = cie;
785
786 if (cie->encoding)
787 count = dwarf_read_encoded_value(p, &fde->initial_location,
788 cie->encoding);
789 else
790 count = dwarf_read_addr(p, &fde->initial_location);
791
792 p += count;
793
794 if (cie->encoding)
795 count = dwarf_read_encoded_value(p, &fde->address_range,
796 cie->encoding & 0x0f);
797 else
798 count = dwarf_read_addr(p, &fde->address_range);
799
800 p += count;
801
802 if (fde->cie->flags & DWARF_CIE_Z_AUGMENTATION) {
803 unsigned int length;
804 count = dwarf_read_uleb128(p, &length);
805 p += count + length;
806 }
807
808 /* Call frame instructions. */
809 fde->instructions = p;
810 fde->end = end;
811
812 /* Add to list. */
813 spin_lock_irqsave(&dwarf_fde_lock, flags);
814 list_add_tail(&fde->link, &dwarf_fde_list);
815 spin_unlock_irqrestore(&dwarf_fde_lock, flags);
816
817 return 0;
818}
819
820static void dwarf_unwinder_dump(struct task_struct *task,
821 struct pt_regs *regs,
822 unsigned long *sp,
823 const struct stacktrace_ops *ops,
824 void *data)
825{
826 struct dwarf_frame *frame, *_frame;
827 unsigned long return_addr;
828
829 _frame = NULL;
830 return_addr = 0;
831
832 while (1) {
833 frame = dwarf_unwind_stack(return_addr, _frame);
834
835 if (_frame) {
836 dwarf_frame_free_regs(_frame);
837 mempool_free(_frame, dwarf_frame_pool);
838 }
839
840 _frame = frame;
841
842 if (!frame || !frame->return_addr)
843 break;
844
845 return_addr = frame->return_addr;
846 ops->address(data, return_addr, 1);
847 }
848}
849
850static struct unwinder dwarf_unwinder = {
851 .name = "dwarf-unwinder",
852 .dump = dwarf_unwinder_dump,
853 .rating = 150,
854};
855
856static void dwarf_unwinder_cleanup(void)
857{
858 struct dwarf_cie *cie;
859 struct dwarf_fde *fde;
860
861 /*
862 * Deallocate all the memory allocated for the DWARF unwinder.
863 * Traverse all the FDE/CIE lists and remove and free all the
864 * memory associated with those data structures.
865 */
866 list_for_each_entry(cie, &dwarf_cie_list, link)
867 kfree(cie);
868
869 list_for_each_entry(fde, &dwarf_fde_list, link)
870 kfree(fde);
871
872 kmem_cache_destroy(dwarf_reg_cachep);
873 kmem_cache_destroy(dwarf_frame_cachep);
874}
875
876/**
877 * dwarf_unwinder_init - initialise the dwarf unwinder
878 *
879 * Build the data structures describing the .dwarf_frame section to
880 * make it easier to lookup CIE and FDE entries. Because the
881 * .eh_frame section is packed as tightly as possible it is not
882 * easy to lookup the FDE for a given PC, so we build a list of FDE
883 * and CIE entries that make it easier.
884 */
885static int __init dwarf_unwinder_init(void)
886{
887 u32 entry_type;
888 void *p, *entry;
889 int count, err = 0;
890 unsigned long len;
891 unsigned int c_entries, f_entries;
892 unsigned char *end;
893 INIT_LIST_HEAD(&dwarf_cie_list);
894 INIT_LIST_HEAD(&dwarf_fde_list);
895
896 c_entries = 0;
897 f_entries = 0;
898 entry = &__start_eh_frame;
899
900 dwarf_frame_cachep = kmem_cache_create("dwarf_frames",
901 sizeof(struct dwarf_frame), 0,
902 SLAB_PANIC | SLAB_HWCACHE_ALIGN | SLAB_NOTRACK, NULL);
903
904 dwarf_reg_cachep = kmem_cache_create("dwarf_regs",
905 sizeof(struct dwarf_reg), 0,
906 SLAB_PANIC | SLAB_HWCACHE_ALIGN | SLAB_NOTRACK, NULL);
907
908 dwarf_frame_pool = mempool_create(DWARF_FRAME_MIN_REQ,
909 mempool_alloc_slab,
910 mempool_free_slab,
911 dwarf_frame_cachep);
912
913 dwarf_reg_pool = mempool_create(DWARF_REG_MIN_REQ,
914 mempool_alloc_slab,
915 mempool_free_slab,
916 dwarf_reg_cachep);
917
918 while ((char *)entry < __stop_eh_frame) {
919 p = entry;
920
921 count = dwarf_entry_len(p, &len);
922 if (count == 0) {
923 /*
924 * We read a bogus length field value. There is
925 * nothing we can do here apart from disabling
926 * the DWARF unwinder. We can't even skip this
927 * entry and move to the next one because 'len'
928 * tells us where our next entry is.
929 */
930 goto out;
931 } else
932 p += count;
933
934 /* initial length does not include itself */
935 end = p + len;
936
937 entry_type = get_unaligned((u32 *)p);
938 p += 4;
939
940 if (entry_type == DW_EH_FRAME_CIE) {
941 err = dwarf_parse_cie(entry, p, len, end);
942 if (err < 0)
943 goto out;
944 else
945 c_entries++;
946 } else {
947 err = dwarf_parse_fde(entry, entry_type, p, len, end);
948 if (err < 0)
949 goto out;
950 else
951 f_entries++;
952 }
953
954 entry = (char *)entry + len + 4;
955 }
956
957 printk(KERN_INFO "DWARF unwinder initialised: read %u CIEs, %u FDEs\n",
958 c_entries, f_entries);
959
960 err = unwinder_register(&dwarf_unwinder);
961 if (err)
962 goto out;
963
964 return 0;
965
966out:
967 printk(KERN_ERR "Failed to initialise DWARF unwinder: %d\n", err);
968 dwarf_unwinder_cleanup();
969 return -EINVAL;
970}
971early_initcall(dwarf_unwinder_init);
diff --git a/arch/sh/kernel/early_printk.c b/arch/sh/kernel/early_printk.c
index a952dcf9999d..81a46145ffa5 100644
--- a/arch/sh/kernel/early_printk.c
+++ b/arch/sh/kernel/early_printk.c
@@ -134,7 +134,7 @@ static void scif_sercon_init(char *s)
134 sci_out(&scif_port, SCFCR, 0x0030); /* TTRG=b'11 */ 134 sci_out(&scif_port, SCFCR, 0x0030); /* TTRG=b'11 */
135 sci_out(&scif_port, SCSCR, 0x0030); /* TE, RE */ 135 sci_out(&scif_port, SCSCR, 0x0030); /* TE, RE */
136} 136}
137#elif defined(CONFIG_CPU_SH4) 137#elif defined(CONFIG_CPU_SH4) || defined(CONFIG_CPU_SH3)
138#define DEFAULT_BAUD 115200 138#define DEFAULT_BAUD 115200
139/* 139/*
140 * Simple SCIF init, primarily aimed at SH7750 and other similar SH-4 140 * Simple SCIF init, primarily aimed at SH7750 and other similar SH-4
@@ -220,8 +220,7 @@ static int __init setup_early_printk(char *buf)
220 early_console = &scif_console; 220 early_console = &scif_console;
221 221
222#if !defined(CONFIG_SH_STANDARD_BIOS) 222#if !defined(CONFIG_SH_STANDARD_BIOS)
223#if defined(CONFIG_CPU_SH4) || defined(CONFIG_CPU_SUBTYPE_SH7720) || \ 223#if defined(CONFIG_CPU_SH4) || defined(CONFIG_CPU_SH3)
224 defined(CONFIG_CPU_SUBTYPE_SH7721)
225 scif_sercon_init(buf + 6); 224 scif_sercon_init(buf + 6);
226#endif 225#endif
227#endif 226#endif
diff --git a/arch/sh/kernel/entry-common.S b/arch/sh/kernel/entry-common.S
index d62359cfbbe2..68d9223b145e 100644
--- a/arch/sh/kernel/entry-common.S
+++ b/arch/sh/kernel/entry-common.S
@@ -43,9 +43,10 @@
43 * syscall # 43 * syscall #
44 * 44 *
45 */ 45 */
46#include <asm/dwarf.h>
46 47
47#if defined(CONFIG_PREEMPT) 48#if defined(CONFIG_PREEMPT)
48# define preempt_stop() cli 49# define preempt_stop() cli ; TRACE_IRQS_OFF
49#else 50#else
50# define preempt_stop() 51# define preempt_stop()
51# define resume_kernel __restore_all 52# define resume_kernel __restore_all
@@ -55,11 +56,7 @@
55 .align 2 56 .align 2
56ENTRY(exception_error) 57ENTRY(exception_error)
57 ! 58 !
58#ifdef CONFIG_TRACE_IRQFLAGS 59 TRACE_IRQS_ON
59 mov.l 2f, r0
60 jsr @r0
61 nop
62#endif
63 sti 60 sti
64 mov.l 1f, r0 61 mov.l 1f, r0
65 jmp @r0 62 jmp @r0
@@ -67,18 +64,15 @@ ENTRY(exception_error)
67 64
68 .align 2 65 .align 2
691: .long do_exception_error 661: .long do_exception_error
70#ifdef CONFIG_TRACE_IRQFLAGS
712: .long trace_hardirqs_on
72#endif
73 67
74 .align 2 68 .align 2
75ret_from_exception: 69ret_from_exception:
70 CFI_STARTPROC simple
71 CFI_DEF_CFA r14, 0
72 CFI_REL_OFFSET 17, 64
73 CFI_REL_OFFSET 15, 0
74 CFI_REL_OFFSET 14, 56
76 preempt_stop() 75 preempt_stop()
77#ifdef CONFIG_TRACE_IRQFLAGS
78 mov.l 4f, r0
79 jsr @r0
80 nop
81#endif
82ENTRY(ret_from_irq) 76ENTRY(ret_from_irq)
83 ! 77 !
84 mov #OFF_SR, r0 78 mov #OFF_SR, r0
@@ -93,6 +87,7 @@ ENTRY(ret_from_irq)
93 nop 87 nop
94ENTRY(resume_kernel) 88ENTRY(resume_kernel)
95 cli 89 cli
90 TRACE_IRQS_OFF
96 mov.l @(TI_PRE_COUNT,r8), r0 ! current_thread_info->preempt_count 91 mov.l @(TI_PRE_COUNT,r8), r0 ! current_thread_info->preempt_count
97 tst r0, r0 92 tst r0, r0
98 bf noresched 93 bf noresched
@@ -103,8 +98,9 @@ need_resched:
103 98
104 mov #OFF_SR, r0 99 mov #OFF_SR, r0
105 mov.l @(r0,r15), r0 ! get status register 100 mov.l @(r0,r15), r0 ! get status register
106 and #0xf0, r0 ! interrupts off (exception path)? 101 shlr r0
107 cmp/eq #0xf0, r0 102 and #(0xf0>>1), r0 ! interrupts off (exception path)?
103 cmp/eq #(0xf0>>1), r0
108 bt noresched 104 bt noresched
109 mov.l 3f, r0 105 mov.l 3f, r0
110 jsr @r0 ! call preempt_schedule_irq 106 jsr @r0 ! call preempt_schedule_irq
@@ -125,13 +121,9 @@ noresched:
125ENTRY(resume_userspace) 121ENTRY(resume_userspace)
126 ! r8: current_thread_info 122 ! r8: current_thread_info
127 cli 123 cli
128#ifdef CONFIG_TRACE_IRQFLAGS 124 TRACE_IRQS_OfF
129 mov.l 5f, r0
130 jsr @r0
131 nop
132#endif
133 mov.l @(TI_FLAGS,r8), r0 ! current_thread_info->flags 125 mov.l @(TI_FLAGS,r8), r0 ! current_thread_info->flags
134 tst #_TIF_WORK_MASK, r0 126 tst #(_TIF_WORK_MASK & 0xff), r0
135 bt/s __restore_all 127 bt/s __restore_all
136 tst #_TIF_NEED_RESCHED, r0 128 tst #_TIF_NEED_RESCHED, r0
137 129
@@ -156,14 +148,10 @@ work_resched:
156 jsr @r1 ! schedule 148 jsr @r1 ! schedule
157 nop 149 nop
158 cli 150 cli
159#ifdef CONFIG_TRACE_IRQFLAGS 151 TRACE_IRQS_OFF
160 mov.l 5f, r0
161 jsr @r0
162 nop
163#endif
164 ! 152 !
165 mov.l @(TI_FLAGS,r8), r0 ! current_thread_info->flags 153 mov.l @(TI_FLAGS,r8), r0 ! current_thread_info->flags
166 tst #_TIF_WORK_MASK, r0 154 tst #(_TIF_WORK_MASK & 0xff), r0
167 bt __restore_all 155 bt __restore_all
168 bra work_pending 156 bra work_pending
169 tst #_TIF_NEED_RESCHED, r0 157 tst #_TIF_NEED_RESCHED, r0
@@ -172,23 +160,15 @@ work_resched:
1721: .long schedule 1601: .long schedule
1732: .long do_notify_resume 1612: .long do_notify_resume
1743: .long resume_userspace 1623: .long resume_userspace
175#ifdef CONFIG_TRACE_IRQFLAGS
1764: .long trace_hardirqs_on
1775: .long trace_hardirqs_off
178#endif
179 163
180 .align 2 164 .align 2
181syscall_exit_work: 165syscall_exit_work:
182 ! r0: current_thread_info->flags 166 ! r0: current_thread_info->flags
183 ! r8: current_thread_info 167 ! r8: current_thread_info
184 tst #_TIF_WORK_SYSCALL_MASK, r0 168 tst #(_TIF_WORK_SYSCALL_MASK & 0xff), r0
185 bt/s work_pending 169 bt/s work_pending
186 tst #_TIF_NEED_RESCHED, r0 170 tst #_TIF_NEED_RESCHED, r0
187#ifdef CONFIG_TRACE_IRQFLAGS 171 TRACE_IRQS_ON
188 mov.l 5f, r0
189 jsr @r0
190 nop
191#endif
192 sti 172 sti
193 mov r15, r4 173 mov r15, r4
194 mov.l 8f, r0 ! do_syscall_trace_leave 174 mov.l 8f, r0 ! do_syscall_trace_leave
@@ -226,12 +206,25 @@ syscall_trace_entry:
226 mov.l r0, @(OFF_R0,r15) ! Return value 206 mov.l r0, @(OFF_R0,r15) ! Return value
227 207
228__restore_all: 208__restore_all:
229 mov.l 1f, r0 209 mov #OFF_SR, r0
210 mov.l @(r0,r15), r0 ! get status register
211
212 shlr2 r0
213 and #0x3c, r0
214 cmp/eq #0x3c, r0
215 bt 1f
216 TRACE_IRQS_ON
217 bra 2f
218 nop
2191:
220 TRACE_IRQS_OFF
2212:
222 mov.l 3f, r0
230 jmp @r0 223 jmp @r0
231 nop 224 nop
232 225
233 .align 2 226 .align 2
2341: .long restore_all 2273: .long restore_all
235 228
236 .align 2 229 .align 2
237syscall_badsys: ! Bad syscall number 230syscall_badsys: ! Bad syscall number
@@ -259,6 +252,7 @@ debug_trap:
259 nop 252 nop
260 bra __restore_all 253 bra __restore_all
261 nop 254 nop
255 CFI_ENDPROC
262 256
263 .align 2 257 .align 2
2641: .long debug_trap_table 2581: .long debug_trap_table
@@ -304,6 +298,7 @@ ret_from_fork:
304 * system calls and debug traps through their respective jump tables. 298 * system calls and debug traps through their respective jump tables.
305 */ 299 */
306ENTRY(system_call) 300ENTRY(system_call)
301 setup_frame_reg
307#if !defined(CONFIG_CPU_SH2) 302#if !defined(CONFIG_CPU_SH2)
308 mov.l 1f, r9 303 mov.l 1f, r9
309 mov.l @r9, r8 ! Read from TRA (Trap Address) Register 304 mov.l @r9, r8 ! Read from TRA (Trap Address) Register
@@ -321,18 +316,18 @@ ENTRY(system_call)
321 bt/s debug_trap ! it's a debug trap.. 316 bt/s debug_trap ! it's a debug trap..
322 nop 317 nop
323 318
324#ifdef CONFIG_TRACE_IRQFLAGS 319 TRACE_IRQS_ON
325 mov.l 5f, r10
326 jsr @r10
327 nop
328#endif
329 sti 320 sti
330 321
331 ! 322 !
332 get_current_thread_info r8, r10 323 get_current_thread_info r8, r10
333 mov.l @(TI_FLAGS,r8), r8 324 mov.l @(TI_FLAGS,r8), r8
334 mov #_TIF_WORK_SYSCALL_MASK, r10 325 mov #(_TIF_WORK_SYSCALL_MASK & 0xff), r10
326 mov #(_TIF_WORK_SYSCALL_MASK >> 8), r9
335 tst r10, r8 327 tst r10, r8
328 shll8 r9
329 bf syscall_trace_entry
330 tst r9, r8
336 bf syscall_trace_entry 331 bf syscall_trace_entry
337 ! 332 !
338 mov.l 2f, r8 ! Number of syscalls 333 mov.l 2f, r8 ! Number of syscalls
@@ -351,15 +346,15 @@ syscall_call:
351 ! 346 !
352syscall_exit: 347syscall_exit:
353 cli 348 cli
354#ifdef CONFIG_TRACE_IRQFLAGS 349 TRACE_IRQS_OFF
355 mov.l 6f, r0
356 jsr @r0
357 nop
358#endif
359 ! 350 !
360 get_current_thread_info r8, r0 351 get_current_thread_info r8, r0
361 mov.l @(TI_FLAGS,r8), r0 ! current_thread_info->flags 352 mov.l @(TI_FLAGS,r8), r0 ! current_thread_info->flags
362 tst #_TIF_ALLWORK_MASK, r0 353 tst #(_TIF_ALLWORK_MASK & 0xff), r0
354 mov #(_TIF_ALLWORK_MASK >> 8), r1
355 bf syscall_exit_work
356 shlr8 r0
357 tst r0, r1
363 bf syscall_exit_work 358 bf syscall_exit_work
364 bra __restore_all 359 bra __restore_all
365 nop 360 nop
@@ -369,9 +364,5 @@ syscall_exit:
369#endif 364#endif
3702: .long NR_syscalls 3652: .long NR_syscalls
3713: .long sys_call_table 3663: .long sys_call_table
372#ifdef CONFIG_TRACE_IRQFLAGS
3735: .long trace_hardirqs_on
3746: .long trace_hardirqs_off
375#endif
3767: .long do_syscall_trace_enter 3677: .long do_syscall_trace_enter
3778: .long do_syscall_trace_leave 3688: .long do_syscall_trace_leave
diff --git a/arch/sh/kernel/ftrace.c b/arch/sh/kernel/ftrace.c
index 066f37dc32a9..a3dcc6d5d253 100644
--- a/arch/sh/kernel/ftrace.c
+++ b/arch/sh/kernel/ftrace.c
@@ -16,9 +16,13 @@
16#include <linux/string.h> 16#include <linux/string.h>
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/io.h> 18#include <linux/io.h>
19#include <linux/kernel.h>
19#include <asm/ftrace.h> 20#include <asm/ftrace.h>
20#include <asm/cacheflush.h> 21#include <asm/cacheflush.h>
22#include <asm/unistd.h>
23#include <trace/syscall.h>
21 24
25#ifdef CONFIG_DYNAMIC_FTRACE
22static unsigned char ftrace_replaced_code[MCOUNT_INSN_SIZE]; 26static unsigned char ftrace_replaced_code[MCOUNT_INSN_SIZE];
23 27
24static unsigned char ftrace_nop[4]; 28static unsigned char ftrace_nop[4];
@@ -131,3 +135,187 @@ int __init ftrace_dyn_arch_init(void *data)
131 135
132 return 0; 136 return 0;
133} 137}
138#endif /* CONFIG_DYNAMIC_FTRACE */
139
140#ifdef CONFIG_FUNCTION_GRAPH_TRACER
141#ifdef CONFIG_DYNAMIC_FTRACE
142extern void ftrace_graph_call(void);
143
144static int ftrace_mod(unsigned long ip, unsigned long old_addr,
145 unsigned long new_addr)
146{
147 unsigned char code[MCOUNT_INSN_SIZE];
148
149 if (probe_kernel_read(code, (void *)ip, MCOUNT_INSN_SIZE))
150 return -EFAULT;
151
152 if (old_addr != __raw_readl((unsigned long *)code))
153 return -EINVAL;
154
155 __raw_writel(new_addr, ip);
156 return 0;
157}
158
159int ftrace_enable_ftrace_graph_caller(void)
160{
161 unsigned long ip, old_addr, new_addr;
162
163 ip = (unsigned long)(&ftrace_graph_call) + GRAPH_INSN_OFFSET;
164 old_addr = (unsigned long)(&skip_trace);
165 new_addr = (unsigned long)(&ftrace_graph_caller);
166
167 return ftrace_mod(ip, old_addr, new_addr);
168}
169
170int ftrace_disable_ftrace_graph_caller(void)
171{
172 unsigned long ip, old_addr, new_addr;
173
174 ip = (unsigned long)(&ftrace_graph_call) + GRAPH_INSN_OFFSET;
175 old_addr = (unsigned long)(&ftrace_graph_caller);
176 new_addr = (unsigned long)(&skip_trace);
177
178 return ftrace_mod(ip, old_addr, new_addr);
179}
180#endif /* CONFIG_DYNAMIC_FTRACE */
181
182/*
183 * Hook the return address and push it in the stack of return addrs
184 * in the current thread info.
185 *
186 * This is the main routine for the function graph tracer. The function
187 * graph tracer essentially works like this:
188 *
189 * parent is the stack address containing self_addr's return address.
190 * We pull the real return address out of parent and store it in
191 * current's ret_stack. Then, we replace the return address on the stack
192 * with the address of return_to_handler. self_addr is the function that
193 * called mcount.
194 *
195 * When self_addr returns, it will jump to return_to_handler which calls
196 * ftrace_return_to_handler. ftrace_return_to_handler will pull the real
197 * return address off of current's ret_stack and jump to it.
198 */
199void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr)
200{
201 unsigned long old;
202 int faulted, err;
203 struct ftrace_graph_ent trace;
204 unsigned long return_hooker = (unsigned long)&return_to_handler;
205
206 if (unlikely(atomic_read(&current->tracing_graph_pause)))
207 return;
208
209 /*
210 * Protect against fault, even if it shouldn't
211 * happen. This tool is too much intrusive to
212 * ignore such a protection.
213 */
214 __asm__ __volatile__(
215 "1: \n\t"
216 "mov.l @%2, %0 \n\t"
217 "2: \n\t"
218 "mov.l %3, @%2 \n\t"
219 "mov #0, %1 \n\t"
220 "3: \n\t"
221 ".section .fixup, \"ax\" \n\t"
222 "4: \n\t"
223 "mov.l 5f, %0 \n\t"
224 "jmp @%0 \n\t"
225 " mov #1, %1 \n\t"
226 ".balign 4 \n\t"
227 "5: .long 3b \n\t"
228 ".previous \n\t"
229 ".section __ex_table,\"a\" \n\t"
230 ".long 1b, 4b \n\t"
231 ".long 2b, 4b \n\t"
232 ".previous \n\t"
233 : "=&r" (old), "=r" (faulted)
234 : "r" (parent), "r" (return_hooker)
235 );
236
237 if (unlikely(faulted)) {
238 ftrace_graph_stop();
239 WARN_ON(1);
240 return;
241 }
242
243 err = ftrace_push_return_trace(old, self_addr, &trace.depth, 0);
244 if (err == -EBUSY) {
245 __raw_writel(old, parent);
246 return;
247 }
248
249 trace.func = self_addr;
250
251 /* Only trace if the calling function expects to */
252 if (!ftrace_graph_entry(&trace)) {
253 current->curr_ret_stack--;
254 __raw_writel(old, parent);
255 }
256}
257#endif /* CONFIG_FUNCTION_GRAPH_TRACER */
258
259#ifdef CONFIG_FTRACE_SYSCALLS
260
261extern unsigned long __start_syscalls_metadata[];
262extern unsigned long __stop_syscalls_metadata[];
263extern unsigned long *sys_call_table;
264
265static struct syscall_metadata **syscalls_metadata;
266
267static struct syscall_metadata *find_syscall_meta(unsigned long *syscall)
268{
269 struct syscall_metadata *start;
270 struct syscall_metadata *stop;
271 char str[KSYM_SYMBOL_LEN];
272
273
274 start = (struct syscall_metadata *)__start_syscalls_metadata;
275 stop = (struct syscall_metadata *)__stop_syscalls_metadata;
276 kallsyms_lookup((unsigned long) syscall, NULL, NULL, NULL, str);
277
278 for ( ; start < stop; start++) {
279 if (start->name && !strcmp(start->name, str))
280 return start;
281 }
282
283 return NULL;
284}
285
286struct syscall_metadata *syscall_nr_to_meta(int nr)
287{
288 if (!syscalls_metadata || nr >= FTRACE_SYSCALL_MAX || nr < 0)
289 return NULL;
290
291 return syscalls_metadata[nr];
292}
293
294void arch_init_ftrace_syscalls(void)
295{
296 int i;
297 struct syscall_metadata *meta;
298 unsigned long **psys_syscall_table = &sys_call_table;
299 static atomic_t refs;
300
301 if (atomic_inc_return(&refs) != 1)
302 goto end;
303
304 syscalls_metadata = kzalloc(sizeof(*syscalls_metadata) *
305 FTRACE_SYSCALL_MAX, GFP_KERNEL);
306 if (!syscalls_metadata) {
307 WARN_ON(1);
308 return;
309 }
310
311 for (i = 0; i < FTRACE_SYSCALL_MAX; i++) {
312 meta = find_syscall_meta(psys_syscall_table[i]);
313 syscalls_metadata[i] = meta;
314 }
315 return;
316
317 /* Paranoid: avoid overflow */
318end:
319 atomic_dec(&refs);
320}
321#endif /* CONFIG_FTRACE_SYSCALLS */
diff --git a/arch/sh/kernel/init_task.c b/arch/sh/kernel/init_task.c
index 1719957c0a69..11f2ea556a6b 100644
--- a/arch/sh/kernel/init_task.c
+++ b/arch/sh/kernel/init_task.c
@@ -17,9 +17,8 @@ struct pt_regs fake_swapper_regs;
17 * way process stacks are handled. This is done by having a special 17 * way process stacks are handled. This is done by having a special
18 * "init_task" linker map entry.. 18 * "init_task" linker map entry..
19 */ 19 */
20union thread_union init_thread_union 20union thread_union init_thread_union __init_task_data =
21 __attribute__((__section__(".data.init_task"))) = 21 { INIT_THREAD_INFO(init_task) };
22 { INIT_THREAD_INFO(init_task) };
23 22
24/* 23/*
25 * Initial task structure. 24 * Initial task structure.
diff --git a/arch/sh/kernel/io.c b/arch/sh/kernel/io.c
index 4f85fffaa557..4770c241c679 100644
--- a/arch/sh/kernel/io.c
+++ b/arch/sh/kernel/io.c
@@ -1,12 +1,9 @@
1/* 1/*
2 * linux/arch/sh/kernel/io.c 2 * arch/sh/kernel/io.c - Machine independent I/O functions.
3 * 3 *
4 * Copyright (C) 2000 Stuart Menefy 4 * Copyright (C) 2000 - 2009 Stuart Menefy
5 * Copyright (C) 2005 Paul Mundt 5 * Copyright (C) 2005 Paul Mundt
6 * 6 *
7 * Provide real functions which expand to whatever the header file defined.
8 * Also definitions of machine independent IO functions.
9 *
10 * This file is subject to the terms and conditions of the GNU General Public 7 * This file is subject to the terms and conditions of the GNU General Public
11 * License. See the file "COPYING" in the main directory of this archive 8 * License. See the file "COPYING" in the main directory of this archive
12 * for more details. 9 * for more details.
@@ -18,33 +15,87 @@
18 15
19/* 16/*
20 * Copy data from IO memory space to "real" memory space. 17 * Copy data from IO memory space to "real" memory space.
21 * This needs to be optimized.
22 */ 18 */
23void memcpy_fromio(void *to, const volatile void __iomem *from, unsigned long count) 19void memcpy_fromio(void *to, const volatile void __iomem *from, unsigned long count)
24{ 20{
25 unsigned char *p = to; 21 /*
26 while (count) { 22 * Would it be worthwhile doing byte and long transfers first
27 count--; 23 * to try and get aligned?
28 *p = readb(from); 24 */
29 p++; 25#ifdef CONFIG_CPU_SH4
30 from++; 26 if ((count >= 0x20) &&
31 } 27 (((u32)to & 0x1f) == 0) && (((u32)from & 0x3) == 0)) {
28 int tmp2, tmp3, tmp4, tmp5, tmp6;
29
30 __asm__ __volatile__(
31 "1: \n\t"
32 "mov.l @%7+, r0 \n\t"
33 "mov.l @%7+, %2 \n\t"
34 "movca.l r0, @%0 \n\t"
35 "mov.l @%7+, %3 \n\t"
36 "mov.l @%7+, %4 \n\t"
37 "mov.l @%7+, %5 \n\t"
38 "mov.l @%7+, %6 \n\t"
39 "mov.l @%7+, r7 \n\t"
40 "mov.l @%7+, r0 \n\t"
41 "mov.l %2, @(0x04,%0) \n\t"
42 "mov #0x20, %2 \n\t"
43 "mov.l %3, @(0x08,%0) \n\t"
44 "sub %2, %1 \n\t"
45 "mov.l %4, @(0x0c,%0) \n\t"
46 "cmp/hi %1, %2 ! T if 32 > count \n\t"
47 "mov.l %5, @(0x10,%0) \n\t"
48 "mov.l %6, @(0x14,%0) \n\t"
49 "mov.l r7, @(0x18,%0) \n\t"
50 "mov.l r0, @(0x1c,%0) \n\t"
51 "bf.s 1b \n\t"
52 " add #0x20, %0 \n\t"
53 : "=&r" (to), "=&r" (count),
54 "=&r" (tmp2), "=&r" (tmp3), "=&r" (tmp4),
55 "=&r" (tmp5), "=&r" (tmp6), "=&r" (from)
56 : "7"(from), "0" (to), "1" (count)
57 : "r0", "r7", "t", "memory");
58 }
59#endif
60
61 if ((((u32)to | (u32)from) & 0x3) == 0) {
62 for (; count > 3; count -= 4) {
63 *(u32 *)to = *(volatile u32 *)from;
64 to += 4;
65 from += 4;
66 }
67 }
68
69 for (; count > 0; count--) {
70 *(u8 *)to = *(volatile u8 *)from;
71 to++;
72 from++;
73 }
74
75 mb();
32} 76}
33EXPORT_SYMBOL(memcpy_fromio); 77EXPORT_SYMBOL(memcpy_fromio);
34 78
35/* 79/*
36 * Copy data from "real" memory space to IO memory space. 80 * Copy data from "real" memory space to IO memory space.
37 * This needs to be optimized.
38 */ 81 */
39void memcpy_toio(volatile void __iomem *to, const void *from, unsigned long count) 82void memcpy_toio(volatile void __iomem *to, const void *from, unsigned long count)
40{ 83{
41 const unsigned char *p = from; 84 if ((((u32)to | (u32)from) & 0x3) == 0) {
42 while (count) { 85 for ( ; count > 3; count -= 4) {
43 count--; 86 *(volatile u32 *)to = *(u32 *)from;
44 writeb(*p, to); 87 to += 4;
45 p++; 88 from += 4;
46 to++; 89 }
47 } 90 }
91
92 for (; count > 0; count--) {
93 *(volatile u8 *)to = *(u8 *)from;
94 to++;
95 from++;
96 }
97
98 mb();
48} 99}
49EXPORT_SYMBOL(memcpy_toio); 100EXPORT_SYMBOL(memcpy_toio);
50 101
@@ -62,6 +113,8 @@ void memset_io(volatile void __iomem *dst, int c, unsigned long count)
62} 113}
63EXPORT_SYMBOL(memset_io); 114EXPORT_SYMBOL(memset_io);
64 115
116#ifndef CONFIG_GENERIC_IOMAP
117
65void __iomem *ioport_map(unsigned long port, unsigned int nr) 118void __iomem *ioport_map(unsigned long port, unsigned int nr)
66{ 119{
67 void __iomem *ret; 120 void __iomem *ret;
@@ -79,3 +132,5 @@ void ioport_unmap(void __iomem *addr)
79 sh_mv.mv_ioport_unmap(addr); 132 sh_mv.mv_ioport_unmap(addr);
80} 133}
81EXPORT_SYMBOL(ioport_unmap); 134EXPORT_SYMBOL(ioport_unmap);
135
136#endif /* CONFIG_GENERIC_IOMAP */
diff --git a/arch/sh/kernel/io_generic.c b/arch/sh/kernel/io_generic.c
index 5a7f554d9ca1..4ff507239286 100644
--- a/arch/sh/kernel/io_generic.c
+++ b/arch/sh/kernel/io_generic.c
@@ -73,35 +73,19 @@ u32 generic_inl_p(unsigned long port)
73 73
74void generic_insb(unsigned long port, void *dst, unsigned long count) 74void generic_insb(unsigned long port, void *dst, unsigned long count)
75{ 75{
76 volatile u8 *port_addr; 76 __raw_readsb(__ioport_map(port, 1), dst, count);
77 u8 *buf = dst; 77 dummy_read();
78
79 port_addr = (volatile u8 __force *)__ioport_map(port, 1);
80 while (count--)
81 *buf++ = *port_addr;
82} 78}
83 79
84void generic_insw(unsigned long port, void *dst, unsigned long count) 80void generic_insw(unsigned long port, void *dst, unsigned long count)
85{ 81{
86 volatile u16 *port_addr; 82 __raw_readsw(__ioport_map(port, 2), dst, count);
87 u16 *buf = dst;
88
89 port_addr = (volatile u16 __force *)__ioport_map(port, 2);
90 while (count--)
91 *buf++ = *port_addr;
92
93 dummy_read(); 83 dummy_read();
94} 84}
95 85
96void generic_insl(unsigned long port, void *dst, unsigned long count) 86void generic_insl(unsigned long port, void *dst, unsigned long count)
97{ 87{
98 volatile u32 *port_addr; 88 __raw_readsl(__ioport_map(port, 4), dst, count);
99 u32 *buf = dst;
100
101 port_addr = (volatile u32 __force *)__ioport_map(port, 4);
102 while (count--)
103 *buf++ = *port_addr;
104
105 dummy_read(); 89 dummy_read();
106} 90}
107 91
@@ -145,37 +129,19 @@ void generic_outl_p(u32 b, unsigned long port)
145 */ 129 */
146void generic_outsb(unsigned long port, const void *src, unsigned long count) 130void generic_outsb(unsigned long port, const void *src, unsigned long count)
147{ 131{
148 volatile u8 *port_addr; 132 __raw_writesb(__ioport_map(port, 1), src, count);
149 const u8 *buf = src; 133 dummy_read();
150
151 port_addr = (volatile u8 __force *)__ioport_map(port, 1);
152
153 while (count--)
154 *port_addr = *buf++;
155} 134}
156 135
157void generic_outsw(unsigned long port, const void *src, unsigned long count) 136void generic_outsw(unsigned long port, const void *src, unsigned long count)
158{ 137{
159 volatile u16 *port_addr; 138 __raw_writesw(__ioport_map(port, 2), src, count);
160 const u16 *buf = src;
161
162 port_addr = (volatile u16 __force *)__ioport_map(port, 2);
163
164 while (count--)
165 *port_addr = *buf++;
166
167 dummy_read(); 139 dummy_read();
168} 140}
169 141
170void generic_outsl(unsigned long port, const void *src, unsigned long count) 142void generic_outsl(unsigned long port, const void *src, unsigned long count)
171{ 143{
172 volatile u32 *port_addr; 144 __raw_writesl(__ioport_map(port, 4), src, count);
173 const u32 *buf = src;
174
175 port_addr = (volatile u32 __force *)__ioport_map(port, 4);
176 while (count--)
177 *port_addr = *buf++;
178
179 dummy_read(); 145 dummy_read();
180} 146}
181 147
diff --git a/arch/sh/kernel/io_trapped.c b/arch/sh/kernel/io_trapped.c
index 77dfecb64373..69be603aa2d7 100644
--- a/arch/sh/kernel/io_trapped.c
+++ b/arch/sh/kernel/io_trapped.c
@@ -112,14 +112,15 @@ void __iomem *match_trapped_io_handler(struct list_head *list,
112 struct trapped_io *tiop; 112 struct trapped_io *tiop;
113 struct resource *res; 113 struct resource *res;
114 int k, len; 114 int k, len;
115 unsigned long flags;
115 116
116 spin_lock_irq(&trapped_lock); 117 spin_lock_irqsave(&trapped_lock, flags);
117 list_for_each_entry(tiop, list, list) { 118 list_for_each_entry(tiop, list, list) {
118 voffs = 0; 119 voffs = 0;
119 for (k = 0; k < tiop->num_resources; k++) { 120 for (k = 0; k < tiop->num_resources; k++) {
120 res = tiop->resource + k; 121 res = tiop->resource + k;
121 if (res->start == offset) { 122 if (res->start == offset) {
122 spin_unlock_irq(&trapped_lock); 123 spin_unlock_irqrestore(&trapped_lock, flags);
123 return tiop->virt_base + voffs; 124 return tiop->virt_base + voffs;
124 } 125 }
125 126
@@ -127,7 +128,7 @@ void __iomem *match_trapped_io_handler(struct list_head *list,
127 voffs += roundup(len, PAGE_SIZE); 128 voffs += roundup(len, PAGE_SIZE);
128 } 129 }
129 } 130 }
130 spin_unlock_irq(&trapped_lock); 131 spin_unlock_irqrestore(&trapped_lock, flags);
131 return NULL; 132 return NULL;
132} 133}
133EXPORT_SYMBOL_GPL(match_trapped_io_handler); 134EXPORT_SYMBOL_GPL(match_trapped_io_handler);
@@ -283,7 +284,8 @@ int handle_trapped_io(struct pt_regs *regs, unsigned long address)
283 return 0; 284 return 0;
284 } 285 }
285 286
286 tmp = handle_unaligned_access(instruction, regs, &trapped_io_access); 287 tmp = handle_unaligned_access(instruction, regs,
288 &trapped_io_access, 1);
287 set_fs(oldfs); 289 set_fs(oldfs);
288 return tmp == 0; 290 return tmp == 0;
289} 291}
diff --git a/arch/sh/kernel/irq.c b/arch/sh/kernel/irq.c
index 3d09062f4682..7cb933ba4957 100644
--- a/arch/sh/kernel/irq.c
+++ b/arch/sh/kernel/irq.c
@@ -114,24 +114,7 @@ asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs)
114#endif 114#endif
115 115
116 irq_enter(); 116 irq_enter();
117 117 irq = irq_demux(irq);
118#ifdef CONFIG_DEBUG_STACKOVERFLOW
119 /* Debugging check for stack overflow: is there less than 1KB free? */
120 {
121 long sp;
122
123 __asm__ __volatile__ ("and r15, %0" :
124 "=r" (sp) : "0" (THREAD_SIZE - 1));
125
126 if (unlikely(sp < (sizeof(struct thread_info) + STACK_WARN))) {
127 printk("do_IRQ: stack overflow: %ld\n",
128 sp - sizeof(struct thread_info));
129 dump_stack();
130 }
131 }
132#endif
133
134 irq = irq_demux(intc_evt2irq(irq));
135 118
136#ifdef CONFIG_IRQSTACKS 119#ifdef CONFIG_IRQSTACKS
137 curctx = (union irq_ctx *)current_thread_info(); 120 curctx = (union irq_ctx *)current_thread_info();
@@ -182,11 +165,9 @@ asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs)
182} 165}
183 166
184#ifdef CONFIG_IRQSTACKS 167#ifdef CONFIG_IRQSTACKS
185static char softirq_stack[NR_CPUS * THREAD_SIZE] 168static char softirq_stack[NR_CPUS * THREAD_SIZE] __page_aligned_bss;
186 __attribute__((__section__(".bss.page_aligned")));
187 169
188static char hardirq_stack[NR_CPUS * THREAD_SIZE] 170static char hardirq_stack[NR_CPUS * THREAD_SIZE] __page_aligned_bss;
189 __attribute__((__section__(".bss.page_aligned")));
190 171
191/* 172/*
192 * allocate per-cpu stacks for hardirq and for softirq processing 173 * allocate per-cpu stacks for hardirq and for softirq processing
diff --git a/arch/sh/kernel/kgdb.c b/arch/sh/kernel/kgdb.c
index 305aad742aec..3e532d0d4a5c 100644
--- a/arch/sh/kernel/kgdb.c
+++ b/arch/sh/kernel/kgdb.c
@@ -15,8 +15,6 @@
15#include <linux/io.h> 15#include <linux/io.h>
16#include <asm/cacheflush.h> 16#include <asm/cacheflush.h>
17 17
18char in_nmi = 0; /* Set during NMI to prevent re-entry */
19
20/* Macros for single step instruction identification */ 18/* Macros for single step instruction identification */
21#define OPCODE_BT(op) (((op) & 0xff00) == 0x8900) 19#define OPCODE_BT(op) (((op) & 0xff00) == 0x8900)
22#define OPCODE_BF(op) (((op) & 0xff00) == 0x8b00) 20#define OPCODE_BF(op) (((op) & 0xff00) == 0x8b00)
@@ -195,8 +193,6 @@ void gdb_regs_to_pt_regs(unsigned long *gdb_regs, struct pt_regs *regs)
195 regs->gbr = gdb_regs[GDB_GBR]; 193 regs->gbr = gdb_regs[GDB_GBR];
196 regs->mach = gdb_regs[GDB_MACH]; 194 regs->mach = gdb_regs[GDB_MACH];
197 regs->macl = gdb_regs[GDB_MACL]; 195 regs->macl = gdb_regs[GDB_MACL];
198
199 __asm__ __volatile__ ("ldc %0, vbr" : : "r" (gdb_regs[GDB_VBR]));
200} 196}
201 197
202void sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *p) 198void sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *p)
diff --git a/arch/sh/kernel/localtimer.c b/arch/sh/kernel/localtimer.c
index 96e8eaea1e62..0b04e7d4a9b9 100644
--- a/arch/sh/kernel/localtimer.c
+++ b/arch/sh/kernel/localtimer.c
@@ -22,6 +22,7 @@
22#include <linux/jiffies.h> 22#include <linux/jiffies.h>
23#include <linux/percpu.h> 23#include <linux/percpu.h>
24#include <linux/clockchips.h> 24#include <linux/clockchips.h>
25#include <linux/hardirq.h>
25#include <linux/irq.h> 26#include <linux/irq.h>
26 27
27static DEFINE_PER_CPU(struct clock_event_device, local_clockevent); 28static DEFINE_PER_CPU(struct clock_event_device, local_clockevent);
@@ -33,7 +34,9 @@ void local_timer_interrupt(void)
33{ 34{
34 struct clock_event_device *clk = &__get_cpu_var(local_clockevent); 35 struct clock_event_device *clk = &__get_cpu_var(local_clockevent);
35 36
37 irq_enter();
36 clk->event_handler(clk); 38 clk->event_handler(clk);
39 irq_exit();
37} 40}
38 41
39static void dummy_timer_set_mode(enum clock_event_mode mode, 42static void dummy_timer_set_mode(enum clock_event_mode mode,
@@ -46,8 +49,10 @@ void __cpuinit local_timer_setup(unsigned int cpu)
46 struct clock_event_device *clk = &per_cpu(local_clockevent, cpu); 49 struct clock_event_device *clk = &per_cpu(local_clockevent, cpu);
47 50
48 clk->name = "dummy_timer"; 51 clk->name = "dummy_timer";
49 clk->features = CLOCK_EVT_FEAT_DUMMY; 52 clk->features = CLOCK_EVT_FEAT_ONESHOT |
50 clk->rating = 200; 53 CLOCK_EVT_FEAT_PERIODIC |
54 CLOCK_EVT_FEAT_DUMMY;
55 clk->rating = 400;
51 clk->mult = 1; 56 clk->mult = 1;
52 clk->set_mode = dummy_timer_set_mode; 57 clk->set_mode = dummy_timer_set_mode;
53 clk->broadcast = smp_timer_broadcast; 58 clk->broadcast = smp_timer_broadcast;
diff --git a/arch/sh/kernel/nmi_debug.c b/arch/sh/kernel/nmi_debug.c
new file mode 100644
index 000000000000..ff0abbd1e652
--- /dev/null
+++ b/arch/sh/kernel/nmi_debug.c
@@ -0,0 +1,77 @@
1/*
2 * Copyright (C) 2007 Atmel Corporation
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
8#include <linux/delay.h>
9#include <linux/kdebug.h>
10#include <linux/notifier.h>
11#include <linux/sched.h>
12#include <linux/hardirq.h>
13
14enum nmi_action {
15 NMI_SHOW_STATE = 1 << 0,
16 NMI_SHOW_REGS = 1 << 1,
17 NMI_DIE = 1 << 2,
18 NMI_DEBOUNCE = 1 << 3,
19};
20
21static unsigned long nmi_actions;
22
23static int nmi_debug_notify(struct notifier_block *self,
24 unsigned long val, void *data)
25{
26 struct die_args *args = data;
27
28 if (likely(val != DIE_NMI))
29 return NOTIFY_DONE;
30
31 if (nmi_actions & NMI_SHOW_STATE)
32 show_state();
33 if (nmi_actions & NMI_SHOW_REGS)
34 show_regs(args->regs);
35 if (nmi_actions & NMI_DEBOUNCE)
36 mdelay(10);
37 if (nmi_actions & NMI_DIE)
38 return NOTIFY_BAD;
39
40 return NOTIFY_OK;
41}
42
43static struct notifier_block nmi_debug_nb = {
44 .notifier_call = nmi_debug_notify,
45};
46
47static int __init nmi_debug_setup(char *str)
48{
49 char *p, *sep;
50
51 register_die_notifier(&nmi_debug_nb);
52
53 if (*str != '=')
54 return 0;
55
56 for (p = str + 1; *p; p = sep + 1) {
57 sep = strchr(p, ',');
58 if (sep)
59 *sep = 0;
60 if (strcmp(p, "state") == 0)
61 nmi_actions |= NMI_SHOW_STATE;
62 else if (strcmp(p, "regs") == 0)
63 nmi_actions |= NMI_SHOW_REGS;
64 else if (strcmp(p, "debounce") == 0)
65 nmi_actions |= NMI_DEBOUNCE;
66 else if (strcmp(p, "die") == 0)
67 nmi_actions |= NMI_DIE;
68 else
69 printk(KERN_WARNING "NMI: Unrecognized action `%s'\n",
70 p);
71 if (!sep)
72 break;
73 }
74
75 return 0;
76}
77__setup("nmi_debug", nmi_debug_setup);
diff --git a/arch/sh/kernel/process_32.c b/arch/sh/kernel/process_32.c
index 92d7740faab1..0673c4746be3 100644
--- a/arch/sh/kernel/process_32.c
+++ b/arch/sh/kernel/process_32.c
@@ -23,6 +23,7 @@
23#include <linux/tick.h> 23#include <linux/tick.h>
24#include <linux/reboot.h> 24#include <linux/reboot.h>
25#include <linux/fs.h> 25#include <linux/fs.h>
26#include <linux/ftrace.h>
26#include <linux/preempt.h> 27#include <linux/preempt.h>
27#include <asm/uaccess.h> 28#include <asm/uaccess.h>
28#include <asm/mmu_context.h> 29#include <asm/mmu_context.h>
@@ -31,15 +32,35 @@
31#include <asm/ubc.h> 32#include <asm/ubc.h>
32#include <asm/fpu.h> 33#include <asm/fpu.h>
33#include <asm/syscalls.h> 34#include <asm/syscalls.h>
35#include <asm/watchdog.h>
34 36
35int ubc_usercnt = 0; 37int ubc_usercnt = 0;
36 38
39#ifdef CONFIG_32BIT
40static void watchdog_trigger_immediate(void)
41{
42 sh_wdt_write_cnt(0xFF);
43 sh_wdt_write_csr(0xC2);
44}
45
46void machine_restart(char * __unused)
47{
48 local_irq_disable();
49
50 /* Use watchdog timer to trigger reset */
51 watchdog_trigger_immediate();
52
53 while (1)
54 cpu_sleep();
55}
56#else
37void machine_restart(char * __unused) 57void machine_restart(char * __unused)
38{ 58{
39 /* SR.BL=1 and invoke address error to let CPU reset (manual reset) */ 59 /* SR.BL=1 and invoke address error to let CPU reset (manual reset) */
40 asm volatile("ldc %0, sr\n\t" 60 asm volatile("ldc %0, sr\n\t"
41 "mov.l @%1, %0" : : "r" (0x10000000), "r" (0x80000001)); 61 "mov.l @%1, %0" : : "r" (0x10000000), "r" (0x80000001));
42} 62}
63#endif
43 64
44void machine_halt(void) 65void machine_halt(void)
45{ 66{
@@ -264,8 +285,8 @@ static void ubc_set_tracing(int asid, unsigned long pc)
264 * switch_to(x,y) should switch tasks from x to y. 285 * switch_to(x,y) should switch tasks from x to y.
265 * 286 *
266 */ 287 */
267struct task_struct *__switch_to(struct task_struct *prev, 288__notrace_funcgraph struct task_struct *
268 struct task_struct *next) 289__switch_to(struct task_struct *prev, struct task_struct *next)
269{ 290{
270#if defined(CONFIG_SH_FPU) 291#if defined(CONFIG_SH_FPU)
271 unlazy_fpu(prev, task_pt_regs(prev)); 292 unlazy_fpu(prev, task_pt_regs(prev));
diff --git a/arch/sh/kernel/process_64.c b/arch/sh/kernel/process_64.c
index 24de74214940..1192398ef582 100644
--- a/arch/sh/kernel/process_64.c
+++ b/arch/sh/kernel/process_64.c
@@ -425,7 +425,6 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
425 struct task_struct *p, struct pt_regs *regs) 425 struct task_struct *p, struct pt_regs *regs)
426{ 426{
427 struct pt_regs *childregs; 427 struct pt_regs *childregs;
428 unsigned long long se; /* Sign extension */
429 428
430#ifdef CONFIG_SH_FPU 429#ifdef CONFIG_SH_FPU
431 if(last_task_used_math == current) { 430 if(last_task_used_math == current) {
@@ -441,11 +440,19 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
441 440
442 *childregs = *regs; 441 *childregs = *regs;
443 442
443 /*
444 * Sign extend the edited stack.
445 * Note that thread.pc and thread.pc will stay
446 * 32-bit wide and context switch must take care
447 * of NEFF sign extension.
448 */
444 if (user_mode(regs)) { 449 if (user_mode(regs)) {
445 childregs->regs[15] = usp; 450 childregs->regs[15] = neff_sign_extend(usp);
446 p->thread.uregs = childregs; 451 p->thread.uregs = childregs;
447 } else { 452 } else {
448 childregs->regs[15] = (unsigned long)task_stack_page(p) + THREAD_SIZE; 453 childregs->regs[15] =
454 neff_sign_extend((unsigned long)task_stack_page(p) +
455 THREAD_SIZE);
449 } 456 }
450 457
451 childregs->regs[9] = 0; /* Set return value for child */ 458 childregs->regs[9] = 0; /* Set return value for child */
@@ -454,17 +461,6 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
454 p->thread.sp = (unsigned long) childregs; 461 p->thread.sp = (unsigned long) childregs;
455 p->thread.pc = (unsigned long) ret_from_fork; 462 p->thread.pc = (unsigned long) ret_from_fork;
456 463
457 /*
458 * Sign extend the edited stack.
459 * Note that thread.pc and thread.pc will stay
460 * 32-bit wide and context switch must take care
461 * of NEFF sign extension.
462 */
463
464 se = childregs->regs[15];
465 se = (se & NEFF_SIGN) ? (se | NEFF_MASK) : se;
466 childregs->regs[15] = se;
467
468 return 0; 464 return 0;
469} 465}
470 466
diff --git a/arch/sh/kernel/ptrace_32.c b/arch/sh/kernel/ptrace_32.c
index 3392e835a374..9be35f348093 100644
--- a/arch/sh/kernel/ptrace_32.c
+++ b/arch/sh/kernel/ptrace_32.c
@@ -34,6 +34,9 @@
34#include <asm/syscalls.h> 34#include <asm/syscalls.h>
35#include <asm/fpu.h> 35#include <asm/fpu.h>
36 36
37#define CREATE_TRACE_POINTS
38#include <trace/events/syscalls.h>
39
37/* 40/*
38 * This routine will get a word off of the process kernel stack. 41 * This routine will get a word off of the process kernel stack.
39 */ 42 */
@@ -459,6 +462,9 @@ asmlinkage long do_syscall_trace_enter(struct pt_regs *regs)
459 */ 462 */
460 ret = -1L; 463 ret = -1L;
461 464
465 if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT)))
466 trace_sys_enter(regs, regs->regs[0]);
467
462 if (unlikely(current->audit_context)) 468 if (unlikely(current->audit_context))
463 audit_syscall_entry(audit_arch(), regs->regs[3], 469 audit_syscall_entry(audit_arch(), regs->regs[3],
464 regs->regs[4], regs->regs[5], 470 regs->regs[4], regs->regs[5],
@@ -475,6 +481,9 @@ asmlinkage void do_syscall_trace_leave(struct pt_regs *regs)
475 audit_syscall_exit(AUDITSC_RESULT(regs->regs[0]), 481 audit_syscall_exit(AUDITSC_RESULT(regs->regs[0]),
476 regs->regs[0]); 482 regs->regs[0]);
477 483
484 if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT)))
485 trace_sys_exit(regs, regs->regs[0]);
486
478 step = test_thread_flag(TIF_SINGLESTEP); 487 step = test_thread_flag(TIF_SINGLESTEP);
479 if (step || test_thread_flag(TIF_SYSCALL_TRACE)) 488 if (step || test_thread_flag(TIF_SYSCALL_TRACE))
480 tracehook_report_syscall_exit(regs, step); 489 tracehook_report_syscall_exit(regs, step);
diff --git a/arch/sh/kernel/ptrace_64.c b/arch/sh/kernel/ptrace_64.c
index 695097438f02..952da83903da 100644
--- a/arch/sh/kernel/ptrace_64.c
+++ b/arch/sh/kernel/ptrace_64.c
@@ -40,6 +40,9 @@
40#include <asm/syscalls.h> 40#include <asm/syscalls.h>
41#include <asm/fpu.h> 41#include <asm/fpu.h>
42 42
43#define CREATE_TRACE_POINTS
44#include <trace/events/syscalls.h>
45
43/* This mask defines the bits of the SR which the user is not allowed to 46/* This mask defines the bits of the SR which the user is not allowed to
44 change, which are everything except S, Q, M, PR, SZ, FR. */ 47 change, which are everything except S, Q, M, PR, SZ, FR. */
45#define SR_MASK (0xffff8cfd) 48#define SR_MASK (0xffff8cfd)
@@ -438,6 +441,9 @@ asmlinkage long long do_syscall_trace_enter(struct pt_regs *regs)
438 */ 441 */
439 ret = -1LL; 442 ret = -1LL;
440 443
444 if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT)))
445 trace_sys_enter(regs, regs->regs[9]);
446
441 if (unlikely(current->audit_context)) 447 if (unlikely(current->audit_context))
442 audit_syscall_entry(audit_arch(), regs->regs[1], 448 audit_syscall_entry(audit_arch(), regs->regs[1],
443 regs->regs[2], regs->regs[3], 449 regs->regs[2], regs->regs[3],
@@ -452,6 +458,9 @@ asmlinkage void do_syscall_trace_leave(struct pt_regs *regs)
452 audit_syscall_exit(AUDITSC_RESULT(regs->regs[9]), 458 audit_syscall_exit(AUDITSC_RESULT(regs->regs[9]),
453 regs->regs[9]); 459 regs->regs[9]);
454 460
461 if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT)))
462 trace_sys_exit(regs, regs->regs[9]);
463
455 if (test_thread_flag(TIF_SYSCALL_TRACE)) 464 if (test_thread_flag(TIF_SYSCALL_TRACE))
456 tracehook_report_syscall_exit(regs, 0); 465 tracehook_report_syscall_exit(regs, 0);
457} 466}
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c
index dd38338553ef..f9d44f8e0df6 100644
--- a/arch/sh/kernel/setup.c
+++ b/arch/sh/kernel/setup.c
@@ -30,6 +30,7 @@
30#include <linux/clk.h> 30#include <linux/clk.h>
31#include <linux/delay.h> 31#include <linux/delay.h>
32#include <linux/platform_device.h> 32#include <linux/platform_device.h>
33#include <linux/lmb.h>
33#include <asm/uaccess.h> 34#include <asm/uaccess.h>
34#include <asm/io.h> 35#include <asm/io.h>
35#include <asm/page.h> 36#include <asm/page.h>
@@ -48,6 +49,7 @@
48struct sh_cpuinfo cpu_data[NR_CPUS] __read_mostly = { 49struct sh_cpuinfo cpu_data[NR_CPUS] __read_mostly = {
49 [0] = { 50 [0] = {
50 .type = CPU_SH_NONE, 51 .type = CPU_SH_NONE,
52 .family = CPU_FAMILY_UNKNOWN,
51 .loops_per_jiffy = 10000000, 53 .loops_per_jiffy = 10000000,
52 }, 54 },
53}; 55};
@@ -233,39 +235,45 @@ void __init __add_active_range(unsigned int nid, unsigned long start_pfn,
233void __init setup_bootmem_allocator(unsigned long free_pfn) 235void __init setup_bootmem_allocator(unsigned long free_pfn)
234{ 236{
235 unsigned long bootmap_size; 237 unsigned long bootmap_size;
238 unsigned long bootmap_pages, bootmem_paddr;
239 u64 total_pages = (lmb_end_of_DRAM() - __MEMORY_START) >> PAGE_SHIFT;
240 int i;
241
242 bootmap_pages = bootmem_bootmap_pages(total_pages);
243
244 bootmem_paddr = lmb_alloc(bootmap_pages << PAGE_SHIFT, PAGE_SIZE);
236 245
237 /* 246 /*
238 * Find a proper area for the bootmem bitmap. After this 247 * Find a proper area for the bootmem bitmap. After this
239 * bootstrap step all allocations (until the page allocator 248 * bootstrap step all allocations (until the page allocator
240 * is intact) must be done via bootmem_alloc(). 249 * is intact) must be done via bootmem_alloc().
241 */ 250 */
242 bootmap_size = init_bootmem_node(NODE_DATA(0), free_pfn, 251 bootmap_size = init_bootmem_node(NODE_DATA(0),
252 bootmem_paddr >> PAGE_SHIFT,
243 min_low_pfn, max_low_pfn); 253 min_low_pfn, max_low_pfn);
244 254
245 __add_active_range(0, min_low_pfn, max_low_pfn); 255 /* Add active regions with valid PFNs. */
246 register_bootmem_low_pages(); 256 for (i = 0; i < lmb.memory.cnt; i++) {
247 257 unsigned long start_pfn, end_pfn;
248 node_set_online(0); 258 start_pfn = lmb.memory.region[i].base >> PAGE_SHIFT;
259 end_pfn = start_pfn + lmb_size_pages(&lmb.memory, i);
260 __add_active_range(0, start_pfn, end_pfn);
261 }
249 262
250 /* 263 /*
251 * Reserve the kernel text and 264 * Add all physical memory to the bootmem map and mark each
252 * Reserve the bootmem bitmap. We do this in two steps (first step 265 * area as present.
253 * was init_bootmem()), because this catches the (definitely buggy)
254 * case of us accidentally initializing the bootmem allocator with
255 * an invalid RAM area.
256 */ 266 */
257 reserve_bootmem(__MEMORY_START + CONFIG_ZERO_PAGE_OFFSET, 267 register_bootmem_low_pages();
258 (PFN_PHYS(free_pfn) + bootmap_size + PAGE_SIZE - 1) -
259 (__MEMORY_START + CONFIG_ZERO_PAGE_OFFSET),
260 BOOTMEM_DEFAULT);
261 268
262 /* 269 /* Reserve the sections we're already using. */
263 * Reserve physical pages below CONFIG_ZERO_PAGE_OFFSET. 270 for (i = 0; i < lmb.reserved.cnt; i++)
264 */ 271 reserve_bootmem(lmb.reserved.region[i].base,
265 if (CONFIG_ZERO_PAGE_OFFSET != 0) 272 lmb_size_bytes(&lmb.reserved, i),
266 reserve_bootmem(__MEMORY_START, CONFIG_ZERO_PAGE_OFFSET,
267 BOOTMEM_DEFAULT); 273 BOOTMEM_DEFAULT);
268 274
275 node_set_online(0);
276
269 sparse_memory_present_with_active_regions(0); 277 sparse_memory_present_with_active_regions(0);
270 278
271#ifdef CONFIG_BLK_DEV_INITRD 279#ifdef CONFIG_BLK_DEV_INITRD
@@ -296,12 +304,37 @@ void __init setup_bootmem_allocator(unsigned long free_pfn)
296static void __init setup_memory(void) 304static void __init setup_memory(void)
297{ 305{
298 unsigned long start_pfn; 306 unsigned long start_pfn;
307 u64 base = min_low_pfn << PAGE_SHIFT;
308 u64 size = (max_low_pfn << PAGE_SHIFT) - base;
299 309
300 /* 310 /*
301 * Partially used pages are not usable - thus 311 * Partially used pages are not usable - thus
302 * we are rounding upwards: 312 * we are rounding upwards:
303 */ 313 */
304 start_pfn = PFN_UP(__pa(_end)); 314 start_pfn = PFN_UP(__pa(_end));
315
316 lmb_add(base, size);
317
318 /*
319 * Reserve the kernel text and
320 * Reserve the bootmem bitmap. We do this in two steps (first step
321 * was init_bootmem()), because this catches the (definitely buggy)
322 * case of us accidentally initializing the bootmem allocator with
323 * an invalid RAM area.
324 */
325 lmb_reserve(__MEMORY_START + CONFIG_ZERO_PAGE_OFFSET,
326 (PFN_PHYS(start_pfn) + PAGE_SIZE - 1) -
327 (__MEMORY_START + CONFIG_ZERO_PAGE_OFFSET));
328
329 /*
330 * Reserve physical pages below CONFIG_ZERO_PAGE_OFFSET.
331 */
332 if (CONFIG_ZERO_PAGE_OFFSET != 0)
333 lmb_reserve(__MEMORY_START, CONFIG_ZERO_PAGE_OFFSET);
334
335 lmb_analyze();
336 lmb_dump_all();
337
305 setup_bootmem_allocator(start_pfn); 338 setup_bootmem_allocator(start_pfn);
306} 339}
307#else 340#else
@@ -372,10 +405,14 @@ void __init setup_arch(char **cmdline_p)
372 if (!memory_end) 405 if (!memory_end)
373 memory_end = memory_start + __MEMORY_SIZE; 406 memory_end = memory_start + __MEMORY_SIZE;
374 407
375#ifdef CONFIG_CMDLINE_BOOL 408#ifdef CONFIG_CMDLINE_OVERWRITE
376 strlcpy(command_line, CONFIG_CMDLINE, sizeof(command_line)); 409 strlcpy(command_line, CONFIG_CMDLINE, sizeof(command_line));
377#else 410#else
378 strlcpy(command_line, COMMAND_LINE, sizeof(command_line)); 411 strlcpy(command_line, COMMAND_LINE, sizeof(command_line));
412#ifdef CONFIG_CMDLINE_EXTEND
413 strlcat(command_line, " ", sizeof(command_line));
414 strlcat(command_line, CONFIG_CMDLINE, sizeof(command_line));
415#endif
379#endif 416#endif
380 417
381 /* Save unparsed command line copy for /proc/cmdline */ 418 /* Save unparsed command line copy for /proc/cmdline */
@@ -402,6 +439,7 @@ void __init setup_arch(char **cmdline_p)
402 nodes_clear(node_online_map); 439 nodes_clear(node_online_map);
403 440
404 /* Setup bootmem with available RAM */ 441 /* Setup bootmem with available RAM */
442 lmb_init();
405 setup_memory(); 443 setup_memory();
406 sparse_init(); 444 sparse_init();
407 445
@@ -448,7 +486,7 @@ static const char *cpu_name[] = {
448 [CPU_SH7763] = "SH7763", [CPU_SH7770] = "SH7770", 486 [CPU_SH7763] = "SH7763", [CPU_SH7770] = "SH7770",
449 [CPU_SH7780] = "SH7780", [CPU_SH7781] = "SH7781", 487 [CPU_SH7780] = "SH7780", [CPU_SH7781] = "SH7781",
450 [CPU_SH7343] = "SH7343", [CPU_SH7785] = "SH7785", 488 [CPU_SH7343] = "SH7343", [CPU_SH7785] = "SH7785",
451 [CPU_SH7786] = "SH7786", 489 [CPU_SH7786] = "SH7786", [CPU_SH7757] = "SH7757",
452 [CPU_SH7722] = "SH7722", [CPU_SHX3] = "SH-X3", 490 [CPU_SH7722] = "SH7722", [CPU_SHX3] = "SH-X3",
453 [CPU_SH5_101] = "SH5-101", [CPU_SH5_103] = "SH5-103", 491 [CPU_SH5_101] = "SH5-101", [CPU_SH5_103] = "SH5-103",
454 [CPU_MXG] = "MX-G", [CPU_SH7723] = "SH7723", 492 [CPU_MXG] = "MX-G", [CPU_SH7723] = "SH7723",
diff --git a/arch/sh/kernel/sh_ksyms_32.c b/arch/sh/kernel/sh_ksyms_32.c
index fcc5de31f83b..8dbe26b17c44 100644
--- a/arch/sh/kernel/sh_ksyms_32.c
+++ b/arch/sh/kernel/sh_ksyms_32.c
@@ -101,20 +101,14 @@ EXPORT_SYMBOL(flush_cache_range);
101EXPORT_SYMBOL(flush_dcache_page); 101EXPORT_SYMBOL(flush_dcache_page);
102#endif 102#endif
103 103
104#if !defined(CONFIG_CACHE_OFF) && defined(CONFIG_MMU) && \ 104#ifdef CONFIG_MCOUNT
105 (defined(CONFIG_CPU_SH4) || defined(CONFIG_SH7705_CACHE_32KB)) 105DECLARE_EXPORT(mcount);
106EXPORT_SYMBOL(clear_user_page);
107#endif
108
109#ifdef CONFIG_FUNCTION_TRACER
110EXPORT_SYMBOL(mcount);
111#endif 106#endif
112EXPORT_SYMBOL(csum_partial); 107EXPORT_SYMBOL(csum_partial);
113EXPORT_SYMBOL(csum_partial_copy_generic); 108EXPORT_SYMBOL(csum_partial_copy_generic);
114#ifdef CONFIG_IPV6 109#ifdef CONFIG_IPV6
115EXPORT_SYMBOL(csum_ipv6_magic); 110EXPORT_SYMBOL(csum_ipv6_magic);
116#endif 111#endif
117EXPORT_SYMBOL(clear_page);
118EXPORT_SYMBOL(copy_page); 112EXPORT_SYMBOL(copy_page);
119EXPORT_SYMBOL(__clear_user); 113EXPORT_SYMBOL(__clear_user);
120EXPORT_SYMBOL(_ebss); 114EXPORT_SYMBOL(_ebss);
diff --git a/arch/sh/kernel/sh_ksyms_64.c b/arch/sh/kernel/sh_ksyms_64.c
index f5bd156ea504..d008e17eb257 100644
--- a/arch/sh/kernel/sh_ksyms_64.c
+++ b/arch/sh/kernel/sh_ksyms_64.c
@@ -30,14 +30,6 @@ extern int dump_fpu(struct pt_regs *, elf_fpregset_t *);
30EXPORT_SYMBOL(dump_fpu); 30EXPORT_SYMBOL(dump_fpu);
31EXPORT_SYMBOL(kernel_thread); 31EXPORT_SYMBOL(kernel_thread);
32 32
33#if !defined(CONFIG_CACHE_OFF) && defined(CONFIG_MMU)
34EXPORT_SYMBOL(clear_user_page);
35#endif
36
37#ifndef CONFIG_CACHE_OFF
38EXPORT_SYMBOL(flush_dcache_page);
39#endif
40
41#ifdef CONFIG_VT 33#ifdef CONFIG_VT
42EXPORT_SYMBOL(screen_info); 34EXPORT_SYMBOL(screen_info);
43#endif 35#endif
@@ -52,7 +44,6 @@ EXPORT_SYMBOL(__get_user_asm_l);
52EXPORT_SYMBOL(__get_user_asm_q); 44EXPORT_SYMBOL(__get_user_asm_q);
53EXPORT_SYMBOL(__strnlen_user); 45EXPORT_SYMBOL(__strnlen_user);
54EXPORT_SYMBOL(__strncpy_from_user); 46EXPORT_SYMBOL(__strncpy_from_user);
55EXPORT_SYMBOL(clear_page);
56EXPORT_SYMBOL(__clear_user); 47EXPORT_SYMBOL(__clear_user);
57EXPORT_SYMBOL(copy_page); 48EXPORT_SYMBOL(copy_page);
58EXPORT_SYMBOL(__copy_user); 49EXPORT_SYMBOL(__copy_user);
diff --git a/arch/sh/kernel/signal_32.c b/arch/sh/kernel/signal_32.c
index 04a21883f327..6729703547a1 100644
--- a/arch/sh/kernel/signal_32.c
+++ b/arch/sh/kernel/signal_32.c
@@ -41,6 +41,16 @@ struct fdpic_func_descriptor {
41}; 41};
42 42
43/* 43/*
44 * The following define adds a 64 byte gap between the signal
45 * stack frame and previous contents of the stack. This allows
46 * frame unwinding in a function epilogue but only if a frame
47 * pointer is used in the function. This is necessary because
48 * current gcc compilers (<4.3) do not generate unwind info on
49 * SH for function epilogues.
50 */
51#define UNWINDGUARD 64
52
53/*
44 * Atomically swap in the new signal mask, and wait for a signal. 54 * Atomically swap in the new signal mask, and wait for a signal.
45 */ 55 */
46asmlinkage int 56asmlinkage int
@@ -327,7 +337,7 @@ get_sigframe(struct k_sigaction *ka, unsigned long sp, size_t frame_size)
327 sp = current->sas_ss_sp + current->sas_ss_size; 337 sp = current->sas_ss_sp + current->sas_ss_size;
328 } 338 }
329 339
330 return (void __user *)((sp - frame_size) & -8ul); 340 return (void __user *)((sp - (frame_size+UNWINDGUARD)) & -8ul);
331} 341}
332 342
333/* These symbols are defined with the addresses in the vsyscall page. 343/* These symbols are defined with the addresses in the vsyscall page.
diff --git a/arch/sh/kernel/signal_64.c b/arch/sh/kernel/signal_64.c
index 9e5c9b1d7e98..74793c80a57a 100644
--- a/arch/sh/kernel/signal_64.c
+++ b/arch/sh/kernel/signal_64.c
@@ -561,13 +561,11 @@ static int setup_frame(int sig, struct k_sigaction *ka,
561 /* Set up to return from userspace. If provided, use a stub 561 /* Set up to return from userspace. If provided, use a stub
562 already in userspace. */ 562 already in userspace. */
563 if (ka->sa.sa_flags & SA_RESTORER) { 563 if (ka->sa.sa_flags & SA_RESTORER) {
564 DEREF_REG_PR = (unsigned long) ka->sa.sa_restorer | 0x1;
565
566 /* 564 /*
567 * On SH5 all edited pointers are subject to NEFF 565 * On SH5 all edited pointers are subject to NEFF
568 */ 566 */
569 DEREF_REG_PR = (DEREF_REG_PR & NEFF_SIGN) ? 567 DEREF_REG_PR = neff_sign_extend((unsigned long)
570 (DEREF_REG_PR | NEFF_MASK) : DEREF_REG_PR; 568 ka->sa.sa_restorer | 0x1);
571 } else { 569 } else {
572 /* 570 /*
573 * Different approach on SH5. 571 * Different approach on SH5.
@@ -580,9 +578,8 @@ static int setup_frame(int sig, struct k_sigaction *ka,
580 * . being code, linker turns ShMedia bit on, always 578 * . being code, linker turns ShMedia bit on, always
581 * dereference index -1. 579 * dereference index -1.
582 */ 580 */
583 DEREF_REG_PR = (unsigned long) frame->retcode | 0x01; 581 DEREF_REG_PR = neff_sign_extend((unsigned long)
584 DEREF_REG_PR = (DEREF_REG_PR & NEFF_SIGN) ? 582 frame->retcode | 0x01);
585 (DEREF_REG_PR | NEFF_MASK) : DEREF_REG_PR;
586 583
587 if (__copy_to_user(frame->retcode, 584 if (__copy_to_user(frame->retcode,
588 (void *)((unsigned long)sa_default_restorer & (~1)), 16) != 0) 585 (void *)((unsigned long)sa_default_restorer & (~1)), 16) != 0)
@@ -596,9 +593,7 @@ static int setup_frame(int sig, struct k_sigaction *ka,
596 * Set up registers for signal handler. 593 * Set up registers for signal handler.
597 * All edited pointers are subject to NEFF. 594 * All edited pointers are subject to NEFF.
598 */ 595 */
599 regs->regs[REG_SP] = (unsigned long) frame; 596 regs->regs[REG_SP] = neff_sign_extend((unsigned long)frame);
600 regs->regs[REG_SP] = (regs->regs[REG_SP] & NEFF_SIGN) ?
601 (regs->regs[REG_SP] | NEFF_MASK) : regs->regs[REG_SP];
602 regs->regs[REG_ARG1] = signal; /* Arg for signal handler */ 597 regs->regs[REG_ARG1] = signal; /* Arg for signal handler */
603 598
604 /* FIXME: 599 /* FIXME:
@@ -613,8 +608,7 @@ static int setup_frame(int sig, struct k_sigaction *ka,
613 regs->regs[REG_ARG2] = (unsigned long long)(unsigned long)(signed long)&frame->sc; 608 regs->regs[REG_ARG2] = (unsigned long long)(unsigned long)(signed long)&frame->sc;
614 regs->regs[REG_ARG3] = (unsigned long long)(unsigned long)(signed long)&frame->sc; 609 regs->regs[REG_ARG3] = (unsigned long long)(unsigned long)(signed long)&frame->sc;
615 610
616 regs->pc = (unsigned long) ka->sa.sa_handler; 611 regs->pc = neff_sign_extend((unsigned long)ka->sa.sa_handler);
617 regs->pc = (regs->pc & NEFF_SIGN) ? (regs->pc | NEFF_MASK) : regs->pc;
618 612
619 set_fs(USER_DS); 613 set_fs(USER_DS);
620 614
@@ -676,13 +670,11 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
676 /* Set up to return from userspace. If provided, use a stub 670 /* Set up to return from userspace. If provided, use a stub
677 already in userspace. */ 671 already in userspace. */
678 if (ka->sa.sa_flags & SA_RESTORER) { 672 if (ka->sa.sa_flags & SA_RESTORER) {
679 DEREF_REG_PR = (unsigned long) ka->sa.sa_restorer | 0x1;
680
681 /* 673 /*
682 * On SH5 all edited pointers are subject to NEFF 674 * On SH5 all edited pointers are subject to NEFF
683 */ 675 */
684 DEREF_REG_PR = (DEREF_REG_PR & NEFF_SIGN) ? 676 DEREF_REG_PR = neff_sign_extend((unsigned long)
685 (DEREF_REG_PR | NEFF_MASK) : DEREF_REG_PR; 677 ka->sa.sa_restorer | 0x1);
686 } else { 678 } else {
687 /* 679 /*
688 * Different approach on SH5. 680 * Different approach on SH5.
@@ -695,15 +687,14 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
695 * . being code, linker turns ShMedia bit on, always 687 * . being code, linker turns ShMedia bit on, always
696 * dereference index -1. 688 * dereference index -1.
697 */ 689 */
698 690 DEREF_REG_PR = neff_sign_extend((unsigned long)
699 DEREF_REG_PR = (unsigned long) frame->retcode | 0x01; 691 frame->retcode | 0x01);
700 DEREF_REG_PR = (DEREF_REG_PR & NEFF_SIGN) ?
701 (DEREF_REG_PR | NEFF_MASK) : DEREF_REG_PR;
702 692
703 if (__copy_to_user(frame->retcode, 693 if (__copy_to_user(frame->retcode,
704 (void *)((unsigned long)sa_default_rt_restorer & (~1)), 16) != 0) 694 (void *)((unsigned long)sa_default_rt_restorer & (~1)), 16) != 0)
705 goto give_sigsegv; 695 goto give_sigsegv;
706 696
697 /* Cohere the trampoline with the I-cache. */
707 flush_icache_range(DEREF_REG_PR-1, DEREF_REG_PR-1+15); 698 flush_icache_range(DEREF_REG_PR-1, DEREF_REG_PR-1+15);
708 } 699 }
709 700
@@ -711,14 +702,11 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
711 * Set up registers for signal handler. 702 * Set up registers for signal handler.
712 * All edited pointers are subject to NEFF. 703 * All edited pointers are subject to NEFF.
713 */ 704 */
714 regs->regs[REG_SP] = (unsigned long) frame; 705 regs->regs[REG_SP] = neff_sign_extend((unsigned long)frame);
715 regs->regs[REG_SP] = (regs->regs[REG_SP] & NEFF_SIGN) ?
716 (regs->regs[REG_SP] | NEFF_MASK) : regs->regs[REG_SP];
717 regs->regs[REG_ARG1] = signal; /* Arg for signal handler */ 706 regs->regs[REG_ARG1] = signal; /* Arg for signal handler */
718 regs->regs[REG_ARG2] = (unsigned long long)(unsigned long)(signed long)&frame->info; 707 regs->regs[REG_ARG2] = (unsigned long long)(unsigned long)(signed long)&frame->info;
719 regs->regs[REG_ARG3] = (unsigned long long)(unsigned long)(signed long)&frame->uc.uc_mcontext; 708 regs->regs[REG_ARG3] = (unsigned long long)(unsigned long)(signed long)&frame->uc.uc_mcontext;
720 regs->pc = (unsigned long) ka->sa.sa_handler; 709 regs->pc = neff_sign_extend((unsigned long)ka->sa.sa_handler);
721 regs->pc = (regs->pc & NEFF_SIGN) ? (regs->pc | NEFF_MASK) : regs->pc;
722 710
723 set_fs(USER_DS); 711 set_fs(USER_DS);
724 712
diff --git a/arch/sh/kernel/stacktrace.c b/arch/sh/kernel/stacktrace.c
index 1a2a5eb76e41..c2e45c48409c 100644
--- a/arch/sh/kernel/stacktrace.c
+++ b/arch/sh/kernel/stacktrace.c
@@ -13,47 +13,93 @@
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 <linux/module.h>
16#include <asm/unwinder.h>
16#include <asm/ptrace.h> 17#include <asm/ptrace.h>
18#include <asm/stacktrace.h>
19
20static void save_stack_warning(void *data, char *msg)
21{
22}
23
24static void
25save_stack_warning_symbol(void *data, char *msg, unsigned long symbol)
26{
27}
28
29static int save_stack_stack(void *data, char *name)
30{
31 return 0;
32}
17 33
18/* 34/*
19 * Save stack-backtrace addresses into a stack_trace buffer. 35 * Save stack-backtrace addresses into a stack_trace buffer.
20 */ 36 */
37static void save_stack_address(void *data, unsigned long addr, int reliable)
38{
39 struct stack_trace *trace = data;
40
41 if (!reliable)
42 return;
43
44 if (trace->skip > 0) {
45 trace->skip--;
46 return;
47 }
48
49 if (trace->nr_entries < trace->max_entries)
50 trace->entries[trace->nr_entries++] = addr;
51}
52
53static const struct stacktrace_ops save_stack_ops = {
54 .warning = save_stack_warning,
55 .warning_symbol = save_stack_warning_symbol,
56 .stack = save_stack_stack,
57 .address = save_stack_address,
58};
59
21void save_stack_trace(struct stack_trace *trace) 60void save_stack_trace(struct stack_trace *trace)
22{ 61{
23 unsigned long *sp = (unsigned long *)current_stack_pointer; 62 unsigned long *sp = (unsigned long *)current_stack_pointer;
24 63
25 while (!kstack_end(sp)) { 64 unwind_stack(current, NULL, sp, &save_stack_ops, trace);
26 unsigned long addr = *sp++; 65 if (trace->nr_entries < trace->max_entries)
27 66 trace->entries[trace->nr_entries++] = ULONG_MAX;
28 if (__kernel_text_address(addr)) {
29 if (trace->skip > 0)
30 trace->skip--;
31 else
32 trace->entries[trace->nr_entries++] = addr;
33 if (trace->nr_entries >= trace->max_entries)
34 break;
35 }
36 }
37} 67}
38EXPORT_SYMBOL_GPL(save_stack_trace); 68EXPORT_SYMBOL_GPL(save_stack_trace);
39 69
70static void
71save_stack_address_nosched(void *data, unsigned long addr, int reliable)
72{
73 struct stack_trace *trace = (struct stack_trace *)data;
74
75 if (!reliable)
76 return;
77
78 if (in_sched_functions(addr))
79 return;
80
81 if (trace->skip > 0) {
82 trace->skip--;
83 return;
84 }
85
86 if (trace->nr_entries < trace->max_entries)
87 trace->entries[trace->nr_entries++] = addr;
88}
89
90static const struct stacktrace_ops save_stack_ops_nosched = {
91 .warning = save_stack_warning,
92 .warning_symbol = save_stack_warning_symbol,
93 .stack = save_stack_stack,
94 .address = save_stack_address_nosched,
95};
96
40void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace) 97void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace)
41{ 98{
42 unsigned long *sp = (unsigned long *)tsk->thread.sp; 99 unsigned long *sp = (unsigned long *)tsk->thread.sp;
43 100
44 while (!kstack_end(sp)) { 101 unwind_stack(current, NULL, sp, &save_stack_ops_nosched, trace);
45 unsigned long addr = *sp++; 102 if (trace->nr_entries < trace->max_entries)
46 103 trace->entries[trace->nr_entries++] = ULONG_MAX;
47 if (__kernel_text_address(addr)) {
48 if (in_sched_functions(addr))
49 break;
50 if (trace->skip > 0)
51 trace->skip--;
52 else
53 trace->entries[trace->nr_entries++] = addr;
54 if (trace->nr_entries >= trace->max_entries)
55 break;
56 }
57 }
58} 104}
59EXPORT_SYMBOL_GPL(save_stack_trace_tsk); 105EXPORT_SYMBOL_GPL(save_stack_trace_tsk);
diff --git a/arch/sh/kernel/sys_sh.c b/arch/sh/kernel/sys_sh.c
index 90d00e47264d..8aa5d1ceaf14 100644
--- a/arch/sh/kernel/sys_sh.c
+++ b/arch/sh/kernel/sys_sh.c
@@ -25,6 +25,8 @@
25#include <asm/syscalls.h> 25#include <asm/syscalls.h>
26#include <asm/uaccess.h> 26#include <asm/uaccess.h>
27#include <asm/unistd.h> 27#include <asm/unistd.h>
28#include <asm/cacheflush.h>
29#include <asm/cachectl.h>
28 30
29static inline long 31static inline long
30do_mmap2(unsigned long addr, unsigned long len, unsigned long prot, 32do_mmap2(unsigned long addr, unsigned long len, unsigned long prot,
@@ -179,6 +181,47 @@ asmlinkage int sys_ipc(uint call, int first, int second,
179 return -EINVAL; 181 return -EINVAL;
180} 182}
181 183
184/* sys_cacheflush -- flush (part of) the processor cache. */
185asmlinkage int sys_cacheflush(unsigned long addr, unsigned long len, int op)
186{
187 struct vm_area_struct *vma;
188
189 if ((op <= 0) || (op > (CACHEFLUSH_D_PURGE|CACHEFLUSH_I)))
190 return -EINVAL;
191
192 /*
193 * Verify that the specified address region actually belongs
194 * to this process.
195 */
196 if (addr + len < addr)
197 return -EFAULT;
198
199 down_read(&current->mm->mmap_sem);
200 vma = find_vma (current->mm, addr);
201 if (vma == NULL || addr < vma->vm_start || addr + len > vma->vm_end) {
202 up_read(&current->mm->mmap_sem);
203 return -EFAULT;
204 }
205
206 switch (op & CACHEFLUSH_D_PURGE) {
207 case CACHEFLUSH_D_INVAL:
208 __flush_invalidate_region((void *)addr, len);
209 break;
210 case CACHEFLUSH_D_WB:
211 __flush_wback_region((void *)addr, len);
212 break;
213 case CACHEFLUSH_D_PURGE:
214 __flush_purge_region((void *)addr, len);
215 break;
216 }
217
218 if (op & CACHEFLUSH_I)
219 flush_cache_all();
220
221 up_read(&current->mm->mmap_sem);
222 return 0;
223}
224
182asmlinkage int sys_uname(struct old_utsname __user *name) 225asmlinkage int sys_uname(struct old_utsname __user *name)
183{ 226{
184 int err; 227 int err;
diff --git a/arch/sh/kernel/sys_sh32.c b/arch/sh/kernel/sys_sh32.c
index 63ba12836eae..eb68bfdd86e6 100644
--- a/arch/sh/kernel/sys_sh32.c
+++ b/arch/sh/kernel/sys_sh32.c
@@ -9,7 +9,6 @@
9#include <linux/syscalls.h> 9#include <linux/syscalls.h>
10#include <linux/mman.h> 10#include <linux/mman.h>
11#include <linux/file.h> 11#include <linux/file.h>
12#include <linux/utsname.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/fs.h> 13#include <linux/fs.h>
15#include <linux/ipc.h> 14#include <linux/ipc.h>
diff --git a/arch/sh/kernel/sys_sh64.c b/arch/sh/kernel/sys_sh64.c
index 91fb8445a5a0..287235768bc5 100644
--- a/arch/sh/kernel/sys_sh64.c
+++ b/arch/sh/kernel/sys_sh64.c
@@ -23,7 +23,6 @@
23#include <linux/stat.h> 23#include <linux/stat.h>
24#include <linux/mman.h> 24#include <linux/mman.h>
25#include <linux/file.h> 25#include <linux/file.h>
26#include <linux/utsname.h>
27#include <linux/syscalls.h> 26#include <linux/syscalls.h>
28#include <linux/ipc.h> 27#include <linux/ipc.h>
29#include <asm/uaccess.h> 28#include <asm/uaccess.h>
diff --git a/arch/sh/kernel/syscalls_32.S b/arch/sh/kernel/syscalls_32.S
index f9e21fa2f592..19fd11dd9871 100644
--- a/arch/sh/kernel/syscalls_32.S
+++ b/arch/sh/kernel/syscalls_32.S
@@ -139,7 +139,7 @@ ENTRY(sys_call_table)
139 .long sys_clone /* 120 */ 139 .long sys_clone /* 120 */
140 .long sys_setdomainname 140 .long sys_setdomainname
141 .long sys_newuname 141 .long sys_newuname
142 .long sys_ni_syscall /* sys_modify_ldt */ 142 .long sys_cacheflush /* x86: sys_modify_ldt */
143 .long sys_adjtimex 143 .long sys_adjtimex
144 .long sys_mprotect /* 125 */ 144 .long sys_mprotect /* 125 */
145 .long sys_sigprocmask 145 .long sys_sigprocmask
@@ -352,4 +352,4 @@ ENTRY(sys_call_table)
352 .long sys_preadv 352 .long sys_preadv
353 .long sys_pwritev 353 .long sys_pwritev
354 .long sys_rt_tgsigqueueinfo /* 335 */ 354 .long sys_rt_tgsigqueueinfo /* 335 */
355 .long sys_perf_counter_open 355 .long sys_perf_event_open
diff --git a/arch/sh/kernel/syscalls_64.S b/arch/sh/kernel/syscalls_64.S
index bf420b616ae0..5bfde6c77498 100644
--- a/arch/sh/kernel/syscalls_64.S
+++ b/arch/sh/kernel/syscalls_64.S
@@ -143,7 +143,7 @@ sys_call_table:
143 .long sys_clone /* 120 */ 143 .long sys_clone /* 120 */
144 .long sys_setdomainname 144 .long sys_setdomainname
145 .long sys_newuname 145 .long sys_newuname
146 .long sys_ni_syscall /* sys_modify_ldt */ 146 .long sys_cacheflush /* x86: sys_modify_ldt */
147 .long sys_adjtimex 147 .long sys_adjtimex
148 .long sys_mprotect /* 125 */ 148 .long sys_mprotect /* 125 */
149 .long sys_sigprocmask 149 .long sys_sigprocmask
@@ -390,4 +390,4 @@ sys_call_table:
390 .long sys_preadv 390 .long sys_preadv
391 .long sys_pwritev 391 .long sys_pwritev
392 .long sys_rt_tgsigqueueinfo 392 .long sys_rt_tgsigqueueinfo
393 .long sys_perf_counter_open 393 .long sys_perf_event_open
diff --git a/arch/sh/kernel/time.c b/arch/sh/kernel/time.c
index 9b352a1e3fb4..953fa1613312 100644
--- a/arch/sh/kernel/time.c
+++ b/arch/sh/kernel/time.c
@@ -21,6 +21,7 @@
21#include <linux/smp.h> 21#include <linux/smp.h>
22#include <linux/rtc.h> 22#include <linux/rtc.h>
23#include <asm/clock.h> 23#include <asm/clock.h>
24#include <asm/hwblk.h>
24#include <asm/rtc.h> 25#include <asm/rtc.h>
25 26
26/* Dummy RTC ops */ 27/* Dummy RTC ops */
@@ -39,11 +40,9 @@ void (*rtc_sh_get_time)(struct timespec *) = null_rtc_get_time;
39int (*rtc_sh_set_time)(const time_t) = null_rtc_set_time; 40int (*rtc_sh_set_time)(const time_t) = null_rtc_set_time;
40 41
41#ifdef CONFIG_GENERIC_CMOS_UPDATE 42#ifdef CONFIG_GENERIC_CMOS_UPDATE
42unsigned long read_persistent_clock(void) 43void read_persistent_clock(struct timespec *ts)
43{ 44{
44 struct timespec tv; 45 rtc_sh_get_time(ts);
45 rtc_sh_get_time(&tv);
46 return tv.tv_sec;
47} 46}
48 47
49int update_persistent_clock(struct timespec now) 48int update_persistent_clock(struct timespec now)
@@ -91,21 +90,8 @@ module_init(rtc_generic_init);
91 90
92void (*board_time_init)(void); 91void (*board_time_init)(void);
93 92
94void __init time_init(void) 93static void __init sh_late_time_init(void)
95{ 94{
96 if (board_time_init)
97 board_time_init();
98
99 clk_init();
100
101 rtc_sh_get_time(&xtime);
102 set_normalized_timespec(&wall_to_monotonic,
103 -xtime.tv_sec, -xtime.tv_nsec);
104
105#ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
106 local_timer_setup(smp_processor_id());
107#endif
108
109 /* 95 /*
110 * Make sure all compiled-in early timers register themselves. 96 * Make sure all compiled-in early timers register themselves.
111 * 97 *
@@ -118,3 +104,18 @@ void __init time_init(void)
118 early_platform_driver_register_all("earlytimer"); 104 early_platform_driver_register_all("earlytimer");
119 early_platform_driver_probe("earlytimer", 2, 0); 105 early_platform_driver_probe("earlytimer", 2, 0);
120} 106}
107
108void __init time_init(void)
109{
110 if (board_time_init)
111 board_time_init();
112
113 hwblk_init();
114 clk_init();
115
116 rtc_sh_get_time(&xtime);
117 set_normalized_timespec(&wall_to_monotonic,
118 -xtime.tv_sec, -xtime.tv_nsec);
119
120 late_time_init = sh_late_time_init;
121}
diff --git a/arch/sh/kernel/traps.c b/arch/sh/kernel/traps.c
index b3e0067db358..a8396f36bd14 100644
--- a/arch/sh/kernel/traps.c
+++ b/arch/sh/kernel/traps.c
@@ -5,18 +5,33 @@
5#include <linux/signal.h> 5#include <linux/signal.h>
6#include <linux/sched.h> 6#include <linux/sched.h>
7#include <linux/uaccess.h> 7#include <linux/uaccess.h>
8#include <linux/hardirq.h>
9#include <asm/unwinder.h>
8#include <asm/system.h> 10#include <asm/system.h>
9 11
10#ifdef CONFIG_BUG 12#ifdef CONFIG_BUG
11static void handle_BUG(struct pt_regs *regs) 13void handle_BUG(struct pt_regs *regs)
12{ 14{
15 const struct bug_entry *bug;
16 unsigned long bugaddr = regs->pc;
13 enum bug_trap_type tt; 17 enum bug_trap_type tt;
14 tt = report_bug(regs->pc, regs); 18
19 if (!is_valid_bugaddr(bugaddr))
20 goto invalid;
21
22 bug = find_bug(bugaddr);
23
24 /* Switch unwinders when unwind_stack() is called */
25 if (bug->flags & BUGFLAG_UNWINDER)
26 unwinder_faulted = 1;
27
28 tt = report_bug(bugaddr, regs);
15 if (tt == BUG_TRAP_TYPE_WARN) { 29 if (tt == BUG_TRAP_TYPE_WARN) {
16 regs->pc += instruction_size(regs->pc); 30 regs->pc += instruction_size(bugaddr);
17 return; 31 return;
18 } 32 }
19 33
34invalid:
20 die("Kernel BUG", regs, TRAPA_BUG_OPCODE & 0xff); 35 die("Kernel BUG", regs, TRAPA_BUG_OPCODE & 0xff);
21} 36}
22 37
@@ -28,8 +43,10 @@ int is_valid_bugaddr(unsigned long addr)
28 return 0; 43 return 0;
29 if (probe_kernel_address((insn_size_t *)addr, opcode)) 44 if (probe_kernel_address((insn_size_t *)addr, opcode))
30 return 0; 45 return 0;
46 if (opcode == TRAPA_BUG_OPCODE)
47 return 1;
31 48
32 return opcode == TRAPA_BUG_OPCODE; 49 return 0;
33} 50}
34#endif 51#endif
35 52
@@ -75,3 +92,23 @@ BUILD_TRAP_HANDLER(bug)
75 92
76 force_sig(SIGTRAP, current); 93 force_sig(SIGTRAP, current);
77} 94}
95
96BUILD_TRAP_HANDLER(nmi)
97{
98 TRAP_HANDLER_DECL;
99
100 nmi_enter();
101
102 switch (notify_die(DIE_NMI, "NMI", regs, 0, vec & 0xff, SIGINT)) {
103 case NOTIFY_OK:
104 case NOTIFY_STOP:
105 break;
106 case NOTIFY_BAD:
107 die("Fatal Non-Maskable Interrupt", regs, SIGINT);
108 default:
109 printk(KERN_ALERT "Got NMI, but nobody cared. Ignoring...\n");
110 break;
111 }
112
113 nmi_exit();
114}
diff --git a/arch/sh/kernel/traps_32.c b/arch/sh/kernel/traps_32.c
index 2b772776fcda..69bb1652eccd 100644
--- a/arch/sh/kernel/traps_32.c
+++ b/arch/sh/kernel/traps_32.c
@@ -24,6 +24,7 @@
24#include <linux/kdebug.h> 24#include <linux/kdebug.h>
25#include <linux/kexec.h> 25#include <linux/kexec.h>
26#include <linux/limits.h> 26#include <linux/limits.h>
27#include <linux/proc_fs.h>
27#include <asm/system.h> 28#include <asm/system.h>
28#include <asm/uaccess.h> 29#include <asm/uaccess.h>
29#include <asm/fpu.h> 30#include <asm/fpu.h>
@@ -44,6 +45,85 @@
44#define TRAP_ILLEGAL_SLOT_INST 13 45#define TRAP_ILLEGAL_SLOT_INST 13
45#endif 46#endif
46 47
48static unsigned long se_user;
49static unsigned long se_sys;
50static unsigned long se_half;
51static unsigned long se_word;
52static unsigned long se_dword;
53static unsigned long se_multi;
54/* bitfield: 1: warn 2: fixup 4: signal -> combinations 2|4 && 1|2|4 are not
55 valid! */
56static int se_usermode = 3;
57/* 0: no warning 1: print a warning message */
58static int se_kernmode_warn = 1;
59
60#ifdef CONFIG_PROC_FS
61static const char *se_usermode_action[] = {
62 "ignored",
63 "warn",
64 "fixup",
65 "fixup+warn",
66 "signal",
67 "signal+warn"
68};
69
70static int
71proc_alignment_read(char *page, char **start, off_t off, int count, int *eof,
72 void *data)
73{
74 char *p = page;
75 int len;
76
77 p += sprintf(p, "User:\t\t%lu\n", se_user);
78 p += sprintf(p, "System:\t\t%lu\n", se_sys);
79 p += sprintf(p, "Half:\t\t%lu\n", se_half);
80 p += sprintf(p, "Word:\t\t%lu\n", se_word);
81 p += sprintf(p, "DWord:\t\t%lu\n", se_dword);
82 p += sprintf(p, "Multi:\t\t%lu\n", se_multi);
83 p += sprintf(p, "User faults:\t%i (%s)\n", se_usermode,
84 se_usermode_action[se_usermode]);
85 p += sprintf(p, "Kernel faults:\t%i (fixup%s)\n", se_kernmode_warn,
86 se_kernmode_warn ? "+warn" : "");
87
88 len = (p - page) - off;
89 if (len < 0)
90 len = 0;
91
92 *eof = (len <= count) ? 1 : 0;
93 *start = page + off;
94
95 return len;
96}
97
98static int proc_alignment_write(struct file *file, const char __user *buffer,
99 unsigned long count, void *data)
100{
101 char mode;
102
103 if (count > 0) {
104 if (get_user(mode, buffer))
105 return -EFAULT;
106 if (mode >= '0' && mode <= '5')
107 se_usermode = mode - '0';
108 }
109 return count;
110}
111
112static int proc_alignment_kern_write(struct file *file, const char __user *buffer,
113 unsigned long count, void *data)
114{
115 char mode;
116
117 if (count > 0) {
118 if (get_user(mode, buffer))
119 return -EFAULT;
120 if (mode >= '0' && mode <= '1')
121 se_kernmode_warn = mode - '0';
122 }
123 return count;
124}
125#endif
126
47static void dump_mem(const char *str, unsigned long bottom, unsigned long top) 127static void dump_mem(const char *str, unsigned long bottom, unsigned long top)
48{ 128{
49 unsigned long p; 129 unsigned long p;
@@ -136,6 +216,7 @@ static void die_if_no_fixup(const char * str, struct pt_regs * regs, long err)
136 regs->pc = fixup->fixup; 216 regs->pc = fixup->fixup;
137 return; 217 return;
138 } 218 }
219
139 die(str, regs, err); 220 die(str, regs, err);
140 } 221 }
141} 222}
@@ -193,6 +274,13 @@ static int handle_unaligned_ins(insn_size_t instruction, struct pt_regs *regs,
193 274
194 count = 1<<(instruction&3); 275 count = 1<<(instruction&3);
195 276
277 switch (count) {
278 case 1: se_half += 1; break;
279 case 2: se_word += 1; break;
280 case 4: se_dword += 1; break;
281 case 8: se_multi += 1; break; /* ??? */
282 }
283
196 ret = -EFAULT; 284 ret = -EFAULT;
197 switch (instruction>>12) { 285 switch (instruction>>12) {
198 case 0: /* mov.[bwl] to/from memory via r0+rn */ 286 case 0: /* mov.[bwl] to/from memory via r0+rn */
@@ -358,31 +446,28 @@ static inline int handle_delayslot(struct pt_regs *regs,
358#define SH_PC_8BIT_OFFSET(instr) ((((signed char)(instr))*2) + 4) 446#define SH_PC_8BIT_OFFSET(instr) ((((signed char)(instr))*2) + 4)
359#define SH_PC_12BIT_OFFSET(instr) ((((signed short)(instr<<4))>>3) + 4) 447#define SH_PC_12BIT_OFFSET(instr) ((((signed short)(instr<<4))>>3) + 4)
360 448
361/*
362 * XXX: SH-2A needs this too, but it needs an overhaul thanks to mixed 32-bit
363 * opcodes..
364 */
365
366static int handle_unaligned_notify_count = 10;
367
368int handle_unaligned_access(insn_size_t instruction, struct pt_regs *regs, 449int handle_unaligned_access(insn_size_t instruction, struct pt_regs *regs,
369 struct mem_access *ma) 450 struct mem_access *ma, int expected)
370{ 451{
371 u_int rm; 452 u_int rm;
372 int ret, index; 453 int ret, index;
373 454
455 /*
456 * XXX: We can't handle mixed 16/32-bit instructions yet
457 */
458 if (instruction_size(instruction) != 2)
459 return -EINVAL;
460
374 index = (instruction>>8)&15; /* 0x0F00 */ 461 index = (instruction>>8)&15; /* 0x0F00 */
375 rm = regs->regs[index]; 462 rm = regs->regs[index];
376 463
377 /* shout about the first ten userspace fixups */ 464 /* shout about fixups */
378 if (user_mode(regs) && handle_unaligned_notify_count>0) { 465 if (!expected && printk_ratelimit())
379 handle_unaligned_notify_count--; 466 printk(KERN_NOTICE "Fixing up unaligned %s access "
380
381 printk(KERN_NOTICE "Fixing up unaligned userspace access "
382 "in \"%s\" pid=%d pc=0x%p ins=0x%04hx\n", 467 "in \"%s\" pid=%d pc=0x%p ins=0x%04hx\n",
468 user_mode(regs) ? "userspace" : "kernel",
383 current->comm, task_pid_nr(current), 469 current->comm, task_pid_nr(current),
384 (void *)regs->pc, instruction); 470 (void *)regs->pc, instruction);
385 }
386 471
387 ret = -EFAULT; 472 ret = -EFAULT;
388 switch (instruction&0xF000) { 473 switch (instruction&0xF000) {
@@ -538,24 +623,44 @@ asmlinkage void do_address_error(struct pt_regs *regs,
538 623
539 local_irq_enable(); 624 local_irq_enable();
540 625
541 /* bad PC is not something we can fix */ 626 se_user += 1;
542 if (regs->pc & 1) {
543 si_code = BUS_ADRALN;
544 goto uspace_segv;
545 }
546 627
547 set_fs(USER_DS); 628 set_fs(USER_DS);
548 if (copy_from_user(&instruction, (void __user *)(regs->pc), 629 if (copy_from_user(&instruction, (insn_size_t *)(regs->pc & ~1),
549 sizeof(instruction))) { 630 sizeof(instruction))) {
550 /* Argh. Fault on the instruction itself.
551 This should never happen non-SMP
552 */
553 set_fs(oldfs); 631 set_fs(oldfs);
554 goto uspace_segv; 632 goto uspace_segv;
555 } 633 }
634 set_fs(oldfs);
635
636 /* shout about userspace fixups */
637 if (se_usermode & 1)
638 printk(KERN_NOTICE "Unaligned userspace access "
639 "in \"%s\" pid=%d pc=0x%p ins=0x%04hx\n",
640 current->comm, current->pid, (void *)regs->pc,
641 instruction);
642
643 if (se_usermode & 2)
644 goto fixup;
556 645
646 if (se_usermode & 4)
647 goto uspace_segv;
648 else {
649 /* ignore */
650 regs->pc += instruction_size(instruction);
651 return;
652 }
653
654fixup:
655 /* bad PC is not something we can fix */
656 if (regs->pc & 1) {
657 si_code = BUS_ADRALN;
658 goto uspace_segv;
659 }
660
661 set_fs(USER_DS);
557 tmp = handle_unaligned_access(instruction, regs, 662 tmp = handle_unaligned_access(instruction, regs,
558 &user_mem_access); 663 &user_mem_access, 0);
559 set_fs(oldfs); 664 set_fs(oldfs);
560 665
561 if (tmp==0) 666 if (tmp==0)
@@ -571,6 +676,8 @@ uspace_segv:
571 info.si_addr = (void __user *)address; 676 info.si_addr = (void __user *)address;
572 force_sig_info(SIGBUS, &info, current); 677 force_sig_info(SIGBUS, &info, current);
573 } else { 678 } else {
679 se_sys += 1;
680
574 if (regs->pc & 1) 681 if (regs->pc & 1)
575 die("unaligned program counter", regs, error_code); 682 die("unaligned program counter", regs, error_code);
576 683
@@ -584,7 +691,14 @@ uspace_segv:
584 die("insn faulting in do_address_error", regs, 0); 691 die("insn faulting in do_address_error", regs, 0);
585 } 692 }
586 693
587 handle_unaligned_access(instruction, regs, &user_mem_access); 694 if (se_kernmode_warn)
695 printk(KERN_NOTICE "Unaligned kernel access "
696 "on behalf of \"%s\" pid=%d pc=0x%p ins=0x%04hx\n",
697 current->comm, current->pid, (void *)regs->pc,
698 instruction);
699
700 handle_unaligned_access(instruction, regs,
701 &user_mem_access, 0);
588 set_fs(oldfs); 702 set_fs(oldfs);
589 } 703 }
590} 704}
@@ -858,30 +972,6 @@ void __init trap_init(void)
858 per_cpu_trap_init(); 972 per_cpu_trap_init();
859} 973}
860 974
861void show_trace(struct task_struct *tsk, unsigned long *sp,
862 struct pt_regs *regs)
863{
864 unsigned long addr;
865
866 if (regs && user_mode(regs))
867 return;
868
869 printk("\nCall trace:\n");
870
871 while (!kstack_end(sp)) {
872 addr = *sp++;
873 if (kernel_text_address(addr))
874 print_ip_sym(addr);
875 }
876
877 printk("\n");
878
879 if (!tsk)
880 tsk = current;
881
882 debug_show_held_locks(tsk);
883}
884
885void show_stack(struct task_struct *tsk, unsigned long *sp) 975void show_stack(struct task_struct *tsk, unsigned long *sp)
886{ 976{
887 unsigned long stack; 977 unsigned long stack;
@@ -904,3 +994,38 @@ void dump_stack(void)
904 show_stack(NULL, NULL); 994 show_stack(NULL, NULL);
905} 995}
906EXPORT_SYMBOL(dump_stack); 996EXPORT_SYMBOL(dump_stack);
997
998#ifdef CONFIG_PROC_FS
999/*
1000 * This needs to be done after sysctl_init, otherwise sys/ will be
1001 * overwritten. Actually, this shouldn't be in sys/ at all since
1002 * it isn't a sysctl, and it doesn't contain sysctl information.
1003 * We now locate it in /proc/cpu/alignment instead.
1004 */
1005static int __init alignment_init(void)
1006{
1007 struct proc_dir_entry *dir, *res;
1008
1009 dir = proc_mkdir("cpu", NULL);
1010 if (!dir)
1011 return -ENOMEM;
1012
1013 res = create_proc_entry("alignment", S_IWUSR | S_IRUGO, dir);
1014 if (!res)
1015 return -ENOMEM;
1016
1017 res->read_proc = proc_alignment_read;
1018 res->write_proc = proc_alignment_write;
1019
1020 res = create_proc_entry("kernel_alignment", S_IWUSR | S_IRUGO, dir);
1021 if (!res)
1022 return -ENOMEM;
1023
1024 res->read_proc = proc_alignment_read;
1025 res->write_proc = proc_alignment_kern_write;
1026
1027 return 0;
1028}
1029
1030fs_initcall(alignment_init);
1031#endif
diff --git a/arch/sh/kernel/unwinder.c b/arch/sh/kernel/unwinder.c
new file mode 100644
index 000000000000..468889d958f4
--- /dev/null
+++ b/arch/sh/kernel/unwinder.c
@@ -0,0 +1,164 @@
1/*
2 * Copyright (C) 2009 Matt Fleming
3 *
4 * Based, in part, on kernel/time/clocksource.c.
5 *
6 * This file provides arbitration code for stack unwinders.
7 *
8 * Multiple stack unwinders can be available on a system, usually with
9 * the most accurate unwinder being the currently active one.
10 */
11#include <linux/errno.h>
12#include <linux/list.h>
13#include <linux/spinlock.h>
14#include <linux/module.h>
15#include <asm/unwinder.h>
16#include <asm/atomic.h>
17
18/*
19 * This is the most basic stack unwinder an architecture can
20 * provide. For architectures without reliable frame pointers, e.g.
21 * RISC CPUs, it can be implemented by looking through the stack for
22 * addresses that lie within the kernel text section.
23 *
24 * Other CPUs, e.g. x86, can use their frame pointer register to
25 * construct more accurate stack traces.
26 */
27static struct list_head unwinder_list;
28static struct unwinder stack_reader = {
29 .name = "stack-reader",
30 .dump = stack_reader_dump,
31 .rating = 50,
32 .list = {
33 .next = &unwinder_list,
34 .prev = &unwinder_list,
35 },
36};
37
38/*
39 * "curr_unwinder" points to the stack unwinder currently in use. This
40 * is the unwinder with the highest rating.
41 *
42 * "unwinder_list" is a linked-list of all available unwinders, sorted
43 * by rating.
44 *
45 * All modifications of "curr_unwinder" and "unwinder_list" must be
46 * performed whilst holding "unwinder_lock".
47 */
48static struct unwinder *curr_unwinder = &stack_reader;
49
50static struct list_head unwinder_list = {
51 .next = &stack_reader.list,
52 .prev = &stack_reader.list,
53};
54
55static DEFINE_SPINLOCK(unwinder_lock);
56
57/**
58 * select_unwinder - Select the best registered stack unwinder.
59 *
60 * Private function. Must hold unwinder_lock when called.
61 *
62 * Select the stack unwinder with the best rating. This is useful for
63 * setting up curr_unwinder.
64 */
65static struct unwinder *select_unwinder(void)
66{
67 struct unwinder *best;
68
69 if (list_empty(&unwinder_list))
70 return NULL;
71
72 best = list_entry(unwinder_list.next, struct unwinder, list);
73 if (best == curr_unwinder)
74 return NULL;
75
76 return best;
77}
78
79/*
80 * Enqueue the stack unwinder sorted by rating.
81 */
82static int unwinder_enqueue(struct unwinder *ops)
83{
84 struct list_head *tmp, *entry = &unwinder_list;
85
86 list_for_each(tmp, &unwinder_list) {
87 struct unwinder *o;
88
89 o = list_entry(tmp, struct unwinder, list);
90 if (o == ops)
91 return -EBUSY;
92 /* Keep track of the place, where to insert */
93 if (o->rating >= ops->rating)
94 entry = tmp;
95 }
96 list_add(&ops->list, entry);
97
98 return 0;
99}
100
101/**
102 * unwinder_register - Used to install new stack unwinder
103 * @u: unwinder to be registered
104 *
105 * Install the new stack unwinder on the unwinder list, which is sorted
106 * by rating.
107 *
108 * Returns -EBUSY if registration fails, zero otherwise.
109 */
110int unwinder_register(struct unwinder *u)
111{
112 unsigned long flags;
113 int ret;
114
115 spin_lock_irqsave(&unwinder_lock, flags);
116 ret = unwinder_enqueue(u);
117 if (!ret)
118 curr_unwinder = select_unwinder();
119 spin_unlock_irqrestore(&unwinder_lock, flags);
120
121 return ret;
122}
123
124int unwinder_faulted = 0;
125
126/*
127 * Unwind the call stack and pass information to the stacktrace_ops
128 * functions. Also handle the case where we need to switch to a new
129 * stack dumper because the current one faulted unexpectedly.
130 */
131void unwind_stack(struct task_struct *task, struct pt_regs *regs,
132 unsigned long *sp, const struct stacktrace_ops *ops,
133 void *data)
134{
135 unsigned long flags;
136
137 /*
138 * The problem with unwinders with high ratings is that they are
139 * inherently more complicated than the simple ones with lower
140 * ratings. We are therefore more likely to fault in the
141 * complicated ones, e.g. hitting BUG()s. If we fault in the
142 * code for the current stack unwinder we try to downgrade to
143 * one with a lower rating.
144 *
145 * Hopefully this will give us a semi-reliable stacktrace so we
146 * can diagnose why curr_unwinder->dump() faulted.
147 */
148 if (unwinder_faulted) {
149 spin_lock_irqsave(&unwinder_lock, flags);
150
151 /* Make sure no one beat us to changing the unwinder */
152 if (unwinder_faulted && !list_is_singular(&unwinder_list)) {
153 list_del(&curr_unwinder->list);
154 curr_unwinder = select_unwinder();
155
156 unwinder_faulted = 0;
157 }
158
159 spin_unlock_irqrestore(&unwinder_lock, flags);
160 }
161
162 curr_unwinder->dump(task, regs, sp, ops, data);
163}
164EXPORT_SYMBOL_GPL(unwind_stack);
diff --git a/arch/sh/kernel/vmlinux.lds.S b/arch/sh/kernel/vmlinux.lds.S
index 0ce254bca92f..a1e4ec24f1f5 100644
--- a/arch/sh/kernel/vmlinux.lds.S
+++ b/arch/sh/kernel/vmlinux.lds.S
@@ -12,7 +12,7 @@ OUTPUT_ARCH(sh)
12 12
13#include <asm/thread_info.h> 13#include <asm/thread_info.h>
14#include <asm/cache.h> 14#include <asm/cache.h>
15#include <asm-generic/vmlinux.lds.h> 15#include <asm/vmlinux.lds.h>
16 16
17ENTRY(_start) 17ENTRY(_start)
18SECTIONS 18SECTIONS
@@ -50,12 +50,7 @@ SECTIONS
50 _etext = .; /* End of text section */ 50 _etext = .; /* End of text section */
51 } = 0x0009 51 } = 0x0009
52 52
53 . = ALIGN(16); /* Exception table */ 53 EXCEPTION_TABLE(16)
54 __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) {
55 __start___ex_table = .;
56 *(__ex_table)
57 __stop___ex_table = .;
58 }
59 54
60 NOTES 55 NOTES
61 RO_DATA(PAGE_SIZE) 56 RO_DATA(PAGE_SIZE)
@@ -71,69 +66,16 @@ SECTIONS
71 __uncached_end = .; 66 __uncached_end = .;
72 } 67 }
73 68
74 . = ALIGN(THREAD_SIZE); 69 RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
75 .data : AT(ADDR(.data) - LOAD_OFFSET) { /* Data */
76 *(.data.init_task)
77
78 . = ALIGN(L1_CACHE_BYTES);
79 *(.data.cacheline_aligned)
80
81 . = ALIGN(L1_CACHE_BYTES);
82 *(.data.read_mostly)
83
84 . = ALIGN(PAGE_SIZE);
85 *(.data.page_aligned)
86
87 __nosave_begin = .;
88 *(.data.nosave)
89 . = ALIGN(PAGE_SIZE);
90 __nosave_end = .;
91
92 DATA_DATA
93 CONSTRUCTORS
94 }
95 70
96 _edata = .; /* End of data section */ 71 _edata = .; /* End of data section */
97 72
98 . = ALIGN(PAGE_SIZE); /* Init code and data */ 73 DWARF_EH_FRAME
99 .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) {
100 __init_begin = .;
101 _sinittext = .;
102 INIT_TEXT
103 _einittext = .;
104 }
105
106 .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) { INIT_DATA }
107
108 . = ALIGN(16);
109 .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) {
110 __setup_start = .;
111 *(.init.setup)
112 __setup_end = .;
113 }
114
115 .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET) {
116 __initcall_start = .;
117 INITCALLS
118 __initcall_end = .;
119 }
120
121 .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET) {
122 __con_initcall_start = .;
123 *(.con_initcall.init)
124 __con_initcall_end = .;
125 }
126
127 SECURITY_INIT
128 74
129#ifdef CONFIG_BLK_DEV_INITRD 75 . = ALIGN(PAGE_SIZE); /* Init code and data */
130 . = ALIGN(PAGE_SIZE); 76 __init_begin = .;
131 .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) { 77 INIT_TEXT_SECTION(PAGE_SIZE)
132 __initramfs_start = .; 78 INIT_DATA_SECTION(16)
133 *(.init.ramfs)
134 __initramfs_end = .;
135 }
136#endif
137 79
138 . = ALIGN(4); 80 . = ALIGN(4);
139 .machvec.init : AT(ADDR(.machvec.init) - LOAD_OFFSET) { 81 .machvec.init : AT(ADDR(.machvec.init) - LOAD_OFFSET) {
@@ -152,25 +94,13 @@ SECTIONS
152 .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) { EXIT_DATA } 94 .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) { EXIT_DATA }
153 95
154 . = ALIGN(PAGE_SIZE); 96 . = ALIGN(PAGE_SIZE);
155 .bss : AT(ADDR(.bss) - LOAD_OFFSET) { 97 __init_end = .;
156 __init_end = .; 98 BSS_SECTION(0, PAGE_SIZE, 4)
157 __bss_start = .; /* BSS */ 99 _ebss = .; /* uClinux MTD sucks */
158 *(.bss.page_aligned) 100 _end = . ;
159 *(.bss)
160 *(COMMON)
161 . = ALIGN(4);
162 _ebss = .; /* uClinux MTD sucks */
163 _end = . ;
164 }
165 101
166 STABS_DEBUG 102 STABS_DEBUG
167 DWARF_DEBUG 103 DWARF_DEBUG
168 104
169 /*
170 * When something in the kernel is NOT compiled as a module, the
171 * module cleanup code and data are put into these segments. Both
172 * can then be thrown away, as cleanup code is never called unless
173 * it's a module.
174 */
175 DISCARDS 105 DISCARDS
176} 106}
diff --git a/arch/sh/kernel/vsyscall/Makefile b/arch/sh/kernel/vsyscall/Makefile
index 4bbce1cfa359..8f0ea5fc835c 100644
--- a/arch/sh/kernel/vsyscall/Makefile
+++ b/arch/sh/kernel/vsyscall/Makefile
@@ -15,7 +15,7 @@ quiet_cmd_syscall = SYSCALL $@
15export CPPFLAGS_vsyscall.lds += -P -C -Ush 15export CPPFLAGS_vsyscall.lds += -P -C -Ush
16 16
17vsyscall-flags = -shared -s -Wl,-soname=linux-gate.so.1 \ 17vsyscall-flags = -shared -s -Wl,-soname=linux-gate.so.1 \
18 $(call ld-option, -Wl$(comma)--hash-style=sysv) 18 $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
19 19
20SYSCFLAGS_vsyscall-trapa.so = $(vsyscall-flags) 20SYSCFLAGS_vsyscall-trapa.so = $(vsyscall-flags)
21 21
diff --git a/arch/sh/lib/Makefile b/arch/sh/lib/Makefile
index aaea580b65bb..a969b47c5463 100644
--- a/arch/sh/lib/Makefile
+++ b/arch/sh/lib/Makefile
@@ -23,8 +23,8 @@ obj-y += io.o
23memcpy-y := memcpy.o 23memcpy-y := memcpy.o
24memcpy-$(CONFIG_CPU_SH4) := memcpy-sh4.o 24memcpy-$(CONFIG_CPU_SH4) := memcpy-sh4.o
25 25
26lib-$(CONFIG_MMU) += copy_page.o clear_page.o 26lib-$(CONFIG_MMU) += copy_page.o __clear_user.o
27lib-$(CONFIG_FUNCTION_TRACER) += mcount.o 27lib-$(CONFIG_MCOUNT) += mcount.o
28lib-y += $(memcpy-y) $(udivsi3-y) 28lib-y += $(memcpy-y) $(udivsi3-y)
29 29
30EXTRA_CFLAGS += -Werror 30EXTRA_CFLAGS += -Werror
diff --git a/arch/sh/lib/clear_page.S b/arch/sh/lib/__clear_user.S
index 8342bfbde64c..db1dca7aad14 100644
--- a/arch/sh/lib/clear_page.S
+++ b/arch/sh/lib/__clear_user.S
@@ -8,56 +8,10 @@
8#include <linux/linkage.h> 8#include <linux/linkage.h>
9#include <asm/page.h> 9#include <asm/page.h>
10 10
11/*
12 * clear_page
13 * @to: P1 address
14 *
15 * void clear_page(void *to)
16 */
17
18/*
19 * r0 --- scratch
20 * r4 --- to
21 * r5 --- to + PAGE_SIZE
22 */
23ENTRY(clear_page)
24 mov r4,r5
25 mov.l .Llimit,r0
26 add r0,r5
27 mov #0,r0
28 !
291:
30#if defined(CONFIG_CPU_SH4)
31 movca.l r0,@r4
32 mov r4,r1
33#else
34 mov.l r0,@r4
35#endif
36 add #32,r4
37 mov.l r0,@-r4
38 mov.l r0,@-r4
39 mov.l r0,@-r4
40 mov.l r0,@-r4
41 mov.l r0,@-r4
42 mov.l r0,@-r4
43 mov.l r0,@-r4
44#if defined(CONFIG_CPU_SH4)
45 ocbwb @r1
46#endif
47 cmp/eq r5,r4
48 bf/s 1b
49 add #28,r4
50 !
51 rts
52 nop
53
54 .balign 4
55.Llimit: .long (PAGE_SIZE-28)
56
57ENTRY(__clear_user) 11ENTRY(__clear_user)
58 ! 12 !
59 mov #0, r0 13 mov #0, r0
60 mov #0xe0, r1 ! 0xffffffe0 14 mov #0xffffffe0, r1
61 ! 15 !
62 ! r4..(r4+31)&~32 -------- not aligned [ Area 0 ] 16 ! r4..(r4+31)&~32 -------- not aligned [ Area 0 ]
63 ! (r4+31)&~32..(r4+r5)&~32 -------- aligned [ Area 1 ] 17 ! (r4+31)&~32..(r4+r5)&~32 -------- aligned [ Area 1 ]
diff --git a/arch/sh/lib/copy_page.S b/arch/sh/lib/copy_page.S
index 43de7e8e4e17..9d7b8bc51866 100644
--- a/arch/sh/lib/copy_page.S
+++ b/arch/sh/lib/copy_page.S
@@ -30,7 +30,9 @@ ENTRY(copy_page)
30 mov r4,r10 30 mov r4,r10
31 mov r5,r11 31 mov r5,r11
32 mov r5,r8 32 mov r5,r8
33 mov.l .Lpsz,r0 33 mov #(PAGE_SIZE >> 10), r0
34 shll8 r0
35 shll2 r0
34 add r0,r8 36 add r0,r8
35 ! 37 !
361: mov.l @r11+,r0 381: mov.l @r11+,r0
@@ -43,7 +45,6 @@ ENTRY(copy_page)
43 mov.l @r11+,r7 45 mov.l @r11+,r7
44#if defined(CONFIG_CPU_SH4) 46#if defined(CONFIG_CPU_SH4)
45 movca.l r0,@r10 47 movca.l r0,@r10
46 mov r10,r0
47#else 48#else
48 mov.l r0,@r10 49 mov.l r0,@r10
49#endif 50#endif
@@ -55,9 +56,6 @@ ENTRY(copy_page)
55 mov.l r3,@-r10 56 mov.l r3,@-r10
56 mov.l r2,@-r10 57 mov.l r2,@-r10
57 mov.l r1,@-r10 58 mov.l r1,@-r10
58#if defined(CONFIG_CPU_SH4)
59 ocbwb @r0
60#endif
61 cmp/eq r11,r8 59 cmp/eq r11,r8
62 bf/s 1b 60 bf/s 1b
63 add #28,r10 61 add #28,r10
@@ -68,9 +66,6 @@ ENTRY(copy_page)
68 rts 66 rts
69 nop 67 nop
70 68
71 .balign 4
72.Lpsz: .long PAGE_SIZE
73
74/* 69/*
75 * __kernel_size_t __copy_user(void *to, const void *from, __kernel_size_t n); 70 * __kernel_size_t __copy_user(void *to, const void *from, __kernel_size_t n);
76 * Return the number of bytes NOT copied 71 * Return the number of bytes NOT copied
diff --git a/arch/sh/lib/delay.c b/arch/sh/lib/delay.c
index f3ddd2133e6f..faa8f86c0db4 100644
--- a/arch/sh/lib/delay.c
+++ b/arch/sh/lib/delay.c
@@ -21,13 +21,14 @@ void __delay(unsigned long loops)
21 21
22inline void __const_udelay(unsigned long xloops) 22inline void __const_udelay(unsigned long xloops)
23{ 23{
24 xloops *= 4;
24 __asm__("dmulu.l %0, %2\n\t" 25 __asm__("dmulu.l %0, %2\n\t"
25 "sts mach, %0" 26 "sts mach, %0"
26 : "=r" (xloops) 27 : "=r" (xloops)
27 : "0" (xloops), 28 : "0" (xloops),
28 "r" (HZ * cpu_data[raw_smp_processor_id()].loops_per_jiffy) 29 "r" (cpu_data[raw_smp_processor_id()].loops_per_jiffy * (HZ/4))
29 : "macl", "mach"); 30 : "macl", "mach");
30 __delay(xloops); 31 __delay(++xloops);
31} 32}
32 33
33void __udelay(unsigned long usecs) 34void __udelay(unsigned long usecs)
diff --git a/arch/sh/lib/mcount.S b/arch/sh/lib/mcount.S
index 110fbfe1831f..84a57761f17e 100644
--- a/arch/sh/lib/mcount.S
+++ b/arch/sh/lib/mcount.S
@@ -1,14 +1,16 @@
1/* 1/*
2 * arch/sh/lib/mcount.S 2 * arch/sh/lib/mcount.S
3 * 3 *
4 * Copyright (C) 2008 Paul Mundt 4 * Copyright (C) 2008, 2009 Paul Mundt
5 * Copyright (C) 2008 Matt Fleming 5 * Copyright (C) 2008, 2009 Matt Fleming
6 * 6 *
7 * This file is subject to the terms and conditions of the GNU General Public 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 8 * License. See the file "COPYING" in the main directory of this archive
9 * for more details. 9 * for more details.
10 */ 10 */
11#include <asm/ftrace.h> 11#include <asm/ftrace.h>
12#include <asm/thread_info.h>
13#include <asm/asm-offsets.h>
12 14
13#define MCOUNT_ENTER() \ 15#define MCOUNT_ENTER() \
14 mov.l r4, @-r15; \ 16 mov.l r4, @-r15; \
@@ -28,6 +30,55 @@
28 rts; \ 30 rts; \
29 mov.l @r15+, r4 31 mov.l @r15+, r4
30 32
33#ifdef CONFIG_STACK_DEBUG
34/*
35 * Perform diagnostic checks on the state of the kernel stack.
36 *
37 * Check for stack overflow. If there is less than 1KB free
38 * then it has overflowed.
39 *
40 * Make sure the stack pointer contains a valid address. Valid
41 * addresses for kernel stacks are anywhere after the bss
42 * (after _ebss) and anywhere in init_thread_union (init_stack).
43 */
44#define STACK_CHECK() \
45 mov #(THREAD_SIZE >> 10), r0; \
46 shll8 r0; \
47 shll2 r0; \
48 \
49 /* r1 = sp & (THREAD_SIZE - 1) */ \
50 mov #-1, r1; \
51 add r0, r1; \
52 and r15, r1; \
53 \
54 mov #TI_SIZE, r3; \
55 mov #(STACK_WARN >> 8), r2; \
56 shll8 r2; \
57 add r3, r2; \
58 \
59 /* Is the stack overflowing? */ \
60 cmp/hi r2, r1; \
61 bf stack_panic; \
62 \
63 /* If sp > _ebss then we're OK. */ \
64 mov.l .L_ebss, r1; \
65 cmp/hi r1, r15; \
66 bt 1f; \
67 \
68 /* If sp < init_stack, we're not OK. */ \
69 mov.l .L_init_thread_union, r1; \
70 cmp/hs r1, r15; \
71 bf stack_panic; \
72 \
73 /* If sp > init_stack && sp < _ebss, not OK. */ \
74 add r0, r1; \
75 cmp/hs r1, r15; \
76 bt stack_panic; \
771:
78#else
79#define STACK_CHECK()
80#endif /* CONFIG_STACK_DEBUG */
81
31 .align 2 82 .align 2
32 .globl _mcount 83 .globl _mcount
33 .type _mcount,@function 84 .type _mcount,@function
@@ -35,6 +86,19 @@
35 .type mcount,@function 86 .type mcount,@function
36_mcount: 87_mcount:
37mcount: 88mcount:
89 STACK_CHECK()
90
91#ifndef CONFIG_FUNCTION_TRACER
92 rts
93 nop
94#else
95#ifndef CONFIG_DYNAMIC_FTRACE
96 mov.l .Lfunction_trace_stop, r0
97 mov.l @r0, r0
98 tst r0, r0
99 bf ftrace_stub
100#endif
101
38 MCOUNT_ENTER() 102 MCOUNT_ENTER()
39 103
40#ifdef CONFIG_DYNAMIC_FTRACE 104#ifdef CONFIG_DYNAMIC_FTRACE
@@ -52,16 +116,69 @@ mcount_call:
52 jsr @r6 116 jsr @r6
53 nop 117 nop
54 118
119#ifdef CONFIG_FUNCTION_GRAPH_TRACER
120 mov.l .Lftrace_graph_return, r6
121 mov.l .Lftrace_stub, r7
122 cmp/eq r6, r7
123 bt 1f
124
125 mov.l .Lftrace_graph_caller, r0
126 jmp @r0
127 nop
128
1291:
130 mov.l .Lftrace_graph_entry, r6
131 mov.l .Lftrace_graph_entry_stub, r7
132 cmp/eq r6, r7
133 bt skip_trace
134
135 mov.l .Lftrace_graph_caller, r0
136 jmp @r0
137 nop
138
139 .align 2
140.Lftrace_graph_return:
141 .long ftrace_graph_return
142.Lftrace_graph_entry:
143 .long ftrace_graph_entry
144.Lftrace_graph_entry_stub:
145 .long ftrace_graph_entry_stub
146.Lftrace_graph_caller:
147 .long ftrace_graph_caller
148#endif /* CONFIG_FUNCTION_GRAPH_TRACER */
149
150 .globl skip_trace
55skip_trace: 151skip_trace:
56 MCOUNT_LEAVE() 152 MCOUNT_LEAVE()
57 153
58 .align 2 154 .align 2
59.Lftrace_trace_function: 155.Lftrace_trace_function:
60 .long ftrace_trace_function 156 .long ftrace_trace_function
61 157
62#ifdef CONFIG_DYNAMIC_FTRACE 158#ifdef CONFIG_DYNAMIC_FTRACE
159#ifdef CONFIG_FUNCTION_GRAPH_TRACER
160/*
161 * NOTE: Do not move either ftrace_graph_call or ftrace_caller
162 * as this will affect the calculation of GRAPH_INSN_OFFSET.
163 */
164 .globl ftrace_graph_call
165ftrace_graph_call:
166 mov.l .Lskip_trace, r0
167 jmp @r0
168 nop
169
170 .align 2
171.Lskip_trace:
172 .long skip_trace
173#endif /* CONFIG_FUNCTION_GRAPH_TRACER */
174
63 .globl ftrace_caller 175 .globl ftrace_caller
64ftrace_caller: 176ftrace_caller:
177 mov.l .Lfunction_trace_stop, r0
178 mov.l @r0, r0
179 tst r0, r0
180 bf ftrace_stub
181
65 MCOUNT_ENTER() 182 MCOUNT_ENTER()
66 183
67 .globl ftrace_call 184 .globl ftrace_call
@@ -70,9 +187,18 @@ ftrace_call:
70 jsr @r6 187 jsr @r6
71 nop 188 nop
72 189
190#ifdef CONFIG_FUNCTION_GRAPH_TRACER
191 bra ftrace_graph_call
192 nop
193#else
73 MCOUNT_LEAVE() 194 MCOUNT_LEAVE()
195#endif /* CONFIG_FUNCTION_GRAPH_TRACER */
74#endif /* CONFIG_DYNAMIC_FTRACE */ 196#endif /* CONFIG_DYNAMIC_FTRACE */
75 197
198 .align 2
199.Lfunction_trace_stop:
200 .long function_trace_stop
201
76/* 202/*
77 * NOTE: From here on the locations of the .Lftrace_stub label and 203 * NOTE: From here on the locations of the .Lftrace_stub label and
78 * ftrace_stub itself are fixed. Adding additional data here will skew 204 * ftrace_stub itself are fixed. Adding additional data here will skew
@@ -80,7 +206,6 @@ ftrace_call:
80 * Place new labels either after the ftrace_stub body, or before 206 * Place new labels either after the ftrace_stub body, or before
81 * ftrace_caller. You have been warned. 207 * ftrace_caller. You have been warned.
82 */ 208 */
83 .align 2
84.Lftrace_stub: 209.Lftrace_stub:
85 .long ftrace_stub 210 .long ftrace_stub
86 211
@@ -88,3 +213,98 @@ ftrace_call:
88ftrace_stub: 213ftrace_stub:
89 rts 214 rts
90 nop 215 nop
216
217#ifdef CONFIG_FUNCTION_GRAPH_TRACER
218 .globl ftrace_graph_caller
219ftrace_graph_caller:
220 mov.l 2f, r0
221 mov.l @r0, r0
222 tst r0, r0
223 bt 1f
224
225 mov.l 3f, r1
226 jmp @r1
227 nop
2281:
229 /*
230 * MCOUNT_ENTER() pushed 5 registers onto the stack, so
231 * the stack address containing our return address is
232 * r15 + 20.
233 */
234 mov #20, r0
235 add r15, r0
236 mov r0, r4
237
238 mov.l .Lprepare_ftrace_return, r0
239 jsr @r0
240 nop
241
242 MCOUNT_LEAVE()
243
244 .align 2
2452: .long function_trace_stop
2463: .long skip_trace
247.Lprepare_ftrace_return:
248 .long prepare_ftrace_return
249
250 .globl return_to_handler
251return_to_handler:
252 /*
253 * Save the return values.
254 */
255 mov.l r0, @-r15
256 mov.l r1, @-r15
257
258 mov #0, r4
259
260 mov.l .Lftrace_return_to_handler, r0
261 jsr @r0
262 nop
263
264 /*
265 * The return value from ftrace_return_handler has the real
266 * address that we should return to.
267 */
268 lds r0, pr
269 mov.l @r15+, r1
270 rts
271 mov.l @r15+, r0
272
273
274 .align 2
275.Lftrace_return_to_handler:
276 .long ftrace_return_to_handler
277#endif /* CONFIG_FUNCTION_GRAPH_TRACER */
278#endif /* CONFIG_FUNCTION_TRACER */
279
280#ifdef CONFIG_STACK_DEBUG
281 .globl stack_panic
282stack_panic:
283 mov.l .Ldump_stack, r0
284 jsr @r0
285 nop
286
287 mov.l .Lpanic, r0
288 jsr @r0
289 mov.l .Lpanic_s, r4
290
291 rts
292 nop
293
294 .align 2
295.L_ebss:
296 .long _ebss
297.L_init_thread_union:
298 .long init_thread_union
299.Lpanic:
300 .long panic
301.Lpanic_s:
302 .long .Lpanic_str
303.Ldump_stack:
304 .long dump_stack
305
306 .section .rodata
307 .align 2
308.Lpanic_str:
309 .string "Stack error"
310#endif /* CONFIG_STACK_DEBUG */
diff --git a/arch/sh/lib64/Makefile b/arch/sh/lib64/Makefile
index 334bb2da36ea..1fee75aa1f98 100644
--- a/arch/sh/lib64/Makefile
+++ b/arch/sh/lib64/Makefile
@@ -11,7 +11,7 @@
11 11
12# Panic should really be compiled as PIC 12# Panic should really be compiled as PIC
13lib-y := udelay.o dbg.o panic.o memcpy.o memset.o \ 13lib-y := udelay.o dbg.o panic.o memcpy.o memset.o \
14 copy_user_memcpy.o copy_page.o clear_page.o strcpy.o strlen.o 14 copy_user_memcpy.o copy_page.o strcpy.o strlen.o
15 15
16# Extracted from libgcc 16# Extracted from libgcc
17lib-y += udivsi3.o udivdi3.o sdivsi3.o 17lib-y += udivsi3.o udivdi3.o sdivsi3.o
diff --git a/arch/sh/lib64/clear_page.S b/arch/sh/lib64/clear_page.S
deleted file mode 100644
index 007ab48ecc1c..000000000000
--- a/arch/sh/lib64/clear_page.S
+++ /dev/null
@@ -1,54 +0,0 @@
1/*
2 Copyright 2003 Richard Curnow, SuperH (UK) Ltd.
3
4 This file is subject to the terms and conditions of the GNU General Public
5 License. See the file "COPYING" in the main directory of this archive
6 for more details.
7
8 Tight version of memset for the case of just clearing a page. It turns out
9 that having the alloco's spaced out slightly due to the increment/branch
10 pair causes them to contend less for access to the cache. Similarly,
11 keeping the stores apart from the allocos causes less contention. => Do two
12 separate loops. Do multiple stores per loop to amortise the
13 increment/branch cost a little.
14
15 Parameters:
16 r2 : source effective address (start of page)
17
18 Always clears 4096 bytes.
19
20 Note : alloco guarded by synco to avoid TAKum03020 erratum
21
22*/
23
24 .section .text..SHmedia32,"ax"
25 .little
26
27 .balign 8
28 .global clear_page
29clear_page:
30 pta/l 1f, tr1
31 pta/l 2f, tr2
32 ptabs/l r18, tr0
33
34 movi 4096, r7
35 add r2, r7, r7
36 add r2, r63, r6
371:
38 alloco r6, 0
39 synco ! TAKum03020
40 addi r6, 32, r6
41 bgt/l r7, r6, tr1
42
43 add r2, r63, r6
442:
45 st.q r6, 0, r63
46 st.q r6, 8, r63
47 st.q r6, 16, r63
48 st.q r6, 24, r63
49 addi r6, 32, r6
50 bgt/l r7, r6, tr2
51
52 blink tr0, r63
53
54
diff --git a/arch/sh/mm/Kconfig b/arch/sh/mm/Kconfig
index 2795618e4f07..64dc1ad59801 100644
--- a/arch/sh/mm/Kconfig
+++ b/arch/sh/mm/Kconfig
@@ -82,7 +82,7 @@ config 32BIT
82 82
83config PMB_ENABLE 83config PMB_ENABLE
84 bool "Support 32-bit physical addressing through PMB" 84 bool "Support 32-bit physical addressing through PMB"
85 depends on MMU && EXPERIMENTAL && (CPU_SUBTYPE_SH7780 || CPU_SUBTYPE_SH7785) 85 depends on MMU && EXPERIMENTAL && (CPU_SUBTYPE_SH7757 || CPU_SUBTYPE_SH7780 || CPU_SUBTYPE_SH7785)
86 select 32BIT 86 select 32BIT
87 default y 87 default y
88 help 88 help
@@ -97,7 +97,7 @@ choice
97 97
98config PMB 98config PMB
99 bool "PMB" 99 bool "PMB"
100 depends on MMU && EXPERIMENTAL && (CPU_SUBTYPE_SH7780 || CPU_SUBTYPE_SH7785) 100 depends on MMU && EXPERIMENTAL && (CPU_SUBTYPE_SH7757 || CPU_SUBTYPE_SH7780 || CPU_SUBTYPE_SH7785)
101 select 32BIT 101 select 32BIT
102 help 102 help
103 If you say Y here, physical addressing will be extended to 103 If you say Y here, physical addressing will be extended to
@@ -106,7 +106,8 @@ config PMB
106 106
107config PMB_FIXED 107config PMB_FIXED
108 bool "fixed PMB" 108 bool "fixed PMB"
109 depends on MMU && EXPERIMENTAL && (CPU_SUBTYPE_SH7780 || \ 109 depends on MMU && EXPERIMENTAL && (CPU_SUBTYPE_SH7757 || \
110 CPU_SUBTYPE_SH7780 || \
110 CPU_SUBTYPE_SH7785) 111 CPU_SUBTYPE_SH7785)
111 select 32BIT 112 select 32BIT
112 help 113 help
diff --git a/arch/sh/mm/Makefile b/arch/sh/mm/Makefile
index 9f4bc3d90b1e..3759bf853293 100644
--- a/arch/sh/mm/Makefile
+++ b/arch/sh/mm/Makefile
@@ -1,5 +1,65 @@
1ifeq ($(CONFIG_SUPERH32),y) 1#
2include ${srctree}/arch/sh/mm/Makefile_32 2# Makefile for the Linux SuperH-specific parts of the memory manager.
3else 3#
4include ${srctree}/arch/sh/mm/Makefile_64 4
5obj-y := cache.o init.o consistent.o mmap.o
6
7cacheops-$(CONFIG_CPU_SH2) := cache-sh2.o
8cacheops-$(CONFIG_CPU_SH2A) := cache-sh2a.o
9cacheops-$(CONFIG_CPU_SH3) := cache-sh3.o
10cacheops-$(CONFIG_CPU_SH4) := cache-sh4.o flush-sh4.o
11cacheops-$(CONFIG_CPU_SH5) := cache-sh5.o flush-sh4.o
12cacheops-$(CONFIG_SH7705_CACHE_32KB) += cache-sh7705.o
13
14obj-y += $(cacheops-y)
15
16mmu-y := nommu.o extable_32.o
17mmu-$(CONFIG_MMU) := extable_$(BITS).o fault_$(BITS).o \
18 ioremap_$(BITS).o kmap.o tlbflush_$(BITS).o
19
20obj-y += $(mmu-y)
21obj-$(CONFIG_DEBUG_FS) += asids-debugfs.o
22
23ifdef CONFIG_DEBUG_FS
24obj-$(CONFIG_CPU_SH4) += cache-debugfs.o
5endif 25endif
26
27ifdef CONFIG_MMU
28tlb-$(CONFIG_CPU_SH3) := tlb-sh3.o
29tlb-$(CONFIG_CPU_SH4) := tlb-sh4.o
30tlb-$(CONFIG_CPU_SH5) := tlb-sh5.o
31tlb-$(CONFIG_CPU_HAS_PTEAEX) := tlb-pteaex.o
32obj-y += $(tlb-y)
33endif
34
35obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
36obj-$(CONFIG_PMB) += pmb.o
37obj-$(CONFIG_PMB_FIXED) += pmb-fixed.o
38obj-$(CONFIG_NUMA) += numa.o
39
40# Special flags for fault_64.o. This puts restrictions on the number of
41# caller-save registers that the compiler can target when building this file.
42# This is required because the code is called from a context in entry.S where
43# very few registers have been saved in the exception handler (for speed
44# reasons).
45# The caller save registers that have been saved and which can be used are
46# r2,r3,r4,r5 : argument passing
47# r15, r18 : SP and LINK
48# tr0-4 : allow all caller-save TR's. The compiler seems to be able to make
49# use of them, so it's probably beneficial to performance to save them
50# and have them available for it.
51#
52# The resources not listed below are callee save, i.e. the compiler is free to
53# use any of them and will spill them to the stack itself.
54
55CFLAGS_fault_64.o += -ffixed-r7 \
56 -ffixed-r8 -ffixed-r9 -ffixed-r10 -ffixed-r11 -ffixed-r12 \
57 -ffixed-r13 -ffixed-r14 -ffixed-r16 -ffixed-r17 -ffixed-r19 \
58 -ffixed-r20 -ffixed-r21 -ffixed-r22 -ffixed-r23 \
59 -ffixed-r24 -ffixed-r25 -ffixed-r26 -ffixed-r27 \
60 -ffixed-r36 -ffixed-r37 -ffixed-r38 -ffixed-r39 -ffixed-r40 \
61 -ffixed-r41 -ffixed-r42 -ffixed-r43 \
62 -ffixed-r60 -ffixed-r61 -ffixed-r62 \
63 -fomit-frame-pointer
64
65EXTRA_CFLAGS += -Werror
diff --git a/arch/sh/mm/Makefile_32 b/arch/sh/mm/Makefile_32
deleted file mode 100644
index 986a1e055834..000000000000
--- a/arch/sh/mm/Makefile_32
+++ /dev/null
@@ -1,43 +0,0 @@
1#
2# Makefile for the Linux SuperH-specific parts of the memory manager.
3#
4
5obj-y := init.o extable_32.o consistent.o mmap.o
6
7ifndef CONFIG_CACHE_OFF
8cache-$(CONFIG_CPU_SH2) := cache-sh2.o
9cache-$(CONFIG_CPU_SH2A) := cache-sh2a.o
10cache-$(CONFIG_CPU_SH3) := cache-sh3.o
11cache-$(CONFIG_CPU_SH4) := cache-sh4.o
12cache-$(CONFIG_SH7705_CACHE_32KB) += cache-sh7705.o
13endif
14
15obj-y += $(cache-y)
16
17mmu-y := tlb-nommu.o pg-nommu.o
18mmu-$(CONFIG_MMU) := fault_32.o tlbflush_32.o ioremap_32.o
19
20obj-y += $(mmu-y)
21obj-$(CONFIG_DEBUG_FS) += asids-debugfs.o
22
23ifdef CONFIG_DEBUG_FS
24obj-$(CONFIG_CPU_SH4) += cache-debugfs.o
25endif
26
27ifdef CONFIG_MMU
28tlb-$(CONFIG_CPU_SH3) := tlb-sh3.o
29tlb-$(CONFIG_CPU_SH4) := tlb-sh4.o
30tlb-$(CONFIG_CPU_HAS_PTEAEX) := tlb-pteaex.o
31obj-y += $(tlb-y)
32ifndef CONFIG_CACHE_OFF
33obj-$(CONFIG_CPU_SH4) += pg-sh4.o
34obj-$(CONFIG_SH7705_CACHE_32KB) += pg-sh7705.o
35endif
36endif
37
38obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
39obj-$(CONFIG_PMB) += pmb.o
40obj-$(CONFIG_PMB_FIXED) += pmb-fixed.o
41obj-$(CONFIG_NUMA) += numa.o
42
43EXTRA_CFLAGS += -Werror
diff --git a/arch/sh/mm/Makefile_64 b/arch/sh/mm/Makefile_64
deleted file mode 100644
index 2863ffb7006d..000000000000
--- a/arch/sh/mm/Makefile_64
+++ /dev/null
@@ -1,46 +0,0 @@
1#
2# Makefile for the Linux SuperH-specific parts of the memory manager.
3#
4
5obj-y := init.o consistent.o mmap.o
6
7mmu-y := tlb-nommu.o pg-nommu.o extable_32.o
8mmu-$(CONFIG_MMU) := fault_64.o ioremap_64.o tlbflush_64.o tlb-sh5.o \
9 extable_64.o
10
11ifndef CONFIG_CACHE_OFF
12obj-y += cache-sh5.o
13endif
14
15obj-y += $(mmu-y)
16obj-$(CONFIG_DEBUG_FS) += asids-debugfs.o
17
18obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
19obj-$(CONFIG_NUMA) += numa.o
20
21EXTRA_CFLAGS += -Werror
22
23# Special flags for fault_64.o. This puts restrictions on the number of
24# caller-save registers that the compiler can target when building this file.
25# This is required because the code is called from a context in entry.S where
26# very few registers have been saved in the exception handler (for speed
27# reasons).
28# The caller save registers that have been saved and which can be used are
29# r2,r3,r4,r5 : argument passing
30# r15, r18 : SP and LINK
31# tr0-4 : allow all caller-save TR's. The compiler seems to be able to make
32# use of them, so it's probably beneficial to performance to save them
33# and have them available for it.
34#
35# The resources not listed below are callee save, i.e. the compiler is free to
36# use any of them and will spill them to the stack itself.
37
38CFLAGS_fault_64.o += -ffixed-r7 \
39 -ffixed-r8 -ffixed-r9 -ffixed-r10 -ffixed-r11 -ffixed-r12 \
40 -ffixed-r13 -ffixed-r14 -ffixed-r16 -ffixed-r17 -ffixed-r19 \
41 -ffixed-r20 -ffixed-r21 -ffixed-r22 -ffixed-r23 \
42 -ffixed-r24 -ffixed-r25 -ffixed-r26 -ffixed-r27 \
43 -ffixed-r36 -ffixed-r37 -ffixed-r38 -ffixed-r39 -ffixed-r40 \
44 -ffixed-r41 -ffixed-r42 -ffixed-r43 \
45 -ffixed-r60 -ffixed-r61 -ffixed-r62 \
46 -fomit-frame-pointer
diff --git a/arch/sh/mm/cache-sh2.c b/arch/sh/mm/cache-sh2.c
index c4e80d2b764b..699a71f46327 100644
--- a/arch/sh/mm/cache-sh2.c
+++ b/arch/sh/mm/cache-sh2.c
@@ -16,7 +16,7 @@
16#include <asm/cacheflush.h> 16#include <asm/cacheflush.h>
17#include <asm/io.h> 17#include <asm/io.h>
18 18
19void __flush_wback_region(void *start, int size) 19static void sh2__flush_wback_region(void *start, int size)
20{ 20{
21 unsigned long v; 21 unsigned long v;
22 unsigned long begin, end; 22 unsigned long begin, end;
@@ -37,7 +37,7 @@ void __flush_wback_region(void *start, int size)
37 } 37 }
38} 38}
39 39
40void __flush_purge_region(void *start, int size) 40static void sh2__flush_purge_region(void *start, int size)
41{ 41{
42 unsigned long v; 42 unsigned long v;
43 unsigned long begin, end; 43 unsigned long begin, end;
@@ -51,7 +51,7 @@ void __flush_purge_region(void *start, int size)
51 CACHE_OC_ADDRESS_ARRAY | (v & 0x00000ff0) | 0x00000008); 51 CACHE_OC_ADDRESS_ARRAY | (v & 0x00000ff0) | 0x00000008);
52} 52}
53 53
54void __flush_invalidate_region(void *start, int size) 54static void sh2__flush_invalidate_region(void *start, int size)
55{ 55{
56#ifdef CONFIG_CACHE_WRITEBACK 56#ifdef CONFIG_CACHE_WRITEBACK
57 /* 57 /*
@@ -82,3 +82,10 @@ void __flush_invalidate_region(void *start, int size)
82 CACHE_OC_ADDRESS_ARRAY | (v & 0x00000ff0) | 0x00000008); 82 CACHE_OC_ADDRESS_ARRAY | (v & 0x00000ff0) | 0x00000008);
83#endif 83#endif
84} 84}
85
86void __init sh2_cache_init(void)
87{
88 __flush_wback_region = sh2__flush_wback_region;
89 __flush_purge_region = sh2__flush_purge_region;
90 __flush_invalidate_region = sh2__flush_invalidate_region;
91}
diff --git a/arch/sh/mm/cache-sh2a.c b/arch/sh/mm/cache-sh2a.c
index 24d86a794065..975899d83564 100644
--- a/arch/sh/mm/cache-sh2a.c
+++ b/arch/sh/mm/cache-sh2a.c
@@ -15,7 +15,7 @@
15#include <asm/cacheflush.h> 15#include <asm/cacheflush.h>
16#include <asm/io.h> 16#include <asm/io.h>
17 17
18void __flush_wback_region(void *start, int size) 18static void sh2a__flush_wback_region(void *start, int size)
19{ 19{
20 unsigned long v; 20 unsigned long v;
21 unsigned long begin, end; 21 unsigned long begin, end;
@@ -44,7 +44,7 @@ void __flush_wback_region(void *start, int size)
44 local_irq_restore(flags); 44 local_irq_restore(flags);
45} 45}
46 46
47void __flush_purge_region(void *start, int size) 47static void sh2a__flush_purge_region(void *start, int size)
48{ 48{
49 unsigned long v; 49 unsigned long v;
50 unsigned long begin, end; 50 unsigned long begin, end;
@@ -65,7 +65,7 @@ void __flush_purge_region(void *start, int size)
65 local_irq_restore(flags); 65 local_irq_restore(flags);
66} 66}
67 67
68void __flush_invalidate_region(void *start, int size) 68static void sh2a__flush_invalidate_region(void *start, int size)
69{ 69{
70 unsigned long v; 70 unsigned long v;
71 unsigned long begin, end; 71 unsigned long begin, end;
@@ -97,13 +97,15 @@ void __flush_invalidate_region(void *start, int size)
97} 97}
98 98
99/* WBack O-Cache and flush I-Cache */ 99/* WBack O-Cache and flush I-Cache */
100void flush_icache_range(unsigned long start, unsigned long end) 100static void sh2a_flush_icache_range(void *args)
101{ 101{
102 struct flusher_data *data = args;
103 unsigned long start, end;
102 unsigned long v; 104 unsigned long v;
103 unsigned long flags; 105 unsigned long flags;
104 106
105 start = start & ~(L1_CACHE_BYTES-1); 107 start = data->addr1 & ~(L1_CACHE_BYTES-1);
106 end = (end + L1_CACHE_BYTES-1) & ~(L1_CACHE_BYTES-1); 108 end = (data->addr2 + L1_CACHE_BYTES-1) & ~(L1_CACHE_BYTES-1);
107 109
108 local_irq_save(flags); 110 local_irq_save(flags);
109 jump_to_uncached(); 111 jump_to_uncached();
@@ -127,3 +129,12 @@ void flush_icache_range(unsigned long start, unsigned long end)
127 back_to_cached(); 129 back_to_cached();
128 local_irq_restore(flags); 130 local_irq_restore(flags);
129} 131}
132
133void __init sh2a_cache_init(void)
134{
135 local_flush_icache_range = sh2a_flush_icache_range;
136
137 __flush_wback_region = sh2a__flush_wback_region;
138 __flush_purge_region = sh2a__flush_purge_region;
139 __flush_invalidate_region = sh2a__flush_invalidate_region;
140}
diff --git a/arch/sh/mm/cache-sh3.c b/arch/sh/mm/cache-sh3.c
index 6d1dbec08ad4..faef80c98134 100644
--- a/arch/sh/mm/cache-sh3.c
+++ b/arch/sh/mm/cache-sh3.c
@@ -32,7 +32,7 @@
32 * SIZE: Size of the region. 32 * SIZE: Size of the region.
33 */ 33 */
34 34
35void __flush_wback_region(void *start, int size) 35static void sh3__flush_wback_region(void *start, int size)
36{ 36{
37 unsigned long v, j; 37 unsigned long v, j;
38 unsigned long begin, end; 38 unsigned long begin, end;
@@ -71,7 +71,7 @@ void __flush_wback_region(void *start, int size)
71 * START: Virtual Address (U0, P1, or P3) 71 * START: Virtual Address (U0, P1, or P3)
72 * SIZE: Size of the region. 72 * SIZE: Size of the region.
73 */ 73 */
74void __flush_purge_region(void *start, int size) 74static void sh3__flush_purge_region(void *start, int size)
75{ 75{
76 unsigned long v; 76 unsigned long v;
77 unsigned long begin, end; 77 unsigned long begin, end;
@@ -90,11 +90,16 @@ void __flush_purge_region(void *start, int size)
90 } 90 }
91} 91}
92 92
93/* 93void __init sh3_cache_init(void)
94 * No write back please 94{
95 * 95 __flush_wback_region = sh3__flush_wback_region;
96 * Except I don't think there's any way to avoid the writeback. So we 96 __flush_purge_region = sh3__flush_purge_region;
97 * just alias it to __flush_purge_region(). dwmw2. 97
98 */ 98 /*
99void __flush_invalidate_region(void *start, int size) 99 * No write back please
100 __attribute__((alias("__flush_purge_region"))); 100 *
101 * Except I don't think there's any way to avoid the writeback.
102 * So we just alias it to sh3__flush_purge_region(). dwmw2.
103 */
104 __flush_invalidate_region = sh3__flush_purge_region;
105}
diff --git a/arch/sh/mm/cache-sh4.c b/arch/sh/mm/cache-sh4.c
index 5cfe08dbb59e..b2453bbef4cd 100644
--- a/arch/sh/mm/cache-sh4.c
+++ b/arch/sh/mm/cache-sh4.c
@@ -14,6 +14,7 @@
14#include <linux/mm.h> 14#include <linux/mm.h>
15#include <linux/io.h> 15#include <linux/io.h>
16#include <linux/mutex.h> 16#include <linux/mutex.h>
17#include <linux/fs.h>
17#include <asm/mmu_context.h> 18#include <asm/mmu_context.h>
18#include <asm/cacheflush.h> 19#include <asm/cacheflush.h>
19 20
@@ -25,13 +26,6 @@
25#define MAX_DCACHE_PAGES 64 /* XXX: Tune for ways */ 26#define MAX_DCACHE_PAGES 64 /* XXX: Tune for ways */
26#define MAX_ICACHE_PAGES 32 27#define MAX_ICACHE_PAGES 32
27 28
28static void __flush_dcache_segment_1way(unsigned long start,
29 unsigned long extent);
30static void __flush_dcache_segment_2way(unsigned long start,
31 unsigned long extent);
32static void __flush_dcache_segment_4way(unsigned long start,
33 unsigned long extent);
34
35static void __flush_cache_4096(unsigned long addr, unsigned long phys, 29static void __flush_cache_4096(unsigned long addr, unsigned long phys,
36 unsigned long exec_offset); 30 unsigned long exec_offset);
37 31
@@ -43,182 +37,56 @@ static void __flush_cache_4096(unsigned long addr, unsigned long phys,
43static void (*__flush_dcache_segment_fn)(unsigned long, unsigned long) = 37static void (*__flush_dcache_segment_fn)(unsigned long, unsigned long) =
44 (void (*)(unsigned long, unsigned long))0xdeadbeef; 38 (void (*)(unsigned long, unsigned long))0xdeadbeef;
45 39
46static void compute_alias(struct cache_info *c) 40/*
41 * Write back the range of D-cache, and purge the I-cache.
42 *
43 * Called from kernel/module.c:sys_init_module and routine for a.out format,
44 * signal handler code and kprobes code
45 */
46static void sh4_flush_icache_range(void *args)
47{ 47{
48 c->alias_mask = ((c->sets - 1) << c->entry_shift) & ~(PAGE_SIZE - 1); 48 struct flusher_data *data = args;
49 c->n_aliases = c->alias_mask ? (c->alias_mask >> PAGE_SHIFT) + 1 : 0; 49 unsigned long start, end;
50} 50 unsigned long flags, v;
51 int i;
51 52
52static void __init emit_cache_params(void) 53 start = data->addr1;
53{ 54 end = data->addr2;
54 printk("PVR=%08x CVR=%08x PRR=%08x\n",
55 ctrl_inl(CCN_PVR),
56 ctrl_inl(CCN_CVR),
57 ctrl_inl(CCN_PRR));
58 printk("I-cache : n_ways=%d n_sets=%d way_incr=%d\n",
59 boot_cpu_data.icache.ways,
60 boot_cpu_data.icache.sets,
61 boot_cpu_data.icache.way_incr);
62 printk("I-cache : entry_mask=0x%08x alias_mask=0x%08x n_aliases=%d\n",
63 boot_cpu_data.icache.entry_mask,
64 boot_cpu_data.icache.alias_mask,
65 boot_cpu_data.icache.n_aliases);
66 printk("D-cache : n_ways=%d n_sets=%d way_incr=%d\n",
67 boot_cpu_data.dcache.ways,
68 boot_cpu_data.dcache.sets,
69 boot_cpu_data.dcache.way_incr);
70 printk("D-cache : entry_mask=0x%08x alias_mask=0x%08x n_aliases=%d\n",
71 boot_cpu_data.dcache.entry_mask,
72 boot_cpu_data.dcache.alias_mask,
73 boot_cpu_data.dcache.n_aliases);
74 55
75 /* 56 /* If there are too many pages then just blow away the caches */
76 * Emit Secondary Cache parameters if the CPU has a probed L2. 57 if (((end - start) >> PAGE_SHIFT) >= MAX_ICACHE_PAGES) {
77 */ 58 local_flush_cache_all(NULL);
78 if (boot_cpu_data.flags & CPU_HAS_L2_CACHE) { 59 return;
79 printk("S-cache : n_ways=%d n_sets=%d way_incr=%d\n",
80 boot_cpu_data.scache.ways,
81 boot_cpu_data.scache.sets,
82 boot_cpu_data.scache.way_incr);
83 printk("S-cache : entry_mask=0x%08x alias_mask=0x%08x n_aliases=%d\n",
84 boot_cpu_data.scache.entry_mask,
85 boot_cpu_data.scache.alias_mask,
86 boot_cpu_data.scache.n_aliases);
87 } 60 }
88 61
89 if (!__flush_dcache_segment_fn) 62 /*
90 panic("unknown number of cache ways\n"); 63 * Selectively flush d-cache then invalidate the i-cache.
91} 64 * This is inefficient, so only use this for small ranges.
65 */
66 start &= ~(L1_CACHE_BYTES-1);
67 end += L1_CACHE_BYTES-1;
68 end &= ~(L1_CACHE_BYTES-1);
92 69
93/* 70 local_irq_save(flags);
94 * SH-4 has virtually indexed and physically tagged cache. 71 jump_to_uncached();
95 */
96void __init p3_cache_init(void)
97{
98 compute_alias(&boot_cpu_data.icache);
99 compute_alias(&boot_cpu_data.dcache);
100 compute_alias(&boot_cpu_data.scache);
101
102 switch (boot_cpu_data.dcache.ways) {
103 case 1:
104 __flush_dcache_segment_fn = __flush_dcache_segment_1way;
105 break;
106 case 2:
107 __flush_dcache_segment_fn = __flush_dcache_segment_2way;
108 break;
109 case 4:
110 __flush_dcache_segment_fn = __flush_dcache_segment_4way;
111 break;
112 default:
113 __flush_dcache_segment_fn = NULL;
114 break;
115 }
116 72
117 emit_cache_params(); 73 for (v = start; v < end; v += L1_CACHE_BYTES) {
118} 74 unsigned long icacheaddr;
119 75
120/* 76 __ocbwb(v);
121 * Write back the dirty D-caches, but not invalidate them.
122 *
123 * START: Virtual Address (U0, P1, or P3)
124 * SIZE: Size of the region.
125 */
126void __flush_wback_region(void *start, int size)
127{
128 unsigned long v;
129 unsigned long begin, end;
130
131 begin = (unsigned long)start & ~(L1_CACHE_BYTES-1);
132 end = ((unsigned long)start + size + L1_CACHE_BYTES-1)
133 & ~(L1_CACHE_BYTES-1);
134 for (v = begin; v < end; v+=L1_CACHE_BYTES) {
135 asm volatile("ocbwb %0"
136 : /* no output */
137 : "m" (__m(v)));
138 }
139}
140 77
141/* 78 icacheaddr = CACHE_IC_ADDRESS_ARRAY | (v &
142 * Write back the dirty D-caches and invalidate them. 79 cpu_data->icache.entry_mask);
143 *
144 * START: Virtual Address (U0, P1, or P3)
145 * SIZE: Size of the region.
146 */
147void __flush_purge_region(void *start, int size)
148{
149 unsigned long v;
150 unsigned long begin, end;
151
152 begin = (unsigned long)start & ~(L1_CACHE_BYTES-1);
153 end = ((unsigned long)start + size + L1_CACHE_BYTES-1)
154 & ~(L1_CACHE_BYTES-1);
155 for (v = begin; v < end; v+=L1_CACHE_BYTES) {
156 asm volatile("ocbp %0"
157 : /* no output */
158 : "m" (__m(v)));
159 }
160}
161 80
162/* 81 /* Clear i-cache line valid-bit */
163 * No write back please 82 for (i = 0; i < cpu_data->icache.ways; i++) {
164 */ 83 __raw_writel(0, icacheaddr);
165void __flush_invalidate_region(void *start, int size) 84 icacheaddr += cpu_data->icache.way_incr;
166{ 85 }
167 unsigned long v;
168 unsigned long begin, end;
169
170 begin = (unsigned long)start & ~(L1_CACHE_BYTES-1);
171 end = ((unsigned long)start + size + L1_CACHE_BYTES-1)
172 & ~(L1_CACHE_BYTES-1);
173 for (v = begin; v < end; v+=L1_CACHE_BYTES) {
174 asm volatile("ocbi %0"
175 : /* no output */
176 : "m" (__m(v)));
177 } 86 }
178}
179
180/*
181 * Write back the range of D-cache, and purge the I-cache.
182 *
183 * Called from kernel/module.c:sys_init_module and routine for a.out format,
184 * signal handler code and kprobes code
185 */
186void flush_icache_range(unsigned long start, unsigned long end)
187{
188 int icacheaddr;
189 unsigned long flags, v;
190 int i;
191 87
192 /* If there are too many pages then just blow the caches */ 88 back_to_cached();
193 if (((end - start) >> PAGE_SHIFT) >= MAX_ICACHE_PAGES) { 89 local_irq_restore(flags);
194 flush_cache_all();
195 } else {
196 /* selectively flush d-cache then invalidate the i-cache */
197 /* this is inefficient, so only use for small ranges */
198 start &= ~(L1_CACHE_BYTES-1);
199 end += L1_CACHE_BYTES-1;
200 end &= ~(L1_CACHE_BYTES-1);
201
202 local_irq_save(flags);
203 jump_to_uncached();
204
205 for (v = start; v < end; v+=L1_CACHE_BYTES) {
206 asm volatile("ocbwb %0"
207 : /* no output */
208 : "m" (__m(v)));
209
210 icacheaddr = CACHE_IC_ADDRESS_ARRAY | (
211 v & cpu_data->icache.entry_mask);
212
213 for (i = 0; i < cpu_data->icache.ways;
214 i++, icacheaddr += cpu_data->icache.way_incr)
215 /* Clear i-cache line valid-bit */
216 ctrl_outl(0, icacheaddr);
217 }
218
219 back_to_cached();
220 local_irq_restore(flags);
221 }
222} 90}
223 91
224static inline void flush_cache_4096(unsigned long start, 92static inline void flush_cache_4096(unsigned long start,
@@ -244,9 +112,17 @@ static inline void flush_cache_4096(unsigned long start,
244 * Write back & invalidate the D-cache of the page. 112 * Write back & invalidate the D-cache of the page.
245 * (To avoid "alias" issues) 113 * (To avoid "alias" issues)
246 */ 114 */
247void flush_dcache_page(struct page *page) 115static void sh4_flush_dcache_page(void *arg)
248{ 116{
249 if (test_bit(PG_mapped, &page->flags)) { 117 struct page *page = arg;
118#ifndef CONFIG_SMP
119 struct address_space *mapping = page_mapping(page);
120
121 if (mapping && !mapping_mapped(mapping))
122 set_bit(PG_dcache_dirty, &page->flags);
123 else
124#endif
125 {
250 unsigned long phys = PHYSADDR(page_address(page)); 126 unsigned long phys = PHYSADDR(page_address(page));
251 unsigned long addr = CACHE_OC_ADDRESS_ARRAY; 127 unsigned long addr = CACHE_OC_ADDRESS_ARRAY;
252 int i, n; 128 int i, n;
@@ -282,13 +158,13 @@ static void __uses_jump_to_uncached flush_icache_all(void)
282 local_irq_restore(flags); 158 local_irq_restore(flags);
283} 159}
284 160
285void flush_dcache_all(void) 161static inline void flush_dcache_all(void)
286{ 162{
287 (*__flush_dcache_segment_fn)(0UL, boot_cpu_data.dcache.way_size); 163 (*__flush_dcache_segment_fn)(0UL, boot_cpu_data.dcache.way_size);
288 wmb(); 164 wmb();
289} 165}
290 166
291void flush_cache_all(void) 167static void sh4_flush_cache_all(void *unused)
292{ 168{
293 flush_dcache_all(); 169 flush_dcache_all();
294 flush_icache_all(); 170 flush_icache_all();
@@ -380,8 +256,13 @@ loop_exit:
380 * 256 *
381 * Caller takes mm->mmap_sem. 257 * Caller takes mm->mmap_sem.
382 */ 258 */
383void flush_cache_mm(struct mm_struct *mm) 259static void sh4_flush_cache_mm(void *arg)
384{ 260{
261 struct mm_struct *mm = arg;
262
263 if (cpu_context(smp_processor_id(), mm) == NO_CONTEXT)
264 return;
265
385 /* 266 /*
386 * If cache is only 4k-per-way, there are never any 'aliases'. Since 267 * If cache is only 4k-per-way, there are never any 'aliases'. Since
387 * the cache is physically tagged, the data can just be left in there. 268 * the cache is physically tagged, the data can just be left in there.
@@ -417,12 +298,21 @@ void flush_cache_mm(struct mm_struct *mm)
417 * ADDR: Virtual Address (U0 address) 298 * ADDR: Virtual Address (U0 address)
418 * PFN: Physical page number 299 * PFN: Physical page number
419 */ 300 */
420void flush_cache_page(struct vm_area_struct *vma, unsigned long address, 301static void sh4_flush_cache_page(void *args)
421 unsigned long pfn)
422{ 302{
423 unsigned long phys = pfn << PAGE_SHIFT; 303 struct flusher_data *data = args;
304 struct vm_area_struct *vma;
305 unsigned long address, pfn, phys;
424 unsigned int alias_mask; 306 unsigned int alias_mask;
425 307
308 vma = data->vma;
309 address = data->addr1;
310 pfn = data->addr2;
311 phys = pfn << PAGE_SHIFT;
312
313 if (cpu_context(smp_processor_id(), vma->vm_mm) == NO_CONTEXT)
314 return;
315
426 alias_mask = boot_cpu_data.dcache.alias_mask; 316 alias_mask = boot_cpu_data.dcache.alias_mask;
427 317
428 /* We only need to flush D-cache when we have alias */ 318 /* We only need to flush D-cache when we have alias */
@@ -462,9 +352,19 @@ void flush_cache_page(struct vm_area_struct *vma, unsigned long address,
462 * Flushing the cache lines for U0 only isn't enough. 352 * Flushing the cache lines for U0 only isn't enough.
463 * We need to flush for P1 too, which may contain aliases. 353 * We need to flush for P1 too, which may contain aliases.
464 */ 354 */
465void flush_cache_range(struct vm_area_struct *vma, unsigned long start, 355static void sh4_flush_cache_range(void *args)
466 unsigned long end)
467{ 356{
357 struct flusher_data *data = args;
358 struct vm_area_struct *vma;
359 unsigned long start, end;
360
361 vma = data->vma;
362 start = data->addr1;
363 end = data->addr2;
364
365 if (cpu_context(smp_processor_id(), vma->vm_mm) == NO_CONTEXT)
366 return;
367
468 /* 368 /*
469 * If cache is only 4k-per-way, there are never any 'aliases'. Since 369 * If cache is only 4k-per-way, there are never any 'aliases'. Since
470 * the cache is physically tagged, the data can just be left in there. 370 * the cache is physically tagged, the data can just be left in there.
@@ -492,20 +392,6 @@ void flush_cache_range(struct vm_area_struct *vma, unsigned long start,
492 } 392 }
493} 393}
494 394
495/*
496 * flush_icache_user_range
497 * @vma: VMA of the process
498 * @page: page
499 * @addr: U0 address
500 * @len: length of the range (< page size)
501 */
502void flush_icache_user_range(struct vm_area_struct *vma,
503 struct page *page, unsigned long addr, int len)
504{
505 flush_cache_page(vma, addr, page_to_pfn(page));
506 mb();
507}
508
509/** 395/**
510 * __flush_cache_4096 396 * __flush_cache_4096
511 * 397 *
@@ -581,7 +467,49 @@ static void __flush_cache_4096(unsigned long addr, unsigned long phys,
581 * Break the 1, 2 and 4 way variants of this out into separate functions to 467 * Break the 1, 2 and 4 way variants of this out into separate functions to
582 * avoid nearly all the overhead of having the conditional stuff in the function 468 * avoid nearly all the overhead of having the conditional stuff in the function
583 * bodies (+ the 1 and 2 way cases avoid saving any registers too). 469 * bodies (+ the 1 and 2 way cases avoid saving any registers too).
470 *
471 * We want to eliminate unnecessary bus transactions, so this code uses
472 * a non-obvious technique.
473 *
474 * Loop over a cache way sized block of, one cache line at a time. For each
475 * line, use movca.a to cause the current cache line contents to be written
476 * back, but without reading anything from main memory. However this has the
477 * side effect that the cache is now caching that memory location. So follow
478 * this with a cache invalidate to mark the cache line invalid. And do all
479 * this with interrupts disabled, to avoid the cache line being accidently
480 * evicted while it is holding garbage.
481 *
482 * This also breaks in a number of circumstances:
483 * - if there are modifications to the region of memory just above
484 * empty_zero_page (for example because a breakpoint has been placed
485 * there), then these can be lost.
486 *
487 * This is because the the memory address which the cache temporarily
488 * caches in the above description is empty_zero_page. So the
489 * movca.l hits the cache (it is assumed that it misses, or at least
490 * isn't dirty), modifies the line and then invalidates it, losing the
491 * required change.
492 *
493 * - If caches are disabled or configured in write-through mode, then
494 * the movca.l writes garbage directly into memory.
584 */ 495 */
496static void __flush_dcache_segment_writethrough(unsigned long start,
497 unsigned long extent_per_way)
498{
499 unsigned long addr;
500 int i;
501
502 addr = CACHE_OC_ADDRESS_ARRAY | (start & cpu_data->dcache.entry_mask);
503
504 while (extent_per_way) {
505 for (i = 0; i < cpu_data->dcache.ways; i++)
506 __raw_writel(0, addr + cpu_data->dcache.way_incr * i);
507
508 addr += cpu_data->dcache.linesz;
509 extent_per_way -= cpu_data->dcache.linesz;
510 }
511}
512
585static void __flush_dcache_segment_1way(unsigned long start, 513static void __flush_dcache_segment_1way(unsigned long start,
586 unsigned long extent_per_way) 514 unsigned long extent_per_way)
587{ 515{
@@ -773,3 +701,47 @@ static void __flush_dcache_segment_4way(unsigned long start,
773 a3 += linesz; 701 a3 += linesz;
774 } while (a0 < a0e); 702 } while (a0 < a0e);
775} 703}
704
705extern void __weak sh4__flush_region_init(void);
706
707/*
708 * SH-4 has virtually indexed and physically tagged cache.
709 */
710void __init sh4_cache_init(void)
711{
712 unsigned int wt_enabled = !!(__raw_readl(CCR) & CCR_CACHE_WT);
713
714 printk("PVR=%08x CVR=%08x PRR=%08x\n",
715 ctrl_inl(CCN_PVR),
716 ctrl_inl(CCN_CVR),
717 ctrl_inl(CCN_PRR));
718
719 if (wt_enabled)
720 __flush_dcache_segment_fn = __flush_dcache_segment_writethrough;
721 else {
722 switch (boot_cpu_data.dcache.ways) {
723 case 1:
724 __flush_dcache_segment_fn = __flush_dcache_segment_1way;
725 break;
726 case 2:
727 __flush_dcache_segment_fn = __flush_dcache_segment_2way;
728 break;
729 case 4:
730 __flush_dcache_segment_fn = __flush_dcache_segment_4way;
731 break;
732 default:
733 panic("unknown number of cache ways\n");
734 break;
735 }
736 }
737
738 local_flush_icache_range = sh4_flush_icache_range;
739 local_flush_dcache_page = sh4_flush_dcache_page;
740 local_flush_cache_all = sh4_flush_cache_all;
741 local_flush_cache_mm = sh4_flush_cache_mm;
742 local_flush_cache_dup_mm = sh4_flush_cache_mm;
743 local_flush_cache_page = sh4_flush_cache_page;
744 local_flush_cache_range = sh4_flush_cache_range;
745
746 sh4__flush_region_init();
747}
diff --git a/arch/sh/mm/cache-sh5.c b/arch/sh/mm/cache-sh5.c
index 86762092508c..467ff8e260f7 100644
--- a/arch/sh/mm/cache-sh5.c
+++ b/arch/sh/mm/cache-sh5.c
@@ -20,23 +20,11 @@
20#include <asm/uaccess.h> 20#include <asm/uaccess.h>
21#include <asm/mmu_context.h> 21#include <asm/mmu_context.h>
22 22
23extern void __weak sh4__flush_region_init(void);
24
23/* Wired TLB entry for the D-cache */ 25/* Wired TLB entry for the D-cache */
24static unsigned long long dtlb_cache_slot; 26static unsigned long long dtlb_cache_slot;
25 27
26void __init p3_cache_init(void)
27{
28 /* Reserve a slot for dcache colouring in the DTLB */
29 dtlb_cache_slot = sh64_get_wired_dtlb_entry();
30}
31
32#ifdef CONFIG_DCACHE_DISABLED
33#define sh64_dcache_purge_all() do { } while (0)
34#define sh64_dcache_purge_coloured_phy_page(paddr, eaddr) do { } while (0)
35#define sh64_dcache_purge_user_range(mm, start, end) do { } while (0)
36#define sh64_dcache_purge_phy_page(paddr) do { } while (0)
37#define sh64_dcache_purge_virt_page(mm, eaddr) do { } while (0)
38#endif
39
40/* 28/*
41 * The following group of functions deal with mapping and unmapping a 29 * The following group of functions deal with mapping and unmapping a
42 * temporary page into a DTLB slot that has been set aside for exclusive 30 * temporary page into a DTLB slot that has been set aside for exclusive
@@ -56,7 +44,6 @@ static inline void sh64_teardown_dtlb_cache_slot(void)
56 local_irq_enable(); 44 local_irq_enable();
57} 45}
58 46
59#ifndef CONFIG_ICACHE_DISABLED
60static inline void sh64_icache_inv_all(void) 47static inline void sh64_icache_inv_all(void)
61{ 48{
62 unsigned long long addr, flag, data; 49 unsigned long long addr, flag, data;
@@ -214,52 +201,6 @@ static void sh64_icache_inv_user_page_range(struct mm_struct *mm,
214 } 201 }
215} 202}
216 203
217/*
218 * Invalidate a small range of user context I-cache, not necessarily page
219 * (or even cache-line) aligned.
220 *
221 * Since this is used inside ptrace, the ASID in the mm context typically
222 * won't match current_asid. We'll have to switch ASID to do this. For
223 * safety, and given that the range will be small, do all this under cli.
224 *
225 * Note, there is a hazard that the ASID in mm->context is no longer
226 * actually associated with mm, i.e. if the mm->context has started a new
227 * cycle since mm was last active. However, this is just a performance
228 * issue: all that happens is that we invalidate lines belonging to
229 * another mm, so the owning process has to refill them when that mm goes
230 * live again. mm itself can't have any cache entries because there will
231 * have been a flush_cache_all when the new mm->context cycle started.
232 */
233static void sh64_icache_inv_user_small_range(struct mm_struct *mm,
234 unsigned long start, int len)
235{
236 unsigned long long eaddr = start;
237 unsigned long long eaddr_end = start + len;
238 unsigned long current_asid, mm_asid;
239 unsigned long flags;
240 unsigned long long epage_start;
241
242 /*
243 * Align to start of cache line. Otherwise, suppose len==8 and
244 * start was at 32N+28 : the last 4 bytes wouldn't get invalidated.
245 */
246 eaddr = L1_CACHE_ALIGN(start);
247 eaddr_end = start + len;
248
249 mm_asid = cpu_asid(smp_processor_id(), mm);
250 local_irq_save(flags);
251 current_asid = switch_and_save_asid(mm_asid);
252
253 epage_start = eaddr & PAGE_MASK;
254
255 while (eaddr < eaddr_end) {
256 __asm__ __volatile__("icbi %0, 0" : : "r" (eaddr));
257 eaddr += L1_CACHE_BYTES;
258 }
259 switch_and_save_asid(current_asid);
260 local_irq_restore(flags);
261}
262
263static void sh64_icache_inv_current_user_range(unsigned long start, unsigned long end) 204static void sh64_icache_inv_current_user_range(unsigned long start, unsigned long end)
264{ 205{
265 /* The icbi instruction never raises ITLBMISS. i.e. if there's not a 206 /* The icbi instruction never raises ITLBMISS. i.e. if there's not a
@@ -287,9 +228,7 @@ static void sh64_icache_inv_current_user_range(unsigned long start, unsigned lon
287 addr += L1_CACHE_BYTES; 228 addr += L1_CACHE_BYTES;
288 } 229 }
289} 230}
290#endif /* !CONFIG_ICACHE_DISABLED */
291 231
292#ifndef CONFIG_DCACHE_DISABLED
293/* Buffer used as the target of alloco instructions to purge data from cache 232/* Buffer used as the target of alloco instructions to purge data from cache
294 sets by natural eviction. -- RPC */ 233 sets by natural eviction. -- RPC */
295#define DUMMY_ALLOCO_AREA_SIZE ((L1_CACHE_BYTES << 10) + (1024 * 4)) 234#define DUMMY_ALLOCO_AREA_SIZE ((L1_CACHE_BYTES << 10) + (1024 * 4))
@@ -541,59 +480,10 @@ static void sh64_dcache_purge_user_range(struct mm_struct *mm,
541} 480}
542 481
543/* 482/*
544 * Purge the range of addresses from the D-cache.
545 *
546 * The addresses lie in the superpage mapping. There's no harm if we
547 * overpurge at either end - just a small performance loss.
548 */
549void __flush_purge_region(void *start, int size)
550{
551 unsigned long long ullend, addr, aligned_start;
552
553 aligned_start = (unsigned long long)(signed long long)(signed long) start;
554 addr = L1_CACHE_ALIGN(aligned_start);
555 ullend = (unsigned long long) (signed long long) (signed long) start + size;
556
557 while (addr <= ullend) {
558 __asm__ __volatile__ ("ocbp %0, 0" : : "r" (addr));
559 addr += L1_CACHE_BYTES;
560 }
561}
562
563void __flush_wback_region(void *start, int size)
564{
565 unsigned long long ullend, addr, aligned_start;
566
567 aligned_start = (unsigned long long)(signed long long)(signed long) start;
568 addr = L1_CACHE_ALIGN(aligned_start);
569 ullend = (unsigned long long) (signed long long) (signed long) start + size;
570
571 while (addr < ullend) {
572 __asm__ __volatile__ ("ocbwb %0, 0" : : "r" (addr));
573 addr += L1_CACHE_BYTES;
574 }
575}
576
577void __flush_invalidate_region(void *start, int size)
578{
579 unsigned long long ullend, addr, aligned_start;
580
581 aligned_start = (unsigned long long)(signed long long)(signed long) start;
582 addr = L1_CACHE_ALIGN(aligned_start);
583 ullend = (unsigned long long) (signed long long) (signed long) start + size;
584
585 while (addr < ullend) {
586 __asm__ __volatile__ ("ocbi %0, 0" : : "r" (addr));
587 addr += L1_CACHE_BYTES;
588 }
589}
590#endif /* !CONFIG_DCACHE_DISABLED */
591
592/*
593 * Invalidate the entire contents of both caches, after writing back to 483 * Invalidate the entire contents of both caches, after writing back to
594 * memory any dirty data from the D-cache. 484 * memory any dirty data from the D-cache.
595 */ 485 */
596void flush_cache_all(void) 486static void sh5_flush_cache_all(void *unused)
597{ 487{
598 sh64_dcache_purge_all(); 488 sh64_dcache_purge_all();
599 sh64_icache_inv_all(); 489 sh64_icache_inv_all();
@@ -620,7 +510,7 @@ void flush_cache_all(void)
620 * I-cache. This is similar to the lack of action needed in 510 * I-cache. This is similar to the lack of action needed in
621 * flush_tlb_mm - see fault.c. 511 * flush_tlb_mm - see fault.c.
622 */ 512 */
623void flush_cache_mm(struct mm_struct *mm) 513static void sh5_flush_cache_mm(void *unused)
624{ 514{
625 sh64_dcache_purge_all(); 515 sh64_dcache_purge_all();
626} 516}
@@ -632,13 +522,18 @@ void flush_cache_mm(struct mm_struct *mm)
632 * 522 *
633 * Note, 'end' is 1 byte beyond the end of the range to flush. 523 * Note, 'end' is 1 byte beyond the end of the range to flush.
634 */ 524 */
635void flush_cache_range(struct vm_area_struct *vma, unsigned long start, 525static void sh5_flush_cache_range(void *args)
636 unsigned long end)
637{ 526{
638 struct mm_struct *mm = vma->vm_mm; 527 struct flusher_data *data = args;
528 struct vm_area_struct *vma;
529 unsigned long start, end;
530
531 vma = data->vma;
532 start = data->addr1;
533 end = data->addr2;
639 534
640 sh64_dcache_purge_user_range(mm, start, end); 535 sh64_dcache_purge_user_range(vma->vm_mm, start, end);
641 sh64_icache_inv_user_page_range(mm, start, end); 536 sh64_icache_inv_user_page_range(vma->vm_mm, start, end);
642} 537}
643 538
644/* 539/*
@@ -650,16 +545,23 @@ void flush_cache_range(struct vm_area_struct *vma, unsigned long start,
650 * 545 *
651 * Note, this is called with pte lock held. 546 * Note, this is called with pte lock held.
652 */ 547 */
653void flush_cache_page(struct vm_area_struct *vma, unsigned long eaddr, 548static void sh5_flush_cache_page(void *args)
654 unsigned long pfn)
655{ 549{
550 struct flusher_data *data = args;
551 struct vm_area_struct *vma;
552 unsigned long eaddr, pfn;
553
554 vma = data->vma;
555 eaddr = data->addr1;
556 pfn = data->addr2;
557
656 sh64_dcache_purge_phy_page(pfn << PAGE_SHIFT); 558 sh64_dcache_purge_phy_page(pfn << PAGE_SHIFT);
657 559
658 if (vma->vm_flags & VM_EXEC) 560 if (vma->vm_flags & VM_EXEC)
659 sh64_icache_inv_user_page(vma, eaddr); 561 sh64_icache_inv_user_page(vma, eaddr);
660} 562}
661 563
662void flush_dcache_page(struct page *page) 564static void sh5_flush_dcache_page(void *page)
663{ 565{
664 sh64_dcache_purge_phy_page(page_to_phys(page)); 566 sh64_dcache_purge_phy_page(page_to_phys(page));
665 wmb(); 567 wmb();
@@ -673,162 +575,47 @@ void flush_dcache_page(struct page *page)
673 * mapping, therefore it's guaranteed that there no cache entries for 575 * mapping, therefore it's guaranteed that there no cache entries for
674 * the range in cache sets of the wrong colour. 576 * the range in cache sets of the wrong colour.
675 */ 577 */
676void flush_icache_range(unsigned long start, unsigned long end) 578static void sh5_flush_icache_range(void *args)
677{ 579{
580 struct flusher_data *data = args;
581 unsigned long start, end;
582
583 start = data->addr1;
584 end = data->addr2;
585
678 __flush_purge_region((void *)start, end); 586 __flush_purge_region((void *)start, end);
679 wmb(); 587 wmb();
680 sh64_icache_inv_kernel_range(start, end); 588 sh64_icache_inv_kernel_range(start, end);
681} 589}
682 590
683/* 591/*
684 * Flush the range of user (defined by vma->vm_mm) address space starting
685 * at 'addr' for 'len' bytes from the cache. The range does not straddle
686 * a page boundary, the unique physical page containing the range is
687 * 'page'. This seems to be used mainly for invalidating an address
688 * range following a poke into the program text through the ptrace() call
689 * from another process (e.g. for BRK instruction insertion).
690 */
691void flush_icache_user_range(struct vm_area_struct *vma,
692 struct page *page, unsigned long addr, int len)
693{
694
695 sh64_dcache_purge_coloured_phy_page(page_to_phys(page), addr);
696 mb();
697
698 if (vma->vm_flags & VM_EXEC)
699 sh64_icache_inv_user_small_range(vma->vm_mm, addr, len);
700}
701
702/*
703 * For the address range [start,end), write back the data from the 592 * For the address range [start,end), write back the data from the
704 * D-cache and invalidate the corresponding region of the I-cache for the 593 * D-cache and invalidate the corresponding region of the I-cache for the
705 * current process. Used to flush signal trampolines on the stack to 594 * current process. Used to flush signal trampolines on the stack to
706 * make them executable. 595 * make them executable.
707 */ 596 */
708void flush_cache_sigtramp(unsigned long vaddr) 597static void sh5_flush_cache_sigtramp(void *vaddr)
709{ 598{
710 unsigned long end = vaddr + L1_CACHE_BYTES; 599 unsigned long end = (unsigned long)vaddr + L1_CACHE_BYTES;
711 600
712 __flush_wback_region((void *)vaddr, L1_CACHE_BYTES); 601 __flush_wback_region(vaddr, L1_CACHE_BYTES);
713 wmb(); 602 wmb();
714 sh64_icache_inv_current_user_range(vaddr, end); 603 sh64_icache_inv_current_user_range((unsigned long)vaddr, end);
715} 604}
716 605
717#ifdef CONFIG_MMU 606void __init sh5_cache_init(void)
718/*
719 * These *MUST* lie in an area of virtual address space that's otherwise
720 * unused.
721 */
722#define UNIQUE_EADDR_START 0xe0000000UL
723#define UNIQUE_EADDR_END 0xe8000000UL
724
725/*
726 * Given a physical address paddr, and a user virtual address user_eaddr
727 * which will eventually be mapped to it, create a one-off kernel-private
728 * eaddr mapped to the same paddr. This is used for creating special
729 * destination pages for copy_user_page and clear_user_page.
730 */
731static unsigned long sh64_make_unique_eaddr(unsigned long user_eaddr,
732 unsigned long paddr)
733{
734 static unsigned long current_pointer = UNIQUE_EADDR_START;
735 unsigned long coloured_pointer;
736
737 if (current_pointer == UNIQUE_EADDR_END) {
738 sh64_dcache_purge_all();
739 current_pointer = UNIQUE_EADDR_START;
740 }
741
742 coloured_pointer = (current_pointer & ~CACHE_OC_SYN_MASK) |
743 (user_eaddr & CACHE_OC_SYN_MASK);
744 sh64_setup_dtlb_cache_slot(coloured_pointer, get_asid(), paddr);
745
746 current_pointer += (PAGE_SIZE << CACHE_OC_N_SYNBITS);
747
748 return coloured_pointer;
749}
750
751static void sh64_copy_user_page_coloured(void *to, void *from,
752 unsigned long address)
753{ 607{
754 void *coloured_to; 608 local_flush_cache_all = sh5_flush_cache_all;
609 local_flush_cache_mm = sh5_flush_cache_mm;
610 local_flush_cache_dup_mm = sh5_flush_cache_mm;
611 local_flush_cache_page = sh5_flush_cache_page;
612 local_flush_cache_range = sh5_flush_cache_range;
613 local_flush_dcache_page = sh5_flush_dcache_page;
614 local_flush_icache_range = sh5_flush_icache_range;
615 local_flush_cache_sigtramp = sh5_flush_cache_sigtramp;
755 616
756 /* 617 /* Reserve a slot for dcache colouring in the DTLB */
757 * Discard any existing cache entries of the wrong colour. These are 618 dtlb_cache_slot = sh64_get_wired_dtlb_entry();
758 * present quite often, if the kernel has recently used the page
759 * internally, then given it up, then it's been allocated to the user.
760 */
761 sh64_dcache_purge_coloured_phy_page(__pa(to), (unsigned long)to);
762
763 coloured_to = (void *)sh64_make_unique_eaddr(address, __pa(to));
764 copy_page(from, coloured_to);
765
766 sh64_teardown_dtlb_cache_slot();
767}
768
769static void sh64_clear_user_page_coloured(void *to, unsigned long address)
770{
771 void *coloured_to;
772
773 /*
774 * Discard any existing kernel-originated lines of the wrong
775 * colour (as above)
776 */
777 sh64_dcache_purge_coloured_phy_page(__pa(to), (unsigned long)to);
778
779 coloured_to = (void *)sh64_make_unique_eaddr(address, __pa(to));
780 clear_page(coloured_to);
781
782 sh64_teardown_dtlb_cache_slot();
783}
784
785/*
786 * 'from' and 'to' are kernel virtual addresses (within the superpage
787 * mapping of the physical RAM). 'address' is the user virtual address
788 * where the copy 'to' will be mapped after. This allows a custom
789 * mapping to be used to ensure that the new copy is placed in the
790 * right cache sets for the user to see it without having to bounce it
791 * out via memory. Note however : the call to flush_page_to_ram in
792 * (generic)/mm/memory.c:(break_cow) undoes all this good work in that one
793 * very important case!
794 *
795 * TBD : can we guarantee that on every call, any cache entries for
796 * 'from' are in the same colour sets as 'address' also? i.e. is this
797 * always used just to deal with COW? (I suspect not).
798 *
799 * There are two possibilities here for when the page 'from' was last accessed:
800 * - by the kernel : this is OK, no purge required.
801 * - by the/a user (e.g. for break_COW) : need to purge.
802 *
803 * If the potential user mapping at 'address' is the same colour as
804 * 'from' there is no need to purge any cache lines from the 'from'
805 * page mapped into cache sets of colour 'address'. (The copy will be
806 * accessing the page through 'from').
807 */
808void copy_user_page(void *to, void *from, unsigned long address,
809 struct page *page)
810{
811 if (((address ^ (unsigned long) from) & CACHE_OC_SYN_MASK) != 0)
812 sh64_dcache_purge_coloured_phy_page(__pa(from), address);
813
814 if (((address ^ (unsigned long) to) & CACHE_OC_SYN_MASK) == 0)
815 copy_page(to, from);
816 else
817 sh64_copy_user_page_coloured(to, from, address);
818}
819 619
820/* 620 sh4__flush_region_init();
821 * 'to' is a kernel virtual address (within the superpage mapping of the
822 * physical RAM). 'address' is the user virtual address where the 'to'
823 * page will be mapped after. This allows a custom mapping to be used to
824 * ensure that the new copy is placed in the right cache sets for the
825 * user to see it without having to bounce it out via memory.
826 */
827void clear_user_page(void *to, unsigned long address, struct page *page)
828{
829 if (((address ^ (unsigned long) to) & CACHE_OC_SYN_MASK) == 0)
830 clear_page(to);
831 else
832 sh64_clear_user_page_coloured(to, address);
833} 621}
834#endif
diff --git a/arch/sh/mm/cache-sh7705.c b/arch/sh/mm/cache-sh7705.c
index 22dacc778823..2cadee2037ac 100644
--- a/arch/sh/mm/cache-sh7705.c
+++ b/arch/sh/mm/cache-sh7705.c
@@ -12,6 +12,7 @@
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/mman.h> 13#include <linux/mman.h>
14#include <linux/mm.h> 14#include <linux/mm.h>
15#include <linux/fs.h>
15#include <linux/threads.h> 16#include <linux/threads.h>
16#include <asm/addrspace.h> 17#include <asm/addrspace.h>
17#include <asm/page.h> 18#include <asm/page.h>
@@ -63,15 +64,21 @@ static inline void cache_wback_all(void)
63 * 64 *
64 * Called from kernel/module.c:sys_init_module and routine for a.out format. 65 * Called from kernel/module.c:sys_init_module and routine for a.out format.
65 */ 66 */
66void flush_icache_range(unsigned long start, unsigned long end) 67static void sh7705_flush_icache_range(void *args)
67{ 68{
69 struct flusher_data *data = args;
70 unsigned long start, end;
71
72 start = data->addr1;
73 end = data->addr2;
74
68 __flush_wback_region((void *)start, end - start); 75 __flush_wback_region((void *)start, end - start);
69} 76}
70 77
71/* 78/*
72 * Writeback&Invalidate the D-cache of the page 79 * Writeback&Invalidate the D-cache of the page
73 */ 80 */
74static void __uses_jump_to_uncached __flush_dcache_page(unsigned long phys) 81static void __flush_dcache_page(unsigned long phys)
75{ 82{
76 unsigned long ways, waysize, addrstart; 83 unsigned long ways, waysize, addrstart;
77 unsigned long flags; 84 unsigned long flags;
@@ -126,13 +133,18 @@ static void __uses_jump_to_uncached __flush_dcache_page(unsigned long phys)
126 * Write back & invalidate the D-cache of the page. 133 * Write back & invalidate the D-cache of the page.
127 * (To avoid "alias" issues) 134 * (To avoid "alias" issues)
128 */ 135 */
129void flush_dcache_page(struct page *page) 136static void sh7705_flush_dcache_page(void *arg)
130{ 137{
131 if (test_bit(PG_mapped, &page->flags)) 138 struct page *page = arg;
139 struct address_space *mapping = page_mapping(page);
140
141 if (mapping && !mapping_mapped(mapping))
142 set_bit(PG_dcache_dirty, &page->flags);
143 else
132 __flush_dcache_page(PHYSADDR(page_address(page))); 144 __flush_dcache_page(PHYSADDR(page_address(page)));
133} 145}
134 146
135void __uses_jump_to_uncached flush_cache_all(void) 147static void sh7705_flush_cache_all(void *args)
136{ 148{
137 unsigned long flags; 149 unsigned long flags;
138 150
@@ -144,44 +156,16 @@ void __uses_jump_to_uncached flush_cache_all(void)
144 local_irq_restore(flags); 156 local_irq_restore(flags);
145} 157}
146 158
147void flush_cache_mm(struct mm_struct *mm)
148{
149 /* Is there any good way? */
150 /* XXX: possibly call flush_cache_range for each vm area */
151 flush_cache_all();
152}
153
154/*
155 * Write back and invalidate D-caches.
156 *
157 * START, END: Virtual Address (U0 address)
158 *
159 * NOTE: We need to flush the _physical_ page entry.
160 * Flushing the cache lines for U0 only isn't enough.
161 * We need to flush for P1 too, which may contain aliases.
162 */
163void flush_cache_range(struct vm_area_struct *vma, unsigned long start,
164 unsigned long end)
165{
166
167 /*
168 * We could call flush_cache_page for the pages of these range,
169 * but it's not efficient (scan the caches all the time...).
170 *
171 * We can't use A-bit magic, as there's the case we don't have
172 * valid entry on TLB.
173 */
174 flush_cache_all();
175}
176
177/* 159/*
178 * Write back and invalidate I/D-caches for the page. 160 * Write back and invalidate I/D-caches for the page.
179 * 161 *
180 * ADDRESS: Virtual Address (U0 address) 162 * ADDRESS: Virtual Address (U0 address)
181 */ 163 */
182void flush_cache_page(struct vm_area_struct *vma, unsigned long address, 164static void sh7705_flush_cache_page(void *args)
183 unsigned long pfn)
184{ 165{
166 struct flusher_data *data = args;
167 unsigned long pfn = data->addr2;
168
185 __flush_dcache_page(pfn << PAGE_SHIFT); 169 __flush_dcache_page(pfn << PAGE_SHIFT);
186} 170}
187 171
@@ -193,7 +177,19 @@ void flush_cache_page(struct vm_area_struct *vma, unsigned long address,
193 * Not entirely sure why this is necessary on SH3 with 32K cache but 177 * Not entirely sure why this is necessary on SH3 with 32K cache but
194 * without it we get occasional "Memory fault" when loading a program. 178 * without it we get occasional "Memory fault" when loading a program.
195 */ 179 */
196void flush_icache_page(struct vm_area_struct *vma, struct page *page) 180static void sh7705_flush_icache_page(void *page)
197{ 181{
198 __flush_purge_region(page_address(page), PAGE_SIZE); 182 __flush_purge_region(page_address(page), PAGE_SIZE);
199} 183}
184
185void __init sh7705_cache_init(void)
186{
187 local_flush_icache_range = sh7705_flush_icache_range;
188 local_flush_dcache_page = sh7705_flush_dcache_page;
189 local_flush_cache_all = sh7705_flush_cache_all;
190 local_flush_cache_mm = sh7705_flush_cache_all;
191 local_flush_cache_dup_mm = sh7705_flush_cache_all;
192 local_flush_cache_range = sh7705_flush_cache_all;
193 local_flush_cache_page = sh7705_flush_cache_page;
194 local_flush_icache_page = sh7705_flush_icache_page;
195}
diff --git a/arch/sh/mm/cache.c b/arch/sh/mm/cache.c
new file mode 100644
index 000000000000..35c37b7f717a
--- /dev/null
+++ b/arch/sh/mm/cache.c
@@ -0,0 +1,316 @@
1/*
2 * arch/sh/mm/cache.c
3 *
4 * Copyright (C) 1999, 2000, 2002 Niibe Yutaka
5 * Copyright (C) 2002 - 2009 Paul Mundt
6 *
7 * Released under the terms of the GNU GPL v2.0.
8 */
9#include <linux/mm.h>
10#include <linux/init.h>
11#include <linux/mutex.h>
12#include <linux/fs.h>
13#include <linux/smp.h>
14#include <linux/highmem.h>
15#include <linux/module.h>
16#include <asm/mmu_context.h>
17#include <asm/cacheflush.h>
18
19void (*local_flush_cache_all)(void *args) = cache_noop;
20void (*local_flush_cache_mm)(void *args) = cache_noop;
21void (*local_flush_cache_dup_mm)(void *args) = cache_noop;
22void (*local_flush_cache_page)(void *args) = cache_noop;
23void (*local_flush_cache_range)(void *args) = cache_noop;
24void (*local_flush_dcache_page)(void *args) = cache_noop;
25void (*local_flush_icache_range)(void *args) = cache_noop;
26void (*local_flush_icache_page)(void *args) = cache_noop;
27void (*local_flush_cache_sigtramp)(void *args) = cache_noop;
28
29void (*__flush_wback_region)(void *start, int size);
30void (*__flush_purge_region)(void *start, int size);
31void (*__flush_invalidate_region)(void *start, int size);
32
33static inline void noop__flush_region(void *start, int size)
34{
35}
36
37static inline void cacheop_on_each_cpu(void (*func) (void *info), void *info,
38 int wait)
39{
40 preempt_disable();
41 smp_call_function(func, info, wait);
42 func(info);
43 preempt_enable();
44}
45
46void copy_to_user_page(struct vm_area_struct *vma, struct page *page,
47 unsigned long vaddr, void *dst, const void *src,
48 unsigned long len)
49{
50 if (boot_cpu_data.dcache.n_aliases && page_mapped(page) &&
51 !test_bit(PG_dcache_dirty, &page->flags)) {
52 void *vto = kmap_coherent(page, vaddr) + (vaddr & ~PAGE_MASK);
53 memcpy(vto, src, len);
54 kunmap_coherent(vto);
55 } else {
56 memcpy(dst, src, len);
57 if (boot_cpu_data.dcache.n_aliases)
58 set_bit(PG_dcache_dirty, &page->flags);
59 }
60
61 if (vma->vm_flags & VM_EXEC)
62 flush_cache_page(vma, vaddr, page_to_pfn(page));
63}
64
65void copy_from_user_page(struct vm_area_struct *vma, struct page *page,
66 unsigned long vaddr, void *dst, const void *src,
67 unsigned long len)
68{
69 if (boot_cpu_data.dcache.n_aliases && page_mapped(page) &&
70 !test_bit(PG_dcache_dirty, &page->flags)) {
71 void *vfrom = kmap_coherent(page, vaddr) + (vaddr & ~PAGE_MASK);
72 memcpy(dst, vfrom, len);
73 kunmap_coherent(vfrom);
74 } else {
75 memcpy(dst, src, len);
76 if (boot_cpu_data.dcache.n_aliases)
77 set_bit(PG_dcache_dirty, &page->flags);
78 }
79}
80
81void copy_user_highpage(struct page *to, struct page *from,
82 unsigned long vaddr, struct vm_area_struct *vma)
83{
84 void *vfrom, *vto;
85
86 vto = kmap_atomic(to, KM_USER1);
87
88 if (boot_cpu_data.dcache.n_aliases && page_mapped(from) &&
89 !test_bit(PG_dcache_dirty, &from->flags)) {
90 vfrom = kmap_coherent(from, vaddr);
91 copy_page(vto, vfrom);
92 kunmap_coherent(vfrom);
93 } else {
94 vfrom = kmap_atomic(from, KM_USER0);
95 copy_page(vto, vfrom);
96 kunmap_atomic(vfrom, KM_USER0);
97 }
98
99 if (pages_do_alias((unsigned long)vto, vaddr & PAGE_MASK))
100 __flush_purge_region(vto, PAGE_SIZE);
101
102 kunmap_atomic(vto, KM_USER1);
103 /* Make sure this page is cleared on other CPU's too before using it */
104 smp_wmb();
105}
106EXPORT_SYMBOL(copy_user_highpage);
107
108void clear_user_highpage(struct page *page, unsigned long vaddr)
109{
110 void *kaddr = kmap_atomic(page, KM_USER0);
111
112 clear_page(kaddr);
113
114 if (pages_do_alias((unsigned long)kaddr, vaddr & PAGE_MASK))
115 __flush_purge_region(kaddr, PAGE_SIZE);
116
117 kunmap_atomic(kaddr, KM_USER0);
118}
119EXPORT_SYMBOL(clear_user_highpage);
120
121void __update_cache(struct vm_area_struct *vma,
122 unsigned long address, pte_t pte)
123{
124 struct page *page;
125 unsigned long pfn = pte_pfn(pte);
126
127 if (!boot_cpu_data.dcache.n_aliases)
128 return;
129
130 page = pfn_to_page(pfn);
131 if (pfn_valid(pfn) && page_mapping(page)) {
132 int dirty = test_and_clear_bit(PG_dcache_dirty, &page->flags);
133 if (dirty) {
134 unsigned long addr = (unsigned long)page_address(page);
135
136 if (pages_do_alias(addr, address & PAGE_MASK))
137 __flush_purge_region((void *)addr, PAGE_SIZE);
138 }
139 }
140}
141
142void __flush_anon_page(struct page *page, unsigned long vmaddr)
143{
144 unsigned long addr = (unsigned long) page_address(page);
145
146 if (pages_do_alias(addr, vmaddr)) {
147 if (boot_cpu_data.dcache.n_aliases && page_mapped(page) &&
148 !test_bit(PG_dcache_dirty, &page->flags)) {
149 void *kaddr;
150
151 kaddr = kmap_coherent(page, vmaddr);
152 /* XXX.. For now kunmap_coherent() does a purge */
153 /* __flush_purge_region((void *)kaddr, PAGE_SIZE); */
154 kunmap_coherent(kaddr);
155 } else
156 __flush_purge_region((void *)addr, PAGE_SIZE);
157 }
158}
159
160void flush_cache_all(void)
161{
162 cacheop_on_each_cpu(local_flush_cache_all, NULL, 1);
163}
164
165void flush_cache_mm(struct mm_struct *mm)
166{
167 cacheop_on_each_cpu(local_flush_cache_mm, mm, 1);
168}
169
170void flush_cache_dup_mm(struct mm_struct *mm)
171{
172 cacheop_on_each_cpu(local_flush_cache_dup_mm, mm, 1);
173}
174
175void flush_cache_page(struct vm_area_struct *vma, unsigned long addr,
176 unsigned long pfn)
177{
178 struct flusher_data data;
179
180 data.vma = vma;
181 data.addr1 = addr;
182 data.addr2 = pfn;
183
184 cacheop_on_each_cpu(local_flush_cache_page, (void *)&data, 1);
185}
186
187void flush_cache_range(struct vm_area_struct *vma, unsigned long start,
188 unsigned long end)
189{
190 struct flusher_data data;
191
192 data.vma = vma;
193 data.addr1 = start;
194 data.addr2 = end;
195
196 cacheop_on_each_cpu(local_flush_cache_range, (void *)&data, 1);
197}
198
199void flush_dcache_page(struct page *page)
200{
201 cacheop_on_each_cpu(local_flush_dcache_page, page, 1);
202}
203
204void flush_icache_range(unsigned long start, unsigned long end)
205{
206 struct flusher_data data;
207
208 data.vma = NULL;
209 data.addr1 = start;
210 data.addr2 = end;
211
212 cacheop_on_each_cpu(local_flush_icache_range, (void *)&data, 1);
213}
214
215void flush_icache_page(struct vm_area_struct *vma, struct page *page)
216{
217 /* Nothing uses the VMA, so just pass the struct page along */
218 cacheop_on_each_cpu(local_flush_icache_page, page, 1);
219}
220
221void flush_cache_sigtramp(unsigned long address)
222{
223 cacheop_on_each_cpu(local_flush_cache_sigtramp, (void *)address, 1);
224}
225
226static void compute_alias(struct cache_info *c)
227{
228 c->alias_mask = ((c->sets - 1) << c->entry_shift) & ~(PAGE_SIZE - 1);
229 c->n_aliases = c->alias_mask ? (c->alias_mask >> PAGE_SHIFT) + 1 : 0;
230}
231
232static void __init emit_cache_params(void)
233{
234 printk(KERN_NOTICE "I-cache : n_ways=%d n_sets=%d way_incr=%d\n",
235 boot_cpu_data.icache.ways,
236 boot_cpu_data.icache.sets,
237 boot_cpu_data.icache.way_incr);
238 printk(KERN_NOTICE "I-cache : entry_mask=0x%08x alias_mask=0x%08x n_aliases=%d\n",
239 boot_cpu_data.icache.entry_mask,
240 boot_cpu_data.icache.alias_mask,
241 boot_cpu_data.icache.n_aliases);
242 printk(KERN_NOTICE "D-cache : n_ways=%d n_sets=%d way_incr=%d\n",
243 boot_cpu_data.dcache.ways,
244 boot_cpu_data.dcache.sets,
245 boot_cpu_data.dcache.way_incr);
246 printk(KERN_NOTICE "D-cache : entry_mask=0x%08x alias_mask=0x%08x n_aliases=%d\n",
247 boot_cpu_data.dcache.entry_mask,
248 boot_cpu_data.dcache.alias_mask,
249 boot_cpu_data.dcache.n_aliases);
250
251 /*
252 * Emit Secondary Cache parameters if the CPU has a probed L2.
253 */
254 if (boot_cpu_data.flags & CPU_HAS_L2_CACHE) {
255 printk(KERN_NOTICE "S-cache : n_ways=%d n_sets=%d way_incr=%d\n",
256 boot_cpu_data.scache.ways,
257 boot_cpu_data.scache.sets,
258 boot_cpu_data.scache.way_incr);
259 printk(KERN_NOTICE "S-cache : entry_mask=0x%08x alias_mask=0x%08x n_aliases=%d\n",
260 boot_cpu_data.scache.entry_mask,
261 boot_cpu_data.scache.alias_mask,
262 boot_cpu_data.scache.n_aliases);
263 }
264}
265
266void __init cpu_cache_init(void)
267{
268 compute_alias(&boot_cpu_data.icache);
269 compute_alias(&boot_cpu_data.dcache);
270 compute_alias(&boot_cpu_data.scache);
271
272 __flush_wback_region = noop__flush_region;
273 __flush_purge_region = noop__flush_region;
274 __flush_invalidate_region = noop__flush_region;
275
276 if (boot_cpu_data.family == CPU_FAMILY_SH2) {
277 extern void __weak sh2_cache_init(void);
278
279 sh2_cache_init();
280 }
281
282 if (boot_cpu_data.family == CPU_FAMILY_SH2A) {
283 extern void __weak sh2a_cache_init(void);
284
285 sh2a_cache_init();
286 }
287
288 if (boot_cpu_data.family == CPU_FAMILY_SH3) {
289 extern void __weak sh3_cache_init(void);
290
291 sh3_cache_init();
292
293 if ((boot_cpu_data.type == CPU_SH7705) &&
294 (boot_cpu_data.dcache.sets == 512)) {
295 extern void __weak sh7705_cache_init(void);
296
297 sh7705_cache_init();
298 }
299 }
300
301 if ((boot_cpu_data.family == CPU_FAMILY_SH4) ||
302 (boot_cpu_data.family == CPU_FAMILY_SH4A) ||
303 (boot_cpu_data.family == CPU_FAMILY_SH4AL_DSP)) {
304 extern void __weak sh4_cache_init(void);
305
306 sh4_cache_init();
307 }
308
309 if (boot_cpu_data.family == CPU_FAMILY_SH5) {
310 extern void __weak sh5_cache_init(void);
311
312 sh5_cache_init();
313 }
314
315 emit_cache_params();
316}
diff --git a/arch/sh/mm/fault_32.c b/arch/sh/mm/fault_32.c
index 71925946f1e1..47530104e0ad 100644
--- a/arch/sh/mm/fault_32.c
+++ b/arch/sh/mm/fault_32.c
@@ -2,7 +2,7 @@
2 * Page fault handler for SH with an MMU. 2 * Page fault handler for SH with an MMU.
3 * 3 *
4 * Copyright (C) 1999 Niibe Yutaka 4 * Copyright (C) 1999 Niibe Yutaka
5 * Copyright (C) 2003 - 2008 Paul Mundt 5 * Copyright (C) 2003 - 2009 Paul Mundt
6 * 6 *
7 * Based on linux/arch/i386/mm/fault.c: 7 * Based on linux/arch/i386/mm/fault.c:
8 * Copyright (C) 1995 Linus Torvalds 8 * Copyright (C) 1995 Linus Torvalds
@@ -15,7 +15,7 @@
15#include <linux/mm.h> 15#include <linux/mm.h>
16#include <linux/hardirq.h> 16#include <linux/hardirq.h>
17#include <linux/kprobes.h> 17#include <linux/kprobes.h>
18#include <linux/perf_counter.h> 18#include <linux/perf_event.h>
19#include <asm/io_trapped.h> 19#include <asm/io_trapped.h>
20#include <asm/system.h> 20#include <asm/system.h>
21#include <asm/mmu_context.h> 21#include <asm/mmu_context.h>
@@ -25,18 +25,91 @@ static inline int notify_page_fault(struct pt_regs *regs, int trap)
25{ 25{
26 int ret = 0; 26 int ret = 0;
27 27
28#ifdef CONFIG_KPROBES 28 if (kprobes_built_in() && !user_mode(regs)) {
29 if (!user_mode(regs)) {
30 preempt_disable(); 29 preempt_disable();
31 if (kprobe_running() && kprobe_fault_handler(regs, trap)) 30 if (kprobe_running() && kprobe_fault_handler(regs, trap))
32 ret = 1; 31 ret = 1;
33 preempt_enable(); 32 preempt_enable();
34 } 33 }
35#endif
36 34
37 return ret; 35 return ret;
38} 36}
39 37
38static inline pmd_t *vmalloc_sync_one(pgd_t *pgd, unsigned long address)
39{
40 unsigned index = pgd_index(address);
41 pgd_t *pgd_k;
42 pud_t *pud, *pud_k;
43 pmd_t *pmd, *pmd_k;
44
45 pgd += index;
46 pgd_k = init_mm.pgd + index;
47
48 if (!pgd_present(*pgd_k))
49 return NULL;
50
51 pud = pud_offset(pgd, address);
52 pud_k = pud_offset(pgd_k, address);
53 if (!pud_present(*pud_k))
54 return NULL;
55
56 pmd = pmd_offset(pud, address);
57 pmd_k = pmd_offset(pud_k, address);
58 if (!pmd_present(*pmd_k))
59 return NULL;
60
61 if (!pmd_present(*pmd))
62 set_pmd(pmd, *pmd_k);
63 else {
64 /*
65 * The page tables are fully synchronised so there must
66 * be another reason for the fault. Return NULL here to
67 * signal that we have not taken care of the fault.
68 */
69 BUG_ON(pmd_page(*pmd) != pmd_page(*pmd_k));
70 return NULL;
71 }
72
73 return pmd_k;
74}
75
76/*
77 * Handle a fault on the vmalloc or module mapping area
78 */
79static noinline int vmalloc_fault(unsigned long address)
80{
81 pgd_t *pgd_k;
82 pmd_t *pmd_k;
83 pte_t *pte_k;
84
85 /* Make sure we are in vmalloc/module/P3 area: */
86 if (!(address >= VMALLOC_START && address < P3_ADDR_MAX))
87 return -1;
88
89 /*
90 * Synchronize this task's top level page-table
91 * with the 'reference' page table.
92 *
93 * Do _not_ use "current" here. We might be inside
94 * an interrupt in the middle of a task switch..
95 */
96 pgd_k = get_TTB();
97 pmd_k = vmalloc_sync_one(pgd_k, address);
98 if (!pmd_k)
99 return -1;
100
101 pte_k = pte_offset_kernel(pmd_k, address);
102 if (!pte_present(*pte_k))
103 return -1;
104
105 return 0;
106}
107
108static int fault_in_kernel_space(unsigned long address)
109{
110 return address >= TASK_SIZE;
111}
112
40/* 113/*
41 * This routine handles page faults. It determines the address, 114 * This routine handles page faults. It determines the address,
42 * and the problem, and then passes it off to one of the appropriate 115 * and the problem, and then passes it off to one of the appropriate
@@ -46,6 +119,7 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
46 unsigned long writeaccess, 119 unsigned long writeaccess,
47 unsigned long address) 120 unsigned long address)
48{ 121{
122 unsigned long vec;
49 struct task_struct *tsk; 123 struct task_struct *tsk;
50 struct mm_struct *mm; 124 struct mm_struct *mm;
51 struct vm_area_struct * vma; 125 struct vm_area_struct * vma;
@@ -53,70 +127,41 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
53 int fault; 127 int fault;
54 siginfo_t info; 128 siginfo_t info;
55 129
56 /*
57 * We don't bother with any notifier callbacks here, as they are
58 * all handled through the __do_page_fault() fast-path.
59 */
60
61 tsk = current; 130 tsk = current;
131 mm = tsk->mm;
62 si_code = SEGV_MAPERR; 132 si_code = SEGV_MAPERR;
133 vec = lookup_exception_vector();
63 134
64 if (unlikely(address >= TASK_SIZE)) { 135 /*
65 /* 136 * We fault-in kernel-space virtual memory on-demand. The
66 * Synchronize this task's top level page-table 137 * 'reference' page table is init_mm.pgd.
67 * with the 'reference' page table. 138 *
68 * 139 * NOTE! We MUST NOT take any locks for this case. We may
69 * Do _not_ use "tsk" here. We might be inside 140 * be in an interrupt or a critical region, and should
70 * an interrupt in the middle of a task switch.. 141 * only copy the information from the master page table,
71 */ 142 * nothing more.
72 int offset = pgd_index(address); 143 */
73 pgd_t *pgd, *pgd_k; 144 if (unlikely(fault_in_kernel_space(address))) {
74 pud_t *pud, *pud_k; 145 if (vmalloc_fault(address) >= 0)
75 pmd_t *pmd, *pmd_k;
76
77 pgd = get_TTB() + offset;
78 pgd_k = swapper_pg_dir + offset;
79
80 if (!pgd_present(*pgd)) {
81 if (!pgd_present(*pgd_k))
82 goto bad_area_nosemaphore;
83 set_pgd(pgd, *pgd_k);
84 return; 146 return;
85 } 147 if (notify_page_fault(regs, vec))
86
87 pud = pud_offset(pgd, address);
88 pud_k = pud_offset(pgd_k, address);
89
90 if (!pud_present(*pud)) {
91 if (!pud_present(*pud_k))
92 goto bad_area_nosemaphore;
93 set_pud(pud, *pud_k);
94 return; 148 return;
95 }
96 149
97 pmd = pmd_offset(pud, address); 150 goto bad_area_nosemaphore;
98 pmd_k = pmd_offset(pud_k, address);
99 if (pmd_present(*pmd) || !pmd_present(*pmd_k))
100 goto bad_area_nosemaphore;
101 set_pmd(pmd, *pmd_k);
102
103 return;
104 } 151 }
105 152
106 mm = tsk->mm; 153 if (unlikely(notify_page_fault(regs, vec)))
107
108 if (unlikely(notify_page_fault(regs, lookup_exception_vector())))
109 return; 154 return;
110 155
111 /* Only enable interrupts if they were on before the fault */ 156 /* Only enable interrupts if they were on before the fault */
112 if ((regs->sr & SR_IMASK) != SR_IMASK) 157 if ((regs->sr & SR_IMASK) != SR_IMASK)
113 local_irq_enable(); 158 local_irq_enable();
114 159
115 perf_swcounter_event(PERF_COUNT_SW_PAGE_FAULTS, 1, 0, regs, address); 160 perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, 0, regs, address);
116 161
117 /* 162 /*
118 * If we're in an interrupt or have no user 163 * If we're in an interrupt, have no user context or are running
119 * context, we must not take the fault.. 164 * in an atomic region then we must not take the fault:
120 */ 165 */
121 if (in_atomic() || !mm) 166 if (in_atomic() || !mm)
122 goto no_context; 167 goto no_context;
@@ -132,10 +177,11 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
132 goto bad_area; 177 goto bad_area;
133 if (expand_stack(vma, address)) 178 if (expand_stack(vma, address))
134 goto bad_area; 179 goto bad_area;
135/* 180
136 * Ok, we have a good vm_area for this memory access, so 181 /*
137 * we can handle it.. 182 * Ok, we have a good vm_area for this memory access, so
138 */ 183 * we can handle it..
184 */
139good_area: 185good_area:
140 si_code = SEGV_ACCERR; 186 si_code = SEGV_ACCERR;
141 if (writeaccess) { 187 if (writeaccess) {
@@ -162,21 +208,21 @@ survive:
162 } 208 }
163 if (fault & VM_FAULT_MAJOR) { 209 if (fault & VM_FAULT_MAJOR) {
164 tsk->maj_flt++; 210 tsk->maj_flt++;
165 perf_swcounter_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, 0, 211 perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, 0,
166 regs, address); 212 regs, address);
167 } else { 213 } else {
168 tsk->min_flt++; 214 tsk->min_flt++;
169 perf_swcounter_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, 0, 215 perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, 0,
170 regs, address); 216 regs, address);
171 } 217 }
172 218
173 up_read(&mm->mmap_sem); 219 up_read(&mm->mmap_sem);
174 return; 220 return;
175 221
176/* 222 /*
177 * Something tried to access memory that isn't in our memory map.. 223 * Something tried to access memory that isn't in our memory map..
178 * Fix it, but check if it's kernel or user first.. 224 * Fix it, but check if it's kernel or user first..
179 */ 225 */
180bad_area: 226bad_area:
181 up_read(&mm->mmap_sem); 227 up_read(&mm->mmap_sem);
182 228
@@ -272,16 +318,15 @@ do_sigbus:
272/* 318/*
273 * Called with interrupts disabled. 319 * Called with interrupts disabled.
274 */ 320 */
275asmlinkage int __kprobes __do_page_fault(struct pt_regs *regs, 321asmlinkage int __kprobes
276 unsigned long writeaccess, 322handle_tlbmiss(struct pt_regs *regs, unsigned long writeaccess,
277 unsigned long address) 323 unsigned long address)
278{ 324{
279 pgd_t *pgd; 325 pgd_t *pgd;
280 pud_t *pud; 326 pud_t *pud;
281 pmd_t *pmd; 327 pmd_t *pmd;
282 pte_t *pte; 328 pte_t *pte;
283 pte_t entry; 329 pte_t entry;
284 int ret = 1;
285 330
286 /* 331 /*
287 * We don't take page faults for P1, P2, and parts of P4, these 332 * We don't take page faults for P1, P2, and parts of P4, these
@@ -292,40 +337,41 @@ asmlinkage int __kprobes __do_page_fault(struct pt_regs *regs,
292 pgd = pgd_offset_k(address); 337 pgd = pgd_offset_k(address);
293 } else { 338 } else {
294 if (unlikely(address >= TASK_SIZE || !current->mm)) 339 if (unlikely(address >= TASK_SIZE || !current->mm))
295 goto out; 340 return 1;
296 341
297 pgd = pgd_offset(current->mm, address); 342 pgd = pgd_offset(current->mm, address);
298 } 343 }
299 344
300 pud = pud_offset(pgd, address); 345 pud = pud_offset(pgd, address);
301 if (pud_none_or_clear_bad(pud)) 346 if (pud_none_or_clear_bad(pud))
302 goto out; 347 return 1;
303 pmd = pmd_offset(pud, address); 348 pmd = pmd_offset(pud, address);
304 if (pmd_none_or_clear_bad(pmd)) 349 if (pmd_none_or_clear_bad(pmd))
305 goto out; 350 return 1;
306 pte = pte_offset_kernel(pmd, address); 351 pte = pte_offset_kernel(pmd, address);
307 entry = *pte; 352 entry = *pte;
308 if (unlikely(pte_none(entry) || pte_not_present(entry))) 353 if (unlikely(pte_none(entry) || pte_not_present(entry)))
309 goto out; 354 return 1;
310 if (unlikely(writeaccess && !pte_write(entry))) 355 if (unlikely(writeaccess && !pte_write(entry)))
311 goto out; 356 return 1;
312 357
313 if (writeaccess) 358 if (writeaccess)
314 entry = pte_mkdirty(entry); 359 entry = pte_mkdirty(entry);
315 entry = pte_mkyoung(entry); 360 entry = pte_mkyoung(entry);
316 361
362 set_pte(pte, entry);
363
317#if defined(CONFIG_CPU_SH4) && !defined(CONFIG_SMP) 364#if defined(CONFIG_CPU_SH4) && !defined(CONFIG_SMP)
318 /* 365 /*
319 * ITLB is not affected by "ldtlb" instruction. 366 * SH-4 does not set MMUCR.RC to the corresponding TLB entry in
320 * So, we need to flush the entry by ourselves. 367 * the case of an initial page write exception, so we need to
368 * flush it in order to avoid potential TLB entry duplication.
321 */ 369 */
322 local_flush_tlb_one(get_asid(), address & PAGE_MASK); 370 if (writeaccess == 2)
371 local_flush_tlb_one(get_asid(), address & PAGE_MASK);
323#endif 372#endif
324 373
325 set_pte(pte, entry);
326 update_mmu_cache(NULL, address, entry); 374 update_mmu_cache(NULL, address, entry);
327 375
328 ret = 0; 376 return 0;
329out:
330 return ret;
331} 377}
diff --git a/arch/sh/mm/fault_64.c b/arch/sh/mm/fault_64.c
index bd63b961b2a9..2b356cec2489 100644
--- a/arch/sh/mm/fault_64.c
+++ b/arch/sh/mm/fault_64.c
@@ -56,16 +56,7 @@ inline void __do_tlb_refill(unsigned long address,
56 /* 56 /*
57 * Set PTEH register 57 * Set PTEH register
58 */ 58 */
59 pteh = address & MMU_VPN_MASK; 59 pteh = neff_sign_extend(address & MMU_VPN_MASK);
60
61 /* Sign extend based on neff. */
62#if (NEFF == 32)
63 /* Faster sign extension */
64 pteh = (unsigned long long)(signed long long)(signed long)pteh;
65#else
66 /* General case */
67 pteh = (pteh & NEFF_SIGN) ? (pteh | NEFF_MASK) : pteh;
68#endif
69 60
70 /* Set the ASID. */ 61 /* Set the ASID. */
71 pteh |= get_asid() << PTEH_ASID_SHIFT; 62 pteh |= get_asid() << PTEH_ASID_SHIFT;
diff --git a/arch/sh/mm/flush-sh4.c b/arch/sh/mm/flush-sh4.c
new file mode 100644
index 000000000000..cef402678f42
--- /dev/null
+++ b/arch/sh/mm/flush-sh4.c
@@ -0,0 +1,108 @@
1#include <linux/mm.h>
2#include <asm/mmu_context.h>
3#include <asm/cacheflush.h>
4
5/*
6 * Write back the dirty D-caches, but not invalidate them.
7 *
8 * START: Virtual Address (U0, P1, or P3)
9 * SIZE: Size of the region.
10 */
11static void sh4__flush_wback_region(void *start, int size)
12{
13 reg_size_t aligned_start, v, cnt, end;
14
15 aligned_start = register_align(start);
16 v = aligned_start & ~(L1_CACHE_BYTES-1);
17 end = (aligned_start + size + L1_CACHE_BYTES-1)
18 & ~(L1_CACHE_BYTES-1);
19 cnt = (end - v) / L1_CACHE_BYTES;
20
21 while (cnt >= 8) {
22 __ocbwb(v); v += L1_CACHE_BYTES;
23 __ocbwb(v); v += L1_CACHE_BYTES;
24 __ocbwb(v); v += L1_CACHE_BYTES;
25 __ocbwb(v); v += L1_CACHE_BYTES;
26 __ocbwb(v); v += L1_CACHE_BYTES;
27 __ocbwb(v); v += L1_CACHE_BYTES;
28 __ocbwb(v); v += L1_CACHE_BYTES;
29 __ocbwb(v); v += L1_CACHE_BYTES;
30 cnt -= 8;
31 }
32
33 while (cnt) {
34 __ocbwb(v); v += L1_CACHE_BYTES;
35 cnt--;
36 }
37}
38
39/*
40 * Write back the dirty D-caches and invalidate them.
41 *
42 * START: Virtual Address (U0, P1, or P3)
43 * SIZE: Size of the region.
44 */
45static void sh4__flush_purge_region(void *start, int size)
46{
47 reg_size_t aligned_start, v, cnt, end;
48
49 aligned_start = register_align(start);
50 v = aligned_start & ~(L1_CACHE_BYTES-1);
51 end = (aligned_start + size + L1_CACHE_BYTES-1)
52 & ~(L1_CACHE_BYTES-1);
53 cnt = (end - v) / L1_CACHE_BYTES;
54
55 while (cnt >= 8) {
56 __ocbp(v); v += L1_CACHE_BYTES;
57 __ocbp(v); v += L1_CACHE_BYTES;
58 __ocbp(v); v += L1_CACHE_BYTES;
59 __ocbp(v); v += L1_CACHE_BYTES;
60 __ocbp(v); v += L1_CACHE_BYTES;
61 __ocbp(v); v += L1_CACHE_BYTES;
62 __ocbp(v); v += L1_CACHE_BYTES;
63 __ocbp(v); v += L1_CACHE_BYTES;
64 cnt -= 8;
65 }
66 while (cnt) {
67 __ocbp(v); v += L1_CACHE_BYTES;
68 cnt--;
69 }
70}
71
72/*
73 * No write back please
74 */
75static void sh4__flush_invalidate_region(void *start, int size)
76{
77 reg_size_t aligned_start, v, cnt, end;
78
79 aligned_start = register_align(start);
80 v = aligned_start & ~(L1_CACHE_BYTES-1);
81 end = (aligned_start + size + L1_CACHE_BYTES-1)
82 & ~(L1_CACHE_BYTES-1);
83 cnt = (end - v) / L1_CACHE_BYTES;
84
85 while (cnt >= 8) {
86 __ocbi(v); v += L1_CACHE_BYTES;
87 __ocbi(v); v += L1_CACHE_BYTES;
88 __ocbi(v); v += L1_CACHE_BYTES;
89 __ocbi(v); v += L1_CACHE_BYTES;
90 __ocbi(v); v += L1_CACHE_BYTES;
91 __ocbi(v); v += L1_CACHE_BYTES;
92 __ocbi(v); v += L1_CACHE_BYTES;
93 __ocbi(v); v += L1_CACHE_BYTES;
94 cnt -= 8;
95 }
96
97 while (cnt) {
98 __ocbi(v); v += L1_CACHE_BYTES;
99 cnt--;
100 }
101}
102
103void __init sh4__flush_region_init(void)
104{
105 __flush_wback_region = sh4__flush_wback_region;
106 __flush_invalidate_region = sh4__flush_invalidate_region;
107 __flush_purge_region = sh4__flush_purge_region;
108}
diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c
index fe532aeaa16d..8173e38afd38 100644
--- a/arch/sh/mm/init.c
+++ b/arch/sh/mm/init.c
@@ -106,27 +106,31 @@ void __init page_table_range_init(unsigned long start, unsigned long end,
106 pgd_t *pgd; 106 pgd_t *pgd;
107 pud_t *pud; 107 pud_t *pud;
108 pmd_t *pmd; 108 pmd_t *pmd;
109 int pgd_idx; 109 pte_t *pte;
110 int i, j, k;
110 unsigned long vaddr; 111 unsigned long vaddr;
111 112
112 vaddr = start & PMD_MASK; 113 vaddr = start;
113 end = (end + PMD_SIZE - 1) & PMD_MASK; 114 i = __pgd_offset(vaddr);
114 pgd_idx = pgd_index(vaddr); 115 j = __pud_offset(vaddr);
115 pgd = pgd_base + pgd_idx; 116 k = __pmd_offset(vaddr);
116 117 pgd = pgd_base + i;
117 for ( ; (pgd_idx < PTRS_PER_PGD) && (vaddr != end); pgd++, pgd_idx++) { 118
118 BUG_ON(pgd_none(*pgd)); 119 for ( ; (i < PTRS_PER_PGD) && (vaddr != end); pgd++, i++) {
119 pud = pud_offset(pgd, 0); 120 pud = (pud_t *)pgd;
120 BUG_ON(pud_none(*pud)); 121 for ( ; (j < PTRS_PER_PUD) && (vaddr != end); pud++, j++) {
121 pmd = pmd_offset(pud, 0); 122 pmd = (pmd_t *)pud;
122 123 for (; (k < PTRS_PER_PMD) && (vaddr != end); pmd++, k++) {
123 if (!pmd_present(*pmd)) { 124 if (pmd_none(*pmd)) {
124 pte_t *pte_table; 125 pte = (pte_t *) alloc_bootmem_low_pages(PAGE_SIZE);
125 pte_table = (pte_t *)alloc_bootmem_low_pages(PAGE_SIZE); 126 pmd_populate_kernel(&init_mm, pmd, pte);
126 pmd_populate_kernel(&init_mm, pmd, pte_table); 127 BUG_ON(pte != pte_offset_kernel(pmd, 0));
128 }
129 vaddr += PMD_SIZE;
130 }
131 k = 0;
127 } 132 }
128 133 j = 0;
129 vaddr += PMD_SIZE;
130 } 134 }
131} 135}
132#endif /* CONFIG_MMU */ 136#endif /* CONFIG_MMU */
@@ -137,7 +141,7 @@ void __init page_table_range_init(unsigned long start, unsigned long end,
137void __init paging_init(void) 141void __init paging_init(void)
138{ 142{
139 unsigned long max_zone_pfns[MAX_NR_ZONES]; 143 unsigned long max_zone_pfns[MAX_NR_ZONES];
140 unsigned long vaddr; 144 unsigned long vaddr, end;
141 int nid; 145 int nid;
142 146
143 /* We don't need to map the kernel through the TLB, as 147 /* We don't need to map the kernel through the TLB, as
@@ -155,7 +159,8 @@ void __init paging_init(void)
155 * pte's will be filled in by __set_fixmap(). 159 * pte's will be filled in by __set_fixmap().
156 */ 160 */
157 vaddr = __fix_to_virt(__end_of_fixed_addresses - 1) & PMD_MASK; 161 vaddr = __fix_to_virt(__end_of_fixed_addresses - 1) & PMD_MASK;
158 page_table_range_init(vaddr, 0, swapper_pg_dir); 162 end = (FIXADDR_TOP + PMD_SIZE - 1) & PMD_MASK;
163 page_table_range_init(vaddr, end, swapper_pg_dir);
159 164
160 kmap_coherent_init(); 165 kmap_coherent_init();
161 166
@@ -181,8 +186,6 @@ void __init paging_init(void)
181 set_fixmap_nocache(FIX_UNCACHED, __pa(&__uncached_start)); 186 set_fixmap_nocache(FIX_UNCACHED, __pa(&__uncached_start));
182} 187}
183 188
184static struct kcore_list kcore_mem, kcore_vmalloc;
185
186void __init mem_init(void) 189void __init mem_init(void)
187{ 190{
188 int codesize, datasize, initsize; 191 int codesize, datasize, initsize;
@@ -210,6 +213,9 @@ void __init mem_init(void)
210 high_memory = node_high_memory; 213 high_memory = node_high_memory;
211 } 214 }
212 215
216 /* Set this up early, so we can take care of the zero page */
217 cpu_cache_init();
218
213 /* clear the zero-page */ 219 /* clear the zero-page */
214 memset(empty_zero_page, 0, PAGE_SIZE); 220 memset(empty_zero_page, 0, PAGE_SIZE);
215 __flush_wback_region(empty_zero_page, PAGE_SIZE); 221 __flush_wback_region(empty_zero_page, PAGE_SIZE);
@@ -218,20 +224,14 @@ void __init mem_init(void)
218 datasize = (unsigned long) &_edata - (unsigned long) &_etext; 224 datasize = (unsigned long) &_edata - (unsigned long) &_etext;
219 initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin; 225 initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin;
220 226
221 kclist_add(&kcore_mem, __va(0), max_low_pfn << PAGE_SHIFT);
222 kclist_add(&kcore_vmalloc, (void *)VMALLOC_START,
223 VMALLOC_END - VMALLOC_START);
224
225 printk(KERN_INFO "Memory: %luk/%luk available (%dk kernel code, " 227 printk(KERN_INFO "Memory: %luk/%luk available (%dk kernel code, "
226 "%dk data, %dk init)\n", 228 "%dk data, %dk init)\n",
227 (unsigned long) nr_free_pages() << (PAGE_SHIFT-10), 229 nr_free_pages() << (PAGE_SHIFT-10),
228 num_physpages << (PAGE_SHIFT-10), 230 num_physpages << (PAGE_SHIFT-10),
229 codesize >> 10, 231 codesize >> 10,
230 datasize >> 10, 232 datasize >> 10,
231 initsize >> 10); 233 initsize >> 10);
232 234
233 p3_cache_init();
234
235 /* Initialize the vDSO */ 235 /* Initialize the vDSO */
236 vsyscall_init(); 236 vsyscall_init();
237} 237}
diff --git a/arch/sh/mm/ioremap_32.c b/arch/sh/mm/ioremap_32.c
index da2f4186f2cd..c3250614e3ae 100644
--- a/arch/sh/mm/ioremap_32.c
+++ b/arch/sh/mm/ioremap_32.c
@@ -57,14 +57,6 @@ void __iomem *__ioremap(unsigned long phys_addr, unsigned long size,
57 if (is_pci_memory_fixed_range(phys_addr, size)) 57 if (is_pci_memory_fixed_range(phys_addr, size))
58 return (void __iomem *)phys_addr; 58 return (void __iomem *)phys_addr;
59 59
60#if !defined(CONFIG_PMB_FIXED)
61 /*
62 * Don't allow anybody to remap normal RAM that we're using..
63 */
64 if (phys_addr < virt_to_phys(high_memory))
65 return NULL;
66#endif
67
68 /* 60 /*
69 * Mappings have to be page-aligned 61 * Mappings have to be page-aligned
70 */ 62 */
diff --git a/arch/sh/mm/ioremap_64.c b/arch/sh/mm/ioremap_64.c
index 828c8597219d..b16843d02b76 100644
--- a/arch/sh/mm/ioremap_64.c
+++ b/arch/sh/mm/ioremap_64.c
@@ -94,7 +94,6 @@ static struct resource *shmedia_find_resource(struct resource *root,
94static void __iomem *shmedia_alloc_io(unsigned long phys, unsigned long size, 94static void __iomem *shmedia_alloc_io(unsigned long phys, unsigned long size,
95 const char *name, unsigned long flags) 95 const char *name, unsigned long flags)
96{ 96{
97 static int printed_full;
98 struct xresource *xres; 97 struct xresource *xres;
99 struct resource *res; 98 struct resource *res;
100 char *tack; 99 char *tack;
@@ -108,11 +107,8 @@ static void __iomem *shmedia_alloc_io(unsigned long phys, unsigned long size,
108 tack = xres->xname; 107 tack = xres->xname;
109 res = &xres->xres; 108 res = &xres->xres;
110 } else { 109 } else {
111 if (!printed_full) { 110 printk_once(KERN_NOTICE "%s: done with statics, "
112 printk(KERN_NOTICE "%s: done with statics, "
113 "switching to kmalloc\n", __func__); 111 "switching to kmalloc\n", __func__);
114 printed_full = 1;
115 }
116 tlen = strlen(name); 112 tlen = strlen(name);
117 tack = kmalloc(sizeof(struct resource) + tlen + 1, GFP_KERNEL); 113 tack = kmalloc(sizeof(struct resource) + tlen + 1, GFP_KERNEL);
118 if (!tack) 114 if (!tack)
diff --git a/arch/sh/mm/kmap.c b/arch/sh/mm/kmap.c
new file mode 100644
index 000000000000..16e01b5fed04
--- /dev/null
+++ b/arch/sh/mm/kmap.c
@@ -0,0 +1,65 @@
1/*
2 * arch/sh/mm/kmap.c
3 *
4 * Copyright (C) 1999, 2000, 2002 Niibe Yutaka
5 * Copyright (C) 2002 - 2009 Paul Mundt
6 *
7 * Released under the terms of the GNU GPL v2.0.
8 */
9#include <linux/mm.h>
10#include <linux/init.h>
11#include <linux/mutex.h>
12#include <linux/fs.h>
13#include <linux/highmem.h>
14#include <linux/module.h>
15#include <asm/mmu_context.h>
16#include <asm/cacheflush.h>
17
18#define kmap_get_fixmap_pte(vaddr) \
19 pte_offset_kernel(pmd_offset(pud_offset(pgd_offset_k(vaddr), (vaddr)), (vaddr)), (vaddr))
20
21static pte_t *kmap_coherent_pte;
22
23void __init kmap_coherent_init(void)
24{
25 unsigned long vaddr;
26
27 /* cache the first coherent kmap pte */
28 vaddr = __fix_to_virt(FIX_CMAP_BEGIN);
29 kmap_coherent_pte = kmap_get_fixmap_pte(vaddr);
30}
31
32void *kmap_coherent(struct page *page, unsigned long addr)
33{
34 enum fixed_addresses idx;
35 unsigned long vaddr;
36
37 BUG_ON(test_bit(PG_dcache_dirty, &page->flags));
38
39 pagefault_disable();
40
41 idx = FIX_CMAP_END -
42 ((addr & current_cpu_data.dcache.alias_mask) >> PAGE_SHIFT);
43 vaddr = __fix_to_virt(idx);
44
45 BUG_ON(!pte_none(*(kmap_coherent_pte - idx)));
46 set_pte(kmap_coherent_pte - idx, mk_pte(page, PAGE_KERNEL));
47
48 return (void *)vaddr;
49}
50
51void kunmap_coherent(void *kvaddr)
52{
53 if (kvaddr >= (void *)FIXADDR_START) {
54 unsigned long vaddr = (unsigned long)kvaddr & PAGE_MASK;
55 enum fixed_addresses idx = __virt_to_fix(vaddr);
56
57 /* XXX.. Kill this later, here for sanity at the moment.. */
58 __flush_purge_region((void *)vaddr, PAGE_SIZE);
59
60 pte_clear(&init_mm, vaddr, kmap_coherent_pte - idx);
61 local_flush_tlb_one(get_asid(), vaddr);
62 }
63
64 pagefault_enable();
65}
diff --git a/arch/sh/mm/mmap.c b/arch/sh/mm/mmap.c
index 1b5fdfb4e0c2..d2984fa42d3d 100644
--- a/arch/sh/mm/mmap.c
+++ b/arch/sh/mm/mmap.c
@@ -14,10 +14,10 @@
14#include <asm/page.h> 14#include <asm/page.h>
15#include <asm/processor.h> 15#include <asm/processor.h>
16 16
17#ifdef CONFIG_MMU
18unsigned long shm_align_mask = PAGE_SIZE - 1; /* Sane caches */ 17unsigned long shm_align_mask = PAGE_SIZE - 1; /* Sane caches */
19EXPORT_SYMBOL(shm_align_mask); 18EXPORT_SYMBOL(shm_align_mask);
20 19
20#ifdef CONFIG_MMU
21/* 21/*
22 * To avoid cache aliases, we map the shared page with same color. 22 * To avoid cache aliases, we map the shared page with same color.
23 */ 23 */
diff --git a/arch/sh/mm/tlb-nommu.c b/arch/sh/mm/nommu.c
index 71c742b5aee3..ac16c05917ef 100644
--- a/arch/sh/mm/tlb-nommu.c
+++ b/arch/sh/mm/nommu.c
@@ -1,20 +1,41 @@
1/* 1/*
2 * arch/sh/mm/tlb-nommu.c 2 * arch/sh/mm/nommu.c
3 * 3 *
4 * TLB Operations for MMUless SH. 4 * Various helper routines and stubs for MMUless SH.
5 * 5 *
6 * Copyright (C) 2002 Paul Mundt 6 * Copyright (C) 2002 - 2009 Paul Mundt
7 * 7 *
8 * Released under the terms of the GNU GPL v2.0. 8 * Released under the terms of the GNU GPL v2.0.
9 */ 9 */
10#include <linux/kernel.h> 10#include <linux/kernel.h>
11#include <linux/init.h>
12#include <linux/string.h>
11#include <linux/mm.h> 13#include <linux/mm.h>
12#include <asm/pgtable.h> 14#include <asm/pgtable.h>
13#include <asm/tlbflush.h> 15#include <asm/tlbflush.h>
16#include <asm/page.h>
17#include <asm/uaccess.h>
14 18
15/* 19/*
16 * Nothing too terribly exciting here .. 20 * Nothing too terribly exciting here ..
17 */ 21 */
22void copy_page(void *to, void *from)
23{
24 memcpy(to, from, PAGE_SIZE);
25}
26
27__kernel_size_t __copy_user(void *to, const void *from, __kernel_size_t n)
28{
29 memcpy(to, from, n);
30 return 0;
31}
32
33__kernel_size_t __clear_user(void *to, __kernel_size_t n)
34{
35 memset(to, 0, n);
36 return 0;
37}
38
18void local_flush_tlb_all(void) 39void local_flush_tlb_all(void)
19{ 40{
20 BUG(); 41 BUG();
@@ -46,8 +67,21 @@ void local_flush_tlb_kernel_range(unsigned long start, unsigned long end)
46 BUG(); 67 BUG();
47} 68}
48 69
49void update_mmu_cache(struct vm_area_struct * vma, 70void __update_tlb(struct vm_area_struct *vma, unsigned long address, pte_t pte)
50 unsigned long address, pte_t pte) 71{
72}
73
74void __init kmap_coherent_init(void)
75{
76}
77
78void *kmap_coherent(struct page *page, unsigned long addr)
79{
80 BUG();
81 return NULL;
82}
83
84void kunmap_coherent(void *kvaddr)
51{ 85{
52 BUG(); 86 BUG();
53} 87}
diff --git a/arch/sh/mm/numa.c b/arch/sh/mm/numa.c
index 095d93bec7cd..9b784fdb947c 100644
--- a/arch/sh/mm/numa.c
+++ b/arch/sh/mm/numa.c
@@ -9,6 +9,7 @@
9 */ 9 */
10#include <linux/module.h> 10#include <linux/module.h>
11#include <linux/bootmem.h> 11#include <linux/bootmem.h>
12#include <linux/lmb.h>
12#include <linux/mm.h> 13#include <linux/mm.h>
13#include <linux/numa.h> 14#include <linux/numa.h>
14#include <linux/pfn.h> 15#include <linux/pfn.h>
@@ -26,6 +27,15 @@ EXPORT_SYMBOL_GPL(node_data);
26void __init setup_memory(void) 27void __init setup_memory(void)
27{ 28{
28 unsigned long free_pfn = PFN_UP(__pa(_end)); 29 unsigned long free_pfn = PFN_UP(__pa(_end));
30 u64 base = min_low_pfn << PAGE_SHIFT;
31 u64 size = (max_low_pfn << PAGE_SHIFT) - min_low_pfn;
32
33 lmb_add(base, size);
34
35 /* Reserve the LMB regions used by the kernel, initrd, etc.. */
36 lmb_reserve(__MEMORY_START + CONFIG_ZERO_PAGE_OFFSET,
37 (PFN_PHYS(free_pfn) + PAGE_SIZE - 1) -
38 (__MEMORY_START + CONFIG_ZERO_PAGE_OFFSET));
29 39
30 /* 40 /*
31 * Node 0 sets up its pgdat at the first available pfn, 41 * Node 0 sets up its pgdat at the first available pfn,
@@ -45,24 +55,23 @@ void __init setup_memory(void)
45 55
46void __init setup_bootmem_node(int nid, unsigned long start, unsigned long end) 56void __init setup_bootmem_node(int nid, unsigned long start, unsigned long end)
47{ 57{
48 unsigned long bootmap_pages, bootmap_start, bootmap_size; 58 unsigned long bootmap_pages;
49 unsigned long start_pfn, free_pfn, end_pfn; 59 unsigned long start_pfn, end_pfn;
60 unsigned long bootmem_paddr;
50 61
51 /* Don't allow bogus node assignment */ 62 /* Don't allow bogus node assignment */
52 BUG_ON(nid > MAX_NUMNODES || nid == 0); 63 BUG_ON(nid > MAX_NUMNODES || nid == 0);
53 64
54 /* 65 start_pfn = start >> PAGE_SHIFT;
55 * The free pfn starts at the beginning of the range, and is
56 * advanced as necessary for pgdat and node map allocations.
57 */
58 free_pfn = start_pfn = start >> PAGE_SHIFT;
59 end_pfn = end >> PAGE_SHIFT; 66 end_pfn = end >> PAGE_SHIFT;
60 67
68 lmb_add(start, end - start);
69
61 __add_active_range(nid, start_pfn, end_pfn); 70 __add_active_range(nid, start_pfn, end_pfn);
62 71
63 /* Node-local pgdat */ 72 /* Node-local pgdat */
64 NODE_DATA(nid) = pfn_to_kaddr(free_pfn); 73 NODE_DATA(nid) = __va(lmb_alloc_base(sizeof(struct pglist_data),
65 free_pfn += PFN_UP(sizeof(struct pglist_data)); 74 SMP_CACHE_BYTES, end_pfn));
66 memset(NODE_DATA(nid), 0, sizeof(struct pglist_data)); 75 memset(NODE_DATA(nid), 0, sizeof(struct pglist_data));
67 76
68 NODE_DATA(nid)->bdata = &bootmem_node_data[nid]; 77 NODE_DATA(nid)->bdata = &bootmem_node_data[nid];
@@ -71,16 +80,17 @@ void __init setup_bootmem_node(int nid, unsigned long start, unsigned long end)
71 80
72 /* Node-local bootmap */ 81 /* Node-local bootmap */
73 bootmap_pages = bootmem_bootmap_pages(end_pfn - start_pfn); 82 bootmap_pages = bootmem_bootmap_pages(end_pfn - start_pfn);
74 bootmap_start = (unsigned long)pfn_to_kaddr(free_pfn); 83 bootmem_paddr = lmb_alloc_base(bootmap_pages << PAGE_SHIFT,
75 bootmap_size = init_bootmem_node(NODE_DATA(nid), free_pfn, start_pfn, 84 PAGE_SIZE, end_pfn);
76 end_pfn); 85 init_bootmem_node(NODE_DATA(nid), bootmem_paddr >> PAGE_SHIFT,
86 start_pfn, end_pfn);
77 87
78 free_bootmem_with_active_regions(nid, end_pfn); 88 free_bootmem_with_active_regions(nid, end_pfn);
79 89
80 /* Reserve the pgdat and bootmap space with the bootmem allocator */ 90 /* Reserve the pgdat and bootmap space with the bootmem allocator */
81 reserve_bootmem_node(NODE_DATA(nid), start_pfn << PAGE_SHIFT, 91 reserve_bootmem_node(NODE_DATA(nid), start_pfn << PAGE_SHIFT,
82 sizeof(struct pglist_data), BOOTMEM_DEFAULT); 92 sizeof(struct pglist_data), BOOTMEM_DEFAULT);
83 reserve_bootmem_node(NODE_DATA(nid), free_pfn << PAGE_SHIFT, 93 reserve_bootmem_node(NODE_DATA(nid), bootmem_paddr,
84 bootmap_pages << PAGE_SHIFT, BOOTMEM_DEFAULT); 94 bootmap_pages << PAGE_SHIFT, BOOTMEM_DEFAULT);
85 95
86 /* It's up */ 96 /* It's up */
diff --git a/arch/sh/mm/pg-nommu.c b/arch/sh/mm/pg-nommu.c
deleted file mode 100644
index 91ed4e695ff7..000000000000
--- a/arch/sh/mm/pg-nommu.c
+++ /dev/null
@@ -1,38 +0,0 @@
1/*
2 * arch/sh/mm/pg-nommu.c
3 *
4 * clear_page()/copy_page() implementation for MMUless SH.
5 *
6 * Copyright (C) 2003 Paul Mundt
7 *
8 * This file is subject to the terms and conditions of the GNU General Public
9 * License. See the file "COPYING" in the main directory of this archive
10 * for more details.
11 */
12#include <linux/init.h>
13#include <linux/kernel.h>
14#include <linux/string.h>
15#include <asm/page.h>
16#include <asm/uaccess.h>
17
18void copy_page(void *to, void *from)
19{
20 memcpy(to, from, PAGE_SIZE);
21}
22
23void clear_page(void *to)
24{
25 memset(to, 0, PAGE_SIZE);
26}
27
28__kernel_size_t __copy_user(void *to, const void *from, __kernel_size_t n)
29{
30 memcpy(to, from, n);
31 return 0;
32}
33
34__kernel_size_t __clear_user(void *to, __kernel_size_t n)
35{
36 memset(to, 0, n);
37 return 0;
38}
diff --git a/arch/sh/mm/pg-sh4.c b/arch/sh/mm/pg-sh4.c
deleted file mode 100644
index 2fe14da1f839..000000000000
--- a/arch/sh/mm/pg-sh4.c
+++ /dev/null
@@ -1,146 +0,0 @@
1/*
2 * arch/sh/mm/pg-sh4.c
3 *
4 * Copyright (C) 1999, 2000, 2002 Niibe Yutaka
5 * Copyright (C) 2002 - 2007 Paul Mundt
6 *
7 * Released under the terms of the GNU GPL v2.0.
8 */
9#include <linux/mm.h>
10#include <linux/init.h>
11#include <linux/mutex.h>
12#include <linux/fs.h>
13#include <linux/highmem.h>
14#include <linux/module.h>
15#include <asm/mmu_context.h>
16#include <asm/cacheflush.h>
17
18#define CACHE_ALIAS (current_cpu_data.dcache.alias_mask)
19
20#define kmap_get_fixmap_pte(vaddr) \
21 pte_offset_kernel(pmd_offset(pud_offset(pgd_offset_k(vaddr), (vaddr)), (vaddr)), (vaddr))
22
23static pte_t *kmap_coherent_pte;
24
25void __init kmap_coherent_init(void)
26{
27 unsigned long vaddr;
28
29 /* cache the first coherent kmap pte */
30 vaddr = __fix_to_virt(FIX_CMAP_BEGIN);
31 kmap_coherent_pte = kmap_get_fixmap_pte(vaddr);
32}
33
34static inline void *kmap_coherent(struct page *page, unsigned long addr)
35{
36 enum fixed_addresses idx;
37 unsigned long vaddr, flags;
38 pte_t pte;
39
40 inc_preempt_count();
41
42 idx = (addr & current_cpu_data.dcache.alias_mask) >> PAGE_SHIFT;
43 vaddr = __fix_to_virt(FIX_CMAP_END - idx);
44 pte = mk_pte(page, PAGE_KERNEL);
45
46 local_irq_save(flags);
47 flush_tlb_one(get_asid(), vaddr);
48 local_irq_restore(flags);
49
50 update_mmu_cache(NULL, vaddr, pte);
51
52 set_pte(kmap_coherent_pte - (FIX_CMAP_END - idx), pte);
53
54 return (void *)vaddr;
55}
56
57static inline void kunmap_coherent(struct page *page)
58{
59 dec_preempt_count();
60 preempt_check_resched();
61}
62
63/*
64 * clear_user_page
65 * @to: P1 address
66 * @address: U0 address to be mapped
67 * @page: page (virt_to_page(to))
68 */
69void clear_user_page(void *to, unsigned long address, struct page *page)
70{
71 __set_bit(PG_mapped, &page->flags);
72
73 clear_page(to);
74 if ((((address & PAGE_MASK) ^ (unsigned long)to) & CACHE_ALIAS))
75 __flush_wback_region(to, PAGE_SIZE);
76}
77
78void copy_to_user_page(struct vm_area_struct *vma, struct page *page,
79 unsigned long vaddr, void *dst, const void *src,
80 unsigned long len)
81{
82 void *vto;
83
84 __set_bit(PG_mapped, &page->flags);
85
86 vto = kmap_coherent(page, vaddr) + (vaddr & ~PAGE_MASK);
87 memcpy(vto, src, len);
88 kunmap_coherent(vto);
89
90 if (vma->vm_flags & VM_EXEC)
91 flush_cache_page(vma, vaddr, page_to_pfn(page));
92}
93
94void copy_from_user_page(struct vm_area_struct *vma, struct page *page,
95 unsigned long vaddr, void *dst, const void *src,
96 unsigned long len)
97{
98 void *vfrom;
99
100 __set_bit(PG_mapped, &page->flags);
101
102 vfrom = kmap_coherent(page, vaddr) + (vaddr & ~PAGE_MASK);
103 memcpy(dst, vfrom, len);
104 kunmap_coherent(vfrom);
105}
106
107void copy_user_highpage(struct page *to, struct page *from,
108 unsigned long vaddr, struct vm_area_struct *vma)
109{
110 void *vfrom, *vto;
111
112 __set_bit(PG_mapped, &to->flags);
113
114 vto = kmap_atomic(to, KM_USER1);
115 vfrom = kmap_coherent(from, vaddr);
116 copy_page(vto, vfrom);
117 kunmap_coherent(vfrom);
118
119 if (((vaddr ^ (unsigned long)vto) & CACHE_ALIAS))
120 __flush_wback_region(vto, PAGE_SIZE);
121
122 kunmap_atomic(vto, KM_USER1);
123 /* Make sure this page is cleared on other CPU's too before using it */
124 smp_wmb();
125}
126EXPORT_SYMBOL(copy_user_highpage);
127
128/*
129 * For SH-4, we have our own implementation for ptep_get_and_clear
130 */
131pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
132{
133 pte_t pte = *ptep;
134
135 pte_clear(mm, addr, ptep);
136 if (!pte_not_present(pte)) {
137 unsigned long pfn = pte_pfn(pte);
138 if (pfn_valid(pfn)) {
139 struct page *page = pfn_to_page(pfn);
140 struct address_space *mapping = page_mapping(page);
141 if (!mapping || !mapping_writably_mapped(mapping))
142 __clear_bit(PG_mapped, &page->flags);
143 }
144 }
145 return pte;
146}
diff --git a/arch/sh/mm/pg-sh7705.c b/arch/sh/mm/pg-sh7705.c
deleted file mode 100644
index eaf25147194c..000000000000
--- a/arch/sh/mm/pg-sh7705.c
+++ /dev/null
@@ -1,138 +0,0 @@
1/*
2 * arch/sh/mm/pg-sh7705.c
3 *
4 * Copyright (C) 1999, 2000 Niibe Yutaka
5 * Copyright (C) 2004 Alex Song
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 */
12
13#include <linux/init.h>
14#include <linux/mman.h>
15#include <linux/mm.h>
16#include <linux/threads.h>
17#include <linux/fs.h>
18#include <asm/addrspace.h>
19#include <asm/page.h>
20#include <asm/pgtable.h>
21#include <asm/processor.h>
22#include <asm/cache.h>
23#include <asm/io.h>
24#include <asm/uaccess.h>
25#include <asm/pgalloc.h>
26#include <asm/mmu_context.h>
27#include <asm/cacheflush.h>
28
29static inline void __flush_purge_virtual_region(void *p1, void *virt, int size)
30{
31 unsigned long v;
32 unsigned long begin, end;
33 unsigned long p1_begin;
34
35
36 begin = L1_CACHE_ALIGN((unsigned long)virt);
37 end = L1_CACHE_ALIGN((unsigned long)virt + size);
38
39 p1_begin = (unsigned long)p1 & ~(L1_CACHE_BYTES - 1);
40
41 /* do this the slow way as we may not have TLB entries
42 * for virt yet. */
43 for (v = begin; v < end; v += L1_CACHE_BYTES) {
44 unsigned long p;
45 unsigned long ways, addr;
46
47 p = __pa(p1_begin);
48
49 ways = current_cpu_data.dcache.ways;
50 addr = CACHE_OC_ADDRESS_ARRAY;
51
52 do {
53 unsigned long data;
54
55 addr |= (v & current_cpu_data.dcache.entry_mask);
56
57 data = ctrl_inl(addr);
58 if ((data & CACHE_PHYSADDR_MASK) ==
59 (p & CACHE_PHYSADDR_MASK)) {
60 data &= ~(SH_CACHE_UPDATED|SH_CACHE_VALID);
61 ctrl_outl(data, addr);
62 }
63
64 addr += current_cpu_data.dcache.way_incr;
65 } while (--ways);
66
67 p1_begin += L1_CACHE_BYTES;
68 }
69}
70
71/*
72 * clear_user_page
73 * @to: P1 address
74 * @address: U0 address to be mapped
75 */
76void clear_user_page(void *to, unsigned long address, struct page *pg)
77{
78 struct page *page = virt_to_page(to);
79
80 __set_bit(PG_mapped, &page->flags);
81 if (((address ^ (unsigned long)to) & CACHE_ALIAS) == 0) {
82 clear_page(to);
83 __flush_wback_region(to, PAGE_SIZE);
84 } else {
85 __flush_purge_virtual_region(to,
86 (void *)(address & 0xfffff000),
87 PAGE_SIZE);
88 clear_page(to);
89 __flush_wback_region(to, PAGE_SIZE);
90 }
91}
92
93/*
94 * copy_user_page
95 * @to: P1 address
96 * @from: P1 address
97 * @address: U0 address to be mapped
98 */
99void copy_user_page(void *to, void *from, unsigned long address, struct page *pg)
100{
101 struct page *page = virt_to_page(to);
102
103
104 __set_bit(PG_mapped, &page->flags);
105 if (((address ^ (unsigned long)to) & CACHE_ALIAS) == 0) {
106 copy_page(to, from);
107 __flush_wback_region(to, PAGE_SIZE);
108 } else {
109 __flush_purge_virtual_region(to,
110 (void *)(address & 0xfffff000),
111 PAGE_SIZE);
112 copy_page(to, from);
113 __flush_wback_region(to, PAGE_SIZE);
114 }
115}
116
117/*
118 * For SH7705, we have our own implementation for ptep_get_and_clear
119 * Copied from pg-sh4.c
120 */
121pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
122{
123 pte_t pte = *ptep;
124
125 pte_clear(mm, addr, ptep);
126 if (!pte_not_present(pte)) {
127 unsigned long pfn = pte_pfn(pte);
128 if (pfn_valid(pfn)) {
129 struct page *page = pfn_to_page(pfn);
130 struct address_space *mapping = page_mapping(page);
131 if (!mapping || !mapping_writably_mapped(mapping))
132 __clear_bit(PG_mapped, &page->flags);
133 }
134 }
135
136 return pte;
137}
138
diff --git a/arch/sh/mm/tlb-pteaex.c b/arch/sh/mm/tlb-pteaex.c
index 2aab3ea934d7..409b7c2b4b9d 100644
--- a/arch/sh/mm/tlb-pteaex.c
+++ b/arch/sh/mm/tlb-pteaex.c
@@ -16,34 +16,16 @@
16#include <asm/mmu_context.h> 16#include <asm/mmu_context.h>
17#include <asm/cacheflush.h> 17#include <asm/cacheflush.h>
18 18
19void update_mmu_cache(struct vm_area_struct * vma, 19void __update_tlb(struct vm_area_struct *vma, unsigned long address, pte_t pte)
20 unsigned long address, pte_t pte)
21{ 20{
22 unsigned long flags; 21 unsigned long flags, pteval, vpn;
23 unsigned long pteval;
24 unsigned long vpn;
25 22
26 /* Ptrace may call this routine. */ 23 /*
24 * Handle debugger faulting in for debugee.
25 */
27 if (vma && current->active_mm != vma->vm_mm) 26 if (vma && current->active_mm != vma->vm_mm)
28 return; 27 return;
29 28
30#ifndef CONFIG_CACHE_OFF
31 {
32 unsigned long pfn = pte_pfn(pte);
33
34 if (pfn_valid(pfn)) {
35 struct page *page = pfn_to_page(pfn);
36
37 if (!test_bit(PG_mapped, &page->flags)) {
38 unsigned long phys = pte_val(pte) & PTE_PHYS_MASK;
39 __flush_wback_region((void *)P1SEGADDR(phys),
40 PAGE_SIZE);
41 __set_bit(PG_mapped, &page->flags);
42 }
43 }
44 }
45#endif
46
47 local_irq_save(flags); 29 local_irq_save(flags);
48 30
49 /* Set PTEH register */ 31 /* Set PTEH register */
diff --git a/arch/sh/mm/tlb-sh3.c b/arch/sh/mm/tlb-sh3.c
index 17cb7c3adf22..ace8e6d2f59d 100644
--- a/arch/sh/mm/tlb-sh3.c
+++ b/arch/sh/mm/tlb-sh3.c
@@ -27,32 +27,16 @@
27#include <asm/mmu_context.h> 27#include <asm/mmu_context.h>
28#include <asm/cacheflush.h> 28#include <asm/cacheflush.h>
29 29
30void update_mmu_cache(struct vm_area_struct * vma, 30void __update_tlb(struct vm_area_struct *vma, unsigned long address, pte_t pte)
31 unsigned long address, pte_t pte)
32{ 31{
33 unsigned long flags; 32 unsigned long flags, pteval, vpn;
34 unsigned long pteval;
35 unsigned long vpn;
36 33
37 /* Ptrace may call this routine. */ 34 /*
35 * Handle debugger faulting in for debugee.
36 */
38 if (vma && current->active_mm != vma->vm_mm) 37 if (vma && current->active_mm != vma->vm_mm)
39 return; 38 return;
40 39
41#if defined(CONFIG_SH7705_CACHE_32KB)
42 {
43 struct page *page = pte_page(pte);
44 unsigned long pfn = pte_pfn(pte);
45
46 if (pfn_valid(pfn) && !test_bit(PG_mapped, &page->flags)) {
47 unsigned long phys = pte_val(pte) & PTE_PHYS_MASK;
48
49 __flush_wback_region((void *)P1SEGADDR(phys),
50 PAGE_SIZE);
51 __set_bit(PG_mapped, &page->flags);
52 }
53 }
54#endif
55
56 local_irq_save(flags); 40 local_irq_save(flags);
57 41
58 /* Set PTEH register */ 42 /* Set PTEH register */
@@ -93,4 +77,3 @@ void local_flush_tlb_one(unsigned long asid, unsigned long page)
93 for (i = 0; i < ways; i++) 77 for (i = 0; i < ways; i++)
94 ctrl_outl(data, addr + (i << 8)); 78 ctrl_outl(data, addr + (i << 8));
95} 79}
96
diff --git a/arch/sh/mm/tlb-sh4.c b/arch/sh/mm/tlb-sh4.c
index f0c7b7397fa6..8cf550e2570f 100644
--- a/arch/sh/mm/tlb-sh4.c
+++ b/arch/sh/mm/tlb-sh4.c
@@ -15,34 +15,16 @@
15#include <asm/mmu_context.h> 15#include <asm/mmu_context.h>
16#include <asm/cacheflush.h> 16#include <asm/cacheflush.h>
17 17
18void update_mmu_cache(struct vm_area_struct * vma, 18void __update_tlb(struct vm_area_struct *vma, unsigned long address, pte_t pte)
19 unsigned long address, pte_t pte)
20{ 19{
21 unsigned long flags; 20 unsigned long flags, pteval, vpn;
22 unsigned long pteval;
23 unsigned long vpn;
24 21
25 /* Ptrace may call this routine. */ 22 /*
23 * Handle debugger faulting in for debugee.
24 */
26 if (vma && current->active_mm != vma->vm_mm) 25 if (vma && current->active_mm != vma->vm_mm)
27 return; 26 return;
28 27
29#ifndef CONFIG_CACHE_OFF
30 {
31 unsigned long pfn = pte_pfn(pte);
32
33 if (pfn_valid(pfn)) {
34 struct page *page = pfn_to_page(pfn);
35
36 if (!test_bit(PG_mapped, &page->flags)) {
37 unsigned long phys = pte_val(pte) & PTE_PHYS_MASK;
38 __flush_wback_region((void *)P1SEGADDR(phys),
39 PAGE_SIZE);
40 __set_bit(PG_mapped, &page->flags);
41 }
42 }
43 }
44#endif
45
46 local_irq_save(flags); 28 local_irq_save(flags);
47 29
48 /* Set PTEH register */ 30 /* Set PTEH register */
@@ -61,9 +43,12 @@ void update_mmu_cache(struct vm_area_struct * vma,
61 */ 43 */
62 ctrl_outl(pte.pte_high, MMU_PTEA); 44 ctrl_outl(pte.pte_high, MMU_PTEA);
63#else 45#else
64 if (cpu_data->flags & CPU_HAS_PTEA) 46 if (cpu_data->flags & CPU_HAS_PTEA) {
65 /* TODO: make this look less hacky */ 47 /* The last 3 bits and the first one of pteval contains
66 ctrl_outl(((pteval >> 28) & 0xe) | (pteval & 0x1), MMU_PTEA); 48 * the PTEA timing control and space attribute bits
49 */
50 ctrl_outl(copy_ptea_attributes(pteval), MMU_PTEA);
51 }
67#endif 52#endif
68 53
69 /* Set PTEL register */ 54 /* Set PTEL register */
diff --git a/arch/sh/mm/tlb-sh5.c b/arch/sh/mm/tlb-sh5.c
index dae131243bcc..fdb64e41ec50 100644
--- a/arch/sh/mm/tlb-sh5.c
+++ b/arch/sh/mm/tlb-sh5.c
@@ -117,26 +117,15 @@ int sh64_put_wired_dtlb_entry(unsigned long long entry)
117 * Load up a virtual<->physical translation for @eaddr<->@paddr in the 117 * Load up a virtual<->physical translation for @eaddr<->@paddr in the
118 * pre-allocated TLB slot @config_addr (see sh64_get_wired_dtlb_entry). 118 * pre-allocated TLB slot @config_addr (see sh64_get_wired_dtlb_entry).
119 */ 119 */
120inline void sh64_setup_tlb_slot(unsigned long long config_addr, 120void sh64_setup_tlb_slot(unsigned long long config_addr, unsigned long eaddr,
121 unsigned long eaddr, 121 unsigned long asid, unsigned long paddr)
122 unsigned long asid,
123 unsigned long paddr)
124{ 122{
125 unsigned long long pteh, ptel; 123 unsigned long long pteh, ptel;
126 124
127 /* Sign extension */ 125 pteh = neff_sign_extend(eaddr);
128#if (NEFF == 32)
129 pteh = (unsigned long long)(signed long long)(signed long) eaddr;
130#else
131#error "Can't sign extend more than 32 bits yet"
132#endif
133 pteh &= PAGE_MASK; 126 pteh &= PAGE_MASK;
134 pteh |= (asid << PTEH_ASID_SHIFT) | PTEH_VALID; 127 pteh |= (asid << PTEH_ASID_SHIFT) | PTEH_VALID;
135#if (NEFF == 32) 128 ptel = neff_sign_extend(paddr);
136 ptel = (unsigned long long)(signed long long)(signed long) paddr;
137#else
138#error "Can't sign extend more than 32 bits yet"
139#endif
140 ptel &= PAGE_MASK; 129 ptel &= PAGE_MASK;
141 ptel |= (_PAGE_CACHABLE | _PAGE_READ | _PAGE_WRITE); 130 ptel |= (_PAGE_CACHABLE | _PAGE_READ | _PAGE_WRITE);
142 131
@@ -152,5 +141,5 @@ inline void sh64_setup_tlb_slot(unsigned long long config_addr,
152 * 141 *
153 * Teardown any existing mapping in the TLB slot @config_addr. 142 * Teardown any existing mapping in the TLB slot @config_addr.
154 */ 143 */
155inline void sh64_teardown_tlb_slot(unsigned long long config_addr) 144void sh64_teardown_tlb_slot(unsigned long long config_addr)
156 __attribute__ ((alias("__flush_tlb_slot"))); 145 __attribute__ ((alias("__flush_tlb_slot")));
diff --git a/arch/sh/mm/tlbflush_64.c b/arch/sh/mm/tlbflush_64.c
index 3ce40ea34824..de0b0e881823 100644
--- a/arch/sh/mm/tlbflush_64.c
+++ b/arch/sh/mm/tlbflush_64.c
@@ -20,7 +20,7 @@
20#include <linux/mman.h> 20#include <linux/mman.h>
21#include <linux/mm.h> 21#include <linux/mm.h>
22#include <linux/smp.h> 22#include <linux/smp.h>
23#include <linux/perf_counter.h> 23#include <linux/perf_event.h>
24#include <linux/interrupt.h> 24#include <linux/interrupt.h>
25#include <asm/system.h> 25#include <asm/system.h>
26#include <asm/io.h> 26#include <asm/io.h>
@@ -116,7 +116,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long writeaccess,
116 /* Not an IO address, so reenable interrupts */ 116 /* Not an IO address, so reenable interrupts */
117 local_irq_enable(); 117 local_irq_enable();
118 118
119 perf_swcounter_event(PERF_COUNT_SW_PAGE_FAULTS, 1, 0, regs, address); 119 perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, 0, regs, address);
120 120
121 /* 121 /*
122 * If we're in an interrupt or have no user 122 * If we're in an interrupt or have no user
@@ -201,11 +201,11 @@ survive:
201 201
202 if (fault & VM_FAULT_MAJOR) { 202 if (fault & VM_FAULT_MAJOR) {
203 tsk->maj_flt++; 203 tsk->maj_flt++;
204 perf_swcounter_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, 0, 204 perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, 0,
205 regs, address); 205 regs, address);
206 } else { 206 } else {
207 tsk->min_flt++; 207 tsk->min_flt++;
208 perf_swcounter_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, 0, 208 perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, 0,
209 regs, address); 209 regs, address);
210 } 210 }
211 211
@@ -329,22 +329,6 @@ do_sigbus:
329 goto no_context; 329 goto no_context;
330} 330}
331 331
332void update_mmu_cache(struct vm_area_struct * vma,
333 unsigned long address, pte_t pte)
334{
335 /*
336 * This appears to get called once for every pte entry that gets
337 * established => I don't think it's efficient to try refilling the
338 * TLBs with the pages - some may not get accessed even. Also, for
339 * executable pages, it is impossible to determine reliably here which
340 * TLB they should be mapped into (or both even).
341 *
342 * So, just do nothing here and handle faults on demand. In the
343 * TLBMISS handling case, the refill is now done anyway after the pte
344 * has been fixed up, so that deals with most useful cases.
345 */
346}
347
348void local_flush_tlb_one(unsigned long asid, unsigned long page) 332void local_flush_tlb_one(unsigned long asid, unsigned long page)
349{ 333{
350 unsigned long long match, pteh=0, lpage; 334 unsigned long long match, pteh=0, lpage;
@@ -353,7 +337,7 @@ void local_flush_tlb_one(unsigned long asid, unsigned long page)
353 /* 337 /*
354 * Sign-extend based on neff. 338 * Sign-extend based on neff.
355 */ 339 */
356 lpage = (page & NEFF_SIGN) ? (page | NEFF_MASK) : page; 340 lpage = neff_sign_extend(page);
357 match = (asid << PTEH_ASID_SHIFT) | PTEH_VALID; 341 match = (asid << PTEH_ASID_SHIFT) | PTEH_VALID;
358 match |= lpage; 342 match |= lpage;
359 343
@@ -482,3 +466,7 @@ void local_flush_tlb_kernel_range(unsigned long start, unsigned long end)
482 /* FIXME: Optimize this later.. */ 466 /* FIXME: Optimize this later.. */
483 flush_tlb_all(); 467 flush_tlb_all();
484} 468}
469
470void __update_tlb(struct vm_area_struct *vma, unsigned long address, pte_t pte)
471{
472}
diff --git a/arch/sh/oprofile/backtrace.c b/arch/sh/oprofile/backtrace.c
index 9499a2914f89..2bc74de23f08 100644
--- a/arch/sh/oprofile/backtrace.c
+++ b/arch/sh/oprofile/backtrace.c
@@ -17,9 +17,43 @@
17#include <linux/sched.h> 17#include <linux/sched.h>
18#include <linux/kallsyms.h> 18#include <linux/kallsyms.h>
19#include <linux/mm.h> 19#include <linux/mm.h>
20#include <asm/unwinder.h>
20#include <asm/ptrace.h> 21#include <asm/ptrace.h>
21#include <asm/uaccess.h> 22#include <asm/uaccess.h>
22#include <asm/sections.h> 23#include <asm/sections.h>
24#include <asm/stacktrace.h>
25
26static void backtrace_warning_symbol(void *data, char *msg,
27 unsigned long symbol)
28{
29 /* Ignore warnings */
30}
31
32static void backtrace_warning(void *data, char *msg)
33{
34 /* Ignore warnings */
35}
36
37static int backtrace_stack(void *data, char *name)
38{
39 /* Yes, we want all stacks */
40 return 0;
41}
42
43static void backtrace_address(void *data, unsigned long addr, int reliable)
44{
45 unsigned int *depth = data;
46
47 if ((*depth)--)
48 oprofile_add_trace(addr);
49}
50
51static struct stacktrace_ops backtrace_ops = {
52 .warning = backtrace_warning,
53 .warning_symbol = backtrace_warning_symbol,
54 .stack = backtrace_stack,
55 .address = backtrace_address,
56};
23 57
24/* Limit to stop backtracing too far. */ 58/* Limit to stop backtracing too far. */
25static int backtrace_limit = 20; 59static int backtrace_limit = 20;
@@ -47,50 +81,6 @@ user_backtrace(unsigned long *stackaddr, struct pt_regs *regs)
47 return stackaddr; 81 return stackaddr;
48} 82}
49 83
50/*
51 * | | /\ Higher addresses
52 * | |
53 * --------------- stack base (address of current_thread_info)
54 * | thread info |
55 * . .
56 * | stack |
57 * --------------- saved regs->regs[15] value if valid
58 * . .
59 * --------------- struct pt_regs stored on stack (struct pt_regs *)
60 * | |
61 * . .
62 * | |
63 * --------------- ???
64 * | |
65 * | | \/ Lower addresses
66 *
67 * Thus, &pt_regs <-> stack base restricts the valid(ish) fp values
68 */
69static int valid_kernel_stack(unsigned long *stackaddr, struct pt_regs *regs)
70{
71 unsigned long stack = (unsigned long)regs;
72 unsigned long stack_base = (stack & ~(THREAD_SIZE - 1)) + THREAD_SIZE;
73
74 return ((unsigned long)stackaddr > stack) && ((unsigned long)stackaddr < stack_base);
75}
76
77static unsigned long *
78kernel_backtrace(unsigned long *stackaddr, struct pt_regs *regs)
79{
80 unsigned long addr;
81
82 /*
83 * If not a valid kernel address, keep going till we find one
84 * or the SP stops being a valid address.
85 */
86 do {
87 addr = *stackaddr++;
88 oprofile_add_trace(addr);
89 } while (valid_kernel_stack(stackaddr, regs));
90
91 return stackaddr;
92}
93
94void sh_backtrace(struct pt_regs * const regs, unsigned int depth) 84void sh_backtrace(struct pt_regs * const regs, unsigned int depth)
95{ 85{
96 unsigned long *stackaddr; 86 unsigned long *stackaddr;
@@ -103,9 +93,9 @@ void sh_backtrace(struct pt_regs * const regs, unsigned int depth)
103 93
104 stackaddr = (unsigned long *)regs->regs[15]; 94 stackaddr = (unsigned long *)regs->regs[15];
105 if (!user_mode(regs)) { 95 if (!user_mode(regs)) {
106 while (depth-- && valid_kernel_stack(stackaddr, regs)) 96 if (depth)
107 stackaddr = kernel_backtrace(stackaddr, regs); 97 unwind_stack(NULL, regs, stackaddr,
108 98 &backtrace_ops, &depth);
109 return; 99 return;
110 } 100 }
111 101
diff --git a/arch/sh/tools/mach-types b/arch/sh/tools/mach-types
index fec3a53b8650..6639b25d8d57 100644
--- a/arch/sh/tools/mach-types
+++ b/arch/sh/tools/mach-types
@@ -53,6 +53,9 @@ RSK7203 SH_RSK7203
53AP325RXA SH_AP325RXA 53AP325RXA SH_AP325RXA
54SH7763RDP SH_SH7763RDP 54SH7763RDP SH_SH7763RDP
55SH7785LCR SH_SH7785LCR 55SH7785LCR SH_SH7785LCR
56SH7785LCR_PT SH_SH7785LCR_PT
56URQUELL SH_URQUELL 57URQUELL SH_URQUELL
57ESPT SH_ESPT 58ESPT SH_ESPT
58POLARIS SH_POLARIS 59POLARIS SH_POLARIS
60KFR2R09 SH_KFR2R09
61ECOVEC SH_ECOVEC
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index 86b82348b97c..97fca4695e0b 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -25,7 +25,7 @@ config SPARC
25 select ARCH_WANT_OPTIONAL_GPIOLIB 25 select ARCH_WANT_OPTIONAL_GPIOLIB
26 select RTC_CLASS 26 select RTC_CLASS
27 select RTC_DRV_M48T59 27 select RTC_DRV_M48T59
28 select HAVE_PERF_COUNTERS 28 select HAVE_PERF_EVENTS
29 select HAVE_DMA_ATTRS 29 select HAVE_DMA_ATTRS
30 select HAVE_DMA_API_DEBUG 30 select HAVE_DMA_API_DEBUG
31 31
@@ -47,7 +47,7 @@ config SPARC64
47 select RTC_DRV_BQ4802 47 select RTC_DRV_BQ4802
48 select RTC_DRV_SUN4V 48 select RTC_DRV_SUN4V
49 select RTC_DRV_STARFIRE 49 select RTC_DRV_STARFIRE
50 select HAVE_PERF_COUNTERS 50 select HAVE_PERF_EVENTS
51 51
52config ARCH_DEFCONFIG 52config ARCH_DEFCONFIG
53 string 53 string
diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile
index 467221dd5702..dfe272d14465 100644
--- a/arch/sparc/Makefile
+++ b/arch/sparc/Makefile
@@ -31,7 +31,6 @@ export BITS := 32
31#KBUILD_CFLAGS += -g -pipe -fcall-used-g5 -fcall-used-g7 31#KBUILD_CFLAGS += -g -pipe -fcall-used-g5 -fcall-used-g7
32KBUILD_CFLAGS += -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7 32KBUILD_CFLAGS += -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7
33KBUILD_AFLAGS += -m32 33KBUILD_AFLAGS += -m32
34CPPFLAGS_vmlinux.lds += -m32
35 34
36#LDFLAGS_vmlinux = -N -Ttext 0xf0004000 35#LDFLAGS_vmlinux = -N -Ttext 0xf0004000
37# Since 2.5.40, the first stage is left not btfix-ed. 36# Since 2.5.40, the first stage is left not btfix-ed.
@@ -45,9 +44,6 @@ else
45 44
46CHECKFLAGS += -D__sparc__ -D__sparc_v9__ -D__arch64__ -m64 45CHECKFLAGS += -D__sparc__ -D__sparc_v9__ -D__arch64__ -m64
47 46
48# Undefine sparc when processing vmlinux.lds - it is used
49# And teach CPP we are doing 64 bit builds (for this case)
50CPPFLAGS_vmlinux.lds += -m64 -Usparc
51LDFLAGS := -m elf64_sparc 47LDFLAGS := -m elf64_sparc
52export BITS := 64 48export BITS := 64
53 49
diff --git a/arch/sparc/include/asm/mman.h b/arch/sparc/include/asm/mman.h
index 988192e8e956..c3029ad6619a 100644
--- a/arch/sparc/include/asm/mman.h
+++ b/arch/sparc/include/asm/mman.h
@@ -20,6 +20,8 @@
20 20
21#define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ 21#define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */
22#define MAP_NONBLOCK 0x10000 /* do not block on IO */ 22#define MAP_NONBLOCK 0x10000 /* do not block on IO */
23#define MAP_STACK 0x20000 /* give out an address that is best suited for process/thread stacks */
24#define MAP_HUGETLB 0x40000 /* create a huge page mapping */
23 25
24#ifdef __KERNEL__ 26#ifdef __KERNEL__
25#ifndef __ASSEMBLY__ 27#ifndef __ASSEMBLY__
diff --git a/arch/sparc/include/asm/pci_32.h b/arch/sparc/include/asm/pci_32.h
index ac0e8369fd97..e769f668a4b5 100644
--- a/arch/sparc/include/asm/pci_32.h
+++ b/arch/sparc/include/asm/pci_32.h
@@ -10,7 +10,6 @@
10 * or architectures with incomplete PCI setup by the loader. 10 * or architectures with incomplete PCI setup by the loader.
11 */ 11 */
12#define pcibios_assign_all_busses() 0 12#define pcibios_assign_all_busses() 0
13#define pcibios_scan_all_fns(a, b) 0
14 13
15#define PCIBIOS_MIN_IO 0UL 14#define PCIBIOS_MIN_IO 0UL
16#define PCIBIOS_MIN_MEM 0UL 15#define PCIBIOS_MIN_MEM 0UL
diff --git a/arch/sparc/include/asm/pci_64.h b/arch/sparc/include/asm/pci_64.h
index 5cc9f6aa5494..b63e51c3c3ee 100644
--- a/arch/sparc/include/asm/pci_64.h
+++ b/arch/sparc/include/asm/pci_64.h
@@ -10,7 +10,6 @@
10 * or architectures with incomplete PCI setup by the loader. 10 * or architectures with incomplete PCI setup by the loader.
11 */ 11 */
12#define pcibios_assign_all_busses() 0 12#define pcibios_assign_all_busses() 0
13#define pcibios_scan_all_fns(a, b) 0
14 13
15#define PCIBIOS_MIN_IO 0UL 14#define PCIBIOS_MIN_IO 0UL
16#define PCIBIOS_MIN_MEM 0UL 15#define PCIBIOS_MIN_MEM 0UL
diff --git a/arch/sparc/include/asm/perf_counter.h b/arch/sparc/include/asm/perf_counter.h
deleted file mode 100644
index 5d7a8ca0e491..000000000000
--- a/arch/sparc/include/asm/perf_counter.h
+++ /dev/null
@@ -1,14 +0,0 @@
1#ifndef __ASM_SPARC_PERF_COUNTER_H
2#define __ASM_SPARC_PERF_COUNTER_H
3
4extern void set_perf_counter_pending(void);
5
6#define PERF_COUNTER_INDEX_OFFSET 0
7
8#ifdef CONFIG_PERF_COUNTERS
9extern void init_hw_perf_counters(void);
10#else
11static inline void init_hw_perf_counters(void) { }
12#endif
13
14#endif
diff --git a/arch/sparc/include/asm/perf_event.h b/arch/sparc/include/asm/perf_event.h
new file mode 100644
index 000000000000..7e2669894ce8
--- /dev/null
+++ b/arch/sparc/include/asm/perf_event.h
@@ -0,0 +1,14 @@
1#ifndef __ASM_SPARC_PERF_EVENT_H
2#define __ASM_SPARC_PERF_EVENT_H
3
4extern void set_perf_event_pending(void);
5
6#define PERF_EVENT_INDEX_OFFSET 0
7
8#ifdef CONFIG_PERF_EVENTS
9extern void init_hw_perf_events(void);
10#else
11static inline void init_hw_perf_events(void) { }
12#endif
13
14#endif
diff --git a/arch/sparc/include/asm/smp_64.h b/arch/sparc/include/asm/smp_64.h
index becb6bf353a9..f49e11cd4ded 100644
--- a/arch/sparc/include/asm/smp_64.h
+++ b/arch/sparc/include/asm/smp_64.h
@@ -36,7 +36,6 @@ extern int sparc64_multi_core;
36 36
37extern void arch_send_call_function_single_ipi(int cpu); 37extern void arch_send_call_function_single_ipi(int cpu);
38extern void arch_send_call_function_ipi_mask(const struct cpumask *mask); 38extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
39#define arch_send_call_function_ipi_mask arch_send_call_function_ipi_mask
40 39
41/* 40/*
42 * General functions that each host system must provide. 41 * General functions that each host system must provide.
diff --git a/arch/sparc/include/asm/topology_64.h b/arch/sparc/include/asm/topology_64.h
index e5ea8d332421..600a79035fa1 100644
--- a/arch/sparc/include/asm/topology_64.h
+++ b/arch/sparc/include/asm/topology_64.h
@@ -12,22 +12,8 @@ static inline int cpu_to_node(int cpu)
12 12
13#define parent_node(node) (node) 13#define parent_node(node) (node)
14 14
15static inline cpumask_t node_to_cpumask(int node)
16{
17 return numa_cpumask_lookup_table[node];
18}
19#define cpumask_of_node(node) (&numa_cpumask_lookup_table[node]) 15#define cpumask_of_node(node) (&numa_cpumask_lookup_table[node])
20 16
21/*
22 * Returns a pointer to the cpumask of CPUs on Node 'node'.
23 * Deprecated: use "const struct cpumask *mask = cpumask_of_node(node)"
24 */
25#define node_to_cpumask_ptr(v, node) \
26 cpumask_t *v = &(numa_cpumask_lookup_table[node])
27
28#define node_to_cpumask_ptr_next(v, node) \
29 v = &(numa_cpumask_lookup_table[node])
30
31struct pci_bus; 17struct pci_bus;
32#ifdef CONFIG_PCI 18#ifdef CONFIG_PCI
33extern int pcibus_to_node(struct pci_bus *pbus); 19extern int pcibus_to_node(struct pci_bus *pbus);
@@ -52,13 +38,12 @@ static inline int pcibus_to_node(struct pci_bus *pbus)
52 .busy_idx = 3, \ 38 .busy_idx = 3, \
53 .idle_idx = 2, \ 39 .idle_idx = 2, \
54 .newidle_idx = 0, \ 40 .newidle_idx = 0, \
55 .wake_idx = 1, \ 41 .wake_idx = 0, \
56 .forkexec_idx = 1, \ 42 .forkexec_idx = 0, \
57 .flags = SD_LOAD_BALANCE \ 43 .flags = SD_LOAD_BALANCE \
58 | SD_BALANCE_FORK \ 44 | SD_BALANCE_FORK \
59 | SD_BALANCE_EXEC \ 45 | SD_BALANCE_EXEC \
60 | SD_SERIALIZE \ 46 | SD_SERIALIZE, \
61 | SD_WAKE_BALANCE, \
62 .last_balance = jiffies, \ 47 .last_balance = jiffies, \
63 .balance_interval = 1, \ 48 .balance_interval = 1, \
64} 49}
@@ -72,8 +57,6 @@ static inline int pcibus_to_node(struct pci_bus *pbus)
72#ifdef CONFIG_SMP 57#ifdef CONFIG_SMP
73#define topology_physical_package_id(cpu) (cpu_data(cpu).proc_id) 58#define topology_physical_package_id(cpu) (cpu_data(cpu).proc_id)
74#define topology_core_id(cpu) (cpu_data(cpu).core_id) 59#define topology_core_id(cpu) (cpu_data(cpu).core_id)
75#define topology_core_siblings(cpu) (cpu_core_map[cpu])
76#define topology_thread_siblings(cpu) (per_cpu(cpu_sibling_map, cpu))
77#define topology_core_cpumask(cpu) (&cpu_core_map[cpu]) 60#define topology_core_cpumask(cpu) (&cpu_core_map[cpu])
78#define topology_thread_cpumask(cpu) (&per_cpu(cpu_sibling_map, cpu)) 61#define topology_thread_cpumask(cpu) (&per_cpu(cpu_sibling_map, cpu))
79#define mc_capable() (sparc64_multi_core) 62#define mc_capable() (sparc64_multi_core)
diff --git a/arch/sparc/include/asm/unistd.h b/arch/sparc/include/asm/unistd.h
index 706df669f3b8..42f2316c3eaa 100644
--- a/arch/sparc/include/asm/unistd.h
+++ b/arch/sparc/include/asm/unistd.h
@@ -395,7 +395,7 @@
395#define __NR_preadv 324 395#define __NR_preadv 324
396#define __NR_pwritev 325 396#define __NR_pwritev 325
397#define __NR_rt_tgsigqueueinfo 326 397#define __NR_rt_tgsigqueueinfo 326
398#define __NR_perf_counter_open 327 398#define __NR_perf_event_open 327
399 399
400#define NR_SYSCALLS 328 400#define NR_SYSCALLS 328
401 401
diff --git a/arch/sparc/kernel/Makefile b/arch/sparc/kernel/Makefile
index 247cc620cee5..5b47fab9966e 100644
--- a/arch/sparc/kernel/Makefile
+++ b/arch/sparc/kernel/Makefile
@@ -7,7 +7,11 @@ ccflags-y := -Werror
7 7
8extra-y := head_$(BITS).o 8extra-y := head_$(BITS).o
9extra-y += init_task.o 9extra-y += init_task.o
10extra-y += vmlinux.lds 10
11# Undefine sparc when processing vmlinux.lds - it is used
12# And teach CPP we are doing $(BITS) builds (for this case)
13CPPFLAGS_vmlinux.lds := -Usparc -m$(BITS)
14extra-y += vmlinux.lds
11 15
12obj-$(CONFIG_SPARC32) += entry.o wof.o wuf.o 16obj-$(CONFIG_SPARC32) += entry.o wof.o wuf.o
13obj-$(CONFIG_SPARC32) += etrap_32.o 17obj-$(CONFIG_SPARC32) += etrap_32.o
@@ -104,5 +108,5 @@ obj-$(CONFIG_AUDIT) += audit.o
104audit--$(CONFIG_AUDIT) := compat_audit.o 108audit--$(CONFIG_AUDIT) := compat_audit.o
105obj-$(CONFIG_COMPAT) += $(audit--y) 109obj-$(CONFIG_COMPAT) += $(audit--y)
106 110
107pc--$(CONFIG_PERF_COUNTERS) := perf_counter.o 111pc--$(CONFIG_PERF_EVENTS) := perf_event.o
108obj-$(CONFIG_SPARC64) += $(pc--y) 112obj-$(CONFIG_SPARC64) += $(pc--y)
diff --git a/arch/sparc/kernel/init_task.c b/arch/sparc/kernel/init_task.c
index 28125c5b3d3c..5fe3d65581f7 100644
--- a/arch/sparc/kernel/init_task.c
+++ b/arch/sparc/kernel/init_task.c
@@ -18,6 +18,5 @@ EXPORT_SYMBOL(init_task);
18 * If this is not aligned on a 8k boundry, then you should change code 18 * If this is not aligned on a 8k boundry, then you should change code
19 * in etrap.S which assumes it. 19 * in etrap.S which assumes it.
20 */ 20 */
21union thread_union init_thread_union 21union thread_union init_thread_union __init_task_data =
22 __attribute__((section (".data.init_task"))) 22 { INIT_THREAD_INFO(init_task) };
23 = { INIT_THREAD_INFO(init_task) };
diff --git a/arch/sparc/kernel/irq_64.c b/arch/sparc/kernel/irq_64.c
index 8daab33fc17d..8ab1d4728a4b 100644
--- a/arch/sparc/kernel/irq_64.c
+++ b/arch/sparc/kernel/irq_64.c
@@ -229,7 +229,7 @@ static unsigned int sun4u_compute_tid(unsigned long imap, unsigned long cpuid)
229 tid = ((a << IMAP_AID_SHIFT) | 229 tid = ((a << IMAP_AID_SHIFT) |
230 (n << IMAP_NID_SHIFT)); 230 (n << IMAP_NID_SHIFT));
231 tid &= (IMAP_AID_SAFARI | 231 tid &= (IMAP_AID_SAFARI |
232 IMAP_NID_SAFARI);; 232 IMAP_NID_SAFARI);
233 } 233 }
234 } else { 234 } else {
235 tid = cpuid << IMAP_TID_SHIFT; 235 tid = cpuid << IMAP_TID_SHIFT;
diff --git a/arch/sparc/kernel/nmi.c b/arch/sparc/kernel/nmi.c
index 378eb53e0776..b129611590a4 100644
--- a/arch/sparc/kernel/nmi.c
+++ b/arch/sparc/kernel/nmi.c
@@ -19,7 +19,7 @@
19#include <linux/delay.h> 19#include <linux/delay.h>
20#include <linux/smp.h> 20#include <linux/smp.h>
21 21
22#include <asm/perf_counter.h> 22#include <asm/perf_event.h>
23#include <asm/ptrace.h> 23#include <asm/ptrace.h>
24#include <asm/local.h> 24#include <asm/local.h>
25#include <asm/pcr.h> 25#include <asm/pcr.h>
@@ -265,7 +265,7 @@ int __init nmi_init(void)
265 } 265 }
266 } 266 }
267 if (!err) 267 if (!err)
268 init_hw_perf_counters(); 268 init_hw_perf_events();
269 269
270 return err; 270 return err;
271} 271}
diff --git a/arch/sparc/kernel/pcr.c b/arch/sparc/kernel/pcr.c
index 68ff00107073..2d94e7a03af5 100644
--- a/arch/sparc/kernel/pcr.c
+++ b/arch/sparc/kernel/pcr.c
@@ -7,7 +7,7 @@
7#include <linux/init.h> 7#include <linux/init.h>
8#include <linux/irq.h> 8#include <linux/irq.h>
9 9
10#include <linux/perf_counter.h> 10#include <linux/perf_event.h>
11 11
12#include <asm/pil.h> 12#include <asm/pil.h>
13#include <asm/pcr.h> 13#include <asm/pcr.h>
@@ -15,7 +15,7 @@
15 15
16/* This code is shared between various users of the performance 16/* This code is shared between various users of the performance
17 * counters. Users will be oprofile, pseudo-NMI watchdog, and the 17 * counters. Users will be oprofile, pseudo-NMI watchdog, and the
18 * perf_counter support layer. 18 * perf_event support layer.
19 */ 19 */
20 20
21#define PCR_SUN4U_ENABLE (PCR_PIC_PRIV | PCR_STRACE | PCR_UTRACE) 21#define PCR_SUN4U_ENABLE (PCR_PIC_PRIV | PCR_STRACE | PCR_UTRACE)
@@ -42,14 +42,14 @@ void deferred_pcr_work_irq(int irq, struct pt_regs *regs)
42 42
43 old_regs = set_irq_regs(regs); 43 old_regs = set_irq_regs(regs);
44 irq_enter(); 44 irq_enter();
45#ifdef CONFIG_PERF_COUNTERS 45#ifdef CONFIG_PERF_EVENTS
46 perf_counter_do_pending(); 46 perf_event_do_pending();
47#endif 47#endif
48 irq_exit(); 48 irq_exit();
49 set_irq_regs(old_regs); 49 set_irq_regs(old_regs);
50} 50}
51 51
52void set_perf_counter_pending(void) 52void set_perf_event_pending(void)
53{ 53{
54 set_softint(1 << PIL_DEFERRED_PCR_WORK); 54 set_softint(1 << PIL_DEFERRED_PCR_WORK);
55} 55}
diff --git a/arch/sparc/kernel/perf_counter.c b/arch/sparc/kernel/perf_event.c
index 09de4035eaa9..2d6a1b10c81d 100644
--- a/arch/sparc/kernel/perf_counter.c
+++ b/arch/sparc/kernel/perf_event.c
@@ -1,8 +1,8 @@
1/* Performance counter support for sparc64. 1/* Performance event support for sparc64.
2 * 2 *
3 * Copyright (C) 2009 David S. Miller <davem@davemloft.net> 3 * Copyright (C) 2009 David S. Miller <davem@davemloft.net>
4 * 4 *
5 * This code is based almost entirely upon the x86 perf counter 5 * This code is based almost entirely upon the x86 perf event
6 * code, which is: 6 * code, which is:
7 * 7 *
8 * Copyright (C) 2008 Thomas Gleixner <tglx@linutronix.de> 8 * Copyright (C) 2008 Thomas Gleixner <tglx@linutronix.de>
@@ -12,7 +12,7 @@
12 * Copyright (C) 2008-2009 Red Hat, Inc., Peter Zijlstra <pzijlstr@redhat.com> 12 * Copyright (C) 2008-2009 Red Hat, Inc., Peter Zijlstra <pzijlstr@redhat.com>
13 */ 13 */
14 14
15#include <linux/perf_counter.h> 15#include <linux/perf_event.h>
16#include <linux/kprobes.h> 16#include <linux/kprobes.h>
17#include <linux/kernel.h> 17#include <linux/kernel.h>
18#include <linux/kdebug.h> 18#include <linux/kdebug.h>
@@ -46,19 +46,19 @@
46 * normal code. 46 * normal code.
47 */ 47 */
48 48
49#define MAX_HWCOUNTERS 2 49#define MAX_HWEVENTS 2
50#define MAX_PERIOD ((1UL << 32) - 1) 50#define MAX_PERIOD ((1UL << 32) - 1)
51 51
52#define PIC_UPPER_INDEX 0 52#define PIC_UPPER_INDEX 0
53#define PIC_LOWER_INDEX 1 53#define PIC_LOWER_INDEX 1
54 54
55struct cpu_hw_counters { 55struct cpu_hw_events {
56 struct perf_counter *counters[MAX_HWCOUNTERS]; 56 struct perf_event *events[MAX_HWEVENTS];
57 unsigned long used_mask[BITS_TO_LONGS(MAX_HWCOUNTERS)]; 57 unsigned long used_mask[BITS_TO_LONGS(MAX_HWEVENTS)];
58 unsigned long active_mask[BITS_TO_LONGS(MAX_HWCOUNTERS)]; 58 unsigned long active_mask[BITS_TO_LONGS(MAX_HWEVENTS)];
59 int enabled; 59 int enabled;
60}; 60};
61DEFINE_PER_CPU(struct cpu_hw_counters, cpu_hw_counters) = { .enabled = 1, }; 61DEFINE_PER_CPU(struct cpu_hw_events, cpu_hw_events) = { .enabled = 1, };
62 62
63struct perf_event_map { 63struct perf_event_map {
64 u16 encoding; 64 u16 encoding;
@@ -87,9 +87,9 @@ static const struct perf_event_map ultra3i_perfmon_event_map[] = {
87 [PERF_COUNT_HW_CACHE_MISSES] = { 0x0009, PIC_UPPER }, 87 [PERF_COUNT_HW_CACHE_MISSES] = { 0x0009, PIC_UPPER },
88}; 88};
89 89
90static const struct perf_event_map *ultra3i_event_map(int event) 90static const struct perf_event_map *ultra3i_event_map(int event_id)
91{ 91{
92 return &ultra3i_perfmon_event_map[event]; 92 return &ultra3i_perfmon_event_map[event_id];
93} 93}
94 94
95static const struct sparc_pmu ultra3i_pmu = { 95static const struct sparc_pmu ultra3i_pmu = {
@@ -111,9 +111,9 @@ static const struct perf_event_map niagara2_perfmon_event_map[] = {
111 [PERF_COUNT_HW_BRANCH_MISSES] = { 0x0202, PIC_UPPER | PIC_LOWER }, 111 [PERF_COUNT_HW_BRANCH_MISSES] = { 0x0202, PIC_UPPER | PIC_LOWER },
112}; 112};
113 113
114static const struct perf_event_map *niagara2_event_map(int event) 114static const struct perf_event_map *niagara2_event_map(int event_id)
115{ 115{
116 return &niagara2_perfmon_event_map[event]; 116 return &niagara2_perfmon_event_map[event_id];
117} 117}
118 118
119static const struct sparc_pmu niagara2_pmu = { 119static const struct sparc_pmu niagara2_pmu = {
@@ -130,13 +130,13 @@ static const struct sparc_pmu niagara2_pmu = {
130 130
131static const struct sparc_pmu *sparc_pmu __read_mostly; 131static const struct sparc_pmu *sparc_pmu __read_mostly;
132 132
133static u64 event_encoding(u64 event, int idx) 133static u64 event_encoding(u64 event_id, int idx)
134{ 134{
135 if (idx == PIC_UPPER_INDEX) 135 if (idx == PIC_UPPER_INDEX)
136 event <<= sparc_pmu->upper_shift; 136 event_id <<= sparc_pmu->upper_shift;
137 else 137 else
138 event <<= sparc_pmu->lower_shift; 138 event_id <<= sparc_pmu->lower_shift;
139 return event; 139 return event_id;
140} 140}
141 141
142static u64 mask_for_index(int idx) 142static u64 mask_for_index(int idx)
@@ -151,7 +151,7 @@ static u64 nop_for_index(int idx)
151 sparc_pmu->lower_nop, idx); 151 sparc_pmu->lower_nop, idx);
152} 152}
153 153
154static inline void sparc_pmu_enable_counter(struct hw_perf_counter *hwc, 154static inline void sparc_pmu_enable_event(struct hw_perf_event *hwc,
155 int idx) 155 int idx)
156{ 156{
157 u64 val, mask = mask_for_index(idx); 157 u64 val, mask = mask_for_index(idx);
@@ -160,7 +160,7 @@ static inline void sparc_pmu_enable_counter(struct hw_perf_counter *hwc,
160 pcr_ops->write((val & ~mask) | hwc->config); 160 pcr_ops->write((val & ~mask) | hwc->config);
161} 161}
162 162
163static inline void sparc_pmu_disable_counter(struct hw_perf_counter *hwc, 163static inline void sparc_pmu_disable_event(struct hw_perf_event *hwc,
164 int idx) 164 int idx)
165{ 165{
166 u64 mask = mask_for_index(idx); 166 u64 mask = mask_for_index(idx);
@@ -172,7 +172,7 @@ static inline void sparc_pmu_disable_counter(struct hw_perf_counter *hwc,
172 172
173void hw_perf_enable(void) 173void hw_perf_enable(void)
174{ 174{
175 struct cpu_hw_counters *cpuc = &__get_cpu_var(cpu_hw_counters); 175 struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
176 u64 val; 176 u64 val;
177 int i; 177 int i;
178 178
@@ -184,9 +184,9 @@ void hw_perf_enable(void)
184 184
185 val = pcr_ops->read(); 185 val = pcr_ops->read();
186 186
187 for (i = 0; i < MAX_HWCOUNTERS; i++) { 187 for (i = 0; i < MAX_HWEVENTS; i++) {
188 struct perf_counter *cp = cpuc->counters[i]; 188 struct perf_event *cp = cpuc->events[i];
189 struct hw_perf_counter *hwc; 189 struct hw_perf_event *hwc;
190 190
191 if (!cp) 191 if (!cp)
192 continue; 192 continue;
@@ -199,7 +199,7 @@ void hw_perf_enable(void)
199 199
200void hw_perf_disable(void) 200void hw_perf_disable(void)
201{ 201{
202 struct cpu_hw_counters *cpuc = &__get_cpu_var(cpu_hw_counters); 202 struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
203 u64 val; 203 u64 val;
204 204
205 if (!cpuc->enabled) 205 if (!cpuc->enabled)
@@ -241,8 +241,8 @@ static void write_pmc(int idx, u64 val)
241 write_pic(pic); 241 write_pic(pic);
242} 242}
243 243
244static int sparc_perf_counter_set_period(struct perf_counter *counter, 244static int sparc_perf_event_set_period(struct perf_event *event,
245 struct hw_perf_counter *hwc, int idx) 245 struct hw_perf_event *hwc, int idx)
246{ 246{
247 s64 left = atomic64_read(&hwc->period_left); 247 s64 left = atomic64_read(&hwc->period_left);
248 s64 period = hwc->sample_period; 248 s64 period = hwc->sample_period;
@@ -268,33 +268,33 @@ static int sparc_perf_counter_set_period(struct perf_counter *counter,
268 268
269 write_pmc(idx, (u64)(-left) & 0xffffffff); 269 write_pmc(idx, (u64)(-left) & 0xffffffff);
270 270
271 perf_counter_update_userpage(counter); 271 perf_event_update_userpage(event);
272 272
273 return ret; 273 return ret;
274} 274}
275 275
276static int sparc_pmu_enable(struct perf_counter *counter) 276static int sparc_pmu_enable(struct perf_event *event)
277{ 277{
278 struct cpu_hw_counters *cpuc = &__get_cpu_var(cpu_hw_counters); 278 struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
279 struct hw_perf_counter *hwc = &counter->hw; 279 struct hw_perf_event *hwc = &event->hw;
280 int idx = hwc->idx; 280 int idx = hwc->idx;
281 281
282 if (test_and_set_bit(idx, cpuc->used_mask)) 282 if (test_and_set_bit(idx, cpuc->used_mask))
283 return -EAGAIN; 283 return -EAGAIN;
284 284
285 sparc_pmu_disable_counter(hwc, idx); 285 sparc_pmu_disable_event(hwc, idx);
286 286
287 cpuc->counters[idx] = counter; 287 cpuc->events[idx] = event;
288 set_bit(idx, cpuc->active_mask); 288 set_bit(idx, cpuc->active_mask);
289 289
290 sparc_perf_counter_set_period(counter, hwc, idx); 290 sparc_perf_event_set_period(event, hwc, idx);
291 sparc_pmu_enable_counter(hwc, idx); 291 sparc_pmu_enable_event(hwc, idx);
292 perf_counter_update_userpage(counter); 292 perf_event_update_userpage(event);
293 return 0; 293 return 0;
294} 294}
295 295
296static u64 sparc_perf_counter_update(struct perf_counter *counter, 296static u64 sparc_perf_event_update(struct perf_event *event,
297 struct hw_perf_counter *hwc, int idx) 297 struct hw_perf_event *hwc, int idx)
298{ 298{
299 int shift = 64 - 32; 299 int shift = 64 - 32;
300 u64 prev_raw_count, new_raw_count; 300 u64 prev_raw_count, new_raw_count;
@@ -311,79 +311,79 @@ again:
311 delta = (new_raw_count << shift) - (prev_raw_count << shift); 311 delta = (new_raw_count << shift) - (prev_raw_count << shift);
312 delta >>= shift; 312 delta >>= shift;
313 313
314 atomic64_add(delta, &counter->count); 314 atomic64_add(delta, &event->count);
315 atomic64_sub(delta, &hwc->period_left); 315 atomic64_sub(delta, &hwc->period_left);
316 316
317 return new_raw_count; 317 return new_raw_count;
318} 318}
319 319
320static void sparc_pmu_disable(struct perf_counter *counter) 320static void sparc_pmu_disable(struct perf_event *event)
321{ 321{
322 struct cpu_hw_counters *cpuc = &__get_cpu_var(cpu_hw_counters); 322 struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
323 struct hw_perf_counter *hwc = &counter->hw; 323 struct hw_perf_event *hwc = &event->hw;
324 int idx = hwc->idx; 324 int idx = hwc->idx;
325 325
326 clear_bit(idx, cpuc->active_mask); 326 clear_bit(idx, cpuc->active_mask);
327 sparc_pmu_disable_counter(hwc, idx); 327 sparc_pmu_disable_event(hwc, idx);
328 328
329 barrier(); 329 barrier();
330 330
331 sparc_perf_counter_update(counter, hwc, idx); 331 sparc_perf_event_update(event, hwc, idx);
332 cpuc->counters[idx] = NULL; 332 cpuc->events[idx] = NULL;
333 clear_bit(idx, cpuc->used_mask); 333 clear_bit(idx, cpuc->used_mask);
334 334
335 perf_counter_update_userpage(counter); 335 perf_event_update_userpage(event);
336} 336}
337 337
338static void sparc_pmu_read(struct perf_counter *counter) 338static void sparc_pmu_read(struct perf_event *event)
339{ 339{
340 struct hw_perf_counter *hwc = &counter->hw; 340 struct hw_perf_event *hwc = &event->hw;
341 sparc_perf_counter_update(counter, hwc, hwc->idx); 341 sparc_perf_event_update(event, hwc, hwc->idx);
342} 342}
343 343
344static void sparc_pmu_unthrottle(struct perf_counter *counter) 344static void sparc_pmu_unthrottle(struct perf_event *event)
345{ 345{
346 struct hw_perf_counter *hwc = &counter->hw; 346 struct hw_perf_event *hwc = &event->hw;
347 sparc_pmu_enable_counter(hwc, hwc->idx); 347 sparc_pmu_enable_event(hwc, hwc->idx);
348} 348}
349 349
350static atomic_t active_counters = ATOMIC_INIT(0); 350static atomic_t active_events = ATOMIC_INIT(0);
351static DEFINE_MUTEX(pmc_grab_mutex); 351static DEFINE_MUTEX(pmc_grab_mutex);
352 352
353void perf_counter_grab_pmc(void) 353void perf_event_grab_pmc(void)
354{ 354{
355 if (atomic_inc_not_zero(&active_counters)) 355 if (atomic_inc_not_zero(&active_events))
356 return; 356 return;
357 357
358 mutex_lock(&pmc_grab_mutex); 358 mutex_lock(&pmc_grab_mutex);
359 if (atomic_read(&active_counters) == 0) { 359 if (atomic_read(&active_events) == 0) {
360 if (atomic_read(&nmi_active) > 0) { 360 if (atomic_read(&nmi_active) > 0) {
361 on_each_cpu(stop_nmi_watchdog, NULL, 1); 361 on_each_cpu(stop_nmi_watchdog, NULL, 1);
362 BUG_ON(atomic_read(&nmi_active) != 0); 362 BUG_ON(atomic_read(&nmi_active) != 0);
363 } 363 }
364 atomic_inc(&active_counters); 364 atomic_inc(&active_events);
365 } 365 }
366 mutex_unlock(&pmc_grab_mutex); 366 mutex_unlock(&pmc_grab_mutex);
367} 367}
368 368
369void perf_counter_release_pmc(void) 369void perf_event_release_pmc(void)
370{ 370{
371 if (atomic_dec_and_mutex_lock(&active_counters, &pmc_grab_mutex)) { 371 if (atomic_dec_and_mutex_lock(&active_events, &pmc_grab_mutex)) {
372 if (atomic_read(&nmi_active) == 0) 372 if (atomic_read(&nmi_active) == 0)
373 on_each_cpu(start_nmi_watchdog, NULL, 1); 373 on_each_cpu(start_nmi_watchdog, NULL, 1);
374 mutex_unlock(&pmc_grab_mutex); 374 mutex_unlock(&pmc_grab_mutex);
375 } 375 }
376} 376}
377 377
378static void hw_perf_counter_destroy(struct perf_counter *counter) 378static void hw_perf_event_destroy(struct perf_event *event)
379{ 379{
380 perf_counter_release_pmc(); 380 perf_event_release_pmc();
381} 381}
382 382
383static int __hw_perf_counter_init(struct perf_counter *counter) 383static int __hw_perf_event_init(struct perf_event *event)
384{ 384{
385 struct perf_counter_attr *attr = &counter->attr; 385 struct perf_event_attr *attr = &event->attr;
386 struct hw_perf_counter *hwc = &counter->hw; 386 struct hw_perf_event *hwc = &event->hw;
387 const struct perf_event_map *pmap; 387 const struct perf_event_map *pmap;
388 u64 enc; 388 u64 enc;
389 389
@@ -396,8 +396,8 @@ static int __hw_perf_counter_init(struct perf_counter *counter)
396 if (attr->config >= sparc_pmu->max_events) 396 if (attr->config >= sparc_pmu->max_events)
397 return -EINVAL; 397 return -EINVAL;
398 398
399 perf_counter_grab_pmc(); 399 perf_event_grab_pmc();
400 counter->destroy = hw_perf_counter_destroy; 400 event->destroy = hw_perf_event_destroy;
401 401
402 /* We save the enable bits in the config_base. So to 402 /* We save the enable bits in the config_base. So to
403 * turn off sampling just write 'config', and to enable 403 * turn off sampling just write 'config', and to enable
@@ -439,16 +439,16 @@ static const struct pmu pmu = {
439 .unthrottle = sparc_pmu_unthrottle, 439 .unthrottle = sparc_pmu_unthrottle,
440}; 440};
441 441
442const struct pmu *hw_perf_counter_init(struct perf_counter *counter) 442const struct pmu *hw_perf_event_init(struct perf_event *event)
443{ 443{
444 int err = __hw_perf_counter_init(counter); 444 int err = __hw_perf_event_init(event);
445 445
446 if (err) 446 if (err)
447 return ERR_PTR(err); 447 return ERR_PTR(err);
448 return &pmu; 448 return &pmu;
449} 449}
450 450
451void perf_counter_print_debug(void) 451void perf_event_print_debug(void)
452{ 452{
453 unsigned long flags; 453 unsigned long flags;
454 u64 pcr, pic; 454 u64 pcr, pic;
@@ -471,16 +471,16 @@ void perf_counter_print_debug(void)
471 local_irq_restore(flags); 471 local_irq_restore(flags);
472} 472}
473 473
474static int __kprobes perf_counter_nmi_handler(struct notifier_block *self, 474static int __kprobes perf_event_nmi_handler(struct notifier_block *self,
475 unsigned long cmd, void *__args) 475 unsigned long cmd, void *__args)
476{ 476{
477 struct die_args *args = __args; 477 struct die_args *args = __args;
478 struct perf_sample_data data; 478 struct perf_sample_data data;
479 struct cpu_hw_counters *cpuc; 479 struct cpu_hw_events *cpuc;
480 struct pt_regs *regs; 480 struct pt_regs *regs;
481 int idx; 481 int idx;
482 482
483 if (!atomic_read(&active_counters)) 483 if (!atomic_read(&active_events))
484 return NOTIFY_DONE; 484 return NOTIFY_DONE;
485 485
486 switch (cmd) { 486 switch (cmd) {
@@ -493,35 +493,34 @@ static int __kprobes perf_counter_nmi_handler(struct notifier_block *self,
493 493
494 regs = args->regs; 494 regs = args->regs;
495 495
496 data.regs = regs;
497 data.addr = 0; 496 data.addr = 0;
498 497
499 cpuc = &__get_cpu_var(cpu_hw_counters); 498 cpuc = &__get_cpu_var(cpu_hw_events);
500 for (idx = 0; idx < MAX_HWCOUNTERS; idx++) { 499 for (idx = 0; idx < MAX_HWEVENTS; idx++) {
501 struct perf_counter *counter = cpuc->counters[idx]; 500 struct perf_event *event = cpuc->events[idx];
502 struct hw_perf_counter *hwc; 501 struct hw_perf_event *hwc;
503 u64 val; 502 u64 val;
504 503
505 if (!test_bit(idx, cpuc->active_mask)) 504 if (!test_bit(idx, cpuc->active_mask))
506 continue; 505 continue;
507 hwc = &counter->hw; 506 hwc = &event->hw;
508 val = sparc_perf_counter_update(counter, hwc, idx); 507 val = sparc_perf_event_update(event, hwc, idx);
509 if (val & (1ULL << 31)) 508 if (val & (1ULL << 31))
510 continue; 509 continue;
511 510
512 data.period = counter->hw.last_period; 511 data.period = event->hw.last_period;
513 if (!sparc_perf_counter_set_period(counter, hwc, idx)) 512 if (!sparc_perf_event_set_period(event, hwc, idx))
514 continue; 513 continue;
515 514
516 if (perf_counter_overflow(counter, 1, &data)) 515 if (perf_event_overflow(event, 1, &data, regs))
517 sparc_pmu_disable_counter(hwc, idx); 516 sparc_pmu_disable_event(hwc, idx);
518 } 517 }
519 518
520 return NOTIFY_STOP; 519 return NOTIFY_STOP;
521} 520}
522 521
523static __read_mostly struct notifier_block perf_counter_nmi_notifier = { 522static __read_mostly struct notifier_block perf_event_nmi_notifier = {
524 .notifier_call = perf_counter_nmi_handler, 523 .notifier_call = perf_event_nmi_handler,
525}; 524};
526 525
527static bool __init supported_pmu(void) 526static bool __init supported_pmu(void)
@@ -537,9 +536,9 @@ static bool __init supported_pmu(void)
537 return false; 536 return false;
538} 537}
539 538
540void __init init_hw_perf_counters(void) 539void __init init_hw_perf_events(void)
541{ 540{
542 pr_info("Performance counters: "); 541 pr_info("Performance events: ");
543 542
544 if (!supported_pmu()) { 543 if (!supported_pmu()) {
545 pr_cont("No support for PMU type '%s'\n", sparc_pmu_type); 544 pr_cont("No support for PMU type '%s'\n", sparc_pmu_type);
@@ -548,10 +547,10 @@ void __init init_hw_perf_counters(void)
548 547
549 pr_cont("Supported PMU type is '%s'\n", sparc_pmu_type); 548 pr_cont("Supported PMU type is '%s'\n", sparc_pmu_type);
550 549
551 /* All sparc64 PMUs currently have 2 counters. But this simple 550 /* All sparc64 PMUs currently have 2 events. But this simple
552 * driver only supports one active counter at a time. 551 * driver only supports one active event at a time.
553 */ 552 */
554 perf_max_counters = 1; 553 perf_max_events = 1;
555 554
556 register_die_notifier(&perf_counter_nmi_notifier); 555 register_die_notifier(&perf_event_nmi_notifier);
557} 556}
diff --git a/arch/sparc/kernel/sys_sparc32.c b/arch/sparc/kernel/sys_sparc32.c
index f5000a460c05..04e28b2671c8 100644
--- a/arch/sparc/kernel/sys_sparc32.c
+++ b/arch/sparc/kernel/sys_sparc32.c
@@ -16,7 +16,6 @@
16#include <linux/signal.h> 16#include <linux/signal.h>
17#include <linux/resource.h> 17#include <linux/resource.h>
18#include <linux/times.h> 18#include <linux/times.h>
19#include <linux/utsname.h>
20#include <linux/smp.h> 19#include <linux/smp.h>
21#include <linux/smp_lock.h> 20#include <linux/smp_lock.h>
22#include <linux/sem.h> 21#include <linux/sem.h>
diff --git a/arch/sparc/kernel/systbls.h b/arch/sparc/kernel/systbls.h
index 15c2d752b2bc..a63c5d2d9849 100644
--- a/arch/sparc/kernel/systbls.h
+++ b/arch/sparc/kernel/systbls.h
@@ -3,10 +3,11 @@
3 3
4#include <linux/kernel.h> 4#include <linux/kernel.h>
5#include <linux/types.h> 5#include <linux/types.h>
6#include <linux/utsname.h>
7#include <asm/utrap.h> 6#include <asm/utrap.h>
8#include <asm/signal.h> 7#include <asm/signal.h>
9 8
9struct new_utsname;
10
10extern asmlinkage unsigned long sys_getpagesize(void); 11extern asmlinkage unsigned long sys_getpagesize(void);
11extern asmlinkage unsigned long sparc_brk(unsigned long brk); 12extern asmlinkage unsigned long sparc_brk(unsigned long brk);
12extern asmlinkage long sparc_pipe(struct pt_regs *regs); 13extern asmlinkage long sparc_pipe(struct pt_regs *regs);
diff --git a/arch/sparc/kernel/systbls_32.S b/arch/sparc/kernel/systbls_32.S
index 04181577cb65..0f1658d37490 100644
--- a/arch/sparc/kernel/systbls_32.S
+++ b/arch/sparc/kernel/systbls_32.S
@@ -82,5 +82,5 @@ sys_call_table:
82/*310*/ .long sys_utimensat, sys_signalfd, sys_timerfd_create, sys_eventfd, sys_fallocate 82/*310*/ .long sys_utimensat, sys_signalfd, sys_timerfd_create, sys_eventfd, sys_fallocate
83/*315*/ .long sys_timerfd_settime, sys_timerfd_gettime, sys_signalfd4, sys_eventfd2, sys_epoll_create1 83/*315*/ .long sys_timerfd_settime, sys_timerfd_gettime, sys_signalfd4, sys_eventfd2, sys_epoll_create1
84/*320*/ .long sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, sys_preadv 84/*320*/ .long sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, sys_preadv
85/*325*/ .long sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_counter_open 85/*325*/ .long sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open
86 86
diff --git a/arch/sparc/kernel/systbls_64.S b/arch/sparc/kernel/systbls_64.S
index 91b06b7f7acf..009825f6e73c 100644
--- a/arch/sparc/kernel/systbls_64.S
+++ b/arch/sparc/kernel/systbls_64.S
@@ -83,7 +83,7 @@ sys_call_table32:
83/*310*/ .word compat_sys_utimensat, compat_sys_signalfd, sys_timerfd_create, sys_eventfd, compat_sys_fallocate 83/*310*/ .word compat_sys_utimensat, compat_sys_signalfd, sys_timerfd_create, sys_eventfd, compat_sys_fallocate
84 .word compat_sys_timerfd_settime, compat_sys_timerfd_gettime, compat_sys_signalfd4, sys_eventfd2, sys_epoll_create1 84 .word compat_sys_timerfd_settime, compat_sys_timerfd_gettime, compat_sys_signalfd4, sys_eventfd2, sys_epoll_create1
85/*320*/ .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, compat_sys_preadv 85/*320*/ .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, compat_sys_preadv
86 .word compat_sys_pwritev, compat_sys_rt_tgsigqueueinfo, sys_perf_counter_open 86 .word compat_sys_pwritev, compat_sys_rt_tgsigqueueinfo, sys_perf_event_open
87 87
88#endif /* CONFIG_COMPAT */ 88#endif /* CONFIG_COMPAT */
89 89
@@ -158,4 +158,4 @@ sys_call_table:
158/*310*/ .word sys_utimensat, sys_signalfd, sys_timerfd_create, sys_eventfd, sys_fallocate 158/*310*/ .word sys_utimensat, sys_signalfd, sys_timerfd_create, sys_eventfd, sys_fallocate
159 .word sys_timerfd_settime, sys_timerfd_gettime, sys_signalfd4, sys_eventfd2, sys_epoll_create1 159 .word sys_timerfd_settime, sys_timerfd_gettime, sys_signalfd4, sys_eventfd2, sys_epoll_create1
160/*320*/ .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, sys_preadv 160/*320*/ .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, sys_preadv
161 .word sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_counter_open 161 .word sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open
diff --git a/arch/sparc/kernel/vmlinux.lds.S b/arch/sparc/kernel/vmlinux.lds.S
index 866390feb683..4e5992593967 100644
--- a/arch/sparc/kernel/vmlinux.lds.S
+++ b/arch/sparc/kernel/vmlinux.lds.S
@@ -51,70 +51,27 @@ SECTIONS
51 _etext = .; 51 _etext = .;
52 52
53 RO_DATA(PAGE_SIZE) 53 RO_DATA(PAGE_SIZE)
54 .data : {
55 DATA_DATA
56 CONSTRUCTORS
57 }
58 .data1 : { 54 .data1 : {
59 *(.data1) 55 *(.data1)
60 } 56 }
61 . = ALIGN(SMP_CACHE_BYTES); 57 RW_DATA_SECTION(SMP_CACHE_BYTES, 0, THREAD_SIZE)
62 .data.cacheline_aligned : { 58
63 *(.data.cacheline_aligned)
64 }
65 . = ALIGN(SMP_CACHE_BYTES);
66 .data.read_mostly : {
67 *(.data.read_mostly)
68 }
69 /* End of data section */ 59 /* End of data section */
70 _edata = .; 60 _edata = .;
71 61
72 /* init_task */
73 . = ALIGN(THREAD_SIZE);
74 .data.init_task : {
75 *(.data.init_task)
76 }
77 .fixup : { 62 .fixup : {
78 __start___fixup = .; 63 __start___fixup = .;
79 *(.fixup) 64 *(.fixup)
80 __stop___fixup = .; 65 __stop___fixup = .;
81 } 66 }
82 . = ALIGN(16); 67 EXCEPTION_TABLE(16)
83 __ex_table : {
84 __start___ex_table = .;
85 *(__ex_table)
86 __stop___ex_table = .;
87 }
88 NOTES 68 NOTES
89 69
90 . = ALIGN(PAGE_SIZE); 70 . = ALIGN(PAGE_SIZE);
91 .init.text : { 71 __init_begin = ALIGN(PAGE_SIZE);
92 __init_begin = .; 72 INIT_TEXT_SECTION(PAGE_SIZE)
93 _sinittext = .;
94 INIT_TEXT
95 _einittext = .;
96 }
97 __init_text_end = .; 73 __init_text_end = .;
98 .init.data : { 74 INIT_DATA_SECTION(16)
99 INIT_DATA
100 }
101 . = ALIGN(16);
102 .init.setup : {
103 __setup_start = .;
104 *(.init.setup)
105 __setup_end = .;
106 }
107 .initcall.init : {
108 __initcall_start = .;
109 INITCALLS
110 __initcall_end = .;
111 }
112 .con_initcall.init : {
113 __con_initcall_start = .;
114 *(.con_initcall.init)
115 __con_initcall_end = .;
116 }
117 SECURITY_INIT
118 75
119 . = ALIGN(4); 76 . = ALIGN(4);
120 .tsb_ldquad_phys_patch : { 77 .tsb_ldquad_phys_patch : {
@@ -146,29 +103,11 @@ SECTIONS
146 __sun4v_2insn_patch_end = .; 103 __sun4v_2insn_patch_end = .;
147 } 104 }
148 105
149#ifdef CONFIG_BLK_DEV_INITRD
150 . = ALIGN(PAGE_SIZE);
151 .init.ramfs : {
152 __initramfs_start = .;
153 *(.init.ramfs)
154 __initramfs_end = .;
155 }
156#endif
157
158 PERCPU(PAGE_SIZE) 106 PERCPU(PAGE_SIZE)
159 107
160 . = ALIGN(PAGE_SIZE); 108 . = ALIGN(PAGE_SIZE);
161 __init_end = .; 109 __init_end = .;
162 __bss_start = .; 110 BSS_SECTION(0, 0, 0)
163 .sbss : {
164 *(.sbss)
165 *(.scommon)
166 }
167 .bss : {
168 *(.dynbss)
169 *(.bss)
170 *(COMMON)
171 }
172 _end = . ; 111 _end = . ;
173 112
174 STABS_DEBUG 113 STABS_DEBUG
diff --git a/arch/sparc/mm/init_32.c b/arch/sparc/mm/init_32.c
index 54114ad0bdee..dc7c3b17a15f 100644
--- a/arch/sparc/mm/init_32.c
+++ b/arch/sparc/mm/init_32.c
@@ -472,7 +472,7 @@ void __init mem_init(void)
472 reservedpages++; 472 reservedpages++;
473 473
474 printk(KERN_INFO "Memory: %luk/%luk available (%dk kernel code, %dk reserved, %dk data, %dk init, %ldk highmem)\n", 474 printk(KERN_INFO "Memory: %luk/%luk available (%dk kernel code, %dk reserved, %dk data, %dk init, %ldk highmem)\n",
475 (unsigned long) nr_free_pages() << (PAGE_SHIFT-10), 475 nr_free_pages() << (PAGE_SHIFT-10),
476 num_physpages << (PAGE_SHIFT - 10), 476 num_physpages << (PAGE_SHIFT - 10),
477 codepages << (PAGE_SHIFT-10), 477 codepages << (PAGE_SHIFT-10),
478 reservedpages << (PAGE_SHIFT - 10), 478 reservedpages << (PAGE_SHIFT - 10),
diff --git a/arch/um/Makefile b/arch/um/Makefile
index 0728def32234..fc633dbacf84 100644
--- a/arch/um/Makefile
+++ b/arch/um/Makefile
@@ -96,11 +96,10 @@ CFLAGS_NO_HARDENING := $(call cc-option, -fno-PIC,) $(call cc-option, -fno-pic,)
96 $(call cc-option, -fno-stack-protector,) \ 96 $(call cc-option, -fno-stack-protector,) \
97 $(call cc-option, -fno-stack-protector-all,) 97 $(call cc-option, -fno-stack-protector-all,)
98 98
99CONFIG_KERNEL_STACK_ORDER ?= 2 99# Options used by linker script
100STACK_SIZE := $(shell echo $$[ 4096 * (1 << $(CONFIG_KERNEL_STACK_ORDER)) ] ) 100export LDS_START := $(START)
101 101export LDS_ELF_ARCH := $(ELF_ARCH)
102CPPFLAGS_vmlinux.lds = -U$(SUBARCH) -DSTART=$(START) -DELF_ARCH=$(ELF_ARCH) \ 102export LDS_ELF_FORMAT := $(ELF_FORMAT)
103 -DELF_FORMAT="$(ELF_FORMAT)" -DKERNEL_STACK_SIZE=$(STACK_SIZE)
104 103
105# The wrappers will select whether using "malloc" or the kernel allocator. 104# The wrappers will select whether using "malloc" or the kernel allocator.
106LINK_WRAPS = -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc 105LINK_WRAPS = -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc
diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c
index f114813ae258..a74245ae3a84 100644
--- a/arch/um/drivers/net_kern.c
+++ b/arch/um/drivers/net_kern.c
@@ -533,7 +533,7 @@ static int eth_parse(char *str, int *index_out, char **str_out,
533 char **error_out) 533 char **error_out)
534{ 534{
535 char *end; 535 char *end;
536 int n, err = -EINVAL;; 536 int n, err = -EINVAL;
537 537
538 n = simple_strtoul(str, &end, 0); 538 n = simple_strtoul(str, &end, 0);
539 if (end == str) { 539 if (end == str) {
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
index 8f05d4d9da12..635d16d90a80 100644
--- a/arch/um/drivers/ubd_kern.c
+++ b/arch/um/drivers/ubd_kern.c
@@ -106,7 +106,7 @@ static int ubd_getgeo(struct block_device *bdev, struct hd_geometry *geo);
106 106
107#define MAX_DEV (16) 107#define MAX_DEV (16)
108 108
109static struct block_device_operations ubd_blops = { 109static const struct block_device_operations ubd_blops = {
110 .owner = THIS_MODULE, 110 .owner = THIS_MODULE,
111 .open = ubd_open, 111 .open = ubd_open,
112 .release = ubd_release, 112 .release = ubd_release,
diff --git a/arch/um/include/asm/common.lds.S b/arch/um/include/asm/common.lds.S
index 37ecc5577a9a..ac55b9efa1ce 100644
--- a/arch/um/include/asm/common.lds.S
+++ b/arch/um/include/asm/common.lds.S
@@ -16,11 +16,7 @@
16 16
17 . = ALIGN(4096); 17 . = ALIGN(4096);
18 .note : { *(.note.*) } 18 .note : { *(.note.*) }
19 __ex_table : { 19 EXCEPTION_TABLE(0)
20 __start___ex_table = .;
21 *(__ex_table)
22 __stop___ex_table = .;
23 }
24 20
25 BUG_TABLE 21 BUG_TABLE
26 22
@@ -43,28 +39,17 @@
43 } 39 }
44 40
45 .init.setup : { 41 .init.setup : {
46 __setup_start = .; 42 INIT_SETUP(0)
47 *(.init.setup)
48 __setup_end = .;
49 } 43 }
50 44
51 . = ALIGN(32); 45 PERCPU(32)
52 .data.percpu : {
53 __per_cpu_start = . ;
54 *(.data.percpu)
55 __per_cpu_end = . ;
56 }
57 46
58 .initcall.init : { 47 .initcall.init : {
59 __initcall_start = .; 48 INIT_CALLS
60 INITCALLS
61 __initcall_end = .;
62 } 49 }
63 50
64 .con_initcall.init : { 51 .con_initcall.init : {
65 __con_initcall_start = .; 52 CON_INITCALL
66 *(.con_initcall.init)
67 __con_initcall_end = .;
68 } 53 }
69 54
70 .uml.initcall.init : { 55 .uml.initcall.init : {
@@ -118,8 +103,6 @@
118 103
119 . = ALIGN(4096); 104 . = ALIGN(4096);
120 .init.ramfs : { 105 .init.ramfs : {
121 __initramfs_start = .; 106 INIT_RAM_FS
122 *(.init.ramfs)
123 __initramfs_end = .;
124 } 107 }
125 108
diff --git a/arch/um/include/asm/hardirq.h b/arch/um/include/asm/hardirq.h
index 313ebb8a2566..fb3c05a0cbbf 100644
--- a/arch/um/include/asm/hardirq.h
+++ b/arch/um/include/asm/hardirq.h
@@ -1,25 +1 @@
1/* (c) 2004 cw@f00f.org, GPLv2 blah blah */ #include <asm-generic/hardirq.h>
2
3#ifndef __ASM_UM_HARDIRQ_H
4#define __ASM_UM_HARDIRQ_H
5
6#include <linux/threads.h>
7#include <linux/irq.h>
8
9/* NOTE: When SMP works again we might want to make this
10 * ____cacheline_aligned or maybe use per_cpu state? --cw */
11typedef struct {
12 unsigned int __softirq_pending;
13} irq_cpustat_t;
14
15#include <linux/irq_cpustat.h>
16
17/* As this would be very strange for UML to get we BUG() after the
18 * printk. */
19static inline void ack_bad_irq(unsigned int irq)
20{
21 printk(KERN_ERR "unexpected IRQ %02x\n", irq);
22 BUG();
23}
24
25#endif /* __ASM_UM_HARDIRQ_H */
diff --git a/arch/um/include/asm/mmu_context.h b/arch/um/include/asm/mmu_context.h
index 54f42e8b0105..34d813011b7a 100644
--- a/arch/um/include/asm/mmu_context.h
+++ b/arch/um/include/asm/mmu_context.h
@@ -35,8 +35,8 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
35 unsigned cpu = smp_processor_id(); 35 unsigned cpu = smp_processor_id();
36 36
37 if(prev != next){ 37 if(prev != next){
38 cpu_clear(cpu, prev->cpu_vm_mask); 38 cpumask_clear_cpu(cpu, mm_cpumask(prev));
39 cpu_set(cpu, next->cpu_vm_mask); 39 cpumask_set_cpu(cpu, mm_cpumask(next));
40 if(next != &init_mm) 40 if(next != &init_mm)
41 __switch_mm(&next->context.id); 41 __switch_mm(&next->context.id);
42 } 42 }
diff --git a/arch/um/include/asm/pci.h b/arch/um/include/asm/pci.h
index 59923199cdc3..b44cf59ede1e 100644
--- a/arch/um/include/asm/pci.h
+++ b/arch/um/include/asm/pci.h
@@ -2,6 +2,5 @@
2#define __UM_PCI_H 2#define __UM_PCI_H
3 3
4#define PCI_DMA_BUS_IS_PHYS (1) 4#define PCI_DMA_BUS_IS_PHYS (1)
5#define pcibios_scan_all_fns(a, b) 0
6 5
7#endif 6#endif
diff --git a/arch/um/include/shared/ptrace_user.h b/arch/um/include/shared/ptrace_user.h
index 4bce6e012889..7fd8539bc19a 100644
--- a/arch/um/include/shared/ptrace_user.h
+++ b/arch/um/include/shared/ptrace_user.h
@@ -29,7 +29,7 @@ extern int ptrace_setregs(long pid, unsigned long *regs_in);
29 * recompilation. So, we use PTRACE_OLDSETOPTIONS in UML. 29 * recompilation. So, we use PTRACE_OLDSETOPTIONS in UML.
30 * We also want to be able to build the kernel on 2.4, which doesn't 30 * We also want to be able to build the kernel on 2.4, which doesn't
31 * have PTRACE_OLDSETOPTIONS. So, if it is missing, we declare 31 * have PTRACE_OLDSETOPTIONS. So, if it is missing, we declare
32 * PTRACE_OLDSETOPTIONS to to be the same as PTRACE_SETOPTIONS. 32 * PTRACE_OLDSETOPTIONS to be the same as PTRACE_SETOPTIONS.
33 * 33 *
34 * On architectures, that start to support PTRACE_O_TRACESYSGOOD on 34 * On architectures, that start to support PTRACE_O_TRACESYSGOOD on
35 * linux 2.6, PTRACE_OLDSETOPTIONS never is defined, and also isn't 35 * linux 2.6, PTRACE_OLDSETOPTIONS never is defined, and also isn't
diff --git a/arch/um/kernel/Makefile b/arch/um/kernel/Makefile
index 388ec0a3ea9b..1119233597a1 100644
--- a/arch/um/kernel/Makefile
+++ b/arch/um/kernel/Makefile
@@ -3,6 +3,9 @@
3# Licensed under the GPL 3# Licensed under the GPL
4# 4#
5 5
6CPPFLAGS_vmlinux.lds := -U$(SUBARCH) -DSTART=$(LDS_START) \
7 -DELF_ARCH=$(LDS_ELF_ARCH) \
8 -DELF_FORMAT=$(LDS_ELF_FORMAT)
6extra-y := vmlinux.lds 9extra-y := vmlinux.lds
7clean-files := 10clean-files :=
8 11
diff --git a/arch/um/kernel/dyn.lds.S b/arch/um/kernel/dyn.lds.S
index 715a188c0472..7fcad58e216d 100644
--- a/arch/um/kernel/dyn.lds.S
+++ b/arch/um/kernel/dyn.lds.S
@@ -16,11 +16,7 @@ SECTIONS
16 _text = .; 16 _text = .;
17 _stext = .; 17 _stext = .;
18 __init_begin = .; 18 __init_begin = .;
19 .init.text : { 19 INIT_TEXT_SECTION(PAGE_SIZE)
20 _sinittext = .;
21 INIT_TEXT
22 _einittext = .;
23 }
24 20
25 . = ALIGN(PAGE_SIZE); 21 . = ALIGN(PAGE_SIZE);
26 22
@@ -96,8 +92,7 @@ SECTIONS
96 .init_array : { *(.init_array) } 92 .init_array : { *(.init_array) }
97 .fini_array : { *(.fini_array) } 93 .fini_array : { *(.fini_array) }
98 .data : { 94 .data : {
99 . = ALIGN(KERNEL_STACK_SIZE); /* init_task */ 95 INIT_TASK_DATA(KERNEL_STACK_SIZE)
100 *(.data.init_task)
101 . = ALIGN(KERNEL_STACK_SIZE); 96 . = ALIGN(KERNEL_STACK_SIZE);
102 *(.data.init_irqstack) 97 *(.data.init_irqstack)
103 DATA_DATA 98 DATA_DATA
diff --git a/arch/um/kernel/init_task.c b/arch/um/kernel/init_task.c
index b25121b537d8..8aa77b61a5ff 100644
--- a/arch/um/kernel/init_task.c
+++ b/arch/um/kernel/init_task.c
@@ -30,9 +30,8 @@ EXPORT_SYMBOL(init_task);
30 * "init_task" linker map entry.. 30 * "init_task" linker map entry..
31 */ 31 */
32 32
33union thread_union init_thread_union 33union thread_union init_thread_union __init_task_data =
34 __attribute__((__section__(".data.init_task"))) = 34 { INIT_THREAD_INFO(init_task) };
35 { INIT_THREAD_INFO(init_task) };
36 35
37union thread_union cpu0_irqstack 36union thread_union cpu0_irqstack
38 __attribute__((__section__(".data.init_irqstack"))) = 37 __attribute__((__section__(".data.init_irqstack"))) =
diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c
index 61d7e6138ff5..a5d5e70cf6f5 100644
--- a/arch/um/kernel/mem.c
+++ b/arch/um/kernel/mem.c
@@ -77,7 +77,7 @@ void __init mem_init(void)
77 num_physpages = totalram_pages; 77 num_physpages = totalram_pages;
78 max_pfn = totalram_pages; 78 max_pfn = totalram_pages;
79 printk(KERN_INFO "Memory: %luk available\n", 79 printk(KERN_INFO "Memory: %luk available\n",
80 (unsigned long) nr_free_pages() << (PAGE_SHIFT-10)); 80 nr_free_pages() << (PAGE_SHIFT-10));
81 kmalloc_ok = 1; 81 kmalloc_ok = 1;
82 82
83#ifdef CONFIG_HIGHMEM 83#ifdef CONFIG_HIGHMEM
diff --git a/arch/um/kernel/skas/mmu.c b/arch/um/kernel/skas/mmu.c
index 0cd9a7a05e77..8bfd1e905812 100644
--- a/arch/um/kernel/skas/mmu.c
+++ b/arch/um/kernel/skas/mmu.c
@@ -38,10 +38,10 @@ static int init_stub_pte(struct mm_struct *mm, unsigned long proc,
38 *pte = pte_mkread(*pte); 38 *pte = pte_mkread(*pte);
39 return 0; 39 return 0;
40 40
41 out_pmd:
42 pud_free(mm, pud);
43 out_pte: 41 out_pte:
44 pmd_free(mm, pmd); 42 pmd_free(mm, pmd);
43 out_pmd:
44 pud_free(mm, pud);
45 out: 45 out:
46 return -ENOMEM; 46 return -ENOMEM;
47} 47}
diff --git a/arch/um/kernel/smp.c b/arch/um/kernel/smp.c
index 98351c78bc81..106bf27e2a9a 100644
--- a/arch/um/kernel/smp.c
+++ b/arch/um/kernel/smp.c
@@ -111,7 +111,7 @@ void smp_prepare_cpus(unsigned int maxcpus)
111 int i; 111 int i;
112 112
113 for (i = 0; i < ncpus; ++i) 113 for (i = 0; i < ncpus; ++i)
114 cpu_set(i, cpu_possible_map); 114 set_cpu_possible(i, true);
115 115
116 cpu_clear(me, cpu_online_map); 116 cpu_clear(me, cpu_online_map);
117 cpu_set(me, cpu_online_map); 117 cpu_set(me, cpu_online_map);
diff --git a/arch/um/kernel/uml.lds.S b/arch/um/kernel/uml.lds.S
index 2ebd39765db8..e7a6cca667aa 100644
--- a/arch/um/kernel/uml.lds.S
+++ b/arch/um/kernel/uml.lds.S
@@ -22,11 +22,7 @@ SECTIONS
22 _text = .; 22 _text = .;
23 _stext = .; 23 _stext = .;
24 __init_begin = .; 24 __init_begin = .;
25 .init.text : { 25 INIT_TEXT_SECTION(PAGE_SIZE)
26 _sinittext = .;
27 INIT_TEXT
28 _einittext = .;
29 }
30 . = ALIGN(PAGE_SIZE); 26 . = ALIGN(PAGE_SIZE);
31 27
32 .text : 28 .text :
@@ -52,8 +48,7 @@ SECTIONS
52 init.data : { INIT_DATA } 48 init.data : { INIT_DATA }
53 .data : 49 .data :
54 { 50 {
55 . = ALIGN(KERNEL_STACK_SIZE); /* init_task */ 51 INIT_TASK_DATA(KERNEL_STACK_SIZE)
56 *(.data.init_task)
57 . = ALIGN(KERNEL_STACK_SIZE); 52 . = ALIGN(KERNEL_STACK_SIZE);
58 *(.data.init_irqstack) 53 *(.data.init_irqstack)
59 DATA_DATA 54 DATA_DATA
@@ -81,19 +76,10 @@ SECTIONS
81 _edata = .; 76 _edata = .;
82 PROVIDE (edata = .); 77 PROVIDE (edata = .);
83 . = ALIGN(PAGE_SIZE); 78 . = ALIGN(PAGE_SIZE);
84 .sbss : 79 __bss_start = .;
85 { 80 PROVIDE(_bss_start = .);
86 __bss_start = .; 81 SBSS(0)
87 PROVIDE(_bss_start = .); 82 BSS(0)
88 *(.sbss)
89 *(.scommon)
90 }
91 .bss :
92 {
93 *(.dynbss)
94 *(.bss)
95 *(COMMON)
96 }
97 _end = .; 83 _end = .;
98 PROVIDE (end = .); 84 PROVIDE (end = .);
99 85
diff --git a/arch/um/kernel/vmlinux.lds.S b/arch/um/kernel/vmlinux.lds.S
index f8aeb448aab6..16e49bfa2b42 100644
--- a/arch/um/kernel/vmlinux.lds.S
+++ b/arch/um/kernel/vmlinux.lds.S
@@ -1,3 +1,6 @@
1
2KERNEL_STACK_SIZE = 4096 * (1 << CONFIG_KERNEL_STACK_ORDER);
3
1#ifdef CONFIG_LD_SCRIPT_STATIC 4#ifdef CONFIG_LD_SCRIPT_STATIC
2#include "uml.lds.S" 5#include "uml.lds.S"
3#else 6#else
diff --git a/arch/um/os-Linux/helper.c b/arch/um/os-Linux/helper.c
index 30860b89ec58..b6b1096152aa 100644
--- a/arch/um/os-Linux/helper.c
+++ b/arch/um/os-Linux/helper.c
@@ -15,7 +15,6 @@
15#include "os.h" 15#include "os.h"
16#include "um_malloc.h" 16#include "um_malloc.h"
17#include "user.h" 17#include "user.h"
18#include <linux/limits.h>
19 18
20struct helper_data { 19struct helper_data {
21 void (*pre_exec)(void*); 20 void (*pre_exec)(void*);
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index e98e81a04971..93698794aa3a 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -24,7 +24,7 @@ config X86
24 select HAVE_UNSTABLE_SCHED_CLOCK 24 select HAVE_UNSTABLE_SCHED_CLOCK
25 select HAVE_IDE 25 select HAVE_IDE
26 select HAVE_OPROFILE 26 select HAVE_OPROFILE
27 select HAVE_PERF_COUNTERS if (!M386 && !M486) 27 select HAVE_PERF_EVENTS if (!M386 && !M486)
28 select HAVE_IOREMAP_PROT 28 select HAVE_IOREMAP_PROT
29 select HAVE_KPROBES 29 select HAVE_KPROBES
30 select ARCH_WANT_OPTIONAL_GPIOLIB 30 select ARCH_WANT_OPTIONAL_GPIOLIB
@@ -325,6 +325,7 @@ config X86_EXTENDED_PLATFORM
325 SGI 320/540 (Visual Workstation) 325 SGI 320/540 (Visual Workstation)
326 Summit/EXA (IBM x440) 326 Summit/EXA (IBM x440)
327 Unisys ES7000 IA32 series 327 Unisys ES7000 IA32 series
328 Moorestown MID devices
328 329
329 If you have one of these systems, or if you want to build a 330 If you have one of these systems, or if you want to build a
330 generic distribution kernel, say Y here - otherwise say N. 331 generic distribution kernel, say Y here - otherwise say N.
@@ -384,6 +385,18 @@ config X86_ELAN
384 385
385 If unsure, choose "PC-compatible" instead. 386 If unsure, choose "PC-compatible" instead.
386 387
388config X86_MRST
389 bool "Moorestown MID platform"
390 depends on X86_32
391 depends on X86_EXTENDED_PLATFORM
392 ---help---
393 Moorestown is Intel's Low Power Intel Architecture (LPIA) based Moblin
394 Internet Device(MID) platform. Moorestown consists of two chips:
395 Lincroft (CPU core, graphics, and memory controller) and Langwell IOH.
396 Unlike standard x86 PCs, Moorestown does not have many legacy devices
397 nor standard legacy replacement devices/features. e.g. Moorestown does
398 not contain i8259, i8254, HPET, legacy BIOS, most of the io ports.
399
387config X86_RDC321X 400config X86_RDC321X
388 bool "RDC R-321x SoC" 401 bool "RDC R-321x SoC"
389 depends on X86_32 402 depends on X86_32
@@ -783,41 +796,17 @@ config X86_REROUTE_FOR_BROKEN_BOOT_IRQS
783 increased on these systems. 796 increased on these systems.
784 797
785config X86_MCE 798config X86_MCE
786 bool "Machine Check Exception" 799 bool "Machine Check / overheating reporting"
787 ---help--- 800 ---help---
788 Machine Check Exception support allows the processor to notify the 801 Machine Check support allows the processor to notify the
789 kernel if it detects a problem (e.g. overheating, component failure). 802 kernel if it detects a problem (e.g. overheating, data corruption).
790 The action the kernel takes depends on the severity of the problem, 803 The action the kernel takes depends on the severity of the problem,
791 ranging from a warning message on the console, to halting the machine. 804 ranging from warning messages to halting the machine.
792 Your processor must be a Pentium or newer to support this - check the
793 flags in /proc/cpuinfo for mce. Note that some older Pentium systems
794 have a design flaw which leads to false MCE events - hence MCE is
795 disabled on all P5 processors, unless explicitly enabled with "mce"
796 as a boot argument. Similarly, if MCE is built in and creates a
797 problem on some new non-standard machine, you can boot with "nomce"
798 to disable it. MCE support simply ignores non-MCE processors like
799 the 386 and 486, so nearly everyone can say Y here.
800
801config X86_OLD_MCE
802 depends on X86_32 && X86_MCE
803 bool "Use legacy machine check code (will go away)"
804 default n
805 select X86_ANCIENT_MCE
806 ---help---
807 Use the old i386 machine check code. This is merely intended for
808 testing in a transition period. Try this if you run into any machine
809 check related software problems, but report the problem to
810 linux-kernel. When in doubt say no.
811
812config X86_NEW_MCE
813 depends on X86_MCE
814 bool
815 default y if (!X86_OLD_MCE && X86_32) || X86_64
816 805
817config X86_MCE_INTEL 806config X86_MCE_INTEL
818 def_bool y 807 def_bool y
819 prompt "Intel MCE features" 808 prompt "Intel MCE features"
820 depends on X86_NEW_MCE && X86_LOCAL_APIC 809 depends on X86_MCE && X86_LOCAL_APIC
821 ---help--- 810 ---help---
822 Additional support for intel specific MCE features such as 811 Additional support for intel specific MCE features such as
823 the thermal monitor. 812 the thermal monitor.
@@ -825,14 +814,14 @@ config X86_MCE_INTEL
825config X86_MCE_AMD 814config X86_MCE_AMD
826 def_bool y 815 def_bool y
827 prompt "AMD MCE features" 816 prompt "AMD MCE features"
828 depends on X86_NEW_MCE && X86_LOCAL_APIC 817 depends on X86_MCE && X86_LOCAL_APIC
829 ---help--- 818 ---help---
830 Additional support for AMD specific MCE features such as 819 Additional support for AMD specific MCE features such as
831 the DRAM Error Threshold. 820 the DRAM Error Threshold.
832 821
833config X86_ANCIENT_MCE 822config X86_ANCIENT_MCE
834 def_bool n 823 def_bool n
835 depends on X86_32 824 depends on X86_32 && X86_MCE
836 prompt "Support for old Pentium 5 / WinChip machine checks" 825 prompt "Support for old Pentium 5 / WinChip machine checks"
837 ---help--- 826 ---help---
838 Include support for machine check handling on old Pentium 5 or WinChip 827 Include support for machine check handling on old Pentium 5 or WinChip
@@ -845,36 +834,16 @@ config X86_MCE_THRESHOLD
845 default y 834 default y
846 835
847config X86_MCE_INJECT 836config X86_MCE_INJECT
848 depends on X86_NEW_MCE 837 depends on X86_MCE
849 tristate "Machine check injector support" 838 tristate "Machine check injector support"
850 ---help--- 839 ---help---
851 Provide support for injecting machine checks for testing purposes. 840 Provide support for injecting machine checks for testing purposes.
852 If you don't know what a machine check is and you don't do kernel 841 If you don't know what a machine check is and you don't do kernel
853 QA it is safe to say n. 842 QA it is safe to say n.
854 843
855config X86_MCE_NONFATAL
856 tristate "Check for non-fatal errors on AMD Athlon/Duron / Intel Pentium 4"
857 depends on X86_OLD_MCE
858 ---help---
859 Enabling this feature starts a timer that triggers every 5 seconds which
860 will look at the machine check registers to see if anything happened.
861 Non-fatal problems automatically get corrected (but still logged).
862 Disable this if you don't want to see these messages.
863 Seeing the messages this option prints out may be indicative of dying
864 or out-of-spec (ie, overclocked) hardware.
865 This option only does something on certain CPUs.
866 (AMD Athlon/Duron and Intel Pentium 4)
867
868config X86_MCE_P4THERMAL
869 bool "check for P4 thermal throttling interrupt."
870 depends on X86_OLD_MCE && X86_MCE && (X86_UP_APIC || SMP)
871 ---help---
872 Enabling this feature will cause a message to be printed when the P4
873 enters thermal throttling.
874
875config X86_THERMAL_VECTOR 844config X86_THERMAL_VECTOR
876 def_bool y 845 def_bool y
877 depends on X86_MCE_P4THERMAL || X86_MCE_INTEL 846 depends on X86_MCE_INTEL
878 847
879config VM86 848config VM86
880 bool "Enable VM86 support" if EMBEDDED 849 bool "Enable VM86 support" if EMBEDDED
@@ -1235,6 +1204,10 @@ config ARCH_DISCONTIGMEM_DEFAULT
1235 def_bool y 1204 def_bool y
1236 depends on NUMA && X86_32 1205 depends on NUMA && X86_32
1237 1206
1207config ARCH_PROC_KCORE_TEXT
1208 def_bool y
1209 depends on X86_64 && PROC_KCORE
1210
1238config ARCH_SPARSEMEM_DEFAULT 1211config ARCH_SPARSEMEM_DEFAULT
1239 def_bool y 1212 def_bool y
1240 depends on X86_64 1213 depends on X86_64
@@ -1693,6 +1666,8 @@ source "kernel/power/Kconfig"
1693 1666
1694source "drivers/acpi/Kconfig" 1667source "drivers/acpi/Kconfig"
1695 1668
1669source "drivers/sfi/Kconfig"
1670
1696config X86_APM_BOOT 1671config X86_APM_BOOT
1697 bool 1672 bool
1698 default y 1673 default y
@@ -1888,7 +1863,7 @@ config PCI_DIRECT
1888 1863
1889config PCI_MMCONFIG 1864config PCI_MMCONFIG
1890 def_bool y 1865 def_bool y
1891 depends on X86_32 && PCI && ACPI && (PCI_GOMMCONFIG || PCI_GOANY) 1866 depends on X86_32 && PCI && (ACPI || SFI) && (PCI_GOMMCONFIG || PCI_GOANY)
1892 1867
1893config PCI_OLPC 1868config PCI_OLPC
1894 def_bool y 1869 def_bool y
@@ -1926,7 +1901,7 @@ config DMAR_DEFAULT_ON
1926config DMAR_BROKEN_GFX_WA 1901config DMAR_BROKEN_GFX_WA
1927 def_bool n 1902 def_bool n
1928 prompt "Workaround broken graphics drivers (going away soon)" 1903 prompt "Workaround broken graphics drivers (going away soon)"
1929 depends on DMAR 1904 depends on DMAR && BROKEN
1930 ---help--- 1905 ---help---
1931 Current Graphics drivers tend to use physical address 1906 Current Graphics drivers tend to use physical address
1932 for DMA and avoid using DMA APIs. Setting this config 1907 for DMA and avoid using DMA APIs. Setting this config
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 7983c420eaf2..a012ee8ef803 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -179,8 +179,8 @@ archclean:
179define archhelp 179define archhelp
180 echo '* bzImage - Compressed kernel image (arch/x86/boot/bzImage)' 180 echo '* bzImage - Compressed kernel image (arch/x86/boot/bzImage)'
181 echo ' install - Install kernel using' 181 echo ' install - Install kernel using'
182 echo ' (your) ~/bin/installkernel or' 182 echo ' (your) ~/bin/$(INSTALLKERNEL) or'
183 echo ' (distribution) /sbin/installkernel or' 183 echo ' (distribution) /sbin/$(INSTALLKERNEL) or'
184 echo ' install to $$(INSTALL_PATH) and run lilo' 184 echo ' install to $$(INSTALL_PATH) and run lilo'
185 echo ' fdimage - Create 1.4MB boot floppy image (arch/x86/boot/fdimage)' 185 echo ' fdimage - Create 1.4MB boot floppy image (arch/x86/boot/fdimage)'
186 echo ' fdimage144 - Create 1.4MB boot floppy image (arch/x86/boot/fdimage)' 186 echo ' fdimage144 - Create 1.4MB boot floppy image (arch/x86/boot/fdimage)'
diff --git a/arch/x86/boot/install.sh b/arch/x86/boot/install.sh
index 8d60ee15dfd9..d13ec1c38640 100644
--- a/arch/x86/boot/install.sh
+++ b/arch/x86/boot/install.sh
@@ -33,8 +33,8 @@ verify "$3"
33 33
34# User may have a custom install script 34# User may have a custom install script
35 35
36if [ -x ~/bin/${CROSS_COMPILE}installkernel ]; then exec ~/bin/${CROSS_COMPILE}installkernel "$@"; fi 36if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi
37if [ -x /sbin/${CROSS_COMPILE}installkernel ]; then exec /sbin/${CROSS_COMPILE}installkernel "$@"; fi 37if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi
38 38
39# Default install - same as make zlilo 39# Default install - same as make zlilo
40 40
diff --git a/arch/x86/ia32/ia32entry.S b/arch/x86/ia32/ia32entry.S
index ba331bfd1112..74619c4f9fda 100644
--- a/arch/x86/ia32/ia32entry.S
+++ b/arch/x86/ia32/ia32entry.S
@@ -831,5 +831,5 @@ ia32_sys_call_table:
831 .quad compat_sys_preadv 831 .quad compat_sys_preadv
832 .quad compat_sys_pwritev 832 .quad compat_sys_pwritev
833 .quad compat_sys_rt_tgsigqueueinfo /* 335 */ 833 .quad compat_sys_rt_tgsigqueueinfo /* 335 */
834 .quad sys_perf_counter_open 834 .quad sys_perf_event_open
835ia32_syscall_end: 835ia32_syscall_end:
diff --git a/arch/x86/include/asm/acpi.h b/arch/x86/include/asm/acpi.h
index 20d1465a2ab0..4518dc500903 100644
--- a/arch/x86/include/asm/acpi.h
+++ b/arch/x86/include/asm/acpi.h
@@ -144,7 +144,6 @@ static inline unsigned int acpi_processor_cstate_check(unsigned int max_cstate)
144 144
145#else /* !CONFIG_ACPI */ 145#else /* !CONFIG_ACPI */
146 146
147#define acpi_disabled 1
148#define acpi_lapic 0 147#define acpi_lapic 0
149#define acpi_ioapic 0 148#define acpi_ioapic 0
150static inline void acpi_noirq_set(void) { } 149static inline void acpi_noirq_set(void) { }
diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h
index 586b7adb8e53..474d80d3e6cc 100644
--- a/arch/x86/include/asm/apic.h
+++ b/arch/x86/include/asm/apic.h
@@ -66,13 +66,23 @@ static inline void default_inquire_remote_apic(int apicid)
66} 66}
67 67
68/* 68/*
69 * With 82489DX we can't rely on apic feature bit
70 * retrieved via cpuid but still have to deal with
71 * such an apic chip so we assume that SMP configuration
72 * is found from MP table (64bit case uses ACPI mostly
73 * which set smp presence flag as well so we are safe
74 * to use this helper too).
75 */
76static inline bool apic_from_smp_config(void)
77{
78 return smp_found_config && !disable_apic;
79}
80
81/*
69 * Basic functions accessing APICs. 82 * Basic functions accessing APICs.
70 */ 83 */
71#ifdef CONFIG_PARAVIRT 84#ifdef CONFIG_PARAVIRT
72#include <asm/paravirt.h> 85#include <asm/paravirt.h>
73#else
74#define setup_boot_clock setup_boot_APIC_clock
75#define setup_secondary_clock setup_secondary_APIC_clock
76#endif 86#endif
77 87
78#ifdef CONFIG_X86_64 88#ifdef CONFIG_X86_64
@@ -252,6 +262,8 @@ static inline void lapic_shutdown(void) { }
252static inline void init_apic_mappings(void) { } 262static inline void init_apic_mappings(void) { }
253static inline void disable_local_APIC(void) { } 263static inline void disable_local_APIC(void) { }
254static inline void apic_disable(void) { } 264static inline void apic_disable(void) { }
265# define setup_boot_APIC_clock x86_init_noop
266# define setup_secondary_APIC_clock x86_init_noop
255#endif /* !CONFIG_X86_LOCAL_APIC */ 267#endif /* !CONFIG_X86_LOCAL_APIC */
256 268
257#ifdef CONFIG_X86_64 269#ifdef CONFIG_X86_64
@@ -300,7 +312,7 @@ struct apic {
300 int (*cpu_present_to_apicid)(int mps_cpu); 312 int (*cpu_present_to_apicid)(int mps_cpu);
301 physid_mask_t (*apicid_to_cpu_present)(int phys_apicid); 313 physid_mask_t (*apicid_to_cpu_present)(int phys_apicid);
302 void (*setup_portio_remap)(void); 314 void (*setup_portio_remap)(void);
303 int (*check_phys_apicid_present)(int boot_cpu_physical_apicid); 315 int (*check_phys_apicid_present)(int phys_apicid);
304 void (*enable_apic_mode)(void); 316 void (*enable_apic_mode)(void);
305 int (*phys_pkg_id)(int cpuid_apic, int index_msb); 317 int (*phys_pkg_id)(int cpuid_apic, int index_msb);
306 318
@@ -434,7 +446,7 @@ extern struct apic apic_x2apic_uv_x;
434DECLARE_PER_CPU(int, x2apic_extra_bits); 446DECLARE_PER_CPU(int, x2apic_extra_bits);
435 447
436extern int default_cpu_present_to_apicid(int mps_cpu); 448extern int default_cpu_present_to_apicid(int mps_cpu);
437extern int default_check_phys_apicid_present(int boot_cpu_physical_apicid); 449extern int default_check_phys_apicid_present(int phys_apicid);
438#endif 450#endif
439 451
440static inline void default_wait_for_init_deassert(atomic_t *deassert) 452static inline void default_wait_for_init_deassert(atomic_t *deassert)
@@ -550,9 +562,9 @@ static inline int __default_cpu_present_to_apicid(int mps_cpu)
550} 562}
551 563
552static inline int 564static inline int
553__default_check_phys_apicid_present(int boot_cpu_physical_apicid) 565__default_check_phys_apicid_present(int phys_apicid)
554{ 566{
555 return physid_isset(boot_cpu_physical_apicid, phys_cpu_present_map); 567 return physid_isset(phys_apicid, phys_cpu_present_map);
556} 568}
557 569
558#ifdef CONFIG_X86_32 570#ifdef CONFIG_X86_32
@@ -562,13 +574,13 @@ static inline int default_cpu_present_to_apicid(int mps_cpu)
562} 574}
563 575
564static inline int 576static inline int
565default_check_phys_apicid_present(int boot_cpu_physical_apicid) 577default_check_phys_apicid_present(int phys_apicid)
566{ 578{
567 return __default_check_phys_apicid_present(boot_cpu_physical_apicid); 579 return __default_check_phys_apicid_present(phys_apicid);
568} 580}
569#else 581#else
570extern int default_cpu_present_to_apicid(int mps_cpu); 582extern int default_cpu_present_to_apicid(int mps_cpu);
571extern int default_check_phys_apicid_present(int boot_cpu_physical_apicid); 583extern int default_check_phys_apicid_present(int phys_apicid);
572#endif 584#endif
573 585
574static inline physid_mask_t default_apicid_to_cpu_present(int phys_apicid) 586static inline physid_mask_t default_apicid_to_cpu_present(int phys_apicid)
diff --git a/arch/x86/include/asm/bootparam.h b/arch/x86/include/asm/bootparam.h
index 6ca20218dd72..6be33d83c716 100644
--- a/arch/x86/include/asm/bootparam.h
+++ b/arch/x86/include/asm/bootparam.h
@@ -110,4 +110,14 @@ struct boot_params {
110 __u8 _pad9[276]; /* 0xeec */ 110 __u8 _pad9[276]; /* 0xeec */
111} __attribute__((packed)); 111} __attribute__((packed));
112 112
113enum {
114 X86_SUBARCH_PC = 0,
115 X86_SUBARCH_LGUEST,
116 X86_SUBARCH_XEN,
117 X86_SUBARCH_MRST,
118 X86_NR_SUBARCHS,
119};
120
121
122
113#endif /* _ASM_X86_BOOTPARAM_H */ 123#endif /* _ASM_X86_BOOTPARAM_H */
diff --git a/arch/x86/include/asm/cache.h b/arch/x86/include/asm/cache.h
index 5d367caa0e36..549860d3be8f 100644
--- a/arch/x86/include/asm/cache.h
+++ b/arch/x86/include/asm/cache.h
@@ -1,6 +1,8 @@
1#ifndef _ASM_X86_CACHE_H 1#ifndef _ASM_X86_CACHE_H
2#define _ASM_X86_CACHE_H 2#define _ASM_X86_CACHE_H
3 3
4#include <linux/linkage.h>
5
4/* L1 cache line size */ 6/* L1 cache line size */
5#define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT) 7#define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT)
6#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) 8#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
@@ -13,7 +15,7 @@
13#ifdef CONFIG_SMP 15#ifdef CONFIG_SMP
14#define __cacheline_aligned_in_smp \ 16#define __cacheline_aligned_in_smp \
15 __attribute__((__aligned__(1 << (INTERNODE_CACHE_SHIFT)))) \ 17 __attribute__((__aligned__(1 << (INTERNODE_CACHE_SHIFT)))) \
16 __attribute__((__section__(".data.page_aligned"))) 18 __page_aligned_data
17#endif 19#endif
18#endif 20#endif
19 21
diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h
index 847fee6493a2..9cfc88b97742 100644
--- a/arch/x86/include/asm/cpufeature.h
+++ b/arch/x86/include/asm/cpufeature.h
@@ -96,6 +96,7 @@
96#define X86_FEATURE_CLFLUSH_MONITOR (3*32+25) /* "" clflush reqd with monitor */ 96#define X86_FEATURE_CLFLUSH_MONITOR (3*32+25) /* "" clflush reqd with monitor */
97#define X86_FEATURE_EXTD_APICID (3*32+26) /* has extended APICID (8 bits) */ 97#define X86_FEATURE_EXTD_APICID (3*32+26) /* has extended APICID (8 bits) */
98#define X86_FEATURE_AMD_DCM (3*32+27) /* multi-node processor */ 98#define X86_FEATURE_AMD_DCM (3*32+27) /* multi-node processor */
99#define X86_FEATURE_APERFMPERF (3*32+28) /* APERFMPERF */
99 100
100/* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */ 101/* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */
101#define X86_FEATURE_XMM3 (4*32+ 0) /* "pni" SSE-3 */ 102#define X86_FEATURE_XMM3 (4*32+ 0) /* "pni" SSE-3 */
diff --git a/arch/x86/include/asm/do_timer.h b/arch/x86/include/asm/do_timer.h
deleted file mode 100644
index 23ecda0b28a0..000000000000
--- a/arch/x86/include/asm/do_timer.h
+++ /dev/null
@@ -1,16 +0,0 @@
1/* defines for inline arch setup functions */
2#include <linux/clockchips.h>
3
4#include <asm/i8259.h>
5#include <asm/i8253.h>
6
7/**
8 * do_timer_interrupt_hook - hook into timer tick
9 *
10 * Call the pit clock event handler. see asm/i8253.h
11 **/
12
13static inline void do_timer_interrupt_hook(void)
14{
15 global_clock_event->event_handler(global_clock_event);
16}
diff --git a/arch/x86/include/asm/e820.h b/arch/x86/include/asm/e820.h
index 7ecba4d85089..40b4e614fe71 100644
--- a/arch/x86/include/asm/e820.h
+++ b/arch/x86/include/asm/e820.h
@@ -126,8 +126,6 @@ extern void e820_reserve_resources(void);
126extern void e820_reserve_resources_late(void); 126extern void e820_reserve_resources_late(void);
127extern void setup_memory_map(void); 127extern void setup_memory_map(void);
128extern char *default_machine_specific_memory_setup(void); 128extern char *default_machine_specific_memory_setup(void);
129extern char *machine_specific_memory_setup(void);
130extern char *memory_setup(void);
131#endif /* __KERNEL__ */ 129#endif /* __KERNEL__ */
132#endif /* __ASSEMBLY__ */ 130#endif /* __ASSEMBLY__ */
133 131
diff --git a/arch/x86/include/asm/elf.h b/arch/x86/include/asm/elf.h
index 83c1bc8d2e8a..456a304b8172 100644
--- a/arch/x86/include/asm/elf.h
+++ b/arch/x86/include/asm/elf.h
@@ -299,6 +299,8 @@ do { \
299 299
300#ifdef CONFIG_X86_32 300#ifdef CONFIG_X86_32
301 301
302#define STACK_RND_MASK (0x7ff)
303
302#define VDSO_HIGH_BASE (__fix_to_virt(FIX_VDSO)) 304#define VDSO_HIGH_BASE (__fix_to_virt(FIX_VDSO))
303 305
304#define ARCH_DLINFO ARCH_DLINFO_IA32(vdso_enabled) 306#define ARCH_DLINFO ARCH_DLINFO_IA32(vdso_enabled)
diff --git a/arch/x86/include/asm/entry_arch.h b/arch/x86/include/asm/entry_arch.h
index ff8cbfa07851..f5693c81a1db 100644
--- a/arch/x86/include/asm/entry_arch.h
+++ b/arch/x86/include/asm/entry_arch.h
@@ -49,7 +49,7 @@ BUILD_INTERRUPT(apic_timer_interrupt,LOCAL_TIMER_VECTOR)
49BUILD_INTERRUPT(error_interrupt,ERROR_APIC_VECTOR) 49BUILD_INTERRUPT(error_interrupt,ERROR_APIC_VECTOR)
50BUILD_INTERRUPT(spurious_interrupt,SPURIOUS_APIC_VECTOR) 50BUILD_INTERRUPT(spurious_interrupt,SPURIOUS_APIC_VECTOR)
51 51
52#ifdef CONFIG_PERF_COUNTERS 52#ifdef CONFIG_PERF_EVENTS
53BUILD_INTERRUPT(perf_pending_interrupt, LOCAL_PENDING_VECTOR) 53BUILD_INTERRUPT(perf_pending_interrupt, LOCAL_PENDING_VECTOR)
54#endif 54#endif
55 55
@@ -61,7 +61,7 @@ BUILD_INTERRUPT(thermal_interrupt,THERMAL_APIC_VECTOR)
61BUILD_INTERRUPT(threshold_interrupt,THRESHOLD_APIC_VECTOR) 61BUILD_INTERRUPT(threshold_interrupt,THRESHOLD_APIC_VECTOR)
62#endif 62#endif
63 63
64#ifdef CONFIG_X86_NEW_MCE 64#ifdef CONFIG_X86_MCE
65BUILD_INTERRUPT(mce_self_interrupt,MCE_SELF_VECTOR) 65BUILD_INTERRUPT(mce_self_interrupt,MCE_SELF_VECTOR)
66#endif 66#endif
67 67
diff --git a/arch/x86/include/asm/hypervisor.h b/arch/x86/include/asm/hypervisor.h
index 369f5c5d09a1..b78c0941e422 100644
--- a/arch/x86/include/asm/hypervisor.h
+++ b/arch/x86/include/asm/hypervisor.h
@@ -20,7 +20,7 @@
20#ifndef ASM_X86__HYPERVISOR_H 20#ifndef ASM_X86__HYPERVISOR_H
21#define ASM_X86__HYPERVISOR_H 21#define ASM_X86__HYPERVISOR_H
22 22
23extern unsigned long get_hypervisor_tsc_freq(void);
24extern void init_hypervisor(struct cpuinfo_x86 *c); 23extern void init_hypervisor(struct cpuinfo_x86 *c);
24extern void init_hypervisor_platform(void);
25 25
26#endif 26#endif
diff --git a/arch/x86/include/asm/io_apic.h b/arch/x86/include/asm/io_apic.h
index 85232d32fcb8..7c7c16cde1f8 100644
--- a/arch/x86/include/asm/io_apic.h
+++ b/arch/x86/include/asm/io_apic.h
@@ -143,6 +143,8 @@ extern int noioapicreroute;
143/* 1 if the timer IRQ uses the '8259A Virtual Wire' mode */ 143/* 1 if the timer IRQ uses the '8259A Virtual Wire' mode */
144extern int timer_through_8259; 144extern int timer_through_8259;
145 145
146extern void io_apic_disable_legacy(void);
147
146/* 148/*
147 * If we use the IO-APIC for IRQ routing, disable automatic 149 * If we use the IO-APIC for IRQ routing, disable automatic
148 * assignment of PCI IRQ's. 150 * assignment of PCI IRQ's.
@@ -176,6 +178,7 @@ extern int setup_ioapic_entry(int apic, int irq,
176 int polarity, int vector, int pin); 178 int polarity, int vector, int pin);
177extern void ioapic_write_entry(int apic, int pin, 179extern void ioapic_write_entry(int apic, int pin,
178 struct IO_APIC_route_entry e); 180 struct IO_APIC_route_entry e);
181extern void setup_ioapic_ids_from_mpc(void);
179 182
180struct mp_ioapic_gsi{ 183struct mp_ioapic_gsi{
181 int gsi_base; 184 int gsi_base;
@@ -187,12 +190,14 @@ int mp_find_ioapic_pin(int ioapic, int gsi);
187void __init mp_register_ioapic(int id, u32 address, u32 gsi_base); 190void __init mp_register_ioapic(int id, u32 address, u32 gsi_base);
188 191
189#else /* !CONFIG_X86_IO_APIC */ 192#else /* !CONFIG_X86_IO_APIC */
193
190#define io_apic_assign_pci_irqs 0 194#define io_apic_assign_pci_irqs 0
195#define setup_ioapic_ids_from_mpc x86_init_noop
191static const int timer_through_8259 = 0; 196static const int timer_through_8259 = 0;
192static inline void ioapic_init_mappings(void) { } 197static inline void ioapic_init_mappings(void) { }
193static inline void ioapic_insert_resources(void) { } 198static inline void ioapic_insert_resources(void) { }
194
195static inline void probe_nr_irqs_gsi(void) { } 199static inline void probe_nr_irqs_gsi(void) { }
200
196#endif 201#endif
197 202
198#endif /* _ASM_X86_IO_APIC_H */ 203#endif /* _ASM_X86_IO_APIC_H */
diff --git a/arch/x86/include/asm/irq.h b/arch/x86/include/asm/irq.h
index f38481bcd455..ddda6cbed6f4 100644
--- a/arch/x86/include/asm/irq.h
+++ b/arch/x86/include/asm/irq.h
@@ -37,7 +37,6 @@ extern void fixup_irqs(void);
37#endif 37#endif
38 38
39extern void (*generic_interrupt_extension)(void); 39extern void (*generic_interrupt_extension)(void);
40extern void init_IRQ(void);
41extern void native_init_IRQ(void); 40extern void native_init_IRQ(void);
42extern bool handle_irq(unsigned irq, struct pt_regs *regs); 41extern bool handle_irq(unsigned irq, struct pt_regs *regs);
43 42
@@ -47,4 +46,6 @@ extern unsigned int do_IRQ(struct pt_regs *regs);
47extern DECLARE_BITMAP(used_vectors, NR_VECTORS); 46extern DECLARE_BITMAP(used_vectors, NR_VECTORS);
48extern int vector_used_by_percpu_irq(unsigned int vector); 47extern int vector_used_by_percpu_irq(unsigned int vector);
49 48
49extern void init_ISA_irqs(void);
50
50#endif /* _ASM_X86_IRQ_H */ 51#endif /* _ASM_X86_IRQ_H */
diff --git a/arch/x86/include/asm/mce.h b/arch/x86/include/asm/mce.h
index 5cdd8d100ec9..b608a64c5814 100644
--- a/arch/x86/include/asm/mce.h
+++ b/arch/x86/include/asm/mce.h
@@ -9,7 +9,7 @@
9 */ 9 */
10 10
11#define MCG_BANKCNT_MASK 0xff /* Number of Banks */ 11#define MCG_BANKCNT_MASK 0xff /* Number of Banks */
12#define MCG_CTL_P (1ULL<<8) /* MCG_CAP register available */ 12#define MCG_CTL_P (1ULL<<8) /* MCG_CTL register available */
13#define MCG_EXT_P (1ULL<<9) /* Extended registers available */ 13#define MCG_EXT_P (1ULL<<9) /* Extended registers available */
14#define MCG_CMCI_P (1ULL<<10) /* CMCI supported */ 14#define MCG_CMCI_P (1ULL<<10) /* CMCI supported */
15#define MCG_EXT_CNT_MASK 0xff0000 /* Number of Extended registers */ 15#define MCG_EXT_CNT_MASK 0xff0000 /* Number of Extended registers */
@@ -38,6 +38,14 @@
38#define MCM_ADDR_MEM 3 /* memory address */ 38#define MCM_ADDR_MEM 3 /* memory address */
39#define MCM_ADDR_GENERIC 7 /* generic */ 39#define MCM_ADDR_GENERIC 7 /* generic */
40 40
41#define MCJ_CTX_MASK 3
42#define MCJ_CTX(flags) ((flags) & MCJ_CTX_MASK)
43#define MCJ_CTX_RANDOM 0 /* inject context: random */
44#define MCJ_CTX_PROCESS 1 /* inject context: process */
45#define MCJ_CTX_IRQ 2 /* inject context: IRQ */
46#define MCJ_NMI_BROADCAST 4 /* do NMI broadcasting */
47#define MCJ_EXCEPTION 8 /* raise as exception */
48
41/* Fields are zero when not available */ 49/* Fields are zero when not available */
42struct mce { 50struct mce {
43 __u64 status; 51 __u64 status;
@@ -48,8 +56,8 @@ struct mce {
48 __u64 tsc; /* cpu time stamp counter */ 56 __u64 tsc; /* cpu time stamp counter */
49 __u64 time; /* wall time_t when error was detected */ 57 __u64 time; /* wall time_t when error was detected */
50 __u8 cpuvendor; /* cpu vendor as encoded in system.h */ 58 __u8 cpuvendor; /* cpu vendor as encoded in system.h */
51 __u8 pad1; 59 __u8 inject_flags; /* software inject flags */
52 __u16 pad2; 60 __u16 pad;
53 __u32 cpuid; /* CPUID 1 EAX */ 61 __u32 cpuid; /* CPUID 1 EAX */
54 __u8 cs; /* code segment */ 62 __u8 cs; /* code segment */
55 __u8 bank; /* machine check bank */ 63 __u8 bank; /* machine check bank */
@@ -115,13 +123,6 @@ void mcheck_init(struct cpuinfo_x86 *c);
115static inline void mcheck_init(struct cpuinfo_x86 *c) {} 123static inline void mcheck_init(struct cpuinfo_x86 *c) {}
116#endif 124#endif
117 125
118#ifdef CONFIG_X86_OLD_MCE
119extern int nr_mce_banks;
120void amd_mcheck_init(struct cpuinfo_x86 *c);
121void intel_p4_mcheck_init(struct cpuinfo_x86 *c);
122void intel_p6_mcheck_init(struct cpuinfo_x86 *c);
123#endif
124
125#ifdef CONFIG_X86_ANCIENT_MCE 126#ifdef CONFIG_X86_ANCIENT_MCE
126void intel_p5_mcheck_init(struct cpuinfo_x86 *c); 127void intel_p5_mcheck_init(struct cpuinfo_x86 *c);
127void winchip_mcheck_init(struct cpuinfo_x86 *c); 128void winchip_mcheck_init(struct cpuinfo_x86 *c);
@@ -137,10 +138,11 @@ void mce_log(struct mce *m);
137DECLARE_PER_CPU(struct sys_device, mce_dev); 138DECLARE_PER_CPU(struct sys_device, mce_dev);
138 139
139/* 140/*
140 * To support more than 128 would need to escape the predefined 141 * Maximum banks number.
141 * Linux defined extended banks first. 142 * This is the limit of the current register layout on
143 * Intel CPUs.
142 */ 144 */
143#define MAX_NR_BANKS (MCE_EXTENDED_BANK - 1) 145#define MAX_NR_BANKS 32
144 146
145#ifdef CONFIG_X86_MCE_INTEL 147#ifdef CONFIG_X86_MCE_INTEL
146extern int mce_cmci_disabled; 148extern int mce_cmci_disabled;
@@ -208,11 +210,7 @@ extern void (*threshold_cpu_callback)(unsigned long action, unsigned int cpu);
208 210
209void intel_init_thermal(struct cpuinfo_x86 *c); 211void intel_init_thermal(struct cpuinfo_x86 *c);
210 212
211#ifdef CONFIG_X86_NEW_MCE
212void mce_log_therm_throt_event(__u64 status); 213void mce_log_therm_throt_event(__u64 status);
213#else
214static inline void mce_log_therm_throt_event(__u64 status) {}
215#endif
216 214
217#endif /* __KERNEL__ */ 215#endif /* __KERNEL__ */
218#endif /* _ASM_X86_MCE_H */ 216#endif /* _ASM_X86_MCE_H */
diff --git a/arch/x86/include/asm/mmu_context.h b/arch/x86/include/asm/mmu_context.h
index f923203dc39a..4a2d4e0c18d9 100644
--- a/arch/x86/include/asm/mmu_context.h
+++ b/arch/x86/include/asm/mmu_context.h
@@ -37,12 +37,12 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
37 37
38 if (likely(prev != next)) { 38 if (likely(prev != next)) {
39 /* stop flush ipis for the previous mm */ 39 /* stop flush ipis for the previous mm */
40 cpu_clear(cpu, prev->cpu_vm_mask); 40 cpumask_clear_cpu(cpu, mm_cpumask(prev));
41#ifdef CONFIG_SMP 41#ifdef CONFIG_SMP
42 percpu_write(cpu_tlbstate.state, TLBSTATE_OK); 42 percpu_write(cpu_tlbstate.state, TLBSTATE_OK);
43 percpu_write(cpu_tlbstate.active_mm, next); 43 percpu_write(cpu_tlbstate.active_mm, next);
44#endif 44#endif
45 cpu_set(cpu, next->cpu_vm_mask); 45 cpumask_set_cpu(cpu, mm_cpumask(next));
46 46
47 /* Re-load page tables */ 47 /* Re-load page tables */
48 load_cr3(next->pgd); 48 load_cr3(next->pgd);
@@ -58,7 +58,7 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
58 percpu_write(cpu_tlbstate.state, TLBSTATE_OK); 58 percpu_write(cpu_tlbstate.state, TLBSTATE_OK);
59 BUG_ON(percpu_read(cpu_tlbstate.active_mm) != next); 59 BUG_ON(percpu_read(cpu_tlbstate.active_mm) != next);
60 60
61 if (!cpu_test_and_set(cpu, next->cpu_vm_mask)) { 61 if (!cpumask_test_and_set_cpu(cpu, mm_cpumask(next))) {
62 /* We were in lazy tlb mode and leave_mm disabled 62 /* We were in lazy tlb mode and leave_mm disabled
63 * tlb flush IPI delivery. We must reload CR3 63 * tlb flush IPI delivery. We must reload CR3
64 * to make sure to use no freed page tables. 64 * to make sure to use no freed page tables.
diff --git a/arch/x86/include/asm/mpspec.h b/arch/x86/include/asm/mpspec.h
index e2a1bb6d71ea..79c94500c0bb 100644
--- a/arch/x86/include/asm/mpspec.h
+++ b/arch/x86/include/asm/mpspec.h
@@ -4,6 +4,7 @@
4#include <linux/init.h> 4#include <linux/init.h>
5 5
6#include <asm/mpspec_def.h> 6#include <asm/mpspec_def.h>
7#include <asm/x86_init.h>
7 8
8extern int apic_version[MAX_APICS]; 9extern int apic_version[MAX_APICS];
9extern int pic_mode; 10extern int pic_mode;
@@ -41,9 +42,6 @@ extern int quad_local_to_mp_bus_id [NR_CPUS/4][4];
41 42
42#endif /* CONFIG_X86_64 */ 43#endif /* CONFIG_X86_64 */
43 44
44extern void early_find_smp_config(void);
45extern void early_get_smp_config(void);
46
47#if defined(CONFIG_MCA) || defined(CONFIG_EISA) 45#if defined(CONFIG_MCA) || defined(CONFIG_EISA)
48extern int mp_bus_id_to_type[MAX_MP_BUSSES]; 46extern int mp_bus_id_to_type[MAX_MP_BUSSES];
49#endif 47#endif
@@ -52,20 +50,55 @@ extern DECLARE_BITMAP(mp_bus_not_pci, MAX_MP_BUSSES);
52 50
53extern unsigned int boot_cpu_physical_apicid; 51extern unsigned int boot_cpu_physical_apicid;
54extern unsigned int max_physical_apicid; 52extern unsigned int max_physical_apicid;
55extern int smp_found_config;
56extern int mpc_default_type; 53extern int mpc_default_type;
57extern unsigned long mp_lapic_addr; 54extern unsigned long mp_lapic_addr;
58 55
59extern void get_smp_config(void); 56#ifdef CONFIG_X86_LOCAL_APIC
57extern int smp_found_config;
58#else
59# define smp_found_config 0
60#endif
61
62static inline void get_smp_config(void)
63{
64 x86_init.mpparse.get_smp_config(0);
65}
66
67static inline void early_get_smp_config(void)
68{
69 x86_init.mpparse.get_smp_config(1);
70}
71
72static inline void find_smp_config(void)
73{
74 x86_init.mpparse.find_smp_config(1);
75}
76
77static inline void early_find_smp_config(void)
78{
79 x86_init.mpparse.find_smp_config(0);
80}
60 81
61#ifdef CONFIG_X86_MPPARSE 82#ifdef CONFIG_X86_MPPARSE
62extern void find_smp_config(void);
63extern void early_reserve_e820_mpc_new(void); 83extern void early_reserve_e820_mpc_new(void);
64extern int enable_update_mptable; 84extern int enable_update_mptable;
85extern int default_mpc_apic_id(struct mpc_cpu *m);
86extern void default_smp_read_mpc_oem(struct mpc_table *mpc);
87# ifdef CONFIG_X86_IO_APIC
88extern void default_mpc_oem_bus_info(struct mpc_bus *m, char *str);
89# else
90# define default_mpc_oem_bus_info NULL
91# endif
92extern void default_find_smp_config(unsigned int reserve);
93extern void default_get_smp_config(unsigned int early);
65#else 94#else
66static inline void find_smp_config(void) { }
67static inline void early_reserve_e820_mpc_new(void) { } 95static inline void early_reserve_e820_mpc_new(void) { }
68#define enable_update_mptable 0 96#define enable_update_mptable 0
97#define default_mpc_apic_id NULL
98#define default_smp_read_mpc_oem NULL
99#define default_mpc_oem_bus_info NULL
100#define default_find_smp_config x86_init_uint_noop
101#define default_get_smp_config x86_init_uint_noop
69#endif 102#endif
70 103
71void __cpuinit generic_processor_info(int apicid, int version); 104void __cpuinit generic_processor_info(int apicid, int version);
diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h
index bd5549034a95..4ffe09b2ad75 100644
--- a/arch/x86/include/asm/msr-index.h
+++ b/arch/x86/include/asm/msr-index.h
@@ -81,8 +81,15 @@
81#define MSR_IA32_MC0_ADDR 0x00000402 81#define MSR_IA32_MC0_ADDR 0x00000402
82#define MSR_IA32_MC0_MISC 0x00000403 82#define MSR_IA32_MC0_MISC 0x00000403
83 83
84#define MSR_IA32_MCx_CTL(x) (MSR_IA32_MC0_CTL + 4*(x))
85#define MSR_IA32_MCx_STATUS(x) (MSR_IA32_MC0_STATUS + 4*(x))
86#define MSR_IA32_MCx_ADDR(x) (MSR_IA32_MC0_ADDR + 4*(x))
87#define MSR_IA32_MCx_MISC(x) (MSR_IA32_MC0_MISC + 4*(x))
88
84/* These are consecutive and not in the normal 4er MCE bank block */ 89/* These are consecutive and not in the normal 4er MCE bank block */
85#define MSR_IA32_MC0_CTL2 0x00000280 90#define MSR_IA32_MC0_CTL2 0x00000280
91#define MSR_IA32_MCx_CTL2(x) (MSR_IA32_MC0_CTL2 + (x))
92
86#define CMCI_EN (1ULL << 30) 93#define CMCI_EN (1ULL << 30)
87#define CMCI_THRESHOLD_MASK 0xffffULL 94#define CMCI_THRESHOLD_MASK 0xffffULL
88 95
@@ -215,6 +222,10 @@
215 222
216#define THERM_STATUS_PROCHOT (1 << 0) 223#define THERM_STATUS_PROCHOT (1 << 0)
217 224
225#define MSR_THERM2_CTL 0x0000019d
226
227#define MSR_THERM2_CTL_TM_SELECT (1ULL << 16)
228
218#define MSR_IA32_MISC_ENABLE 0x000001a0 229#define MSR_IA32_MISC_ENABLE 0x000001a0
219 230
220/* MISC_ENABLE bits: architectural */ 231/* MISC_ENABLE bits: architectural */
diff --git a/arch/x86/include/asm/nmi.h b/arch/x86/include/asm/nmi.h
index e63cf7d441e1..139d4c1a33a7 100644
--- a/arch/x86/include/asm/nmi.h
+++ b/arch/x86/include/asm/nmi.h
@@ -40,8 +40,7 @@ extern unsigned int nmi_watchdog;
40#define NMI_INVALID 3 40#define NMI_INVALID 3
41 41
42struct ctl_table; 42struct ctl_table;
43struct file; 43extern int proc_nmi_enabled(struct ctl_table *, int ,
44extern int proc_nmi_enabled(struct ctl_table *, int , struct file *,
45 void __user *, size_t *, loff_t *); 44 void __user *, size_t *, loff_t *);
46extern int unknown_nmi_panic; 45extern int unknown_nmi_panic;
47 46
diff --git a/arch/x86/include/asm/nops.h b/arch/x86/include/asm/nops.h
index ad2668ee1aa7..6d8723a766cc 100644
--- a/arch/x86/include/asm/nops.h
+++ b/arch/x86/include/asm/nops.h
@@ -65,6 +65,8 @@
65 6: osp nopl 0x00(%eax,%eax,1) 65 6: osp nopl 0x00(%eax,%eax,1)
66 7: nopl 0x00000000(%eax) 66 7: nopl 0x00000000(%eax)
67 8: nopl 0x00000000(%eax,%eax,1) 67 8: nopl 0x00000000(%eax,%eax,1)
68 Note: All the above are assumed to be a single instruction.
69 There is kernel code that depends on this.
68*/ 70*/
69#define P6_NOP1 GENERIC_NOP1 71#define P6_NOP1 GENERIC_NOP1
70#define P6_NOP2 ".byte 0x66,0x90\n" 72#define P6_NOP2 ".byte 0x66,0x90\n"
diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h
index 40d6586af25b..8aebcc41041d 100644
--- a/arch/x86/include/asm/paravirt.h
+++ b/arch/x86/include/asm/paravirt.h
@@ -24,22 +24,6 @@ static inline void load_sp0(struct tss_struct *tss,
24 PVOP_VCALL2(pv_cpu_ops.load_sp0, tss, thread); 24 PVOP_VCALL2(pv_cpu_ops.load_sp0, tss, thread);
25} 25}
26 26
27#define ARCH_SETUP pv_init_ops.arch_setup();
28static inline unsigned long get_wallclock(void)
29{
30 return PVOP_CALL0(unsigned long, pv_time_ops.get_wallclock);
31}
32
33static inline int set_wallclock(unsigned long nowtime)
34{
35 return PVOP_CALL1(int, pv_time_ops.set_wallclock, nowtime);
36}
37
38static inline void (*choose_time_init(void))(void)
39{
40 return pv_time_ops.time_init;
41}
42
43/* The paravirtualized CPUID instruction. */ 27/* The paravirtualized CPUID instruction. */
44static inline void __cpuid(unsigned int *eax, unsigned int *ebx, 28static inline void __cpuid(unsigned int *eax, unsigned int *ebx,
45 unsigned int *ecx, unsigned int *edx) 29 unsigned int *ecx, unsigned int *edx)
@@ -245,7 +229,6 @@ static inline unsigned long long paravirt_sched_clock(void)
245{ 229{
246 return PVOP_CALL0(unsigned long long, pv_time_ops.sched_clock); 230 return PVOP_CALL0(unsigned long long, pv_time_ops.sched_clock);
247} 231}
248#define calibrate_tsc() (pv_time_ops.get_tsc_khz())
249 232
250static inline unsigned long long paravirt_read_pmc(int counter) 233static inline unsigned long long paravirt_read_pmc(int counter)
251{ 234{
@@ -363,34 +346,6 @@ static inline void slow_down_io(void)
363#endif 346#endif
364} 347}
365 348
366#ifdef CONFIG_X86_LOCAL_APIC
367static inline void setup_boot_clock(void)
368{
369 PVOP_VCALL0(pv_apic_ops.setup_boot_clock);
370}
371
372static inline void setup_secondary_clock(void)
373{
374 PVOP_VCALL0(pv_apic_ops.setup_secondary_clock);
375}
376#endif
377
378static inline void paravirt_post_allocator_init(void)
379{
380 if (pv_init_ops.post_allocator_init)
381 (*pv_init_ops.post_allocator_init)();
382}
383
384static inline void paravirt_pagetable_setup_start(pgd_t *base)
385{
386 (*pv_mmu_ops.pagetable_setup_start)(base);
387}
388
389static inline void paravirt_pagetable_setup_done(pgd_t *base)
390{
391 (*pv_mmu_ops.pagetable_setup_done)(base);
392}
393
394#ifdef CONFIG_SMP 349#ifdef CONFIG_SMP
395static inline void startup_ipi_hook(int phys_apicid, unsigned long start_eip, 350static inline void startup_ipi_hook(int phys_apicid, unsigned long start_eip,
396 unsigned long start_esp) 351 unsigned long start_esp)
@@ -948,6 +903,8 @@ static inline unsigned long __raw_local_irq_save(void)
948#undef PVOP_VCALL4 903#undef PVOP_VCALL4
949#undef PVOP_CALL4 904#undef PVOP_CALL4
950 905
906extern void default_banner(void);
907
951#else /* __ASSEMBLY__ */ 908#else /* __ASSEMBLY__ */
952 909
953#define _PVSITE(ptype, clobbers, ops, word, algn) \ 910#define _PVSITE(ptype, clobbers, ops, word, algn) \
@@ -1088,5 +1045,7 @@ static inline unsigned long __raw_local_irq_save(void)
1088#endif /* CONFIG_X86_32 */ 1045#endif /* CONFIG_X86_32 */
1089 1046
1090#endif /* __ASSEMBLY__ */ 1047#endif /* __ASSEMBLY__ */
1091#endif /* CONFIG_PARAVIRT */ 1048#else /* CONFIG_PARAVIRT */
1049# define default_banner x86_init_noop
1050#endif /* !CONFIG_PARAVIRT */
1092#endif /* _ASM_X86_PARAVIRT_H */ 1051#endif /* _ASM_X86_PARAVIRT_H */
diff --git a/arch/x86/include/asm/paravirt_types.h b/arch/x86/include/asm/paravirt_types.h
index 25402d0006e7..dd0f5b32489d 100644
--- a/arch/x86/include/asm/paravirt_types.h
+++ b/arch/x86/include/asm/paravirt_types.h
@@ -78,14 +78,6 @@ struct pv_init_ops {
78 */ 78 */
79 unsigned (*patch)(u8 type, u16 clobber, void *insnbuf, 79 unsigned (*patch)(u8 type, u16 clobber, void *insnbuf,
80 unsigned long addr, unsigned len); 80 unsigned long addr, unsigned len);
81
82 /* Basic arch-specific setup */
83 void (*arch_setup)(void);
84 char *(*memory_setup)(void);
85 void (*post_allocator_init)(void);
86
87 /* Print a banner to identify the environment */
88 void (*banner)(void);
89}; 81};
90 82
91 83
@@ -96,12 +88,6 @@ struct pv_lazy_ops {
96}; 88};
97 89
98struct pv_time_ops { 90struct pv_time_ops {
99 void (*time_init)(void);
100
101 /* Set and set time of day */
102 unsigned long (*get_wallclock)(void);
103 int (*set_wallclock)(unsigned long);
104
105 unsigned long long (*sched_clock)(void); 91 unsigned long long (*sched_clock)(void);
106 unsigned long (*get_tsc_khz)(void); 92 unsigned long (*get_tsc_khz)(void);
107}; 93};
@@ -203,8 +189,6 @@ struct pv_cpu_ops {
203}; 189};
204 190
205struct pv_irq_ops { 191struct pv_irq_ops {
206 void (*init_IRQ)(void);
207
208 /* 192 /*
209 * Get/set interrupt state. save_fl and restore_fl are only 193 * Get/set interrupt state. save_fl and restore_fl are only
210 * expected to use X86_EFLAGS_IF; all other bits 194 * expected to use X86_EFLAGS_IF; all other bits
@@ -229,9 +213,6 @@ struct pv_irq_ops {
229 213
230struct pv_apic_ops { 214struct pv_apic_ops {
231#ifdef CONFIG_X86_LOCAL_APIC 215#ifdef CONFIG_X86_LOCAL_APIC
232 void (*setup_boot_clock)(void);
233 void (*setup_secondary_clock)(void);
234
235 void (*startup_ipi_hook)(int phys_apicid, 216 void (*startup_ipi_hook)(int phys_apicid,
236 unsigned long start_eip, 217 unsigned long start_eip,
237 unsigned long start_esp); 218 unsigned long start_esp);
@@ -239,15 +220,6 @@ struct pv_apic_ops {
239}; 220};
240 221
241struct pv_mmu_ops { 222struct pv_mmu_ops {
242 /*
243 * Called before/after init_mm pagetable setup. setup_start
244 * may reset %cr3, and may pre-install parts of the pagetable;
245 * pagetable setup is expected to preserve any existing
246 * mapping.
247 */
248 void (*pagetable_setup_start)(pgd_t *pgd_base);
249 void (*pagetable_setup_done)(pgd_t *pgd_base);
250
251 unsigned long (*read_cr2)(void); 223 unsigned long (*read_cr2)(void);
252 void (*write_cr2)(unsigned long); 224 void (*write_cr2)(unsigned long);
253 225
diff --git a/arch/x86/include/asm/pci.h b/arch/x86/include/asm/pci.h
index 1ff685ca221c..ada8c201d513 100644
--- a/arch/x86/include/asm/pci.h
+++ b/arch/x86/include/asm/pci.h
@@ -48,7 +48,6 @@ extern unsigned int pcibios_assign_all_busses(void);
48#else 48#else
49#define pcibios_assign_all_busses() 0 49#define pcibios_assign_all_busses() 0
50#endif 50#endif
51#define pcibios_scan_all_fns(a, b) 0
52 51
53extern unsigned long pci_mem_start; 52extern unsigned long pci_mem_start;
54#define PCIBIOS_MIN_IO 0x1000 53#define PCIBIOS_MIN_IO 0x1000
@@ -144,7 +143,11 @@ static inline int __pcibus_to_node(const struct pci_bus *bus)
144static inline const struct cpumask * 143static inline const struct cpumask *
145cpumask_of_pcibus(const struct pci_bus *bus) 144cpumask_of_pcibus(const struct pci_bus *bus)
146{ 145{
147 return cpumask_of_node(__pcibus_to_node(bus)); 146 int node;
147
148 node = __pcibus_to_node(bus);
149 return (node == -1) ? cpu_online_mask :
150 cpumask_of_node(node);
148} 151}
149#endif 152#endif
150 153
diff --git a/arch/x86/include/asm/perf_counter.h b/arch/x86/include/asm/perf_event.h
index e7b7c938ae27..ad7ce3fd5065 100644
--- a/arch/x86/include/asm/perf_counter.h
+++ b/arch/x86/include/asm/perf_event.h
@@ -1,8 +1,8 @@
1#ifndef _ASM_X86_PERF_COUNTER_H 1#ifndef _ASM_X86_PERF_EVENT_H
2#define _ASM_X86_PERF_COUNTER_H 2#define _ASM_X86_PERF_EVENT_H
3 3
4/* 4/*
5 * Performance counter hw details: 5 * Performance event hw details:
6 */ 6 */
7 7
8#define X86_PMC_MAX_GENERIC 8 8#define X86_PMC_MAX_GENERIC 8
@@ -43,7 +43,7 @@
43union cpuid10_eax { 43union cpuid10_eax {
44 struct { 44 struct {
45 unsigned int version_id:8; 45 unsigned int version_id:8;
46 unsigned int num_counters:8; 46 unsigned int num_events:8;
47 unsigned int bit_width:8; 47 unsigned int bit_width:8;
48 unsigned int mask_length:8; 48 unsigned int mask_length:8;
49 } split; 49 } split;
@@ -52,7 +52,7 @@ union cpuid10_eax {
52 52
53union cpuid10_edx { 53union cpuid10_edx {
54 struct { 54 struct {
55 unsigned int num_counters_fixed:4; 55 unsigned int num_events_fixed:4;
56 unsigned int reserved:28; 56 unsigned int reserved:28;
57 } split; 57 } split;
58 unsigned int full; 58 unsigned int full;
@@ -60,7 +60,7 @@ union cpuid10_edx {
60 60
61 61
62/* 62/*
63 * Fixed-purpose performance counters: 63 * Fixed-purpose performance events:
64 */ 64 */
65 65
66/* 66/*
@@ -87,22 +87,22 @@ union cpuid10_edx {
87/* 87/*
88 * We model BTS tracing as another fixed-mode PMC. 88 * We model BTS tracing as another fixed-mode PMC.
89 * 89 *
90 * We choose a value in the middle of the fixed counter range, since lower 90 * We choose a value in the middle of the fixed event range, since lower
91 * values are used by actual fixed counters and higher values are used 91 * values are used by actual fixed events and higher values are used
92 * to indicate other overflow conditions in the PERF_GLOBAL_STATUS msr. 92 * to indicate other overflow conditions in the PERF_GLOBAL_STATUS msr.
93 */ 93 */
94#define X86_PMC_IDX_FIXED_BTS (X86_PMC_IDX_FIXED + 16) 94#define X86_PMC_IDX_FIXED_BTS (X86_PMC_IDX_FIXED + 16)
95 95
96 96
97#ifdef CONFIG_PERF_COUNTERS 97#ifdef CONFIG_PERF_EVENTS
98extern void init_hw_perf_counters(void); 98extern void init_hw_perf_events(void);
99extern void perf_counters_lapic_init(void); 99extern void perf_events_lapic_init(void);
100 100
101#define PERF_COUNTER_INDEX_OFFSET 0 101#define PERF_EVENT_INDEX_OFFSET 0
102 102
103#else 103#else
104static inline void init_hw_perf_counters(void) { } 104static inline void init_hw_perf_events(void) { }
105static inline void perf_counters_lapic_init(void) { } 105static inline void perf_events_lapic_init(void) { }
106#endif 106#endif
107 107
108#endif /* _ASM_X86_PERF_COUNTER_H */ 108#endif /* _ASM_X86_PERF_EVENT_H */
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
index 4c5b51fdc788..af6fd360ab35 100644
--- a/arch/x86/include/asm/pgtable.h
+++ b/arch/x86/include/asm/pgtable.h
@@ -56,16 +56,6 @@ extern struct list_head pgd_list;
56#define pte_update(mm, addr, ptep) do { } while (0) 56#define pte_update(mm, addr, ptep) do { } while (0)
57#define pte_update_defer(mm, addr, ptep) do { } while (0) 57#define pte_update_defer(mm, addr, ptep) do { } while (0)
58 58
59static inline void __init paravirt_pagetable_setup_start(pgd_t *base)
60{
61 native_pagetable_setup_start(base);
62}
63
64static inline void __init paravirt_pagetable_setup_done(pgd_t *base)
65{
66 native_pagetable_setup_done(base);
67}
68
69#define pgd_val(x) native_pgd_val(x) 59#define pgd_val(x) native_pgd_val(x)
70#define __pgd(x) native_make_pgd(x) 60#define __pgd(x) native_make_pgd(x)
71 61
diff --git a/arch/x86/include/asm/pgtable_types.h b/arch/x86/include/asm/pgtable_types.h
index 54cb697f4900..7b467bf3c680 100644
--- a/arch/x86/include/asm/pgtable_types.h
+++ b/arch/x86/include/asm/pgtable_types.h
@@ -299,8 +299,8 @@ void set_pte_vaddr(unsigned long vaddr, pte_t pte);
299extern void native_pagetable_setup_start(pgd_t *base); 299extern void native_pagetable_setup_start(pgd_t *base);
300extern void native_pagetable_setup_done(pgd_t *base); 300extern void native_pagetable_setup_done(pgd_t *base);
301#else 301#else
302static inline void native_pagetable_setup_start(pgd_t *base) {} 302#define native_pagetable_setup_start x86_init_pgd_noop
303static inline void native_pagetable_setup_done(pgd_t *base) {} 303#define native_pagetable_setup_done x86_init_pgd_noop
304#endif 304#endif
305 305
306struct seq_file; 306struct seq_file;
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h
index e08ea043e085..c3429e8b2424 100644
--- a/arch/x86/include/asm/processor.h
+++ b/arch/x86/include/asm/processor.h
@@ -27,6 +27,7 @@ struct mm_struct;
27#include <linux/cpumask.h> 27#include <linux/cpumask.h>
28#include <linux/cache.h> 28#include <linux/cache.h>
29#include <linux/threads.h> 29#include <linux/threads.h>
30#include <linux/math64.h>
30#include <linux/init.h> 31#include <linux/init.h>
31 32
32/* 33/*
@@ -1020,4 +1021,35 @@ extern void start_thread(struct pt_regs *regs, unsigned long new_ip,
1020extern int get_tsc_mode(unsigned long adr); 1021extern int get_tsc_mode(unsigned long adr);
1021extern int set_tsc_mode(unsigned int val); 1022extern int set_tsc_mode(unsigned int val);
1022 1023
1024extern int amd_get_nb_id(int cpu);
1025
1026struct aperfmperf {
1027 u64 aperf, mperf;
1028};
1029
1030static inline void get_aperfmperf(struct aperfmperf *am)
1031{
1032 WARN_ON_ONCE(!boot_cpu_has(X86_FEATURE_APERFMPERF));
1033
1034 rdmsrl(MSR_IA32_APERF, am->aperf);
1035 rdmsrl(MSR_IA32_MPERF, am->mperf);
1036}
1037
1038#define APERFMPERF_SHIFT 10
1039
1040static inline
1041unsigned long calc_aperfmperf_ratio(struct aperfmperf *old,
1042 struct aperfmperf *new)
1043{
1044 u64 aperf = new->aperf - old->aperf;
1045 u64 mperf = new->mperf - old->mperf;
1046 unsigned long ratio = aperf;
1047
1048 mperf >>= APERFMPERF_SHIFT;
1049 if (mperf)
1050 ratio = div64_u64(aperf, mperf);
1051
1052 return ratio;
1053}
1054
1023#endif /* _ASM_X86_PROCESSOR_H */ 1055#endif /* _ASM_X86_PROCESSOR_H */
diff --git a/arch/x86/include/asm/setup.h b/arch/x86/include/asm/setup.h
index 4093d1ed6db2..18e496c98ff0 100644
--- a/arch/x86/include/asm/setup.h
+++ b/arch/x86/include/asm/setup.h
@@ -5,43 +5,6 @@
5 5
6#define COMMAND_LINE_SIZE 2048 6#define COMMAND_LINE_SIZE 2048
7 7
8#ifndef __ASSEMBLY__
9
10/*
11 * Any setup quirks to be performed?
12 */
13struct mpc_cpu;
14struct mpc_bus;
15struct mpc_oemtable;
16
17struct x86_quirks {
18 int (*arch_pre_time_init)(void);
19 int (*arch_time_init)(void);
20 int (*arch_pre_intr_init)(void);
21 int (*arch_intr_init)(void);
22 int (*arch_trap_init)(void);
23 char * (*arch_memory_setup)(void);
24 int (*mach_get_smp_config)(unsigned int early);
25 int (*mach_find_smp_config)(unsigned int reserve);
26
27 int *mpc_record;
28 int (*mpc_apic_id)(struct mpc_cpu *m);
29 void (*mpc_oem_bus_info)(struct mpc_bus *m, char *name);
30 void (*mpc_oem_pci_bus)(struct mpc_bus *m);
31 void (*smp_read_mpc_oem)(struct mpc_oemtable *oemtable,
32 unsigned short oemsize);
33 int (*setup_ioapic_ids)(void);
34};
35
36extern void x86_quirk_intr_init(void);
37
38extern void x86_quirk_trap_init(void);
39
40extern void x86_quirk_pre_time_init(void);
41extern void x86_quirk_time_init(void);
42
43#endif /* __ASSEMBLY__ */
44
45#ifdef __i386__ 8#ifdef __i386__
46 9
47#include <linux/pfn.h> 10#include <linux/pfn.h>
@@ -61,6 +24,7 @@ extern void x86_quirk_time_init(void);
61 24
62#ifndef __ASSEMBLY__ 25#ifndef __ASSEMBLY__
63#include <asm/bootparam.h> 26#include <asm/bootparam.h>
27#include <asm/x86_init.h>
64 28
65/* Interrupt control for vSMPowered x86_64 systems */ 29/* Interrupt control for vSMPowered x86_64 systems */
66#ifdef CONFIG_X86_64 30#ifdef CONFIG_X86_64
@@ -79,11 +43,16 @@ static inline void visws_early_detect(void) { }
79static inline int is_visws_box(void) { return 0; } 43static inline int is_visws_box(void) { return 0; }
80#endif 44#endif
81 45
82extern struct x86_quirks *x86_quirks;
83extern unsigned long saved_video_mode; 46extern unsigned long saved_video_mode;
84 47
85#ifndef CONFIG_PARAVIRT 48extern void reserve_standard_io_resources(void);
86#define paravirt_post_allocator_init() do {} while (0) 49extern void i386_reserve_resources(void);
50extern void setup_default_timer_irq(void);
51
52#ifdef CONFIG_X86_MRST
53extern void x86_mrst_early_setup(void);
54#else
55static inline void x86_mrst_early_setup(void) { }
87#endif 56#endif
88 57
89#ifndef _SETUP 58#ifndef _SETUP
diff --git a/arch/x86/include/asm/smp.h b/arch/x86/include/asm/smp.h
index 6a84ed166aec..1e796782cd7b 100644
--- a/arch/x86/include/asm/smp.h
+++ b/arch/x86/include/asm/smp.h
@@ -121,7 +121,6 @@ static inline void arch_send_call_function_single_ipi(int cpu)
121 smp_ops.send_call_func_single_ipi(cpu); 121 smp_ops.send_call_func_single_ipi(cpu);
122} 122}
123 123
124#define arch_send_call_function_ipi_mask arch_send_call_function_ipi_mask
125static inline void arch_send_call_function_ipi_mask(const struct cpumask *mask) 124static inline void arch_send_call_function_ipi_mask(const struct cpumask *mask)
126{ 125{
127 smp_ops.send_call_func_ipi(mask); 126 smp_ops.send_call_func_ipi(mask);
diff --git a/arch/x86/include/asm/string_32.h b/arch/x86/include/asm/string_32.h
index c86f452256de..ae907e617181 100644
--- a/arch/x86/include/asm/string_32.h
+++ b/arch/x86/include/asm/string_32.h
@@ -65,7 +65,6 @@ static __always_inline void *__constant_memcpy(void *to, const void *from,
65 case 4: 65 case 4:
66 *(int *)to = *(int *)from; 66 *(int *)to = *(int *)from;
67 return to; 67 return to;
68
69 case 3: 68 case 3:
70 *(short *)to = *(short *)from; 69 *(short *)to = *(short *)from;
71 *((char *)to + 2) = *((char *)from + 2); 70 *((char *)to + 2) = *((char *)from + 2);
diff --git a/arch/x86/include/asm/syscall.h b/arch/x86/include/asm/syscall.h
index d82f39bb7905..8d33bc5462d1 100644
--- a/arch/x86/include/asm/syscall.h
+++ b/arch/x86/include/asm/syscall.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * Access to user system call parameters and results 2 * Access to user system call parameters and results
3 * 3 *
4 * Copyright (C) 2008 Red Hat, Inc. All rights reserved. 4 * Copyright (C) 2008-2009 Red Hat, Inc. All rights reserved.
5 * 5 *
6 * This copyrighted material is made available to anyone wishing to use, 6 * This copyrighted material is made available to anyone wishing to use,
7 * modify, copy, or redistribute it subject to the terms and conditions 7 * modify, copy, or redistribute it subject to the terms and conditions
@@ -16,13 +16,13 @@
16#include <linux/sched.h> 16#include <linux/sched.h>
17#include <linux/err.h> 17#include <linux/err.h>
18 18
19static inline long syscall_get_nr(struct task_struct *task, 19/*
20 struct pt_regs *regs) 20 * Only the low 32 bits of orig_ax are meaningful, so we return int.
21 * This importantly ignores the high bits on 64-bit, so comparisons
22 * sign-extend the low 32 bits.
23 */
24static inline int syscall_get_nr(struct task_struct *task, struct pt_regs *regs)
21{ 25{
22 /*
23 * We always sign-extend a -1 value being set here,
24 * so this is always either -1L or a syscall number.
25 */
26 return regs->orig_ax; 26 return regs->orig_ax;
27} 27}
28 28
diff --git a/arch/x86/include/asm/time.h b/arch/x86/include/asm/time.h
index 50c733aac421..7bdec4e9b739 100644
--- a/arch/x86/include/asm/time.h
+++ b/arch/x86/include/asm/time.h
@@ -4,60 +4,7 @@
4extern void hpet_time_init(void); 4extern void hpet_time_init(void);
5 5
6#include <asm/mc146818rtc.h> 6#include <asm/mc146818rtc.h>
7#ifdef CONFIG_X86_32
8#include <linux/efi.h>
9
10static inline unsigned long native_get_wallclock(void)
11{
12 unsigned long retval;
13
14 if (efi_enabled)
15 retval = efi_get_time();
16 else
17 retval = mach_get_cmos_time();
18
19 return retval;
20}
21
22static inline int native_set_wallclock(unsigned long nowtime)
23{
24 int retval;
25
26 if (efi_enabled)
27 retval = efi_set_rtc_mmss(nowtime);
28 else
29 retval = mach_set_rtc_mmss(nowtime);
30
31 return retval;
32}
33
34#else
35extern void native_time_init_hook(void);
36
37static inline unsigned long native_get_wallclock(void)
38{
39 return mach_get_cmos_time();
40}
41
42static inline int native_set_wallclock(unsigned long nowtime)
43{
44 return mach_set_rtc_mmss(nowtime);
45}
46
47#endif
48 7
49extern void time_init(void); 8extern void time_init(void);
50 9
51#ifdef CONFIG_PARAVIRT
52#include <asm/paravirt.h>
53#else /* !CONFIG_PARAVIRT */
54
55#define get_wallclock() native_get_wallclock()
56#define set_wallclock(x) native_set_wallclock(x)
57#define choose_time_init() hpet_time_init
58
59#endif /* CONFIG_PARAVIRT */
60
61extern unsigned long __init calibrate_cpu(void);
62
63#endif /* _ASM_X86_TIME_H */ 10#endif /* _ASM_X86_TIME_H */
diff --git a/arch/x86/include/asm/timer.h b/arch/x86/include/asm/timer.h
index 20ca9c4d4686..5469630b27f5 100644
--- a/arch/x86/include/asm/timer.h
+++ b/arch/x86/include/asm/timer.h
@@ -8,20 +8,16 @@
8#define TICK_SIZE (tick_nsec / 1000) 8#define TICK_SIZE (tick_nsec / 1000)
9 9
10unsigned long long native_sched_clock(void); 10unsigned long long native_sched_clock(void);
11unsigned long native_calibrate_tsc(void); 11extern int recalibrate_cpu_khz(void);
12 12
13#ifdef CONFIG_X86_32 13#if defined(CONFIG_X86_32) && defined(CONFIG_X86_IO_APIC)
14extern int timer_ack; 14extern int timer_ack;
15extern irqreturn_t timer_interrupt(int irq, void *dev_id); 15#else
16#endif /* CONFIG_X86_32 */ 16# define timer_ack (0)
17extern int recalibrate_cpu_khz(void); 17#endif
18 18
19extern int no_timer_check; 19extern int no_timer_check;
20 20
21#ifndef CONFIG_PARAVIRT
22#define calibrate_tsc() native_calibrate_tsc()
23#endif
24
25/* Accelerators for sched_clock() 21/* Accelerators for sched_clock()
26 * convert from cycles(64bits) => nanoseconds (64bits) 22 * convert from cycles(64bits) => nanoseconds (64bits)
27 * basic equation: 23 * basic equation:
diff --git a/arch/x86/include/asm/topology.h b/arch/x86/include/asm/topology.h
index 26d06e052a18..6f0695d744bf 100644
--- a/arch/x86/include/asm/topology.h
+++ b/arch/x86/include/asm/topology.h
@@ -116,15 +116,11 @@ extern unsigned long node_remap_size[];
116 116
117# define SD_CACHE_NICE_TRIES 1 117# define SD_CACHE_NICE_TRIES 1
118# define SD_IDLE_IDX 1 118# define SD_IDLE_IDX 1
119# define SD_NEWIDLE_IDX 2
120# define SD_FORKEXEC_IDX 0
121 119
122#else 120#else
123 121
124# define SD_CACHE_NICE_TRIES 2 122# define SD_CACHE_NICE_TRIES 2
125# define SD_IDLE_IDX 2 123# define SD_IDLE_IDX 2
126# define SD_NEWIDLE_IDX 2
127# define SD_FORKEXEC_IDX 1
128 124
129#endif 125#endif
130 126
@@ -137,22 +133,20 @@ extern unsigned long node_remap_size[];
137 .cache_nice_tries = SD_CACHE_NICE_TRIES, \ 133 .cache_nice_tries = SD_CACHE_NICE_TRIES, \
138 .busy_idx = 3, \ 134 .busy_idx = 3, \
139 .idle_idx = SD_IDLE_IDX, \ 135 .idle_idx = SD_IDLE_IDX, \
140 .newidle_idx = SD_NEWIDLE_IDX, \ 136 .newidle_idx = 0, \
141 .wake_idx = 1, \ 137 .wake_idx = 0, \
142 .forkexec_idx = SD_FORKEXEC_IDX, \ 138 .forkexec_idx = 0, \
143 \ 139 \
144 .flags = 1*SD_LOAD_BALANCE \ 140 .flags = 1*SD_LOAD_BALANCE \
145 | 1*SD_BALANCE_NEWIDLE \ 141 | 1*SD_BALANCE_NEWIDLE \
146 | 1*SD_BALANCE_EXEC \ 142 | 1*SD_BALANCE_EXEC \
147 | 1*SD_BALANCE_FORK \ 143 | 1*SD_BALANCE_FORK \
148 | 0*SD_WAKE_IDLE \ 144 | 0*SD_BALANCE_WAKE \
149 | 1*SD_WAKE_AFFINE \ 145 | 1*SD_WAKE_AFFINE \
150 | 1*SD_WAKE_BALANCE \
151 | 0*SD_SHARE_CPUPOWER \ 146 | 0*SD_SHARE_CPUPOWER \
152 | 0*SD_POWERSAVINGS_BALANCE \ 147 | 0*SD_POWERSAVINGS_BALANCE \
153 | 0*SD_SHARE_PKG_RESOURCES \ 148 | 0*SD_SHARE_PKG_RESOURCES \
154 | 1*SD_SERIALIZE \ 149 | 1*SD_SERIALIZE \
155 | 1*SD_WAKE_IDLE_FAR \
156 | 0*SD_PREFER_SIBLING \ 150 | 0*SD_PREFER_SIBLING \
157 , \ 151 , \
158 .last_balance = jiffies, \ 152 .last_balance = jiffies, \
diff --git a/arch/x86/include/asm/tsc.h b/arch/x86/include/asm/tsc.h
index 38ae163cc91b..c0427295e8f5 100644
--- a/arch/x86/include/asm/tsc.h
+++ b/arch/x86/include/asm/tsc.h
@@ -48,7 +48,8 @@ static __always_inline cycles_t vget_cycles(void)
48extern void tsc_init(void); 48extern void tsc_init(void);
49extern void mark_tsc_unstable(char *reason); 49extern void mark_tsc_unstable(char *reason);
50extern int unsynchronized_tsc(void); 50extern int unsynchronized_tsc(void);
51int check_tsc_unstable(void); 51extern int check_tsc_unstable(void);
52extern unsigned long native_calibrate_tsc(void);
52 53
53/* 54/*
54 * Boot-time check whether the TSCs are synchronized across 55 * Boot-time check whether the TSCs are synchronized across
diff --git a/arch/x86/include/asm/uaccess_32.h b/arch/x86/include/asm/uaccess_32.h
index 5e06259e90e5..632fb44b4cb5 100644
--- a/arch/x86/include/asm/uaccess_32.h
+++ b/arch/x86/include/asm/uaccess_32.h
@@ -33,7 +33,7 @@ unsigned long __must_check __copy_from_user_ll_nocache_nozero
33 * Copy data from kernel space to user space. Caller must check 33 * Copy data from kernel space to user space. Caller must check
34 * the specified block with access_ok() before calling this function. 34 * the specified block with access_ok() before calling this function.
35 * The caller should also make sure he pins the user space address 35 * The caller should also make sure he pins the user space address
36 * so that the we don't result in page fault and sleep. 36 * so that we don't result in page fault and sleep.
37 * 37 *
38 * Here we special-case 1, 2 and 4-byte copy_*_user invocations. On a fault 38 * Here we special-case 1, 2 and 4-byte copy_*_user invocations. On a fault
39 * we return the initial request size (1, 2 or 4), as copy_*_user should do. 39 * we return the initial request size (1, 2 or 4), as copy_*_user should do.
diff --git a/arch/x86/include/asm/unistd_32.h b/arch/x86/include/asm/unistd_32.h
index 8deaada61bc8..6fb3c209a7e3 100644
--- a/arch/x86/include/asm/unistd_32.h
+++ b/arch/x86/include/asm/unistd_32.h
@@ -341,7 +341,7 @@
341#define __NR_preadv 333 341#define __NR_preadv 333
342#define __NR_pwritev 334 342#define __NR_pwritev 334
343#define __NR_rt_tgsigqueueinfo 335 343#define __NR_rt_tgsigqueueinfo 335
344#define __NR_perf_counter_open 336 344#define __NR_perf_event_open 336
345 345
346#ifdef __KERNEL__ 346#ifdef __KERNEL__
347 347
diff --git a/arch/x86/include/asm/unistd_64.h b/arch/x86/include/asm/unistd_64.h
index b9f3c60de5f7..8d3ad0adbc68 100644
--- a/arch/x86/include/asm/unistd_64.h
+++ b/arch/x86/include/asm/unistd_64.h
@@ -659,8 +659,8 @@ __SYSCALL(__NR_preadv, sys_preadv)
659__SYSCALL(__NR_pwritev, sys_pwritev) 659__SYSCALL(__NR_pwritev, sys_pwritev)
660#define __NR_rt_tgsigqueueinfo 297 660#define __NR_rt_tgsigqueueinfo 297
661__SYSCALL(__NR_rt_tgsigqueueinfo, sys_rt_tgsigqueueinfo) 661__SYSCALL(__NR_rt_tgsigqueueinfo, sys_rt_tgsigqueueinfo)
662#define __NR_perf_counter_open 298 662#define __NR_perf_event_open 298
663__SYSCALL(__NR_perf_counter_open, sys_perf_counter_open) 663__SYSCALL(__NR_perf_event_open, sys_perf_event_open)
664 664
665#ifndef __NO_STUBS 665#ifndef __NO_STUBS
666#define __ARCH_WANT_OLD_READDIR 666#define __ARCH_WANT_OLD_READDIR
diff --git a/arch/x86/include/asm/uv/uv_hub.h b/arch/x86/include/asm/uv/uv_hub.h
index 77a68505419a..04eb6c958b9d 100644
--- a/arch/x86/include/asm/uv/uv_hub.h
+++ b/arch/x86/include/asm/uv/uv_hub.h
@@ -15,6 +15,7 @@
15#include <linux/numa.h> 15#include <linux/numa.h>
16#include <linux/percpu.h> 16#include <linux/percpu.h>
17#include <linux/timer.h> 17#include <linux/timer.h>
18#include <linux/io.h>
18#include <asm/types.h> 19#include <asm/types.h>
19#include <asm/percpu.h> 20#include <asm/percpu.h>
20#include <asm/uv/uv_mmrs.h> 21#include <asm/uv/uv_mmrs.h>
@@ -258,13 +259,13 @@ static inline unsigned long *uv_global_mmr32_address(int pnode,
258static inline void uv_write_global_mmr32(int pnode, unsigned long offset, 259static inline void uv_write_global_mmr32(int pnode, unsigned long offset,
259 unsigned long val) 260 unsigned long val)
260{ 261{
261 *uv_global_mmr32_address(pnode, offset) = val; 262 writeq(val, uv_global_mmr32_address(pnode, offset));
262} 263}
263 264
264static inline unsigned long uv_read_global_mmr32(int pnode, 265static inline unsigned long uv_read_global_mmr32(int pnode,
265 unsigned long offset) 266 unsigned long offset)
266{ 267{
267 return *uv_global_mmr32_address(pnode, offset); 268 return readq(uv_global_mmr32_address(pnode, offset));
268} 269}
269 270
270/* 271/*
@@ -281,13 +282,13 @@ static inline unsigned long *uv_global_mmr64_address(int pnode,
281static inline void uv_write_global_mmr64(int pnode, unsigned long offset, 282static inline void uv_write_global_mmr64(int pnode, unsigned long offset,
282 unsigned long val) 283 unsigned long val)
283{ 284{
284 *uv_global_mmr64_address(pnode, offset) = val; 285 writeq(val, uv_global_mmr64_address(pnode, offset));
285} 286}
286 287
287static inline unsigned long uv_read_global_mmr64(int pnode, 288static inline unsigned long uv_read_global_mmr64(int pnode,
288 unsigned long offset) 289 unsigned long offset)
289{ 290{
290 return *uv_global_mmr64_address(pnode, offset); 291 return readq(uv_global_mmr64_address(pnode, offset));
291} 292}
292 293
293/* 294/*
@@ -301,22 +302,22 @@ static inline unsigned long *uv_local_mmr_address(unsigned long offset)
301 302
302static inline unsigned long uv_read_local_mmr(unsigned long offset) 303static inline unsigned long uv_read_local_mmr(unsigned long offset)
303{ 304{
304 return *uv_local_mmr_address(offset); 305 return readq(uv_local_mmr_address(offset));
305} 306}
306 307
307static inline void uv_write_local_mmr(unsigned long offset, unsigned long val) 308static inline void uv_write_local_mmr(unsigned long offset, unsigned long val)
308{ 309{
309 *uv_local_mmr_address(offset) = val; 310 writeq(val, uv_local_mmr_address(offset));
310} 311}
311 312
312static inline unsigned char uv_read_local_mmr8(unsigned long offset) 313static inline unsigned char uv_read_local_mmr8(unsigned long offset)
313{ 314{
314 return *((unsigned char *)uv_local_mmr_address(offset)); 315 return readb(uv_local_mmr_address(offset));
315} 316}
316 317
317static inline void uv_write_local_mmr8(unsigned long offset, unsigned char val) 318static inline void uv_write_local_mmr8(unsigned long offset, unsigned char val)
318{ 319{
319 *((unsigned char *)uv_local_mmr_address(offset)) = val; 320 writeb(val, uv_local_mmr_address(offset));
320} 321}
321 322
322/* 323/*
@@ -422,7 +423,7 @@ static inline void uv_hub_send_ipi(int pnode, int apicid, int vector)
422 unsigned long val; 423 unsigned long val;
423 424
424 val = (1UL << UVH_IPI_INT_SEND_SHFT) | 425 val = (1UL << UVH_IPI_INT_SEND_SHFT) |
425 ((apicid & 0x3f) << UVH_IPI_INT_APIC_ID_SHFT) | 426 ((apicid) << UVH_IPI_INT_APIC_ID_SHFT) |
426 (vector << UVH_IPI_INT_VECTOR_SHFT); 427 (vector << UVH_IPI_INT_VECTOR_SHFT);
427 uv_write_global_mmr64(pnode, UVH_IPI_INT, val); 428 uv_write_global_mmr64(pnode, UVH_IPI_INT, val);
428} 429}
diff --git a/arch/x86/include/asm/vgtod.h b/arch/x86/include/asm/vgtod.h
index dc27a69e5d2a..3d61e204826f 100644
--- a/arch/x86/include/asm/vgtod.h
+++ b/arch/x86/include/asm/vgtod.h
@@ -21,6 +21,7 @@ struct vsyscall_gtod_data {
21 u32 shift; 21 u32 shift;
22 } clock; 22 } clock;
23 struct timespec wall_to_monotonic; 23 struct timespec wall_to_monotonic;
24 struct timespec wall_time_coarse;
24}; 25};
25extern struct vsyscall_gtod_data __vsyscall_gtod_data 26extern struct vsyscall_gtod_data __vsyscall_gtod_data
26__section_vsyscall_gtod_data; 27__section_vsyscall_gtod_data;
diff --git a/arch/x86/include/asm/vmware.h b/arch/x86/include/asm/vmware.h
index c11b7e100d83..e49ed6d2fd4e 100644
--- a/arch/x86/include/asm/vmware.h
+++ b/arch/x86/include/asm/vmware.h
@@ -20,7 +20,7 @@
20#ifndef ASM_X86__VMWARE_H 20#ifndef ASM_X86__VMWARE_H
21#define ASM_X86__VMWARE_H 21#define ASM_X86__VMWARE_H
22 22
23extern unsigned long vmware_get_tsc_khz(void); 23extern void vmware_platform_setup(void);
24extern int vmware_platform(void); 24extern int vmware_platform(void);
25extern void vmware_set_feature_bits(struct cpuinfo_x86 *c); 25extern void vmware_set_feature_bits(struct cpuinfo_x86 *c);
26 26
diff --git a/arch/x86/include/asm/x86_init.h b/arch/x86/include/asm/x86_init.h
new file mode 100644
index 000000000000..2c756fd4ab0e
--- /dev/null
+++ b/arch/x86/include/asm/x86_init.h
@@ -0,0 +1,133 @@
1#ifndef _ASM_X86_PLATFORM_H
2#define _ASM_X86_PLATFORM_H
3
4#include <asm/pgtable_types.h>
5#include <asm/bootparam.h>
6
7struct mpc_bus;
8struct mpc_cpu;
9struct mpc_table;
10
11/**
12 * struct x86_init_mpparse - platform specific mpparse ops
13 * @mpc_record: platform specific mpc record accounting
14 * @setup_ioapic_ids: platform specific ioapic id override
15 * @mpc_apic_id: platform specific mpc apic id assignment
16 * @smp_read_mpc_oem: platform specific oem mpc table setup
17 * @mpc_oem_pci_bus: platform specific pci bus setup (default NULL)
18 * @mpc_oem_bus_info: platform specific mpc bus info
19 * @find_smp_config: find the smp configuration
20 * @get_smp_config: get the smp configuration
21 */
22struct x86_init_mpparse {
23 void (*mpc_record)(unsigned int mode);
24 void (*setup_ioapic_ids)(void);
25 int (*mpc_apic_id)(struct mpc_cpu *m);
26 void (*smp_read_mpc_oem)(struct mpc_table *mpc);
27 void (*mpc_oem_pci_bus)(struct mpc_bus *m);
28 void (*mpc_oem_bus_info)(struct mpc_bus *m, char *name);
29 void (*find_smp_config)(unsigned int reserve);
30 void (*get_smp_config)(unsigned int early);
31};
32
33/**
34 * struct x86_init_resources - platform specific resource related ops
35 * @probe_roms: probe BIOS roms
36 * @reserve_resources: reserve the standard resources for the
37 * platform
38 * @memory_setup: platform specific memory setup
39 *
40 */
41struct x86_init_resources {
42 void (*probe_roms)(void);
43 void (*reserve_resources)(void);
44 char *(*memory_setup)(void);
45};
46
47/**
48 * struct x86_init_irqs - platform specific interrupt setup
49 * @pre_vector_init: init code to run before interrupt vectors
50 * are set up.
51 * @intr_init: interrupt init code
52 * @trap_init: platform specific trap setup
53 */
54struct x86_init_irqs {
55 void (*pre_vector_init)(void);
56 void (*intr_init)(void);
57 void (*trap_init)(void);
58};
59
60/**
61 * struct x86_init_oem - oem platform specific customizing functions
62 * @arch_setup: platform specific architecure setup
63 * @banner: print a platform specific banner
64 */
65struct x86_init_oem {
66 void (*arch_setup)(void);
67 void (*banner)(void);
68};
69
70/**
71 * struct x86_init_paging - platform specific paging functions
72 * @pagetable_setup_start: platform specific pre paging_init() call
73 * @pagetable_setup_done: platform specific post paging_init() call
74 */
75struct x86_init_paging {
76 void (*pagetable_setup_start)(pgd_t *base);
77 void (*pagetable_setup_done)(pgd_t *base);
78};
79
80/**
81 * struct x86_init_timers - platform specific timer setup
82 * @setup_perpcu_clockev: set up the per cpu clock event device for the
83 * boot cpu
84 * @tsc_pre_init: platform function called before TSC init
85 * @timer_init: initialize the platform timer (default PIT/HPET)
86 */
87struct x86_init_timers {
88 void (*setup_percpu_clockev)(void);
89 void (*tsc_pre_init)(void);
90 void (*timer_init)(void);
91};
92
93/**
94 * struct x86_init_ops - functions for platform specific setup
95 *
96 */
97struct x86_init_ops {
98 struct x86_init_resources resources;
99 struct x86_init_mpparse mpparse;
100 struct x86_init_irqs irqs;
101 struct x86_init_oem oem;
102 struct x86_init_paging paging;
103 struct x86_init_timers timers;
104};
105
106/**
107 * struct x86_cpuinit_ops - platform specific cpu hotplug setups
108 * @setup_percpu_clockev: set up the per cpu clock event device
109 */
110struct x86_cpuinit_ops {
111 void (*setup_percpu_clockev)(void);
112};
113
114/**
115 * struct x86_platform_ops - platform specific runtime functions
116 * @calibrate_tsc: calibrate TSC
117 * @get_wallclock: get time from HW clock like RTC etc.
118 * @set_wallclock: set time back to HW clock
119 */
120struct x86_platform_ops {
121 unsigned long (*calibrate_tsc)(void);
122 unsigned long (*get_wallclock)(void);
123 int (*set_wallclock)(unsigned long nowtime);
124};
125
126extern struct x86_init_ops x86_init;
127extern struct x86_cpuinit_ops x86_cpuinit;
128extern struct x86_platform_ops x86_platform;
129
130extern void x86_init_noop(void);
131extern void x86_init_uint_noop(unsigned int unused);
132
133#endif
diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
index 832cb838cb48..d8e5d0cdd678 100644
--- a/arch/x86/kernel/Makefile
+++ b/arch/x86/kernel/Makefile
@@ -31,8 +31,8 @@ GCOV_PROFILE_paravirt.o := n
31 31
32obj-y := process_$(BITS).o signal.o entry_$(BITS).o 32obj-y := process_$(BITS).o signal.o entry_$(BITS).o
33obj-y += traps.o irq.o irq_$(BITS).o dumpstack_$(BITS).o 33obj-y += traps.o irq.o irq_$(BITS).o dumpstack_$(BITS).o
34obj-y += time_$(BITS).o ioport.o ldt.o dumpstack.o 34obj-y += time.o ioport.o ldt.o dumpstack.o
35obj-y += setup.o i8259.o irqinit.o 35obj-y += setup.o x86_init.o i8259.o irqinit.o
36obj-$(CONFIG_X86_VISWS) += visws_quirks.o 36obj-$(CONFIG_X86_VISWS) += visws_quirks.o
37obj-$(CONFIG_X86_32) += probe_roms_32.o 37obj-$(CONFIG_X86_32) += probe_roms_32.o
38obj-$(CONFIG_X86_32) += sys_i386_32.o i386_ksyms_32.o 38obj-$(CONFIG_X86_32) += sys_i386_32.o i386_ksyms_32.o
@@ -56,6 +56,7 @@ obj-$(CONFIG_INTEL_TXT) += tboot.o
56obj-$(CONFIG_STACKTRACE) += stacktrace.o 56obj-$(CONFIG_STACKTRACE) += stacktrace.o
57obj-y += cpu/ 57obj-y += cpu/
58obj-y += acpi/ 58obj-y += acpi/
59obj-$(CONFIG_SFI) += sfi.o
59obj-y += reboot.o 60obj-y += reboot.o
60obj-$(CONFIG_MCA) += mca_32.o 61obj-$(CONFIG_MCA) += mca_32.o
61obj-$(CONFIG_X86_MSR) += msr.o 62obj-$(CONFIG_X86_MSR) += msr.o
@@ -105,6 +106,7 @@ obj-$(CONFIG_SCx200) += scx200.o
105scx200-y += scx200_32.o 106scx200-y += scx200_32.o
106 107
107obj-$(CONFIG_OLPC) += olpc.o 108obj-$(CONFIG_OLPC) += olpc.o
109obj-$(CONFIG_X86_MRST) += mrst.o
108 110
109microcode-y := microcode_core.o 111microcode-y := microcode_core.o
110microcode-$(CONFIG_MICROCODE_INTEL) += microcode_intel.o 112microcode-$(CONFIG_MICROCODE_INTEL) += microcode_intel.o
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index 159740decc41..894aa97f0717 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -14,7 +14,7 @@
14 * Mikael Pettersson : PM converted to driver model. 14 * Mikael Pettersson : PM converted to driver model.
15 */ 15 */
16 16
17#include <linux/perf_counter.h> 17#include <linux/perf_event.h>
18#include <linux/kernel_stat.h> 18#include <linux/kernel_stat.h>
19#include <linux/mc146818rtc.h> 19#include <linux/mc146818rtc.h>
20#include <linux/acpi_pmtmr.h> 20#include <linux/acpi_pmtmr.h>
@@ -35,7 +35,8 @@
35#include <linux/smp.h> 35#include <linux/smp.h>
36#include <linux/mm.h> 36#include <linux/mm.h>
37 37
38#include <asm/perf_counter.h> 38#include <asm/perf_event.h>
39#include <asm/x86_init.h>
39#include <asm/pgalloc.h> 40#include <asm/pgalloc.h>
40#include <asm/atomic.h> 41#include <asm/atomic.h>
41#include <asm/mpspec.h> 42#include <asm/mpspec.h>
@@ -61,7 +62,7 @@ unsigned int boot_cpu_physical_apicid = -1U;
61/* 62/*
62 * The highest APIC ID seen during enumeration. 63 * The highest APIC ID seen during enumeration.
63 * 64 *
64 * This determines the messaging protocol we can use: if all APIC IDs 65 * On AMD, this determines the messaging protocol we can use: if all APIC IDs
65 * are in the 0 ... 7 range, then we can use logical addressing which 66 * are in the 0 ... 7 range, then we can use logical addressing which
66 * has some performance advantages (better broadcasting). 67 * has some performance advantages (better broadcasting).
67 * 68 *
@@ -978,7 +979,7 @@ void lapic_shutdown(void)
978{ 979{
979 unsigned long flags; 980 unsigned long flags;
980 981
981 if (!cpu_has_apic) 982 if (!cpu_has_apic && !apic_from_smp_config())
982 return; 983 return;
983 984
984 local_irq_save(flags); 985 local_irq_save(flags);
@@ -1188,7 +1189,7 @@ void __cpuinit setup_local_APIC(void)
1188 apic_write(APIC_ESR, 0); 1189 apic_write(APIC_ESR, 0);
1189 } 1190 }
1190#endif 1191#endif
1191 perf_counters_lapic_init(); 1192 perf_events_lapic_init();
1192 1193
1193 preempt_disable(); 1194 preempt_disable();
1194 1195
@@ -1196,8 +1197,7 @@ void __cpuinit setup_local_APIC(void)
1196 * Double-check whether this APIC is really registered. 1197 * Double-check whether this APIC is really registered.
1197 * This is meaningless in clustered apic mode, so we skip it. 1198 * This is meaningless in clustered apic mode, so we skip it.
1198 */ 1199 */
1199 if (!apic->apic_id_registered()) 1200 BUG_ON(!apic->apic_id_registered());
1200 BUG();
1201 1201
1202 /* 1202 /*
1203 * Intel recommends to set DFR, LDR and TPR before enabling 1203 * Intel recommends to set DFR, LDR and TPR before enabling
@@ -1709,7 +1709,7 @@ int __init APIC_init_uniprocessor(void)
1709 localise_nmi_watchdog(); 1709 localise_nmi_watchdog();
1710#endif 1710#endif
1711 1711
1712 setup_boot_clock(); 1712 x86_init.timers.setup_percpu_clockev();
1713#ifdef CONFIG_X86_64 1713#ifdef CONFIG_X86_64
1714 check_nmi_watchdog(); 1714 check_nmi_watchdog();
1715#endif 1715#endif
@@ -1916,24 +1916,14 @@ void __cpuinit generic_processor_info(int apicid, int version)
1916 max_physical_apicid = apicid; 1916 max_physical_apicid = apicid;
1917 1917
1918#ifdef CONFIG_X86_32 1918#ifdef CONFIG_X86_32
1919 /* 1919 switch (boot_cpu_data.x86_vendor) {
1920 * Would be preferable to switch to bigsmp when CONFIG_HOTPLUG_CPU=y 1920 case X86_VENDOR_INTEL:
1921 * but we need to work other dependencies like SMP_SUSPEND etc 1921 if (num_processors > 8)
1922 * before this can be done without some confusion. 1922 def_to_bigsmp = 1;
1923 * if (CPU_HOTPLUG_ENABLED || num_processors > 8) 1923 break;
1924 * - Ashok Raj <ashok.raj@intel.com> 1924 case X86_VENDOR_AMD:
1925 */ 1925 if (max_physical_apicid >= 8)
1926 if (max_physical_apicid >= 8) {
1927 switch (boot_cpu_data.x86_vendor) {
1928 case X86_VENDOR_INTEL:
1929 if (!APIC_XAPIC(version)) {
1930 def_to_bigsmp = 0;
1931 break;
1932 }
1933 /* If P4 and above fall through */
1934 case X86_VENDOR_AMD:
1935 def_to_bigsmp = 1; 1926 def_to_bigsmp = 1;
1936 }
1937 } 1927 }
1938#endif 1928#endif
1939 1929
diff --git a/arch/x86/kernel/apic/bigsmp_32.c b/arch/x86/kernel/apic/bigsmp_32.c
index 676cdac385c0..77a06413b6b2 100644
--- a/arch/x86/kernel/apic/bigsmp_32.c
+++ b/arch/x86/kernel/apic/bigsmp_32.c
@@ -112,7 +112,7 @@ static physid_mask_t bigsmp_ioapic_phys_id_map(physid_mask_t phys_map)
112 return physids_promote(0xFFL); 112 return physids_promote(0xFFL);
113} 113}
114 114
115static int bigsmp_check_phys_apicid_present(int boot_cpu_physical_apicid) 115static int bigsmp_check_phys_apicid_present(int phys_apicid)
116{ 116{
117 return 1; 117 return 1;
118} 118}
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 3c8f9e75d038..dc69f28489f5 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -96,6 +96,11 @@ struct mpc_intsrc mp_irqs[MAX_IRQ_SOURCES];
96/* # of MP IRQ source entries */ 96/* # of MP IRQ source entries */
97int mp_irq_entries; 97int mp_irq_entries;
98 98
99/* Number of legacy interrupts */
100static int nr_legacy_irqs __read_mostly = NR_IRQS_LEGACY;
101/* GSI interrupts */
102static int nr_irqs_gsi = NR_IRQS_LEGACY;
103
99#if defined (CONFIG_MCA) || defined (CONFIG_EISA) 104#if defined (CONFIG_MCA) || defined (CONFIG_EISA)
100int mp_bus_id_to_type[MAX_MP_BUSSES]; 105int mp_bus_id_to_type[MAX_MP_BUSSES];
101#endif 106#endif
@@ -173,6 +178,12 @@ static struct irq_cfg irq_cfgx[NR_IRQS] = {
173 [15] = { .vector = IRQ15_VECTOR, }, 178 [15] = { .vector = IRQ15_VECTOR, },
174}; 179};
175 180
181void __init io_apic_disable_legacy(void)
182{
183 nr_legacy_irqs = 0;
184 nr_irqs_gsi = 0;
185}
186
176int __init arch_early_irq_init(void) 187int __init arch_early_irq_init(void)
177{ 188{
178 struct irq_cfg *cfg; 189 struct irq_cfg *cfg;
@@ -190,7 +201,7 @@ int __init arch_early_irq_init(void)
190 desc->chip_data = &cfg[i]; 201 desc->chip_data = &cfg[i];
191 zalloc_cpumask_var_node(&cfg[i].domain, GFP_NOWAIT, node); 202 zalloc_cpumask_var_node(&cfg[i].domain, GFP_NOWAIT, node);
192 zalloc_cpumask_var_node(&cfg[i].old_domain, GFP_NOWAIT, node); 203 zalloc_cpumask_var_node(&cfg[i].old_domain, GFP_NOWAIT, node);
193 if (i < NR_IRQS_LEGACY) 204 if (i < nr_legacy_irqs)
194 cpumask_setall(cfg[i].domain); 205 cpumask_setall(cfg[i].domain);
195 } 206 }
196 207
@@ -216,17 +227,14 @@ static struct irq_cfg *get_one_free_irq_cfg(int node)
216 227
217 cfg = kzalloc_node(sizeof(*cfg), GFP_ATOMIC, node); 228 cfg = kzalloc_node(sizeof(*cfg), GFP_ATOMIC, node);
218 if (cfg) { 229 if (cfg) {
219 if (!alloc_cpumask_var_node(&cfg->domain, GFP_ATOMIC, node)) { 230 if (!zalloc_cpumask_var_node(&cfg->domain, GFP_ATOMIC, node)) {
220 kfree(cfg); 231 kfree(cfg);
221 cfg = NULL; 232 cfg = NULL;
222 } else if (!alloc_cpumask_var_node(&cfg->old_domain, 233 } else if (!zalloc_cpumask_var_node(&cfg->old_domain,
223 GFP_ATOMIC, node)) { 234 GFP_ATOMIC, node)) {
224 free_cpumask_var(cfg->domain); 235 free_cpumask_var(cfg->domain);
225 kfree(cfg); 236 kfree(cfg);
226 cfg = NULL; 237 cfg = NULL;
227 } else {
228 cpumask_clear(cfg->domain);
229 cpumask_clear(cfg->old_domain);
230 } 238 }
231 } 239 }
232 240
@@ -867,7 +875,7 @@ static int __init find_isa_irq_apic(int irq, int type)
867 */ 875 */
868static int EISA_ELCR(unsigned int irq) 876static int EISA_ELCR(unsigned int irq)
869{ 877{
870 if (irq < NR_IRQS_LEGACY) { 878 if (irq < nr_legacy_irqs) {
871 unsigned int port = 0x4d0 + (irq >> 3); 879 unsigned int port = 0x4d0 + (irq >> 3);
872 return (inb(port) >> (irq & 7)) & 1; 880 return (inb(port) >> (irq & 7)) & 1;
873 } 881 }
@@ -1464,7 +1472,7 @@ static void setup_IO_APIC_irq(int apic_id, int pin, unsigned int irq, struct irq
1464 } 1472 }
1465 1473
1466 ioapic_register_intr(irq, desc, trigger); 1474 ioapic_register_intr(irq, desc, trigger);
1467 if (irq < NR_IRQS_LEGACY) 1475 if (irq < nr_legacy_irqs)
1468 disable_8259A_irq(irq); 1476 disable_8259A_irq(irq);
1469 1477
1470 ioapic_write_entry(apic_id, pin, entry); 1478 ioapic_write_entry(apic_id, pin, entry);
@@ -1831,7 +1839,7 @@ __apicdebuginit(void) print_PIC(void)
1831 unsigned int v; 1839 unsigned int v;
1832 unsigned long flags; 1840 unsigned long flags;
1833 1841
1834 if (apic_verbosity == APIC_QUIET) 1842 if (apic_verbosity == APIC_QUIET || !nr_legacy_irqs)
1835 return; 1843 return;
1836 1844
1837 printk(KERN_DEBUG "\nprinting PIC contents\n"); 1845 printk(KERN_DEBUG "\nprinting PIC contents\n");
@@ -1863,7 +1871,7 @@ __apicdebuginit(int) print_all_ICs(void)
1863 print_PIC(); 1871 print_PIC();
1864 1872
1865 /* don't print out if apic is not there */ 1873 /* don't print out if apic is not there */
1866 if (!cpu_has_apic || disable_apic) 1874 if (!cpu_has_apic && !apic_from_smp_config())
1867 return 0; 1875 return 0;
1868 1876
1869 print_all_local_APICs(); 1877 print_all_local_APICs();
@@ -1894,6 +1902,10 @@ void __init enable_IO_APIC(void)
1894 spin_unlock_irqrestore(&ioapic_lock, flags); 1902 spin_unlock_irqrestore(&ioapic_lock, flags);
1895 nr_ioapic_registers[apic] = reg_01.bits.entries+1; 1903 nr_ioapic_registers[apic] = reg_01.bits.entries+1;
1896 } 1904 }
1905
1906 if (!nr_legacy_irqs)
1907 return;
1908
1897 for(apic = 0; apic < nr_ioapics; apic++) { 1909 for(apic = 0; apic < nr_ioapics; apic++) {
1898 int pin; 1910 int pin;
1899 /* See if any of the pins is in ExtINT mode */ 1911 /* See if any of the pins is in ExtINT mode */
@@ -1948,6 +1960,9 @@ void disable_IO_APIC(void)
1948 */ 1960 */
1949 clear_IO_APIC(); 1961 clear_IO_APIC();
1950 1962
1963 if (!nr_legacy_irqs)
1964 return;
1965
1951 /* 1966 /*
1952 * If the i8259 is routed through an IOAPIC 1967 * If the i8259 is routed through an IOAPIC
1953 * Put that IOAPIC in virtual wire mode 1968 * Put that IOAPIC in virtual wire mode
@@ -1981,7 +1996,7 @@ void disable_IO_APIC(void)
1981 /* 1996 /*
1982 * Use virtual wire A mode when interrupt remapping is enabled. 1997 * Use virtual wire A mode when interrupt remapping is enabled.
1983 */ 1998 */
1984 if (cpu_has_apic) 1999 if (cpu_has_apic || apic_from_smp_config())
1985 disconnect_bsp_APIC(!intr_remapping_enabled && 2000 disconnect_bsp_APIC(!intr_remapping_enabled &&
1986 ioapic_i8259.pin != -1); 2001 ioapic_i8259.pin != -1);
1987} 2002}
@@ -1994,7 +2009,7 @@ void disable_IO_APIC(void)
1994 * by Matt Domsch <Matt_Domsch@dell.com> Tue Dec 21 12:25:05 CST 1999 2009 * by Matt Domsch <Matt_Domsch@dell.com> Tue Dec 21 12:25:05 CST 1999
1995 */ 2010 */
1996 2011
1997static void __init setup_ioapic_ids_from_mpc(void) 2012void __init setup_ioapic_ids_from_mpc(void)
1998{ 2013{
1999 union IO_APIC_reg_00 reg_00; 2014 union IO_APIC_reg_00 reg_00;
2000 physid_mask_t phys_id_present_map; 2015 physid_mask_t phys_id_present_map;
@@ -2003,9 +2018,8 @@ static void __init setup_ioapic_ids_from_mpc(void)
2003 unsigned char old_id; 2018 unsigned char old_id;
2004 unsigned long flags; 2019 unsigned long flags;
2005 2020
2006 if (x86_quirks->setup_ioapic_ids && x86_quirks->setup_ioapic_ids()) 2021 if (acpi_ioapic)
2007 return; 2022 return;
2008
2009 /* 2023 /*
2010 * Don't check I/O APIC IDs for xAPIC systems. They have 2024 * Don't check I/O APIC IDs for xAPIC systems. They have
2011 * no meaning without the serial APIC bus. 2025 * no meaning without the serial APIC bus.
@@ -2179,7 +2193,7 @@ static unsigned int startup_ioapic_irq(unsigned int irq)
2179 struct irq_cfg *cfg; 2193 struct irq_cfg *cfg;
2180 2194
2181 spin_lock_irqsave(&ioapic_lock, flags); 2195 spin_lock_irqsave(&ioapic_lock, flags);
2182 if (irq < NR_IRQS_LEGACY) { 2196 if (irq < nr_legacy_irqs) {
2183 disable_8259A_irq(irq); 2197 disable_8259A_irq(irq);
2184 if (i8259A_irq_pending(irq)) 2198 if (i8259A_irq_pending(irq))
2185 was_pending = 1; 2199 was_pending = 1;
@@ -2657,7 +2671,7 @@ static inline void init_IO_APIC_traps(void)
2657 * so default to an old-fashioned 8259 2671 * so default to an old-fashioned 8259
2658 * interrupt if we can.. 2672 * interrupt if we can..
2659 */ 2673 */
2660 if (irq < NR_IRQS_LEGACY) 2674 if (irq < nr_legacy_irqs)
2661 make_8259A_irq(irq); 2675 make_8259A_irq(irq);
2662 else 2676 else
2663 /* Strange. Oh, well.. */ 2677 /* Strange. Oh, well.. */
@@ -2993,7 +3007,7 @@ out:
2993 * the I/O APIC in all cases now. No actual device should request 3007 * the I/O APIC in all cases now. No actual device should request
2994 * it anyway. --macro 3008 * it anyway. --macro
2995 */ 3009 */
2996#define PIC_IRQS (1 << PIC_CASCADE_IR) 3010#define PIC_IRQS (1UL << PIC_CASCADE_IR)
2997 3011
2998void __init setup_IO_APIC(void) 3012void __init setup_IO_APIC(void)
2999{ 3013{
@@ -3001,21 +3015,19 @@ void __init setup_IO_APIC(void)
3001 /* 3015 /*
3002 * calling enable_IO_APIC() is moved to setup_local_APIC for BP 3016 * calling enable_IO_APIC() is moved to setup_local_APIC for BP
3003 */ 3017 */
3004 3018 io_apic_irqs = nr_legacy_irqs ? ~PIC_IRQS : ~0UL;
3005 io_apic_irqs = ~PIC_IRQS;
3006 3019
3007 apic_printk(APIC_VERBOSE, "ENABLING IO-APIC IRQs\n"); 3020 apic_printk(APIC_VERBOSE, "ENABLING IO-APIC IRQs\n");
3008 /* 3021 /*
3009 * Set up IO-APIC IRQ routing. 3022 * Set up IO-APIC IRQ routing.
3010 */ 3023 */
3011#ifdef CONFIG_X86_32 3024 x86_init.mpparse.setup_ioapic_ids();
3012 if (!acpi_ioapic) 3025
3013 setup_ioapic_ids_from_mpc();
3014#endif
3015 sync_Arb_IDs(); 3026 sync_Arb_IDs();
3016 setup_IO_APIC_irqs(); 3027 setup_IO_APIC_irqs();
3017 init_IO_APIC_traps(); 3028 init_IO_APIC_traps();
3018 check_timer(); 3029 if (nr_legacy_irqs)
3030 check_timer();
3019} 3031}
3020 3032
3021/* 3033/*
@@ -3116,7 +3128,6 @@ static int __init ioapic_init_sysfs(void)
3116 3128
3117device_initcall(ioapic_init_sysfs); 3129device_initcall(ioapic_init_sysfs);
3118 3130
3119static int nr_irqs_gsi = NR_IRQS_LEGACY;
3120/* 3131/*
3121 * Dynamic irq allocate and deallocation 3132 * Dynamic irq allocate and deallocation
3122 */ 3133 */
@@ -3856,7 +3867,7 @@ static int __io_apic_set_pci_routing(struct device *dev, int irq,
3856 /* 3867 /*
3857 * IRQs < 16 are already in the irq_2_pin[] map 3868 * IRQs < 16 are already in the irq_2_pin[] map
3858 */ 3869 */
3859 if (irq >= NR_IRQS_LEGACY) { 3870 if (irq >= nr_legacy_irqs) {
3860 cfg = desc->chip_data; 3871 cfg = desc->chip_data;
3861 if (add_pin_to_irq_node_nopanic(cfg, node, ioapic, pin)) { 3872 if (add_pin_to_irq_node_nopanic(cfg, node, ioapic, pin)) {
3862 printk(KERN_INFO "can not add pin %d for irq %d\n", 3873 printk(KERN_INFO "can not add pin %d for irq %d\n",
diff --git a/arch/x86/kernel/apic/nmi.c b/arch/x86/kernel/apic/nmi.c
index db7220220d09..7ff61d6a188a 100644
--- a/arch/x86/kernel/apic/nmi.c
+++ b/arch/x86/kernel/apic/nmi.c
@@ -66,7 +66,7 @@ static inline unsigned int get_nmi_count(int cpu)
66 66
67static inline int mce_in_progress(void) 67static inline int mce_in_progress(void)
68{ 68{
69#if defined(CONFIG_X86_NEW_MCE) 69#if defined(CONFIG_X86_MCE)
70 return atomic_read(&mce_entry) > 0; 70 return atomic_read(&mce_entry) > 0;
71#endif 71#endif
72 return 0; 72 return 0;
@@ -508,14 +508,14 @@ static int unknown_nmi_panic_callback(struct pt_regs *regs, int cpu)
508/* 508/*
509 * proc handler for /proc/sys/kernel/nmi 509 * proc handler for /proc/sys/kernel/nmi
510 */ 510 */
511int proc_nmi_enabled(struct ctl_table *table, int write, struct file *file, 511int proc_nmi_enabled(struct ctl_table *table, int write,
512 void __user *buffer, size_t *length, loff_t *ppos) 512 void __user *buffer, size_t *length, loff_t *ppos)
513{ 513{
514 int old_state; 514 int old_state;
515 515
516 nmi_watchdog_enabled = (atomic_read(&nmi_active) > 0) ? 1 : 0; 516 nmi_watchdog_enabled = (atomic_read(&nmi_active) > 0) ? 1 : 0;
517 old_state = nmi_watchdog_enabled; 517 old_state = nmi_watchdog_enabled;
518 proc_dointvec(table, write, file, buffer, length, ppos); 518 proc_dointvec(table, write, buffer, length, ppos);
519 if (!!old_state == !!nmi_watchdog_enabled) 519 if (!!old_state == !!nmi_watchdog_enabled)
520 return 0; 520 return 0;
521 521
diff --git a/arch/x86/kernel/apic/numaq_32.c b/arch/x86/kernel/apic/numaq_32.c
index ca96e68f0d23..efa00e2b8505 100644
--- a/arch/x86/kernel/apic/numaq_32.c
+++ b/arch/x86/kernel/apic/numaq_32.c
@@ -66,7 +66,6 @@ struct mpc_trans {
66 unsigned short trans_reserved; 66 unsigned short trans_reserved;
67}; 67};
68 68
69/* x86_quirks member */
70static int mpc_record; 69static int mpc_record;
71 70
72static struct mpc_trans *translation_table[MAX_MPC_ENTRY]; 71static struct mpc_trans *translation_table[MAX_MPC_ENTRY];
@@ -130,10 +129,9 @@ void __cpuinit numaq_tsc_disable(void)
130 } 129 }
131} 130}
132 131
133static int __init numaq_pre_time_init(void) 132static void __init numaq_tsc_init(void)
134{ 133{
135 numaq_tsc_disable(); 134 numaq_tsc_disable();
136 return 0;
137} 135}
138 136
139static inline int generate_logical_apicid(int quad, int phys_apicid) 137static inline int generate_logical_apicid(int quad, int phys_apicid)
@@ -177,6 +175,19 @@ static void mpc_oem_pci_bus(struct mpc_bus *m)
177 quad_local_to_mp_bus_id[quad][local] = m->busid; 175 quad_local_to_mp_bus_id[quad][local] = m->busid;
178} 176}
179 177
178/*
179 * Called from mpparse code.
180 * mode = 0: prescan
181 * mode = 1: one mpc entry scanned
182 */
183static void numaq_mpc_record(unsigned int mode)
184{
185 if (!mode)
186 mpc_record = 0;
187 else
188 mpc_record++;
189}
190
180static void __init MP_translation_info(struct mpc_trans *m) 191static void __init MP_translation_info(struct mpc_trans *m)
181{ 192{
182 printk(KERN_INFO 193 printk(KERN_INFO
@@ -206,9 +217,9 @@ static int __init mpf_checksum(unsigned char *mp, int len)
206/* 217/*
207 * Read/parse the MPC oem tables 218 * Read/parse the MPC oem tables
208 */ 219 */
209static void __init 220static void __init smp_read_mpc_oem(struct mpc_table *mpc)
210 smp_read_mpc_oem(struct mpc_oemtable *oemtable, unsigned short oemsize)
211{ 221{
222 struct mpc_oemtable *oemtable = (void *)(long)mpc->oemptr;
212 int count = sizeof(*oemtable); /* the header size */ 223 int count = sizeof(*oemtable); /* the header size */
213 unsigned char *oemptr = ((unsigned char *)oemtable) + count; 224 unsigned char *oemptr = ((unsigned char *)oemtable) + count;
214 225
@@ -250,29 +261,6 @@ static void __init
250 } 261 }
251} 262}
252 263
253static int __init numaq_setup_ioapic_ids(void)
254{
255 /* so can skip it */
256 return 1;
257}
258
259static struct x86_quirks numaq_x86_quirks __initdata = {
260 .arch_pre_time_init = numaq_pre_time_init,
261 .arch_time_init = NULL,
262 .arch_pre_intr_init = NULL,
263 .arch_memory_setup = NULL,
264 .arch_intr_init = NULL,
265 .arch_trap_init = NULL,
266 .mach_get_smp_config = NULL,
267 .mach_find_smp_config = NULL,
268 .mpc_record = &mpc_record,
269 .mpc_apic_id = mpc_apic_id,
270 .mpc_oem_bus_info = mpc_oem_bus_info,
271 .mpc_oem_pci_bus = mpc_oem_pci_bus,
272 .smp_read_mpc_oem = smp_read_mpc_oem,
273 .setup_ioapic_ids = numaq_setup_ioapic_ids,
274};
275
276static __init void early_check_numaq(void) 264static __init void early_check_numaq(void)
277{ 265{
278 /* 266 /*
@@ -286,8 +274,15 @@ static __init void early_check_numaq(void)
286 if (smp_found_config) 274 if (smp_found_config)
287 early_get_smp_config(); 275 early_get_smp_config();
288 276
289 if (found_numaq) 277 if (found_numaq) {
290 x86_quirks = &numaq_x86_quirks; 278 x86_init.mpparse.mpc_record = numaq_mpc_record;
279 x86_init.mpparse.setup_ioapic_ids = x86_init_noop;
280 x86_init.mpparse.mpc_apic_id = mpc_apic_id;
281 x86_init.mpparse.smp_read_mpc_oem = smp_read_mpc_oem;
282 x86_init.mpparse.mpc_oem_pci_bus = mpc_oem_pci_bus;
283 x86_init.mpparse.mpc_oem_bus_info = mpc_oem_bus_info;
284 x86_init.timers.tsc_pre_init = numaq_tsc_init;
285 }
291} 286}
292 287
293int __init get_memcfg_numaq(void) 288int __init get_memcfg_numaq(void)
@@ -418,7 +413,7 @@ static inline physid_mask_t numaq_apicid_to_cpu_present(int logical_apicid)
418/* Where the IO area was mapped on multiquad, always 0 otherwise */ 413/* Where the IO area was mapped on multiquad, always 0 otherwise */
419void *xquad_portio; 414void *xquad_portio;
420 415
421static inline int numaq_check_phys_apicid_present(int boot_cpu_physical_apicid) 416static inline int numaq_check_phys_apicid_present(int phys_apicid)
422{ 417{
423 return 1; 418 return 1;
424} 419}
diff --git a/arch/x86/kernel/apic/probe_64.c b/arch/x86/kernel/apic/probe_64.c
index 65edc180fc82..c4cbd3080c1c 100644
--- a/arch/x86/kernel/apic/probe_64.c
+++ b/arch/x86/kernel/apic/probe_64.c
@@ -64,16 +64,23 @@ void __init default_setup_apic_routing(void)
64 apic = &apic_x2apic_phys; 64 apic = &apic_x2apic_phys;
65 else 65 else
66 apic = &apic_x2apic_cluster; 66 apic = &apic_x2apic_cluster;
67 printk(KERN_INFO "Setting APIC routing to %s\n", apic->name);
68 } 67 }
69#endif 68#endif
70 69
71 if (apic == &apic_flat) { 70 if (apic == &apic_flat) {
72 if (max_physical_apicid >= 8) 71 switch (boot_cpu_data.x86_vendor) {
73 apic = &apic_physflat; 72 case X86_VENDOR_INTEL:
74 printk(KERN_INFO "Setting APIC routing to %s\n", apic->name); 73 if (num_processors > 8)
74 apic = &apic_physflat;
75 break;
76 case X86_VENDOR_AMD:
77 if (max_physical_apicid >= 8)
78 apic = &apic_physflat;
79 }
75 } 80 }
76 81
82 printk(KERN_INFO "Setting APIC routing to %s\n", apic->name);
83
77 if (is_vsmp_box()) { 84 if (is_vsmp_box()) {
78 /* need to update phys_pkg_id */ 85 /* need to update phys_pkg_id */
79 apic->phys_pkg_id = apicid_phys_pkg_id; 86 apic->phys_pkg_id = apicid_phys_pkg_id;
diff --git a/arch/x86/kernel/apic/summit_32.c b/arch/x86/kernel/apic/summit_32.c
index eafdfbd1ea95..645ecc4ff0be 100644
--- a/arch/x86/kernel/apic/summit_32.c
+++ b/arch/x86/kernel/apic/summit_32.c
@@ -272,7 +272,7 @@ static physid_mask_t summit_apicid_to_cpu_present(int apicid)
272 return physid_mask_of_physid(0); 272 return physid_mask_of_physid(0);
273} 273}
274 274
275static int summit_check_phys_apicid_present(int boot_cpu_physical_apicid) 275static int summit_check_phys_apicid_present(int physical_apicid)
276{ 276{
277 return 1; 277 return 1;
278} 278}
diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c
index 601159374e87..f5f5886a6b53 100644
--- a/arch/x86/kernel/apic/x2apic_uv_x.c
+++ b/arch/x86/kernel/apic/x2apic_uv_x.c
@@ -389,6 +389,16 @@ static __init void map_gru_high(int max_pnode)
389 map_high("GRU", gru.s.base, shift, max_pnode, map_wb); 389 map_high("GRU", gru.s.base, shift, max_pnode, map_wb);
390} 390}
391 391
392static __init void map_mmr_high(int max_pnode)
393{
394 union uvh_rh_gam_mmr_overlay_config_mmr_u mmr;
395 int shift = UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR_BASE_SHFT;
396
397 mmr.v = uv_read_local_mmr(UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR);
398 if (mmr.s.enable)
399 map_high("MMR", mmr.s.base, shift, max_pnode, map_uc);
400}
401
392static __init void map_mmioh_high(int max_pnode) 402static __init void map_mmioh_high(int max_pnode)
393{ 403{
394 union uvh_rh_gam_mmioh_overlay_config_mmr_u mmioh; 404 union uvh_rh_gam_mmioh_overlay_config_mmr_u mmioh;
@@ -643,6 +653,7 @@ void __init uv_system_init(void)
643 } 653 }
644 654
645 map_gru_high(max_pnode); 655 map_gru_high(max_pnode);
656 map_mmr_high(max_pnode);
646 map_mmioh_high(max_pnode); 657 map_mmioh_high(max_pnode);
647 658
648 uv_cpu_init(); 659 uv_cpu_init();
diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile
index c1f253dac155..68537e957a9b 100644
--- a/arch/x86/kernel/cpu/Makefile
+++ b/arch/x86/kernel/cpu/Makefile
@@ -13,7 +13,7 @@ CFLAGS_common.o := $(nostackp)
13 13
14obj-y := intel_cacheinfo.o addon_cpuid_features.o 14obj-y := intel_cacheinfo.o addon_cpuid_features.o
15obj-y += proc.o capflags.o powerflags.o common.o 15obj-y += proc.o capflags.o powerflags.o common.o
16obj-y += vmware.o hypervisor.o 16obj-y += vmware.o hypervisor.o sched.o
17 17
18obj-$(CONFIG_X86_32) += bugs.o cmpxchg.o 18obj-$(CONFIG_X86_32) += bugs.o cmpxchg.o
19obj-$(CONFIG_X86_64) += bugs_64.o 19obj-$(CONFIG_X86_64) += bugs_64.o
@@ -27,7 +27,7 @@ obj-$(CONFIG_CPU_SUP_CENTAUR) += centaur.o
27obj-$(CONFIG_CPU_SUP_TRANSMETA_32) += transmeta.o 27obj-$(CONFIG_CPU_SUP_TRANSMETA_32) += transmeta.o
28obj-$(CONFIG_CPU_SUP_UMC_32) += umc.o 28obj-$(CONFIG_CPU_SUP_UMC_32) += umc.o
29 29
30obj-$(CONFIG_PERF_COUNTERS) += perf_counter.o 30obj-$(CONFIG_PERF_EVENTS) += perf_event.o
31 31
32obj-$(CONFIG_X86_MCE) += mcheck/ 32obj-$(CONFIG_X86_MCE) += mcheck/
33obj-$(CONFIG_MTRR) += mtrr/ 33obj-$(CONFIG_MTRR) += mtrr/
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index 22a47c82f3c0..c910a716a71c 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -184,7 +184,7 @@ static void __cpuinit amd_k7_smp_check(struct cpuinfo_x86 *c)
184 * approved Athlon 184 * approved Athlon
185 */ 185 */
186 WARN_ONCE(1, "WARNING: This combination of AMD" 186 WARN_ONCE(1, "WARNING: This combination of AMD"
187 "processors is not suitable for SMP.\n"); 187 " processors is not suitable for SMP.\n");
188 if (!test_taint(TAINT_UNSAFE_SMP)) 188 if (!test_taint(TAINT_UNSAFE_SMP))
189 add_taint(TAINT_UNSAFE_SMP); 189 add_taint(TAINT_UNSAFE_SMP);
190 190
@@ -333,6 +333,16 @@ static void __cpuinit amd_detect_cmp(struct cpuinfo_x86 *c)
333#endif 333#endif
334} 334}
335 335
336int amd_get_nb_id(int cpu)
337{
338 int id = 0;
339#ifdef CONFIG_SMP
340 id = per_cpu(cpu_llc_id, cpu);
341#endif
342 return id;
343}
344EXPORT_SYMBOL_GPL(amd_get_nb_id);
345
336static void __cpuinit srat_detect_node(struct cpuinfo_x86 *c) 346static void __cpuinit srat_detect_node(struct cpuinfo_x86 *c)
337{ 347{
338#if defined(CONFIG_NUMA) && defined(CONFIG_X86_64) 348#if defined(CONFIG_NUMA) && defined(CONFIG_X86_64)
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index 2055fc2b2e6b..cc25c2b4a567 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -13,7 +13,7 @@
13#include <linux/io.h> 13#include <linux/io.h>
14 14
15#include <asm/stackprotector.h> 15#include <asm/stackprotector.h>
16#include <asm/perf_counter.h> 16#include <asm/perf_event.h>
17#include <asm/mmu_context.h> 17#include <asm/mmu_context.h>
18#include <asm/hypervisor.h> 18#include <asm/hypervisor.h>
19#include <asm/processor.h> 19#include <asm/processor.h>
@@ -34,7 +34,6 @@
34#include <asm/mce.h> 34#include <asm/mce.h>
35#include <asm/msr.h> 35#include <asm/msr.h>
36#include <asm/pat.h> 36#include <asm/pat.h>
37#include <linux/smp.h>
38 37
39#ifdef CONFIG_X86_LOCAL_APIC 38#ifdef CONFIG_X86_LOCAL_APIC
40#include <asm/uv/uv.h> 39#include <asm/uv/uv.h>
@@ -870,7 +869,7 @@ void __init identify_boot_cpu(void)
870#else 869#else
871 vgetcpu_set_mode(); 870 vgetcpu_set_mode();
872#endif 871#endif
873 init_hw_perf_counters(); 872 init_hw_perf_events();
874} 873}
875 874
876void __cpuinit identify_secondary_cpu(struct cpuinfo_x86 *c) 875void __cpuinit identify_secondary_cpu(struct cpuinfo_x86 *c)
diff --git a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
index ae9b503220ca..7d5c3b0ea8da 100644
--- a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
+++ b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
@@ -33,7 +33,7 @@
33#include <linux/cpufreq.h> 33#include <linux/cpufreq.h>
34#include <linux/compiler.h> 34#include <linux/compiler.h>
35#include <linux/dmi.h> 35#include <linux/dmi.h>
36#include <trace/power.h> 36#include <trace/events/power.h>
37 37
38#include <linux/acpi.h> 38#include <linux/acpi.h>
39#include <linux/io.h> 39#include <linux/io.h>
@@ -60,7 +60,6 @@ enum {
60}; 60};
61 61
62#define INTEL_MSR_RANGE (0xffff) 62#define INTEL_MSR_RANGE (0xffff)
63#define CPUID_6_ECX_APERFMPERF_CAPABILITY (0x1)
64 63
65struct acpi_cpufreq_data { 64struct acpi_cpufreq_data {
66 struct acpi_processor_performance *acpi_data; 65 struct acpi_processor_performance *acpi_data;
@@ -71,13 +70,7 @@ struct acpi_cpufreq_data {
71 70
72static DEFINE_PER_CPU(struct acpi_cpufreq_data *, drv_data); 71static DEFINE_PER_CPU(struct acpi_cpufreq_data *, drv_data);
73 72
74struct acpi_msr_data { 73static DEFINE_PER_CPU(struct aperfmperf, old_perf);
75 u64 saved_aperf, saved_mperf;
76};
77
78static DEFINE_PER_CPU(struct acpi_msr_data, msr_data);
79
80DEFINE_TRACE(power_mark);
81 74
82/* acpi_perf_data is a pointer to percpu data. */ 75/* acpi_perf_data is a pointer to percpu data. */
83static struct acpi_processor_performance *acpi_perf_data; 76static struct acpi_processor_performance *acpi_perf_data;
@@ -244,23 +237,12 @@ static u32 get_cur_val(const struct cpumask *mask)
244 return cmd.val; 237 return cmd.val;
245} 238}
246 239
247struct perf_pair {
248 union {
249 struct {
250 u32 lo;
251 u32 hi;
252 } split;
253 u64 whole;
254 } aperf, mperf;
255};
256
257/* Called via smp_call_function_single(), on the target CPU */ 240/* Called via smp_call_function_single(), on the target CPU */
258static void read_measured_perf_ctrs(void *_cur) 241static void read_measured_perf_ctrs(void *_cur)
259{ 242{
260 struct perf_pair *cur = _cur; 243 struct aperfmperf *am = _cur;
261 244
262 rdmsr(MSR_IA32_APERF, cur->aperf.split.lo, cur->aperf.split.hi); 245 get_aperfmperf(am);
263 rdmsr(MSR_IA32_MPERF, cur->mperf.split.lo, cur->mperf.split.hi);
264} 246}
265 247
266/* 248/*
@@ -279,63 +261,17 @@ static void read_measured_perf_ctrs(void *_cur)
279static unsigned int get_measured_perf(struct cpufreq_policy *policy, 261static unsigned int get_measured_perf(struct cpufreq_policy *policy,
280 unsigned int cpu) 262 unsigned int cpu)
281{ 263{
282 struct perf_pair readin, cur; 264 struct aperfmperf perf;
283 unsigned int perf_percent; 265 unsigned long ratio;
284 unsigned int retval; 266 unsigned int retval;
285 267
286 if (smp_call_function_single(cpu, read_measured_perf_ctrs, &readin, 1)) 268 if (smp_call_function_single(cpu, read_measured_perf_ctrs, &perf, 1))
287 return 0; 269 return 0;
288 270
289 cur.aperf.whole = readin.aperf.whole - 271 ratio = calc_aperfmperf_ratio(&per_cpu(old_perf, cpu), &perf);
290 per_cpu(msr_data, cpu).saved_aperf; 272 per_cpu(old_perf, cpu) = perf;
291 cur.mperf.whole = readin.mperf.whole -
292 per_cpu(msr_data, cpu).saved_mperf;
293 per_cpu(msr_data, cpu).saved_aperf = readin.aperf.whole;
294 per_cpu(msr_data, cpu).saved_mperf = readin.mperf.whole;
295
296#ifdef __i386__
297 /*
298 * We dont want to do 64 bit divide with 32 bit kernel
299 * Get an approximate value. Return failure in case we cannot get
300 * an approximate value.
301 */
302 if (unlikely(cur.aperf.split.hi || cur.mperf.split.hi)) {
303 int shift_count;
304 u32 h;
305
306 h = max_t(u32, cur.aperf.split.hi, cur.mperf.split.hi);
307 shift_count = fls(h);
308
309 cur.aperf.whole >>= shift_count;
310 cur.mperf.whole >>= shift_count;
311 }
312
313 if (((unsigned long)(-1) / 100) < cur.aperf.split.lo) {
314 int shift_count = 7;
315 cur.aperf.split.lo >>= shift_count;
316 cur.mperf.split.lo >>= shift_count;
317 }
318
319 if (cur.aperf.split.lo && cur.mperf.split.lo)
320 perf_percent = (cur.aperf.split.lo * 100) / cur.mperf.split.lo;
321 else
322 perf_percent = 0;
323
324#else
325 if (unlikely(((unsigned long)(-1) / 100) < cur.aperf.whole)) {
326 int shift_count = 7;
327 cur.aperf.whole >>= shift_count;
328 cur.mperf.whole >>= shift_count;
329 }
330
331 if (cur.aperf.whole && cur.mperf.whole)
332 perf_percent = (cur.aperf.whole * 100) / cur.mperf.whole;
333 else
334 perf_percent = 0;
335
336#endif
337 273
338 retval = (policy->cpuinfo.max_freq * perf_percent) / 100; 274 retval = (policy->cpuinfo.max_freq * ratio) >> APERFMPERF_SHIFT;
339 275
340 return retval; 276 return retval;
341} 277}
@@ -394,7 +330,6 @@ static int acpi_cpufreq_target(struct cpufreq_policy *policy,
394 unsigned int next_perf_state = 0; /* Index into perf table */ 330 unsigned int next_perf_state = 0; /* Index into perf table */
395 unsigned int i; 331 unsigned int i;
396 int result = 0; 332 int result = 0;
397 struct power_trace it;
398 333
399 dprintk("acpi_cpufreq_target %d (%d)\n", target_freq, policy->cpu); 334 dprintk("acpi_cpufreq_target %d (%d)\n", target_freq, policy->cpu);
400 335
@@ -426,7 +361,7 @@ static int acpi_cpufreq_target(struct cpufreq_policy *policy,
426 } 361 }
427 } 362 }
428 363
429 trace_power_mark(&it, POWER_PSTATE, next_perf_state); 364 trace_power_frequency(POWER_PSTATE, data->freq_table[next_state].frequency);
430 365
431 switch (data->cpu_feature) { 366 switch (data->cpu_feature) {
432 case SYSTEM_INTEL_MSR_CAPABLE: 367 case SYSTEM_INTEL_MSR_CAPABLE:
@@ -588,6 +523,21 @@ static const struct dmi_system_id sw_any_bug_dmi_table[] = {
588 }, 523 },
589 { } 524 { }
590}; 525};
526
527static int acpi_cpufreq_blacklist(struct cpuinfo_x86 *c)
528{
529 /* http://www.intel.com/Assets/PDF/specupdate/314554.pdf
530 * AL30: A Machine Check Exception (MCE) Occurring during an
531 * Enhanced Intel SpeedStep Technology Ratio Change May Cause
532 * Both Processor Cores to Lock Up when HT is enabled*/
533 if (c->x86_vendor == X86_VENDOR_INTEL) {
534 if ((c->x86 == 15) &&
535 (c->x86_model == 6) &&
536 (c->x86_mask == 8) && smt_capable())
537 return -ENODEV;
538 }
539 return 0;
540}
591#endif 541#endif
592 542
593static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy) 543static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
@@ -602,6 +552,12 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
602 552
603 dprintk("acpi_cpufreq_cpu_init\n"); 553 dprintk("acpi_cpufreq_cpu_init\n");
604 554
555#ifdef CONFIG_SMP
556 result = acpi_cpufreq_blacklist(c);
557 if (result)
558 return result;
559#endif
560
605 data = kzalloc(sizeof(struct acpi_cpufreq_data), GFP_KERNEL); 561 data = kzalloc(sizeof(struct acpi_cpufreq_data), GFP_KERNEL);
606 if (!data) 562 if (!data)
607 return -ENOMEM; 563 return -ENOMEM;
@@ -731,12 +687,8 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
731 acpi_processor_notify_smm(THIS_MODULE); 687 acpi_processor_notify_smm(THIS_MODULE);
732 688
733 /* Check for APERF/MPERF support in hardware */ 689 /* Check for APERF/MPERF support in hardware */
734 if (c->x86_vendor == X86_VENDOR_INTEL && c->cpuid_level >= 6) { 690 if (cpu_has(c, X86_FEATURE_APERFMPERF))
735 unsigned int ecx; 691 acpi_cpufreq_driver.getavg = get_measured_perf;
736 ecx = cpuid_ecx(6);
737 if (ecx & CPUID_6_ECX_APERFMPERF_CAPABILITY)
738 acpi_cpufreq_driver.getavg = get_measured_perf;
739 }
740 692
741 dprintk("CPU%u - ACPI performance management activated.\n", cpu); 693 dprintk("CPU%u - ACPI performance management activated.\n", cpu);
742 for (i = 0; i < perf->state_count; i++) 694 for (i = 0; i < perf->state_count; i++)
diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
index 2a50ef891000..6394aa5c7985 100644
--- a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
+++ b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
@@ -605,9 +605,10 @@ static int check_pst_table(struct powernow_k8_data *data, struct pst_s *pst,
605 return 0; 605 return 0;
606} 606}
607 607
608static void invalidate_entry(struct powernow_k8_data *data, unsigned int entry) 608static void invalidate_entry(struct cpufreq_frequency_table *powernow_table,
609 unsigned int entry)
609{ 610{
610 data->powernow_table[entry].frequency = CPUFREQ_ENTRY_INVALID; 611 powernow_table[entry].frequency = CPUFREQ_ENTRY_INVALID;
611} 612}
612 613
613static void print_basics(struct powernow_k8_data *data) 614static void print_basics(struct powernow_k8_data *data)
@@ -854,6 +855,10 @@ static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data)
854 goto err_out; 855 goto err_out;
855 } 856 }
856 857
858 /* fill in data */
859 data->numps = data->acpi_data.state_count;
860 powernow_k8_acpi_pst_values(data, 0);
861
857 if (cpu_family == CPU_HW_PSTATE) 862 if (cpu_family == CPU_HW_PSTATE)
858 ret_val = fill_powernow_table_pstate(data, powernow_table); 863 ret_val = fill_powernow_table_pstate(data, powernow_table);
859 else 864 else
@@ -866,11 +871,8 @@ static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data)
866 powernow_table[data->acpi_data.state_count].index = 0; 871 powernow_table[data->acpi_data.state_count].index = 0;
867 data->powernow_table = powernow_table; 872 data->powernow_table = powernow_table;
868 873
869 /* fill in data */
870 data->numps = data->acpi_data.state_count;
871 if (cpumask_first(cpu_core_mask(data->cpu)) == data->cpu) 874 if (cpumask_first(cpu_core_mask(data->cpu)) == data->cpu)
872 print_basics(data); 875 print_basics(data);
873 powernow_k8_acpi_pst_values(data, 0);
874 876
875 /* notify BIOS that we exist */ 877 /* notify BIOS that we exist */
876 acpi_processor_notify_smm(THIS_MODULE); 878 acpi_processor_notify_smm(THIS_MODULE);
@@ -914,13 +916,13 @@ static int fill_powernow_table_pstate(struct powernow_k8_data *data,
914 "bad value %d.\n", i, index); 916 "bad value %d.\n", i, index);
915 printk(KERN_ERR PFX "Please report to BIOS " 917 printk(KERN_ERR PFX "Please report to BIOS "
916 "manufacturer\n"); 918 "manufacturer\n");
917 invalidate_entry(data, i); 919 invalidate_entry(powernow_table, i);
918 continue; 920 continue;
919 } 921 }
920 rdmsr(MSR_PSTATE_DEF_BASE + index, lo, hi); 922 rdmsr(MSR_PSTATE_DEF_BASE + index, lo, hi);
921 if (!(hi & HW_PSTATE_VALID_MASK)) { 923 if (!(hi & HW_PSTATE_VALID_MASK)) {
922 dprintk("invalid pstate %d, ignoring\n", index); 924 dprintk("invalid pstate %d, ignoring\n", index);
923 invalidate_entry(data, i); 925 invalidate_entry(powernow_table, i);
924 continue; 926 continue;
925 } 927 }
926 928
@@ -941,7 +943,6 @@ static int fill_powernow_table_fidvid(struct powernow_k8_data *data,
941 struct cpufreq_frequency_table *powernow_table) 943 struct cpufreq_frequency_table *powernow_table)
942{ 944{
943 int i; 945 int i;
944 int cntlofreq = 0;
945 946
946 for (i = 0; i < data->acpi_data.state_count; i++) { 947 for (i = 0; i < data->acpi_data.state_count; i++) {
947 u32 fid; 948 u32 fid;
@@ -970,7 +971,7 @@ static int fill_powernow_table_fidvid(struct powernow_k8_data *data,
970 /* verify frequency is OK */ 971 /* verify frequency is OK */
971 if ((freq > (MAX_FREQ * 1000)) || (freq < (MIN_FREQ * 1000))) { 972 if ((freq > (MAX_FREQ * 1000)) || (freq < (MIN_FREQ * 1000))) {
972 dprintk("invalid freq %u kHz, ignoring\n", freq); 973 dprintk("invalid freq %u kHz, ignoring\n", freq);
973 invalidate_entry(data, i); 974 invalidate_entry(powernow_table, i);
974 continue; 975 continue;
975 } 976 }
976 977
@@ -978,38 +979,17 @@ static int fill_powernow_table_fidvid(struct powernow_k8_data *data,
978 * BIOSs are using "off" to indicate invalid */ 979 * BIOSs are using "off" to indicate invalid */
979 if (vid == VID_OFF) { 980 if (vid == VID_OFF) {
980 dprintk("invalid vid %u, ignoring\n", vid); 981 dprintk("invalid vid %u, ignoring\n", vid);
981 invalidate_entry(data, i); 982 invalidate_entry(powernow_table, i);
982 continue; 983 continue;
983 } 984 }
984 985
985 /* verify only 1 entry from the lo frequency table */
986 if (fid < HI_FID_TABLE_BOTTOM) {
987 if (cntlofreq) {
988 /* if both entries are the same,
989 * ignore this one ... */
990 if ((freq != powernow_table[cntlofreq].frequency) ||
991 (index != powernow_table[cntlofreq].index)) {
992 printk(KERN_ERR PFX
993 "Too many lo freq table "
994 "entries\n");
995 return 1;
996 }
997
998 dprintk("double low frequency table entry, "
999 "ignoring it.\n");
1000 invalidate_entry(data, i);
1001 continue;
1002 } else
1003 cntlofreq = i;
1004 }
1005
1006 if (freq != (data->acpi_data.states[i].core_frequency * 1000)) { 986 if (freq != (data->acpi_data.states[i].core_frequency * 1000)) {
1007 printk(KERN_INFO PFX "invalid freq entries " 987 printk(KERN_INFO PFX "invalid freq entries "
1008 "%u kHz vs. %u kHz\n", freq, 988 "%u kHz vs. %u kHz\n", freq,
1009 (unsigned int) 989 (unsigned int)
1010 (data->acpi_data.states[i].core_frequency 990 (data->acpi_data.states[i].core_frequency
1011 * 1000)); 991 * 1000));
1012 invalidate_entry(data, i); 992 invalidate_entry(powernow_table, i);
1013 continue; 993 continue;
1014 } 994 }
1015 } 995 }
diff --git a/arch/x86/kernel/cpu/hypervisor.c b/arch/x86/kernel/cpu/hypervisor.c
index 93ba8eeb100a..08be922de33a 100644
--- a/arch/x86/kernel/cpu/hypervisor.c
+++ b/arch/x86/kernel/cpu/hypervisor.c
@@ -34,13 +34,6 @@ detect_hypervisor_vendor(struct cpuinfo_x86 *c)
34 c->x86_hyper_vendor = X86_HYPER_VENDOR_NONE; 34 c->x86_hyper_vendor = X86_HYPER_VENDOR_NONE;
35} 35}
36 36
37unsigned long get_hypervisor_tsc_freq(void)
38{
39 if (boot_cpu_data.x86_hyper_vendor == X86_HYPER_VENDOR_VMWARE)
40 return vmware_get_tsc_khz();
41 return 0;
42}
43
44static inline void __cpuinit 37static inline void __cpuinit
45hypervisor_set_feature_bits(struct cpuinfo_x86 *c) 38hypervisor_set_feature_bits(struct cpuinfo_x86 *c)
46{ 39{
@@ -55,3 +48,10 @@ void __cpuinit init_hypervisor(struct cpuinfo_x86 *c)
55 detect_hypervisor_vendor(c); 48 detect_hypervisor_vendor(c);
56 hypervisor_set_feature_bits(c); 49 hypervisor_set_feature_bits(c);
57} 50}
51
52void __init init_hypervisor_platform(void)
53{
54 init_hypervisor(&boot_cpu_data);
55 if (boot_cpu_data.x86_hyper_vendor == X86_HYPER_VENDOR_VMWARE)
56 vmware_platform_setup();
57}
diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c
index 80a722a071b5..40e1835b35e8 100644
--- a/arch/x86/kernel/cpu/intel.c
+++ b/arch/x86/kernel/cpu/intel.c
@@ -350,6 +350,12 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c)
350 set_cpu_cap(c, X86_FEATURE_ARCH_PERFMON); 350 set_cpu_cap(c, X86_FEATURE_ARCH_PERFMON);
351 } 351 }
352 352
353 if (c->cpuid_level > 6) {
354 unsigned ecx = cpuid_ecx(6);
355 if (ecx & 0x01)
356 set_cpu_cap(c, X86_FEATURE_APERFMPERF);
357 }
358
353 if (cpu_has_xmm2) 359 if (cpu_has_xmm2)
354 set_cpu_cap(c, X86_FEATURE_LFENCE_RDTSC); 360 set_cpu_cap(c, X86_FEATURE_LFENCE_RDTSC);
355 if (cpu_has_ds) { 361 if (cpu_has_ds) {
diff --git a/arch/x86/kernel/cpu/mcheck/Makefile b/arch/x86/kernel/cpu/mcheck/Makefile
index 188a1ca5ad2b..4ac6d48fe11b 100644
--- a/arch/x86/kernel/cpu/mcheck/Makefile
+++ b/arch/x86/kernel/cpu/mcheck/Makefile
@@ -1,11 +1,8 @@
1obj-y = mce.o 1obj-y = mce.o mce-severity.o
2 2
3obj-$(CONFIG_X86_NEW_MCE) += mce-severity.o
4obj-$(CONFIG_X86_OLD_MCE) += k7.o p4.o p6.o
5obj-$(CONFIG_X86_ANCIENT_MCE) += winchip.o p5.o 3obj-$(CONFIG_X86_ANCIENT_MCE) += winchip.o p5.o
6obj-$(CONFIG_X86_MCE_INTEL) += mce_intel.o 4obj-$(CONFIG_X86_MCE_INTEL) += mce_intel.o
7obj-$(CONFIG_X86_MCE_AMD) += mce_amd.o 5obj-$(CONFIG_X86_MCE_AMD) += mce_amd.o
8obj-$(CONFIG_X86_MCE_NONFATAL) += non-fatal.o
9obj-$(CONFIG_X86_MCE_THRESHOLD) += threshold.o 6obj-$(CONFIG_X86_MCE_THRESHOLD) += threshold.o
10obj-$(CONFIG_X86_MCE_INJECT) += mce-inject.o 7obj-$(CONFIG_X86_MCE_INJECT) += mce-inject.o
11 8
diff --git a/arch/x86/kernel/cpu/mcheck/k7.c b/arch/x86/kernel/cpu/mcheck/k7.c
deleted file mode 100644
index b945d5dbc609..000000000000
--- a/arch/x86/kernel/cpu/mcheck/k7.c
+++ /dev/null
@@ -1,116 +0,0 @@
1/*
2 * Athlon specific Machine Check Exception Reporting
3 * (C) Copyright 2002 Dave Jones <davej@redhat.com>
4 */
5#include <linux/interrupt.h>
6#include <linux/kernel.h>
7#include <linux/types.h>
8#include <linux/init.h>
9#include <linux/smp.h>
10
11#include <asm/processor.h>
12#include <asm/system.h>
13#include <asm/mce.h>
14#include <asm/msr.h>
15
16/* Machine Check Handler For AMD Athlon/Duron: */
17static void k7_machine_check(struct pt_regs *regs, long error_code)
18{
19 u32 alow, ahigh, high, low;
20 u32 mcgstl, mcgsth;
21 int recover = 1;
22 int i;
23
24 rdmsr(MSR_IA32_MCG_STATUS, mcgstl, mcgsth);
25 if (mcgstl & (1<<0)) /* Recoverable ? */
26 recover = 0;
27
28 printk(KERN_EMERG "CPU %d: Machine Check Exception: %08x%08x\n",
29 smp_processor_id(), mcgsth, mcgstl);
30
31 for (i = 1; i < nr_mce_banks; i++) {
32 rdmsr(MSR_IA32_MC0_STATUS+i*4, low, high);
33 if (high & (1<<31)) {
34 char misc[20];
35 char addr[24];
36
37 misc[0] = '\0';
38 addr[0] = '\0';
39
40 if (high & (1<<29))
41 recover |= 1;
42 if (high & (1<<25))
43 recover |= 2;
44 high &= ~(1<<31);
45
46 if (high & (1<<27)) {
47 rdmsr(MSR_IA32_MC0_MISC+i*4, alow, ahigh);
48 snprintf(misc, 20, "[%08x%08x]", ahigh, alow);
49 }
50 if (high & (1<<26)) {
51 rdmsr(MSR_IA32_MC0_ADDR+i*4, alow, ahigh);
52 snprintf(addr, 24, " at %08x%08x", ahigh, alow);
53 }
54
55 printk(KERN_EMERG "CPU %d: Bank %d: %08x%08x%s%s\n",
56 smp_processor_id(), i, high, low, misc, addr);
57
58 /* Clear it: */
59 wrmsr(MSR_IA32_MC0_STATUS+i*4, 0UL, 0UL);
60 /* Serialize: */
61 wmb();
62 add_taint(TAINT_MACHINE_CHECK);
63 }
64 }
65
66 if (recover & 2)
67 panic("CPU context corrupt");
68 if (recover & 1)
69 panic("Unable to continue");
70
71 printk(KERN_EMERG "Attempting to continue.\n");
72
73 mcgstl &= ~(1<<2);
74 wrmsr(MSR_IA32_MCG_STATUS, mcgstl, mcgsth);
75}
76
77
78/* AMD K7 machine check is Intel like: */
79void amd_mcheck_init(struct cpuinfo_x86 *c)
80{
81 u32 l, h;
82 int i;
83
84 if (!cpu_has(c, X86_FEATURE_MCE))
85 return;
86
87 machine_check_vector = k7_machine_check;
88 /* Make sure the vector pointer is visible before we enable MCEs: */
89 wmb();
90
91 printk(KERN_INFO "Intel machine check architecture supported.\n");
92
93 rdmsr(MSR_IA32_MCG_CAP, l, h);
94 if (l & (1<<8)) /* Control register present ? */
95 wrmsr(MSR_IA32_MCG_CTL, 0xffffffff, 0xffffffff);
96 nr_mce_banks = l & 0xff;
97
98 /*
99 * Clear status for MC index 0 separately, we don't touch CTL,
100 * as some K7 Athlons cause spurious MCEs when its enabled:
101 */
102 if (boot_cpu_data.x86 == 6) {
103 wrmsr(MSR_IA32_MC0_STATUS, 0x0, 0x0);
104 i = 1;
105 } else
106 i = 0;
107
108 for (; i < nr_mce_banks; i++) {
109 wrmsr(MSR_IA32_MC0_CTL+4*i, 0xffffffff, 0xffffffff);
110 wrmsr(MSR_IA32_MC0_STATUS+4*i, 0x0, 0x0);
111 }
112
113 set_in_cr4(X86_CR4_MCE);
114 printk(KERN_INFO "Intel machine check reporting enabled on CPU#%d.\n",
115 smp_processor_id());
116}
diff --git a/arch/x86/kernel/cpu/mcheck/mce-inject.c b/arch/x86/kernel/cpu/mcheck/mce-inject.c
index a3a235a53f09..7029f0e2acad 100644
--- a/arch/x86/kernel/cpu/mcheck/mce-inject.c
+++ b/arch/x86/kernel/cpu/mcheck/mce-inject.c
@@ -18,7 +18,12 @@
18#include <linux/string.h> 18#include <linux/string.h>
19#include <linux/fs.h> 19#include <linux/fs.h>
20#include <linux/smp.h> 20#include <linux/smp.h>
21#include <linux/notifier.h>
22#include <linux/kdebug.h>
23#include <linux/cpu.h>
24#include <linux/sched.h>
21#include <asm/mce.h> 25#include <asm/mce.h>
26#include <asm/apic.h>
22 27
23/* Update fake mce registers on current CPU. */ 28/* Update fake mce registers on current CPU. */
24static void inject_mce(struct mce *m) 29static void inject_mce(struct mce *m)
@@ -39,44 +44,141 @@ static void inject_mce(struct mce *m)
39 i->finished = 1; 44 i->finished = 1;
40} 45}
41 46
42struct delayed_mce { 47static void raise_poll(struct mce *m)
43 struct timer_list timer; 48{
44 struct mce m; 49 unsigned long flags;
45}; 50 mce_banks_t b;
46 51
47/* Inject mce on current CPU */ 52 memset(&b, 0xff, sizeof(mce_banks_t));
48static void raise_mce(unsigned long data) 53 local_irq_save(flags);
54 machine_check_poll(0, &b);
55 local_irq_restore(flags);
56 m->finished = 0;
57}
58
59static void raise_exception(struct mce *m, struct pt_regs *pregs)
49{ 60{
50 struct delayed_mce *dm = (struct delayed_mce *)data; 61 struct pt_regs regs;
51 struct mce *m = &dm->m; 62 unsigned long flags;
52 int cpu = m->extcpu;
53 63
54 inject_mce(m); 64 if (!pregs) {
55 if (m->status & MCI_STATUS_UC) {
56 struct pt_regs regs;
57 memset(&regs, 0, sizeof(struct pt_regs)); 65 memset(&regs, 0, sizeof(struct pt_regs));
58 regs.ip = m->ip; 66 regs.ip = m->ip;
59 regs.cs = m->cs; 67 regs.cs = m->cs;
68 pregs = &regs;
69 }
70 /* in mcheck exeception handler, irq will be disabled */
71 local_irq_save(flags);
72 do_machine_check(pregs, 0);
73 local_irq_restore(flags);
74 m->finished = 0;
75}
76
77static cpumask_t mce_inject_cpumask;
78
79static int mce_raise_notify(struct notifier_block *self,
80 unsigned long val, void *data)
81{
82 struct die_args *args = (struct die_args *)data;
83 int cpu = smp_processor_id();
84 struct mce *m = &__get_cpu_var(injectm);
85 if (val != DIE_NMI_IPI || !cpu_isset(cpu, mce_inject_cpumask))
86 return NOTIFY_DONE;
87 cpu_clear(cpu, mce_inject_cpumask);
88 if (m->inject_flags & MCJ_EXCEPTION)
89 raise_exception(m, args->regs);
90 else if (m->status)
91 raise_poll(m);
92 return NOTIFY_STOP;
93}
94
95static struct notifier_block mce_raise_nb = {
96 .notifier_call = mce_raise_notify,
97 .priority = 1000,
98};
99
100/* Inject mce on current CPU */
101static int raise_local(struct mce *m)
102{
103 int context = MCJ_CTX(m->inject_flags);
104 int ret = 0;
105 int cpu = m->extcpu;
106
107 if (m->inject_flags & MCJ_EXCEPTION) {
60 printk(KERN_INFO "Triggering MCE exception on CPU %d\n", cpu); 108 printk(KERN_INFO "Triggering MCE exception on CPU %d\n", cpu);
61 do_machine_check(&regs, 0); 109 switch (context) {
110 case MCJ_CTX_IRQ:
111 /*
112 * Could do more to fake interrupts like
113 * calling irq_enter, but the necessary
114 * machinery isn't exported currently.
115 */
116 /*FALL THROUGH*/
117 case MCJ_CTX_PROCESS:
118 raise_exception(m, NULL);
119 break;
120 default:
121 printk(KERN_INFO "Invalid MCE context\n");
122 ret = -EINVAL;
123 }
62 printk(KERN_INFO "MCE exception done on CPU %d\n", cpu); 124 printk(KERN_INFO "MCE exception done on CPU %d\n", cpu);
63 } else { 125 } else if (m->status) {
64 mce_banks_t b;
65 memset(&b, 0xff, sizeof(mce_banks_t));
66 printk(KERN_INFO "Starting machine check poll CPU %d\n", cpu); 126 printk(KERN_INFO "Starting machine check poll CPU %d\n", cpu);
67 machine_check_poll(0, &b); 127 raise_poll(m);
68 mce_notify_irq(); 128 mce_notify_irq();
69 printk(KERN_INFO "Finished machine check poll on CPU %d\n", 129 printk(KERN_INFO "Machine check poll done on CPU %d\n", cpu);
70 cpu); 130 } else
71 } 131 m->finished = 0;
72 kfree(dm); 132
133 return ret;
134}
135
136static void raise_mce(struct mce *m)
137{
138 int context = MCJ_CTX(m->inject_flags);
139
140 inject_mce(m);
141
142 if (context == MCJ_CTX_RANDOM)
143 return;
144
145#ifdef CONFIG_X86_LOCAL_APIC
146 if (m->inject_flags & MCJ_NMI_BROADCAST) {
147 unsigned long start;
148 int cpu;
149 get_online_cpus();
150 mce_inject_cpumask = cpu_online_map;
151 cpu_clear(get_cpu(), mce_inject_cpumask);
152 for_each_online_cpu(cpu) {
153 struct mce *mcpu = &per_cpu(injectm, cpu);
154 if (!mcpu->finished ||
155 MCJ_CTX(mcpu->inject_flags) != MCJ_CTX_RANDOM)
156 cpu_clear(cpu, mce_inject_cpumask);
157 }
158 if (!cpus_empty(mce_inject_cpumask))
159 apic->send_IPI_mask(&mce_inject_cpumask, NMI_VECTOR);
160 start = jiffies;
161 while (!cpus_empty(mce_inject_cpumask)) {
162 if (!time_before(jiffies, start + 2*HZ)) {
163 printk(KERN_ERR
164 "Timeout waiting for mce inject NMI %lx\n",
165 *cpus_addr(mce_inject_cpumask));
166 break;
167 }
168 cpu_relax();
169 }
170 raise_local(m);
171 put_cpu();
172 put_online_cpus();
173 } else
174#endif
175 raise_local(m);
73} 176}
74 177
75/* Error injection interface */ 178/* Error injection interface */
76static ssize_t mce_write(struct file *filp, const char __user *ubuf, 179static ssize_t mce_write(struct file *filp, const char __user *ubuf,
77 size_t usize, loff_t *off) 180 size_t usize, loff_t *off)
78{ 181{
79 struct delayed_mce *dm;
80 struct mce m; 182 struct mce m;
81 183
82 if (!capable(CAP_SYS_ADMIN)) 184 if (!capable(CAP_SYS_ADMIN))
@@ -96,19 +198,12 @@ static ssize_t mce_write(struct file *filp, const char __user *ubuf,
96 if (m.extcpu >= num_possible_cpus() || !cpu_online(m.extcpu)) 198 if (m.extcpu >= num_possible_cpus() || !cpu_online(m.extcpu))
97 return -EINVAL; 199 return -EINVAL;
98 200
99 dm = kmalloc(sizeof(struct delayed_mce), GFP_KERNEL);
100 if (!dm)
101 return -ENOMEM;
102
103 /* 201 /*
104 * Need to give user space some time to set everything up, 202 * Need to give user space some time to set everything up,
105 * so do it a jiffie or two later everywhere. 203 * so do it a jiffie or two later everywhere.
106 * Should we use a hrtimer here for better synchronization?
107 */ 204 */
108 memcpy(&dm->m, &m, sizeof(struct mce)); 205 schedule_timeout(2);
109 setup_timer(&dm->timer, raise_mce, (unsigned long)dm); 206 raise_mce(&m);
110 dm->timer.expires = jiffies + 2;
111 add_timer_on(&dm->timer, m.extcpu);
112 return usize; 207 return usize;
113} 208}
114 209
@@ -116,6 +211,7 @@ static int inject_init(void)
116{ 211{
117 printk(KERN_INFO "Machine check injector initialized\n"); 212 printk(KERN_INFO "Machine check injector initialized\n");
118 mce_chrdev_ops.write = mce_write; 213 mce_chrdev_ops.write = mce_write;
214 register_die_notifier(&mce_raise_nb);
119 return 0; 215 return 0;
120} 216}
121 217
diff --git a/arch/x86/kernel/cpu/mcheck/mce-internal.h b/arch/x86/kernel/cpu/mcheck/mce-internal.h
index 54dcb8ff12e5..32996f9fab67 100644
--- a/arch/x86/kernel/cpu/mcheck/mce-internal.h
+++ b/arch/x86/kernel/cpu/mcheck/mce-internal.h
@@ -1,3 +1,4 @@
1#include <linux/sysdev.h>
1#include <asm/mce.h> 2#include <asm/mce.h>
2 3
3enum severity_level { 4enum severity_level {
@@ -10,6 +11,20 @@ enum severity_level {
10 MCE_PANIC_SEVERITY, 11 MCE_PANIC_SEVERITY,
11}; 12};
12 13
14#define ATTR_LEN 16
15
16/* One object for each MCE bank, shared by all CPUs */
17struct mce_bank {
18 u64 ctl; /* subevents to enable */
19 unsigned char init; /* initialise bank? */
20 struct sysdev_attribute attr; /* sysdev attribute */
21 char attrname[ATTR_LEN]; /* attribute name */
22};
23
13int mce_severity(struct mce *a, int tolerant, char **msg); 24int mce_severity(struct mce *a, int tolerant, char **msg);
25struct dentry *mce_get_debugfs_dir(void);
14 26
15extern int mce_ser; 27extern int mce_ser;
28
29extern struct mce_bank *mce_banks;
30
diff --git a/arch/x86/kernel/cpu/mcheck/mce-severity.c b/arch/x86/kernel/cpu/mcheck/mce-severity.c
index ff0807f97056..8a85dd1b1aa1 100644
--- a/arch/x86/kernel/cpu/mcheck/mce-severity.c
+++ b/arch/x86/kernel/cpu/mcheck/mce-severity.c
@@ -139,6 +139,7 @@ int mce_severity(struct mce *a, int tolerant, char **msg)
139 } 139 }
140} 140}
141 141
142#ifdef CONFIG_DEBUG_FS
142static void *s_start(struct seq_file *f, loff_t *pos) 143static void *s_start(struct seq_file *f, loff_t *pos)
143{ 144{
144 if (*pos >= ARRAY_SIZE(severities)) 145 if (*pos >= ARRAY_SIZE(severities))
@@ -197,7 +198,7 @@ static int __init severities_debugfs_init(void)
197{ 198{
198 struct dentry *dmce = NULL, *fseverities_coverage = NULL; 199 struct dentry *dmce = NULL, *fseverities_coverage = NULL;
199 200
200 dmce = debugfs_create_dir("mce", NULL); 201 dmce = mce_get_debugfs_dir();
201 if (dmce == NULL) 202 if (dmce == NULL)
202 goto err_out; 203 goto err_out;
203 fseverities_coverage = debugfs_create_file("severities-coverage", 204 fseverities_coverage = debugfs_create_file("severities-coverage",
@@ -209,10 +210,7 @@ static int __init severities_debugfs_init(void)
209 return 0; 210 return 0;
210 211
211err_out: 212err_out:
212 if (fseverities_coverage)
213 debugfs_remove(fseverities_coverage);
214 if (dmce)
215 debugfs_remove(dmce);
216 return -ENOMEM; 213 return -ENOMEM;
217} 214}
218late_initcall(severities_debugfs_init); 215late_initcall(severities_debugfs_init);
216#endif
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index fdd51b554355..2f5aab26320e 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -34,6 +34,7 @@
34#include <linux/smp.h> 34#include <linux/smp.h>
35#include <linux/fs.h> 35#include <linux/fs.h>
36#include <linux/mm.h> 36#include <linux/mm.h>
37#include <linux/debugfs.h>
37 38
38#include <asm/processor.h> 39#include <asm/processor.h>
39#include <asm/hw_irq.h> 40#include <asm/hw_irq.h>
@@ -45,21 +46,8 @@
45 46
46#include "mce-internal.h" 47#include "mce-internal.h"
47 48
48/* Handle unconfigured int18 (should never happen) */
49static void unexpected_machine_check(struct pt_regs *regs, long error_code)
50{
51 printk(KERN_ERR "CPU#%d: Unexpected int18 (Machine Check).\n",
52 smp_processor_id());
53}
54
55/* Call the installed machine check handler for this CPU setup. */
56void (*machine_check_vector)(struct pt_regs *, long error_code) =
57 unexpected_machine_check;
58
59int mce_disabled __read_mostly; 49int mce_disabled __read_mostly;
60 50
61#ifdef CONFIG_X86_NEW_MCE
62
63#define MISC_MCELOG_MINOR 227 51#define MISC_MCELOG_MINOR 227
64 52
65#define SPINUNIT 100 /* 100ns */ 53#define SPINUNIT 100 /* 100ns */
@@ -77,7 +65,6 @@ DEFINE_PER_CPU(unsigned, mce_exception_count);
77 */ 65 */
78static int tolerant __read_mostly = 1; 66static int tolerant __read_mostly = 1;
79static int banks __read_mostly; 67static int banks __read_mostly;
80static u64 *bank __read_mostly;
81static int rip_msr __read_mostly; 68static int rip_msr __read_mostly;
82static int mce_bootlog __read_mostly = -1; 69static int mce_bootlog __read_mostly = -1;
83static int monarch_timeout __read_mostly = -1; 70static int monarch_timeout __read_mostly = -1;
@@ -87,13 +74,13 @@ int mce_cmci_disabled __read_mostly;
87int mce_ignore_ce __read_mostly; 74int mce_ignore_ce __read_mostly;
88int mce_ser __read_mostly; 75int mce_ser __read_mostly;
89 76
77struct mce_bank *mce_banks __read_mostly;
78
90/* User mode helper program triggered by machine check event */ 79/* User mode helper program triggered by machine check event */
91static unsigned long mce_need_notify; 80static unsigned long mce_need_notify;
92static char mce_helper[128]; 81static char mce_helper[128];
93static char *mce_helper_argv[2] = { mce_helper, NULL }; 82static char *mce_helper_argv[2] = { mce_helper, NULL };
94 83
95static unsigned long dont_init_banks;
96
97static DECLARE_WAIT_QUEUE_HEAD(mce_wait); 84static DECLARE_WAIT_QUEUE_HEAD(mce_wait);
98static DEFINE_PER_CPU(struct mce, mces_seen); 85static DEFINE_PER_CPU(struct mce, mces_seen);
99static int cpu_missing; 86static int cpu_missing;
@@ -104,11 +91,6 @@ DEFINE_PER_CPU(mce_banks_t, mce_poll_banks) = {
104 [0 ... BITS_TO_LONGS(MAX_NR_BANKS)-1] = ~0UL 91 [0 ... BITS_TO_LONGS(MAX_NR_BANKS)-1] = ~0UL
105}; 92};
106 93
107static inline int skip_bank_init(int i)
108{
109 return i < BITS_PER_LONG && test_bit(i, &dont_init_banks);
110}
111
112static DEFINE_PER_CPU(struct work_struct, mce_work); 94static DEFINE_PER_CPU(struct work_struct, mce_work);
113 95
114/* Do initial initialization of a struct mce */ 96/* Do initial initialization of a struct mce */
@@ -232,6 +214,9 @@ static void print_mce_tail(void)
232 214
233static atomic_t mce_paniced; 215static atomic_t mce_paniced;
234 216
217static int fake_panic;
218static atomic_t mce_fake_paniced;
219
235/* Panic in progress. Enable interrupts and wait for final IPI */ 220/* Panic in progress. Enable interrupts and wait for final IPI */
236static void wait_for_panic(void) 221static void wait_for_panic(void)
237{ 222{
@@ -249,15 +234,21 @@ static void mce_panic(char *msg, struct mce *final, char *exp)
249{ 234{
250 int i; 235 int i;
251 236
252 /* 237 if (!fake_panic) {
253 * Make sure only one CPU runs in machine check panic 238 /*
254 */ 239 * Make sure only one CPU runs in machine check panic
255 if (atomic_add_return(1, &mce_paniced) > 1) 240 */
256 wait_for_panic(); 241 if (atomic_inc_return(&mce_paniced) > 1)
257 barrier(); 242 wait_for_panic();
243 barrier();
258 244
259 bust_spinlocks(1); 245 bust_spinlocks(1);
260 console_verbose(); 246 console_verbose();
247 } else {
248 /* Don't log too much for fake panic */
249 if (atomic_inc_return(&mce_fake_paniced) > 1)
250 return;
251 }
261 print_mce_head(); 252 print_mce_head();
262 /* First print corrected ones that are still unlogged */ 253 /* First print corrected ones that are still unlogged */
263 for (i = 0; i < MCE_LOG_LEN; i++) { 254 for (i = 0; i < MCE_LOG_LEN; i++) {
@@ -284,9 +275,12 @@ static void mce_panic(char *msg, struct mce *final, char *exp)
284 print_mce_tail(); 275 print_mce_tail();
285 if (exp) 276 if (exp)
286 printk(KERN_EMERG "Machine check: %s\n", exp); 277 printk(KERN_EMERG "Machine check: %s\n", exp);
287 if (panic_timeout == 0) 278 if (!fake_panic) {
288 panic_timeout = mce_panic_timeout; 279 if (panic_timeout == 0)
289 panic(msg); 280 panic_timeout = mce_panic_timeout;
281 panic(msg);
282 } else
283 printk(KERN_EMERG "Fake kernel panic: %s\n", msg);
290} 284}
291 285
292/* Support code for software error injection */ 286/* Support code for software error injection */
@@ -296,11 +290,11 @@ static int msr_to_offset(u32 msr)
296 unsigned bank = __get_cpu_var(injectm.bank); 290 unsigned bank = __get_cpu_var(injectm.bank);
297 if (msr == rip_msr) 291 if (msr == rip_msr)
298 return offsetof(struct mce, ip); 292 return offsetof(struct mce, ip);
299 if (msr == MSR_IA32_MC0_STATUS + bank*4) 293 if (msr == MSR_IA32_MCx_STATUS(bank))
300 return offsetof(struct mce, status); 294 return offsetof(struct mce, status);
301 if (msr == MSR_IA32_MC0_ADDR + bank*4) 295 if (msr == MSR_IA32_MCx_ADDR(bank))
302 return offsetof(struct mce, addr); 296 return offsetof(struct mce, addr);
303 if (msr == MSR_IA32_MC0_MISC + bank*4) 297 if (msr == MSR_IA32_MCx_MISC(bank))
304 return offsetof(struct mce, misc); 298 return offsetof(struct mce, misc);
305 if (msr == MSR_IA32_MCG_STATUS) 299 if (msr == MSR_IA32_MCG_STATUS)
306 return offsetof(struct mce, mcgstatus); 300 return offsetof(struct mce, mcgstatus);
@@ -505,7 +499,7 @@ void machine_check_poll(enum mcp_flags flags, mce_banks_t *b)
505 499
506 m.mcgstatus = mce_rdmsrl(MSR_IA32_MCG_STATUS); 500 m.mcgstatus = mce_rdmsrl(MSR_IA32_MCG_STATUS);
507 for (i = 0; i < banks; i++) { 501 for (i = 0; i < banks; i++) {
508 if (!bank[i] || !test_bit(i, *b)) 502 if (!mce_banks[i].ctl || !test_bit(i, *b))
509 continue; 503 continue;
510 504
511 m.misc = 0; 505 m.misc = 0;
@@ -514,7 +508,7 @@ void machine_check_poll(enum mcp_flags flags, mce_banks_t *b)
514 m.tsc = 0; 508 m.tsc = 0;
515 509
516 barrier(); 510 barrier();
517 m.status = mce_rdmsrl(MSR_IA32_MC0_STATUS + i*4); 511 m.status = mce_rdmsrl(MSR_IA32_MCx_STATUS(i));
518 if (!(m.status & MCI_STATUS_VAL)) 512 if (!(m.status & MCI_STATUS_VAL))
519 continue; 513 continue;
520 514
@@ -529,9 +523,9 @@ void machine_check_poll(enum mcp_flags flags, mce_banks_t *b)
529 continue; 523 continue;
530 524
531 if (m.status & MCI_STATUS_MISCV) 525 if (m.status & MCI_STATUS_MISCV)
532 m.misc = mce_rdmsrl(MSR_IA32_MC0_MISC + i*4); 526 m.misc = mce_rdmsrl(MSR_IA32_MCx_MISC(i));
533 if (m.status & MCI_STATUS_ADDRV) 527 if (m.status & MCI_STATUS_ADDRV)
534 m.addr = mce_rdmsrl(MSR_IA32_MC0_ADDR + i*4); 528 m.addr = mce_rdmsrl(MSR_IA32_MCx_ADDR(i));
535 529
536 if (!(flags & MCP_TIMESTAMP)) 530 if (!(flags & MCP_TIMESTAMP))
537 m.tsc = 0; 531 m.tsc = 0;
@@ -547,7 +541,7 @@ void machine_check_poll(enum mcp_flags flags, mce_banks_t *b)
547 /* 541 /*
548 * Clear state for this bank. 542 * Clear state for this bank.
549 */ 543 */
550 mce_wrmsrl(MSR_IA32_MC0_STATUS+4*i, 0); 544 mce_wrmsrl(MSR_IA32_MCx_STATUS(i), 0);
551 } 545 }
552 546
553 /* 547 /*
@@ -568,7 +562,7 @@ static int mce_no_way_out(struct mce *m, char **msg)
568 int i; 562 int i;
569 563
570 for (i = 0; i < banks; i++) { 564 for (i = 0; i < banks; i++) {
571 m->status = mce_rdmsrl(MSR_IA32_MC0_STATUS + i*4); 565 m->status = mce_rdmsrl(MSR_IA32_MCx_STATUS(i));
572 if (mce_severity(m, tolerant, msg) >= MCE_PANIC_SEVERITY) 566 if (mce_severity(m, tolerant, msg) >= MCE_PANIC_SEVERITY)
573 return 1; 567 return 1;
574 } 568 }
@@ -628,7 +622,7 @@ out:
628 * This way we prevent any potential data corruption in a unrecoverable case 622 * This way we prevent any potential data corruption in a unrecoverable case
629 * and also makes sure always all CPU's errors are examined. 623 * and also makes sure always all CPU's errors are examined.
630 * 624 *
631 * Also this detects the case of an machine check event coming from outer 625 * Also this detects the case of a machine check event coming from outer
632 * space (not detected by any CPUs) In this case some external agent wants 626 * space (not detected by any CPUs) In this case some external agent wants
633 * us to shut down, so panic too. 627 * us to shut down, so panic too.
634 * 628 *
@@ -681,7 +675,7 @@ static void mce_reign(void)
681 * No machine check event found. Must be some external 675 * No machine check event found. Must be some external
682 * source or one CPU is hung. Panic. 676 * source or one CPU is hung. Panic.
683 */ 677 */
684 if (!m && tolerant < 3) 678 if (global_worst <= MCE_KEEP_SEVERITY && tolerant < 3)
685 mce_panic("Machine check from unknown source", NULL, NULL); 679 mce_panic("Machine check from unknown source", NULL, NULL);
686 680
687 /* 681 /*
@@ -715,7 +709,7 @@ static int mce_start(int *no_way_out)
715 * global_nwo should be updated before mce_callin 709 * global_nwo should be updated before mce_callin
716 */ 710 */
717 smp_wmb(); 711 smp_wmb();
718 order = atomic_add_return(1, &mce_callin); 712 order = atomic_inc_return(&mce_callin);
719 713
720 /* 714 /*
721 * Wait for everyone. 715 * Wait for everyone.
@@ -852,7 +846,7 @@ static void mce_clear_state(unsigned long *toclear)
852 846
853 for (i = 0; i < banks; i++) { 847 for (i = 0; i < banks; i++) {
854 if (test_bit(i, toclear)) 848 if (test_bit(i, toclear))
855 mce_wrmsrl(MSR_IA32_MC0_STATUS+4*i, 0); 849 mce_wrmsrl(MSR_IA32_MCx_STATUS(i), 0);
856 } 850 }
857} 851}
858 852
@@ -905,11 +899,11 @@ void do_machine_check(struct pt_regs *regs, long error_code)
905 mce_setup(&m); 899 mce_setup(&m);
906 900
907 m.mcgstatus = mce_rdmsrl(MSR_IA32_MCG_STATUS); 901 m.mcgstatus = mce_rdmsrl(MSR_IA32_MCG_STATUS);
908 no_way_out = mce_no_way_out(&m, &msg);
909
910 final = &__get_cpu_var(mces_seen); 902 final = &__get_cpu_var(mces_seen);
911 *final = m; 903 *final = m;
912 904
905 no_way_out = mce_no_way_out(&m, &msg);
906
913 barrier(); 907 barrier();
914 908
915 /* 909 /*
@@ -926,14 +920,14 @@ void do_machine_check(struct pt_regs *regs, long error_code)
926 order = mce_start(&no_way_out); 920 order = mce_start(&no_way_out);
927 for (i = 0; i < banks; i++) { 921 for (i = 0; i < banks; i++) {
928 __clear_bit(i, toclear); 922 __clear_bit(i, toclear);
929 if (!bank[i]) 923 if (!mce_banks[i].ctl)
930 continue; 924 continue;
931 925
932 m.misc = 0; 926 m.misc = 0;
933 m.addr = 0; 927 m.addr = 0;
934 m.bank = i; 928 m.bank = i;
935 929
936 m.status = mce_rdmsrl(MSR_IA32_MC0_STATUS + i*4); 930 m.status = mce_rdmsrl(MSR_IA32_MCx_STATUS(i));
937 if ((m.status & MCI_STATUS_VAL) == 0) 931 if ((m.status & MCI_STATUS_VAL) == 0)
938 continue; 932 continue;
939 933
@@ -974,9 +968,9 @@ void do_machine_check(struct pt_regs *regs, long error_code)
974 kill_it = 1; 968 kill_it = 1;
975 969
976 if (m.status & MCI_STATUS_MISCV) 970 if (m.status & MCI_STATUS_MISCV)
977 m.misc = mce_rdmsrl(MSR_IA32_MC0_MISC + i*4); 971 m.misc = mce_rdmsrl(MSR_IA32_MCx_MISC(i));
978 if (m.status & MCI_STATUS_ADDRV) 972 if (m.status & MCI_STATUS_ADDRV)
979 m.addr = mce_rdmsrl(MSR_IA32_MC0_ADDR + i*4); 973 m.addr = mce_rdmsrl(MSR_IA32_MCx_ADDR(i));
980 974
981 /* 975 /*
982 * Action optional error. Queue address for later processing. 976 * Action optional error. Queue address for later processing.
@@ -1169,10 +1163,25 @@ int mce_notify_irq(void)
1169} 1163}
1170EXPORT_SYMBOL_GPL(mce_notify_irq); 1164EXPORT_SYMBOL_GPL(mce_notify_irq);
1171 1165
1166static int mce_banks_init(void)
1167{
1168 int i;
1169
1170 mce_banks = kzalloc(banks * sizeof(struct mce_bank), GFP_KERNEL);
1171 if (!mce_banks)
1172 return -ENOMEM;
1173 for (i = 0; i < banks; i++) {
1174 struct mce_bank *b = &mce_banks[i];
1175 b->ctl = -1ULL;
1176 b->init = 1;
1177 }
1178 return 0;
1179}
1180
1172/* 1181/*
1173 * Initialize Machine Checks for a CPU. 1182 * Initialize Machine Checks for a CPU.
1174 */ 1183 */
1175static int mce_cap_init(void) 1184static int __cpuinit mce_cap_init(void)
1176{ 1185{
1177 unsigned b; 1186 unsigned b;
1178 u64 cap; 1187 u64 cap;
@@ -1192,11 +1201,10 @@ static int mce_cap_init(void)
1192 /* Don't support asymmetric configurations today */ 1201 /* Don't support asymmetric configurations today */
1193 WARN_ON(banks != 0 && b != banks); 1202 WARN_ON(banks != 0 && b != banks);
1194 banks = b; 1203 banks = b;
1195 if (!bank) { 1204 if (!mce_banks) {
1196 bank = kmalloc(banks * sizeof(u64), GFP_KERNEL); 1205 int err = mce_banks_init();
1197 if (!bank) 1206 if (err)
1198 return -ENOMEM; 1207 return err;
1199 memset(bank, 0xff, banks * sizeof(u64));
1200 } 1208 }
1201 1209
1202 /* Use accurate RIP reporting if available. */ 1210 /* Use accurate RIP reporting if available. */
@@ -1228,15 +1236,16 @@ static void mce_init(void)
1228 wrmsr(MSR_IA32_MCG_CTL, 0xffffffff, 0xffffffff); 1236 wrmsr(MSR_IA32_MCG_CTL, 0xffffffff, 0xffffffff);
1229 1237
1230 for (i = 0; i < banks; i++) { 1238 for (i = 0; i < banks; i++) {
1231 if (skip_bank_init(i)) 1239 struct mce_bank *b = &mce_banks[i];
1240 if (!b->init)
1232 continue; 1241 continue;
1233 wrmsrl(MSR_IA32_MC0_CTL+4*i, bank[i]); 1242 wrmsrl(MSR_IA32_MCx_CTL(i), b->ctl);
1234 wrmsrl(MSR_IA32_MC0_STATUS+4*i, 0); 1243 wrmsrl(MSR_IA32_MCx_STATUS(i), 0);
1235 } 1244 }
1236} 1245}
1237 1246
1238/* Add per CPU specific workarounds here */ 1247/* Add per CPU specific workarounds here */
1239static int mce_cpu_quirks(struct cpuinfo_x86 *c) 1248static int __cpuinit mce_cpu_quirks(struct cpuinfo_x86 *c)
1240{ 1249{
1241 if (c->x86_vendor == X86_VENDOR_UNKNOWN) { 1250 if (c->x86_vendor == X86_VENDOR_UNKNOWN) {
1242 pr_info("MCE: unknown CPU type - not enabling MCE support.\n"); 1251 pr_info("MCE: unknown CPU type - not enabling MCE support.\n");
@@ -1251,7 +1260,7 @@ static int mce_cpu_quirks(struct cpuinfo_x86 *c)
1251 * trips off incorrectly with the IOMMU & 3ware 1260 * trips off incorrectly with the IOMMU & 3ware
1252 * & Cerberus: 1261 * & Cerberus:
1253 */ 1262 */
1254 clear_bit(10, (unsigned long *)&bank[4]); 1263 clear_bit(10, (unsigned long *)&mce_banks[4].ctl);
1255 } 1264 }
1256 if (c->x86 <= 17 && mce_bootlog < 0) { 1265 if (c->x86 <= 17 && mce_bootlog < 0) {
1257 /* 1266 /*
@@ -1265,7 +1274,7 @@ static int mce_cpu_quirks(struct cpuinfo_x86 *c)
1265 * by default. 1274 * by default.
1266 */ 1275 */
1267 if (c->x86 == 6 && banks > 0) 1276 if (c->x86 == 6 && banks > 0)
1268 bank[0] = 0; 1277 mce_banks[0].ctl = 0;
1269 } 1278 }
1270 1279
1271 if (c->x86_vendor == X86_VENDOR_INTEL) { 1280 if (c->x86_vendor == X86_VENDOR_INTEL) {
@@ -1278,8 +1287,8 @@ static int mce_cpu_quirks(struct cpuinfo_x86 *c)
1278 * valid event later, merely don't write CTL0. 1287 * valid event later, merely don't write CTL0.
1279 */ 1288 */
1280 1289
1281 if (c->x86 == 6 && c->x86_model < 0x1A) 1290 if (c->x86 == 6 && c->x86_model < 0x1A && banks > 0)
1282 __set_bit(0, &dont_init_banks); 1291 mce_banks[0].init = 0;
1283 1292
1284 /* 1293 /*
1285 * All newer Intel systems support MCE broadcasting. Enable 1294 * All newer Intel systems support MCE broadcasting. Enable
@@ -1348,6 +1357,17 @@ static void mce_init_timer(void)
1348 add_timer_on(t, smp_processor_id()); 1357 add_timer_on(t, smp_processor_id());
1349} 1358}
1350 1359
1360/* Handle unconfigured int18 (should never happen) */
1361static void unexpected_machine_check(struct pt_regs *regs, long error_code)
1362{
1363 printk(KERN_ERR "CPU#%d: Unexpected int18 (Machine Check).\n",
1364 smp_processor_id());
1365}
1366
1367/* Call the installed machine check handler for this CPU setup. */
1368void (*machine_check_vector)(struct pt_regs *, long error_code) =
1369 unexpected_machine_check;
1370
1351/* 1371/*
1352 * Called for each booted CPU to set up machine checks. 1372 * Called for each booted CPU to set up machine checks.
1353 * Must be called with preempt off: 1373 * Must be called with preempt off:
@@ -1561,8 +1581,10 @@ static struct miscdevice mce_log_device = {
1561 */ 1581 */
1562static int __init mcheck_enable(char *str) 1582static int __init mcheck_enable(char *str)
1563{ 1583{
1564 if (*str == 0) 1584 if (*str == 0) {
1565 enable_p5_mce(); 1585 enable_p5_mce();
1586 return 1;
1587 }
1566 if (*str == '=') 1588 if (*str == '=')
1567 str++; 1589 str++;
1568 if (!strcmp(str, "off")) 1590 if (!strcmp(str, "off"))
@@ -1603,8 +1625,9 @@ static int mce_disable(void)
1603 int i; 1625 int i;
1604 1626
1605 for (i = 0; i < banks; i++) { 1627 for (i = 0; i < banks; i++) {
1606 if (!skip_bank_init(i)) 1628 struct mce_bank *b = &mce_banks[i];
1607 wrmsrl(MSR_IA32_MC0_CTL + i*4, 0); 1629 if (b->init)
1630 wrmsrl(MSR_IA32_MCx_CTL(i), 0);
1608 } 1631 }
1609 return 0; 1632 return 0;
1610} 1633}
@@ -1679,14 +1702,15 @@ DEFINE_PER_CPU(struct sys_device, mce_dev);
1679__cpuinitdata 1702__cpuinitdata
1680void (*threshold_cpu_callback)(unsigned long action, unsigned int cpu); 1703void (*threshold_cpu_callback)(unsigned long action, unsigned int cpu);
1681 1704
1682static struct sysdev_attribute *bank_attrs; 1705static inline struct mce_bank *attr_to_bank(struct sysdev_attribute *attr)
1706{
1707 return container_of(attr, struct mce_bank, attr);
1708}
1683 1709
1684static ssize_t show_bank(struct sys_device *s, struct sysdev_attribute *attr, 1710static ssize_t show_bank(struct sys_device *s, struct sysdev_attribute *attr,
1685 char *buf) 1711 char *buf)
1686{ 1712{
1687 u64 b = bank[attr - bank_attrs]; 1713 return sprintf(buf, "%llx\n", attr_to_bank(attr)->ctl);
1688
1689 return sprintf(buf, "%llx\n", b);
1690} 1714}
1691 1715
1692static ssize_t set_bank(struct sys_device *s, struct sysdev_attribute *attr, 1716static ssize_t set_bank(struct sys_device *s, struct sysdev_attribute *attr,
@@ -1697,7 +1721,7 @@ static ssize_t set_bank(struct sys_device *s, struct sysdev_attribute *attr,
1697 if (strict_strtoull(buf, 0, &new) < 0) 1721 if (strict_strtoull(buf, 0, &new) < 0)
1698 return -EINVAL; 1722 return -EINVAL;
1699 1723
1700 bank[attr - bank_attrs] = new; 1724 attr_to_bank(attr)->ctl = new;
1701 mce_restart(); 1725 mce_restart();
1702 1726
1703 return size; 1727 return size;
@@ -1839,7 +1863,7 @@ static __cpuinit int mce_create_device(unsigned int cpu)
1839 } 1863 }
1840 for (j = 0; j < banks; j++) { 1864 for (j = 0; j < banks; j++) {
1841 err = sysdev_create_file(&per_cpu(mce_dev, cpu), 1865 err = sysdev_create_file(&per_cpu(mce_dev, cpu),
1842 &bank_attrs[j]); 1866 &mce_banks[j].attr);
1843 if (err) 1867 if (err)
1844 goto error2; 1868 goto error2;
1845 } 1869 }
@@ -1848,10 +1872,10 @@ static __cpuinit int mce_create_device(unsigned int cpu)
1848 return 0; 1872 return 0;
1849error2: 1873error2:
1850 while (--j >= 0) 1874 while (--j >= 0)
1851 sysdev_remove_file(&per_cpu(mce_dev, cpu), &bank_attrs[j]); 1875 sysdev_remove_file(&per_cpu(mce_dev, cpu), &mce_banks[j].attr);
1852error: 1876error:
1853 while (--i >= 0) 1877 while (--i >= 0)
1854 sysdev_remove_file(&per_cpu(mce_dev, cpu), mce_attrs[i]); 1878 sysdev_remove_file(&per_cpu(mce_dev, cpu), &mce_banks[i].attr);
1855 1879
1856 sysdev_unregister(&per_cpu(mce_dev, cpu)); 1880 sysdev_unregister(&per_cpu(mce_dev, cpu));
1857 1881
@@ -1869,7 +1893,7 @@ static __cpuinit void mce_remove_device(unsigned int cpu)
1869 sysdev_remove_file(&per_cpu(mce_dev, cpu), mce_attrs[i]); 1893 sysdev_remove_file(&per_cpu(mce_dev, cpu), mce_attrs[i]);
1870 1894
1871 for (i = 0; i < banks; i++) 1895 for (i = 0; i < banks; i++)
1872 sysdev_remove_file(&per_cpu(mce_dev, cpu), &bank_attrs[i]); 1896 sysdev_remove_file(&per_cpu(mce_dev, cpu), &mce_banks[i].attr);
1873 1897
1874 sysdev_unregister(&per_cpu(mce_dev, cpu)); 1898 sysdev_unregister(&per_cpu(mce_dev, cpu));
1875 cpumask_clear_cpu(cpu, mce_dev_initialized); 1899 cpumask_clear_cpu(cpu, mce_dev_initialized);
@@ -1886,8 +1910,9 @@ static void mce_disable_cpu(void *h)
1886 if (!(action & CPU_TASKS_FROZEN)) 1910 if (!(action & CPU_TASKS_FROZEN))
1887 cmci_clear(); 1911 cmci_clear();
1888 for (i = 0; i < banks; i++) { 1912 for (i = 0; i < banks; i++) {
1889 if (!skip_bank_init(i)) 1913 struct mce_bank *b = &mce_banks[i];
1890 wrmsrl(MSR_IA32_MC0_CTL + i*4, 0); 1914 if (b->init)
1915 wrmsrl(MSR_IA32_MCx_CTL(i), 0);
1891 } 1916 }
1892} 1917}
1893 1918
@@ -1902,8 +1927,9 @@ static void mce_reenable_cpu(void *h)
1902 if (!(action & CPU_TASKS_FROZEN)) 1927 if (!(action & CPU_TASKS_FROZEN))
1903 cmci_reenable(); 1928 cmci_reenable();
1904 for (i = 0; i < banks; i++) { 1929 for (i = 0; i < banks; i++) {
1905 if (!skip_bank_init(i)) 1930 struct mce_bank *b = &mce_banks[i];
1906 wrmsrl(MSR_IA32_MC0_CTL + i*4, bank[i]); 1931 if (b->init)
1932 wrmsrl(MSR_IA32_MCx_CTL(i), b->ctl);
1907 } 1933 }
1908} 1934}
1909 1935
@@ -1951,35 +1977,21 @@ static struct notifier_block mce_cpu_notifier __cpuinitdata = {
1951 .notifier_call = mce_cpu_callback, 1977 .notifier_call = mce_cpu_callback,
1952}; 1978};
1953 1979
1954static __init int mce_init_banks(void) 1980static __init void mce_init_banks(void)
1955{ 1981{
1956 int i; 1982 int i;
1957 1983
1958 bank_attrs = kzalloc(sizeof(struct sysdev_attribute) * banks,
1959 GFP_KERNEL);
1960 if (!bank_attrs)
1961 return -ENOMEM;
1962
1963 for (i = 0; i < banks; i++) { 1984 for (i = 0; i < banks; i++) {
1964 struct sysdev_attribute *a = &bank_attrs[i]; 1985 struct mce_bank *b = &mce_banks[i];
1986 struct sysdev_attribute *a = &b->attr;
1965 1987
1966 a->attr.name = kasprintf(GFP_KERNEL, "bank%d", i); 1988 a->attr.name = b->attrname;
1967 if (!a->attr.name) 1989 snprintf(b->attrname, ATTR_LEN, "bank%d", i);
1968 goto nomem;
1969 1990
1970 a->attr.mode = 0644; 1991 a->attr.mode = 0644;
1971 a->show = show_bank; 1992 a->show = show_bank;
1972 a->store = set_bank; 1993 a->store = set_bank;
1973 } 1994 }
1974 return 0;
1975
1976nomem:
1977 while (--i >= 0)
1978 kfree(bank_attrs[i].attr.name);
1979 kfree(bank_attrs);
1980 bank_attrs = NULL;
1981
1982 return -ENOMEM;
1983} 1995}
1984 1996
1985static __init int mce_init_device(void) 1997static __init int mce_init_device(void)
@@ -1992,9 +2004,7 @@ static __init int mce_init_device(void)
1992 2004
1993 zalloc_cpumask_var(&mce_dev_initialized, GFP_KERNEL); 2005 zalloc_cpumask_var(&mce_dev_initialized, GFP_KERNEL);
1994 2006
1995 err = mce_init_banks(); 2007 mce_init_banks();
1996 if (err)
1997 return err;
1998 2008
1999 err = sysdev_class_register(&mce_sysclass); 2009 err = sysdev_class_register(&mce_sysclass);
2000 if (err) 2010 if (err)
@@ -2014,57 +2024,65 @@ static __init int mce_init_device(void)
2014 2024
2015device_initcall(mce_init_device); 2025device_initcall(mce_init_device);
2016 2026
2017#else /* CONFIG_X86_OLD_MCE: */ 2027/*
2018 2028 * Old style boot options parsing. Only for compatibility.
2019int nr_mce_banks; 2029 */
2020EXPORT_SYMBOL_GPL(nr_mce_banks); /* non-fatal.o */ 2030static int __init mcheck_disable(char *str)
2031{
2032 mce_disabled = 1;
2033 return 1;
2034}
2035__setup("nomce", mcheck_disable);
2021 2036
2022/* This has to be run for each processor */ 2037#ifdef CONFIG_DEBUG_FS
2023void mcheck_init(struct cpuinfo_x86 *c) 2038struct dentry *mce_get_debugfs_dir(void)
2024{ 2039{
2025 if (mce_disabled) 2040 static struct dentry *dmce;
2026 return;
2027 2041
2028 switch (c->x86_vendor) { 2042 if (!dmce)
2029 case X86_VENDOR_AMD: 2043 dmce = debugfs_create_dir("mce", NULL);
2030 amd_mcheck_init(c);
2031 break;
2032 2044
2033 case X86_VENDOR_INTEL: 2045 return dmce;
2034 if (c->x86 == 5) 2046}
2035 intel_p5_mcheck_init(c);
2036 if (c->x86 == 6)
2037 intel_p6_mcheck_init(c);
2038 if (c->x86 == 15)
2039 intel_p4_mcheck_init(c);
2040 break;
2041 2047
2042 case X86_VENDOR_CENTAUR: 2048static void mce_reset(void)
2043 if (c->x86 == 5) 2049{
2044 winchip_mcheck_init(c); 2050 cpu_missing = 0;
2045 break; 2051 atomic_set(&mce_fake_paniced, 0);
2052 atomic_set(&mce_executing, 0);
2053 atomic_set(&mce_callin, 0);
2054 atomic_set(&global_nwo, 0);
2055}
2046 2056
2047 default: 2057static int fake_panic_get(void *data, u64 *val)
2048 break; 2058{
2049 } 2059 *val = fake_panic;
2050 printk(KERN_INFO "mce: CPU supports %d MCE banks\n", nr_mce_banks); 2060 return 0;
2051} 2061}
2052 2062
2053static int __init mcheck_enable(char *str) 2063static int fake_panic_set(void *data, u64 val)
2054{ 2064{
2055 mce_p5_enabled = 1; 2065 mce_reset();
2056 return 1; 2066 fake_panic = val;
2067 return 0;
2057} 2068}
2058__setup("mce", mcheck_enable);
2059 2069
2060#endif /* CONFIG_X86_OLD_MCE */ 2070DEFINE_SIMPLE_ATTRIBUTE(fake_panic_fops, fake_panic_get,
2071 fake_panic_set, "%llu\n");
2061 2072
2062/* 2073static int __init mce_debugfs_init(void)
2063 * Old style boot options parsing. Only for compatibility.
2064 */
2065static int __init mcheck_disable(char *str)
2066{ 2074{
2067 mce_disabled = 1; 2075 struct dentry *dmce, *ffake_panic;
2068 return 1; 2076
2077 dmce = mce_get_debugfs_dir();
2078 if (!dmce)
2079 return -ENOMEM;
2080 ffake_panic = debugfs_create_file("fake_panic", 0444, dmce, NULL,
2081 &fake_panic_fops);
2082 if (!ffake_panic)
2083 return -ENOMEM;
2084
2085 return 0;
2069} 2086}
2070__setup("nomce", mcheck_disable); 2087late_initcall(mce_debugfs_init);
2088#endif
diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd.c b/arch/x86/kernel/cpu/mcheck/mce_amd.c
index 8cd5224943b5..83a3d1f4efca 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_amd.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_amd.c
@@ -489,8 +489,9 @@ static __cpuinit int threshold_create_bank(unsigned int cpu, unsigned int bank)
489 int i, err = 0; 489 int i, err = 0;
490 struct threshold_bank *b = NULL; 490 struct threshold_bank *b = NULL;
491 char name[32]; 491 char name[32];
492#ifdef CONFIG_SMP
492 struct cpuinfo_x86 *c = &cpu_data(cpu); 493 struct cpuinfo_x86 *c = &cpu_data(cpu);
493 494#endif
494 495
495 sprintf(name, "threshold_bank%i", bank); 496 sprintf(name, "threshold_bank%i", bank);
496 497
diff --git a/arch/x86/kernel/cpu/mcheck/mce_intel.c b/arch/x86/kernel/cpu/mcheck/mce_intel.c
index e1acec0f7a32..889f665fe93d 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_intel.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_intel.c
@@ -90,7 +90,7 @@ static void cmci_discover(int banks, int boot)
90 if (test_bit(i, owned)) 90 if (test_bit(i, owned))
91 continue; 91 continue;
92 92
93 rdmsrl(MSR_IA32_MC0_CTL2 + i, val); 93 rdmsrl(MSR_IA32_MCx_CTL2(i), val);
94 94
95 /* Already owned by someone else? */ 95 /* Already owned by someone else? */
96 if (val & CMCI_EN) { 96 if (val & CMCI_EN) {
@@ -101,8 +101,8 @@ static void cmci_discover(int banks, int boot)
101 } 101 }
102 102
103 val |= CMCI_EN | CMCI_THRESHOLD; 103 val |= CMCI_EN | CMCI_THRESHOLD;
104 wrmsrl(MSR_IA32_MC0_CTL2 + i, val); 104 wrmsrl(MSR_IA32_MCx_CTL2(i), val);
105 rdmsrl(MSR_IA32_MC0_CTL2 + i, val); 105 rdmsrl(MSR_IA32_MCx_CTL2(i), val);
106 106
107 /* Did the enable bit stick? -- the bank supports CMCI */ 107 /* Did the enable bit stick? -- the bank supports CMCI */
108 if (val & CMCI_EN) { 108 if (val & CMCI_EN) {
@@ -152,9 +152,9 @@ void cmci_clear(void)
152 if (!test_bit(i, __get_cpu_var(mce_banks_owned))) 152 if (!test_bit(i, __get_cpu_var(mce_banks_owned)))
153 continue; 153 continue;
154 /* Disable CMCI */ 154 /* Disable CMCI */
155 rdmsrl(MSR_IA32_MC0_CTL2 + i, val); 155 rdmsrl(MSR_IA32_MCx_CTL2(i), val);
156 val &= ~(CMCI_EN|CMCI_THRESHOLD_MASK); 156 val &= ~(CMCI_EN|CMCI_THRESHOLD_MASK);
157 wrmsrl(MSR_IA32_MC0_CTL2 + i, val); 157 wrmsrl(MSR_IA32_MCx_CTL2(i), val);
158 __clear_bit(i, __get_cpu_var(mce_banks_owned)); 158 __clear_bit(i, __get_cpu_var(mce_banks_owned));
159 } 159 }
160 spin_unlock_irqrestore(&cmci_discover_lock, flags); 160 spin_unlock_irqrestore(&cmci_discover_lock, flags);
diff --git a/arch/x86/kernel/cpu/mcheck/non-fatal.c b/arch/x86/kernel/cpu/mcheck/non-fatal.c
deleted file mode 100644
index f5f2d6f71fb6..000000000000
--- a/arch/x86/kernel/cpu/mcheck/non-fatal.c
+++ /dev/null
@@ -1,94 +0,0 @@
1/*
2 * Non Fatal Machine Check Exception Reporting
3 *
4 * (C) Copyright 2002 Dave Jones. <davej@redhat.com>
5 *
6 * This file contains routines to check for non-fatal MCEs every 15s
7 *
8 */
9#include <linux/interrupt.h>
10#include <linux/workqueue.h>
11#include <linux/jiffies.h>
12#include <linux/kernel.h>
13#include <linux/module.h>
14#include <linux/types.h>
15#include <linux/init.h>
16#include <linux/smp.h>
17
18#include <asm/processor.h>
19#include <asm/system.h>
20#include <asm/mce.h>
21#include <asm/msr.h>
22
23static int firstbank;
24
25#define MCE_RATE (15*HZ) /* timer rate is 15s */
26
27static void mce_checkregs(void *info)
28{
29 u32 low, high;
30 int i;
31
32 for (i = firstbank; i < nr_mce_banks; i++) {
33 rdmsr(MSR_IA32_MC0_STATUS+i*4, low, high);
34
35 if (!(high & (1<<31)))
36 continue;
37
38 printk(KERN_INFO "MCE: The hardware reports a non fatal, "
39 "correctable incident occurred on CPU %d.\n",
40 smp_processor_id());
41
42 printk(KERN_INFO "Bank %d: %08x%08x\n", i, high, low);
43
44 /*
45 * Scrub the error so we don't pick it up in MCE_RATE
46 * seconds time:
47 */
48 wrmsr(MSR_IA32_MC0_STATUS+i*4, 0UL, 0UL);
49
50 /* Serialize: */
51 wmb();
52 add_taint(TAINT_MACHINE_CHECK);
53 }
54}
55
56static void mce_work_fn(struct work_struct *work);
57static DECLARE_DELAYED_WORK(mce_work, mce_work_fn);
58
59static void mce_work_fn(struct work_struct *work)
60{
61 on_each_cpu(mce_checkregs, NULL, 1);
62 schedule_delayed_work(&mce_work, round_jiffies_relative(MCE_RATE));
63}
64
65static int __init init_nonfatal_mce_checker(void)
66{
67 struct cpuinfo_x86 *c = &boot_cpu_data;
68
69 /* Check for MCE support */
70 if (!cpu_has(c, X86_FEATURE_MCE))
71 return -ENODEV;
72
73 /* Check for PPro style MCA */
74 if (!cpu_has(c, X86_FEATURE_MCA))
75 return -ENODEV;
76
77 /* Some Athlons misbehave when we frob bank 0 */
78 if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD &&
79 boot_cpu_data.x86 == 6)
80 firstbank = 1;
81 else
82 firstbank = 0;
83
84 /*
85 * Check for non-fatal errors every MCE_RATE s
86 */
87 schedule_delayed_work(&mce_work, round_jiffies_relative(MCE_RATE));
88 printk(KERN_INFO "Machine check exception polling timer started.\n");
89
90 return 0;
91}
92module_init(init_nonfatal_mce_checker);
93
94MODULE_LICENSE("GPL");
diff --git a/arch/x86/kernel/cpu/mcheck/p4.c b/arch/x86/kernel/cpu/mcheck/p4.c
deleted file mode 100644
index 4482aea9aa2e..000000000000
--- a/arch/x86/kernel/cpu/mcheck/p4.c
+++ /dev/null
@@ -1,163 +0,0 @@
1/*
2 * P4 specific Machine Check Exception Reporting
3 */
4#include <linux/kernel.h>
5#include <linux/types.h>
6#include <linux/init.h>
7#include <linux/smp.h>
8
9#include <asm/processor.h>
10#include <asm/mce.h>
11#include <asm/msr.h>
12
13/* as supported by the P4/Xeon family */
14struct intel_mce_extended_msrs {
15 u32 eax;
16 u32 ebx;
17 u32 ecx;
18 u32 edx;
19 u32 esi;
20 u32 edi;
21 u32 ebp;
22 u32 esp;
23 u32 eflags;
24 u32 eip;
25 /* u32 *reserved[]; */
26};
27
28static int mce_num_extended_msrs;
29
30/* P4/Xeon Extended MCE MSR retrieval, return 0 if unsupported */
31static void intel_get_extended_msrs(struct intel_mce_extended_msrs *r)
32{
33 u32 h;
34
35 rdmsr(MSR_IA32_MCG_EAX, r->eax, h);
36 rdmsr(MSR_IA32_MCG_EBX, r->ebx, h);
37 rdmsr(MSR_IA32_MCG_ECX, r->ecx, h);
38 rdmsr(MSR_IA32_MCG_EDX, r->edx, h);
39 rdmsr(MSR_IA32_MCG_ESI, r->esi, h);
40 rdmsr(MSR_IA32_MCG_EDI, r->edi, h);
41 rdmsr(MSR_IA32_MCG_EBP, r->ebp, h);
42 rdmsr(MSR_IA32_MCG_ESP, r->esp, h);
43 rdmsr(MSR_IA32_MCG_EFLAGS, r->eflags, h);
44 rdmsr(MSR_IA32_MCG_EIP, r->eip, h);
45}
46
47static void intel_machine_check(struct pt_regs *regs, long error_code)
48{
49 u32 alow, ahigh, high, low;
50 u32 mcgstl, mcgsth;
51 int recover = 1;
52 int i;
53
54 rdmsr(MSR_IA32_MCG_STATUS, mcgstl, mcgsth);
55 if (mcgstl & (1<<0)) /* Recoverable ? */
56 recover = 0;
57
58 printk(KERN_EMERG "CPU %d: Machine Check Exception: %08x%08x\n",
59 smp_processor_id(), mcgsth, mcgstl);
60
61 if (mce_num_extended_msrs > 0) {
62 struct intel_mce_extended_msrs dbg;
63
64 intel_get_extended_msrs(&dbg);
65
66 printk(KERN_DEBUG "CPU %d: EIP: %08x EFLAGS: %08x\n"
67 "\teax: %08x ebx: %08x ecx: %08x edx: %08x\n"
68 "\tesi: %08x edi: %08x ebp: %08x esp: %08x\n",
69 smp_processor_id(), dbg.eip, dbg.eflags,
70 dbg.eax, dbg.ebx, dbg.ecx, dbg.edx,
71 dbg.esi, dbg.edi, dbg.ebp, dbg.esp);
72 }
73
74 for (i = 0; i < nr_mce_banks; i++) {
75 rdmsr(MSR_IA32_MC0_STATUS+i*4, low, high);
76 if (high & (1<<31)) {
77 char misc[20];
78 char addr[24];
79
80 misc[0] = addr[0] = '\0';
81 if (high & (1<<29))
82 recover |= 1;
83 if (high & (1<<25))
84 recover |= 2;
85 high &= ~(1<<31);
86 if (high & (1<<27)) {
87 rdmsr(MSR_IA32_MC0_MISC+i*4, alow, ahigh);
88 snprintf(misc, 20, "[%08x%08x]", ahigh, alow);
89 }
90 if (high & (1<<26)) {
91 rdmsr(MSR_IA32_MC0_ADDR+i*4, alow, ahigh);
92 snprintf(addr, 24, " at %08x%08x", ahigh, alow);
93 }
94 printk(KERN_EMERG "CPU %d: Bank %d: %08x%08x%s%s\n",
95 smp_processor_id(), i, high, low, misc, addr);
96 }
97 }
98
99 if (recover & 2)
100 panic("CPU context corrupt");
101 if (recover & 1)
102 panic("Unable to continue");
103
104 printk(KERN_EMERG "Attempting to continue.\n");
105
106 /*
107 * Do not clear the MSR_IA32_MCi_STATUS if the error is not
108 * recoverable/continuable.This will allow BIOS to look at the MSRs
109 * for errors if the OS could not log the error.
110 */
111 for (i = 0; i < nr_mce_banks; i++) {
112 u32 msr;
113 msr = MSR_IA32_MC0_STATUS+i*4;
114 rdmsr(msr, low, high);
115 if (high&(1<<31)) {
116 /* Clear it */
117 wrmsr(msr, 0UL, 0UL);
118 /* Serialize */
119 wmb();
120 add_taint(TAINT_MACHINE_CHECK);
121 }
122 }
123 mcgstl &= ~(1<<2);
124 wrmsr(MSR_IA32_MCG_STATUS, mcgstl, mcgsth);
125}
126
127void intel_p4_mcheck_init(struct cpuinfo_x86 *c)
128{
129 u32 l, h;
130 int i;
131
132 machine_check_vector = intel_machine_check;
133 wmb();
134
135 printk(KERN_INFO "Intel machine check architecture supported.\n");
136 rdmsr(MSR_IA32_MCG_CAP, l, h);
137 if (l & (1<<8)) /* Control register present ? */
138 wrmsr(MSR_IA32_MCG_CTL, 0xffffffff, 0xffffffff);
139 nr_mce_banks = l & 0xff;
140
141 for (i = 0; i < nr_mce_banks; i++) {
142 wrmsr(MSR_IA32_MC0_CTL+4*i, 0xffffffff, 0xffffffff);
143 wrmsr(MSR_IA32_MC0_STATUS+4*i, 0x0, 0x0);
144 }
145
146 set_in_cr4(X86_CR4_MCE);
147 printk(KERN_INFO "Intel machine check reporting enabled on CPU#%d.\n",
148 smp_processor_id());
149
150 /* Check for P4/Xeon extended MCE MSRs */
151 rdmsr(MSR_IA32_MCG_CAP, l, h);
152 if (l & (1<<9)) {/* MCG_EXT_P */
153 mce_num_extended_msrs = (l >> 16) & 0xff;
154 printk(KERN_INFO "CPU%d: Intel P4/Xeon Extended MCE MSRs (%d)"
155 " available\n",
156 smp_processor_id(), mce_num_extended_msrs);
157
158#ifdef CONFIG_X86_MCE_P4THERMAL
159 /* Check for P4/Xeon Thermal monitor */
160 intel_init_thermal(c);
161#endif
162 }
163}
diff --git a/arch/x86/kernel/cpu/mcheck/p6.c b/arch/x86/kernel/cpu/mcheck/p6.c
deleted file mode 100644
index 01e4f8178183..000000000000
--- a/arch/x86/kernel/cpu/mcheck/p6.c
+++ /dev/null
@@ -1,127 +0,0 @@
1/*
2 * P6 specific Machine Check Exception Reporting
3 * (C) Copyright 2002 Alan Cox <alan@lxorguk.ukuu.org.uk>
4 */
5#include <linux/interrupt.h>
6#include <linux/kernel.h>
7#include <linux/types.h>
8#include <linux/init.h>
9#include <linux/smp.h>
10
11#include <asm/processor.h>
12#include <asm/system.h>
13#include <asm/mce.h>
14#include <asm/msr.h>
15
16/* Machine Check Handler For PII/PIII */
17static void intel_machine_check(struct pt_regs *regs, long error_code)
18{
19 u32 alow, ahigh, high, low;
20 u32 mcgstl, mcgsth;
21 int recover = 1;
22 int i;
23
24 rdmsr(MSR_IA32_MCG_STATUS, mcgstl, mcgsth);
25 if (mcgstl & (1<<0)) /* Recoverable ? */
26 recover = 0;
27
28 printk(KERN_EMERG "CPU %d: Machine Check Exception: %08x%08x\n",
29 smp_processor_id(), mcgsth, mcgstl);
30
31 for (i = 0; i < nr_mce_banks; i++) {
32 rdmsr(MSR_IA32_MC0_STATUS+i*4, low, high);
33 if (high & (1<<31)) {
34 char misc[20];
35 char addr[24];
36
37 misc[0] = '\0';
38 addr[0] = '\0';
39
40 if (high & (1<<29))
41 recover |= 1;
42 if (high & (1<<25))
43 recover |= 2;
44 high &= ~(1<<31);
45
46 if (high & (1<<27)) {
47 rdmsr(MSR_IA32_MC0_MISC+i*4, alow, ahigh);
48 snprintf(misc, 20, "[%08x%08x]", ahigh, alow);
49 }
50 if (high & (1<<26)) {
51 rdmsr(MSR_IA32_MC0_ADDR+i*4, alow, ahigh);
52 snprintf(addr, 24, " at %08x%08x", ahigh, alow);
53 }
54
55 printk(KERN_EMERG "CPU %d: Bank %d: %08x%08x%s%s\n",
56 smp_processor_id(), i, high, low, misc, addr);
57 }
58 }
59
60 if (recover & 2)
61 panic("CPU context corrupt");
62 if (recover & 1)
63 panic("Unable to continue");
64
65 printk(KERN_EMERG "Attempting to continue.\n");
66 /*
67 * Do not clear the MSR_IA32_MCi_STATUS if the error is not
68 * recoverable/continuable.This will allow BIOS to look at the MSRs
69 * for errors if the OS could not log the error:
70 */
71 for (i = 0; i < nr_mce_banks; i++) {
72 unsigned int msr;
73
74 msr = MSR_IA32_MC0_STATUS+i*4;
75 rdmsr(msr, low, high);
76 if (high & (1<<31)) {
77 /* Clear it: */
78 wrmsr(msr, 0UL, 0UL);
79 /* Serialize: */
80 wmb();
81 add_taint(TAINT_MACHINE_CHECK);
82 }
83 }
84 mcgstl &= ~(1<<2);
85 wrmsr(MSR_IA32_MCG_STATUS, mcgstl, mcgsth);
86}
87
88/* Set up machine check reporting for processors with Intel style MCE: */
89void intel_p6_mcheck_init(struct cpuinfo_x86 *c)
90{
91 u32 l, h;
92 int i;
93
94 /* Check for MCE support */
95 if (!cpu_has(c, X86_FEATURE_MCE))
96 return;
97
98 /* Check for PPro style MCA */
99 if (!cpu_has(c, X86_FEATURE_MCA))
100 return;
101
102 /* Ok machine check is available */
103 machine_check_vector = intel_machine_check;
104 /* Make sure the vector pointer is visible before we enable MCEs: */
105 wmb();
106
107 printk(KERN_INFO "Intel machine check architecture supported.\n");
108 rdmsr(MSR_IA32_MCG_CAP, l, h);
109 if (l & (1<<8)) /* Control register present ? */
110 wrmsr(MSR_IA32_MCG_CTL, 0xffffffff, 0xffffffff);
111 nr_mce_banks = l & 0xff;
112
113 /*
114 * Following the example in IA-32 SDM Vol 3:
115 * - MC0_CTL should not be written
116 * - Status registers on all banks should be cleared on reset
117 */
118 for (i = 1; i < nr_mce_banks; i++)
119 wrmsr(MSR_IA32_MC0_CTL+4*i, 0xffffffff, 0xffffffff);
120
121 for (i = 0; i < nr_mce_banks; i++)
122 wrmsr(MSR_IA32_MC0_STATUS+4*i, 0x0, 0x0);
123
124 set_in_cr4(X86_CR4_MCE);
125 printk(KERN_INFO "Intel machine check reporting enabled on CPU#%d.\n",
126 smp_processor_id());
127}
diff --git a/arch/x86/kernel/cpu/mcheck/therm_throt.c b/arch/x86/kernel/cpu/mcheck/therm_throt.c
index 5957a93e5173..63a56d147e4a 100644
--- a/arch/x86/kernel/cpu/mcheck/therm_throt.c
+++ b/arch/x86/kernel/cpu/mcheck/therm_throt.c
@@ -260,9 +260,6 @@ void intel_init_thermal(struct cpuinfo_x86 *c)
260 return; 260 return;
261 } 261 }
262 262
263 if (cpu_has(c, X86_FEATURE_TM2) && (l & MSR_IA32_MISC_ENABLE_TM2))
264 tm2 = 1;
265
266 /* Check whether a vector already exists */ 263 /* Check whether a vector already exists */
267 if (h & APIC_VECTOR_MASK) { 264 if (h & APIC_VECTOR_MASK) {
268 printk(KERN_DEBUG 265 printk(KERN_DEBUG
@@ -271,6 +268,16 @@ void intel_init_thermal(struct cpuinfo_x86 *c)
271 return; 268 return;
272 } 269 }
273 270
271 /* early Pentium M models use different method for enabling TM2 */
272 if (cpu_has(c, X86_FEATURE_TM2)) {
273 if (c->x86 == 6 && (c->x86_model == 9 || c->x86_model == 13)) {
274 rdmsr(MSR_THERM2_CTL, l, h);
275 if (l & MSR_THERM2_CTL_TM_SELECT)
276 tm2 = 1;
277 } else if (l & MSR_IA32_MISC_ENABLE_TM2)
278 tm2 = 1;
279 }
280
274 /* We'll mask the thermal vector in the lapic till we're ready: */ 281 /* We'll mask the thermal vector in the lapic till we're ready: */
275 h = THERMAL_APIC_VECTOR | APIC_DM_FIXED | APIC_LVT_MASKED; 282 h = THERMAL_APIC_VECTOR | APIC_DM_FIXED | APIC_LVT_MASKED;
276 apic_write(APIC_LVTTHMR, h); 283 apic_write(APIC_LVTTHMR, h);
diff --git a/arch/x86/kernel/cpu/mtrr/if.c b/arch/x86/kernel/cpu/mtrr/if.c
index 08b6ea4c62b4..f04e72527604 100644
--- a/arch/x86/kernel/cpu/mtrr/if.c
+++ b/arch/x86/kernel/cpu/mtrr/if.c
@@ -126,8 +126,8 @@ mtrr_write(struct file *file, const char __user *buf, size_t len, loff_t * ppos)
126 return -EINVAL; 126 return -EINVAL;
127 127
128 base = simple_strtoull(line + 5, &ptr, 0); 128 base = simple_strtoull(line + 5, &ptr, 0);
129 for (; isspace(*ptr); ++ptr) 129 while (isspace(*ptr))
130 ; 130 ptr++;
131 131
132 if (strncmp(ptr, "size=", 5)) 132 if (strncmp(ptr, "size=", 5))
133 return -EINVAL; 133 return -EINVAL;
@@ -135,14 +135,14 @@ mtrr_write(struct file *file, const char __user *buf, size_t len, loff_t * ppos)
135 size = simple_strtoull(ptr + 5, &ptr, 0); 135 size = simple_strtoull(ptr + 5, &ptr, 0);
136 if ((base & 0xfff) || (size & 0xfff)) 136 if ((base & 0xfff) || (size & 0xfff))
137 return -EINVAL; 137 return -EINVAL;
138 for (; isspace(*ptr); ++ptr) 138 while (isspace(*ptr))
139 ; 139 ptr++;
140 140
141 if (strncmp(ptr, "type=", 5)) 141 if (strncmp(ptr, "type=", 5))
142 return -EINVAL; 142 return -EINVAL;
143 ptr += 5; 143 ptr += 5;
144 for (; isspace(*ptr); ++ptr) 144 while (isspace(*ptr))
145 ; 145 ptr++;
146 146
147 for (i = 0; i < MTRR_NUM_TYPES; ++i) { 147 for (i = 0; i < MTRR_NUM_TYPES; ++i) {
148 if (strcmp(ptr, mtrr_strings[i])) 148 if (strcmp(ptr, mtrr_strings[i]))
diff --git a/arch/x86/kernel/cpu/perf_counter.c b/arch/x86/kernel/cpu/perf_event.c
index 2732e2c1e4d3..a3c7adb06b78 100644
--- a/arch/x86/kernel/cpu/perf_counter.c
+++ b/arch/x86/kernel/cpu/perf_event.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Performance counter x86 architecture code 2 * Performance events x86 architecture code
3 * 3 *
4 * Copyright (C) 2008 Thomas Gleixner <tglx@linutronix.de> 4 * Copyright (C) 2008 Thomas Gleixner <tglx@linutronix.de>
5 * Copyright (C) 2008-2009 Red Hat, Inc., Ingo Molnar 5 * Copyright (C) 2008-2009 Red Hat, Inc., Ingo Molnar
@@ -11,7 +11,7 @@
11 * For licencing details see kernel-base/COPYING 11 * For licencing details see kernel-base/COPYING
12 */ 12 */
13 13
14#include <linux/perf_counter.h> 14#include <linux/perf_event.h>
15#include <linux/capability.h> 15#include <linux/capability.h>
16#include <linux/notifier.h> 16#include <linux/notifier.h>
17#include <linux/hardirq.h> 17#include <linux/hardirq.h>
@@ -27,19 +27,19 @@
27#include <asm/stacktrace.h> 27#include <asm/stacktrace.h>
28#include <asm/nmi.h> 28#include <asm/nmi.h>
29 29
30static u64 perf_counter_mask __read_mostly; 30static u64 perf_event_mask __read_mostly;
31 31
32/* The maximal number of PEBS counters: */ 32/* The maximal number of PEBS events: */
33#define MAX_PEBS_COUNTERS 4 33#define MAX_PEBS_EVENTS 4
34 34
35/* The size of a BTS record in bytes: */ 35/* The size of a BTS record in bytes: */
36#define BTS_RECORD_SIZE 24 36#define BTS_RECORD_SIZE 24
37 37
38/* The size of a per-cpu BTS buffer in bytes: */ 38/* The size of a per-cpu BTS buffer in bytes: */
39#define BTS_BUFFER_SIZE (BTS_RECORD_SIZE * 1024) 39#define BTS_BUFFER_SIZE (BTS_RECORD_SIZE * 2048)
40 40
41/* The BTS overflow threshold in bytes from the end of the buffer: */ 41/* The BTS overflow threshold in bytes from the end of the buffer: */
42#define BTS_OVFL_TH (BTS_RECORD_SIZE * 64) 42#define BTS_OVFL_TH (BTS_RECORD_SIZE * 128)
43 43
44 44
45/* 45/*
@@ -65,11 +65,11 @@ struct debug_store {
65 u64 pebs_index; 65 u64 pebs_index;
66 u64 pebs_absolute_maximum; 66 u64 pebs_absolute_maximum;
67 u64 pebs_interrupt_threshold; 67 u64 pebs_interrupt_threshold;
68 u64 pebs_counter_reset[MAX_PEBS_COUNTERS]; 68 u64 pebs_event_reset[MAX_PEBS_EVENTS];
69}; 69};
70 70
71struct cpu_hw_counters { 71struct cpu_hw_events {
72 struct perf_counter *counters[X86_PMC_IDX_MAX]; 72 struct perf_event *events[X86_PMC_IDX_MAX];
73 unsigned long used_mask[BITS_TO_LONGS(X86_PMC_IDX_MAX)]; 73 unsigned long used_mask[BITS_TO_LONGS(X86_PMC_IDX_MAX)];
74 unsigned long active_mask[BITS_TO_LONGS(X86_PMC_IDX_MAX)]; 74 unsigned long active_mask[BITS_TO_LONGS(X86_PMC_IDX_MAX)];
75 unsigned long interrupts; 75 unsigned long interrupts;
@@ -86,17 +86,17 @@ struct x86_pmu {
86 int (*handle_irq)(struct pt_regs *); 86 int (*handle_irq)(struct pt_regs *);
87 void (*disable_all)(void); 87 void (*disable_all)(void);
88 void (*enable_all)(void); 88 void (*enable_all)(void);
89 void (*enable)(struct hw_perf_counter *, int); 89 void (*enable)(struct hw_perf_event *, int);
90 void (*disable)(struct hw_perf_counter *, int); 90 void (*disable)(struct hw_perf_event *, int);
91 unsigned eventsel; 91 unsigned eventsel;
92 unsigned perfctr; 92 unsigned perfctr;
93 u64 (*event_map)(int); 93 u64 (*event_map)(int);
94 u64 (*raw_event)(u64); 94 u64 (*raw_event)(u64);
95 int max_events; 95 int max_events;
96 int num_counters; 96 int num_events;
97 int num_counters_fixed; 97 int num_events_fixed;
98 int counter_bits; 98 int event_bits;
99 u64 counter_mask; 99 u64 event_mask;
100 int apic; 100 int apic;
101 u64 max_period; 101 u64 max_period;
102 u64 intel_ctrl; 102 u64 intel_ctrl;
@@ -106,7 +106,7 @@ struct x86_pmu {
106 106
107static struct x86_pmu x86_pmu __read_mostly; 107static struct x86_pmu x86_pmu __read_mostly;
108 108
109static DEFINE_PER_CPU(struct cpu_hw_counters, cpu_hw_counters) = { 109static DEFINE_PER_CPU(struct cpu_hw_events, cpu_hw_events) = {
110 .enabled = 1, 110 .enabled = 1,
111}; 111};
112 112
@@ -124,35 +124,35 @@ static const u64 p6_perfmon_event_map[] =
124 [PERF_COUNT_HW_BUS_CYCLES] = 0x0062, 124 [PERF_COUNT_HW_BUS_CYCLES] = 0x0062,
125}; 125};
126 126
127static u64 p6_pmu_event_map(int event) 127static u64 p6_pmu_event_map(int hw_event)
128{ 128{
129 return p6_perfmon_event_map[event]; 129 return p6_perfmon_event_map[hw_event];
130} 130}
131 131
132/* 132/*
133 * Counter setting that is specified not to count anything. 133 * Event setting that is specified not to count anything.
134 * We use this to effectively disable a counter. 134 * We use this to effectively disable a counter.
135 * 135 *
136 * L2_RQSTS with 0 MESI unit mask. 136 * L2_RQSTS with 0 MESI unit mask.
137 */ 137 */
138#define P6_NOP_COUNTER 0x0000002EULL 138#define P6_NOP_EVENT 0x0000002EULL
139 139
140static u64 p6_pmu_raw_event(u64 event) 140static u64 p6_pmu_raw_event(u64 hw_event)
141{ 141{
142#define P6_EVNTSEL_EVENT_MASK 0x000000FFULL 142#define P6_EVNTSEL_EVENT_MASK 0x000000FFULL
143#define P6_EVNTSEL_UNIT_MASK 0x0000FF00ULL 143#define P6_EVNTSEL_UNIT_MASK 0x0000FF00ULL
144#define P6_EVNTSEL_EDGE_MASK 0x00040000ULL 144#define P6_EVNTSEL_EDGE_MASK 0x00040000ULL
145#define P6_EVNTSEL_INV_MASK 0x00800000ULL 145#define P6_EVNTSEL_INV_MASK 0x00800000ULL
146#define P6_EVNTSEL_COUNTER_MASK 0xFF000000ULL 146#define P6_EVNTSEL_REG_MASK 0xFF000000ULL
147 147
148#define P6_EVNTSEL_MASK \ 148#define P6_EVNTSEL_MASK \
149 (P6_EVNTSEL_EVENT_MASK | \ 149 (P6_EVNTSEL_EVENT_MASK | \
150 P6_EVNTSEL_UNIT_MASK | \ 150 P6_EVNTSEL_UNIT_MASK | \
151 P6_EVNTSEL_EDGE_MASK | \ 151 P6_EVNTSEL_EDGE_MASK | \
152 P6_EVNTSEL_INV_MASK | \ 152 P6_EVNTSEL_INV_MASK | \
153 P6_EVNTSEL_COUNTER_MASK) 153 P6_EVNTSEL_REG_MASK)
154 154
155 return event & P6_EVNTSEL_MASK; 155 return hw_event & P6_EVNTSEL_MASK;
156} 156}
157 157
158 158
@@ -170,16 +170,16 @@ static const u64 intel_perfmon_event_map[] =
170 [PERF_COUNT_HW_BUS_CYCLES] = 0x013c, 170 [PERF_COUNT_HW_BUS_CYCLES] = 0x013c,
171}; 171};
172 172
173static u64 intel_pmu_event_map(int event) 173static u64 intel_pmu_event_map(int hw_event)
174{ 174{
175 return intel_perfmon_event_map[event]; 175 return intel_perfmon_event_map[hw_event];
176} 176}
177 177
178/* 178/*
179 * Generalized hw caching related event table, filled 179 * Generalized hw caching related hw_event table, filled
180 * in on a per model basis. A value of 0 means 180 * in on a per model basis. A value of 0 means
181 * 'not supported', -1 means 'event makes no sense on 181 * 'not supported', -1 means 'hw_event makes no sense on
182 * this CPU', any other value means the raw event 182 * this CPU', any other value means the raw hw_event
183 * ID. 183 * ID.
184 */ 184 */
185 185
@@ -463,22 +463,22 @@ static const u64 atom_hw_cache_event_ids
463 }, 463 },
464}; 464};
465 465
466static u64 intel_pmu_raw_event(u64 event) 466static u64 intel_pmu_raw_event(u64 hw_event)
467{ 467{
468#define CORE_EVNTSEL_EVENT_MASK 0x000000FFULL 468#define CORE_EVNTSEL_EVENT_MASK 0x000000FFULL
469#define CORE_EVNTSEL_UNIT_MASK 0x0000FF00ULL 469#define CORE_EVNTSEL_UNIT_MASK 0x0000FF00ULL
470#define CORE_EVNTSEL_EDGE_MASK 0x00040000ULL 470#define CORE_EVNTSEL_EDGE_MASK 0x00040000ULL
471#define CORE_EVNTSEL_INV_MASK 0x00800000ULL 471#define CORE_EVNTSEL_INV_MASK 0x00800000ULL
472#define CORE_EVNTSEL_COUNTER_MASK 0xFF000000ULL 472#define CORE_EVNTSEL_REG_MASK 0xFF000000ULL
473 473
474#define CORE_EVNTSEL_MASK \ 474#define CORE_EVNTSEL_MASK \
475 (CORE_EVNTSEL_EVENT_MASK | \ 475 (CORE_EVNTSEL_EVENT_MASK | \
476 CORE_EVNTSEL_UNIT_MASK | \ 476 CORE_EVNTSEL_UNIT_MASK | \
477 CORE_EVNTSEL_EDGE_MASK | \ 477 CORE_EVNTSEL_EDGE_MASK | \
478 CORE_EVNTSEL_INV_MASK | \ 478 CORE_EVNTSEL_INV_MASK | \
479 CORE_EVNTSEL_COUNTER_MASK) 479 CORE_EVNTSEL_REG_MASK)
480 480
481 return event & CORE_EVNTSEL_MASK; 481 return hw_event & CORE_EVNTSEL_MASK;
482} 482}
483 483
484static const u64 amd_hw_cache_event_ids 484static const u64 amd_hw_cache_event_ids
@@ -585,39 +585,39 @@ static const u64 amd_perfmon_event_map[] =
585 [PERF_COUNT_HW_BRANCH_MISSES] = 0x00c5, 585 [PERF_COUNT_HW_BRANCH_MISSES] = 0x00c5,
586}; 586};
587 587
588static u64 amd_pmu_event_map(int event) 588static u64 amd_pmu_event_map(int hw_event)
589{ 589{
590 return amd_perfmon_event_map[event]; 590 return amd_perfmon_event_map[hw_event];
591} 591}
592 592
593static u64 amd_pmu_raw_event(u64 event) 593static u64 amd_pmu_raw_event(u64 hw_event)
594{ 594{
595#define K7_EVNTSEL_EVENT_MASK 0x7000000FFULL 595#define K7_EVNTSEL_EVENT_MASK 0x7000000FFULL
596#define K7_EVNTSEL_UNIT_MASK 0x00000FF00ULL 596#define K7_EVNTSEL_UNIT_MASK 0x00000FF00ULL
597#define K7_EVNTSEL_EDGE_MASK 0x000040000ULL 597#define K7_EVNTSEL_EDGE_MASK 0x000040000ULL
598#define K7_EVNTSEL_INV_MASK 0x000800000ULL 598#define K7_EVNTSEL_INV_MASK 0x000800000ULL
599#define K7_EVNTSEL_COUNTER_MASK 0x0FF000000ULL 599#define K7_EVNTSEL_REG_MASK 0x0FF000000ULL
600 600
601#define K7_EVNTSEL_MASK \ 601#define K7_EVNTSEL_MASK \
602 (K7_EVNTSEL_EVENT_MASK | \ 602 (K7_EVNTSEL_EVENT_MASK | \
603 K7_EVNTSEL_UNIT_MASK | \ 603 K7_EVNTSEL_UNIT_MASK | \
604 K7_EVNTSEL_EDGE_MASK | \ 604 K7_EVNTSEL_EDGE_MASK | \
605 K7_EVNTSEL_INV_MASK | \ 605 K7_EVNTSEL_INV_MASK | \
606 K7_EVNTSEL_COUNTER_MASK) 606 K7_EVNTSEL_REG_MASK)
607 607
608 return event & K7_EVNTSEL_MASK; 608 return hw_event & K7_EVNTSEL_MASK;
609} 609}
610 610
611/* 611/*
612 * Propagate counter elapsed time into the generic counter. 612 * Propagate event elapsed time into the generic event.
613 * Can only be executed on the CPU where the counter is active. 613 * Can only be executed on the CPU where the event is active.
614 * Returns the delta events processed. 614 * Returns the delta events processed.
615 */ 615 */
616static u64 616static u64
617x86_perf_counter_update(struct perf_counter *counter, 617x86_perf_event_update(struct perf_event *event,
618 struct hw_perf_counter *hwc, int idx) 618 struct hw_perf_event *hwc, int idx)
619{ 619{
620 int shift = 64 - x86_pmu.counter_bits; 620 int shift = 64 - x86_pmu.event_bits;
621 u64 prev_raw_count, new_raw_count; 621 u64 prev_raw_count, new_raw_count;
622 s64 delta; 622 s64 delta;
623 623
@@ -625,15 +625,15 @@ x86_perf_counter_update(struct perf_counter *counter,
625 return 0; 625 return 0;
626 626
627 /* 627 /*
628 * Careful: an NMI might modify the previous counter value. 628 * Careful: an NMI might modify the previous event value.
629 * 629 *
630 * Our tactic to handle this is to first atomically read and 630 * Our tactic to handle this is to first atomically read and
631 * exchange a new raw count - then add that new-prev delta 631 * exchange a new raw count - then add that new-prev delta
632 * count to the generic counter atomically: 632 * count to the generic event atomically:
633 */ 633 */
634again: 634again:
635 prev_raw_count = atomic64_read(&hwc->prev_count); 635 prev_raw_count = atomic64_read(&hwc->prev_count);
636 rdmsrl(hwc->counter_base + idx, new_raw_count); 636 rdmsrl(hwc->event_base + idx, new_raw_count);
637 637
638 if (atomic64_cmpxchg(&hwc->prev_count, prev_raw_count, 638 if (atomic64_cmpxchg(&hwc->prev_count, prev_raw_count,
639 new_raw_count) != prev_raw_count) 639 new_raw_count) != prev_raw_count)
@@ -642,7 +642,7 @@ again:
642 /* 642 /*
643 * Now we have the new raw value and have updated the prev 643 * Now we have the new raw value and have updated the prev
644 * timestamp already. We can now calculate the elapsed delta 644 * timestamp already. We can now calculate the elapsed delta
645 * (counter-)time and add that to the generic counter. 645 * (event-)time and add that to the generic event.
646 * 646 *
647 * Careful, not all hw sign-extends above the physical width 647 * Careful, not all hw sign-extends above the physical width
648 * of the count. 648 * of the count.
@@ -650,13 +650,13 @@ again:
650 delta = (new_raw_count << shift) - (prev_raw_count << shift); 650 delta = (new_raw_count << shift) - (prev_raw_count << shift);
651 delta >>= shift; 651 delta >>= shift;
652 652
653 atomic64_add(delta, &counter->count); 653 atomic64_add(delta, &event->count);
654 atomic64_sub(delta, &hwc->period_left); 654 atomic64_sub(delta, &hwc->period_left);
655 655
656 return new_raw_count; 656 return new_raw_count;
657} 657}
658 658
659static atomic_t active_counters; 659static atomic_t active_events;
660static DEFINE_MUTEX(pmc_reserve_mutex); 660static DEFINE_MUTEX(pmc_reserve_mutex);
661 661
662static bool reserve_pmc_hardware(void) 662static bool reserve_pmc_hardware(void)
@@ -667,12 +667,12 @@ static bool reserve_pmc_hardware(void)
667 if (nmi_watchdog == NMI_LOCAL_APIC) 667 if (nmi_watchdog == NMI_LOCAL_APIC)
668 disable_lapic_nmi_watchdog(); 668 disable_lapic_nmi_watchdog();
669 669
670 for (i = 0; i < x86_pmu.num_counters; i++) { 670 for (i = 0; i < x86_pmu.num_events; i++) {
671 if (!reserve_perfctr_nmi(x86_pmu.perfctr + i)) 671 if (!reserve_perfctr_nmi(x86_pmu.perfctr + i))
672 goto perfctr_fail; 672 goto perfctr_fail;
673 } 673 }
674 674
675 for (i = 0; i < x86_pmu.num_counters; i++) { 675 for (i = 0; i < x86_pmu.num_events; i++) {
676 if (!reserve_evntsel_nmi(x86_pmu.eventsel + i)) 676 if (!reserve_evntsel_nmi(x86_pmu.eventsel + i))
677 goto eventsel_fail; 677 goto eventsel_fail;
678 } 678 }
@@ -685,7 +685,7 @@ eventsel_fail:
685 for (i--; i >= 0; i--) 685 for (i--; i >= 0; i--)
686 release_evntsel_nmi(x86_pmu.eventsel + i); 686 release_evntsel_nmi(x86_pmu.eventsel + i);
687 687
688 i = x86_pmu.num_counters; 688 i = x86_pmu.num_events;
689 689
690perfctr_fail: 690perfctr_fail:
691 for (i--; i >= 0; i--) 691 for (i--; i >= 0; i--)
@@ -703,7 +703,7 @@ static void release_pmc_hardware(void)
703#ifdef CONFIG_X86_LOCAL_APIC 703#ifdef CONFIG_X86_LOCAL_APIC
704 int i; 704 int i;
705 705
706 for (i = 0; i < x86_pmu.num_counters; i++) { 706 for (i = 0; i < x86_pmu.num_events; i++) {
707 release_perfctr_nmi(x86_pmu.perfctr + i); 707 release_perfctr_nmi(x86_pmu.perfctr + i);
708 release_evntsel_nmi(x86_pmu.eventsel + i); 708 release_evntsel_nmi(x86_pmu.eventsel + i);
709 } 709 }
@@ -720,7 +720,7 @@ static inline bool bts_available(void)
720 720
721static inline void init_debug_store_on_cpu(int cpu) 721static inline void init_debug_store_on_cpu(int cpu)
722{ 722{
723 struct debug_store *ds = per_cpu(cpu_hw_counters, cpu).ds; 723 struct debug_store *ds = per_cpu(cpu_hw_events, cpu).ds;
724 724
725 if (!ds) 725 if (!ds)
726 return; 726 return;
@@ -732,7 +732,7 @@ static inline void init_debug_store_on_cpu(int cpu)
732 732
733static inline void fini_debug_store_on_cpu(int cpu) 733static inline void fini_debug_store_on_cpu(int cpu)
734{ 734{
735 if (!per_cpu(cpu_hw_counters, cpu).ds) 735 if (!per_cpu(cpu_hw_events, cpu).ds)
736 return; 736 return;
737 737
738 wrmsr_on_cpu(cpu, MSR_IA32_DS_AREA, 0, 0); 738 wrmsr_on_cpu(cpu, MSR_IA32_DS_AREA, 0, 0);
@@ -751,12 +751,12 @@ static void release_bts_hardware(void)
751 fini_debug_store_on_cpu(cpu); 751 fini_debug_store_on_cpu(cpu);
752 752
753 for_each_possible_cpu(cpu) { 753 for_each_possible_cpu(cpu) {
754 struct debug_store *ds = per_cpu(cpu_hw_counters, cpu).ds; 754 struct debug_store *ds = per_cpu(cpu_hw_events, cpu).ds;
755 755
756 if (!ds) 756 if (!ds)
757 continue; 757 continue;
758 758
759 per_cpu(cpu_hw_counters, cpu).ds = NULL; 759 per_cpu(cpu_hw_events, cpu).ds = NULL;
760 760
761 kfree((void *)(unsigned long)ds->bts_buffer_base); 761 kfree((void *)(unsigned long)ds->bts_buffer_base);
762 kfree(ds); 762 kfree(ds);
@@ -796,7 +796,7 @@ static int reserve_bts_hardware(void)
796 ds->bts_interrupt_threshold = 796 ds->bts_interrupt_threshold =
797 ds->bts_absolute_maximum - BTS_OVFL_TH; 797 ds->bts_absolute_maximum - BTS_OVFL_TH;
798 798
799 per_cpu(cpu_hw_counters, cpu).ds = ds; 799 per_cpu(cpu_hw_events, cpu).ds = ds;
800 err = 0; 800 err = 0;
801 } 801 }
802 802
@@ -812,9 +812,9 @@ static int reserve_bts_hardware(void)
812 return err; 812 return err;
813} 813}
814 814
815static void hw_perf_counter_destroy(struct perf_counter *counter) 815static void hw_perf_event_destroy(struct perf_event *event)
816{ 816{
817 if (atomic_dec_and_mutex_lock(&active_counters, &pmc_reserve_mutex)) { 817 if (atomic_dec_and_mutex_lock(&active_events, &pmc_reserve_mutex)) {
818 release_pmc_hardware(); 818 release_pmc_hardware();
819 release_bts_hardware(); 819 release_bts_hardware();
820 mutex_unlock(&pmc_reserve_mutex); 820 mutex_unlock(&pmc_reserve_mutex);
@@ -827,7 +827,7 @@ static inline int x86_pmu_initialized(void)
827} 827}
828 828
829static inline int 829static inline int
830set_ext_hw_attr(struct hw_perf_counter *hwc, struct perf_counter_attr *attr) 830set_ext_hw_attr(struct hw_perf_event *hwc, struct perf_event_attr *attr)
831{ 831{
832 unsigned int cache_type, cache_op, cache_result; 832 unsigned int cache_type, cache_op, cache_result;
833 u64 config, val; 833 u64 config, val;
@@ -880,7 +880,7 @@ static void intel_pmu_enable_bts(u64 config)
880 880
881static void intel_pmu_disable_bts(void) 881static void intel_pmu_disable_bts(void)
882{ 882{
883 struct cpu_hw_counters *cpuc = &__get_cpu_var(cpu_hw_counters); 883 struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
884 unsigned long debugctlmsr; 884 unsigned long debugctlmsr;
885 885
886 if (!cpuc->ds) 886 if (!cpuc->ds)
@@ -898,10 +898,10 @@ static void intel_pmu_disable_bts(void)
898/* 898/*
899 * Setup the hardware configuration for a given attr_type 899 * Setup the hardware configuration for a given attr_type
900 */ 900 */
901static int __hw_perf_counter_init(struct perf_counter *counter) 901static int __hw_perf_event_init(struct perf_event *event)
902{ 902{
903 struct perf_counter_attr *attr = &counter->attr; 903 struct perf_event_attr *attr = &event->attr;
904 struct hw_perf_counter *hwc = &counter->hw; 904 struct hw_perf_event *hwc = &event->hw;
905 u64 config; 905 u64 config;
906 int err; 906 int err;
907 907
@@ -909,21 +909,23 @@ static int __hw_perf_counter_init(struct perf_counter *counter)
909 return -ENODEV; 909 return -ENODEV;
910 910
911 err = 0; 911 err = 0;
912 if (!atomic_inc_not_zero(&active_counters)) { 912 if (!atomic_inc_not_zero(&active_events)) {
913 mutex_lock(&pmc_reserve_mutex); 913 mutex_lock(&pmc_reserve_mutex);
914 if (atomic_read(&active_counters) == 0) { 914 if (atomic_read(&active_events) == 0) {
915 if (!reserve_pmc_hardware()) 915 if (!reserve_pmc_hardware())
916 err = -EBUSY; 916 err = -EBUSY;
917 else 917 else
918 err = reserve_bts_hardware(); 918 err = reserve_bts_hardware();
919 } 919 }
920 if (!err) 920 if (!err)
921 atomic_inc(&active_counters); 921 atomic_inc(&active_events);
922 mutex_unlock(&pmc_reserve_mutex); 922 mutex_unlock(&pmc_reserve_mutex);
923 } 923 }
924 if (err) 924 if (err)
925 return err; 925 return err;
926 926
927 event->destroy = hw_perf_event_destroy;
928
927 /* 929 /*
928 * Generate PMC IRQs: 930 * Generate PMC IRQs:
929 * (keep 'enabled' bit clear for now) 931 * (keep 'enabled' bit clear for now)
@@ -946,17 +948,15 @@ static int __hw_perf_counter_init(struct perf_counter *counter)
946 /* 948 /*
947 * If we have a PMU initialized but no APIC 949 * If we have a PMU initialized but no APIC
948 * interrupts, we cannot sample hardware 950 * interrupts, we cannot sample hardware
949 * counters (user-space has to fall back and 951 * events (user-space has to fall back and
950 * sample via a hrtimer based software counter): 952 * sample via a hrtimer based software event):
951 */ 953 */
952 if (!x86_pmu.apic) 954 if (!x86_pmu.apic)
953 return -EOPNOTSUPP; 955 return -EOPNOTSUPP;
954 } 956 }
955 957
956 counter->destroy = hw_perf_counter_destroy;
957
958 /* 958 /*
959 * Raw event type provide the config in the event structure 959 * Raw hw_event type provide the config in the hw_event structure
960 */ 960 */
961 if (attr->type == PERF_TYPE_RAW) { 961 if (attr->type == PERF_TYPE_RAW) {
962 hwc->config |= x86_pmu.raw_event(attr->config); 962 hwc->config |= x86_pmu.raw_event(attr->config);
@@ -1001,7 +1001,7 @@ static int __hw_perf_counter_init(struct perf_counter *counter)
1001 1001
1002static void p6_pmu_disable_all(void) 1002static void p6_pmu_disable_all(void)
1003{ 1003{
1004 struct cpu_hw_counters *cpuc = &__get_cpu_var(cpu_hw_counters); 1004 struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
1005 u64 val; 1005 u64 val;
1006 1006
1007 if (!cpuc->enabled) 1007 if (!cpuc->enabled)
@@ -1018,7 +1018,7 @@ static void p6_pmu_disable_all(void)
1018 1018
1019static void intel_pmu_disable_all(void) 1019static void intel_pmu_disable_all(void)
1020{ 1020{
1021 struct cpu_hw_counters *cpuc = &__get_cpu_var(cpu_hw_counters); 1021 struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
1022 1022
1023 if (!cpuc->enabled) 1023 if (!cpuc->enabled)
1024 return; 1024 return;
@@ -1034,7 +1034,7 @@ static void intel_pmu_disable_all(void)
1034 1034
1035static void amd_pmu_disable_all(void) 1035static void amd_pmu_disable_all(void)
1036{ 1036{
1037 struct cpu_hw_counters *cpuc = &__get_cpu_var(cpu_hw_counters); 1037 struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
1038 int idx; 1038 int idx;
1039 1039
1040 if (!cpuc->enabled) 1040 if (!cpuc->enabled)
@@ -1043,12 +1043,12 @@ static void amd_pmu_disable_all(void)
1043 cpuc->enabled = 0; 1043 cpuc->enabled = 0;
1044 /* 1044 /*
1045 * ensure we write the disable before we start disabling the 1045 * ensure we write the disable before we start disabling the
1046 * counters proper, so that amd_pmu_enable_counter() does the 1046 * events proper, so that amd_pmu_enable_event() does the
1047 * right thing. 1047 * right thing.
1048 */ 1048 */
1049 barrier(); 1049 barrier();
1050 1050
1051 for (idx = 0; idx < x86_pmu.num_counters; idx++) { 1051 for (idx = 0; idx < x86_pmu.num_events; idx++) {
1052 u64 val; 1052 u64 val;
1053 1053
1054 if (!test_bit(idx, cpuc->active_mask)) 1054 if (!test_bit(idx, cpuc->active_mask))
@@ -1070,7 +1070,7 @@ void hw_perf_disable(void)
1070 1070
1071static void p6_pmu_enable_all(void) 1071static void p6_pmu_enable_all(void)
1072{ 1072{
1073 struct cpu_hw_counters *cpuc = &__get_cpu_var(cpu_hw_counters); 1073 struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
1074 unsigned long val; 1074 unsigned long val;
1075 1075
1076 if (cpuc->enabled) 1076 if (cpuc->enabled)
@@ -1087,7 +1087,7 @@ static void p6_pmu_enable_all(void)
1087 1087
1088static void intel_pmu_enable_all(void) 1088static void intel_pmu_enable_all(void)
1089{ 1089{
1090 struct cpu_hw_counters *cpuc = &__get_cpu_var(cpu_hw_counters); 1090 struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
1091 1091
1092 if (cpuc->enabled) 1092 if (cpuc->enabled)
1093 return; 1093 return;
@@ -1098,19 +1098,19 @@ static void intel_pmu_enable_all(void)
1098 wrmsrl(MSR_CORE_PERF_GLOBAL_CTRL, x86_pmu.intel_ctrl); 1098 wrmsrl(MSR_CORE_PERF_GLOBAL_CTRL, x86_pmu.intel_ctrl);
1099 1099
1100 if (test_bit(X86_PMC_IDX_FIXED_BTS, cpuc->active_mask)) { 1100 if (test_bit(X86_PMC_IDX_FIXED_BTS, cpuc->active_mask)) {
1101 struct perf_counter *counter = 1101 struct perf_event *event =
1102 cpuc->counters[X86_PMC_IDX_FIXED_BTS]; 1102 cpuc->events[X86_PMC_IDX_FIXED_BTS];
1103 1103
1104 if (WARN_ON_ONCE(!counter)) 1104 if (WARN_ON_ONCE(!event))
1105 return; 1105 return;
1106 1106
1107 intel_pmu_enable_bts(counter->hw.config); 1107 intel_pmu_enable_bts(event->hw.config);
1108 } 1108 }
1109} 1109}
1110 1110
1111static void amd_pmu_enable_all(void) 1111static void amd_pmu_enable_all(void)
1112{ 1112{
1113 struct cpu_hw_counters *cpuc = &__get_cpu_var(cpu_hw_counters); 1113 struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
1114 int idx; 1114 int idx;
1115 1115
1116 if (cpuc->enabled) 1116 if (cpuc->enabled)
@@ -1119,14 +1119,14 @@ static void amd_pmu_enable_all(void)
1119 cpuc->enabled = 1; 1119 cpuc->enabled = 1;
1120 barrier(); 1120 barrier();
1121 1121
1122 for (idx = 0; idx < x86_pmu.num_counters; idx++) { 1122 for (idx = 0; idx < x86_pmu.num_events; idx++) {
1123 struct perf_counter *counter = cpuc->counters[idx]; 1123 struct perf_event *event = cpuc->events[idx];
1124 u64 val; 1124 u64 val;
1125 1125
1126 if (!test_bit(idx, cpuc->active_mask)) 1126 if (!test_bit(idx, cpuc->active_mask))
1127 continue; 1127 continue;
1128 1128
1129 val = counter->hw.config; 1129 val = event->hw.config;
1130 val |= ARCH_PERFMON_EVENTSEL0_ENABLE; 1130 val |= ARCH_PERFMON_EVENTSEL0_ENABLE;
1131 wrmsrl(MSR_K7_EVNTSEL0 + idx, val); 1131 wrmsrl(MSR_K7_EVNTSEL0 + idx, val);
1132 } 1132 }
@@ -1153,19 +1153,19 @@ static inline void intel_pmu_ack_status(u64 ack)
1153 wrmsrl(MSR_CORE_PERF_GLOBAL_OVF_CTRL, ack); 1153 wrmsrl(MSR_CORE_PERF_GLOBAL_OVF_CTRL, ack);
1154} 1154}
1155 1155
1156static inline void x86_pmu_enable_counter(struct hw_perf_counter *hwc, int idx) 1156static inline void x86_pmu_enable_event(struct hw_perf_event *hwc, int idx)
1157{ 1157{
1158 (void)checking_wrmsrl(hwc->config_base + idx, 1158 (void)checking_wrmsrl(hwc->config_base + idx,
1159 hwc->config | ARCH_PERFMON_EVENTSEL0_ENABLE); 1159 hwc->config | ARCH_PERFMON_EVENTSEL0_ENABLE);
1160} 1160}
1161 1161
1162static inline void x86_pmu_disable_counter(struct hw_perf_counter *hwc, int idx) 1162static inline void x86_pmu_disable_event(struct hw_perf_event *hwc, int idx)
1163{ 1163{
1164 (void)checking_wrmsrl(hwc->config_base + idx, hwc->config); 1164 (void)checking_wrmsrl(hwc->config_base + idx, hwc->config);
1165} 1165}
1166 1166
1167static inline void 1167static inline void
1168intel_pmu_disable_fixed(struct hw_perf_counter *hwc, int __idx) 1168intel_pmu_disable_fixed(struct hw_perf_event *hwc, int __idx)
1169{ 1169{
1170 int idx = __idx - X86_PMC_IDX_FIXED; 1170 int idx = __idx - X86_PMC_IDX_FIXED;
1171 u64 ctrl_val, mask; 1171 u64 ctrl_val, mask;
@@ -1178,10 +1178,10 @@ intel_pmu_disable_fixed(struct hw_perf_counter *hwc, int __idx)
1178} 1178}
1179 1179
1180static inline void 1180static inline void
1181p6_pmu_disable_counter(struct hw_perf_counter *hwc, int idx) 1181p6_pmu_disable_event(struct hw_perf_event *hwc, int idx)
1182{ 1182{
1183 struct cpu_hw_counters *cpuc = &__get_cpu_var(cpu_hw_counters); 1183 struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
1184 u64 val = P6_NOP_COUNTER; 1184 u64 val = P6_NOP_EVENT;
1185 1185
1186 if (cpuc->enabled) 1186 if (cpuc->enabled)
1187 val |= ARCH_PERFMON_EVENTSEL0_ENABLE; 1187 val |= ARCH_PERFMON_EVENTSEL0_ENABLE;
@@ -1190,7 +1190,7 @@ p6_pmu_disable_counter(struct hw_perf_counter *hwc, int idx)
1190} 1190}
1191 1191
1192static inline void 1192static inline void
1193intel_pmu_disable_counter(struct hw_perf_counter *hwc, int idx) 1193intel_pmu_disable_event(struct hw_perf_event *hwc, int idx)
1194{ 1194{
1195 if (unlikely(idx == X86_PMC_IDX_FIXED_BTS)) { 1195 if (unlikely(idx == X86_PMC_IDX_FIXED_BTS)) {
1196 intel_pmu_disable_bts(); 1196 intel_pmu_disable_bts();
@@ -1202,24 +1202,24 @@ intel_pmu_disable_counter(struct hw_perf_counter *hwc, int idx)
1202 return; 1202 return;
1203 } 1203 }
1204 1204
1205 x86_pmu_disable_counter(hwc, idx); 1205 x86_pmu_disable_event(hwc, idx);
1206} 1206}
1207 1207
1208static inline void 1208static inline void
1209amd_pmu_disable_counter(struct hw_perf_counter *hwc, int idx) 1209amd_pmu_disable_event(struct hw_perf_event *hwc, int idx)
1210{ 1210{
1211 x86_pmu_disable_counter(hwc, idx); 1211 x86_pmu_disable_event(hwc, idx);
1212} 1212}
1213 1213
1214static DEFINE_PER_CPU(u64 [X86_PMC_IDX_MAX], pmc_prev_left); 1214static DEFINE_PER_CPU(u64 [X86_PMC_IDX_MAX], pmc_prev_left);
1215 1215
1216/* 1216/*
1217 * Set the next IRQ period, based on the hwc->period_left value. 1217 * Set the next IRQ period, based on the hwc->period_left value.
1218 * To be called with the counter disabled in hw: 1218 * To be called with the event disabled in hw:
1219 */ 1219 */
1220static int 1220static int
1221x86_perf_counter_set_period(struct perf_counter *counter, 1221x86_perf_event_set_period(struct perf_event *event,
1222 struct hw_perf_counter *hwc, int idx) 1222 struct hw_perf_event *hwc, int idx)
1223{ 1223{
1224 s64 left = atomic64_read(&hwc->period_left); 1224 s64 left = atomic64_read(&hwc->period_left);
1225 s64 period = hwc->sample_period; 1225 s64 period = hwc->sample_period;
@@ -1245,7 +1245,7 @@ x86_perf_counter_set_period(struct perf_counter *counter,
1245 ret = 1; 1245 ret = 1;
1246 } 1246 }
1247 /* 1247 /*
1248 * Quirk: certain CPUs dont like it if just 1 event is left: 1248 * Quirk: certain CPUs dont like it if just 1 hw_event is left:
1249 */ 1249 */
1250 if (unlikely(left < 2)) 1250 if (unlikely(left < 2))
1251 left = 2; 1251 left = 2;
@@ -1256,21 +1256,21 @@ x86_perf_counter_set_period(struct perf_counter *counter,
1256 per_cpu(pmc_prev_left[idx], smp_processor_id()) = left; 1256 per_cpu(pmc_prev_left[idx], smp_processor_id()) = left;
1257 1257
1258 /* 1258 /*
1259 * The hw counter starts counting from this counter offset, 1259 * The hw event starts counting from this event offset,
1260 * mark it to be able to extra future deltas: 1260 * mark it to be able to extra future deltas:
1261 */ 1261 */
1262 atomic64_set(&hwc->prev_count, (u64)-left); 1262 atomic64_set(&hwc->prev_count, (u64)-left);
1263 1263
1264 err = checking_wrmsrl(hwc->counter_base + idx, 1264 err = checking_wrmsrl(hwc->event_base + idx,
1265 (u64)(-left) & x86_pmu.counter_mask); 1265 (u64)(-left) & x86_pmu.event_mask);
1266 1266
1267 perf_counter_update_userpage(counter); 1267 perf_event_update_userpage(event);
1268 1268
1269 return ret; 1269 return ret;
1270} 1270}
1271 1271
1272static inline void 1272static inline void
1273intel_pmu_enable_fixed(struct hw_perf_counter *hwc, int __idx) 1273intel_pmu_enable_fixed(struct hw_perf_event *hwc, int __idx)
1274{ 1274{
1275 int idx = __idx - X86_PMC_IDX_FIXED; 1275 int idx = __idx - X86_PMC_IDX_FIXED;
1276 u64 ctrl_val, bits, mask; 1276 u64 ctrl_val, bits, mask;
@@ -1295,9 +1295,9 @@ intel_pmu_enable_fixed(struct hw_perf_counter *hwc, int __idx)
1295 err = checking_wrmsrl(hwc->config_base, ctrl_val); 1295 err = checking_wrmsrl(hwc->config_base, ctrl_val);
1296} 1296}
1297 1297
1298static void p6_pmu_enable_counter(struct hw_perf_counter *hwc, int idx) 1298static void p6_pmu_enable_event(struct hw_perf_event *hwc, int idx)
1299{ 1299{
1300 struct cpu_hw_counters *cpuc = &__get_cpu_var(cpu_hw_counters); 1300 struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
1301 u64 val; 1301 u64 val;
1302 1302
1303 val = hwc->config; 1303 val = hwc->config;
@@ -1308,10 +1308,10 @@ static void p6_pmu_enable_counter(struct hw_perf_counter *hwc, int idx)
1308} 1308}
1309 1309
1310 1310
1311static void intel_pmu_enable_counter(struct hw_perf_counter *hwc, int idx) 1311static void intel_pmu_enable_event(struct hw_perf_event *hwc, int idx)
1312{ 1312{
1313 if (unlikely(idx == X86_PMC_IDX_FIXED_BTS)) { 1313 if (unlikely(idx == X86_PMC_IDX_FIXED_BTS)) {
1314 if (!__get_cpu_var(cpu_hw_counters).enabled) 1314 if (!__get_cpu_var(cpu_hw_events).enabled)
1315 return; 1315 return;
1316 1316
1317 intel_pmu_enable_bts(hwc->config); 1317 intel_pmu_enable_bts(hwc->config);
@@ -1323,134 +1323,134 @@ static void intel_pmu_enable_counter(struct hw_perf_counter *hwc, int idx)
1323 return; 1323 return;
1324 } 1324 }
1325 1325
1326 x86_pmu_enable_counter(hwc, idx); 1326 x86_pmu_enable_event(hwc, idx);
1327} 1327}
1328 1328
1329static void amd_pmu_enable_counter(struct hw_perf_counter *hwc, int idx) 1329static void amd_pmu_enable_event(struct hw_perf_event *hwc, int idx)
1330{ 1330{
1331 struct cpu_hw_counters *cpuc = &__get_cpu_var(cpu_hw_counters); 1331 struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
1332 1332
1333 if (cpuc->enabled) 1333 if (cpuc->enabled)
1334 x86_pmu_enable_counter(hwc, idx); 1334 x86_pmu_enable_event(hwc, idx);
1335} 1335}
1336 1336
1337static int 1337static int
1338fixed_mode_idx(struct perf_counter *counter, struct hw_perf_counter *hwc) 1338fixed_mode_idx(struct perf_event *event, struct hw_perf_event *hwc)
1339{ 1339{
1340 unsigned int event; 1340 unsigned int hw_event;
1341 1341
1342 event = hwc->config & ARCH_PERFMON_EVENT_MASK; 1342 hw_event = hwc->config & ARCH_PERFMON_EVENT_MASK;
1343 1343
1344 if (unlikely((event == 1344 if (unlikely((hw_event ==
1345 x86_pmu.event_map(PERF_COUNT_HW_BRANCH_INSTRUCTIONS)) && 1345 x86_pmu.event_map(PERF_COUNT_HW_BRANCH_INSTRUCTIONS)) &&
1346 (hwc->sample_period == 1))) 1346 (hwc->sample_period == 1)))
1347 return X86_PMC_IDX_FIXED_BTS; 1347 return X86_PMC_IDX_FIXED_BTS;
1348 1348
1349 if (!x86_pmu.num_counters_fixed) 1349 if (!x86_pmu.num_events_fixed)
1350 return -1; 1350 return -1;
1351 1351
1352 if (unlikely(event == x86_pmu.event_map(PERF_COUNT_HW_INSTRUCTIONS))) 1352 if (unlikely(hw_event == x86_pmu.event_map(PERF_COUNT_HW_INSTRUCTIONS)))
1353 return X86_PMC_IDX_FIXED_INSTRUCTIONS; 1353 return X86_PMC_IDX_FIXED_INSTRUCTIONS;
1354 if (unlikely(event == x86_pmu.event_map(PERF_COUNT_HW_CPU_CYCLES))) 1354 if (unlikely(hw_event == x86_pmu.event_map(PERF_COUNT_HW_CPU_CYCLES)))
1355 return X86_PMC_IDX_FIXED_CPU_CYCLES; 1355 return X86_PMC_IDX_FIXED_CPU_CYCLES;
1356 if (unlikely(event == x86_pmu.event_map(PERF_COUNT_HW_BUS_CYCLES))) 1356 if (unlikely(hw_event == x86_pmu.event_map(PERF_COUNT_HW_BUS_CYCLES)))
1357 return X86_PMC_IDX_FIXED_BUS_CYCLES; 1357 return X86_PMC_IDX_FIXED_BUS_CYCLES;
1358 1358
1359 return -1; 1359 return -1;
1360} 1360}
1361 1361
1362/* 1362/*
1363 * Find a PMC slot for the freshly enabled / scheduled in counter: 1363 * Find a PMC slot for the freshly enabled / scheduled in event:
1364 */ 1364 */
1365static int x86_pmu_enable(struct perf_counter *counter) 1365static int x86_pmu_enable(struct perf_event *event)
1366{ 1366{
1367 struct cpu_hw_counters *cpuc = &__get_cpu_var(cpu_hw_counters); 1367 struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
1368 struct hw_perf_counter *hwc = &counter->hw; 1368 struct hw_perf_event *hwc = &event->hw;
1369 int idx; 1369 int idx;
1370 1370
1371 idx = fixed_mode_idx(counter, hwc); 1371 idx = fixed_mode_idx(event, hwc);
1372 if (idx == X86_PMC_IDX_FIXED_BTS) { 1372 if (idx == X86_PMC_IDX_FIXED_BTS) {
1373 /* BTS is already occupied. */ 1373 /* BTS is already occupied. */
1374 if (test_and_set_bit(idx, cpuc->used_mask)) 1374 if (test_and_set_bit(idx, cpuc->used_mask))
1375 return -EAGAIN; 1375 return -EAGAIN;
1376 1376
1377 hwc->config_base = 0; 1377 hwc->config_base = 0;
1378 hwc->counter_base = 0; 1378 hwc->event_base = 0;
1379 hwc->idx = idx; 1379 hwc->idx = idx;
1380 } else if (idx >= 0) { 1380 } else if (idx >= 0) {
1381 /* 1381 /*
1382 * Try to get the fixed counter, if that is already taken 1382 * Try to get the fixed event, if that is already taken
1383 * then try to get a generic counter: 1383 * then try to get a generic event:
1384 */ 1384 */
1385 if (test_and_set_bit(idx, cpuc->used_mask)) 1385 if (test_and_set_bit(idx, cpuc->used_mask))
1386 goto try_generic; 1386 goto try_generic;
1387 1387
1388 hwc->config_base = MSR_ARCH_PERFMON_FIXED_CTR_CTRL; 1388 hwc->config_base = MSR_ARCH_PERFMON_FIXED_CTR_CTRL;
1389 /* 1389 /*
1390 * We set it so that counter_base + idx in wrmsr/rdmsr maps to 1390 * We set it so that event_base + idx in wrmsr/rdmsr maps to
1391 * MSR_ARCH_PERFMON_FIXED_CTR0 ... CTR2: 1391 * MSR_ARCH_PERFMON_FIXED_CTR0 ... CTR2:
1392 */ 1392 */
1393 hwc->counter_base = 1393 hwc->event_base =
1394 MSR_ARCH_PERFMON_FIXED_CTR0 - X86_PMC_IDX_FIXED; 1394 MSR_ARCH_PERFMON_FIXED_CTR0 - X86_PMC_IDX_FIXED;
1395 hwc->idx = idx; 1395 hwc->idx = idx;
1396 } else { 1396 } else {
1397 idx = hwc->idx; 1397 idx = hwc->idx;
1398 /* Try to get the previous generic counter again */ 1398 /* Try to get the previous generic event again */
1399 if (test_and_set_bit(idx, cpuc->used_mask)) { 1399 if (test_and_set_bit(idx, cpuc->used_mask)) {
1400try_generic: 1400try_generic:
1401 idx = find_first_zero_bit(cpuc->used_mask, 1401 idx = find_first_zero_bit(cpuc->used_mask,
1402 x86_pmu.num_counters); 1402 x86_pmu.num_events);
1403 if (idx == x86_pmu.num_counters) 1403 if (idx == x86_pmu.num_events)
1404 return -EAGAIN; 1404 return -EAGAIN;
1405 1405
1406 set_bit(idx, cpuc->used_mask); 1406 set_bit(idx, cpuc->used_mask);
1407 hwc->idx = idx; 1407 hwc->idx = idx;
1408 } 1408 }
1409 hwc->config_base = x86_pmu.eventsel; 1409 hwc->config_base = x86_pmu.eventsel;
1410 hwc->counter_base = x86_pmu.perfctr; 1410 hwc->event_base = x86_pmu.perfctr;
1411 } 1411 }
1412 1412
1413 perf_counters_lapic_init(); 1413 perf_events_lapic_init();
1414 1414
1415 x86_pmu.disable(hwc, idx); 1415 x86_pmu.disable(hwc, idx);
1416 1416
1417 cpuc->counters[idx] = counter; 1417 cpuc->events[idx] = event;
1418 set_bit(idx, cpuc->active_mask); 1418 set_bit(idx, cpuc->active_mask);
1419 1419
1420 x86_perf_counter_set_period(counter, hwc, idx); 1420 x86_perf_event_set_period(event, hwc, idx);
1421 x86_pmu.enable(hwc, idx); 1421 x86_pmu.enable(hwc, idx);
1422 1422
1423 perf_counter_update_userpage(counter); 1423 perf_event_update_userpage(event);
1424 1424
1425 return 0; 1425 return 0;
1426} 1426}
1427 1427
1428static void x86_pmu_unthrottle(struct perf_counter *counter) 1428static void x86_pmu_unthrottle(struct perf_event *event)
1429{ 1429{
1430 struct cpu_hw_counters *cpuc = &__get_cpu_var(cpu_hw_counters); 1430 struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
1431 struct hw_perf_counter *hwc = &counter->hw; 1431 struct hw_perf_event *hwc = &event->hw;
1432 1432
1433 if (WARN_ON_ONCE(hwc->idx >= X86_PMC_IDX_MAX || 1433 if (WARN_ON_ONCE(hwc->idx >= X86_PMC_IDX_MAX ||
1434 cpuc->counters[hwc->idx] != counter)) 1434 cpuc->events[hwc->idx] != event))
1435 return; 1435 return;
1436 1436
1437 x86_pmu.enable(hwc, hwc->idx); 1437 x86_pmu.enable(hwc, hwc->idx);
1438} 1438}
1439 1439
1440void perf_counter_print_debug(void) 1440void perf_event_print_debug(void)
1441{ 1441{
1442 u64 ctrl, status, overflow, pmc_ctrl, pmc_count, prev_left, fixed; 1442 u64 ctrl, status, overflow, pmc_ctrl, pmc_count, prev_left, fixed;
1443 struct cpu_hw_counters *cpuc; 1443 struct cpu_hw_events *cpuc;
1444 unsigned long flags; 1444 unsigned long flags;
1445 int cpu, idx; 1445 int cpu, idx;
1446 1446
1447 if (!x86_pmu.num_counters) 1447 if (!x86_pmu.num_events)
1448 return; 1448 return;
1449 1449
1450 local_irq_save(flags); 1450 local_irq_save(flags);
1451 1451
1452 cpu = smp_processor_id(); 1452 cpu = smp_processor_id();
1453 cpuc = &per_cpu(cpu_hw_counters, cpu); 1453 cpuc = &per_cpu(cpu_hw_events, cpu);
1454 1454
1455 if (x86_pmu.version >= 2) { 1455 if (x86_pmu.version >= 2) {
1456 rdmsrl(MSR_CORE_PERF_GLOBAL_CTRL, ctrl); 1456 rdmsrl(MSR_CORE_PERF_GLOBAL_CTRL, ctrl);
@@ -1466,7 +1466,7 @@ void perf_counter_print_debug(void)
1466 } 1466 }
1467 pr_info("CPU#%d: used: %016llx\n", cpu, *(u64 *)cpuc->used_mask); 1467 pr_info("CPU#%d: used: %016llx\n", cpu, *(u64 *)cpuc->used_mask);
1468 1468
1469 for (idx = 0; idx < x86_pmu.num_counters; idx++) { 1469 for (idx = 0; idx < x86_pmu.num_events; idx++) {
1470 rdmsrl(x86_pmu.eventsel + idx, pmc_ctrl); 1470 rdmsrl(x86_pmu.eventsel + idx, pmc_ctrl);
1471 rdmsrl(x86_pmu.perfctr + idx, pmc_count); 1471 rdmsrl(x86_pmu.perfctr + idx, pmc_count);
1472 1472
@@ -1479,7 +1479,7 @@ void perf_counter_print_debug(void)
1479 pr_info("CPU#%d: gen-PMC%d left: %016llx\n", 1479 pr_info("CPU#%d: gen-PMC%d left: %016llx\n",
1480 cpu, idx, prev_left); 1480 cpu, idx, prev_left);
1481 } 1481 }
1482 for (idx = 0; idx < x86_pmu.num_counters_fixed; idx++) { 1482 for (idx = 0; idx < x86_pmu.num_events_fixed; idx++) {
1483 rdmsrl(MSR_ARCH_PERFMON_FIXED_CTR0 + idx, pmc_count); 1483 rdmsrl(MSR_ARCH_PERFMON_FIXED_CTR0 + idx, pmc_count);
1484 1484
1485 pr_info("CPU#%d: fixed-PMC%d count: %016llx\n", 1485 pr_info("CPU#%d: fixed-PMC%d count: %016llx\n",
@@ -1488,8 +1488,7 @@ void perf_counter_print_debug(void)
1488 local_irq_restore(flags); 1488 local_irq_restore(flags);
1489} 1489}
1490 1490
1491static void intel_pmu_drain_bts_buffer(struct cpu_hw_counters *cpuc, 1491static void intel_pmu_drain_bts_buffer(struct cpu_hw_events *cpuc)
1492 struct perf_sample_data *data)
1493{ 1492{
1494 struct debug_store *ds = cpuc->ds; 1493 struct debug_store *ds = cpuc->ds;
1495 struct bts_record { 1494 struct bts_record {
@@ -1497,11 +1496,14 @@ static void intel_pmu_drain_bts_buffer(struct cpu_hw_counters *cpuc,
1497 u64 to; 1496 u64 to;
1498 u64 flags; 1497 u64 flags;
1499 }; 1498 };
1500 struct perf_counter *counter = cpuc->counters[X86_PMC_IDX_FIXED_BTS]; 1499 struct perf_event *event = cpuc->events[X86_PMC_IDX_FIXED_BTS];
1501 unsigned long orig_ip = data->regs->ip;
1502 struct bts_record *at, *top; 1500 struct bts_record *at, *top;
1501 struct perf_output_handle handle;
1502 struct perf_event_header header;
1503 struct perf_sample_data data;
1504 struct pt_regs regs;
1503 1505
1504 if (!counter) 1506 if (!event)
1505 return; 1507 return;
1506 1508
1507 if (!ds) 1509 if (!ds)
@@ -1510,26 +1512,45 @@ static void intel_pmu_drain_bts_buffer(struct cpu_hw_counters *cpuc,
1510 at = (struct bts_record *)(unsigned long)ds->bts_buffer_base; 1512 at = (struct bts_record *)(unsigned long)ds->bts_buffer_base;
1511 top = (struct bts_record *)(unsigned long)ds->bts_index; 1513 top = (struct bts_record *)(unsigned long)ds->bts_index;
1512 1514
1515 if (top <= at)
1516 return;
1517
1513 ds->bts_index = ds->bts_buffer_base; 1518 ds->bts_index = ds->bts_buffer_base;
1514 1519
1520
1521 data.period = event->hw.last_period;
1522 data.addr = 0;
1523 regs.ip = 0;
1524
1525 /*
1526 * Prepare a generic sample, i.e. fill in the invariant fields.
1527 * We will overwrite the from and to address before we output
1528 * the sample.
1529 */
1530 perf_prepare_sample(&header, &data, event, &regs);
1531
1532 if (perf_output_begin(&handle, event,
1533 header.size * (top - at), 1, 1))
1534 return;
1535
1515 for (; at < top; at++) { 1536 for (; at < top; at++) {
1516 data->regs->ip = at->from; 1537 data.ip = at->from;
1517 data->addr = at->to; 1538 data.addr = at->to;
1518 1539
1519 perf_counter_output(counter, 1, data); 1540 perf_output_sample(&handle, &header, &data, event);
1520 } 1541 }
1521 1542
1522 data->regs->ip = orig_ip; 1543 perf_output_end(&handle);
1523 data->addr = 0;
1524 1544
1525 /* There's new data available. */ 1545 /* There's new data available. */
1526 counter->pending_kill = POLL_IN; 1546 event->hw.interrupts++;
1547 event->pending_kill = POLL_IN;
1527} 1548}
1528 1549
1529static void x86_pmu_disable(struct perf_counter *counter) 1550static void x86_pmu_disable(struct perf_event *event)
1530{ 1551{
1531 struct cpu_hw_counters *cpuc = &__get_cpu_var(cpu_hw_counters); 1552 struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
1532 struct hw_perf_counter *hwc = &counter->hw; 1553 struct hw_perf_event *hwc = &event->hw;
1533 int idx = hwc->idx; 1554 int idx = hwc->idx;
1534 1555
1535 /* 1556 /*
@@ -1541,67 +1562,63 @@ static void x86_pmu_disable(struct perf_counter *counter)
1541 1562
1542 /* 1563 /*
1543 * Make sure the cleared pointer becomes visible before we 1564 * Make sure the cleared pointer becomes visible before we
1544 * (potentially) free the counter: 1565 * (potentially) free the event:
1545 */ 1566 */
1546 barrier(); 1567 barrier();
1547 1568
1548 /* 1569 /*
1549 * Drain the remaining delta count out of a counter 1570 * Drain the remaining delta count out of a event
1550 * that we are disabling: 1571 * that we are disabling:
1551 */ 1572 */
1552 x86_perf_counter_update(counter, hwc, idx); 1573 x86_perf_event_update(event, hwc, idx);
1553 1574
1554 /* Drain the remaining BTS records. */ 1575 /* Drain the remaining BTS records. */
1555 if (unlikely(idx == X86_PMC_IDX_FIXED_BTS)) { 1576 if (unlikely(idx == X86_PMC_IDX_FIXED_BTS))
1556 struct perf_sample_data data; 1577 intel_pmu_drain_bts_buffer(cpuc);
1557 struct pt_regs regs;
1558 1578
1559 data.regs = &regs; 1579 cpuc->events[idx] = NULL;
1560 intel_pmu_drain_bts_buffer(cpuc, &data);
1561 }
1562 cpuc->counters[idx] = NULL;
1563 clear_bit(idx, cpuc->used_mask); 1580 clear_bit(idx, cpuc->used_mask);
1564 1581
1565 perf_counter_update_userpage(counter); 1582 perf_event_update_userpage(event);
1566} 1583}
1567 1584
1568/* 1585/*
1569 * Save and restart an expired counter. Called by NMI contexts, 1586 * Save and restart an expired event. Called by NMI contexts,
1570 * so it has to be careful about preempting normal counter ops: 1587 * so it has to be careful about preempting normal event ops:
1571 */ 1588 */
1572static int intel_pmu_save_and_restart(struct perf_counter *counter) 1589static int intel_pmu_save_and_restart(struct perf_event *event)
1573{ 1590{
1574 struct hw_perf_counter *hwc = &counter->hw; 1591 struct hw_perf_event *hwc = &event->hw;
1575 int idx = hwc->idx; 1592 int idx = hwc->idx;
1576 int ret; 1593 int ret;
1577 1594
1578 x86_perf_counter_update(counter, hwc, idx); 1595 x86_perf_event_update(event, hwc, idx);
1579 ret = x86_perf_counter_set_period(counter, hwc, idx); 1596 ret = x86_perf_event_set_period(event, hwc, idx);
1580 1597
1581 if (counter->state == PERF_COUNTER_STATE_ACTIVE) 1598 if (event->state == PERF_EVENT_STATE_ACTIVE)
1582 intel_pmu_enable_counter(hwc, idx); 1599 intel_pmu_enable_event(hwc, idx);
1583 1600
1584 return ret; 1601 return ret;
1585} 1602}
1586 1603
1587static void intel_pmu_reset(void) 1604static void intel_pmu_reset(void)
1588{ 1605{
1589 struct debug_store *ds = __get_cpu_var(cpu_hw_counters).ds; 1606 struct debug_store *ds = __get_cpu_var(cpu_hw_events).ds;
1590 unsigned long flags; 1607 unsigned long flags;
1591 int idx; 1608 int idx;
1592 1609
1593 if (!x86_pmu.num_counters) 1610 if (!x86_pmu.num_events)
1594 return; 1611 return;
1595 1612
1596 local_irq_save(flags); 1613 local_irq_save(flags);
1597 1614
1598 printk("clearing PMU state on CPU#%d\n", smp_processor_id()); 1615 printk("clearing PMU state on CPU#%d\n", smp_processor_id());
1599 1616
1600 for (idx = 0; idx < x86_pmu.num_counters; idx++) { 1617 for (idx = 0; idx < x86_pmu.num_events; idx++) {
1601 checking_wrmsrl(x86_pmu.eventsel + idx, 0ull); 1618 checking_wrmsrl(x86_pmu.eventsel + idx, 0ull);
1602 checking_wrmsrl(x86_pmu.perfctr + idx, 0ull); 1619 checking_wrmsrl(x86_pmu.perfctr + idx, 0ull);
1603 } 1620 }
1604 for (idx = 0; idx < x86_pmu.num_counters_fixed; idx++) { 1621 for (idx = 0; idx < x86_pmu.num_events_fixed; idx++) {
1605 checking_wrmsrl(MSR_ARCH_PERFMON_FIXED_CTR0 + idx, 0ull); 1622 checking_wrmsrl(MSR_ARCH_PERFMON_FIXED_CTR0 + idx, 0ull);
1606 } 1623 }
1607 if (ds) 1624 if (ds)
@@ -1613,39 +1630,38 @@ static void intel_pmu_reset(void)
1613static int p6_pmu_handle_irq(struct pt_regs *regs) 1630static int p6_pmu_handle_irq(struct pt_regs *regs)
1614{ 1631{
1615 struct perf_sample_data data; 1632 struct perf_sample_data data;
1616 struct cpu_hw_counters *cpuc; 1633 struct cpu_hw_events *cpuc;
1617 struct perf_counter *counter; 1634 struct perf_event *event;
1618 struct hw_perf_counter *hwc; 1635 struct hw_perf_event *hwc;
1619 int idx, handled = 0; 1636 int idx, handled = 0;
1620 u64 val; 1637 u64 val;
1621 1638
1622 data.regs = regs;
1623 data.addr = 0; 1639 data.addr = 0;
1624 1640
1625 cpuc = &__get_cpu_var(cpu_hw_counters); 1641 cpuc = &__get_cpu_var(cpu_hw_events);
1626 1642
1627 for (idx = 0; idx < x86_pmu.num_counters; idx++) { 1643 for (idx = 0; idx < x86_pmu.num_events; idx++) {
1628 if (!test_bit(idx, cpuc->active_mask)) 1644 if (!test_bit(idx, cpuc->active_mask))
1629 continue; 1645 continue;
1630 1646
1631 counter = cpuc->counters[idx]; 1647 event = cpuc->events[idx];
1632 hwc = &counter->hw; 1648 hwc = &event->hw;
1633 1649
1634 val = x86_perf_counter_update(counter, hwc, idx); 1650 val = x86_perf_event_update(event, hwc, idx);
1635 if (val & (1ULL << (x86_pmu.counter_bits - 1))) 1651 if (val & (1ULL << (x86_pmu.event_bits - 1)))
1636 continue; 1652 continue;
1637 1653
1638 /* 1654 /*
1639 * counter overflow 1655 * event overflow
1640 */ 1656 */
1641 handled = 1; 1657 handled = 1;
1642 data.period = counter->hw.last_period; 1658 data.period = event->hw.last_period;
1643 1659
1644 if (!x86_perf_counter_set_period(counter, hwc, idx)) 1660 if (!x86_perf_event_set_period(event, hwc, idx))
1645 continue; 1661 continue;
1646 1662
1647 if (perf_counter_overflow(counter, 1, &data)) 1663 if (perf_event_overflow(event, 1, &data, regs))
1648 p6_pmu_disable_counter(hwc, idx); 1664 p6_pmu_disable_event(hwc, idx);
1649 } 1665 }
1650 1666
1651 if (handled) 1667 if (handled)
@@ -1661,17 +1677,16 @@ static int p6_pmu_handle_irq(struct pt_regs *regs)
1661static int intel_pmu_handle_irq(struct pt_regs *regs) 1677static int intel_pmu_handle_irq(struct pt_regs *regs)
1662{ 1678{
1663 struct perf_sample_data data; 1679 struct perf_sample_data data;
1664 struct cpu_hw_counters *cpuc; 1680 struct cpu_hw_events *cpuc;
1665 int bit, loops; 1681 int bit, loops;
1666 u64 ack, status; 1682 u64 ack, status;
1667 1683
1668 data.regs = regs;
1669 data.addr = 0; 1684 data.addr = 0;
1670 1685
1671 cpuc = &__get_cpu_var(cpu_hw_counters); 1686 cpuc = &__get_cpu_var(cpu_hw_events);
1672 1687
1673 perf_disable(); 1688 perf_disable();
1674 intel_pmu_drain_bts_buffer(cpuc, &data); 1689 intel_pmu_drain_bts_buffer(cpuc);
1675 status = intel_pmu_get_status(); 1690 status = intel_pmu_get_status();
1676 if (!status) { 1691 if (!status) {
1677 perf_enable(); 1692 perf_enable();
@@ -1681,8 +1696,8 @@ static int intel_pmu_handle_irq(struct pt_regs *regs)
1681 loops = 0; 1696 loops = 0;
1682again: 1697again:
1683 if (++loops > 100) { 1698 if (++loops > 100) {
1684 WARN_ONCE(1, "perfcounters: irq loop stuck!\n"); 1699 WARN_ONCE(1, "perfevents: irq loop stuck!\n");
1685 perf_counter_print_debug(); 1700 perf_event_print_debug();
1686 intel_pmu_reset(); 1701 intel_pmu_reset();
1687 perf_enable(); 1702 perf_enable();
1688 return 1; 1703 return 1;
@@ -1691,19 +1706,19 @@ again:
1691 inc_irq_stat(apic_perf_irqs); 1706 inc_irq_stat(apic_perf_irqs);
1692 ack = status; 1707 ack = status;
1693 for_each_bit(bit, (unsigned long *)&status, X86_PMC_IDX_MAX) { 1708 for_each_bit(bit, (unsigned long *)&status, X86_PMC_IDX_MAX) {
1694 struct perf_counter *counter = cpuc->counters[bit]; 1709 struct perf_event *event = cpuc->events[bit];
1695 1710
1696 clear_bit(bit, (unsigned long *) &status); 1711 clear_bit(bit, (unsigned long *) &status);
1697 if (!test_bit(bit, cpuc->active_mask)) 1712 if (!test_bit(bit, cpuc->active_mask))
1698 continue; 1713 continue;
1699 1714
1700 if (!intel_pmu_save_and_restart(counter)) 1715 if (!intel_pmu_save_and_restart(event))
1701 continue; 1716 continue;
1702 1717
1703 data.period = counter->hw.last_period; 1718 data.period = event->hw.last_period;
1704 1719
1705 if (perf_counter_overflow(counter, 1, &data)) 1720 if (perf_event_overflow(event, 1, &data, regs))
1706 intel_pmu_disable_counter(&counter->hw, bit); 1721 intel_pmu_disable_event(&event->hw, bit);
1707 } 1722 }
1708 1723
1709 intel_pmu_ack_status(ack); 1724 intel_pmu_ack_status(ack);
@@ -1723,39 +1738,38 @@ again:
1723static int amd_pmu_handle_irq(struct pt_regs *regs) 1738static int amd_pmu_handle_irq(struct pt_regs *regs)
1724{ 1739{
1725 struct perf_sample_data data; 1740 struct perf_sample_data data;
1726 struct cpu_hw_counters *cpuc; 1741 struct cpu_hw_events *cpuc;
1727 struct perf_counter *counter; 1742 struct perf_event *event;
1728 struct hw_perf_counter *hwc; 1743 struct hw_perf_event *hwc;
1729 int idx, handled = 0; 1744 int idx, handled = 0;
1730 u64 val; 1745 u64 val;
1731 1746
1732 data.regs = regs;
1733 data.addr = 0; 1747 data.addr = 0;
1734 1748
1735 cpuc = &__get_cpu_var(cpu_hw_counters); 1749 cpuc = &__get_cpu_var(cpu_hw_events);
1736 1750
1737 for (idx = 0; idx < x86_pmu.num_counters; idx++) { 1751 for (idx = 0; idx < x86_pmu.num_events; idx++) {
1738 if (!test_bit(idx, cpuc->active_mask)) 1752 if (!test_bit(idx, cpuc->active_mask))
1739 continue; 1753 continue;
1740 1754
1741 counter = cpuc->counters[idx]; 1755 event = cpuc->events[idx];
1742 hwc = &counter->hw; 1756 hwc = &event->hw;
1743 1757
1744 val = x86_perf_counter_update(counter, hwc, idx); 1758 val = x86_perf_event_update(event, hwc, idx);
1745 if (val & (1ULL << (x86_pmu.counter_bits - 1))) 1759 if (val & (1ULL << (x86_pmu.event_bits - 1)))
1746 continue; 1760 continue;
1747 1761
1748 /* 1762 /*
1749 * counter overflow 1763 * event overflow
1750 */ 1764 */
1751 handled = 1; 1765 handled = 1;
1752 data.period = counter->hw.last_period; 1766 data.period = event->hw.last_period;
1753 1767
1754 if (!x86_perf_counter_set_period(counter, hwc, idx)) 1768 if (!x86_perf_event_set_period(event, hwc, idx))
1755 continue; 1769 continue;
1756 1770
1757 if (perf_counter_overflow(counter, 1, &data)) 1771 if (perf_event_overflow(event, 1, &data, regs))
1758 amd_pmu_disable_counter(hwc, idx); 1772 amd_pmu_disable_event(hwc, idx);
1759 } 1773 }
1760 1774
1761 if (handled) 1775 if (handled)
@@ -1769,18 +1783,18 @@ void smp_perf_pending_interrupt(struct pt_regs *regs)
1769 irq_enter(); 1783 irq_enter();
1770 ack_APIC_irq(); 1784 ack_APIC_irq();
1771 inc_irq_stat(apic_pending_irqs); 1785 inc_irq_stat(apic_pending_irqs);
1772 perf_counter_do_pending(); 1786 perf_event_do_pending();
1773 irq_exit(); 1787 irq_exit();
1774} 1788}
1775 1789
1776void set_perf_counter_pending(void) 1790void set_perf_event_pending(void)
1777{ 1791{
1778#ifdef CONFIG_X86_LOCAL_APIC 1792#ifdef CONFIG_X86_LOCAL_APIC
1779 apic->send_IPI_self(LOCAL_PENDING_VECTOR); 1793 apic->send_IPI_self(LOCAL_PENDING_VECTOR);
1780#endif 1794#endif
1781} 1795}
1782 1796
1783void perf_counters_lapic_init(void) 1797void perf_events_lapic_init(void)
1784{ 1798{
1785#ifdef CONFIG_X86_LOCAL_APIC 1799#ifdef CONFIG_X86_LOCAL_APIC
1786 if (!x86_pmu.apic || !x86_pmu_initialized()) 1800 if (!x86_pmu.apic || !x86_pmu_initialized())
@@ -1794,13 +1808,13 @@ void perf_counters_lapic_init(void)
1794} 1808}
1795 1809
1796static int __kprobes 1810static int __kprobes
1797perf_counter_nmi_handler(struct notifier_block *self, 1811perf_event_nmi_handler(struct notifier_block *self,
1798 unsigned long cmd, void *__args) 1812 unsigned long cmd, void *__args)
1799{ 1813{
1800 struct die_args *args = __args; 1814 struct die_args *args = __args;
1801 struct pt_regs *regs; 1815 struct pt_regs *regs;
1802 1816
1803 if (!atomic_read(&active_counters)) 1817 if (!atomic_read(&active_events))
1804 return NOTIFY_DONE; 1818 return NOTIFY_DONE;
1805 1819
1806 switch (cmd) { 1820 switch (cmd) {
@@ -1819,7 +1833,7 @@ perf_counter_nmi_handler(struct notifier_block *self,
1819#endif 1833#endif
1820 /* 1834 /*
1821 * Can't rely on the handled return value to say it was our NMI, two 1835 * Can't rely on the handled return value to say it was our NMI, two
1822 * counters could trigger 'simultaneously' raising two back-to-back NMIs. 1836 * events could trigger 'simultaneously' raising two back-to-back NMIs.
1823 * 1837 *
1824 * If the first NMI handles both, the latter will be empty and daze 1838 * If the first NMI handles both, the latter will be empty and daze
1825 * the CPU. 1839 * the CPU.
@@ -1829,8 +1843,8 @@ perf_counter_nmi_handler(struct notifier_block *self,
1829 return NOTIFY_STOP; 1843 return NOTIFY_STOP;
1830} 1844}
1831 1845
1832static __read_mostly struct notifier_block perf_counter_nmi_notifier = { 1846static __read_mostly struct notifier_block perf_event_nmi_notifier = {
1833 .notifier_call = perf_counter_nmi_handler, 1847 .notifier_call = perf_event_nmi_handler,
1834 .next = NULL, 1848 .next = NULL,
1835 .priority = 1 1849 .priority = 1
1836}; 1850};
@@ -1840,8 +1854,8 @@ static struct x86_pmu p6_pmu = {
1840 .handle_irq = p6_pmu_handle_irq, 1854 .handle_irq = p6_pmu_handle_irq,
1841 .disable_all = p6_pmu_disable_all, 1855 .disable_all = p6_pmu_disable_all,
1842 .enable_all = p6_pmu_enable_all, 1856 .enable_all = p6_pmu_enable_all,
1843 .enable = p6_pmu_enable_counter, 1857 .enable = p6_pmu_enable_event,
1844 .disable = p6_pmu_disable_counter, 1858 .disable = p6_pmu_disable_event,
1845 .eventsel = MSR_P6_EVNTSEL0, 1859 .eventsel = MSR_P6_EVNTSEL0,
1846 .perfctr = MSR_P6_PERFCTR0, 1860 .perfctr = MSR_P6_PERFCTR0,
1847 .event_map = p6_pmu_event_map, 1861 .event_map = p6_pmu_event_map,
@@ -1850,16 +1864,16 @@ static struct x86_pmu p6_pmu = {
1850 .apic = 1, 1864 .apic = 1,
1851 .max_period = (1ULL << 31) - 1, 1865 .max_period = (1ULL << 31) - 1,
1852 .version = 0, 1866 .version = 0,
1853 .num_counters = 2, 1867 .num_events = 2,
1854 /* 1868 /*
1855 * Counters have 40 bits implemented. However they are designed such 1869 * Events have 40 bits implemented. However they are designed such
1856 * that bits [32-39] are sign extensions of bit 31. As such the 1870 * that bits [32-39] are sign extensions of bit 31. As such the
1857 * effective width of a counter for P6-like PMU is 32 bits only. 1871 * effective width of a event for P6-like PMU is 32 bits only.
1858 * 1872 *
1859 * See IA-32 Intel Architecture Software developer manual Vol 3B 1873 * See IA-32 Intel Architecture Software developer manual Vol 3B
1860 */ 1874 */
1861 .counter_bits = 32, 1875 .event_bits = 32,
1862 .counter_mask = (1ULL << 32) - 1, 1876 .event_mask = (1ULL << 32) - 1,
1863}; 1877};
1864 1878
1865static struct x86_pmu intel_pmu = { 1879static struct x86_pmu intel_pmu = {
@@ -1867,8 +1881,8 @@ static struct x86_pmu intel_pmu = {
1867 .handle_irq = intel_pmu_handle_irq, 1881 .handle_irq = intel_pmu_handle_irq,
1868 .disable_all = intel_pmu_disable_all, 1882 .disable_all = intel_pmu_disable_all,
1869 .enable_all = intel_pmu_enable_all, 1883 .enable_all = intel_pmu_enable_all,
1870 .enable = intel_pmu_enable_counter, 1884 .enable = intel_pmu_enable_event,
1871 .disable = intel_pmu_disable_counter, 1885 .disable = intel_pmu_disable_event,
1872 .eventsel = MSR_ARCH_PERFMON_EVENTSEL0, 1886 .eventsel = MSR_ARCH_PERFMON_EVENTSEL0,
1873 .perfctr = MSR_ARCH_PERFMON_PERFCTR0, 1887 .perfctr = MSR_ARCH_PERFMON_PERFCTR0,
1874 .event_map = intel_pmu_event_map, 1888 .event_map = intel_pmu_event_map,
@@ -1878,7 +1892,7 @@ static struct x86_pmu intel_pmu = {
1878 /* 1892 /*
1879 * Intel PMCs cannot be accessed sanely above 32 bit width, 1893 * Intel PMCs cannot be accessed sanely above 32 bit width,
1880 * so we install an artificial 1<<31 period regardless of 1894 * so we install an artificial 1<<31 period regardless of
1881 * the generic counter period: 1895 * the generic event period:
1882 */ 1896 */
1883 .max_period = (1ULL << 31) - 1, 1897 .max_period = (1ULL << 31) - 1,
1884 .enable_bts = intel_pmu_enable_bts, 1898 .enable_bts = intel_pmu_enable_bts,
@@ -1890,16 +1904,16 @@ static struct x86_pmu amd_pmu = {
1890 .handle_irq = amd_pmu_handle_irq, 1904 .handle_irq = amd_pmu_handle_irq,
1891 .disable_all = amd_pmu_disable_all, 1905 .disable_all = amd_pmu_disable_all,
1892 .enable_all = amd_pmu_enable_all, 1906 .enable_all = amd_pmu_enable_all,
1893 .enable = amd_pmu_enable_counter, 1907 .enable = amd_pmu_enable_event,
1894 .disable = amd_pmu_disable_counter, 1908 .disable = amd_pmu_disable_event,
1895 .eventsel = MSR_K7_EVNTSEL0, 1909 .eventsel = MSR_K7_EVNTSEL0,
1896 .perfctr = MSR_K7_PERFCTR0, 1910 .perfctr = MSR_K7_PERFCTR0,
1897 .event_map = amd_pmu_event_map, 1911 .event_map = amd_pmu_event_map,
1898 .raw_event = amd_pmu_raw_event, 1912 .raw_event = amd_pmu_raw_event,
1899 .max_events = ARRAY_SIZE(amd_perfmon_event_map), 1913 .max_events = ARRAY_SIZE(amd_perfmon_event_map),
1900 .num_counters = 4, 1914 .num_events = 4,
1901 .counter_bits = 48, 1915 .event_bits = 48,
1902 .counter_mask = (1ULL << 48) - 1, 1916 .event_mask = (1ULL << 48) - 1,
1903 .apic = 1, 1917 .apic = 1,
1904 /* use highest bit to detect overflow */ 1918 /* use highest bit to detect overflow */
1905 .max_period = (1ULL << 47) - 1, 1919 .max_period = (1ULL << 47) - 1,
@@ -1956,7 +1970,7 @@ static int intel_pmu_init(void)
1956 1970
1957 /* 1971 /*
1958 * Check whether the Architectural PerfMon supports 1972 * Check whether the Architectural PerfMon supports
1959 * Branch Misses Retired Event or not. 1973 * Branch Misses Retired hw_event or not.
1960 */ 1974 */
1961 cpuid(10, &eax.full, &ebx, &unused, &edx.full); 1975 cpuid(10, &eax.full, &ebx, &unused, &edx.full);
1962 if (eax.split.mask_length <= ARCH_PERFMON_BRANCH_MISSES_RETIRED) 1976 if (eax.split.mask_length <= ARCH_PERFMON_BRANCH_MISSES_RETIRED)
@@ -1968,15 +1982,15 @@ static int intel_pmu_init(void)
1968 1982
1969 x86_pmu = intel_pmu; 1983 x86_pmu = intel_pmu;
1970 x86_pmu.version = version; 1984 x86_pmu.version = version;
1971 x86_pmu.num_counters = eax.split.num_counters; 1985 x86_pmu.num_events = eax.split.num_events;
1972 x86_pmu.counter_bits = eax.split.bit_width; 1986 x86_pmu.event_bits = eax.split.bit_width;
1973 x86_pmu.counter_mask = (1ULL << eax.split.bit_width) - 1; 1987 x86_pmu.event_mask = (1ULL << eax.split.bit_width) - 1;
1974 1988
1975 /* 1989 /*
1976 * Quirk: v2 perfmon does not report fixed-purpose counters, so 1990 * Quirk: v2 perfmon does not report fixed-purpose events, so
1977 * assume at least 3 counters: 1991 * assume at least 3 events:
1978 */ 1992 */
1979 x86_pmu.num_counters_fixed = max((int)edx.split.num_counters_fixed, 3); 1993 x86_pmu.num_events_fixed = max((int)edx.split.num_events_fixed, 3);
1980 1994
1981 /* 1995 /*
1982 * Install the hw-cache-events table: 1996 * Install the hw-cache-events table:
@@ -2023,11 +2037,11 @@ static int amd_pmu_init(void)
2023 return 0; 2037 return 0;
2024} 2038}
2025 2039
2026void __init init_hw_perf_counters(void) 2040void __init init_hw_perf_events(void)
2027{ 2041{
2028 int err; 2042 int err;
2029 2043
2030 pr_info("Performance Counters: "); 2044 pr_info("Performance Events: ");
2031 2045
2032 switch (boot_cpu_data.x86_vendor) { 2046 switch (boot_cpu_data.x86_vendor) {
2033 case X86_VENDOR_INTEL: 2047 case X86_VENDOR_INTEL:
@@ -2040,45 +2054,45 @@ void __init init_hw_perf_counters(void)
2040 return; 2054 return;
2041 } 2055 }
2042 if (err != 0) { 2056 if (err != 0) {
2043 pr_cont("no PMU driver, software counters only.\n"); 2057 pr_cont("no PMU driver, software events only.\n");
2044 return; 2058 return;
2045 } 2059 }
2046 2060
2047 pr_cont("%s PMU driver.\n", x86_pmu.name); 2061 pr_cont("%s PMU driver.\n", x86_pmu.name);
2048 2062
2049 if (x86_pmu.num_counters > X86_PMC_MAX_GENERIC) { 2063 if (x86_pmu.num_events > X86_PMC_MAX_GENERIC) {
2050 WARN(1, KERN_ERR "hw perf counters %d > max(%d), clipping!", 2064 WARN(1, KERN_ERR "hw perf events %d > max(%d), clipping!",
2051 x86_pmu.num_counters, X86_PMC_MAX_GENERIC); 2065 x86_pmu.num_events, X86_PMC_MAX_GENERIC);
2052 x86_pmu.num_counters = X86_PMC_MAX_GENERIC; 2066 x86_pmu.num_events = X86_PMC_MAX_GENERIC;
2053 } 2067 }
2054 perf_counter_mask = (1 << x86_pmu.num_counters) - 1; 2068 perf_event_mask = (1 << x86_pmu.num_events) - 1;
2055 perf_max_counters = x86_pmu.num_counters; 2069 perf_max_events = x86_pmu.num_events;
2056 2070
2057 if (x86_pmu.num_counters_fixed > X86_PMC_MAX_FIXED) { 2071 if (x86_pmu.num_events_fixed > X86_PMC_MAX_FIXED) {
2058 WARN(1, KERN_ERR "hw perf counters fixed %d > max(%d), clipping!", 2072 WARN(1, KERN_ERR "hw perf events fixed %d > max(%d), clipping!",
2059 x86_pmu.num_counters_fixed, X86_PMC_MAX_FIXED); 2073 x86_pmu.num_events_fixed, X86_PMC_MAX_FIXED);
2060 x86_pmu.num_counters_fixed = X86_PMC_MAX_FIXED; 2074 x86_pmu.num_events_fixed = X86_PMC_MAX_FIXED;
2061 } 2075 }
2062 2076
2063 perf_counter_mask |= 2077 perf_event_mask |=
2064 ((1LL << x86_pmu.num_counters_fixed)-1) << X86_PMC_IDX_FIXED; 2078 ((1LL << x86_pmu.num_events_fixed)-1) << X86_PMC_IDX_FIXED;
2065 x86_pmu.intel_ctrl = perf_counter_mask; 2079 x86_pmu.intel_ctrl = perf_event_mask;
2066 2080
2067 perf_counters_lapic_init(); 2081 perf_events_lapic_init();
2068 register_die_notifier(&perf_counter_nmi_notifier); 2082 register_die_notifier(&perf_event_nmi_notifier);
2069 2083
2070 pr_info("... version: %d\n", x86_pmu.version); 2084 pr_info("... version: %d\n", x86_pmu.version);
2071 pr_info("... bit width: %d\n", x86_pmu.counter_bits); 2085 pr_info("... bit width: %d\n", x86_pmu.event_bits);
2072 pr_info("... generic counters: %d\n", x86_pmu.num_counters); 2086 pr_info("... generic registers: %d\n", x86_pmu.num_events);
2073 pr_info("... value mask: %016Lx\n", x86_pmu.counter_mask); 2087 pr_info("... value mask: %016Lx\n", x86_pmu.event_mask);
2074 pr_info("... max period: %016Lx\n", x86_pmu.max_period); 2088 pr_info("... max period: %016Lx\n", x86_pmu.max_period);
2075 pr_info("... fixed-purpose counters: %d\n", x86_pmu.num_counters_fixed); 2089 pr_info("... fixed-purpose events: %d\n", x86_pmu.num_events_fixed);
2076 pr_info("... counter mask: %016Lx\n", perf_counter_mask); 2090 pr_info("... event mask: %016Lx\n", perf_event_mask);
2077} 2091}
2078 2092
2079static inline void x86_pmu_read(struct perf_counter *counter) 2093static inline void x86_pmu_read(struct perf_event *event)
2080{ 2094{
2081 x86_perf_counter_update(counter, &counter->hw, counter->hw.idx); 2095 x86_perf_event_update(event, &event->hw, event->hw.idx);
2082} 2096}
2083 2097
2084static const struct pmu pmu = { 2098static const struct pmu pmu = {
@@ -2088,13 +2102,16 @@ static const struct pmu pmu = {
2088 .unthrottle = x86_pmu_unthrottle, 2102 .unthrottle = x86_pmu_unthrottle,
2089}; 2103};
2090 2104
2091const struct pmu *hw_perf_counter_init(struct perf_counter *counter) 2105const struct pmu *hw_perf_event_init(struct perf_event *event)
2092{ 2106{
2093 int err; 2107 int err;
2094 2108
2095 err = __hw_perf_counter_init(counter); 2109 err = __hw_perf_event_init(event);
2096 if (err) 2110 if (err) {
2111 if (event->destroy)
2112 event->destroy(event);
2097 return ERR_PTR(err); 2113 return ERR_PTR(err);
2114 }
2098 2115
2099 return &pmu; 2116 return &pmu;
2100} 2117}
@@ -2275,7 +2292,7 @@ struct perf_callchain_entry *perf_callchain(struct pt_regs *regs)
2275 return entry; 2292 return entry;
2276} 2293}
2277 2294
2278void hw_perf_counter_setup_online(int cpu) 2295void hw_perf_event_setup_online(int cpu)
2279{ 2296{
2280 init_debug_store_on_cpu(cpu); 2297 init_debug_store_on_cpu(cpu);
2281} 2298}
diff --git a/arch/x86/kernel/cpu/perfctr-watchdog.c b/arch/x86/kernel/cpu/perfctr-watchdog.c
index 392bea43b890..fab786f60ed6 100644
--- a/arch/x86/kernel/cpu/perfctr-watchdog.c
+++ b/arch/x86/kernel/cpu/perfctr-watchdog.c
@@ -20,7 +20,7 @@
20#include <linux/kprobes.h> 20#include <linux/kprobes.h>
21 21
22#include <asm/apic.h> 22#include <asm/apic.h>
23#include <asm/perf_counter.h> 23#include <asm/perf_event.h>
24 24
25struct nmi_watchdog_ctlblk { 25struct nmi_watchdog_ctlblk {
26 unsigned int cccr_msr; 26 unsigned int cccr_msr;
diff --git a/arch/x86/kernel/cpu/sched.c b/arch/x86/kernel/cpu/sched.c
new file mode 100644
index 000000000000..a640ae5ad201
--- /dev/null
+++ b/arch/x86/kernel/cpu/sched.c
@@ -0,0 +1,55 @@
1#include <linux/sched.h>
2#include <linux/math64.h>
3#include <linux/percpu.h>
4#include <linux/irqflags.h>
5
6#include <asm/cpufeature.h>
7#include <asm/processor.h>
8
9#ifdef CONFIG_SMP
10
11static DEFINE_PER_CPU(struct aperfmperf, old_perf_sched);
12
13static unsigned long scale_aperfmperf(void)
14{
15 struct aperfmperf val, *old = &__get_cpu_var(old_perf_sched);
16 unsigned long ratio, flags;
17
18 local_irq_save(flags);
19 get_aperfmperf(&val);
20 local_irq_restore(flags);
21
22 ratio = calc_aperfmperf_ratio(old, &val);
23 *old = val;
24
25 return ratio;
26}
27
28unsigned long arch_scale_freq_power(struct sched_domain *sd, int cpu)
29{
30 /*
31 * do aperf/mperf on the cpu level because it includes things
32 * like turbo mode, which are relevant to full cores.
33 */
34 if (boot_cpu_has(X86_FEATURE_APERFMPERF))
35 return scale_aperfmperf();
36
37 /*
38 * maybe have something cpufreq here
39 */
40
41 return default_scale_freq_power(sd, cpu);
42}
43
44unsigned long arch_scale_smt_power(struct sched_domain *sd, int cpu)
45{
46 /*
47 * aperf/mperf already includes the smt gain
48 */
49 if (boot_cpu_has(X86_FEATURE_APERFMPERF))
50 return SCHED_LOAD_SCALE;
51
52 return default_scale_smt_power(sd, cpu);
53}
54
55#endif
diff --git a/arch/x86/kernel/cpu/vmware.c b/arch/x86/kernel/cpu/vmware.c
index bc24f514ec93..1cbed97b59cf 100644
--- a/arch/x86/kernel/cpu/vmware.c
+++ b/arch/x86/kernel/cpu/vmware.c
@@ -24,6 +24,7 @@
24#include <linux/dmi.h> 24#include <linux/dmi.h>
25#include <asm/div64.h> 25#include <asm/div64.h>
26#include <asm/vmware.h> 26#include <asm/vmware.h>
27#include <asm/x86_init.h>
27 28
28#define CPUID_VMWARE_INFO_LEAF 0x40000000 29#define CPUID_VMWARE_INFO_LEAF 0x40000000
29#define VMWARE_HYPERVISOR_MAGIC 0x564D5868 30#define VMWARE_HYPERVISOR_MAGIC 0x564D5868
@@ -47,21 +48,35 @@ static inline int __vmware_platform(void)
47 return eax != (uint32_t)-1 && ebx == VMWARE_HYPERVISOR_MAGIC; 48 return eax != (uint32_t)-1 && ebx == VMWARE_HYPERVISOR_MAGIC;
48} 49}
49 50
50static unsigned long __vmware_get_tsc_khz(void) 51static unsigned long vmware_get_tsc_khz(void)
51{ 52{
52 uint64_t tsc_hz; 53 uint64_t tsc_hz;
53 uint32_t eax, ebx, ecx, edx; 54 uint32_t eax, ebx, ecx, edx;
54 55
55 VMWARE_PORT(GETHZ, eax, ebx, ecx, edx); 56 VMWARE_PORT(GETHZ, eax, ebx, ecx, edx);
56 57
57 if (ebx == UINT_MAX)
58 return 0;
59 tsc_hz = eax | (((uint64_t)ebx) << 32); 58 tsc_hz = eax | (((uint64_t)ebx) << 32);
60 do_div(tsc_hz, 1000); 59 do_div(tsc_hz, 1000);
61 BUG_ON(tsc_hz >> 32); 60 BUG_ON(tsc_hz >> 32);
61 printk(KERN_INFO "TSC freq read from hypervisor : %lu.%03lu MHz\n",
62 (unsigned long) tsc_hz / 1000,
63 (unsigned long) tsc_hz % 1000);
62 return tsc_hz; 64 return tsc_hz;
63} 65}
64 66
67void __init vmware_platform_setup(void)
68{
69 uint32_t eax, ebx, ecx, edx;
70
71 VMWARE_PORT(GETHZ, eax, ebx, ecx, edx);
72
73 if (ebx != UINT_MAX)
74 x86_platform.calibrate_tsc = vmware_get_tsc_khz;
75 else
76 printk(KERN_WARNING
77 "Failed to get TSC freq from the hypervisor\n");
78}
79
65/* 80/*
66 * While checking the dmi string infomation, just checking the product 81 * While checking the dmi string infomation, just checking the product
67 * serial key should be enough, as this will always have a VMware 82 * serial key should be enough, as this will always have a VMware
@@ -87,12 +102,6 @@ int vmware_platform(void)
87 return 0; 102 return 0;
88} 103}
89 104
90unsigned long vmware_get_tsc_khz(void)
91{
92 BUG_ON(!vmware_platform());
93 return __vmware_get_tsc_khz();
94}
95
96/* 105/*
97 * VMware hypervisor takes care of exporting a reliable TSC to the guest. 106 * VMware hypervisor takes care of exporting a reliable TSC to the guest.
98 * Still, due to timing difference when running on virtual cpus, the TSC can 107 * Still, due to timing difference when running on virtual cpus, the TSC can
diff --git a/arch/x86/kernel/cpuid.c b/arch/x86/kernel/cpuid.c
index b07af8861244..6a52d4b36a30 100644
--- a/arch/x86/kernel/cpuid.c
+++ b/arch/x86/kernel/cpuid.c
@@ -182,7 +182,7 @@ static struct notifier_block __refdata cpuid_class_cpu_notifier =
182 .notifier_call = cpuid_class_cpu_callback, 182 .notifier_call = cpuid_class_cpu_callback,
183}; 183};
184 184
185static char *cpuid_nodename(struct device *dev) 185static char *cpuid_devnode(struct device *dev, mode_t *mode)
186{ 186{
187 return kasprintf(GFP_KERNEL, "cpu/%u/cpuid", MINOR(dev->devt)); 187 return kasprintf(GFP_KERNEL, "cpu/%u/cpuid", MINOR(dev->devt));
188} 188}
@@ -203,7 +203,7 @@ static int __init cpuid_init(void)
203 err = PTR_ERR(cpuid_class); 203 err = PTR_ERR(cpuid_class);
204 goto out_chrdev; 204 goto out_chrdev;
205 } 205 }
206 cpuid_class->nodename = cpuid_nodename; 206 cpuid_class->devnode = cpuid_devnode;
207 for_each_online_cpu(i) { 207 for_each_online_cpu(i) {
208 err = cpuid_device_create(i); 208 err = cpuid_device_create(i);
209 if (err != 0) 209 if (err != 0)
diff --git a/arch/x86/kernel/dumpstack_32.c b/arch/x86/kernel/dumpstack_32.c
index bca5fba91c9e..f7dd2a7c3bf4 100644
--- a/arch/x86/kernel/dumpstack_32.c
+++ b/arch/x86/kernel/dumpstack_32.c
@@ -5,7 +5,6 @@
5#include <linux/kallsyms.h> 5#include <linux/kallsyms.h>
6#include <linux/kprobes.h> 6#include <linux/kprobes.h>
7#include <linux/uaccess.h> 7#include <linux/uaccess.h>
8#include <linux/utsname.h>
9#include <linux/hardirq.h> 8#include <linux/hardirq.h>
10#include <linux/kdebug.h> 9#include <linux/kdebug.h>
11#include <linux/module.h> 10#include <linux/module.h>
diff --git a/arch/x86/kernel/dumpstack_64.c b/arch/x86/kernel/dumpstack_64.c
index 54b0a3276766..a071e6be177e 100644
--- a/arch/x86/kernel/dumpstack_64.c
+++ b/arch/x86/kernel/dumpstack_64.c
@@ -5,7 +5,6 @@
5#include <linux/kallsyms.h> 5#include <linux/kallsyms.h>
6#include <linux/kprobes.h> 6#include <linux/kprobes.h>
7#include <linux/uaccess.h> 7#include <linux/uaccess.h>
8#include <linux/utsname.h>
9#include <linux/hardirq.h> 8#include <linux/hardirq.h>
10#include <linux/kdebug.h> 9#include <linux/kdebug.h>
11#include <linux/module.h> 10#include <linux/module.h>
diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
index 147005a1cc3c..85419bb7d4ab 100644
--- a/arch/x86/kernel/e820.c
+++ b/arch/x86/kernel/e820.c
@@ -1331,7 +1331,7 @@ void __init e820_reserve_resources(void)
1331 struct resource *res; 1331 struct resource *res;
1332 u64 end; 1332 u64 end;
1333 1333
1334 res = alloc_bootmem_low(sizeof(struct resource) * e820.nr_map); 1334 res = alloc_bootmem(sizeof(struct resource) * e820.nr_map);
1335 e820_res = res; 1335 e820_res = res;
1336 for (i = 0; i < e820.nr_map; i++) { 1336 for (i = 0; i < e820.nr_map; i++) {
1337 end = e820.map[i].addr + e820.map[i].size - 1; 1337 end = e820.map[i].addr + e820.map[i].size - 1;
@@ -1455,28 +1455,11 @@ char *__init default_machine_specific_memory_setup(void)
1455 return who; 1455 return who;
1456} 1456}
1457 1457
1458char *__init __attribute__((weak)) machine_specific_memory_setup(void)
1459{
1460 if (x86_quirks->arch_memory_setup) {
1461 char *who = x86_quirks->arch_memory_setup();
1462
1463 if (who)
1464 return who;
1465 }
1466 return default_machine_specific_memory_setup();
1467}
1468
1469/* Overridden in paravirt.c if CONFIG_PARAVIRT */
1470char * __init __attribute__((weak)) memory_setup(void)
1471{
1472 return machine_specific_memory_setup();
1473}
1474
1475void __init setup_memory_map(void) 1458void __init setup_memory_map(void)
1476{ 1459{
1477 char *who; 1460 char *who;
1478 1461
1479 who = memory_setup(); 1462 who = x86_init.resources.memory_setup();
1480 memcpy(&e820_saved, &e820, sizeof(struct e820map)); 1463 memcpy(&e820_saved, &e820, sizeof(struct e820map));
1481 printk(KERN_INFO "BIOS-provided physical RAM map:\n"); 1464 printk(KERN_INFO "BIOS-provided physical RAM map:\n");
1482 e820_print_map(who); 1465 e820_print_map(who);
diff --git a/arch/x86/kernel/early_printk.c b/arch/x86/kernel/early_printk.c
index 335f049d110f..2acfd3fdc0cc 100644
--- a/arch/x86/kernel/early_printk.c
+++ b/arch/x86/kernel/early_printk.c
@@ -160,721 +160,6 @@ static struct console early_serial_console = {
160 .index = -1, 160 .index = -1,
161}; 161};
162 162
163#ifdef CONFIG_EARLY_PRINTK_DBGP
164
165static struct ehci_caps __iomem *ehci_caps;
166static struct ehci_regs __iomem *ehci_regs;
167static struct ehci_dbg_port __iomem *ehci_debug;
168static unsigned int dbgp_endpoint_out;
169
170struct ehci_dev {
171 u32 bus;
172 u32 slot;
173 u32 func;
174};
175
176static struct ehci_dev ehci_dev;
177
178#define USB_DEBUG_DEVNUM 127
179
180#define DBGP_DATA_TOGGLE 0x8800
181
182static inline u32 dbgp_pid_update(u32 x, u32 tok)
183{
184 return ((x ^ DBGP_DATA_TOGGLE) & 0xffff00) | (tok & 0xff);
185}
186
187static inline u32 dbgp_len_update(u32 x, u32 len)
188{
189 return (x & ~0x0f) | (len & 0x0f);
190}
191
192/*
193 * USB Packet IDs (PIDs)
194 */
195
196/* token */
197#define USB_PID_OUT 0xe1
198#define USB_PID_IN 0x69
199#define USB_PID_SOF 0xa5
200#define USB_PID_SETUP 0x2d
201/* handshake */
202#define USB_PID_ACK 0xd2
203#define USB_PID_NAK 0x5a
204#define USB_PID_STALL 0x1e
205#define USB_PID_NYET 0x96
206/* data */
207#define USB_PID_DATA0 0xc3
208#define USB_PID_DATA1 0x4b
209#define USB_PID_DATA2 0x87
210#define USB_PID_MDATA 0x0f
211/* Special */
212#define USB_PID_PREAMBLE 0x3c
213#define USB_PID_ERR 0x3c
214#define USB_PID_SPLIT 0x78
215#define USB_PID_PING 0xb4
216#define USB_PID_UNDEF_0 0xf0
217
218#define USB_PID_DATA_TOGGLE 0x88
219#define DBGP_CLAIM (DBGP_OWNER | DBGP_ENABLED | DBGP_INUSE)
220
221#define PCI_CAP_ID_EHCI_DEBUG 0xa
222
223#define HUB_ROOT_RESET_TIME 50 /* times are in msec */
224#define HUB_SHORT_RESET_TIME 10
225#define HUB_LONG_RESET_TIME 200
226#define HUB_RESET_TIMEOUT 500
227
228#define DBGP_MAX_PACKET 8
229
230static int dbgp_wait_until_complete(void)
231{
232 u32 ctrl;
233 int loop = 0x100000;
234
235 do {
236 ctrl = readl(&ehci_debug->control);
237 /* Stop when the transaction is finished */
238 if (ctrl & DBGP_DONE)
239 break;
240 } while (--loop > 0);
241
242 if (!loop)
243 return -1;
244
245 /*
246 * Now that we have observed the completed transaction,
247 * clear the done bit.
248 */
249 writel(ctrl | DBGP_DONE, &ehci_debug->control);
250 return (ctrl & DBGP_ERROR) ? -DBGP_ERRCODE(ctrl) : DBGP_LEN(ctrl);
251}
252
253static void __init dbgp_mdelay(int ms)
254{
255 int i;
256
257 while (ms--) {
258 for (i = 0; i < 1000; i++)
259 outb(0x1, 0x80);
260 }
261}
262
263static void dbgp_breath(void)
264{
265 /* Sleep to give the debug port a chance to breathe */
266}
267
268static int dbgp_wait_until_done(unsigned ctrl)
269{
270 u32 pids, lpid;
271 int ret;
272 int loop = 3;
273
274retry:
275 writel(ctrl | DBGP_GO, &ehci_debug->control);
276 ret = dbgp_wait_until_complete();
277 pids = readl(&ehci_debug->pids);
278 lpid = DBGP_PID_GET(pids);
279
280 if (ret < 0)
281 return ret;
282
283 /*
284 * If the port is getting full or it has dropped data
285 * start pacing ourselves, not necessary but it's friendly.
286 */
287 if ((lpid == USB_PID_NAK) || (lpid == USB_PID_NYET))
288 dbgp_breath();
289
290 /* If I get a NACK reissue the transmission */
291 if (lpid == USB_PID_NAK) {
292 if (--loop > 0)
293 goto retry;
294 }
295
296 return ret;
297}
298
299static void dbgp_set_data(const void *buf, int size)
300{
301 const unsigned char *bytes = buf;
302 u32 lo, hi;
303 int i;
304
305 lo = hi = 0;
306 for (i = 0; i < 4 && i < size; i++)
307 lo |= bytes[i] << (8*i);
308 for (; i < 8 && i < size; i++)
309 hi |= bytes[i] << (8*(i - 4));
310 writel(lo, &ehci_debug->data03);
311 writel(hi, &ehci_debug->data47);
312}
313
314static void __init dbgp_get_data(void *buf, int size)
315{
316 unsigned char *bytes = buf;
317 u32 lo, hi;
318 int i;
319
320 lo = readl(&ehci_debug->data03);
321 hi = readl(&ehci_debug->data47);
322 for (i = 0; i < 4 && i < size; i++)
323 bytes[i] = (lo >> (8*i)) & 0xff;
324 for (; i < 8 && i < size; i++)
325 bytes[i] = (hi >> (8*(i - 4))) & 0xff;
326}
327
328static int dbgp_bulk_write(unsigned devnum, unsigned endpoint,
329 const char *bytes, int size)
330{
331 u32 pids, addr, ctrl;
332 int ret;
333
334 if (size > DBGP_MAX_PACKET)
335 return -1;
336
337 addr = DBGP_EPADDR(devnum, endpoint);
338
339 pids = readl(&ehci_debug->pids);
340 pids = dbgp_pid_update(pids, USB_PID_OUT);
341
342 ctrl = readl(&ehci_debug->control);
343 ctrl = dbgp_len_update(ctrl, size);
344 ctrl |= DBGP_OUT;
345 ctrl |= DBGP_GO;
346
347 dbgp_set_data(bytes, size);
348 writel(addr, &ehci_debug->address);
349 writel(pids, &ehci_debug->pids);
350
351 ret = dbgp_wait_until_done(ctrl);
352 if (ret < 0)
353 return ret;
354
355 return ret;
356}
357
358static int __init dbgp_bulk_read(unsigned devnum, unsigned endpoint, void *data,
359 int size)
360{
361 u32 pids, addr, ctrl;
362 int ret;
363
364 if (size > DBGP_MAX_PACKET)
365 return -1;
366
367 addr = DBGP_EPADDR(devnum, endpoint);
368
369 pids = readl(&ehci_debug->pids);
370 pids = dbgp_pid_update(pids, USB_PID_IN);
371
372 ctrl = readl(&ehci_debug->control);
373 ctrl = dbgp_len_update(ctrl, size);
374 ctrl &= ~DBGP_OUT;
375 ctrl |= DBGP_GO;
376
377 writel(addr, &ehci_debug->address);
378 writel(pids, &ehci_debug->pids);
379 ret = dbgp_wait_until_done(ctrl);
380 if (ret < 0)
381 return ret;
382
383 if (size > ret)
384 size = ret;
385 dbgp_get_data(data, size);
386 return ret;
387}
388
389static int __init dbgp_control_msg(unsigned devnum, int requesttype,
390 int request, int value, int index, void *data, int size)
391{
392 u32 pids, addr, ctrl;
393 struct usb_ctrlrequest req;
394 int read;
395 int ret;
396
397 read = (requesttype & USB_DIR_IN) != 0;
398 if (size > (read ? DBGP_MAX_PACKET:0))
399 return -1;
400
401 /* Compute the control message */
402 req.bRequestType = requesttype;
403 req.bRequest = request;
404 req.wValue = cpu_to_le16(value);
405 req.wIndex = cpu_to_le16(index);
406 req.wLength = cpu_to_le16(size);
407
408 pids = DBGP_PID_SET(USB_PID_DATA0, USB_PID_SETUP);
409 addr = DBGP_EPADDR(devnum, 0);
410
411 ctrl = readl(&ehci_debug->control);
412 ctrl = dbgp_len_update(ctrl, sizeof(req));
413 ctrl |= DBGP_OUT;
414 ctrl |= DBGP_GO;
415
416 /* Send the setup message */
417 dbgp_set_data(&req, sizeof(req));
418 writel(addr, &ehci_debug->address);
419 writel(pids, &ehci_debug->pids);
420 ret = dbgp_wait_until_done(ctrl);
421 if (ret < 0)
422 return ret;
423
424 /* Read the result */
425 return dbgp_bulk_read(devnum, 0, data, size);
426}
427
428
429/* Find a PCI capability */
430static u32 __init find_cap(u32 num, u32 slot, u32 func, int cap)
431{
432 u8 pos;
433 int bytes;
434
435 if (!(read_pci_config_16(num, slot, func, PCI_STATUS) &
436 PCI_STATUS_CAP_LIST))
437 return 0;
438
439 pos = read_pci_config_byte(num, slot, func, PCI_CAPABILITY_LIST);
440 for (bytes = 0; bytes < 48 && pos >= 0x40; bytes++) {
441 u8 id;
442
443 pos &= ~3;
444 id = read_pci_config_byte(num, slot, func, pos+PCI_CAP_LIST_ID);
445 if (id == 0xff)
446 break;
447 if (id == cap)
448 return pos;
449
450 pos = read_pci_config_byte(num, slot, func,
451 pos+PCI_CAP_LIST_NEXT);
452 }
453 return 0;
454}
455
456static u32 __init __find_dbgp(u32 bus, u32 slot, u32 func)
457{
458 u32 class;
459
460 class = read_pci_config(bus, slot, func, PCI_CLASS_REVISION);
461 if ((class >> 8) != PCI_CLASS_SERIAL_USB_EHCI)
462 return 0;
463
464 return find_cap(bus, slot, func, PCI_CAP_ID_EHCI_DEBUG);
465}
466
467static u32 __init find_dbgp(int ehci_num, u32 *rbus, u32 *rslot, u32 *rfunc)
468{
469 u32 bus, slot, func;
470
471 for (bus = 0; bus < 256; bus++) {
472 for (slot = 0; slot < 32; slot++) {
473 for (func = 0; func < 8; func++) {
474 unsigned cap;
475
476 cap = __find_dbgp(bus, slot, func);
477
478 if (!cap)
479 continue;
480 if (ehci_num-- != 0)
481 continue;
482 *rbus = bus;
483 *rslot = slot;
484 *rfunc = func;
485 return cap;
486 }
487 }
488 }
489 return 0;
490}
491
492static int __init ehci_reset_port(int port)
493{
494 u32 portsc;
495 u32 delay_time, delay;
496 int loop;
497
498 /* Reset the usb debug port */
499 portsc = readl(&ehci_regs->port_status[port - 1]);
500 portsc &= ~PORT_PE;
501 portsc |= PORT_RESET;
502 writel(portsc, &ehci_regs->port_status[port - 1]);
503
504 delay = HUB_ROOT_RESET_TIME;
505 for (delay_time = 0; delay_time < HUB_RESET_TIMEOUT;
506 delay_time += delay) {
507 dbgp_mdelay(delay);
508
509 portsc = readl(&ehci_regs->port_status[port - 1]);
510 if (portsc & PORT_RESET) {
511 /* force reset to complete */
512 loop = 2;
513 writel(portsc & ~(PORT_RWC_BITS | PORT_RESET),
514 &ehci_regs->port_status[port - 1]);
515 do {
516 portsc = readl(&ehci_regs->port_status[port-1]);
517 } while ((portsc & PORT_RESET) && (--loop > 0));
518 }
519
520 /* Device went away? */
521 if (!(portsc & PORT_CONNECT))
522 return -ENOTCONN;
523
524 /* bomb out completely if something weird happend */
525 if ((portsc & PORT_CSC))
526 return -EINVAL;
527
528 /* If we've finished resetting, then break out of the loop */
529 if (!(portsc & PORT_RESET) && (portsc & PORT_PE))
530 return 0;
531 }
532 return -EBUSY;
533}
534
535static int __init ehci_wait_for_port(int port)
536{
537 u32 status;
538 int ret, reps;
539
540 for (reps = 0; reps < 3; reps++) {
541 dbgp_mdelay(100);
542 status = readl(&ehci_regs->status);
543 if (status & STS_PCD) {
544 ret = ehci_reset_port(port);
545 if (ret == 0)
546 return 0;
547 }
548 }
549 return -ENOTCONN;
550}
551
552#ifdef DBGP_DEBUG
553# define dbgp_printk early_printk
554#else
555static inline void dbgp_printk(const char *fmt, ...) { }
556#endif
557
558typedef void (*set_debug_port_t)(int port);
559
560static void __init default_set_debug_port(int port)
561{
562}
563
564static set_debug_port_t __initdata set_debug_port = default_set_debug_port;
565
566static void __init nvidia_set_debug_port(int port)
567{
568 u32 dword;
569 dword = read_pci_config(ehci_dev.bus, ehci_dev.slot, ehci_dev.func,
570 0x74);
571 dword &= ~(0x0f<<12);
572 dword |= ((port & 0x0f)<<12);
573 write_pci_config(ehci_dev.bus, ehci_dev.slot, ehci_dev.func, 0x74,
574 dword);
575 dbgp_printk("set debug port to %d\n", port);
576}
577
578static void __init detect_set_debug_port(void)
579{
580 u32 vendorid;
581
582 vendorid = read_pci_config(ehci_dev.bus, ehci_dev.slot, ehci_dev.func,
583 0x00);
584
585 if ((vendorid & 0xffff) == 0x10de) {
586 dbgp_printk("using nvidia set_debug_port\n");
587 set_debug_port = nvidia_set_debug_port;
588 }
589}
590
591static int __init ehci_setup(void)
592{
593 struct usb_debug_descriptor dbgp_desc;
594 u32 cmd, ctrl, status, portsc, hcs_params;
595 u32 debug_port, new_debug_port = 0, n_ports;
596 u32 devnum;
597 int ret, i;
598 int loop;
599 int port_map_tried;
600 int playtimes = 3;
601
602try_next_time:
603 port_map_tried = 0;
604
605try_next_port:
606
607 hcs_params = readl(&ehci_caps->hcs_params);
608 debug_port = HCS_DEBUG_PORT(hcs_params);
609 n_ports = HCS_N_PORTS(hcs_params);
610
611 dbgp_printk("debug_port: %d\n", debug_port);
612 dbgp_printk("n_ports: %d\n", n_ports);
613
614 for (i = 1; i <= n_ports; i++) {
615 portsc = readl(&ehci_regs->port_status[i-1]);
616 dbgp_printk("portstatus%d: %08x\n", i, portsc);
617 }
618
619 if (port_map_tried && (new_debug_port != debug_port)) {
620 if (--playtimes) {
621 set_debug_port(new_debug_port);
622 goto try_next_time;
623 }
624 return -1;
625 }
626
627 loop = 10;
628 /* Reset the EHCI controller */
629 cmd = readl(&ehci_regs->command);
630 cmd |= CMD_RESET;
631 writel(cmd, &ehci_regs->command);
632 do {
633 cmd = readl(&ehci_regs->command);
634 } while ((cmd & CMD_RESET) && (--loop > 0));
635
636 if (!loop) {
637 dbgp_printk("can not reset ehci\n");
638 return -1;
639 }
640 dbgp_printk("ehci reset done\n");
641
642 /* Claim ownership, but do not enable yet */
643 ctrl = readl(&ehci_debug->control);
644 ctrl |= DBGP_OWNER;
645 ctrl &= ~(DBGP_ENABLED | DBGP_INUSE);
646 writel(ctrl, &ehci_debug->control);
647
648 /* Start the ehci running */
649 cmd = readl(&ehci_regs->command);
650 cmd &= ~(CMD_LRESET | CMD_IAAD | CMD_PSE | CMD_ASE | CMD_RESET);
651 cmd |= CMD_RUN;
652 writel(cmd, &ehci_regs->command);
653
654 /* Ensure everything is routed to the EHCI */
655 writel(FLAG_CF, &ehci_regs->configured_flag);
656
657 /* Wait until the controller is no longer halted */
658 loop = 10;
659 do {
660 status = readl(&ehci_regs->status);
661 } while ((status & STS_HALT) && (--loop > 0));
662
663 if (!loop) {
664 dbgp_printk("ehci can be started\n");
665 return -1;
666 }
667 dbgp_printk("ehci started\n");
668
669 /* Wait for a device to show up in the debug port */
670 ret = ehci_wait_for_port(debug_port);
671 if (ret < 0) {
672 dbgp_printk("No device found in debug port\n");
673 goto next_debug_port;
674 }
675 dbgp_printk("ehci wait for port done\n");
676
677 /* Enable the debug port */
678 ctrl = readl(&ehci_debug->control);
679 ctrl |= DBGP_CLAIM;
680 writel(ctrl, &ehci_debug->control);
681 ctrl = readl(&ehci_debug->control);
682 if ((ctrl & DBGP_CLAIM) != DBGP_CLAIM) {
683 dbgp_printk("No device in debug port\n");
684 writel(ctrl & ~DBGP_CLAIM, &ehci_debug->control);
685 goto err;
686 }
687 dbgp_printk("debug ported enabled\n");
688
689 /* Completely transfer the debug device to the debug controller */
690 portsc = readl(&ehci_regs->port_status[debug_port - 1]);
691 portsc &= ~PORT_PE;
692 writel(portsc, &ehci_regs->port_status[debug_port - 1]);
693
694 dbgp_mdelay(100);
695
696 /* Find the debug device and make it device number 127 */
697 for (devnum = 0; devnum <= 127; devnum++) {
698 ret = dbgp_control_msg(devnum,
699 USB_DIR_IN | USB_TYPE_STANDARD | USB_RECIP_DEVICE,
700 USB_REQ_GET_DESCRIPTOR, (USB_DT_DEBUG << 8), 0,
701 &dbgp_desc, sizeof(dbgp_desc));
702 if (ret > 0)
703 break;
704 }
705 if (devnum > 127) {
706 dbgp_printk("Could not find attached debug device\n");
707 goto err;
708 }
709 if (ret < 0) {
710 dbgp_printk("Attached device is not a debug device\n");
711 goto err;
712 }
713 dbgp_endpoint_out = dbgp_desc.bDebugOutEndpoint;
714
715 /* Move the device to 127 if it isn't already there */
716 if (devnum != USB_DEBUG_DEVNUM) {
717 ret = dbgp_control_msg(devnum,
718 USB_DIR_OUT | USB_TYPE_STANDARD | USB_RECIP_DEVICE,
719 USB_REQ_SET_ADDRESS, USB_DEBUG_DEVNUM, 0, NULL, 0);
720 if (ret < 0) {
721 dbgp_printk("Could not move attached device to %d\n",
722 USB_DEBUG_DEVNUM);
723 goto err;
724 }
725 devnum = USB_DEBUG_DEVNUM;
726 dbgp_printk("debug device renamed to 127\n");
727 }
728
729 /* Enable the debug interface */
730 ret = dbgp_control_msg(USB_DEBUG_DEVNUM,
731 USB_DIR_OUT | USB_TYPE_STANDARD | USB_RECIP_DEVICE,
732 USB_REQ_SET_FEATURE, USB_DEVICE_DEBUG_MODE, 0, NULL, 0);
733 if (ret < 0) {
734 dbgp_printk(" Could not enable the debug device\n");
735 goto err;
736 }
737 dbgp_printk("debug interface enabled\n");
738
739 /* Perform a small write to get the even/odd data state in sync
740 */
741 ret = dbgp_bulk_write(USB_DEBUG_DEVNUM, dbgp_endpoint_out, " ", 1);
742 if (ret < 0) {
743 dbgp_printk("dbgp_bulk_write failed: %d\n", ret);
744 goto err;
745 }
746 dbgp_printk("small write doned\n");
747
748 return 0;
749err:
750 /* Things didn't work so remove my claim */
751 ctrl = readl(&ehci_debug->control);
752 ctrl &= ~(DBGP_CLAIM | DBGP_OUT);
753 writel(ctrl, &ehci_debug->control);
754 return -1;
755
756next_debug_port:
757 port_map_tried |= (1<<(debug_port - 1));
758 new_debug_port = ((debug_port-1+1)%n_ports) + 1;
759 if (port_map_tried != ((1<<n_ports) - 1)) {
760 set_debug_port(new_debug_port);
761 goto try_next_port;
762 }
763 if (--playtimes) {
764 set_debug_port(new_debug_port);
765 goto try_next_time;
766 }
767
768 return -1;
769}
770
771static int __init early_dbgp_init(char *s)
772{
773 u32 debug_port, bar, offset;
774 u32 bus, slot, func, cap;
775 void __iomem *ehci_bar;
776 u32 dbgp_num;
777 u32 bar_val;
778 char *e;
779 int ret;
780 u8 byte;
781
782 if (!early_pci_allowed())
783 return -1;
784
785 dbgp_num = 0;
786 if (*s)
787 dbgp_num = simple_strtoul(s, &e, 10);
788 dbgp_printk("dbgp_num: %d\n", dbgp_num);
789
790 cap = find_dbgp(dbgp_num, &bus, &slot, &func);
791 if (!cap)
792 return -1;
793
794 dbgp_printk("Found EHCI debug port on %02x:%02x.%1x\n", bus, slot,
795 func);
796
797 debug_port = read_pci_config(bus, slot, func, cap);
798 bar = (debug_port >> 29) & 0x7;
799 bar = (bar * 4) + 0xc;
800 offset = (debug_port >> 16) & 0xfff;
801 dbgp_printk("bar: %02x offset: %03x\n", bar, offset);
802 if (bar != PCI_BASE_ADDRESS_0) {
803 dbgp_printk("only debug ports on bar 1 handled.\n");
804
805 return -1;
806 }
807
808 bar_val = read_pci_config(bus, slot, func, PCI_BASE_ADDRESS_0);
809 dbgp_printk("bar_val: %02x offset: %03x\n", bar_val, offset);
810 if (bar_val & ~PCI_BASE_ADDRESS_MEM_MASK) {
811 dbgp_printk("only simple 32bit mmio bars supported\n");
812
813 return -1;
814 }
815
816 /* double check if the mem space is enabled */
817 byte = read_pci_config_byte(bus, slot, func, 0x04);
818 if (!(byte & 0x2)) {
819 byte |= 0x02;
820 write_pci_config_byte(bus, slot, func, 0x04, byte);
821 dbgp_printk("mmio for ehci enabled\n");
822 }
823
824 /*
825 * FIXME I don't have the bar size so just guess PAGE_SIZE is more
826 * than enough. 1K is the biggest I have seen.
827 */
828 set_fixmap_nocache(FIX_DBGP_BASE, bar_val & PAGE_MASK);
829 ehci_bar = (void __iomem *)__fix_to_virt(FIX_DBGP_BASE);
830 ehci_bar += bar_val & ~PAGE_MASK;
831 dbgp_printk("ehci_bar: %p\n", ehci_bar);
832
833 ehci_caps = ehci_bar;
834 ehci_regs = ehci_bar + HC_LENGTH(readl(&ehci_caps->hc_capbase));
835 ehci_debug = ehci_bar + offset;
836 ehci_dev.bus = bus;
837 ehci_dev.slot = slot;
838 ehci_dev.func = func;
839
840 detect_set_debug_port();
841
842 ret = ehci_setup();
843 if (ret < 0) {
844 dbgp_printk("ehci_setup failed\n");
845 ehci_debug = NULL;
846
847 return -1;
848 }
849
850 return 0;
851}
852
853static void early_dbgp_write(struct console *con, const char *str, u32 n)
854{
855 int chunk, ret;
856
857 if (!ehci_debug)
858 return;
859 while (n > 0) {
860 chunk = n;
861 if (chunk > DBGP_MAX_PACKET)
862 chunk = DBGP_MAX_PACKET;
863 ret = dbgp_bulk_write(USB_DEBUG_DEVNUM,
864 dbgp_endpoint_out, str, chunk);
865 str += chunk;
866 n -= chunk;
867 }
868}
869
870static struct console early_dbgp_console = {
871 .name = "earlydbg",
872 .write = early_dbgp_write,
873 .flags = CON_PRINTBUFFER,
874 .index = -1,
875};
876#endif
877
878/* Direct interface for emergencies */ 163/* Direct interface for emergencies */
879static struct console *early_console = &early_vga_console; 164static struct console *early_console = &early_vga_console;
880static int __initdata early_console_initialized; 165static int __initdata early_console_initialized;
@@ -891,10 +176,19 @@ asmlinkage void early_printk(const char *fmt, ...)
891 va_end(ap); 176 va_end(ap);
892} 177}
893 178
179static inline void early_console_register(struct console *con, int keep_early)
180{
181 early_console = con;
182 if (keep_early)
183 early_console->flags &= ~CON_BOOT;
184 else
185 early_console->flags |= CON_BOOT;
186 register_console(early_console);
187}
894 188
895static int __init setup_early_printk(char *buf) 189static int __init setup_early_printk(char *buf)
896{ 190{
897 int keep_early; 191 int keep;
898 192
899 if (!buf) 193 if (!buf)
900 return 0; 194 return 0;
@@ -903,42 +197,34 @@ static int __init setup_early_printk(char *buf)
903 return 0; 197 return 0;
904 early_console_initialized = 1; 198 early_console_initialized = 1;
905 199
906 keep_early = (strstr(buf, "keep") != NULL); 200 keep = (strstr(buf, "keep") != NULL);
907 201
908 if (!strncmp(buf, "serial", 6)) { 202 while (*buf != '\0') {
909 early_serial_init(buf + 6); 203 if (!strncmp(buf, "serial", 6)) {
910 early_console = &early_serial_console; 204 early_serial_init(buf + 6);
911 } else if (!strncmp(buf, "ttyS", 4)) { 205 early_console_register(&early_serial_console, keep);
912 early_serial_init(buf); 206 }
913 early_console = &early_serial_console; 207 if (!strncmp(buf, "ttyS", 4)) {
914 } else if (!strncmp(buf, "vga", 3) 208 early_serial_init(buf + 4);
915 && boot_params.screen_info.orig_video_isVGA == 1) { 209 early_console_register(&early_serial_console, keep);
916 max_xpos = boot_params.screen_info.orig_video_cols; 210 }
917 max_ypos = boot_params.screen_info.orig_video_lines; 211 if (!strncmp(buf, "vga", 3) &&
918 current_ypos = boot_params.screen_info.orig_y; 212 boot_params.screen_info.orig_video_isVGA == 1) {
919 early_console = &early_vga_console; 213 max_xpos = boot_params.screen_info.orig_video_cols;
214 max_ypos = boot_params.screen_info.orig_video_lines;
215 current_ypos = boot_params.screen_info.orig_y;
216 early_console_register(&early_vga_console, keep);
217 }
920#ifdef CONFIG_EARLY_PRINTK_DBGP 218#ifdef CONFIG_EARLY_PRINTK_DBGP
921 } else if (!strncmp(buf, "dbgp", 4)) { 219 if (!strncmp(buf, "dbgp", 4) && !early_dbgp_init(buf + 4))
922 if (early_dbgp_init(buf+4) < 0) 220 early_console_register(&early_dbgp_console, keep);
923 return 0;
924 early_console = &early_dbgp_console;
925 /*
926 * usb subsys will reset ehci controller, so don't keep
927 * that early console
928 */
929 keep_early = 0;
930#endif 221#endif
931#ifdef CONFIG_HVC_XEN 222#ifdef CONFIG_HVC_XEN
932 } else if (!strncmp(buf, "xen", 3)) { 223 if (!strncmp(buf, "xen", 3))
933 early_console = &xenboot_console; 224 early_console_register(&xenboot_console, keep);
934#endif 225#endif
226 buf++;
935 } 227 }
936
937 if (keep_early)
938 early_console->flags &= ~CON_BOOT;
939 else
940 early_console->flags |= CON_BOOT;
941 register_console(early_console);
942 return 0; 228 return 0;
943} 229}
944 230
diff --git a/arch/x86/kernel/efi.c b/arch/x86/kernel/efi.c
index fe26ba3e3451..ad5bd988fb79 100644
--- a/arch/x86/kernel/efi.c
+++ b/arch/x86/kernel/efi.c
@@ -42,6 +42,7 @@
42#include <asm/time.h> 42#include <asm/time.h>
43#include <asm/cacheflush.h> 43#include <asm/cacheflush.h>
44#include <asm/tlbflush.h> 44#include <asm/tlbflush.h>
45#include <asm/x86_init.h>
45 46
46#define EFI_DEBUG 1 47#define EFI_DEBUG 1
47#define PFX "EFI: " 48#define PFX "EFI: "
@@ -453,6 +454,9 @@ void __init efi_init(void)
453 if (add_efi_memmap) 454 if (add_efi_memmap)
454 do_add_efi_memmap(); 455 do_add_efi_memmap();
455 456
457 x86_platform.get_wallclock = efi_get_time;
458 x86_platform.set_wallclock = efi_set_rtc_mmss;
459
456 /* Setup for EFI runtime service */ 460 /* Setup for EFI runtime service */
457 reboot_type = BOOT_EFI; 461 reboot_type = BOOT_EFI;
458 462
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S
index c251be745107..b5c061f8f358 100644
--- a/arch/x86/kernel/entry_64.S
+++ b/arch/x86/kernel/entry_64.S
@@ -146,7 +146,7 @@ ENTRY(ftrace_graph_caller)
146END(ftrace_graph_caller) 146END(ftrace_graph_caller)
147 147
148GLOBAL(return_to_handler) 148GLOBAL(return_to_handler)
149 subq $80, %rsp 149 subq $24, %rsp
150 150
151 /* Save the return values */ 151 /* Save the return values */
152 movq %rax, (%rsp) 152 movq %rax, (%rsp)
@@ -155,10 +155,10 @@ GLOBAL(return_to_handler)
155 155
156 call ftrace_return_to_handler 156 call ftrace_return_to_handler
157 157
158 movq %rax, 72(%rsp) 158 movq %rax, 16(%rsp)
159 movq 8(%rsp), %rdx 159 movq 8(%rsp), %rdx
160 movq (%rsp), %rax 160 movq (%rsp), %rax
161 addq $72, %rsp 161 addq $16, %rsp
162 retq 162 retq
163#endif 163#endif
164 164
@@ -536,20 +536,13 @@ sysret_signal:
536 bt $TIF_SYSCALL_AUDIT,%edx 536 bt $TIF_SYSCALL_AUDIT,%edx
537 jc sysret_audit 537 jc sysret_audit
538#endif 538#endif
539 /* edx: work flags (arg3) */ 539 /*
540 leaq -ARGOFFSET(%rsp),%rdi # &pt_regs -> arg1 540 * We have a signal, or exit tracing or single-step.
541 xorl %esi,%esi # oldset -> arg2 541 * These all wind up with the iret return path anyway,
542 SAVE_REST 542 * so just join that path right now.
543 FIXUP_TOP_OF_STACK %r11 543 */
544 call do_notify_resume 544 FIXUP_TOP_OF_STACK %r11, -ARGOFFSET
545 RESTORE_TOP_OF_STACK %r11 545 jmp int_check_syscall_exit_work
546 RESTORE_REST
547 movl $_TIF_WORK_MASK,%edi
548 /* Use IRET because user could have changed frame. This
549 works because ptregscall_common has called FIXUP_TOP_OF_STACK. */
550 DISABLE_INTERRUPTS(CLBR_NONE)
551 TRACE_IRQS_OFF
552 jmp int_with_check
553 546
554badsys: 547badsys:
555 movq $-ENOSYS,RAX-ARGOFFSET(%rsp) 548 movq $-ENOSYS,RAX-ARGOFFSET(%rsp)
@@ -654,6 +647,7 @@ int_careful:
654int_very_careful: 647int_very_careful:
655 TRACE_IRQS_ON 648 TRACE_IRQS_ON
656 ENABLE_INTERRUPTS(CLBR_NONE) 649 ENABLE_INTERRUPTS(CLBR_NONE)
650int_check_syscall_exit_work:
657 SAVE_REST 651 SAVE_REST
658 /* Check for syscall exit trace */ 652 /* Check for syscall exit trace */
659 testl $_TIF_WORK_SYSCALL_EXIT,%edx 653 testl $_TIF_WORK_SYSCALL_EXIT,%edx
@@ -1021,7 +1015,7 @@ apicinterrupt ERROR_APIC_VECTOR \
1021apicinterrupt SPURIOUS_APIC_VECTOR \ 1015apicinterrupt SPURIOUS_APIC_VECTOR \
1022 spurious_interrupt smp_spurious_interrupt 1016 spurious_interrupt smp_spurious_interrupt
1023 1017
1024#ifdef CONFIG_PERF_COUNTERS 1018#ifdef CONFIG_PERF_EVENTS
1025apicinterrupt LOCAL_PENDING_VECTOR \ 1019apicinterrupt LOCAL_PENDING_VECTOR \
1026 perf_pending_interrupt smp_perf_pending_interrupt 1020 perf_pending_interrupt smp_perf_pending_interrupt
1027#endif 1021#endif
diff --git a/arch/x86/kernel/head32.c b/arch/x86/kernel/head32.c
index 3f8579f8d42c..4f8e2507e8f3 100644
--- a/arch/x86/kernel/head32.c
+++ b/arch/x86/kernel/head32.c
@@ -11,8 +11,21 @@
11#include <asm/setup.h> 11#include <asm/setup.h>
12#include <asm/sections.h> 12#include <asm/sections.h>
13#include <asm/e820.h> 13#include <asm/e820.h>
14#include <asm/bios_ebda.h> 14#include <asm/page.h>
15#include <asm/trampoline.h> 15#include <asm/trampoline.h>
16#include <asm/apic.h>
17#include <asm/io_apic.h>
18#include <asm/bios_ebda.h>
19
20static void __init i386_default_early_setup(void)
21{
22 /* Initilize 32bit specific setup functions */
23 x86_init.resources.probe_roms = probe_roms;
24 x86_init.resources.reserve_resources = i386_reserve_resources;
25 x86_init.mpparse.setup_ioapic_ids = setup_ioapic_ids_from_mpc;
26
27 reserve_ebda_region();
28}
16 29
17void __init i386_start_kernel(void) 30void __init i386_start_kernel(void)
18{ 31{
@@ -29,7 +42,16 @@ void __init i386_start_kernel(void)
29 reserve_early(ramdisk_image, ramdisk_end, "RAMDISK"); 42 reserve_early(ramdisk_image, ramdisk_end, "RAMDISK");
30 } 43 }
31#endif 44#endif
32 reserve_ebda_region(); 45
46 /* Call the subarch specific early setup function */
47 switch (boot_params.hdr.hardware_subarch) {
48 case X86_SUBARCH_MRST:
49 x86_mrst_early_setup();
50 break;
51 default:
52 i386_default_early_setup();
53 break;
54 }
33 55
34 /* 56 /*
35 * At this point everything still needed from the boot loader 57 * At this point everything still needed from the boot loader
diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c
index 70eaa852c732..0b06cd778fd9 100644
--- a/arch/x86/kernel/head64.c
+++ b/arch/x86/kernel/head64.c
@@ -23,8 +23,8 @@
23#include <asm/sections.h> 23#include <asm/sections.h>
24#include <asm/kdebug.h> 24#include <asm/kdebug.h>
25#include <asm/e820.h> 25#include <asm/e820.h>
26#include <asm/bios_ebda.h>
27#include <asm/trampoline.h> 26#include <asm/trampoline.h>
27#include <asm/bios_ebda.h>
28 28
29static void __init zap_identity_mappings(void) 29static void __init zap_identity_mappings(void)
30{ 30{
diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S
index 7ffec6b3b331..218aad7ee76e 100644
--- a/arch/x86/kernel/head_32.S
+++ b/arch/x86/kernel/head_32.S
@@ -157,6 +157,7 @@ subarch_entries:
157 .long default_entry /* normal x86/PC */ 157 .long default_entry /* normal x86/PC */
158 .long lguest_entry /* lguest hypervisor */ 158 .long lguest_entry /* lguest hypervisor */
159 .long xen_entry /* Xen hypervisor */ 159 .long xen_entry /* Xen hypervisor */
160 .long default_entry /* Moorestown MID */
160num_subarch_entries = (. - subarch_entries) / 4 161num_subarch_entries = (. - subarch_entries) / 4
161.previous 162.previous
162#endif /* CONFIG_PARAVIRT */ 163#endif /* CONFIG_PARAVIRT */
@@ -607,7 +608,7 @@ ENTRY(initial_code)
607/* 608/*
608 * BSS section 609 * BSS section
609 */ 610 */
610.section ".bss.page_aligned","wa" 611__PAGE_ALIGNED_BSS
611 .align PAGE_SIZE_asm 612 .align PAGE_SIZE_asm
612#ifdef CONFIG_X86_PAE 613#ifdef CONFIG_X86_PAE
613swapper_pg_pmd: 614swapper_pg_pmd:
@@ -625,7 +626,7 @@ ENTRY(empty_zero_page)
625 * This starts the data section. 626 * This starts the data section.
626 */ 627 */
627#ifdef CONFIG_X86_PAE 628#ifdef CONFIG_X86_PAE
628.section ".data.page_aligned","wa" 629__PAGE_ALIGNED_DATA
629 /* Page-aligned for the benefit of paravirt? */ 630 /* Page-aligned for the benefit of paravirt? */
630 .align PAGE_SIZE_asm 631 .align PAGE_SIZE_asm
631ENTRY(swapper_pg_dir) 632ENTRY(swapper_pg_dir)
diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S
index fa54f78e2a05..d0bc0a13a437 100644
--- a/arch/x86/kernel/head_64.S
+++ b/arch/x86/kernel/head_64.S
@@ -418,7 +418,7 @@ ENTRY(phys_base)
418ENTRY(idt_table) 418ENTRY(idt_table)
419 .skip IDT_ENTRIES * 16 419 .skip IDT_ENTRIES * 16
420 420
421 .section .bss.page_aligned, "aw", @nobits 421 __PAGE_ALIGNED_BSS
422 .align PAGE_SIZE 422 .align PAGE_SIZE
423ENTRY(empty_zero_page) 423ENTRY(empty_zero_page)
424 .skip PAGE_SIZE 424 .skip PAGE_SIZE
diff --git a/arch/x86/kernel/i8253.c b/arch/x86/kernel/i8253.c
index 5cf36c053ac4..23c167925a5c 100644
--- a/arch/x86/kernel/i8253.c
+++ b/arch/x86/kernel/i8253.c
@@ -19,12 +19,6 @@
19DEFINE_SPINLOCK(i8253_lock); 19DEFINE_SPINLOCK(i8253_lock);
20EXPORT_SYMBOL(i8253_lock); 20EXPORT_SYMBOL(i8253_lock);
21 21
22#ifdef CONFIG_X86_32
23static void pit_disable_clocksource(void);
24#else
25static inline void pit_disable_clocksource(void) { }
26#endif
27
28/* 22/*
29 * HPET replaces the PIT, when enabled. So we need to know, which of 23 * HPET replaces the PIT, when enabled. So we need to know, which of
30 * the two timers is used 24 * the two timers is used
@@ -57,12 +51,10 @@ static void init_pit_timer(enum clock_event_mode mode,
57 outb_pit(0, PIT_CH0); 51 outb_pit(0, PIT_CH0);
58 outb_pit(0, PIT_CH0); 52 outb_pit(0, PIT_CH0);
59 } 53 }
60 pit_disable_clocksource();
61 break; 54 break;
62 55
63 case CLOCK_EVT_MODE_ONESHOT: 56 case CLOCK_EVT_MODE_ONESHOT:
64 /* One shot setup */ 57 /* One shot setup */
65 pit_disable_clocksource();
66 outb_pit(0x38, PIT_MODE); 58 outb_pit(0x38, PIT_MODE);
67 break; 59 break;
68 60
@@ -200,17 +192,6 @@ static struct clocksource pit_cs = {
200 .shift = 20, 192 .shift = 20,
201}; 193};
202 194
203static void pit_disable_clocksource(void)
204{
205 /*
206 * Use mult to check whether it is registered or not
207 */
208 if (pit_cs.mult) {
209 clocksource_unregister(&pit_cs);
210 pit_cs.mult = 0;
211 }
212}
213
214static int __init init_pit_clocksource(void) 195static int __init init_pit_clocksource(void)
215{ 196{
216 /* 197 /*
diff --git a/arch/x86/kernel/init_task.c b/arch/x86/kernel/init_task.c
index 270ff83efc11..3a54dcb9cd0e 100644
--- a/arch/x86/kernel/init_task.c
+++ b/arch/x86/kernel/init_task.c
@@ -20,9 +20,8 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
20 * way process stacks are handled. This is done by having a special 20 * way process stacks are handled. This is done by having a special
21 * "init_task" linker map entry.. 21 * "init_task" linker map entry..
22 */ 22 */
23union thread_union init_thread_union 23union thread_union init_thread_union __init_task_data =
24 __attribute__((__section__(".data.init_task"))) = 24 { INIT_THREAD_INFO(init_task) };
25 { INIT_THREAD_INFO(init_task) };
26 25
27/* 26/*
28 * Initial task structure. 27 * Initial task structure.
diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c
index b0cdde6932f5..74656d1d4e30 100644
--- a/arch/x86/kernel/irq.c
+++ b/arch/x86/kernel/irq.c
@@ -104,7 +104,7 @@ static int show_other_interrupts(struct seq_file *p, int prec)
104 seq_printf(p, " Threshold APIC interrupts\n"); 104 seq_printf(p, " Threshold APIC interrupts\n");
105# endif 105# endif
106#endif 106#endif
107#ifdef CONFIG_X86_NEW_MCE 107#ifdef CONFIG_X86_MCE
108 seq_printf(p, "%*s: ", prec, "MCE"); 108 seq_printf(p, "%*s: ", prec, "MCE");
109 for_each_online_cpu(j) 109 for_each_online_cpu(j)
110 seq_printf(p, "%10u ", per_cpu(mce_exception_count, j)); 110 seq_printf(p, "%10u ", per_cpu(mce_exception_count, j));
@@ -200,7 +200,7 @@ u64 arch_irq_stat_cpu(unsigned int cpu)
200 sum += irq_stats(cpu)->irq_threshold_count; 200 sum += irq_stats(cpu)->irq_threshold_count;
201# endif 201# endif
202#endif 202#endif
203#ifdef CONFIG_X86_NEW_MCE 203#ifdef CONFIG_X86_MCE
204 sum += per_cpu(mce_exception_count, cpu); 204 sum += per_cpu(mce_exception_count, cpu);
205 sum += per_cpu(mce_poll_count, cpu); 205 sum += per_cpu(mce_poll_count, cpu);
206#endif 206#endif
diff --git a/arch/x86/kernel/irqinit.c b/arch/x86/kernel/irqinit.c
index 92b7703d3d58..40f30773fb29 100644
--- a/arch/x86/kernel/irqinit.c
+++ b/arch/x86/kernel/irqinit.c
@@ -116,7 +116,7 @@ int vector_used_by_percpu_irq(unsigned int vector)
116 return 0; 116 return 0;
117} 117}
118 118
119static void __init init_ISA_irqs(void) 119void __init init_ISA_irqs(void)
120{ 120{
121 int i; 121 int i;
122 122
@@ -140,8 +140,10 @@ static void __init init_ISA_irqs(void)
140 } 140 }
141} 141}
142 142
143/* Overridden in paravirt.c */ 143void __init init_IRQ(void)
144void init_IRQ(void) __attribute__((weak, alias("native_init_IRQ"))); 144{
145 x86_init.irqs.intr_init();
146}
145 147
146static void __init smp_intr_init(void) 148static void __init smp_intr_init(void)
147{ 149{
@@ -190,7 +192,7 @@ static void __init apic_intr_init(void)
190#ifdef CONFIG_X86_MCE_THRESHOLD 192#ifdef CONFIG_X86_MCE_THRESHOLD
191 alloc_intr_gate(THRESHOLD_APIC_VECTOR, threshold_interrupt); 193 alloc_intr_gate(THRESHOLD_APIC_VECTOR, threshold_interrupt);
192#endif 194#endif
193#if defined(CONFIG_X86_NEW_MCE) && defined(CONFIG_X86_LOCAL_APIC) 195#if defined(CONFIG_X86_MCE) && defined(CONFIG_X86_LOCAL_APIC)
194 alloc_intr_gate(MCE_SELF_VECTOR, mce_self_interrupt); 196 alloc_intr_gate(MCE_SELF_VECTOR, mce_self_interrupt);
195#endif 197#endif
196 198
@@ -206,39 +208,19 @@ static void __init apic_intr_init(void)
206 alloc_intr_gate(ERROR_APIC_VECTOR, error_interrupt); 208 alloc_intr_gate(ERROR_APIC_VECTOR, error_interrupt);
207 209
208 /* Performance monitoring interrupts: */ 210 /* Performance monitoring interrupts: */
209# ifdef CONFIG_PERF_COUNTERS 211# ifdef CONFIG_PERF_EVENTS
210 alloc_intr_gate(LOCAL_PENDING_VECTOR, perf_pending_interrupt); 212 alloc_intr_gate(LOCAL_PENDING_VECTOR, perf_pending_interrupt);
211# endif 213# endif
212 214
213#endif 215#endif
214} 216}
215 217
216/**
217 * x86_quirk_pre_intr_init - initialisation prior to setting up interrupt vectors
218 *
219 * Description:
220 * Perform any necessary interrupt initialisation prior to setting up
221 * the "ordinary" interrupt call gates. For legacy reasons, the ISA
222 * interrupts should be initialised here if the machine emulates a PC
223 * in any way.
224 **/
225static void __init x86_quirk_pre_intr_init(void)
226{
227#ifdef CONFIG_X86_32
228 if (x86_quirks->arch_pre_intr_init) {
229 if (x86_quirks->arch_pre_intr_init())
230 return;
231 }
232#endif
233 init_ISA_irqs();
234}
235
236void __init native_init_IRQ(void) 218void __init native_init_IRQ(void)
237{ 219{
238 int i; 220 int i;
239 221
240 /* Execute any quirks before the call gates are initialised: */ 222 /* Execute any quirks before the call gates are initialised: */
241 x86_quirk_pre_intr_init(); 223 x86_init.irqs.pre_vector_init();
242 224
243 apic_intr_init(); 225 apic_intr_init();
244 226
@@ -258,12 +240,6 @@ void __init native_init_IRQ(void)
258 240
259#ifdef CONFIG_X86_32 241#ifdef CONFIG_X86_32
260 /* 242 /*
261 * Call quirks after call gates are initialised (usually add in
262 * the architecture specific gates):
263 */
264 x86_quirk_intr_init();
265
266 /*
267 * External FPU? Set up irq13 if so, for 243 * External FPU? Set up irq13 if so, for
268 * original braindamaged IBM FERR coupling. 244 * original braindamaged IBM FERR coupling.
269 */ 245 */
diff --git a/arch/x86/kernel/kvmclock.c b/arch/x86/kernel/kvmclock.c
index e5efcdcca31b..feaeb0d3aa4f 100644
--- a/arch/x86/kernel/kvmclock.c
+++ b/arch/x86/kernel/kvmclock.c
@@ -22,6 +22,8 @@
22#include <asm/msr.h> 22#include <asm/msr.h>
23#include <asm/apic.h> 23#include <asm/apic.h>
24#include <linux/percpu.h> 24#include <linux/percpu.h>
25
26#include <asm/x86_init.h>
25#include <asm/reboot.h> 27#include <asm/reboot.h>
26 28
27#define KVM_SCALE 22 29#define KVM_SCALE 22
@@ -182,12 +184,13 @@ void __init kvmclock_init(void)
182 if (kvmclock && kvm_para_has_feature(KVM_FEATURE_CLOCKSOURCE)) { 184 if (kvmclock && kvm_para_has_feature(KVM_FEATURE_CLOCKSOURCE)) {
183 if (kvm_register_clock("boot clock")) 185 if (kvm_register_clock("boot clock"))
184 return; 186 return;
185 pv_time_ops.get_wallclock = kvm_get_wallclock;
186 pv_time_ops.set_wallclock = kvm_set_wallclock;
187 pv_time_ops.sched_clock = kvm_clock_read; 187 pv_time_ops.sched_clock = kvm_clock_read;
188 pv_time_ops.get_tsc_khz = kvm_get_tsc_khz; 188 x86_platform.calibrate_tsc = kvm_get_tsc_khz;
189 x86_platform.get_wallclock = kvm_get_wallclock;
190 x86_platform.set_wallclock = kvm_set_wallclock;
189#ifdef CONFIG_X86_LOCAL_APIC 191#ifdef CONFIG_X86_LOCAL_APIC
190 pv_apic_ops.setup_secondary_clock = kvm_setup_secondary_clock; 192 x86_cpuinit.setup_percpu_clockev =
193 kvm_setup_secondary_clock;
191#endif 194#endif
192#ifdef CONFIG_SMP 195#ifdef CONFIG_SMP
193 smp_ops.smp_prepare_boot_cpu = kvm_smp_prepare_boot_cpu; 196 smp_ops.smp_prepare_boot_cpu = kvm_smp_prepare_boot_cpu;
diff --git a/arch/x86/kernel/ldt.c b/arch/x86/kernel/ldt.c
index 71f1d99a635d..ec6ef60cbd17 100644
--- a/arch/x86/kernel/ldt.c
+++ b/arch/x86/kernel/ldt.c
@@ -67,8 +67,8 @@ static int alloc_ldt(mm_context_t *pc, int mincount, int reload)
67#ifdef CONFIG_SMP 67#ifdef CONFIG_SMP
68 preempt_disable(); 68 preempt_disable();
69 load_LDT(pc); 69 load_LDT(pc);
70 if (!cpus_equal(current->mm->cpu_vm_mask, 70 if (!cpumask_equal(mm_cpumask(current->mm),
71 cpumask_of_cpu(smp_processor_id()))) 71 cpumask_of(smp_processor_id())))
72 smp_call_function(flush_ldt, current->mm, 1); 72 smp_call_function(flush_ldt, current->mm, 1);
73 preempt_enable(); 73 preempt_enable();
74#else 74#else
diff --git a/arch/x86/kernel/microcode_core.c b/arch/x86/kernel/microcode_core.c
index 9371448290ac..378e9a8f1bf8 100644
--- a/arch/x86/kernel/microcode_core.c
+++ b/arch/x86/kernel/microcode_core.c
@@ -210,8 +210,8 @@ static ssize_t microcode_write(struct file *file, const char __user *buf,
210{ 210{
211 ssize_t ret = -EINVAL; 211 ssize_t ret = -EINVAL;
212 212
213 if ((len >> PAGE_SHIFT) > num_physpages) { 213 if ((len >> PAGE_SHIFT) > totalram_pages) {
214 pr_err("microcode: too much data (max %ld pages)\n", num_physpages); 214 pr_err("microcode: too much data (max %ld pages)\n", totalram_pages);
215 return ret; 215 return ret;
216 } 216 }
217 217
@@ -236,7 +236,7 @@ static const struct file_operations microcode_fops = {
236static struct miscdevice microcode_dev = { 236static struct miscdevice microcode_dev = {
237 .minor = MICROCODE_MINOR, 237 .minor = MICROCODE_MINOR,
238 .name = "microcode", 238 .name = "microcode",
239 .devnode = "cpu/microcode", 239 .nodename = "cpu/microcode",
240 .fops = &microcode_fops, 240 .fops = &microcode_fops,
241}; 241};
242 242
diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c
index fcd513bf2846..5be95ef4ffec 100644
--- a/arch/x86/kernel/mpparse.c
+++ b/arch/x86/kernel/mpparse.c
@@ -45,6 +45,11 @@ static int __init mpf_checksum(unsigned char *mp, int len)
45 return sum & 0xFF; 45 return sum & 0xFF;
46} 46}
47 47
48int __init default_mpc_apic_id(struct mpc_cpu *m)
49{
50 return m->apicid;
51}
52
48static void __init MP_processor_info(struct mpc_cpu *m) 53static void __init MP_processor_info(struct mpc_cpu *m)
49{ 54{
50 int apicid; 55 int apicid;
@@ -55,10 +60,7 @@ static void __init MP_processor_info(struct mpc_cpu *m)
55 return; 60 return;
56 } 61 }
57 62
58 if (x86_quirks->mpc_apic_id) 63 apicid = x86_init.mpparse.mpc_apic_id(m);
59 apicid = x86_quirks->mpc_apic_id(m);
60 else
61 apicid = m->apicid;
62 64
63 if (m->cpuflag & CPU_BOOTPROCESSOR) { 65 if (m->cpuflag & CPU_BOOTPROCESSOR) {
64 bootup_cpu = " (Bootup-CPU)"; 66 bootup_cpu = " (Bootup-CPU)";
@@ -70,16 +72,18 @@ static void __init MP_processor_info(struct mpc_cpu *m)
70} 72}
71 73
72#ifdef CONFIG_X86_IO_APIC 74#ifdef CONFIG_X86_IO_APIC
73static void __init MP_bus_info(struct mpc_bus *m) 75void __init default_mpc_oem_bus_info(struct mpc_bus *m, char *str)
74{ 76{
75 char str[7];
76 memcpy(str, m->bustype, 6); 77 memcpy(str, m->bustype, 6);
77 str[6] = 0; 78 str[6] = 0;
79 apic_printk(APIC_VERBOSE, "Bus #%d is %s\n", m->busid, str);
80}
78 81
79 if (x86_quirks->mpc_oem_bus_info) 82static void __init MP_bus_info(struct mpc_bus *m)
80 x86_quirks->mpc_oem_bus_info(m, str); 83{
81 else 84 char str[7];
82 apic_printk(APIC_VERBOSE, "Bus #%d is %s\n", m->busid, str); 85
86 x86_init.mpparse.mpc_oem_bus_info(m, str);
83 87
84#if MAX_MP_BUSSES < 256 88#if MAX_MP_BUSSES < 256
85 if (m->busid >= MAX_MP_BUSSES) { 89 if (m->busid >= MAX_MP_BUSSES) {
@@ -96,8 +100,8 @@ static void __init MP_bus_info(struct mpc_bus *m)
96 mp_bus_id_to_type[m->busid] = MP_BUS_ISA; 100 mp_bus_id_to_type[m->busid] = MP_BUS_ISA;
97#endif 101#endif
98 } else if (strncmp(str, BUSTYPE_PCI, sizeof(BUSTYPE_PCI) - 1) == 0) { 102 } else if (strncmp(str, BUSTYPE_PCI, sizeof(BUSTYPE_PCI) - 1) == 0) {
99 if (x86_quirks->mpc_oem_pci_bus) 103 if (x86_init.mpparse.mpc_oem_pci_bus)
100 x86_quirks->mpc_oem_pci_bus(m); 104 x86_init.mpparse.mpc_oem_pci_bus(m);
101 105
102 clear_bit(m->busid, mp_bus_not_pci); 106 clear_bit(m->busid, mp_bus_not_pci);
103#if defined(CONFIG_EISA) || defined(CONFIG_MCA) 107#if defined(CONFIG_EISA) || defined(CONFIG_MCA)
@@ -291,6 +295,8 @@ static void __init smp_dump_mptable(struct mpc_table *mpc, unsigned char *mpt)
291 1, mpc, mpc->length, 1); 295 1, mpc, mpc->length, 1);
292} 296}
293 297
298void __init default_smp_read_mpc_oem(struct mpc_table *mpc) { }
299
294static int __init smp_read_mpc(struct mpc_table *mpc, unsigned early) 300static int __init smp_read_mpc(struct mpc_table *mpc, unsigned early)
295{ 301{
296 char str[16]; 302 char str[16];
@@ -312,16 +318,13 @@ static int __init smp_read_mpc(struct mpc_table *mpc, unsigned early)
312 if (early) 318 if (early)
313 return 1; 319 return 1;
314 320
315 if (mpc->oemptr && x86_quirks->smp_read_mpc_oem) { 321 if (mpc->oemptr)
316 struct mpc_oemtable *oem_table = (void *)(long)mpc->oemptr; 322 x86_init.mpparse.smp_read_mpc_oem(mpc);
317 x86_quirks->smp_read_mpc_oem(oem_table, mpc->oemsize);
318 }
319 323
320 /* 324 /*
321 * Now process the configuration blocks. 325 * Now process the configuration blocks.
322 */ 326 */
323 if (x86_quirks->mpc_record) 327 x86_init.mpparse.mpc_record(0);
324 *x86_quirks->mpc_record = 0;
325 328
326 while (count < mpc->length) { 329 while (count < mpc->length) {
327 switch (*mpt) { 330 switch (*mpt) {
@@ -353,8 +356,7 @@ static int __init smp_read_mpc(struct mpc_table *mpc, unsigned early)
353 count = mpc->length; 356 count = mpc->length;
354 break; 357 break;
355 } 358 }
356 if (x86_quirks->mpc_record) 359 x86_init.mpparse.mpc_record(1);
357 (*x86_quirks->mpc_record)++;
358 } 360 }
359 361
360#ifdef CONFIG_X86_BIGSMP 362#ifdef CONFIG_X86_BIGSMP
@@ -608,7 +610,7 @@ static int __init check_physptr(struct mpf_intel *mpf, unsigned int early)
608/* 610/*
609 * Scan the memory blocks for an SMP configuration block. 611 * Scan the memory blocks for an SMP configuration block.
610 */ 612 */
611static void __init __get_smp_config(unsigned int early) 613void __init default_get_smp_config(unsigned int early)
612{ 614{
613 struct mpf_intel *mpf = mpf_found; 615 struct mpf_intel *mpf = mpf_found;
614 616
@@ -625,11 +627,6 @@ static void __init __get_smp_config(unsigned int early)
625 if (acpi_lapic && acpi_ioapic) 627 if (acpi_lapic && acpi_ioapic)
626 return; 628 return;
627 629
628 if (x86_quirks->mach_get_smp_config) {
629 if (x86_quirks->mach_get_smp_config(early))
630 return;
631 }
632
633 printk(KERN_INFO "Intel MultiProcessor Specification v1.%d\n", 630 printk(KERN_INFO "Intel MultiProcessor Specification v1.%d\n",
634 mpf->specification); 631 mpf->specification);
635#if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86_32) 632#if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86_32)
@@ -670,16 +667,6 @@ static void __init __get_smp_config(unsigned int early)
670 */ 667 */
671} 668}
672 669
673void __init early_get_smp_config(void)
674{
675 __get_smp_config(1);
676}
677
678void __init get_smp_config(void)
679{
680 __get_smp_config(0);
681}
682
683static void __init smp_reserve_bootmem(struct mpf_intel *mpf) 670static void __init smp_reserve_bootmem(struct mpf_intel *mpf)
684{ 671{
685 unsigned long size = get_mpc_size(mpf->physptr); 672 unsigned long size = get_mpc_size(mpf->physptr);
@@ -745,14 +732,10 @@ static int __init smp_scan_config(unsigned long base, unsigned long length,
745 return 0; 732 return 0;
746} 733}
747 734
748static void __init __find_smp_config(unsigned int reserve) 735void __init default_find_smp_config(unsigned int reserve)
749{ 736{
750 unsigned int address; 737 unsigned int address;
751 738
752 if (x86_quirks->mach_find_smp_config) {
753 if (x86_quirks->mach_find_smp_config(reserve))
754 return;
755 }
756 /* 739 /*
757 * FIXME: Linux assumes you have 640K of base ram.. 740 * FIXME: Linux assumes you have 640K of base ram..
758 * this continues the error... 741 * this continues the error...
@@ -787,16 +770,6 @@ static void __init __find_smp_config(unsigned int reserve)
787 smp_scan_config(address, 0x400, reserve); 770 smp_scan_config(address, 0x400, reserve);
788} 771}
789 772
790void __init early_find_smp_config(void)
791{
792 __find_smp_config(0);
793}
794
795void __init find_smp_config(void)
796{
797 __find_smp_config(1);
798}
799
800#ifdef CONFIG_X86_IO_APIC 773#ifdef CONFIG_X86_IO_APIC
801static u8 __initdata irq_used[MAX_IRQ_SOURCES]; 774static u8 __initdata irq_used[MAX_IRQ_SOURCES];
802 775
diff --git a/arch/x86/kernel/mrst.c b/arch/x86/kernel/mrst.c
new file mode 100644
index 000000000000..3b7078abc871
--- /dev/null
+++ b/arch/x86/kernel/mrst.c
@@ -0,0 +1,24 @@
1/*
2 * mrst.c: Intel Moorestown platform specific setup code
3 *
4 * (C) Copyright 2008 Intel Corporation
5 * Author: Jacob Pan (jacob.jun.pan@intel.com)
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; version 2
10 * of the License.
11 */
12#include <linux/init.h>
13
14#include <asm/setup.h>
15
16/*
17 * Moorestown specific x86_init function overrides and early setup
18 * calls.
19 */
20void __init x86_mrst_early_setup(void)
21{
22 x86_init.resources.probe_roms = x86_init_noop;
23 x86_init.resources.reserve_resources = x86_init_noop;
24}
diff --git a/arch/x86/kernel/msr.c b/arch/x86/kernel/msr.c
index 7dd950094178..6a3cefc7dda1 100644
--- a/arch/x86/kernel/msr.c
+++ b/arch/x86/kernel/msr.c
@@ -241,7 +241,7 @@ static struct notifier_block __refdata msr_class_cpu_notifier = {
241 .notifier_call = msr_class_cpu_callback, 241 .notifier_call = msr_class_cpu_callback,
242}; 242};
243 243
244static char *msr_nodename(struct device *dev) 244static char *msr_devnode(struct device *dev, mode_t *mode)
245{ 245{
246 return kasprintf(GFP_KERNEL, "cpu/%u/msr", MINOR(dev->devt)); 246 return kasprintf(GFP_KERNEL, "cpu/%u/msr", MINOR(dev->devt));
247} 247}
@@ -262,7 +262,7 @@ static int __init msr_init(void)
262 err = PTR_ERR(msr_class); 262 err = PTR_ERR(msr_class);
263 goto out_chrdev; 263 goto out_chrdev;
264 } 264 }
265 msr_class->nodename = msr_nodename; 265 msr_class->devnode = msr_devnode;
266 for_each_online_cpu(i) { 266 for_each_online_cpu(i) {
267 err = msr_device_create(i); 267 err = msr_device_create(i);
268 if (err != 0) 268 if (err != 0)
diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c
index f5b0b4a01fb2..1b1739d16310 100644
--- a/arch/x86/kernel/paravirt.c
+++ b/arch/x86/kernel/paravirt.c
@@ -54,17 +54,12 @@ u64 _paravirt_ident_64(u64 x)
54 return x; 54 return x;
55} 55}
56 56
57static void __init default_banner(void) 57void __init default_banner(void)
58{ 58{
59 printk(KERN_INFO "Booting paravirtualized kernel on %s\n", 59 printk(KERN_INFO "Booting paravirtualized kernel on %s\n",
60 pv_info.name); 60 pv_info.name);
61} 61}
62 62
63char *memory_setup(void)
64{
65 return pv_init_ops.memory_setup();
66}
67
68/* Simple instruction patching code. */ 63/* Simple instruction patching code. */
69#define DEF_NATIVE(ops, name, code) \ 64#define DEF_NATIVE(ops, name, code) \
70 extern const char start_##ops##_##name[], end_##ops##_##name[]; \ 65 extern const char start_##ops##_##name[], end_##ops##_##name[]; \
@@ -188,11 +183,6 @@ unsigned paravirt_patch_insns(void *insnbuf, unsigned len,
188 return insn_len; 183 return insn_len;
189} 184}
190 185
191void init_IRQ(void)
192{
193 pv_irq_ops.init_IRQ();
194}
195
196static void native_flush_tlb(void) 186static void native_flush_tlb(void)
197{ 187{
198 __native_flush_tlb(); 188 __native_flush_tlb();
@@ -218,13 +208,6 @@ extern void native_irq_enable_sysexit(void);
218extern void native_usergs_sysret32(void); 208extern void native_usergs_sysret32(void);
219extern void native_usergs_sysret64(void); 209extern void native_usergs_sysret64(void);
220 210
221static int __init print_banner(void)
222{
223 pv_init_ops.banner();
224 return 0;
225}
226core_initcall(print_banner);
227
228static struct resource reserve_ioports = { 211static struct resource reserve_ioports = {
229 .start = 0, 212 .start = 0,
230 .end = IO_SPACE_LIMIT, 213 .end = IO_SPACE_LIMIT,
@@ -320,21 +303,13 @@ struct pv_info pv_info = {
320 303
321struct pv_init_ops pv_init_ops = { 304struct pv_init_ops pv_init_ops = {
322 .patch = native_patch, 305 .patch = native_patch,
323 .banner = default_banner,
324 .arch_setup = paravirt_nop,
325 .memory_setup = machine_specific_memory_setup,
326}; 306};
327 307
328struct pv_time_ops pv_time_ops = { 308struct pv_time_ops pv_time_ops = {
329 .time_init = hpet_time_init,
330 .get_wallclock = native_get_wallclock,
331 .set_wallclock = native_set_wallclock,
332 .sched_clock = native_sched_clock, 309 .sched_clock = native_sched_clock,
333 .get_tsc_khz = native_calibrate_tsc,
334}; 310};
335 311
336struct pv_irq_ops pv_irq_ops = { 312struct pv_irq_ops pv_irq_ops = {
337 .init_IRQ = native_init_IRQ,
338 .save_fl = __PV_IS_CALLEE_SAVE(native_save_fl), 313 .save_fl = __PV_IS_CALLEE_SAVE(native_save_fl),
339 .restore_fl = __PV_IS_CALLEE_SAVE(native_restore_fl), 314 .restore_fl = __PV_IS_CALLEE_SAVE(native_restore_fl),
340 .irq_disable = __PV_IS_CALLEE_SAVE(native_irq_disable), 315 .irq_disable = __PV_IS_CALLEE_SAVE(native_irq_disable),
@@ -409,8 +384,6 @@ struct pv_cpu_ops pv_cpu_ops = {
409 384
410struct pv_apic_ops pv_apic_ops = { 385struct pv_apic_ops pv_apic_ops = {
411#ifdef CONFIG_X86_LOCAL_APIC 386#ifdef CONFIG_X86_LOCAL_APIC
412 .setup_boot_clock = setup_boot_APIC_clock,
413 .setup_secondary_clock = setup_secondary_APIC_clock,
414 .startup_ipi_hook = paravirt_nop, 387 .startup_ipi_hook = paravirt_nop,
415#endif 388#endif
416}; 389};
@@ -424,13 +397,6 @@ struct pv_apic_ops pv_apic_ops = {
424#endif 397#endif
425 398
426struct pv_mmu_ops pv_mmu_ops = { 399struct pv_mmu_ops pv_mmu_ops = {
427#ifndef CONFIG_X86_64
428 .pagetable_setup_start = native_pagetable_setup_start,
429 .pagetable_setup_done = native_pagetable_setup_done,
430#else
431 .pagetable_setup_start = paravirt_nop,
432 .pagetable_setup_done = paravirt_nop,
433#endif
434 400
435 .read_cr2 = native_read_cr2, 401 .read_cr2 = native_read_cr2,
436 .write_cr2 = native_write_cr2, 402 .write_cr2 = native_write_cr2,
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
index d71c8655905b..64b838eac18c 100644
--- a/arch/x86/kernel/pci-dma.c
+++ b/arch/x86/kernel/pci-dma.c
@@ -225,10 +225,8 @@ static __init int iommu_setup(char *p)
225 if (!strncmp(p, "soft", 4)) 225 if (!strncmp(p, "soft", 4))
226 swiotlb = 1; 226 swiotlb = 1;
227#endif 227#endif
228 if (!strncmp(p, "pt", 2)) { 228 if (!strncmp(p, "pt", 2))
229 iommu_pass_through = 1; 229 iommu_pass_through = 1;
230 return 1;
231 }
232 230
233 gart_parse_options(p); 231 gart_parse_options(p);
234 232
diff --git a/arch/x86/kernel/pci-swiotlb.c b/arch/x86/kernel/pci-swiotlb.c
index e8a35016115f..aaa6b7839f1e 100644
--- a/arch/x86/kernel/pci-swiotlb.c
+++ b/arch/x86/kernel/pci-swiotlb.c
@@ -46,9 +46,8 @@ void __init pci_swiotlb_init(void)
46{ 46{
47 /* don't initialize swiotlb if iommu=off (no_iommu=1) */ 47 /* don't initialize swiotlb if iommu=off (no_iommu=1) */
48#ifdef CONFIG_X86_64 48#ifdef CONFIG_X86_64
49 if ((!iommu_detected && !no_iommu && max_pfn > MAX_DMA32_PFN) || 49 if ((!iommu_detected && !no_iommu && max_pfn > MAX_DMA32_PFN))
50 iommu_pass_through) 50 swiotlb = 1;
51 swiotlb = 1;
52#endif 51#endif
53 if (swiotlb_force) 52 if (swiotlb_force)
54 swiotlb = 1; 53 swiotlb = 1;
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index 071166a4ba83..5284cd2b5776 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -9,7 +9,7 @@
9#include <linux/pm.h> 9#include <linux/pm.h>
10#include <linux/clockchips.h> 10#include <linux/clockchips.h>
11#include <linux/random.h> 11#include <linux/random.h>
12#include <trace/power.h> 12#include <trace/events/power.h>
13#include <asm/system.h> 13#include <asm/system.h>
14#include <asm/apic.h> 14#include <asm/apic.h>
15#include <asm/syscalls.h> 15#include <asm/syscalls.h>
@@ -25,9 +25,6 @@ EXPORT_SYMBOL(idle_nomwait);
25 25
26struct kmem_cache *task_xstate_cachep; 26struct kmem_cache *task_xstate_cachep;
27 27
28DEFINE_TRACE(power_start);
29DEFINE_TRACE(power_end);
30
31int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src) 28int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
32{ 29{
33 *dst = *src; 30 *dst = *src;
@@ -299,9 +296,7 @@ static inline int hlt_use_halt(void)
299void default_idle(void) 296void default_idle(void)
300{ 297{
301 if (hlt_use_halt()) { 298 if (hlt_use_halt()) {
302 struct power_trace it; 299 trace_power_start(POWER_CSTATE, 1);
303
304 trace_power_start(&it, POWER_CSTATE, 1);
305 current_thread_info()->status &= ~TS_POLLING; 300 current_thread_info()->status &= ~TS_POLLING;
306 /* 301 /*
307 * TS_POLLING-cleared state must be visible before we 302 * TS_POLLING-cleared state must be visible before we
@@ -314,7 +309,6 @@ void default_idle(void)
314 else 309 else
315 local_irq_enable(); 310 local_irq_enable();
316 current_thread_info()->status |= TS_POLLING; 311 current_thread_info()->status |= TS_POLLING;
317 trace_power_end(&it);
318 } else { 312 } else {
319 local_irq_enable(); 313 local_irq_enable();
320 /* loop is done by the caller */ 314 /* loop is done by the caller */
@@ -372,9 +366,7 @@ EXPORT_SYMBOL_GPL(cpu_idle_wait);
372 */ 366 */
373void mwait_idle_with_hints(unsigned long ax, unsigned long cx) 367void mwait_idle_with_hints(unsigned long ax, unsigned long cx)
374{ 368{
375 struct power_trace it; 369 trace_power_start(POWER_CSTATE, (ax>>4)+1);
376
377 trace_power_start(&it, POWER_CSTATE, (ax>>4)+1);
378 if (!need_resched()) { 370 if (!need_resched()) {
379 if (cpu_has(&current_cpu_data, X86_FEATURE_CLFLUSH_MONITOR)) 371 if (cpu_has(&current_cpu_data, X86_FEATURE_CLFLUSH_MONITOR))
380 clflush((void *)&current_thread_info()->flags); 372 clflush((void *)&current_thread_info()->flags);
@@ -384,15 +376,13 @@ void mwait_idle_with_hints(unsigned long ax, unsigned long cx)
384 if (!need_resched()) 376 if (!need_resched())
385 __mwait(ax, cx); 377 __mwait(ax, cx);
386 } 378 }
387 trace_power_end(&it);
388} 379}
389 380
390/* Default MONITOR/MWAIT with no hints, used for default C1 state */ 381/* Default MONITOR/MWAIT with no hints, used for default C1 state */
391static void mwait_idle(void) 382static void mwait_idle(void)
392{ 383{
393 struct power_trace it;
394 if (!need_resched()) { 384 if (!need_resched()) {
395 trace_power_start(&it, POWER_CSTATE, 1); 385 trace_power_start(POWER_CSTATE, 1);
396 if (cpu_has(&current_cpu_data, X86_FEATURE_CLFLUSH_MONITOR)) 386 if (cpu_has(&current_cpu_data, X86_FEATURE_CLFLUSH_MONITOR))
397 clflush((void *)&current_thread_info()->flags); 387 clflush((void *)&current_thread_info()->flags);
398 388
@@ -402,7 +392,6 @@ static void mwait_idle(void)
402 __sti_mwait(0, 0); 392 __sti_mwait(0, 0);
403 else 393 else
404 local_irq_enable(); 394 local_irq_enable();
405 trace_power_end(&it);
406 } else 395 } else
407 local_irq_enable(); 396 local_irq_enable();
408} 397}
@@ -414,13 +403,11 @@ static void mwait_idle(void)
414 */ 403 */
415static void poll_idle(void) 404static void poll_idle(void)
416{ 405{
417 struct power_trace it; 406 trace_power_start(POWER_CSTATE, 0);
418
419 trace_power_start(&it, POWER_CSTATE, 0);
420 local_irq_enable(); 407 local_irq_enable();
421 while (!need_resched()) 408 while (!need_resched())
422 cpu_relax(); 409 cpu_relax();
423 trace_power_end(&it); 410 trace_power_end(0);
424} 411}
425 412
426/* 413/*
@@ -568,10 +555,8 @@ void __cpuinit select_idle_routine(const struct cpuinfo_x86 *c)
568void __init init_c1e_mask(void) 555void __init init_c1e_mask(void)
569{ 556{
570 /* If we're using c1e_idle, we need to allocate c1e_mask. */ 557 /* If we're using c1e_idle, we need to allocate c1e_mask. */
571 if (pm_idle == c1e_idle) { 558 if (pm_idle == c1e_idle)
572 alloc_cpumask_var(&c1e_mask, GFP_KERNEL); 559 zalloc_cpumask_var(&c1e_mask, GFP_KERNEL);
573 cpumask_clear(c1e_mask);
574 }
575} 560}
576 561
577static int __init idle_setup(char *str) 562static int __init idle_setup(char *str)
diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c
index 8d7d5c9c1be3..7b058a2dc66a 100644
--- a/arch/x86/kernel/ptrace.c
+++ b/arch/x86/kernel/ptrace.c
@@ -325,16 +325,6 @@ static int putreg(struct task_struct *child,
325 return set_flags(child, value); 325 return set_flags(child, value);
326 326
327#ifdef CONFIG_X86_64 327#ifdef CONFIG_X86_64
328 /*
329 * Orig_ax is really just a flag with small positive and
330 * negative values, so make sure to always sign-extend it
331 * from 32 bits so that it works correctly regardless of
332 * whether we come from a 32-bit environment or not.
333 */
334 case offsetof(struct user_regs_struct, orig_ax):
335 value = (long) (s32) value;
336 break;
337
338 case offsetof(struct user_regs_struct,fs_base): 328 case offsetof(struct user_regs_struct,fs_base):
339 if (value >= TASK_SIZE_OF(child)) 329 if (value >= TASK_SIZE_OF(child))
340 return -EIO; 330 return -EIO;
@@ -1126,10 +1116,15 @@ static int putreg32(struct task_struct *child, unsigned regno, u32 value)
1126 1116
1127 case offsetof(struct user32, regs.orig_eax): 1117 case offsetof(struct user32, regs.orig_eax):
1128 /* 1118 /*
1129 * Sign-extend the value so that orig_eax = -1 1119 * A 32-bit debugger setting orig_eax means to restore
1130 * causes (long)orig_ax < 0 tests to fire correctly. 1120 * the state of the task restarting a 32-bit syscall.
1121 * Make sure we interpret the -ERESTART* codes correctly
1122 * in case the task is not actually still sitting at the
1123 * exit from a 32-bit syscall with TS_COMPAT still set.
1131 */ 1124 */
1132 regs->orig_ax = (long) (s32) value; 1125 regs->orig_ax = value;
1126 if (syscall_get_nr(child, regs) >= 0)
1127 task_thread_info(child)->status |= TS_COMPAT;
1133 break; 1128 break;
1134 1129
1135 case offsetof(struct user32, regs.eflags): 1130 case offsetof(struct user32, regs.eflags):
diff --git a/arch/x86/kernel/quirks.c b/arch/x86/kernel/quirks.c
index af71d06624bf..6c3b2c6fd772 100644
--- a/arch/x86/kernel/quirks.c
+++ b/arch/x86/kernel/quirks.c
@@ -508,7 +508,7 @@ static void __init quirk_amd_nb_node(struct pci_dev *dev)
508 508
509 pci_read_config_dword(nb_ht, 0x60, &val); 509 pci_read_config_dword(nb_ht, 0x60, &val);
510 set_dev_node(&dev->dev, val & 7); 510 set_dev_node(&dev->dev, val & 7);
511 pci_dev_put(dev); 511 pci_dev_put(nb_ht);
512} 512}
513 513
514DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_K8_NB, 514DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_K8_NB,
diff --git a/arch/x86/kernel/rtc.c b/arch/x86/kernel/rtc.c
index 5d465b207e72..1cfbbfc3ae26 100644
--- a/arch/x86/kernel/rtc.c
+++ b/arch/x86/kernel/rtc.c
@@ -8,6 +8,7 @@
8#include <linux/pnp.h> 8#include <linux/pnp.h>
9 9
10#include <asm/vsyscall.h> 10#include <asm/vsyscall.h>
11#include <asm/x86_init.h>
11#include <asm/time.h> 12#include <asm/time.h>
12 13
13#ifdef CONFIG_X86_32 14#ifdef CONFIG_X86_32
@@ -165,33 +166,29 @@ void rtc_cmos_write(unsigned char val, unsigned char addr)
165} 166}
166EXPORT_SYMBOL(rtc_cmos_write); 167EXPORT_SYMBOL(rtc_cmos_write);
167 168
168static int set_rtc_mmss(unsigned long nowtime) 169int update_persistent_clock(struct timespec now)
169{ 170{
170 unsigned long flags; 171 unsigned long flags;
171 int retval; 172 int retval;
172 173
173 spin_lock_irqsave(&rtc_lock, flags); 174 spin_lock_irqsave(&rtc_lock, flags);
174 retval = set_wallclock(nowtime); 175 retval = x86_platform.set_wallclock(now.tv_sec);
175 spin_unlock_irqrestore(&rtc_lock, flags); 176 spin_unlock_irqrestore(&rtc_lock, flags);
176 177
177 return retval; 178 return retval;
178} 179}
179 180
180/* not static: needed by APM */ 181/* not static: needed by APM */
181unsigned long read_persistent_clock(void) 182void read_persistent_clock(struct timespec *ts)
182{ 183{
183 unsigned long retval, flags; 184 unsigned long retval, flags;
184 185
185 spin_lock_irqsave(&rtc_lock, flags); 186 spin_lock_irqsave(&rtc_lock, flags);
186 retval = get_wallclock(); 187 retval = x86_platform.get_wallclock();
187 spin_unlock_irqrestore(&rtc_lock, flags); 188 spin_unlock_irqrestore(&rtc_lock, flags);
188 189
189 return retval; 190 ts->tv_sec = retval;
190} 191 ts->tv_nsec = 0;
191
192int update_persistent_clock(struct timespec now)
193{
194 return set_rtc_mmss(now.tv_sec);
195} 192}
196 193
197unsigned long long native_read_tsc(void) 194unsigned long long native_read_tsc(void)
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 19f15c4076fb..e09f0e2c14b5 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -27,6 +27,7 @@
27#include <linux/screen_info.h> 27#include <linux/screen_info.h>
28#include <linux/ioport.h> 28#include <linux/ioport.h>
29#include <linux/acpi.h> 29#include <linux/acpi.h>
30#include <linux/sfi.h>
30#include <linux/apm_bios.h> 31#include <linux/apm_bios.h>
31#include <linux/initrd.h> 32#include <linux/initrd.h>
32#include <linux/bootmem.h> 33#include <linux/bootmem.h>
@@ -109,10 +110,6 @@
109#include <asm/numa_64.h> 110#include <asm/numa_64.h>
110#endif 111#endif
111 112
112#ifndef ARCH_SETUP
113#define ARCH_SETUP
114#endif
115
116/* 113/*
117 * end_pfn only includes RAM, while max_pfn_mapped includes all e820 entries. 114 * end_pfn only includes RAM, while max_pfn_mapped includes all e820 entries.
118 * The direct mapping extends to max_pfn_mapped, so that we can directly access 115 * The direct mapping extends to max_pfn_mapped, so that we can directly access
@@ -134,9 +131,9 @@ int default_cpu_present_to_apicid(int mps_cpu)
134 return __default_cpu_present_to_apicid(mps_cpu); 131 return __default_cpu_present_to_apicid(mps_cpu);
135} 132}
136 133
137int default_check_phys_apicid_present(int boot_cpu_physical_apicid) 134int default_check_phys_apicid_present(int phys_apicid)
138{ 135{
139 return __default_check_phys_apicid_present(boot_cpu_physical_apicid); 136 return __default_check_phys_apicid_present(phys_apicid);
140} 137}
141#endif 138#endif
142 139
@@ -172,13 +169,6 @@ static struct resource bss_resource = {
172 169
173 170
174#ifdef CONFIG_X86_32 171#ifdef CONFIG_X86_32
175static struct resource video_ram_resource = {
176 .name = "Video RAM area",
177 .start = 0xa0000,
178 .end = 0xbffff,
179 .flags = IORESOURCE_BUSY | IORESOURCE_MEM
180};
181
182/* cpu data as detected by the assembly code in head.S */ 172/* cpu data as detected by the assembly code in head.S */
183struct cpuinfo_x86 new_cpu_data __cpuinitdata = {0, 0, 0, 0, -1, 1, 0, 0, -1}; 173struct cpuinfo_x86 new_cpu_data __cpuinitdata = {0, 0, 0, 0, -1, 1, 0, 0, -1};
184/* common cpu data for all cpus */ 174/* common cpu data for all cpus */
@@ -606,7 +596,7 @@ static struct resource standard_io_resources[] = {
606 .flags = IORESOURCE_BUSY | IORESOURCE_IO } 596 .flags = IORESOURCE_BUSY | IORESOURCE_IO }
607}; 597};
608 598
609static void __init reserve_standard_io_resources(void) 599void __init reserve_standard_io_resources(void)
610{ 600{
611 int i; 601 int i;
612 602
@@ -638,10 +628,6 @@ static int __init setup_elfcorehdr(char *arg)
638early_param("elfcorehdr", setup_elfcorehdr); 628early_param("elfcorehdr", setup_elfcorehdr);
639#endif 629#endif
640 630
641static struct x86_quirks default_x86_quirks __initdata;
642
643struct x86_quirks *x86_quirks __initdata = &default_x86_quirks;
644
645#ifdef CONFIG_X86_RESERVE_LOW_64K 631#ifdef CONFIG_X86_RESERVE_LOW_64K
646static int __init dmi_low_memory_corruption(const struct dmi_system_id *d) 632static int __init dmi_low_memory_corruption(const struct dmi_system_id *d)
647{ 633{
@@ -712,21 +698,6 @@ void __init setup_arch(char **cmdline_p)
712 printk(KERN_INFO "Command line: %s\n", boot_command_line); 698 printk(KERN_INFO "Command line: %s\n", boot_command_line);
713#endif 699#endif
714 700
715 strlcpy(command_line, boot_command_line, COMMAND_LINE_SIZE);
716 *cmdline_p = command_line;
717
718#ifdef CONFIG_X86_64
719 /*
720 * Must call this twice: Once just to detect whether hardware doesn't
721 * support NX (so that the early EHCI debug console setup can safely
722 * call set_fixmap(), and then again after parsing early parameters to
723 * honor the respective command line option.
724 */
725 check_efer();
726#endif
727
728 parse_early_param();
729
730 /* VMI may relocate the fixmap; do this before touching ioremap area */ 701 /* VMI may relocate the fixmap; do this before touching ioremap area */
731 vmi_init(); 702 vmi_init();
732 703
@@ -773,7 +744,7 @@ void __init setup_arch(char **cmdline_p)
773 } 744 }
774#endif 745#endif
775 746
776 ARCH_SETUP 747 x86_init.oem.arch_setup();
777 748
778 setup_memory_map(); 749 setup_memory_map();
779 parse_setup_data(); 750 parse_setup_data();
@@ -809,6 +780,21 @@ void __init setup_arch(char **cmdline_p)
809#endif 780#endif
810#endif 781#endif
811 782
783 strlcpy(command_line, boot_command_line, COMMAND_LINE_SIZE);
784 *cmdline_p = command_line;
785
786#ifdef CONFIG_X86_64
787 /*
788 * Must call this twice: Once just to detect whether hardware doesn't
789 * support NX (so that the early EHCI debug console setup can safely
790 * call set_fixmap(), and then again after parsing early parameters to
791 * honor the respective command line option.
792 */
793 check_efer();
794#endif
795
796 parse_early_param();
797
812#ifdef CONFIG_X86_64 798#ifdef CONFIG_X86_64
813 check_efer(); 799 check_efer();
814#endif 800#endif
@@ -844,11 +830,9 @@ void __init setup_arch(char **cmdline_p)
844 * VMware detection requires dmi to be available, so this 830 * VMware detection requires dmi to be available, so this
845 * needs to be done after dmi_scan_machine, for the BP. 831 * needs to be done after dmi_scan_machine, for the BP.
846 */ 832 */
847 init_hypervisor(&boot_cpu_data); 833 init_hypervisor_platform();
848 834
849#ifdef CONFIG_X86_32 835 x86_init.resources.probe_roms();
850 probe_roms();
851#endif
852 836
853 /* after parse_early_param, so could debug it */ 837 /* after parse_early_param, so could debug it */
854 insert_resource(&iomem_resource, &code_resource); 838 insert_resource(&iomem_resource, &code_resource);
@@ -983,10 +967,9 @@ void __init setup_arch(char **cmdline_p)
983 kvmclock_init(); 967 kvmclock_init();
984#endif 968#endif
985 969
986 paravirt_pagetable_setup_start(swapper_pg_dir); 970 x86_init.paging.pagetable_setup_start(swapper_pg_dir);
987 paging_init(); 971 paging_init();
988 paravirt_pagetable_setup_done(swapper_pg_dir); 972 x86_init.paging.pagetable_setup_done(swapper_pg_dir);
989 paravirt_post_allocator_init();
990 973
991 tboot_probe(); 974 tboot_probe();
992 975
@@ -1003,13 +986,13 @@ void __init setup_arch(char **cmdline_p)
1003 */ 986 */
1004 acpi_boot_init(); 987 acpi_boot_init();
1005 988
1006#if defined(CONFIG_X86_MPPARSE) || defined(CONFIG_X86_VISWS) 989 sfi_init();
990
1007 /* 991 /*
1008 * get boot-time SMP configuration: 992 * get boot-time SMP configuration:
1009 */ 993 */
1010 if (smp_found_config) 994 if (smp_found_config)
1011 get_smp_config(); 995 get_smp_config();
1012#endif
1013 996
1014 prefill_possible_map(); 997 prefill_possible_map();
1015 998
@@ -1028,10 +1011,7 @@ void __init setup_arch(char **cmdline_p)
1028 e820_reserve_resources(); 1011 e820_reserve_resources();
1029 e820_mark_nosave_regions(max_low_pfn); 1012 e820_mark_nosave_regions(max_low_pfn);
1030 1013
1031#ifdef CONFIG_X86_32 1014 x86_init.resources.reserve_resources();
1032 request_resource(&iomem_resource, &video_ram_resource);
1033#endif
1034 reserve_standard_io_resources();
1035 1015
1036 e820_setup_gap(); 1016 e820_setup_gap();
1037 1017
@@ -1043,78 +1023,22 @@ void __init setup_arch(char **cmdline_p)
1043 conswitchp = &dummy_con; 1023 conswitchp = &dummy_con;
1044#endif 1024#endif
1045#endif 1025#endif
1026 x86_init.oem.banner();
1046} 1027}
1047 1028
1048#ifdef CONFIG_X86_32 1029#ifdef CONFIG_X86_32
1049 1030
1050/** 1031static struct resource video_ram_resource = {
1051 * x86_quirk_intr_init - post gate setup interrupt initialisation 1032 .name = "Video RAM area",
1052 * 1033 .start = 0xa0000,
1053 * Description: 1034 .end = 0xbffff,
1054 * Fill in any interrupts that may have been left out by the general 1035 .flags = IORESOURCE_BUSY | IORESOURCE_MEM
1055 * init_IRQ() routine. interrupts having to do with the machine rather
1056 * than the devices on the I/O bus (like APIC interrupts in intel MP
1057 * systems) are started here.
1058 **/
1059void __init x86_quirk_intr_init(void)
1060{
1061 if (x86_quirks->arch_intr_init) {
1062 if (x86_quirks->arch_intr_init())
1063 return;
1064 }
1065}
1066
1067/**
1068 * x86_quirk_trap_init - initialise system specific traps
1069 *
1070 * Description:
1071 * Called as the final act of trap_init(). Used in VISWS to initialise
1072 * the various board specific APIC traps.
1073 **/
1074void __init x86_quirk_trap_init(void)
1075{
1076 if (x86_quirks->arch_trap_init) {
1077 if (x86_quirks->arch_trap_init())
1078 return;
1079 }
1080}
1081
1082static struct irqaction irq0 = {
1083 .handler = timer_interrupt,
1084 .flags = IRQF_DISABLED | IRQF_NOBALANCING | IRQF_IRQPOLL | IRQF_TIMER,
1085 .name = "timer"
1086}; 1036};
1087 1037
1088/** 1038void __init i386_reserve_resources(void)
1089 * x86_quirk_pre_time_init - do any specific initialisations before.
1090 *
1091 **/
1092void __init x86_quirk_pre_time_init(void)
1093{ 1039{
1094 if (x86_quirks->arch_pre_time_init) 1040 request_resource(&iomem_resource, &video_ram_resource);
1095 x86_quirks->arch_pre_time_init(); 1041 reserve_standard_io_resources();
1096} 1042}
1097 1043
1098/**
1099 * x86_quirk_time_init - do any specific initialisations for the system timer.
1100 *
1101 * Description:
1102 * Must plug the system timer interrupt source at HZ into the IRQ listed
1103 * in irq_vectors.h:TIMER_IRQ
1104 **/
1105void __init x86_quirk_time_init(void)
1106{
1107 if (x86_quirks->arch_time_init) {
1108 /*
1109 * A nonzero return code does not mean failure, it means
1110 * that the architecture quirk does not want any
1111 * generic (timer) setup to be performed after this:
1112 */
1113 if (x86_quirks->arch_time_init())
1114 return;
1115 }
1116
1117 irq0.mask = cpumask_of_cpu(0);
1118 setup_irq(0, &irq0);
1119}
1120#endif /* CONFIG_X86_32 */ 1044#endif /* CONFIG_X86_32 */
diff --git a/arch/x86/kernel/sfi.c b/arch/x86/kernel/sfi.c
new file mode 100644
index 000000000000..34e099382651
--- /dev/null
+++ b/arch/x86/kernel/sfi.c
@@ -0,0 +1,122 @@
1/*
2 * sfi.c - x86 architecture SFI support.
3 *
4 * Copyright (c) 2009, Intel Corporation.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License,
8 * version 2, as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 * more details.
14 *
15 * You should have received a copy of the GNU General Public License along with
16 * this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 */
20
21#define KMSG_COMPONENT "SFI"
22#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
23
24#include <linux/acpi.h>
25#include <linux/init.h>
26#include <linux/sfi.h>
27#include <linux/io.h>
28
29#include <asm/io_apic.h>
30#include <asm/mpspec.h>
31#include <asm/setup.h>
32#include <asm/apic.h>
33
34#ifdef CONFIG_X86_LOCAL_APIC
35static unsigned long sfi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE;
36
37void __init mp_sfi_register_lapic_address(unsigned long address)
38{
39 mp_lapic_addr = address;
40
41 set_fixmap_nocache(FIX_APIC_BASE, mp_lapic_addr);
42 if (boot_cpu_physical_apicid == -1U)
43 boot_cpu_physical_apicid = read_apic_id();
44
45 pr_info("Boot CPU = %d\n", boot_cpu_physical_apicid);
46}
47
48/* All CPUs enumerated by SFI must be present and enabled */
49void __cpuinit mp_sfi_register_lapic(u8 id)
50{
51 if (MAX_APICS - id <= 0) {
52 pr_warning("Processor #%d invalid (max %d)\n",
53 id, MAX_APICS);
54 return;
55 }
56
57 pr_info("registering lapic[%d]\n", id);
58
59 generic_processor_info(id, GET_APIC_VERSION(apic_read(APIC_LVR)));
60}
61
62static int __init sfi_parse_cpus(struct sfi_table_header *table)
63{
64 struct sfi_table_simple *sb;
65 struct sfi_cpu_table_entry *pentry;
66 int i;
67 int cpu_num;
68
69 sb = (struct sfi_table_simple *)table;
70 cpu_num = SFI_GET_NUM_ENTRIES(sb, struct sfi_cpu_table_entry);
71 pentry = (struct sfi_cpu_table_entry *)sb->pentry;
72
73 for (i = 0; i < cpu_num; i++) {
74 mp_sfi_register_lapic(pentry->apic_id);
75 pentry++;
76 }
77
78 smp_found_config = 1;
79 return 0;
80}
81#endif /* CONFIG_X86_LOCAL_APIC */
82
83#ifdef CONFIG_X86_IO_APIC
84static u32 gsi_base;
85
86static int __init sfi_parse_ioapic(struct sfi_table_header *table)
87{
88 struct sfi_table_simple *sb;
89 struct sfi_apic_table_entry *pentry;
90 int i, num;
91
92 sb = (struct sfi_table_simple *)table;
93 num = SFI_GET_NUM_ENTRIES(sb, struct sfi_apic_table_entry);
94 pentry = (struct sfi_apic_table_entry *)sb->pentry;
95
96 for (i = 0; i < num; i++) {
97 mp_register_ioapic(i, pentry->phys_addr, gsi_base);
98 gsi_base += io_apic_get_redir_entries(i);
99 pentry++;
100 }
101
102 WARN(pic_mode, KERN_WARNING
103 "SFI: pic_mod shouldn't be 1 when IOAPIC table is present\n");
104 pic_mode = 0;
105 return 0;
106}
107#endif /* CONFIG_X86_IO_APIC */
108
109/*
110 * sfi_platform_init(): register lapics & io-apics
111 */
112int __init sfi_platform_init(void)
113{
114#ifdef CONFIG_X86_LOCAL_APIC
115 mp_sfi_register_lapic_address(sfi_lapic_addr);
116 sfi_table_parse(SFI_SIG_CPUS, NULL, NULL, sfi_parse_cpus);
117#endif
118#ifdef CONFIG_X86_IO_APIC
119 sfi_table_parse(SFI_SIG_APIC, NULL, NULL, sfi_parse_ioapic);
120#endif
121 return 0;
122}
diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c
index 81e58238c4ce..6a44a76055ad 100644
--- a/arch/x86/kernel/signal.c
+++ b/arch/x86/kernel/signal.c
@@ -856,7 +856,7 @@ static void do_signal(struct pt_regs *regs)
856void 856void
857do_notify_resume(struct pt_regs *regs, void *unused, __u32 thread_info_flags) 857do_notify_resume(struct pt_regs *regs, void *unused, __u32 thread_info_flags)
858{ 858{
859#ifdef CONFIG_X86_NEW_MCE 859#ifdef CONFIG_X86_MCE
860 /* notify userspace of pending MCEs */ 860 /* notify userspace of pending MCEs */
861 if (thread_info_flags & _TIF_MCE_NOTIFY) 861 if (thread_info_flags & _TIF_MCE_NOTIFY)
862 mce_notify_process(); 862 mce_notify_process();
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index a25eeec00080..565ebc65920e 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -324,7 +324,7 @@ notrace static void __cpuinit start_secondary(void *unused)
324 /* enable local interrupts */ 324 /* enable local interrupts */
325 local_irq_enable(); 325 local_irq_enable();
326 326
327 setup_secondary_clock(); 327 x86_cpuinit.setup_percpu_clockev();
328 328
329 wmb(); 329 wmb();
330 cpu_idle(); 330 cpu_idle();
@@ -1059,12 +1059,9 @@ void __init native_smp_prepare_cpus(unsigned int max_cpus)
1059#endif 1059#endif
1060 current_thread_info()->cpu = 0; /* needed? */ 1060 current_thread_info()->cpu = 0; /* needed? */
1061 for_each_possible_cpu(i) { 1061 for_each_possible_cpu(i) {
1062 alloc_cpumask_var(&per_cpu(cpu_sibling_map, i), GFP_KERNEL); 1062 zalloc_cpumask_var(&per_cpu(cpu_sibling_map, i), GFP_KERNEL);
1063 alloc_cpumask_var(&per_cpu(cpu_core_map, i), GFP_KERNEL); 1063 zalloc_cpumask_var(&per_cpu(cpu_core_map, i), GFP_KERNEL);
1064 alloc_cpumask_var(&cpu_data(i).llc_shared_map, GFP_KERNEL); 1064 zalloc_cpumask_var(&cpu_data(i).llc_shared_map, GFP_KERNEL);
1065 cpumask_clear(per_cpu(cpu_core_map, i));
1066 cpumask_clear(per_cpu(cpu_sibling_map, i));
1067 cpumask_clear(cpu_data(i).llc_shared_map);
1068 } 1065 }
1069 set_cpu_sibling_map(0); 1066 set_cpu_sibling_map(0);
1070 1067
@@ -1114,7 +1111,7 @@ void __init native_smp_prepare_cpus(unsigned int max_cpus)
1114 1111
1115 printk(KERN_INFO "CPU%d: ", 0); 1112 printk(KERN_INFO "CPU%d: ", 0);
1116 print_cpu_info(&cpu_data(0)); 1113 print_cpu_info(&cpu_data(0));
1117 setup_boot_clock(); 1114 x86_init.timers.setup_percpu_clockev();
1118 1115
1119 if (is_uv_system()) 1116 if (is_uv_system())
1120 uv_system_init(); 1117 uv_system_init();
diff --git a/arch/x86/kernel/syscall_table_32.S b/arch/x86/kernel/syscall_table_32.S
index d51321ddafda..0157cd26d7cc 100644
--- a/arch/x86/kernel/syscall_table_32.S
+++ b/arch/x86/kernel/syscall_table_32.S
@@ -335,4 +335,4 @@ ENTRY(sys_call_table)
335 .long sys_preadv 335 .long sys_preadv
336 .long sys_pwritev 336 .long sys_pwritev
337 .long sys_rt_tgsigqueueinfo /* 335 */ 337 .long sys_rt_tgsigqueueinfo /* 335 */
338 .long sys_perf_counter_open 338 .long sys_perf_event_open
diff --git a/arch/x86/kernel/time.c b/arch/x86/kernel/time.c
new file mode 100644
index 000000000000..dcb00d278512
--- /dev/null
+++ b/arch/x86/kernel/time.c
@@ -0,0 +1,120 @@
1/*
2 * Copyright (c) 1991,1992,1995 Linus Torvalds
3 * Copyright (c) 1994 Alan Modra
4 * Copyright (c) 1995 Markus Kuhn
5 * Copyright (c) 1996 Ingo Molnar
6 * Copyright (c) 1998 Andrea Arcangeli
7 * Copyright (c) 2002,2006 Vojtech Pavlik
8 * Copyright (c) 2003 Andi Kleen
9 *
10 */
11
12#include <linux/clockchips.h>
13#include <linux/interrupt.h>
14#include <linux/time.h>
15#include <linux/mca.h>
16
17#include <asm/vsyscall.h>
18#include <asm/x86_init.h>
19#include <asm/i8259.h>
20#include <asm/i8253.h>
21#include <asm/timer.h>
22#include <asm/hpet.h>
23#include <asm/time.h>
24
25#if defined(CONFIG_X86_32) && defined(CONFIG_X86_IO_APIC)
26int timer_ack;
27#endif
28
29#ifdef CONFIG_X86_64
30volatile unsigned long __jiffies __section_jiffies = INITIAL_JIFFIES;
31#endif
32
33unsigned long profile_pc(struct pt_regs *regs)
34{
35 unsigned long pc = instruction_pointer(regs);
36
37 if (!user_mode_vm(regs) && in_lock_functions(pc)) {
38#ifdef CONFIG_FRAME_POINTER
39 return *(unsigned long *)(regs->bp + sizeof(long));
40#else
41 unsigned long *sp = (unsigned long *)regs->sp;
42 /*
43 * Return address is either directly at stack pointer
44 * or above a saved flags. Eflags has bits 22-31 zero,
45 * kernel addresses don't.
46 */
47 if (sp[0] >> 22)
48 return sp[0];
49 if (sp[1] >> 22)
50 return sp[1];
51#endif
52 }
53 return pc;
54}
55EXPORT_SYMBOL(profile_pc);
56
57/*
58 * Default timer interrupt handler for PIT/HPET
59 */
60static irqreturn_t timer_interrupt(int irq, void *dev_id)
61{
62 /* Keep nmi watchdog up to date */
63 inc_irq_stat(irq0_irqs);
64
65 /* Optimized out for !IO_APIC and x86_64 */
66 if (timer_ack) {
67 /*
68 * Subtle, when I/O APICs are used we have to ack timer IRQ
69 * manually to deassert NMI lines for the watchdog if run
70 * on an 82489DX-based system.
71 */
72 spin_lock(&i8259A_lock);
73 outb(0x0c, PIC_MASTER_OCW3);
74 /* Ack the IRQ; AEOI will end it automatically. */
75 inb(PIC_MASTER_POLL);
76 spin_unlock(&i8259A_lock);
77 }
78
79 global_clock_event->event_handler(global_clock_event);
80
81 /* MCA bus quirk: Acknowledge irq0 by setting bit 7 in port 0x61 */
82 if (MCA_bus)
83 outb_p(inb_p(0x61)| 0x80, 0x61);
84
85 return IRQ_HANDLED;
86}
87
88static struct irqaction irq0 = {
89 .handler = timer_interrupt,
90 .flags = IRQF_DISABLED | IRQF_NOBALANCING | IRQF_IRQPOLL | IRQF_TIMER,
91 .name = "timer"
92};
93
94void __init setup_default_timer_irq(void)
95{
96 setup_irq(0, &irq0);
97}
98
99/* Default timer init function */
100void __init hpet_time_init(void)
101{
102 if (!hpet_enable())
103 setup_pit_timer();
104 setup_default_timer_irq();
105}
106
107static __init void x86_late_time_init(void)
108{
109 x86_init.timers.timer_init();
110 tsc_init();
111}
112
113/*
114 * Initialize TSC and delay the periodic timer init to
115 * late x86_late_time_init() so ioremap works.
116 */
117void __init time_init(void)
118{
119 late_time_init = x86_late_time_init;
120}
diff --git a/arch/x86/kernel/time_32.c b/arch/x86/kernel/time_32.c
deleted file mode 100644
index 5c5d87f0b2e1..000000000000
--- a/arch/x86/kernel/time_32.c
+++ /dev/null
@@ -1,137 +0,0 @@
1/*
2 * Copyright (C) 1991, 1992, 1995 Linus Torvalds
3 *
4 * This file contains the PC-specific time handling details:
5 * reading the RTC at bootup, etc..
6 * 1994-07-02 Alan Modra
7 * fixed set_rtc_mmss, fixed time.year for >= 2000, new mktime
8 * 1995-03-26 Markus Kuhn
9 * fixed 500 ms bug at call to set_rtc_mmss, fixed DS12887
10 * precision CMOS clock update
11 * 1996-05-03 Ingo Molnar
12 * fixed time warps in do_[slow|fast]_gettimeoffset()
13 * 1997-09-10 Updated NTP code according to technical memorandum Jan '96
14 * "A Kernel Model for Precision Timekeeping" by Dave Mills
15 * 1998-09-05 (Various)
16 * More robust do_fast_gettimeoffset() algorithm implemented
17 * (works with APM, Cyrix 6x86MX and Centaur C6),
18 * monotonic gettimeofday() with fast_get_timeoffset(),
19 * drift-proof precision TSC calibration on boot
20 * (C. Scott Ananian <cananian@alumni.princeton.edu>, Andrew D.
21 * Balsa <andrebalsa@altern.org>, Philip Gladstone <philip@raptor.com>;
22 * ported from 2.0.35 Jumbo-9 by Michael Krause <m.krause@tu-harburg.de>).
23 * 1998-12-16 Andrea Arcangeli
24 * Fixed Jumbo-9 code in 2.1.131: do_gettimeofday was missing 1 jiffy
25 * because was not accounting lost_ticks.
26 * 1998-12-24 Copyright (C) 1998 Andrea Arcangeli
27 * Fixed a xtime SMP race (we need the xtime_lock rw spinlock to
28 * serialize accesses to xtime/lost_ticks).
29 */
30
31#include <linux/init.h>
32#include <linux/interrupt.h>
33#include <linux/time.h>
34#include <linux/mca.h>
35
36#include <asm/setup.h>
37#include <asm/hpet.h>
38#include <asm/time.h>
39#include <asm/timer.h>
40
41#include <asm/do_timer.h>
42
43int timer_ack;
44
45unsigned long profile_pc(struct pt_regs *regs)
46{
47 unsigned long pc = instruction_pointer(regs);
48
49#ifdef CONFIG_SMP
50 if (!user_mode_vm(regs) && in_lock_functions(pc)) {
51#ifdef CONFIG_FRAME_POINTER
52 return *(unsigned long *)(regs->bp + sizeof(long));
53#else
54 unsigned long *sp = (unsigned long *)&regs->sp;
55
56 /* Return address is either directly at stack pointer
57 or above a saved flags. Eflags has bits 22-31 zero,
58 kernel addresses don't. */
59 if (sp[0] >> 22)
60 return sp[0];
61 if (sp[1] >> 22)
62 return sp[1];
63#endif
64 }
65#endif
66 return pc;
67}
68EXPORT_SYMBOL(profile_pc);
69
70/*
71 * This is the same as the above, except we _also_ save the current
72 * Time Stamp Counter value at the time of the timer interrupt, so that
73 * we later on can estimate the time of day more exactly.
74 */
75irqreturn_t timer_interrupt(int irq, void *dev_id)
76{
77 /* Keep nmi watchdog up to date */
78 inc_irq_stat(irq0_irqs);
79
80#ifdef CONFIG_X86_IO_APIC
81 if (timer_ack) {
82 /*
83 * Subtle, when I/O APICs are used we have to ack timer IRQ
84 * manually to deassert NMI lines for the watchdog if run
85 * on an 82489DX-based system.
86 */
87 spin_lock(&i8259A_lock);
88 outb(0x0c, PIC_MASTER_OCW3);
89 /* Ack the IRQ; AEOI will end it automatically. */
90 inb(PIC_MASTER_POLL);
91 spin_unlock(&i8259A_lock);
92 }
93#endif
94
95 do_timer_interrupt_hook();
96
97#ifdef CONFIG_MCA
98 if (MCA_bus) {
99 /* The PS/2 uses level-triggered interrupts. You can't
100 turn them off, nor would you want to (any attempt to
101 enable edge-triggered interrupts usually gets intercepted by a
102 special hardware circuit). Hence we have to acknowledge
103 the timer interrupt. Through some incredibly stupid
104 design idea, the reset for IRQ 0 is done by setting the
105 high bit of the PPI port B (0x61). Note that some PS/2s,
106 notably the 55SX, work fine if this is removed. */
107
108 u8 irq_v = inb_p(0x61); /* read the current state */
109 outb_p(irq_v | 0x80, 0x61); /* reset the IRQ */
110 }
111#endif
112
113 return IRQ_HANDLED;
114}
115
116/* Duplicate of time_init() below, with hpet_enable part added */
117void __init hpet_time_init(void)
118{
119 if (!hpet_enable())
120 setup_pit_timer();
121 x86_quirk_time_init();
122}
123
124/*
125 * This is called directly from init code; we must delay timer setup in the
126 * HPET case as we can't make the decision to turn on HPET this early in the
127 * boot process.
128 *
129 * The chosen time_init function will usually be hpet_time_init, above, but
130 * in the case of virtual hardware, an alternative function may be substituted.
131 */
132void __init time_init(void)
133{
134 x86_quirk_pre_time_init();
135 tsc_init();
136 late_time_init = choose_time_init();
137}
diff --git a/arch/x86/kernel/time_64.c b/arch/x86/kernel/time_64.c
deleted file mode 100644
index 5ba343e61844..000000000000
--- a/arch/x86/kernel/time_64.c
+++ /dev/null
@@ -1,135 +0,0 @@
1/*
2 * "High Precision Event Timer" based timekeeping.
3 *
4 * Copyright (c) 1991,1992,1995 Linus Torvalds
5 * Copyright (c) 1994 Alan Modra
6 * Copyright (c) 1995 Markus Kuhn
7 * Copyright (c) 1996 Ingo Molnar
8 * Copyright (c) 1998 Andrea Arcangeli
9 * Copyright (c) 2002,2006 Vojtech Pavlik
10 * Copyright (c) 2003 Andi Kleen
11 * RTC support code taken from arch/i386/kernel/timers/time_hpet.c
12 */
13
14#include <linux/clockchips.h>
15#include <linux/init.h>
16#include <linux/interrupt.h>
17#include <linux/module.h>
18#include <linux/time.h>
19#include <linux/mca.h>
20#include <linux/nmi.h>
21
22#include <asm/i8253.h>
23#include <asm/hpet.h>
24#include <asm/vgtod.h>
25#include <asm/time.h>
26#include <asm/timer.h>
27
28volatile unsigned long __jiffies __section_jiffies = INITIAL_JIFFIES;
29
30unsigned long profile_pc(struct pt_regs *regs)
31{
32 unsigned long pc = instruction_pointer(regs);
33
34 /* Assume the lock function has either no stack frame or a copy
35 of flags from PUSHF
36 Eflags always has bits 22 and up cleared unlike kernel addresses. */
37 if (!user_mode_vm(regs) && in_lock_functions(pc)) {
38#ifdef CONFIG_FRAME_POINTER
39 return *(unsigned long *)(regs->bp + sizeof(long));
40#else
41 unsigned long *sp = (unsigned long *)regs->sp;
42 if (sp[0] >> 22)
43 return sp[0];
44 if (sp[1] >> 22)
45 return sp[1];
46#endif
47 }
48 return pc;
49}
50EXPORT_SYMBOL(profile_pc);
51
52static irqreturn_t timer_interrupt(int irq, void *dev_id)
53{
54 inc_irq_stat(irq0_irqs);
55
56 global_clock_event->event_handler(global_clock_event);
57
58#ifdef CONFIG_MCA
59 if (MCA_bus) {
60 u8 irq_v = inb_p(0x61); /* read the current state */
61 outb_p(irq_v|0x80, 0x61); /* reset the IRQ */
62 }
63#endif
64
65 return IRQ_HANDLED;
66}
67
68/* calibrate_cpu is used on systems with fixed rate TSCs to determine
69 * processor frequency */
70#define TICK_COUNT 100000000
71unsigned long __init calibrate_cpu(void)
72{
73 int tsc_start, tsc_now;
74 int i, no_ctr_free;
75 unsigned long evntsel3 = 0, pmc3 = 0, pmc_now = 0;
76 unsigned long flags;
77
78 for (i = 0; i < 4; i++)
79 if (avail_to_resrv_perfctr_nmi_bit(i))
80 break;
81 no_ctr_free = (i == 4);
82 if (no_ctr_free) {
83 WARN(1, KERN_WARNING "Warning: AMD perfctrs busy ... "
84 "cpu_khz value may be incorrect.\n");
85 i = 3;
86 rdmsrl(MSR_K7_EVNTSEL3, evntsel3);
87 wrmsrl(MSR_K7_EVNTSEL3, 0);
88 rdmsrl(MSR_K7_PERFCTR3, pmc3);
89 } else {
90 reserve_perfctr_nmi(MSR_K7_PERFCTR0 + i);
91 reserve_evntsel_nmi(MSR_K7_EVNTSEL0 + i);
92 }
93 local_irq_save(flags);
94 /* start measuring cycles, incrementing from 0 */
95 wrmsrl(MSR_K7_PERFCTR0 + i, 0);
96 wrmsrl(MSR_K7_EVNTSEL0 + i, 1 << 22 | 3 << 16 | 0x76);
97 rdtscl(tsc_start);
98 do {
99 rdmsrl(MSR_K7_PERFCTR0 + i, pmc_now);
100 tsc_now = get_cycles();
101 } while ((tsc_now - tsc_start) < TICK_COUNT);
102
103 local_irq_restore(flags);
104 if (no_ctr_free) {
105 wrmsrl(MSR_K7_EVNTSEL3, 0);
106 wrmsrl(MSR_K7_PERFCTR3, pmc3);
107 wrmsrl(MSR_K7_EVNTSEL3, evntsel3);
108 } else {
109 release_perfctr_nmi(MSR_K7_PERFCTR0 + i);
110 release_evntsel_nmi(MSR_K7_EVNTSEL0 + i);
111 }
112
113 return pmc_now * tsc_khz / (tsc_now - tsc_start);
114}
115
116static struct irqaction irq0 = {
117 .handler = timer_interrupt,
118 .flags = IRQF_DISABLED | IRQF_IRQPOLL | IRQF_NOBALANCING | IRQF_TIMER,
119 .name = "timer"
120};
121
122void __init hpet_time_init(void)
123{
124 if (!hpet_enable())
125 setup_pit_timer();
126
127 setup_irq(0, &irq0);
128}
129
130void __init time_init(void)
131{
132 tsc_init();
133
134 late_time_init = choose_time_init();
135}
diff --git a/arch/x86/kernel/trampoline.c b/arch/x86/kernel/trampoline.c
index 808031a5ba19..699f7eeb896a 100644
--- a/arch/x86/kernel/trampoline.c
+++ b/arch/x86/kernel/trampoline.c
@@ -4,7 +4,7 @@
4#include <asm/e820.h> 4#include <asm/e820.h>
5 5
6/* ready for x86_64 and x86 */ 6/* ready for x86_64 and x86 */
7unsigned char *trampoline_base = __va(TRAMPOLINE_BASE); 7unsigned char *__cpuinitdata trampoline_base = __va(TRAMPOLINE_BASE);
8 8
9void __init reserve_trampoline_memory(void) 9void __init reserve_trampoline_memory(void)
10{ 10{
@@ -26,7 +26,7 @@ void __init reserve_trampoline_memory(void)
26 * bootstrap into the page concerned. The caller 26 * bootstrap into the page concerned. The caller
27 * has made sure it's suitably aligned. 27 * has made sure it's suitably aligned.
28 */ 28 */
29unsigned long setup_trampoline(void) 29unsigned long __cpuinit setup_trampoline(void)
30{ 30{
31 memcpy(trampoline_base, trampoline_data, TRAMPOLINE_SIZE); 31 memcpy(trampoline_base, trampoline_data, TRAMPOLINE_SIZE);
32 return virt_to_phys(trampoline_base); 32 return virt_to_phys(trampoline_base);
diff --git a/arch/x86/kernel/trampoline_32.S b/arch/x86/kernel/trampoline_32.S
index 66d874e5404c..8508237e8e43 100644
--- a/arch/x86/kernel/trampoline_32.S
+++ b/arch/x86/kernel/trampoline_32.S
@@ -28,16 +28,12 @@
28 */ 28 */
29 29
30#include <linux/linkage.h> 30#include <linux/linkage.h>
31#include <linux/init.h>
31#include <asm/segment.h> 32#include <asm/segment.h>
32#include <asm/page_types.h> 33#include <asm/page_types.h>
33 34
34/* We can free up trampoline after bootup if cpu hotplug is not supported. */ 35/* We can free up trampoline after bootup if cpu hotplug is not supported. */
35#ifndef CONFIG_HOTPLUG_CPU 36__CPUINITRODATA
36.section ".cpuinit.data","aw",@progbits
37#else
38.section .rodata,"a",@progbits
39#endif
40
41.code16 37.code16
42 38
43ENTRY(trampoline_data) 39ENTRY(trampoline_data)
diff --git a/arch/x86/kernel/trampoline_64.S b/arch/x86/kernel/trampoline_64.S
index cddfb8d386b9..596d54c660a5 100644
--- a/arch/x86/kernel/trampoline_64.S
+++ b/arch/x86/kernel/trampoline_64.S
@@ -25,14 +25,15 @@
25 */ 25 */
26 26
27#include <linux/linkage.h> 27#include <linux/linkage.h>
28#include <linux/init.h>
28#include <asm/pgtable_types.h> 29#include <asm/pgtable_types.h>
29#include <asm/page_types.h> 30#include <asm/page_types.h>
30#include <asm/msr.h> 31#include <asm/msr.h>
31#include <asm/segment.h> 32#include <asm/segment.h>
32#include <asm/processor-flags.h> 33#include <asm/processor-flags.h>
33 34
34.section .rodata, "a", @progbits 35/* We can free up the trampoline after bootup if cpu hotplug is not supported. */
35 36__CPUINITRODATA
36.code16 37.code16
37 38
38ENTRY(trampoline_data) 39ENTRY(trampoline_data)
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index 83264922a878..a665c71352b8 100644
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -14,7 +14,6 @@
14#include <linux/spinlock.h> 14#include <linux/spinlock.h>
15#include <linux/kprobes.h> 15#include <linux/kprobes.h>
16#include <linux/uaccess.h> 16#include <linux/uaccess.h>
17#include <linux/utsname.h>
18#include <linux/kdebug.h> 17#include <linux/kdebug.h>
19#include <linux/kernel.h> 18#include <linux/kernel.h>
20#include <linux/module.h> 19#include <linux/module.h>
@@ -59,12 +58,12 @@
59#include <asm/mach_traps.h> 58#include <asm/mach_traps.h>
60 59
61#ifdef CONFIG_X86_64 60#ifdef CONFIG_X86_64
61#include <asm/x86_init.h>
62#include <asm/pgalloc.h> 62#include <asm/pgalloc.h>
63#include <asm/proto.h> 63#include <asm/proto.h>
64#else 64#else
65#include <asm/processor-flags.h> 65#include <asm/processor-flags.h>
66#include <asm/setup.h> 66#include <asm/setup.h>
67#include <asm/traps.h>
68 67
69asmlinkage int system_call(void); 68asmlinkage int system_call(void);
70 69
@@ -972,7 +971,5 @@ void __init trap_init(void)
972 */ 971 */
973 cpu_init(); 972 cpu_init();
974 973
975#ifdef CONFIG_X86_32 974 x86_init.irqs.trap_init();
976 x86_quirk_trap_init();
977#endif
978} 975}
diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
index 71f4368b357e..cd982f48e23e 100644
--- a/arch/x86/kernel/tsc.c
+++ b/arch/x86/kernel/tsc.c
@@ -17,6 +17,8 @@
17#include <asm/time.h> 17#include <asm/time.h>
18#include <asm/delay.h> 18#include <asm/delay.h>
19#include <asm/hypervisor.h> 19#include <asm/hypervisor.h>
20#include <asm/nmi.h>
21#include <asm/x86_init.h>
20 22
21unsigned int __read_mostly cpu_khz; /* TSC clocks / usec, not used here */ 23unsigned int __read_mostly cpu_khz; /* TSC clocks / usec, not used here */
22EXPORT_SYMBOL(cpu_khz); 24EXPORT_SYMBOL(cpu_khz);
@@ -400,15 +402,9 @@ unsigned long native_calibrate_tsc(void)
400{ 402{
401 u64 tsc1, tsc2, delta, ref1, ref2; 403 u64 tsc1, tsc2, delta, ref1, ref2;
402 unsigned long tsc_pit_min = ULONG_MAX, tsc_ref_min = ULONG_MAX; 404 unsigned long tsc_pit_min = ULONG_MAX, tsc_ref_min = ULONG_MAX;
403 unsigned long flags, latch, ms, fast_calibrate, hv_tsc_khz; 405 unsigned long flags, latch, ms, fast_calibrate;
404 int hpet = is_hpet_enabled(), i, loopmin; 406 int hpet = is_hpet_enabled(), i, loopmin;
405 407
406 hv_tsc_khz = get_hypervisor_tsc_freq();
407 if (hv_tsc_khz) {
408 printk(KERN_INFO "TSC: Frequency read from the hypervisor\n");
409 return hv_tsc_khz;
410 }
411
412 local_irq_save(flags); 408 local_irq_save(flags);
413 fast_calibrate = quick_pit_calibrate(); 409 fast_calibrate = quick_pit_calibrate();
414 local_irq_restore(flags); 410 local_irq_restore(flags);
@@ -566,7 +562,7 @@ int recalibrate_cpu_khz(void)
566 unsigned long cpu_khz_old = cpu_khz; 562 unsigned long cpu_khz_old = cpu_khz;
567 563
568 if (cpu_has_tsc) { 564 if (cpu_has_tsc) {
569 tsc_khz = calibrate_tsc(); 565 tsc_khz = x86_platform.calibrate_tsc();
570 cpu_khz = tsc_khz; 566 cpu_khz = tsc_khz;
571 cpu_data(0).loops_per_jiffy = 567 cpu_data(0).loops_per_jiffy =
572 cpufreq_scale(cpu_data(0).loops_per_jiffy, 568 cpufreq_scale(cpu_data(0).loops_per_jiffy,
@@ -670,7 +666,7 @@ static int time_cpufreq_notifier(struct notifier_block *nb, unsigned long val,
670 if ((val == CPUFREQ_PRECHANGE && freq->old < freq->new) || 666 if ((val == CPUFREQ_PRECHANGE && freq->old < freq->new) ||
671 (val == CPUFREQ_POSTCHANGE && freq->old > freq->new) || 667 (val == CPUFREQ_POSTCHANGE && freq->old > freq->new) ||
672 (val == CPUFREQ_RESUMECHANGE)) { 668 (val == CPUFREQ_RESUMECHANGE)) {
673 *lpj = cpufreq_scale(loops_per_jiffy_ref, ref_freq, freq->new); 669 *lpj = cpufreq_scale(loops_per_jiffy_ref, ref_freq, freq->new);
674 670
675 tsc_khz = cpufreq_scale(tsc_khz_ref, ref_freq, freq->new); 671 tsc_khz = cpufreq_scale(tsc_khz_ref, ref_freq, freq->new);
676 if (!(freq->flags & CPUFREQ_CONST_LOOPS)) 672 if (!(freq->flags & CPUFREQ_CONST_LOOPS))
@@ -744,10 +740,16 @@ static cycle_t __vsyscall_fn vread_tsc(void)
744} 740}
745#endif 741#endif
746 742
743static void resume_tsc(void)
744{
745 clocksource_tsc.cycle_last = 0;
746}
747
747static struct clocksource clocksource_tsc = { 748static struct clocksource clocksource_tsc = {
748 .name = "tsc", 749 .name = "tsc",
749 .rating = 300, 750 .rating = 300,
750 .read = read_tsc, 751 .read = read_tsc,
752 .resume = resume_tsc,
751 .mask = CLOCKSOURCE_MASK(64), 753 .mask = CLOCKSOURCE_MASK(64),
752 .shift = 22, 754 .shift = 22,
753 .flags = CLOCK_SOURCE_IS_CONTINUOUS | 755 .flags = CLOCK_SOURCE_IS_CONTINUOUS |
@@ -761,12 +763,14 @@ void mark_tsc_unstable(char *reason)
761{ 763{
762 if (!tsc_unstable) { 764 if (!tsc_unstable) {
763 tsc_unstable = 1; 765 tsc_unstable = 1;
764 printk("Marking TSC unstable due to %s\n", reason); 766 printk(KERN_INFO "Marking TSC unstable due to %s\n", reason);
765 /* Change only the rating, when not registered */ 767 /* Change only the rating, when not registered */
766 if (clocksource_tsc.mult) 768 if (clocksource_tsc.mult)
767 clocksource_change_rating(&clocksource_tsc, 0); 769 clocksource_mark_unstable(&clocksource_tsc);
768 else 770 else {
771 clocksource_tsc.flags |= CLOCK_SOURCE_UNSTABLE;
769 clocksource_tsc.rating = 0; 772 clocksource_tsc.rating = 0;
773 }
770 } 774 }
771} 775}
772 776
@@ -852,15 +856,71 @@ static void __init init_tsc_clocksource(void)
852 clocksource_register(&clocksource_tsc); 856 clocksource_register(&clocksource_tsc);
853} 857}
854 858
859#ifdef CONFIG_X86_64
860/*
861 * calibrate_cpu is used on systems with fixed rate TSCs to determine
862 * processor frequency
863 */
864#define TICK_COUNT 100000000
865static unsigned long __init calibrate_cpu(void)
866{
867 int tsc_start, tsc_now;
868 int i, no_ctr_free;
869 unsigned long evntsel3 = 0, pmc3 = 0, pmc_now = 0;
870 unsigned long flags;
871
872 for (i = 0; i < 4; i++)
873 if (avail_to_resrv_perfctr_nmi_bit(i))
874 break;
875 no_ctr_free = (i == 4);
876 if (no_ctr_free) {
877 WARN(1, KERN_WARNING "Warning: AMD perfctrs busy ... "
878 "cpu_khz value may be incorrect.\n");
879 i = 3;
880 rdmsrl(MSR_K7_EVNTSEL3, evntsel3);
881 wrmsrl(MSR_K7_EVNTSEL3, 0);
882 rdmsrl(MSR_K7_PERFCTR3, pmc3);
883 } else {
884 reserve_perfctr_nmi(MSR_K7_PERFCTR0 + i);
885 reserve_evntsel_nmi(MSR_K7_EVNTSEL0 + i);
886 }
887 local_irq_save(flags);
888 /* start measuring cycles, incrementing from 0 */
889 wrmsrl(MSR_K7_PERFCTR0 + i, 0);
890 wrmsrl(MSR_K7_EVNTSEL0 + i, 1 << 22 | 3 << 16 | 0x76);
891 rdtscl(tsc_start);
892 do {
893 rdmsrl(MSR_K7_PERFCTR0 + i, pmc_now);
894 tsc_now = get_cycles();
895 } while ((tsc_now - tsc_start) < TICK_COUNT);
896
897 local_irq_restore(flags);
898 if (no_ctr_free) {
899 wrmsrl(MSR_K7_EVNTSEL3, 0);
900 wrmsrl(MSR_K7_PERFCTR3, pmc3);
901 wrmsrl(MSR_K7_EVNTSEL3, evntsel3);
902 } else {
903 release_perfctr_nmi(MSR_K7_PERFCTR0 + i);
904 release_evntsel_nmi(MSR_K7_EVNTSEL0 + i);
905 }
906
907 return pmc_now * tsc_khz / (tsc_now - tsc_start);
908}
909#else
910static inline unsigned long calibrate_cpu(void) { return cpu_khz; }
911#endif
912
855void __init tsc_init(void) 913void __init tsc_init(void)
856{ 914{
857 u64 lpj; 915 u64 lpj;
858 int cpu; 916 int cpu;
859 917
918 x86_init.timers.tsc_pre_init();
919
860 if (!cpu_has_tsc) 920 if (!cpu_has_tsc)
861 return; 921 return;
862 922
863 tsc_khz = calibrate_tsc(); 923 tsc_khz = x86_platform.calibrate_tsc();
864 cpu_khz = tsc_khz; 924 cpu_khz = tsc_khz;
865 925
866 if (!tsc_khz) { 926 if (!tsc_khz) {
@@ -868,11 +928,9 @@ void __init tsc_init(void)
868 return; 928 return;
869 } 929 }
870 930
871#ifdef CONFIG_X86_64
872 if (cpu_has(&boot_cpu_data, X86_FEATURE_CONSTANT_TSC) && 931 if (cpu_has(&boot_cpu_data, X86_FEATURE_CONSTANT_TSC) &&
873 (boot_cpu_data.x86_vendor == X86_VENDOR_AMD)) 932 (boot_cpu_data.x86_vendor == X86_VENDOR_AMD))
874 cpu_khz = calibrate_cpu(); 933 cpu_khz = calibrate_cpu();
875#endif
876 934
877 printk("Detected %lu.%03lu MHz processor.\n", 935 printk("Detected %lu.%03lu MHz processor.\n",
878 (unsigned long)cpu_khz / 1000, 936 (unsigned long)cpu_khz / 1000,
diff --git a/arch/x86/kernel/visws_quirks.c b/arch/x86/kernel/visws_quirks.c
index 31ffc24eec4d..f068553a1b17 100644
--- a/arch/x86/kernel/visws_quirks.c
+++ b/arch/x86/kernel/visws_quirks.c
@@ -30,6 +30,7 @@
30#include <asm/setup.h> 30#include <asm/setup.h>
31#include <asm/apic.h> 31#include <asm/apic.h>
32#include <asm/e820.h> 32#include <asm/e820.h>
33#include <asm/time.h>
33#include <asm/io.h> 34#include <asm/io.h>
34 35
35#include <linux/kernel_stat.h> 36#include <linux/kernel_stat.h>
@@ -53,7 +54,7 @@ int is_visws_box(void)
53 return visws_board_type >= 0; 54 return visws_board_type >= 0;
54} 55}
55 56
56static int __init visws_time_init(void) 57static void __init visws_time_init(void)
57{ 58{
58 printk(KERN_INFO "Starting Cobalt Timer system clock\n"); 59 printk(KERN_INFO "Starting Cobalt Timer system clock\n");
59 60
@@ -66,21 +67,13 @@ static int __init visws_time_init(void)
66 /* Enable (unmask) the timer interrupt */ 67 /* Enable (unmask) the timer interrupt */
67 co_cpu_write(CO_CPU_CTRL, co_cpu_read(CO_CPU_CTRL) & ~CO_CTRL_TIMEMASK); 68 co_cpu_write(CO_CPU_CTRL, co_cpu_read(CO_CPU_CTRL) & ~CO_CTRL_TIMEMASK);
68 69
69 /* 70 setup_default_timer_irq();
70 * Zero return means the generic timer setup code will set up
71 * the standard vector:
72 */
73 return 0;
74} 71}
75 72
76static int __init visws_pre_intr_init(void) 73/* Replaces the default init_ISA_irqs in the generic setup */
74static void __init visws_pre_intr_init(void)
77{ 75{
78 init_VISWS_APIC_irqs(); 76 init_VISWS_APIC_irqs();
79
80 /*
81 * We dont want ISA irqs to be set up by the generic code:
82 */
83 return 1;
84} 77}
85 78
86/* Quirk for machine specific memory setup. */ 79/* Quirk for machine specific memory setup. */
@@ -156,12 +149,8 @@ static void visws_machine_power_off(void)
156 outl(PIIX_SPECIAL_STOP, 0xCFC); 149 outl(PIIX_SPECIAL_STOP, 0xCFC);
157} 150}
158 151
159static int __init visws_get_smp_config(unsigned int early) 152static void __init visws_get_smp_config(unsigned int early)
160{ 153{
161 /*
162 * Prevent MP-table parsing by the generic code:
163 */
164 return 1;
165} 154}
166 155
167/* 156/*
@@ -208,7 +197,7 @@ static void __init MP_processor_info(struct mpc_cpu *m)
208 apic_version[m->apicid] = ver; 197 apic_version[m->apicid] = ver;
209} 198}
210 199
211static int __init visws_find_smp_config(unsigned int reserve) 200static void __init visws_find_smp_config(unsigned int reserve)
212{ 201{
213 struct mpc_cpu *mp = phys_to_virt(CO_CPU_TAB_PHYS); 202 struct mpc_cpu *mp = phys_to_virt(CO_CPU_TAB_PHYS);
214 unsigned short ncpus = readw(phys_to_virt(CO_CPU_NUM_PHYS)); 203 unsigned short ncpus = readw(phys_to_virt(CO_CPU_NUM_PHYS));
@@ -230,21 +219,9 @@ static int __init visws_find_smp_config(unsigned int reserve)
230 MP_processor_info(mp++); 219 MP_processor_info(mp++);
231 220
232 mp_lapic_addr = APIC_DEFAULT_PHYS_BASE; 221 mp_lapic_addr = APIC_DEFAULT_PHYS_BASE;
233
234 return 1;
235} 222}
236 223
237static int visws_trap_init(void); 224static void visws_trap_init(void);
238
239static struct x86_quirks visws_x86_quirks __initdata = {
240 .arch_time_init = visws_time_init,
241 .arch_pre_intr_init = visws_pre_intr_init,
242 .arch_memory_setup = visws_memory_setup,
243 .arch_intr_init = NULL,
244 .arch_trap_init = visws_trap_init,
245 .mach_get_smp_config = visws_get_smp_config,
246 .mach_find_smp_config = visws_find_smp_config,
247};
248 225
249void __init visws_early_detect(void) 226void __init visws_early_detect(void)
250{ 227{
@@ -257,11 +234,14 @@ void __init visws_early_detect(void)
257 return; 234 return;
258 235
259 /* 236 /*
260 * Install special quirks for timer, interrupt and memory setup: 237 * Override the default platform setup functions
261 * Fall back to generic behavior for traps:
262 * Override generic MP-table parsing:
263 */ 238 */
264 x86_quirks = &visws_x86_quirks; 239 x86_init.resources.memory_setup = visws_memory_setup;
240 x86_init.mpparse.get_smp_config = visws_get_smp_config;
241 x86_init.mpparse.find_smp_config = visws_find_smp_config;
242 x86_init.irqs.pre_vector_init = visws_pre_intr_init;
243 x86_init.irqs.trap_init = visws_trap_init;
244 x86_init.timers.timer_init = visws_time_init;
265 245
266 /* 246 /*
267 * Install reboot quirks: 247 * Install reboot quirks:
@@ -400,12 +380,10 @@ static __init void cobalt_init(void)
400 co_apic_read(CO_APIC_ID)); 380 co_apic_read(CO_APIC_ID));
401} 381}
402 382
403static int __init visws_trap_init(void) 383static void __init visws_trap_init(void)
404{ 384{
405 lithium_init(); 385 lithium_init();
406 cobalt_init(); 386 cobalt_init();
407
408 return 1;
409} 387}
410 388
411/* 389/*
diff --git a/arch/x86/kernel/vmi_32.c b/arch/x86/kernel/vmi_32.c
index 95a7289e4b0c..31e6f6cfe53e 100644
--- a/arch/x86/kernel/vmi_32.c
+++ b/arch/x86/kernel/vmi_32.c
@@ -817,15 +817,15 @@ static inline int __init activate_vmi(void)
817 vmi_timer_ops.set_alarm = vmi_get_function(VMI_CALL_SetAlarm); 817 vmi_timer_ops.set_alarm = vmi_get_function(VMI_CALL_SetAlarm);
818 vmi_timer_ops.cancel_alarm = 818 vmi_timer_ops.cancel_alarm =
819 vmi_get_function(VMI_CALL_CancelAlarm); 819 vmi_get_function(VMI_CALL_CancelAlarm);
820 pv_time_ops.time_init = vmi_time_init; 820 x86_init.timers.timer_init = vmi_time_init;
821 pv_time_ops.get_wallclock = vmi_get_wallclock;
822 pv_time_ops.set_wallclock = vmi_set_wallclock;
823#ifdef CONFIG_X86_LOCAL_APIC 821#ifdef CONFIG_X86_LOCAL_APIC
824 pv_apic_ops.setup_boot_clock = vmi_time_bsp_init; 822 x86_init.timers.setup_percpu_clockev = vmi_time_bsp_init;
825 pv_apic_ops.setup_secondary_clock = vmi_time_ap_init; 823 x86_cpuinit.setup_percpu_clockev = vmi_time_ap_init;
826#endif 824#endif
827 pv_time_ops.sched_clock = vmi_sched_clock; 825 pv_time_ops.sched_clock = vmi_sched_clock;
828 pv_time_ops.get_tsc_khz = vmi_tsc_khz; 826 x86_platform.calibrate_tsc = vmi_tsc_khz;
827 x86_platform.get_wallclock = vmi_get_wallclock;
828 x86_platform.set_wallclock = vmi_set_wallclock;
829 829
830 /* We have true wallclock functions; disable CMOS clock sync */ 830 /* We have true wallclock functions; disable CMOS clock sync */
831 no_sync_cmos_clock = 1; 831 no_sync_cmos_clock = 1;
diff --git a/arch/x86/kernel/vmiclock_32.c b/arch/x86/kernel/vmiclock_32.c
index 2b3eb82efeeb..611b9e2360d3 100644
--- a/arch/x86/kernel/vmiclock_32.c
+++ b/arch/x86/kernel/vmiclock_32.c
@@ -68,7 +68,7 @@ unsigned long long vmi_sched_clock(void)
68 return cycles_2_ns(vmi_timer_ops.get_cycle_counter(VMI_CYCLES_AVAILABLE)); 68 return cycles_2_ns(vmi_timer_ops.get_cycle_counter(VMI_CYCLES_AVAILABLE));
69} 69}
70 70
71/* paravirt_ops.get_tsc_khz = vmi_tsc_khz */ 71/* x86_platform.calibrate_tsc = vmi_tsc_khz */
72unsigned long vmi_tsc_khz(void) 72unsigned long vmi_tsc_khz(void)
73{ 73{
74 unsigned long long khz; 74 unsigned long long khz;
diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S
index 0ccb57d5ee35..a46acccec38a 100644
--- a/arch/x86/kernel/vmlinux.lds.S
+++ b/arch/x86/kernel/vmlinux.lds.S
@@ -45,9 +45,9 @@ PHDRS {
45 text PT_LOAD FLAGS(5); /* R_E */ 45 text PT_LOAD FLAGS(5); /* R_E */
46 data PT_LOAD FLAGS(7); /* RWE */ 46 data PT_LOAD FLAGS(7); /* RWE */
47#ifdef CONFIG_X86_64 47#ifdef CONFIG_X86_64
48 user PT_LOAD FLAGS(7); /* RWE */ 48 user PT_LOAD FLAGS(5); /* R_E */
49#ifdef CONFIG_SMP 49#ifdef CONFIG_SMP
50 percpu PT_LOAD FLAGS(7); /* RWE */ 50 percpu PT_LOAD FLAGS(6); /* RW_ */
51#endif 51#endif
52 init PT_LOAD FLAGS(7); /* RWE */ 52 init PT_LOAD FLAGS(7); /* RWE */
53#endif 53#endif
diff --git a/arch/x86/kernel/vsyscall_64.c b/arch/x86/kernel/vsyscall_64.c
index 25ee06a80aad..8cb4974ff599 100644
--- a/arch/x86/kernel/vsyscall_64.c
+++ b/arch/x86/kernel/vsyscall_64.c
@@ -87,6 +87,7 @@ void update_vsyscall(struct timespec *wall_time, struct clocksource *clock)
87 vsyscall_gtod_data.wall_time_sec = wall_time->tv_sec; 87 vsyscall_gtod_data.wall_time_sec = wall_time->tv_sec;
88 vsyscall_gtod_data.wall_time_nsec = wall_time->tv_nsec; 88 vsyscall_gtod_data.wall_time_nsec = wall_time->tv_nsec;
89 vsyscall_gtod_data.wall_to_monotonic = wall_to_monotonic; 89 vsyscall_gtod_data.wall_to_monotonic = wall_to_monotonic;
90 vsyscall_gtod_data.wall_time_coarse = __current_kernel_time();
90 write_sequnlock_irqrestore(&vsyscall_gtod_data.lock, flags); 91 write_sequnlock_irqrestore(&vsyscall_gtod_data.lock, flags);
91} 92}
92 93
@@ -227,19 +228,11 @@ static long __vsyscall(3) venosys_1(void)
227} 228}
228 229
229#ifdef CONFIG_SYSCTL 230#ifdef CONFIG_SYSCTL
230
231static int
232vsyscall_sysctl_change(ctl_table *ctl, int write, struct file * filp,
233 void __user *buffer, size_t *lenp, loff_t *ppos)
234{
235 return proc_dointvec(ctl, write, filp, buffer, lenp, ppos);
236}
237
238static ctl_table kernel_table2[] = { 231static ctl_table kernel_table2[] = {
239 { .procname = "vsyscall64", 232 { .procname = "vsyscall64",
240 .data = &vsyscall_gtod_data.sysctl_enabled, .maxlen = sizeof(int), 233 .data = &vsyscall_gtod_data.sysctl_enabled, .maxlen = sizeof(int),
241 .mode = 0644, 234 .mode = 0644,
242 .proc_handler = vsyscall_sysctl_change }, 235 .proc_handler = proc_dointvec },
243 {} 236 {}
244}; 237};
245 238
diff --git a/arch/x86/kernel/x86_init.c b/arch/x86/kernel/x86_init.c
new file mode 100644
index 000000000000..4449a4a2c2ed
--- /dev/null
+++ b/arch/x86/kernel/x86_init.c
@@ -0,0 +1,75 @@
1/*
2 * Copyright (C) 2009 Thomas Gleixner <tglx@linutronix.de>
3 *
4 * For licencing details see kernel-base/COPYING
5 */
6#include <linux/init.h>
7
8#include <asm/bios_ebda.h>
9#include <asm/paravirt.h>
10#include <asm/mpspec.h>
11#include <asm/setup.h>
12#include <asm/apic.h>
13#include <asm/e820.h>
14#include <asm/time.h>
15#include <asm/irq.h>
16#include <asm/tsc.h>
17
18void __cpuinit x86_init_noop(void) { }
19void __init x86_init_uint_noop(unsigned int unused) { }
20void __init x86_init_pgd_noop(pgd_t *unused) { }
21
22/*
23 * The platform setup functions are preset with the default functions
24 * for standard PC hardware.
25 */
26struct x86_init_ops x86_init __initdata = {
27
28 .resources = {
29 .probe_roms = x86_init_noop,
30 .reserve_resources = reserve_standard_io_resources,
31 .memory_setup = default_machine_specific_memory_setup,
32 },
33
34 .mpparse = {
35 .mpc_record = x86_init_uint_noop,
36 .setup_ioapic_ids = x86_init_noop,
37 .mpc_apic_id = default_mpc_apic_id,
38 .smp_read_mpc_oem = default_smp_read_mpc_oem,
39 .mpc_oem_bus_info = default_mpc_oem_bus_info,
40 .find_smp_config = default_find_smp_config,
41 .get_smp_config = default_get_smp_config,
42 },
43
44 .irqs = {
45 .pre_vector_init = init_ISA_irqs,
46 .intr_init = native_init_IRQ,
47 .trap_init = x86_init_noop,
48 },
49
50 .oem = {
51 .arch_setup = x86_init_noop,
52 .banner = default_banner,
53 },
54
55 .paging = {
56 .pagetable_setup_start = native_pagetable_setup_start,
57 .pagetable_setup_done = native_pagetable_setup_done,
58 },
59
60 .timers = {
61 .setup_percpu_clockev = setup_boot_APIC_clock,
62 .tsc_pre_init = x86_init_noop,
63 .timer_init = hpet_time_init,
64 },
65};
66
67struct x86_cpuinit_ops x86_cpuinit __cpuinitdata = {
68 .setup_percpu_clockev = setup_secondary_APIC_clock,
69};
70
71struct x86_platform_ops x86_platform = {
72 .calibrate_tsc = native_calibrate_tsc,
73 .get_wallclock = mach_get_cmos_time,
74 .set_wallclock = mach_set_rtc_mmss,
75};
diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c
index d677fa9ca650..7e59dc1d3fc2 100644
--- a/arch/x86/lguest/boot.c
+++ b/arch/x86/lguest/boot.c
@@ -1135,11 +1135,6 @@ static struct notifier_block paniced = {
1135/* Setting up memory is fairly easy. */ 1135/* Setting up memory is fairly easy. */
1136static __init char *lguest_memory_setup(void) 1136static __init char *lguest_memory_setup(void)
1137{ 1137{
1138 /* We do this here and not earlier because lockcheck used to barf if we
1139 * did it before start_kernel(). I think we fixed that, so it'd be
1140 * nice to move it back to lguest_init. Patch welcome... */
1141 atomic_notifier_chain_register(&panic_notifier_list, &paniced);
1142
1143 /* 1138 /*
1144 *The Linux bootloader header contains an "e820" memory map: the 1139 *The Linux bootloader header contains an "e820" memory map: the
1145 * Launcher populated the first entry with our memory limit. 1140 * Launcher populated the first entry with our memory limit.
@@ -1262,7 +1257,6 @@ __init void lguest_init(void)
1262 */ 1257 */
1263 1258
1264 /* Interrupt-related operations */ 1259 /* Interrupt-related operations */
1265 pv_irq_ops.init_IRQ = lguest_init_IRQ;
1266 pv_irq_ops.save_fl = PV_CALLEE_SAVE(save_fl); 1260 pv_irq_ops.save_fl = PV_CALLEE_SAVE(save_fl);
1267 pv_irq_ops.restore_fl = __PV_IS_CALLEE_SAVE(lg_restore_fl); 1261 pv_irq_ops.restore_fl = __PV_IS_CALLEE_SAVE(lg_restore_fl);
1268 pv_irq_ops.irq_disable = PV_CALLEE_SAVE(irq_disable); 1262 pv_irq_ops.irq_disable = PV_CALLEE_SAVE(irq_disable);
@@ -1270,7 +1264,6 @@ __init void lguest_init(void)
1270 pv_irq_ops.safe_halt = lguest_safe_halt; 1264 pv_irq_ops.safe_halt = lguest_safe_halt;
1271 1265
1272 /* Setup operations */ 1266 /* Setup operations */
1273 pv_init_ops.memory_setup = lguest_memory_setup;
1274 pv_init_ops.patch = lguest_patch; 1267 pv_init_ops.patch = lguest_patch;
1275 1268
1276 /* Intercepts of various CPU instructions */ 1269 /* Intercepts of various CPU instructions */
@@ -1320,10 +1313,11 @@ __init void lguest_init(void)
1320 set_lguest_basic_apic_ops(); 1313 set_lguest_basic_apic_ops();
1321#endif 1314#endif
1322 1315
1323 /* Time operations */ 1316 x86_init.resources.memory_setup = lguest_memory_setup;
1324 pv_time_ops.get_wallclock = lguest_get_wallclock; 1317 x86_init.irqs.intr_init = lguest_init_IRQ;
1325 pv_time_ops.time_init = lguest_time_init; 1318 x86_init.timers.timer_init = lguest_time_init;
1326 pv_time_ops.get_tsc_khz = lguest_tsc_khz; 1319 x86_platform.calibrate_tsc = lguest_tsc_khz;
1320 x86_platform.get_wallclock = lguest_get_wallclock;
1327 1321
1328 /* 1322 /*
1329 * Now is a good time to look at the implementations of these functions 1323 * Now is a good time to look at the implementations of these functions
@@ -1365,10 +1359,13 @@ __init void lguest_init(void)
1365 1359
1366 /* 1360 /*
1367 * If we don't initialize the lock dependency checker now, it crashes 1361 * If we don't initialize the lock dependency checker now, it crashes
1368 * paravirt_disable_iospace. 1362 * atomic_notifier_chain_register, then paravirt_disable_iospace.
1369 */ 1363 */
1370 lockdep_init(); 1364 lockdep_init();
1371 1365
1366 /* Hook in our special panic hypercall code. */
1367 atomic_notifier_chain_register(&panic_notifier_list, &paniced);
1368
1372 /* 1369 /*
1373 * The IDE code spends about 3 seconds probing for disks: if we reserve 1370 * The IDE code spends about 3 seconds probing for disks: if we reserve
1374 * all the I/O ports up front it can't get them and so doesn't probe. 1371 * all the I/O ports up front it can't get them and so doesn't probe.
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
index 775a020990a5..f4cee9028cf0 100644
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -10,7 +10,7 @@
10#include <linux/bootmem.h> /* max_low_pfn */ 10#include <linux/bootmem.h> /* max_low_pfn */
11#include <linux/kprobes.h> /* __kprobes, ... */ 11#include <linux/kprobes.h> /* __kprobes, ... */
12#include <linux/mmiotrace.h> /* kmmio_handler, ... */ 12#include <linux/mmiotrace.h> /* kmmio_handler, ... */
13#include <linux/perf_counter.h> /* perf_swcounter_event */ 13#include <linux/perf_event.h> /* perf_sw_event */
14 14
15#include <asm/traps.h> /* dotraplinkage, ... */ 15#include <asm/traps.h> /* dotraplinkage, ... */
16#include <asm/pgalloc.h> /* pgd_*(), ... */ 16#include <asm/pgalloc.h> /* pgd_*(), ... */
@@ -167,6 +167,7 @@ force_sig_info_fault(int si_signo, int si_code, unsigned long address,
167 info.si_errno = 0; 167 info.si_errno = 0;
168 info.si_code = si_code; 168 info.si_code = si_code;
169 info.si_addr = (void __user *)address; 169 info.si_addr = (void __user *)address;
170 info.si_addr_lsb = si_code == BUS_MCEERR_AR ? PAGE_SHIFT : 0;
170 171
171 force_sig_info(si_signo, &info, tsk); 172 force_sig_info(si_signo, &info, tsk);
172} 173}
@@ -790,10 +791,12 @@ out_of_memory(struct pt_regs *regs, unsigned long error_code,
790} 791}
791 792
792static void 793static void
793do_sigbus(struct pt_regs *regs, unsigned long error_code, unsigned long address) 794do_sigbus(struct pt_regs *regs, unsigned long error_code, unsigned long address,
795 unsigned int fault)
794{ 796{
795 struct task_struct *tsk = current; 797 struct task_struct *tsk = current;
796 struct mm_struct *mm = tsk->mm; 798 struct mm_struct *mm = tsk->mm;
799 int code = BUS_ADRERR;
797 800
798 up_read(&mm->mmap_sem); 801 up_read(&mm->mmap_sem);
799 802
@@ -809,7 +812,15 @@ do_sigbus(struct pt_regs *regs, unsigned long error_code, unsigned long address)
809 tsk->thread.error_code = error_code; 812 tsk->thread.error_code = error_code;
810 tsk->thread.trap_no = 14; 813 tsk->thread.trap_no = 14;
811 814
812 force_sig_info_fault(SIGBUS, BUS_ADRERR, address, tsk); 815#ifdef CONFIG_MEMORY_FAILURE
816 if (fault & VM_FAULT_HWPOISON) {
817 printk(KERN_ERR
818 "MCE: Killing %s:%d due to hardware memory corruption fault at %lx\n",
819 tsk->comm, tsk->pid, address);
820 code = BUS_MCEERR_AR;
821 }
822#endif
823 force_sig_info_fault(SIGBUS, code, address, tsk);
813} 824}
814 825
815static noinline void 826static noinline void
@@ -819,8 +830,8 @@ mm_fault_error(struct pt_regs *regs, unsigned long error_code,
819 if (fault & VM_FAULT_OOM) { 830 if (fault & VM_FAULT_OOM) {
820 out_of_memory(regs, error_code, address); 831 out_of_memory(regs, error_code, address);
821 } else { 832 } else {
822 if (fault & VM_FAULT_SIGBUS) 833 if (fault & (VM_FAULT_SIGBUS|VM_FAULT_HWPOISON))
823 do_sigbus(regs, error_code, address); 834 do_sigbus(regs, error_code, address, fault);
824 else 835 else
825 BUG(); 836 BUG();
826 } 837 }
@@ -1017,7 +1028,7 @@ do_page_fault(struct pt_regs *regs, unsigned long error_code)
1017 if (unlikely(error_code & PF_RSVD)) 1028 if (unlikely(error_code & PF_RSVD))
1018 pgtable_bad(regs, error_code, address); 1029 pgtable_bad(regs, error_code, address);
1019 1030
1020 perf_swcounter_event(PERF_COUNT_SW_PAGE_FAULTS, 1, 0, regs, address); 1031 perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, 0, regs, address);
1021 1032
1022 /* 1033 /*
1023 * If we're in an interrupt, have no user context or are running 1034 * If we're in an interrupt, have no user context or are running
@@ -1114,11 +1125,11 @@ good_area:
1114 1125
1115 if (fault & VM_FAULT_MAJOR) { 1126 if (fault & VM_FAULT_MAJOR) {
1116 tsk->maj_flt++; 1127 tsk->maj_flt++;
1117 perf_swcounter_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, 0, 1128 perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, 0,
1118 regs, address); 1129 regs, address);
1119 } else { 1130 } else {
1120 tsk->min_flt++; 1131 tsk->min_flt++;
1121 perf_swcounter_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, 0, 1132 perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, 0,
1122 regs, address); 1133 regs, address);
1123 } 1134 }
1124 1135
diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c
index 3cd7711bb949..30938c1d8d5d 100644
--- a/arch/x86/mm/init_32.c
+++ b/arch/x86/mm/init_32.c
@@ -84,7 +84,7 @@ static pmd_t * __init one_md_table_init(pgd_t *pgd)
84#ifdef CONFIG_X86_PAE 84#ifdef CONFIG_X86_PAE
85 if (!(pgd_val(*pgd) & _PAGE_PRESENT)) { 85 if (!(pgd_val(*pgd) & _PAGE_PRESENT)) {
86 if (after_bootmem) 86 if (after_bootmem)
87 pmd_table = (pmd_t *)alloc_bootmem_low_pages(PAGE_SIZE); 87 pmd_table = (pmd_t *)alloc_bootmem_pages(PAGE_SIZE);
88 else 88 else
89 pmd_table = (pmd_t *)alloc_low_page(); 89 pmd_table = (pmd_t *)alloc_low_page();
90 paravirt_alloc_pmd(&init_mm, __pa(pmd_table) >> PAGE_SHIFT); 90 paravirt_alloc_pmd(&init_mm, __pa(pmd_table) >> PAGE_SHIFT);
@@ -116,7 +116,7 @@ static pte_t * __init one_page_table_init(pmd_t *pmd)
116#endif 116#endif
117 if (!page_table) 117 if (!page_table)
118 page_table = 118 page_table =
119 (pte_t *)alloc_bootmem_low_pages(PAGE_SIZE); 119 (pte_t *)alloc_bootmem_pages(PAGE_SIZE);
120 } else 120 } else
121 page_table = (pte_t *)alloc_low_page(); 121 page_table = (pte_t *)alloc_low_page();
122 122
@@ -857,8 +857,6 @@ static void __init test_wp_bit(void)
857 } 857 }
858} 858}
859 859
860static struct kcore_list kcore_mem, kcore_vmalloc;
861
862void __init mem_init(void) 860void __init mem_init(void)
863{ 861{
864 int codesize, reservedpages, datasize, initsize; 862 int codesize, reservedpages, datasize, initsize;
@@ -886,13 +884,9 @@ void __init mem_init(void)
886 datasize = (unsigned long) &_edata - (unsigned long) &_etext; 884 datasize = (unsigned long) &_edata - (unsigned long) &_etext;
887 initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin; 885 initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin;
888 886
889 kclist_add(&kcore_mem, __va(0), max_low_pfn << PAGE_SHIFT);
890 kclist_add(&kcore_vmalloc, (void *)VMALLOC_START,
891 VMALLOC_END-VMALLOC_START);
892
893 printk(KERN_INFO "Memory: %luk/%luk available (%dk kernel code, " 887 printk(KERN_INFO "Memory: %luk/%luk available (%dk kernel code, "
894 "%dk reserved, %dk data, %dk init, %ldk highmem)\n", 888 "%dk reserved, %dk data, %dk init, %ldk highmem)\n",
895 (unsigned long) nr_free_pages() << (PAGE_SHIFT-10), 889 nr_free_pages() << (PAGE_SHIFT-10),
896 num_physpages << (PAGE_SHIFT-10), 890 num_physpages << (PAGE_SHIFT-10),
897 codesize >> 10, 891 codesize >> 10,
898 reservedpages << (PAGE_SHIFT-10), 892 reservedpages << (PAGE_SHIFT-10),
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
index ea56b8cbb6a6..5a4398a6006b 100644
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -647,8 +647,7 @@ EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid);
647 647
648#endif /* CONFIG_MEMORY_HOTPLUG */ 648#endif /* CONFIG_MEMORY_HOTPLUG */
649 649
650static struct kcore_list kcore_mem, kcore_vmalloc, kcore_kernel, 650static struct kcore_list kcore_vsyscall;
651 kcore_modules, kcore_vsyscall;
652 651
653void __init mem_init(void) 652void __init mem_init(void)
654{ 653{
@@ -677,17 +676,12 @@ void __init mem_init(void)
677 initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin; 676 initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin;
678 677
679 /* Register memory areas for /proc/kcore */ 678 /* Register memory areas for /proc/kcore */
680 kclist_add(&kcore_mem, __va(0), max_low_pfn << PAGE_SHIFT);
681 kclist_add(&kcore_vmalloc, (void *)VMALLOC_START,
682 VMALLOC_END-VMALLOC_START);
683 kclist_add(&kcore_kernel, &_stext, _end - _stext);
684 kclist_add(&kcore_modules, (void *)MODULES_VADDR, MODULES_LEN);
685 kclist_add(&kcore_vsyscall, (void *)VSYSCALL_START, 679 kclist_add(&kcore_vsyscall, (void *)VSYSCALL_START,
686 VSYSCALL_END - VSYSCALL_START); 680 VSYSCALL_END - VSYSCALL_START, KCORE_OTHER);
687 681
688 printk(KERN_INFO "Memory: %luk/%luk available (%ldk kernel code, " 682 printk(KERN_INFO "Memory: %luk/%luk available (%ldk kernel code, "
689 "%ldk absent, %ldk reserved, %ldk data, %ldk init)\n", 683 "%ldk absent, %ldk reserved, %ldk data, %ldk init)\n",
690 (unsigned long) nr_free_pages() << (PAGE_SHIFT-10), 684 nr_free_pages() << (PAGE_SHIFT-10),
691 max_pfn << (PAGE_SHIFT-10), 685 max_pfn << (PAGE_SHIFT-10),
692 codesize >> 10, 686 codesize >> 10,
693 absent_pages << (PAGE_SHIFT-10), 687 absent_pages << (PAGE_SHIFT-10),
diff --git a/arch/x86/mm/kmemcheck/kmemcheck.c b/arch/x86/mm/kmemcheck/kmemcheck.c
index 528bf954eb74..8cc183344140 100644
--- a/arch/x86/mm/kmemcheck/kmemcheck.c
+++ b/arch/x86/mm/kmemcheck/kmemcheck.c
@@ -225,9 +225,6 @@ void kmemcheck_hide(struct pt_regs *regs)
225 225
226 BUG_ON(!irqs_disabled()); 226 BUG_ON(!irqs_disabled());
227 227
228 if (data->balance == 0)
229 return;
230
231 if (unlikely(data->balance != 1)) { 228 if (unlikely(data->balance != 1)) {
232 kmemcheck_show_all(); 229 kmemcheck_show_all();
233 kmemcheck_error_save_bug(regs); 230 kmemcheck_error_save_bug(regs);
diff --git a/arch/x86/mm/kmemcheck/shadow.c b/arch/x86/mm/kmemcheck/shadow.c
index e773b6bd0079..3f66b82076a3 100644
--- a/arch/x86/mm/kmemcheck/shadow.c
+++ b/arch/x86/mm/kmemcheck/shadow.c
@@ -1,7 +1,6 @@
1#include <linux/kmemcheck.h> 1#include <linux/kmemcheck.h>
2#include <linux/module.h> 2#include <linux/module.h>
3#include <linux/mm.h> 3#include <linux/mm.h>
4#include <linux/module.h>
5 4
6#include <asm/page.h> 5#include <asm/page.h>
7#include <asm/pgtable.h> 6#include <asm/pgtable.h>
diff --git a/arch/x86/mm/mmap.c b/arch/x86/mm/mmap.c
index 165829600566..c8191defc38a 100644
--- a/arch/x86/mm/mmap.c
+++ b/arch/x86/mm/mmap.c
@@ -29,13 +29,26 @@
29#include <linux/random.h> 29#include <linux/random.h>
30#include <linux/limits.h> 30#include <linux/limits.h>
31#include <linux/sched.h> 31#include <linux/sched.h>
32#include <asm/elf.h>
33
34static unsigned int stack_maxrandom_size(void)
35{
36 unsigned int max = 0;
37 if ((current->flags & PF_RANDOMIZE) &&
38 !(current->personality & ADDR_NO_RANDOMIZE)) {
39 max = ((-1U) & STACK_RND_MASK) << PAGE_SHIFT;
40 }
41
42 return max;
43}
44
32 45
33/* 46/*
34 * Top of mmap area (just below the process stack). 47 * Top of mmap area (just below the process stack).
35 * 48 *
36 * Leave an at least ~128 MB hole. 49 * Leave an at least ~128 MB hole with possible stack randomization.
37 */ 50 */
38#define MIN_GAP (128*1024*1024) 51#define MIN_GAP (128*1024*1024UL + stack_maxrandom_size())
39#define MAX_GAP (TASK_SIZE/6*5) 52#define MAX_GAP (TASK_SIZE/6*5)
40 53
41/* 54/*
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
index 24952fdc7e40..dd38bfbefd1f 100644
--- a/arch/x86/mm/pageattr.c
+++ b/arch/x86/mm/pageattr.c
@@ -144,6 +144,7 @@ void clflush_cache_range(void *vaddr, unsigned int size)
144 144
145 mb(); 145 mb();
146} 146}
147EXPORT_SYMBOL_GPL(clflush_cache_range);
147 148
148static void __cpa_flush_all(void *arg) 149static void __cpa_flush_all(void *arg)
149{ 150{
diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c
index d7ebc3a10f2f..7257cf3decf9 100644
--- a/arch/x86/mm/pat.c
+++ b/arch/x86/mm/pat.c
@@ -424,17 +424,9 @@ int reserve_memtype(u64 start, u64 end, unsigned long req_type,
424 424
425 spin_lock(&memtype_lock); 425 spin_lock(&memtype_lock);
426 426
427 entry = memtype_rb_search(&memtype_rbroot, new->start);
428 if (likely(entry != NULL)) {
429 /* To work correctly with list_for_each_entry_continue */
430 entry = list_entry(entry->nd.prev, struct memtype, nd);
431 } else {
432 entry = list_entry(&memtype_list, struct memtype, nd);
433 }
434
435 /* Search for existing mapping that overlaps the current range */ 427 /* Search for existing mapping that overlaps the current range */
436 where = NULL; 428 where = NULL;
437 list_for_each_entry_continue(entry, &memtype_list, nd) { 429 list_for_each_entry(entry, &memtype_list, nd) {
438 if (end <= entry->start) { 430 if (end <= entry->start) {
439 where = entry->nd.prev; 431 where = entry->nd.prev;
440 break; 432 break;
@@ -532,7 +524,7 @@ int free_memtype(u64 start, u64 end)
532 * in sorted start address 524 * in sorted start address
533 */ 525 */
534 saved_entry = entry; 526 saved_entry = entry;
535 list_for_each_entry(entry, &memtype_list, nd) { 527 list_for_each_entry_from(entry, &memtype_list, nd) {
536 if (entry->start == start && entry->end == end) { 528 if (entry->start == start && entry->end == end) {
537 rb_erase(&entry->rb, &memtype_rbroot); 529 rb_erase(&entry->rb, &memtype_rbroot);
538 list_del(&entry->nd); 530 list_del(&entry->nd);
diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c
index c814e144a3f0..36fe08eeb5c3 100644
--- a/arch/x86/mm/tlb.c
+++ b/arch/x86/mm/tlb.c
@@ -59,7 +59,8 @@ void leave_mm(int cpu)
59{ 59{
60 if (percpu_read(cpu_tlbstate.state) == TLBSTATE_OK) 60 if (percpu_read(cpu_tlbstate.state) == TLBSTATE_OK)
61 BUG(); 61 BUG();
62 cpu_clear(cpu, percpu_read(cpu_tlbstate.active_mm)->cpu_vm_mask); 62 cpumask_clear_cpu(cpu,
63 mm_cpumask(percpu_read(cpu_tlbstate.active_mm)));
63 load_cr3(swapper_pg_dir); 64 load_cr3(swapper_pg_dir);
64} 65}
65EXPORT_SYMBOL_GPL(leave_mm); 66EXPORT_SYMBOL_GPL(leave_mm);
@@ -234,8 +235,8 @@ void flush_tlb_current_task(void)
234 preempt_disable(); 235 preempt_disable();
235 236
236 local_flush_tlb(); 237 local_flush_tlb();
237 if (cpumask_any_but(&mm->cpu_vm_mask, smp_processor_id()) < nr_cpu_ids) 238 if (cpumask_any_but(mm_cpumask(mm), smp_processor_id()) < nr_cpu_ids)
238 flush_tlb_others(&mm->cpu_vm_mask, mm, TLB_FLUSH_ALL); 239 flush_tlb_others(mm_cpumask(mm), mm, TLB_FLUSH_ALL);
239 preempt_enable(); 240 preempt_enable();
240} 241}
241 242
@@ -249,8 +250,8 @@ void flush_tlb_mm(struct mm_struct *mm)
249 else 250 else
250 leave_mm(smp_processor_id()); 251 leave_mm(smp_processor_id());
251 } 252 }
252 if (cpumask_any_but(&mm->cpu_vm_mask, smp_processor_id()) < nr_cpu_ids) 253 if (cpumask_any_but(mm_cpumask(mm), smp_processor_id()) < nr_cpu_ids)
253 flush_tlb_others(&mm->cpu_vm_mask, mm, TLB_FLUSH_ALL); 254 flush_tlb_others(mm_cpumask(mm), mm, TLB_FLUSH_ALL);
254 255
255 preempt_enable(); 256 preempt_enable();
256} 257}
@@ -268,8 +269,8 @@ void flush_tlb_page(struct vm_area_struct *vma, unsigned long va)
268 leave_mm(smp_processor_id()); 269 leave_mm(smp_processor_id());
269 } 270 }
270 271
271 if (cpumask_any_but(&mm->cpu_vm_mask, smp_processor_id()) < nr_cpu_ids) 272 if (cpumask_any_but(mm_cpumask(mm), smp_processor_id()) < nr_cpu_ids)
272 flush_tlb_others(&mm->cpu_vm_mask, mm, va); 273 flush_tlb_others(mm_cpumask(mm), mm, va);
273 274
274 preempt_enable(); 275 preempt_enable();
275} 276}
diff --git a/arch/x86/oprofile/op_model_ppro.c b/arch/x86/oprofile/op_model_ppro.c
index 4899215999de..8eb05878554c 100644
--- a/arch/x86/oprofile/op_model_ppro.c
+++ b/arch/x86/oprofile/op_model_ppro.c
@@ -234,11 +234,11 @@ static void arch_perfmon_setup_counters(void)
234 if (eax.split.version_id == 0 && current_cpu_data.x86 == 6 && 234 if (eax.split.version_id == 0 && current_cpu_data.x86 == 6 &&
235 current_cpu_data.x86_model == 15) { 235 current_cpu_data.x86_model == 15) {
236 eax.split.version_id = 2; 236 eax.split.version_id = 2;
237 eax.split.num_counters = 2; 237 eax.split.num_events = 2;
238 eax.split.bit_width = 40; 238 eax.split.bit_width = 40;
239 } 239 }
240 240
241 num_counters = eax.split.num_counters; 241 num_counters = eax.split.num_events;
242 242
243 op_arch_perfmon_spec.num_counters = num_counters; 243 op_arch_perfmon_spec.num_counters = num_counters;
244 op_arch_perfmon_spec.num_controls = num_counters; 244 op_arch_perfmon_spec.num_controls = num_counters;
diff --git a/arch/x86/oprofile/op_x86_model.h b/arch/x86/oprofile/op_x86_model.h
index b83776180c7f..7b8e75d16081 100644
--- a/arch/x86/oprofile/op_x86_model.h
+++ b/arch/x86/oprofile/op_x86_model.h
@@ -13,7 +13,7 @@
13#define OP_X86_MODEL_H 13#define OP_X86_MODEL_H
14 14
15#include <asm/types.h> 15#include <asm/types.h>
16#include <asm/perf_counter.h> 16#include <asm/perf_event.h>
17 17
18struct op_msr { 18struct op_msr {
19 unsigned long addr; 19 unsigned long addr;
diff --git a/arch/x86/pci/amd_bus.c b/arch/x86/pci/amd_bus.c
index 3ffa10df20b9..572ee9782f2a 100644
--- a/arch/x86/pci/amd_bus.c
+++ b/arch/x86/pci/amd_bus.c
@@ -15,63 +15,6 @@
15 * also get peer root bus resource for io,mmio 15 * also get peer root bus resource for io,mmio
16 */ 16 */
17 17
18#ifdef CONFIG_NUMA
19
20#define BUS_NR 256
21
22#ifdef CONFIG_X86_64
23
24static int mp_bus_to_node[BUS_NR];
25
26void set_mp_bus_to_node(int busnum, int node)
27{
28 if (busnum >= 0 && busnum < BUS_NR)
29 mp_bus_to_node[busnum] = node;
30}
31
32int get_mp_bus_to_node(int busnum)
33{
34 int node = -1;
35
36 if (busnum < 0 || busnum > (BUS_NR - 1))
37 return node;
38
39 node = mp_bus_to_node[busnum];
40
41 /*
42 * let numa_node_id to decide it later in dma_alloc_pages
43 * if there is no ram on that node
44 */
45 if (node != -1 && !node_online(node))
46 node = -1;
47
48 return node;
49}
50
51#else /* CONFIG_X86_32 */
52
53static unsigned char mp_bus_to_node[BUS_NR];
54
55void set_mp_bus_to_node(int busnum, int node)
56{
57 if (busnum >= 0 && busnum < BUS_NR)
58 mp_bus_to_node[busnum] = (unsigned char) node;
59}
60
61int get_mp_bus_to_node(int busnum)
62{
63 int node;
64
65 if (busnum < 0 || busnum > (BUS_NR - 1))
66 return 0;
67 node = mp_bus_to_node[busnum];
68 return node;
69}
70
71#endif /* CONFIG_X86_32 */
72
73#endif /* CONFIG_NUMA */
74
75#ifdef CONFIG_X86_64 18#ifdef CONFIG_X86_64
76 19
77/* 20/*
@@ -301,11 +244,6 @@ static int __init early_fill_mp_bus_info(void)
301 u64 val; 244 u64 val;
302 u32 address; 245 u32 address;
303 246
304#ifdef CONFIG_NUMA
305 for (i = 0; i < BUS_NR; i++)
306 mp_bus_to_node[i] = -1;
307#endif
308
309 if (!early_pci_allowed()) 247 if (!early_pci_allowed())
310 return -1; 248 return -1;
311 249
@@ -346,7 +284,7 @@ static int __init early_fill_mp_bus_info(void)
346 node = (reg >> 4) & 0x07; 284 node = (reg >> 4) & 0x07;
347#ifdef CONFIG_NUMA 285#ifdef CONFIG_NUMA
348 for (j = min_bus; j <= max_bus; j++) 286 for (j = min_bus; j <= max_bus; j++)
349 mp_bus_to_node[j] = (unsigned char) node; 287 set_mp_bus_to_node(j, node);
350#endif 288#endif
351 link = (reg >> 8) & 0x03; 289 link = (reg >> 8) & 0x03;
352 290
diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c
index 2202b6257b82..1331fcf26143 100644
--- a/arch/x86/pci/common.c
+++ b/arch/x86/pci/common.c
@@ -600,3 +600,72 @@ struct pci_bus * __devinit pci_scan_bus_with_sysdata(int busno)
600{ 600{
601 return pci_scan_bus_on_node(busno, &pci_root_ops, -1); 601 return pci_scan_bus_on_node(busno, &pci_root_ops, -1);
602} 602}
603
604/*
605 * NUMA info for PCI busses
606 *
607 * Early arch code is responsible for filling in reasonable values here.
608 * A node id of "-1" means "use current node". In other words, if a bus
609 * has a -1 node id, it's not tightly coupled to any particular chunk
610 * of memory (as is the case on some Nehalem systems).
611 */
612#ifdef CONFIG_NUMA
613
614#define BUS_NR 256
615
616#ifdef CONFIG_X86_64
617
618static int mp_bus_to_node[BUS_NR] = {
619 [0 ... BUS_NR - 1] = -1
620};
621
622void set_mp_bus_to_node(int busnum, int node)
623{
624 if (busnum >= 0 && busnum < BUS_NR)
625 mp_bus_to_node[busnum] = node;
626}
627
628int get_mp_bus_to_node(int busnum)
629{
630 int node = -1;
631
632 if (busnum < 0 || busnum > (BUS_NR - 1))
633 return node;
634
635 node = mp_bus_to_node[busnum];
636
637 /*
638 * let numa_node_id to decide it later in dma_alloc_pages
639 * if there is no ram on that node
640 */
641 if (node != -1 && !node_online(node))
642 node = -1;
643
644 return node;
645}
646
647#else /* CONFIG_X86_32 */
648
649static int mp_bus_to_node[BUS_NR] = {
650 [0 ... BUS_NR - 1] = -1
651};
652
653void set_mp_bus_to_node(int busnum, int node)
654{
655 if (busnum >= 0 && busnum < BUS_NR)
656 mp_bus_to_node[busnum] = (unsigned char) node;
657}
658
659int get_mp_bus_to_node(int busnum)
660{
661 int node;
662
663 if (busnum < 0 || busnum > (BUS_NR - 1))
664 return 0;
665 node = mp_bus_to_node[busnum];
666 return node;
667}
668
669#endif /* CONFIG_X86_32 */
670
671#endif /* CONFIG_NUMA */
diff --git a/arch/x86/pci/mmconfig-shared.c b/arch/x86/pci/mmconfig-shared.c
index 712443ec6d43..602c172d3bd5 100644
--- a/arch/x86/pci/mmconfig-shared.c
+++ b/arch/x86/pci/mmconfig-shared.c
@@ -13,10 +13,14 @@
13#include <linux/pci.h> 13#include <linux/pci.h>
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/acpi.h> 15#include <linux/acpi.h>
16#include <linux/sfi_acpi.h>
16#include <linux/bitmap.h> 17#include <linux/bitmap.h>
17#include <linux/sort.h> 18#include <linux/sort.h>
18#include <asm/e820.h> 19#include <asm/e820.h>
19#include <asm/pci_x86.h> 20#include <asm/pci_x86.h>
21#include <asm/acpi.h>
22
23#define PREFIX "PCI: "
20 24
21/* aperture is up to 256MB but BIOS may reserve less */ 25/* aperture is up to 256MB but BIOS may reserve less */
22#define MMCONFIG_APER_MIN (2 * 1024*1024) 26#define MMCONFIG_APER_MIN (2 * 1024*1024)
@@ -491,7 +495,7 @@ static void __init pci_mmcfg_reject_broken(int early)
491 (unsigned int)cfg->start_bus_number, 495 (unsigned int)cfg->start_bus_number,
492 (unsigned int)cfg->end_bus_number); 496 (unsigned int)cfg->end_bus_number);
493 497
494 if (!early) 498 if (!early && !acpi_disabled)
495 valid = is_mmconf_reserved(is_acpi_reserved, addr, size, i, cfg, 0); 499 valid = is_mmconf_reserved(is_acpi_reserved, addr, size, i, cfg, 0);
496 500
497 if (valid) 501 if (valid)
@@ -606,7 +610,7 @@ static void __init __pci_mmcfg_init(int early)
606 } 610 }
607 611
608 if (!known_bridge) 612 if (!known_bridge)
609 acpi_table_parse(ACPI_SIG_MCFG, pci_parse_mcfg); 613 acpi_sfi_table_parse(ACPI_SIG_MCFG, pci_parse_mcfg);
610 614
611 pci_mmcfg_reject_broken(early); 615 pci_mmcfg_reject_broken(early);
612 616
diff --git a/arch/x86/pci/mmconfig_32.c b/arch/x86/pci/mmconfig_32.c
index 8b2d561046a3..f10a7e94a84c 100644
--- a/arch/x86/pci/mmconfig_32.c
+++ b/arch/x86/pci/mmconfig_32.c
@@ -11,9 +11,9 @@
11 11
12#include <linux/pci.h> 12#include <linux/pci.h>
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/acpi.h>
15#include <asm/e820.h> 14#include <asm/e820.h>
16#include <asm/pci_x86.h> 15#include <asm/pci_x86.h>
16#include <acpi/acpi.h>
17 17
18/* Assume systems with more busses have correct MCFG */ 18/* Assume systems with more busses have correct MCFG */
19#define mmcfg_virt_addr ((void __iomem *) fix_to_virt(FIX_PCIE_MCFG)) 19#define mmcfg_virt_addr ((void __iomem *) fix_to_virt(FIX_PCIE_MCFG))
diff --git a/arch/x86/power/cpu.c b/arch/x86/power/cpu.c
index 417c9f5b4afa..8aa85f17667e 100644
--- a/arch/x86/power/cpu.c
+++ b/arch/x86/power/cpu.c
@@ -243,10 +243,6 @@ static void __restore_processor_state(struct saved_context *ctxt)
243 243
244 do_fpu_end(); 244 do_fpu_end();
245 mtrr_bp_restore(); 245 mtrr_bp_restore();
246
247#ifdef CONFIG_X86_OLD_MCE
248 mcheck_init(&boot_cpu_data);
249#endif
250} 246}
251 247
252/* Needed by apm.c */ 248/* Needed by apm.c */
diff --git a/arch/x86/vdso/Makefile b/arch/x86/vdso/Makefile
index 88112b49f02c..6b4ffedb93c9 100644
--- a/arch/x86/vdso/Makefile
+++ b/arch/x86/vdso/Makefile
@@ -122,7 +122,7 @@ quiet_cmd_vdso = VDSO $@
122 $(VDSO_LDFLAGS) $(VDSO_LDFLAGS_$(filter %.lds,$(^F))) \ 122 $(VDSO_LDFLAGS) $(VDSO_LDFLAGS_$(filter %.lds,$(^F))) \
123 -Wl,-T,$(filter %.lds,$^) $(filter %.o,$^) 123 -Wl,-T,$(filter %.lds,$^) $(filter %.o,$^)
124 124
125VDSO_LDFLAGS = -fPIC -shared $(call ld-option, -Wl$(comma)--hash-style=sysv) 125VDSO_LDFLAGS = -fPIC -shared $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
126GCOV_PROFILE := n 126GCOV_PROFILE := n
127 127
128# 128#
diff --git a/arch/x86/vdso/vclock_gettime.c b/arch/x86/vdso/vclock_gettime.c
index 6a40b78b46aa..ee55754cc3c5 100644
--- a/arch/x86/vdso/vclock_gettime.c
+++ b/arch/x86/vdso/vclock_gettime.c
@@ -86,14 +86,47 @@ notrace static noinline int do_monotonic(struct timespec *ts)
86 return 0; 86 return 0;
87} 87}
88 88
89notrace static noinline int do_realtime_coarse(struct timespec *ts)
90{
91 unsigned long seq;
92 do {
93 seq = read_seqbegin(&gtod->lock);
94 ts->tv_sec = gtod->wall_time_coarse.tv_sec;
95 ts->tv_nsec = gtod->wall_time_coarse.tv_nsec;
96 } while (unlikely(read_seqretry(&gtod->lock, seq)));
97 return 0;
98}
99
100notrace static noinline int do_monotonic_coarse(struct timespec *ts)
101{
102 unsigned long seq, ns, secs;
103 do {
104 seq = read_seqbegin(&gtod->lock);
105 secs = gtod->wall_time_coarse.tv_sec;
106 ns = gtod->wall_time_coarse.tv_nsec;
107 secs += gtod->wall_to_monotonic.tv_sec;
108 ns += gtod->wall_to_monotonic.tv_nsec;
109 } while (unlikely(read_seqretry(&gtod->lock, seq)));
110 vset_normalized_timespec(ts, secs, ns);
111 return 0;
112}
113
89notrace int __vdso_clock_gettime(clockid_t clock, struct timespec *ts) 114notrace int __vdso_clock_gettime(clockid_t clock, struct timespec *ts)
90{ 115{
91 if (likely(gtod->sysctl_enabled && gtod->clock.vread)) 116 if (likely(gtod->sysctl_enabled))
92 switch (clock) { 117 switch (clock) {
93 case CLOCK_REALTIME: 118 case CLOCK_REALTIME:
94 return do_realtime(ts); 119 if (likely(gtod->clock.vread))
120 return do_realtime(ts);
121 break;
95 case CLOCK_MONOTONIC: 122 case CLOCK_MONOTONIC:
96 return do_monotonic(ts); 123 if (likely(gtod->clock.vread))
124 return do_monotonic(ts);
125 break;
126 case CLOCK_REALTIME_COARSE:
127 return do_realtime_coarse(ts);
128 case CLOCK_MONOTONIC_COARSE:
129 return do_monotonic_coarse(ts);
97 } 130 }
98 return vdso_fallback_gettime(clock, ts); 131 return vdso_fallback_gettime(clock, ts);
99} 132}
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index 0dd0c2c6cae0..544eb7496531 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -912,19 +912,9 @@ static const struct pv_info xen_info __initdata = {
912 912
913static const struct pv_init_ops xen_init_ops __initdata = { 913static const struct pv_init_ops xen_init_ops __initdata = {
914 .patch = xen_patch, 914 .patch = xen_patch,
915
916 .banner = xen_banner,
917 .memory_setup = xen_memory_setup,
918 .arch_setup = xen_arch_setup,
919 .post_allocator_init = xen_post_allocator_init,
920}; 915};
921 916
922static const struct pv_time_ops xen_time_ops __initdata = { 917static const struct pv_time_ops xen_time_ops __initdata = {
923 .time_init = xen_time_init,
924
925 .set_wallclock = xen_set_wallclock,
926 .get_wallclock = xen_get_wallclock,
927 .get_tsc_khz = xen_tsc_khz,
928 .sched_clock = xen_sched_clock, 918 .sched_clock = xen_sched_clock,
929}; 919};
930 920
@@ -990,8 +980,6 @@ static const struct pv_cpu_ops xen_cpu_ops __initdata = {
990 980
991static const struct pv_apic_ops xen_apic_ops __initdata = { 981static const struct pv_apic_ops xen_apic_ops __initdata = {
992#ifdef CONFIG_X86_LOCAL_APIC 982#ifdef CONFIG_X86_LOCAL_APIC
993 .setup_boot_clock = paravirt_nop,
994 .setup_secondary_clock = paravirt_nop,
995 .startup_ipi_hook = paravirt_nop, 983 .startup_ipi_hook = paravirt_nop,
996#endif 984#endif
997}; 985};
@@ -1070,7 +1058,18 @@ asmlinkage void __init xen_start_kernel(void)
1070 pv_time_ops = xen_time_ops; 1058 pv_time_ops = xen_time_ops;
1071 pv_cpu_ops = xen_cpu_ops; 1059 pv_cpu_ops = xen_cpu_ops;
1072 pv_apic_ops = xen_apic_ops; 1060 pv_apic_ops = xen_apic_ops;
1073 pv_mmu_ops = xen_mmu_ops; 1061
1062 x86_init.resources.memory_setup = xen_memory_setup;
1063 x86_init.oem.arch_setup = xen_arch_setup;
1064 x86_init.oem.banner = xen_banner;
1065
1066 x86_init.timers.timer_init = xen_time_init;
1067 x86_init.timers.setup_percpu_clockev = x86_init_noop;
1068 x86_cpuinit.setup_percpu_clockev = x86_init_noop;
1069
1070 x86_platform.calibrate_tsc = xen_tsc_khz;
1071 x86_platform.get_wallclock = xen_get_wallclock;
1072 x86_platform.set_wallclock = xen_set_wallclock;
1074 1073
1075 /* 1074 /*
1076 * Set up some pagetable state before starting to set any ptes. 1075 * Set up some pagetable state before starting to set any ptes.
@@ -1095,6 +1094,7 @@ asmlinkage void __init xen_start_kernel(void)
1095 */ 1094 */
1096 xen_setup_stackprotector(); 1095 xen_setup_stackprotector();
1097 1096
1097 xen_init_mmu_ops();
1098 xen_init_irq_ops(); 1098 xen_init_irq_ops();
1099 xen_init_cpuid_mask(); 1099 xen_init_cpuid_mask();
1100 1100
diff --git a/arch/x86/xen/irq.c b/arch/x86/xen/irq.c
index cfd17799bd6d..9d30105a0c4a 100644
--- a/arch/x86/xen/irq.c
+++ b/arch/x86/xen/irq.c
@@ -1,5 +1,7 @@
1#include <linux/hardirq.h> 1#include <linux/hardirq.h>
2 2
3#include <asm/x86_init.h>
4
3#include <xen/interface/xen.h> 5#include <xen/interface/xen.h>
4#include <xen/interface/sched.h> 6#include <xen/interface/sched.h>
5#include <xen/interface/vcpu.h> 7#include <xen/interface/vcpu.h>
@@ -112,8 +114,6 @@ static void xen_halt(void)
112} 114}
113 115
114static const struct pv_irq_ops xen_irq_ops __initdata = { 116static const struct pv_irq_ops xen_irq_ops __initdata = {
115 .init_IRQ = xen_init_IRQ,
116
117 .save_fl = PV_CALLEE_SAVE(xen_save_fl), 117 .save_fl = PV_CALLEE_SAVE(xen_save_fl),
118 .restore_fl = PV_CALLEE_SAVE(xen_restore_fl), 118 .restore_fl = PV_CALLEE_SAVE(xen_restore_fl),
119 .irq_disable = PV_CALLEE_SAVE(xen_irq_disable), 119 .irq_disable = PV_CALLEE_SAVE(xen_irq_disable),
@@ -129,4 +129,5 @@ static const struct pv_irq_ops xen_irq_ops __initdata = {
129void __init xen_init_irq_ops() 129void __init xen_init_irq_ops()
130{ 130{
131 pv_irq_ops = xen_irq_ops; 131 pv_irq_ops = xen_irq_ops;
132 x86_init.irqs.intr_init = xen_init_IRQ;
132} 133}
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
index 4ceb28581652..3bf7b1d250ce 100644
--- a/arch/x86/xen/mmu.c
+++ b/arch/x86/xen/mmu.c
@@ -1165,14 +1165,14 @@ static void xen_drop_mm_ref(struct mm_struct *mm)
1165 /* Get the "official" set of cpus referring to our pagetable. */ 1165 /* Get the "official" set of cpus referring to our pagetable. */
1166 if (!alloc_cpumask_var(&mask, GFP_ATOMIC)) { 1166 if (!alloc_cpumask_var(&mask, GFP_ATOMIC)) {
1167 for_each_online_cpu(cpu) { 1167 for_each_online_cpu(cpu) {
1168 if (!cpumask_test_cpu(cpu, &mm->cpu_vm_mask) 1168 if (!cpumask_test_cpu(cpu, mm_cpumask(mm))
1169 && per_cpu(xen_current_cr3, cpu) != __pa(mm->pgd)) 1169 && per_cpu(xen_current_cr3, cpu) != __pa(mm->pgd))
1170 continue; 1170 continue;
1171 smp_call_function_single(cpu, drop_other_mm_ref, mm, 1); 1171 smp_call_function_single(cpu, drop_other_mm_ref, mm, 1);
1172 } 1172 }
1173 return; 1173 return;
1174 } 1174 }
1175 cpumask_copy(mask, &mm->cpu_vm_mask); 1175 cpumask_copy(mask, mm_cpumask(mm));
1176 1176
1177 /* It's possible that a vcpu may have a stale reference to our 1177 /* It's possible that a vcpu may have a stale reference to our
1178 cr3, because its in lazy mode, and it hasn't yet flushed 1178 cr3, because its in lazy mode, and it hasn't yet flushed
@@ -1229,9 +1229,12 @@ static __init void xen_pagetable_setup_start(pgd_t *base)
1229{ 1229{
1230} 1230}
1231 1231
1232static void xen_post_allocator_init(void);
1233
1232static __init void xen_pagetable_setup_done(pgd_t *base) 1234static __init void xen_pagetable_setup_done(pgd_t *base)
1233{ 1235{
1234 xen_setup_shared_info(); 1236 xen_setup_shared_info();
1237 xen_post_allocator_init();
1235} 1238}
1236 1239
1237static void xen_write_cr2(unsigned long cr2) 1240static void xen_write_cr2(unsigned long cr2)
@@ -1841,7 +1844,7 @@ static void xen_set_fixmap(unsigned idx, phys_addr_t phys, pgprot_t prot)
1841#endif 1844#endif
1842} 1845}
1843 1846
1844__init void xen_post_allocator_init(void) 1847static __init void xen_post_allocator_init(void)
1845{ 1848{
1846 pv_mmu_ops.set_pte = xen_set_pte; 1849 pv_mmu_ops.set_pte = xen_set_pte;
1847 pv_mmu_ops.set_pmd = xen_set_pmd; 1850 pv_mmu_ops.set_pmd = xen_set_pmd;
@@ -1875,10 +1878,7 @@ static void xen_leave_lazy_mmu(void)
1875 preempt_enable(); 1878 preempt_enable();
1876} 1879}
1877 1880
1878const struct pv_mmu_ops xen_mmu_ops __initdata = { 1881static const struct pv_mmu_ops xen_mmu_ops __initdata = {
1879 .pagetable_setup_start = xen_pagetable_setup_start,
1880 .pagetable_setup_done = xen_pagetable_setup_done,
1881
1882 .read_cr2 = xen_read_cr2, 1882 .read_cr2 = xen_read_cr2,
1883 .write_cr2 = xen_write_cr2, 1883 .write_cr2 = xen_write_cr2,
1884 1884
@@ -1954,6 +1954,12 @@ const struct pv_mmu_ops xen_mmu_ops __initdata = {
1954 .set_fixmap = xen_set_fixmap, 1954 .set_fixmap = xen_set_fixmap,
1955}; 1955};
1956 1956
1957void __init xen_init_mmu_ops(void)
1958{
1959 x86_init.paging.pagetable_setup_start = xen_pagetable_setup_start;
1960 x86_init.paging.pagetable_setup_done = xen_pagetable_setup_done;
1961 pv_mmu_ops = xen_mmu_ops;
1962}
1957 1963
1958#ifdef CONFIG_XEN_DEBUG_FS 1964#ifdef CONFIG_XEN_DEBUG_FS
1959 1965
diff --git a/arch/x86/xen/mmu.h b/arch/x86/xen/mmu.h
index da7302624897..5fe6bc7f5ecf 100644
--- a/arch/x86/xen/mmu.h
+++ b/arch/x86/xen/mmu.h
@@ -59,5 +59,5 @@ void xen_ptep_modify_prot_commit(struct mm_struct *mm, unsigned long addr,
59 59
60unsigned long xen_read_cr2_direct(void); 60unsigned long xen_read_cr2_direct(void);
61 61
62extern const struct pv_mmu_ops xen_mmu_ops; 62extern void xen_init_mmu_ops(void);
63#endif /* _XEN_MMU_H */ 63#endif /* _XEN_MMU_H */
diff --git a/arch/x86/xen/xen-ops.h b/arch/x86/xen/xen-ops.h
index 22494fd4c9b5..355fa6b99c9c 100644
--- a/arch/x86/xen/xen-ops.h
+++ b/arch/x86/xen/xen-ops.h
@@ -30,8 +30,6 @@ pgd_t *xen_setup_kernel_pagetable(pgd_t *pgd, unsigned long max_pfn);
30void xen_ident_map_ISA(void); 30void xen_ident_map_ISA(void);
31void xen_reserve_top(void); 31void xen_reserve_top(void);
32 32
33void xen_post_allocator_init(void);
34
35char * __init xen_memory_setup(void); 33char * __init xen_memory_setup(void);
36void __init xen_arch_setup(void); 34void __init xen_arch_setup(void);
37void __init xen_init_IRQ(void); 35void __init xen_init_IRQ(void);
diff --git a/arch/xtensa/include/asm/mman.h b/arch/xtensa/include/asm/mman.h
index 9b92620c8a1e..fca4db425f6e 100644
--- a/arch/xtensa/include/asm/mman.h
+++ b/arch/xtensa/include/asm/mman.h
@@ -53,6 +53,8 @@
53#define MAP_LOCKED 0x8000 /* pages are locked */ 53#define MAP_LOCKED 0x8000 /* pages are locked */
54#define MAP_POPULATE 0x10000 /* populate (prefault) pagetables */ 54#define MAP_POPULATE 0x10000 /* populate (prefault) pagetables */
55#define MAP_NONBLOCK 0x20000 /* do not block on IO */ 55#define MAP_NONBLOCK 0x20000 /* do not block on IO */
56#define MAP_STACK 0x40000 /* give out an address that is best suited for process/thread stacks */
57#define MAP_HUGETLB 0x80000 /* create a huge page mapping */
56 58
57/* 59/*
58 * Flags for msync 60 * Flags for msync
@@ -78,6 +80,9 @@
78#define MADV_DONTFORK 10 /* don't inherit across fork */ 80#define MADV_DONTFORK 10 /* don't inherit across fork */
79#define MADV_DOFORK 11 /* do inherit across fork */ 81#define MADV_DOFORK 11 /* do inherit across fork */
80 82
83#define MADV_MERGEABLE 12 /* KSM may merge identical pages */
84#define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages */
85
81/* compatibility flags */ 86/* compatibility flags */
82#define MAP_FILE 0 87#define MAP_FILE 0
83 88
diff --git a/arch/xtensa/kernel/Makefile b/arch/xtensa/kernel/Makefile
index fe3186de6a33..6f56d95f2c1e 100644
--- a/arch/xtensa/kernel/Makefile
+++ b/arch/xtensa/kernel/Makefile
@@ -27,7 +27,8 @@ sed-y = -e 's/(\(\.[a-z]*it\|\.ref\|\)\.text)/(\1.literal \1.text)/g' \
27 -e 's/(\(\.text\.[a-z]*\))/(\1.literal \1)/g' 27 -e 's/(\(\.text\.[a-z]*\))/(\1.literal \1)/g'
28 28
29quiet_cmd__cpp_lds_S = LDS $@ 29quiet_cmd__cpp_lds_S = LDS $@
30 cmd__cpp_lds_S = $(CPP) $(cpp_flags) -D__ASSEMBLY__ $< | sed $(sed-y) >$@ 30 cmd__cpp_lds_S = $(CPP) $(cpp_flags) -P -C -Uxtensa -D__ASSEMBLY__ $< \
31 | sed $(sed-y) >$@
31 32
32$(obj)/vmlinux.lds: $(src)/vmlinux.lds.S FORCE 33$(obj)/vmlinux.lds: $(src)/vmlinux.lds.S FORCE
33 $(call if_changed_dep,_cpp_lds_S) 34 $(call if_changed_dep,_cpp_lds_S)
diff --git a/arch/xtensa/kernel/head.S b/arch/xtensa/kernel/head.S
index d9ddc1ba761c..d215adcfd4ea 100644
--- a/arch/xtensa/kernel/head.S
+++ b/arch/xtensa/kernel/head.S
@@ -235,7 +235,7 @@ should_never_return:
235 * BSS section 235 * BSS section
236 */ 236 */
237 237
238.section ".bss.page_aligned", "w" 238__PAGE_ALIGNED_BSS
239#ifdef CONFIG_MMU 239#ifdef CONFIG_MMU
240ENTRY(swapper_pg_dir) 240ENTRY(swapper_pg_dir)
241 .fill PAGE_SIZE, 1, 0 241 .fill PAGE_SIZE, 1, 0
diff --git a/arch/xtensa/kernel/init_task.c b/arch/xtensa/kernel/init_task.c
index c4302f0e4ba0..cd122fb7e48a 100644
--- a/arch/xtensa/kernel/init_task.c
+++ b/arch/xtensa/kernel/init_task.c
@@ -23,9 +23,8 @@
23 23
24static struct signal_struct init_signals = INIT_SIGNALS(init_signals); 24static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
25static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); 25static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
26union thread_union init_thread_union 26union thread_union init_thread_union __init_task_data =
27 __attribute__((__section__(".data.init_task"))) = 27 { INIT_THREAD_INFO(init_task) };
28{ INIT_THREAD_INFO(init_task) };
29 28
30struct task_struct init_task = INIT_TASK(init_task); 29struct task_struct init_task = INIT_TASK(init_task);
31 30
diff --git a/arch/xtensa/kernel/time.c b/arch/xtensa/kernel/time.c
index 8848120d291b..19085ff0484a 100644
--- a/arch/xtensa/kernel/time.c
+++ b/arch/xtensa/kernel/time.c
@@ -59,9 +59,8 @@ static struct irqaction timer_irqaction = {
59 59
60void __init time_init(void) 60void __init time_init(void)
61{ 61{
62 xtime.tv_nsec = 0; 62 /* FIXME: xtime&wall_to_monotonic are set in timekeeping_init. */
63 xtime.tv_sec = read_persistent_clock(); 63 read_persistent_clock(&xtime);
64
65 set_normalized_timespec(&wall_to_monotonic, 64 set_normalized_timespec(&wall_to_monotonic,
66 -xtime.tv_sec, -xtime.tv_nsec); 65 -xtime.tv_sec, -xtime.tv_nsec);
67 66
diff --git a/arch/xtensa/kernel/vmlinux.lds.S b/arch/xtensa/kernel/vmlinux.lds.S
index 921b6ff3b645..9b526154c9ba 100644
--- a/arch/xtensa/kernel/vmlinux.lds.S
+++ b/arch/xtensa/kernel/vmlinux.lds.S
@@ -15,6 +15,8 @@
15 */ 15 */
16 16
17#include <asm-generic/vmlinux.lds.h> 17#include <asm-generic/vmlinux.lds.h>
18#include <asm/page.h>
19#include <asm/thread_info.h>
18 20
19#include <variant/core.h> 21#include <variant/core.h>
20#include <platform/hardware.h> 22#include <platform/hardware.h>
@@ -107,41 +109,18 @@ SECTIONS
107 109
108 .fixup : { *(.fixup) } 110 .fixup : { *(.fixup) }
109 111
110 . = ALIGN(16); 112 EXCEPTION_TABLE(16)
111
112 __ex_table : {
113 __start___ex_table = .;
114 *(__ex_table)
115 __stop___ex_table = .;
116 }
117
118 /* Data section */ 113 /* Data section */
119 114
120 . = ALIGN(XCHAL_ICACHE_LINESIZE);
121 _fdata = .; 115 _fdata = .;
122 .data : 116 RW_DATA_SECTION(XCHAL_ICACHE_LINESIZE, PAGE_SIZE, THREAD_SIZE)
123 {
124 DATA_DATA
125 CONSTRUCTORS
126 . = ALIGN(XCHAL_ICACHE_LINESIZE);
127 *(.data.cacheline_aligned)
128 }
129
130 _edata = .; 117 _edata = .;
131 118
132 /* The initial task */
133 . = ALIGN(8192);
134 .data.init_task : { *(.data.init_task) }
135
136 /* Initialization code and data: */ 119 /* Initialization code and data: */
137 120
138 . = ALIGN(1 << 12); 121 . = ALIGN(PAGE_SIZE);
139 __init_begin = .; 122 __init_begin = .;
140 .init.text : { 123 INIT_TEXT_SECTION(PAGE_SIZE)
141 _sinittext = .;
142 INIT_TEXT
143 _einittext = .;
144 }
145 124
146 .init.data : 125 .init.data :
147 { 126 {
@@ -168,36 +147,15 @@ SECTIONS
168 .DebugInterruptVector.text); 147 .DebugInterruptVector.text);
169 148
170 __boot_reloc_table_end = ABSOLUTE(.) ; 149 __boot_reloc_table_end = ABSOLUTE(.) ;
171 }
172 150
173 . = ALIGN(XCHAL_ICACHE_LINESIZE); 151 INIT_SETUP(XCHAL_ICACHE_LINESIZE)
174 152 INIT_CALLS
175 __setup_start = .; 153 CON_INITCALL
176 .init.setup : { *(.init.setup) } 154 SECURITY_INITCALL
177 __setup_end = .; 155 INIT_RAM_FS
178
179 __initcall_start = .;
180 .initcall.init : {
181 INITCALLS
182 } 156 }
183 __initcall_end = .;
184
185 __con_initcall_start = .;
186 .con_initcall.init : { *(.con_initcall.init) }
187 __con_initcall_end = .;
188
189 SECURITY_INIT
190
191
192#ifdef CONFIG_BLK_DEV_INITRD
193 . = ALIGN(4096);
194 __initramfs_start =.;
195 .init.ramfs : { *(.init.ramfs) }
196 __initramfs_end = .;
197#endif
198
199 PERCPU(4096)
200 157
158 PERCPU(PAGE_SIZE)
201 159
202 /* We need this dummy segment here */ 160 /* We need this dummy segment here */
203 161
@@ -252,16 +210,11 @@ SECTIONS
252 .DoubleExceptionVector.literal) 210 .DoubleExceptionVector.literal)
253 211
254 . = (LOADADDR( .DoubleExceptionVector.text ) + SIZEOF( .DoubleExceptionVector.text ) + 3) & ~ 3; 212 . = (LOADADDR( .DoubleExceptionVector.text ) + SIZEOF( .DoubleExceptionVector.text ) + 3) & ~ 3;
255 . = ALIGN(1 << 12); 213 . = ALIGN(PAGE_SIZE);
256 214
257 __init_end = .; 215 __init_end = .;
258 216
259 . = ALIGN(8192); 217 BSS_SECTION(0, 8192, 0)
260
261 /* BSS section */
262 _bss_start = .;
263 .bss : { *(.bss.page_aligned) *(.bss) }
264 _bss_end = .;
265 218
266 _end = .; 219 _end = .;
267 220
diff --git a/arch/xtensa/mm/init.c b/arch/xtensa/mm/init.c
index 427e14fa43c5..cdbc27ca9665 100644
--- a/arch/xtensa/mm/init.c
+++ b/arch/xtensa/mm/init.c
@@ -203,7 +203,7 @@ void __init mem_init(void)
203 203
204 printk("Memory: %luk/%luk available (%ldk kernel code, %ldk reserved, " 204 printk("Memory: %luk/%luk available (%ldk kernel code, %ldk reserved, "
205 "%ldk data, %ldk init %ldk highmem)\n", 205 "%ldk data, %ldk init %ldk highmem)\n",
206 (unsigned long) nr_free_pages() << (PAGE_SHIFT-10), 206 nr_free_pages() << (PAGE_SHIFT-10),
207 ram << (PAGE_SHIFT-10), 207 ram << (PAGE_SHIFT-10),
208 codesize >> 10, 208 codesize >> 10,
209 reservedpages << (PAGE_SHIFT-10), 209 reservedpages << (PAGE_SHIFT-10),