aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/Kconfig30
-rw-r--r--arch/arm/Makefile3
-rw-r--r--arch/arm/boot/compressed/head.S12
-rw-r--r--arch/arm/common/clkdev.c1
-rw-r--r--arch/arm/common/it8152.c1
-rw-r--r--arch/arm/common/locomo.c10
-rw-r--r--arch/arm/configs/bcmring_defconfig126
-rw-r--r--arch/arm/configs/cns3420vb_defconfig831
-rw-r--r--arch/arm/configs/imote2_defconfig172
-rw-r--r--arch/arm/configs/mmp2_defconfig75
-rw-r--r--arch/arm/configs/n8x0_defconfig1
-rw-r--r--arch/arm/configs/omap_zoom2_defconfig2
-rw-r--r--arch/arm/configs/omap_zoom3_defconfig2
-rw-r--r--arch/arm/configs/rx51_defconfig3
-rw-r--r--arch/arm/include/asm/assembler.h12
-rw-r--r--arch/arm/include/asm/cacheflush.h38
-rw-r--r--arch/arm/include/asm/clkdev.h1
-rw-r--r--arch/arm/include/asm/elf.h2
-rw-r--r--arch/arm/include/asm/futex.h16
-rw-r--r--arch/arm/include/asm/highmem.h15
-rw-r--r--arch/arm/include/asm/irq.h1
-rw-r--r--arch/arm/include/asm/kmap_types.h1
-rw-r--r--arch/arm/include/asm/outercache.h75
-rw-r--r--arch/arm/include/asm/system.h16
-rw-r--r--arch/arm/include/asm/uaccess.h40
-rw-r--r--arch/arm/include/asm/ucontext.h23
-rw-r--r--arch/arm/include/asm/user.h12
-rw-r--r--arch/arm/kernel/entry-armv.S12
-rw-r--r--arch/arm/kernel/ftrace.c8
-rw-r--r--arch/arm/kernel/irq.c1
-rw-r--r--arch/arm/kernel/kprobes.c11
-rw-r--r--arch/arm/kernel/module.c2
-rw-r--r--arch/arm/kernel/process.c9
-rw-r--r--arch/arm/kernel/signal.c93
-rw-r--r--arch/arm/kernel/smp.c6
-rw-r--r--arch/arm/kernel/sys_arm.c2
-rw-r--r--arch/arm/lib/backtrace.S4
-rw-r--r--arch/arm/lib/clear_user.S4
-rw-r--r--arch/arm/lib/copy_from_user.S4
-rw-r--r--arch/arm/lib/copy_to_user.S4
-rw-r--r--arch/arm/lib/csumpartialcopyuser.S4
-rw-r--r--arch/arm/lib/getuser.S4
-rw-r--r--arch/arm/lib/memmove.S4
-rw-r--r--arch/arm/lib/putuser.S4
-rw-r--r--arch/arm/lib/strncpy_from_user.S4
-rw-r--r--arch/arm/lib/strnlen_user.S4
-rw-r--r--arch/arm/lib/uaccess.S8
-rw-r--r--arch/arm/lib/uaccess_with_memcpy.c1
-rw-r--r--arch/arm/mach-aaec2000/core.c1
-rw-r--r--arch/arm/mach-at91/Makefile4
-rw-r--r--arch/arm/mach-at91/pm_slowclock.S16
-rw-r--r--arch/arm/mach-bcmring/dma.c14
-rw-r--r--arch/arm/mach-cns3xxx/Kconfig12
-rw-r--r--arch/arm/mach-cns3xxx/Makefile2
-rw-r--r--arch/arm/mach-cns3xxx/Makefile.boot3
-rw-r--r--arch/arm/mach-cns3xxx/cns3420vb.c148
-rw-r--r--arch/arm/mach-cns3xxx/core.c249
-rw-r--r--arch/arm/mach-cns3xxx/core.h23
-rw-r--r--arch/arm/mach-cns3xxx/include/mach/cns3xxx.h635
-rw-r--r--arch/arm/mach-cns3xxx/include/mach/debug-macro.S21
-rw-r--r--arch/arm/mach-cns3xxx/include/mach/entry-macro.S82
-rw-r--r--arch/arm/mach-cns3xxx/include/mach/hardware.h22
-rw-r--r--arch/arm/mach-cns3xxx/include/mach/io.h17
-rw-r--r--arch/arm/mach-cns3xxx/include/mach/irqs.h24
-rw-r--r--arch/arm/mach-cns3xxx/include/mach/memory.h26
-rw-r--r--arch/arm/mach-cns3xxx/include/mach/system.h29
-rw-r--r--arch/arm/mach-cns3xxx/include/mach/timex.h12
-rw-r--r--arch/arm/mach-cns3xxx/include/mach/uncompress.h55
-rw-r--r--arch/arm/mach-cns3xxx/include/mach/vmalloc.h11
-rw-r--r--arch/arm/mach-cns3xxx/pm.c86
-rw-r--r--arch/arm/mach-davinci/board-dm365-evm.c1
-rw-r--r--arch/arm/mach-davinci/dm365.c1
-rw-r--r--arch/arm/mach-davinci/dma.c4
-rw-r--r--arch/arm/mach-davinci/include/mach/da8xx.h8
-rw-r--r--arch/arm/mach-davinci/time.c6
-rw-r--r--arch/arm/mach-ep93xx/gpio.c6
-rw-r--r--arch/arm/mach-h720x/common.c1
-rw-r--r--arch/arm/mach-integrator/cpu.c1
-rw-r--r--arch/arm/mach-integrator/impd1.c1
-rw-r--r--arch/arm/mach-integrator/integrator_cp.c2
-rw-r--r--arch/arm/mach-integrator/pci_v3.c1
-rw-r--r--arch/arm/mach-iop13xx/pci.c1
-rw-r--r--arch/arm/mach-iop32x/glantank.c1
-rw-r--r--arch/arm/mach-iop32x/iq31244.c1
-rw-r--r--arch/arm/mach-iop32x/iq80321.c1
-rw-r--r--arch/arm/mach-iop32x/n2100.c1
-rw-r--r--arch/arm/mach-iop33x/iq80331.c1
-rw-r--r--arch/arm/mach-iop33x/iq80332.c1
-rw-r--r--arch/arm/mach-ixp2000/enp2611.c1
-rw-r--r--arch/arm/mach-ixp2000/ixdp2400.c1
-rw-r--r--arch/arm/mach-ixp2000/ixdp2800.c1
-rw-r--r--arch/arm/mach-ixp2000/ixdp2x00.c1
-rw-r--r--arch/arm/mach-ixp2000/ixdp2x01.c1
-rw-r--r--arch/arm/mach-ixp2000/pci.c1
-rw-r--r--arch/arm/mach-ixp23xx/include/mach/memory.h2
-rw-r--r--arch/arm/mach-ixp23xx/pci.c1
-rw-r--r--arch/arm/mach-ixp4xx/avila-setup.c1
-rw-r--r--arch/arm/mach-ixp4xx/coyote-setup.c1
-rw-r--r--arch/arm/mach-ixp4xx/gateway7001-setup.c1
-rw-r--r--arch/arm/mach-ixp4xx/gtwx5715-setup.c1
-rw-r--r--arch/arm/mach-ixp4xx/ixdp425-setup.c1
-rw-r--r--arch/arm/mach-ixp4xx/ixp4xx_npe.c1
-rw-r--r--arch/arm/mach-ixp4xx/wg302v2-setup.c1
-rw-r--r--arch/arm/mach-kirkwood/Kconfig18
-rw-r--r--arch/arm/mach-kirkwood/Makefile3
-rw-r--r--arch/arm/mach-kirkwood/guruplug-setup.c131
-rw-r--r--arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c4
-rw-r--r--arch/arm/mach-kirkwood/netxbig_v2-setup.c415
-rw-r--r--arch/arm/mach-kirkwood/pcie.c1
-rw-r--r--arch/arm/mach-lh7a40x/clcd.c1
-rw-r--r--arch/arm/mach-mmp/aspenite.c13
-rw-r--r--arch/arm/mach-mmp/include/mach/gpio.h2
-rw-r--r--arch/arm/mach-mmp/include/mach/irqs.h10
-rw-r--r--arch/arm/mach-mmp/include/mach/mfp-mmp2.h187
-rw-r--r--arch/arm/mach-mmp/include/mach/mmp2.h14
-rw-r--r--arch/arm/mach-mmp/include/mach/pxa168.h21
-rw-r--r--arch/arm/mach-mmp/include/mach/regs-apbc.h10
-rw-r--r--arch/arm/mach-mmp/include/mach/regs-smc.h37
-rw-r--r--arch/arm/mach-mmp/include/mach/timex.h4
-rw-r--r--arch/arm/mach-mmp/include/mach/uncompress.h5
-rw-r--r--arch/arm/mach-mmp/jasper.c64
-rw-r--r--arch/arm/mach-mmp/mmp2.c52
-rw-r--r--arch/arm/mach-mmp/pxa168.c15
-rw-r--r--arch/arm/mach-msm/Kconfig2
-rw-r--r--arch/arm/mach-mx3/Kconfig10
-rw-r--r--arch/arm/mach-mx3/clock-imx31.c5
-rw-r--r--arch/arm/mach-mx3/devices.c19
-rw-r--r--arch/arm/mach-mx3/devices.h3
-rw-r--r--arch/arm/mach-mx3/mach-armadillo5x0.c166
-rw-r--r--arch/arm/mach-mx3/mach-mx31_3ds.c116
-rw-r--r--arch/arm/mach-mx3/mach-mx31moboard.c1
-rw-r--r--arch/arm/mach-mx3/mach-pcm037.c2
-rw-r--r--arch/arm/mach-mx3/mx31lite-db.c2
-rw-r--r--arch/arm/mach-mx3/mx31moboard-devboard.c1
-rw-r--r--arch/arm/mach-mx3/mx31moboard-marxbot.c1
-rw-r--r--arch/arm/mach-mx5/clock-mx51.c3
-rw-r--r--arch/arm/mach-mx5/cpu.c53
-rw-r--r--arch/arm/mach-mx5/mm.c32
-rw-r--r--arch/arm/mach-netx/fb.c1
-rw-r--r--arch/arm/mach-netx/xc.c1
-rw-r--r--arch/arm/mach-ns9xxx/plat-serial8250.c1
-rw-r--r--arch/arm/mach-ns9xxx/processor-ns9360.c1
-rw-r--r--arch/arm/mach-omap1/mcbsp.c1
-rw-r--r--arch/arm/mach-omap1/timer32k.c15
-rw-r--r--arch/arm/mach-omap2/Kconfig6
-rw-r--r--arch/arm/mach-omap2/board-3630sdp.c1
-rw-r--r--arch/arm/mach-omap2/board-am3517evm.c4
-rw-r--r--arch/arm/mach-omap2/board-devkit8000.c39
-rw-r--r--arch/arm/mach-omap2/board-igep0020.c8
-rw-r--r--arch/arm/mach-omap2/board-n8x0.c18
-rw-r--r--arch/arm/mach-omap2/board-sdp-flash.c8
-rw-r--r--arch/arm/mach-omap2/board-zoom-debugboard.c2
-rw-r--r--arch/arm/mach-omap2/board-zoom-peripherals.c1
-rw-r--r--arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c1
-rw-r--r--arch/arm/mach-omap2/clock3xxx_data.c2
-rw-r--r--arch/arm/mach-omap2/clock44xx_data.c8
-rw-r--r--arch/arm/mach-omap2/clockdomain.c6
-rw-r--r--arch/arm/mach-omap2/devices.c2
-rw-r--r--arch/arm/mach-omap2/gpmc-nand.c3
-rw-r--r--arch/arm/mach-omap2/include/mach/entry-macro.S2
-rw-r--r--arch/arm/mach-omap2/iommu2.c1
-rw-r--r--arch/arm/mach-omap2/mcbsp.c1
-rw-r--r--arch/arm/mach-omap2/mux.c1
-rw-r--r--arch/arm/mach-omap2/omap-headsmp.S6
-rw-r--r--arch/arm/mach-omap2/omap44xx-smc.S2
-rw-r--r--arch/arm/mach-omap2/omap_hwmod.c3
-rw-r--r--arch/arm/mach-omap2/pm-debug.c1
-rw-r--r--arch/arm/mach-omap2/pm34xx.c1
-rw-r--r--arch/arm/mach-omap2/powerdomain.c2
-rw-r--r--arch/arm/mach-omap2/prcm.c4
-rw-r--r--arch/arm/mach-omap2/serial.c35
-rw-r--r--arch/arm/mach-orion5x/dns323-setup.c1
-rw-r--r--arch/arm/mach-orion5x/pci.c1
-rw-r--r--arch/arm/mach-orion5x/wrt350n-v2-setup.c2
-rw-r--r--arch/arm/mach-pnx4008/dma.c1
-rw-r--r--arch/arm/mach-pnx4008/pm.c1
-rw-r--r--arch/arm/mach-pxa/Kconfig64
-rw-r--r--arch/arm/mach-pxa/Makefile4
-rw-r--r--arch/arm/mach-pxa/cm-x300.c104
-rw-r--r--arch/arm/mach-pxa/colibri-pxa3xx.c2
-rw-r--r--arch/arm/mach-pxa/corgi.c56
-rw-r--r--arch/arm/mach-pxa/corgi_lcd.c288
-rw-r--r--arch/arm/mach-pxa/corgi_pm.c77
-rw-r--r--arch/arm/mach-pxa/corgi_ssp.c275
-rw-r--r--arch/arm/mach-pxa/cpufreq-pxa3xx.c1
-rw-r--r--arch/arm/mach-pxa/csb726.c11
-rw-r--r--arch/arm/mach-pxa/em-x270.c2
-rw-r--r--arch/arm/mach-pxa/generic.c31
-rw-r--r--arch/arm/mach-pxa/imote2.c4
-rw-r--r--arch/arm/mach-pxa/include/mach/colibri.h1
-rw-r--r--arch/arm/mach-pxa/include/mach/corgi.h1
-rw-r--r--arch/arm/mach-pxa/include/mach/hardware.h2
-rw-r--r--arch/arm/mach-pxa/include/mach/mfp-pxa2xx.h2
-rw-r--r--arch/arm/mach-pxa/include/mach/mmc.h2
-rw-r--r--arch/arm/mach-pxa/include/mach/pxa2xx-gpio.h375
-rw-r--r--arch/arm/mach-pxa/include/mach/regs-u2d.h3
-rw-r--r--arch/arm/mach-pxa/include/mach/ssp.h109
-rw-r--r--arch/arm/mach-pxa/include/mach/tosa.h2
-rw-r--r--arch/arm/mach-pxa/include/mach/uncompress.h11
-rw-r--r--arch/arm/mach-pxa/include/mach/vpac270.h42
-rw-r--r--arch/arm/mach-pxa/include/mach/z2.h41
-rw-r--r--arch/arm/mach-pxa/littleton.c3
-rw-r--r--arch/arm/mach-pxa/lubbock.c2
-rw-r--r--arch/arm/mach-pxa/mfp-pxa2xx.c43
-rw-r--r--arch/arm/mach-pxa/mioa701.c3
-rw-r--r--arch/arm/mach-pxa/mxm8x10.c2
-rw-r--r--arch/arm/mach-pxa/palmld.c2
-rw-r--r--arch/arm/mach-pxa/palmt5.c2
-rw-r--r--arch/arm/mach-pxa/palmtc.c2
-rw-r--r--arch/arm/mach-pxa/palmtx.c2
-rw-r--r--arch/arm/mach-pxa/pcm990-baseboard.c2
-rw-r--r--arch/arm/mach-pxa/pm.c1
-rw-r--r--arch/arm/mach-pxa/poodle.c5
-rw-r--r--arch/arm/mach-pxa/pxa3xx.c1
-rw-r--r--arch/arm/mach-pxa/raumfeld.c11
-rw-r--r--arch/arm/mach-pxa/sharpsl.h23
-rw-r--r--arch/arm/mach-pxa/sharpsl_pm.c1
-rw-r--r--arch/arm/mach-pxa/spitz.c8
-rw-r--r--arch/arm/mach-pxa/spitz_pm.c28
-rw-r--r--arch/arm/mach-pxa/ssp.c510
-rw-r--r--arch/arm/mach-pxa/stargate2.c10
-rw-r--r--arch/arm/mach-pxa/tosa.c2
-rw-r--r--arch/arm/mach-pxa/trizeps4.c2
-rw-r--r--arch/arm/mach-pxa/viper.c6
-rw-r--r--arch/arm/mach-pxa/vpac270.c615
-rw-r--r--arch/arm/mach-pxa/z2.c609
-rw-r--r--arch/arm/mach-pxa/zeus.c2
-rw-r--r--arch/arm/mach-pxa/zylonite.c6
-rw-r--r--arch/arm/mach-realview/core.c3
-rw-r--r--arch/arm/mach-rpc/dma.c1
-rw-r--r--arch/arm/mach-s3c2410/Kconfig1
-rw-r--r--arch/arm/mach-s3c2410/h1940-bluetooth.c32
-rw-r--r--arch/arm/mach-s3c2410/include/mach/dma.h2
-rw-r--r--arch/arm/mach-s3c2410/include/mach/gpio-fns.h47
-rw-r--r--arch/arm/mach-s3c2410/include/mach/gpio-nrs.h12
-rw-r--r--arch/arm/mach-s3c2410/include/mach/irqs.h25
-rw-r--r--arch/arm/mach-s3c2410/include/mach/map.h5
-rw-r--r--arch/arm/mach-s3c2410/include/mach/regs-clock.h2
-rw-r--r--arch/arm/mach-s3c2410/include/mach/regs-dsc.h36
-rw-r--r--arch/arm/mach-s3c2410/include/mach/regs-gpio.h45
-rw-r--r--arch/arm/mach-s3c2410/include/mach/regs-gpioj.h36
-rw-r--r--arch/arm/mach-s3c2410/include/mach/regs-irq.h10
-rw-r--r--arch/arm/mach-s3c2410/include/mach/regs-s3c2416-mem.h30
-rw-r--r--arch/arm/mach-s3c2410/include/mach/regs-s3c2416.h24
-rw-r--r--arch/arm/mach-s3c2410/include/mach/uncompress.h4
-rw-r--r--arch/arm/mach-s3c2410/mach-amlm5900.c5
-rw-r--r--arch/arm/mach-s3c2410/mach-bast.c9
-rw-r--r--arch/arm/mach-s3c2410/mach-h1940.c20
-rw-r--r--arch/arm/mach-s3c2410/mach-n30.c7
-rw-r--r--arch/arm/mach-s3c2410/mach-qt2410.c10
-rw-r--r--arch/arm/mach-s3c2410/mach-vr1000.c5
-rw-r--r--arch/arm/mach-s3c2410/s3c2410.c8
-rw-r--r--arch/arm/mach-s3c2412/Kconfig3
-rw-r--r--arch/arm/mach-s3c2412/mach-jive.c26
-rw-r--r--arch/arm/mach-s3c2412/mach-smdk2413.c8
-rw-r--r--arch/arm/mach-s3c2416/Kconfig38
-rw-r--r--arch/arm/mach-s3c2416/Makefile19
-rw-r--r--arch/arm/mach-s3c2416/clock.c135
-rw-r--r--arch/arm/mach-s3c2416/irq.c254
-rw-r--r--arch/arm/mach-s3c2416/mach-smdk2416.c150
-rw-r--r--arch/arm/mach-s3c2416/s3c2416.c128
-rw-r--r--arch/arm/mach-s3c2440/Kconfig1
-rw-r--r--arch/arm/mach-s3c2440/mach-mini2440.c23
-rw-r--r--arch/arm/mach-s3c2440/mach-nexcoder.c9
-rw-r--r--arch/arm/mach-s3c2440/mach-osiris.c5
-rw-r--r--arch/arm/mach-s3c2440/s3c2440.c8
-rw-r--r--arch/arm/mach-s3c2443/Kconfig1
-rw-r--r--arch/arm/mach-s3c2443/clock.c479
-rw-r--r--arch/arm/mach-s3c64xx/dma.c1
-rw-r--r--arch/arm/mach-s3c64xx/gpiolib.c6
-rw-r--r--arch/arm/mach-s3c64xx/include/mach/pll.h35
-rw-r--r--arch/arm/mach-s5p6440/gpio.c5
-rw-r--r--arch/arm/mach-sa1100/Kconfig4
-rw-r--r--arch/arm/mach-sa1100/cpu-sa1110.c3
-rw-r--r--arch/arm/mach-sa1100/jornada720_ssp.c1
-rw-r--r--arch/arm/mach-sa1100/neponset.c1
-rw-r--r--arch/arm/mach-u300/dummyspichip.c1
-rw-r--r--arch/arm/mach-u300/mmc.c1
-rw-r--r--arch/arm/mach-versatile/core.c1
-rw-r--r--arch/arm/mach-versatile/pci.c1
-rw-r--r--arch/arm/mach-w90x900/dev.c1
-rw-r--r--arch/arm/mm/Kconfig17
-rw-r--r--arch/arm/mm/abort-ev7.S21
-rw-r--r--arch/arm/mm/alignment.c24
-rw-r--r--arch/arm/mm/cache-l2x0.c10
-rw-r--r--arch/arm/mm/copypage-fa.c2
-rw-r--r--arch/arm/mm/copypage-v6.c9
-rw-r--r--arch/arm/mm/dma-mapping.c7
-rw-r--r--arch/arm/mm/fault-armv.c1
-rw-r--r--arch/arm/mm/flush.c25
-rw-r--r--arch/arm/mm/highmem.c87
-rw-r--r--arch/arm/mm/init.c15
-rw-r--r--arch/arm/mm/mmu.c14
-rw-r--r--arch/arm/mm/pgd.c1
-rw-r--r--arch/arm/mm/proc-sa1100.S2
-rw-r--r--arch/arm/nwfpe/entry.S8
-rw-r--r--arch/arm/plat-mxc/audmux-v2.c1
-rw-r--r--arch/arm/plat-mxc/include/mach/board-mx31_3ds.h (renamed from arch/arm/plat-mxc/include/mach/board-mx31pdk.h)6
-rw-r--r--arch/arm/plat-mxc/include/mach/dma-mx1-mx2.h8
-rw-r--r--arch/arm/plat-mxc/include/mach/mx51.h33
-rw-r--r--arch/arm/plat-mxc/include/mach/uncompress.h4
-rw-r--r--arch/arm/plat-mxc/pwm.c1
-rw-r--r--arch/arm/plat-nomadik/gpio.c1
-rw-r--r--arch/arm/plat-omap/common.c22
-rw-r--r--arch/arm/plat-omap/devices.c1
-rw-r--r--arch/arm/plat-omap/dma.c10
-rw-r--r--arch/arm/plat-omap/gpio.c6
-rw-r--r--arch/arm/plat-omap/include/plat/irqs.h2
-rw-r--r--arch/arm/plat-omap/include/plat/mcbsp.h2
-rw-r--r--arch/arm/plat-omap/include/plat/nand.h7
-rw-r--r--arch/arm/plat-omap/include/plat/omap44xx.h2
-rw-r--r--arch/arm/plat-omap/include/plat/omap_hwmod.h2
-rw-r--r--arch/arm/plat-omap/include/plat/usb.h2
-rw-r--r--arch/arm/plat-omap/iommu-debug.c1
-rw-r--r--arch/arm/plat-omap/iommu.c1
-rw-r--r--arch/arm/plat-omap/iovmm.c1
-rw-r--r--arch/arm/plat-omap/mailbox.c1
-rw-r--r--arch/arm/plat-omap/mcbsp.c1
-rw-r--r--arch/arm/plat-omap/omap_device.c1
-rw-r--r--arch/arm/plat-pxa/Kconfig5
-rw-r--r--arch/arm/plat-pxa/Makefile1
-rw-r--r--arch/arm/plat-pxa/dma.c3
-rw-r--r--arch/arm/plat-pxa/include/plat/mfp.h7
-rw-r--r--arch/arm/plat-pxa/include/plat/ssp.h (renamed from arch/arm/mach-pxa/include/mach/regs-ssp.h)128
-rw-r--r--arch/arm/plat-pxa/mfp.c1
-rw-r--r--arch/arm/plat-pxa/pwm.c1
-rw-r--r--arch/arm/plat-pxa/ssp.c224
-rw-r--r--arch/arm/plat-s3c24xx/Kconfig7
-rw-r--r--arch/arm/plat-s3c24xx/Makefile1
-rw-r--r--arch/arm/plat-s3c24xx/common-smdk.c9
-rw-r--r--arch/arm/plat-s3c24xx/cpu-freq.c1
-rw-r--r--arch/arm/plat-s3c24xx/cpu.c21
-rw-r--r--arch/arm/plat-s3c24xx/devs.c1
-rw-r--r--arch/arm/plat-s3c24xx/gpio.c144
-rw-r--r--arch/arm/plat-s3c24xx/gpiolib.c60
-rw-r--r--arch/arm/plat-s3c24xx/include/plat/pll.h25
-rw-r--r--arch/arm/plat-s3c24xx/include/plat/s3c2416.h31
-rw-r--r--arch/arm/plat-s3c24xx/include/plat/s3c2443.h19
-rw-r--r--arch/arm/plat-s3c24xx/pm.c9
-rw-r--r--arch/arm/plat-s3c24xx/s3c2410-clock.c15
-rw-r--r--arch/arm/plat-s3c24xx/s3c2410-iotiming.c1
-rw-r--r--arch/arm/plat-s3c24xx/s3c2412-iotiming.c1
-rw-r--r--arch/arm/plat-s3c24xx/s3c2443-clock.c472
-rw-r--r--arch/arm/plat-s3c24xx/setup-i2c.c5
-rw-r--r--arch/arm/plat-s3c24xx/spi-bus0-gpe11_12_13.c16
-rw-r--r--arch/arm/plat-s3c24xx/spi-bus1-gpd8_9_10.c16
-rw-r--r--arch/arm/plat-s3c24xx/spi-bus1-gpg5_6_7.c16
-rw-r--r--arch/arm/plat-samsung/adc.c1
-rw-r--r--arch/arm/plat-samsung/clock.c15
-rw-r--r--arch/arm/plat-samsung/dev-fb.c1
-rw-r--r--arch/arm/plat-samsung/dev-i2c0.c1
-rw-r--r--arch/arm/plat-samsung/dev-i2c1.c1
-rw-r--r--arch/arm/plat-samsung/dev-nand.c1
-rw-r--r--arch/arm/plat-samsung/dev-usb.c1
-rw-r--r--arch/arm/plat-samsung/gpio-config.c103
-rw-r--r--arch/arm/plat-samsung/include/plat/clock.h1
-rw-r--r--arch/arm/plat-samsung/include/plat/cpu.h1
-rw-r--r--arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h58
-rw-r--r--arch/arm/plat-samsung/include/plat/gpio-cfg.h11
-rw-r--r--arch/arm/plat-samsung/include/plat/gpio-core.h3
-rw-r--r--arch/arm/plat-samsung/include/plat/pll6553x.h51
-rw-r--r--arch/arm/plat-samsung/pm-check.c1
-rw-r--r--arch/arm/plat-samsung/pwm.c1
-rw-r--r--arch/arm/plat-stmp3xxx/dma.c1
-rw-r--r--arch/arm/tools/mach-types130
-rw-r--r--arch/arm/vfp/vfpmodule.c33
366 files changed, 8686 insertions, 3346 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 2b3157b5089a..492f81344900 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -241,6 +241,7 @@ config ARCH_REALVIEW
241 select ARCH_WANT_OPTIONAL_GPIOLIB 241 select ARCH_WANT_OPTIONAL_GPIOLIB
242 select PLAT_VERSATILE 242 select PLAT_VERSATILE
243 select ARM_TIMER_SP804 243 select ARM_TIMER_SP804
244 select GPIO_PL061 if GPIOLIB
244 help 245 help
245 This enables support for ARM Ltd RealView boards. 246 This enables support for ARM Ltd RealView boards.
246 247
@@ -300,6 +301,15 @@ config ARCH_CLPS711X
300 help 301 help
301 Support for Cirrus Logic 711x/721x based boards. 302 Support for Cirrus Logic 711x/721x based boards.
302 303
304config ARCH_CNS3XXX
305 bool "Cavium Networks CNS3XXX family"
306 select CPU_V6
307 select GENERIC_TIME
308 select GENERIC_CLOCKEVENTS
309 select ARM_GIC
310 help
311 Support for Cavium Networks CNS3XXX platform.
312
303config ARCH_GEMINI 313config ARCH_GEMINI
304 bool "Cortina Systems Gemini" 314 bool "Cortina Systems Gemini"
305 select CPU_FA526 315 select CPU_FA526
@@ -593,14 +603,15 @@ config ARCH_PXA
593 603
594config ARCH_MSM 604config ARCH_MSM
595 bool "Qualcomm MSM" 605 bool "Qualcomm MSM"
596 select CPU_V6 606 select HAVE_CLK
597 select GENERIC_TIME 607 select GENERIC_TIME
598 select GENERIC_CLOCKEVENTS 608 select GENERIC_CLOCKEVENTS
599 help 609 help
600 Support for Qualcomm MSM7K based systems. This runs on the ARM11 610 Support for Qualcomm MSM/QSD based systems. This runs on the
601 apps processor of the MSM7K and depends on a shared memory 611 apps processor of the MSM/QSD and depends on a shared memory
602 interface to the ARM9 modem processor which runs the baseband stack 612 interface to the modem processor which runs the baseband
603 and controls some vital subsystems (clock and power control, etc). 613 stack and controls some vital subsystems
614 (clock and power control, etc).
604 615
605config ARCH_SHMOBILE 616config ARCH_SHMOBILE
606 bool "Renesas SH-Mobile" 617 bool "Renesas SH-Mobile"
@@ -639,7 +650,7 @@ config ARCH_SA1100
639 Support for StrongARM 11x0 based boards. 650 Support for StrongARM 11x0 based boards.
640 651
641config ARCH_S3C2410 652config ARCH_S3C2410
642 bool "Samsung S3C2410, S3C2412, S3C2413, S3C2440, S3C2442, S3C2443" 653 bool "Samsung S3C2410, S3C2412, S3C2413, S3C2416, S3C2440, S3C2442, S3C2443, S3C2450"
643 select GENERIC_GPIO 654 select GENERIC_GPIO
644 select ARCH_HAS_CPUFREQ 655 select ARCH_HAS_CPUFREQ
645 select HAVE_CLK 656 select HAVE_CLK
@@ -649,6 +660,10 @@ config ARCH_S3C2410
649 BAST (<http://www.simtec.co.uk/products/EB110ITX/>), the IPAQ 1940 or 660 BAST (<http://www.simtec.co.uk/products/EB110ITX/>), the IPAQ 1940 or
650 the Samsung SMDK2410 development board (and derivatives). 661 the Samsung SMDK2410 development board (and derivatives).
651 662
663 Note, the S3C2416 and the S3C2450 are so close that they even share
664 the same SoC ID code. This means that there is no seperate machine
665 directory (no arch/arm/mach-s3c2450) as the S3C2416 was first.
666
652config ARCH_S3C64XX 667config ARCH_S3C64XX
653 bool "Samsung S3C64XX" 668 bool "Samsung S3C64XX"
654 select PLAT_SAMSUNG 669 select PLAT_SAMSUNG
@@ -818,6 +833,8 @@ source "arch/arm/mach-bcmring/Kconfig"
818 833
819source "arch/arm/mach-clps711x/Kconfig" 834source "arch/arm/mach-clps711x/Kconfig"
820 835
836source "arch/arm/mach-cns3xxx/Kconfig"
837
821source "arch/arm/mach-davinci/Kconfig" 838source "arch/arm/mach-davinci/Kconfig"
822 839
823source "arch/arm/mach-dove/Kconfig" 840source "arch/arm/mach-dove/Kconfig"
@@ -894,6 +911,7 @@ if ARCH_S3C2410
894source "arch/arm/mach-s3c2400/Kconfig" 911source "arch/arm/mach-s3c2400/Kconfig"
895source "arch/arm/mach-s3c2410/Kconfig" 912source "arch/arm/mach-s3c2410/Kconfig"
896source "arch/arm/mach-s3c2412/Kconfig" 913source "arch/arm/mach-s3c2412/Kconfig"
914source "arch/arm/mach-s3c2416/Kconfig"
897source "arch/arm/mach-s3c2440/Kconfig" 915source "arch/arm/mach-s3c2440/Kconfig"
898source "arch/arm/mach-s3c2443/Kconfig" 916source "arch/arm/mach-s3c2443/Kconfig"
899endif 917endif
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 219cb4ee7e32..d5af3b024300 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -121,6 +121,7 @@ machine-$(CONFIG_ARCH_AAEC2000) := aaec2000
121machine-$(CONFIG_ARCH_AT91) := at91 121machine-$(CONFIG_ARCH_AT91) := at91
122machine-$(CONFIG_ARCH_BCMRING) := bcmring 122machine-$(CONFIG_ARCH_BCMRING) := bcmring
123machine-$(CONFIG_ARCH_CLPS711X) := clps711x 123machine-$(CONFIG_ARCH_CLPS711X) := clps711x
124machine-$(CONFIG_ARCH_CNS3XXX) := cns3xxx
124machine-$(CONFIG_ARCH_DAVINCI) := davinci 125machine-$(CONFIG_ARCH_DAVINCI) := davinci
125machine-$(CONFIG_ARCH_DOVE) := dove 126machine-$(CONFIG_ARCH_DOVE) := dove
126machine-$(CONFIG_ARCH_EBSA110) := ebsa110 127machine-$(CONFIG_ARCH_EBSA110) := ebsa110
@@ -160,7 +161,7 @@ machine-$(CONFIG_ARCH_PNX4008) := pnx4008
160machine-$(CONFIG_ARCH_PXA) := pxa 161machine-$(CONFIG_ARCH_PXA) := pxa
161machine-$(CONFIG_ARCH_REALVIEW) := realview 162machine-$(CONFIG_ARCH_REALVIEW) := realview
162machine-$(CONFIG_ARCH_RPC) := rpc 163machine-$(CONFIG_ARCH_RPC) := rpc
163machine-$(CONFIG_ARCH_S3C2410) := s3c2410 s3c2400 s3c2412 s3c2440 s3c2443 164machine-$(CONFIG_ARCH_S3C2410) := s3c2410 s3c2400 s3c2412 s3c2416 s3c2440 s3c2443
164machine-$(CONFIG_ARCH_S3C24A0) := s3c24a0 165machine-$(CONFIG_ARCH_S3C24A0) := s3c24a0
165machine-$(CONFIG_ARCH_S3C64XX) := s3c64xx 166machine-$(CONFIG_ARCH_S3C64XX) := s3c64xx
166machine-$(CONFIG_ARCH_S5P6440) := s5p6440 167machine-$(CONFIG_ARCH_S5P6440) := s5p6440
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S
index 0f23009170a1..c5191b1532e8 100644
--- a/arch/arm/boot/compressed/head.S
+++ b/arch/arm/boot/compressed/head.S
@@ -172,7 +172,7 @@ not_angel:
172 adr r0, LC0 172 adr r0, LC0
173 ARM( ldmia r0, {r1, r2, r3, r4, r5, r6, r11, ip, sp}) 173 ARM( ldmia r0, {r1, r2, r3, r4, r5, r6, r11, ip, sp})
174 THUMB( ldmia r0, {r1, r2, r3, r4, r5, r6, r11, ip} ) 174 THUMB( ldmia r0, {r1, r2, r3, r4, r5, r6, r11, ip} )
175 THUMB( ldr sp, [r0, #28] ) 175 THUMB( ldr sp, [r0, #32] )
176 subs r0, r0, r1 @ calculate the delta offset 176 subs r0, r0, r1 @ calculate the delta offset
177 177
178 @ if delta is zero, we are 178 @ if delta is zero, we are
@@ -685,8 +685,8 @@ proc_types:
685 W(b) __armv4_mmu_cache_off 685 W(b) __armv4_mmu_cache_off
686 W(b) __armv4_mmu_cache_flush 686 W(b) __armv4_mmu_cache_flush
687 687
688 .word 0x56056930 688 .word 0x56056900
689 .word 0xff0ffff0 @ PXA935 689 .word 0xffffff00 @ PXA9xx
690 W(b) __armv4_mmu_cache_on 690 W(b) __armv4_mmu_cache_on
691 W(b) __armv4_mmu_cache_off 691 W(b) __armv4_mmu_cache_off
692 W(b) __armv4_mmu_cache_flush 692 W(b) __armv4_mmu_cache_flush
@@ -697,12 +697,6 @@ proc_types:
697 W(b) __armv4_mmu_cache_off 697 W(b) __armv4_mmu_cache_off
698 W(b) __armv5tej_mmu_cache_flush 698 W(b) __armv5tej_mmu_cache_flush
699 699
700 .word 0x56056930
701 .word 0xff0ffff0 @ PXA935
702 W(b) __armv4_mmu_cache_on
703 W(b) __armv4_mmu_cache_off
704 W(b) __armv4_mmu_cache_flush
705
706 .word 0x56050000 @ Feroceon 700 .word 0x56050000 @ Feroceon
707 .word 0xff0f0000 701 .word 0xff0f0000
708 W(b) __armv4_mmu_cache_on 702 W(b) __armv4_mmu_cache_on
diff --git a/arch/arm/common/clkdev.c b/arch/arm/common/clkdev.c
index 4f8390dd6cac..e2b2bb66e094 100644
--- a/arch/arm/common/clkdev.c
+++ b/arch/arm/common/clkdev.c
@@ -18,6 +18,7 @@
18#include <linux/string.h> 18#include <linux/string.h>
19#include <linux/mutex.h> 19#include <linux/mutex.h>
20#include <linux/clk.h> 20#include <linux/clk.h>
21#include <linux/slab.h>
21 22
22#include <asm/clkdev.h> 23#include <asm/clkdev.h>
23#include <mach/clkdev.h> 24#include <mach/clkdev.h>
diff --git a/arch/arm/common/it8152.c b/arch/arm/common/it8152.c
index ee1d3b85eb65..7974baacafce 100644
--- a/arch/arm/common/it8152.c
+++ b/arch/arm/common/it8152.c
@@ -21,7 +21,6 @@
21#include <linux/ptrace.h> 21#include <linux/ptrace.h>
22#include <linux/interrupt.h> 22#include <linux/interrupt.h>
23#include <linux/mm.h> 23#include <linux/mm.h>
24#include <linux/slab.h>
25#include <linux/init.h> 24#include <linux/init.h>
26#include <linux/ioport.h> 25#include <linux/ioport.h>
27#include <linux/irq.h> 26#include <linux/irq.h>
diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c
index 90ae00b631c2..9dff07c80ddb 100644
--- a/arch/arm/common/locomo.c
+++ b/arch/arm/common/locomo.c
@@ -290,7 +290,7 @@ static int locomo_suspend(struct platform_device *dev, pm_message_t state)
290 save->LCM_GPO = locomo_readl(lchip->base + LOCOMO_GPO); /* GPIO */ 290 save->LCM_GPO = locomo_readl(lchip->base + LOCOMO_GPO); /* GPIO */
291 locomo_writel(0x00, lchip->base + LOCOMO_GPO); 291 locomo_writel(0x00, lchip->base + LOCOMO_GPO);
292 save->LCM_SPICT = locomo_readl(lchip->base + LOCOMO_SPI + LOCOMO_SPICT); /* SPI */ 292 save->LCM_SPICT = locomo_readl(lchip->base + LOCOMO_SPI + LOCOMO_SPICT); /* SPI */
293 locomo_writel(0x40, lchip->base + LOCOMO_SPICT); 293 locomo_writel(0x40, lchip->base + LOCOMO_SPI + LOCOMO_SPICT);
294 save->LCM_GPE = locomo_readl(lchip->base + LOCOMO_GPE); /* GPIO */ 294 save->LCM_GPE = locomo_readl(lchip->base + LOCOMO_GPE); /* GPIO */
295 locomo_writel(0x00, lchip->base + LOCOMO_GPE); 295 locomo_writel(0x00, lchip->base + LOCOMO_GPE);
296 save->LCM_ASD = locomo_readl(lchip->base + LOCOMO_ASD); /* ADSTART */ 296 save->LCM_ASD = locomo_readl(lchip->base + LOCOMO_ASD); /* ADSTART */
@@ -418,7 +418,7 @@ __locomo_probe(struct device *me, struct resource *mem, int irq)
418 /* Longtime timer */ 418 /* Longtime timer */
419 locomo_writel(0, lchip->base + LOCOMO_LTINT); 419 locomo_writel(0, lchip->base + LOCOMO_LTINT);
420 /* SPI */ 420 /* SPI */
421 locomo_writel(0, lchip->base + LOCOMO_SPIIE); 421 locomo_writel(0, lchip->base + LOCOMO_SPI + LOCOMO_SPIIE);
422 422
423 locomo_writel(6 + 8 + 320 + 30 - 10, lchip->base + LOCOMO_ASD); 423 locomo_writel(6 + 8 + 320 + 30 - 10, lchip->base + LOCOMO_ASD);
424 r = locomo_readl(lchip->base + LOCOMO_ASD); 424 r = locomo_readl(lchip->base + LOCOMO_ASD);
@@ -707,7 +707,7 @@ void locomo_m62332_senddata(struct locomo_dev *ldev, unsigned int dac_data, int
707 udelay(DAC_SCL_HIGH_HOLD_TIME); /* 4.7 usec */ 707 udelay(DAC_SCL_HIGH_HOLD_TIME); /* 4.7 usec */
708 if (locomo_readl(mapbase + LOCOMO_DAC) & LOCOMO_DAC_SDAOEB) { /* High is error */ 708 if (locomo_readl(mapbase + LOCOMO_DAC) & LOCOMO_DAC_SDAOEB) { /* High is error */
709 printk(KERN_WARNING "locomo: m62332_senddata Error 1\n"); 709 printk(KERN_WARNING "locomo: m62332_senddata Error 1\n");
710 return; 710 goto out;
711 } 711 }
712 712
713 /* Send Sub address (LSB is channel select) */ 713 /* Send Sub address (LSB is channel select) */
@@ -735,7 +735,7 @@ void locomo_m62332_senddata(struct locomo_dev *ldev, unsigned int dac_data, int
735 udelay(DAC_SCL_HIGH_HOLD_TIME); /* 4.7 usec */ 735 udelay(DAC_SCL_HIGH_HOLD_TIME); /* 4.7 usec */
736 if (locomo_readl(mapbase + LOCOMO_DAC) & LOCOMO_DAC_SDAOEB) { /* High is error */ 736 if (locomo_readl(mapbase + LOCOMO_DAC) & LOCOMO_DAC_SDAOEB) { /* High is error */
737 printk(KERN_WARNING "locomo: m62332_senddata Error 2\n"); 737 printk(KERN_WARNING "locomo: m62332_senddata Error 2\n");
738 return; 738 goto out;
739 } 739 }
740 740
741 /* Send DAC data */ 741 /* Send DAC data */
@@ -760,9 +760,9 @@ void locomo_m62332_senddata(struct locomo_dev *ldev, unsigned int dac_data, int
760 udelay(DAC_SCL_HIGH_HOLD_TIME); /* 4.7 usec */ 760 udelay(DAC_SCL_HIGH_HOLD_TIME); /* 4.7 usec */
761 if (locomo_readl(mapbase + LOCOMO_DAC) & LOCOMO_DAC_SDAOEB) { /* High is error */ 761 if (locomo_readl(mapbase + LOCOMO_DAC) & LOCOMO_DAC_SDAOEB) { /* High is error */
762 printk(KERN_WARNING "locomo: m62332_senddata Error 3\n"); 762 printk(KERN_WARNING "locomo: m62332_senddata Error 3\n");
763 return;
764 } 763 }
765 764
765out:
766 /* stop */ 766 /* stop */
767 r = locomo_readl(mapbase + LOCOMO_DAC); 767 r = locomo_readl(mapbase + LOCOMO_DAC);
768 r &= ~(LOCOMO_DAC_SCLOEB); 768 r &= ~(LOCOMO_DAC_SCLOEB);
diff --git a/arch/arm/configs/bcmring_defconfig b/arch/arm/configs/bcmring_defconfig
index 1e12167c89b7..6ac6693299bc 100644
--- a/arch/arm/configs/bcmring_defconfig
+++ b/arch/arm/configs/bcmring_defconfig
@@ -1,13 +1,13 @@
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-rc3 3# Linux kernel version: 2.6.34-rc2
4# Fri Jul 17 12:07:28 2009 4# Mon Mar 29 12:01:41 2010
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_SYS_SUPPORTS_APM_EMULATION=y 7CONFIG_SYS_SUPPORTS_APM_EMULATION=y
8CONFIG_GENERIC_TIME=y 8CONFIG_GENERIC_TIME=y
9CONFIG_GENERIC_CLOCKEVENTS=y 9CONFIG_GENERIC_CLOCKEVENTS=y
10CONFIG_MMU=y 10CONFIG_HAVE_PROC_CPU=y
11CONFIG_GENERIC_HARDIRQS=y 11CONFIG_GENERIC_HARDIRQS=y
12CONFIG_STACKTRACE_SUPPORT=y 12CONFIG_STACKTRACE_SUPPORT=y
13CONFIG_HAVE_LATENCYTOP_SUPPORT=y 13CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -18,6 +18,7 @@ CONFIG_GENERIC_IRQ_PROBE=y
18CONFIG_RWSEM_GENERIC_SPINLOCK=y 18CONFIG_RWSEM_GENERIC_SPINLOCK=y
19CONFIG_GENERIC_HWEIGHT=y 19CONFIG_GENERIC_HWEIGHT=y
20CONFIG_GENERIC_CALIBRATE_DELAY=y 20CONFIG_GENERIC_CALIBRATE_DELAY=y
21CONFIG_NEED_DMA_MAP_STATE=y
21CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 22CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
22CONFIG_VECTORS_BASE=0xffff0000 23CONFIG_VECTORS_BASE=0xffff0000
23CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 24CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -32,6 +33,12 @@ CONFIG_LOCK_KERNEL=y
32CONFIG_INIT_ENV_ARG_LIMIT=32 33CONFIG_INIT_ENV_ARG_LIMIT=32
33CONFIG_LOCALVERSION="" 34CONFIG_LOCALVERSION=""
34# CONFIG_LOCALVERSION_AUTO is not set 35# CONFIG_LOCALVERSION_AUTO is not set
36CONFIG_HAVE_KERNEL_GZIP=y
37CONFIG_HAVE_KERNEL_LZO=y
38CONFIG_KERNEL_GZIP=y
39# CONFIG_KERNEL_BZIP2 is not set
40# CONFIG_KERNEL_LZMA is not set
41# CONFIG_KERNEL_LZO is not set
35# CONFIG_SWAP is not set 42# CONFIG_SWAP is not set
36CONFIG_SYSVIPC=y 43CONFIG_SYSVIPC=y
37CONFIG_SYSVIPC_SYSCTL=y 44CONFIG_SYSVIPC_SYSCTL=y
@@ -43,21 +50,22 @@ CONFIG_SYSVIPC_SYSCTL=y
43# 50#
44# RCU Subsystem 51# RCU Subsystem
45# 52#
46CONFIG_CLASSIC_RCU=y 53CONFIG_TREE_RCU=y
47# CONFIG_TREE_RCU is not set 54# CONFIG_TREE_PREEMPT_RCU is not set
48# CONFIG_PREEMPT_RCU is not set 55# CONFIG_TINY_RCU is not set
56# CONFIG_RCU_TRACE is not set
57CONFIG_RCU_FANOUT=32
58# CONFIG_RCU_FANOUT_EXACT is not set
49# CONFIG_TREE_RCU_TRACE is not set 59# CONFIG_TREE_RCU_TRACE is not set
50# CONFIG_PREEMPT_RCU_TRACE is not set
51# CONFIG_IKCONFIG is not set 60# CONFIG_IKCONFIG is not set
52CONFIG_LOG_BUF_SHIFT=17 61CONFIG_LOG_BUF_SHIFT=17
53# CONFIG_GROUP_SCHED is not set
54# CONFIG_CGROUPS is not set
55# CONFIG_SYSFS_DEPRECATED_V2 is not set 62# CONFIG_SYSFS_DEPRECATED_V2 is not set
56# CONFIG_RELAY is not set 63# CONFIG_RELAY is not set
57# CONFIG_NAMESPACES is not set 64# CONFIG_NAMESPACES is not set
58# CONFIG_BLK_DEV_INITRD is not set 65# CONFIG_BLK_DEV_INITRD is not set
59CONFIG_CC_OPTIMIZE_FOR_SIZE=y 66CONFIG_CC_OPTIMIZE_FOR_SIZE=y
60CONFIG_SYSCTL=y 67CONFIG_SYSCTL=y
68CONFIG_ANON_INODES=y
61CONFIG_EMBEDDED=y 69CONFIG_EMBEDDED=y
62CONFIG_UID16=y 70CONFIG_UID16=y
63CONFIG_SYSCTL_SYSCALL=y 71CONFIG_SYSCTL_SYSCALL=y
@@ -75,19 +83,21 @@ CONFIG_FUTEX=y
75# CONFIG_EVENTFD is not set 83# CONFIG_EVENTFD is not set
76CONFIG_SHMEM=y 84CONFIG_SHMEM=y
77# CONFIG_AIO is not set 85# CONFIG_AIO is not set
86CONFIG_HAVE_PERF_EVENTS=y
87CONFIG_PERF_USE_VMALLOC=y
78 88
79# 89#
80# Performance Counters 90# Kernel Performance Events And Counters
81# 91#
92CONFIG_PERF_EVENTS=y
93CONFIG_PERF_COUNTERS=y
82# CONFIG_VM_EVENT_COUNTERS is not set 94# CONFIG_VM_EVENT_COUNTERS is not set
83# CONFIG_SLUB_DEBUG is not set 95# CONFIG_SLUB_DEBUG is not set
84# CONFIG_STRIP_ASM_SYMS is not set
85# CONFIG_COMPAT_BRK is not set 96# CONFIG_COMPAT_BRK is not set
86# CONFIG_SLAB is not set 97# CONFIG_SLAB is not set
87CONFIG_SLUB=y 98CONFIG_SLUB=y
88# CONFIG_SLOB is not set 99# CONFIG_SLOB is not set
89# CONFIG_PROFILING is not set 100# CONFIG_PROFILING is not set
90# CONFIG_MARKERS is not set
91CONFIG_HAVE_OPROFILE=y 101CONFIG_HAVE_OPROFILE=y
92# CONFIG_KPROBES is not set 102# CONFIG_KPROBES is not set
93CONFIG_HAVE_KPROBES=y 103CONFIG_HAVE_KPROBES=y
@@ -115,24 +125,53 @@ CONFIG_LBDAF=y
115# IO Schedulers 125# IO Schedulers
116# 126#
117CONFIG_IOSCHED_NOOP=y 127CONFIG_IOSCHED_NOOP=y
118# CONFIG_IOSCHED_AS is not set
119# CONFIG_IOSCHED_DEADLINE is not set 128# CONFIG_IOSCHED_DEADLINE is not set
120# CONFIG_IOSCHED_CFQ is not set 129# CONFIG_IOSCHED_CFQ is not set
121# CONFIG_DEFAULT_AS is not set
122# CONFIG_DEFAULT_DEADLINE is not set 130# CONFIG_DEFAULT_DEADLINE is not set
123# CONFIG_DEFAULT_CFQ is not set 131# CONFIG_DEFAULT_CFQ is not set
124CONFIG_DEFAULT_NOOP=y 132CONFIG_DEFAULT_NOOP=y
125CONFIG_DEFAULT_IOSCHED="noop" 133CONFIG_DEFAULT_IOSCHED="noop"
134# CONFIG_INLINE_SPIN_TRYLOCK is not set
135# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set
136# CONFIG_INLINE_SPIN_LOCK is not set
137# CONFIG_INLINE_SPIN_LOCK_BH is not set
138# CONFIG_INLINE_SPIN_LOCK_IRQ is not set
139# CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set
140# CONFIG_INLINE_SPIN_UNLOCK is not set
141# CONFIG_INLINE_SPIN_UNLOCK_BH is not set
142# CONFIG_INLINE_SPIN_UNLOCK_IRQ is not set
143# CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set
144# CONFIG_INLINE_READ_TRYLOCK is not set
145# CONFIG_INLINE_READ_LOCK is not set
146# CONFIG_INLINE_READ_LOCK_BH is not set
147# CONFIG_INLINE_READ_LOCK_IRQ is not set
148# CONFIG_INLINE_READ_LOCK_IRQSAVE is not set
149# CONFIG_INLINE_READ_UNLOCK is not set
150# CONFIG_INLINE_READ_UNLOCK_BH is not set
151# CONFIG_INLINE_READ_UNLOCK_IRQ is not set
152# CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set
153# CONFIG_INLINE_WRITE_TRYLOCK is not set
154# CONFIG_INLINE_WRITE_LOCK is not set
155# CONFIG_INLINE_WRITE_LOCK_BH is not set
156# CONFIG_INLINE_WRITE_LOCK_IRQ is not set
157# CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set
158# CONFIG_INLINE_WRITE_UNLOCK is not set
159# CONFIG_INLINE_WRITE_UNLOCK_BH is not set
160# CONFIG_INLINE_WRITE_UNLOCK_IRQ is not set
161# CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set
162# CONFIG_MUTEX_SPIN_ON_OWNER is not set
126# CONFIG_FREEZER is not set 163# CONFIG_FREEZER is not set
127 164
128# 165#
129# System Type 166# System Type
130# 167#
168CONFIG_MMU=y
131# CONFIG_ARCH_AAEC2000 is not set 169# CONFIG_ARCH_AAEC2000 is not set
132# CONFIG_ARCH_INTEGRATOR is not set 170# CONFIG_ARCH_INTEGRATOR is not set
133# CONFIG_ARCH_REALVIEW is not set 171# CONFIG_ARCH_REALVIEW is not set
134# CONFIG_ARCH_VERSATILE is not set 172# CONFIG_ARCH_VERSATILE is not set
135# CONFIG_ARCH_AT91 is not set 173# CONFIG_ARCH_AT91 is not set
174CONFIG_ARCH_BCMRING=y
136# CONFIG_ARCH_CLPS711X is not set 175# CONFIG_ARCH_CLPS711X is not set
137# CONFIG_ARCH_GEMINI is not set 176# CONFIG_ARCH_GEMINI is not set
138# CONFIG_ARCH_EBSA110 is not set 177# CONFIG_ARCH_EBSA110 is not set
@@ -149,6 +188,7 @@ CONFIG_DEFAULT_IOSCHED="noop"
149# CONFIG_ARCH_IXP2000 is not set 188# CONFIG_ARCH_IXP2000 is not set
150# CONFIG_ARCH_IXP4XX is not set 189# CONFIG_ARCH_IXP4XX is not set
151# CONFIG_ARCH_L7200 is not set 190# CONFIG_ARCH_L7200 is not set
191# CONFIG_ARCH_DOVE is not set
152# CONFIG_ARCH_KIRKWOOD is not set 192# CONFIG_ARCH_KIRKWOOD is not set
153# CONFIG_ARCH_LOKI is not set 193# CONFIG_ARCH_LOKI is not set
154# CONFIG_ARCH_MV78XX0 is not set 194# CONFIG_ARCH_MV78XX0 is not set
@@ -157,19 +197,26 @@ CONFIG_DEFAULT_IOSCHED="noop"
157# CONFIG_ARCH_KS8695 is not set 197# CONFIG_ARCH_KS8695 is not set
158# CONFIG_ARCH_NS9XXX is not set 198# CONFIG_ARCH_NS9XXX is not set
159# CONFIG_ARCH_W90X900 is not set 199# CONFIG_ARCH_W90X900 is not set
200# CONFIG_ARCH_NUC93X is not set
160# CONFIG_ARCH_PNX4008 is not set 201# CONFIG_ARCH_PNX4008 is not set
161# CONFIG_ARCH_PXA is not set 202# CONFIG_ARCH_PXA is not set
162# CONFIG_ARCH_MSM is not set 203# CONFIG_ARCH_MSM is not set
204# CONFIG_ARCH_SHMOBILE is not set
163# CONFIG_ARCH_RPC is not set 205# CONFIG_ARCH_RPC is not set
164# CONFIG_ARCH_SA1100 is not set 206# CONFIG_ARCH_SA1100 is not set
165# CONFIG_ARCH_S3C2410 is not set 207# CONFIG_ARCH_S3C2410 is not set
166# CONFIG_ARCH_S3C64XX is not set 208# CONFIG_ARCH_S3C64XX is not set
209# CONFIG_ARCH_S5P6440 is not set
210# CONFIG_ARCH_S5P6442 is not set
211# CONFIG_ARCH_S5PC1XX is not set
212# CONFIG_ARCH_S5PV210 is not set
167# CONFIG_ARCH_SHARK is not set 213# CONFIG_ARCH_SHARK is not set
168# CONFIG_ARCH_LH7A40X is not set 214# CONFIG_ARCH_LH7A40X is not set
169# CONFIG_ARCH_U300 is not set 215# CONFIG_ARCH_U300 is not set
216# CONFIG_ARCH_U8500 is not set
217# CONFIG_ARCH_NOMADIK is not set
170# CONFIG_ARCH_DAVINCI is not set 218# CONFIG_ARCH_DAVINCI is not set
171# CONFIG_ARCH_OMAP is not set 219# CONFIG_ARCH_OMAP is not set
172CONFIG_ARCH_BCMRING=y
173# CONFIG_ARCH_FPGA11107 is not set 220# CONFIG_ARCH_FPGA11107 is not set
174CONFIG_ARCH_BCM11107=y 221CONFIG_ARCH_BCM11107=y
175 222
@@ -185,7 +232,7 @@ CONFIG_CPU_V6=y
185CONFIG_CPU_32v6K=y 232CONFIG_CPU_32v6K=y
186CONFIG_CPU_32v6=y 233CONFIG_CPU_32v6=y
187CONFIG_CPU_ABRT_EV6=y 234CONFIG_CPU_ABRT_EV6=y
188CONFIG_CPU_PABRT_NOIFAR=y 235CONFIG_CPU_PABRT_V6=y
189CONFIG_CPU_CACHE_V6=y 236CONFIG_CPU_CACHE_V6=y
190CONFIG_CPU_CACHE_VIPT=y 237CONFIG_CPU_CACHE_VIPT=y
191CONFIG_CPU_COPY_V6=y 238CONFIG_CPU_COPY_V6=y
@@ -201,6 +248,8 @@ CONFIG_ARM_THUMB=y
201# CONFIG_CPU_ICACHE_DISABLE is not set 248# CONFIG_CPU_ICACHE_DISABLE is not set
202# CONFIG_CPU_DCACHE_DISABLE is not set 249# CONFIG_CPU_DCACHE_DISABLE is not set
203# CONFIG_CPU_BPREDICT_DISABLE is not set 250# CONFIG_CPU_BPREDICT_DISABLE is not set
251CONFIG_ARM_L1_CACHE_SHIFT=5
252CONFIG_CPU_HAS_PMU=y
204# CONFIG_ARM_ERRATA_411920 is not set 253# CONFIG_ARM_ERRATA_411920 is not set
205CONFIG_COMMON_CLKDEV=y 254CONFIG_COMMON_CLKDEV=y
206 255
@@ -222,6 +271,8 @@ CONFIG_VMSPLIT_3G=y
222# CONFIG_VMSPLIT_2G is not set 271# CONFIG_VMSPLIT_2G is not set
223# CONFIG_VMSPLIT_1G is not set 272# CONFIG_VMSPLIT_1G is not set
224CONFIG_PAGE_OFFSET=0xC0000000 273CONFIG_PAGE_OFFSET=0xC0000000
274# CONFIG_PREEMPT_NONE is not set
275# CONFIG_PREEMPT_VOLUNTARY is not set
225CONFIG_PREEMPT=y 276CONFIG_PREEMPT=y
226CONFIG_HZ=100 277CONFIG_HZ=100
227CONFIG_AEABI=y 278CONFIG_AEABI=y
@@ -229,6 +280,7 @@ CONFIG_AEABI=y
229# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set 280# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
230# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set 281# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
231# CONFIG_HIGHMEM is not set 282# CONFIG_HIGHMEM is not set
283CONFIG_HW_PERF_EVENTS=y
232CONFIG_SELECT_MEMORY_MODEL=y 284CONFIG_SELECT_MEMORY_MODEL=y
233CONFIG_FLATMEM_MANUAL=y 285CONFIG_FLATMEM_MANUAL=y
234# CONFIG_DISCONTIGMEM_MANUAL is not set 286# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -240,8 +292,7 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
240# CONFIG_PHYS_ADDR_T_64BIT is not set 292# CONFIG_PHYS_ADDR_T_64BIT is not set
241CONFIG_ZONE_DMA_FLAG=0 293CONFIG_ZONE_DMA_FLAG=0
242CONFIG_VIRT_TO_BUS=y 294CONFIG_VIRT_TO_BUS=y
243CONFIG_HAVE_MLOCK=y 295# CONFIG_KSM is not set
244CONFIG_HAVE_MLOCKED_PAGE_BIT=y
245CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 296CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
246CONFIG_ALIGNMENT_TRAP=y 297CONFIG_ALIGNMENT_TRAP=y
247CONFIG_UACCESS_WITH_MEMCPY=y 298CONFIG_UACCESS_WITH_MEMCPY=y
@@ -335,9 +386,9 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
335# CONFIG_CONNECTOR is not set 386# CONFIG_CONNECTOR is not set
336CONFIG_MTD=y 387CONFIG_MTD=y
337# CONFIG_MTD_DEBUG is not set 388# CONFIG_MTD_DEBUG is not set
389# CONFIG_MTD_TESTS is not set
338CONFIG_MTD_CONCAT=y 390CONFIG_MTD_CONCAT=y
339CONFIG_MTD_PARTITIONS=y 391CONFIG_MTD_PARTITIONS=y
340# CONFIG_MTD_TESTS is not set
341# CONFIG_MTD_REDBOOT_PARTS is not set 392# CONFIG_MTD_REDBOOT_PARTS is not set
342CONFIG_MTD_CMDLINE_PARTS=y 393CONFIG_MTD_CMDLINE_PARTS=y
343# CONFIG_MTD_AFS_PARTS is not set 394# CONFIG_MTD_AFS_PARTS is not set
@@ -433,6 +484,10 @@ CONFIG_MTD_NAND_BCM_UMI_HWCS=y
433CONFIG_BLK_DEV=y 484CONFIG_BLK_DEV=y
434# CONFIG_BLK_DEV_COW_COMMON is not set 485# CONFIG_BLK_DEV_COW_COMMON is not set
435# CONFIG_BLK_DEV_LOOP is not set 486# CONFIG_BLK_DEV_LOOP is not set
487
488#
489# DRBD disabled because PROC_FS, INET or CONNECTOR not selected
490#
436# CONFIG_BLK_DEV_NBD is not set 491# CONFIG_BLK_DEV_NBD is not set
437# CONFIG_BLK_DEV_RAM is not set 492# CONFIG_BLK_DEV_RAM is not set
438# CONFIG_CDROM_PKTCDVD is not set 493# CONFIG_CDROM_PKTCDVD is not set
@@ -444,6 +499,7 @@ CONFIG_HAVE_IDE=y
444# 499#
445# SCSI device support 500# SCSI device support
446# 501#
502CONFIG_SCSI_MOD=y
447# CONFIG_RAID_ATTRS is not set 503# CONFIG_RAID_ATTRS is not set
448# CONFIG_SCSI is not set 504# CONFIG_SCSI is not set
449# CONFIG_SCSI_DMA is not set 505# CONFIG_SCSI_DMA is not set
@@ -452,6 +508,7 @@ CONFIG_HAVE_IDE=y
452# CONFIG_MD is not set 508# CONFIG_MD is not set
453# CONFIG_NETDEVICES is not set 509# CONFIG_NETDEVICES is not set
454# CONFIG_ISDN is not set 510# CONFIG_ISDN is not set
511# CONFIG_PHONE is not set
455 512
456# 513#
457# Input device support 514# Input device support
@@ -459,6 +516,7 @@ CONFIG_HAVE_IDE=y
459CONFIG_INPUT=y 516CONFIG_INPUT=y
460# CONFIG_INPUT_FF_MEMLESS is not set 517# CONFIG_INPUT_FF_MEMLESS is not set
461# CONFIG_INPUT_POLLDEV is not set 518# CONFIG_INPUT_POLLDEV is not set
519# CONFIG_INPUT_SPARSEKMAP is not set
462 520
463# 521#
464# Userland interfaces 522# Userland interfaces
@@ -508,6 +566,7 @@ CONFIG_SERIAL_AMBA_PL011=y
508CONFIG_SERIAL_AMBA_PL011_CONSOLE=y 566CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
509CONFIG_SERIAL_CORE=y 567CONFIG_SERIAL_CORE=y
510CONFIG_SERIAL_CORE_CONSOLE=y 568CONFIG_SERIAL_CORE_CONSOLE=y
569# CONFIG_SERIAL_TIMBERDALE is not set
511CONFIG_UNIX98_PTYS=y 570CONFIG_UNIX98_PTYS=y
512# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set 571# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
513CONFIG_LEGACY_PTYS=y 572CONFIG_LEGACY_PTYS=y
@@ -519,13 +578,17 @@ CONFIG_LEGACY_PTY_COUNT=64
519# CONFIG_TCG_TPM is not set 578# CONFIG_TCG_TPM is not set
520# CONFIG_I2C is not set 579# CONFIG_I2C is not set
521# CONFIG_SPI is not set 580# CONFIG_SPI is not set
581
582#
583# PPS support
584#
585# CONFIG_PPS is not set
522CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 586CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
523# CONFIG_GPIOLIB is not set 587# CONFIG_GPIOLIB is not set
524# CONFIG_W1 is not set 588# CONFIG_W1 is not set
525# CONFIG_POWER_SUPPLY is not set 589# CONFIG_POWER_SUPPLY is not set
526# CONFIG_HWMON is not set 590# CONFIG_HWMON is not set
527# CONFIG_THERMAL is not set 591# CONFIG_THERMAL is not set
528# CONFIG_THERMAL_HWMON is not set
529# CONFIG_WATCHDOG is not set 592# CONFIG_WATCHDOG is not set
530CONFIG_SSB_POSSIBLE=y 593CONFIG_SSB_POSSIBLE=y
531 594
@@ -541,6 +604,7 @@ CONFIG_SSB_POSSIBLE=y
541# CONFIG_MFD_SM501 is not set 604# CONFIG_MFD_SM501 is not set
542# CONFIG_HTC_PASIC3 is not set 605# CONFIG_HTC_PASIC3 is not set
543# CONFIG_MFD_TMIO is not set 606# CONFIG_MFD_TMIO is not set
607# CONFIG_REGULATOR is not set
544# CONFIG_MEDIA_SUPPORT is not set 608# CONFIG_MEDIA_SUPPORT is not set
545 609
546# 610#
@@ -566,14 +630,17 @@ CONFIG_DUMMY_CONSOLE=y
566# CONFIG_USB_SUPPORT is not set 630# CONFIG_USB_SUPPORT is not set
567# CONFIG_MMC is not set 631# CONFIG_MMC is not set
568# CONFIG_MEMSTICK is not set 632# CONFIG_MEMSTICK is not set
569# CONFIG_ACCESSIBILITY is not set
570# CONFIG_NEW_LEDS is not set 633# CONFIG_NEW_LEDS is not set
634# CONFIG_ACCESSIBILITY is not set
571CONFIG_RTC_LIB=y 635CONFIG_RTC_LIB=y
572# CONFIG_RTC_CLASS is not set 636# CONFIG_RTC_CLASS is not set
573# CONFIG_DMADEVICES is not set 637# CONFIG_DMADEVICES is not set
574# CONFIG_AUXDISPLAY is not set 638# CONFIG_AUXDISPLAY is not set
575# CONFIG_REGULATOR is not set
576# CONFIG_UIO is not set 639# CONFIG_UIO is not set
640
641#
642# TI VLYNQ
643#
577# CONFIG_STAGING is not set 644# CONFIG_STAGING is not set
578 645
579# 646#
@@ -589,9 +656,12 @@ CONFIG_FS_POSIX_ACL=y
589# CONFIG_GFS2_FS is not set 656# CONFIG_GFS2_FS is not set
590# CONFIG_OCFS2_FS is not set 657# CONFIG_OCFS2_FS is not set
591# CONFIG_BTRFS_FS is not set 658# CONFIG_BTRFS_FS is not set
659# CONFIG_NILFS2_FS is not set
592# CONFIG_FILE_LOCKING is not set 660# CONFIG_FILE_LOCKING is not set
593# CONFIG_FSNOTIFY is not set 661# CONFIG_FSNOTIFY is not set
662# CONFIG_DNOTIFY is not set
594# CONFIG_INOTIFY is not set 663# CONFIG_INOTIFY is not set
664# CONFIG_INOTIFY_USER is not set
595# CONFIG_QUOTA is not set 665# CONFIG_QUOTA is not set
596# CONFIG_AUTOFS_FS is not set 666# CONFIG_AUTOFS_FS is not set
597# CONFIG_AUTOFS4_FS is not set 667# CONFIG_AUTOFS4_FS is not set
@@ -647,6 +717,7 @@ CONFIG_JFFS2_ZLIB=y
647# CONFIG_JFFS2_LZO is not set 717# CONFIG_JFFS2_LZO is not set
648CONFIG_JFFS2_RTIME=y 718CONFIG_JFFS2_RTIME=y
649# CONFIG_JFFS2_RUBIN is not set 719# CONFIG_JFFS2_RUBIN is not set
720# CONFIG_LOGFS is not set
650# CONFIG_CRAMFS is not set 721# CONFIG_CRAMFS is not set
651# CONFIG_SQUASHFS is not set 722# CONFIG_SQUASHFS is not set
652# CONFIG_VXFS_FS is not set 723# CONFIG_VXFS_FS is not set
@@ -657,7 +728,6 @@ CONFIG_JFFS2_RTIME=y
657# CONFIG_ROMFS_FS is not set 728# CONFIG_ROMFS_FS is not set
658# CONFIG_SYSV_FS is not set 729# CONFIG_SYSV_FS is not set
659# CONFIG_UFS_FS is not set 730# CONFIG_UFS_FS is not set
660# CONFIG_NILFS2_FS is not set
661# CONFIG_NETWORK_FILESYSTEMS is not set 731# CONFIG_NETWORK_FILESYSTEMS is not set
662 732
663# 733#
@@ -675,11 +745,12 @@ CONFIG_MSDOS_PARTITION=y
675CONFIG_ENABLE_MUST_CHECK=y 745CONFIG_ENABLE_MUST_CHECK=y
676CONFIG_FRAME_WARN=1024 746CONFIG_FRAME_WARN=1024
677CONFIG_MAGIC_SYSRQ=y 747CONFIG_MAGIC_SYSRQ=y
748# CONFIG_STRIP_ASM_SYMS is not set
678# CONFIG_UNUSED_SYMBOLS is not set 749# CONFIG_UNUSED_SYMBOLS is not set
679# CONFIG_DEBUG_FS is not set 750# CONFIG_DEBUG_FS is not set
680CONFIG_HEADERS_CHECK=y 751CONFIG_HEADERS_CHECK=y
681# CONFIG_DEBUG_KERNEL is not set 752# CONFIG_DEBUG_KERNEL is not set
682# CONFIG_DEBUG_BUGVERBOSE is not set 753CONFIG_DEBUG_BUGVERBOSE=y
683# CONFIG_DEBUG_MEMORY_INIT is not set 754# CONFIG_DEBUG_MEMORY_INIT is not set
684CONFIG_FRAME_POINTER=y 755CONFIG_FRAME_POINTER=y
685# CONFIG_RCU_CPU_STALL_DETECTOR is not set 756# CONFIG_RCU_CPU_STALL_DETECTOR is not set
@@ -693,6 +764,7 @@ CONFIG_TRACING_SUPPORT=y
693CONFIG_HAVE_ARCH_KGDB=y 764CONFIG_HAVE_ARCH_KGDB=y
694# CONFIG_ARM_UNWIND is not set 765# CONFIG_ARM_UNWIND is not set
695# CONFIG_DEBUG_USER is not set 766# CONFIG_DEBUG_USER is not set
767# CONFIG_OC_ETM is not set
696 768
697# 769#
698# Security options 770# Security options
@@ -700,7 +772,11 @@ CONFIG_HAVE_ARCH_KGDB=y
700# CONFIG_KEYS is not set 772# CONFIG_KEYS is not set
701# CONFIG_SECURITY is not set 773# CONFIG_SECURITY is not set
702# CONFIG_SECURITYFS is not set 774# CONFIG_SECURITYFS is not set
703# CONFIG_SECURITY_FILE_CAPABILITIES is not set 775# CONFIG_DEFAULT_SECURITY_SELINUX is not set
776# CONFIG_DEFAULT_SECURITY_SMACK is not set
777# CONFIG_DEFAULT_SECURITY_TOMOYO is not set
778CONFIG_DEFAULT_SECURITY_DAC=y
779CONFIG_DEFAULT_SECURITY=""
704# CONFIG_CRYPTO is not set 780# CONFIG_CRYPTO is not set
705# CONFIG_BINARY_PRINTF is not set 781# CONFIG_BINARY_PRINTF is not set
706 782
diff --git a/arch/arm/configs/cns3420vb_defconfig b/arch/arm/configs/cns3420vb_defconfig
new file mode 100644
index 000000000000..d5c088149e46
--- /dev/null
+++ b/arch/arm/configs/cns3420vb_defconfig
@@ -0,0 +1,831 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.34-rc6
4# Sun May 2 21:58:08 2010
5#
6CONFIG_ARM=y
7CONFIG_SYS_SUPPORTS_APM_EMULATION=y
8CONFIG_GENERIC_TIME=y
9CONFIG_GENERIC_CLOCKEVENTS=y
10CONFIG_HAVE_PROC_CPU=y
11CONFIG_GENERIC_HARDIRQS=y
12CONFIG_STACKTRACE_SUPPORT=y
13CONFIG_HAVE_LATENCYTOP_SUPPORT=y
14CONFIG_LOCKDEP_SUPPORT=y
15CONFIG_TRACE_IRQFLAGS_SUPPORT=y
16CONFIG_HARDIRQS_SW_RESEND=y
17CONFIG_GENERIC_IRQ_PROBE=y
18CONFIG_RWSEM_GENERIC_SPINLOCK=y
19CONFIG_GENERIC_HWEIGHT=y
20CONFIG_GENERIC_CALIBRATE_DELAY=y
21CONFIG_NEED_DMA_MAP_STATE=y
22CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
23CONFIG_OPROFILE_ARMV6=y
24CONFIG_OPROFILE_ARM11_CORE=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_INIT_ENV_ARG_LIMIT=32
35CONFIG_LOCALVERSION=""
36# CONFIG_LOCALVERSION_AUTO is not set
37CONFIG_HAVE_KERNEL_GZIP=y
38CONFIG_HAVE_KERNEL_LZO=y
39CONFIG_KERNEL_GZIP=y
40# CONFIG_KERNEL_BZIP2 is not set
41# CONFIG_KERNEL_LZMA is not set
42# CONFIG_KERNEL_LZO is not set
43# CONFIG_SWAP is not set
44CONFIG_SYSVIPC=y
45CONFIG_SYSVIPC_SYSCTL=y
46# CONFIG_BSD_PROCESS_ACCT is not set
47
48#
49# RCU Subsystem
50#
51CONFIG_TREE_RCU=y
52# CONFIG_TREE_PREEMPT_RCU is not set
53# CONFIG_TINY_RCU is not set
54# CONFIG_RCU_TRACE is not set
55CONFIG_RCU_FANOUT=32
56# CONFIG_RCU_FANOUT_EXACT is not set
57# CONFIG_TREE_RCU_TRACE is not set
58CONFIG_IKCONFIG=y
59CONFIG_IKCONFIG_PROC=y
60CONFIG_LOG_BUF_SHIFT=14
61CONFIG_CGROUPS=y
62# CONFIG_CGROUP_DEBUG is not set
63# CONFIG_CGROUP_NS is not set
64# CONFIG_CGROUP_FREEZER is not set
65# CONFIG_CGROUP_DEVICE is not set
66# CONFIG_CPUSETS is not set
67# CONFIG_CGROUP_CPUACCT is not set
68# CONFIG_RESOURCE_COUNTERS is not set
69# CONFIG_CGROUP_SCHED is not set
70CONFIG_SYSFS_DEPRECATED=y
71CONFIG_SYSFS_DEPRECATED_V2=y
72CONFIG_RELAY=y
73CONFIG_NAMESPACES=y
74# CONFIG_UTS_NS is not set
75# CONFIG_IPC_NS is not set
76# CONFIG_USER_NS is not set
77# CONFIG_PID_NS is not set
78CONFIG_BLK_DEV_INITRD=y
79CONFIG_INITRAMFS_SOURCE=""
80CONFIG_RD_GZIP=y
81CONFIG_RD_BZIP2=y
82CONFIG_RD_LZMA=y
83CONFIG_RD_LZO=y
84CONFIG_CC_OPTIMIZE_FOR_SIZE=y
85CONFIG_SYSCTL=y
86CONFIG_ANON_INODES=y
87# CONFIG_EMBEDDED is not set
88CONFIG_UID16=y
89CONFIG_SYSCTL_SYSCALL=y
90CONFIG_KALLSYMS=y
91# CONFIG_KALLSYMS_EXTRA_PASS 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
105CONFIG_PERF_USE_VMALLOC=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
117CONFIG_PROFILING=y
118CONFIG_OPROFILE=m
119CONFIG_HAVE_OPROFILE=y
120# CONFIG_KPROBES is not set
121CONFIG_HAVE_KPROBES=y
122CONFIG_HAVE_KRETPROBES=y
123
124#
125# GCOV-based kernel profiling
126#
127# CONFIG_GCOV_KERNEL is not set
128CONFIG_SLOW_WORK=y
129# CONFIG_SLOW_WORK_DEBUG is not set
130CONFIG_HAVE_GENERIC_DMA_COHERENT=y
131CONFIG_SLABINFO=y
132CONFIG_RT_MUTEXES=y
133CONFIG_BASE_SMALL=0
134CONFIG_MODULES=y
135# CONFIG_MODULE_FORCE_LOAD is not set
136CONFIG_MODULE_UNLOAD=y
137CONFIG_MODULE_FORCE_UNLOAD=y
138CONFIG_MODVERSIONS=y
139# CONFIG_MODULE_SRCVERSION_ALL is not set
140CONFIG_BLOCK=y
141CONFIG_LBDAF=y
142# CONFIG_BLK_DEV_BSG is not set
143# CONFIG_BLK_DEV_INTEGRITY is not set
144
145#
146# IO Schedulers
147#
148CONFIG_IOSCHED_NOOP=y
149CONFIG_IOSCHED_DEADLINE=y
150CONFIG_IOSCHED_CFQ=m
151# CONFIG_CFQ_GROUP_IOSCHED is not set
152CONFIG_DEFAULT_DEADLINE=y
153# CONFIG_DEFAULT_CFQ is not set
154# CONFIG_DEFAULT_NOOP is not set
155CONFIG_DEFAULT_IOSCHED="deadline"
156# CONFIG_INLINE_SPIN_TRYLOCK is not set
157# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set
158# CONFIG_INLINE_SPIN_LOCK is not set
159# CONFIG_INLINE_SPIN_LOCK_BH is not set
160# CONFIG_INLINE_SPIN_LOCK_IRQ is not set
161# CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set
162CONFIG_INLINE_SPIN_UNLOCK=y
163# CONFIG_INLINE_SPIN_UNLOCK_BH is not set
164CONFIG_INLINE_SPIN_UNLOCK_IRQ=y
165# CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set
166# CONFIG_INLINE_READ_TRYLOCK is not set
167# CONFIG_INLINE_READ_LOCK is not set
168# CONFIG_INLINE_READ_LOCK_BH is not set
169# CONFIG_INLINE_READ_LOCK_IRQ is not set
170# CONFIG_INLINE_READ_LOCK_IRQSAVE is not set
171CONFIG_INLINE_READ_UNLOCK=y
172# CONFIG_INLINE_READ_UNLOCK_BH is not set
173CONFIG_INLINE_READ_UNLOCK_IRQ=y
174# CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set
175# CONFIG_INLINE_WRITE_TRYLOCK is not set
176# CONFIG_INLINE_WRITE_LOCK is not set
177# CONFIG_INLINE_WRITE_LOCK_BH is not set
178# CONFIG_INLINE_WRITE_LOCK_IRQ is not set
179# CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set
180CONFIG_INLINE_WRITE_UNLOCK=y
181# CONFIG_INLINE_WRITE_UNLOCK_BH is not set
182CONFIG_INLINE_WRITE_UNLOCK_IRQ=y
183# CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set
184# CONFIG_MUTEX_SPIN_ON_OWNER is not set
185# CONFIG_FREEZER is not set
186
187#
188# System Type
189#
190CONFIG_MMU=y
191# CONFIG_ARCH_AAEC2000 is not set
192# CONFIG_ARCH_INTEGRATOR is not set
193# CONFIG_ARCH_REALVIEW is not set
194# CONFIG_ARCH_VERSATILE is not set
195# CONFIG_ARCH_AT91 is not set
196# CONFIG_ARCH_BCMRING is not set
197# CONFIG_ARCH_CLPS711X is not set
198CONFIG_ARCH_CNS3XXX=y
199# CONFIG_ARCH_GEMINI is not set
200# CONFIG_ARCH_EBSA110 is not set
201# CONFIG_ARCH_EP93XX is not set
202# CONFIG_ARCH_FOOTBRIDGE is not set
203# CONFIG_ARCH_MXC is not set
204# CONFIG_ARCH_STMP3XXX is not set
205# CONFIG_ARCH_NETX is not set
206# CONFIG_ARCH_H720X is not set
207# CONFIG_ARCH_IOP13XX is not set
208# CONFIG_ARCH_IOP32X is not set
209# CONFIG_ARCH_IOP33X is not set
210# CONFIG_ARCH_IXP23XX is not set
211# CONFIG_ARCH_IXP2000 is not set
212# CONFIG_ARCH_IXP4XX is not set
213# CONFIG_ARCH_L7200 is not set
214# CONFIG_ARCH_DOVE is not set
215# CONFIG_ARCH_KIRKWOOD is not set
216# CONFIG_ARCH_LOKI is not set
217# CONFIG_ARCH_MV78XX0 is not set
218# CONFIG_ARCH_ORION5X is not set
219# CONFIG_ARCH_MMP is not set
220# CONFIG_ARCH_KS8695 is not set
221# CONFIG_ARCH_NS9XXX is not set
222# CONFIG_ARCH_W90X900 is not set
223# CONFIG_ARCH_NUC93X is not set
224# CONFIG_ARCH_PNX4008 is not set
225# CONFIG_ARCH_PXA is not set
226# CONFIG_ARCH_MSM is not set
227# CONFIG_ARCH_SHMOBILE is not set
228# CONFIG_ARCH_RPC is not set
229# CONFIG_ARCH_SA1100 is not set
230# CONFIG_ARCH_S3C2410 is not set
231# CONFIG_ARCH_S3C64XX is not set
232# CONFIG_ARCH_S5P6440 is not set
233# CONFIG_ARCH_S5P6442 is not set
234# CONFIG_ARCH_S5PC1XX is not set
235# CONFIG_ARCH_S5PV210 is not set
236# CONFIG_ARCH_SHARK is not set
237# CONFIG_ARCH_LH7A40X is not set
238# CONFIG_ARCH_U300 is not set
239# CONFIG_ARCH_U8500 is not set
240# CONFIG_ARCH_NOMADIK is not set
241# CONFIG_ARCH_DAVINCI is not set
242# CONFIG_ARCH_OMAP is not set
243
244#
245# CNS3XXX platform type
246#
247CONFIG_MACH_CNS3420VB=y
248
249#
250# Processor Type
251#
252CONFIG_CPU_V6=y
253# CONFIG_CPU_32v6K is not set
254CONFIG_CPU_32v6=y
255CONFIG_CPU_ABRT_EV6=y
256CONFIG_CPU_PABRT_V6=y
257CONFIG_CPU_CACHE_V6=y
258CONFIG_CPU_CACHE_VIPT=y
259CONFIG_CPU_COPY_V6=y
260CONFIG_CPU_TLB_V6=y
261CONFIG_CPU_HAS_ASID=y
262CONFIG_CPU_CP15=y
263CONFIG_CPU_CP15_MMU=y
264
265#
266# Processor Features
267#
268CONFIG_ARM_THUMB=y
269# CONFIG_CPU_ICACHE_DISABLE is not set
270# CONFIG_CPU_DCACHE_DISABLE is not set
271# CONFIG_CPU_BPREDICT_DISABLE is not set
272CONFIG_ARM_L1_CACHE_SHIFT=5
273CONFIG_CPU_HAS_PMU=y
274# CONFIG_ARM_ERRATA_411920 is not set
275CONFIG_ARM_GIC=y
276
277#
278# Bus support
279#
280# CONFIG_PCI_SYSCALL is not set
281# CONFIG_ARCH_SUPPORTS_MSI is not set
282# CONFIG_PCCARD is not set
283
284#
285# Kernel Features
286#
287# CONFIG_NO_HZ is not set
288# CONFIG_HIGH_RES_TIMERS is not set
289CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
290CONFIG_VMSPLIT_3G=y
291# CONFIG_VMSPLIT_2G is not set
292# CONFIG_VMSPLIT_1G is not set
293CONFIG_PAGE_OFFSET=0xC0000000
294CONFIG_PREEMPT_NONE=y
295# CONFIG_PREEMPT_VOLUNTARY is not set
296# CONFIG_PREEMPT is not set
297CONFIG_HZ=100
298CONFIG_AEABI=y
299CONFIG_OABI_COMPAT=y
300# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
301# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
302# CONFIG_HIGHMEM is not set
303CONFIG_SELECT_MEMORY_MODEL=y
304CONFIG_FLATMEM_MANUAL=y
305# CONFIG_DISCONTIGMEM_MANUAL is not set
306# CONFIG_SPARSEMEM_MANUAL is not set
307CONFIG_FLATMEM=y
308CONFIG_FLAT_NODE_MEM_MAP=y
309CONFIG_PAGEFLAGS_EXTENDED=y
310CONFIG_SPLIT_PTLOCK_CPUS=4
311# CONFIG_PHYS_ADDR_T_64BIT is not set
312CONFIG_ZONE_DMA_FLAG=0
313CONFIG_VIRT_TO_BUS=y
314# CONFIG_KSM is not set
315CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
316CONFIG_ALIGNMENT_TRAP=y
317# CONFIG_UACCESS_WITH_MEMCPY is not set
318
319#
320# Boot options
321#
322CONFIG_ZBOOT_ROM_TEXT=0x0
323CONFIG_ZBOOT_ROM_BSS=0x0
324CONFIG_CMDLINE="console=ttyS0,38400 mem=128M root=/dev/mmcblk0p1 ro rootwait"
325# CONFIG_XIP_KERNEL is not set
326# CONFIG_KEXEC is not set
327
328#
329# CPU Power Management
330#
331# CONFIG_CPU_IDLE is not set
332
333#
334# Floating point emulation
335#
336
337#
338# At least one emulation must be selected
339#
340# CONFIG_FPE_NWFPE is not set
341# CONFIG_FPE_FASTFPE is not set
342# CONFIG_VFP is not set
343
344#
345# Userspace binary formats
346#
347CONFIG_BINFMT_ELF=y
348# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
349CONFIG_HAVE_AOUT=y
350# CONFIG_BINFMT_AOUT is not set
351# CONFIG_BINFMT_MISC is not set
352
353#
354# Power management options
355#
356# CONFIG_PM is not set
357CONFIG_ARCH_SUSPEND_POSSIBLE=y
358# CONFIG_NET is not set
359
360#
361# Device Drivers
362#
363
364#
365# Generic Driver Options
366#
367CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
368# CONFIG_DEVTMPFS is not set
369CONFIG_STANDALONE=y
370CONFIG_PREVENT_FIRMWARE_BUILD=y
371CONFIG_FW_LOADER=y
372# CONFIG_FIRMWARE_IN_KERNEL is not set
373CONFIG_EXTRA_FIRMWARE=""
374# CONFIG_SYS_HYPERVISOR is not set
375CONFIG_MTD=y
376# CONFIG_MTD_DEBUG is not set
377# CONFIG_MTD_TESTS is not set
378# CONFIG_MTD_CONCAT is not set
379CONFIG_MTD_PARTITIONS=y
380# CONFIG_MTD_REDBOOT_PARTS is not set
381CONFIG_MTD_CMDLINE_PARTS=y
382# CONFIG_MTD_AFS_PARTS is not set
383# CONFIG_MTD_AR7_PARTS is not set
384
385#
386# User Modules And Translation Layers
387#
388CONFIG_MTD_CHAR=y
389CONFIG_MTD_BLKDEVS=y
390CONFIG_MTD_BLOCK=y
391# CONFIG_FTL is not set
392# CONFIG_NFTL is not set
393# CONFIG_INFTL is not set
394# CONFIG_RFD_FTL is not set
395# CONFIG_SSFDC is not set
396# CONFIG_MTD_OOPS is not set
397
398#
399# RAM/ROM/Flash chip drivers
400#
401CONFIG_MTD_CFI=y
402# CONFIG_MTD_JEDECPROBE is not set
403CONFIG_MTD_GEN_PROBE=y
404# CONFIG_MTD_CFI_ADV_OPTIONS is not set
405CONFIG_MTD_MAP_BANK_WIDTH_1=y
406CONFIG_MTD_MAP_BANK_WIDTH_2=y
407CONFIG_MTD_MAP_BANK_WIDTH_4=y
408# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
409# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
410# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
411CONFIG_MTD_CFI_I1=y
412CONFIG_MTD_CFI_I2=y
413# CONFIG_MTD_CFI_I4 is not set
414# CONFIG_MTD_CFI_I8 is not set
415# CONFIG_MTD_CFI_INTELEXT is not set
416CONFIG_MTD_CFI_AMDSTD=y
417# CONFIG_MTD_CFI_STAA is not set
418CONFIG_MTD_CFI_UTIL=y
419# CONFIG_MTD_RAM is not set
420# CONFIG_MTD_ROM is not set
421# CONFIG_MTD_ABSENT is not set
422
423#
424# Mapping drivers for chip access
425#
426# CONFIG_MTD_COMPLEX_MAPPINGS is not set
427CONFIG_MTD_PHYSMAP=y
428# CONFIG_MTD_PHYSMAP_COMPAT is not set
429# CONFIG_MTD_ARM_INTEGRATOR is not set
430# CONFIG_MTD_PLATRAM is not set
431
432#
433# Self-contained MTD device drivers
434#
435# CONFIG_MTD_SLRAM is not set
436# CONFIG_MTD_PHRAM is not set
437# CONFIG_MTD_MTDRAM is not set
438# CONFIG_MTD_BLOCK2MTD is not set
439
440#
441# Disk-On-Chip Device Drivers
442#
443# CONFIG_MTD_DOC2000 is not set
444# CONFIG_MTD_DOC2001 is not set
445# CONFIG_MTD_DOC2001PLUS is not set
446# CONFIG_MTD_NAND is not set
447# CONFIG_MTD_ONENAND is not set
448
449#
450# LPDDR flash memory drivers
451#
452# CONFIG_MTD_LPDDR is not set
453
454#
455# UBI - Unsorted block images
456#
457# CONFIG_MTD_UBI is not set
458# CONFIG_PARPORT is not set
459CONFIG_BLK_DEV=y
460# CONFIG_BLK_DEV_COW_COMMON is not set
461CONFIG_BLK_DEV_LOOP=y
462# CONFIG_BLK_DEV_CRYPTOLOOP is not set
463
464#
465# DRBD disabled because PROC_FS, INET or CONNECTOR not selected
466#
467CONFIG_BLK_DEV_RAM=y
468CONFIG_BLK_DEV_RAM_COUNT=16
469CONFIG_BLK_DEV_RAM_SIZE=20000
470# CONFIG_BLK_DEV_XIP is not set
471# CONFIG_CDROM_PKTCDVD is not set
472# CONFIG_MISC_DEVICES is not set
473CONFIG_HAVE_IDE=y
474# CONFIG_IDE is not set
475
476#
477# SCSI device support
478#
479CONFIG_SCSI_MOD=y
480# CONFIG_RAID_ATTRS is not set
481CONFIG_SCSI=y
482CONFIG_SCSI_DMA=y
483# CONFIG_SCSI_TGT is not set
484# CONFIG_SCSI_NETLINK is not set
485CONFIG_SCSI_PROC_FS=y
486
487#
488# SCSI support type (disk, tape, CD-ROM)
489#
490CONFIG_BLK_DEV_SD=y
491# CONFIG_CHR_DEV_ST is not set
492# CONFIG_CHR_DEV_OSST is not set
493# CONFIG_BLK_DEV_SR is not set
494# CONFIG_CHR_DEV_SG is not set
495# CONFIG_CHR_DEV_SCH is not set
496# CONFIG_SCSI_MULTI_LUN is not set
497# CONFIG_SCSI_CONSTANTS is not set
498# CONFIG_SCSI_LOGGING is not set
499# CONFIG_SCSI_SCAN_ASYNC is not set
500CONFIG_SCSI_WAIT_SCAN=m
501
502#
503# SCSI Transports
504#
505# CONFIG_SCSI_SPI_ATTRS is not set
506# CONFIG_SCSI_FC_ATTRS is not set
507# CONFIG_SCSI_SAS_LIBSAS is not set
508# CONFIG_SCSI_SRP_ATTRS is not set
509CONFIG_SCSI_LOWLEVEL=y
510# CONFIG_LIBFC is not set
511# CONFIG_LIBFCOE is not set
512# CONFIG_SCSI_DEBUG is not set
513# CONFIG_SCSI_DH is not set
514# CONFIG_SCSI_OSD_INITIATOR is not set
515CONFIG_ATA=y
516# CONFIG_ATA_NONSTANDARD is not set
517CONFIG_ATA_VERBOSE_ERROR=y
518# CONFIG_SATA_PMP is not set
519# CONFIG_ATA_SFF is not set
520# CONFIG_MD is not set
521# CONFIG_PHONE is not set
522
523#
524# Input device support
525#
526CONFIG_INPUT=y
527# CONFIG_INPUT_FF_MEMLESS is not set
528# CONFIG_INPUT_POLLDEV is not set
529# CONFIG_INPUT_SPARSEKMAP is not set
530
531#
532# Userland interfaces
533#
534CONFIG_INPUT_MOUSEDEV=y
535# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
536CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
537CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
538# CONFIG_INPUT_JOYDEV is not set
539# CONFIG_INPUT_EVDEV is not set
540# CONFIG_INPUT_EVBUG is not set
541
542#
543# Input Device Drivers
544#
545# CONFIG_INPUT_KEYBOARD is not set
546# CONFIG_INPUT_MOUSE is not set
547# CONFIG_INPUT_JOYSTICK is not set
548# CONFIG_INPUT_TABLET is not set
549# CONFIG_INPUT_TOUCHSCREEN is not set
550# CONFIG_INPUT_MISC is not set
551
552#
553# Hardware I/O ports
554#
555# CONFIG_SERIO is not set
556# CONFIG_GAMEPORT is not set
557
558#
559# Character devices
560#
561CONFIG_VT=y
562CONFIG_CONSOLE_TRANSLATIONS=y
563CONFIG_VT_CONSOLE=y
564CONFIG_HW_CONSOLE=y
565# CONFIG_VT_HW_CONSOLE_BINDING is not set
566CONFIG_DEVKMEM=y
567# CONFIG_SERIAL_NONSTANDARD is not set
568
569#
570# Serial drivers
571#
572CONFIG_SERIAL_8250=y
573CONFIG_SERIAL_8250_CONSOLE=y
574CONFIG_SERIAL_8250_NR_UARTS=4
575CONFIG_SERIAL_8250_RUNTIME_UARTS=4
576# CONFIG_SERIAL_8250_EXTENDED is not set
577
578#
579# Non-8250 serial port support
580#
581CONFIG_SERIAL_CORE=y
582CONFIG_SERIAL_CORE_CONSOLE=y
583# CONFIG_SERIAL_TIMBERDALE is not set
584CONFIG_UNIX98_PTYS=y
585# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
586CONFIG_LEGACY_PTYS=y
587CONFIG_LEGACY_PTY_COUNT=16
588# CONFIG_IPMI_HANDLER is not set
589# CONFIG_HW_RANDOM is not set
590# CONFIG_R3964 is not set
591# CONFIG_RAW_DRIVER is not set
592# CONFIG_TCG_TPM is not set
593# CONFIG_I2C is not set
594# CONFIG_SPI is not set
595
596#
597# PPS support
598#
599# CONFIG_PPS is not set
600# CONFIG_W1 is not set
601# CONFIG_POWER_SUPPLY is not set
602# CONFIG_HWMON is not set
603# CONFIG_THERMAL is not set
604# CONFIG_WATCHDOG is not set
605CONFIG_SSB_POSSIBLE=y
606
607#
608# Sonics Silicon Backplane
609#
610# CONFIG_SSB is not set
611
612#
613# Multifunction device drivers
614#
615# CONFIG_MFD_CORE is not set
616# CONFIG_MFD_SM501 is not set
617# CONFIG_HTC_PASIC3 is not set
618# CONFIG_MFD_TMIO is not set
619# CONFIG_REGULATOR is not set
620# CONFIG_MEDIA_SUPPORT is not set
621
622#
623# Graphics support
624#
625# CONFIG_VGASTATE is not set
626# CONFIG_VIDEO_OUTPUT_CONTROL is not set
627# CONFIG_FB is not set
628# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
629
630#
631# Display device support
632#
633# CONFIG_DISPLAY_SUPPORT is not set
634
635#
636# Console display driver support
637#
638# CONFIG_VGA_CONSOLE is not set
639CONFIG_DUMMY_CONSOLE=y
640# CONFIG_SOUND is not set
641# CONFIG_HID_SUPPORT is not set
642# CONFIG_USB_SUPPORT is not set
643CONFIG_MMC=y
644# CONFIG_MMC_DEBUG is not set
645# CONFIG_MMC_UNSAFE_RESUME is not set
646
647#
648# MMC/SD/SDIO Card Drivers
649#
650CONFIG_MMC_BLOCK=y
651CONFIG_MMC_BLOCK_BOUNCE=y
652# CONFIG_SDIO_UART is not set
653# CONFIG_MMC_TEST is not set
654
655#
656# MMC/SD/SDIO Host Controller Drivers
657#
658CONFIG_MMC_SDHCI=y
659CONFIG_MMC_SDHCI_PLTFM=y
660# CONFIG_MEMSTICK is not set
661# CONFIG_NEW_LEDS is not set
662# CONFIG_ACCESSIBILITY is not set
663CONFIG_RTC_LIB=y
664# CONFIG_RTC_CLASS is not set
665# CONFIG_DMADEVICES is not set
666# CONFIG_AUXDISPLAY is not set
667# CONFIG_UIO is not set
668
669#
670# TI VLYNQ
671#
672# CONFIG_STAGING is not set
673
674#
675# File systems
676#
677CONFIG_EXT2_FS=y
678CONFIG_EXT2_FS_XATTR=y
679# CONFIG_EXT2_FS_POSIX_ACL is not set
680# CONFIG_EXT2_FS_SECURITY is not set
681# CONFIG_EXT2_FS_XIP is not set
682# CONFIG_EXT3_FS is not set
683# CONFIG_EXT4_FS is not set
684CONFIG_FS_MBCACHE=y
685# CONFIG_REISERFS_FS is not set
686# CONFIG_JFS_FS is not set
687# CONFIG_FS_POSIX_ACL is not set
688# CONFIG_XFS_FS is not set
689# CONFIG_GFS2_FS is not set
690# CONFIG_BTRFS_FS is not set
691# CONFIG_NILFS2_FS is not set
692CONFIG_FILE_LOCKING=y
693CONFIG_FSNOTIFY=y
694CONFIG_DNOTIFY=y
695CONFIG_INOTIFY=y
696CONFIG_INOTIFY_USER=y
697# CONFIG_QUOTA is not set
698# CONFIG_AUTOFS_FS is not set
699CONFIG_AUTOFS4_FS=y
700# CONFIG_FUSE_FS is not set
701
702#
703# Caches
704#
705CONFIG_FSCACHE=y
706# CONFIG_FSCACHE_STATS is not set
707# CONFIG_FSCACHE_HISTOGRAM is not set
708# CONFIG_FSCACHE_DEBUG is not set
709# CONFIG_FSCACHE_OBJECT_LIST is not set
710# CONFIG_CACHEFILES is not set
711
712#
713# CD-ROM/DVD Filesystems
714#
715# CONFIG_ISO9660_FS is not set
716# CONFIG_UDF_FS is not set
717
718#
719# DOS/FAT/NT Filesystems
720#
721# CONFIG_MSDOS_FS is not set
722# CONFIG_VFAT_FS is not set
723# CONFIG_NTFS_FS is not set
724
725#
726# Pseudo filesystems
727#
728CONFIG_PROC_FS=y
729CONFIG_PROC_SYSCTL=y
730CONFIG_PROC_PAGE_MONITOR=y
731CONFIG_SYSFS=y
732CONFIG_TMPFS=y
733# CONFIG_TMPFS_POSIX_ACL is not set
734# CONFIG_HUGETLB_PAGE is not set
735# CONFIG_CONFIGFS_FS is not set
736CONFIG_MISC_FILESYSTEMS=y
737# CONFIG_ADFS_FS is not set
738# CONFIG_AFFS_FS is not set
739# CONFIG_HFS_FS is not set
740# CONFIG_HFSPLUS_FS is not set
741# CONFIG_BEFS_FS is not set
742# CONFIG_BFS_FS is not set
743# CONFIG_EFS_FS is not set
744# CONFIG_JFFS2_FS is not set
745# CONFIG_LOGFS is not set
746# CONFIG_CRAMFS is not set
747# CONFIG_SQUASHFS is not set
748# CONFIG_VXFS_FS is not set
749# CONFIG_MINIX_FS is not set
750# CONFIG_OMFS_FS is not set
751# CONFIG_HPFS_FS is not set
752# CONFIG_QNX4FS_FS is not set
753# CONFIG_ROMFS_FS is not set
754# CONFIG_SYSV_FS is not set
755# CONFIG_UFS_FS is not set
756
757#
758# Partition Types
759#
760# CONFIG_PARTITION_ADVANCED is not set
761CONFIG_MSDOS_PARTITION=y
762# CONFIG_NLS is not set
763
764#
765# Kernel hacking
766#
767# CONFIG_PRINTK_TIME is not set
768# CONFIG_ENABLE_WARN_DEPRECATED is not set
769# CONFIG_ENABLE_MUST_CHECK is not set
770CONFIG_FRAME_WARN=1024
771# CONFIG_MAGIC_SYSRQ is not set
772# CONFIG_STRIP_ASM_SYMS is not set
773# CONFIG_UNUSED_SYMBOLS is not set
774CONFIG_DEBUG_FS=y
775# CONFIG_HEADERS_CHECK is not set
776# CONFIG_DEBUG_KERNEL is not set
777CONFIG_DEBUG_BUGVERBOSE=y
778CONFIG_DEBUG_MEMORY_INIT=y
779CONFIG_FRAME_POINTER=y
780# CONFIG_RCU_CPU_STALL_DETECTOR is not set
781# CONFIG_LKDTM is not set
782# CONFIG_LATENCYTOP is not set
783# CONFIG_SYSCTL_SYSCALL_CHECK is not set
784CONFIG_HAVE_FUNCTION_TRACER=y
785CONFIG_RING_BUFFER=y
786CONFIG_RING_BUFFER_ALLOW_SWAP=y
787CONFIG_TRACING_SUPPORT=y
788# CONFIG_FTRACE is not set
789# CONFIG_DYNAMIC_DEBUG is not set
790# CONFIG_SAMPLES is not set
791CONFIG_HAVE_ARCH_KGDB=y
792# CONFIG_ARM_UNWIND is not set
793# CONFIG_DEBUG_USER is not set
794# CONFIG_OC_ETM is not set
795
796#
797# Security options
798#
799# CONFIG_KEYS is not set
800# CONFIG_SECURITY is not set
801# CONFIG_SECURITYFS is not set
802# CONFIG_DEFAULT_SECURITY_SELINUX is not set
803# CONFIG_DEFAULT_SECURITY_SMACK is not set
804# CONFIG_DEFAULT_SECURITY_TOMOYO is not set
805CONFIG_DEFAULT_SECURITY_DAC=y
806CONFIG_DEFAULT_SECURITY=""
807# CONFIG_CRYPTO is not set
808# CONFIG_BINARY_PRINTF is not set
809
810#
811# Library routines
812#
813CONFIG_BITREVERSE=y
814CONFIG_GENERIC_FIND_LAST_BIT=y
815CONFIG_CRC_CCITT=y
816# CONFIG_CRC16 is not set
817# CONFIG_CRC_T10DIF is not set
818# CONFIG_CRC_ITU_T is not set
819CONFIG_CRC32=y
820# CONFIG_CRC7 is not set
821# CONFIG_LIBCRC32C is not set
822CONFIG_ZLIB_INFLATE=y
823CONFIG_LZO_DECOMPRESS=y
824CONFIG_DECOMPRESS_GZIP=y
825CONFIG_DECOMPRESS_BZIP2=y
826CONFIG_DECOMPRESS_LZMA=y
827CONFIG_DECOMPRESS_LZO=y
828CONFIG_HAS_IOMEM=y
829CONFIG_HAS_IOPORT=y
830CONFIG_HAS_DMA=y
831CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/arm/configs/imote2_defconfig b/arch/arm/configs/imote2_defconfig
index 95d2becfc664..21f2bff8a363 100644
--- a/arch/arm/configs/imote2_defconfig
+++ b/arch/arm/configs/imote2_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.33-rc8 3# Linux kernel version: 2.6.34-rc2
4# Sat Feb 13 21:48:53 2010 4# Thu Apr 8 14:49:08 2010
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_SYS_SUPPORTS_APM_EMULATION=y 7CONFIG_SYS_SUPPORTS_APM_EMULATION=y
8CONFIG_GENERIC_GPIO=y 8CONFIG_GENERIC_GPIO=y
9CONFIG_GENERIC_TIME=y 9CONFIG_GENERIC_TIME=y
10CONFIG_GENERIC_CLOCKEVENTS=y 10CONFIG_GENERIC_CLOCKEVENTS=y
11CONFIG_HAVE_PROC_CPU=y
11CONFIG_GENERIC_HARDIRQS=y 12CONFIG_GENERIC_HARDIRQS=y
12CONFIG_STACKTRACE_SUPPORT=y 13CONFIG_STACKTRACE_SUPPORT=y
13CONFIG_HAVE_LATENCYTOP_SUPPORT=y 14CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -19,6 +20,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
19CONFIG_ARCH_HAS_CPUFREQ=y 20CONFIG_ARCH_HAS_CPUFREQ=y
20CONFIG_GENERIC_HWEIGHT=y 21CONFIG_GENERIC_HWEIGHT=y
21CONFIG_GENERIC_CALIBRATE_DELAY=y 22CONFIG_GENERIC_CALIBRATE_DELAY=y
23CONFIG_NEED_DMA_MAP_STATE=y
22CONFIG_ARCH_MTD_XIP=y 24CONFIG_ARCH_MTD_XIP=y
23CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 25CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
24CONFIG_VECTORS_BASE=0xffff0000 26CONFIG_VECTORS_BASE=0xffff0000
@@ -60,11 +62,6 @@ CONFIG_RCU_FANOUT=32
60# CONFIG_TREE_RCU_TRACE is not set 62# CONFIG_TREE_RCU_TRACE is not set
61# CONFIG_IKCONFIG is not set 63# CONFIG_IKCONFIG is not set
62CONFIG_LOG_BUF_SHIFT=14 64CONFIG_LOG_BUF_SHIFT=14
63CONFIG_GROUP_SCHED=y
64CONFIG_FAIR_GROUP_SCHED=y
65# CONFIG_RT_GROUP_SCHED is not set
66CONFIG_USER_SCHED=y
67# CONFIG_CGROUP_SCHED is not set
68# CONFIG_CGROUPS is not set 65# CONFIG_CGROUPS is not set
69CONFIG_SYSFS_DEPRECATED=y 66CONFIG_SYSFS_DEPRECATED=y
70CONFIG_SYSFS_DEPRECATED_V2=y 67CONFIG_SYSFS_DEPRECATED_V2=y
@@ -97,10 +94,14 @@ CONFIG_TIMERFD=y
97CONFIG_EVENTFD=y 94CONFIG_EVENTFD=y
98CONFIG_SHMEM=y 95CONFIG_SHMEM=y
99CONFIG_AIO=y 96CONFIG_AIO=y
97CONFIG_HAVE_PERF_EVENTS=y
98CONFIG_PERF_USE_VMALLOC=y
100 99
101# 100#
102# Kernel Performance Events And Counters 101# Kernel Performance Events And Counters
103# 102#
103# CONFIG_PERF_EVENTS is not set
104# CONFIG_PERF_COUNTERS is not set
104CONFIG_VM_EVENT_COUNTERS=y 105CONFIG_VM_EVENT_COUNTERS=y
105# CONFIG_COMPAT_BRK is not set 106# CONFIG_COMPAT_BRK is not set
106CONFIG_SLAB=y 107CONFIG_SLAB=y
@@ -184,6 +185,7 @@ CONFIG_MMU=y
184# CONFIG_ARCH_REALVIEW is not set 185# CONFIG_ARCH_REALVIEW is not set
185# CONFIG_ARCH_VERSATILE is not set 186# CONFIG_ARCH_VERSATILE is not set
186# CONFIG_ARCH_AT91 is not set 187# CONFIG_ARCH_AT91 is not set
188# CONFIG_ARCH_BCMRING is not set
187# CONFIG_ARCH_CLPS711X is not set 189# CONFIG_ARCH_CLPS711X is not set
188# CONFIG_ARCH_GEMINI is not set 190# CONFIG_ARCH_GEMINI is not set
189# CONFIG_ARCH_EBSA110 is not set 191# CONFIG_ARCH_EBSA110 is not set
@@ -193,7 +195,6 @@ CONFIG_MMU=y
193# CONFIG_ARCH_STMP3XXX is not set 195# CONFIG_ARCH_STMP3XXX is not set
194# CONFIG_ARCH_NETX is not set 196# CONFIG_ARCH_NETX is not set
195# CONFIG_ARCH_H720X is not set 197# CONFIG_ARCH_H720X is not set
196# CONFIG_ARCH_NOMADIK is not set
197# CONFIG_ARCH_IOP13XX is not set 198# CONFIG_ARCH_IOP13XX is not set
198# CONFIG_ARCH_IOP32X is not set 199# CONFIG_ARCH_IOP32X is not set
199# CONFIG_ARCH_IOP33X is not set 200# CONFIG_ARCH_IOP33X is not set
@@ -210,21 +211,26 @@ CONFIG_MMU=y
210# CONFIG_ARCH_KS8695 is not set 211# CONFIG_ARCH_KS8695 is not set
211# CONFIG_ARCH_NS9XXX is not set 212# CONFIG_ARCH_NS9XXX is not set
212# CONFIG_ARCH_W90X900 is not set 213# CONFIG_ARCH_W90X900 is not set
214# CONFIG_ARCH_NUC93X is not set
213# CONFIG_ARCH_PNX4008 is not set 215# CONFIG_ARCH_PNX4008 is not set
214CONFIG_ARCH_PXA=y 216CONFIG_ARCH_PXA=y
215# CONFIG_ARCH_MSM is not set 217# CONFIG_ARCH_MSM is not set
218# CONFIG_ARCH_SHMOBILE is not set
216# CONFIG_ARCH_RPC is not set 219# CONFIG_ARCH_RPC is not set
217# CONFIG_ARCH_SA1100 is not set 220# CONFIG_ARCH_SA1100 is not set
218# CONFIG_ARCH_S3C2410 is not set 221# CONFIG_ARCH_S3C2410 is not set
219# CONFIG_ARCH_S3C64XX is not set 222# CONFIG_ARCH_S3C64XX is not set
223# CONFIG_ARCH_S5P6440 is not set
224# CONFIG_ARCH_S5P6442 is not set
220# CONFIG_ARCH_S5PC1XX is not set 225# CONFIG_ARCH_S5PC1XX is not set
226# CONFIG_ARCH_S5PV210 is not set
221# CONFIG_ARCH_SHARK is not set 227# CONFIG_ARCH_SHARK is not set
222# CONFIG_ARCH_LH7A40X is not set 228# CONFIG_ARCH_LH7A40X is not set
223# CONFIG_ARCH_U300 is not set 229# CONFIG_ARCH_U300 is not set
230# CONFIG_ARCH_U8500 is not set
231# CONFIG_ARCH_NOMADIK is not set
224# CONFIG_ARCH_DAVINCI is not set 232# CONFIG_ARCH_DAVINCI is not set
225# CONFIG_ARCH_OMAP is not set 233# CONFIG_ARCH_OMAP is not set
226# CONFIG_ARCH_BCMRING is not set
227# CONFIG_ARCH_U8500 is not set
228 234
229# 235#
230# Intel PXA2xx/PXA3xx Implementations 236# Intel PXA2xx/PXA3xx Implementations
@@ -253,6 +259,7 @@ CONFIG_ARCH_PXA=y
253# CONFIG_MACH_EM_X270 is not set 259# CONFIG_MACH_EM_X270 is not set
254# CONFIG_MACH_EXEDA is not set 260# CONFIG_MACH_EXEDA is not set
255# CONFIG_MACH_CM_X300 is not set 261# CONFIG_MACH_CM_X300 is not set
262# CONFIG_MACH_CAPC7117 is not set
256# CONFIG_ARCH_GUMSTIX is not set 263# CONFIG_ARCH_GUMSTIX is not set
257CONFIG_MACH_INTELMOTE2=y 264CONFIG_MACH_INTELMOTE2=y
258# CONFIG_MACH_STARGATE2 is not set 265# CONFIG_MACH_STARGATE2 is not set
@@ -275,7 +282,11 @@ CONFIG_MACH_INTELMOTE2=y
275# CONFIG_PXA_EZX is not set 282# CONFIG_PXA_EZX is not set
276# CONFIG_MACH_MP900C is not set 283# CONFIG_MACH_MP900C is not set
277# CONFIG_ARCH_PXA_PALM is not set 284# CONFIG_ARCH_PXA_PALM is not set
285# CONFIG_MACH_RAUMFELD_RC is not set
286# CONFIG_MACH_RAUMFELD_CONNECTOR is not set
287# CONFIG_MACH_RAUMFELD_SPEAKER is not set
278# CONFIG_PXA_SHARPSL is not set 288# CONFIG_PXA_SHARPSL is not set
289# CONFIG_MACH_ICONTROL is not set
279# CONFIG_ARCH_PXA_ESERIES is not set 290# CONFIG_ARCH_PXA_ESERIES is not set
280CONFIG_PXA27x=y 291CONFIG_PXA27x=y
281CONFIG_PXA_SSP=y 292CONFIG_PXA_SSP=y
@@ -302,6 +313,7 @@ CONFIG_ARM_THUMB=y
302CONFIG_ARM_L1_CACHE_SHIFT=5 313CONFIG_ARM_L1_CACHE_SHIFT=5
303CONFIG_IWMMXT=y 314CONFIG_IWMMXT=y
304CONFIG_XSCALE_PMU=y 315CONFIG_XSCALE_PMU=y
316CONFIG_CPU_HAS_PMU=y
305CONFIG_COMMON_CLKDEV=y 317CONFIG_COMMON_CLKDEV=y
306 318
307# 319#
@@ -352,7 +364,7 @@ CONFIG_ALIGNMENT_TRAP=y
352# 364#
353CONFIG_ZBOOT_ROM_TEXT=0x0 365CONFIG_ZBOOT_ROM_TEXT=0x0
354CONFIG_ZBOOT_ROM_BSS=0x0 366CONFIG_ZBOOT_ROM_BSS=0x0
355CONFIG_CMDLINE="console=tty1 root=/dev/mmcblk0p2 rootfstype=ext2 rootdelay=3 ip=192.168.0.202:192.168.0.200:192.168.0.200:255.255.255.0 debug" 367CONFIG_CMDLINE="root=/dev/mtdblock2 rootfstype=jffs2 console=ttyS2,115200 mem=32M"
356# CONFIG_XIP_KERNEL is not set 368# CONFIG_XIP_KERNEL is not set
357CONFIG_KEXEC=y 369CONFIG_KEXEC=y
358CONFIG_ATAGS_PROC=y 370CONFIG_ATAGS_PROC=y
@@ -360,24 +372,8 @@ CONFIG_ATAGS_PROC=y
360# 372#
361# CPU Power Management 373# CPU Power Management
362# 374#
363CONFIG_CPU_FREQ=y 375# CONFIG_CPU_FREQ is not set
364CONFIG_CPU_FREQ_TABLE=y 376# CONFIG_CPU_IDLE is not set
365CONFIG_CPU_FREQ_DEBUG=y
366CONFIG_CPU_FREQ_STAT=y
367# CONFIG_CPU_FREQ_STAT_DETAILS is not set
368CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
369# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
370# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
371# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
372# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
373CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
374CONFIG_CPU_FREQ_GOV_POWERSAVE=m
375CONFIG_CPU_FREQ_GOV_USERSPACE=m
376CONFIG_CPU_FREQ_GOV_ONDEMAND=m
377CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
378CONFIG_CPU_IDLE=y
379CONFIG_CPU_IDLE_GOV_LADDER=y
380CONFIG_CPU_IDLE_GOV_MENU=y
381 377
382# 378#
383# Floating point emulation 379# Floating point emulation
@@ -409,6 +405,7 @@ CONFIG_SUSPEND=y
409CONFIG_SUSPEND_FREEZER=y 405CONFIG_SUSPEND_FREEZER=y
410CONFIG_APM_EMULATION=y 406CONFIG_APM_EMULATION=y
411CONFIG_PM_RUNTIME=y 407CONFIG_PM_RUNTIME=y
408CONFIG_PM_OPS=y
412CONFIG_ARCH_SUSPEND_POSSIBLE=y 409CONFIG_ARCH_SUSPEND_POSSIBLE=y
413CONFIG_NET=y 410CONFIG_NET=y
414 411
@@ -416,7 +413,6 @@ CONFIG_NET=y
416# Networking options 413# Networking options
417# 414#
418CONFIG_PACKET=y 415CONFIG_PACKET=y
419CONFIG_PACKET_MMAP=y
420CONFIG_UNIX=y 416CONFIG_UNIX=y
421CONFIG_XFRM=y 417CONFIG_XFRM=y
422# CONFIG_XFRM_USER is not set 418# CONFIG_XFRM_USER is not set
@@ -506,6 +502,7 @@ CONFIG_NF_CT_NETLINK=m
506CONFIG_NETFILTER_XTABLES=m 502CONFIG_NETFILTER_XTABLES=m
507CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m 503CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
508# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set 504# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set
505# CONFIG_NETFILTER_XT_TARGET_CT is not set
509# CONFIG_NETFILTER_XT_TARGET_DSCP is not set 506# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
510CONFIG_NETFILTER_XT_TARGET_HL=m 507CONFIG_NETFILTER_XT_TARGET_HL=m
511CONFIG_NETFILTER_XT_TARGET_LED=m 508CONFIG_NETFILTER_XT_TARGET_LED=m
@@ -622,6 +619,7 @@ CONFIG_IP6_NF_RAW=m
622# CONFIG_ATM is not set 619# CONFIG_ATM is not set
623CONFIG_STP=m 620CONFIG_STP=m
624CONFIG_BRIDGE=m 621CONFIG_BRIDGE=m
622# CONFIG_BRIDGE_IGMP_SNOOPING is not set
625# CONFIG_NET_DSA is not set 623# CONFIG_NET_DSA is not set
626# CONFIG_VLAN_8021Q is not set 624# CONFIG_VLAN_8021Q is not set
627# CONFIG_DECNET is not set 625# CONFIG_DECNET is not set
@@ -646,32 +644,7 @@ CONFIG_NET_CLS_ROUTE=y
646# CONFIG_HAMRADIO is not set 644# CONFIG_HAMRADIO is not set
647# CONFIG_CAN is not set 645# CONFIG_CAN is not set
648# CONFIG_IRDA is not set 646# CONFIG_IRDA is not set
649CONFIG_BT=y 647# CONFIG_BT is not set
650CONFIG_BT_L2CAP=y
651CONFIG_BT_SCO=y
652CONFIG_BT_RFCOMM=y
653CONFIG_BT_RFCOMM_TTY=y
654CONFIG_BT_BNEP=y
655CONFIG_BT_BNEP_MC_FILTER=y
656CONFIG_BT_BNEP_PROTO_FILTER=y
657CONFIG_BT_HIDP=y
658
659#
660# Bluetooth device drivers
661#
662CONFIG_BT_HCIBTUSB=m
663CONFIG_BT_HCIBTSDIO=m
664CONFIG_BT_HCIUART=y
665CONFIG_BT_HCIUART_H4=y
666# CONFIG_BT_HCIUART_BCSP is not set
667# CONFIG_BT_HCIUART_LL is not set
668CONFIG_BT_HCIBCM203X=m
669CONFIG_BT_HCIBPA10X=m
670CONFIG_BT_HCIBFUSB=m
671CONFIG_BT_HCIVHCI=m
672CONFIG_BT_MRVL=m
673CONFIG_BT_MRVL_SDIO=m
674# CONFIG_BT_ATH3K is not set
675# CONFIG_AF_RXRPC is not set 648# CONFIG_AF_RXRPC is not set
676CONFIG_FIB_RULES=y 649CONFIG_FIB_RULES=y
677# CONFIG_WIRELESS is not set 650# CONFIG_WIRELESS is not set
@@ -687,7 +660,8 @@ CONFIG_FIB_RULES=y
687# Generic Driver Options 660# Generic Driver Options
688# 661#
689CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 662CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
690# CONFIG_DEVTMPFS is not set 663CONFIG_DEVTMPFS=y
664CONFIG_DEVTMPFS_MOUNT=y
691CONFIG_STANDALONE=y 665CONFIG_STANDALONE=y
692CONFIG_PREVENT_FIRMWARE_BUILD=y 666CONFIG_PREVENT_FIRMWARE_BUILD=y
693CONFIG_FW_LOADER=m 667CONFIG_FW_LOADER=m
@@ -703,9 +677,9 @@ CONFIG_MTD=y
703# CONFIG_MTD_CONCAT is not set 677# CONFIG_MTD_CONCAT is not set
704CONFIG_MTD_PARTITIONS=y 678CONFIG_MTD_PARTITIONS=y
705# CONFIG_MTD_REDBOOT_PARTS is not set 679# CONFIG_MTD_REDBOOT_PARTS is not set
706# CONFIG_MTD_CMDLINE_PARTS is not set 680CONFIG_MTD_CMDLINE_PARTS=y
707# CONFIG_MTD_AFS_PARTS is not set 681CONFIG_MTD_AFS_PARTS=y
708# CONFIG_MTD_AR7_PARTS is not set 682CONFIG_MTD_AR7_PARTS=y
709 683
710# 684#
711# User Modules And Translation Layers 685# User Modules And Translation Layers
@@ -812,6 +786,7 @@ CONFIG_HAVE_IDE=y
812# 786#
813# SCSI device support 787# SCSI device support
814# 788#
789CONFIG_SCSI_MOD=y
815# CONFIG_RAID_ATTRS is not set 790# CONFIG_RAID_ATTRS is not set
816# CONFIG_SCSI is not set 791# CONFIG_SCSI is not set
817# CONFIG_SCSI_DMA is not set 792# CONFIG_SCSI_DMA is not set
@@ -965,6 +940,7 @@ CONFIG_SERIAL_PXA=y
965CONFIG_SERIAL_PXA_CONSOLE=y 940CONFIG_SERIAL_PXA_CONSOLE=y
966CONFIG_SERIAL_CORE=y 941CONFIG_SERIAL_CORE=y
967CONFIG_SERIAL_CORE_CONSOLE=y 942CONFIG_SERIAL_CORE_CONSOLE=y
943# CONFIG_SERIAL_TIMBERDALE is not set
968CONFIG_UNIX98_PTYS=y 944CONFIG_UNIX98_PTYS=y
969# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set 945# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
970CONFIG_LEGACY_PTYS=y 946CONFIG_LEGACY_PTYS=y
@@ -993,6 +969,7 @@ CONFIG_I2C_HELPER_AUTO=y
993CONFIG_I2C_PXA=y 969CONFIG_I2C_PXA=y
994# CONFIG_I2C_PXA_SLAVE is not set 970# CONFIG_I2C_PXA_SLAVE is not set
995# CONFIG_I2C_SIMTEC is not set 971# CONFIG_I2C_SIMTEC is not set
972# CONFIG_I2C_XILINX is not set
996 973
997# 974#
998# External I2C/SMBus adapter drivers 975# External I2C/SMBus adapter drivers
@@ -1006,15 +983,9 @@ CONFIG_I2C_PXA=y
1006# 983#
1007# CONFIG_I2C_PCA_PLATFORM is not set 984# CONFIG_I2C_PCA_PLATFORM is not set
1008# CONFIG_I2C_STUB is not set 985# CONFIG_I2C_STUB is not set
1009
1010#
1011# Miscellaneous I2C Chip support
1012#
1013# CONFIG_SENSORS_TSL2550 is not set
1014# CONFIG_I2C_DEBUG_CORE is not set 986# CONFIG_I2C_DEBUG_CORE is not set
1015# CONFIG_I2C_DEBUG_ALGO is not set 987# CONFIG_I2C_DEBUG_ALGO is not set
1016# CONFIG_I2C_DEBUG_BUS is not set 988# CONFIG_I2C_DEBUG_BUS is not set
1017# CONFIG_I2C_DEBUG_CHIP is not set
1018CONFIG_SPI=y 989CONFIG_SPI=y
1019# CONFIG_SPI_DEBUG is not set 990# CONFIG_SPI_DEBUG is not set
1020CONFIG_SPI_MASTER=y 991CONFIG_SPI_MASTER=y
@@ -1046,10 +1017,12 @@ CONFIG_GPIO_SYSFS=y
1046# 1017#
1047# Memory mapped GPIO expanders: 1018# Memory mapped GPIO expanders:
1048# 1019#
1020# CONFIG_GPIO_IT8761E is not set
1049 1021
1050# 1022#
1051# I2C GPIO expanders: 1023# I2C GPIO expanders:
1052# 1024#
1025# CONFIG_GPIO_MAX7300 is not set
1053# CONFIG_GPIO_MAX732X is not set 1026# CONFIG_GPIO_MAX732X is not set
1054# CONFIG_GPIO_PCA953X is not set 1027# CONFIG_GPIO_PCA953X is not set
1055# CONFIG_GPIO_PCF857X is not set 1028# CONFIG_GPIO_PCF857X is not set
@@ -1093,10 +1066,12 @@ CONFIG_SSB_POSSIBLE=y
1093# Multifunction device drivers 1066# Multifunction device drivers
1094# 1067#
1095# CONFIG_MFD_CORE is not set 1068# CONFIG_MFD_CORE is not set
1069# CONFIG_MFD_88PM860X is not set
1096# CONFIG_MFD_SM501 is not set 1070# CONFIG_MFD_SM501 is not set
1097# CONFIG_MFD_ASIC3 is not set 1071# CONFIG_MFD_ASIC3 is not set
1098# CONFIG_HTC_EGPIO is not set 1072# CONFIG_HTC_EGPIO is not set
1099# CONFIG_HTC_PASIC3 is not set 1073# CONFIG_HTC_PASIC3 is not set
1074# CONFIG_HTC_I2CPLD is not set
1100# CONFIG_TPS65010 is not set 1075# CONFIG_TPS65010 is not set
1101# CONFIG_TWL4030_CORE is not set 1076# CONFIG_TWL4030_CORE is not set
1102# CONFIG_MFD_TMIO is not set 1077# CONFIG_MFD_TMIO is not set
@@ -1105,22 +1080,25 @@ CONFIG_SSB_POSSIBLE=y
1105# CONFIG_MFD_TC6393XB is not set 1080# CONFIG_MFD_TC6393XB is not set
1106CONFIG_PMIC_DA903X=y 1081CONFIG_PMIC_DA903X=y
1107# CONFIG_PMIC_ADP5520 is not set 1082# CONFIG_PMIC_ADP5520 is not set
1083# CONFIG_MFD_MAX8925 is not set
1108# CONFIG_MFD_WM8400 is not set 1084# CONFIG_MFD_WM8400 is not set
1109# CONFIG_MFD_WM831X is not set 1085# CONFIG_MFD_WM831X is not set
1110# CONFIG_MFD_WM8350_I2C is not set 1086# CONFIG_MFD_WM8350_I2C is not set
1087# CONFIG_MFD_WM8994 is not set
1111# CONFIG_MFD_PCF50633 is not set 1088# CONFIG_MFD_PCF50633 is not set
1112# CONFIG_MFD_MC13783 is not set 1089# CONFIG_MFD_MC13783 is not set
1113# CONFIG_AB3100_CORE is not set 1090# CONFIG_AB3100_CORE is not set
1114# CONFIG_EZX_PCAP is not set 1091# CONFIG_EZX_PCAP is not set
1115# CONFIG_MFD_88PM8607 is not set
1116# CONFIG_AB4500_CORE is not set 1092# CONFIG_AB4500_CORE is not set
1117CONFIG_REGULATOR=y 1093CONFIG_REGULATOR=y
1118CONFIG_REGULATOR_DEBUG=y 1094CONFIG_REGULATOR_DEBUG=y
1095# CONFIG_REGULATOR_DUMMY is not set
1119# CONFIG_REGULATOR_FIXED_VOLTAGE is not set 1096# CONFIG_REGULATOR_FIXED_VOLTAGE is not set
1120CONFIG_REGULATOR_VIRTUAL_CONSUMER=y 1097CONFIG_REGULATOR_VIRTUAL_CONSUMER=y
1121CONFIG_REGULATOR_USERSPACE_CONSUMER=y 1098CONFIG_REGULATOR_USERSPACE_CONSUMER=y
1122# CONFIG_REGULATOR_BQ24022 is not set 1099# CONFIG_REGULATOR_BQ24022 is not set
1123# CONFIG_REGULATOR_MAX1586 is not set 1100# CONFIG_REGULATOR_MAX1586 is not set
1101# CONFIG_REGULATOR_MAX8649 is not set
1124# CONFIG_REGULATOR_MAX8660 is not set 1102# CONFIG_REGULATOR_MAX8660 is not set
1125CONFIG_REGULATOR_DA903X=y 1103CONFIG_REGULATOR_DA903X=y
1126# CONFIG_REGULATOR_LP3971 is not set 1104# CONFIG_REGULATOR_LP3971 is not set
@@ -1218,6 +1196,7 @@ CONFIG_VIDEO_IR_I2C=y
1218# CONFIG_VIDEO_SAA7191 is not set 1196# CONFIG_VIDEO_SAA7191 is not set
1219# CONFIG_VIDEO_TVP514X is not set 1197# CONFIG_VIDEO_TVP514X is not set
1220# CONFIG_VIDEO_TVP5150 is not set 1198# CONFIG_VIDEO_TVP5150 is not set
1199# CONFIG_VIDEO_TVP7002 is not set
1221# CONFIG_VIDEO_VPX3220 is not set 1200# CONFIG_VIDEO_VPX3220 is not set
1222 1201
1223# 1202#
@@ -1264,15 +1243,7 @@ CONFIG_SOC_CAMERA_MT9M111=y
1264CONFIG_VIDEO_PXA27x=y 1243CONFIG_VIDEO_PXA27x=y
1265# CONFIG_VIDEO_SH_MOBILE_CEU is not set 1244# CONFIG_VIDEO_SH_MOBILE_CEU is not set
1266# CONFIG_V4L_USB_DRIVERS is not set 1245# CONFIG_V4L_USB_DRIVERS is not set
1267CONFIG_RADIO_ADAPTERS=y 1246# CONFIG_RADIO_ADAPTERS is not set
1268# CONFIG_I2C_SI4713 is not set
1269# CONFIG_RADIO_SI4713 is not set
1270# CONFIG_USB_DSBR is not set
1271# CONFIG_RADIO_SI470X is not set
1272# CONFIG_USB_MR800 is not set
1273CONFIG_RADIO_TEA5764=y
1274CONFIG_RADIO_TEA5764_XTAL=y
1275# CONFIG_RADIO_TEF6862 is not set
1276# CONFIG_DAB is not set 1247# CONFIG_DAB is not set
1277 1248
1278# 1249#
@@ -1398,8 +1369,6 @@ CONFIG_HID=y
1398# 1369#
1399# Special HID drivers 1370# Special HID drivers
1400# 1371#
1401CONFIG_HID_APPLE=m
1402# CONFIG_HID_WACOM is not set
1403CONFIG_USB_SUPPORT=y 1372CONFIG_USB_SUPPORT=y
1404CONFIG_USB_ARCH_HAS_HCD=y 1373CONFIG_USB_ARCH_HAS_HCD=y
1405CONFIG_USB_ARCH_HAS_OHCI=y 1374CONFIG_USB_ARCH_HAS_OHCI=y
@@ -1477,7 +1446,6 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1477# CONFIG_USB_RIO500 is not set 1446# CONFIG_USB_RIO500 is not set
1478# CONFIG_USB_LEGOTOWER is not set 1447# CONFIG_USB_LEGOTOWER is not set
1479# CONFIG_USB_LCD is not set 1448# CONFIG_USB_LCD is not set
1480# CONFIG_USB_BERRY_CHARGE is not set
1481# CONFIG_USB_LED is not set 1449# CONFIG_USB_LED is not set
1482# CONFIG_USB_CYPRESS_CY7C63 is not set 1450# CONFIG_USB_CYPRESS_CY7C63 is not set
1483# CONFIG_USB_CYTHERM is not set 1451# CONFIG_USB_CYTHERM is not set
@@ -1489,7 +1457,6 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1489# CONFIG_USB_IOWARRIOR is not set 1457# CONFIG_USB_IOWARRIOR is not set
1490# CONFIG_USB_TEST is not set 1458# CONFIG_USB_TEST is not set
1491# CONFIG_USB_ISIGHTFW is not set 1459# CONFIG_USB_ISIGHTFW is not set
1492# CONFIG_USB_VST is not set
1493CONFIG_USB_GADGET=y 1460CONFIG_USB_GADGET=y
1494# CONFIG_USB_GADGET_DEBUG is not set 1461# CONFIG_USB_GADGET_DEBUG is not set
1495# CONFIG_USB_GADGET_DEBUG_FILES is not set 1462# CONFIG_USB_GADGET_DEBUG_FILES is not set
@@ -1529,6 +1496,7 @@ CONFIG_USB_ETH=y
1529# CONFIG_USB_MIDI_GADGET is not set 1496# CONFIG_USB_MIDI_GADGET is not set
1530# CONFIG_USB_G_PRINTER is not set 1497# CONFIG_USB_G_PRINTER is not set
1531# CONFIG_USB_CDC_COMPOSITE is not set 1498# CONFIG_USB_CDC_COMPOSITE is not set
1499# CONFIG_USB_G_NOKIA is not set
1532# CONFIG_USB_G_MULTI is not set 1500# CONFIG_USB_G_MULTI is not set
1533 1501
1534# 1502#
@@ -1555,8 +1523,6 @@ CONFIG_SDIO_UART=m
1555# 1523#
1556CONFIG_MMC_PXA=y 1524CONFIG_MMC_PXA=y
1557# CONFIG_MMC_SDHCI is not set 1525# CONFIG_MMC_SDHCI is not set
1558# CONFIG_MMC_AT91 is not set
1559# CONFIG_MMC_ATMELMCI is not set
1560CONFIG_MMC_SPI=y 1526CONFIG_MMC_SPI=y
1561# CONFIG_MEMSTICK is not set 1527# CONFIG_MEMSTICK is not set
1562CONFIG_NEW_LEDS=y 1528CONFIG_NEW_LEDS=y
@@ -1574,11 +1540,11 @@ CONFIG_LEDS_LP3944=y
1574# CONFIG_LEDS_REGULATOR is not set 1540# CONFIG_LEDS_REGULATOR is not set
1575# CONFIG_LEDS_BD2802 is not set 1541# CONFIG_LEDS_BD2802 is not set
1576# CONFIG_LEDS_LT3593 is not set 1542# CONFIG_LEDS_LT3593 is not set
1543CONFIG_LEDS_TRIGGERS=y
1577 1544
1578# 1545#
1579# LED Triggers 1546# LED Triggers
1580# 1547#
1581CONFIG_LEDS_TRIGGERS=y
1582CONFIG_LEDS_TRIGGER_TIMER=y 1548CONFIG_LEDS_TRIGGER_TIMER=y
1583CONFIG_LEDS_TRIGGER_HEARTBEAT=y 1549CONFIG_LEDS_TRIGGER_HEARTBEAT=y
1584CONFIG_LEDS_TRIGGER_BACKLIGHT=y 1550CONFIG_LEDS_TRIGGER_BACKLIGHT=y
@@ -1656,7 +1622,7 @@ CONFIG_RTC_INTF_DEV=y
1656# on-CPU RTC drivers 1622# on-CPU RTC drivers
1657# 1623#
1658# CONFIG_RTC_DRV_SA1100 is not set 1624# CONFIG_RTC_DRV_SA1100 is not set
1659# CONFIG_RTC_DRV_PXA is not set 1625CONFIG_RTC_DRV_PXA=y
1660# CONFIG_DMADEVICES is not set 1626# CONFIG_DMADEVICES is not set
1661# CONFIG_AUXDISPLAY is not set 1627# CONFIG_AUXDISPLAY is not set
1662# CONFIG_UIO is not set 1628# CONFIG_UIO is not set
@@ -1681,19 +1647,10 @@ CONFIG_EXT3_FS_XATTR=y
1681CONFIG_JBD=m 1647CONFIG_JBD=m
1682# CONFIG_JBD_DEBUG is not set 1648# CONFIG_JBD_DEBUG is not set
1683CONFIG_FS_MBCACHE=m 1649CONFIG_FS_MBCACHE=m
1684CONFIG_REISERFS_FS=m 1650# CONFIG_REISERFS_FS is not set
1685# CONFIG_REISERFS_CHECK is not set
1686# CONFIG_REISERFS_PROC_INFO is not set
1687CONFIG_REISERFS_FS_XATTR=y
1688CONFIG_REISERFS_FS_POSIX_ACL=y
1689CONFIG_REISERFS_FS_SECURITY=y
1690# CONFIG_JFS_FS is not set 1651# CONFIG_JFS_FS is not set
1691CONFIG_FS_POSIX_ACL=y 1652CONFIG_FS_POSIX_ACL=y
1692CONFIG_XFS_FS=m 1653# CONFIG_XFS_FS is not set
1693# CONFIG_XFS_QUOTA is not set
1694# CONFIG_XFS_POSIX_ACL is not set
1695# CONFIG_XFS_RT is not set
1696# CONFIG_XFS_DEBUG is not set
1697# CONFIG_OCFS2_FS is not set 1654# CONFIG_OCFS2_FS is not set
1698# CONFIG_BTRFS_FS is not set 1655# CONFIG_BTRFS_FS is not set
1699# CONFIG_NILFS2_FS is not set 1656# CONFIG_NILFS2_FS is not set
@@ -1716,9 +1673,7 @@ CONFIG_CUSE=m
1716# 1673#
1717# CD-ROM/DVD Filesystems 1674# CD-ROM/DVD Filesystems
1718# 1675#
1719CONFIG_ISO9660_FS=m 1676# CONFIG_ISO9660_FS is not set
1720CONFIG_JOLIET=y
1721CONFIG_ZISOFS=y
1722# CONFIG_UDF_FS is not set 1677# CONFIG_UDF_FS is not set
1723 1678
1724# 1679#
@@ -1750,12 +1705,14 @@ CONFIG_MISC_FILESYSTEMS=y
1750# CONFIG_BEFS_FS is not set 1705# CONFIG_BEFS_FS is not set
1751# CONFIG_BFS_FS is not set 1706# CONFIG_BFS_FS is not set
1752# CONFIG_EFS_FS is not set 1707# CONFIG_EFS_FS is not set
1753CONFIG_JFFS2_FS=m 1708CONFIG_JFFS2_FS=y
1754CONFIG_JFFS2_FS_DEBUG=0 1709CONFIG_JFFS2_FS_DEBUG=0
1755CONFIG_JFFS2_FS_WRITEBUFFER=y 1710CONFIG_JFFS2_FS_WRITEBUFFER=y
1756# CONFIG_JFFS2_FS_WBUF_VERIFY is not set 1711CONFIG_JFFS2_FS_WBUF_VERIFY=y
1757# CONFIG_JFFS2_SUMMARY is not set 1712CONFIG_JFFS2_SUMMARY=y
1758# CONFIG_JFFS2_FS_XATTR is not set 1713CONFIG_JFFS2_FS_XATTR=y
1714CONFIG_JFFS2_FS_POSIX_ACL=y
1715CONFIG_JFFS2_FS_SECURITY=y
1759CONFIG_JFFS2_COMPRESSION_OPTIONS=y 1716CONFIG_JFFS2_COMPRESSION_OPTIONS=y
1760CONFIG_JFFS2_ZLIB=y 1717CONFIG_JFFS2_ZLIB=y
1761CONFIG_JFFS2_LZO=y 1718CONFIG_JFFS2_LZO=y
@@ -1765,6 +1722,7 @@ CONFIG_JFFS2_RUBIN=y
1765CONFIG_JFFS2_CMODE_PRIORITY=y 1722CONFIG_JFFS2_CMODE_PRIORITY=y
1766# CONFIG_JFFS2_CMODE_SIZE is not set 1723# CONFIG_JFFS2_CMODE_SIZE is not set
1767# CONFIG_JFFS2_CMODE_FAVOURLZO is not set 1724# CONFIG_JFFS2_CMODE_FAVOURLZO is not set
1725# CONFIG_LOGFS is not set
1768CONFIG_CRAMFS=m 1726CONFIG_CRAMFS=m
1769CONFIG_SQUASHFS=m 1727CONFIG_SQUASHFS=m
1770# CONFIG_SQUASHFS_EMBEDDED is not set 1728# CONFIG_SQUASHFS_EMBEDDED is not set
@@ -1802,6 +1760,7 @@ CONFIG_SUNRPC=y
1802# CONFIG_RPCSEC_GSS_SPKM3 is not set 1760# CONFIG_RPCSEC_GSS_SPKM3 is not set
1803CONFIG_SMB_FS=m 1761CONFIG_SMB_FS=m
1804# CONFIG_SMB_NLS_DEFAULT is not set 1762# CONFIG_SMB_NLS_DEFAULT is not set
1763# CONFIG_CEPH_FS is not set
1805CONFIG_CIFS=m 1764CONFIG_CIFS=m
1806CONFIG_CIFS_STATS=y 1765CONFIG_CIFS_STATS=y
1807# CONFIG_CIFS_STATS2 is not set 1766# CONFIG_CIFS_STATS2 is not set
@@ -1895,6 +1854,7 @@ CONFIG_DEBUG_SPINLOCK=y
1895CONFIG_DEBUG_MUTEXES=y 1854CONFIG_DEBUG_MUTEXES=y
1896CONFIG_DEBUG_LOCK_ALLOC=y 1855CONFIG_DEBUG_LOCK_ALLOC=y
1897CONFIG_PROVE_LOCKING=y 1856CONFIG_PROVE_LOCKING=y
1857# CONFIG_PROVE_RCU is not set
1898CONFIG_LOCKDEP=y 1858CONFIG_LOCKDEP=y
1899# CONFIG_LOCK_STAT is not set 1859# CONFIG_LOCK_STAT is not set
1900# CONFIG_DEBUG_LOCKDEP is not set 1860# CONFIG_DEBUG_LOCKDEP is not set
@@ -1918,6 +1878,7 @@ CONFIG_DEBUG_BUGVERBOSE=y
1918# CONFIG_BACKTRACE_SELF_TEST is not set 1878# CONFIG_BACKTRACE_SELF_TEST is not set
1919# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set 1879# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
1920# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set 1880# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
1881# CONFIG_LKDTM is not set
1921# CONFIG_FAULT_INJECTION is not set 1882# CONFIG_FAULT_INJECTION is not set
1922# CONFIG_LATENCYTOP is not set 1883# CONFIG_LATENCYTOP is not set
1923# CONFIG_SYSCTL_SYSCALL_CHECK is not set 1884# CONFIG_SYSCTL_SYSCALL_CHECK is not set
@@ -2061,9 +2022,9 @@ CONFIG_CRC32=y
2061CONFIG_CRC7=y 2022CONFIG_CRC7=y
2062CONFIG_LIBCRC32C=m 2023CONFIG_LIBCRC32C=m
2063CONFIG_ZLIB_INFLATE=y 2024CONFIG_ZLIB_INFLATE=y
2064CONFIG_ZLIB_DEFLATE=m 2025CONFIG_ZLIB_DEFLATE=y
2065CONFIG_LZO_COMPRESS=m 2026CONFIG_LZO_COMPRESS=y
2066CONFIG_LZO_DECOMPRESS=m 2027CONFIG_LZO_DECOMPRESS=y
2067CONFIG_DECOMPRESS_GZIP=y 2028CONFIG_DECOMPRESS_GZIP=y
2068CONFIG_DECOMPRESS_BZIP2=y 2029CONFIG_DECOMPRESS_BZIP2=y
2069CONFIG_DECOMPRESS_LZMA=y 2030CONFIG_DECOMPRESS_LZMA=y
@@ -2075,3 +2036,4 @@ CONFIG_HAS_IOMEM=y
2075CONFIG_HAS_IOPORT=y 2036CONFIG_HAS_IOPORT=y
2076CONFIG_HAS_DMA=y 2037CONFIG_HAS_DMA=y
2077CONFIG_NLATTR=y 2038CONFIG_NLATTR=y
2039CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/arm/configs/mmp2_defconfig b/arch/arm/configs/mmp2_defconfig
index 03f76cfc941c..4b55dcb60029 100644
--- a/arch/arm/configs/mmp2_defconfig
+++ b/arch/arm/configs/mmp2_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.33-rc2 3# Linux kernel version: 2.6.34-rc5
4# Tue Jan 5 13:55:22 2010 4# Wed Apr 28 11:23:19 2010
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_SYS_SUPPORTS_APM_EMULATION=y 7CONFIG_SYS_SUPPORTS_APM_EMULATION=y
8CONFIG_GENERIC_GPIO=y 8CONFIG_GENERIC_GPIO=y
9CONFIG_GENERIC_TIME=y 9CONFIG_GENERIC_TIME=y
10CONFIG_GENERIC_CLOCKEVENTS=y 10CONFIG_GENERIC_CLOCKEVENTS=y
11CONFIG_HAVE_PROC_CPU=y
11CONFIG_GENERIC_HARDIRQS=y 12CONFIG_GENERIC_HARDIRQS=y
12CONFIG_STACKTRACE_SUPPORT=y 13CONFIG_STACKTRACE_SUPPORT=y
13CONFIG_HAVE_LATENCYTOP_SUPPORT=y 14CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -18,6 +19,7 @@ CONFIG_GENERIC_IRQ_PROBE=y
18CONFIG_RWSEM_GENERIC_SPINLOCK=y 19CONFIG_RWSEM_GENERIC_SPINLOCK=y
19CONFIG_GENERIC_HWEIGHT=y 20CONFIG_GENERIC_HWEIGHT=y
20CONFIG_GENERIC_CALIBRATE_DELAY=y 21CONFIG_GENERIC_CALIBRATE_DELAY=y
22CONFIG_NEED_DMA_MAP_STATE=y
21CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 23CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
22CONFIG_VECTORS_BASE=0xffff0000 24CONFIG_VECTORS_BASE=0xffff0000
23CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 25CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -32,6 +34,12 @@ CONFIG_LOCK_KERNEL=y
32CONFIG_INIT_ENV_ARG_LIMIT=32 34CONFIG_INIT_ENV_ARG_LIMIT=32
33CONFIG_LOCALVERSION="" 35CONFIG_LOCALVERSION=""
34CONFIG_LOCALVERSION_AUTO=y 36CONFIG_LOCALVERSION_AUTO=y
37CONFIG_HAVE_KERNEL_GZIP=y
38CONFIG_HAVE_KERNEL_LZO=y
39CONFIG_KERNEL_GZIP=y
40# CONFIG_KERNEL_BZIP2 is not set
41# CONFIG_KERNEL_LZMA is not set
42# CONFIG_KERNEL_LZO is not set
35CONFIG_SWAP=y 43CONFIG_SWAP=y
36CONFIG_SYSVIPC=y 44CONFIG_SYSVIPC=y
37CONFIG_SYSVIPC_SYSCTL=y 45CONFIG_SYSVIPC_SYSCTL=y
@@ -52,7 +60,6 @@ CONFIG_RCU_FANOUT=32
52# CONFIG_TREE_RCU_TRACE is not set 60# CONFIG_TREE_RCU_TRACE is not set
53# CONFIG_IKCONFIG is not set 61# CONFIG_IKCONFIG is not set
54CONFIG_LOG_BUF_SHIFT=14 62CONFIG_LOG_BUF_SHIFT=14
55# CONFIG_GROUP_SCHED is not set
56# CONFIG_CGROUPS is not set 63# CONFIG_CGROUPS is not set
57CONFIG_SYSFS_DEPRECATED=y 64CONFIG_SYSFS_DEPRECATED=y
58CONFIG_SYSFS_DEPRECATED_V2=y 65CONFIG_SYSFS_DEPRECATED_V2=y
@@ -85,10 +92,14 @@ CONFIG_TIMERFD=y
85CONFIG_EVENTFD=y 92CONFIG_EVENTFD=y
86CONFIG_SHMEM=y 93CONFIG_SHMEM=y
87CONFIG_AIO=y 94CONFIG_AIO=y
95CONFIG_HAVE_PERF_EVENTS=y
96CONFIG_PERF_USE_VMALLOC=y
88 97
89# 98#
90# Kernel Performance Events And Counters 99# Kernel Performance Events And Counters
91# 100#
101# CONFIG_PERF_EVENTS is not set
102# CONFIG_PERF_COUNTERS is not set
92CONFIG_VM_EVENT_COUNTERS=y 103CONFIG_VM_EVENT_COUNTERS=y
93CONFIG_COMPAT_BRK=y 104CONFIG_COMPAT_BRK=y
94CONFIG_SLAB=y 105CONFIG_SLAB=y
@@ -104,6 +115,7 @@ CONFIG_HAVE_CLK=y
104# 115#
105# GCOV-based kernel profiling 116# GCOV-based kernel profiling
106# 117#
118# CONFIG_GCOV_KERNEL is not set
107# CONFIG_SLOW_WORK is not set 119# CONFIG_SLOW_WORK is not set
108CONFIG_HAVE_GENERIC_DMA_COHERENT=y 120CONFIG_HAVE_GENERIC_DMA_COHERENT=y
109CONFIG_SLABINFO=y 121CONFIG_SLABINFO=y
@@ -170,6 +182,7 @@ CONFIG_MMU=y
170# CONFIG_ARCH_REALVIEW is not set 182# CONFIG_ARCH_REALVIEW is not set
171# CONFIG_ARCH_VERSATILE is not set 183# CONFIG_ARCH_VERSATILE is not set
172# CONFIG_ARCH_AT91 is not set 184# CONFIG_ARCH_AT91 is not set
185# CONFIG_ARCH_BCMRING is not set
173# CONFIG_ARCH_CLPS711X is not set 186# CONFIG_ARCH_CLPS711X is not set
174# CONFIG_ARCH_GEMINI is not set 187# CONFIG_ARCH_GEMINI is not set
175# CONFIG_ARCH_EBSA110 is not set 188# CONFIG_ARCH_EBSA110 is not set
@@ -179,7 +192,6 @@ CONFIG_MMU=y
179# CONFIG_ARCH_STMP3XXX is not set 192# CONFIG_ARCH_STMP3XXX is not set
180# CONFIG_ARCH_NETX is not set 193# CONFIG_ARCH_NETX is not set
181# CONFIG_ARCH_H720X is not set 194# CONFIG_ARCH_H720X is not set
182# CONFIG_ARCH_NOMADIK is not set
183# CONFIG_ARCH_IOP13XX is not set 195# CONFIG_ARCH_IOP13XX is not set
184# CONFIG_ARCH_IOP32X is not set 196# CONFIG_ARCH_IOP32X is not set
185# CONFIG_ARCH_IOP33X is not set 197# CONFIG_ARCH_IOP33X is not set
@@ -196,21 +208,26 @@ CONFIG_ARCH_MMP=y
196# CONFIG_ARCH_KS8695 is not set 208# CONFIG_ARCH_KS8695 is not set
197# CONFIG_ARCH_NS9XXX is not set 209# CONFIG_ARCH_NS9XXX is not set
198# CONFIG_ARCH_W90X900 is not set 210# CONFIG_ARCH_W90X900 is not set
211# CONFIG_ARCH_NUC93X is not set
199# CONFIG_ARCH_PNX4008 is not set 212# CONFIG_ARCH_PNX4008 is not set
200# CONFIG_ARCH_PXA is not set 213# CONFIG_ARCH_PXA is not set
201# CONFIG_ARCH_MSM is not set 214# CONFIG_ARCH_MSM is not set
215# CONFIG_ARCH_SHMOBILE is not set
202# CONFIG_ARCH_RPC is not set 216# CONFIG_ARCH_RPC is not set
203# CONFIG_ARCH_SA1100 is not set 217# CONFIG_ARCH_SA1100 is not set
204# CONFIG_ARCH_S3C2410 is not set 218# CONFIG_ARCH_S3C2410 is not set
205# CONFIG_ARCH_S3C64XX is not set 219# CONFIG_ARCH_S3C64XX is not set
220# CONFIG_ARCH_S5P6440 is not set
221# CONFIG_ARCH_S5P6442 is not set
206# CONFIG_ARCH_S5PC1XX is not set 222# CONFIG_ARCH_S5PC1XX is not set
223# CONFIG_ARCH_S5PV210 is not set
207# CONFIG_ARCH_SHARK is not set 224# CONFIG_ARCH_SHARK is not set
208# CONFIG_ARCH_LH7A40X is not set 225# CONFIG_ARCH_LH7A40X is not set
209# CONFIG_ARCH_U300 is not set 226# CONFIG_ARCH_U300 is not set
227# CONFIG_ARCH_U8500 is not set
228# CONFIG_ARCH_NOMADIK is not set
210# CONFIG_ARCH_DAVINCI is not set 229# CONFIG_ARCH_DAVINCI is not set
211# CONFIG_ARCH_OMAP is not set 230# CONFIG_ARCH_OMAP is not set
212# CONFIG_ARCH_BCMRING is not set
213# CONFIG_ARCH_U8500 is not set
214# CONFIG_MACH_TAVOREVB is not set 231# CONFIG_MACH_TAVOREVB is not set
215 232
216# 233#
@@ -218,8 +235,10 @@ CONFIG_ARCH_MMP=y
218# 235#
219# CONFIG_MACH_ASPENITE is not set 236# CONFIG_MACH_ASPENITE is not set
220# CONFIG_MACH_ZYLONITE2 is not set 237# CONFIG_MACH_ZYLONITE2 is not set
238# CONFIG_MACH_AVENGERS_LITE is not set
221# CONFIG_MACH_TTC_DKB is not set 239# CONFIG_MACH_TTC_DKB is not set
222CONFIG_MACH_FLINT=y 240CONFIG_MACH_FLINT=y
241CONFIG_MACH_MARVELL_JASPER=y
223CONFIG_CPU_MMP2=y 242CONFIG_CPU_MMP2=y
224CONFIG_PLAT_PXA=y 243CONFIG_PLAT_PXA=y
225 244
@@ -246,7 +265,10 @@ CONFIG_ARM_THUMB=y
246# CONFIG_CPU_ICACHE_DISABLE is not set 265# CONFIG_CPU_ICACHE_DISABLE is not set
247# CONFIG_CPU_DCACHE_DISABLE is not set 266# CONFIG_CPU_DCACHE_DISABLE is not set
248# CONFIG_CPU_BPREDICT_DISABLE is not set 267# CONFIG_CPU_BPREDICT_DISABLE is not set
268CONFIG_OUTER_CACHE=y
269CONFIG_CACHE_TAUROS2=y
249CONFIG_ARM_L1_CACHE_SHIFT=5 270CONFIG_ARM_L1_CACHE_SHIFT=5
271CONFIG_CPU_HAS_PMU=y
250# CONFIG_ARM_ERRATA_411920 is not set 272# CONFIG_ARM_ERRATA_411920 is not set
251CONFIG_COMMON_CLKDEV=y 273CONFIG_COMMON_CLKDEV=y
252 274
@@ -298,7 +320,7 @@ CONFIG_ALIGNMENT_TRAP=y
298# 320#
299CONFIG_ZBOOT_ROM_TEXT=0x0 321CONFIG_ZBOOT_ROM_TEXT=0x0
300CONFIG_ZBOOT_ROM_BSS=0x0 322CONFIG_ZBOOT_ROM_BSS=0x0
301CONFIG_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=128M user_debug=255" 323CONFIG_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=128M user_debug=255"
302# CONFIG_XIP_KERNEL is not set 324# CONFIG_XIP_KERNEL is not set
303# CONFIG_KEXEC is not set 325# CONFIG_KEXEC is not set
304 326
@@ -338,7 +360,6 @@ CONFIG_NET=y
338# Networking options 360# Networking options
339# 361#
340CONFIG_PACKET=y 362CONFIG_PACKET=y
341# CONFIG_PACKET_MMAP is not set
342CONFIG_UNIX=y 363CONFIG_UNIX=y
343CONFIG_XFRM=y 364CONFIG_XFRM=y
344# CONFIG_XFRM_USER is not set 365# CONFIG_XFRM_USER is not set
@@ -532,6 +553,7 @@ CONFIG_HAVE_IDE=y
532# 553#
533# SCSI device support 554# SCSI device support
534# 555#
556CONFIG_SCSI_MOD=y
535# CONFIG_RAID_ATTRS is not set 557# CONFIG_RAID_ATTRS is not set
536# CONFIG_SCSI is not set 558# CONFIG_SCSI is not set
537# CONFIG_SCSI_DMA is not set 559# CONFIG_SCSI_DMA is not set
@@ -640,6 +662,7 @@ CONFIG_SERIAL_PXA=y
640CONFIG_SERIAL_PXA_CONSOLE=y 662CONFIG_SERIAL_PXA_CONSOLE=y
641CONFIG_SERIAL_CORE=y 663CONFIG_SERIAL_CORE=y
642CONFIG_SERIAL_CORE_CONSOLE=y 664CONFIG_SERIAL_CORE_CONSOLE=y
665# CONFIG_SERIAL_TIMBERDALE is not set
643CONFIG_UNIX98_PTYS=y 666CONFIG_UNIX98_PTYS=y
644# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set 667# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
645# CONFIG_LEGACY_PTYS is not set 668# CONFIG_LEGACY_PTYS is not set
@@ -667,6 +690,7 @@ CONFIG_I2C_HELPER_AUTO=y
667CONFIG_I2C_PXA=y 690CONFIG_I2C_PXA=y
668# CONFIG_I2C_PXA_SLAVE is not set 691# CONFIG_I2C_PXA_SLAVE is not set
669# CONFIG_I2C_SIMTEC is not set 692# CONFIG_I2C_SIMTEC is not set
693# CONFIG_I2C_XILINX is not set
670 694
671# 695#
672# External I2C/SMBus adapter drivers 696# External I2C/SMBus adapter drivers
@@ -679,15 +703,9 @@ CONFIG_I2C_PXA=y
679# 703#
680# CONFIG_I2C_PCA_PLATFORM is not set 704# CONFIG_I2C_PCA_PLATFORM is not set
681# CONFIG_I2C_STUB is not set 705# CONFIG_I2C_STUB is not set
682
683#
684# Miscellaneous I2C Chip support
685#
686# CONFIG_SENSORS_TSL2550 is not set
687# CONFIG_I2C_DEBUG_CORE is not set 706# CONFIG_I2C_DEBUG_CORE is not set
688# CONFIG_I2C_DEBUG_ALGO is not set 707# CONFIG_I2C_DEBUG_ALGO is not set
689# CONFIG_I2C_DEBUG_BUS is not set 708# CONFIG_I2C_DEBUG_BUS is not set
690# CONFIG_I2C_DEBUG_CHIP is not set
691# CONFIG_SPI is not set 709# CONFIG_SPI is not set
692 710
693# 711#
@@ -702,13 +720,16 @@ CONFIG_GPIOLIB=y
702# 720#
703# Memory mapped GPIO expanders: 721# Memory mapped GPIO expanders:
704# 722#
723# CONFIG_GPIO_IT8761E is not set
705 724
706# 725#
707# I2C GPIO expanders: 726# I2C GPIO expanders:
708# 727#
728# CONFIG_GPIO_MAX7300 is not set
709# CONFIG_GPIO_MAX732X is not set 729# CONFIG_GPIO_MAX732X is not set
710# CONFIG_GPIO_PCA953X is not set 730# CONFIG_GPIO_PCA953X is not set
711# CONFIG_GPIO_PCF857X is not set 731# CONFIG_GPIO_PCF857X is not set
732# CONFIG_GPIO_ADP5588 is not set
712 733
713# 734#
714# PCI GPIO expanders: 735# PCI GPIO expanders:
@@ -737,10 +758,12 @@ CONFIG_SSB_POSSIBLE=y
737# Multifunction device drivers 758# Multifunction device drivers
738# 759#
739CONFIG_MFD_CORE=y 760CONFIG_MFD_CORE=y
761# CONFIG_MFD_88PM860X is not set
740# CONFIG_MFD_SM501 is not set 762# CONFIG_MFD_SM501 is not set
741# CONFIG_MFD_ASIC3 is not set 763# CONFIG_MFD_ASIC3 is not set
742# CONFIG_HTC_EGPIO is not set 764# CONFIG_HTC_EGPIO is not set
743# CONFIG_HTC_PASIC3 is not set 765# CONFIG_HTC_PASIC3 is not set
766# CONFIG_HTC_I2CPLD is not set
744# CONFIG_TPS65010 is not set 767# CONFIG_TPS65010 is not set
745# CONFIG_TWL4030_CORE is not set 768# CONFIG_TWL4030_CORE is not set
746# CONFIG_MFD_TMIO is not set 769# CONFIG_MFD_TMIO is not set
@@ -749,24 +772,27 @@ CONFIG_MFD_CORE=y
749# CONFIG_MFD_TC6393XB is not set 772# CONFIG_MFD_TC6393XB is not set
750# CONFIG_PMIC_DA903X is not set 773# CONFIG_PMIC_DA903X is not set
751# CONFIG_PMIC_ADP5520 is not set 774# CONFIG_PMIC_ADP5520 is not set
775CONFIG_MFD_MAX8925=y
752# CONFIG_MFD_WM8400 is not set 776# CONFIG_MFD_WM8400 is not set
753# CONFIG_MFD_WM831X is not set 777# CONFIG_MFD_WM831X is not set
754# CONFIG_MFD_WM8350_I2C is not set 778# CONFIG_MFD_WM8350_I2C is not set
779# CONFIG_MFD_WM8994 is not set
755# CONFIG_MFD_PCF50633 is not set 780# CONFIG_MFD_PCF50633 is not set
756# CONFIG_AB3100_CORE is not set 781# CONFIG_AB3100_CORE is not set
757CONFIG_MFD_88PM8607=y
758CONFIG_REGULATOR=y 782CONFIG_REGULATOR=y
759# CONFIG_REGULATOR_DEBUG is not set 783# CONFIG_REGULATOR_DEBUG is not set
784# CONFIG_REGULATOR_DUMMY is not set
760# CONFIG_REGULATOR_FIXED_VOLTAGE is not set 785# CONFIG_REGULATOR_FIXED_VOLTAGE is not set
761# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set 786# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
762# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set 787# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set
763# CONFIG_REGULATOR_BQ24022 is not set 788# CONFIG_REGULATOR_BQ24022 is not set
764# CONFIG_REGULATOR_MAX1586 is not set 789# CONFIG_REGULATOR_MAX1586 is not set
765CONFIG_REGULATOR_MAX8660=y 790CONFIG_REGULATOR_MAX8649=y
791# CONFIG_REGULATOR_MAX8660 is not set
792CONFIG_REGULATOR_MAX8925=y
766# CONFIG_REGULATOR_LP3971 is not set 793# CONFIG_REGULATOR_LP3971 is not set
767# CONFIG_REGULATOR_TPS65023 is not set 794# CONFIG_REGULATOR_TPS65023 is not set
768# CONFIG_REGULATOR_TPS6507X is not set 795# CONFIG_REGULATOR_TPS6507X is not set
769CONFIG_REGULATOR_88PM8607=y
770# CONFIG_MEDIA_SUPPORT is not set 796# CONFIG_MEDIA_SUPPORT is not set
771 797
772# 798#
@@ -781,6 +807,7 @@ CONFIG_LCD_CLASS_DEVICE=y
781# CONFIG_LCD_PLATFORM is not set 807# CONFIG_LCD_PLATFORM is not set
782CONFIG_BACKLIGHT_CLASS_DEVICE=y 808CONFIG_BACKLIGHT_CLASS_DEVICE=y
783CONFIG_BACKLIGHT_GENERIC=y 809CONFIG_BACKLIGHT_GENERIC=y
810CONFIG_BACKLIGHT_MAX8925=y
784 811
785# 812#
786# Display device support 813# Display device support
@@ -821,6 +848,7 @@ CONFIG_RTC_INTF_DEV=y
821# CONFIG_RTC_DRV_DS1374 is not set 848# CONFIG_RTC_DRV_DS1374 is not set
822# CONFIG_RTC_DRV_DS1672 is not set 849# CONFIG_RTC_DRV_DS1672 is not set
823# CONFIG_RTC_DRV_MAX6900 is not set 850# CONFIG_RTC_DRV_MAX6900 is not set
851CONFIG_RTC_DRV_MAX8925=y
824# CONFIG_RTC_DRV_RS5C372 is not set 852# CONFIG_RTC_DRV_RS5C372 is not set
825# CONFIG_RTC_DRV_ISL1208 is not set 853# CONFIG_RTC_DRV_ISL1208 is not set
826# CONFIG_RTC_DRV_X1205 is not set 854# CONFIG_RTC_DRV_X1205 is not set
@@ -872,7 +900,6 @@ CONFIG_RTC_INTF_DEV=y
872# CONFIG_EXT2_FS is not set 900# CONFIG_EXT2_FS is not set
873# CONFIG_EXT3_FS is not set 901# CONFIG_EXT3_FS is not set
874# CONFIG_EXT4_FS is not set 902# CONFIG_EXT4_FS is not set
875CONFIG_EXT4_USE_FOR_EXT23=y
876# CONFIG_REISERFS_FS is not set 903# CONFIG_REISERFS_FS is not set
877# CONFIG_JFS_FS is not set 904# CONFIG_JFS_FS is not set
878CONFIG_FS_POSIX_ACL=y 905CONFIG_FS_POSIX_ACL=y
@@ -883,7 +910,7 @@ CONFIG_FS_POSIX_ACL=y
883# CONFIG_NILFS2_FS is not set 910# CONFIG_NILFS2_FS is not set
884CONFIG_FILE_LOCKING=y 911CONFIG_FILE_LOCKING=y
885CONFIG_FSNOTIFY=y 912CONFIG_FSNOTIFY=y
886CONFIG_DNOTIFY=y 913# CONFIG_DNOTIFY is not set
887CONFIG_INOTIFY=y 914CONFIG_INOTIFY=y
888CONFIG_INOTIFY_USER=y 915CONFIG_INOTIFY_USER=y
889# CONFIG_QUOTA is not set 916# CONFIG_QUOTA is not set
@@ -940,6 +967,7 @@ CONFIG_JFFS2_ZLIB=y
940# CONFIG_JFFS2_LZO is not set 967# CONFIG_JFFS2_LZO is not set
941CONFIG_JFFS2_RTIME=y 968CONFIG_JFFS2_RTIME=y
942# CONFIG_JFFS2_RUBIN is not set 969# CONFIG_JFFS2_RUBIN is not set
970# CONFIG_LOGFS is not set
943CONFIG_CRAMFS=y 971CONFIG_CRAMFS=y
944# CONFIG_SQUASHFS is not set 972# CONFIG_SQUASHFS is not set
945# CONFIG_VXFS_FS is not set 973# CONFIG_VXFS_FS is not set
@@ -967,6 +995,7 @@ CONFIG_SUNRPC_GSS=y
967CONFIG_RPCSEC_GSS_KRB5=y 995CONFIG_RPCSEC_GSS_KRB5=y
968# CONFIG_RPCSEC_GSS_SPKM3 is not set 996# CONFIG_RPCSEC_GSS_SPKM3 is not set
969# CONFIG_SMB_FS is not set 997# CONFIG_SMB_FS is not set
998# CONFIG_CEPH_FS is not set
970# CONFIG_CIFS is not set 999# CONFIG_CIFS is not set
971# CONFIG_NCP_FS is not set 1000# CONFIG_NCP_FS is not set
972# CONFIG_CODA_FS is not set 1001# CONFIG_CODA_FS is not set
@@ -990,7 +1019,7 @@ CONFIG_FRAME_WARN=1024
990CONFIG_MAGIC_SYSRQ=y 1019CONFIG_MAGIC_SYSRQ=y
991# CONFIG_STRIP_ASM_SYMS is not set 1020# CONFIG_STRIP_ASM_SYMS is not set
992# CONFIG_UNUSED_SYMBOLS is not set 1021# CONFIG_UNUSED_SYMBOLS is not set
993# CONFIG_DEBUG_FS is not set 1022CONFIG_DEBUG_FS=y
994# CONFIG_HEADERS_CHECK is not set 1023# CONFIG_HEADERS_CHECK is not set
995CONFIG_DEBUG_KERNEL=y 1024CONFIG_DEBUG_KERNEL=y
996# CONFIG_DEBUG_SHIRQ is not set 1025# CONFIG_DEBUG_SHIRQ is not set
@@ -1032,6 +1061,7 @@ CONFIG_DEBUG_MEMORY_INIT=y
1032# CONFIG_BACKTRACE_SELF_TEST is not set 1061# CONFIG_BACKTRACE_SELF_TEST is not set
1033# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set 1062# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
1034# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set 1063# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
1064# CONFIG_LKDTM is not set
1035# CONFIG_FAULT_INJECTION is not set 1065# CONFIG_FAULT_INJECTION is not set
1036# CONFIG_LATENCYTOP is not set 1066# CONFIG_LATENCYTOP is not set
1037# CONFIG_SYSCTL_SYSCALL_CHECK is not set 1067# CONFIG_SYSCTL_SYSCALL_CHECK is not set
@@ -1052,6 +1082,7 @@ CONFIG_BRANCH_PROFILE_NONE=y
1052# CONFIG_KMEMTRACE is not set 1082# CONFIG_KMEMTRACE is not set
1053# CONFIG_WORKQUEUE_TRACER is not set 1083# CONFIG_WORKQUEUE_TRACER is not set
1054# CONFIG_BLK_DEV_IO_TRACE is not set 1084# CONFIG_BLK_DEV_IO_TRACE is not set
1085CONFIG_DYNAMIC_DEBUG=y
1055# CONFIG_SAMPLES is not set 1086# CONFIG_SAMPLES is not set
1056CONFIG_HAVE_ARCH_KGDB=y 1087CONFIG_HAVE_ARCH_KGDB=y
1057# CONFIG_KGDB is not set 1088# CONFIG_KGDB is not set
@@ -1059,9 +1090,7 @@ CONFIG_ARM_UNWIND=y
1059CONFIG_DEBUG_USER=y 1090CONFIG_DEBUG_USER=y
1060CONFIG_DEBUG_ERRORS=y 1091CONFIG_DEBUG_ERRORS=y
1061# CONFIG_DEBUG_STACK_USAGE is not set 1092# CONFIG_DEBUG_STACK_USAGE is not set
1062CONFIG_DEBUG_LL=y 1093# CONFIG_DEBUG_LL is not set
1063# CONFIG_EARLY_PRINTK is not set
1064# CONFIG_DEBUG_ICEDCC is not set
1065# CONFIG_OC_ETM is not set 1094# CONFIG_OC_ETM is not set
1066 1095
1067# 1096#
diff --git a/arch/arm/configs/n8x0_defconfig b/arch/arm/configs/n8x0_defconfig
index 216ad00948af..9405e32783de 100644
--- a/arch/arm/configs/n8x0_defconfig
+++ b/arch/arm/configs/n8x0_defconfig
@@ -1058,7 +1058,6 @@ CONFIG_JFFS2_CMODE_PRIORITY=y
1058# CONFIG_ROMFS_FS is not set 1058# CONFIG_ROMFS_FS is not set
1059# CONFIG_SYSV_FS is not set 1059# CONFIG_SYSV_FS is not set
1060# CONFIG_UFS_FS is not set 1060# CONFIG_UFS_FS is not set
1061# CONFIG_NILFS2_FS is not set
1062CONFIG_NETWORK_FILESYSTEMS=y 1061CONFIG_NETWORK_FILESYSTEMS=y
1063# CONFIG_NFS_FS is not set 1062# CONFIG_NFS_FS is not set
1064# CONFIG_NFSD is not set 1063# CONFIG_NFSD is not set
diff --git a/arch/arm/configs/omap_zoom2_defconfig b/arch/arm/configs/omap_zoom2_defconfig
index f5c6e11cf189..881faea03d79 100644
--- a/arch/arm/configs/omap_zoom2_defconfig
+++ b/arch/arm/configs/omap_zoom2_defconfig
@@ -661,7 +661,7 @@ CONFIG_DEVKMEM=y
661CONFIG_SERIAL_8250=y 661CONFIG_SERIAL_8250=y
662CONFIG_SERIAL_8250_CONSOLE=y 662CONFIG_SERIAL_8250_CONSOLE=y
663CONFIG_SERIAL_8250_NR_UARTS=32 663CONFIG_SERIAL_8250_NR_UARTS=32
664CONFIG_SERIAL_8250_RUNTIME_UARTS=4 664CONFIG_SERIAL_8250_RUNTIME_UARTS=1
665CONFIG_SERIAL_8250_EXTENDED=y 665CONFIG_SERIAL_8250_EXTENDED=y
666CONFIG_SERIAL_8250_MANY_PORTS=y 666CONFIG_SERIAL_8250_MANY_PORTS=y
667CONFIG_SERIAL_8250_SHARE_IRQ=y 667CONFIG_SERIAL_8250_SHARE_IRQ=y
diff --git a/arch/arm/configs/omap_zoom3_defconfig b/arch/arm/configs/omap_zoom3_defconfig
index ea9a5012d332..5e55b550a408 100644
--- a/arch/arm/configs/omap_zoom3_defconfig
+++ b/arch/arm/configs/omap_zoom3_defconfig
@@ -680,7 +680,7 @@ CONFIG_DEVKMEM=y
680CONFIG_SERIAL_8250=y 680CONFIG_SERIAL_8250=y
681CONFIG_SERIAL_8250_CONSOLE=y 681CONFIG_SERIAL_8250_CONSOLE=y
682CONFIG_SERIAL_8250_NR_UARTS=32 682CONFIG_SERIAL_8250_NR_UARTS=32
683CONFIG_SERIAL_8250_RUNTIME_UARTS=4 683CONFIG_SERIAL_8250_RUNTIME_UARTS=1
684CONFIG_SERIAL_8250_EXTENDED=y 684CONFIG_SERIAL_8250_EXTENDED=y
685CONFIG_SERIAL_8250_MANY_PORTS=y 685CONFIG_SERIAL_8250_MANY_PORTS=y
686CONFIG_SERIAL_8250_SHARE_IRQ=y 686CONFIG_SERIAL_8250_SHARE_IRQ=y
diff --git a/arch/arm/configs/rx51_defconfig b/arch/arm/configs/rx51_defconfig
index 45135ffadc57..473f9e13f08b 100644
--- a/arch/arm/configs/rx51_defconfig
+++ b/arch/arm/configs/rx51_defconfig
@@ -59,8 +59,6 @@ CONFIG_FAIR_GROUP_SCHED=y
59CONFIG_USER_SCHED=y 59CONFIG_USER_SCHED=y
60# CONFIG_CGROUP_SCHED is not set 60# CONFIG_CGROUP_SCHED is not set
61# CONFIG_CGROUPS is not set 61# CONFIG_CGROUPS is not set
62CONFIG_SYSFS_DEPRECATED=y
63CONFIG_SYSFS_DEPRECATED_V2=y
64# CONFIG_RELAY is not set 62# CONFIG_RELAY is not set
65# CONFIG_NAMESPACES is not set 63# CONFIG_NAMESPACES is not set
66CONFIG_BLK_DEV_INITRD=y 64CONFIG_BLK_DEV_INITRD=y
@@ -480,7 +478,6 @@ CONFIG_BT_HIDP=m
480# CONFIG_BT_HCIBFUSB is not set 478# CONFIG_BT_HCIBFUSB is not set
481# CONFIG_BT_HCIVHCI is not set 479# CONFIG_BT_HCIVHCI is not set
482# CONFIG_AF_RXRPC is not set 480# CONFIG_AF_RXRPC is not set
483# CONFIG_PHONET is not set
484CONFIG_WIRELESS=y 481CONFIG_WIRELESS=y
485CONFIG_CFG80211=y 482CONFIG_CFG80211=y
486# CONFIG_CFG80211_REG_DEBUG is not set 483# CONFIG_CFG80211_REG_DEBUG is not set
diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h
index 00f46d9ce299..6e8f05c8a1c8 100644
--- a/arch/arm/include/asm/assembler.h
+++ b/arch/arm/include/asm/assembler.h
@@ -149,10 +149,10 @@
149 149
150#define USER(x...) \ 150#define USER(x...) \
1519999: x; \ 1519999: x; \
152 .section __ex_table,"a"; \ 152 .pushsection __ex_table,"a"; \
153 .align 3; \ 153 .align 3; \
154 .long 9999b,9001f; \ 154 .long 9999b,9001f; \
155 .previous 155 .popsection
156 156
157/* 157/*
158 * SMP data memory barrier 158 * SMP data memory barrier
@@ -193,10 +193,10 @@
193 .error "Unsupported inc macro argument" 193 .error "Unsupported inc macro argument"
194 .endif 194 .endif
195 195
196 .section __ex_table,"a" 196 .pushsection __ex_table,"a"
197 .align 3 197 .align 3
198 .long 9999b, \abort 198 .long 9999b, \abort
199 .previous 199 .popsection
200 .endm 200 .endm
201 201
202 .macro usracc, instr, reg, ptr, inc, cond, rept, abort 202 .macro usracc, instr, reg, ptr, inc, cond, rept, abort
@@ -234,10 +234,10 @@
234 .error "Unsupported inc macro argument" 234 .error "Unsupported inc macro argument"
235 .endif 235 .endif
236 236
237 .section __ex_table,"a" 237 .pushsection __ex_table,"a"
238 .align 3 238 .align 3
239 .long 9999b, \abort 239 .long 9999b, \abort
240 .previous 240 .popsection
241 .endr 241 .endr
242 .endm 242 .endm
243 243
diff --git a/arch/arm/include/asm/cacheflush.h b/arch/arm/include/asm/cacheflush.h
index 72da7e045c6b..0d08d4170b64 100644
--- a/arch/arm/include/asm/cacheflush.h
+++ b/arch/arm/include/asm/cacheflush.h
@@ -15,6 +15,7 @@
15#include <asm/glue.h> 15#include <asm/glue.h>
16#include <asm/shmparam.h> 16#include <asm/shmparam.h>
17#include <asm/cachetype.h> 17#include <asm/cachetype.h>
18#include <asm/outercache.h>
18 19
19#define CACHE_COLOUR(vaddr) ((vaddr & (SHMLBA - 1)) >> PAGE_SHIFT) 20#define CACHE_COLOUR(vaddr) ((vaddr & (SHMLBA - 1)) >> PAGE_SHIFT)
20 21
@@ -219,12 +220,6 @@ struct cpu_cache_fns {
219 void (*dma_flush_range)(const void *, const void *); 220 void (*dma_flush_range)(const void *, const void *);
220}; 221};
221 222
222struct outer_cache_fns {
223 void (*inv_range)(unsigned long, unsigned long);
224 void (*clean_range)(unsigned long, unsigned long);
225 void (*flush_range)(unsigned long, unsigned long);
226};
227
228/* 223/*
229 * Select the calling method 224 * Select the calling method
230 */ 225 */
@@ -281,37 +276,6 @@ extern void dmac_flush_range(const void *, const void *);
281 276
282#endif 277#endif
283 278
284#ifdef CONFIG_OUTER_CACHE
285
286extern struct outer_cache_fns outer_cache;
287
288static inline void outer_inv_range(unsigned long start, unsigned long end)
289{
290 if (outer_cache.inv_range)
291 outer_cache.inv_range(start, end);
292}
293static inline void outer_clean_range(unsigned long start, unsigned long end)
294{
295 if (outer_cache.clean_range)
296 outer_cache.clean_range(start, end);
297}
298static inline void outer_flush_range(unsigned long start, unsigned long end)
299{
300 if (outer_cache.flush_range)
301 outer_cache.flush_range(start, end);
302}
303
304#else
305
306static inline void outer_inv_range(unsigned long start, unsigned long end)
307{ }
308static inline void outer_clean_range(unsigned long start, unsigned long end)
309{ }
310static inline void outer_flush_range(unsigned long start, unsigned long end)
311{ }
312
313#endif
314
315/* 279/*
316 * Copy user data from/to a page which is mapped into a different 280 * Copy user data from/to a page which is mapped into a different
317 * processes address space. Really, we want to allow our "user 281 * processes address space. Really, we want to allow our "user
diff --git a/arch/arm/include/asm/clkdev.h b/arch/arm/include/asm/clkdev.h
index 7a0690da5e63..b56c1389b6fa 100644
--- a/arch/arm/include/asm/clkdev.h
+++ b/arch/arm/include/asm/clkdev.h
@@ -13,6 +13,7 @@
13#define __ASM_CLKDEV_H 13#define __ASM_CLKDEV_H
14 14
15struct clk; 15struct clk;
16struct device;
16 17
17struct clk_lookup { 18struct clk_lookup {
18 struct list_head node; 19 struct list_head node;
diff --git a/arch/arm/include/asm/elf.h b/arch/arm/include/asm/elf.h
index bff056489cc1..51662feb9f1d 100644
--- a/arch/arm/include/asm/elf.h
+++ b/arch/arm/include/asm/elf.h
@@ -9,6 +9,8 @@
9#include <asm/ptrace.h> 9#include <asm/ptrace.h>
10#include <asm/user.h> 10#include <asm/user.h>
11 11
12struct task_struct;
13
12typedef unsigned long elf_greg_t; 14typedef unsigned long elf_greg_t;
13typedef unsigned long elf_freg_t[3]; 15typedef unsigned long elf_freg_t[3];
14 16
diff --git a/arch/arm/include/asm/futex.h b/arch/arm/include/asm/futex.h
index bfcc15929a7f..540a044153a5 100644
--- a/arch/arm/include/asm/futex.h
+++ b/arch/arm/include/asm/futex.h
@@ -21,14 +21,14 @@
21 "2: strt %0, [%2]\n" \ 21 "2: strt %0, [%2]\n" \
22 " mov %0, #0\n" \ 22 " mov %0, #0\n" \
23 "3:\n" \ 23 "3:\n" \
24 " .section __ex_table,\"a\"\n" \ 24 " .pushsection __ex_table,\"a\"\n" \
25 " .align 3\n" \ 25 " .align 3\n" \
26 " .long 1b, 4f, 2b, 4f\n" \ 26 " .long 1b, 4f, 2b, 4f\n" \
27 " .previous\n" \ 27 " .popsection\n" \
28 " .section .fixup,\"ax\"\n" \ 28 " .pushsection .fixup,\"ax\"\n" \
29 "4: mov %0, %4\n" \ 29 "4: mov %0, %4\n" \
30 " b 3b\n" \ 30 " b 3b\n" \
31 " .previous" \ 31 " .popsection" \
32 : "=&r" (ret), "=&r" (oldval) \ 32 : "=&r" (ret), "=&r" (oldval) \
33 : "r" (uaddr), "r" (oparg), "Ir" (-EFAULT) \ 33 : "r" (uaddr), "r" (oparg), "Ir" (-EFAULT) \
34 : "cc", "memory") 34 : "cc", "memory")
@@ -102,14 +102,14 @@ futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval)
102 " it eq @ explicit IT needed for the 2b label\n" 102 " it eq @ explicit IT needed for the 2b label\n"
103 "2: streqt %2, [%3]\n" 103 "2: streqt %2, [%3]\n"
104 "3:\n" 104 "3:\n"
105 " .section __ex_table,\"a\"\n" 105 " .pushsection __ex_table,\"a\"\n"
106 " .align 3\n" 106 " .align 3\n"
107 " .long 1b, 4f, 2b, 4f\n" 107 " .long 1b, 4f, 2b, 4f\n"
108 " .previous\n" 108 " .popsection\n"
109 " .section .fixup,\"ax\"\n" 109 " .pushsection .fixup,\"ax\"\n"
110 "4: mov %0, %4\n" 110 "4: mov %0, %4\n"
111 " b 3b\n" 111 " b 3b\n"
112 " .previous" 112 " .popsection"
113 : "=&r" (val) 113 : "=&r" (val)
114 : "r" (oldval), "r" (newval), "r" (uaddr), "Ir" (-EFAULT) 114 : "r" (oldval), "r" (newval), "r" (uaddr), "Ir" (-EFAULT)
115 : "cc", "memory"); 115 : "cc", "memory");
diff --git a/arch/arm/include/asm/highmem.h b/arch/arm/include/asm/highmem.h
index 7f36d00600b4..feb988a7ec37 100644
--- a/arch/arm/include/asm/highmem.h
+++ b/arch/arm/include/asm/highmem.h
@@ -11,7 +11,11 @@
11 11
12#define kmap_prot PAGE_KERNEL 12#define kmap_prot PAGE_KERNEL
13 13
14#define flush_cache_kmaps() flush_cache_all() 14#define flush_cache_kmaps() \
15 do { \
16 if (cache_is_vivt()) \
17 flush_cache_all(); \
18 } while (0)
15 19
16extern pte_t *pkmap_page_table; 20extern pte_t *pkmap_page_table;
17 21
@@ -21,11 +25,20 @@ extern void *kmap_high(struct page *page);
21extern void *kmap_high_get(struct page *page); 25extern void *kmap_high_get(struct page *page);
22extern void kunmap_high(struct page *page); 26extern void kunmap_high(struct page *page);
23 27
28extern void *kmap_high_l1_vipt(struct page *page, pte_t *saved_pte);
29extern void kunmap_high_l1_vipt(struct page *page, pte_t saved_pte);
30
31/*
32 * The following functions are already defined by <linux/highmem.h>
33 * when CONFIG_HIGHMEM is not set.
34 */
35#ifdef CONFIG_HIGHMEM
24extern void *kmap(struct page *page); 36extern void *kmap(struct page *page);
25extern void kunmap(struct page *page); 37extern void kunmap(struct page *page);
26extern void *kmap_atomic(struct page *page, enum km_type type); 38extern void *kmap_atomic(struct page *page, enum km_type type);
27extern void kunmap_atomic(void *kvaddr, enum km_type type); 39extern void kunmap_atomic(void *kvaddr, enum km_type type);
28extern void *kmap_atomic_pfn(unsigned long pfn, enum km_type type); 40extern void *kmap_atomic_pfn(unsigned long pfn, enum km_type type);
29extern struct page *kmap_atomic_to_page(const void *ptr); 41extern struct page *kmap_atomic_to_page(const void *ptr);
42#endif
30 43
31#endif 44#endif
diff --git a/arch/arm/include/asm/irq.h b/arch/arm/include/asm/irq.h
index 328f14a8b790..237282f7c762 100644
--- a/arch/arm/include/asm/irq.h
+++ b/arch/arm/include/asm/irq.h
@@ -17,6 +17,7 @@
17 17
18#ifndef __ASSEMBLY__ 18#ifndef __ASSEMBLY__
19struct irqaction; 19struct irqaction;
20struct pt_regs;
20extern void migrate_irqs(void); 21extern void migrate_irqs(void);
21 22
22extern void asm_do_IRQ(unsigned int, struct pt_regs *); 23extern void asm_do_IRQ(unsigned int, struct pt_regs *);
diff --git a/arch/arm/include/asm/kmap_types.h b/arch/arm/include/asm/kmap_types.h
index c019949a5189..c4b2ea3fbe42 100644
--- a/arch/arm/include/asm/kmap_types.h
+++ b/arch/arm/include/asm/kmap_types.h
@@ -18,6 +18,7 @@ enum km_type {
18 KM_IRQ1, 18 KM_IRQ1,
19 KM_SOFTIRQ0, 19 KM_SOFTIRQ0,
20 KM_SOFTIRQ1, 20 KM_SOFTIRQ1,
21 KM_L1_CACHE,
21 KM_L2_CACHE, 22 KM_L2_CACHE,
22 KM_TYPE_NR 23 KM_TYPE_NR
23}; 24};
diff --git a/arch/arm/include/asm/outercache.h b/arch/arm/include/asm/outercache.h
new file mode 100644
index 000000000000..25f76bae57ab
--- /dev/null
+++ b/arch/arm/include/asm/outercache.h
@@ -0,0 +1,75 @@
1/*
2 * arch/arm/include/asm/outercache.h
3 *
4 * Copyright (C) 2010 ARM Ltd.
5 * Written by Catalin Marinas <catalin.marinas@arm.com>
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 * 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#ifndef __ASM_OUTERCACHE_H
22#define __ASM_OUTERCACHE_H
23
24struct outer_cache_fns {
25 void (*inv_range)(unsigned long, unsigned long);
26 void (*clean_range)(unsigned long, unsigned long);
27 void (*flush_range)(unsigned long, unsigned long);
28#ifdef CONFIG_OUTER_CACHE_SYNC
29 void (*sync)(void);
30#endif
31};
32
33#ifdef CONFIG_OUTER_CACHE
34
35extern struct outer_cache_fns outer_cache;
36
37static inline void outer_inv_range(unsigned long start, unsigned long end)
38{
39 if (outer_cache.inv_range)
40 outer_cache.inv_range(start, end);
41}
42static inline void outer_clean_range(unsigned long start, unsigned long end)
43{
44 if (outer_cache.clean_range)
45 outer_cache.clean_range(start, end);
46}
47static inline void outer_flush_range(unsigned long start, unsigned long end)
48{
49 if (outer_cache.flush_range)
50 outer_cache.flush_range(start, end);
51}
52
53#else
54
55static inline void outer_inv_range(unsigned long start, unsigned long end)
56{ }
57static inline void outer_clean_range(unsigned long start, unsigned long end)
58{ }
59static inline void outer_flush_range(unsigned long start, unsigned long end)
60{ }
61
62#endif
63
64#ifdef CONFIG_OUTER_CACHE_SYNC
65static inline void outer_sync(void)
66{
67 if (outer_cache.sync)
68 outer_cache.sync();
69}
70#else
71static inline void outer_sync(void)
72{ }
73#endif
74
75#endif /* __ASM_OUTERCACHE_H */
diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h
index 02f5d99adbc0..5f4f48002734 100644
--- a/arch/arm/include/asm/system.h
+++ b/arch/arm/include/asm/system.h
@@ -60,6 +60,8 @@
60#include <linux/linkage.h> 60#include <linux/linkage.h>
61#include <linux/irqflags.h> 61#include <linux/irqflags.h>
62 62
63#include <asm/outercache.h>
64
63#define __exception __attribute__((section(".exception.text"))) 65#define __exception __attribute__((section(".exception.text")))
64 66
65struct thread_info; 67struct thread_info;
@@ -137,10 +139,12 @@ extern unsigned int user_debug;
137#define dmb() __asm__ __volatile__ ("" : : : "memory") 139#define dmb() __asm__ __volatile__ ("" : : : "memory")
138#endif 140#endif
139 141
140#if defined(CONFIG_ARM_DMA_MEM_BUFFERABLE) || defined(CONFIG_SMP) 142#ifdef CONFIG_ARCH_HAS_BARRIERS
141#define mb() dmb() 143#include <mach/barriers.h>
144#elif defined(CONFIG_ARM_DMA_MEM_BUFFERABLE) || defined(CONFIG_SMP)
145#define mb() do { dsb(); outer_sync(); } while (0)
142#define rmb() dmb() 146#define rmb() dmb()
143#define wmb() dmb() 147#define wmb() mb()
144#else 148#else
145#define mb() do { if (arch_is_coherent()) dmb(); else barrier(); } while (0) 149#define mb() do { if (arch_is_coherent()) dmb(); else barrier(); } while (0)
146#define rmb() do { if (arch_is_coherent()) dmb(); else barrier(); } while (0) 150#define rmb() do { if (arch_is_coherent()) dmb(); else barrier(); } while (0)
@@ -152,9 +156,9 @@ extern unsigned int user_debug;
152#define smp_rmb() barrier() 156#define smp_rmb() barrier()
153#define smp_wmb() barrier() 157#define smp_wmb() barrier()
154#else 158#else
155#define smp_mb() mb() 159#define smp_mb() dmb()
156#define smp_rmb() rmb() 160#define smp_rmb() dmb()
157#define smp_wmb() wmb() 161#define smp_wmb() dmb()
158#endif 162#endif
159 163
160#define read_barrier_depends() do { } while(0) 164#define read_barrier_depends() do { } while(0)
diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h
index 1d6bd40a4322..33e4a48fe103 100644
--- a/arch/arm/include/asm/uaccess.h
+++ b/arch/arm/include/asm/uaccess.h
@@ -229,16 +229,16 @@ do { \
229 __asm__ __volatile__( \ 229 __asm__ __volatile__( \
230 "1: ldrbt %1,[%2]\n" \ 230 "1: ldrbt %1,[%2]\n" \
231 "2:\n" \ 231 "2:\n" \
232 " .section .fixup,\"ax\"\n" \ 232 " .pushsection .fixup,\"ax\"\n" \
233 " .align 2\n" \ 233 " .align 2\n" \
234 "3: mov %0, %3\n" \ 234 "3: mov %0, %3\n" \
235 " mov %1, #0\n" \ 235 " mov %1, #0\n" \
236 " b 2b\n" \ 236 " b 2b\n" \
237 " .previous\n" \ 237 " .popsection\n" \
238 " .section __ex_table,\"a\"\n" \ 238 " .pushsection __ex_table,\"a\"\n" \
239 " .align 3\n" \ 239 " .align 3\n" \
240 " .long 1b, 3b\n" \ 240 " .long 1b, 3b\n" \
241 " .previous" \ 241 " .popsection" \
242 : "+r" (err), "=&r" (x) \ 242 : "+r" (err), "=&r" (x) \
243 : "r" (addr), "i" (-EFAULT) \ 243 : "r" (addr), "i" (-EFAULT) \
244 : "cc") 244 : "cc")
@@ -265,16 +265,16 @@ do { \
265 __asm__ __volatile__( \ 265 __asm__ __volatile__( \
266 "1: ldrt %1,[%2]\n" \ 266 "1: ldrt %1,[%2]\n" \
267 "2:\n" \ 267 "2:\n" \
268 " .section .fixup,\"ax\"\n" \ 268 " .pushsection .fixup,\"ax\"\n" \
269 " .align 2\n" \ 269 " .align 2\n" \
270 "3: mov %0, %3\n" \ 270 "3: mov %0, %3\n" \
271 " mov %1, #0\n" \ 271 " mov %1, #0\n" \
272 " b 2b\n" \ 272 " b 2b\n" \
273 " .previous\n" \ 273 " .popsection\n" \
274 " .section __ex_table,\"a\"\n" \ 274 " .pushsection __ex_table,\"a\"\n" \
275 " .align 3\n" \ 275 " .align 3\n" \
276 " .long 1b, 3b\n" \ 276 " .long 1b, 3b\n" \
277 " .previous" \ 277 " .popsection" \
278 : "+r" (err), "=&r" (x) \ 278 : "+r" (err), "=&r" (x) \
279 : "r" (addr), "i" (-EFAULT) \ 279 : "r" (addr), "i" (-EFAULT) \
280 : "cc") 280 : "cc")
@@ -310,15 +310,15 @@ do { \
310 __asm__ __volatile__( \ 310 __asm__ __volatile__( \
311 "1: strbt %1,[%2]\n" \ 311 "1: strbt %1,[%2]\n" \
312 "2:\n" \ 312 "2:\n" \
313 " .section .fixup,\"ax\"\n" \ 313 " .pushsection .fixup,\"ax\"\n" \
314 " .align 2\n" \ 314 " .align 2\n" \
315 "3: mov %0, %3\n" \ 315 "3: mov %0, %3\n" \
316 " b 2b\n" \ 316 " b 2b\n" \
317 " .previous\n" \ 317 " .popsection\n" \
318 " .section __ex_table,\"a\"\n" \ 318 " .pushsection __ex_table,\"a\"\n" \
319 " .align 3\n" \ 319 " .align 3\n" \
320 " .long 1b, 3b\n" \ 320 " .long 1b, 3b\n" \
321 " .previous" \ 321 " .popsection" \
322 : "+r" (err) \ 322 : "+r" (err) \
323 : "r" (x), "r" (__pu_addr), "i" (-EFAULT) \ 323 : "r" (x), "r" (__pu_addr), "i" (-EFAULT) \
324 : "cc") 324 : "cc")
@@ -343,15 +343,15 @@ do { \
343 __asm__ __volatile__( \ 343 __asm__ __volatile__( \
344 "1: strt %1,[%2]\n" \ 344 "1: strt %1,[%2]\n" \
345 "2:\n" \ 345 "2:\n" \
346 " .section .fixup,\"ax\"\n" \ 346 " .pushsection .fixup,\"ax\"\n" \
347 " .align 2\n" \ 347 " .align 2\n" \
348 "3: mov %0, %3\n" \ 348 "3: mov %0, %3\n" \
349 " b 2b\n" \ 349 " b 2b\n" \
350 " .previous\n" \ 350 " .popsection\n" \
351 " .section __ex_table,\"a\"\n" \ 351 " .pushsection __ex_table,\"a\"\n" \
352 " .align 3\n" \ 352 " .align 3\n" \
353 " .long 1b, 3b\n" \ 353 " .long 1b, 3b\n" \
354 " .previous" \ 354 " .popsection" \
355 : "+r" (err) \ 355 : "+r" (err) \
356 : "r" (x), "r" (__pu_addr), "i" (-EFAULT) \ 356 : "r" (x), "r" (__pu_addr), "i" (-EFAULT) \
357 : "cc") 357 : "cc")
@@ -371,16 +371,16 @@ do { \
371 THUMB( "1: strt " __reg_oper1 ", [%1]\n" ) \ 371 THUMB( "1: strt " __reg_oper1 ", [%1]\n" ) \
372 THUMB( "2: strt " __reg_oper0 ", [%1, #4]\n" ) \ 372 THUMB( "2: strt " __reg_oper0 ", [%1, #4]\n" ) \
373 "3:\n" \ 373 "3:\n" \
374 " .section .fixup,\"ax\"\n" \ 374 " .pushsection .fixup,\"ax\"\n" \
375 " .align 2\n" \ 375 " .align 2\n" \
376 "4: mov %0, %3\n" \ 376 "4: mov %0, %3\n" \
377 " b 3b\n" \ 377 " b 3b\n" \
378 " .previous\n" \ 378 " .popsection\n" \
379 " .section __ex_table,\"a\"\n" \ 379 " .pushsection __ex_table,\"a\"\n" \
380 " .align 3\n" \ 380 " .align 3\n" \
381 " .long 1b, 4b\n" \ 381 " .long 1b, 4b\n" \
382 " .long 2b, 4b\n" \ 382 " .long 2b, 4b\n" \
383 " .previous" \ 383 " .popsection" \
384 : "+r" (err), "+r" (__pu_addr) \ 384 : "+r" (err), "+r" (__pu_addr) \
385 : "r" (x), "i" (-EFAULT) \ 385 : "r" (x), "i" (-EFAULT) \
386 : "cc") 386 : "cc")
diff --git a/arch/arm/include/asm/ucontext.h b/arch/arm/include/asm/ucontext.h
index bf65e9f4525d..47f023aa8495 100644
--- a/arch/arm/include/asm/ucontext.h
+++ b/arch/arm/include/asm/ucontext.h
@@ -59,23 +59,22 @@ struct iwmmxt_sigframe {
59#endif /* CONFIG_IWMMXT */ 59#endif /* CONFIG_IWMMXT */
60 60
61#ifdef CONFIG_VFP 61#ifdef CONFIG_VFP
62#if __LINUX_ARM_ARCH__ < 6
63/* For ARM pre-v6, we use fstmiax and fldmiax. This adds one extra
64 * word after the registers, and a word of padding at the end for
65 * alignment. */
66#define VFP_MAGIC 0x56465001 62#define VFP_MAGIC 0x56465001
67#define VFP_STORAGE_SIZE 152
68#else
69#define VFP_MAGIC 0x56465002
70#define VFP_STORAGE_SIZE 144
71#endif
72 63
73struct vfp_sigframe 64struct vfp_sigframe
74{ 65{
75 unsigned long magic; 66 unsigned long magic;
76 unsigned long size; 67 unsigned long size;
77 union vfp_state storage; 68 struct user_vfp ufp;
78}; 69 struct user_vfp_exc ufp_exc;
70} __attribute__((__aligned__(8)));
71
72/*
73 * 8 byte for magic and size, 264 byte for ufp, 12 bytes for ufp_exc,
74 * 4 bytes padding.
75 */
76#define VFP_STORAGE_SIZE sizeof(struct vfp_sigframe)
77
79#endif /* CONFIG_VFP */ 78#endif /* CONFIG_VFP */
80 79
81/* 80/*
@@ -91,7 +90,7 @@ struct aux_sigframe {
91#ifdef CONFIG_IWMMXT 90#ifdef CONFIG_IWMMXT
92 struct iwmmxt_sigframe iwmmxt; 91 struct iwmmxt_sigframe iwmmxt;
93#endif 92#endif
94#if 0 && defined CONFIG_VFP /* Not yet saved. */ 93#ifdef CONFIG_VFP
95 struct vfp_sigframe vfp; 94 struct vfp_sigframe vfp;
96#endif 95#endif
97 /* Something that isn't a valid magic number for any coprocessor. */ 96 /* Something that isn't a valid magic number for any coprocessor. */
diff --git a/arch/arm/include/asm/user.h b/arch/arm/include/asm/user.h
index df95e050f9dd..05ac4b06876a 100644
--- a/arch/arm/include/asm/user.h
+++ b/arch/arm/include/asm/user.h
@@ -83,11 +83,21 @@ struct user{
83 83
84/* 84/*
85 * User specific VFP registers. If only VFPv2 is present, registers 16 to 31 85 * User specific VFP registers. If only VFPv2 is present, registers 16 to 31
86 * are ignored by the ptrace system call. 86 * are ignored by the ptrace system call and the signal handler.
87 */ 87 */
88struct user_vfp { 88struct user_vfp {
89 unsigned long long fpregs[32]; 89 unsigned long long fpregs[32];
90 unsigned long fpscr; 90 unsigned long fpscr;
91}; 91};
92 92
93/*
94 * VFP exception registers exposed to user space during signal delivery.
95 * Fields not relavant to the current VFP architecture are ignored.
96 */
97struct user_vfp_exc {
98 unsigned long fpexc;
99 unsigned long fpinst;
100 unsigned long fpinst2;
101};
102
93#endif /* _ARM_USER_H */ 103#endif /* _ARM_USER_H */
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
index 6c5cf369183b..7ee48e7f8f31 100644
--- a/arch/arm/kernel/entry-armv.S
+++ b/arch/arm/kernel/entry-armv.S
@@ -523,16 +523,16 @@ ENDPROC(__und_usr)
523/* 523/*
524 * The out of line fixup for the ldrt above. 524 * The out of line fixup for the ldrt above.
525 */ 525 */
526 .section .fixup, "ax" 526 .pushsection .fixup, "ax"
5274: mov pc, r9 5274: mov pc, r9
528 .previous 528 .popsection
529 .section __ex_table,"a" 529 .pushsection __ex_table,"a"
530 .long 1b, 4b 530 .long 1b, 4b
531#if __LINUX_ARM_ARCH__ >= 7 531#if __LINUX_ARM_ARCH__ >= 7
532 .long 2b, 4b 532 .long 2b, 4b
533 .long 3b, 4b 533 .long 3b, 4b
534#endif 534#endif
535 .previous 535 .popsection
536 536
537/* 537/*
538 * Check whether the instruction is a co-processor instruction. 538 * Check whether the instruction is a co-processor instruction.
@@ -676,10 +676,10 @@ do_fpe:
676 * lr = unrecognised FP instruction return address 676 * lr = unrecognised FP instruction return address
677 */ 677 */
678 678
679 .data 679 .pushsection .data
680ENTRY(fp_enter) 680ENTRY(fp_enter)
681 .word no_fp 681 .word no_fp
682 .previous 682 .popsection
683 683
684ENTRY(no_fp) 684ENTRY(no_fp)
685 mov pc, lr 685 mov pc, lr
diff --git a/arch/arm/kernel/ftrace.c b/arch/arm/kernel/ftrace.c
index c63842766229..0298286ad4ad 100644
--- a/arch/arm/kernel/ftrace.c
+++ b/arch/arm/kernel/ftrace.c
@@ -62,15 +62,15 @@ int ftrace_modify_code(unsigned long pc, unsigned char *old_code,
62 " movne %0, #2 \n" 62 " movne %0, #2 \n"
63 "3:\n" 63 "3:\n"
64 64
65 ".section .fixup, \"ax\"\n" 65 ".pushsection .fixup, \"ax\"\n"
66 "4: mov %0, #1 \n" 66 "4: mov %0, #1 \n"
67 " b 3b \n" 67 " b 3b \n"
68 ".previous\n" 68 ".popsection\n"
69 69
70 ".section __ex_table, \"a\"\n" 70 ".pushsection __ex_table, \"a\"\n"
71 " .long 1b, 4b \n" 71 " .long 1b, 4b \n"
72 " .long 2b, 4b \n" 72 " .long 2b, 4b \n"
73 ".previous\n" 73 ".popsection\n"
74 74
75 : "=r"(err), "=r"(replaced) 75 : "=r"(err), "=r"(replaced)
76 : "r"(pc), "r"(new), "r"(old), "0"(err), "1"(replaced) 76 : "r"(pc), "r"(new), "r"(old), "0"(err), "1"(replaced)
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c
index b7cb45bb91e8..3b3d2c80509c 100644
--- a/arch/arm/kernel/irq.c
+++ b/arch/arm/kernel/irq.c
@@ -27,7 +27,6 @@
27#include <linux/ioport.h> 27#include <linux/ioport.h>
28#include <linux/interrupt.h> 28#include <linux/interrupt.h>
29#include <linux/irq.h> 29#include <linux/irq.h>
30#include <linux/slab.h>
31#include <linux/random.h> 30#include <linux/random.h>
32#include <linux/smp.h> 31#include <linux/smp.h>
33#include <linux/init.h> 32#include <linux/init.h>
diff --git a/arch/arm/kernel/kprobes.c b/arch/arm/kernel/kprobes.c
index 60c62c377fa9..2ba7deb3072e 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/slab.h>
25#include <linux/stop_machine.h> 26#include <linux/stop_machine.h>
26#include <linux/stringify.h> 27#include <linux/stringify.h>
27#include <asm/traps.h> 28#include <asm/traps.h>
@@ -393,6 +394,14 @@ void __kprobes jprobe_return(void)
393 /* 394 /*
394 * Setup an empty pt_regs. Fill SP and PC fields as 395 * Setup an empty pt_regs. Fill SP and PC fields as
395 * they're needed by longjmp_break_handler. 396 * they're needed by longjmp_break_handler.
397 *
398 * We allocate some slack between the original SP and start of
399 * our fabricated regs. To be precise we want to have worst case
400 * covered which is STMFD with all 16 regs so we allocate 2 *
401 * sizeof(struct_pt_regs)).
402 *
403 * This is to prevent any simulated instruction from writing
404 * over the regs when they are accessing the stack.
396 */ 405 */
397 "sub sp, %0, %1 \n\t" 406 "sub sp, %0, %1 \n\t"
398 "ldr r0, ="__stringify(JPROBE_MAGIC_ADDR)"\n\t" 407 "ldr r0, ="__stringify(JPROBE_MAGIC_ADDR)"\n\t"
@@ -410,7 +419,7 @@ void __kprobes jprobe_return(void)
410 "ldmia sp, {r0 - pc} \n\t" 419 "ldmia sp, {r0 - pc} \n\t"
411 : 420 :
412 : "r" (kcb->jprobe_saved_regs.ARM_sp), 421 : "r" (kcb->jprobe_saved_regs.ARM_sp),
413 "I" (sizeof(struct pt_regs)), 422 "I" (sizeof(struct pt_regs) * 2),
414 "J" (offsetof(struct pt_regs, ARM_sp)), 423 "J" (offsetof(struct pt_regs, ARM_sp)),
415 "J" (offsetof(struct pt_regs, ARM_pc)), 424 "J" (offsetof(struct pt_regs, ARM_pc)),
416 "J" (offsetof(struct pt_regs, ARM_cpsr)) 425 "J" (offsetof(struct pt_regs, ARM_cpsr))
diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c
index f28c5e9c51ea..c628bdf6c430 100644
--- a/arch/arm/kernel/module.c
+++ b/arch/arm/kernel/module.c
@@ -16,9 +16,9 @@
16#include <linux/mm.h> 16#include <linux/mm.h>
17#include <linux/elf.h> 17#include <linux/elf.h>
18#include <linux/vmalloc.h> 18#include <linux/vmalloc.h>
19#include <linux/slab.h>
20#include <linux/fs.h> 19#include <linux/fs.h>
21#include <linux/string.h> 20#include <linux/string.h>
21#include <linux/gfp.h>
22 22
23#include <asm/pgtable.h> 23#include <asm/pgtable.h>
24#include <asm/sections.h> 24#include <asm/sections.h>
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index ba2adefa53f7..acf5e6fdb6dc 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -16,7 +16,6 @@
16#include <linux/mm.h> 16#include <linux/mm.h>
17#include <linux/stddef.h> 17#include <linux/stddef.h>
18#include <linux/unistd.h> 18#include <linux/unistd.h>
19#include <linux/slab.h>
20#include <linux/user.h> 19#include <linux/user.h>
21#include <linux/delay.h> 20#include <linux/delay.h>
22#include <linux/reboot.h> 21#include <linux/reboot.h>
@@ -356,7 +355,7 @@ EXPORT_SYMBOL(dump_fpu);
356 * the thread function, and r3 points to the exit function. 355 * the thread function, and r3 points to the exit function.
357 */ 356 */
358extern void kernel_thread_helper(void); 357extern void kernel_thread_helper(void);
359asm( ".section .text\n" 358asm( ".pushsection .text\n"
360" .align\n" 359" .align\n"
361" .type kernel_thread_helper, #function\n" 360" .type kernel_thread_helper, #function\n"
362"kernel_thread_helper:\n" 361"kernel_thread_helper:\n"
@@ -364,11 +363,11 @@ asm( ".section .text\n"
364" mov lr, r3\n" 363" mov lr, r3\n"
365" mov pc, r2\n" 364" mov pc, r2\n"
366" .size kernel_thread_helper, . - kernel_thread_helper\n" 365" .size kernel_thread_helper, . - kernel_thread_helper\n"
367" .previous"); 366" .popsection");
368 367
369#ifdef CONFIG_ARM_UNWIND 368#ifdef CONFIG_ARM_UNWIND
370extern void kernel_thread_exit(long code); 369extern void kernel_thread_exit(long code);
371asm( ".section .text\n" 370asm( ".pushsection .text\n"
372" .align\n" 371" .align\n"
373" .type kernel_thread_exit, #function\n" 372" .type kernel_thread_exit, #function\n"
374"kernel_thread_exit:\n" 373"kernel_thread_exit:\n"
@@ -378,7 +377,7 @@ asm( ".section .text\n"
378" nop\n" 377" nop\n"
379" .fnend\n" 378" .fnend\n"
380" .size kernel_thread_exit, . - kernel_thread_exit\n" 379" .size kernel_thread_exit, . - kernel_thread_exit\n"
381" .previous"); 380" .popsection");
382#else 381#else
383#define kernel_thread_exit do_exit 382#define kernel_thread_exit do_exit
384#endif 383#endif
diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c
index e7714f367eb8..907d5a620bca 100644
--- a/arch/arm/kernel/signal.c
+++ b/arch/arm/kernel/signal.c
@@ -18,6 +18,7 @@
18#include <asm/cacheflush.h> 18#include <asm/cacheflush.h>
19#include <asm/ucontext.h> 19#include <asm/ucontext.h>
20#include <asm/unistd.h> 20#include <asm/unistd.h>
21#include <asm/vfp.h>
21 22
22#include "ptrace.h" 23#include "ptrace.h"
23#include "signal.h" 24#include "signal.h"
@@ -175,6 +176,90 @@ static int restore_iwmmxt_context(struct iwmmxt_sigframe *frame)
175 176
176#endif 177#endif
177 178
179#ifdef CONFIG_VFP
180
181static int preserve_vfp_context(struct vfp_sigframe __user *frame)
182{
183 struct thread_info *thread = current_thread_info();
184 struct vfp_hard_struct *h = &thread->vfpstate.hard;
185 const unsigned long magic = VFP_MAGIC;
186 const unsigned long size = VFP_STORAGE_SIZE;
187 int err = 0;
188
189 vfp_sync_hwstate(thread);
190 __put_user_error(magic, &frame->magic, err);
191 __put_user_error(size, &frame->size, err);
192
193 /*
194 * Copy the floating point registers. There can be unused
195 * registers see asm/hwcap.h for details.
196 */
197 err |= __copy_to_user(&frame->ufp.fpregs, &h->fpregs,
198 sizeof(h->fpregs));
199 /*
200 * Copy the status and control register.
201 */
202 __put_user_error(h->fpscr, &frame->ufp.fpscr, err);
203
204 /*
205 * Copy the exception registers.
206 */
207 __put_user_error(h->fpexc, &frame->ufp_exc.fpexc, err);
208 __put_user_error(h->fpinst, &frame->ufp_exc.fpinst, err);
209 __put_user_error(h->fpinst2, &frame->ufp_exc.fpinst2, err);
210
211 return err ? -EFAULT : 0;
212}
213
214static int restore_vfp_context(struct vfp_sigframe __user *frame)
215{
216 struct thread_info *thread = current_thread_info();
217 struct vfp_hard_struct *h = &thread->vfpstate.hard;
218 unsigned long magic;
219 unsigned long size;
220 unsigned long fpexc;
221 int err = 0;
222
223 __get_user_error(magic, &frame->magic, err);
224 __get_user_error(size, &frame->size, err);
225
226 if (err)
227 return -EFAULT;
228 if (magic != VFP_MAGIC || size != VFP_STORAGE_SIZE)
229 return -EINVAL;
230
231 /*
232 * Copy the floating point registers. There can be unused
233 * registers see asm/hwcap.h for details.
234 */
235 err |= __copy_from_user(&h->fpregs, &frame->ufp.fpregs,
236 sizeof(h->fpregs));
237 /*
238 * Copy the status and control register.
239 */
240 __get_user_error(h->fpscr, &frame->ufp.fpscr, err);
241
242 /*
243 * Sanitise and restore the exception registers.
244 */
245 __get_user_error(fpexc, &frame->ufp_exc.fpexc, err);
246 /* Ensure the VFP is enabled. */
247 fpexc |= FPEXC_EN;
248 /* Ensure FPINST2 is invalid and the exception flag is cleared. */
249 fpexc &= ~(FPEXC_EX | FPEXC_FP2V);
250 h->fpexc = fpexc;
251
252 __get_user_error(h->fpinst, &frame->ufp_exc.fpinst, err);
253 __get_user_error(h->fpinst2, &frame->ufp_exc.fpinst2, err);
254
255 if (!err)
256 vfp_flush_hwstate(thread);
257
258 return err ? -EFAULT : 0;
259}
260
261#endif
262
178/* 263/*
179 * Do a signal return; undo the signal stack. These are aligned to 64-bit. 264 * Do a signal return; undo the signal stack. These are aligned to 64-bit.
180 */ 265 */
@@ -233,8 +318,8 @@ static int restore_sigframe(struct pt_regs *regs, struct sigframe __user *sf)
233 err |= restore_iwmmxt_context(&aux->iwmmxt); 318 err |= restore_iwmmxt_context(&aux->iwmmxt);
234#endif 319#endif
235#ifdef CONFIG_VFP 320#ifdef CONFIG_VFP
236// if (err == 0) 321 if (err == 0)
237// err |= vfp_restore_state(&sf->aux.vfp); 322 err |= restore_vfp_context(&aux->vfp);
238#endif 323#endif
239 324
240 return err; 325 return err;
@@ -348,8 +433,8 @@ setup_sigframe(struct sigframe __user *sf, struct pt_regs *regs, sigset_t *set)
348 err |= preserve_iwmmxt_context(&aux->iwmmxt); 433 err |= preserve_iwmmxt_context(&aux->iwmmxt);
349#endif 434#endif
350#ifdef CONFIG_VFP 435#ifdef CONFIG_VFP
351// if (err == 0) 436 if (err == 0)
352// err |= vfp_save_state(&sf->aux.vfp); 437 err |= preserve_vfp_context(&aux->vfp);
353#endif 438#endif
354 __put_user_error(0, &aux->end_magic, err); 439 __put_user_error(0, &aux->end_magic, err);
355 440
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index 7a3cc0266934..b8c3d0f689d9 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -86,6 +86,12 @@ int __cpuinit __cpu_up(unsigned int cpu)
86 return PTR_ERR(idle); 86 return PTR_ERR(idle);
87 } 87 }
88 ci->idle = idle; 88 ci->idle = idle;
89 } else {
90 /*
91 * Since this idle thread is being re-used, call
92 * init_idle() to reinitialize the thread structure.
93 */
94 init_idle(idle, cpu);
89 } 95 }
90 96
91 /* 97 /*
diff --git a/arch/arm/kernel/sys_arm.c b/arch/arm/kernel/sys_arm.c
index 4350f75e578c..c23501842b98 100644
--- a/arch/arm/kernel/sys_arm.c
+++ b/arch/arm/kernel/sys_arm.c
@@ -15,7 +15,6 @@
15#include <linux/module.h> 15#include <linux/module.h>
16#include <linux/errno.h> 16#include <linux/errno.h>
17#include <linux/sched.h> 17#include <linux/sched.h>
18#include <linux/slab.h>
19#include <linux/mm.h> 18#include <linux/mm.h>
20#include <linux/sem.h> 19#include <linux/sem.h>
21#include <linux/msg.h> 20#include <linux/msg.h>
@@ -27,6 +26,7 @@
27#include <linux/file.h> 26#include <linux/file.h>
28#include <linux/ipc.h> 27#include <linux/ipc.h>
29#include <linux/uaccess.h> 28#include <linux/uaccess.h>
29#include <linux/slab.h>
30 30
31/* Fork a new task - this creates a new program thread. 31/* Fork a new task - this creates a new program thread.
32 * This is called indirectly via a small wrapper 32 * This is called indirectly via a small wrapper
diff --git a/arch/arm/lib/backtrace.S b/arch/arm/lib/backtrace.S
index aaf7220d9e30..a673297b0cf1 100644
--- a/arch/arm/lib/backtrace.S
+++ b/arch/arm/lib/backtrace.S
@@ -110,13 +110,13 @@ no_frame: ldmfd sp!, {r4 - r8, pc}
110ENDPROC(__backtrace) 110ENDPROC(__backtrace)
111ENDPROC(c_backtrace) 111ENDPROC(c_backtrace)
112 112
113 .section __ex_table,"a" 113 .pushsection __ex_table,"a"
114 .align 3 114 .align 3
115 .long 1001b, 1006b 115 .long 1001b, 1006b
116 .long 1002b, 1006b 116 .long 1002b, 1006b
117 .long 1003b, 1006b 117 .long 1003b, 1006b
118 .long 1004b, 1006b 118 .long 1004b, 1006b
119 .previous 119 .popsection
120 120
121#define instr r4 121#define instr r4
122#define reg r5 122#define reg r5
diff --git a/arch/arm/lib/clear_user.S b/arch/arm/lib/clear_user.S
index 1279abd8b886..5e3f99620c04 100644
--- a/arch/arm/lib/clear_user.S
+++ b/arch/arm/lib/clear_user.S
@@ -46,8 +46,8 @@ USER( strnebt r2, [r0])
46 ldmfd sp!, {r1, pc} 46 ldmfd sp!, {r1, pc}
47ENDPROC(__clear_user) 47ENDPROC(__clear_user)
48 48
49 .section .fixup,"ax" 49 .pushsection .fixup,"ax"
50 .align 0 50 .align 0
519001: ldmfd sp!, {r0, pc} 519001: ldmfd sp!, {r0, pc}
52 .previous 52 .popsection
53 53
diff --git a/arch/arm/lib/copy_from_user.S b/arch/arm/lib/copy_from_user.S
index e4fe124acedc..66a477a3e3cc 100644
--- a/arch/arm/lib/copy_from_user.S
+++ b/arch/arm/lib/copy_from_user.S
@@ -90,7 +90,7 @@ ENTRY(__copy_from_user)
90 90
91ENDPROC(__copy_from_user) 91ENDPROC(__copy_from_user)
92 92
93 .section .fixup,"ax" 93 .pushsection .fixup,"ax"
94 .align 0 94 .align 0
95 copy_abort_preamble 95 copy_abort_preamble
96 ldmfd sp!, {r1, r2} 96 ldmfd sp!, {r1, r2}
@@ -100,5 +100,5 @@ ENDPROC(__copy_from_user)
100 bl __memzero 100 bl __memzero
101 ldr r0, [sp], #4 101 ldr r0, [sp], #4
102 copy_abort_end 102 copy_abort_end
103 .previous 103 .popsection
104 104
diff --git a/arch/arm/lib/copy_to_user.S b/arch/arm/lib/copy_to_user.S
index 1a71e1584442..027b69bdbad1 100644
--- a/arch/arm/lib/copy_to_user.S
+++ b/arch/arm/lib/copy_to_user.S
@@ -94,12 +94,12 @@ WEAK(__copy_to_user)
94 94
95ENDPROC(__copy_to_user) 95ENDPROC(__copy_to_user)
96 96
97 .section .fixup,"ax" 97 .pushsection .fixup,"ax"
98 .align 0 98 .align 0
99 copy_abort_preamble 99 copy_abort_preamble
100 ldmfd sp!, {r1, r2, r3} 100 ldmfd sp!, {r1, r2, r3}
101 sub r0, r0, r1 101 sub r0, r0, r1
102 rsb r0, r0, r2 102 rsb r0, r0, r2
103 copy_abort_end 103 copy_abort_end
104 .previous 104 .popsection
105 105
diff --git a/arch/arm/lib/csumpartialcopyuser.S b/arch/arm/lib/csumpartialcopyuser.S
index fd0e9dcd9fdc..59ff6fdc1e63 100644
--- a/arch/arm/lib/csumpartialcopyuser.S
+++ b/arch/arm/lib/csumpartialcopyuser.S
@@ -68,7 +68,7 @@
68 * so properly, we would have to add in whatever registers were loaded before 68 * so properly, we would have to add in whatever registers were loaded before
69 * the fault, which, with the current asm above is not predictable. 69 * the fault, which, with the current asm above is not predictable.
70 */ 70 */
71 .section .fixup,"ax" 71 .pushsection .fixup,"ax"
72 .align 4 72 .align 4
739001: mov r4, #-EFAULT 739001: mov r4, #-EFAULT
74 ldr r5, [fp, #4] @ *err_ptr 74 ldr r5, [fp, #4] @ *err_ptr
@@ -80,4 +80,4 @@
80 strneb r0, [r1], #1 80 strneb r0, [r1], #1
81 bne 9002b 81 bne 9002b
82 load_regs 82 load_regs
83 .previous 83 .popsection
diff --git a/arch/arm/lib/getuser.S b/arch/arm/lib/getuser.S
index a1814d927122..b1631a7dbe75 100644
--- a/arch/arm/lib/getuser.S
+++ b/arch/arm/lib/getuser.S
@@ -64,9 +64,9 @@ __get_user_bad:
64 mov pc, lr 64 mov pc, lr
65ENDPROC(__get_user_bad) 65ENDPROC(__get_user_bad)
66 66
67.section __ex_table, "a" 67.pushsection __ex_table, "a"
68 .long 1b, __get_user_bad 68 .long 1b, __get_user_bad
69 .long 2b, __get_user_bad 69 .long 2b, __get_user_bad
70 .long 3b, __get_user_bad 70 .long 3b, __get_user_bad
71 .long 4b, __get_user_bad 71 .long 4b, __get_user_bad
72.previous 72.popsection
diff --git a/arch/arm/lib/memmove.S b/arch/arm/lib/memmove.S
index 5025c863713d..938fc14f962d 100644
--- a/arch/arm/lib/memmove.S
+++ b/arch/arm/lib/memmove.S
@@ -74,7 +74,7 @@ ENTRY(memmove)
74 rsb ip, ip, #32 74 rsb ip, ip, #32
75 addne pc, pc, ip @ C is always clear here 75 addne pc, pc, ip @ C is always clear here
76 b 7f 76 b 7f
776: nop 776: W(nop)
78 W(ldr) r3, [r1, #-4]! 78 W(ldr) r3, [r1, #-4]!
79 W(ldr) r4, [r1, #-4]! 79 W(ldr) r4, [r1, #-4]!
80 W(ldr) r5, [r1, #-4]! 80 W(ldr) r5, [r1, #-4]!
@@ -85,7 +85,7 @@ ENTRY(memmove)
85 85
86 add pc, pc, ip 86 add pc, pc, ip
87 nop 87 nop
88 nop 88 W(nop)
89 W(str) r3, [r0, #-4]! 89 W(str) r3, [r0, #-4]!
90 W(str) r4, [r0, #-4]! 90 W(str) r4, [r0, #-4]!
91 W(str) r5, [r0, #-4]! 91 W(str) r5, [r0, #-4]!
diff --git a/arch/arm/lib/putuser.S b/arch/arm/lib/putuser.S
index 02fedbf07c0d..5a01a23c6c06 100644
--- a/arch/arm/lib/putuser.S
+++ b/arch/arm/lib/putuser.S
@@ -81,11 +81,11 @@ __put_user_bad:
81 mov pc, lr 81 mov pc, lr
82ENDPROC(__put_user_bad) 82ENDPROC(__put_user_bad)
83 83
84.section __ex_table, "a" 84.pushsection __ex_table, "a"
85 .long 1b, __put_user_bad 85 .long 1b, __put_user_bad
86 .long 2b, __put_user_bad 86 .long 2b, __put_user_bad
87 .long 3b, __put_user_bad 87 .long 3b, __put_user_bad
88 .long 4b, __put_user_bad 88 .long 4b, __put_user_bad
89 .long 5b, __put_user_bad 89 .long 5b, __put_user_bad
90 .long 6b, __put_user_bad 90 .long 6b, __put_user_bad
91.previous 91.popsection
diff --git a/arch/arm/lib/strncpy_from_user.S b/arch/arm/lib/strncpy_from_user.S
index 1c9814f346c6..f202d7bd1647 100644
--- a/arch/arm/lib/strncpy_from_user.S
+++ b/arch/arm/lib/strncpy_from_user.S
@@ -33,11 +33,11 @@ ENTRY(__strncpy_from_user)
33 mov pc, lr 33 mov pc, lr
34ENDPROC(__strncpy_from_user) 34ENDPROC(__strncpy_from_user)
35 35
36 .section .fixup,"ax" 36 .pushsection .fixup,"ax"
37 .align 0 37 .align 0
389001: mov r3, #0 389001: mov r3, #0
39 strb r3, [r0, #0] @ null terminate 39 strb r3, [r0, #0] @ null terminate
40 mov r0, #-EFAULT 40 mov r0, #-EFAULT
41 mov pc, lr 41 mov pc, lr
42 .previous 42 .popsection
43 43
diff --git a/arch/arm/lib/strnlen_user.S b/arch/arm/lib/strnlen_user.S
index 7855b2906659..0ecbb459c4f1 100644
--- a/arch/arm/lib/strnlen_user.S
+++ b/arch/arm/lib/strnlen_user.S
@@ -33,8 +33,8 @@ ENTRY(__strnlen_user)
33 mov pc, lr 33 mov pc, lr
34ENDPROC(__strnlen_user) 34ENDPROC(__strnlen_user)
35 35
36 .section .fixup,"ax" 36 .pushsection .fixup,"ax"
37 .align 0 37 .align 0
389001: mov r0, #0 389001: mov r0, #0
39 mov pc, lr 39 mov pc, lr
40 .previous 40 .popsection
diff --git a/arch/arm/lib/uaccess.S b/arch/arm/lib/uaccess.S
index ffdd27498cee..fee9f6f88adb 100644
--- a/arch/arm/lib/uaccess.S
+++ b/arch/arm/lib/uaccess.S
@@ -279,10 +279,10 @@ USER( strgtbt r3, [r0], #1) @ May fault
279 b .Lc2u_finished 279 b .Lc2u_finished
280ENDPROC(__copy_to_user) 280ENDPROC(__copy_to_user)
281 281
282 .section .fixup,"ax" 282 .pushsection .fixup,"ax"
283 .align 0 283 .align 0
2849001: ldmfd sp!, {r0, r4 - r7, pc} 2849001: ldmfd sp!, {r0, r4 - r7, pc}
285 .previous 285 .popsection
286 286
287/* Prototype: unsigned long __copy_from_user(void *to,const void *from,unsigned long n); 287/* Prototype: unsigned long __copy_from_user(void *to,const void *from,unsigned long n);
288 * Purpose : copy a block from user memory to kernel memory 288 * Purpose : copy a block from user memory to kernel memory
@@ -545,7 +545,7 @@ USER( ldrgtbt r3, [r1], #1) @ May fault
545 b .Lcfu_finished 545 b .Lcfu_finished
546ENDPROC(__copy_from_user) 546ENDPROC(__copy_from_user)
547 547
548 .section .fixup,"ax" 548 .pushsection .fixup,"ax"
549 .align 0 549 .align 0
550 /* 550 /*
551 * We took an exception. r0 contains a pointer to 551 * We took an exception. r0 contains a pointer to
@@ -559,5 +559,5 @@ ENDPROC(__copy_from_user)
559 blne __memzero 559 blne __memzero
560 mov r0, r4 560 mov r0, r4
561 ldmfd sp!, {r4 - r7, pc} 561 ldmfd sp!, {r4 - r7, pc}
562 .previous 562 .popsection
563 563
diff --git a/arch/arm/lib/uaccess_with_memcpy.c b/arch/arm/lib/uaccess_with_memcpy.c
index 6b967ffb6552..e2d2f2cd0c4f 100644
--- a/arch/arm/lib/uaccess_with_memcpy.c
+++ b/arch/arm/lib/uaccess_with_memcpy.c
@@ -16,6 +16,7 @@
16#include <linux/mm.h> 16#include <linux/mm.h>
17#include <linux/sched.h> 17#include <linux/sched.h>
18#include <linux/hardirq.h> /* for in_atomic() */ 18#include <linux/hardirq.h> /* for in_atomic() */
19#include <linux/gfp.h>
19#include <asm/current.h> 20#include <asm/current.h>
20#include <asm/page.h> 21#include <asm/page.h>
21 22
diff --git a/arch/arm/mach-aaec2000/core.c b/arch/arm/mach-aaec2000/core.c
index b5c5fc6ba3a9..3ef68330452a 100644
--- a/arch/arm/mach-aaec2000/core.c
+++ b/arch/arm/mach-aaec2000/core.c
@@ -20,6 +20,7 @@
20#include <linux/timex.h> 20#include <linux/timex.h>
21#include <linux/signal.h> 21#include <linux/signal.h>
22#include <linux/clk.h> 22#include <linux/clk.h>
23#include <linux/gfp.h>
23 24
24#include <mach/hardware.h> 25#include <mach/hardware.h>
25#include <asm/irq.h> 26#include <asm/irq.h>
diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile
index 1df9ee1ba040..c1f821e58222 100644
--- a/arch/arm/mach-at91/Makefile
+++ b/arch/arm/mach-at91/Makefile
@@ -16,8 +16,8 @@ obj-$(CONFIG_ARCH_AT91SAM9261) += at91sam9261.o at91sam926x_time.o at91sam9261_d
16obj-$(CONFIG_ARCH_AT91SAM9G10) += at91sam9261.o at91sam926x_time.o at91sam9261_devices.o sam9_smc.o 16obj-$(CONFIG_ARCH_AT91SAM9G10) += at91sam9261.o at91sam926x_time.o at91sam9261_devices.o sam9_smc.o
17obj-$(CONFIG_ARCH_AT91SAM9263) += at91sam9263.o at91sam926x_time.o at91sam9263_devices.o sam9_smc.o 17obj-$(CONFIG_ARCH_AT91SAM9263) += at91sam9263.o at91sam926x_time.o at91sam9263_devices.o sam9_smc.o
18obj-$(CONFIG_ARCH_AT91SAM9RL) += at91sam9rl.o at91sam926x_time.o at91sam9rl_devices.o sam9_smc.o 18obj-$(CONFIG_ARCH_AT91SAM9RL) += at91sam9rl.o at91sam926x_time.o at91sam9rl_devices.o sam9_smc.o
19obj-$(CONFIG_ARCH_AT91SAM9G20) += at91sam9260.o at91sam926x_time.o at91sam9260_devices.o sam9_smc.o 19obj-$(CONFIG_ARCH_AT91SAM9G20) += at91sam9260.o at91sam926x_time.o at91sam9260_devices.o sam9_smc.o
20 obj-$(CONFIG_ARCH_AT91SAM9G45) += at91sam9g45.o at91sam926x_time.o at91sam9g45_devices.o sam9_smc.o 20obj-$(CONFIG_ARCH_AT91SAM9G45) += at91sam9g45.o at91sam926x_time.o at91sam9g45_devices.o sam9_smc.o
21obj-$(CONFIG_ARCH_AT91CAP9) += at91cap9.o at91sam926x_time.o at91cap9_devices.o sam9_smc.o 21obj-$(CONFIG_ARCH_AT91CAP9) += at91cap9.o at91sam926x_time.o at91cap9_devices.o sam9_smc.o
22obj-$(CONFIG_ARCH_AT572D940HF) += at572d940hf.o at91sam926x_time.o at572d940hf_devices.o sam9_smc.o 22obj-$(CONFIG_ARCH_AT572D940HF) += at572d940hf.o at91sam926x_time.o at572d940hf_devices.o sam9_smc.o
23obj-$(CONFIG_ARCH_AT91X40) += at91x40.o at91x40_time.o 23obj-$(CONFIG_ARCH_AT91X40) += at91x40.o at91x40_time.o
diff --git a/arch/arm/mach-at91/pm_slowclock.S b/arch/arm/mach-at91/pm_slowclock.S
index 987fab3d846a..9c5b48e68a71 100644
--- a/arch/arm/mach-at91/pm_slowclock.S
+++ b/arch/arm/mach-at91/pm_slowclock.S
@@ -175,8 +175,6 @@ ENTRY(at91_slow_clock)
175 orr r3, r3, #(1 << 29) /* bit 29 always set */ 175 orr r3, r3, #(1 << 29) /* bit 29 always set */
176 str r3, [r1, #(AT91_CKGR_PLLAR - AT91_PMC)] 176 str r3, [r1, #(AT91_CKGR_PLLAR - AT91_PMC)]
177 177
178 wait_pllalock
179
180 /* Save PLLB setting and disable it */ 178 /* Save PLLB setting and disable it */
181 ldr r3, [r1, #(AT91_CKGR_PLLBR - AT91_PMC)] 179 ldr r3, [r1, #(AT91_CKGR_PLLBR - AT91_PMC)]
182 str r3, .saved_pllbr 180 str r3, .saved_pllbr
@@ -184,8 +182,6 @@ ENTRY(at91_slow_clock)
184 mov r3, #AT91_PMC_PLLCOUNT 182 mov r3, #AT91_PMC_PLLCOUNT
185 str r3, [r1, #(AT91_CKGR_PLLBR - AT91_PMC)] 183 str r3, [r1, #(AT91_CKGR_PLLBR - AT91_PMC)]
186 184
187 wait_pllblock
188
189 /* Turn off the main oscillator */ 185 /* Turn off the main oscillator */
190 ldr r3, [r1, #(AT91_CKGR_MOR - AT91_PMC)] 186 ldr r3, [r1, #(AT91_CKGR_MOR - AT91_PMC)]
191 bic r3, r3, #AT91_PMC_MOSCEN 187 bic r3, r3, #AT91_PMC_MOSCEN
@@ -205,13 +201,25 @@ ENTRY(at91_slow_clock)
205 ldr r3, .saved_pllbr 201 ldr r3, .saved_pllbr
206 str r3, [r1, #(AT91_CKGR_PLLBR - AT91_PMC)] 202 str r3, [r1, #(AT91_CKGR_PLLBR - AT91_PMC)]
207 203
204 tst r3, #(AT91_PMC_MUL & 0xff0000)
205 bne 1f
206 tst r3, #(AT91_PMC_MUL & ~0xff0000)
207 beq 2f
2081:
208 wait_pllblock 209 wait_pllblock
2102:
209 211
210 /* Restore PLLA setting */ 212 /* Restore PLLA setting */
211 ldr r3, .saved_pllar 213 ldr r3, .saved_pllar
212 str r3, [r1, #(AT91_CKGR_PLLAR - AT91_PMC)] 214 str r3, [r1, #(AT91_CKGR_PLLAR - AT91_PMC)]
213 215
216 tst r3, #(AT91_PMC_MUL & 0xff0000)
217 bne 3f
218 tst r3, #(AT91_PMC_MUL & ~0xff0000)
219 beq 4f
2203:
214 wait_pllalock 221 wait_pllalock
2224:
215 223
216#ifdef SLOWDOWN_MASTER_CLOCK 224#ifdef SLOWDOWN_MASTER_CLOCK
217 /* 225 /*
diff --git a/arch/arm/mach-bcmring/dma.c b/arch/arm/mach-bcmring/dma.c
index 7b20fccb9d4e..29c0a911df26 100644
--- a/arch/arm/mach-bcmring/dma.c
+++ b/arch/arm/mach-bcmring/dma.c
@@ -28,6 +28,7 @@
28#include <linux/interrupt.h> 28#include <linux/interrupt.h>
29#include <linux/irqreturn.h> 29#include <linux/irqreturn.h>
30#include <linux/proc_fs.h> 30#include <linux/proc_fs.h>
31#include <linux/slab.h>
31 32
32#include <mach/timer.h> 33#include <mach/timer.h>
33 34
@@ -2220,11 +2221,15 @@ EXPORT_SYMBOL(dma_map_create_descriptor_ring);
2220int dma_unmap(DMA_MemMap_t *memMap, /* Stores state information about the map */ 2221int dma_unmap(DMA_MemMap_t *memMap, /* Stores state information about the map */
2221 int dirtied /* non-zero if any of the pages were modified */ 2222 int dirtied /* non-zero if any of the pages were modified */
2222 ) { 2223 ) {
2224
2225 int rc = 0;
2223 int regionIdx; 2226 int regionIdx;
2224 int segmentIdx; 2227 int segmentIdx;
2225 DMA_Region_t *region; 2228 DMA_Region_t *region;
2226 DMA_Segment_t *segment; 2229 DMA_Segment_t *segment;
2227 2230
2231 down(&memMap->lock);
2232
2228 for (regionIdx = 0; regionIdx < memMap->numRegionsUsed; regionIdx++) { 2233 for (regionIdx = 0; regionIdx < memMap->numRegionsUsed; regionIdx++) {
2229 region = &memMap->region[regionIdx]; 2234 region = &memMap->region[regionIdx];
2230 2235
@@ -2238,7 +2243,8 @@ int dma_unmap(DMA_MemMap_t *memMap, /* Stores state information about the map */
2238 printk(KERN_ERR 2243 printk(KERN_ERR
2239 "%s: vmalloc'd pages are not yet supported\n", 2244 "%s: vmalloc'd pages are not yet supported\n",
2240 __func__); 2245 __func__);
2241 return -EINVAL; 2246 rc = -EINVAL;
2247 goto out;
2242 } 2248 }
2243 2249
2244 case DMA_MEM_TYPE_KMALLOC: 2250 case DMA_MEM_TYPE_KMALLOC:
@@ -2275,7 +2281,8 @@ int dma_unmap(DMA_MemMap_t *memMap, /* Stores state information about the map */
2275 printk(KERN_ERR 2281 printk(KERN_ERR
2276 "%s: Unsupported memory type: %d\n", 2282 "%s: Unsupported memory type: %d\n",
2277 __func__, region->memType); 2283 __func__, region->memType);
2278 return -EINVAL; 2284 rc = -EINVAL;
2285 goto out;
2279 } 2286 }
2280 } 2287 }
2281 2288
@@ -2313,9 +2320,10 @@ int dma_unmap(DMA_MemMap_t *memMap, /* Stores state information about the map */
2313 memMap->numRegionsUsed = 0; 2320 memMap->numRegionsUsed = 0;
2314 memMap->inUse = 0; 2321 memMap->inUse = 0;
2315 2322
2323out:
2316 up(&memMap->lock); 2324 up(&memMap->lock);
2317 2325
2318 return 0; 2326 return rc;
2319} 2327}
2320 2328
2321EXPORT_SYMBOL(dma_unmap); 2329EXPORT_SYMBOL(dma_unmap);
diff --git a/arch/arm/mach-cns3xxx/Kconfig b/arch/arm/mach-cns3xxx/Kconfig
new file mode 100644
index 000000000000..9ebfcc46feb1
--- /dev/null
+++ b/arch/arm/mach-cns3xxx/Kconfig
@@ -0,0 +1,12 @@
1menu "CNS3XXX platform type"
2 depends on ARCH_CNS3XXX
3
4config MACH_CNS3420VB
5 bool "Support for CNS3420 Validation Board"
6 help
7 Include support for the Cavium Networks CNS3420 MPCore Platform
8 Baseboard.
9 This is a platform with an on-board ARM11 MPCore and has support
10 for USB, USB-OTG, MMC/SD/SDIO, SATA, PCI-E, etc.
11
12endmenu
diff --git a/arch/arm/mach-cns3xxx/Makefile b/arch/arm/mach-cns3xxx/Makefile
new file mode 100644
index 000000000000..427507a2d696
--- /dev/null
+++ b/arch/arm/mach-cns3xxx/Makefile
@@ -0,0 +1,2 @@
1obj-$(CONFIG_ARCH_CNS3XXX) += core.o pm.o
2obj-$(CONFIG_MACH_CNS3420VB) += cns3420vb.o
diff --git a/arch/arm/mach-cns3xxx/Makefile.boot b/arch/arm/mach-cns3xxx/Makefile.boot
new file mode 100644
index 000000000000..777012865220
--- /dev/null
+++ b/arch/arm/mach-cns3xxx/Makefile.boot
@@ -0,0 +1,3 @@
1 zreladdr-y := 0x00008000
2params_phys-y := 0x00000100
3initrd_phys-y := 0x00C00000
diff --git a/arch/arm/mach-cns3xxx/cns3420vb.c b/arch/arm/mach-cns3xxx/cns3420vb.c
new file mode 100644
index 000000000000..2e30c8288740
--- /dev/null
+++ b/arch/arm/mach-cns3xxx/cns3420vb.c
@@ -0,0 +1,148 @@
1/*
2 * Cavium Networks CNS3420 Validation Board
3 *
4 * Copyright 2000 Deep Blue Solutions Ltd
5 * Copyright 2008 ARM Limited
6 * Copyright 2008 Cavium Networks
7 * Scott Shu
8 * Copyright 2010 MontaVista Software, LLC.
9 * Anton Vorontsov <avorontsov@mvista.com>
10 *
11 * This file 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/kernel.h>
18#include <linux/compiler.h>
19#include <linux/io.h>
20#include <linux/serial_core.h>
21#include <linux/serial_8250.h>
22#include <linux/platform_device.h>
23#include <linux/mtd/mtd.h>
24#include <linux/mtd/physmap.h>
25#include <linux/mtd/partitions.h>
26#include <asm/setup.h>
27#include <asm/mach-types.h>
28#include <asm/mach/arch.h>
29#include <asm/mach/map.h>
30#include <asm/mach/time.h>
31#include <mach/hardware.h>
32#include <mach/cns3xxx.h>
33#include <mach/irqs.h>
34#include "core.h"
35
36/*
37 * NOR Flash
38 */
39static struct mtd_partition cns3420_nor_partitions[] = {
40 {
41 .name = "uboot",
42 .size = 0x00040000,
43 .offset = 0,
44 .mask_flags = MTD_WRITEABLE,
45 }, {
46 .name = "kernel",
47 .size = 0x004C0000,
48 .offset = MTDPART_OFS_APPEND,
49 }, {
50 .name = "filesystem",
51 .size = 0x7000000,
52 .offset = MTDPART_OFS_APPEND,
53 }, {
54 .name = "filesystem2",
55 .size = 0x0AE0000,
56 .offset = MTDPART_OFS_APPEND,
57 }, {
58 .name = "ubootenv",
59 .size = MTDPART_SIZ_FULL,
60 .offset = MTDPART_OFS_APPEND,
61 },
62};
63
64static struct physmap_flash_data cns3420_nor_pdata = {
65 .width = 2,
66 .parts = cns3420_nor_partitions,
67 .nr_parts = ARRAY_SIZE(cns3420_nor_partitions),
68};
69
70static struct resource cns3420_nor_res = {
71 .start = CNS3XXX_FLASH_BASE,
72 .end = CNS3XXX_FLASH_BASE + SZ_128M - 1,
73 .flags = IORESOURCE_MEM | IORESOURCE_MEM_32BIT,
74};
75
76static struct platform_device cns3420_nor_pdev = {
77 .name = "physmap-flash",
78 .id = 0,
79 .resource = &cns3420_nor_res,
80 .num_resources = 1,
81 .dev = {
82 .platform_data = &cns3420_nor_pdata,
83 },
84};
85
86/*
87 * UART
88 */
89static void __init cns3420_early_serial_setup(void)
90{
91#ifdef CONFIG_SERIAL_8250_CONSOLE
92 static struct uart_port cns3420_serial_port = {
93 .membase = (void __iomem *)CNS3XXX_UART0_BASE_VIRT,
94 .mapbase = CNS3XXX_UART0_BASE,
95 .irq = IRQ_CNS3XXX_UART0,
96 .iotype = UPIO_MEM,
97 .flags = UPF_BOOT_AUTOCONF | UPF_FIXED_TYPE,
98 .regshift = 2,
99 .uartclk = 24000000,
100 .line = 0,
101 .type = PORT_16550A,
102 .fifosize = 16,
103 };
104
105 early_serial_setup(&cns3420_serial_port);
106#endif
107}
108
109/*
110 * Initialization
111 */
112static struct platform_device *cns3420_pdevs[] __initdata = {
113 &cns3420_nor_pdev,
114};
115
116static void __init cns3420_init(void)
117{
118 platform_add_devices(cns3420_pdevs, ARRAY_SIZE(cns3420_pdevs));
119
120 pm_power_off = cns3xxx_power_off;
121}
122
123static struct map_desc cns3420_io_desc[] __initdata = {
124 {
125 .virtual = CNS3XXX_UART0_BASE_VIRT,
126 .pfn = __phys_to_pfn(CNS3XXX_UART0_BASE),
127 .length = SZ_4K,
128 .type = MT_DEVICE,
129 },
130};
131
132static void __init cns3420_map_io(void)
133{
134 cns3xxx_map_io();
135 iotable_init(cns3420_io_desc, ARRAY_SIZE(cns3420_io_desc));
136
137 cns3420_early_serial_setup();
138}
139
140MACHINE_START(CNS3420VB, "Cavium Networks CNS3420 Validation Board")
141 .phys_io = CNS3XXX_UART0_BASE,
142 .io_pg_offst = (CNS3XXX_UART0_BASE_VIRT >> 18) & 0xfffc,
143 .boot_params = 0x00000100,
144 .map_io = cns3420_map_io,
145 .init_irq = cns3xxx_init_irq,
146 .timer = &cns3xxx_timer,
147 .init_machine = cns3420_init,
148MACHINE_END
diff --git a/arch/arm/mach-cns3xxx/core.c b/arch/arm/mach-cns3xxx/core.c
new file mode 100644
index 000000000000..9ca4d581016f
--- /dev/null
+++ b/arch/arm/mach-cns3xxx/core.c
@@ -0,0 +1,249 @@
1/*
2 * Copyright 1999 - 2003 ARM Limited
3 * Copyright 2000 Deep Blue Solutions Ltd
4 * Copyright 2008 Cavium Networks
5 *
6 * This file is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License, Version 2, as
8 * published by the Free Software Foundation.
9 */
10
11#include <linux/init.h>
12#include <linux/interrupt.h>
13#include <linux/clockchips.h>
14#include <linux/io.h>
15#include <asm/mach/map.h>
16#include <asm/mach/time.h>
17#include <asm/mach/irq.h>
18#include <asm/hardware/gic.h>
19#include <mach/cns3xxx.h>
20#include "core.h"
21
22static struct map_desc cns3xxx_io_desc[] __initdata = {
23 {
24 .virtual = CNS3XXX_TC11MP_TWD_BASE_VIRT,
25 .pfn = __phys_to_pfn(CNS3XXX_TC11MP_TWD_BASE),
26 .length = SZ_4K,
27 .type = MT_DEVICE,
28 }, {
29 .virtual = CNS3XXX_TC11MP_GIC_CPU_BASE_VIRT,
30 .pfn = __phys_to_pfn(CNS3XXX_TC11MP_GIC_CPU_BASE),
31 .length = SZ_4K,
32 .type = MT_DEVICE,
33 }, {
34 .virtual = CNS3XXX_TC11MP_GIC_DIST_BASE_VIRT,
35 .pfn = __phys_to_pfn(CNS3XXX_TC11MP_GIC_DIST_BASE),
36 .length = SZ_4K,
37 .type = MT_DEVICE,
38 }, {
39 .virtual = CNS3XXX_TIMER1_2_3_BASE_VIRT,
40 .pfn = __phys_to_pfn(CNS3XXX_TIMER1_2_3_BASE),
41 .length = SZ_4K,
42 .type = MT_DEVICE,
43 }, {
44 .virtual = CNS3XXX_GPIOA_BASE_VIRT,
45 .pfn = __phys_to_pfn(CNS3XXX_GPIOA_BASE),
46 .length = SZ_4K,
47 .type = MT_DEVICE,
48 }, {
49 .virtual = CNS3XXX_GPIOB_BASE_VIRT,
50 .pfn = __phys_to_pfn(CNS3XXX_GPIOB_BASE),
51 .length = SZ_4K,
52 .type = MT_DEVICE,
53 }, {
54 .virtual = CNS3XXX_MISC_BASE_VIRT,
55 .pfn = __phys_to_pfn(CNS3XXX_MISC_BASE),
56 .length = SZ_4K,
57 .type = MT_DEVICE,
58 }, {
59 .virtual = CNS3XXX_PM_BASE_VIRT,
60 .pfn = __phys_to_pfn(CNS3XXX_PM_BASE),
61 .length = SZ_4K,
62 .type = MT_DEVICE,
63 },
64};
65
66void __init cns3xxx_map_io(void)
67{
68 iotable_init(cns3xxx_io_desc, ARRAY_SIZE(cns3xxx_io_desc));
69}
70
71/* used by entry-macro.S */
72void __iomem *gic_cpu_base_addr;
73
74void __init cns3xxx_init_irq(void)
75{
76 gic_cpu_base_addr = __io(CNS3XXX_TC11MP_GIC_CPU_BASE_VIRT);
77 gic_dist_init(0, __io(CNS3XXX_TC11MP_GIC_DIST_BASE_VIRT), 29);
78 gic_cpu_init(0, gic_cpu_base_addr);
79}
80
81void cns3xxx_power_off(void)
82{
83 u32 __iomem *pm_base = __io(CNS3XXX_PM_BASE_VIRT);
84 u32 clkctrl;
85
86 printk(KERN_INFO "powering system down...\n");
87
88 clkctrl = readl(pm_base + PM_SYS_CLK_CTRL_OFFSET);
89 clkctrl &= 0xfffff1ff;
90 clkctrl |= (0x5 << 9); /* Hibernate */
91 writel(clkctrl, pm_base + PM_SYS_CLK_CTRL_OFFSET);
92
93}
94
95/*
96 * Timer
97 */
98static void __iomem *cns3xxx_tmr1;
99
100static void cns3xxx_timer_set_mode(enum clock_event_mode mode,
101 struct clock_event_device *clk)
102{
103 unsigned long ctrl = readl(cns3xxx_tmr1 + TIMER1_2_CONTROL_OFFSET);
104 int pclk = cns3xxx_cpu_clock() / 8;
105 int reload;
106
107 switch (mode) {
108 case CLOCK_EVT_MODE_PERIODIC:
109 reload = pclk * 20 / (3 * HZ) * 0x25000;
110 writel(reload, cns3xxx_tmr1 + TIMER1_AUTO_RELOAD_OFFSET);
111 ctrl |= (1 << 0) | (1 << 2) | (1 << 9);
112 break;
113 case CLOCK_EVT_MODE_ONESHOT:
114 /* period set, and timer enabled in 'next_event' hook */
115 ctrl |= (1 << 2) | (1 << 9);
116 break;
117 case CLOCK_EVT_MODE_UNUSED:
118 case CLOCK_EVT_MODE_SHUTDOWN:
119 default:
120 ctrl = 0;
121 }
122
123 writel(ctrl, cns3xxx_tmr1 + TIMER1_2_CONTROL_OFFSET);
124}
125
126static int cns3xxx_timer_set_next_event(unsigned long evt,
127 struct clock_event_device *unused)
128{
129 unsigned long ctrl = readl(cns3xxx_tmr1 + TIMER1_2_CONTROL_OFFSET);
130
131 writel(evt, cns3xxx_tmr1 + TIMER1_AUTO_RELOAD_OFFSET);
132 writel(ctrl | (1 << 0), cns3xxx_tmr1 + TIMER1_2_CONTROL_OFFSET);
133
134 return 0;
135}
136
137static struct clock_event_device cns3xxx_tmr1_clockevent = {
138 .name = "cns3xxx timer1",
139 .shift = 8,
140 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
141 .set_mode = cns3xxx_timer_set_mode,
142 .set_next_event = cns3xxx_timer_set_next_event,
143 .rating = 350,
144 .cpumask = cpu_all_mask,
145};
146
147static void __init cns3xxx_clockevents_init(unsigned int timer_irq)
148{
149 cns3xxx_tmr1_clockevent.irq = timer_irq;
150 cns3xxx_tmr1_clockevent.mult =
151 div_sc((cns3xxx_cpu_clock() >> 3) * 1000000, NSEC_PER_SEC,
152 cns3xxx_tmr1_clockevent.shift);
153 cns3xxx_tmr1_clockevent.max_delta_ns =
154 clockevent_delta2ns(0xffffffff, &cns3xxx_tmr1_clockevent);
155 cns3xxx_tmr1_clockevent.min_delta_ns =
156 clockevent_delta2ns(0xf, &cns3xxx_tmr1_clockevent);
157
158 clockevents_register_device(&cns3xxx_tmr1_clockevent);
159}
160
161/*
162 * IRQ handler for the timer
163 */
164static irqreturn_t cns3xxx_timer_interrupt(int irq, void *dev_id)
165{
166 struct clock_event_device *evt = &cns3xxx_tmr1_clockevent;
167 u32 __iomem *stat = cns3xxx_tmr1 + TIMER1_2_INTERRUPT_STATUS_OFFSET;
168 u32 val;
169
170 /* Clear the interrupt */
171 val = readl(stat);
172 writel(val & ~(1 << 2), stat);
173
174 evt->event_handler(evt);
175
176 return IRQ_HANDLED;
177}
178
179static struct irqaction cns3xxx_timer_irq = {
180 .name = "timer",
181 .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
182 .handler = cns3xxx_timer_interrupt,
183};
184
185/*
186 * Set up the clock source and clock events devices
187 */
188static void __init __cns3xxx_timer_init(unsigned int timer_irq)
189{
190 u32 val;
191 u32 irq_mask;
192
193 /*
194 * Initialise to a known state (all timers off)
195 */
196
197 /* disable timer1 and timer2 */
198 writel(0, cns3xxx_tmr1 + TIMER1_2_CONTROL_OFFSET);
199 /* stop free running timer3 */
200 writel(0, cns3xxx_tmr1 + TIMER_FREERUN_CONTROL_OFFSET);
201
202 /* timer1 */
203 writel(0x5C800, cns3xxx_tmr1 + TIMER1_COUNTER_OFFSET);
204 writel(0x5C800, cns3xxx_tmr1 + TIMER1_AUTO_RELOAD_OFFSET);
205
206 writel(0, cns3xxx_tmr1 + TIMER1_MATCH_V1_OFFSET);
207 writel(0, cns3xxx_tmr1 + TIMER1_MATCH_V2_OFFSET);
208
209 /* mask irq, non-mask timer1 overflow */
210 irq_mask = readl(cns3xxx_tmr1 + TIMER1_2_INTERRUPT_MASK_OFFSET);
211 irq_mask &= ~(1 << 2);
212 irq_mask |= 0x03;
213 writel(irq_mask, cns3xxx_tmr1 + TIMER1_2_INTERRUPT_MASK_OFFSET);
214
215 /* down counter */
216 val = readl(cns3xxx_tmr1 + TIMER1_2_CONTROL_OFFSET);
217 val |= (1 << 9);
218 writel(val, cns3xxx_tmr1 + TIMER1_2_CONTROL_OFFSET);
219
220 /* timer2 */
221 writel(0, cns3xxx_tmr1 + TIMER2_MATCH_V1_OFFSET);
222 writel(0, cns3xxx_tmr1 + TIMER2_MATCH_V2_OFFSET);
223
224 /* mask irq */
225 irq_mask = readl(cns3xxx_tmr1 + TIMER1_2_INTERRUPT_MASK_OFFSET);
226 irq_mask |= ((1 << 3) | (1 << 4) | (1 << 5));
227 writel(irq_mask, cns3xxx_tmr1 + TIMER1_2_INTERRUPT_MASK_OFFSET);
228
229 /* down counter */
230 val = readl(cns3xxx_tmr1 + TIMER1_2_CONTROL_OFFSET);
231 val |= (1 << 10);
232 writel(val, cns3xxx_tmr1 + TIMER1_2_CONTROL_OFFSET);
233
234 /* Make irqs happen for the system timer */
235 setup_irq(timer_irq, &cns3xxx_timer_irq);
236
237 cns3xxx_clockevents_init(timer_irq);
238}
239
240static void __init cns3xxx_timer_init(void)
241{
242 cns3xxx_tmr1 = __io(CNS3XXX_TIMER1_2_3_BASE_VIRT);
243
244 __cns3xxx_timer_init(IRQ_CNS3XXX_TIMER0);
245}
246
247struct sys_timer cns3xxx_timer = {
248 .init = cns3xxx_timer_init,
249};
diff --git a/arch/arm/mach-cns3xxx/core.h b/arch/arm/mach-cns3xxx/core.h
new file mode 100644
index 000000000000..6b33ec11346e
--- /dev/null
+++ b/arch/arm/mach-cns3xxx/core.h
@@ -0,0 +1,23 @@
1/*
2 * Copyright 2000 Deep Blue Solutions Ltd
3 * Copyright 2004 ARM Limited
4 * Copyright 2008 Cavium Networks
5 *
6 * This file is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License, Version 2, as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __CNS3XXX_CORE_H
12#define __CNS3XXX_CORE_H
13
14extern void __iomem *gic_cpu_base_addr;
15extern struct sys_timer cns3xxx_timer;
16
17void __init cns3xxx_map_io(void);
18void __init cns3xxx_init_irq(void);
19void cns3xxx_power_off(void);
20void cns3xxx_pwr_power_up(unsigned int block);
21void cns3xxx_pwr_power_down(unsigned int block);
22
23#endif /* __CNS3XXX_CORE_H */
diff --git a/arch/arm/mach-cns3xxx/include/mach/cns3xxx.h b/arch/arm/mach-cns3xxx/include/mach/cns3xxx.h
new file mode 100644
index 000000000000..8a2f5a21d4ee
--- /dev/null
+++ b/arch/arm/mach-cns3xxx/include/mach/cns3xxx.h
@@ -0,0 +1,635 @@
1/*
2 * Copyright 2008 Cavium Networks
3 *
4 * This file 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
9#ifndef __MACH_BOARD_CNS3XXXH
10#define __MACH_BOARD_CNS3XXXH
11
12/*
13 * Memory map
14 */
15#define CNS3XXX_FLASH_BASE 0x10000000 /* Flash/SRAM Memory Bank 0 */
16#define CNS3XXX_FLASH_SIZE SZ_256M
17
18#define CNS3XXX_DDR2SDRAM_BASE 0x20000000 /* DDR2 SDRAM Memory */
19
20#define CNS3XXX_SPI_FLASH_BASE 0x60000000 /* SPI Serial Flash Memory */
21
22#define CNS3XXX_SWITCH_BASE 0x70000000 /* Switch and HNAT Control */
23#define CNS3XXX_SWITCH_BASE_VIRT 0xFFF00000
24
25#define CNS3XXX_PPE_BASE 0x70001000 /* HANT */
26#define CNS3XXX_PPE_BASE_VIRT 0xFFF50000
27
28#define CNS3XXX_EMBEDDED_SRAM_BASE 0x70002000 /* HANT Embedded SRAM */
29#define CNS3XXX_EMBEDDED_SRAM_BASE_VIRT 0xFFF60000
30
31#define CNS3XXX_SSP_BASE 0x71000000 /* Synchronous Serial Port - SPI/PCM/I2C */
32#define CNS3XXX_SSP_BASE_VIRT 0xFFF01000
33
34#define CNS3XXX_DMC_BASE 0x72000000 /* DMC Control (DDR2 SDRAM) */
35#define CNS3XXX_DMC_BASE_VIRT 0xFFF02000
36
37#define CNS3XXX_SMC_BASE 0x73000000 /* SMC Control */
38#define CNS3XXX_SMC_BASE_VIRT 0xFFF03000
39
40#define SMC_MEMC_STATUS_OFFSET 0x000
41#define SMC_MEMIF_CFG_OFFSET 0x004
42#define SMC_MEMC_CFG_SET_OFFSET 0x008
43#define SMC_MEMC_CFG_CLR_OFFSET 0x00C
44#define SMC_DIRECT_CMD_OFFSET 0x010
45#define SMC_SET_CYCLES_OFFSET 0x014
46#define SMC_SET_OPMODE_OFFSET 0x018
47#define SMC_REFRESH_PERIOD_0_OFFSET 0x020
48#define SMC_REFRESH_PERIOD_1_OFFSET 0x024
49#define SMC_SRAM_CYCLES0_0_OFFSET 0x100
50#define SMC_NAND_CYCLES0_0_OFFSET 0x100
51#define SMC_OPMODE0_0_OFFSET 0x104
52#define SMC_SRAM_CYCLES0_1_OFFSET 0x120
53#define SMC_NAND_CYCLES0_1_OFFSET 0x120
54#define SMC_OPMODE0_1_OFFSET 0x124
55#define SMC_USER_STATUS_OFFSET 0x200
56#define SMC_USER_CONFIG_OFFSET 0x204
57#define SMC_ECC_STATUS_OFFSET 0x300
58#define SMC_ECC_MEMCFG_OFFSET 0x304
59#define SMC_ECC_MEMCOMMAND1_OFFSET 0x308
60#define SMC_ECC_MEMCOMMAND2_OFFSET 0x30C
61#define SMC_ECC_ADDR0_OFFSET 0x310
62#define SMC_ECC_ADDR1_OFFSET 0x314
63#define SMC_ECC_VALUE0_OFFSET 0x318
64#define SMC_ECC_VALUE1_OFFSET 0x31C
65#define SMC_ECC_VALUE2_OFFSET 0x320
66#define SMC_ECC_VALUE3_OFFSET 0x324
67#define SMC_PERIPH_ID_0_OFFSET 0xFE0
68#define SMC_PERIPH_ID_1_OFFSET 0xFE4
69#define SMC_PERIPH_ID_2_OFFSET 0xFE8
70#define SMC_PERIPH_ID_3_OFFSET 0xFEC
71#define SMC_PCELL_ID_0_OFFSET 0xFF0
72#define SMC_PCELL_ID_1_OFFSET 0xFF4
73#define SMC_PCELL_ID_2_OFFSET 0xFF8
74#define SMC_PCELL_ID_3_OFFSET 0xFFC
75
76#define CNS3XXX_GPIOA_BASE 0x74000000 /* GPIO port A */
77#define CNS3XXX_GPIOA_BASE_VIRT 0xFFF04000
78
79#define CNS3XXX_GPIOB_BASE 0x74800000 /* GPIO port B */
80#define CNS3XXX_GPIOB_BASE_VIRT 0xFFF05000
81
82#define CNS3XXX_RTC_BASE 0x75000000 /* Real Time Clock */
83#define CNS3XXX_RTC_BASE_VIRT 0xFFF06000
84
85#define RTC_SEC_OFFSET 0x00
86#define RTC_MIN_OFFSET 0x04
87#define RTC_HOUR_OFFSET 0x08
88#define RTC_DAY_OFFSET 0x0C
89#define RTC_SEC_ALM_OFFSET 0x10
90#define RTC_MIN_ALM_OFFSET 0x14
91#define RTC_HOUR_ALM_OFFSET 0x18
92#define RTC_REC_OFFSET 0x1C
93#define RTC_CTRL_OFFSET 0x20
94#define RTC_INTR_STS_OFFSET 0x34
95
96#define CNS3XXX_MISC_BASE 0x76000000 /* Misc Control */
97#define CNS3XXX_MISC_BASE_VIRT 0xFFF07000 /* Misc Control */
98
99#define CNS3XXX_PM_BASE 0x77000000 /* Power Management Control */
100#define CNS3XXX_PM_BASE_VIRT 0xFFF08000
101
102#define PM_CLK_GATE_OFFSET 0x00
103#define PM_SOFT_RST_OFFSET 0x04
104#define PM_HS_CFG_OFFSET 0x08
105#define PM_CACTIVE_STA_OFFSET 0x0C
106#define PM_PWR_STA_OFFSET 0x10
107#define PM_SYS_CLK_CTRL_OFFSET 0x14
108#define PM_PLL_LCD_I2S_CTRL_OFFSET 0x18
109#define PM_PLL_HM_PD_OFFSET 0x1C
110
111#define CNS3XXX_UART0_BASE 0x78000000 /* UART 0 */
112#define CNS3XXX_UART0_BASE_VIRT 0xFFF09000
113
114#define CNS3XXX_UART1_BASE 0x78400000 /* UART 1 */
115#define CNS3XXX_UART1_BASE_VIRT 0xFFF0A000
116
117#define CNS3XXX_UART2_BASE 0x78800000 /* UART 2 */
118#define CNS3XXX_UART2_BASE_VIRT 0xFFF0B000
119
120#define CNS3XXX_DMAC_BASE 0x79000000 /* Generic DMA Control */
121#define CNS3XXX_DMAC_BASE_VIRT 0xFFF0D000
122
123#define CNS3XXX_CORESIGHT_BASE 0x7A000000 /* CoreSight */
124#define CNS3XXX_CORESIGHT_BASE_VIRT 0xFFF0E000
125
126#define CNS3XXX_CRYPTO_BASE 0x7B000000 /* Crypto */
127#define CNS3XXX_CRYPTO_BASE_VIRT 0xFFF0F000
128
129#define CNS3XXX_I2S_BASE 0x7C000000 /* I2S */
130#define CNS3XXX_I2S_BASE_VIRT 0xFFF10000
131
132#define CNS3XXX_TIMER1_2_3_BASE 0x7C800000 /* Timer */
133#define CNS3XXX_TIMER1_2_3_BASE_VIRT 0xFFF10800
134
135#define TIMER1_COUNTER_OFFSET 0x00
136#define TIMER1_AUTO_RELOAD_OFFSET 0x04
137#define TIMER1_MATCH_V1_OFFSET 0x08
138#define TIMER1_MATCH_V2_OFFSET 0x0C
139
140#define TIMER2_COUNTER_OFFSET 0x10
141#define TIMER2_AUTO_RELOAD_OFFSET 0x14
142#define TIMER2_MATCH_V1_OFFSET 0x18
143#define TIMER2_MATCH_V2_OFFSET 0x1C
144
145#define TIMER1_2_CONTROL_OFFSET 0x30
146#define TIMER1_2_INTERRUPT_STATUS_OFFSET 0x34
147#define TIMER1_2_INTERRUPT_MASK_OFFSET 0x38
148
149#define TIMER_FREERUN_OFFSET 0x40
150#define TIMER_FREERUN_CONTROL_OFFSET 0x44
151
152#define CNS3XXX_HCIE_BASE 0x7D000000 /* HCIE Control */
153#define CNS3XXX_HCIE_BASE_VIRT 0xFFF30000
154
155#define CNS3XXX_RAID_BASE 0x7E000000 /* RAID Control */
156#define CNS3XXX_RAID_BASE_VIRT 0xFFF12000
157
158#define CNS3XXX_AXI_IXC_BASE 0x7F000000 /* AXI IXC */
159#define CNS3XXX_AXI_IXC_BASE_VIRT 0xFFF13000
160
161#define CNS3XXX_CLCD_BASE 0x80000000 /* LCD Control */
162#define CNS3XXX_CLCD_BASE_VIRT 0xFFF14000
163
164#define CNS3XXX_USBOTG_BASE 0x81000000 /* USB OTG Control */
165#define CNS3XXX_USBOTG_BASE_VIRT 0xFFF15000
166
167#define CNS3XXX_USB_BASE 0x82000000 /* USB Host Control */
168#define CNS3XXX_USB_BASE_VIRT 0xFFF16000
169
170#define CNS3XXX_SATA2_BASE 0x83000000 /* SATA */
171#define CNS3XXX_SATA2_SIZE SZ_16M
172#define CNS3XXX_SATA2_BASE_VIRT 0xFFF17000
173
174#define CNS3XXX_CAMERA_BASE 0x84000000 /* Camera Interface */
175#define CNS3XXX_CAMERA_BASE_VIRT 0xFFF18000
176
177#define CNS3XXX_SDIO_BASE 0x85000000 /* SDIO */
178#define CNS3XXX_SDIO_BASE_VIRT 0xFFF19000
179
180#define CNS3XXX_I2S_TDM_BASE 0x86000000 /* I2S TDM */
181#define CNS3XXX_I2S_TDM_BASE_VIRT 0xFFF1A000
182
183#define CNS3XXX_2DG_BASE 0x87000000 /* 2D Graphic Control */
184#define CNS3XXX_2DG_BASE_VIRT 0xFFF1B000
185
186#define CNS3XXX_USB_OHCI_BASE 0x88000000 /* USB OHCI */
187#define CNS3XXX_USB_OHCI_BASE_VIRT 0xFFF1C000
188
189#define CNS3XXX_L2C_BASE 0x92000000 /* L2 Cache Control */
190#define CNS3XXX_L2C_BASE_VIRT 0xFFF27000
191
192#define CNS3XXX_PCIE0_MEM_BASE 0xA0000000 /* PCIe Port 0 IO/Memory Space */
193#define CNS3XXX_PCIE0_MEM_BASE_VIRT 0xE0000000
194
195#define CNS3XXX_PCIE0_HOST_BASE 0xAB000000 /* PCIe Port 0 RC Base */
196#define CNS3XXX_PCIE0_HOST_BASE_VIRT 0xE1000000
197
198#define CNS3XXX_PCIE0_IO_BASE 0xAC000000 /* PCIe Port 0 */
199#define CNS3XXX_PCIE0_IO_BASE_VIRT 0xE2000000
200
201#define CNS3XXX_PCIE0_CFG0_BASE 0xAD000000 /* PCIe Port 0 CFG Type 0 */
202#define CNS3XXX_PCIE0_CFG0_BASE_VIRT 0xE3000000
203
204#define CNS3XXX_PCIE0_CFG1_BASE 0xAE000000 /* PCIe Port 0 CFG Type 1 */
205#define CNS3XXX_PCIE0_CFG1_BASE_VIRT 0xE4000000
206
207#define CNS3XXX_PCIE0_MSG_BASE 0xAF000000 /* PCIe Port 0 Message Space */
208#define CNS3XXX_PCIE0_MSG_BASE_VIRT 0xE5000000
209
210#define CNS3XXX_PCIE1_MEM_BASE 0xB0000000 /* PCIe Port 1 IO/Memory Space */
211#define CNS3XXX_PCIE1_MEM_BASE_VIRT 0xE8000000
212
213#define CNS3XXX_PCIE1_HOST_BASE 0xBB000000 /* PCIe Port 1 RC Base */
214#define CNS3XXX_PCIE1_HOST_BASE_VIRT 0xE9000000
215
216#define CNS3XXX_PCIE1_IO_BASE 0xBC000000 /* PCIe Port 1 */
217#define CNS3XXX_PCIE1_IO_BASE_VIRT 0xEA000000
218
219#define CNS3XXX_PCIE1_CFG0_BASE 0xBD000000 /* PCIe Port 1 CFG Type 0 */
220#define CNS3XXX_PCIE1_CFG0_BASE_VIRT 0xEB000000
221
222#define CNS3XXX_PCIE1_CFG1_BASE 0xBE000000 /* PCIe Port 1 CFG Type 1 */
223#define CNS3XXX_PCIE1_CFG1_BASE_VIRT 0xEC000000
224
225#define CNS3XXX_PCIE1_MSG_BASE 0xBF000000 /* PCIe Port 1 Message Space */
226#define CNS3XXX_PCIE1_MSG_BASE_VIRT 0xED000000
227
228/*
229 * Testchip peripheral and fpga gic regions
230 */
231#define CNS3XXX_TC11MP_SCU_BASE 0x90000000 /* IRQ, Test chip */
232#define CNS3XXX_TC11MP_SCU_BASE_VIRT 0xFF000000
233
234#define CNS3XXX_TC11MP_GIC_CPU_BASE 0x90000100 /* Test chip interrupt controller CPU interface */
235#define CNS3XXX_TC11MP_GIC_CPU_BASE_VIRT 0xFF000100
236
237#define CNS3XXX_TC11MP_TWD_BASE 0x90000600
238#define CNS3XXX_TC11MP_TWD_BASE_VIRT 0xFF000600
239
240#define CNS3XXX_TC11MP_GIC_DIST_BASE 0x90001000 /* Test chip interrupt controller distributor */
241#define CNS3XXX_TC11MP_GIC_DIST_BASE_VIRT 0xFF001000
242
243#define CNS3XXX_TC11MP_L220_BASE 0x92002000 /* L220 registers */
244#define CNS3XXX_TC11MP_L220_BASE_VIRT 0xFF002000
245
246/*
247 * Misc block
248 */
249#define MISC_MEM_MAP(offs) (void __iomem *)(CNS3XXX_MISC_BASE_VIRT + (offs))
250#define MISC_MEM_MAP_VALUE(offset) (*((volatile unsigned int *)(CNS3XXX_MISC_BASE_VIRT + (offset))))
251
252#define MISC_MEMORY_REMAP_REG MISC_MEM_MAP_VALUE(0x00)
253#define MISC_CHIP_CONFIG_REG MISC_MEM_MAP_VALUE(0x04)
254#define MISC_DEBUG_PROBE_DATA_REG MISC_MEM_MAP_VALUE(0x08)
255#define MISC_DEBUG_PROBE_SELECTION_REG MISC_MEM_MAP_VALUE(0x0C)
256#define MISC_IO_PIN_FUNC_SELECTION_REG MISC_MEM_MAP_VALUE(0x10)
257#define MISC_GPIOA_PIN_ENABLE_REG MISC_MEM_MAP_VALUE(0x14)
258#define MISC_GPIOB_PIN_ENABLE_REG MISC_MEM_MAP_VALUE(0x18)
259#define MISC_IO_PAD_DRIVE_STRENGTH_CTRL_A MISC_MEM_MAP_VALUE(0x1C)
260#define MISC_IO_PAD_DRIVE_STRENGTH_CTRL_B MISC_MEM_MAP_VALUE(0x20)
261#define MISC_GPIOA_15_0_PULL_CTRL_REG MISC_MEM_MAP_VALUE(0x24)
262#define MISC_GPIOA_16_31_PULL_CTRL_REG MISC_MEM_MAP_VALUE(0x28)
263#define MISC_GPIOB_15_0_PULL_CTRL_REG MISC_MEM_MAP_VALUE(0x2C)
264#define MISC_GPIOB_16_31_PULL_CTRL_REG MISC_MEM_MAP_VALUE(0x30)
265#define MISC_IO_PULL_CTRL_REG MISC_MEM_MAP_VALUE(0x34)
266#define MISC_E_FUSE_31_0_REG MISC_MEM_MAP_VALUE(0x40)
267#define MISC_E_FUSE_63_32_REG MISC_MEM_MAP_VALUE(0x44)
268#define MISC_E_FUSE_95_64_REG MISC_MEM_MAP_VALUE(0x48)
269#define MISC_E_FUSE_127_96_REG MISC_MEM_MAP_VALUE(0x4C)
270#define MISC_SOFTWARE_TEST_1_REG MISC_MEM_MAP_VALUE(0x50)
271#define MISC_SOFTWARE_TEST_2_REG MISC_MEM_MAP_VALUE(0x54)
272
273#define MISC_SATA_POWER_MODE MISC_MEM_MAP_VALUE(0x310)
274
275#define MISC_USB_CFG_REG MISC_MEM_MAP_VALUE(0x800)
276#define MISC_USB_STS_REG MISC_MEM_MAP_VALUE(0x804)
277#define MISC_USBPHY00_CFG_REG MISC_MEM_MAP_VALUE(0x808)
278#define MISC_USBPHY01_CFG_REG MISC_MEM_MAP_VALUE(0x80c)
279#define MISC_USBPHY10_CFG_REG MISC_MEM_MAP_VALUE(0x810)
280#define MISC_USBPHY11_CFG_REG MISC_MEM_MAP_VALUE(0x814)
281
282#define MISC_PCIEPHY_CMCTL(x) MISC_MEM_MAP(0x900 + (x) * 0x004)
283#define MISC_PCIEPHY_CTL(x) MISC_MEM_MAP(0x940 + (x) * 0x100)
284#define MISC_PCIE_AXIS_AWMISC(x) MISC_MEM_MAP(0x944 + (x) * 0x100)
285#define MISC_PCIE_AXIS_ARMISC(x) MISC_MEM_MAP(0x948 + (x) * 0x100)
286#define MISC_PCIE_AXIS_RMISC(x) MISC_MEM_MAP(0x94C + (x) * 0x100)
287#define MISC_PCIE_AXIS_BMISC(x) MISC_MEM_MAP(0x950 + (x) * 0x100)
288#define MISC_PCIE_AXIM_RMISC(x) MISC_MEM_MAP(0x954 + (x) * 0x100)
289#define MISC_PCIE_AXIM_BMISC(x) MISC_MEM_MAP(0x958 + (x) * 0x100)
290#define MISC_PCIE_CTRL(x) MISC_MEM_MAP(0x95C + (x) * 0x100)
291#define MISC_PCIE_PM_DEBUG(x) MISC_MEM_MAP(0x960 + (x) * 0x100)
292#define MISC_PCIE_RFC_DEBUG(x) MISC_MEM_MAP(0x964 + (x) * 0x100)
293#define MISC_PCIE_CXPL_DEBUGL(x) MISC_MEM_MAP(0x968 + (x) * 0x100)
294#define MISC_PCIE_CXPL_DEBUGH(x) MISC_MEM_MAP(0x96C + (x) * 0x100)
295#define MISC_PCIE_DIAG_DEBUGH(x) MISC_MEM_MAP(0x970 + (x) * 0x100)
296#define MISC_PCIE_W1CLR(x) MISC_MEM_MAP(0x974 + (x) * 0x100)
297#define MISC_PCIE_INT_MASK(x) MISC_MEM_MAP(0x978 + (x) * 0x100)
298#define MISC_PCIE_INT_STATUS(x) MISC_MEM_MAP(0x97C + (x) * 0x100)
299
300/*
301 * Power management and clock control
302 */
303#define PMU_REG_VALUE(offset) (*((volatile unsigned int *)(CNS3XXX_PM_BASE_VIRT + (offset))))
304
305#define PM_CLK_GATE_REG PMU_REG_VALUE(0x000)
306#define PM_SOFT_RST_REG PMU_REG_VALUE(0x004)
307#define PM_HS_CFG_REG PMU_REG_VALUE(0x008)
308#define PM_CACTIVE_STA_REG PMU_REG_VALUE(0x00C)
309#define PM_PWR_STA_REG PMU_REG_VALUE(0x010)
310#define PM_CLK_CTRL_REG PMU_REG_VALUE(0x014)
311#define PM_PLL_LCD_I2S_CTRL_REG PMU_REG_VALUE(0x018)
312#define PM_PLL_HM_PD_CTRL_REG PMU_REG_VALUE(0x01C)
313#define PM_REGULAT_CTRL_REG PMU_REG_VALUE(0x020)
314#define PM_WDT_CTRL_REG PMU_REG_VALUE(0x024)
315#define PM_WU_CTRL0_REG PMU_REG_VALUE(0x028)
316#define PM_WU_CTRL1_REG PMU_REG_VALUE(0x02C)
317#define PM_CSR_REG PMU_REG_VALUE(0x030)
318
319/* PM_CLK_GATE_REG */
320#define PM_CLK_GATE_REG_OFFSET_SDIO (25)
321#define PM_CLK_GATE_REG_OFFSET_GPU (24)
322#define PM_CLK_GATE_REG_OFFSET_CIM (23)
323#define PM_CLK_GATE_REG_OFFSET_LCDC (22)
324#define PM_CLK_GATE_REG_OFFSET_I2S (21)
325#define PM_CLK_GATE_REG_OFFSET_RAID (20)
326#define PM_CLK_GATE_REG_OFFSET_SATA (19)
327#define PM_CLK_GATE_REG_OFFSET_PCIE(x) (17 + (x))
328#define PM_CLK_GATE_REG_OFFSET_USB_HOST (16)
329#define PM_CLK_GATE_REG_OFFSET_USB_OTG (15)
330#define PM_CLK_GATE_REG_OFFSET_TIMER (14)
331#define PM_CLK_GATE_REG_OFFSET_CRYPTO (13)
332#define PM_CLK_GATE_REG_OFFSET_HCIE (12)
333#define PM_CLK_GATE_REG_OFFSET_SWITCH (11)
334#define PM_CLK_GATE_REG_OFFSET_GPIO (10)
335#define PM_CLK_GATE_REG_OFFSET_UART3 (9)
336#define PM_CLK_GATE_REG_OFFSET_UART2 (8)
337#define PM_CLK_GATE_REG_OFFSET_UART1 (7)
338#define PM_CLK_GATE_REG_OFFSET_RTC (5)
339#define PM_CLK_GATE_REG_OFFSET_GDMA (4)
340#define PM_CLK_GATE_REG_OFFSET_SPI_PCM_I2C (3)
341#define PM_CLK_GATE_REG_OFFSET_SMC_NFI (1)
342#define PM_CLK_GATE_REG_MASK (0x03FFFFBA)
343
344/* PM_SOFT_RST_REG */
345#define PM_SOFT_RST_REG_OFFST_WARM_RST_FLAG (31)
346#define PM_SOFT_RST_REG_OFFST_CPU1 (29)
347#define PM_SOFT_RST_REG_OFFST_CPU0 (28)
348#define PM_SOFT_RST_REG_OFFST_SDIO (25)
349#define PM_SOFT_RST_REG_OFFST_GPU (24)
350#define PM_SOFT_RST_REG_OFFST_CIM (23)
351#define PM_SOFT_RST_REG_OFFST_LCDC (22)
352#define PM_SOFT_RST_REG_OFFST_I2S (21)
353#define PM_SOFT_RST_REG_OFFST_RAID (20)
354#define PM_SOFT_RST_REG_OFFST_SATA (19)
355#define PM_SOFT_RST_REG_OFFST_PCIE(x) (17 + (x))
356#define PM_SOFT_RST_REG_OFFST_USB_HOST (16)
357#define PM_SOFT_RST_REG_OFFST_USB_OTG (15)
358#define PM_SOFT_RST_REG_OFFST_TIMER (14)
359#define PM_SOFT_RST_REG_OFFST_CRYPTO (13)
360#define PM_SOFT_RST_REG_OFFST_HCIE (12)
361#define PM_SOFT_RST_REG_OFFST_SWITCH (11)
362#define PM_SOFT_RST_REG_OFFST_GPIO (10)
363#define PM_SOFT_RST_REG_OFFST_UART3 (9)
364#define PM_SOFT_RST_REG_OFFST_UART2 (8)
365#define PM_SOFT_RST_REG_OFFST_UART1 (7)
366#define PM_SOFT_RST_REG_OFFST_RTC (5)
367#define PM_SOFT_RST_REG_OFFST_GDMA (4)
368#define PM_SOFT_RST_REG_OFFST_SPI_PCM_I2C (3)
369#define PM_SOFT_RST_REG_OFFST_DMC (2)
370#define PM_SOFT_RST_REG_OFFST_SMC_NFI (1)
371#define PM_SOFT_RST_REG_OFFST_GLOBAL (0)
372#define PM_SOFT_RST_REG_MASK (0xF3FFFFBF)
373
374/* PMHS_CFG_REG */
375#define PM_HS_CFG_REG_OFFSET_SDIO (25)
376#define PM_HS_CFG_REG_OFFSET_GPU (24)
377#define PM_HS_CFG_REG_OFFSET_CIM (23)
378#define PM_HS_CFG_REG_OFFSET_LCDC (22)
379#define PM_HS_CFG_REG_OFFSET_I2S (21)
380#define PM_HS_CFG_REG_OFFSET_RAID (20)
381#define PM_HS_CFG_REG_OFFSET_SATA (19)
382#define PM_HS_CFG_REG_OFFSET_PCIE1 (18)
383#define PM_HS_CFG_REG_OFFSET_PCIE0 (17)
384#define PM_HS_CFG_REG_OFFSET_USB_HOST (16)
385#define PM_HS_CFG_REG_OFFSET_USB_OTG (15)
386#define PM_HS_CFG_REG_OFFSET_TIMER (14)
387#define PM_HS_CFG_REG_OFFSET_CRYPTO (13)
388#define PM_HS_CFG_REG_OFFSET_HCIE (12)
389#define PM_HS_CFG_REG_OFFSET_SWITCH (11)
390#define PM_HS_CFG_REG_OFFSET_GPIO (10)
391#define PM_HS_CFG_REG_OFFSET_UART3 (9)
392#define PM_HS_CFG_REG_OFFSET_UART2 (8)
393#define PM_HS_CFG_REG_OFFSET_UART1 (7)
394#define PM_HS_CFG_REG_OFFSET_RTC (5)
395#define PM_HS_CFG_REG_OFFSET_GDMA (4)
396#define PM_HS_CFG_REG_OFFSET_SPI_PCM_I2S (3)
397#define PM_HS_CFG_REG_OFFSET_DMC (2)
398#define PM_HS_CFG_REG_OFFSET_SMC_NFI (1)
399#define PM_HS_CFG_REG_MASK (0x03FFFFBE)
400#define PM_HS_CFG_REG_MASK_SUPPORT (0x01100806)
401
402/* PM_CACTIVE_STA_REG */
403#define PM_CACTIVE_STA_REG_OFFSET_SDIO (25)
404#define PM_CACTIVE_STA_REG_OFFSET_GPU (24)
405#define PM_CACTIVE_STA_REG_OFFSET_CIM (23)
406#define PM_CACTIVE_STA_REG_OFFSET_LCDC (22)
407#define PM_CACTIVE_STA_REG_OFFSET_I2S (21)
408#define PM_CACTIVE_STA_REG_OFFSET_RAID (20)
409#define PM_CACTIVE_STA_REG_OFFSET_SATA (19)
410#define PM_CACTIVE_STA_REG_OFFSET_PCIE1 (18)
411#define PM_CACTIVE_STA_REG_OFFSET_PCIE0 (17)
412#define PM_CACTIVE_STA_REG_OFFSET_USB_HOST (16)
413#define PM_CACTIVE_STA_REG_OFFSET_USB_OTG (15)
414#define PM_CACTIVE_STA_REG_OFFSET_TIMER (14)
415#define PM_CACTIVE_STA_REG_OFFSET_CRYPTO (13)
416#define PM_CACTIVE_STA_REG_OFFSET_HCIE (12)
417#define PM_CACTIVE_STA_REG_OFFSET_SWITCH (11)
418#define PM_CACTIVE_STA_REG_OFFSET_GPIO (10)
419#define PM_CACTIVE_STA_REG_OFFSET_UART3 (9)
420#define PM_CACTIVE_STA_REG_OFFSET_UART2 (8)
421#define PM_CACTIVE_STA_REG_OFFSET_UART1 (7)
422#define PM_CACTIVE_STA_REG_OFFSET_RTC (5)
423#define PM_CACTIVE_STA_REG_OFFSET_GDMA (4)
424#define PM_CACTIVE_STA_REG_OFFSET_SPI_PCM_I2S (3)
425#define PM_CACTIVE_STA_REG_OFFSET_DMC (2)
426#define PM_CACTIVE_STA_REG_OFFSET_SMC_NFI (1)
427#define PM_CACTIVE_STA_REG_MASK (0x03FFFFBE)
428
429/* PM_PWR_STA_REG */
430#define PM_PWR_STA_REG_REG_OFFSET_SDIO (25)
431#define PM_PWR_STA_REG_REG_OFFSET_GPU (24)
432#define PM_PWR_STA_REG_REG_OFFSET_CIM (23)
433#define PM_PWR_STA_REG_REG_OFFSET_LCDC (22)
434#define PM_PWR_STA_REG_REG_OFFSET_I2S (21)
435#define PM_PWR_STA_REG_REG_OFFSET_RAID (20)
436#define PM_PWR_STA_REG_REG_OFFSET_SATA (19)
437#define PM_PWR_STA_REG_REG_OFFSET_PCIE1 (18)
438#define PM_PWR_STA_REG_REG_OFFSET_PCIE0 (17)
439#define PM_PWR_STA_REG_REG_OFFSET_USB_HOST (16)
440#define PM_PWR_STA_REG_REG_OFFSET_USB_OTG (15)
441#define PM_PWR_STA_REG_REG_OFFSET_TIMER (14)
442#define PM_PWR_STA_REG_REG_OFFSET_CRYPTO (13)
443#define PM_PWR_STA_REG_REG_OFFSET_HCIE (12)
444#define PM_PWR_STA_REG_REG_OFFSET_SWITCH (11)
445#define PM_PWR_STA_REG_REG_OFFSET_GPIO (10)
446#define PM_PWR_STA_REG_REG_OFFSET_UART3 (9)
447#define PM_PWR_STA_REG_REG_OFFSET_UART2 (8)
448#define PM_PWR_STA_REG_REG_OFFSET_UART1 (7)
449#define PM_PWR_STA_REG_REG_OFFSET_RTC (5)
450#define PM_PWR_STA_REG_REG_OFFSET_GDMA (4)
451#define PM_PWR_STA_REG_REG_OFFSET_SPI_PCM_I2S (3)
452#define PM_PWR_STA_REG_REG_OFFSET_DMC (2)
453#define PM_PWR_STA_REG_REG_OFFSET_SMC_NFI (1)
454#define PM_PWR_STA_REG_REG_MASK (0x03FFFFBE)
455
456/* PM_CLK_CTRL_REG */
457#define PM_CLK_CTRL_REG_OFFSET_I2S_MCLK (31)
458#define PM_CLK_CTRL_REG_OFFSET_DDR2_CHG_EN (30)
459#define PM_CLK_CTRL_REG_OFFSET_PCIE_REF1_EN (29)
460#define PM_CLK_CTRL_REG_OFFSET_PCIE_REF0_EN (28)
461#define PM_CLK_CTRL_REG_OFFSET_TIMER_SIM_MODE (27)
462#define PM_CLK_CTRL_REG_OFFSET_I2SCLK_DIV (24)
463#define PM_CLK_CTRL_REG_OFFSET_I2SCLK_SEL (22)
464#define PM_CLK_CTRL_REG_OFFSET_CLKOUT_DIV (20)
465#define PM_CLK_CTRL_REG_OFFSET_CLKOUT_SEL (16)
466#define PM_CLK_CTRL_REG_OFFSET_MDC_DIV (14)
467#define PM_CLK_CTRL_REG_OFFSET_CRYPTO_CLK_SEL (12)
468#define PM_CLK_CTRL_REG_OFFSET_CPU_PWR_MODE (9)
469#define PM_CLK_CTRL_REG_OFFSET_PLL_DDR2_SEL (7)
470#define PM_CLK_CTRL_REG_OFFSET_DIV_IMMEDIATE (6)
471#define PM_CLK_CTRL_REG_OFFSET_CPU_CLK_DIV (4)
472#define PM_CLK_CTRL_REG_OFFSET_PLL_CPU_SEL (0)
473
474#define PM_CPU_CLK_DIV(DIV) { \
475 PM_CLK_CTRL_REG &= ~((0x3) << PM_CLK_CTRL_REG_OFFSET_CPU_CLK_DIV); \
476 PM_CLK_CTRL_REG |= (((DIV)&0x3) << PM_CLK_CTRL_REG_OFFSET_CPU_CLK_DIV); \
477}
478
479#define PM_PLL_CPU_SEL(CPU) { \
480 PM_CLK_CTRL_REG &= ~((0xF) << PM_CLK_CTRL_REG_OFFSET_PLL_CPU_SEL); \
481 PM_CLK_CTRL_REG |= (((CPU)&0xF) << PM_CLK_CTRL_REG_OFFSET_PLL_CPU_SEL); \
482}
483
484/* PM_PLL_LCD_I2S_CTRL_REG */
485#define PM_PLL_LCD_I2S_CTRL_REG_OFFSET_MCLK_SMC_DIV (22)
486#define PM_PLL_LCD_I2S_CTRL_REG_OFFSET_R_SEL (17)
487#define PM_PLL_LCD_I2S_CTRL_REG_OFFSET_PLL_LCD_P (11)
488#define PM_PLL_LCD_I2S_CTRL_REG_OFFSET_PLL_LCD_M (3)
489#define PM_PLL_LCD_I2S_CTRL_REG_OFFSET_PLL_LCD_S (0)
490
491/* PM_PLL_HM_PD_CTRL_REG */
492#define PM_PLL_HM_PD_CTRL_REG_OFFSET_SATA_PHY1 (11)
493#define PM_PLL_HM_PD_CTRL_REG_OFFSET_SATA_PHY0 (10)
494#define PM_PLL_HM_PD_CTRL_REG_OFFSET_PLL_I2SCD (6)
495#define PM_PLL_HM_PD_CTRL_REG_OFFSET_PLL_I2S (5)
496#define PM_PLL_HM_PD_CTRL_REG_OFFSET_PLL_LCD (4)
497#define PM_PLL_HM_PD_CTRL_REG_OFFSET_PLL_USB (3)
498#define PM_PLL_HM_PD_CTRL_REG_OFFSET_PLL_RGMII (2)
499#define PM_PLL_HM_PD_CTRL_REG_MASK (0x00000C7C)
500
501/* PM_WDT_CTRL_REG */
502#define PM_WDT_CTRL_REG_OFFSET_RESET_CPU_ONLY (0)
503
504/* PM_CSR_REG - Clock Scaling Register*/
505#define PM_CSR_REG_OFFSET_CSR_EN (30)
506#define PM_CSR_REG_OFFSET_CSR_NUM (0)
507
508#define CNS3XXX_PWR_CLK_EN(BLOCK) (0x1<<PM_CLK_GATE_REG_OFFSET_##BLOCK)
509
510/* Software reset*/
511#define CNS3XXX_PWR_SOFTWARE_RST(BLOCK) (0x1<<PM_SOFT_RST_REG_OFFST_##BLOCK)
512
513/*
514 * CNS3XXX support several power saving mode as following,
515 * DFS, IDLE, HALT, DOZE, SLEEP, Hibernate
516 */
517#define CNS3XXX_PWR_CPU_MODE_DFS (0)
518#define CNS3XXX_PWR_CPU_MODE_IDLE (1)
519#define CNS3XXX_PWR_CPU_MODE_HALT (2)
520#define CNS3XXX_PWR_CPU_MODE_DOZE (3)
521#define CNS3XXX_PWR_CPU_MODE_SLEEP (4)
522#define CNS3XXX_PWR_CPU_MODE_HIBERNATE (5)
523
524#define CNS3XXX_PWR_PLL(BLOCK) (0x1<<PM_PLL_HM_PD_CTRL_REG_OFFSET_##BLOCK)
525#define CNS3XXX_PWR_PLL_ALL PM_PLL_HM_PD_CTRL_REG_MASK
526
527/* Change CPU frequency and divider */
528#define CNS3XXX_PWR_PLL_CPU_300MHZ (0)
529#define CNS3XXX_PWR_PLL_CPU_333MHZ (1)
530#define CNS3XXX_PWR_PLL_CPU_366MHZ (2)
531#define CNS3XXX_PWR_PLL_CPU_400MHZ (3)
532#define CNS3XXX_PWR_PLL_CPU_433MHZ (4)
533#define CNS3XXX_PWR_PLL_CPU_466MHZ (5)
534#define CNS3XXX_PWR_PLL_CPU_500MHZ (6)
535#define CNS3XXX_PWR_PLL_CPU_533MHZ (7)
536#define CNS3XXX_PWR_PLL_CPU_566MHZ (8)
537#define CNS3XXX_PWR_PLL_CPU_600MHZ (9)
538#define CNS3XXX_PWR_PLL_CPU_633MHZ (10)
539#define CNS3XXX_PWR_PLL_CPU_666MHZ (11)
540#define CNS3XXX_PWR_PLL_CPU_700MHZ (12)
541
542#define CNS3XXX_PWR_CPU_CLK_DIV_BY1 (0)
543#define CNS3XXX_PWR_CPU_CLK_DIV_BY2 (1)
544#define CNS3XXX_PWR_CPU_CLK_DIV_BY4 (2)
545
546/* Change DDR2 frequency */
547#define CNS3XXX_PWR_PLL_DDR2_200MHZ (0)
548#define CNS3XXX_PWR_PLL_DDR2_266MHZ (1)
549#define CNS3XXX_PWR_PLL_DDR2_333MHZ (2)
550#define CNS3XXX_PWR_PLL_DDR2_400MHZ (3)
551
552void cns3xxx_pwr_soft_rst(unsigned int block);
553void cns3xxx_pwr_clk_en(unsigned int block);
554int cns3xxx_cpu_clock(void);
555
556/*
557 * ARM11 MPCore interrupt sources (primary GIC)
558 */
559#define IRQ_CNS3XXX_PMU (IRQ_TC11MP_GIC_START + 0)
560#define IRQ_CNS3XXX_SDIO (IRQ_TC11MP_GIC_START + 1)
561#define IRQ_CNS3XXX_L2CC (IRQ_TC11MP_GIC_START + 2)
562#define IRQ_CNS3XXX_RTC (IRQ_TC11MP_GIC_START + 3)
563#define IRQ_CNS3XXX_I2S (IRQ_TC11MP_GIC_START + 4)
564#define IRQ_CNS3XXX_PCM (IRQ_TC11MP_GIC_START + 5)
565#define IRQ_CNS3XXX_SPI (IRQ_TC11MP_GIC_START + 6)
566#define IRQ_CNS3XXX_I2C (IRQ_TC11MP_GIC_START + 7)
567#define IRQ_CNS3XXX_CIM (IRQ_TC11MP_GIC_START + 8)
568#define IRQ_CNS3XXX_GPU (IRQ_TC11MP_GIC_START + 9)
569#define IRQ_CNS3XXX_LCD (IRQ_TC11MP_GIC_START + 10)
570#define IRQ_CNS3XXX_GPIOA (IRQ_TC11MP_GIC_START + 11)
571#define IRQ_CNS3XXX_GPIOB (IRQ_TC11MP_GIC_START + 12)
572#define IRQ_CNS3XXX_UART0 (IRQ_TC11MP_GIC_START + 13)
573#define IRQ_CNS3XXX_UART1 (IRQ_TC11MP_GIC_START + 14)
574#define IRQ_CNS3XXX_UART2 (IRQ_TC11MP_GIC_START + 15)
575#define IRQ_CNS3XXX_ARM11 (IRQ_TC11MP_GIC_START + 16)
576
577#define IRQ_CNS3XXX_SW_STATUS (IRQ_TC11MP_GIC_START + 17)
578#define IRQ_CNS3XXX_SW_R0TXC (IRQ_TC11MP_GIC_START + 18)
579#define IRQ_CNS3XXX_SW_R0RXC (IRQ_TC11MP_GIC_START + 19)
580#define IRQ_CNS3XXX_SW_R0QE (IRQ_TC11MP_GIC_START + 20)
581#define IRQ_CNS3XXX_SW_R0QF (IRQ_TC11MP_GIC_START + 21)
582#define IRQ_CNS3XXX_SW_R1TXC (IRQ_TC11MP_GIC_START + 22)
583#define IRQ_CNS3XXX_SW_R1RXC (IRQ_TC11MP_GIC_START + 23)
584#define IRQ_CNS3XXX_SW_R1QE (IRQ_TC11MP_GIC_START + 24)
585#define IRQ_CNS3XXX_SW_R1QF (IRQ_TC11MP_GIC_START + 25)
586#define IRQ_CNS3XXX_SW_PPE (IRQ_TC11MP_GIC_START + 26)
587
588#define IRQ_CNS3XXX_CRYPTO (IRQ_TC11MP_GIC_START + 27)
589#define IRQ_CNS3XXX_HCIE (IRQ_TC11MP_GIC_START + 28)
590#define IRQ_CNS3XXX_PCIE0_DEVICE (IRQ_TC11MP_GIC_START + 29)
591#define IRQ_CNS3XXX_PCIE1_DEVICE (IRQ_TC11MP_GIC_START + 30)
592#define IRQ_CNS3XXX_USB_OTG (IRQ_TC11MP_GIC_START + 31)
593#define IRQ_CNS3XXX_USB_EHCI (IRQ_TC11MP_GIC_START + 32)
594#define IRQ_CNS3XXX_SATA (IRQ_TC11MP_GIC_START + 33)
595#define IRQ_CNS3XXX_RAID (IRQ_TC11MP_GIC_START + 34)
596#define IRQ_CNS3XXX_SMC (IRQ_TC11MP_GIC_START + 35)
597
598#define IRQ_CNS3XXX_DMAC_ABORT (IRQ_TC11MP_GIC_START + 36)
599#define IRQ_CNS3XXX_DMAC0 (IRQ_TC11MP_GIC_START + 37)
600#define IRQ_CNS3XXX_DMAC1 (IRQ_TC11MP_GIC_START + 38)
601#define IRQ_CNS3XXX_DMAC2 (IRQ_TC11MP_GIC_START + 39)
602#define IRQ_CNS3XXX_DMAC3 (IRQ_TC11MP_GIC_START + 40)
603#define IRQ_CNS3XXX_DMAC4 (IRQ_TC11MP_GIC_START + 41)
604#define IRQ_CNS3XXX_DMAC5 (IRQ_TC11MP_GIC_START + 42)
605#define IRQ_CNS3XXX_DMAC6 (IRQ_TC11MP_GIC_START + 43)
606#define IRQ_CNS3XXX_DMAC7 (IRQ_TC11MP_GIC_START + 44)
607#define IRQ_CNS3XXX_DMAC8 (IRQ_TC11MP_GIC_START + 45)
608#define IRQ_CNS3XXX_DMAC9 (IRQ_TC11MP_GIC_START + 46)
609#define IRQ_CNS3XXX_DMAC10 (IRQ_TC11MP_GIC_START + 47)
610#define IRQ_CNS3XXX_DMAC11 (IRQ_TC11MP_GIC_START + 48)
611#define IRQ_CNS3XXX_DMAC12 (IRQ_TC11MP_GIC_START + 49)
612#define IRQ_CNS3XXX_DMAC13 (IRQ_TC11MP_GIC_START + 50)
613#define IRQ_CNS3XXX_DMAC14 (IRQ_TC11MP_GIC_START + 51)
614#define IRQ_CNS3XXX_DMAC15 (IRQ_TC11MP_GIC_START + 52)
615#define IRQ_CNS3XXX_DMAC16 (IRQ_TC11MP_GIC_START + 53)
616#define IRQ_CNS3XXX_DMAC17 (IRQ_TC11MP_GIC_START + 54)
617
618#define IRQ_CNS3XXX_PCIE0_RC (IRQ_TC11MP_GIC_START + 55)
619#define IRQ_CNS3XXX_PCIE1_RC (IRQ_TC11MP_GIC_START + 56)
620#define IRQ_CNS3XXX_TIMER0 (IRQ_TC11MP_GIC_START + 57)
621#define IRQ_CNS3XXX_TIMER1 (IRQ_TC11MP_GIC_START + 58)
622#define IRQ_CNS3XXX_USB_OHCI (IRQ_TC11MP_GIC_START + 59)
623#define IRQ_CNS3XXX_TIMER2 (IRQ_TC11MP_GIC_START + 60)
624#define IRQ_CNS3XXX_EXTERNAL_PIN0 (IRQ_TC11MP_GIC_START + 61)
625#define IRQ_CNS3XXX_EXTERNAL_PIN1 (IRQ_TC11MP_GIC_START + 62)
626#define IRQ_CNS3XXX_EXTERNAL_PIN2 (IRQ_TC11MP_GIC_START + 63)
627
628#define NR_IRQS_CNS3XXX (IRQ_TC11MP_GIC_START + 64)
629
630#if !defined(NR_IRQS) || (NR_IRQS < NR_IRQS_CNS3XXX)
631#undef NR_IRQS
632#define NR_IRQS NR_IRQS_CNS3XXX
633#endif
634
635#endif /* __MACH_BOARD_CNS3XXX_H */
diff --git a/arch/arm/mach-cns3xxx/include/mach/debug-macro.S b/arch/arm/mach-cns3xxx/include/mach/debug-macro.S
new file mode 100644
index 000000000000..d16ce7eb00e9
--- /dev/null
+++ b/arch/arm/mach-cns3xxx/include/mach/debug-macro.S
@@ -0,0 +1,21 @@
1/*
2 * Debugging macro include header
3 *
4 * Copyright 1994-1999 Russell King
5 * Copyright 2008 Cavium Networks
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7 *
8 * This file 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 .macro addruart,rx
14 mrc p15, 0, \rx, c1, c0
15 tst \rx, #1 @ MMU enabled?
16 moveq \rx, #0x10000000
17 movne \rx, #0xf0000000 @ virtual base
18 orr \rx, \rx, #0x00009000
19 .endm
20
21#include <asm/hardware/debug-pl01x.S>
diff --git a/arch/arm/mach-cns3xxx/include/mach/entry-macro.S b/arch/arm/mach-cns3xxx/include/mach/entry-macro.S
new file mode 100644
index 000000000000..5e1c5545680f
--- /dev/null
+++ b/arch/arm/mach-cns3xxx/include/mach/entry-macro.S
@@ -0,0 +1,82 @@
1/*
2 * Low-level IRQ helper macros for Cavium Networks platforms
3 *
4 * Copyright 2008 Cavium Networks
5 *
6 * This file is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License, Version 2, as
8 * published by the Free Software Foundation.
9 */
10
11#include <mach/hardware.h>
12#include <asm/hardware/gic.h>
13
14 .macro disable_fiq
15 .endm
16
17 .macro get_irqnr_preamble, base, tmp
18 ldr \base, =gic_cpu_base_addr
19 ldr \base, [\base]
20 .endm
21
22 .macro arch_ret_to_user, tmp1, tmp2
23 .endm
24
25 /*
26 * The interrupt numbering scheme is defined in the
27 * interrupt controller spec. To wit:
28 *
29 * Interrupts 0-15 are IPI
30 * 16-28 are reserved
31 * 29-31 are local. We allow 30 to be used for the watchdog.
32 * 32-1020 are global
33 * 1021-1022 are reserved
34 * 1023 is "spurious" (no interrupt)
35 *
36 * For now, we ignore all local interrupts so only return an interrupt if it's
37 * between 30 and 1020. The test_for_ipi routine below will pick up on IPIs.
38 *
39 * A simple read from the controller will tell us the number of the highest
40 * priority enabled interrupt. We then just need to check whether it is in the
41 * valid range for an IRQ (30-1020 inclusive).
42 */
43
44 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
45
46 ldr \irqstat, [\base, #GIC_CPU_INTACK] /* bits 12-10 = src CPU, 9-0 = int # */
47
48 ldr \tmp, =1021
49
50 bic \irqnr, \irqstat, #0x1c00
51
52 cmp \irqnr, #29
53 cmpcc \irqnr, \irqnr
54 cmpne \irqnr, \tmp
55 cmpcs \irqnr, \irqnr
56
57 .endm
58
59 /* We assume that irqstat (the raw value of the IRQ acknowledge
60 * register) is preserved from the macro above.
61 * If there is an IPI, we immediately signal end of interrupt on the
62 * controller, since this requires the original irqstat value which
63 * we won't easily be able to recreate later.
64 */
65
66 .macro test_for_ipi, irqnr, irqstat, base, tmp
67 bic \irqnr, \irqstat, #0x1c00
68 cmp \irqnr, #16
69 strcc \irqstat, [\base, #GIC_CPU_EOI]
70 cmpcs \irqnr, \irqnr
71 .endm
72
73 /* As above, this assumes that irqstat and base are preserved.. */
74
75 .macro test_for_ltirq, irqnr, irqstat, base, tmp
76 bic \irqnr, \irqstat, #0x1c00
77 mov \tmp, #0
78 cmp \irqnr, #29
79 moveq \tmp, #1
80 streq \irqstat, [\base, #GIC_CPU_EOI]
81 cmp \tmp, #0
82 .endm
diff --git a/arch/arm/mach-cns3xxx/include/mach/hardware.h b/arch/arm/mach-cns3xxx/include/mach/hardware.h
new file mode 100644
index 000000000000..57e09836f9d7
--- /dev/null
+++ b/arch/arm/mach-cns3xxx/include/mach/hardware.h
@@ -0,0 +1,22 @@
1/*
2 * This file contains the hardware definitions of the Cavium Networks boards.
3 *
4 * Copyright 2003 ARM Limited.
5 * Copyright 2008 Cavium Networks
6 *
7 * This file 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 __MACH_HARDWARE_H
13#define __MACH_HARDWARE_H
14
15#include <asm/sizes.h>
16
17/* macro to get at IO space when running virtually */
18#define PCIBIOS_MIN_IO 0x00000000
19#define PCIBIOS_MIN_MEM 0x00000000
20#define pcibios_assign_all_busses() 1
21
22#endif
diff --git a/arch/arm/mach-cns3xxx/include/mach/io.h b/arch/arm/mach-cns3xxx/include/mach/io.h
new file mode 100644
index 000000000000..33b6fc1ece7c
--- /dev/null
+++ b/arch/arm/mach-cns3xxx/include/mach/io.h
@@ -0,0 +1,17 @@
1/*
2 * Copyright 2008 Cavium Networks
3 * Copyright 2003 ARM Limited
4 *
5 * This file is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License, Version 2, as
7 * published by the Free Software Foundation.
8 */
9#ifndef __MACH_IO_H
10#define __MACH_IO_H
11
12#define IO_SPACE_LIMIT 0xffffffff
13
14#define __io(a) __typesafe_io(a)
15#define __mem_pci(a) (a)
16
17#endif
diff --git a/arch/arm/mach-cns3xxx/include/mach/irqs.h b/arch/arm/mach-cns3xxx/include/mach/irqs.h
new file mode 100644
index 000000000000..2ab96f8085c8
--- /dev/null
+++ b/arch/arm/mach-cns3xxx/include/mach/irqs.h
@@ -0,0 +1,24 @@
1/*
2 * Copyright 2000 Deep Blue Solutions Ltd.
3 * Copyright 2003 ARM Limited
4 * Copyright 2008 Cavium Networks
5 *
6 * This file is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License, Version 2, as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __MACH_IRQS_H
12#define __MACH_IRQS_H
13
14#define IRQ_LOCALTIMER 29
15#define IRQ_LOCALWDOG 30
16#define IRQ_TC11MP_GIC_START 32
17
18#include <mach/cns3xxx.h>
19
20#ifndef NR_IRQS
21#error "NR_IRQS not defined by the board-specific files"
22#endif
23
24#endif
diff --git a/arch/arm/mach-cns3xxx/include/mach/memory.h b/arch/arm/mach-cns3xxx/include/mach/memory.h
new file mode 100644
index 000000000000..3b6b769b7a27
--- /dev/null
+++ b/arch/arm/mach-cns3xxx/include/mach/memory.h
@@ -0,0 +1,26 @@
1/*
2 * Copyright 2003 ARM Limited
3 * Copyright 2008 Cavium Networks
4 *
5 * This file is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License, Version 2, as
7 * published by the Free Software Foundation.
8 */
9
10#ifndef __MACH_MEMORY_H
11#define __MACH_MEMORY_H
12
13/*
14 * Physical DRAM offset.
15 */
16#define PHYS_OFFSET UL(0x00000000)
17
18#define __phys_to_bus(x) ((x) + PHYS_OFFSET)
19#define __bus_to_phys(x) ((x) - PHYS_OFFSET)
20
21#define __virt_to_bus(v) __phys_to_bus(__virt_to_phys(v))
22#define __bus_to_virt(b) __phys_to_virt(__bus_to_phys(b))
23#define __pfn_to_bus(p) __phys_to_bus(__pfn_to_phys(p))
24#define __bus_to_pfn(b) __phys_to_pfn(__bus_to_phys(b))
25
26#endif
diff --git a/arch/arm/mach-cns3xxx/include/mach/system.h b/arch/arm/mach-cns3xxx/include/mach/system.h
new file mode 100644
index 000000000000..58bb03ae3cf4
--- /dev/null
+++ b/arch/arm/mach-cns3xxx/include/mach/system.h
@@ -0,0 +1,29 @@
1/*
2 * Copyright 2000 Deep Blue Solutions Ltd
3 * Copyright 2003 ARM Limited
4 * Copyright 2008 Cavium Networks
5 *
6 * This file is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License, Version 2, as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __MACH_SYSTEM_H
12#define __MACH_SYSTEM_H
13
14#include <linux/io.h>
15#include <asm/proc-fns.h>
16#include <mach/hardware.h>
17
18static inline void arch_idle(void)
19{
20 /*
21 * This should do all the clock switching
22 * and wait for interrupt tricks
23 */
24 cpu_do_idle();
25}
26
27void arch_reset(char mode, const char *cmd);
28
29#endif
diff --git a/arch/arm/mach-cns3xxx/include/mach/timex.h b/arch/arm/mach-cns3xxx/include/mach/timex.h
new file mode 100644
index 000000000000..1fd04217cacb
--- /dev/null
+++ b/arch/arm/mach-cns3xxx/include/mach/timex.h
@@ -0,0 +1,12 @@
1/*
2 * Cavium Networks architecture timex specifications
3 *
4 * Copyright 2003 ARM Limited
5 * Copyright 2008 Cavium Networks
6 *
7 * This file 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#define CLOCK_TICK_RATE (50000000 / 16)
diff --git a/arch/arm/mach-cns3xxx/include/mach/uncompress.h b/arch/arm/mach-cns3xxx/include/mach/uncompress.h
new file mode 100644
index 000000000000..de8ead9b91f7
--- /dev/null
+++ b/arch/arm/mach-cns3xxx/include/mach/uncompress.h
@@ -0,0 +1,55 @@
1/*
2 * Copyright 2003 ARM Limited
3 * Copyright 2008 Cavium Networks
4 *
5 * This file is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License, Version 2, as
7 * published by the Free Software Foundation.
8 */
9
10#include <asm/mach-types.h>
11#include <mach/hardware.h>
12#include <mach/cns3xxx.h>
13
14#define AMBA_UART_DR(base) (*(volatile unsigned char *)((base) + 0x00))
15#define AMBA_UART_LCRH(base) (*(volatile unsigned char *)((base) + 0x2c))
16#define AMBA_UART_CR(base) (*(volatile unsigned char *)((base) + 0x30))
17#define AMBA_UART_FR(base) (*(volatile unsigned char *)((base) + 0x18))
18
19/*
20 * Return the UART base address
21 */
22static inline unsigned long get_uart_base(void)
23{
24 if (machine_is_cns3420vb())
25 return CNS3XXX_UART0_BASE;
26 else
27 return 0;
28}
29
30/*
31 * This does not append a newline
32 */
33static inline void putc(int c)
34{
35 unsigned long base = get_uart_base();
36
37 while (AMBA_UART_FR(base) & (1 << 5))
38 barrier();
39
40 AMBA_UART_DR(base) = c;
41}
42
43static inline void flush(void)
44{
45 unsigned long base = get_uart_base();
46
47 while (AMBA_UART_FR(base) & (1 << 3))
48 barrier();
49}
50
51/*
52 * nothing to do
53 */
54#define arch_decomp_setup()
55#define arch_decomp_wdog()
diff --git a/arch/arm/mach-cns3xxx/include/mach/vmalloc.h b/arch/arm/mach-cns3xxx/include/mach/vmalloc.h
new file mode 100644
index 000000000000..4d381ec05278
--- /dev/null
+++ b/arch/arm/mach-cns3xxx/include/mach/vmalloc.h
@@ -0,0 +1,11 @@
1/*
2 * Copyright 2000 Russell King.
3 * Copyright 2003 ARM Limited
4 * Copyright 2008 Cavium Networks
5 *
6 * This file is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License, Version 2, as
8 * published by the Free Software Foundation.
9 */
10
11#define VMALLOC_END 0xd8000000
diff --git a/arch/arm/mach-cns3xxx/pm.c b/arch/arm/mach-cns3xxx/pm.c
new file mode 100644
index 000000000000..725e1a4fc231
--- /dev/null
+++ b/arch/arm/mach-cns3xxx/pm.c
@@ -0,0 +1,86 @@
1/*
2 * Copyright 2008 Cavium Networks
3 *
4 * This file 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
9#include <linux/delay.h>
10#include <mach/system.h>
11#include <mach/cns3xxx.h>
12
13void cns3xxx_pwr_clk_en(unsigned int block)
14{
15 PM_CLK_GATE_REG |= (block & PM_CLK_GATE_REG_MASK);
16}
17
18void cns3xxx_pwr_power_up(unsigned int block)
19{
20 PM_PLL_HM_PD_CTRL_REG &= ~(block & CNS3XXX_PWR_PLL_ALL);
21
22 /* Wait for 300us for the PLL output clock locked. */
23 udelay(300);
24};
25
26void cns3xxx_pwr_power_down(unsigned int block)
27{
28 /* write '1' to power down */
29 PM_PLL_HM_PD_CTRL_REG |= (block & CNS3XXX_PWR_PLL_ALL);
30};
31
32static void cns3xxx_pwr_soft_rst_force(unsigned int block)
33{
34 /*
35 * bit 0, 28, 29 => program low to reset,
36 * the other else program low and then high
37 */
38 if (block & 0x30000001) {
39 PM_SOFT_RST_REG &= ~(block & PM_SOFT_RST_REG_MASK);
40 } else {
41 PM_SOFT_RST_REG &= ~(block & PM_SOFT_RST_REG_MASK);
42 PM_SOFT_RST_REG |= (block & PM_SOFT_RST_REG_MASK);
43 }
44}
45
46void cns3xxx_pwr_soft_rst(unsigned int block)
47{
48 static unsigned int soft_reset;
49
50 if (soft_reset & block) {
51 /* SPI/I2C/GPIO use the same block, reset once. */
52 return;
53 } else {
54 soft_reset |= block;
55 }
56 cns3xxx_pwr_soft_rst_force(block);
57}
58
59void arch_reset(char mode, const char *cmd)
60{
61 /*
62 * To reset, we hit the on-board reset register
63 * in the system FPGA.
64 */
65 cns3xxx_pwr_soft_rst(CNS3XXX_PWR_SOFTWARE_RST(GLOBAL));
66}
67
68/*
69 * cns3xxx_cpu_clock - return CPU/L2 clock
70 * aclk: cpu clock/2
71 * hclk: cpu clock/4
72 * pclk: cpu clock/8
73 */
74int cns3xxx_cpu_clock(void)
75{
76 int cpu;
77 int cpu_sel;
78 int div_sel;
79
80 cpu_sel = (PM_CLK_CTRL_REG >> PM_CLK_CTRL_REG_OFFSET_PLL_CPU_SEL) & 0xf;
81 div_sel = (PM_CLK_CTRL_REG >> PM_CLK_CTRL_REG_OFFSET_CPU_CLK_DIV) & 0x3;
82
83 cpu = (300 + ((cpu_sel / 3) * 100) + ((cpu_sel % 3) * 33)) >> div_sel;
84
85 return cpu;
86}
diff --git a/arch/arm/mach-davinci/board-dm365-evm.c b/arch/arm/mach-davinci/board-dm365-evm.c
index d15beceb632e..df4ab2105869 100644
--- a/arch/arm/mach-davinci/board-dm365-evm.c
+++ b/arch/arm/mach-davinci/board-dm365-evm.c
@@ -22,6 +22,7 @@
22#include <linux/leds.h> 22#include <linux/leds.h>
23#include <linux/mtd/mtd.h> 23#include <linux/mtd/mtd.h>
24#include <linux/mtd/partitions.h> 24#include <linux/mtd/partitions.h>
25#include <linux/slab.h>
25#include <linux/mtd/nand.h> 26#include <linux/mtd/nand.h>
26#include <linux/input.h> 27#include <linux/input.h>
27#include <linux/spi/spi.h> 28#include <linux/spi/spi.h>
diff --git a/arch/arm/mach-davinci/dm365.c b/arch/arm/mach-davinci/dm365.c
index 27772e18e45b..0d6ee583f65c 100644
--- a/arch/arm/mach-davinci/dm365.c
+++ b/arch/arm/mach-davinci/dm365.c
@@ -758,7 +758,6 @@ static u8 dm365_default_priorities[DAVINCI_N_AINTC_IRQ] = {
758 [IRQ_MMCINT] = 7, 758 [IRQ_MMCINT] = 7,
759 [IRQ_DM365_MMCINT1] = 7, 759 [IRQ_DM365_MMCINT1] = 7,
760 [IRQ_DM365_PWMINT3] = 7, 760 [IRQ_DM365_PWMINT3] = 7,
761 [IRQ_DDRINT] = 4,
762 [IRQ_AEMIFINT] = 2, 761 [IRQ_AEMIFINT] = 2,
763 [IRQ_DM365_SDIOINT1] = 2, 762 [IRQ_DM365_SDIOINT1] = 2,
764 [IRQ_TINT0_TINT12] = 7, 763 [IRQ_TINT0_TINT12] = 7,
diff --git a/arch/arm/mach-davinci/dma.c b/arch/arm/mach-davinci/dma.c
index 15dd886df04c..53137387aee1 100644
--- a/arch/arm/mach-davinci/dma.c
+++ b/arch/arm/mach-davinci/dma.c
@@ -23,6 +23,7 @@
23#include <linux/interrupt.h> 23#include <linux/interrupt.h>
24#include <linux/platform_device.h> 24#include <linux/platform_device.h>
25#include <linux/io.h> 25#include <linux/io.h>
26#include <linux/slab.h>
26 27
27#include <mach/edma.h> 28#include <mach/edma.h>
28 29
@@ -1266,7 +1267,8 @@ int edma_start(unsigned channel)
1266 /* EDMA channel with event association */ 1267 /* EDMA channel with event association */
1267 pr_debug("EDMA: ER%d %08x\n", j, 1268 pr_debug("EDMA: ER%d %08x\n", j,
1268 edma_shadow0_read_array(ctlr, SH_ER, j)); 1269 edma_shadow0_read_array(ctlr, SH_ER, j));
1269 /* Clear any pending error */ 1270 /* Clear any pending event or error */
1271 edma_write_array(ctlr, EDMA_ECR, j, mask);
1270 edma_write_array(ctlr, EDMA_EMCR, j, mask); 1272 edma_write_array(ctlr, EDMA_EMCR, j, mask);
1271 /* Clear any SER */ 1273 /* Clear any SER */
1272 edma_shadow0_write_array(ctlr, SH_SECR, j, mask); 1274 edma_shadow0_write_array(ctlr, SH_SECR, j, mask);
diff --git a/arch/arm/mach-davinci/include/mach/da8xx.h b/arch/arm/mach-davinci/include/mach/da8xx.h
index cc9be7fee627..03acfd39042b 100644
--- a/arch/arm/mach-davinci/include/mach/da8xx.h
+++ b/arch/arm/mach-davinci/include/mach/da8xx.h
@@ -3,7 +3,7 @@
3 * 3 *
4 * Author: Mark A. Greer <mgreer@mvista.com> 4 * Author: Mark A. Greer <mgreer@mvista.com>
5 * 5 *
6 * 2007, 2009 (c) MontaVista Software, Inc. This file is licensed under 6 * 2007, 2009-2010 (c) MontaVista Software, Inc. This file is licensed under
7 * the terms of the GNU General Public License version 2. This program 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 8 * is licensed "as is" without any warranty of any kind, whether express
9 * or implied. 9 * or implied.
@@ -13,7 +13,9 @@
13 13
14#include <video/da8xx-fb.h> 14#include <video/da8xx-fb.h>
15 15
16#include <linux/platform_device.h>
16#include <linux/davinci_emac.h> 17#include <linux/davinci_emac.h>
18
17#include <mach/serial.h> 19#include <mach/serial.h>
18#include <mach/edma.h> 20#include <mach/edma.h>
19#include <mach/i2c.h> 21#include <mach/i2c.h>
@@ -144,6 +146,10 @@ extern const short da850_mmcsd0_pins[];
144extern const short da850_nand_pins[]; 146extern const short da850_nand_pins[];
145extern const short da850_nor_pins[]; 147extern const short da850_nor_pins[];
146 148
149#ifdef CONFIG_DAVINCI_MUX
147int da8xx_pinmux_setup(const short pins[]); 150int da8xx_pinmux_setup(const short pins[]);
151#else
152static inline int da8xx_pinmux_setup(const short pins[]) { return 0; }
153#endif
148 154
149#endif /* __ASM_ARCH_DAVINCI_DA8XX_H */ 155#endif /* __ASM_ARCH_DAVINCI_DA8XX_H */
diff --git a/arch/arm/mach-davinci/time.c b/arch/arm/mach-davinci/time.c
index 42d985beece5..9e0b106b4f5f 100644
--- a/arch/arm/mach-davinci/time.c
+++ b/arch/arm/mach-davinci/time.c
@@ -253,8 +253,6 @@ static void __init timer_init(void)
253 irq = USING_COMPARE(t) ? dtip[i].cmp_irq : irq; 253 irq = USING_COMPARE(t) ? dtip[i].cmp_irq : irq;
254 setup_irq(irq, &t->irqaction); 254 setup_irq(irq, &t->irqaction);
255 } 255 }
256
257 timer32_config(&timers[i]);
258 } 256 }
259} 257}
260 258
@@ -331,6 +329,7 @@ static void __init davinci_timer_init(void)
331 unsigned int clocksource_id; 329 unsigned int clocksource_id;
332 static char err[] __initdata = KERN_ERR 330 static char err[] __initdata = KERN_ERR
333 "%s: can't register clocksource!\n"; 331 "%s: can't register clocksource!\n";
332 int i;
334 333
335 clockevent_id = soc_info->timer_info->clockevent_id; 334 clockevent_id = soc_info->timer_info->clockevent_id;
336 clocksource_id = soc_info->timer_info->clocksource_id; 335 clocksource_id = soc_info->timer_info->clocksource_id;
@@ -389,6 +388,9 @@ static void __init davinci_timer_init(void)
389 388
390 clockevent_davinci.cpumask = cpumask_of(0); 389 clockevent_davinci.cpumask = cpumask_of(0);
391 clockevents_register_device(&clockevent_davinci); 390 clockevents_register_device(&clockevent_davinci);
391
392 for (i=0; i< ARRAY_SIZE(timers); i++)
393 timer32_config(&timers[i]);
392} 394}
393 395
394struct sys_timer davinci_timer = { 396struct sys_timer davinci_timer = {
diff --git a/arch/arm/mach-ep93xx/gpio.c b/arch/arm/mach-ep93xx/gpio.c
index cc377ae8c428..cf547ad7ebd4 100644
--- a/arch/arm/mach-ep93xx/gpio.c
+++ b/arch/arm/mach-ep93xx/gpio.c
@@ -25,7 +25,7 @@
25#include <mach/hardware.h> 25#include <mach/hardware.h>
26 26
27/************************************************************************* 27/*************************************************************************
28 * GPIO handling for EP93xx 28 * Interrupt handling for EP93xx on-chip GPIOs
29 *************************************************************************/ 29 *************************************************************************/
30static unsigned char gpio_int_unmasked[3]; 30static unsigned char gpio_int_unmasked[3];
31static unsigned char gpio_int_enabled[3]; 31static unsigned char gpio_int_enabled[3];
@@ -40,7 +40,7 @@ static const u8 eoi_register_offset[3] = { 0x98, 0xb4, 0x54 };
40static const u8 int_en_register_offset[3] = { 0x9c, 0xb8, 0x58 }; 40static const u8 int_en_register_offset[3] = { 0x9c, 0xb8, 0x58 };
41static const u8 int_debounce_register_offset[3] = { 0xa8, 0xc4, 0x64 }; 41static const u8 int_debounce_register_offset[3] = { 0xa8, 0xc4, 0x64 };
42 42
43void ep93xx_gpio_update_int_params(unsigned port) 43static void ep93xx_gpio_update_int_params(unsigned port)
44{ 44{
45 BUG_ON(port > 2); 45 BUG_ON(port > 2);
46 46
@@ -56,7 +56,7 @@ void ep93xx_gpio_update_int_params(unsigned port)
56 EP93XX_GPIO_REG(int_en_register_offset[port])); 56 EP93XX_GPIO_REG(int_en_register_offset[port]));
57} 57}
58 58
59void ep93xx_gpio_int_mask(unsigned line) 59static inline void ep93xx_gpio_int_mask(unsigned line)
60{ 60{
61 gpio_int_unmasked[line >> 3] &= ~(1 << (line & 7)); 61 gpio_int_unmasked[line >> 3] &= ~(1 << (line & 7));
62} 62}
diff --git a/arch/arm/mach-h720x/common.c b/arch/arm/mach-h720x/common.c
index 7a2614828217..bdb3f6706801 100644
--- a/arch/arm/mach-h720x/common.c
+++ b/arch/arm/mach-h720x/common.c
@@ -14,7 +14,6 @@
14 */ 14 */
15 15
16#include <linux/sched.h> 16#include <linux/sched.h>
17#include <linux/slab.h>
18#include <linux/mman.h> 17#include <linux/mman.h>
19#include <linux/init.h> 18#include <linux/init.h>
20#include <linux/interrupt.h> 19#include <linux/interrupt.h>
diff --git a/arch/arm/mach-integrator/cpu.c b/arch/arm/mach-integrator/cpu.c
index 1cb222daa06d..a3fbcb3adc29 100644
--- a/arch/arm/mach-integrator/cpu.c
+++ b/arch/arm/mach-integrator/cpu.c
@@ -13,7 +13,6 @@
13#include <linux/types.h> 13#include <linux/types.h>
14#include <linux/kernel.h> 14#include <linux/kernel.h>
15#include <linux/cpufreq.h> 15#include <linux/cpufreq.h>
16#include <linux/slab.h>
17#include <linux/sched.h> 16#include <linux/sched.h>
18#include <linux/smp.h> 17#include <linux/smp.h>
19#include <linux/init.h> 18#include <linux/init.h>
diff --git a/arch/arm/mach-integrator/impd1.c b/arch/arm/mach-integrator/impd1.c
index 1a0ee93e4519..fd684bf205e5 100644
--- a/arch/arm/mach-integrator/impd1.c
+++ b/arch/arm/mach-integrator/impd1.c
@@ -21,6 +21,7 @@
21#include <linux/amba/bus.h> 21#include <linux/amba/bus.h>
22#include <linux/amba/clcd.h> 22#include <linux/amba/clcd.h>
23#include <linux/io.h> 23#include <linux/io.h>
24#include <linux/slab.h>
24 25
25#include <asm/clkdev.h> 26#include <asm/clkdev.h>
26#include <mach/clkdev.h> 27#include <mach/clkdev.h>
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c
index 54edb6b8504f..cde57b2b83b5 100644
--- a/arch/arm/mach-integrator/integrator_cp.c
+++ b/arch/arm/mach-integrator/integrator_cp.c
@@ -13,7 +13,6 @@
13#include <linux/list.h> 13#include <linux/list.h>
14#include <linux/platform_device.h> 14#include <linux/platform_device.h>
15#include <linux/dma-mapping.h> 15#include <linux/dma-mapping.h>
16#include <linux/slab.h>
17#include <linux/string.h> 16#include <linux/string.h>
18#include <linux/sysdev.h> 17#include <linux/sysdev.h>
19#include <linux/amba/bus.h> 18#include <linux/amba/bus.h>
@@ -21,6 +20,7 @@
21#include <linux/amba/clcd.h> 20#include <linux/amba/clcd.h>
22#include <linux/amba/mmci.h> 21#include <linux/amba/mmci.h>
23#include <linux/io.h> 22#include <linux/io.h>
23#include <linux/gfp.h>
24 24
25#include <asm/clkdev.h> 25#include <asm/clkdev.h>
26#include <mach/clkdev.h> 26#include <mach/clkdev.h>
diff --git a/arch/arm/mach-integrator/pci_v3.c b/arch/arm/mach-integrator/pci_v3.c
index e5491629c6da..9cef0590d5aa 100644
--- a/arch/arm/mach-integrator/pci_v3.c
+++ b/arch/arm/mach-integrator/pci_v3.c
@@ -22,7 +22,6 @@
22 */ 22 */
23#include <linux/kernel.h> 23#include <linux/kernel.h>
24#include <linux/pci.h> 24#include <linux/pci.h>
25#include <linux/slab.h>
26#include <linux/ioport.h> 25#include <linux/ioport.h>
27#include <linux/interrupt.h> 26#include <linux/interrupt.h>
28#include <linux/spinlock.h> 27#include <linux/spinlock.h>
diff --git a/arch/arm/mach-iop13xx/pci.c b/arch/arm/mach-iop13xx/pci.c
index 4873f26a42e1..6d5a90813d31 100644
--- a/arch/arm/mach-iop13xx/pci.c
+++ b/arch/arm/mach-iop13xx/pci.c
@@ -18,6 +18,7 @@
18 */ 18 */
19 19
20#include <linux/pci.h> 20#include <linux/pci.h>
21#include <linux/slab.h>
21#include <linux/delay.h> 22#include <linux/delay.h>
22#include <linux/jiffies.h> 23#include <linux/jiffies.h>
23#include <asm/irq.h> 24#include <asm/irq.h>
diff --git a/arch/arm/mach-iop32x/glantank.c b/arch/arm/mach-iop32x/glantank.c
index 93370a46b620..10384fc37cb2 100644
--- a/arch/arm/mach-iop32x/glantank.c
+++ b/arch/arm/mach-iop32x/glantank.c
@@ -19,7 +19,6 @@
19#include <linux/pci.h> 19#include <linux/pci.h>
20#include <linux/pm.h> 20#include <linux/pm.h>
21#include <linux/string.h> 21#include <linux/string.h>
22#include <linux/slab.h>
23#include <linux/serial_core.h> 22#include <linux/serial_core.h>
24#include <linux/serial_8250.h> 23#include <linux/serial_8250.h>
25#include <linux/mtd/physmap.h> 24#include <linux/mtd/physmap.h>
diff --git a/arch/arm/mach-iop32x/iq31244.c b/arch/arm/mach-iop32x/iq31244.c
index a7a08dda7f33..d6ac85ff109d 100644
--- a/arch/arm/mach-iop32x/iq31244.c
+++ b/arch/arm/mach-iop32x/iq31244.c
@@ -21,7 +21,6 @@
21#include <linux/pci.h> 21#include <linux/pci.h>
22#include <linux/pm.h> 22#include <linux/pm.h>
23#include <linux/string.h> 23#include <linux/string.h>
24#include <linux/slab.h>
25#include <linux/serial_core.h> 24#include <linux/serial_core.h>
26#include <linux/serial_8250.h> 25#include <linux/serial_8250.h>
27#include <linux/mtd/physmap.h> 26#include <linux/mtd/physmap.h>
diff --git a/arch/arm/mach-iop32x/iq80321.c b/arch/arm/mach-iop32x/iq80321.c
index 0200f80c1e17..c6a0e4ee9d91 100644
--- a/arch/arm/mach-iop32x/iq80321.c
+++ b/arch/arm/mach-iop32x/iq80321.c
@@ -18,7 +18,6 @@
18#include <linux/kernel.h> 18#include <linux/kernel.h>
19#include <linux/pci.h> 19#include <linux/pci.h>
20#include <linux/string.h> 20#include <linux/string.h>
21#include <linux/slab.h>
22#include <linux/serial_core.h> 21#include <linux/serial_core.h>
23#include <linux/serial_8250.h> 22#include <linux/serial_8250.h>
24#include <linux/mtd/physmap.h> 23#include <linux/mtd/physmap.h>
diff --git a/arch/arm/mach-iop32x/n2100.c b/arch/arm/mach-iop32x/n2100.c
index 266b1f58a784..f108a31afc2b 100644
--- a/arch/arm/mach-iop32x/n2100.c
+++ b/arch/arm/mach-iop32x/n2100.c
@@ -23,7 +23,6 @@
23#include <linux/pci.h> 23#include <linux/pci.h>
24#include <linux/pm.h> 24#include <linux/pm.h>
25#include <linux/string.h> 25#include <linux/string.h>
26#include <linux/slab.h>
27#include <linux/serial_core.h> 26#include <linux/serial_core.h>
28#include <linux/serial_8250.h> 27#include <linux/serial_8250.h>
29#include <linux/mtd/physmap.h> 28#include <linux/mtd/physmap.h>
diff --git a/arch/arm/mach-iop33x/iq80331.c b/arch/arm/mach-iop33x/iq80331.c
index 394e95a30b75..c6ff5523b380 100644
--- a/arch/arm/mach-iop33x/iq80331.c
+++ b/arch/arm/mach-iop33x/iq80331.c
@@ -17,7 +17,6 @@
17#include <linux/kernel.h> 17#include <linux/kernel.h>
18#include <linux/pci.h> 18#include <linux/pci.h>
19#include <linux/string.h> 19#include <linux/string.h>
20#include <linux/slab.h>
21#include <linux/serial_core.h> 20#include <linux/serial_core.h>
22#include <linux/serial_8250.h> 21#include <linux/serial_8250.h>
23#include <linux/mtd/physmap.h> 22#include <linux/mtd/physmap.h>
diff --git a/arch/arm/mach-iop33x/iq80332.c b/arch/arm/mach-iop33x/iq80332.c
index a40badf126c2..fbf551409394 100644
--- a/arch/arm/mach-iop33x/iq80332.c
+++ b/arch/arm/mach-iop33x/iq80332.c
@@ -17,7 +17,6 @@
17#include <linux/kernel.h> 17#include <linux/kernel.h>
18#include <linux/pci.h> 18#include <linux/pci.h>
19#include <linux/string.h> 19#include <linux/string.h>
20#include <linux/slab.h>
21#include <linux/serial_core.h> 20#include <linux/serial_core.h>
22#include <linux/serial_8250.h> 21#include <linux/serial_8250.h>
23#include <linux/mtd/physmap.h> 22#include <linux/mtd/physmap.h>
diff --git a/arch/arm/mach-ixp2000/enp2611.c b/arch/arm/mach-ixp2000/enp2611.c
index c84dfac13882..1a557e0d055b 100644
--- a/arch/arm/mach-ixp2000/enp2611.c
+++ b/arch/arm/mach-ixp2000/enp2611.c
@@ -26,7 +26,6 @@
26#include <linux/bitops.h> 26#include <linux/bitops.h>
27#include <linux/pci.h> 27#include <linux/pci.h>
28#include <linux/ioport.h> 28#include <linux/ioport.h>
29#include <linux/slab.h>
30#include <linux/delay.h> 29#include <linux/delay.h>
31#include <linux/serial.h> 30#include <linux/serial.h>
32#include <linux/tty.h> 31#include <linux/tty.h>
diff --git a/arch/arm/mach-ixp2000/ixdp2400.c b/arch/arm/mach-ixp2000/ixdp2400.c
index 4467c4224d73..55e5c69352ad 100644
--- a/arch/arm/mach-ixp2000/ixdp2400.c
+++ b/arch/arm/mach-ixp2000/ixdp2400.c
@@ -23,7 +23,6 @@
23#include <linux/bitops.h> 23#include <linux/bitops.h>
24#include <linux/pci.h> 24#include <linux/pci.h>
25#include <linux/ioport.h> 25#include <linux/ioport.h>
26#include <linux/slab.h>
27#include <linux/delay.h> 26#include <linux/delay.h>
28#include <linux/io.h> 27#include <linux/io.h>
29 28
diff --git a/arch/arm/mach-ixp2000/ixdp2800.c b/arch/arm/mach-ixp2000/ixdp2800.c
index 94f68ba9ea50..237b61a85e9a 100644
--- a/arch/arm/mach-ixp2000/ixdp2800.c
+++ b/arch/arm/mach-ixp2000/ixdp2800.c
@@ -23,7 +23,6 @@
23#include <linux/bitops.h> 23#include <linux/bitops.h>
24#include <linux/pci.h> 24#include <linux/pci.h>
25#include <linux/ioport.h> 25#include <linux/ioport.h>
26#include <linux/slab.h>
27#include <linux/delay.h> 26#include <linux/delay.h>
28#include <linux/io.h> 27#include <linux/io.h>
29 28
diff --git a/arch/arm/mach-ixp2000/ixdp2x00.c b/arch/arm/mach-ixp2000/ixdp2x00.c
index 30451300751b..91fffb9b2084 100644
--- a/arch/arm/mach-ixp2000/ixdp2x00.c
+++ b/arch/arm/mach-ixp2000/ixdp2x00.c
@@ -23,7 +23,6 @@
23#include <linux/bitops.h> 23#include <linux/bitops.h>
24#include <linux/pci.h> 24#include <linux/pci.h>
25#include <linux/ioport.h> 25#include <linux/ioport.h>
26#include <linux/slab.h>
27#include <linux/delay.h> 26#include <linux/delay.h>
28#include <linux/io.h> 27#include <linux/io.h>
29 28
diff --git a/arch/arm/mach-ixp2000/ixdp2x01.c b/arch/arm/mach-ixp2000/ixdp2x01.c
index 4a12327a09a3..0369ec4242a6 100644
--- a/arch/arm/mach-ixp2000/ixdp2x01.c
+++ b/arch/arm/mach-ixp2000/ixdp2x01.c
@@ -23,7 +23,6 @@
23#include <linux/bitops.h> 23#include <linux/bitops.h>
24#include <linux/pci.h> 24#include <linux/pci.h>
25#include <linux/ioport.h> 25#include <linux/ioport.h>
26#include <linux/slab.h>
27#include <linux/delay.h> 26#include <linux/delay.h>
28#include <linux/serial.h> 27#include <linux/serial.h>
29#include <linux/tty.h> 28#include <linux/tty.h>
diff --git a/arch/arm/mach-ixp2000/pci.c b/arch/arm/mach-ixp2000/pci.c
index 60e9fd08ab80..90771cad06f8 100644
--- a/arch/arm/mach-ixp2000/pci.c
+++ b/arch/arm/mach-ixp2000/pci.c
@@ -22,7 +22,6 @@
22#include <linux/mm.h> 22#include <linux/mm.h>
23#include <linux/init.h> 23#include <linux/init.h>
24#include <linux/ioport.h> 24#include <linux/ioport.h>
25#include <linux/slab.h>
26#include <linux/delay.h> 25#include <linux/delay.h>
27#include <linux/io.h> 26#include <linux/io.h>
28 27
diff --git a/arch/arm/mach-ixp23xx/include/mach/memory.h b/arch/arm/mach-ixp23xx/include/mach/memory.h
index 94a3a86cfeb8..6ef65d813f16 100644
--- a/arch/arm/mach-ixp23xx/include/mach/memory.h
+++ b/arch/arm/mach-ixp23xx/include/mach/memory.h
@@ -19,7 +19,7 @@
19 */ 19 */
20#define PHYS_OFFSET (0x00000000) 20#define PHYS_OFFSET (0x00000000)
21 21
22#define IXP23XX_PCI_SDRAM_OFFSET (*((volatile int *)IXP23XX_PCI_SDRAM_BAR) & 0xfffffff0)) 22#define IXP23XX_PCI_SDRAM_OFFSET (*((volatile int *)IXP23XX_PCI_SDRAM_BAR) & 0xfffffff0)
23 23
24#define __phys_to_bus(x) ((x) + (IXP23XX_PCI_SDRAM_OFFSET - PHYS_OFFSET)) 24#define __phys_to_bus(x) ((x) + (IXP23XX_PCI_SDRAM_OFFSET - PHYS_OFFSET))
25#define __bus_to_phys(x) ((x) - (IXP23XX_PCI_SDRAM_OFFSET - PHYS_OFFSET)) 25#define __bus_to_phys(x) ((x) - (IXP23XX_PCI_SDRAM_OFFSET - PHYS_OFFSET))
diff --git a/arch/arm/mach-ixp23xx/pci.c b/arch/arm/mach-ixp23xx/pci.c
index 59022becb134..4b0e598a91c9 100644
--- a/arch/arm/mach-ixp23xx/pci.c
+++ b/arch/arm/mach-ixp23xx/pci.c
@@ -23,7 +23,6 @@
23#include <linux/mm.h> 23#include <linux/mm.h>
24#include <linux/init.h> 24#include <linux/init.h>
25#include <linux/ioport.h> 25#include <linux/ioport.h>
26#include <linux/slab.h>
27#include <linux/delay.h> 26#include <linux/delay.h>
28#include <linux/io.h> 27#include <linux/io.h>
29 28
diff --git a/arch/arm/mach-ixp4xx/avila-setup.c b/arch/arm/mach-ixp4xx/avila-setup.c
index 6e558a76457d..d8bc86d76f1d 100644
--- a/arch/arm/mach-ixp4xx/avila-setup.c
+++ b/arch/arm/mach-ixp4xx/avila-setup.c
@@ -17,7 +17,6 @@
17#include <linux/serial.h> 17#include <linux/serial.h>
18#include <linux/tty.h> 18#include <linux/tty.h>
19#include <linux/serial_8250.h> 19#include <linux/serial_8250.h>
20#include <linux/slab.h>
21#include <linux/i2c-gpio.h> 20#include <linux/i2c-gpio.h>
22#include <asm/types.h> 21#include <asm/types.h>
23#include <asm/setup.h> 22#include <asm/setup.h>
diff --git a/arch/arm/mach-ixp4xx/coyote-setup.c b/arch/arm/mach-ixp4xx/coyote-setup.c
index 25bf5ad770ea..31a47f6a8939 100644
--- a/arch/arm/mach-ixp4xx/coyote-setup.c
+++ b/arch/arm/mach-ixp4xx/coyote-setup.c
@@ -14,7 +14,6 @@
14#include <linux/serial.h> 14#include <linux/serial.h>
15#include <linux/tty.h> 15#include <linux/tty.h>
16#include <linux/serial_8250.h> 16#include <linux/serial_8250.h>
17#include <linux/slab.h>
18 17
19#include <asm/types.h> 18#include <asm/types.h>
20#include <asm/setup.h> 19#include <asm/setup.h>
diff --git a/arch/arm/mach-ixp4xx/gateway7001-setup.c b/arch/arm/mach-ixp4xx/gateway7001-setup.c
index 59b73a0ddfa9..2583b2a13174 100644
--- a/arch/arm/mach-ixp4xx/gateway7001-setup.c
+++ b/arch/arm/mach-ixp4xx/gateway7001-setup.c
@@ -17,7 +17,6 @@
17#include <linux/serial.h> 17#include <linux/serial.h>
18#include <linux/tty.h> 18#include <linux/tty.h>
19#include <linux/serial_8250.h> 19#include <linux/serial_8250.h>
20#include <linux/slab.h>
21 20
22#include <asm/types.h> 21#include <asm/types.h>
23#include <asm/setup.h> 22#include <asm/setup.h>
diff --git a/arch/arm/mach-ixp4xx/gtwx5715-setup.c b/arch/arm/mach-ixp4xx/gtwx5715-setup.c
index 0bc7185cb6f7..c67586b79400 100644
--- a/arch/arm/mach-ixp4xx/gtwx5715-setup.c
+++ b/arch/arm/mach-ixp4xx/gtwx5715-setup.c
@@ -27,7 +27,6 @@
27#include <linux/serial.h> 27#include <linux/serial.h>
28#include <linux/tty.h> 28#include <linux/tty.h>
29#include <linux/serial_8250.h> 29#include <linux/serial_8250.h>
30#include <linux/slab.h>
31#include <asm/types.h> 30#include <asm/types.h>
32#include <asm/setup.h> 31#include <asm/setup.h>
33#include <asm/memory.h> 32#include <asm/memory.h>
diff --git a/arch/arm/mach-ixp4xx/ixdp425-setup.c b/arch/arm/mach-ixp4xx/ixdp425-setup.c
index bbb768988845..827cbc4402f4 100644
--- a/arch/arm/mach-ixp4xx/ixdp425-setup.c
+++ b/arch/arm/mach-ixp4xx/ixdp425-setup.c
@@ -14,7 +14,6 @@
14#include <linux/serial.h> 14#include <linux/serial.h>
15#include <linux/tty.h> 15#include <linux/tty.h>
16#include <linux/serial_8250.h> 16#include <linux/serial_8250.h>
17#include <linux/slab.h>
18#include <linux/i2c-gpio.h> 17#include <linux/i2c-gpio.h>
19#include <linux/io.h> 18#include <linux/io.h>
20#include <linux/mtd/mtd.h> 19#include <linux/mtd/mtd.h>
diff --git a/arch/arm/mach-ixp4xx/ixp4xx_npe.c b/arch/arm/mach-ixp4xx/ixp4xx_npe.c
index e8bb25778166..a17ed79207a4 100644
--- a/arch/arm/mach-ixp4xx/ixp4xx_npe.c
+++ b/arch/arm/mach-ixp4xx/ixp4xx_npe.c
@@ -20,7 +20,6 @@
20#include <linux/io.h> 20#include <linux/io.h>
21#include <linux/kernel.h> 21#include <linux/kernel.h>
22#include <linux/module.h> 22#include <linux/module.h>
23#include <linux/slab.h>
24#include <mach/npe.h> 23#include <mach/npe.h>
25 24
26#define DEBUG_MSG 0 25#define DEBUG_MSG 0
diff --git a/arch/arm/mach-ixp4xx/wg302v2-setup.c b/arch/arm/mach-ixp4xx/wg302v2-setup.c
index 7ea782021d1f..4dd74863daa9 100644
--- a/arch/arm/mach-ixp4xx/wg302v2-setup.c
+++ b/arch/arm/mach-ixp4xx/wg302v2-setup.c
@@ -18,7 +18,6 @@
18#include <linux/serial.h> 18#include <linux/serial.h>
19#include <linux/tty.h> 19#include <linux/tty.h>
20#include <linux/serial_8250.h> 20#include <linux/serial_8250.h>
21#include <linux/slab.h>
22 21
23#include <asm/types.h> 22#include <asm/types.h>
24#include <asm/setup.h> 23#include <asm/setup.h>
diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
index 17879a876be6..29b2163b1fe3 100644
--- a/arch/arm/mach-kirkwood/Kconfig
+++ b/arch/arm/mach-kirkwood/Kconfig
@@ -38,6 +38,12 @@ config MACH_ESATA_SHEEVAPLUG
38 Say 'Y' here if you want your kernel to support the 38 Say 'Y' here if you want your kernel to support the
39 Marvell eSATA SheevaPlug Reference Board. 39 Marvell eSATA SheevaPlug Reference Board.
40 40
41config MACH_GURUPLUG
42 bool "Marvell GuruPlug Reference Board"
43 help
44 Say 'Y' here if you want your kernel to support the
45 Marvell GuruPlug Reference Board.
46
41config MACH_TS219 47config MACH_TS219
42 bool "QNAP TS-110, TS-119, TS-210, TS-219 and TS-219P Turbo NAS" 48 bool "QNAP TS-110, TS-119, TS-210, TS-219 and TS-219P Turbo NAS"
43 help 49 help
@@ -81,6 +87,18 @@ config MACH_INETSPACE_V2
81 Say 'Y' here if you want your kernel to support the 87 Say 'Y' here if you want your kernel to support the
82 LaCie Internet Space v2 NAS. 88 LaCie Internet Space v2 NAS.
83 89
90config MACH_NET2BIG_V2
91 bool "LaCie 2Big Network v2 NAS Board"
92 help
93 Say 'Y' here if you want your kernel to support the
94 LaCie 2Big Network v2 NAS.
95
96config MACH_NET5BIG_V2
97 bool "LaCie 5Big Network v2 NAS Board"
98 help
99 Say 'Y' here if you want your kernel to support the
100 LaCie 5Big Network v2 NAS.
101
84endmenu 102endmenu
85 103
86endif 104endif
diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile
index a5530e36ba3e..c0cd5d362002 100644
--- a/arch/arm/mach-kirkwood/Makefile
+++ b/arch/arm/mach-kirkwood/Makefile
@@ -6,10 +6,13 @@ obj-$(CONFIG_MACH_RD88F6281) += rd88f6281-setup.o
6obj-$(CONFIG_MACH_MV88F6281GTW_GE) += mv88f6281gtw_ge-setup.o 6obj-$(CONFIG_MACH_MV88F6281GTW_GE) += mv88f6281gtw_ge-setup.o
7obj-$(CONFIG_MACH_SHEEVAPLUG) += sheevaplug-setup.o 7obj-$(CONFIG_MACH_SHEEVAPLUG) += sheevaplug-setup.o
8obj-$(CONFIG_MACH_ESATA_SHEEVAPLUG) += sheevaplug-setup.o 8obj-$(CONFIG_MACH_ESATA_SHEEVAPLUG) += sheevaplug-setup.o
9obj-$(CONFIG_MACH_GURUPLUG) += guruplug-setup.o
9obj-$(CONFIG_MACH_TS219) += ts219-setup.o tsx1x-common.o 10obj-$(CONFIG_MACH_TS219) += ts219-setup.o tsx1x-common.o
10obj-$(CONFIG_MACH_TS41X) += ts41x-setup.o tsx1x-common.o 11obj-$(CONFIG_MACH_TS41X) += ts41x-setup.o tsx1x-common.o
11obj-$(CONFIG_MACH_OPENRD) += openrd-setup.o 12obj-$(CONFIG_MACH_OPENRD) += openrd-setup.o
12obj-$(CONFIG_MACH_NETSPACE_V2) += netspace_v2-setup.o 13obj-$(CONFIG_MACH_NETSPACE_V2) += netspace_v2-setup.o
13obj-$(CONFIG_MACH_INETSPACE_V2) += netspace_v2-setup.o 14obj-$(CONFIG_MACH_INETSPACE_V2) += netspace_v2-setup.o
15obj-$(CONFIG_MACH_NET2BIG_V2) += netxbig_v2-setup.o
16obj-$(CONFIG_MACH_NET5BIG_V2) += netxbig_v2-setup.o
14 17
15obj-$(CONFIG_CPU_IDLE) += cpuidle.o 18obj-$(CONFIG_CPU_IDLE) += cpuidle.o
diff --git a/arch/arm/mach-kirkwood/guruplug-setup.c b/arch/arm/mach-kirkwood/guruplug-setup.c
new file mode 100644
index 000000000000..54d07c89d4ff
--- /dev/null
+++ b/arch/arm/mach-kirkwood/guruplug-setup.c
@@ -0,0 +1,131 @@
1/*
2 * arch/arm/mach-kirkwood/guruplug-setup.c
3 *
4 * Marvell GuruPlug Reference Board Setup
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11#include <linux/kernel.h>
12#include <linux/init.h>
13#include <linux/platform_device.h>
14#include <linux/mtd/partitions.h>
15#include <linux/ata_platform.h>
16#include <linux/mv643xx_eth.h>
17#include <linux/gpio.h>
18#include <linux/leds.h>
19#include <asm/mach-types.h>
20#include <asm/mach/arch.h>
21#include <mach/kirkwood.h>
22#include <plat/mvsdio.h>
23#include "common.h"
24#include "mpp.h"
25
26static struct mtd_partition guruplug_nand_parts[] = {
27 {
28 .name = "u-boot",
29 .offset = 0,
30 .size = SZ_1M
31 }, {
32 .name = "uImage",
33 .offset = MTDPART_OFS_NXTBLK,
34 .size = SZ_4M
35 }, {
36 .name = "root",
37 .offset = MTDPART_OFS_NXTBLK,
38 .size = MTDPART_SIZ_FULL
39 },
40};
41
42static struct mv643xx_eth_platform_data guruplug_ge00_data = {
43 .phy_addr = MV643XX_ETH_PHY_ADDR(0),
44};
45
46static struct mv643xx_eth_platform_data guruplug_ge01_data = {
47 .phy_addr = MV643XX_ETH_PHY_ADDR(1),
48};
49
50static struct mv_sata_platform_data guruplug_sata_data = {
51 .n_ports = 1,
52};
53
54static struct mvsdio_platform_data guruplug_mvsdio_data = {
55 /* unfortunately the CD signal has not been connected */
56};
57
58static struct gpio_led guruplug_led_pins[] = {
59 {
60 .name = "guruplug:red:health",
61 .gpio = 46,
62 .active_low = 1,
63 },
64 {
65 .name = "guruplug:green:health",
66 .gpio = 47,
67 .active_low = 1,
68 },
69 {
70 .name = "guruplug:red:wmode",
71 .gpio = 48,
72 .active_low = 1,
73 },
74 {
75 .name = "guruplug:green:wmode",
76 .gpio = 49,
77 .active_low = 1,
78 },
79};
80
81static struct gpio_led_platform_data guruplug_led_data = {
82 .leds = guruplug_led_pins,
83 .num_leds = ARRAY_SIZE(guruplug_led_pins),
84};
85
86static struct platform_device guruplug_leds = {
87 .name = "leds-gpio",
88 .id = -1,
89 .dev = {
90 .platform_data = &guruplug_led_data,
91 }
92};
93
94static unsigned int guruplug_mpp_config[] __initdata = {
95 MPP46_GPIO, /* M_RLED */
96 MPP47_GPIO, /* M_GLED */
97 MPP48_GPIO, /* B_RLED */
98 MPP49_GPIO, /* B_GLED */
99 0
100};
101
102static void __init guruplug_init(void)
103{
104 /*
105 * Basic setup. Needs to be called early.
106 */
107 kirkwood_init();
108 kirkwood_mpp_conf(guruplug_mpp_config);
109
110 kirkwood_uart0_init();
111 kirkwood_nand_init(ARRAY_AND_SIZE(guruplug_nand_parts), 25);
112
113 kirkwood_ehci_init();
114 kirkwood_ge00_init(&guruplug_ge00_data);
115 kirkwood_ge01_init(&guruplug_ge01_data);
116 kirkwood_sata_init(&guruplug_sata_data);
117 kirkwood_sdio_init(&guruplug_mvsdio_data);
118
119 platform_device_register(&guruplug_leds);
120}
121
122MACHINE_START(GURUPLUG, "Marvell GuruPlug Reference Board")
123 /* Maintainer: Siddarth Gore <gores@marvell.com> */
124 .phys_io = KIRKWOOD_REGS_PHYS_BASE,
125 .io_pg_offst = ((KIRKWOOD_REGS_VIRT_BASE) >> 18) & 0xfffc,
126 .boot_params = 0x00000100,
127 .init_machine = guruplug_init,
128 .map_io = kirkwood_map_io,
129 .init_irq = kirkwood_init_irq,
130 .timer = &kirkwood_timer,
131MACHINE_END
diff --git a/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c b/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c
index 0358f45766cb..5e6f711b1c67 100644
--- a/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c
+++ b/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c
@@ -74,9 +74,9 @@ static struct gpio_keys_button mv88f6281gtw_ge_button_pins[] = {
74 .desc = "SWR Button", 74 .desc = "SWR Button",
75 .active_low = 1, 75 .active_low = 1,
76 }, { 76 }, {
77 .code = KEY_F1, 77 .code = KEY_WPS_BUTTON,
78 .gpio = 46, 78 .gpio = 46,
79 .desc = "WPS Button(F1)", 79 .desc = "WPS Button",
80 .active_low = 1, 80 .active_low = 1,
81 }, 81 },
82}; 82};
diff --git a/arch/arm/mach-kirkwood/netxbig_v2-setup.c b/arch/arm/mach-kirkwood/netxbig_v2-setup.c
new file mode 100644
index 000000000000..8a2bb0228e4f
--- /dev/null
+++ b/arch/arm/mach-kirkwood/netxbig_v2-setup.c
@@ -0,0 +1,415 @@
1/*
2 * arch/arm/mach-kirkwood/netxbig_v2-setup.c
3 *
4 * LaCie 2Big and 5Big Network v2 board setup
5 *
6 * Copyright (C) 2010 Simon Guinot <sguinot@lacie.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 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22
23#include <linux/kernel.h>
24#include <linux/init.h>
25#include <linux/platform_device.h>
26#include <linux/mtd/physmap.h>
27#include <linux/spi/flash.h>
28#include <linux/spi/spi.h>
29#include <linux/ata_platform.h>
30#include <linux/mv643xx_eth.h>
31#include <linux/i2c.h>
32#include <linux/i2c/at24.h>
33#include <linux/input.h>
34#include <linux/gpio.h>
35#include <linux/gpio_keys.h>
36#include <linux/leds.h>
37#include <asm/mach-types.h>
38#include <asm/mach/arch.h>
39#include <asm/mach/time.h>
40#include <mach/kirkwood.h>
41#include <plat/time.h>
42#include "common.h"
43#include "mpp.h"
44
45/*****************************************************************************
46 * 512KB SPI Flash on Boot Device (MACRONIX MX25L4005)
47 ****************************************************************************/
48
49static struct mtd_partition netxbig_v2_flash_parts[] = {
50 {
51 .name = "u-boot",
52 .size = MTDPART_SIZ_FULL,
53 .offset = 0,
54 .mask_flags = MTD_WRITEABLE, /* force read-only */
55 },
56};
57
58static const struct flash_platform_data netxbig_v2_flash = {
59 .type = "mx25l4005a",
60 .name = "spi_flash",
61 .parts = netxbig_v2_flash_parts,
62 .nr_parts = ARRAY_SIZE(netxbig_v2_flash_parts),
63};
64
65static struct spi_board_info __initdata netxbig_v2_spi_slave_info[] = {
66 {
67 .modalias = "m25p80",
68 .platform_data = &netxbig_v2_flash,
69 .irq = -1,
70 .max_speed_hz = 20000000,
71 .bus_num = 0,
72 .chip_select = 0,
73 },
74};
75
76/*****************************************************************************
77 * Ethernet
78 ****************************************************************************/
79
80static struct mv643xx_eth_platform_data netxbig_v2_ge00_data = {
81 .phy_addr = MV643XX_ETH_PHY_ADDR(8),
82};
83
84static struct mv643xx_eth_platform_data netxbig_v2_ge01_data = {
85 .phy_addr = MV643XX_ETH_PHY_ADDR(0),
86};
87
88/*****************************************************************************
89 * I2C devices
90 ****************************************************************************/
91
92static struct at24_platform_data at24c04 = {
93 .byte_len = SZ_4K / 8,
94 .page_size = 16,
95};
96
97/*
98 * i2c addr | chip | description
99 * 0x50 | HT24LC04 | eeprom (512B)
100 */
101
102static struct i2c_board_info __initdata netxbig_v2_i2c_info[] = {
103 {
104 I2C_BOARD_INFO("24c04", 0x50),
105 .platform_data = &at24c04,
106 }
107};
108
109/*****************************************************************************
110 * SATA
111 ****************************************************************************/
112
113static struct mv_sata_platform_data netxbig_v2_sata_data = {
114 .n_ports = 2,
115};
116
117static int __initdata netxbig_v2_gpio_hdd_power[] = { 16, 17, 41, 42, 43 };
118
119static void __init netxbig_v2_sata_power_init(void)
120{
121 int i;
122 int err;
123 int hdd_nb;
124
125 if (machine_is_net2big_v2())
126 hdd_nb = 2;
127 else
128 hdd_nb = 5;
129
130 /* Power up all hard disks. */
131 for (i = 0; i < hdd_nb; i++) {
132 err = gpio_request(netxbig_v2_gpio_hdd_power[i], NULL);
133 if (err == 0) {
134 err = gpio_direction_output(
135 netxbig_v2_gpio_hdd_power[i], 1);
136 /* Free the HDD power GPIOs. This allow user-space to
137 * configure them via the gpiolib sysfs interface. */
138 gpio_free(netxbig_v2_gpio_hdd_power[i]);
139 }
140 if (err)
141 pr_err("netxbig_v2: failed to power up HDD%d\n", i + 1);
142 }
143}
144
145/*****************************************************************************
146 * GPIO keys
147 ****************************************************************************/
148
149#define NETXBIG_V2_GPIO_SWITCH_POWER_ON 13
150#define NETXBIG_V2_GPIO_SWITCH_POWER_OFF 15
151#define NETXBIG_V2_GPIO_FUNC_BUTTON 34
152
153#define NETXBIG_V2_SWITCH_POWER_ON 0x1
154#define NETXBIG_V2_SWITCH_POWER_OFF 0x2
155
156static struct gpio_keys_button netxbig_v2_buttons[] = {
157 [0] = {
158 .type = EV_SW,
159 .code = NETXBIG_V2_SWITCH_POWER_ON,
160 .gpio = NETXBIG_V2_GPIO_SWITCH_POWER_ON,
161 .desc = "Back power switch (on|auto)",
162 .active_low = 1,
163 },
164 [1] = {
165 .type = EV_SW,
166 .code = NETXBIG_V2_SWITCH_POWER_OFF,
167 .gpio = NETXBIG_V2_GPIO_SWITCH_POWER_OFF,
168 .desc = "Back power switch (auto|off)",
169 .active_low = 1,
170 },
171 [2] = {
172 .code = KEY_OPTION,
173 .gpio = NETXBIG_V2_GPIO_FUNC_BUTTON,
174 .desc = "Function button",
175 .active_low = 1,
176 },
177};
178
179static struct gpio_keys_platform_data netxbig_v2_button_data = {
180 .buttons = netxbig_v2_buttons,
181 .nbuttons = ARRAY_SIZE(netxbig_v2_buttons),
182};
183
184static struct platform_device netxbig_v2_gpio_buttons = {
185 .name = "gpio-keys",
186 .id = -1,
187 .dev = {
188 .platform_data = &netxbig_v2_button_data,
189 },
190};
191
192/*****************************************************************************
193 * GPIO LEDs
194 ****************************************************************************/
195
196/*
197 * The LEDs are controlled by a CPLD and can be configured through a GPIO
198 * extension bus:
199 *
200 * - address register : bit [0-2] -> GPIO [47-49]
201 * - data register : bit [0-2] -> GPIO [44-46]
202 * - enable register : GPIO 29
203 *
204 * Address register selection:
205 *
206 * addr | register
207 * ----------------------------
208 * 0 | front LED
209 * 1 | front LED brightness
210 * 2 | HDD LED brightness
211 * 3 | HDD1 LED
212 * 4 | HDD2 LED
213 * 5 | HDD3 LED
214 * 6 | HDD4 LED
215 * 7 | HDD5 LED
216 *
217 * Data register configuration:
218 *
219 * data | LED brightness
220 * -------------------------------------------------
221 * 0 | min (off)
222 * - | -
223 * 7 | max
224 *
225 * data | front LED mode
226 * -------------------------------------------------
227 * 0 | fix off
228 * 1 | fix blue on
229 * 2 | fix red on
230 * 3 | blink blue on=1 sec and blue off=1 sec
231 * 4 | blink red on=1 sec and red off=1 sec
232 * 5 | blink blue on=2.5 sec and red on=0.5 sec
233 * 6 | blink blue on=1 sec and red on=1 sec
234 * 7 | blink blue on=0.5 sec and blue off=2.5 sec
235 *
236 * data | HDD LED mode
237 * -------------------------------------------------
238 * 0 | fix blue on
239 * 1 | SATA activity blink
240 * 2 | fix red on
241 * 3 | blink blue on=1 sec and blue off=1 sec
242 * 4 | blink red on=1 sec and red off=1 sec
243 * 5 | blink blue on=2.5 sec and red on=0.5 sec
244 * 6 | blink blue on=1 sec and red on=1 sec
245 * 7 | blink blue on=0.5 sec and blue off=2.5 sec
246 */
247
248/*****************************************************************************
249 * Timer
250 ****************************************************************************/
251
252static void netxbig_v2_timer_init(void)
253{
254 kirkwood_tclk = 166666667;
255 orion_time_init(IRQ_KIRKWOOD_BRIDGE, kirkwood_tclk);
256}
257
258struct sys_timer netxbig_v2_timer = {
259 .init = netxbig_v2_timer_init,
260};
261
262/*****************************************************************************
263 * General Setup
264 ****************************************************************************/
265
266static unsigned int net2big_v2_mpp_config[] __initdata = {
267 MPP0_SPI_SCn,
268 MPP1_SPI_MOSI,
269 MPP2_SPI_SCK,
270 MPP3_SPI_MISO,
271 MPP6_SYSRST_OUTn,
272 MPP7_GPO, /* Request power-off */
273 MPP8_TW_SDA,
274 MPP9_TW_SCK,
275 MPP10_UART0_TXD,
276 MPP11_UART0_RXD,
277 MPP13_GPIO, /* Rear power switch (on|auto) */
278 MPP14_GPIO, /* USB fuse alarm */
279 MPP15_GPIO, /* Rear power switch (auto|off) */
280 MPP16_GPIO, /* SATA HDD1 power */
281 MPP17_GPIO, /* SATA HDD2 power */
282 MPP20_SATA1_ACTn,
283 MPP21_SATA0_ACTn,
284 MPP24_GPIO, /* USB mode select */
285 MPP26_GPIO, /* USB device vbus */
286 MPP28_GPIO, /* USB enable host vbus */
287 MPP29_GPIO, /* CPLD extension ALE */
288 MPP34_GPIO, /* Rear Push button */
289 MPP35_GPIO, /* Inhibit switch power-off */
290 MPP36_GPIO, /* SATA HDD1 presence */
291 MPP37_GPIO, /* SATA HDD2 presence */
292 MPP40_GPIO, /* eSATA presence */
293 MPP44_GPIO, /* CPLD extension (data 0) */
294 MPP45_GPIO, /* CPLD extension (data 1) */
295 MPP46_GPIO, /* CPLD extension (data 2) */
296 MPP47_GPIO, /* CPLD extension (addr 0) */
297 MPP48_GPIO, /* CPLD extension (addr 1) */
298 MPP49_GPIO, /* CPLD extension (addr 2) */
299 0
300};
301
302static unsigned int net5big_v2_mpp_config[] __initdata = {
303 MPP0_SPI_SCn,
304 MPP1_SPI_MOSI,
305 MPP2_SPI_SCK,
306 MPP3_SPI_MISO,
307 MPP6_SYSRST_OUTn,
308 MPP7_GPO, /* Request power-off */
309 MPP8_TW_SDA,
310 MPP9_TW_SCK,
311 MPP10_UART0_TXD,
312 MPP11_UART0_RXD,
313 MPP13_GPIO, /* Rear power switch (on|auto) */
314 MPP14_GPIO, /* USB fuse alarm */
315 MPP15_GPIO, /* Rear power switch (auto|off) */
316 MPP16_GPIO, /* SATA HDD1 power */
317 MPP17_GPIO, /* SATA HDD2 power */
318 MPP20_GE1_0,
319 MPP21_GE1_1,
320 MPP22_GE1_2,
321 MPP23_GE1_3,
322 MPP24_GE1_4,
323 MPP25_GE1_5,
324 MPP26_GE1_6,
325 MPP27_GE1_7,
326 MPP28_GPIO, /* USB enable host vbus */
327 MPP29_GPIO, /* CPLD extension ALE */
328 MPP30_GE1_10,
329 MPP31_GE1_11,
330 MPP32_GE1_12,
331 MPP33_GE1_13,
332 MPP34_GPIO, /* Rear Push button */
333 MPP35_GPIO, /* Inhibit switch power-off */
334 MPP36_GPIO, /* SATA HDD1 presence */
335 MPP37_GPIO, /* SATA HDD2 presence */
336 MPP38_GPIO, /* SATA HDD3 presence */
337 MPP39_GPIO, /* SATA HDD4 presence */
338 MPP40_GPIO, /* SATA HDD5 presence */
339 MPP41_GPIO, /* SATA HDD3 power */
340 MPP42_GPIO, /* SATA HDD4 power */
341 MPP43_GPIO, /* SATA HDD5 power */
342 MPP44_GPIO, /* CPLD extension (data 0) */
343 MPP45_GPIO, /* CPLD extension (data 1) */
344 MPP46_GPIO, /* CPLD extension (data 2) */
345 MPP47_GPIO, /* CPLD extension (addr 0) */
346 MPP48_GPIO, /* CPLD extension (addr 1) */
347 MPP49_GPIO, /* CPLD extension (addr 2) */
348 0
349};
350
351#define NETXBIG_V2_GPIO_POWER_OFF 7
352
353static void netxbig_v2_power_off(void)
354{
355 gpio_set_value(NETXBIG_V2_GPIO_POWER_OFF, 1);
356}
357
358static void __init netxbig_v2_init(void)
359{
360 /*
361 * Basic setup. Needs to be called early.
362 */
363 kirkwood_init();
364 if (machine_is_net2big_v2())
365 kirkwood_mpp_conf(net2big_v2_mpp_config);
366 else
367 kirkwood_mpp_conf(net5big_v2_mpp_config);
368
369 netxbig_v2_sata_power_init();
370
371 kirkwood_ehci_init();
372 kirkwood_ge00_init(&netxbig_v2_ge00_data);
373 if (machine_is_net5big_v2())
374 kirkwood_ge01_init(&netxbig_v2_ge01_data);
375 kirkwood_sata_init(&netxbig_v2_sata_data);
376 kirkwood_uart0_init();
377 spi_register_board_info(netxbig_v2_spi_slave_info,
378 ARRAY_SIZE(netxbig_v2_spi_slave_info));
379 kirkwood_spi_init();
380 kirkwood_i2c_init();
381 i2c_register_board_info(0, netxbig_v2_i2c_info,
382 ARRAY_SIZE(netxbig_v2_i2c_info));
383
384 platform_device_register(&netxbig_v2_gpio_buttons);
385
386 if (gpio_request(NETXBIG_V2_GPIO_POWER_OFF, "power-off") == 0 &&
387 gpio_direction_output(NETXBIG_V2_GPIO_POWER_OFF, 0) == 0)
388 pm_power_off = netxbig_v2_power_off;
389 else
390 pr_err("netxbig_v2: failed to configure power-off GPIO\n");
391}
392
393#ifdef CONFIG_MACH_NET2BIG_V2
394MACHINE_START(NET2BIG_V2, "LaCie 2Big Network v2")
395 .phys_io = KIRKWOOD_REGS_PHYS_BASE,
396 .io_pg_offst = ((KIRKWOOD_REGS_VIRT_BASE) >> 18) & 0xfffc,
397 .boot_params = 0x00000100,
398 .init_machine = netxbig_v2_init,
399 .map_io = kirkwood_map_io,
400 .init_irq = kirkwood_init_irq,
401 .timer = &netxbig_v2_timer,
402MACHINE_END
403#endif
404
405#ifdef CONFIG_MACH_NET5BIG_V2
406MACHINE_START(NET5BIG_V2, "LaCie 5Big Network v2")
407 .phys_io = KIRKWOOD_REGS_PHYS_BASE,
408 .io_pg_offst = ((KIRKWOOD_REGS_VIRT_BASE) >> 18) & 0xfffc,
409 .boot_params = 0x00000100,
410 .init_machine = netxbig_v2_init,
411 .map_io = kirkwood_map_io,
412 .init_irq = kirkwood_init_irq,
413 .timer = &netxbig_v2_timer,
414MACHINE_END
415#endif
diff --git a/arch/arm/mach-kirkwood/pcie.c b/arch/arm/mach-kirkwood/pcie.c
index a604b2a701aa..dee1eff50d39 100644
--- a/arch/arm/mach-kirkwood/pcie.c
+++ b/arch/arm/mach-kirkwood/pcie.c
@@ -10,6 +10,7 @@
10 10
11#include <linux/kernel.h> 11#include <linux/kernel.h>
12#include <linux/pci.h> 12#include <linux/pci.h>
13#include <linux/slab.h>
13#include <linux/mbus.h> 14#include <linux/mbus.h>
14#include <asm/irq.h> 15#include <asm/irq.h>
15#include <asm/mach/pci.h> 16#include <asm/mach/pci.h>
diff --git a/arch/arm/mach-lh7a40x/clcd.c b/arch/arm/mach-lh7a40x/clcd.c
index c472b9e8b37c..7fe4fd347c82 100644
--- a/arch/arm/mach-lh7a40x/clcd.c
+++ b/arch/arm/mach-lh7a40x/clcd.c
@@ -10,6 +10,7 @@
10 */ 10 */
11 11
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/gfp.h>
13#include <linux/device.h> 14#include <linux/device.h>
14#include <linux/dma-mapping.h> 15#include <linux/dma-mapping.h>
15#include <linux/sysdev.h> 16#include <linux/sysdev.h>
diff --git a/arch/arm/mach-mmp/aspenite.c b/arch/arm/mach-mmp/aspenite.c
index a2d307ec0420..244655d323ea 100644
--- a/arch/arm/mach-mmp/aspenite.c
+++ b/arch/arm/mach-mmp/aspenite.c
@@ -59,6 +59,13 @@ static unsigned long common_pin_config[] __initdata = {
59 /* UART1 */ 59 /* UART1 */
60 GPIO107_UART1_RXD, 60 GPIO107_UART1_RXD,
61 GPIO108_UART1_TXD, 61 GPIO108_UART1_TXD,
62
63 /* SSP1 */
64 GPIO113_I2S_MCLK,
65 GPIO114_I2S_FRM,
66 GPIO115_I2S_BCLK,
67 GPIO116_I2S_RXD,
68 GPIO117_I2S_TXD,
62}; 69};
63 70
64static struct smc91x_platdata smc91x_info = { 71static struct smc91x_platdata smc91x_info = {
@@ -123,12 +130,18 @@ static struct pxa3xx_nand_platform_data aspenite_nand_info = {
123 .nr_parts = ARRAY_SIZE(aspenite_nand_partitions), 130 .nr_parts = ARRAY_SIZE(aspenite_nand_partitions),
124}; 131};
125 132
133static struct i2c_board_info aspenite_i2c_info[] __initdata = {
134 { I2C_BOARD_INFO("wm8753", 0x1b), },
135};
136
126static void __init common_init(void) 137static void __init common_init(void)
127{ 138{
128 mfp_config(ARRAY_AND_SIZE(common_pin_config)); 139 mfp_config(ARRAY_AND_SIZE(common_pin_config));
129 140
130 /* on-chip devices */ 141 /* on-chip devices */
131 pxa168_add_uart(1); 142 pxa168_add_uart(1);
143 pxa168_add_twsi(1, NULL, ARRAY_AND_SIZE(aspenite_i2c_info));
144 pxa168_add_ssp(1);
132 pxa168_add_nand(&aspenite_nand_info); 145 pxa168_add_nand(&aspenite_nand_info);
133 146
134 /* off-chip devices */ 147 /* off-chip devices */
diff --git a/arch/arm/mach-mmp/include/mach/gpio.h b/arch/arm/mach-mmp/include/mach/gpio.h
index ab26d13295c4..ee8b02ed8011 100644
--- a/arch/arm/mach-mmp/include/mach/gpio.h
+++ b/arch/arm/mach-mmp/include/mach/gpio.h
@@ -10,7 +10,7 @@
10#define BANK_OFF(n) (((n) < 3) ? (n) << 2 : 0x100 + (((n) - 3) << 2)) 10#define BANK_OFF(n) (((n) < 3) ? (n) << 2 : 0x100 + (((n) - 3) << 2))
11#define GPIO_REG(x) (*((volatile u32 *)(GPIO_REGS_VIRT + (x)))) 11#define GPIO_REG(x) (*((volatile u32 *)(GPIO_REGS_VIRT + (x))))
12 12
13#define NR_BUILTIN_GPIO (128) 13#define NR_BUILTIN_GPIO (192)
14 14
15#define gpio_to_bank(gpio) ((gpio) >> 5) 15#define gpio_to_bank(gpio) ((gpio) >> 5)
16#define gpio_to_irq(gpio) (IRQ_GPIO_START + (gpio)) 16#define gpio_to_irq(gpio) (IRQ_GPIO_START + (gpio))
diff --git a/arch/arm/mach-mmp/include/mach/irqs.h b/arch/arm/mach-mmp/include/mach/irqs.h
index 02701196ea03..b379cdec4d38 100644
--- a/arch/arm/mach-mmp/include/mach/irqs.h
+++ b/arch/arm/mach-mmp/include/mach/irqs.h
@@ -5,10 +5,10 @@
5 * Interrupt numbers for PXA168 5 * Interrupt numbers for PXA168
6 */ 6 */
7#define IRQ_PXA168_NONE (-1) 7#define IRQ_PXA168_NONE (-1)
8#define IRQ_PXA168_SSP3 0 8#define IRQ_PXA168_SSP4 0
9#define IRQ_PXA168_SSP2 1 9#define IRQ_PXA168_SSP3 1
10#define IRQ_PXA168_SSP1 2 10#define IRQ_PXA168_SSP2 2
11#define IRQ_PXA168_SSP0 3 11#define IRQ_PXA168_SSP1 3
12#define IRQ_PXA168_PMIC_INT 4 12#define IRQ_PXA168_PMIC_INT 4
13#define IRQ_PXA168_RTC_INT 5 13#define IRQ_PXA168_RTC_INT 5
14#define IRQ_PXA168_RTC_ALARM 6 14#define IRQ_PXA168_RTC_ALARM 6
@@ -20,7 +20,7 @@
20#define IRQ_PXA168_TIMER2 14 20#define IRQ_PXA168_TIMER2 14
21#define IRQ_PXA168_TIMER3 15 21#define IRQ_PXA168_TIMER3 15
22#define IRQ_PXA168_CMU 16 22#define IRQ_PXA168_CMU 16
23#define IRQ_PXA168_SSP4 17 23#define IRQ_PXA168_SSP5 17
24#define IRQ_PXA168_MSP_WAKEUP 19 24#define IRQ_PXA168_MSP_WAKEUP 19
25#define IRQ_PXA168_CF_WAKEUP 20 25#define IRQ_PXA168_CF_WAKEUP 20
26#define IRQ_PXA168_XD_WAKEUP 21 26#define IRQ_PXA168_XD_WAKEUP 21
diff --git a/arch/arm/mach-mmp/include/mach/mfp-mmp2.h b/arch/arm/mach-mmp/include/mach/mfp-mmp2.h
index 9f9f8143e272..761c2dacc079 100644
--- a/arch/arm/mach-mmp/include/mach/mfp-mmp2.h
+++ b/arch/arm/mach-mmp/include/mach/mfp-mmp2.h
@@ -9,6 +9,175 @@
9#define MFP_DRIVE_FAST (0x8 << 13) 9#define MFP_DRIVE_FAST (0x8 << 13)
10 10
11/* GPIO */ 11/* GPIO */
12#define GPIO0_GPIO0 MFP_CFG(GPIO0, AF0)
13#define GPIO1_GPIO1 MFP_CFG(GPIO1, AF0)
14#define GPIO2_GPIO2 MFP_CFG(GPIO2, AF0)
15#define GPIO3_GPIO3 MFP_CFG(GPIO3, AF0)
16#define GPIO4_GPIO4 MFP_CFG(GPIO4, AF0)
17#define GPIO5_GPIO5 MFP_CFG(GPIO5, AF0)
18#define GPIO6_GPIO6 MFP_CFG(GPIO6, AF0)
19#define GPIO7_GPIO7 MFP_CFG(GPIO7, AF0)
20#define GPIO8_GPIO8 MFP_CFG(GPIO8, AF0)
21#define GPIO9_GPIO9 MFP_CFG(GPIO9, AF0)
22#define GPIO10_GPIO10 MFP_CFG(GPIO10, AF0)
23#define GPIO11_GPIO11 MFP_CFG(GPIO11, AF0)
24#define GPIO12_GPIO12 MFP_CFG(GPIO12, AF0)
25#define GPIO13_GPIO13 MFP_CFG(GPIO13, AF0)
26#define GPIO14_GPIO14 MFP_CFG(GPIO14, AF0)
27#define GPIO15_GPIO15 MFP_CFG(GPIO15, AF0)
28#define GPIO16_GPIO16 MFP_CFG(GPIO16, AF0)
29#define GPIO17_GPIO17 MFP_CFG(GPIO17, AF0)
30#define GPIO18_GPIO18 MFP_CFG(GPIO18, AF0)
31#define GPIO19_GPIO19 MFP_CFG(GPIO19, AF0)
32#define GPIO20_GPIO20 MFP_CFG(GPIO20, AF0)
33#define GPIO21_GPIO21 MFP_CFG(GPIO21, AF0)
34#define GPIO22_GPIO22 MFP_CFG(GPIO22, AF0)
35#define GPIO23_GPIO23 MFP_CFG(GPIO23, AF0)
36#define GPIO24_GPIO24 MFP_CFG(GPIO24, AF0)
37#define GPIO25_GPIO25 MFP_CFG(GPIO25, AF0)
38#define GPIO26_GPIO26 MFP_CFG(GPIO26, AF0)
39#define GPIO27_GPIO27 MFP_CFG(GPIO27, AF0)
40#define GPIO28_GPIO28 MFP_CFG(GPIO28, AF0)
41#define GPIO29_GPIO29 MFP_CFG(GPIO29, AF0)
42#define GPIO30_GPIO30 MFP_CFG(GPIO30, AF0)
43#define GPIO31_GPIO31 MFP_CFG(GPIO31, AF0)
44#define GPIO32_GPIO32 MFP_CFG(GPIO32, AF0)
45#define GPIO33_GPIO33 MFP_CFG(GPIO33, AF0)
46#define GPIO34_GPIO34 MFP_CFG(GPIO34, AF0)
47#define GPIO35_GPIO35 MFP_CFG(GPIO35, AF0)
48#define GPIO36_GPIO36 MFP_CFG(GPIO36, AF0)
49#define GPIO37_GPIO37 MFP_CFG(GPIO37, AF0)
50#define GPIO38_GPIO38 MFP_CFG(GPIO38, AF0)
51#define GPIO39_GPIO39 MFP_CFG(GPIO39, AF0)
52#define GPIO40_GPIO40 MFP_CFG(GPIO40, AF0)
53#define GPIO41_GPIO41 MFP_CFG(GPIO41, AF0)
54#define GPIO42_GPIO42 MFP_CFG(GPIO42, AF0)
55#define GPIO43_GPIO43 MFP_CFG(GPIO43, AF0)
56#define GPIO44_GPIO44 MFP_CFG(GPIO44, AF0)
57#define GPIO45_GPIO45 MFP_CFG(GPIO45, AF0)
58#define GPIO46_GPIO46 MFP_CFG(GPIO46, AF0)
59#define GPIO47_GPIO47 MFP_CFG(GPIO47, AF0)
60#define GPIO48_GPIO48 MFP_CFG(GPIO48, AF0)
61#define GPIO49_GPIO49 MFP_CFG(GPIO49, AF0)
62#define GPIO50_GPIO50 MFP_CFG(GPIO50, AF0)
63#define GPIO51_GPIO51 MFP_CFG(GPIO51, AF0)
64#define GPIO52_GPIO52 MFP_CFG(GPIO52, AF0)
65#define GPIO53_GPIO53 MFP_CFG(GPIO53, AF0)
66#define GPIO54_GPIO54 MFP_CFG(GPIO54, AF0)
67#define GPIO55_GPIO55 MFP_CFG(GPIO55, AF0)
68#define GPIO56_GPIO56 MFP_CFG(GPIO56, AF0)
69#define GPIO57_GPIO57 MFP_CFG(GPIO57, AF0)
70#define GPIO58_GPIO58 MFP_CFG(GPIO58, AF0)
71#define GPIO59_GPIO59 MFP_CFG(GPIO59, AF0)
72#define GPIO60_GPIO60 MFP_CFG(GPIO60, AF0)
73#define GPIO61_GPIO61 MFP_CFG(GPIO61, AF0)
74#define GPIO62_GPIO62 MFP_CFG(GPIO62, AF0)
75#define GPIO63_GPIO63 MFP_CFG(GPIO63, AF0)
76#define GPIO64_GPIO64 MFP_CFG(GPIO64, AF0)
77#define GPIO65_GPIO65 MFP_CFG(GPIO65, AF0)
78#define GPIO66_GPIO66 MFP_CFG(GPIO66, AF0)
79#define GPIO67_GPIO67 MFP_CFG(GPIO67, AF0)
80#define GPIO68_GPIO68 MFP_CFG(GPIO68, AF0)
81#define GPIO69_GPIO69 MFP_CFG(GPIO69, AF0)
82#define GPIO70_GPIO70 MFP_CFG(GPIO70, AF0)
83#define GPIO71_GPIO71 MFP_CFG(GPIO71, AF0)
84#define GPIO72_GPIO72 MFP_CFG(GPIO72, AF0)
85#define GPIO73_GPIO73 MFP_CFG(GPIO73, AF0)
86#define GPIO74_GPIO74 MFP_CFG(GPIO74, AF0)
87#define GPIO75_GPIO75 MFP_CFG(GPIO75, AF0)
88#define GPIO76_GPIO76 MFP_CFG(GPIO76, AF0)
89#define GPIO77_GPIO77 MFP_CFG(GPIO77, AF0)
90#define GPIO78_GPIO78 MFP_CFG(GPIO78, AF0)
91#define GPIO79_GPIO79 MFP_CFG(GPIO79, AF0)
92#define GPIO80_GPIO80 MFP_CFG(GPIO80, AF0)
93#define GPIO81_GPIO81 MFP_CFG(GPIO81, AF0)
94#define GPIO82_GPIO82 MFP_CFG(GPIO82, AF0)
95#define GPIO83_GPIO83 MFP_CFG(GPIO83, AF0)
96#define GPIO84_GPIO84 MFP_CFG(GPIO84, AF0)
97#define GPIO85_GPIO85 MFP_CFG(GPIO85, AF0)
98#define GPIO86_GPIO86 MFP_CFG(GPIO86, AF0)
99#define GPIO87_GPIO87 MFP_CFG(GPIO87, AF0)
100#define GPIO88_GPIO88 MFP_CFG(GPIO88, AF0)
101#define GPIO89_GPIO89 MFP_CFG(GPIO89, AF0)
102#define GPIO90_GPIO90 MFP_CFG(GPIO90, AF0)
103#define GPIO91_GPIO91 MFP_CFG(GPIO91, AF0)
104#define GPIO92_GPIO92 MFP_CFG(GPIO92, AF0)
105#define GPIO93_GPIO93 MFP_CFG(GPIO93, AF0)
106#define GPIO94_GPIO94 MFP_CFG(GPIO94, AF0)
107#define GPIO95_GPIO95 MFP_CFG(GPIO95, AF0)
108#define GPIO96_GPIO96 MFP_CFG(GPIO96, AF0)
109#define GPIO97_GPIO97 MFP_CFG(GPIO97, AF0)
110#define GPIO98_GPIO98 MFP_CFG(GPIO98, AF0)
111#define GPIO99_GPIO99 MFP_CFG(GPIO99, AF0)
112#define GPIO100_GPIO100 MFP_CFG(GPIO100, AF0)
113#define GPIO101_GPIO101 MFP_CFG(GPIO101, AF0)
114#define GPIO102_GPIO102 MFP_CFG(GPIO102, AF1)
115#define GPIO103_GPIO103 MFP_CFG(GPIO103, AF1)
116#define GPIO104_GPIO104 MFP_CFG(GPIO104, AF1)
117#define GPIO105_GPIO105 MFP_CFG(GPIO105, AF1)
118#define GPIO106_GPIO106 MFP_CFG(GPIO106, AF1)
119#define GPIO107_GPIO107 MFP_CFG(GPIO107, AF1)
120#define GPIO108_GPIO108 MFP_CFG(GPIO108, AF1)
121#define GPIO109_GPIO109 MFP_CFG(GPIO109, AF1)
122#define GPIO110_GPIO110 MFP_CFG(GPIO110, AF1)
123#define GPIO111_GPIO111 MFP_CFG(GPIO111, AF1)
124#define GPIO112_GPIO112 MFP_CFG(GPIO112, AF1)
125#define GPIO113_GPIO113 MFP_CFG(GPIO113, AF1)
126#define GPIO114_GPIO114 MFP_CFG(GPIO114, AF0)
127#define GPIO115_GPIO115 MFP_CFG(GPIO115, AF0)
128#define GPIO116_GPIO116 MFP_CFG(GPIO116, AF0)
129#define GPIO117_GPIO117 MFP_CFG(GPIO117, AF0)
130#define GPIO118_GPIO118 MFP_CFG(GPIO118, AF0)
131#define GPIO119_GPIO119 MFP_CFG(GPIO119, AF0)
132#define GPIO120_GPIO120 MFP_CFG(GPIO120, AF0)
133#define GPIO121_GPIO121 MFP_CFG(GPIO121, AF0)
134#define GPIO122_GPIO122 MFP_CFG(GPIO122, AF0)
135#define GPIO123_GPIO123 MFP_CFG(GPIO123, AF0)
136#define GPIO124_GPIO124 MFP_CFG(GPIO124, AF0)
137#define GPIO125_GPIO125 MFP_CFG(GPIO125, AF0)
138#define GPIO126_GPIO126 MFP_CFG(GPIO126, AF0)
139#define GPIO127_GPIO127 MFP_CFG(GPIO127, AF0)
140#define GPIO128_GPIO128 MFP_CFG(GPIO128, AF0)
141#define GPIO129_GPIO129 MFP_CFG(GPIO129, AF0)
142#define GPIO130_GPIO130 MFP_CFG(GPIO130, AF0)
143#define GPIO131_GPIO131 MFP_CFG(GPIO131, AF0)
144#define GPIO132_GPIO132 MFP_CFG(GPIO132, AF0)
145#define GPIO133_GPIO133 MFP_CFG(GPIO133, AF0)
146#define GPIO134_GPIO134 MFP_CFG(GPIO134, AF0)
147#define GPIO135_GPIO135 MFP_CFG(GPIO135, AF0)
148#define GPIO136_GPIO136 MFP_CFG(GPIO136, AF0)
149#define GPIO137_GPIO137 MFP_CFG(GPIO137, AF0)
150#define GPIO138_GPIO138 MFP_CFG(GPIO138, AF0)
151#define GPIO139_GPIO139 MFP_CFG(GPIO139, AF0)
152#define GPIO140_GPIO140 MFP_CFG(GPIO140, AF0)
153#define GPIO141_GPIO141 MFP_CFG(GPIO141, AF0)
154#define GPIO142_GPIO142 MFP_CFG(GPIO142, AF1)
155#define GPIO143_GPIO143 MFP_CFG(GPIO143, AF1)
156#define GPIO144_GPIO144 MFP_CFG(GPIO144, AF1)
157#define GPIO145_GPIO145 MFP_CFG(GPIO145, AF1)
158#define GPIO146_GPIO146 MFP_CFG(GPIO146, AF1)
159#define GPIO147_GPIO147 MFP_CFG(GPIO147, AF1)
160#define GPIO148_GPIO148 MFP_CFG(GPIO148, AF1)
161#define GPIO149_GPIO149 MFP_CFG(GPIO149, AF1)
162#define GPIO150_GPIO150 MFP_CFG(GPIO150, AF1)
163#define GPIO151_GPIO151 MFP_CFG(GPIO151, AF1)
164#define GPIO152_GPIO152 MFP_CFG(GPIO152, AF1)
165#define GPIO153_GPIO153 MFP_CFG(GPIO153, AF1)
166#define GPIO154_GPIO154 MFP_CFG(GPIO154, AF1)
167#define GPIO155_GPIO155 MFP_CFG(GPIO155, AF1)
168#define GPIO156_GPIO156 MFP_CFG(GPIO156, AF1)
169#define GPIO157_GPIO157 MFP_CFG(GPIO157, AF1)
170#define GPIO158_GPIO158 MFP_CFG(GPIO158, AF1)
171#define GPIO159_GPIO159 MFP_CFG(GPIO159, AF1)
172#define GPIO160_GPIO160 MFP_CFG(GPIO160, AF1)
173#define GPIO161_GPIO161 MFP_CFG(GPIO161, AF1)
174#define GPIO162_GPIO162 MFP_CFG(GPIO162, AF1)
175#define GPIO163_GPIO163 MFP_CFG(GPIO163, AF1)
176#define GPIO164_GPIO164 MFP_CFG(GPIO164, AF1)
177#define GPIO165_GPIO165 MFP_CFG(GPIO165, AF1)
178#define GPIO166_GPIO166 MFP_CFG(GPIO166, AF1)
179#define GPIO167_GPIO167 MFP_CFG(GPIO167, AF1)
180#define GPIO168_GPIO168 MFP_CFG(GPIO168, AF1)
12 181
13/* DFI */ 182/* DFI */
14#define GPIO108_DFI_D15 MFP_CFG(GPIO108, AF0) 183#define GPIO108_DFI_D15 MFP_CFG(GPIO108, AF0)
@@ -47,7 +216,6 @@
47 216
48/* Ethernet */ 217/* Ethernet */
49#define GPIO155_SM_ADVMUX MFP_CFG(GPIO155, AF2) 218#define GPIO155_SM_ADVMUX MFP_CFG(GPIO155, AF2)
50#define GPIO155_GPIO155 MFP_CFG(GPIO155, AF1)
51 219
52/* UART1 */ 220/* UART1 */
53#define GPIO45_UART1_RXD MFP_CFG(GPIO45, AF1) 221#define GPIO45_UART1_RXD MFP_CFG(GPIO45, AF1)
@@ -159,6 +327,8 @@
159#define GPIO44_TWSI2_SDA MFP_CFG_DRV(GPIO44, AF1, SLOW) 327#define GPIO44_TWSI2_SDA MFP_CFG_DRV(GPIO44, AF1, SLOW)
160#define GPIO71_TWSI3_SCL MFP_CFG_DRV(GPIO71, AF1, SLOW) 328#define GPIO71_TWSI3_SCL MFP_CFG_DRV(GPIO71, AF1, SLOW)
161#define GPIO72_TWSI3_SDA MFP_CFG_DRV(GPIO72, AF1, SLOW) 329#define GPIO72_TWSI3_SDA MFP_CFG_DRV(GPIO72, AF1, SLOW)
330#define TWSI4_SCL MFP_CFG_DRV(TWSI4_SCL, AF0, SLOW)
331#define TWSI4_SDA MFP_CFG_DRV(TWSI4_SDA, AF0, SLOW)
162#define GPIO99_TWSI5_SCL MFP_CFG_DRV(GPIO99, AF4, SLOW) 332#define GPIO99_TWSI5_SCL MFP_CFG_DRV(GPIO99, AF4, SLOW)
163#define GPIO100_TWSI5_SDA MFP_CFG_DRV(GPIO100, AF4, SLOW) 333#define GPIO100_TWSI5_SDA MFP_CFG_DRV(GPIO100, AF4, SLOW)
164#define GPIO97_TWSI6_SCL MFP_CFG_DRV(GPIO97, AF2, SLOW) 334#define GPIO97_TWSI6_SCL MFP_CFG_DRV(GPIO97, AF2, SLOW)
@@ -218,21 +388,6 @@
218#define GPIO69_CAM_MCLK MFP_CFG_DRV(GPIO69, AF1, FAST) 388#define GPIO69_CAM_MCLK MFP_CFG_DRV(GPIO69, AF1, FAST)
219#define GPIO70_CAM_PCLK MFP_CFG_DRV(GPIO70, AF1, FAST) 389#define GPIO70_CAM_PCLK MFP_CFG_DRV(GPIO70, AF1, FAST)
220 390
221/* Wifi */
222#define GPIO45_GPIO45 MFP_CFG(GPIO45, AF0)
223#define GPIO46_GPIO46 MFP_CFG(GPIO46, AF0)
224#define GPIO21_GPIO21 MFP_CFG(GPIO21, AF0)
225#define GPIO22_GPIO22 MFP_CFG(GPIO22, AF0)
226#define GPIO55_GPIO55 MFP_CFG(GPIO55, AF0)
227#define GPIO56_GPIO56 MFP_CFG(GPIO56, AF0)
228#define GPIO57_GPIO57 MFP_CFG(GPIO57, AF0)
229#define GPIO58_GPIO58 MFP_CFG(GPIO58, AF0)
230
231/* Codec*/
232#define GPIO23_GPIO23 MFP_CFG(GPIO23, AF0)
233
234#define GPIO101_GPIO101 MFP_CFG(GPIO101, AF0)
235
236/* PMIC */ 391/* PMIC */
237#define PMIC_PMIC_INT MFP_CFG(PMIC_INT, AF0) 392#define PMIC_PMIC_INT MFP_CFG(PMIC_INT, AF0)
238 393
diff --git a/arch/arm/mach-mmp/include/mach/mmp2.h b/arch/arm/mach-mmp/include/mach/mmp2.h
index 459f3be9cfb2..fec220bd5046 100644
--- a/arch/arm/mach-mmp/include/mach/mmp2.h
+++ b/arch/arm/mach-mmp/include/mach/mmp2.h
@@ -39,17 +39,17 @@ static inline int mmp2_add_twsi(int id, struct i2c_pxa_platform_data *data,
39 int ret; 39 int ret;
40 40
41 switch (id) { 41 switch (id) {
42 case 0: d = &mmp2_device_twsi1; break; 42 case 1: d = &mmp2_device_twsi1; break;
43 case 1: d = &mmp2_device_twsi2; break; 43 case 2: d = &mmp2_device_twsi2; break;
44 case 2: d = &mmp2_device_twsi3; break; 44 case 3: d = &mmp2_device_twsi3; break;
45 case 3: d = &mmp2_device_twsi4; break; 45 case 4: d = &mmp2_device_twsi4; break;
46 case 4: d = &mmp2_device_twsi5; break; 46 case 5: d = &mmp2_device_twsi5; break;
47 case 5: d = &mmp2_device_twsi6; break; 47 case 6: d = &mmp2_device_twsi6; break;
48 default: 48 default:
49 return -EINVAL; 49 return -EINVAL;
50 } 50 }
51 51
52 ret = i2c_register_board_info(id, info, size); 52 ret = i2c_register_board_info(id - 1, info, size);
53 if (ret) 53 if (ret)
54 return ret; 54 return ret;
55 55
diff --git a/arch/arm/mach-mmp/include/mach/pxa168.h b/arch/arm/mach-mmp/include/mach/pxa168.h
index 3ad612cbdf09..3b2bd5d5eb05 100644
--- a/arch/arm/mach-mmp/include/mach/pxa168.h
+++ b/arch/arm/mach-mmp/include/mach/pxa168.h
@@ -14,6 +14,11 @@ extern struct pxa_device_desc pxa168_device_pwm1;
14extern struct pxa_device_desc pxa168_device_pwm2; 14extern struct pxa_device_desc pxa168_device_pwm2;
15extern struct pxa_device_desc pxa168_device_pwm3; 15extern struct pxa_device_desc pxa168_device_pwm3;
16extern struct pxa_device_desc pxa168_device_pwm4; 16extern struct pxa_device_desc pxa168_device_pwm4;
17extern struct pxa_device_desc pxa168_device_ssp1;
18extern struct pxa_device_desc pxa168_device_ssp2;
19extern struct pxa_device_desc pxa168_device_ssp3;
20extern struct pxa_device_desc pxa168_device_ssp4;
21extern struct pxa_device_desc pxa168_device_ssp5;
17extern struct pxa_device_desc pxa168_device_nand; 22extern struct pxa_device_desc pxa168_device_nand;
18 23
19static inline int pxa168_add_uart(int id) 24static inline int pxa168_add_uart(int id)
@@ -67,6 +72,22 @@ static inline int pxa168_add_pwm(int id)
67 return pxa_register_device(d, NULL, 0); 72 return pxa_register_device(d, NULL, 0);
68} 73}
69 74
75static inline int pxa168_add_ssp(int id)
76{
77 struct pxa_device_desc *d = NULL;
78
79 switch (id) {
80 case 1: d = &pxa168_device_ssp1; break;
81 case 2: d = &pxa168_device_ssp2; break;
82 case 3: d = &pxa168_device_ssp3; break;
83 case 4: d = &pxa168_device_ssp4; break;
84 case 5: d = &pxa168_device_ssp5; break;
85 default:
86 return -EINVAL;
87 }
88 return pxa_register_device(d, NULL, 0);
89}
90
70static inline int pxa168_add_nand(struct pxa3xx_nand_platform_data *info) 91static inline int pxa168_add_nand(struct pxa3xx_nand_platform_data *info)
71{ 92{
72 return pxa_register_device(&pxa168_device_nand, info, sizeof(*info)); 93 return pxa_register_device(&pxa168_device_nand, info, sizeof(*info));
diff --git a/arch/arm/mach-mmp/include/mach/regs-apbc.h b/arch/arm/mach-mmp/include/mach/regs-apbc.h
index 712af03fd1af..1a96585336ba 100644
--- a/arch/arm/mach-mmp/include/mach/regs-apbc.h
+++ b/arch/arm/mach-mmp/include/mach/regs-apbc.h
@@ -26,8 +26,6 @@
26#define APBC_PXA168_PWM2 APBC_REG(0x010) 26#define APBC_PXA168_PWM2 APBC_REG(0x010)
27#define APBC_PXA168_PWM3 APBC_REG(0x014) 27#define APBC_PXA168_PWM3 APBC_REG(0x014)
28#define APBC_PXA168_PWM4 APBC_REG(0x018) 28#define APBC_PXA168_PWM4 APBC_REG(0x018)
29#define APBC_PXA168_SSP1 APBC_REG(0x01c)
30#define APBC_PXA168_SSP2 APBC_REG(0x020)
31#define APBC_PXA168_RTC APBC_REG(0x028) 29#define APBC_PXA168_RTC APBC_REG(0x028)
32#define APBC_PXA168_TWSI0 APBC_REG(0x02c) 30#define APBC_PXA168_TWSI0 APBC_REG(0x02c)
33#define APBC_PXA168_KPC APBC_REG(0x030) 31#define APBC_PXA168_KPC APBC_REG(0x030)
@@ -35,14 +33,16 @@
35#define APBC_PXA168_AIB APBC_REG(0x03c) 33#define APBC_PXA168_AIB APBC_REG(0x03c)
36#define APBC_PXA168_SW_JTAG APBC_REG(0x040) 34#define APBC_PXA168_SW_JTAG APBC_REG(0x040)
37#define APBC_PXA168_ONEWIRE APBC_REG(0x048) 35#define APBC_PXA168_ONEWIRE APBC_REG(0x048)
38#define APBC_PXA168_SSP3 APBC_REG(0x04c)
39#define APBC_PXA168_ASFAR APBC_REG(0x050) 36#define APBC_PXA168_ASFAR APBC_REG(0x050)
40#define APBC_PXA168_ASSAR APBC_REG(0x054) 37#define APBC_PXA168_ASSAR APBC_REG(0x054)
41#define APBC_PXA168_SSP4 APBC_REG(0x058)
42#define APBC_PXA168_SSP5 APBC_REG(0x05c)
43#define APBC_PXA168_TWSI1 APBC_REG(0x06c) 38#define APBC_PXA168_TWSI1 APBC_REG(0x06c)
44#define APBC_PXA168_UART3 APBC_REG(0x070) 39#define APBC_PXA168_UART3 APBC_REG(0x070)
45#define APBC_PXA168_AC97 APBC_REG(0x084) 40#define APBC_PXA168_AC97 APBC_REG(0x084)
41#define APBC_PXA168_SSP1 APBC_REG(0x81c)
42#define APBC_PXA168_SSP2 APBC_REG(0x820)
43#define APBC_PXA168_SSP3 APBC_REG(0x84c)
44#define APBC_PXA168_SSP4 APBC_REG(0x858)
45#define APBC_PXA168_SSP5 APBC_REG(0x85c)
46 46
47/* 47/*
48 * APB Clock register offsets for PXA910 48 * APB Clock register offsets for PXA910
diff --git a/arch/arm/mach-mmp/include/mach/regs-smc.h b/arch/arm/mach-mmp/include/mach/regs-smc.h
new file mode 100644
index 000000000000..e484d40d71bd
--- /dev/null
+++ b/arch/arm/mach-mmp/include/mach/regs-smc.h
@@ -0,0 +1,37 @@
1/*
2 * linux/arch/arm/mach-mmp/include/mach/regs-smc.h
3 *
4 * Static Memory Controller Registers
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __ASM_MACH_REGS_SMC_H
12#define __ASM_MACH_REGS_SMC_H
13
14#include <mach/addr-map.h>
15
16#define SMC_VIRT_BASE (AXI_VIRT_BASE + 0x83800)
17#define SMC_REG(x) (SMC_VIRT_BASE + (x))
18
19#define SMC_MSC0 SMC_REG(0x0020)
20#define SMC_MSC1 SMC_REG(0x0024)
21#define SMC_SXCNFG0 SMC_REG(0x0030)
22#define SMC_SXCNFG1 SMC_REG(0x0034)
23#define SMC_MEMCLKCFG SMC_REG(0x0068)
24#define SMC_CSDFICFG0 SMC_REG(0x0090)
25#define SMC_CSDFICFG1 SMC_REG(0x0094)
26#define SMC_CLK_RET_DEL SMC_REG(0x00b0)
27#define SMC_ADV_RET_DEL SMC_REG(0x00b4)
28#define SMC_CSADRMAP0 SMC_REG(0x00c0)
29#define SMC_CSADRMAP1 SMC_REG(0x00c4)
30#define SMC_WE_AP0 SMC_REG(0x00e0)
31#define SMC_WE_AP1 SMC_REG(0x00e4)
32#define SMC_OE_AP0 SMC_REG(0x00f0)
33#define SMC_OE_AP1 SMC_REG(0x00f4)
34#define SMC_ADV_AP0 SMC_REG(0x0100)
35#define SMC_ADV_AP1 SMC_REG(0x0104)
36
37#endif /* __ASM_MACH_REGS_SMC_H */
diff --git a/arch/arm/mach-mmp/include/mach/timex.h b/arch/arm/mach-mmp/include/mach/timex.h
index 6cebbd0ca8f4..70c9f1d88c02 100644
--- a/arch/arm/mach-mmp/include/mach/timex.h
+++ b/arch/arm/mach-mmp/include/mach/timex.h
@@ -6,4 +6,8 @@
6 * published by the Free Software Foundation. 6 * published by the Free Software Foundation.
7 */ 7 */
8 8
9#ifdef CONFIG_CPU_MMP2
10#define CLOCK_TICK_RATE 6500000
11#else
9#define CLOCK_TICK_RATE 3250000 12#define CLOCK_TICK_RATE 3250000
13#endif
diff --git a/arch/arm/mach-mmp/include/mach/uncompress.h b/arch/arm/mach-mmp/include/mach/uncompress.h
index a7dcc5307216..85bd8a2d84b5 100644
--- a/arch/arm/mach-mmp/include/mach/uncompress.h
+++ b/arch/arm/mach-mmp/include/mach/uncompress.h
@@ -14,7 +14,7 @@
14#define UART2_BASE (APB_PHYS_BASE + 0x17000) 14#define UART2_BASE (APB_PHYS_BASE + 0x17000)
15#define UART3_BASE (APB_PHYS_BASE + 0x18000) 15#define UART3_BASE (APB_PHYS_BASE + 0x18000)
16 16
17static volatile unsigned long *UART = (unsigned long *)UART2_BASE; 17static volatile unsigned long *UART;
18 18
19static inline void putc(char c) 19static inline void putc(char c)
20{ 20{
@@ -37,6 +37,9 @@ static inline void flush(void)
37 37
38static inline void arch_decomp_setup(void) 38static inline void arch_decomp_setup(void)
39{ 39{
40 /* default to UART2 */
41 UART = (unsigned long *)UART2_BASE;
42
40 if (machine_is_avengers_lite()) 43 if (machine_is_avengers_lite())
41 UART = (unsigned long *)UART3_BASE; 44 UART = (unsigned long *)UART3_BASE;
42} 45}
diff --git a/arch/arm/mach-mmp/jasper.c b/arch/arm/mach-mmp/jasper.c
index cfd4d66ef800..d77dd41d60e1 100644
--- a/arch/arm/mach-mmp/jasper.c
+++ b/arch/arm/mach-mmp/jasper.c
@@ -15,12 +15,16 @@
15#include <linux/platform_device.h> 15#include <linux/platform_device.h>
16#include <linux/io.h> 16#include <linux/io.h>
17#include <linux/gpio.h> 17#include <linux/gpio.h>
18#include <linux/regulator/machine.h>
19#include <linux/regulator/max8649.h>
20#include <linux/mfd/max8925.h>
18 21
19#include <asm/mach-types.h> 22#include <asm/mach-types.h>
20#include <asm/mach/arch.h> 23#include <asm/mach/arch.h>
21#include <mach/addr-map.h> 24#include <mach/addr-map.h>
22#include <mach/mfp-mmp2.h> 25#include <mach/mfp-mmp2.h>
23#include <mach/mmp2.h> 26#include <mach/mmp2.h>
27#include <mach/irqs.h>
24 28
25#include "common.h" 29#include "common.h"
26 30
@@ -58,6 +62,63 @@ static unsigned long jasper_pin_config[] __initdata = {
58 GPIO149_ND_CLE, 62 GPIO149_ND_CLE,
59 GPIO112_ND_RDY0, 63 GPIO112_ND_RDY0,
60 GPIO160_ND_RDY1, 64 GPIO160_ND_RDY1,
65
66 /* PMIC */
67 PMIC_PMIC_INT | MFP_LPM_EDGE_FALL,
68};
69
70static struct regulator_consumer_supply max8649_supply[] = {
71 REGULATOR_SUPPLY("vcc_core", NULL),
72};
73
74static struct regulator_init_data max8649_init_data = {
75 .constraints = {
76 .name = "vcc_core range",
77 .min_uV = 1150000,
78 .max_uV = 1280000,
79 .always_on = 1,
80 .boot_on = 1,
81 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
82 },
83 .num_consumer_supplies = 1,
84 .consumer_supplies = &max8649_supply[0],
85};
86
87static struct max8649_platform_data jasper_max8649_info = {
88 .mode = 2, /* VID1 = 1, VID0 = 0 */
89 .extclk = 0,
90 .ramp_timing = MAX8649_RAMP_32MV,
91 .regulator = &max8649_init_data,
92};
93
94static struct max8925_backlight_pdata jasper_backlight_data = {
95 .dual_string = 0,
96};
97
98static struct max8925_power_pdata jasper_power_data = {
99 .batt_detect = 0, /* can't detect battery by ID pin */
100 .topoff_threshold = MAX8925_TOPOFF_THR_10PER,
101 .fast_charge = MAX8925_FCHG_1000MA,
102};
103
104static struct max8925_platform_data jasper_max8925_info = {
105 .backlight = &jasper_backlight_data,
106 .power = &jasper_power_data,
107 .irq_base = IRQ_BOARD_START,
108};
109
110static struct i2c_board_info jasper_twsi1_info[] = {
111 [0] = {
112 .type = "max8649",
113 .addr = 0x60,
114 .platform_data = &jasper_max8649_info,
115 },
116 [1] = {
117 .type = "max8925",
118 .addr = 0x3c,
119 .irq = IRQ_MMP2_PMIC,
120 .platform_data = &jasper_max8925_info,
121 },
61}; 122};
62 123
63static void __init jasper_init(void) 124static void __init jasper_init(void)
@@ -67,6 +128,9 @@ static void __init jasper_init(void)
67 /* on-chip devices */ 128 /* on-chip devices */
68 mmp2_add_uart(1); 129 mmp2_add_uart(1);
69 mmp2_add_uart(3); 130 mmp2_add_uart(3);
131 mmp2_add_twsi(1, NULL, ARRAY_AND_SIZE(jasper_twsi1_info));
132
133 regulator_has_full_constraints();
70} 134}
71 135
72MACHINE_START(MARVELL_JASPER, "Jasper Development Platform") 136MACHINE_START(MARVELL_JASPER, "Jasper Development Platform")
diff --git a/arch/arm/mach-mmp/mmp2.c b/arch/arm/mach-mmp/mmp2.c
index 72eb9daeea99..7f5eb059bb01 100644
--- a/arch/arm/mach-mmp/mmp2.c
+++ b/arch/arm/mach-mmp/mmp2.c
@@ -15,11 +15,14 @@
15#include <linux/init.h> 15#include <linux/init.h>
16#include <linux/io.h> 16#include <linux/io.h>
17 17
18#include <asm/hardware/cache-tauros2.h>
19
18#include <mach/addr-map.h> 20#include <mach/addr-map.h>
19#include <mach/regs-apbc.h> 21#include <mach/regs-apbc.h>
20#include <mach/regs-apmu.h> 22#include <mach/regs-apmu.h>
21#include <mach/cputype.h> 23#include <mach/cputype.h>
22#include <mach/irqs.h> 24#include <mach/irqs.h>
25#include <mach/dma.h>
23#include <mach/mfp.h> 26#include <mach/mfp.h>
24#include <mach/gpio.h> 27#include <mach/gpio.h>
25#include <mach/devices.h> 28#include <mach/devices.h>
@@ -32,7 +35,50 @@
32#define APMASK(i) (GPIO_REGS_VIRT + BANK_OFF(i) + 0x9c) 35#define APMASK(i) (GPIO_REGS_VIRT + BANK_OFF(i) + 0x9c)
33 36
34static struct mfp_addr_map mmp2_addr_map[] __initdata = { 37static struct mfp_addr_map mmp2_addr_map[] __initdata = {
38
39 MFP_ADDR_X(GPIO0, GPIO58, 0x54),
40 MFP_ADDR_X(GPIO59, GPIO73, 0x280),
41 MFP_ADDR_X(GPIO74, GPIO101, 0x170),
42
43 MFP_ADDR(GPIO102, 0x0),
44 MFP_ADDR(GPIO103, 0x4),
45 MFP_ADDR(GPIO104, 0x1fc),
46 MFP_ADDR(GPIO105, 0x1f8),
47 MFP_ADDR(GPIO106, 0x1f4),
48 MFP_ADDR(GPIO107, 0x1f0),
49 MFP_ADDR(GPIO108, 0x21c),
50 MFP_ADDR(GPIO109, 0x218),
51 MFP_ADDR(GPIO110, 0x214),
52 MFP_ADDR(GPIO111, 0x200),
53 MFP_ADDR(GPIO112, 0x244),
54 MFP_ADDR(GPIO113, 0x25c),
55 MFP_ADDR(GPIO114, 0x164),
56 MFP_ADDR_X(GPIO115, GPIO122, 0x260),
57
58 MFP_ADDR(GPIO123, 0x148),
59 MFP_ADDR_X(GPIO124, GPIO141, 0xc),
60
61 MFP_ADDR(GPIO142, 0x8),
62 MFP_ADDR_X(GPIO143, GPIO151, 0x220),
63 MFP_ADDR_X(GPIO152, GPIO153, 0x248),
64 MFP_ADDR_X(GPIO154, GPIO155, 0x254),
65 MFP_ADDR_X(GPIO156, GPIO159, 0x14c),
66
67 MFP_ADDR(GPIO160, 0x250),
68 MFP_ADDR(GPIO161, 0x210),
69 MFP_ADDR(GPIO162, 0x20c),
70 MFP_ADDR(GPIO163, 0x208),
71 MFP_ADDR(GPIO164, 0x204),
72 MFP_ADDR(GPIO165, 0x1ec),
73 MFP_ADDR(GPIO166, 0x1e8),
74 MFP_ADDR(GPIO167, 0x1e4),
75 MFP_ADDR(GPIO168, 0x1e0),
76
77 MFP_ADDR_X(TWSI1_SCL, TWSI1_SDA, 0x140),
78 MFP_ADDR_X(TWSI4_SCL, TWSI4_SDA, 0x2bc),
79
35 MFP_ADDR(PMIC_INT, 0x2c4), 80 MFP_ADDR(PMIC_INT, 0x2c4),
81 MFP_ADDR(CLK_REQ, 0x160),
36 82
37 MFP_ADDR_END, 83 MFP_ADDR_END,
38}; 84};
@@ -99,9 +145,13 @@ static struct clk_lookup mmp2_clkregs[] = {
99static int __init mmp2_init(void) 145static int __init mmp2_init(void)
100{ 146{
101 if (cpu_is_mmp2()) { 147 if (cpu_is_mmp2()) {
148#ifdef CONFIG_CACHE_TAUROS2
149 tauros2_init();
150#endif
102 mfp_init_base(MFPR_VIRT_BASE); 151 mfp_init_base(MFPR_VIRT_BASE);
103 mfp_init_addr(mmp2_addr_map); 152 mfp_init_addr(mmp2_addr_map);
104 clks_register(ARRAY_AND_SIZE(mmp2_clkregs)); 153 pxa_init_dma(IRQ_MMP2_DMA_RIQ, 16);
154 clkdev_add_table(ARRAY_AND_SIZE(mmp2_clkregs));
105 } 155 }
106 156
107 return 0; 157 return 0;
diff --git a/arch/arm/mach-mmp/pxa168.c b/arch/arm/mach-mmp/pxa168.c
index 1873c821df90..652ae660634c 100644
--- a/arch/arm/mach-mmp/pxa168.c
+++ b/arch/arm/mach-mmp/pxa168.c
@@ -72,6 +72,11 @@ static APBC_CLK(pwm1, PXA168_PWM1, 1, 13000000);
72static APBC_CLK(pwm2, PXA168_PWM2, 1, 13000000); 72static APBC_CLK(pwm2, PXA168_PWM2, 1, 13000000);
73static APBC_CLK(pwm3, PXA168_PWM3, 1, 13000000); 73static APBC_CLK(pwm3, PXA168_PWM3, 1, 13000000);
74static APBC_CLK(pwm4, PXA168_PWM4, 1, 13000000); 74static APBC_CLK(pwm4, PXA168_PWM4, 1, 13000000);
75static APBC_CLK(ssp1, PXA168_SSP1, 4, 0);
76static APBC_CLK(ssp2, PXA168_SSP2, 4, 0);
77static APBC_CLK(ssp3, PXA168_SSP3, 4, 0);
78static APBC_CLK(ssp4, PXA168_SSP4, 4, 0);
79static APBC_CLK(ssp5, PXA168_SSP5, 4, 0);
75 80
76static APMU_CLK(nand, NAND, 0x01db, 208000000); 81static APMU_CLK(nand, NAND, 0x01db, 208000000);
77 82
@@ -85,6 +90,11 @@ static struct clk_lookup pxa168_clkregs[] = {
85 INIT_CLKREG(&clk_pwm2, "pxa168-pwm.1", NULL), 90 INIT_CLKREG(&clk_pwm2, "pxa168-pwm.1", NULL),
86 INIT_CLKREG(&clk_pwm3, "pxa168-pwm.2", NULL), 91 INIT_CLKREG(&clk_pwm3, "pxa168-pwm.2", NULL),
87 INIT_CLKREG(&clk_pwm4, "pxa168-pwm.3", NULL), 92 INIT_CLKREG(&clk_pwm4, "pxa168-pwm.3", NULL),
93 INIT_CLKREG(&clk_ssp1, "pxa168-ssp.0", NULL),
94 INIT_CLKREG(&clk_ssp2, "pxa168-ssp.1", NULL),
95 INIT_CLKREG(&clk_ssp3, "pxa168-ssp.2", NULL),
96 INIT_CLKREG(&clk_ssp4, "pxa168-ssp.3", NULL),
97 INIT_CLKREG(&clk_ssp5, "pxa168-ssp.4", NULL),
88 INIT_CLKREG(&clk_nand, "pxa3xx-nand", NULL), 98 INIT_CLKREG(&clk_nand, "pxa3xx-nand", NULL),
89}; 99};
90 100
@@ -132,3 +142,8 @@ PXA168_DEVICE(pwm2, "pxa168-pwm", 1, NONE, 0xd401a400, 0x10);
132PXA168_DEVICE(pwm3, "pxa168-pwm", 2, NONE, 0xd401a800, 0x10); 142PXA168_DEVICE(pwm3, "pxa168-pwm", 2, NONE, 0xd401a800, 0x10);
133PXA168_DEVICE(pwm4, "pxa168-pwm", 3, NONE, 0xd401ac00, 0x10); 143PXA168_DEVICE(pwm4, "pxa168-pwm", 3, NONE, 0xd401ac00, 0x10);
134PXA168_DEVICE(nand, "pxa3xx-nand", -1, NAND, 0xd4283000, 0x80, 97, 99); 144PXA168_DEVICE(nand, "pxa3xx-nand", -1, NAND, 0xd4283000, 0x80, 97, 99);
145PXA168_DEVICE(ssp1, "pxa168-ssp", 0, SSP1, 0xd401b000, 0x40, 52, 53);
146PXA168_DEVICE(ssp2, "pxa168-ssp", 1, SSP2, 0xd401c000, 0x40, 54, 55);
147PXA168_DEVICE(ssp3, "pxa168-ssp", 2, SSP3, 0xd401f000, 0x40, 56, 57);
148PXA168_DEVICE(ssp4, "pxa168-ssp", 3, SSP4, 0xd4020000, 0x40, 58, 59);
149PXA168_DEVICE(ssp5, "pxa168-ssp", 4, SSP5, 0xd4021000, 0x40, 60, 61);
diff --git a/arch/arm/mach-msm/Kconfig b/arch/arm/mach-msm/Kconfig
index f780086befd7..b9fd5c528e5b 100644
--- a/arch/arm/mach-msm/Kconfig
+++ b/arch/arm/mach-msm/Kconfig
@@ -29,12 +29,14 @@ endchoice
29 29
30config MACH_HALIBUT 30config MACH_HALIBUT
31 depends on ARCH_MSM 31 depends on ARCH_MSM
32 select CPU_V6
32 default y 33 default y
33 bool "Halibut Board (QCT SURF7201A)" 34 bool "Halibut Board (QCT SURF7201A)"
34 help 35 help
35 Support for the Qualcomm SURF7201A eval board. 36 Support for the Qualcomm SURF7201A eval board.
36 37
37config MACH_TROUT 38config MACH_TROUT
39 select CPU_V6
38 default y 40 default y
39 bool "HTC Dream (aka trout)" 41 bool "HTC Dream (aka trout)"
40 help 42 help
diff --git a/arch/arm/mach-mx3/Kconfig b/arch/arm/mach-mx3/Kconfig
index 3872af1cf2c3..170f68e46dd5 100644
--- a/arch/arm/mach-mx3/Kconfig
+++ b/arch/arm/mach-mx3/Kconfig
@@ -62,6 +62,15 @@ config MACH_MX31_3DS
62 Include support for MX31PDK (3DS) platform. This includes specific 62 Include support for MX31PDK (3DS) platform. This includes specific
63 configurations for the board and its peripherals. 63 configurations for the board and its peripherals.
64 64
65config MACH_MX31_3DS_MXC_NAND_USE_BBT
66 bool "Make the MXC NAND driver use the in flash Bad Block Table"
67 depends on MACH_MX31_3DS
68 depends on MTD_NAND_MXC
69 help
70 Enable this if you want that the MXC NAND driver uses the in flash
71 Bad Block Table to know what blocks are bad instead of scanning the
72 entire flash looking for bad block markers.
73
65config MACH_MX31MOBOARD 74config MACH_MX31MOBOARD
66 bool "Support mx31moboard platforms (EPFL Mobots group)" 75 bool "Support mx31moboard platforms (EPFL Mobots group)"
67 select ARCH_MX31 76 select ARCH_MX31
@@ -95,6 +104,7 @@ config MACH_PCM043
95config MACH_ARMADILLO5X0 104config MACH_ARMADILLO5X0
96 bool "Support Atmark Armadillo-500 Development Base Board" 105 bool "Support Atmark Armadillo-500 Development Base Board"
97 select ARCH_MX31 106 select ARCH_MX31
107 select MXC_ULPI if USB_ULPI
98 help 108 help
99 Include support for Atmark Armadillo-500 platform. This includes 109 Include support for Atmark Armadillo-500 platform. This includes
100 specific configurations for the board and its peripherals. 110 specific configurations for the board and its peripherals.
diff --git a/arch/arm/mach-mx3/clock-imx31.c b/arch/arm/mach-mx3/clock-imx31.c
index 80dba9966b5e..9a9eb6de6127 100644
--- a/arch/arm/mach-mx3/clock-imx31.c
+++ b/arch/arm/mach-mx3/clock-imx31.c
@@ -468,6 +468,7 @@ static struct clk ahb_clk = {
468 } 468 }
469 469
470DEFINE_CLOCK(perclk_clk, 0, NULL, 0, NULL, NULL, &ipg_clk); 470DEFINE_CLOCK(perclk_clk, 0, NULL, 0, NULL, NULL, &ipg_clk);
471DEFINE_CLOCK(ckil_clk, 0, NULL, 0, clk_ckil_get_rate, NULL, NULL);
471 472
472DEFINE_CLOCK(sdhc1_clk, 0, MXC_CCM_CGR0, 0, NULL, NULL, &perclk_clk); 473DEFINE_CLOCK(sdhc1_clk, 0, MXC_CCM_CGR0, 0, NULL, NULL, &perclk_clk);
473DEFINE_CLOCK(sdhc2_clk, 1, MXC_CCM_CGR0, 2, NULL, NULL, &perclk_clk); 474DEFINE_CLOCK(sdhc2_clk, 1, MXC_CCM_CGR0, 2, NULL, NULL, &perclk_clk);
@@ -490,7 +491,7 @@ DEFINE_CLOCK(mpeg4_clk, 0, MXC_CCM_CGR1, 0, NULL, NULL, &ahb_clk);
490DEFINE_CLOCK(mstick1_clk, 0, MXC_CCM_CGR1, 2, mstick1_get_rate, NULL, &usb_pll_clk); 491DEFINE_CLOCK(mstick1_clk, 0, MXC_CCM_CGR1, 2, mstick1_get_rate, NULL, &usb_pll_clk);
491DEFINE_CLOCK(mstick2_clk, 1, MXC_CCM_CGR1, 4, mstick2_get_rate, NULL, &usb_pll_clk); 492DEFINE_CLOCK(mstick2_clk, 1, MXC_CCM_CGR1, 4, mstick2_get_rate, NULL, &usb_pll_clk);
492DEFINE_CLOCK1(csi_clk, 0, MXC_CCM_CGR1, 6, csi, NULL, &serial_pll_clk); 493DEFINE_CLOCK1(csi_clk, 0, MXC_CCM_CGR1, 6, csi, NULL, &serial_pll_clk);
493DEFINE_CLOCK(rtc_clk, 0, MXC_CCM_CGR1, 8, NULL, NULL, &ipg_clk); 494DEFINE_CLOCK(rtc_clk, 0, MXC_CCM_CGR1, 8, NULL, NULL, &ckil_clk);
494DEFINE_CLOCK(wdog_clk, 0, MXC_CCM_CGR1, 10, NULL, NULL, &ipg_clk); 495DEFINE_CLOCK(wdog_clk, 0, MXC_CCM_CGR1, 10, NULL, NULL, &ipg_clk);
495DEFINE_CLOCK(pwm_clk, 0, MXC_CCM_CGR1, 12, NULL, NULL, &perclk_clk); 496DEFINE_CLOCK(pwm_clk, 0, MXC_CCM_CGR1, 12, NULL, NULL, &perclk_clk);
496DEFINE_CLOCK(usb_clk2, 0, MXC_CCM_CGR1, 18, usb_get_rate, NULL, &ahb_clk); 497DEFINE_CLOCK(usb_clk2, 0, MXC_CCM_CGR1, 18, usb_get_rate, NULL, &ahb_clk);
@@ -514,7 +515,6 @@ DEFINE_CLOCK(usb_clk1, 0, NULL, 0, usb_get_rate, NULL, &usb_pll_clk)
514DEFINE_CLOCK(nfc_clk, 0, NULL, 0, nfc_get_rate, NULL, &ahb_clk); 515DEFINE_CLOCK(nfc_clk, 0, NULL, 0, nfc_get_rate, NULL, &ahb_clk);
515DEFINE_CLOCK(scc_clk, 0, NULL, 0, NULL, NULL, &ipg_clk); 516DEFINE_CLOCK(scc_clk, 0, NULL, 0, NULL, NULL, &ipg_clk);
516DEFINE_CLOCK(ipg_clk, 0, NULL, 0, ipg_get_rate, NULL, &ahb_clk); 517DEFINE_CLOCK(ipg_clk, 0, NULL, 0, ipg_get_rate, NULL, &ahb_clk);
517DEFINE_CLOCK(ckil_clk, 0, NULL, 0, clk_ckil_get_rate, NULL, NULL);
518 518
519#define _REGISTER_CLOCK(d, n, c) \ 519#define _REGISTER_CLOCK(d, n, c) \
520 { \ 520 { \
@@ -572,7 +572,6 @@ static struct clk_lookup lookups[] = {
572 _REGISTER_CLOCK(NULL, "iim", iim_clk) 572 _REGISTER_CLOCK(NULL, "iim", iim_clk)
573 _REGISTER_CLOCK(NULL, "mpeg4", mpeg4_clk) 573 _REGISTER_CLOCK(NULL, "mpeg4", mpeg4_clk)
574 _REGISTER_CLOCK(NULL, "mbx", mbx_clk) 574 _REGISTER_CLOCK(NULL, "mbx", mbx_clk)
575 _REGISTER_CLOCK("mxc_rtc", NULL, ckil_clk)
576}; 575};
577 576
578int __init mx31_clocks_init(unsigned long fref) 577int __init mx31_clocks_init(unsigned long fref)
diff --git a/arch/arm/mach-mx3/devices.c b/arch/arm/mach-mx3/devices.c
index 6adb586515ea..f8911154a9fa 100644
--- a/arch/arm/mach-mx3/devices.c
+++ b/arch/arm/mach-mx3/devices.c
@@ -575,11 +575,26 @@ struct platform_device imx_ssi_device1 = {
575 .resource = imx_ssi_resources1, 575 .resource = imx_ssi_resources1,
576}; 576};
577 577
578static int mx3_devices_init(void) 578static struct resource imx_wdt_resources[] = {
579 {
580 .flags = IORESOURCE_MEM,
581 },
582};
583
584struct platform_device imx_wdt_device0 = {
585 .name = "imx-wdt",
586 .id = 0,
587 .num_resources = ARRAY_SIZE(imx_wdt_resources),
588 .resource = imx_wdt_resources,
589};
590
591static int __init mx3_devices_init(void)
579{ 592{
580 if (cpu_is_mx31()) { 593 if (cpu_is_mx31()) {
581 mxc_nand_resources[0].start = MX31_NFC_BASE_ADDR; 594 mxc_nand_resources[0].start = MX31_NFC_BASE_ADDR;
582 mxc_nand_resources[0].end = MX31_NFC_BASE_ADDR + 0xfff; 595 mxc_nand_resources[0].end = MX31_NFC_BASE_ADDR + 0xfff;
596 imx_wdt_resources[0].start = MX31_WDOG_BASE_ADDR;
597 imx_wdt_resources[0].end = MX31_WDOG_BASE_ADDR + 0x3fff;
583 mxc_register_device(&mxc_rnga_device, NULL); 598 mxc_register_device(&mxc_rnga_device, NULL);
584 } 599 }
585 if (cpu_is_mx35()) { 600 if (cpu_is_mx35()) {
@@ -597,6 +612,8 @@ static int mx3_devices_init(void)
597 imx_ssi_resources0[1].end = MX35_INT_SSI1; 612 imx_ssi_resources0[1].end = MX35_INT_SSI1;
598 imx_ssi_resources1[1].start = MX35_INT_SSI2; 613 imx_ssi_resources1[1].start = MX35_INT_SSI2;
599 imx_ssi_resources1[1].end = MX35_INT_SSI2; 614 imx_ssi_resources1[1].end = MX35_INT_SSI2;
615 imx_wdt_resources[0].start = MX35_WDOG_BASE_ADDR;
616 imx_wdt_resources[0].end = MX35_WDOG_BASE_ADDR + 0x3fff;
600 } 617 }
601 618
602 return 0; 619 return 0;
diff --git a/arch/arm/mach-mx3/devices.h b/arch/arm/mach-mx3/devices.h
index 42cf175eac6b..4f77eb501274 100644
--- a/arch/arm/mach-mx3/devices.h
+++ b/arch/arm/mach-mx3/devices.h
@@ -25,4 +25,5 @@ extern struct platform_device mxc_spi_device1;
25extern struct platform_device mxc_spi_device2; 25extern struct platform_device mxc_spi_device2;
26extern struct platform_device imx_ssi_device0; 26extern struct platform_device imx_ssi_device0;
27extern struct platform_device imx_ssi_device1; 27extern struct platform_device imx_ssi_device1;
28 28extern struct platform_device imx_ssi_device1;
29extern struct platform_device imx_wdt_device0;
diff --git a/arch/arm/mach-mx3/mach-armadillo5x0.c b/arch/arm/mach-mx3/mach-armadillo5x0.c
index 3d72b0b89705..5f72ec91af2d 100644
--- a/arch/arm/mach-mx3/mach-armadillo5x0.c
+++ b/arch/arm/mach-mx3/mach-armadillo5x0.c
@@ -36,6 +36,9 @@
36#include <linux/input.h> 36#include <linux/input.h>
37#include <linux/gpio_keys.h> 37#include <linux/gpio_keys.h>
38#include <linux/i2c.h> 38#include <linux/i2c.h>
39#include <linux/usb/otg.h>
40#include <linux/usb/ulpi.h>
41#include <linux/delay.h>
39 42
40#include <mach/hardware.h> 43#include <mach/hardware.h>
41#include <asm/mach-types.h> 44#include <asm/mach-types.h>
@@ -52,6 +55,8 @@
52#include <mach/ipu.h> 55#include <mach/ipu.h>
53#include <mach/mx3fb.h> 56#include <mach/mx3fb.h>
54#include <mach/mxc_nand.h> 57#include <mach/mxc_nand.h>
58#include <mach/mxc_ehci.h>
59#include <mach/ulpi.h>
55 60
56#include "devices.h" 61#include "devices.h"
57#include "crm_regs.h" 62#include "crm_regs.h"
@@ -103,8 +108,158 @@ static int armadillo5x0_pins[] = {
103 /* I2C2 */ 108 /* I2C2 */
104 MX31_PIN_CSPI2_MOSI__SCL, 109 MX31_PIN_CSPI2_MOSI__SCL,
105 MX31_PIN_CSPI2_MISO__SDA, 110 MX31_PIN_CSPI2_MISO__SDA,
111 /* OTG */
112 MX31_PIN_USBOTG_DATA0__USBOTG_DATA0,
113 MX31_PIN_USBOTG_DATA1__USBOTG_DATA1,
114 MX31_PIN_USBOTG_DATA2__USBOTG_DATA2,
115 MX31_PIN_USBOTG_DATA3__USBOTG_DATA3,
116 MX31_PIN_USBOTG_DATA4__USBOTG_DATA4,
117 MX31_PIN_USBOTG_DATA5__USBOTG_DATA5,
118 MX31_PIN_USBOTG_DATA6__USBOTG_DATA6,
119 MX31_PIN_USBOTG_DATA7__USBOTG_DATA7,
120 MX31_PIN_USBOTG_CLK__USBOTG_CLK,
121 MX31_PIN_USBOTG_DIR__USBOTG_DIR,
122 MX31_PIN_USBOTG_NXT__USBOTG_NXT,
123 MX31_PIN_USBOTG_STP__USBOTG_STP,
124 /* USB host 2 */
125 IOMUX_MODE(MX31_PIN_USBH2_CLK, IOMUX_CONFIG_FUNC),
126 IOMUX_MODE(MX31_PIN_USBH2_DIR, IOMUX_CONFIG_FUNC),
127 IOMUX_MODE(MX31_PIN_USBH2_NXT, IOMUX_CONFIG_FUNC),
128 IOMUX_MODE(MX31_PIN_USBH2_STP, IOMUX_CONFIG_FUNC),
129 IOMUX_MODE(MX31_PIN_USBH2_DATA0, IOMUX_CONFIG_FUNC),
130 IOMUX_MODE(MX31_PIN_USBH2_DATA1, IOMUX_CONFIG_FUNC),
131 IOMUX_MODE(MX31_PIN_STXD3, IOMUX_CONFIG_FUNC),
132 IOMUX_MODE(MX31_PIN_SRXD3, IOMUX_CONFIG_FUNC),
133 IOMUX_MODE(MX31_PIN_SCK3, IOMUX_CONFIG_FUNC),
134 IOMUX_MODE(MX31_PIN_SFS3, IOMUX_CONFIG_FUNC),
135 IOMUX_MODE(MX31_PIN_STXD6, IOMUX_CONFIG_FUNC),
136 IOMUX_MODE(MX31_PIN_SRXD6, IOMUX_CONFIG_FUNC),
106}; 137};
107 138
139/* USB */
140#if defined(CONFIG_USB_ULPI)
141
142#define OTG_RESET IOMUX_TO_GPIO(MX31_PIN_STXD4)
143#define USBH2_RESET IOMUX_TO_GPIO(MX31_PIN_SCK6)
144#define USBH2_CS IOMUX_TO_GPIO(MX31_PIN_GPIO1_3)
145
146#define USB_PAD_CFG (PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST | PAD_CTL_HYS_CMOS | \
147 PAD_CTL_ODE_CMOS | PAD_CTL_100K_PU)
148
149static int usbotg_init(struct platform_device *pdev)
150{
151 int err;
152
153 mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA0, USB_PAD_CFG);
154 mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA1, USB_PAD_CFG);
155 mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA2, USB_PAD_CFG);
156 mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA3, USB_PAD_CFG);
157 mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA4, USB_PAD_CFG);
158 mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA5, USB_PAD_CFG);
159 mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA6, USB_PAD_CFG);
160 mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA7, USB_PAD_CFG);
161 mxc_iomux_set_pad(MX31_PIN_USBOTG_CLK, USB_PAD_CFG);
162 mxc_iomux_set_pad(MX31_PIN_USBOTG_DIR, USB_PAD_CFG);
163 mxc_iomux_set_pad(MX31_PIN_USBOTG_NXT, USB_PAD_CFG);
164 mxc_iomux_set_pad(MX31_PIN_USBOTG_STP, USB_PAD_CFG);
165
166 /* Chip already enabled by hardware */
167 /* OTG phy reset*/
168 err = gpio_request(OTG_RESET, "USB-OTG-RESET");
169 if (err) {
170 pr_err("Failed to request the usb otg reset gpio\n");
171 return err;
172 }
173
174 err = gpio_direction_output(OTG_RESET, 1/*HIGH*/);
175 if (err) {
176 pr_err("Failed to reset the usb otg phy\n");
177 goto otg_free_reset;
178 }
179
180 gpio_set_value(OTG_RESET, 0/*LOW*/);
181 mdelay(5);
182 gpio_set_value(OTG_RESET, 1/*HIGH*/);
183
184 return 0;
185
186otg_free_reset:
187 gpio_free(OTG_RESET);
188 return err;
189}
190
191static int usbh2_init(struct platform_device *pdev)
192{
193 int err;
194
195 mxc_iomux_set_pad(MX31_PIN_USBH2_CLK, USB_PAD_CFG);
196 mxc_iomux_set_pad(MX31_PIN_USBH2_DIR, USB_PAD_CFG);
197 mxc_iomux_set_pad(MX31_PIN_USBH2_NXT, USB_PAD_CFG);
198 mxc_iomux_set_pad(MX31_PIN_USBH2_STP, USB_PAD_CFG);
199 mxc_iomux_set_pad(MX31_PIN_USBH2_DATA0, USB_PAD_CFG);
200 mxc_iomux_set_pad(MX31_PIN_USBH2_DATA1, USB_PAD_CFG);
201 mxc_iomux_set_pad(MX31_PIN_SRXD6, USB_PAD_CFG);
202 mxc_iomux_set_pad(MX31_PIN_STXD6, USB_PAD_CFG);
203 mxc_iomux_set_pad(MX31_PIN_SFS3, USB_PAD_CFG);
204 mxc_iomux_set_pad(MX31_PIN_SCK3, USB_PAD_CFG);
205 mxc_iomux_set_pad(MX31_PIN_SRXD3, USB_PAD_CFG);
206 mxc_iomux_set_pad(MX31_PIN_STXD3, USB_PAD_CFG);
207
208 mxc_iomux_set_gpr(MUX_PGP_UH2, true);
209
210
211 /* Enable the chip */
212 err = gpio_request(USBH2_CS, "USB-H2-CS");
213 if (err) {
214 pr_err("Failed to request the usb host 2 CS gpio\n");
215 return err;
216 }
217
218 err = gpio_direction_output(USBH2_CS, 0/*Enabled*/);
219 if (err) {
220 pr_err("Failed to drive the usb host 2 CS gpio\n");
221 goto h2_free_cs;
222 }
223
224 /* H2 phy reset*/
225 err = gpio_request(USBH2_RESET, "USB-H2-RESET");
226 if (err) {
227 pr_err("Failed to request the usb host 2 reset gpio\n");
228 goto h2_free_cs;
229 }
230
231 err = gpio_direction_output(USBH2_RESET, 1/*HIGH*/);
232 if (err) {
233 pr_err("Failed to reset the usb host 2 phy\n");
234 goto h2_free_reset;
235 }
236
237 gpio_set_value(USBH2_RESET, 0/*LOW*/);
238 mdelay(5);
239 gpio_set_value(USBH2_RESET, 1/*HIGH*/);
240
241 return 0;
242
243h2_free_reset:
244 gpio_free(USBH2_RESET);
245h2_free_cs:
246 gpio_free(USBH2_CS);
247 return err;
248}
249
250static struct mxc_usbh_platform_data usbotg_pdata = {
251 .init = usbotg_init,
252 .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT,
253 .flags = MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_INTERFACE_DIFF_UNI,
254};
255
256static struct mxc_usbh_platform_data usbh2_pdata = {
257 .init = usbh2_init,
258 .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT,
259 .flags = MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_INTERFACE_DIFF_UNI,
260};
261#endif /* CONFIG_USB_ULPI */
262
108/* RTC over I2C*/ 263/* RTC over I2C*/
109#define ARMADILLO5X0_RTC_GPIO IOMUX_TO_GPIO(MX31_PIN_SRXD4) 264#define ARMADILLO5X0_RTC_GPIO IOMUX_TO_GPIO(MX31_PIN_SRXD4)
110 265
@@ -393,6 +548,17 @@ static void __init armadillo5x0_init(void)
393 if (armadillo5x0_i2c_rtc.irq == 0) 548 if (armadillo5x0_i2c_rtc.irq == 0)
394 pr_warning("armadillo5x0_init: failed to get RTC IRQ\n"); 549 pr_warning("armadillo5x0_init: failed to get RTC IRQ\n");
395 i2c_register_board_info(1, &armadillo5x0_i2c_rtc, 1); 550 i2c_register_board_info(1, &armadillo5x0_i2c_rtc, 1);
551
552 /* USB */
553#if defined(CONFIG_USB_ULPI)
554 usbotg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
555 USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
556 usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
557 USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
558
559 mxc_register_device(&mxc_otg_host, &usbotg_pdata);
560 mxc_register_device(&mxc_usbh2, &usbh2_pdata);
561#endif
396} 562}
397 563
398static void __init armadillo5x0_timer_init(void) 564static void __init armadillo5x0_timer_init(void)
diff --git a/arch/arm/mach-mx3/mach-mx31_3ds.c b/arch/arm/mach-mx3/mach-mx31_3ds.c
index b88c18ad7698..f54af1e29ca4 100644
--- a/arch/arm/mach-mx3/mach-mx31_3ds.c
+++ b/arch/arm/mach-mx3/mach-mx31_3ds.c
@@ -23,6 +23,9 @@
23#include <linux/gpio.h> 23#include <linux/gpio.h>
24#include <linux/smsc911x.h> 24#include <linux/smsc911x.h>
25#include <linux/platform_device.h> 25#include <linux/platform_device.h>
26#include <linux/mfd/mc13783.h>
27#include <linux/spi/spi.h>
28#include <linux/regulator/machine.h>
26 29
27#include <mach/hardware.h> 30#include <mach/hardware.h>
28#include <asm/mach-types.h> 31#include <asm/mach-types.h>
@@ -31,26 +34,96 @@
31#include <asm/memory.h> 34#include <asm/memory.h>
32#include <asm/mach/map.h> 35#include <asm/mach/map.h>
33#include <mach/common.h> 36#include <mach/common.h>
34#include <mach/board-mx31pdk.h> 37#include <mach/board-mx31_3ds.h>
35#include <mach/imx-uart.h> 38#include <mach/imx-uart.h>
36#include <mach/iomux-mx3.h> 39#include <mach/iomux-mx3.h>
40#include <mach/mxc_nand.h>
41#include <mach/spi.h>
37#include "devices.h" 42#include "devices.h"
38 43
39/*! 44/*!
40 * @file mx31pdk.c 45 * @file mx31_3ds.c
41 * 46 *
42 * @brief This file contains the board-specific initialization routines. 47 * @brief This file contains the board-specific initialization routines.
43 * 48 *
44 * @ingroup System 49 * @ingroup System
45 */ 50 */
46 51
47static int mx31pdk_pins[] = { 52static int mx31_3ds_pins[] = {
48 /* UART1 */ 53 /* UART1 */
49 MX31_PIN_CTS1__CTS1, 54 MX31_PIN_CTS1__CTS1,
50 MX31_PIN_RTS1__RTS1, 55 MX31_PIN_RTS1__RTS1,
51 MX31_PIN_TXD1__TXD1, 56 MX31_PIN_TXD1__TXD1,
52 MX31_PIN_RXD1__RXD1, 57 MX31_PIN_RXD1__RXD1,
53 IOMUX_MODE(MX31_PIN_GPIO1_1, IOMUX_CONFIG_GPIO), 58 IOMUX_MODE(MX31_PIN_GPIO1_1, IOMUX_CONFIG_GPIO),
59 /* SPI 1 */
60 MX31_PIN_CSPI2_SCLK__SCLK,
61 MX31_PIN_CSPI2_MOSI__MOSI,
62 MX31_PIN_CSPI2_MISO__MISO,
63 MX31_PIN_CSPI2_SPI_RDY__SPI_RDY,
64 MX31_PIN_CSPI2_SS0__SS0,
65 MX31_PIN_CSPI2_SS2__SS2, /*CS for MC13783 */
66 /* MC13783 IRQ */
67 IOMUX_MODE(MX31_PIN_GPIO1_3, IOMUX_CONFIG_GPIO),
68};
69
70/* Regulators */
71static struct regulator_init_data pwgtx_init = {
72 .constraints = {
73 .boot_on = 1,
74 .always_on = 1,
75 },
76};
77
78static struct mc13783_regulator_init_data mx31_3ds_regulators[] = {
79 {
80 .id = MC13783_REGU_PWGT1SPI, /* Power Gate for ARM core. */
81 .init_data = &pwgtx_init,
82 }, {
83 .id = MC13783_REGU_PWGT2SPI, /* Power Gate for L2 Cache. */
84 .init_data = &pwgtx_init,
85 },
86};
87
88/* MC13783 */
89static struct mc13783_platform_data mc13783_pdata __initdata = {
90 .regulators = mx31_3ds_regulators,
91 .num_regulators = ARRAY_SIZE(mx31_3ds_regulators),
92 .flags = MC13783_USE_REGULATOR,
93};
94
95/* SPI */
96static int spi1_internal_chipselect[] = {
97 MXC_SPI_CS(0),
98 MXC_SPI_CS(2),
99};
100
101static struct spi_imx_master spi1_pdata = {
102 .chipselect = spi1_internal_chipselect,
103 .num_chipselect = ARRAY_SIZE(spi1_internal_chipselect),
104};
105
106static struct spi_board_info mx31_3ds_spi_devs[] __initdata = {
107 {
108 .modalias = "mc13783",
109 .max_speed_hz = 1000000,
110 .bus_num = 1,
111 .chip_select = 1, /* SS2 */
112 .platform_data = &mc13783_pdata,
113 .irq = IOMUX_TO_IRQ(MX31_PIN_GPIO1_3),
114 .mode = SPI_CS_HIGH,
115 },
116};
117
118/*
119 * NAND Flash
120 */
121static struct mxc_nand_platform_data imx31_3ds_nand_flash_pdata = {
122 .width = 1,
123 .hw_ecc = 1,
124#ifdef MACH_MX31_3DS_MXC_NAND_USE_BBT
125 .flash_bbt = 1,
126#endif
54}; 127};
55 128
56static struct imxuart_platform_data uart_pdata = { 129static struct imxuart_platform_data uart_pdata = {
@@ -95,7 +168,7 @@ static struct platform_device smsc911x_device = {
95 * LEDs, switches, interrupts for Ethernet. 168 * LEDs, switches, interrupts for Ethernet.
96 */ 169 */
97 170
98static void mx31pdk_expio_irq_handler(uint32_t irq, struct irq_desc *desc) 171static void mx31_3ds_expio_irq_handler(uint32_t irq, struct irq_desc *desc)
99{ 172{
100 uint32_t imr_val; 173 uint32_t imr_val;
101 uint32_t int_valid; 174 uint32_t int_valid;
@@ -163,7 +236,7 @@ static struct irq_chip expio_irq_chip = {
163 .unmask = expio_unmask_irq, 236 .unmask = expio_unmask_irq,
164}; 237};
165 238
166static int __init mx31pdk_init_expio(void) 239static int __init mx31_3ds_init_expio(void)
167{ 240{
168 int i; 241 int i;
169 int ret; 242 int ret;
@@ -176,7 +249,7 @@ static int __init mx31pdk_init_expio(void)
176 return -ENODEV; 249 return -ENODEV;
177 } 250 }
178 251
179 pr_info("i.MX31PDK Debug board detected, rev = 0x%04X\n", 252 pr_info("i.MX31 3DS Debug board detected, rev = 0x%04X\n",
180 __raw_readw(CPLD_CODE_VER_REG)); 253 __raw_readw(CPLD_CODE_VER_REG));
181 254
182 /* 255 /*
@@ -201,7 +274,7 @@ static int __init mx31pdk_init_expio(void)
201 set_irq_flags(i, IRQF_VALID); 274 set_irq_flags(i, IRQF_VALID);
202 } 275 }
203 set_irq_type(EXPIO_PARENT_INT, IRQ_TYPE_LEVEL_LOW); 276 set_irq_type(EXPIO_PARENT_INT, IRQ_TYPE_LEVEL_LOW);
204 set_irq_chained_handler(EXPIO_PARENT_INT, mx31pdk_expio_irq_handler); 277 set_irq_chained_handler(EXPIO_PARENT_INT, mx31_3ds_expio_irq_handler);
205 278
206 return 0; 279 return 0;
207} 280}
@@ -209,7 +282,7 @@ static int __init mx31pdk_init_expio(void)
209/* 282/*
210 * This structure defines the MX31 memory map. 283 * This structure defines the MX31 memory map.
211 */ 284 */
212static struct map_desc mx31pdk_io_desc[] __initdata = { 285static struct map_desc mx31_3ds_io_desc[] __initdata = {
213 { 286 {
214 .virtual = MX31_CS5_BASE_ADDR_VIRT, 287 .virtual = MX31_CS5_BASE_ADDR_VIRT,
215 .pfn = __phys_to_pfn(MX31_CS5_BASE_ADDR), 288 .pfn = __phys_to_pfn(MX31_CS5_BASE_ADDR),
@@ -221,10 +294,10 @@ static struct map_desc mx31pdk_io_desc[] __initdata = {
221/* 294/*
222 * Set up static virtual mappings. 295 * Set up static virtual mappings.
223 */ 296 */
224static void __init mx31pdk_map_io(void) 297static void __init mx31_3ds_map_io(void)
225{ 298{
226 mx31_map_io(); 299 mx31_map_io();
227 iotable_init(mx31pdk_io_desc, ARRAY_SIZE(mx31pdk_io_desc)); 300 iotable_init(mx31_3ds_io_desc, ARRAY_SIZE(mx31_3ds_io_desc));
228} 301}
229 302
230/*! 303/*!
@@ -232,35 +305,40 @@ static void __init mx31pdk_map_io(void)
232 */ 305 */
233static void __init mxc_board_init(void) 306static void __init mxc_board_init(void)
234{ 307{
235 mxc_iomux_setup_multiple_pins(mx31pdk_pins, ARRAY_SIZE(mx31pdk_pins), 308 mxc_iomux_setup_multiple_pins(mx31_3ds_pins, ARRAY_SIZE(mx31_3ds_pins),
236 "mx31pdk"); 309 "mx31_3ds");
237 310
238 mxc_register_device(&mxc_uart_device0, &uart_pdata); 311 mxc_register_device(&mxc_uart_device0, &uart_pdata);
312 mxc_register_device(&mxc_nand_device, &imx31_3ds_nand_flash_pdata);
313
314 mxc_register_device(&mxc_spi_device1, &spi1_pdata);
315 spi_register_board_info(mx31_3ds_spi_devs,
316 ARRAY_SIZE(mx31_3ds_spi_devs));
239 317
240 if (!mx31pdk_init_expio()) 318 if (!mx31_3ds_init_expio())
241 platform_device_register(&smsc911x_device); 319 platform_device_register(&smsc911x_device);
242} 320}
243 321
244static void __init mx31pdk_timer_init(void) 322static void __init mx31_3ds_timer_init(void)
245{ 323{
246 mx31_clocks_init(26000000); 324 mx31_clocks_init(26000000);
247} 325}
248 326
249static struct sys_timer mx31pdk_timer = { 327static struct sys_timer mx31_3ds_timer = {
250 .init = mx31pdk_timer_init, 328 .init = mx31_3ds_timer_init,
251}; 329};
252 330
253/* 331/*
254 * The following uses standard kernel macros defined in arch.h in order to 332 * The following uses standard kernel macros defined in arch.h in order to
255 * initialize __mach_desc_MX31PDK data structure. 333 * initialize __mach_desc_MX31_3DS data structure.
256 */ 334 */
257MACHINE_START(MX31_3DS, "Freescale MX31PDK (3DS)") 335MACHINE_START(MX31_3DS, "Freescale MX31PDK (3DS)")
258 /* Maintainer: Freescale Semiconductor, Inc. */ 336 /* Maintainer: Freescale Semiconductor, Inc. */
259 .phys_io = MX31_AIPS1_BASE_ADDR, 337 .phys_io = MX31_AIPS1_BASE_ADDR,
260 .io_pg_offst = (MX31_AIPS1_BASE_ADDR_VIRT >> 18) & 0xfffc, 338 .io_pg_offst = (MX31_AIPS1_BASE_ADDR_VIRT >> 18) & 0xfffc,
261 .boot_params = MX3x_PHYS_OFFSET + 0x100, 339 .boot_params = MX3x_PHYS_OFFSET + 0x100,
262 .map_io = mx31pdk_map_io, 340 .map_io = mx31_3ds_map_io,
263 .init_irq = mx31_init_irq, 341 .init_irq = mx31_init_irq,
264 .init_machine = mxc_board_init, 342 .init_machine = mxc_board_init,
265 .timer = &mx31pdk_timer, 343 .timer = &mx31_3ds_timer,
266MACHINE_END 344MACHINE_END
diff --git a/arch/arm/mach-mx3/mach-mx31moboard.c b/arch/arm/mach-mx3/mach-mx31moboard.c
index a7dc5191bf5e..fccb9207b78d 100644
--- a/arch/arm/mach-mx3/mach-mx31moboard.c
+++ b/arch/arm/mach-mx3/mach-mx31moboard.c
@@ -19,6 +19,7 @@
19#include <linux/delay.h> 19#include <linux/delay.h>
20#include <linux/dma-mapping.h> 20#include <linux/dma-mapping.h>
21#include <linux/fsl_devices.h> 21#include <linux/fsl_devices.h>
22#include <linux/gfp.h>
22#include <linux/gpio.h> 23#include <linux/gpio.h>
23#include <linux/init.h> 24#include <linux/init.h>
24#include <linux/interrupt.h> 25#include <linux/interrupt.h>
diff --git a/arch/arm/mach-mx3/mach-pcm037.c b/arch/arm/mach-mx3/mach-pcm037.c
index 11f531559169..2df1ec55a97e 100644
--- a/arch/arm/mach-mx3/mach-pcm037.c
+++ b/arch/arm/mach-mx3/mach-pcm037.c
@@ -35,7 +35,7 @@
35#include <linux/can/platform/sja1000.h> 35#include <linux/can/platform/sja1000.h>
36#include <linux/usb/otg.h> 36#include <linux/usb/otg.h>
37#include <linux/usb/ulpi.h> 37#include <linux/usb/ulpi.h>
38#include <linux/fsl_devices.h> 38#include <linux/gfp.h>
39 39
40#include <media/soc_camera.h> 40#include <media/soc_camera.h>
41 41
diff --git a/arch/arm/mach-mx3/mx31lite-db.c b/arch/arm/mach-mx3/mx31lite-db.c
index ccd874225c3b..093c595ca581 100644
--- a/arch/arm/mach-mx3/mx31lite-db.c
+++ b/arch/arm/mach-mx3/mx31lite-db.c
@@ -28,7 +28,6 @@
28#include <linux/types.h> 28#include <linux/types.h>
29#include <linux/init.h> 29#include <linux/init.h>
30#include <linux/gpio.h> 30#include <linux/gpio.h>
31#include <linux/platform_device.h>
32#include <linux/leds.h> 31#include <linux/leds.h>
33#include <linux/platform_device.h> 32#include <linux/platform_device.h>
34 33
@@ -206,5 +205,6 @@ void __init mx31lite_db_init(void)
206 mxc_register_device(&mxcsdhc_device0, &mmc_pdata); 205 mxc_register_device(&mxcsdhc_device0, &mmc_pdata);
207 mxc_register_device(&mxc_spi_device0, &spi0_pdata); 206 mxc_register_device(&mxc_spi_device0, &spi0_pdata);
208 platform_device_register(&litekit_led_device); 207 platform_device_register(&litekit_led_device);
208 mxc_register_device(&imx_wdt_device0, NULL);
209} 209}
210 210
diff --git a/arch/arm/mach-mx3/mx31moboard-devboard.c b/arch/arm/mach-mx3/mx31moboard-devboard.c
index 9fbad2eb3a49..11b906ce7eae 100644
--- a/arch/arm/mach-mx3/mx31moboard-devboard.c
+++ b/arch/arm/mach-mx3/mx31moboard-devboard.c
@@ -20,6 +20,7 @@
20#include <linux/init.h> 20#include <linux/init.h>
21#include <linux/interrupt.h> 21#include <linux/interrupt.h>
22#include <linux/platform_device.h> 22#include <linux/platform_device.h>
23#include <linux/slab.h>
23#include <linux/types.h> 24#include <linux/types.h>
24 25
25#include <linux/usb/otg.h> 26#include <linux/usb/otg.h>
diff --git a/arch/arm/mach-mx3/mx31moboard-marxbot.c b/arch/arm/mach-mx3/mx31moboard-marxbot.c
index 3958515d75bf..ffb105e14d88 100644
--- a/arch/arm/mach-mx3/mx31moboard-marxbot.c
+++ b/arch/arm/mach-mx3/mx31moboard-marxbot.c
@@ -22,6 +22,7 @@
22#include <linux/interrupt.h> 22#include <linux/interrupt.h>
23#include <linux/i2c.h> 23#include <linux/i2c.h>
24#include <linux/spi/spi.h> 24#include <linux/spi/spi.h>
25#include <linux/slab.h>
25#include <linux/platform_device.h> 26#include <linux/platform_device.h>
26#include <linux/types.h> 27#include <linux/types.h>
27 28
diff --git a/arch/arm/mach-mx5/clock-mx51.c b/arch/arm/mach-mx5/clock-mx51.c
index be90c03101cd..1ee6ce4087b8 100644
--- a/arch/arm/mach-mx5/clock-mx51.c
+++ b/arch/arm/mach-mx5/clock-mx51.c
@@ -16,6 +16,7 @@
16#include <linux/io.h> 16#include <linux/io.h>
17 17
18#include <asm/clkdev.h> 18#include <asm/clkdev.h>
19#include <asm/div64.h>
19 20
20#include <mach/hardware.h> 21#include <mach/hardware.h>
21#include <mach/common.h> 22#include <mach/common.h>
@@ -757,7 +758,7 @@ DEFINE_CLOCK(uart3_ipg_clk, 2, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG7_OFFSET,
757 758
758/* GPT */ 759/* GPT */
759DEFINE_CLOCK(gpt_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG9_OFFSET, 760DEFINE_CLOCK(gpt_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG9_OFFSET,
760 NULL, NULL, &ipg_perclk, NULL); 761 NULL, NULL, &ipg_clk, NULL);
761DEFINE_CLOCK(gpt_ipg_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG10_OFFSET, 762DEFINE_CLOCK(gpt_ipg_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG10_OFFSET,
762 NULL, NULL, &ipg_clk, NULL); 763 NULL, NULL, &ipg_clk, NULL);
763 764
diff --git a/arch/arm/mach-mx5/cpu.c b/arch/arm/mach-mx5/cpu.c
index 41c769f08c4d..2d37785e3857 100644
--- a/arch/arm/mach-mx5/cpu.c
+++ b/arch/arm/mach-mx5/cpu.c
@@ -14,9 +14,62 @@
14#include <linux/types.h> 14#include <linux/types.h>
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/module.h>
17#include <mach/hardware.h> 18#include <mach/hardware.h>
18#include <asm/io.h> 19#include <asm/io.h>
19 20
21static int cpu_silicon_rev = -1;
22
23#define SI_REV 0x48
24
25static void query_silicon_parameter(void)
26{
27 void __iomem *rom = ioremap(MX51_IROM_BASE_ADDR, MX51_IROM_SIZE);
28 u32 rev;
29
30 if (!rom) {
31 cpu_silicon_rev = -EINVAL;
32 return;
33 }
34
35 rev = readl(rom + SI_REV);
36 switch (rev) {
37 case 0x1:
38 cpu_silicon_rev = MX51_CHIP_REV_1_0;
39 break;
40 case 0x2:
41 cpu_silicon_rev = MX51_CHIP_REV_1_1;
42 break;
43 case 0x10:
44 cpu_silicon_rev = MX51_CHIP_REV_2_0;
45 break;
46 case 0x20:
47 cpu_silicon_rev = MX51_CHIP_REV_3_0;
48 break;
49 default:
50 cpu_silicon_rev = 0;
51 }
52
53 iounmap(rom);
54}
55
56/*
57 * Returns:
58 * the silicon revision of the cpu
59 * -EINVAL - not a mx51
60 */
61int mx51_revision(void)
62{
63 if (!cpu_is_mx51())
64 return -EINVAL;
65
66 if (cpu_silicon_rev == -1)
67 query_silicon_parameter();
68
69 return cpu_silicon_rev;
70}
71EXPORT_SYMBOL(mx51_revision);
72
20static int __init post_cpu_init(void) 73static int __init post_cpu_init(void)
21{ 74{
22 unsigned int reg; 75 unsigned int reg;
diff --git a/arch/arm/mach-mx5/mm.c b/arch/arm/mach-mx5/mm.c
index c21e18be7af8..b7677ef80cc4 100644
--- a/arch/arm/mach-mx5/mm.c
+++ b/arch/arm/mach-mx5/mm.c
@@ -35,11 +35,6 @@ static struct map_desc mxc_io_desc[] __initdata = {
35 .length = MX51_DEBUG_SIZE, 35 .length = MX51_DEBUG_SIZE,
36 .type = MT_DEVICE 36 .type = MT_DEVICE
37 }, { 37 }, {
38 .virtual = MX51_TZIC_BASE_ADDR_VIRT,
39 .pfn = __phys_to_pfn(MX51_TZIC_BASE_ADDR),
40 .length = MX51_TZIC_SIZE,
41 .type = MT_DEVICE
42 }, {
43 .virtual = MX51_AIPS1_BASE_ADDR_VIRT, 38 .virtual = MX51_AIPS1_BASE_ADDR_VIRT,
44 .pfn = __phys_to_pfn(MX51_AIPS1_BASE_ADDR), 39 .pfn = __phys_to_pfn(MX51_AIPS1_BASE_ADDR),
45 .length = MX51_AIPS1_SIZE, 40 .length = MX51_AIPS1_SIZE,
@@ -54,11 +49,6 @@ static struct map_desc mxc_io_desc[] __initdata = {
54 .pfn = __phys_to_pfn(MX51_AIPS2_BASE_ADDR), 49 .pfn = __phys_to_pfn(MX51_AIPS2_BASE_ADDR),
55 .length = MX51_AIPS2_SIZE, 50 .length = MX51_AIPS2_SIZE,
56 .type = MT_DEVICE 51 .type = MT_DEVICE
57 }, {
58 .virtual = MX51_NFC_AXI_BASE_ADDR_VIRT,
59 .pfn = __phys_to_pfn(MX51_NFC_AXI_BASE_ADDR),
60 .length = MX51_NFC_AXI_SIZE,
61 .type = MT_DEVICE
62 }, 52 },
63}; 53};
64 54
@@ -69,14 +59,6 @@ static struct map_desc mxc_io_desc[] __initdata = {
69 */ 59 */
70void __init mx51_map_io(void) 60void __init mx51_map_io(void)
71{ 61{
72 u32 tzic_addr;
73
74 if (mx51_revision() < MX51_CHIP_REV_2_0)
75 tzic_addr = 0x8FFFC000;
76 else
77 tzic_addr = 0xE0003000;
78 mxc_io_desc[2].pfn = __phys_to_pfn(tzic_addr);
79
80 mxc_set_cpu_type(MXC_CPU_MX51); 62 mxc_set_cpu_type(MXC_CPU_MX51);
81 mxc_iomux_v3_init(MX51_IO_ADDRESS(MX51_IOMUXC_BASE_ADDR)); 63 mxc_iomux_v3_init(MX51_IO_ADDRESS(MX51_IOMUXC_BASE_ADDR));
82 mxc_arch_reset_init(MX51_IO_ADDRESS(MX51_WDOG_BASE_ADDR)); 64 mxc_arch_reset_init(MX51_IO_ADDRESS(MX51_WDOG_BASE_ADDR));
@@ -85,5 +67,17 @@ void __init mx51_map_io(void)
85 67
86void __init mx51_init_irq(void) 68void __init mx51_init_irq(void)
87{ 69{
88 tzic_init_irq(MX51_IO_ADDRESS(MX51_TZIC_BASE_ADDR)); 70 unsigned long tzic_addr;
71 void __iomem *tzic_virt;
72
73 if (mx51_revision() < MX51_CHIP_REV_2_0)
74 tzic_addr = MX51_TZIC_BASE_ADDR_TO1;
75 else
76 tzic_addr = MX51_TZIC_BASE_ADDR;
77
78 tzic_virt = ioremap(tzic_addr, SZ_16K);
79 if (!tzic_virt)
80 panic("unable to map TZIC interrupt controller\n");
81
82 tzic_init_irq(tzic_virt);
89} 83}
diff --git a/arch/arm/mach-netx/fb.c b/arch/arm/mach-netx/fb.c
index 1d844e228ea9..5b84bcd30271 100644
--- a/arch/arm/mach-netx/fb.c
+++ b/arch/arm/mach-netx/fb.c
@@ -23,6 +23,7 @@
23#include <linux/amba/bus.h> 23#include <linux/amba/bus.h>
24#include <linux/amba/clcd.h> 24#include <linux/amba/clcd.h>
25#include <linux/err.h> 25#include <linux/err.h>
26#include <linux/gfp.h>
26 27
27#include <asm/irq.h> 28#include <asm/irq.h>
28 29
diff --git a/arch/arm/mach-netx/xc.c b/arch/arm/mach-netx/xc.c
index 181a78ba8165..f009b54e8d20 100644
--- a/arch/arm/mach-netx/xc.c
+++ b/arch/arm/mach-netx/xc.c
@@ -21,6 +21,7 @@
21#include <linux/device.h> 21#include <linux/device.h>
22#include <linux/firmware.h> 22#include <linux/firmware.h>
23#include <linux/mutex.h> 23#include <linux/mutex.h>
24#include <linux/slab.h>
24#include <linux/io.h> 25#include <linux/io.h>
25 26
26#include <mach/hardware.h> 27#include <mach/hardware.h>
diff --git a/arch/arm/mach-ns9xxx/plat-serial8250.c b/arch/arm/mach-ns9xxx/plat-serial8250.c
index 795b15e8982a..463e92465fda 100644
--- a/arch/arm/mach-ns9xxx/plat-serial8250.c
+++ b/arch/arm/mach-ns9xxx/plat-serial8250.c
@@ -10,6 +10,7 @@
10 */ 10 */
11#include <linux/platform_device.h> 11#include <linux/platform_device.h>
12#include <linux/serial_8250.h> 12#include <linux/serial_8250.h>
13#include <linux/slab.h>
13 14
14#include <mach/regs-board-a9m9750dev.h> 15#include <mach/regs-board-a9m9750dev.h>
15#include <mach/board.h> 16#include <mach/board.h>
diff --git a/arch/arm/mach-ns9xxx/processor-ns9360.c b/arch/arm/mach-ns9xxx/processor-ns9360.c
index abee8338735d..aed1999d24fc 100644
--- a/arch/arm/mach-ns9xxx/processor-ns9360.c
+++ b/arch/arm/mach-ns9xxx/processor-ns9360.c
@@ -10,7 +10,6 @@
10 */ 10 */
11#include <linux/io.h> 11#include <linux/io.h>
12#include <linux/kernel.h> 12#include <linux/kernel.h>
13#include <linux/slab.h>
14 13
15#include <asm/page.h> 14#include <asm/page.h>
16#include <asm/mach/map.h> 15#include <asm/mach/map.h>
diff --git a/arch/arm/mach-omap1/mcbsp.c b/arch/arm/mach-omap1/mcbsp.c
index f9a5cf750b59..e9bdff192f82 100644
--- a/arch/arm/mach-omap1/mcbsp.c
+++ b/arch/arm/mach-omap1/mcbsp.c
@@ -16,6 +16,7 @@
16#include <linux/err.h> 16#include <linux/err.h>
17#include <linux/io.h> 17#include <linux/io.h>
18#include <linux/platform_device.h> 18#include <linux/platform_device.h>
19#include <linux/slab.h>
19 20
20#include <mach/irqs.h> 21#include <mach/irqs.h>
21#include <plat/dma.h> 22#include <plat/dma.h>
diff --git a/arch/arm/mach-omap1/timer32k.c b/arch/arm/mach-omap1/timer32k.c
index 9ad118563f7d..20cfbcc6c60c 100644
--- a/arch/arm/mach-omap1/timer32k.c
+++ b/arch/arm/mach-omap1/timer32k.c
@@ -68,12 +68,6 @@ struct sys_timer omap_timer;
68 * --------------------------------------------------------------------------- 68 * ---------------------------------------------------------------------------
69 */ 69 */
70 70
71#if defined(CONFIG_ARCH_OMAP16XX)
72#define TIMER_32K_SYNCHRONIZED 0xfffbc410
73#else
74#error OMAP 32KHz timer does not currently work on 15XX!
75#endif
76
77/* 16xx specific defines */ 71/* 16xx specific defines */
78#define OMAP1_32K_TIMER_BASE 0xfffb9000 72#define OMAP1_32K_TIMER_BASE 0xfffb9000
79#define OMAP1_32K_TIMER_CR 0x08 73#define OMAP1_32K_TIMER_CR 0x08
@@ -150,15 +144,6 @@ static struct clock_event_device clockevent_32k_timer = {
150 .set_mode = omap_32k_timer_set_mode, 144 .set_mode = omap_32k_timer_set_mode,
151}; 145};
152 146
153/*
154 * The 32KHz synchronized timer is an additional timer on 16xx.
155 * It is always running.
156 */
157static inline unsigned long omap_32k_sync_timer_read(void)
158{
159 return omap_readl(TIMER_32K_SYNCHRONIZED);
160}
161
162static irqreturn_t omap_32k_timer_interrupt(int irq, void *dev_id) 147static irqreturn_t omap_32k_timer_interrupt(int irq, void *dev_id)
163{ 148{
164 struct clock_event_device *evt = &clockevent_32k_timer; 149 struct clock_event_device *evt = &clockevent_32k_timer;
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index a8a3d1e23e26..2455dcc744a0 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -59,8 +59,10 @@ config MACH_OMAP3_BEAGLE
59 select OMAP_PACKAGE_CBB 59 select OMAP_PACKAGE_CBB
60 60
61config MACH_DEVKIT8000 61config MACH_DEVKIT8000
62 bool "DEVKIT8000 board" 62 bool "DEVKIT8000 board"
63 depends on ARCH_OMAP3 63 depends on ARCH_OMAP3
64 select OMAP_PACKAGE_CUS
65 select OMAP_MUX
64 66
65config MACH_OMAP_LDP 67config MACH_OMAP_LDP
66 bool "OMAP3 LDP board" 68 bool "OMAP3 LDP board"
diff --git a/arch/arm/mach-omap2/board-3630sdp.c b/arch/arm/mach-omap2/board-3630sdp.c
index a0a2a113465c..504d2bd222fe 100644
--- a/arch/arm/mach-omap2/board-3630sdp.c
+++ b/arch/arm/mach-omap2/board-3630sdp.c
@@ -96,6 +96,7 @@ static struct omap_board_mux board_mux[] __initdata = {
96static void __init omap_sdp_init(void) 96static void __init omap_sdp_init(void)
97{ 97{
98 omap3_mux_init(board_mux, OMAP_PACKAGE_CBP); 98 omap3_mux_init(board_mux, OMAP_PACKAGE_CBP);
99 omap_serial_init();
99 zoom_peripherals_init(); 100 zoom_peripherals_init();
100 board_smc91x_init(); 101 board_smc91x_init();
101 enable_board_wakeup_source(); 102 enable_board_wakeup_source();
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
index 6ae880585d54..c1c4389fbd8f 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -294,9 +294,9 @@ static struct omap_board_mux board_mux[] __initdata = {
294 294
295static void __init am3517_evm_init(void) 295static void __init am3517_evm_init(void)
296{ 296{
297 am3517_evm_i2c_init();
298
299 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); 297 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
298
299 am3517_evm_i2c_init();
300 platform_add_devices(am3517_evm_devices, 300 platform_add_devices(am3517_evm_devices,
301 ARRAY_SIZE(am3517_evm_devices)); 301 ARRAY_SIZE(am3517_evm_devices));
302 302
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index 5bfc13b3176c..47e3af2166d4 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -50,7 +50,6 @@
50#include <linux/input/matrix_keypad.h> 50#include <linux/input/matrix_keypad.h>
51#include <linux/spi/spi.h> 51#include <linux/spi/spi.h>
52#include <linux/spi/ads7846.h> 52#include <linux/spi/ads7846.h>
53#include <linux/usb/otg.h>
54#include <linux/dm9000.h> 53#include <linux/dm9000.h>
55#include <linux/interrupt.h> 54#include <linux/interrupt.h>
56 55
@@ -269,20 +268,6 @@ static int devkit8000_twl_gpio_setup(struct device *dev,
269 devkit8000_vmmc1_supply.dev = mmc[0].dev; 268 devkit8000_vmmc1_supply.dev = mmc[0].dev;
270 devkit8000_vsim_supply.dev = mmc[0].dev; 269 devkit8000_vsim_supply.dev = mmc[0].dev;
271 270
272 /* REVISIT: need ehci-omap hooks for external VBUS
273 * power switch and overcurrent detect
274 */
275
276 gpio_request(gpio + 1, "EHCI_nOC");
277 gpio_direction_input(gpio + 1);
278
279 /* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, active low) */
280 gpio_request(gpio + TWL4030_GPIO_MAX, "nEN_USB_PWR");
281 gpio_direction_output(gpio + TWL4030_GPIO_MAX, 1);
282
283 /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
284 gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
285
286 return 0; 271 return 0;
287} 272}
288 273
@@ -303,7 +288,7 @@ static struct regulator_consumer_supply devkit8000_vpll2_supplies[] = {
303 .dev = &devkit8000_lcd_device.dev, 288 .dev = &devkit8000_lcd_device.dev,
304 }, 289 },
305 { 290 {
306 .supply = "vdss_dsi", 291 .supply = "vdds_dsi",
307 .dev = &devkit8000_dss_device.dev, 292 .dev = &devkit8000_dss_device.dev,
308 } 293 }
309}; 294};
@@ -639,17 +624,21 @@ static struct omap_musb_board_data musb_board_data = {
639static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { 624static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
640 625
641 .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, 626 .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
642 .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, 627 .port_mode[1] = EHCI_HCD_OMAP_MODE_UNKNOWN,
643 .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, 628 .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
644 629
645 .phy_reset = true, 630 .phy_reset = true,
646 .reset_gpio_port[0] = -EINVAL, 631 .reset_gpio_port[0] = -EINVAL,
647 .reset_gpio_port[1] = 147, 632 .reset_gpio_port[1] = -EINVAL,
648 .reset_gpio_port[2] = -EINVAL 633 .reset_gpio_port[2] = -EINVAL
649}; 634};
650 635
651static void __init devkit8000_init(void) 636static void __init devkit8000_init(void)
652{ 637{
638 omap_serial_init();
639
640 omap_dm9000_init();
641
653 devkit8000_i2c_init(); 642 devkit8000_i2c_init();
654 platform_add_devices(devkit8000_devices, 643 platform_add_devices(devkit8000_devices,
655 ARRAY_SIZE(devkit8000_devices)); 644 ARRAY_SIZE(devkit8000_devices));
@@ -659,25 +648,15 @@ static void __init devkit8000_init(void)
659 spi_register_board_info(devkit8000_spi_board_info, 648 spi_register_board_info(devkit8000_spi_board_info,
660 ARRAY_SIZE(devkit8000_spi_board_info)); 649 ARRAY_SIZE(devkit8000_spi_board_info));
661 650
662 omap_serial_init();
663
664 omap_dm9000_init();
665
666 devkit8000_ads7846_init(); 651 devkit8000_ads7846_init();
667 652
668 omap_mux_init_gpio(170, OMAP_PIN_INPUT);
669
670 gpio_request(170, "DVI_nPD");
671 /* REVISIT leave DVI powered down until it's needed ... */
672 gpio_direction_output(170, true);
673
674 usb_musb_init(&musb_board_data); 653 usb_musb_init(&musb_board_data);
675 usb_ehci_init(&ehci_pdata); 654 usb_ehci_init(&ehci_pdata);
676 devkit8000_flash_init(); 655 devkit8000_flash_init();
677 656
678 /* Ensure SDRC pins are mux'd for self-refresh */ 657 /* Ensure SDRC pins are mux'd for self-refresh */
679 omap_mux_init_signal("sdr_cke0", OMAP_PIN_OUTPUT); 658 omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
680 omap_mux_init_signal("sdr_cke1", OMAP_PIN_OUTPUT); 659 omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);
681} 660}
682 661
683static void __init devkit8000_map_io(void) 662static void __init devkit8000_map_io(void)
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index 3c7789d45051..d55c57b761a9 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -458,13 +458,13 @@ static struct omap_musb_board_data musb_board_data = {
458}; 458};
459 459
460static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { 460static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
461 .port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN, 461 .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
462 .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, 462 .port_mode[1] = EHCI_HCD_OMAP_MODE_UNKNOWN,
463 .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, 463 .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
464 464
465 .phy_reset = true, 465 .phy_reset = true,
466 .reset_gpio_port[0] = -EINVAL, 466 .reset_gpio_port[0] = IGEP2_GPIO_USBH_NRESET,
467 .reset_gpio_port[1] = IGEP2_GPIO_USBH_NRESET, 467 .reset_gpio_port[1] = -EINVAL,
468 .reset_gpio_port[2] = -EINVAL, 468 .reset_gpio_port[2] = -EINVAL,
469}; 469};
470 470
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
index da9bcb898991..3ccc34ebdcc7 100644
--- a/arch/arm/mach-omap2/board-n8x0.c
+++ b/arch/arm/mach-omap2/board-n8x0.c
@@ -216,7 +216,7 @@ static void __init n8x0_onenand_init(void) {}
216 */ 216 */
217#define N8X0_SLOT_SWITCH_GPIO 96 217#define N8X0_SLOT_SWITCH_GPIO 96
218#define N810_EMMC_VSD_GPIO 23 218#define N810_EMMC_VSD_GPIO 23
219#define NN810_EMMC_VIO_GPIO 9 219#define N810_EMMC_VIO_GPIO 9
220 220
221static int n8x0_mmc_switch_slot(struct device *dev, int slot) 221static int n8x0_mmc_switch_slot(struct device *dev, int slot)
222{ 222{
@@ -304,10 +304,10 @@ static void n810_set_power_emmc(struct device *dev,
304 if (power_on) { 304 if (power_on) {
305 gpio_set_value(N810_EMMC_VSD_GPIO, 1); 305 gpio_set_value(N810_EMMC_VSD_GPIO, 1);
306 msleep(1); 306 msleep(1);
307 gpio_set_value(NN810_EMMC_VIO_GPIO, 1); 307 gpio_set_value(N810_EMMC_VIO_GPIO, 1);
308 msleep(1); 308 msleep(1);
309 } else { 309 } else {
310 gpio_set_value(NN810_EMMC_VIO_GPIO, 0); 310 gpio_set_value(N810_EMMC_VIO_GPIO, 0);
311 msleep(50); 311 msleep(50);
312 gpio_set_value(N810_EMMC_VSD_GPIO, 0); 312 gpio_set_value(N810_EMMC_VSD_GPIO, 0);
313 msleep(50); 313 msleep(50);
@@ -468,7 +468,7 @@ static void n8x0_mmc_cleanup(struct device *dev)
468 468
469 if (machine_is_nokia_n810()) { 469 if (machine_is_nokia_n810()) {
470 gpio_free(N810_EMMC_VSD_GPIO); 470 gpio_free(N810_EMMC_VSD_GPIO);
471 gpio_free(NN810_EMMC_VIO_GPIO); 471 gpio_free(N810_EMMC_VIO_GPIO);
472 } 472 }
473} 473}
474 474
@@ -529,7 +529,7 @@ void __init n8x0_mmc_init(void)
529 529
530 err = gpio_request(N8X0_SLOT_SWITCH_GPIO, "MMC slot switch"); 530 err = gpio_request(N8X0_SLOT_SWITCH_GPIO, "MMC slot switch");
531 if (err) 531 if (err)
532 return err; 532 return;
533 533
534 gpio_direction_output(N8X0_SLOT_SWITCH_GPIO, 0); 534 gpio_direction_output(N8X0_SLOT_SWITCH_GPIO, 0);
535 535
@@ -537,17 +537,17 @@ void __init n8x0_mmc_init(void)
537 err = gpio_request(N810_EMMC_VSD_GPIO, "MMC slot 2 Vddf"); 537 err = gpio_request(N810_EMMC_VSD_GPIO, "MMC slot 2 Vddf");
538 if (err) { 538 if (err) {
539 gpio_free(N8X0_SLOT_SWITCH_GPIO); 539 gpio_free(N8X0_SLOT_SWITCH_GPIO);
540 return err; 540 return;
541 } 541 }
542 gpio_direction_output(N810_EMMC_VSD_GPIO, 0); 542 gpio_direction_output(N810_EMMC_VSD_GPIO, 0);
543 543
544 err = gpio_request(NN810_EMMC_VIO_GPIO, "MMC slot 2 Vdd"); 544 err = gpio_request(N810_EMMC_VIO_GPIO, "MMC slot 2 Vdd");
545 if (err) { 545 if (err) {
546 gpio_free(N8X0_SLOT_SWITCH_GPIO); 546 gpio_free(N8X0_SLOT_SWITCH_GPIO);
547 gpio_free(N810_EMMC_VSD_GPIO); 547 gpio_free(N810_EMMC_VSD_GPIO);
548 return err; 548 return;
549 } 549 }
550 gpio_direction_output(NN810_EMMC_VIO_GPIO, 0); 550 gpio_direction_output(N810_EMMC_VIO_GPIO, 0);
551 } 551 }
552 552
553 mmc_data[0] = &mmc1_data; 553 mmc_data[0] = &mmc1_data;
diff --git a/arch/arm/mach-omap2/board-sdp-flash.c b/arch/arm/mach-omap2/board-sdp-flash.c
index b1b88deec7f2..2d026328e385 100644
--- a/arch/arm/mach-omap2/board-sdp-flash.c
+++ b/arch/arm/mach-omap2/board-sdp-flash.c
@@ -253,20 +253,20 @@ void __init sdp_flash_init(struct flash_partitions sdp_partition_info[])
253 } 253 }
254 254
255 if (norcs > GPMC_CS_NUM) 255 if (norcs > GPMC_CS_NUM)
256 printk(KERN_INFO "OneNAND: Unable to find configuration " 256 printk(KERN_INFO "NOR: Unable to find configuration "
257 " in GPMC\n "); 257 "in GPMC\n");
258 else 258 else
259 board_nor_init(sdp_partition_info[0], norcs); 259 board_nor_init(sdp_partition_info[0], norcs);
260 260
261 if (onenandcs > GPMC_CS_NUM) 261 if (onenandcs > GPMC_CS_NUM)
262 printk(KERN_INFO "OneNAND: Unable to find configuration " 262 printk(KERN_INFO "OneNAND: Unable to find configuration "
263 " in GPMC\n "); 263 "in GPMC\n");
264 else 264 else
265 board_onenand_init(sdp_partition_info[1], onenandcs); 265 board_onenand_init(sdp_partition_info[1], onenandcs);
266 266
267 if (nandcs > GPMC_CS_NUM) 267 if (nandcs > GPMC_CS_NUM)
268 printk(KERN_INFO "NAND: Unable to find configuration " 268 printk(KERN_INFO "NAND: Unable to find configuration "
269 " in GPMC\n "); 269 "in GPMC\n");
270 else 270 else
271 board_nand_init(sdp_partition_info[2], nandcs); 271 board_nand_init(sdp_partition_info[2], nandcs);
272} 272}
diff --git a/arch/arm/mach-omap2/board-zoom-debugboard.c b/arch/arm/mach-omap2/board-zoom-debugboard.c
index bb4018b60642..e15d2e87cfc1 100644
--- a/arch/arm/mach-omap2/board-zoom-debugboard.c
+++ b/arch/arm/mach-omap2/board-zoom-debugboard.c
@@ -96,7 +96,7 @@ static struct plat_serial8250_port serial_platform_data[] = {
96 96
97static struct platform_device zoom_debugboard_serial_device = { 97static struct platform_device zoom_debugboard_serial_device = {
98 .name = "serial8250", 98 .name = "serial8250",
99 .id = 3, 99 .id = PLAT8250_DEV_PLATFORM,
100 .dev = { 100 .dev = {
101 .platform_data = serial_platform_data, 101 .platform_data = serial_platform_data,
102 }, 102 },
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c
index ca95d8d64136..6b3984964cc5 100644
--- a/arch/arm/mach-omap2/board-zoom-peripherals.c
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -280,7 +280,6 @@ static void enable_board_wakeup_source(void)
280void __init zoom_peripherals_init(void) 280void __init zoom_peripherals_init(void)
281{ 281{
282 omap_i2c_init(); 282 omap_i2c_init();
283 omap_serial_init();
284 usb_musb_init(&musb_board_data); 283 usb_musb_init(&musb_board_data);
285 enable_board_wakeup_source(); 284 enable_board_wakeup_source();
286} 285}
diff --git a/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c b/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c
index 3b1eac4d5390..e60ca4e47bbd 100644
--- a/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c
+++ b/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c
@@ -31,6 +31,7 @@
31#include <linux/clk.h> 31#include <linux/clk.h>
32#include <linux/io.h> 32#include <linux/io.h>
33#include <linux/cpufreq.h> 33#include <linux/cpufreq.h>
34#include <linux/slab.h>
34 35
35#include <plat/clock.h> 36#include <plat/clock.h>
36#include <plat/sram.h> 37#include <plat/sram.h>
diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c
index d5153b6bd6cb..9cba5560519b 100644
--- a/arch/arm/mach-omap2/clock3xxx_data.c
+++ b/arch/arm/mach-omap2/clock3xxx_data.c
@@ -895,7 +895,7 @@ static struct clk dpll4_m4x2_ck = {
895 .ops = &clkops_omap2_dflt_wait, 895 .ops = &clkops_omap2_dflt_wait,
896 .parent = &dpll4_m4_ck, 896 .parent = &dpll4_m4_ck,
897 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN), 897 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
898 .enable_bit = OMAP3430_PWRDN_CAM_SHIFT, 898 .enable_bit = OMAP3430_PWRDN_DSS1_SHIFT,
899 .flags = INVERT_ENABLE, 899 .flags = INVERT_ENABLE,
900 .clkdm_name = "dpll4_clkdm", 900 .clkdm_name = "dpll4_clkdm",
901 .recalc = &omap3_clkoutx2_recalc, 901 .recalc = &omap3_clkoutx2_recalc,
diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c
index 28b107967c86..a5c0c9c8e496 100644
--- a/arch/arm/mach-omap2/clock44xx_data.c
+++ b/arch/arm/mach-omap2/clock44xx_data.c
@@ -2671,10 +2671,10 @@ static struct omap_clk omap44xx_clks[] = {
2671 CLK("omap-mcbsp.2", "ick", &dummy_ck, CK_443X), 2671 CLK("omap-mcbsp.2", "ick", &dummy_ck, CK_443X),
2672 CLK("omap-mcbsp.3", "ick", &dummy_ck, CK_443X), 2672 CLK("omap-mcbsp.3", "ick", &dummy_ck, CK_443X),
2673 CLK("omap-mcbsp.4", "ick", &dummy_ck, CK_443X), 2673 CLK("omap-mcbsp.4", "ick", &dummy_ck, CK_443X),
2674 CLK("omap-mcspi.1", "ick", &dummy_ck, CK_443X), 2674 CLK("omap2_mcspi.1", "ick", &dummy_ck, CK_443X),
2675 CLK("omap-mcspi.2", "ick", &dummy_ck, CK_443X), 2675 CLK("omap2_mcspi.2", "ick", &dummy_ck, CK_443X),
2676 CLK("omap-mcspi.3", "ick", &dummy_ck, CK_443X), 2676 CLK("omap2_mcspi.3", "ick", &dummy_ck, CK_443X),
2677 CLK("omap-mcspi.4", "ick", &dummy_ck, CK_443X), 2677 CLK("omap2_mcspi.4", "ick", &dummy_ck, CK_443X),
2678 CLK(NULL, "uart1_ick", &dummy_ck, CK_443X), 2678 CLK(NULL, "uart1_ick", &dummy_ck, CK_443X),
2679 CLK(NULL, "uart2_ick", &dummy_ck, CK_443X), 2679 CLK(NULL, "uart2_ick", &dummy_ck, CK_443X),
2680 CLK(NULL, "uart3_ick", &dummy_ck, CK_443X), 2680 CLK(NULL, "uart3_ick", &dummy_ck, CK_443X),
diff --git a/arch/arm/mach-omap2/clockdomain.c b/arch/arm/mach-omap2/clockdomain.c
index b87ad66f083e..6e568ec995ee 100644
--- a/arch/arm/mach-omap2/clockdomain.c
+++ b/arch/arm/mach-omap2/clockdomain.c
@@ -240,7 +240,7 @@ static void _omap2_clkdm_set_hwsup(struct clockdomain *clkdm, int enable)
240 bits = OMAP24XX_CLKSTCTRL_ENABLE_AUTO; 240 bits = OMAP24XX_CLKSTCTRL_ENABLE_AUTO;
241 else 241 else
242 bits = OMAP24XX_CLKSTCTRL_DISABLE_AUTO; 242 bits = OMAP24XX_CLKSTCTRL_DISABLE_AUTO;
243 } else if (cpu_is_omap34xx() | cpu_is_omap44xx()) { 243 } else if (cpu_is_omap34xx() || cpu_is_omap44xx()) {
244 if (enable) 244 if (enable)
245 bits = OMAP34XX_CLKSTCTRL_ENABLE_AUTO; 245 bits = OMAP34XX_CLKSTCTRL_ENABLE_AUTO;
246 else 246 else
@@ -812,7 +812,7 @@ int omap2_clkdm_sleep(struct clockdomain *clkdm)
812 cm_set_mod_reg_bits(OMAP24XX_FORCESTATE, 812 cm_set_mod_reg_bits(OMAP24XX_FORCESTATE,
813 clkdm->pwrdm.ptr->prcm_offs, OMAP2_PM_PWSTCTRL); 813 clkdm->pwrdm.ptr->prcm_offs, OMAP2_PM_PWSTCTRL);
814 814
815 } else if (cpu_is_omap34xx() | cpu_is_omap44xx()) { 815 } else if (cpu_is_omap34xx() || cpu_is_omap44xx()) {
816 816
817 u32 bits = (OMAP34XX_CLKSTCTRL_FORCE_SLEEP << 817 u32 bits = (OMAP34XX_CLKSTCTRL_FORCE_SLEEP <<
818 __ffs(clkdm->clktrctrl_mask)); 818 __ffs(clkdm->clktrctrl_mask));
@@ -856,7 +856,7 @@ int omap2_clkdm_wakeup(struct clockdomain *clkdm)
856 cm_clear_mod_reg_bits(OMAP24XX_FORCESTATE, 856 cm_clear_mod_reg_bits(OMAP24XX_FORCESTATE,
857 clkdm->pwrdm.ptr->prcm_offs, OMAP2_PM_PWSTCTRL); 857 clkdm->pwrdm.ptr->prcm_offs, OMAP2_PM_PWSTCTRL);
858 858
859 } else if (cpu_is_omap34xx() | cpu_is_omap44xx()) { 859 } else if (cpu_is_omap34xx() || cpu_is_omap44xx()) {
860 860
861 u32 bits = (OMAP34XX_CLKSTCTRL_FORCE_WAKEUP << 861 u32 bits = (OMAP34XX_CLKSTCTRL_FORCE_WAKEUP <<
862 __ffs(clkdm->clktrctrl_mask)); 862 __ffs(clkdm->clktrctrl_mask));
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 4a1c2328bcc3..12154d10e536 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -759,7 +759,7 @@ void __init omap2_init_mmc(struct omap_mmc_platform_data **mmc_data,
759 if (!cpu_is_omap44xx()) 759 if (!cpu_is_omap44xx())
760 return; 760 return;
761 base = OMAP4_MMC5_BASE + OMAP4_MMC_REG_OFFSET; 761 base = OMAP4_MMC5_BASE + OMAP4_MMC_REG_OFFSET;
762 irq = OMAP44XX_IRQ_MMC4; 762 irq = OMAP44XX_IRQ_MMC5;
763 break; 763 break;
764 default: 764 default:
765 continue; 765 continue;
diff --git a/arch/arm/mach-omap2/gpmc-nand.c b/arch/arm/mach-omap2/gpmc-nand.c
index 64d74f05abbe..e57fb29ff855 100644
--- a/arch/arm/mach-omap2/gpmc-nand.c
+++ b/arch/arm/mach-omap2/gpmc-nand.c
@@ -39,6 +39,9 @@ static int omap2_nand_gpmc_retime(void)
39 struct gpmc_timings t; 39 struct gpmc_timings t;
40 int err; 40 int err;
41 41
42 if (!gpmc_nand_data->gpmc_t)
43 return 0;
44
42 memset(&t, 0, sizeof(t)); 45 memset(&t, 0, sizeof(t));
43 t.sync_clk = gpmc_round_ns_to_ticks(gpmc_nand_data->gpmc_t->sync_clk); 46 t.sync_clk = gpmc_round_ns_to_ticks(gpmc_nand_data->gpmc_t->sync_clk);
44 t.cs_on = gpmc_round_ns_to_ticks(gpmc_nand_data->gpmc_t->cs_on); 47 t.cs_on = gpmc_round_ns_to_ticks(gpmc_nand_data->gpmc_t->cs_on);
diff --git a/arch/arm/mach-omap2/include/mach/entry-macro.S b/arch/arm/mach-omap2/include/mach/entry-macro.S
index ff25c7e4e606..50fd74916643 100644
--- a/arch/arm/mach-omap2/include/mach/entry-macro.S
+++ b/arch/arm/mach-omap2/include/mach/entry-macro.S
@@ -52,7 +52,7 @@ omap_irq_base: .word 0
52 52
53 mrc p15, 0, \tmp, c0, c0, 0 @ get processor revision 53 mrc p15, 0, \tmp, c0, c0, 0 @ get processor revision
54 and \tmp, \tmp, #0x000f0000 @ only check architecture 54 and \tmp, \tmp, #0x000f0000 @ only check architecture
55 cmp \tmp, #0x00060000 @ is v6? 55 cmp \tmp, #0x00070000 @ is v6?
56 beq 2400f @ found v6 so it's omap24xx 56 beq 2400f @ found v6 so it's omap24xx
57 mrc p15, 0, \tmp, c0, c0, 0 @ get processor revision 57 mrc p15, 0, \tmp, c0, c0, 0 @ get processor revision
58 and \tmp, \tmp, #0x000000f0 @ check cortex 8 or 9 58 and \tmp, \tmp, #0x000000f0 @ check cortex 8 or 9
diff --git a/arch/arm/mach-omap2/iommu2.c b/arch/arm/mach-omap2/iommu2.c
index 6f4b7cc8f4d1..4f63dc6859a4 100644
--- a/arch/arm/mach-omap2/iommu2.c
+++ b/arch/arm/mach-omap2/iommu2.c
@@ -15,6 +15,7 @@
15#include <linux/device.h> 15#include <linux/device.h>
16#include <linux/jiffies.h> 16#include <linux/jiffies.h>
17#include <linux/module.h> 17#include <linux/module.h>
18#include <linux/slab.h>
18#include <linux/stringify.h> 19#include <linux/stringify.h>
19 20
20#include <plat/iommu.h> 21#include <plat/iommu.h>
diff --git a/arch/arm/mach-omap2/mcbsp.c b/arch/arm/mach-omap2/mcbsp.c
index be8fce395a58..2f3cad6f9402 100644
--- a/arch/arm/mach-omap2/mcbsp.c
+++ b/arch/arm/mach-omap2/mcbsp.c
@@ -16,6 +16,7 @@
16#include <linux/err.h> 16#include <linux/err.h>
17#include <linux/io.h> 17#include <linux/io.h>
18#include <linux/platform_device.h> 18#include <linux/platform_device.h>
19#include <linux/slab.h>
19 20
20#include <mach/irqs.h> 21#include <mach/irqs.h>
21#include <plat/dma.h> 22#include <plat/dma.h>
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index b4ca84ee0a95..8b3d26935a39 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -26,6 +26,7 @@
26#include <linux/module.h> 26#include <linux/module.h>
27#include <linux/init.h> 27#include <linux/init.h>
28#include <linux/io.h> 28#include <linux/io.h>
29#include <linux/slab.h>
29#include <linux/spinlock.h> 30#include <linux/spinlock.h>
30#include <linux/list.h> 31#include <linux/list.h>
31#include <linux/ctype.h> 32#include <linux/ctype.h>
diff --git a/arch/arm/mach-omap2/omap-headsmp.S b/arch/arm/mach-omap2/omap-headsmp.S
index aa3f65c2ac97..ef0e7a00dd6c 100644
--- a/arch/arm/mach-omap2/omap-headsmp.S
+++ b/arch/arm/mach-omap2/omap-headsmp.S
@@ -33,7 +33,7 @@
33ENTRY(omap_secondary_startup) 33ENTRY(omap_secondary_startup)
34hold: ldr r12,=0x103 34hold: ldr r12,=0x103
35 dsb 35 dsb
36 smc @ read from AuxCoreBoot0 36 smc #0 @ read from AuxCoreBoot0
37 mov r0, r0, lsr #9 37 mov r0, r0, lsr #9
38 mrc p15, 0, r4, c0, c0, 5 38 mrc p15, 0, r4, c0, c0, 5
39 and r4, r4, #0x0f 39 and r4, r4, #0x0f
@@ -52,7 +52,7 @@ ENTRY(omap_modify_auxcoreboot0)
52 stmfd sp!, {r1-r12, lr} 52 stmfd sp!, {r1-r12, lr}
53 ldr r12, =0x104 53 ldr r12, =0x104
54 dsb 54 dsb
55 smc 55 smc #0
56 ldmfd sp!, {r1-r12, pc} 56 ldmfd sp!, {r1-r12, pc}
57END(omap_modify_auxcoreboot0) 57END(omap_modify_auxcoreboot0)
58 58
@@ -60,6 +60,6 @@ ENTRY(omap_auxcoreboot_addr)
60 stmfd sp!, {r2-r12, lr} 60 stmfd sp!, {r2-r12, lr}
61 ldr r12, =0x105 61 ldr r12, =0x105
62 dsb 62 dsb
63 smc 63 smc #0
64 ldmfd sp!, {r2-r12, pc} 64 ldmfd sp!, {r2-r12, pc}
65END(omap_auxcoreboot_addr) 65END(omap_auxcoreboot_addr)
diff --git a/arch/arm/mach-omap2/omap44xx-smc.S b/arch/arm/mach-omap2/omap44xx-smc.S
index 89bb2b141473..f61c7771ca47 100644
--- a/arch/arm/mach-omap2/omap44xx-smc.S
+++ b/arch/arm/mach-omap2/omap44xx-smc.S
@@ -27,6 +27,6 @@ ENTRY(omap_smc1)
27 mov r12, r0 27 mov r12, r0
28 mov r0, r1 28 mov r0, r1
29 dsb 29 dsb
30 smc 30 smc #0
31 ldmfd sp!, {r2-r12, pc} 31 ldmfd sp!, {r2-r12, pc}
32END(omap_smc1) 32END(omap_smc1)
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index aa3e20915d72..2c12e8cd7183 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -1510,6 +1510,9 @@ struct powerdomain *omap_hwmod_get_pwrdm(struct omap_hwmod *oh)
1510 c = oh->slaves[oh->_mpu_port_index]->_clk; 1510 c = oh->slaves[oh->_mpu_port_index]->_clk;
1511 } 1511 }
1512 1512
1513 if (!c->clkdm)
1514 return NULL;
1515
1513 return c->clkdm->pwrdm.ptr; 1516 return c->clkdm->pwrdm.ptr;
1514 1517
1515} 1518}
diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c
index c18f7f2f19bc..6cac9817c243 100644
--- a/arch/arm/mach-omap2/pm-debug.c
+++ b/arch/arm/mach-omap2/pm-debug.c
@@ -25,6 +25,7 @@
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#include <linux/module.h>
28#include <linux/slab.h>
28 29
29#include <plat/clock.h> 30#include <plat/clock.h>
30#include <plat/board.h> 31#include <plat/board.h>
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index fee2efb172e7..ea0000bc5358 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -27,6 +27,7 @@
27#include <linux/gpio.h> 27#include <linux/gpio.h>
28#include <linux/clk.h> 28#include <linux/clk.h>
29#include <linux/delay.h> 29#include <linux/delay.h>
30#include <linux/slab.h>
30 31
31#include <plat/sram.h> 32#include <plat/sram.h>
32#include <plat/clockdomain.h> 33#include <plat/clockdomain.h>
diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c
index 9a0fb385622b..ebfce7d1a5d3 100644
--- a/arch/arm/mach-omap2/powerdomain.c
+++ b/arch/arm/mach-omap2/powerdomain.c
@@ -222,7 +222,7 @@ void pwrdm_init(struct powerdomain **pwrdm_list)
222{ 222{
223 struct powerdomain **p = NULL; 223 struct powerdomain **p = NULL;
224 224
225 if (cpu_is_omap24xx() | cpu_is_omap34xx()) { 225 if (cpu_is_omap24xx() || cpu_is_omap34xx()) {
226 pwrstctrl_reg_offs = OMAP2_PM_PWSTCTRL; 226 pwrstctrl_reg_offs = OMAP2_PM_PWSTCTRL;
227 pwrstst_reg_offs = OMAP2_PM_PWSTST; 227 pwrstst_reg_offs = OMAP2_PM_PWSTST;
228 } else if (cpu_is_omap44xx()) { 228 } else if (cpu_is_omap44xx()) {
diff --git a/arch/arm/mach-omap2/prcm.c b/arch/arm/mach-omap2/prcm.c
index 9537f6f2352d..07a60f1204ca 100644
--- a/arch/arm/mach-omap2/prcm.c
+++ b/arch/arm/mach-omap2/prcm.c
@@ -123,7 +123,7 @@ struct omap3_prcm_regs prcm_context;
123u32 omap_prcm_get_reset_sources(void) 123u32 omap_prcm_get_reset_sources(void)
124{ 124{
125 /* XXX This presumably needs modification for 34XX */ 125 /* XXX This presumably needs modification for 34XX */
126 if (cpu_is_omap24xx() | cpu_is_omap34xx()) 126 if (cpu_is_omap24xx() || cpu_is_omap34xx())
127 return prm_read_mod_reg(WKUP_MOD, OMAP2_RM_RSTST) & 0x7f; 127 return prm_read_mod_reg(WKUP_MOD, OMAP2_RM_RSTST) & 0x7f;
128 if (cpu_is_omap44xx()) 128 if (cpu_is_omap44xx())
129 return prm_read_mod_reg(WKUP_MOD, OMAP4_RM_RSTST) & 0x7f; 129 return prm_read_mod_reg(WKUP_MOD, OMAP4_RM_RSTST) & 0x7f;
@@ -157,7 +157,7 @@ void omap_prcm_arch_reset(char mode, const char *cmd)
157 else 157 else
158 WARN_ON(1); 158 WARN_ON(1);
159 159
160 if (cpu_is_omap24xx() | cpu_is_omap34xx()) 160 if (cpu_is_omap24xx() || cpu_is_omap34xx())
161 prm_set_mod_reg_bits(OMAP_RST_DPLL3, prcm_offs, 161 prm_set_mod_reg_bits(OMAP_RST_DPLL3, prcm_offs,
162 OMAP2_RM_RSTCTRL); 162 OMAP2_RM_RSTCTRL);
163 if (cpu_is_omap44xx()) 163 if (cpu_is_omap44xx())
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index da77930480e9..3771254dfa81 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -115,7 +115,6 @@ static struct plat_serial8250_port serial_platform_data2[] = {
115 } 115 }
116}; 116};
117 117
118#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
119static struct plat_serial8250_port serial_platform_data3[] = { 118static struct plat_serial8250_port serial_platform_data3[] = {
120 { 119 {
121 .irq = 70, 120 .irq = 70,
@@ -128,23 +127,12 @@ static struct plat_serial8250_port serial_platform_data3[] = {
128 } 127 }
129}; 128};
130 129
131static inline void omap2_set_globals_uart4(struct omap_globals *omap2_globals)
132{
133 serial_platform_data3[0].mapbase = omap2_globals->uart4_phys;
134}
135#else
136static inline void omap2_set_globals_uart4(struct omap_globals *omap2_globals)
137{
138}
139#endif
140
141void __init omap2_set_globals_uart(struct omap_globals *omap2_globals) 130void __init omap2_set_globals_uart(struct omap_globals *omap2_globals)
142{ 131{
143 serial_platform_data0[0].mapbase = omap2_globals->uart1_phys; 132 serial_platform_data0[0].mapbase = omap2_globals->uart1_phys;
144 serial_platform_data1[0].mapbase = omap2_globals->uart2_phys; 133 serial_platform_data1[0].mapbase = omap2_globals->uart2_phys;
145 serial_platform_data2[0].mapbase = omap2_globals->uart3_phys; 134 serial_platform_data2[0].mapbase = omap2_globals->uart3_phys;
146 if (cpu_is_omap3630() || cpu_is_omap44xx()) 135 serial_platform_data3[0].mapbase = omap2_globals->uart4_phys;
147 omap2_set_globals_uart4(omap2_globals);
148} 136}
149 137
150static inline unsigned int __serial_read_reg(struct uart_port *up, 138static inline unsigned int __serial_read_reg(struct uart_port *up,
@@ -550,7 +538,7 @@ static ssize_t sleep_timeout_store(struct device *dev,
550 unsigned int value; 538 unsigned int value;
551 539
552 if (sscanf(buf, "%u", &value) != 1) { 540 if (sscanf(buf, "%u", &value) != 1) {
553 printk(KERN_ERR "sleep_timeout_store: Invalid value\n"); 541 dev_err(dev, "sleep_timeout_store: Invalid value\n");
554 return -EINVAL; 542 return -EINVAL;
555 } 543 }
556 544
@@ -664,27 +652,33 @@ void __init omap_serial_early_init(void)
664 struct device *dev = &pdev->dev; 652 struct device *dev = &pdev->dev;
665 struct plat_serial8250_port *p = dev->platform_data; 653 struct plat_serial8250_port *p = dev->platform_data;
666 654
655 /* Don't map zero-based physical address */
656 if (p->mapbase == 0) {
657 dev_warn(dev, "no physical address for uart#%d,"
658 " so skipping early_init...\n", i);
659 continue;
660 }
667 /* 661 /*
668 * Module 4KB + L4 interconnect 4KB 662 * Module 4KB + L4 interconnect 4KB
669 * Static mapping, never released 663 * Static mapping, never released
670 */ 664 */
671 p->membase = ioremap(p->mapbase, SZ_8K); 665 p->membase = ioremap(p->mapbase, SZ_8K);
672 if (!p->membase) { 666 if (!p->membase) {
673 printk(KERN_ERR "ioremap failed for uart%i\n", i + 1); 667 dev_err(dev, "ioremap failed for uart%i\n", i + 1);
674 continue; 668 continue;
675 } 669 }
676 670
677 sprintf(name, "uart%d_ick", i + 1); 671 sprintf(name, "uart%d_ick", i + 1);
678 uart->ick = clk_get(NULL, name); 672 uart->ick = clk_get(NULL, name);
679 if (IS_ERR(uart->ick)) { 673 if (IS_ERR(uart->ick)) {
680 printk(KERN_ERR "Could not get uart%d_ick\n", i + 1); 674 dev_err(dev, "Could not get uart%d_ick\n", i + 1);
681 uart->ick = NULL; 675 uart->ick = NULL;
682 } 676 }
683 677
684 sprintf(name, "uart%d_fck", i+1); 678 sprintf(name, "uart%d_fck", i+1);
685 uart->fck = clk_get(NULL, name); 679 uart->fck = clk_get(NULL, name);
686 if (IS_ERR(uart->fck)) { 680 if (IS_ERR(uart->fck)) {
687 printk(KERN_ERR "Could not get uart%d_fck\n", i + 1); 681 dev_err(dev, "Could not get uart%d_fck\n", i + 1);
688 uart->fck = NULL; 682 uart->fck = NULL;
689 } 683 }
690 684
@@ -727,6 +721,13 @@ void __init omap_serial_init_port(int port)
727 pdev = &uart->pdev; 721 pdev = &uart->pdev;
728 dev = &pdev->dev; 722 dev = &pdev->dev;
729 723
724 /* Don't proceed if there's no clocks available */
725 if (unlikely(!uart->ick || !uart->fck)) {
726 WARN(1, "%s: can't init uart%d, no clocks available\n",
727 kobject_name(&dev->kobj), port);
728 return;
729 }
730
730 omap_uart_enable_clocks(uart); 731 omap_uart_enable_clocks(uart);
731 732
732 omap_uart_reset(uart); 733 omap_uart_reset(uart);
diff --git a/arch/arm/mach-orion5x/dns323-setup.c b/arch/arm/mach-orion5x/dns323-setup.c
index 421b82f7c63d..685f34a9634b 100644
--- a/arch/arm/mach-orion5x/dns323-setup.c
+++ b/arch/arm/mach-orion5x/dns323-setup.c
@@ -439,6 +439,7 @@ static void __init dns323_init(void)
439 */ 439 */
440 if (dns323_dev_id() == MV88F5181_DEV_ID) { 440 if (dns323_dev_id() == MV88F5181_DEV_ID) {
441 dns323_leds[0].active_low = 1; 441 dns323_leds[0].active_low = 1;
442 gpio_request(DNS323_GPIO_LED_POWER1, "Power Led Enable");
442 gpio_direction_output(DNS323_GPIO_LED_POWER1, 0); 443 gpio_direction_output(DNS323_GPIO_LED_POWER1, 0);
443 } 444 }
444 445
diff --git a/arch/arm/mach-orion5x/pci.c b/arch/arm/mach-orion5x/pci.c
index bdf96eb523bc..e8706f15a670 100644
--- a/arch/arm/mach-orion5x/pci.c
+++ b/arch/arm/mach-orion5x/pci.c
@@ -12,6 +12,7 @@
12 12
13#include <linux/kernel.h> 13#include <linux/kernel.h>
14#include <linux/pci.h> 14#include <linux/pci.h>
15#include <linux/slab.h>
15#include <linux/mbus.h> 16#include <linux/mbus.h>
16#include <asm/irq.h> 17#include <asm/irq.h>
17#include <asm/mach/pci.h> 18#include <asm/mach/pci.h>
diff --git a/arch/arm/mach-orion5x/wrt350n-v2-setup.c b/arch/arm/mach-orion5x/wrt350n-v2-setup.c
index cb0feca193d4..f9f222ebb7ed 100644
--- a/arch/arm/mach-orion5x/wrt350n-v2-setup.c
+++ b/arch/arm/mach-orion5x/wrt350n-v2-setup.c
@@ -77,7 +77,7 @@ static struct gpio_keys_button wrt350n_v2_buttons[] = {
77 .desc = "Reset Button", 77 .desc = "Reset Button",
78 .active_low = 1, 78 .active_low = 1,
79 }, { 79 }, {
80 .code = KEY_WLAN, 80 .code = KEY_WPS_BUTTON,
81 .gpio = 2, 81 .gpio = 2,
82 .desc = "WPS Button", 82 .desc = "WPS Button",
83 .active_low = 1, 83 .active_low = 1,
diff --git a/arch/arm/mach-pnx4008/dma.c b/arch/arm/mach-pnx4008/dma.c
index 425f7188505e..7fa4bf2e2125 100644
--- a/arch/arm/mach-pnx4008/dma.c
+++ b/arch/arm/mach-pnx4008/dma.c
@@ -22,6 +22,7 @@
22#include <linux/dma-mapping.h> 22#include <linux/dma-mapping.h>
23#include <linux/clk.h> 23#include <linux/clk.h>
24#include <linux/io.h> 24#include <linux/io.h>
25#include <linux/gfp.h>
25 26
26#include <asm/system.h> 27#include <asm/system.h>
27#include <mach/hardware.h> 28#include <mach/hardware.h>
diff --git a/arch/arm/mach-pnx4008/pm.c b/arch/arm/mach-pnx4008/pm.c
index 1f0585329be4..ee3c29c57ae3 100644
--- a/arch/arm/mach-pnx4008/pm.c
+++ b/arch/arm/mach-pnx4008/pm.c
@@ -19,6 +19,7 @@
19#include <linux/delay.h> 19#include <linux/delay.h>
20#include <linux/clk.h> 20#include <linux/clk.h>
21#include <linux/io.h> 21#include <linux/io.h>
22#include <linux/slab.h>
22 23
23#include <asm/cacheflush.h> 24#include <asm/cacheflush.h>
24 25
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig
index 38fbd0a0e402..3b51741a4810 100644
--- a/arch/arm/mach-pxa/Kconfig
+++ b/arch/arm/mach-pxa/Kconfig
@@ -19,7 +19,6 @@ config MACH_MAINSTONE
19config MACH_ZYLONITE 19config MACH_ZYLONITE
20 bool 20 bool
21 select PXA3xx 21 select PXA3xx
22 select PXA_SSP
23 select HAVE_PWM 22 select HAVE_PWM
24 select PXA_HAVE_BOARD_IRQS 23 select PXA_HAVE_BOARD_IRQS
25 24
@@ -39,7 +38,6 @@ config MACH_LITTLETON
39 select PXA3xx 38 select PXA3xx
40 select CPU_PXA300 39 select CPU_PXA300
41 select CPU_PXA310 40 select CPU_PXA310
42 select PXA_SSP
43 41
44config MACH_TAVOREVB 42config MACH_TAVOREVB
45 bool "PXA930 Evaluation Board (aka TavorEVB)" 43 bool "PXA930 Evaluation Board (aka TavorEVB)"
@@ -98,7 +96,6 @@ config MACH_ARMCORE
98 select PXA27x 96 select PXA27x
99 select IWMMXT 97 select IWMMXT
100 select PXA25x 98 select PXA25x
101 select PXA_SSP
102 99
103config MACH_EM_X270 100config MACH_EM_X270
104 bool "CompuLab EM-x270 platform" 101 bool "CompuLab EM-x270 platform"
@@ -161,7 +158,6 @@ config MACH_XCEP
161 select MTD_CFI 158 select MTD_CFI
162 select MTD_CHAR 159 select MTD_CHAR
163 select SMC91X 160 select SMC91X
164 select PXA_SSP
165 help 161 help
166 PXA255 based Single Board Computer with SMC 91C111 ethernet chip and 64 MB of flash. 162 PXA255 based Single Board Computer with SMC 91C111 ethernet chip and 64 MB of flash.
167 Tuned for usage in Libera instruments for particle accelerators. 163 Tuned for usage in Libera instruments for particle accelerators.
@@ -180,7 +176,6 @@ config MACH_TRIZEPS4WL
180 depends on TRIZEPS_PXA 176 depends on TRIZEPS_PXA
181 select TRIZEPS_PCMCIA 177 select TRIZEPS_PCMCIA
182 select PXA27x 178 select PXA27x
183 select PXA_SSP
184 179
185choice 180choice
186 prompt "Select base board for Trizeps module" 181 prompt "Select base board for Trizeps module"
@@ -217,7 +212,6 @@ config MACH_PCM027
217 bool "Phytec phyCORE-PXA270 CPU module (PCM-027)" 212 bool "Phytec phyCORE-PXA270 CPU module (PCM-027)"
218 select PXA27x 213 select PXA27x
219 select IWMMXT 214 select IWMMXT
220 select PXA_SSP
221 select PXA_HAVE_BOARD_IRQS 215 select PXA_HAVE_BOARD_IRQS
222 216
223config MACH_PCM990_BASEBOARD 217config MACH_PCM990_BASEBOARD
@@ -255,13 +249,19 @@ config MACH_COLIBRI320
255 select PXA3xx 249 select PXA3xx
256 select CPU_PXA320 250 select CPU_PXA320
257 251
252config MACH_VPAC270
253 bool "Voipac PXA270"
254 select PXA27x
255 select HAVE_PATA_PLATFORM
256 help
257 PXA270 based Single Board Computer.
258
258comment "End-user Products (sorted by vendor name)" 259comment "End-user Products (sorted by vendor name)"
259 260
260config MACH_H4700 261config MACH_H4700
261 bool "HP iPAQ hx4700" 262 bool "HP iPAQ hx4700"
262 select PXA27x 263 select PXA27x
263 select IWMMXT 264 select IWMMXT
264 select PXA_SSP
265 select HAVE_PWM 265 select HAVE_PWM
266 select PXA_HAVE_BOARD_IRQS 266 select PXA_HAVE_BOARD_IRQS
267 267
@@ -272,13 +272,11 @@ config MACH_H5000
272config MACH_HIMALAYA 272config MACH_HIMALAYA
273 bool "HTC Himalaya Support" 273 bool "HTC Himalaya Support"
274 select CPU_PXA26x 274 select CPU_PXA26x
275 select FB_W100
276 275
277config MACH_MAGICIAN 276config MACH_MAGICIAN
278 bool "Enable HTC Magician Support" 277 bool "Enable HTC Magician Support"
279 select PXA27x 278 select PXA27x
280 select IWMMXT 279 select IWMMXT
281 select PXA_SSP
282 select HAVE_PWM 280 select HAVE_PWM
283 select PXA_HAVE_BOARD_IRQS 281 select PXA_HAVE_BOARD_IRQS
284 282
@@ -432,13 +430,11 @@ config MACH_RAUMFELD_CONNECTOR
432 bool "Raumfeld Connector" 430 bool "Raumfeld Connector"
433 select PXA3xx 431 select PXA3xx
434 select CPU_PXA300 432 select CPU_PXA300
435 select PXA_SSP
436 433
437config MACH_RAUMFELD_SPEAKER 434config MACH_RAUMFELD_SPEAKER
438 bool "Raumfeld Speaker" 435 bool "Raumfeld Speaker"
439 select PXA3xx 436 select PXA3xx
440 select CPU_PXA300 437 select CPU_PXA300
441 select PXA_SSP
442 438
443config PXA_SHARPSL 439config PXA_SHARPSL
444 bool "SHARP Zaurus SL-5600, SL-C7xx and SL-Cxx00 Models" 440 bool "SHARP Zaurus SL-5600, SL-C7xx and SL-Cxx00 Models"
@@ -454,22 +450,19 @@ config PXA_SHARPSL
454config SHARPSL_PM 450config SHARPSL_PM
455 bool 451 bool
456 select APM_EMULATION 452 select APM_EMULATION
453 select SHARPSL_PM_MAX1111
457 454
458config CORGI_SSP_DEPRECATED 455config SHARPSL_PM_MAX1111
459 bool 456 bool
460 select PXA_SSP 457 depends on !CORGI_SSP_DEPRECATED
461 select PXA_SSP_LEGACY 458 select HWMON
462 help 459 select SENSORS_MAX1111
463 This option will include corgi_ssp.c and corgi_lcd.c
464 that corgi_ts.c and other legacy drivers (corgi_bl.c
465 and sharpsl_pm.c) may depend on.
466 460
467config MACH_POODLE 461config MACH_POODLE
468 bool "Enable Sharp SL-5600 (Poodle) Support" 462 bool "Enable Sharp SL-5600 (Poodle) Support"
469 depends on PXA_SHARPSL 463 depends on PXA_SHARPSL
470 select PXA25x 464 select PXA25x
471 select SHARP_LOCOMO 465 select SHARP_LOCOMO
472 select PXA_SSP
473 select PXA_HAVE_BOARD_IRQS 466 select PXA_HAVE_BOARD_IRQS
474 467
475config MACH_CORGI 468config MACH_CORGI
@@ -547,7 +540,6 @@ config MACH_E740
547 bool "Toshiba e740" 540 bool "Toshiba e740"
548 default y 541 default y
549 depends on ARCH_PXA_ESERIES 542 depends on ARCH_PXA_ESERIES
550 select FB_W100
551 help 543 help
552 Say Y here if you intend to run this kernel on a Toshiba 544 Say Y here if you intend to run this kernel on a Toshiba
553 e740 family PDA. 545 e740 family PDA.
@@ -556,7 +548,6 @@ config MACH_E750
556 bool "Toshiba e750" 548 bool "Toshiba e750"
557 default y 549 default y
558 depends on ARCH_PXA_ESERIES 550 depends on ARCH_PXA_ESERIES
559 select FB_W100
560 help 551 help
561 Say Y here if you intend to run this kernel on a Toshiba 552 Say Y here if you intend to run this kernel on a Toshiba
562 e750 family PDA. 553 e750 family PDA.
@@ -573,11 +564,16 @@ config MACH_E800
573 bool "Toshiba e800" 564 bool "Toshiba e800"
574 default y 565 default y
575 depends on ARCH_PXA_ESERIES 566 depends on ARCH_PXA_ESERIES
576 select FB_W100
577 help 567 help
578 Say Y here if you intend to run this kernel on a Toshiba 568 Say Y here if you intend to run this kernel on a Toshiba
579 e800 family PDA. 569 e800 family PDA.
580 570
571config MACH_ZIPIT2
572 bool "Zipit Z2 Handheld"
573 select PXA27x
574 select HAVE_PWM
575 select PXA_HAVE_BOARD_IRQS
576
581endmenu 577endmenu
582 578
583config PXA25x 579config PXA25x
@@ -642,28 +638,16 @@ config CPU_PXA950
642 638
643config PXA_SHARP_C7xx 639config PXA_SHARP_C7xx
644 bool 640 bool
645 select PXA_SSP
646 select SHARPSL_PM 641 select SHARPSL_PM
647 help 642 help
648 Enable support for all Sharp C7xx models 643 Enable support for all Sharp C7xx models
649 644
650config PXA_SHARP_Cxx00 645config PXA_SHARP_Cxx00
651 bool 646 bool
652 select PXA_SSP
653 select SHARPSL_PM 647 select SHARPSL_PM
654 help 648 help
655 Enable common support for Sharp Cxx00 models 649 Enable common support for Sharp Cxx00 models
656 650
657config PXA_SSP
658 tristate
659 help
660 Enable support for PXA2xx SSP ports
661
662config PXA_SSP_LEGACY
663 bool
664 help
665 Support of legacy SSP API
666
667config TOSA_BT 651config TOSA_BT
668 tristate "Control the state of built-in bluetooth chip on Sharp SL-6000" 652 tristate "Control the state of built-in bluetooth chip on Sharp SL-6000"
669 depends on MACH_TOSA 653 depends on MACH_TOSA
@@ -672,6 +656,18 @@ config TOSA_BT
672 This is a simple driver that is able to control 656 This is a simple driver that is able to control
673 the state of built in bluetooth chip on tosa. 657 the state of built in bluetooth chip on tosa.
674 658
659config TOSA_USE_EXT_KEYCODES
660 bool "Tosa keyboard: use extended keycodes"
661 depends on MACH_TOSA
662 default n
663 help
664 Say Y here to enable the tosa keyboard driver to generate extended
665 (>= 127) keycodes. Be aware, that they can't be correctly interpreted
666 by either console keyboard driver or by Kdrive keybd driver.
667
668 Say Y only if you know, what you are doing!
669
670
675config PXA_HAVE_BOARD_IRQS 671config PXA_HAVE_BOARD_IRQS
676 bool 672 bool
677 673
diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile
index 86bc87b7f2dd..b8f1f4bc7ca7 100644
--- a/arch/arm/mach-pxa/Makefile
+++ b/arch/arm/mach-pxa/Makefile
@@ -14,7 +14,6 @@ obj-$(CONFIG_PXA3xx) += cpufreq-pxa3xx.o
14endif 14endif
15 15
16# Generic drivers that other drivers may depend upon 16# Generic drivers that other drivers may depend upon
17obj-$(CONFIG_PXA_SSP) += ssp.o
18 17
19# SoC-specific code 18# SoC-specific code
20obj-$(CONFIG_PXA25x) += mfp-pxa2xx.o pxa2xx.o pxa25x.o 19obj-$(CONFIG_PXA25x) += mfp-pxa2xx.o pxa2xx.o pxa25x.o
@@ -62,6 +61,7 @@ obj-$(CONFIG_MACH_PCM990_BASEBOARD) += pcm990-baseboard.o
62obj-$(CONFIG_MACH_COLIBRI) += colibri-pxa270.o 61obj-$(CONFIG_MACH_COLIBRI) += colibri-pxa270.o
63obj-$(CONFIG_MACH_COLIBRI300) += colibri-pxa3xx.o colibri-pxa300.o 62obj-$(CONFIG_MACH_COLIBRI300) += colibri-pxa3xx.o colibri-pxa300.o
64obj-$(CONFIG_MACH_COLIBRI320) += colibri-pxa3xx.o colibri-pxa320.o 63obj-$(CONFIG_MACH_COLIBRI320) += colibri-pxa3xx.o colibri-pxa320.o
64obj-$(CONFIG_MACH_VPAC270) += vpac270.o
65 65
66# End-user Products 66# End-user Products
67obj-$(CONFIG_MACH_H4700) += hx4700.o 67obj-$(CONFIG_MACH_H4700) += hx4700.o
@@ -80,7 +80,6 @@ obj-$(CONFIG_MACH_PALMLD) += palmld.o
80obj-$(CONFIG_PALM_TREO) += palmtreo.o 80obj-$(CONFIG_PALM_TREO) += palmtreo.o
81obj-$(CONFIG_PXA_SHARP_C7xx) += corgi.o sharpsl_pm.o corgi_pm.o 81obj-$(CONFIG_PXA_SHARP_C7xx) += corgi.o sharpsl_pm.o corgi_pm.o
82obj-$(CONFIG_PXA_SHARP_Cxx00) += spitz.o sharpsl_pm.o spitz_pm.o 82obj-$(CONFIG_PXA_SHARP_Cxx00) += spitz.o sharpsl_pm.o spitz_pm.o
83obj-$(CONFIG_CORGI_SSP_DEPRECATED) += corgi_ssp.o corgi_lcd.o
84obj-$(CONFIG_MACH_POODLE) += poodle.o 83obj-$(CONFIG_MACH_POODLE) += poodle.o
85obj-$(CONFIG_MACH_TOSA) += tosa.o 84obj-$(CONFIG_MACH_TOSA) += tosa.o
86obj-$(CONFIG_MACH_ICONTROL) += icontrol.o mxm8x10.o 85obj-$(CONFIG_MACH_ICONTROL) += icontrol.o mxm8x10.o
@@ -94,6 +93,7 @@ obj-$(CONFIG_MACH_E800) += e800.o
94obj-$(CONFIG_MACH_RAUMFELD_RC) += raumfeld.o 93obj-$(CONFIG_MACH_RAUMFELD_RC) += raumfeld.o
95obj-$(CONFIG_MACH_RAUMFELD_CONNECTOR) += raumfeld.o 94obj-$(CONFIG_MACH_RAUMFELD_CONNECTOR) += raumfeld.o
96obj-$(CONFIG_MACH_RAUMFELD_SPEAKER) += raumfeld.o 95obj-$(CONFIG_MACH_RAUMFELD_SPEAKER) += raumfeld.o
96obj-$(CONFIG_MACH_ZIPIT2) += z2.o
97 97
98# Support for blinky lights 98# Support for blinky lights
99led-y := leds.o 99led-y := leds.o
diff --git a/arch/arm/mach-pxa/cm-x300.c b/arch/arm/mach-pxa/cm-x300.c
index d37cfa132a65..fdda6be6c391 100644
--- a/arch/arm/mach-pxa/cm-x300.c
+++ b/arch/arm/mach-pxa/cm-x300.c
@@ -30,6 +30,9 @@
30#include <linux/i2c/pca953x.h> 30#include <linux/i2c/pca953x.h>
31 31
32#include <linux/mfd/da903x.h> 32#include <linux/mfd/da903x.h>
33#include <linux/regulator/machine.h>
34#include <linux/power_supply.h>
35#include <linux/apm-emulation.h>
33 36
34#include <linux/spi/spi.h> 37#include <linux/spi/spi.h>
35#include <linux/spi/spi_gpio.h> 38#include <linux/spi/spi_gpio.h>
@@ -430,7 +433,7 @@ static inline void cm_x300_init_nand(void) {}
430 433
431#if defined(CONFIG_MMC) || defined(CONFIG_MMC_MODULE) 434#if defined(CONFIG_MMC) || defined(CONFIG_MMC_MODULE)
432static struct pxamci_platform_data cm_x300_mci_platform_data = { 435static struct pxamci_platform_data cm_x300_mci_platform_data = {
433 .detect_delay = 20, 436 .detect_delay_ms = 200,
434 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, 437 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
435 .gpio_card_detect = GPIO82_MMC_IRQ, 438 .gpio_card_detect = GPIO82_MMC_IRQ,
436 .gpio_card_ro = GPIO85_MMC_WP, 439 .gpio_card_ro = GPIO85_MMC_WP,
@@ -451,7 +454,7 @@ static void cm_x300_mci2_exit(struct device *dev, void *data)
451} 454}
452 455
453static struct pxamci_platform_data cm_x300_mci2_platform_data = { 456static struct pxamci_platform_data cm_x300_mci2_platform_data = {
454 .detect_delay = 20, 457 .detect_delay_ms = 200,
455 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, 458 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
456 .init = cm_x300_mci2_init, 459 .init = cm_x300_mci2_init,
457 .exit = cm_x300_mci2_exit, 460 .exit = cm_x300_mci2_exit,
@@ -584,12 +587,87 @@ static void __init cm_x300_init_rtc(void)
584static inline void cm_x300_init_rtc(void) {} 587static inline void cm_x300_init_rtc(void) {}
585#endif 588#endif
586 589
590/* Battery */
591struct power_supply_info cm_x300_psy_info = {
592 .name = "battery",
593 .technology = POWER_SUPPLY_TECHNOLOGY_LIPO,
594 .voltage_max_design = 4200000,
595 .voltage_min_design = 3000000,
596 .use_for_apm = 1,
597};
598
599static void cm_x300_battery_low(void)
600{
601#if defined(CONFIG_APM_EMULATION)
602 apm_queue_event(APM_LOW_BATTERY);
603#endif
604}
605
606static void cm_x300_battery_critical(void)
607{
608#if defined(CONFIG_APM_EMULATION)
609 apm_queue_event(APM_CRITICAL_SUSPEND);
610#endif
611}
612
613struct da9030_battery_info cm_x300_battery_info = {
614 .battery_info = &cm_x300_psy_info,
615
616 .charge_milliamp = 1000,
617 .charge_millivolt = 4200,
618
619 .vbat_low = 3600,
620 .vbat_crit = 3400,
621 .vbat_charge_start = 4100,
622 .vbat_charge_stop = 4200,
623 .vbat_charge_restart = 4000,
624
625 .vcharge_min = 3200,
626 .vcharge_max = 5500,
627
628 .tbat_low = 197,
629 .tbat_high = 78,
630 .tbat_restart = 100,
631
632 .batmon_interval = 0,
633
634 .battery_low = cm_x300_battery_low,
635 .battery_critical = cm_x300_battery_critical,
636};
637
638static struct regulator_consumer_supply buck2_consumers[] = {
639 {
640 .dev = NULL,
641 .supply = "vcc_core",
642 },
643};
644
645static struct regulator_init_data buck2_data = {
646 .constraints = {
647 .min_uV = 1375000,
648 .max_uV = 1375000,
649 .state_mem = {
650 .enabled = 0,
651 },
652 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
653 .apply_uV = 1,
654 },
655 .num_consumer_supplies = ARRAY_SIZE(buck2_consumers),
656 .consumer_supplies = buck2_consumers,
657};
658
587/* DA9030 */ 659/* DA9030 */
588struct da903x_subdev_info cm_x300_da9030_subdevs[] = { 660struct da903x_subdev_info cm_x300_da9030_subdevs[] = {
589 { 661 {
590 .name = "da903x-backlight", 662 .name = "da903x-battery",
591 .id = DA9030_ID_WLED, 663 .id = DA9030_ID_BAT,
592 } 664 .platform_data = &cm_x300_battery_info,
665 },
666 {
667 .name = "da903x-regulator",
668 .id = DA9030_ID_BUCK2,
669 .platform_data = &buck2_data,
670 },
593}; 671};
594 672
595static struct da903x_platform_data cm_x300_da9030_info = { 673static struct da903x_platform_data cm_x300_da9030_info = {
@@ -599,7 +677,7 @@ static struct da903x_platform_data cm_x300_da9030_info = {
599 677
600static struct i2c_board_info cm_x300_pmic_info = { 678static struct i2c_board_info cm_x300_pmic_info = {
601 I2C_BOARD_INFO("da9030", 0x49), 679 I2C_BOARD_INFO("da9030", 0x49),
602 .irq = IRQ_GPIO(0), 680 .irq = IRQ_WAKEUP0,
603 .platform_data = &cm_x300_da9030_info, 681 .platform_data = &cm_x300_da9030_info,
604}; 682};
605 683
@@ -689,13 +767,13 @@ static void __init cm_x300_init(void)
689static void __init cm_x300_fixup(struct machine_desc *mdesc, struct tag *tags, 767static void __init cm_x300_fixup(struct machine_desc *mdesc, struct tag *tags,
690 char **cmdline, struct meminfo *mi) 768 char **cmdline, struct meminfo *mi)
691{ 769{
692 mi->nr_banks = 2; 770 /* Make sure that mi->bank[0].start = PHYS_ADDR */
693 mi->bank[0].start = 0xa0000000; 771 for (; tags->hdr.size; tags = tag_next(tags))
694 mi->bank[0].node = 0; 772 if (tags->hdr.tag == ATAG_MEM &&
695 mi->bank[0].size = (64*1024*1024); 773 tags->u.mem.start == 0x80000000) {
696 mi->bank[1].start = 0xc0000000; 774 tags->u.mem.start = 0xa0000000;
697 mi->bank[1].node = 0; 775 break;
698 mi->bank[1].size = (64*1024*1024); 776 }
699} 777}
700 778
701MACHINE_START(CM_X300, "CM-X300 module") 779MACHINE_START(CM_X300, "CM-X300 module")
diff --git a/arch/arm/mach-pxa/colibri-pxa3xx.c b/arch/arm/mach-pxa/colibri-pxa3xx.c
index e6c0a2287eb8..199afa2ae303 100644
--- a/arch/arm/mach-pxa/colibri-pxa3xx.c
+++ b/arch/arm/mach-pxa/colibri-pxa3xx.c
@@ -96,7 +96,7 @@ static void colibri_pxa3xx_mci_exit(struct device *dev, void *data)
96} 96}
97 97
98static struct pxamci_platform_data colibri_pxa3xx_mci_platform_data = { 98static struct pxamci_platform_data colibri_pxa3xx_mci_platform_data = {
99 .detect_delay = 20, 99 .detect_delay_ms = 200,
100 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, 100 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
101 .init = colibri_pxa3xx_mci_init, 101 .init = colibri_pxa3xx_mci_init,
102 .exit = colibri_pxa3xx_mci_exit, 102 .exit = colibri_pxa3xx_mci_exit,
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c
index da3156d8690b..3d1dcb9ac08f 100644
--- a/arch/arm/mach-pxa/corgi.c
+++ b/arch/arm/mach-pxa/corgi.c
@@ -106,18 +106,18 @@ static unsigned long corgi_pin_config[] __initdata = {
106 GPIO8_MMC_CS0, 106 GPIO8_MMC_CS0,
107 107
108 /* GPIO Matrix Keypad */ 108 /* GPIO Matrix Keypad */
109 GPIO66_GPIO, /* column 0 */ 109 GPIO66_GPIO | MFP_LPM_DRIVE_HIGH, /* column 0 */
110 GPIO67_GPIO, /* column 1 */ 110 GPIO67_GPIO | MFP_LPM_DRIVE_HIGH, /* column 1 */
111 GPIO68_GPIO, /* column 2 */ 111 GPIO68_GPIO | MFP_LPM_DRIVE_HIGH, /* column 2 */
112 GPIO69_GPIO, /* column 3 */ 112 GPIO69_GPIO | MFP_LPM_DRIVE_HIGH, /* column 3 */
113 GPIO70_GPIO, /* column 4 */ 113 GPIO70_GPIO | MFP_LPM_DRIVE_HIGH, /* column 4 */
114 GPIO71_GPIO, /* column 5 */ 114 GPIO71_GPIO | MFP_LPM_DRIVE_HIGH, /* column 5 */
115 GPIO72_GPIO, /* column 6 */ 115 GPIO72_GPIO | MFP_LPM_DRIVE_HIGH, /* column 6 */
116 GPIO73_GPIO, /* column 7 */ 116 GPIO73_GPIO | MFP_LPM_DRIVE_HIGH, /* column 7 */
117 GPIO74_GPIO, /* column 8 */ 117 GPIO74_GPIO | MFP_LPM_DRIVE_HIGH, /* column 8 */
118 GPIO75_GPIO, /* column 9 */ 118 GPIO75_GPIO | MFP_LPM_DRIVE_HIGH, /* column 9 */
119 GPIO76_GPIO, /* column 10 */ 119 GPIO76_GPIO | MFP_LPM_DRIVE_HIGH, /* column 10 */
120 GPIO77_GPIO, /* column 11 */ 120 GPIO77_GPIO | MFP_LPM_DRIVE_HIGH, /* column 11 */
121 GPIO58_GPIO, /* row 0 */ 121 GPIO58_GPIO, /* row 0 */
122 GPIO59_GPIO, /* row 1 */ 122 GPIO59_GPIO, /* row 1 */
123 GPIO60_GPIO, /* row 2 */ 123 GPIO60_GPIO, /* row 2 */
@@ -128,13 +128,20 @@ static unsigned long corgi_pin_config[] __initdata = {
128 GPIO65_GPIO, /* row 7 */ 128 GPIO65_GPIO, /* row 7 */
129 129
130 /* GPIO */ 130 /* GPIO */
131 GPIO9_GPIO, /* CORGI_GPIO_nSD_DETECT */ 131 GPIO9_GPIO, /* CORGI_GPIO_nSD_DETECT */
132 GPIO7_GPIO, /* CORGI_GPIO_nSD_WP */ 132 GPIO7_GPIO, /* CORGI_GPIO_nSD_WP */
133 GPIO33_GPIO, /* CORGI_GPIO_SD_PWR */ 133 GPIO11_GPIO | WAKEUP_ON_EDGE_BOTH, /* CORGI_GPIO_MAIN_BAT_{LOW,COVER} */
134 GPIO22_GPIO, /* CORGI_GPIO_IR_ON */ 134 GPIO13_GPIO | MFP_LPM_KEEP_OUTPUT, /* CORGI_GPIO_LED_ORANGE */
135 GPIO44_GPIO, /* CORGI_GPIO_HSYNC */ 135 GPIO21_GPIO, /* CORGI_GPIO_ADC_TEMP */
136 136 GPIO22_GPIO, /* CORGI_GPIO_IR_ON */
137 GPIO1_GPIO | WAKEUP_ON_EDGE_RISE, 137 GPIO33_GPIO, /* CORGI_GPIO_SD_PWR */
138 GPIO38_GPIO | MFP_LPM_KEEP_OUTPUT, /* CORGI_GPIO_CHRG_ON */
139 GPIO43_GPIO | MFP_LPM_KEEP_OUTPUT, /* CORGI_GPIO_CHRG_UKN */
140 GPIO44_GPIO, /* CORGI_GPIO_HSYNC */
141
142 GPIO0_GPIO | WAKEUP_ON_EDGE_BOTH, /* CORGI_GPIO_KEY_INT */
143 GPIO1_GPIO | WAKEUP_ON_EDGE_RISE, /* CORGI_GPIO_AC_IN */
144 GPIO3_GPIO | WAKEUP_ON_EDGE_BOTH, /* CORGI_GPIO_WAKEUP */
138}; 145};
139 146
140/* 147/*
@@ -437,6 +444,7 @@ static struct platform_device corgiled_device = {
437 * to give the card a chance to fully insert/eject. 444 * to give the card a chance to fully insert/eject.
438 */ 445 */
439static struct pxamci_platform_data corgi_mci_platform_data = { 446static struct pxamci_platform_data corgi_mci_platform_data = {
447 .detect_delay_ms = 250,
440 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, 448 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
441 .gpio_card_detect = -1, 449 .gpio_card_detect = -1,
442 .gpio_card_ro = CORGI_GPIO_nSD_WP, 450 .gpio_card_ro = CORGI_GPIO_nSD_WP,
@@ -672,6 +680,15 @@ static void __init corgi_init(void)
672 680
673 pxa2xx_mfp_config(ARRAY_AND_SIZE(corgi_pin_config)); 681 pxa2xx_mfp_config(ARRAY_AND_SIZE(corgi_pin_config));
674 682
683 /* allow wakeup from various GPIOs */
684 gpio_set_wake(CORGI_GPIO_KEY_INT, 1);
685 gpio_set_wake(CORGI_GPIO_WAKEUP, 1);
686 gpio_set_wake(CORGI_GPIO_AC_IN, 1);
687 gpio_set_wake(CORGI_GPIO_CHRG_FULL, 1);
688
689 if (!machine_is_corgi())
690 gpio_set_wake(CORGI_GPIO_MAIN_BAT_LOW, 1);
691
675 pxa_set_ffuart_info(NULL); 692 pxa_set_ffuart_info(NULL);
676 pxa_set_btuart_info(NULL); 693 pxa_set_btuart_info(NULL);
677 pxa_set_stuart_info(NULL); 694 pxa_set_stuart_info(NULL);
@@ -679,7 +696,6 @@ static void __init corgi_init(void)
679 corgi_init_spi(); 696 corgi_init_spi();
680 697
681 pxa_set_udc_info(&udc_info); 698 pxa_set_udc_info(&udc_info);
682 corgi_mci_platform_data.detect_delay = msecs_to_jiffies(250);
683 pxa_set_mci_info(&corgi_mci_platform_data); 699 pxa_set_mci_info(&corgi_mci_platform_data);
684 pxa_set_ficp_info(&corgi_ficp_platform_data); 700 pxa_set_ficp_info(&corgi_ficp_platform_data);
685 pxa_set_i2c_info(NULL); 701 pxa_set_i2c_info(NULL);
diff --git a/arch/arm/mach-pxa/corgi_lcd.c b/arch/arm/mach-pxa/corgi_lcd.c
deleted file mode 100644
index d9b96319d498..000000000000
--- a/arch/arm/mach-pxa/corgi_lcd.c
+++ /dev/null
@@ -1,288 +0,0 @@
1/*
2 * linux/arch/arm/mach-pxa/corgi_lcd.c
3 *
4 * Corgi/Spitz LCD Specific Code
5 *
6 * Copyright (C) 2005 Richard Purdie
7 *
8 * Connectivity:
9 * Corgi - LCD to ATI Imageon w100 (Wallaby)
10 * Spitz - LCD to PXA Framebuffer
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
18#include <linux/delay.h>
19#include <linux/kernel.h>
20#include <linux/platform_device.h>
21#include <linux/module.h>
22#include <linux/string.h>
23#include <mach/corgi.h>
24#include <mach/hardware.h>
25#include <mach/sharpsl.h>
26#include <mach/spitz.h>
27#include <asm/hardware/scoop.h>
28#include <asm/mach/sharpsl_param.h>
29#include "generic.h"
30
31/* Register Addresses */
32#define RESCTL_ADRS 0x00
33#define PHACTRL_ADRS 0x01
34#define DUTYCTRL_ADRS 0x02
35#define POWERREG0_ADRS 0x03
36#define POWERREG1_ADRS 0x04
37#define GPOR3_ADRS 0x05
38#define PICTRL_ADRS 0x06
39#define POLCTRL_ADRS 0x07
40
41/* Register Bit Definitions */
42#define RESCTL_QVGA 0x01
43#define RESCTL_VGA 0x00
44
45#define POWER1_VW_ON 0x01 /* VW Supply FET ON */
46#define POWER1_GVSS_ON 0x02 /* GVSS(-8V) Power Supply ON */
47#define POWER1_VDD_ON 0x04 /* VDD(8V),SVSS(-4V) Power Supply ON */
48
49#define POWER1_VW_OFF 0x00 /* VW Supply FET OFF */
50#define POWER1_GVSS_OFF 0x00 /* GVSS(-8V) Power Supply OFF */
51#define POWER1_VDD_OFF 0x00 /* VDD(8V),SVSS(-4V) Power Supply OFF */
52
53#define POWER0_COM_DCLK 0x01 /* COM Voltage DC Bias DAC Serial Data Clock */
54#define POWER0_COM_DOUT 0x02 /* COM Voltage DC Bias DAC Serial Data Out */
55#define POWER0_DAC_ON 0x04 /* DAC Power Supply ON */
56#define POWER0_COM_ON 0x08 /* COM Power Supply ON */
57#define POWER0_VCC5_ON 0x10 /* VCC5 Power Supply ON */
58
59#define POWER0_DAC_OFF 0x00 /* DAC Power Supply OFF */
60#define POWER0_COM_OFF 0x00 /* COM Power Supply OFF */
61#define POWER0_VCC5_OFF 0x00 /* VCC5 Power Supply OFF */
62
63#define PICTRL_INIT_STATE 0x01
64#define PICTRL_INIOFF 0x02
65#define PICTRL_POWER_DOWN 0x04
66#define PICTRL_COM_SIGNAL_OFF 0x08
67#define PICTRL_DAC_SIGNAL_OFF 0x10
68
69#define POLCTRL_SYNC_POL_FALL 0x01
70#define POLCTRL_EN_POL_FALL 0x02
71#define POLCTRL_DATA_POL_FALL 0x04
72#define POLCTRL_SYNC_ACT_H 0x08
73#define POLCTRL_EN_ACT_L 0x10
74
75#define POLCTRL_SYNC_POL_RISE 0x00
76#define POLCTRL_EN_POL_RISE 0x00
77#define POLCTRL_DATA_POL_RISE 0x00
78#define POLCTRL_SYNC_ACT_L 0x00
79#define POLCTRL_EN_ACT_H 0x00
80
81#define PHACTRL_PHASE_MANUAL 0x01
82#define DEFAULT_PHAD_QVGA (9)
83#define DEFAULT_COMADJ (125)
84
85/*
86 * This is only a psuedo I2C interface. We can't use the standard kernel
87 * routines as the interface is write only. We just assume the data is acked...
88 */
89static void lcdtg_ssp_i2c_send(u8 data)
90{
91 corgi_ssp_lcdtg_send(POWERREG0_ADRS, data);
92 udelay(10);
93}
94
95static void lcdtg_i2c_send_bit(u8 data)
96{
97 lcdtg_ssp_i2c_send(data);
98 lcdtg_ssp_i2c_send(data | POWER0_COM_DCLK);
99 lcdtg_ssp_i2c_send(data);
100}
101
102static void lcdtg_i2c_send_start(u8 base)
103{
104 lcdtg_ssp_i2c_send(base | POWER0_COM_DCLK | POWER0_COM_DOUT);
105 lcdtg_ssp_i2c_send(base | POWER0_COM_DCLK);
106 lcdtg_ssp_i2c_send(base);
107}
108
109static void lcdtg_i2c_send_stop(u8 base)
110{
111 lcdtg_ssp_i2c_send(base);
112 lcdtg_ssp_i2c_send(base | POWER0_COM_DCLK);
113 lcdtg_ssp_i2c_send(base | POWER0_COM_DCLK | POWER0_COM_DOUT);
114}
115
116static void lcdtg_i2c_send_byte(u8 base, u8 data)
117{
118 int i;
119 for (i = 0; i < 8; i++) {
120 if (data & 0x80)
121 lcdtg_i2c_send_bit(base | POWER0_COM_DOUT);
122 else
123 lcdtg_i2c_send_bit(base);
124 data <<= 1;
125 }
126}
127
128static void lcdtg_i2c_wait_ack(u8 base)
129{
130 lcdtg_i2c_send_bit(base);
131}
132
133static void lcdtg_set_common_voltage(u8 base_data, u8 data)
134{
135 /* Set Common Voltage to M62332FP via I2C */
136 lcdtg_i2c_send_start(base_data);
137 lcdtg_i2c_send_byte(base_data, 0x9c);
138 lcdtg_i2c_wait_ack(base_data);
139 lcdtg_i2c_send_byte(base_data, 0x00);
140 lcdtg_i2c_wait_ack(base_data);
141 lcdtg_i2c_send_byte(base_data, data);
142 lcdtg_i2c_wait_ack(base_data);
143 lcdtg_i2c_send_stop(base_data);
144}
145
146/* Set Phase Adjust */
147static void lcdtg_set_phadadj(int mode)
148{
149 int adj;
150 switch(mode) {
151 case 480:
152 case 640:
153 /* Setting for VGA */
154 adj = sharpsl_param.phadadj;
155 if (adj < 0) {
156 adj = PHACTRL_PHASE_MANUAL;
157 } else {
158 adj = ((adj & 0x0f) << 1) | PHACTRL_PHASE_MANUAL;
159 }
160 break;
161 case 240:
162 case 320:
163 default:
164 /* Setting for QVGA */
165 adj = (DEFAULT_PHAD_QVGA << 1) | PHACTRL_PHASE_MANUAL;
166 break;
167 }
168
169 corgi_ssp_lcdtg_send(PHACTRL_ADRS, adj);
170}
171
172static int lcd_inited;
173
174void corgi_lcdtg_hw_init(int mode)
175{
176 if (!lcd_inited) {
177 int comadj;
178
179 /* Initialize Internal Logic & Port */
180 corgi_ssp_lcdtg_send(PICTRL_ADRS, PICTRL_POWER_DOWN | PICTRL_INIOFF | PICTRL_INIT_STATE
181 | PICTRL_COM_SIGNAL_OFF | PICTRL_DAC_SIGNAL_OFF);
182
183 corgi_ssp_lcdtg_send(POWERREG0_ADRS, POWER0_COM_DCLK | POWER0_COM_DOUT | POWER0_DAC_OFF
184 | POWER0_COM_OFF | POWER0_VCC5_OFF);
185
186 corgi_ssp_lcdtg_send(POWERREG1_ADRS, POWER1_VW_OFF | POWER1_GVSS_OFF | POWER1_VDD_OFF);
187
188 /* VDD(+8V), SVSS(-4V) ON */
189 corgi_ssp_lcdtg_send(POWERREG1_ADRS, POWER1_VW_OFF | POWER1_GVSS_OFF | POWER1_VDD_ON);
190 mdelay(3);
191
192 /* DAC ON */
193 corgi_ssp_lcdtg_send(POWERREG0_ADRS, POWER0_COM_DCLK | POWER0_COM_DOUT | POWER0_DAC_ON
194 | POWER0_COM_OFF | POWER0_VCC5_OFF);
195
196 /* INIB = H, INI = L */
197 /* PICTL[0] = H , PICTL[1] = PICTL[2] = PICTL[4] = L */
198 corgi_ssp_lcdtg_send(PICTRL_ADRS, PICTRL_INIT_STATE | PICTRL_COM_SIGNAL_OFF);
199
200 /* Set Common Voltage */
201 comadj = sharpsl_param.comadj;
202 if (comadj < 0)
203 comadj = DEFAULT_COMADJ;
204 lcdtg_set_common_voltage((POWER0_DAC_ON | POWER0_COM_OFF | POWER0_VCC5_OFF), comadj);
205
206 /* VCC5 ON, DAC ON */
207 corgi_ssp_lcdtg_send(POWERREG0_ADRS, POWER0_COM_DCLK | POWER0_COM_DOUT | POWER0_DAC_ON |
208 POWER0_COM_OFF | POWER0_VCC5_ON);
209
210 /* GVSS(-8V) ON, VDD ON */
211 corgi_ssp_lcdtg_send(POWERREG1_ADRS, POWER1_VW_OFF | POWER1_GVSS_ON | POWER1_VDD_ON);
212 mdelay(2);
213
214 /* COM SIGNAL ON (PICTL[3] = L) */
215 corgi_ssp_lcdtg_send(PICTRL_ADRS, PICTRL_INIT_STATE);
216
217 /* COM ON, DAC ON, VCC5_ON */
218 corgi_ssp_lcdtg_send(POWERREG0_ADRS, POWER0_COM_DCLK | POWER0_COM_DOUT | POWER0_DAC_ON
219 | POWER0_COM_ON | POWER0_VCC5_ON);
220
221 /* VW ON, GVSS ON, VDD ON */
222 corgi_ssp_lcdtg_send(POWERREG1_ADRS, POWER1_VW_ON | POWER1_GVSS_ON | POWER1_VDD_ON);
223
224 /* Signals output enable */
225 corgi_ssp_lcdtg_send(PICTRL_ADRS, 0);
226
227 /* Set Phase Adjust */
228 lcdtg_set_phadadj(mode);
229
230 /* Initialize for Input Signals from ATI */
231 corgi_ssp_lcdtg_send(POLCTRL_ADRS, POLCTRL_SYNC_POL_RISE | POLCTRL_EN_POL_RISE
232 | POLCTRL_DATA_POL_RISE | POLCTRL_SYNC_ACT_L | POLCTRL_EN_ACT_H);
233 udelay(1000);
234
235 lcd_inited=1;
236 } else {
237 lcdtg_set_phadadj(mode);
238 }
239
240 switch(mode) {
241 case 480:
242 case 640:
243 /* Set Lcd Resolution (VGA) */
244 corgi_ssp_lcdtg_send(RESCTL_ADRS, RESCTL_VGA);
245 break;
246 case 240:
247 case 320:
248 default:
249 /* Set Lcd Resolution (QVGA) */
250 corgi_ssp_lcdtg_send(RESCTL_ADRS, RESCTL_QVGA);
251 break;
252 }
253}
254
255void corgi_lcdtg_suspend(void)
256{
257 /* 60Hz x 2 frame = 16.7msec x 2 = 33.4 msec */
258 mdelay(34);
259
260 /* (1)VW OFF */
261 corgi_ssp_lcdtg_send(POWERREG1_ADRS, POWER1_VW_OFF | POWER1_GVSS_ON | POWER1_VDD_ON);
262
263 /* (2)COM OFF */
264 corgi_ssp_lcdtg_send(PICTRL_ADRS, PICTRL_COM_SIGNAL_OFF);
265 corgi_ssp_lcdtg_send(POWERREG0_ADRS, POWER0_DAC_ON | POWER0_COM_OFF | POWER0_VCC5_ON);
266
267 /* (3)Set Common Voltage Bias 0V */
268 lcdtg_set_common_voltage(POWER0_DAC_ON | POWER0_COM_OFF | POWER0_VCC5_ON, 0);
269
270 /* (4)GVSS OFF */
271 corgi_ssp_lcdtg_send(POWERREG1_ADRS, POWER1_VW_OFF | POWER1_GVSS_OFF | POWER1_VDD_ON);
272
273 /* (5)VCC5 OFF */
274 corgi_ssp_lcdtg_send(POWERREG0_ADRS, POWER0_DAC_ON | POWER0_COM_OFF | POWER0_VCC5_OFF);
275
276 /* (6)Set PDWN, INIOFF, DACOFF */
277 corgi_ssp_lcdtg_send(PICTRL_ADRS, PICTRL_INIOFF | PICTRL_DAC_SIGNAL_OFF |
278 PICTRL_POWER_DOWN | PICTRL_COM_SIGNAL_OFF);
279
280 /* (7)DAC OFF */
281 corgi_ssp_lcdtg_send(POWERREG0_ADRS, POWER0_DAC_OFF | POWER0_COM_OFF | POWER0_VCC5_OFF);
282
283 /* (8)VDD OFF */
284 corgi_ssp_lcdtg_send(POWERREG1_ADRS, POWER1_VW_OFF | POWER1_GVSS_OFF | POWER1_VDD_OFF);
285
286 lcd_inited = 0;
287}
288
diff --git a/arch/arm/mach-pxa/corgi_pm.c b/arch/arm/mach-pxa/corgi_pm.c
index d4a0733e905b..3f1dc74ac048 100644
--- a/arch/arm/mach-pxa/corgi_pm.c
+++ b/arch/arm/mach-pxa/corgi_pm.c
@@ -14,6 +14,7 @@
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/delay.h> 16#include <linux/delay.h>
17#include <linux/gpio.h>
17#include <linux/interrupt.h> 18#include <linux/interrupt.h>
18#include <linux/platform_device.h> 19#include <linux/platform_device.h>
19#include <linux/apm-emulation.h> 20#include <linux/apm-emulation.h>
@@ -25,7 +26,8 @@
25#include <mach/sharpsl.h> 26#include <mach/sharpsl.h>
26#include <mach/corgi.h> 27#include <mach/corgi.h>
27#include <mach/pxa2xx-regs.h> 28#include <mach/pxa2xx-regs.h>
28#include <mach/pxa2xx-gpio.h> 29
30#include "generic.h"
29#include "sharpsl.h" 31#include "sharpsl.h"
30 32
31#define SHARPSL_CHARGE_ON_VOLT 0x99 /* 2.9V */ 33#define SHARPSL_CHARGE_ON_VOLT 0x99 /* 2.9V */
@@ -35,87 +37,46 @@
35#define SHARPSL_FATAL_ACIN_VOLT 182 /* 3.45V */ 37#define SHARPSL_FATAL_ACIN_VOLT 182 /* 3.45V */
36#define SHARPSL_FATAL_NOACIN_VOLT 170 /* 3.40V */ 38#define SHARPSL_FATAL_NOACIN_VOLT 170 /* 3.40V */
37 39
40static struct gpio charger_gpios[] = {
41 { CORGI_GPIO_ADC_TEMP_ON, GPIOF_OUT_INIT_LOW, "ADC Temp On" },
42 { CORGI_GPIO_CHRG_ON, GPIOF_OUT_INIT_LOW, "Charger On" },
43 { CORGI_GPIO_CHRG_UKN, GPIOF_OUT_INIT_LOW, "Charger Unknown" },
44 { CORGI_GPIO_KEY_INT, GPIOF_IN, "Key Interrupt" },
45};
46
38static void corgi_charger_init(void) 47static void corgi_charger_init(void)
39{ 48{
40 pxa_gpio_mode(CORGI_GPIO_ADC_TEMP_ON | GPIO_OUT); 49 gpio_request_array(ARRAY_AND_SIZE(charger_gpios));
41 pxa_gpio_mode(CORGI_GPIO_CHRG_ON | GPIO_OUT);
42 pxa_gpio_mode(CORGI_GPIO_CHRG_UKN | GPIO_OUT);
43 pxa_gpio_mode(CORGI_GPIO_KEY_INT | GPIO_IN);
44} 50}
45 51
46static void corgi_measure_temp(int on) 52static void corgi_measure_temp(int on)
47{ 53{
48 if (on) 54 gpio_set_value(CORGI_GPIO_ADC_TEMP_ON, on);
49 GPSR(CORGI_GPIO_ADC_TEMP_ON) = GPIO_bit(CORGI_GPIO_ADC_TEMP_ON);
50 else
51 GPCR(CORGI_GPIO_ADC_TEMP_ON) = GPIO_bit(CORGI_GPIO_ADC_TEMP_ON);
52} 55}
53 56
54static void corgi_charge(int on) 57static void corgi_charge(int on)
55{ 58{
56 if (on) { 59 if (on) {
57 if (machine_is_corgi() && (sharpsl_pm.flags & SHARPSL_SUSPENDED)) { 60 if (machine_is_corgi() && (sharpsl_pm.flags & SHARPSL_SUSPENDED)) {
58 GPCR(CORGI_GPIO_CHRG_ON) = GPIO_bit(CORGI_GPIO_CHRG_ON); 61 gpio_set_value(CORGI_GPIO_CHRG_ON, 0);
59 GPSR(CORGI_GPIO_CHRG_UKN) = GPIO_bit(CORGI_GPIO_CHRG_UKN); 62 gpio_set_value(CORGI_GPIO_CHRG_UKN, 1);
60 } else { 63 } else {
61 GPSR(CORGI_GPIO_CHRG_ON) = GPIO_bit(CORGI_GPIO_CHRG_ON); 64 gpio_set_value(CORGI_GPIO_CHRG_ON, 1);
62 GPCR(CORGI_GPIO_CHRG_UKN) = GPIO_bit(CORGI_GPIO_CHRG_UKN); 65 gpio_set_value(CORGI_GPIO_CHRG_UKN, 0);
63 } 66 }
64 } else { 67 } else {
65 GPCR(CORGI_GPIO_CHRG_ON) = GPIO_bit(CORGI_GPIO_CHRG_ON); 68 gpio_set_value(CORGI_GPIO_CHRG_ON, 0);
66 GPCR(CORGI_GPIO_CHRG_UKN) = GPIO_bit(CORGI_GPIO_CHRG_UKN); 69 gpio_set_value(CORGI_GPIO_CHRG_UKN, 0);
67 } 70 }
68} 71}
69 72
70static void corgi_discharge(int on) 73static void corgi_discharge(int on)
71{ 74{
72 if (on) 75 gpio_set_value(CORGI_GPIO_DISCHARGE_ON, on);
73 GPSR(CORGI_GPIO_DISCHARGE_ON) = GPIO_bit(CORGI_GPIO_DISCHARGE_ON);
74 else
75 GPCR(CORGI_GPIO_DISCHARGE_ON) = GPIO_bit(CORGI_GPIO_DISCHARGE_ON);
76} 76}
77 77
78static void corgi_presuspend(void) 78static void corgi_presuspend(void)
79{ 79{
80 int i;
81 unsigned long wakeup_mask;
82
83 /* charging , so CHARGE_ON bit is HIGH during OFF. */
84 if (READ_GPIO_BIT(CORGI_GPIO_CHRG_ON))
85 PGSR1 |= GPIO_bit(CORGI_GPIO_CHRG_ON);
86 else
87 PGSR1 &= ~GPIO_bit(CORGI_GPIO_CHRG_ON);
88
89 if (READ_GPIO_BIT(CORGI_GPIO_LED_ORANGE))
90 PGSR0 |= GPIO_bit(CORGI_GPIO_LED_ORANGE);
91 else
92 PGSR0 &= ~GPIO_bit(CORGI_GPIO_LED_ORANGE);
93
94 if (READ_GPIO_BIT(CORGI_GPIO_CHRG_UKN))
95 PGSR1 |= GPIO_bit(CORGI_GPIO_CHRG_UKN);
96 else
97 PGSR1 &= ~GPIO_bit(CORGI_GPIO_CHRG_UKN);
98
99 /* Resume on keyboard power key */
100 PGSR2 = (PGSR2 & ~CORGI_GPIO_ALL_STROBE_BIT) | CORGI_GPIO_STROBE_BIT(0);
101
102 wakeup_mask = GPIO_bit(CORGI_GPIO_KEY_INT) | GPIO_bit(CORGI_GPIO_WAKEUP) | GPIO_bit(CORGI_GPIO_AC_IN) | GPIO_bit(CORGI_GPIO_CHRG_FULL);
103
104 if (!machine_is_corgi())
105 wakeup_mask |= GPIO_bit(CORGI_GPIO_MAIN_BAT_LOW);
106
107 PWER = wakeup_mask | PWER_RTC;
108 PRER = wakeup_mask;
109 PFER = wakeup_mask;
110
111 for (i = 0; i <=15; i++) {
112 if (PRER & PFER & GPIO_bit(i)) {
113 if (GPLR0 & GPIO_bit(i) )
114 PRER &= ~GPIO_bit(i);
115 else
116 PFER &= ~GPIO_bit(i);
117 }
118 }
119} 80}
120 81
121static void corgi_postsuspend(void) 82static void corgi_postsuspend(void)
diff --git a/arch/arm/mach-pxa/corgi_ssp.c b/arch/arm/mach-pxa/corgi_ssp.c
deleted file mode 100644
index 1d9bc118ee32..000000000000
--- a/arch/arm/mach-pxa/corgi_ssp.c
+++ /dev/null
@@ -1,275 +0,0 @@
1/*
2 * SSP control code for Sharp Corgi devices
3 *
4 * Copyright (c) 2004-2005 Richard Purdie
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 */
11
12#include <linux/module.h>
13#include <linux/init.h>
14#include <linux/kernel.h>
15#include <linux/sched.h>
16#include <linux/slab.h>
17#include <linux/delay.h>
18#include <linux/platform_device.h>
19#include <mach/hardware.h>
20#include <asm/mach-types.h>
21
22#include <mach/ssp.h>
23#include <mach/pxa2xx-gpio.h>
24#include <mach/regs-ssp.h>
25#include "sharpsl.h"
26
27static DEFINE_SPINLOCK(corgi_ssp_lock);
28static struct ssp_dev corgi_ssp_dev;
29static struct ssp_state corgi_ssp_state;
30static struct corgissp_machinfo *ssp_machinfo;
31
32/*
33 * There are three devices connected to the SSP interface:
34 * 1. A touchscreen controller (TI ADS7846 compatible)
35 * 2. An LCD controller (with some Backlight functionality)
36 * 3. A battery monitoring IC (Maxim MAX1111)
37 *
38 * Each device uses a different speed/mode of communication.
39 *
40 * The touchscreen is very sensitive and the most frequently used
41 * so the port is left configured for this.
42 *
43 * Devices are selected using Chip Selects on GPIOs.
44 */
45
46/*
47 * ADS7846 Routines
48 */
49unsigned long corgi_ssp_ads7846_putget(ulong data)
50{
51 unsigned long flag;
52 u32 ret = 0;
53
54 spin_lock_irqsave(&corgi_ssp_lock, flag);
55 if (ssp_machinfo->cs_ads7846 >= 0)
56 GPCR(ssp_machinfo->cs_ads7846) = GPIO_bit(ssp_machinfo->cs_ads7846);
57
58 ssp_write_word(&corgi_ssp_dev,data);
59 ssp_read_word(&corgi_ssp_dev, &ret);
60
61 if (ssp_machinfo->cs_ads7846 >= 0)
62 GPSR(ssp_machinfo->cs_ads7846) = GPIO_bit(ssp_machinfo->cs_ads7846);
63 spin_unlock_irqrestore(&corgi_ssp_lock, flag);
64
65 return ret;
66}
67
68/*
69 * NOTE: These functions should always be called in interrupt context
70 * and use the _lock and _unlock functions. They are very time sensitive.
71 */
72void corgi_ssp_ads7846_lock(void)
73{
74 spin_lock(&corgi_ssp_lock);
75 if (ssp_machinfo->cs_ads7846 >= 0)
76 GPCR(ssp_machinfo->cs_ads7846) = GPIO_bit(ssp_machinfo->cs_ads7846);
77}
78
79void corgi_ssp_ads7846_unlock(void)
80{
81 if (ssp_machinfo->cs_ads7846 >= 0)
82 GPSR(ssp_machinfo->cs_ads7846) = GPIO_bit(ssp_machinfo->cs_ads7846);
83 spin_unlock(&corgi_ssp_lock);
84}
85
86void corgi_ssp_ads7846_put(ulong data)
87{
88 ssp_write_word(&corgi_ssp_dev,data);
89}
90
91unsigned long corgi_ssp_ads7846_get(void)
92{
93 u32 ret = 0;
94 ssp_read_word(&corgi_ssp_dev, &ret);
95 return ret;
96}
97
98EXPORT_SYMBOL(corgi_ssp_ads7846_putget);
99EXPORT_SYMBOL(corgi_ssp_ads7846_lock);
100EXPORT_SYMBOL(corgi_ssp_ads7846_unlock);
101EXPORT_SYMBOL(corgi_ssp_ads7846_put);
102EXPORT_SYMBOL(corgi_ssp_ads7846_get);
103
104
105/*
106 * LCD/Backlight Routines
107 */
108unsigned long corgi_ssp_dac_put(ulong data)
109{
110 unsigned long flag, sscr1 = SSCR1_SPH;
111 u32 tmp;
112
113 spin_lock_irqsave(&corgi_ssp_lock, flag);
114
115 if (machine_is_spitz() || machine_is_akita() || machine_is_borzoi())
116 sscr1 = 0;
117
118 ssp_disable(&corgi_ssp_dev);
119 ssp_config(&corgi_ssp_dev, (SSCR0_Motorola | (SSCR0_DSS & 0x07 )), sscr1, 0, SSCR0_SerClkDiv(ssp_machinfo->clk_lcdcon));
120 ssp_enable(&corgi_ssp_dev);
121
122 if (ssp_machinfo->cs_lcdcon >= 0)
123 GPCR(ssp_machinfo->cs_lcdcon) = GPIO_bit(ssp_machinfo->cs_lcdcon);
124 ssp_write_word(&corgi_ssp_dev,data);
125 /* Read null data back from device to prevent SSP overflow */
126 ssp_read_word(&corgi_ssp_dev, &tmp);
127 if (ssp_machinfo->cs_lcdcon >= 0)
128 GPSR(ssp_machinfo->cs_lcdcon) = GPIO_bit(ssp_machinfo->cs_lcdcon);
129
130 ssp_disable(&corgi_ssp_dev);
131 ssp_config(&corgi_ssp_dev, (SSCR0_National | (SSCR0_DSS & 0x0b )), 0, 0, SSCR0_SerClkDiv(ssp_machinfo->clk_ads7846));
132 ssp_enable(&corgi_ssp_dev);
133
134 spin_unlock_irqrestore(&corgi_ssp_lock, flag);
135
136 return 0;
137}
138
139void corgi_ssp_lcdtg_send(u8 adrs, u8 data)
140{
141 corgi_ssp_dac_put(((adrs & 0x07) << 5) | (data & 0x1f));
142}
143
144void corgi_ssp_blduty_set(int duty)
145{
146 corgi_ssp_lcdtg_send(0x02,duty);
147}
148
149EXPORT_SYMBOL(corgi_ssp_lcdtg_send);
150EXPORT_SYMBOL(corgi_ssp_blduty_set);
151
152/*
153 * Max1111 Routines
154 */
155int corgi_ssp_max1111_get(ulong data)
156{
157 unsigned long flag;
158 long voltage = 0, voltage1 = 0, voltage2 = 0;
159
160 spin_lock_irqsave(&corgi_ssp_lock, flag);
161 if (ssp_machinfo->cs_max1111 >= 0)
162 GPCR(ssp_machinfo->cs_max1111) = GPIO_bit(ssp_machinfo->cs_max1111);
163 ssp_disable(&corgi_ssp_dev);
164 ssp_config(&corgi_ssp_dev, (SSCR0_Motorola | (SSCR0_DSS & 0x07 )), 0, 0, SSCR0_SerClkDiv(ssp_machinfo->clk_max1111));
165 ssp_enable(&corgi_ssp_dev);
166
167 udelay(1);
168
169 /* TB1/RB1 */
170 ssp_write_word(&corgi_ssp_dev,data);
171 ssp_read_word(&corgi_ssp_dev, (u32*)&voltage1); /* null read */
172
173 /* TB12/RB2 */
174 ssp_write_word(&corgi_ssp_dev,0);
175 ssp_read_word(&corgi_ssp_dev, (u32*)&voltage1);
176
177 /* TB13/RB3*/
178 ssp_write_word(&corgi_ssp_dev,0);
179 ssp_read_word(&corgi_ssp_dev, (u32*)&voltage2);
180
181 ssp_disable(&corgi_ssp_dev);
182 ssp_config(&corgi_ssp_dev, (SSCR0_National | (SSCR0_DSS & 0x0b )), 0, 0, SSCR0_SerClkDiv(ssp_machinfo->clk_ads7846));
183 ssp_enable(&corgi_ssp_dev);
184 if (ssp_machinfo->cs_max1111 >= 0)
185 GPSR(ssp_machinfo->cs_max1111) = GPIO_bit(ssp_machinfo->cs_max1111);
186 spin_unlock_irqrestore(&corgi_ssp_lock, flag);
187
188 if (voltage1 & 0xc0 || voltage2 & 0x3f)
189 voltage = -1;
190 else
191 voltage = ((voltage1 << 2) & 0xfc) | ((voltage2 >> 6) & 0x03);
192
193 return voltage;
194}
195
196EXPORT_SYMBOL(corgi_ssp_max1111_get);
197
198/*
199 * Support Routines
200 */
201
202void __init corgi_ssp_set_machinfo(struct corgissp_machinfo *machinfo)
203{
204 ssp_machinfo = machinfo;
205}
206
207static int __devinit corgi_ssp_probe(struct platform_device *dev)
208{
209 int ret;
210
211 /* Chip Select - Disable All */
212 if (ssp_machinfo->cs_lcdcon >= 0)
213 pxa_gpio_mode(ssp_machinfo->cs_lcdcon | GPIO_OUT | GPIO_DFLT_HIGH);
214 if (ssp_machinfo->cs_max1111 >= 0)
215 pxa_gpio_mode(ssp_machinfo->cs_max1111 | GPIO_OUT | GPIO_DFLT_HIGH);
216 if (ssp_machinfo->cs_ads7846 >= 0)
217 pxa_gpio_mode(ssp_machinfo->cs_ads7846 | GPIO_OUT | GPIO_DFLT_HIGH);
218
219 ret = ssp_init(&corgi_ssp_dev, ssp_machinfo->port, 0);
220
221 if (ret)
222 printk(KERN_ERR "Unable to register SSP handler!\n");
223 else {
224 ssp_disable(&corgi_ssp_dev);
225 ssp_config(&corgi_ssp_dev, (SSCR0_National | (SSCR0_DSS & 0x0b )), 0, 0, SSCR0_SerClkDiv(ssp_machinfo->clk_ads7846));
226 ssp_enable(&corgi_ssp_dev);
227 }
228
229 return ret;
230}
231
232static int corgi_ssp_remove(struct platform_device *dev)
233{
234 ssp_exit(&corgi_ssp_dev);
235 return 0;
236}
237
238static int corgi_ssp_suspend(struct platform_device *dev, pm_message_t state)
239{
240 ssp_flush(&corgi_ssp_dev);
241 ssp_save_state(&corgi_ssp_dev,&corgi_ssp_state);
242
243 return 0;
244}
245
246static int corgi_ssp_resume(struct platform_device *dev)
247{
248 if (ssp_machinfo->cs_lcdcon >= 0)
249 GPSR(ssp_machinfo->cs_lcdcon) = GPIO_bit(ssp_machinfo->cs_lcdcon); /* High - Disable LCD Control/Timing Gen */
250 if (ssp_machinfo->cs_max1111 >= 0)
251 GPSR(ssp_machinfo->cs_max1111) = GPIO_bit(ssp_machinfo->cs_max1111); /* High - Disable MAX1111*/
252 if (ssp_machinfo->cs_ads7846 >= 0)
253 GPSR(ssp_machinfo->cs_ads7846) = GPIO_bit(ssp_machinfo->cs_ads7846); /* High - Disable ADS7846*/
254 ssp_restore_state(&corgi_ssp_dev,&corgi_ssp_state);
255 ssp_enable(&corgi_ssp_dev);
256
257 return 0;
258}
259
260static struct platform_driver corgissp_driver = {
261 .probe = corgi_ssp_probe,
262 .remove = corgi_ssp_remove,
263 .suspend = corgi_ssp_suspend,
264 .resume = corgi_ssp_resume,
265 .driver = {
266 .name = "corgi-ssp",
267 },
268};
269
270int __init corgi_ssp_init(void)
271{
272 return platform_driver_register(&corgissp_driver);
273}
274
275arch_initcall(corgi_ssp_init);
diff --git a/arch/arm/mach-pxa/cpufreq-pxa3xx.c b/arch/arm/mach-pxa/cpufreq-pxa3xx.c
index 149cdd9aee4d..27fa329d9a8b 100644
--- a/arch/arm/mach-pxa/cpufreq-pxa3xx.c
+++ b/arch/arm/mach-pxa/cpufreq-pxa3xx.c
@@ -14,6 +14,7 @@
14#include <linux/sched.h> 14#include <linux/sched.h>
15#include <linux/init.h> 15#include <linux/init.h>
16#include <linux/cpufreq.h> 16#include <linux/cpufreq.h>
17#include <linux/slab.h>
17 18
18#include <mach/pxa3xx-regs.h> 19#include <mach/pxa3xx-regs.h>
19 20
diff --git a/arch/arm/mach-pxa/csb726.c b/arch/arm/mach-pxa/csb726.c
index 88575b87bd33..91fd4fea6a54 100644
--- a/arch/arm/mach-pxa/csb726.c
+++ b/arch/arm/mach-pxa/csb726.c
@@ -125,18 +125,9 @@ static unsigned long csb726_pin_config[] = {
125 GPIO118_I2C_SDA, 125 GPIO118_I2C_SDA,
126}; 126};
127 127
128static struct pxamci_platform_data csb726_mci_data;
129
130static int csb726_mci_init(struct device *dev,
131 irq_handler_t detect, void *data)
132{
133 csb726_mci_data.detect_delay = msecs_to_jiffies(500);
134 return 0;
135}
136
137static struct pxamci_platform_data csb726_mci = { 128static struct pxamci_platform_data csb726_mci = {
129 .detect_delay_ms = 500,
138 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, 130 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
139 .init = csb726_mci_init,
140 /* FIXME setpower */ 131 /* FIXME setpower */
141 .gpio_card_detect = CSB726_GPIO_MMC_DETECT, 132 .gpio_card_detect = CSB726_GPIO_MMC_DETECT,
142 .gpio_card_ro = CSB726_GPIO_MMC_RO, 133 .gpio_card_ro = CSB726_GPIO_MMC_RO,
diff --git a/arch/arm/mach-pxa/em-x270.c b/arch/arm/mach-pxa/em-x270.c
index aab04f33e49b..0517c17978f3 100644
--- a/arch/arm/mach-pxa/em-x270.c
+++ b/arch/arm/mach-pxa/em-x270.c
@@ -626,6 +626,7 @@ static int em_x270_mci_get_ro(struct device *dev)
626} 626}
627 627
628static struct pxamci_platform_data em_x270_mci_platform_data = { 628static struct pxamci_platform_data em_x270_mci_platform_data = {
629 .detect_delay_ms = 250,
629 .ocr_mask = MMC_VDD_20_21|MMC_VDD_21_22|MMC_VDD_22_23| 630 .ocr_mask = MMC_VDD_20_21|MMC_VDD_21_22|MMC_VDD_22_23|
630 MMC_VDD_24_25|MMC_VDD_25_26|MMC_VDD_26_27| 631 MMC_VDD_24_25|MMC_VDD_25_26|MMC_VDD_26_27|
631 MMC_VDD_27_28|MMC_VDD_28_29|MMC_VDD_29_30| 632 MMC_VDD_27_28|MMC_VDD_28_29|MMC_VDD_29_30|
@@ -643,7 +644,6 @@ static void __init em_x270_init_mmc(void)
643 if (machine_is_em_x270()) 644 if (machine_is_em_x270())
644 em_x270_mci_platform_data.get_ro = em_x270_mci_get_ro; 645 em_x270_mci_platform_data.get_ro = em_x270_mci_get_ro;
645 646
646 em_x270_mci_platform_data.detect_delay = msecs_to_jiffies(250);
647 pxa_set_mci_info(&em_x270_mci_platform_data); 647 pxa_set_mci_info(&em_x270_mci_platform_data);
648} 648}
649#else 649#else
diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c
index 3126a35aa002..baabb3ce088e 100644
--- a/arch/arm/mach-pxa/generic.c
+++ b/arch/arm/mach-pxa/generic.c
@@ -28,7 +28,6 @@
28 28
29#include <mach/reset.h> 29#include <mach/reset.h>
30#include <mach/gpio.h> 30#include <mach/gpio.h>
31#include <mach/pxa2xx-gpio.h>
32 31
33#include "generic.h" 32#include "generic.h"
34 33
@@ -128,33 +127,3 @@ void __init pxa_map_io(void)
128 iotable_init(standard_io_desc, ARRAY_SIZE(standard_io_desc)); 127 iotable_init(standard_io_desc, ARRAY_SIZE(standard_io_desc));
129 get_clk_frequency_khz(1); 128 get_clk_frequency_khz(1);
130} 129}
131
132/*
133 * Configure pins for GPIO or other functions
134 */
135int pxa_gpio_mode(int gpio_mode)
136{
137 unsigned long flags;
138 int gpio = gpio_mode & GPIO_MD_MASK_NR;
139 int fn = (gpio_mode & GPIO_MD_MASK_FN) >> 8;
140 int gafr;
141
142 if (gpio > pxa_last_gpio)
143 return -EINVAL;
144
145 local_irq_save(flags);
146 if (gpio_mode & GPIO_DFLT_LOW)
147 GPCR(gpio) = GPIO_bit(gpio);
148 else if (gpio_mode & GPIO_DFLT_HIGH)
149 GPSR(gpio) = GPIO_bit(gpio);
150 if (gpio_mode & GPIO_MD_MASK_DIR)
151 GPDR(gpio) |= GPIO_bit(gpio);
152 else
153 GPDR(gpio) &= ~GPIO_bit(gpio);
154 gafr = GAFR(gpio) & ~(0x3 << (((gpio) & 0xf)*2));
155 GAFR(gpio) = gafr | (fn << (((gpio) & 0xf)*2));
156 local_irq_restore(flags);
157
158 return 0;
159}
160EXPORT_SYMBOL(pxa_gpio_mode);
diff --git a/arch/arm/mach-pxa/imote2.c b/arch/arm/mach-pxa/imote2.c
index b2f878bd460b..5161dca8ccc0 100644
--- a/arch/arm/mach-pxa/imote2.c
+++ b/arch/arm/mach-pxa/imote2.c
@@ -559,10 +559,6 @@ static void __init imote2_init(void)
559 pxa_set_btuart_info(NULL); 559 pxa_set_btuart_info(NULL);
560 pxa_set_stuart_info(NULL); 560 pxa_set_stuart_info(NULL);
561 561
562 /* SPI chip select directions - all other directions should
563 * be handled by drivers.*/
564 gpio_direction_output(37, 0);
565
566 platform_add_devices(imote2_devices, ARRAY_SIZE(imote2_devices)); 562 platform_add_devices(imote2_devices, ARRAY_SIZE(imote2_devices));
567 563
568 pxa2xx_set_spi_info(1, &pxa_ssp_master_0_info); 564 pxa2xx_set_spi_info(1, &pxa_ssp_master_0_info);
diff --git a/arch/arm/mach-pxa/include/mach/colibri.h b/arch/arm/mach-pxa/include/mach/colibri.h
index 811743c56147..5f2ba8d9015c 100644
--- a/arch/arm/mach-pxa/include/mach/colibri.h
+++ b/arch/arm/mach-pxa/include/mach/colibri.h
@@ -2,6 +2,7 @@
2#define _COLIBRI_H_ 2#define _COLIBRI_H_
3 3
4#include <net/ax88796.h> 4#include <net/ax88796.h>
5#include <mach/mfp.h>
5 6
6/* 7/*
7 * common settings for all modules 8 * common settings for all modules
diff --git a/arch/arm/mach-pxa/include/mach/corgi.h b/arch/arm/mach-pxa/include/mach/corgi.h
index 7239281788de..585970ef08ce 100644
--- a/arch/arm/mach-pxa/include/mach/corgi.h
+++ b/arch/arm/mach-pxa/include/mach/corgi.h
@@ -113,7 +113,6 @@
113 * Shared data structures 113 * Shared data structures
114 */ 114 */
115extern struct platform_device corgiscoop_device; 115extern struct platform_device corgiscoop_device;
116extern struct platform_device corgissp_device;
117 116
118#endif /* __ASM_ARCH_CORGI_H */ 117#endif /* __ASM_ARCH_CORGI_H */
119 118
diff --git a/arch/arm/mach-pxa/include/mach/hardware.h b/arch/arm/mach-pxa/include/mach/hardware.h
index 7515757d6911..3d8d8cb09685 100644
--- a/arch/arm/mach-pxa/include/mach/hardware.h
+++ b/arch/arm/mach-pxa/include/mach/hardware.h
@@ -202,7 +202,7 @@
202#define __cpu_is_pxa950(id) \ 202#define __cpu_is_pxa950(id) \
203 ({ \ 203 ({ \
204 unsigned int _id = (id) >> 4 & 0xfff; \ 204 unsigned int _id = (id) >> 4 & 0xfff; \
205 id == 0x697; \ 205 _id == 0x697; \
206 }) 206 })
207#else 207#else
208#define __cpu_is_pxa950(id) (0) 208#define __cpu_is_pxa950(id) (0)
diff --git a/arch/arm/mach-pxa/include/mach/mfp-pxa2xx.h b/arch/arm/mach-pxa/include/mach/mfp-pxa2xx.h
index 658b28ed129b..c54cef25895c 100644
--- a/arch/arm/mach-pxa/include/mach/mfp-pxa2xx.h
+++ b/arch/arm/mach-pxa/include/mach/mfp-pxa2xx.h
@@ -25,6 +25,8 @@
25#define MFP_DIR(x) (((x) >> 23) & 0x1) 25#define MFP_DIR(x) (((x) >> 23) & 0x1)
26 26
27#define MFP_LPM_CAN_WAKEUP (0x1 << 24) 27#define MFP_LPM_CAN_WAKEUP (0x1 << 24)
28#define MFP_LPM_KEEP_OUTPUT (0x1 << 25)
29
28#define WAKEUP_ON_EDGE_RISE (MFP_LPM_CAN_WAKEUP | MFP_LPM_EDGE_RISE) 30#define WAKEUP_ON_EDGE_RISE (MFP_LPM_CAN_WAKEUP | MFP_LPM_EDGE_RISE)
29#define WAKEUP_ON_EDGE_FALL (MFP_LPM_CAN_WAKEUP | MFP_LPM_EDGE_FALL) 31#define WAKEUP_ON_EDGE_FALL (MFP_LPM_CAN_WAKEUP | MFP_LPM_EDGE_FALL)
30#define WAKEUP_ON_EDGE_BOTH (MFP_LPM_CAN_WAKEUP | MFP_LPM_EDGE_BOTH) 32#define WAKEUP_ON_EDGE_BOTH (MFP_LPM_CAN_WAKEUP | MFP_LPM_EDGE_BOTH)
diff --git a/arch/arm/mach-pxa/include/mach/mmc.h b/arch/arm/mach-pxa/include/mach/mmc.h
index 02a69dc2ee63..9eb515bb799d 100644
--- a/arch/arm/mach-pxa/include/mach/mmc.h
+++ b/arch/arm/mach-pxa/include/mach/mmc.h
@@ -9,7 +9,7 @@ struct mmc_host;
9 9
10struct pxamci_platform_data { 10struct pxamci_platform_data {
11 unsigned int ocr_mask; /* available voltages */ 11 unsigned int ocr_mask; /* available voltages */
12 unsigned long detect_delay; /* delay in jiffies before detecting cards after interrupt */ 12 unsigned long detect_delay_ms; /* delay in millisecond before detecting cards after interrupt */
13 int (*init)(struct device *, irq_handler_t , void *); 13 int (*init)(struct device *, irq_handler_t , void *);
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);
diff --git a/arch/arm/mach-pxa/include/mach/pxa2xx-gpio.h b/arch/arm/mach-pxa/include/mach/pxa2xx-gpio.h
deleted file mode 100644
index 1209c44aa6f1..000000000000
--- a/arch/arm/mach-pxa/include/mach/pxa2xx-gpio.h
+++ /dev/null
@@ -1,375 +0,0 @@
1#ifndef __ASM_ARCH_PXA2XX_GPIO_H
2#define __ASM_ARCH_PXA2XX_GPIO_H
3
4#warning Please use mfp-pxa2[57]x.h instead of pxa2xx-gpio.h
5
6#include <mach/gpio.h>
7
8/* GPIO alternate function assignments */
9
10#define GPIO1_RST 1 /* reset */
11#define GPIO6_MMCCLK 6 /* MMC Clock */
12#define GPIO7_48MHz 7 /* 48 MHz clock output */
13#define GPIO8_MMCCS0 8 /* MMC Chip Select 0 */
14#define GPIO9_MMCCS1 9 /* MMC Chip Select 1 */
15#define GPIO10_RTCCLK 10 /* real time clock (1 Hz) */
16#define GPIO11_3_6MHz 11 /* 3.6 MHz oscillator out */
17#define GPIO12_32KHz 12 /* 32 kHz out */
18#define GPIO12_CIF_DD_7 12 /* Camera data pin 7 */
19#define GPIO13_MBGNT 13 /* memory controller grant */
20#define GPIO14_MBREQ 14 /* alternate bus master request */
21#define GPIO15_nCS_1 15 /* chip select 1 */
22#define GPIO16_PWM0 16 /* PWM0 output */
23#define GPIO17_PWM1 17 /* PWM1 output */
24#define GPIO17_CIF_DD_6 17 /* Camera data pin 6 */
25#define GPIO18_RDY 18 /* Ext. Bus Ready */
26#define GPIO19_DREQ1 19 /* External DMA Request */
27#define GPIO20_DREQ0 20 /* External DMA Request */
28#define GPIO23_SCLK 23 /* SSP clock */
29#define GPIO23_CIF_MCLK 23 /* Camera Master Clock */
30#define GPIO24_SFRM 24 /* SSP Frame */
31#define GPIO24_CIF_FV 24 /* Camera frame start signal */
32#define GPIO25_STXD 25 /* SSP transmit */
33#define GPIO25_CIF_LV 25 /* Camera line start signal */
34#define GPIO26_SRXD 26 /* SSP receive */
35#define GPIO26_CIF_PCLK 26 /* Camera Pixel Clock */
36#define GPIO27_SEXTCLK 27 /* SSP ext_clk */
37#define GPIO27_CIF_DD_0 27 /* Camera data pin 0 */
38#define GPIO28_BITCLK 28 /* AC97/I2S bit_clk */
39#define GPIO29_SDATA_IN 29 /* AC97 Sdata_in0 / I2S Sdata_in */
40#define GPIO30_SDATA_OUT 30 /* AC97/I2S Sdata_out */
41#define GPIO31_SYNC 31 /* AC97/I2S sync */
42#define GPIO32_SDATA_IN1 32 /* AC97 Sdata_in1 */
43#define GPIO32_SYSCLK 32 /* I2S System Clock */
44#define GPIO32_MMCCLK 32 /* MMC Clock (PXA270) */
45#define GPIO33_nCS_5 33 /* chip select 5 */
46#define GPIO34_FFRXD 34 /* FFUART receive */
47#define GPIO34_MMCCS0 34 /* MMC Chip Select 0 */
48#define GPIO35_FFCTS 35 /* FFUART Clear to send */
49#define GPIO36_FFDCD 36 /* FFUART Data carrier detect */
50#define GPIO37_FFDSR 37 /* FFUART data set ready */
51#define GPIO38_FFRI 38 /* FFUART Ring Indicator */
52#define GPIO39_MMCCS1 39 /* MMC Chip Select 1 */
53#define GPIO39_FFTXD 39 /* FFUART transmit data */
54#define GPIO40_FFDTR 40 /* FFUART data terminal Ready */
55#define GPIO41_FFRTS 41 /* FFUART request to send */
56#define GPIO42_BTRXD 42 /* BTUART receive data */
57#define GPIO42_HWRXD 42 /* HWUART receive data */
58#define GPIO42_CIF_MCLK 42 /* Camera Master Clock */
59#define GPIO43_BTTXD 43 /* BTUART transmit data */
60#define GPIO43_HWTXD 43 /* HWUART transmit data */
61#define GPIO43_CIF_FV 43 /* Camera frame start signal */
62#define GPIO44_BTCTS 44 /* BTUART clear to send */
63#define GPIO44_HWCTS 44 /* HWUART clear to send */
64#define GPIO44_CIF_LV 44 /* Camera line start signal */
65#define GPIO45_BTRTS 45 /* BTUART request to send */
66#define GPIO45_HWRTS 45 /* HWUART request to send */
67#define GPIO45_AC97_SYSCLK 45 /* AC97 System Clock */
68#define GPIO45_CIF_PCLK 45 /* Camera Pixel Clock */
69#define GPIO46_ICPRXD 46 /* ICP receive data */
70#define GPIO46_STRXD 46 /* STD_UART receive data */
71#define GPIO47_ICPTXD 47 /* ICP transmit data */
72#define GPIO47_STTXD 47 /* STD_UART transmit data */
73#define GPIO47_CIF_DD_0 47 /* Camera data pin 0 */
74#define GPIO48_nPOE 48 /* Output Enable for Card Space */
75#define GPIO48_CIF_DD_5 48 /* Camera data pin 5 */
76#define GPIO49_nPWE 49 /* Write Enable for Card Space */
77#define GPIO50_nPIOR 50 /* I/O Read for Card Space */
78#define GPIO50_CIF_DD_3 50 /* Camera data pin 3 */
79#define GPIO51_nPIOW 51 /* I/O Write for Card Space */
80#define GPIO51_CIF_DD_2 51 /* Camera data pin 2 */
81#define GPIO52_nPCE_1 52 /* Card Enable for Card Space */
82#define GPIO52_CIF_DD_4 52 /* Camera data pin 4 */
83#define GPIO53_nPCE_2 53 /* Card Enable for Card Space */
84#define GPIO53_MMCCLK 53 /* MMC Clock */
85#define GPIO53_CIF_MCLK 53 /* Camera Master Clock */
86#define GPIO54_MMCCLK 54 /* MMC Clock */
87#define GPIO54_pSKTSEL 54 /* Socket Select for Card Space */
88#define GPIO54_nPCE_2 54 /* Card Enable for Card Space (PXA27x) */
89#define GPIO54_CIF_PCLK 54 /* Camera Pixel Clock */
90#define GPIO55_nPREG 55 /* Card Address bit 26 */
91#define GPIO55_CIF_DD_1 55 /* Camera data pin 1 */
92#define GPIO56_nPWAIT 56 /* Wait signal for Card Space */
93#define GPIO57_nIOIS16 57 /* Bus Width select for I/O Card Space */
94#define GPIO58_LDD_0 58 /* LCD data pin 0 */
95#define GPIO59_LDD_1 59 /* LCD data pin 1 */
96#define GPIO60_LDD_2 60 /* LCD data pin 2 */
97#define GPIO61_LDD_3 61 /* LCD data pin 3 */
98#define GPIO62_LDD_4 62 /* LCD data pin 4 */
99#define GPIO63_LDD_5 63 /* LCD data pin 5 */
100#define GPIO64_LDD_6 64 /* LCD data pin 6 */
101#define GPIO65_LDD_7 65 /* LCD data pin 7 */
102#define GPIO66_LDD_8 66 /* LCD data pin 8 */
103#define GPIO66_MBREQ 66 /* alternate bus master req */
104#define GPIO67_LDD_9 67 /* LCD data pin 9 */
105#define GPIO67_MMCCS0 67 /* MMC Chip Select 0 */
106#define GPIO68_LDD_10 68 /* LCD data pin 10 */
107#define GPIO68_MMCCS1 68 /* MMC Chip Select 1 */
108#define GPIO69_LDD_11 69 /* LCD data pin 11 */
109#define GPIO69_MMCCLK 69 /* MMC_CLK */
110#define GPIO70_LDD_12 70 /* LCD data pin 12 */
111#define GPIO70_RTCCLK 70 /* Real Time clock (1 Hz) */
112#define GPIO71_LDD_13 71 /* LCD data pin 13 */
113#define GPIO71_3_6MHz 71 /* 3.6 MHz Oscillator clock */
114#define GPIO72_LDD_14 72 /* LCD data pin 14 */
115#define GPIO72_32kHz 72 /* 32 kHz clock */
116#define GPIO73_LDD_15 73 /* LCD data pin 15 */
117#define GPIO73_MBGNT 73 /* Memory controller grant */
118#define GPIO74_LCD_FCLK 74 /* LCD Frame clock */
119#define GPIO75_LCD_LCLK 75 /* LCD line clock */
120#define GPIO76_LCD_PCLK 76 /* LCD Pixel clock */
121#define GPIO77_LCD_ACBIAS 77 /* LCD AC Bias */
122#define GPIO78_nCS_2 78 /* chip select 2 */
123#define GPIO79_nCS_3 79 /* chip select 3 */
124#define GPIO80_nCS_4 80 /* chip select 4 */
125#define GPIO81_NSCLK 81 /* NSSP clock */
126#define GPIO81_CIF_DD_0 81 /* Camera data pin 0 */
127#define GPIO82_NSFRM 82 /* NSSP Frame */
128#define GPIO82_CIF_DD_5 82 /* Camera data pin 5 */
129#define GPIO83_NSTXD 83 /* NSSP transmit */
130#define GPIO83_CIF_DD_4 83 /* Camera data pin 4 */
131#define GPIO84_NSRXD 84 /* NSSP receive */
132#define GPIO84_CIF_FV 84 /* Camera frame start signal */
133#define GPIO85_nPCE_1 85 /* Card Enable for Card Space (PXA27x) */
134#define GPIO85_CIF_LV 85 /* Camera line start signal */
135#define GPIO90_CIF_DD_4 90 /* Camera data pin 4 */
136#define GPIO91_CIF_DD_5 91 /* Camera data pin 5 */
137#define GPIO92_MMCDAT0 92 /* MMC DAT0 (PXA27x) */
138#define GPIO93_CIF_DD_6 93 /* Camera data pin 6 */
139#define GPIO94_CIF_DD_5 94 /* Camera data pin 5 */
140#define GPIO95_CIF_DD_4 95 /* Camera data pin 4 */
141#define GPIO96_FFRXD 96 /* FFUART recieve */
142#define GPIO98_FFRTS 98 /* FFUART request to send */
143#define GPIO98_CIF_DD_0 98 /* Camera data pin 0 */
144#define GPIO99_FFTXD 99 /* FFUART transmit data */
145#define GPIO100_FFCTS 100 /* FFUART Clear to send */
146#define GPIO102_nPCE_1 102 /* PCMCIA (PXA27x) */
147#define GPIO103_CIF_DD_3 103 /* Camera data pin 3 */
148#define GPIO104_CIF_DD_2 104 /* Camera data pin 2 */
149#define GPIO105_CIF_DD_1 105 /* Camera data pin 1 */
150#define GPIO106_CIF_DD_9 106 /* Camera data pin 9 */
151#define GPIO107_CIF_DD_8 107 /* Camera data pin 8 */
152#define GPIO108_CIF_DD_7 108 /* Camera data pin 7 */
153#define GPIO109_MMCDAT1 109 /* MMC DAT1 (PXA27x) */
154#define GPIO110_MMCDAT2 110 /* MMC DAT2 (PXA27x) */
155#define GPIO110_MMCCS0 110 /* MMC Chip Select 0 (PXA27x) */
156#define GPIO111_MMCDAT3 111 /* MMC DAT3 (PXA27x) */
157#define GPIO111_MMCCS1 111 /* MMC Chip Select 1 (PXA27x) */
158#define GPIO112_MMCCMD 112 /* MMC CMD (PXA27x) */
159#define GPIO113_I2S_SYSCLK 113 /* I2S System Clock (PXA27x) */
160#define GPIO113_AC97_RESET_N 113 /* AC97 NRESET on (PXA27x) */
161#define GPIO114_CIF_DD_1 114 /* Camera data pin 1 */
162#define GPIO115_CIF_DD_3 115 /* Camera data pin 3 */
163#define GPIO116_CIF_DD_2 116 /* Camera data pin 2 */
164
165/* GPIO alternate function mode & direction */
166
167#define GPIO_IN 0x000
168#define GPIO_OUT 0x080
169#define GPIO_ALT_FN_1_IN 0x100
170#define GPIO_ALT_FN_1_OUT 0x180
171#define GPIO_ALT_FN_2_IN 0x200
172#define GPIO_ALT_FN_2_OUT 0x280
173#define GPIO_ALT_FN_3_IN 0x300
174#define GPIO_ALT_FN_3_OUT 0x380
175#define GPIO_MD_MASK_NR 0x07f
176#define GPIO_MD_MASK_DIR 0x080
177#define GPIO_MD_MASK_FN 0x300
178#define GPIO_DFLT_LOW 0x400
179#define GPIO_DFLT_HIGH 0x800
180
181#define GPIO1_RTS_MD ( 1 | GPIO_ALT_FN_1_IN)
182#define GPIO6_MMCCLK_MD ( 6 | GPIO_ALT_FN_1_OUT)
183#define GPIO7_48MHz_MD ( 7 | GPIO_ALT_FN_1_OUT)
184#define GPIO8_MMCCS0_MD ( 8 | GPIO_ALT_FN_1_OUT)
185#define GPIO9_MMCCS1_MD ( 9 | GPIO_ALT_FN_1_OUT)
186#define GPIO10_RTCCLK_MD (10 | GPIO_ALT_FN_1_OUT)
187#define GPIO11_3_6MHz_MD (11 | GPIO_ALT_FN_1_OUT)
188#define GPIO12_32KHz_MD (12 | GPIO_ALT_FN_1_OUT)
189#define GPIO12_CIF_DD_7_MD (12 | GPIO_ALT_FN_2_IN)
190#define GPIO13_MBGNT_MD (13 | GPIO_ALT_FN_2_OUT)
191#define GPIO14_MBREQ_MD (14 | GPIO_ALT_FN_1_IN)
192#define GPIO15_nCS_1_MD (15 | GPIO_ALT_FN_2_OUT)
193#define GPIO16_PWM0_MD (16 | GPIO_ALT_FN_2_OUT)
194#define GPIO17_PWM1_MD (17 | GPIO_ALT_FN_2_OUT)
195#define GPIO17_CIF_DD_6_MD (17 | GPIO_ALT_FN_2_IN)
196#define GPIO18_RDY_MD (18 | GPIO_ALT_FN_1_IN)
197#define GPIO19_DREQ1_MD (19 | GPIO_ALT_FN_1_IN)
198#define GPIO20_DREQ0_MD (20 | GPIO_ALT_FN_1_IN)
199#define GPIO23_CIF_MCLK_MD (23 | GPIO_ALT_FN_1_OUT)
200#define GPIO23_SCLK_MD (23 | GPIO_ALT_FN_2_OUT)
201#define GPIO24_CIF_FV_MD (24 | GPIO_ALT_FN_1_OUT)
202#define GPIO24_SFRM_MD (24 | GPIO_ALT_FN_2_OUT)
203#define GPIO25_CIF_LV_MD (25 | GPIO_ALT_FN_1_OUT)
204#define GPIO25_STXD_MD (25 | GPIO_ALT_FN_2_OUT)
205#define GPIO26_SRXD_MD (26 | GPIO_ALT_FN_1_IN)
206#define GPIO26_CIF_PCLK_MD (26 | GPIO_ALT_FN_2_IN)
207#define GPIO27_SEXTCLK_MD (27 | GPIO_ALT_FN_1_IN)
208#define GPIO27_CIF_DD_0_MD (27 | GPIO_ALT_FN_3_IN)
209#define GPIO28_BITCLK_AC97_MD (28 | GPIO_ALT_FN_1_IN)
210#define GPIO28_BITCLK_IN_I2S_MD (28 | GPIO_ALT_FN_2_IN)
211#define GPIO28_BITCLK_OUT_I2S_MD (28 | GPIO_ALT_FN_1_OUT)
212#define GPIO29_SDATA_IN_AC97_MD (29 | GPIO_ALT_FN_1_IN)
213#define GPIO29_SDATA_IN_I2S_MD (29 | GPIO_ALT_FN_2_IN)
214#define GPIO30_SDATA_OUT_AC97_MD (30 | GPIO_ALT_FN_2_OUT)
215#define GPIO30_SDATA_OUT_I2S_MD (30 | GPIO_ALT_FN_1_OUT)
216#define GPIO31_SYNC_I2S_MD (31 | GPIO_ALT_FN_1_OUT)
217#define GPIO31_SYNC_AC97_MD (31 | GPIO_ALT_FN_2_OUT)
218#define GPIO32_SDATA_IN1_AC97_MD (32 | GPIO_ALT_FN_1_IN)
219#define GPIO32_SYSCLK_I2S_MD (32 | GPIO_ALT_FN_1_OUT)
220#define GPIO32_MMCCLK_MD (32 | GPIO_ALT_FN_2_OUT)
221#define GPIO33_nCS_5_MD (33 | GPIO_ALT_FN_2_OUT)
222#define GPIO34_FFRXD_MD (34 | GPIO_ALT_FN_1_IN)
223#define GPIO34_MMCCS0_MD (34 | GPIO_ALT_FN_2_OUT)
224#define GPIO35_FFCTS_MD (35 | GPIO_ALT_FN_1_IN)
225#define GPIO35_KP_MKOUT6_MD (35 | GPIO_ALT_FN_2_OUT)
226#define GPIO36_FFDCD_MD (36 | GPIO_ALT_FN_1_IN)
227#define GPIO37_FFDSR_MD (37 | GPIO_ALT_FN_1_IN)
228#define GPIO38_FFRI_MD (38 | GPIO_ALT_FN_1_IN)
229#define GPIO39_MMCCS1_MD (39 | GPIO_ALT_FN_1_OUT)
230#define GPIO39_FFTXD_MD (39 | GPIO_ALT_FN_2_OUT)
231#define GPIO40_FFDTR_MD (40 | GPIO_ALT_FN_2_OUT)
232#define GPIO41_FFRTS_MD (41 | GPIO_ALT_FN_2_OUT)
233#define GPIO41_KP_MKOUT7_MD (41 | GPIO_ALT_FN_1_OUT)
234#define GPIO42_BTRXD_MD (42 | GPIO_ALT_FN_1_IN)
235#define GPIO42_HWRXD_MD (42 | GPIO_ALT_FN_3_IN)
236#define GPIO42_CIF_MCLK_MD (42 | GPIO_ALT_FN_3_OUT)
237#define GPIO43_BTTXD_MD (43 | GPIO_ALT_FN_2_OUT)
238#define GPIO43_HWTXD_MD (43 | GPIO_ALT_FN_3_OUT)
239#define GPIO43_CIF_FV_MD (43 | GPIO_ALT_FN_3_OUT)
240#define GPIO44_BTCTS_MD (44 | GPIO_ALT_FN_1_IN)
241#define GPIO44_HWCTS_MD (44 | GPIO_ALT_FN_3_IN)
242#define GPIO44_CIF_LV_MD (44 | GPIO_ALT_FN_3_OUT)
243#define GPIO45_CIF_PCLK_MD (45 | GPIO_ALT_FN_3_IN)
244#define GPIO45_BTRTS_MD (45 | GPIO_ALT_FN_2_OUT)
245#define GPIO45_HWRTS_MD (45 | GPIO_ALT_FN_3_OUT)
246#define GPIO45_SYSCLK_AC97_MD (45 | GPIO_ALT_FN_1_OUT)
247#define GPIO46_ICPRXD_MD (46 | GPIO_ALT_FN_1_IN)
248#define GPIO46_STRXD_MD (46 | GPIO_ALT_FN_2_IN)
249#define GPIO47_CIF_DD_0_MD (47 | GPIO_ALT_FN_1_IN)
250#define GPIO47_ICPTXD_MD (47 | GPIO_ALT_FN_2_OUT)
251#define GPIO47_STTXD_MD (47 | GPIO_ALT_FN_1_OUT)
252#define GPIO48_CIF_DD_5_MD (48 | GPIO_ALT_FN_1_IN)
253#define GPIO48_nPOE_MD (48 | GPIO_ALT_FN_2_OUT)
254#define GPIO48_HWTXD_MD (48 | GPIO_ALT_FN_1_OUT)
255#define GPIO48_nPOE_MD (48 | GPIO_ALT_FN_2_OUT)
256#define GPIO49_HWRXD_MD (49 | GPIO_ALT_FN_1_IN)
257#define GPIO49_nPWE_MD (49 | GPIO_ALT_FN_2_OUT)
258#define GPIO50_CIF_DD_3_MD (50 | GPIO_ALT_FN_1_IN)
259#define GPIO50_nPIOR_MD (50 | GPIO_ALT_FN_2_OUT)
260#define GPIO50_HWCTS_MD (50 | GPIO_ALT_FN_1_IN)
261#define GPIO50_CIF_DD_3_MD (50 | GPIO_ALT_FN_1_IN)
262#define GPIO51_CIF_DD_2_MD (51 | GPIO_ALT_FN_1_IN)
263#define GPIO51_nPIOW_MD (51 | GPIO_ALT_FN_2_OUT)
264#define GPIO51_HWRTS_MD (51 | GPIO_ALT_FN_1_OUT)
265#define GPIO51_CIF_DD_2_MD (51 | GPIO_ALT_FN_1_IN)
266#define GPIO52_nPCE_1_MD (52 | GPIO_ALT_FN_2_OUT)
267#define GPIO52_CIF_DD_4_MD (52 | GPIO_ALT_FN_1_IN)
268#define GPIO53_nPCE_2_MD (53 | GPIO_ALT_FN_2_OUT)
269#define GPIO53_MMCCLK_MD (53 | GPIO_ALT_FN_1_OUT)
270#define GPIO53_CIF_MCLK_MD (53 | GPIO_ALT_FN_2_OUT)
271#define GPIO54_MMCCLK_MD (54 | GPIO_ALT_FN_1_OUT)
272#define GPIO54_nPCE_2_MD (54 | GPIO_ALT_FN_2_OUT)
273#define GPIO54_pSKTSEL_MD (54 | GPIO_ALT_FN_2_OUT)
274#define GPIO54_CIF_PCLK_MD (54 | GPIO_ALT_FN_3_IN)
275#define GPIO55_nPREG_MD (55 | GPIO_ALT_FN_2_OUT)
276#define GPIO55_CIF_DD_1_MD (55 | GPIO_ALT_FN_1_IN)
277#define GPIO56_nPWAIT_MD (56 | GPIO_ALT_FN_1_IN)
278#define GPIO57_nIOIS16_MD (57 | GPIO_ALT_FN_1_IN)
279#define GPIO58_LDD_0_MD (58 | GPIO_ALT_FN_2_OUT)
280#define GPIO59_LDD_1_MD (59 | GPIO_ALT_FN_2_OUT)
281#define GPIO60_LDD_2_MD (60 | GPIO_ALT_FN_2_OUT)
282#define GPIO61_LDD_3_MD (61 | GPIO_ALT_FN_2_OUT)
283#define GPIO62_LDD_4_MD (62 | GPIO_ALT_FN_2_OUT)
284#define GPIO63_LDD_5_MD (63 | GPIO_ALT_FN_2_OUT)
285#define GPIO64_LDD_6_MD (64 | GPIO_ALT_FN_2_OUT)
286#define GPIO65_LDD_7_MD (65 | GPIO_ALT_FN_2_OUT)
287#define GPIO66_LDD_8_MD (66 | GPIO_ALT_FN_2_OUT)
288#define GPIO66_MBREQ_MD (66 | GPIO_ALT_FN_1_IN)
289#define GPIO67_LDD_9_MD (67 | GPIO_ALT_FN_2_OUT)
290#define GPIO67_MMCCS0_MD (67 | GPIO_ALT_FN_1_OUT)
291#define GPIO68_LDD_10_MD (68 | GPIO_ALT_FN_2_OUT)
292#define GPIO68_MMCCS1_MD (68 | GPIO_ALT_FN_1_OUT)
293#define GPIO69_LDD_11_MD (69 | GPIO_ALT_FN_2_OUT)
294#define GPIO69_MMCCLK_MD (69 | GPIO_ALT_FN_1_OUT)
295#define GPIO70_LDD_12_MD (70 | GPIO_ALT_FN_2_OUT)
296#define GPIO70_RTCCLK_MD (70 | GPIO_ALT_FN_1_OUT)
297#define GPIO71_LDD_13_MD (71 | GPIO_ALT_FN_2_OUT)
298#define GPIO71_3_6MHz_MD (71 | GPIO_ALT_FN_1_OUT)
299#define GPIO72_LDD_14_MD (72 | GPIO_ALT_FN_2_OUT)
300#define GPIO72_32kHz_MD (72 | GPIO_ALT_FN_1_OUT)
301#define GPIO73_LDD_15_MD (73 | GPIO_ALT_FN_2_OUT)
302#define GPIO73_MBGNT_MD (73 | GPIO_ALT_FN_1_OUT)
303#define GPIO74_LCD_FCLK_MD (74 | GPIO_ALT_FN_2_OUT)
304#define GPIO75_LCD_LCLK_MD (75 | GPIO_ALT_FN_2_OUT)
305#define GPIO76_LCD_PCLK_MD (76 | GPIO_ALT_FN_2_OUT)
306#define GPIO77_LCD_ACBIAS_MD (77 | GPIO_ALT_FN_2_OUT)
307#define GPIO78_nCS_2_MD (78 | GPIO_ALT_FN_2_OUT)
308#define GPIO78_nPCE_2_MD (78 | GPIO_ALT_FN_1_OUT)
309#define GPIO79_nCS_3_MD (79 | GPIO_ALT_FN_2_OUT)
310#define GPIO79_pSKTSEL_MD (79 | GPIO_ALT_FN_1_OUT)
311#define GPIO80_nCS_4_MD (80 | GPIO_ALT_FN_2_OUT)
312#define GPIO81_NSSP_CLK_OUT (81 | GPIO_ALT_FN_1_OUT)
313#define GPIO81_NSSP_CLK_IN (81 | GPIO_ALT_FN_1_IN)
314#define GPIO81_CIF_DD_0_MD (81 | GPIO_ALT_FN_2_IN)
315#define GPIO82_NSSP_FRM_OUT (82 | GPIO_ALT_FN_1_OUT)
316#define GPIO82_NSSP_FRM_IN (82 | GPIO_ALT_FN_1_IN)
317#define GPIO82_CIF_DD_5_MD (82 | GPIO_ALT_FN_3_IN)
318#define GPIO83_NSSP_TX (83 | GPIO_ALT_FN_1_OUT)
319#define GPIO83_NSSP_RX (83 | GPIO_ALT_FN_2_IN)
320#define GPIO83_CIF_DD_4_MD (83 | GPIO_ALT_FN_3_IN)
321#define GPIO84_NSSP_TX (84 | GPIO_ALT_FN_1_OUT)
322#define GPIO84_NSSP_RX (84 | GPIO_ALT_FN_2_IN)
323#define GPIO84_CIF_FV_MD (84 | GPIO_ALT_FN_3_IN)
324#define GPIO85_nPCE_1_MD (85 | GPIO_ALT_FN_1_OUT)
325#define GPIO85_CIF_LV_MD (85 | GPIO_ALT_FN_3_IN)
326#define GPIO86_nPCE_1_MD (86 | GPIO_ALT_FN_1_OUT)
327#define GPIO88_USBH1_PWR_MD (88 | GPIO_ALT_FN_1_IN)
328#define GPIO89_USBH1_PEN_MD (89 | GPIO_ALT_FN_2_OUT)
329#define GPIO90_CIF_DD_4_MD (90 | GPIO_ALT_FN_3_IN)
330#define GPIO91_CIF_DD_5_MD (91 | GPIO_ALT_FN_3_IN)
331#define GPIO92_MMCDAT0_MD (92 | GPIO_ALT_FN_1_OUT)
332#define GPIO93_CIF_DD_6_MD (93 | GPIO_ALT_FN_2_IN)
333#define GPIO94_CIF_DD_5_MD (94 | GPIO_ALT_FN_2_IN)
334#define GPIO95_CIF_DD_4_MD (95 | GPIO_ALT_FN_2_IN)
335#define GPIO95_KP_MKIN6_MD (95 | GPIO_ALT_FN_3_IN)
336#define GPIO96_KP_DKIN3_MD (96 | GPIO_ALT_FN_1_IN)
337#define GPIO96_FFRXD_MD (96 | GPIO_ALT_FN_3_IN)
338#define GPIO97_KP_MKIN3_MD (97 | GPIO_ALT_FN_3_IN)
339#define GPIO98_CIF_DD_0_MD (98 | GPIO_ALT_FN_2_IN)
340#define GPIO98_FFRTS_MD (98 | GPIO_ALT_FN_3_OUT)
341#define GPIO99_FFTXD_MD (99 | GPIO_ALT_FN_3_OUT)
342#define GPIO100_KP_MKIN0_MD (100 | GPIO_ALT_FN_1_IN)
343#define GPIO101_KP_MKIN1_MD (101 | GPIO_ALT_FN_1_IN)
344#define GPIO102_nPCE_1_MD (102 | GPIO_ALT_FN_1_OUT)
345#define GPIO102_KP_MKIN2_MD (102 | GPIO_ALT_FN_1_IN)
346#define GPIO103_CIF_DD_3_MD (103 | GPIO_ALT_FN_1_IN)
347#define GPIO103_KP_MKOUT0_MD (103 | GPIO_ALT_FN_2_OUT)
348#define GPIO104_CIF_DD_2_MD (104 | GPIO_ALT_FN_1_IN)
349#define GPIO104_pSKTSEL_MD (104 | GPIO_ALT_FN_1_OUT)
350#define GPIO104_KP_MKOUT1_MD (104 | GPIO_ALT_FN_2_OUT)
351#define GPIO105_CIF_DD_1_MD (105 | GPIO_ALT_FN_1_IN)
352#define GPIO105_KP_MKOUT2_MD (105 | GPIO_ALT_FN_2_OUT)
353#define GPIO106_CIF_DD_9_MD (106 | GPIO_ALT_FN_1_IN)
354#define GPIO106_KP_MKOUT3_MD (106 | GPIO_ALT_FN_2_OUT)
355#define GPIO107_CIF_DD_8_MD (107 | GPIO_ALT_FN_1_IN)
356#define GPIO107_KP_MKOUT4_MD (107 | GPIO_ALT_FN_2_OUT)
357#define GPIO108_CIF_DD_7_MD (108 | GPIO_ALT_FN_1_IN)
358#define GPIO108_KP_MKOUT5_MD (108 | GPIO_ALT_FN_2_OUT)
359#define GPIO109_MMCDAT1_MD (109 | GPIO_ALT_FN_1_OUT)
360#define GPIO110_MMCDAT2_MD (110 | GPIO_ALT_FN_1_OUT)
361#define GPIO110_MMCCS0_MD (110 | GPIO_ALT_FN_1_OUT)
362#define GPIO111_MMCDAT3_MD (111 | GPIO_ALT_FN_1_OUT)
363#define GPIO110_MMCCS1_MD (111 | GPIO_ALT_FN_1_OUT)
364#define GPIO112_MMCCMD_MD (112 | GPIO_ALT_FN_1_OUT)
365#define GPIO113_I2S_SYSCLK_MD (113 | GPIO_ALT_FN_1_OUT)
366#define GPIO113_AC97_RESET_N_MD (113 | GPIO_ALT_FN_2_OUT)
367#define GPIO117_I2CSCL_MD (117 | GPIO_ALT_FN_1_IN)
368#define GPIO118_I2CSDA_MD (118 | GPIO_ALT_FN_1_IN)
369
370/*
371 * Handy routine to set GPIO alternate functions
372 */
373extern int pxa_gpio_mode( int gpio_mode );
374
375#endif /* __ASM_ARCH_PXA2XX_GPIO_H */
diff --git a/arch/arm/mach-pxa/include/mach/regs-u2d.h b/arch/arm/mach-pxa/include/mach/regs-u2d.h
index 44b0b20b69a4..c15c0c57de08 100644
--- a/arch/arm/mach-pxa/include/mach/regs-u2d.h
+++ b/arch/arm/mach-pxa/include/mach/regs-u2d.h
@@ -166,7 +166,8 @@
166#define U2DMACSR_BUSERRTYPE (7 << 10) /* PX Bus Error Type */ 166#define U2DMACSR_BUSERRTYPE (7 << 10) /* PX Bus Error Type */
167#define U2DMACSR_EORINTR (1 << 9) /* End Of Receive */ 167#define U2DMACSR_EORINTR (1 << 9) /* End Of Receive */
168#define U2DMACSR_REQPEND (1 << 8) /* Request Pending */ 168#define U2DMACSR_REQPEND (1 << 8) /* Request Pending */
169#define U2DMACSR_RASINTR (1 << 4) /* Request After Channel Stopped (read / write 1 clear) */#define U2DMACSR_STOPINTR (1 << 3) /* Stop Interrupt (read only) */ 169#define U2DMACSR_RASINTR (1 << 4) /* Request After Channel Stopped (read / write 1 clear) */
170#define U2DMACSR_STOPINTR (1 << 3) /* Stop Interrupt (read only) */
170#define U2DMACSR_ENDINTR (1 << 2) /* End Interrupt (read / write 1 clear) */ 171#define U2DMACSR_ENDINTR (1 << 2) /* End Interrupt (read / write 1 clear) */
171#define U2DMACSR_STARTINTR (1 << 1) /* Start Interrupt (read / write 1 clear) */ 172#define U2DMACSR_STARTINTR (1 << 1) /* Start Interrupt (read / write 1 clear) */
172#define U2DMACSR_BUSERRINTR (1 << 0) /* Bus Error Interrupt (read / write 1 clear) */ 173#define U2DMACSR_BUSERRINTR (1 << 0) /* Bus Error Interrupt (read / write 1 clear) */
diff --git a/arch/arm/mach-pxa/include/mach/ssp.h b/arch/arm/mach-pxa/include/mach/ssp.h
deleted file mode 100644
index be1be5b6db51..000000000000
--- a/arch/arm/mach-pxa/include/mach/ssp.h
+++ /dev/null
@@ -1,109 +0,0 @@
1/*
2 * ssp.h
3 *
4 * Copyright (C) 2003 Russell King, All Rights Reserved.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * This driver supports the following PXA CPU/SSP ports:-
11 *
12 * PXA250 SSP
13 * PXA255 SSP, NSSP
14 * PXA26x SSP, NSSP, ASSP
15 * PXA27x SSP1, SSP2, SSP3
16 * PXA3xx SSP1, SSP2, SSP3, SSP4
17 */
18
19#ifndef __ASM_ARCH_SSP_H
20#define __ASM_ARCH_SSP_H
21
22#include <linux/list.h>
23#include <linux/io.h>
24
25enum pxa_ssp_type {
26 SSP_UNDEFINED = 0,
27 PXA25x_SSP, /* pxa 210, 250, 255, 26x */
28 PXA25x_NSSP, /* pxa 255, 26x (including ASSP) */
29 PXA27x_SSP,
30};
31
32struct ssp_device {
33 struct platform_device *pdev;
34 struct list_head node;
35
36 struct clk *clk;
37 void __iomem *mmio_base;
38 unsigned long phys_base;
39
40 const char *label;
41 int port_id;
42 int type;
43 int use_count;
44 int irq;
45 int drcmr_rx;
46 int drcmr_tx;
47};
48
49#ifdef CONFIG_PXA_SSP_LEGACY
50/*
51 * SSP initialisation flags
52 */
53#define SSP_NO_IRQ 0x1 /* don't register an irq handler in SSP driver */
54
55struct ssp_state {
56 u32 cr0;
57 u32 cr1;
58 u32 to;
59 u32 psp;
60};
61
62struct ssp_dev {
63 struct ssp_device *ssp;
64 u32 port;
65 u32 mode;
66 u32 flags;
67 u32 psp_flags;
68 u32 speed;
69 int irq;
70};
71
72int ssp_write_word(struct ssp_dev *dev, u32 data);
73int ssp_read_word(struct ssp_dev *dev, u32 *data);
74int ssp_flush(struct ssp_dev *dev);
75void ssp_enable(struct ssp_dev *dev);
76void ssp_disable(struct ssp_dev *dev);
77void ssp_save_state(struct ssp_dev *dev, struct ssp_state *ssp);
78void ssp_restore_state(struct ssp_dev *dev, struct ssp_state *ssp);
79int ssp_init(struct ssp_dev *dev, u32 port, u32 init_flags);
80int ssp_config(struct ssp_dev *dev, u32 mode, u32 flags, u32 psp_flags, u32 speed);
81void ssp_exit(struct ssp_dev *dev);
82#endif /* CONFIG_PXA_SSP_LEGACY */
83
84/**
85 * ssp_write_reg - Write to a SSP register
86 *
87 * @dev: SSP device to access
88 * @reg: Register to write to
89 * @val: Value to be written.
90 */
91static inline void ssp_write_reg(struct ssp_device *dev, u32 reg, u32 val)
92{
93 __raw_writel(val, dev->mmio_base + reg);
94}
95
96/**
97 * ssp_read_reg - Read from a SSP register
98 *
99 * @dev: SSP device to access
100 * @reg: Register to read from
101 */
102static inline u32 ssp_read_reg(struct ssp_device *dev, u32 reg)
103{
104 return __raw_readl(dev->mmio_base + reg);
105}
106
107struct ssp_device *ssp_request(int port, const char *label);
108void ssp_free(struct ssp_device *);
109#endif /* __ASM_ARCH_SSP_H */
diff --git a/arch/arm/mach-pxa/include/mach/tosa.h b/arch/arm/mach-pxa/include/mach/tosa.h
index 4df2d38507dc..1bbd1f2e4beb 100644
--- a/arch/arm/mach-pxa/include/mach/tosa.h
+++ b/arch/arm/mach-pxa/include/mach/tosa.h
@@ -167,7 +167,7 @@
167 167
168#define TOSA_KEY_SYNC KEY_102ND /* ??? */ 168#define TOSA_KEY_SYNC KEY_102ND /* ??? */
169 169
170#ifndef CONFIG_KEYBOARD_TOSA_USE_EXT_KEYCODES 170#ifndef CONFIG_TOSA_USE_EXT_KEYCODES
171#define TOSA_KEY_RECORD KEY_YEN 171#define TOSA_KEY_RECORD KEY_YEN
172#define TOSA_KEY_ADDRESSBOOK KEY_KATAKANA 172#define TOSA_KEY_ADDRESSBOOK KEY_KATAKANA
173#define TOSA_KEY_CANCEL KEY_ESC 173#define TOSA_KEY_CANCEL KEY_ESC
diff --git a/arch/arm/mach-pxa/include/mach/uncompress.h b/arch/arm/mach-pxa/include/mach/uncompress.h
index 5ef91d9d17e4..759b851ec985 100644
--- a/arch/arm/mach-pxa/include/mach/uncompress.h
+++ b/arch/arm/mach-pxa/include/mach/uncompress.h
@@ -16,9 +16,9 @@
16#define BTUART_BASE (0x40200000) 16#define BTUART_BASE (0x40200000)
17#define STUART_BASE (0x40700000) 17#define STUART_BASE (0x40700000)
18 18
19static unsigned long uart_base = FFUART_BASE; 19static unsigned long uart_base;
20static unsigned int uart_shift = 2; 20static unsigned int uart_shift;
21static unsigned int uart_is_pxa = 1; 21static unsigned int uart_is_pxa;
22 22
23static inline unsigned char uart_read(int offset) 23static inline unsigned char uart_read(int offset)
24{ 24{
@@ -56,6 +56,11 @@ static inline void flush(void)
56 56
57static inline void arch_decomp_setup(void) 57static inline void arch_decomp_setup(void)
58{ 58{
59 /* initialize to default */
60 uart_base = FFUART_BASE;
61 uart_shift = 2;
62 uart_is_pxa = 1;
63
59 if (machine_is_littleton() || machine_is_intelmote2() 64 if (machine_is_littleton() || machine_is_intelmote2()
60 || machine_is_csb726() || machine_is_stargate2() 65 || machine_is_csb726() || machine_is_stargate2()
61 || machine_is_cm_x300() || machine_is_balloon3()) 66 || machine_is_cm_x300() || machine_is_balloon3())
diff --git a/arch/arm/mach-pxa/include/mach/vpac270.h b/arch/arm/mach-pxa/include/mach/vpac270.h
new file mode 100644
index 000000000000..7bfa3dd0fd5e
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/vpac270.h
@@ -0,0 +1,42 @@
1/*
2 * GPIOs and interrupts for Voipac PXA270
3 *
4 * Copyright (C) 2010
5 * Marek Vasut <marek.vasut@gmail.com>
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
13#ifndef _INCLUDE_VPAC270_H_
14#define _INCLUDE_VPAC270_H_
15
16#define GPIO1_VPAC270_USER_BTN 1
17
18#define GPIO15_VPAC270_LED_ORANGE 15
19
20#define GPIO81_VPAC270_BKL_ON 81
21#define GPIO83_VPAC270_NL_ON 83
22
23#define GPIO52_VPAC270_SD_READONLY 52
24#define GPIO53_VPAC270_SD_DETECT_N 53
25
26#define GPIO84_VPAC270_PCMCIA_CD 84
27#define GPIO35_VPAC270_PCMCIA_RDY 35
28#define GPIO107_VPAC270_PCMCIA_PPEN 107
29#define GPIO11_VPAC270_PCMCIA_RESET 11
30#define GPIO17_VPAC270_CF_CD 17
31#define GPIO12_VPAC270_CF_RDY 12
32#define GPIO16_VPAC270_CF_RESET 16
33
34#define GPIO41_VPAC270_UDC_DETECT 41
35
36#define GPIO114_VPAC270_ETH_IRQ 114
37
38#define GPIO36_VPAC270_IDE_IRQ 36
39
40#define GPIO113_VPAC270_TS_IRQ 113
41
42#endif
diff --git a/arch/arm/mach-pxa/include/mach/z2.h b/arch/arm/mach-pxa/include/mach/z2.h
new file mode 100644
index 000000000000..8835c16bc82f
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/z2.h
@@ -0,0 +1,41 @@
1/*
2 * arch/arm/mach-pxa/include/mach/z2.h
3 *
4 * Author: Ken McGuire
5 * Created: Feb 6, 2009
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 ASM_ARCH_ZIPIT2_H
13#define ASM_ARCH_ZIPIT2_H
14
15/* LEDs */
16#define GPIO10_ZIPITZ2_LED_WIFI 10
17#define GPIO85_ZIPITZ2_LED_CHARGED 85
18#define GPIO83_ZIPITZ2_LED_CHARGING 83
19
20/* SD/MMC */
21#define GPIO96_ZIPITZ2_SD_DETECT 96
22
23/* GPIO Buttons */
24#define GPIO1_ZIPITZ2_POWER_BUTTON 1
25#define GPIO98_ZIPITZ2_LID_BUTTON 98
26
27/* Libertas GSPI8686 WiFi */
28#define GPIO14_ZIPITZ2_WIFI_RESET 14
29#define GPIO15_ZIPITZ2_WIFI_POWER 15
30#define GPIO24_ZIPITZ2_WIFI_CS 24
31#define GPIO36_ZIPITZ2_WIFI_IRQ 36
32
33/* LCD */
34#define GPIO19_ZIPITZ2_LCD_RESET 19
35#define GPIO88_ZIPITZ2_LCD_CS 88
36
37/* MISC GPIOs */
38#define GPIO0_ZIPITZ2_AC_DETECT 0
39#define GPIO37_ZIPITZ2_HEADSET_DETECT 37
40
41#endif
diff --git a/arch/arm/mach-pxa/littleton.c b/arch/arm/mach-pxa/littleton.c
index fa527b258d61..9b9046185b00 100644
--- a/arch/arm/mach-pxa/littleton.c
+++ b/arch/arm/mach-pxa/littleton.c
@@ -41,7 +41,6 @@
41 41
42#include <mach/pxa300.h> 42#include <mach/pxa300.h>
43#include <mach/pxafb.h> 43#include <mach/pxafb.h>
44#include <mach/ssp.h>
45#include <mach/mmc.h> 44#include <mach/mmc.h>
46#include <mach/pxa2xx_spi.h> 45#include <mach/pxa2xx_spi.h>
47#include <mach/pxa27x_keypad.h> 46#include <mach/pxa27x_keypad.h>
@@ -272,7 +271,7 @@ static inline void littleton_init_keypad(void) {}
272 271
273#if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE) 272#if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE)
274static struct pxamci_platform_data littleton_mci_platform_data = { 273static struct pxamci_platform_data littleton_mci_platform_data = {
275 .detect_delay = 20, 274 .detect_delay_ms = 200,
276 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, 275 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
277 .gpio_card_detect = GPIO_MMC1_CARD_DETECT, 276 .gpio_card_detect = GPIO_MMC1_CARD_DETECT,
278 .gpio_card_ro = -1, 277 .gpio_card_ro = -1,
diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c
index 63d65a2a0387..330c3282856e 100644
--- a/arch/arm/mach-pxa/lubbock.c
+++ b/arch/arm/mach-pxa/lubbock.c
@@ -478,7 +478,7 @@ static void lubbock_mci_exit(struct device *dev, void *data)
478 478
479static struct pxamci_platform_data lubbock_mci_platform_data = { 479static struct pxamci_platform_data lubbock_mci_platform_data = {
480 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, 480 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
481 .detect_delay = 1, 481 .detect_delay_ms = 10,
482 .init = lubbock_mci_init, 482 .init = lubbock_mci_init,
483 .get_ro = lubbock_mci_get_ro, 483 .get_ro = lubbock_mci_get_ro,
484 .exit = lubbock_mci_exit, 484 .exit = lubbock_mci_exit,
diff --git a/arch/arm/mach-pxa/mfp-pxa2xx.c b/arch/arm/mach-pxa/mfp-pxa2xx.c
index cf6b720c055f..1d1419b73457 100644
--- a/arch/arm/mach-pxa/mfp-pxa2xx.c
+++ b/arch/arm/mach-pxa/mfp-pxa2xx.c
@@ -81,6 +81,7 @@ static int __mfp_config_gpio(unsigned gpio, unsigned long c)
81 PGSR(bank) &= ~mask; 81 PGSR(bank) &= ~mask;
82 is_out = 1; 82 is_out = 1;
83 break; 83 break;
84 case MFP_LPM_INPUT:
84 case MFP_LPM_DEFAULT: 85 case MFP_LPM_DEFAULT:
85 break; 86 break;
86 default: 87 default:
@@ -178,8 +179,17 @@ int gpio_set_wake(unsigned int gpio, unsigned int on)
178 if (!d->valid) 179 if (!d->valid)
179 return -EINVAL; 180 return -EINVAL;
180 181
181 if (d->keypad_gpio) 182 /* Allow keypad GPIOs to wakeup system when
182 return -EINVAL; 183 * configured as generic GPIOs.
184 */
185 if (d->keypad_gpio && (MFP_AF(d->config) == 0) &&
186 (d->config & MFP_LPM_CAN_WAKEUP)) {
187 if (on)
188 PKWR |= d->mask;
189 else
190 PKWR &= ~d->mask;
191 return 0;
192 }
183 193
184 mux_taken = (PWER & d->mux_mask) & (~d->mask); 194 mux_taken = (PWER & d->mux_mask) & (~d->mask);
185 if (on && mux_taken) 195 if (on && mux_taken)
@@ -239,21 +249,25 @@ static int pxa27x_pkwr_gpio[] = {
239int keypad_set_wake(unsigned int on) 249int keypad_set_wake(unsigned int on)
240{ 250{
241 unsigned int i, gpio, mask = 0; 251 unsigned int i, gpio, mask = 0;
242 252 struct gpio_desc *d;
243 if (!on) {
244 PKWR = 0;
245 return 0;
246 }
247 253
248 for (i = 0; i < ARRAY_SIZE(pxa27x_pkwr_gpio); i++) { 254 for (i = 0; i < ARRAY_SIZE(pxa27x_pkwr_gpio); i++) {
249 255
250 gpio = pxa27x_pkwr_gpio[i]; 256 gpio = pxa27x_pkwr_gpio[i];
257 d = &gpio_desc[gpio];
251 258
252 if (gpio_desc[gpio].config & MFP_LPM_CAN_WAKEUP) 259 /* skip if configured as generic GPIO */
260 if (MFP_AF(d->config) == 0)
261 continue;
262
263 if (d->config & MFP_LPM_CAN_WAKEUP)
253 mask |= gpio_desc[gpio].mask; 264 mask |= gpio_desc[gpio].mask;
254 } 265 }
255 266
256 PKWR = mask; 267 if (on)
268 PKWR |= mask;
269 else
270 PKWR &= ~mask;
257 return 0; 271 return 0;
258} 272}
259 273
@@ -328,6 +342,17 @@ static int pxa2xx_mfp_suspend(struct sys_device *d, pm_message_t state)
328{ 342{
329 int i; 343 int i;
330 344
345 /* set corresponding PGSR bit of those marked MFP_LPM_KEEP_OUTPUT */
346 for (i = 0; i < pxa_last_gpio; i++) {
347 if ((gpio_desc[i].config & MFP_LPM_KEEP_OUTPUT) &&
348 (GPDR(i) & GPIO_bit(i))) {
349 if (GPLR(i) & GPIO_bit(i))
350 PGSR(i) |= GPIO_bit(i);
351 else
352 PGSR(i) &= ~GPIO_bit(i);
353 }
354 }
355
331 for (i = 0; i <= gpio_to_bank(pxa_last_gpio); i++) { 356 for (i = 0; i <= gpio_to_bank(pxa_last_gpio); i++) {
332 357
333 saved_gafr[0][i] = GAFR_L(i); 358 saved_gafr[0][i] = GAFR_L(i);
diff --git a/arch/arm/mach-pxa/mioa701.c b/arch/arm/mach-pxa/mioa701.c
index 843fcca76e26..d60db87dde08 100644
--- a/arch/arm/mach-pxa/mioa701.c
+++ b/arch/arm/mach-pxa/mioa701.c
@@ -38,6 +38,7 @@
38#include <linux/mtd/physmap.h> 38#include <linux/mtd/physmap.h>
39#include <linux/usb/gpio_vbus.h> 39#include <linux/usb/gpio_vbus.h>
40#include <linux/regulator/max1586.h> 40#include <linux/regulator/max1586.h>
41#include <linux/slab.h>
41 42
42#include <asm/mach-types.h> 43#include <asm/mach-types.h>
43#include <asm/mach/arch.h> 44#include <asm/mach/arch.h>
@@ -425,6 +426,7 @@ struct gpio_vbus_mach_info gpio_vbus_data = {
425 * to give the card a chance to fully insert/eject. 426 * to give the card a chance to fully insert/eject.
426 */ 427 */
427static struct pxamci_platform_data mioa701_mci_info = { 428static struct pxamci_platform_data mioa701_mci_info = {
429 .detect_delay_ms = 250,
428 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, 430 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
429 .gpio_card_detect = GPIO15_SDIO_INSERT, 431 .gpio_card_detect = GPIO15_SDIO_INSERT,
430 .gpio_card_ro = GPIO78_SDIO_RO, 432 .gpio_card_ro = GPIO78_SDIO_RO,
@@ -790,7 +792,6 @@ static void __init mioa701_machine_init(void)
790 mio_gpio_request(ARRAY_AND_SIZE(global_gpios)); 792 mio_gpio_request(ARRAY_AND_SIZE(global_gpios));
791 bootstrap_init(); 793 bootstrap_init();
792 set_pxa_fb_info(&mioa701_pxafb_info); 794 set_pxa_fb_info(&mioa701_pxafb_info);
793 mioa701_mci_info.detect_delay = msecs_to_jiffies(250);
794 pxa_set_mci_info(&mioa701_mci_info); 795 pxa_set_mci_info(&mioa701_mci_info);
795 pxa_set_keypad_info(&mioa701_keypad_info); 796 pxa_set_keypad_info(&mioa701_keypad_info);
796 wm97xx_bat_set_pdata(&mioa701_battery_data); 797 wm97xx_bat_set_pdata(&mioa701_battery_data);
diff --git a/arch/arm/mach-pxa/mxm8x10.c b/arch/arm/mach-pxa/mxm8x10.c
index 8c9c6f0d56bb..462167ac05f9 100644
--- a/arch/arm/mach-pxa/mxm8x10.c
+++ b/arch/arm/mach-pxa/mxm8x10.c
@@ -325,7 +325,7 @@ static mfp_cfg_t mfp_cfg[] __initdata = {
325#if defined(CONFIG_MMC) 325#if defined(CONFIG_MMC)
326static struct pxamci_platform_data mxm_8x10_mci_platform_data = { 326static struct pxamci_platform_data mxm_8x10_mci_platform_data = {
327 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, 327 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
328 .detect_delay = 1, 328 .detect_delay_ms = 10,
329 .gpio_card_detect = MXM_8X10_SD_nCD, 329 .gpio_card_detect = MXM_8X10_SD_nCD,
330 .gpio_card_ro = MXM_8X10_SD_WP, 330 .gpio_card_ro = MXM_8X10_SD_WP,
331 .gpio_power = -1 331 .gpio_power = -1
diff --git a/arch/arm/mach-pxa/palmld.c b/arch/arm/mach-pxa/palmld.c
index f70c75b38769..1963819dba98 100644
--- a/arch/arm/mach-pxa/palmld.c
+++ b/arch/arm/mach-pxa/palmld.c
@@ -168,7 +168,7 @@ static struct pxamci_platform_data palmld_mci_platform_data = {
168 .gpio_card_detect = GPIO_NR_PALMLD_SD_DETECT_N, 168 .gpio_card_detect = GPIO_NR_PALMLD_SD_DETECT_N,
169 .gpio_card_ro = GPIO_NR_PALMLD_SD_READONLY, 169 .gpio_card_ro = GPIO_NR_PALMLD_SD_READONLY,
170 .gpio_power = GPIO_NR_PALMLD_SD_POWER, 170 .gpio_power = GPIO_NR_PALMLD_SD_POWER,
171 .detect_delay = 20, 171 .detect_delay_ms = 200,
172}; 172};
173 173
174/****************************************************************************** 174/******************************************************************************
diff --git a/arch/arm/mach-pxa/palmt5.c b/arch/arm/mach-pxa/palmt5.c
index d902a813aae3..5305a3993e69 100644
--- a/arch/arm/mach-pxa/palmt5.c
+++ b/arch/arm/mach-pxa/palmt5.c
@@ -110,7 +110,7 @@ static struct pxamci_platform_data palmt5_mci_platform_data = {
110 .gpio_card_detect = GPIO_NR_PALMT5_SD_DETECT_N, 110 .gpio_card_detect = GPIO_NR_PALMT5_SD_DETECT_N,
111 .gpio_card_ro = GPIO_NR_PALMT5_SD_READONLY, 111 .gpio_card_ro = GPIO_NR_PALMT5_SD_READONLY,
112 .gpio_power = GPIO_NR_PALMT5_SD_POWER, 112 .gpio_power = GPIO_NR_PALMT5_SD_POWER,
113 .detect_delay = 20, 113 .detect_delay_ms = 200,
114}; 114};
115 115
116/****************************************************************************** 116/******************************************************************************
diff --git a/arch/arm/mach-pxa/palmtc.c b/arch/arm/mach-pxa/palmtc.c
index 717d7a638675..033b567e50bb 100644
--- a/arch/arm/mach-pxa/palmtc.c
+++ b/arch/arm/mach-pxa/palmtc.c
@@ -121,7 +121,7 @@ static struct pxamci_platform_data palmtc_mci_platform_data = {
121 .gpio_power = GPIO_NR_PALMTC_SD_POWER, 121 .gpio_power = GPIO_NR_PALMTC_SD_POWER,
122 .gpio_card_ro = GPIO_NR_PALMTC_SD_READONLY, 122 .gpio_card_ro = GPIO_NR_PALMTC_SD_READONLY,
123 .gpio_card_detect = GPIO_NR_PALMTC_SD_DETECT_N, 123 .gpio_card_detect = GPIO_NR_PALMTC_SD_DETECT_N,
124 .detect_delay = 20, 124 .detect_delay_ms = 200,
125}; 125};
126 126
127/****************************************************************************** 127/******************************************************************************
diff --git a/arch/arm/mach-pxa/palmtx.c b/arch/arm/mach-pxa/palmtx.c
index 007b58c11f8d..ecc1a401598e 100644
--- a/arch/arm/mach-pxa/palmtx.c
+++ b/arch/arm/mach-pxa/palmtx.c
@@ -170,7 +170,7 @@ static struct pxamci_platform_data palmtx_mci_platform_data = {
170 .gpio_card_detect = GPIO_NR_PALMTX_SD_DETECT_N, 170 .gpio_card_detect = GPIO_NR_PALMTX_SD_DETECT_N,
171 .gpio_card_ro = GPIO_NR_PALMTX_SD_READONLY, 171 .gpio_card_ro = GPIO_NR_PALMTX_SD_READONLY,
172 .gpio_power = GPIO_NR_PALMTX_SD_POWER, 172 .gpio_power = GPIO_NR_PALMTX_SD_POWER,
173 .detect_delay = 20, 173 .detect_delay_ms = 200,
174}; 174};
175 175
176/****************************************************************************** 176/******************************************************************************
diff --git a/arch/arm/mach-pxa/pcm990-baseboard.c b/arch/arm/mach-pxa/pcm990-baseboard.c
index 9d0ecea1760c..f56ae1008759 100644
--- a/arch/arm/mach-pxa/pcm990-baseboard.c
+++ b/arch/arm/mach-pxa/pcm990-baseboard.c
@@ -326,7 +326,7 @@ static void pcm990_mci_exit(struct device *dev, void *data)
326#define MSECS_PER_JIFFY (1000/HZ) 326#define MSECS_PER_JIFFY (1000/HZ)
327 327
328static struct pxamci_platform_data pcm990_mci_platform_data = { 328static struct pxamci_platform_data pcm990_mci_platform_data = {
329 .detect_delay = 250 / MSECS_PER_JIFFY, 329 .detect_delay_ms = 250,
330 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, 330 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
331 .init = pcm990_mci_init, 331 .init = pcm990_mci_init,
332 .setpower = pcm990_mci_setpower, 332 .setpower = pcm990_mci_setpower,
diff --git a/arch/arm/mach-pxa/pm.c b/arch/arm/mach-pxa/pm.c
index 7693355ee637..166c15f62916 100644
--- a/arch/arm/mach-pxa/pm.c
+++ b/arch/arm/mach-pxa/pm.c
@@ -14,6 +14,7 @@
14#include <linux/module.h> 14#include <linux/module.h>
15#include <linux/suspend.h> 15#include <linux/suspend.h>
16#include <linux/errno.h> 16#include <linux/errno.h>
17#include <linux/slab.h>
17 18
18#include <mach/pm.h> 19#include <mach/pm.h>
19 20
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c
index d58a52415d75..f4abdaafdac4 100644
--- a/arch/arm/mach-pxa/poodle.c
+++ b/arch/arm/mach-pxa/poodle.c
@@ -40,13 +40,12 @@
40#include <mach/pxa25x.h> 40#include <mach/pxa25x.h>
41#include <mach/mmc.h> 41#include <mach/mmc.h>
42#include <mach/udc.h> 42#include <mach/udc.h>
43#include <plat/i2c.h>
44#include <mach/irda.h> 43#include <mach/irda.h>
45#include <mach/poodle.h> 44#include <mach/poodle.h>
46#include <mach/pxafb.h> 45#include <mach/pxafb.h>
47#include <mach/sharpsl.h> 46#include <mach/sharpsl.h>
48#include <mach/ssp.h>
49#include <mach/pxa2xx_spi.h> 47#include <mach/pxa2xx_spi.h>
48#include <plat/i2c.h>
50 49
51#include <asm/hardware/scoop.h> 50#include <asm/hardware/scoop.h>
52#include <asm/hardware/locomo.h> 51#include <asm/hardware/locomo.h>
@@ -277,6 +276,7 @@ static void poodle_mci_exit(struct device *dev, void *data)
277} 276}
278 277
279static struct pxamci_platform_data poodle_mci_platform_data = { 278static struct pxamci_platform_data poodle_mci_platform_data = {
279 .detect_delay_ms = 250,
280 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, 280 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
281 .init = poodle_mci_init, 281 .init = poodle_mci_init,
282 .setpower = poodle_mci_setpower, 282 .setpower = poodle_mci_setpower,
@@ -450,7 +450,6 @@ static void __init poodle_init(void)
450 set_pxa_fb_parent(&poodle_locomo_device.dev); 450 set_pxa_fb_parent(&poodle_locomo_device.dev);
451 set_pxa_fb_info(&poodle_fb_info); 451 set_pxa_fb_info(&poodle_fb_info);
452 pxa_set_udc_info(&udc_info); 452 pxa_set_udc_info(&udc_info);
453 poodle_mci_platform_data.detect_delay = msecs_to_jiffies(250);
454 pxa_set_mci_info(&poodle_mci_platform_data); 453 pxa_set_mci_info(&poodle_mci_platform_data);
455 pxa_set_ficp_info(&poodle_ficp_platform_data); 454 pxa_set_ficp_info(&poodle_ficp_platform_data);
456 pxa_set_i2c_info(NULL); 455 pxa_set_i2c_info(NULL);
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c
index 4d7c03e72504..f544e58e1536 100644
--- a/arch/arm/mach-pxa/pxa3xx.c
+++ b/arch/arm/mach-pxa/pxa3xx.c
@@ -29,7 +29,6 @@
29#include <mach/ohci.h> 29#include <mach/ohci.h>
30#include <mach/pm.h> 30#include <mach/pm.h>
31#include <mach/dma.h> 31#include <mach/dma.h>
32#include <mach/ssp.h>
33#include <mach/regs-intc.h> 32#include <mach/regs-intc.h>
34#include <plat/i2c.h> 33#include <plat/i2c.h>
35 34
diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c
index 3184bdc14526..d4b61b3f08f3 100644
--- a/arch/arm/mach-pxa/raumfeld.c
+++ b/arch/arm/mach-pxa/raumfeld.c
@@ -37,8 +37,6 @@
37#include <linux/lis3lv02d.h> 37#include <linux/lis3lv02d.h>
38#include <linux/pda_power.h> 38#include <linux/pda_power.h>
39#include <linux/power_supply.h> 39#include <linux/power_supply.h>
40#include <linux/pda_power.h>
41#include <linux/power_supply.h>
42#include <linux/regulator/max8660.h> 40#include <linux/regulator/max8660.h>
43#include <linux/regulator/machine.h> 41#include <linux/regulator/machine.h>
44#include <linux/regulator/fixed.h> 42#include <linux/regulator/fixed.h>
@@ -444,7 +442,7 @@ static struct gpio_keys_button gpio_keys_button[] = {
444 .active_low = 0, 442 .active_low = 0,
445 .wakeup = 0, 443 .wakeup = 0,
446 .debounce_interval = 5, /* ms */ 444 .debounce_interval = 5, /* ms */
447 .desc = "on/off button", 445 .desc = "on_off button",
448 }, 446 },
449}; 447};
450 448
@@ -716,7 +714,7 @@ static void raumfeld_mci_exit(struct device *dev, void *data)
716static struct pxamci_platform_data raumfeld_mci_platform_data = { 714static struct pxamci_platform_data raumfeld_mci_platform_data = {
717 .init = raumfeld_mci_init, 715 .init = raumfeld_mci_init,
718 .exit = raumfeld_mci_exit, 716 .exit = raumfeld_mci_exit,
719 .detect_delay = 20, 717 .detect_delay_ms = 200,
720 .gpio_card_detect = -1, 718 .gpio_card_detect = -1,
721 .gpio_card_ro = -1, 719 .gpio_card_ro = -1,
722 .gpio_power = -1, 720 .gpio_power = -1,
@@ -985,7 +983,7 @@ static void __init raumfeld_common_init(void)
985 int i; 983 int i;
986 984
987 for (i = 0; i < ARRAY_SIZE(gpio_keys_button); i++) 985 for (i = 0; i < ARRAY_SIZE(gpio_keys_button); i++)
988 if (!strcmp(gpio_keys_button[i].desc, "on/off button")) 986 if (!strcmp(gpio_keys_button[i].desc, "on_off button"))
989 gpio_keys_button[i].active_low = 1; 987 gpio_keys_button[i].active_low = 1;
990 } 988 }
991 989
@@ -1011,8 +1009,7 @@ static void __init raumfeld_common_init(void)
1011 gpio_direction_output(GPIO_W2W_PDN, 0); 1009 gpio_direction_output(GPIO_W2W_PDN, 0);
1012 1010
1013 /* this can be used to switch off the device */ 1011 /* this can be used to switch off the device */
1014 ret = gpio_request(GPIO_SHUTDOWN_SUPPLY, 1012 ret = gpio_request(GPIO_SHUTDOWN_SUPPLY, "supply shutdown");
1015 "supply shutdown");
1016 if (ret < 0) 1013 if (ret < 0)
1017 pr_warning("Unable to request GPIO_SHUTDOWN_SUPPLY\n"); 1014 pr_warning("Unable to request GPIO_SHUTDOWN_SUPPLY\n");
1018 else 1015 else
diff --git a/arch/arm/mach-pxa/sharpsl.h b/arch/arm/mach-pxa/sharpsl.h
index 1439785d3979..0cc1203c5bef 100644
--- a/arch/arm/mach-pxa/sharpsl.h
+++ b/arch/arm/mach-pxa/sharpsl.h
@@ -10,29 +10,6 @@
10#include <mach/sharpsl_pm.h> 10#include <mach/sharpsl_pm.h>
11 11
12/* 12/*
13 * SharpSL SSP Driver
14 */
15struct corgissp_machinfo {
16 int port;
17 int cs_lcdcon;
18 int cs_ads7846;
19 int cs_max1111;
20 int clk_lcdcon;
21 int clk_ads7846;
22 int clk_max1111;
23};
24
25void corgi_ssp_set_machinfo(struct corgissp_machinfo *machinfo);
26
27
28/*
29 * SharpSL/Corgi LCD Driver
30 */
31void corgi_lcdtg_suspend(void);
32void corgi_lcdtg_hw_init(int mode);
33
34
35/*
36 * SharpSL Battery/PM Driver 13 * SharpSL Battery/PM Driver
37 */ 14 */
38#define READ_GPIO_BIT(x) (GPLR(x) & GPIO_bit(x)) 15#define READ_GPIO_BIT(x) (GPLR(x) & GPIO_bit(x))
diff --git a/arch/arm/mach-pxa/sharpsl_pm.c b/arch/arm/mach-pxa/sharpsl_pm.c
index 463d874bb867..cb4767251f3c 100644
--- a/arch/arm/mach-pxa/sharpsl_pm.c
+++ b/arch/arm/mach-pxa/sharpsl_pm.c
@@ -28,7 +28,6 @@
28#include <asm/mach-types.h> 28#include <asm/mach-types.h>
29#include <mach/pm.h> 29#include <mach/pm.h>
30#include <mach/pxa2xx-regs.h> 30#include <mach/pxa2xx-regs.h>
31#include <mach/pxa2xx-gpio.h>
32#include <mach/regs-rtc.h> 31#include <mach/regs-rtc.h>
33#include <mach/sharpsl.h> 32#include <mach/sharpsl.h>
34#include <mach/sharpsl_pm.h> 33#include <mach/sharpsl_pm.h>
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
index 19b5109d9808..4d2413ed0ffa 100644
--- a/arch/arm/mach-pxa/spitz.c
+++ b/arch/arm/mach-pxa/spitz.c
@@ -86,6 +86,7 @@ static unsigned long spitz_pin_config[] __initdata = {
86 86
87 /* GPIOs */ 87 /* GPIOs */
88 GPIO9_GPIO, /* SPITZ_GPIO_nSD_DETECT */ 88 GPIO9_GPIO, /* SPITZ_GPIO_nSD_DETECT */
89 GPIO16_GPIO, /* SPITZ_GPIO_SYNC */
89 GPIO81_GPIO, /* SPITZ_GPIO_nSD_WP */ 90 GPIO81_GPIO, /* SPITZ_GPIO_nSD_WP */
90 GPIO41_GPIO, /* SPITZ_GPIO_USB_CONNECT */ 91 GPIO41_GPIO, /* SPITZ_GPIO_USB_CONNECT */
91 GPIO37_GPIO, /* SPITZ_GPIO_USB_HOST */ 92 GPIO37_GPIO, /* SPITZ_GPIO_USB_HOST */
@@ -119,7 +120,8 @@ static unsigned long spitz_pin_config[] __initdata = {
119 GPIO117_I2C_SCL, 120 GPIO117_I2C_SCL,
120 GPIO118_I2C_SDA, 121 GPIO118_I2C_SDA,
121 122
122 GPIO1_GPIO | WAKEUP_ON_EDGE_RISE, 123 GPIO0_GPIO | WAKEUP_ON_EDGE_RISE, /* SPITZ_GPIO_KEY_INT */
124 GPIO1_GPIO | WAKEUP_ON_EDGE_FALL, /* SPITZ_GPIO_RESET */
123}; 125};
124 126
125/* 127/*
@@ -363,7 +365,7 @@ static struct gpio_keys_button spitz_gpio_keys[] = {
363 .type = EV_PWR, 365 .type = EV_PWR,
364 .code = KEY_SUSPEND, 366 .code = KEY_SUSPEND,
365 .gpio = SPITZ_GPIO_ON_KEY, 367 .gpio = SPITZ_GPIO_ON_KEY,
366 .desc = "On/Off", 368 .desc = "On Off",
367 .wakeup = 1, 369 .wakeup = 1,
368 }, 370 },
369 /* Two buttons detecting the lid state */ 371 /* Two buttons detecting the lid state */
@@ -537,6 +539,7 @@ static void spitz_mci_setpower(struct device *dev, unsigned int vdd)
537} 539}
538 540
539static struct pxamci_platform_data spitz_mci_platform_data = { 541static struct pxamci_platform_data spitz_mci_platform_data = {
542 .detect_delay_ms = 250,
540 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, 543 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
541 .setpower = spitz_mci_setpower, 544 .setpower = spitz_mci_setpower,
542 .gpio_card_detect = SPITZ_GPIO_nSD_DETECT, 545 .gpio_card_detect = SPITZ_GPIO_nSD_DETECT,
@@ -757,7 +760,6 @@ static void __init common_init(void)
757 spitz_init_spi(); 760 spitz_init_spi();
758 761
759 platform_add_devices(devices, ARRAY_SIZE(devices)); 762 platform_add_devices(devices, ARRAY_SIZE(devices));
760 spitz_mci_platform_data.detect_delay = msecs_to_jiffies(250);
761 pxa_set_mci_info(&spitz_mci_platform_data); 763 pxa_set_mci_info(&spitz_mci_platform_data);
762 pxa_set_ohci_info(&spitz_ohci_platform_data); 764 pxa_set_ohci_info(&spitz_ohci_platform_data);
763 pxa_set_ficp_info(&spitz_ficp_platform_data); 765 pxa_set_ficp_info(&spitz_ficp_platform_data);
diff --git a/arch/arm/mach-pxa/spitz_pm.c b/arch/arm/mach-pxa/spitz_pm.c
index fc5a70c40358..4209ddf6da61 100644
--- a/arch/arm/mach-pxa/spitz_pm.c
+++ b/arch/arm/mach-pxa/spitz_pm.c
@@ -24,9 +24,10 @@
24 24
25#include <mach/sharpsl.h> 25#include <mach/sharpsl.h>
26#include <mach/spitz.h> 26#include <mach/spitz.h>
27#include <mach/pxa2xx-regs.h> 27#include <mach/pxa27x.h>
28#include <mach/pxa2xx-gpio.h> 28
29#include "sharpsl.h" 29#include "sharpsl.h"
30#include "generic.h"
30 31
31#define SHARPSL_CHARGE_ON_VOLT 0x99 /* 2.9V */ 32#define SHARPSL_CHARGE_ON_VOLT 0x99 /* 2.9V */
32#define SHARPSL_CHARGE_ON_TEMP 0xe0 /* 2.9V */ 33#define SHARPSL_CHARGE_ON_TEMP 0xe0 /* 2.9V */
@@ -37,10 +38,17 @@
37 38
38static int spitz_last_ac_status; 39static int spitz_last_ac_status;
39 40
41static struct gpio spitz_charger_gpios[] = {
42 { SPITZ_GPIO_KEY_INT, GPIOF_IN, "Keyboard Interrupt" },
43 { SPITZ_GPIO_SYNC, GPIOF_IN, "Sync" },
44 { SPITZ_GPIO_ADC_TEMP_ON, GPIOF_OUT_INIT_LOW, "ADC Temp On" },
45 { SPITZ_GPIO_JK_B, GPIOF_OUT_INIT_LOW, "JK B" },
46 { SPITZ_GPIO_CHRG_ON, GPIOF_OUT_INIT_LOW, "Charger On" },
47};
48
40static void spitz_charger_init(void) 49static void spitz_charger_init(void)
41{ 50{
42 pxa_gpio_mode(SPITZ_GPIO_KEY_INT | GPIO_IN); 51 gpio_request_array(ARRAY_AND_SIZE(spitz_charger_gpios));
43 pxa_gpio_mode(SPITZ_GPIO_SYNC | GPIO_IN);
44} 52}
45 53
46static void spitz_measure_temp(int on) 54static void spitz_measure_temp(int on)
@@ -76,6 +84,11 @@ static void spitz_discharge1(int on)
76 gpio_set_value(SPITZ_GPIO_LED_GREEN, on); 84 gpio_set_value(SPITZ_GPIO_LED_GREEN, on);
77} 85}
78 86
87static unsigned long gpio18_config[] = {
88 GPIO18_RDY,
89 GPIO18_GPIO,
90};
91
79static void spitz_presuspend(void) 92static void spitz_presuspend(void)
80{ 93{
81 spitz_last_ac_status = sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_ACIN); 94 spitz_last_ac_status = sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_ACIN);
@@ -97,7 +110,9 @@ static void spitz_presuspend(void)
97 PGSR3 &= ~SPITZ_GPIO_G3_STROBE_BIT; 110 PGSR3 &= ~SPITZ_GPIO_G3_STROBE_BIT;
98 PGSR2 |= GPIO_bit(SPITZ_GPIO_KEY_STROBE0); 111 PGSR2 |= GPIO_bit(SPITZ_GPIO_KEY_STROBE0);
99 112
100 pxa_gpio_mode(GPIO18_RDY|GPIO_OUT | GPIO_DFLT_HIGH); 113 pxa2xx_mfp_config(&gpio18_config[0], 1);
114 gpio_request_one(18, GPIOF_OUT_INIT_HIGH, "Unknown");
115 gpio_free(18);
101 116
102 PRER = GPIO_bit(SPITZ_GPIO_KEY_INT); 117 PRER = GPIO_bit(SPITZ_GPIO_KEY_INT);
103 PFER = GPIO_bit(SPITZ_GPIO_KEY_INT) | GPIO_bit(SPITZ_GPIO_RESET); 118 PFER = GPIO_bit(SPITZ_GPIO_KEY_INT) | GPIO_bit(SPITZ_GPIO_RESET);
@@ -114,8 +129,7 @@ static void spitz_presuspend(void)
114 129
115static void spitz_postsuspend(void) 130static void spitz_postsuspend(void)
116{ 131{
117 pxa_gpio_mode(GPIO18_RDY_MD); 132 pxa2xx_mfp_config(&gpio18_config[1], 1);
118 pxa_gpio_mode(10 | GPIO_IN);
119} 133}
120 134
121static int spitz_should_wakeup(unsigned int resume_on_alarm) 135static int spitz_should_wakeup(unsigned int resume_on_alarm)
diff --git a/arch/arm/mach-pxa/ssp.c b/arch/arm/mach-pxa/ssp.c
deleted file mode 100644
index a81d6dbf662d..000000000000
--- a/arch/arm/mach-pxa/ssp.c
+++ /dev/null
@@ -1,510 +0,0 @@
1/*
2 * linux/arch/arm/mach-pxa/ssp.c
3 *
4 * based on linux/arch/arm/mach-sa1100/ssp.c by Russell King
5 *
6 * Copyright (C) 2003 Russell King.
7 * Copyright (C) 2003 Wolfson Microelectronics PLC
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 * PXA2xx SSP driver. This provides the generic core for simple
14 * IO-based SSP applications and allows easy port setup for DMA access.
15 *
16 * Author: Liam Girdwood <liam.girdwood@wolfsonmicro.com>
17 */
18
19#include <linux/module.h>
20#include <linux/kernel.h>
21#include <linux/sched.h>
22#include <linux/slab.h>
23#include <linux/errno.h>
24#include <linux/interrupt.h>
25#include <linux/ioport.h>
26#include <linux/init.h>
27#include <linux/mutex.h>
28#include <linux/clk.h>
29#include <linux/err.h>
30#include <linux/platform_device.h>
31#include <linux/io.h>
32
33#include <asm/irq.h>
34#include <mach/hardware.h>
35#include <mach/ssp.h>
36#include <mach/regs-ssp.h>
37
38#ifdef CONFIG_PXA_SSP_LEGACY
39
40#define TIMEOUT 100000
41
42static irqreturn_t ssp_interrupt(int irq, void *dev_id)
43{
44 struct ssp_dev *dev = dev_id;
45 struct ssp_device *ssp = dev->ssp;
46 unsigned int status;
47
48 status = __raw_readl(ssp->mmio_base + SSSR);
49 __raw_writel(status, ssp->mmio_base + SSSR);
50
51 if (status & SSSR_ROR)
52 printk(KERN_WARNING "SSP(%d): receiver overrun\n", dev->port);
53
54 if (status & SSSR_TUR)
55 printk(KERN_WARNING "SSP(%d): transmitter underrun\n", dev->port);
56
57 if (status & SSSR_BCE)
58 printk(KERN_WARNING "SSP(%d): bit count error\n", dev->port);
59
60 return IRQ_HANDLED;
61}
62
63/**
64 * ssp_write_word - write a word to the SSP port
65 * @data: 32-bit, MSB justified data to write.
66 *
67 * Wait for a free entry in the SSP transmit FIFO, and write a data
68 * word to the SSP port.
69 *
70 * The caller is expected to perform the necessary locking.
71 *
72 * Returns:
73 * %-ETIMEDOUT timeout occurred
74 * 0 success
75 */
76int ssp_write_word(struct ssp_dev *dev, u32 data)
77{
78 struct ssp_device *ssp = dev->ssp;
79 int timeout = TIMEOUT;
80
81 while (!(__raw_readl(ssp->mmio_base + SSSR) & SSSR_TNF)) {
82 if (!--timeout)
83 return -ETIMEDOUT;
84 cpu_relax();
85 }
86
87 __raw_writel(data, ssp->mmio_base + SSDR);
88
89 return 0;
90}
91
92/**
93 * ssp_read_word - read a word from the SSP port
94 *
95 * Wait for a data word in the SSP receive FIFO, and return the
96 * received data. Data is LSB justified.
97 *
98 * Note: Currently, if data is not expected to be received, this
99 * function will wait for ever.
100 *
101 * The caller is expected to perform the necessary locking.
102 *
103 * Returns:
104 * %-ETIMEDOUT timeout occurred
105 * 32-bit data success
106 */
107int ssp_read_word(struct ssp_dev *dev, u32 *data)
108{
109 struct ssp_device *ssp = dev->ssp;
110 int timeout = TIMEOUT;
111
112 while (!(__raw_readl(ssp->mmio_base + SSSR) & SSSR_RNE)) {
113 if (!--timeout)
114 return -ETIMEDOUT;
115 cpu_relax();
116 }
117
118 *data = __raw_readl(ssp->mmio_base + SSDR);
119 return 0;
120}
121
122/**
123 * ssp_flush - flush the transmit and receive FIFOs
124 *
125 * Wait for the SSP to idle, and ensure that the receive FIFO
126 * is empty.
127 *
128 * The caller is expected to perform the necessary locking.
129 */
130int ssp_flush(struct ssp_dev *dev)
131{
132 struct ssp_device *ssp = dev->ssp;
133 int timeout = TIMEOUT * 2;
134
135 /* ensure TX FIFO is empty instead of not full */
136 if (cpu_is_pxa3xx()) {
137 while (__raw_readl(ssp->mmio_base + SSSR) & 0xf00) {
138 if (!--timeout)
139 return -ETIMEDOUT;
140 cpu_relax();
141 }
142 timeout = TIMEOUT * 2;
143 }
144
145 do {
146 while (__raw_readl(ssp->mmio_base + SSSR) & SSSR_RNE) {
147 if (!--timeout)
148 return -ETIMEDOUT;
149 (void)__raw_readl(ssp->mmio_base + SSDR);
150 }
151 if (!--timeout)
152 return -ETIMEDOUT;
153 } while (__raw_readl(ssp->mmio_base + SSSR) & SSSR_BSY);
154
155 return 0;
156}
157
158/**
159 * ssp_enable - enable the SSP port
160 *
161 * Turn on the SSP port.
162 */
163void ssp_enable(struct ssp_dev *dev)
164{
165 struct ssp_device *ssp = dev->ssp;
166 uint32_t sscr0;
167
168 sscr0 = __raw_readl(ssp->mmio_base + SSCR0);
169 sscr0 |= SSCR0_SSE;
170 __raw_writel(sscr0, ssp->mmio_base + SSCR0);
171}
172
173/**
174 * ssp_disable - shut down the SSP port
175 *
176 * Turn off the SSP port, optionally powering it down.
177 */
178void ssp_disable(struct ssp_dev *dev)
179{
180 struct ssp_device *ssp = dev->ssp;
181 uint32_t sscr0;
182
183 sscr0 = __raw_readl(ssp->mmio_base + SSCR0);
184 sscr0 &= ~SSCR0_SSE;
185 __raw_writel(sscr0, ssp->mmio_base + SSCR0);
186}
187
188/**
189 * ssp_save_state - save the SSP configuration
190 * @ssp: pointer to structure to save SSP configuration
191 *
192 * Save the configured SSP state for suspend.
193 */
194void ssp_save_state(struct ssp_dev *dev, struct ssp_state *state)
195{
196 struct ssp_device *ssp = dev->ssp;
197
198 state->cr0 = __raw_readl(ssp->mmio_base + SSCR0);
199 state->cr1 = __raw_readl(ssp->mmio_base + SSCR1);
200 state->to = __raw_readl(ssp->mmio_base + SSTO);
201 state->psp = __raw_readl(ssp->mmio_base + SSPSP);
202
203 ssp_disable(dev);
204}
205
206/**
207 * ssp_restore_state - restore a previously saved SSP configuration
208 * @ssp: pointer to configuration saved by ssp_save_state
209 *
210 * Restore the SSP configuration saved previously by ssp_save_state.
211 */
212void ssp_restore_state(struct ssp_dev *dev, struct ssp_state *state)
213{
214 struct ssp_device *ssp = dev->ssp;
215 uint32_t sssr = SSSR_ROR | SSSR_TUR | SSSR_BCE;
216
217 __raw_writel(sssr, ssp->mmio_base + SSSR);
218
219 __raw_writel(state->cr0 & ~SSCR0_SSE, ssp->mmio_base + SSCR0);
220 __raw_writel(state->cr1, ssp->mmio_base + SSCR1);
221 __raw_writel(state->to, ssp->mmio_base + SSTO);
222 __raw_writel(state->psp, ssp->mmio_base + SSPSP);
223 __raw_writel(state->cr0, ssp->mmio_base + SSCR0);
224}
225
226/**
227 * ssp_config - configure SSP port settings
228 * @mode: port operating mode
229 * @flags: port config flags
230 * @psp_flags: port PSP config flags
231 * @speed: port speed
232 *
233 * Port MUST be disabled by ssp_disable before making any config changes.
234 */
235int ssp_config(struct ssp_dev *dev, u32 mode, u32 flags, u32 psp_flags, u32 speed)
236{
237 struct ssp_device *ssp = dev->ssp;
238
239 dev->mode = mode;
240 dev->flags = flags;
241 dev->psp_flags = psp_flags;
242 dev->speed = speed;
243
244 /* set up port type, speed, port settings */
245 __raw_writel((dev->speed | dev->mode), ssp->mmio_base + SSCR0);
246 __raw_writel(dev->flags, ssp->mmio_base + SSCR1);
247 __raw_writel(dev->psp_flags, ssp->mmio_base + SSPSP);
248
249 return 0;
250}
251
252/**
253 * ssp_init - setup the SSP port
254 *
255 * initialise and claim resources for the SSP port.
256 *
257 * Returns:
258 * %-ENODEV if the SSP port is unavailable
259 * %-EBUSY if the resources are already in use
260 * %0 on success
261 */
262int ssp_init(struct ssp_dev *dev, u32 port, u32 init_flags)
263{
264 struct ssp_device *ssp;
265 int ret;
266
267 ssp = ssp_request(port, "SSP");
268 if (ssp == NULL)
269 return -ENODEV;
270
271 dev->ssp = ssp;
272 dev->port = port;
273
274 /* do we need to get irq */
275 if (!(init_flags & SSP_NO_IRQ)) {
276 ret = request_irq(ssp->irq, ssp_interrupt,
277 0, "SSP", dev);
278 if (ret)
279 goto out_region;
280 dev->irq = ssp->irq;
281 } else
282 dev->irq = NO_IRQ;
283
284 /* turn on SSP port clock */
285 clk_enable(ssp->clk);
286 return 0;
287
288out_region:
289 ssp_free(ssp);
290 return ret;
291}
292
293/**
294 * ssp_exit - undo the effects of ssp_init
295 *
296 * release and free resources for the SSP port.
297 */
298void ssp_exit(struct ssp_dev *dev)
299{
300 struct ssp_device *ssp = dev->ssp;
301
302 ssp_disable(dev);
303 if (dev->irq != NO_IRQ)
304 free_irq(dev->irq, dev);
305 clk_disable(ssp->clk);
306 ssp_free(ssp);
307}
308#endif /* CONFIG_PXA_SSP_LEGACY */
309
310static DEFINE_MUTEX(ssp_lock);
311static LIST_HEAD(ssp_list);
312
313struct ssp_device *ssp_request(int port, const char *label)
314{
315 struct ssp_device *ssp = NULL;
316
317 mutex_lock(&ssp_lock);
318
319 list_for_each_entry(ssp, &ssp_list, node) {
320 if (ssp->port_id == port && ssp->use_count == 0) {
321 ssp->use_count++;
322 ssp->label = label;
323 break;
324 }
325 }
326
327 mutex_unlock(&ssp_lock);
328
329 if (&ssp->node == &ssp_list)
330 return NULL;
331
332 return ssp;
333}
334EXPORT_SYMBOL(ssp_request);
335
336void ssp_free(struct ssp_device *ssp)
337{
338 mutex_lock(&ssp_lock);
339 if (ssp->use_count) {
340 ssp->use_count--;
341 ssp->label = NULL;
342 } else
343 dev_err(&ssp->pdev->dev, "device already free\n");
344 mutex_unlock(&ssp_lock);
345}
346EXPORT_SYMBOL(ssp_free);
347
348static int __devinit ssp_probe(struct platform_device *pdev)
349{
350 const struct platform_device_id *id = platform_get_device_id(pdev);
351 struct resource *res;
352 struct ssp_device *ssp;
353 int ret = 0;
354
355 ssp = kzalloc(sizeof(struct ssp_device), GFP_KERNEL);
356 if (ssp == NULL) {
357 dev_err(&pdev->dev, "failed to allocate memory");
358 return -ENOMEM;
359 }
360 ssp->pdev = pdev;
361
362 ssp->clk = clk_get(&pdev->dev, NULL);
363 if (IS_ERR(ssp->clk)) {
364 ret = PTR_ERR(ssp->clk);
365 goto err_free;
366 }
367
368 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
369 if (res == NULL) {
370 dev_err(&pdev->dev, "no memory resource defined\n");
371 ret = -ENODEV;
372 goto err_free_clk;
373 }
374
375 res = request_mem_region(res->start, res->end - res->start + 1,
376 pdev->name);
377 if (res == NULL) {
378 dev_err(&pdev->dev, "failed to request memory resource\n");
379 ret = -EBUSY;
380 goto err_free_clk;
381 }
382
383 ssp->phys_base = res->start;
384
385 ssp->mmio_base = ioremap(res->start, res->end - res->start + 1);
386 if (ssp->mmio_base == NULL) {
387 dev_err(&pdev->dev, "failed to ioremap() registers\n");
388 ret = -ENODEV;
389 goto err_free_mem;
390 }
391
392 ssp->irq = platform_get_irq(pdev, 0);
393 if (ssp->irq < 0) {
394 dev_err(&pdev->dev, "no IRQ resource defined\n");
395 ret = -ENODEV;
396 goto err_free_io;
397 }
398
399 res = platform_get_resource(pdev, IORESOURCE_DMA, 0);
400 if (res == NULL) {
401 dev_err(&pdev->dev, "no SSP RX DRCMR defined\n");
402 ret = -ENODEV;
403 goto err_free_io;
404 }
405 ssp->drcmr_rx = res->start;
406
407 res = platform_get_resource(pdev, IORESOURCE_DMA, 1);
408 if (res == NULL) {
409 dev_err(&pdev->dev, "no SSP TX DRCMR defined\n");
410 ret = -ENODEV;
411 goto err_free_io;
412 }
413 ssp->drcmr_tx = res->start;
414
415 /* PXA2xx/3xx SSP ports starts from 1 and the internal pdev->id
416 * starts from 0, do a translation here
417 */
418 ssp->port_id = pdev->id + 1;
419 ssp->use_count = 0;
420 ssp->type = (int)id->driver_data;
421
422 mutex_lock(&ssp_lock);
423 list_add(&ssp->node, &ssp_list);
424 mutex_unlock(&ssp_lock);
425
426 platform_set_drvdata(pdev, ssp);
427 return 0;
428
429err_free_io:
430 iounmap(ssp->mmio_base);
431err_free_mem:
432 release_mem_region(res->start, res->end - res->start + 1);
433err_free_clk:
434 clk_put(ssp->clk);
435err_free:
436 kfree(ssp);
437 return ret;
438}
439
440static int __devexit ssp_remove(struct platform_device *pdev)
441{
442 struct resource *res;
443 struct ssp_device *ssp;
444
445 ssp = platform_get_drvdata(pdev);
446 if (ssp == NULL)
447 return -ENODEV;
448
449 iounmap(ssp->mmio_base);
450
451 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
452 release_mem_region(res->start, res->end - res->start + 1);
453
454 clk_put(ssp->clk);
455
456 mutex_lock(&ssp_lock);
457 list_del(&ssp->node);
458 mutex_unlock(&ssp_lock);
459
460 kfree(ssp);
461 return 0;
462}
463
464static const struct platform_device_id ssp_id_table[] = {
465 { "pxa25x-ssp", PXA25x_SSP },
466 { "pxa25x-nssp", PXA25x_NSSP },
467 { "pxa27x-ssp", PXA27x_SSP },
468 { },
469};
470
471static struct platform_driver ssp_driver = {
472 .probe = ssp_probe,
473 .remove = __devexit_p(ssp_remove),
474 .driver = {
475 .owner = THIS_MODULE,
476 .name = "pxa2xx-ssp",
477 },
478 .id_table = ssp_id_table,
479};
480
481static int __init pxa_ssp_init(void)
482{
483 return platform_driver_register(&ssp_driver);
484}
485
486static void __exit pxa_ssp_exit(void)
487{
488 platform_driver_unregister(&ssp_driver);
489}
490
491arch_initcall(pxa_ssp_init);
492module_exit(pxa_ssp_exit);
493
494#ifdef CONFIG_PXA_SSP_LEGACY
495EXPORT_SYMBOL(ssp_write_word);
496EXPORT_SYMBOL(ssp_read_word);
497EXPORT_SYMBOL(ssp_flush);
498EXPORT_SYMBOL(ssp_enable);
499EXPORT_SYMBOL(ssp_disable);
500EXPORT_SYMBOL(ssp_save_state);
501EXPORT_SYMBOL(ssp_restore_state);
502EXPORT_SYMBOL(ssp_init);
503EXPORT_SYMBOL(ssp_exit);
504EXPORT_SYMBOL(ssp_config);
505#endif
506
507MODULE_DESCRIPTION("PXA SSP driver");
508MODULE_AUTHOR("Liam Girdwood");
509MODULE_LICENSE("GPL");
510
diff --git a/arch/arm/mach-pxa/stargate2.c b/arch/arm/mach-pxa/stargate2.c
index a98a434f0111..af40d2a12d37 100644
--- a/arch/arm/mach-pxa/stargate2.c
+++ b/arch/arm/mach-pxa/stargate2.c
@@ -464,8 +464,6 @@ static struct platform_device smc91x_device = {
464 464
465 465
466 466
467static struct pxamci_platform_data stargate2_mci_platform_data;
468
469/* 467/*
470 * The card detect interrupt isn't debounced so we delay it by 250ms 468 * The card detect interrupt isn't debounced so we delay it by 250ms
471 * to give the card a chance to fully insert / eject. 469 * to give the card a chance to fully insert / eject.
@@ -489,8 +487,6 @@ static int stargate2_mci_init(struct device *dev,
489 goto free_power_en; 487 goto free_power_en;
490 } 488 }
491 gpio_direction_input(SG2_GPIO_nSD_DETECT); 489 gpio_direction_input(SG2_GPIO_nSD_DETECT);
492 /* Delay to allow for full insertion */
493 stargate2_mci_platform_data.detect_delay = msecs_to_jiffies(250);
494 490
495 err = request_irq(IRQ_GPIO(SG2_GPIO_nSD_DETECT), 491 err = request_irq(IRQ_GPIO(SG2_GPIO_nSD_DETECT),
496 stargate2_detect_int, 492 stargate2_detect_int,
@@ -529,6 +525,7 @@ static void stargate2_mci_exit(struct device *dev, void *data)
529} 525}
530 526
531static struct pxamci_platform_data stargate2_mci_platform_data = { 527static struct pxamci_platform_data stargate2_mci_platform_data = {
528 .detect_delay_ms = 250,
532 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, 529 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
533 .init = stargate2_mci_init, 530 .init = stargate2_mci_init,
534 .setpower = stargate2_mci_setpower, 531 .setpower = stargate2_mci_setpower,
@@ -764,11 +761,6 @@ static void __init stargate2_init(void)
764 pxa_set_btuart_info(NULL); 761 pxa_set_btuart_info(NULL);
765 pxa_set_stuart_info(NULL); 762 pxa_set_stuart_info(NULL);
766 763
767 /* spi chip selects */
768 gpio_direction_output(37, 0);
769 gpio_direction_output(24, 0);
770 gpio_direction_output(39, 0);
771
772 platform_add_devices(ARRAY_AND_SIZE(stargate2_devices)); 764 platform_add_devices(ARRAY_AND_SIZE(stargate2_devices));
773 765
774 pxa2xx_set_spi_info(1, &pxa_ssp_master_0_info); 766 pxa2xx_set_spi_info(1, &pxa_ssp_master_0_info);
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c
index ad552791c4ce..7512b822c6ca 100644
--- a/arch/arm/mach-pxa/tosa.c
+++ b/arch/arm/mach-pxa/tosa.c
@@ -275,6 +275,7 @@ static void tosa_mci_exit(struct device *dev, void *data)
275} 275}
276 276
277static struct pxamci_platform_data tosa_mci_platform_data = { 277static struct pxamci_platform_data tosa_mci_platform_data = {
278 .detect_delay_ms = 250,
278 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, 279 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
279 .init = tosa_mci_init, 280 .init = tosa_mci_init,
280 .exit = tosa_mci_exit, 281 .exit = tosa_mci_exit,
@@ -926,7 +927,6 @@ static void __init tosa_init(void)
926 dummy = gpiochip_reserve(TOSA_SCOOP_JC_GPIO_BASE, 12); 927 dummy = gpiochip_reserve(TOSA_SCOOP_JC_GPIO_BASE, 12);
927 dummy = gpiochip_reserve(TOSA_TC6393XB_GPIO_BASE, 16); 928 dummy = gpiochip_reserve(TOSA_TC6393XB_GPIO_BASE, 16);
928 929
929 tosa_mci_platform_data.detect_delay = msecs_to_jiffies(250);
930 pxa_set_mci_info(&tosa_mci_platform_data); 930 pxa_set_mci_info(&tosa_mci_platform_data);
931 pxa_set_udc_info(&udc_info); 931 pxa_set_udc_info(&udc_info);
932 pxa_set_ficp_info(&tosa_ficp_platform_data); 932 pxa_set_ficp_info(&tosa_ficp_platform_data);
diff --git a/arch/arm/mach-pxa/trizeps4.c b/arch/arm/mach-pxa/trizeps4.c
index 797f2544d0ce..69689112eae7 100644
--- a/arch/arm/mach-pxa/trizeps4.c
+++ b/arch/arm/mach-pxa/trizeps4.c
@@ -349,7 +349,7 @@ static void trizeps4_mci_exit(struct device *dev, void *data)
349 349
350static struct pxamci_platform_data trizeps4_mci_platform_data = { 350static struct pxamci_platform_data trizeps4_mci_platform_data = {
351 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, 351 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
352 .detect_delay = 1, 352 .detect_delay_ms= 10,
353 .init = trizeps4_mci_init, 353 .init = trizeps4_mci_init,
354 .exit = trizeps4_mci_exit, 354 .exit = trizeps4_mci_exit,
355 .get_ro = NULL, /* write-protection not supported */ 355 .get_ro = NULL, /* write-protection not supported */
diff --git a/arch/arm/mach-pxa/viper.c b/arch/arm/mach-pxa/viper.c
index 1dd13346f977..e90114a7e246 100644
--- a/arch/arm/mach-pxa/viper.c
+++ b/arch/arm/mach-pxa/viper.c
@@ -27,12 +27,14 @@
27#include <linux/delay.h> 27#include <linux/delay.h>
28#include <linux/fs.h> 28#include <linux/fs.h>
29#include <linux/init.h> 29#include <linux/init.h>
30#include <linux/slab.h>
30#include <linux/interrupt.h> 31#include <linux/interrupt.h>
31#include <linux/major.h> 32#include <linux/major.h>
32#include <linux/module.h> 33#include <linux/module.h>
33#include <linux/pm.h> 34#include <linux/pm.h>
34#include <linux/sched.h> 35#include <linux/sched.h>
35#include <linux/gpio.h> 36#include <linux/gpio.h>
37#include <linux/jiffies.h>
36#include <linux/i2c-gpio.h> 38#include <linux/i2c-gpio.h>
37#include <linux/serial_8250.h> 39#include <linux/serial_8250.h>
38#include <linux/smc91x.h> 40#include <linux/smc91x.h>
@@ -453,7 +455,7 @@ static struct i2c_gpio_platform_data i2c_bus_data = {
453 .sda_pin = VIPER_RTC_I2C_SDA_GPIO, 455 .sda_pin = VIPER_RTC_I2C_SDA_GPIO,
454 .scl_pin = VIPER_RTC_I2C_SCL_GPIO, 456 .scl_pin = VIPER_RTC_I2C_SCL_GPIO,
455 .udelay = 10, 457 .udelay = 10,
456 .timeout = 100, 458 .timeout = HZ,
457}; 459};
458 460
459static struct platform_device i2c_bus_device = { 461static struct platform_device i2c_bus_device = {
@@ -778,7 +780,7 @@ static void __init viper_tpm_init(void)
778 .sda_pin = VIPER_TPM_I2C_SDA_GPIO, 780 .sda_pin = VIPER_TPM_I2C_SDA_GPIO,
779 .scl_pin = VIPER_TPM_I2C_SCL_GPIO, 781 .scl_pin = VIPER_TPM_I2C_SCL_GPIO,
780 .udelay = 10, 782 .udelay = 10,
781 .timeout = 100, 783 .timeout = HZ,
782 }; 784 };
783 char *errstr; 785 char *errstr;
784 786
diff --git a/arch/arm/mach-pxa/vpac270.c b/arch/arm/mach-pxa/vpac270.c
new file mode 100644
index 000000000000..9884fa978f16
--- /dev/null
+++ b/arch/arm/mach-pxa/vpac270.c
@@ -0,0 +1,615 @@
1/*
2 * Hardware definitions for Voipac PXA270
3 *
4 * Copyright (C) 2010
5 * Marek Vasut <marek.vasut@gmail.com>
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
13#include <linux/platform_device.h>
14#include <linux/delay.h>
15#include <linux/irq.h>
16#include <linux/gpio_keys.h>
17#include <linux/input.h>
18#include <linux/gpio.h>
19#include <linux/sysdev.h>
20#include <linux/usb/gpio_vbus.h>
21#include <linux/mtd/mtd.h>
22#include <linux/mtd/partitions.h>
23#include <linux/mtd/physmap.h>
24#include <linux/mtd/onenand.h>
25#include <linux/dm9000.h>
26#include <linux/ucb1400.h>
27#include <linux/ata_platform.h>
28
29#include <asm/mach-types.h>
30#include <asm/mach/arch.h>
31
32#include <mach/pxa27x.h>
33#include <mach/audio.h>
34#include <mach/vpac270.h>
35#include <mach/mmc.h>
36#include <mach/pxafb.h>
37#include <mach/ohci.h>
38#include <mach/pxa27x-udc.h>
39#include <mach/udc.h>
40
41#include <plat/i2c.h>
42
43#include "generic.h"
44#include "devices.h"
45
46/******************************************************************************
47 * Pin configuration
48 ******************************************************************************/
49static unsigned long vpac270_pin_config[] __initdata = {
50 /* MMC */
51 GPIO32_MMC_CLK,
52 GPIO92_MMC_DAT_0,
53 GPIO109_MMC_DAT_1,
54 GPIO110_MMC_DAT_2,
55 GPIO111_MMC_DAT_3,
56 GPIO112_MMC_CMD,
57 GPIO53_GPIO, /* SD detect */
58 GPIO52_GPIO, /* SD r/o switch */
59
60 /* GPIO KEYS */
61 GPIO1_GPIO, /* USER BTN */
62
63 /* LEDs */
64 GPIO15_GPIO, /* orange led */
65
66 /* FFUART */
67 GPIO34_FFUART_RXD,
68 GPIO39_FFUART_TXD,
69 GPIO27_FFUART_RTS,
70 GPIO100_FFUART_CTS,
71 GPIO33_FFUART_DSR,
72 GPIO40_FFUART_DTR,
73 GPIO10_FFUART_DCD,
74 GPIO38_FFUART_RI,
75
76 /* LCD */
77 GPIO58_LCD_LDD_0,
78 GPIO59_LCD_LDD_1,
79 GPIO60_LCD_LDD_2,
80 GPIO61_LCD_LDD_3,
81 GPIO62_LCD_LDD_4,
82 GPIO63_LCD_LDD_5,
83 GPIO64_LCD_LDD_6,
84 GPIO65_LCD_LDD_7,
85 GPIO66_LCD_LDD_8,
86 GPIO67_LCD_LDD_9,
87 GPIO68_LCD_LDD_10,
88 GPIO69_LCD_LDD_11,
89 GPIO70_LCD_LDD_12,
90 GPIO71_LCD_LDD_13,
91 GPIO72_LCD_LDD_14,
92 GPIO73_LCD_LDD_15,
93 GPIO86_LCD_LDD_16,
94 GPIO87_LCD_LDD_17,
95 GPIO74_LCD_FCLK,
96 GPIO75_LCD_LCLK,
97 GPIO76_LCD_PCLK,
98 GPIO77_LCD_BIAS,
99
100 /* PCMCIA */
101 GPIO48_nPOE,
102 GPIO49_nPWE,
103 GPIO50_nPIOR,
104 GPIO51_nPIOW,
105 GPIO85_nPCE_1,
106 GPIO54_nPCE_2,
107 GPIO55_nPREG,
108 GPIO57_nIOIS16,
109 GPIO56_nPWAIT,
110 GPIO104_PSKTSEL,
111 GPIO84_GPIO, /* PCMCIA CD */
112 GPIO35_GPIO, /* PCMCIA RDY */
113 GPIO107_GPIO, /* PCMCIA PPEN */
114 GPIO11_GPIO, /* PCMCIA RESET */
115 GPIO17_GPIO, /* CF CD */
116 GPIO12_GPIO, /* CF RDY */
117 GPIO16_GPIO, /* CF RESET */
118
119 /* UHC */
120 GPIO88_USBH1_PWR,
121 GPIO89_USBH1_PEN,
122 GPIO119_USBH2_PWR,
123 GPIO120_USBH2_PEN,
124
125 /* UDC */
126 GPIO41_GPIO,
127
128 /* Ethernet */
129 GPIO114_GPIO, /* IRQ */
130
131 /* AC97 */
132 GPIO28_AC97_BITCLK,
133 GPIO29_AC97_SDATA_IN_0,
134 GPIO30_AC97_SDATA_OUT,
135 GPIO31_AC97_SYNC,
136 GPIO95_AC97_nRESET,
137 GPIO98_AC97_SYSCLK,
138 GPIO113_GPIO, /* TS IRQ */
139
140 /* I2C */
141 GPIO117_I2C_SCL,
142 GPIO118_I2C_SDA,
143
144 /* IDE */
145 GPIO36_GPIO, /* IDE IRQ */
146 GPIO80_DREQ_1,
147};
148
149/******************************************************************************
150 * NOR Flash
151 ******************************************************************************/
152#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
153static struct mtd_partition vpac270_nor_partitions[] = {
154 {
155 .name = "Flash",
156 .offset = 0x00000000,
157 .size = MTDPART_SIZ_FULL,
158 }
159};
160
161static struct physmap_flash_data vpac270_flash_data[] = {
162 {
163 .width = 2, /* bankwidth in bytes */
164 .parts = vpac270_nor_partitions,
165 .nr_parts = ARRAY_SIZE(vpac270_nor_partitions)
166 }
167};
168
169static struct resource vpac270_flash_resource = {
170 .start = PXA_CS0_PHYS,
171 .end = PXA_CS0_PHYS + SZ_64M - 1,
172 .flags = IORESOURCE_MEM,
173};
174
175static struct platform_device vpac270_flash = {
176 .name = "physmap-flash",
177 .id = 0,
178 .resource = &vpac270_flash_resource,
179 .num_resources = 1,
180 .dev = {
181 .platform_data = vpac270_flash_data,
182 },
183};
184static void __init vpac270_nor_init(void)
185{
186 platform_device_register(&vpac270_flash);
187}
188#else
189static inline void vpac270_nor_init(void) {}
190#endif
191
192/******************************************************************************
193 * OneNAND Flash
194 ******************************************************************************/
195#if defined(CONFIG_MTD_ONENAND) || defined(CONFIG_MTD_ONENAND_MODULE)
196static struct mtd_partition vpac270_onenand_partitions[] = {
197 {
198 .name = "Flash",
199 .offset = 0x00000000,
200 .size = MTDPART_SIZ_FULL,
201 }
202};
203
204static struct onenand_platform_data vpac270_onenand_info = {
205 .parts = vpac270_onenand_partitions,
206 .nr_parts = ARRAY_SIZE(vpac270_onenand_partitions),
207};
208
209static struct resource vpac270_onenand_resources[] = {
210 [0] = {
211 .start = PXA_CS0_PHYS,
212 .end = PXA_CS0_PHYS + SZ_1M,
213 .flags = IORESOURCE_MEM,
214 },
215};
216
217static struct platform_device vpac270_onenand = {
218 .name = "onenand-flash",
219 .id = -1,
220 .resource = vpac270_onenand_resources,
221 .num_resources = ARRAY_SIZE(vpac270_onenand_resources),
222 .dev = {
223 .platform_data = &vpac270_onenand_info,
224 },
225};
226
227static void __init vpac270_onenand_init(void)
228{
229 platform_device_register(&vpac270_onenand);
230}
231#else
232static void __init vpac270_onenand_init(void) {}
233#endif
234
235/******************************************************************************
236 * SD/MMC card controller
237 ******************************************************************************/
238#if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE)
239static struct pxamci_platform_data vpac270_mci_platform_data = {
240 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
241 .gpio_card_detect = GPIO53_VPAC270_SD_DETECT_N,
242 .gpio_card_ro = GPIO52_VPAC270_SD_READONLY,
243 .detect_delay_ms = 200,
244};
245
246static void __init vpac270_mmc_init(void)
247{
248 pxa_set_mci_info(&vpac270_mci_platform_data);
249}
250#else
251static inline void vpac270_mmc_init(void) {}
252#endif
253
254/******************************************************************************
255 * GPIO keys
256 ******************************************************************************/
257#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
258static struct gpio_keys_button vpac270_pxa_buttons[] = {
259 {KEY_POWER, GPIO1_VPAC270_USER_BTN, 0, "USER BTN"},
260};
261
262static struct gpio_keys_platform_data vpac270_pxa_keys_data = {
263 .buttons = vpac270_pxa_buttons,
264 .nbuttons = ARRAY_SIZE(vpac270_pxa_buttons),
265};
266
267static struct platform_device vpac270_pxa_keys = {
268 .name = "gpio-keys",
269 .id = -1,
270 .dev = {
271 .platform_data = &vpac270_pxa_keys_data,
272 },
273};
274
275static void __init vpac270_keys_init(void)
276{
277 platform_device_register(&vpac270_pxa_keys);
278}
279#else
280static inline void vpac270_keys_init(void) {}
281#endif
282
283/******************************************************************************
284 * LED
285 ******************************************************************************/
286#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
287struct gpio_led vpac270_gpio_leds[] = {
288{
289 .name = "vpac270:orange:user",
290 .default_trigger = "none",
291 .gpio = GPIO15_VPAC270_LED_ORANGE,
292 .active_low = 1,
293}
294};
295
296static struct gpio_led_platform_data vpac270_gpio_led_info = {
297 .leds = vpac270_gpio_leds,
298 .num_leds = ARRAY_SIZE(vpac270_gpio_leds),
299};
300
301static struct platform_device vpac270_leds = {
302 .name = "leds-gpio",
303 .id = -1,
304 .dev = {
305 .platform_data = &vpac270_gpio_led_info,
306 }
307};
308
309static void __init vpac270_leds_init(void)
310{
311 platform_device_register(&vpac270_leds);
312}
313#else
314static inline void vpac270_leds_init(void) {}
315#endif
316
317/******************************************************************************
318 * USB Host
319 ******************************************************************************/
320#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
321static int vpac270_ohci_init(struct device *dev)
322{
323 UP2OCR = UP2OCR_HXS | UP2OCR_HXOE | UP2OCR_DPPDE | UP2OCR_DMPDE;
324 return 0;
325}
326
327static struct pxaohci_platform_data vpac270_ohci_info = {
328 .port_mode = PMM_PERPORT_MODE,
329 .flags = ENABLE_PORT1 | ENABLE_PORT2 |
330 POWER_CONTROL_LOW | POWER_SENSE_LOW,
331 .init = vpac270_ohci_init,
332};
333
334static void __init vpac270_uhc_init(void)
335{
336 pxa_set_ohci_info(&vpac270_ohci_info);
337}
338#else
339static inline void vpac270_uhc_init(void) {}
340#endif
341
342/******************************************************************************
343 * USB Gadget
344 ******************************************************************************/
345#if defined(CONFIG_USB_GADGET_PXA27X)||defined(CONFIG_USB_GADGET_PXA27X_MODULE)
346static struct gpio_vbus_mach_info vpac270_gpio_vbus_info = {
347 .gpio_vbus = GPIO41_VPAC270_UDC_DETECT,
348 .gpio_pullup = -1,
349};
350
351static struct platform_device vpac270_gpio_vbus = {
352 .name = "gpio-vbus",
353 .id = -1,
354 .dev = {
355 .platform_data = &vpac270_gpio_vbus_info,
356 },
357};
358
359static void vpac270_udc_command(int cmd)
360{
361 if (cmd == PXA2XX_UDC_CMD_CONNECT)
362 UP2OCR = UP2OCR_HXOE | UP2OCR_DPPUE;
363 else if (cmd == PXA2XX_UDC_CMD_DISCONNECT)
364 UP2OCR = UP2OCR_HXOE;
365}
366
367static struct pxa2xx_udc_mach_info vpac270_udc_info __initdata = {
368 .udc_command = vpac270_udc_command,
369 .gpio_pullup = -1,
370};
371
372static void __init vpac270_udc_init(void)
373{
374 pxa_set_udc_info(&vpac270_udc_info);
375 platform_device_register(&vpac270_gpio_vbus);
376}
377#else
378static inline void vpac270_udc_init(void) {}
379#endif
380
381/******************************************************************************
382 * Ethernet
383 ******************************************************************************/
384#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
385static struct resource vpac270_dm9000_resources[] = {
386 [0] = {
387 .start = PXA_CS2_PHYS + 0x300,
388 .end = PXA_CS2_PHYS + 0x303,
389 .flags = IORESOURCE_MEM,
390 },
391 [1] = {
392 .start = PXA_CS2_PHYS + 0x304,
393 .end = PXA_CS2_PHYS + 0x343,
394 .flags = IORESOURCE_MEM,
395 },
396 [2] = {
397 .start = IRQ_GPIO(GPIO114_VPAC270_ETH_IRQ),
398 .end = IRQ_GPIO(GPIO114_VPAC270_ETH_IRQ),
399 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
400 },
401};
402
403static struct dm9000_plat_data vpac270_dm9000_platdata = {
404 .flags = DM9000_PLATF_32BITONLY,
405};
406
407static struct platform_device vpac270_dm9000_device = {
408 .name = "dm9000",
409 .id = -1,
410 .num_resources = ARRAY_SIZE(vpac270_dm9000_resources),
411 .resource = vpac270_dm9000_resources,
412 .dev = {
413 .platform_data = &vpac270_dm9000_platdata,
414 }
415};
416
417static void __init vpac270_eth_init(void)
418{
419 platform_device_register(&vpac270_dm9000_device);
420}
421#else
422static inline void vpac270_eth_init(void) {}
423#endif
424
425/******************************************************************************
426 * Audio and Touchscreen
427 ******************************************************************************/
428#if defined(CONFIG_TOUCHSCREEN_UCB1400) || \
429 defined(CONFIG_TOUCHSCREEN_UCB1400_MODULE)
430static pxa2xx_audio_ops_t vpac270_ac97_pdata = {
431 .reset_gpio = 95,
432};
433
434static struct ucb1400_pdata vpac270_ucb1400_pdata = {
435 .irq = IRQ_GPIO(GPIO113_VPAC270_TS_IRQ),
436};
437
438static struct platform_device vpac270_ucb1400_device = {
439 .name = "ucb1400_core",
440 .id = -1,
441 .dev = {
442 .platform_data = &vpac270_ucb1400_pdata,
443 },
444};
445
446static void __init vpac270_ts_init(void)
447{
448 pxa_set_ac97_info(&vpac270_ac97_pdata);
449 platform_device_register(&vpac270_ucb1400_device);
450}
451#else
452static inline void vpac270_ts_init(void) {}
453#endif
454
455/******************************************************************************
456 * RTC
457 ******************************************************************************/
458#if defined(CONFIG_RTC_DRV_DS1307) || defined(CONFIG_RTC_DRV_DS1307_MODULE)
459static struct i2c_board_info __initdata vpac270_i2c_devs[] = {
460 {
461 I2C_BOARD_INFO("ds1339", 0x68),
462 },
463};
464
465static void __init vpac270_rtc_init(void)
466{
467 pxa_set_i2c_info(NULL);
468 i2c_register_board_info(0, ARRAY_AND_SIZE(vpac270_i2c_devs));
469}
470#else
471static inline void vpac270_rtc_init(void) {}
472#endif
473
474/******************************************************************************
475 * Framebuffer
476 ******************************************************************************/
477#if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE)
478static struct pxafb_mode_info vpac270_lcd_modes[] = {
479{
480 .pixclock = 57692,
481 .xres = 640,
482 .yres = 480,
483 .bpp = 32,
484 .depth = 18,
485
486 .left_margin = 144,
487 .right_margin = 32,
488 .upper_margin = 13,
489 .lower_margin = 30,
490
491 .hsync_len = 32,
492 .vsync_len = 2,
493
494 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
495},
496};
497
498static struct pxafb_mach_info vpac270_lcd_screen = {
499 .modes = vpac270_lcd_modes,
500 .num_modes = ARRAY_SIZE(vpac270_lcd_modes),
501 .lcd_conn = LCD_COLOR_TFT_18BPP,
502};
503
504static void vpac270_lcd_power(int on, struct fb_var_screeninfo *info)
505{
506 gpio_set_value(GPIO81_VPAC270_BKL_ON, on);
507}
508
509static void __init vpac270_lcd_init(void)
510{
511 int ret;
512
513 ret = gpio_request(GPIO81_VPAC270_BKL_ON, "BKL-ON");
514 if (ret) {
515 pr_err("Requesting BKL-ON GPIO failed!\n");
516 goto err;
517 }
518
519 ret = gpio_direction_output(GPIO81_VPAC270_BKL_ON, 1);
520 if (ret) {
521 pr_err("Setting BKL-ON GPIO direction failed!\n");
522 goto err2;
523 }
524
525 vpac270_lcd_screen.pxafb_lcd_power = vpac270_lcd_power;
526 set_pxa_fb_info(&vpac270_lcd_screen);
527 return;
528
529err2:
530 gpio_free(GPIO81_VPAC270_BKL_ON);
531err:
532 return;
533}
534#else
535static inline void vpac270_lcd_init(void) {}
536#endif
537
538/******************************************************************************
539 * PATA IDE
540 ******************************************************************************/
541#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
542static struct pata_platform_info vpac270_pata_pdata = {
543 .ioport_shift = 1,
544 .irq_flags = IRQF_TRIGGER_RISING,
545};
546
547static struct resource vpac270_ide_resources[] = {
548 [0] = { /* I/O Base address */
549 .start = PXA_CS3_PHYS + 0x120,
550 .end = PXA_CS3_PHYS + 0x13f,
551 .flags = IORESOURCE_MEM
552 },
553 [1] = { /* CTL Base address */
554 .start = PXA_CS3_PHYS + 0x15c,
555 .end = PXA_CS3_PHYS + 0x15f,
556 .flags = IORESOURCE_MEM
557 },
558 [2] = { /* IDE IRQ pin */
559 .start = gpio_to_irq(GPIO36_VPAC270_IDE_IRQ),
560 .end = gpio_to_irq(GPIO36_VPAC270_IDE_IRQ),
561 .flags = IORESOURCE_IRQ
562 }
563};
564
565static struct platform_device vpac270_ide_device = {
566 .name = "pata_platform",
567 .num_resources = ARRAY_SIZE(vpac270_ide_resources),
568 .resource = vpac270_ide_resources,
569 .dev = {
570 .platform_data = &vpac270_pata_pdata,
571 }
572};
573
574static void __init vpac270_ide_init(void)
575{
576 platform_device_register(&vpac270_ide_device);
577}
578#else
579static inline void vpac270_ide_init(void) {}
580#endif
581
582/******************************************************************************
583 * Machine init
584 ******************************************************************************/
585static void __init vpac270_init(void)
586{
587 pxa2xx_mfp_config(ARRAY_AND_SIZE(vpac270_pin_config));
588
589 pxa_set_ffuart_info(NULL);
590 pxa_set_btuart_info(NULL);
591 pxa_set_stuart_info(NULL);
592
593 vpac270_lcd_init();
594 vpac270_mmc_init();
595 vpac270_nor_init();
596 vpac270_onenand_init();
597 vpac270_leds_init();
598 vpac270_keys_init();
599 vpac270_uhc_init();
600 vpac270_udc_init();
601 vpac270_eth_init();
602 vpac270_ts_init();
603 vpac270_rtc_init();
604 vpac270_ide_init();
605}
606
607MACHINE_START(VPAC270, "Voipac PXA270")
608 .phys_io = 0x40000000,
609 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
610 .boot_params = 0xa0000100,
611 .map_io = pxa_map_io,
612 .init_irq = pxa27x_init_irq,
613 .timer = &pxa_timer,
614 .init_machine = vpac270_init
615MACHINE_END
diff --git a/arch/arm/mach-pxa/z2.c b/arch/arm/mach-pxa/z2.c
new file mode 100644
index 000000000000..f5d1ae3db3a4
--- /dev/null
+++ b/arch/arm/mach-pxa/z2.c
@@ -0,0 +1,609 @@
1/*
2 * linux/arch/arm/mach-pxa/z2.c
3 *
4 * Support for the Zipit Z2 Handheld device.
5 *
6 * Author: Ken McGuire
7 * Created: Jan 25, 2009
8 * Based on mainstone.c as modified for the Zipit Z2.
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#include <linux/platform_device.h>
16#include <linux/mtd/mtd.h>
17#include <linux/mtd/partitions.h>
18#include <linux/pwm_backlight.h>
19#include <linux/dma-mapping.h>
20#include <linux/spi/spi.h>
21#include <linux/spi/libertas_spi.h>
22#include <linux/spi/lms283gf05.h>
23#include <linux/power_supply.h>
24#include <linux/mtd/physmap.h>
25#include <linux/gpio.h>
26#include <linux/gpio_keys.h>
27#include <linux/delay.h>
28
29#include <asm/mach-types.h>
30#include <asm/mach/arch.h>
31
32#include <mach/pxa27x.h>
33#include <mach/mfp-pxa27x.h>
34#include <mach/z2.h>
35#include <mach/pxafb.h>
36#include <mach/mmc.h>
37#include <mach/pxa27x_keypad.h>
38#include <mach/pxa2xx_spi.h>
39
40#include <plat/i2c.h>
41
42#include "generic.h"
43#include "devices.h"
44
45/******************************************************************************
46 * Pin configuration
47 ******************************************************************************/
48static unsigned long z2_pin_config[] = {
49
50 /* LCD - 16bpp Active TFT */
51 GPIO58_LCD_LDD_0,
52 GPIO59_LCD_LDD_1,
53 GPIO60_LCD_LDD_2,
54 GPIO61_LCD_LDD_3,
55 GPIO62_LCD_LDD_4,
56 GPIO63_LCD_LDD_5,
57 GPIO64_LCD_LDD_6,
58 GPIO65_LCD_LDD_7,
59 GPIO66_LCD_LDD_8,
60 GPIO67_LCD_LDD_9,
61 GPIO68_LCD_LDD_10,
62 GPIO69_LCD_LDD_11,
63 GPIO70_LCD_LDD_12,
64 GPIO71_LCD_LDD_13,
65 GPIO72_LCD_LDD_14,
66 GPIO73_LCD_LDD_15,
67 GPIO74_LCD_FCLK,
68 GPIO75_LCD_LCLK,
69 GPIO76_LCD_PCLK,
70 GPIO77_LCD_BIAS,
71 GPIO19_GPIO, /* LCD reset */
72 GPIO88_GPIO, /* LCD chipselect */
73
74 /* PWM */
75 GPIO115_PWM1_OUT, /* Keypad Backlight */
76 GPIO11_PWM2_OUT, /* LCD Backlight */
77
78 /* MMC */
79 GPIO32_MMC_CLK,
80 GPIO112_MMC_CMD,
81 GPIO92_MMC_DAT_0,
82 GPIO109_MMC_DAT_1,
83 GPIO110_MMC_DAT_2,
84 GPIO111_MMC_DAT_3,
85 GPIO96_GPIO, /* SD detect */
86
87 /* STUART */
88 GPIO46_STUART_RXD,
89 GPIO47_STUART_TXD,
90
91 /* Keypad */
92 GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH,
93 GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH,
94 GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH,
95 GPIO34_KP_MKIN_3 | WAKEUP_ON_LEVEL_HIGH,
96 GPIO38_KP_MKIN_4 | WAKEUP_ON_LEVEL_HIGH,
97 GPIO16_KP_MKIN_5 | WAKEUP_ON_LEVEL_HIGH,
98 GPIO17_KP_MKIN_6 | WAKEUP_ON_LEVEL_HIGH,
99 GPIO103_KP_MKOUT_0,
100 GPIO104_KP_MKOUT_1,
101 GPIO105_KP_MKOUT_2,
102 GPIO106_KP_MKOUT_3,
103 GPIO107_KP_MKOUT_4,
104 GPIO108_KP_MKOUT_5,
105 GPIO35_KP_MKOUT_6,
106 GPIO41_KP_MKOUT_7,
107
108 /* I2C */
109 GPIO117_I2C_SCL,
110 GPIO118_I2C_SDA,
111
112 /* SSP1 */
113 GPIO23_SSP1_SCLK, /* SSP1_SCK */
114 GPIO25_SSP1_TXD, /* SSP1_TXD */
115 GPIO26_SSP1_RXD, /* SSP1_RXD */
116
117 /* SSP2 */
118 GPIO22_SSP2_SCLK, /* SSP2_SCK */
119 GPIO13_SSP2_TXD, /* SSP2_TXD */
120 GPIO40_SSP2_RXD, /* SSP2_RXD */
121
122 /* LEDs */
123 GPIO10_GPIO, /* WiFi LED */
124 GPIO83_GPIO, /* Charging LED */
125 GPIO85_GPIO, /* Charged LED */
126
127 /* I2S */
128 GPIO28_I2S_BITCLK_OUT,
129 GPIO29_I2S_SDATA_IN,
130 GPIO30_I2S_SDATA_OUT,
131 GPIO31_I2S_SYNC,
132 GPIO113_I2S_SYSCLK,
133
134 /* MISC */
135 GPIO0_GPIO, /* AC power detect */
136 GPIO1_GPIO, /* Power button */
137 GPIO37_GPIO, /* Headphone detect */
138 GPIO98_GPIO, /* Lid switch */
139 GPIO14_GPIO, /* WiFi Reset */
140 GPIO15_GPIO, /* WiFi Power */
141 GPIO24_GPIO, /* WiFi CS */
142 GPIO36_GPIO, /* WiFi IRQ */
143 GPIO88_GPIO, /* LCD CS */
144};
145
146/******************************************************************************
147 * NOR Flash
148 ******************************************************************************/
149#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
150static struct resource z2_flash_resource = {
151 .start = PXA_CS0_PHYS,
152 .end = PXA_CS0_PHYS + SZ_8M - 1,
153 .flags = IORESOURCE_MEM,
154};
155
156static struct mtd_partition z2_flash_parts[] = {
157 {
158 .name = "U-Boot Bootloader",
159 .offset = 0x0,
160 .size = 0x20000,
161 },
162 {
163 .name = "Linux Kernel",
164 .offset = 0x20000,
165 .size = 0x220000,
166 },
167 {
168 .name = "Filesystem",
169 .offset = 0x240000,
170 .size = 0x5b0000,
171 },
172 {
173 .name = "U-Boot Environment",
174 .offset = 0x7f0000,
175 .size = MTDPART_SIZ_FULL,
176 },
177};
178
179static struct physmap_flash_data z2_flash_data = {
180 .width = 2,
181 .parts = z2_flash_parts,
182 .nr_parts = ARRAY_SIZE(z2_flash_parts),
183};
184
185static struct platform_device z2_flash = {
186 .name = "physmap-flash",
187 .id = -1,
188 .resource = &z2_flash_resource,
189 .num_resources = 1,
190 .dev = {
191 .platform_data = &z2_flash_data,
192 },
193};
194
195static void __init z2_nor_init(void)
196{
197 platform_device_register(&z2_flash);
198}
199#else
200static inline void z2_nor_init(void) {}
201#endif
202
203/******************************************************************************
204 * Backlight
205 ******************************************************************************/
206#if defined(CONFIG_BACKLIGHT_PWM) || defined(CONFIG_BACKLIGHT_PWM_MODULE)
207static struct platform_pwm_backlight_data z2_backlight_data[] = {
208 [0] = {
209 /* Keypad Backlight */
210 .pwm_id = 1,
211 .max_brightness = 1023,
212 .dft_brightness = 512,
213 .pwm_period_ns = 1260320,
214 },
215 [1] = {
216 /* LCD Backlight */
217 .pwm_id = 2,
218 .max_brightness = 1023,
219 .dft_brightness = 512,
220 .pwm_period_ns = 1260320,
221 },
222};
223
224static struct platform_device z2_backlight_devices[2] = {
225 {
226 .name = "pwm-backlight",
227 .id = 0,
228 .dev = {
229 .platform_data = &z2_backlight_data[1],
230 },
231 },
232 {
233 .name = "pwm-backlight",
234 .id = 1,
235 .dev = {
236 .platform_data = &z2_backlight_data[0],
237 },
238 },
239};
240static void __init z2_pwm_init(void)
241{
242 platform_device_register(&z2_backlight_devices[0]);
243 platform_device_register(&z2_backlight_devices[1]);
244}
245#else
246static inline void z2_pwm_init(void) {}
247#endif
248
249/******************************************************************************
250 * Framebuffer
251 ******************************************************************************/
252#if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE)
253static struct pxafb_mode_info z2_lcd_modes[] = {
254{
255 .pixclock = 192000,
256 .xres = 240,
257 .yres = 320,
258 .bpp = 16,
259
260 .left_margin = 4,
261 .right_margin = 8,
262 .upper_margin = 4,
263 .lower_margin = 8,
264
265 .hsync_len = 4,
266 .vsync_len = 4,
267},
268};
269
270static struct pxafb_mach_info z2_lcd_screen = {
271 .modes = z2_lcd_modes,
272 .num_modes = ARRAY_SIZE(z2_lcd_modes),
273 .lcd_conn = LCD_COLOR_TFT_16BPP | LCD_BIAS_ACTIVE_LOW |
274 LCD_ALTERNATE_MAPPING,
275};
276
277static void __init z2_lcd_init(void)
278{
279 set_pxa_fb_info(&z2_lcd_screen);
280}
281#else
282static inline void z2_lcd_init(void) {}
283#endif
284
285/******************************************************************************
286 * SD/MMC card controller
287 ******************************************************************************/
288#if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE)
289static struct pxamci_platform_data z2_mci_platform_data = {
290 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
291 .gpio_card_detect = GPIO96_ZIPITZ2_SD_DETECT,
292 .gpio_power = -1,
293 .gpio_card_ro = -1,
294 .detect_delay_ms = 200,
295};
296
297static void __init z2_mmc_init(void)
298{
299 pxa_set_mci_info(&z2_mci_platform_data);
300}
301#else
302static inline void z2_mmc_init(void) {}
303#endif
304
305/******************************************************************************
306 * LEDs
307 ******************************************************************************/
308#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
309struct gpio_led z2_gpio_leds[] = {
310{
311 .name = "z2:green:wifi",
312 .default_trigger = "none",
313 .gpio = GPIO10_ZIPITZ2_LED_WIFI,
314 .active_low = 1,
315}, {
316 .name = "z2:green:charged",
317 .default_trigger = "none",
318 .gpio = GPIO85_ZIPITZ2_LED_CHARGED,
319 .active_low = 1,
320}, {
321 .name = "z2:amber:charging",
322 .default_trigger = "none",
323 .gpio = GPIO83_ZIPITZ2_LED_CHARGING,
324 .active_low = 1,
325},
326};
327
328static struct gpio_led_platform_data z2_gpio_led_info = {
329 .leds = z2_gpio_leds,
330 .num_leds = ARRAY_SIZE(z2_gpio_leds),
331};
332
333static struct platform_device z2_leds = {
334 .name = "leds-gpio",
335 .id = -1,
336 .dev = {
337 .platform_data = &z2_gpio_led_info,
338 }
339};
340
341static void __init z2_leds_init(void)
342{
343 platform_device_register(&z2_leds);
344}
345#else
346static inline void z2_leds_init(void) {}
347#endif
348
349/******************************************************************************
350 * GPIO keyboard
351 ******************************************************************************/
352#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE)
353static unsigned int z2_matrix_keys[] = {
354 KEY(0, 0, KEY_OPTION),
355 KEY(1, 0, KEY_UP),
356 KEY(2, 0, KEY_DOWN),
357 KEY(3, 0, KEY_LEFT),
358 KEY(4, 0, KEY_RIGHT),
359 KEY(5, 0, KEY_END),
360 KEY(6, 0, KEY_KPPLUS),
361
362 KEY(0, 1, KEY_HOME),
363 KEY(1, 1, KEY_Q),
364 KEY(2, 1, KEY_I),
365 KEY(3, 1, KEY_G),
366 KEY(4, 1, KEY_X),
367 KEY(5, 1, KEY_ENTER),
368 KEY(6, 1, KEY_KPMINUS),
369
370 KEY(0, 2, KEY_PAGEUP),
371 KEY(1, 2, KEY_W),
372 KEY(2, 2, KEY_O),
373 KEY(3, 2, KEY_H),
374 KEY(4, 2, KEY_C),
375 KEY(5, 2, KEY_LEFTALT),
376
377 KEY(0, 3, KEY_PAGEDOWN),
378 KEY(1, 3, KEY_E),
379 KEY(2, 3, KEY_P),
380 KEY(3, 3, KEY_J),
381 KEY(4, 3, KEY_V),
382 KEY(5, 3, KEY_LEFTSHIFT),
383
384 KEY(0, 4, KEY_ESC),
385 KEY(1, 4, KEY_R),
386 KEY(2, 4, KEY_A),
387 KEY(3, 4, KEY_K),
388 KEY(4, 4, KEY_B),
389 KEY(5, 4, KEY_LEFTCTRL),
390
391 KEY(0, 5, KEY_TAB),
392 KEY(1, 5, KEY_T),
393 KEY(2, 5, KEY_S),
394 KEY(3, 5, KEY_L),
395 KEY(4, 5, KEY_N),
396 KEY(5, 5, KEY_SPACE),
397
398 KEY(0, 6, KEY_STOPCD),
399 KEY(1, 6, KEY_Y),
400 KEY(2, 6, KEY_D),
401 KEY(3, 6, KEY_BACKSPACE),
402 KEY(4, 6, KEY_M),
403 KEY(5, 6, KEY_COMMA),
404
405 KEY(0, 7, KEY_PLAYCD),
406 KEY(1, 7, KEY_U),
407 KEY(2, 7, KEY_F),
408 KEY(3, 7, KEY_Z),
409 KEY(4, 7, KEY_SEMICOLON),
410 KEY(5, 7, KEY_DOT),
411};
412
413static struct pxa27x_keypad_platform_data z2_keypad_platform_data = {
414 .matrix_key_rows = 7,
415 .matrix_key_cols = 8,
416 .matrix_key_map = z2_matrix_keys,
417 .matrix_key_map_size = ARRAY_SIZE(z2_matrix_keys),
418
419 .debounce_interval = 30,
420};
421
422static void __init z2_mkp_init(void)
423{
424 pxa_set_keypad_info(&z2_keypad_platform_data);
425}
426#else
427static inline void z2_mkp_init(void) {}
428#endif
429
430/******************************************************************************
431 * GPIO keys
432 ******************************************************************************/
433#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
434static struct gpio_keys_button z2_pxa_buttons[] = {
435 {KEY_POWER, GPIO1_ZIPITZ2_POWER_BUTTON, 0, "Power Button" },
436 {KEY_CLOSE, GPIO98_ZIPITZ2_LID_BUTTON, 0, "Lid Button" },
437};
438
439static struct gpio_keys_platform_data z2_pxa_keys_data = {
440 .buttons = z2_pxa_buttons,
441 .nbuttons = ARRAY_SIZE(z2_pxa_buttons),
442};
443
444static struct platform_device z2_pxa_keys = {
445 .name = "gpio-keys",
446 .id = -1,
447 .dev = {
448 .platform_data = &z2_pxa_keys_data,
449 },
450};
451
452static void __init z2_keys_init(void)
453{
454 platform_device_register(&z2_pxa_keys);
455}
456#else
457static inline void z2_keys_init(void) {}
458#endif
459
460/******************************************************************************
461 * SSP Devices - WiFi and LCD control
462 ******************************************************************************/
463#if defined(CONFIG_SPI_PXA2XX) || defined(CONFIG_SPI_PXA2XX_MODULE)
464/* WiFi */
465static int z2_lbs_spi_setup(struct spi_device *spi)
466{
467 int ret = 0;
468
469 ret = gpio_request(GPIO15_ZIPITZ2_WIFI_POWER, "WiFi Power");
470 if (ret)
471 goto err;
472
473 ret = gpio_direction_output(GPIO15_ZIPITZ2_WIFI_POWER, 1);
474 if (ret)
475 goto err2;
476
477 ret = gpio_request(GPIO14_ZIPITZ2_WIFI_RESET, "WiFi Reset");
478 if (ret)
479 goto err2;
480
481 ret = gpio_direction_output(GPIO14_ZIPITZ2_WIFI_RESET, 0);
482 if (ret)
483 goto err3;
484
485 /* Reset the card */
486 mdelay(180);
487 gpio_set_value(GPIO14_ZIPITZ2_WIFI_RESET, 1);
488 mdelay(20);
489
490 spi->bits_per_word = 16;
491 spi->mode = SPI_MODE_2,
492
493 spi_setup(spi);
494
495 return 0;
496
497err3:
498 gpio_free(GPIO14_ZIPITZ2_WIFI_RESET);
499err2:
500 gpio_free(GPIO15_ZIPITZ2_WIFI_POWER);
501err:
502 return ret;
503};
504
505static int z2_lbs_spi_teardown(struct spi_device *spi)
506{
507 gpio_set_value(GPIO14_ZIPITZ2_WIFI_RESET, 0);
508 gpio_set_value(GPIO15_ZIPITZ2_WIFI_POWER, 0);
509 gpio_free(GPIO14_ZIPITZ2_WIFI_RESET);
510 gpio_free(GPIO15_ZIPITZ2_WIFI_POWER);
511 return 0;
512
513};
514
515static struct pxa2xx_spi_chip z2_lbs_chip_info = {
516 .rx_threshold = 8,
517 .tx_threshold = 8,
518 .timeout = 1000,
519 .gpio_cs = GPIO24_ZIPITZ2_WIFI_CS,
520};
521
522static struct libertas_spi_platform_data z2_lbs_pdata = {
523 .use_dummy_writes = 1,
524 .setup = z2_lbs_spi_setup,
525 .teardown = z2_lbs_spi_teardown,
526};
527
528/* LCD */
529static struct pxa2xx_spi_chip lms283_chip_info = {
530 .rx_threshold = 1,
531 .tx_threshold = 1,
532 .timeout = 64,
533 .gpio_cs = GPIO88_ZIPITZ2_LCD_CS,
534};
535
536static const struct lms283gf05_pdata lms283_pdata = {
537 .reset_gpio = GPIO19_ZIPITZ2_LCD_RESET,
538};
539
540static struct spi_board_info spi_board_info[] __initdata = {
541{
542 .modalias = "libertas_spi",
543 .platform_data = &z2_lbs_pdata,
544 .controller_data = &z2_lbs_chip_info,
545 .irq = gpio_to_irq(GPIO36_ZIPITZ2_WIFI_IRQ),
546 .max_speed_hz = 13000000,
547 .bus_num = 1,
548 .chip_select = 0,
549},
550{
551 .modalias = "lms283gf05",
552 .controller_data = &lms283_chip_info,
553 .platform_data = &lms283_pdata,
554 .max_speed_hz = 400000,
555 .bus_num = 2,
556 .chip_select = 0,
557},
558};
559
560static struct pxa2xx_spi_master pxa_ssp1_master_info = {
561 .clock_enable = CKEN_SSP,
562 .num_chipselect = 1,
563 .enable_dma = 1,
564};
565
566static struct pxa2xx_spi_master pxa_ssp2_master_info = {
567 .clock_enable = CKEN_SSP2,
568 .num_chipselect = 1,
569};
570
571static void __init z2_spi_init(void)
572{
573 pxa2xx_set_spi_info(1, &pxa_ssp1_master_info);
574 pxa2xx_set_spi_info(2, &pxa_ssp2_master_info);
575 spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
576}
577#else
578static inline void z2_spi_init(void) {}
579#endif
580
581/******************************************************************************
582 * Machine init
583 ******************************************************************************/
584static void __init z2_init(void)
585{
586 pxa2xx_mfp_config(ARRAY_AND_SIZE(z2_pin_config));
587
588 z2_lcd_init();
589 z2_mmc_init();
590 z2_mkp_init();
591
592 pxa_set_i2c_info(NULL);
593
594 z2_spi_init();
595 z2_nor_init();
596 z2_pwm_init();
597 z2_leds_init();
598 z2_keys_init();
599}
600
601MACHINE_START(ZIPIT2, "Zipit Z2")
602 .phys_io = 0x40000000,
603 .boot_params = 0xa0000100,
604 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
605 .map_io = pxa_map_io,
606 .init_irq = pxa27x_init_irq,
607 .timer = &pxa_timer,
608 .init_machine = z2_init,
609MACHINE_END
diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c
index 39896d883584..3680f6a90623 100644
--- a/arch/arm/mach-pxa/zeus.c
+++ b/arch/arm/mach-pxa/zeus.c
@@ -644,7 +644,7 @@ static struct pxafb_mach_info zeus_fb_info = {
644 644
645static struct pxamci_platform_data zeus_mci_platform_data = { 645static struct pxamci_platform_data zeus_mci_platform_data = {
646 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, 646 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
647 .detect_delay = HZ/4, 647 .detect_delay_ms = 250,
648 .gpio_card_detect = ZEUS_MMC_CD_GPIO, 648 .gpio_card_detect = ZEUS_MMC_CD_GPIO,
649 .gpio_card_ro = ZEUS_MMC_WP_GPIO, 649 .gpio_card_ro = ZEUS_MMC_WP_GPIO,
650 .gpio_card_ro_invert = 1, 650 .gpio_card_ro_invert = 1,
diff --git a/arch/arm/mach-pxa/zylonite.c b/arch/arm/mach-pxa/zylonite.c
index 2b4043c04d0c..c479cbecf784 100644
--- a/arch/arm/mach-pxa/zylonite.c
+++ b/arch/arm/mach-pxa/zylonite.c
@@ -218,7 +218,7 @@ static inline void zylonite_init_lcd(void) {}
218 218
219#if defined(CONFIG_MMC) 219#if defined(CONFIG_MMC)
220static struct pxamci_platform_data zylonite_mci_platform_data = { 220static struct pxamci_platform_data zylonite_mci_platform_data = {
221 .detect_delay = 20, 221 .detect_delay_ms= 200,
222 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, 222 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
223 .gpio_card_detect = EXT_GPIO(0), 223 .gpio_card_detect = EXT_GPIO(0),
224 .gpio_card_ro = EXT_GPIO(2), 224 .gpio_card_ro = EXT_GPIO(2),
@@ -226,7 +226,7 @@ static struct pxamci_platform_data zylonite_mci_platform_data = {
226}; 226};
227 227
228static struct pxamci_platform_data zylonite_mci2_platform_data = { 228static struct pxamci_platform_data zylonite_mci2_platform_data = {
229 .detect_delay = 20, 229 .detect_delay_ms= 200,
230 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, 230 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
231 .gpio_card_detect = EXT_GPIO(1), 231 .gpio_card_detect = EXT_GPIO(1),
232 .gpio_card_ro = EXT_GPIO(3), 232 .gpio_card_ro = EXT_GPIO(3),
@@ -234,7 +234,7 @@ static struct pxamci_platform_data zylonite_mci2_platform_data = {
234}; 234};
235 235
236static struct pxamci_platform_data zylonite_mci3_platform_data = { 236static struct pxamci_platform_data zylonite_mci3_platform_data = {
237 .detect_delay = 20, 237 .detect_delay_ms= 200,
238 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, 238 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
239 .gpio_card_detect = EXT_GPIO(30), 239 .gpio_card_detect = EXT_GPIO(30),
240 .gpio_card_ro = EXT_GPIO(31), 240 .gpio_card_ro = EXT_GPIO(31),
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c
index 1b468bd490af..595be19f8ad5 100644
--- a/arch/arm/mach-realview/core.c
+++ b/arch/arm/mach-realview/core.c
@@ -29,6 +29,7 @@
29#include <linux/smsc911x.h> 29#include <linux/smsc911x.h>
30#include <linux/ata_platform.h> 30#include <linux/ata_platform.h>
31#include <linux/amba/mmci.h> 31#include <linux/amba/mmci.h>
32#include <linux/gfp.h>
32 33
33#include <asm/clkdev.h> 34#include <asm/clkdev.h>
34#include <asm/system.h> 35#include <asm/system.h>
@@ -236,7 +237,7 @@ static unsigned int realview_mmc_status(struct device *dev)
236 else 237 else
237 mask = 2; 238 mask = 2;
238 239
239 return readl(REALVIEW_SYSMCI) & mask; 240 return !(readl(REALVIEW_SYSMCI) & mask);
240} 241}
241 242
242struct mmci_platform_data realview_mmc0_plat_data = { 243struct mmci_platform_data realview_mmc0_plat_data = {
diff --git a/arch/arm/mach-rpc/dma.c b/arch/arm/mach-rpc/dma.c
index c47d974d52bd..85883b2e0e49 100644
--- a/arch/arm/mach-rpc/dma.c
+++ b/arch/arm/mach-rpc/dma.c
@@ -9,7 +9,6 @@
9 * 9 *
10 * DMA functions specific to RiscPC architecture 10 * DMA functions specific to RiscPC architecture
11 */ 11 */
12#include <linux/slab.h>
13#include <linux/mman.h> 12#include <linux/mman.h>
14#include <linux/init.h> 13#include <linux/init.h>
15#include <linux/interrupt.h> 14#include <linux/interrupt.h>
diff --git a/arch/arm/mach-s3c2410/Kconfig b/arch/arm/mach-s3c2410/Kconfig
index 554731868b07..9e5e96f12d86 100644
--- a/arch/arm/mach-s3c2410/Kconfig
+++ b/arch/arm/mach-s3c2410/Kconfig
@@ -6,6 +6,7 @@ config CPU_S3C2410
6 bool 6 bool
7 depends on ARCH_S3C2410 7 depends on ARCH_S3C2410
8 select CPU_ARM920T 8 select CPU_ARM920T
9 select S3C_GPIO_PULL_UP
9 select S3C2410_CLOCK 10 select S3C2410_CLOCK
10 select S3C2410_GPIO 11 select S3C2410_GPIO
11 select CPU_LLSERIAL_S3C2410 12 select CPU_LLSERIAL_S3C2410
diff --git a/arch/arm/mach-s3c2410/h1940-bluetooth.c b/arch/arm/mach-s3c2410/h1940-bluetooth.c
index a3f3c7b1ca38..8cdeb14af592 100644
--- a/arch/arm/mach-s3c2410/h1940-bluetooth.c
+++ b/arch/arm/mach-s3c2410/h1940-bluetooth.c
@@ -33,14 +33,15 @@ static void h1940bt_enable(int on)
33 h1940_latch_control(0, H1940_LATCH_BLUETOOTH_POWER); 33 h1940_latch_control(0, H1940_LATCH_BLUETOOTH_POWER);
34 /* Reset the chip */ 34 /* Reset the chip */
35 mdelay(10); 35 mdelay(10);
36 s3c2410_gpio_setpin(S3C2410_GPH(1), 1); 36
37 gpio_set_value(S3C2410_GPH(1), 1);
37 mdelay(10); 38 mdelay(10);
38 s3c2410_gpio_setpin(S3C2410_GPH(1), 0); 39 gpio_set_value(S3C2410_GPH(1), 0);
39 } 40 }
40 else { 41 else {
41 s3c2410_gpio_setpin(S3C2410_GPH(1), 1); 42 gpio_set_value(S3C2410_GPH(1), 1);
42 mdelay(10); 43 mdelay(10);
43 s3c2410_gpio_setpin(S3C2410_GPH(1), 0); 44 gpio_set_value(S3C2410_GPH(1), 0);
44 mdelay(10); 45 mdelay(10);
45 h1940_latch_control(H1940_LATCH_BLUETOOTH_POWER, 0); 46 h1940_latch_control(H1940_LATCH_BLUETOOTH_POWER, 0);
46 } 47 }
@@ -61,15 +62,21 @@ static int __devinit h1940bt_probe(struct platform_device *pdev)
61 struct rfkill *rfk; 62 struct rfkill *rfk;
62 int ret = 0; 63 int ret = 0;
63 64
65 ret = gpio_request(S3C2410_GPH(1), dev_name(&pdev->dev));
66 if (ret) {
67 dev_err(&pdev->dev, "could not get GPH1\n");\
68 return ret;
69 }
70
64 /* Configures BT serial port GPIOs */ 71 /* Configures BT serial port GPIOs */
65 s3c2410_gpio_cfgpin(S3C2410_GPH(0), S3C2410_GPH0_nCTS0); 72 s3c_gpio_cfgpin(S3C2410_GPH(0), S3C2410_GPH0_nCTS0);
66 s3c2410_gpio_pullup(S3C2410_GPH(0), 1); 73 s3c_gpio_cfgpull(S3C2410_GPH(0), S3C_GPIO_PULL_NONE);
67 s3c2410_gpio_cfgpin(S3C2410_GPH(1), S3C2410_GPIO_OUTPUT); 74 s3c_gpio_cfgpin(S3C2410_GPH(1), S3C2410_GPIO_OUTPUT);
68 s3c2410_gpio_pullup(S3C2410_GPH(1), 1); 75 s3c_gpio_cfgpull(S3C2410_GPH(1), S3C_GPIO_PULL_NONE);
69 s3c2410_gpio_cfgpin(S3C2410_GPH(2), S3C2410_GPH2_TXD0); 76 s3c_gpio_cfgpin(S3C2410_GPH(2), S3C2410_GPH2_TXD0);
70 s3c2410_gpio_pullup(S3C2410_GPH(2), 1); 77 s3c_gpio_cfgpull(S3C2410_GPH(2), S3C_GPIO_PULL_NONE);
71 s3c2410_gpio_cfgpin(S3C2410_GPH(3), S3C2410_GPH3_RXD0); 78 s3c_gpio_cfgpin(S3C2410_GPH(3), S3C2410_GPH3_RXD0);
72 s3c2410_gpio_pullup(S3C2410_GPH(3), 1); 79 s3c_gpio_cfgpull(S3C2410_GPH(3), S3C_GPIO_PULL_NONE);
73 80
74 81
75 rfk = rfkill_alloc(DRV_NAME, &pdev->dev, RFKILL_TYPE_BLUETOOTH, 82 rfk = rfkill_alloc(DRV_NAME, &pdev->dev, RFKILL_TYPE_BLUETOOTH,
@@ -100,6 +107,7 @@ static int h1940bt_remove(struct platform_device *pdev)
100 struct rfkill *rfk = platform_get_drvdata(pdev); 107 struct rfkill *rfk = platform_get_drvdata(pdev);
101 108
102 platform_set_drvdata(pdev, NULL); 109 platform_set_drvdata(pdev, NULL);
110 gpio_free(S3C2410_GPH(1));
103 111
104 if (rfk) { 112 if (rfk) {
105 rfkill_unregister(rfk); 113 rfkill_unregister(rfk);
diff --git a/arch/arm/mach-s3c2410/include/mach/dma.h b/arch/arm/mach-s3c2410/include/mach/dma.h
index 08ac5f96c012..cf68136cc668 100644
--- a/arch/arm/mach-s3c2410/include/mach/dma.h
+++ b/arch/arm/mach-s3c2410/include/mach/dma.h
@@ -54,7 +54,7 @@ enum dma_ch {
54#define DMACH_LOW_LEVEL (1<<28) /* use this to specifiy hardware ch no */ 54#define DMACH_LOW_LEVEL (1<<28) /* use this to specifiy hardware ch no */
55 55
56/* we have 4 dma channels */ 56/* we have 4 dma channels */
57#ifndef CONFIG_CPU_S3C2443 57#if !defined(CONFIG_CPU_S3C2443) && !defined(CONFIG_CPU_S3C2416)
58#define S3C_DMA_CHANNELS (4) 58#define S3C_DMA_CHANNELS (4)
59#else 59#else
60#define S3C_DMA_CHANNELS (6) 60#define S3C_DMA_CHANNELS (6)
diff --git a/arch/arm/mach-s3c2410/include/mach/gpio-fns.h b/arch/arm/mach-s3c2410/include/mach/gpio-fns.h
index 035a493952db..f453c4f2cb8e 100644
--- a/arch/arm/mach-s3c2410/include/mach/gpio-fns.h
+++ b/arch/arm/mach-s3c2410/include/mach/gpio-fns.h
@@ -10,14 +10,28 @@
10 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
11*/ 11*/
12 12
13#ifndef __MACH_GPIO_FNS_H
14#define __MACH_GPIO_FNS_H __FILE__
15
13/* These functions are in the to-be-removed category and it is strongly 16/* These functions are in the to-be-removed category and it is strongly
14 * encouraged not to use these in new code. They will be marked deprecated 17 * encouraged not to use these in new code. They will be marked deprecated
15 * very soon. 18 * very soon.
16 * 19 *
17 * Most of the functionality can be either replaced by the gpiocfg calls 20 * Most of the functionality can be either replaced by the gpiocfg calls
18 * for the s3c platform or by the generic GPIOlib API. 21 * for the s3c platform or by the generic GPIOlib API.
22 *
23 * As of 2.6.35-rc, these will be removed, with the few drivers using them
24 * either replaced or given a wrapper until the calls can be removed.
19*/ 25*/
20 26
27#include <plat/gpio-cfg.h>
28
29static inline void s3c2410_gpio_cfgpin(unsigned int pin, unsigned int cfg)
30{
31 /* 1:1 mapping between cfgpin and setcfg calls at the moment */
32 s3c_gpio_cfgpin(pin, cfg);
33}
34
21/* external functions for GPIO support 35/* external functions for GPIO support
22 * 36 *
23 * These allow various different clients to access the same GPIO 37 * These allow various different clients to access the same GPIO
@@ -25,17 +39,6 @@
25 * GPIO register, then it is safe to ioremap/__raw_{read|write} to it. 39 * GPIO register, then it is safe to ioremap/__raw_{read|write} to it.
26*/ 40*/
27 41
28/* s3c2410_gpio_cfgpin
29 *
30 * set the configuration of the given pin to the value passed.
31 *
32 * eg:
33 * s3c2410_gpio_cfgpin(S3C2410_GPA(0), S3C2410_GPA0_ADDR0);
34 * s3c2410_gpio_cfgpin(S3C2410_GPE(8), S3C2410_GPE8_SDDAT1);
35*/
36
37extern void s3c2410_gpio_cfgpin(unsigned int pin, unsigned int function);
38
39extern unsigned int s3c2410_gpio_getcfg(unsigned int pin); 42extern unsigned int s3c2410_gpio_getcfg(unsigned int pin);
40 43
41/* s3c2410_gpio_getirq 44/* s3c2410_gpio_getirq
@@ -73,6 +76,14 @@ extern int s3c2410_gpio_irqfilter(unsigned int pin, unsigned int on,
73 76
74/* s3c2410_gpio_pullup 77/* s3c2410_gpio_pullup
75 * 78 *
79 * This call should be replaced with s3c_gpio_setpull().
80 *
81 * As a note, there is currently no distinction between pull-up and pull-down
82 * in the s3c24xx series devices with only an on/off configuration.
83 */
84
85/* s3c2410_gpio_pullup
86 *
76 * configure the pull-up control on the given pin 87 * configure the pull-up control on the given pin
77 * 88 *
78 * to = 1 => disable the pull-up 89 * to = 1 => disable the pull-up
@@ -86,18 +97,8 @@ extern int s3c2410_gpio_irqfilter(unsigned int pin, unsigned int on,
86 97
87extern void s3c2410_gpio_pullup(unsigned int pin, unsigned int to); 98extern void s3c2410_gpio_pullup(unsigned int pin, unsigned int to);
88 99
89/* s3c2410_gpio_getpull
90 *
91 * Read the state of the pull-up on a given pin
92 *
93 * return:
94 * < 0 => error code
95 * 0 => enabled
96 * 1 => disabled
97*/
98
99extern int s3c2410_gpio_getpull(unsigned int pin);
100
101extern void s3c2410_gpio_setpin(unsigned int pin, unsigned int to); 100extern void s3c2410_gpio_setpin(unsigned int pin, unsigned int to);
102 101
103extern unsigned int s3c2410_gpio_getpin(unsigned int pin); 102extern unsigned int s3c2410_gpio_getpin(unsigned int pin);
103
104#endif /* __MACH_GPIO_FNS_H */
diff --git a/arch/arm/mach-s3c2410/include/mach/gpio-nrs.h b/arch/arm/mach-s3c2410/include/mach/gpio-nrs.h
index 2edbb9c88ab3..f3182ff847cb 100644
--- a/arch/arm/mach-s3c2410/include/mach/gpio-nrs.h
+++ b/arch/arm/mach-s3c2410/include/mach/gpio-nrs.h
@@ -34,6 +34,10 @@
34#define S3C2410_GPIO_F_NR (32) 34#define S3C2410_GPIO_F_NR (32)
35#define S3C2410_GPIO_G_NR (32) 35#define S3C2410_GPIO_G_NR (32)
36#define S3C2410_GPIO_H_NR (32) 36#define S3C2410_GPIO_H_NR (32)
37#define S3C2410_GPIO_J_NR (32) /* technically 16. */
38#define S3C2410_GPIO_K_NR (32) /* technically 16. */
39#define S3C2410_GPIO_L_NR (32) /* technically 15. */
40#define S3C2410_GPIO_M_NR (32) /* technically 2. */
37 41
38#if CONFIG_S3C_GPIO_SPACE != 0 42#if CONFIG_S3C_GPIO_SPACE != 0
39#error CONFIG_S3C_GPIO_SPACE cannot be zero at the moment 43#error CONFIG_S3C_GPIO_SPACE cannot be zero at the moment
@@ -53,6 +57,10 @@ enum s3c_gpio_number {
53 S3C2410_GPIO_F_START = S3C2410_GPIO_NEXT(S3C2410_GPIO_E), 57 S3C2410_GPIO_F_START = S3C2410_GPIO_NEXT(S3C2410_GPIO_E),
54 S3C2410_GPIO_G_START = S3C2410_GPIO_NEXT(S3C2410_GPIO_F), 58 S3C2410_GPIO_G_START = S3C2410_GPIO_NEXT(S3C2410_GPIO_F),
55 S3C2410_GPIO_H_START = S3C2410_GPIO_NEXT(S3C2410_GPIO_G), 59 S3C2410_GPIO_H_START = S3C2410_GPIO_NEXT(S3C2410_GPIO_G),
60 S3C2410_GPIO_J_START = S3C2410_GPIO_NEXT(S3C2410_GPIO_H),
61 S3C2410_GPIO_K_START = S3C2410_GPIO_NEXT(S3C2410_GPIO_J),
62 S3C2410_GPIO_L_START = S3C2410_GPIO_NEXT(S3C2410_GPIO_K),
63 S3C2410_GPIO_M_START = S3C2410_GPIO_NEXT(S3C2410_GPIO_L),
56}; 64};
57 65
58#endif /* __ASSEMBLY__ */ 66#endif /* __ASSEMBLY__ */
@@ -67,6 +75,10 @@ enum s3c_gpio_number {
67#define S3C2410_GPF(_nr) (S3C2410_GPIO_F_START + (_nr)) 75#define S3C2410_GPF(_nr) (S3C2410_GPIO_F_START + (_nr))
68#define S3C2410_GPG(_nr) (S3C2410_GPIO_G_START + (_nr)) 76#define S3C2410_GPG(_nr) (S3C2410_GPIO_G_START + (_nr))
69#define S3C2410_GPH(_nr) (S3C2410_GPIO_H_START + (_nr)) 77#define S3C2410_GPH(_nr) (S3C2410_GPIO_H_START + (_nr))
78#define S3C2410_GPJ(_nr) (S3C2410_GPIO_J_START + (_nr))
79#define S3C2410_GPK(_nr) (S3C2410_GPIO_K_START + (_nr))
80#define S3C2410_GPL(_nr) (S3C2410_GPIO_L_START + (_nr))
81#define S3C2410_GPM(_nr) (S3C2410_GPIO_M_START + (_nr))
70 82
71/* compatibility until drivers can be modified */ 83/* compatibility until drivers can be modified */
72 84
diff --git a/arch/arm/mach-s3c2410/include/mach/irqs.h b/arch/arm/mach-s3c2410/include/mach/irqs.h
index 6c12c6312ad8..877c15e1b154 100644
--- a/arch/arm/mach-s3c2410/include/mach/irqs.h
+++ b/arch/arm/mach-s3c2410/include/mach/irqs.h
@@ -115,6 +115,26 @@
115#define IRQ_S3C2412_SDI S3C2410_IRQSUB(13) 115#define IRQ_S3C2412_SDI S3C2410_IRQSUB(13)
116#define IRQ_S3C2412_CF S3C2410_IRQSUB(14) 116#define IRQ_S3C2412_CF S3C2410_IRQSUB(14)
117 117
118
119#define IRQ_S3C2416_EINT8t15 S3C2410_IRQ(5)
120#define IRQ_S3C2416_DMA S3C2410_IRQ(17)
121#define IRQ_S3C2416_UART3 S3C2410_IRQ(18)
122#define IRQ_S3C2416_SDI1 S3C2410_IRQ(20)
123#define IRQ_S3C2416_SDI0 S3C2410_IRQ(21)
124
125#define IRQ_S3C2416_LCD2 S3C2410_IRQSUB(15)
126#define IRQ_S3C2416_LCD3 S3C2410_IRQSUB(16)
127#define IRQ_S3C2416_LCD4 S3C2410_IRQSUB(17)
128#define IRQ_S3C2416_DMA0 S3C2410_IRQSUB(18)
129#define IRQ_S3C2416_DMA1 S3C2410_IRQSUB(19)
130#define IRQ_S3C2416_DMA2 S3C2410_IRQSUB(20)
131#define IRQ_S3C2416_DMA3 S3C2410_IRQSUB(21)
132#define IRQ_S3C2416_DMA4 S3C2410_IRQSUB(22)
133#define IRQ_S3C2416_DMA5 S3C2410_IRQSUB(23)
134#define IRQ_S32416_WDT S3C2410_IRQSUB(27)
135#define IRQ_S32416_AC97 S3C2410_IRQSUB(28)
136
137
118/* extra irqs for s3c2440 */ 138/* extra irqs for s3c2440 */
119 139
120#define IRQ_S3C2440_CAM_C S3C2410_IRQSUB(11) /* S3C2443 too */ 140#define IRQ_S3C2440_CAM_C S3C2410_IRQSUB(11) /* S3C2443 too */
@@ -130,7 +150,10 @@
130#define IRQ_S3C2443_HSMMC S3C2410_IRQ(20) /* IRQ_SDI */ 150#define IRQ_S3C2443_HSMMC S3C2410_IRQ(20) /* IRQ_SDI */
131#define IRQ_S3C2443_NAND S3C2410_IRQ(24) /* reserved */ 151#define IRQ_S3C2443_NAND S3C2410_IRQ(24) /* reserved */
132 152
153#define IRQ_S3C2416_HSMMC0 S3C2410_IRQ(21) /* S3C2416/S3C2450 */
154
133#define IRQ_HSMMC0 IRQ_S3C2443_HSMMC 155#define IRQ_HSMMC0 IRQ_S3C2443_HSMMC
156#define IRQ_HSMMC1 IRQ_S3C2416_HSMMC0
134 157
135#define IRQ_S3C2443_LCD1 S3C2410_IRQSUB(14) 158#define IRQ_S3C2443_LCD1 S3C2410_IRQSUB(14)
136#define IRQ_S3C2443_LCD2 S3C2410_IRQSUB(15) 159#define IRQ_S3C2443_LCD2 S3C2410_IRQSUB(15)
@@ -152,7 +175,7 @@
152#define IRQ_S3C2443_WDT S3C2410_IRQSUB(27) 175#define IRQ_S3C2443_WDT S3C2410_IRQSUB(27)
153#define IRQ_S3C2443_AC97 S3C2410_IRQSUB(28) 176#define IRQ_S3C2443_AC97 S3C2410_IRQSUB(28)
154 177
155#ifdef CONFIG_CPU_S3C2443 178#if defined(CONFIG_CPU_S3C2443) || defined(CONFIG_CPU_S3C2416)
156#define NR_IRQS (IRQ_S3C2443_AC97+1) 179#define NR_IRQS (IRQ_S3C2443_AC97+1)
157#else 180#else
158#define NR_IRQS (IRQ_S3C2440_AC97+1) 181#define NR_IRQS (IRQ_S3C2440_AC97+1)
diff --git a/arch/arm/mach-s3c2410/include/mach/map.h b/arch/arm/mach-s3c2410/include/mach/map.h
index b049e61460b6..f07d68066d7e 100644
--- a/arch/arm/mach-s3c2410/include/mach/map.h
+++ b/arch/arm/mach-s3c2410/include/mach/map.h
@@ -63,9 +63,9 @@
63#define S3C2440_PA_AC97 (0x5B000000) 63#define S3C2440_PA_AC97 (0x5B000000)
64#define S3C2440_SZ_AC97 SZ_1M 64#define S3C2440_SZ_AC97 SZ_1M
65 65
66/* S3C2443 High-speed SD/MMC */ 66/* S3C2443/S3C2416 High-speed SD/MMC */
67#define S3C2443_PA_HSMMC (0x4A800000) 67#define S3C2443_PA_HSMMC (0x4A800000)
68#define S3C2443_SZ_HSMMC (256) 68#define S3C2416_PA_HSMMC0 (0x4AC00000)
69 69
70/* S3C2412 memory and IO controls */ 70/* S3C2412 memory and IO controls */
71#define S3C2412_PA_SSMC (0x4F000000) 71#define S3C2412_PA_SSMC (0x4F000000)
@@ -110,6 +110,7 @@
110#define S3C_PA_UART S3C24XX_PA_UART 110#define S3C_PA_UART S3C24XX_PA_UART
111#define S3C_PA_USBHOST S3C2410_PA_USBHOST 111#define S3C_PA_USBHOST S3C2410_PA_USBHOST
112#define S3C_PA_HSMMC0 S3C2443_PA_HSMMC 112#define S3C_PA_HSMMC0 S3C2443_PA_HSMMC
113#define S3C_PA_HSMMC1 S3C2416_PA_HSMMC0
113#define S3C_PA_NAND S3C24XX_PA_NAND 114#define S3C_PA_NAND S3C24XX_PA_NAND
114 115
115#endif /* __ASM_ARCH_MAP_H */ 116#endif /* __ASM_ARCH_MAP_H */
diff --git a/arch/arm/mach-s3c2410/include/mach/regs-clock.h b/arch/arm/mach-s3c2410/include/mach/regs-clock.h
index 9a0d169be137..3415b60082d7 100644
--- a/arch/arm/mach-s3c2410/include/mach/regs-clock.h
+++ b/arch/arm/mach-s3c2410/include/mach/regs-clock.h
@@ -161,4 +161,6 @@
161 161
162#endif /* CONFIG_CPU_S3C2412 | CONFIG_CPU_S3C2413 */ 162#endif /* CONFIG_CPU_S3C2412 | CONFIG_CPU_S3C2413 */
163 163
164#define S3C2416_CLKDIV2 S3C2410_CLKREG(0x28)
165
164#endif /* __ASM_ARM_REGS_CLOCK */ 166#endif /* __ASM_ARM_REGS_CLOCK */
diff --git a/arch/arm/mach-s3c2410/include/mach/regs-dsc.h b/arch/arm/mach-s3c2410/include/mach/regs-dsc.h
index 3c3853cd3cf7..98fd4a05587c 100644
--- a/arch/arm/mach-s3c2410/include/mach/regs-dsc.h
+++ b/arch/arm/mach-s3c2410/include/mach/regs-dsc.h
@@ -19,6 +19,42 @@
19#define S3C2412_DSC1 S3C2410_GPIOREG(0xe0) 19#define S3C2412_DSC1 S3C2410_GPIOREG(0xe0)
20#endif 20#endif
21 21
22#if defined(CONFIG_CPU_S3C2416)
23#define S3C2416_DSC0 S3C2410_GPIOREG(0xc0)
24#define S3C2416_DSC1 S3C2410_GPIOREG(0xc4)
25#define S3C2416_DSC2 S3C2410_GPIOREG(0xc8)
26#define S3C2416_DSC3 S3C2410_GPIOREG(0x110)
27
28#define S3C2416_SELECT_DSC0 (0 << 30)
29#define S3C2416_SELECT_DSC1 (1 << 30)
30#define S3C2416_SELECT_DSC2 (2 << 30)
31#define S3C2416_SELECT_DSC3 (3 << 30)
32
33#define S3C2416_DSC_GETSHIFT(x) (x & 30)
34
35#define S3C2416_DSC0_CF (S3C2416_SELECT_DSC0 | 28)
36#define S3C2416_DSC0_CF_5mA (0 << 28)
37#define S3C2416_DSC0_CF_10mA (1 << 28)
38#define S3C2416_DSC0_CF_15mA (2 << 28)
39#define S3C2416_DSC0_CF_21mA (3 << 28)
40#define S3C2416_DSC0_CF_MASK (3 << 28)
41
42#define S3C2416_DSC0_nRBE (S3C2416_SELECT_DSC0 | 26)
43#define S3C2416_DSC0_nRBE_5mA (0 << 26)
44#define S3C2416_DSC0_nRBE_10mA (1 << 26)
45#define S3C2416_DSC0_nRBE_15mA (2 << 26)
46#define S3C2416_DSC0_nRBE_21mA (3 << 26)
47#define S3C2416_DSC0_nRBE_MASK (3 << 26)
48
49#define S3C2416_DSC0_nROE (S3C2416_SELECT_DSC0 | 24)
50#define S3C2416_DSC0_nROE_5mA (0 << 24)
51#define S3C2416_DSC0_nROE_10mA (1 << 24)
52#define S3C2416_DSC0_nROE_15mA (2 << 24)
53#define S3C2416_DSC0_nROE_21mA (3 << 24)
54#define S3C2416_DSC0_nROE_MASK (3 << 24)
55
56#endif
57
22#if defined(CONFIG_CPU_S3C244X) 58#if defined(CONFIG_CPU_S3C244X)
23 59
24#define S3C2440_DSC0 S3C2410_GPIOREG(0xc4) 60#define S3C2440_DSC0 S3C2410_GPIOREG(0xc4)
diff --git a/arch/arm/mach-s3c2410/include/mach/regs-gpio.h b/arch/arm/mach-s3c2410/include/mach/regs-gpio.h
index fd672f330bf2..a6384239eddf 100644
--- a/arch/arm/mach-s3c2410/include/mach/regs-gpio.h
+++ b/arch/arm/mach-s3c2410/include/mach/regs-gpio.h
@@ -610,35 +610,73 @@
610#define S3C2410_GPHUP S3C2410_GPIOREG(0x78) 610#define S3C2410_GPHUP S3C2410_GPIOREG(0x78)
611 611
612#define S3C2410_GPH0_nCTS0 (0x02 << 0) 612#define S3C2410_GPH0_nCTS0 (0x02 << 0)
613#define S3C2416_GPH0_TXD0 (0x02 << 0)
613 614
614#define S3C2410_GPH1_nRTS0 (0x02 << 2) 615#define S3C2410_GPH1_nRTS0 (0x02 << 2)
616#define S3C2416_GPH1_RXD0 (0x02 << 2)
615 617
616#define S3C2410_GPH2_TXD0 (0x02 << 4) 618#define S3C2410_GPH2_TXD0 (0x02 << 4)
619#define S3C2416_GPH2_TXD1 (0x02 << 4)
617 620
618#define S3C2410_GPH3_RXD0 (0x02 << 6) 621#define S3C2410_GPH3_RXD0 (0x02 << 6)
622#define S3C2416_GPH3_RXD1 (0x02 << 6)
619 623
620#define S3C2410_GPH4_TXD1 (0x02 << 8) 624#define S3C2410_GPH4_TXD1 (0x02 << 8)
625#define S3C2416_GPH4_TXD2 (0x02 << 8)
621 626
622#define S3C2410_GPH5_RXD1 (0x02 << 10) 627#define S3C2410_GPH5_RXD1 (0x02 << 10)
628#define S3C2416_GPH5_RXD2 (0x02 << 10)
623 629
624#define S3C2410_GPH6_TXD2 (0x02 << 12) 630#define S3C2410_GPH6_TXD2 (0x02 << 12)
631#define S3C2416_GPH6_TXD3 (0x02 << 12)
625#define S3C2410_GPH6_nRTS1 (0x03 << 12) 632#define S3C2410_GPH6_nRTS1 (0x03 << 12)
633#define S3C2416_GPH6_nRTS2 (0x03 << 12)
626 634
627#define S3C2410_GPH7_RXD2 (0x02 << 14) 635#define S3C2410_GPH7_RXD2 (0x02 << 14)
636#define S3C2416_GPH7_RXD3 (0x02 << 14)
628#define S3C2410_GPH7_nCTS1 (0x03 << 14) 637#define S3C2410_GPH7_nCTS1 (0x03 << 14)
638#define S3C2416_GPH7_nCTS2 (0x03 << 14)
629 639
630#define S3C2410_GPH8_UCLK (0x02 << 16) 640#define S3C2410_GPH8_UCLK (0x02 << 16)
641#define S3C2416_GPH8_nCTS0 (0x02 << 16)
631 642
632#define S3C2410_GPH9_CLKOUT0 (0x02 << 18) 643#define S3C2410_GPH9_CLKOUT0 (0x02 << 18)
633#define S3C2442_GPH9_nSPICS0 (0x03 << 18) 644#define S3C2442_GPH9_nSPICS0 (0x03 << 18)
645#define S3C2416_GPH9_nRTS0 (0x02 << 18)
634 646
635#define S3C2410_GPH10_CLKOUT1 (0x02 << 20) 647#define S3C2410_GPH10_CLKOUT1 (0x02 << 20)
648#define S3C2416_GPH10_nCTS1 (0x02 << 20)
649
650#define S3C2416_GPH11_nRTS1 (0x02 << 22)
651
652#define S3C2416_GPH12_EXTUARTCLK (0x02 << 24)
653
654#define S3C2416_GPH13_CLKOUT0 (0x02 << 26)
655
656#define S3C2416_GPH14_CLKOUT1 (0x02 << 28)
636 657
637/* The S3C2412 and S3C2413 move the GPJ register set to after 658/* The S3C2412 and S3C2413 move the GPJ register set to after
638 * GPH, which means all registers after 0x80 are now offset by 0x10 659 * GPH, which means all registers after 0x80 are now offset by 0x10
639 * for the 2412/2413 from the 2410/2440/2442 660 * for the 2412/2413 from the 2410/2440/2442
640*/ 661*/
641 662
663/* S3C2443 and above */
664#define S3C2440_GPJCON S3C2410_GPIOREG(0xD0)
665#define S3C2440_GPJDAT S3C2410_GPIOREG(0xD4)
666#define S3C2440_GPJUP S3C2410_GPIOREG(0xD8)
667
668#define S3C2443_GPKCON S3C2410_GPIOREG(0xE0)
669#define S3C2443_GPKDAT S3C2410_GPIOREG(0xE4)
670#define S3C2443_GPKUP S3C2410_GPIOREG(0xE8)
671
672#define S3C2443_GPLCON S3C2410_GPIOREG(0xF0)
673#define S3C2443_GPLDAT S3C2410_GPIOREG(0xF4)
674#define S3C2443_GPLUP S3C2410_GPIOREG(0xF8)
675
676#define S3C2443_GPMCON S3C2410_GPIOREG(0x100)
677#define S3C2443_GPMDAT S3C2410_GPIOREG(0x104)
678#define S3C2443_GPMUP S3C2410_GPIOREG(0x108)
679
642/* miscellaneous control */ 680/* miscellaneous control */
643#define S3C2400_MISCCR S3C2410_GPIOREG(0x54) 681#define S3C2400_MISCCR S3C2410_GPIOREG(0x54)
644#define S3C2410_MISCCR S3C2410_GPIOREG(0x80) 682#define S3C2410_MISCCR S3C2410_GPIOREG(0x80)
@@ -686,6 +724,7 @@
686#define S3C2412_MISCCR_CLK1_CLKsrc (0<<8) 724#define S3C2412_MISCCR_CLK1_CLKsrc (0<<8)
687 725
688#define S3C2410_MISCCR_USBSUSPND0 (1<<12) 726#define S3C2410_MISCCR_USBSUSPND0 (1<<12)
727#define S3C2416_MISCCR_SEL_SUSPND (1<<12)
689#define S3C2410_MISCCR_USBSUSPND1 (1<<13) 728#define S3C2410_MISCCR_USBSUSPND1 (1<<13)
690 729
691#define S3C2410_MISCCR_nRSTCON (1<<16) 730#define S3C2410_MISCCR_nRSTCON (1<<16)
@@ -695,6 +734,9 @@
695#define S3C2410_MISCCR_nEN_SCLKE (1<<19) /* not 2412 */ 734#define S3C2410_MISCCR_nEN_SCLKE (1<<19) /* not 2412 */
696#define S3C2410_MISCCR_SDSLEEP (7<<17) 735#define S3C2410_MISCCR_SDSLEEP (7<<17)
697 736
737#define S3C2416_MISCCR_FLT_I2C (1<<24)
738#define S3C2416_MISCCR_HSSPI_EN2 (1<<31)
739
698/* external interrupt control... */ 740/* external interrupt control... */
699/* S3C2410_EXTINT0 -> irq sense control for EINT0..EINT7 741/* S3C2410_EXTINT0 -> irq sense control for EINT0..EINT7
700 * S3C2410_EXTINT1 -> irq sense control for EINT8..EINT15 742 * S3C2410_EXTINT1 -> irq sense control for EINT8..EINT15
@@ -762,8 +804,11 @@
762#define S3C2410_GSTATUS1_IDMASK (0xffff0000) 804#define S3C2410_GSTATUS1_IDMASK (0xffff0000)
763#define S3C2410_GSTATUS1_2410 (0x32410000) 805#define S3C2410_GSTATUS1_2410 (0x32410000)
764#define S3C2410_GSTATUS1_2412 (0x32412001) 806#define S3C2410_GSTATUS1_2412 (0x32412001)
807#define S3C2410_GSTATUS1_2416 (0x32416003)
765#define S3C2410_GSTATUS1_2440 (0x32440000) 808#define S3C2410_GSTATUS1_2440 (0x32440000)
766#define S3C2410_GSTATUS1_2442 (0x32440aaa) 809#define S3C2410_GSTATUS1_2442 (0x32440aaa)
810/* some 2416 CPUs report this value also */
811#define S3C2410_GSTATUS1_2450 (0x32450003)
767 812
768#define S3C2410_GSTATUS2_WTRESET (1<<2) 813#define S3C2410_GSTATUS2_WTRESET (1<<2)
769#define S3C2410_GSTATUS2_OFFRESET (1<<1) 814#define S3C2410_GSTATUS2_OFFRESET (1<<1)
diff --git a/arch/arm/mach-s3c2410/include/mach/regs-gpioj.h b/arch/arm/mach-s3c2410/include/mach/regs-gpioj.h
index 1202ca5e99f6..19575e061114 100644
--- a/arch/arm/mach-s3c2410/include/mach/regs-gpioj.h
+++ b/arch/arm/mach-s3c2410/include/mach/regs-gpioj.h
@@ -22,85 +22,49 @@
22 * pull up works like all other ports. 22 * pull up works like all other ports.
23*/ 23*/
24 24
25#define S3C2440_GPIO_BANKJ (416)
26
27#define S3C2440_GPJCON S3C2410_GPIOREG(0xd0)
28#define S3C2440_GPJDAT S3C2410_GPIOREG(0xd4)
29#define S3C2440_GPJUP S3C2410_GPIOREG(0xd8)
30
31#define S3C2413_GPJCON S3C2410_GPIOREG(0x80) 25#define S3C2413_GPJCON S3C2410_GPIOREG(0x80)
32#define S3C2413_GPJDAT S3C2410_GPIOREG(0x84) 26#define S3C2413_GPJDAT S3C2410_GPIOREG(0x84)
33#define S3C2413_GPJUP S3C2410_GPIOREG(0x88) 27#define S3C2413_GPJUP S3C2410_GPIOREG(0x88)
34#define S3C2413_GPJSLPCON S3C2410_GPIOREG(0x8C) 28#define S3C2413_GPJSLPCON S3C2410_GPIOREG(0x8C)
35 29
36#define S3C2440_GPJ0 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 0)
37#define S3C2440_GPJ0_INP (0x00 << 0)
38#define S3C2440_GPJ0_OUTP (0x01 << 0) 30#define S3C2440_GPJ0_OUTP (0x01 << 0)
39#define S3C2440_GPJ0_CAMDATA0 (0x02 << 0) 31#define S3C2440_GPJ0_CAMDATA0 (0x02 << 0)
40 32
41#define S3C2440_GPJ1 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 1)
42#define S3C2440_GPJ1_INP (0x00 << 2)
43#define S3C2440_GPJ1_OUTP (0x01 << 2) 33#define S3C2440_GPJ1_OUTP (0x01 << 2)
44#define S3C2440_GPJ1_CAMDATA1 (0x02 << 2) 34#define S3C2440_GPJ1_CAMDATA1 (0x02 << 2)
45 35
46#define S3C2440_GPJ2 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 2)
47#define S3C2440_GPJ2_INP (0x00 << 4)
48#define S3C2440_GPJ2_OUTP (0x01 << 4) 36#define S3C2440_GPJ2_OUTP (0x01 << 4)
49#define S3C2440_GPJ2_CAMDATA2 (0x02 << 4) 37#define S3C2440_GPJ2_CAMDATA2 (0x02 << 4)
50 38
51#define S3C2440_GPJ3 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 3)
52#define S3C2440_GPJ3_INP (0x00 << 6)
53#define S3C2440_GPJ3_OUTP (0x01 << 6) 39#define S3C2440_GPJ3_OUTP (0x01 << 6)
54#define S3C2440_GPJ3_CAMDATA3 (0x02 << 6) 40#define S3C2440_GPJ3_CAMDATA3 (0x02 << 6)
55 41
56#define S3C2440_GPJ4 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 4)
57#define S3C2440_GPJ4_INP (0x00 << 8)
58#define S3C2440_GPJ4_OUTP (0x01 << 8) 42#define S3C2440_GPJ4_OUTP (0x01 << 8)
59#define S3C2440_GPJ4_CAMDATA4 (0x02 << 8) 43#define S3C2440_GPJ4_CAMDATA4 (0x02 << 8)
60 44
61#define S3C2440_GPJ5 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 5)
62#define S3C2440_GPJ5_INP (0x00 << 10)
63#define S3C2440_GPJ5_OUTP (0x01 << 10) 45#define S3C2440_GPJ5_OUTP (0x01 << 10)
64#define S3C2440_GPJ5_CAMDATA5 (0x02 << 10) 46#define S3C2440_GPJ5_CAMDATA5 (0x02 << 10)
65 47
66#define S3C2440_GPJ6 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 6)
67#define S3C2440_GPJ6_INP (0x00 << 12)
68#define S3C2440_GPJ6_OUTP (0x01 << 12) 48#define S3C2440_GPJ6_OUTP (0x01 << 12)
69#define S3C2440_GPJ6_CAMDATA6 (0x02 << 12) 49#define S3C2440_GPJ6_CAMDATA6 (0x02 << 12)
70 50
71#define S3C2440_GPJ7 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 7)
72#define S3C2440_GPJ7_INP (0x00 << 14)
73#define S3C2440_GPJ7_OUTP (0x01 << 14) 51#define S3C2440_GPJ7_OUTP (0x01 << 14)
74#define S3C2440_GPJ7_CAMDATA7 (0x02 << 14) 52#define S3C2440_GPJ7_CAMDATA7 (0x02 << 14)
75 53
76#define S3C2440_GPJ8 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 8)
77#define S3C2440_GPJ8_INP (0x00 << 16)
78#define S3C2440_GPJ8_OUTP (0x01 << 16) 54#define S3C2440_GPJ8_OUTP (0x01 << 16)
79#define S3C2440_GPJ8_CAMPCLK (0x02 << 16) 55#define S3C2440_GPJ8_CAMPCLK (0x02 << 16)
80 56
81#define S3C2440_GPJ9 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 9)
82#define S3C2440_GPJ9_INP (0x00 << 18)
83#define S3C2440_GPJ9_OUTP (0x01 << 18) 57#define S3C2440_GPJ9_OUTP (0x01 << 18)
84#define S3C2440_GPJ9_CAMVSYNC (0x02 << 18) 58#define S3C2440_GPJ9_CAMVSYNC (0x02 << 18)
85 59
86#define S3C2440_GPJ10 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 10)
87#define S3C2440_GPJ10_INP (0x00 << 20)
88#define S3C2440_GPJ10_OUTP (0x01 << 20) 60#define S3C2440_GPJ10_OUTP (0x01 << 20)
89#define S3C2440_GPJ10_CAMHREF (0x02 << 20) 61#define S3C2440_GPJ10_CAMHREF (0x02 << 20)
90 62
91#define S3C2440_GPJ11 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 11)
92#define S3C2440_GPJ11_INP (0x00 << 22)
93#define S3C2440_GPJ11_OUTP (0x01 << 22) 63#define S3C2440_GPJ11_OUTP (0x01 << 22)
94#define S3C2440_GPJ11_CAMCLKOUT (0x02 << 22) 64#define S3C2440_GPJ11_CAMCLKOUT (0x02 << 22)
95 65
96#define S3C2440_GPJ12 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 12)
97#define S3C2440_GPJ12_INP (0x00 << 24)
98#define S3C2440_GPJ12_OUTP (0x01 << 24) 66#define S3C2440_GPJ12_OUTP (0x01 << 24)
99#define S3C2440_GPJ12_CAMRESET (0x02 << 24) 67#define S3C2440_GPJ12_CAMRESET (0x02 << 24)
100 68
101#define S3C2443_GPJ13 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 13)
102#define S3C2443_GPJ14 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 14)
103#define S3C2443_GPJ15 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 15)
104
105#endif /* __ASM_ARCH_REGS_GPIOJ_H */ 69#endif /* __ASM_ARCH_REGS_GPIOJ_H */
106 70
diff --git a/arch/arm/mach-s3c2410/include/mach/regs-irq.h b/arch/arm/mach-s3c2410/include/mach/regs-irq.h
index de86ee8812bd..0f07ba30b1fb 100644
--- a/arch/arm/mach-s3c2410/include/mach/regs-irq.h
+++ b/arch/arm/mach-s3c2410/include/mach/regs-irq.h
@@ -27,6 +27,16 @@
27#define S3C2410_SUBSRCPND S3C2410_IRQREG(0x018) 27#define S3C2410_SUBSRCPND S3C2410_IRQREG(0x018)
28#define S3C2410_INTSUBMSK S3C2410_IRQREG(0x01C) 28#define S3C2410_INTSUBMSK S3C2410_IRQREG(0x01C)
29 29
30#define S3C2416_PRIORITY_MODE1 S3C2410_IRQREG(0x030)
31#define S3C2416_PRIORITY_UPDATE1 S3C2410_IRQREG(0x034)
32#define S3C2416_SRCPND2 S3C2410_IRQREG(0x040)
33#define S3C2416_INTMOD2 S3C2410_IRQREG(0x044)
34#define S3C2416_INTMSK2 S3C2410_IRQREG(0x048)
35#define S3C2416_INTPND2 S3C2410_IRQREG(0x050)
36#define S3C2416_INTOFFSET2 S3C2410_IRQREG(0x054)
37#define S3C2416_PRIORITY_MODE2 S3C2410_IRQREG(0x070)
38#define S3C2416_PRIORITY_UPDATE2 S3C2410_IRQREG(0x074)
39
30/* mask: 0=enable, 1=disable 40/* mask: 0=enable, 1=disable
31 * 1 bit EINT, 4=EINT4, 23=EINT23 41 * 1 bit EINT, 4=EINT4, 23=EINT23
32 * EINT0,1,2,3 are not handled here. 42 * EINT0,1,2,3 are not handled here.
diff --git a/arch/arm/mach-s3c2410/include/mach/regs-s3c2416-mem.h b/arch/arm/mach-s3c2410/include/mach/regs-s3c2416-mem.h
new file mode 100644
index 000000000000..2f31b74974af
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/regs-s3c2416-mem.h
@@ -0,0 +1,30 @@
1/* arch/arm/mach-s3c2410/include/mach/regs-s3c2416-mem.h
2 *
3 * Copyright (c) 2009 Yauhen Kharuzhy <jekhor@gmail.com>,
4 * as part of OpenInkpot project
5 * Copyright (c) 2009 Promwad Innovation Company
6 * Yauhen Kharuzhy <yauhen.kharuzhy@promwad.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 * S3C2416 memory register definitions
13*/
14
15#ifndef __ASM_ARM_REGS_S3C2416_MEM
16#define __ASM_ARM_REGS_S3C2416_MEM
17
18#ifndef S3C2416_MEMREG
19#define S3C2416_MEMREG(x) (S3C24XX_VA_MEMCTRL + (x))
20#endif
21
22#define S3C2416_BANKCFG S3C2416_MEMREG(0x00)
23#define S3C2416_BANKCON1 S3C2416_MEMREG(0x04)
24#define S3C2416_BANKCON2 S3C2416_MEMREG(0x08)
25#define S3C2416_BANKCON3 S3C2416_MEMREG(0x0C)
26
27#define S3C2416_REFRESH S3C2416_MEMREG(0x10)
28#define S3C2416_TIMEOUT S3C2416_MEMREG(0x14)
29
30#endif /* __ASM_ARM_REGS_S3C2416_MEM */
diff --git a/arch/arm/mach-s3c2410/include/mach/regs-s3c2416.h b/arch/arm/mach-s3c2410/include/mach/regs-s3c2416.h
new file mode 100644
index 000000000000..e443167efb87
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/regs-s3c2416.h
@@ -0,0 +1,24 @@
1/* arch/arm/mach-s3c2410/include/mach/regs-s3c2416.h
2 *
3 * Copyright (c) 2009 Yauhen Kharuzhy <jekhor@gmail.com>,
4 * as part of OpenInkpot project
5 * Copyright (c) 2009 Promwad Innovation Company
6 * Yauhen Kharuzhy <yauhen.kharuzhy@promwad.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 * S3C2416 specific register definitions
13*/
14
15#ifndef __ASM_ARCH_REGS_S3C2416_H
16#define __ASM_ARCH_REGS_S3C2416_H "s3c2416"
17
18#define S3C2416_SWRST (S3C24XX_VA_CLKPWR + 0x44)
19#define S3C2416_SWRST_RESET (0x533C2416)
20
21/* see regs-power.h for the other registers in the power block. */
22
23#endif /* __ASM_ARCH_REGS_S3C2416_H */
24
diff --git a/arch/arm/mach-s3c2410/include/mach/uncompress.h b/arch/arm/mach-s3c2410/include/mach/uncompress.h
index 72f756c5e504..8b283f847daa 100644
--- a/arch/arm/mach-s3c2410/include/mach/uncompress.h
+++ b/arch/arm/mach-s3c2410/include/mach/uncompress.h
@@ -40,7 +40,9 @@ static void arch_detect_cpu(void)
40 cpuid &= S3C2410_GSTATUS1_IDMASK; 40 cpuid &= S3C2410_GSTATUS1_IDMASK;
41 41
42 if (is_arm926() || cpuid == S3C2410_GSTATUS1_2440 || 42 if (is_arm926() || cpuid == S3C2410_GSTATUS1_2440 ||
43 cpuid == S3C2410_GSTATUS1_2442) { 43 cpuid == S3C2410_GSTATUS1_2442 ||
44 cpuid == S3C2410_GSTATUS1_2416 ||
45 cpuid == S3C2410_GSTATUS1_2450) {
44 fifo_mask = S3C2440_UFSTAT_TXMASK; 46 fifo_mask = S3C2440_UFSTAT_TXMASK;
45 fifo_max = 63 << S3C2440_UFSTAT_TXSHIFT; 47 fifo_max = 63 << S3C2440_UFSTAT_TXSHIFT;
46 } else { 48 } else {
diff --git a/arch/arm/mach-s3c2410/mach-amlm5900.c b/arch/arm/mach-s3c2410/mach-amlm5900.c
index 7047317ed7f4..34fc05a4244b 100644
--- a/arch/arm/mach-s3c2410/mach-amlm5900.c
+++ b/arch/arm/mach-s3c2410/mach-amlm5900.c
@@ -56,6 +56,7 @@
56#include <plat/iic.h> 56#include <plat/iic.h>
57#include <plat/devs.h> 57#include <plat/devs.h>
58#include <plat/cpu.h> 58#include <plat/cpu.h>
59#include <plat/gpio-cfg.h>
59 60
60#ifdef CONFIG_MTD_PARTITIONS 61#ifdef CONFIG_MTD_PARTITIONS
61 62
@@ -225,8 +226,8 @@ static void amlm5900_init_pm(void)
225 } else { 226 } else {
226 enable_irq_wake(IRQ_EINT9); 227 enable_irq_wake(IRQ_EINT9);
227 /* configure the suspend/resume status pin */ 228 /* configure the suspend/resume status pin */
228 s3c2410_gpio_cfgpin(S3C2410_GPF(2), S3C2410_GPIO_OUTPUT); 229 s3c_gpio_cfgpin(S3C2410_GPF(2), S3C2410_GPIO_OUTPUT);
229 s3c2410_gpio_pullup(S3C2410_GPF(2), 0); 230 s3c_gpio_setpull(S3C2410_GPF(2), S3C_GPIO_PULL_UP);
230 } 231 }
231} 232}
232static void __init amlm5900_init(void) 233static void __init amlm5900_init(void)
diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c
index 02b1b6220cba..b061ddcf3067 100644
--- a/arch/arm/mach-s3c2410/mach-bast.c
+++ b/arch/arm/mach-s3c2410/mach-bast.c
@@ -61,6 +61,7 @@
61#include <plat/devs.h> 61#include <plat/devs.h>
62#include <plat/cpu.h> 62#include <plat/cpu.h>
63#include <plat/cpu-freq.h> 63#include <plat/cpu-freq.h>
64#include <plat/gpio-cfg.h>
64#include <plat/audio-simtec.h> 65#include <plat/audio-simtec.h>
65 66
66#include "usb-simtec.h" 67#include "usb-simtec.h"
@@ -216,15 +217,13 @@ static struct s3c2410_uartcfg bast_uartcfgs[] __initdata = {
216static int bast_pm_suspend(struct sys_device *sd, pm_message_t state) 217static int bast_pm_suspend(struct sys_device *sd, pm_message_t state)
217{ 218{
218 /* ensure that an nRESET is not generated on resume. */ 219 /* ensure that an nRESET is not generated on resume. */
219 s3c2410_gpio_setpin(S3C2410_GPA(21), 1); 220 gpio_direction_output(S3C2410_GPA(21), 1);
220 s3c2410_gpio_cfgpin(S3C2410_GPA(21), S3C2410_GPIO_OUTPUT);
221
222 return 0; 221 return 0;
223} 222}
224 223
225static int bast_pm_resume(struct sys_device *sd) 224static int bast_pm_resume(struct sys_device *sd)
226{ 225{
227 s3c2410_gpio_cfgpin(S3C2410_GPA(21), S3C2410_GPA21_nRSTOUT); 226 s3c_gpio_cfgpin(S3C2410_GPA(21), S3C2410_GPA21_nRSTOUT);
228 return 0; 227 return 0;
229} 228}
230 229
@@ -658,6 +657,8 @@ static void __init bast_init(void)
658 nor_simtec_init(); 657 nor_simtec_init();
659 simtec_audio_add(NULL, true, &bast_audio); 658 simtec_audio_add(NULL, true, &bast_audio);
660 659
660 WARN_ON(gpio_request(S3C2410_GPA(21), "bast nreset"));
661
661 s3c_cpufreq_setboard(&bast_cpufreq); 662 s3c_cpufreq_setboard(&bast_cpufreq);
662} 663}
663 664
diff --git a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c
index fbedd0760941..9531b4c41deb 100644
--- a/arch/arm/mach-s3c2410/mach-h1940.c
+++ b/arch/arm/mach-s3c2410/mach-h1940.c
@@ -50,6 +50,7 @@
50#include <plat/udc.h> 50#include <plat/udc.h>
51#include <plat/iic.h> 51#include <plat/iic.h>
52 52
53#include <plat/gpio-cfg.h>
53#include <plat/clock.h> 54#include <plat/clock.h>
54#include <plat/devs.h> 55#include <plat/devs.h>
55#include <plat/cpu.h> 56#include <plat/cpu.h>
@@ -207,16 +208,16 @@ static int h1940_backlight_init(struct device *dev)
207{ 208{
208 gpio_request(S3C2410_GPB(0), "Backlight"); 209 gpio_request(S3C2410_GPB(0), "Backlight");
209 210
210 s3c2410_gpio_setpin(S3C2410_GPB(0), 0); 211 gpio_direction_output(S3C2410_GPB(0), 0);
211 s3c2410_gpio_pullup(S3C2410_GPB(0), 0); 212 s3c_gpio_setpull(S3C2410_GPB(0), S3C_GPIO_PULL_NONE);
212 s3c2410_gpio_cfgpin(S3C2410_GPB(0), S3C2410_GPB0_TOUT0); 213 s3c_gpio_cfgpin(S3C2410_GPB(0), S3C2410_GPB0_TOUT0);
213 214
214 return 0; 215 return 0;
215} 216}
216 217
217static void h1940_backlight_exit(struct device *dev) 218static void h1940_backlight_exit(struct device *dev)
218{ 219{
219 s3c2410_gpio_cfgpin(S3C2410_GPB(0), 1/*S3C2410_GPB0_OUTP*/); 220 gpio_direction_output(S3C2410_GPB(0), 1);
220} 221}
221 222
222static struct platform_pwm_backlight_data backlight_data = { 223static struct platform_pwm_backlight_data backlight_data = {
@@ -245,18 +246,18 @@ static void h1940_lcd_power_set(struct plat_lcd_data *pd,
245 246
246 if (!power) { 247 if (!power) {
247 /* set to 3ec */ 248 /* set to 3ec */
248 s3c2410_gpio_setpin(S3C2410_GPC(0), 0); 249 gpio_direction_output(S3C2410_GPC(0), 0);
249 /* wait for 3ac */ 250 /* wait for 3ac */
250 do { 251 do {
251 value = s3c2410_gpio_getpin(S3C2410_GPC(6)); 252 value = gpio_get_value(S3C2410_GPC(6));
252 } while (value); 253 } while (value);
253 /* set to 38c */ 254 /* set to 38c */
254 s3c2410_gpio_setpin(S3C2410_GPC(5), 0); 255 gpio_direction_output(S3C2410_GPC(5), 0);
255 } else { 256 } else {
256 /* Set to 3ac */ 257 /* Set to 3ac */
257 s3c2410_gpio_setpin(S3C2410_GPC(5), 1); 258 gpio_direction_output(S3C2410_GPC(5), 1);
258 /* Set to 3ad */ 259 /* Set to 3ad */
259 s3c2410_gpio_setpin(S3C2410_GPC(0), 1); 260 gpio_direction_output(S3C2410_GPC(0), 1);
260 } 261 }
261} 262}
262 263
@@ -332,6 +333,7 @@ static void __init h1940_init(void)
332 gpio_request(S3C2410_GPC(5), "LCD power"); 333 gpio_request(S3C2410_GPC(5), "LCD power");
333 gpio_request(S3C2410_GPC(6), "LCD power"); 334 gpio_request(S3C2410_GPC(6), "LCD power");
334 335
336 gpio_direction_input(S3C2410_GPC(6));
335 337
336 platform_add_devices(h1940_devices, ARRAY_SIZE(h1940_devices)); 338 platform_add_devices(h1940_devices, ARRAY_SIZE(h1940_devices));
337} 339}
diff --git a/arch/arm/mach-s3c2410/mach-n30.c b/arch/arm/mach-s3c2410/mach-n30.c
index 684710f88142..75a9fd37a467 100644
--- a/arch/arm/mach-s3c2410/mach-n30.c
+++ b/arch/arm/mach-s3c2410/mach-n30.c
@@ -86,10 +86,10 @@ static void n30_udc_pullup(enum s3c2410_udc_cmd_e cmd)
86{ 86{
87 switch (cmd) { 87 switch (cmd) {
88 case S3C2410_UDC_P_ENABLE : 88 case S3C2410_UDC_P_ENABLE :
89 s3c2410_gpio_setpin(S3C2410_GPB(3), 1); 89 gpio_set_value(S3C2410_GPB(3), 1);
90 break; 90 break;
91 case S3C2410_UDC_P_DISABLE : 91 case S3C2410_UDC_P_DISABLE :
92 s3c2410_gpio_setpin(S3C2410_GPB(3), 0); 92 gpio_set_value(S3C2410_GPB(3), 0);
93 break; 93 break;
94 case S3C2410_UDC_P_RESET : 94 case S3C2410_UDC_P_RESET :
95 break; 95 break;
@@ -536,6 +536,9 @@ static void __init n30_init(void)
536 536
537 platform_add_devices(n35_devices, ARRAY_SIZE(n35_devices)); 537 platform_add_devices(n35_devices, ARRAY_SIZE(n35_devices));
538 } 538 }
539
540 WARN_ON(gpio_request(S3C2410_GPB(3), "udc pup"));
541 gpio_direction_output(S3C2410_GPB(3), 0);
539} 542}
540 543
541MACHINE_START(N30, "Acer-N30") 544MACHINE_START(N30, "Acer-N30")
diff --git a/arch/arm/mach-s3c2410/mach-qt2410.c b/arch/arm/mach-s3c2410/mach-qt2410.c
index 92a4ec375d82..d0e87b6e2e0f 100644
--- a/arch/arm/mach-s3c2410/mach-qt2410.c
+++ b/arch/arm/mach-s3c2410/mach-qt2410.c
@@ -58,6 +58,7 @@
58#include <plat/iic.h> 58#include <plat/iic.h>
59 59
60#include <plat/common-smdk.h> 60#include <plat/common-smdk.h>
61#include <plat/gpio-cfg.h>
61#include <plat/devs.h> 62#include <plat/devs.h>
62#include <plat/cpu.h> 63#include <plat/cpu.h>
63#include <plat/pm.h> 64#include <plat/pm.h>
@@ -219,10 +220,10 @@ static void spi_gpio_cs(struct s3c2410_spigpio_info *spi, int cs)
219{ 220{
220 switch (cs) { 221 switch (cs) {
221 case BITBANG_CS_ACTIVE: 222 case BITBANG_CS_ACTIVE:
222 s3c2410_gpio_setpin(S3C2410_GPB(5), 0); 223 gpio_set_value(S3C2410_GPB(5), 0);
223 break; 224 break;
224 case BITBANG_CS_INACTIVE: 225 case BITBANG_CS_INACTIVE:
225 s3c2410_gpio_setpin(S3C2410_GPB(5), 1); 226 gpio_set_value(S3C2410_GPB(5), 1);
226 break; 227 break;
227 } 228 }
228} 229}
@@ -347,13 +348,14 @@ static void __init qt2410_machine_init(void)
347 } 348 }
348 s3c24xx_fb_set_platdata(&qt2410_fb_info); 349 s3c24xx_fb_set_platdata(&qt2410_fb_info);
349 350
350 s3c2410_gpio_cfgpin(S3C2410_GPB(0), S3C2410_GPIO_OUTPUT); 351 s3c_gpio_cfgpin(S3C2410_GPB(0), S3C2410_GPIO_OUTPUT);
351 s3c2410_gpio_setpin(S3C2410_GPB(0), 1); 352 s3c2410_gpio_setpin(S3C2410_GPB(0), 1);
352 353
353 s3c24xx_udc_set_platdata(&qt2410_udc_cfg); 354 s3c24xx_udc_set_platdata(&qt2410_udc_cfg);
354 s3c_i2c0_set_platdata(NULL); 355 s3c_i2c0_set_platdata(NULL);
355 356
356 s3c2410_gpio_cfgpin(S3C2410_GPB(5), S3C2410_GPIO_OUTPUT); 357 WARN_ON(gpio_request(S3C2410_GPB(5), "spi cs"));
358 gpio_direction_output(S3C2410_GPB(5), 1);
357 359
358 platform_add_devices(qt2410_devices, ARRAY_SIZE(qt2410_devices)); 360 platform_add_devices(qt2410_devices, ARRAY_SIZE(qt2410_devices));
359 s3c_pm_init(); 361 s3c_pm_init();
diff --git a/arch/arm/mach-s3c2410/mach-vr1000.c b/arch/arm/mach-s3c2410/mach-vr1000.c
index 9051f0d31123..d540d79dd264 100644
--- a/arch/arm/mach-s3c2410/mach-vr1000.c
+++ b/arch/arm/mach-s3c2410/mach-vr1000.c
@@ -357,8 +357,7 @@ static struct clk *vr1000_clocks[] __initdata = {
357 357
358static void vr1000_power_off(void) 358static void vr1000_power_off(void)
359{ 359{
360 s3c2410_gpio_cfgpin(S3C2410_GPB(9), S3C2410_GPIO_OUTPUT); 360 gpio_direction_output(S3C2410_GPB(9), 1);
361 s3c2410_gpio_setpin(S3C2410_GPB(9), 1);
362} 361}
363 362
364static void __init vr1000_map_io(void) 363static void __init vr1000_map_io(void)
@@ -395,6 +394,8 @@ static void __init vr1000_init(void)
395 394
396 nor_simtec_init(); 395 nor_simtec_init();
397 simtec_audio_add(NULL, true, NULL); 396 simtec_audio_add(NULL, true, NULL);
397
398 WARN_ON(gpio_request(S3C2410_GPB(9), "power off"));
398} 399}
399 400
400MACHINE_START(VR1000, "Thorcom-VR1000") 401MACHINE_START(VR1000, "Thorcom-VR1000")
diff --git a/arch/arm/mach-s3c2410/s3c2410.c b/arch/arm/mach-s3c2410/s3c2410.c
index 91ba42f688ac..adc90a3c5890 100644
--- a/arch/arm/mach-s3c2410/s3c2410.c
+++ b/arch/arm/mach-s3c2410/s3c2410.c
@@ -16,6 +16,7 @@
16#include <linux/list.h> 16#include <linux/list.h>
17#include <linux/timer.h> 17#include <linux/timer.h>
18#include <linux/init.h> 18#include <linux/init.h>
19#include <linux/gpio.h>
19#include <linux/clk.h> 20#include <linux/clk.h>
20#include <linux/sysdev.h> 21#include <linux/sysdev.h>
21#include <linux/serial_core.h> 22#include <linux/serial_core.h>
@@ -40,6 +41,10 @@
40#include <plat/clock.h> 41#include <plat/clock.h>
41#include <plat/pll.h> 42#include <plat/pll.h>
42 43
44#include <plat/gpio-core.h>
45#include <plat/gpio-cfg.h>
46#include <plat/gpio-cfg-helpers.h>
47
43/* Initial IO mappings */ 48/* Initial IO mappings */
44 49
45static struct map_desc s3c2410_iodesc[] __initdata = { 50static struct map_desc s3c2410_iodesc[] __initdata = {
@@ -65,6 +70,9 @@ void __init s3c2410_init_uarts(struct s3c2410_uartcfg *cfg, int no)
65 70
66void __init s3c2410_map_io(void) 71void __init s3c2410_map_io(void)
67{ 72{
73 s3c24xx_gpiocfg_default.set_pull = s3c_gpio_setpull_1up;
74 s3c24xx_gpiocfg_default.get_pull = s3c_gpio_getpull_1up;
75
68 iotable_init(s3c2410_iodesc, ARRAY_SIZE(s3c2410_iodesc)); 76 iotable_init(s3c2410_iodesc, ARRAY_SIZE(s3c2410_iodesc));
69} 77}
70 78
diff --git a/arch/arm/mach-s3c2412/Kconfig b/arch/arm/mach-s3c2412/Kconfig
index 9a8c0657ae50..cef6a65637bd 100644
--- a/arch/arm/mach-s3c2412/Kconfig
+++ b/arch/arm/mach-s3c2412/Kconfig
@@ -16,7 +16,8 @@ config CPU_S3C2412
16config CPU_S3C2412_ONLY 16config CPU_S3C2412_ONLY
17 bool 17 bool
18 depends on ARCH_S3C2410 && !CPU_S3C2400 && !CPU_S3C2410 && \ 18 depends on ARCH_S3C2410 && !CPU_S3C2400 && !CPU_S3C2410 && \
19 !CPU_S3C2440 && !CPU_S3C2442 && !CPU_S3C2443 && CPU_S3C2412 19 !CPU_2416 && !CPU_S3C2440 && !CPU_S3C2442 && \
20 !CPU_S3C2443 && CPU_S3C2412
20 default y if CPU_S3C2412 21 default y if CPU_S3C2412
21 22
22config S3C2412_DMA 23config S3C2412_DMA
diff --git a/arch/arm/mach-s3c2412/mach-jive.c b/arch/arm/mach-s3c2412/mach-jive.c
index 14f4798291aa..43160183571a 100644
--- a/arch/arm/mach-s3c2412/mach-jive.c
+++ b/arch/arm/mach-s3c2412/mach-jive.c
@@ -48,6 +48,7 @@
48#include <linux/mtd/nand_ecc.h> 48#include <linux/mtd/nand_ecc.h>
49#include <linux/mtd/partitions.h> 49#include <linux/mtd/partitions.h>
50 50
51#include <plat/gpio-cfg.h>
51#include <plat/clock.h> 52#include <plat/clock.h>
52#include <plat/devs.h> 53#include <plat/devs.h>
53#include <plat/cpu.h> 54#include <plat/cpu.h>
@@ -357,8 +358,7 @@ static void jive_lcm_reset(unsigned int set)
357{ 358{
358 printk(KERN_DEBUG "%s(%d)\n", __func__, set); 359 printk(KERN_DEBUG "%s(%d)\n", __func__, set);
359 360
360 s3c2410_gpio_setpin(S3C2410_GPG(13), set); 361 gpio_set_value(S3C2410_GPG(13), set);
361 s3c2410_gpio_cfgpin(S3C2410_GPG(13), S3C2410_GPIO_OUTPUT);
362} 362}
363 363
364#undef LCD_UPPER_MARGIN 364#undef LCD_UPPER_MARGIN
@@ -391,7 +391,7 @@ static struct ili9320_platdata jive_lcm_config = {
391 391
392static void jive_lcd_spi_chipselect(struct s3c2410_spigpio_info *spi, int cs) 392static void jive_lcd_spi_chipselect(struct s3c2410_spigpio_info *spi, int cs)
393{ 393{
394 s3c2410_gpio_setpin(S3C2410_GPB(7), cs ? 0 : 1); 394 gpio_set_value(S3C2410_GPB(7), cs ? 0 : 1);
395} 395}
396 396
397static struct s3c2410_spigpio_info jive_lcd_spi = { 397static struct s3c2410_spigpio_info jive_lcd_spi = {
@@ -413,7 +413,7 @@ static struct platform_device jive_device_lcdspi = {
413 413
414static void jive_wm8750_chipselect(struct s3c2410_spigpio_info *spi, int cs) 414static void jive_wm8750_chipselect(struct s3c2410_spigpio_info *spi, int cs)
415{ 415{
416 s3c2410_gpio_setpin(S3C2410_GPH(10), cs ? 0 : 1); 416 gpio_set_value(S3C2410_GPH(10), cs ? 0 : 1);
417} 417}
418 418
419static struct s3c2410_spigpio_info jive_wm8750_spi = { 419static struct s3c2410_spigpio_info jive_wm8750_spi = {
@@ -531,7 +531,7 @@ static void jive_power_off(void)
531 printk(KERN_INFO "powering system down...\n"); 531 printk(KERN_INFO "powering system down...\n");
532 532
533 s3c2410_gpio_setpin(S3C2410_GPC(5), 1); 533 s3c2410_gpio_setpin(S3C2410_GPC(5), 1);
534 s3c2410_gpio_cfgpin(S3C2410_GPC(5), S3C2410_GPIO_OUTPUT); 534 s3c_gpio_cfgpin(S3C2410_GPC(5), S3C2410_GPIO_OUTPUT);
535} 535}
536 536
537static void __init jive_machine_init(void) 537static void __init jive_machine_init(void)
@@ -636,22 +636,22 @@ static void __init jive_machine_init(void)
636 636
637 /* initialise the spi */ 637 /* initialise the spi */
638 638
639 s3c2410_gpio_setpin(S3C2410_GPG(13), 0); 639 gpio_request(S3C2410_GPG(13), "lcm reset");
640 s3c2410_gpio_cfgpin(S3C2410_GPG(13), S3C2410_GPIO_OUTPUT); 640 gpio_direction_output(S3C2410_GPG(13), 0);
641 641
642 s3c2410_gpio_setpin(S3C2410_GPB(7), 1); 642 gpio_request(S3C2410_GPB(7), "jive spi");
643 s3c2410_gpio_cfgpin(S3C2410_GPB(7), S3C2410_GPIO_OUTPUT); 643 gpio_direction_output(S3C2410_GPB(7), 1);
644 644
645 s3c2410_gpio_setpin(S3C2410_GPB(6), 0); 645 s3c2410_gpio_setpin(S3C2410_GPB(6), 0);
646 s3c2410_gpio_cfgpin(S3C2410_GPB(6), S3C2410_GPIO_OUTPUT); 646 s3c_gpio_cfgpin(S3C2410_GPB(6), S3C2410_GPIO_OUTPUT);
647 647
648 s3c2410_gpio_setpin(S3C2410_GPG(8), 1); 648 s3c2410_gpio_setpin(S3C2410_GPG(8), 1);
649 s3c2410_gpio_cfgpin(S3C2410_GPG(8), S3C2410_GPIO_OUTPUT); 649 s3c_gpio_cfgpin(S3C2410_GPG(8), S3C2410_GPIO_OUTPUT);
650 650
651 /* initialise the WM8750 spi */ 651 /* initialise the WM8750 spi */
652 652
653 s3c2410_gpio_setpin(S3C2410_GPH(10), 1); 653 gpio_request(S3C2410_GPH(10), "jive wm8750 spi");
654 s3c2410_gpio_cfgpin(S3C2410_GPH(10), S3C2410_GPIO_OUTPUT); 654 gpio_direction_output(S3C2410_GPH(10), 1);
655 655
656 /* Turn off suspend on both USB ports, and switch the 656 /* Turn off suspend on both USB ports, and switch the
657 * selectable USB port to USB device mode. */ 657 * selectable USB port to USB device mode. */
diff --git a/arch/arm/mach-s3c2412/mach-smdk2413.c b/arch/arm/mach-s3c2412/mach-smdk2413.c
index 0392065af1af..faddb36ed23b 100644
--- a/arch/arm/mach-s3c2412/mach-smdk2413.c
+++ b/arch/arm/mach-s3c2412/mach-smdk2413.c
@@ -85,10 +85,10 @@ static void smdk2413_udc_pullup(enum s3c2410_udc_cmd_e cmd)
85 switch (cmd) 85 switch (cmd)
86 { 86 {
87 case S3C2410_UDC_P_ENABLE : 87 case S3C2410_UDC_P_ENABLE :
88 s3c2410_gpio_setpin(S3C2410_GPF(2), 1); 88 gpio_set_value(S3C2410_GPF(2), 1);
89 break; 89 break;
90 case S3C2410_UDC_P_DISABLE : 90 case S3C2410_UDC_P_DISABLE :
91 s3c2410_gpio_setpin(S3C2410_GPF(2), 0); 91 gpio_set_value(S3C2410_GPF(2), 0);
92 break; 92 break;
93 case S3C2410_UDC_P_RESET : 93 case S3C2410_UDC_P_RESET :
94 break; 94 break;
@@ -134,8 +134,8 @@ static void __init smdk2413_machine_init(void)
134{ /* Turn off suspend on both USB ports, and switch the 134{ /* Turn off suspend on both USB ports, and switch the
135 * selectable USB port to USB device mode. */ 135 * selectable USB port to USB device mode. */
136 136
137 s3c2410_gpio_setpin(S3C2410_GPF(2), 0); 137 WARN_ON(gpio_request(S3C2410_GPF(2), "udc pull"));
138 s3c2410_gpio_cfgpin(S3C2410_GPF(2), S3C2410_GPIO_OUTPUT); 138 gpio_direction_output(S3C2410_GPF(2), 0);
139 139
140 s3c2410_modify_misccr(S3C2410_MISCCR_USBHOST | 140 s3c2410_modify_misccr(S3C2410_MISCCR_USBHOST |
141 S3C2410_MISCCR_USBSUSPND0 | 141 S3C2410_MISCCR_USBSUSPND0 |
diff --git a/arch/arm/mach-s3c2416/Kconfig b/arch/arm/mach-s3c2416/Kconfig
new file mode 100644
index 000000000000..29103a6047de
--- /dev/null
+++ b/arch/arm/mach-s3c2416/Kconfig
@@ -0,0 +1,38 @@
1# arch/arm/mach-s3c2416/Kconfig
2#
3# Copyright 2009 Yauhen Kharuzhy <jekhor@gmail.com>
4#
5# Licensed under GPLv2
6
7# note, this also supports the S3C2450 which is so similar it has the same
8# ID code as the S3C2416.
9
10config CPU_S3C2416
11 bool
12 depends on ARCH_S3C2410
13 select CPU_ARM926T
14 select S3C2416_DMA if S3C2410_DMA
15 select CPU_LLSERIAL_S3C2440
16 select S3C_GPIO_PULL_UPDOWN
17 select SAMSUNG_CLKSRC
18 select S3C2443_CLOCK
19 help
20 Support for the S3C2416 SoC from the S3C24XX line
21
22config S3C2416_DMA
23 bool
24 depends on CPU_S3C2416
25 help
26 Internal config node for S3C2416 DMA support
27
28menu "S3C2416 Machines"
29
30config MACH_SMDK2416
31 bool "SMDK2416"
32 select CPU_S3C2416
33 select S3C_DEV_HSMMC
34 select S3C_DEV_HSMMC1
35 help
36 Say Y here if you are using an SMDK2416
37
38endmenu
diff --git a/arch/arm/mach-s3c2416/Makefile b/arch/arm/mach-s3c2416/Makefile
new file mode 100644
index 000000000000..6c12c7bf40ad
--- /dev/null
+++ b/arch/arm/mach-s3c2416/Makefile
@@ -0,0 +1,19 @@
1# arch/arm/mach-s3c2416/Makefile
2#
3# Copyright 2009 Yauhen Kharuzhy <jekhor@gmail.com>
4#
5# Licensed under GPLv2
6
7obj-y :=
8obj-m :=
9obj-n :=
10obj- :=
11
12obj-$(CONFIG_CPU_S3C2416) += s3c2416.o clock.o
13obj-$(CONFIG_CPU_S3C2416) += irq.o
14
15#obj-$(CONFIG_S3C2416_DMA) += dma.o
16
17# Machine support
18
19obj-$(CONFIG_MACH_SMDK2416) += mach-smdk2416.o
diff --git a/arch/arm/mach-s3c2416/clock.c b/arch/arm/mach-s3c2416/clock.c
new file mode 100644
index 000000000000..7ccf5a2a2bfc
--- /dev/null
+++ b/arch/arm/mach-s3c2416/clock.c
@@ -0,0 +1,135 @@
1/* linux/arch/arm/mach-s3c2416/clock.c
2 *
3 * Copyright (c) 2010 Simtec Electronics
4 * Copyright (c) 2010 Ben Dooks <ben-linux@fluff.org>
5 *
6 * S3C2416 Clock control support
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
14#include <linux/init.h>
15#include <linux/clk.h>
16
17#include <plat/s3c2416.h>
18#include <plat/s3c2443.h>
19#include <plat/clock.h>
20#include <plat/clock-clksrc.h>
21#include <plat/cpu.h>
22
23#include <plat/cpu-freq.h>
24#include <plat/pll6553x.h>
25#include <plat/pll.h>
26
27#include <asm/mach/map.h>
28
29#include <mach/regs-clock.h>
30#include <mach/regs-s3c2443-clock.h>
31
32static unsigned int armdiv[8] = {
33 [0] = 1,
34 [1] = 2,
35 [2] = 3,
36 [3] = 4,
37 [5] = 6,
38 [7] = 8,
39};
40
41/* ID to hardware numbering, 0 is HSMMC1, 1 is HSMMC0 */
42static struct clksrc_clk hsmmc_div[] = {
43 [0] = {
44 .clk = {
45 .name = "hsmmc-div",
46 .id = 1,
47 .parent = &clk_esysclk.clk,
48 },
49 .reg_div = { .reg = S3C2416_CLKDIV2, .size = 2, .shift = 6 },
50 },
51 [1] = {
52 .clk = {
53 .name = "hsmmc-div",
54 .id = 0,
55 .parent = &clk_esysclk.clk,
56 },
57 .reg_div = { .reg = S3C2443_CLKDIV1, .size = 2, .shift = 6 },
58 },
59};
60
61static struct clksrc_clk hsmmc_mux[] = {
62 [0] = {
63 .clk = {
64 .id = 1,
65 .name = "hsmmc-if",
66 .ctrlbit = (1 << 6),
67 .enable = s3c2443_clkcon_enable_s,
68 },
69 .sources = &(struct clksrc_sources) {
70 .nr_sources = 2,
71 .sources = (struct clk *[]) {
72 [0] = &hsmmc_div[0].clk,
73 [1] = NULL, /* to fix */
74 },
75 },
76 .reg_src = { .reg = S3C2443_CLKSRC, .size = 1, .shift = 16 },
77 },
78 [1] = {
79 .clk = {
80 .id = 0,
81 .name = "hsmmc-if",
82 .ctrlbit = (1 << 12),
83 .enable = s3c2443_clkcon_enable_s,
84 },
85 .sources = &(struct clksrc_sources) {
86 .nr_sources = 2,
87 .sources = (struct clk *[]) {
88 [0] = &hsmmc_div[1].clk,
89 [1] = NULL, /* to fix */
90 },
91 },
92 .reg_src = { .reg = S3C2443_CLKSRC, .size = 1, .shift = 17 },
93 },
94};
95
96
97static inline unsigned int s3c2416_fclk_div(unsigned long clkcon0)
98{
99 clkcon0 &= 7 << S3C2443_CLKDIV0_ARMDIV_SHIFT;
100
101 return armdiv[clkcon0 >> S3C2443_CLKDIV0_ARMDIV_SHIFT];
102}
103
104void __init_or_cpufreq s3c2416_setup_clocks(void)
105{
106 s3c2443_common_setup_clocks(s3c2416_get_pll, s3c2416_fclk_div);
107}
108
109
110static struct clksrc_clk *clksrcs[] __initdata = {
111 &hsmmc_div[0],
112 &hsmmc_div[1],
113 &hsmmc_mux[0],
114 &hsmmc_mux[1],
115};
116
117void __init s3c2416_init_clocks(int xtal)
118{
119 u32 epllcon = __raw_readl(S3C2443_EPLLCON);
120 u32 epllcon1 = __raw_readl(S3C2443_EPLLCON+4);
121 int ptr;
122
123 /* s3c2416 EPLL compatible with s3c64xx */
124 clk_epll.rate = s3c_get_pll6553x(xtal, epllcon, epllcon1);
125
126 clk_epll.parent = &clk_epllref.clk;
127
128 s3c2443_common_init_clocks(xtal, s3c2416_get_pll, s3c2416_fclk_div);
129
130 for (ptr = 0; ptr < ARRAY_SIZE(clksrcs); ptr++)
131 s3c_register_clksrc(clksrcs[ptr], 1);
132
133 s3c_pwmclk_init();
134
135}
diff --git a/arch/arm/mach-s3c2416/irq.c b/arch/arm/mach-s3c2416/irq.c
new file mode 100644
index 000000000000..89f521d59d06
--- /dev/null
+++ b/arch/arm/mach-s3c2416/irq.c
@@ -0,0 +1,254 @@
1/* linux/arch/arm/mach-s3c2416/irq.c
2 *
3 * Copyright (c) 2009 Yauhen Kharuzhy <jekhor@gmail.com>,
4 * as part of OpenInkpot project
5 * Copyright (c) 2009 Promwad Innovation Company
6 * Yauhen Kharuzhy <yauhen.kharuzhy@promwad.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 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 *
22*/
23
24#include <linux/init.h>
25#include <linux/module.h>
26#include <linux/interrupt.h>
27#include <linux/ioport.h>
28#include <linux/sysdev.h>
29#include <linux/io.h>
30
31#include <mach/hardware.h>
32#include <asm/irq.h>
33
34#include <asm/mach/irq.h>
35
36#include <mach/regs-irq.h>
37#include <mach/regs-gpio.h>
38
39#include <plat/cpu.h>
40#include <plat/pm.h>
41#include <plat/irq.h>
42
43#define INTMSK(start, end) ((1 << ((end) + 1 - (start))) - 1)
44
45static inline void s3c2416_irq_demux(unsigned int irq, unsigned int len)
46{
47 unsigned int subsrc, submsk;
48 unsigned int end;
49
50 /* read the current pending interrupts, and the mask
51 * for what it is available */
52
53 subsrc = __raw_readl(S3C2410_SUBSRCPND);
54 submsk = __raw_readl(S3C2410_INTSUBMSK);
55
56 subsrc &= ~submsk;
57 subsrc >>= (irq - S3C2410_IRQSUB(0));
58 subsrc &= (1 << len)-1;
59
60 end = len + irq;
61
62 for (; irq < end && subsrc; irq++) {
63 if (subsrc & 1)
64 generic_handle_irq(irq);
65
66 subsrc >>= 1;
67 }
68}
69
70/* WDT/AC97 sub interrupts */
71
72static void s3c2416_irq_demux_wdtac97(unsigned int irq, struct irq_desc *desc)
73{
74 s3c2416_irq_demux(IRQ_S3C2443_WDT, 4);
75}
76
77#define INTMSK_WDTAC97 (1UL << (IRQ_WDT - IRQ_EINT0))
78#define SUBMSK_WDTAC97 INTMSK(IRQ_S3C2443_WDT, IRQ_S3C2443_AC97)
79
80static void s3c2416_irq_wdtac97_mask(unsigned int irqno)
81{
82 s3c_irqsub_mask(irqno, INTMSK_WDTAC97, SUBMSK_WDTAC97);
83}
84
85static void s3c2416_irq_wdtac97_unmask(unsigned int irqno)
86{
87 s3c_irqsub_unmask(irqno, INTMSK_WDTAC97);
88}
89
90static void s3c2416_irq_wdtac97_ack(unsigned int irqno)
91{
92 s3c_irqsub_maskack(irqno, INTMSK_WDTAC97, SUBMSK_WDTAC97);
93}
94
95static struct irq_chip s3c2416_irq_wdtac97 = {
96 .mask = s3c2416_irq_wdtac97_mask,
97 .unmask = s3c2416_irq_wdtac97_unmask,
98 .ack = s3c2416_irq_wdtac97_ack,
99};
100
101
102/* LCD sub interrupts */
103
104static void s3c2416_irq_demux_lcd(unsigned int irq, struct irq_desc *desc)
105{
106 s3c2416_irq_demux(IRQ_S3C2443_LCD1, 4);
107}
108
109#define INTMSK_LCD (1UL << (IRQ_LCD - IRQ_EINT0))
110#define SUBMSK_LCD INTMSK(IRQ_S3C2443_LCD1, IRQ_S3C2443_LCD4)
111
112static void s3c2416_irq_lcd_mask(unsigned int irqno)
113{
114 s3c_irqsub_mask(irqno, INTMSK_LCD, SUBMSK_LCD);
115}
116
117static void s3c2416_irq_lcd_unmask(unsigned int irqno)
118{
119 s3c_irqsub_unmask(irqno, INTMSK_LCD);
120}
121
122static void s3c2416_irq_lcd_ack(unsigned int irqno)
123{
124 s3c_irqsub_maskack(irqno, INTMSK_LCD, SUBMSK_LCD);
125}
126
127static struct irq_chip s3c2416_irq_lcd = {
128 .mask = s3c2416_irq_lcd_mask,
129 .unmask = s3c2416_irq_lcd_unmask,
130 .ack = s3c2416_irq_lcd_ack,
131};
132
133
134/* DMA sub interrupts */
135
136static void s3c2416_irq_demux_dma(unsigned int irq, struct irq_desc *desc)
137{
138 s3c2416_irq_demux(IRQ_S3C2443_DMA0, 6);
139}
140
141#define INTMSK_DMA (1UL << (IRQ_S3C2443_DMA - IRQ_EINT0))
142#define SUBMSK_DMA INTMSK(IRQ_S3C2443_DMA0, IRQ_S3C2443_DMA5)
143
144
145static void s3c2416_irq_dma_mask(unsigned int irqno)
146{
147 s3c_irqsub_mask(irqno, INTMSK_DMA, SUBMSK_DMA);
148}
149
150static void s3c2416_irq_dma_unmask(unsigned int irqno)
151{
152 s3c_irqsub_unmask(irqno, INTMSK_DMA);
153}
154
155static void s3c2416_irq_dma_ack(unsigned int irqno)
156{
157 s3c_irqsub_maskack(irqno, INTMSK_DMA, SUBMSK_DMA);
158}
159
160static struct irq_chip s3c2416_irq_dma = {
161 .mask = s3c2416_irq_dma_mask,
162 .unmask = s3c2416_irq_dma_unmask,
163 .ack = s3c2416_irq_dma_ack,
164};
165
166
167/* UART3 sub interrupts */
168
169static void s3c2416_irq_demux_uart3(unsigned int irq, struct irq_desc *desc)
170{
171 s3c2416_irq_demux(IRQ_S3C2443_UART3, 3);
172}
173
174#define INTMSK_UART3 (1UL << (IRQ_S3C2443_UART3 - IRQ_EINT0))
175#define SUBMSK_UART3 (0xf << (IRQ_S3C2443_RX3 - S3C2410_IRQSUB(0)))
176
177
178static void s3c2416_irq_uart3_mask(unsigned int irqno)
179{
180 s3c_irqsub_mask(irqno, INTMSK_UART3, SUBMSK_UART3);
181}
182
183static void s3c2416_irq_uart3_unmask(unsigned int irqno)
184{
185 s3c_irqsub_unmask(irqno, INTMSK_UART3);
186}
187
188static void s3c2416_irq_uart3_ack(unsigned int irqno)
189{
190 s3c_irqsub_maskack(irqno, INTMSK_UART3, SUBMSK_UART3);
191}
192
193static struct irq_chip s3c2416_irq_uart3 = {
194 .mask = s3c2416_irq_uart3_mask,
195 .unmask = s3c2416_irq_uart3_unmask,
196 .ack = s3c2416_irq_uart3_ack,
197};
198
199
200/* IRQ initialisation code */
201
202static int __init s3c2416_add_sub(unsigned int base,
203 void (*demux)(unsigned int,
204 struct irq_desc *),
205 struct irq_chip *chip,
206 unsigned int start, unsigned int end)
207{
208 unsigned int irqno;
209
210 set_irq_chip(base, &s3c_irq_level_chip);
211 set_irq_handler(base, handle_level_irq);
212 set_irq_chained_handler(base, demux);
213
214 for (irqno = start; irqno <= end; irqno++) {
215 set_irq_chip(irqno, chip);
216 set_irq_handler(irqno, handle_level_irq);
217 set_irq_flags(irqno, IRQF_VALID);
218 }
219
220 return 0;
221}
222
223static int __init s3c2416_irq_add(struct sys_device *sysdev)
224{
225 printk(KERN_INFO "S3C2416: IRQ Support\n");
226
227 s3c2416_add_sub(IRQ_LCD, s3c2416_irq_demux_lcd, &s3c2416_irq_lcd,
228 IRQ_S3C2443_LCD2, IRQ_S3C2443_LCD4);
229
230 s3c2416_add_sub(IRQ_S3C2443_DMA, s3c2416_irq_demux_dma,
231 &s3c2416_irq_dma, IRQ_S3C2443_DMA0, IRQ_S3C2443_DMA5);
232
233 s3c2416_add_sub(IRQ_S3C2443_UART3, s3c2416_irq_demux_uart3,
234 &s3c2416_irq_uart3,
235 IRQ_S3C2443_RX3, IRQ_S3C2443_ERR3);
236
237 s3c2416_add_sub(IRQ_WDT, s3c2416_irq_demux_wdtac97,
238 &s3c2416_irq_wdtac97,
239 IRQ_S3C2443_WDT, IRQ_S3C2443_AC97);
240
241 return 0;
242}
243
244static struct sysdev_driver s3c2416_irq_driver = {
245 .add = s3c2416_irq_add,
246};
247
248static int __init s3c2416_irq_init(void)
249{
250 return sysdev_driver_register(&s3c2416_sysclass, &s3c2416_irq_driver);
251}
252
253arch_initcall(s3c2416_irq_init);
254
diff --git a/arch/arm/mach-s3c2416/mach-smdk2416.c b/arch/arm/mach-s3c2416/mach-smdk2416.c
new file mode 100644
index 000000000000..99d24c44f30f
--- /dev/null
+++ b/arch/arm/mach-s3c2416/mach-smdk2416.c
@@ -0,0 +1,150 @@
1/* linux/arch/arm/mach-s3c2416/mach-hanlin_v3c.c
2 *
3 * Copyright (c) 2009 Yauhen Kharuzhy <jekhor@gmail.com>,
4 * as part of OpenInkpot project
5 * Copyright (c) 2009 Promwad Innovation Company
6 * Yauhen Kharuzhy <yauhen.kharuzhy@promwad.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12*/
13
14#include <linux/kernel.h>
15#include <linux/types.h>
16#include <linux/interrupt.h>
17#include <linux/list.h>
18#include <linux/timer.h>
19#include <linux/init.h>
20#include <linux/serial_core.h>
21#include <linux/platform_device.h>
22#include <linux/io.h>
23#include <linux/mtd/partitions.h>
24#include <linux/gpio.h>
25
26#include <asm/mach/arch.h>
27#include <asm/mach/map.h>
28#include <asm/mach/irq.h>
29
30#include <mach/hardware.h>
31#include <asm/irq.h>
32#include <asm/mach-types.h>
33
34#include <plat/regs-serial.h>
35#include <mach/regs-gpio.h>
36#include <mach/regs-lcd.h>
37
38#include <mach/idle.h>
39#include <mach/fb.h>
40#include <mach/leds-gpio.h>
41#include <plat/iic.h>
42
43#include <plat/s3c2416.h>
44#include <plat/clock.h>
45#include <plat/devs.h>
46#include <plat/cpu.h>
47#include <plat/nand.h>
48
49#include <plat/common-smdk.h>
50
51static struct map_desc smdk2416_iodesc[] __initdata = {
52 /* ISA IO Space map (memory space selected by A24) */
53
54 {
55 .virtual = (u32)S3C24XX_VA_ISA_WORD,
56 .pfn = __phys_to_pfn(S3C2410_CS2),
57 .length = 0x10000,
58 .type = MT_DEVICE,
59 }, {
60 .virtual = (u32)S3C24XX_VA_ISA_WORD + 0x10000,
61 .pfn = __phys_to_pfn(S3C2410_CS2 + (1<<24)),
62 .length = SZ_4M,
63 .type = MT_DEVICE,
64 }, {
65 .virtual = (u32)S3C24XX_VA_ISA_BYTE,
66 .pfn = __phys_to_pfn(S3C2410_CS2),
67 .length = 0x10000,
68 .type = MT_DEVICE,
69 }, {
70 .virtual = (u32)S3C24XX_VA_ISA_BYTE + 0x10000,
71 .pfn = __phys_to_pfn(S3C2410_CS2 + (1<<24)),
72 .length = SZ_4M,
73 .type = MT_DEVICE,
74 }
75};
76
77#define UCON (S3C2410_UCON_DEFAULT | \
78 S3C2440_UCON_PCLK | \
79 S3C2443_UCON_RXERR_IRQEN)
80
81#define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE)
82
83#define UFCON (S3C2410_UFCON_RXTRIG8 | \
84 S3C2410_UFCON_FIFOMODE | \
85 S3C2440_UFCON_TXTRIG16)
86
87static struct s3c2410_uartcfg smdk2416_uartcfgs[] __initdata = {
88 [0] = {
89 .hwport = 0,
90 .flags = 0,
91 .ucon = UCON,
92 .ulcon = ULCON,
93 .ufcon = UFCON,
94 },
95 [1] = {
96 .hwport = 1,
97 .flags = 0,
98 .ucon = UCON,
99 .ulcon = ULCON,
100 .ufcon = UFCON,
101 },
102 /* IR port */
103 [2] = {
104 .hwport = 2,
105 .flags = 0,
106 .ucon = UCON,
107 .ulcon = ULCON | 0x50,
108 .ufcon = UFCON,
109 }
110};
111
112static struct platform_device *smdk2416_devices[] __initdata = {
113 &s3c_device_wdt,
114 &s3c_device_ohci,
115 &s3c_device_i2c0,
116 &s3c_device_hsmmc0,
117 &s3c_device_hsmmc1,
118};
119
120static void __init smdk2416_map_io(void)
121{
122
123 s3c24xx_init_io(smdk2416_iodesc, ARRAY_SIZE(smdk2416_iodesc));
124 s3c24xx_init_clocks(12000000);
125 s3c24xx_init_uarts(smdk2416_uartcfgs, ARRAY_SIZE(smdk2416_uartcfgs));
126
127}
128
129static void __init smdk2416_machine_init(void)
130{
131 s3c_i2c0_set_platdata(NULL);
132
133 gpio_request(S3C2410_GPB(4), "USBHost Power");
134 gpio_direction_output(S3C2410_GPB(4), 1);
135
136 platform_add_devices(smdk2416_devices, ARRAY_SIZE(smdk2416_devices));
137 smdk_machine_init();
138}
139
140MACHINE_START(SMDK2416, "SMDK2416")
141 /* Maintainer: Yauhen Kharuzhy <jekhor@gmail.com> */
142 .phys_io = S3C2410_PA_UART,
143 .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc,
144 .boot_params = S3C2410_SDRAM_PA + 0x100,
145
146 .init_irq = s3c24xx_init_irq,
147 .map_io = smdk2416_map_io,
148 .init_machine = smdk2416_machine_init,
149 .timer = &s3c24xx_timer,
150MACHINE_END
diff --git a/arch/arm/mach-s3c2416/s3c2416.c b/arch/arm/mach-s3c2416/s3c2416.c
new file mode 100644
index 000000000000..3bff05745d0b
--- /dev/null
+++ b/arch/arm/mach-s3c2416/s3c2416.c
@@ -0,0 +1,128 @@
1/* linux/arch/arm/mach-s3c2416/s3c2416.c
2 *
3 * Copyright (c) 2009 Yauhen Kharuzhy <jekhor@gmail.com>,
4 * as part of OpenInkpot project
5 * Copyright (c) 2009 Promwad Innovation Company
6 * Yauhen Kharuzhy <yauhen.kharuzhy@promwad.com>
7 *
8 * Samsung S3C2416 Mobile CPU support
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, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23*/
24
25#include <linux/kernel.h>
26#include <linux/types.h>
27#include <linux/interrupt.h>
28#include <linux/list.h>
29#include <linux/timer.h>
30#include <linux/init.h>
31#include <linux/gpio.h>
32#include <linux/platform_device.h>
33#include <linux/serial_core.h>
34#include <linux/sysdev.h>
35#include <linux/clk.h>
36#include <linux/io.h>
37
38#include <asm/mach/arch.h>
39#include <asm/mach/map.h>
40#include <asm/mach/irq.h>
41
42#include <mach/hardware.h>
43#include <asm/proc-fns.h>
44#include <asm/irq.h>
45
46#include <mach/reset.h>
47#include <mach/idle.h>
48#include <mach/regs-s3c2443-clock.h>
49
50#include <plat/gpio-core.h>
51#include <plat/gpio-cfg.h>
52#include <plat/gpio-cfg-helpers.h>
53#include <plat/s3c2416.h>
54#include <plat/devs.h>
55#include <plat/cpu.h>
56
57#include <plat/iic-core.h>
58
59static struct map_desc s3c2416_iodesc[] __initdata = {
60 IODESC_ENT(WATCHDOG),
61 IODESC_ENT(CLKPWR),
62 IODESC_ENT(TIMER),
63};
64
65struct sysdev_class s3c2416_sysclass = {
66 .name = "s3c2416-core",
67};
68
69static struct sys_device s3c2416_sysdev = {
70 .cls = &s3c2416_sysclass,
71};
72
73static void s3c2416_hard_reset(void)
74{
75 __raw_writel(S3C2443_SWRST_RESET, S3C2443_SWRST);
76}
77
78int __init s3c2416_init(void)
79{
80 printk(KERN_INFO "S3C2416: Initializing architecture\n");
81
82 s3c24xx_reset_hook = s3c2416_hard_reset;
83 /* s3c24xx_idle = s3c2416_idle; */
84
85 /* change WDT IRQ number */
86 s3c_device_wdt.resource[1].start = IRQ_S3C2443_WDT;
87 s3c_device_wdt.resource[1].end = IRQ_S3C2443_WDT;
88
89 /* the i2c devices are directly compatible with s3c2440 */
90 s3c_i2c0_setname("s3c2440-i2c");
91 s3c_i2c1_setname("s3c2440-i2c");
92
93 return sysdev_register(&s3c2416_sysdev);
94}
95
96void __init s3c2416_init_uarts(struct s3c2410_uartcfg *cfg, int no)
97{
98 s3c24xx_init_uartdevs("s3c2440-uart", s3c2410_uart_resources, cfg, no);
99
100 s3c_device_nand.name = "s3c2416-nand";
101}
102
103/* s3c2416_map_io
104 *
105 * register the standard cpu IO areas, and any passed in from the
106 * machine specific initialisation.
107 */
108
109void __init s3c2416_map_io(void)
110{
111 s3c24xx_gpiocfg_default.set_pull = s3c_gpio_setpull_updown;
112 s3c24xx_gpiocfg_default.get_pull = s3c_gpio_getpull_updown;
113
114 iotable_init(s3c2416_iodesc, ARRAY_SIZE(s3c2416_iodesc));
115}
116
117/* need to register class before we actually register the device, and
118 * we also need to ensure that it has been initialised before any of the
119 * drivers even try to use it (even if not on an s3c2416 based system)
120 * as a driver which may support both 2443 and 2440 may try and use it.
121*/
122
123static int __init s3c2416_core_init(void)
124{
125 return sysdev_class_register(&s3c2416_sysclass);
126}
127
128core_initcall(s3c2416_core_init);
diff --git a/arch/arm/mach-s3c2440/Kconfig b/arch/arm/mach-s3c2440/Kconfig
index 7f465265cf04..9d102b912091 100644
--- a/arch/arm/mach-s3c2440/Kconfig
+++ b/arch/arm/mach-s3c2440/Kconfig
@@ -6,6 +6,7 @@ config CPU_S3C2440
6 bool 6 bool
7 depends on ARCH_S3C2410 7 depends on ARCH_S3C2410
8 select CPU_ARM920T 8 select CPU_ARM920T
9 select S3C_GPIO_PULL_UP
9 select S3C2410_CLOCK 10 select S3C2410_CLOCK
10 select S3C2410_PM if PM 11 select S3C2410_PM if PM
11 select S3C2410_GPIO 12 select S3C2410_GPIO
diff --git a/arch/arm/mach-s3c2440/mach-mini2440.c b/arch/arm/mach-s3c2440/mach-mini2440.c
index 571b17683d96..a76bcda210ad 100644
--- a/arch/arm/mach-s3c2440/mach-mini2440.c
+++ b/arch/arm/mach-s3c2440/mach-mini2440.c
@@ -53,6 +53,7 @@
53#include <linux/mtd/nand_ecc.h> 53#include <linux/mtd/nand_ecc.h>
54#include <linux/mtd/partitions.h> 54#include <linux/mtd/partitions.h>
55 55
56#include <plat/gpio-cfg.h>
56#include <plat/clock.h> 57#include <plat/clock.h>
57#include <plat/devs.h> 58#include <plat/devs.h>
58#include <plat/cpu.h> 59#include <plat/cpu.h>
@@ -102,10 +103,10 @@ static void mini2440_udc_pullup(enum s3c2410_udc_cmd_e cmd)
102 103
103 switch (cmd) { 104 switch (cmd) {
104 case S3C2410_UDC_P_ENABLE : 105 case S3C2410_UDC_P_ENABLE :
105 s3c2410_gpio_setpin(S3C2410_GPC(5), 1); 106 gpio_set_value(S3C2410_GPC(5), 1);
106 break; 107 break;
107 case S3C2410_UDC_P_DISABLE : 108 case S3C2410_UDC_P_DISABLE :
108 s3c2410_gpio_setpin(S3C2410_GPC(5), 0); 109 gpio_set_value(S3C2410_GPC(5), 0);
109 break; 110 break;
110 case S3C2410_UDC_P_RESET : 111 case S3C2410_UDC_P_RESET :
111 break; 112 break;
@@ -632,25 +633,25 @@ static void __init mini2440_init(void)
632 mini2440_parse_features(&features, mini2440_features_str); 633 mini2440_parse_features(&features, mini2440_features_str);
633 634
634 /* turn LCD on */ 635 /* turn LCD on */
635 s3c2410_gpio_cfgpin(S3C2410_GPC(0), S3C2410_GPC0_LEND); 636 s3c_gpio_cfgpin(S3C2410_GPC(0), S3C2410_GPC0_LEND);
636 637
637 /* Turn the backlight early on */ 638 /* Turn the backlight early on */
638 s3c2410_gpio_setpin(S3C2410_GPG(4), 1); 639 WARN_ON(gpio_request(S3C2410_GPG(4), "backlight"));
639 s3c2410_gpio_cfgpin(S3C2410_GPG(4), S3C2410_GPIO_OUTPUT); 640 gpio_direction_output(S3C2410_GPG(4), 1);
640 641
641 /* remove pullup on optional PWM backlight -- unused on 3.5 and 7"s */ 642 /* remove pullup on optional PWM backlight -- unused on 3.5 and 7"s */
642 s3c2410_gpio_pullup(S3C2410_GPB(1), 0); 643 s3c_gpio_setpull(S3C2410_GPB(1), S3C_GPIO_PULL_UP);
643 s3c2410_gpio_setpin(S3C2410_GPB(1), 0); 644 s3c2410_gpio_setpin(S3C2410_GPB(1), 0);
644 s3c2410_gpio_cfgpin(S3C2410_GPB(1), S3C2410_GPIO_INPUT); 645 s3c_gpio_cfgpin(S3C2410_GPB(1), S3C2410_GPIO_INPUT);
645 646
646 /* Make sure the D+ pullup pin is output */ 647 /* Make sure the D+ pullup pin is output */
647 s3c2410_gpio_cfgpin(S3C2410_GPC(5), S3C2410_GPIO_OUTPUT); 648 WARN_ON(gpio_request(S3C2410_GPC(5), "udc pup"));
649 gpio_direction_output(S3C2410_GPC(5), 0);
648 650
649 /* mark the key as input, without pullups (there is one on the board) */ 651 /* mark the key as input, without pullups (there is one on the board) */
650 for (i = 0; i < ARRAY_SIZE(mini2440_buttons); i++) { 652 for (i = 0; i < ARRAY_SIZE(mini2440_buttons); i++) {
651 s3c2410_gpio_pullup(mini2440_buttons[i].gpio, 0); 653 s3c_gpio_setpull(mini2440_buttons[i].gpio, S3C_GPIO_PULL_UP);
652 s3c2410_gpio_cfgpin(mini2440_buttons[i].gpio, 654 s3c_gpio_cfgpin(mini2440_buttons[i].gpio, S3C2410_GPIO_INPUT);
653 S3C2410_GPIO_INPUT);
654 } 655 }
655 if (features.lcd_index != -1) { 656 if (features.lcd_index != -1) {
656 int li; 657 int li;
diff --git a/arch/arm/mach-s3c2440/mach-nexcoder.c b/arch/arm/mach-s3c2440/mach-nexcoder.c
index 342041593f22..3ff62de45fde 100644
--- a/arch/arm/mach-s3c2440/mach-nexcoder.c
+++ b/arch/arm/mach-s3c2440/mach-nexcoder.c
@@ -40,6 +40,7 @@
40#include <plat/regs-serial.h> 40#include <plat/regs-serial.h>
41#include <plat/iic.h> 41#include <plat/iic.h>
42 42
43#include <plat/gpio-cfg.h>
43#include <plat/s3c2410.h> 44#include <plat/s3c2410.h>
44#include <plat/s3c244x.h> 45#include <plat/s3c244x.h>
45#include <plat/clock.h> 46#include <plat/clock.h>
@@ -122,15 +123,15 @@ static void __init nexcoder_sensorboard_init(void)
122{ 123{
123 // Initialize SCCB bus 124 // Initialize SCCB bus
124 s3c2410_gpio_setpin(S3C2410_GPE(14), 1); // IICSCL 125 s3c2410_gpio_setpin(S3C2410_GPE(14), 1); // IICSCL
125 s3c2410_gpio_cfgpin(S3C2410_GPE(14), S3C2410_GPIO_OUTPUT); 126 s3c_gpio_cfgpin(S3C2410_GPE(14), S3C2410_GPIO_OUTPUT);
126 s3c2410_gpio_setpin(S3C2410_GPE(15), 1); // IICSDA 127 s3c2410_gpio_setpin(S3C2410_GPE(15), 1); // IICSDA
127 s3c2410_gpio_cfgpin(S3C2410_GPE(15), S3C2410_GPIO_OUTPUT); 128 s3c_gpio_cfgpin(S3C2410_GPE(15), S3C2410_GPIO_OUTPUT);
128 129
129 // Power up the sensor board 130 // Power up the sensor board
130 s3c2410_gpio_setpin(S3C2410_GPF(1), 1); 131 s3c2410_gpio_setpin(S3C2410_GPF(1), 1);
131 s3c2410_gpio_cfgpin(S3C2410_GPF(1), S3C2410_GPIO_OUTPUT); // CAM_GPIO7 => nLDO_PWRDN 132 s3c_gpio_cfgpin(S3C2410_GPF(1), S3C2410_GPIO_OUTPUT); // CAM_GPIO7 => nLDO_PWRDN
132 s3c2410_gpio_setpin(S3C2410_GPF(2), 0); 133 s3c2410_gpio_setpin(S3C2410_GPF(2), 0);
133 s3c2410_gpio_cfgpin(S3C2410_GPF(2), S3C2410_GPIO_OUTPUT); // CAM_GPIO6 => CAM_PWRDN 134 s3c_gpio_cfgpin(S3C2410_GPF(2), S3C2410_GPIO_OUTPUT); // CAM_GPIO6 => CAM_PWRDN
134} 135}
135 136
136static void __init nexcoder_map_io(void) 137static void __init nexcoder_map_io(void)
diff --git a/arch/arm/mach-s3c2440/mach-osiris.c b/arch/arm/mach-s3c2440/mach-osiris.c
index f35371db33f5..319458da71a0 100644
--- a/arch/arm/mach-s3c2440/mach-osiris.c
+++ b/arch/arm/mach-s3c2440/mach-osiris.c
@@ -49,6 +49,7 @@
49#include <linux/mtd/nand_ecc.h> 49#include <linux/mtd/nand_ecc.h>
50#include <linux/mtd/partitions.h> 50#include <linux/mtd/partitions.h>
51 51
52#include <plat/gpio-cfg.h>
52#include <plat/clock.h> 53#include <plat/clock.h>
53#include <plat/devs.h> 54#include <plat/devs.h>
54#include <plat/cpu.h> 55#include <plat/cpu.h>
@@ -298,7 +299,7 @@ static int osiris_pm_suspend(struct sys_device *sd, pm_message_t state)
298 299
299 /* ensure that an nRESET is not generated on resume. */ 300 /* ensure that an nRESET is not generated on resume. */
300 s3c2410_gpio_setpin(S3C2410_GPA(21), 1); 301 s3c2410_gpio_setpin(S3C2410_GPA(21), 1);
301 s3c2410_gpio_cfgpin(S3C2410_GPA(21), S3C2410_GPIO_OUTPUT); 302 s3c_gpio_cfgpin(S3C2410_GPA(21), S3C2410_GPIO_OUTPUT);
302 303
303 return 0; 304 return 0;
304} 305}
@@ -310,7 +311,7 @@ static int osiris_pm_resume(struct sys_device *sd)
310 311
311 __raw_writeb(pm_osiris_ctrl0, OSIRIS_VA_CTRL0); 312 __raw_writeb(pm_osiris_ctrl0, OSIRIS_VA_CTRL0);
312 313
313 s3c2410_gpio_cfgpin(S3C2410_GPA(21), S3C2410_GPA21_nRSTOUT); 314 s3c_gpio_cfgpin(S3C2410_GPA(21), S3C2410_GPA21_nRSTOUT);
314 315
315 return 0; 316 return 0;
316} 317}
diff --git a/arch/arm/mach-s3c2440/s3c2440.c b/arch/arm/mach-s3c2440/s3c2440.c
index 2b68f7ea45ae..d50f3ae6173d 100644
--- a/arch/arm/mach-s3c2440/s3c2440.c
+++ b/arch/arm/mach-s3c2440/s3c2440.c
@@ -19,6 +19,7 @@
19#include <linux/platform_device.h> 19#include <linux/platform_device.h>
20#include <linux/serial_core.h> 20#include <linux/serial_core.h>
21#include <linux/sysdev.h> 21#include <linux/sysdev.h>
22#include <linux/gpio.h>
22#include <linux/clk.h> 23#include <linux/clk.h>
23#include <linux/io.h> 24#include <linux/io.h>
24 25
@@ -33,6 +34,10 @@
33#include <plat/cpu.h> 34#include <plat/cpu.h>
34#include <plat/s3c244x.h> 35#include <plat/s3c244x.h>
35 36
37#include <plat/gpio-core.h>
38#include <plat/gpio-cfg.h>
39#include <plat/gpio-cfg-helpers.h>
40
36static struct sys_device s3c2440_sysdev = { 41static struct sys_device s3c2440_sysdev = {
37 .cls = &s3c2440_sysclass, 42 .cls = &s3c2440_sysclass,
38}; 43};
@@ -41,6 +46,9 @@ int __init s3c2440_init(void)
41{ 46{
42 printk("S3C2440: Initialising architecture\n"); 47 printk("S3C2440: Initialising architecture\n");
43 48
49 s3c24xx_gpiocfg_default.set_pull = s3c_gpio_setpull_1up;
50 s3c24xx_gpiocfg_default.get_pull = s3c_gpio_getpull_1up;
51
44 /* change irq for watchdog */ 52 /* change irq for watchdog */
45 53
46 s3c_device_wdt.resource[1].start = IRQ_S3C2440_WDT; 54 s3c_device_wdt.resource[1].start = IRQ_S3C2440_WDT;
diff --git a/arch/arm/mach-s3c2443/Kconfig b/arch/arm/mach-s3c2443/Kconfig
index 698140af247c..4fef723126fa 100644
--- a/arch/arm/mach-s3c2443/Kconfig
+++ b/arch/arm/mach-s3c2443/Kconfig
@@ -8,6 +8,7 @@ config CPU_S3C2443
8 select S3C2443_DMA if S3C2410_DMA 8 select S3C2443_DMA if S3C2410_DMA
9 select CPU_LLSERIAL_S3C2440 9 select CPU_LLSERIAL_S3C2440
10 select SAMSUNG_CLKSRC 10 select SAMSUNG_CLKSRC
11 select S3C2443_CLOCK
11 help 12 help
12 Support for the S3C2443 SoC from the S3C24XX line 13 Support for the S3C2443 SoC from the S3C24XX line
13 14
diff --git a/arch/arm/mach-s3c2443/clock.c b/arch/arm/mach-s3c2443/clock.c
index 62cd4eaee01b..83b1aa63d778 100644
--- a/arch/arm/mach-s3c2443/clock.c
+++ b/arch/arm/mach-s3c2443/clock.c
@@ -21,6 +21,7 @@
21*/ 21*/
22 22
23#include <linux/init.h> 23#include <linux/init.h>
24
24#include <linux/module.h> 25#include <linux/module.h>
25#include <linux/kernel.h> 26#include <linux/kernel.h>
26#include <linux/list.h> 27#include <linux/list.h>
@@ -54,111 +55,13 @@
54 * set the correct muxing at initialisation 55 * set the correct muxing at initialisation
55*/ 56*/
56 57
57static int s3c2443_gate(void __iomem *reg, struct clk *clk, int enable)
58{
59 u32 ctrlbit = clk->ctrlbit;
60 u32 con = __raw_readl(reg);
61
62 if (enable)
63 con |= ctrlbit;
64 else
65 con &= ~ctrlbit;
66
67 __raw_writel(con, reg);
68 return 0;
69}
70
71static int s3c2443_clkcon_enable_h(struct clk *clk, int enable)
72{
73 return s3c2443_gate(S3C2443_HCLKCON, clk, enable);
74}
75
76static int s3c2443_clkcon_enable_p(struct clk *clk, int enable)
77{
78 return s3c2443_gate(S3C2443_PCLKCON, clk, enable);
79}
80
81static int s3c2443_clkcon_enable_s(struct clk *clk, int enable)
82{
83 return s3c2443_gate(S3C2443_SCLKCON, clk, enable);
84}
85
86/* clock selections */ 58/* clock selections */
87 59
88/* mpllref is a direct descendant of clk_xtal by default, but it is not
89 * elided as the EPLL can be either sourced by the XTAL or EXTCLK and as
90 * such directly equating the two source clocks is impossible.
91 */
92static struct clk clk_mpllref = {
93 .name = "mpllref",
94 .parent = &clk_xtal,
95 .id = -1,
96};
97
98static struct clk clk_i2s_ext = { 60static struct clk clk_i2s_ext = {
99 .name = "i2s-ext", 61 .name = "i2s-ext",
100 .id = -1, 62 .id = -1,
101}; 63};
102 64
103static struct clk *clk_epllref_sources[] = {
104 [0] = &clk_mpllref,
105 [1] = &clk_mpllref,
106 [2] = &clk_xtal,
107 [3] = &clk_ext,
108};
109
110static struct clksrc_clk clk_epllref = {
111 .clk = {
112 .name = "epllref",
113 .id = -1,
114 },
115 .sources = &(struct clksrc_sources) {
116 .sources = clk_epllref_sources,
117 .nr_sources = ARRAY_SIZE(clk_epllref_sources),
118 },
119 .reg_src = { .reg = S3C2443_CLKSRC, .size = 2, .shift = 7 },
120};
121
122static unsigned long s3c2443_getrate_mdivclk(struct clk *clk)
123{
124 unsigned long parent_rate = clk_get_rate(clk->parent);
125 unsigned long div = __raw_readl(S3C2443_CLKDIV0);
126
127 div &= S3C2443_CLKDIV0_EXTDIV_MASK;
128 div >>= (S3C2443_CLKDIV0_EXTDIV_SHIFT-1); /* x2 */
129
130 return parent_rate / (div + 1);
131}
132
133static struct clk clk_mdivclk = {
134 .name = "mdivclk",
135 .parent = &clk_mpllref,
136 .id = -1,
137 .ops = &(struct clk_ops) {
138 .get_rate = s3c2443_getrate_mdivclk,
139 },
140};
141
142static struct clk *clk_msysclk_sources[] = {
143 [0] = &clk_mpllref,
144 [1] = &clk_mpll,
145 [2] = &clk_mdivclk,
146 [3] = &clk_mpllref,
147};
148
149static struct clksrc_clk clk_msysclk = {
150 .clk = {
151 .name = "msysclk",
152 .parent = &clk_xtal,
153 .id = -1,
154 },
155 .sources = &(struct clksrc_sources) {
156 .sources = clk_msysclk_sources,
157 .nr_sources = ARRAY_SIZE(clk_msysclk_sources),
158 },
159 .reg_src = { .reg = S3C2443_CLKSRC, .size = 2, .shift = 3 },
160};
161
162/* armdiv 65/* armdiv
163 * 66 *
164 * this clock is sourced from msysclk and can have a number of 67 * this clock is sourced from msysclk and can have a number of
@@ -266,44 +169,6 @@ static struct clksrc_clk clk_arm = {
266 .reg_src = { .reg = S3C2443_CLKDIV0, .size = 1, .shift = 13 }, 169 .reg_src = { .reg = S3C2443_CLKDIV0, .size = 1, .shift = 13 },
267}; 170};
268 171
269/* esysclk
270 *
271 * this is sourced from either the EPLL or the EPLLref clock
272*/
273
274static struct clk *clk_sysclk_sources[] = {
275 [0] = &clk_epllref.clk,
276 [1] = &clk_epll,
277};
278
279static struct clksrc_clk clk_esysclk = {
280 .clk = {
281 .name = "esysclk",
282 .parent = &clk_epll,
283 .id = -1,
284 },
285 .sources = &(struct clksrc_sources) {
286 .sources = clk_sysclk_sources,
287 .nr_sources = ARRAY_SIZE(clk_sysclk_sources),
288 },
289 .reg_src = { .reg = S3C2443_CLKSRC, .size = 1, .shift = 6 },
290};
291
292/* uartclk
293 *
294 * UART baud-rate clock sourced from esysclk via a divisor
295*/
296
297static struct clksrc_clk clk_uart = {
298 .clk = {
299 .name = "uartclk",
300 .id = -1,
301 .parent = &clk_esysclk.clk,
302 },
303 .reg_div = { .reg = S3C2443_CLKDIV1, .size = 4, .shift = 8 },
304};
305
306
307/* hsspi 172/* hsspi
308 * 173 *
309 * high-speed spi clock, sourced from esysclk 174 * high-speed spi clock, sourced from esysclk
@@ -320,21 +185,6 @@ static struct clksrc_clk clk_hsspi = {
320 .reg_div = { .reg = S3C2443_CLKDIV1, .size = 2, .shift = 4 }, 185 .reg_div = { .reg = S3C2443_CLKDIV1, .size = 2, .shift = 4 },
321}; 186};
322 187
323/* usbhost
324 *
325 * usb host bus-clock, usually 48MHz to provide USB bus clock timing
326*/
327
328static struct clksrc_clk clk_usb_bus_host = {
329 .clk = {
330 .name = "usb-bus-host-parent",
331 .id = -1,
332 .parent = &clk_esysclk.clk,
333 .ctrlbit = S3C2443_SCLKCON_USBHOST,
334 .enable = s3c2443_clkcon_enable_s,
335 },
336 .reg_div = { .reg = S3C2443_CLKDIV1, .size = 2, .shift = 4 },
337};
338 188
339/* clk_hsmcc_div 189/* clk_hsmcc_div
340 * 190 *
@@ -433,89 +283,16 @@ static struct clksrc_clk clk_i2s = {
433 .reg_src = { .reg = S3C2443_CLKSRC, .size = 2, .shift = 14 }, 283 .reg_src = { .reg = S3C2443_CLKSRC, .size = 2, .shift = 14 },
434}; 284};
435 285
436/* cam-if
437 *
438 * camera interface bus-clock, divided down from esysclk
439*/
440
441static struct clksrc_clk clk_cam = {
442 .clk = {
443 .name = "camif-upll", /* same as 2440 name */
444 .id = -1,
445 .parent = &clk_esysclk.clk,
446 .ctrlbit = S3C2443_SCLKCON_CAMCLK,
447 .enable = s3c2443_clkcon_enable_s,
448 },
449 .reg_div = { .reg = S3C2443_CLKDIV1, .size = 4, .shift = 26 },
450};
451
452/* display-if
453 *
454 * display interface clock, divided from esysclk
455*/
456
457static struct clksrc_clk clk_display = {
458 .clk = {
459 .name = "display-if",
460 .id = -1,
461 .parent = &clk_esysclk.clk,
462 .ctrlbit = S3C2443_SCLKCON_DISPCLK,
463 .enable = s3c2443_clkcon_enable_s,
464 },
465 .reg_div = { .reg = S3C2443_CLKDIV1, .size = 8, .shift = 16 },
466};
467
468/* prediv
469 *
470 * this divides the msysclk down to pass to h/p/etc.
471 */
472
473static unsigned long s3c2443_prediv_getrate(struct clk *clk)
474{
475 unsigned long rate = clk_get_rate(clk->parent);
476 unsigned long clkdiv0 = __raw_readl(S3C2443_CLKDIV0);
477
478 clkdiv0 &= S3C2443_CLKDIV0_PREDIV_MASK;
479 clkdiv0 >>= S3C2443_CLKDIV0_PREDIV_SHIFT;
480
481 return rate / (clkdiv0 + 1);
482}
483
484static struct clk clk_prediv = {
485 .name = "prediv",
486 .id = -1,
487 .parent = &clk_msysclk.clk,
488 .ops = &(struct clk_ops) {
489 .get_rate = s3c2443_prediv_getrate,
490 },
491};
492
493/* standard clock definitions */ 286/* standard clock definitions */
494 287
495static struct clk init_clocks_disable[] = { 288static struct clk init_clocks_off[] = {
496 { 289 {
497 .name = "nand",
498 .id = -1,
499 .parent = &clk_h,
500 }, {
501 .name = "sdi", 290 .name = "sdi",
502 .id = -1, 291 .id = -1,
503 .parent = &clk_p, 292 .parent = &clk_p,
504 .enable = s3c2443_clkcon_enable_p, 293 .enable = s3c2443_clkcon_enable_p,
505 .ctrlbit = S3C2443_PCLKCON_SDI, 294 .ctrlbit = S3C2443_PCLKCON_SDI,
506 }, { 295 }, {
507 .name = "adc",
508 .id = -1,
509 .parent = &clk_p,
510 .enable = s3c2443_clkcon_enable_p,
511 .ctrlbit = S3C2443_PCLKCON_ADC,
512 }, {
513 .name = "i2c",
514 .id = -1,
515 .parent = &clk_p,
516 .enable = s3c2443_clkcon_enable_p,
517 .ctrlbit = S3C2443_PCLKCON_IIC,
518 }, {
519 .name = "iis", 296 .name = "iis",
520 .id = -1, 297 .id = -1,
521 .parent = &clk_p, 298 .parent = &clk_p,
@@ -537,179 +314,12 @@ static struct clk init_clocks_disable[] = {
537}; 314};
538 315
539static struct clk init_clocks[] = { 316static struct clk init_clocks[] = {
540 {
541 .name = "dma",
542 .id = 0,
543 .parent = &clk_h,
544 .enable = s3c2443_clkcon_enable_h,
545 .ctrlbit = S3C2443_HCLKCON_DMA0,
546 }, {
547 .name = "dma",
548 .id = 1,
549 .parent = &clk_h,
550 .enable = s3c2443_clkcon_enable_h,
551 .ctrlbit = S3C2443_HCLKCON_DMA1,
552 }, {
553 .name = "dma",
554 .id = 2,
555 .parent = &clk_h,
556 .enable = s3c2443_clkcon_enable_h,
557 .ctrlbit = S3C2443_HCLKCON_DMA2,
558 }, {
559 .name = "dma",
560 .id = 3,
561 .parent = &clk_h,
562 .enable = s3c2443_clkcon_enable_h,
563 .ctrlbit = S3C2443_HCLKCON_DMA3,
564 }, {
565 .name = "dma",
566 .id = 4,
567 .parent = &clk_h,
568 .enable = s3c2443_clkcon_enable_h,
569 .ctrlbit = S3C2443_HCLKCON_DMA4,
570 }, {
571 .name = "dma",
572 .id = 5,
573 .parent = &clk_h,
574 .enable = s3c2443_clkcon_enable_h,
575 .ctrlbit = S3C2443_HCLKCON_DMA5,
576 }, {
577 .name = "lcd",
578 .id = -1,
579 .parent = &clk_h,
580 .enable = s3c2443_clkcon_enable_h,
581 .ctrlbit = S3C2443_HCLKCON_LCDC,
582 }, {
583 .name = "gpio",
584 .id = -1,
585 .parent = &clk_p,
586 .enable = s3c2443_clkcon_enable_p,
587 .ctrlbit = S3C2443_PCLKCON_GPIO,
588 }, {
589 .name = "usb-host",
590 .id = -1,
591 .parent = &clk_h,
592 .enable = s3c2443_clkcon_enable_h,
593 .ctrlbit = S3C2443_HCLKCON_USBH,
594 }, {
595 .name = "usb-device",
596 .id = -1,
597 .parent = &clk_h,
598 .enable = s3c2443_clkcon_enable_h,
599 .ctrlbit = S3C2443_HCLKCON_USBD,
600 }, {
601 .name = "hsmmc",
602 .id = -1,
603 .parent = &clk_h,
604 .enable = s3c2443_clkcon_enable_h,
605 .ctrlbit = S3C2443_HCLKCON_HSMMC,
606 }, {
607 .name = "cfc",
608 .id = -1,
609 .parent = &clk_h,
610 .enable = s3c2443_clkcon_enable_h,
611 .ctrlbit = S3C2443_HCLKCON_CFC,
612 }, {
613 .name = "ssmc",
614 .id = -1,
615 .parent = &clk_h,
616 .enable = s3c2443_clkcon_enable_h,
617 .ctrlbit = S3C2443_HCLKCON_SSMC,
618 }, {
619 .name = "timers",
620 .id = -1,
621 .parent = &clk_p,
622 .enable = s3c2443_clkcon_enable_p,
623 .ctrlbit = S3C2443_PCLKCON_PWMT,
624 }, {
625 .name = "uart",
626 .id = 0,
627 .parent = &clk_p,
628 .enable = s3c2443_clkcon_enable_p,
629 .ctrlbit = S3C2443_PCLKCON_UART0,
630 }, {
631 .name = "uart",
632 .id = 1,
633 .parent = &clk_p,
634 .enable = s3c2443_clkcon_enable_p,
635 .ctrlbit = S3C2443_PCLKCON_UART1,
636 }, {
637 .name = "uart",
638 .id = 2,
639 .parent = &clk_p,
640 .enable = s3c2443_clkcon_enable_p,
641 .ctrlbit = S3C2443_PCLKCON_UART2,
642 }, {
643 .name = "uart",
644 .id = 3,
645 .parent = &clk_p,
646 .enable = s3c2443_clkcon_enable_p,
647 .ctrlbit = S3C2443_PCLKCON_UART3,
648 }, {
649 .name = "rtc",
650 .id = -1,
651 .parent = &clk_p,
652 .enable = s3c2443_clkcon_enable_p,
653 .ctrlbit = S3C2443_PCLKCON_RTC,
654 }, {
655 .name = "watchdog",
656 .id = -1,
657 .parent = &clk_p,
658 .ctrlbit = S3C2443_PCLKCON_WDT,
659 }, {
660 .name = "usb-bus-host",
661 .id = -1,
662 .parent = &clk_usb_bus_host.clk,
663 }, {
664 .name = "ac97",
665 .id = -1,
666 .parent = &clk_p,
667 .ctrlbit = S3C2443_PCLKCON_AC97,
668 }
669};
670
671/* clocks to add where we need to check their parentage */
672
673static struct clksrc_clk __initdata *init_list[] = {
674 &clk_epllref, /* should be first */
675 &clk_esysclk,
676 &clk_msysclk,
677 &clk_arm,
678 &clk_i2s_eplldiv,
679 &clk_i2s,
680 &clk_cam,
681 &clk_uart,
682 &clk_display,
683 &clk_hsmmc_div,
684 &clk_usb_bus_host,
685}; 317};
686 318
687static void __init s3c2443_clk_initparents(void)
688{
689 int ptr;
690
691 for (ptr = 0; ptr < ARRAY_SIZE(init_list); ptr++)
692 s3c_set_clksrc(init_list[ptr], true);
693}
694
695static inline unsigned long s3c2443_get_hdiv(unsigned long clkcon0)
696{
697 clkcon0 &= S3C2443_CLKDIV0_HCLKDIV_MASK;
698
699 return clkcon0 + 1;
700}
701
702/* clocks to add straight away */ 319/* clocks to add straight away */
703 320
704static struct clksrc_clk *clksrcs[] __initdata = { 321static struct clksrc_clk *clksrcs[] __initdata = {
705 &clk_usb_bus_host,
706 &clk_epllref,
707 &clk_esysclk,
708 &clk_msysclk,
709 &clk_arm, 322 &clk_arm,
710 &clk_uart,
711 &clk_display,
712 &clk_cam,
713 &clk_i2s_eplldiv, 323 &clk_i2s_eplldiv,
714 &clk_i2s, 324 &clk_i2s,
715 &clk_hsspi, 325 &clk_hsspi,
@@ -717,92 +327,32 @@ static struct clksrc_clk *clksrcs[] __initdata = {
717}; 327};
718 328
719static struct clk *clks[] __initdata = { 329static struct clk *clks[] __initdata = {
720 &clk_ext,
721 &clk_epll,
722 &clk_usb_bus,
723 &clk_mpllref,
724 &clk_hsmmc, 330 &clk_hsmmc,
725 &clk_armdiv, 331 &clk_armdiv,
726 &clk_prediv,
727}; 332};
728 333
729void __init_or_cpufreq s3c2443_setup_clocks(void) 334void __init_or_cpufreq s3c2443_setup_clocks(void)
730{ 335{
731 unsigned long mpllcon = __raw_readl(S3C2443_MPLLCON); 336 s3c2443_common_setup_clocks(s3c2443_get_mpll, s3c2443_fclk_div);
732 unsigned long clkdiv0 = __raw_readl(S3C2443_CLKDIV0);
733 struct clk *xtal_clk;
734 unsigned long xtal;
735 unsigned long pll;
736 unsigned long fclk;
737 unsigned long hclk;
738 unsigned long pclk;
739
740 xtal_clk = clk_get(NULL, "xtal");
741 xtal = clk_get_rate(xtal_clk);
742 clk_put(xtal_clk);
743
744 pll = s3c2443_get_mpll(mpllcon, xtal);
745 clk_msysclk.clk.rate = pll;
746
747 fclk = pll / s3c2443_fclk_div(clkdiv0);
748 hclk = s3c2443_prediv_getrate(&clk_prediv);
749 hclk /= s3c2443_get_hdiv(clkdiv0);
750 pclk = hclk / ((clkdiv0 & S3C2443_CLKDIV0_HALF_PCLK) ? 2 : 1);
751
752 s3c24xx_setup_clocks(fclk, hclk, pclk);
753
754 printk("S3C2443: mpll %s %ld.%03ld MHz, cpu %ld.%03ld MHz, mem %ld.%03ld MHz, pclk %ld.%03ld MHz\n",
755 (mpllcon & S3C2443_PLLCON_OFF) ? "off":"on",
756 print_mhz(pll), print_mhz(fclk),
757 print_mhz(hclk), print_mhz(pclk));
758
759 s3c24xx_setup_clocks(fclk, hclk, pclk);
760} 337}
761 338
762void __init s3c2443_init_clocks(int xtal) 339void __init s3c2443_init_clocks(int xtal)
763{ 340{
764 struct clk *clkp;
765 unsigned long epllcon = __raw_readl(S3C2443_EPLLCON); 341 unsigned long epllcon = __raw_readl(S3C2443_EPLLCON);
766 int ret;
767 int ptr; 342 int ptr;
768 343
769 /* s3c2443 parents h and p clocks from prediv */ 344 clk_epll.rate = s3c2443_get_epll(epllcon, xtal);
770 clk_h.parent = &clk_prediv; 345 clk_epll.parent = &clk_epllref.clk;
771 clk_p.parent = &clk_prediv; 346
347 s3c2443_common_init_clocks(xtal, s3c2443_get_mpll, s3c2443_fclk_div);
772 348
773 s3c24xx_register_baseclocks(xtal);
774 s3c2443_setup_clocks(); 349 s3c2443_setup_clocks();
775 s3c2443_clk_initparents();
776
777 for (ptr = 0; ptr < ARRAY_SIZE(clks); ptr++) {
778 clkp = clks[ptr];
779 350
780 ret = s3c24xx_register_clock(clkp); 351 s3c24xx_register_clocks(clks, ARRAY_SIZE(clks));
781 if (ret < 0) {
782 printk(KERN_ERR "Failed to register clock %s (%d)\n",
783 clkp->name, ret);
784 }
785 }
786 352
787 for (ptr = 0; ptr < ARRAY_SIZE(clksrcs); ptr++) 353 for (ptr = 0; ptr < ARRAY_SIZE(clksrcs); ptr++)
788 s3c_register_clksrc(clksrcs[ptr], 1); 354 s3c_register_clksrc(clksrcs[ptr], 1);
789 355
790 clk_epll.rate = s3c2443_get_epll(epllcon, xtal);
791 clk_epll.parent = &clk_epllref.clk;
792 clk_usb_bus.parent = &clk_usb_bus_host.clk;
793
794 /* ensure usb bus clock is within correct rate of 48MHz */
795
796 if (clk_get_rate(&clk_usb_bus_host.clk) != (48 * 1000 * 1000)) {
797 printk(KERN_INFO "Warning: USB host bus not at 48MHz\n");
798 clk_set_rate(&clk_usb_bus_host.clk, 48*1000*1000);
799 }
800
801 printk("S3C2443: epll %s %ld.%03ld MHz, usb-bus %ld.%03ld MHz\n",
802 (epllcon & S3C2443_PLLCON_OFF) ? "off":"on",
803 print_mhz(clk_get_rate(&clk_epll)),
804 print_mhz(clk_get_rate(&clk_usb_bus)));
805
806 /* register clocks from clock array */ 356 /* register clocks from clock array */
807 357
808 s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks)); 358 s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks));
@@ -819,17 +369,8 @@ void __init s3c2443_init_clocks(int xtal)
819 369
820 /* install (and disable) the clocks we do not need immediately */ 370 /* install (and disable) the clocks we do not need immediately */
821 371
822 clkp = init_clocks_disable; 372 s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off));
823 for (ptr = 0; ptr < ARRAY_SIZE(init_clocks_disable); ptr++, clkp++) { 373 s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off));
824
825 ret = s3c24xx_register_clock(clkp);
826 if (ret < 0) {
827 printk(KERN_ERR "Failed to register clock %s (%d)\n",
828 clkp->name, ret);
829 }
830
831 (clkp->enable)(clkp, 0);
832 }
833 374
834 s3c_pwmclk_init(); 375 s3c_pwmclk_init();
835} 376}
diff --git a/arch/arm/mach-s3c64xx/dma.c b/arch/arm/mach-s3c64xx/dma.c
index b62bdf18dca4..33ccf7bf766a 100644
--- a/arch/arm/mach-s3c64xx/dma.c
+++ b/arch/arm/mach-s3c64xx/dma.c
@@ -18,6 +18,7 @@
18#include <linux/dmapool.h> 18#include <linux/dmapool.h>
19#include <linux/sysdev.h> 19#include <linux/sysdev.h>
20#include <linux/errno.h> 20#include <linux/errno.h>
21#include <linux/slab.h>
21#include <linux/delay.h> 22#include <linux/delay.h>
22#include <linux/clk.h> 23#include <linux/clk.h>
23#include <linux/err.h> 24#include <linux/err.h>
diff --git a/arch/arm/mach-s3c64xx/gpiolib.c b/arch/arm/mach-s3c64xx/gpiolib.c
index 66e6794481d2..60c929a3cab6 100644
--- a/arch/arm/mach-s3c64xx/gpiolib.c
+++ b/arch/arm/mach-s3c64xx/gpiolib.c
@@ -51,6 +51,7 @@
51 51
52static struct s3c_gpio_cfg gpio_4bit_cfg_noint = { 52static struct s3c_gpio_cfg gpio_4bit_cfg_noint = {
53 .set_config = s3c_gpio_setcfg_s3c64xx_4bit, 53 .set_config = s3c_gpio_setcfg_s3c64xx_4bit,
54 .get_config = s3c_gpio_getcfg_s3c64xx_4bit,
54 .set_pull = s3c_gpio_setpull_updown, 55 .set_pull = s3c_gpio_setpull_updown,
55 .get_pull = s3c_gpio_getpull_updown, 56 .get_pull = s3c_gpio_getpull_updown,
56}; 57};
@@ -58,12 +59,14 @@ static struct s3c_gpio_cfg gpio_4bit_cfg_noint = {
58static struct s3c_gpio_cfg gpio_4bit_cfg_eint0111 = { 59static struct s3c_gpio_cfg gpio_4bit_cfg_eint0111 = {
59 .cfg_eint = 7, 60 .cfg_eint = 7,
60 .set_config = s3c_gpio_setcfg_s3c64xx_4bit, 61 .set_config = s3c_gpio_setcfg_s3c64xx_4bit,
62 .get_config = s3c_gpio_getcfg_s3c64xx_4bit,
61 .set_pull = s3c_gpio_setpull_updown, 63 .set_pull = s3c_gpio_setpull_updown,
62 .get_pull = s3c_gpio_getpull_updown, 64 .get_pull = s3c_gpio_getpull_updown,
63}; 65};
64 66
65static struct s3c_gpio_cfg gpio_4bit_cfg_eint0011 = { 67static struct s3c_gpio_cfg gpio_4bit_cfg_eint0011 = {
66 .cfg_eint = 3, 68 .cfg_eint = 3,
69 .get_config = s3c_gpio_getcfg_s3c64xx_4bit,
67 .set_config = s3c_gpio_setcfg_s3c64xx_4bit, 70 .set_config = s3c_gpio_setcfg_s3c64xx_4bit,
68 .set_pull = s3c_gpio_setpull_updown, 71 .set_pull = s3c_gpio_setpull_updown,
69 .get_pull = s3c_gpio_getpull_updown, 72 .get_pull = s3c_gpio_getpull_updown,
@@ -171,6 +174,7 @@ static struct s3c_gpio_chip gpio_4bit2[] = {
171 174
172static struct s3c_gpio_cfg gpio_2bit_cfg_noint = { 175static struct s3c_gpio_cfg gpio_2bit_cfg_noint = {
173 .set_config = s3c_gpio_setcfg_s3c24xx, 176 .set_config = s3c_gpio_setcfg_s3c24xx,
177 .get_config = s3c_gpio_getcfg_s3c24xx,
174 .set_pull = s3c_gpio_setpull_updown, 178 .set_pull = s3c_gpio_setpull_updown,
175 .get_pull = s3c_gpio_getpull_updown, 179 .get_pull = s3c_gpio_getpull_updown,
176}; 180};
@@ -178,6 +182,7 @@ static struct s3c_gpio_cfg gpio_2bit_cfg_noint = {
178static struct s3c_gpio_cfg gpio_2bit_cfg_eint10 = { 182static struct s3c_gpio_cfg gpio_2bit_cfg_eint10 = {
179 .cfg_eint = 2, 183 .cfg_eint = 2,
180 .set_config = s3c_gpio_setcfg_s3c24xx, 184 .set_config = s3c_gpio_setcfg_s3c24xx,
185 .get_config = s3c_gpio_getcfg_s3c24xx,
181 .set_pull = s3c_gpio_setpull_updown, 186 .set_pull = s3c_gpio_setpull_updown,
182 .get_pull = s3c_gpio_getpull_updown, 187 .get_pull = s3c_gpio_getpull_updown,
183}; 188};
@@ -185,6 +190,7 @@ static struct s3c_gpio_cfg gpio_2bit_cfg_eint10 = {
185static struct s3c_gpio_cfg gpio_2bit_cfg_eint11 = { 190static struct s3c_gpio_cfg gpio_2bit_cfg_eint11 = {
186 .cfg_eint = 3, 191 .cfg_eint = 3,
187 .set_config = s3c_gpio_setcfg_s3c24xx, 192 .set_config = s3c_gpio_setcfg_s3c24xx,
193 .get_config = s3c_gpio_getcfg_s3c24xx,
188 .set_pull = s3c_gpio_setpull_updown, 194 .set_pull = s3c_gpio_setpull_updown,
189 .get_pull = s3c_gpio_getpull_updown, 195 .get_pull = s3c_gpio_getpull_updown,
190}; 196};
diff --git a/arch/arm/mach-s3c64xx/include/mach/pll.h b/arch/arm/mach-s3c64xx/include/mach/pll.h
index 90bbd72fdc4e..5ef0bb698ee0 100644
--- a/arch/arm/mach-s3c64xx/include/mach/pll.h
+++ b/arch/arm/mach-s3c64xx/include/mach/pll.h
@@ -20,6 +20,7 @@
20#define S3C6400_PLL_SDIV_SHIFT (0) 20#define S3C6400_PLL_SDIV_SHIFT (0)
21 21
22#include <asm/div64.h> 22#include <asm/div64.h>
23#include <plat/pll6553x.h>
23 24
24static inline unsigned long s3c6400_get_pll(unsigned long baseclk, 25static inline unsigned long s3c6400_get_pll(unsigned long baseclk,
25 u32 pllcon) 26 u32 pllcon)
@@ -37,38 +38,8 @@ static inline unsigned long s3c6400_get_pll(unsigned long baseclk,
37 return (unsigned long)fvco; 38 return (unsigned long)fvco;
38} 39}
39 40
40#define S3C6400_EPLL_MDIV_MASK ((1 << (23-16)) - 1)
41#define S3C6400_EPLL_PDIV_MASK ((1 << (13-8)) - 1)
42#define S3C6400_EPLL_SDIV_MASK ((1 << (2-0)) - 1)
43#define S3C6400_EPLL_MDIV_SHIFT (16)
44#define S3C6400_EPLL_PDIV_SHIFT (8)
45#define S3C6400_EPLL_SDIV_SHIFT (0)
46#define S3C6400_EPLL_KDIV_MASK (0xffff)
47
48static inline unsigned long s3c6400_get_epll(unsigned long baseclk) 41static inline unsigned long s3c6400_get_epll(unsigned long baseclk)
49{ 42{
50 unsigned long result; 43 return s3c_get_pll6553x(baseclk, __raw_readl(S3C_EPLL_CON0),
51 u32 epll0 = __raw_readl(S3C_EPLL_CON0); 44 __raw_readl(S3C_EPLL_CON1));
52 u32 epll1 = __raw_readl(S3C_EPLL_CON1);
53 u32 mdiv, pdiv, sdiv, kdiv;
54 u64 tmp;
55
56 mdiv = (epll0 >> S3C6400_EPLL_MDIV_SHIFT) & S3C6400_EPLL_MDIV_MASK;
57 pdiv = (epll0 >> S3C6400_EPLL_PDIV_SHIFT) & S3C6400_EPLL_PDIV_MASK;
58 sdiv = (epll0 >> S3C6400_EPLL_SDIV_SHIFT) & S3C6400_EPLL_SDIV_MASK;
59 kdiv = epll1 & S3C6400_EPLL_KDIV_MASK;
60
61 /* We need to multiple baseclk by mdiv (the integer part) and kdiv
62 * which is in 2^16ths, so shift mdiv up (does not overflow) and
63 * add kdiv before multiplying. The use of tmp is to avoid any
64 * overflows before shifting bac down into result when multipling
65 * by the mdiv and kdiv pair.
66 */
67
68 tmp = baseclk;
69 tmp *= (mdiv << 16) + kdiv;
70 do_div(tmp, (pdiv << sdiv));
71 result = tmp >> 16;
72
73 return result;
74} 45}
diff --git a/arch/arm/mach-s5p6440/gpio.c b/arch/arm/mach-s5p6440/gpio.c
index b0ea741177ad..262dc75d5bea 100644
--- a/arch/arm/mach-s5p6440/gpio.c
+++ b/arch/arm/mach-s5p6440/gpio.c
@@ -161,12 +161,15 @@ static struct s3c_gpio_cfg s5p6440_gpio_cfgs[] = {
161 }, { 161 }, {
162 .cfg_eint = 0, 162 .cfg_eint = 0,
163 .set_config = s3c_gpio_setcfg_s3c24xx, 163 .set_config = s3c_gpio_setcfg_s3c24xx,
164 .get_config = s3c_gpio_getcfg_s3c24xx,
164 }, { 165 }, {
165 .cfg_eint = 2, 166 .cfg_eint = 2,
166 .set_config = s3c_gpio_setcfg_s3c24xx, 167 .set_config = s3c_gpio_setcfg_s3c24xx,
168 .get_config = s3c_gpio_getcfg_s3c24xx,
167 }, { 169 }, {
168 .cfg_eint = 3, 170 .cfg_eint = 3,
169 .set_config = s3c_gpio_setcfg_s3c24xx, 171 .set_config = s3c_gpio_setcfg_s3c24xx,
172 .get_config = s3c_gpio_getcfg_s3c24xx,
170 }, 173 },
171}; 174};
172 175
@@ -279,6 +282,8 @@ void __init s5p6440_gpiolib_set_cfg(struct s3c_gpio_cfg *chipcfg, int nr_chips)
279 for (; nr_chips > 0; nr_chips--, chipcfg++) { 282 for (; nr_chips > 0; nr_chips--, chipcfg++) {
280 if (!chipcfg->set_config) 283 if (!chipcfg->set_config)
281 chipcfg->set_config = s3c_gpio_setcfg_s3c64xx_4bit; 284 chipcfg->set_config = s3c_gpio_setcfg_s3c64xx_4bit;
285 if (!chipcfg->get_config)
286 chipcfg->get_config = s3c_gpio_getcfg_s3c64xx_4bit;
282 if (!chipcfg->set_pull) 287 if (!chipcfg->set_pull)
283 chipcfg->set_pull = s3c_gpio_setpull_updown; 288 chipcfg->set_pull = s3c_gpio_setpull_updown;
284 if (!chipcfg->get_pull) 289 if (!chipcfg->get_pull)
diff --git a/arch/arm/mach-sa1100/Kconfig b/arch/arm/mach-sa1100/Kconfig
index b17d52f7cc48..fd4c52b7ccb6 100644
--- a/arch/arm/mach-sa1100/Kconfig
+++ b/arch/arm/mach-sa1100/Kconfig
@@ -57,7 +57,7 @@ config SA1100_COLLIE
57config SA1100_H3100 57config SA1100_H3100
58 bool "Compaq iPAQ H3100" 58 bool "Compaq iPAQ H3100"
59 select HTC_EGPIO 59 select HTC_EGPIO
60 select CPU_FREQ_SA1100 60 select CPU_FREQ_SA1110
61 help 61 help
62 Say Y here if you intend to run this kernel on the Compaq iPAQ 62 Say Y here if you intend to run this kernel on the Compaq iPAQ
63 H3100 handheld computer. Information about this machine and the 63 H3100 handheld computer. Information about this machine and the
@@ -68,7 +68,7 @@ config SA1100_H3100
68config SA1100_H3600 68config SA1100_H3600
69 bool "Compaq iPAQ H3600/H3700" 69 bool "Compaq iPAQ H3600/H3700"
70 select HTC_EGPIO 70 select HTC_EGPIO
71 select CPU_FREQ_SA1100 71 select CPU_FREQ_SA1110
72 help 72 help
73 Say Y here if you intend to run this kernel on the Compaq iPAQ 73 Say Y here if you intend to run this kernel on the Compaq iPAQ
74 H3600 handheld computer. Information about this machine and the 74 H3600 handheld computer. Information about this machine and the
diff --git a/arch/arm/mach-sa1100/cpu-sa1110.c b/arch/arm/mach-sa1100/cpu-sa1110.c
index 63b32b68b296..7252874d328b 100644
--- a/arch/arm/mach-sa1100/cpu-sa1110.c
+++ b/arch/arm/mach-sa1100/cpu-sa1110.c
@@ -363,6 +363,9 @@ static int __init sa1110_clk_init(void)
363 struct sdram_params *sdram; 363 struct sdram_params *sdram;
364 const char *name = sdram_name; 364 const char *name = sdram_name;
365 365
366 if (!cpu_is_sa1110())
367 return -ENODEV;
368
366 if (!name[0]) { 369 if (!name[0]) {
367 if (machine_is_assabet()) 370 if (machine_is_assabet())
368 name = "TC59SM716-CL3"; 371 name = "TC59SM716-CL3";
diff --git a/arch/arm/mach-sa1100/jornada720_ssp.c b/arch/arm/mach-sa1100/jornada720_ssp.c
index 9b6dee5d16db..9d490c66891c 100644
--- a/arch/arm/mach-sa1100/jornada720_ssp.c
+++ b/arch/arm/mach-sa1100/jornada720_ssp.c
@@ -18,7 +18,6 @@
18#include <linux/module.h> 18#include <linux/module.h>
19#include <linux/platform_device.h> 19#include <linux/platform_device.h>
20#include <linux/sched.h> 20#include <linux/sched.h>
21#include <linux/slab.h>
22 21
23#include <mach/hardware.h> 22#include <mach/hardware.h>
24#include <mach/jornada720.h> 23#include <mach/jornada720.h>
diff --git a/arch/arm/mach-sa1100/neponset.c b/arch/arm/mach-sa1100/neponset.c
index 0b505d9f22d6..c601a75a333d 100644
--- a/arch/arm/mach-sa1100/neponset.c
+++ b/arch/arm/mach-sa1100/neponset.c
@@ -8,7 +8,6 @@
8#include <linux/ioport.h> 8#include <linux/ioport.h>
9#include <linux/serial_core.h> 9#include <linux/serial_core.h>
10#include <linux/platform_device.h> 10#include <linux/platform_device.h>
11#include <linux/slab.h>
12 11
13#include <mach/hardware.h> 12#include <mach/hardware.h>
14#include <asm/mach-types.h> 13#include <asm/mach-types.h>
diff --git a/arch/arm/mach-u300/dummyspichip.c b/arch/arm/mach-u300/dummyspichip.c
index 962f9de454de..5f55012b7c9e 100644
--- a/arch/arm/mach-u300/dummyspichip.c
+++ b/arch/arm/mach-u300/dummyspichip.c
@@ -15,6 +15,7 @@
15#include <linux/mutex.h> 15#include <linux/mutex.h>
16#include <linux/spi/spi.h> 16#include <linux/spi/spi.h>
17#include <linux/dma-mapping.h> 17#include <linux/dma-mapping.h>
18#include <linux/slab.h>
18/* 19/*
19 * WARNING! Do not include this pl022-specific controller header 20 * WARNING! Do not include this pl022-specific controller header
20 * for any generic driver. It is only done in this dummy chip 21 * for any generic driver. It is only done in this dummy chip
diff --git a/arch/arm/mach-u300/mmc.c b/arch/arm/mach-u300/mmc.c
index 783f1236fe1b..88506d030596 100644
--- a/arch/arm/mach-u300/mmc.c
+++ b/arch/arm/mach-u300/mmc.c
@@ -20,6 +20,7 @@
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#include <linux/amba/mmci.h>
23#include <linux/slab.h>
23 24
24#include "mmc.h" 25#include "mmc.h"
25#include "padmux.h" 26#include "padmux.h"
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c
index 60baba65635e..3dff8641b03f 100644
--- a/arch/arm/mach-versatile/core.c
+++ b/arch/arm/mach-versatile/core.c
@@ -29,6 +29,7 @@
29#include <linux/amba/pl061.h> 29#include <linux/amba/pl061.h>
30#include <linux/amba/mmci.h> 30#include <linux/amba/mmci.h>
31#include <linux/io.h> 31#include <linux/io.h>
32#include <linux/gfp.h>
32 33
33#include <asm/clkdev.h> 34#include <asm/clkdev.h>
34#include <asm/system.h> 35#include <asm/system.h>
diff --git a/arch/arm/mach-versatile/pci.c b/arch/arm/mach-versatile/pci.c
index 7161ba23b58a..334f0df4e948 100644
--- a/arch/arm/mach-versatile/pci.c
+++ b/arch/arm/mach-versatile/pci.c
@@ -16,7 +16,6 @@
16 */ 16 */
17#include <linux/kernel.h> 17#include <linux/kernel.h>
18#include <linux/pci.h> 18#include <linux/pci.h>
19#include <linux/slab.h>
20#include <linux/ioport.h> 19#include <linux/ioport.h>
21#include <linux/interrupt.h> 20#include <linux/interrupt.h>
22#include <linux/spinlock.h> 21#include <linux/spinlock.h>
diff --git a/arch/arm/mach-w90x900/dev.c b/arch/arm/mach-w90x900/dev.c
index 48876122df91..e2958eb567f9 100644
--- a/arch/arm/mach-w90x900/dev.c
+++ b/arch/arm/mach-w90x900/dev.c
@@ -18,6 +18,7 @@
18#include <linux/timer.h> 18#include <linux/timer.h>
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/platform_device.h> 20#include <linux/platform_device.h>
21#include <linux/slab.h>
21 22
22#include <linux/mtd/physmap.h> 23#include <linux/mtd/physmap.h>
23#include <linux/mtd/mtd.h> 24#include <linux/mtd/mtd.h>
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
index 33027301639e..346ae14824a5 100644
--- a/arch/arm/mm/Kconfig
+++ b/arch/arm/mm/Kconfig
@@ -572,6 +572,8 @@ config CPU_TLB_V6
572config CPU_TLB_V7 572config CPU_TLB_V7
573 bool 573 bool
574 574
575config VERIFY_PERMISSION_FAULT
576 bool
575endif 577endif
576 578
577config CPU_HAS_ASID 579config CPU_HAS_ASID
@@ -736,6 +738,12 @@ config NEEDS_SYSCALL_FOR_CMPXCHG
736config OUTER_CACHE 738config OUTER_CACHE
737 bool 739 bool
738 740
741config OUTER_CACHE_SYNC
742 bool
743 help
744 The outer cache has a outer_cache_fns.sync function pointer
745 that can be used to drain the write buffer of the outer cache.
746
739config CACHE_FEROCEON_L2 747config CACHE_FEROCEON_L2
740 bool "Enable the Feroceon L2 cache controller" 748 bool "Enable the Feroceon L2 cache controller"
741 depends on ARCH_KIRKWOOD || ARCH_MV78XX0 749 depends on ARCH_KIRKWOOD || ARCH_MV78XX0
@@ -758,12 +766,13 @@ config CACHE_L2X0
758 ARCH_NOMADIK || ARCH_OMAP4 || ARCH_U8500 || ARCH_VEXPRESS_CA9X4 766 ARCH_NOMADIK || ARCH_OMAP4 || ARCH_U8500 || ARCH_VEXPRESS_CA9X4
759 default y 767 default y
760 select OUTER_CACHE 768 select OUTER_CACHE
769 select OUTER_CACHE_SYNC
761 help 770 help
762 This option enables the L2x0 PrimeCell. 771 This option enables the L2x0 PrimeCell.
763 772
764config CACHE_TAUROS2 773config CACHE_TAUROS2
765 bool "Enable the Tauros2 L2 cache controller" 774 bool "Enable the Tauros2 L2 cache controller"
766 depends on ARCH_DOVE 775 depends on (ARCH_DOVE || ARCH_MMP)
767 default y 776 default y
768 select OUTER_CACHE 777 select OUTER_CACHE
769 help 778 help
@@ -801,3 +810,9 @@ config ARM_DMA_MEM_BUFFERABLE
801 behaviour. Therefore, we offer this as an option. 810 behaviour. Therefore, we offer this as an option.
802 811
803 You are recommended say 'Y' here and debug any affected drivers. 812 You are recommended say 'Y' here and debug any affected drivers.
813
814config ARCH_HAS_BARRIERS
815 bool
816 help
817 This option allows the use of custom mandatory barriers
818 included via the mach/barriers.h file.
diff --git a/arch/arm/mm/abort-ev7.S b/arch/arm/mm/abort-ev7.S
index 2e6dc040c654..ec88b157d3bb 100644
--- a/arch/arm/mm/abort-ev7.S
+++ b/arch/arm/mm/abort-ev7.S
@@ -29,5 +29,26 @@ ENTRY(v7_early_abort)
29 * V6 code adjusts the returned DFSR. 29 * V6 code adjusts the returned DFSR.
30 * New designs should not need to patch up faults. 30 * New designs should not need to patch up faults.
31 */ 31 */
32
33#if defined(CONFIG_VERIFY_PERMISSION_FAULT)
34 /*
35 * Detect erroneous permission failures and fix
36 */
37 ldr r3, =0x40d @ On permission fault
38 and r3, r1, r3
39 cmp r3, #0x0d
40 movne pc, lr
41
42 mcr p15, 0, r0, c7, c8, 0 @ Retranslate FAR
43 isb
44 mrc p15, 0, r2, c7, c4, 0 @ Read the PAR
45 and r3, r2, #0x7b @ On translation fault
46 cmp r3, #0x0b
47 movne pc, lr
48 bic r1, r1, #0xf @ Fix up FSR FS[5:0]
49 and r2, r2, #0x7e
50 orr r1, r1, r2, LSR #1
51#endif
52
32 mov pc, lr 53 mov pc, lr
33ENDPROC(v7_early_abort) 54ENDPROC(v7_early_abort)
diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c
index 28b7c2776198..6f98c358989a 100644
--- a/arch/arm/mm/alignment.c
+++ b/arch/arm/mm/alignment.c
@@ -167,15 +167,15 @@ union offset_union {
167 THUMB( "1: "ins" %1, [%2]\n" ) \ 167 THUMB( "1: "ins" %1, [%2]\n" ) \
168 THUMB( " add %2, %2, #1\n" ) \ 168 THUMB( " add %2, %2, #1\n" ) \
169 "2:\n" \ 169 "2:\n" \
170 " .section .fixup,\"ax\"\n" \ 170 " .pushsection .fixup,\"ax\"\n" \
171 " .align 2\n" \ 171 " .align 2\n" \
172 "3: mov %0, #1\n" \ 172 "3: mov %0, #1\n" \
173 " b 2b\n" \ 173 " b 2b\n" \
174 " .previous\n" \ 174 " .popsection\n" \
175 " .section __ex_table,\"a\"\n" \ 175 " .pushsection __ex_table,\"a\"\n" \
176 " .align 3\n" \ 176 " .align 3\n" \
177 " .long 1b, 3b\n" \ 177 " .long 1b, 3b\n" \
178 " .previous\n" \ 178 " .popsection\n" \
179 : "=r" (err), "=&r" (val), "=r" (addr) \ 179 : "=r" (err), "=&r" (val), "=r" (addr) \
180 : "0" (err), "2" (addr)) 180 : "0" (err), "2" (addr))
181 181
@@ -227,16 +227,16 @@ union offset_union {
227 " mov %1, %1, "NEXT_BYTE"\n" \ 227 " mov %1, %1, "NEXT_BYTE"\n" \
228 "2: "ins" %1, [%2]\n" \ 228 "2: "ins" %1, [%2]\n" \
229 "3:\n" \ 229 "3:\n" \
230 " .section .fixup,\"ax\"\n" \ 230 " .pushsection .fixup,\"ax\"\n" \
231 " .align 2\n" \ 231 " .align 2\n" \
232 "4: mov %0, #1\n" \ 232 "4: mov %0, #1\n" \
233 " b 3b\n" \ 233 " b 3b\n" \
234 " .previous\n" \ 234 " .popsection\n" \
235 " .section __ex_table,\"a\"\n" \ 235 " .pushsection __ex_table,\"a\"\n" \
236 " .align 3\n" \ 236 " .align 3\n" \
237 " .long 1b, 4b\n" \ 237 " .long 1b, 4b\n" \
238 " .long 2b, 4b\n" \ 238 " .long 2b, 4b\n" \
239 " .previous\n" \ 239 " .popsection\n" \
240 : "=r" (err), "=&r" (v), "=&r" (a) \ 240 : "=r" (err), "=&r" (v), "=&r" (a) \
241 : "0" (err), "1" (v), "2" (a)); \ 241 : "0" (err), "1" (v), "2" (a)); \
242 if (err) \ 242 if (err) \
@@ -267,18 +267,18 @@ union offset_union {
267 " mov %1, %1, "NEXT_BYTE"\n" \ 267 " mov %1, %1, "NEXT_BYTE"\n" \
268 "4: "ins" %1, [%2]\n" \ 268 "4: "ins" %1, [%2]\n" \
269 "5:\n" \ 269 "5:\n" \
270 " .section .fixup,\"ax\"\n" \ 270 " .pushsection .fixup,\"ax\"\n" \
271 " .align 2\n" \ 271 " .align 2\n" \
272 "6: mov %0, #1\n" \ 272 "6: mov %0, #1\n" \
273 " b 5b\n" \ 273 " b 5b\n" \
274 " .previous\n" \ 274 " .popsection\n" \
275 " .section __ex_table,\"a\"\n" \ 275 " .pushsection __ex_table,\"a\"\n" \
276 " .align 3\n" \ 276 " .align 3\n" \
277 " .long 1b, 6b\n" \ 277 " .long 1b, 6b\n" \
278 " .long 2b, 6b\n" \ 278 " .long 2b, 6b\n" \
279 " .long 3b, 6b\n" \ 279 " .long 3b, 6b\n" \
280 " .long 4b, 6b\n" \ 280 " .long 4b, 6b\n" \
281 " .previous\n" \ 281 " .popsection\n" \
282 : "=r" (err), "=&r" (v), "=&r" (a) \ 282 : "=r" (err), "=&r" (v), "=&r" (a) \
283 : "0" (err), "1" (v), "2" (a)); \ 283 : "0" (err), "1" (v), "2" (a)); \
284 if (err) \ 284 if (err) \
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
index 78f0fc8595e2..9819869d2bc9 100644
--- a/arch/arm/mm/cache-l2x0.c
+++ b/arch/arm/mm/cache-l2x0.c
@@ -94,6 +94,15 @@ static inline void l2x0_flush_line(unsigned long addr)
94} 94}
95#endif 95#endif
96 96
97static void l2x0_cache_sync(void)
98{
99 unsigned long flags;
100
101 spin_lock_irqsave(&l2x0_lock, flags);
102 cache_sync();
103 spin_unlock_irqrestore(&l2x0_lock, flags);
104}
105
97static inline void l2x0_inv_all(void) 106static inline void l2x0_inv_all(void)
98{ 107{
99 unsigned long flags; 108 unsigned long flags;
@@ -252,6 +261,7 @@ void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask)
252 outer_cache.inv_range = l2x0_inv_range; 261 outer_cache.inv_range = l2x0_inv_range;
253 outer_cache.clean_range = l2x0_clean_range; 262 outer_cache.clean_range = l2x0_clean_range;
254 outer_cache.flush_range = l2x0_flush_range; 263 outer_cache.flush_range = l2x0_flush_range;
264 outer_cache.sync = l2x0_cache_sync;
255 265
256 printk(KERN_INFO "%s cache controller enabled\n", type); 266 printk(KERN_INFO "%s cache controller enabled\n", type);
257 printk(KERN_INFO "l2x0: %d ways, CACHE_ID 0x%08x, AUX_CTRL 0x%08x\n", 267 printk(KERN_INFO "l2x0: %d ways, CACHE_ID 0x%08x, AUX_CTRL 0x%08x\n",
diff --git a/arch/arm/mm/copypage-fa.c b/arch/arm/mm/copypage-fa.c
index b2a6008b0111..d2852e1635b1 100644
--- a/arch/arm/mm/copypage-fa.c
+++ b/arch/arm/mm/copypage-fa.c
@@ -40,7 +40,7 @@ fa_copy_user_page(void *kto, const void *kfrom)
40} 40}
41 41
42void fa_copy_user_highpage(struct page *to, struct page *from, 42void fa_copy_user_highpage(struct page *to, struct page *from,
43 unsigned long vaddr) 43 unsigned long vaddr, struct vm_area_struct *vma)
44{ 44{
45 void *kto, *kfrom; 45 void *kto, *kfrom;
46 46
diff --git a/arch/arm/mm/copypage-v6.c b/arch/arm/mm/copypage-v6.c
index 8bca4dea6dfa..f55fa1044f72 100644
--- a/arch/arm/mm/copypage-v6.c
+++ b/arch/arm/mm/copypage-v6.c
@@ -41,14 +41,7 @@ static void v6_copy_user_highpage_nonaliasing(struct page *to,
41 kfrom = kmap_atomic(from, KM_USER0); 41 kfrom = kmap_atomic(from, KM_USER0);
42 kto = kmap_atomic(to, KM_USER1); 42 kto = kmap_atomic(to, KM_USER1);
43 copy_page(kto, kfrom); 43 copy_page(kto, kfrom);
44#ifdef CONFIG_HIGHMEM 44 __cpuc_flush_dcache_area(kto, PAGE_SIZE);
45 /*
46 * kmap_atomic() doesn't set the page virtual address, and
47 * kunmap_atomic() takes care of cache flushing already.
48 */
49 if (page_address(to) != NULL)
50#endif
51 __cpuc_flush_dcache_area(kto, PAGE_SIZE);
52 kunmap_atomic(kto, KM_USER1); 45 kunmap_atomic(kto, KM_USER1);
53 kunmap_atomic(kfrom, KM_USER0); 46 kunmap_atomic(kfrom, KM_USER0);
54} 47}
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index 0da7eccf7749..13fa536d82e6 100644
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -11,7 +11,7 @@
11 */ 11 */
12#include <linux/module.h> 12#include <linux/module.h>
13#include <linux/mm.h> 13#include <linux/mm.h>
14#include <linux/slab.h> 14#include <linux/gfp.h>
15#include <linux/errno.h> 15#include <linux/errno.h>
16#include <linux/list.h> 16#include <linux/list.h>
17#include <linux/init.h> 17#include <linux/init.h>
@@ -464,6 +464,11 @@ static void dma_cache_maint_page(struct page *page, unsigned long offset,
464 vaddr += offset; 464 vaddr += offset;
465 op(vaddr, len, dir); 465 op(vaddr, len, dir);
466 kunmap_high(page); 466 kunmap_high(page);
467 } else if (cache_is_vipt()) {
468 pte_t saved_pte;
469 vaddr = kmap_high_l1_vipt(page, &saved_pte);
470 op(vaddr + offset, len, dir);
471 kunmap_high_l1_vipt(page, saved_pte);
467 } 472 }
468 } else { 473 } else {
469 vaddr = page_address(page) + offset; 474 vaddr = page_address(page) + offset;
diff --git a/arch/arm/mm/fault-armv.c b/arch/arm/mm/fault-armv.c
index 82df01a72f4a..9b906dec1ca1 100644
--- a/arch/arm/mm/fault-armv.c
+++ b/arch/arm/mm/fault-armv.c
@@ -16,6 +16,7 @@
16#include <linux/vmalloc.h> 16#include <linux/vmalloc.h>
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/pagemap.h> 18#include <linux/pagemap.h>
19#include <linux/gfp.h>
19 20
20#include <asm/bugs.h> 21#include <asm/bugs.h>
21#include <asm/cacheflush.h> 22#include <asm/cacheflush.h>
diff --git a/arch/arm/mm/flush.c b/arch/arm/mm/flush.c
index e34f095e2090..c6844cb9b508 100644
--- a/arch/arm/mm/flush.c
+++ b/arch/arm/mm/flush.c
@@ -13,6 +13,7 @@
13 13
14#include <asm/cacheflush.h> 14#include <asm/cacheflush.h>
15#include <asm/cachetype.h> 15#include <asm/cachetype.h>
16#include <asm/highmem.h>
16#include <asm/smp_plat.h> 17#include <asm/smp_plat.h>
17#include <asm/system.h> 18#include <asm/system.h>
18#include <asm/tlbflush.h> 19#include <asm/tlbflush.h>
@@ -152,21 +153,25 @@ void copy_to_user_page(struct vm_area_struct *vma, struct page *page,
152 153
153void __flush_dcache_page(struct address_space *mapping, struct page *page) 154void __flush_dcache_page(struct address_space *mapping, struct page *page)
154{ 155{
155 void *addr = page_address(page);
156
157 /* 156 /*
158 * Writeback any data associated with the kernel mapping of this 157 * Writeback any data associated with the kernel mapping of this
159 * page. This ensures that data in the physical page is mutually 158 * page. This ensures that data in the physical page is mutually
160 * coherent with the kernels mapping. 159 * coherent with the kernels mapping.
161 */ 160 */
162#ifdef CONFIG_HIGHMEM 161 if (!PageHighMem(page)) {
163 /* 162 __cpuc_flush_dcache_area(page_address(page), PAGE_SIZE);
164 * kmap_atomic() doesn't set the page virtual address, and 163 } else {
165 * kunmap_atomic() takes care of cache flushing already. 164 void *addr = kmap_high_get(page);
166 */ 165 if (addr) {
167 if (addr) 166 __cpuc_flush_dcache_area(addr, PAGE_SIZE);
168#endif 167 kunmap_high(page);
169 __cpuc_flush_dcache_area(addr, PAGE_SIZE); 168 } else if (cache_is_vipt()) {
169 pte_t saved_pte;
170 addr = kmap_high_l1_vipt(page, &saved_pte);
171 __cpuc_flush_dcache_area(addr, PAGE_SIZE);
172 kunmap_high_l1_vipt(page, saved_pte);
173 }
174 }
170 175
171 /* 176 /*
172 * If this is a page cache page, and we have an aliasing VIPT cache, 177 * If this is a page cache page, and we have an aliasing VIPT cache,
diff --git a/arch/arm/mm/highmem.c b/arch/arm/mm/highmem.c
index 2be1ec7c1b41..77b030f5ec09 100644
--- a/arch/arm/mm/highmem.c
+++ b/arch/arm/mm/highmem.c
@@ -79,7 +79,8 @@ void kunmap_atomic(void *kvaddr, enum km_type type)
79 unsigned int idx = type + KM_TYPE_NR * smp_processor_id(); 79 unsigned int idx = type + KM_TYPE_NR * smp_processor_id();
80 80
81 if (kvaddr >= (void *)FIXADDR_START) { 81 if (kvaddr >= (void *)FIXADDR_START) {
82 __cpuc_flush_dcache_area((void *)vaddr, PAGE_SIZE); 82 if (cache_is_vivt())
83 __cpuc_flush_dcache_area((void *)vaddr, PAGE_SIZE);
83#ifdef CONFIG_DEBUG_HIGHMEM 84#ifdef CONFIG_DEBUG_HIGHMEM
84 BUG_ON(vaddr != __fix_to_virt(FIX_KMAP_BEGIN + idx)); 85 BUG_ON(vaddr != __fix_to_virt(FIX_KMAP_BEGIN + idx));
85 set_pte_ext(TOP_PTE(vaddr), __pte(0), 0); 86 set_pte_ext(TOP_PTE(vaddr), __pte(0), 0);
@@ -124,3 +125,87 @@ struct page *kmap_atomic_to_page(const void *ptr)
124 pte = TOP_PTE(vaddr); 125 pte = TOP_PTE(vaddr);
125 return pte_page(*pte); 126 return pte_page(*pte);
126} 127}
128
129#ifdef CONFIG_CPU_CACHE_VIPT
130
131#include <linux/percpu.h>
132
133/*
134 * The VIVT cache of a highmem page is always flushed before the page
135 * is unmapped. Hence unmapped highmem pages need no cache maintenance
136 * in that case.
137 *
138 * However unmapped pages may still be cached with a VIPT cache, and
139 * it is not possible to perform cache maintenance on them using physical
140 * addresses unfortunately. So we have no choice but to set up a temporary
141 * virtual mapping for that purpose.
142 *
143 * Yet this VIPT cache maintenance may be triggered from DMA support
144 * functions which are possibly called from interrupt context. As we don't
145 * want to keep interrupt disabled all the time when such maintenance is
146 * taking place, we therefore allow for some reentrancy by preserving and
147 * restoring the previous fixmap entry before the interrupted context is
148 * resumed. If the reentrancy depth is 0 then there is no need to restore
149 * the previous fixmap, and leaving the current one in place allow it to
150 * be reused the next time without a TLB flush (common with DMA).
151 */
152
153static DEFINE_PER_CPU(int, kmap_high_l1_vipt_depth);
154
155void *kmap_high_l1_vipt(struct page *page, pte_t *saved_pte)
156{
157 unsigned int idx, cpu = smp_processor_id();
158 int *depth = &per_cpu(kmap_high_l1_vipt_depth, cpu);
159 unsigned long vaddr, flags;
160 pte_t pte, *ptep;
161
162 idx = KM_L1_CACHE + KM_TYPE_NR * cpu;
163 vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
164 ptep = TOP_PTE(vaddr);
165 pte = mk_pte(page, kmap_prot);
166
167 if (!in_interrupt())
168 preempt_disable();
169
170 raw_local_irq_save(flags);
171 (*depth)++;
172 if (pte_val(*ptep) == pte_val(pte)) {
173 *saved_pte = pte;
174 } else {
175 *saved_pte = *ptep;
176 set_pte_ext(ptep, pte, 0);
177 local_flush_tlb_kernel_page(vaddr);
178 }
179 raw_local_irq_restore(flags);
180
181 return (void *)vaddr;
182}
183
184void kunmap_high_l1_vipt(struct page *page, pte_t saved_pte)
185{
186 unsigned int idx, cpu = smp_processor_id();
187 int *depth = &per_cpu(kmap_high_l1_vipt_depth, cpu);
188 unsigned long vaddr, flags;
189 pte_t pte, *ptep;
190
191 idx = KM_L1_CACHE + KM_TYPE_NR * cpu;
192 vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
193 ptep = TOP_PTE(vaddr);
194 pte = mk_pte(page, kmap_prot);
195
196 BUG_ON(pte_val(*ptep) != pte_val(pte));
197 BUG_ON(*depth <= 0);
198
199 raw_local_irq_save(flags);
200 (*depth)--;
201 if (*depth != 0 && pte_val(pte) != pte_val(saved_pte)) {
202 set_pte_ext(ptep, saved_pte, 0);
203 local_flush_tlb_kernel_page(vaddr);
204 }
205 raw_local_irq_restore(flags);
206
207 if (!in_interrupt())
208 preempt_enable();
209}
210
211#endif /* CONFIG_CPU_CACHE_VIPT */
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index 105d1d4f420b..1ba6cf5a2c02 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -16,6 +16,7 @@
16#include <linux/nodemask.h> 16#include <linux/nodemask.h>
17#include <linux/initrd.h> 17#include <linux/initrd.h>
18#include <linux/highmem.h> 18#include <linux/highmem.h>
19#include <linux/gfp.h>
19 20
20#include <asm/mach-types.h> 21#include <asm/mach-types.h>
21#include <asm/sections.h> 22#include <asm/sections.h>
@@ -84,9 +85,6 @@ void show_mem(void)
84 printk("Mem-info:\n"); 85 printk("Mem-info:\n");
85 show_free_areas(); 86 show_free_areas();
86 for_each_online_node(node) { 87 for_each_online_node(node) {
87 pg_data_t *n = NODE_DATA(node);
88 struct page *map = pgdat_page_nr(n, 0) - n->node_start_pfn;
89
90 for_each_nodebank (i,mi,node) { 88 for_each_nodebank (i,mi,node) {
91 struct membank *bank = &mi->bank[i]; 89 struct membank *bank = &mi->bank[i];
92 unsigned int pfn1, pfn2; 90 unsigned int pfn1, pfn2;
@@ -95,8 +93,8 @@ void show_mem(void)
95 pfn1 = bank_pfn_start(bank); 93 pfn1 = bank_pfn_start(bank);
96 pfn2 = bank_pfn_end(bank); 94 pfn2 = bank_pfn_end(bank);
97 95
98 page = map + pfn1; 96 page = pfn_to_page(pfn1);
99 end = map + pfn2; 97 end = pfn_to_page(pfn2 - 1) + 1;
100 98
101 do { 99 do {
102 total++; 100 total++;
@@ -568,9 +566,6 @@ void __init mem_init(void)
568 reserved_pages = free_pages = 0; 566 reserved_pages = free_pages = 0;
569 567
570 for_each_online_node(node) { 568 for_each_online_node(node) {
571 pg_data_t *n = NODE_DATA(node);
572 struct page *map = pgdat_page_nr(n, 0) - n->node_start_pfn;
573
574 for_each_nodebank(i, &meminfo, node) { 569 for_each_nodebank(i, &meminfo, node) {
575 struct membank *bank = &meminfo.bank[i]; 570 struct membank *bank = &meminfo.bank[i];
576 unsigned int pfn1, pfn2; 571 unsigned int pfn1, pfn2;
@@ -579,8 +574,8 @@ void __init mem_init(void)
579 pfn1 = bank_pfn_start(bank); 574 pfn1 = bank_pfn_start(bank);
580 pfn2 = bank_pfn_end(bank); 575 pfn2 = bank_pfn_end(bank);
581 576
582 page = map + pfn1; 577 page = pfn_to_page(pfn1);
583 end = map + pfn2; 578 end = pfn_to_page(pfn2 - 1) + 1;
584 579
585 do { 580 do {
586 if (PageReserved(page)) 581 if (PageReserved(page))
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index 69852003675f..e7113d0b8168 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -421,6 +421,10 @@ static void __init build_mem_type_table(void)
421 user_pgprot |= L_PTE_SHARED; 421 user_pgprot |= L_PTE_SHARED;
422 kern_pgprot |= L_PTE_SHARED; 422 kern_pgprot |= L_PTE_SHARED;
423 vecs_pgprot |= L_PTE_SHARED; 423 vecs_pgprot |= L_PTE_SHARED;
424 mem_types[MT_DEVICE_WC].prot_sect |= PMD_SECT_S;
425 mem_types[MT_DEVICE_WC].prot_pte |= L_PTE_SHARED;
426 mem_types[MT_DEVICE_CACHED].prot_sect |= PMD_SECT_S;
427 mem_types[MT_DEVICE_CACHED].prot_pte |= L_PTE_SHARED;
424 mem_types[MT_MEMORY].prot_sect |= PMD_SECT_S; 428 mem_types[MT_MEMORY].prot_sect |= PMD_SECT_S;
425 mem_types[MT_MEMORY_NONCACHED].prot_sect |= PMD_SECT_S; 429 mem_types[MT_MEMORY_NONCACHED].prot_sect |= PMD_SECT_S;
426#endif 430#endif
@@ -1087,10 +1091,12 @@ void setup_mm_for_reboot(char mode)
1087 pgd_t *pgd; 1091 pgd_t *pgd;
1088 int i; 1092 int i;
1089 1093
1090 if (current->mm && current->mm->pgd) 1094 /*
1091 pgd = current->mm->pgd; 1095 * We need to access to user-mode page tables here. For kernel threads
1092 else 1096 * we don't have any user-mode mappings so we use the context that we
1093 pgd = init_mm.pgd; 1097 * "borrowed".
1098 */
1099 pgd = current->active_mm->pgd;
1094 1100
1095 base_pmdval = PMD_SECT_AP_WRITE | PMD_SECT_AP_READ | PMD_TYPE_SECT; 1101 base_pmdval = PMD_SECT_AP_WRITE | PMD_SECT_AP_READ | PMD_TYPE_SECT;
1096 if (cpu_architecture() <= CPU_ARCH_ARMv5TEJ && !cpu_is_xscale()) 1102 if (cpu_architecture() <= CPU_ARCH_ARMv5TEJ && !cpu_is_xscale())
diff --git a/arch/arm/mm/pgd.c b/arch/arm/mm/pgd.c
index 2690146161ba..be5f58e153bf 100644
--- a/arch/arm/mm/pgd.c
+++ b/arch/arm/mm/pgd.c
@@ -8,6 +8,7 @@
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 */ 9 */
10#include <linux/mm.h> 10#include <linux/mm.h>
11#include <linux/gfp.h>
11#include <linux/highmem.h> 12#include <linux/highmem.h>
12 13
13#include <asm/pgalloc.h> 14#include <asm/pgalloc.h>
diff --git a/arch/arm/mm/proc-sa1100.S b/arch/arm/mm/proc-sa1100.S
index ee7700242c19..5c47760c2064 100644
--- a/arch/arm/mm/proc-sa1100.S
+++ b/arch/arm/mm/proc-sa1100.S
@@ -45,7 +45,7 @@ ENTRY(cpu_sa1100_proc_init)
45 mcr p15, 0, r0, c9, c0, 5 @ Allow read-buffer operations from userland 45 mcr p15, 0, r0, c9, c0, 5 @ Allow read-buffer operations from userland
46 mov pc, lr 46 mov pc, lr
47 47
48 .previous 48 .section .text
49 49
50/* 50/*
51 * cpu_sa1100_proc_fin() 51 * cpu_sa1100_proc_fin()
diff --git a/arch/arm/nwfpe/entry.S b/arch/arm/nwfpe/entry.S
index 48bca0db4607..cafa18354339 100644
--- a/arch/arm/nwfpe/entry.S
+++ b/arch/arm/nwfpe/entry.S
@@ -111,12 +111,12 @@ next:
111 @ to fault. Emit the appropriate exception gunk to fix things up. 111 @ to fault. Emit the appropriate exception gunk to fix things up.
112 @ ??? For some reason, faults can happen at .Lx2 even with a 112 @ ??? For some reason, faults can happen at .Lx2 even with a
113 @ plain LDR instruction. Weird, but it seems harmless. 113 @ plain LDR instruction. Weird, but it seems harmless.
114 .section .fixup,"ax" 114 .pushsection .fixup,"ax"
115 .align 2 115 .align 2
116.Lfix: mov pc, r9 @ let the user eat segfaults 116.Lfix: mov pc, r9 @ let the user eat segfaults
117 .previous 117 .popsection
118 118
119 .section __ex_table,"a" 119 .pushsection __ex_table,"a"
120 .align 3 120 .align 3
121 .long .Lx1, .Lfix 121 .long .Lx1, .Lfix
122 .previous 122 .popsection
diff --git a/arch/arm/plat-mxc/audmux-v2.c b/arch/arm/plat-mxc/audmux-v2.c
index d983cd6c788c..0c2cc5cd4d83 100644
--- a/arch/arm/plat-mxc/audmux-v2.c
+++ b/arch/arm/plat-mxc/audmux-v2.c
@@ -24,6 +24,7 @@
24#include <linux/io.h> 24#include <linux/io.h>
25#include <linux/clk.h> 25#include <linux/clk.h>
26#include <linux/debugfs.h> 26#include <linux/debugfs.h>
27#include <linux/slab.h>
27#include <mach/audmux.h> 28#include <mach/audmux.h>
28#include <mach/hardware.h> 29#include <mach/hardware.h>
29 30
diff --git a/arch/arm/plat-mxc/include/mach/board-mx31pdk.h b/arch/arm/plat-mxc/include/mach/board-mx31_3ds.h
index 2bbd6ed17f50..da92933a233b 100644
--- a/arch/arm/plat-mxc/include/mach/board-mx31pdk.h
+++ b/arch/arm/plat-mxc/include/mach/board-mx31_3ds.h
@@ -8,8 +8,8 @@
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 */ 9 */
10 10
11#ifndef __ASM_ARCH_MXC_BOARD_MX31PDK_H__ 11#ifndef __ASM_ARCH_MXC_BOARD_MX31_3DS_H__
12#define __ASM_ARCH_MXC_BOARD_MX31PDK_H__ 12#define __ASM_ARCH_MXC_BOARD_MX31_3DS_H__
13 13
14/* Definitions for components on the Debug board */ 14/* Definitions for components on the Debug board */
15 15
@@ -56,4 +56,4 @@
56 56
57#define MXC_MAX_EXP_IO_LINES 16 57#define MXC_MAX_EXP_IO_LINES 16
58 58
59#endif /* __ASM_ARCH_MXC_BOARD_MX31PDK_H__ */ 59#endif /* __ASM_ARCH_MXC_BOARD_MX31_3DS_H__ */
diff --git a/arch/arm/plat-mxc/include/mach/dma-mx1-mx2.h b/arch/arm/plat-mxc/include/mach/dma-mx1-mx2.h
index 07be8ad7ec37..7c4870bd5a21 100644
--- a/arch/arm/plat-mxc/include/mach/dma-mx1-mx2.h
+++ b/arch/arm/plat-mxc/include/mach/dma-mx1-mx2.h
@@ -31,7 +31,13 @@
31#define DMA_MODE_WRITE 1 31#define DMA_MODE_WRITE 1
32#define DMA_MODE_MASK 1 32#define DMA_MODE_MASK 1
33 33
34#define DMA_BASE IO_ADDRESS(DMA_BASE_ADDR) 34#define MX1_DMA_REG(offset) MX1_IO_ADDRESS(MX1_DMA_BASE_ADDR + (offset))
35
36/* DMA Interrupt Mask Register */
37#define MX1_DMA_DIMR MX1_DMA_REG(0x08)
38
39/* Channel Control Register */
40#define MX1_DMA_CCR(x) MX1_DMA_REG(0x8c + ((x) << 6))
35 41
36#define IMX_DMA_MEMSIZE_32 (0 << 4) 42#define IMX_DMA_MEMSIZE_32 (0 << 4)
37#define IMX_DMA_MEMSIZE_8 (1 << 4) 43#define IMX_DMA_MEMSIZE_8 (1 << 4)
diff --git a/arch/arm/plat-mxc/include/mach/mx51.h b/arch/arm/plat-mxc/include/mach/mx51.h
index 771532b6b4a6..5aad344d5651 100644
--- a/arch/arm/plat-mxc/include/mach/mx51.h
+++ b/arch/arm/plat-mxc/include/mach/mx51.h
@@ -14,7 +14,7 @@
14 * FB100000 70000000 1M SPBA 0 14 * FB100000 70000000 1M SPBA 0
15 * FB000000 73F00000 1M AIPS 1 15 * FB000000 73F00000 1M AIPS 1
16 * FB200000 83F00000 1M AIPS 2 16 * FB200000 83F00000 1M AIPS 2
17 * FA100000 8FFFC000 16K TZIC (interrupt controller) 17 * 8FFFC000 16K TZIC (interrupt controller)
18 * 90000000 256M CSD0 SDRAM/DDR 18 * 90000000 256M CSD0 SDRAM/DDR
19 * A0000000 256M CSD1 SDRAM/DDR 19 * A0000000 256M CSD1 SDRAM/DDR
20 * B0000000 128M CS0 Flash 20 * B0000000 128M CS0 Flash
@@ -23,11 +23,17 @@
23 * C8000000 64M CS3 Flash 23 * C8000000 64M CS3 Flash
24 * CC000000 32M CS4 SRAM 24 * CC000000 32M CS4 SRAM
25 * CE000000 32M CS5 SRAM 25 * CE000000 32M CS5 SRAM
26 * F9000000 CFFF0000 64K NFC (NAND Flash AXI) 26 * CFFF0000 64K NFC (NAND Flash AXI)
27 * 27 *
28 */ 28 */
29 29
30/* 30/*
31 * IROM
32 */
33#define MX51_IROM_BASE_ADDR 0x0
34#define MX51_IROM_SIZE SZ_64K
35
36/*
31 * IRAM 37 * IRAM
32 */ 38 */
33#define MX51_IRAM_BASE_ADDR 0x1FFE0000 /* internal ram */ 39#define MX51_IRAM_BASE_ADDR 0x1FFE0000 /* internal ram */
@@ -40,7 +46,6 @@
40 * NFC 46 * NFC
41 */ 47 */
42#define MX51_NFC_AXI_BASE_ADDR 0xCFFF0000 /* NAND flash AXI */ 48#define MX51_NFC_AXI_BASE_ADDR 0xCFFF0000 /* NAND flash AXI */
43#define MX51_NFC_AXI_BASE_ADDR_VIRT 0xF9000000
44#define MX51_NFC_AXI_SIZE SZ_64K 49#define MX51_NFC_AXI_SIZE SZ_64K
45 50
46/* 51/*
@@ -49,9 +54,8 @@
49#define MX51_GPU_BASE_ADDR 0x20000000 54#define MX51_GPU_BASE_ADDR 0x20000000
50#define MX51_GPU2D_BASE_ADDR 0xD0000000 55#define MX51_GPU2D_BASE_ADDR 0xD0000000
51 56
52#define MX51_TZIC_BASE_ADDR 0x8FFFC000 57#define MX51_TZIC_BASE_ADDR_TO1 0x8FFFC000
53#define MX51_TZIC_BASE_ADDR_VIRT 0xFA100000 58#define MX51_TZIC_BASE_ADDR 0xE0000000
54#define MX51_TZIC_SIZE SZ_16K
55 59
56#define MX51_DEBUG_BASE_ADDR 0x60000000 60#define MX51_DEBUG_BASE_ADDR 0x60000000
57#define MX51_DEBUG_BASE_ADDR_VIRT 0xFA200000 61#define MX51_DEBUG_BASE_ADDR_VIRT 0xFA200000
@@ -232,12 +236,10 @@
232#define MX51_IO_ADDRESS(x) \ 236#define MX51_IO_ADDRESS(x) \
233 (void __iomem *) \ 237 (void __iomem *) \
234 (MX51_IS_MODULE(x, IRAM) ? MX51_IRAM_IO_ADDRESS(x) : \ 238 (MX51_IS_MODULE(x, IRAM) ? MX51_IRAM_IO_ADDRESS(x) : \
235 MX51_IS_MODULE(x, TZIC) ? MX51_TZIC_IO_ADDRESS(x) : \
236 MX51_IS_MODULE(x, DEBUG) ? MX51_DEBUG_IO_ADDRESS(x) : \ 239 MX51_IS_MODULE(x, DEBUG) ? MX51_DEBUG_IO_ADDRESS(x) : \
237 MX51_IS_MODULE(x, SPBA0) ? MX51_SPBA0_IO_ADDRESS(x) : \ 240 MX51_IS_MODULE(x, SPBA0) ? MX51_SPBA0_IO_ADDRESS(x) : \
238 MX51_IS_MODULE(x, AIPS1) ? MX51_AIPS1_IO_ADDRESS(x) : \ 241 MX51_IS_MODULE(x, AIPS1) ? MX51_AIPS1_IO_ADDRESS(x) : \
239 MX51_IS_MODULE(x, AIPS2) ? MX51_AIPS2_IO_ADDRESS(x) : \ 242 MX51_IS_MODULE(x, AIPS2) ? MX51_AIPS2_IO_ADDRESS(x) : \
240 MX51_IS_MODULE(x, NFC_AXI) ? MX51_NFC_AXI_IO_ADDRESS(x) : \
241 0xDEADBEEF) 243 0xDEADBEEF)
242 244
243/* 245/*
@@ -246,9 +248,6 @@
246#define MX51_IRAM_IO_ADDRESS(x) \ 248#define MX51_IRAM_IO_ADDRESS(x) \
247 (((x) - MX51_IRAM_BASE_ADDR) + MX51_IRAM_BASE_ADDR_VIRT) 249 (((x) - MX51_IRAM_BASE_ADDR) + MX51_IRAM_BASE_ADDR_VIRT)
248 250
249#define MX51_TZIC_IO_ADDRESS(x) \
250 (((x) - MX51_TZIC_BASE_ADDR) + MX51_TZIC_BASE_ADDR_VIRT)
251
252#define MX51_DEBUG_IO_ADDRESS(x) \ 251#define MX51_DEBUG_IO_ADDRESS(x) \
253 (((x) - MX51_DEBUG_BASE_ADDR) + MX51_DEBUG_BASE_ADDR_VIRT) 252 (((x) - MX51_DEBUG_BASE_ADDR) + MX51_DEBUG_BASE_ADDR_VIRT)
254 253
@@ -261,9 +260,6 @@
261#define MX51_AIPS2_IO_ADDRESS(x) \ 260#define MX51_AIPS2_IO_ADDRESS(x) \
262 (((x) - MX51_AIPS2_BASE_ADDR) + MX51_AIPS2_BASE_ADDR_VIRT) 261 (((x) - MX51_AIPS2_BASE_ADDR) + MX51_AIPS2_BASE_ADDR_VIRT)
263 262
264#define MX51_NFC_AXI_IO_ADDRESS(x) \
265 (((x) - MX51_NFC_AXI_BASE_ADDR) + MX51_NFC_AXI_BASE_ADDR_VIRT)
266
267#define MX51_IS_MEM_DEVICE_NONSHARED(x) 0 263#define MX51_IS_MEM_DEVICE_NONSHARED(x) 0
268 264
269/* 265/*
@@ -443,12 +439,7 @@
443 439
444#if !defined(__ASSEMBLY__) && !defined(__MXC_BOOT_UNCOMPRESS) 440#if !defined(__ASSEMBLY__) && !defined(__MXC_BOOT_UNCOMPRESS)
445 441
446extern unsigned int system_rev; 442extern int mx51_revision(void);
447
448static inline unsigned int mx51_revision(void)
449{
450 return system_rev;
451}
452#endif 443#endif
453 444
454#endif /* __ASM_ARCH_MXC_MX51_H__ */ 445#endif /* __ASM_ARCH_MXC_MX51_H__ */
diff --git a/arch/arm/plat-mxc/include/mach/uncompress.h b/arch/arm/plat-mxc/include/mach/uncompress.h
index 52e476a150ca..b6d3d0fddc48 100644
--- a/arch/arm/plat-mxc/include/mach/uncompress.h
+++ b/arch/arm/plat-mxc/include/mach/uncompress.h
@@ -66,6 +66,7 @@ static inline void flush(void)
66#define MX2X_UART1_BASE_ADDR 0x1000a000 66#define MX2X_UART1_BASE_ADDR 0x1000a000
67#define MX3X_UART1_BASE_ADDR 0x43F90000 67#define MX3X_UART1_BASE_ADDR 0x43F90000
68#define MX3X_UART2_BASE_ADDR 0x43F94000 68#define MX3X_UART2_BASE_ADDR 0x43F94000
69#define MX51_UART1_BASE_ADDR 0x73fbc000
69 70
70static __inline__ void __arch_decomp_setup(unsigned long arch_id) 71static __inline__ void __arch_decomp_setup(unsigned long arch_id)
71{ 72{
@@ -101,6 +102,9 @@ static __inline__ void __arch_decomp_setup(unsigned long arch_id)
101 case MACH_TYPE_MAGX_ZN5: 102 case MACH_TYPE_MAGX_ZN5:
102 uart_base = MX3X_UART2_BASE_ADDR; 103 uart_base = MX3X_UART2_BASE_ADDR;
103 break; 104 break;
105 case MACH_TYPE_MX51_BABBAGE:
106 uart_base = MX51_UART1_BASE_ADDR;
107 break;
104 default: 108 default:
105 break; 109 break;
106 } 110 }
diff --git a/arch/arm/plat-mxc/pwm.c b/arch/arm/plat-mxc/pwm.c
index 4ff6dfe04283..c36f2630ed93 100644
--- a/arch/arm/plat-mxc/pwm.c
+++ b/arch/arm/plat-mxc/pwm.c
@@ -11,6 +11,7 @@
11#include <linux/module.h> 11#include <linux/module.h>
12#include <linux/kernel.h> 12#include <linux/kernel.h>
13#include <linux/platform_device.h> 13#include <linux/platform_device.h>
14#include <linux/slab.h>
14#include <linux/err.h> 15#include <linux/err.h>
15#include <linux/clk.h> 16#include <linux/clk.h>
16#include <linux/io.h> 17#include <linux/io.h>
diff --git a/arch/arm/plat-nomadik/gpio.c b/arch/arm/plat-nomadik/gpio.c
index d28900cfa541..5a6ef252c38b 100644
--- a/arch/arm/plat-nomadik/gpio.c
+++ b/arch/arm/plat-nomadik/gpio.c
@@ -21,6 +21,7 @@
21#include <linux/spinlock.h> 21#include <linux/spinlock.h>
22#include <linux/interrupt.h> 22#include <linux/interrupt.h>
23#include <linux/irq.h> 23#include <linux/irq.h>
24#include <linux/slab.h>
24 25
25#include <mach/hardware.h> 26#include <mach/hardware.h>
26#include <mach/gpio.h> 27#include <mach/gpio.h>
diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c
index 088c1a03b946..f12f0e39ddf2 100644
--- a/arch/arm/plat-omap/common.c
+++ b/arch/arm/plat-omap/common.c
@@ -44,9 +44,6 @@
44 44
45#define NO_LENGTH_CHECK 0xffffffff 45#define NO_LENGTH_CHECK 0xffffffff
46 46
47unsigned char omap_bootloader_tag[512];
48int omap_bootloader_tag_len;
49
50struct omap_board_config_kernel *omap_board_config; 47struct omap_board_config_kernel *omap_board_config;
51int omap_board_config_size; 48int omap_board_config_size;
52 49
@@ -100,10 +97,17 @@ EXPORT_SYMBOL(omap_get_var_config);
100 97
101#include <linux/clocksource.h> 98#include <linux/clocksource.h>
102 99
100/*
101 * offset_32k holds the init time counter value. It is then subtracted
102 * from every counter read to achieve a counter that counts time from the
103 * kernel boot (needed for sched_clock()).
104 */
105static u32 offset_32k __read_mostly;
106
103#ifdef CONFIG_ARCH_OMAP16XX 107#ifdef CONFIG_ARCH_OMAP16XX
104static cycle_t omap16xx_32k_read(struct clocksource *cs) 108static cycle_t omap16xx_32k_read(struct clocksource *cs)
105{ 109{
106 return omap_readl(OMAP16XX_TIMER_32K_SYNCHRONIZED); 110 return omap_readl(OMAP16XX_TIMER_32K_SYNCHRONIZED) - offset_32k;
107} 111}
108#else 112#else
109#define omap16xx_32k_read NULL 113#define omap16xx_32k_read NULL
@@ -112,7 +116,7 @@ static cycle_t omap16xx_32k_read(struct clocksource *cs)
112#ifdef CONFIG_ARCH_OMAP2420 116#ifdef CONFIG_ARCH_OMAP2420
113static cycle_t omap2420_32k_read(struct clocksource *cs) 117static cycle_t omap2420_32k_read(struct clocksource *cs)
114{ 118{
115 return omap_readl(OMAP2420_32KSYNCT_BASE + 0x10); 119 return omap_readl(OMAP2420_32KSYNCT_BASE + 0x10) - offset_32k;
116} 120}
117#else 121#else
118#define omap2420_32k_read NULL 122#define omap2420_32k_read NULL
@@ -121,7 +125,7 @@ static cycle_t omap2420_32k_read(struct clocksource *cs)
121#ifdef CONFIG_ARCH_OMAP2430 125#ifdef CONFIG_ARCH_OMAP2430
122static cycle_t omap2430_32k_read(struct clocksource *cs) 126static cycle_t omap2430_32k_read(struct clocksource *cs)
123{ 127{
124 return omap_readl(OMAP2430_32KSYNCT_BASE + 0x10); 128 return omap_readl(OMAP2430_32KSYNCT_BASE + 0x10) - offset_32k;
125} 129}
126#else 130#else
127#define omap2430_32k_read NULL 131#define omap2430_32k_read NULL
@@ -130,7 +134,7 @@ static cycle_t omap2430_32k_read(struct clocksource *cs)
130#ifdef CONFIG_ARCH_OMAP3 134#ifdef CONFIG_ARCH_OMAP3
131static cycle_t omap34xx_32k_read(struct clocksource *cs) 135static cycle_t omap34xx_32k_read(struct clocksource *cs)
132{ 136{
133 return omap_readl(OMAP3430_32KSYNCT_BASE + 0x10); 137 return omap_readl(OMAP3430_32KSYNCT_BASE + 0x10) - offset_32k;
134} 138}
135#else 139#else
136#define omap34xx_32k_read NULL 140#define omap34xx_32k_read NULL
@@ -139,7 +143,7 @@ static cycle_t omap34xx_32k_read(struct clocksource *cs)
139#ifdef CONFIG_ARCH_OMAP4 143#ifdef CONFIG_ARCH_OMAP4
140static cycle_t omap44xx_32k_read(struct clocksource *cs) 144static cycle_t omap44xx_32k_read(struct clocksource *cs)
141{ 145{
142 return omap_readl(OMAP4430_32KSYNCT_BASE + 0x10); 146 return omap_readl(OMAP4430_32KSYNCT_BASE + 0x10) - offset_32k;
143} 147}
144#else 148#else
145#define omap44xx_32k_read NULL 149#define omap44xx_32k_read NULL
@@ -227,6 +231,8 @@ static int __init omap_init_clocksource_32k(void)
227 clocksource_32k.mult = clocksource_hz2mult(32768, 231 clocksource_32k.mult = clocksource_hz2mult(32768,
228 clocksource_32k.shift); 232 clocksource_32k.shift);
229 233
234 offset_32k = clocksource_32k.read(&clocksource_32k);
235
230 if (clocksource_register(&clocksource_32k)) 236 if (clocksource_register(&clocksource_32k))
231 printk(err, clocksource_32k.name); 237 printk(err, clocksource_32k.name);
232 } 238 }
diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c
index 4a4cd8774aaa..95677d17cd1c 100644
--- a/arch/arm/plat-omap/devices.c
+++ b/arch/arm/plat-omap/devices.c
@@ -14,6 +14,7 @@
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/platform_device.h> 15#include <linux/platform_device.h>
16#include <linux/io.h> 16#include <linux/io.h>
17#include <linux/slab.h>
17 18
18#include <mach/hardware.h> 19#include <mach/hardware.h>
19#include <asm/mach-types.h> 20#include <asm/mach-types.h>
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index 2ab224c8e16c..1d959965ff52 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -29,6 +29,7 @@
29#include <linux/interrupt.h> 29#include <linux/interrupt.h>
30#include <linux/irq.h> 30#include <linux/irq.h>
31#include <linux/io.h> 31#include <linux/io.h>
32#include <linux/slab.h>
32 33
33#include <asm/system.h> 34#include <asm/system.h>
34#include <mach/hardware.h> 35#include <mach/hardware.h>
@@ -936,6 +937,15 @@ void omap_start_dma(int lch)
936{ 937{
937 u32 l; 938 u32 l;
938 939
940 /*
941 * The CPC/CDAC register needs to be initialized to zero
942 * before starting dma transfer.
943 */
944 if (cpu_is_omap15xx())
945 dma_write(0, CPC(lch));
946 else
947 dma_write(0, CDAC(lch));
948
939 if (!omap_dma_in_1510_mode() && dma_chan[lch].next_lch != -1) { 949 if (!omap_dma_in_1510_mode() && dma_chan[lch].next_lch != -1) {
940 int next_lch, cur_lch; 950 int next_lch, cur_lch;
941 char dma_chan_link_map[OMAP_DMA4_LOGICAL_DMA_CH_COUNT]; 951 char dma_chan_link_map[OMAP_DMA4_LOGICAL_DMA_CH_COUNT];
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c
index 76a347b3ce07..45a225d09125 100644
--- a/arch/arm/plat-omap/gpio.c
+++ b/arch/arm/plat-omap/gpio.c
@@ -798,7 +798,7 @@ static int _set_gpio_triggering(struct gpio_bank *bank, int gpio, int trigger)
798 case METHOD_MPUIO: 798 case METHOD_MPUIO:
799 reg += OMAP_MPUIO_GPIO_INT_EDGE; 799 reg += OMAP_MPUIO_GPIO_INT_EDGE;
800 l = __raw_readl(reg); 800 l = __raw_readl(reg);
801 if (trigger & IRQ_TYPE_EDGE_BOTH) 801 if ((trigger & IRQ_TYPE_SENSE_MASK) == IRQ_TYPE_EDGE_BOTH)
802 bank->toggle_mask |= 1 << gpio; 802 bank->toggle_mask |= 1 << gpio;
803 if (trigger & IRQ_TYPE_EDGE_RISING) 803 if (trigger & IRQ_TYPE_EDGE_RISING)
804 l |= 1 << gpio; 804 l |= 1 << gpio;
@@ -812,7 +812,7 @@ static int _set_gpio_triggering(struct gpio_bank *bank, int gpio, int trigger)
812 case METHOD_GPIO_1510: 812 case METHOD_GPIO_1510:
813 reg += OMAP1510_GPIO_INT_CONTROL; 813 reg += OMAP1510_GPIO_INT_CONTROL;
814 l = __raw_readl(reg); 814 l = __raw_readl(reg);
815 if (trigger & IRQ_TYPE_EDGE_BOTH) 815 if ((trigger & IRQ_TYPE_SENSE_MASK) == IRQ_TYPE_EDGE_BOTH)
816 bank->toggle_mask |= 1 << gpio; 816 bank->toggle_mask |= 1 << gpio;
817 if (trigger & IRQ_TYPE_EDGE_RISING) 817 if (trigger & IRQ_TYPE_EDGE_RISING)
818 l |= 1 << gpio; 818 l |= 1 << gpio;
@@ -846,7 +846,7 @@ static int _set_gpio_triggering(struct gpio_bank *bank, int gpio, int trigger)
846 case METHOD_GPIO_7XX: 846 case METHOD_GPIO_7XX:
847 reg += OMAP7XX_GPIO_INT_CONTROL; 847 reg += OMAP7XX_GPIO_INT_CONTROL;
848 l = __raw_readl(reg); 848 l = __raw_readl(reg);
849 if (trigger & IRQ_TYPE_EDGE_BOTH) 849 if ((trigger & IRQ_TYPE_SENSE_MASK) == IRQ_TYPE_EDGE_BOTH)
850 bank->toggle_mask |= 1 << gpio; 850 bank->toggle_mask |= 1 << gpio;
851 if (trigger & IRQ_TYPE_EDGE_RISING) 851 if (trigger & IRQ_TYPE_EDGE_RISING)
852 l |= 1 << gpio; 852 l |= 1 << gpio;
diff --git a/arch/arm/plat-omap/include/plat/irqs.h b/arch/arm/plat-omap/include/plat/irqs.h
index b65088a869e9..401701977dbb 100644
--- a/arch/arm/plat-omap/include/plat/irqs.h
+++ b/arch/arm/plat-omap/include/plat/irqs.h
@@ -345,8 +345,6 @@
345#define INT_34XX_MMC3_IRQ 94 345#define INT_34XX_MMC3_IRQ 94
346#define INT_34XX_GPT12_IRQ 95 346#define INT_34XX_GPT12_IRQ 95
347 347
348#define INT_34XX_BENCH_MPU_EMUL 3
349
350#define INT_35XX_HECC0_IRQ 24 348#define INT_35XX_HECC0_IRQ 24
351#define INT_35XX_HECC1_IRQ 28 349#define INT_35XX_HECC1_IRQ 28
352#define INT_35XX_EMAC_C0_RXTHRESH_IRQ 67 350#define INT_35XX_EMAC_C0_RXTHRESH_IRQ 67
diff --git a/arch/arm/plat-omap/include/plat/mcbsp.h b/arch/arm/plat-omap/include/plat/mcbsp.h
index 39748354ce45..7de903d7c1ce 100644
--- a/arch/arm/plat-omap/include/plat/mcbsp.h
+++ b/arch/arm/plat-omap/include/plat/mcbsp.h
@@ -59,7 +59,7 @@
59#define OMAP44XX_MCBSP1_BASE 0x49022000 59#define OMAP44XX_MCBSP1_BASE 0x49022000
60#define OMAP44XX_MCBSP2_BASE 0x49024000 60#define OMAP44XX_MCBSP2_BASE 0x49024000
61#define OMAP44XX_MCBSP3_BASE 0x49026000 61#define OMAP44XX_MCBSP3_BASE 0x49026000
62#define OMAP44XX_MCBSP4_BASE 0x48074000 62#define OMAP44XX_MCBSP4_BASE 0x48096000
63 63
64#if defined(CONFIG_ARCH_OMAP15XX) || defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850) 64#if defined(CONFIG_ARCH_OMAP15XX) || defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850)
65 65
diff --git a/arch/arm/plat-omap/include/plat/nand.h b/arch/arm/plat-omap/include/plat/nand.h
index 6ba88d2630d9..f8efd5466b1d 100644
--- a/arch/arm/plat-omap/include/plat/nand.h
+++ b/arch/arm/plat-omap/include/plat/nand.h
@@ -29,4 +29,11 @@ struct omap_nand_platform_data {
29/* size (4 KiB) for IO mapping */ 29/* size (4 KiB) for IO mapping */
30#define NAND_IO_SIZE SZ_4K 30#define NAND_IO_SIZE SZ_4K
31 31
32#if defined(CONFIG_MTD_NAND_OMAP2) || defined(CONFIG_MTD_NAND_OMAP2_MODULE)
32extern int gpmc_nand_init(struct omap_nand_platform_data *d); 33extern int gpmc_nand_init(struct omap_nand_platform_data *d);
34#else
35static inline int gpmc_nand_init(struct omap_nand_platform_data *d)
36{
37 return 0;
38}
39#endif
diff --git a/arch/arm/plat-omap/include/plat/omap44xx.h b/arch/arm/plat-omap/include/plat/omap44xx.h
index 2302474a3748..b3ef1a7f53cc 100644
--- a/arch/arm/plat-omap/include/plat/omap44xx.h
+++ b/arch/arm/plat-omap/include/plat/omap44xx.h
@@ -32,7 +32,7 @@
32#define OMAP4430_PRM_BASE 0x4a306000 32#define OMAP4430_PRM_BASE 0x4a306000
33#define OMAP44XX_GPMC_BASE 0x50000000 33#define OMAP44XX_GPMC_BASE 0x50000000
34#define OMAP443X_SCM_BASE 0x4a002000 34#define OMAP443X_SCM_BASE 0x4a002000
35#define OMAP443X_CTRL_BASE OMAP443X_SCM_BASE 35#define OMAP443X_CTRL_BASE 0x4a100000
36#define OMAP44XX_IC_BASE 0x48200000 36#define OMAP44XX_IC_BASE 0x48200000
37#define OMAP44XX_IVA_INTC_BASE 0x40000000 37#define OMAP44XX_IVA_INTC_BASE 0x40000000
38#define IRQ_SIR_IRQ 0x0040 38#define IRQ_SIR_IRQ 0x0040
diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h
index 440b4164f2f6..36d6ea56ab51 100644
--- a/arch/arm/plat-omap/include/plat/omap_hwmod.h
+++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h
@@ -294,8 +294,8 @@ struct omap_hwmod_class_sysconfig {
294 u16 rev_offs; 294 u16 rev_offs;
295 u16 sysc_offs; 295 u16 sysc_offs;
296 u16 syss_offs; 296 u16 syss_offs;
297 u16 sysc_flags;
297 u8 idlemodes; 298 u8 idlemodes;
298 u8 sysc_flags;
299 u8 clockact; 299 u8 clockact;
300 struct omap_hwmod_sysc_fields *sysc_fields; 300 struct omap_hwmod_sysc_fields *sysc_fields;
301}; 301};
diff --git a/arch/arm/plat-omap/include/plat/usb.h b/arch/arm/plat-omap/include/plat/usb.h
index 568578db93b6..876ca8d5e927 100644
--- a/arch/arm/plat-omap/include/plat/usb.h
+++ b/arch/arm/plat-omap/include/plat/usb.h
@@ -46,7 +46,7 @@ struct ehci_hcd_omap_platform_data {
46struct omap_musb_board_data { 46struct omap_musb_board_data {
47 u8 interface_type; 47 u8 interface_type;
48 u8 mode; 48 u8 mode;
49 u8 power; 49 u16 power;
50}; 50};
51 51
52enum musb_interface {MUSB_INTERFACE_ULPI, MUSB_INTERFACE_UTMI}; 52enum musb_interface {MUSB_INTERFACE_ULPI, MUSB_INTERFACE_UTMI};
diff --git a/arch/arm/plat-omap/iommu-debug.c b/arch/arm/plat-omap/iommu-debug.c
index afd1c27cff7c..e6c0d536899c 100644
--- a/arch/arm/plat-omap/iommu-debug.c
+++ b/arch/arm/plat-omap/iommu-debug.c
@@ -13,6 +13,7 @@
13#include <linux/err.h> 13#include <linux/err.h>
14#include <linux/clk.h> 14#include <linux/clk.h>
15#include <linux/io.h> 15#include <linux/io.h>
16#include <linux/slab.h>
16#include <linux/uaccess.h> 17#include <linux/uaccess.h>
17#include <linux/platform_device.h> 18#include <linux/platform_device.h>
18#include <linux/debugfs.h> 19#include <linux/debugfs.h>
diff --git a/arch/arm/plat-omap/iommu.c b/arch/arm/plat-omap/iommu.c
index 905ed832df56..0e137663349c 100644
--- a/arch/arm/plat-omap/iommu.c
+++ b/arch/arm/plat-omap/iommu.c
@@ -13,6 +13,7 @@
13 13
14#include <linux/err.h> 14#include <linux/err.h>
15#include <linux/module.h> 15#include <linux/module.h>
16#include <linux/slab.h>
16#include <linux/interrupt.h> 17#include <linux/interrupt.h>
17#include <linux/ioport.h> 18#include <linux/ioport.h>
18#include <linux/clk.h> 19#include <linux/clk.h>
diff --git a/arch/arm/plat-omap/iovmm.c b/arch/arm/plat-omap/iovmm.c
index 936aef1971cd..65c6d1ff7237 100644
--- a/arch/arm/plat-omap/iovmm.c
+++ b/arch/arm/plat-omap/iovmm.c
@@ -11,6 +11,7 @@
11 */ 11 */
12 12
13#include <linux/err.h> 13#include <linux/err.h>
14#include <linux/slab.h>
14#include <linux/vmalloc.h> 15#include <linux/vmalloc.h>
15#include <linux/device.h> 16#include <linux/device.h>
16#include <linux/scatterlist.h> 17#include <linux/scatterlist.h>
diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c
index 4229cec53140..08a2df766289 100644
--- a/arch/arm/plat-omap/mailbox.c
+++ b/arch/arm/plat-omap/mailbox.c
@@ -25,6 +25,7 @@
25#include <linux/interrupt.h> 25#include <linux/interrupt.h>
26#include <linux/device.h> 26#include <linux/device.h>
27#include <linux/delay.h> 27#include <linux/delay.h>
28#include <linux/slab.h>
28 29
29#include <plat/mailbox.h> 30#include <plat/mailbox.h>
30 31
diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c
index 52dfcc81511e..e1d0440fd4a8 100644
--- a/arch/arm/plat-omap/mcbsp.c
+++ b/arch/arm/plat-omap/mcbsp.c
@@ -23,6 +23,7 @@
23#include <linux/clk.h> 23#include <linux/clk.h>
24#include <linux/delay.h> 24#include <linux/delay.h>
25#include <linux/io.h> 25#include <linux/io.h>
26#include <linux/slab.h>
26 27
27#include <plat/dma.h> 28#include <plat/dma.h>
28#include <plat/mcbsp.h> 29#include <plat/mcbsp.h>
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c
index 590435894848..0f5197479513 100644
--- a/arch/arm/plat-omap/omap_device.c
+++ b/arch/arm/plat-omap/omap_device.c
@@ -79,6 +79,7 @@
79 79
80#include <linux/kernel.h> 80#include <linux/kernel.h>
81#include <linux/platform_device.h> 81#include <linux/platform_device.h>
82#include <linux/slab.h>
82#include <linux/err.h> 83#include <linux/err.h>
83#include <linux/io.h> 84#include <linux/io.h>
84 85
diff --git a/arch/arm/plat-pxa/Kconfig b/arch/arm/plat-pxa/Kconfig
index b158e98038ed..da53395a17c6 100644
--- a/arch/arm/plat-pxa/Kconfig
+++ b/arch/arm/plat-pxa/Kconfig
@@ -1,3 +1,8 @@
1if PLAT_PXA 1if PLAT_PXA
2 2
3config PXA_SSP
4 tristate
5 help
6 Enable support for PXA2xx SSP ports
7
3endif 8endif
diff --git a/arch/arm/plat-pxa/Makefile b/arch/arm/plat-pxa/Makefile
index f68da35f4fb3..6187edfbcb77 100644
--- a/arch/arm/plat-pxa/Makefile
+++ b/arch/arm/plat-pxa/Makefile
@@ -9,3 +9,4 @@ obj-$(CONFIG_PXA3xx) += mfp.o
9obj-$(CONFIG_ARCH_MMP) += mfp.o 9obj-$(CONFIG_ARCH_MMP) += mfp.o
10 10
11obj-$(CONFIG_HAVE_PWM) += pwm.o 11obj-$(CONFIG_HAVE_PWM) += pwm.o
12obj-$(CONFIG_PXA_SSP) += ssp.o
diff --git a/arch/arm/plat-pxa/dma.c b/arch/arm/plat-pxa/dma.c
index 2975798d411f..2d3c19d7c7b1 100644
--- a/arch/arm/plat-pxa/dma.c
+++ b/arch/arm/plat-pxa/dma.c
@@ -14,6 +14,7 @@
14 14
15#include <linux/module.h> 15#include <linux/module.h>
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/slab.h>
17#include <linux/kernel.h> 18#include <linux/kernel.h>
18#include <linux/interrupt.h> 19#include <linux/interrupt.h>
19#include <linux/errno.h> 20#include <linux/errno.h>
@@ -244,7 +245,7 @@ static void pxa_dma_init_debugfs(void)
244 245
245 dbgfs_chan = kmalloc(sizeof(*dbgfs_state) * num_dma_channels, 246 dbgfs_chan = kmalloc(sizeof(*dbgfs_state) * num_dma_channels,
246 GFP_KERNEL); 247 GFP_KERNEL);
247 if (!dbgfs_state) 248 if (!dbgfs_chan)
248 goto err_alloc; 249 goto err_alloc;
249 250
250 chandir = debugfs_create_dir("channels", dbgfs_root); 251 chandir = debugfs_create_dir("channels", dbgfs_root);
diff --git a/arch/arm/plat-pxa/include/plat/mfp.h b/arch/arm/plat-pxa/include/plat/mfp.h
index 857a6839071c..9e604c80618f 100644
--- a/arch/arm/plat-pxa/include/plat/mfp.h
+++ b/arch/arm/plat-pxa/include/plat/mfp.h
@@ -316,6 +316,13 @@ enum {
316 MFP_PIN_PMIC_INT, 316 MFP_PIN_PMIC_INT,
317 MFP_PIN_RDY, 317 MFP_PIN_RDY,
318 318
319 /* additional pins on MMP2 */
320 MFP_PIN_TWSI1_SCL,
321 MFP_PIN_TWSI1_SDA,
322 MFP_PIN_TWSI4_SCL,
323 MFP_PIN_TWSI4_SDA,
324 MFP_PIN_CLK_REQ,
325
319 MFP_PIN_MAX, 326 MFP_PIN_MAX,
320}; 327};
321 328
diff --git a/arch/arm/mach-pxa/include/mach/regs-ssp.h b/arch/arm/plat-pxa/include/plat/ssp.h
index 6a2ed35acd59..fe43150690ed 100644
--- a/arch/arm/mach-pxa/include/mach/regs-ssp.h
+++ b/arch/arm/plat-pxa/include/plat/ssp.h
@@ -1,5 +1,26 @@
1#ifndef __ASM_ARCH_REGS_SSP_H 1/*
2#define __ASM_ARCH_REGS_SSP_H 2 * ssp.h
3 *
4 * Copyright (C) 2003 Russell King, All Rights Reserved.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * This driver supports the following PXA CPU/SSP ports:-
11 *
12 * PXA250 SSP
13 * PXA255 SSP, NSSP
14 * PXA26x SSP, NSSP, ASSP
15 * PXA27x SSP1, SSP2, SSP3
16 * PXA3xx SSP1, SSP2, SSP3, SSP4
17 */
18
19#ifndef __ASM_ARCH_SSP_H
20#define __ASM_ARCH_SSP_H
21
22#include <linux/list.h>
23#include <linux/io.h>
3 24
4/* 25/*
5 * SSP Serial Port Registers 26 * SSP Serial Port Registers
@@ -19,10 +40,7 @@
19#define SSRSA (0x34) /* SSP Rx Timeslot Active */ 40#define SSRSA (0x34) /* SSP Rx Timeslot Active */
20#define SSTSS (0x38) /* SSP Timeslot Status */ 41#define SSTSS (0x38) /* SSP Timeslot Status */
21#define SSACD (0x3C) /* SSP Audio Clock Divider */ 42#define SSACD (0x3C) /* SSP Audio Clock Divider */
22
23#if defined(CONFIG_PXA3xx)
24#define SSACDD (0x40) /* SSP Audio Clock Dither Divider */ 43#define SSACDD (0x40) /* SSP Audio Clock Dither Divider */
25#endif
26 44
27/* Common PXA2xx bits first */ 45/* Common PXA2xx bits first */
28#define SSCR0_DSS (0x0000000f) /* Data Size Select (mask) */ 46#define SSCR0_DSS (0x0000000f) /* Data Size Select (mask) */
@@ -33,29 +51,19 @@
33#define SSCR0_National (0x2 << 4) /* National Microwire */ 51#define SSCR0_National (0x2 << 4) /* National Microwire */
34#define SSCR0_ECS (1 << 6) /* External clock select */ 52#define SSCR0_ECS (1 << 6) /* External clock select */
35#define SSCR0_SSE (1 << 7) /* Synchronous Serial Port Enable */ 53#define SSCR0_SSE (1 << 7) /* Synchronous Serial Port Enable */
54#define SSCR0_SCR(x) ((x) << 8) /* Serial Clock Rate (mask) */
36 55
37#if defined(CONFIG_PXA25x) 56/* PXA27x, PXA3xx */
38#define SSCR0_SCR (0x0000ff00) /* Serial Clock Rate (mask) */
39#define SSCR0_SerClkDiv(x) ((((x) - 2)/2) << 8) /* Divisor [2..512] */
40#elif defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
41#define SSCR0_SCR (0x000fff00) /* Serial Clock Rate (mask) */
42#define SSCR0_SerClkDiv(x) (((x) - 1) << 8) /* Divisor [1..4096] */
43#endif
44
45#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
46#define SSCR0_EDSS (1 << 20) /* Extended data size select */ 57#define SSCR0_EDSS (1 << 20) /* Extended data size select */
47#define SSCR0_NCS (1 << 21) /* Network clock select */ 58#define SSCR0_NCS (1 << 21) /* Network clock select */
48#define SSCR0_RIM (1 << 22) /* Receive FIFO overrrun interrupt mask */ 59#define SSCR0_RIM (1 << 22) /* Receive FIFO overrrun interrupt mask */
49#define SSCR0_TUM (1 << 23) /* Transmit FIFO underrun interrupt mask */ 60#define SSCR0_TUM (1 << 23) /* Transmit FIFO underrun interrupt mask */
50#define SSCR0_FRDC (0x07000000) /* Frame rate divider control (mask) */ 61#define SSCR0_FRDC (0x07000000) /* Frame rate divider control (mask) */
51#define SSCR0_SlotsPerFrm(x) (((x) - 1) << 24) /* Time slots per frame [1..8] */ 62#define SSCR0_SlotsPerFrm(x) (((x) - 1) << 24) /* Time slots per frame [1..8] */
63#define SSCR0_FPCKE (1 << 29) /* FIFO packing enable */
52#define SSCR0_ACS (1 << 30) /* Audio clock select */ 64#define SSCR0_ACS (1 << 30) /* Audio clock select */
53#define SSCR0_MOD (1 << 31) /* Mode (normal or network) */ 65#define SSCR0_MOD (1 << 31) /* Mode (normal or network) */
54#endif
55 66
56#if defined(CONFIG_PXA3xx)
57#define SSCR0_FPCKE (1 << 29) /* FIFO packing enable */
58#endif
59 67
60#define SSCR1_RIE (1 << 0) /* Receive FIFO Interrupt Enable */ 68#define SSCR1_RIE (1 << 0) /* Receive FIFO Interrupt Enable */
61#define SSCR1_TIE (1 << 1) /* Transmit FIFO Interrupt Enable */ 69#define SSCR1_TIE (1 << 1) /* Transmit FIFO Interrupt Enable */
@@ -75,10 +83,6 @@
75#define SSSR_RFS (1 << 6) /* Receive FIFO Service Request */ 83#define SSSR_RFS (1 << 6) /* Receive FIFO Service Request */
76#define SSSR_ROR (1 << 7) /* Receive FIFO Overrun */ 84#define SSSR_ROR (1 << 7) /* Receive FIFO Overrun */
77 85
78#define SSCR0_TIM (1 << 23) /* Transmit FIFO Under Run Interrupt Mask */
79#define SSCR0_RIM (1 << 22) /* Receive FIFO Over Run interrupt Mask */
80#define SSCR0_NCS (1 << 21) /* Network Clock Select */
81#define SSCR0_EDSS (1 << 20) /* Extended Data Size Select */
82 86
83/* extra bits in PXA255, PXA26x and PXA27x SSP ports */ 87/* extra bits in PXA255, PXA26x and PXA27x SSP ports */
84#define SSCR0_TISSP (1 << 4) /* TI Sync Serial Protocol */ 88#define SSCR0_TISSP (1 << 4) /* TI Sync Serial Protocol */
@@ -108,27 +112,75 @@
108#define SSSR_TINT (1 << 19) /* Receiver Time-out Interrupt */ 112#define SSSR_TINT (1 << 19) /* Receiver Time-out Interrupt */
109#define SSSR_PINT (1 << 18) /* Peripheral Trailing Byte Interrupt */ 113#define SSSR_PINT (1 << 18) /* Peripheral Trailing Byte Interrupt */
110 114
111#if defined(CONFIG_PXA3xx)
112#define SSPSP_EDMYSTOP(x) ((x) << 28) /* Extended Dummy Stop */
113#define SSPSP_EDMYSTRT(x) ((x) << 26) /* Extended Dummy Start */
114#endif
115 115
116#define SSPSP_FSRT (1 << 25) /* Frame Sync Relative Timing */
117#define SSPSP_DMYSTOP(x) ((x) << 23) /* Dummy Stop */
118#define SSPSP_SFRMWDTH(x) ((x) << 16) /* Serial Frame Width */
119#define SSPSP_SFRMDLY(x) ((x) << 9) /* Serial Frame Delay */
120#define SSPSP_DMYSTRT(x) ((x) << 7) /* Dummy Start */
121#define SSPSP_STRTDLY(x) ((x) << 4) /* Start Delay */
122#define SSPSP_ETDS (1 << 3) /* End of Transfer data State */
123#define SSPSP_SFRMP (1 << 2) /* Serial Frame Polarity */
124#define SSPSP_SCMODE(x) ((x) << 0) /* Serial Bit Rate Clock Mode */ 116#define SSPSP_SCMODE(x) ((x) << 0) /* Serial Bit Rate Clock Mode */
117#define SSPSP_SFRMP (1 << 2) /* Serial Frame Polarity */
118#define SSPSP_ETDS (1 << 3) /* End of Transfer data State */
119#define SSPSP_STRTDLY(x) ((x) << 4) /* Start Delay */
120#define SSPSP_DMYSTRT(x) ((x) << 7) /* Dummy Start */
121#define SSPSP_SFRMDLY(x) ((x) << 9) /* Serial Frame Delay */
122#define SSPSP_SFRMWDTH(x) ((x) << 16) /* Serial Frame Width */
123#define SSPSP_DMYSTOP(x) ((x) << 23) /* Dummy Stop */
124#define SSPSP_FSRT (1 << 25) /* Frame Sync Relative Timing */
125
126/* PXA3xx */
127#define SSPSP_EDMYSTRT(x) ((x) << 26) /* Extended Dummy Start */
128#define SSPSP_EDMYSTOP(x) ((x) << 28) /* Extended Dummy Stop */
129#define SSPSP_TIMING_MASK (0x7f8001f0)
125 130
126#define SSACD_SCDB (1 << 3) /* SSPSYSCLK Divider Bypass */ 131#define SSACD_SCDB (1 << 3) /* SSPSYSCLK Divider Bypass */
127#define SSACD_ACPS(x) ((x) << 4) /* Audio clock PLL select */ 132#define SSACD_ACPS(x) ((x) << 4) /* Audio clock PLL select */
128#define SSACD_ACDS(x) ((x) << 0) /* Audio clock divider select */ 133#define SSACD_ACDS(x) ((x) << 0) /* Audio clock divider select */
129#if defined(CONFIG_PXA3xx)
130#define SSACD_SCDX8 (1 << 7) /* SYSCLK division ratio select */ 134#define SSACD_SCDX8 (1 << 7) /* SYSCLK division ratio select */
131#endif
132
133 135
134#endif /* __ASM_ARCH_REGS_SSP_H */ 136enum pxa_ssp_type {
137 SSP_UNDEFINED = 0,
138 PXA25x_SSP, /* pxa 210, 250, 255, 26x */
139 PXA25x_NSSP, /* pxa 255, 26x (including ASSP) */
140 PXA27x_SSP,
141 PXA168_SSP,
142};
143
144struct ssp_device {
145 struct platform_device *pdev;
146 struct list_head node;
147
148 struct clk *clk;
149 void __iomem *mmio_base;
150 unsigned long phys_base;
151
152 const char *label;
153 int port_id;
154 int type;
155 int use_count;
156 int irq;
157 int drcmr_rx;
158 int drcmr_tx;
159};
160
161/**
162 * pxa_ssp_write_reg - Write to a SSP register
163 *
164 * @dev: SSP device to access
165 * @reg: Register to write to
166 * @val: Value to be written.
167 */
168static inline void pxa_ssp_write_reg(struct ssp_device *dev, u32 reg, u32 val)
169{
170 __raw_writel(val, dev->mmio_base + reg);
171}
172
173/**
174 * pxa_ssp_read_reg - Read from a SSP register
175 *
176 * @dev: SSP device to access
177 * @reg: Register to read from
178 */
179static inline u32 pxa_ssp_read_reg(struct ssp_device *dev, u32 reg)
180{
181 return __raw_readl(dev->mmio_base + reg);
182}
183
184struct ssp_device *pxa_ssp_request(int port, const char *label);
185void pxa_ssp_free(struct ssp_device *);
186#endif /* __ASM_ARCH_SSP_H */
diff --git a/arch/arm/plat-pxa/mfp.c b/arch/arm/plat-pxa/mfp.c
index be58f9fe65b0..b77e018d36c1 100644
--- a/arch/arm/plat-pxa/mfp.c
+++ b/arch/arm/plat-pxa/mfp.c
@@ -110,6 +110,7 @@ static const unsigned long mfpr_lpm[] = {
110 MFPR_LPM_PULL_LOW, 110 MFPR_LPM_PULL_LOW,
111 MFPR_LPM_PULL_HIGH, 111 MFPR_LPM_PULL_HIGH,
112 MFPR_LPM_FLOAT, 112 MFPR_LPM_FLOAT,
113 MFPR_LPM_INPUT,
113}; 114};
114 115
115/* mapping of MFP_PULL_* definitions to MFPR_PULL_* register bits */ 116/* mapping of MFP_PULL_* definitions to MFPR_PULL_* register bits */
diff --git a/arch/arm/plat-pxa/pwm.c b/arch/arm/plat-pxa/pwm.c
index 51dc5c8106c0..0732c6c8d511 100644
--- a/arch/arm/plat-pxa/pwm.c
+++ b/arch/arm/plat-pxa/pwm.c
@@ -14,6 +14,7 @@
14#include <linux/module.h> 14#include <linux/module.h>
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/platform_device.h> 16#include <linux/platform_device.h>
17#include <linux/slab.h>
17#include <linux/err.h> 18#include <linux/err.h>
18#include <linux/clk.h> 19#include <linux/clk.h>
19#include <linux/io.h> 20#include <linux/io.h>
diff --git a/arch/arm/plat-pxa/ssp.c b/arch/arm/plat-pxa/ssp.c
new file mode 100644
index 000000000000..c6357e554aba
--- /dev/null
+++ b/arch/arm/plat-pxa/ssp.c
@@ -0,0 +1,224 @@
1/*
2 * linux/arch/arm/mach-pxa/ssp.c
3 *
4 * based on linux/arch/arm/mach-sa1100/ssp.c by Russell King
5 *
6 * Copyright (C) 2003 Russell King.
7 * Copyright (C) 2003 Wolfson Microelectronics PLC
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 * PXA2xx SSP driver. This provides the generic core for simple
14 * IO-based SSP applications and allows easy port setup for DMA access.
15 *
16 * Author: Liam Girdwood <liam.girdwood@wolfsonmicro.com>
17 */
18
19#include <linux/module.h>
20#include <linux/kernel.h>
21#include <linux/sched.h>
22#include <linux/slab.h>
23#include <linux/errno.h>
24#include <linux/interrupt.h>
25#include <linux/ioport.h>
26#include <linux/init.h>
27#include <linux/mutex.h>
28#include <linux/clk.h>
29#include <linux/err.h>
30#include <linux/platform_device.h>
31#include <linux/io.h>
32
33#include <asm/irq.h>
34#include <mach/hardware.h>
35#include <plat/ssp.h>
36
37static DEFINE_MUTEX(ssp_lock);
38static LIST_HEAD(ssp_list);
39
40struct ssp_device *pxa_ssp_request(int port, const char *label)
41{
42 struct ssp_device *ssp = NULL;
43
44 mutex_lock(&ssp_lock);
45
46 list_for_each_entry(ssp, &ssp_list, node) {
47 if (ssp->port_id == port && ssp->use_count == 0) {
48 ssp->use_count++;
49 ssp->label = label;
50 break;
51 }
52 }
53
54 mutex_unlock(&ssp_lock);
55
56 if (&ssp->node == &ssp_list)
57 return NULL;
58
59 return ssp;
60}
61EXPORT_SYMBOL(pxa_ssp_request);
62
63void pxa_ssp_free(struct ssp_device *ssp)
64{
65 mutex_lock(&ssp_lock);
66 if (ssp->use_count) {
67 ssp->use_count--;
68 ssp->label = NULL;
69 } else
70 dev_err(&ssp->pdev->dev, "device already free\n");
71 mutex_unlock(&ssp_lock);
72}
73EXPORT_SYMBOL(pxa_ssp_free);
74
75static int __devinit pxa_ssp_probe(struct platform_device *pdev)
76{
77 const struct platform_device_id *id = platform_get_device_id(pdev);
78 struct resource *res;
79 struct ssp_device *ssp;
80 int ret = 0;
81
82 ssp = kzalloc(sizeof(struct ssp_device), GFP_KERNEL);
83 if (ssp == NULL) {
84 dev_err(&pdev->dev, "failed to allocate memory");
85 return -ENOMEM;
86 }
87 ssp->pdev = pdev;
88
89 ssp->clk = clk_get(&pdev->dev, NULL);
90 if (IS_ERR(ssp->clk)) {
91 ret = PTR_ERR(ssp->clk);
92 goto err_free;
93 }
94
95 res = platform_get_resource(pdev, IORESOURCE_DMA, 0);
96 if (res == NULL) {
97 dev_err(&pdev->dev, "no SSP RX DRCMR defined\n");
98 ret = -ENODEV;
99 goto err_free_clk;
100 }
101 ssp->drcmr_rx = res->start;
102
103 res = platform_get_resource(pdev, IORESOURCE_DMA, 1);
104 if (res == NULL) {
105 dev_err(&pdev->dev, "no SSP TX DRCMR defined\n");
106 ret = -ENODEV;
107 goto err_free_clk;
108 }
109 ssp->drcmr_tx = res->start;
110
111 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
112 if (res == NULL) {
113 dev_err(&pdev->dev, "no memory resource defined\n");
114 ret = -ENODEV;
115 goto err_free_clk;
116 }
117
118 res = request_mem_region(res->start, resource_size(res),
119 pdev->name);
120 if (res == NULL) {
121 dev_err(&pdev->dev, "failed to request memory resource\n");
122 ret = -EBUSY;
123 goto err_free_clk;
124 }
125
126 ssp->phys_base = res->start;
127
128 ssp->mmio_base = ioremap(res->start, resource_size(res));
129 if (ssp->mmio_base == NULL) {
130 dev_err(&pdev->dev, "failed to ioremap() registers\n");
131 ret = -ENODEV;
132 goto err_free_mem;
133 }
134
135 ssp->irq = platform_get_irq(pdev, 0);
136 if (ssp->irq < 0) {
137 dev_err(&pdev->dev, "no IRQ resource defined\n");
138 ret = -ENODEV;
139 goto err_free_io;
140 }
141
142 /* PXA2xx/3xx SSP ports starts from 1 and the internal pdev->id
143 * starts from 0, do a translation here
144 */
145 ssp->port_id = pdev->id + 1;
146 ssp->use_count = 0;
147 ssp->type = (int)id->driver_data;
148
149 mutex_lock(&ssp_lock);
150 list_add(&ssp->node, &ssp_list);
151 mutex_unlock(&ssp_lock);
152
153 platform_set_drvdata(pdev, ssp);
154 return 0;
155
156err_free_io:
157 iounmap(ssp->mmio_base);
158err_free_mem:
159 release_mem_region(res->start, resource_size(res));
160err_free_clk:
161 clk_put(ssp->clk);
162err_free:
163 kfree(ssp);
164 return ret;
165}
166
167static int __devexit pxa_ssp_remove(struct platform_device *pdev)
168{
169 struct resource *res;
170 struct ssp_device *ssp;
171
172 ssp = platform_get_drvdata(pdev);
173 if (ssp == NULL)
174 return -ENODEV;
175
176 iounmap(ssp->mmio_base);
177
178 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
179 release_mem_region(res->start, resource_size(res));
180
181 clk_put(ssp->clk);
182
183 mutex_lock(&ssp_lock);
184 list_del(&ssp->node);
185 mutex_unlock(&ssp_lock);
186
187 kfree(ssp);
188 return 0;
189}
190
191static const struct platform_device_id ssp_id_table[] = {
192 { "pxa25x-ssp", PXA25x_SSP },
193 { "pxa25x-nssp", PXA25x_NSSP },
194 { "pxa27x-ssp", PXA27x_SSP },
195 { "pxa168-ssp", PXA168_SSP },
196 { },
197};
198
199static struct platform_driver pxa_ssp_driver = {
200 .probe = pxa_ssp_probe,
201 .remove = __devexit_p(pxa_ssp_remove),
202 .driver = {
203 .owner = THIS_MODULE,
204 .name = "pxa2xx-ssp",
205 },
206 .id_table = ssp_id_table,
207};
208
209static int __init pxa_ssp_init(void)
210{
211 return platform_driver_register(&pxa_ssp_driver);
212}
213
214static void __exit pxa_ssp_exit(void)
215{
216 platform_driver_unregister(&pxa_ssp_driver);
217}
218
219arch_initcall(pxa_ssp_init);
220module_exit(pxa_ssp_exit);
221
222MODULE_DESCRIPTION("PXA SSP driver");
223MODULE_AUTHOR("Liam Girdwood");
224MODULE_LICENSE("GPL");
diff --git a/arch/arm/plat-s3c24xx/Kconfig b/arch/arm/plat-s3c24xx/Kconfig
index 6e93ef8f3d43..3ce8f010b3c6 100644
--- a/arch/arm/plat-s3c24xx/Kconfig
+++ b/arch/arm/plat-s3c24xx/Kconfig
@@ -9,6 +9,7 @@ config PLAT_S3C24XX
9 select NO_IOPORT 9 select NO_IOPORT
10 select ARCH_REQUIRE_GPIOLIB 10 select ARCH_REQUIRE_GPIOLIB
11 select S3C_DEVICE_NAND 11 select S3C_DEVICE_NAND
12 select S3C_GPIO_CFG_S3C24XX
12 help 13 help
13 Base platform code for any Samsung S3C24XX device 14 Base platform code for any Samsung S3C24XX device
14 15
@@ -44,6 +45,12 @@ config S3C2410_CLOCK
44 Clock code for the S3C2410, and similar processors which 45 Clock code for the S3C2410, and similar processors which
45 is currently includes the S3C2410, S3C2440, S3C2442. 46 is currently includes the S3C2410, S3C2440, S3C2442.
46 47
48config S3C2443_CLOCK
49 bool
50 help
51 Clock code for the S3C2443 and similar processors, which includes
52 the S3C2416 and S3C2450.
53
47config S3C24XX_DCLK 54config S3C24XX_DCLK
48 bool 55 bool
49 help 56 help
diff --git a/arch/arm/plat-s3c24xx/Makefile b/arch/arm/plat-s3c24xx/Makefile
index c2237c41141f..44aea8868f89 100644
--- a/arch/arm/plat-s3c24xx/Makefile
+++ b/arch/arm/plat-s3c24xx/Makefile
@@ -30,6 +30,7 @@ obj-$(CONFIG_PM) += pm.o
30obj-$(CONFIG_PM) += irq-pm.o 30obj-$(CONFIG_PM) += irq-pm.o
31obj-$(CONFIG_PM) += sleep.o 31obj-$(CONFIG_PM) += sleep.o
32obj-$(CONFIG_S3C2410_CLOCK) += s3c2410-clock.o 32obj-$(CONFIG_S3C2410_CLOCK) += s3c2410-clock.o
33obj-$(CONFIG_S3C2443_CLOCK) += s3c2443-clock.o
33obj-$(CONFIG_S3C2410_DMA) += dma.o 34obj-$(CONFIG_S3C2410_DMA) += dma.o
34obj-$(CONFIG_S3C2410_IOTIMING) += s3c2410-iotiming.o 35obj-$(CONFIG_S3C2410_IOTIMING) += s3c2410-iotiming.o
35obj-$(CONFIG_S3C2412_IOTIMING) += s3c2412-iotiming.o 36obj-$(CONFIG_S3C2412_IOTIMING) += s3c2412-iotiming.o
diff --git a/arch/arm/plat-s3c24xx/common-smdk.c b/arch/arm/plat-s3c24xx/common-smdk.c
index 9e0e20ad2e46..7b44d0c592b5 100644
--- a/arch/arm/plat-s3c24xx/common-smdk.c
+++ b/arch/arm/plat-s3c24xx/common-smdk.c
@@ -42,6 +42,7 @@
42#include <plat/nand.h> 42#include <plat/nand.h>
43 43
44#include <plat/common-smdk.h> 44#include <plat/common-smdk.h>
45#include <plat/gpio-cfg.h>
45#include <plat/devs.h> 46#include <plat/devs.h>
46#include <plat/pm.h> 47#include <plat/pm.h>
47 48
@@ -185,10 +186,10 @@ void __init smdk_machine_init(void)
185{ 186{
186 /* Configure the LEDs (even if we have no LED support)*/ 187 /* Configure the LEDs (even if we have no LED support)*/
187 188
188 s3c2410_gpio_cfgpin(S3C2410_GPF(4), S3C2410_GPIO_OUTPUT); 189 s3c_gpio_cfgpin(S3C2410_GPF(4), S3C2410_GPIO_OUTPUT);
189 s3c2410_gpio_cfgpin(S3C2410_GPF(5), S3C2410_GPIO_OUTPUT); 190 s3c_gpio_cfgpin(S3C2410_GPF(5), S3C2410_GPIO_OUTPUT);
190 s3c2410_gpio_cfgpin(S3C2410_GPF(6), S3C2410_GPIO_OUTPUT); 191 s3c_gpio_cfgpin(S3C2410_GPF(6), S3C2410_GPIO_OUTPUT);
191 s3c2410_gpio_cfgpin(S3C2410_GPF(7), S3C2410_GPIO_OUTPUT); 192 s3c_gpio_cfgpin(S3C2410_GPF(7), S3C2410_GPIO_OUTPUT);
192 193
193 s3c2410_gpio_setpin(S3C2410_GPF(4), 1); 194 s3c2410_gpio_setpin(S3C2410_GPF(4), 1);
194 s3c2410_gpio_setpin(S3C2410_GPF(5), 1); 195 s3c2410_gpio_setpin(S3C2410_GPF(5), 1);
diff --git a/arch/arm/plat-s3c24xx/cpu-freq.c b/arch/arm/plat-s3c24xx/cpu-freq.c
index 2d42efb9f4e9..1ecc15bfe9d4 100644
--- a/arch/arm/plat-s3c24xx/cpu-freq.c
+++ b/arch/arm/plat-s3c24xx/cpu-freq.c
@@ -23,6 +23,7 @@
23#include <linux/sysdev.h> 23#include <linux/sysdev.h>
24#include <linux/kobject.h> 24#include <linux/kobject.h>
25#include <linux/sysfs.h> 25#include <linux/sysfs.h>
26#include <linux/slab.h>
26 27
27#include <asm/mach/arch.h> 28#include <asm/mach/arch.h>
28#include <asm/mach/map.h> 29#include <asm/mach/map.h>
diff --git a/arch/arm/plat-s3c24xx/cpu.c b/arch/arm/plat-s3c24xx/cpu.c
index 9ca64df35bf6..76d0858c3cbb 100644
--- a/arch/arm/plat-s3c24xx/cpu.c
+++ b/arch/arm/plat-s3c24xx/cpu.c
@@ -49,6 +49,7 @@
49#include <plat/s3c2400.h> 49#include <plat/s3c2400.h>
50#include <plat/s3c2410.h> 50#include <plat/s3c2410.h>
51#include <plat/s3c2412.h> 51#include <plat/s3c2412.h>
52#include <plat/s3c2416.h>
52#include <plat/s3c244x.h> 53#include <plat/s3c244x.h>
53#include <plat/s3c2443.h> 54#include <plat/s3c2443.h>
54 55
@@ -57,6 +58,7 @@
57static const char name_s3c2400[] = "S3C2400"; 58static const char name_s3c2400[] = "S3C2400";
58static const char name_s3c2410[] = "S3C2410"; 59static const char name_s3c2410[] = "S3C2410";
59static const char name_s3c2412[] = "S3C2412"; 60static const char name_s3c2412[] = "S3C2412";
61static const char name_s3c2416[] = "S3C2416/S3C2450";
60static const char name_s3c2440[] = "S3C2440"; 62static const char name_s3c2440[] = "S3C2440";
61static const char name_s3c2442[] = "S3C2442"; 63static const char name_s3c2442[] = "S3C2442";
62static const char name_s3c2442b[] = "S3C2442B"; 64static const char name_s3c2442b[] = "S3C2442B";
@@ -137,6 +139,15 @@ static struct cpu_table cpu_ids[] __initdata = {
137 .init = s3c2412_init, 139 .init = s3c2412_init,
138 .name = name_s3c2412, 140 .name = name_s3c2412,
139 }, 141 },
142 { /* a strange version of the s3c2416 */
143 .idcode = 0x32450003,
144 .idmask = 0xffffffff,
145 .map_io = s3c2416_map_io,
146 .init_clocks = s3c2416_init_clocks,
147 .init_uarts = s3c2416_init_uarts,
148 .init = s3c2416_init,
149 .name = name_s3c2416,
150 },
140 { 151 {
141 .idcode = 0x32443001, 152 .idcode = 0x32443001,
142 .idmask = 0xffffffff, 153 .idmask = 0xffffffff,
@@ -170,6 +181,16 @@ static struct map_desc s3c_iodesc[] __initdata = {
170 181
171static unsigned long s3c24xx_read_idcode_v5(void) 182static unsigned long s3c24xx_read_idcode_v5(void)
172{ 183{
184#if defined(CONFIG_CPU_S3C2416)
185 /* s3c2416 is v5, with S3C24XX_GSTATUS1 instead of S3C2412_GSTATUS1 */
186
187 u32 gs = __raw_readl(S3C24XX_GSTATUS1);
188
189 /* test for s3c2416 or similar device */
190 if ((gs >> 16) == 0x3245)
191 return gs;
192#endif
193
173#if defined(CONFIG_CPU_S3C2412) || defined(CONFIG_CPU_S3C2413) 194#if defined(CONFIG_CPU_S3C2412) || defined(CONFIG_CPU_S3C2413)
174 return __raw_readl(S3C2412_GSTATUS1); 195 return __raw_readl(S3C2412_GSTATUS1);
175#else 196#else
diff --git a/arch/arm/plat-s3c24xx/devs.c b/arch/arm/plat-s3c24xx/devs.c
index 8c6de1c9968f..9265f09bfa58 100644
--- a/arch/arm/plat-s3c24xx/devs.c
+++ b/arch/arm/plat-s3c24xx/devs.c
@@ -20,6 +20,7 @@
20#include <linux/serial_core.h> 20#include <linux/serial_core.h>
21#include <linux/platform_device.h> 21#include <linux/platform_device.h>
22#include <linux/io.h> 22#include <linux/io.h>
23#include <linux/slab.h>
23 24
24#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
25#include <asm/mach/map.h> 26#include <asm/mach/map.h>
diff --git a/arch/arm/plat-s3c24xx/gpio.c b/arch/arm/plat-s3c24xx/gpio.c
index 5467470badfd..45126d3aafc6 100644
--- a/arch/arm/plat-s3c24xx/gpio.c
+++ b/arch/arm/plat-s3c24xx/gpio.c
@@ -1,6 +1,6 @@
1/* linux/arch/arm/plat-s3c24xx/gpio.c 1/* linux/arch/arm/plat-s3c24xx/gpio.c
2 * 2 *
3 * Copyright (c) 2004-2005 Simtec Electronics 3 * Copyright (c) 2004-2010 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk> 4 * Ben Dooks <ben@simtec.co.uk>
5 * 5 *
6 * S3C24XX GPIO support 6 * S3C24XX GPIO support
@@ -20,12 +20,12 @@
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21*/ 21*/
22 22
23
24#include <linux/kernel.h> 23#include <linux/kernel.h>
25#include <linux/init.h> 24#include <linux/init.h>
26#include <linux/module.h> 25#include <linux/module.h>
27#include <linux/interrupt.h> 26#include <linux/interrupt.h>
28#include <linux/ioport.h> 27#include <linux/ioport.h>
28#include <linux/gpio.h>
29#include <linux/io.h> 29#include <linux/io.h>
30 30
31#include <mach/hardware.h> 31#include <mach/hardware.h>
@@ -34,123 +34,34 @@
34 34
35#include <mach/regs-gpio.h> 35#include <mach/regs-gpio.h>
36 36
37void s3c2410_gpio_cfgpin(unsigned int pin, unsigned int function) 37/* gpiolib wrappers until these are totally eliminated */
38{
39 void __iomem *base = S3C24XX_GPIO_BASE(pin);
40 unsigned long mask;
41 unsigned long con;
42 unsigned long flags;
43
44 if (pin < S3C2410_GPIO_BANKB) {
45 mask = 1 << S3C2410_GPIO_OFFSET(pin);
46 } else {
47 mask = 3 << S3C2410_GPIO_OFFSET(pin)*2;
48 }
49
50 switch (function) {
51 case S3C2410_GPIO_LEAVE:
52 mask = 0;
53 function = 0;
54 break;
55
56 case S3C2410_GPIO_INPUT:
57 case S3C2410_GPIO_OUTPUT:
58 case S3C2410_GPIO_SFN2:
59 case S3C2410_GPIO_SFN3:
60 if (pin < S3C2410_GPIO_BANKB) {
61 function -= 1;
62 function &= 1;
63 function <<= S3C2410_GPIO_OFFSET(pin);
64 } else {
65 function &= 3;
66 function <<= S3C2410_GPIO_OFFSET(pin)*2;
67 }
68 }
69
70 /* modify the specified register wwith IRQs off */
71
72 local_irq_save(flags);
73
74 con = __raw_readl(base + 0x00);
75 con &= ~mask;
76 con |= function;
77
78 __raw_writel(con, base + 0x00);
79
80 local_irq_restore(flags);
81}
82
83EXPORT_SYMBOL(s3c2410_gpio_cfgpin);
84
85unsigned int s3c2410_gpio_getcfg(unsigned int pin)
86{
87 void __iomem *base = S3C24XX_GPIO_BASE(pin);
88 unsigned long val = __raw_readl(base);
89
90 if (pin < S3C2410_GPIO_BANKB) {
91 val >>= S3C2410_GPIO_OFFSET(pin);
92 val &= 1;
93 val += 1;
94 } else {
95 val >>= S3C2410_GPIO_OFFSET(pin)*2;
96 val &= 3;
97 }
98
99 return val | S3C2410_GPIO_INPUT;
100}
101
102EXPORT_SYMBOL(s3c2410_gpio_getcfg);
103 38
104void s3c2410_gpio_pullup(unsigned int pin, unsigned int to) 39void s3c2410_gpio_pullup(unsigned int pin, unsigned int to)
105{ 40{
106 void __iomem *base = S3C24XX_GPIO_BASE(pin); 41 int ret;
107 unsigned long offs = S3C2410_GPIO_OFFSET(pin);
108 unsigned long flags;
109 unsigned long up;
110 42
111 if (pin < S3C2410_GPIO_BANKB) 43 WARN_ON(to); /* should be none of these left */
112 return;
113 44
114 local_irq_save(flags); 45 if (!to) {
115 46 /* if pull is enabled, try first with up, and if that
116 up = __raw_readl(base + 0x08); 47 * fails, try using down */
117 up &= ~(1L << offs);
118 up |= to << offs;
119 __raw_writel(up, base + 0x08);
120 48
121 local_irq_restore(flags); 49 ret = s3c_gpio_setpull(pin, S3C_GPIO_PULL_UP);
50 if (ret)
51 s3c_gpio_setpull(pin, S3C_GPIO_PULL_DOWN);
52 } else {
53 s3c_gpio_setpull(pin, S3C_GPIO_PULL_NONE);
54 }
122} 55}
123
124EXPORT_SYMBOL(s3c2410_gpio_pullup); 56EXPORT_SYMBOL(s3c2410_gpio_pullup);
125 57
126int s3c2410_gpio_getpull(unsigned int pin)
127{
128 void __iomem *base = S3C24XX_GPIO_BASE(pin);
129 unsigned long offs = S3C2410_GPIO_OFFSET(pin);
130
131 if (pin < S3C2410_GPIO_BANKB)
132 return -EINVAL;
133
134 return (__raw_readl(base + 0x08) & (1L << offs)) ? 1 : 0;
135}
136
137EXPORT_SYMBOL(s3c2410_gpio_getpull);
138
139void s3c2410_gpio_setpin(unsigned int pin, unsigned int to) 58void s3c2410_gpio_setpin(unsigned int pin, unsigned int to)
140{ 59{
141 void __iomem *base = S3C24XX_GPIO_BASE(pin); 60 /* do this via gpiolib until all users removed */
142 unsigned long offs = S3C2410_GPIO_OFFSET(pin);
143 unsigned long flags;
144 unsigned long dat;
145
146 local_irq_save(flags);
147 61
148 dat = __raw_readl(base + 0x04); 62 gpio_request(pin, "temporary");
149 dat &= ~(1 << offs); 63 gpio_set_value(pin, to);
150 dat |= to << offs; 64 gpio_free(pin);
151 __raw_writel(dat, base + 0x04);
152
153 local_irq_restore(flags);
154} 65}
155 66
156EXPORT_SYMBOL(s3c2410_gpio_setpin); 67EXPORT_SYMBOL(s3c2410_gpio_setpin);
@@ -181,22 +92,3 @@ unsigned int s3c2410_modify_misccr(unsigned int clear, unsigned int change)
181} 92}
182 93
183EXPORT_SYMBOL(s3c2410_modify_misccr); 94EXPORT_SYMBOL(s3c2410_modify_misccr);
184
185int s3c2410_gpio_getirq(unsigned int pin)
186{
187 if (pin < S3C2410_GPF(0) || pin > S3C2410_GPG(15))
188 return -EINVAL; /* not valid interrupts */
189
190 if (pin < S3C2410_GPG(0) && pin > S3C2410_GPF(7))
191 return -EINVAL; /* not valid pin */
192
193 if (pin < S3C2410_GPF(4))
194 return (pin - S3C2410_GPF(0)) + IRQ_EINT0;
195
196 if (pin < S3C2410_GPG(0))
197 return (pin - S3C2410_GPF(4)) + IRQ_EINT4;
198
199 return (pin - S3C2410_GPG(0)) + IRQ_EINT8;
200}
201
202EXPORT_SYMBOL(s3c2410_gpio_getirq);
diff --git a/arch/arm/plat-s3c24xx/gpiolib.c b/arch/arm/plat-s3c24xx/gpiolib.c
index 4f0f11a6a677..4c0896f2572d 100644
--- a/arch/arm/plat-s3c24xx/gpiolib.c
+++ b/arch/arm/plat-s3c24xx/gpiolib.c
@@ -1,6 +1,6 @@
1/* linux/arch/arm/plat-s3c24xx/gpiolib.c 1/* linux/arch/arm/plat-s3c24xx/gpiolib.c
2 * 2 *
3 * Copyright (c) 2008 Simtec Electronics 3 * Copyright (c) 2008-2010 Simtec Electronics
4 * http://armlinux.simtec.co.uk/ 4 * http://armlinux.simtec.co.uk/
5 * Ben Dooks <ben@simtec.co.uk> 5 * Ben Dooks <ben@simtec.co.uk>
6 * 6 *
@@ -21,6 +21,8 @@
21#include <linux/gpio.h> 21#include <linux/gpio.h>
22 22
23#include <plat/gpio-core.h> 23#include <plat/gpio-core.h>
24#include <plat/gpio-cfg.h>
25#include <plat/gpio-cfg-helpers.h>
24#include <mach/hardware.h> 26#include <mach/hardware.h>
25#include <asm/irq.h> 27#include <asm/irq.h>
26#include <plat/pm.h> 28#include <plat/pm.h>
@@ -77,10 +79,21 @@ static int s3c24xx_gpiolib_bankg_toirq(struct gpio_chip *chip, unsigned offset)
77 return IRQ_EINT8 + offset; 79 return IRQ_EINT8 + offset;
78} 80}
79 81
82static struct s3c_gpio_cfg s3c24xx_gpiocfg_banka = {
83 .set_config = s3c_gpio_setcfg_s3c24xx_a,
84 .get_config = s3c_gpio_getcfg_s3c24xx_a,
85};
86
87struct s3c_gpio_cfg s3c24xx_gpiocfg_default = {
88 .set_config = s3c_gpio_setcfg_s3c24xx,
89 .get_config = s3c_gpio_getcfg_s3c24xx,
90};
91
80struct s3c_gpio_chip s3c24xx_gpios[] = { 92struct s3c_gpio_chip s3c24xx_gpios[] = {
81 [0] = { 93 [0] = {
82 .base = S3C2410_GPACON, 94 .base = S3C2410_GPACON,
83 .pm = __gpio_pm(&s3c_gpio_pm_1bit), 95 .pm = __gpio_pm(&s3c_gpio_pm_1bit),
96 .config = &s3c24xx_gpiocfg_banka,
84 .chip = { 97 .chip = {
85 .base = S3C2410_GPA(0), 98 .base = S3C2410_GPA(0),
86 .owner = THIS_MODULE, 99 .owner = THIS_MODULE,
@@ -161,15 +174,58 @@ struct s3c_gpio_chip s3c24xx_gpios[] = {
161 .ngpio = 11, 174 .ngpio = 11,
162 }, 175 },
163 }, 176 },
177 /* GPIOS for the S3C2443 and later devices. */
178 {
179 .base = S3C2440_GPJCON,
180 .pm = __gpio_pm(&s3c_gpio_pm_2bit),
181 .chip = {
182 .base = S3C2410_GPJ(0),
183 .owner = THIS_MODULE,
184 .label = "GPIOJ",
185 .ngpio = 16,
186 },
187 }, {
188 .base = S3C2443_GPKCON,
189 .pm = __gpio_pm(&s3c_gpio_pm_2bit),
190 .chip = {
191 .base = S3C2410_GPK(0),
192 .owner = THIS_MODULE,
193 .label = "GPIOK",
194 .ngpio = 16,
195 },
196 }, {
197 .base = S3C2443_GPLCON,
198 .pm = __gpio_pm(&s3c_gpio_pm_2bit),
199 .chip = {
200 .base = S3C2410_GPL(0),
201 .owner = THIS_MODULE,
202 .label = "GPIOL",
203 .ngpio = 15,
204 },
205 }, {
206 .base = S3C2443_GPMCON,
207 .pm = __gpio_pm(&s3c_gpio_pm_2bit),
208 .chip = {
209 .base = S3C2410_GPM(0),
210 .owner = THIS_MODULE,
211 .label = "GPIOM",
212 .ngpio = 2,
213 },
214 },
164}; 215};
165 216
217
166static __init int s3c24xx_gpiolib_init(void) 218static __init int s3c24xx_gpiolib_init(void)
167{ 219{
168 struct s3c_gpio_chip *chip = s3c24xx_gpios; 220 struct s3c_gpio_chip *chip = s3c24xx_gpios;
169 int gpn; 221 int gpn;
170 222
171 for (gpn = 0; gpn < ARRAY_SIZE(s3c24xx_gpios); gpn++, chip++) 223 for (gpn = 0; gpn < ARRAY_SIZE(s3c24xx_gpios); gpn++, chip++) {
224 if (!chip->config)
225 chip->config = &s3c24xx_gpiocfg_default;
226
172 s3c_gpiolib_add(chip); 227 s3c_gpiolib_add(chip);
228 }
173 229
174 return 0; 230 return 0;
175} 231}
diff --git a/arch/arm/plat-s3c24xx/include/plat/pll.h b/arch/arm/plat-s3c24xx/include/plat/pll.h
index 7ea8bffa7a9c..005729a1077a 100644
--- a/arch/arm/plat-s3c24xx/include/plat/pll.h
+++ b/arch/arm/plat-s3c24xx/include/plat/pll.h
@@ -35,3 +35,28 @@ s3c24xx_get_pll(unsigned int pllval, unsigned int baseclk)
35 35
36 return (unsigned int)fvco; 36 return (unsigned int)fvco;
37} 37}
38
39#define S3C2416_PLL_M_SHIFT (14)
40#define S3C2416_PLL_P_SHIFT (5)
41#define S3C2416_PLL_S_MASK (7)
42#define S3C2416_PLL_M_MASK ((1 << 10) - 1)
43#define S3C2416_PLL_P_MASK (63)
44
45static inline unsigned int
46s3c2416_get_pll(unsigned int pllval, unsigned int baseclk)
47{
48 unsigned int m, p, s;
49 uint64_t fvco;
50
51 m = pllval >> S3C2416_PLL_M_SHIFT;
52 p = pllval >> S3C2416_PLL_P_SHIFT;
53
54 s = pllval & S3C2416_PLL_S_MASK;
55 m &= S3C2416_PLL_M_MASK;
56 p &= S3C2416_PLL_P_MASK;
57
58 fvco = (uint64_t)baseclk * m;
59 do_div(fvco, (p << s));
60
61 return (unsigned int)fvco;
62}
diff --git a/arch/arm/plat-s3c24xx/include/plat/s3c2416.h b/arch/arm/plat-s3c24xx/include/plat/s3c2416.h
new file mode 100644
index 000000000000..dc3c0907d221
--- /dev/null
+++ b/arch/arm/plat-s3c24xx/include/plat/s3c2416.h
@@ -0,0 +1,31 @@
1/* linux/include/asm-arm/plat-s3c24xx/s3c2443.h
2 *
3 * Copyright (c) 2009 Yauhen Kharuzhy <jekhor@gmail.com>
4 *
5 * Header file for s3c2416 cpu support
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#ifdef CONFIG_CPU_S3C2416
13
14struct s3c2410_uartcfg;
15
16extern int s3c2416_init(void);
17
18extern void s3c2416_map_io(void);
19
20extern void s3c2416_init_uarts(struct s3c2410_uartcfg *cfg, int no);
21
22extern void s3c2416_init_clocks(int xtal);
23
24extern int s3c2416_baseclk_add(void);
25
26#else
27#define s3c2416_init_clocks NULL
28#define s3c2416_init_uarts NULL
29#define s3c2416_map_io NULL
30#define s3c2416_init NULL
31#endif
diff --git a/arch/arm/plat-s3c24xx/include/plat/s3c2443.h b/arch/arm/plat-s3c24xx/include/plat/s3c2443.h
index 815b107ed890..a19715feb798 100644
--- a/arch/arm/plat-s3c24xx/include/plat/s3c2443.h
+++ b/arch/arm/plat-s3c24xx/include/plat/s3c2443.h
@@ -30,3 +30,22 @@ extern int s3c2443_baseclk_add(void);
30#define s3c2443_map_io NULL 30#define s3c2443_map_io NULL
31#define s3c2443_init NULL 31#define s3c2443_init NULL
32#endif 32#endif
33
34/* common code used by s3c2443 and others.
35 * note, not to be used outside of arch/arm/mach-s3c* */
36
37struct clk; /* some files don't need clk.h otherwise */
38
39typedef unsigned int (*pll_fn)(unsigned int reg, unsigned int base);
40typedef unsigned int (*fdiv_fn)(unsigned long clkcon0);
41
42extern void s3c2443_common_setup_clocks(pll_fn get_mpll, fdiv_fn fdiv);
43extern void s3c2443_common_init_clocks(int xtal, pll_fn get_mpll, fdiv_fn fdiv);
44
45extern int s3c2443_clkcon_enable_h(struct clk *clk, int enable);
46extern int s3c2443_clkcon_enable_p(struct clk *clk, int enable);
47extern int s3c2443_clkcon_enable_s(struct clk *clk, int enable);
48
49extern struct clksrc_clk clk_epllref;
50extern struct clksrc_clk clk_esysclk;
51extern struct clksrc_clk clk_msysclk;
diff --git a/arch/arm/plat-s3c24xx/pm.c b/arch/arm/plat-s3c24xx/pm.c
index 3620dd299095..60627e63a254 100644
--- a/arch/arm/plat-s3c24xx/pm.c
+++ b/arch/arm/plat-s3c24xx/pm.c
@@ -43,6 +43,7 @@
43 43
44#include <asm/mach/time.h> 44#include <asm/mach/time.h>
45 45
46#include <plat/gpio-cfg.h>
46#include <plat/pm.h> 47#include <plat/pm.h>
47 48
48#define PFX "s3c24xx-pm: " 49#define PFX "s3c24xx-pm: "
@@ -90,22 +91,22 @@ static void s3c_pm_check_resume_pin(unsigned int pin, unsigned int irqoffs)
90{ 91{
91 unsigned long irqstate; 92 unsigned long irqstate;
92 unsigned long pinstate; 93 unsigned long pinstate;
93 int irq = s3c2410_gpio_getirq(pin); 94 int irq = gpio_to_irq(pin);
94 95
95 if (irqoffs < 4) 96 if (irqoffs < 4)
96 irqstate = s3c_irqwake_intmask & (1L<<irqoffs); 97 irqstate = s3c_irqwake_intmask & (1L<<irqoffs);
97 else 98 else
98 irqstate = s3c_irqwake_eintmask & (1L<<irqoffs); 99 irqstate = s3c_irqwake_eintmask & (1L<<irqoffs);
99 100
100 pinstate = s3c2410_gpio_getcfg(pin); 101 pinstate = s3c_gpio_getcfg(pin);
101 102
102 if (!irqstate) { 103 if (!irqstate) {
103 if (pinstate == S3C2410_GPIO_IRQ) 104 if (pinstate == S3C2410_GPIO_IRQ)
104 S3C_PMDBG("Leaving IRQ %d (pin %d) enabled\n", irq, pin); 105 S3C_PMDBG("Leaving IRQ %d (pin %d) as is\n", irq, pin);
105 } else { 106 } else {
106 if (pinstate == S3C2410_GPIO_IRQ) { 107 if (pinstate == S3C2410_GPIO_IRQ) {
107 S3C_PMDBG("Disabling IRQ %d (pin %d)\n", irq, pin); 108 S3C_PMDBG("Disabling IRQ %d (pin %d)\n", irq, pin);
108 s3c2410_gpio_cfgpin(pin, S3C2410_GPIO_INPUT); 109 s3c_gpio_cfgpin(pin, S3C2410_GPIO_INPUT);
109 } 110 }
110 } 111 }
111} 112}
diff --git a/arch/arm/plat-s3c24xx/s3c2410-clock.c b/arch/arm/plat-s3c24xx/s3c2410-clock.c
index b61bdb793734..9ecc5d913679 100644
--- a/arch/arm/plat-s3c24xx/s3c2410-clock.c
+++ b/arch/arm/plat-s3c24xx/s3c2410-clock.c
@@ -87,7 +87,7 @@ static int s3c2410_upll_enable(struct clk *clk, int enable)
87 87
88/* standard clock definitions */ 88/* standard clock definitions */
89 89
90static struct clk init_clocks_disable[] = { 90static struct clk init_clocks_off[] = {
91 { 91 {
92 .name = "nand", 92 .name = "nand",
93 .id = -1, 93 .id = -1,
@@ -249,17 +249,8 @@ int __init s3c2410_baseclk_add(void)
249 249
250 /* install (and disable) the clocks we do not need immediately */ 250 /* install (and disable) the clocks we do not need immediately */
251 251
252 clkp = init_clocks_disable; 252 s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off));
253 for (ptr = 0; ptr < ARRAY_SIZE(init_clocks_disable); ptr++, clkp++) { 253 s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off));
254
255 ret = s3c24xx_register_clock(clkp);
256 if (ret < 0) {
257 printk(KERN_ERR "Failed to register clock %s (%d)\n",
258 clkp->name, ret);
259 }
260
261 s3c2410_clkcon_enable(clkp, 0);
262 }
263 254
264 /* show the clock-slow value */ 255 /* show the clock-slow value */
265 256
diff --git a/arch/arm/plat-s3c24xx/s3c2410-iotiming.c b/arch/arm/plat-s3c24xx/s3c2410-iotiming.c
index 963fb0b4379e..b1908e56da1b 100644
--- a/arch/arm/plat-s3c24xx/s3c2410-iotiming.c
+++ b/arch/arm/plat-s3c24xx/s3c2410-iotiming.c
@@ -17,6 +17,7 @@
17#include <linux/cpufreq.h> 17#include <linux/cpufreq.h>
18#include <linux/seq_file.h> 18#include <linux/seq_file.h>
19#include <linux/io.h> 19#include <linux/io.h>
20#include <linux/slab.h>
20 21
21#include <mach/map.h> 22#include <mach/map.h>
22#include <mach/regs-mem.h> 23#include <mach/regs-mem.h>
diff --git a/arch/arm/plat-s3c24xx/s3c2412-iotiming.c b/arch/arm/plat-s3c24xx/s3c2412-iotiming.c
index 24993dce10b5..0b46d3895d62 100644
--- a/arch/arm/plat-s3c24xx/s3c2412-iotiming.c
+++ b/arch/arm/plat-s3c24xx/s3c2412-iotiming.c
@@ -21,6 +21,7 @@
21#include <linux/delay.h> 21#include <linux/delay.h>
22#include <linux/clk.h> 22#include <linux/clk.h>
23#include <linux/err.h> 23#include <linux/err.h>
24#include <linux/slab.h>
24 25
25#include <linux/amba/pl093.h> 26#include <linux/amba/pl093.h>
26 27
diff --git a/arch/arm/plat-s3c24xx/s3c2443-clock.c b/arch/arm/plat-s3c24xx/s3c2443-clock.c
new file mode 100644
index 000000000000..461f070eb62d
--- /dev/null
+++ b/arch/arm/plat-s3c24xx/s3c2443-clock.c
@@ -0,0 +1,472 @@
1/* linux/arch/arm/plat-s3c24xx/s3c2443-clock.c
2 *
3 * Copyright (c) 2007, 2010 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C2443 Clock control suport - common code
7 */
8
9#include <linux/init.h>
10#include <linux/clk.h>
11#include <linux/io.h>
12
13#include <mach/regs-s3c2443-clock.h>
14
15#include <plat/s3c2443.h>
16#include <plat/clock.h>
17#include <plat/clock-clksrc.h>
18#include <plat/cpu.h>
19
20#include <plat/cpu-freq.h>
21
22
23static int s3c2443_gate(void __iomem *reg, struct clk *clk, int enable)
24{
25 u32 ctrlbit = clk->ctrlbit;
26 u32 con = __raw_readl(reg);
27
28 if (enable)
29 con |= ctrlbit;
30 else
31 con &= ~ctrlbit;
32
33 __raw_writel(con, reg);
34 return 0;
35}
36
37int s3c2443_clkcon_enable_h(struct clk *clk, int enable)
38{
39 return s3c2443_gate(S3C2443_HCLKCON, clk, enable);
40}
41
42int s3c2443_clkcon_enable_p(struct clk *clk, int enable)
43{
44 return s3c2443_gate(S3C2443_PCLKCON, clk, enable);
45}
46
47int s3c2443_clkcon_enable_s(struct clk *clk, int enable)
48{
49 return s3c2443_gate(S3C2443_SCLKCON, clk, enable);
50}
51
52/* mpllref is a direct descendant of clk_xtal by default, but it is not
53 * elided as the EPLL can be either sourced by the XTAL or EXTCLK and as
54 * such directly equating the two source clocks is impossible.
55 */
56struct clk clk_mpllref = {
57 .name = "mpllref",
58 .parent = &clk_xtal,
59 .id = -1,
60};
61
62static struct clk *clk_epllref_sources[] = {
63 [0] = &clk_mpllref,
64 [1] = &clk_mpllref,
65 [2] = &clk_xtal,
66 [3] = &clk_ext,
67};
68
69struct clksrc_clk clk_epllref = {
70 .clk = {
71 .name = "epllref",
72 .id = -1,
73 },
74 .sources = &(struct clksrc_sources) {
75 .sources = clk_epllref_sources,
76 .nr_sources = ARRAY_SIZE(clk_epllref_sources),
77 },
78 .reg_src = { .reg = S3C2443_CLKSRC, .size = 2, .shift = 7 },
79};
80
81/* esysclk
82 *
83 * this is sourced from either the EPLL or the EPLLref clock
84*/
85
86static struct clk *clk_sysclk_sources[] = {
87 [0] = &clk_epllref.clk,
88 [1] = &clk_epll,
89};
90
91struct clksrc_clk clk_esysclk = {
92 .clk = {
93 .name = "esysclk",
94 .parent = &clk_epll,
95 .id = -1,
96 },
97 .sources = &(struct clksrc_sources) {
98 .sources = clk_sysclk_sources,
99 .nr_sources = ARRAY_SIZE(clk_sysclk_sources),
100 },
101 .reg_src = { .reg = S3C2443_CLKSRC, .size = 1, .shift = 6 },
102};
103
104static unsigned long s3c2443_getrate_mdivclk(struct clk *clk)
105{
106 unsigned long parent_rate = clk_get_rate(clk->parent);
107 unsigned long div = __raw_readl(S3C2443_CLKDIV0);
108
109 div &= S3C2443_CLKDIV0_EXTDIV_MASK;
110 div >>= (S3C2443_CLKDIV0_EXTDIV_SHIFT-1); /* x2 */
111
112 return parent_rate / (div + 1);
113}
114
115static struct clk clk_mdivclk = {
116 .name = "mdivclk",
117 .parent = &clk_mpllref,
118 .id = -1,
119 .ops = &(struct clk_ops) {
120 .get_rate = s3c2443_getrate_mdivclk,
121 },
122};
123
124static struct clk *clk_msysclk_sources[] = {
125 [0] = &clk_mpllref,
126 [1] = &clk_mpll,
127 [2] = &clk_mdivclk,
128 [3] = &clk_mpllref,
129};
130
131struct clksrc_clk clk_msysclk = {
132 .clk = {
133 .name = "msysclk",
134 .parent = &clk_xtal,
135 .id = -1,
136 },
137 .sources = &(struct clksrc_sources) {
138 .sources = clk_msysclk_sources,
139 .nr_sources = ARRAY_SIZE(clk_msysclk_sources),
140 },
141 .reg_src = { .reg = S3C2443_CLKSRC, .size = 2, .shift = 3 },
142};
143
144/* prediv
145 *
146 * this divides the msysclk down to pass to h/p/etc.
147 */
148
149static unsigned long s3c2443_prediv_getrate(struct clk *clk)
150{
151 unsigned long rate = clk_get_rate(clk->parent);
152 unsigned long clkdiv0 = __raw_readl(S3C2443_CLKDIV0);
153
154 clkdiv0 &= S3C2443_CLKDIV0_PREDIV_MASK;
155 clkdiv0 >>= S3C2443_CLKDIV0_PREDIV_SHIFT;
156
157 return rate / (clkdiv0 + 1);
158}
159
160static struct clk clk_prediv = {
161 .name = "prediv",
162 .id = -1,
163 .parent = &clk_msysclk.clk,
164 .ops = &(struct clk_ops) {
165 .get_rate = s3c2443_prediv_getrate,
166 },
167};
168
169/* usbhost
170 *
171 * usb host bus-clock, usually 48MHz to provide USB bus clock timing
172*/
173
174static struct clksrc_clk clk_usb_bus_host = {
175 .clk = {
176 .name = "usb-bus-host-parent",
177 .id = -1,
178 .parent = &clk_esysclk.clk,
179 .ctrlbit = S3C2443_SCLKCON_USBHOST,
180 .enable = s3c2443_clkcon_enable_s,
181 },
182 .reg_div = { .reg = S3C2443_CLKDIV1, .size = 2, .shift = 4 },
183};
184
185/* common clksrc clocks */
186
187static struct clksrc_clk clksrc_clks[] = {
188 {
189 /* ART baud-rate clock sourced from esysclk via a divisor */
190 .clk = {
191 .name = "uartclk",
192 .id = -1,
193 .parent = &clk_esysclk.clk,
194 },
195 .reg_div = { .reg = S3C2443_CLKDIV1, .size = 4, .shift = 8 },
196 }, {
197 /* camera interface bus-clock, divided down from esysclk */
198 .clk = {
199 .name = "camif-upll", /* same as 2440 name */
200 .id = -1,
201 .parent = &clk_esysclk.clk,
202 .ctrlbit = S3C2443_SCLKCON_CAMCLK,
203 .enable = s3c2443_clkcon_enable_s,
204 },
205 .reg_div = { .reg = S3C2443_CLKDIV1, .size = 4, .shift = 26 },
206 }, {
207 .clk = {
208 .name = "display-if",
209 .id = -1,
210 .parent = &clk_esysclk.clk,
211 .ctrlbit = S3C2443_SCLKCON_DISPCLK,
212 .enable = s3c2443_clkcon_enable_s,
213 },
214 .reg_div = { .reg = S3C2443_CLKDIV1, .size = 8, .shift = 16 },
215 },
216};
217
218
219static struct clk init_clocks_off[] = {
220 {
221 .name = "adc",
222 .id = -1,
223 .parent = &clk_p,
224 .enable = s3c2443_clkcon_enable_p,
225 .ctrlbit = S3C2443_PCLKCON_ADC,
226 }, {
227 .name = "i2c",
228 .id = -1,
229 .parent = &clk_p,
230 .enable = s3c2443_clkcon_enable_p,
231 .ctrlbit = S3C2443_PCLKCON_IIC,
232 }
233};
234
235static struct clk init_clocks[] = {
236 {
237 .name = "dma",
238 .id = 0,
239 .parent = &clk_h,
240 .enable = s3c2443_clkcon_enable_h,
241 .ctrlbit = S3C2443_HCLKCON_DMA0,
242 }, {
243 .name = "dma",
244 .id = 1,
245 .parent = &clk_h,
246 .enable = s3c2443_clkcon_enable_h,
247 .ctrlbit = S3C2443_HCLKCON_DMA1,
248 }, {
249 .name = "dma",
250 .id = 2,
251 .parent = &clk_h,
252 .enable = s3c2443_clkcon_enable_h,
253 .ctrlbit = S3C2443_HCLKCON_DMA2,
254 }, {
255 .name = "dma",
256 .id = 3,
257 .parent = &clk_h,
258 .enable = s3c2443_clkcon_enable_h,
259 .ctrlbit = S3C2443_HCLKCON_DMA3,
260 }, {
261 .name = "dma",
262 .id = 4,
263 .parent = &clk_h,
264 .enable = s3c2443_clkcon_enable_h,
265 .ctrlbit = S3C2443_HCLKCON_DMA4,
266 }, {
267 .name = "dma",
268 .id = 5,
269 .parent = &clk_h,
270 .enable = s3c2443_clkcon_enable_h,
271 .ctrlbit = S3C2443_HCLKCON_DMA5,
272 }, {
273 .name = "hsmmc",
274 .id = 0,
275 .parent = &clk_h,
276 .enable = s3c2443_clkcon_enable_h,
277 .ctrlbit = S3C2443_HCLKCON_HSMMC,
278 }, {
279 .name = "gpio",
280 .id = -1,
281 .parent = &clk_p,
282 .enable = s3c2443_clkcon_enable_p,
283 .ctrlbit = S3C2443_PCLKCON_GPIO,
284 }, {
285 .name = "usb-host",
286 .id = -1,
287 .parent = &clk_h,
288 .enable = s3c2443_clkcon_enable_h,
289 .ctrlbit = S3C2443_HCLKCON_USBH,
290 }, {
291 .name = "usb-device",
292 .id = -1,
293 .parent = &clk_h,
294 .enable = s3c2443_clkcon_enable_h,
295 .ctrlbit = S3C2443_HCLKCON_USBD,
296 }, {
297 .name = "lcd",
298 .id = -1,
299 .parent = &clk_h,
300 .enable = s3c2443_clkcon_enable_h,
301 .ctrlbit = S3C2443_HCLKCON_LCDC,
302
303 }, {
304 .name = "timers",
305 .id = -1,
306 .parent = &clk_p,
307 .enable = s3c2443_clkcon_enable_p,
308 .ctrlbit = S3C2443_PCLKCON_PWMT,
309 }, {
310 .name = "cfc",
311 .id = -1,
312 .parent = &clk_h,
313 .enable = s3c2443_clkcon_enable_h,
314 .ctrlbit = S3C2443_HCLKCON_CFC,
315 }, {
316 .name = "ssmc",
317 .id = -1,
318 .parent = &clk_h,
319 .enable = s3c2443_clkcon_enable_h,
320 .ctrlbit = S3C2443_HCLKCON_SSMC,
321 }, {
322 .name = "uart",
323 .id = 0,
324 .parent = &clk_p,
325 .enable = s3c2443_clkcon_enable_p,
326 .ctrlbit = S3C2443_PCLKCON_UART0,
327 }, {
328 .name = "uart",
329 .id = 1,
330 .parent = &clk_p,
331 .enable = s3c2443_clkcon_enable_p,
332 .ctrlbit = S3C2443_PCLKCON_UART1,
333 }, {
334 .name = "uart",
335 .id = 2,
336 .parent = &clk_p,
337 .enable = s3c2443_clkcon_enable_p,
338 .ctrlbit = S3C2443_PCLKCON_UART2,
339 }, {
340 .name = "uart",
341 .id = 3,
342 .parent = &clk_p,
343 .enable = s3c2443_clkcon_enable_p,
344 .ctrlbit = S3C2443_PCLKCON_UART3,
345 }, {
346 .name = "rtc",
347 .id = -1,
348 .parent = &clk_p,
349 .enable = s3c2443_clkcon_enable_p,
350 .ctrlbit = S3C2443_PCLKCON_RTC,
351 }, {
352 .name = "watchdog",
353 .id = -1,
354 .parent = &clk_p,
355 .ctrlbit = S3C2443_PCLKCON_WDT,
356 }, {
357 .name = "ac97",
358 .id = -1,
359 .parent = &clk_p,
360 .ctrlbit = S3C2443_PCLKCON_AC97,
361 }, {
362 .name = "nand",
363 .id = -1,
364 .parent = &clk_h,
365 }, {
366 .name = "usb-bus-host",
367 .id = -1,
368 .parent = &clk_usb_bus_host.clk,
369 }
370};
371
372static inline unsigned long s3c2443_get_hdiv(unsigned long clkcon0)
373{
374 clkcon0 &= S3C2443_CLKDIV0_HCLKDIV_MASK;
375
376 return clkcon0 + 1;
377}
378
379/* EPLLCON compatible enough to get on/off information */
380
381void __init_or_cpufreq s3c2443_common_setup_clocks(pll_fn get_mpll,
382 fdiv_fn get_fdiv)
383{
384 unsigned long epllcon = __raw_readl(S3C2443_EPLLCON);
385 unsigned long mpllcon = __raw_readl(S3C2443_MPLLCON);
386 unsigned long clkdiv0 = __raw_readl(S3C2443_CLKDIV0);
387 struct clk *xtal_clk;
388 unsigned long xtal;
389 unsigned long pll;
390 unsigned long fclk;
391 unsigned long hclk;
392 unsigned long pclk;
393 int ptr;
394
395 xtal_clk = clk_get(NULL, "xtal");
396 xtal = clk_get_rate(xtal_clk);
397 clk_put(xtal_clk);
398
399 pll = get_mpll(mpllcon, xtal);
400 clk_msysclk.clk.rate = pll;
401
402 fclk = pll / get_fdiv(clkdiv0);
403 hclk = s3c2443_prediv_getrate(&clk_prediv);
404 hclk /= s3c2443_get_hdiv(clkdiv0);
405 pclk = hclk / ((clkdiv0 & S3C2443_CLKDIV0_HALF_PCLK) ? 2 : 1);
406
407 s3c24xx_setup_clocks(fclk, hclk, pclk);
408
409 printk("CPU: MPLL %s %ld.%03ld MHz, cpu %ld.%03ld MHz, mem %ld.%03ld MHz, pclk %ld.%03ld MHz\n",
410 (mpllcon & S3C2443_PLLCON_OFF) ? "off":"on",
411 print_mhz(pll), print_mhz(fclk),
412 print_mhz(hclk), print_mhz(pclk));
413
414 for (ptr = 0; ptr < ARRAY_SIZE(clksrc_clks); ptr++)
415 s3c_set_clksrc(&clksrc_clks[ptr], true);
416
417 /* ensure usb bus clock is within correct rate of 48MHz */
418
419 if (clk_get_rate(&clk_usb_bus_host.clk) != (48 * 1000 * 1000)) {
420 printk(KERN_INFO "Warning: USB host bus not at 48MHz\n");
421 clk_set_rate(&clk_usb_bus_host.clk, 48*1000*1000);
422 }
423
424 printk("CPU: EPLL %s %ld.%03ld MHz, usb-bus %ld.%03ld MHz\n",
425 (epllcon & S3C2443_PLLCON_OFF) ? "off":"on",
426 print_mhz(clk_get_rate(&clk_epll)),
427 print_mhz(clk_get_rate(&clk_usb_bus)));
428}
429
430static struct clk *clks[] __initdata = {
431 &clk_prediv,
432 &clk_mpllref,
433 &clk_mdivclk,
434 &clk_ext,
435 &clk_epll,
436 &clk_usb_bus,
437};
438
439static struct clksrc_clk *clksrcs[] __initdata = {
440 &clk_usb_bus_host,
441 &clk_epllref,
442 &clk_esysclk,
443 &clk_msysclk,
444};
445
446void __init s3c2443_common_init_clocks(int xtal, pll_fn get_mpll,
447 fdiv_fn get_fdiv)
448{
449 int ptr;
450
451 /* s3c2443 parents h and p clocks from prediv */
452 clk_h.parent = &clk_prediv;
453 clk_p.parent = &clk_prediv;
454
455 clk_usb_bus.parent = &clk_usb_bus_host.clk;
456 clk_epll.parent = &clk_epllref.clk;
457
458 s3c24xx_register_baseclocks(xtal);
459 s3c24xx_register_clocks(clks, ARRAY_SIZE(clks));
460
461 for (ptr = 0; ptr < ARRAY_SIZE(clksrcs); ptr++)
462 s3c_register_clksrc(clksrcs[ptr], 1);
463
464 s3c_register_clksrc(clksrc_clks, ARRAY_SIZE(clksrc_clks));
465 s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks));
466
467 /* See s3c2443/etc notes on disabling clocks at init time */
468 s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off));
469 s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off));
470
471 s3c2443_common_setup_clocks(get_mpll, get_fdiv);
472}
diff --git a/arch/arm/plat-s3c24xx/setup-i2c.c b/arch/arm/plat-s3c24xx/setup-i2c.c
index 71a6accf114e..9e90a7cbd1d6 100644
--- a/arch/arm/plat-s3c24xx/setup-i2c.c
+++ b/arch/arm/plat-s3c24xx/setup-i2c.c
@@ -15,12 +15,13 @@
15 15
16struct platform_device; 16struct platform_device;
17 17
18#include <plat/gpio-cfg.h>
18#include <plat/iic.h> 19#include <plat/iic.h>
19#include <mach/hardware.h> 20#include <mach/hardware.h>
20#include <mach/regs-gpio.h> 21#include <mach/regs-gpio.h>
21 22
22void s3c_i2c0_cfg_gpio(struct platform_device *dev) 23void s3c_i2c0_cfg_gpio(struct platform_device *dev)
23{ 24{
24 s3c2410_gpio_cfgpin(S3C2410_GPE(15), S3C2410_GPE15_IICSDA); 25 s3c_gpio_cfgpin(S3C2410_GPE(15), S3C2410_GPE15_IICSDA);
25 s3c2410_gpio_cfgpin(S3C2410_GPE(14), S3C2410_GPE14_IICSCL); 26 s3c_gpio_cfgpin(S3C2410_GPE(14), S3C2410_GPE14_IICSCL);
26} 27}
diff --git a/arch/arm/plat-s3c24xx/spi-bus0-gpe11_12_13.c b/arch/arm/plat-s3c24xx/spi-bus0-gpe11_12_13.c
index da7a61728c18..9793544a6ace 100644
--- a/arch/arm/plat-s3c24xx/spi-bus0-gpe11_12_13.c
+++ b/arch/arm/plat-s3c24xx/spi-bus0-gpe11_12_13.c
@@ -21,16 +21,16 @@ void s3c24xx_spi_gpiocfg_bus0_gpe11_12_13(struct s3c2410_spi_info *spi,
21 int enable) 21 int enable)
22{ 22{
23 if (enable) { 23 if (enable) {
24 s3c2410_gpio_cfgpin(S3C2410_GPE(13), S3C2410_GPE13_SPICLK0); 24 s3c_gpio_cfgpin(S3C2410_GPE(13), S3C2410_GPE13_SPICLK0);
25 s3c2410_gpio_cfgpin(S3C2410_GPE(12), S3C2410_GPE12_SPIMOSI0); 25 s3c_gpio_cfgpin(S3C2410_GPE(12), S3C2410_GPE12_SPIMOSI0);
26 s3c2410_gpio_cfgpin(S3C2410_GPE(11), S3C2410_GPE11_SPIMISO0); 26 s3c_gpio_cfgpin(S3C2410_GPE(11), S3C2410_GPE11_SPIMISO0);
27 s3c2410_gpio_pullup(S3C2410_GPE(11), 0); 27 s3c2410_gpio_pullup(S3C2410_GPE(11), 0);
28 s3c2410_gpio_pullup(S3C2410_GPE(13), 0); 28 s3c2410_gpio_pullup(S3C2410_GPE(13), 0);
29 } else { 29 } else {
30 s3c2410_gpio_cfgpin(S3C2410_GPE(13), S3C2410_GPIO_INPUT); 30 s3c_gpio_cfgpin(S3C2410_GPE(13), S3C2410_GPIO_INPUT);
31 s3c2410_gpio_cfgpin(S3C2410_GPE(11), S3C2410_GPIO_INPUT); 31 s3c_gpio_cfgpin(S3C2410_GPE(11), S3C2410_GPIO_INPUT);
32 s3c2410_gpio_pullup(S3C2410_GPE(11), 1); 32 s3c_gpio_cfgpull(S3C2410_GPE(11), S3C_GPIO_PULL_NONE);
33 s3c2410_gpio_pullup(S3C2410_GPE(12), 1); 33 s3c_gpio_cfgpull(S3C2410_GPE(12), S3C_GPIO_PULL_NONE);
34 s3c2410_gpio_pullup(S3C2410_GPE(13), 1); 34 s3c_gpio_cfgpull(S3C2410_GPE(13), S3C_GPIO_PULL_NONE);
35 } 35 }
36} 36}
diff --git a/arch/arm/plat-s3c24xx/spi-bus1-gpd8_9_10.c b/arch/arm/plat-s3c24xx/spi-bus1-gpd8_9_10.c
index 89fcf5308cf6..db9e9e477ec1 100644
--- a/arch/arm/plat-s3c24xx/spi-bus1-gpd8_9_10.c
+++ b/arch/arm/plat-s3c24xx/spi-bus1-gpd8_9_10.c
@@ -23,16 +23,16 @@ void s3c24xx_spi_gpiocfg_bus1_gpd8_9_10(struct s3c2410_spi_info *spi,
23 23
24 printk(KERN_INFO "%s(%d)\n", __func__, enable); 24 printk(KERN_INFO "%s(%d)\n", __func__, enable);
25 if (enable) { 25 if (enable) {
26 s3c2410_gpio_cfgpin(S3C2410_GPD(10), S3C2440_GPD10_SPICLK1); 26 s3c_gpio_cfgpin(S3C2410_GPD(10), S3C2440_GPD10_SPICLK1);
27 s3c2410_gpio_cfgpin(S3C2410_GPD(9), S3C2440_GPD9_SPIMOSI1); 27 s3c_gpio_cfgpin(S3C2410_GPD(9), S3C2440_GPD9_SPIMOSI1);
28 s3c2410_gpio_cfgpin(S3C2410_GPD(8), S3C2440_GPD8_SPIMISO1); 28 s3c_gpio_cfgpin(S3C2410_GPD(8), S3C2440_GPD8_SPIMISO1);
29 s3c2410_gpio_pullup(S3C2410_GPD(10), 0); 29 s3c2410_gpio_pullup(S3C2410_GPD(10), 0);
30 s3c2410_gpio_pullup(S3C2410_GPD(9), 0); 30 s3c2410_gpio_pullup(S3C2410_GPD(9), 0);
31 } else { 31 } else {
32 s3c2410_gpio_cfgpin(S3C2410_GPD(8), S3C2410_GPIO_INPUT); 32 s3c_gpio_cfgpin(S3C2410_GPD(8), S3C2410_GPIO_INPUT);
33 s3c2410_gpio_cfgpin(S3C2410_GPD(9), S3C2410_GPIO_INPUT); 33 s3c_gpio_cfgpin(S3C2410_GPD(9), S3C2410_GPIO_INPUT);
34 s3c2410_gpio_pullup(S3C2410_GPD(10), 1); 34 s3c_gpio_cfgpull(S3C2410_GPD(10), S3C_GPIO_PULL_NONE);
35 s3c2410_gpio_pullup(S3C2410_GPD(9), 1); 35 s3c_gpio_cfgpull(S3C2410_GPD(9), S3C_GPIO_PULL_NONE);
36 s3c2410_gpio_pullup(S3C2410_GPD(8), 1); 36 s3c_gpio_cfgpull(S3C2410_GPD(8), S3C_GPIO_PULL_NONE);
37 } 37 }
38} 38}
diff --git a/arch/arm/plat-s3c24xx/spi-bus1-gpg5_6_7.c b/arch/arm/plat-s3c24xx/spi-bus1-gpg5_6_7.c
index 86b9edc67413..8ea663a438bb 100644
--- a/arch/arm/plat-s3c24xx/spi-bus1-gpg5_6_7.c
+++ b/arch/arm/plat-s3c24xx/spi-bus1-gpg5_6_7.c
@@ -21,16 +21,16 @@ void s3c24xx_spi_gpiocfg_bus1_gpg5_6_7(struct s3c2410_spi_info *spi,
21 int enable) 21 int enable)
22{ 22{
23 if (enable) { 23 if (enable) {
24 s3c2410_gpio_cfgpin(S3C2410_GPG(7), S3C2410_GPG7_SPICLK1); 24 s3c_gpio_cfgpin(S3C2410_GPG(7), S3C2410_GPG7_SPICLK1);
25 s3c2410_gpio_cfgpin(S3C2410_GPG(6), S3C2410_GPG6_SPIMOSI1); 25 s3c_gpio_cfgpin(S3C2410_GPG(6), S3C2410_GPG6_SPIMOSI1);
26 s3c2410_gpio_cfgpin(S3C2410_GPG(5), S3C2410_GPG5_SPIMISO1); 26 s3c_gpio_cfgpin(S3C2410_GPG(5), S3C2410_GPG5_SPIMISO1);
27 s3c2410_gpio_pullup(S3C2410_GPG(5), 0); 27 s3c2410_gpio_pullup(S3C2410_GPG(5), 0);
28 s3c2410_gpio_pullup(S3C2410_GPG(6), 0); 28 s3c2410_gpio_pullup(S3C2410_GPG(6), 0);
29 } else { 29 } else {
30 s3c2410_gpio_cfgpin(S3C2410_GPG(7), S3C2410_GPIO_INPUT); 30 s3c_gpio_cfgpin(S3C2410_GPG(7), S3C2410_GPIO_INPUT);
31 s3c2410_gpio_cfgpin(S3C2410_GPG(5), S3C2410_GPIO_INPUT); 31 s3c_gpio_cfgpin(S3C2410_GPG(5), S3C2410_GPIO_INPUT);
32 s3c2410_gpio_pullup(S3C2410_GPG(5), 1); 32 s3c_gpio_cfgpull(S3C2410_GPG(5), S3C_GPIO_PULL_NONE);
33 s3c2410_gpio_pullup(S3C2410_GPG(6), 1); 33 s3c_gpio_cfgpull(S3C2410_GPG(6), S3C_GPIO_PULL_NONE);
34 s3c2410_gpio_pullup(S3C2410_GPG(7), 1); 34 s3c_gpio_cfgpull(S3C2410_GPG(7), S3C_GPIO_PULL_NONE);
35 } 35 }
36} 36}
diff --git a/arch/arm/plat-samsung/adc.c b/arch/arm/plat-samsung/adc.c
index 0b5833b9ac5b..210030d5cfe1 100644
--- a/arch/arm/plat-samsung/adc.c
+++ b/arch/arm/plat-samsung/adc.c
@@ -16,6 +16,7 @@
16#include <linux/platform_device.h> 16#include <linux/platform_device.h>
17#include <linux/sched.h> 17#include <linux/sched.h>
18#include <linux/list.h> 18#include <linux/list.h>
19#include <linux/slab.h>
19#include <linux/err.h> 20#include <linux/err.h>
20#include <linux/clk.h> 21#include <linux/clk.h>
21#include <linux/interrupt.h> 22#include <linux/interrupt.h>
diff --git a/arch/arm/plat-samsung/clock.c b/arch/arm/plat-samsung/clock.c
index 1b25c9d8c403..8bf79f3efdfb 100644
--- a/arch/arm/plat-samsung/clock.c
+++ b/arch/arm/plat-samsung/clock.c
@@ -376,6 +376,21 @@ void __init s3c_register_clocks(struct clk *clkp, int nr_clks)
376 } 376 }
377} 377}
378 378
379/**
380 * s3c_disable_clocks() - disable an array of clocks
381 * @clkp: Pointer to the first clock in the array.
382 * @nr_clks: Number of clocks to register.
383 *
384 * for internal use only at initialisation time. disable the clocks in the
385 * @clkp array.
386 */
387
388void __init s3c_disable_clocks(struct clk *clkp, int nr_clks)
389{
390 for (; nr_clks > 0; nr_clks--, clkp++)
391 (clkp->enable)(clkp, 0);
392}
393
379/* initalise all the clocks */ 394/* initalise all the clocks */
380 395
381int __init s3c24xx_register_baseclocks(unsigned long xtal) 396int __init s3c24xx_register_baseclocks(unsigned long xtal)
diff --git a/arch/arm/plat-samsung/dev-fb.c b/arch/arm/plat-samsung/dev-fb.c
index a90198fc4b0f..002a15f313f3 100644
--- a/arch/arm/plat-samsung/dev-fb.c
+++ b/arch/arm/plat-samsung/dev-fb.c
@@ -15,6 +15,7 @@
15#include <linux/string.h> 15#include <linux/string.h>
16#include <linux/platform_device.h> 16#include <linux/platform_device.h>
17#include <linux/fb.h> 17#include <linux/fb.h>
18#include <linux/gfp.h>
18 19
19#include <mach/irqs.h> 20#include <mach/irqs.h>
20#include <mach/map.h> 21#include <mach/map.h>
diff --git a/arch/arm/plat-samsung/dev-i2c0.c b/arch/arm/plat-samsung/dev-i2c0.c
index 4c761529b949..3a601c16f03c 100644
--- a/arch/arm/plat-samsung/dev-i2c0.c
+++ b/arch/arm/plat-samsung/dev-i2c0.c
@@ -11,6 +11,7 @@
11 * published by the Free Software Foundation. 11 * published by the Free Software Foundation.
12*/ 12*/
13 13
14#include <linux/gfp.h>
14#include <linux/kernel.h> 15#include <linux/kernel.h>
15#include <linux/string.h> 16#include <linux/string.h>
16#include <linux/platform_device.h> 17#include <linux/platform_device.h>
diff --git a/arch/arm/plat-samsung/dev-i2c1.c b/arch/arm/plat-samsung/dev-i2c1.c
index d44f79110506..858ee2a0414c 100644
--- a/arch/arm/plat-samsung/dev-i2c1.c
+++ b/arch/arm/plat-samsung/dev-i2c1.c
@@ -11,6 +11,7 @@
11 * published by the Free Software Foundation. 11 * published by the Free Software Foundation.
12*/ 12*/
13 13
14#include <linux/gfp.h>
14#include <linux/kernel.h> 15#include <linux/kernel.h>
15#include <linux/string.h> 16#include <linux/string.h>
16#include <linux/platform_device.h> 17#include <linux/platform_device.h>
diff --git a/arch/arm/plat-samsung/dev-nand.c b/arch/arm/plat-samsung/dev-nand.c
index a52fb6cf618f..3a7b8891ba4f 100644
--- a/arch/arm/plat-samsung/dev-nand.c
+++ b/arch/arm/plat-samsung/dev-nand.c
@@ -6,6 +6,7 @@
6 * published by the Free Software Foundation. 6 * published by the Free Software Foundation.
7*/ 7*/
8 8
9#include <linux/gfp.h>
9#include <linux/kernel.h> 10#include <linux/kernel.h>
10#include <linux/platform_device.h> 11#include <linux/platform_device.h>
11 12
diff --git a/arch/arm/plat-samsung/dev-usb.c b/arch/arm/plat-samsung/dev-usb.c
index 88165657fa53..0e0a3bf5c982 100644
--- a/arch/arm/plat-samsung/dev-usb.c
+++ b/arch/arm/plat-samsung/dev-usb.c
@@ -11,6 +11,7 @@
11 * published by the Free Software Foundation. 11 * published by the Free Software Foundation.
12*/ 12*/
13 13
14#include <linux/gfp.h>
14#include <linux/kernel.h> 15#include <linux/kernel.h>
15#include <linux/string.h> 16#include <linux/string.h>
16#include <linux/platform_device.h> 17#include <linux/platform_device.h>
diff --git a/arch/arm/plat-samsung/gpio-config.c b/arch/arm/plat-samsung/gpio-config.c
index 44a84e896546..3282db360fa8 100644
--- a/arch/arm/plat-samsung/gpio-config.c
+++ b/arch/arm/plat-samsung/gpio-config.c
@@ -1,7 +1,7 @@
1/* linux/arch/arm/plat-s3c/gpio-config.c 1/* linux/arch/arm/plat-s3c/gpio-config.c
2 * 2 *
3 * Copyright 2008 Openmoko, Inc. 3 * Copyright 2008 Openmoko, Inc.
4 * Copyright 2008 Simtec Electronics 4 * Copyright 2008-2010 Simtec Electronics
5 * Ben Dooks <ben@simtec.co.uk> 5 * Ben Dooks <ben@simtec.co.uk>
6 * http://armlinux.simtec.co.uk/ 6 * http://armlinux.simtec.co.uk/
7 * 7 *
@@ -41,6 +41,26 @@ int s3c_gpio_cfgpin(unsigned int pin, unsigned int config)
41} 41}
42EXPORT_SYMBOL(s3c_gpio_cfgpin); 42EXPORT_SYMBOL(s3c_gpio_cfgpin);
43 43
44unsigned s3c_gpio_getcfg(unsigned int pin)
45{
46 struct s3c_gpio_chip *chip = s3c_gpiolib_getchip(pin);
47 unsigned long flags;
48 unsigned ret = 0;
49 int offset;
50
51 if (chip) {
52 offset = pin - chip->chip.base;
53
54 local_irq_save(flags);
55 ret = s3c_gpio_do_getcfg(chip, offset);
56 local_irq_restore(flags);
57 }
58
59 return ret;
60}
61EXPORT_SYMBOL(s3c_gpio_getcfg);
62
63
44int s3c_gpio_setpull(unsigned int pin, s3c_gpio_pull_t pull) 64int s3c_gpio_setpull(unsigned int pin, s3c_gpio_pull_t pull)
45{ 65{
46 struct s3c_gpio_chip *chip = s3c_gpiolib_getchip(pin); 66 struct s3c_gpio_chip *chip = s3c_gpiolib_getchip(pin);
@@ -61,8 +81,8 @@ int s3c_gpio_setpull(unsigned int pin, s3c_gpio_pull_t pull)
61EXPORT_SYMBOL(s3c_gpio_setpull); 81EXPORT_SYMBOL(s3c_gpio_setpull);
62 82
63#ifdef CONFIG_S3C_GPIO_CFG_S3C24XX 83#ifdef CONFIG_S3C_GPIO_CFG_S3C24XX
64int s3c_gpio_setcfg_s3c24xx_banka(struct s3c_gpio_chip *chip, 84int s3c_gpio_setcfg_s3c24xx_a(struct s3c_gpio_chip *chip,
65 unsigned int off, unsigned int cfg) 85 unsigned int off, unsigned int cfg)
66{ 86{
67 void __iomem *reg = chip->base; 87 void __iomem *reg = chip->base;
68 unsigned int shift = off; 88 unsigned int shift = off;
@@ -87,6 +107,19 @@ int s3c_gpio_setcfg_s3c24xx_banka(struct s3c_gpio_chip *chip,
87 return 0; 107 return 0;
88} 108}
89 109
110unsigned s3c_gpio_getcfg_s3c24xx_a(struct s3c_gpio_chip *chip,
111 unsigned int off)
112{
113 u32 con;
114
115 con = __raw_readl(chip->base);
116 con >>= off;
117 con &= 1;
118 con++;
119
120 return S3C_GPIO_SFN(con);
121}
122
90int s3c_gpio_setcfg_s3c24xx(struct s3c_gpio_chip *chip, 123int s3c_gpio_setcfg_s3c24xx(struct s3c_gpio_chip *chip,
91 unsigned int off, unsigned int cfg) 124 unsigned int off, unsigned int cfg)
92{ 125{
@@ -109,6 +142,19 @@ int s3c_gpio_setcfg_s3c24xx(struct s3c_gpio_chip *chip,
109 142
110 return 0; 143 return 0;
111} 144}
145
146unsigned int s3c_gpio_getcfg_s3c24xx(struct s3c_gpio_chip *chip,
147 unsigned int off)
148{
149 u32 con;
150
151 con = __raw_readl(chip->base);
152 con >>= off * 2;
153 con &= 3;
154
155 /* this conversion works for IN and OUT as well as special mode */
156 return S3C_GPIO_SPECIAL(con);
157}
112#endif 158#endif
113 159
114#ifdef CONFIG_S3C_GPIO_CFG_S3C64XX 160#ifdef CONFIG_S3C_GPIO_CFG_S3C64XX
@@ -134,6 +180,25 @@ int s3c_gpio_setcfg_s3c64xx_4bit(struct s3c_gpio_chip *chip,
134 180
135 return 0; 181 return 0;
136} 182}
183
184unsigned s3c_gpio_getcfg_s3c64xx_4bit(struct s3c_gpio_chip *chip,
185 unsigned int off)
186{
187 void __iomem *reg = chip->base;
188 unsigned int shift = (off & 7) * 4;
189 u32 con;
190
191 if (off < 8 && chip->chip.ngpio > 8)
192 reg -= 4;
193
194 con = __raw_readl(reg);
195 con >>= shift;
196 con &= 0xf;
197
198 /* this conversion works for IN and OUT as well as special mode */
199 return S3C_GPIO_SPECIAL(con);
200}
201
137#endif /* CONFIG_S3C_GPIO_CFG_S3C64XX */ 202#endif /* CONFIG_S3C_GPIO_CFG_S3C64XX */
138 203
139#ifdef CONFIG_S3C_GPIO_PULL_UPDOWN 204#ifdef CONFIG_S3C_GPIO_PULL_UPDOWN
@@ -164,3 +229,35 @@ s3c_gpio_pull_t s3c_gpio_getpull_updown(struct s3c_gpio_chip *chip,
164 return (__force s3c_gpio_pull_t)pup; 229 return (__force s3c_gpio_pull_t)pup;
165} 230}
166#endif 231#endif
232
233#ifdef CONFIG_S3C_GPIO_PULL_UP
234int s3c_gpio_setpull_1up(struct s3c_gpio_chip *chip,
235 unsigned int off, s3c_gpio_pull_t pull)
236{
237 void __iomem *reg = chip->base + 0x08;
238 u32 pup = __raw_readl(reg);
239
240 pup = __raw_readl(reg);
241
242 if (pup == S3C_GPIO_PULL_UP)
243 pup &= ~(1 << off);
244 else if (pup == S3C_GPIO_PULL_NONE)
245 pup |= (1 << off);
246 else
247 return -EINVAL;
248
249 __raw_writel(pup, reg);
250 return 0;
251}
252
253s3c_gpio_pull_t s3c_gpio_getpull_1up(struct s3c_gpio_chip *chip,
254 unsigned int off)
255{
256 void __iomem *reg = chip->base + 0x08;
257 u32 pup = __raw_readl(reg);
258
259 pup &= (1 << off);
260 return pup ? S3C_GPIO_PULL_NONE : S3C_GPIO_PULL_UP;
261}
262#endif /* CONFIG_S3C_GPIO_PULL_UP */
263
diff --git a/arch/arm/plat-samsung/include/plat/clock.h b/arch/arm/plat-samsung/include/plat/clock.h
index 60b62692ac7a..12caf48a6bdc 100644
--- a/arch/arm/plat-samsung/include/plat/clock.h
+++ b/arch/arm/plat-samsung/include/plat/clock.h
@@ -91,6 +91,7 @@ extern int s3c24xx_register_clock(struct clk *clk);
91extern int s3c24xx_register_clocks(struct clk **clk, int nr_clks); 91extern int s3c24xx_register_clocks(struct clk **clk, int nr_clks);
92 92
93extern void s3c_register_clocks(struct clk *clk, int nr_clks); 93extern void s3c_register_clocks(struct clk *clk, int nr_clks);
94extern void s3c_disable_clocks(struct clk *clkp, int nr_clks);
94 95
95extern int s3c24xx_register_baseclocks(unsigned long xtal); 96extern int s3c24xx_register_baseclocks(unsigned long xtal);
96 97
diff --git a/arch/arm/plat-samsung/include/plat/cpu.h b/arch/arm/plat-samsung/include/plat/cpu.h
index d316b4a579f4..5dbeb7991e60 100644
--- a/arch/arm/plat-samsung/include/plat/cpu.h
+++ b/arch/arm/plat-samsung/include/plat/cpu.h
@@ -73,6 +73,7 @@ extern struct sys_timer s3c24xx_timer;
73extern struct sysdev_class s3c2410_sysclass; 73extern struct sysdev_class s3c2410_sysclass;
74extern struct sysdev_class s3c2410a_sysclass; 74extern struct sysdev_class s3c2410a_sysclass;
75extern struct sysdev_class s3c2412_sysclass; 75extern struct sysdev_class s3c2412_sysclass;
76extern struct sysdev_class s3c2416_sysclass;
76extern struct sysdev_class s3c2440_sysclass; 77extern struct sysdev_class s3c2440_sysclass;
77extern struct sysdev_class s3c2442_sysclass; 78extern struct sysdev_class s3c2442_sysclass;
78extern struct sysdev_class s3c2443_sysclass; 79extern struct sysdev_class s3c2443_sysclass;
diff --git a/arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h b/arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h
index dda19da037ad..3e21c75feefa 100644
--- a/arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h
+++ b/arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h
@@ -30,6 +30,12 @@ static inline int s3c_gpio_do_setcfg(struct s3c_gpio_chip *chip,
30 return (chip->config->set_config)(chip, off, config); 30 return (chip->config->set_config)(chip, off, config);
31} 31}
32 32
33static inline unsigned s3c_gpio_do_getcfg(struct s3c_gpio_chip *chip,
34 unsigned int off)
35{
36 return (chip->config->get_config)(chip, off);
37}
38
33static inline int s3c_gpio_do_setpull(struct s3c_gpio_chip *chip, 39static inline int s3c_gpio_do_setpull(struct s3c_gpio_chip *chip,
34 unsigned int off, s3c_gpio_pull_t pull) 40 unsigned int off, s3c_gpio_pull_t pull)
35{ 41{
@@ -53,6 +59,18 @@ extern int s3c_gpio_setcfg_s3c24xx(struct s3c_gpio_chip *chip,
53 unsigned int off, unsigned int cfg); 59 unsigned int off, unsigned int cfg);
54 60
55/** 61/**
62 * s3c_gpio_getcfg_s3c24xx - S3C24XX style GPIO configuration read.
63 * @chip: The gpio chip that is being configured.
64 * @off: The offset for the GPIO being configured.
65 *
66 * The reverse of s3c_gpio_setcfg_s3c24xx(). Will return a value whicg
67 * could be directly passed back to s3c_gpio_setcfg_s3c24xx(), from the
68 * S3C_GPIO_SPECIAL() macro.
69 */
70unsigned int s3c_gpio_getcfg_s3c24xx(struct s3c_gpio_chip *chip,
71 unsigned int off);
72
73/**
56 * s3c_gpio_setcfg_s3c24xx_a - S3C24XX style GPIO configuration (Bank A) 74 * s3c_gpio_setcfg_s3c24xx_a - S3C24XX style GPIO configuration (Bank A)
57 * @chip: The gpio chip that is being configured. 75 * @chip: The gpio chip that is being configured.
58 * @off: The offset for the GPIO being configured. 76 * @off: The offset for the GPIO being configured.
@@ -65,6 +83,21 @@ extern int s3c_gpio_setcfg_s3c24xx(struct s3c_gpio_chip *chip,
65extern int s3c_gpio_setcfg_s3c24xx_a(struct s3c_gpio_chip *chip, 83extern int s3c_gpio_setcfg_s3c24xx_a(struct s3c_gpio_chip *chip,
66 unsigned int off, unsigned int cfg); 84 unsigned int off, unsigned int cfg);
67 85
86
87/**
88 * s3c_gpio_getcfg_s3c24xx_a - S3C24XX style GPIO configuration read (Bank A)
89 * @chip: The gpio chip that is being configured.
90 * @off: The offset for the GPIO being configured.
91 *
92 * The reverse of s3c_gpio_setcfg_s3c24xx_a() turning an GPIO into a usable
93 * GPIO configuration value.
94 *
95 * @sa s3c_gpio_getcfg_s3c24xx
96 * @sa s3c_gpio_getcfg_s3c64xx_4bit
97 */
98extern unsigned s3c_gpio_getcfg_s3c24xx_a(struct s3c_gpio_chip *chip,
99 unsigned int off);
100
68/** 101/**
69 * s3c_gpio_setcfg_s3c64xx_4bit - S3C64XX 4bit single register GPIO config. 102 * s3c_gpio_setcfg_s3c64xx_4bit - S3C64XX 4bit single register GPIO config.
70 * @chip: The gpio chip that is being configured. 103 * @chip: The gpio chip that is being configured.
@@ -85,6 +118,20 @@ extern int s3c_gpio_setcfg_s3c64xx_4bit(struct s3c_gpio_chip *chip,
85 unsigned int off, unsigned int cfg); 118 unsigned int off, unsigned int cfg);
86 119
87 120
121/**
122 * s3c_gpio_getcfg_s3c64xx_4bit - S3C64XX 4bit single register GPIO config read.
123 * @chip: The gpio chip that is being configured.
124 * @off: The offset for the GPIO being configured.
125 *
126 * The reverse of s3c_gpio_setcfg_s3c64xx_4bit(), turning a gpio configuration
127 * register setting into a value the software can use, such as could be passed
128 * to s3c_gpio_setcfg_s3c64xx_4bit().
129 *
130 * @sa s3c_gpio_getcfg_s3c24xx
131 */
132extern unsigned s3c_gpio_getcfg_s3c64xx_4bit(struct s3c_gpio_chip *chip,
133 unsigned int off);
134
88/* Pull-{up,down} resistor controls. 135/* Pull-{up,down} resistor controls.
89 * 136 *
90 * S3C2410,S3C2440,S3C24A0 = Pull-UP, 137 * S3C2410,S3C2440,S3C24A0 = Pull-UP,
@@ -146,6 +193,17 @@ extern s3c_gpio_pull_t s3c_gpio_getpull_updown(struct s3c_gpio_chip *chip,
146 unsigned int off); 193 unsigned int off);
147 194
148/** 195/**
196 * s3c_gpio_getpull_1up() - Get configuration for choice of up or none
197 * @chip: The gpio chip that the GPIO pin belongs to
198 * @off: The offset to the pin to get the configuration of.
199 *
200 * This helper function reads the state of the pull-up resistor for the
201 * given GPIO in the same case as s3c_gpio_setpull_1up.
202*/
203extern s3c_gpio_pull_t s3c_gpio_getpull_1up(struct s3c_gpio_chip *chip,
204 unsigned int off);
205
206/**
149 * s3c_gpio_setpull_s3c2443() - Pull configuration for s3c2443. 207 * s3c_gpio_setpull_s3c2443() - Pull configuration for s3c2443.
150 * @chip: The gpio chip that is being configured. 208 * @chip: The gpio chip that is being configured.
151 * @off: The offset for the GPIO being configured. 209 * @off: The offset for the GPIO being configured.
diff --git a/arch/arm/plat-samsung/include/plat/gpio-cfg.h b/arch/arm/plat-samsung/include/plat/gpio-cfg.h
index 29cd6a86cade..8d01e853df39 100644
--- a/arch/arm/plat-samsung/include/plat/gpio-cfg.h
+++ b/arch/arm/plat-samsung/include/plat/gpio-cfg.h
@@ -77,6 +77,17 @@ struct s3c_gpio_cfg {
77 */ 77 */
78extern int s3c_gpio_cfgpin(unsigned int pin, unsigned int to); 78extern int s3c_gpio_cfgpin(unsigned int pin, unsigned int to);
79 79
80/**
81 * s3c_gpio_getcfg - Read the current function for a GPIO pin
82 * @pin: The pin to read the configuration value for.
83 *
84 * Read the configuration state of the given @pin, returning a value that
85 * could be passed back to s3c_gpio_cfgpin().
86 *
87 * @sa s3c_gpio_cfgpin
88 */
89extern unsigned s3c_gpio_getcfg(unsigned int pin);
90
80/* Define values for the pull-{up,down} available for each gpio pin. 91/* Define values for the pull-{up,down} available for each gpio pin.
81 * 92 *
82 * These values control the state of the weak pull-{up,down} resistors 93 * These values control the state of the weak pull-{up,down} resistors
diff --git a/arch/arm/plat-samsung/include/plat/gpio-core.h b/arch/arm/plat-samsung/include/plat/gpio-core.h
index 49ff406a7066..f0584f26d493 100644
--- a/arch/arm/plat-samsung/include/plat/gpio-core.h
+++ b/arch/arm/plat-samsung/include/plat/gpio-core.h
@@ -108,6 +108,9 @@ extern void samsung_gpiolib_add_4bit2_chips(struct s3c_gpio_chip *chip,
108extern void samsung_gpiolib_add_4bit(struct s3c_gpio_chip *chip); 108extern void samsung_gpiolib_add_4bit(struct s3c_gpio_chip *chip);
109extern void samsung_gpiolib_add_4bit2(struct s3c_gpio_chip *chip); 109extern void samsung_gpiolib_add_4bit2(struct s3c_gpio_chip *chip);
110 110
111/* exported for core SoC support to change */
112extern struct s3c_gpio_cfg s3c24xx_gpiocfg_default;
113
111#ifdef CONFIG_S3C_GPIO_TRACK 114#ifdef CONFIG_S3C_GPIO_TRACK
112extern struct s3c_gpio_chip *s3c_gpios[S3C_GPIO_END]; 115extern struct s3c_gpio_chip *s3c_gpios[S3C_GPIO_END];
113 116
diff --git a/arch/arm/plat-samsung/include/plat/pll6553x.h b/arch/arm/plat-samsung/include/plat/pll6553x.h
new file mode 100644
index 000000000000..b8b7e1d884f8
--- /dev/null
+++ b/arch/arm/plat-samsung/include/plat/pll6553x.h
@@ -0,0 +1,51 @@
1/* arch/arm/plat-samsung/include/plat/pll6553x.h
2 * partially from arch/arm/mach-s3c64xx/include/mach/pll.h
3 *
4 * Copyright 2008 Openmoko, Inc.
5 * Copyright 2008 Simtec Electronics
6 * Ben Dooks <ben@simtec.co.uk>
7 * http://armlinux.simtec.co.uk/
8 *
9 * Samsung PLL6553x PLL code
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/* S3C6400 and compatible (S3C2416, etc.) EPLL code */
17
18#define PLL6553X_MDIV_MASK ((1 << (23-16)) - 1)
19#define PLL6553X_PDIV_MASK ((1 << (13-8)) - 1)
20#define PLL6553X_SDIV_MASK ((1 << (2-0)) - 1)
21#define PLL6553X_MDIV_SHIFT (16)
22#define PLL6553X_PDIV_SHIFT (8)
23#define PLL6553X_SDIV_SHIFT (0)
24#define PLL6553X_KDIV_MASK (0xffff)
25
26static inline unsigned long s3c_get_pll6553x(unsigned long baseclk,
27 u32 pll0, u32 pll1)
28{
29 unsigned long result;
30 u32 mdiv, pdiv, sdiv, kdiv;
31 u64 tmp;
32
33 mdiv = (pll0 >> PLL6553X_MDIV_SHIFT) & PLL6553X_MDIV_MASK;
34 pdiv = (pll0 >> PLL6553X_PDIV_SHIFT) & PLL6553X_PDIV_MASK;
35 sdiv = (pll0 >> PLL6553X_SDIV_SHIFT) & PLL6553X_SDIV_MASK;
36 kdiv = pll1 & PLL6553X_KDIV_MASK;
37
38 /* We need to multiple baseclk by mdiv (the integer part) and kdiv
39 * which is in 2^16ths, so shift mdiv up (does not overflow) and
40 * add kdiv before multiplying. The use of tmp is to avoid any
41 * overflows before shifting bac down into result when multipling
42 * by the mdiv and kdiv pair.
43 */
44
45 tmp = baseclk;
46 tmp *= (mdiv << 16) + kdiv;
47 do_div(tmp, (pdiv << sdiv));
48 result = tmp >> 16;
49
50 return result;
51}
diff --git a/arch/arm/plat-samsung/pm-check.c b/arch/arm/plat-samsung/pm-check.c
index 0b5bb774192a..e4baf76f374a 100644
--- a/arch/arm/plat-samsung/pm-check.c
+++ b/arch/arm/plat-samsung/pm-check.c
@@ -17,6 +17,7 @@
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/crc32.h> 18#include <linux/crc32.h>
19#include <linux/ioport.h> 19#include <linux/ioport.h>
20#include <linux/slab.h>
20 21
21#include <plat/pm.h> 22#include <plat/pm.h>
22 23
diff --git a/arch/arm/plat-samsung/pwm.c b/arch/arm/plat-samsung/pwm.c
index f2d11390d01c..2eeb49fa056d 100644
--- a/arch/arm/plat-samsung/pwm.c
+++ b/arch/arm/plat-samsung/pwm.c
@@ -14,6 +14,7 @@
14#include <linux/module.h> 14#include <linux/module.h>
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/platform_device.h> 16#include <linux/platform_device.h>
17#include <linux/slab.h>
17#include <linux/err.h> 18#include <linux/err.h>
18#include <linux/clk.h> 19#include <linux/clk.h>
19#include <linux/io.h> 20#include <linux/io.h>
diff --git a/arch/arm/plat-stmp3xxx/dma.c b/arch/arm/plat-stmp3xxx/dma.c
index ef88f25fb870..b4dcf8c0477d 100644
--- a/arch/arm/plat-stmp3xxx/dma.c
+++ b/arch/arm/plat-stmp3xxx/dma.c
@@ -15,6 +15,7 @@
15 * http://www.opensource.org/licenses/gpl-license.html 15 * http://www.opensource.org/licenses/gpl-license.html
16 * http://www.gnu.org/copyleft/gpl.html 16 * http://www.gnu.org/copyleft/gpl.html
17 */ 17 */
18#include <linux/gfp.h>
18#include <linux/kernel.h> 19#include <linux/kernel.h>
19#include <linux/device.h> 20#include <linux/device.h>
20#include <linux/dmapool.h> 21#include <linux/dmapool.h>
diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types
index 31c2f4c30a95..8f10d24ae625 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 Feb 20 14:16:15 2010 15# Last update: Sat May 1 10:36:42 2010
16# 16#
17# machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number 17# machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number
18# 18#
@@ -2663,7 +2663,7 @@ reb01 MACH_REB01 REB01 2675
2663aquila MACH_AQUILA AQUILA 2676 2663aquila MACH_AQUILA AQUILA 2676
2664spark_sls_hw2 MACH_SPARK_SLS_HW2 SPARK_SLS_HW2 2677 2664spark_sls_hw2 MACH_SPARK_SLS_HW2 SPARK_SLS_HW2 2677
2665sheeva_esata MACH_ESATA_SHEEVAPLUG ESATA_SHEEVAPLUG 2678 2665sheeva_esata MACH_ESATA_SHEEVAPLUG ESATA_SHEEVAPLUG 2678
2666surf7x30 MACH_SURF7X30 SURF7X30 2679 2666msm7x30_surf MACH_MSM7X30_SURF MSM7X30_SURF 2679
2667micro2440 MACH_MICRO2440 MICRO2440 2680 2667micro2440 MACH_MICRO2440 MICRO2440 2680
2668am2440 MACH_AM2440 AM2440 2681 2668am2440 MACH_AM2440 AM2440 2681
2669tq2440 MACH_TQ2440 TQ2440 2682 2669tq2440 MACH_TQ2440 TQ2440 2682
@@ -2678,3 +2678,129 @@ vc088x MACH_VC088X VC088X 2690
2678mioa702 MACH_MIOA702 MIOA702 2691 2678mioa702 MACH_MIOA702 MIOA702 2691
2679hpmin MACH_HPMIN HPMIN 2692 2679hpmin MACH_HPMIN HPMIN 2692
2680ak880xak MACH_AK880XAK AK880XAK 2693 2680ak880xak MACH_AK880XAK AK880XAK 2693
2681arm926tomap850 MACH_ARM926TOMAP850 ARM926TOMAP850 2694
2682lkevm MACH_LKEVM LKEVM 2695
2683mw6410 MACH_MW6410 MW6410 2696
2684terastation_wxl MACH_TERASTATION_WXL TERASTATION_WXL 2697
2685cpu8000e MACH_CPU8000E CPU8000E 2698
2686catania MACH_CATANIA CATANIA 2699
2687tokyo MACH_TOKYO TOKYO 2700
2688msm7201a_surf MACH_MSM7201A_SURF MSM7201A_SURF 2701
2689msm7201a_ffa MACH_MSM7201A_FFA MSM7201A_FFA 2702
2690msm7x25_surf MACH_MSM7X25_SURF MSM7X25_SURF 2703
2691msm7x25_ffa MACH_MSM7X25_FFA MSM7X25_FFA 2704
2692msm7x27_surf MACH_MSM7X27_SURF MSM7X27_SURF 2705
2693msm7x27_ffa MACH_MSM7X27_FFA MSM7X27_FFA 2706
2694msm7x30_ffa MACH_MSM7X30_FFA MSM7X30_FFA 2707
2695qsd8x50_surf MACH_QSD8X50_SURF QSD8X50_SURF 2708
2696qsd8x50_comet MACH_QSD8X50_COMET QSD8X50_COMET 2709
2697qsd8x50_ffa MACH_QSD8X50_FFA QSD8X50_FFA 2710
2698qsd8x50a_surf MACH_QSD8X50A_SURF QSD8X50A_SURF 2711
2699qsd8x50a_ffa MACH_QSD8X50A_FFA QSD8X50A_FFA 2712
2700adx_xgcp10 MACH_ADX_XGCP10 ADX_XGCP10 2713
2701mcgwumts2a MACH_MCGWUMTS2A MCGWUMTS2A 2714
2702mobikt MACH_MOBIKT MOBIKT 2715
2703mx53_evk MACH_MX53_EVK MX53_EVK 2716
2704igep0030 MACH_IGEP0030 IGEP0030 2717
2705axell_h40_h50_ctrl MACH_AXELL_H40_H50_CTRL AXELL_H40_H50_CTRL 2718
2706dtcommod MACH_DTCOMMOD DTCOMMOD 2719
2707gould MACH_GOULD GOULD 2720
2708siberia MACH_SIBERIA SIBERIA 2721
2709sbc3530 MACH_SBC3530 SBC3530 2722
2710qarm MACH_QARM QARM 2723
2711mips MACH_MIPS MIPS 2724
2712mx27grb MACH_MX27GRB MX27GRB 2725
2713sbc8100 MACH_SBC8100 SBC8100 2726
2714saarb MACH_SAARB SAARB 2727
2715omap3mini MACH_OMAP3MINI OMAP3MINI 2728
2716cnmbook7se MACH_CNMBOOK7SE CNMBOOK7SE 2729
2717catan MACH_CATAN CATAN 2730
2718harmony MACH_HARMONY HARMONY 2731
2719tonga MACH_TONGA TONGA 2732
2720cybook_orizon MACH_CYBOOK_ORIZON CYBOOK_ORIZON 2733
2721htcrhodiumcdma MACH_HTCRHODIUMCDMA HTCRHODIUMCDMA 2734
2722epc_g45 MACH_EPC_G45 EPC_G45 2735
2723epc_lpc3250 MACH_EPC_LPC3250 EPC_LPC3250 2736
2724mxc91341evb MACH_MXC91341EVB MXC91341EVB 2737
2725rtw1000 MACH_RTW1000 RTW1000 2738
2726bobcat MACH_BOBCAT BOBCAT 2739
2727trizeps6 MACH_TRIZEPS6 TRIZEPS6 2740
2728msm7x30_fluid MACH_MSM7X30_FLUID MSM7X30_FLUID 2741
2729nedap9263 MACH_NEDAP9263 NEDAP9263 2742
2730netgear_ms2110 MACH_NETGEAR_MS2110 NETGEAR_MS2110 2743
2731bmx MACH_BMX BMX 2744
2732netstream MACH_NETSTREAM NETSTREAM 2745
2733vpnext_rcu MACH_VPNEXT_RCU VPNEXT_RCU 2746
2734vpnext_mpu MACH_VPNEXT_MPU VPNEXT_MPU 2747
2735bcmring_tablet_v1 MACH_BCMRING_TABLET_V1 BCMRING_TABLET_V1 2748
2736sgarm10 MACH_SGARM10 SGARM10 2749
2737cm_t3517 MACH_CM_T3517 CM_T3517 2750
2738omap3_cps MACH_OMAP3_CPS OMAP3_CPS 2751
2739axar1500_receiver MACH_AXAR1500_RECEIVER AXAR1500_RECEIVER 2752
2740wbd222 MACH_WBD222 WBD222 2753
2741mt65xx MACH_MT65XX MT65XX 2754
2742msm8x60_surf MACH_MSM8X60_SURF MSM8X60_SURF 2755
2743msm8x60_sim MACH_MSM8X60_SIM MSM8X60_SIM 2756
2744vmc300 MACH_VMC300 VMC300 2757
2745tcc8000_sdk MACH_TCC8000_SDK TCC8000_SDK 2758
2746nanos MACH_NANOS NANOS 2759
2747stamp9g10 MACH_STAMP9G10 STAMP9G10 2760
2748stamp9g45 MACH_STAMP9G45 STAMP9G45 2761
2749h6053 MACH_H6053 H6053 2762
2750smint01 MACH_SMINT01 SMINT01 2763
2751prtlvt2 MACH_PRTLVT2 PRTLVT2 2764
2752ap420 MACH_AP420 AP420 2765
2753htcshift MACH_HTCSHIFT HTCSHIFT 2766
2754davinci_dm365_fc MACH_DAVINCI_DM365_FC DAVINCI_DM365_FC 2767
2755msm8x55_surf MACH_MSM8X55_SURF MSM8X55_SURF 2768
2756msm8x55_ffa MACH_MSM8X55_FFA MSM8X55_FFA 2769
2757esl_vamana MACH_ESL_VAMANA ESL_VAMANA 2770
2758sbc35 MACH_SBC35 SBC35 2771
2759mpx6446 MACH_MPX6446 MPX6446 2772
2760oreo_controller MACH_OREO_CONTROLLER OREO_CONTROLLER 2773
2761kopin_models MACH_KOPIN_MODELS KOPIN_MODELS 2774
2762ttc_vision2 MACH_TTC_VISION2 TTC_VISION2 2775
2763cns3420vb MACH_CNS3420VB CNS3420VB 2776
2764lpc2 MACH_LPC2 LPC2 2777
2765olympus MACH_OLYMPUS OLYMPUS 2778
2766vortex MACH_VORTEX VORTEX 2779
2767s5pc200 MACH_S5PC200 S5PC200 2780
2768ecucore_9263 MACH_ECUCORE_9263 ECUCORE_9263 2781
2769smdkc200 MACH_SMDKC200 SMDKC200 2782
2770emsiso_sx27 MACH_EMSISO_SX27 EMSISO_SX27 2783
2771apx_som9g45_ek MACH_APX_SOM9G45_EK APX_SOM9G45_EK 2784
2772songshan MACH_SONGSHAN SONGSHAN 2785
2773tianshan MACH_TIANSHAN TIANSHAN 2786
2774vpx500 MACH_VPX500 VPX500 2787
2775am3517sam MACH_AM3517SAM AM3517SAM 2788
2776skat91_sim508 MACH_SKAT91_SIM508 SKAT91_SIM508 2789
2777skat91_s3e MACH_SKAT91_S3E SKAT91_S3E 2790
2778omap4_panda MACH_OMAP4_PANDA OMAP4_PANDA 2791
2779df7220 MACH_DF7220 DF7220 2792
2780nemini MACH_NEMINI NEMINI 2793
2781t8200 MACH_T8200 T8200 2794
2782apf51 MACH_APF51 APF51 2795
2783dr_rc_unit MACH_DR_RC_UNIT DR_RC_UNIT 2796
2784bordeaux MACH_BORDEAUX BORDEAUX 2797
2785catania_b MACH_CATANIA_B CATANIA_B 2798
2786mx51_ocean MACH_MX51_OCEAN MX51_OCEAN 2799
2787ti8168evm MACH_TI8168EVM TI8168EVM 2800
2788neocoreomap MACH_NEOCOREOMAP NEOCOREOMAP 2801
2789withings_wbp MACH_WITHINGS_WBP WITHINGS_WBP 2802
2790dbps MACH_DBPS DBPS 2803
2791sbc9261 MACH_SBC9261 SBC9261 2804
2792pcbfp0001 MACH_PCBFP0001 PCBFP0001 2805
2793speedy MACH_SPEEDY SPEEDY 2806
2794chrysaor MACH_CHRYSAOR CHRYSAOR 2807
2795tango MACH_TANGO TANGO 2808
2796synology_dsx11 MACH_SYNOLOGY_DSX11 SYNOLOGY_DSX11 2809
2797hanlin_v3ext MACH_HANLIN_V3EXT HANLIN_V3EXT 2810
2798hanlin_v5 MACH_HANLIN_V5 HANLIN_V5 2811
2799hanlin_v3plus MACH_HANLIN_V3PLUS HANLIN_V3PLUS 2812
2800iriver_story MACH_IRIVER_STORY IRIVER_STORY 2813
2801irex_iliad MACH_IREX_ILIAD IREX_ILIAD 2814
2802irex_dr1000 MACH_IREX_DR1000 IREX_DR1000 2815
2803teton_bga MACH_TETON_BGA TETON_BGA 2816
2804snapper9g45 MACH_SNAPPER9G45 SNAPPER9G45 2817
2805tam3517 MACH_TAM3517 TAM3517 2818
2806pdc100 MACH_PDC100 PDC100 2819
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c
index 7f3f59fcaa21..315a540c7ce5 100644
--- a/arch/arm/vfp/vfpmodule.c
+++ b/arch/arm/vfp/vfpmodule.c
@@ -428,26 +428,6 @@ static void vfp_pm_init(void)
428static inline void vfp_pm_init(void) { } 428static inline void vfp_pm_init(void) { }
429#endif /* CONFIG_PM */ 429#endif /* CONFIG_PM */
430 430
431/*
432 * Synchronise the hardware VFP state of a thread other than current with the
433 * saved one. This function is used by the ptrace mechanism.
434 */
435#ifdef CONFIG_SMP
436void vfp_sync_hwstate(struct thread_info *thread)
437{
438}
439
440void vfp_flush_hwstate(struct thread_info *thread)
441{
442 /*
443 * On SMP systems, the VFP state is automatically saved at every
444 * context switch. We mark the thread VFP state as belonging to a
445 * non-existent CPU so that the saved one will be reloaded when
446 * needed.
447 */
448 thread->vfpstate.hard.cpu = NR_CPUS;
449}
450#else
451void vfp_sync_hwstate(struct thread_info *thread) 431void vfp_sync_hwstate(struct thread_info *thread)
452{ 432{
453 unsigned int cpu = get_cpu(); 433 unsigned int cpu = get_cpu();
@@ -490,9 +470,18 @@ void vfp_flush_hwstate(struct thread_info *thread)
490 last_VFP_context[cpu] = NULL; 470 last_VFP_context[cpu] = NULL;
491 } 471 }
492 472
473#ifdef CONFIG_SMP
474 /*
475 * For SMP we still have to take care of the case where the thread
476 * migrates to another CPU and then back to the original CPU on which
477 * the last VFP user is still the same thread. Mark the thread VFP
478 * state as belonging to a non-existent CPU so that the saved one will
479 * be reloaded in the above case.
480 */
481 thread->vfpstate.hard.cpu = NR_CPUS;
482#endif
493 put_cpu(); 483 put_cpu();
494} 484}
495#endif
496 485
497#include <linux/smp.h> 486#include <linux/smp.h>
498 487
@@ -545,7 +534,7 @@ static int __init vfp_init(void)
545 */ 534 */
546 elf_hwcap |= HWCAP_VFP; 535 elf_hwcap |= HWCAP_VFP;
547#ifdef CONFIG_VFPv3 536#ifdef CONFIG_VFPv3
548 if (VFP_arch >= 3) { 537 if (VFP_arch >= 2) {
549 elf_hwcap |= HWCAP_VFPv3; 538 elf_hwcap |= HWCAP_VFPv3;
550 539
551 /* 540 /*