]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge git://git.marvell.com/orion into devel
authorRussell King <rmk@dyn-67.arm.linux.org.uk>
Wed, 25 Mar 2009 10:00:08 +0000 (10:00 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 25 Mar 2009 10:00:08 +0000 (10:00 +0000)
750 files changed:
Documentation/RCU/checklist.txt
Documentation/arm/memory.txt
Documentation/feature-removal-schedule.txt
Documentation/filesystems/squashfs.txt
Documentation/networking/ipv6.txt [new file with mode: 0644]
MAINTAINERS
arch/arm/Kconfig
arch/arm/Kconfig.debug
arch/arm/Makefile
arch/arm/boot/compressed/head.S
arch/arm/boot/compressed/misc.c
arch/arm/boot/compressed/vmlinux.lds.in
arch/arm/common/dmabounce.c
arch/arm/common/sharpsl_pm.c
arch/arm/configs/acs5k_defconfig [new file with mode: 0644]
arch/arm/configs/acs5k_tiny_defconfig [new file with mode: 0644]
arch/arm/configs/assabet_defconfig
arch/arm/configs/badge4_defconfig
arch/arm/configs/cerfcube_defconfig
arch/arm/configs/cm_x2xx_defconfig [moved from arch/arm/configs/xm_x2xx_defconfig with 83% similarity]
arch/arm/configs/colibri_pxa270_defconfig [moved from arch/arm/configs/colibri_defconfig with 76% similarity]
arch/arm/configs/colibri_pxa300_defconfig [new file with mode: 0644]
arch/arm/configs/collie_defconfig
arch/arm/configs/em_x270_defconfig [new file with mode: 0644]
arch/arm/configs/h3600_defconfig
arch/arm/configs/hackkit_defconfig
arch/arm/configs/jornada720_defconfig
arch/arm/configs/lart_defconfig
arch/arm/configs/magician_defconfig
arch/arm/configs/neponset_defconfig
arch/arm/configs/pleb_defconfig
arch/arm/configs/pxa168_defconfig [new file with mode: 0644]
arch/arm/configs/pxa910_defconfig [new file with mode: 0644]
arch/arm/configs/shannon_defconfig
arch/arm/configs/shark_defconfig
arch/arm/configs/simpad_defconfig
arch/arm/include/asm/cacheflush.h
arch/arm/include/asm/dma-mapping.h
arch/arm/include/asm/dma.h
arch/arm/include/asm/elf.h
arch/arm/include/asm/fixmap.h [new file with mode: 0644]
arch/arm/include/asm/highmem.h [new file with mode: 0644]
arch/arm/include/asm/hwcap.h
arch/arm/include/asm/kmap_types.h
arch/arm/include/asm/mach/dma.h
arch/arm/include/asm/mach/map.h
arch/arm/include/asm/memory.h
arch/arm/include/asm/module.h
arch/arm/include/asm/proc-fns.h
arch/arm/include/asm/ptrace.h
arch/arm/include/asm/sizes.h
arch/arm/include/asm/stacktrace.h [new file with mode: 0644]
arch/arm/include/asm/system.h
arch/arm/include/asm/thread_info.h
arch/arm/include/asm/traps.h
arch/arm/include/asm/unwind.h [new file with mode: 0644]
arch/arm/include/asm/user.h
arch/arm/kernel/Makefile
arch/arm/kernel/debug.S
arch/arm/kernel/dma-isa.c
arch/arm/kernel/dma.c
arch/arm/kernel/entry-armv.S
arch/arm/kernel/entry-common.S
arch/arm/kernel/module.c
arch/arm/kernel/process.c
arch/arm/kernel/ptrace.c
arch/arm/kernel/setup.c
arch/arm/kernel/smp.c
arch/arm/kernel/stacktrace.c
arch/arm/kernel/stacktrace.h [deleted file]
arch/arm/kernel/time.c
arch/arm/kernel/traps.c
arch/arm/kernel/unwind.c [new file with mode: 0644]
arch/arm/kernel/vmlinux.lds.S
arch/arm/mach-aaec2000/include/mach/system.h
arch/arm/mach-at91/at91sam9263_devices.c
arch/arm/mach-at91/board-sam9g20ek.c
arch/arm/mach-at91/generic.h
arch/arm/mach-at91/gpio.c
arch/arm/mach-at91/include/mach/board.h
arch/arm/mach-at91/include/mach/gpio.h
arch/arm/mach-at91/include/mach/system.h
arch/arm/mach-clps711x/include/mach/system.h
arch/arm/mach-davinci/include/mach/system.h
arch/arm/mach-ebsa110/include/mach/system.h
arch/arm/mach-ep93xx/Makefile
arch/arm/mach-ep93xx/clock.c
arch/arm/mach-ep93xx/dma-m2p.c [new file with mode: 0644]
arch/arm/mach-ep93xx/edb9307a.c
arch/arm/mach-ep93xx/include/mach/dma.h [new file with mode: 0644]
arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
arch/arm/mach-ep93xx/include/mach/system.h
arch/arm/mach-footbridge/dma.c
arch/arm/mach-footbridge/include/mach/system.h
arch/arm/mach-h720x/include/mach/system.h
arch/arm/mach-imx/include/mach/system.h
arch/arm/mach-integrator/include/mach/system.h
arch/arm/mach-iop13xx/include/mach/memory.h
arch/arm/mach-iop13xx/include/mach/system.h
arch/arm/mach-iop32x/include/mach/system.h
arch/arm/mach-iop33x/include/mach/system.h
arch/arm/mach-ixp2000/include/mach/system.h
arch/arm/mach-ixp23xx/include/mach/system.h
arch/arm/mach-ixp4xx/common-pci.c
arch/arm/mach-ixp4xx/include/mach/cpu.h
arch/arm/mach-ixp4xx/include/mach/ixp4xx-regs.h
arch/arm/mach-ixp4xx/include/mach/system.h
arch/arm/mach-ixp4xx/ixp4xx_npe.c
arch/arm/mach-kirkwood/include/mach/system.h
arch/arm/mach-ks8695/Kconfig
arch/arm/mach-ks8695/Makefile
arch/arm/mach-ks8695/board-acs5k.c [new file with mode: 0644]
arch/arm/mach-ks8695/include/mach/memory.h
arch/arm/mach-ks8695/include/mach/system.h
arch/arm/mach-l7200/include/mach/system.h
arch/arm/mach-lh7a40x/include/mach/system.h
arch/arm/mach-loki/include/mach/system.h
arch/arm/mach-mmp/Kconfig [new file with mode: 0644]
arch/arm/mach-mmp/Makefile [new file with mode: 0644]
arch/arm/mach-mmp/Makefile.boot [new file with mode: 0644]
arch/arm/mach-mmp/aspenite.c [new file with mode: 0644]
arch/arm/mach-mmp/clock.c [new file with mode: 0644]
arch/arm/mach-mmp/clock.h [new file with mode: 0644]
arch/arm/mach-mmp/common.c [new file with mode: 0644]
arch/arm/mach-mmp/common.h [new file with mode: 0644]
arch/arm/mach-mmp/devices.c [new file with mode: 0644]
arch/arm/mach-mmp/include/mach/addr-map.h [new file with mode: 0644]
arch/arm/mach-mmp/include/mach/clkdev.h [new file with mode: 0644]
arch/arm/mach-mmp/include/mach/cputype.h [new file with mode: 0644]
arch/arm/mach-mmp/include/mach/debug-macro.S [new file with mode: 0644]
arch/arm/mach-mmp/include/mach/devices.h [new file with mode: 0644]
arch/arm/mach-mmp/include/mach/dma.h [new file with mode: 0644]
arch/arm/mach-mmp/include/mach/entry-macro.S [new file with mode: 0644]
arch/arm/mach-mmp/include/mach/gpio.h [new file with mode: 0644]
arch/arm/mach-mmp/include/mach/hardware.h [new file with mode: 0644]
arch/arm/mach-mmp/include/mach/io.h [new file with mode: 0644]
arch/arm/mach-mmp/include/mach/irqs.h [new file with mode: 0644]
arch/arm/mach-mmp/include/mach/memory.h [new file with mode: 0644]
arch/arm/mach-mmp/include/mach/mfp-pxa168.h [new file with mode: 0644]
arch/arm/mach-mmp/include/mach/mfp-pxa910.h [new file with mode: 0644]
arch/arm/mach-mmp/include/mach/mfp.h [new file with mode: 0644]
arch/arm/mach-mmp/include/mach/pxa168.h [new file with mode: 0644]
arch/arm/mach-mmp/include/mach/pxa910.h [new file with mode: 0644]
arch/arm/mach-mmp/include/mach/regs-apbc.h [new file with mode: 0644]
arch/arm/mach-mmp/include/mach/regs-apmu.h [new file with mode: 0644]
arch/arm/mach-mmp/include/mach/regs-icu.h [new file with mode: 0644]
arch/arm/mach-mmp/include/mach/regs-timers.h [new file with mode: 0644]
arch/arm/mach-mmp/include/mach/system.h [new file with mode: 0644]
arch/arm/mach-mmp/include/mach/timex.h [new file with mode: 0644]
arch/arm/mach-mmp/include/mach/uncompress.h [new file with mode: 0644]
arch/arm/mach-mmp/include/mach/vmalloc.h [new file with mode: 0644]
arch/arm/mach-mmp/irq.c [new file with mode: 0644]
arch/arm/mach-mmp/pxa168.c [new file with mode: 0644]
arch/arm/mach-mmp/pxa910.c [new file with mode: 0644]
arch/arm/mach-mmp/tavorevb.c [new file with mode: 0644]
arch/arm/mach-mmp/time.c [new file with mode: 0644]
arch/arm/mach-mmp/ttc_dkb.c [new file with mode: 0644]
arch/arm/mach-msm/include/mach/system.h
arch/arm/mach-mv78xx0/include/mach/system.h
arch/arm/mach-mx1/Kconfig
arch/arm/mach-mx1/Makefile
arch/arm/mach-mx1/clock.c
arch/arm/mach-mx1/devices.c
arch/arm/mach-mx1/mx1ads.c
arch/arm/mach-mx1/scb9328.c [new file with mode: 0644]
arch/arm/mach-mx2/Kconfig
arch/arm/mach-mx2/Makefile
arch/arm/mach-mx2/Makefile.boot
arch/arm/mach-mx2/clock_imx21.c [new file with mode: 0644]
arch/arm/mach-mx2/clock_imx27.c
arch/arm/mach-mx2/cpu_imx27.c
arch/arm/mach-mx2/crm_regs.h
arch/arm/mach-mx2/devices.c
arch/arm/mach-mx2/devices.h
arch/arm/mach-mx2/generic.c
arch/arm/mach-mx2/mx27ads.c
arch/arm/mach-mx2/pcm038.c
arch/arm/mach-mx2/pcm970-baseboard.c
arch/arm/mach-mx2/serial.c
arch/arm/mach-mx2/system.c
arch/arm/mach-mx3/Kconfig
arch/arm/mach-mx3/Makefile
arch/arm/mach-mx3/clock-imx35.c [new file with mode: 0644]
arch/arm/mach-mx3/clock.c
arch/arm/mach-mx3/crm_regs.h
arch/arm/mach-mx3/devices.c
arch/arm/mach-mx3/devices.h
arch/arm/mach-mx3/iomux.c
arch/arm/mach-mx3/mm.c
arch/arm/mach-mx3/mx31ads.c
arch/arm/mach-mx3/mx31lite.c
arch/arm/mach-mx3/mx31moboard-devboard.c [new file with mode: 0644]
arch/arm/mach-mx3/mx31moboard-marxbot.c [new file with mode: 0644]
arch/arm/mach-mx3/mx31moboard.c
arch/arm/mach-mx3/mx31pdk.c
arch/arm/mach-mx3/pcm037.c
arch/arm/mach-mx3/qong.c [new file with mode: 0644]
arch/arm/mach-netx/include/mach/system.h
arch/arm/mach-ns9xxx/include/mach/system.h
arch/arm/mach-omap1/clock.c
arch/arm/mach-omap1/clock.h
arch/arm/mach-omap1/mcbsp.c
arch/arm/mach-omap2/Makefile
arch/arm/mach-omap2/board-2430sdp.c
arch/arm/mach-omap2/board-apollon.c
arch/arm/mach-omap2/board-generic.c
arch/arm/mach-omap2/board-h4.c
arch/arm/mach-omap2/board-ldp.c
arch/arm/mach-omap2/board-omap3beagle.c
arch/arm/mach-omap2/clock.c
arch/arm/mach-omap2/clock.h
arch/arm/mach-omap2/clock24xx.c
arch/arm/mach-omap2/clock24xx.h
arch/arm/mach-omap2/clock34xx.c
arch/arm/mach-omap2/clock34xx.h
arch/arm/mach-omap2/clockdomain.c
arch/arm/mach-omap2/clockdomains.h
arch/arm/mach-omap2/cm-regbits-24xx.h
arch/arm/mach-omap2/cm-regbits-34xx.h
arch/arm/mach-omap2/devices.c
arch/arm/mach-omap2/id.c
arch/arm/mach-omap2/io.c
arch/arm/mach-omap2/mcbsp.c
arch/arm/mach-omap2/memory.h [deleted file]
arch/arm/mach-omap2/pm.c
arch/arm/mach-omap2/powerdomains.h
arch/arm/mach-omap2/powerdomains34xx.h
arch/arm/mach-omap2/prcm-common.h
arch/arm/mach-omap2/prm-regbits-34xx.h
arch/arm/mach-omap2/prm.h
arch/arm/mach-omap2/sdrc.c [new file with mode: 0644]
arch/arm/mach-omap2/sdrc2xxx.c [moved from arch/arm/mach-omap2/memory.c with 67% similarity]
arch/arm/mach-orion5x/include/mach/system.h
arch/arm/mach-orion5x/lsmini-setup.c
arch/arm/mach-pnx4008/include/mach/system.h
arch/arm/mach-pxa/Kconfig
arch/arm/mach-pxa/Makefile
arch/arm/mach-pxa/am200epd.c
arch/arm/mach-pxa/am300epd.c [new file with mode: 0644]
arch/arm/mach-pxa/clock.c
arch/arm/mach-pxa/clock.h
arch/arm/mach-pxa/cm-x255.c
arch/arm/mach-pxa/cm-x270.c
arch/arm/mach-pxa/cm-x2xx-pci.c
arch/arm/mach-pxa/cm-x2xx.c
arch/arm/mach-pxa/cm-x300.c
arch/arm/mach-pxa/colibri-pxa270.c [moved from arch/arm/mach-pxa/colibri.c with 67% similarity]
arch/arm/mach-pxa/colibri-pxa300.c [new file with mode: 0644]
arch/arm/mach-pxa/colibri-pxa320.c [new file with mode: 0644]
arch/arm/mach-pxa/colibri-pxa3xx.c [new file with mode: 0644]
arch/arm/mach-pxa/corgi.c
arch/arm/mach-pxa/corgi_lcd.c
arch/arm/mach-pxa/corgi_pm.c
arch/arm/mach-pxa/corgi_ssp.c
arch/arm/mach-pxa/cpufreq-pxa2xx.c
arch/arm/mach-pxa/cpufreq-pxa3xx.c
arch/arm/mach-pxa/csb701.c [new file with mode: 0644]
arch/arm/mach-pxa/csb726.c [new file with mode: 0644]
arch/arm/mach-pxa/devices.c
arch/arm/mach-pxa/e330.c
arch/arm/mach-pxa/e350.c
arch/arm/mach-pxa/e400.c
arch/arm/mach-pxa/e740.c
arch/arm/mach-pxa/e750.c
arch/arm/mach-pxa/e800.c
arch/arm/mach-pxa/em-x270.c
arch/arm/mach-pxa/eseries.c
arch/arm/mach-pxa/ezx.c
arch/arm/mach-pxa/generic.c
arch/arm/mach-pxa/generic.h
arch/arm/mach-pxa/gpio.c [deleted file]
arch/arm/mach-pxa/gumstix.c
arch/arm/mach-pxa/h5000.c
arch/arm/mach-pxa/himalaya.c [new file with mode: 0644]
arch/arm/mach-pxa/idp.c
arch/arm/mach-pxa/imote2.c
arch/arm/mach-pxa/include/mach/colibri.h
arch/arm/mach-pxa/include/mach/csb726.h [new file with mode: 0644]
arch/arm/mach-pxa/include/mach/dma.h
arch/arm/mach-pxa/include/mach/gpio.h
arch/arm/mach-pxa/include/mach/gumstix.h
arch/arm/mach-pxa/include/mach/lubbock.h
arch/arm/mach-pxa/include/mach/magician.h
arch/arm/mach-pxa/include/mach/mfp-pxa25x.h
arch/arm/mach-pxa/include/mach/mfp-pxa27x.h
arch/arm/mach-pxa/include/mach/mfp-pxa2xx.h
arch/arm/mach-pxa/include/mach/mfp-pxa300.h
arch/arm/mach-pxa/include/mach/mfp-pxa320.h
arch/arm/mach-pxa/include/mach/mfp-pxa3xx.h
arch/arm/mach-pxa/include/mach/mfp-pxa930.h
arch/arm/mach-pxa/include/mach/mtd-xip.h
arch/arm/mach-pxa/include/mach/palmld.h [new file with mode: 0644]
arch/arm/mach-pxa/include/mach/palmt5.h [new file with mode: 0644]
arch/arm/mach-pxa/include/mach/pm.h
arch/arm/mach-pxa/include/mach/pxa-regs.h [deleted file]
arch/arm/mach-pxa/include/mach/pxa25x.h [new file with mode: 0644]
arch/arm/mach-pxa/include/mach/pxa27x.h [new file with mode: 0644]
arch/arm/mach-pxa/include/mach/pxa2xx-gpio.h
arch/arm/mach-pxa/include/mach/pxa2xx-regs.h
arch/arm/mach-pxa/include/mach/pxa300.h [new file with mode: 0644]
arch/arm/mach-pxa/include/mach/pxa320.h [new file with mode: 0644]
arch/arm/mach-pxa/include/mach/pxa3xx-regs.h
arch/arm/mach-pxa/include/mach/pxa930.h [new file with mode: 0644]
arch/arm/mach-pxa/include/mach/regs-intc.h [new file with mode: 0644]
arch/arm/mach-pxa/include/mach/regs-ost.h [new file with mode: 0644]
arch/arm/mach-pxa/include/mach/regs-rtc.h [new file with mode: 0644]
arch/arm/mach-pxa/include/mach/regs-ssp.h
arch/arm/mach-pxa/include/mach/system.h
arch/arm/mach-pxa/include/mach/uncompress.h
arch/arm/mach-pxa/irq.c
arch/arm/mach-pxa/leds-idp.c
arch/arm/mach-pxa/leds-lubbock.c
arch/arm/mach-pxa/leds-mainstone.c
arch/arm/mach-pxa/littleton.c
arch/arm/mach-pxa/lpd270.c
arch/arm/mach-pxa/lubbock.c
arch/arm/mach-pxa/magician.c
arch/arm/mach-pxa/mainstone.c
arch/arm/mach-pxa/mfp-pxa2xx.c
arch/arm/mach-pxa/mfp-pxa3xx.c
arch/arm/mach-pxa/mioa701.c
arch/arm/mach-pxa/mp900.c
arch/arm/mach-pxa/palmld.c [new file with mode: 0644]
arch/arm/mach-pxa/palmt5.c [new file with mode: 0644]
arch/arm/mach-pxa/palmtx.c
arch/arm/mach-pxa/palmz72.c
arch/arm/mach-pxa/pcm027.c
arch/arm/mach-pxa/pcm990-baseboard.c
arch/arm/mach-pxa/pm.c
arch/arm/mach-pxa/poodle.c
arch/arm/mach-pxa/pwm.c
arch/arm/mach-pxa/pxa25x.c
arch/arm/mach-pxa/pxa27x.c
arch/arm/mach-pxa/pxa2xx.c
arch/arm/mach-pxa/pxa300.c
arch/arm/mach-pxa/pxa320.c
arch/arm/mach-pxa/pxa3xx.c
arch/arm/mach-pxa/pxa930.c
arch/arm/mach-pxa/reset.c
arch/arm/mach-pxa/saar.c
arch/arm/mach-pxa/sharpsl_pm.c
arch/arm/mach-pxa/sleep.S
arch/arm/mach-pxa/spitz.c
arch/arm/mach-pxa/spitz_pm.c
arch/arm/mach-pxa/ssp.c
arch/arm/mach-pxa/standby.S
arch/arm/mach-pxa/tavorevb.c
arch/arm/mach-pxa/time.c
arch/arm/mach-pxa/tosa.c
arch/arm/mach-pxa/trizeps4.c
arch/arm/mach-pxa/viper.c
arch/arm/mach-pxa/zylonite_pxa300.c
arch/arm/mach-pxa/zylonite_pxa320.c
arch/arm/mach-realview/Kconfig
arch/arm/mach-realview/core.c
arch/arm/mach-realview/core.h
arch/arm/mach-realview/include/mach/board-pba8.h
arch/arm/mach-realview/include/mach/platform.h
arch/arm/mach-realview/include/mach/system.h
arch/arm/mach-realview/realview_eb.c
arch/arm/mach-realview/realview_pb1176.c
arch/arm/mach-realview/realview_pb11mp.c
arch/arm/mach-realview/realview_pba8.c
arch/arm/mach-rpc/dma.c
arch/arm/mach-rpc/include/mach/isa-dma.h
arch/arm/mach-rpc/include/mach/system.h
arch/arm/mach-s3c2410/include/mach/system-reset.h
arch/arm/mach-s3c6400/include/mach/system.h
arch/arm/mach-sa1100/Kconfig
arch/arm/mach-sa1100/h3600.c
arch/arm/mach-sa1100/include/mach/h3600.h
arch/arm/mach-sa1100/include/mach/h3600_gpio.h
arch/arm/mach-sa1100/include/mach/irqs.h
arch/arm/mach-sa1100/include/mach/system.h
arch/arm/mach-sa1100/jornada720.c
arch/arm/mach-shark/core.c
arch/arm/mach-shark/dma.c
arch/arm/mach-shark/include/mach/debug-macro.S
arch/arm/mach-shark/include/mach/framebuffer.h [new file with mode: 0644]
arch/arm/mach-shark/include/mach/hardware.h
arch/arm/mach-shark/include/mach/io.h
arch/arm/mach-shark/include/mach/irqs.h
arch/arm/mach-shark/include/mach/isa-dma.h
arch/arm/mach-shark/include/mach/memory.h
arch/arm/mach-shark/include/mach/system.h
arch/arm/mach-shark/include/mach/uncompress.h
arch/arm/mach-shark/leds.c
arch/arm/mach-versatile/core.c
arch/arm/mach-versatile/include/mach/system.h
arch/arm/mach-w90x900/cpu.h
arch/arm/mach-w90x900/include/mach/system.h
arch/arm/mach-w90x900/mach-w90p910evb.c
arch/arm/mach-w90x900/w90p910.c
arch/arm/mm/Kconfig
arch/arm/mm/Makefile
arch/arm/mm/cache-feroceon-l2.c
arch/arm/mm/cache-xsc3l2.c
arch/arm/mm/dma-mapping.c
arch/arm/mm/flush.c
arch/arm/mm/highmem.c [new file with mode: 0644]
arch/arm/mm/init.c
arch/arm/mm/mm.h
arch/arm/mm/mmap.c
arch/arm/mm/mmu.c
arch/arm/mm/proc-mohawk.S [new file with mode: 0644]
arch/arm/oprofile/backtrace.c
arch/arm/plat-mxc/Kconfig
arch/arm/plat-mxc/Makefile
arch/arm/plat-mxc/clock.c
arch/arm/plat-mxc/cpu.c [new file with mode: 0644]
arch/arm/plat-mxc/devices.c
arch/arm/plat-mxc/dma-mx1-mx2.c
arch/arm/plat-mxc/gpio.c
arch/arm/plat-mxc/include/mach/board-mx27ads.h
arch/arm/plat-mxc/include/mach/board-mx31ads.h
arch/arm/plat-mxc/include/mach/board-mx31moboard.h [new file with mode: 0644]
arch/arm/plat-mxc/include/mach/board-qong.h [new file with mode: 0644]
arch/arm/plat-mxc/include/mach/clkdev.h [new file with mode: 0644]
arch/arm/plat-mxc/include/mach/clock.h
arch/arm/plat-mxc/include/mach/common.h
arch/arm/plat-mxc/include/mach/debug-macro.S
arch/arm/plat-mxc/include/mach/hardware.h
arch/arm/plat-mxc/include/mach/imxfb.h [moved from arch/arm/mach-imx/include/mach/imxfb.h with 96% similarity]
arch/arm/plat-mxc/include/mach/iomux-mx1-mx2.h [deleted file]
arch/arm/plat-mxc/include/mach/iomux-mx1.h [new file with mode: 0644]
arch/arm/plat-mxc/include/mach/iomux-mx21.h [new file with mode: 0644]
arch/arm/plat-mxc/include/mach/iomux-mx27.h [new file with mode: 0644]
arch/arm/plat-mxc/include/mach/iomux-mx2x.h [new file with mode: 0644]
arch/arm/plat-mxc/include/mach/iomux-mx3.h
arch/arm/plat-mxc/include/mach/iomux.h [new file with mode: 0644]
arch/arm/plat-mxc/include/mach/memory.h
arch/arm/plat-mxc/include/mach/mx21.h [new file with mode: 0644]
arch/arm/plat-mxc/include/mach/mx27.h
arch/arm/plat-mxc/include/mach/mx2x.h [new file with mode: 0644]
arch/arm/plat-mxc/include/mach/mx31.h
arch/arm/plat-mxc/include/mach/mx35.h [new file with mode: 0644]
arch/arm/plat-mxc/include/mach/mx3fb.h
arch/arm/plat-mxc/include/mach/mx3x.h [new file with mode: 0644]
arch/arm/plat-mxc/include/mach/mxc.h
arch/arm/plat-mxc/include/mach/system.h
arch/arm/plat-mxc/iomux-mx1-mx2.c
arch/arm/plat-mxc/pwm.c [new file with mode: 0644]
arch/arm/plat-mxc/time.c
arch/arm/plat-omap/Kconfig
arch/arm/plat-omap/clock.c
arch/arm/plat-omap/common.c
arch/arm/plat-omap/cpu-omap.c
arch/arm/plat-omap/include/mach/clkdev.h [new file with mode: 0644]
arch/arm/plat-omap/include/mach/clock.h
arch/arm/plat-omap/include/mach/clockdomain.h
arch/arm/plat-omap/include/mach/common.h
arch/arm/plat-omap/include/mach/cpu.h
arch/arm/plat-omap/include/mach/gpmc.h
arch/arm/plat-omap/include/mach/io.h
arch/arm/plat-omap/include/mach/mcbsp.h
arch/arm/plat-omap/include/mach/memory.h
arch/arm/plat-omap/include/mach/pm.h
arch/arm/plat-omap/include/mach/powerdomain.h
arch/arm/plat-omap/include/mach/prcm.h
arch/arm/plat-omap/include/mach/sdrc.h
arch/arm/plat-omap/include/mach/system.h
arch/arm/plat-omap/mcbsp.c
arch/arm/plat-pxa/Kconfig [new file with mode: 0644]
arch/arm/plat-pxa/Makefile [new file with mode: 0644]
arch/arm/plat-pxa/dma.c [moved from arch/arm/mach-pxa/dma.c with 93% similarity]
arch/arm/plat-pxa/gpio.c [new file with mode: 0644]
arch/arm/plat-pxa/include/plat/dma.h [new file with mode: 0644]
arch/arm/plat-pxa/include/plat/gpio.h [new file with mode: 0644]
arch/arm/plat-pxa/include/plat/mfp.h [new file with mode: 0644]
arch/arm/plat-pxa/mfp.c [new file with mode: 0644]
arch/arm/plat-s3c/include/plat/uncompress.h
arch/arm/plat-s3c24xx/cpu.c
arch/arm/vfp/vfp.h
arch/arm/vfp/vfphw.S
arch/arm/vfp/vfpmodule.c
arch/blackfin/Kconfig
arch/blackfin/Kconfig.debug
arch/blackfin/configs/BF518F-EZBRD_defconfig
arch/blackfin/configs/BF527-EZKIT_defconfig
arch/blackfin/configs/BF533-EZKIT_defconfig
arch/blackfin/configs/BF533-STAMP_defconfig
arch/blackfin/configs/BF537-STAMP_defconfig
arch/blackfin/configs/BF538-EZKIT_defconfig
arch/blackfin/configs/BF548-EZKIT_defconfig
arch/blackfin/configs/BF561-EZKIT_defconfig
arch/blackfin/configs/BlackStamp_defconfig
arch/blackfin/configs/CM-BF527_defconfig
arch/blackfin/configs/CM-BF548_defconfig
arch/blackfin/configs/IP0X_defconfig
arch/blackfin/configs/SRV1_defconfig
arch/blackfin/include/asm/Kbuild
arch/blackfin/include/asm/bfin_sport.h
arch/blackfin/include/asm/ipipe.h
arch/blackfin/include/asm/ipipe_base.h
arch/blackfin/include/asm/irq.h
arch/blackfin/include/asm/thread_info.h
arch/blackfin/kernel/Makefile
arch/blackfin/kernel/cplb-nompu/cplbinit.c
arch/blackfin/kernel/ipipe.c
arch/blackfin/kernel/irqchip.c
arch/blackfin/kernel/kgdb_test.c
arch/blackfin/kernel/ptrace.c
arch/blackfin/kernel/setup.c
arch/blackfin/kernel/time.c
arch/blackfin/mach-bf518/boards/ezbrd.c
arch/blackfin/mach-bf518/include/mach/anomaly.h
arch/blackfin/mach-bf518/include/mach/bfin_serial_5xx.h
arch/blackfin/mach-bf527/boards/cm_bf527.c
arch/blackfin/mach-bf527/boards/ezbrd.c
arch/blackfin/mach-bf527/include/mach/anomaly.h
arch/blackfin/mach-bf527/include/mach/bfin_serial_5xx.h
arch/blackfin/mach-bf533/boards/Kconfig
arch/blackfin/mach-bf533/boards/Makefile
arch/blackfin/mach-bf533/boards/blackstamp.c
arch/blackfin/mach-bf533/boards/cm_bf533.c
arch/blackfin/mach-bf533/boards/generic_board.c [deleted file]
arch/blackfin/mach-bf533/boards/ip0x.c
arch/blackfin/mach-bf533/include/mach/anomaly.h
arch/blackfin/mach-bf533/include/mach/bfin_serial_5xx.h
arch/blackfin/mach-bf537/boards/Kconfig
arch/blackfin/mach-bf537/boards/Makefile
arch/blackfin/mach-bf537/boards/cm_bf537.c
arch/blackfin/mach-bf537/boards/generic_board.c [deleted file]
arch/blackfin/mach-bf537/boards/minotaur.c
arch/blackfin/mach-bf537/boards/pnav10.c
arch/blackfin/mach-bf537/boards/tcm_bf537.c
arch/blackfin/mach-bf537/include/mach/anomaly.h
arch/blackfin/mach-bf537/include/mach/bfin_serial_5xx.h
arch/blackfin/mach-bf538/include/mach/anomaly.h
arch/blackfin/mach-bf538/include/mach/bfin_serial_5xx.h
arch/blackfin/mach-bf548/include/mach/anomaly.h
arch/blackfin/mach-bf548/include/mach/bfin_serial_5xx.h
arch/blackfin/mach-bf548/include/mach/irq.h
arch/blackfin/mach-bf561/boards/Kconfig
arch/blackfin/mach-bf561/boards/Makefile
arch/blackfin/mach-bf561/boards/cm_bf561.c
arch/blackfin/mach-bf561/boards/generic_board.c [deleted file]
arch/blackfin/mach-bf561/include/mach/anomaly.h
arch/blackfin/mach-bf561/include/mach/bfin_serial_5xx.h
arch/blackfin/mach-common/arch_checks.c
arch/blackfin/mach-common/cache.S
arch/blackfin/mach-common/clocks-init.c
arch/blackfin/mach-common/dpmc_modes.S
arch/blackfin/mach-common/entry.S
arch/blackfin/mach-common/interrupt.S
arch/blackfin/mach-common/ints-priority.c
arch/blackfin/mach-common/smp.c
arch/blackfin/mm/init.c
arch/ia64/sn/pci/pcibr/pcibr_dma.c
arch/m68knommu/platform/5206e/config.c
arch/m68knommu/platform/528x/config.c
arch/mips/include/asm/compat.h
arch/sh/boards/board-ap325rxa.c
arch/x86/include/asm/efi.h
arch/x86/include/asm/fixmap_64.h
arch/x86/include/asm/i387.h
arch/x86/kernel/cpu/cpufreq/p4-clockmod.c
arch/x86/kernel/ds.c
arch/x86/kernel/efi.c
arch/x86/kernel/efi_64.c
arch/x86/kernel/i387.c
arch/x86/kernel/reboot.c
arch/x86/kernel/setup.c
arch/x86/lguest/boot.c
arch/x86/math-emu/fpu_aux.c
arch/x86/mm/kmmio.c
arch/xtensa/Kconfig
arch/xtensa/kernel/setup.c
arch/xtensa/kernel/traps.c
arch/xtensa/mm/fault.c
arch/xtensa/platforms/iss/console.c
block/blk-merge.c
drivers/ata/ahci.c
drivers/ata/libata-core.c
drivers/ata/libata-eh.c
drivers/ata/pata_icside.c
drivers/ata/sata_nv.c
drivers/base/node.c
drivers/block/aoe/aoedev.c
drivers/block/cciss.c
drivers/block/loop.c
drivers/block/xen-blkfront.c
drivers/char/agp/amd64-agp.c
drivers/char/agp/intel-agp.c
drivers/char/hw_random/omap-rng.c
drivers/cpufreq/cpufreq.c
drivers/dca/dca-core.c
drivers/dma/dmatest.c
drivers/dma/fsldma.c
drivers/dma/ioat.c
drivers/dma/ioat_dca.c
drivers/dma/ioat_dma.c
drivers/dma/ioatdma.h
drivers/dma/ioatdma_hw.h
drivers/dma/ioatdma_registers.h
drivers/dma/iop-adma.c
drivers/dma/ipu/ipu_idmac.c
drivers/dma/mv_xor.c
drivers/hwmon/lm85.c
drivers/i2c/busses/i2c-omap.c
drivers/i2c/busses/i2c-versatile.c
drivers/ide/Kconfig
drivers/ide/Makefile
drivers/ide/at91_ide.c [new file with mode: 0644]
drivers/ide/ide-disk_proc.c
drivers/ide/ide-floppy_proc.c
drivers/ide/ide-io.c
drivers/ide/ide-iops.c
drivers/ide/ide-probe.c
drivers/ide/ide-proc.c
drivers/ide/ide-tape.c
drivers/input/keyboard/corgikbd.c
drivers/input/keyboard/spitzkbd.c
drivers/input/touchscreen/corgi_ts.c
drivers/lguest/lguest_device.c
drivers/md/md.c
drivers/media/video/omap24xxcam.c
drivers/media/video/pxa_camera.c
drivers/mmc/core/mmc_ops.c
drivers/mmc/host/mmci.c
drivers/mmc/host/mxcmmc.c
drivers/mmc/host/omap.c
drivers/mmc/host/omap_hsmmc.c
drivers/mmc/host/pxamci.c
drivers/mtd/devices/mtd_dataflash.c
drivers/mtd/maps/physmap.c
drivers/mtd/nand/cmx270_nand.c
drivers/mtd/nand/mxc_nand.c
drivers/mtd/nand/pxa3xx_nand.c
drivers/net/arm/ixp4xx_eth.c
drivers/net/arm/ks8695net.c
drivers/net/bonding/bond_main.c
drivers/net/irda/pxaficp_ir.c
drivers/net/jme.c
drivers/net/pcmcia/3c574_cs.c
drivers/net/pcmcia/3c589_cs.c
drivers/net/smc911x.h
drivers/net/smc91x.h
drivers/net/sungem.c
drivers/net/tg3.c
drivers/net/tokenring/tmspci.c
drivers/net/ucc_geth_mii.c
drivers/net/usb/dm9601.c
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/iwlwifi/iwl3945-base.c
drivers/net/wireless/p54/p54common.c
drivers/net/wireless/rt2x00/rt2500usb.c
drivers/net/wireless/rt2x00/rt73usb.c
drivers/pcmcia/pxa2xx_base.c
drivers/pcmcia/pxa2xx_cm_x255.c
drivers/pcmcia/pxa2xx_cm_x270.c
drivers/pcmcia/pxa2xx_e740.c
drivers/pcmcia/pxa2xx_lubbock.c
drivers/pcmcia/pxa2xx_mainstone.c
drivers/pcmcia/pxa2xx_trizeps4.c
drivers/pcmcia/pxa2xx_viper.c
drivers/pcmcia/sa1100_h3600.c
drivers/pcmcia/sa11xx_base.c
drivers/pcmcia/soc_common.c
drivers/pcmcia/soc_common.h
drivers/rtc/rtc-sa1100.c
drivers/scsi/arm/cumana_2.c
drivers/scsi/arm/eesox.c
drivers/scsi/arm/powertec.c
drivers/serial/Kconfig
drivers/serial/imx.c
drivers/serial/pxa.c
drivers/spi/omap2_mcspi.c
drivers/spi/omap_uwire.c
drivers/spi/pxa2xx_spi.c
drivers/usb/host/ohci-ep93xx.c
drivers/video/Kconfig
drivers/video/Makefile
drivers/video/broadsheetfb.c [new file with mode: 0644]
drivers/video/cyber2000fb.c
drivers/video/i810/i810_main.c
drivers/video/imxfb.c
drivers/video/mx3fb.c
drivers/video/pxafb.c
drivers/video/s3c2410fb.c
drivers/video/sa1100fb.c
drivers/video/sh_mobile_lcdcfb.c
drivers/w1/masters/mxc_w1.c
drivers/w1/masters/omap_hdq.c
drivers/watchdog/gef_wdt.c
drivers/watchdog/ks8695_wdt.c
drivers/watchdog/omap_wdt.c
drivers/watchdog/orion5x_wdt.c
drivers/watchdog/rc32434_wdt.c
drivers/watchdog/sa1100_wdt.c
fs/btrfs/ctree.c
fs/btrfs/disk-io.c
fs/btrfs/extent-tree.c
fs/btrfs/locking.c
fs/btrfs/locking.h
fs/devpts/inode.c
fs/ext4/ialloc.c
fs/squashfs/block.c
fs/squashfs/cache.c
fs/squashfs/inode.c
fs/squashfs/squashfs.h
fs/squashfs/super.c
include/linux/ata.h
include/linux/cpufreq.h
include/linux/dmaengine.h
include/linux/hdreg.h
include/linux/ide.h
include/linux/libata.h
include/linux/netdevice.h
include/linux/serio.h
include/net/net_namespace.h
include/video/broadsheetfb.h [new file with mode: 0644]
init/Kconfig
kernel/fork.c
kernel/softirq.c
kernel/tsacct.c
kernel/user.c
lib/Kconfig.debug
lib/idr.c
mm/highmem.c
net/802/tr.c
net/8021q/vlan_dev.c
net/core/dev.c
net/core/net-sysfs.c
net/core/net_namespace.c
net/ipv4/icmp.c
net/ipv4/tcp_ipv4.c
net/ipv6/addrconf.c
net/ipv6/af_inet6.c
net/netlink/af_netlink.c
net/sched/act_police.c
net/sctp/protocol.c
net/sctp/sm_sideeffect.c
net/sctp/sm_statefuns.c
net/wireless/reg.c
security/smack/smack_lsm.c
security/smack/smackfs.c
sound/arm/pxa2xx-ac97-lib.c
sound/arm/pxa2xx-ac97.c
sound/arm/pxa2xx-pcm-lib.c
sound/pci/hda/patch_sigmatel.c
sound/soc/pxa/corgi.c
sound/soc/pxa/e800_wm9712.c
sound/soc/pxa/em-x270.c
sound/soc/pxa/poodle.c
sound/soc/pxa/pxa-ssp.c
sound/soc/pxa/pxa2xx-ac97.c
sound/soc/pxa/pxa2xx-i2s.c
sound/soc/pxa/spitz.c
sound/soc/pxa/tosa.c

index 6e253407b3dc1f83d85076dae39d405a29ec6716..accfe2f5247d34cea4c659fd499746f08751a6eb 100644 (file)
@@ -298,3 +298,15 @@ over a rather long period of time, but improvements are always welcome!
 
        Note that, rcu_assign_pointer() and rcu_dereference() relate to
        SRCU just as they do to other forms of RCU.
+
+15.    The whole point of call_rcu(), synchronize_rcu(), and friends
+       is to wait until all pre-existing readers have finished before
+       carrying out some otherwise-destructive operation.  It is
+       therefore critically important to -first- remove any path
+       that readers can follow that could be affected by the
+       destructive operation, and -only- -then- invoke call_rcu(),
+       synchronize_rcu(), or friends.
+
+       Because these primitives only wait for pre-existing readers,
+       it is the caller's responsibility to guarantee safety to
+       any subsequent readers.
index dc6045577a8bdcebe21980453beecbe82126f41f..43cb1004d35fb72da88424321ab108da124c52d0 100644 (file)
@@ -29,7 +29,14 @@ ffff0000     ffff0fff        CPU vector page.
                                CPU supports vector relocation (control
                                register V bit.)
 
-ffc00000       fffeffff        DMA memory mapping region.  Memory returned
+fffe0000       fffeffff        XScale cache flush area.  This is used
+                               in proc-xscale.S to flush the whole data
+                               cache.  Free for other usage on non-XScale.
+
+fff00000       fffdffff        Fixmap mapping region.  Addresses provided
+                               by fix_to_virt() will be located here.
+
+ffc00000       ffefffff        DMA memory mapping region.  Memory returned
                                by the dma_alloc_xxx functions will be
                                dynamically mapped here.
 
index 5ddbe350487acad3a92bc70b057da477901cdc1c..20d3b94703a463931907c8365d93156c2ebf7279 100644 (file)
@@ -335,3 +335,12 @@ Why:       In 2.6.18 the Secmark concept was introduced to replace the "compat_net"
        Secmark, it is time to deprecate the older mechanism and start the
        process of removing the old code.
 Who:   Paul Moore <paul.moore@hp.com>
+---------------------------
+
+What:  sysfs ui for changing p4-clockmod parameters
+When:  September 2009
+Why:   See commits 129f8ae9b1b5be94517da76009ea956e89104ce8 and
+       e088e4c9cdb618675874becb91b2fd581ee707e6.
+       Removal is subject to fixing any remaining bugs in ACPI which may
+       cause the thermal throttling not to happen at the right time.
+Who:   Dave Jones <davej@redhat.com>, Matthew Garrett <mjg@redhat.com>
index 3e79e4a7a3920ac659ad2b3b76ed339aaf04e9f3..b324c033035ad097fda59b86897ae0720df9f09b 100644 (file)
@@ -22,7 +22,7 @@ Squashfs filesystem features versus Cramfs:
 
                                Squashfs                Cramfs
 
-Max filesystem size:           2^64                    16 MiB
+Max filesystem size:           2^64                    256 MiB
 Max file size:                 ~ 2 TiB                 16 MiB
 Max files:                     unlimited               unlimited
 Max directories:               unlimited               unlimited
diff --git a/Documentation/networking/ipv6.txt b/Documentation/networking/ipv6.txt
new file mode 100644 (file)
index 0000000..268e5c1
--- /dev/null
@@ -0,0 +1,35 @@
+
+Options for the ipv6 module are supplied as parameters at load time.
+
+Module options may be given as command line arguments to the insmod
+or modprobe command, but are usually specified in either the
+/etc/modules.conf or /etc/modprobe.conf configuration file, or in a
+distro-specific configuration file.
+
+The available ipv6 module parameters are listed below.  If a parameter
+is not specified the default value is used.
+
+The parameters are as follows:
+
+disable
+
+       Specifies whether to load the IPv6 module, but disable all
+       its functionality.  This might be used when another module
+       has a dependency on the IPv6 module being loaded, but no
+       IPv6 addresses or operations are desired.
+
+       The possible values and their effects are:
+
+       0
+               IPv6 is enabled.
+
+               This is the default value.
+
+       1
+               IPv6 is disabled.
+
+               No IPv6 addresses will be added to interfaces, and
+               it will not be possible to open an IPv6 socket.
+
+               A reboot is required to enable IPv6.
+
index 1c2ca1dc66f2006765dba54bb05edf8a5b57d258..a2b335c514137000cbdefa354b0e7065114e8ae1 100644 (file)
@@ -622,7 +622,7 @@ P:  Dirk Opfer
 M:     dirk@opfer-online.de
 S:     Maintained
 
-ARM/PALMTX SUPPORT
+ARM/PALMTX,PALMT5,PALMLD SUPPORT
 P:     Marek Vasut
 M:     marek.vasut@gmail.com
 W:     http://hackndev.com
@@ -3543,6 +3543,22 @@ M:       linux@arm.linux.org.uk
 L:     linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
 S:     Maintained
 
+PXA168 SUPPORT
+P:     Eric Miao
+M:     eric.miao@marvell.com
+P:     Jason Chagas
+M:     jason.chagas@marvell.com
+L:     linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
+T:     git kernel.org:/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6.git
+S:     Supported
+
+PXA910 SUPPORT
+P:     Eric Miao
+M:     eric.miao@marvell.com
+L:     linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
+T:     git kernel.org:/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6.git
+S:     Supported
+
 PXA MMCI DRIVER
 S:     Orphan
 
index dbfdf87f993f8849b44e16e0000384bb24d116f6..e62b37a15a1de23bc0bbe6f96a57b5a4e67835e6 100644 (file)
@@ -241,6 +241,7 @@ config ARCH_VERSATILE
 config ARCH_AT91
        bool "Atmel AT91"
        select GENERIC_GPIO
+       select ARCH_REQUIRE_GPIOLIB
        select HAVE_CLK
        help
          This enables support for systems based on the Atmel AT91RM9200,
@@ -477,12 +478,29 @@ config ARCH_PXA
        select HAVE_CLK
        select COMMON_CLKDEV
        select ARCH_REQUIRE_GPIOLIB
+       select HAVE_CLK
+       select COMMON_CLKDEV
        select GENERIC_TIME
        select GENERIC_CLOCKEVENTS
        select TICK_ONESHOT
+       select PLAT_PXA
        help
          Support for Intel/Marvell's PXA2xx/PXA3xx processor line.
 
+config ARCH_MMP
+       bool "Marvell PXA168/910"
+       depends on MMU
+       select GENERIC_GPIO
+       select ARCH_REQUIRE_GPIOLIB
+       select HAVE_CLK
+       select COMMON_CLKDEV
+       select GENERIC_TIME
+       select GENERIC_CLOCKEVENTS
+       select TICK_ONESHOT
+       select PLAT_PXA
+       help
+         Support for Marvell's PXA168/910 processor line.
+
 config ARCH_RPC
        bool "RiscPC"
        select ARCH_ACORN
@@ -617,6 +635,9 @@ source "arch/arm/mach-loki/Kconfig"
 source "arch/arm/mach-mv78xx0/Kconfig"
 
 source "arch/arm/mach-pxa/Kconfig"
+source "arch/arm/plat-pxa/Kconfig"
+
+source "arch/arm/mach-mmp/Kconfig"
 
 source "arch/arm/mach-sa1100/Kconfig"
 
@@ -686,12 +707,15 @@ config PLAT_IOP
 config PLAT_ORION
        bool
 
+config PLAT_PXA
+       bool
+
 source arch/arm/mm/Kconfig
 
 config IWMMXT
        bool "Enable iWMMXt support"
-       depends on CPU_XSCALE || CPU_XSC3
-       default y if PXA27x || PXA3xx
+       depends on CPU_XSCALE || CPU_XSC3 || CPU_MOHAWK
+       default y if PXA27x || PXA3xx || ARCH_MMP
        help
          Enable support for iWMMXt context switching at run time if
          running on a CPU that supports it.
@@ -915,6 +939,23 @@ config NODES_SHIFT
        default "2"
        depends on NEED_MULTIPLE_NODES
 
+config HIGHMEM
+       bool "High Memory Support (EXPERIMENTAL)"
+       depends on MMU && EXPERIMENTAL
+       help
+         The address space of ARM processors is only 4 Gigabytes large
+         and it has to accommodate user address space, kernel address
+         space as well as some memory mapped IO. That means that, if you
+         have a large amount of physical memory and/or IO, not all of the
+         memory can be "permanently mapped" by the kernel. The physical
+         memory that is not permanently mapped is called "high memory".
+
+         Depending on the selected kernel/user memory split, minimum
+         vmalloc space and actual amount of RAM, you may not need this
+         option which should result in a slightly faster kernel.
+
+         If unsure, say n.
+
 source "mm/Kconfig"
 
 config LEDS
@@ -1092,7 +1133,7 @@ source "drivers/cpufreq/Kconfig"
 
 config CPU_FREQ_SA1100
        bool
-       depends on CPU_FREQ && (SA1100_H3100 || SA1100_H3600 || SA1100_H3800 || SA1100_LART || SA1100_PLEB || SA1100_BADGE4 || SA1100_HACKKIT)
+       depends on CPU_FREQ && (SA1100_H3100 || SA1100_H3600 || SA1100_LART || SA1100_PLEB || SA1100_BADGE4 || SA1100_HACKKIT)
        default y
 
 config CPU_FREQ_SA1110
index 192ee01a9ba20b00fef403afa3ffb07d04ec0d19..a71fd941ade7cdd82610b62a1109a6dc04615907 100644 (file)
@@ -2,18 +2,29 @@ menu "Kernel hacking"
 
 source "lib/Kconfig.debug"
 
-# RMK wants arm kernels compiled with frame pointers so hardwire this to y.
+# RMK wants arm kernels compiled with frame pointers or stack unwinding.
 # If you know what you are doing and are willing to live without stack
 # traces, you can get a slightly smaller kernel by setting this option to
 # n, but then RMK will have to kill you ;).
 config FRAME_POINTER
        bool
-       default y
+       default y if !ARM_UNWIND
        help
          If you say N here, the resulting kernel will be slightly smaller and
-         faster. However, when a problem occurs with the kernel, the
-         information that is reported is severely limited. Most people
-         should say Y here.
+         faster. However, if neither FRAME_POINTER nor ARM_UNWIND are enabled,
+         when a problem occurs with the kernel, the information that is
+         reported is severely limited.
+
+config ARM_UNWIND
+       bool "Enable stack unwinding support"
+       depends on AEABI && EXPERIMENTAL
+       default y
+       help
+         This option enables stack unwinding support in the kernel
+         using the information automatically generated by the
+         compiler. The resulting kernel image is slightly bigger but
+         the performance is not affected. Currently, this feature
+         only works with EABI compilers. If unsure say Y.
 
 config DEBUG_USER
        bool "Verbose user fault messages"
@@ -66,7 +77,7 @@ config DEBUG_ICEDCC
          Say Y here if you want the debug print routines to direct their
          output to the EmbeddedICE macrocell's DCC channel using
          co-processor 14. This is known to work on the ARM9 style ICE
-         channel.
+         channel and on the XScale with the PEEDI.
 
          It does include a timeout to ensure that the system does not
          totally freeze when there is nothing connected to read.
index 24e0f0187697009fb19de797f8e7f76042b94e9e..95186ef17e17e7d7a69bcd009af30cb13f7d991b 100644 (file)
@@ -85,6 +85,10 @@ else
 CFLAGS_ABI     :=$(call cc-option,-mapcs-32,-mabi=apcs-gnu) $(call cc-option,-mno-thumb-interwork,)
 endif
 
+ifeq ($(CONFIG_ARM_UNWIND),y)
+CFLAGS_ABI     +=-funwind-tables
+endif
+
 # Need -Uarm for gcc < 3.x
 KBUILD_CFLAGS  +=$(CFLAGS_ABI) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm
 KBUILD_AFLAGS  +=$(CFLAGS_ABI) $(arch-y) $(tune-y) -msoft-float
@@ -105,6 +109,8 @@ ifeq ($(CONFIG_ARCH_SA1100),y)
  textofs-$(CONFIG_SA1111)         := 0x00208000
 endif
  machine-$(CONFIG_ARCH_PXA)       := pxa
+ machine-$(CONFIG_ARCH_MMP)       := mmp
+    plat-$(CONFIG_PLAT_PXA)       := pxa
  machine-$(CONFIG_ARCH_L7200)     := l7200
  machine-$(CONFIG_ARCH_INTEGRATOR) := integrator
  textofs-$(CONFIG_ARCH_CLPS711X)   := 0x00028000
index 77d614232d815fd592e6798383e7eb4aa8be48ae..d14b827adcd69352dca7886ca79205cb902d65cb 100644 (file)
                .macro  writeb, ch, rb
                mcr     p14, 0, \ch, c0, c5, 0
                .endm
+#elif defined(CONFIG_CPU_XSCALE)
+               .macro  loadsp, rb
+               .endm
+               .macro  writeb, ch, rb
+               mcr     p14, 0, \ch, c8, c0, 0
+               .endm
 #else
                .macro  loadsp, rb
                .endm
@@ -630,6 +636,18 @@ proc_types:
                b       __armv4_mmu_cache_off
                b       __armv4_mmu_cache_flush
 
+               .word   0x56158000              @ PXA168
+               .word   0xfffff000
+               b __armv4_mmu_cache_on
+               b __armv4_mmu_cache_off
+               b __armv5tej_mmu_cache_flush
+
+               .word   0x56056930
+               .word   0xff0ffff0              @ PXA935
+               b       __armv4_mmu_cache_on
+               b       __armv4_mmu_cache_off
+               b       __armv4_mmu_cache_flush
+
                .word   0x56050000              @ Feroceon
                .word   0xff0f0000
                b       __armv4_mmu_cache_on
index 3fc08413fff05803a3f555de749917b56962b966..393c8164131484b03c7f0fa4561d294eb8bd0c31 100644 (file)
@@ -46,6 +46,21 @@ static void icedcc_putc(int ch)
 
        asm("mcr p14, 0, %0, c0, c5, 0" : : "r" (ch));
 }
+#elif defined(CONFIG_CPU_XSCALE)
+
+static void icedcc_putc(int ch)
+{
+       int status, i = 0x4000000;
+
+       do {
+               if (--i < 0)
+                       return;
+
+               asm volatile ("mrc p14, 0, %0, c14, c0, 0" : "=r" (status));
+       } while (status & (1 << 28));
+
+       asm("mcr p14, 0, %0, c8, c0, 0" : : "r" (ch));
+}
 
 #else
 
index 153a07e7222bd4a4d8ede7d5b9bc7b0a9f31566d..a5924b9b88bdbad7a2daea6489faf712152174b8 100644 (file)
@@ -11,6 +11,11 @@ OUTPUT_ARCH(arm)
 ENTRY(_start)
 SECTIONS
 {
+  /DISCARD/ : {
+    *(.ARM.exidx*)
+    *(.ARM.extab*)
+  }
+
   . = TEXT_START;
   _text = .;
 
index f030f0775be7d11016d14ed4add82c16be38d254..734ac9135998d9efffb0a1b84c3a82416b31d325 100644 (file)
@@ -25,6 +25,7 @@
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/slab.h>
+#include <linux/page-flags.h>
 #include <linux/device.h>
 #include <linux/dma-mapping.h>
 #include <linux/dmapool.h>
@@ -349,6 +350,12 @@ dma_addr_t dma_map_page(struct device *dev, struct page *page,
 
        BUG_ON(!valid_dma_direction(dir));
 
+       if (PageHighMem(page)) {
+               dev_err(dev, "DMA buffer bouncing of HIGHMEM pages "
+                            "is not supported\n");
+               return ~0;
+       }
+
        return map_single(dev, page_address(page) + offset, size, dir);
 }
 EXPORT_SYMBOL(dma_map_page);
index 780bbf7cb26f28266f3141250b763b82f2590e69..140f1d721d5007079db035e261d9718dd636cafc 100644 (file)
@@ -29,8 +29,8 @@
 #include <mach/hardware.h>
 #include <asm/irq.h>
 #include <mach/pm.h>
-#include <mach/pxa-regs.h>
 #include <mach/pxa2xx-regs.h>
+#include <mach/regs-rtc.h>
 #include <mach/sharpsl.h>
 #include <asm/hardware/sharpsl_pm.h>
 
diff --git a/arch/arm/configs/acs5k_defconfig b/arch/arm/configs/acs5k_defconfig
new file mode 100644 (file)
index 0000000..1cab4e7
--- /dev/null
@@ -0,0 +1,1233 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.27-simtec-micrel1
+# Tue Dec 16 13:31:34 2008
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+# CONFIG_GENERIC_TIME is not set
+# CONFIG_GENERIC_CLOCKEVENTS is not set
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_LATENCYTOP_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ARCH_SUPPORTS_AOUT=y
+CONFIG_ZONE_DMA=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+# CONFIG_SWAP is not set
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+CONFIG_POSIX_MQUEUE=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+# CONFIG_GROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+CONFIG_SYSFS_DEPRECATED_V2=y
+# CONFIG_RELAY is not set
+CONFIG_NAMESPACES=y
+# CONFIG_UTS_NS is not set
+# CONFIG_IPC_NS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+# CONFIG_EMBEDDED is not set
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_COMPAT_BRK=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+# CONFIG_PROFILING is not set
+# CONFIG_MARKERS is not set
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
+# CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set
+# CONFIG_HAVE_IOREMAP_PROT is not set
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+# CONFIG_HAVE_ARCH_TRACEHOOK is not set
+# CONFIG_HAVE_DMA_ATTRS is not set
+# CONFIG_USE_GENERIC_SMP_HELPERS is not set
+# CONFIG_HAVE_CLK is not set
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+# CONFIG_IOSCHED_DEADLINE is not set
+# CONFIG_IOSCHED_CFQ is not set
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+CONFIG_CLASSIC_RCU=y
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KIRKWOOD is not set
+CONFIG_ARCH_KS8695=y
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_ARCH_MSM7X00A is not set
+
+#
+# Boot options
+#
+
+#
+# Power management
+#
+
+#
+# Kendin/Micrel KS8695 Implementations
+#
+CONFIG_MACH_KS8695=y
+CONFIG_MACH_DSM320=y
+CONFIG_MACH_ACS5K=y
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_ARM922T=y
+CONFIG_CPU_32v4T=y
+CONFIG_CPU_ABRT_EV4T=y
+CONFIG_CPU_PABRT_NOIFAR=y
+CONFIG_CPU_CACHE_V4WT=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_COPY_V4WB=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+# CONFIG_ARM_THUMB is not set
+# CONFIG_CPU_ICACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
+# CONFIG_OUTER_CACHE is not set
+
+#
+# Bus support
+#
+CONFIG_PCI=y
+CONFIG_PCI_SYSCALL=y
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+CONFIG_PCI_LEGACY=y
+CONFIG_PCI_DEBUG=y
+CONFIG_PCCARD=y
+# CONFIG_PCMCIA_DEBUG is not set
+CONFIG_PCMCIA=y
+CONFIG_PCMCIA_LOAD_CIS=y
+CONFIG_PCMCIA_IOCTL=y
+CONFIG_CARDBUS=y
+
+#
+# PC-card bridges
+#
+CONFIG_YENTA=y
+CONFIG_YENTA_O2=y
+CONFIG_YENTA_RICOH=y
+CONFIG_YENTA_TI=y
+CONFIG_YENTA_ENE_TUNE=y
+CONFIG_YENTA_TOSHIBA=y
+# CONFIG_PD6729 is not set
+# CONFIG_I82092 is not set
+CONFIG_PCCARD_NONSTATIC=y
+
+#
+# Kernel Features
+#
+# CONFIG_TICK_ONESHOT is not set
+# CONFIG_PREEMPT is not set
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+CONFIG_ARCH_FLATMEM_HAS_HOLES=y
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
+CONFIG_PAGEFLAGS_EXTENDED=y
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_VIRT_TO_BUS=y
+# CONFIG_LEDS is not set
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="mem=32M console=ttyS0,115200 initrd=0x20410000,3145728 root=/dev/ram0 rw"
+# CONFIG_XIP_KERNEL is not set
+# CONFIG_KEXEC is not set
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+# CONFIG_FPE_NWFPE is not set
+# CONFIG_FPE_FASTFPE is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Power management options
+#
+# CONFIG_PM is not set
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_XFRM_STATISTICS is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
+# CONFIG_INET_LRO is not set
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_AF_RXRPC is not set
+
+#
+# Wireless
+#
+# CONFIG_CFG80211 is not set
+CONFIG_WIRELESS_EXT=y
+CONFIG_WIRELESS_EXT_SYSFS=y
+# CONFIG_MAC80211 is not set
+# CONFIG_IEEE80211 is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+CONFIG_FIRMWARE_IN_KERNEL=y
+CONFIG_EXTRA_FIRMWARE=""
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+CONFIG_MTD_CONCAT=y
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+# CONFIG_MTD_CMDLINE_PARTS is not set
+# CONFIG_MTD_AFS_PARTS is not set
+# CONFIG_MTD_AR7_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+CONFIG_MTD_JEDECPROBE=y
+CONFIG_MTD_GEN_PROBE=y
+CONFIG_MTD_CFI_ADV_OPTIONS=y
+CONFIG_MTD_CFI_NOSWAP=y
+# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
+# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
+# CONFIG_MTD_CFI_GEOMETRY is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_OTP is not set
+CONFIG_MTD_CFI_INTELEXT=y
+CONFIG_MTD_CFI_AMDSTD=y
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=y
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+CONFIG_MTD_PHYSMAP=y
+CONFIG_MTD_PHYSMAP_START=0x8000000
+CONFIG_MTD_PHYSMAP_LEN=0
+CONFIG_MTD_PHYSMAP_BANKWIDTH=4
+# CONFIG_MTD_ARM_INTEGRATOR is not set
+# CONFIG_MTD_IMPA7 is not set
+# CONFIG_MTD_INTEL_VR_NOR is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_PMC551 is not set
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+# CONFIG_MTD_NAND is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# UBI - Unsorted block images
+#
+# CONFIG_MTD_UBI is not set
+# CONFIG_PARPORT is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_CPQ_CISS_DA is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_UMEM is not set
+# CONFIG_BLK_DEV_COW_COMMON is not set
+# CONFIG_BLK_DEV_LOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_SX8 is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=8192
+# CONFIG_BLK_DEV_XIP is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_PHANTOM is not set
+# CONFIG_EEPROM_93CX6 is not set
+# CONFIG_SGI_IOC4 is not set
+# CONFIG_TIFM_CORE is not set
+# CONFIG_ENCLOSURE_SERVICES is not set
+# CONFIG_HP_ILO is not set
+CONFIG_HAVE_IDE=y
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+# CONFIG_SCSI_DMA is not set
+# CONFIG_SCSI_NETLINK is not set
+# CONFIG_ATA is not set
+# CONFIG_MD is not set
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+
+#
+# Enable only one of the two stacks, unless you know what you are doing
+#
+# CONFIG_FIREWIRE is not set
+# CONFIG_IEEE1394 is not set
+# CONFIG_I2O is not set
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+# CONFIG_VETH is not set
+# CONFIG_ARCNET is not set
+# CONFIG_PHYLIB is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+CONFIG_ARM_KS8695_ETHER=y
+# CONFIG_AX88796 is not set
+# CONFIG_HAPPYMEAL is not set
+# CONFIG_SUNGEM is not set
+# CONFIG_CASSINI is not set
+# CONFIG_NET_VENDOR_3COM is not set
+# CONFIG_SMC91X is not set
+# CONFIG_DM9000 is not set
+# CONFIG_NET_TULIP is not set
+# CONFIG_HP100 is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_NET_PCI is not set
+# CONFIG_B44 is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+# CONFIG_TR is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+CONFIG_WLAN_80211=y
+# CONFIG_PCMCIA_RAYCS is not set
+# CONFIG_IPW2100 is not set
+# CONFIG_IPW2200 is not set
+# CONFIG_LIBERTAS is not set
+# CONFIG_HERMES is not set
+# CONFIG_ATMEL is not set
+# CONFIG_AIRO_CS is not set
+# CONFIG_PCMCIA_WL3501 is not set
+CONFIG_PRISM54=m
+# CONFIG_IWLWIFI_LEDS is not set
+# CONFIG_HOSTAP is not set
+# CONFIG_NET_PCMCIA is not set
+# CONFIG_WAN is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+# CONFIG_INPUT_KEYBOARD is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_CONSOLE_TRANSLATIONS=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+CONFIG_DEVKMEM=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+# CONFIG_NOZOMI is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_KS8695=y
+CONFIG_SERIAL_KS8695_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_SERIAL_JSM is not set
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+# CONFIG_IPMI_HANDLER is not set
+CONFIG_HW_RANDOM=m
+# CONFIG_NVRAM is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+
+#
+# PCMCIA character devices
+#
+# CONFIG_SYNCLINK_CS is not set
+# CONFIG_CARDMAN_4000 is not set
+# CONFIG_CARDMAN_4040 is not set
+# CONFIG_IPWIRELESS is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_DEVPORT=y
+CONFIG_ACS5KCAN=y
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_HELPER_AUTO=y
+CONFIG_I2C_ALGOBIT=y
+
+#
+# I2C Hardware Bus support
+#
+
+#
+# PC SMBus host controller drivers
+#
+# CONFIG_I2C_ALI1535 is not set
+# CONFIG_I2C_ALI1563 is not set
+# CONFIG_I2C_ALI15X3 is not set
+# CONFIG_I2C_AMD756 is not set
+# CONFIG_I2C_AMD8111 is not set
+# CONFIG_I2C_I801 is not set
+# CONFIG_I2C_ISCH is not set
+# CONFIG_I2C_PIIX4 is not set
+# CONFIG_I2C_NFORCE2 is not set
+# CONFIG_I2C_SIS5595 is not set
+# CONFIG_I2C_SIS630 is not set
+# CONFIG_I2C_SIS96X is not set
+# CONFIG_I2C_VIA is not set
+# CONFIG_I2C_VIAPRO is not set
+
+#
+# I2C system bus drivers (mostly embedded / system-on-chip)
+#
+CONFIG_I2C_GPIO=y
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_SIMTEC is not set
+
+#
+# External I2C/SMBus adapter drivers
+#
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_TAOS_EVM is not set
+
+#
+# Graphics adapter I2C/DDC channel drivers
+#
+# CONFIG_I2C_VOODOO3 is not set
+
+#
+# Other I2C/SMBus bus drivers
+#
+# CONFIG_I2C_PCA_PLATFORM is not set
+# CONFIG_I2C_STUB is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_DS1682 is not set
+# CONFIG_AT24 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_PCF8575 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_TPS65010 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_SENSORS_TSL2550 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+# CONFIG_SPI is not set
+CONFIG_ARCH_REQUIRE_GPIOLIB=y
+CONFIG_GPIOLIB=y
+# CONFIG_DEBUG_GPIO is not set
+CONFIG_GPIO_SYSFS=y
+
+#
+# I2C GPIO expanders:
+#
+# CONFIG_GPIO_MAX732X is not set
+CONFIG_GPIO_PCA953X=y
+# CONFIG_GPIO_PCF857X is not set
+
+#
+# PCI GPIO expanders:
+#
+# CONFIG_GPIO_BT8XX is not set
+
+#
+# SPI GPIO expanders:
+#
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_AD7414 is not set
+# CONFIG_SENSORS_AD7418 is not set
+# CONFIG_SENSORS_ADM1021 is not set
+# CONFIG_SENSORS_ADM1025 is not set
+# CONFIG_SENSORS_ADM1026 is not set
+# CONFIG_SENSORS_ADM1029 is not set
+# CONFIG_SENSORS_ADM1031 is not set
+# CONFIG_SENSORS_ADM9240 is not set
+# CONFIG_SENSORS_ADT7470 is not set
+# CONFIG_SENSORS_ADT7473 is not set
+# CONFIG_SENSORS_ATXP1 is not set
+# CONFIG_SENSORS_DS1621 is not set
+# CONFIG_SENSORS_I5K_AMB is not set
+# CONFIG_SENSORS_F71805F is not set
+# CONFIG_SENSORS_F71882FG is not set
+# CONFIG_SENSORS_F75375S is not set
+# CONFIG_SENSORS_GL518SM is not set
+# CONFIG_SENSORS_GL520SM is not set
+# CONFIG_SENSORS_IT87 is not set
+# CONFIG_SENSORS_LM63 is not set
+# CONFIG_SENSORS_LM75 is not set
+# CONFIG_SENSORS_LM77 is not set
+# CONFIG_SENSORS_LM78 is not set
+# CONFIG_SENSORS_LM80 is not set
+# CONFIG_SENSORS_LM83 is not set
+# CONFIG_SENSORS_LM85 is not set
+# CONFIG_SENSORS_LM87 is not set
+# CONFIG_SENSORS_LM90 is not set
+# CONFIG_SENSORS_LM92 is not set
+# CONFIG_SENSORS_LM93 is not set
+# CONFIG_SENSORS_MAX1619 is not set
+# CONFIG_SENSORS_MAX6650 is not set
+# CONFIG_SENSORS_PC87360 is not set
+# CONFIG_SENSORS_PC87427 is not set
+# CONFIG_SENSORS_SIS5595 is not set
+# CONFIG_SENSORS_DME1737 is not set
+# CONFIG_SENSORS_SMSC47M1 is not set
+# CONFIG_SENSORS_SMSC47M192 is not set
+# CONFIG_SENSORS_SMSC47B397 is not set
+# CONFIG_SENSORS_ADS7828 is not set
+# CONFIG_SENSORS_THMC50 is not set
+# CONFIG_SENSORS_VIA686A is not set
+# CONFIG_SENSORS_VT1211 is not set
+# CONFIG_SENSORS_VT8231 is not set
+# CONFIG_SENSORS_W83781D is not set
+# CONFIG_SENSORS_W83791D is not set
+# CONFIG_SENSORS_W83792D is not set
+# CONFIG_SENSORS_W83793 is not set
+# CONFIG_SENSORS_W83L785TS is not set
+# CONFIG_SENSORS_W83L786NG is not set
+# CONFIG_SENSORS_W83627HF is not set
+# CONFIG_SENSORS_W83627EHF is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
+CONFIG_WATCHDOG=y
+# CONFIG_WATCHDOG_NOWAYOUT is not set
+
+#
+# Watchdog Device Drivers
+#
+# CONFIG_SOFT_WATCHDOG is not set
+CONFIG_KS8695_WATCHDOG=y
+# CONFIG_ALIM7101_WDT is not set
+
+#
+# PCI-based Watchdog Cards
+#
+# CONFIG_PCIPCWATCHDOG is not set
+# CONFIG_WDTPCI is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_CORE is not set
+# CONFIG_MFD_SM501 is not set
+# CONFIG_MFD_ASIC3 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_MFD_T7L66XB is not set
+# CONFIG_MFD_TC6387XB is not set
+# CONFIG_MFD_TC6393XB is not set
+
+#
+# Multimedia devices
+#
+
+#
+# Multimedia core support
+#
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_DVB_CORE is not set
+# CONFIG_VIDEO_MEDIA is not set
+
+#
+# Multimedia drivers
+#
+# CONFIG_DAB is not set
+
+#
+# Graphics support
+#
+# CONFIG_DRM is not set
+# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
+# CONFIG_FB is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+# CONFIG_SOUND is not set
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=y
+CONFIG_HID_DEBUG=y
+# CONFIG_HIDRAW is not set
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+CONFIG_USB_ARCH_HAS_EHCI=y
+# CONFIG_USB is not set
+
+#
+# Enable Host or Gadget support to see Inventra options
+#
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+# CONFIG_USB_GADGET is not set
+# CONFIG_MMC is not set
+# CONFIG_NEW_LEDS is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1374 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_X1205 is not set
+CONFIG_RTC_DRV_PCF8563=y
+# CONFIG_RTC_DRV_PCF8583 is not set
+# CONFIG_RTC_DRV_M41T80 is not set
+# CONFIG_RTC_DRV_S35390A is not set
+# CONFIG_RTC_DRV_FM3130 is not set
+
+#
+# SPI RTC drivers
+#
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1511 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+# CONFIG_DMADEVICES is not set
+
+#
+# Voltage and Current regulators
+#
+# CONFIG_REGULATOR is not set
+# CONFIG_REGULATOR_FIXED_VOLTAGE is not set
+# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
+# CONFIG_REGULATOR_BQ24022 is not set
+# CONFIG_UIO is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+# CONFIG_EXT3_FS is not set
+# CONFIG_EXT4DEV_FS is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_OCFS2_FS is not set
+CONFIG_DNOTIFY=y
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+# CONFIG_MSDOS_FS is not set
+# CONFIG_VFAT_FS is not set
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+CONFIG_JFFS2_SUMMARY=y
+# CONFIG_JFFS2_FS_XATTR is not set
+CONFIG_JFFS2_COMPRESSION_OPTIONS=y
+CONFIG_JFFS2_ZLIB=y
+# CONFIG_JFFS2_LZO is not set
+CONFIG_JFFS2_RTIME=y
+CONFIG_JFFS2_RUBIN=y
+# CONFIG_JFFS2_CMODE_NONE is not set
+CONFIG_JFFS2_CMODE_PRIORITY=y
+# CONFIG_JFFS2_CMODE_SIZE is not set
+# CONFIG_JFFS2_CMODE_FAVOURLZO is not set
+CONFIG_CRAMFS=y
+# CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_OMFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+# CONFIG_NFS_V4 is not set
+CONFIG_ROOT_NFS=y
+# CONFIG_NFSD is not set
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+# CONFIG_RPCSEC_GSS_KRB5 is not set
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_NLS is not set
+# CONFIG_DLM is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_FRAME_WARN=1024
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_DETECT_SOFTLOCKUP=y
+# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
+CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
+CONFIG_SCHED_DEBUG=y
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_TIMER_STATS is not set
+# CONFIG_DEBUG_OBJECTS is not set
+# CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+CONFIG_DEBUG_MUTEXES=y
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+# CONFIG_LOCK_STAT is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_WRITECOUNT is not set
+CONFIG_DEBUG_MEMORY_INIT=y
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_BACKTRACE_SELF_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_LATENCYTOP is not set
+# CONFIG_SYSCTL_SYSCALL_CHECK is not set
+CONFIG_HAVE_FTRACE=y
+CONFIG_HAVE_DYNAMIC_FTRACE=y
+# CONFIG_FTRACE is not set
+# CONFIG_SCHED_TRACER is not set
+# CONFIG_CONTEXT_SWITCH_TRACER is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_KGDB is not set
+CONFIG_DEBUG_USER=y
+# CONFIG_DEBUG_ERRORS is not set
+# CONFIG_DEBUG_STACK_USAGE is not set
+CONFIG_DEBUG_LL=y
+# CONFIG_DEBUG_ICEDCC is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+
+#
+# Crypto core or helper
+#
+# CONFIG_CRYPTO_MANAGER is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Authenticated Encryption with Associated Data
+#
+# CONFIG_CRYPTO_CCM is not set
+# CONFIG_CRYPTO_GCM is not set
+# CONFIG_CRYPTO_SEQIV is not set
+
+#
+# Block modes
+#
+# CONFIG_CRYPTO_CBC is not set
+# CONFIG_CRYPTO_CTR is not set
+# CONFIG_CRYPTO_CTS is not set
+# CONFIG_CRYPTO_ECB is not set
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_PCBC is not set
+# CONFIG_CRYPTO_XTS is not set
+
+#
+# Hash modes
+#
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+
+#
+# Digest
+#
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_MD4 is not set
+# CONFIG_CRYPTO_MD5 is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_RMD128 is not set
+# CONFIG_CRYPTO_RMD160 is not set
+# CONFIG_CRYPTO_RMD256 is not set
+# CONFIG_CRYPTO_RMD320 is not set
+# CONFIG_CRYPTO_SHA1 is not set
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_WP512 is not set
+
+#
+# Ciphers
+#
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_ARC4 is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_DES is not set
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_SALSA20 is not set
+# CONFIG_CRYPTO_SEED is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+
+#
+# Compression
+#
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_LZO is not set
+CONFIG_CRYPTO_HW=y
+# CONFIG_CRYPTO_DEV_HIFN_795X is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+# CONFIG_GENERIC_FIND_FIRST_BIT is not set
+# CONFIG_GENERIC_FIND_NEXT_BIT is not set
+# CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_T10DIF is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff --git a/arch/arm/configs/acs5k_tiny_defconfig b/arch/arm/configs/acs5k_tiny_defconfig
new file mode 100644 (file)
index 0000000..8e3d084
--- /dev/null
@@ -0,0 +1,941 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.27-simtec-micrel1
+# Tue Jan  6 13:23:07 2009
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+# CONFIG_GENERIC_TIME is not set
+# CONFIG_GENERIC_CLOCKEVENTS is not set
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_LATENCYTOP_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ARCH_SUPPORTS_AOUT=y
+CONFIG_ZONE_DMA=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+# CONFIG_SWAP is not set
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+CONFIG_POSIX_MQUEUE=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+# CONFIG_GROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+CONFIG_SYSFS_DEPRECATED_V2=y
+# CONFIG_RELAY is not set
+CONFIG_NAMESPACES=y
+# CONFIG_UTS_NS is not set
+# CONFIG_IPC_NS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
+# CONFIG_BLK_DEV_INITRD is not set
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+# CONFIG_EMBEDDED is not set
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_COMPAT_BRK=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+# CONFIG_PROFILING is not set
+# CONFIG_MARKERS is not set
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
+# CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set
+# CONFIG_HAVE_IOREMAP_PROT is not set
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+# CONFIG_HAVE_ARCH_TRACEHOOK is not set
+# CONFIG_HAVE_DMA_ATTRS is not set
+# CONFIG_USE_GENERIC_SMP_HELPERS is not set
+# CONFIG_HAVE_CLK is not set
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+# CONFIG_IOSCHED_DEADLINE is not set
+# CONFIG_IOSCHED_CFQ is not set
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+CONFIG_CLASSIC_RCU=y
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KIRKWOOD is not set
+CONFIG_ARCH_KS8695=y
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_ARCH_MSM7X00A is not set
+
+#
+# Boot options
+#
+
+#
+# Power management
+#
+
+#
+# Kendin/Micrel KS8695 Implementations
+#
+# CONFIG_MACH_KS8695 is not set
+# CONFIG_MACH_DSM320 is not set
+CONFIG_MACH_ACS5K=y
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_ARM922T=y
+CONFIG_CPU_32v4T=y
+CONFIG_CPU_ABRT_EV4T=y
+CONFIG_CPU_PABRT_NOIFAR=y
+CONFIG_CPU_CACHE_V4WT=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_COPY_V4WB=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+# CONFIG_ARM_THUMB is not set
+# CONFIG_CPU_ICACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
+# CONFIG_OUTER_CACHE is not set
+
+#
+# Bus support
+#
+# CONFIG_PCI is not set
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+# CONFIG_TICK_ONESHOT is not set
+# CONFIG_PREEMPT is not set
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+CONFIG_ARCH_FLATMEM_HAS_HOLES=y
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
+CONFIG_PAGEFLAGS_EXTENDED=y
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_VIRT_TO_BUS=y
+# CONFIG_LEDS is not set
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="console=ttyAM0,115200 init=/bin/sh"
+# CONFIG_XIP_KERNEL is not set
+# CONFIG_KEXEC is not set
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Power management options
+#
+# CONFIG_PM is not set
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+# CONFIG_IP_PNP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_LRO is not set
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_AF_RXRPC is not set
+
+#
+# Wireless
+#
+# CONFIG_CFG80211 is not set
+# CONFIG_WIRELESS_EXT is not set
+# CONFIG_MAC80211 is not set
+# CONFIG_IEEE80211 is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+CONFIG_FIRMWARE_IN_KERNEL=y
+CONFIG_EXTRA_FIRMWARE=""
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+CONFIG_MTD_CONCAT=y
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+# CONFIG_MTD_CMDLINE_PARTS is not set
+# CONFIG_MTD_AFS_PARTS is not set
+# CONFIG_MTD_AR7_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+CONFIG_MTD_JEDECPROBE=y
+CONFIG_MTD_GEN_PROBE=y
+CONFIG_MTD_CFI_ADV_OPTIONS=y
+CONFIG_MTD_CFI_NOSWAP=y
+# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
+# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
+# CONFIG_MTD_CFI_GEOMETRY is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_OTP is not set
+CONFIG_MTD_CFI_INTELEXT=y
+CONFIG_MTD_CFI_AMDSTD=y
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=y
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+CONFIG_MTD_PHYSMAP=y
+CONFIG_MTD_PHYSMAP_START=0x8000000
+CONFIG_MTD_PHYSMAP_LEN=0
+CONFIG_MTD_PHYSMAP_BANKWIDTH=4
+# CONFIG_MTD_ARM_INTEGRATOR is not set
+# CONFIG_MTD_IMPA7 is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+# CONFIG_MTD_NAND is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# UBI - Unsorted block images
+#
+# CONFIG_MTD_UBI is not set
+# CONFIG_PARPORT is not set
+# CONFIG_BLK_DEV is not set
+# CONFIG_MISC_DEVICES is not set
+CONFIG_HAVE_IDE=y
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+# CONFIG_SCSI_DMA is not set
+# CONFIG_SCSI_NETLINK is not set
+# CONFIG_ATA is not set
+# CONFIG_MD is not set
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+# CONFIG_VETH is not set
+# CONFIG_PHYLIB is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+CONFIG_ARM_KS8695_ETHER=y
+# CONFIG_AX88796 is not set
+# CONFIG_SMC91X is not set
+# CONFIG_DM9000 is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_B44 is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+CONFIG_WLAN_80211=y
+# CONFIG_LIBERTAS is not set
+# CONFIG_IWLWIFI_LEDS is not set
+# CONFIG_HOSTAP is not set
+# CONFIG_WAN is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+# CONFIG_INPUT_KEYBOARD is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_CONSOLE_TRANSLATIONS=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+CONFIG_DEVKMEM=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_KS8695=y
+CONFIG_SERIAL_KS8695_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+# CONFIG_IPMI_HANDLER is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_NVRAM is not set
+# CONFIG_R3964 is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_ACS5KCAN=y
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_HELPER_AUTO=y
+CONFIG_I2C_ALGOBIT=y
+
+#
+# I2C Hardware Bus support
+#
+
+#
+# I2C system bus drivers (mostly embedded / system-on-chip)
+#
+CONFIG_I2C_GPIO=y
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_SIMTEC is not set
+
+#
+# External I2C/SMBus adapter drivers
+#
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_TAOS_EVM is not set
+
+#
+# Other I2C/SMBus bus drivers
+#
+# CONFIG_I2C_PCA_PLATFORM is not set
+# CONFIG_I2C_STUB is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_DS1682 is not set
+# CONFIG_AT24 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_PCF8575 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_TPS65010 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_SENSORS_TSL2550 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+# CONFIG_SPI is not set
+CONFIG_ARCH_REQUIRE_GPIOLIB=y
+CONFIG_GPIOLIB=y
+# CONFIG_DEBUG_GPIO is not set
+CONFIG_GPIO_SYSFS=y
+
+#
+# I2C GPIO expanders:
+#
+# CONFIG_GPIO_MAX732X is not set
+CONFIG_GPIO_PCA953X=y
+# CONFIG_GPIO_PCF857X is not set
+
+#
+# PCI GPIO expanders:
+#
+
+#
+# SPI GPIO expanders:
+#
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
+CONFIG_WATCHDOG=y
+# CONFIG_WATCHDOG_NOWAYOUT is not set
+
+#
+# Watchdog Device Drivers
+#
+# CONFIG_SOFT_WATCHDOG is not set
+CONFIG_KS8695_WATCHDOG=y
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_CORE is not set
+# CONFIG_MFD_SM501 is not set
+# CONFIG_MFD_ASIC3 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_MFD_T7L66XB is not set
+# CONFIG_MFD_TC6387XB is not set
+# CONFIG_MFD_TC6393XB is not set
+
+#
+# Multimedia devices
+#
+
+#
+# Multimedia core support
+#
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_DVB_CORE is not set
+# CONFIG_VIDEO_MEDIA is not set
+
+#
+# Multimedia drivers
+#
+# CONFIG_DAB is not set
+
+#
+# Graphics support
+#
+# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
+# CONFIG_FB is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+# CONFIG_SOUND is not set
+# CONFIG_HID_SUPPORT is not set
+# CONFIG_USB_SUPPORT is not set
+# CONFIG_MMC is not set
+# CONFIG_NEW_LEDS is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1374 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_X1205 is not set
+CONFIG_RTC_DRV_PCF8563=y
+# CONFIG_RTC_DRV_PCF8583 is not set
+# CONFIG_RTC_DRV_M41T80 is not set
+# CONFIG_RTC_DRV_S35390A is not set
+# CONFIG_RTC_DRV_FM3130 is not set
+
+#
+# SPI RTC drivers
+#
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1511 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+# CONFIG_DMADEVICES is not set
+
+#
+# Voltage and Current regulators
+#
+# CONFIG_REGULATOR is not set
+# CONFIG_REGULATOR_FIXED_VOLTAGE is not set
+# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
+# CONFIG_REGULATOR_BQ24022 is not set
+# CONFIG_UIO is not set
+
+#
+# File systems
+#
+# CONFIG_EXT2_FS is not set
+# CONFIG_EXT3_FS is not set
+# CONFIG_EXT4DEV_FS is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_OCFS2_FS is not set
+CONFIG_DNOTIFY=y
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+# CONFIG_MSDOS_FS is not set
+# CONFIG_VFAT_FS is not set
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+CONFIG_JFFS2_SUMMARY=y
+# CONFIG_JFFS2_FS_XATTR is not set
+CONFIG_JFFS2_COMPRESSION_OPTIONS=y
+CONFIG_JFFS2_ZLIB=y
+# CONFIG_JFFS2_LZO is not set
+CONFIG_JFFS2_RTIME=y
+CONFIG_JFFS2_RUBIN=y
+# CONFIG_JFFS2_CMODE_NONE is not set
+CONFIG_JFFS2_CMODE_PRIORITY=y
+# CONFIG_JFFS2_CMODE_SIZE is not set
+# CONFIG_JFFS2_CMODE_FAVOURLZO is not set
+# CONFIG_CRAMFS is not set
+CONFIG_SQUASHFS=y
+# CONFIG_SQUASHFS_EMBEDDED is not set
+CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
+# CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_OMFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+# CONFIG_NETWORK_FILESYSTEMS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_NLS is not set
+# CONFIG_DLM is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_FRAME_WARN=1024
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_DETECT_SOFTLOCKUP=y
+# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
+CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
+CONFIG_SCHED_DEBUG=y
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_TIMER_STATS is not set
+# CONFIG_DEBUG_OBJECTS is not set
+# CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+CONFIG_DEBUG_MUTEXES=y
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+# CONFIG_LOCK_STAT is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_WRITECOUNT is not set
+CONFIG_DEBUG_MEMORY_INIT=y
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_BACKTRACE_SELF_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_LATENCYTOP is not set
+# CONFIG_SYSCTL_SYSCALL_CHECK is not set
+CONFIG_HAVE_FTRACE=y
+CONFIG_HAVE_DYNAMIC_FTRACE=y
+# CONFIG_FTRACE is not set
+# CONFIG_SCHED_TRACER is not set
+# CONFIG_CONTEXT_SWITCH_TRACER is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_KGDB is not set
+CONFIG_DEBUG_USER=y
+# CONFIG_DEBUG_ERRORS is not set
+# CONFIG_DEBUG_STACK_USAGE is not set
+# CONFIG_DEBUG_LL is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+# CONFIG_CRYPTO is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+# CONFIG_GENERIC_FIND_FIRST_BIT is not set
+# CONFIG_GENERIC_FIND_NEXT_BIT is not set
+# CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_T10DIF is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
index b1cd331aaecf27d3bc39f310af44df52833f2253..c66dd399e426fcba5b81807e2037b7510beb974d 100644 (file)
@@ -89,7 +89,6 @@ CONFIG_SA1100_ASSABET=y
 # CONFIG_SA1100_COLLIE is not set
 # CONFIG_SA1100_H3100 is not set
 # CONFIG_SA1100_H3600 is not set
-# CONFIG_SA1100_H3800 is not set
 # CONFIG_SA1100_BADGE4 is not set
 # CONFIG_SA1100_JORNADA720 is not set
 # CONFIG_SA1100_HACKKIT is not set
index 80222feb7dad52bd24e9451cb0c51f2833e11126..f264846218a2a7760674e981b2cea53510980c1c 100644 (file)
@@ -91,7 +91,6 @@ CONFIG_ARCH_SA1100=y
 # CONFIG_SA1100_COLLIE is not set
 # CONFIG_SA1100_H3100 is not set
 # CONFIG_SA1100_H3600 is not set
-# CONFIG_SA1100_H3800 is not set
 CONFIG_SA1100_BADGE4=y
 # CONFIG_SA1100_JORNADA720 is not set
 # CONFIG_SA1100_HACKKIT is not set
index ee130b528bd4ef748af6364ba4887b5e7a19d47f..2b4c0668b1b4d3fa70e1dc67998957f3bf5b6b8a 100644 (file)
@@ -93,7 +93,6 @@ CONFIG_SA1100_CERF_FLASH_16MB=y
 # CONFIG_SA1100_COLLIE is not set
 # CONFIG_SA1100_H3100 is not set
 # CONFIG_SA1100_H3600 is not set
-# CONFIG_SA1100_H3800 is not set
 # CONFIG_SA1100_BADGE4 is not set
 # CONFIG_SA1100_JORNADA720 is not set
 # CONFIG_SA1100_HACKKIT is not set
similarity index 83%
rename from arch/arm/configs/xm_x2xx_defconfig
rename to arch/arm/configs/cm_x2xx_defconfig
index 1039f366bf8dc49122500c0c763d11d8a0ba7404..797b790cba78f9f23348fd19a0778687669da994 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.27-rc8
-# Sun Oct  5 11:05:36 2008
+# Linux kernel version: 2.6.29-rc2
+# Sun Feb  1 16:31:36 2009
 #
 CONFIG_ARM=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -22,7 +22,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 # CONFIG_ARCH_HAS_ILOG2_U64 is not set
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
-CONFIG_ARCH_SUPPORTS_AOUT=y
 CONFIG_ZONE_DMA=y
 CONFIG_ARCH_MTD_XIP=y
 CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
@@ -47,12 +46,12 @@ CONFIG_SYSVIPC_SYSCTL=y
 CONFIG_IKCONFIG=y
 CONFIG_IKCONFIG_PROC=y
 CONFIG_LOG_BUF_SHIFT=14
-# CONFIG_CGROUPS is not set
 CONFIG_GROUP_SCHED=y
 CONFIG_FAIR_GROUP_SCHED=y
 # CONFIG_RT_GROUP_SCHED is not set
 CONFIG_USER_SCHED=y
 # CONFIG_CGROUP_SCHED is not set
+# CONFIG_CGROUPS is not set
 CONFIG_SYSFS_DEPRECATED=y
 CONFIG_SYSFS_DEPRECATED_V2=y
 # CONFIG_RELAY is not set
@@ -80,27 +79,21 @@ CONFIG_SIGNALFD=y
 CONFIG_TIMERFD=y
 CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
+CONFIG_AIO=y
 # CONFIG_VM_EVENT_COUNTERS is not set
+CONFIG_PCI_QUIRKS=y
 # CONFIG_SLUB_DEBUG is not set
 # CONFIG_SLAB is not set
 CONFIG_SLUB=y
 # CONFIG_SLOB is not set
 # CONFIG_PROFILING is not set
-# CONFIG_MARKERS is not set
 CONFIG_HAVE_OPROFILE=y
 # CONFIG_KPROBES is not set
-# CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set
-# CONFIG_HAVE_IOREMAP_PROT is not set
 CONFIG_HAVE_KPROBES=y
 CONFIG_HAVE_KRETPROBES=y
-# CONFIG_HAVE_ARCH_TRACEHOOK is not set
-# CONFIG_HAVE_DMA_ATTRS is not set
-# CONFIG_USE_GENERIC_SMP_HELPERS is not set
 CONFIG_HAVE_CLK=y
-# CONFIG_PROC_PAGE_MONITOR is not set
 CONFIG_HAVE_GENERIC_DMA_COHERENT=y
 CONFIG_RT_MUTEXES=y
-# CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 CONFIG_MODULES=y
 # CONFIG_MODULE_FORCE_LOAD is not set
@@ -108,11 +101,9 @@ CONFIG_MODULE_UNLOAD=y
 # CONFIG_MODULE_FORCE_UNLOAD is not set
 # CONFIG_MODVERSIONS is not set
 # CONFIG_MODULE_SRCVERSION_ALL is not set
-CONFIG_KMOD=y
 CONFIG_BLOCK=y
 # CONFIG_LBD is not set
 # CONFIG_BLK_DEV_IO_TRACE is not set
-# CONFIG_LSF is not set
 # CONFIG_BLK_DEV_BSG is not set
 # CONFIG_BLK_DEV_INTEGRITY is not set
 
@@ -129,6 +120,11 @@ CONFIG_DEFAULT_CFQ=y
 # CONFIG_DEFAULT_NOOP is not set
 CONFIG_DEFAULT_IOSCHED="cfq"
 CONFIG_CLASSIC_RCU=y
+# CONFIG_TREE_RCU is not set
+# CONFIG_PREEMPT_RCU is not set
+# CONFIG_TREE_RCU_TRACE is not set
+# CONFIG_PREEMPT_RCU_TRACE is not set
+CONFIG_FREEZER=y
 
 #
 # System Type
@@ -138,7 +134,6 @@ CONFIG_CLASSIC_RCU=y
 # CONFIG_ARCH_REALVIEW is not set
 # CONFIG_ARCH_VERSATILE is not set
 # CONFIG_ARCH_AT91 is not set
-# CONFIG_ARCH_CLPS7500 is not set
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_EBSA110 is not set
 # CONFIG_ARCH_EP93XX is not set
@@ -165,17 +160,19 @@ CONFIG_ARCH_PXA=y
 # CONFIG_ARCH_RPC is not set
 # CONFIG_ARCH_SA1100 is not set
 # CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_S3C64XX is not set
 # CONFIG_ARCH_SHARK is not set
 # CONFIG_ARCH_LH7A40X is not set
 # CONFIG_ARCH_DAVINCI is not set
 # CONFIG_ARCH_OMAP is not set
-# CONFIG_ARCH_MSM7X00A is not set
-CONFIG_DMABOUNCE=y
+# CONFIG_ARCH_MSM is not set
+# CONFIG_ARCH_W90X900 is not set
 
 #
 # Intel PXA2xx/PXA3xx Implementations
 #
 # CONFIG_ARCH_GUMSTIX is not set
+# CONFIG_MACH_INTELMOTE2 is not set
 # CONFIG_ARCH_LUBBOCK is not set
 # CONFIG_MACH_LOGICPD_PXA270 is not set
 # CONFIG_MACH_MAINSTONE is not set
@@ -185,7 +182,9 @@ CONFIG_DMABOUNCE=y
 # CONFIG_ARCH_VIPER is not set
 # CONFIG_ARCH_PXA_ESERIES is not set
 # CONFIG_TRIZEPS_PXA is not set
-CONFIG_MACH_EM_X270=y
+# CONFIG_MACH_H5000 is not set
+# CONFIG_MACH_EM_X270 is not set
+# CONFIG_MACH_EXEDA is not set
 # CONFIG_MACH_COLIBRI is not set
 # CONFIG_MACH_ZYLONITE is not set
 # CONFIG_MACH_LITTLETON is not set
@@ -203,14 +202,6 @@ CONFIG_PXA27x=y
 CONFIG_PXA_SSP=y
 # CONFIG_PXA_PWM is not set
 
-#
-# Boot options
-#
-
-#
-# Power management
-#
-
 #
 # Processor Type
 #
@@ -232,6 +223,8 @@ CONFIG_ARM_THUMB=y
 # CONFIG_OUTER_CACHE is not set
 CONFIG_IWMMXT=y
 CONFIG_XSCALE_PMU=y
+CONFIG_DMABOUNCE=y
+CONFIG_COMMON_CLKDEV=y
 
 #
 # Bus support
@@ -242,6 +235,7 @@ CONFIG_PCI_HOST_ITE8152=y
 # CONFIG_ARCH_SUPPORTS_MSI is not set
 CONFIG_PCI_LEGACY=y
 # CONFIG_PCI_DEBUG is not set
+# CONFIG_PCI_STUB is not set
 CONFIG_PCCARD=m
 # CONFIG_PCMCIA_DEBUG is not set
 CONFIG_PCMCIA=m
@@ -287,14 +281,13 @@ CONFIG_FLATMEM_MANUAL=y
 # CONFIG_SPARSEMEM_MANUAL is not set
 CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
-# CONFIG_SPARSEMEM_STATIC is not set
-# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
 CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_SPLIT_PTLOCK_CPUS=4096
-# CONFIG_RESOURCES_64BIT is not set
+# CONFIG_PHYS_ADDR_T_64BIT is not set
 CONFIG_ZONE_DMA_FLAG=1
 CONFIG_BOUNCE=y
 CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
 CONFIG_ALIGNMENT_TRAP=y
 
 #
@@ -327,6 +320,8 @@ CONFIG_FPE_NWFPE=y
 # Userspace binary formats
 #
 CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+CONFIG_HAVE_AOUT=y
 # CONFIG_BINFMT_AOUT is not set
 # CONFIG_BINFMT_MISC is not set
 
@@ -345,6 +340,7 @@ CONFIG_NET=y
 #
 # Networking options
 #
+CONFIG_COMPAT_NET_DEV_OPS=y
 CONFIG_PACKET=y
 CONFIG_PACKET_MMAP=y
 CONFIG_UNIX=y
@@ -389,6 +385,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
 # CONFIG_TIPC is not set
 # CONFIG_ATM is not set
 # CONFIG_BRIDGE is not set
+# CONFIG_NET_DSA is not set
 # CONFIG_VLAN_8021Q is not set
 # CONFIG_DECNET is not set
 # CONFIG_LLC2 is not set
@@ -399,6 +396,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
 # CONFIG_NET_SCHED is not set
+# CONFIG_DCB is not set
 
 #
 # Network testing
@@ -420,8 +418,6 @@ CONFIG_BT_HIDP=m
 #
 # Bluetooth device drivers
 #
-CONFIG_BT_HCIUSB=m
-CONFIG_BT_HCIUSB_SCO=y
 # CONFIG_BT_HCIBTUSB is not set
 # CONFIG_BT_HCIBTSDIO is not set
 # CONFIG_BT_HCIUART is not set
@@ -434,15 +430,15 @@ CONFIG_BT_HCIUSB_SCO=y
 # CONFIG_BT_HCIBTUART is not set
 # CONFIG_BT_HCIVHCI is not set
 # CONFIG_AF_RXRPC is not set
-
-#
-# Wireless
-#
+# CONFIG_PHONET is not set
+CONFIG_WIRELESS=y
 # CONFIG_CFG80211 is not set
+CONFIG_WIRELESS_OLD_REGULATORY=y
 CONFIG_WIRELESS_EXT=y
 CONFIG_WIRELESS_EXT_SYSFS=y
+CONFIG_LIB80211=m
 # CONFIG_MAC80211 is not set
-# CONFIG_IEEE80211 is not set
+# CONFIG_WIMAX is not set
 # CONFIG_RFKILL is not set
 # CONFIG_NET_9P is not set
 
@@ -467,6 +463,7 @@ CONFIG_MTD=y
 # CONFIG_MTD_DEBUG is not set
 # CONFIG_MTD_CONCAT is not set
 CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_TESTS is not set
 # CONFIG_MTD_REDBOOT_PARTS is not set
 CONFIG_MTD_CMDLINE_PARTS=y
 # CONFIG_MTD_AFS_PARTS is not set
@@ -521,9 +518,7 @@ CONFIG_MTD_CFI_UTIL=y
 #
 # CONFIG_MTD_COMPLEX_MAPPINGS is not set
 CONFIG_MTD_PHYSMAP=y
-CONFIG_MTD_PHYSMAP_START=0x0
-CONFIG_MTD_PHYSMAP_LEN=0x400000
-CONFIG_MTD_PHYSMAP_BANKWIDTH=2
+# CONFIG_MTD_PHYSMAP_COMPAT is not set
 CONFIG_MTD_PXA2XX=y
 # CONFIG_MTD_ARM_INTEGRATOR is not set
 # CONFIG_MTD_IMPA7 is not set
@@ -535,6 +530,8 @@ CONFIG_MTD_PXA2XX=y
 # Self-contained MTD device drivers
 #
 # CONFIG_MTD_PMC551 is not set
+# CONFIG_MTD_DATAFLASH is not set
+# CONFIG_MTD_M25P80 is not set
 # CONFIG_MTD_SLRAM is not set
 # CONFIG_MTD_PHRAM is not set
 # CONFIG_MTD_MTDRAM is not set
@@ -562,6 +559,12 @@ CONFIG_MTD_NAND_PLATFORM=y
 # CONFIG_MTD_ALAUDA is not set
 # CONFIG_MTD_ONENAND is not set
 
+#
+# LPDDR flash memory drivers
+#
+# CONFIG_MTD_LPDDR is not set
+# CONFIG_MTD_QINFO_PROBE is not set
+
 #
 # UBI - Unsorted block images
 #
@@ -642,6 +645,8 @@ CONFIG_SCSI_LOWLEVEL=y
 # CONFIG_MEGARAID_LEGACY is not set
 # CONFIG_MEGARAID_SAS is not set
 # CONFIG_SCSI_HPTIOP is not set
+# CONFIG_LIBFC is not set
+# CONFIG_FCOE is not set
 # CONFIG_SCSI_DMX3191D is not set
 # CONFIG_SCSI_FUTURE_DOMAIN is not set
 # CONFIG_SCSI_IPS is not set
@@ -756,26 +761,30 @@ CONFIG_MII=y
 CONFIG_DM9000=y
 CONFIG_DM9000_DEBUGLEVEL=1
 # CONFIG_DM9000_FORCE_SIMPLE_PHY_POLL is not set
+# CONFIG_ENC28J60 is not set
 # CONFIG_SMC911X is not set
+# CONFIG_SMSC911X is not set
 # CONFIG_NET_TULIP is not set
 # CONFIG_HP100 is not set
 # CONFIG_IBM_NEW_EMAC_ZMII is not set
 # CONFIG_IBM_NEW_EMAC_RGMII is not set
 # CONFIG_IBM_NEW_EMAC_TAH is not set
 # CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
 CONFIG_NET_PCI=y
 # CONFIG_PCNET32 is not set
 # CONFIG_AMD8111_ETH is not set
 # CONFIG_ADAPTEC_STARFIRE is not set
 # CONFIG_B44 is not set
 # CONFIG_FORCEDETH is not set
-# CONFIG_EEPRO100 is not set
 # CONFIG_E100 is not set
 # CONFIG_FEALNX is not set
 # CONFIG_NATSEMI is not set
 # CONFIG_NE2K_PCI is not set
 # CONFIG_8139CP is not set
-CONFIG_8139TOO=y
+CONFIG_8139TOO=m
 # CONFIG_8139TOO_PIO is not set
 # CONFIG_8139TOO_TUNE_TWISTER is not set
 # CONFIG_8139TOO_8129 is not set
@@ -783,10 +792,12 @@ CONFIG_8139TOO=y
 # CONFIG_R6040 is not set
 # CONFIG_SIS900 is not set
 # CONFIG_EPIC100 is not set
+# CONFIG_SMSC9420 is not set
 # CONFIG_SUNDANCE is not set
 # CONFIG_TLAN is not set
 # CONFIG_VIA_RHINE is not set
 # CONFIG_SC92031 is not set
+# CONFIG_ATL2 is not set
 # CONFIG_NETDEV_1000 is not set
 # CONFIG_NETDEV_10000 is not set
 # CONFIG_TR is not set
@@ -797,8 +808,6 @@ CONFIG_8139TOO=y
 # CONFIG_WLAN_PRE80211 is not set
 CONFIG_WLAN_80211=y
 # CONFIG_PCMCIA_RAYCS is not set
-# CONFIG_IPW2100 is not set
-# CONFIG_IPW2200 is not set
 CONFIG_LIBERTAS=m
 # CONFIG_LIBERTAS_USB is not set
 # CONFIG_LIBERTAS_CS is not set
@@ -811,9 +820,15 @@ CONFIG_LIBERTAS_SDIO=m
 # CONFIG_PRISM54 is not set
 # CONFIG_USB_ZD1201 is not set
 # CONFIG_USB_NET_RNDIS_WLAN is not set
+# CONFIG_IPW2100 is not set
+# CONFIG_IPW2200 is not set
 # CONFIG_IWLWIFI_LEDS is not set
 # CONFIG_HOSTAP is not set
 
+#
+# Enable WiMAX (Networking options) to see the WiMAX drivers
+#
+
 #
 # USB Network Adapters
 #
@@ -879,22 +894,22 @@ CONFIG_KEYBOARD_PXA27x=m
 # CONFIG_INPUT_JOYSTICK is not set
 # CONFIG_INPUT_TABLET is not set
 CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_ADS7846 is not set
 # CONFIG_TOUCHSCREEN_FUJITSU is not set
 # CONFIG_TOUCHSCREEN_GUNZE is not set
 # CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set
 # CONFIG_TOUCHSCREEN_MTOUCH is not set
 # CONFIG_TOUCHSCREEN_INEXIO is not set
 # CONFIG_TOUCHSCREEN_MK712 is not set
 # CONFIG_TOUCHSCREEN_PENMOUNT is not set
 # CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
 # CONFIG_TOUCHSCREEN_TOUCHWIN is not set
-CONFIG_TOUCHSCREEN_WM97XX=m
-# CONFIG_TOUCHSCREEN_WM9705 is not set
-CONFIG_TOUCHSCREEN_WM9712=y
-# CONFIG_TOUCHSCREEN_WM9713 is not set
-# CONFIG_TOUCHSCREEN_WM97XX_MAINSTONE is not set
+CONFIG_TOUCHSCREEN_UCB1400=m
+# CONFIG_TOUCHSCREEN_WM97XX is not set
 # CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
 # CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
+# CONFIG_TOUCHSCREEN_TSC2007 is not set
 # CONFIG_INPUT_MISC is not set
 
 #
@@ -933,6 +948,7 @@ CONFIG_SERIAL_CORE=y
 CONFIG_SERIAL_CORE_CONSOLE=y
 # CONFIG_SERIAL_JSM is not set
 CONFIG_UNIX98_PTYS=y
+# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
 CONFIG_LEGACY_PTYS=y
 CONFIG_LEGACY_PTY_COUNT=16
 # CONFIG_IPMI_HANDLER is not set
@@ -1009,25 +1025,44 @@ CONFIG_I2C_PXA=y
 # Miscellaneous I2C Chip support
 #
 # CONFIG_DS1682 is not set
-# CONFIG_EEPROM_AT24 is not set
-# CONFIG_EEPROM_LEGACY is not set
+# CONFIG_AT24 is not set
+# CONFIG_SENSORS_EEPROM is not set
 # CONFIG_SENSORS_PCF8574 is not set
 # CONFIG_PCF8575 is not set
 # CONFIG_SENSORS_PCA9539 is not set
 # CONFIG_SENSORS_PCF8591 is not set
-# CONFIG_TPS65010 is not set
 # CONFIG_SENSORS_MAX6875 is not set
 # CONFIG_SENSORS_TSL2550 is not set
 # CONFIG_I2C_DEBUG_CORE is not set
 # CONFIG_I2C_DEBUG_ALGO is not set
 # CONFIG_I2C_DEBUG_BUS is not set
 # CONFIG_I2C_DEBUG_CHIP is not set
-# CONFIG_SPI is not set
+CONFIG_SPI=y
+# CONFIG_SPI_DEBUG is not set
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+# CONFIG_SPI_BITBANG is not set
+# CONFIG_SPI_GPIO is not set
+CONFIG_SPI_PXA2XX=m
+
+#
+# SPI Protocol Masters
+#
+# CONFIG_SPI_AT25 is not set
+# CONFIG_SPI_SPIDEV is not set
+# CONFIG_SPI_TLE62X0 is not set
 CONFIG_ARCH_REQUIRE_GPIOLIB=y
 CONFIG_GPIOLIB=y
 # CONFIG_DEBUG_GPIO is not set
 # CONFIG_GPIO_SYSFS is not set
 
+#
+# Memory mapped GPIO expanders:
+#
+
 #
 # I2C GPIO expanders:
 #
@@ -1043,17 +1078,19 @@ CONFIG_GPIOLIB=y
 #
 # SPI GPIO expanders:
 #
+# CONFIG_GPIO_MAX7301 is not set
+# CONFIG_GPIO_MCP23S08 is not set
 # CONFIG_W1 is not set
 # CONFIG_POWER_SUPPLY is not set
 # CONFIG_HWMON is not set
 # CONFIG_THERMAL is not set
 # CONFIG_THERMAL_HWMON is not set
 # CONFIG_WATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
 
 #
 # Sonics Silicon Backplane
 #
-CONFIG_SSB_POSSIBLE=y
 # CONFIG_SSB is not set
 
 #
@@ -1064,11 +1101,17 @@ CONFIG_SSB_POSSIBLE=y
 # CONFIG_MFD_ASIC3 is not set
 # CONFIG_HTC_EGPIO is not set
 # CONFIG_HTC_PASIC3 is not set
-# CONFIG_UCB1400_CORE is not set
+CONFIG_UCB1400_CORE=m
+# CONFIG_TPS65010 is not set
+# CONFIG_TWL4030_CORE is not set
 # CONFIG_MFD_TMIO is not set
 # CONFIG_MFD_T7L66XB is not set
 # CONFIG_MFD_TC6387XB is not set
 # CONFIG_MFD_TC6393XB is not set
+# CONFIG_PMIC_DA903X is not set
+# CONFIG_MFD_WM8400 is not set
+# CONFIG_MFD_WM8350_I2C is not set
+# CONFIG_MFD_PCF50633 is not set
 
 #
 # Multimedia devices
@@ -1077,13 +1120,117 @@ CONFIG_SSB_POSSIBLE=y
 #
 # Multimedia core support
 #
-# CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_DEV=m
+CONFIG_VIDEO_V4L2_COMMON=m
+# CONFIG_VIDEO_ALLOW_V4L1 is not set
+CONFIG_VIDEO_V4L1_COMPAT=y
 # CONFIG_DVB_CORE is not set
-# CONFIG_VIDEO_MEDIA is not set
+CONFIG_VIDEO_MEDIA=m
 
 #
 # Multimedia drivers
 #
+# CONFIG_MEDIA_ATTACH is not set
+CONFIG_MEDIA_TUNER=m
+CONFIG_MEDIA_TUNER_CUSTOMIZE=y
+# CONFIG_MEDIA_TUNER_SIMPLE is not set
+# CONFIG_MEDIA_TUNER_TDA8290 is not set
+# CONFIG_MEDIA_TUNER_TDA827X is not set
+# CONFIG_MEDIA_TUNER_TDA18271 is not set
+# CONFIG_MEDIA_TUNER_TDA9887 is not set
+# CONFIG_MEDIA_TUNER_TEA5761 is not set
+# CONFIG_MEDIA_TUNER_TEA5767 is not set
+# CONFIG_MEDIA_TUNER_MT20XX is not set
+# CONFIG_MEDIA_TUNER_MT2060 is not set
+# CONFIG_MEDIA_TUNER_MT2266 is not set
+# CONFIG_MEDIA_TUNER_MT2131 is not set
+# CONFIG_MEDIA_TUNER_QT1010 is not set
+# CONFIG_MEDIA_TUNER_XC2028 is not set
+# CONFIG_MEDIA_TUNER_XC5000 is not set
+# CONFIG_MEDIA_TUNER_MXL5005S is not set
+# CONFIG_MEDIA_TUNER_MXL5007T is not set
+CONFIG_VIDEO_V4L2=m
+CONFIG_VIDEOBUF_GEN=m
+CONFIG_VIDEOBUF_DMA_SG=m
+CONFIG_VIDEO_CAPTURE_DRIVERS=y
+# CONFIG_VIDEO_ADV_DEBUG is not set
+# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
+# CONFIG_VIDEO_HELPER_CHIPS_AUTO is not set
+
+#
+# Encoders/decoders and other helper chips
+#
+
+#
+# Audio decoders
+#
+# CONFIG_VIDEO_TVAUDIO is not set
+# CONFIG_VIDEO_TDA7432 is not set
+# CONFIG_VIDEO_TDA9840 is not set
+# CONFIG_VIDEO_TDA9875 is not set
+# CONFIG_VIDEO_TEA6415C is not set
+# CONFIG_VIDEO_TEA6420 is not set
+# CONFIG_VIDEO_MSP3400 is not set
+# CONFIG_VIDEO_CS5345 is not set
+# CONFIG_VIDEO_CS53L32A is not set
+# CONFIG_VIDEO_M52790 is not set
+# CONFIG_VIDEO_TLV320AIC23B is not set
+# CONFIG_VIDEO_WM8775 is not set
+# CONFIG_VIDEO_WM8739 is not set
+# CONFIG_VIDEO_VP27SMPX is not set
+
+#
+# Video decoders
+#
+# CONFIG_VIDEO_OV7670 is not set
+# CONFIG_VIDEO_TCM825X is not set
+# CONFIG_VIDEO_SAA711X is not set
+# CONFIG_VIDEO_SAA717X is not set
+# CONFIG_VIDEO_TVP514X is not set
+# CONFIG_VIDEO_TVP5150 is not set
+
+#
+# Video and audio decoders
+#
+# CONFIG_VIDEO_CX25840 is not set
+
+#
+# MPEG video encoders
+#
+# CONFIG_VIDEO_CX2341X is not set
+
+#
+# Video encoders
+#
+# CONFIG_VIDEO_SAA7127 is not set
+
+#
+# Video improvement chips
+#
+# CONFIG_VIDEO_UPD64031A is not set
+# CONFIG_VIDEO_UPD64083 is not set
+# CONFIG_VIDEO_VIVI is not set
+# CONFIG_VIDEO_BT848 is not set
+# CONFIG_VIDEO_SAA5246A is not set
+# CONFIG_VIDEO_SAA5249 is not set
+# CONFIG_VIDEO_SAA7134 is not set
+# CONFIG_VIDEO_HEXIUM_ORION is not set
+# CONFIG_VIDEO_HEXIUM_GEMINI is not set
+# CONFIG_VIDEO_CX88 is not set
+# CONFIG_VIDEO_IVTV is not set
+# CONFIG_VIDEO_CAFE_CCIC is not set
+CONFIG_SOC_CAMERA=m
+# CONFIG_SOC_CAMERA_MT9M001 is not set
+CONFIG_SOC_CAMERA_MT9M111=m
+# CONFIG_SOC_CAMERA_MT9T031 is not set
+# CONFIG_SOC_CAMERA_MT9V022 is not set
+# CONFIG_SOC_CAMERA_TW9910 is not set
+# CONFIG_SOC_CAMERA_PLATFORM is not set
+# CONFIG_SOC_CAMERA_OV772X is not set
+CONFIG_VIDEO_PXA27x=m
+# CONFIG_VIDEO_SH_MOBILE_CEU is not set
+# CONFIG_V4L_USB_DRIVERS is not set
+# CONFIG_RADIO_ADAPTERS is not set
 # CONFIG_DAB is not set
 
 #
@@ -1095,6 +1242,7 @@ CONFIG_SSB_POSSIBLE=y
 CONFIG_FB=y
 # CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB_DDC is not set
+# CONFIG_FB_BOOT_VESA_SUPPORT is not set
 CONFIG_FB_CFB_FILLRECT=y
 CONFIG_FB_CFB_COPYAREA=y
 CONFIG_FB_CFB_IMAGEBLIT=y
@@ -1128,6 +1276,7 @@ CONFIG_FB_CFB_IMAGEBLIT=y
 # CONFIG_FB_S3 is not set
 # CONFIG_FB_SAVAGE is not set
 # CONFIG_FB_SIS is not set
+# CONFIG_FB_VIA is not set
 # CONFIG_FB_NEOMAGIC is not set
 # CONFIG_FB_KYRO is not set
 # CONFIG_FB_3DFX is not set
@@ -1138,13 +1287,17 @@ CONFIG_FB_CFB_IMAGEBLIT=y
 # CONFIG_FB_PM3 is not set
 # CONFIG_FB_CARMINE is not set
 CONFIG_FB_PXA=y
+# CONFIG_FB_PXA_OVERLAY is not set
 # CONFIG_FB_PXA_SMARTPANEL is not set
 CONFIG_FB_PXA_PARAMETERS=y
 CONFIG_FB_MBX=m
 # CONFIG_FB_W100 is not set
 # CONFIG_FB_VIRTUAL is not set
 # CONFIG_FB_METRONOME is not set
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+# CONFIG_FB_MB862XX is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+# CONFIG_LCD_CLASS_DEVICE is not set
+# CONFIG_BACKLIGHT_CLASS_DEVICE is not set
 
 #
 # Display device support
@@ -1167,6 +1320,7 @@ CONFIG_LOGO_LINUX_MONO=y
 CONFIG_LOGO_LINUX_VGA16=y
 CONFIG_LOGO_LINUX_CLUT224=y
 CONFIG_SOUND=m
+CONFIG_SOUND_OSS_CORE=y
 CONFIG_SND=m
 CONFIG_SND_TIMER=m
 CONFIG_SND_PCM=m
@@ -1182,81 +1336,16 @@ CONFIG_SND_VERBOSE_PROCFS=y
 # CONFIG_SND_DEBUG is not set
 CONFIG_SND_VMASTER=y
 CONFIG_SND_AC97_CODEC=m
-CONFIG_SND_DRIVERS=y
-# CONFIG_SND_DUMMY is not set
-# CONFIG_SND_MTPAV is not set
-# CONFIG_SND_SERIAL_U16550 is not set
-# CONFIG_SND_MPU401 is not set
-# CONFIG_SND_AC97_POWER_SAVE is not set
-CONFIG_SND_PCI=y
-# CONFIG_SND_AD1889 is not set
-# CONFIG_SND_ALS300 is not set
-# CONFIG_SND_ALI5451 is not set
-# CONFIG_SND_ATIIXP is not set
-# CONFIG_SND_ATIIXP_MODEM is not set
-# CONFIG_SND_AU8810 is not set
-# CONFIG_SND_AU8820 is not set
-# CONFIG_SND_AU8830 is not set
-# CONFIG_SND_AW2 is not set
-# CONFIG_SND_AZT3328 is not set
-# CONFIG_SND_BT87X is not set
-# CONFIG_SND_CA0106 is not set
-# CONFIG_SND_CMIPCI is not set
-# CONFIG_SND_OXYGEN is not set
-# CONFIG_SND_CS4281 is not set
-# CONFIG_SND_CS46XX is not set
-# CONFIG_SND_DARLA20 is not set
-# CONFIG_SND_GINA20 is not set
-# CONFIG_SND_LAYLA20 is not set
-# CONFIG_SND_DARLA24 is not set
-# CONFIG_SND_GINA24 is not set
-# CONFIG_SND_LAYLA24 is not set
-# CONFIG_SND_MONA is not set
-# CONFIG_SND_MIA is not set
-# CONFIG_SND_ECHO3G is not set
-# CONFIG_SND_INDIGO is not set
-# CONFIG_SND_INDIGOIO is not set
-# CONFIG_SND_INDIGODJ is not set
-# CONFIG_SND_EMU10K1 is not set
-# CONFIG_SND_EMU10K1X is not set
-# CONFIG_SND_ENS1370 is not set
-# CONFIG_SND_ENS1371 is not set
-# CONFIG_SND_ES1938 is not set
-# CONFIG_SND_ES1968 is not set
-# CONFIG_SND_FM801 is not set
-# CONFIG_SND_HDA_INTEL is not set
-# CONFIG_SND_HDSP is not set
-# CONFIG_SND_HDSPM is not set
-# CONFIG_SND_HIFIER is not set
-# CONFIG_SND_ICE1712 is not set
-# CONFIG_SND_ICE1724 is not set
-# CONFIG_SND_INTEL8X0 is not set
-# CONFIG_SND_INTEL8X0M is not set
-# CONFIG_SND_KORG1212 is not set
-# CONFIG_SND_MAESTRO3 is not set
-# CONFIG_SND_MIXART is not set
-# CONFIG_SND_NM256 is not set
-# CONFIG_SND_PCXHR is not set
-# CONFIG_SND_RIPTIDE is not set
-# CONFIG_SND_RME32 is not set
-# CONFIG_SND_RME96 is not set
-# CONFIG_SND_RME9652 is not set
-# CONFIG_SND_SONICVIBES is not set
-# CONFIG_SND_TRIDENT is not set
-# CONFIG_SND_VIA82XX is not set
-# CONFIG_SND_VIA82XX_MODEM is not set
-# CONFIG_SND_VIRTUOSO is not set
-# CONFIG_SND_VX222 is not set
-# CONFIG_SND_YMFPCI is not set
+# CONFIG_SND_DRIVERS is not set
+# CONFIG_SND_PCI is not set
 CONFIG_SND_ARM=y
 CONFIG_SND_PXA2XX_PCM=m
+CONFIG_SND_PXA2XX_LIB=m
+CONFIG_SND_PXA2XX_LIB_AC97=y
 CONFIG_SND_PXA2XX_AC97=m
-CONFIG_SND_USB=y
-# CONFIG_SND_USB_AUDIO is not set
-# CONFIG_SND_USB_CAIAQ is not set
-CONFIG_SND_PCMCIA=y
-# CONFIG_SND_VXPOCKET is not set
-# CONFIG_SND_PDAUDIOCF is not set
+# CONFIG_SND_SPI is not set
+# CONFIG_SND_USB is not set
+# CONFIG_SND_PCMCIA is not set
 # CONFIG_SND_SOC is not set
 # CONFIG_SOUND_PRIME is not set
 CONFIG_AC97_BUS=m
@@ -1269,9 +1358,37 @@ CONFIG_HID_DEBUG=y
 # USB Input Devices
 #
 CONFIG_USB_HID=y
-# CONFIG_USB_HIDINPUT_POWERBOOK is not set
-# CONFIG_HID_FF is not set
+# CONFIG_HID_PID is not set
 # CONFIG_USB_HIDDEV is not set
+
+#
+# Special HID drivers
+#
+CONFIG_HID_COMPAT=y
+CONFIG_HID_A4TECH=y
+CONFIG_HID_APPLE=y
+CONFIG_HID_BELKIN=y
+CONFIG_HID_CHERRY=y
+CONFIG_HID_CHICONY=y
+CONFIG_HID_CYPRESS=y
+CONFIG_HID_EZKEY=y
+CONFIG_HID_GYRATION=y
+CONFIG_HID_LOGITECH=y
+# CONFIG_LOGITECH_FF is not set
+# CONFIG_LOGIRUMBLEPAD2_FF is not set
+CONFIG_HID_MICROSOFT=y
+CONFIG_HID_MONTEREY=y
+# CONFIG_HID_NTRIG is not set
+CONFIG_HID_PANTHERLORD=y
+# CONFIG_PANTHERLORD_FF is not set
+CONFIG_HID_PETALYNX=y
+CONFIG_HID_SAMSUNG=y
+CONFIG_HID_SONY=y
+CONFIG_HID_SUNPLUS=y
+# CONFIG_GREENASIA_FF is not set
+# CONFIG_HID_TOPSEED is not set
+# CONFIG_THRUSTMASTER_FF is not set
+# CONFIG_ZEROPLUS_FF is not set
 CONFIG_USB_SUPPORT=y
 CONFIG_USB_ARCH_HAS_HCD=y
 CONFIG_USB_ARCH_HAS_OHCI=y
@@ -1291,12 +1408,15 @@ CONFIG_USB_DEVICEFS=y
 # CONFIG_USB_OTG_WHITELIST is not set
 # CONFIG_USB_OTG_BLACKLIST_HUB is not set
 CONFIG_USB_MON=y
+# CONFIG_USB_WUSB is not set
+# CONFIG_USB_WUSB_CBAF is not set
 
 #
 # USB Host Controller Drivers
 #
 # CONFIG_USB_C67X00_HCD is not set
 # CONFIG_USB_EHCI_HCD is not set
+# CONFIG_USB_OXU210HP_HCD is not set
 # CONFIG_USB_ISP116X_HCD is not set
 # CONFIG_USB_ISP1760_HCD is not set
 CONFIG_USB_OHCI_HCD=y
@@ -1306,6 +1426,8 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
 # CONFIG_USB_UHCI_HCD is not set
 # CONFIG_USB_SL811_HCD is not set
 # CONFIG_USB_R8A66597_HCD is not set
+# CONFIG_USB_WHCI_HCD is not set
+# CONFIG_USB_HWA_HCD is not set
 # CONFIG_USB_MUSB_HDRC is not set
 
 #
@@ -1314,20 +1436,20 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
 # CONFIG_USB_ACM is not set
 # CONFIG_USB_PRINTER is not set
 # CONFIG_USB_WDM is not set
+# CONFIG_USB_TMC is not set
 
 #
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;
 #
 
 #
-# may also be needed; see USB_STORAGE Help for more information
+# see USB_STORAGE Help for more information
 #
 CONFIG_USB_STORAGE=y
 # CONFIG_USB_STORAGE_DEBUG is not set
 # CONFIG_USB_STORAGE_DATAFAB is not set
 # CONFIG_USB_STORAGE_FREECOM is not set
 # CONFIG_USB_STORAGE_ISD200 is not set
-# CONFIG_USB_STORAGE_DPCM is not set
 # CONFIG_USB_STORAGE_USBAT is not set
 # CONFIG_USB_STORAGE_SDDR09 is not set
 # CONFIG_USB_STORAGE_SDDR55 is not set
@@ -1355,6 +1477,7 @@ CONFIG_USB_STORAGE=y
 # CONFIG_USB_EMI62 is not set
 # CONFIG_USB_EMI26 is not set
 # CONFIG_USB_ADUTUX is not set
+# CONFIG_USB_SEVSEG is not set
 # CONFIG_USB_RIO500 is not set
 # CONFIG_USB_LEGOTOWER is not set
 # CONFIG_USB_LCD is not set
@@ -1371,13 +1494,20 @@ CONFIG_USB_STORAGE=y
 # CONFIG_USB_IOWARRIOR is not set
 # CONFIG_USB_TEST is not set
 # CONFIG_USB_ISIGHTFW is not set
+# CONFIG_USB_VST is not set
 # CONFIG_USB_GADGET is not set
+
+#
+# OTG and related infrastructure
+#
+# CONFIG_USB_GPIO_VBUS is not set
+# CONFIG_UWB is not set
 CONFIG_MMC=m
 # CONFIG_MMC_DEBUG is not set
 # CONFIG_MMC_UNSAFE_RESUME is not set
 
 #
-# MMC/SD Card Drivers
+# MMC/SD/SDIO Card Drivers
 #
 CONFIG_MMC_BLOCK=m
 CONFIG_MMC_BLOCK_BOUNCE=y
@@ -1385,11 +1515,12 @@ CONFIG_MMC_BLOCK_BOUNCE=y
 # CONFIG_MMC_TEST is not set
 
 #
-# MMC/SD Host Controller Drivers
+# MMC/SD/SDIO Host Controller Drivers
 #
 CONFIG_MMC_PXA=m
 # CONFIG_MMC_SDHCI is not set
 # CONFIG_MMC_TIFM_SD is not set
+# CONFIG_MMC_SPI is not set
 # CONFIG_MMC_SDRICOH_CS is not set
 # CONFIG_MEMSTICK is not set
 # CONFIG_ACCESSIBILITY is not set
@@ -1400,8 +1531,7 @@ CONFIG_LEDS_CLASS=y
 # LED drivers
 #
 # CONFIG_LEDS_PCA9532 is not set
-# CONFIG_LEDS_GPIO is not set
-CONFIG_LEDS_CM_X270=y
+CONFIG_LEDS_GPIO=m
 # CONFIG_LEDS_PCA955X is not set
 
 #
@@ -1410,6 +1540,7 @@ CONFIG_LEDS_CM_X270=y
 CONFIG_LEDS_TRIGGERS=y
 # CONFIG_LEDS_TRIGGER_TIMER is not set
 CONFIG_LEDS_TRIGGER_HEARTBEAT=y
+# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
 # CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set
 CONFIG_RTC_LIB=y
 CONFIG_RTC_CLASS=y
@@ -1441,37 +1572,43 @@ CONFIG_RTC_INTF_DEV=y
 # CONFIG_RTC_DRV_M41T80 is not set
 # CONFIG_RTC_DRV_S35390A is not set
 # CONFIG_RTC_DRV_FM3130 is not set
+# CONFIG_RTC_DRV_RX8581 is not set
 
 #
 # SPI RTC drivers
 #
+# CONFIG_RTC_DRV_M41T94 is not set
+# CONFIG_RTC_DRV_DS1305 is not set
+# CONFIG_RTC_DRV_DS1390 is not set
+# CONFIG_RTC_DRV_MAX6902 is not set
+# CONFIG_RTC_DRV_R9701 is not set
+# CONFIG_RTC_DRV_RS5C348 is not set
+# CONFIG_RTC_DRV_DS3234 is not set
 
 #
 # Platform RTC drivers
 #
 # CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1286 is not set
 # CONFIG_RTC_DRV_DS1511 is not set
 # CONFIG_RTC_DRV_DS1553 is not set
 # CONFIG_RTC_DRV_DS1742 is not set
 # CONFIG_RTC_DRV_STK17TA8 is not set
 # CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T35 is not set
 # CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_BQ4802 is not set
 CONFIG_RTC_DRV_V3020=y
 
 #
 # on-CPU RTC drivers
 #
 CONFIG_RTC_DRV_SA1100=y
+# CONFIG_RTC_DRV_PXA is not set
 # CONFIG_DMADEVICES is not set
-
-#
-# Voltage and Current regulators
-#
 # CONFIG_REGULATOR is not set
-# CONFIG_REGULATOR_FIXED_VOLTAGE is not set
-# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
-# CONFIG_REGULATOR_BQ24022 is not set
 # CONFIG_UIO is not set
+# CONFIG_STAGING is not set
 
 #
 # File systems
@@ -1483,14 +1620,16 @@ CONFIG_EXT3_FS=y
 CONFIG_EXT3_FS_XATTR=y
 # CONFIG_EXT3_FS_POSIX_ACL is not set
 # CONFIG_EXT3_FS_SECURITY is not set
-# CONFIG_EXT4DEV_FS is not set
+# CONFIG_EXT4_FS is not set
 CONFIG_JBD=y
 CONFIG_FS_MBCACHE=y
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
 # CONFIG_FS_POSIX_ACL is not set
+CONFIG_FILE_LOCKING=y
 # CONFIG_XFS_FS is not set
 # CONFIG_OCFS2_FS is not set
+# CONFIG_BTRFS_FS is not set
 CONFIG_DNOTIFY=y
 CONFIG_INOTIFY=y
 CONFIG_INOTIFY_USER=y
@@ -1520,15 +1659,13 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 #
 CONFIG_PROC_FS=y
 CONFIG_PROC_SYSCTL=y
+# CONFIG_PROC_PAGE_MONITOR is not set
 CONFIG_SYSFS=y
 CONFIG_TMPFS=y
 # CONFIG_TMPFS_POSIX_ACL is not set
 # CONFIG_HUGETLB_PAGE is not set
 # CONFIG_CONFIGFS_FS is not set
-
-#
-# Miscellaneous filesystems
-#
+CONFIG_MISC_FILESYSTEMS=y
 # CONFIG_ADFS_FS is not set
 # CONFIG_AFFS_FS is not set
 # CONFIG_HFS_FS is not set
@@ -1548,6 +1685,7 @@ CONFIG_JFFS2_ZLIB=y
 CONFIG_JFFS2_RTIME=y
 # CONFIG_JFFS2_RUBIN is not set
 # CONFIG_CRAMFS is not set
+# CONFIG_SQUASHFS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_OMFS_FS is not set
@@ -1567,6 +1705,7 @@ CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
 CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
+# CONFIG_SUNRPC_REGISTER_V4 is not set
 # CONFIG_RPCSEC_GSS_KRB5 is not set
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
@@ -1678,19 +1817,29 @@ CONFIG_DEBUG_KERNEL=y
 # CONFIG_DEBUG_MEMORY_INIT is not set
 # CONFIG_DEBUG_LIST is not set
 # CONFIG_DEBUG_SG is not set
+# CONFIG_DEBUG_NOTIFIERS is not set
 CONFIG_FRAME_POINTER=y
 # CONFIG_BOOT_PRINTK_DELAY is not set
 # CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
 # CONFIG_BACKTRACE_SELF_TEST is not set
+# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
 # CONFIG_FAULT_INJECTION is not set
 # CONFIG_LATENCYTOP is not set
 CONFIG_SYSCTL_SYSCALL_CHECK=y
-CONFIG_HAVE_FTRACE=y
-CONFIG_HAVE_DYNAMIC_FTRACE=y
-# CONFIG_FTRACE is not set
+CONFIG_HAVE_FUNCTION_TRACER=y
+
+#
+# Tracers
+#
+# CONFIG_FUNCTION_TRACER is not set
 # CONFIG_IRQSOFF_TRACER is not set
 # CONFIG_SCHED_TRACER is not set
 # CONFIG_CONTEXT_SWITCH_TRACER is not set
+# CONFIG_BOOT_TRACER is not set
+# CONFIG_TRACE_BRANCH_PROFILING is not set
+# CONFIG_STACK_TRACER is not set
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
 # CONFIG_SAMPLES is not set
 CONFIG_HAVE_ARCH_KGDB=y
 # CONFIG_KGDB is not set
@@ -1705,13 +1854,16 @@ CONFIG_DEBUG_LL=y
 #
 # CONFIG_KEYS is not set
 # CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
 # CONFIG_SECURITY_FILE_CAPABILITIES is not set
 CONFIG_CRYPTO=y
 
 #
 # Crypto core or helper
 #
+# CONFIG_CRYPTO_FIPS is not set
 # CONFIG_CRYPTO_MANAGER is not set
+# CONFIG_CRYPTO_MANAGER2 is not set
 # CONFIG_CRYPTO_GF128MUL is not set
 # CONFIG_CRYPTO_NULL is not set
 # CONFIG_CRYPTO_CRYPTD is not set
@@ -1783,14 +1935,18 @@ CONFIG_CRYPTO=y
 #
 # CONFIG_CRYPTO_DEFLATE is not set
 # CONFIG_CRYPTO_LZO is not set
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
 # CONFIG_CRYPTO_HW is not set
 
 #
 # Library routines
 #
 CONFIG_BITREVERSE=y
-# CONFIG_GENERIC_FIND_FIRST_BIT is not set
-# CONFIG_GENERIC_FIND_NEXT_BIT is not set
+CONFIG_GENERIC_FIND_LAST_BIT=y
 CONFIG_CRC_CCITT=m
 # CONFIG_CRC16 is not set
 # CONFIG_CRC_T10DIF is not set
similarity index 76%
rename from arch/arm/configs/colibri_defconfig
rename to arch/arm/configs/colibri_pxa270_defconfig
index 744086fff414a3e828e53dd2d4002de8864b1419..4cf3bde1c522c3c5b14dd7b380d9fec2966c9990 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.24-rc3
-# Mon Dec  3 13:36:09 2007
+# Linux kernel version: 2.6.29-rc8
+# Fri Mar 13 16:18:17 2009
 #
 CONFIG_ARM=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -12,6 +12,7 @@ CONFIG_MMU=y
 # CONFIG_NO_IOPORT is not set
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_LATENCYTOP_SUPPORT=y
 CONFIG_LOCKDEP_SUPPORT=y
 CONFIG_TRACE_IRQFLAGS_SUPPORT=y
 CONFIG_HARDIRQS_SW_RESEND=y
@@ -21,8 +22,8 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 # CONFIG_ARCH_HAS_ILOG2_U64 is not set
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
-CONFIG_ZONE_DMA=y
 CONFIG_ARCH_MTD_XIP=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
 CONFIG_VECTORS_BASE=0xffff0000
 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
@@ -42,22 +43,30 @@ CONFIG_POSIX_MQUEUE=y
 CONFIG_BSD_PROCESS_ACCT=y
 CONFIG_BSD_PROCESS_ACCT_V3=y
 # CONFIG_TASKSTATS is not set
-# CONFIG_USER_NS is not set
-# CONFIG_PID_NS is not set
 # CONFIG_AUDIT is not set
+
+#
+# RCU Subsystem
+#
+CONFIG_CLASSIC_RCU=y
+# CONFIG_TREE_RCU is not set
+# CONFIG_PREEMPT_RCU is not set
+# CONFIG_TREE_RCU_TRACE is not set
+# CONFIG_PREEMPT_RCU_TRACE is not set
 CONFIG_IKCONFIG=y
 CONFIG_IKCONFIG_PROC=y
 CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_GROUP_SCHED is not set
 # CONFIG_CGROUPS is not set
-CONFIG_FAIR_GROUP_SCHED=y
-CONFIG_FAIR_USER_SCHED=y
-# CONFIG_FAIR_CGROUP_SCHED is not set
 CONFIG_SYSFS_DEPRECATED=y
+CONFIG_SYSFS_DEPRECATED_V2=y
 # CONFIG_RELAY is not set
+# CONFIG_NAMESPACES is not set
 CONFIG_BLK_DEV_INITRD=y
 CONFIG_INITRAMFS_SOURCE=""
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_SYSCTL=y
+CONFIG_ANON_INODES=y
 CONFIG_EMBEDDED=y
 CONFIG_UID16=y
 CONFIG_SYSCTL_SYSCALL=y
@@ -70,29 +79,38 @@ CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
 CONFIG_FUTEX=y
-CONFIG_ANON_INODES=y
 CONFIG_EPOLL=y
 CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
 CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
+CONFIG_AIO=y
 CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_COMPAT_BRK=y
 CONFIG_SLAB=y
 # CONFIG_SLUB is not set
 # CONFIG_SLOB is not set
+# CONFIG_PROFILING is not set
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_HAVE_CLK=y
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_SLABINFO=y
 CONFIG_RT_MUTEXES=y
-# CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
 CONFIG_MODULE_UNLOAD=y
 CONFIG_MODULE_FORCE_UNLOAD=y
 CONFIG_MODVERSIONS=y
 CONFIG_MODULE_SRCVERSION_ALL=y
-CONFIG_KMOD=y
 CONFIG_BLOCK=y
 CONFIG_LBD=y
 # CONFIG_BLK_DEV_IO_TRACE is not set
-CONFIG_LSF=y
 # CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
 
 #
 # IO Schedulers
@@ -106,6 +124,7 @@ CONFIG_DEFAULT_AS=y
 # CONFIG_DEFAULT_CFQ is not set
 # CONFIG_DEFAULT_NOOP is not set
 CONFIG_DEFAULT_IOSCHED="anticipatory"
+CONFIG_FREEZER=y
 
 #
 # System Type
@@ -115,9 +134,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
 # CONFIG_ARCH_REALVIEW is not set
 # CONFIG_ARCH_VERSATILE is not set
 # CONFIG_ARCH_AT91 is not set
-# CONFIG_ARCH_CLPS7500 is not set
 # CONFIG_ARCH_CLPS711X is not set
-# CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
 # CONFIG_ARCH_EP93XX is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
@@ -131,41 +148,58 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
 # CONFIG_ARCH_IXP2000 is not set
 # CONFIG_ARCH_IXP4XX is not set
 # CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KIRKWOOD is not set
 # CONFIG_ARCH_KS8695 is not set
 # CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
 # CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_ORION5X is not set
 # CONFIG_ARCH_PNX4008 is not set
 CONFIG_ARCH_PXA=y
 # CONFIG_ARCH_RPC is not set
 # CONFIG_ARCH_SA1100 is not set
 # CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_S3C64XX is not set
 # CONFIG_ARCH_SHARK is not set
 # CONFIG_ARCH_LH7A40X is not set
 # CONFIG_ARCH_DAVINCI is not set
 # CONFIG_ARCH_OMAP is not set
+# CONFIG_ARCH_MSM is not set
+# CONFIG_ARCH_W90X900 is not set
 
 #
 # Intel PXA2xx/PXA3xx Implementations
 #
+# CONFIG_ARCH_GUMSTIX is not set
+# CONFIG_MACH_INTELMOTE2 is not set
 # CONFIG_ARCH_LUBBOCK is not set
 # CONFIG_MACH_LOGICPD_PXA270 is not set
 # CONFIG_MACH_MAINSTONE is not set
+# CONFIG_MACH_MP900C is not set
 # CONFIG_ARCH_PXA_IDP is not set
 # CONFIG_PXA_SHARPSL is not set
-# CONFIG_MACH_TRIZEPS4 is not set
+# CONFIG_ARCH_VIPER is not set
+# CONFIG_ARCH_PXA_ESERIES is not set
+# CONFIG_TRIZEPS_PXA is not set
+# CONFIG_MACH_H5000 is not set
 # CONFIG_MACH_EM_X270 is not set
 CONFIG_MACH_COLIBRI=y
+# CONFIG_MACH_COLIBRI300 is not set
 # CONFIG_MACH_ZYLONITE is not set
+# CONFIG_MACH_LITTLETON is not set
+# CONFIG_MACH_RAUMFELD_PROTO is not set
+# CONFIG_MACH_TAVOREVB is not set
+# CONFIG_MACH_SAAR is not set
 # CONFIG_MACH_ARMCORE is not set
+# CONFIG_MACH_CM_X300 is not set
+# CONFIG_MACH_MAGICIAN is not set
+# CONFIG_MACH_MIOA701 is not set
+# CONFIG_MACH_PCM027 is not set
+# CONFIG_ARCH_PXA_PALM is not set
+# CONFIG_PXA_EZX is not set
 CONFIG_PXA27x=y
-
-#
-# Boot options
-#
-
-#
-# Power management
-#
+# CONFIG_PXA_PWM is not set
 
 #
 # Processor Type
@@ -174,6 +208,7 @@ CONFIG_CPU_32=y
 CONFIG_CPU_XSCALE=y
 CONFIG_CPU_32v5=y
 CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_PABRT_NOIFAR=y
 CONFIG_CPU_CACHE_VIVT=y
 CONFIG_CPU_TLB_V4WBI=y
 CONFIG_CPU_CP15=y
@@ -187,6 +222,7 @@ CONFIG_ARM_THUMB=y
 # CONFIG_OUTER_CACHE is not set
 CONFIG_IWMMXT=y
 CONFIG_XSCALE_PMU=y
+CONFIG_COMMON_CLKDEV=y
 
 #
 # Bus support
@@ -198,28 +234,33 @@ CONFIG_XSCALE_PMU=y
 #
 # Kernel Features
 #
-# CONFIG_TICK_ONESHOT is not set
+CONFIG_TICK_ONESHOT=y
 # CONFIG_NO_HZ is not set
 # CONFIG_HIGH_RES_TIMERS is not set
 CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_VMSPLIT_3G=y
+# CONFIG_VMSPLIT_2G is not set
+# CONFIG_VMSPLIT_1G is not set
+CONFIG_PAGE_OFFSET=0xC0000000
 CONFIG_PREEMPT=y
 CONFIG_HZ=100
 CONFIG_AEABI=y
 CONFIG_OABI_COMPAT=y
-# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_ARCH_FLATMEM_HAS_HOLES=y
+# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
+# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
 CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_FLATMEM_MANUAL=y
 # CONFIG_DISCONTIGMEM_MANUAL is not set
 # CONFIG_SPARSEMEM_MANUAL is not set
 CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
-# CONFIG_SPARSEMEM_STATIC is not set
-# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
+CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_SPLIT_PTLOCK_CPUS=4096
-# CONFIG_RESOURCES_64BIT is not set
-CONFIG_ZONE_DMA_FLAG=1
-CONFIG_BOUNCE=y
+# CONFIG_PHYS_ADDR_T_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=0
 CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
 CONFIG_ALIGNMENT_TRAP=y
 
 #
@@ -231,6 +272,12 @@ CONFIG_CMDLINE=""
 # CONFIG_XIP_KERNEL is not set
 # CONFIG_KEXEC is not set
 
+#
+# CPU Power Management
+#
+# CONFIG_CPU_FREQ is not set
+# CONFIG_CPU_IDLE is not set
+
 #
 # Floating point emulation
 #
@@ -246,6 +293,8 @@ CONFIG_FPE_NWFPE=y
 # Userspace binary formats
 #
 CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+CONFIG_HAVE_AOUT=y
 # CONFIG_BINFMT_AOUT is not set
 # CONFIG_BINFMT_MISC is not set
 
@@ -253,21 +302,18 @@ CONFIG_BINFMT_ELF=y
 # Power management options
 #
 CONFIG_PM=y
-# CONFIG_PM_LEGACY is not set
 # CONFIG_PM_DEBUG is not set
 CONFIG_PM_SLEEP=y
-CONFIG_SUSPEND_UP_POSSIBLE=y
 CONFIG_SUSPEND=y
+CONFIG_SUSPEND_FREEZER=y
 # CONFIG_APM_EMULATION is not set
-
-#
-# Networking
-#
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
 CONFIG_NET=y
 
 #
 # Networking options
 #
+CONFIG_COMPAT_NET_DEV_OPS=y
 CONFIG_PACKET=y
 CONFIG_PACKET_MMAP=y
 CONFIG_UNIX=y
@@ -275,6 +321,7 @@ CONFIG_XFRM=y
 CONFIG_XFRM_USER=m
 # CONFIG_XFRM_SUB_POLICY is not set
 # CONFIG_XFRM_MIGRATE is not set
+# CONFIG_XFRM_STATISTICS is not set
 CONFIG_NET_KEY=y
 # CONFIG_NET_KEY_MIGRATE is not set
 CONFIG_INET=y
@@ -304,26 +351,26 @@ CONFIG_INET_TCP_DIAG=y
 CONFIG_TCP_CONG_CUBIC=y
 CONFIG_DEFAULT_TCP_CONG="cubic"
 # CONFIG_TCP_MD5SIG is not set
-# CONFIG_IP_VS is not set
 # CONFIG_IPV6 is not set
-# CONFIG_INET6_XFRM_TUNNEL is not set
-# CONFIG_INET6_TUNNEL is not set
 # CONFIG_NETLABEL is not set
 # CONFIG_NETWORK_SECMARK is not set
 CONFIG_NETFILTER=y
 # CONFIG_NETFILTER_DEBUG is not set
+CONFIG_NETFILTER_ADVANCED=y
 
 #
 # Core Netfilter Configuration
 #
-# CONFIG_NETFILTER_NETLINK is not set
-# CONFIG_NF_CONNTRACK_ENABLED is not set
+# CONFIG_NETFILTER_NETLINK_QUEUE is not set
+# CONFIG_NETFILTER_NETLINK_LOG is not set
 # CONFIG_NF_CONNTRACK is not set
 # CONFIG_NETFILTER_XTABLES is not set
+# CONFIG_IP_VS is not set
 
 #
 # IP: Netfilter Configuration
 #
+# CONFIG_NF_DEFRAG_IPV4 is not set
 CONFIG_IP_NF_QUEUE=m
 # CONFIG_IP_NF_IPTABLES is not set
 # CONFIG_IP_NF_ARPTABLES is not set
@@ -332,7 +379,9 @@ CONFIG_IP_NF_QUEUE=m
 # CONFIG_TIPC is not set
 # CONFIG_ATM is not set
 # CONFIG_BRIDGE is not set
+# CONFIG_NET_DSA is not set
 CONFIG_VLAN_8021Q=m
+# CONFIG_VLAN_8021Q_GVRP is not set
 # CONFIG_DECNET is not set
 # CONFIG_LLC2 is not set
 # CONFIG_IPX is not set
@@ -342,12 +391,14 @@ CONFIG_VLAN_8021Q=m
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
 # CONFIG_NET_SCHED is not set
+# CONFIG_DCB is not set
 
 #
 # Network testing
 #
 # CONFIG_NET_PKTGEN is not set
 # CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
 CONFIG_IRDA=m
 
 #
@@ -381,15 +432,6 @@ CONFIG_IRTTY_SIR=m
 # CONFIG_KSDAZZLE_DONGLE is not set
 # CONFIG_KS959_DONGLE is not set
 
-#
-# Old SIR device drivers
-#
-# CONFIG_IRPORT_SIR is not set
-
-#
-# Old Serial dongle support
-#
-
 #
 # FIR device drivers
 #
@@ -410,7 +452,6 @@ CONFIG_BT_HIDP=m
 #
 # Bluetooth device drivers
 #
-# CONFIG_BT_HCIUSB is not set
 # CONFIG_BT_HCIBTUSB is not set
 # CONFIG_BT_HCIBTSDIO is not set
 # CONFIG_BT_HCIUART is not set
@@ -419,21 +460,20 @@ CONFIG_BT_HIDP=m
 # CONFIG_BT_HCIBFUSB is not set
 # CONFIG_BT_HCIVHCI is not set
 # CONFIG_AF_RXRPC is not set
-
-#
-# Wireless
-#
+# CONFIG_PHONET is not set
+CONFIG_WIRELESS=y
 CONFIG_CFG80211=y
+# CONFIG_CFG80211_REG_DEBUG is not set
 CONFIG_NL80211=y
+CONFIG_WIRELESS_OLD_REGULATORY=y
 CONFIG_WIRELESS_EXT=y
+CONFIG_WIRELESS_EXT_SYSFS=y
+CONFIG_LIB80211=y
+CONFIG_LIB80211_CRYPT_WEP=y
+CONFIG_LIB80211_CRYPT_CCMP=y
+CONFIG_LIB80211_CRYPT_TKIP=y
 # CONFIG_MAC80211 is not set
-CONFIG_IEEE80211=y
-# CONFIG_IEEE80211_DEBUG is not set
-CONFIG_IEEE80211_CRYPT_WEP=y
-CONFIG_IEEE80211_CRYPT_CCMP=m
-CONFIG_IEEE80211_CRYPT_TKIP=m
-CONFIG_IEEE80211_SOFTMAC=m
-# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
+# CONFIG_WIMAX is not set
 # CONFIG_RFKILL is not set
 # CONFIG_NET_9P is not set
 
@@ -448,6 +488,8 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_FW_LOADER=y
+CONFIG_FIRMWARE_IN_KERNEL=y
+CONFIG_EXTRA_FIRMWARE=""
 # CONFIG_DEBUG_DRIVER is not set
 # CONFIG_DEBUG_DEVRES is not set
 # CONFIG_SYS_HYPERVISOR is not set
@@ -457,9 +499,11 @@ CONFIG_MTD=y
 # CONFIG_MTD_DEBUG is not set
 CONFIG_MTD_CONCAT=y
 CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_TESTS is not set
 # CONFIG_MTD_REDBOOT_PARTS is not set
 # CONFIG_MTD_CMDLINE_PARTS is not set
 # CONFIG_MTD_AFS_PARTS is not set
+# CONFIG_MTD_AR7_PARTS is not set
 
 #
 # User Modules And Translation Layers
@@ -510,9 +554,7 @@ CONFIG_MTD_CFI_UTIL=y
 #
 CONFIG_MTD_COMPLEX_MAPPINGS=y
 CONFIG_MTD_PHYSMAP=y
-CONFIG_MTD_PHYSMAP_START=0x0
-CONFIG_MTD_PHYSMAP_LEN=0x0
-CONFIG_MTD_PHYSMAP_BANKWIDTH=2
+# CONFIG_MTD_PHYSMAP_COMPAT is not set
 CONFIG_MTD_PXA2XX=y
 # CONFIG_MTD_ARM_INTEGRATOR is not set
 # CONFIG_MTD_IMPA7 is not set
@@ -538,6 +580,7 @@ CONFIG_MTD_NAND=y
 # CONFIG_MTD_NAND_ECC_SMC is not set
 # CONFIG_MTD_NAND_MUSEUM_IDS is not set
 # CONFIG_MTD_NAND_H1900 is not set
+# CONFIG_MTD_NAND_GPIO is not set
 CONFIG_MTD_NAND_IDS=y
 CONFIG_MTD_NAND_DISKONCHIP=y
 CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED=y
@@ -555,6 +598,11 @@ CONFIG_MTD_ONENAND=y
 # CONFIG_MTD_ONENAND_2X_PROGRAM is not set
 # CONFIG_MTD_ONENAND_SIM is not set
 
+#
+# LPDDR flash memory drivers
+#
+# CONFIG_MTD_LPDDR is not set
+
 #
 # UBI - Unsorted block images
 #
@@ -569,36 +617,41 @@ CONFIG_BLK_DEV_NBD=y
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=8
 CONFIG_BLK_DEV_RAM_SIZE=4096
-CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
+# CONFIG_BLK_DEV_XIP is not set
 # CONFIG_CDROM_PKTCDVD is not set
 # CONFIG_ATA_OVER_ETH is not set
 CONFIG_MISC_DEVICES=y
+# CONFIG_ICS932S401 is not set
+# CONFIG_ENCLOSURE_SERVICES is not set
+# CONFIG_ISL29003 is not set
+# CONFIG_C2PORT is not set
+
+#
+# EEPROM support
+#
+# CONFIG_EEPROM_AT24 is not set
+# CONFIG_EEPROM_LEGACY is not set
 # CONFIG_EEPROM_93CX6 is not set
+CONFIG_HAVE_IDE=y
 CONFIG_IDE=y
-CONFIG_IDE_MAX_HWIFS=4
-CONFIG_BLK_DEV_IDE=y
 
 #
-# Please see Documentation/ide.txt for help/info on IDE drives
+# Please see Documentation/ide/ide.txt for help/info on IDE drives
 #
 # CONFIG_BLK_DEV_IDE_SATA is not set
-CONFIG_BLK_DEV_IDEDISK=y
-CONFIG_IDEDISK_MULTI_MODE=y
+CONFIG_IDE_GD=y
+CONFIG_IDE_GD_ATA=y
+# CONFIG_IDE_GD_ATAPI is not set
 # CONFIG_BLK_DEV_IDECD is not set
 # CONFIG_BLK_DEV_IDETAPE is not set
-# CONFIG_BLK_DEV_IDEFLOPPY is not set
 # CONFIG_IDE_TASK_IOCTL is not set
 CONFIG_IDE_PROC_FS=y
 
 #
 # IDE chipset support/bugfixes
 #
-CONFIG_IDE_GENERIC=y
 # CONFIG_BLK_DEV_PLATFORM is not set
-# CONFIG_IDE_ARM is not set
 # CONFIG_BLK_DEV_IDEDMA is not set
-CONFIG_IDE_ARCH_OBSOLETE_INIT=y
-# CONFIG_BLK_DEV_HD is not set
 
 #
 # SCSI device support
@@ -610,7 +663,6 @@ CONFIG_IDE_ARCH_OBSOLETE_INIT=y
 # CONFIG_ATA is not set
 # CONFIG_MD is not set
 CONFIG_NETDEVICES=y
-# CONFIG_NETDEVICES_MULTIQUEUE is not set
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
 # CONFIG_MACVLAN is not set
@@ -631,6 +683,10 @@ CONFIG_PHYLIB=y
 # CONFIG_SMSC_PHY is not set
 # CONFIG_BROADCOM_PHY is not set
 # CONFIG_ICPLUS_PHY is not set
+# CONFIG_REALTEK_PHY is not set
+# CONFIG_NATIONAL_PHY is not set
+# CONFIG_STE10XP is not set
+# CONFIG_LSI_ET1011C_PHY is not set
 # CONFIG_FIXED_PHY is not set
 # CONFIG_MDIO_BITBANG is not set
 CONFIG_NET_ETHERNET=y
@@ -638,11 +694,17 @@ CONFIG_MII=y
 # CONFIG_AX88796 is not set
 # CONFIG_SMC91X is not set
 CONFIG_DM9000=y
+CONFIG_DM9000_DEBUGLEVEL=4
+# CONFIG_DM9000_FORCE_SIMPLE_PHY_POLL is not set
 # CONFIG_SMC911X is not set
+# CONFIG_SMSC911X is not set
 # CONFIG_IBM_NEW_EMAC_ZMII is not set
 # CONFIG_IBM_NEW_EMAC_RGMII is not set
 # CONFIG_IBM_NEW_EMAC_TAH is not set
 # CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
 # CONFIG_B44 is not set
 # CONFIG_NETDEV_1000 is not set
 # CONFIG_NETDEV_10000 is not set
@@ -654,10 +716,15 @@ CONFIG_DM9000=y
 CONFIG_WLAN_80211=y
 # CONFIG_LIBERTAS is not set
 # CONFIG_USB_ZD1201 is not set
+# CONFIG_USB_NET_RNDIS_WLAN is not set
+# CONFIG_IWLWIFI_LEDS is not set
 CONFIG_HOSTAP=y
 CONFIG_HOSTAP_FIRMWARE=y
 CONFIG_HOSTAP_FIRMWARE_NVRAM=y
-# CONFIG_ZD1211RW is not set
+
+#
+# Enable WiMAX (Networking options) to see the WiMAX drivers
+#
 
 #
 # USB Network Adapters
@@ -670,7 +737,6 @@ CONFIG_HOSTAP_FIRMWARE_NVRAM=y
 # CONFIG_WAN is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
-# CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
 # CONFIG_NETPOLL is not set
 # CONFIG_NET_POLL_CONTROLLER is not set
@@ -710,6 +776,7 @@ CONFIG_INPUT_MOUSE=y
 # CONFIG_MOUSE_PS2 is not set
 CONFIG_MOUSE_SERIAL=m
 # CONFIG_MOUSE_APPLETOUCH is not set
+# CONFIG_MOUSE_BCM5974 is not set
 # CONFIG_MOUSE_VSXXXAA is not set
 # CONFIG_MOUSE_GPIO is not set
 # CONFIG_INPUT_JOYSTICK is not set
@@ -718,20 +785,25 @@ CONFIG_INPUT_TOUCHSCREEN=y
 # CONFIG_TOUCHSCREEN_FUJITSU is not set
 # CONFIG_TOUCHSCREEN_GUNZE is not set
 # CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set
 # CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_INEXIO is not set
 # CONFIG_TOUCHSCREEN_MK712 is not set
 # CONFIG_TOUCHSCREEN_PENMOUNT is not set
 # CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
 # CONFIG_TOUCHSCREEN_TOUCHWIN is not set
-CONFIG_TOUCHSCREEN_UCB1400=y
 # CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
+# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
+# CONFIG_TOUCHSCREEN_TSC2007 is not set
 CONFIG_INPUT_MISC=y
 # CONFIG_INPUT_ATI_REMOTE is not set
 # CONFIG_INPUT_ATI_REMOTE2 is not set
 # CONFIG_INPUT_KEYSPAN_REMOTE is not set
 # CONFIG_INPUT_POWERMATE is not set
 # CONFIG_INPUT_YEALINK is not set
+# CONFIG_INPUT_CM109 is not set
 CONFIG_INPUT_UINPUT=m
+# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set
 
 #
 # Hardware I/O ports
@@ -746,9 +818,11 @@ CONFIG_SERIO_LIBPS2=y
 # Character devices
 #
 CONFIG_VT=y
+CONFIG_CONSOLE_TRANSLATIONS=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
 # CONFIG_VT_HW_CONSOLE_BINDING is not set
+CONFIG_DEVKMEM=y
 # CONFIG_SERIAL_NONSTANDARD is not set
 
 #
@@ -764,45 +838,50 @@ CONFIG_SERIAL_PXA_CONSOLE=y
 CONFIG_SERIAL_CORE=y
 CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
+# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
 CONFIG_LEGACY_PTYS=y
 CONFIG_LEGACY_PTY_COUNT=256
 # CONFIG_IPMI_HANDLER is not set
 CONFIG_HW_RANDOM=y
-# CONFIG_NVRAM is not set
 # CONFIG_R3964 is not set
 # CONFIG_RAW_DRIVER is not set
 # CONFIG_TCG_TPM is not set
 CONFIG_I2C=y
 CONFIG_I2C_BOARDINFO=y
 CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_HELPER_AUTO=y
 
 #
-# I2C Algorithms
+# I2C Hardware Bus support
 #
-# CONFIG_I2C_ALGOBIT is not set
-# CONFIG_I2C_ALGOPCF is not set
-# CONFIG_I2C_ALGOPCA is not set
 
 #
-# I2C Hardware Bus support
+# I2C system bus drivers (mostly embedded / system-on-chip)
 #
 # CONFIG_I2C_GPIO is not set
-# CONFIG_I2C_PXA is not set
 # CONFIG_I2C_OCORES is not set
-# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_PXA is not set
 # CONFIG_I2C_SIMTEC is not set
+
+#
+# External I2C/SMBus adapter drivers
+#
+# CONFIG_I2C_PARPORT_LIGHT is not set
 # CONFIG_I2C_TAOS_EVM is not set
-# CONFIG_I2C_STUB is not set
 # CONFIG_I2C_TINY_USB is not set
 
+#
+# Other I2C/SMBus bus drivers
+#
+# CONFIG_I2C_PCA_PLATFORM is not set
+# CONFIG_I2C_STUB is not set
+
 #
 # Miscellaneous I2C Chip support
 #
-# CONFIG_SENSORS_DS1337 is not set
-# CONFIG_SENSORS_DS1374 is not set
 # CONFIG_DS1682 is not set
-# CONFIG_EEPROM_LEGACY is not set
 # CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_PCF8575 is not set
 # CONFIG_SENSORS_PCA9539 is not set
 # CONFIG_SENSORS_PCF8591 is not set
 # CONFIG_SENSORS_MAX6875 is not set
@@ -811,16 +890,35 @@ CONFIG_I2C_CHARDEV=y
 # CONFIG_I2C_DEBUG_ALGO is not set
 # CONFIG_I2C_DEBUG_BUS is not set
 # CONFIG_I2C_DEBUG_CHIP is not set
+# CONFIG_SPI is not set
+CONFIG_ARCH_REQUIRE_GPIOLIB=y
+CONFIG_GPIOLIB=y
+# CONFIG_DEBUG_GPIO is not set
+# CONFIG_GPIO_SYSFS is not set
 
 #
-# SPI support
+# Memory mapped GPIO expanders:
+#
+
+#
+# I2C GPIO expanders:
+#
+# CONFIG_GPIO_MAX732X is not set
+# CONFIG_GPIO_PCA953X is not set
+# CONFIG_GPIO_PCF857X is not set
+
+#
+# PCI GPIO expanders:
+#
+
+#
+# SPI GPIO expanders:
 #
-# CONFIG_SPI is not set
-# CONFIG_SPI_MASTER is not set
 # CONFIG_W1 is not set
 # CONFIG_POWER_SUPPLY is not set
 CONFIG_HWMON=y
 # CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_AD7414 is not set
 # CONFIG_SENSORS_AD7418 is not set
 # CONFIG_SENSORS_ADM1021 is not set
 # CONFIG_SENSORS_ADM1025 is not set
@@ -828,7 +926,10 @@ CONFIG_HWMON=y
 # CONFIG_SENSORS_ADM1029 is not set
 # CONFIG_SENSORS_ADM1031 is not set
 # CONFIG_SENSORS_ADM9240 is not set
+# CONFIG_SENSORS_ADT7462 is not set
 # CONFIG_SENSORS_ADT7470 is not set
+# CONFIG_SENSORS_ADT7473 is not set
+# CONFIG_SENSORS_ADT7475 is not set
 # CONFIG_SENSORS_ATXP1 is not set
 # CONFIG_SENSORS_DS1621 is not set
 # CONFIG_SENSORS_F71805F is not set
@@ -848,6 +949,7 @@ CONFIG_HWMON=y
 # CONFIG_SENSORS_LM90 is not set
 # CONFIG_SENSORS_LM92 is not set
 # CONFIG_SENSORS_LM93 is not set
+# CONFIG_SENSORS_LTC4245 is not set
 # CONFIG_SENSORS_MAX1619 is not set
 # CONFIG_SENSORS_MAX6650 is not set
 # CONFIG_SENSORS_PC87360 is not set
@@ -856,6 +958,7 @@ CONFIG_HWMON=y
 # CONFIG_SENSORS_SMSC47M1 is not set
 # CONFIG_SENSORS_SMSC47M192 is not set
 # CONFIG_SENSORS_SMSC47B397 is not set
+# CONFIG_SENSORS_ADS7828 is not set
 # CONFIG_SENSORS_THMC50 is not set
 # CONFIG_SENSORS_VT1211 is not set
 # CONFIG_SENSORS_W83781D is not set
@@ -863,9 +966,12 @@ CONFIG_HWMON=y
 # CONFIG_SENSORS_W83792D is not set
 # CONFIG_SENSORS_W83793 is not set
 # CONFIG_SENSORS_W83L785TS is not set
+# CONFIG_SENSORS_W83L786NG is not set
 # CONFIG_SENSORS_W83627HF is not set
 # CONFIG_SENSORS_W83627EHF is not set
 # CONFIG_HWMON_DEBUG_CHIP is not set
+# CONFIG_THERMAL is not set
+# CONFIG_THERMAL_HWMON is not set
 CONFIG_WATCHDOG=y
 # CONFIG_WATCHDOG_NOWAYOUT is not set
 
@@ -879,23 +985,46 @@ CONFIG_WATCHDOG=y
 # USB-based Watchdog Cards
 #
 # CONFIG_USBPCWATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
 
 #
 # Sonics Silicon Backplane
 #
-CONFIG_SSB_POSSIBLE=y
 # CONFIG_SSB is not set
 
 #
 # Multifunction device drivers
 #
+# CONFIG_MFD_CORE is not set
 # CONFIG_MFD_SM501 is not set
+# CONFIG_MFD_ASIC3 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_TPS65010 is not set
+# CONFIG_TWL4030_CORE is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_MFD_T7L66XB is not set
+# CONFIG_MFD_TC6387XB is not set
+# CONFIG_MFD_TC6393XB is not set
+# CONFIG_PMIC_DA903X is not set
+# CONFIG_MFD_WM8400 is not set
+# CONFIG_MFD_WM8350_I2C is not set
+# CONFIG_MFD_PCF50633 is not set
 
 #
 # Multimedia devices
 #
+
+#
+# Multimedia core support
+#
 # CONFIG_VIDEO_DEV is not set
 # CONFIG_DVB_CORE is not set
+# CONFIG_VIDEO_MEDIA is not set
+
+#
+# Multimedia drivers
+#
 CONFIG_DAB=y
 # CONFIG_USB_DABUSB is not set
 
@@ -907,6 +1036,7 @@ CONFIG_DAB=y
 CONFIG_FB=y
 CONFIG_FIRMWARE_EDID=y
 # CONFIG_FB_DDC is not set
+# CONFIG_FB_BOOT_VESA_SUPPORT is not set
 CONFIG_FB_CFB_FILLRECT=y
 CONFIG_FB_CFB_COPYAREA=y
 CONFIG_FB_CFB_IMAGEBLIT=y
@@ -914,8 +1044,8 @@ CONFIG_FB_CFB_IMAGEBLIT=y
 # CONFIG_FB_SYS_FILLRECT is not set
 # CONFIG_FB_SYS_COPYAREA is not set
 # CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_FOREIGN_ENDIAN is not set
 # CONFIG_FB_SYS_FOPS is not set
-CONFIG_FB_DEFERRED_IO=y
 # CONFIG_FB_SVGALIB is not set
 # CONFIG_FB_MACMODES is not set
 # CONFIG_FB_BACKLIGHT is not set
@@ -928,13 +1058,20 @@ CONFIG_FB_DEFERRED_IO=y
 # CONFIG_FB_UVESA is not set
 # CONFIG_FB_S1D13XXX is not set
 CONFIG_FB_PXA=y
+# CONFIG_FB_PXA_OVERLAY is not set
+# CONFIG_FB_PXA_SMARTPANEL is not set
 # CONFIG_FB_PXA_PARAMETERS is not set
 # CONFIG_FB_MBX is not set
+# CONFIG_FB_W100 is not set
 # CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_METRONOME is not set
+# CONFIG_FB_MB862XX is not set
 CONFIG_BACKLIGHT_LCD_SUPPORT=y
 CONFIG_LCD_CLASS_DEVICE=y
+# CONFIG_LCD_ILI9320 is not set
+# CONFIG_LCD_PLATFORM is not set
 CONFIG_BACKLIGHT_CLASS_DEVICE=y
-# CONFIG_BACKLIGHT_CORGI is not set
+CONFIG_BACKLIGHT_GENERIC=y
 
 #
 # Display device support
@@ -964,12 +1101,7 @@ CONFIG_LOGO=y
 CONFIG_LOGO_LINUX_MONO=y
 CONFIG_LOGO_LINUX_VGA16=y
 CONFIG_LOGO_LINUX_CLUT224=y
-
-#
-# Sound
-#
 # CONFIG_SOUND is not set
-CONFIG_AC97_BUS=y
 CONFIG_HID_SUPPORT=y
 CONFIG_HID=y
 # CONFIG_HID_DEBUG is not set
@@ -979,18 +1111,26 @@ CONFIG_HID=y
 # USB Input Devices
 #
 # CONFIG_USB_HID is not set
+# CONFIG_HID_PID is not set
 
 #
 # USB HID Boot Protocol drivers
 #
 # CONFIG_USB_KBD is not set
 # CONFIG_USB_MOUSE is not set
+
+#
+# Special HID drivers
+#
+CONFIG_HID_COMPAT=y
+# CONFIG_HID_APPLE is not set
 CONFIG_USB_SUPPORT=y
 CONFIG_USB_ARCH_HAS_HCD=y
 CONFIG_USB_ARCH_HAS_OHCI=y
 # CONFIG_USB_ARCH_HAS_EHCI is not set
 CONFIG_USB=y
 # CONFIG_USB_DEBUG is not set
+# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
 
 #
 # Miscellaneous USB options
@@ -999,29 +1139,40 @@ CONFIG_USB_DEVICEFS=y
 # CONFIG_USB_DEVICE_CLASS is not set
 # CONFIG_USB_DYNAMIC_MINORS is not set
 # CONFIG_USB_SUSPEND is not set
-# CONFIG_USB_PERSIST is not set
 # CONFIG_USB_OTG is not set
+# CONFIG_USB_OTG_WHITELIST is not set
+# CONFIG_USB_OTG_BLACKLIST_HUB is not set
+# CONFIG_USB_MON is not set
+# CONFIG_USB_WUSB is not set
+# CONFIG_USB_WUSB_CBAF is not set
 
 #
 # USB Host Controller Drivers
 #
+# CONFIG_USB_C67X00_HCD is not set
+# CONFIG_USB_OXU210HP_HCD is not set
 # CONFIG_USB_ISP116X_HCD is not set
 # CONFIG_USB_OHCI_HCD is not set
 # CONFIG_USB_SL811_HCD is not set
 # CONFIG_USB_R8A66597_HCD is not set
+# CONFIG_USB_HWA_HCD is not set
+# CONFIG_USB_MUSB_HDRC is not set
+# CONFIG_USB_GADGET_MUSB_HDRC is not set
 
 #
 # USB Device Class drivers
 #
 # CONFIG_USB_ACM is not set
 # CONFIG_USB_PRINTER is not set
+# CONFIG_USB_WDM is not set
+# CONFIG_USB_TMC is not set
 
 #
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;
 #
 
 #
-# may also be needed; see USB_STORAGE Help for more information
+# see USB_STORAGE Help for more information
 #
 # CONFIG_USB_LIBUSUAL is not set
 
@@ -1029,19 +1180,14 @@ CONFIG_USB_DEVICEFS=y
 # USB Imaging devices
 #
 # CONFIG_USB_MDC800 is not set
-# CONFIG_USB_MON is not set
 
 #
 # USB port drivers
 #
-
-#
-# USB Serial Converter support
-#
 CONFIG_USB_SERIAL=m
+# CONFIG_USB_EZUSB is not set
 # CONFIG_USB_SERIAL_GENERIC is not set
 # CONFIG_USB_SERIAL_AIRCABLE is not set
-# CONFIG_USB_SERIAL_AIRPRIME is not set
 # CONFIG_USB_SERIAL_ARK3116 is not set
 # CONFIG_USB_SERIAL_BELKIN is not set
 # CONFIG_USB_SERIAL_CH341 is not set
@@ -1059,6 +1205,7 @@ CONFIG_USB_SERIAL=m
 # CONFIG_USB_SERIAL_EDGEPORT_TI is not set
 # CONFIG_USB_SERIAL_GARMIN is not set
 # CONFIG_USB_SERIAL_IPW is not set
+# CONFIG_USB_SERIAL_IUU is not set
 # CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
 # CONFIG_USB_SERIAL_KEYSPAN is not set
 # CONFIG_USB_SERIAL_KLSI is not set
@@ -1066,17 +1213,21 @@ CONFIG_USB_SERIAL=m
 # CONFIG_USB_SERIAL_MCT_U232 is not set
 # CONFIG_USB_SERIAL_MOS7720 is not set
 # CONFIG_USB_SERIAL_MOS7840 is not set
+# CONFIG_USB_SERIAL_MOTOROLA is not set
 # CONFIG_USB_SERIAL_NAVMAN is not set
 # CONFIG_USB_SERIAL_PL2303 is not set
 # CONFIG_USB_SERIAL_OTI6858 is not set
+# CONFIG_USB_SERIAL_SPCP8X5 is not set
 # CONFIG_USB_SERIAL_HP4X is not set
 # CONFIG_USB_SERIAL_SAFE is not set
+# CONFIG_USB_SERIAL_SIEMENS_MPI is not set
 # CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
 # CONFIG_USB_SERIAL_TI is not set
 # CONFIG_USB_SERIAL_CYBERJACK is not set
 # CONFIG_USB_SERIAL_XIRCOM is not set
 # CONFIG_USB_SERIAL_OPTION is not set
 # CONFIG_USB_SERIAL_OMNINET is not set
+# CONFIG_USB_SERIAL_OPTICON is not set
 # CONFIG_USB_SERIAL_DEBUG is not set
 
 #
@@ -1085,7 +1236,7 @@ CONFIG_USB_SERIAL=m
 # CONFIG_USB_EMI62 is not set
 # CONFIG_USB_EMI26 is not set
 # CONFIG_USB_ADUTUX is not set
-# CONFIG_USB_AUERSWALD is not set
+# CONFIG_USB_SEVSEG is not set
 # CONFIG_USB_RIO500 is not set
 # CONFIG_USB_LEGOTOWER is not set
 # CONFIG_USB_LCD is not set
@@ -1101,30 +1252,29 @@ CONFIG_USB_SERIAL=m
 # CONFIG_USB_TRANCEVIBRATOR is not set
 # CONFIG_USB_IOWARRIOR is not set
 # CONFIG_USB_TEST is not set
-
-#
-# USB DSL modem support
-#
-
-#
-# USB Gadget Support
-#
+# CONFIG_USB_ISIGHTFW is not set
+# CONFIG_USB_VST is not set
 CONFIG_USB_GADGET=m
 # CONFIG_USB_GADGET_DEBUG is not set
 # CONFIG_USB_GADGET_DEBUG_FILES is not set
 # CONFIG_USB_GADGET_DEBUG_FS is not set
+CONFIG_USB_GADGET_VBUS_DRAW=2
 CONFIG_USB_GADGET_SELECTED=y
-# CONFIG_USB_GADGET_AMD5536UDC is not set
+# CONFIG_USB_GADGET_AT91 is not set
 # CONFIG_USB_GADGET_ATMEL_USBA is not set
 # CONFIG_USB_GADGET_FSL_USB2 is not set
-# CONFIG_USB_GADGET_NET2280 is not set
-# CONFIG_USB_GADGET_PXA2XX is not set
-# CONFIG_USB_GADGET_M66592 is not set
-# CONFIG_USB_GADGET_GOKU is not set
 # CONFIG_USB_GADGET_LH7A40X is not set
 # CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_PXA25X is not set
+# CONFIG_USB_GADGET_PXA27X is not set
 # CONFIG_USB_GADGET_S3C2410 is not set
-# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_IMX is not set
+# CONFIG_USB_GADGET_M66592 is not set
+# CONFIG_USB_GADGET_AMD5536UDC is not set
+# CONFIG_USB_GADGET_FSL_QE is not set
+# CONFIG_USB_GADGET_CI13XXX is not set
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_GOKU is not set
 CONFIG_USB_GADGET_DUMMY_HCD=y
 CONFIG_USB_DUMMY_HCD=m
 CONFIG_USB_GADGET_DUALSPEED=y
@@ -1134,21 +1284,32 @@ CONFIG_USB_GADGET_DUALSPEED=y
 # CONFIG_USB_FILE_STORAGE is not set
 # CONFIG_USB_G_SERIAL is not set
 # CONFIG_USB_MIDI_GADGET is not set
+# CONFIG_USB_G_PRINTER is not set
+# CONFIG_USB_CDC_COMPOSITE is not set
+
+#
+# OTG and related infrastructure
+#
+# CONFIG_USB_GPIO_VBUS is not set
 CONFIG_MMC=y
 # CONFIG_MMC_DEBUG is not set
 # CONFIG_MMC_UNSAFE_RESUME is not set
 
 #
-# MMC/SD Card Drivers
+# MMC/SD/SDIO Card Drivers
 #
 CONFIG_MMC_BLOCK=y
 CONFIG_MMC_BLOCK_BOUNCE=y
 # CONFIG_SDIO_UART is not set
+# CONFIG_MMC_TEST is not set
 
 #
-# MMC/SD Host Controller Drivers
+# MMC/SD/SDIO Host Controller Drivers
 #
 # CONFIG_MMC_PXA is not set
+# CONFIG_MMC_SDHCI is not set
+# CONFIG_MEMSTICK is not set
+# CONFIG_ACCESSIBILITY is not set
 CONFIG_NEW_LEDS=y
 # CONFIG_LEDS_CLASS is not set
 
@@ -1163,6 +1324,8 @@ CONFIG_LEDS_TRIGGERS=y
 CONFIG_LEDS_TRIGGER_TIMER=y
 # CONFIG_LEDS_TRIGGER_IDE_DISK is not set
 CONFIG_LEDS_TRIGGER_HEARTBEAT=y
+# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
+# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set
 CONFIG_RTC_LIB=y
 CONFIG_RTC_CLASS=y
 # CONFIG_RTC_HCTOSYS is not set
@@ -1190,6 +1353,9 @@ CONFIG_RTC_INTF_DEV=y
 # CONFIG_RTC_DRV_PCF8563 is not set
 CONFIG_RTC_DRV_PCF8583=m
 # CONFIG_RTC_DRV_M41T80 is not set
+# CONFIG_RTC_DRV_S35390A is not set
+# CONFIG_RTC_DRV_FM3130 is not set
+# CONFIG_RTC_DRV_RX8581 is not set
 
 #
 # SPI RTC drivers
@@ -1199,36 +1365,45 @@ CONFIG_RTC_DRV_PCF8583=m
 # Platform RTC drivers
 #
 # CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1286 is not set
+# CONFIG_RTC_DRV_DS1511 is not set
 # CONFIG_RTC_DRV_DS1553 is not set
-# CONFIG_RTC_DRV_STK17TA8 is not set
 # CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
 # CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T35 is not set
 # CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_BQ4802 is not set
 # CONFIG_RTC_DRV_V3020 is not set
 
 #
 # on-CPU RTC drivers
 #
 # CONFIG_RTC_DRV_SA1100 is not set
+# CONFIG_RTC_DRV_PXA is not set
+# CONFIG_DMADEVICES is not set
+# CONFIG_REGULATOR is not set
+# CONFIG_UIO is not set
+# CONFIG_STAGING is not set
 
 #
 # File systems
 #
 # CONFIG_EXT2_FS is not set
 # CONFIG_EXT3_FS is not set
-# CONFIG_EXT4DEV_FS is not set
+# CONFIG_EXT4_FS is not set
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
+CONFIG_FILE_LOCKING=y
 # CONFIG_XFS_FS is not set
 # CONFIG_GFS2_FS is not set
 # CONFIG_OCFS2_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_ROMFS_FS is not set
+# CONFIG_BTRFS_FS is not set
+CONFIG_DNOTIFY=y
 CONFIG_INOTIFY=y
 CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
-CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
 CONFIG_AUTOFS4_FS=y
 # CONFIG_FUSE_FS is not set
@@ -1254,15 +1429,13 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-15"
 #
 CONFIG_PROC_FS=y
 CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
 CONFIG_SYSFS=y
 CONFIG_TMPFS=y
 # CONFIG_TMPFS_POSIX_ACL is not set
 # CONFIG_HUGETLB_PAGE is not set
 CONFIG_CONFIGFS_FS=y
-
-#
-# Miscellaneous filesystems
-#
+CONFIG_MISC_FILESYSTEMS=y
 # CONFIG_ADFS_FS is not set
 # CONFIG_AFFS_FS is not set
 # CONFIG_ECRYPT_FS is not set
@@ -1283,9 +1456,13 @@ CONFIG_JFFS2_ZLIB=y
 CONFIG_JFFS2_RTIME=y
 # CONFIG_JFFS2_RUBIN is not set
 # CONFIG_CRAMFS is not set
+# CONFIG_SQUASHFS is not set
 # CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_OMFS_FS is not set
 # CONFIG_HPFS_FS is not set
 # CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UFS_FS is not set
 CONFIG_NETWORK_FILESYSTEMS=y
@@ -1293,20 +1470,18 @@ CONFIG_NFS_FS=y
 CONFIG_NFS_V3=y
 # CONFIG_NFS_V3_ACL is not set
 CONFIG_NFS_V4=y
-# CONFIG_NFS_DIRECTIO is not set
+CONFIG_ROOT_NFS=y
 CONFIG_NFSD=y
 CONFIG_NFSD_V3=y
 # CONFIG_NFSD_V3_ACL is not set
 CONFIG_NFSD_V4=y
-CONFIG_NFSD_TCP=y
-CONFIG_ROOT_NFS=y
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
 CONFIG_EXPORTFS=y
 CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
 CONFIG_SUNRPC_GSS=y
-# CONFIG_SUNRPC_BIND34 is not set
+# CONFIG_SUNRPC_REGISTER_V4 is not set
 CONFIG_RPCSEC_GSS_KRB5=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
@@ -1361,9 +1536,6 @@ CONFIG_NLS_ISO8859_15=m
 # CONFIG_NLS_KOI8_U is not set
 CONFIG_NLS_UTF8=m
 # CONFIG_DLM is not set
-CONFIG_INSTRUMENTATION=y
-# CONFIG_PROFILING is not set
-# CONFIG_MARKERS is not set
 
 #
 # Kernel hacking
@@ -1371,6 +1543,7 @@ CONFIG_INSTRUMENTATION=y
 CONFIG_PRINTK_TIME=y
 CONFIG_ENABLE_WARN_DEPRECATED=y
 CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_FRAME_WARN=1024
 CONFIG_MAGIC_SYSRQ=y
 # CONFIG_UNUSED_SYMBOLS is not set
 CONFIG_DEBUG_FS=y
@@ -1378,9 +1551,12 @@ CONFIG_DEBUG_FS=y
 CONFIG_DEBUG_KERNEL=y
 # CONFIG_DEBUG_SHIRQ is not set
 CONFIG_DETECT_SOFTLOCKUP=y
+# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
+CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
 CONFIG_SCHED_DEBUG=y
 # CONFIG_SCHEDSTATS is not set
 # CONFIG_TIMER_STATS is not set
+# CONFIG_DEBUG_OBJECTS is not set
 # CONFIG_DEBUG_SLAB is not set
 CONFIG_DEBUG_PREEMPT=y
 # CONFIG_DEBUG_RT_MUTEXES is not set
@@ -1396,16 +1572,40 @@ CONFIG_DEBUG_PREEMPT=y
 CONFIG_DEBUG_BUGVERBOSE=y
 CONFIG_DEBUG_INFO=y
 # CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_WRITECOUNT is not set
+# CONFIG_DEBUG_MEMORY_INIT is not set
 # CONFIG_DEBUG_LIST is not set
 # CONFIG_DEBUG_SG is not set
+# CONFIG_DEBUG_NOTIFIERS is not set
 CONFIG_FRAME_POINTER=y
-CONFIG_FORCED_INLINING=y
 # CONFIG_BOOT_PRINTK_DELAY is not set
 # CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
+# CONFIG_BACKTRACE_SELF_TEST is not set
+# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
 # CONFIG_FAULT_INJECTION is not set
+# CONFIG_LATENCYTOP is not set
+# CONFIG_SYSCTL_SYSCALL_CHECK is not set
+CONFIG_HAVE_FUNCTION_TRACER=y
+
+#
+# Tracers
+#
+# CONFIG_FUNCTION_TRACER is not set
+# CONFIG_IRQSOFF_TRACER is not set
+# CONFIG_PREEMPT_TRACER is not set
+# CONFIG_SCHED_TRACER is not set
+# CONFIG_CONTEXT_SWITCH_TRACER is not set
+# CONFIG_BOOT_TRACER is not set
+# CONFIG_TRACE_BRANCH_PROFILING is not set
+# CONFIG_STACK_TRACER is not set
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
 # CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_KGDB is not set
 CONFIG_DEBUG_USER=y
 CONFIG_DEBUG_ERRORS=y
+# CONFIG_DEBUG_STACK_USAGE is not set
 CONFIG_DEBUG_LL=y
 # CONFIG_DEBUG_ICEDCC is not set
 
@@ -1415,58 +1615,114 @@ CONFIG_DEBUG_LL=y
 CONFIG_KEYS=y
 CONFIG_KEYS_DEBUG_PROC_KEYS=y
 CONFIG_SECURITY=y
+# CONFIG_SECURITYFS is not set
 # CONFIG_SECURITY_NETWORK is not set
-CONFIG_SECURITY_CAPABILITIES=y
+# CONFIG_SECURITY_PATH is not set
 # CONFIG_SECURITY_FILE_CAPABILITIES is not set
 # CONFIG_SECURITY_ROOTPLUG is not set
+CONFIG_SECURITY_DEFAULT_MMAP_MIN_ADDR=0
 CONFIG_CRYPTO=y
+
+#
+# Crypto core or helper
+#
+# CONFIG_CRYPTO_FIPS is not set
 CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_ALGAPI2=y
+CONFIG_CRYPTO_AEAD2=y
 CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_BLKCIPHER2=y
+CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_HASH2=y
+CONFIG_CRYPTO_RNG2=y
 CONFIG_CRYPTO_MANAGER=y
+CONFIG_CRYPTO_MANAGER2=y
+# CONFIG_CRYPTO_GF128MUL is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Authenticated Encryption with Associated Data
+#
+# CONFIG_CRYPTO_CCM is not set
+# CONFIG_CRYPTO_GCM is not set
+# CONFIG_CRYPTO_SEQIV is not set
+
+#
+# Block modes
+#
+CONFIG_CRYPTO_CBC=y
+# CONFIG_CRYPTO_CTR is not set
+# CONFIG_CRYPTO_CTS is not set
+CONFIG_CRYPTO_ECB=y
+# CONFIG_CRYPTO_LRW is not set
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_XTS is not set
+
+#
+# Hash modes
+#
 # CONFIG_CRYPTO_HMAC is not set
 # CONFIG_CRYPTO_XCBC is not set
-# CONFIG_CRYPTO_NULL is not set
+
+#
+# Digest
+#
+CONFIG_CRYPTO_CRC32C=y
 # CONFIG_CRYPTO_MD4 is not set
 CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_MICHAEL_MIC=y
+# CONFIG_CRYPTO_RMD128 is not set
+# CONFIG_CRYPTO_RMD160 is not set
+# CONFIG_CRYPTO_RMD256 is not set
+# CONFIG_CRYPTO_RMD320 is not set
 CONFIG_CRYPTO_SHA1=m
 CONFIG_CRYPTO_SHA256=m
 CONFIG_CRYPTO_SHA512=m
-# CONFIG_CRYPTO_WP512 is not set
 # CONFIG_CRYPTO_TGR192 is not set
-# CONFIG_CRYPTO_GF128MUL is not set
-CONFIG_CRYPTO_ECB=y
-CONFIG_CRYPTO_CBC=y
-CONFIG_CRYPTO_PCBC=m
-# CONFIG_CRYPTO_LRW is not set
-# CONFIG_CRYPTO_XTS is not set
-# CONFIG_CRYPTO_CRYPTD is not set
-CONFIG_CRYPTO_DES=y
-# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_WP512 is not set
+
+#
+# Ciphers
+#
+CONFIG_CRYPTO_AES=y
+# CONFIG_CRYPTO_ANUBIS is not set
+CONFIG_CRYPTO_ARC4=y
 # CONFIG_CRYPTO_BLOWFISH is not set
-# CONFIG_CRYPTO_TWOFISH is not set
-# CONFIG_CRYPTO_SERPENT is not set
-CONFIG_CRYPTO_AES=m
+# CONFIG_CRYPTO_CAMELLIA is not set
 # CONFIG_CRYPTO_CAST5 is not set
 # CONFIG_CRYPTO_CAST6 is not set
-# CONFIG_CRYPTO_TEA is not set
-CONFIG_CRYPTO_ARC4=y
+CONFIG_CRYPTO_DES=y
+# CONFIG_CRYPTO_FCRYPT is not set
 # CONFIG_CRYPTO_KHAZAD is not set
-# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_SALSA20 is not set
 # CONFIG_CRYPTO_SEED is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+
+#
+# Compression
+#
 CONFIG_CRYPTO_DEFLATE=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_CRC32C=y
-# CONFIG_CRYPTO_CAMELLIA is not set
-# CONFIG_CRYPTO_TEST is not set
-# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_LZO is not set
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
 CONFIG_CRYPTO_HW=y
 
 #
 # Library routines
 #
 CONFIG_BITREVERSE=y
+CONFIG_GENERIC_FIND_LAST_BIT=y
 CONFIG_CRC_CCITT=y
 CONFIG_CRC16=y
+# CONFIG_CRC_T10DIF is not set
 # CONFIG_CRC_ITU_T is not set
 CONFIG_CRC32=y
 # CONFIG_CRC7 is not set
diff --git a/arch/arm/configs/colibri_pxa300_defconfig b/arch/arm/configs/colibri_pxa300_defconfig
new file mode 100644 (file)
index 0000000..4774a36
--- /dev/null
@@ -0,0 +1,1156 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.29-rc8
+# Fri Mar 13 16:13:20 2009
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_LATENCYTOP_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_SWAP=y
+# CONFIG_SYSVIPC is not set
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_AUDIT is not set
+
+#
+# RCU Subsystem
+#
+CONFIG_CLASSIC_RCU=y
+# CONFIG_TREE_RCU is not set
+# CONFIG_PREEMPT_RCU is not set
+# CONFIG_TREE_RCU_TRACE is not set
+# CONFIG_PREEMPT_RCU_TRACE is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=17
+# CONFIG_GROUP_SCHED is not set
+# CONFIG_CGROUPS is not set
+# CONFIG_SYSFS_DEPRECATED_V2 is not set
+# CONFIG_RELAY is not set
+CONFIG_NAMESPACES=y
+# CONFIG_UTS_NS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
+# CONFIG_NET_NS is not set
+# CONFIG_BLK_DEV_INITRD is not set
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_ANON_INODES=y
+# CONFIG_EMBEDDED is not set
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_AIO=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLUB_DEBUG=y
+CONFIG_COMPAT_BRK=y
+# CONFIG_SLAB is not set
+CONFIG_SLUB=y
+# CONFIG_SLOB is not set
+# CONFIG_PROFILING is not set
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_HAVE_CLK=y
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_DEFAULT_AS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+CONFIG_DEFAULT_CFQ=y
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="cfq"
+# CONFIG_FREEZER is not set
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KIRKWOOD is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_S3C64XX is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_ARCH_MSM is not set
+# CONFIG_ARCH_W90X900 is not set
+
+#
+# Intel PXA2xx/PXA3xx Implementations
+#
+
+#
+# Supported PXA3xx Processor Variants
+#
+CONFIG_CPU_PXA300=y
+# CONFIG_CPU_PXA310 is not set
+# CONFIG_CPU_PXA320 is not set
+# CONFIG_CPU_PXA930 is not set
+# CONFIG_CPU_PXA935 is not set
+# CONFIG_ARCH_GUMSTIX is not set
+# CONFIG_MACH_INTELMOTE2 is not set
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_MACH_MP900C is not set
+# CONFIG_ARCH_PXA_IDP is not set
+# CONFIG_PXA_SHARPSL is not set
+# CONFIG_ARCH_VIPER is not set
+# CONFIG_ARCH_PXA_ESERIES is not set
+# CONFIG_TRIZEPS_PXA is not set
+# CONFIG_MACH_H5000 is not set
+# CONFIG_MACH_EM_X270 is not set
+# CONFIG_MACH_COLIBRI is not set
+CONFIG_MACH_COLIBRI300=y
+# CONFIG_MACH_ZYLONITE is not set
+# CONFIG_MACH_LITTLETON is not set
+# CONFIG_MACH_RAUMFELD_PROTO is not set
+# CONFIG_MACH_TAVOREVB is not set
+# CONFIG_MACH_SAAR is not set
+# CONFIG_MACH_ARMCORE is not set
+# CONFIG_MACH_CM_X300 is not set
+# CONFIG_MACH_MAGICIAN is not set
+# CONFIG_MACH_MIOA701 is not set
+# CONFIG_MACH_PCM027 is not set
+# CONFIG_ARCH_PXA_PALM is not set
+# CONFIG_PXA_EZX is not set
+CONFIG_PXA3xx=y
+# CONFIG_PXA_PWM is not set
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_XSC3=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_PABRT_NOIFAR=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+CONFIG_IO_36=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_CPU_BPREDICT_DISABLE is not set
+CONFIG_OUTER_CACHE=y
+CONFIG_CACHE_XSC3L2=y
+CONFIG_IWMMXT=y
+CONFIG_COMMON_CLKDEV=y
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+CONFIG_TICK_ONESHOT=y
+# CONFIG_NO_HZ is not set
+# CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_VMSPLIT_3G=y
+# CONFIG_VMSPLIT_2G is not set
+# CONFIG_VMSPLIT_1G is not set
+CONFIG_PAGE_OFFSET=0xC0000000
+# CONFIG_PREEMPT is not set
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+CONFIG_ARCH_FLATMEM_HAS_HOLES=y
+# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
+# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_PAGEFLAGS_EXTENDED=y
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_PHYS_ADDR_T_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=0
+CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0
+CONFIG_ZBOOT_ROM_BSS=0
+CONFIG_CMDLINE="console=ttyS0,115200 rw"
+# CONFIG_XIP_KERNEL is not set
+# CONFIG_KEXEC is not set
+
+#
+# CPU Power Management
+#
+# CONFIG_CPU_FREQ is not set
+CONFIG_CPU_IDLE=y
+CONFIG_CPU_IDLE_GOV_LADDER=y
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+CONFIG_HAVE_AOUT=y
+# CONFIG_BINFMT_AOUT is not set
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Power management options
+#
+# CONFIG_PM is not set
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_COMPAT_NET_DEV_OPS=y
+# CONFIG_PACKET is not set
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_XFRM_STATISTICS is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_DHCP is not set
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+CONFIG_INET_TUNNEL=y
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
+# CONFIG_INET_LRO is not set
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+CONFIG_IPV6=y
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_IPV6_OPTIMISTIC_DAD is not set
+# CONFIG_INET6_AH is not set
+# CONFIG_INET6_ESP is not set
+# CONFIG_INET6_IPCOMP is not set
+# CONFIG_IPV6_MIP6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+CONFIG_INET6_XFRM_MODE_TRANSPORT=y
+CONFIG_INET6_XFRM_MODE_TUNNEL=y
+CONFIG_INET6_XFRM_MODE_BEET=y
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=y
+CONFIG_IPV6_NDISC_NODETYPE=y
+# CONFIG_IPV6_TUNNEL is not set
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_IPV6_MROUTE is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_NET_DSA is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+# CONFIG_DCB is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_AF_RXRPC is not set
+# CONFIG_PHONET is not set
+# CONFIG_WIRELESS is not set
+# CONFIG_WIMAX is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+CONFIG_FIRMWARE_IN_KERNEL=y
+CONFIG_EXTRA_FIRMWARE=""
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+# CONFIG_MTD is not set
+# CONFIG_PARPORT is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_DEV_COW_COMMON is not set
+# CONFIG_BLK_DEV_LOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_UB is not set
+# CONFIG_BLK_DEV_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+# CONFIG_MISC_DEVICES is not set
+CONFIG_HAVE_IDE=y
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=y
+CONFIG_SCSI_DMA=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=y
+# CONFIG_CHR_DEV_ST is not set
+# CONFIG_CHR_DEV_OSST is not set
+# CONFIG_BLK_DEV_SR is not set
+CONFIG_CHR_DEV_SG=y
+# CONFIG_CHR_DEV_SCH is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+# CONFIG_SCSI_MULTI_LUN is not set
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
+CONFIG_SCSI_WAIT_SCAN=m
+
+#
+# SCSI Transports
+#
+# CONFIG_SCSI_SPI_ATTRS is not set
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+# CONFIG_SCSI_SRP_ATTRS is not set
+CONFIG_SCSI_LOWLEVEL=y
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_LIBFC is not set
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_DH is not set
+# CONFIG_ATA is not set
+# CONFIG_MD is not set
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+# CONFIG_VETH is not set
+# CONFIG_PHYLIB is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+CONFIG_AX88796=y
+# CONFIG_AX88796_93CX6 is not set
+# CONFIG_SMC91X is not set
+# CONFIG_DM9000 is not set
+# CONFIG_SMC911X is not set
+# CONFIG_SMSC911X is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
+# CONFIG_B44 is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+# CONFIG_WLAN_80211 is not set
+# CONFIG_IWLWIFI_LEDS is not set
+
+#
+# Enable WiMAX (Networking options) to see the WiMAX drivers
+#
+
+#
+# USB Network Adapters
+#
+# CONFIG_USB_CATC is not set
+# CONFIG_USB_KAWETH is not set
+# CONFIG_USB_PEGASUS is not set
+# CONFIG_USB_RTL8150 is not set
+# CONFIG_USB_USBNET is not set
+# CONFIG_WAN is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+# CONFIG_INPUT_KEYBOARD is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+CONFIG_INPUT_MISC=y
+# CONFIG_INPUT_ATI_REMOTE is not set
+# CONFIG_INPUT_ATI_REMOTE2 is not set
+# CONFIG_INPUT_KEYSPAN_REMOTE is not set
+# CONFIG_INPUT_POWERMATE is not set
+# CONFIG_INPUT_YEALINK is not set
+# CONFIG_INPUT_CM109 is not set
+# CONFIG_INPUT_UINPUT is not set
+CONFIG_INPUT_GPIO_ROTARY_ENCODER=y
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+CONFIG_SERIO_SERPORT=y
+# CONFIG_SERIO_RAW is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_CONSOLE_TRANSLATIONS=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+CONFIG_DEVKMEM=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+# CONFIG_IPMI_HANDLER is not set
+CONFIG_HW_RANDOM=y
+# CONFIG_R3964 is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+# CONFIG_I2C is not set
+# CONFIG_SPI is not set
+CONFIG_ARCH_REQUIRE_GPIOLIB=y
+CONFIG_GPIOLIB=y
+CONFIG_DEBUG_GPIO=y
+# CONFIG_GPIO_SYSFS is not set
+
+#
+# Memory mapped GPIO expanders:
+#
+
+#
+# I2C GPIO expanders:
+#
+
+#
+# PCI GPIO expanders:
+#
+
+#
+# SPI GPIO expanders:
+#
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
+# CONFIG_THERMAL is not set
+# CONFIG_THERMAL_HWMON is not set
+# CONFIG_WATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
+
+#
+# Sonics Silicon Backplane
+#
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_CORE is not set
+# CONFIG_MFD_SM501 is not set
+# CONFIG_MFD_ASIC3 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_MFD_T7L66XB is not set
+# CONFIG_MFD_TC6387XB is not set
+# CONFIG_MFD_TC6393XB is not set
+
+#
+# Multimedia devices
+#
+
+#
+# Multimedia core support
+#
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_DVB_CORE is not set
+# CONFIG_VIDEO_MEDIA is not set
+
+#
+# Multimedia drivers
+#
+# CONFIG_DAB is not set
+
+#
+# Graphics support
+#
+# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+# CONFIG_FB_BOOT_VESA_SUPPORT is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_FOREIGN_ENDIAN is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_S1D13XXX is not set
+CONFIG_FB_PXA=y
+# CONFIG_FB_PXA_OVERLAY is not set
+# CONFIG_FB_PXA_SMARTPANEL is not set
+# CONFIG_FB_PXA_PARAMETERS is not set
+# CONFIG_FB_MBX is not set
+# CONFIG_FB_W100 is not set
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_METRONOME is not set
+# CONFIG_FB_MB862XX is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+# CONFIG_LCD_CLASS_DEVICE is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+# CONFIG_BACKLIGHT_GENERIC is not set
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+# CONFIG_FONTS is not set
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+CONFIG_LOGO=y
+CONFIG_LOGO_LINUX_MONO=y
+CONFIG_LOGO_LINUX_VGA16=y
+CONFIG_LOGO_LINUX_CLUT224=y
+# CONFIG_SOUND is not set
+# CONFIG_HID_SUPPORT is not set
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+CONFIG_USB=y
+CONFIG_USB_DEBUG=y
+CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_DEVICE_CLASS=y
+# CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_OTG is not set
+CONFIG_USB_MON=y
+# CONFIG_USB_WUSB is not set
+# CONFIG_USB_WUSB_CBAF is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_C67X00_HCD is not set
+# CONFIG_USB_OXU210HP_HCD is not set
+# CONFIG_USB_ISP116X_HCD is not set
+# CONFIG_USB_OHCI_HCD is not set
+# CONFIG_USB_SL811_HCD is not set
+# CONFIG_USB_R8A66597_HCD is not set
+# CONFIG_USB_HWA_HCD is not set
+# CONFIG_USB_MUSB_HDRC is not set
+
+#
+# USB Device Class drivers
+#
+# CONFIG_USB_ACM is not set
+# CONFIG_USB_PRINTER is not set
+# CONFIG_USB_WDM is not set
+# CONFIG_USB_TMC is not set
+
+#
+# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;
+#
+
+#
+# see USB_STORAGE Help for more information
+#
+CONFIG_USB_STORAGE=y
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_DATAFAB is not set
+# CONFIG_USB_STORAGE_FREECOM is not set
+# CONFIG_USB_STORAGE_ISD200 is not set
+# CONFIG_USB_STORAGE_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_ONETOUCH is not set
+# CONFIG_USB_STORAGE_KARMA is not set
+# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+# CONFIG_USB_MDC800 is not set
+# CONFIG_USB_MICROTEK is not set
+
+#
+# USB port drivers
+#
+# CONFIG_USB_SERIAL is not set
+
+#
+# USB Miscellaneous drivers
+#
+# CONFIG_USB_EMI62 is not set
+# CONFIG_USB_EMI26 is not set
+# CONFIG_USB_ADUTUX is not set
+# CONFIG_USB_SEVSEG is not set
+# CONFIG_USB_RIO500 is not set
+# CONFIG_USB_LEGOTOWER is not set
+# CONFIG_USB_LCD is not set
+# CONFIG_USB_BERRY_CHARGE is not set
+# CONFIG_USB_LED is not set
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+# CONFIG_USB_CYTHERM is not set
+# CONFIG_USB_PHIDGET is not set
+# CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+# CONFIG_USB_TEST is not set
+# CONFIG_USB_ISIGHTFW is not set
+# CONFIG_USB_VST is not set
+# CONFIG_USB_GADGET is not set
+
+#
+# OTG and related infrastructure
+#
+# CONFIG_USB_GPIO_VBUS is not set
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+# CONFIG_MMC_UNSAFE_RESUME is not set
+
+#
+# MMC/SD/SDIO Card Drivers
+#
+CONFIG_MMC_BLOCK=y
+# CONFIG_MMC_BLOCK_BOUNCE is not set
+# CONFIG_SDIO_UART is not set
+# CONFIG_MMC_TEST is not set
+
+#
+# MMC/SD/SDIO Host Controller Drivers
+#
+CONFIG_MMC_PXA=y
+# CONFIG_MMC_SDHCI is not set
+# CONFIG_MEMSTICK is not set
+# CONFIG_ACCESSIBILITY is not set
+# CONFIG_NEW_LEDS is not set
+CONFIG_RTC_LIB=y
+# CONFIG_RTC_CLASS is not set
+# CONFIG_DMADEVICES is not set
+# CONFIG_REGULATOR is not set
+# CONFIG_UIO is not set
+# CONFIG_STAGING is not set
+
+#
+# File systems
+#
+# CONFIG_EXT2_FS is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+# CONFIG_EXT3_FS_SECURITY is not set
+# CONFIG_EXT4_FS is not set
+CONFIG_JBD=y
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+CONFIG_FILE_LOCKING=y
+# CONFIG_XFS_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_BTRFS_FS is not set
+CONFIG_DNOTIFY=y
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+# CONFIG_MSDOS_FS is not set
+# CONFIG_VFAT_FS is not set
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_SYSFS=y
+# CONFIG_TMPFS is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+CONFIG_MISC_FILESYSTEMS=y
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_SQUASHFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_OMFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+# CONFIG_NFS_V4 is not set
+CONFIG_ROOT_NFS=y
+# CONFIG_NFSD is not set
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+# CONFIG_SUNRPC_REGISTER_V4 is not set
+# CONFIG_RPCSEC_GSS_KRB5 is not set
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_NLS is not set
+# CONFIG_DLM is not set
+
+#
+# Kernel hacking
+#
+CONFIG_PRINTK_TIME=y
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_FRAME_WARN=1024
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_DETECT_SOFTLOCKUP=y
+# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
+CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
+CONFIG_SCHED_DEBUG=y
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_TIMER_STATS is not set
+# CONFIG_DEBUG_OBJECTS is not set
+# CONFIG_SLUB_DEBUG_ON is not set
+# CONFIG_SLUB_STATS is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+# CONFIG_LOCK_STAT is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+CONFIG_DEBUG_INFO=y
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_WRITECOUNT is not set
+CONFIG_DEBUG_MEMORY_INIT=y
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+# CONFIG_DEBUG_NOTIFIERS is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
+# CONFIG_BACKTRACE_SELF_TEST is not set
+# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_LATENCYTOP is not set
+# CONFIG_SYSCTL_SYSCALL_CHECK is not set
+CONFIG_HAVE_FUNCTION_TRACER=y
+
+#
+# Tracers
+#
+# CONFIG_FUNCTION_TRACER is not set
+# CONFIG_IRQSOFF_TRACER is not set
+# CONFIG_SCHED_TRACER is not set
+# CONFIG_CONTEXT_SWITCH_TRACER is not set
+# CONFIG_BOOT_TRACER is not set
+# CONFIG_TRACE_BRANCH_PROFILING is not set
+# CONFIG_STACK_TRACER is not set
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_KGDB is not set
+CONFIG_DEBUG_USER=y
+CONFIG_DEBUG_ERRORS=y
+# CONFIG_DEBUG_STACK_USAGE is not set
+CONFIG_DEBUG_LL=y
+# CONFIG_DEBUG_ICEDCC is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+
+#
+# Crypto core or helper
+#
+# CONFIG_CRYPTO_FIPS is not set
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_ALGAPI2=y
+CONFIG_CRYPTO_AEAD2=y
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_BLKCIPHER2=y
+CONFIG_CRYPTO_HASH2=y
+CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_MANAGER=y
+CONFIG_CRYPTO_MANAGER2=y
+# CONFIG_CRYPTO_GF128MUL is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Authenticated Encryption with Associated Data
+#
+# CONFIG_CRYPTO_CCM is not set
+# CONFIG_CRYPTO_GCM is not set
+# CONFIG_CRYPTO_SEQIV is not set
+
+#
+# Block modes
+#
+# CONFIG_CRYPTO_CBC is not set
+# CONFIG_CRYPTO_CTR is not set
+# CONFIG_CRYPTO_CTS is not set
+CONFIG_CRYPTO_ECB=y
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_PCBC is not set
+# CONFIG_CRYPTO_XTS is not set
+
+#
+# Hash modes
+#
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+
+#
+# Digest
+#
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_MD4 is not set
+# CONFIG_CRYPTO_MD5 is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_RMD128 is not set
+# CONFIG_CRYPTO_RMD160 is not set
+# CONFIG_CRYPTO_RMD256 is not set
+# CONFIG_CRYPTO_RMD320 is not set
+# CONFIG_CRYPTO_SHA1 is not set
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_WP512 is not set
+
+#
+# Ciphers
+#
+CONFIG_CRYPTO_AES=y
+# CONFIG_CRYPTO_ANUBIS is not set
+CONFIG_CRYPTO_ARC4=y
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_DES is not set
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_SALSA20 is not set
+# CONFIG_CRYPTO_SEED is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+
+#
+# Compression
+#
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_LZO is not set
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
+CONFIG_CRYPTO_HW=y
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_GENERIC_FIND_LAST_BIT=y
+# CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_T10DIF is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+# CONFIG_LIBCRC32C is not set
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
index f7622e658163f54db175077d658a72e9f16d9cbd..1aa62249031be53989605dfed4ea72c60c9d7113 100644 (file)
@@ -113,7 +113,6 @@ CONFIG_ARCH_SA1100=y
 CONFIG_SA1100_COLLIE=y
 # CONFIG_SA1100_H3100 is not set
 # CONFIG_SA1100_H3600 is not set
-# CONFIG_SA1100_H3800 is not set
 # CONFIG_SA1100_BADGE4 is not set
 # CONFIG_SA1100_JORNADA720 is not set
 # CONFIG_SA1100_HACKKIT is not set
diff --git a/arch/arm/configs/em_x270_defconfig b/arch/arm/configs/em_x270_defconfig
new file mode 100644 (file)
index 0000000..e9955b7
--- /dev/null
@@ -0,0 +1,1741 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.29-rc2
+# Sun Feb  1 16:43:31 2009
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_LATENCYTOP_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_AUDIT is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_LOG_BUF_SHIFT=14
+CONFIG_GROUP_SCHED=y
+CONFIG_FAIR_GROUP_SCHED=y
+# CONFIG_RT_GROUP_SCHED is not set
+CONFIG_USER_SCHED=y
+# CONFIG_CGROUP_SCHED is not set
+# CONFIG_CGROUPS is not set
+CONFIG_SYSFS_DEPRECATED=y
+CONFIG_SYSFS_DEPRECATED_V2=y
+# CONFIG_RELAY is not set
+# CONFIG_NAMESPACES is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+# CONFIG_COMPAT_BRK is not set
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_AIO=y
+# CONFIG_VM_EVENT_COUNTERS is not set
+# CONFIG_SLUB_DEBUG is not set
+# CONFIG_SLAB is not set
+CONFIG_SLUB=y
+# CONFIG_SLOB is not set
+# CONFIG_PROFILING is not set
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_HAVE_CLK=y
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_RT_MUTEXES=y
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_DEFAULT_AS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+CONFIG_DEFAULT_CFQ=y
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="cfq"
+CONFIG_CLASSIC_RCU=y
+# CONFIG_TREE_RCU is not set
+# CONFIG_PREEMPT_RCU is not set
+# CONFIG_TREE_RCU_TRACE is not set
+# CONFIG_PREEMPT_RCU_TRACE is not set
+CONFIG_FREEZER=y
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KIRKWOOD is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_S3C64XX is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_ARCH_MSM is not set
+# CONFIG_ARCH_W90X900 is not set
+
+#
+# Intel PXA2xx/PXA3xx Implementations
+#
+# CONFIG_ARCH_GUMSTIX is not set
+# CONFIG_MACH_INTELMOTE2 is not set
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_MACH_MP900C is not set
+# CONFIG_ARCH_PXA_IDP is not set
+# CONFIG_PXA_SHARPSL is not set
+# CONFIG_ARCH_VIPER is not set
+# CONFIG_ARCH_PXA_ESERIES is not set
+# CONFIG_TRIZEPS_PXA is not set
+# CONFIG_MACH_H5000 is not set
+CONFIG_MACH_EM_X270=y
+CONFIG_MACH_EXEDA=y
+# CONFIG_MACH_COLIBRI is not set
+# CONFIG_MACH_ZYLONITE is not set
+# CONFIG_MACH_LITTLETON is not set
+# CONFIG_MACH_TAVOREVB is not set
+# CONFIG_MACH_SAAR is not set
+# CONFIG_MACH_ARMCORE is not set
+# CONFIG_MACH_CM_X300 is not set
+# CONFIG_MACH_MAGICIAN is not set
+# CONFIG_MACH_MIOA701 is not set
+# CONFIG_MACH_PCM027 is not set
+# CONFIG_ARCH_PXA_PALM is not set
+# CONFIG_PXA_EZX is not set
+CONFIG_PXA27x=y
+CONFIG_PXA_SSP=y
+# CONFIG_PXA_PWM is not set
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_XSCALE=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_PABRT_NOIFAR=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
+CONFIG_IWMMXT=y
+CONFIG_XSCALE_PMU=y
+CONFIG_COMMON_CLKDEV=y
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ=y
+# CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_VMSPLIT_3G=y
+# CONFIG_VMSPLIT_2G is not set
+# CONFIG_VMSPLIT_1G is not set
+CONFIG_PAGE_OFFSET=0xC0000000
+# CONFIG_PREEMPT is not set
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+CONFIG_ARCH_FLATMEM_HAS_HOLES=y
+# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
+# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_PAGEFLAGS_EXTENDED=y
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_PHYS_ADDR_T_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=0
+CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="root=1f03 mem=32M"
+# CONFIG_XIP_KERNEL is not set
+# CONFIG_KEXEC is not set
+
+#
+# CPU Power Management
+#
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_TABLE=y
+# CONFIG_CPU_FREQ_DEBUG is not set
+CONFIG_CPU_FREQ_STAT=y
+# CONFIG_CPU_FREQ_STAT_DETAILS is not set
+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
+CONFIG_CPU_FREQ_GOV_USERSPACE=m
+# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set
+# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
+# CONFIG_CPU_IDLE is not set
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+CONFIG_HAVE_AOUT=y
+# CONFIG_BINFMT_AOUT is not set
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_DEBUG is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND=y
+CONFIG_SUSPEND_FREEZER=y
+CONFIG_APM_EMULATION=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_COMPAT_NET_DEV_OPS=y
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_XFRM_STATISTICS is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
+# CONFIG_INET_LRO is not set
+# CONFIG_INET_DIAG is not set
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_NET_DSA is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+# CONFIG_DCB is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
+# CONFIG_IRDA is not set
+CONFIG_BT=m
+CONFIG_BT_L2CAP=m
+CONFIG_BT_SCO=m
+CONFIG_BT_RFCOMM=m
+# CONFIG_BT_RFCOMM_TTY is not set
+CONFIG_BT_BNEP=m
+# CONFIG_BT_BNEP_MC_FILTER is not set
+# CONFIG_BT_BNEP_PROTO_FILTER is not set
+CONFIG_BT_HIDP=m
+
+#
+# Bluetooth device drivers
+#
+CONFIG_BT_HCIBTUSB=m
+# CONFIG_BT_HCIBTSDIO is not set
+# CONFIG_BT_HCIUART is not set
+# CONFIG_BT_HCIBCM203X is not set
+# CONFIG_BT_HCIBPA10X is not set
+# CONFIG_BT_HCIBFUSB is not set
+# CONFIG_BT_HCIVHCI is not set
+# CONFIG_AF_RXRPC is not set
+# CONFIG_PHONET is not set
+CONFIG_WIRELESS=y
+# CONFIG_CFG80211 is not set
+CONFIG_WIRELESS_OLD_REGULATORY=y
+CONFIG_WIRELESS_EXT=y
+CONFIG_WIRELESS_EXT_SYSFS=y
+CONFIG_LIB80211=m
+# CONFIG_MAC80211 is not set
+# CONFIG_WIMAX is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=m
+CONFIG_FIRMWARE_IN_KERNEL=y
+CONFIG_EXTRA_FIRMWARE=""
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_CONCAT is not set
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_TESTS is not set
+# CONFIG_MTD_REDBOOT_PARTS is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+# CONFIG_MTD_AFS_PARTS is not set
+# CONFIG_MTD_AR7_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+CONFIG_MTD_JEDECPROBE=y
+CONFIG_MTD_GEN_PROBE=y
+CONFIG_MTD_CFI_ADV_OPTIONS=y
+CONFIG_MTD_CFI_NOSWAP=y
+# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
+# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
+# CONFIG_MTD_CFI_GEOMETRY is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_OTP is not set
+CONFIG_MTD_CFI_INTELEXT=y
+CONFIG_MTD_CFI_AMDSTD=y
+CONFIG_MTD_CFI_STAA=y
+CONFIG_MTD_CFI_UTIL=y
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+# CONFIG_MTD_XIP is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+CONFIG_MTD_PHYSMAP=y
+# CONFIG_MTD_PHYSMAP_COMPAT is not set
+CONFIG_MTD_PXA2XX=y
+# CONFIG_MTD_ARM_INTEGRATOR is not set
+# CONFIG_MTD_IMPA7 is not set
+# CONFIG_MTD_SHARP_SL is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_DATAFLASH is not set
+# CONFIG_MTD_M25P80 is not set
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+CONFIG_MTD_NAND=y
+# CONFIG_MTD_NAND_VERIFY_WRITE is not set
+# CONFIG_MTD_NAND_ECC_SMC is not set
+# CONFIG_MTD_NAND_MUSEUM_IDS is not set
+# CONFIG_MTD_NAND_H1900 is not set
+# CONFIG_MTD_NAND_GPIO is not set
+CONFIG_MTD_NAND_IDS=y
+# CONFIG_MTD_NAND_DISKONCHIP is not set
+# CONFIG_MTD_NAND_SHARPSL is not set
+# CONFIG_MTD_NAND_NANDSIM is not set
+CONFIG_MTD_NAND_PLATFORM=y
+# CONFIG_MTD_ALAUDA is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# LPDDR flash memory drivers
+#
+# CONFIG_MTD_LPDDR is not set
+# CONFIG_MTD_QINFO_PROBE is not set
+
+#
+# UBI - Unsorted block images
+#
+# CONFIG_MTD_UBI is not set
+# CONFIG_PARPORT is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_UB is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=4096
+# CONFIG_BLK_DEV_XIP is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+# CONFIG_MISC_DEVICES is not set
+CONFIG_HAVE_IDE=y
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=y
+CONFIG_SCSI_DMA=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=y
+# CONFIG_CHR_DEV_ST is not set
+# CONFIG_CHR_DEV_OSST is not set
+# CONFIG_BLK_DEV_SR is not set
+# CONFIG_CHR_DEV_SG is not set
+# CONFIG_CHR_DEV_SCH is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+# CONFIG_SCSI_MULTI_LUN is not set
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
+CONFIG_SCSI_WAIT_SCAN=m
+
+#
+# SCSI Transports
+#
+# CONFIG_SCSI_SPI_ATTRS is not set
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+# CONFIG_SCSI_SRP_ATTRS is not set
+# CONFIG_SCSI_LOWLEVEL is not set
+# CONFIG_SCSI_DH is not set
+# CONFIG_ATA is not set
+# CONFIG_MD is not set
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+# CONFIG_VETH is not set
+# CONFIG_PHYLIB is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_AX88796 is not set
+# CONFIG_SMC91X is not set
+CONFIG_DM9000=y
+CONFIG_DM9000_DEBUGLEVEL=1
+# CONFIG_DM9000_FORCE_SIMPLE_PHY_POLL is not set
+# CONFIG_ENC28J60 is not set
+# CONFIG_SMC911X is not set
+# CONFIG_SMSC911X is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
+# CONFIG_B44 is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+CONFIG_WLAN_80211=y
+CONFIG_LIBERTAS=m
+# CONFIG_LIBERTAS_USB is not set
+CONFIG_LIBERTAS_SDIO=m
+# CONFIG_LIBERTAS_DEBUG is not set
+# CONFIG_USB_ZD1201 is not set
+# CONFIG_USB_NET_RNDIS_WLAN is not set
+# CONFIG_IWLWIFI_LEDS is not set
+# CONFIG_HOSTAP is not set
+
+#
+# Enable WiMAX (Networking options) to see the WiMAX drivers
+#
+
+#
+# USB Network Adapters
+#
+# CONFIG_USB_CATC is not set
+# CONFIG_USB_KAWETH is not set
+# CONFIG_USB_PEGASUS is not set
+# CONFIG_USB_RTL8150 is not set
+# CONFIG_USB_USBNET is not set
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+CONFIG_PPP_MULTILINK=y
+CONFIG_PPP_FILTER=y
+CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+# CONFIG_PPP_MPPE is not set
+# CONFIG_PPPOE is not set
+# CONFIG_PPPOL2TP is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+CONFIG_INPUT_APMPOWER=y
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=y
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+CONFIG_KEYBOARD_PXA27x=y
+CONFIG_KEYBOARD_GPIO=y
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_ADS7846 is not set
+# CONFIG_TOUCHSCREEN_DA9034 is not set
+# CONFIG_TOUCHSCREEN_FUJITSU is not set
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_INEXIO is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+CONFIG_TOUCHSCREEN_WM97XX=m
+# CONFIG_TOUCHSCREEN_WM9705 is not set
+CONFIG_TOUCHSCREEN_WM9712=y
+# CONFIG_TOUCHSCREEN_WM9713 is not set
+# CONFIG_TOUCHSCREEN_WM97XX_MAINSTONE is not set
+# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
+# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
+# CONFIG_TOUCHSCREEN_TSC2007 is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+# CONFIG_SERIO_SERPORT is not set
+CONFIG_SERIO_LIBPS2=y
+# CONFIG_SERIO_RAW is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_CONSOLE_TRANSLATIONS=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+CONFIG_DEVKMEM=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=16
+# CONFIG_IPMI_HANDLER is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_NVRAM is not set
+# CONFIG_R3964 is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_CHARDEV=m
+CONFIG_I2C_HELPER_AUTO=y
+
+#
+# I2C Hardware Bus support
+#
+
+#
+# I2C system bus drivers (mostly embedded / system-on-chip)
+#
+# CONFIG_I2C_GPIO is not set
+# CONFIG_I2C_OCORES is not set
+CONFIG_I2C_PXA=y
+# CONFIG_I2C_PXA_SLAVE is not set
+# CONFIG_I2C_SIMTEC is not set
+
+#
+# External I2C/SMBus adapter drivers
+#
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_TINY_USB is not set
+
+#
+# Other I2C/SMBus bus drivers
+#
+# CONFIG_I2C_PCA_PLATFORM is not set
+# CONFIG_I2C_STUB is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_DS1682 is not set
+# CONFIG_EEPROM_AT24 is not set
+# CONFIG_EEPROM_LEGACY is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_PCF8575 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_SENSORS_TSL2550 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+CONFIG_SPI=y
+# CONFIG_SPI_DEBUG is not set
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+# CONFIG_SPI_BITBANG is not set
+# CONFIG_SPI_GPIO is not set
+CONFIG_SPI_PXA2XX=y
+
+#
+# SPI Protocol Masters
+#
+# CONFIG_SPI_AT25 is not set
+# CONFIG_SPI_SPIDEV is not set
+# CONFIG_SPI_TLE62X0 is not set
+CONFIG_ARCH_REQUIRE_GPIOLIB=y
+CONFIG_GPIOLIB=y
+# CONFIG_DEBUG_GPIO is not set
+# CONFIG_GPIO_SYSFS is not set
+
+#
+# Memory mapped GPIO expanders:
+#
+
+#
+# I2C GPIO expanders:
+#
+# CONFIG_GPIO_MAX732X is not set
+# CONFIG_GPIO_PCA953X is not set
+# CONFIG_GPIO_PCF857X is not set
+
+#
+# PCI GPIO expanders:
+#
+
+#
+# SPI GPIO expanders:
+#
+# CONFIG_GPIO_MAX7301 is not set
+# CONFIG_GPIO_MCP23S08 is not set
+# CONFIG_W1 is not set
+CONFIG_POWER_SUPPLY=y
+# CONFIG_POWER_SUPPLY_DEBUG is not set
+# CONFIG_PDA_POWER is not set
+# CONFIG_APM_POWER is not set
+# CONFIG_BATTERY_DS2760 is not set
+# CONFIG_BATTERY_BQ27x00 is not set
+CONFIG_BATTERY_DA9030=y
+# CONFIG_HWMON is not set
+# CONFIG_THERMAL is not set
+# CONFIG_THERMAL_HWMON is not set
+# CONFIG_WATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
+
+#
+# Sonics Silicon Backplane
+#
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_CORE is not set
+# CONFIG_MFD_SM501 is not set
+# CONFIG_MFD_ASIC3 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_UCB1400_CORE is not set
+# CONFIG_TPS65010 is not set
+# CONFIG_TWL4030_CORE is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_MFD_T7L66XB is not set
+# CONFIG_MFD_TC6387XB is not set
+# CONFIG_MFD_TC6393XB is not set
+CONFIG_PMIC_DA903X=y
+# CONFIG_MFD_WM8400 is not set
+# CONFIG_MFD_WM8350_I2C is not set
+# CONFIG_MFD_PCF50633 is not set
+
+#
+# Multimedia devices
+#
+
+#
+# Multimedia core support
+#
+CONFIG_VIDEO_DEV=m
+CONFIG_VIDEO_V4L2_COMMON=m
+# CONFIG_VIDEO_ALLOW_V4L1 is not set
+CONFIG_VIDEO_V4L1_COMPAT=y
+# CONFIG_DVB_CORE is not set
+CONFIG_VIDEO_MEDIA=m
+
+#
+# Multimedia drivers
+#
+# CONFIG_MEDIA_ATTACH is not set
+CONFIG_MEDIA_TUNER=m
+CONFIG_MEDIA_TUNER_CUSTOMIZE=y
+# CONFIG_MEDIA_TUNER_SIMPLE is not set
+# CONFIG_MEDIA_TUNER_TDA8290 is not set
+# CONFIG_MEDIA_TUNER_TDA827X is not set
+# CONFIG_MEDIA_TUNER_TDA18271 is not set
+# CONFIG_MEDIA_TUNER_TDA9887 is not set
+# CONFIG_MEDIA_TUNER_TEA5761 is not set
+# CONFIG_MEDIA_TUNER_TEA5767 is not set
+# CONFIG_MEDIA_TUNER_MT20XX is not set
+# CONFIG_MEDIA_TUNER_MT2060 is not set
+# CONFIG_MEDIA_TUNER_MT2266 is not set
+# CONFIG_MEDIA_TUNER_MT2131 is not set
+# CONFIG_MEDIA_TUNER_QT1010 is not set
+# CONFIG_MEDIA_TUNER_XC2028 is not set
+# CONFIG_MEDIA_TUNER_XC5000 is not set
+# CONFIG_MEDIA_TUNER_MXL5005S is not set
+# CONFIG_MEDIA_TUNER_MXL5007T is not set
+CONFIG_VIDEO_V4L2=m
+CONFIG_VIDEOBUF_GEN=m
+CONFIG_VIDEOBUF_DMA_SG=m
+CONFIG_VIDEO_CAPTURE_DRIVERS=y
+# CONFIG_VIDEO_ADV_DEBUG is not set
+# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
+# CONFIG_VIDEO_HELPER_CHIPS_AUTO is not set
+
+#
+# Encoders/decoders and other helper chips
+#
+
+#
+# Audio decoders
+#
+# CONFIG_VIDEO_TVAUDIO is not set
+# CONFIG_VIDEO_TDA7432 is not set
+# CONFIG_VIDEO_TDA9840 is not set
+# CONFIG_VIDEO_TDA9875 is not set
+# CONFIG_VIDEO_TEA6415C is not set
+# CONFIG_VIDEO_TEA6420 is not set
+# CONFIG_VIDEO_MSP3400 is not set
+# CONFIG_VIDEO_CS5345 is not set
+# CONFIG_VIDEO_CS53L32A is not set
+# CONFIG_VIDEO_M52790 is not set
+# CONFIG_VIDEO_TLV320AIC23B is not set
+# CONFIG_VIDEO_WM8775 is not set
+# CONFIG_VIDEO_WM8739 is not set
+# CONFIG_VIDEO_VP27SMPX is not set
+
+#
+# Video decoders
+#
+# CONFIG_VIDEO_OV7670 is not set
+# CONFIG_VIDEO_TCM825X is not set
+# CONFIG_VIDEO_SAA711X is not set
+# CONFIG_VIDEO_SAA717X is not set
+# CONFIG_VIDEO_TVP514X is not set
+# CONFIG_VIDEO_TVP5150 is not set
+
+#
+# Video and audio decoders
+#
+# CONFIG_VIDEO_CX25840 is not set
+
+#
+# MPEG video encoders
+#
+# CONFIG_VIDEO_CX2341X is not set
+
+#
+# Video encoders
+#
+# CONFIG_VIDEO_SAA7127 is not set
+
+#
+# Video improvement chips
+#
+# CONFIG_VIDEO_UPD64031A is not set
+# CONFIG_VIDEO_UPD64083 is not set
+# CONFIG_VIDEO_VIVI is not set
+# CONFIG_VIDEO_SAA5246A is not set
+# CONFIG_VIDEO_SAA5249 is not set
+CONFIG_SOC_CAMERA=m
+# CONFIG_SOC_CAMERA_MT9M001 is not set
+CONFIG_SOC_CAMERA_MT9M111=m
+# CONFIG_SOC_CAMERA_MT9T031 is not set
+# CONFIG_SOC_CAMERA_MT9V022 is not set
+# CONFIG_SOC_CAMERA_TW9910 is not set
+# CONFIG_SOC_CAMERA_PLATFORM is not set
+# CONFIG_SOC_CAMERA_OV772X is not set
+CONFIG_VIDEO_PXA27x=m
+# CONFIG_VIDEO_SH_MOBILE_CEU is not set
+# CONFIG_V4L_USB_DRIVERS is not set
+# CONFIG_RADIO_ADAPTERS is not set
+# CONFIG_DAB is not set
+
+#
+# Graphics support
+#
+# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+# CONFIG_FB_BOOT_VESA_SUPPORT is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_FOREIGN_ENDIAN is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_S1D13XXX is not set
+CONFIG_FB_PXA=y
+# CONFIG_FB_PXA_OVERLAY is not set
+# CONFIG_FB_PXA_SMARTPANEL is not set
+CONFIG_FB_PXA_PARAMETERS=y
+CONFIG_FB_MBX=m
+# CONFIG_FB_MBX_DEBUG is not set
+# CONFIG_FB_W100 is not set
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_METRONOME is not set
+# CONFIG_FB_MB862XX is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_LCD_CLASS_DEVICE=y
+# CONFIG_LCD_LTV350QV is not set
+# CONFIG_LCD_ILI9320 is not set
+CONFIG_LCD_TDO24M=y
+# CONFIG_LCD_VGG2432A4 is not set
+# CONFIG_LCD_PLATFORM is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=m
+# CONFIG_BACKLIGHT_GENERIC is not set
+CONFIG_BACKLIGHT_DA903X=m
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+# CONFIG_FONTS is not set
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+CONFIG_LOGO=y
+CONFIG_LOGO_LINUX_MONO=y
+CONFIG_LOGO_LINUX_VGA16=y
+CONFIG_LOGO_LINUX_CLUT224=y
+CONFIG_SOUND=m
+CONFIG_SOUND_OSS_CORE=y
+CONFIG_SND=m
+CONFIG_SND_TIMER=m
+CONFIG_SND_PCM=m
+# CONFIG_SND_SEQUENCER is not set
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=m
+CONFIG_SND_PCM_OSS=m
+CONFIG_SND_PCM_OSS_PLUGINS=y
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+CONFIG_SND_VMASTER=y
+CONFIG_SND_AC97_CODEC=m
+# CONFIG_SND_DRIVERS is not set
+CONFIG_SND_ARM=y
+CONFIG_SND_PXA2XX_LIB=m
+CONFIG_SND_PXA2XX_LIB_AC97=y
+# CONFIG_SND_PXA2XX_AC97 is not set
+# CONFIG_SND_SPI is not set
+# CONFIG_SND_USB is not set
+CONFIG_SND_SOC=m
+CONFIG_SND_SOC_AC97_BUS=y
+CONFIG_SND_PXA2XX_SOC=m
+CONFIG_SND_PXA2XX_SOC_AC97=m
+CONFIG_SND_PXA2XX_SOC_EM_X270=m
+CONFIG_SND_SOC_I2C_AND_SPI=m
+# CONFIG_SND_SOC_ALL_CODECS is not set
+CONFIG_SND_SOC_WM9712=m
+# CONFIG_SOUND_PRIME is not set
+CONFIG_AC97_BUS=m
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=y
+CONFIG_HID_DEBUG=y
+# CONFIG_HIDRAW is not set
+
+#
+# USB Input Devices
+#
+CONFIG_USB_HID=y
+# CONFIG_HID_PID is not set
+# CONFIG_USB_HIDDEV is not set
+
+#
+# Special HID drivers
+#
+CONFIG_HID_COMPAT=y
+CONFIG_HID_A4TECH=y
+CONFIG_HID_APPLE=y
+CONFIG_HID_BELKIN=y
+CONFIG_HID_CHERRY=y
+CONFIG_HID_CHICONY=y
+CONFIG_HID_CYPRESS=y
+CONFIG_HID_EZKEY=y
+CONFIG_HID_GYRATION=y
+CONFIG_HID_LOGITECH=y
+# CONFIG_LOGITECH_FF is not set
+# CONFIG_LOGIRUMBLEPAD2_FF is not set
+CONFIG_HID_MICROSOFT=y
+CONFIG_HID_MONTEREY=y
+# CONFIG_HID_NTRIG is not set
+CONFIG_HID_PANTHERLORD=y
+# CONFIG_PANTHERLORD_FF is not set
+CONFIG_HID_PETALYNX=y
+CONFIG_HID_SAMSUNG=y
+CONFIG_HID_SONY=y
+CONFIG_HID_SUNPLUS=y
+# CONFIG_GREENASIA_FF is not set
+# CONFIG_HID_TOPSEED is not set
+# CONFIG_THRUSTMASTER_FF is not set
+# CONFIG_ZEROPLUS_FF is not set
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+CONFIG_USB=y
+# CONFIG_USB_DEBUG is not set
+# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+# CONFIG_USB_DEVICE_CLASS is not set
+# CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_SUSPEND is not set
+# CONFIG_USB_OTG is not set
+# CONFIG_USB_OTG_WHITELIST is not set
+# CONFIG_USB_OTG_BLACKLIST_HUB is not set
+CONFIG_USB_MON=y
+# CONFIG_USB_WUSB is not set
+# CONFIG_USB_WUSB_CBAF is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_C67X00_HCD is not set
+# CONFIG_USB_OXU210HP_HCD is not set
+# CONFIG_USB_ISP116X_HCD is not set
+CONFIG_USB_OHCI_HCD=y
+# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
+# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
+CONFIG_USB_OHCI_LITTLE_ENDIAN=y
+# CONFIG_USB_SL811_HCD is not set
+# CONFIG_USB_R8A66597_HCD is not set
+# CONFIG_USB_HWA_HCD is not set
+# CONFIG_USB_MUSB_HDRC is not set
+
+#
+# USB Device Class drivers
+#
+# CONFIG_USB_ACM is not set
+# CONFIG_USB_PRINTER is not set
+# CONFIG_USB_WDM is not set
+# CONFIG_USB_TMC is not set
+
+#
+# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;
+#
+
+#
+# see USB_STORAGE Help for more information
+#
+CONFIG_USB_STORAGE=y
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_DATAFAB is not set
+# CONFIG_USB_STORAGE_FREECOM is not set
+# CONFIG_USB_STORAGE_ISD200 is not set
+# CONFIG_USB_STORAGE_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_ONETOUCH is not set
+# CONFIG_USB_STORAGE_KARMA is not set
+# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+# CONFIG_USB_MDC800 is not set
+# CONFIG_USB_MICROTEK is not set
+
+#
+# USB port drivers
+#
+# CONFIG_USB_SERIAL is not set
+
+#
+# USB Miscellaneous drivers
+#
+# CONFIG_USB_EMI62 is not set
+# CONFIG_USB_EMI26 is not set
+# CONFIG_USB_ADUTUX is not set
+# CONFIG_USB_SEVSEG is not set
+# CONFIG_USB_RIO500 is not set
+# CONFIG_USB_LEGOTOWER is not set
+# CONFIG_USB_LCD is not set
+# CONFIG_USB_BERRY_CHARGE is not set
+# CONFIG_USB_LED is not set
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+# CONFIG_USB_CYTHERM is not set
+# CONFIG_USB_PHIDGET is not set
+# CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+# CONFIG_USB_TEST is not set
+# CONFIG_USB_ISIGHTFW is not set
+# CONFIG_USB_VST is not set
+# CONFIG_USB_GADGET is not set
+
+#
+# OTG and related infrastructure
+#
+# CONFIG_USB_GPIO_VBUS is not set
+CONFIG_MMC=m
+# CONFIG_MMC_DEBUG is not set
+# CONFIG_MMC_UNSAFE_RESUME is not set
+
+#
+# MMC/SD/SDIO Card Drivers
+#
+CONFIG_MMC_BLOCK=m
+CONFIG_MMC_BLOCK_BOUNCE=y
+# CONFIG_SDIO_UART is not set
+# CONFIG_MMC_TEST is not set
+
+#
+# MMC/SD/SDIO Host Controller Drivers
+#
+CONFIG_MMC_PXA=m
+# CONFIG_MMC_SDHCI is not set
+# CONFIG_MMC_SPI is not set
+# CONFIG_MEMSTICK is not set
+# CONFIG_ACCESSIBILITY is not set
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+# CONFIG_LEDS_PCA9532 is not set
+# CONFIG_LEDS_GPIO is not set
+# CONFIG_LEDS_PCA955X is not set
+CONFIG_LEDS_DA903X=y
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+# CONFIG_LEDS_TRIGGER_TIMER is not set
+CONFIG_LEDS_TRIGGER_HEARTBEAT=y
+# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
+# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1374 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_PCF8583 is not set
+# CONFIG_RTC_DRV_M41T80 is not set
+# CONFIG_RTC_DRV_S35390A is not set
+# CONFIG_RTC_DRV_FM3130 is not set
+# CONFIG_RTC_DRV_RX8581 is not set
+
+#
+# SPI RTC drivers
+#
+# CONFIG_RTC_DRV_M41T94 is not set
+# CONFIG_RTC_DRV_DS1305 is not set
+# CONFIG_RTC_DRV_DS1390 is not set
+# CONFIG_RTC_DRV_MAX6902 is not set
+# CONFIG_RTC_DRV_R9701 is not set
+# CONFIG_RTC_DRV_RS5C348 is not set
+# CONFIG_RTC_DRV_DS3234 is not set
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1286 is not set
+# CONFIG_RTC_DRV_DS1511 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T35 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_BQ4802 is not set
+CONFIG_RTC_DRV_V3020=y
+
+#
+# on-CPU RTC drivers
+#
+CONFIG_RTC_DRV_SA1100=y
+# CONFIG_RTC_DRV_PXA is not set
+# CONFIG_DMADEVICES is not set
+CONFIG_REGULATOR=y
+# CONFIG_REGULATOR_DEBUG is not set
+# CONFIG_REGULATOR_FIXED_VOLTAGE is not set
+# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
+# CONFIG_REGULATOR_BQ24022 is not set
+CONFIG_REGULATOR_DA903X=y
+# CONFIG_UIO is not set
+# CONFIG_STAGING is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+# CONFIG_EXT3_FS_SECURITY is not set
+# CONFIG_EXT4_FS is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+CONFIG_FILE_LOCKING=y
+# CONFIG_XFS_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_BTRFS_FS is not set
+CONFIG_DNOTIFY=y
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+# CONFIG_MSDOS_FS is not set
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+# CONFIG_PROC_PAGE_MONITOR is not set
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+CONFIG_MISC_FILESYSTEMS=y
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+CONFIG_JFFS2_SUMMARY=y
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
+CONFIG_JFFS2_ZLIB=y
+# CONFIG_JFFS2_LZO is not set
+CONFIG_JFFS2_RTIME=y
+# CONFIG_JFFS2_RUBIN is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_SQUASHFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_OMFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+# CONFIG_NFS_V4 is not set
+CONFIG_ROOT_NFS=y
+# CONFIG_NFSD is not set
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+# CONFIG_SUNRPC_REGISTER_V4 is not set
+# CONFIG_RPCSEC_GSS_KRB5 is not set
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_SMB_FS is not set
+CONFIG_CIFS=m
+# CONFIG_CIFS_STATS is not set
+# CONFIG_CIFS_WEAK_PW_HASH is not set
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_BSD_DISKLABEL is not set
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_UNIXWARE_DISKLABEL is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_KARMA_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+# CONFIG_SYSV68_PARTITION is not set
+CONFIG_NLS=m
+CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS_CODEPAGE_437=m
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ASCII is not set
+CONFIG_NLS_ISO8859_1=m
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+CONFIG_NLS_UTF8=m
+# CONFIG_DLM is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_FRAME_WARN=0
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_FS=y
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+# CONFIG_DETECT_SOFTLOCKUP is not set
+# CONFIG_SCHED_DEBUG is not set
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_TIMER_STATS is not set
+# CONFIG_DEBUG_OBJECTS is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+# CONFIG_LOCK_STAT is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_WRITECOUNT is not set
+# CONFIG_DEBUG_MEMORY_INIT is not set
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+# CONFIG_DEBUG_NOTIFIERS is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
+# CONFIG_BACKTRACE_SELF_TEST is not set
+# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_LATENCYTOP is not set
+CONFIG_SYSCTL_SYSCALL_CHECK=y
+CONFIG_HAVE_FUNCTION_TRACER=y
+
+#
+# Tracers
+#
+# CONFIG_FUNCTION_TRACER is not set
+# CONFIG_IRQSOFF_TRACER is not set
+# CONFIG_SCHED_TRACER is not set
+# CONFIG_CONTEXT_SWITCH_TRACER is not set
+# CONFIG_BOOT_TRACER is not set
+# CONFIG_TRACE_BRANCH_PROFILING is not set
+# CONFIG_STACK_TRACER is not set
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_KGDB is not set
+CONFIG_DEBUG_USER=y
+CONFIG_DEBUG_ERRORS=y
+# CONFIG_DEBUG_STACK_USAGE is not set
+CONFIG_DEBUG_LL=y
+# CONFIG_DEBUG_ICEDCC is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+
+#
+# Crypto core or helper
+#
+# CONFIG_CRYPTO_FIPS is not set
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_ALGAPI2=m
+CONFIG_CRYPTO_AEAD2=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_BLKCIPHER2=m
+CONFIG_CRYPTO_HASH=m
+CONFIG_CRYPTO_HASH2=m
+CONFIG_CRYPTO_RNG2=m
+CONFIG_CRYPTO_MANAGER=m
+CONFIG_CRYPTO_MANAGER2=m
+# CONFIG_CRYPTO_GF128MUL is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Authenticated Encryption with Associated Data
+#
+# CONFIG_CRYPTO_CCM is not set
+# CONFIG_CRYPTO_GCM is not set
+# CONFIG_CRYPTO_SEQIV is not set
+
+#
+# Block modes
+#
+# CONFIG_CRYPTO_CBC is not set
+# CONFIG_CRYPTO_CTR is not set
+# CONFIG_CRYPTO_CTS is not set
+CONFIG_CRYPTO_ECB=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_PCBC is not set
+# CONFIG_CRYPTO_XTS is not set
+
+#
+# Hash modes
+#
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+
+#
+# Digest
+#
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_MD4 is not set
+# CONFIG_CRYPTO_MD5 is not set
+CONFIG_CRYPTO_MICHAEL_MIC=m
+# CONFIG_CRYPTO_RMD128 is not set
+# CONFIG_CRYPTO_RMD160 is not set
+# CONFIG_CRYPTO_RMD256 is not set
+# CONFIG_CRYPTO_RMD320 is not set
+# CONFIG_CRYPTO_SHA1 is not set
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_WP512 is not set
+
+#
+# Ciphers
+#
+CONFIG_CRYPTO_AES=m
+# CONFIG_CRYPTO_ANUBIS is not set
+CONFIG_CRYPTO_ARC4=m
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_DES is not set
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_SALSA20 is not set
+# CONFIG_CRYPTO_SEED is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+
+#
+# Compression
+#
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_LZO is not set
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
+# CONFIG_CRYPTO_HW is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_GENERIC_FIND_LAST_BIT=y
+CONFIG_CRC_CCITT=m
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_T10DIF is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
index 8f986e9f1c628bf282e1b1ff2d2ed10bfbb912f2..1502957db2c30eb801d8480703e7b318cf4b85b2 100644 (file)
@@ -90,7 +90,6 @@ CONFIG_ARCH_SA1100=y
 # CONFIG_SA1100_COLLIE is not set
 # CONFIG_SA1100_H3100 is not set
 CONFIG_SA1100_H3600=y
-# CONFIG_SA1100_H3800 is not set
 CONFIG_SA1100_H3XXX=y
 # CONFIG_SA1100_BADGE4 is not set
 # CONFIG_SA1100_JORNADA720 is not set
@@ -100,7 +99,6 @@ CONFIG_SA1100_H3XXX=y
 # CONFIG_SA1100_SHANNON is not set
 # CONFIG_SA1100_SIMPAD is not set
 # CONFIG_SA1100_SSP is not set
-# CONFIG_H3600_SLEEVE is not set
 
 #
 # Processor Type
index 1c8fb89a6730c55387cdafc169b0afb72e29dc62..db0708d5cbead9fc7c86db2d19da4dc4f1822b81 100644 (file)
@@ -91,7 +91,6 @@ CONFIG_ARCH_SA1100=y
 # CONFIG_SA1100_COLLIE is not set
 # CONFIG_SA1100_H3100 is not set
 # CONFIG_SA1100_H3600 is not set
-# CONFIG_SA1100_H3800 is not set
 # CONFIG_SA1100_BADGE4 is not set
 # CONFIG_SA1100_JORNADA720 is not set
 CONFIG_SA1100_HACKKIT=y
index 81fadafae02dcfab20e7f9518ade49c72be5c55b..f3074e49f2faa8cdb9e3edbfdc50c95e6c610988 100644 (file)
@@ -178,7 +178,6 @@ CONFIG_DMABOUNCE=y
 # CONFIG_SA1100_COLLIE is not set
 # CONFIG_SA1100_H3100 is not set
 # CONFIG_SA1100_H3600 is not set
-# CONFIG_SA1100_H3800 is not set
 # CONFIG_SA1100_BADGE4 is not set
 CONFIG_SA1100_JORNADA720=y
 CONFIG_SA1100_JORNADA720_SSP=y
index a1cc34f256022bd5a5a0f06654072cd7d8b986fa..56ae56899d2e1ea4b4f84c047cd848dbee15bf94 100644 (file)
@@ -87,7 +87,6 @@ CONFIG_ARCH_SA1100=y
 # CONFIG_SA1100_COLLIE is not set
 # CONFIG_SA1100_H3100 is not set
 # CONFIG_SA1100_H3600 is not set
-# CONFIG_SA1100_H3800 is not set
 # CONFIG_SA1100_BADGE4 is not set
 # CONFIG_SA1100_JORNADA720 is not set
 # CONFIG_SA1100_HACKKIT is not set
index 73ba62b71063cd443ff94526edfa70173263649a..82428c2f234cb4c1b6f509aed187d52164211834 100644 (file)
@@ -1,9 +1,10 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.24-rc6
-# Sun Dec 30 13:02:54 2007
+# Linux kernel version: 2.6.29-rc3
+# Fri Jan 30 12:42:03 2009
 #
 CONFIG_ARM=y
+CONFIG_HAVE_PWM=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
 CONFIG_GENERIC_GPIO=y
 CONFIG_GENERIC_TIME=y
@@ -12,6 +13,7 @@ CONFIG_MMU=y
 # CONFIG_NO_IOPORT is not set
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_LATENCYTOP_SUPPORT=y
 CONFIG_LOCKDEP_SUPPORT=y
 CONFIG_TRACE_IRQFLAGS_SUPPORT=y
 CONFIG_HARDIRQS_SW_RESEND=y
@@ -21,8 +23,8 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 # CONFIG_ARCH_HAS_ILOG2_U64 is not set
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
-CONFIG_ZONE_DMA=y
 CONFIG_ARCH_MTD_XIP=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
 CONFIG_VECTORS_BASE=0xffff0000
 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
@@ -41,16 +43,24 @@ CONFIG_SYSVIPC_SYSCTL=y
 # CONFIG_POSIX_MQUEUE is not set
 # CONFIG_BSD_PROCESS_ACCT is not set
 # CONFIG_TASKSTATS is not set
-# CONFIG_USER_NS is not set
-# CONFIG_PID_NS is not set
 # CONFIG_AUDIT is not set
+
+#
+# RCU Subsystem
+#
+CONFIG_CLASSIC_RCU=y
+# CONFIG_TREE_RCU is not set
+# CONFIG_PREEMPT_RCU is not set
+# CONFIG_TREE_RCU_TRACE is not set
+# CONFIG_PREEMPT_RCU_TRACE is not set
 CONFIG_IKCONFIG=y
 CONFIG_IKCONFIG_PROC=y
 CONFIG_LOG_BUF_SHIFT=16
+# CONFIG_GROUP_SCHED is not set
 # CONFIG_CGROUPS is not set
-# CONFIG_FAIR_GROUP_SCHED is not set
-# CONFIG_SYSFS_DEPRECATED is not set
+# CONFIG_SYSFS_DEPRECATED_V2 is not set
 # CONFIG_RELAY is not set
+# CONFIG_NAMESPACES is not set
 CONFIG_BLK_DEV_INITRD=y
 CONFIG_INITRAMFS_SOURCE=""
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
@@ -65,31 +75,41 @@ CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
+CONFIG_COMPAT_BRK=y
 CONFIG_BASE_FULL=y
 CONFIG_FUTEX=y
 CONFIG_ANON_INODES=y
 CONFIG_EPOLL=y
 CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
 CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
+CONFIG_AIO=y
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_SLAB=y
 # CONFIG_SLUB is not set
 # CONFIG_SLOB is not set
+# CONFIG_PROFILING is not set
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_HAVE_CLK=y
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_SLABINFO=y
 CONFIG_RT_MUTEXES=y
-# CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
 CONFIG_MODULE_UNLOAD=y
-CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
 # CONFIG_MODVERSIONS is not set
 # CONFIG_MODULE_SRCVERSION_ALL is not set
-CONFIG_KMOD=y
 CONFIG_BLOCK=y
 # CONFIG_LBD is not set
 # CONFIG_BLK_DEV_IO_TRACE is not set
-# CONFIG_LSF is not set
 # CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
 
 #
 # IO Schedulers
@@ -103,8 +123,7 @@ CONFIG_IOSCHED_NOOP=y
 # CONFIG_DEFAULT_CFQ is not set
 CONFIG_DEFAULT_NOOP=y
 CONFIG_DEFAULT_IOSCHED="noop"
-CONFIG_CLASSIC_RCU=y
-# CONFIG_PREEMPT_RCU is not set
+CONFIG_FREEZER=y
 
 #
 # System Type
@@ -114,9 +133,7 @@ CONFIG_CLASSIC_RCU=y
 # CONFIG_ARCH_REALVIEW is not set
 # CONFIG_ARCH_VERSATILE is not set
 # CONFIG_ARCH_AT91 is not set
-# CONFIG_ARCH_CLPS7500 is not set
 # CONFIG_ARCH_CLPS711X is not set
-# CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
 # CONFIG_ARCH_EP93XX is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
@@ -130,41 +147,58 @@ CONFIG_CLASSIC_RCU=y
 # CONFIG_ARCH_IXP2000 is not set
 # CONFIG_ARCH_IXP4XX is not set
 # CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KIRKWOOD is not set
 # CONFIG_ARCH_KS8695 is not set
 # CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
 # CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_ORION5X is not set
 # CONFIG_ARCH_PNX4008 is not set
 CONFIG_ARCH_PXA=y
 # CONFIG_ARCH_RPC is not set
 # CONFIG_ARCH_SA1100 is not set
 # CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_S3C64XX is not set
 # CONFIG_ARCH_SHARK is not set
 # CONFIG_ARCH_LH7A40X is not set
 # CONFIG_ARCH_DAVINCI is not set
 # CONFIG_ARCH_OMAP is not set
+# CONFIG_ARCH_MSM is not set
+# CONFIG_ARCH_W90X900 is not set
 
 #
 # Intel PXA2xx/PXA3xx Implementations
 #
+# CONFIG_ARCH_GUMSTIX is not set
+# CONFIG_MACH_INTELMOTE2 is not set
 # CONFIG_ARCH_LUBBOCK is not set
 # CONFIG_MACH_LOGICPD_PXA270 is not set
 # CONFIG_MACH_MAINSTONE is not set
+# CONFIG_MACH_MP900C is not set
 # CONFIG_ARCH_PXA_IDP is not set
 # CONFIG_PXA_SHARPSL is not set
-# CONFIG_MACH_TRIZEPS4 is not set
+# CONFIG_ARCH_VIPER is not set
+# CONFIG_ARCH_PXA_ESERIES is not set
+# CONFIG_TRIZEPS_PXA is not set
+# CONFIG_MACH_H5000 is not set
 # CONFIG_MACH_EM_X270 is not set
+# CONFIG_MACH_COLIBRI is not set
 # CONFIG_MACH_ZYLONITE is not set
+# CONFIG_MACH_LITTLETON is not set
+# CONFIG_MACH_TAVOREVB is not set
+# CONFIG_MACH_SAAR is not set
 # CONFIG_MACH_ARMCORE is not set
+# CONFIG_MACH_CM_X300 is not set
 CONFIG_MACH_MAGICIAN=y
+# CONFIG_MACH_MIOA701 is not set
+# CONFIG_MACH_PCM027 is not set
+# CONFIG_ARCH_PXA_PALM is not set
+# CONFIG_PXA_EZX is not set
 CONFIG_PXA27x=y
-
-#
-# Boot options
-#
-
-#
-# Power management
-#
+CONFIG_PXA_SSP=y
+CONFIG_PXA_PWM=y
+CONFIG_PXA_HAVE_BOARD_IRQS=y
 
 #
 # Processor Type
@@ -173,6 +207,7 @@ CONFIG_CPU_32=y
 CONFIG_CPU_XSCALE=y
 CONFIG_CPU_32v5=y
 CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_PABRT_NOIFAR=y
 CONFIG_CPU_CACHE_VIVT=y
 CONFIG_CPU_TLB_V4WBI=y
 CONFIG_CPU_CP15=y
@@ -186,6 +221,7 @@ CONFIG_ARM_THUMB=y
 # CONFIG_OUTER_CACHE is not set
 CONFIG_IWMMXT=y
 CONFIG_XSCALE_PMU=y
+CONFIG_COMMON_CLKDEV=y
 
 #
 # Bus support
@@ -197,28 +233,33 @@ CONFIG_XSCALE_PMU=y
 #
 # Kernel Features
 #
-# CONFIG_TICK_ONESHOT is not set
-# CONFIG_NO_HZ is not set
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ=y
 # CONFIG_HIGH_RES_TIMERS is not set
 CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_VMSPLIT_3G=y
+# CONFIG_VMSPLIT_2G is not set
+# CONFIG_VMSPLIT_1G is not set
+CONFIG_PAGE_OFFSET=0xC0000000
 CONFIG_PREEMPT=y
 CONFIG_HZ=100
 CONFIG_AEABI=y
 CONFIG_OABI_COMPAT=y
-# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_ARCH_FLATMEM_HAS_HOLES=y
+# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
+# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
 CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_FLATMEM_MANUAL=y
 # CONFIG_DISCONTIGMEM_MANUAL is not set
 # CONFIG_SPARSEMEM_MANUAL is not set
 CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
-# CONFIG_SPARSEMEM_STATIC is not set
-# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
+CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_SPLIT_PTLOCK_CPUS=4096
-# CONFIG_RESOURCES_64BIT is not set
-CONFIG_ZONE_DMA_FLAG=1
-CONFIG_BOUNCE=y
+# CONFIG_PHYS_ADDR_T_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=0
 CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
 CONFIG_ALIGNMENT_TRAP=y
 
 #
@@ -229,9 +270,10 @@ CONFIG_ZBOOT_ROM_BSS=0x0
 CONFIG_CMDLINE="keepinitrd"
 # CONFIG_XIP_KERNEL is not set
 CONFIG_KEXEC=y
+CONFIG_ATAGS_PROC=y
 
 #
-# CPU Frequency scaling
+# CPU Power Management
 #
 CONFIG_CPU_FREQ=y
 CONFIG_CPU_FREQ_TABLE=y
@@ -239,6 +281,7 @@ CONFIG_CPU_FREQ_TABLE=y
 CONFIG_CPU_FREQ_STAT=y
 # CONFIG_CPU_FREQ_STAT_DETAILS is not set
 CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
 # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
 # CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
 # CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
@@ -247,6 +290,7 @@ CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
 # CONFIG_CPU_FREQ_GOV_USERSPACE is not set
 CONFIG_CPU_FREQ_GOV_ONDEMAND=y
 # CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
+# CONFIG_CPU_IDLE is not set
 
 #
 # Floating point emulation
@@ -263,6 +307,8 @@ CONFIG_FPE_NWFPE=y
 # Userspace binary formats
 #
 CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+CONFIG_HAVE_AOUT=y
 # CONFIG_BINFMT_AOUT is not set
 # CONFIG_BINFMT_MISC is not set
 
@@ -270,21 +316,18 @@ CONFIG_BINFMT_ELF=y
 # Power management options
 #
 CONFIG_PM=y
-# CONFIG_PM_LEGACY is not set
 # CONFIG_PM_DEBUG is not set
 CONFIG_PM_SLEEP=y
-CONFIG_SUSPEND_UP_POSSIBLE=y
 CONFIG_SUSPEND=y
-CONFIG_APM_EMULATION=y
-
-#
-# Networking
-#
+CONFIG_SUSPEND_FREEZER=y
+# CONFIG_APM_EMULATION is not set
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
 CONFIG_NET=y
 
 #
 # Networking options
 #
+CONFIG_COMPAT_NET_DEV_OPS=y
 CONFIG_PACKET=y
 CONFIG_PACKET_MMAP=y
 CONFIG_UNIX=y
@@ -316,33 +359,15 @@ CONFIG_IP_PNP=y
 CONFIG_TCP_CONG_CUBIC=y
 CONFIG_DEFAULT_TCP_CONG="cubic"
 # CONFIG_TCP_MD5SIG is not set
-# CONFIG_IP_VS is not set
 # CONFIG_IPV6 is not set
-# CONFIG_INET6_XFRM_TUNNEL is not set
-# CONFIG_INET6_TUNNEL is not set
 # CONFIG_NETWORK_SECMARK is not set
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-
-#
-# Core Netfilter Configuration
-#
-# CONFIG_NETFILTER_NETLINK is not set
-# CONFIG_NF_CONNTRACK_ENABLED is not set
-# CONFIG_NF_CONNTRACK is not set
-# CONFIG_NETFILTER_XTABLES is not set
-
-#
-# IP: Netfilter Configuration
-#
-# CONFIG_IP_NF_QUEUE is not set
-# CONFIG_IP_NF_IPTABLES is not set
-# CONFIG_IP_NF_ARPTABLES is not set
+# CONFIG_NETFILTER is not set
 # CONFIG_IP_DCCP is not set
 # CONFIG_IP_SCTP is not set
 # CONFIG_TIPC is not set
 # CONFIG_ATM is not set
 # CONFIG_BRIDGE is not set
+# CONFIG_NET_DSA is not set
 # CONFIG_VLAN_8021Q is not set
 # CONFIG_DECNET is not set
 # CONFIG_LLC2 is not set
@@ -353,6 +378,7 @@ CONFIG_NETFILTER=y
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
 # CONFIG_NET_SCHED is not set
+# CONFIG_DCB is not set
 
 #
 # Network testing
@@ -390,20 +416,17 @@ CONFIG_IRTTY_SIR=m
 # Dongle support
 #
 # CONFIG_DONGLE is not set
-
-#
-# Old SIR device drivers
-#
-# CONFIG_IRPORT_SIR is not set
-
-#
-# Old Serial dongle support
-#
+# CONFIG_KINGSUN_DONGLE is not set
+# CONFIG_KSDAZZLE_DONGLE is not set
+# CONFIG_KS959_DONGLE is not set
 
 #
 # FIR device drivers
 #
+# CONFIG_USB_IRDA is not set
+# CONFIG_SIGMATEL_FIR is not set
 CONFIG_PXA_FICP=m
+# CONFIG_MCS_FIR is not set
 CONFIG_BT=m
 CONFIG_BT_L2CAP=m
 CONFIG_BT_SCO=m
@@ -417,17 +440,17 @@ CONFIG_BT_HIDP=m
 #
 # Bluetooth device drivers
 #
+CONFIG_BT_HCIBTUSB=m
+# CONFIG_BT_HCIBTSDIO is not set
 # CONFIG_BT_HCIUART is not set
+# CONFIG_BT_HCIBCM203X is not set
+# CONFIG_BT_HCIBPA10X is not set
+# CONFIG_BT_HCIBFUSB is not set
 # CONFIG_BT_HCIVHCI is not set
 # CONFIG_AF_RXRPC is not set
-
-#
-# Wireless
-#
-# CONFIG_CFG80211 is not set
-# CONFIG_WIRELESS_EXT is not set
-# CONFIG_MAC80211 is not set
-# CONFIG_IEEE80211 is not set
+# CONFIG_PHONET is not set
+# CONFIG_WIRELESS is not set
+# CONFIG_WIMAX is not set
 # CONFIG_RFKILL is not set
 # CONFIG_NET_9P is not set
 
@@ -442,25 +465,28 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_FW_LOADER=y
+# CONFIG_FIRMWARE_IN_KERNEL is not set
+CONFIG_EXTRA_FIRMWARE=""
 # CONFIG_DEBUG_DRIVER is not set
 # CONFIG_DEBUG_DEVRES is not set
 # CONFIG_SYS_HYPERVISOR is not set
 # CONFIG_CONNECTOR is not set
 CONFIG_MTD=y
-CONFIG_MTD_DEBUG=y
-CONFIG_MTD_DEBUG_VERBOSE=0
+# CONFIG_MTD_DEBUG is not set
 # CONFIG_MTD_CONCAT is not set
 CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_TESTS is not set
 # CONFIG_MTD_REDBOOT_PARTS is not set
 CONFIG_MTD_CMDLINE_PARTS=y
 # CONFIG_MTD_AFS_PARTS is not set
+# CONFIG_MTD_AR7_PARTS is not set
 
 #
 # User Modules And Translation Layers
 #
-CONFIG_MTD_CHAR=m
-CONFIG_MTD_BLKDEVS=m
-CONFIG_MTD_BLOCK=m
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
 # CONFIG_FTL is not set
 # CONFIG_NFTL is not set
 # CONFIG_INFTL is not set
@@ -473,6 +499,7 @@ CONFIG_MTD_BLOCK=m
 #
 CONFIG_MTD_CFI=y
 # CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=y
 # CONFIG_MTD_CFI_ADV_OPTIONS is not set
 CONFIG_MTD_MAP_BANK_WIDTH_1=y
 CONFIG_MTD_MAP_BANK_WIDTH_2=y
@@ -487,6 +514,7 @@ CONFIG_MTD_CFI_I2=y
 CONFIG_MTD_CFI_INTELEXT=y
 # CONFIG_MTD_CFI_AMDSTD is not set
 # CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=y
 # CONFIG_MTD_RAM is not set
 # CONFIG_MTD_ROM is not set
 # CONFIG_MTD_ABSENT is not set
@@ -497,9 +525,7 @@ CONFIG_MTD_CFI_INTELEXT=y
 #
 # CONFIG_MTD_COMPLEX_MAPPINGS is not set
 CONFIG_MTD_PHYSMAP=y
-CONFIG_MTD_PHYSMAP_START=0x00000000
-CONFIG_MTD_PHYSMAP_LEN=0x04000000
-CONFIG_MTD_PHYSMAP_BANKWIDTH=4
+# CONFIG_MTD_PHYSMAP_COMPAT is not set
 # CONFIG_MTD_PXA2XX is not set
 # CONFIG_MTD_ARM_INTEGRATOR is not set
 # CONFIG_MTD_SHARP_SL is not set
@@ -522,6 +548,12 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=4
 # CONFIG_MTD_NAND is not set
 # CONFIG_MTD_ONENAND is not set
 
+#
+# LPDDR flash memory drivers
+#
+# CONFIG_MTD_LPDDR is not set
+# CONFIG_MTD_QINFO_PROBE is not set
+
 #
 # UBI - Unsorted block images
 #
@@ -531,10 +563,12 @@ CONFIG_BLK_DEV=y
 # CONFIG_BLK_DEV_COW_COMMON is not set
 # CONFIG_BLK_DEV_LOOP is not set
 # CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_UB is not set
 # CONFIG_BLK_DEV_RAM is not set
 # CONFIG_CDROM_PKTCDVD is not set
 # CONFIG_ATA_OVER_ETH is not set
 # CONFIG_MISC_DEVICES is not set
+CONFIG_HAVE_IDE=y
 # CONFIG_IDE is not set
 
 #
@@ -547,7 +581,6 @@ CONFIG_BLK_DEV=y
 # CONFIG_ATA is not set
 # CONFIG_MD is not set
 CONFIG_NETDEVICES=y
-# CONFIG_NETDEVICES_MULTIQUEUE is not set
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
 # CONFIG_MACVLAN is not set
@@ -563,6 +596,20 @@ CONFIG_NETDEVICES=y
 #
 # CONFIG_WLAN_PRE80211 is not set
 # CONFIG_WLAN_80211 is not set
+# CONFIG_IWLWIFI_LEDS is not set
+
+#
+# Enable WiMAX (Networking options) to see the WiMAX drivers
+#
+
+#
+# USB Network Adapters
+#
+# CONFIG_USB_CATC is not set
+# CONFIG_USB_KAWETH is not set
+# CONFIG_USB_PEGASUS is not set
+# CONFIG_USB_RTL8150 is not set
+# CONFIG_USB_USBNET is not set
 # CONFIG_WAN is not set
 CONFIG_PPP=m
 # CONFIG_PPP_MULTILINK is not set
@@ -612,7 +659,26 @@ CONFIG_KEYBOARD_GPIO=y
 # CONFIG_INPUT_JOYSTICK is not set
 # CONFIG_INPUT_TABLET is not set
 CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_FUJITSU is not set
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_INEXIO is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
+# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
+# CONFIG_TOUCHSCREEN_TSC2007 is not set
 CONFIG_INPUT_MISC=y
+# CONFIG_INPUT_ATI_REMOTE is not set
+# CONFIG_INPUT_ATI_REMOTE2 is not set
+# CONFIG_INPUT_KEYSPAN_REMOTE is not set
+# CONFIG_INPUT_POWERMATE is not set
+# CONFIG_INPUT_YEALINK is not set
+# CONFIG_INPUT_CM109 is not set
 CONFIG_INPUT_UINPUT=m
 
 #
@@ -625,9 +691,11 @@ CONFIG_INPUT_UINPUT=m
 # Character devices
 #
 CONFIG_VT=y
+CONFIG_CONSOLE_TRANSLATIONS=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
 # CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_DEVKMEM is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
 
 #
@@ -642,6 +710,7 @@ CONFIG_SERIAL_PXA=y
 # CONFIG_SERIAL_PXA_CONSOLE is not set
 CONFIG_SERIAL_CORE=y
 CONFIG_UNIX98_PTYS=y
+# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
 # CONFIG_LEGACY_PTYS is not set
 # CONFIG_IPMI_HANDLER is not set
 # CONFIG_HW_RANDOM is not set
@@ -649,37 +718,45 @@ CONFIG_UNIX98_PTYS=y
 # CONFIG_R3964 is not set
 # CONFIG_RAW_DRIVER is not set
 # CONFIG_TCG_TPM is not set
-CONFIG_I2C=m
+CONFIG_I2C=y
 CONFIG_I2C_BOARDINFO=y
 CONFIG_I2C_CHARDEV=m
+CONFIG_I2C_HELPER_AUTO=y
 
 #
-# I2C Algorithms
+# I2C Hardware Bus support
 #
-# CONFIG_I2C_ALGOBIT is not set
-# CONFIG_I2C_ALGOPCF is not set
-# CONFIG_I2C_ALGOPCA is not set
 
 #
-# I2C Hardware Bus support
+# I2C system bus drivers (mostly embedded / system-on-chip)
 #
 # CONFIG_I2C_GPIO is not set
-CONFIG_I2C_PXA=m
-# CONFIG_I2C_PXA_SLAVE is not set
 # CONFIG_I2C_OCORES is not set
-# CONFIG_I2C_PARPORT_LIGHT is not set
+CONFIG_I2C_PXA=y
+# CONFIG_I2C_PXA_SLAVE is not set
 # CONFIG_I2C_SIMTEC is not set
+
+#
+# External I2C/SMBus adapter drivers
+#
+# CONFIG_I2C_PARPORT_LIGHT is not set
 # CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_TINY_USB is not set
+
+#
+# Other I2C/SMBus bus drivers
+#
+# CONFIG_I2C_PCA_PLATFORM is not set
 # CONFIG_I2C_STUB is not set
 
 #
 # Miscellaneous I2C Chip support
 #
-# CONFIG_SENSORS_DS1337 is not set
-# CONFIG_SENSORS_DS1374 is not set
 # CONFIG_DS1682 is not set
+# CONFIG_AT24 is not set
 # CONFIG_EEPROM_LEGACY is not set
 # CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_PCF8575 is not set
 # CONFIG_SENSORS_PCA9539 is not set
 # CONFIG_SENSORS_PCF8591 is not set
 # CONFIG_SENSORS_MAX6875 is not set
@@ -688,19 +765,39 @@ CONFIG_I2C_PXA=m
 # CONFIG_I2C_DEBUG_ALGO is not set
 # CONFIG_I2C_DEBUG_BUS is not set
 # CONFIG_I2C_DEBUG_CHIP is not set
+# CONFIG_SPI is not set
+CONFIG_ARCH_REQUIRE_GPIOLIB=y
+CONFIG_GPIOLIB=y
+# CONFIG_DEBUG_GPIO is not set
+# CONFIG_GPIO_SYSFS is not set
 
 #
-# SPI support
+# Memory mapped GPIO expanders:
+#
+
+#
+# I2C GPIO expanders:
+#
+# CONFIG_GPIO_MAX732X is not set
+# CONFIG_GPIO_PCA953X is not set
+# CONFIG_GPIO_PCF857X is not set
+
+#
+# PCI GPIO expanders:
+#
+
+#
+# SPI GPIO expanders:
 #
-# CONFIG_SPI is not set
-# CONFIG_SPI_MASTER is not set
 CONFIG_W1=y
 
 #
 # 1-wire Bus Masters
 #
+# CONFIG_W1_MASTER_DS2490 is not set
 # CONFIG_W1_MASTER_DS2482 is not set
 CONFIG_W1_MASTER_DS1WM=y
+# CONFIG_W1_MASTER_GPIO is not set
 
 #
 # 1-wire Slaves
@@ -709,32 +806,56 @@ CONFIG_W1_MASTER_DS1WM=y
 # CONFIG_W1_SLAVE_SMEM is not set
 # CONFIG_W1_SLAVE_DS2433 is not set
 CONFIG_W1_SLAVE_DS2760=y
+# CONFIG_W1_SLAVE_BQ27000 is not set
 CONFIG_POWER_SUPPLY=y
 # CONFIG_POWER_SUPPLY_DEBUG is not set
 CONFIG_PDA_POWER=y
-# CONFIG_APM_POWER is not set
 CONFIG_BATTERY_DS2760=y
+# CONFIG_BATTERY_BQ27x00 is not set
 # CONFIG_HWMON is not set
+# CONFIG_THERMAL is not set
+# CONFIG_THERMAL_HWMON is not set
 # CONFIG_WATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
 
 #
 # Sonics Silicon Backplane
 #
-CONFIG_SSB_POSSIBLE=y
 # CONFIG_SSB is not set
 
 #
 # Multifunction device drivers
 #
+# CONFIG_MFD_CORE is not set
 # CONFIG_MFD_SM501 is not set
+# CONFIG_MFD_ASIC3 is not set
 CONFIG_HTC_EGPIO=y
 CONFIG_HTC_PASIC3=y
+# CONFIG_TPS65010 is not set
+# CONFIG_TWL4030_CORE is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_MFD_T7L66XB is not set
+# CONFIG_MFD_TC6387XB is not set
+# CONFIG_MFD_TC6393XB is not set
+# CONFIG_PMIC_DA903X is not set
+# CONFIG_MFD_WM8400 is not set
+# CONFIG_MFD_WM8350_I2C is not set
+# CONFIG_MFD_PCF50633 is not set
 
 #
 # Multimedia devices
 #
+
+#
+# Multimedia core support
+#
 # CONFIG_VIDEO_DEV is not set
 # CONFIG_DVB_CORE is not set
+# CONFIG_VIDEO_MEDIA is not set
+
+#
+# Multimedia drivers
+#
 # CONFIG_DAB is not set
 
 #
@@ -745,6 +866,7 @@ CONFIG_HTC_PASIC3=y
 CONFIG_FB=y
 # CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB_DDC is not set
+# CONFIG_FB_BOOT_VESA_SUPPORT is not set
 CONFIG_FB_CFB_FILLRECT=y
 CONFIG_FB_CFB_COPYAREA=y
 CONFIG_FB_CFB_IMAGEBLIT=y
@@ -752,8 +874,8 @@ CONFIG_FB_CFB_IMAGEBLIT=y
 # CONFIG_FB_SYS_FILLRECT is not set
 # CONFIG_FB_SYS_COPYAREA is not set
 # CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_FOREIGN_ENDIAN is not set
 # CONFIG_FB_SYS_FOPS is not set
-CONFIG_FB_DEFERRED_IO=y
 # CONFIG_FB_SVGALIB is not set
 # CONFIG_FB_MACMODES is not set
 # CONFIG_FB_BACKLIGHT is not set
@@ -765,13 +887,21 @@ CONFIG_FB_DEFERRED_IO=y
 #
 # CONFIG_FB_S1D13XXX is not set
 CONFIG_FB_PXA=y
+CONFIG_FB_PXA_OVERLAY=y
+# CONFIG_FB_PXA_SMARTPANEL is not set
 # CONFIG_FB_PXA_PARAMETERS is not set
 # CONFIG_FB_MBX is not set
+# CONFIG_FB_W100 is not set
 # CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_METRONOME is not set
+# CONFIG_FB_MB862XX is not set
 CONFIG_BACKLIGHT_LCD_SUPPORT=y
 CONFIG_LCD_CLASS_DEVICE=y
+# CONFIG_LCD_ILI9320 is not set
+# CONFIG_LCD_PLATFORM is not set
 CONFIG_BACKLIGHT_CLASS_DEVICE=y
-CONFIG_BACKLIGHT_CORGI=y
+# CONFIG_BACKLIGHT_GENERIC is not set
+CONFIG_BACKLIGHT_PWM=y
 
 #
 # Display device support
@@ -802,15 +932,8 @@ CONFIG_FONT_MINI_4x6=y
 # CONFIG_FONT_SUN12x22 is not set
 # CONFIG_FONT_10x18 is not set
 # CONFIG_LOGO is not set
-
-#
-# Sound
-#
 CONFIG_SOUND=y
-
-#
-# Advanced Linux Sound Architecture
-#
+CONFIG_SOUND_OSS_CORE=y
 CONFIG_SND=m
 CONFIG_SND_TIMER=m
 CONFIG_SND_PCM=m
@@ -824,53 +947,185 @@ CONFIG_SND_SUPPORT_OLD_API=y
 CONFIG_SND_VERBOSE_PROCFS=y
 # CONFIG_SND_VERBOSE_PRINTK is not set
 # CONFIG_SND_DEBUG is not set
-
-#
-# Generic devices
-#
+CONFIG_SND_DRIVERS=y
 # CONFIG_SND_DUMMY is not set
 # CONFIG_SND_MTPAV is not set
 # CONFIG_SND_SERIAL_U16550 is not set
 # CONFIG_SND_MPU401 is not set
-
-#
-# ALSA ARM devices
-#
-# CONFIG_SND_PXA2XX_AC97 is not set
-
-#
-# System on Chip audio support
-#
+# CONFIG_SND_ARM is not set
+CONFIG_SND_PXA2XX_LIB=m
+# CONFIG_SND_USB is not set
 CONFIG_SND_SOC=m
 CONFIG_SND_PXA2XX_SOC=m
-
-#
-# SoC Audio support for SuperH
-#
-
-#
-# Open Sound System
-#
+CONFIG_SND_SOC_I2C_AND_SPI=m
+# CONFIG_SND_SOC_ALL_CODECS is not set
 # CONFIG_SOUND_PRIME is not set
 # CONFIG_HID_SUPPORT is not set
 CONFIG_HID=m
-# CONFIG_USB_SUPPORT is not set
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+CONFIG_USB=y
+# CONFIG_USB_DEBUG is not set
+# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
+
+#
+# Miscellaneous USB options
+#
+# CONFIG_USB_DEVICEFS is not set
+# CONFIG_USB_DEVICE_CLASS is not set
+# CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_SUSPEND is not set
+# CONFIG_USB_OTG is not set
+# CONFIG_USB_OTG_WHITELIST is not set
+# CONFIG_USB_OTG_BLACKLIST_HUB is not set
+CONFIG_USB_MON=m
+# CONFIG_USB_WUSB is not set
+# CONFIG_USB_WUSB_CBAF is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_C67X00_HCD is not set
+# CONFIG_USB_OXU210HP_HCD is not set
+# CONFIG_USB_ISP116X_HCD is not set
+CONFIG_USB_OHCI_HCD=y
+# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
+# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
+CONFIG_USB_OHCI_LITTLE_ENDIAN=y
+# CONFIG_USB_SL811_HCD is not set
+# CONFIG_USB_R8A66597_HCD is not set
+# CONFIG_USB_HWA_HCD is not set
+# CONFIG_USB_MUSB_HDRC is not set
+# CONFIG_USB_GADGET_MUSB_HDRC is not set
+
+#
+# USB Device Class drivers
+#
+# CONFIG_USB_ACM is not set
+# CONFIG_USB_PRINTER is not set
+# CONFIG_USB_WDM is not set
+# CONFIG_USB_TMC is not set
+
+#
+# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;
+#
+
+#
+# see USB_STORAGE Help for more information
+#
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+# CONFIG_USB_MDC800 is not set
+
+#
+# USB port drivers
+#
+# CONFIG_USB_SERIAL is not set
+
+#
+# USB Miscellaneous drivers
+#
+# CONFIG_USB_EMI62 is not set
+# CONFIG_USB_EMI26 is not set
+# CONFIG_USB_ADUTUX is not set
+# CONFIG_USB_SEVSEG is not set
+# CONFIG_USB_RIO500 is not set
+# CONFIG_USB_LEGOTOWER is not set
+# CONFIG_USB_LCD is not set
+# CONFIG_USB_BERRY_CHARGE is not set
+# CONFIG_USB_LED is not set
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+# CONFIG_USB_CYTHERM is not set
+# CONFIG_USB_PHIDGET is not set
+# CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+# CONFIG_USB_ISIGHTFW is not set
+# CONFIG_USB_VST is not set
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG is not set
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_VBUS_DRAW=500
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_ATMEL_USBA is not set
+# CONFIG_USB_GADGET_FSL_USB2 is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_PXA25X is not set
+CONFIG_USB_GADGET_PXA27X=y
+CONFIG_USB_PXA27X=y
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_IMX is not set
+# CONFIG_USB_GADGET_M66592 is not set
+# CONFIG_USB_GADGET_AMD5536UDC is not set
+# CONFIG_USB_GADGET_FSL_QE is not set
+# CONFIG_USB_GADGET_CI13XXX is not set
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+# CONFIG_USB_GADGET_DUALSPEED is not set
+# CONFIG_USB_ZERO is not set
+CONFIG_USB_ETH=m
+# CONFIG_USB_ETH_RNDIS is not set
+CONFIG_USB_GADGETFS=m
+CONFIG_USB_FILE_STORAGE=m
+# CONFIG_USB_FILE_STORAGE_TEST is not set
+CONFIG_USB_G_SERIAL=m
+# CONFIG_USB_MIDI_GADGET is not set
+# CONFIG_USB_G_PRINTER is not set
+CONFIG_USB_CDC_COMPOSITE=m
+
+#
+# OTG and related infrastructure
+#
+CONFIG_USB_OTG_UTILS=y
+CONFIG_USB_GPIO_VBUS=y
 CONFIG_MMC=y
 # CONFIG_MMC_DEBUG is not set
 # CONFIG_MMC_UNSAFE_RESUME is not set
 
 #
-# MMC/SD Card Drivers
+# MMC/SD/SDIO Card Drivers
 #
 CONFIG_MMC_BLOCK=y
 CONFIG_MMC_BLOCK_BOUNCE=y
 CONFIG_SDIO_UART=m
+# CONFIG_MMC_TEST is not set
 
 #
-# MMC/SD Host Controller Drivers
+# MMC/SD/SDIO Host Controller Drivers
 #
 CONFIG_MMC_PXA=y
+# CONFIG_MMC_SDHCI is not set
+# CONFIG_MEMSTICK is not set
+# CONFIG_ACCESSIBILITY is not set
 CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+# CONFIG_LEDS_PCA9532 is not set
+CONFIG_LEDS_GPIO=y
+# CONFIG_LEDS_PCA955X is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+# CONFIG_LEDS_TRIGGER_TIMER is not set
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+CONFIG_LEDS_TRIGGER_BACKLIGHT=y
+# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set
 CONFIG_RTC_LIB=y
 CONFIG_RTC_CLASS=y
 CONFIG_RTC_HCTOSYS=y
@@ -899,6 +1154,9 @@ CONFIG_RTC_INTF_DEV=y
 # CONFIG_RTC_DRV_PCF8563 is not set
 # CONFIG_RTC_DRV_PCF8583 is not set
 # CONFIG_RTC_DRV_M41T80 is not set
+# CONFIG_RTC_DRV_S35390A is not set
+# CONFIG_RTC_DRV_FM3130 is not set
+# CONFIG_RTC_DRV_RX8581 is not set
 
 #
 # SPI RTC drivers
@@ -908,17 +1166,26 @@ CONFIG_RTC_INTF_DEV=y
 # Platform RTC drivers
 #
 # CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1286 is not set
+# CONFIG_RTC_DRV_DS1511 is not set
 # CONFIG_RTC_DRV_DS1553 is not set
-# CONFIG_RTC_DRV_STK17TA8 is not set
 # CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
 # CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T35 is not set
 # CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_BQ4802 is not set
 # CONFIG_RTC_DRV_V3020 is not set
 
 #
 # on-CPU RTC drivers
 #
 CONFIG_RTC_DRV_SA1100=y
+# CONFIG_RTC_DRV_PXA is not set
+# CONFIG_DMADEVICES is not set
+# CONFIG_REGULATOR is not set
+# CONFIG_UIO is not set
+# CONFIG_STAGING is not set
 
 #
 # File systems
@@ -927,19 +1194,18 @@ CONFIG_EXT2_FS=y
 # CONFIG_EXT2_FS_XATTR is not set
 # CONFIG_EXT2_FS_XIP is not set
 # CONFIG_EXT3_FS is not set
-# CONFIG_EXT4DEV_FS is not set
+# CONFIG_EXT4_FS is not set
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
 # CONFIG_FS_POSIX_ACL is not set
+CONFIG_FILE_LOCKING=y
 # CONFIG_XFS_FS is not set
-# CONFIG_GFS2_FS is not set
 # CONFIG_OCFS2_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_ROMFS_FS is not set
+# CONFIG_BTRFS_FS is not set
+CONFIG_DNOTIFY=y
 CONFIG_INOTIFY=y
 CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
-CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
 # CONFIG_FUSE_FS is not set
@@ -965,15 +1231,13 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 #
 CONFIG_PROC_FS=y
 CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
 CONFIG_SYSFS=y
 CONFIG_TMPFS=y
 # CONFIG_TMPFS_POSIX_ACL is not set
 # CONFIG_HUGETLB_PAGE is not set
 # CONFIG_CONFIGFS_FS is not set
-
-#
-# Miscellaneous filesystems
-#
+CONFIG_MISC_FILESYSTEMS=y
 # CONFIG_ADFS_FS is not set
 # CONFIG_AFFS_FS is not set
 # CONFIG_HFS_FS is not set
@@ -997,9 +1261,13 @@ CONFIG_JFFS2_CMODE_PRIORITY=y
 # CONFIG_JFFS2_CMODE_SIZE is not set
 # CONFIG_JFFS2_CMODE_FAVOURLZO is not set
 # CONFIG_CRAMFS is not set
+# CONFIG_SQUASHFS is not set
 # CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_OMFS_FS is not set
 # CONFIG_HPFS_FS is not set
 # CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UFS_FS is not set
 CONFIG_NETWORK_FILESYSTEMS=y
@@ -1007,14 +1275,13 @@ CONFIG_NFS_FS=y
 CONFIG_NFS_V3=y
 # CONFIG_NFS_V3_ACL is not set
 # CONFIG_NFS_V4 is not set
-# CONFIG_NFS_DIRECTIO is not set
-# CONFIG_NFSD is not set
 CONFIG_ROOT_NFS=y
+# CONFIG_NFSD is not set
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
 CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
-# CONFIG_SUNRPC_BIND34 is not set
+# CONFIG_SUNRPC_REGISTER_V4 is not set
 # CONFIG_RPCSEC_GSS_KRB5 is not set
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
@@ -1076,6 +1343,7 @@ CONFIG_NLS_UTF8=y
 CONFIG_PRINTK_TIME=y
 CONFIG_ENABLE_WARN_DEPRECATED=y
 CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_FRAME_WARN=1024
 # CONFIG_MAGIC_SYSRQ is not set
 # CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_FS is not set
@@ -1083,15 +1351,18 @@ CONFIG_ENABLE_MUST_CHECK=y
 CONFIG_DEBUG_KERNEL=y
 # CONFIG_DEBUG_SHIRQ is not set
 CONFIG_DETECT_SOFTLOCKUP=y
+# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
+CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
 # CONFIG_SCHED_DEBUG is not set
 # CONFIG_SCHEDSTATS is not set
 CONFIG_TIMER_STATS=y
+# CONFIG_DEBUG_OBJECTS is not set
 # CONFIG_DEBUG_SLAB is not set
-CONFIG_DEBUG_PREEMPT=y
+# CONFIG_DEBUG_PREEMPT is not set
 # CONFIG_DEBUG_RT_MUTEXES is not set
 # CONFIG_RT_MUTEX_TESTER is not set
 # CONFIG_DEBUG_SPINLOCK is not set
-CONFIG_DEBUG_MUTEXES=y
+# CONFIG_DEBUG_MUTEXES is not set
 # CONFIG_DEBUG_LOCK_ALLOC is not set
 # CONFIG_PROVE_LOCKING is not set
 # CONFIG_LOCK_STAT is not set
@@ -1100,17 +1371,41 @@ CONFIG_DEBUG_MUTEXES=y
 # CONFIG_DEBUG_KOBJECT is not set
 CONFIG_DEBUG_BUGVERBOSE=y
 # CONFIG_DEBUG_INFO is not set
-CONFIG_DEBUG_VM=y
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_WRITECOUNT is not set
+# CONFIG_DEBUG_MEMORY_INIT is not set
 # CONFIG_DEBUG_LIST is not set
 # CONFIG_DEBUG_SG is not set
+# CONFIG_DEBUG_NOTIFIERS is not set
 CONFIG_FRAME_POINTER=y
-CONFIG_FORCED_INLINING=y
 # CONFIG_BOOT_PRINTK_DELAY is not set
 # CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
+# CONFIG_BACKTRACE_SELF_TEST is not set
+# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
 # CONFIG_FAULT_INJECTION is not set
+# CONFIG_LATENCYTOP is not set
+# CONFIG_SYSCTL_SYSCALL_CHECK is not set
+CONFIG_HAVE_FUNCTION_TRACER=y
+
+#
+# Tracers
+#
+# CONFIG_FUNCTION_TRACER is not set
+# CONFIG_IRQSOFF_TRACER is not set
+# CONFIG_PREEMPT_TRACER is not set
+# CONFIG_SCHED_TRACER is not set
+# CONFIG_CONTEXT_SWITCH_TRACER is not set
+# CONFIG_BOOT_TRACER is not set
+# CONFIG_TRACE_BRANCH_PROFILING is not set
+# CONFIG_STACK_TRACER is not set
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
 # CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_KGDB is not set
 CONFIG_DEBUG_USER=y
 CONFIG_DEBUG_ERRORS=y
+# CONFIG_DEBUG_STACK_USAGE is not set
 CONFIG_DEBUG_LL=y
 # CONFIG_DEBUG_ICEDCC is not set
 
@@ -1119,55 +1414,110 @@ CONFIG_DEBUG_LL=y
 #
 # CONFIG_KEYS is not set
 # CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
 # CONFIG_SECURITY_FILE_CAPABILITIES is not set
 CONFIG_CRYPTO=y
+
+#
+# Crypto core or helper
+#
+# CONFIG_CRYPTO_FIPS is not set
 CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_ALGAPI2=m
+CONFIG_CRYPTO_AEAD2=m
 CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_BLKCIPHER2=m
+CONFIG_CRYPTO_HASH=m
+CONFIG_CRYPTO_HASH2=m
+CONFIG_CRYPTO_RNG2=m
 CONFIG_CRYPTO_MANAGER=m
+CONFIG_CRYPTO_MANAGER2=m
+# CONFIG_CRYPTO_GF128MUL is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Authenticated Encryption with Associated Data
+#
+# CONFIG_CRYPTO_CCM is not set
+# CONFIG_CRYPTO_GCM is not set
+# CONFIG_CRYPTO_SEQIV is not set
+
+#
+# Block modes
+#
+# CONFIG_CRYPTO_CBC is not set
+# CONFIG_CRYPTO_CTR is not set
+# CONFIG_CRYPTO_CTS is not set
+CONFIG_CRYPTO_ECB=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_PCBC is not set
+# CONFIG_CRYPTO_XTS is not set
+
+#
+# Hash modes
+#
 # CONFIG_CRYPTO_HMAC is not set
 # CONFIG_CRYPTO_XCBC is not set
-# CONFIG_CRYPTO_NULL is not set
+
+#
+# Digest
+#
+# CONFIG_CRYPTO_CRC32C is not set
 # CONFIG_CRYPTO_MD4 is not set
 # CONFIG_CRYPTO_MD5 is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_RMD128 is not set
+# CONFIG_CRYPTO_RMD160 is not set
+# CONFIG_CRYPTO_RMD256 is not set
+# CONFIG_CRYPTO_RMD320 is not set
 CONFIG_CRYPTO_SHA1=m
 # CONFIG_CRYPTO_SHA256 is not set
 # CONFIG_CRYPTO_SHA512 is not set
-# CONFIG_CRYPTO_WP512 is not set
 # CONFIG_CRYPTO_TGR192 is not set
-# CONFIG_CRYPTO_GF128MUL is not set
-CONFIG_CRYPTO_ECB=m
-# CONFIG_CRYPTO_CBC is not set
-CONFIG_CRYPTO_PCBC=m
-# CONFIG_CRYPTO_LRW is not set
-# CONFIG_CRYPTO_XTS is not set
-# CONFIG_CRYPTO_CRYPTD is not set
-# CONFIG_CRYPTO_DES is not set
-# CONFIG_CRYPTO_FCRYPT is not set
-# CONFIG_CRYPTO_BLOWFISH is not set
-# CONFIG_CRYPTO_TWOFISH is not set
-# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_WP512 is not set
+
+#
+# Ciphers
+#
 # CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+CONFIG_CRYPTO_ARC4=m
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
 # CONFIG_CRYPTO_CAST5 is not set
 # CONFIG_CRYPTO_CAST6 is not set
-# CONFIG_CRYPTO_TEA is not set
-CONFIG_CRYPTO_ARC4=m
+# CONFIG_CRYPTO_DES is not set
+# CONFIG_CRYPTO_FCRYPT is not set
 # CONFIG_CRYPTO_KHAZAD is not set
-# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_SALSA20 is not set
 # CONFIG_CRYPTO_SEED is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+
+#
+# Compression
+#
 # CONFIG_CRYPTO_DEFLATE is not set
-# CONFIG_CRYPTO_MICHAEL_MIC is not set
-# CONFIG_CRYPTO_CRC32C is not set
-# CONFIG_CRYPTO_CAMELLIA is not set
-# CONFIG_CRYPTO_TEST is not set
-# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_LZO is not set
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
 # CONFIG_CRYPTO_HW is not set
 
 #
 # Library routines
 #
 CONFIG_BITREVERSE=y
+CONFIG_GENERIC_FIND_LAST_BIT=y
 CONFIG_CRC_CCITT=y
 # CONFIG_CRC16 is not set
+# CONFIG_CRC_T10DIF is not set
 # CONFIG_CRC_ITU_T is not set
 CONFIG_CRC32=y
 # CONFIG_CRC7 is not set
index d81ea219c9349a6e31763906f32763eaac9b2bde..36cd62edd05cfd7636f422af72ba21b475e95683 100644 (file)
@@ -91,7 +91,6 @@ CONFIG_ASSABET_NEPONSET=y
 # CONFIG_SA1100_COLLIE is not set
 # CONFIG_SA1100_H3100 is not set
 # CONFIG_SA1100_H3600 is not set
-# CONFIG_SA1100_H3800 is not set
 # CONFIG_SA1100_BADGE4 is not set
 # CONFIG_SA1100_JORNADA720 is not set
 # CONFIG_SA1100_HACKKIT is not set
index a6b47ea8e4655290b0798dd652a8b6439a1f7468..f2d2dda25949ebe6ff2e90d2aa3bd2fbafbdc18c 100644 (file)
@@ -88,7 +88,6 @@ CONFIG_ARCH_SA1100=y
 # CONFIG_SA1100_COLLIE is not set
 # CONFIG_SA1100_H3100 is not set
 # CONFIG_SA1100_H3600 is not set
-# CONFIG_SA1100_H3800 is not set
 # CONFIG_SA1100_BADGE4 is not set
 # CONFIG_SA1100_JORNADA720 is not set
 # CONFIG_SA1100_HACKKIT is not set
diff --git a/arch/arm/configs/pxa168_defconfig b/arch/arm/configs/pxa168_defconfig
new file mode 100644 (file)
index 0000000..db5faea
--- /dev/null
@@ -0,0 +1,891 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.29-rc3
+# Fri Mar 20 13:43:13 2009
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_LATENCYTOP_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_AUDIT is not set
+
+#
+# RCU Subsystem
+#
+CONFIG_CLASSIC_RCU=y
+# CONFIG_TREE_RCU is not set
+# CONFIG_PREEMPT_RCU is not set
+# CONFIG_TREE_RCU_TRACE is not set
+# CONFIG_PREEMPT_RCU_TRACE is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_GROUP_SCHED is not set
+# CONFIG_CGROUPS is not set
+CONFIG_SYSFS_DEPRECATED=y
+CONFIG_SYSFS_DEPRECATED_V2=y
+# CONFIG_RELAY is not set
+CONFIG_NAMESPACES=y
+# CONFIG_UTS_NS is not set
+# CONFIG_IPC_NS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
+# CONFIG_NET_NS is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+# CONFIG_EMBEDDED is not set
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_COMPAT_BRK=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_AIO=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+# CONFIG_PROFILING is not set
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_HAVE_CLK=y
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_DEFAULT_AS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+CONFIG_DEFAULT_CFQ=y
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="cfq"
+# CONFIG_FREEZER is not set
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KIRKWOOD is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+CONFIG_ARCH_MMP=y
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_S3C64XX is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_ARCH_MSM is not set
+# CONFIG_ARCH_W90X900 is not set
+# CONFIG_MACH_TAVOREVB is not set
+
+#
+# Marvell PXA168/910 Implmentations
+#
+CONFIG_MACH_ASPENITE=y
+CONFIG_MACH_ZYLONITE2=y
+# CONFIG_MACH_TTC_DKB is not set
+CONFIG_CPU_PXA168=y
+CONFIG_PLAT_PXA=y
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_MOHAWK=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_PABRT_NOIFAR=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_COPY_V4WB=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_ICACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_CPU_BPREDICT_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
+CONFIG_IWMMXT=y
+CONFIG_COMMON_CLKDEV=y
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_VMSPLIT_3G=y
+# CONFIG_VMSPLIT_2G is not set
+# CONFIG_VMSPLIT_1G is not set
+CONFIG_PAGE_OFFSET=0xC0000000
+CONFIG_PREEMPT=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+CONFIG_ARCH_FLATMEM_HAS_HOLES=y
+# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
+# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_PAGEFLAGS_EXTENDED=y
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_PHYS_ADDR_T_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=0
+CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="root=/dev/nfs rootfstype=nfs nfsroot=192.168.2.100:/nfsroot/ ip=192.168.2.101:192.168.2.100::255.255.255.0::eth0:on console=ttyS0,115200 mem=128M"
+# CONFIG_XIP_KERNEL is not set
+# CONFIG_KEXEC is not set
+
+#
+# CPU Power Management
+#
+# CONFIG_CPU_IDLE is not set
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+CONFIG_HAVE_AOUT=y
+# CONFIG_BINFMT_AOUT is not set
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Power management options
+#
+# CONFIG_PM is not set
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_COMPAT_NET_DEV_OPS=y
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_XFRM_STATISTICS is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_DHCP is not set
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
+# CONFIG_INET_LRO is not set
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_NET_DSA is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+# CONFIG_DCB is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_AF_RXRPC is not set
+# CONFIG_PHONET is not set
+CONFIG_WIRELESS=y
+# CONFIG_CFG80211 is not set
+CONFIG_WIRELESS_OLD_REGULATORY=y
+# CONFIG_WIRELESS_EXT is not set
+# CONFIG_LIB80211 is not set
+# CONFIG_MAC80211 is not set
+# CONFIG_WIMAX is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+# CONFIG_STANDALONE is not set
+# CONFIG_PREVENT_FIRMWARE_BUILD is not set
+CONFIG_FW_LOADER=y
+CONFIG_FIRMWARE_IN_KERNEL=y
+CONFIG_EXTRA_FIRMWARE=""
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+# CONFIG_MTD is not set
+# CONFIG_PARPORT is not set
+# CONFIG_BLK_DEV is not set
+# CONFIG_MISC_DEVICES is not set
+CONFIG_HAVE_IDE=y
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+# CONFIG_SCSI_DMA is not set
+# CONFIG_SCSI_NETLINK is not set
+# CONFIG_ATA is not set
+# CONFIG_MD is not set
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+# CONFIG_VETH is not set
+# CONFIG_PHYLIB is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_AX88796 is not set
+CONFIG_SMC91X=y
+# CONFIG_DM9000 is not set
+# CONFIG_SMC911X is not set
+# CONFIG_SMSC911X is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
+# CONFIG_B44 is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+# CONFIG_WLAN_80211 is not set
+# CONFIG_IWLWIFI_LEDS is not set
+
+#
+# Enable WiMAX (Networking options) to see the WiMAX drivers
+#
+# CONFIG_WAN is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+# CONFIG_INPUT_KEYBOARD is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_CONSOLE_TRANSLATIONS=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+CONFIG_DEVKMEM=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
+# CONFIG_LEGACY_PTYS is not set
+# CONFIG_IPMI_HANDLER is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_R3964 is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+# CONFIG_I2C is not set
+# CONFIG_SPI is not set
+CONFIG_ARCH_REQUIRE_GPIOLIB=y
+CONFIG_GPIOLIB=y
+# CONFIG_DEBUG_GPIO is not set
+# CONFIG_GPIO_SYSFS is not set
+
+#
+# Memory mapped GPIO expanders:
+#
+
+#
+# I2C GPIO expanders:
+#
+
+#
+# PCI GPIO expanders:
+#
+
+#
+# SPI GPIO expanders:
+#
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
+# CONFIG_THERMAL is not set
+# CONFIG_THERMAL_HWMON is not set
+# CONFIG_WATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
+
+#
+# Sonics Silicon Backplane
+#
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_CORE is not set
+# CONFIG_MFD_SM501 is not set
+# CONFIG_MFD_ASIC3 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_MFD_T7L66XB is not set
+# CONFIG_MFD_TC6387XB is not set
+# CONFIG_MFD_TC6393XB is not set
+
+#
+# Multimedia devices
+#
+
+#
+# Multimedia core support
+#
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_DVB_CORE is not set
+# CONFIG_VIDEO_MEDIA is not set
+
+#
+# Multimedia drivers
+#
+# CONFIG_DAB is not set
+
+#
+# Graphics support
+#
+# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
+# CONFIG_FB is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+# CONFIG_SOUND is not set
+# CONFIG_HID_SUPPORT is not set
+# CONFIG_USB_SUPPORT is not set
+# CONFIG_MMC is not set
+# CONFIG_MEMSTICK is not set
+# CONFIG_ACCESSIBILITY is not set
+# CONFIG_NEW_LEDS is not set
+CONFIG_RTC_LIB=y
+# CONFIG_RTC_CLASS is not set
+# CONFIG_DMADEVICES is not set
+# CONFIG_REGULATOR is not set
+# CONFIG_UIO is not set
+# CONFIG_STAGING is not set
+
+#
+# File systems
+#
+# CONFIG_EXT2_FS is not set
+# CONFIG_EXT3_FS is not set
+# CONFIG_EXT4_FS is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+CONFIG_FS_POSIX_ACL=y
+CONFIG_FILE_LOCKING=y
+# CONFIG_XFS_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_BTRFS_FS is not set
+CONFIG_DNOTIFY=y
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+CONFIG_GENERIC_ACL=y
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+# CONFIG_MSDOS_FS is not set
+# CONFIG_VFAT_FS is not set
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+CONFIG_TMPFS_POSIX_ACL=y
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+CONFIG_MISC_FILESYSTEMS=y
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_CRAMFS=y
+# CONFIG_SQUASHFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_OMFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+CONFIG_NFS_V3_ACL=y
+CONFIG_NFS_V4=y
+CONFIG_ROOT_NFS=y
+# CONFIG_NFSD is not set
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_ACL_SUPPORT=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+CONFIG_SUNRPC_GSS=y
+# CONFIG_SUNRPC_REGISTER_V4 is not set
+CONFIG_RPCSEC_GSS_KRB5=y
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_NLS is not set
+# CONFIG_DLM is not set
+
+#
+# Kernel hacking
+#
+CONFIG_PRINTK_TIME=y
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_FRAME_WARN=1024
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_DETECT_SOFTLOCKUP=y
+# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
+CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
+CONFIG_SCHED_DEBUG=y
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_TIMER_STATS is not set
+# CONFIG_DEBUG_OBJECTS is not set
+# CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_PREEMPT is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+# CONFIG_LOCK_STAT is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+CONFIG_DEBUG_INFO=y
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_WRITECOUNT is not set
+CONFIG_DEBUG_MEMORY_INIT=y
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+# CONFIG_DEBUG_NOTIFIERS is not set
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
+# CONFIG_BACKTRACE_SELF_TEST is not set
+# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_LATENCYTOP is not set
+# CONFIG_SYSCTL_SYSCALL_CHECK is not set
+CONFIG_HAVE_FUNCTION_TRACER=y
+
+#
+# Tracers
+#
+# CONFIG_FUNCTION_TRACER is not set
+# CONFIG_IRQSOFF_TRACER is not set
+# CONFIG_PREEMPT_TRACER is not set
+# CONFIG_SCHED_TRACER is not set
+# CONFIG_CONTEXT_SWITCH_TRACER is not set
+# CONFIG_BOOT_TRACER is not set
+# CONFIG_TRACE_BRANCH_PROFILING is not set
+# CONFIG_STACK_TRACER is not set
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_KGDB is not set
+CONFIG_ARM_UNWIND=y
+CONFIG_DEBUG_USER=y
+CONFIG_DEBUG_ERRORS=y
+# CONFIG_DEBUG_STACK_USAGE is not set
+CONFIG_DEBUG_LL=y
+# CONFIG_DEBUG_ICEDCC is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+
+#
+# Crypto core or helper
+#
+# CONFIG_CRYPTO_FIPS is not set
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_ALGAPI2=y
+CONFIG_CRYPTO_AEAD2=y
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_BLKCIPHER2=y
+CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_HASH2=y
+CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_MANAGER=y
+CONFIG_CRYPTO_MANAGER2=y
+# CONFIG_CRYPTO_GF128MUL is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Authenticated Encryption with Associated Data
+#
+# CONFIG_CRYPTO_CCM is not set
+# CONFIG_CRYPTO_GCM is not set
+# CONFIG_CRYPTO_SEQIV is not set
+
+#
+# Block modes
+#
+CONFIG_CRYPTO_CBC=y
+# CONFIG_CRYPTO_CTR is not set
+# CONFIG_CRYPTO_CTS is not set
+# CONFIG_CRYPTO_ECB is not set
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_PCBC is not set
+# CONFIG_CRYPTO_XTS is not set
+
+#
+# Hash modes
+#
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+
+#
+# Digest
+#
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_MD4 is not set
+CONFIG_CRYPTO_MD5=y
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_RMD128 is not set
+# CONFIG_CRYPTO_RMD160 is not set
+# CONFIG_CRYPTO_RMD256 is not set
+# CONFIG_CRYPTO_RMD320 is not set
+# CONFIG_CRYPTO_SHA1 is not set
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_WP512 is not set
+
+#
+# Ciphers
+#
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_ARC4 is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+CONFIG_CRYPTO_DES=y
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_SALSA20 is not set
+# CONFIG_CRYPTO_SEED is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+
+#
+# Compression
+#
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_LZO is not set
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
+CONFIG_CRYPTO_HW=y
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_GENERIC_FIND_LAST_BIT=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_T10DIF is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff --git a/arch/arm/configs/pxa910_defconfig b/arch/arm/configs/pxa910_defconfig
new file mode 100644 (file)
index 0000000..8c7e299
--- /dev/null
@@ -0,0 +1,891 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.29-rc3
+# Fri Mar 20 13:45:12 2009
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_LATENCYTOP_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_AUDIT is not set
+
+#
+# RCU Subsystem
+#
+CONFIG_CLASSIC_RCU=y
+# CONFIG_TREE_RCU is not set
+# CONFIG_PREEMPT_RCU is not set
+# CONFIG_TREE_RCU_TRACE is not set
+# CONFIG_PREEMPT_RCU_TRACE is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_GROUP_SCHED is not set
+# CONFIG_CGROUPS is not set
+CONFIG_SYSFS_DEPRECATED=y
+CONFIG_SYSFS_DEPRECATED_V2=y
+# CONFIG_RELAY is not set
+CONFIG_NAMESPACES=y
+# CONFIG_UTS_NS is not set
+# CONFIG_IPC_NS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
+# CONFIG_NET_NS is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+# CONFIG_EMBEDDED is not set
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_COMPAT_BRK=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_AIO=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+# CONFIG_PROFILING is not set
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_HAVE_CLK=y
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_DEFAULT_AS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+CONFIG_DEFAULT_CFQ=y
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="cfq"
+# CONFIG_FREEZER is not set
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KIRKWOOD is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+CONFIG_ARCH_MMP=y
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_S3C64XX is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_ARCH_MSM is not set
+# CONFIG_ARCH_W90X900 is not set
+CONFIG_MACH_TAVOREVB=y
+
+#
+# Marvell PXA168/910 Implmentations
+#
+# CONFIG_MACH_ASPENITE is not set
+# CONFIG_MACH_ZYLONITE2 is not set
+CONFIG_MACH_TTC_DKB=y
+CONFIG_CPU_PXA910=y
+CONFIG_PLAT_PXA=y
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_MOHAWK=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_PABRT_NOIFAR=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_COPY_V4WB=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_ICACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_CPU_BPREDICT_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
+CONFIG_IWMMXT=y
+CONFIG_COMMON_CLKDEV=y
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_VMSPLIT_3G=y
+# CONFIG_VMSPLIT_2G is not set
+# CONFIG_VMSPLIT_1G is not set
+CONFIG_PAGE_OFFSET=0xC0000000
+CONFIG_PREEMPT=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+CONFIG_ARCH_FLATMEM_HAS_HOLES=y
+# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
+# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_PAGEFLAGS_EXTENDED=y
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_PHYS_ADDR_T_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=0
+CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="root=/dev/nfs rootfstype=nfs nfsroot=192.168.2.100:/nfsroot/ ip=192.168.2.101:192.168.2.100::255.255.255.0::eth0:on console=ttyS0,115200 mem=128M"
+# CONFIG_XIP_KERNEL is not set
+# CONFIG_KEXEC is not set
+
+#
+# CPU Power Management
+#
+# CONFIG_CPU_IDLE is not set
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+CONFIG_HAVE_AOUT=y
+# CONFIG_BINFMT_AOUT is not set
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Power management options
+#
+# CONFIG_PM is not set
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_COMPAT_NET_DEV_OPS=y
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_XFRM_STATISTICS is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_DHCP is not set
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
+# CONFIG_INET_LRO is not set
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_NET_DSA is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+# CONFIG_DCB is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_AF_RXRPC is not set
+# CONFIG_PHONET is not set
+CONFIG_WIRELESS=y
+# CONFIG_CFG80211 is not set
+CONFIG_WIRELESS_OLD_REGULATORY=y
+# CONFIG_WIRELESS_EXT is not set
+# CONFIG_LIB80211 is not set
+# CONFIG_MAC80211 is not set
+# CONFIG_WIMAX is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+# CONFIG_STANDALONE is not set
+# CONFIG_PREVENT_FIRMWARE_BUILD is not set
+CONFIG_FW_LOADER=y
+CONFIG_FIRMWARE_IN_KERNEL=y
+CONFIG_EXTRA_FIRMWARE=""
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+# CONFIG_MTD is not set
+# CONFIG_PARPORT is not set
+# CONFIG_BLK_DEV is not set
+# CONFIG_MISC_DEVICES is not set
+CONFIG_HAVE_IDE=y
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+# CONFIG_SCSI_DMA is not set
+# CONFIG_SCSI_NETLINK is not set
+# CONFIG_ATA is not set
+# CONFIG_MD is not set
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+# CONFIG_VETH is not set
+# CONFIG_PHYLIB is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_AX88796 is not set
+CONFIG_SMC91X=y
+# CONFIG_DM9000 is not set
+# CONFIG_SMC911X is not set
+# CONFIG_SMSC911X is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
+# CONFIG_B44 is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+# CONFIG_WLAN_80211 is not set
+# CONFIG_IWLWIFI_LEDS is not set
+
+#
+# Enable WiMAX (Networking options) to see the WiMAX drivers
+#
+# CONFIG_WAN is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+# CONFIG_INPUT_KEYBOARD is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_CONSOLE_TRANSLATIONS=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+CONFIG_DEVKMEM=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
+# CONFIG_LEGACY_PTYS is not set
+# CONFIG_IPMI_HANDLER is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_R3964 is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+# CONFIG_I2C is not set
+# CONFIG_SPI is not set
+CONFIG_ARCH_REQUIRE_GPIOLIB=y
+CONFIG_GPIOLIB=y
+# CONFIG_DEBUG_GPIO is not set
+# CONFIG_GPIO_SYSFS is not set
+
+#
+# Memory mapped GPIO expanders:
+#
+
+#
+# I2C GPIO expanders:
+#
+
+#
+# PCI GPIO expanders:
+#
+
+#
+# SPI GPIO expanders:
+#
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
+# CONFIG_THERMAL is not set
+# CONFIG_THERMAL_HWMON is not set
+# CONFIG_WATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
+
+#
+# Sonics Silicon Backplane
+#
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_CORE is not set
+# CONFIG_MFD_SM501 is not set
+# CONFIG_MFD_ASIC3 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_MFD_T7L66XB is not set
+# CONFIG_MFD_TC6387XB is not set
+# CONFIG_MFD_TC6393XB is not set
+
+#
+# Multimedia devices
+#
+
+#
+# Multimedia core support
+#
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_DVB_CORE is not set
+# CONFIG_VIDEO_MEDIA is not set
+
+#
+# Multimedia drivers
+#
+# CONFIG_DAB is not set
+
+#
+# Graphics support
+#
+# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
+# CONFIG_FB is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+# CONFIG_SOUND is not set
+# CONFIG_HID_SUPPORT is not set
+# CONFIG_USB_SUPPORT is not set
+# CONFIG_MMC is not set
+# CONFIG_MEMSTICK is not set
+# CONFIG_ACCESSIBILITY is not set
+# CONFIG_NEW_LEDS is not set
+CONFIG_RTC_LIB=y
+# CONFIG_RTC_CLASS is not set
+# CONFIG_DMADEVICES is not set
+# CONFIG_REGULATOR is not set
+# CONFIG_UIO is not set
+# CONFIG_STAGING is not set
+
+#
+# File systems
+#
+# CONFIG_EXT2_FS is not set
+# CONFIG_EXT3_FS is not set
+# CONFIG_EXT4_FS is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+CONFIG_FS_POSIX_ACL=y
+CONFIG_FILE_LOCKING=y
+# CONFIG_XFS_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_BTRFS_FS is not set
+CONFIG_DNOTIFY=y
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+CONFIG_GENERIC_ACL=y
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+# CONFIG_MSDOS_FS is not set
+# CONFIG_VFAT_FS is not set
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+CONFIG_TMPFS_POSIX_ACL=y
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+CONFIG_MISC_FILESYSTEMS=y
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_CRAMFS=y
+# CONFIG_SQUASHFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_OMFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+CONFIG_NFS_V3_ACL=y
+CONFIG_NFS_V4=y
+CONFIG_ROOT_NFS=y
+# CONFIG_NFSD is not set
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_ACL_SUPPORT=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+CONFIG_SUNRPC_GSS=y
+# CONFIG_SUNRPC_REGISTER_V4 is not set
+CONFIG_RPCSEC_GSS_KRB5=y
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_NLS is not set
+# CONFIG_DLM is not set
+
+#
+# Kernel hacking
+#
+CONFIG_PRINTK_TIME=y
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_FRAME_WARN=1024
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_DETECT_SOFTLOCKUP=y
+# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
+CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
+CONFIG_SCHED_DEBUG=y
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_TIMER_STATS is not set
+# CONFIG_DEBUG_OBJECTS is not set
+# CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_PREEMPT is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+# CONFIG_LOCK_STAT is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+CONFIG_DEBUG_INFO=y
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_WRITECOUNT is not set
+CONFIG_DEBUG_MEMORY_INIT=y
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+# CONFIG_DEBUG_NOTIFIERS is not set
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
+# CONFIG_BACKTRACE_SELF_TEST is not set
+# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_LATENCYTOP is not set
+# CONFIG_SYSCTL_SYSCALL_CHECK is not set
+CONFIG_HAVE_FUNCTION_TRACER=y
+
+#
+# Tracers
+#
+# CONFIG_FUNCTION_TRACER is not set
+# CONFIG_IRQSOFF_TRACER is not set
+# CONFIG_PREEMPT_TRACER is not set
+# CONFIG_SCHED_TRACER is not set
+# CONFIG_CONTEXT_SWITCH_TRACER is not set
+# CONFIG_BOOT_TRACER is not set
+# CONFIG_TRACE_BRANCH_PROFILING is not set
+# CONFIG_STACK_TRACER is not set
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_KGDB is not set
+CONFIG_ARM_UNWIND=y
+CONFIG_DEBUG_USER=y
+CONFIG_DEBUG_ERRORS=y
+# CONFIG_DEBUG_STACK_USAGE is not set
+CONFIG_DEBUG_LL=y
+# CONFIG_DEBUG_ICEDCC is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+
+#
+# Crypto core or helper
+#
+# CONFIG_CRYPTO_FIPS is not set
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_ALGAPI2=y
+CONFIG_CRYPTO_AEAD2=y
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_BLKCIPHER2=y
+CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_HASH2=y
+CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_MANAGER=y
+CONFIG_CRYPTO_MANAGER2=y
+# CONFIG_CRYPTO_GF128MUL is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Authenticated Encryption with Associated Data
+#
+# CONFIG_CRYPTO_CCM is not set
+# CONFIG_CRYPTO_GCM is not set
+# CONFIG_CRYPTO_SEQIV is not set
+
+#
+# Block modes
+#
+CONFIG_CRYPTO_CBC=y
+# CONFIG_CRYPTO_CTR is not set
+# CONFIG_CRYPTO_CTS is not set
+# CONFIG_CRYPTO_ECB is not set
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_PCBC is not set
+# CONFIG_CRYPTO_XTS is not set
+
+#
+# Hash modes
+#
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+
+#
+# Digest
+#
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_MD4 is not set
+CONFIG_CRYPTO_MD5=y
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_RMD128 is not set
+# CONFIG_CRYPTO_RMD160 is not set
+# CONFIG_CRYPTO_RMD256 is not set
+# CONFIG_CRYPTO_RMD320 is not set
+# CONFIG_CRYPTO_SHA1 is not set
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_WP512 is not set
+
+#
+# Ciphers
+#
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_ARC4 is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+CONFIG_CRYPTO_DES=y
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_SALSA20 is not set
+# CONFIG_CRYPTO_SEED is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+
+#
+# Compression
+#
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_LZO is not set
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
+CONFIG_CRYPTO_HW=y
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_GENERIC_FIND_LAST_BIT=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_T10DIF is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
index d052c8f80515bd89d92b4f6fe343966a4c45242f..984f7096a5338dd327851d5653025d7aa9dba7f7 100644 (file)
@@ -87,7 +87,6 @@ CONFIG_ARCH_SA1100=y
 # CONFIG_SA1100_COLLIE is not set
 # CONFIG_SA1100_H3100 is not set
 # CONFIG_SA1100_H3600 is not set
-# CONFIG_SA1100_H3800 is not set
 # CONFIG_SA1100_BADGE4 is not set
 # CONFIG_SA1100_JORNADA720 is not set
 # CONFIG_SA1100_HACKKIT is not set
index 9b6561d119afabd00a8074e70c59ebacb52234e6..90235bf7a1de8df9f195f5bdacb6054e5797e6be 100644 (file)
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.12-git3
-# Sat Jul 16 15:21:47 2005
+# Linux kernel version: 2.6.28-git6
+# Thu Jan  8 17:14:47 2009
 #
 CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+# CONFIG_GENERIC_GPIO is not set
+# CONFIG_GENERIC_TIME is not set
+# CONFIG_GENERIC_CLOCKEVENTS is not set
 CONFIG_MMU=y
-CONFIG_UID16=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_LATENCYTOP_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
-# Code maturity level options
+# General setup
 #
 CONFIG_EXPERIMENTAL=y
-CONFIG_CLEAN_COMPILE=y
 CONFIG_BROKEN_ON_SMP=y
 CONFIG_INIT_ENV_ARG_LIMIT=32
-
-#
-# General setup
-#
 CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
 # CONFIG_POSIX_MQUEUE is not set
 # CONFIG_BSD_PROCESS_ACCT is not set
-CONFIG_SYSCTL=y
+# CONFIG_TASKSTATS is not set
 # CONFIG_AUDIT is not set
-# CONFIG_HOTPLUG is not set
-CONFIG_KOBJECT_UEVENT=y
 # CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+CONFIG_GROUP_SCHED=y
+CONFIG_FAIR_GROUP_SCHED=y
+# CONFIG_RT_GROUP_SCHED is not set
+CONFIG_USER_SCHED=y
+# CONFIG_CGROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+CONFIG_SYSFS_DEPRECATED_V2=y
+# CONFIG_RELAY is not set
+CONFIG_NAMESPACES=y
+# CONFIG_UTS_NS is not set
+# CONFIG_IPC_NS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
+# CONFIG_BLK_DEV_INITRD is not set
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
 # CONFIG_EMBEDDED is not set
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
 CONFIG_KALLSYMS=y
 # CONFIG_KALLSYMS_ALL is not set
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_COMPAT_BRK=y
 CONFIG_BASE_FULL=y
 CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
 CONFIG_EPOLL=y
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
-CONFIG_CC_ALIGN_FUNCTIONS=0
-CONFIG_CC_ALIGN_LABELS=0
-CONFIG_CC_ALIGN_LOOPS=0
-CONFIG_CC_ALIGN_JUMPS=0
+CONFIG_AIO=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_PCI_QUIRKS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+# CONFIG_PROFILING is not set
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
-
-#
-# Loadable module support
-#
 CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
 CONFIG_MODULE_UNLOAD=y
 CONFIG_MODULE_FORCE_UNLOAD=y
-CONFIG_OBSOLETE_MODPARM=y
 # CONFIG_MODVERSIONS is not set
 # CONFIG_MODULE_SRCVERSION_ALL is not set
 CONFIG_KMOD=y
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_DEFAULT_AS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+CONFIG_DEFAULT_CFQ=y
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="cfq"
+CONFIG_CLASSIC_RCU=y
+# CONFIG_TREE_RCU is not set
+# CONFIG_PREEMPT_RCU is not set
+# CONFIG_TREE_RCU_TRACE is not set
+# CONFIG_PREEMPT_RCU_TRACE is not set
+# CONFIG_FREEZER is not set
 
 #
 # System Type
 #
-# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
 # CONFIG_ARCH_CLPS711X is not set
-# CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
-# CONFIG_ARCH_INTEGRATOR is not set
-# CONFIG_ARCH_IOP3XX is not set
-# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
 # CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
 # CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KIRKWOOD is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_PNX4008 is not set
 # CONFIG_ARCH_PXA is not set
 # CONFIG_ARCH_RPC is not set
 # CONFIG_ARCH_SA1100 is not set
 # CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_S3C64XX is not set
 CONFIG_ARCH_SHARK=y
 # CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_DAVINCI is not set
 # CONFIG_ARCH_OMAP is not set
-# CONFIG_ARCH_VERSATILE is not set
-# CONFIG_ARCH_IMX is not set
-# CONFIG_ARCH_H720X is not set
-# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_MSM is not set
+# CONFIG_ARCH_W90X900 is not set
 
 #
 # Processor Type
@@ -91,14 +177,20 @@ CONFIG_CPU_32=y
 CONFIG_CPU_SA110=y
 CONFIG_CPU_32v4=y
 CONFIG_CPU_ABRT_EV4=y
+CONFIG_CPU_PABRT_NOIFAR=y
 CONFIG_CPU_CACHE_V4WB=y
 CONFIG_CPU_CACHE_VIVT=y
 CONFIG_CPU_COPY_V4WB=y
 CONFIG_CPU_TLB_V4WB=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
 
 #
 # Processor Features
 #
+# CONFIG_CPU_ICACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
 
 #
 # Bus support
@@ -107,22 +199,40 @@ CONFIG_ISA=y
 CONFIG_ISA_DMA=y
 CONFIG_ISA_DMA_API=y
 CONFIG_PCI=y
+CONFIG_PCI_SYSCALL=y
 CONFIG_PCI_HOST_VIA82C505=y
-CONFIG_PCI_LEGACY_PROC=y
-# CONFIG_PCI_NAMES is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+CONFIG_PCI_LEGACY=y
 # CONFIG_PCI_DEBUG is not set
-
-#
-# PCCARD (PCMCIA/CardBus) support
-#
 # CONFIG_PCCARD is not set
 
 #
 # Kernel Features
 #
-# CONFIG_SMP is not set
+CONFIG_VMSPLIT_3G=y
+# CONFIG_VMSPLIT_2G is not set
+# CONFIG_VMSPLIT_1G is not set
+CONFIG_PAGE_OFFSET=0xC0000000
 # CONFIG_PREEMPT is not set
-# CONFIG_DISCONTIGMEM is not set
+CONFIG_HZ=100
+# CONFIG_AEABI is not set
+CONFIG_ARCH_FLATMEM_HAS_HOLES=y
+# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
+# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_PAGEFLAGS_EXTENDED=y
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+# CONFIG_PHYS_ADDR_T_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
 CONFIG_LEDS=y
 CONFIG_LEDS_TIMER=y
 # CONFIG_LEDS_CPU is not set
@@ -135,6 +245,12 @@ CONFIG_ZBOOT_ROM_TEXT=0x0
 CONFIG_ZBOOT_ROM_BSS=0x0
 CONFIG_CMDLINE=""
 # CONFIG_XIP_KERNEL is not set
+# CONFIG_KEXEC is not set
+
+#
+# CPU Power Management
+#
+# CONFIG_CPU_IDLE is not set
 
 #
 # Floating point emulation
@@ -143,13 +259,16 @@ CONFIG_CMDLINE=""
 #
 # At least one emulation must be selected
 #
-# CONFIG_FPE_NWFPE is not set
-CONFIG_FPE_FASTFPE=y
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
 
 #
 # Userspace binary formats
 #
 CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+CONFIG_HAVE_AOUT=y
 # CONFIG_BINFMT_AOUT is not set
 # CONFIG_BINFMT_MISC is not set
 # CONFIG_ARTHUR is not set
@@ -158,44 +277,104 @@ CONFIG_BINFMT_ELF=y
 # Power management options
 #
 # CONFIG_PM is not set
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_NET=y
 
 #
-# Device Drivers
+# Networking options
 #
+# CONFIG_NET_NS is not set
+CONFIG_COMPAT_NET_DEV_OPS=y
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+# CONFIG_IP_PNP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_LRO is not set
+# CONFIG_INET_DIAG is not set
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_NET_DSA is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+# CONFIG_DCB is not set
 
 #
-# Generic Driver Options
+# Network testing
 #
-# CONFIG_STANDALONE is not set
-CONFIG_PREVENT_FIRMWARE_BUILD=y
-# CONFIG_FW_LOADER is not set
-# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_AF_RXRPC is not set
+# CONFIG_PHONET is not set
+# CONFIG_WIRELESS is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
 
 #
-# Memory Technology Devices (MTD)
+# Device Drivers
 #
-# CONFIG_MTD is not set
 
 #
-# Parallel port support
+# Generic Driver Options
 #
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+# CONFIG_STANDALONE is not set
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_FIRMWARE_IN_KERNEL is not set
+CONFIG_EXTRA_FIRMWARE=""
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+# CONFIG_MTD is not set
 CONFIG_PARPORT=m
 CONFIG_PARPORT_PC=m
 # CONFIG_PARPORT_SERIAL is not set
 # CONFIG_PARPORT_PC_FIFO is not set
 # CONFIG_PARPORT_PC_SUPERIO is not set
-# CONFIG_PARPORT_ARC is not set
 # CONFIG_PARPORT_GSC is not set
+# CONFIG_PARPORT_AX88796 is not set
 # CONFIG_PARPORT_1284 is not set
-
-#
-# Plug and Play support
-#
 # CONFIG_PNP is not set
-
-#
-# Block devices
-#
+CONFIG_BLK_DEV=y
 # CONFIG_BLK_DEV_XD is not set
 # CONFIG_PARIDE is not set
 # CONFIG_BLK_CPQ_DA is not set
@@ -210,52 +389,78 @@ CONFIG_BLK_DEV_LOOP=y
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=4096
-# CONFIG_BLK_DEV_INITRD is not set
-CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_BLK_DEV_XIP is not set
 # CONFIG_CDROM_PKTCDVD is not set
-
-#
-# IO Schedulers
-#
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
 # CONFIG_ATA_OVER_ETH is not set
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
+# CONFIG_BLK_DEV_HD is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_PHANTOM is not set
+# CONFIG_EEPROM_93CX6 is not set
+# CONFIG_SGI_IOC4 is not set
+# CONFIG_TIFM_CORE is not set
+# CONFIG_ENCLOSURE_SERVICES is not set
+# CONFIG_HP_ILO is not set
+# CONFIG_C2PORT is not set
+CONFIG_HAVE_IDE=y
 CONFIG_IDE=y
-CONFIG_BLK_DEV_IDE=y
 
 #
-# Please see Documentation/ide.txt for help/info on IDE drives
+# Please see Documentation/ide/ide.txt for help/info on IDE drives
 #
+CONFIG_IDE_ATAPI=y
 # CONFIG_BLK_DEV_IDE_SATA is not set
-CONFIG_BLK_DEV_IDEDISK=y
-# CONFIG_IDEDISK_MULTI_MODE is not set
+CONFIG_IDE_GD=y
+CONFIG_IDE_GD_ATA=y
+# CONFIG_IDE_GD_ATAPI is not set
 CONFIG_BLK_DEV_IDECD=m
+CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS=y
 # CONFIG_BLK_DEV_IDETAPE is not set
-CONFIG_BLK_DEV_IDEFLOPPY=y
-# CONFIG_BLK_DEV_IDESCSI is not set
 # CONFIG_IDE_TASK_IOCTL is not set
+CONFIG_IDE_PROC_FS=y
 
 #
 # IDE chipset support/bugfixes
 #
-CONFIG_IDE_GENERIC=y
-# CONFIG_BLK_DEV_IDEPCI is not set
+# CONFIG_BLK_DEV_PLATFORM is not set
+
+#
+# PCI IDE chipsets support
+#
+# CONFIG_BLK_DEV_GENERIC is not set
+# CONFIG_BLK_DEV_OPTI621 is not set
+# CONFIG_BLK_DEV_AEC62XX is not set
+# CONFIG_BLK_DEV_ALI15X3 is not set
+# CONFIG_BLK_DEV_CMD64X is not set
+# CONFIG_BLK_DEV_TRIFLEX is not set
+# CONFIG_BLK_DEV_CS5520 is not set
+# CONFIG_BLK_DEV_CS5530 is not set
+# CONFIG_BLK_DEV_HPT366 is not set
+# CONFIG_BLK_DEV_JMICRON is not set
+# CONFIG_BLK_DEV_SC1200 is not set
+# CONFIG_BLK_DEV_PIIX is not set
+# CONFIG_BLK_DEV_IT8213 is not set
+# CONFIG_BLK_DEV_IT821X is not set
+# CONFIG_BLK_DEV_NS87415 is not set
+# CONFIG_BLK_DEV_PDC202XX_OLD is not set
+# CONFIG_BLK_DEV_PDC202XX_NEW is not set
+# CONFIG_BLK_DEV_SVWKS is not set
+# CONFIG_BLK_DEV_SIIMAGE is not set
+# CONFIG_BLK_DEV_SL82C105 is not set
+# CONFIG_BLK_DEV_SLC90E66 is not set
+# CONFIG_BLK_DEV_TRM290 is not set
+# CONFIG_BLK_DEV_VIA82CXXX is not set
+# CONFIG_BLK_DEV_TC86C001 is not set
 CONFIG_IDE_ARM=y
-# CONFIG_IDE_CHIPSETS is not set
 # CONFIG_BLK_DEV_IDEDMA is not set
-# CONFIG_IDEDMA_AUTO is not set
-# CONFIG_BLK_DEV_HD is not set
 
 #
 # SCSI device support
 #
+# CONFIG_RAID_ATTRS is not set
 CONFIG_SCSI=m
+CONFIG_SCSI_DMA=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
 CONFIG_SCSI_PROC_FS=y
 
 #
@@ -275,17 +480,20 @@ CONFIG_CHR_DEV_SG=m
 # CONFIG_SCSI_MULTI_LUN is not set
 # CONFIG_SCSI_CONSTANTS is not set
 # CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
+CONFIG_SCSI_WAIT_SCAN=m
 
 #
-# SCSI Transport Attributes
+# SCSI Transports
 #
 # CONFIG_SCSI_SPI_ATTRS is not set
 # CONFIG_SCSI_FC_ATTRS is not set
 # CONFIG_SCSI_ISCSI_ATTRS is not set
-
-#
-# SCSI low-level drivers
-#
+# CONFIG_SCSI_SAS_LIBSAS is not set
+# CONFIG_SCSI_SRP_ATTRS is not set
+CONFIG_SCSI_LOWLEVEL=y
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_SCSI_CXGB3_ISCSI is not set
 # CONFIG_BLK_DEV_3W_XXXX_RAID is not set
 # CONFIG_SCSI_3W_9XXX is not set
 # CONFIG_SCSI_7000FASST is not set
@@ -296,12 +504,18 @@ CONFIG_CHR_DEV_SG=m
 # CONFIG_SCSI_AIC7XXX is not set
 # CONFIG_SCSI_AIC7XXX_OLD is not set
 # CONFIG_SCSI_AIC79XX is not set
+# CONFIG_SCSI_AIC94XX is not set
 # CONFIG_SCSI_DPT_I2O is not set
+# CONFIG_SCSI_ADVANSYS is not set
 # CONFIG_SCSI_IN2000 is not set
+# CONFIG_SCSI_ARCMSR is not set
 # CONFIG_MEGARAID_NEWGEN is not set
 # CONFIG_MEGARAID_LEGACY is not set
-# CONFIG_SCSI_SATA is not set
+# CONFIG_MEGARAID_SAS is not set
+# CONFIG_SCSI_HPTIOP is not set
 # CONFIG_SCSI_BUSLOGIC is not set
+# CONFIG_LIBFC is not set
+# CONFIG_FCOE is not set
 # CONFIG_SCSI_DMX3191D is not set
 # CONFIG_SCSI_DTC3280 is not set
 # CONFIG_SCSI_EATA is not set
@@ -314,20 +528,15 @@ CONFIG_CHR_DEV_SG=m
 # CONFIG_SCSI_INIA100 is not set
 # CONFIG_SCSI_PPA is not set
 # CONFIG_SCSI_IMM is not set
+# CONFIG_SCSI_MVSAS is not set
 # CONFIG_SCSI_NCR53C406A is not set
+# CONFIG_SCSI_STEX is not set
 # CONFIG_SCSI_SYM53C8XX_2 is not set
-# CONFIG_SCSI_IPR is not set
 # CONFIG_SCSI_PAS16 is not set
-# CONFIG_SCSI_PSI240I is not set
 # CONFIG_SCSI_QLOGIC_FAS is not set
-# CONFIG_SCSI_QLOGIC_FC is not set
 # CONFIG_SCSI_QLOGIC_1280 is not set
-CONFIG_SCSI_QLA2XXX=m
-# CONFIG_SCSI_QLA21XX is not set
-# CONFIG_SCSI_QLA22XX is not set
-# CONFIG_SCSI_QLA2300 is not set
-# CONFIG_SCSI_QLA2322 is not set
-# CONFIG_SCSI_QLA6312 is not set
+# CONFIG_SCSI_QLA_FC is not set
+# CONFIG_SCSI_QLA_ISCSI is not set
 # CONFIG_SCSI_LPFC is not set
 # CONFIG_SCSI_SYM53C416 is not set
 # CONFIG_SCSI_DC395x is not set
@@ -336,123 +545,57 @@ CONFIG_SCSI_QLA2XXX=m
 # CONFIG_SCSI_U14_34F is not set
 # CONFIG_SCSI_NSP32 is not set
 # CONFIG_SCSI_DEBUG is not set
-
-#
-# Multi-device support (RAID and LVM)
-#
+# CONFIG_SCSI_SRP is not set
+# CONFIG_SCSI_DH is not set
+# CONFIG_ATA is not set
 # CONFIG_MD is not set
-
-#
-# Fusion MPT device support
-#
 # CONFIG_FUSION is not set
-# CONFIG_FUSION_SPI is not set
-# CONFIG_FUSION_FC is not set
 
 #
 # IEEE 1394 (FireWire) support
 #
-# CONFIG_IEEE1394 is not set
 
 #
-# I2O device support
+# Enable only one of the two stacks, unless you know what you are doing
 #
+# CONFIG_FIREWIRE is not set
+# CONFIG_IEEE1394 is not set
 # CONFIG_I2O is not set
-
-#
-# Networking support
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-CONFIG_PACKET=y
-# CONFIG_PACKET_MMAP is not set
-CONFIG_UNIX=y
-# CONFIG_NET_KEY is not set
-CONFIG_INET=y
-# CONFIG_IP_MULTICAST is not set
-# CONFIG_IP_ADVANCED_ROUTER is not set
-# CONFIG_IP_PNP is not set
-# CONFIG_NET_IPIP is not set
-# CONFIG_NET_IPGRE is not set
-# CONFIG_ARPD is not set
-# CONFIG_SYN_COOKIES is not set
-# CONFIG_INET_AH is not set
-# CONFIG_INET_ESP is not set
-# CONFIG_INET_IPCOMP is not set
-# CONFIG_INET_TUNNEL is not set
-CONFIG_IP_TCPDIAG=y
-# CONFIG_IP_TCPDIAG_IPV6 is not set
-# CONFIG_IPV6 is not set
-# CONFIG_NETFILTER is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-# CONFIG_IP_SCTP is not set
-# CONFIG_ATM is not set
-# CONFIG_BRIDGE is not set
-# CONFIG_VLAN_8021Q is not set
-# CONFIG_DECNET is not set
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_NET_DIVERT is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
-# CONFIG_NET_SCHED is not set
-# CONFIG_NET_CLS_ROUTE is not set
-
-#
-# Network testing
-#
-# CONFIG_NET_PKTGEN is not set
-# CONFIG_NETPOLL is not set
-# CONFIG_NET_POLL_CONTROLLER is not set
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-# CONFIG_BT is not set
 CONFIG_NETDEVICES=y
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
 # CONFIG_EQUALIZER is not set
 # CONFIG_TUN is not set
-
-#
-# ARCnet devices
-#
+# CONFIG_VETH is not set
 # CONFIG_ARCNET is not set
-
-#
-# Ethernet (10 or 100Mbit)
-#
+# CONFIG_PHYLIB is not set
 CONFIG_NET_ETHERNET=y
 # CONFIG_MII is not set
+# CONFIG_AX88796 is not set
 # CONFIG_HAPPYMEAL is not set
 # CONFIG_SUNGEM is not set
+# CONFIG_CASSINI is not set
 # CONFIG_NET_VENDOR_3COM is not set
 # CONFIG_LANCE is not set
 # CONFIG_NET_VENDOR_SMC is not set
 # CONFIG_SMC91X is not set
 # CONFIG_DM9000 is not set
+# CONFIG_SMC911X is not set
+# CONFIG_SMSC911X is not set
 # CONFIG_NET_VENDOR_RACAL is not set
-
-#
-# Tulip family network device support
-#
 # CONFIG_NET_TULIP is not set
 # CONFIG_AT1700 is not set
 # CONFIG_DEPCA is not set
 # CONFIG_HP100 is not set
 # CONFIG_NET_ISA is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
 CONFIG_NET_PCI=y
 # CONFIG_PCNET32 is not set
 # CONFIG_AMD8111_ETH is not set
@@ -462,56 +605,69 @@ CONFIG_NET_PCI=y
 # CONFIG_B44 is not set
 # CONFIG_FORCEDETH is not set
 CONFIG_CS89x0=y
-# CONFIG_DGRS is not set
-# CONFIG_EEPRO100 is not set
+CONFIG_CS89x0_NOEEPROM=y
 # CONFIG_E100 is not set
 # CONFIG_FEALNX is not set
 # CONFIG_NATSEMI is not set
 # CONFIG_NE2K_PCI is not set
 # CONFIG_8139CP is not set
 # CONFIG_8139TOO is not set
+# CONFIG_R6040 is not set
 # CONFIG_SIS900 is not set
 # CONFIG_EPIC100 is not set
+# CONFIG_SMSC9420 is not set
 # CONFIG_SUNDANCE is not set
 # CONFIG_TLAN is not set
 # CONFIG_VIA_RHINE is not set
+# CONFIG_SC92031 is not set
 # CONFIG_NET_POCKET is not set
-
-#
-# Ethernet (1000 Mbit)
-#
+# CONFIG_ATL2 is not set
+CONFIG_NETDEV_1000=y
 # CONFIG_ACENIC is not set
 # CONFIG_DL2K is not set
 # CONFIG_E1000 is not set
+# CONFIG_E1000E is not set
+# CONFIG_IP1000 is not set
+# CONFIG_IGB is not set
 # CONFIG_NS83820 is not set
 # CONFIG_HAMACHI is not set
 # CONFIG_YELLOWFIN is not set
 # CONFIG_R8169 is not set
+# CONFIG_SIS190 is not set
 # CONFIG_SKGE is not set
-# CONFIG_SK98LIN is not set
+# CONFIG_SKY2 is not set
 # CONFIG_VIA_VELOCITY is not set
 # CONFIG_TIGON3 is not set
 # CONFIG_BNX2 is not set
-
-#
-# Ethernet (10000 Mbit)
-#
+# CONFIG_QLA3XXX is not set
+# CONFIG_ATL1 is not set
+# CONFIG_ATL1E is not set
+# CONFIG_JME is not set
+CONFIG_NETDEV_10000=y
+# CONFIG_CHELSIO_T1 is not set
+CONFIG_CHELSIO_T3_DEPENDS=y
+# CONFIG_CHELSIO_T3 is not set
+# CONFIG_ENIC is not set
+# CONFIG_IXGBE is not set
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
-
-#
-# Token Ring devices
-#
+# CONFIG_MYRI10GE is not set
+# CONFIG_NETXEN_NIC is not set
+# CONFIG_NIU is not set
+# CONFIG_MLX4_EN is not set
+# CONFIG_MLX4_CORE is not set
+# CONFIG_TEHUTI is not set
+# CONFIG_BNX2X is not set
+# CONFIG_QLGE is not set
+# CONFIG_SFC is not set
 # CONFIG_TR is not set
 
 #
-# Wireless LAN (non-hamradio)
-#
-# CONFIG_NET_RADIO is not set
-
-#
-# Wan interfaces
+# Wireless LAN
 #
+# CONFIG_WLAN_PRE80211 is not set
+# CONFIG_WLAN_80211 is not set
+# CONFIG_IWLWIFI_LEDS is not set
 # CONFIG_WAN is not set
 # CONFIG_FDDI is not set
 # CONFIG_HIPPI is not set
@@ -519,18 +675,17 @@ CONFIG_CS89x0=y
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
 # CONFIG_NET_FC is not set
-# CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
-
-#
-# ISDN subsystem
-#
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
 # CONFIG_ISDN is not set
 
 #
 # Input device support
 #
 CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
 
 #
 # Userland interfaces
@@ -540,7 +695,6 @@ CONFIG_INPUT_MOUSEDEV_PSAUX=y
 CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_TSDEV is not set
 # CONFIG_INPUT_EVDEV is not set
 # CONFIG_INPUT_EVBUG is not set
 
@@ -553,14 +707,25 @@ CONFIG_KEYBOARD_ATKBD=y
 # CONFIG_KEYBOARD_LKKBD is not set
 # CONFIG_KEYBOARD_XTKBD is not set
 # CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
 CONFIG_INPUT_MOUSE=y
 CONFIG_MOUSE_PS2=y
+CONFIG_MOUSE_PS2_ALPS=y
+CONFIG_MOUSE_PS2_LOGIPS2PP=y
+CONFIG_MOUSE_PS2_SYNAPTICS=y
+CONFIG_MOUSE_PS2_LIFEBOOK=y
+CONFIG_MOUSE_PS2_TRACKPOINT=y
+# CONFIG_MOUSE_PS2_ELANTECH is not set
+# CONFIG_MOUSE_PS2_TOUCHKIT is not set
 # CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_APPLETOUCH is not set
+# CONFIG_MOUSE_BCM5974 is not set
 # CONFIG_MOUSE_INPORT is not set
 # CONFIG_MOUSE_LOGIBM is not set
 # CONFIG_MOUSE_PC110PAD is not set
 # CONFIG_MOUSE_VSXXXAA is not set
 # CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
 # CONFIG_INPUT_TOUCHSCREEN is not set
 # CONFIG_INPUT_MISC is not set
 
@@ -580,16 +745,22 @@ CONFIG_SERIO_LIBPS2=y
 # Character devices
 #
 CONFIG_VT=y
+CONFIG_CONSOLE_TRANSLATIONS=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+CONFIG_DEVKMEM=y
 # CONFIG_SERIAL_NONSTANDARD is not set
+# CONFIG_NOZOMI is not set
 
 #
 # Serial drivers
 #
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_PCI=y
 CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
 # CONFIG_SERIAL_8250_EXTENDED is not set
 
 #
@@ -599,90 +770,122 @@ CONFIG_SERIAL_CORE=y
 CONFIG_SERIAL_CORE_CONSOLE=y
 # CONFIG_SERIAL_JSM is not set
 CONFIG_UNIX98_PTYS=y
+# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
 CONFIG_LEGACY_PTYS=y
 CONFIG_LEGACY_PTY_COUNT=256
 CONFIG_PRINTER=m
 # CONFIG_LP_CONSOLE is not set
 # CONFIG_PPDEV is not set
-# CONFIG_TIPAR is not set
-
-#
-# IPMI
-#
 # CONFIG_IPMI_HANDLER is not set
-
-#
-# Watchdog Cards
-#
-# CONFIG_WATCHDOG is not set
+CONFIG_HW_RANDOM=m
 # CONFIG_NVRAM is not set
-CONFIG_RTC=y
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
-
-#
-# Ftape, the floppy tape device driver
-#
-# CONFIG_DRM is not set
 # CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_DEVPORT=y
+# CONFIG_I2C is not set
+# CONFIG_SPI is not set
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
+# CONFIG_THERMAL is not set
+# CONFIG_THERMAL_HWMON is not set
+# CONFIG_WATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
 
 #
-# TPM devices
+# Sonics Silicon Backplane
 #
-# CONFIG_TCG_TPM is not set
+# CONFIG_SSB is not set
 
 #
-# I2C support
+# Multifunction device drivers
 #
-# CONFIG_I2C is not set
+# CONFIG_MFD_CORE is not set
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_MFD_TMIO is not set
 
 #
-# Misc devices
+# Multimedia devices
 #
 
 #
-# Multimedia devices
+# Multimedia core support
 #
 # CONFIG_VIDEO_DEV is not set
+# CONFIG_DVB_CORE is not set
+# CONFIG_VIDEO_MEDIA is not set
 
 #
-# Digital Video Broadcasting Devices
+# Multimedia drivers
 #
-# CONFIG_DVB is not set
+# CONFIG_DAB is not set
 
 #
 # Graphics support
 #
+# CONFIG_DRM is not set
+# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
 CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+# CONFIG_FB_BOOT_VESA_SUPPORT is not set
 CONFIG_FB_CFB_FILLRECT=y
 CONFIG_FB_CFB_COPYAREA=y
 CONFIG_FB_CFB_IMAGEBLIT=y
-CONFIG_FB_SOFT_CURSOR=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_FOREIGN_ENDIAN is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_SVGALIB is not set
 # CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
 # CONFIG_FB_MODE_HELPERS is not set
 # CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
 # CONFIG_FB_CIRRUS is not set
 # CONFIG_FB_PM2 is not set
 CONFIG_FB_CYBER2000=y
 # CONFIG_FB_ASILIANT is not set
 # CONFIG_FB_IMSTT is not set
+# CONFIG_FB_S1D13XXX is not set
 # CONFIG_FB_NVIDIA is not set
 # CONFIG_FB_RIVA is not set
 # CONFIG_FB_MATROX is not set
-# CONFIG_FB_RADEON_OLD is not set
 # CONFIG_FB_RADEON is not set
 # CONFIG_FB_ATY128 is not set
 # CONFIG_FB_ATY is not set
+# CONFIG_FB_S3 is not set
 # CONFIG_FB_SAVAGE is not set
 # CONFIG_FB_SIS is not set
+# CONFIG_FB_VIA is not set
 # CONFIG_FB_NEOMAGIC is not set
 # CONFIG_FB_KYRO is not set
 # CONFIG_FB_3DFX is not set
 # CONFIG_FB_VOODOO1 is not set
+# CONFIG_FB_VT8623 is not set
 # CONFIG_FB_TRIDENT is not set
-# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_ARK is not set
+# CONFIG_FB_PM3 is not set
+# CONFIG_FB_CARMINE is not set
 # CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_METRONOME is not set
+# CONFIG_FB_MB862XX is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
 
 #
 # Console display driver support
@@ -691,126 +894,132 @@ CONFIG_FB_CYBER2000=y
 # CONFIG_MDA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
 CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
 # CONFIG_FONTS is not set
 CONFIG_FONT_8x8=y
 CONFIG_FONT_8x16=y
-
-#
-# Logo configuration
-#
 CONFIG_LOGO=y
 # CONFIG_LOGO_LINUX_MONO is not set
 # CONFIG_LOGO_LINUX_VGA16 is not set
 CONFIG_LOGO_LINUX_CLUT224=y
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
-
-#
-# Sound
-#
 CONFIG_SOUND=m
-
-#
-# Advanced Linux Sound Architecture
-#
+CONFIG_SOUND_OSS_CORE=y
 # CONFIG_SND is not set
-
-#
-# Open Sound System
-#
 CONFIG_SOUND_PRIME=m
-# CONFIG_SOUND_BT878 is not set
-# CONFIG_SOUND_CMPCI is not set
-# CONFIG_SOUND_EMU10K1 is not set
-# CONFIG_SOUND_FUSION is not set
-# CONFIG_SOUND_CS4281 is not set
-# CONFIG_SOUND_ES1370 is not set
-# CONFIG_SOUND_ES1371 is not set
-# CONFIG_SOUND_ESSSOLO1 is not set
-# CONFIG_SOUND_MAESTRO is not set
-# CONFIG_SOUND_MAESTRO3 is not set
-# CONFIG_SOUND_ICH is not set
-# CONFIG_SOUND_SONICVIBES is not set
-# CONFIG_SOUND_TRIDENT is not set
 # CONFIG_SOUND_MSNDCLAS is not set
 # CONFIG_SOUND_MSNDPIN is not set
-# CONFIG_SOUND_VIA82CXXX is not set
 CONFIG_SOUND_OSS=m
 # CONFIG_SOUND_TRACEINIT is not set
 # CONFIG_SOUND_DMAP is not set
-# CONFIG_SOUND_AD1816 is not set
-# CONFIG_SOUND_AD1889 is not set
-# CONFIG_SOUND_SGALAXY is not set
-CONFIG_SOUND_ADLIB=m
-# CONFIG_SOUND_ACI_MIXER is not set
-# CONFIG_SOUND_CS4232 is not set
 # CONFIG_SOUND_SSCAPE is not set
-# CONFIG_SOUND_GUS is not set
 # CONFIG_SOUND_VMIDI is not set
 # CONFIG_SOUND_TRIX is not set
 # CONFIG_SOUND_MSS is not set
 # CONFIG_SOUND_MPU401 is not set
-# CONFIG_SOUND_NM256 is not set
-# CONFIG_SOUND_MAD16 is not set
 # CONFIG_SOUND_PAS is not set
 # CONFIG_SOUND_PSS is not set
 CONFIG_SOUND_SB=m
-# CONFIG_SOUND_AWE32_SYNTH is not set
-# CONFIG_SOUND_WAVEFRONT is not set
-# CONFIG_SOUND_MAUI is not set
 # CONFIG_SOUND_YM3812 is not set
-# CONFIG_SOUND_OPL3SA1 is not set
-# CONFIG_SOUND_OPL3SA2 is not set
-# CONFIG_SOUND_YMFPCI is not set
 # CONFIG_SOUND_UART6850 is not set
 # CONFIG_SOUND_AEDSP16 is not set
 # CONFIG_SOUND_KAHLUA is not set
-# CONFIG_SOUND_ALI5455 is not set
-# CONFIG_SOUND_FORTE is not set
-# CONFIG_SOUND_RME96XX is not set
-# CONFIG_SOUND_AD1980 is not set
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=y
+# CONFIG_HID_DEBUG is not set
+# CONFIG_HIDRAW is not set
+# CONFIG_HID_PID is not set
 
 #
-# USB support
+# Special HID drivers
 #
+CONFIG_HID_COMPAT=y
+CONFIG_USB_SUPPORT=y
 CONFIG_USB_ARCH_HAS_HCD=y
 CONFIG_USB_ARCH_HAS_OHCI=y
+CONFIG_USB_ARCH_HAS_EHCI=y
 # CONFIG_USB is not set
 
 #
-# USB Gadget Support
+# Enable Host or Gadget support to see Inventra options
 #
-# CONFIG_USB_GADGET is not set
 
 #
-# MMC/SD Card support
+# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;
 #
+# CONFIG_USB_GADGET is not set
+# CONFIG_UWB is not set
 # CONFIG_MMC is not set
+# CONFIG_MEMSTICK is not set
+# CONFIG_ACCESSIBILITY is not set
+# CONFIG_NEW_LEDS is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# SPI RTC drivers
+#
+
+#
+# Platform RTC drivers
+#
+CONFIG_RTC_DRV_CMOS=y
+# CONFIG_RTC_DRV_DS1286 is not set
+# CONFIG_RTC_DRV_DS1511 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T35 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_BQ4802 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+# CONFIG_DMADEVICES is not set
+# CONFIG_AUXDISPLAY is not set
+# CONFIG_REGULATOR is not set
+# CONFIG_UIO is not set
 
 #
 # File systems
 #
 CONFIG_EXT2_FS=y
 # CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
 CONFIG_EXT3_FS=y
 CONFIG_EXT3_FS_XATTR=y
 # CONFIG_EXT3_FS_POSIX_ACL is not set
 # CONFIG_EXT3_FS_SECURITY is not set
+# CONFIG_EXT4_FS is not set
 CONFIG_JBD=y
-# CONFIG_JBD_DEBUG is not set
 CONFIG_FS_MBCACHE=y
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
-
-#
-# XFS support
-#
+# CONFIG_FS_POSIX_ACL is not set
+CONFIG_FILE_LOCKING=y
 # CONFIG_XFS_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_ROMFS_FS is not set
-# CONFIG_QUOTA is not set
+# CONFIG_OCFS2_FS is not set
 CONFIG_DNOTIFY=y
+# CONFIG_INOTIFY is not set
+# CONFIG_QUOTA is not set
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
 
 #
 # CD-ROM/DVD Filesystems
@@ -834,14 +1043,12 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 # Pseudo filesystems
 #
 CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
 CONFIG_SYSFS=y
-CONFIG_DEVFS_FS=y
-CONFIG_DEVFS_MOUNT=y
-# CONFIG_DEVFS_DEBUG is not set
-# CONFIG_DEVPTS_FS_XATTR is not set
 # CONFIG_TMPFS is not set
 # CONFIG_HUGETLB_PAGE is not set
-CONFIG_RAMFS=y
+# CONFIG_CONFIGFS_FS is not set
 
 #
 # Miscellaneous filesystems
@@ -855,22 +1062,27 @@ CONFIG_RAMFS=y
 # CONFIG_EFS_FS is not set
 # CONFIG_CRAMFS is not set
 # CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_OMFS_FS is not set
 # CONFIG_HPFS_FS is not set
 # CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UFS_FS is not set
-
-#
-# Network File Systems
-#
-CONFIG_NFS_FS=m
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=y
 CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
 # CONFIG_NFS_V4 is not set
-# CONFIG_NFS_DIRECTIO is not set
-# CONFIG_NFSD is not set
-CONFIG_LOCKD=m
+CONFIG_NFSD=m
+# CONFIG_NFSD_V3 is not set
+# CONFIG_NFSD_V4 is not set
+CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
-CONFIG_SUNRPC=m
+CONFIG_EXPORTFS=m
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+# CONFIG_SUNRPC_REGISTER_V4 is not set
 # CONFIG_RPCSEC_GSS_KRB5 is not set
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
@@ -897,11 +1109,9 @@ CONFIG_MSDOS_PARTITION=y
 # CONFIG_SGI_PARTITION is not set
 # CONFIG_ULTRIX_PARTITION is not set
 # CONFIG_SUN_PARTITION is not set
+# CONFIG_KARMA_PARTITION is not set
 # CONFIG_EFI_PARTITION is not set
-
-#
-# Native Language Support
-#
+# CONFIG_SYSV68_PARTITION is not set
 CONFIG_NLS=m
 CONFIG_NLS_DEFAULT="iso8859-1"
 CONFIG_NLS_CODEPAGE_437=m
@@ -942,30 +1152,74 @@ CONFIG_NLS_ISO8859_1=m
 # CONFIG_NLS_KOI8_R is not set
 # CONFIG_NLS_KOI8_U is not set
 # CONFIG_NLS_UTF8 is not set
-
-#
-# Profiling support
-#
-# CONFIG_PROFILING is not set
+# CONFIG_DLM is not set
 
 #
 # Kernel hacking
 #
 # CONFIG_PRINTK_TIME is not set
-CONFIG_DEBUG_KERNEL=y
+# CONFIG_ENABLE_WARN_DEPRECATED is not set
+# CONFIG_ENABLE_MUST_CHECK is not set
+CONFIG_FRAME_WARN=1024
 # CONFIG_MAGIC_SYSRQ is not set
-CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_DETECT_SOFTLOCKUP=y
+# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
+CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
+# CONFIG_SCHED_DEBUG is not set
 # CONFIG_SCHEDSTATS is not set
+# CONFIG_TIMER_STATS is not set
+# CONFIG_DEBUG_OBJECTS is not set
 # CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
 # CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+# CONFIG_LOCK_STAT is not set
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
 # CONFIG_DEBUG_KOBJECT is not set
 CONFIG_DEBUG_BUGVERBOSE=y
 # CONFIG_DEBUG_INFO is not set
-# CONFIG_DEBUG_FS is not set
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_WRITECOUNT is not set
+CONFIG_DEBUG_MEMORY_INIT=y
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+# CONFIG_DEBUG_NOTIFIERS is not set
 CONFIG_FRAME_POINTER=y
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
+# CONFIG_BACKTRACE_SELF_TEST is not set
+# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_LATENCYTOP is not set
+# CONFIG_SYSCTL_SYSCALL_CHECK is not set
+CONFIG_HAVE_FUNCTION_TRACER=y
+
+#
+# Tracers
+#
+# CONFIG_FUNCTION_TRACER is not set
+# CONFIG_SCHED_TRACER is not set
+# CONFIG_CONTEXT_SWITCH_TRACER is not set
+# CONFIG_BOOT_TRACER is not set
+# CONFIG_TRACE_BRANCH_PROFILING is not set
+# CONFIG_STACK_TRACER is not set
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_KGDB is not set
 CONFIG_DEBUG_USER=y
 # CONFIG_DEBUG_ERRORS is not set
+# CONFIG_DEBUG_STACK_USAGE is not set
 # CONFIG_DEBUG_LL is not set
 
 #
@@ -973,19 +1227,23 @@ CONFIG_DEBUG_USER=y
 #
 # CONFIG_KEYS is not set
 # CONFIG_SECURITY is not set
-
-#
-# Cryptographic options
-#
+# CONFIG_SECURITYFS is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
 # CONFIG_CRYPTO is not set
 
-#
-# Hardware crypto devices
-#
-
 #
 # Library routines
 #
+CONFIG_BITREVERSE=y
+CONFIG_GENERIC_FIND_LAST_BIT=y
 # CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_T10DIF is not set
+# CONFIG_CRC_ITU_T is not set
 CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
 # CONFIG_LIBCRC32C is not set
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
index 03f783e696b3a028d9b57acc5e3a31c991ffca44..685d2b5132063ace25750c98b791c8b4b1316d11 100644 (file)
@@ -89,7 +89,6 @@ CONFIG_ARCH_SA1100=y
 # CONFIG_SA1100_COLLIE is not set
 # CONFIG_SA1100_H3100 is not set
 # CONFIG_SA1100_H3600 is not set
-# CONFIG_SA1100_H3800 is not set
 # CONFIG_SA1100_BADGE4 is not set
 # CONFIG_SA1100_JORNADA720 is not set
 # CONFIG_SA1100_HACKKIT is not set
index 6cbd8fdc9f1fee5e83ffbe50fc125242503f0bae..bfb0cb9aaa97730b8271594d4fb9439060e000d5 100644 (file)
 # endif
 #endif
 
+#if defined(CONFIG_CPU_MOHAWK)
+# ifdef _CACHE
+#  define MULTI_CACHE 1
+# else
+#  define _CACHE mohawk
+# endif
+#endif
+
 #if defined(CONFIG_CPU_FEROCEON)
 # define MULTI_CACHE 1
 #endif
index 22cb14ec3438e9d74b1fa8f626bb65945c2d4607..ff46dfa68a97f99c3c3db8854dac35d31b062dbd 100644 (file)
  * must not be used by drivers.
  */
 #ifndef __arch_page_to_dma
+
+#if !defined(CONFIG_HIGHMEM)
 static inline dma_addr_t page_to_dma(struct device *dev, struct page *page)
 {
        return (dma_addr_t)__virt_to_bus((unsigned long)page_address(page));
 }
+#elif defined(__pfn_to_bus)
+static inline dma_addr_t page_to_dma(struct device *dev, struct page *page)
+{
+       return (dma_addr_t)__pfn_to_bus(page_to_pfn(page));
+}
+#else
+#error "this machine class needs to define __arch_page_to_dma to use HIGHMEM"
+#endif
 
 static inline void *dma_to_virt(struct device *dev, dma_addr_t addr)
 {
@@ -57,6 +67,8 @@ static inline dma_addr_t virt_to_dma(struct device *dev, void *addr)
  * Use the driver DMA support - see dma-mapping.h (dma_sync_*)
  */
 extern void dma_cache_maint(const void *kaddr, size_t size, int rw);
+extern void dma_cache_maint_page(struct page *page, unsigned long offset,
+                                size_t size, int rw);
 
 /*
  * Return whether the given device DMA address mask can be supported
@@ -316,7 +328,7 @@ static inline dma_addr_t dma_map_page(struct device *dev, struct page *page,
        BUG_ON(!valid_dma_direction(dir));
 
        if (!arch_is_coherent())
-               dma_cache_maint(page_address(page) + offset, size, dir);
+               dma_cache_maint_page(page, offset, size, dir);
 
        return page_to_dma(dev, page) + offset;
 }
index df5638f3643aea42d72d0a04d20284ca36995c70..7edf3536df24e68a27399051046229d70c681fb2 100644 (file)
 #include <asm/system.h>
 #include <asm/scatterlist.h>
 
-typedef unsigned int dmach_t;
-
 #include <mach/isa-dma.h>
 
 /*
- * DMA modes
+ * The DMA modes reflect the settings for the ISA DMA controller
  */
-typedef unsigned int dmamode_t;
-
-#define DMA_MODE_MASK  3
+#define DMA_MODE_MASK   0xcc
 
-#define DMA_MODE_READ   0
-#define DMA_MODE_WRITE  1
-#define DMA_MODE_CASCADE 2
-#define DMA_AUTOINIT    4
+#define DMA_MODE_READ   0x44
+#define DMA_MODE_WRITE  0x48
+#define DMA_MODE_CASCADE 0xc0
+#define DMA_AUTOINIT    0x10
 
 extern spinlock_t  dma_spin_lock;
 
@@ -52,44 +48,44 @@ static inline void release_dma_lock(unsigned long flags)
 /* Clear the 'DMA Pointer Flip Flop'.
  * Write 0 for LSB/MSB, 1 for MSB/LSB access.
  */
-#define clear_dma_ff(channel)
+#define clear_dma_ff(chan)
 
 /* Set only the page register bits of the transfer address.
  *
  * NOTE: This is an architecture specific function, and should
  *       be hidden from the drivers
  */
-extern void set_dma_page(dmach_t channel, char pagenr);
+extern void set_dma_page(unsigned int chan, char pagenr);
 
 /* Request a DMA channel
  *
  * Some architectures may need to do allocate an interrupt
  */
-extern int  request_dma(dmach_t channel, const char * device_id);
+extern int  request_dma(unsigned int chan, const char * device_id);
 
 /* Free a DMA channel
  *
  * Some architectures may need to do free an interrupt
  */
-extern void free_dma(dmach_t channel);
+extern void free_dma(unsigned int chan);
 
 /* Enable DMA for this channel
  *
  * On some architectures, this may have other side effects like
  * enabling an interrupt and setting the DMA registers.
  */
-extern void enable_dma(dmach_t channel);
+extern void enable_dma(unsigned int chan);
 
 /* Disable DMA for this channel
  *
  * On some architectures, this may have other side effects like
  * disabling an interrupt or whatever.
  */
-extern void disable_dma(dmach_t channel);
+extern void disable_dma(unsigned int chan);
 
 /* Test whether the specified channel has an active DMA transfer
  */
-extern int dma_channel_active(dmach_t channel);
+extern int dma_channel_active(unsigned int chan);
 
 /* Set the DMA scatter gather list for this channel
  *
@@ -97,7 +93,7 @@ extern int dma_channel_active(dmach_t channel);
  * especially since some DMA architectures don't update the
  * DMA address immediately, but defer it to the enable_dma().
  */
-extern void set_dma_sg(dmach_t channel, struct scatterlist *sg, int nr_sg);
+extern void set_dma_sg(unsigned int chan, struct scatterlist *sg, int nr_sg);
 
 /* Set the DMA address for this channel
  *
@@ -105,9 +101,9 @@ extern void set_dma_sg(dmach_t channel, struct scatterlist *sg, int nr_sg);
  * especially since some DMA architectures don't update the
  * DMA address immediately, but defer it to the enable_dma().
  */
-extern void __set_dma_addr(dmach_t channel, void *addr);
-#define set_dma_addr(channel, addr)                            \
-       __set_dma_addr(channel, bus_to_virt(addr))
+extern void __set_dma_addr(unsigned int chan, void *addr);
+#define set_dma_addr(chan, addr)                               \
+       __set_dma_addr(chan, bus_to_virt(addr))
 
 /* Set the DMA byte count for this channel
  *
@@ -115,7 +111,7 @@ extern void __set_dma_addr(dmach_t channel, void *addr);
  * especially since some DMA architectures don't update the
  * DMA count immediately, but defer it to the enable_dma().
  */
-extern void set_dma_count(dmach_t channel, unsigned long count);
+extern void set_dma_count(unsigned int chan, unsigned long count);
 
 /* Set the transfer direction for this channel
  *
@@ -124,11 +120,11 @@ extern void set_dma_count(dmach_t channel, unsigned long count);
  * DMA transfer direction immediately, but defer it to the
  * enable_dma().
  */
-extern void set_dma_mode(dmach_t channel, dmamode_t mode);
+extern void set_dma_mode(unsigned int chan, unsigned int mode);
 
 /* Set the transfer speed for this channel
  */
-extern void set_dma_speed(dmach_t channel, int cycle_ns);
+extern void set_dma_speed(unsigned int chan, int cycle_ns);
 
 /* Get DMA residue count. After a DMA transfer, this
  * should return zero. Reading this while a DMA transfer is
@@ -136,7 +132,7 @@ extern void set_dma_speed(dmach_t channel, int cycle_ns);
  * If called before the channel has been used, it may return 1.
  * Otherwise, it returns the number of _bytes_ left to transfer.
  */
-extern int  get_dma_residue(dmach_t channel);
+extern int  get_dma_residue(unsigned int chan);
 
 #ifndef NO_DMA
 #define NO_DMA 255
index a58378c343b9d3143f5e0116808b2bd1f690ba41..def8eac6e89d42dbb55078e463d1dc8c07a6bf07 100644 (file)
@@ -50,6 +50,7 @@ typedef struct user_fp elf_fpregset_t;
 #define R_ARM_ABS32    2
 #define R_ARM_CALL     28
 #define R_ARM_JUMP24   29
+#define R_ARM_PREL31   42
 
 /*
  * These are used to set parameters in the core dumps.
diff --git a/arch/arm/include/asm/fixmap.h b/arch/arm/include/asm/fixmap.h
new file mode 100644 (file)
index 0000000..bbae919
--- /dev/null
@@ -0,0 +1,41 @@
+#ifndef _ASM_FIXMAP_H
+#define _ASM_FIXMAP_H
+
+/*
+ * Nothing too fancy for now.
+ *
+ * On ARM we already have well known fixed virtual addresses imposed by
+ * the architecture such as the vector page which is located at 0xffff0000,
+ * therefore a second level page table is already allocated covering
+ * 0xfff00000 upwards.
+ *
+ * The cache flushing code in proc-xscale.S uses the virtual area between
+ * 0xfffe0000 and 0xfffeffff.
+ */
+
+#define FIXADDR_START          0xfff00000UL
+#define FIXADDR_TOP            0xfffe0000UL
+#define FIXADDR_SIZE           (FIXADDR_TOP - FIXADDR_START)
+
+#define FIX_KMAP_BEGIN         0
+#define FIX_KMAP_END           (FIXADDR_SIZE >> PAGE_SHIFT)
+
+#define __fix_to_virt(x)       (FIXADDR_START + ((x) << PAGE_SHIFT))
+#define __virt_to_fix(x)       (((x) - FIXADDR_START) >> PAGE_SHIFT)
+
+extern void __this_fixmap_does_not_exist(void);
+
+static inline unsigned long fix_to_virt(const unsigned int idx)
+{
+       if (idx >= FIX_KMAP_END)
+               __this_fixmap_does_not_exist();
+       return __fix_to_virt(idx);
+}
+
+static inline unsigned int virt_to_fix(const unsigned long vaddr)
+{
+       BUG_ON(vaddr >= FIXADDR_TOP || vaddr < FIXADDR_START);
+       return __virt_to_fix(vaddr);
+}
+
+#endif
diff --git a/arch/arm/include/asm/highmem.h b/arch/arm/include/asm/highmem.h
new file mode 100644 (file)
index 0000000..7f36d00
--- /dev/null
@@ -0,0 +1,31 @@
+#ifndef _ASM_HIGHMEM_H
+#define _ASM_HIGHMEM_H
+
+#include <asm/kmap_types.h>
+
+#define PKMAP_BASE             (PAGE_OFFSET - PMD_SIZE)
+#define LAST_PKMAP             PTRS_PER_PTE
+#define LAST_PKMAP_MASK                (LAST_PKMAP - 1)
+#define PKMAP_NR(virt)         (((virt) - PKMAP_BASE) >> PAGE_SHIFT)
+#define PKMAP_ADDR(nr)         (PKMAP_BASE + ((nr) << PAGE_SHIFT))
+
+#define kmap_prot              PAGE_KERNEL
+
+#define flush_cache_kmaps()    flush_cache_all()
+
+extern pte_t *pkmap_page_table;
+
+#define ARCH_NEEDS_KMAP_HIGH_GET
+
+extern void *kmap_high(struct page *page);
+extern void *kmap_high_get(struct page *page);
+extern void kunmap_high(struct page *page);
+
+extern void *kmap(struct page *page);
+extern void kunmap(struct page *page);
+extern void *kmap_atomic(struct page *page, enum km_type type);
+extern void kunmap_atomic(void *kvaddr, enum km_type type);
+extern void *kmap_atomic_pfn(unsigned long pfn, enum km_type type);
+extern struct page *kmap_atomic_to_page(const void *ptr);
+
+#endif
index bda489f9f01739c4543ca9c2f99b1ede6a739a9f..f7bd52b1c3654430351a5b7c5f2665e527979908 100644 (file)
@@ -17,6 +17,8 @@
 #define HWCAP_CRUNCH   1024
 #define HWCAP_THUMBEE  2048
 #define HWCAP_NEON     4096
+#define HWCAP_VFPv3    8192
+#define HWCAP_VFPv3D16 16384
 
 #if defined(__KERNEL__) && !defined(__ASSEMBLY__)
 /*
index 45def13ee17a5fc4150a92173f57f556679faee5..d16ec97ec9a9948fbb7de727164a006bfe6eeae7 100644 (file)
@@ -18,6 +18,7 @@ enum km_type {
        KM_IRQ1,
        KM_SOFTIRQ0,
        KM_SOFTIRQ1,
+       KM_L2_CACHE,
        KM_TYPE_NR
 };
 
index fc7278ea7146798d50c0dfb219bae5db025fefab..9e614a18e680d964734ffbe257d595b129b3acad 100644 (file)
@@ -15,13 +15,13 @@ struct dma_struct;
 typedef struct dma_struct dma_t;
 
 struct dma_ops {
-       int     (*request)(dmach_t, dma_t *);           /* optional */
-       void    (*free)(dmach_t, dma_t *);              /* optional */
-       void    (*enable)(dmach_t, dma_t *);            /* mandatory */
-       void    (*disable)(dmach_t, dma_t *);           /* mandatory */
-       int     (*residue)(dmach_t, dma_t *);           /* optional */
-       int     (*setspeed)(dmach_t, dma_t *, int);     /* optional */
-       char    *type;
+       int     (*request)(unsigned int, dma_t *);              /* optional */
+       void    (*free)(unsigned int, dma_t *);                 /* optional */
+       void    (*enable)(unsigned int, dma_t *);               /* mandatory */
+       void    (*disable)(unsigned int, dma_t *);              /* mandatory */
+       int     (*residue)(unsigned int, dma_t *);              /* optional */
+       int     (*setspeed)(unsigned int, dma_t *, int);        /* optional */
+       const char *type;
 };
 
 struct dma_struct {
@@ -34,24 +34,21 @@ struct dma_struct {
        unsigned int    active:1;       /* Transfer active              */
        unsigned int    invalid:1;      /* Address/Count changed        */
 
-       dmamode_t       dma_mode;       /* DMA mode                     */
+       unsigned int    dma_mode;       /* DMA mode                     */
        int             speed;          /* DMA speed                    */
 
        unsigned int    lock;           /* Device is allocated          */
        const char      *device_id;     /* Device name                  */
 
-       unsigned int    dma_base;       /* Controller base address      */
-       int             dma_irq;        /* Controller IRQ               */
-       struct scatterlist cur_sg;      /* Current controller buffer    */
-       unsigned int    state;
-
-       struct dma_ops  *d_ops;
+       const struct dma_ops *d_ops;
 };
 
-/* Prototype: void arch_dma_init(dma)
- * Purpose  : Initialise architecture specific DMA
- * Params   : dma - pointer to array of DMA structures
+/*
+ * isa_dma_add - add an ISA-style DMA channel
  */
-extern void arch_dma_init(dma_t *dma);
+extern int isa_dma_add(unsigned int, dma_t *dma);
 
-extern void isa_init_dma(dma_t *dma);
+/*
+ * Add the ISA DMA controller.  Always takes channels 0-7.
+ */
+extern void isa_init_dma(void);
index 39d949b63e80bc0cb23a59b086a2bb24711493ef..58cf91f38e6f5f798ff571ea73e9112f6c049b68 100644 (file)
@@ -26,6 +26,7 @@ struct map_desc {
 #define MT_HIGH_VECTORS                8
 #define MT_MEMORY              9
 #define MT_ROM                 10
+#define MT_MEMORY_NONCACHED    11
 
 #ifdef CONFIG_MMU
 extern void iotable_init(struct map_desc *, int);
index 0202a7c20e629fb7be94f58b9705e5268db6554e..85763db87449f4f4c62947e30a2b6b0cf9a43e9e 100644 (file)
  * The module space lives between the addresses given by TASK_SIZE
  * and PAGE_OFFSET - it must be within 32MB of the kernel text.
  */
-#define MODULES_END            (PAGE_OFFSET)
-#define MODULES_VADDR          (MODULES_END - 16*1048576)
-
+#define MODULES_VADDR          (PAGE_OFFSET - 16*1024*1024)
 #if TASK_SIZE > MODULES_VADDR
 #error Top of user space clashes with start of module space
 #endif
 
+/*
+ * The highmem pkmap virtual space shares the end of the module area.
+ */
+#ifdef CONFIG_HIGHMEM
+#define MODULES_END            (PAGE_OFFSET - PMD_SIZE)
+#else
+#define MODULES_END            (PAGE_OFFSET)
+#endif
+
 /*
  * The XIP kernel gets mapped at the bottom of the module vm area.
  * Since we use sections to map it, this macro replaces the physical address
@@ -181,6 +188,7 @@ static inline void *phys_to_virt(unsigned long x)
 #ifndef __virt_to_bus
 #define __virt_to_bus  __virt_to_phys
 #define __bus_to_virt  __phys_to_virt
+#define __pfn_to_bus(x)        ((x) << PAGE_SHIFT)
 #endif
 
 static inline __deprecated unsigned long virt_to_bus(void *x)
index 24b168dc31a3e057da7ee31f3db29aef4b81d145..e4dfa69abb68fa4868eaaacd2bdd67b83876704e 100644 (file)
@@ -1,15 +1,27 @@
 #ifndef _ASM_ARM_MODULE_H
 #define _ASM_ARM_MODULE_H
 
-struct mod_arch_specific
-{
-       int foo;
-};
-
 #define Elf_Shdr       Elf32_Shdr
 #define Elf_Sym                Elf32_Sym
 #define Elf_Ehdr       Elf32_Ehdr
 
+struct unwind_table;
+
+struct mod_arch_specific
+{
+#ifdef CONFIG_ARM_UNWIND
+       Elf_Shdr *unw_sec_init;
+       Elf_Shdr *unw_sec_devinit;
+       Elf_Shdr *unw_sec_core;
+       Elf_Shdr *sec_init_text;
+       Elf_Shdr *sec_devinit_text;
+       Elf_Shdr *sec_core_text;
+       struct unwind_table *unwind_init;
+       struct unwind_table *unwind_devinit;
+       struct unwind_table *unwind_core;
+#endif
+};
+
 /*
  * Include the ARM architecture version.
  */
index db80203b68e0a380ee84dfbab9cc60c279adbfad..c6250311550b7ad7d4408a8e878f7e87a7144ed1 100644 (file)
 #   define CPU_NAME cpu_xsc3
 #  endif
 # endif
+# ifdef CONFIG_CPU_MOHAWK
+#  ifdef CPU_NAME
+#   undef  MULTI_CPU
+#   define MULTI_CPU
+#  else
+#   define CPU_NAME cpu_mohawk
+#  endif
+# endif
 # ifdef CONFIG_CPU_FEROCEON
 #  ifdef CPU_NAME
 #   undef  MULTI_CPU
index 73192618f1c2d8d0816f274a71cb626ee26d8223..236a06b9b7ce0e9e4bb11caa5a48e48759a59ef7 100644 (file)
@@ -27,6 +27,8 @@
 /* PTRACE_SYSCALL is 24 */
 #define PTRACE_GETCRUNCHREGS   25
 #define PTRACE_SETCRUNCHREGS   26
+#define PTRACE_GETVFPREGS      27
+#define PTRACE_SETVFPREGS      28
 
 /*
  * PSR bits
index 503843db15652b242a0952dc47fb015489485a51..c10d1aa4b48728aae12cf45764e8bb62a6b1f5e8 100644 (file)
@@ -43,6 +43,7 @@
 #define SZ_8M                           0x00800000
 #define SZ_16M                          0x01000000
 #define SZ_32M                          0x02000000
+#define SZ_48M                          0x03000000
 #define SZ_64M                          0x04000000
 #define SZ_128M                         0x08000000
 #define SZ_256M                         0x10000000
diff --git a/arch/arm/include/asm/stacktrace.h b/arch/arm/include/asm/stacktrace.h
new file mode 100644 (file)
index 0000000..4d0a164
--- /dev/null
@@ -0,0 +1,15 @@
+#ifndef __ASM_STACKTRACE_H
+#define __ASM_STACKTRACE_H
+
+struct stackframe {
+       unsigned long fp;
+       unsigned long sp;
+       unsigned long lr;
+       unsigned long pc;
+};
+
+extern int unwind_frame(struct stackframe *frame);
+extern void walk_stackframe(struct stackframe *frame,
+                           int (*fn)(struct stackframe *, void *), void *data);
+
+#endif /* __ASM_STACKTRACE_H */
index 811be55f338e947ba362c8c932d2cf76d0dffd5e..0a0d49ae1e6dd59c0a7c16bc462c2dbd71029846 100644 (file)
@@ -97,8 +97,8 @@ extern void __show_regs(struct pt_regs *);
 extern int cpu_architecture(void);
 extern void cpu_init(void);
 
-void arm_machine_restart(char mode);
-extern void (*arm_pm_restart)(char str);
+void arm_machine_restart(char mode, const char *cmd);
+extern void (*arm_pm_restart)(char str, const char *cmd);
 
 #define UDBG_UNDEFINED (1 << 0)
 #define UDBG_SYSCALL   (1 << 1)
index 68b9ec82a37ffa1e77e2836e955663ff83b675fc..4f8848260ee2b85b4256b9762aeb7ce68e29ef38 100644 (file)
@@ -99,6 +99,8 @@ static inline struct thread_info *current_thread_info(void)
 
 #define thread_saved_pc(tsk)   \
        ((unsigned long)(task_thread_info(tsk)->cpu_context.pc))
+#define thread_saved_sp(tsk)   \
+       ((unsigned long)(task_thread_info(tsk)->cpu_context.sp))
 #define thread_saved_fp(tsk)   \
        ((unsigned long)(task_thread_info(tsk)->cpu_context.fp))
 
@@ -113,6 +115,8 @@ extern void iwmmxt_task_restore(struct thread_info *, void *);
 extern void iwmmxt_task_release(struct thread_info *);
 extern void iwmmxt_task_switch(struct thread_info *);
 
+extern void vfp_sync_state(struct thread_info *thread);
+
 #endif
 
 /*
index aa399aec568ef02533c2d6694f192f91a8446ab5..491960bf42602e9c509a32d382815a42b3089047 100644 (file)
@@ -25,5 +25,6 @@ static inline int in_exception_text(unsigned long ptr)
 }
 
 extern void __init early_trap_init(void);
+extern void dump_backtrace_entry(unsigned long where, unsigned long from, unsigned long frame);
 
 #endif
diff --git a/arch/arm/include/asm/unwind.h b/arch/arm/include/asm/unwind.h
new file mode 100644 (file)
index 0000000..a5edf42
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * arch/arm/include/asm/unwind.h
+ *
+ * Copyright (C) 2008 ARM Limited
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef __ASM_UNWIND_H
+#define __ASM_UNWIND_H
+
+#ifndef __ASSEMBLY__
+
+/* Unwind reason code according the the ARM EABI documents */
+enum unwind_reason_code {
+       URC_OK = 0,                     /* operation completed successfully */
+       URC_CONTINUE_UNWIND = 8,
+       URC_FAILURE = 9                 /* unspecified failure of some kind */
+};
+
+struct unwind_idx {
+       unsigned long addr;
+       unsigned long insn;
+};
+
+struct unwind_table {
+       struct list_head list;
+       struct unwind_idx *start;
+       struct unwind_idx *stop;
+       unsigned long begin_addr;
+       unsigned long end_addr;
+};
+
+extern struct unwind_table *unwind_table_add(unsigned long start,
+                                            unsigned long size,
+                                            unsigned long text_addr,
+                                            unsigned long text_size);
+extern void unwind_table_del(struct unwind_table *tab);
+extern void unwind_backtrace(struct pt_regs *regs, struct task_struct *tsk);
+
+#ifdef CONFIG_ARM_UNWIND
+extern int __init unwind_init(void);
+#else
+static inline int __init unwind_init(void)
+{
+       return 0;
+}
+#endif
+
+#endif /* !__ASSEMBLY__ */
+
+#ifdef CONFIG_ARM_UNWIND
+#define UNWIND(code...)                code
+#else
+#define UNWIND(code...)
+#endif
+
+#endif /* __ASM_UNWIND_H */
index 825c1e7c582d9adef9263c1135754bb1d1f5ae5e..df95e050f9dd75ea6305417e221574e55993bd9c 100644 (file)
@@ -81,4 +81,13 @@ struct user{
 #define HOST_TEXT_START_ADDR (u.start_code)
 #define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
 
+/*
+ * User specific VFP registers. If only VFPv2 is present, registers 16 to 31
+ * are ignored by the ptrace system call.
+ */
+struct user_vfp {
+       unsigned long long fpregs[32];
+       unsigned long fpscr;
+};
+
 #endif /* _ARM_USER_H */
index 4305345987d3d1c45a018d8ca089b8ab182bd895..11a5197a221f74da0303581fa787814a9c46f904 100644 (file)
@@ -29,12 +29,14 @@ obj-$(CONFIG_ATAGS_PROC)    += atags.o
 obj-$(CONFIG_OABI_COMPAT)      += sys_oabi-compat.o
 obj-$(CONFIG_ARM_THUMBEE)      += thumbee.o
 obj-$(CONFIG_KGDB)             += kgdb.o
+obj-$(CONFIG_ARM_UNWIND)       += unwind.o
 
 obj-$(CONFIG_CRUNCH)           += crunch.o crunch-bits.o
 AFLAGS_crunch-bits.o           := -Wa,-mcpu=ep9312
 
 obj-$(CONFIG_CPU_XSCALE)       += xscale-cp0.o
 obj-$(CONFIG_CPU_XSC3)         += xscale-cp0.o
+obj-$(CONFIG_CPU_MOHAWK)       += xscale-cp0.o
 obj-$(CONFIG_IWMMXT)           += iwmmxt.o
 AFLAGS_iwmmxt.o                        := -Wa,-mcpu=iwmmxt
 
index f53c582905430af58b91341e952e1fe180a022c8..b121b6053cce4e74a1b650c6bc83665920225ede 100644 (file)
 1002:
                .endm
 
+#elif defined(CONFIG_CPU_XSCALE)
+
+               .macro  addruart, rx
+               .endm
+
+               .macro  senduart, rd, rx
+               mcr     p14, 0, \rd, c8, c0, 0
+               .endm
+
+               .macro  busyuart, rd, rx
+1001:
+               mrc     p14, 0, \rx, c14, c0, 0
+               tst     \rx, #0x10000000
+               beq     1001b
+               .endm
+
+               .macro  waituart, rd, rx
+               mov     \rd, #0x10000000
+1001:
+               subs    \rd, \rd, #1
+               bmi     1002f
+               mrc     p14, 0, \rx, c14, c0, 0
+               tst     \rx, #0x10000000
+               bne     1001b
+1002:
+               .endm
+
 #else
 
                .macro  addruart, rx
index 4a3a50495c60778c813acbf192b1fa16475a995d..0e88e46fc7321753f064c6996528d7a81bea0ee4 100644 (file)
 #include <asm/dma.h>
 #include <asm/mach/dma.h>
 
-#define ISA_DMA_MODE_READ      0x44
-#define ISA_DMA_MODE_WRITE     0x48
-#define ISA_DMA_MODE_CASCADE   0xc0
-#define ISA_DMA_AUTOINIT       0x10
-
 #define ISA_DMA_MASK           0
 #define ISA_DMA_MODE           1
 #define ISA_DMA_CLRFF          2
@@ -49,38 +44,35 @@ static unsigned int isa_dma_port[8][7] = {
        {  0xd4,  0xd6,  0xd8,  0x48a,  0x08a,  0xcc, 0xce }
 };
 
-static int isa_get_dma_residue(dmach_t channel, dma_t *dma)
+static int isa_get_dma_residue(unsigned int chan, dma_t *dma)
 {
-       unsigned int io_port = isa_dma_port[channel][ISA_DMA_COUNT];
+       unsigned int io_port = isa_dma_port[chan][ISA_DMA_COUNT];
        int count;
 
        count = 1 + inb(io_port);
        count |= inb(io_port) << 8;
 
-       return channel < 4 ? count : (count << 1);
+       return chan < 4 ? count : (count << 1);
 }
 
-static void isa_enable_dma(dmach_t channel, dma_t *dma)
+static void isa_enable_dma(unsigned int chan, dma_t *dma)
 {
        if (dma->invalid) {
                unsigned long address, length;
                unsigned int mode;
                enum dma_data_direction direction;
 
-               mode = channel & 3;
+               mode = (chan & 3) | dma->dma_mode;
                switch (dma->dma_mode & DMA_MODE_MASK) {
                case DMA_MODE_READ:
-                       mode |= ISA_DMA_MODE_READ;
                        direction = DMA_FROM_DEVICE;
                        break;
 
                case DMA_MODE_WRITE:
-                       mode |= ISA_DMA_MODE_WRITE;
                        direction = DMA_TO_DEVICE;
                        break;
 
                case DMA_MODE_CASCADE:
-                       mode |= ISA_DMA_MODE_CASCADE;
                        direction = DMA_BIDIRECTIONAL;
                        break;
 
@@ -105,34 +97,31 @@ static void isa_enable_dma(dmach_t channel, dma_t *dma)
                address = dma->buf.dma_address;
                length  = dma->buf.length - 1;
 
-               outb(address >> 16, isa_dma_port[channel][ISA_DMA_PGLO]);
-               outb(address >> 24, isa_dma_port[channel][ISA_DMA_PGHI]);
+               outb(address >> 16, isa_dma_port[chan][ISA_DMA_PGLO]);
+               outb(address >> 24, isa_dma_port[chan][ISA_DMA_PGHI]);
 
-               if (channel >= 4) {
+               if (chan >= 4) {
                        address >>= 1;
                        length >>= 1;
                }
 
-               outb(0, isa_dma_port[channel][ISA_DMA_CLRFF]);
-
-               outb(address, isa_dma_port[channel][ISA_DMA_ADDR]);
-               outb(address >> 8, isa_dma_port[channel][ISA_DMA_ADDR]);
+               outb(0, isa_dma_port[chan][ISA_DMA_CLRFF]);
 
-               outb(length, isa_dma_port[channel][ISA_DMA_COUNT]);
-               outb(length >> 8, isa_dma_port[channel][ISA_DMA_COUNT]);
+               outb(address, isa_dma_port[chan][ISA_DMA_ADDR]);
+               outb(address >> 8, isa_dma_port[chan][ISA_DMA_ADDR]);
 
-               if (dma->dma_mode & DMA_AUTOINIT)
-                       mode |= ISA_DMA_AUTOINIT;
+               outb(length, isa_dma_port[chan][ISA_DMA_COUNT]);
+               outb(length >> 8, isa_dma_port[chan][ISA_DMA_COUNT]);
 
-               outb(mode, isa_dma_port[channel][ISA_DMA_MODE]);
+               outb(mode, isa_dma_port[chan][ISA_DMA_MODE]);
                dma->invalid = 0;
        }
-       outb(channel & 3, isa_dma_port[channel][ISA_DMA_MASK]);
+       outb(chan & 3, isa_dma_port[chan][ISA_DMA_MASK]);
 }
 
-static void isa_disable_dma(dmach_t channel, dma_t *dma)
+static void isa_disable_dma(unsigned int chan, dma_t *dma)
 {
-       outb(channel | 4, isa_dma_port[channel][ISA_DMA_MASK]);
+       outb(chan | 4, isa_dma_port[chan][ISA_DMA_MASK]);
 }
 
 static struct dma_ops isa_dma_ops = {
@@ -160,7 +149,12 @@ static struct resource dma_resources[] = { {
        .end    = 0x048f
 } };
 
-void __init isa_init_dma(dma_t *dma)
+static dma_t isa_dma[8];
+
+/*
+ * ISA DMA always starts at channel 0
+ */
+void __init isa_init_dma(void)
 {
        /*
         * Try to autodetect presence of an ISA DMA controller.
@@ -178,11 +172,11 @@ void __init isa_init_dma(dma_t *dma)
        outb(0xaa, 0x00);
 
        if (inb(0) == 0x55 && inb(0) == 0xaa) {
-               int channel, i;
+               unsigned int chan, i;
 
-               for (channel = 0; channel < 8; channel++) {
-                       dma[channel].d_ops = &isa_dma_ops;
-                       isa_disable_dma(channel, NULL);
+               for (chan = 0; chan < 8; chan++) {
+                       isa_dma[chan].d_ops = &isa_dma_ops;
+                       isa_disable_dma(chan, NULL);
                }
 
                outb(0x40, 0x0b);
@@ -217,5 +211,12 @@ void __init isa_init_dma(dma_t *dma)
 
                for (i = 0; i < ARRAY_SIZE(dma_resources); i++)
                        request_resource(&ioport_resource, dma_resources + i);
+
+               for (chan = 0; chan < 8; chan++) {
+                       int ret = isa_dma_add(chan, &isa_dma[chan]);
+                       if (ret)
+                               printk(KERN_ERR "ISADMA%u: unable to register: %d\n",
+                                       chan, ret);
+               }
        }
 }
index d006085ed7e7b882966510d09695fbb4b1a6091a..7d5b9fb01e71d9d5b9e8dab4e62d3302fd3fde79 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/init.h>
 #include <linux/spinlock.h>
 #include <linux/errno.h>
+#include <linux/scatterlist.h>
 
 #include <asm/dma.h>
 
 DEFINE_SPINLOCK(dma_spin_lock);
 EXPORT_SYMBOL(dma_spin_lock);
 
-static dma_t dma_chan[MAX_DMA_CHANNELS];
+static dma_t *dma_chan[MAX_DMA_CHANNELS];
+
+static inline dma_t *dma_channel(unsigned int chan)
+{
+       if (chan >= MAX_DMA_CHANNELS)
+               return NULL;
+
+       return dma_chan[chan];
+}
+
+int __init isa_dma_add(unsigned int chan, dma_t *dma)
+{
+       if (!dma->d_ops)
+               return -EINVAL;
+
+       sg_init_table(&dma->buf, 1);
+
+       if (dma_chan[chan])
+               return -EBUSY;
+       dma_chan[chan] = dma;
+       return 0;
+}
 
 /*
  * Request DMA channel
  *
  * On certain platforms, we have to allocate an interrupt as well...
  */
-int request_dma(dmach_t channel, const char *device_id)
+int request_dma(unsigned int chan, const char *device_id)
 {
-       dma_t *dma = dma_chan + channel;
+       dma_t *dma = dma_channel(chan);
        int ret;
 
-       if (channel >= MAX_DMA_CHANNELS || !dma->d_ops)
+       if (!dma)
                goto bad_dma;
 
        if (xchg(&dma->lock, 1) != 0)
@@ -47,7 +69,7 @@ int request_dma(dmach_t channel, const char *device_id)
 
        ret = 0;
        if (dma->d_ops->request)
-               ret = dma->d_ops->request(channel, dma);
+               ret = dma->d_ops->request(chan, dma);
 
        if (ret)
                xchg(&dma->lock, 0);
@@ -55,7 +77,7 @@ int request_dma(dmach_t channel, const char *device_id)
        return ret;
 
 bad_dma:
-       printk(KERN_ERR "dma: trying to allocate DMA%d\n", channel);
+       printk(KERN_ERR "dma: trying to allocate DMA%d\n", chan);
        return -EINVAL;
 
 busy:
@@ -68,42 +90,42 @@ EXPORT_SYMBOL(request_dma);
  *
  * On certain platforms, we have to free interrupt as well...
  */
-void free_dma(dmach_t channel)
+void free_dma(unsigned int chan)
 {
-       dma_t *dma = dma_chan + channel;
+       dma_t *dma = dma_channel(chan);
 
-       if (channel >= MAX_DMA_CHANNELS || !dma->d_ops)
+       if (!dma)
                goto bad_dma;
 
        if (dma->active) {
-               printk(KERN_ERR "dma%d: freeing active DMA\n", channel);
-               dma->d_ops->disable(channel, dma);
+               printk(KERN_ERR "dma%d: freeing active DMA\n", chan);
+               dma->d_ops->disable(chan, dma);
                dma->active = 0;
        }
 
        if (xchg(&dma->lock, 0) != 0) {
                if (dma->d_ops->free)
-                       dma->d_ops->free(channel, dma);
+                       dma->d_ops->free(chan, dma);
                return;
        }
 
-       printk(KERN_ERR "dma%d: trying to free free DMA\n", channel);
+       printk(KERN_ERR "dma%d: trying to free free DMA\n", chan);
        return;
 
 bad_dma:
-       printk(KERN_ERR "dma: trying to free DMA%d\n", channel);
+       printk(KERN_ERR "dma: trying to free DMA%d\n", chan);
 }
 EXPORT_SYMBOL(free_dma);
 
 /* Set DMA Scatter-Gather list
  */
-void set_dma_sg (dmach_t channel, struct scatterlist *sg, int nr_sg)
+void set_dma_sg (unsigned int chan, struct scatterlist *sg, int nr_sg)
 {
-       dma_t *dma = dma_chan + channel;
+       dma_t *dma = dma_channel(chan);
 
        if (dma->active)
                printk(KERN_ERR "dma%d: altering DMA SG while "
-                      "DMA active\n", channel);
+                      "DMA active\n", chan);
 
        dma->sg = sg;
        dma->sgcount = nr_sg;
@@ -115,13 +137,13 @@ EXPORT_SYMBOL(set_dma_sg);
  *
  * Copy address to the structure, and set the invalid bit
  */
-void __set_dma_addr (dmach_t channel, void *addr)
+void __set_dma_addr (unsigned int chan, void *addr)
 {
-       dma_t *dma = dma_chan + channel;
+       dma_t *dma = dma_channel(chan);
 
        if (dma->active)
                printk(KERN_ERR "dma%d: altering DMA address while "
-                      "DMA active\n", channel);
+                      "DMA active\n", chan);
 
        dma->sg = NULL;
        dma->addr = addr;
@@ -133,13 +155,13 @@ EXPORT_SYMBOL(__set_dma_addr);
  *
  * Copy address to the structure, and set the invalid bit
  */
-void set_dma_count (dmach_t channel, unsigned long count)
+void set_dma_count (unsigned int chan, unsigned long count)
 {
-       dma_t *dma = dma_chan + channel;
+       dma_t *dma = dma_channel(chan);
 
        if (dma->active)
                printk(KERN_ERR "dma%d: altering DMA count while "
-                      "DMA active\n", channel);
+                      "DMA active\n", chan);
 
        dma->sg = NULL;
        dma->count = count;
@@ -149,13 +171,13 @@ EXPORT_SYMBOL(set_dma_count);
 
 /* Set DMA direction mode
  */
-void set_dma_mode (dmach_t channel, dmamode_t mode)
+void set_dma_mode (unsigned int chan, unsigned int mode)
 {
-       dma_t *dma = dma_chan + channel;
+       dma_t *dma = dma_channel(chan);
 
        if (dma->active)
                printk(KERN_ERR "dma%d: altering DMA mode while "
-                      "DMA active\n", channel);
+                      "DMA active\n", chan);
 
        dma->dma_mode = mode;
        dma->invalid = 1;
@@ -164,42 +186,42 @@ EXPORT_SYMBOL(set_dma_mode);
 
 /* Enable DMA channel
  */
-void enable_dma (dmach_t channel)
+void enable_dma (unsigned int chan)
 {
-       dma_t *dma = dma_chan + channel;
+       dma_t *dma = dma_channel(chan);
 
        if (!dma->lock)
                goto free_dma;
 
        if (dma->active == 0) {
                dma->active = 1;
-               dma->d_ops->enable(channel, dma);
+               dma->d_ops->enable(chan, dma);
        }
        return;
 
 free_dma:
-       printk(KERN_ERR "dma%d: trying to enable free DMA\n", channel);
+       printk(KERN_ERR "dma%d: trying to enable free DMA\n", chan);
        BUG();
 }
 EXPORT_SYMBOL(enable_dma);
 
 /* Disable DMA channel
  */
-void disable_dma (dmach_t channel)
+void disable_dma (unsigned int chan)
 {
-       dma_t *dma = dma_chan + channel;
+       dma_t *dma = dma_channel(chan);
 
        if (!dma->lock)
                goto free_dma;
 
        if (dma->active == 1) {
                dma->active = 0;
-               dma->d_ops->disable(channel, dma);
+               dma->d_ops->disable(chan, dma);
        }
        return;
 
 free_dma:
-       printk(KERN_ERR "dma%d: trying to disable free DMA\n", channel);
+       printk(KERN_ERR "dma%d: trying to disable free DMA\n", chan);
        BUG();
 }
 EXPORT_SYMBOL(disable_dma);
@@ -207,45 +229,38 @@ EXPORT_SYMBOL(disable_dma);
 /*
  * Is the specified DMA channel active?
  */
-int dma_channel_active(dmach_t channel)
+int dma_channel_active(unsigned int chan)
 {
-       return dma_chan[channel].active;
+       dma_t *dma = dma_channel(chan);
+       return dma->active;
 }
 EXPORT_SYMBOL(dma_channel_active);
 
-void set_dma_page(dmach_t channel, char pagenr)
+void set_dma_page(unsigned int chan, char pagenr)
 {
-       printk(KERN_ERR "dma%d: trying to set_dma_page\n", channel);
+       printk(KERN_ERR "dma%d: trying to set_dma_page\n", chan);
 }
 EXPORT_SYMBOL(set_dma_page);
 
-void set_dma_speed(dmach_t channel, int cycle_ns)
+void set_dma_speed(unsigned int chan, int cycle_ns)
 {
-       dma_t *dma = dma_chan + channel;
+       dma_t *dma = dma_channel(chan);
        int ret = 0;
 
        if (dma->d_ops->setspeed)
-               ret = dma->d_ops->setspeed(channel, dma, cycle_ns);
+               ret = dma->d_ops->setspeed(chan, dma, cycle_ns);
        dma->speed = ret;
 }
 EXPORT_SYMBOL(set_dma_speed);
 
-int get_dma_residue(dmach_t channel)
+int get_dma_residue(unsigned int chan)
 {
-       dma_t *dma = dma_chan + channel;
+       dma_t *dma = dma_channel(chan);
        int ret = 0;
 
        if (dma->d_ops->residue)
-               ret = dma->d_ops->residue(channel, dma);
+               ret = dma->d_ops->residue(chan, dma);
 
        return ret;
 }
 EXPORT_SYMBOL(get_dma_residue);
-
-static int __init init_dma(void)
-{
-       arch_dma_init(dma_chan);
-       return 0;
-}
-
-core_initcall(init_dma);
index 85040cfeb5e515d303afaa7e6025b16e604cda84..d662a2f1fd85e20ec7fc1af48461689f86fe6745 100644 (file)
@@ -20,6 +20,7 @@
 #include <asm/vfpmacros.h>
 #include <mach/entry-macro.S>
 #include <asm/thread_notify.h>
+#include <asm/unwind.h>
 
 #include "entry-header.S"
 
@@ -123,6 +124,8 @@ ENDPROC(__und_invalid)
 #endif
 
        .macro  svc_entry, stack_hole=0
+ UNWIND(.fnstart               )
+ UNWIND(.save {r0 - pc}                )
        sub     sp, sp, #(S_FRAME_SIZE + \stack_hole)
  SPFIX(        tst     sp, #4          )
  SPFIX(        bicne   sp, sp, #4      )
@@ -196,6 +199,7 @@ __dabt_svc:
        ldr     r0, [sp, #S_PSR]
        msr     spsr_cxsf, r0
        ldmia   sp, {r0 - pc}^                  @ load r0 - pc, cpsr
+ UNWIND(.fnend         )
 ENDPROC(__dabt_svc)
 
        .align  5
@@ -228,6 +232,7 @@ __irq_svc:
        bleq    trace_hardirqs_on
 #endif
        ldmia   sp, {r0 - pc}^                  @ load r0 - pc, cpsr
+ UNWIND(.fnend         )
 ENDPROC(__irq_svc)
 
        .ltorg
@@ -278,6 +283,7 @@ __und_svc:
        ldr     lr, [sp, #S_PSR]                @ Get SVC cpsr
        msr     spsr_cxsf, lr
        ldmia   sp, {r0 - pc}^                  @ Restore SVC registers
+ UNWIND(.fnend         )
 ENDPROC(__und_svc)
 
        .align  5
@@ -320,6 +326,7 @@ __pabt_svc:
        ldr     r0, [sp, #S_PSR]
        msr     spsr_cxsf, r0
        ldmia   sp, {r0 - pc}^                  @ load r0 - pc, cpsr
+ UNWIND(.fnend         )
 ENDPROC(__pabt_svc)
 
        .align  5
@@ -343,6 +350,8 @@ ENDPROC(__pabt_svc)
 #endif
 
        .macro  usr_entry
+ UNWIND(.fnstart       )
+ UNWIND(.cantunwind    )       @ don't unwind the user space
        sub     sp, sp, #S_FRAME_SIZE
        stmib   sp, {r1 - r12}
 
@@ -420,6 +429,7 @@ __dabt_usr:
        mov     r2, sp
        adr     lr, ret_from_exception
        b       do_DataAbort
+ UNWIND(.fnend         )
 ENDPROC(__dabt_usr)
 
        .align  5
@@ -450,6 +460,7 @@ __irq_usr:
 
        mov     why, #0
        b       ret_to_user
+ UNWIND(.fnend         )
 ENDPROC(__irq_usr)
 
        .ltorg
@@ -484,6 +495,7 @@ __und_usr:
 #else
        b       __und_usr_unknown
 #endif
+ UNWIND(.fnend         )
 ENDPROC(__und_usr)
 
        @
@@ -671,14 +683,18 @@ __pabt_usr:
        enable_irq                              @ Enable interrupts
        mov     r1, sp                          @ regs
        bl      do_PrefetchAbort                @ call abort handler
+ UNWIND(.fnend         )
        /* fall through */
 /*
  * This is the return code to user mode for abort handlers
  */
 ENTRY(ret_from_exception)
+ UNWIND(.fnstart       )
+ UNWIND(.cantunwind    )
        get_thread_info tsk
        mov     why, #0
        b       ret_to_user
+ UNWIND(.fnend         )
 ENDPROC(__pabt_usr)
 ENDPROC(ret_from_exception)
 
@@ -688,6 +704,8 @@ ENDPROC(ret_from_exception)
  * previous and next are guaranteed not to be the same.
  */
 ENTRY(__switch_to)
+ UNWIND(.fnstart       )
+ UNWIND(.cantunwind    )
        add     ip, r1, #TI_CPU_SAVE
        ldr     r3, [r2, #TI_TP_VALUE]
        stmia   ip!, {r4 - sl, fp, sp, lr}      @ Store most regs on stack
@@ -717,6 +735,7 @@ ENTRY(__switch_to)
        bl      atomic_notifier_call_chain
        mov     r0, r5
        ldmia   r4, {r4 - sl, fp, sp, pc}       @ Load all regs saved previously
+ UNWIND(.fnend         )
 ENDPROC(__switch_to)
 
        __INIT
index 159d0416f270cb34988b7f5a95eb971a05004597..b55cb0331809ebc025344d9156c300dd2fdc9edf 100644 (file)
@@ -11,6 +11,7 @@
 #include <asm/unistd.h>
 #include <asm/ftrace.h>
 #include <mach/entry-macro.S>
+#include <asm/unwind.h>
 
 #include "entry-header.S"
 
@@ -22,6 +23,8 @@
  * stack.
  */
 ret_fast_syscall:
+ UNWIND(.fnstart       )
+ UNWIND(.cantunwind    )
        disable_irq                             @ disable interrupts
        ldr     r1, [tsk, #TI_FLAGS]
        tst     r1, #_TIF_WORK_MASK
@@ -38,6 +41,7 @@ ret_fast_syscall:
        mov     r0, r0
        add     sp, sp, #S_FRAME_SIZE - S_PC
        movs    pc, lr                          @ return & move spsr_svc into cpsr
+ UNWIND(.fnend         )
 
 /*
  * Ok, we need to do extra processing, enter the slow path.
index dab48f27263f0e20c2e3bdbaf2f1c5ffaf1a1c1f..13dbd5bf5cc2e25be8441fb05f0f9150a19400df 100644 (file)
@@ -22,6 +22,7 @@
 
 #include <asm/pgtable.h>
 #include <asm/sections.h>
+#include <asm/unwind.h>
 
 #ifdef CONFIG_XIP_KERNEL
 /*
@@ -66,6 +67,24 @@ int module_frob_arch_sections(Elf_Ehdr *hdr,
                              char *secstrings,
                              struct module *mod)
 {
+#ifdef CONFIG_ARM_UNWIND
+       Elf_Shdr *s, *sechdrs_end = sechdrs + hdr->e_shnum;
+
+       for (s = sechdrs; s < sechdrs_end; s++) {
+               if (strcmp(".ARM.exidx.init.text", secstrings + s->sh_name) == 0)
+                       mod->arch.unw_sec_init = s;
+               else if (strcmp(".ARM.exidx.devinit.text", secstrings + s->sh_name) == 0)
+                       mod->arch.unw_sec_devinit = s;
+               else if (strcmp(".ARM.exidx", secstrings + s->sh_name) == 0)
+                       mod->arch.unw_sec_core = s;
+               else if (strcmp(".init.text", secstrings + s->sh_name) == 0)
+                       mod->arch.sec_init_text = s;
+               else if (strcmp(".devinit.text", secstrings + s->sh_name) == 0)
+                       mod->arch.sec_devinit_text = s;
+               else if (strcmp(".text", secstrings + s->sh_name) == 0)
+                       mod->arch.sec_core_text = s;
+       }
+#endif
        return 0;
 }
 
@@ -104,6 +123,10 @@ apply_relocate(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex,
                loc = dstsec->sh_addr + rel->r_offset;
 
                switch (ELF32_R_TYPE(rel->r_info)) {
+               case R_ARM_NONE:
+                       /* ignore */
+                       break;
+
                case R_ARM_ABS32:
                        *(u32 *)loc += sym->st_value;
                        break;
@@ -132,6 +155,11 @@ apply_relocate(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex,
                        *(u32 *)loc |= offset & 0x00ffffff;
                        break;
 
+               case R_ARM_PREL31:
+                       offset = *(u32 *)loc + sym->st_value - loc;
+                       *(u32 *)loc = offset & 0x7fffffff;
+                       break;
+
                default:
                        printk(KERN_ERR "%s: unknown relocation: %u\n",
                               module->name, ELF32_R_TYPE(rel->r_info));
@@ -150,14 +178,50 @@ apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab,
        return -ENOEXEC;
 }
 
+#ifdef CONFIG_ARM_UNWIND
+static void register_unwind_tables(struct module *mod)
+{
+       if (mod->arch.unw_sec_init && mod->arch.sec_init_text)
+               mod->arch.unwind_init =
+                       unwind_table_add(mod->arch.unw_sec_init->sh_addr,
+                                        mod->arch.unw_sec_init->sh_size,
+                                        mod->arch.sec_init_text->sh_addr,
+                                        mod->arch.sec_init_text->sh_size);
+       if (mod->arch.unw_sec_devinit && mod->arch.sec_devinit_text)
+               mod->arch.unwind_devinit =
+                       unwind_table_add(mod->arch.unw_sec_devinit->sh_addr,
+                                        mod->arch.unw_sec_devinit->sh_size,
+                                        mod->arch.sec_devinit_text->sh_addr,
+                                        mod->arch.sec_devinit_text->sh_size);
+       if (mod->arch.unw_sec_core && mod->arch.sec_core_text)
+               mod->arch.unwind_core =
+                       unwind_table_add(mod->arch.unw_sec_core->sh_addr,
+                                        mod->arch.unw_sec_core->sh_size,
+                                        mod->arch.sec_core_text->sh_addr,
+                                        mod->arch.sec_core_text->sh_size);
+}
+
+static void unregister_unwind_tables(struct module *mod)
+{
+       unwind_table_del(mod->arch.unwind_init);
+       unwind_table_del(mod->arch.unwind_devinit);
+       unwind_table_del(mod->arch.unwind_core);
+}
+#else
+static inline void register_unwind_tables(struct module *mod) { }
+static inline void unregister_unwind_tables(struct module *mod) { }
+#endif
+
 int
 module_finalize(const Elf32_Ehdr *hdr, const Elf_Shdr *sechdrs,
                struct module *module)
 {
+       register_unwind_tables(module);
        return 0;
 }
 
 void
 module_arch_cleanup(struct module *mod)
 {
+       unregister_unwind_tables(mod);
 }
index d3ea6fa895212fae625b2c5982ededbd896340fc..2de14e2afdc5df8d3295f0aca4e3e6f7963980ba 100644 (file)
@@ -34,6 +34,7 @@
 #include <asm/processor.h>
 #include <asm/system.h>
 #include <asm/thread_notify.h>
+#include <asm/stacktrace.h>
 #include <asm/mach/time.h>
 
 static const char *processor_modes[] = {
@@ -82,7 +83,7 @@ static int __init hlt_setup(char *__unused)
 __setup("nohlt", nohlt_setup);
 __setup("hlt", hlt_setup);
 
-void arm_machine_restart(char mode)
+void arm_machine_restart(char mode, const char *cmd)
 {
        /*
         * Clean and disable cache, and turn off interrupts
@@ -99,7 +100,7 @@ void arm_machine_restart(char mode)
        /*
         * Now call the architecture specific reboot code.
         */
-       arch_reset(mode);
+       arch_reset(mode, cmd);
 
        /*
         * Whoops - the architecture was unable to reboot.
@@ -119,7 +120,7 @@ EXPORT_SYMBOL(pm_idle);
 void (*pm_power_off)(void);
 EXPORT_SYMBOL(pm_power_off);
 
-void (*arm_pm_restart)(char str) = arm_machine_restart;
+void (*arm_pm_restart)(char str, const char *cmd) = arm_machine_restart;
 EXPORT_SYMBOL_GPL(arm_pm_restart);
 
 
@@ -194,9 +195,9 @@ void machine_power_off(void)
                pm_power_off();
 }
 
-void machine_restart(char * __unused)
+void machine_restart(char *cmd)
 {
-       arm_pm_restart(reboot_mode);
+       arm_pm_restart(reboot_mode, cmd);
 }
 
 void __show_regs(struct pt_regs *regs)
@@ -372,23 +373,21 @@ EXPORT_SYMBOL(kernel_thread);
 
 unsigned long get_wchan(struct task_struct *p)
 {
-       unsigned long fp, lr;
-       unsigned long stack_start, stack_end;
+       struct stackframe frame;
        int count = 0;
        if (!p || p == current || p->state == TASK_RUNNING)
                return 0;
 
-       stack_start = (unsigned long)end_of_stack(p);
-       stack_end = (unsigned long)task_stack_page(p) + THREAD_SIZE;
-
-       fp = thread_saved_fp(p);
+       frame.fp = thread_saved_fp(p);
+       frame.sp = thread_saved_sp(p);
+       frame.lr = 0;                   /* recovered from the stack */
+       frame.pc = thread_saved_pc(p);
        do {
-               if (fp < stack_start || fp > stack_end)
+               int ret = unwind_frame(&frame);
+               if (ret < 0)
                        return 0;
-               lr = ((unsigned long *)fp)[-1];
-               if (!in_sched_functions(lr))
-                       return lr;
-               fp = *(unsigned long *) (fp - 12);
+               if (!in_sched_functions(frame.pc))
+                       return frame.pc;
        } while (count ++ < 16);
        return 0;
 }
index df653ea59250a3152a5e16f4634d10e93251a9dd..89882a1d01874ca184ae6c48b59eb803b80deffa 100644 (file)
@@ -653,6 +653,54 @@ static int ptrace_setcrunchregs(struct task_struct *tsk, void __user *ufp)
 }
 #endif
 
+#ifdef CONFIG_VFP
+/*
+ * Get the child VFP state.
+ */
+static int ptrace_getvfpregs(struct task_struct *tsk, void __user *data)
+{
+       struct thread_info *thread = task_thread_info(tsk);
+       union vfp_state *vfp = &thread->vfpstate;
+       struct user_vfp __user *ufp = data;
+
+       vfp_sync_state(thread);
+
+       /* copy the floating point registers */
+       if (copy_to_user(&ufp->fpregs, &vfp->hard.fpregs,
+                        sizeof(vfp->hard.fpregs)))
+               return -EFAULT;
+
+       /* copy the status and control register */
+       if (put_user(vfp->hard.fpscr, &ufp->fpscr))
+               return -EFAULT;
+
+       return 0;
+}
+
+/*
+ * Set the child VFP state.
+ */
+static int ptrace_setvfpregs(struct task_struct *tsk, void __user *data)
+{
+       struct thread_info *thread = task_thread_info(tsk);
+       union vfp_state *vfp = &thread->vfpstate;
+       struct user_vfp __user *ufp = data;
+
+       vfp_sync_state(thread);
+
+       /* copy the floating point registers */
+       if (copy_from_user(&vfp->hard.fpregs, &ufp->fpregs,
+                          sizeof(vfp->hard.fpregs)))
+               return -EFAULT;
+
+       /* copy the status and control register */
+       if (get_user(vfp->hard.fpscr, &ufp->fpscr))
+               return -EFAULT;
+
+       return 0;
+}
+#endif
+
 long arch_ptrace(struct task_struct *child, long request, long addr, long data)
 {
        int ret;
@@ -775,6 +823,16 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
                        break;
 #endif
 
+#ifdef CONFIG_VFP
+               case PTRACE_GETVFPREGS:
+                       ret = ptrace_getvfpregs(child, (void __user *)data);
+                       break;
+
+               case PTRACE_SETVFPREGS:
+                       ret = ptrace_setvfpregs(child, (void __user *)data);
+                       break;
+#endif
+
                default:
                        ret = ptrace_request(child, request, addr, data);
                        break;
index 68d6494c0389751d5584e94e833ae139ae53d76b..bc5e4128f9f318a50bd4abc2e2b426c8db11eecb 100644 (file)
@@ -40,6 +40,7 @@
 #include <asm/mach/irq.h>
 #include <asm/mach/time.h>
 #include <asm/traps.h>
+#include <asm/unwind.h>
 
 #include "compat.h"
 #include "atags.h"
@@ -685,6 +686,8 @@ void __init setup_arch(char **cmdline_p)
        struct machine_desc *mdesc;
        char *from = default_command_line;
 
+       unwind_init();
+
        setup_processor();
        mdesc = setup_machine(machine_arch_type);
        machine_name = mdesc->name;
@@ -780,6 +783,8 @@ static const char *hwcap_str[] = {
        "crunch",
        "thumbee",
        "neon",
+       "vfpv3",
+       "vfpv3d16",
        NULL
 };
 
index 55fa7ff96a3e7aaf654d30c64677b1a4d666ee4b..7801aac3c043f6354ec7fc0b82c909370e228a4c 100644 (file)
@@ -93,6 +93,7 @@ int __cpuinit __cpu_up(unsigned int cpu)
        pmd = pmd_offset(pgd + pgd_index(PHYS_OFFSET), PHYS_OFFSET);
        *pmd = __pmd((PHYS_OFFSET & PGDIR_MASK) |
                     PMD_TYPE_SECT | PMD_SECT_AP_WRITE);
+       flush_pmd_entry(pmd);
 
        /*
         * We need to tell the secondary core where to find
@@ -130,6 +131,7 @@ int __cpuinit __cpu_up(unsigned int cpu)
        secondary_data.pgdir = 0;
 
        *pmd = __pmd(0);
+       clean_pmd_entry(pmd);
        pgd_free(&init_mm, pgd);
 
        if (ret) {
index fc650f64df43ce00a83ad9f22e33e26b266d76ce..9f444e5cc1650811c3bd6e163a8fc950007c456d 100644 (file)
@@ -2,35 +2,60 @@
 #include <linux/sched.h>
 #include <linux/stacktrace.h>
 
-#include "stacktrace.h"
-
-int walk_stackframe(unsigned long fp, unsigned long low, unsigned long high,
-                   int (*fn)(struct stackframe *, void *), void *data)
+#include <asm/stacktrace.h>
+
+#if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND)
+/*
+ * Unwind the current stack frame and store the new register values in the
+ * structure passed as argument. Unwinding is equivalent to a function return,
+ * hence the new PC value rather than LR should be used for backtrace.
+ *
+ * With framepointer enabled, a simple function prologue looks like this:
+ *     mov     ip, sp
+ *     stmdb   sp!, {fp, ip, lr, pc}
+ *     sub     fp, ip, #4
+ *
+ * A simple function epilogue looks like this:
+ *     ldm     sp, {fp, sp, pc}
+ *
+ * Note that with framepointer enabled, even the leaf functions have the same
+ * prologue and epilogue, therefore we can ignore the LR value in this case.
+ */
+int unwind_frame(struct stackframe *frame)
 {
-       struct stackframe *frame;
-
-       do {
-               /*
-                * Check current frame pointer is within bounds
-                */
-               if (fp < (low + 12) || fp + 4 >= high)
-                       break;
+       unsigned long high, low;
+       unsigned long fp = frame->fp;
 
-               frame = (struct stackframe *)(fp - 12);
+       /* only go to a higher address on the stack */
+       low = frame->sp;
+       high = ALIGN(low, THREAD_SIZE) + THREAD_SIZE;
 
-               if (fn(frame, data))
-                       break;
+       /* check current frame pointer is within bounds */
+       if (fp < (low + 12) || fp + 4 >= high)
+               return -EINVAL;
 
-               /*
-                * Update the low bound - the next frame must always
-                * be at a higher address than the current frame.
-                */
-               low = fp + 4;
-               fp = frame->fp;
-       } while (fp);
+       /* restore the registers from the stack frame */
+       frame->fp = *(unsigned long *)(fp - 12);
+       frame->sp = *(unsigned long *)(fp - 8);
+       frame->pc = *(unsigned long *)(fp - 4);
 
        return 0;
 }
+#endif
+
+void walk_stackframe(struct stackframe *frame,
+                    int (*fn)(struct stackframe *, void *), void *data)
+{
+       while (1) {
+               int ret;
+
+               if (fn(frame, data))
+                       break;
+               ret = unwind_frame(frame);
+               if (ret < 0)
+                       break;
+       }
+}
 EXPORT_SYMBOL(walk_stackframe);
 
 #ifdef CONFIG_STACKTRACE
@@ -44,7 +69,7 @@ static int save_trace(struct stackframe *frame, void *d)
 {
        struct stack_trace_data *data = d;
        struct stack_trace *trace = data->trace;
-       unsigned long addr = frame->lr;
+       unsigned long addr = frame->pc;
 
        if (data->no_sched_functions && in_sched_functions(addr))
                return 0;
@@ -61,11 +86,10 @@ static int save_trace(struct stackframe *frame, void *d)
 void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace)
 {
        struct stack_trace_data data;
-       unsigned long fp, base;
+       struct stackframe frame;
 
        data.trace = trace;
        data.skip = trace->skip;
-       base = (unsigned long)task_stack_page(tsk);
 
        if (tsk != current) {
 #ifdef CONFIG_SMP
@@ -76,14 +100,22 @@ void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace)
                BUG();
 #else
                data.no_sched_functions = 1;
-               fp = thread_saved_fp(tsk);
+               frame.fp = thread_saved_fp(tsk);
+               frame.sp = thread_saved_sp(tsk);
+               frame.lr = 0;           /* recovered from the stack */
+               frame.pc = thread_saved_pc(tsk);
 #endif
        } else {
+               register unsigned long current_sp asm ("sp");
+
                data.no_sched_functions = 0;
-               asm("mov %0, fp" : "=r" (fp));
+               frame.fp = (unsigned long)__builtin_frame_address(0);
+               frame.sp = current_sp;
+               frame.lr = (unsigned long)__builtin_return_address(0);
+               frame.pc = (unsigned long)save_stack_trace_tsk;
        }
 
-       walk_stackframe(fp, base, base + THREAD_SIZE, save_trace, &data);
+       walk_stackframe(&frame, save_trace, &data);
        if (trace->nr_entries < trace->max_entries)
                trace->entries[trace->nr_entries++] = ULONG_MAX;
 }
diff --git a/arch/arm/kernel/stacktrace.h b/arch/arm/kernel/stacktrace.h
deleted file mode 100644 (file)
index e9fd20c..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-struct stackframe {
-       unsigned long fp;
-       unsigned long sp;
-       unsigned long lr;
-       unsigned long pc;
-};
-
-int walk_stackframe(unsigned long fp, unsigned long low, unsigned long high,
-                   int (*fn)(struct stackframe *, void *), void *data);
index c68b44aa88d27247a8e78685349e3535d96c21c7..4cdc4a0bd02d6ebe94038e5f5fcd80da2b945324 100644 (file)
@@ -33,6 +33,7 @@
 
 #include <asm/leds.h>
 #include <asm/thread_info.h>
+#include <asm/stacktrace.h>
 #include <asm/mach/time.h>
 
 /*
@@ -55,14 +56,22 @@ EXPORT_SYMBOL(rtc_lock);
 #ifdef CONFIG_SMP
 unsigned long profile_pc(struct pt_regs *regs)
 {
-       unsigned long fp, pc = instruction_pointer(regs);
+       struct stackframe frame;
 
-       if (in_lock_functions(pc)) {
-               fp = regs->ARM_fp;
-               pc = ((unsigned long *)fp)[-1];
-       }
+       if (!in_lock_functions(regs->ARM_pc))
+               return regs->ARM_pc;
+
+       frame.fp = regs->ARM_fp;
+       frame.sp = regs->ARM_sp;
+       frame.lr = regs->ARM_lr;
+       frame.pc = regs->ARM_pc;
+       do {
+               int ret = unwind_frame(&frame);
+               if (ret < 0)
+                       return 0;
+       } while (in_lock_functions(frame.pc));
 
-       return pc;
+       return frame.pc;
 }
 EXPORT_SYMBOL(profile_pc);
 #endif
index 79abc4ddc0cf602cf8ae77728fefd8d2080ea826..57eb0f6f60053e6fd12fd48113e8a5fdb6b744b8 100644 (file)
@@ -27,6 +27,7 @@
 #include <asm/system.h>
 #include <asm/unistd.h>
 #include <asm/traps.h>
+#include <asm/unwind.h>
 
 #include "ptrace.h"
 #include "signal.h"
@@ -61,6 +62,7 @@ void dump_backtrace_entry(unsigned long where, unsigned long from, unsigned long
                dump_mem("Exception stack", frame + 4, frame + 4 + sizeof(struct pt_regs));
 }
 
+#ifndef CONFIG_ARM_UNWIND
 /*
  * Stack pointers should always be within the kernels view of
  * physical memory.  If it is not there, then we can't dump
@@ -74,6 +76,7 @@ static int verify_stack(unsigned long sp)
 
        return 0;
 }
+#endif
 
 /*
  * Dump out the contents of some memory nicely...
@@ -150,13 +153,33 @@ static void dump_instr(struct pt_regs *regs)
        set_fs(fs);
 }
 
+#ifdef CONFIG_ARM_UNWIND
+static inline void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk)
+{
+       unwind_backtrace(regs, tsk);
+}
+#else
 static void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk)
 {
-       unsigned int fp;
+       unsigned int fp, mode;
        int ok = 1;
 
        printk("Backtrace: ");
-       fp = regs->ARM_fp;
+
+       if (!tsk)
+               tsk = current;
+
+       if (regs) {
+               fp = regs->ARM_fp;
+               mode = processor_mode(regs);
+       } else if (tsk != current) {
+               fp = thread_saved_fp(tsk);
+               mode = 0x10;
+       } else {
+               asm("mov %0, fp" : "=r" (fp) : : "cc");
+               mode = 0x10;
+       }
+
        if (!fp) {
                printk("no frame pointer");
                ok = 0;
@@ -168,29 +191,20 @@ static void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk)
        printk("\n");
 
        if (ok)
-               c_backtrace(fp, processor_mode(regs));
+               c_backtrace(fp, mode);
 }
+#endif
 
 void dump_stack(void)
 {
-       __backtrace();
+       dump_backtrace(NULL, NULL);
 }
 
 EXPORT_SYMBOL(dump_stack);
 
 void show_stack(struct task_struct *tsk, unsigned long *sp)
 {
-       unsigned long fp;
-
-       if (!tsk)
-               tsk = current;
-
-       if (tsk != current)
-               fp = thread_saved_fp(tsk);
-       else
-               asm("mov %0, fp" : "=r" (fp) : : "cc");
-
-       c_backtrace(fp, 0x10);
+       dump_backtrace(NULL, tsk);
        barrier();
 }
 
diff --git a/arch/arm/kernel/unwind.c b/arch/arm/kernel/unwind.c
new file mode 100644 (file)
index 0000000..1dedc2c
--- /dev/null
@@ -0,0 +1,434 @@
+/*
+ * arch/arm/kernel/unwind.c
+ *
+ * Copyright (C) 2008 ARM Limited
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ *
+ * Stack unwinding support for ARM
+ *
+ * An ARM EABI version of gcc is required to generate the unwind
+ * tables. For information about the structure of the unwind tables,
+ * see "Exception Handling ABI for the ARM Architecture" at:
+ *
+ * http://infocenter.arm.com/help/topic/com.arm.doc.subset.swdev.abi/index.html
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/sched.h>
+#include <linux/slab.h>
+#include <linux/spinlock.h>
+#include <linux/list.h>
+
+#include <asm/stacktrace.h>
+#include <asm/traps.h>
+#include <asm/unwind.h>
+
+/* Dummy functions to avoid linker complaints */
+void __aeabi_unwind_cpp_pr0(void)
+{
+};
+EXPORT_SYMBOL(__aeabi_unwind_cpp_pr0);
+
+void __aeabi_unwind_cpp_pr1(void)
+{
+};
+EXPORT_SYMBOL(__aeabi_unwind_cpp_pr1);
+
+void __aeabi_unwind_cpp_pr2(void)
+{
+};
+EXPORT_SYMBOL(__aeabi_unwind_cpp_pr2);
+
+struct unwind_ctrl_block {
+       unsigned long vrs[16];          /* virtual register set */
+       unsigned long *insn;            /* pointer to the current instructions word */
+       int entries;                    /* number of entries left to interpret */
+       int byte;                       /* current byte number in the instructions word */
+};
+
+enum regs {
+       FP = 11,
+       SP = 13,
+       LR = 14,
+       PC = 15
+};
+
+extern struct unwind_idx __start_unwind_idx[];
+extern struct unwind_idx __stop_unwind_idx[];
+
+static DEFINE_SPINLOCK(unwind_lock);
+static LIST_HEAD(unwind_tables);
+
+/* Convert a prel31 symbol to an absolute address */
+#define prel31_to_addr(ptr)                            \
+({                                                     \
+       /* sign-extend to 32 bits */                    \
+       long offset = (((long)*(ptr)) << 1) >> 1;       \
+       (unsigned long)(ptr) + offset;                  \
+})
+
+/*
+ * Binary search in the unwind index. The entries entries are
+ * guaranteed to be sorted in ascending order by the linker.
+ */
+static struct unwind_idx *search_index(unsigned long addr,
+                                      struct unwind_idx *first,
+                                      struct unwind_idx *last)
+{
+       pr_debug("%s(%08lx, %p, %p)\n", __func__, addr, first, last);
+
+       if (addr < first->addr) {
+               pr_warning("unwind: Unknown symbol address %08lx\n", addr);
+               return NULL;
+       } else if (addr >= last->addr)
+               return last;
+
+       while (first < last - 1) {
+               struct unwind_idx *mid = first + ((last - first + 1) >> 1);
+
+               if (addr < mid->addr)
+                       last = mid;
+               else
+                       first = mid;
+       }
+
+       return first;
+}
+
+static struct unwind_idx *unwind_find_idx(unsigned long addr)
+{
+       struct unwind_idx *idx = NULL;
+       unsigned long flags;
+
+       pr_debug("%s(%08lx)\n", __func__, addr);
+
+       if (core_kernel_text(addr))
+               /* main unwind table */
+               idx = search_index(addr, __start_unwind_idx,
+                                  __stop_unwind_idx - 1);
+       else {
+               /* module unwind tables */
+               struct unwind_table *table;
+
+               spin_lock_irqsave(&unwind_lock, flags);
+               list_for_each_entry(table, &unwind_tables, list) {
+                       if (addr >= table->begin_addr &&
+                           addr < table->end_addr) {
+                               idx = search_index(addr, table->start,
+                                                  table->stop - 1);
+                               break;
+                       }
+               }
+               spin_unlock_irqrestore(&unwind_lock, flags);
+       }
+
+       pr_debug("%s: idx = %p\n", __func__, idx);
+       return idx;
+}
+
+static unsigned long unwind_get_byte(struct unwind_ctrl_block *ctrl)
+{
+       unsigned long ret;
+
+       if (ctrl->entries <= 0) {
+               pr_warning("unwind: Corrupt unwind table\n");
+               return 0;
+       }
+
+       ret = (*ctrl->insn >> (ctrl->byte * 8)) & 0xff;
+
+       if (ctrl->byte == 0) {
+               ctrl->insn++;
+               ctrl->entries--;
+               ctrl->byte = 3;
+       } else
+               ctrl->byte--;
+
+       return ret;
+}
+
+/*
+ * Execute the current unwind instruction.
+ */
+static int unwind_exec_insn(struct unwind_ctrl_block *ctrl)
+{
+       unsigned long insn = unwind_get_byte(ctrl);
+
+       pr_debug("%s: insn = %08lx\n", __func__, insn);
+
+       if ((insn & 0xc0) == 0x00)
+               ctrl->vrs[SP] += ((insn & 0x3f) << 2) + 4;
+       else if ((insn & 0xc0) == 0x40)
+               ctrl->vrs[SP] -= ((insn & 0x3f) << 2) + 4;
+       else if ((insn & 0xf0) == 0x80) {
+               unsigned long mask;
+               unsigned long *vsp = (unsigned long *)ctrl->vrs[SP];
+               int load_sp, reg = 4;
+
+               insn = (insn << 8) | unwind_get_byte(ctrl);
+               mask = insn & 0x0fff;
+               if (mask == 0) {
+                       pr_warning("unwind: 'Refuse to unwind' instruction %04lx\n",
+                                  insn);
+                       return -URC_FAILURE;
+               }
+
+               /* pop R4-R15 according to mask */
+               load_sp = mask & (1 << (13 - 4));
+               while (mask) {
+                       if (mask & 1)
+                               ctrl->vrs[reg] = *vsp++;
+                       mask >>= 1;
+                       reg++;
+               }
+               if (!load_sp)
+                       ctrl->vrs[SP] = (unsigned long)vsp;
+       } else if ((insn & 0xf0) == 0x90 &&
+                  (insn & 0x0d) != 0x0d)
+               ctrl->vrs[SP] = ctrl->vrs[insn & 0x0f];
+       else if ((insn & 0xf0) == 0xa0) {
+               unsigned long *vsp = (unsigned long *)ctrl->vrs[SP];
+               int reg;
+
+               /* pop R4-R[4+bbb] */
+               for (reg = 4; reg <= 4 + (insn & 7); reg++)
+                       ctrl->vrs[reg] = *vsp++;
+               if (insn & 0x80)
+                       ctrl->vrs[14] = *vsp++;
+               ctrl->vrs[SP] = (unsigned long)vsp;
+       } else if (insn == 0xb0) {
+               ctrl->vrs[PC] = ctrl->vrs[LR];
+               /* no further processing */
+               ctrl->entries = 0;
+       } else if (insn == 0xb1) {
+               unsigned long mask = unwind_get_byte(ctrl);
+               unsigned long *vsp = (unsigned long *)ctrl->vrs[SP];
+               int reg = 0;
+
+               if (mask == 0 || mask & 0xf0) {
+                       pr_warning("unwind: Spare encoding %04lx\n",
+                              (insn << 8) | mask);
+                       return -URC_FAILURE;
+               }
+
+               /* pop R0-R3 according to mask */
+               while (mask) {
+                       if (mask & 1)
+                               ctrl->vrs[reg] = *vsp++;
+                       mask >>= 1;
+                       reg++;
+               }
+               ctrl->vrs[SP] = (unsigned long)vsp;
+       } else if (insn == 0xb2) {
+               unsigned long uleb128 = unwind_get_byte(ctrl);
+
+               ctrl->vrs[SP] += 0x204 + (uleb128 << 2);
+       } else {
+               pr_warning("unwind: Unhandled instruction %02lx\n", insn);
+               return -URC_FAILURE;
+       }
+
+       pr_debug("%s: fp = %08lx sp = %08lx lr = %08lx pc = %08lx\n", __func__,
+                ctrl->vrs[FP], ctrl->vrs[SP], ctrl->vrs[LR], ctrl->vrs[PC]);
+
+       return URC_OK;
+}
+
+/*
+ * Unwind a single frame starting with *sp for the symbol at *pc. It
+ * updates the *pc and *sp with the new values.
+ */
+int unwind_frame(struct stackframe *frame)
+{
+       unsigned long high, low;
+       struct unwind_idx *idx;
+       struct unwind_ctrl_block ctrl;
+
+       /* only go to a higher address on the stack */
+       low = frame->sp;
+       high = ALIGN(low, THREAD_SIZE) + THREAD_SIZE;
+
+       pr_debug("%s(pc = %08lx lr = %08lx sp = %08lx)\n", __func__,
+                frame->pc, frame->lr, frame->sp);
+
+       if (!kernel_text_address(frame->pc))
+               return -URC_FAILURE;
+
+       idx = unwind_find_idx(frame->pc);
+       if (!idx) {
+               pr_warning("unwind: Index not found %08lx\n", frame->pc);
+               return -URC_FAILURE;
+       }
+
+       ctrl.vrs[FP] = frame->fp;
+       ctrl.vrs[SP] = frame->sp;
+       ctrl.vrs[LR] = frame->lr;
+       ctrl.vrs[PC] = 0;
+
+       if (idx->insn == 1)
+               /* can't unwind */
+               return -URC_FAILURE;
+       else if ((idx->insn & 0x80000000) == 0)
+               /* prel31 to the unwind table */
+               ctrl.insn = (unsigned long *)prel31_to_addr(&idx->insn);
+       else if ((idx->insn & 0xff000000) == 0x80000000)
+               /* only personality routine 0 supported in the index */
+               ctrl.insn = &idx->insn;
+       else {
+               pr_warning("unwind: Unsupported personality routine %08lx in the index at %p\n",
+                          idx->insn, idx);
+               return -URC_FAILURE;
+       }
+
+       /* check the personality routine */
+       if ((*ctrl.insn & 0xff000000) == 0x80000000) {
+               ctrl.byte = 2;
+               ctrl.entries = 1;
+       } else if ((*ctrl.insn & 0xff000000) == 0x81000000) {
+               ctrl.byte = 1;
+               ctrl.entries = 1 + ((*ctrl.insn & 0x00ff0000) >> 16);
+       } else {
+               pr_warning("unwind: Unsupported personality routine %08lx at %p\n",
+                          *ctrl.insn, ctrl.insn);
+               return -URC_FAILURE;
+       }
+
+       while (ctrl.entries > 0) {
+               int urc;
+
+               if (ctrl.vrs[SP] < low || ctrl.vrs[SP] >= high)
+                       return -URC_FAILURE;
+               urc = unwind_exec_insn(&ctrl);
+               if (urc < 0)
+                       return urc;
+       }
+
+       if (ctrl.vrs[PC] == 0)
+               ctrl.vrs[PC] = ctrl.vrs[LR];
+
+       frame->fp = ctrl.vrs[FP];
+       frame->sp = ctrl.vrs[SP];
+       frame->lr = ctrl.vrs[LR];
+       frame->pc = ctrl.vrs[PC];
+
+       return URC_OK;
+}
+
+void unwind_backtrace(struct pt_regs *regs, struct task_struct *tsk)
+{
+       struct stackframe frame;
+       unsigned long high, low;
+       register unsigned long current_sp asm ("sp");
+
+       pr_debug("%s(regs = %p tsk = %p)\n", __func__, regs, tsk);
+
+       if (!tsk)
+               tsk = current;
+
+       if (regs) {
+               frame.fp = regs->ARM_fp;
+               frame.sp = regs->ARM_sp;
+               frame.lr = regs->ARM_lr;
+               frame.pc = regs->ARM_pc;
+       } else if (tsk == current) {
+               frame.fp = (unsigned long)__builtin_frame_address(0);
+               frame.sp = current_sp;
+               frame.lr = (unsigned long)__builtin_return_address(0);
+               frame.pc = (unsigned long)unwind_backtrace;
+       } else {
+               /* task blocked in __switch_to */
+               frame.fp = thread_saved_fp(tsk);
+               frame.sp = thread_saved_sp(tsk);
+               /*
+                * The function calling __switch_to cannot be a leaf function
+                * so LR is recovered from the stack.
+                */
+               frame.lr = 0;
+               frame.pc = thread_saved_pc(tsk);
+       }
+
+       low = frame.sp & ~(THREAD_SIZE - 1);
+       high = low + THREAD_SIZE;
+
+       while (1) {
+               int urc;
+               unsigned long where = frame.pc;
+
+               urc = unwind_frame(&frame);
+               if (urc < 0)
+                       break;
+               dump_backtrace_entry(where, frame.pc, frame.sp - 4);
+       }
+}
+
+struct unwind_table *unwind_table_add(unsigned long start, unsigned long size,
+                                     unsigned long text_addr,
+                                     unsigned long text_size)
+{
+       unsigned long flags;
+       struct unwind_idx *idx;
+       struct unwind_table *tab = kmalloc(sizeof(*tab), GFP_KERNEL);
+
+       pr_debug("%s(%08lx, %08lx, %08lx, %08lx)\n", __func__, start, size,
+                text_addr, text_size);
+
+       if (!tab)
+               return tab;
+
+       tab->start = (struct unwind_idx *)start;
+       tab->stop = (struct unwind_idx *)(start + size);
+       tab->begin_addr = text_addr;
+       tab->end_addr = text_addr + text_size;
+
+       /* Convert the symbol addresses to absolute values */
+       for (idx = tab->start; idx < tab->stop; idx++)
+               idx->addr = prel31_to_addr(&idx->addr);
+
+       spin_lock_irqsave(&unwind_lock, flags);
+       list_add_tail(&tab->list, &unwind_tables);
+       spin_unlock_irqrestore(&unwind_lock, flags);
+
+       return tab;
+}
+
+void unwind_table_del(struct unwind_table *tab)
+{
+       unsigned long flags;
+
+       if (!tab)
+               return;
+
+       spin_lock_irqsave(&unwind_lock, flags);
+       list_del(&tab->list);
+       spin_unlock_irqrestore(&unwind_lock, flags);
+
+       kfree(tab);
+}
+
+int __init unwind_init(void)
+{
+       struct unwind_idx *idx;
+
+       /* Convert the symbol addresses to absolute values */
+       for (idx = __start_unwind_idx; idx < __stop_unwind_idx; idx++)
+               idx->addr = prel31_to_addr(&idx->addr);
+
+       pr_debug("unwind: ARM stack unwinding initialised\n");
+
+       return 0;
+}
index 00216071eaf72d2bf87ddccbfe4f6a95e4ce2d4f..5f664599c945bab7e696f2b234378ad41ee00c03 100644 (file)
@@ -80,6 +80,8 @@ SECTIONS
                EXIT_TEXT
                EXIT_DATA
                *(.exitcall.exit)
+               *(.ARM.exidx.exit.text)
+               *(.ARM.extab.exit.text)
 #ifndef CONFIG_MMU
                *(.fixup)
                *(__ex_table)
@@ -110,6 +112,23 @@ SECTIONS
 
        _etext = .;                     /* End of text and rodata section */
 
+#ifdef CONFIG_ARM_UNWIND
+       /*
+        * Stack unwinding tables
+        */
+       . = ALIGN(8);
+       .ARM.unwind_idx : {
+               __start_unwind_idx = .;
+               *(.ARM.exidx*)
+               __stop_unwind_idx = .;
+       }
+       .ARM.unwind_tab : {
+               __start_unwind_tab = .;
+               *(.ARM.extab*)
+               __stop_unwind_tab = .;
+       }
+#endif
+
 #ifdef CONFIG_XIP_KERNEL
        __data_loc = ALIGN(4);          /* location in binary */
        . = PAGE_OFFSET + TEXT_OFFSET;
index 8f4115d734ce18832d005a31086694d643def027..fe08ca1add6f42df2fbbc3ba241fb68815f5eef4 100644 (file)
@@ -16,7 +16,7 @@ static inline void arch_idle(void)
        cpu_do_idle();
 }
 
-static inline void arch_reset(char mode)
+static inline void arch_reset(char mode, const char *cmd)
 {
        cpu_reset(0);
 }
index 134af97ff3403f1c309b4b6c962665c860fa796d..b7f23324231560635b0d053ac7fac703a249e19f 100644 (file)
@@ -347,6 +347,111 @@ void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data)
 void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) {}
 #endif
 
+/* --------------------------------------------------------------------
+ *  Compact Flash (PCMCIA or IDE)
+ * -------------------------------------------------------------------- */
+
+#if defined(CONFIG_AT91_CF) || defined(CONFIG_AT91_CF_MODULE) || \
+    defined(CONFIG_BLK_DEV_IDE_AT91) || defined(CONFIG_BLK_DEV_IDE_AT91_MODULE)
+
+static struct at91_cf_data cf0_data;
+
+static struct resource cf0_resources[] = {
+       [0] = {
+               .start  = AT91_CHIPSELECT_4,
+               .end    = AT91_CHIPSELECT_4 + SZ_256M - 1,
+               .flags  = IORESOURCE_MEM | IORESOURCE_MEM_8AND16BIT,
+       }
+};
+
+static struct platform_device cf0_device = {
+       .id             = 0,
+       .dev            = {
+                               .platform_data  = &cf0_data,
+       },
+       .resource       = cf0_resources,
+       .num_resources  = ARRAY_SIZE(cf0_resources),
+};
+
+static struct at91_cf_data cf1_data;
+
+static struct resource cf1_resources[] = {
+       [0] = {
+               .start  = AT91_CHIPSELECT_5,
+               .end    = AT91_CHIPSELECT_5 + SZ_256M - 1,
+               .flags  = IORESOURCE_MEM | IORESOURCE_MEM_8AND16BIT,
+       }
+};
+
+static struct platform_device cf1_device = {
+       .id             = 1,
+       .dev            = {
+                               .platform_data  = &cf1_data,
+       },
+       .resource       = cf1_resources,
+       .num_resources  = ARRAY_SIZE(cf1_resources),
+};
+
+void __init at91_add_device_cf(struct at91_cf_data *data)
+{
+       unsigned long ebi0_csa;
+       struct platform_device *pdev;
+
+       if (!data)
+               return;
+
+       /*
+        * assign CS4 or CS5 to SMC with Compact Flash logic support,
+        * we assume SMC timings are configured by board code,
+        * except True IDE where timings are controlled by driver
+        */
+       ebi0_csa = at91_sys_read(AT91_MATRIX_EBI0CSA);
+       switch (data->chipselect) {
+       case 4:
+               at91_set_A_periph(AT91_PIN_PD6, 0);  /* EBI0_NCS4/CFCS0 */
+               ebi0_csa |= AT91_MATRIX_EBI0_CS4A_SMC_CF1;
+               cf0_data = *data;
+               pdev = &cf0_device;
+               break;
+       case 5:
+               at91_set_A_periph(AT91_PIN_PD7, 0);  /* EBI0_NCS5/CFCS1 */
+               ebi0_csa |= AT91_MATRIX_EBI0_CS5A_SMC_CF2;
+               cf1_data = *data;
+               pdev = &cf1_device;
+               break;
+       default:
+               printk(KERN_ERR "AT91 CF: bad chip-select requested (%u)\n",
+                      data->chipselect);
+               return;
+       }
+       at91_sys_write(AT91_MATRIX_EBI0CSA, ebi0_csa);
+
+       if (data->det_pin) {
+               at91_set_gpio_input(data->det_pin, 1);
+               at91_set_deglitch(data->det_pin, 1);
+       }
+
+       if (data->irq_pin) {
+               at91_set_gpio_input(data->irq_pin, 1);
+               at91_set_deglitch(data->irq_pin, 1);
+       }
+
+       if (data->vcc_pin)
+               /* initially off */
+               at91_set_gpio_output(data->vcc_pin, 0);
+
+       /* enable EBI controlled pins */
+       at91_set_A_periph(AT91_PIN_PD5, 1);  /* NWAIT */
+       at91_set_A_periph(AT91_PIN_PD8, 0);  /* CFCE1 */
+       at91_set_A_periph(AT91_PIN_PD9, 0);  /* CFCE2 */
+       at91_set_A_periph(AT91_PIN_PD14, 0); /* CFNRW */
+
+       pdev->name = (data->flags & AT91_CF_TRUE_IDE) ? "at91_ide" : "at91_cf";
+       platform_device_register(pdev);
+}
+#else
+void __init at91_add_device_cf(struct at91_cf_data *data) {}
+#endif
 
 /* --------------------------------------------------------------------
  *  NAND / SmartMedia
index 81439fe6fb3d7bc368ce1656870aa1d476d98b67..438efbb1748274cf7daa04110ebdaf9ae9aadf20 100644 (file)
@@ -238,6 +238,10 @@ static void __init ek_board_init(void)
        at91_add_device_i2c(NULL, 0);
        /* LEDs */
        at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
+       /* PCK0 provides MCLK to the WM8731 */
+       at91_set_B_periph(AT91_PIN_PC1, 0);
+       /* SSC (for WM8731) */
+       at91_add_device_ssc(AT91SAM9260_ID_SSC, ATMEL_SSC_TX);
 }
 
 MACHINE_START(AT91SAM9G20EK, "Atmel AT91SAM9G20-EK")
index 7b9ce7a336b0ad897ec21fe0ff956598e8f5a867..b5daf7f5e011a797cc6b88f75ae9b9170a451174 100644 (file)
@@ -47,9 +47,6 @@ extern void at91_irq_resume(void);
 #define AT91RM9200_BGA         4       /* AT91RM9200 BGA package has 4 banks */
 
 struct at91_gpio_bank {
-       unsigned chipbase;              /* bank's first GPIO number */
-       void __iomem *regbase;          /* base of register bank */
-       struct at91_gpio_bank *next;    /* bank sharing same IRQ/clock/... */
        unsigned short id;              /* peripheral ID */
        unsigned long offset;           /* offset from system peripheral base */
        struct clk *clock;              /* associated clock */
index 2f7d4977dce95b3c43c575d2696b30888af5e187..f2236f0e101f6ba522529e1708c219cf587fa8b3 100644 (file)
 #include <mach/at91_pio.h>
 #include <mach/gpio.h>
 
+#include <asm/gpio.h>
+
 #include "generic.h"
 
+struct at91_gpio_chip {
+       struct gpio_chip        chip;
+       struct at91_gpio_chip   *next;          /* Bank sharing same clock */
+       struct at91_gpio_bank   *bank;          /* Bank definition */
+       void __iomem            *regbase;       /* Base of register bank */
+};
 
-static struct at91_gpio_bank *gpio;
-static int gpio_banks;
+#define to_at91_gpio_chip(c) container_of(c, struct at91_gpio_chip, chip)
+
+static void at91_gpiolib_dbg_show(struct seq_file *s, struct gpio_chip *chip);
+static void at91_gpiolib_set(struct gpio_chip *chip, unsigned offset, int val);
+static int at91_gpiolib_get(struct gpio_chip *chip, unsigned offset);
+static int at91_gpiolib_direction_output(struct gpio_chip *chip,
+                                        unsigned offset, int val);
+static int at91_gpiolib_direction_input(struct gpio_chip *chip,
+                                       unsigned offset);
+static int at91_gpiolib_request(struct gpio_chip *chip, unsigned offset);
+
+#define AT91_GPIO_CHIP(name, base_gpio, nr_gpio)                       \
+       {                                                               \
+               .chip = {                                               \
+                       .label            = name,                       \
+                       .request          = at91_gpiolib_request,       \
+                       .direction_input  = at91_gpiolib_direction_input, \
+                       .direction_output = at91_gpiolib_direction_output, \
+                       .get              = at91_gpiolib_get,           \
+                       .set              = at91_gpiolib_set,           \
+                       .dbg_show         = at91_gpiolib_dbg_show,      \
+                       .base             = base_gpio,                  \
+                       .ngpio            = nr_gpio,                    \
+               },                                                      \
+       }
+
+static struct at91_gpio_chip gpio_chip[] = {
+       AT91_GPIO_CHIP("A", 0x00 + PIN_BASE, 32),
+       AT91_GPIO_CHIP("B", 0x20 + PIN_BASE, 32),
+       AT91_GPIO_CHIP("C", 0x40 + PIN_BASE, 32),
+       AT91_GPIO_CHIP("D", 0x60 + PIN_BASE, 32),
+       AT91_GPIO_CHIP("E", 0x80 + PIN_BASE, 32),
+};
 
+static int gpio_banks;
 
 static inline void __iomem *pin_to_controller(unsigned pin)
 {
        pin -= PIN_BASE;
        pin /= 32;
        if (likely(pin < gpio_banks))
-               return gpio[pin].regbase;
+               return gpio_chip[pin].regbase;
 
        return NULL;
 }
@@ -197,39 +237,6 @@ int __init_or_module at91_set_multi_drive(unsigned pin, int is_on)
 }
 EXPORT_SYMBOL(at91_set_multi_drive);
 
-/*--------------------------------------------------------------------------*/
-
-/* new-style GPIO calls; these expect at91_set_GPIO_periph to have been
- * called, and maybe at91_set_multi_drive() for putout pins.
- */
-
-int gpio_direction_input(unsigned pin)
-{
-       void __iomem    *pio = pin_to_controller(pin);
-       unsigned        mask = pin_to_mask(pin);
-
-       if (!pio || !(__raw_readl(pio + PIO_PSR) & mask))
-               return -EINVAL;
-       __raw_writel(mask, pio + PIO_ODR);
-       return 0;
-}
-EXPORT_SYMBOL(gpio_direction_input);
-
-int gpio_direction_output(unsigned pin, int value)
-{
-       void __iomem    *pio = pin_to_controller(pin);
-       unsigned        mask = pin_to_mask(pin);
-
-       if (!pio || !(__raw_readl(pio + PIO_PSR) & mask))
-               return -EINVAL;
-       __raw_writel(mask, pio + (value ? PIO_SODR : PIO_CODR));
-       __raw_writel(mask, pio + PIO_OER);
-       return 0;
-}
-EXPORT_SYMBOL(gpio_direction_output);
-
-/*--------------------------------------------------------------------------*/
-
 /*
  * assuming the pin is muxed as a gpio output, set its value.
  */
@@ -282,7 +289,7 @@ static int gpio_irq_set_wake(unsigned pin, unsigned state)
        else
                wakeups[bank] &= ~mask;
 
-       set_irq_wake(gpio[bank].id, state);
+       set_irq_wake(gpio_chip[bank].bank->id, state);
 
        return 0;
 }
@@ -292,14 +299,14 @@ void at91_gpio_suspend(void)
        int i;
 
        for (i = 0; i < gpio_banks; i++) {
-               void __iomem    *pio = gpio[i].regbase;
+               void __iomem    *pio = gpio_chip[i].regbase;
 
                backups[i] = __raw_readl(pio + PIO_IMR);
                __raw_writel(backups[i], pio + PIO_IDR);
                __raw_writel(wakeups[i], pio + PIO_IER);
 
                if (!wakeups[i])
-                       clk_disable(gpio[i].clock);
+                       clk_disable(gpio_chip[i].bank->clock);
                else {
 #ifdef CONFIG_PM_DEBUG
                        printk(KERN_DEBUG "GPIO-%c may wake for %08x\n", 'A'+i, wakeups[i]);
@@ -313,10 +320,10 @@ void at91_gpio_resume(void)
        int i;
 
        for (i = 0; i < gpio_banks; i++) {
-               void __iomem    *pio = gpio[i].regbase;
+               void __iomem    *pio = gpio_chip[i].regbase;
 
                if (!wakeups[i])
-                       clk_enable(gpio[i].clock);
+                       clk_enable(gpio_chip[i].bank->clock);
 
                __raw_writel(wakeups[i], pio + PIO_IDR);
                __raw_writel(backups[i], pio + PIO_IER);
@@ -380,12 +387,12 @@ static void gpio_irq_handler(unsigned irq, struct irq_desc *desc)
 {
        unsigned        pin;
        struct irq_desc *gpio;
-       struct at91_gpio_bank *bank;
+       struct at91_gpio_chip *at91_gpio;
        void __iomem    *pio;
        u32             isr;
 
-       bank = get_irq_chip_data(irq);
-       pio = bank->regbase;
+       at91_gpio = get_irq_chip_data(irq);
+       pio = at91_gpio->regbase;
 
        /* temporarily mask (level sensitive) parent IRQ */
        desc->chip->ack(irq);
@@ -396,14 +403,14 @@ static void gpio_irq_handler(unsigned irq, struct irq_desc *desc)
                 */
                isr = __raw_readl(pio + PIO_ISR) & __raw_readl(pio + PIO_IMR);
                if (!isr) {
-                       if (!bank->next)
+                       if (!at91_gpio->next)
                                break;
-                       bank = bank->next;
-                       pio = bank->regbase;
+                       at91_gpio = at91_gpio->next;
+                       pio = at91_gpio->regbase;
                        continue;
                }
 
-               pin = bank->chipbase;
+               pin = at91_gpio->chip.base;
                gpio = &irq_desc[pin];
 
                while (isr) {
@@ -502,17 +509,17 @@ static struct lock_class_key gpio_lock_class;
 void __init at91_gpio_irq_setup(void)
 {
        unsigned                pioc, pin;
-       struct at91_gpio_bank   *this, *prev;
+       struct at91_gpio_chip   *this, *prev;
 
-       for (pioc = 0, pin = PIN_BASE, this = gpio, prev = NULL;
+       for (pioc = 0, pin = PIN_BASE, this = gpio_chip, prev = NULL;
                        pioc++ < gpio_banks;
                        prev = this, this++) {
-               unsigned        id = this->id;
+               unsigned        id = this->bank->id;
                unsigned        i;
 
                __raw_writel(~0, this->regbase + PIO_IDR);
 
-               for (i = 0, pin = this->chipbase; i < 32; i++, pin++) {
+               for (i = 0, pin = this->chip.base; i < 32; i++, pin++) {
                        lockdep_set_class(&irq_desc[pin].lock, &gpio_lock_class);
 
                        /*
@@ -537,32 +544,117 @@ void __init at91_gpio_irq_setup(void)
        pr_info("AT91: %d gpio irqs in %d banks\n", pin - PIN_BASE, gpio_banks);
 }
 
+/* gpiolib support */
+static int at91_gpiolib_direction_input(struct gpio_chip *chip,
+                                       unsigned offset)
+{
+       struct at91_gpio_chip *at91_gpio = to_at91_gpio_chip(chip);
+       void __iomem *pio = at91_gpio->regbase;
+       unsigned mask = 1 << offset;
+
+       __raw_writel(mask, pio + PIO_ODR);
+       return 0;
+}
+
+static int at91_gpiolib_direction_output(struct gpio_chip *chip,
+                                        unsigned offset, int val)
+{
+       struct at91_gpio_chip *at91_gpio = to_at91_gpio_chip(chip);
+       void __iomem *pio = at91_gpio->regbase;
+       unsigned mask = 1 << offset;
+
+       __raw_writel(mask, pio + (val ? PIO_SODR : PIO_CODR));
+       __raw_writel(mask, pio + PIO_OER);
+       return 0;
+}
+
+static int at91_gpiolib_get(struct gpio_chip *chip, unsigned offset)
+{
+       struct at91_gpio_chip *at91_gpio = to_at91_gpio_chip(chip);
+       void __iomem *pio = at91_gpio->regbase;
+       unsigned mask = 1 << offset;
+       u32 pdsr;
+
+       pdsr = __raw_readl(pio + PIO_PDSR);
+       return (pdsr & mask) != 0;
+}
+
+static void at91_gpiolib_set(struct gpio_chip *chip, unsigned offset, int val)
+{
+       struct at91_gpio_chip *at91_gpio = to_at91_gpio_chip(chip);
+       void __iomem *pio = at91_gpio->regbase;
+       unsigned mask = 1 << offset;
+
+       __raw_writel(mask, pio + (val ? PIO_SODR : PIO_CODR));
+}
+
+static int at91_gpiolib_request(struct gpio_chip *chip, unsigned offset)
+{
+       unsigned pin = chip->base + offset;
+       void __iomem *pio = pin_to_controller(pin);
+       unsigned mask = pin_to_mask(pin);
+
+       /* Cannot request GPIOs that are in alternate function mode */
+       if (!(__raw_readl(pio + PIO_PSR) & mask))
+               return -EPERM;
+
+       return 0;
+}
+
+static void at91_gpiolib_dbg_show(struct seq_file *s, struct gpio_chip *chip)
+{
+       int i;
+
+       for (i = 0; i < chip->ngpio; i++) {
+               unsigned pin = chip->base + i;
+               void __iomem *pio = pin_to_controller(pin);
+               unsigned mask = pin_to_mask(pin);
+               const char *gpio_label;
+
+               gpio_label = gpiochip_is_requested(chip, i);
+               if (gpio_label) {
+                       seq_printf(s, "[%s] GPIO%s%d: ",
+                                  gpio_label, chip->label, i);
+                       if (__raw_readl(pio + PIO_PSR) & mask)
+                               seq_printf(s, "[gpio] %s\n",
+                                          at91_get_gpio_value(pin) ?
+                                          "set" : "clear");
+                       else
+                               seq_printf(s, "[periph %s]\n",
+                                          __raw_readl(pio + PIO_ABSR) &
+                                          mask ? "B" : "A");
+               }
+       }
+}
+
 /*
  * Called from the processor-specific init to enable GPIO pin support.
  */
 void __init at91_gpio_init(struct at91_gpio_bank *data, int nr_banks)
 {
        unsigned                i;
-       struct at91_gpio_bank   *last;
+       struct at91_gpio_chip *at91_gpio, *last = NULL;
 
        BUG_ON(nr_banks > MAX_GPIO_BANKS);
 
-       gpio = data;
        gpio_banks = nr_banks;
 
-       for (i = 0, last = NULL; i < nr_banks; i++, last = data, data++) {
-               data->chipbase = PIN_BASE + i * 32;
-               data->regbase = data->offset + (void __iomem *)AT91_VA_BASE_SYS;
+       for (i = 0; i < nr_banks; i++) {
+               at91_gpio = &gpio_chip[i];
+
+               at91_gpio->bank = &data[i];
+               at91_gpio->chip.base = PIN_BASE + i * 32;
+               at91_gpio->regbase = at91_gpio->bank->offset +
+                       (void __iomem *)AT91_VA_BASE_SYS;
 
                /* enable PIO controller's clock */
-               clk_enable(data->clock);
+               clk_enable(at91_gpio->bank->clock);
 
-               /*
-                * Some processors share peripheral ID between multiple GPIO banks.
-                *  SAM9263 (PIOC, PIOD, PIOE)
-                *  CAP9 (PIOA, PIOB, PIOC, PIOD)
-                */
-               if (last && last->id == data->id)
-                       last->next = data;
+               /* AT91SAM9263_ID_PIOCDE groups PIOC, PIOD, PIOE */
+               if (last && last->bank->id == at91_gpio->bank->id)
+                       last->next = at91_gpio;
+               last = at91_gpio;
+
+               gpiochip_add(&at91_gpio->chip);
        }
 }
index 0b3ae21b4565abb471fbedd59c15c96a3e4450f5..793fe7b25f367653292110e5936c1c8b4bcdc3d8 100644 (file)
@@ -56,6 +56,9 @@ struct at91_cf_data {
        u8      vcc_pin;                /* power switching */
        u8      rst_pin;                /* card reset */
        u8      chipselect;             /* EBI Chip Select number */
+       u8      flags;
+#define AT91_CF_TRUE_IDE       0x01
+#define AT91_IDE_SWAP_A0_A2    0x02
 };
 extern void __init at91_add_device_cf(struct at91_cf_data *data);
 
index bffa6741a7515d890179b7a4f1db286287539fcf..04c91e31c9c5be8a7c20ca5a31b6ebef99963f89 100644 (file)
@@ -213,32 +213,12 @@ extern void at91_gpio_resume(void);
  */
 
 #include <asm/errno.h>
-
-static inline int gpio_request(unsigned gpio, const char *label)
-{
-       return 0;
-}
-
-static inline void gpio_free(unsigned gpio)
-{
-       might_sleep();
-}
-
-extern int gpio_direction_input(unsigned gpio);
-extern int gpio_direction_output(unsigned gpio, int value);
-
-static inline int gpio_get_value(unsigned gpio)
-{
-       return at91_get_gpio_value(gpio);
-}
-
-static inline void gpio_set_value(unsigned gpio, int value)
-{
-       at91_set_gpio_value(gpio, value);
-}
-
 #include <asm-generic/gpio.h>          /* cansleep wrappers */
 
+#define gpio_get_value __gpio_get_value
+#define gpio_set_value __gpio_set_value
+#define gpio_cansleep  __gpio_cansleep
+
 static inline int gpio_to_irq(unsigned gpio)
 {
        return gpio;
index e712658d966cdd83f7576f5a4856930173e306df..5268af3933c259d22c2c1ec35d63c133b8fb5456 100644 (file)
@@ -43,7 +43,7 @@ static inline void arch_idle(void)
 
 void (*at91_arch_reset)(void);
 
-static inline void arch_reset(char mode)
+static inline void arch_reset(char mode, const char *cmd)
 {
        /* call the CPU-specific reset function */
        if (at91_arch_reset)
index 24e96159e3e7590a008ab8cfbcdda830d3eb782b..f916cd7a477d14ca8b552f6b2a3fe8b231a8d40e 100644 (file)
@@ -32,7 +32,7 @@ static inline void arch_idle(void)
        mov     r0, r0");
 }
 
-static inline void arch_reset(char mode)
+static inline void arch_reset(char mode, const char *cmd)
 {
        cpu_reset(0);
 }
index 17ca41dc2c5363b2ae8bf9fb625688b437aa718f..b7e7036674fafe55704cc1aed2d92637e115b011 100644 (file)
@@ -21,7 +21,7 @@ static void arch_idle(void)
        cpu_do_idle();
 }
 
-static void arch_reset(char mode)
+static void arch_reset(char mode, const char *cmd)
 {
        davinci_watchdog_reset();
 }
index 350a028997efddc34c8a87606928a0ebc25eef85..9a26245bf1fc58900c39242b90a6e1cabb3eeb14 100644 (file)
@@ -34,6 +34,6 @@ static inline void arch_idle(void)
        asm volatile ("mcr p15, 0, ip, c15, c1, 2" : : : "cc");
 }
 
-#define arch_reset(mode)       cpu_reset(0x80000000)
+#define arch_reset(mode, cmd)  cpu_reset(0x80000000)
 
 #endif
index 944e42d51646d224a2576f1c2739c315941f5f88..9522e205b73fc7a5a04a966893885f6e770f16d7 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Makefile for the linux kernel.
 #
-obj-y                  := core.o clock.o gpio.o
+obj-y                  := core.o clock.o dma-m2p.o gpio.o
 obj-m                  :=
 obj-n                  :=
 obj-                   :=
index 96049283a10a56980fb6979da2e9e6aada13ed92..e8ebeaea6c48c78ed9eda599e512d0d152c73349 100644 (file)
@@ -41,6 +41,56 @@ static struct clk clk_usb_host = {
        .enable_mask    = EP93XX_SYSCON_CLOCK_USH_EN,
 };
 
+/* DMA Clocks */
+static struct clk clk_m2p0 = {
+       .enable_reg     = EP93XX_SYSCON_CLOCK_CONTROL,
+       .enable_mask    = 0x00020000,
+};
+static struct clk clk_m2p1 = {
+       .enable_reg     = EP93XX_SYSCON_CLOCK_CONTROL,
+       .enable_mask    = 0x00010000,
+};
+static struct clk clk_m2p2 = {
+       .enable_reg     = EP93XX_SYSCON_CLOCK_CONTROL,
+       .enable_mask    = 0x00080000,
+};
+static struct clk clk_m2p3 = {
+       .enable_reg     = EP93XX_SYSCON_CLOCK_CONTROL,
+       .enable_mask    = 0x00040000,
+};
+static struct clk clk_m2p4 = {
+       .enable_reg     = EP93XX_SYSCON_CLOCK_CONTROL,
+       .enable_mask    = 0x00200000,
+};
+static struct clk clk_m2p5 = {
+       .enable_reg     = EP93XX_SYSCON_CLOCK_CONTROL,
+       .enable_mask    = 0x00100000,
+};
+static struct clk clk_m2p6 = {
+       .enable_reg     = EP93XX_SYSCON_CLOCK_CONTROL,
+       .enable_mask    = 0x00800000,
+};
+static struct clk clk_m2p7 = {
+       .enable_reg     = EP93XX_SYSCON_CLOCK_CONTROL,
+       .enable_mask    = 0x00400000,
+};
+static struct clk clk_m2p8 = {
+       .enable_reg     = EP93XX_SYSCON_CLOCK_CONTROL,
+       .enable_mask    = 0x02000000,
+};
+static struct clk clk_m2p9 = {
+       .enable_reg     = EP93XX_SYSCON_CLOCK_CONTROL,
+       .enable_mask    = 0x01000000,
+};
+static struct clk clk_m2m0 = {
+       .enable_reg     = EP93XX_SYSCON_CLOCK_CONTROL,
+       .enable_mask    = 0x04000000,
+};
+static struct clk clk_m2m1 = {
+       .enable_reg     = EP93XX_SYSCON_CLOCK_CONTROL,
+       .enable_mask    = 0x08000000,
+};
+
 #define INIT_CK(dev,con,ck)                                    \
        { .dev_id = dev, .con_id = con, .clk = ck }
 
@@ -54,6 +104,18 @@ static struct clk_lookup clocks[] = {
        INIT_CK(NULL, "pclk", &clk_p),
        INIT_CK(NULL, "pll2", &clk_pll2),
        INIT_CK(NULL, "usb_host", &clk_usb_host),
+       INIT_CK(NULL, "m2p0", &clk_m2p0),
+       INIT_CK(NULL, "m2p1", &clk_m2p1),
+       INIT_CK(NULL, "m2p2", &clk_m2p2),
+       INIT_CK(NULL, "m2p3", &clk_m2p3),
+       INIT_CK(NULL, "m2p4", &clk_m2p4),
+       INIT_CK(NULL, "m2p5", &clk_m2p5),
+       INIT_CK(NULL, "m2p6", &clk_m2p6),
+       INIT_CK(NULL, "m2p7", &clk_m2p7),
+       INIT_CK(NULL, "m2p8", &clk_m2p8),
+       INIT_CK(NULL, "m2p9", &clk_m2p9),
+       INIT_CK(NULL, "m2m0", &clk_m2m0),
+       INIT_CK(NULL, "m2m1", &clk_m2m1),
 };
 
 
@@ -110,6 +172,22 @@ static unsigned long calc_pll_rate(u32 config_word)
        return (unsigned long)rate;
 }
 
+static void __init ep93xx_dma_clock_init(void)
+{
+       clk_m2p0.rate = clk_h.rate;
+       clk_m2p1.rate = clk_h.rate;
+       clk_m2p2.rate = clk_h.rate;
+       clk_m2p3.rate = clk_h.rate;
+       clk_m2p4.rate = clk_h.rate;
+       clk_m2p5.rate = clk_h.rate;
+       clk_m2p6.rate = clk_h.rate;
+       clk_m2p7.rate = clk_h.rate;
+       clk_m2p8.rate = clk_h.rate;
+       clk_m2p9.rate = clk_h.rate;
+       clk_m2m0.rate = clk_h.rate;
+       clk_m2m1.rate = clk_h.rate;
+}
+
 static int __init ep93xx_clock_init(void)
 {
        u32 value;
@@ -124,6 +202,7 @@ static int __init ep93xx_clock_init(void)
        clk_f.rate = clk_pll1.rate / fclk_divisors[(value >> 25) & 0x7];
        clk_h.rate = clk_pll1.rate / hclk_divisors[(value >> 20) & 0x7];
        clk_p.rate = clk_h.rate / pclk_divisors[(value >> 18) & 0x3];
+       ep93xx_dma_clock_init();
 
        value = __raw_readl(EP93XX_SYSCON_CLOCK_SET2);
        if (!(value & 0x00080000)) {                    /* PLL2 bypassed?  */
diff --git a/arch/arm/mach-ep93xx/dma-m2p.c b/arch/arm/mach-ep93xx/dma-m2p.c
new file mode 100644 (file)
index 0000000..a2df5bb
--- /dev/null
@@ -0,0 +1,408 @@
+/*
+ * arch/arm/mach-ep93xx/dma-m2p.c
+ * M2P DMA handling for Cirrus EP93xx chips.
+ *
+ * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org>
+ * Copyright (C) 2006 Applied Data Systems
+ *
+ * Copyright (C) 2009 Ryan Mallon <ryan@bluewatersys.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or (at
+ * your option) any later version.
+ */
+
+/*
+ * On the EP93xx chip the following peripherals my be allocated to the 10
+ * Memory to Internal Peripheral (M2P) channels (5 transmit + 5 receive).
+ *
+ *     I2S     contains 3 Tx and 3 Rx DMA Channels
+ *     AAC     contains 3 Tx and 3 Rx DMA Channels
+ *     UART1   contains 1 Tx and 1 Rx DMA Channels
+ *     UART2   contains 1 Tx and 1 Rx DMA Channels
+ *     UART3   contains 1 Tx and 1 Rx DMA Channels
+ *     IrDA    contains 1 Tx and 1 Rx DMA Channels
+ *
+ * SSP and IDE use the Memory to Memory (M2M) channels and are not covered
+ * with this implementation.
+ */
+
+#include <linux/kernel.h>
+#include <linux/clk.h>
+#include <linux/err.h>
+#include <linux/interrupt.h>
+#include <linux/module.h>
+
+#include <mach/dma.h>
+#include <mach/hardware.h>
+
+#define M2P_CONTROL                    0x00
+#define  M2P_CONTROL_STALL_IRQ_EN      (1 << 0)
+#define  M2P_CONTROL_NFB_IRQ_EN                (1 << 1)
+#define  M2P_CONTROL_ERROR_IRQ_EN      (1 << 3)
+#define  M2P_CONTROL_ENABLE            (1 << 4)
+#define M2P_INTERRUPT                  0x04
+#define  M2P_INTERRUPT_STALL           (1 << 0)
+#define  M2P_INTERRUPT_NFB             (1 << 1)
+#define  M2P_INTERRUPT_ERROR           (1 << 3)
+#define M2P_PPALLOC                    0x08
+#define M2P_STATUS                     0x0c
+#define M2P_REMAIN                     0x14
+#define M2P_MAXCNT0                    0x20
+#define M2P_BASE0                      0x24
+#define M2P_MAXCNT1                    0x30
+#define M2P_BASE1                      0x34
+
+#define STATE_IDLE     0       /* Channel is inactive.  */
+#define STATE_STALL    1       /* Channel is active, no buffers pending.  */
+#define STATE_ON       2       /* Channel is active, one buffer pending.  */
+#define STATE_NEXT     3       /* Channel is active, two buffers pending.  */
+
+struct m2p_channel {
+       char                            *name;
+       void __iomem                    *base;
+       int                             irq;
+
+       struct clk                      *clk;
+       spinlock_t                      lock;
+
+       void                            *client;
+       unsigned                        next_slot:1;
+       struct ep93xx_dma_buffer        *buffer_xfer;
+       struct ep93xx_dma_buffer        *buffer_next;
+       struct list_head                buffers_pending;
+};
+
+static struct m2p_channel m2p_rx[] = {
+       {"m2p1", EP93XX_DMA_BASE + 0x0040, IRQ_EP93XX_DMAM2P1},
+       {"m2p3", EP93XX_DMA_BASE + 0x00c0, IRQ_EP93XX_DMAM2P3},
+       {"m2p5", EP93XX_DMA_BASE + 0x0200, IRQ_EP93XX_DMAM2P5},
+       {"m2p7", EP93XX_DMA_BASE + 0x0280, IRQ_EP93XX_DMAM2P7},
+       {"m2p9", EP93XX_DMA_BASE + 0x0300, IRQ_EP93XX_DMAM2P9},
+       {NULL},
+};
+
+static struct m2p_channel m2p_tx[] = {
+       {"m2p0", EP93XX_DMA_BASE + 0x0000, IRQ_EP93XX_DMAM2P0},
+       {"m2p2", EP93XX_DMA_BASE + 0x0080, IRQ_EP93XX_DMAM2P2},
+       {"m2p4", EP93XX_DMA_BASE + 0x0240, IRQ_EP93XX_DMAM2P4},
+       {"m2p6", EP93XX_DMA_BASE + 0x02c0, IRQ_EP93XX_DMAM2P6},
+       {"m2p8", EP93XX_DMA_BASE + 0x0340, IRQ_EP93XX_DMAM2P8},
+       {NULL},
+};
+
+static void feed_buf(struct m2p_channel *ch, struct ep93xx_dma_buffer *buf)
+{
+       if (ch->next_slot == 0) {
+               writel(buf->size, ch->base + M2P_MAXCNT0);
+               writel(buf->bus_addr, ch->base + M2P_BASE0);
+       } else {
+               writel(buf->size, ch->base + M2P_MAXCNT1);
+               writel(buf->bus_addr, ch->base + M2P_BASE1);
+       }
+       ch->next_slot ^= 1;
+}
+
+static void choose_buffer_xfer(struct m2p_channel *ch)
+{
+       struct ep93xx_dma_buffer *buf;
+
+       ch->buffer_xfer = NULL;
+       if (!list_empty(&ch->buffers_pending)) {
+               buf = list_entry(ch->buffers_pending.next,
+                                struct ep93xx_dma_buffer, list);
+               list_del(&buf->list);
+               feed_buf(ch, buf);
+               ch->buffer_xfer = buf;
+       }
+}
+
+static void choose_buffer_next(struct m2p_channel *ch)
+{
+       struct ep93xx_dma_buffer *buf;
+
+       ch->buffer_next = NULL;
+       if (!list_empty(&ch->buffers_pending)) {
+               buf = list_entry(ch->buffers_pending.next,
+                                struct ep93xx_dma_buffer, list);
+               list_del(&buf->list);
+               feed_buf(ch, buf);
+               ch->buffer_next = buf;
+       }
+}
+
+static inline void m2p_set_control(struct m2p_channel *ch, u32 v)
+{
+       /*
+        * The control register must be read immediately after being written so
+        * that the internal state machine is correctly updated. See the ep93xx
+        * users' guide for details.
+        */
+       writel(v, ch->base + M2P_CONTROL);
+       readl(ch->base + M2P_CONTROL);
+}
+
+static inline int m2p_channel_state(struct m2p_channel *ch)
+{
+       return (readl(ch->base + M2P_STATUS) >> 4) & 0x3;
+}
+
+static irqreturn_t m2p_irq(int irq, void *dev_id)
+{
+       struct m2p_channel *ch = dev_id;
+       struct ep93xx_dma_m2p_client *cl;
+       u32 irq_status, v;
+       int error = 0;
+
+       cl = ch->client;
+
+       spin_lock(&ch->lock);
+       irq_status = readl(ch->base + M2P_INTERRUPT);
+
+       if (irq_status & M2P_INTERRUPT_ERROR) {
+               writel(M2P_INTERRUPT_ERROR, ch->base + M2P_INTERRUPT);
+               error = 1;
+       }
+
+       if ((irq_status & (M2P_INTERRUPT_STALL | M2P_INTERRUPT_NFB)) == 0) {
+               spin_unlock(&ch->lock);
+               return IRQ_NONE;
+       }
+
+       switch (m2p_channel_state(ch)) {
+       case STATE_IDLE:
+               pr_crit("m2p_irq: dma interrupt without a dma buffer\n");
+               BUG();
+               break;
+
+       case STATE_STALL:
+               cl->buffer_finished(cl->cookie, ch->buffer_xfer, 0, error);
+               if (ch->buffer_next != NULL) {
+                       cl->buffer_finished(cl->cookie, ch->buffer_next,
+                                           0, error);
+               }
+               choose_buffer_xfer(ch);
+               choose_buffer_next(ch);
+               if (ch->buffer_xfer != NULL)
+                       cl->buffer_started(cl->cookie, ch->buffer_xfer);
+               break;
+
+       case STATE_ON:
+               cl->buffer_finished(cl->cookie, ch->buffer_xfer, 0, error);
+               ch->buffer_xfer = ch->buffer_next;
+               choose_buffer_next(ch);
+               cl->buffer_started(cl->cookie, ch->buffer_xfer);
+               break;
+
+       case STATE_NEXT:
+               pr_crit("m2p_irq: dma interrupt while next\n");
+               BUG();
+               break;
+       }
+
+       v = readl(ch->base + M2P_CONTROL) & ~(M2P_CONTROL_STALL_IRQ_EN |
+                                             M2P_CONTROL_NFB_IRQ_EN);
+       if (ch->buffer_xfer != NULL)
+               v |= M2P_CONTROL_STALL_IRQ_EN;
+       if (ch->buffer_next != NULL)
+               v |= M2P_CONTROL_NFB_IRQ_EN;
+       m2p_set_control(ch, v);
+
+       spin_unlock(&ch->lock);
+       return IRQ_HANDLED;
+}
+
+static struct m2p_channel *find_free_channel(struct ep93xx_dma_m2p_client *cl)
+{
+       struct m2p_channel *ch;
+       int i;
+
+       if (cl->flags & EP93XX_DMA_M2P_RX)
+               ch = m2p_rx;
+       else
+               ch = m2p_tx;
+
+       for (i = 0; ch[i].base; i++) {
+               struct ep93xx_dma_m2p_client *client;
+
+               client = ch[i].client;
+               if (client != NULL) {
+                       int port;
+
+                       port = cl->flags & EP93XX_DMA_M2P_PORT_MASK;
+                       if (port == (client->flags &
+                                    EP93XX_DMA_M2P_PORT_MASK)) {
+                               pr_warning("DMA channel already used by %s\n",
+                                          cl->name ? : "unknown client");
+                               return ERR_PTR(-EBUSY);
+                       }
+               }
+       }
+
+       for (i = 0; ch[i].base; i++) {
+               if (ch[i].client == NULL)
+                       return ch + i;
+       }
+
+       pr_warning("No free DMA channel for %s\n",
+                  cl->name ? : "unknown client");
+       return ERR_PTR(-ENODEV);
+}
+
+static void channel_enable(struct m2p_channel *ch)
+{
+       struct ep93xx_dma_m2p_client *cl = ch->client;
+       u32 v;
+
+       clk_enable(ch->clk);
+
+       v = cl->flags & EP93XX_DMA_M2P_PORT_MASK;
+       writel(v, ch->base + M2P_PPALLOC);
+
+       v = cl->flags & EP93XX_DMA_M2P_ERROR_MASK;
+       v |= M2P_CONTROL_ENABLE | M2P_CONTROL_ERROR_IRQ_EN;
+       m2p_set_control(ch, v);
+}
+
+static void channel_disable(struct m2p_channel *ch)
+{
+       u32 v;
+
+       v = readl(ch->base + M2P_CONTROL);
+       v &= ~(M2P_CONTROL_STALL_IRQ_EN | M2P_CONTROL_NFB_IRQ_EN);
+       m2p_set_control(ch, v);
+
+       while (m2p_channel_state(ch) == STATE_ON)
+               cpu_relax();
+
+       m2p_set_control(ch, 0x0);
+
+       while (m2p_channel_state(ch) == STATE_STALL)
+               cpu_relax();
+
+       clk_disable(ch->clk);
+}
+
+int ep93xx_dma_m2p_client_register(struct ep93xx_dma_m2p_client *cl)
+{
+       struct m2p_channel *ch;
+       int err;
+
+       ch = find_free_channel(cl);
+       if (IS_ERR(ch))
+               return PTR_ERR(ch);
+
+       err = request_irq(ch->irq, m2p_irq, 0, cl->name ? : "dma-m2p", ch);
+       if (err)
+               return err;
+
+       ch->client = cl;
+       ch->next_slot = 0;
+       ch->buffer_xfer = NULL;
+       ch->buffer_next = NULL;
+       INIT_LIST_HEAD(&ch->buffers_pending);
+
+       cl->channel = ch;
+
+       channel_enable(ch);
+
+       return 0;
+}
+EXPORT_SYMBOL_GPL(ep93xx_dma_m2p_client_register);
+
+void ep93xx_dma_m2p_client_unregister(struct ep93xx_dma_m2p_client *cl)
+{
+       struct m2p_channel *ch = cl->channel;
+
+       channel_disable(ch);
+       free_irq(ch->irq, ch);
+       ch->client = NULL;
+}
+EXPORT_SYMBOL_GPL(ep93xx_dma_m2p_client_unregister);
+
+void ep93xx_dma_m2p_submit(struct ep93xx_dma_m2p_client *cl,
+                          struct ep93xx_dma_buffer *buf)
+{
+       struct m2p_channel *ch = cl->channel;
+       unsigned long flags;
+       u32 v;
+
+       spin_lock_irqsave(&ch->lock, flags);
+       v = readl(ch->base + M2P_CONTROL);
+       if (ch->buffer_xfer == NULL) {
+               ch->buffer_xfer = buf;
+               feed_buf(ch, buf);
+               cl->buffer_started(cl->cookie, buf);
+
+               v |= M2P_CONTROL_STALL_IRQ_EN;
+               m2p_set_control(ch, v);
+
+       } else if (ch->buffer_next == NULL) {
+               ch->buffer_next = buf;
+               feed_buf(ch, buf);
+
+               v |= M2P_CONTROL_NFB_IRQ_EN;
+               m2p_set_control(ch, v);
+       } else {
+               list_add_tail(&buf->list, &ch->buffers_pending);
+       }
+       spin_unlock_irqrestore(&ch->lock, flags);
+}
+EXPORT_SYMBOL_GPL(ep93xx_dma_m2p_submit);
+
+void ep93xx_dma_m2p_submit_recursive(struct ep93xx_dma_m2p_client *cl,
+                                    struct ep93xx_dma_buffer *buf)
+{
+       struct m2p_channel *ch = cl->channel;
+
+       list_add_tail(&buf->list, &ch->buffers_pending);
+}
+EXPORT_SYMBOL_GPL(ep93xx_dma_m2p_submit_recursive);
+
+void ep93xx_dma_m2p_flush(struct ep93xx_dma_m2p_client *cl)
+{
+       struct m2p_channel *ch = cl->channel;
+
+       channel_disable(ch);
+       ch->next_slot = 0;
+       ch->buffer_xfer = NULL;
+       ch->buffer_next = NULL;
+       INIT_LIST_HEAD(&ch->buffers_pending);
+       channel_enable(ch);
+}
+EXPORT_SYMBOL_GPL(ep93xx_dma_m2p_flush);
+
+static int init_channel(struct m2p_channel *ch)
+{
+       ch->clk = clk_get(NULL, ch->name);
+       if (IS_ERR(ch->clk))
+               return PTR_ERR(ch->clk);
+
+       spin_lock_init(&ch->lock);
+       ch->client = NULL;
+
+       return 0;
+}
+
+static int __init ep93xx_dma_m2p_init(void)
+{
+       int i;
+       int ret;
+
+       for (i = 0; m2p_rx[i].base; i++) {
+               ret = init_channel(m2p_rx + i);
+               if (ret)
+                       return ret;
+       }
+
+       for (i = 0; m2p_tx[i].base; i++) {
+               ret = init_channel(m2p_tx + i);
+               if (ret)
+                       return ret;
+       }
+
+       pr_info("M2P DMA subsystem initialized\n");
+       return 0;
+}
+arch_initcall(ep93xx_dma_m2p_init);
index 5b5c22b681beb8436971329c11b46ee5a8e04c55..6171167d3315c7ddec6c3ece1667074526c89fc1 100644 (file)
@@ -48,12 +48,24 @@ static struct ep93xx_eth_data edb9307a_eth_data = {
        .phy_id         = 1,
 };
 
+static struct i2c_board_info __initdata edb9307a_i2c_data[] = {
+       {
+               /* On-board battery backed RTC */
+               I2C_BOARD_INFO("isl1208", 0x6f),
+       },
+       /*
+        * The I2C signals are also routed to the Expansion Connector (J4)
+        */
+};
+
 static void __init edb9307a_init_machine(void)
 {
        ep93xx_init_devices();
        platform_device_register(&edb9307a_flash);
 
        ep93xx_register_eth(&edb9307a_eth_data, 1);
+
+       ep93xx_init_i2c(edb9307a_i2c_data, ARRAY_SIZE(edb9307a_i2c_data));
 }
 
 MACHINE_START(EDB9307A, "Cirrus Logic EDB9307A Evaluation Board")
diff --git a/arch/arm/mach-ep93xx/include/mach/dma.h b/arch/arm/mach-ep93xx/include/mach/dma.h
new file mode 100644 (file)
index 0000000..ef6bd9d
--- /dev/null
@@ -0,0 +1,52 @@
+#ifndef __ASM_ARCH_DMA_H
+#define __ASM_ARCH_DMA_H
+
+#include <linux/list.h>
+#include <linux/types.h>
+
+struct ep93xx_dma_buffer {
+       struct list_head        list;
+       u32                     bus_addr;
+       u16                     size;
+};
+
+struct ep93xx_dma_m2p_client {
+       char                    *name;
+       u8                      flags;
+       void                    *cookie;
+       void                    (*buffer_started)(void *cookie,
+                                       struct ep93xx_dma_buffer *buf);
+       void                    (*buffer_finished)(void *cookie,
+                                       struct ep93xx_dma_buffer *buf,
+                                       int bytes, int error);
+
+       /* Internal to the DMA code.  */
+       void                    *channel;
+};
+
+#define EP93XX_DMA_M2P_PORT_I2S1       0x00
+#define EP93XX_DMA_M2P_PORT_I2S2       0x01
+#define EP93XX_DMA_M2P_PORT_AAC1       0x02
+#define EP93XX_DMA_M2P_PORT_AAC2       0x03
+#define EP93XX_DMA_M2P_PORT_AAC3       0x04
+#define EP93XX_DMA_M2P_PORT_I2S3       0x05
+#define EP93XX_DMA_M2P_PORT_UART1      0x06
+#define EP93XX_DMA_M2P_PORT_UART2      0x07
+#define EP93XX_DMA_M2P_PORT_UART3      0x08
+#define EP93XX_DMA_M2P_PORT_IRDA       0x09
+#define EP93XX_DMA_M2P_PORT_MASK       0x0f
+#define EP93XX_DMA_M2P_TX              0x00
+#define EP93XX_DMA_M2P_RX              0x10
+#define EP93XX_DMA_M2P_ABORT_ON_ERROR  0x20
+#define EP93XX_DMA_M2P_IGNORE_ERROR    0x40
+#define EP93XX_DMA_M2P_ERROR_MASK      0x60
+
+int  ep93xx_dma_m2p_client_register(struct ep93xx_dma_m2p_client *m2p);
+void ep93xx_dma_m2p_client_unregister(struct ep93xx_dma_m2p_client *m2p);
+void ep93xx_dma_m2p_submit(struct ep93xx_dma_m2p_client *m2p,
+                          struct ep93xx_dma_buffer *buf);
+void ep93xx_dma_m2p_submit_recursive(struct ep93xx_dma_m2p_client *m2p,
+                                    struct ep93xx_dma_buffer *buf);
+void ep93xx_dma_m2p_flush(struct ep93xx_dma_m2p_client *m2p);
+
+#endif /* __ASM_ARCH_DMA_H */
index 22d6c9a6e4cadc565f1adba45503b54451b59386..f66be12b856e21e435163712ad3c479e8b51921f 100644 (file)
@@ -58,7 +58,8 @@
 
 
 /* AHB peripherals */
-#define EP93XX_DMA_BASE                        (EP93XX_AHB_VIRT_BASE + 0x00000000)
+#define EP93XX_DMA_BASE                        ((void __iomem *)               \
+                                        (EP93XX_AHB_VIRT_BASE + 0x00000000))
 
 #define EP93XX_ETHERNET_BASE           (EP93XX_AHB_VIRT_BASE + 0x00010000)
 #define EP93XX_ETHERNET_PHYS_BASE      (EP93XX_AHB_PHYS_BASE + 0x00010000)
index 67789d0f329e5013c3072e7a5ffa91a633ef18c8..ed8f35e4f068f29c6c6c39934cded13712108d88 100644 (file)
@@ -9,7 +9,7 @@ static inline void arch_idle(void)
        cpu_do_idle();
 }
 
-static inline void arch_reset(char mode)
+static inline void arch_reset(char mode, const char *cmd)
 {
        u32 devicecfg;
 
index 4f3506346969d6214dd12004e48c057f31bd6b07..e2e0df8bcee27deb9ec5c8028b5cadca91c91d94 100644 (file)
 #include <asm/hardware/dec21285.h>
 
 #if 0
-static int fb_dma_request(dmach_t channel, dma_t *dma)
+static int fb_dma_request(unsigned int chan, dma_t *dma)
 {
        return -EINVAL;
 }
 
-static void fb_dma_enable(dmach_t channel, dma_t *dma)
+static void fb_dma_enable(unsigned int chan, dma_t *dma)
 {
 }
 
-static void fb_dma_disable(dmach_t channel, dma_t *dma)
+static void fb_dma_disable(unsigned int chan, dma_t *dma)
 {
 }
 
@@ -42,7 +42,7 @@ static struct dma_ops fb_dma_ops = {
 };
 #endif
 
-void __init arch_dma_init(dma_t *dma)
+static int __init fb_dma_init(void)
 {
 #if 0
        dma[_DC21285_DMA(0)].d_ops = &fb_dma_ops;
@@ -50,6 +50,8 @@ void __init arch_dma_init(dma_t *dma)
 #endif
 #ifdef CONFIG_ISA_DMA
        if (footbridge_cfn_mode())
-               isa_init_dma(dma + _ISA_DMA(0));
+               isa_init_dma();
 #endif
+       return 0;
 }
+core_initcall(fb_dma_init);
index 2db7f36bd6ca44ed09381f0fddd932fc224afa9c..0b293156620948269d1b6a6ca6e01079947d5762 100644 (file)
@@ -18,7 +18,7 @@ static inline void arch_idle(void)
        cpu_do_idle();
 }
 
-static inline void arch_reset(char mode)
+static inline void arch_reset(char mode, const char *cmd)
 {
        if (mode == 's') {
                /*
index e4a7c760d52a584f4321d233beaa523163cd8dd4..a708d24ee46d67a80d2129860c7c91e20029cfea 100644 (file)
@@ -25,7 +25,7 @@ static void arch_idle(void)
 }
 
 
-static __inline__ void arch_reset(char mode)
+static __inline__ void arch_reset(char mode, const char *cmd)
 {
        CPU_REG (PMU_BASE, PMU_STAT) |= PMU_WARMRESET;
 }
index adee7e51bab2b8bbdce427150465ea30f26591fc..46d4ca91af796e11519a021aa934baa8b162a15a 100644 (file)
@@ -32,7 +32,7 @@ arch_idle(void)
 }
 
 static inline void
-arch_reset(char mode)
+arch_reset(char mode, const char *cmd)
 {
        cpu_reset(0);
 }
index c485345c8c779bc5ab914f3ffbed7d4ca1608d54..e1551b8dab77448687a8752df3f839ccb274f9d3 100644 (file)
@@ -32,7 +32,7 @@ static inline void arch_idle(void)
        cpu_do_idle();
 }
 
-static inline void arch_reset(char mode)
+static inline void arch_reset(char mode, const char *cmd)
 {
        /*
         * To reset, we hit the on-board reset register
index e012bf13c95582d2a4a8b4fd5368dd2fa380097a..42ae29b288a1a93155da39ec4e823fca734fba2e 100644 (file)
@@ -59,7 +59,10 @@ static inline unsigned long __lbus_to_virt(dma_addr_t x)
        })
 
 #define __arch_page_to_dma(dev, page)                                  \
-       __arch_virt_to_dma(dev, page_address(page))
+       ({                                                              \
+               /* __is_lbus_virt() can never be true for RAM pages */  \
+               (dma_addr_t)page_to_phys(page);                         \
+       })
 
 #endif /* CONFIG_ARCH_IOP13XX */
 #endif /* !ASSEMBLY */
index c7127f416e1fd01d4c92d57b1fa09476f910ecd7..d0c66ef450a7398e08ee4fd5cd70c0f7a571c25f 100644 (file)
@@ -13,7 +13,7 @@ static inline void arch_idle(void)
        cpu_do_idle();
 }
 
-static inline void arch_reset(char mode)
+static inline void arch_reset(char mode, const char *cmd)
 {
        /*
         * Reset the internal bus (warning both cores are reset)
index 32d9e5b0a28db1a36b6888c0fa019f453c42881e..a4b808fe0d817c77db50928f22e6a24018417a06 100644 (file)
@@ -16,7 +16,7 @@ static inline void arch_idle(void)
        cpu_do_idle();
 }
 
-static inline void arch_reset(char mode)
+static inline void arch_reset(char mode, const char *cmd)
 {
        local_irq_disable();
 
index 0cb3ad862acd92ff1d023fbbe169ff46cdc59854..f192a34be0731969dec3547d846db75cd8920fad 100644 (file)
@@ -14,7 +14,7 @@ static inline void arch_idle(void)
        cpu_do_idle();
 }
 
-static inline void arch_reset(char mode)
+static inline void arch_reset(char mode, const char *cmd)
 {
        *IOP3XX_PCSR = 0x30;
 
index 2e9c68f95a24bf13b76623632d9946aeb36122d7..de370992c8485d5ef2eb86f215d52def936005f5 100644 (file)
@@ -17,7 +17,7 @@ static inline void arch_idle(void)
        cpu_do_idle();
 }
 
-static inline void arch_reset(char mode)
+static inline void arch_reset(char mode, const char *cmd)
 {
        local_irq_disable();
 
index d57c3fc10f1f205b003fd894ae84c52d750d5e01..8920ff2dff1f7c8ea0ed57274fa3188c370f153d 100644 (file)
@@ -19,7 +19,7 @@ static inline void arch_idle(void)
 #endif
 }
 
-static inline void arch_reset(char mode)
+static inline void arch_reset(char mode, const char *cmd)
 {
        /* First try machine specific support */
        if (machine_is_ixdp2351()) {
index d816c51320c7c3206c7734adfce4f1bab3fadae8..70afcfe5b8810943012ee5ee394ccea404f63ce0 100644 (file)
@@ -366,7 +366,7 @@ void __init ixp4xx_adjust_zones(int node, unsigned long *zone_size,
 }
 
 void __init ixp4xx_pci_preinit(void)
-{  
+{
        unsigned long cpuid = read_cpuid_id();
 
        /*
@@ -386,17 +386,17 @@ void __init ixp4xx_pci_preinit(void)
 
        pr_debug("setup PCI-AHB(inbound) and AHB-PCI(outbound) address mappings\n");
 
-       /* 
+       /*
         * We use identity AHB->PCI address translation
         * in the 0x48000000 to 0x4bffffff address space
         */
        *PCI_PCIMEMBASE = 0x48494A4B;
 
-       /* 
+       /*
         * We also use identity PCI->AHB address translation
         * in 4 16MB BARs that begin at the physical memory start
         */
-       *PCI_AHBMEMBASE = (PHYS_OFFSET & 0xFF000000) + 
+       *PCI_AHBMEMBASE = (PHYS_OFFSET & 0xFF000000) +
                ((PHYS_OFFSET & 0xFF000000) >> 8) +
                ((PHYS_OFFSET & 0xFF000000) >> 16) +
                ((PHYS_OFFSET & 0xFF000000) >> 24) +
@@ -408,18 +408,19 @@ void __init ixp4xx_pci_preinit(void)
                pr_debug("setup BARs in controller\n");
 
                /*
-                * We configure the PCI inbound memory windows to be 
+                * We configure the PCI inbound memory windows to be
                 * 1:1 mapped to SDRAM
                 */
-               local_write_config(PCI_BASE_ADDRESS_0, 4, PHYS_OFFSET + 0x00000000);
-               local_write_config(PCI_BASE_ADDRESS_1, 4, PHYS_OFFSET + 0x01000000);
-               local_write_config(PCI_BASE_ADDRESS_2, 4, PHYS_OFFSET + 0x02000000);
-               local_write_config(PCI_BASE_ADDRESS_3, 4, PHYS_OFFSET + 0x03000000);
+               local_write_config(PCI_BASE_ADDRESS_0, 4, PHYS_OFFSET);
+               local_write_config(PCI_BASE_ADDRESS_1, 4, PHYS_OFFSET + SZ_16M);
+               local_write_config(PCI_BASE_ADDRESS_2, 4, PHYS_OFFSET + SZ_32M);
+               local_write_config(PCI_BASE_ADDRESS_3, 4, PHYS_OFFSET + SZ_48M);
 
                /*
-                * Enable CSR window at 0xff000000.
+                * Enable CSR window at 64 MiB to allow PCI masters
+                * to continue prefetching past 64 MiB boundary.
                 */
-               local_write_config(PCI_BASE_ADDRESS_4, 4, 0xff000008);
+               local_write_config(PCI_BASE_ADDRESS_4, 4, PHYS_OFFSET + SZ_64M);
 
                /*
                 * Enable the IO window to be way up high, at 0xfffffc00
@@ -500,7 +501,7 @@ int ixp4xx_setup(int nr, struct pci_sys_data *sys)
        return 1;
 }
 
-struct pci_bus *ixp4xx_scan_bus(int nr, struct pci_sys_data *sys)
+struct pci_bus * __devinit ixp4xx_scan_bus(int nr, struct pci_sys_data *sys)
 {
        return pci_scan_bus(sys->busnr, &ixp4xx_ops, sys);
 }
index 51bd69c46d9433971932ce4244eb4e42d1fa7ce3..def7773be67cc222ecd28e9aa1ad7db795eb1b5b 100644 (file)
 #include <asm/cputype.h>
 
 /* Processor id value in CP15 Register 0 */
-#define IXP425_PROCESSOR_ID_VALUE      0x690541c0
-#define IXP435_PROCESSOR_ID_VALUE      0x69054040
-#define IXP465_PROCESSOR_ID_VALUE      0x69054200
-#define IXP4XX_PROCESSOR_ID_MASK       0xfffffff0
-
-#define cpu_is_ixp42x()        ((read_cpuid_id() & IXP4XX_PROCESSOR_ID_MASK) == \
-                         IXP425_PROCESSOR_ID_VALUE)
-#define cpu_is_ixp43x()        ((read_cpuid_id() & IXP4XX_PROCESSOR_ID_MASK) == \
-                         IXP435_PROCESSOR_ID_VALUE)
-#define cpu_is_ixp46x()        ((read_cpuid_id() & IXP4XX_PROCESSOR_ID_MASK) == \
-                         IXP465_PROCESSOR_ID_VALUE)
+#define IXP42X_PROCESSOR_ID_VALUE      0x690541c0 /* including unused 0x690541Ex */
+#define IXP42X_PROCESSOR_ID_MASK       0xffffffc0
+
+#define IXP43X_PROCESSOR_ID_VALUE      0x69054040
+#define IXP43X_PROCESSOR_ID_MASK       0xfffffff0
+
+#define IXP46X_PROCESSOR_ID_VALUE      0x69054200 /* including IXP455 */
+#define IXP46X_PROCESSOR_ID_MASK       0xfffffff0
+
+#define cpu_is_ixp42x()        ((read_cpuid_id() & IXP42X_PROCESSOR_ID_MASK) == \
+                        IXP42X_PROCESSOR_ID_VALUE)
+#define cpu_is_ixp43x()        ((read_cpuid_id() & IXP43X_PROCESSOR_ID_MASK) == \
+                        IXP43X_PROCESSOR_ID_VALUE)
+#define cpu_is_ixp46x()        ((read_cpuid_id() & IXP46X_PROCESSOR_ID_MASK) == \
+                        IXP46X_PROCESSOR_ID_VALUE)
 
 static inline u32 ixp4xx_read_feature_bits(void)
 {
        unsigned int val = ~*IXP4XX_EXP_CFG2;
-       val &= ~IXP4XX_FEATURE_RESERVED;
-       if (!cpu_is_ixp46x())
-               val &= ~IXP4XX_FEATURE_IXP46X_ONLY;
 
-       return val;
+       if (cpu_is_ixp42x())
+               return val & IXP42X_FEATURE_MASK;
+       if (cpu_is_ixp43x())
+               return val & IXP43X_FEATURE_MASK;
+       return val & IXP46X_FEATURE_MASK;
 }
 
 static inline void ixp4xx_write_feature_bits(u32 value)
index ad9c888dd8505ba54fa08a2ad8d4d078d278ca0f..97c530f66e787714489737ab9920c25e1a41caad 100644 (file)
 #define DCMD_LENGTH    0x01fff         /* length mask (max = 8K - 1) */
 
 /* "fuse" bits of IXP_EXP_CFG2 */
+/* All IXP4xx CPUs */
 #define IXP4XX_FEATURE_RCOMP           (1 << 0)
 #define IXP4XX_FEATURE_USB_DEVICE      (1 << 1)
 #define IXP4XX_FEATURE_HASH            (1 << 2)
 #define IXP4XX_FEATURE_RESET_NPEB      (1 << 12)
 #define IXP4XX_FEATURE_RESET_NPEC      (1 << 13)
 #define IXP4XX_FEATURE_PCI             (1 << 14)
-#define IXP4XX_FEATURE_ECC_TIMESYNC    (1 << 15)
 #define IXP4XX_FEATURE_UTOPIA_PHY_LIMIT        (3 << 16)
+#define IXP4XX_FEATURE_XSCALE_MAX_FREQ (3 << 22)
+#define IXP42X_FEATURE_MASK            (IXP4XX_FEATURE_RCOMP            | \
+                                        IXP4XX_FEATURE_USB_DEVICE       | \
+                                        IXP4XX_FEATURE_HASH             | \
+                                        IXP4XX_FEATURE_AES              | \
+                                        IXP4XX_FEATURE_DES              | \
+                                        IXP4XX_FEATURE_HDLC             | \
+                                        IXP4XX_FEATURE_AAL              | \
+                                        IXP4XX_FEATURE_HSS              | \
+                                        IXP4XX_FEATURE_UTOPIA           | \
+                                        IXP4XX_FEATURE_NPEB_ETH0        | \
+                                        IXP4XX_FEATURE_NPEC_ETH         | \
+                                        IXP4XX_FEATURE_RESET_NPEA       | \
+                                        IXP4XX_FEATURE_RESET_NPEB       | \
+                                        IXP4XX_FEATURE_RESET_NPEC       | \
+                                        IXP4XX_FEATURE_PCI              | \
+                                        IXP4XX_FEATURE_UTOPIA_PHY_LIMIT | \
+                                        IXP4XX_FEATURE_XSCALE_MAX_FREQ)
+
+
+/* IXP43x/46x CPUs */
+#define IXP4XX_FEATURE_ECC_TIMESYNC    (1 << 15)
 #define IXP4XX_FEATURE_USB_HOST                (1 << 18)
 #define IXP4XX_FEATURE_NPEA_ETH                (1 << 19)
+#define IXP43X_FEATURE_MASK            (IXP42X_FEATURE_MASK             | \
+                                        IXP4XX_FEATURE_ECC_TIMESYNC     | \
+                                        IXP4XX_FEATURE_USB_HOST         | \
+                                        IXP4XX_FEATURE_NPEA_ETH)
+
+/* IXP46x CPU (including IXP455) only */
 #define IXP4XX_FEATURE_NPEB_ETH_1_TO_3 (1 << 20)
 #define IXP4XX_FEATURE_RSA             (1 << 21)
-#define IXP4XX_FEATURE_XSCALE_MAX_FREQ (3 << 22)
-#define IXP4XX_FEATURE_RESERVED                (0xFF << 24)
-
-#define IXP4XX_FEATURE_IXP46X_ONLY (IXP4XX_FEATURE_ECC_TIMESYNC |      \
-                                   IXP4XX_FEATURE_USB_HOST |           \
-                                   IXP4XX_FEATURE_NPEA_ETH |           \
-                                   IXP4XX_FEATURE_NPEB_ETH_1_TO_3 |    \
-                                   IXP4XX_FEATURE_RSA |                \
-                                   IXP4XX_FEATURE_XSCALE_MAX_FREQ)
+#define IXP46X_FEATURE_MASK            (IXP43X_FEATURE_MASK             | \
+                                        IXP4XX_FEATURE_NPEB_ETH_1_TO_3  | \
+                                        IXP4XX_FEATURE_RSA)
 
 #endif
index 92a7e8ddf69a3b09c1f551884047fea64cb83927..d2aa26f5acd7cd8b2173c84d1ab9e210d189e828 100644 (file)
@@ -20,7 +20,7 @@ static inline void arch_idle(void)
 }
 
 
-static inline void arch_reset(char mode)
+static inline void arch_reset(char mode, const char *cmd)
 {
        if ( 1 && mode == 's') {
                /* Jump into ROM at address 0 */
index c73a94d0ca2ba12a43867b8c4dd2418dcadeb50a..252310234903d96147cc737729231cf9c161c392 100644 (file)
@@ -575,8 +575,8 @@ int npe_load_firmware(struct npe *npe, const char *name, struct device *dev)
                for (i = 0; i < image->size; i++)
                        image->data[i] = swab32(image->data[i]);
 
-       if (!cpu_is_ixp46x() && ((image->id >> 28) & 0xF /* device ID */)) {
-               print_npe(KERN_INFO, npe, "IXP46x firmware ignored on "
+       if (cpu_is_ixp42x() && ((image->id >> 28) & 0xF /* device ID */)) {
+               print_npe(KERN_INFO, npe, "IXP43x/IXP46x firmware ignored on "
                          "IXP42x\n");
                goto err;
        }
@@ -596,7 +596,7 @@ int npe_load_firmware(struct npe *npe, const char *name, struct device *dev)
                  "revision 0x%X:%X\n", (image->id >> 16) & 0xFF,
                  (image->id >> 8) & 0xFF, image->id & 0xFF);
 
-       if (!cpu_is_ixp46x()) {
+       if (cpu_is_ixp42x()) {
                if (!npe->id)
                        instr_size = NPE_A_42X_INSTR_SIZE;
                else
index 8510f6cfdabf09b2a96a4ba91ffe9a166a1315d5..23a1914c1da80f15ae382db0eb41fa6842163255 100644 (file)
@@ -17,7 +17,7 @@ static inline void arch_idle(void)
        cpu_do_idle();
 }
 
-static inline void arch_reset(char mode)
+static inline void arch_reset(char mode, const char *cmd)
 {
        /*
         * Enable soft reset to assert RSTOUTn.
index 2754daabda55eb54bbb3744e46ee7ef1d1041cd4..fe0c82e30b2dbdc9fb3ff81a1c64c277b7e8843f 100644 (file)
@@ -14,6 +14,12 @@ config MACH_DSM320
          Say 'Y' here if you want your kernel to run on the D-Link
          DSM-320 Wireless Media Player.
 
+config MACH_ACS5K
+       bool "Brivo Systems LLC, ACS-5000 Master board"
+       help
+         say 'Y' here if you want your kernel to run on the Brivo
+         Systems LLC, ACS-5000 Master board.
+
 endmenu
 
 endif
index f735d2cc0294474bde6de12ff9f5ffc3331a0367..7e3e8160ed30fe1874dc9540f9b2178f8f4b0eea 100644 (file)
@@ -17,3 +17,4 @@ obj-$(CONFIG_LEDS)            += leds.o
 # Board-specific support
 obj-$(CONFIG_MACH_KS8695)      += board-micrel.o
 obj-$(CONFIG_MACH_DSM320)      += board-dsm320.o
+obj-$(CONFIG_MACH_ACS5K)       += board-acs5k.o
diff --git a/arch/arm/mach-ks8695/board-acs5k.c b/arch/arm/mach-ks8695/board-acs5k.c
new file mode 100644 (file)
index 0000000..9e3e5a6
--- /dev/null
@@ -0,0 +1,233 @@
+/*
+ * arch/arm/mach-ks8695/board-acs5k.c
+ *
+ * Brivo Systems LLC, ACS-5000 Master Board
+ *
+ * Copyright 2008 Simtec Electronics
+ *               Daniel Silverstone <dsilvers@simtec.co.uk>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/kernel.h>
+#include <linux/types.h>
+#include <linux/interrupt.h>
+#include <linux/init.h>
+#include <linux/platform_device.h>
+
+#include <linux/i2c.h>
+#include <linux/i2c-algo-bit.h>
+#include <linux/i2c-gpio.h>
+#include <linux/i2c/pca953x.h>
+
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/map.h>
+#include <linux/mtd/physmap.h>
+#include <linux/mtd/partitions.h>
+
+#include <asm/mach-types.h>
+
+#include <asm/mach/arch.h>
+#include <asm/mach/map.h>
+#include <asm/mach/irq.h>
+
+#include <mach/devices.h>
+#include <mach/gpio.h>
+
+#include "generic.h"
+
+static struct i2c_gpio_platform_data acs5k_i2c_device_platdata = {
+       .sda_pin        = 4,
+       .scl_pin        = 5,
+       .udelay         = 10,
+};
+
+static struct platform_device acs5k_i2c_device = {
+       .name           = "i2c-gpio",
+       .id             = -1,
+       .num_resources  = 0,
+       .resource       = NULL,
+       .dev            = {
+               .platform_data  = &acs5k_i2c_device_platdata,
+       },
+};
+
+static int acs5k_pca9555_setup(struct i2c_client *client,
+                              unsigned gpio_base, unsigned ngpio,
+                              void *context)
+{
+       static int acs5k_gpio_value[] = {
+               -1, -1, -1, -1, -1, -1, -1, 0, 1, 1, -1, 0, 1, 0, -1, -1
+       };
+       int n;
+
+       for (n = 0; n < ARRAY_SIZE(acs5k_gpio_value); ++n) {
+               gpio_request(gpio_base + n, "ACS-5000 GPIO Expander");
+               if (acs5k_gpio_value[n] < 0)
+                       gpio_direction_input(gpio_base + n);
+               else
+                       gpio_direction_output(gpio_base + n,
+                                             acs5k_gpio_value[n]);
+               gpio_export(gpio_base + n, 0); /* Export, direction locked down */
+       }
+
+       return 0;
+}
+
+static struct pca953x_platform_data acs5k_i2c_pca9555_platdata = {
+       .gpio_base      = 16, /* Start directly after the CPU's GPIO */
+       .invert         = 0, /* Do not invert */
+       .setup          = acs5k_pca9555_setup,
+};
+
+static struct i2c_board_info acs5k_i2c_devs[] __initdata = {
+       {
+               I2C_BOARD_INFO("pcf8563", 0x51),
+       },
+       {
+               I2C_BOARD_INFO("pca9555", 0x20),
+               .platform_data = &acs5k_i2c_pca9555_platdata,
+       },
+};
+
+static void __devinit acs5k_i2c_init(void)
+{
+       /* The gpio interface */
+       platform_device_register(&acs5k_i2c_device);
+       /* I2C devices */
+       i2c_register_board_info(0, acs5k_i2c_devs,
+                               ARRAY_SIZE(acs5k_i2c_devs));
+}
+
+static struct mtd_partition acs5k_nor_partitions[] = {
+       [0] = {
+               .name   = "Boot Agent and config",
+               .size   = SZ_256K,
+               .offset = 0,
+               .mask_flags = MTD_WRITEABLE,
+       },
+       [1] = {
+               .name   = "Kernel",
+               .size   = SZ_1M,
+               .offset = SZ_256K,
+       },
+       [2] = {
+               .name   = "SquashFS1",
+               .size   = SZ_2M,
+               .offset = SZ_256K + SZ_1M,
+       },
+       [3] = {
+               .name   = "SquashFS2",
+               .size   = SZ_4M + SZ_2M,
+               .offset = SZ_256K + SZ_1M + SZ_2M,
+       },
+       [4] = {
+               .name   = "Data",
+               .size   = SZ_16M + SZ_4M + SZ_2M + SZ_512K, /* 22.5 MB */
+               .offset = SZ_256K + SZ_8M + SZ_1M,
+       }
+};
+
+static struct physmap_flash_data acs5k_nor_pdata = {
+       .width          = 4,
+       .nr_parts       = ARRAY_SIZE(acs5k_nor_partitions),
+       .parts          = acs5k_nor_partitions,
+};
+
+static struct resource acs5k_nor_resource[] = {
+       [0] = {
+               .start = SZ_32M, /* We expect the bootloader to map
+                                 * the flash here.
+                                 */
+               .end   = SZ_32M + SZ_16M - 1,
+               .flags = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start = SZ_32M + SZ_16M,
+               .end   = SZ_32M + SZ_32M - SZ_256K - 1,
+               .flags = IORESOURCE_MEM,
+       }
+};
+
+static struct platform_device acs5k_device_nor = {
+       .name           = "physmap-flash",
+       .id             = -1,
+       .num_resources  = ARRAY_SIZE(acs5k_nor_resource),
+       .resource       = acs5k_nor_resource,
+       .dev            = {
+               .platform_data = &acs5k_nor_pdata,
+       },
+};
+
+static void __init acs5k_register_nor(void)
+{
+       int ret;
+
+       if (acs5k_nor_partitions[0].mask_flags == 0)
+               printk(KERN_WARNING "Warning: Unprotecting bootloader and configuration partition\n");
+
+       ret = platform_device_register(&acs5k_device_nor);
+       if (ret < 0)
+               printk(KERN_ERR "failed to register physmap-flash device\n");
+}
+
+static int __init acs5k_protection_setup(char *s)
+{
+       /* We can't allocate anything here but we should be able
+        * to trivially parse s and decide if we can protect the
+        * bootloader partition or not
+        */
+       if (strcmp(s, "no") == 0)
+               acs5k_nor_partitions[0].mask_flags = 0;
+
+       return 1;
+}
+
+__setup("protect_bootloader=", acs5k_protection_setup);
+
+static void __init acs5k_init_gpio(void)
+{
+       int i;
+
+       ks8695_register_gpios();
+       for (i = 0; i < 4; ++i)
+               gpio_request(i, "ACS5K IRQ");
+       gpio_request(7, "ACS5K KS_FRDY");
+       for (i = 8; i < 16; ++i)
+               gpio_request(i, "ACS5K Unused");
+
+       gpio_request(3, "ACS5K CAN Control");
+       gpio_request(6, "ACS5K Heartbeat");
+       gpio_direction_output(3, 1); /* Default CAN_RESET high */
+       gpio_direction_output(6, 0); /* Default KS8695_ACTIVE low */
+       gpio_export(3, 0); /* export CAN_RESET as output only */
+       gpio_export(6, 0); /* export KS8695_ACTIVE as output only */
+}
+
+static void __init acs5k_init(void)
+{
+       acs5k_init_gpio();
+
+       /* Network device */
+       ks8695_add_device_lan();        /* eth0 = LAN */
+       ks8695_add_device_wan();        /* ethX = WAN */
+
+       /* NOR devices */
+       acs5k_register_nor();
+
+       /* I2C bus */
+       acs5k_i2c_init();
+}
+
+MACHINE_START(ACS5K, "Brivo Systems LLC ACS-5000 Master board")
+       /* Maintainer: Simtec Electronics. */
+       .phys_io        = KS8695_IO_PA,
+       .io_pg_offst    = (KS8695_IO_VA >> 18) & 0xfffc,
+       .boot_params    = KS8695_SDRAM_PA + 0x100,
+       .map_io         = ks8695_map_io,
+       .init_irq       = ks8695_init_irq,
+       .init_machine   = acs5k_init,
+       .timer          = &ks8695_timer,
+MACHINE_END
index 6d5887cf574286512c4321b668fdce3bc15d44cd..76e5308685a40e81e45dcc42c66312ef3e0f4d1f 100644 (file)
@@ -35,7 +35,11 @@ extern struct bus_type platform_bus_type;
                                        __phys_to_virt(x) : __bus_to_virt(x)); })
 #define __arch_virt_to_dma(dev, x)     ({ is_lbus_device(dev) ? \
                                        (dma_addr_t)__virt_to_phys(x) : (dma_addr_t)__virt_to_bus(x); })
-#define __arch_page_to_dma(dev, x)     __arch_virt_to_dma(dev, page_address(x))
+#define __arch_page_to_dma(dev, x)     \
+       ({ dma_addr_t __dma = page_to_phys(page); \
+          if (!is_lbus_device(dev)) \
+               __dma = __dma - PHYS_OFFSET + KS8695_PCIMEM_PA; \
+          __dma; })
 
 #endif
 
index 5a9b032bdbeb5a95318291faa426f9f12aeb42ed..fb1dda9be2d0a8c7fd6a032fb06417af1499455d 100644 (file)
@@ -27,7 +27,7 @@ static void arch_idle(void)
 
 }
 
-static void arch_reset(char mode)
+static void arch_reset(char mode, const char *cmd)
 {
        unsigned int reg;
 
index 5272abee0d0e43c6924ee16588b283ef0c5ba488..e0dd3b6ae4aabce6de0df61de82c7e12d239d30a 100644 (file)
@@ -19,7 +19,7 @@ static inline void arch_idle(void)
        *(unsigned long *)(IO_BASE + 0x50004) = 1;      /* idle mode */
 }
 
-static inline void arch_reset(char mode)
+static inline void arch_reset(char mode, const char *cmd)
 {
        if (mode == 's') {
                cpu_reset(0);
index fa46bb1ef07be13776542b17374e464c7a01c725..45a56d3b93d77ebf2e643591cba74e214a44bc2f 100644 (file)
@@ -13,7 +13,7 @@ static inline void arch_idle(void)
        cpu_do_idle ();
 }
 
-static inline void arch_reset(char mode)
+static inline void arch_reset(char mode, const char *cmd)
 {
        cpu_reset (0);
 }
index 8db1147d4ec5594f5084d3619039e3b8f5447c8d..c1de36fe9b375c2389d6026d5c9dcd0f31824189 100644 (file)
@@ -17,7 +17,7 @@ static inline void arch_idle(void)
        cpu_do_idle();
 }
 
-static inline void arch_reset(char mode)
+static inline void arch_reset(char mode, const char *cmd)
 {
        /*
         * Enable soft reset to assert RSTOUTn.
diff --git a/arch/arm/mach-mmp/Kconfig b/arch/arm/mach-mmp/Kconfig
new file mode 100644 (file)
index 0000000..c6a564f
--- /dev/null
@@ -0,0 +1,47 @@
+if ARCH_MMP
+
+menu "Marvell PXA168/910 Implmentations"
+
+config MACH_ASPENITE
+       bool "Marvell's PXA168 Aspenite Development Board"
+       select CPU_PXA168
+       help
+         Say 'Y' here if you want to support the Marvell PXA168-based
+         Aspenite Development Board.
+
+config MACH_ZYLONITE2
+       bool "Marvell's PXA168 Zylonite2 Development Board"
+       select CPU_PXA168
+       help
+         Say 'Y' here if you want to support the Marvell PXA168-based
+         Zylonite2 Development Board.
+
+config MACH_TAVOREVB
+       bool "Marvell's PXA910 TavorEVB Development Board"
+       select CPU_PXA910
+       help
+         Say 'Y' here if you want to support the Marvell PXA910-based
+         TavorEVB Development Board.
+
+config MACH_TTC_DKB
+       bool "Marvell's PXA910 TavorEVB Development Board"
+       select CPU_PXA910
+       help
+         Say 'Y' here if you want to support the Marvell PXA910-based
+         TTC_DKB Development Board.
+
+endmenu
+
+config CPU_PXA168
+       bool
+       select CPU_MOHAWK
+       help
+         Select code specific to PXA168
+
+config CPU_PXA910
+       bool
+       select CPU_MOHAWK
+       help
+         Select code specific to PXA910
+
+endif
diff --git a/arch/arm/mach-mmp/Makefile b/arch/arm/mach-mmp/Makefile
new file mode 100644 (file)
index 0000000..6883e65
--- /dev/null
@@ -0,0 +1,15 @@
+#
+# Makefile for Marvell's PXA168 processors line
+#
+
+obj-y                          += common.o clock.o devices.o irq.o time.o
+
+# SoC support
+obj-$(CONFIG_CPU_PXA168)       += pxa168.o
+obj-$(CONFIG_CPU_PXA910)       += pxa910.o
+
+# board support
+obj-$(CONFIG_MACH_ASPENITE)    += aspenite.o
+obj-$(CONFIG_MACH_ZYLONITE2)   += aspenite.o
+obj-$(CONFIG_MACH_TAVOREVB)    += tavorevb.o
+obj-$(CONFIG_MACH_TTC_DKB)     += ttc_dkb.o
diff --git a/arch/arm/mach-mmp/Makefile.boot b/arch/arm/mach-mmp/Makefile.boot
new file mode 100644 (file)
index 0000000..574a4aa
--- /dev/null
@@ -0,0 +1 @@
+   zreladdr-y  := 0x00008000
diff --git a/arch/arm/mach-mmp/aspenite.c b/arch/arm/mach-mmp/aspenite.c
new file mode 100644 (file)
index 0000000..4562452
--- /dev/null
@@ -0,0 +1,117 @@
+/*
+ *  linux/arch/arm/mach-mmp/aspenite.c
+ *
+ *  Support for the Marvell PXA168-based Aspenite and Zylonite2
+ *  Development Platform.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  publishhed by the Free Software Foundation.
+ */
+
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/platform_device.h>
+#include <linux/smc91x.h>
+
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+#include <mach/addr-map.h>
+#include <mach/mfp-pxa168.h>
+#include <mach/pxa168.h>
+#include <mach/gpio.h>
+
+#include "common.h"
+
+static unsigned long common_pin_config[] __initdata = {
+       /* Data Flash Interface */
+       GPIO0_DFI_D15,
+       GPIO1_DFI_D14,
+       GPIO2_DFI_D13,
+       GPIO3_DFI_D12,
+       GPIO4_DFI_D11,
+       GPIO5_DFI_D10,
+       GPIO6_DFI_D9,
+       GPIO7_DFI_D8,
+       GPIO8_DFI_D7,
+       GPIO9_DFI_D6,
+       GPIO10_DFI_D5,
+       GPIO11_DFI_D4,
+       GPIO12_DFI_D3,
+       GPIO13_DFI_D2,
+       GPIO14_DFI_D1,
+       GPIO15_DFI_D0,
+
+       /* Static Memory Controller */
+       GPIO18_SMC_nCS0,
+       GPIO34_SMC_nCS1,
+       GPIO23_SMC_nLUA,
+       GPIO25_SMC_nLLA,
+       GPIO28_SMC_RDY,
+       GPIO29_SMC_SCLK,
+       GPIO35_SMC_BE1,
+       GPIO36_SMC_BE2,
+       GPIO27_GPIO,    /* Ethernet IRQ */
+
+       /* UART1 */
+       GPIO107_UART1_RXD,
+       GPIO108_UART1_TXD,
+};
+
+static struct smc91x_platdata smc91x_info = {
+       .flags  = SMC91X_USE_16BIT | SMC91X_NOWAIT,
+};
+
+static struct resource smc91x_resources[] = {
+       [0] = {
+               .start  = SMC_CS1_PHYS_BASE + 0x300,
+               .end    = SMC_CS1_PHYS_BASE + 0xfffff,
+               .flags  = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start  = gpio_to_irq(27),
+               .end    = gpio_to_irq(27),
+               .flags  = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
+       }
+};
+
+static struct platform_device smc91x_device = {
+       .name           = "smc91x",
+       .id             = 0,
+       .dev            = {
+               .platform_data = &smc91x_info,
+       },
+       .num_resources  = ARRAY_SIZE(smc91x_resources),
+       .resource       = smc91x_resources,
+};
+
+static void __init common_init(void)
+{
+       mfp_config(ARRAY_AND_SIZE(common_pin_config));
+
+       /* on-chip devices */
+       pxa168_add_uart(1);
+
+       /* off-chip devices */
+       platform_device_register(&smc91x_device);
+}
+
+MACHINE_START(ASPENITE, "PXA168-based Aspenite Development Platform")
+       .phys_io        = APB_PHYS_BASE,
+       .boot_params    = 0x00000100,
+       .io_pg_offst    = (APB_VIRT_BASE >> 18) & 0xfffc,
+       .map_io         = pxa_map_io,
+       .init_irq       = pxa168_init_irq,
+       .timer          = &pxa168_timer,
+       .init_machine   = common_init,
+MACHINE_END
+
+MACHINE_START(ZYLONITE2, "PXA168-based Zylonite2 Development Platform")
+       .phys_io        = APB_PHYS_BASE,
+       .boot_params    = 0x00000100,
+       .io_pg_offst    = (APB_VIRT_BASE >> 18) & 0xfffc,
+       .map_io         = pxa_map_io,
+       .init_irq       = pxa168_init_irq,
+       .timer          = &pxa168_timer,
+       .init_machine   = common_init,
+MACHINE_END
diff --git a/arch/arm/mach-mmp/clock.c b/arch/arm/mach-mmp/clock.c
new file mode 100644 (file)
index 0000000..2d9cc5a
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ *  linux/arch/arm/mach-mmp/clock.c
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ */
+
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/list.h>
+#include <linux/spinlock.h>
+#include <linux/clk.h>
+#include <linux/io.h>
+
+#include <mach/regs-apbc.h>
+#include "clock.h"
+
+static void apbc_clk_enable(struct clk *clk)
+{
+       uint32_t clk_rst;
+
+       clk_rst = APBC_APBCLK | APBC_FNCLK | APBC_FNCLKSEL(clk->fnclksel);
+       __raw_writel(clk_rst, clk->clk_rst);
+}
+
+static void apbc_clk_disable(struct clk *clk)
+{
+       __raw_writel(0, clk->clk_rst);
+}
+
+struct clkops apbc_clk_ops = {
+       .enable         = apbc_clk_enable,
+       .disable        = apbc_clk_disable,
+};
+
+static DEFINE_SPINLOCK(clocks_lock);
+
+int clk_enable(struct clk *clk)
+{
+       unsigned long flags;
+
+       spin_lock_irqsave(&clocks_lock, flags);
+       if (clk->enabled++ == 0)
+               clk->ops->enable(clk);
+       spin_unlock_irqrestore(&clocks_lock, flags);
+       return 0;
+}
+EXPORT_SYMBOL(clk_enable);
+
+void clk_disable(struct clk *clk)
+{
+       unsigned long flags;
+
+       WARN_ON(clk->enabled == 0);
+
+       spin_lock_irqsave(&clocks_lock, flags);
+       if (--clk->enabled == 0)
+               clk->ops->disable(clk);
+       spin_unlock_irqrestore(&clocks_lock, flags);
+}
+EXPORT_SYMBOL(clk_disable);
+
+unsigned long clk_get_rate(struct clk *clk)
+{
+       unsigned long rate;
+
+       if (clk->ops->getrate)
+               rate = clk->ops->getrate(clk);
+       else
+               rate = clk->rate;
+
+       return rate;
+}
+EXPORT_SYMBOL(clk_get_rate);
+
+void clks_register(struct clk_lookup *clks, size_t num)
+{
+       int i;
+
+       for (i = 0; i < num; i++)
+               clkdev_add(&clks[i]);
+}
diff --git a/arch/arm/mach-mmp/clock.h b/arch/arm/mach-mmp/clock.h
new file mode 100644 (file)
index 0000000..ed967e7
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ *  linux/arch/arm/mach-mmp/clock.h
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ */
+
+#include <asm/clkdev.h>
+
+struct clkops {
+       void                    (*enable)(struct clk *);
+       void                    (*disable)(struct clk *);
+       unsigned long           (*getrate)(struct clk *);
+};
+
+struct clk {
+       const struct clkops     *ops;
+
+       void __iomem    *clk_rst;       /* clock reset control register */
+       int             fnclksel;       /* functional clock select (APBC) */
+       uint32_t        enable_val;     /* value for clock enable (APMU) */
+       unsigned long   rate;
+       int             enabled;
+};
+
+extern struct clkops apbc_clk_ops;
+
+#define APBC_CLK(_name, _reg, _fnclksel, _rate)                        \
+struct clk clk_##_name = {                                     \
+               .clk_rst        = (void __iomem *)APBC_##_reg,  \
+               .fnclksel       = _fnclksel,                    \
+               .rate           = _rate,                        \
+               .ops            = &apbc_clk_ops,                \
+}
+
+#define APBC_CLK_OPS(_name, _reg, _fnclksel, _rate, _ops)      \
+struct clk clk_##_name = {                                     \
+               .clk_rst        = (void __iomem *)APBC_##_reg,  \
+               .fnclksel       = _fnclksel,                    \
+               .rate           = _rate,                        \
+               .ops            = _ops,                         \
+}
+
+#define APMU_CLK(_name, _reg, _eval, _rate)                    \
+struct clk clk_##_name = {                                     \
+               .clk_rst        = (void __iomem *)APMU_##_reg,  \
+               .enable_val     = _eval,                        \
+               .rate           = _rate,                        \
+               .ops            = &apmu_clk_ops,                \
+}
+
+#define APMU_CLK_OPS(_name, _reg, _eval, _rate, _ops)          \
+struct clk clk_##_name = {                                     \
+               .clk_rst        = (void __iomem *)APMU_##_reg,  \
+               .enable_val     = _eval,                        \
+               .rate           = _rate,                        \
+               .ops            = _ops,                         \
+}
+
+#define INIT_CLKREG(_clk, _devname, _conname)                  \
+       {                                                       \
+               .clk            = _clk,                         \
+               .dev_id         = _devname,                     \
+               .con_id         = _conname,                     \
+       }
+
+extern struct clk clk_pxa168_gpio;
+extern struct clk clk_pxa168_timers;
+
+extern void clks_register(struct clk_lookup *, size_t);
diff --git a/arch/arm/mach-mmp/common.c b/arch/arm/mach-mmp/common.c
new file mode 100644 (file)
index 0000000..e1e66c1
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ *  linux/arch/arm/mach-mmp/common.c
+ *
+ *  Code common to PXA168 processor lines
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/init.h>
+#include <linux/kernel.h>
+
+#include <asm/page.h>
+#include <asm/mach/map.h>
+#include <mach/addr-map.h>
+
+#include "common.h"
+
+static struct map_desc standard_io_desc[] __initdata = {
+       {
+               .pfn            = __phys_to_pfn(APB_PHYS_BASE),
+               .virtual        = APB_VIRT_BASE,
+               .length         = APB_PHYS_SIZE,
+               .type           = MT_DEVICE,
+       }, {
+               .pfn            = __phys_to_pfn(AXI_PHYS_BASE),
+               .virtual        = AXI_VIRT_BASE,
+               .length         = AXI_PHYS_SIZE,
+               .type           = MT_DEVICE,
+       },
+};
+
+void __init pxa_map_io(void)
+{
+       iotable_init(standard_io_desc, ARRAY_SIZE(standard_io_desc));
+}
diff --git a/arch/arm/mach-mmp/common.h b/arch/arm/mach-mmp/common.h
new file mode 100644 (file)
index 0000000..c33fbbc
--- /dev/null
@@ -0,0 +1,13 @@
+#define ARRAY_AND_SIZE(x)      (x), ARRAY_SIZE(x)
+
+struct sys_timer;
+
+extern void timer_init(int irq);
+
+extern struct sys_timer pxa168_timer;
+extern struct sys_timer pxa910_timer;
+extern void __init pxa168_init_irq(void);
+extern void __init pxa910_init_irq(void);
+
+extern void __init icu_init_irq(void);
+extern void __init pxa_map_io(void);
diff --git a/arch/arm/mach-mmp/devices.c b/arch/arm/mach-mmp/devices.c
new file mode 100644 (file)
index 0000000..191d9de
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * linux/arch/arm/mach-mmp/devices.c
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/dma-mapping.h>
+
+#include <asm/irq.h>
+#include <mach/devices.h>
+
+int __init pxa_register_device(struct pxa_device_desc *desc,
+                               void *data, size_t size)
+{
+       struct platform_device *pdev;
+       struct resource res[2 + MAX_RESOURCE_DMA];
+       int i, ret = 0, nres = 0;
+
+       pdev = platform_device_alloc(desc->drv_name, desc->id);
+       if (pdev == NULL)
+               return -ENOMEM;
+
+       pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
+
+       memset(res, 0, sizeof(res));
+
+       if (desc->start != -1ul && desc->size > 0) {
+               res[nres].start = desc->start;
+               res[nres].end   = desc->start + desc->size - 1;
+               res[nres].flags = IORESOURCE_MEM;
+               nres++;
+       }
+
+       if (desc->irq != NO_IRQ) {
+               res[nres].start = desc->irq;
+               res[nres].end   = desc->irq;
+               res[nres].flags = IORESOURCE_IRQ;
+               nres++;
+       }
+
+       for (i = 0; i < MAX_RESOURCE_DMA; i++, nres++) {
+               if (desc->dma[i] == 0)
+                       break;
+
+               res[nres].start = desc->dma[i];
+               res[nres].end   = desc->dma[i];
+               res[nres].flags = IORESOURCE_DMA;
+       }
+
+       ret = platform_device_add_resources(pdev, res, nres);
+       if (ret) {
+               platform_device_put(pdev);
+               return ret;
+       }
+
+       if (data && size) {
+               ret = platform_device_add_data(pdev, data, size);
+               if (ret) {
+                       platform_device_put(pdev);
+                       return ret;
+               }
+       }
+
+       return platform_device_add(pdev);
+}
diff --git a/arch/arm/mach-mmp/include/mach/addr-map.h b/arch/arm/mach-mmp/include/mach/addr-map.h
new file mode 100644 (file)
index 0000000..3254089
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * linux/arch/arm/mach-mmp/include/mach/addr-map.h
+ *
+ *   Common address map definitions
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef __ASM_MACH_ADDR_MAP_H
+#define __ASM_MACH_ADDR_MAP_H
+
+/* APB - Application Subsystem Peripheral Bus
+ *
+ * NOTE: the DMA controller registers are actually on the AXI fabric #1
+ * slave port to AHB/APB bridge, due to its close relationship to those
+ * peripherals on APB, let's count it into the ABP mapping area.
+ */
+#define APB_PHYS_BASE          0xd4000000
+#define APB_VIRT_BASE          0xfe000000
+#define APB_PHYS_SIZE          0x00200000
+
+#define AXI_PHYS_BASE          0xd4200000
+#define AXI_VIRT_BASE          0xfe200000
+#define AXI_PHYS_SIZE          0x00200000
+
+/* Static Memory Controller - Chip Select 0 and 1 */
+#define SMC_CS0_PHYS_BASE      0x80000000
+#define SMC_CS0_PHYS_SIZE      0x10000000
+#define SMC_CS1_PHYS_BASE      0x90000000
+#define SMC_CS1_PHYS_SIZE      0x10000000
+
+#endif /* __ASM_MACH_ADDR_MAP_H */
diff --git a/arch/arm/mach-mmp/include/mach/clkdev.h b/arch/arm/mach-mmp/include/mach/clkdev.h
new file mode 100644 (file)
index 0000000..2fb354e
--- /dev/null
@@ -0,0 +1,7 @@
+#ifndef __ASM_MACH_CLKDEV_H
+#define __ASM_MACH_CLKDEV_H
+
+#define __clk_get(clk) ({ 1; })
+#define __clk_put(clk) do { } while (0)
+
+#endif /* __ASM_MACH_CLKDEV_H */
diff --git a/arch/arm/mach-mmp/include/mach/cputype.h b/arch/arm/mach-mmp/include/mach/cputype.h
new file mode 100644 (file)
index 0000000..25e797b
--- /dev/null
@@ -0,0 +1,30 @@
+#ifndef __ASM_MACH_CPUTYPE_H
+#define __ASM_MACH_CPUTYPE_H
+
+#include <asm/cputype.h>
+
+/*
+ *  CPU   Stepping   OLD_ID       CPU_ID      CHIP_ID
+ *
+ * PXA168    A0    0x41159263   0x56158400   0x00A0A333
+ * PXA910    Y0    0x41159262   0x56158000   0x00F0C910
+ */
+
+#ifdef CONFIG_CPU_PXA168
+#  define __cpu_is_pxa168(id)  \
+       ({ unsigned int _id = ((id) >> 8) & 0xff; _id == 0x84; })
+#else
+#  define __cpu_is_pxa168(id)  (0)
+#endif
+
+#ifdef CONFIG_CPU_PXA910
+#  define __cpu_is_pxa910(id)  \
+       ({ unsigned int _id = ((id) >> 8) & 0xff; _id == 0x80; })
+#else
+#  define __cpu_is_pxa910(id)  (0)
+#endif
+
+#define cpu_is_pxa168()                ({ __cpu_is_pxa168(read_cpuid_id()); })
+#define cpu_is_pxa910()                ({ __cpu_is_pxa910(read_cpuid_id()); })
+
+#endif /* __ASM_MACH_CPUTYPE_H */
diff --git a/arch/arm/mach-mmp/include/mach/debug-macro.S b/arch/arm/mach-mmp/include/mach/debug-macro.S
new file mode 100644 (file)
index 0000000..a850f87
--- /dev/null
@@ -0,0 +1,23 @@
+/* arch/arm/mach-mmp/include/mach/debug-macro.S
+ *
+ * Debugging macro include header
+ *
+ *  Copied from arch/arm/mach-pxa/include/mach/debug.S
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <mach/addr-map.h>
+
+               .macro  addruart,rx
+               mrc     p15, 0, \rx, c1, c0
+               tst     \rx, #1                         @ MMU enabled?
+               ldreq   \rx, =APB_PHYS_BASE             @ physical
+               ldrne   \rx, =APB_VIRT_BASE             @ virtual
+               orr     \rx, \rx, #0x00017000
+               .endm
+
+#define UART_SHIFT     2
+#include <asm/hardware/debug-8250.S>
diff --git a/arch/arm/mach-mmp/include/mach/devices.h b/arch/arm/mach-mmp/include/mach/devices.h
new file mode 100644 (file)
index 0000000..2458539
--- /dev/null
@@ -0,0 +1,37 @@
+#include <linux/types.h>
+
+#define MAX_RESOURCE_DMA       2
+
+/* structure for describing the on-chip devices */
+struct pxa_device_desc {
+       const char      *dev_name;
+       const char      *drv_name;
+       int             id;
+       int             irq;
+       unsigned long   start;
+       unsigned long   size;
+       int             dma[MAX_RESOURCE_DMA];
+};
+
+#define PXA168_DEVICE(_name, _drv, _id, _irq, _start, _size, _dma...)  \
+struct pxa_device_desc pxa168_device_##_name __initdata = {            \
+       .dev_name       = "pxa168-" #_name,                             \
+       .drv_name       = _drv,                                         \
+       .id             = _id,                                          \
+       .irq            = IRQ_PXA168_##_irq,                            \
+       .start          = _start,                                       \
+       .size           = _size,                                        \
+       .dma            = { _dma },                                     \
+};
+
+#define PXA910_DEVICE(_name, _drv, _id, _irq, _start, _size, _dma...)  \
+struct pxa_device_desc pxa910_device_##_name __initdata = {            \
+       .dev_name       = "pxa910-" #_name,                             \
+       .drv_name       = _drv,                                         \
+       .id             = _id,                                          \
+       .irq            = IRQ_PXA910_##_irq,                            \
+       .start          = _start,                                       \
+       .size           = _size,                                        \
+       .dma            = { _dma },                                     \
+};
+extern int pxa_register_device(struct pxa_device_desc *, void *, size_t);
diff --git a/arch/arm/mach-mmp/include/mach/dma.h b/arch/arm/mach-mmp/include/mach/dma.h
new file mode 100644 (file)
index 0000000..1d69145
--- /dev/null
@@ -0,0 +1,13 @@
+/*
+ * linux/arch/arm/mach-mmp/include/mach/dma.h
+ */
+
+#ifndef __ASM_MACH_DMA_H
+#define __ASM_MACH_DMA_H
+
+#include <mach/addr-map.h>
+
+#define DMAC_REGS_VIRT (APB_VIRT_BASE + 0x00000)
+
+#include <plat/dma.h>
+#endif /* __ASM_MACH_DMA_H */
diff --git a/arch/arm/mach-mmp/include/mach/entry-macro.S b/arch/arm/mach-mmp/include/mach/entry-macro.S
new file mode 100644 (file)
index 0000000..6d3cd35
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * linux/arch/arm/mach-mmp/include/mach/entry-macro.S
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <mach/regs-icu.h>
+
+       .macro  disable_fiq
+       .endm
+
+       .macro  arch_ret_to_user, tmp1, tmp2
+       .endm
+
+       .macro  get_irqnr_preamble, base, tmp
+       ldr     \base, =ICU_AP_IRQ_SEL_INT_NUM
+       .endm
+
+       .macro  get_irqnr_and_base, irqnr, irqstat, base, tmp
+       ldr     \tmp, [\base, #0]
+       and     \irqnr, \tmp, #0x3f
+       tst     \tmp, #(1 << 6)
+       .endm
diff --git a/arch/arm/mach-mmp/include/mach/gpio.h b/arch/arm/mach-mmp/include/mach/gpio.h
new file mode 100644 (file)
index 0000000..ab26d13
--- /dev/null
@@ -0,0 +1,36 @@
+#ifndef __ASM_MACH_GPIO_H
+#define __ASM_MACH_GPIO_H
+
+#include <mach/addr-map.h>
+#include <mach/irqs.h>
+#include <asm-generic/gpio.h>
+
+#define GPIO_REGS_VIRT (APB_VIRT_BASE + 0x19000)
+
+#define BANK_OFF(n)    (((n) < 3) ? (n) << 2 : 0x100 + (((n) - 3) << 2))
+#define GPIO_REG(x)    (*((volatile u32 *)(GPIO_REGS_VIRT + (x))))
+
+#define NR_BUILTIN_GPIO        (128)
+
+#define gpio_to_bank(gpio)     ((gpio) >> 5)
+#define gpio_to_irq(gpio)      (IRQ_GPIO_START + (gpio))
+#define irq_to_gpio(irq)       ((irq) - IRQ_GPIO_START)
+
+
+#define __gpio_is_inverted(gpio)       (0)
+#define __gpio_is_occupied(gpio)       (0)
+
+/* NOTE: these macros are defined here to make optimization of
+ * gpio_{get,set}_value() to work when 'gpio' is a constant.
+ * Usage of these macros otherwise is no longer recommended,
+ * use generic GPIO API whenever possible.
+ */
+#define GPIO_bit(gpio) (1 << ((gpio) & 0x1f))
+
+#define GPLR(x)                GPIO_REG(BANK_OFF(gpio_to_bank(x)) + 0x00)
+#define GPDR(x)                GPIO_REG(BANK_OFF(gpio_to_bank(x)) + 0x0c)
+#define GPSR(x)                GPIO_REG(BANK_OFF(gpio_to_bank(x)) + 0x18)
+#define GPCR(x)                GPIO_REG(BANK_OFF(gpio_to_bank(x)) + 0x24)
+
+#include <plat/gpio.h>
+#endif /* __ASM_MACH_GPIO_H */
diff --git a/arch/arm/mach-mmp/include/mach/hardware.h b/arch/arm/mach-mmp/include/mach/hardware.h
new file mode 100644 (file)
index 0000000..99264a5
--- /dev/null
@@ -0,0 +1,4 @@
+#ifndef __ASM_MACH_HARDWARE_H
+#define __ASM_MACH_HARDWARE_H
+
+#endif /* __ASM_MACH_HARDWARE_H */
diff --git a/arch/arm/mach-mmp/include/mach/io.h b/arch/arm/mach-mmp/include/mach/io.h
new file mode 100644 (file)
index 0000000..e7adf3d
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+ * linux/arch/arm/mach-mmp/include/mach/io.h
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef __ASM_MACH_IO_H
+#define __ASM_MACH_IO_H
+
+#define IO_SPACE_LIMIT 0xffffffff
+
+/*
+ * We don't actually have real ISA nor PCI buses, but there is so many
+ * drivers out there that might just work if we fake them...
+ */
+#define __io(a)                __typesafe_io(a)
+#define __mem_pci(a)   (a)
+
+#endif /* __ASM_MACH_IO_H */
diff --git a/arch/arm/mach-mmp/include/mach/irqs.h b/arch/arm/mach-mmp/include/mach/irqs.h
new file mode 100644 (file)
index 0000000..e83e45e
--- /dev/null
@@ -0,0 +1,119 @@
+#ifndef __ASM_MACH_IRQS_H
+#define __ASM_MACH_IRQS_H
+
+/*
+ * Interrupt numbers for PXA168
+ */
+#define IRQ_PXA168_NONE                        (-1)
+#define IRQ_PXA168_SSP3                        0
+#define IRQ_PXA168_SSP2                        1
+#define IRQ_PXA168_SSP1                        2
+#define IRQ_PXA168_SSP0                        3
+#define IRQ_PXA168_PMIC_INT            4
+#define IRQ_PXA168_RTC_INT             5
+#define IRQ_PXA168_RTC_ALARM           6
+#define IRQ_PXA168_TWSI0               7
+#define IRQ_PXA168_GPU                 8
+#define IRQ_PXA168_KEYPAD              9
+#define IRQ_PXA168_ONEWIRE             12
+#define IRQ_PXA168_TIMER1              13
+#define IRQ_PXA168_TIMER2              14
+#define IRQ_PXA168_TIMER3              15
+#define IRQ_PXA168_CMU                 16
+#define IRQ_PXA168_SSP4                        17
+#define IRQ_PXA168_MSP_WAKEUP          19
+#define IRQ_PXA168_CF_WAKEUP           20
+#define IRQ_PXA168_XD_WAKEUP           21
+#define IRQ_PXA168_MFU                 22
+#define IRQ_PXA168_MSP                 23
+#define IRQ_PXA168_CF                  24
+#define IRQ_PXA168_XD                  25
+#define IRQ_PXA168_DDR_INT             26
+#define IRQ_PXA168_UART1               27
+#define IRQ_PXA168_UART2               28
+#define IRQ_PXA168_WDT                 35
+#define IRQ_PXA168_FRQ_CHANGE          38
+#define IRQ_PXA168_SDH1                        39
+#define IRQ_PXA168_SDH2                        40
+#define IRQ_PXA168_LCD                 41
+#define IRQ_PXA168_CI                  42
+#define IRQ_PXA168_USB1                        44
+#define IRQ_PXA168_NAND                        45
+#define IRQ_PXA168_HIFI_DMA            46
+#define IRQ_PXA168_DMA_INT0            47
+#define IRQ_PXA168_DMA_INT1            48
+#define IRQ_PXA168_GPIOX               49
+#define IRQ_PXA168_USB2                        51
+#define IRQ_PXA168_AC97                        57
+#define IRQ_PXA168_TWSI1               58
+#define IRQ_PXA168_PMU                 60
+#define IRQ_PXA168_SM_INT              63
+
+/*
+ * Interrupt numbers for PXA910
+ */
+#define IRQ_PXA910_AIRQ                        0
+#define IRQ_PXA910_SSP3                        1
+#define IRQ_PXA910_SSP2                        2
+#define IRQ_PXA910_SSP1                        3
+#define IRQ_PXA910_PMIC_INT            4
+#define IRQ_PXA910_RTC_INT             5
+#define IRQ_PXA910_RTC_ALARM           6
+#define IRQ_PXA910_TWSI0               7
+#define IRQ_PXA910_GPU                 8
+#define IRQ_PXA910_KEYPAD              9
+#define IRQ_PXA910_ROTARY              10
+#define IRQ_PXA910_TRACKBALL           11
+#define IRQ_PXA910_ONEWIRE             12
+#define IRQ_PXA910_AP1_TIMER1          13
+#define IRQ_PXA910_AP1_TIMER2          14
+#define IRQ_PXA910_AP1_TIMER3          15
+#define IRQ_PXA910_IPC_AP0             16
+#define IRQ_PXA910_IPC_AP1             17
+#define IRQ_PXA910_IPC_AP2             18
+#define IRQ_PXA910_IPC_AP3             19
+#define IRQ_PXA910_IPC_AP4             20
+#define IRQ_PXA910_IPC_CP0             21
+#define IRQ_PXA910_IPC_CP1             22
+#define IRQ_PXA910_IPC_CP2             23
+#define IRQ_PXA910_IPC_CP3             24
+#define IRQ_PXA910_IPC_CP4             25
+#define IRQ_PXA910_L2_DDR              26
+#define IRQ_PXA910_UART2               27
+#define IRQ_PXA910_UART3               28
+#define IRQ_PXA910_AP2_TIMER1          29
+#define IRQ_PXA910_AP2_TIMER2          30
+#define IRQ_PXA910_CP2_TIMER1          31
+#define IRQ_PXA910_CP2_TIMER2          32
+#define IRQ_PXA910_CP2_TIMER3          33
+#define IRQ_PXA910_GSSP                        34
+#define IRQ_PXA910_CP2_WDT             35
+#define IRQ_PXA910_MAIN_PMU            36
+#define IRQ_PXA910_CP_FREQ_CHG         37
+#define IRQ_PXA910_AP_FREQ_CHG         38
+#define IRQ_PXA910_MMC                 39
+#define IRQ_PXA910_AEU                 40
+#define IRQ_PXA910_LCD                 41
+#define IRQ_PXA910_CCIC                        42
+#define IRQ_PXA910_IRE                 43
+#define IRQ_PXA910_USB1                        44
+#define IRQ_PXA910_NAND                        45
+#define IRQ_PXA910_HIFI_DMA            46
+#define IRQ_PXA910_DMA_INT0            47
+#define IRQ_PXA910_DMA_INT1            48
+#define IRQ_PXA910_AP_GPIO             49
+#define IRQ_PXA910_AP2_TIMER3          50
+#define IRQ_PXA910_USB2                        51
+#define IRQ_PXA910_TWSI1               54
+#define IRQ_PXA910_CP_GPIO             55
+#define IRQ_PXA910_UART1               59      /* Slow UART */
+#define IRQ_PXA910_AP_PMU              60
+#define IRQ_PXA910_SM_INT              63      /* from PinMux */
+
+#define IRQ_GPIO_START                 64
+#define IRQ_GPIO_NUM                   128
+#define IRQ_GPIO(x)                    (IRQ_GPIO_START + (x))
+
+#define NR_IRQS                (IRQ_GPIO_START + IRQ_GPIO_NUM)
+
+#endif /* __ASM_MACH_IRQS_H */
diff --git a/arch/arm/mach-mmp/include/mach/memory.h b/arch/arm/mach-mmp/include/mach/memory.h
new file mode 100644 (file)
index 0000000..bdb21d7
--- /dev/null
@@ -0,0 +1,14 @@
+/*
+ * linux/arch/arm/mach-mmp/include/mach/memory.h
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef __ASM_MACH_MEMORY_H
+#define __ASM_MACH_MEMORY_H
+
+#define PHYS_OFFSET    UL(0x00000000)
+
+#endif /* __ASM_MACH_MEMORY_H */
diff --git a/arch/arm/mach-mmp/include/mach/mfp-pxa168.h b/arch/arm/mach-mmp/include/mach/mfp-pxa168.h
new file mode 100644 (file)
index 0000000..d0bdb6e
--- /dev/null
@@ -0,0 +1,258 @@
+#ifndef __ASM_MACH_MFP_PXA168_H
+#define __ASM_MACH_MFP_PXA168_H
+
+#include <mach/mfp.h>
+
+/* GPIO */
+#define GPIO0_GPIO             MFP_CFG(GPIO0, AF5)
+#define GPIO1_GPIO             MFP_CFG(GPIO1, AF5)
+#define GPIO2_GPIO             MFP_CFG(GPIO2, AF5)
+#define GPIO3_GPIO             MFP_CFG(GPIO3, AF5)
+#define GPIO4_GPIO             MFP_CFG(GPIO4, AF5)
+#define GPIO5_GPIO             MFP_CFG(GPIO5, AF5)
+#define GPIO6_GPIO             MFP_CFG(GPIO6, AF5)
+#define GPIO7_GPIO             MFP_CFG(GPIO7, AF5)
+#define GPIO8_GPIO             MFP_CFG(GPIO8, AF5)
+#define GPIO9_GPIO             MFP_CFG(GPIO9, AF5)
+#define GPIO10_GPIO            MFP_CFG(GPIO10, AF5)
+#define GPIO11_GPIO            MFP_CFG(GPIO11, AF5)
+#define GPIO12_GPIO            MFP_CFG(GPIO12, AF5)
+#define GPIO13_GPIO            MFP_CFG(GPIO13, AF5)
+#define GPIO14_GPIO            MFP_CFG(GPIO14, AF5)
+#define GPIO15_GPIO            MFP_CFG(GPIO15, AF5)
+#define GPIO16_GPIO            MFP_CFG(GPIO16, AF0)
+#define GPIO17_GPIO            MFP_CFG(GPIO17, AF5)
+#define GPIO18_GPIO            MFP_CFG(GPIO18, AF0)
+#define GPIO19_GPIO            MFP_CFG(GPIO19, AF5)
+#define GPIO20_GPIO            MFP_CFG(GPIO20, AF0)
+#define GPIO21_GPIO            MFP_CFG(GPIO21, AF5)
+#define GPIO22_GPIO            MFP_CFG(GPIO22, AF5)
+#define GPIO23_GPIO            MFP_CFG(GPIO23, AF5)
+#define GPIO24_GPIO            MFP_CFG(GPIO24, AF5)
+#define GPIO25_GPIO            MFP_CFG(GPIO25, AF5)
+#define GPIO26_GPIO            MFP_CFG(GPIO26, AF0)
+#define GPIO27_GPIO            MFP_CFG(GPIO27, AF5)
+#define GPIO28_GPIO            MFP_CFG(GPIO28, AF5)
+#define GPIO29_GPIO            MFP_CFG(GPIO29, AF5)
+#define GPIO30_GPIO            MFP_CFG(GPIO30, AF5)
+#define GPIO31_GPIO            MFP_CFG(GPIO31, AF5)
+#define GPIO32_GPIO            MFP_CFG(GPIO32, AF5)
+#define GPIO33_GPIO            MFP_CFG(GPIO33, AF5)
+#define GPIO34_GPIO            MFP_CFG(GPIO34, AF0)
+#define GPIO35_GPIO            MFP_CFG(GPIO35, AF0)
+#define GPIO36_GPIO            MFP_CFG(GPIO36, AF0)
+#define GPIO37_GPIO            MFP_CFG(GPIO37, AF0)
+#define GPIO38_GPIO            MFP_CFG(GPIO38, AF0)
+#define GPIO39_GPIO            MFP_CFG(GPIO39, AF0)
+#define GPIO40_GPIO            MFP_CFG(GPIO40, AF0)
+#define GPIO41_GPIO            MFP_CFG(GPIO41, AF0)
+#define GPIO42_GPIO            MFP_CFG(GPIO42, AF0)
+#define GPIO43_GPIO            MFP_CFG(GPIO43, AF0)
+#define GPIO44_GPIO            MFP_CFG(GPIO44, AF0)
+#define GPIO45_GPIO            MFP_CFG(GPIO45, AF0)
+#define GPIO46_GPIO            MFP_CFG(GPIO46, AF0)
+#define GPIO47_GPIO            MFP_CFG(GPIO47, AF0)
+#define GPIO48_GPIO            MFP_CFG(GPIO48, AF0)
+#define GPIO49_GPIO            MFP_CFG(GPIO49, AF0)
+#define GPIO50_GPIO            MFP_CFG(GPIO50, AF0)
+#define GPIO51_GPIO            MFP_CFG(GPIO51, AF0)
+#define GPIO52_GPIO            MFP_CFG(GPIO52, AF0)
+#define GPIO53_GPIO            MFP_CFG(GPIO53, AF0)
+#define GPIO54_GPIO            MFP_CFG(GPIO54, AF0)
+#define GPIO55_GPIO            MFP_CFG(GPIO55, AF0)
+#define GPIO56_GPIO            MFP_CFG(GPIO56, AF0)
+#define GPIO57_GPIO            MFP_CFG(GPIO57, AF0)
+#define GPIO58_GPIO            MFP_CFG(GPIO58, AF0)
+#define GPIO59_GPIO            MFP_CFG(GPIO59, AF0)
+#define GPIO60_GPIO            MFP_CFG(GPIO60, AF0)
+#define GPIO61_GPIO            MFP_CFG(GPIO61, AF0)
+#define GPIO62_GPIO            MFP_CFG(GPIO62, AF0)
+#define GPIO63_GPIO            MFP_CFG(GPIO63, AF0)
+#define GPIO64_GPIO            MFP_CFG(GPIO64, AF0)
+#define GPIO65_GPIO            MFP_CFG(GPIO65, AF0)
+#define GPIO66_GPIO            MFP_CFG(GPIO66, AF0)
+#define GPIO67_GPIO            MFP_CFG(GPIO67, AF0)
+#define GPIO68_GPIO            MFP_CFG(GPIO68, AF0)
+#define GPIO69_GPIO            MFP_CFG(GPIO69, AF0)
+#define GPIO70_GPIO            MFP_CFG(GPIO70, AF0)
+#define GPIO71_GPIO            MFP_CFG(GPIO71, AF0)
+#define GPIO72_GPIO            MFP_CFG(GPIO72, AF0)
+#define GPIO73_GPIO            MFP_CFG(GPIO73, AF0)
+#define GPIO74_GPIO            MFP_CFG(GPIO74, AF0)
+#define GPIO75_GPIO            MFP_CFG(GPIO75, AF0)
+#define GPIO76_GPIO            MFP_CFG(GPIO76, AF0)
+#define GPIO77_GPIO            MFP_CFG(GPIO77, AF0)
+#define GPIO78_GPIO            MFP_CFG(GPIO78, AF0)
+#define GPIO79_GPIO            MFP_CFG(GPIO79, AF0)
+#define GPIO80_GPIO            MFP_CFG(GPIO80, AF0)
+#define GPIO81_GPIO            MFP_CFG(GPIO81, AF0)
+#define GPIO82_GPIO            MFP_CFG(GPIO82, AF0)
+#define GPIO83_GPIO            MFP_CFG(GPIO83, AF0)
+#define GPIO84_GPIO            MFP_CFG(GPIO84, AF0)
+#define GPIO85_GPIO            MFP_CFG(GPIO85, AF0)
+#define GPIO86_GPIO            MFP_CFG(GPIO86, AF0)
+#define GPIO87_GPIO            MFP_CFG(GPIO87, AF0)
+#define GPIO88_GPIO            MFP_CFG(GPIO88, AF0)
+#define GPIO89_GPIO            MFP_CFG(GPIO89, AF0)
+#define GPIO90_GPIO            MFP_CFG(GPIO90, AF0)
+#define GPIO91_GPIO            MFP_CFG(GPIO91, AF0)
+#define GPIO92_GPIO            MFP_CFG(GPIO92, AF0)
+#define GPIO93_GPIO            MFP_CFG(GPIO93, AF0)
+#define GPIO94_GPIO            MFP_CFG(GPIO94, AF0)
+#define GPIO95_GPIO            MFP_CFG(GPIO95, AF0)
+#define GPIO96_GPIO            MFP_CFG(GPIO96, AF0)
+#define GPIO97_GPIO            MFP_CFG(GPIO97, AF0)
+#define GPIO98_GPIO            MFP_CFG(GPIO98, AF0)
+#define GPIO99_GPIO            MFP_CFG(GPIO99, AF0)
+#define GPIO100_GPIO           MFP_CFG(GPIO100, AF0)
+#define GPIO101_GPIO           MFP_CFG(GPIO101, AF0)
+#define GPIO102_GPIO           MFP_CFG(GPIO102, AF0)
+#define GPIO103_GPIO           MFP_CFG(GPIO103, AF0)
+#define GPIO104_GPIO           MFP_CFG(GPIO104, AF0)
+#define GPIO105_GPIO           MFP_CFG(GPIO105, AF0)
+#define GPIO106_GPIO           MFP_CFG(GPIO106, AF0)
+#define GPIO107_GPIO           MFP_CFG(GPIO107, AF0)
+#define GPIO108_GPIO           MFP_CFG(GPIO108, AF0)
+#define GPIO109_GPIO           MFP_CFG(GPIO109, AF0)
+#define GPIO110_GPIO           MFP_CFG(GPIO110, AF0)
+#define GPIO111_GPIO           MFP_CFG(GPIO111, AF0)
+#define GPIO112_GPIO           MFP_CFG(GPIO112, AF0)
+#define GPIO113_GPIO           MFP_CFG(GPIO113, AF0)
+#define GPIO114_GPIO           MFP_CFG(GPIO114, AF0)
+#define GPIO115_GPIO           MFP_CFG(GPIO115, AF0)
+#define GPIO116_GPIO           MFP_CFG(GPIO116, AF0)
+#define GPIO117_GPIO           MFP_CFG(GPIO117, AF0)
+#define GPIO118_GPIO           MFP_CFG(GPIO118, AF0)
+#define GPIO119_GPIO           MFP_CFG(GPIO119, AF0)
+#define GPIO120_GPIO           MFP_CFG(GPIO120, AF0)
+#define GPIO121_GPIO           MFP_CFG(GPIO121, AF0)
+#define GPIO122_GPIO           MFP_CFG(GPIO122, AF0)
+
+/* DFI */
+#define GPIO0_DFI_D15          MFP_CFG(GPIO0, AF0)
+#define GPIO1_DFI_D14          MFP_CFG(GPIO1, AF0)
+#define GPIO2_DFI_D13          MFP_CFG(GPIO2, AF0)
+#define GPIO3_DFI_D12          MFP_CFG(GPIO3, AF0)
+#define GPIO4_DFI_D11          MFP_CFG(GPIO4, AF0)
+#define GPIO5_DFI_D10          MFP_CFG(GPIO5, AF0)
+#define GPIO6_DFI_D9           MFP_CFG(GPIO6, AF0)
+#define GPIO7_DFI_D8           MFP_CFG(GPIO7, AF0)
+#define GPIO8_DFI_D7           MFP_CFG(GPIO8, AF0)
+#define GPIO9_DFI_D6           MFP_CFG(GPIO9, AF0)
+#define GPIO10_DFI_D5          MFP_CFG(GPIO10, AF0)
+#define GPIO11_DFI_D4          MFP_CFG(GPIO11, AF0)
+#define GPIO12_DFI_D3          MFP_CFG(GPIO12, AF0)
+#define GPIO13_DFI_D2          MFP_CFG(GPIO13, AF0)
+#define GPIO14_DFI_D1          MFP_CFG(GPIO14, AF0)
+#define GPIO15_DFI_D0          MFP_CFG(GPIO15, AF0)
+
+#define GPIO30_DFI_ADDR0       MFP_CFG(GPIO30, AF0)
+#define GPIO31_DFI_ADDR1       MFP_CFG(GPIO31, AF0)
+#define GPIO32_DFI_ADDR2       MFP_CFG(GPIO32, AF0)
+#define GPIO33_DFI_ADDR3       MFP_CFG(GPIO33, AF0)
+
+/* NAND */
+#define GPIO16_ND_nCS0         MFP_CFG(GPIO16, AF1)
+#define GPIO17_ND_nWE          MFP_CFG(GPIO17, AF0)
+#define GPIO21_ND_ALE          MFP_CFG(GPIO21, AF0)
+#define GPIO22_ND_CLE          MFP_CFG(GPIO22, AF0)
+#define GPIO24_ND_nRE          MFP_CFG(GPIO24, AF0)
+#define GPIO26_ND_RnB1         MFP_CFG(GPIO26, AF1)
+#define GPIO27_ND_RnB2         MFP_CFG(GPIO27, AF1)
+
+/* Static Memory Controller */
+#define GPIO18_SMC_nCS0                MFP_CFG(GPIO18, AF3)
+#define GPIO18_SMC_nCS1                MFP_CFG(GPIO18, AF2)
+#define GPIO16_SMC_nCS0                MFP_CFG(GPIO16, AF2)
+#define GPIO16_SMC_nCS1                MFP_CFG(GPIO16, AF3)
+#define GPIO19_SMC_nCS0                MFP_CFG(GPIO19, AF0)
+#define GPIO20_SMC_nCS1                MFP_CFG(GPIO20, AF2)
+#define GPIO23_SMC_nLUA                MFP_CFG(GPIO23, AF0)
+#define GPIO25_SMC_nLLA                MFP_CFG(GPIO25, AF0)
+#define GPIO27_SMC_IRQ         MFP_CFG(GPIO27, AF0)
+#define GPIO28_SMC_RDY         MFP_CFG(GPIO28, AF0)
+#define GPIO29_SMC_SCLK                MFP_CFG(GPIO29, AF0)
+#define GPIO34_SMC_nCS1                MFP_CFG(GPIO34, AF2)
+#define GPIO35_SMC_BE1         MFP_CFG(GPIO35, AF2)
+#define GPIO36_SMC_BE2         MFP_CFG(GPIO36, AF2)
+
+/* Compact Flash */
+#define GPIO19_CF_nCE1         MFP_CFG(GPIO19, AF3)
+#define GPIO20_CF_nCE2         MFP_CFG(GPIO20, AF3)
+#define GPIO23_CF_nALE         MFP_CFG(GPIO23, AF3)
+#define GPIO25_CF_nRESET       MFP_CFG(GPIO25, AF3)
+#define GPIO28_CF_RDY          MFP_CFG(GPIO28, AF3)
+#define GPIO29_CF_STSCH                MFP_CFG(GPIO29, AF3)
+#define GPIO30_CF_nREG         MFP_CFG(GPIO30, AF3)
+#define GPIO31_CF_nIOIS16      MFP_CFG(GPIO31, AF3)
+#define GPIO32_CF_nCD1         MFP_CFG(GPIO32, AF3)
+#define GPIO33_CF_nCD2         MFP_CFG(GPIO33, AF3)
+
+/* UART1 */
+#define GPIO107_UART1_TXD      MFP_CFG_DRV(GPIO107, AF1, FAST)
+#define GPIO107_UART1_RXD      MFP_CFG_DRV(GPIO107, AF2, FAST)
+#define GPIO108_UART1_RXD      MFP_CFG_DRV(GPIO108, AF1, FAST)
+#define GPIO108_UART1_TXD      MFP_CFG_DRV(GPIO108, AF2, FAST)
+#define GPIO109_UART1_CTS      MFP_CFG(GPIO109, AF1)
+#define GPIO109_UART1_RTS      MFP_CFG(GPIO109, AF2)
+#define GPIO110_UART1_RTS      MFP_CFG(GPIO110, AF1)
+#define GPIO110_UART1_CTS      MFP_CFG(GPIO110, AF2)
+#define GPIO111_UART1_RI       MFP_CFG(GPIO111, AF1)
+#define GPIO111_UART1_DSR      MFP_CFG(GPIO111, AF2)
+#define GPIO112_UART1_DTR      MFP_CFG(GPIO111, AF1)
+#define GPIO112_UART1_DCD      MFP_CFG(GPIO112, AF2)
+
+/* MMC1 */
+#define GPIO37_MMC1_DAT7       MFP_CFG(GPIO37, AF1)
+#define GPIO38_MMC1_DAT6       MFP_CFG(GPIO38, AF1)
+#define GPIO54_MMC1_DAT5       MFP_CFG(GPIO54, AF1)
+#define GPIO48_MMC1_DAT4       MFP_CFG(GPIO48, AF1)
+#define GPIO51_MMC1_DAT3       MFP_CFG(GPIO51, AF1)
+#define GPIO52_MMC1_DAT2       MFP_CFG(GPIO52, AF1)
+#define GPIO40_MMC1_DAT1       MFP_CFG(GPIO40, AF1)
+#define GPIO41_MMC1_DAT0       MFP_CFG(GPIO41, AF1)
+#define GPIO49_MMC1_CMD                MFP_CFG(GPIO49, AF1)
+#define GPIO43_MMC1_CLK                MFP_CFG(GPIO43, AF1)
+#define GPIO53_MMC1_CD         MFP_CFG(GPIO53, AF1)
+#define GPIO46_MMC1_WP         MFP_CFG(GPIO46, AF1)
+
+/* LCD */
+#define GPIO84_LCD_CS          MFP_CFG(GPIO84, AF1)
+#define GPIO60_LCD_DD0         MFP_CFG(GPIO60, AF1)
+#define GPIO61_LCD_DD1         MFP_CFG(GPIO61, AF1)
+#define GPIO70_LCD_DD10                MFP_CFG(GPIO70, AF1)
+#define GPIO71_LCD_DD11                MFP_CFG(GPIO71, AF1)
+#define GPIO72_LCD_DD12                MFP_CFG(GPIO72, AF1)
+#define GPIO73_LCD_DD13                MFP_CFG(GPIO73, AF1)
+#define GPIO74_LCD_DD14                MFP_CFG(GPIO74, AF1)
+#define GPIO75_LCD_DD15                MFP_CFG(GPIO75, AF1)
+#define GPIO76_LCD_DD16                MFP_CFG(GPIO76, AF1)
+#define GPIO77_LCD_DD17                MFP_CFG(GPIO77, AF1)
+#define GPIO78_LCD_DD18                MFP_CFG(GPIO78, AF1)
+#define GPIO79_LCD_DD19                MFP_CFG(GPIO79, AF1)
+#define GPIO62_LCD_DD2         MFP_CFG(GPIO62, AF1)
+#define GPIO80_LCD_DD20                MFP_CFG(GPIO80, AF1)
+#define GPIO81_LCD_DD21                MFP_CFG(GPIO81, AF1)
+#define GPIO82_LCD_DD22                MFP_CFG(GPIO82, AF1)
+#define GPIO83_LCD_DD23                MFP_CFG(GPIO83, AF1)
+#define GPIO63_LCD_DD3         MFP_CFG(GPIO63, AF1)
+#define GPIO64_LCD_DD4         MFP_CFG(GPIO64, AF1)
+#define GPIO65_LCD_DD5         MFP_CFG(GPIO65, AF1)
+#define GPIO66_LCD_DD6         MFP_CFG(GPIO66, AF1)
+#define GPIO67_LCD_DD7         MFP_CFG(GPIO67, AF1)
+#define GPIO68_LCD_DD8         MFP_CFG(GPIO68, AF1)
+#define GPIO69_LCD_DD9         MFP_CFG(GPIO69, AF1)
+#define GPIO59_LCD_DENA_BIAS   MFP_CFG(GPIO59, AF1)
+#define GPIO56_LCD_FCLK_RD     MFP_CFG(GPIO56, AF1)
+#define GPIO57_LCD_LCLK_A0     MFP_CFG(GPIO57, AF1)
+#define GPIO58_LCD_PCLK_WR     MFP_CFG(GPIO58, AF1)
+#define GPIO85_LCD_VSYNC       MFP_CFG(GPIO85, AF1)
+
+/* I2S */
+#define GPIO113_I2S_MCLK       MFP_CFG(GPIO113,AF6)
+#define GPIO114_I2S_FRM                MFP_CFG(GPIO114,AF1)
+#define GPIO115_I2S_BCLK       MFP_CFG(GPIO115,AF1)
+#define GPIO116_I2S_RXD                MFP_CFG(GPIO116,AF2)
+#define GPIO117_I2S_TXD                MFP_CFG(GPIO117,AF2)
+
+#endif /* __ASM_MACH_MFP_PXA168_H */
diff --git a/arch/arm/mach-mmp/include/mach/mfp-pxa910.h b/arch/arm/mach-mmp/include/mach/mfp-pxa910.h
new file mode 100644 (file)
index 0000000..48a1cbc
--- /dev/null
@@ -0,0 +1,157 @@
+#ifndef __ASM_MACH_MFP_PXA910_H
+#define __ASM_MACH_MFP_PXA910_H
+
+#include <mach/mfp.h>
+
+/* UART2 */
+#define GPIO47_UART2_RXD       MFP_CFG(GPIO47, AF6)
+#define GPIO48_UART2_TXD       MFP_CFG(GPIO48, AF6)
+
+/* UART3 */
+#define GPIO31_UART3_RXD       MFP_CFG(GPIO31, AF4)
+#define GPIO32_UART3_TXD       MFP_CFG(GPIO32, AF4)
+
+/*IRDA*/
+#define GPIO51_IRDA_SHDN       MFP_CFG(GPIO51, AF0)
+
+/* SMC */
+#define SM_nCS0_nCS0           MFP_CFG(SM_nCS0, AF0)
+#define SM_ADV_SM_ADV          MFP_CFG(SM_ADV, AF0)
+#define SM_SCLK_SM_SCLK                MFP_CFG(SM_SCLK, AF0)
+#define SM_SCLK_SM_SCLK                MFP_CFG(SM_SCLK, AF0)
+#define SM_BE0_SM_BE0          MFP_CFG(SM_BE0, AF1)
+#define SM_BE1_SM_BE1          MFP_CFG(SM_BE1, AF1)
+
+/* I2C */
+#define GPIO53_CI2C_SCL                MFP_CFG(GPIO53, AF2)
+#define GPIO54_CI2C_SDA                MFP_CFG(GPIO54, AF2)
+
+/* SSP1 (I2S) */
+#define GPIO24_SSP1_SDATA_IN   MFP_CFG_DRV(GPIO24, AF1, MEDIUM)
+#define GPIO21_SSP1_BITCLK     MFP_CFG_DRV(GPIO21, AF1, MEDIUM)
+#define GPIO20_SSP1_SYSCLK     MFP_CFG_DRV(GPIO20, AF1, MEDIUM)
+#define GPIO22_SSP1_SYNC       MFP_CFG_DRV(GPIO22, AF1, MEDIUM)
+#define GPIO23_SSP1_DATA_OUT   MFP_CFG_DRV(GPIO23, AF1, MEDIUM)
+#define GPIO124_MN_CLK_OUT     MFP_CFG_DRV(GPIO124, AF1, MEDIUM)
+#define GPIO123_CLK_REQ                MFP_CFG_DRV(GPIO123, AF0, MEDIUM)
+
+/* DFI */
+#define DF_IO0_ND_IO0          MFP_CFG(DF_IO0, AF0)
+#define DF_IO1_ND_IO1          MFP_CFG(DF_IO1, AF0)
+#define DF_IO2_ND_IO2          MFP_CFG(DF_IO2, AF0)
+#define DF_IO3_ND_IO3          MFP_CFG(DF_IO3, AF0)
+#define DF_IO4_ND_IO4          MFP_CFG(DF_IO4, AF0)
+#define DF_IO5_ND_IO5          MFP_CFG(DF_IO5, AF0)
+#define DF_IO6_ND_IO6          MFP_CFG(DF_IO6, AF0)
+#define DF_IO7_ND_IO7          MFP_CFG(DF_IO7, AF0)
+#define DF_IO8_ND_IO8          MFP_CFG(DF_IO8, AF0)
+#define DF_IO9_ND_IO9          MFP_CFG(DF_IO9, AF0)
+#define DF_IO10_ND_IO10                MFP_CFG(DF_IO10, AF0)
+#define DF_IO11_ND_IO11                MFP_CFG(DF_IO11, AF0)
+#define DF_IO12_ND_IO12                MFP_CFG(DF_IO12, AF0)
+#define DF_IO13_ND_IO13                MFP_CFG(DF_IO13, AF0)
+#define DF_IO14_ND_IO14                MFP_CFG(DF_IO14, AF0)
+#define DF_IO15_ND_IO15                MFP_CFG(DF_IO15, AF0)
+#define DF_nCS0_SM_nCS2_nCS0   MFP_CFG(DF_nCS0_SM_nCS2, AF0)
+#define DF_ALE_SM_WEn_ND_ALE   MFP_CFG(DF_ALE_SM_WEn, AF1)
+#define DF_CLE_SM_OEn_ND_CLE   MFP_CFG(DF_CLE_SM_OEn, AF0)
+#define DF_WEn_DF_WEn          MFP_CFG(DF_WEn, AF1)
+#define DF_REn_DF_REn          MFP_CFG(DF_REn, AF1)
+#define DF_RDY0_DF_RDY0                MFP_CFG(DF_RDY0, AF0)
+
+/*keypad*/
+#define GPIO00_KP_MKIN0                MFP_CFG(GPIO0, AF1)
+#define GPIO01_KP_MKOUT0       MFP_CFG(GPIO1, AF1)
+#define GPIO02_KP_MKIN1                MFP_CFG(GPIO2, AF1)
+#define GPIO03_KP_MKOUT1       MFP_CFG(GPIO3, AF1)
+#define GPIO04_KP_MKIN2                MFP_CFG(GPIO4, AF1)
+#define GPIO05_KP_MKOUT2       MFP_CFG(GPIO5, AF1)
+#define GPIO06_KP_MKIN3                MFP_CFG(GPIO6, AF1)
+#define GPIO07_KP_MKOUT3       MFP_CFG(GPIO7, AF1)
+#define GPIO08_KP_MKIN4                MFP_CFG(GPIO8, AF1)
+#define GPIO09_KP_MKOUT4       MFP_CFG(GPIO9, AF1)
+#define GPIO10_KP_MKIN5                MFP_CFG(GPIO10, AF1)
+#define GPIO11_KP_MKOUT5       MFP_CFG(GPIO11, AF1)
+#define GPIO12_KP_MKIN6                MFP_CFG(GPIO12, AF1)
+#define GPIO13_KP_MKOUT6       MFP_CFG(GPIO13, AF1)
+#define GPIO14_KP_MKIN7                MFP_CFG(GPIO14, AF1)
+#define GPIO15_KP_MKOUT7       MFP_CFG(GPIO15, AF1)
+#define GPIO16_KP_DKIN0                MFP_CFG(GPIO16, AF1)
+#define GPIO17_KP_DKIN1                MFP_CFG(GPIO17, AF1)
+#define GPIO18_KP_DKIN2                MFP_CFG(GPIO18, AF1)
+#define GPIO19_KP_DKIN3                MFP_CFG(GPIO19, AF1)
+
+/* LCD */
+#define GPIO81_LCD_FCLK                MFP_CFG(GPIO81, AF1)
+#define GPIO82_LCD_LCLK                MFP_CFG(GPIO82, AF1)
+#define GPIO83_LCD_PCLK                MFP_CFG(GPIO83, AF1)
+#define GPIO84_LCD_DENA                MFP_CFG(GPIO84, AF1)
+#define GPIO85_LCD_DD0         MFP_CFG(GPIO85, AF1)
+#define GPIO86_LCD_DD1         MFP_CFG(GPIO86, AF1)
+#define GPIO87_LCD_DD2         MFP_CFG(GPIO87, AF1)
+#define GPIO88_LCD_DD3         MFP_CFG(GPIO88, AF1)
+#define GPIO89_LCD_DD4         MFP_CFG(GPIO89, AF1)
+#define GPIO90_LCD_DD5         MFP_CFG(GPIO90, AF1)
+#define GPIO91_LCD_DD6         MFP_CFG(GPIO91, AF1)
+#define GPIO92_LCD_DD7         MFP_CFG(GPIO92, AF1)
+#define GPIO93_LCD_DD8         MFP_CFG(GPIO93, AF1)
+#define GPIO94_LCD_DD9         MFP_CFG(GPIO94, AF1)
+#define GPIO95_LCD_DD10                MFP_CFG(GPIO95, AF1)
+#define GPIO96_LCD_DD11                MFP_CFG(GPIO96, AF1)
+#define GPIO97_LCD_DD12                MFP_CFG(GPIO97, AF1)
+#define GPIO98_LCD_DD13                MFP_CFG(GPIO98, AF1)
+#define GPIO100_LCD_DD14       MFP_CFG(GPIO100, AF1)
+#define GPIO101_LCD_DD15       MFP_CFG(GPIO101, AF1)
+#define GPIO102_LCD_DD16       MFP_CFG(GPIO102, AF1)
+#define GPIO103_LCD_DD17       MFP_CFG(GPIO103, AF1)
+#define GPIO104_LCD_DD18       MFP_CFG(GPIO104, AF1)
+#define GPIO105_LCD_DD19       MFP_CFG(GPIO105, AF1)
+#define GPIO106_LCD_DD20       MFP_CFG(GPIO106, AF1)
+#define GPIO107_LCD_DD21       MFP_CFG(GPIO107, AF1)
+#define GPIO108_LCD_DD22       MFP_CFG(GPIO108, AF1)
+#define GPIO109_LCD_DD23       MFP_CFG(GPIO109, AF1)
+
+#define GPIO104_LCD_SPIDOUT    MFP_CFG(GPIO104, AF3)
+#define GPIO105_LCD_SPIDIN     MFP_CFG(GPIO105, AF3)
+#define GPIO107_LCD_CS1        MFP_CFG(GPIO107, AF3)
+#define GPIO108_LCD_DCLK       MFP_CFG(GPIO108, AF3)
+
+#define GPIO106_LCD_RESET      MFP_CFG(GPIO106, AF0)
+
+/*smart panel*/
+#define GPIO82_LCD_A0          MFP_CFG(GPIO82, AF0)
+#define GPIO83_LCD_WR          MFP_CFG(GPIO83, AF0)
+#define GPIO103_LCD_CS         MFP_CFG(GPIO103, AF0)
+
+/*1wire*/
+#define GPIO106_1WIRE          MFP_CFG(GPIO106, AF3)
+
+/*CCIC*/
+#define GPIO67_CCIC_IN7                MFP_CFG_DRV(GPIO67, AF1, MEDIUM)
+#define GPIO68_CCIC_IN6                MFP_CFG_DRV(GPIO68, AF1, MEDIUM)
+#define GPIO69_CCIC_IN5                MFP_CFG_DRV(GPIO69, AF1, MEDIUM)
+#define GPIO70_CCIC_IN4                MFP_CFG_DRV(GPIO70, AF1, MEDIUM)
+#define GPIO71_CCIC_IN3                MFP_CFG_DRV(GPIO71, AF1, MEDIUM)
+#define GPIO72_CCIC_IN2                MFP_CFG_DRV(GPIO72, AF1, MEDIUM)
+#define GPIO73_CCIC_IN1                MFP_CFG_DRV(GPIO73, AF1, MEDIUM)
+#define GPIO74_CCIC_IN0                MFP_CFG_DRV(GPIO74, AF1, MEDIUM)
+#define GPIO75_CAM_HSYNC       MFP_CFG_DRV(GPIO75, AF1, MEDIUM)
+#define GPIO76_CAM_VSYNC       MFP_CFG_DRV(GPIO76, AF1, MEDIUM)
+#define GPIO77_CAM_MCLK                MFP_CFG_DRV(GPIO77, AF1, MEDIUM)
+#define GPIO78_CAM_PCLK                MFP_CFG_DRV(GPIO78, AF1, MEDIUM)
+
+/* MMC1 */
+#define MMC1_DAT7_MMC1_DAT7    MFP_CFG_DRV(MMC1_DAT7, AF0, MEDIUM)
+#define MMC1_DAT6_MMC1_DAT6    MFP_CFG_DRV(MMC1_DAT6, AF0, MEDIUM)
+#define MMC1_DAT5_MMC1_DAT5    MFP_CFG_DRV(MMC1_DAT5, AF0, MEDIUM)
+#define MMC1_DAT4_MMC1_DAT4    MFP_CFG_DRV(MMC1_DAT4, AF0, MEDIUM)
+#define MMC1_DAT3_MMC1_DAT3    MFP_CFG_DRV(MMC1_DAT3, AF0, MEDIUM)
+#define MMC1_DAT2_MMC1_DAT2    MFP_CFG_DRV(MMC1_DAT2, AF0, MEDIUM)
+#define MMC1_DAT1_MMC1_DAT1    MFP_CFG_DRV(MMC1_DAT1, AF0, MEDIUM)
+#define MMC1_DAT0_MMC1_DAT0    MFP_CFG_DRV(MMC1_DAT0, AF0, MEDIUM)
+#define MMC1_CMD_MMC1_CMD      MFP_CFG_DRV(MMC1_CMD, AF0, MEDIUM)
+#define MMC1_CLK_MMC1_CLK      MFP_CFG_DRV(MMC1_CLK, AF0, MEDIUM)
+#define MMC1_CD_MMC1_CD                MFP_CFG_DRV(MMC1_CD, AF0, MEDIUM)
+#define MMC1_WP_MMC1_WP                MFP_CFG_DRV(MMC1_WP, AF0, MEDIUM)
+
+#endif /* __ASM_MACH MFP_PXA910_H */
diff --git a/arch/arm/mach-mmp/include/mach/mfp.h b/arch/arm/mach-mmp/include/mach/mfp.h
new file mode 100644 (file)
index 0000000..277ea4c
--- /dev/null
@@ -0,0 +1,37 @@
+#ifndef __ASM_MACH_MFP_H
+#define __ASM_MACH_MFP_H
+
+#include <plat/mfp.h>
+
+/*
+ * NOTE: the MFPR register bit definitions on PXA168 processor lines are a
+ * bit different from those on PXA3xx.  Bit [7:10] are now reserved, which
+ * were SLEEP_OE_N, SLEEP_DATA, SLEEP_SEL and the LSB of DRIVE bits.
+ *
+ * To cope with this difference and re-use the pxa3xx mfp code as much as
+ * possible, we make the following compromise:
+ *
+ * 1. SLEEP_OE_N will always be programmed to '1' (by MFP_LPM_FLOAT)
+ * 2. DRIVE strength definitions redefined to include the reserved bit10
+ * 3. Override MFP_CFG() and MFP_CFG_DRV()
+ * 4. Drop the use of MFP_CFG_LPM() and MFP_CFG_X()
+ */
+
+#define MFP_DRIVE_VERY_SLOW    (0x0 << 13)
+#define MFP_DRIVE_SLOW         (0x2 << 13)
+#define MFP_DRIVE_MEDIUM       (0x4 << 13)
+#define MFP_DRIVE_FAST         (0x8 << 13)
+
+#undef MFP_CFG
+#undef MFP_CFG_DRV
+#undef MFP_CFG_LPM
+#undef MFP_CFG_X
+#undef MFP_CFG_DEFAULT
+
+#define MFP_CFG(pin, af)               \
+       (MFP_LPM_FLOAT | MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_DRIVE_MEDIUM)
+
+#define MFP_CFG_DRV(pin, af, drv)      \
+       (MFP_LPM_FLOAT | MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_DRIVE_##drv)
+
+#endif /* __ASM_MACH_MFP_H */
diff --git a/arch/arm/mach-mmp/include/mach/pxa168.h b/arch/arm/mach-mmp/include/mach/pxa168.h
new file mode 100644 (file)
index 0000000..ef0a8a2
--- /dev/null
@@ -0,0 +1,23 @@
+#ifndef __ASM_MACH_PXA168_H
+#define __ASM_MACH_PXA168_H
+
+#include <mach/devices.h>
+
+extern struct pxa_device_desc pxa168_device_uart1;
+extern struct pxa_device_desc pxa168_device_uart2;
+
+static inline int pxa168_add_uart(int id)
+{
+       struct pxa_device_desc *d = NULL;
+
+       switch (id) {
+       case 1: d = &pxa168_device_uart1; break;
+       case 2: d = &pxa168_device_uart2; break;
+       }
+
+       if (d == NULL)
+               return -EINVAL;
+
+       return pxa_register_device(d, NULL, 0);
+}
+#endif /* __ASM_MACH_PXA168_H */
diff --git a/arch/arm/mach-mmp/include/mach/pxa910.h b/arch/arm/mach-mmp/include/mach/pxa910.h
new file mode 100644 (file)
index 0000000..b7aeaf5
--- /dev/null
@@ -0,0 +1,23 @@
+#ifndef __ASM_MACH_PXA910_H
+#define __ASM_MACH_PXA910_H
+
+#include <mach/devices.h>
+
+extern struct pxa_device_desc pxa910_device_uart1;
+extern struct pxa_device_desc pxa910_device_uart2;
+
+static inline int pxa910_add_uart(int id)
+{
+       struct pxa_device_desc *d = NULL;
+
+       switch (id) {
+       case 1: d = &pxa910_device_uart1; break;
+       case 2: d = &pxa910_device_uart2; break;
+       }
+
+       if (d == NULL)
+               return -EINVAL;
+
+       return pxa_register_device(d, NULL, 0);
+}
+#endif /* __ASM_MACH_PXA910_H */
diff --git a/arch/arm/mach-mmp/include/mach/regs-apbc.h b/arch/arm/mach-mmp/include/mach/regs-apbc.h
new file mode 100644 (file)
index 0000000..c6b8c9d
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * linux/arch/arm/mach-mmp/include/mach/regs-apbc.h
+ *
+ *   Application Peripheral Bus Clock Unit
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef __ASM_MACH_REGS_APBC_H
+#define __ASM_MACH_REGS_APBC_H
+
+#include <mach/addr-map.h>
+
+#define APBC_VIRT_BASE (APB_VIRT_BASE + 0x015000)
+#define APBC_REG(x)    (APBC_VIRT_BASE + (x))
+
+/*
+ * APB clock register offsets for PXA168
+ */
+#define APBC_PXA168_UART1      APBC_REG(0x000)
+#define APBC_PXA168_UART2      APBC_REG(0x004)
+#define APBC_PXA168_GPIO       APBC_REG(0x008)
+#define APBC_PXA168_PWM0       APBC_REG(0x00c)
+#define APBC_PXA168_PWM1       APBC_REG(0x010)
+#define APBC_PXA168_SSP1       APBC_REG(0x01c)
+#define APBC_PXA168_SSP2       APBC_REG(0x020)
+#define APBC_PXA168_RTC                APBC_REG(0x028)
+#define APBC_PXA168_TWSI0      APBC_REG(0x02c)
+#define APBC_PXA168_KPC                APBC_REG(0x030)
+#define APBC_PXA168_TIMERS     APBC_REG(0x034)
+#define APBC_PXA168_AIB                APBC_REG(0x03c)
+#define APBC_PXA168_SW_JTAG    APBC_REG(0x040)
+#define APBC_PXA168_ONEWIRE    APBC_REG(0x048)
+#define APBC_PXA168_SSP3       APBC_REG(0x04c)
+#define APBC_PXA168_ASFAR      APBC_REG(0x050)
+#define APBC_PXA168_ASSAR      APBC_REG(0x054)
+#define APBC_PXA168_SSP4       APBC_REG(0x058)
+#define APBC_PXA168_SSP5       APBC_REG(0x05c)
+#define APBC_PXA168_TWSI1      APBC_REG(0x06c)
+#define APBC_PXA168_UART3      APBC_REG(0x070)
+#define APBC_PXA168_AC97       APBC_REG(0x084)
+
+/*
+ * APB Clock register offsets for PXA910
+ */
+#define APBC_PXA910_UART0      APBC_REG(0x000)
+#define APBC_PXA910_UART1      APBC_REG(0x004)
+#define APBC_PXA910_GPIO       APBC_REG(0x008)
+#define APBC_PXA910_PWM0       APBC_REG(0x00c)
+#define APBC_PXA910_PWM1       APBC_REG(0x010)
+#define APBC_PXA910_PWM2       APBC_REG(0x014)
+#define APBC_PXA910_PWM3       APBC_REG(0x018)
+#define APBC_PXA910_SSP1       APBC_REG(0x01c)
+#define APBC_PXA910_SSP2       APBC_REG(0x020)
+#define APBC_PXA910_IPC                APBC_REG(0x024)
+#define APBC_PXA910_TWSI0      APBC_REG(0x02c)
+#define APBC_PXA910_KPC                APBC_REG(0x030)
+#define APBC_PXA910_TIMERS     APBC_REG(0x034)
+#define APBC_PXA910_TBROT      APBC_REG(0x038)
+#define APBC_PXA910_AIB                APBC_REG(0x03c)
+#define APBC_PXA910_SW_JTAG    APBC_REG(0x040)
+#define APBC_PXA910_TIMERS1    APBC_REG(0x044)
+#define APBC_PXA910_ONEWIRE    APBC_REG(0x048)
+#define APBC_PXA910_SSP3       APBC_REG(0x04c)
+#define APBC_PXA910_ASFAR      APBC_REG(0x050)
+#define APBC_PXA910_ASSAR      APBC_REG(0x054)
+
+/* Common APB clock register bit definitions */
+#define APBC_APBCLK    (1 << 0)  /* APB Bus Clock Enable */
+#define APBC_FNCLK     (1 << 1)  /* Functional Clock Enable */
+#define APBC_RST       (1 << 2)  /* Reset Generation */
+
+/* Functional Clock Selection Mask */
+#define APBC_FNCLKSEL(x)       (((x) & 0xf) << 4)
+
+#endif /* __ASM_MACH_REGS_APBC_H */
diff --git a/arch/arm/mach-mmp/include/mach/regs-apmu.h b/arch/arm/mach-mmp/include/mach/regs-apmu.h
new file mode 100644 (file)
index 0000000..9190305
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * linux/arch/arm/mach-mmp/include/mach/regs-apmu.h
+ *
+ *   Application Subsystem Power Management Unit
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef __ASM_MACH_REGS_APMU_H
+#define __ASM_MACH_REGS_APMU_H
+
+#include <mach/addr-map.h>
+
+#define APMU_VIRT_BASE (AXI_VIRT_BASE + 0x82800)
+#define APMU_REG(x)    (APMU_VIRT_BASE + (x))
+
+/* Clock Reset Control */
+#define APMU_IRE       APMU_REG(0x048)
+#define APMU_LCD       APMU_REG(0x04c)
+#define APMU_CCIC      APMU_REG(0x050)
+#define APMU_SDH0      APMU_REG(0x054)
+#define APMU_SDH1      APMU_REG(0x058)
+#define APMU_USB       APMU_REG(0x05c)
+#define APMU_NAND      APMU_REG(0x060)
+#define APMU_DMA       APMU_REG(0x064)
+#define APMU_GEU       APMU_REG(0x068)
+#define APMU_BUS       APMU_REG(0x06c)
+
+#define APMU_FNCLK_EN  (1 << 4)
+#define APMU_AXICLK_EN (1 << 3)
+#define APMU_FNRST_DIS (1 << 1)
+#define APMU_AXIRST_DIS        (1 << 0)
+
+#endif /* __ASM_MACH_REGS_APMU_H */
diff --git a/arch/arm/mach-mmp/include/mach/regs-icu.h b/arch/arm/mach-mmp/include/mach/regs-icu.h
new file mode 100644 (file)
index 0000000..e5f0872
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * linux/arch/arm/mach-mmp/include/mach/regs-icu.h
+ *
+ *   Interrupt Control Unit
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef __ASM_MACH_ICU_H
+#define __ASM_MACH_ICU_H
+
+#include <mach/addr-map.h>
+
+#define ICU_VIRT_BASE  (AXI_VIRT_BASE + 0x82000)
+#define ICU_REG(x)     (ICU_VIRT_BASE + (x))
+
+#define ICU_INT_CONF(n)                ICU_REG((n) << 2)
+#define ICU_INT_CONF_AP_INT    (1 << 6)
+#define ICU_INT_CONF_CP_INT    (1 << 5)
+#define ICU_INT_CONF_IRQ       (1 << 4)
+#define ICU_INT_CONF_MASK      (0xf)
+
+#define ICU_AP_FIQ_SEL_INT_NUM ICU_REG(0x108)  /* AP FIQ Selected Interrupt */
+#define ICU_AP_IRQ_SEL_INT_NUM ICU_REG(0x10C)  /* AP IRQ Selected Interrupt */
+#define ICU_AP_GBL_IRQ_MSK     ICU_REG(0x114)  /* AP Global Interrupt Mask */
+#define ICU_INT_STATUS_0       ICU_REG(0x128)  /* Interrupt Stuats 0 */
+#define ICU_INT_STATUS_1       ICU_REG(0x12C)  /* Interrupt Status 1 */
+
+#endif /* __ASM_MACH_ICU_H */
diff --git a/arch/arm/mach-mmp/include/mach/regs-timers.h b/arch/arm/mach-mmp/include/mach/regs-timers.h
new file mode 100644 (file)
index 0000000..45589fe
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * linux/arch/arm/mach-mmp/include/mach/regs-timers.h
+ *
+ *   Timers Module
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef __ASM_MACH_REGS_TIMERS_H
+#define __ASM_MACH_REGS_TIMERS_H
+
+#include <mach/addr-map.h>
+
+#define TIMERS1_VIRT_BASE      (APB_VIRT_BASE + 0x14000)
+#define TIMERS2_VIRT_BASE      (APB_VIRT_BASE + 0x16000)
+
+#define TMR_CCR                (0x0000)
+#define TMR_TN_MM(n, m)        (0x0004 + ((n) << 3) + (((n) + (m)) << 2))
+#define TMR_CR(n)      (0x0028 + ((n) << 2))
+#define TMR_SR(n)      (0x0034 + ((n) << 2))
+#define TMR_IER(n)     (0x0040 + ((n) << 2))
+#define TMR_PLVR(n)    (0x004c + ((n) << 2))
+#define TMR_PLCR(n)    (0x0058 + ((n) << 2))
+#define TMR_WMER       (0x0064)
+#define TMR_WMR                (0x0068)
+#define TMR_WVR                (0x006c)
+#define TMR_WSR                (0x0070)
+#define TMR_ICR(n)     (0x0074 + ((n) << 2))
+#define TMR_WICR       (0x0080)
+#define TMR_CER                (0x0084)
+#define TMR_CMR                (0x0088)
+#define TMR_ILR(n)     (0x008c + ((n) << 2))
+#define TMR_WCR                (0x0098)
+#define TMR_WFAR       (0x009c)
+#define TMR_WSAR       (0x00A0)
+#define TMR_CVWR(n)    (0x00A4 + ((n) << 2))
+
+#define TMR_CCR_CS_0(x)        (((x) & 0x3) << 0)
+#define TMR_CCR_CS_1(x)        (((x) & 0x7) << 2)
+#define TMR_CCR_CS_2(x)        (((x) & 0x3) << 5)
+
+#endif /* __ASM_MACH_REGS_TIMERS_H */
diff --git a/arch/arm/mach-mmp/include/mach/system.h b/arch/arm/mach-mmp/include/mach/system.h
new file mode 100644 (file)
index 0000000..001edfe
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+ * linux/arch/arm/mach-mmp/include/mach/system.h
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef __ASM_MACH_SYSTEM_H
+#define __ASM_MACH_SYSTEM_H
+
+static inline void arch_idle(void)
+{
+       cpu_do_idle();
+}
+
+static inline void arch_reset(char mode)
+{
+       cpu_reset(0);
+}
+#endif /* __ASM_MACH_SYSTEM_H */
diff --git a/arch/arm/mach-mmp/include/mach/timex.h b/arch/arm/mach-mmp/include/mach/timex.h
new file mode 100644 (file)
index 0000000..6cebbd0
--- /dev/null
@@ -0,0 +1,9 @@
+/*
+ * linux/arch/arm/mach-mmp/include/mach/timex.h
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#define CLOCK_TICK_RATE                3250000
diff --git a/arch/arm/mach-mmp/include/mach/uncompress.h b/arch/arm/mach-mmp/include/mach/uncompress.h
new file mode 100644 (file)
index 0000000..c93d5fa
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * arch/arm/mach-mmp/include/mach/uncompress.h
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/serial_reg.h>
+#include <mach/addr-map.h>
+
+#define UART1_BASE     (APB_PHYS_BASE + 0x36000)
+#define UART2_BASE     (APB_PHYS_BASE + 0x17000)
+#define UART3_BASE     (APB_PHYS_BASE + 0x18000)
+
+static inline void putc(char c)
+{
+       volatile unsigned long *UART = (unsigned long *)UART2_BASE;
+
+       /* UART enabled? */
+       if (!(UART[UART_IER] & UART_IER_UUE))
+               return;
+
+       while (!(UART[UART_LSR] & UART_LSR_THRE))
+               barrier();
+
+       UART[UART_TX] = c;
+}
+
+/*
+ * This does not append a newline
+ */
+static inline void flush(void)
+{
+}
+
+/*
+ * nothing to do
+ */
+#define arch_decomp_setup()
+#define arch_decomp_wdog()
diff --git a/arch/arm/mach-mmp/include/mach/vmalloc.h b/arch/arm/mach-mmp/include/mach/vmalloc.h
new file mode 100644 (file)
index 0000000..b60ccaf
--- /dev/null
@@ -0,0 +1,5 @@
+/*
+ * linux/arch/arm/mach-mmp/include/mach/vmalloc.h
+ */
+
+#define VMALLOC_END    0xfe000000
diff --git a/arch/arm/mach-mmp/irq.c b/arch/arm/mach-mmp/irq.c
new file mode 100644 (file)
index 0000000..52ff2f0
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ *  linux/arch/arm/mach-mmp/irq.c
+ *
+ *  Generic IRQ handling, GPIO IRQ demultiplexing, etc.
+ *
+ *  Author:    Bin Yang <bin.yang@marvell.com>
+ *  Created:   Sep 30, 2008
+ *  Copyright: Marvell International Ltd.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ */
+
+#include <linux/init.h>
+#include <linux/irq.h>
+#include <linux/io.h>
+
+#include <mach/regs-icu.h>
+
+#include "common.h"
+
+#define IRQ_ROUTE_TO_AP                (ICU_INT_CONF_AP_INT | ICU_INT_CONF_IRQ)
+
+#define PRIORITY_DEFAULT       0x1
+#define PRIORITY_NONE          0x0     /* means IRQ disabled */
+
+static void icu_mask_irq(unsigned int irq)
+{
+       __raw_writel(PRIORITY_NONE, ICU_INT_CONF(irq));
+}
+
+static void icu_unmask_irq(unsigned int irq)
+{
+       __raw_writel(IRQ_ROUTE_TO_AP | PRIORITY_DEFAULT, ICU_INT_CONF(irq));
+}
+
+static struct irq_chip icu_irq_chip = {
+       .name   = "icu_irq",
+       .ack    = icu_mask_irq,
+       .mask   = icu_mask_irq,
+       .unmask = icu_unmask_irq,
+};
+
+void __init icu_init_irq(void)
+{
+       int irq;
+
+       for (irq = 0; irq < 64; irq++) {
+               icu_mask_irq(irq);
+               set_irq_chip(irq, &icu_irq_chip);
+               set_irq_handler(irq, handle_level_irq);
+               set_irq_flags(irq, IRQF_VALID);
+       }
+}
diff --git a/arch/arm/mach-mmp/pxa168.c b/arch/arm/mach-mmp/pxa168.c
new file mode 100644 (file)
index 0000000..ae92446
--- /dev/null
@@ -0,0 +1,111 @@
+/*
+ *  linux/arch/arm/mach-mmp/pxa168.c
+ *
+ *  Code specific to PXA168
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/list.h>
+#include <linux/io.h>
+#include <linux/clk.h>
+
+#include <asm/mach/time.h>
+#include <mach/addr-map.h>
+#include <mach/cputype.h>
+#include <mach/regs-apbc.h>
+#include <mach/irqs.h>
+#include <mach/gpio.h>
+#include <mach/dma.h>
+#include <mach/devices.h>
+#include <mach/mfp.h>
+
+#include "common.h"
+#include "clock.h"
+
+#define MFPR_VIRT_BASE (APB_VIRT_BASE + 0x1e000)
+
+static struct mfp_addr_map pxa168_mfp_addr_map[] __initdata =
+{
+       MFP_ADDR_X(GPIO0,   GPIO36,  0x04c),
+       MFP_ADDR_X(GPIO37,  GPIO55,  0x000),
+       MFP_ADDR_X(GPIO56,  GPIO123, 0x0e0),
+       MFP_ADDR_X(GPIO124, GPIO127, 0x0f4),
+
+       MFP_ADDR_END,
+};
+
+#define APMASK(i)      (GPIO_REGS_VIRT + BANK_OFF(i) + 0x09c)
+
+static void __init pxa168_init_gpio(void)
+{
+       int i;
+
+       /* enable GPIO clock */
+       __raw_writel(APBC_APBCLK | APBC_FNCLK, APBC_PXA168_GPIO);
+
+       /* unmask GPIO edge detection for all 4 banks - APMASKx */
+       for (i = 0; i < 4; i++)
+               __raw_writel(0xffffffff, APMASK(i));
+
+       pxa_init_gpio(IRQ_PXA168_GPIOX, 0, 127, NULL);
+}
+
+void __init pxa168_init_irq(void)
+{
+       icu_init_irq();
+       pxa168_init_gpio();
+}
+
+/* APB peripheral clocks */
+static APBC_CLK(uart1, PXA168_UART1, 1, 14745600);
+static APBC_CLK(uart2, PXA168_UART2, 1, 14745600);
+
+/* device and clock bindings */
+static struct clk_lookup pxa168_clkregs[] = {
+       INIT_CLKREG(&clk_uart1, "pxa2xx-uart.0", NULL),
+       INIT_CLKREG(&clk_uart2, "pxa2xx-uart.1", NULL),
+};
+
+static int __init pxa168_init(void)
+{
+       if (cpu_is_pxa168()) {
+               mfp_init_base(MFPR_VIRT_BASE);
+               mfp_init_addr(pxa168_mfp_addr_map);
+               pxa_init_dma(IRQ_PXA168_DMA_INT0, 32);
+               clks_register(ARRAY_AND_SIZE(pxa168_clkregs));
+       }
+
+       return 0;
+}
+postcore_initcall(pxa168_init);
+
+/* system timer - clock enabled, 3.25MHz */
+#define TIMER_CLK_RST  (APBC_APBCLK | APBC_FNCLK | APBC_FNCLKSEL(3))
+
+static void __init pxa168_timer_init(void)
+{
+       /* this is early, we have to initialize the CCU registers by
+        * ourselves instead of using clk_* API. Clock rate is defined
+        * by APBC_TIMERS_CLK_RST (3.25MHz) and enabled free-running
+        */
+       __raw_writel(APBC_APBCLK | APBC_RST, APBC_PXA168_TIMERS);
+
+       /* 3.25MHz, bus/functional clock enabled, release reset */
+       __raw_writel(TIMER_CLK_RST, APBC_PXA168_TIMERS);
+
+       timer_init(IRQ_PXA168_TIMER1);
+}
+
+struct sys_timer pxa168_timer = {
+       .init   = pxa168_timer_init,
+};
+
+/* on-chip devices */
+PXA168_DEVICE(uart1, "pxa2xx-uart", 0, UART1, 0xd4017000, 0x30, 21, 22);
+PXA168_DEVICE(uart2, "pxa2xx-uart", 1, UART2, 0xd4018000, 0x30, 23, 24);
diff --git a/arch/arm/mach-mmp/pxa910.c b/arch/arm/mach-mmp/pxa910.c
new file mode 100644 (file)
index 0000000..453f8f7
--- /dev/null
@@ -0,0 +1,158 @@
+/*
+ *  linux/arch/arm/mach-mmp/pxa910.c
+ *
+ *  Code specific to PXA910
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/list.h>
+#include <linux/io.h>
+
+#include <asm/mach/time.h>
+#include <mach/addr-map.h>
+#include <mach/regs-apbc.h>
+#include <mach/regs-apmu.h>
+#include <mach/cputype.h>
+#include <mach/irqs.h>
+#include <mach/gpio.h>
+#include <mach/dma.h>
+#include <mach/mfp.h>
+#include <mach/devices.h>
+
+#include "common.h"
+#include "clock.h"
+
+#define MFPR_VIRT_BASE (APB_VIRT_BASE + 0x1e000)
+
+static struct mfp_addr_map pxa910_mfp_addr_map[] __initdata =
+{
+       MFP_ADDR_X(GPIO0, GPIO54, 0xdc),
+       MFP_ADDR_X(GPIO67, GPIO98, 0x1b8),
+       MFP_ADDR_X(GPIO100, GPIO109, 0x238),
+
+       MFP_ADDR(GPIO123, 0xcc),
+       MFP_ADDR(GPIO124, 0xd0),
+
+       MFP_ADDR(DF_IO0, 0x40),
+       MFP_ADDR(DF_IO1, 0x3c),
+       MFP_ADDR(DF_IO2, 0x38),
+       MFP_ADDR(DF_IO3, 0x34),
+       MFP_ADDR(DF_IO4, 0x30),
+       MFP_ADDR(DF_IO5, 0x2c),
+       MFP_ADDR(DF_IO6, 0x28),
+       MFP_ADDR(DF_IO7, 0x24),
+       MFP_ADDR(DF_IO8, 0x20),
+       MFP_ADDR(DF_IO9, 0x1c),
+       MFP_ADDR(DF_IO10, 0x18),
+       MFP_ADDR(DF_IO11, 0x14),
+       MFP_ADDR(DF_IO12, 0x10),
+       MFP_ADDR(DF_IO13, 0xc),
+       MFP_ADDR(DF_IO14, 0x8),
+       MFP_ADDR(DF_IO15, 0x4),
+
+       MFP_ADDR(DF_nCS0_SM_nCS2, 0x44),
+       MFP_ADDR(DF_nCS1_SM_nCS3, 0x48),
+       MFP_ADDR(SM_nCS0, 0x4c),
+       MFP_ADDR(SM_nCS1, 0x50),
+       MFP_ADDR(DF_WEn, 0x54),
+       MFP_ADDR(DF_REn, 0x58),
+       MFP_ADDR(DF_CLE_SM_OEn, 0x5c),
+       MFP_ADDR(DF_ALE_SM_WEn, 0x60),
+       MFP_ADDR(SM_SCLK, 0x64),
+       MFP_ADDR(DF_RDY0, 0x68),
+       MFP_ADDR(SM_BE0, 0x6c),
+       MFP_ADDR(SM_BE1, 0x70),
+       MFP_ADDR(SM_ADV, 0x74),
+       MFP_ADDR(DF_RDY1, 0x78),
+       MFP_ADDR(SM_ADVMUX, 0x7c),
+       MFP_ADDR(SM_RDY, 0x80),
+
+       MFP_ADDR_X(MMC1_DAT7, MMC1_WP, 0x84),
+
+       MFP_ADDR_END,
+};
+
+#define APMASK(i)      (GPIO_REGS_VIRT + BANK_OFF(i) + 0x09c)
+
+static void __init pxa910_init_gpio(void)
+{
+       int i;
+
+       /* enable GPIO clock */
+       __raw_writel(APBC_APBCLK | APBC_FNCLK, APBC_PXA910_GPIO);
+
+       /* unmask GPIO edge detection for all 4 banks - APMASKx */
+       for (i = 0; i < 4; i++)
+               __raw_writel(0xffffffff, APMASK(i));
+
+       pxa_init_gpio(IRQ_PXA910_AP_GPIO, 0, 127, NULL);
+}
+
+void __init pxa910_init_irq(void)
+{
+       icu_init_irq();
+       pxa910_init_gpio();
+}
+
+/* APB peripheral clocks */
+static APBC_CLK(uart1, PXA910_UART0, 1, 14745600);
+static APBC_CLK(uart2, PXA910_UART1, 1, 14745600);
+
+/* device and clock bindings */
+static struct clk_lookup pxa910_clkregs[] = {
+       INIT_CLKREG(&clk_uart1, "pxa2xx-uart.0", NULL),
+       INIT_CLKREG(&clk_uart2, "pxa2xx-uart.1", NULL),
+};
+
+static int __init pxa910_init(void)
+{
+       if (cpu_is_pxa910()) {
+               mfp_init_base(MFPR_VIRT_BASE);
+               mfp_init_addr(pxa910_mfp_addr_map);
+               pxa_init_dma(IRQ_PXA910_DMA_INT0, 32);
+               clks_register(ARRAY_AND_SIZE(pxa910_clkregs));
+       }
+
+       return 0;
+}
+postcore_initcall(pxa910_init);
+
+/* system timer - clock enabled, 3.25MHz */
+#define TIMER_CLK_RST  (APBC_APBCLK | APBC_FNCLK | APBC_FNCLKSEL(3))
+
+static void __init pxa910_timer_init(void)
+{
+       /* reset and configure */
+       __raw_writel(APBC_APBCLK | APBC_RST, APBC_PXA910_TIMERS);
+       __raw_writel(TIMER_CLK_RST, APBC_PXA910_TIMERS);
+
+       timer_init(IRQ_PXA910_AP1_TIMER1);
+}
+
+struct sys_timer pxa910_timer = {
+       .init   = pxa910_timer_init,
+};
+
+/* on-chip devices */
+
+/* NOTE: there are totally 3 UARTs on PXA910:
+ *
+ *   UART1   - Slow UART (can be used both by AP and CP)
+ *   UART2/3 - Fast UART
+ *
+ * To be backward compatible with the legacy FFUART/BTUART/STUART sequence,
+ * they are re-ordered as:
+ *
+ *   pxa910_device_uart1 - UART2 as FFUART
+ *   pxa910_device_uart2 - UART3 as BTUART
+ *
+ * UART1 is not used by AP for the moment.
+ */
+PXA910_DEVICE(uart1, "pxa2xx-uart", 0, UART2, 0xd4017000, 0x30, 21, 22);
+PXA910_DEVICE(uart2, "pxa2xx-uart", 1, UART3, 0xd4018000, 0x30, 23, 24);
diff --git a/arch/arm/mach-mmp/tavorevb.c b/arch/arm/mach-mmp/tavorevb.c
new file mode 100644 (file)
index 0000000..0e0c922
--- /dev/null
@@ -0,0 +1,109 @@
+/*
+ *  linux/arch/arm/mach-mmp/tavorevb.c
+ *
+ *  Support for the Marvell PXA910-based TavorEVB Development Platform.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  publishhed by the Free Software Foundation.
+ */
+
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/platform_device.h>
+#include <linux/smc91x.h>
+
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+#include <mach/addr-map.h>
+#include <mach/mfp-pxa910.h>
+#include <mach/pxa910.h>
+#include <mach/gpio.h>
+
+#include "common.h"
+
+static unsigned long tavorevb_pin_config[] __initdata = {
+       /* UART2 */
+       GPIO47_UART2_RXD,
+       GPIO48_UART2_TXD,
+
+       /* SMC */
+       SM_nCS0_nCS0,
+       SM_ADV_SM_ADV,
+       SM_SCLK_SM_SCLK,
+       SM_SCLK_SM_SCLK,
+       SM_BE0_SM_BE0,
+       SM_BE1_SM_BE1,
+
+       /* DFI */
+       DF_IO0_ND_IO0,
+       DF_IO1_ND_IO1,
+       DF_IO2_ND_IO2,
+       DF_IO3_ND_IO3,
+       DF_IO4_ND_IO4,
+       DF_IO5_ND_IO5,
+       DF_IO6_ND_IO6,
+       DF_IO7_ND_IO7,
+       DF_IO8_ND_IO8,
+       DF_IO9_ND_IO9,
+       DF_IO10_ND_IO10,
+       DF_IO11_ND_IO11,
+       DF_IO12_ND_IO12,
+       DF_IO13_ND_IO13,
+       DF_IO14_ND_IO14,
+       DF_IO15_ND_IO15,
+       DF_nCS0_SM_nCS2_nCS0,
+       DF_ALE_SM_WEn_ND_ALE,
+       DF_CLE_SM_OEn_ND_CLE,
+       DF_WEn_DF_WEn,
+       DF_REn_DF_REn,
+       DF_RDY0_DF_RDY0,
+};
+
+static struct smc91x_platdata tavorevb_smc91x_info = {
+       .flags  = SMC91X_USE_16BIT | SMC91X_NOWAIT,
+};
+
+static struct resource smc91x_resources[] = {
+       [0] = {
+               .start  = SMC_CS1_PHYS_BASE + 0x300,
+               .end    = SMC_CS1_PHYS_BASE + 0xfffff,
+               .flags  = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start  = gpio_to_irq(80),
+               .end    = gpio_to_irq(80),
+               .flags  = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
+       }
+};
+
+static struct platform_device smc91x_device = {
+       .name           = "smc91x",
+       .id             = 0,
+       .dev            = {
+               .platform_data = &tavorevb_smc91x_info,
+       },
+       .num_resources  = ARRAY_SIZE(smc91x_resources),
+       .resource       = smc91x_resources,
+};
+
+static void __init tavorevb_init(void)
+{
+       mfp_config(ARRAY_AND_SIZE(tavorevb_pin_config));
+
+       /* on-chip devices */
+       pxa910_add_uart(1);
+
+       /* off-chip devices */
+       platform_device_register(&smc91x_device);
+}
+
+MACHINE_START(TAVOREVB, "PXA910 Evaluation Board (aka TavorEVB)")
+       .phys_io        = APB_PHYS_BASE,
+       .boot_params    = 0x00000100,
+       .io_pg_offst    = (APB_VIRT_BASE >> 18) & 0xfffc,
+       .map_io         = pxa_map_io,
+       .init_irq       = pxa910_init_irq,
+       .timer          = &pxa910_timer,
+       .init_machine   = tavorevb_init,
+MACHINE_END
diff --git a/arch/arm/mach-mmp/time.c b/arch/arm/mach-mmp/time.c
new file mode 100644 (file)
index 0000000..b03a6ed
--- /dev/null
@@ -0,0 +1,199 @@
+/*
+ * linux/arch/arm/mach-mmp/time.c
+ *
+ *   Support for clocksource and clockevents
+ *
+ * Copyright (C) 2008 Marvell International Ltd.
+ * All rights reserved.
+ *
+ *   2008-04-11: Jason Chagas <Jason.chagas@marvell.com>
+ *   2008-10-08: Bin Yang <bin.yang@marvell.com>
+ *
+ * The timers module actually includes three timers, each timer with upto
+ * three match comparators. Timer #0 is used here in free-running mode as
+ * the clock source, and match comparator #1 used as clock event device.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/interrupt.h>
+#include <linux/clockchips.h>
+
+#include <linux/io.h>
+#include <linux/irq.h>
+#include <linux/sched.h>
+#include <linux/cnt32_to_63.h>
+
+#include <mach/addr-map.h>
+#include <mach/regs-timers.h>
+#include <mach/irqs.h>
+
+#include "clock.h"
+
+#define TIMERS_VIRT_BASE       TIMERS1_VIRT_BASE
+
+#define MAX_DELTA              (0xfffffffe)
+#define MIN_DELTA              (16)
+
+#define TCR2NS_SCALE_FACTOR    10
+
+static unsigned long tcr2ns_scale;
+
+static void __init set_tcr2ns_scale(unsigned long tcr_rate)
+{
+       unsigned long long v = 1000000000ULL << TCR2NS_SCALE_FACTOR;
+       do_div(v, tcr_rate);
+       tcr2ns_scale = v;
+       /*
+        * We want an even value to automatically clear the top bit
+        * returned by cnt32_to_63() without an additional run time
+        * instruction. So if the LSB is 1 then round it up.
+        */
+       if (tcr2ns_scale & 1)
+               tcr2ns_scale++;
+}
+
+/*
+ * FIXME: the timer needs some delay to stablize the counter capture
+ */
+static inline uint32_t timer_read(void)
+{
+       int delay = 100;
+
+       __raw_writel(1, TIMERS_VIRT_BASE + TMR_CVWR(0));
+
+       while (delay--)
+               cpu_relax();
+
+       return __raw_readl(TIMERS_VIRT_BASE + TMR_CVWR(0));
+}
+
+unsigned long long sched_clock(void)
+{
+       unsigned long long v = cnt32_to_63(timer_read());
+       return (v * tcr2ns_scale) >> TCR2NS_SCALE_FACTOR;
+}
+
+static irqreturn_t timer_interrupt(int irq, void *dev_id)
+{
+       struct clock_event_device *c = dev_id;
+
+       /* disable and clear pending interrupt status */
+       __raw_writel(0x0, TIMERS_VIRT_BASE + TMR_IER(0));
+       __raw_writel(0x1, TIMERS_VIRT_BASE + TMR_ICR(0));
+       c->event_handler(c);
+       return IRQ_HANDLED;
+}
+
+static int timer_set_next_event(unsigned long delta,
+                               struct clock_event_device *dev)
+{
+       unsigned long flags, next;
+
+       local_irq_save(flags);
+
+       /* clear pending interrupt status and enable */
+       __raw_writel(0x01, TIMERS_VIRT_BASE + TMR_ICR(0));
+       __raw_writel(0x01, TIMERS_VIRT_BASE + TMR_IER(0));
+
+       next = timer_read() + delta;
+       __raw_writel(next, TIMERS_VIRT_BASE + TMR_TN_MM(0, 0));
+
+       local_irq_restore(flags);
+       return 0;
+}
+
+static void timer_set_mode(enum clock_event_mode mode,
+                          struct clock_event_device *dev)
+{
+       unsigned long flags;
+
+       local_irq_save(flags);
+       switch (mode) {
+       case CLOCK_EVT_MODE_ONESHOT:
+       case CLOCK_EVT_MODE_UNUSED:
+       case CLOCK_EVT_MODE_SHUTDOWN:
+               /* disable the matching interrupt */
+               __raw_writel(0x00, TIMERS_VIRT_BASE + TMR_IER(0));
+               break;
+       case CLOCK_EVT_MODE_RESUME:
+       case CLOCK_EVT_MODE_PERIODIC:
+               break;
+       }
+       local_irq_restore(flags);
+}
+
+static struct clock_event_device ckevt = {
+       .name           = "clockevent",
+       .features       = CLOCK_EVT_FEAT_ONESHOT,
+       .shift          = 32,
+       .rating         = 200,
+       .set_next_event = timer_set_next_event,
+       .set_mode       = timer_set_mode,
+};
+
+static cycle_t clksrc_read(void)
+{
+       return timer_read();
+}
+
+static struct clocksource cksrc = {
+       .name           = "clocksource",
+       .shift          = 20,
+       .rating         = 200,
+       .read           = clksrc_read,
+       .mask           = CLOCKSOURCE_MASK(32),
+       .flags          = CLOCK_SOURCE_IS_CONTINUOUS,
+};
+
+static void __init timer_config(void)
+{
+       uint32_t ccr = __raw_readl(TIMERS_VIRT_BASE + TMR_CCR);
+       uint32_t cer = __raw_readl(TIMERS_VIRT_BASE + TMR_CER);
+       uint32_t cmr = __raw_readl(TIMERS_VIRT_BASE + TMR_CMR);
+
+       __raw_writel(cer & ~0x1, TIMERS_VIRT_BASE + TMR_CER); /* disable */
+
+       ccr &= TMR_CCR_CS_0(0x3);
+       __raw_writel(ccr, TIMERS_VIRT_BASE + TMR_CCR);
+
+       /* free-running mode */
+       __raw_writel(cmr | 0x01, TIMERS_VIRT_BASE + TMR_CMR);
+
+       __raw_writel(0x0, TIMERS_VIRT_BASE + TMR_PLCR(0)); /* free-running */
+       __raw_writel(0x7, TIMERS_VIRT_BASE + TMR_ICR(0));  /* clear status */
+       __raw_writel(0x0, TIMERS_VIRT_BASE + TMR_IER(0));
+
+       /* enable timer counter */
+       __raw_writel(cer | 0x01, TIMERS_VIRT_BASE + TMR_CER);
+}
+
+static struct irqaction timer_irq = {
+       .name           = "timer",
+       .flags          = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
+       .handler        = timer_interrupt,
+       .dev_id         = &ckevt,
+};
+
+void __init timer_init(int irq)
+{
+       timer_config();
+
+       set_tcr2ns_scale(CLOCK_TICK_RATE);
+
+       ckevt.mult = div_sc(CLOCK_TICK_RATE, NSEC_PER_SEC, ckevt.shift);
+       ckevt.max_delta_ns = clockevent_delta2ns(MAX_DELTA, &ckevt);
+       ckevt.min_delta_ns = clockevent_delta2ns(MIN_DELTA, &ckevt);
+       ckevt.cpumask = cpumask_of(0);
+
+       cksrc.mult = clocksource_hz2mult(CLOCK_TICK_RATE, cksrc.shift);
+
+       setup_irq(irq, &timer_irq);
+
+       clocksource_register(&cksrc);
+       clockevents_register_device(&ckevt);
+}
diff --git a/arch/arm/mach-mmp/ttc_dkb.c b/arch/arm/mach-mmp/ttc_dkb.c
new file mode 100644 (file)
index 0000000..08cfef6
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ *  linux/arch/arm/mach-mmp/ttc_dkb.c
+ *
+ *  Support for the Marvell PXA910-based TTC_DKB Development Platform.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  publishhed by the Free Software Foundation.
+ */
+
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/platform_device.h>
+
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+#include <mach/addr-map.h>
+#include <mach/mfp-pxa910.h>
+#include <mach/pxa910.h>
+
+#include "common.h"
+
+#define ARRAY_AND_SIZE(x)       (x), ARRAY_SIZE(x)
+
+static unsigned long ttc_dkb_pin_config[] __initdata = {
+       /* UART2 */
+       GPIO47_UART2_RXD,
+       GPIO48_UART2_TXD,
+};
+
+static void __init ttc_dkb_init(void)
+{
+       mfp_config(ARRAY_AND_SIZE(ttc_dkb_pin_config));
+
+       /* on-chip devices */
+       pxa910_add_uart(1);
+}
+
+MACHINE_START(TTC_DKB, "PXA910-based TTC_DKB Development Platform")
+       .phys_io        = APB_PHYS_BASE,
+       .boot_params    = 0x00000100,
+       .io_pg_offst    = (APB_VIRT_BASE >> 18) & 0xfffc,
+       .map_io         = pxa_map_io,
+       .init_irq       = pxa910_init_irq,
+       .timer          = &pxa910_timer,
+       .init_machine   = ttc_dkb_init,
+MACHINE_END
index f05ad2e0f235f4988d596ee885e66768e8d39a6a..574ccc493daff1e11ee9aab88b7c368cbc33151f 100644 (file)
@@ -17,7 +17,7 @@
 
 void arch_idle(void);
 
-static inline void arch_reset(char mode)
+static inline void arch_reset(char mode, const char *cmd)
 {
        for (;;) ;  /* depends on IPC w/ other core */
 }
index 7d51794088322106ce8db7342ca90cd1bb50d162..1d6350b22d0b7e284616d5b72c31fce33f2fbf10 100644 (file)
@@ -17,7 +17,7 @@ static inline void arch_idle(void)
        cpu_do_idle();
 }
 
-static inline void arch_reset(char mode)
+static inline void arch_reset(char mode, const char *cmd)
 {
        /*
         * Enable soft reset to assert RSTOUTn.
index 2b59fc74784fa51f71fe68955ab9928cfb99188c..eb7660f5d4b7956fb170828853703dd698405dca 100644 (file)
@@ -1,6 +1,6 @@
 if ARCH_MX1
 
-comment "MX1 Platforms"
+comment "MX1 platforms:"
 
 config MACH_MXLADS
        bool
@@ -11,4 +11,9 @@ config ARCH_MX1ADS
        help
          Say Y here if you are using Motorola MX1ADS/MXLADS boards
 
+config MACH_SCB9328
+       bool "Synertronixx scb9328"
+       help
+         Say Y here if you are using a Synertronixx scb9328 board
+
 endif
index b969719011fa0743b5cb3997e425e69c8a753bc3..82f1309568ef92c950fc37f847c8f2c01c1b1f61 100644 (file)
@@ -8,3 +8,4 @@ obj-y                   += generic.o clock.o devices.o
 
 # Specific board support
 obj-$(CONFIG_ARCH_MX1ADS) += mx1ads.o
+obj-$(CONFIG_MACH_SCB9328) += scb9328.o
\ No newline at end of file
index 4bcd1ece55f5f276efe2fd33aa76c16bc9dee6a8..0d0f306851d04ca9b4e9aeeb87639a04899311b5 100644 (file)
@@ -25,6 +25,7 @@
 
 #include <mach/clock.h>
 #include <mach/hardware.h>
+#include <mach/common.h>
 #include "crm_regs.h"
 
 static int _clk_enable(struct clk *clk)
@@ -87,33 +88,6 @@ static int _clk_parent_set_rate(struct clk *clk, unsigned long rate)
        return clk->parent->set_rate(clk->parent, rate);
 }
 
-/*
- *  get the system pll clock in Hz
- *
- *                  mfi + mfn / (mfd +1)
- *  f = 2 * f_ref * --------------------
- *                        pd + 1
- */
-static unsigned long mx1_decode_pll(unsigned int pll, u32 f_ref)
-{
-       unsigned long long ll;
-       unsigned long quot;
-
-       u32 mfi = (pll >> 10) & 0xf;
-       u32 mfn = pll & 0x3ff;
-       u32 mfd = (pll >> 16) & 0x3ff;
-       u32 pd =  (pll >> 26) & 0xf;
-
-       mfi = mfi <= 5 ? 5 : mfi;
-
-       ll = 2 * (unsigned long long)f_ref *
-               ((mfi << 16) + (mfn << 16) / (mfd + 1));
-       quot = (pd + 1) * (1 << 16);
-       ll += quot / 2;
-       do_div(ll, quot);
-       return (unsigned long)ll;
-}
-
 static unsigned long clk16m_get_rate(struct clk *clk)
 {
        return 16000000;
@@ -188,7 +162,7 @@ static struct clk prem_clk = {
 
 static unsigned long system_clk_get_rate(struct clk *clk)
 {
-       return mx1_decode_pll(__raw_readl(CCM_SPCTL0),
+       return mxc_decode_pll(__raw_readl(CCM_SPCTL0),
                              clk_get_rate(clk->parent));
 }
 
@@ -200,7 +174,7 @@ static struct clk system_clk = {
 
 static unsigned long mcu_clk_get_rate(struct clk *clk)
 {
-       return mx1_decode_pll(__raw_readl(CCM_MPCTL0),
+       return mxc_decode_pll(__raw_readl(CCM_MPCTL0),
                              clk_get_rate(clk->parent));
 }
 
@@ -488,7 +462,7 @@ static struct clk clko_clk = {
 };
 
 static struct clk dma_clk = {
-       .name = "dma_clk",
+       .name = "dma",
        .parent = &hclk,
        .round_rate = _clk_parent_round_rate,
        .set_rate = _clk_parent_set_rate,
@@ -539,7 +513,7 @@ static struct clk gpt_clk = {
 };
 
 static struct clk uart_clk = {
-       .name = "uart_clk",
+       .name = "uart",
        .parent = &perclk[0],
        .round_rate = _clk_parent_round_rate,
        .set_rate = _clk_parent_set_rate,
@@ -621,7 +595,7 @@ static struct clk *mxc_clks[] = {
        &rtc_clk,
 };
 
-int __init mxc_clocks_init(unsigned long fref)
+int __init mx1_clocks_init(unsigned long fref)
 {
        struct clk **clkp;
        unsigned int reg;
@@ -652,5 +626,7 @@ int __init mxc_clocks_init(unsigned long fref)
        clk_enable(&hclk);
        clk_enable(&fclk);
 
+       mxc_timer_init(&gpt_clk);
+
        return 0;
 }
index a95644193f3f9cd4c723f31d561ce10cf69b1d48..97f42d96d7a14d3d2f7055498ee68396b4635153 100644 (file)
 #include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/gpio.h>
-
 #include <mach/irqs.h>
 #include <mach/hardware.h>
 
+#include "devices.h"
+
 static struct resource imx_csi_resources[] = {
        [0] = {
                .start  = 0x00224000,
index 3200cf60e384d95df97d435b73b50e90f36aaa6f..7ae229bc1b796451bc1a097b1746aaef2d7ef67d 100644 (file)
@@ -16,6 +16,8 @@
 #include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/mtd/physmap.h>
+#include <linux/i2c.h>
+#include <linux/i2c/pcf857x.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 #include <mach/hardware.h>
 #include <mach/common.h>
 #include <mach/imx-uart.h>
-#include <mach/iomux-mx1-mx2.h>
+#include <mach/irqs.h>
+#ifdef CONFIG_I2C_IMX
+#include <mach/i2c.h>
+#endif
+#include <mach/iomux.h>
 #include "devices.h"
 
 /*
@@ -104,6 +110,55 @@ static struct platform_device flash_device = {
        .num_resources = 1,
 };
 
+/*
+ * I2C
+ */
+
+#ifdef CONFIG_I2C_IMX
+static int i2c_pins[] = {
+       PA15_PF_I2C_SDA,
+       PA16_PF_I2C_SCL,
+};
+
+static int i2c_init(struct device *dev)
+{
+       return mxc_gpio_setup_multiple_pins(i2c_pins,
+                       ARRAY_SIZE(i2c_pins), "I2C");
+}
+
+static void i2c_exit(struct device *dev)
+{
+       mxc_gpio_release_multiple_pins(i2c_pins,
+                       ARRAY_SIZE(i2c_pins));
+}
+
+static struct pcf857x_platform_data pcf857x_data[] = {
+       {
+               .gpio_base = 4 * 32,
+       }, {
+               .gpio_base = 4 * 32 + 16,
+       }
+};
+
+static struct imxi2c_platform_data mx1ads_i2c_data = {
+       .bitrate = 100000,
+       .init = i2c_init,
+       .exit = i2c_exit,
+};
+
+static struct i2c_board_info mx1ads_i2c_devices[] = {
+       {
+               I2C_BOARD_INFO("pcf857x", 0x22),
+               .type = "pcf8575",
+               .platform_data = &pcf857x_data[0],
+       }, {
+               I2C_BOARD_INFO("pcf857x", 0x24),
+               .type = "pcf8575",
+               .platform_data = &pcf857x_data[1],
+       },
+};
+#endif
+
 /*
  * Board init
  */
@@ -115,12 +170,19 @@ static void __init mx1ads_init(void)
 
        /* Physmap flash */
        mxc_register_device(&flash_device, &mx1ads_flash_data);
+
+       /* I2C */
+#ifdef CONFIG_I2C_IMX
+       i2c_register_board_info(0, mx1ads_i2c_devices,
+                               ARRAY_SIZE(mx1ads_i2c_devices));
+
+       mxc_register_device(&imx_i2c_device, &mx1ads_i2c_data);
+#endif
 }
 
 static void __init mx1ads_timer_init(void)
 {
-       mxc_clocks_init(32000);
-       mxc_timer_init("gpt_clk");
+       mx1_clocks_init(32000);
 }
 
 struct sys_timer mx1ads_timer = {
diff --git a/arch/arm/mach-mx1/scb9328.c b/arch/arm/mach-mx1/scb9328.c
new file mode 100644 (file)
index 0000000..0e71f3f
--- /dev/null
@@ -0,0 +1,160 @@
+/*
+ * linux/arch/arm/mach-mx1/scb9328.c
+ *
+ * Copyright (c) 2004 Sascha Hauer <saschahauer@web.de>
+ * Copyright (c) 2006-2008 Juergen Beisert <jbeisert@netscape.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+
+#include <linux/platform_device.h>
+#include <linux/mtd/physmap.h>
+#include <linux/interrupt.h>
+#include <linux/dm9000.h>
+
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+#include <asm/mach/time.h>
+
+#include <mach/common.h>
+#include <mach/hardware.h>
+#include <mach/irqs.h>
+#include <mach/imx-uart.h>
+#include <mach/iomux.h>
+
+#include "devices.h"
+
+/*
+ * This scb9328 has a 32MiB flash
+ */
+static struct resource flash_resource = {
+       .start  = IMX_CS0_PHYS,
+       .end    = IMX_CS0_PHYS + (32 * 1024 * 1024) - 1,
+       .flags  = IORESOURCE_MEM,
+};
+
+static struct physmap_flash_data scb_flash_data = {
+       .width  = 2,
+};
+
+static struct platform_device scb_flash_device = {
+       .name           = "physmap-flash",
+       .id             = 0,
+       .dev = {
+               .platform_data = &scb_flash_data,
+       },
+       .resource = &flash_resource,
+       .num_resources = 1,
+};
+
+/*
+ * scb9328 has a DM9000 network controller
+ * connected to CS5, with 16 bit data path
+ * and interrupt connected to GPIO 3
+ */
+
+/*
+ * internal datapath is fixed 16 bit
+ */
+static struct dm9000_plat_data dm9000_platdata = {
+       .flags  = DM9000_PLATF_16BITONLY,
+};
+
+/*
+ * the DM9000 drivers wants two defined address spaces
+ * to gain access to address latch registers and the data path.
+ */
+static struct resource dm9000x_resources[] = {
+       [0] = {
+               .name   = "address area",
+               .start  = IMX_CS5_PHYS,
+               .end    = IMX_CS5_PHYS + 1,
+               .flags  = IORESOURCE_MEM        /* address access */
+       },
+       [1] = {
+               .name   = "data area",
+               .start  = IMX_CS5_PHYS + 4,
+               .end    = IMX_CS5_PHYS + 5,
+               .flags  = IORESOURCE_MEM        /* data access */
+       },
+       [2] = {
+               .start  = IRQ_GPIOC(3),
+               .end    = IRQ_GPIOC(3),
+               .flags  = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL
+       },
+};
+
+static struct platform_device dm9000x_device = {
+       .name           = "dm9000",
+       .id             = 0,
+       .num_resources  = ARRAY_SIZE(dm9000x_resources),
+       .resource       = dm9000x_resources,
+       .dev            = {
+               .platform_data = &dm9000_platdata,
+       }
+};
+
+static int mxc_uart1_pins[] = {
+       PC9_PF_UART1_CTS,
+       PC10_PF_UART1_RTS,
+       PC11_PF_UART1_TXD,
+       PC12_PF_UART1_RXD,
+};
+
+static int uart1_mxc_init(struct platform_device *pdev)
+{
+       return mxc_gpio_setup_multiple_pins(mxc_uart1_pins,
+                       ARRAY_SIZE(mxc_uart1_pins), "UART1");
+}
+
+static int uart1_mxc_exit(struct platform_device *pdev)
+{
+       mxc_gpio_release_multiple_pins(mxc_uart1_pins,
+                       ARRAY_SIZE(mxc_uart1_pins));
+       return 0;
+}
+
+static struct imxuart_platform_data uart_pdata = {
+       .init = uart1_mxc_init,
+       .exit = uart1_mxc_exit,
+       .flags = IMXUART_HAVE_RTSCTS,
+};
+
+static struct platform_device *devices[] __initdata = {
+       &scb_flash_device,
+       &dm9000x_device,
+};
+
+/*
+ * scb9328_init - Init the CPU card itself
+ */
+static void __init scb9328_init(void)
+{
+       mxc_register_device(&imx_uart1_device, &uart_pdata);
+
+       printk(KERN_INFO"Scb9328: Adding devices\n");
+       platform_add_devices(devices, ARRAY_SIZE(devices));
+}
+
+static void __init scb9328_timer_init(void)
+{
+       mx1_clocks_init(32000);
+}
+
+static struct sys_timer scb9328_timer = {
+       .init   = scb9328_timer_init,
+};
+
+MACHINE_START(SCB9328, "Synertronixx scb9328")
+    /* Sascha Hauer */
+       .phys_io        = 0x00200000,
+       .io_pg_offst    = ((0xe0200000) >> 18) & 0xfffc,
+       .boot_params    = 0x08000100,
+       .map_io         = mxc_map_io,
+       .init_irq       = mxc_init_irq,
+       .timer          = &scb9328_timer,
+       .init_machine   = scb9328_init,
+MACHINE_END
index 1eaa97cb716d052b26dc36224a48f685d7c07879..42a788842f496e2d284fb6fad7adc2045f703826 100644 (file)
@@ -1,14 +1,22 @@
-comment "MX2 family CPU support"
-       depends on ARCH_MX2
+if ARCH_MX2
+
+choice
+       prompt "CPUs:"
+       default MACH_MX21
+
+config MACH_MX21
+       bool "i.MX21 support"
+       help
+         This enables support for Freescale's MX2 based i.MX21 processor.
 
 config MACH_MX27
        bool "i.MX27 support"
-       depends on ARCH_MX2
        help
          This enables support for Freescale's MX2 based i.MX27 processor.
 
-comment "MX2 Platforms"
-       depends on ARCH_MX2
+endchoice
+
+comment "MX2 platforms:"
 
 config MACH_MX27ADS
        bool "MX27ADS platform"
@@ -37,3 +45,5 @@ config MACH_PCM970_BASEBOARD
          PCM970 evaluation board.
 
 endchoice
+
+endif
index 382d86080e8612f59d750aeab404d88a4d3acca9..6e1a2bffc812cf3df331c29fb06da4adb0e48316 100644 (file)
@@ -6,6 +6,8 @@
 
 obj-y  :=  system.o generic.o devices.o serial.o
 
+obj-$(CONFIG_MACH_MX21) += clock_imx21.o
+
 obj-$(CONFIG_MACH_MX27) += cpu_imx27.o
 obj-$(CONFIG_MACH_MX27) += clock_imx27.o
 
index 696831dcd485e2f4cdd9ad3d7a51f935d5b5905a..e867398a8fdbb5304493c40104635e1e40a3f778 100644 (file)
@@ -1,3 +1,7 @@
-   zreladdr-y  := 0xA0008000
-params_phys-y  := 0xA0000100
-initrd_phys-y  := 0xA0800000
+zreladdr-$(CONFIG_MACH_MX21)   := 0xC0008000
+params_phys-$(CONFIG_MACH_MX21)        := 0xC0000100
+initrd_phys-$(CONFIG_MACH_MX21)        := 0xC0800000
+
+zreladdr-$(CONFIG_MACH_MX27)   := 0xA0008000
+params_phys-$(CONFIG_MACH_MX27)        := 0xA0000100
+initrd_phys-$(CONFIG_MACH_MX27)        := 0xA0800000
diff --git a/arch/arm/mach-mx2/clock_imx21.c b/arch/arm/mach-mx2/clock_imx21.c
new file mode 100644 (file)
index 0000000..2dee5c8
--- /dev/null
@@ -0,0 +1,984 @@
+/*
+ * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright 2008 Juergen Beisert, kernel@pengutronix.de
+ * Copyright 2008 Martin Fuzzey, mfuzzey@gmail.com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
+#include <linux/clk.h>
+#include <linux/io.h>
+#include <linux/module.h>
+
+#include <mach/clock.h>
+#include <mach/common.h>
+#include <asm/clkdev.h>
+#include <asm/div64.h>
+
+#include "crm_regs.h"
+
+static int _clk_enable(struct clk *clk)
+{
+       u32 reg;
+
+       reg = __raw_readl(clk->enable_reg);
+       reg |= 1 << clk->enable_shift;
+       __raw_writel(reg, clk->enable_reg);
+       return 0;
+}
+
+static void _clk_disable(struct clk *clk)
+{
+       u32 reg;
+
+       reg = __raw_readl(clk->enable_reg);
+       reg &= ~(1 << clk->enable_shift);
+       __raw_writel(reg, clk->enable_reg);
+}
+
+static int _clk_spll_enable(struct clk *clk)
+{
+       u32 reg;
+
+       reg = __raw_readl(CCM_CSCR);
+       reg |= CCM_CSCR_SPEN;
+       __raw_writel(reg, CCM_CSCR);
+
+       while ((__raw_readl(CCM_SPCTL1) & CCM_SPCTL1_LF) == 0)
+               ;
+       return 0;
+}
+
+static void _clk_spll_disable(struct clk *clk)
+{
+       u32 reg;
+
+       reg = __raw_readl(CCM_CSCR);
+       reg &= ~CCM_CSCR_SPEN;
+       __raw_writel(reg, CCM_CSCR);
+}
+
+
+#define CSCR() (__raw_readl(CCM_CSCR))
+#define PCDR0() (__raw_readl(CCM_PCDR0))
+#define PCDR1() (__raw_readl(CCM_PCDR1))
+
+static unsigned long _clk_perclkx_round_rate(struct clk *clk,
+                                            unsigned long rate)
+{
+       u32 div;
+       unsigned long parent_rate;
+
+       parent_rate = clk_get_rate(clk->parent);
+
+       div = parent_rate / rate;
+       if (parent_rate % rate)
+               div++;
+
+       if (div > 64)
+               div = 64;
+
+       return parent_rate / div;
+}
+
+static int _clk_perclkx_set_rate(struct clk *clk, unsigned long rate)
+{
+       u32 reg;
+       u32 div;
+       unsigned long parent_rate;
+
+       parent_rate = clk_get_rate(clk->parent);
+
+       if (clk->id < 0 || clk->id > 3)
+               return -EINVAL;
+
+       div = parent_rate / rate;
+       if (div > 64 || div < 1 || ((parent_rate / div) != rate))
+               return -EINVAL;
+       div--;
+
+       reg =
+           __raw_readl(CCM_PCDR1) & ~(CCM_PCDR1_PERDIV1_MASK <<
+                                      (clk->id << 3));
+       reg |= div << (clk->id << 3);
+       __raw_writel(reg, CCM_PCDR1);
+
+       return 0;
+}
+
+static unsigned long _clk_usb_recalc(struct clk *clk)
+{
+       unsigned long usb_pdf;
+       unsigned long parent_rate;
+
+       parent_rate = clk_get_rate(clk->parent);
+
+       usb_pdf = (CSCR() & CCM_CSCR_USB_MASK) >> CCM_CSCR_USB_OFFSET;
+
+       return parent_rate / (usb_pdf + 1U);
+}
+
+static unsigned long _clk_ssix_recalc(struct clk *clk, unsigned long pdf)
+{
+       unsigned long parent_rate;
+
+       parent_rate = clk_get_rate(clk->parent);
+
+       pdf = (pdf < 2) ? 124UL : pdf;  /* MX21 & MX27 TO1 */
+
+       return 2UL * parent_rate / pdf;
+}
+
+static unsigned long _clk_ssi1_recalc(struct clk *clk)
+{
+       return _clk_ssix_recalc(clk,
+               (PCDR0() & CCM_PCDR0_SSI1BAUDDIV_MASK)
+               >> CCM_PCDR0_SSI1BAUDDIV_OFFSET);
+}
+
+static unsigned long _clk_ssi2_recalc(struct clk *clk)
+{
+       return _clk_ssix_recalc(clk,
+               (PCDR0() & CCM_PCDR0_SSI2BAUDDIV_MASK) >>
+               CCM_PCDR0_SSI2BAUDDIV_OFFSET);
+}
+
+static unsigned long _clk_nfc_recalc(struct clk *clk)
+{
+       unsigned long nfc_pdf;
+       unsigned long parent_rate;
+
+       parent_rate = clk_get_rate(clk->parent);
+
+       nfc_pdf = (PCDR0() & CCM_PCDR0_NFCDIV_MASK)
+               >> CCM_PCDR0_NFCDIV_OFFSET;
+
+       return parent_rate / (nfc_pdf + 1);
+}
+
+static unsigned long _clk_parent_round_rate(struct clk *clk, unsigned long rate)
+{
+       return clk->parent->round_rate(clk->parent, rate);
+}
+
+static int _clk_parent_set_rate(struct clk *clk, unsigned long rate)
+{
+       return clk->parent->set_rate(clk->parent, rate);
+}
+
+static unsigned long external_high_reference; /* in Hz */
+
+static unsigned long get_high_reference_clock_rate(struct clk *clk)
+{
+       return external_high_reference;
+}
+
+/*
+ * the high frequency external clock reference
+ * Default case is 26MHz.
+ */
+static struct clk ckih_clk = {
+       .get_rate = get_high_reference_clock_rate,
+};
+
+static unsigned long external_low_reference; /* in Hz */
+
+static unsigned long get_low_reference_clock_rate(struct clk *clk)
+{
+       return external_low_reference;
+}
+
+/*
+ * the low frequency external clock reference
+ * Default case is 32.768kHz.
+ */
+static struct clk ckil_clk = {
+       .get_rate = get_low_reference_clock_rate,
+};
+
+
+static unsigned long _clk_fpm_recalc(struct clk *clk)
+{
+       return clk_get_rate(clk->parent) * 512;
+}
+
+/* Output of frequency pre multiplier */
+static struct clk fpm_clk = {
+       .parent = &ckil_clk,
+       .get_rate = _clk_fpm_recalc,
+};
+
+static unsigned long get_mpll_clk(struct clk *clk)
+{
+       uint32_t reg;
+       unsigned long ref_clk;
+       unsigned long mfi = 0, mfn = 0, mfd = 0, pdf = 0;
+       unsigned long long temp;
+
+       ref_clk = clk_get_rate(clk->parent);
+
+       reg = __raw_readl(CCM_MPCTL0);
+       pdf = (reg & CCM_MPCTL0_PD_MASK)  >> CCM_MPCTL0_PD_OFFSET;
+       mfd = (reg & CCM_MPCTL0_MFD_MASK) >> CCM_MPCTL0_MFD_OFFSET;
+       mfi = (reg & CCM_MPCTL0_MFI_MASK) >> CCM_MPCTL0_MFI_OFFSET;
+       mfn = (reg & CCM_MPCTL0_MFN_MASK) >> CCM_MPCTL0_MFN_OFFSET;
+
+       mfi = (mfi <= 5) ? 5 : mfi;
+       temp = 2LL * ref_clk * mfn;
+       do_div(temp, mfd + 1);
+       temp = 2LL * ref_clk * mfi + temp;
+       do_div(temp, pdf + 1);
+
+       return (unsigned long)temp;
+}
+
+static struct clk mpll_clk = {
+       .parent = &ckih_clk,
+       .get_rate = get_mpll_clk,
+};
+
+static unsigned long _clk_fclk_get_rate(struct clk *clk)
+{
+       unsigned long parent_rate;
+       u32 div;
+
+       div = (CSCR() & CCM_CSCR_PRESC_MASK) >> CCM_CSCR_PRESC_OFFSET;
+       parent_rate = clk_get_rate(clk->parent);
+
+       return parent_rate / (div+1);
+}
+
+static struct clk fclk_clk = {
+       .parent = &mpll_clk,
+       .get_rate = _clk_fclk_get_rate
+};
+
+static unsigned long get_spll_clk(struct clk *clk)
+{
+       uint32_t reg;
+       unsigned long ref_clk;
+       unsigned long mfi = 0, mfn = 0, mfd = 0, pdf = 0;
+       unsigned long long temp;
+
+       ref_clk = clk_get_rate(clk->parent);
+
+       reg = __raw_readl(CCM_SPCTL0);
+       pdf = (reg & CCM_SPCTL0_PD_MASK) >> CCM_SPCTL0_PD_OFFSET;
+       mfd = (reg & CCM_SPCTL0_MFD_MASK) >> CCM_SPCTL0_MFD_OFFSET;
+       mfi = (reg & CCM_SPCTL0_MFI_MASK) >> CCM_SPCTL0_MFI_OFFSET;
+       mfn = (reg & CCM_SPCTL0_MFN_MASK) >> CCM_SPCTL0_MFN_OFFSET;
+
+       mfi = (mfi <= 5) ? 5 : mfi;
+       temp = 2LL * ref_clk * mfn;
+       do_div(temp, mfd + 1);
+       temp = 2LL * ref_clk * mfi + temp;
+       do_div(temp, pdf + 1);
+
+       return (unsigned long)temp;
+}
+
+static struct clk spll_clk = {
+       .parent = &ckih_clk,
+       .get_rate = get_spll_clk,
+       .enable = _clk_spll_enable,
+       .disable = _clk_spll_disable,
+};
+
+static unsigned long get_hclk_clk(struct clk *clk)
+{
+       unsigned long rate;
+       unsigned long bclk_pdf;
+
+       bclk_pdf = (CSCR() & CCM_CSCR_BCLK_MASK)
+               >> CCM_CSCR_BCLK_OFFSET;
+
+       rate = clk_get_rate(clk->parent);
+       return rate / (bclk_pdf + 1);
+}
+
+static struct clk hclk_clk = {
+       .parent = &fclk_clk,
+       .get_rate = get_hclk_clk,
+};
+
+static unsigned long get_ipg_clk(struct clk *clk)
+{
+       unsigned long rate;
+       unsigned long ipg_pdf;
+
+       ipg_pdf = (CSCR() & CCM_CSCR_IPDIV) >> CCM_CSCR_IPDIV_OFFSET;
+
+       rate = clk_get_rate(clk->parent);
+       return rate / (ipg_pdf + 1);
+}
+
+static struct clk ipg_clk = {
+       .parent = &hclk_clk,
+       .get_rate = get_ipg_clk,
+};
+
+static unsigned long _clk_perclkx_recalc(struct clk *clk)
+{
+       unsigned long perclk_pdf;
+       unsigned long parent_rate;
+
+       parent_rate = clk_get_rate(clk->parent);
+
+       if (clk->id < 0 || clk->id > 3)
+               return 0;
+
+       perclk_pdf = (PCDR1() >> (clk->id << 3)) & CCM_PCDR1_PERDIV1_MASK;
+
+       return parent_rate / (perclk_pdf + 1);
+}
+
+static struct clk per_clk[] = {
+       {
+               .id = 0,
+               .parent = &mpll_clk,
+               .get_rate = _clk_perclkx_recalc,
+       }, {
+               .id = 1,
+               .parent = &mpll_clk,
+               .get_rate = _clk_perclkx_recalc,
+       }, {
+               .id = 2,
+               .parent = &mpll_clk,
+               .round_rate = _clk_perclkx_round_rate,
+               .set_rate = _clk_perclkx_set_rate,
+               .get_rate = _clk_perclkx_recalc,
+               /* Enable/Disable done via lcd_clkc[1] */
+       }, {
+               .id = 3,
+               .parent = &mpll_clk,
+               .round_rate = _clk_perclkx_round_rate,
+               .set_rate = _clk_perclkx_set_rate,
+               .get_rate = _clk_perclkx_recalc,
+               /* Enable/Disable done via csi_clk[1] */
+       },
+};
+
+static struct clk uart_ipg_clk[];
+
+static struct clk uart_clk[] = {
+       {
+               .id = 0,
+               .parent = &per_clk[0],
+               .secondary = &uart_ipg_clk[0],
+       }, {
+               .id = 1,
+               .parent = &per_clk[0],
+               .secondary = &uart_ipg_clk[1],
+       }, {
+               .id = 2,
+               .parent = &per_clk[0],
+               .secondary = &uart_ipg_clk[2],
+       }, {
+               .id = 3,
+               .parent = &per_clk[0],
+               .secondary = &uart_ipg_clk[3],
+       },
+};
+
+static struct clk uart_ipg_clk[] = {
+       {
+               .id = 0,
+               .parent = &ipg_clk,
+               .enable = _clk_enable,
+               .enable_reg = CCM_PCCR_UART1_REG,
+               .enable_shift = CCM_PCCR_UART1_OFFSET,
+               .disable = _clk_disable,
+       }, {
+               .id = 1,
+               .parent = &ipg_clk,
+               .enable = _clk_enable,
+               .enable_reg = CCM_PCCR_UART2_REG,
+               .enable_shift = CCM_PCCR_UART2_OFFSET,
+               .disable = _clk_disable,
+       }, {
+               .id = 2,
+               .parent = &ipg_clk,
+               .enable = _clk_enable,
+               .enable_reg = CCM_PCCR_UART3_REG,
+               .enable_shift = CCM_PCCR_UART3_OFFSET,
+               .disable = _clk_disable,
+       }, {
+               .id = 3,
+               .parent = &ipg_clk,
+               .enable = _clk_enable,
+               .enable_reg = CCM_PCCR_UART4_REG,
+               .enable_shift = CCM_PCCR_UART4_OFFSET,
+               .disable = _clk_disable,
+       },
+};
+
+static struct clk gpt_ipg_clk[];
+
+static struct clk gpt_clk[] = {
+       {
+               .id = 0,
+               .parent = &per_clk[0],
+               .secondary = &gpt_ipg_clk[0],
+       }, {
+               .id = 1,
+               .parent = &per_clk[0],
+               .secondary = &gpt_ipg_clk[1],
+       }, {
+               .id = 2,
+               .parent = &per_clk[0],
+               .secondary = &gpt_ipg_clk[2],
+       },
+};
+
+static struct clk gpt_ipg_clk[] = {
+       {
+               .id = 0,
+               .parent = &ipg_clk,
+               .enable = _clk_enable,
+               .enable_reg = CCM_PCCR_GPT1_REG,
+               .enable_shift = CCM_PCCR_GPT1_OFFSET,
+               .disable = _clk_disable,
+       }, {
+               .id = 1,
+               .parent = &ipg_clk,
+               .enable = _clk_enable,
+               .enable_reg = CCM_PCCR_GPT2_REG,
+               .enable_shift = CCM_PCCR_GPT2_OFFSET,
+               .disable = _clk_disable,
+       }, {
+               .id = 2,
+               .parent = &ipg_clk,
+               .enable = _clk_enable,
+               .enable_reg = CCM_PCCR_GPT3_REG,
+               .enable_shift = CCM_PCCR_GPT3_OFFSET,
+               .disable = _clk_disable,
+       },
+};
+
+static struct clk pwm_clk[] = {
+       {
+               .parent = &per_clk[0],
+               .secondary = &pwm_clk[1],
+       }, {
+               .parent = &ipg_clk,
+               .enable = _clk_enable,
+               .enable_reg = CCM_PCCR_PWM_REG,
+               .enable_shift = CCM_PCCR_PWM_OFFSET,
+               .disable = _clk_disable,
+       },
+};
+
+static struct clk sdhc_ipg_clk[];
+
+static struct clk sdhc_clk[] = {
+       {
+               .id = 0,
+               .parent = &per_clk[1],
+               .secondary = &sdhc_ipg_clk[0],
+       }, {
+               .id = 1,
+               .parent = &per_clk[1],
+               .secondary = &sdhc_ipg_clk[1],
+       },
+};
+
+static struct clk sdhc_ipg_clk[] = {
+       {
+               .id = 0,
+               .parent = &ipg_clk,
+               .enable = _clk_enable,
+               .enable_reg = CCM_PCCR_SDHC1_REG,
+               .enable_shift = CCM_PCCR_SDHC1_OFFSET,
+               .disable = _clk_disable,
+       }, {
+               .id = 1,
+               .parent = &ipg_clk,
+               .enable = _clk_enable,
+               .enable_reg = CCM_PCCR_SDHC2_REG,
+               .enable_shift = CCM_PCCR_SDHC2_OFFSET,
+               .disable = _clk_disable,
+       },
+};
+
+static struct clk cspi_ipg_clk[];
+
+static struct clk cspi_clk[] = {
+       {
+               .id = 0,
+               .parent = &per_clk[1],
+               .secondary = &cspi_ipg_clk[0],
+       }, {
+               .id = 1,
+               .parent = &per_clk[1],
+               .secondary = &cspi_ipg_clk[1],
+       }, {
+               .id = 2,
+               .parent = &per_clk[1],
+               .secondary = &cspi_ipg_clk[2],
+       },
+};
+
+static struct clk cspi_ipg_clk[] = {
+       {
+               .id = 0,
+               .parent = &ipg_clk,
+               .enable = _clk_enable,
+               .enable_reg = CCM_PCCR_CSPI1_REG,
+               .enable_shift = CCM_PCCR_CSPI1_OFFSET,
+               .disable = _clk_disable,
+       }, {
+               .id = 1,
+               .parent = &ipg_clk,
+               .enable = _clk_enable,
+               .enable_reg = CCM_PCCR_CSPI2_REG,
+               .enable_shift = CCM_PCCR_CSPI2_OFFSET,
+               .disable = _clk_disable,
+       }, {
+               .id = 3,
+               .parent = &ipg_clk,
+               .enable = _clk_enable,
+               .enable_reg = CCM_PCCR_CSPI3_REG,
+               .enable_shift = CCM_PCCR_CSPI3_OFFSET,
+               .disable = _clk_disable,
+       },
+};
+
+static struct clk lcdc_clk[] = {
+       {
+               .parent = &per_clk[2],
+               .secondary = &lcdc_clk[1],
+               .round_rate = _clk_parent_round_rate,
+               .set_rate = _clk_parent_set_rate,
+       }, {
+               .parent = &ipg_clk,
+               .secondary = &lcdc_clk[2],
+               .enable = _clk_enable,
+               .enable_reg = CCM_PCCR_LCDC_REG,
+               .enable_shift = CCM_PCCR_LCDC_OFFSET,
+               .disable = _clk_disable,
+       }, {
+               .parent = &hclk_clk,
+               .enable = _clk_enable,
+               .enable_reg = CCM_PCCR_HCLK_LCDC_REG,
+               .enable_shift = CCM_PCCR_HCLK_LCDC_OFFSET,
+               .disable = _clk_disable,
+       },
+};
+
+static struct clk csi_clk[] = {
+       {
+               .parent = &per_clk[3],
+               .secondary = &csi_clk[1],
+               .round_rate = _clk_parent_round_rate,
+               .set_rate = _clk_parent_set_rate,
+       }, {
+               .parent = &hclk_clk,
+               .enable = _clk_enable,
+               .enable_reg = CCM_PCCR_HCLK_CSI_REG,
+               .enable_shift = CCM_PCCR_HCLK_CSI_OFFSET,
+               .disable = _clk_disable,
+       },
+};
+
+static struct clk usb_clk[] = {
+       {
+               .parent = &spll_clk,
+               .get_rate = _clk_usb_recalc,
+               .enable = _clk_enable,
+               .enable_reg = CCM_PCCR_USBOTG_REG,
+               .enable_shift = CCM_PCCR_USBOTG_OFFSET,
+               .disable = _clk_disable,
+       }, {
+               .parent = &hclk_clk,
+               .enable = _clk_enable,
+               .enable_reg = CCM_PCCR_HCLK_USBOTG_REG,
+               .enable_shift = CCM_PCCR_HCLK_USBOTG_OFFSET,
+               .disable = _clk_disable,
+       }
+};
+
+static struct clk ssi_ipg_clk[];
+
+static struct clk ssi_clk[] = {
+       {
+               .id = 0,
+               .parent = &mpll_clk,
+               .secondary = &ssi_ipg_clk[0],
+               .get_rate = _clk_ssi1_recalc,
+               .enable = _clk_enable,
+               .enable_reg = CCM_PCCR_SSI1_BAUD_REG,
+               .enable_shift = CCM_PCCR_SSI1_BAUD_OFFSET,
+               .disable = _clk_disable,
+       }, {
+               .id = 1,
+               .parent = &mpll_clk,
+               .secondary = &ssi_ipg_clk[1],
+               .get_rate = _clk_ssi2_recalc,
+               .enable = _clk_enable,
+               .enable_reg = CCM_PCCR_SSI2_BAUD_REG,
+               .enable_shift = CCM_PCCR_SSI2_BAUD_OFFSET,
+               .disable = _clk_disable,
+       },
+};
+
+static struct clk ssi_ipg_clk[] = {
+       {
+               .id = 0,
+               .parent = &ipg_clk,
+               .enable = _clk_enable,
+               .enable_reg = CCM_PCCR_SSI1_REG,
+               .enable_shift = CCM_PCCR_SSI1_IPG_OFFSET,
+               .disable = _clk_disable,
+       }, {
+               .id = 1,
+               .parent = &ipg_clk,
+               .enable = _clk_enable,
+               .enable_reg = CCM_PCCR_SSI2_REG,
+               .enable_shift = CCM_PCCR_SSI2_IPG_OFFSET,
+               .disable = _clk_disable,
+       },
+};
+
+
+static struct clk nfc_clk = {
+       .parent = &fclk_clk,
+       .get_rate = _clk_nfc_recalc,
+       .enable = _clk_enable,
+       .enable_reg = CCM_PCCR_NFC_REG,
+       .enable_shift = CCM_PCCR_NFC_OFFSET,
+       .disable = _clk_disable,
+};
+
+static struct clk dma_clk[] = {
+       {
+               .parent = &hclk_clk,
+               .enable = _clk_enable,
+               .enable_reg = CCM_PCCR_DMA_REG,
+               .enable_shift = CCM_PCCR_DMA_OFFSET,
+               .disable = _clk_disable,
+               .secondary = &dma_clk[1],
+       },  {
+               .enable = _clk_enable,
+               .enable_reg = CCM_PCCR_HCLK_DMA_REG,
+               .enable_shift = CCM_PCCR_HCLK_DMA_OFFSET,
+               .disable = _clk_disable,
+       },
+};
+
+static struct clk brom_clk = {
+       .parent = &hclk_clk,
+       .enable = _clk_enable,
+       .enable_reg = CCM_PCCR_HCLK_BROM_REG,
+       .enable_shift = CCM_PCCR_HCLK_BROM_OFFSET,
+       .disable = _clk_disable,
+};
+
+static struct clk emma_clk[] = {
+       {
+               .parent = &hclk_clk,
+               .enable = _clk_enable,
+               .enable_reg = CCM_PCCR_EMMA_REG,
+               .enable_shift = CCM_PCCR_EMMA_OFFSET,
+               .disable = _clk_disable,
+               .secondary = &emma_clk[1],
+       }, {
+               .enable = _clk_enable,
+               .enable_reg = CCM_PCCR_HCLK_EMMA_REG,
+               .enable_shift = CCM_PCCR_HCLK_EMMA_OFFSET,
+               .disable = _clk_disable,
+       }
+};
+
+static struct clk slcdc_clk[] = {
+       {
+               .parent = &hclk_clk,
+               .enable = _clk_enable,
+               .enable_reg = CCM_PCCR_SLCDC_REG,
+               .enable_shift = CCM_PCCR_SLCDC_OFFSET,
+               .disable = _clk_disable,
+               .secondary = &slcdc_clk[1],
+       }, {
+               .enable = _clk_enable,
+               .enable_reg = CCM_PCCR_HCLK_SLCDC_REG,
+               .enable_shift = CCM_PCCR_HCLK_SLCDC_OFFSET,
+               .disable = _clk_disable,
+       }
+};
+
+static struct clk wdog_clk = {
+       .parent = &ipg_clk,
+       .enable = _clk_enable,
+       .enable_reg = CCM_PCCR_WDT_REG,
+       .enable_shift = CCM_PCCR_WDT_OFFSET,
+       .disable = _clk_disable,
+};
+
+static struct clk gpio_clk = {
+       .parent = &ipg_clk,
+       .enable = _clk_enable,
+       .enable_reg = CCM_PCCR_GPIO_REG,
+       .enable_shift = CCM_PCCR_GPIO_OFFSET,
+       .disable = _clk_disable,
+};
+
+static struct clk i2c_clk = {
+       .id = 0,
+       .parent = &ipg_clk,
+       .enable = _clk_enable,
+       .enable_reg = CCM_PCCR_I2C1_REG,
+       .enable_shift = CCM_PCCR_I2C1_OFFSET,
+       .disable = _clk_disable,
+};
+
+static struct clk kpp_clk = {
+       .parent = &ipg_clk,
+       .enable = _clk_enable,
+       .enable_reg = CCM_PCCR_KPP_REG,
+       .enable_shift = CCM_PCCR_KPP_OFFSET,
+       .disable = _clk_disable,
+};
+
+static struct clk owire_clk = {
+       .parent = &ipg_clk,
+       .enable = _clk_enable,
+       .enable_reg = CCM_PCCR_OWIRE_REG,
+       .enable_shift = CCM_PCCR_OWIRE_OFFSET,
+       .disable = _clk_disable,
+};
+
+static struct clk rtc_clk = {
+       .parent = &ipg_clk,
+       .enable = _clk_enable,
+       .enable_reg = CCM_PCCR_RTC_REG,
+       .enable_shift = CCM_PCCR_RTC_OFFSET,
+       .disable = _clk_disable,
+};
+
+static unsigned long _clk_clko_round_rate(struct clk *clk, unsigned long rate)
+{
+       u32 div;
+       unsigned long parent_rate;
+
+       parent_rate = clk_get_rate(clk->parent);
+       div = parent_rate / rate;
+       if (parent_rate % rate)
+               div++;
+
+       if (div > 8)
+               div = 8;
+
+       return parent_rate / div;
+}
+
+static int _clk_clko_set_rate(struct clk *clk, unsigned long rate)
+{
+       u32 reg;
+       u32 div;
+       unsigned long parent_rate;
+
+       parent_rate = clk_get_rate(clk->parent);
+
+       div = parent_rate / rate;
+
+       if (div > 8 || div < 1 || ((parent_rate / div) != rate))
+               return -EINVAL;
+       div--;
+
+       reg = __raw_readl(CCM_PCDR0);
+
+       if (clk->parent == &usb_clk[0]) {
+               reg &= ~CCM_PCDR0_48MDIV_MASK;
+               reg |= div << CCM_PCDR0_48MDIV_OFFSET;
+       }
+       __raw_writel(reg, CCM_PCDR0);
+
+       return 0;
+}
+
+static unsigned long _clk_clko_recalc(struct clk *clk)
+{
+       u32 div = 0;
+       unsigned long parent_rate;
+
+       parent_rate = clk_get_rate(clk->parent);
+
+       if (clk->parent == &usb_clk[0]) /* 48M */
+               div = __raw_readl(CCM_PCDR0) & CCM_PCDR0_48MDIV_MASK
+                        >> CCM_PCDR0_48MDIV_OFFSET;
+       div++;
+
+       return parent_rate / div;
+}
+
+static struct clk clko_clk;
+
+static int _clk_clko_set_parent(struct clk *clk, struct clk *parent)
+{
+       u32 reg;
+
+       reg = __raw_readl(CCM_CCSR) & ~CCM_CCSR_CLKOSEL_MASK;
+
+       if (parent == &ckil_clk)
+               reg |= 0 << CCM_CCSR_CLKOSEL_OFFSET;
+       else if (parent == &fpm_clk)
+               reg |= 1 << CCM_CCSR_CLKOSEL_OFFSET;
+       else if (parent == &ckih_clk)
+               reg |= 2 << CCM_CCSR_CLKOSEL_OFFSET;
+       else if (parent == mpll_clk.parent)
+               reg |= 3 << CCM_CCSR_CLKOSEL_OFFSET;
+       else if (parent == spll_clk.parent)
+               reg |= 4 << CCM_CCSR_CLKOSEL_OFFSET;
+       else if (parent == &mpll_clk)
+               reg |= 5 << CCM_CCSR_CLKOSEL_OFFSET;
+       else if (parent == &spll_clk)
+               reg |= 6 << CCM_CCSR_CLKOSEL_OFFSET;
+       else if (parent == &fclk_clk)
+               reg |= 7 << CCM_CCSR_CLKOSEL_OFFSET;
+       else if (parent == &hclk_clk)
+               reg |= 8 << CCM_CCSR_CLKOSEL_OFFSET;
+       else if (parent == &ipg_clk)
+               reg |= 9 << CCM_CCSR_CLKOSEL_OFFSET;
+       else if (parent == &per_clk[0])
+               reg |= 0xA << CCM_CCSR_CLKOSEL_OFFSET;
+       else if (parent == &per_clk[1])
+               reg |= 0xB << CCM_CCSR_CLKOSEL_OFFSET;
+       else if (parent == &per_clk[2])
+               reg |= 0xC << CCM_CCSR_CLKOSEL_OFFSET;
+       else if (parent == &per_clk[3])
+               reg |= 0xD << CCM_CCSR_CLKOSEL_OFFSET;
+       else if (parent == &ssi_clk[0])
+               reg |= 0xE << CCM_CCSR_CLKOSEL_OFFSET;
+       else if (parent == &ssi_clk[1])
+               reg |= 0xF << CCM_CCSR_CLKOSEL_OFFSET;
+       else if (parent == &nfc_clk)
+               reg |= 0x10 << CCM_CCSR_CLKOSEL_OFFSET;
+       else if (parent == &usb_clk[0])
+               reg |= 0x14 << CCM_CCSR_CLKOSEL_OFFSET;
+       else if (parent == &clko_clk)
+               reg |= 0x15 << CCM_CCSR_CLKOSEL_OFFSET;
+       else
+               return -EINVAL;
+
+       __raw_writel(reg, CCM_CCSR);
+
+       return 0;
+}
+
+static struct clk clko_clk = {
+       .get_rate = _clk_clko_recalc,
+       .set_rate = _clk_clko_set_rate,
+       .round_rate = _clk_clko_round_rate,
+       .set_parent = _clk_clko_set_parent,
+};
+
+
+#define _REGISTER_CLOCK(d, n, c) \
+       { \
+               .dev_id = d, \
+               .con_id = n, \
+               .clk = &c, \
+       },
+static struct clk_lookup lookups[] __initdata = {
+/* It's unlikely that any driver wants one of them directly:
+       _REGISTER_CLOCK(NULL, "ckih", ckih_clk)
+       _REGISTER_CLOCK(NULL, "ckil", ckil_clk)
+       _REGISTER_CLOCK(NULL, "fpm", fpm_clk)
+       _REGISTER_CLOCK(NULL, "mpll", mpll_clk)
+       _REGISTER_CLOCK(NULL, "spll", spll_clk)
+       _REGISTER_CLOCK(NULL, "fclk", fclk_clk)
+       _REGISTER_CLOCK(NULL, "hclk", hclk_clk)
+       _REGISTER_CLOCK(NULL, "ipg", ipg_clk)
+*/
+       _REGISTER_CLOCK(NULL, "perclk1", per_clk[0])
+       _REGISTER_CLOCK(NULL, "perclk2", per_clk[1])
+       _REGISTER_CLOCK(NULL, "perclk3", per_clk[2])
+       _REGISTER_CLOCK(NULL, "perclk4", per_clk[3])
+       _REGISTER_CLOCK(NULL, "clko", clko_clk)
+       _REGISTER_CLOCK("imx-uart.0", NULL, uart_clk[0])
+       _REGISTER_CLOCK("imx-uart.1", NULL, uart_clk[1])
+       _REGISTER_CLOCK("imx-uart.2", NULL, uart_clk[2])
+       _REGISTER_CLOCK("imx-uart.3", NULL, uart_clk[3])
+       _REGISTER_CLOCK(NULL, "gpt1", gpt_clk[0])
+       _REGISTER_CLOCK(NULL, "gpt1", gpt_clk[1])
+       _REGISTER_CLOCK(NULL, "gpt1", gpt_clk[2])
+       _REGISTER_CLOCK(NULL, "pwm", pwm_clk[0])
+       _REGISTER_CLOCK(NULL, "sdhc1", sdhc_clk[0])
+       _REGISTER_CLOCK(NULL, "sdhc2", sdhc_clk[1])
+       _REGISTER_CLOCK(NULL, "cspi1", cspi_clk[0])
+       _REGISTER_CLOCK(NULL, "cspi2", cspi_clk[1])
+       _REGISTER_CLOCK(NULL, "cspi3", cspi_clk[2])
+       _REGISTER_CLOCK(NULL, "lcdc", lcdc_clk[0])
+       _REGISTER_CLOCK(NULL, "csi", csi_clk[0])
+       _REGISTER_CLOCK(NULL, "usb", usb_clk[0])
+       _REGISTER_CLOCK(NULL, "ssi1", ssi_clk[0])
+       _REGISTER_CLOCK(NULL, "ssi2", ssi_clk[1])
+       _REGISTER_CLOCK(NULL, "nfc", nfc_clk)
+       _REGISTER_CLOCK(NULL, "dma", dma_clk[0])
+       _REGISTER_CLOCK(NULL, "brom", brom_clk)
+       _REGISTER_CLOCK(NULL, "emma", emma_clk[0])
+       _REGISTER_CLOCK(NULL, "slcdc", slcdc_clk[0])
+       _REGISTER_CLOCK(NULL, "wdog", wdog_clk)
+       _REGISTER_CLOCK(NULL, "gpio", gpio_clk)
+       _REGISTER_CLOCK(NULL, "i2c", i2c_clk)
+       _REGISTER_CLOCK("mxc-keypad", NULL, kpp_clk)
+       _REGISTER_CLOCK(NULL, "owire", owire_clk)
+       _REGISTER_CLOCK(NULL, "rtc", rtc_clk)
+};
+
+/*
+ * must be called very early to get information about the
+ * available clock rate when the timer framework starts
+ */
+int __init mx21_clocks_init(unsigned long lref, unsigned long href)
+{
+       int i;
+       u32 cscr;
+
+       external_low_reference = lref;
+       external_high_reference = href;
+
+       /* detect clock reference for both system PLL */
+       cscr = CSCR();
+       if (cscr & CCM_CSCR_MCU)
+               mpll_clk.parent = &ckih_clk;
+       else
+               mpll_clk.parent = &fpm_clk;
+
+       if (cscr & CCM_CSCR_SP)
+               spll_clk.parent = &ckih_clk;
+       else
+               spll_clk.parent = &fpm_clk;
+
+       for (i = 0; i < ARRAY_SIZE(lookups); i++)
+               clkdev_add(&lookups[i]);
+
+       /* Turn off all clock gates */
+       __raw_writel(0, CCM_PCCR0);
+       __raw_writel(CCM_PCCR_GPT1_MASK, CCM_PCCR1);
+
+       /* This turns of the serial PLL as well */
+       spll_clk.disable(&spll_clk);
+
+       /* This will propagate to all children and init all the clock rates. */
+       clk_enable(&per_clk[0]);
+       clk_enable(&gpio_clk);
+
+#ifdef CONFIG_DEBUG_LL_CONSOLE
+       clk_enable(&uart_clk[0]);
+#endif
+
+       mxc_timer_init(&gpt_clk[0]);
+       return 0;
+}
index c69896d011a1171cfe5819ef43a6867dd2ba092a..3f7280c490f0754c29dc92f78a3e599f169deb37 100644 (file)
@@ -1,6 +1,7 @@
 /*
  * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
  * Copyright 2008 Juergen Beisert, kernel@pengutronix.de
+ * Copyright 2008 Martin Fuzzey, mfuzzey@gmail.com
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
 #include <linux/clk.h>
 #include <linux/io.h>
 #include <linux/module.h>
-#include <linux/spinlock.h>
 
-#include <mach/clock.h>
-#include <mach/common.h>
+#include <asm/clkdev.h>
 #include <asm/div64.h>
 
-#include "crm_regs.h"
-
-static struct clk ckil_clk;
-static struct clk mpll_clk;
-static struct clk mpll_main_clk[];
-static struct clk spll_clk;
-
-static int _clk_enable(struct clk *clk)
+#include <mach/clock.h>
+#include <mach/common.h>
+#include <mach/hardware.h>
+
+/* Register offsets */
+#define CCM_CSCR                (IO_ADDRESS(CCM_BASE_ADDR) + 0x0)
+#define CCM_MPCTL0              (IO_ADDRESS(CCM_BASE_ADDR) + 0x4)
+#define CCM_MPCTL1              (IO_ADDRESS(CCM_BASE_ADDR) + 0x8)
+#define CCM_SPCTL0              (IO_ADDRESS(CCM_BASE_ADDR) + 0xC)
+#define CCM_SPCTL1              (IO_ADDRESS(CCM_BASE_ADDR) + 0x10)
+#define CCM_OSC26MCTL           (IO_ADDRESS(CCM_BASE_ADDR) + 0x14)
+#define CCM_PCDR0               (IO_ADDRESS(CCM_BASE_ADDR) + 0x18)
+#define CCM_PCDR1               (IO_ADDRESS(CCM_BASE_ADDR) + 0x1c)
+#define CCM_PCCR0               (IO_ADDRESS(CCM_BASE_ADDR) + 0x20)
+#define CCM_PCCR1               (IO_ADDRESS(CCM_BASE_ADDR) + 0x24)
+#define CCM_CCSR                (IO_ADDRESS(CCM_BASE_ADDR) + 0x28)
+#define CCM_PMCTL               (IO_ADDRESS(CCM_BASE_ADDR) + 0x2c)
+#define CCM_PMCOUNT             (IO_ADDRESS(CCM_BASE_ADDR) + 0x30)
+#define CCM_WKGDCTL             (IO_ADDRESS(CCM_BASE_ADDR) + 0x34)
+
+#define CCM_CSCR_UPDATE_DIS    (1 << 31)
+#define CCM_CSCR_SSI2          (1 << 23)
+#define CCM_CSCR_SSI1          (1 << 22)
+#define CCM_CSCR_VPU           (1 << 21)
+#define CCM_CSCR_MSHC           (1 << 20)
+#define CCM_CSCR_SPLLRES        (1 << 19)
+#define CCM_CSCR_MPLLRES        (1 << 18)
+#define CCM_CSCR_SP             (1 << 17)
+#define CCM_CSCR_MCU            (1 << 16)
+#define CCM_CSCR_OSC26MDIV      (1 << 4)
+#define CCM_CSCR_OSC26M         (1 << 3)
+#define CCM_CSCR_FPM            (1 << 2)
+#define CCM_CSCR_SPEN           (1 << 1)
+#define CCM_CSCR_MPEN           (1 << 0)
+
+/* i.MX27 TO 2+ */
+#define CCM_CSCR_ARM_SRC        (1 << 15)
+
+#define CCM_SPCTL1_LF           (1 << 15)
+#define CCM_SPCTL1_BRMO         (1 << 6)
+
+static struct clk mpll_main1_clk, mpll_main2_clk;
+
+static int clk_pccr_enable(struct clk *clk)
 {
        unsigned long reg;
 
+       if (!clk->enable_reg)
+               return 0;
+
        reg = __raw_readl(clk->enable_reg);
        reg |= 1 << clk->enable_shift;
        __raw_writel(reg, clk->enable_reg);
@@ -44,16 +82,19 @@ static int _clk_enable(struct clk *clk)
        return 0;
 }
 
-static void _clk_disable(struct clk *clk)
+static void clk_pccr_disable(struct clk *clk)
 {
        unsigned long reg;
 
+       if (!clk->enable_reg)
+               return;
+
        reg = __raw_readl(clk->enable_reg);
        reg &= ~(1 << clk->enable_shift);
        __raw_writel(reg, clk->enable_reg);
 }
 
-static int _clk_spll_enable(struct clk *clk)
+static int clk_spll_enable(struct clk *clk)
 {
        unsigned long reg;
 
@@ -61,13 +102,12 @@ static int _clk_spll_enable(struct clk *clk)
        reg |= CCM_CSCR_SPEN;
        __raw_writel(reg, CCM_CSCR);
 
-       while ((__raw_readl(CCM_SPCTL1) & CCM_SPCTL1_LF) == 0)
-               ;
+       while (!(__raw_readl(CCM_SPCTL1) & CCM_SPCTL1_LF));
 
        return 0;
 }
 
-static void _clk_spll_disable(struct clk *clk)
+static void clk_spll_disable(struct clk *clk)
 {
        unsigned long reg;
 
@@ -76,192 +116,30 @@ static void _clk_spll_disable(struct clk *clk)
        __raw_writel(reg, CCM_CSCR);
 }
 
-static void _clk_pccr01_enable(unsigned long mask0, unsigned long mask1)
-{
-       unsigned long reg;
-
-       reg = __raw_readl(CCM_PCCR0);
-       reg |= mask0;
-       __raw_writel(reg, CCM_PCCR0);
-
-       reg = __raw_readl(CCM_PCCR1);
-       reg |= mask1;
-       __raw_writel(reg, CCM_PCCR1);
-
-}
-
-static void _clk_pccr01_disable(unsigned long mask0, unsigned long mask1)
-{
-       unsigned long reg;
-
-       reg = __raw_readl(CCM_PCCR0);
-       reg &= ~mask0;
-       __raw_writel(reg, CCM_PCCR0);
-
-       reg = __raw_readl(CCM_PCCR1);
-       reg &= ~mask1;
-       __raw_writel(reg, CCM_PCCR1);
-}
-
-static void _clk_pccr10_enable(unsigned long mask1, unsigned long mask0)
-{
-       unsigned long reg;
-
-       reg = __raw_readl(CCM_PCCR1);
-       reg |= mask1;
-       __raw_writel(reg, CCM_PCCR1);
-
-       reg = __raw_readl(CCM_PCCR0);
-       reg |= mask0;
-       __raw_writel(reg, CCM_PCCR0);
-}
-
-static void _clk_pccr10_disable(unsigned long mask1, unsigned long mask0)
-{
-       unsigned long reg;
-
-       reg = __raw_readl(CCM_PCCR1);
-       reg &= ~mask1;
-       __raw_writel(reg, CCM_PCCR1);
-
-       reg = __raw_readl(CCM_PCCR0);
-       reg &= ~mask0;
-       __raw_writel(reg, CCM_PCCR0);
-}
-
-static int _clk_dma_enable(struct clk *clk)
-{
-       _clk_pccr01_enable(CCM_PCCR0_DMA_MASK, CCM_PCCR1_HCLK_DMA_MASK);
-
-       return 0;
-}
-
-static void _clk_dma_disable(struct clk *clk)
-{
-       _clk_pccr01_disable(CCM_PCCR0_DMA_MASK, CCM_PCCR1_HCLK_DMA_MASK);
-}
-
-static int _clk_rtic_enable(struct clk *clk)
-{
-       _clk_pccr01_enable(CCM_PCCR0_RTIC_MASK, CCM_PCCR1_HCLK_RTIC_MASK);
-
-       return 0;
-}
-
-static void _clk_rtic_disable(struct clk *clk)
-{
-       _clk_pccr01_disable(CCM_PCCR0_RTIC_MASK, CCM_PCCR1_HCLK_RTIC_MASK);
-}
-
-static int _clk_emma_enable(struct clk *clk)
-{
-       _clk_pccr01_enable(CCM_PCCR0_EMMA_MASK, CCM_PCCR1_HCLK_EMMA_MASK);
-
-       return 0;
-}
-
-static void _clk_emma_disable(struct clk *clk)
-{
-       _clk_pccr01_disable(CCM_PCCR0_EMMA_MASK, CCM_PCCR1_HCLK_EMMA_MASK);
-}
-
-static int _clk_slcdc_enable(struct clk *clk)
-{
-       _clk_pccr01_enable(CCM_PCCR0_SLCDC_MASK, CCM_PCCR1_HCLK_SLCDC_MASK);
-
-       return 0;
-}
-
-static void _clk_slcdc_disable(struct clk *clk)
-{
-       _clk_pccr01_disable(CCM_PCCR0_SLCDC_MASK, CCM_PCCR1_HCLK_SLCDC_MASK);
-}
-
-static int _clk_fec_enable(struct clk *clk)
-{
-       _clk_pccr01_enable(CCM_PCCR0_FEC_MASK, CCM_PCCR1_HCLK_FEC_MASK);
-
-       return 0;
-}
-
-static void _clk_fec_disable(struct clk *clk)
-{
-       _clk_pccr01_disable(CCM_PCCR0_FEC_MASK, CCM_PCCR1_HCLK_FEC_MASK);
-}
-
-static int _clk_vpu_enable(struct clk *clk)
-{
-       unsigned long reg;
-
-       reg = __raw_readl(CCM_PCCR1);
-       reg |= CCM_PCCR1_VPU_BAUD_MASK | CCM_PCCR1_HCLK_VPU_MASK;
-       __raw_writel(reg, CCM_PCCR1);
-
-       return 0;
-}
-
-static void _clk_vpu_disable(struct clk *clk)
+static int clk_cpu_set_parent(struct clk *clk, struct clk *parent)
 {
-       unsigned long reg;
-
-       reg = __raw_readl(CCM_PCCR1);
-       reg &= ~(CCM_PCCR1_VPU_BAUD_MASK | CCM_PCCR1_HCLK_VPU_MASK);
-       __raw_writel(reg, CCM_PCCR1);
-}
-
-static int _clk_sahara2_enable(struct clk *clk)
-{
-       _clk_pccr01_enable(CCM_PCCR0_SAHARA_MASK, CCM_PCCR1_HCLK_SAHARA_MASK);
-
-       return 0;
-}
-
-static void _clk_sahara2_disable(struct clk *clk)
-{
-       _clk_pccr01_disable(CCM_PCCR0_SAHARA_MASK, CCM_PCCR1_HCLK_SAHARA_MASK);
-}
-
-static int _clk_mstick1_enable(struct clk *clk)
-{
-       _clk_pccr10_enable(CCM_PCCR1_MSHC_BAUD_MASK, CCM_PCCR0_MSHC_MASK);
-
-       return 0;
-}
-
-static void _clk_mstick1_disable(struct clk *clk)
-{
-       _clk_pccr10_disable(CCM_PCCR1_MSHC_BAUD_MASK, CCM_PCCR0_MSHC_MASK);
-}
-
-#define CSCR() (__raw_readl(CCM_CSCR))
-#define PCDR0() (__raw_readl(CCM_PCDR0))
-#define PCDR1() (__raw_readl(CCM_PCDR1))
-
-static int _clk_cpu_set_parent(struct clk *clk, struct clk *parent)
-{
-       int cscr = CSCR();
+       int cscr = __raw_readl(CCM_CSCR);
 
        if (clk->parent == parent)
                return 0;
 
        if (mx27_revision() >= CHIP_REV_2_0) {
-               if (parent == &mpll_main_clk[0]) {
+               if (parent == &mpll_main1_clk) {
                        cscr |= CCM_CSCR_ARM_SRC;
                } else {
-                       if (parent == &mpll_main_clk[1])
+                       if (parent == &mpll_main2_clk)
                                cscr &= ~CCM_CSCR_ARM_SRC;
                        else
                                return -EINVAL;
                }
                __raw_writel(cscr, CCM_CSCR);
-       } else
-               return -ENODEV;
-
-       clk->parent = parent;
-       return 0;
+               clk->parent = parent;
+               return 0;
+       }
+       return -ENODEV;
 }
 
-static unsigned long _clk_cpu_round_rate(struct clk *clk, unsigned long rate)
+static unsigned long round_rate_cpu(struct clk *clk, unsigned long rate)
 {
        int div;
        unsigned long parent_rate;
@@ -278,7 +156,7 @@ static unsigned long _clk_cpu_round_rate(struct clk *clk, unsigned long rate)
        return parent_rate / div;
 }
 
-static int _clk_cpu_set_rate(struct clk *clk, unsigned long rate)
+static int set_rate_cpu(struct clk *clk, unsigned long rate)
 {
        unsigned int div;
        uint32_t reg;
@@ -295,19 +173,18 @@ static int _clk_cpu_set_rate(struct clk *clk, unsigned long rate)
 
        reg = __raw_readl(CCM_CSCR);
        if (mx27_revision() >= CHIP_REV_2_0) {
-               reg &= ~CCM_CSCR_ARM_MASK;
-               reg |= div << CCM_CSCR_ARM_OFFSET;
-               reg &= ~0x06;
-               __raw_writel(reg | 0x80000000, CCM_CSCR);
+               reg &= ~(3 << 12);
+               reg |= div << 12;
+               reg &= ~(CCM_CSCR_FPM | CCM_CSCR_SPEN);
+               __raw_writel(reg | CCM_CSCR_UPDATE_DIS, CCM_CSCR);
        } else {
-               printk(KERN_ERR "Cant set CPU frequency!\n");
+               printk(KERN_ERR "Can't set CPU frequency!\n");
        }
 
        return 0;
 }
 
-static unsigned long _clk_perclkx_round_rate(struct clk *clk,
-                                            unsigned long rate)
+static unsigned long round_rate_per(struct clk *clk, unsigned long rate)
 {
        u32 div;
        unsigned long parent_rate;
@@ -324,7 +201,7 @@ static unsigned long _clk_perclkx_round_rate(struct clk *clk,
        return parent_rate / div;
 }
 
-static int _clk_perclkx_set_rate(struct clk *clk, unsigned long rate)
+static int set_rate_per(struct clk *clk, unsigned long rate)
 {
        u32 reg;
        u32 div;
@@ -340,84 +217,65 @@ static int _clk_perclkx_set_rate(struct clk *clk, unsigned long rate)
                return -EINVAL;
        div--;
 
-       reg =
-           __raw_readl(CCM_PCDR1) & ~(CCM_PCDR1_PERDIV1_MASK <<
-                                      (clk->id << 3));
+       reg = __raw_readl(CCM_PCDR1) & ~(0x3f << (clk->id << 3));
        reg |= div << (clk->id << 3);
        __raw_writel(reg, CCM_PCDR1);
 
        return 0;
 }
 
-static unsigned long _clk_usb_recalc(struct clk *clk)
+static unsigned long get_rate_usb(struct clk *clk)
 {
        unsigned long usb_pdf;
        unsigned long parent_rate;
 
        parent_rate = clk_get_rate(clk->parent);
 
-       usb_pdf = (CSCR() & CCM_CSCR_USB_MASK) >> CCM_CSCR_USB_OFFSET;
+       usb_pdf = (__raw_readl(CCM_CSCR) >> 28) & 0x7;
 
        return parent_rate / (usb_pdf + 1U);
 }
 
-static unsigned long _clk_ssi1_recalc(struct clk *clk)
+static unsigned long get_rate_ssix(struct clk *clk, unsigned long pdf)
 {
-       unsigned long ssi1_pdf;
        unsigned long parent_rate;
 
        parent_rate = clk_get_rate(clk->parent);
 
-       ssi1_pdf = (PCDR0() & CCM_PCDR0_SSI1BAUDDIV_MASK) >>
-                                       CCM_PCDR0_SSI1BAUDDIV_OFFSET;
-
        if (mx27_revision() >= CHIP_REV_2_0)
-               ssi1_pdf += 4;
+               pdf += 4;  /* MX27 TO2+ */
        else
-               ssi1_pdf = (ssi1_pdf < 2) ? 124UL : ssi1_pdf;
+               pdf = (pdf < 2) ? 124UL : pdf;  /* MX21 & MX27 TO1 */
 
-       return 2UL * parent_rate / ssi1_pdf;
+       return 2UL * parent_rate / pdf;
 }
 
-static unsigned long _clk_ssi2_recalc(struct clk *clk)
+static unsigned long get_rate_ssi1(struct clk *clk)
 {
-       unsigned long ssi2_pdf;
-       unsigned long parent_rate;
-
-       parent_rate = clk_get_rate(clk->parent);
-
-       ssi2_pdf = (PCDR0() & CCM_PCDR0_SSI2BAUDDIV_MASK) >>
-           CCM_PCDR0_SSI2BAUDDIV_OFFSET;
-
-       if (mx27_revision() >= CHIP_REV_2_0)
-               ssi2_pdf += 4;
-       else
-               ssi2_pdf = (ssi2_pdf < 2) ? 124UL : ssi2_pdf;
+       return get_rate_ssix(clk, (__raw_readl(CCM_PCDR0) >> 16) & 0x3f);
+}
 
-       return 2UL * parent_rate / ssi2_pdf;
+static unsigned long get_rate_ssi2(struct clk *clk)
+{
+       return get_rate_ssix(clk, (__raw_readl(CCM_PCDR0) >> 26) & 0x3f);
 }
 
-static unsigned long _clk_nfc_recalc(struct clk *clk)
+static unsigned long get_rate_nfc(struct clk *clk)
 {
        unsigned long nfc_pdf;
        unsigned long parent_rate;
 
        parent_rate = clk_get_rate(clk->parent);
 
-       if (mx27_revision() >= CHIP_REV_2_0) {
-               nfc_pdf =
-                   (PCDR0() & CCM_PCDR0_NFCDIV2_MASK) >>
-                   CCM_PCDR0_NFCDIV2_OFFSET;
-       } else {
-               nfc_pdf =
-                   (PCDR0() & CCM_PCDR0_NFCDIV_MASK) >>
-                   CCM_PCDR0_NFCDIV_OFFSET;
-       }
+       if (mx27_revision() >= CHIP_REV_2_0)
+               nfc_pdf = (__raw_readl(CCM_PCDR0) >> 6) & 0xf;
+       else
+               nfc_pdf = (__raw_readl(CCM_PCDR0) >> 12) & 0xf;
 
        return parent_rate / (nfc_pdf + 1);
 }
 
-static unsigned long _clk_vpu_recalc(struct clk *clk)
+static unsigned long get_rate_vpu(struct clk *clk)
 {
        unsigned long vpu_pdf;
        unsigned long parent_rate;
@@ -425,25 +283,27 @@ static unsigned long _clk_vpu_recalc(struct clk *clk)
        parent_rate = clk_get_rate(clk->parent);
 
        if (mx27_revision() >= CHIP_REV_2_0) {
-               vpu_pdf =
-                   (PCDR0() & CCM_PCDR0_VPUDIV2_MASK) >>
-                   CCM_PCDR0_VPUDIV2_OFFSET;
+               vpu_pdf = (__raw_readl(CCM_PCDR0) >> 10) & 0x3f;
                vpu_pdf += 4;
        } else {
-               vpu_pdf =
-                   (PCDR0() & CCM_PCDR0_VPUDIV_MASK) >>
-                   CCM_PCDR0_VPUDIV_OFFSET;
+               vpu_pdf = (__raw_readl(CCM_PCDR0) >> 8) & 0xf;
                vpu_pdf = (vpu_pdf < 2) ? 124 : vpu_pdf;
        }
+
        return 2UL * parent_rate / vpu_pdf;
 }
 
-static unsigned long _clk_parent_round_rate(struct clk *clk, unsigned long rate)
+static unsigned long round_rate_parent(struct clk *clk, unsigned long rate)
 {
        return clk->parent->round_rate(clk->parent, rate);
 }
 
-static int _clk_parent_set_rate(struct clk *clk, unsigned long rate)
+static unsigned long get_rate_parent(struct clk *clk)
+{
+       return clk_get_rate(clk->parent);
+}
+
+static int set_rate_parent(struct clk *clk, unsigned long rate)
 {
        return clk->parent->set_rate(clk->parent, rate);
 }
@@ -451,1112 +311,380 @@ static int _clk_parent_set_rate(struct clk *clk, unsigned long rate)
 /* in Hz */
 static unsigned long external_high_reference = 26000000;
 
-static unsigned long get_high_reference_clock_rate(struct clk *clk)
+static unsigned long get_rate_high_reference(struct clk *clk)
 {
        return external_high_reference;
 }
 
-/*
- * the high frequency external clock reference
- * Default case is 26MHz. Could be changed at runtime
- * with a call to change_external_high_reference()
- */
-static struct clk ckih_clk = {
-       .name = "ckih",
-       .get_rate = get_high_reference_clock_rate,
-};
-
 /* in Hz */
 static unsigned long external_low_reference = 32768;
 
-static unsigned long get_low_reference_clock_rate(struct clk *clk)
+static unsigned long get_rate_low_reference(struct clk *clk)
 {
        return external_low_reference;
 }
 
-/*
- * the low frequency external clock reference
- * Default case is 32.768kHz Could be changed at runtime
- * with a call to change_external_low_reference()
- */
-static struct clk ckil_clk = {
-       .name = "ckil",
-       .get_rate = get_low_reference_clock_rate,
-};
-
-static unsigned long get_mpll_clk(struct clk *clk)
+static unsigned long get_rate_fpm(struct clk *clk)
 {
-       uint32_t reg;
-       unsigned long ref_clk;
-       unsigned long mfi = 0, mfn = 0, mfd = 0, pdf = 0;
-       unsigned long long temp;
-
-       ref_clk = clk_get_rate(clk->parent);
-
-       reg = __raw_readl(CCM_MPCTL0);
-       pdf = (reg & CCM_MPCTL0_PD_MASK) >> CCM_MPCTL0_PD_OFFSET;
-       mfd = (reg & CCM_MPCTL0_MFD_MASK) >> CCM_MPCTL0_MFD_OFFSET;
-       mfi = (reg & CCM_MPCTL0_MFI_MASK) >> CCM_MPCTL0_MFI_OFFSET;
-       mfn = (reg & CCM_MPCTL0_MFN_MASK) >> CCM_MPCTL0_MFN_OFFSET;
-
-       mfi = (mfi <= 5) ? 5 : mfi;
-       temp = 2LL * ref_clk * mfn;
-       do_div(temp, mfd + 1);
-       temp = 2LL * ref_clk * mfi + temp;
-       do_div(temp, pdf + 1);
-
-       return (unsigned long)temp;
+       return clk_get_rate(clk->parent) * 1024;
 }
 
-static struct clk mpll_clk = {
-       .name = "mpll",
-       .parent = &ckih_clk,
-       .get_rate = get_mpll_clk,
-};
+static unsigned long get_rate_mpll(struct clk *clk)
+{
+       return mxc_decode_pll(__raw_readl(CCM_MPCTL0),
+                       clk_get_rate(clk->parent));
+}
 
-static unsigned long _clk_mpll_main_get_rate(struct clk *clk)
+static unsigned long get_rate_mpll_main(struct clk *clk)
 {
        unsigned long parent_rate;
 
        parent_rate = clk_get_rate(clk->parent);
 
        /* i.MX27 TO2:
-        * clk->id == 0: arm clock source path 1 which is from 2*MPLL/DIV_2
-        * clk->id == 1: arm clock source path 2 which is from 2*MPLL/DIV_3
+        * clk->id == 0: arm clock source path 1 which is from 2 * MPLL / 2
+        * clk->id == 1: arm clock source path 2 which is from 2 * MPLL / 3
         */
-
        if (mx27_revision() >= CHIP_REV_2_0 && clk->id == 1)
                return 2UL * parent_rate / 3UL;
 
        return parent_rate;
 }
 
-static struct clk mpll_main_clk[] = {
-       {
-               /* For i.MX27 TO2, it is the MPLL path 1 of ARM core
-                * It provide the clock source whose rate is same as MPLL
-                */
-               .name = "mpll_main",
-               .id = 0,
-               .parent = &mpll_clk,
-               .get_rate = _clk_mpll_main_get_rate
-       }, {
-               /* For i.MX27 TO2, it is the MPLL path 2 of ARM core
-                * It provide the clock source whose rate is same MPLL * 2/3
-                */
-               .name = "mpll_main",
-               .id = 1,
-               .parent = &mpll_clk,
-               .get_rate = _clk_mpll_main_get_rate
-       }
-};
-
-static unsigned long get_spll_clk(struct clk *clk)
+static unsigned long get_rate_spll(struct clk *clk)
 {
        uint32_t reg;
-       unsigned long ref_clk;
-       unsigned long mfi = 0, mfn = 0, mfd = 0, pdf = 0;
-       unsigned long long temp;
+       unsigned long rate;
 
-       ref_clk = clk_get_rate(clk->parent);
+       rate = clk_get_rate(clk->parent);
 
        reg = __raw_readl(CCM_SPCTL0);
-       /*TODO: This is TO2 Bug */
+
+       /* On TO2 we have to write the value back. Otherwise we
+        * read 0 from this register the next time.
+        */
        if (mx27_revision() >= CHIP_REV_2_0)
                __raw_writel(reg, CCM_SPCTL0);
 
-       pdf = (reg & CCM_SPCTL0_PD_MASK) >> CCM_SPCTL0_PD_OFFSET;
-       mfd = (reg & CCM_SPCTL0_MFD_MASK) >> CCM_SPCTL0_MFD_OFFSET;
-       mfi = (reg & CCM_SPCTL0_MFI_MASK) >> CCM_SPCTL0_MFI_OFFSET;
-       mfn = (reg & CCM_SPCTL0_MFN_MASK) >> CCM_SPCTL0_MFN_OFFSET;
-
-       mfi = (mfi <= 5) ? 5 : mfi;
-       temp = 2LL * ref_clk * mfn;
-       do_div(temp, mfd + 1);
-       temp = 2LL * ref_clk * mfi + temp;
-       do_div(temp, pdf + 1);
-
-       return (unsigned long)temp;
+       return mxc_decode_pll(reg, rate);
 }
 
-static struct clk spll_clk = {
-       .name = "spll",
-       .parent = &ckih_clk,
-       .get_rate = get_spll_clk,
-       .enable = _clk_spll_enable,
-       .disable = _clk_spll_disable,
-};
-
-static unsigned long get_cpu_clk(struct clk *clk)
+static unsigned long get_rate_cpu(struct clk *clk)
 {
        u32 div;
        unsigned long rate;
 
        if (mx27_revision() >= CHIP_REV_2_0)
-               div = (CSCR() & CCM_CSCR_ARM_MASK) >> CCM_CSCR_ARM_OFFSET;
+               div = (__raw_readl(CCM_CSCR) >> 12) & 0x3;
        else
-               div = (CSCR() & CCM_CSCR_PRESC_MASK) >> CCM_CSCR_PRESC_OFFSET;
+               div = (__raw_readl(CCM_CSCR) >> 13) & 0x7;
 
        rate = clk_get_rate(clk->parent);
        return rate / (div + 1);
 }
 
-static struct clk cpu_clk = {
-       .name = "cpu_clk",
-       .parent = &mpll_main_clk[1],
-       .set_parent = _clk_cpu_set_parent,
-       .round_rate = _clk_cpu_round_rate,
-       .get_rate = get_cpu_clk,
-       .set_rate = _clk_cpu_set_rate,
-};
-
-static unsigned long get_ahb_clk(struct clk *clk)
+static unsigned long get_rate_ahb(struct clk *clk)
 {
-       unsigned long rate;
-       unsigned long bclk_pdf;
+       unsigned long rate, bclk_pdf;
 
        if (mx27_revision() >= CHIP_REV_2_0)
-               bclk_pdf = (CSCR() & CCM_CSCR_AHB_MASK)
-                                       >> CCM_CSCR_AHB_OFFSET;
+               bclk_pdf = (__raw_readl(CCM_CSCR) >> 8) & 0x3;
        else
-               bclk_pdf = (CSCR() & CCM_CSCR_BCLK_MASK)
-                                       >> CCM_CSCR_BCLK_OFFSET;
+               bclk_pdf = (__raw_readl(CCM_CSCR) >> 9) & 0xf;
 
        rate = clk_get_rate(clk->parent);
        return rate / (bclk_pdf + 1);
 }
 
-static struct clk ahb_clk = {
-       .name = "ahb_clk",
-       .parent = &mpll_main_clk[1],
-       .get_rate = get_ahb_clk,
-};
-
-static unsigned long get_ipg_clk(struct clk *clk)
+static unsigned long get_rate_ipg(struct clk *clk)
 {
-       unsigned long rate;
-       unsigned long ipg_pdf;
+       unsigned long rate, ipg_pdf;
 
        if (mx27_revision() >= CHIP_REV_2_0)
                return clk_get_rate(clk->parent);
        else
-               ipg_pdf = (CSCR() & CCM_CSCR_IPDIV) >> CCM_CSCR_IPDIV_OFFSET;
+               ipg_pdf = (__raw_readl(CCM_CSCR) >> 8) & 1;
 
        rate = clk_get_rate(clk->parent);
        return rate / (ipg_pdf + 1);
 }
 
-static struct clk ipg_clk = {
-       .name = "ipg_clk",
-       .parent = &ahb_clk,
-       .get_rate = get_ipg_clk,
-};
-
-static unsigned long _clk_perclkx_recalc(struct clk *clk)
+static unsigned long get_rate_per(struct clk *clk)
 {
-       unsigned long perclk_pdf;
-       unsigned long parent_rate;
+       unsigned long perclk_pdf, parent_rate;
 
        parent_rate = clk_get_rate(clk->parent);
 
        if (clk->id < 0 || clk->id > 3)
                return 0;
 
-       perclk_pdf = (PCDR1() >> (clk->id << 3)) & CCM_PCDR1_PERDIV1_MASK;
+       perclk_pdf = (__raw_readl(CCM_PCDR1) >> (clk->id << 3)) & 0x3f;
 
        return parent_rate / (perclk_pdf + 1);
 }
 
-static struct clk per_clk[] = {
-       {
-               .name = "per_clk",
-               .id = 0,
-               .parent = &mpll_main_clk[1],
-               .get_rate = _clk_perclkx_recalc,
-               .enable = _clk_enable,
-               .enable_reg = CCM_PCCR1,
-               .enable_shift = CCM_PCCR1_PERCLK1_OFFSET,
-               .disable = _clk_disable,
-       }, {
-               .name = "per_clk",
-               .id = 1,
-               .parent = &mpll_main_clk[1],
-               .get_rate = _clk_perclkx_recalc,
-               .enable = _clk_enable,
-               .enable_reg = CCM_PCCR1,
-               .enable_shift = CCM_PCCR1_PERCLK2_OFFSET,
-               .disable = _clk_disable,
-       }, {
-               .name = "per_clk",
-               .id = 2,
-               .parent = &mpll_main_clk[1],
-               .round_rate = _clk_perclkx_round_rate,
-               .set_rate = _clk_perclkx_set_rate,
-               .get_rate = _clk_perclkx_recalc,
-               .enable = _clk_enable,
-               .enable_reg = CCM_PCCR1,
-               .enable_shift = CCM_PCCR1_PERCLK3_OFFSET,
-               .disable = _clk_disable,
-       }, {
-               .name = "per_clk",
-               .id = 3,
-               .parent = &mpll_main_clk[1],
-               .round_rate = _clk_perclkx_round_rate,
-               .set_rate = _clk_perclkx_set_rate,
-               .get_rate = _clk_perclkx_recalc,
-               .enable = _clk_enable,
-               .enable_reg = CCM_PCCR1,
-               .enable_shift = CCM_PCCR1_PERCLK4_OFFSET,
-               .disable = _clk_disable,
-       },
-};
-
-struct clk uart1_clk[] = {
-       {
-               .name = "uart_clk",
-               .id = 0,
-               .parent = &per_clk[0],
-               .secondary = &uart1_clk[1],
-       }, {
-               .name = "uart_ipg_clk",
-               .id = 0,
-               .parent = &ipg_clk,
-               .enable = _clk_enable,
-               .enable_reg = CCM_PCCR1,
-               .enable_shift = CCM_PCCR1_UART1_OFFSET,
-               .disable = _clk_disable,
-       },
-};
-
-struct clk uart2_clk[] = {
-       {
-               .name = "uart_clk",
-               .id = 1,
-               .parent = &per_clk[0],
-               .secondary = &uart2_clk[1],
-       }, {
-               .name = "uart_ipg_clk",
-               .id = 1,
-               .parent = &ipg_clk,
-               .enable = _clk_enable,
-               .enable_reg = CCM_PCCR1,
-               .enable_shift = CCM_PCCR1_UART2_OFFSET,
-               .disable = _clk_disable,
-       },
-};
-
-struct clk uart3_clk[] = {
-       {
-               .name = "uart_clk",
-               .id = 2,
-               .parent = &per_clk[0],
-               .secondary = &uart3_clk[1],
-       }, {
-               .name = "uart_ipg_clk",
-               .id = 2,
-               .parent = &ipg_clk,
-               .enable = _clk_enable,
-               .enable_reg = CCM_PCCR1,
-               .enable_shift = CCM_PCCR1_UART3_OFFSET,
-               .disable = _clk_disable,
-       },
-};
-
-struct clk uart4_clk[] = {
-       {
-               .name = "uart_clk",
-               .id = 3,
-               .parent = &per_clk[0],
-               .secondary = &uart4_clk[1],
-       }, {
-               .name = "uart_ipg_clk",
-               .id = 3,
-               .parent = &ipg_clk,
-               .enable = _clk_enable,
-               .enable_reg = CCM_PCCR1,
-               .enable_shift = CCM_PCCR1_UART4_OFFSET,
-               .disable = _clk_disable,
-       },
-};
-
-struct clk uart5_clk[] = {
-       {
-               .name = "uart_clk",
-               .id = 4,
-               .parent = &per_clk[0],
-               .secondary = &uart5_clk[1],
-       }, {
-               .name = "uart_ipg_clk",
-               .id = 4,
-               .parent = &ipg_clk,
-               .enable = _clk_enable,
-               .enable_reg = CCM_PCCR1,
-               .enable_shift = CCM_PCCR1_UART5_OFFSET,
-               .disable = _clk_disable,
-       },
-};
-
-struct clk uart6_clk[] = {
-       {
-               .name = "uart_clk",
-               .id = 5,
-               .parent = &per_clk[0],
-               .secondary = &uart6_clk[1],
-       }, {
-               .name = "uart_ipg_clk",
-               .id = 5,
-               .parent = &ipg_clk,
-               .enable = _clk_enable,
-               .enable_reg = CCM_PCCR1,
-               .enable_shift = CCM_PCCR1_UART6_OFFSET,
-               .disable = _clk_disable,
-       },
-};
-
-static struct clk gpt1_clk[] = {
-       {
-               .name = "gpt_clk",
-               .id = 0,
-               .parent = &per_clk[0],
-               .secondary = &gpt1_clk[1],
-       }, {
-               .name = "gpt_ipg_clk",
-               .id = 0,
-               .parent = &ipg_clk,
-               .enable = _clk_enable,
-               .enable_reg = CCM_PCCR0,
-               .enable_shift = CCM_PCCR0_GPT1_OFFSET,
-               .disable = _clk_disable,
-       },
-};
-
-static struct clk gpt2_clk[] = {
-       {
-               .name = "gpt_clk",
-               .id = 1,
-               .parent = &per_clk[0],
-               .secondary = &gpt2_clk[1],
-       }, {
-               .name = "gpt_ipg_clk",
-               .id = 1,
-               .parent = &ipg_clk,
-               .enable = _clk_enable,
-               .enable_reg = CCM_PCCR0,
-               .enable_shift = CCM_PCCR0_GPT2_OFFSET,
-               .disable = _clk_disable,
-       },
-};
-
-static struct clk gpt3_clk[] = {
-       {
-               .name = "gpt_clk",
-               .id = 2,
-               .parent = &per_clk[0],
-               .secondary = &gpt3_clk[1],
-       }, {
-               .name = "gpt_ipg_clk",
-               .id = 2,
-               .parent = &ipg_clk,
-               .enable = _clk_enable,
-               .enable_reg = CCM_PCCR0,
-               .enable_shift = CCM_PCCR0_GPT3_OFFSET,
-               .disable = _clk_disable,
-       },
-};
-
-static struct clk gpt4_clk[] = {
-       {
-               .name = "gpt_clk",
-               .id = 3,
-               .parent = &per_clk[0],
-               .secondary = &gpt4_clk[1],
-       }, {
-               .name = "gpt_ipg_clk",
-               .id = 3,
-               .parent = &ipg_clk,
-               .enable = _clk_enable,
-               .enable_reg = CCM_PCCR0,
-               .enable_shift = CCM_PCCR0_GPT4_OFFSET,
-               .disable = _clk_disable,
-       },
-};
-
-static struct clk gpt5_clk[] = {
-       {
-               .name = "gpt_clk",
-               .id = 4,
-               .parent = &per_clk[0],
-               .secondary = &gpt5_clk[1],
-       }, {
-               .name = "gpt_ipg_clk",
-               .id = 4,
-               .parent = &ipg_clk,
-               .enable = _clk_enable,
-               .enable_reg = CCM_PCCR0,
-               .enable_shift = CCM_PCCR0_GPT5_OFFSET,
-               .disable = _clk_disable,
-       },
+/*
+ * the high frequency external clock reference
+ * Default case is 26MHz. Could be changed at runtime
+ * with a call to change_external_high_reference()
+ */
+static struct clk ckih_clk = {
+       .get_rate       = get_rate_high_reference,
 };
 
-static struct clk gpt6_clk[] = {
-       {
-               .name = "gpt_clk",
-               .id = 5,
-               .parent = &per_clk[0],
-               .secondary = &gpt6_clk[1],
-       }, {
-               .name = "gpt_ipg_clk",
-               .id = 5,
-               .parent = &ipg_clk,
-               .enable = _clk_enable,
-               .enable_reg = CCM_PCCR0,
-               .enable_shift = CCM_PCCR0_GPT6_OFFSET,
-               .disable = _clk_disable,
-       },
+static struct clk mpll_clk = {
+       .parent         = &ckih_clk,
+       .get_rate       = get_rate_mpll,
 };
 
-static struct clk pwm_clk[] = {
-       {
-               .name = "pwm_clk",
-               .parent = &per_clk[0],
-               .secondary = &pwm_clk[1],
-       }, {
-               .name = "pwm_clk",
-               .parent = &ipg_clk,
-               .enable = _clk_enable,
-               .enable_reg = CCM_PCCR0,
-               .enable_shift = CCM_PCCR0_PWM_OFFSET,
-               .disable = _clk_disable,
-       },
+/* For i.MX27 TO2, it is the MPLL path 1 of ARM core
+ * It provides the clock source whose rate is same as MPLL
+ */
+static struct clk mpll_main1_clk = {
+       .id             = 0,
+       .parent         = &mpll_clk,
+       .get_rate       = get_rate_mpll_main,
 };
 
-static struct clk sdhc1_clk[] = {
-       {
-               .name = "sdhc_clk",
-               .id = 0,
-               .parent = &per_clk[1],
-               .secondary = &sdhc1_clk[1],
-       }, {
-               .name = "sdhc_ipg_clk",
-               .id = 0,
-               .parent = &ipg_clk,
-               .enable = _clk_enable,
-               .enable_reg = CCM_PCCR0,
-               .enable_shift = CCM_PCCR0_SDHC1_OFFSET,
-               .disable = _clk_disable,
-       },
+/* For i.MX27 TO2, it is the MPLL path 2 of ARM core
+ * It provides the clock source whose rate is same MPLL * 2 / 3
+ */
+static struct clk mpll_main2_clk = {
+       .id             = 1,
+       .parent         = &mpll_clk,
+       .get_rate       = get_rate_mpll_main,
 };
 
-static struct clk sdhc2_clk[] = {
-       {
-               .name = "sdhc_clk",
-               .id = 1,
-               .parent = &per_clk[1],
-               .secondary = &sdhc2_clk[1],
-       }, {
-               .name = "sdhc_ipg_clk",
-               .id = 1,
-               .parent = &ipg_clk,
-               .enable = _clk_enable,
-               .enable_reg = CCM_PCCR0,
-               .enable_shift = CCM_PCCR0_SDHC2_OFFSET,
-               .disable = _clk_disable,
-       },
+static struct clk ahb_clk = {
+       .parent         = &mpll_main2_clk,
+       .get_rate       = get_rate_ahb,
 };
 
-static struct clk sdhc3_clk[] = {
-       {
-               .name = "sdhc_clk",
-               .id = 2,
-               .parent = &per_clk[1],
-               .secondary = &sdhc3_clk[1],
-       }, {
-               .name = "sdhc_ipg_clk",
-               .id = 2,
-               .parent = &ipg_clk,
-               .enable = _clk_enable,
-               .enable_reg = CCM_PCCR0,
-               .enable_shift = CCM_PCCR0_SDHC3_OFFSET,
-               .disable = _clk_disable,
-       },
+static struct clk ipg_clk = {
+       .parent         = &ahb_clk,
+       .get_rate       = get_rate_ipg,
 };
 
-static struct clk cspi1_clk[] = {
-       {
-               .name = "cspi_clk",
-               .id = 0,
-               .parent = &per_clk[1],
-               .secondary = &cspi1_clk[1],
-       }, {
-               .name = "cspi_ipg_clk",
-               .id = 0,
-               .parent = &ipg_clk,
-               .enable = _clk_enable,
-               .enable_reg = CCM_PCCR0,
-               .enable_shift = CCM_PCCR0_CSPI1_OFFSET,
-               .disable = _clk_disable,
-       },
+static struct clk cpu_clk = {
+       .parent = &mpll_main2_clk,
+       .set_parent = clk_cpu_set_parent,
+       .round_rate = round_rate_cpu,
+       .get_rate = get_rate_cpu,
+       .set_rate = set_rate_cpu,
 };
 
-static struct clk cspi2_clk[] = {
-       {
-               .name = "cspi_clk",
-               .id = 1,
-               .parent = &per_clk[1],
-               .secondary = &cspi2_clk[1],
-       }, {
-               .name = "cspi_ipg_clk",
-               .id = 1,
-               .parent = &ipg_clk,
-               .enable = _clk_enable,
-               .enable_reg = CCM_PCCR0,
-               .enable_shift = CCM_PCCR0_CSPI2_OFFSET,
-               .disable = _clk_disable,
-       },
+static struct clk spll_clk = {
+       .parent = &ckih_clk,
+       .get_rate = get_rate_spll,
+       .enable = clk_spll_enable,
+       .disable = clk_spll_disable,
 };
 
-static struct clk cspi3_clk[] = {
-       {
-               .name = "cspi_clk",
-               .id = 2,
-               .parent = &per_clk[1],
-               .secondary = &cspi3_clk[1],
-       }, {
-               .name = "cspi_ipg_clk",
-               .id = 2,
-               .parent = &ipg_clk,
-               .enable = _clk_enable,
-               .enable_reg = CCM_PCCR0,
-               .enable_shift = CCM_PCCR0_CSPI3_OFFSET,
-               .disable = _clk_disable,
-       },
+/*
+ * the low frequency external clock reference
+ * Default case is 32.768kHz.
+ */
+static struct clk ckil_clk = {
+       .get_rate = get_rate_low_reference,
 };
 
-static struct clk lcdc_clk[] = {
-       {
-               .name = "lcdc_clk",
-               .parent = &per_clk[2],
-               .secondary = &lcdc_clk[1],
-               .round_rate = _clk_parent_round_rate,
-               .set_rate = _clk_parent_set_rate,
-       }, {
-               .name = "lcdc_ipg_clk",
-               .parent = &ipg_clk,
-               .secondary = &lcdc_clk[2],
-               .enable = _clk_enable,
-               .enable_reg = CCM_PCCR0,
-               .enable_shift = CCM_PCCR0_LCDC_OFFSET,
-               .disable = _clk_disable,
-       }, {
-               .name = "lcdc_ahb_clk",
-               .parent = &ahb_clk,
-               .enable = _clk_enable,
-               .enable_reg = CCM_PCCR1,
-               .enable_shift = CCM_PCCR1_HCLK_LCDC_OFFSET,
-               .disable = _clk_disable,
-       },
+/* Output of frequency pre multiplier */
+static struct clk fpm_clk = {
+       .parent = &ckil_clk,
+       .get_rate = get_rate_fpm,
 };
 
-static struct clk csi_clk[] = {
-       {
-               .name = "csi_perclk",
-               .parent = &per_clk[3],
-               .secondary = &csi_clk[1],
-               .round_rate = _clk_parent_round_rate,
-               .set_rate = _clk_parent_set_rate,
-       }, {
-               .name = "csi_ahb_clk",
-               .parent = &ahb_clk,
-               .enable = _clk_enable,
-               .enable_reg = CCM_PCCR1,
-               .enable_shift = CCM_PCCR1_HCLK_CSI_OFFSET,
-               .disable = _clk_disable,
-       },
-};
+#define PCCR0 CCM_PCCR0
+#define PCCR1 CCM_PCCR1
 
-static struct clk usb_clk[] = {
-       {
-               .name = "usb_clk",
-               .parent = &spll_clk,
-               .get_rate = _clk_usb_recalc,
-               .enable = _clk_enable,
-               .enable_reg = CCM_PCCR1,
-               .enable_shift = CCM_PCCR1_USBOTG_OFFSET,
-               .disable = _clk_disable,
-       }, {
-               .name = "usb_ahb_clk",
-               .parent = &ahb_clk,
-               .enable = _clk_enable,
-               .enable_reg = CCM_PCCR1,
-               .enable_shift = CCM_PCCR1_HCLK_USBOTG_OFFSET,
-               .disable = _clk_disable,
+#define DEFINE_CLOCK(name, i, er, es, gr, s, p)                \
+       static struct clk name = {                      \
+               .id             = i,                    \
+               .enable_reg     = er,                   \
+               .enable_shift   = es,                   \
+               .get_rate       = gr,                   \
+               .enable         = clk_pccr_enable,      \
+               .disable        = clk_pccr_disable,     \
+               .secondary      = s,                    \
+               .parent         = p,                    \
        }
-};
 
-static struct clk ssi1_clk[] = {
-       {
-               .name = "ssi_clk",
-               .id = 0,
-               .parent = &mpll_main_clk[1],
-               .secondary = &ssi1_clk[1],
-               .get_rate = _clk_ssi1_recalc,
-               .enable = _clk_enable,
-               .enable_reg = CCM_PCCR1,
-               .enable_shift = CCM_PCCR1_SSI1_BAUD_OFFSET,
-               .disable = _clk_disable,
-       }, {
-               .name = "ssi_ipg_clk",
-               .id = 0,
-               .parent = &ipg_clk,
-               .enable = _clk_enable,
-               .enable_reg = CCM_PCCR0,
-               .enable_shift = CCM_PCCR0_SSI1_IPG_OFFSET,
-               .disable = _clk_disable,
-       },
-};
+#define DEFINE_CLOCK1(name, i, er, es, getsetround, s, p)      \
+       static struct clk name = {                              \
+               .id             = i,                            \
+               .enable_reg     = er,                           \
+               .enable_shift   = es,                           \
+               .get_rate       = get_rate_##getsetround,       \
+               .set_rate       = set_rate_##getsetround,       \
+               .round_rate     = round_rate_##getsetround,     \
+               .enable         = clk_pccr_enable,              \
+               .disable        = clk_pccr_disable,             \
+               .secondary      = s,                            \
+               .parent         = p,                            \
+       }
 
-static struct clk ssi2_clk[] = {
-       {
-               .name = "ssi_clk",
-               .id = 1,
-               .parent = &mpll_main_clk[1],
-               .secondary = &ssi2_clk[1],
-               .get_rate = _clk_ssi2_recalc,
-               .enable = _clk_enable,
-               .enable_reg = CCM_PCCR1,
-               .enable_shift = CCM_PCCR1_SSI2_BAUD_OFFSET,
-               .disable = _clk_disable,
-       }, {
-               .name = "ssi_ipg_clk",
-               .id = 1,
-               .parent = &ipg_clk,
-               .enable = _clk_enable,
-               .enable_reg = CCM_PCCR0,
-               .enable_shift = CCM_PCCR0_SSI2_IPG_OFFSET,
-               .disable = _clk_disable,
+/* Forward declaration to keep the following list in order */
+static struct clk slcdc_clk1, sahara2_clk1, rtic_clk1, fec_clk1, emma_clk1,
+                 dma_clk1, lcdc_clk2, vpu_clk1;
+
+/* All clocks we can gate through PCCRx in the order of PCCRx bits */
+DEFINE_CLOCK(ssi2_clk1,    1, PCCR0,  0, NULL, NULL, &ipg_clk);
+DEFINE_CLOCK(ssi1_clk1,    0, PCCR0,  1, NULL, NULL, &ipg_clk);
+DEFINE_CLOCK(slcdc_clk,    0, PCCR0,  2, NULL, &slcdc_clk1, &ahb_clk);
+DEFINE_CLOCK(sdhc3_clk1,   0, PCCR0,  3, NULL, NULL, &ipg_clk);
+DEFINE_CLOCK(sdhc2_clk1,   0, PCCR0,  4, NULL, NULL, &ipg_clk);
+DEFINE_CLOCK(sdhc1_clk1,   0, PCCR0,  5, NULL, NULL, &ipg_clk);
+DEFINE_CLOCK(scc_clk,      0, PCCR0,  6, NULL, NULL, &ipg_clk);
+DEFINE_CLOCK(sahara2_clk,  0, PCCR0,  7, NULL, &sahara2_clk1, &ahb_clk);
+DEFINE_CLOCK(rtic_clk,     0, PCCR0,  8, NULL, &rtic_clk1, &ahb_clk);
+DEFINE_CLOCK(rtc_clk,      0, PCCR0,  9, NULL, NULL, &ipg_clk);
+DEFINE_CLOCK(pwm_clk1,     0, PCCR0, 11, NULL, NULL, &ipg_clk);
+DEFINE_CLOCK(owire_clk,    0, PCCR0, 12, NULL, NULL, &ipg_clk);
+DEFINE_CLOCK(mstick_clk1,  0, PCCR0, 13, NULL, NULL, &ipg_clk);
+DEFINE_CLOCK(lcdc_clk1,    0, PCCR0, 14, NULL, &lcdc_clk2, &ipg_clk);
+DEFINE_CLOCK(kpp_clk,      0, PCCR0, 15, NULL, NULL, &ipg_clk);
+DEFINE_CLOCK(iim_clk,      0, PCCR0, 16, NULL, NULL, &ipg_clk);
+DEFINE_CLOCK(i2c2_clk,     1, PCCR0, 17, NULL, NULL, &ipg_clk);
+DEFINE_CLOCK(i2c1_clk,     0, PCCR0, 18, NULL, NULL, &ipg_clk);
+DEFINE_CLOCK(gpt6_clk1,    0, PCCR0, 29, NULL, NULL, &ipg_clk);
+DEFINE_CLOCK(gpt5_clk1,    0, PCCR0, 20, NULL, NULL, &ipg_clk);
+DEFINE_CLOCK(gpt4_clk1,    0, PCCR0, 21, NULL, NULL, &ipg_clk);
+DEFINE_CLOCK(gpt3_clk1,    0, PCCR0, 22, NULL, NULL, &ipg_clk);
+DEFINE_CLOCK(gpt2_clk1,    0, PCCR0, 23, NULL, NULL, &ipg_clk);
+DEFINE_CLOCK(gpt1_clk1,    0, PCCR0, 24, NULL, NULL, &ipg_clk);
+DEFINE_CLOCK(gpio_clk,     0, PCCR0, 25, NULL, NULL, &ipg_clk);
+DEFINE_CLOCK(fec_clk,      0, PCCR0, 26, NULL, &fec_clk1, &ahb_clk);
+DEFINE_CLOCK(emma_clk,     0, PCCR0, 27, NULL, &emma_clk1, &ahb_clk);
+DEFINE_CLOCK(dma_clk,      0, PCCR0, 28, NULL, &dma_clk1, &ahb_clk);
+DEFINE_CLOCK(cspi13_clk1,  0, PCCR0, 29, NULL, NULL, &ipg_clk);
+DEFINE_CLOCK(cspi2_clk1,   0, PCCR0, 30, NULL, NULL, &ipg_clk);
+DEFINE_CLOCK(cspi1_clk1,   0, PCCR0, 31, NULL, NULL, &ipg_clk);
+
+DEFINE_CLOCK(mstick_clk,   0, PCCR1,  2, NULL, &mstick_clk1, &ipg_clk);
+DEFINE_CLOCK(nfc_clk,      0, PCCR1,  3, get_rate_nfc, NULL, &cpu_clk);
+DEFINE_CLOCK(ssi2_clk,     1, PCCR1,  4, get_rate_ssi2, &ssi2_clk1, &mpll_main2_clk);
+DEFINE_CLOCK(ssi1_clk,     0, PCCR1,  5, get_rate_ssi1, &ssi1_clk1, &mpll_main2_clk);
+DEFINE_CLOCK(vpu_clk,      0, PCCR1,  6, get_rate_vpu, &vpu_clk1, &mpll_main2_clk);
+DEFINE_CLOCK1(per4_clk,    3, PCCR1,  7, per, NULL, &mpll_main2_clk);
+DEFINE_CLOCK1(per3_clk,    2, PCCR1,  8, per, NULL, &mpll_main2_clk);
+DEFINE_CLOCK1(per2_clk,    1, PCCR1,  9, per, NULL, &mpll_main2_clk);
+DEFINE_CLOCK1(per1_clk,    0, PCCR1, 10, per, NULL, &mpll_main2_clk);
+DEFINE_CLOCK(usb_clk1,     0, PCCR1, 11, NULL, NULL, &ahb_clk);
+DEFINE_CLOCK(slcdc_clk1,   0, PCCR1, 12, NULL, NULL, &ahb_clk);
+DEFINE_CLOCK(sahara2_clk1, 0, PCCR1, 13, NULL, NULL, &ahb_clk);
+DEFINE_CLOCK(rtic_clk1,    0, PCCR1, 14, NULL, NULL, &ahb_clk);
+DEFINE_CLOCK(lcdc_clk2,    0, PCCR1, 15, NULL, NULL, &ahb_clk);
+DEFINE_CLOCK(vpu_clk1,     0, PCCR1, 16, NULL, NULL, &ahb_clk);
+DEFINE_CLOCK(fec_clk1,     0, PCCR1, 17, NULL, NULL, &ahb_clk);
+DEFINE_CLOCK(emma_clk1,    0, PCCR1, 18, NULL, NULL, &ahb_clk);
+DEFINE_CLOCK(emi_clk,      0, PCCR1, 19, NULL, NULL, &ahb_clk);
+DEFINE_CLOCK(dma_clk1,     0, PCCR1, 20, NULL, NULL, &ahb_clk);
+DEFINE_CLOCK(csi_clk1,     0, PCCR1, 21, NULL, NULL, &ahb_clk);
+DEFINE_CLOCK(brom_clk,     0, PCCR1, 22, NULL, NULL, &ahb_clk);
+DEFINE_CLOCK(ata_clk,      0, PCCR1, 23, NULL, NULL, &ahb_clk);
+DEFINE_CLOCK(wdog_clk,     0, PCCR1, 24, NULL, NULL, &ipg_clk);
+DEFINE_CLOCK(usb_clk,      0, PCCR1, 25, get_rate_usb, &usb_clk1, &spll_clk);
+DEFINE_CLOCK(uart6_clk1,   0, PCCR1, 26, NULL, NULL, &ipg_clk);
+DEFINE_CLOCK(uart5_clk1,   0, PCCR1, 27, NULL, NULL, &ipg_clk);
+DEFINE_CLOCK(uart4_clk1,   0, PCCR1, 28, NULL, NULL, &ipg_clk);
+DEFINE_CLOCK(uart3_clk1,   0, PCCR1, 29, NULL, NULL, &ipg_clk);
+DEFINE_CLOCK(uart2_clk1,   0, PCCR1, 30, NULL, NULL, &ipg_clk);
+DEFINE_CLOCK(uart1_clk1,   0, PCCR1, 31, NULL, NULL, &ipg_clk);
+
+/* Clocks we cannot directly gate, but drivers need their rates */
+DEFINE_CLOCK(cspi1_clk,    0, 0,      0, NULL, &cspi1_clk1, &per2_clk);
+DEFINE_CLOCK(cspi2_clk,    1, 0,      0, NULL, &cspi2_clk1, &per2_clk);
+DEFINE_CLOCK(cspi3_clk,    2, 0,      0, NULL, &cspi13_clk1, &per2_clk);
+DEFINE_CLOCK(sdhc1_clk,    0, 0,      0, NULL, &sdhc1_clk1, &per2_clk);
+DEFINE_CLOCK(sdhc2_clk,    1, 0,      0, NULL, &sdhc2_clk1, &per2_clk);
+DEFINE_CLOCK(sdhc3_clk,    2, 0,      0, NULL, &sdhc3_clk1, &per2_clk);
+DEFINE_CLOCK(pwm_clk,      0, 0,      0, NULL, &pwm_clk1, &per1_clk);
+DEFINE_CLOCK(gpt1_clk,     0, 0,      0, NULL, &gpt1_clk1, &per1_clk);
+DEFINE_CLOCK(gpt2_clk,     1, 0,      0, NULL, &gpt2_clk1, &per1_clk);
+DEFINE_CLOCK(gpt3_clk,     2, 0,      0, NULL, &gpt3_clk1, &per1_clk);
+DEFINE_CLOCK(gpt4_clk,     3, 0,      0, NULL, &gpt4_clk1, &per1_clk);
+DEFINE_CLOCK(gpt5_clk,     4, 0,      0, NULL, &gpt5_clk1, &per1_clk);
+DEFINE_CLOCK(gpt6_clk,     5, 0,      0, NULL, &gpt6_clk1, &per1_clk);
+DEFINE_CLOCK(uart1_clk,    0, 0,      0, NULL, &uart1_clk1, &per1_clk);
+DEFINE_CLOCK(uart2_clk,    1, 0,      0, NULL, &uart2_clk1, &per1_clk);
+DEFINE_CLOCK(uart3_clk,    2, 0,      0, NULL, &uart3_clk1, &per1_clk);
+DEFINE_CLOCK(uart4_clk,    3, 0,      0, NULL, &uart4_clk1, &per1_clk);
+DEFINE_CLOCK(uart5_clk,    4, 0,      0, NULL, &uart5_clk1, &per1_clk);
+DEFINE_CLOCK(uart6_clk,    5, 0,      0, NULL, &uart6_clk1, &per1_clk);
+DEFINE_CLOCK1(lcdc_clk,    0, 0,      0, parent, &lcdc_clk1, &per3_clk);
+DEFINE_CLOCK1(csi_clk,     0, 0,      0, parent, &csi_clk1, &per4_clk);
+
+#define _REGISTER_CLOCK(d, n, c) \
+       { \
+               .dev_id = d, \
+               .con_id = n, \
+               .clk = &c, \
        },
-};
-
-static struct clk nfc_clk = {
-       .name = "nfc_clk",
-       .parent = &cpu_clk,
-       .get_rate = _clk_nfc_recalc,
-       .enable = _clk_enable,
-       .enable_reg = CCM_PCCR1,
-       .enable_shift = CCM_PCCR1_NFC_BAUD_OFFSET,
-       .disable = _clk_disable,
-};
-
-static struct clk vpu_clk = {
-       .name = "vpu_clk",
-       .parent = &mpll_main_clk[1],
-       .get_rate = _clk_vpu_recalc,
-       .enable = _clk_vpu_enable,
-       .disable = _clk_vpu_disable,
-};
-
-static struct clk dma_clk = {
-       .name = "dma_clk",
-       .parent = &ahb_clk,
-       .enable = _clk_dma_enable,
-       .disable = _clk_dma_disable,
-};
-
-static struct clk rtic_clk = {
-       .name = "rtic_clk",
-       .parent = &ahb_clk,
-       .enable = _clk_rtic_enable,
-       .disable = _clk_rtic_disable,
-};
 
-static struct clk brom_clk = {
-       .name = "brom_clk",
-       .parent = &ahb_clk,
-       .enable = _clk_enable,
-       .enable_reg = CCM_PCCR1,
-       .enable_shift = CCM_PCCR1_HCLK_BROM_OFFSET,
-       .disable = _clk_disable,
-};
-
-static struct clk emma_clk = {
-       .name = "emma_clk",
-       .parent = &ahb_clk,
-       .enable = _clk_emma_enable,
-       .disable = _clk_emma_disable,
-};
-
-static struct clk slcdc_clk = {
-       .name = "slcdc_clk",
-       .parent = &ahb_clk,
-       .enable = _clk_slcdc_enable,
-       .disable = _clk_slcdc_disable,
-};
-
-static struct clk fec_clk = {
-       .name = "fec_clk",
-       .parent = &ahb_clk,
-       .enable = _clk_fec_enable,
-       .disable = _clk_fec_disable,
-};
-
-static struct clk emi_clk = {
-       .name = "emi_clk",
-       .parent = &ahb_clk,
-       .enable = _clk_enable,
-       .enable_reg = CCM_PCCR1,
-       .enable_shift = CCM_PCCR1_HCLK_EMI_OFFSET,
-       .disable = _clk_disable,
-};
-
-static struct clk sahara2_clk = {
-       .name = "sahara_clk",
-       .parent = &ahb_clk,
-       .enable = _clk_sahara2_enable,
-       .disable = _clk_sahara2_disable,
-};
-
-static struct clk ata_clk = {
-       .name = "ata_clk",
-       .parent = &ahb_clk,
-       .enable = _clk_enable,
-       .enable_reg = CCM_PCCR1,
-       .enable_shift = CCM_PCCR1_HCLK_ATA_OFFSET,
-       .disable = _clk_disable,
-};
-
-static struct clk mstick1_clk = {
-       .name = "mstick1_clk",
-       .parent = &ipg_clk,
-       .enable = _clk_mstick1_enable,
-       .disable = _clk_mstick1_disable,
-};
-
-static struct clk wdog_clk = {
-       .name = "wdog_clk",
-       .parent = &ipg_clk,
-       .enable = _clk_enable,
-       .enable_reg = CCM_PCCR1,
-       .enable_shift = CCM_PCCR1_WDT_OFFSET,
-       .disable = _clk_disable,
-};
-
-static struct clk gpio_clk = {
-       .name = "gpio_clk",
-       .parent = &ipg_clk,
-       .enable = _clk_enable,
-       .enable_reg = CCM_PCCR1,
-       .enable_shift = CCM_PCCR0_GPIO_OFFSET,
-       .disable = _clk_disable,
-};
-
-static struct clk i2c_clk[] = {
-       {
-               .name = "i2c_clk",
-               .id = 0,
-               .parent = &ipg_clk,
-               .enable = _clk_enable,
-               .enable_reg = CCM_PCCR0,
-               .enable_shift = CCM_PCCR0_I2C1_OFFSET,
-               .disable = _clk_disable,
-       }, {
-               .name = "i2c_clk",
-               .id = 1,
-               .parent = &ipg_clk,
-               .enable = _clk_enable,
-               .enable_reg = CCM_PCCR0,
-               .enable_shift = CCM_PCCR0_I2C2_OFFSET,
-               .disable = _clk_disable,
-       },
-};
-
-static struct clk iim_clk = {
-       .name = "iim_clk",
-       .parent = &ipg_clk,
-       .enable = _clk_enable,
-       .enable_reg = CCM_PCCR0,
-       .enable_shift = CCM_PCCR0_IIM_OFFSET,
-       .disable = _clk_disable,
-};
-
-static struct clk kpp_clk = {
-       .name = "kpp_clk",
-       .parent = &ipg_clk,
-       .enable = _clk_enable,
-       .enable_reg = CCM_PCCR0,
-       .enable_shift = CCM_PCCR0_KPP_OFFSET,
-       .disable = _clk_disable,
-};
-
-static struct clk owire_clk = {
-       .name = "owire_clk",
-       .parent = &ipg_clk,
-       .enable = _clk_enable,
-       .enable_reg = CCM_PCCR0,
-       .enable_shift = CCM_PCCR0_OWIRE_OFFSET,
-       .disable = _clk_disable,
-};
-
-static struct clk rtc_clk = {
-       .name = "rtc_clk",
-       .parent = &ipg_clk,
-       .enable = _clk_enable,
-       .enable_reg = CCM_PCCR0,
-       .enable_shift = CCM_PCCR0_RTC_OFFSET,
-       .disable = _clk_disable,
-};
-
-static struct clk scc_clk = {
-       .name = "scc_clk",
-       .parent = &ipg_clk,
-       .enable = _clk_enable,
-       .enable_reg = CCM_PCCR0,
-       .enable_shift = CCM_PCCR0_SCC_OFFSET,
-       .disable = _clk_disable,
-};
-
-static unsigned long _clk_clko_round_rate(struct clk *clk, unsigned long rate)
-{
-       u32 div;
-       unsigned long parent_rate;
-
-       parent_rate = clk_get_rate(clk->parent);
-       div = parent_rate / rate;
-       if (parent_rate % rate)
-               div++;
-
-       if (div > 8)
-               div = 8;
-
-       return parent_rate / div;
-}
-
-static int _clk_clko_set_rate(struct clk *clk, unsigned long rate)
-{
-       u32 reg;
-       u32 div;
-       unsigned long parent_rate;
-
-       parent_rate = clk_get_rate(clk->parent);
-
-       div = parent_rate / rate;
-
-       if (div > 8 || div < 1 || ((parent_rate / div) != rate))
-               return -EINVAL;
-       div--;
-
-       reg = __raw_readl(CCM_PCDR0) & ~CCM_PCDR0_CLKODIV_MASK;
-       reg |= div << CCM_PCDR0_CLKODIV_OFFSET;
-       __raw_writel(reg, CCM_PCDR0);
-
-       return 0;
-}
-
-static unsigned long _clk_clko_recalc(struct clk *clk)
-{
-       u32 div;
-       unsigned long parent_rate;
-
-       parent_rate = clk_get_rate(clk->parent);
-
-       div = __raw_readl(CCM_PCDR0) & CCM_PCDR0_CLKODIV_MASK >>
-               CCM_PCDR0_CLKODIV_OFFSET;
-       div++;
-
-       return parent_rate / div;
-}
-
-static int _clk_clko_set_parent(struct clk *clk, struct clk *parent)
-{
-       u32 reg;
-
-       reg = __raw_readl(CCM_CCSR) & ~CCM_CCSR_CLKOSEL_MASK;
-
-       if (parent == &ckil_clk)
-               reg |= 0 << CCM_CCSR_CLKOSEL_OFFSET;
-       else if (parent == &ckih_clk)
-               reg |= 2 << CCM_CCSR_CLKOSEL_OFFSET;
-       else if (parent == mpll_clk.parent)
-               reg |= 3 << CCM_CCSR_CLKOSEL_OFFSET;
-       else if (parent == spll_clk.parent)
-               reg |= 4 << CCM_CCSR_CLKOSEL_OFFSET;
-       else if (parent == &mpll_clk)
-               reg |= 5 << CCM_CCSR_CLKOSEL_OFFSET;
-       else if (parent == &spll_clk)
-               reg |= 6 << CCM_CCSR_CLKOSEL_OFFSET;
-       else if (parent == &cpu_clk)
-               reg |= 7 << CCM_CCSR_CLKOSEL_OFFSET;
-       else if (parent == &ahb_clk)
-               reg |= 8 << CCM_CCSR_CLKOSEL_OFFSET;
-       else if (parent == &ipg_clk)
-               reg |= 9 << CCM_CCSR_CLKOSEL_OFFSET;
-       else if (parent == &per_clk[0])
-               reg |= 0xA << CCM_CCSR_CLKOSEL_OFFSET;
-       else if (parent == &per_clk[1])
-               reg |= 0xB << CCM_CCSR_CLKOSEL_OFFSET;
-       else if (parent == &per_clk[2])
-               reg |= 0xC << CCM_CCSR_CLKOSEL_OFFSET;
-       else if (parent == &per_clk[3])
-               reg |= 0xD << CCM_CCSR_CLKOSEL_OFFSET;
-       else if (parent == &ssi1_clk[0])
-               reg |= 0xE << CCM_CCSR_CLKOSEL_OFFSET;
-       else if (parent == &ssi2_clk[0])
-               reg |= 0xF << CCM_CCSR_CLKOSEL_OFFSET;
-       else if (parent == &nfc_clk)
-               reg |= 0x10 << CCM_CCSR_CLKOSEL_OFFSET;
-       else if (parent == &mstick1_clk)
-               reg |= 0x11 << CCM_CCSR_CLKOSEL_OFFSET;
-       else if (parent == &vpu_clk)
-               reg |= 0x12 << CCM_CCSR_CLKOSEL_OFFSET;
-       else if (parent == &usb_clk[0])
-               reg |= 0x15 << CCM_CCSR_CLKOSEL_OFFSET;
-       else
-               return -EINVAL;
-
-       __raw_writel(reg, CCM_CCSR);
-
-       return 0;
-}
-
-static int _clk_clko_enable(struct clk *clk)
-{
-       u32 reg;
-
-       reg = __raw_readl(CCM_PCDR0) | CCM_PCDR0_CLKO_EN;
-       __raw_writel(reg, CCM_PCDR0);
-
-       return 0;
-}
-
-static void _clk_clko_disable(struct clk *clk)
-{
-       u32 reg;
-
-       reg = __raw_readl(CCM_PCDR0) & ~CCM_PCDR0_CLKO_EN;
-       __raw_writel(reg, CCM_PCDR0);
-}
-
-static struct clk clko_clk = {
-       .name = "clko_clk",
-       .get_rate = _clk_clko_recalc,
-       .set_rate = _clk_clko_set_rate,
-       .round_rate = _clk_clko_round_rate,
-       .set_parent = _clk_clko_set_parent,
-       .enable = _clk_clko_enable,
-       .disable = _clk_clko_disable,
-};
-
-static struct clk *mxc_clks[] = {
-       &ckih_clk,
-       &ckil_clk,
-       &mpll_clk,
-       &mpll_main_clk[0],
-       &mpll_main_clk[1],
-       &spll_clk,
-       &cpu_clk,
-       &ahb_clk,
-       &ipg_clk,
-       &per_clk[0],
-       &per_clk[1],
-       &per_clk[2],
-       &per_clk[3],
-       &clko_clk,
-       &uart1_clk[0],
-       &uart1_clk[1],
-       &uart2_clk[0],
-       &uart2_clk[1],
-       &uart3_clk[0],
-       &uart3_clk[1],
-       &uart4_clk[0],
-       &uart4_clk[1],
-       &uart5_clk[0],
-       &uart5_clk[1],
-       &uart6_clk[0],
-       &uart6_clk[1],
-       &gpt1_clk[0],
-       &gpt1_clk[1],
-       &gpt2_clk[0],
-       &gpt2_clk[1],
-       &gpt3_clk[0],
-       &gpt3_clk[1],
-       &gpt4_clk[0],
-       &gpt4_clk[1],
-       &gpt5_clk[0],
-       &gpt5_clk[1],
-       &gpt6_clk[0],
-       &gpt6_clk[1],
-       &pwm_clk[0],
-       &pwm_clk[1],
-       &sdhc1_clk[0],
-       &sdhc1_clk[1],
-       &sdhc2_clk[0],
-       &sdhc2_clk[1],
-       &sdhc3_clk[0],
-       &sdhc3_clk[1],
-       &cspi1_clk[0],
-       &cspi1_clk[1],
-       &cspi2_clk[0],
-       &cspi2_clk[1],
-       &cspi3_clk[0],
-       &cspi3_clk[1],
-       &lcdc_clk[0],
-       &lcdc_clk[1],
-       &lcdc_clk[2],
-       &csi_clk[0],
-       &csi_clk[1],
-       &usb_clk[0],
-       &usb_clk[1],
-       &ssi1_clk[0],
-       &ssi1_clk[1],
-       &ssi2_clk[0],
-       &ssi2_clk[1],
-       &nfc_clk,
-       &vpu_clk,
-       &dma_clk,
-       &rtic_clk,
-       &brom_clk,
-       &emma_clk,
-       &slcdc_clk,
-       &fec_clk,
-       &emi_clk,
-       &sahara2_clk,
-       &ata_clk,
-       &mstick1_clk,
-       &wdog_clk,
-       &gpio_clk,
-       &i2c_clk[0],
-       &i2c_clk[1],
-       &iim_clk,
-       &kpp_clk,
-       &owire_clk,
-       &rtc_clk,
-       &scc_clk,
-};
-
-void __init change_external_low_reference(unsigned long new_ref)
-{
-       external_low_reference = new_ref;
-}
-
-unsigned long __init clk_early_get_timer_rate(void)
-{
-       return clk_get_rate(&per_clk[0]);
-}
-
-static void __init probe_mxc_clocks(void)
-{
-       int i;
+static struct clk_lookup lookups[] __initdata = {
+       _REGISTER_CLOCK("imx-uart.0", NULL, uart1_clk)
+       _REGISTER_CLOCK("imx-uart.1", NULL, uart2_clk)
+       _REGISTER_CLOCK("imx-uart.2", NULL, uart3_clk)
+       _REGISTER_CLOCK("imx-uart.3", NULL, uart4_clk)
+       _REGISTER_CLOCK("imx-uart.4", NULL, uart5_clk)
+       _REGISTER_CLOCK("imx-uart.5", NULL, uart6_clk)
+       _REGISTER_CLOCK(NULL, "gpt1", gpt1_clk)
+       _REGISTER_CLOCK(NULL, "gpt2", gpt2_clk)
+       _REGISTER_CLOCK(NULL, "gpt3", gpt3_clk)
+       _REGISTER_CLOCK(NULL, "gpt4", gpt4_clk)
+       _REGISTER_CLOCK(NULL, "gpt5", gpt5_clk)
+       _REGISTER_CLOCK(NULL, "gpt6", gpt6_clk)
+       _REGISTER_CLOCK("mxc_pwm.0", NULL, pwm_clk)
+       _REGISTER_CLOCK("mxc-mmc.0", NULL, sdhc1_clk)
+       _REGISTER_CLOCK("mxc-mmc.1", NULL, sdhc2_clk)
+       _REGISTER_CLOCK("mxc-mmc.2", NULL, sdhc3_clk)
+       _REGISTER_CLOCK(NULL, "cspi1", cspi1_clk)
+       _REGISTER_CLOCK(NULL, "cspi2", cspi2_clk)
+       _REGISTER_CLOCK(NULL, "cspi3", cspi3_clk)
+       _REGISTER_CLOCK("imx-fb.0", NULL, lcdc_clk)
+       _REGISTER_CLOCK(NULL, "csi", csi_clk)
+       _REGISTER_CLOCK(NULL, "usb", usb_clk)
+       _REGISTER_CLOCK(NULL, "ssi1", ssi1_clk)
+       _REGISTER_CLOCK(NULL, "ssi2", ssi2_clk)
+       _REGISTER_CLOCK("mxc_nand.0", NULL, nfc_clk)
+       _REGISTER_CLOCK(NULL, "vpu", vpu_clk)
+       _REGISTER_CLOCK(NULL, "dma", dma_clk)
+       _REGISTER_CLOCK(NULL, "rtic", rtic_clk)
+       _REGISTER_CLOCK(NULL, "brom", brom_clk)
+       _REGISTER_CLOCK(NULL, "emma", emma_clk)
+       _REGISTER_CLOCK(NULL, "slcdc", slcdc_clk)
+       _REGISTER_CLOCK("fec.0", NULL, fec_clk)
+       _REGISTER_CLOCK(NULL, "emi", emi_clk)
+       _REGISTER_CLOCK(NULL, "sahara2", sahara2_clk)
+       _REGISTER_CLOCK(NULL, "ata", ata_clk)
+       _REGISTER_CLOCK(NULL, "mstick", mstick_clk)
+       _REGISTER_CLOCK(NULL, "wdog", wdog_clk)
+       _REGISTER_CLOCK(NULL, "gpio", gpio_clk)
+       _REGISTER_CLOCK("imx-i2c.0", NULL, i2c1_clk)
+       _REGISTER_CLOCK("imx-i2c.1", NULL, i2c2_clk)
+       _REGISTER_CLOCK(NULL, "iim", iim_clk)
+       _REGISTER_CLOCK(NULL, "kpp", kpp_clk)
+       _REGISTER_CLOCK("mxc_w1.0", NULL, owire_clk)
+       _REGISTER_CLOCK(NULL, "rtc", rtc_clk)
+       _REGISTER_CLOCK(NULL, "scc", scc_clk)
+};
+
+/* Adjust the clock path for TO2 and later */
+static void __init to2_adjust_clocks(void)
+{
+       unsigned long cscr = __raw_readl(CCM_CSCR);
 
        if (mx27_revision() >= CHIP_REV_2_0) {
-               if (CSCR() & 0x8000)
-                       cpu_clk.parent = &mpll_main_clk[0];
+               if (cscr & CCM_CSCR_ARM_SRC)
+                       cpu_clk.parent = &mpll_main1_clk;
 
-               if (!(CSCR() & 0x00800000))
-                       ssi2_clk[0].parent = &spll_clk;
+               if (!(cscr & CCM_CSCR_SSI2))
+                       ssi1_clk.parent = &spll_clk;
 
-               if (!(CSCR() & 0x00400000))
-                       ssi1_clk[0].parent = &spll_clk;
+               if (!(cscr & CCM_CSCR_SSI1))
+                       ssi1_clk.parent = &spll_clk;
 
-               if (!(CSCR() & 0x00200000))
+               if (!(cscr & CCM_CSCR_VPU))
                        vpu_clk.parent = &spll_clk;
        } else {
                cpu_clk.parent = &mpll_clk;
@@ -1565,11 +693,13 @@ static void __init probe_mxc_clocks(void)
                cpu_clk.set_rate = NULL;
                ahb_clk.parent = &mpll_clk;
 
-               for (i = 0; i < sizeof(per_clk) / sizeof(per_clk[0]); i++)
-                       per_clk[i].parent = &mpll_clk;
+               per1_clk.parent = &mpll_clk;
+               per2_clk.parent = &mpll_clk;
+               per3_clk.parent = &mpll_clk;
+               per4_clk.parent = &mpll_clk;
 
-               ssi1_clk[0].parent = &mpll_clk;
-               ssi2_clk[0].parent = &mpll_clk;
+               ssi1_clk.parent = &mpll_clk;
+               ssi2_clk.parent = &mpll_clk;
 
                vpu_clk.parent = &mpll_clk;
        }
@@ -1579,47 +709,47 @@ static void __init probe_mxc_clocks(void)
  * must be called very early to get information about the
  * available clock rate when the timer framework starts
  */
-int __init mxc_clocks_init(unsigned long fref)
+int __init mx27_clocks_init(unsigned long fref)
 {
-       u32 cscr;
-       struct clk **clkp;
+       u32 cscr = __raw_readl(CCM_CSCR);
+       int i;
 
        external_high_reference = fref;
 
-       /* detect clock reference for both system PLL */
-       cscr = CSCR();
+       /* detect clock reference for both system PLLs */
        if (cscr & CCM_CSCR_MCU)
                mpll_clk.parent = &ckih_clk;
        else
-               mpll_clk.parent = &ckil_clk;
+               mpll_clk.parent = &fpm_clk;
 
        if (cscr & CCM_CSCR_SP)
                spll_clk.parent = &ckih_clk;
        else
-               spll_clk.parent = &ckil_clk;
+               spll_clk.parent = &fpm_clk;
 
-       probe_mxc_clocks();
+       to2_adjust_clocks();
 
-       per_clk[0].enable(&per_clk[0]);
-       gpt1_clk[1].enable(&gpt1_clk[1]);
+       for (i = 0; i < ARRAY_SIZE(lookups); i++)
+               clkdev_add(&lookups[i]);
 
-       for (clkp = mxc_clks; clkp < mxc_clks + ARRAY_SIZE(mxc_clks); clkp++)
-               clk_register(*clkp);
+       /* Turn off all clocks we do not need */
+       __raw_writel(0, CCM_PCCR0);
+       __raw_writel((1 << 10) | (1 << 19), CCM_PCCR1);
 
-       /* Turn off all possible clocks */
-       __raw_writel(CCM_PCCR0_GPT1_MASK, CCM_PCCR0);
-       __raw_writel(CCM_PCCR1_PERCLK1_MASK | CCM_PCCR1_HCLK_EMI_MASK,
-                    CCM_PCCR1);
        spll_clk.disable(&spll_clk);
 
-       /* This will propagate to all children and init all the clock rates */
-
-       clk_enable(&emi_clk);
+       /* enable basic clocks */
+       clk_enable(&per1_clk);
        clk_enable(&gpio_clk);
+       clk_enable(&emi_clk);
        clk_enable(&iim_clk);
-       clk_enable(&gpt1_clk[0]);
+
 #ifdef CONFIG_DEBUG_LL_CONSOLE
-       clk_enable(&uart1_clk[0]);
+       clk_enable(&uart1_clk);
 #endif
+
+       mxc_timer_init(&gpt1_clk);
+
        return 0;
 }
+
index 239308fe6652323bd225a2267c786a21c4a0fe73..d9e3bf9644c9e46aefd629f751c9de15b883dc04 100644 (file)
 
 #include <mach/hardware.h>
 
-#include "crm_regs.h"
-
 static int cpu_silicon_rev = -1;
 static int cpu_partnumber;
 
+#define SYS_CHIP_ID             0x00    /* The offset of CHIP ID register */
+
 static void query_silicon_parameter(void)
 {
        u32 val;
index 94644cd0a0fc5c7c4a14fb9057918215ad10be7a..749de76b3f9537591511aa2da06ebce26e4326ae 100644 (file)
 #define CCM_PMCOUNT             (IO_ADDRESS(CCM_BASE_ADDR) + 0x30)
 #define CCM_WKGDCTL             (IO_ADDRESS(CCM_BASE_ADDR) + 0x34)
 
-#define CCM_CSCR_USB_OFFSET     28
-#define CCM_CSCR_USB_MASK       (0x7 << 28)
+#define CCM_CSCR_PRESC_OFFSET   29
+#define CCM_CSCR_PRESC_MASK     (0x7 << CCM_CSCR_PRESC_OFFSET)
+
+#define CCM_CSCR_USB_OFFSET     26
+#define CCM_CSCR_USB_MASK       (0x7 << CCM_CSCR_USB_OFFSET)
 #define CCM_CSCR_SD_OFFSET      24
-#define CCM_CSCR_SD_MASK        (0x3 << 24)
-#define CCM_CSCR_SSI2           (1 << 23)
-#define CCM_CSCR_SSI2_OFFSET    23
-#define CCM_CSCR_SSI1           (1 << 22)
-#define CCM_CSCR_SSI1_OFFSET    22
-#define CCM_CSCR_VPU           (1 << 21)
-#define CCM_CSCR_VPU_OFFSET    21
-#define CCM_CSCR_MSHC           (1 << 20)
-#define CCM_CSCR_SPLLRES        (1 << 19)
-#define CCM_CSCR_MPLLRES        (1 << 18)
+#define CCM_CSCR_SD_MASK        (0x3 << CCM_CSCR_SD_OFFSET)
+#define CCM_CSCR_SPLLRES        (1 << 22)
+#define CCM_CSCR_MPLLRES        (1 << 21)
+#define CCM_CSCR_SSI2_OFFSET    20
+#define CCM_CSCR_SSI2           (1 << CCM_CSCR_SSI2_OFFSET)
+#define CCM_CSCR_SSI1_OFFSET    19
+#define CCM_CSCR_SSI1           (1 << CCM_CSCR_SSI1_OFFSET)
+#define CCM_CSCR_FIR_OFFSET            18
+#define CCM_CSCR_FIR           (1 << CCM_CSCR_FIR_OFFSET)
 #define CCM_CSCR_SP             (1 << 17)
 #define CCM_CSCR_MCU            (1 << 16)
-/* CCM_CSCR_ARM_xxx just be avaliable on i.MX27 TO2*/
-#define CCM_CSCR_ARM_SRC        (1 << 15)
-#define CCM_CSCR_ARM_OFFSET     12
-#define CCM_CSCR_ARM_MASK       (0x3 << 12)
-/* CCM_CSCR_ARM_xxx just be avaliable on i.MX27 TO2*/
-#define CCM_CSCR_PRESC_OFFSET   13
-#define CCM_CSCR_PRESC_MASK     (0x7 << 13)
-#define CCM_CSCR_BCLK_OFFSET    9
-#define CCM_CSCR_BCLK_MASK      (0xf << 9)
-#define CCM_CSCR_IPDIV_OFFSET   8
-#define CCM_CSCR_IPDIV          (1 << 8)
-/* CCM_CSCR_AHB_xxx just be avaliable on i.MX27 TO2*/
-#define CCM_CSCR_AHB_OFFSET     8
-#define CCM_CSCR_AHB_MASK       (0x3 << 8)
-/* CCM_CSCR_AHB_xxx just be avaliable on i.MX27 TO2*/
+#define CCM_CSCR_BCLK_OFFSET   10
+#define CCM_CSCR_BCLK_MASK      (0xf << CCM_CSCR_BCLK_OFFSET)
+#define CCM_CSCR_IPDIV_OFFSET   9
+#define CCM_CSCR_IPDIV          (1 << CCM_CSCR_IPDIV_OFFSET)
+
 #define CCM_CSCR_OSC26MDIV      (1 << 4)
 #define CCM_CSCR_OSC26M         (1 << 3)
 #define CCM_CSCR_FPM            (1 << 2)
 #define CCM_CSCR_SPEN           (1 << 1)
 #define CCM_CSCR_MPEN           1
 
+
+
 #define CCM_MPCTL0_CPLM         (1 << 31)
 #define CCM_MPCTL0_PD_OFFSET    26
 #define CCM_MPCTL0_PD_MASK      (0xf << 26)
 
 #define CCM_PCDR0_SSI2BAUDDIV_OFFSET    26
 #define CCM_PCDR0_SSI2BAUDDIV_MASK      (0x3f << 26)
-#define CCM_PCDR0_CLKO_EN               25
-#define CCM_PCDR0_CLKODIV_OFFSET        22
-#define CCM_PCDR0_CLKODIV_MASK          (0x7 << 22)
 #define CCM_PCDR0_SSI1BAUDDIV_OFFSET    16
 #define CCM_PCDR0_SSI1BAUDDIV_MASK      (0x3f << 16)
-/*The difinition for i.MX27 TO2*/
-#define CCM_PCDR0_VPUDIV2_OFFSET        10
-#define CCM_PCDR0_VPUDIV2_MASK          (0x3f << 10)
-#define CCM_PCDR0_NFCDIV2_OFFSET         6
-#define CCM_PCDR0_NFCDIV2_MASK           (0xf << 6)
-#define CCM_PCDR0_MSHCDIV2_MASK          0x3f
-/*The difinition for i.MX27 TO2*/
 #define CCM_PCDR0_NFCDIV_OFFSET         12
 #define CCM_PCDR0_NFCDIV_MASK           (0xf << 12)
-#define CCM_PCDR0_VPUDIV_OFFSET        8
-#define CCM_PCDR0_VPUDIV_MASK          (0xf << 8)
-#define CCM_PCDR0_MSHCDIV_OFFSET        0
-#define CCM_PCDR0_MSHCDIV_MASK          0x1f
-
+#define CCM_PCDR0_48MDIV_OFFSET                5
+#define CCM_PCDR0_48MDIV_MASK          (0x7 << CCM_PCDR0_48MDIV_OFFSET)
+#define CCM_PCDR0_FIRIDIV_OFFSET       0
+#define CCM_PCDR0_FIRIDIV_MASK         0x1f
 #define CCM_PCDR1_PERDIV4_OFFSET        24
 #define CCM_PCDR1_PERDIV4_MASK          (0x3f << 24)
 #define CCM_PCDR1_PERDIV3_OFFSET        16
 #define CCM_PCDR1_PERDIV1_OFFSET        0
 #define CCM_PCDR1_PERDIV1_MASK          0x3f
 
-#define CCM_PCCR0_CSPI1_OFFSET          31
-#define CCM_PCCR0_CSPI1_MASK            (1 << 31)
-#define CCM_PCCR0_CSPI2_OFFSET          30
-#define CCM_PCCR0_CSPI2_MASK            (1 << 30)
-#define CCM_PCCR0_CSPI3_OFFSET          29
-#define CCM_PCCR0_CSPI3_MASK            (1 << 29)
-#define CCM_PCCR0_DMA_OFFSET            28
-#define CCM_PCCR0_DMA_MASK              (1 << 28)
-#define CCM_PCCR0_EMMA_OFFSET           27
-#define CCM_PCCR0_EMMA_MASK             (1 << 27)
-#define CCM_PCCR0_FEC_OFFSET            26
-#define CCM_PCCR0_FEC_MASK              (1 << 26)
-#define CCM_PCCR0_GPIO_OFFSET           25
-#define CCM_PCCR0_GPIO_MASK             (1 << 25)
-#define CCM_PCCR0_GPT1_OFFSET           24
-#define CCM_PCCR0_GPT1_MASK             (1 << 24)
-#define CCM_PCCR0_GPT2_OFFSET           23
-#define CCM_PCCR0_GPT2_MASK             (1 << 23)
-#define CCM_PCCR0_GPT3_OFFSET           22
-#define CCM_PCCR0_GPT3_MASK             (1 << 22)
-#define CCM_PCCR0_GPT4_OFFSET           21
-#define CCM_PCCR0_GPT4_MASK             (1 << 21)
-#define CCM_PCCR0_GPT5_OFFSET           20
-#define CCM_PCCR0_GPT5_MASK             (1 << 20)
-#define CCM_PCCR0_GPT6_OFFSET           19
-#define CCM_PCCR0_GPT6_MASK             (1 << 19)
-#define CCM_PCCR0_I2C1_OFFSET           18
-#define CCM_PCCR0_I2C1_MASK             (1 << 18)
-#define CCM_PCCR0_I2C2_OFFSET           17
-#define CCM_PCCR0_I2C2_MASK             (1 << 17)
-#define CCM_PCCR0_IIM_OFFSET            16
-#define CCM_PCCR0_IIM_MASK              (1 << 16)
-#define CCM_PCCR0_KPP_OFFSET            15
-#define CCM_PCCR0_KPP_MASK              (1 << 15)
-#define CCM_PCCR0_LCDC_OFFSET           14
-#define CCM_PCCR0_LCDC_MASK             (1 << 14)
-#define CCM_PCCR0_MSHC_OFFSET           13
-#define CCM_PCCR0_MSHC_MASK             (1 << 13)
-#define CCM_PCCR0_OWIRE_OFFSET          12
-#define CCM_PCCR0_OWIRE_MASK            (1 << 12)
-#define CCM_PCCR0_PWM_OFFSET            11
-#define CCM_PCCR0_PWM_MASK              (1 << 11)
-#define CCM_PCCR0_RTC_OFFSET            9
-#define CCM_PCCR0_RTC_MASK              (1 << 9)
-#define CCM_PCCR0_RTIC_OFFSET           8
-#define CCM_PCCR0_RTIC_MASK             (1 << 8)
-#define CCM_PCCR0_SAHARA_OFFSET         7
-#define CCM_PCCR0_SAHARA_MASK           (1 << 7)
-#define CCM_PCCR0_SCC_OFFSET            6
-#define CCM_PCCR0_SCC_MASK              (1 << 6)
-#define CCM_PCCR0_SDHC1_OFFSET          5
-#define CCM_PCCR0_SDHC1_MASK            (1 << 5)
-#define CCM_PCCR0_SDHC2_OFFSET          4
-#define CCM_PCCR0_SDHC2_MASK            (1 << 4)
-#define CCM_PCCR0_SDHC3_OFFSET          3
-#define CCM_PCCR0_SDHC3_MASK            (1 << 3)
-#define CCM_PCCR0_SLCDC_OFFSET          2
-#define CCM_PCCR0_SLCDC_MASK            (1 << 2)
-#define CCM_PCCR0_SSI1_IPG_OFFSET       1
-#define CCM_PCCR0_SSI1_IPG_MASK         (1 << 1)
-#define CCM_PCCR0_SSI2_IPG_OFFSET       0
-#define CCM_PCCR0_SSI2_IPG_MASK         (1 << 0)
+#define CCM_PCCR_HCLK_CSI_OFFSET               31
+#define CCM_PCCR_HCLK_CSI_REG          CCM_PCCR0
+#define CCM_PCCR_HCLK_DMA_OFFSET               30
+#define CCM_PCCR_HCLK_DMA_REG          CCM_PCCR0
+#define CCM_PCCR_HCLK_BROM_OFFSET              28
+#define CCM_PCCR_HCLK_BROM_REG         CCM_PCCR0
+#define CCM_PCCR_HCLK_EMMA_OFFSET              27
+#define CCM_PCCR_HCLK_EMMA_REG         CCM_PCCR0
+#define CCM_PCCR_HCLK_LCDC_OFFSET              26
+#define CCM_PCCR_HCLK_LCDC_REG         CCM_PCCR0
+#define CCM_PCCR_HCLK_SLCDC_OFFSET             25
+#define CCM_PCCR_HCLK_SLCDC_REG                CCM_PCCR0
+#define CCM_PCCR_HCLK_USBOTG_OFFSET            24
+#define CCM_PCCR_HCLK_USBOTG_REG       CCM_PCCR0
+#define CCM_PCCR_HCLK_BMI_OFFSET       23
+#define CCM_PCCR_BMI_MASK              (1 << CCM_PCCR_BMI_MASK)
+#define CCM_PCCR_HCLK_BMI_REG          CCM_PCCR0
+#define CCM_PCCR_PERCLK4_OFFSET                22
+#define CCM_PCCR_PERCLK4_REG           CCM_PCCR0
+#define CCM_PCCR_SLCDC_OFFSET                  21
+#define CCM_PCCR_SLCDC_REG             CCM_PCCR0
+#define CCM_PCCR_FIRI_BAUD_OFFSET       20
+#define CCM_PCCR_FIRI_BAUD_MASK         (1 << CCM_PCCR_FIRI_BAUD_MASK)
+#define CCM_PCCR_FIRI_BAUD_REG         CCM_PCCR0
+#define CCM_PCCR_NFC_OFFSET            19
+#define CCM_PCCR_NFC_REG               CCM_PCCR0
+#define CCM_PCCR_LCDC_OFFSET                   18
+#define CCM_PCCR_LCDC_REG              CCM_PCCR0
+#define CCM_PCCR_SSI1_BAUD_OFFSET              17
+#define CCM_PCCR_SSI1_BAUD_REG         CCM_PCCR0
+#define CCM_PCCR_SSI2_BAUD_OFFSET              16
+#define CCM_PCCR_SSI2_BAUD_REG         CCM_PCCR0
+#define CCM_PCCR_EMMA_OFFSET                   15
+#define CCM_PCCR_EMMA_REG              CCM_PCCR0
+#define CCM_PCCR_USBOTG_OFFSET                 14
+#define CCM_PCCR_USBOTG_REG            CCM_PCCR0
+#define CCM_PCCR_DMA_OFFSET                    13
+#define CCM_PCCR_DMA_REG               CCM_PCCR0
+#define CCM_PCCR_I2C1_OFFSET                   12
+#define CCM_PCCR_I2C1_REG              CCM_PCCR0
+#define CCM_PCCR_GPIO_OFFSET                   11
+#define CCM_PCCR_GPIO_REG              CCM_PCCR0
+#define CCM_PCCR_SDHC2_OFFSET                  10
+#define CCM_PCCR_SDHC2_REG             CCM_PCCR0
+#define CCM_PCCR_SDHC1_OFFSET                  9
+#define CCM_PCCR_SDHC1_REG             CCM_PCCR0
+#define CCM_PCCR_FIRI_OFFSET           8
+#define CCM_PCCR_FIRI_MASK             (1 << CCM_PCCR_BAUD_MASK)
+#define CCM_PCCR_FIRI_REG              CCM_PCCR0
+#define CCM_PCCR_SSI2_IPG_OFFSET               7
+#define CCM_PCCR_SSI2_REG              CCM_PCCR0
+#define CCM_PCCR_SSI1_IPG_OFFSET               6
+#define CCM_PCCR_SSI1_REG              CCM_PCCR0
+#define CCM_PCCR_CSPI2_OFFSET          5
+#define        CCM_PCCR_CSPI2_REG              CCM_PCCR0
+#define CCM_PCCR_CSPI1_OFFSET          4
+#define        CCM_PCCR_CSPI1_REG              CCM_PCCR0
+#define CCM_PCCR_UART4_OFFSET                  3
+#define CCM_PCCR_UART4_REG             CCM_PCCR0
+#define CCM_PCCR_UART3_OFFSET                  2
+#define CCM_PCCR_UART3_REG             CCM_PCCR0
+#define CCM_PCCR_UART2_OFFSET                  1
+#define CCM_PCCR_UART2_REG             CCM_PCCR0
+#define CCM_PCCR_UART1_OFFSET                  0
+#define CCM_PCCR_UART1_REG             CCM_PCCR0
+
+#define CCM_PCCR_OWIRE_OFFSET                  31
+#define CCM_PCCR_OWIRE_REG             CCM_PCCR1
+#define CCM_PCCR_KPP_OFFSET                    30
+#define CCM_PCCR_KPP_REG               CCM_PCCR1
+#define CCM_PCCR_RTC_OFFSET                    29
+#define CCM_PCCR_RTC_REG               CCM_PCCR1
+#define CCM_PCCR_PWM_OFFSET                    28
+#define CCM_PCCR_PWM_REG               CCM_PCCR1
+#define CCM_PCCR_GPT3_OFFSET                   27
+#define CCM_PCCR_GPT3_REG              CCM_PCCR1
+#define CCM_PCCR_GPT2_OFFSET                   26
+#define CCM_PCCR_GPT2_REG              CCM_PCCR1
+#define CCM_PCCR_GPT1_OFFSET                   25
+#define CCM_PCCR_GPT1_REG              CCM_PCCR1
+#define CCM_PCCR_WDT_OFFSET                    24
+#define CCM_PCCR_WDT_REG               CCM_PCCR1
+#define CCM_PCCR_CSPI3_OFFSET          23
+#define        CCM_PCCR_CSPI3_REG              CCM_PCCR1
+
+#define CCM_PCCR_CSPI1_MASK                    (1 << CCM_PCCR_CSPI1_OFFSET)
+#define CCM_PCCR_CSPI2_MASK                    (1 << CCM_PCCR_CSPI2_OFFSET)
+#define CCM_PCCR_CSPI3_MASK                    (1 << CCM_PCCR_CSPI3_OFFSET)
+#define CCM_PCCR_DMA_MASK                      (1 << CCM_PCCR_DMA_OFFSET)
+#define CCM_PCCR_EMMA_MASK                     (1 << CCM_PCCR_EMMA_OFFSET)
+#define CCM_PCCR_GPIO_MASK                     (1 << CCM_PCCR_GPIO_OFFSET)
+#define CCM_PCCR_GPT1_MASK                     (1 << CCM_PCCR_GPT1_OFFSET)
+#define CCM_PCCR_GPT2_MASK                     (1 << CCM_PCCR_GPT2_OFFSET)
+#define CCM_PCCR_GPT3_MASK                     (1 << CCM_PCCR_GPT3_OFFSET)
+#define CCM_PCCR_HCLK_BROM_MASK                (1 << CCM_PCCR_HCLK_BROM_OFFSET)
+#define CCM_PCCR_HCLK_CSI_MASK                 (1 << CCM_PCCR_HCLK_CSI_OFFSET)
+#define CCM_PCCR_HCLK_DMA_MASK                 (1 << CCM_PCCR_HCLK_DMA_OFFSET)
+#define CCM_PCCR_HCLK_EMMA_MASK                (1 << CCM_PCCR_HCLK_EMMA_OFFSET)
+#define CCM_PCCR_HCLK_LCDC_MASK                (1 << CCM_PCCR_HCLK_LCDC_OFFSET)
+#define CCM_PCCR_HCLK_SLCDC_MASK               (1 << CCM_PCCR_HCLK_SLCDC_OFFSET)
+#define CCM_PCCR_HCLK_USBOTG_MASK              (1 << CCM_PCCR_HCLK_USBOTG_OFFSET)
+#define CCM_PCCR_I2C1_MASK                     (1 << CCM_PCCR_I2C1_OFFSET)
+#define CCM_PCCR_KPP_MASK                      (1 << CCM_PCCR_KPP_OFFSET)
+#define CCM_PCCR_LCDC_MASK                     (1 << CCM_PCCR_LCDC_OFFSET)
+#define CCM_PCCR_NFC_MASK              (1 << CCM_PCCR_NFC_OFFSET)
+#define CCM_PCCR_OWIRE_MASK                    (1 << CCM_PCCR_OWIRE_OFFSET)
+#define CCM_PCCR_PERCLK4_MASK                  (1 << CCM_PCCR_PERCLK4_OFFSET)
+#define CCM_PCCR_PWM_MASK                      (1 << CCM_PCCR_PWM_OFFSET)
+#define CCM_PCCR_RTC_MASK                      (1 << CCM_PCCR_RTC_OFFSET)
+#define CCM_PCCR_SDHC1_MASK                    (1 << CCM_PCCR_SDHC1_OFFSET)
+#define CCM_PCCR_SDHC2_MASK                    (1 << CCM_PCCR_SDHC2_OFFSET)
+#define CCM_PCCR_SLCDC_MASK                    (1 << CCM_PCCR_SLCDC_OFFSET)
+#define CCM_PCCR_SSI1_BAUD_MASK                (1 << CCM_PCCR_SSI1_BAUD_OFFSET)
+#define CCM_PCCR_SSI1_IPG_MASK                 (1 << CCM_PCCR_SSI1_IPG_OFFSET)
+#define CCM_PCCR_SSI2_BAUD_MASK                (1 << CCM_PCCR_SSI2_BAUD_OFFSET)
+#define CCM_PCCR_SSI2_IPG_MASK                 (1 << CCM_PCCR_SSI2_IPG_OFFSET)
+#define CCM_PCCR_UART1_MASK                    (1 << CCM_PCCR_UART1_OFFSET)
+#define CCM_PCCR_UART2_MASK                    (1 << CCM_PCCR_UART2_OFFSET)
+#define CCM_PCCR_UART3_MASK                    (1 << CCM_PCCR_UART3_OFFSET)
+#define CCM_PCCR_UART4_MASK                    (1 << CCM_PCCR_UART4_OFFSET)
+#define CCM_PCCR_USBOTG_MASK                   (1 << CCM_PCCR_USBOTG_OFFSET)
+#define CCM_PCCR_WDT_MASK                      (1 << CCM_PCCR_WDT_OFFSET)
 
-#define CCM_PCCR1_UART1_OFFSET          31
-#define CCM_PCCR1_UART1_MASK            (1 << 31)
-#define CCM_PCCR1_UART2_OFFSET          30
-#define CCM_PCCR1_UART2_MASK            (1 << 30)
-#define CCM_PCCR1_UART3_OFFSET          29
-#define CCM_PCCR1_UART3_MASK            (1 << 29)
-#define CCM_PCCR1_UART4_OFFSET          28
-#define CCM_PCCR1_UART4_MASK            (1 << 28)
-#define CCM_PCCR1_UART5_OFFSET          27
-#define CCM_PCCR1_UART5_MASK            (1 << 27)
-#define CCM_PCCR1_UART6_OFFSET          26
-#define CCM_PCCR1_UART6_MASK            (1 << 26)
-#define CCM_PCCR1_USBOTG_OFFSET         25
-#define CCM_PCCR1_USBOTG_MASK           (1 << 25)
-#define CCM_PCCR1_WDT_OFFSET            24
-#define CCM_PCCR1_WDT_MASK              (1 << 24)
-#define CCM_PCCR1_HCLK_ATA_OFFSET       23
-#define CCM_PCCR1_HCLK_ATA_MASK         (1 << 23)
-#define CCM_PCCR1_HCLK_BROM_OFFSET      22
-#define CCM_PCCR1_HCLK_BROM_MASK        (1 << 22)
-#define CCM_PCCR1_HCLK_CSI_OFFSET       21
-#define CCM_PCCR1_HCLK_CSI_MASK         (1 << 21)
-#define CCM_PCCR1_HCLK_DMA_OFFSET       20
-#define CCM_PCCR1_HCLK_DMA_MASK         (1 << 20)
-#define CCM_PCCR1_HCLK_EMI_OFFSET       19
-#define CCM_PCCR1_HCLK_EMI_MASK         (1 << 19)
-#define CCM_PCCR1_HCLK_EMMA_OFFSET      18
-#define CCM_PCCR1_HCLK_EMMA_MASK        (1 << 18)
-#define CCM_PCCR1_HCLK_FEC_OFFSET       17
-#define CCM_PCCR1_HCLK_FEC_MASK         (1 << 17)
-#define CCM_PCCR1_HCLK_VPU_OFFSET       16
-#define CCM_PCCR1_HCLK_VPU_MASK         (1 << 16)
-#define CCM_PCCR1_HCLK_LCDC_OFFSET      15
-#define CCM_PCCR1_HCLK_LCDC_MASK        (1 << 15)
-#define CCM_PCCR1_HCLK_RTIC_OFFSET      14
-#define CCM_PCCR1_HCLK_RTIC_MASK        (1 << 14)
-#define CCM_PCCR1_HCLK_SAHARA_OFFSET    13
-#define CCM_PCCR1_HCLK_SAHARA_MASK      (1 << 13)
-#define CCM_PCCR1_HCLK_SLCDC_OFFSET     12
-#define CCM_PCCR1_HCLK_SLCDC_MASK       (1 << 12)
-#define CCM_PCCR1_HCLK_USBOTG_OFFSET    11
-#define CCM_PCCR1_HCLK_USBOTG_MASK      (1 << 11)
-#define CCM_PCCR1_PERCLK1_OFFSET        10
-#define CCM_PCCR1_PERCLK1_MASK          (1 << 10)
-#define CCM_PCCR1_PERCLK2_OFFSET        9
-#define CCM_PCCR1_PERCLK2_MASK          (1 << 9)
-#define CCM_PCCR1_PERCLK3_OFFSET        8
-#define CCM_PCCR1_PERCLK3_MASK          (1 << 8)
-#define CCM_PCCR1_PERCLK4_OFFSET        7
-#define CCM_PCCR1_PERCLK4_MASK          (1 << 7)
-#define CCM_PCCR1_VPU_BAUD_OFFSET       6
-#define CCM_PCCR1_VPU_BAUD_MASK         (1 << 6)
-#define CCM_PCCR1_SSI1_BAUD_OFFSET      5
-#define CCM_PCCR1_SSI1_BAUD_MASK        (1 << 5)
-#define CCM_PCCR1_SSI2_BAUD_OFFSET      4
-#define CCM_PCCR1_SSI2_BAUD_MASK        (1 << 4)
-#define CCM_PCCR1_NFC_BAUD_OFFSET       3
-#define CCM_PCCR1_NFC_BAUD_MASK         (1 << 3)
-#define CCM_PCCR1_MSHC_BAUD_OFFSET      2
-#define CCM_PCCR1_MSHC_BAUD_MASK        (1 << 2)
 
 #define CCM_CCSR_32KSR          (1 << 15)
+
 #define CCM_CCSR_CLKMODE1       (1 << 9)
 #define CCM_CCSR_CLKMODE0       (1 << 8)
+
 #define CCM_CCSR_CLKOSEL_OFFSET 0
 #define CCM_CCSR_CLKOSEL_MASK   0x1f
 
index 2f9240be1c769203fe15804fb9e3b3f441e04ef1..f81aa8a8fbb4e2917aafcb3529a55c620c33d7f3 100644 (file)
 
 #include <mach/irqs.h>
 #include <mach/hardware.h>
+#include <mach/common.h>
+#include <mach/mmc.h>
+
+#include "devices.h"
 
 /*
  * Resource definition for the MXC IrDA
@@ -225,37 +229,217 @@ struct platform_device mxc_nand_device = {
        .resource = mxc_nand_resources,
 };
 
+#ifdef CONFIG_FB_IMX
+/*
+ * lcdc:
+ * - i.MX1: the basic controller
+ * - i.MX21: to be checked
+ * - i.MX27: like i.MX1, with slightly variations
+ */
+static struct resource mxc_fb[] = {
+       {
+               .start = LCDC_BASE_ADDR,
+               .end   = LCDC_BASE_ADDR + 0xFFF,
+               .flags = IORESOURCE_MEM,
+       },
+       {
+               .start = MXC_INT_LCDC,
+               .end   = MXC_INT_LCDC,
+               .flags = IORESOURCE_IRQ,
+       }
+};
+
+/* mxc lcd driver */
+struct platform_device mxc_fb_device = {
+       .name = "imx-fb",
+       .id = 0,
+       .num_resources = ARRAY_SIZE(mxc_fb),
+       .resource = mxc_fb,
+       .dev = {
+               .coherent_dma_mask = 0xFFFFFFFF,
+       },
+};
+#endif
+
+#ifdef CONFIG_MACH_MX27
+static struct resource mxc_fec_resources[] = {
+       {
+               .start  = FEC_BASE_ADDR,
+               .end    = FEC_BASE_ADDR + 0xfff,
+               .flags  = IORESOURCE_MEM
+       }, {
+               .start  = MXC_INT_FEC,
+               .end    = MXC_INT_FEC,
+               .flags  = IORESOURCE_IRQ
+       },
+};
+
+struct platform_device mxc_fec_device = {
+       .name = "fec",
+       .id = 0,
+       .num_resources = ARRAY_SIZE(mxc_fec_resources),
+       .resource = mxc_fec_resources,
+};
+#endif
+
+static struct resource mxc_i2c_1_resources[] = {
+       [0] = {
+               .start  = I2C_BASE_ADDR,
+               .end    = I2C_BASE_ADDR + 0x0fff,
+               .flags  = IORESOURCE_MEM
+       },
+       [1] = {
+               .start  = MXC_INT_I2C,
+               .end    = MXC_INT_I2C,
+               .flags  = IORESOURCE_IRQ
+       }
+};
+
+struct platform_device mxc_i2c_device0 = {
+       .name = "imx-i2c",
+       .id = 0,
+       .num_resources = ARRAY_SIZE(mxc_i2c_1_resources),
+       .resource = mxc_i2c_1_resources
+};
+
+#ifdef CONFIG_MACH_MX27
+static struct resource mxc_i2c_2_resources[] = {
+       [0] = {
+               .start  = I2C2_BASE_ADDR,
+               .end    = I2C2_BASE_ADDR + 0x0fff,
+               .flags  = IORESOURCE_MEM
+       },
+       [1] = {
+               .start  = MXC_INT_I2C2,
+               .end    = MXC_INT_I2C2,
+               .flags  = IORESOURCE_IRQ
+       }
+};
+
+struct platform_device mxc_i2c_device1 = {
+       .name = "imx-i2c",
+       .id = 1,
+       .num_resources = ARRAY_SIZE(mxc_i2c_2_resources),
+       .resource = mxc_i2c_2_resources
+};
+#endif
+
+static struct resource mxc_pwm_resources[] = {
+       [0] = {
+               .start  = PWM_BASE_ADDR,
+               .end    = PWM_BASE_ADDR + 0x0fff,
+               .flags  = IORESOURCE_MEM
+       },
+       [1] = {
+               .start   = MXC_INT_PWM,
+               .end     = MXC_INT_PWM,
+               .flags   = IORESOURCE_IRQ,
+       }
+};
+
+struct platform_device mxc_pwm_device = {
+       .name = "mxc_pwm",
+       .id = 0,
+       .num_resources = ARRAY_SIZE(mxc_pwm_resources),
+       .resource = mxc_pwm_resources
+};
+
+/*
+ * Resource definition for the MXC SDHC
+ */
+static struct resource mxc_sdhc1_resources[] = {
+       [0] = {
+                       .start = SDHC1_BASE_ADDR,
+                       .end   = SDHC1_BASE_ADDR + SZ_4K - 1,
+                       .flags = IORESOURCE_MEM,
+                       },
+       [1] = {
+                       .start = MXC_INT_SDHC1,
+                       .end   = MXC_INT_SDHC1,
+                       .flags = IORESOURCE_IRQ,
+                       },
+       [2] = {
+                       .start  = DMA_REQ_SDHC1,
+                       .end    = DMA_REQ_SDHC1,
+                       .flags  = IORESOURCE_DMA
+               },
+};
+
+static u64 mxc_sdhc1_dmamask = 0xffffffffUL;
+
+struct platform_device mxc_sdhc_device0 = {
+       .name           = "mxc-mmc",
+       .id             = 0,
+       .dev            = {
+               .dma_mask = &mxc_sdhc1_dmamask,
+               .coherent_dma_mask = 0xffffffff,
+       },
+       .num_resources  = ARRAY_SIZE(mxc_sdhc1_resources),
+       .resource       = mxc_sdhc1_resources,
+};
+
+static struct resource mxc_sdhc2_resources[] = {
+       [0] = {
+                       .start = SDHC2_BASE_ADDR,
+                       .end   = SDHC2_BASE_ADDR + SZ_4K - 1,
+                       .flags = IORESOURCE_MEM,
+                       },
+       [1] = {
+                       .start = MXC_INT_SDHC2,
+                       .end   = MXC_INT_SDHC2,
+                       .flags = IORESOURCE_IRQ,
+                       },
+       [2] = {
+                       .start  = DMA_REQ_SDHC2,
+                       .end    = DMA_REQ_SDHC2,
+                       .flags  = IORESOURCE_DMA
+               },
+};
+
+static u64 mxc_sdhc2_dmamask = 0xffffffffUL;
+
+struct platform_device mxc_sdhc_device1 = {
+       .name           = "mxc-mmc",
+       .id             = 1,
+       .dev            = {
+               .dma_mask = &mxc_sdhc2_dmamask,
+               .coherent_dma_mask = 0xffffffff,
+       },
+       .num_resources  = ARRAY_SIZE(mxc_sdhc2_resources),
+       .resource       = mxc_sdhc2_resources,
+};
+
 /* GPIO port description */
 static struct mxc_gpio_port imx_gpio_ports[] = {
        [0] = {
                .chip.label = "gpio-0",
                .irq = MXC_INT_GPIO,
-               .base = (void*)(AIPI_BASE_ADDR_VIRT + 0x15000 + 0x100 * 0),
+               .base = IO_ADDRESS(GPIO_BASE_ADDR),
                .virtual_irq_start = MXC_GPIO_IRQ_START,
        },
        [1] = {
                .chip.label = "gpio-1",
-               .base = (void*)(AIPI_BASE_ADDR_VIRT + 0x15000 + 0x100 * 1),
+               .base = IO_ADDRESS(GPIO_BASE_ADDR + 0x100),
                .virtual_irq_start = MXC_GPIO_IRQ_START + 32,
        },
        [2] = {
                .chip.label = "gpio-2",
-               .base = (void*)(AIPI_BASE_ADDR_VIRT + 0x15000 + 0x100 * 2),
+               .base = IO_ADDRESS(GPIO_BASE_ADDR + 0x200),
                .virtual_irq_start = MXC_GPIO_IRQ_START + 64,
        },
        [3] = {
                .chip.label = "gpio-3",
-               .base = (void*)(AIPI_BASE_ADDR_VIRT + 0x15000 + 0x100 * 3),
+               .base = IO_ADDRESS(GPIO_BASE_ADDR + 0x300),
                .virtual_irq_start = MXC_GPIO_IRQ_START + 96,
        },
        [4] = {
                .chip.label = "gpio-4",
-               .base = (void*)(AIPI_BASE_ADDR_VIRT + 0x15000 + 0x100 * 4),
+               .base = IO_ADDRESS(GPIO_BASE_ADDR + 0x400),
                .virtual_irq_start = MXC_GPIO_IRQ_START + 128,
        },
        [5] = {
                .chip.label = "gpio-5",
-               .base = (void*)(AIPI_BASE_ADDR_VIRT + 0x15000 + 0x100 * 5),
+               .base = IO_ADDRESS(GPIO_BASE_ADDR + 0x500),
                .virtual_irq_start = MXC_GPIO_IRQ_START + 160,
        }
 };
index 1e8cb577a64262752afca2ea9f6c38b176119ea0..049005bb6aa954b99f7fa2808b0aa42f059868d2 100644 (file)
@@ -1,4 +1,3 @@
-
 extern struct platform_device mxc_gpt1;
 extern struct platform_device mxc_gpt2;
 extern struct platform_device mxc_gpt3;
@@ -14,3 +13,10 @@ extern struct platform_device mxc_uart_device4;
 extern struct platform_device mxc_uart_device5;
 extern struct platform_device mxc_w1_master_device;
 extern struct platform_device mxc_nand_device;
+extern struct platform_device mxc_fb_device;
+extern struct platform_device mxc_fec_device;
+extern struct platform_device mxc_pwm_device;
+extern struct platform_device mxc_i2c_device0;
+extern struct platform_device mxc_i2c_device1;
+extern struct platform_device mxc_sdhc_device0;
+extern struct platform_device mxc_sdhc_device1;
index dea6521d4d5c0bcc3122f2a1c28b3476178232c9..bd51dd04948eee62cb0415fe5ebc806a2ac287a0 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/mm.h>
 #include <linux/init.h>
 #include <mach/hardware.h>
+#include <mach/common.h>
 #include <asm/pgtable.h>
 #include <asm/mach/map.h>
 
index 2b5c67f545718dab0f361225a057e23abec6e9eb..4a3b097adc12afa6e8c88e3c081a3ac334789064 100644 (file)
@@ -31,7 +31,7 @@
 #include <asm/mach/map.h>
 #include <mach/gpio.h>
 #include <mach/imx-uart.h>
-#include <mach/iomux-mx1-mx2.h>
+#include <mach/iomux.h>
 #include <mach/board-mx27ads.h>
 
 #include "devices.h"
@@ -135,6 +135,7 @@ static int uart_mxc_port3_exit(struct platform_device *pdev)
 {
        mxc_gpio_release_multiple_pins(mxc_uart3_pins,
                        ARRAY_SIZE(mxc_uart3_pins));
+       return 0;
 }
 
 static int mxc_uart4_pins[] = {
@@ -179,6 +180,7 @@ static int uart_mxc_port5_exit(struct platform_device *pdev)
 
 static struct platform_device *platform_devices[] __initdata = {
        &mx27ads_nor_mtd_device,
+       &mxc_fec_device,
 };
 
 static int mxc_fec_pins[] = {
@@ -196,7 +198,7 @@ static int mxc_fec_pins[] = {
        PD11_AOUT_FEC_TX_CLK,
        PD12_AOUT_FEC_RXD0,
        PD13_AOUT_FEC_RX_DV,
-       PD14_AOUT_FEC_CLR,
+       PD14_AOUT_FEC_RX_CLK,
        PD15_AOUT_FEC_COL,
        PD16_AIN_FEC_TX_ER,
        PF23_AIN_FEC_TX_EN
@@ -208,12 +210,6 @@ static void gpio_fec_active(void)
                        ARRAY_SIZE(mxc_fec_pins), "FEC");
 }
 
-static void gpio_fec_inactive(void)
-{
-       mxc_gpio_release_multiple_pins(mxc_fec_pins,
-                       ARRAY_SIZE(mxc_fec_pins));
-}
-
 static struct imxuart_platform_data uart_pdata[] = {
        {
                .init = uart_mxc_port0_init,
@@ -263,11 +259,10 @@ static void __init mx27ads_timer_init(void)
        if ((__raw_readw(PBC_VERSION_REG) & CKIH_27MHZ_BIT_SET) == 0)
                fref = 27000000;
 
-       mxc_clocks_init(fref);
-       mxc_timer_init("gpt_clk.0");
+       mx27_clocks_init(fref);
 }
 
-struct sys_timer mx27ads_timer = {
+static struct sys_timer mx27ads_timer = {
        .init   = mx27ads_timer_init,
 };
 
@@ -280,7 +275,7 @@ static struct map_desc mx27ads_io_desc[] __initdata = {
        },
 };
 
-void __init mx27ads_map_io(void)
+static void __init mx27ads_map_io(void)
 {
        mxc_map_io();
        iotable_init(mx27ads_io_desc, ARRAY_SIZE(mx27ads_io_desc));
index dfd4156da7d5b1fe1b597d4ea9a44e598cdeeac7..aa4eaa61d1b5852bb58830cfdc6b9121741cc77e 100644 (file)
 #include <linux/platform_device.h>
 #include <linux/mtd/physmap.h>
 #include <linux/mtd/plat-ram.h>
+#include <linux/io.h>
+#include <linux/i2c.h>
+#include <linux/i2c/at24.h>
+
 #include <asm/mach/arch.h>
 #include <asm/mach-types.h>
 #include <mach/common.h>
 #include <mach/hardware.h>
-#include <mach/iomux-mx1-mx2.h>
+#include <mach/iomux.h>
+#ifdef CONFIG_I2C_IMX
+#include <mach/i2c.h>
+#endif
 #include <asm/mach/time.h>
 #include <mach/imx-uart.h>
 #include <mach/board-pcm038.h>
@@ -121,10 +128,10 @@ static int uart_mxc_port1_exit(struct platform_device *pdev)
        return 0;
 }
 
-static int mxc_uart2_pins[] = { PE10_PF_UART3_CTS,
+static int mxc_uart2_pins[] = { PE8_PF_UART3_TXD,
                                PE9_PF_UART3_RXD,
                                PE10_PF_UART3_CTS,
-                               PE9_PF_UART3_RXD };
+                               PE11_PF_UART3_RTS };
 
 static int uart_mxc_port2_init(struct platform_device *pdev)
 {
@@ -170,7 +177,7 @@ static int mxc_fec_pins[] = {
        PD11_AOUT_FEC_TX_CLK,
        PD12_AOUT_FEC_RXD0,
        PD13_AOUT_FEC_RX_DV,
-       PD14_AOUT_FEC_CLR,
+       PD14_AOUT_FEC_RX_CLK,
        PD15_AOUT_FEC_COL,
        PD16_AIN_FEC_TX_ER,
        PF23_AIN_FEC_TX_EN
@@ -182,12 +189,6 @@ static void gpio_fec_active(void)
                        ARRAY_SIZE(mxc_fec_pins), "FEC");
 }
 
-static void gpio_fec_inactive(void)
-{
-       mxc_gpio_release_multiple_pins(mxc_fec_pins,
-                       ARRAY_SIZE(mxc_fec_pins));
-}
-
 static struct mxc_nand_platform_data pcm038_nand_board_info = {
        .width = 1,
        .hw_ecc = 1,
@@ -196,6 +197,7 @@ static struct mxc_nand_platform_data pcm038_nand_board_info = {
 static struct platform_device *platform_devices[] __initdata = {
        &pcm038_nor_mtd_device,
        &mxc_w1_master_device,
+       &mxc_fec_device,
        &pcm038_sram_mtd_device,
 };
 
@@ -208,6 +210,51 @@ static void __init pcm038_init_sram(void)
        __raw_writel(0x22220a00, CSCR_A(1));
 }
 
+#ifdef CONFIG_I2C_IMX
+static int mxc_i2c1_pins[] = {
+       PC5_PF_I2C2_SDA,
+       PC6_PF_I2C2_SCL
+};
+
+static int pcm038_i2c_1_init(struct device *dev)
+{
+       return mxc_gpio_setup_multiple_pins(mxc_i2c1_pins, ARRAY_SIZE(mxc_i2c1_pins),
+                       "I2C1");
+}
+
+static void pcm038_i2c_1_exit(struct device *dev)
+{
+       mxc_gpio_release_multiple_pins(mxc_i2c1_pins, ARRAY_SIZE(mxc_i2c1_pins));
+}
+
+static struct imxi2c_platform_data pcm038_i2c_1_data = {
+       .bitrate = 100000,
+       .init = pcm038_i2c_1_init,
+       .exit = pcm038_i2c_1_exit,
+};
+
+static struct at24_platform_data board_eeprom = {
+       .byte_len = 4096,
+       .page_size = 32,
+       .flags = AT24_FLAG_ADDR16,
+};
+
+static struct i2c_board_info pcm038_i2c_devices[] = {
+       [0] = {
+               I2C_BOARD_INFO("at24", 0x52), /* E0=0, E1=1, E2=0 */
+               .platform_data = &board_eeprom,
+       },
+       [1] = {
+               I2C_BOARD_INFO("rtc-pcf8563", 0x51),
+               .type = "pcf8563"
+       },
+       [2] = {
+               I2C_BOARD_INFO("lm75", 0x4a),
+               .type = "lm75"
+       }
+};
+#endif
+
 static void __init pcm038_init(void)
 {
        gpio_fec_active();
@@ -217,9 +264,17 @@ static void __init pcm038_init(void)
        mxc_register_device(&mxc_uart_device1, &uart_pdata[1]);
        mxc_register_device(&mxc_uart_device2, &uart_pdata[2]);
 
-       mxc_gpio_mode(PE16_AF_RTCK); /* OWIRE */
+       mxc_gpio_mode(PE16_AF_OWIRE);
        mxc_register_device(&mxc_nand_device, &pcm038_nand_board_info);
 
+#ifdef CONFIG_I2C_IMX
+       /* only the i2c master 1 is used on this CPU card */
+       i2c_register_board_info(1, pcm038_i2c_devices,
+                               ARRAY_SIZE(pcm038_i2c_devices));
+
+       mxc_register_device(&mxc_i2c_device1, &pcm038_i2c_1_data);
+#endif
+
        platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
 
 #ifdef CONFIG_MACH_PCM970_BASEBOARD
@@ -229,11 +284,10 @@ static void __init pcm038_init(void)
 
 static void __init pcm038_timer_init(void)
 {
-       mxc_clocks_init(26000000);
-       mxc_timer_init("gpt_clk.0");
+       mx27_clocks_init(26000000);
 }
 
-struct sys_timer pcm038_timer = {
+static struct sys_timer pcm038_timer = {
        .init = pcm038_timer_init,
 };
 
index a560cd6ad23d73b0b82c422206e271c295a9fc2e..bf4e520bc1bc604e424fa549ffe6f70eb1ab825e 100644 (file)
  */
 
 #include <linux/platform_device.h>
-#include <mach/hardware.h>
+#include <linux/gpio.h>
+#include <linux/irq.h>
+
 #include <asm/mach/arch.h>
 
+#include <mach/hardware.h>
+#include <mach/common.h>
+#include <mach/mmc.h>
+#include <mach/imxfb.h>
+#include <mach/iomux.h>
+
+#include "devices.h"
+
+static int pcm970_sdhc2_get_ro(struct device *dev)
+{
+       return gpio_get_value(GPIO_PORTC + 28);
+}
+
+static int pcm970_sdhc2_pins[] = {
+       PB4_PF_SD2_D0,
+       PB5_PF_SD2_D1,
+       PB6_PF_SD2_D2,
+       PB7_PF_SD2_D3,
+       PB8_PF_SD2_CMD,
+       PB9_PF_SD2_CLK,
+};
+
+static int pcm970_sdhc2_init(struct device *dev, irq_handler_t detect_irq, void *data)
+{
+       int ret;
+
+       ret = mxc_gpio_setup_multiple_pins(pcm970_sdhc2_pins,
+               ARRAY_SIZE(pcm970_sdhc2_pins), "sdhc2");
+       if(ret)
+               return ret;
+
+       ret = request_irq(IRQ_GPIOC(29), detect_irq, 0,
+                               "imx-mmc-detect", data);
+       if (ret)
+               goto out_release_gpio;
+
+       set_irq_type(IRQ_GPIOC(29), IRQF_TRIGGER_FALLING);
+
+       ret = gpio_request(GPIO_PORTC + 28, "imx-mmc-ro");
+       if (ret)
+               goto out_release_gpio;
+
+       mxc_gpio_mode((GPIO_PORTC | 28) | GPIO_GPIO | GPIO_IN);
+       gpio_direction_input(GPIO_PORTC + 28);
+
+       return 0;
+
+out_release_gpio:
+       mxc_gpio_release_multiple_pins(pcm970_sdhc2_pins,
+                       ARRAY_SIZE(pcm970_sdhc2_pins));
+       return ret;
+}
+
+static void pcm970_sdhc2_exit(struct device *dev, void *data)
+{
+       free_irq(IRQ_GPIOC(29), data);
+       gpio_free(GPIO_PORTC + 28);
+       mxc_gpio_release_multiple_pins(pcm970_sdhc2_pins,
+                       ARRAY_SIZE(pcm970_sdhc2_pins));
+}
+
+static struct imxmmc_platform_data sdhc_pdata = {
+       .get_ro = pcm970_sdhc2_get_ro,
+       .init = pcm970_sdhc2_init,
+       .exit = pcm970_sdhc2_exit,
+};
+
+static int mxc_fb_pins[] = {
+       PA5_PF_LSCLK,   PA6_PF_LD0,     PA7_PF_LD1,     PA8_PF_LD2,
+       PA9_PF_LD3,     PA10_PF_LD4,    PA11_PF_LD5,    PA12_PF_LD6,
+       PA13_PF_LD7,    PA14_PF_LD8,    PA15_PF_LD9,    PA16_PF_LD10,
+       PA17_PF_LD11,   PA18_PF_LD12,   PA19_PF_LD13,   PA20_PF_LD14,
+       PA21_PF_LD15,   PA22_PF_LD16,   PA23_PF_LD17,   PA24_PF_REV,
+       PA25_PF_CLS,    PA26_PF_PS,     PA27_PF_SPL_SPR, PA28_PF_HSYNC,
+       PA29_PF_VSYNC,  PA30_PF_CONTRAST, PA31_PF_OE_ACD
+};
+
+static int pcm038_fb_init(struct platform_device *pdev)
+{
+       return mxc_gpio_setup_multiple_pins(mxc_fb_pins,
+                       ARRAY_SIZE(mxc_fb_pins), "FB");
+}
+
+static int pcm038_fb_exit(struct platform_device *pdev)
+{
+       mxc_gpio_release_multiple_pins(mxc_fb_pins, ARRAY_SIZE(mxc_fb_pins));
+
+       return 0;
+}
+
+/*
+ * Connected is a portrait Sharp-QVGA display
+ * of type: LQ035Q7DH06
+ */
+static struct imx_fb_platform_data pcm038_fb_data = {
+       .pixclock       = 188679, /* in ps (5.3MHz) */
+       .xres           = 240,
+       .yres           = 320,
+
+       .bpp            = 16,
+       .hsync_len      = 7,
+       .left_margin    = 5,
+       .right_margin   = 16,
+
+       .vsync_len      = 1,
+       .upper_margin   = 7,
+       .lower_margin   = 9,
+       .fixed_screen_cpu = 0,
+
+       /*
+        * - HSYNC active high
+        * - VSYNC active high
+        * - clk notenabled while idle
+        * - clock not inverted
+        * - data not inverted
+        * - data enable low active
+        * - enable sharp mode
+        */
+       .pcr            = 0xFA0080C0,
+       .pwmr           = 0x00A903FF,
+       .lscr1          = 0x00120300,
+       .dmacr          = 0x00020010,
+
+       .init = pcm038_fb_init,
+       .exit = pcm038_fb_exit,
+};
+
 /*
  * system init for baseboard usage. Will be called by pcm038 init.
  *
  */
 void __init pcm970_baseboard_init(void)
 {
+       mxc_register_device(&mxc_fb_device, &pcm038_fb_data);
+       mxc_register_device(&mxc_sdhc_device1, &sdhc_pdata);
 }
index 16debc296dad53ff3f440169d0dbed6383e61dfe..40a485cdc10e86856bcc74e74a1bfbd3b0ba0ec6 100644 (file)
@@ -22,6 +22,7 @@
 #include <linux/serial.h>
 #include <mach/hardware.h>
 #include <mach/imx-uart.h>
+#include "devices.h"
 
 static struct resource uart0[] = {
        {
@@ -99,6 +100,7 @@ struct platform_device mxc_uart_device3 = {
        .num_resources = ARRAY_SIZE(uart3),
 };
 
+#ifdef CONFIG_MACH_MX27
 static struct resource uart4[] = {
        {
                .start = UART5_BASE_ADDR,
@@ -136,3 +138,4 @@ struct platform_device mxc_uart_device5 = {
        .resource = uart5,
        .num_resources = ARRAY_SIZE(uart5),
 };
+#endif
index 7b8269719d1175ced8a0cc546fd7e8da05c2d8f6..92c79d4bd1621d962667340f453a2e31d31b5d4b 100644 (file)
@@ -46,7 +46,7 @@ void arch_idle(void)
 /*
  * Reset the system. It is called by machine_restart().
  */
-void arch_reset(char mode)
+void arch_reset(char mode, const char *cmd)
 {
        struct clk *clk;
 
index e79659e8176ee76c0525123b27cf5b8993d5ae9f..d6235583e979fed2a758375cf4bd6310ee7e8c47 100644 (file)
@@ -1,21 +1,40 @@
-menu "MX3 Options"
-       depends on ARCH_MX3
+if ARCH_MX3
+
+config ARCH_MX31
+       bool
+
+config ARCH_MX35
+       bool
+
+comment "MX3 platforms:"
 
 config MACH_MX31ADS
        bool "Support MX31ADS platforms"
+       select ARCH_MX31
        default y
        help
          Include support for MX31ADS platform. This includes specific
          configurations for the board and its peripherals.
 
+config MACH_MX31ADS_WM1133_EV1
+       bool "Support Wolfson Microelectronics 1133-EV1 module"
+       depends on MACH_MX31ADS
+       select MFD_WM8350_CONFIG_MODE_0
+       select MFD_WM8352_CONFIG_MODE_0
+       help
+         Include support for the Wolfson Microelectronics 1133-EV1 PMU
+         and audio module for the MX31ADS platform.
+
 config MACH_PCM037
-       bool "Support Phytec pcm037 platforms"
+       bool "Support Phytec pcm037 (i.MX31) platforms"
+       select ARCH_MX31
        help
          Include support for Phytec pcm037 platform. This includes
          specific configurations for the board and its peripherals.
 
 config MACH_MX31LITE
        bool "Support MX31 LITEKIT (LogicPD)"
+       select ARCH_MX31
        default n
        help
          Include support for MX31 LITEKIT platform. This includes specific
@@ -23,6 +42,7 @@ config MACH_MX31LITE
 
 config MACH_MX31_3DS
        bool "Support MX31PDK (3DS)"
+       select ARCH_MX31
        default n
        help
          Include support for MX31PDK (3DS) platform. This includes specific
@@ -30,10 +50,18 @@ config MACH_MX31_3DS
 
 config MACH_MX31MOBOARD
        bool "Support mx31moboard platforms (EPFL Mobots group)"
+       select ARCH_MX31
        default n
        help
          Include support for mx31moboard platform. This includes specific
          configurations for the board and its peripherals.
 
-endmenu
+config MACH_QONG
+       bool "Support Dave/DENX QongEVB-LITE platform"
+       select ARCH_MX31
+       default n
+       help
+         Include support for Dave/DENX QongEVB-LITE platform. This includes
+         specific configurations for the board and its peripherals.
 
+endif
index 5a151540fe836ebeaa233ce873240dabc79aa243..272c8a953b30cd5f5302e5284d74c6171b2d99fe 100644 (file)
@@ -4,9 +4,13 @@
 
 # Object file lists.
 
-obj-y                  := mm.o clock.o devices.o iomux.o
+obj-y                          := mm.o devices.o
+obj-$(CONFIG_ARCH_MX31)                += clock.o iomux.o
+obj-$(CONFIG_ARCH_MX35)                += clock-imx35.o
 obj-$(CONFIG_MACH_MX31ADS)     += mx31ads.o
 obj-$(CONFIG_MACH_MX31LITE)    += mx31lite.o
 obj-$(CONFIG_MACH_PCM037)      += pcm037.o
 obj-$(CONFIG_MACH_MX31_3DS)    += mx31pdk.o
-obj-$(CONFIG_MACH_MX31MOBOARD) += mx31moboard.o
+obj-$(CONFIG_MACH_MX31MOBOARD) += mx31moboard.o mx31moboard-devboard.o \
+                                  mx31moboard-marxbot.o
+obj-$(CONFIG_MACH_QONG)                += qong.o
diff --git a/arch/arm/mach-mx3/clock-imx35.c b/arch/arm/mach-mx3/clock-imx35.c
new file mode 100644 (file)
index 0000000..53a112d
--- /dev/null
@@ -0,0 +1,487 @@
+/*
+ * Copyright (C) 2009 by Sascha Hauer, Pengutronix
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/list.h>
+#include <linux/clk.h>
+#include <linux/io.h>
+
+#include <asm/clkdev.h>
+
+#include <mach/clock.h>
+#include <mach/hardware.h>
+#include <mach/common.h>
+
+#define CCM_BASE       IO_ADDRESS(CCM_BASE_ADDR)
+
+#define CCM_CCMR        0x00
+#define CCM_PDR0        0x04
+#define CCM_PDR1        0x08
+#define CCM_PDR2        0x0C
+#define CCM_PDR3        0x10
+#define CCM_PDR4        0x14
+#define CCM_RCSR        0x18
+#define CCM_MPCTL       0x1C
+#define CCM_PPCTL       0x20
+#define CCM_ACMR        0x24
+#define CCM_COSR        0x28
+#define CCM_CGR0        0x2C
+#define CCM_CGR1        0x30
+#define CCM_CGR2        0x34
+#define CCM_CGR3        0x38
+
+#ifdef HAVE_SET_RATE_SUPPORT
+static void calc_dividers(u32 div, u32 *pre, u32 *post, u32 maxpost)
+{
+       u32 min_pre, temp_pre, old_err, err;
+
+       min_pre = (div - 1) / maxpost + 1;
+       old_err = 8;
+
+       for (temp_pre = 8; temp_pre >= min_pre; temp_pre--) {
+               if (div > (temp_pre * maxpost))
+                       break;
+
+               if (div < (temp_pre * temp_pre))
+                       continue;
+
+               err = div % temp_pre;
+
+               if (err == 0) {
+                       *pre = temp_pre;
+                       break;
+               }
+
+               err = temp_pre - err;
+
+               if (err < old_err) {
+                       old_err = err;
+                       *pre = temp_pre;
+               }
+       }
+
+       *post = (div + *pre - 1) / *pre;
+}
+
+/* get the best values for a 3-bit divider combined with a 6-bit divider */
+static void calc_dividers_3_6(u32 div, u32 *pre, u32 *post)
+{
+       if (div >= 512) {
+               *pre = 8;
+               *post = 64;
+       } else if (div >= 64) {
+               calc_dividers(div, pre, post, 64);
+       } else if (div <= 8) {
+               *pre = div;
+               *post = 1;
+       } else {
+               *pre = 1;
+               *post = div;
+       }
+}
+
+/* get the best values for two cascaded 3-bit dividers */
+static void calc_dividers_3_3(u32 div, u32 *pre, u32 *post)
+{
+       if (div >= 64) {
+               *pre = *post = 8;
+       } else if (div > 8) {
+               calc_dividers(div, pre, post, 8);
+       } else {
+               *pre = 1;
+               *post = div;
+       }
+}
+#endif
+
+static unsigned long get_rate_mpll(void)
+{
+       ulong mpctl = __raw_readl(CCM_BASE + CCM_MPCTL);
+
+       return mxc_decode_pll(mpctl, 24000000);
+}
+
+static unsigned long get_rate_ppll(void)
+{
+       ulong ppctl = __raw_readl(CCM_BASE + CCM_PPCTL);
+
+       return mxc_decode_pll(ppctl, 24000000);
+}
+
+struct arm_ahb_div {
+       unsigned char arm, ahb, sel;
+};
+
+static struct arm_ahb_div clk_consumer[] = {
+       { .arm = 1, .ahb = 4, .sel = 0},
+       { .arm = 1, .ahb = 3, .sel = 1},
+       { .arm = 2, .ahb = 2, .sel = 0},
+       { .arm = 0, .ahb = 0, .sel = 0},
+       { .arm = 0, .ahb = 0, .sel = 0},
+       { .arm = 0, .ahb = 0, .sel = 0},
+       { .arm = 4, .ahb = 1, .sel = 0},
+       { .arm = 1, .ahb = 5, .sel = 0},
+       { .arm = 1, .ahb = 8, .sel = 0},
+       { .arm = 1, .ahb = 6, .sel = 1},
+       { .arm = 2, .ahb = 4, .sel = 0},
+       { .arm = 0, .ahb = 0, .sel = 0},
+       { .arm = 0, .ahb = 0, .sel = 0},
+       { .arm = 0, .ahb = 0, .sel = 0},
+       { .arm = 4, .ahb = 2, .sel = 0},
+       { .arm = 0, .ahb = 0, .sel = 0},
+};
+
+static struct arm_ahb_div clk_automotive[] = {
+       { .arm = 1, .ahb = 3, .sel = 0},
+       { .arm = 1, .ahb = 2, .sel = 1},
+       { .arm = 2, .ahb = 1, .sel = 1},
+       { .arm = 0, .ahb = 0, .sel = 0},
+       { .arm = 1, .ahb = 6, .sel = 0},
+       { .arm = 1, .ahb = 4, .sel = 1},
+       { .arm = 2, .ahb = 2, .sel = 1},
+       { .arm = 0, .ahb = 0, .sel = 0},
+};
+
+static unsigned long get_rate_arm(void)
+{
+       unsigned long pdr0 = __raw_readl(CCM_BASE + CCM_PDR0);
+       struct arm_ahb_div *aad;
+       unsigned long fref = get_rate_mpll();
+
+       if (pdr0 & 1) {
+               /* consumer path */
+               aad = &clk_consumer[(pdr0 >> 16) & 0xf];
+               if (aad->sel)
+                       fref = fref * 2 / 3;
+       } else {
+               /* auto path */
+               aad = &clk_automotive[(pdr0 >> 9) & 0x7];
+               if (aad->sel)
+                       fref = fref * 3 / 4;
+       }
+       return fref / aad->arm;
+}
+
+static unsigned long get_rate_ahb(struct clk *clk)
+{
+       unsigned long pdr0 = __raw_readl(CCM_BASE + CCM_PDR0);
+       struct arm_ahb_div *aad;
+       unsigned long fref = get_rate_mpll();
+
+       if (pdr0 & 1)
+               /* consumer path */
+               aad = &clk_consumer[(pdr0 >> 16) & 0xf];
+       else
+               /* auto path */
+               aad = &clk_automotive[(pdr0 >> 9) & 0x7];
+
+       return fref / aad->ahb;
+}
+
+static unsigned long get_rate_ipg(struct clk *clk)
+{
+       return get_rate_ahb(NULL) >> 1;
+}
+
+static unsigned long get_3_3_div(unsigned long in)
+{
+       return (((in >> 3) & 0x7) + 1) * ((in & 0x7) + 1);
+}
+
+static unsigned long get_rate_uart(struct clk *clk)
+{
+       unsigned long pdr3 = __raw_readl(CCM_BASE + CCM_PDR3);
+       unsigned long pdr4 = __raw_readl(CCM_BASE + CCM_PDR4);
+       unsigned long div = get_3_3_div(pdr4 >> 10);
+
+       if (pdr3 & (1 << 14))
+               return get_rate_arm() / div;
+       else
+               return get_rate_ppll() / div;
+}
+
+static unsigned long get_rate_sdhc(struct clk *clk)
+{
+       unsigned long pdr3 = __raw_readl(CCM_BASE + CCM_PDR3);
+       unsigned long div, rate;
+
+       if (pdr3 & (1 << 6))
+               rate = get_rate_arm();
+       else
+               rate = get_rate_ppll();
+
+       switch (clk->id) {
+       default:
+       case 0:
+               div = pdr3 & 0x3f;
+               break;
+       case 1:
+               div = (pdr3 >> 8) & 0x3f;
+               break;
+       case 2:
+               div = (pdr3 >> 16) & 0x3f;
+               break;
+       }
+
+       return rate / get_3_3_div(div);
+}
+
+static unsigned long get_rate_mshc(struct clk *clk)
+{
+       unsigned long pdr1 = __raw_readl(CCM_BASE + CCM_PDR1);
+       unsigned long div1, div2, rate;
+
+       if (pdr1 & (1 << 7))
+               rate = get_rate_arm();
+       else
+               rate = get_rate_ppll();
+
+       div1 = (pdr1 >> 29) & 0x7;
+       div2 = (pdr1 >> 22) & 0x3f;
+
+       return rate / ((div1 + 1) * (div2 + 1));
+}
+
+static unsigned long get_rate_ssi(struct clk *clk)
+{
+       unsigned long pdr2 = __raw_readl(CCM_BASE + CCM_PDR2);
+       unsigned long div1, div2, rate;
+
+       if (pdr2 & (1 << 6))
+               rate = get_rate_arm();
+       else
+               rate = get_rate_ppll();
+
+       switch (clk->id) {
+       default:
+       case 0:
+               div1 = pdr2 & 0x3f;
+               div2 = (pdr2 >> 24) & 0x7;
+               break;
+       case 1:
+               div1 = (pdr2 >> 8) & 0x3f;
+               div2 = (pdr2 >> 27) & 0x7;
+               break;
+       }
+
+       return rate / ((div1 + 1) * (div2 + 1));
+}
+
+static unsigned long get_rate_csi(struct clk *clk)
+{
+       unsigned long pdr2 = __raw_readl(CCM_BASE + CCM_PDR2);
+       unsigned long rate;
+
+       if (pdr2 & (1 << 7))
+               rate = get_rate_arm();
+       else
+               rate = get_rate_ppll();
+
+       return rate / get_3_3_div((pdr2 >> 16) & 0x3f);
+}
+
+static unsigned long get_rate_ipg_per(struct clk *clk)
+{
+       unsigned long pdr0 = __raw_readl(CCM_BASE + CCM_PDR0);
+       unsigned long pdr4 = __raw_readl(CCM_BASE + CCM_PDR4);
+       unsigned long div1, div2;
+
+       if (pdr0 & (1 << 26)) {
+               div1 = (pdr4 >> 19) & 0x7;
+               div2 = (pdr4 >> 16) & 0x7;
+               return get_rate_arm() / ((div1 + 1) * (div2 + 1));
+       } else {
+               div1 = (pdr0 >> 12) & 0x7;
+               return get_rate_ahb(NULL) / div1;
+       }
+}
+
+static int clk_cgr_enable(struct clk *clk)
+{
+       u32 reg;
+
+       reg = __raw_readl(clk->enable_reg);
+       reg |= 3 << clk->enable_shift;
+       __raw_writel(reg, clk->enable_reg);
+
+       return 0;
+}
+
+static void clk_cgr_disable(struct clk *clk)
+{
+       u32 reg;
+
+       reg = __raw_readl(clk->enable_reg);
+       reg &= ~(3 << clk->enable_shift);
+       __raw_writel(reg, clk->enable_reg);
+}
+
+#define DEFINE_CLOCK(name, i, er, es, gr, sr)          \
+       static struct clk name = {                      \
+               .id             = i,                    \
+               .enable_reg     = CCM_BASE + er,        \
+               .enable_shift   = es,                   \
+               .get_rate       = gr,                   \
+               .set_rate       = sr,                   \
+               .enable         = clk_cgr_enable,       \
+               .disable        = clk_cgr_disable,      \
+       }
+
+DEFINE_CLOCK(asrc_clk,   0, CCM_CGR0,  0, NULL, NULL);
+DEFINE_CLOCK(ata_clk,    0, CCM_CGR0,  2, get_rate_ipg, NULL);
+DEFINE_CLOCK(audmux_clk, 0, CCM_CGR0,  4, NULL, NULL);
+DEFINE_CLOCK(can1_clk,   0, CCM_CGR0,  6, get_rate_ipg, NULL);
+DEFINE_CLOCK(can2_clk,   1, CCM_CGR0,  8, get_rate_ipg, NULL);
+DEFINE_CLOCK(cspi1_clk,  0, CCM_CGR0, 10, get_rate_ipg, NULL);
+DEFINE_CLOCK(cspi2_clk,  1, CCM_CGR0, 12, get_rate_ipg, NULL);
+DEFINE_CLOCK(ect_clk,    0, CCM_CGR0, 14, get_rate_ipg, NULL);
+DEFINE_CLOCK(edio_clk,   0, CCM_CGR0, 16, NULL, NULL);
+DEFINE_CLOCK(emi_clk,    0, CCM_CGR0, 18, get_rate_ipg, NULL);
+DEFINE_CLOCK(epit1_clk,  0, CCM_CGR0, 20, get_rate_ipg_per, NULL);
+DEFINE_CLOCK(epit2_clk,  1, CCM_CGR0, 22, get_rate_ipg_per, NULL);
+DEFINE_CLOCK(esai_clk,   0, CCM_CGR0, 24, NULL, NULL);
+DEFINE_CLOCK(esdhc1_clk, 0, CCM_CGR0, 26, get_rate_sdhc, NULL);
+DEFINE_CLOCK(esdhc2_clk, 1, CCM_CGR0, 28, get_rate_sdhc, NULL);
+DEFINE_CLOCK(esdhc3_clk, 2, CCM_CGR0, 30, get_rate_sdhc, NULL);
+
+DEFINE_CLOCK(fec_clk,    0, CCM_CGR1,  0, get_rate_ipg, NULL);
+DEFINE_CLOCK(gpio1_clk,  0, CCM_CGR1,  2, NULL, NULL);
+DEFINE_CLOCK(gpio2_clk,  1, CCM_CGR1,  4, NULL, NULL);
+DEFINE_CLOCK(gpio3_clk,  2, CCM_CGR1,  6, NULL, NULL);
+DEFINE_CLOCK(gpt_clk,    0, CCM_CGR1,  8, get_rate_ipg, NULL);
+DEFINE_CLOCK(i2c1_clk,   0, CCM_CGR1, 10, get_rate_ipg_per, NULL);
+DEFINE_CLOCK(i2c2_clk,   1, CCM_CGR1, 12, get_rate_ipg_per, NULL);
+DEFINE_CLOCK(i2c3_clk,   2, CCM_CGR1, 14, get_rate_ipg_per, NULL);
+DEFINE_CLOCK(iomuxc_clk, 0, CCM_CGR1, 16, NULL, NULL);
+DEFINE_CLOCK(ipu_clk,    0, CCM_CGR1, 18, NULL, NULL);
+DEFINE_CLOCK(kpp_clk,    0, CCM_CGR1, 20, get_rate_ipg, NULL);
+DEFINE_CLOCK(mlb_clk,    0, CCM_CGR1, 22, get_rate_ahb, NULL);
+DEFINE_CLOCK(mshc_clk,   0, CCM_CGR1, 24, get_rate_mshc, NULL);
+DEFINE_CLOCK(owire_clk,  0, CCM_CGR1, 26, get_rate_ipg_per, NULL);
+DEFINE_CLOCK(pwm_clk,    0, CCM_CGR1, 28, get_rate_ipg_per, NULL);
+DEFINE_CLOCK(rngc_clk,   0, CCM_CGR1, 30, get_rate_ipg, NULL);
+
+DEFINE_CLOCK(rtc_clk,    0, CCM_CGR2,  0, get_rate_ipg, NULL);
+DEFINE_CLOCK(rtic_clk,   0, CCM_CGR2,  2, get_rate_ahb, NULL);
+DEFINE_CLOCK(scc_clk,    0, CCM_CGR2,  4, get_rate_ipg, NULL);
+DEFINE_CLOCK(sdma_clk,   0, CCM_CGR2,  6, NULL, NULL);
+DEFINE_CLOCK(spba_clk,   0, CCM_CGR2,  8, get_rate_ipg, NULL);
+DEFINE_CLOCK(spdif_clk,  0, CCM_CGR2, 10, NULL, NULL);
+DEFINE_CLOCK(ssi1_clk,   0, CCM_CGR2, 12, get_rate_ssi, NULL);
+DEFINE_CLOCK(ssi2_clk,   1, CCM_CGR2, 14, get_rate_ssi, NULL);
+DEFINE_CLOCK(uart1_clk,  0, CCM_CGR2, 16, get_rate_uart, NULL);
+DEFINE_CLOCK(uart2_clk,  1, CCM_CGR2, 18, get_rate_uart, NULL);
+DEFINE_CLOCK(uart3_clk,  2, CCM_CGR2, 20, get_rate_uart, NULL);
+DEFINE_CLOCK(usbotg_clk, 0, CCM_CGR2, 22, NULL, NULL);
+DEFINE_CLOCK(wdog_clk,   0, CCM_CGR2, 24, NULL, NULL);
+DEFINE_CLOCK(max_clk,    0, CCM_CGR2, 26, NULL, NULL);
+DEFINE_CLOCK(admux_clk,  0, CCM_CGR2, 30, NULL, NULL);
+
+DEFINE_CLOCK(csi_clk,    0, CCM_CGR3,  0, get_rate_csi, NULL);
+DEFINE_CLOCK(iim_clk,    0, CCM_CGR3,  2, NULL, NULL);
+DEFINE_CLOCK(gpu2d_clk,  0, CCM_CGR3,  4, NULL, NULL);
+
+#define _REGISTER_CLOCK(d, n, c)       \
+       {                               \
+               .dev_id = d,            \
+               .con_id = n,            \
+               .clk = &c,              \
+       },
+
+static struct clk_lookup lookups[] __initdata = {
+       _REGISTER_CLOCK(NULL, "asrc", asrc_clk)
+       _REGISTER_CLOCK(NULL, "ata", ata_clk)
+       _REGISTER_CLOCK(NULL, "audmux", audmux_clk)
+       _REGISTER_CLOCK(NULL, "can", can1_clk)
+       _REGISTER_CLOCK(NULL, "can", can2_clk)
+       _REGISTER_CLOCK("spi_imx.0", NULL, cspi1_clk)
+       _REGISTER_CLOCK("spi_imx.1", NULL, cspi2_clk)
+       _REGISTER_CLOCK(NULL, "ect", ect_clk)
+       _REGISTER_CLOCK(NULL, "edio", edio_clk)
+       _REGISTER_CLOCK(NULL, "emi", emi_clk)
+       _REGISTER_CLOCK(NULL, "epit", epit1_clk)
+       _REGISTER_CLOCK(NULL, "epit", epit2_clk)
+       _REGISTER_CLOCK(NULL, "esai", esai_clk)
+       _REGISTER_CLOCK(NULL, "sdhc", esdhc1_clk)
+       _REGISTER_CLOCK(NULL, "sdhc", esdhc2_clk)
+       _REGISTER_CLOCK(NULL, "sdhc", esdhc3_clk)
+       _REGISTER_CLOCK("fec.0", NULL, fec_clk)
+       _REGISTER_CLOCK(NULL, "gpio", gpio1_clk)
+       _REGISTER_CLOCK(NULL, "gpio", gpio2_clk)
+       _REGISTER_CLOCK(NULL, "gpio", gpio3_clk)
+       _REGISTER_CLOCK("gpt.0", NULL, gpt_clk)
+       _REGISTER_CLOCK("imx-i2c.0", NULL, i2c1_clk)
+       _REGISTER_CLOCK("imx-i2c.1", NULL, i2c2_clk)
+       _REGISTER_CLOCK("imx-i2c.2", NULL, i2c3_clk)
+       _REGISTER_CLOCK(NULL, "iomuxc", iomuxc_clk)
+       _REGISTER_CLOCK(NULL, "ipu", ipu_clk)
+       _REGISTER_CLOCK(NULL, "kpp", kpp_clk)
+       _REGISTER_CLOCK(NULL, "mlb", mlb_clk)
+       _REGISTER_CLOCK(NULL, "mshc", mshc_clk)
+       _REGISTER_CLOCK("mxc_w1", NULL, owire_clk)
+       _REGISTER_CLOCK(NULL, "pwm", pwm_clk)
+       _REGISTER_CLOCK(NULL, "rngc", rngc_clk)
+       _REGISTER_CLOCK(NULL, "rtc", rtc_clk)
+       _REGISTER_CLOCK(NULL, "rtic", rtic_clk)
+       _REGISTER_CLOCK(NULL, "scc", scc_clk)
+       _REGISTER_CLOCK(NULL, "sdma", sdma_clk)
+       _REGISTER_CLOCK(NULL, "spba", spba_clk)
+       _REGISTER_CLOCK(NULL, "spdif", spdif_clk)
+       _REGISTER_CLOCK(NULL, "ssi", ssi1_clk)
+       _REGISTER_CLOCK(NULL, "ssi", ssi2_clk)
+       _REGISTER_CLOCK("imx-uart.0", NULL, uart1_clk)
+       _REGISTER_CLOCK("imx-uart.1", NULL, uart2_clk)
+       _REGISTER_CLOCK("imx-uart.2", NULL, uart3_clk)
+       _REGISTER_CLOCK(NULL, "usbotg", usbotg_clk)
+       _REGISTER_CLOCK("mxc_wdt.0", NULL, wdog_clk)
+       _REGISTER_CLOCK(NULL, "max", max_clk)
+       _REGISTER_CLOCK(NULL, "admux", admux_clk)
+       _REGISTER_CLOCK(NULL, "csi", csi_clk)
+       _REGISTER_CLOCK(NULL, "iim", iim_clk)
+       _REGISTER_CLOCK(NULL, "gpu2d", gpu2d_clk)
+};
+
+int __init mx35_clocks_init()
+{
+       int i;
+       unsigned int ll = 0;
+
+       mxc_set_cpu_type(MXC_CPU_MX35);
+
+#ifdef CONFIG_DEBUG_LL_CONSOLE
+       ll = (3 << 16);
+#endif
+
+       for (i = 0; i < ARRAY_SIZE(lookups); i++)
+               clkdev_add(&lookups[i]);
+
+       /* Turn off all clocks except the ones we need to survive, namely:
+        * EMI, GPIO1/2/3, GPT, IOMUX, MAX and eventually uart
+        */
+       __raw_writel((3 << 18), CCM_BASE + CCM_CGR0);
+       __raw_writel((3 << 2) | (3 << 4) | (3 << 6) | (3 << 8) | (3 << 16),
+                       CCM_BASE + CCM_CGR1);
+       __raw_writel((3 << 26) | ll, CCM_BASE + CCM_CGR2);
+       __raw_writel(0, CCM_BASE + CCM_CGR3);
+
+       mxc_timer_init(&gpt_clk);
+
+       return 0;
+}
+
index b1746aae1f89eaeaf1eb2fb7a79037b02da4c1bd..ca46f4801c3dbc22b8846789af23f42a464b1a33 100644 (file)
 #include <linux/clk.h>
 #include <linux/err.h>
 #include <linux/io.h>
+
+#include <asm/clkdev.h>
+#include <asm/div64.h>
+
 #include <mach/clock.h>
 #include <mach/hardware.h>
-#include <asm/div64.h>
+#include <mach/common.h>
 
 #include "crm_regs.h"
 
@@ -64,17 +68,17 @@ static void __calc_pre_post_dividers(u32 div, u32 *pre, u32 *post)
 }
 
 static struct clk mcu_pll_clk;
-static struct clk mcu_main_clk;
-static struct clk usb_pll_clk;
 static struct clk serial_pll_clk;
 static struct clk ipg_clk;
 static struct clk ckih_clk;
-static struct clk ahb_clk;
 
-static int _clk_enable(struct clk *clk)
+static int cgr_enable(struct clk *clk)
 {
        u32 reg;
 
+       if (!clk->enable_reg)
+               return 0;
+
        reg = __raw_readl(clk->enable_reg);
        reg |= 3 << clk->enable_shift;
        __raw_writel(reg, clk->enable_reg);
@@ -82,133 +86,69 @@ static int _clk_enable(struct clk *clk)
        return 0;
 }
 
-static void _clk_disable(struct clk *clk)
+static void cgr_disable(struct clk *clk)
 {
        u32 reg;
 
+       if (!clk->enable_reg)
+               return;
+
        reg = __raw_readl(clk->enable_reg);
        reg &= ~(3 << clk->enable_shift);
+
+       /* special case for EMI clock */
+       if (clk->enable_reg == MXC_CCM_CGR2 && clk->enable_shift == 8)
+               reg |= (1 << clk->enable_shift);
+
        __raw_writel(reg, clk->enable_reg);
 }
 
-static void _clk_emi_disable(struct clk *clk)
+static unsigned long pll_ref_get_rate(void)
 {
-       u32 reg;
+       unsigned long ccmr;
+       unsigned int prcs;
 
-       reg = __raw_readl(clk->enable_reg);
-       reg &= ~(3 << clk->enable_shift);
-       reg |= (1 << clk->enable_shift);
-       __raw_writel(reg, clk->enable_reg);
+       ccmr = __raw_readl(MXC_CCM_CCMR);
+       prcs = (ccmr & MXC_CCM_CCMR_PRCS_MASK) >> MXC_CCM_CCMR_PRCS_OFFSET;
+       if (prcs == 0x1)
+               return CKIL_CLK_FREQ * 1024;
+       else
+               return clk_get_rate(&ckih_clk);
 }
 
-static int _clk_pll_set_rate(struct clk *clk, unsigned long rate)
+static unsigned long usb_pll_get_rate(struct clk *clk)
 {
-       u32 reg;
-       signed long pd = 1;     /* Pre-divider */
-       signed long mfi;        /* Multiplication Factor (Integer part) */
-       signed long mfn;        /* Multiplication Factor (Integer part) */
-       signed long mfd;        /* Multiplication Factor (Denominator Part) */
-       signed long tmp;
-       u32 ref_freq = clk_get_rate(clk->parent);
+       unsigned long reg;
 
-       while (((ref_freq / pd) * 10) > rate)
-               pd++;
+       reg = __raw_readl(MXC_CCM_UPCTL);
 
-       if ((ref_freq / pd) < PRE_DIV_MIN_FREQ)
-               return -EINVAL;
+       return mxc_decode_pll(reg, pll_ref_get_rate());
+}
 
-       /* the ref_freq/2 in the following is to round up */
-       mfi = (((rate / 2) * pd) + (ref_freq / 2)) / ref_freq;
-       if (mfi < 5 || mfi > 15)
-               return -EINVAL;
+static unsigned long serial_pll_get_rate(struct clk *clk)
+{
+       unsigned long reg;
 
-       /* pick a mfd value that will work
-        * then solve for mfn */
-       mfd = ref_freq / 50000;
-
-       /*
-        *          pll_freq * pd * mfd
-        *   mfn = --------------------  -  (mfi * mfd)
-        *           2 * ref_freq
-        */
-       /* the tmp/2 is for rounding */
-       tmp = ref_freq / 10000;
-       mfn =
-           ((((((rate / 2) + (tmp / 2)) / tmp) * pd) * mfd) / 10000) -
-           (mfi * mfd);
-
-       mfn = mfn & 0x3ff;
-       pd--;
-       mfd--;
-
-       /* Change the Pll value */
-       reg = (mfi << MXC_CCM_PCTL_MFI_OFFSET) |
-           (mfn << MXC_CCM_PCTL_MFN_OFFSET) |
-           (mfd << MXC_CCM_PCTL_MFD_OFFSET) | (pd << MXC_CCM_PCTL_PD_OFFSET);
-
-       if (clk == &mcu_pll_clk)
-               __raw_writel(reg, MXC_CCM_MPCTL);
-       else if (clk == &usb_pll_clk)
-               __raw_writel(reg, MXC_CCM_UPCTL);
-       else if (clk == &serial_pll_clk)
-               __raw_writel(reg, MXC_CCM_SRPCTL);
+       reg = __raw_readl(MXC_CCM_SRPCTL);
 
-       return 0;
+       return mxc_decode_pll(reg, pll_ref_get_rate());
 }
 
-static unsigned long _clk_pll_get_rate(struct clk *clk)
+static unsigned long mcu_pll_get_rate(struct clk *clk)
 {
-       long mfi, mfn, mfd, pdf, ref_clk, mfn_abs;
        unsigned long reg, ccmr;
-       s64 temp;
-       unsigned int prcs;
 
        ccmr = __raw_readl(MXC_CCM_CCMR);
-       prcs = (ccmr & MXC_CCM_CCMR_PRCS_MASK) >> MXC_CCM_CCMR_PRCS_OFFSET;
-       if (prcs == 0x1)
-               ref_clk = CKIL_CLK_FREQ * 1024;
-       else
-               ref_clk = clk_get_rate(&ckih_clk);
-
-       if (clk == &mcu_pll_clk) {
-               if ((ccmr & MXC_CCM_CCMR_MPE) == 0)
-                       return ref_clk;
-               if ((ccmr & MXC_CCM_CCMR_MDS) != 0)
-                       return ref_clk;
-               reg = __raw_readl(MXC_CCM_MPCTL);
-       } else if (clk == &usb_pll_clk)
-               reg = __raw_readl(MXC_CCM_UPCTL);
-       else if (clk == &serial_pll_clk)
-               reg = __raw_readl(MXC_CCM_SRPCTL);
-       else {
-               BUG();
-               return 0;
-       }
-
-       pdf = (reg & MXC_CCM_PCTL_PD_MASK) >> MXC_CCM_PCTL_PD_OFFSET;
-       mfd = (reg & MXC_CCM_PCTL_MFD_MASK) >> MXC_CCM_PCTL_MFD_OFFSET;
-       mfi = (reg & MXC_CCM_PCTL_MFI_MASK) >> MXC_CCM_PCTL_MFI_OFFSET;
-       mfi = (mfi <= 5) ? 5 : mfi;
-       mfn = mfn_abs = reg & MXC_CCM_PCTL_MFN_MASK;
 
-       if (mfn >= 0x200) {
-               mfn |= 0xFFFFFE00;
-               mfn_abs = -mfn;
-       }
-
-       ref_clk *= 2;
-       ref_clk /= pdf + 1;
+       if (!(ccmr & MXC_CCM_CCMR_MPE) || (ccmr & MXC_CCM_CCMR_MDS))
+               return clk_get_rate(&ckih_clk);
 
-       temp = (u64) ref_clk * mfn_abs;
-       do_div(temp, mfd + 1);
-       if (mfn < 0)
-               temp = -temp;
-       temp = (ref_clk * mfi) + temp;
+       reg = __raw_readl(MXC_CCM_MPCTL);
 
-       return temp;
+       return mxc_decode_pll(reg, pll_ref_get_rate());
 }
 
-static int _clk_usb_pll_enable(struct clk *clk)
+static int usb_pll_enable(struct clk *clk)
 {
        u32 reg;
 
@@ -222,7 +162,7 @@ static int _clk_usb_pll_enable(struct clk *clk)
        return 0;
 }
 
-static void _clk_usb_pll_disable(struct clk *clk)
+static void usb_pll_disable(struct clk *clk)
 {
        u32 reg;
 
@@ -231,7 +171,7 @@ static void _clk_usb_pll_disable(struct clk *clk)
        __raw_writel(reg, MXC_CCM_CCMR);
 }
 
-static int _clk_serial_pll_enable(struct clk *clk)
+static int serial_pll_enable(struct clk *clk)
 {
        u32 reg;
 
@@ -245,7 +185,7 @@ static int _clk_serial_pll_enable(struct clk *clk)
        return 0;
 }
 
-static void _clk_serial_pll_disable(struct clk *clk)
+static void serial_pll_disable(struct clk *clk)
 {
        u32 reg;
 
@@ -258,7 +198,7 @@ static void _clk_serial_pll_disable(struct clk *clk)
 #define PDR1(mask, off) ((__raw_readl(MXC_CCM_PDR1) & mask) >> off)
 #define PDR2(mask, off) ((__raw_readl(MXC_CCM_PDR2) & mask) >> off)
 
-static unsigned long _clk_mcu_main_get_rate(struct clk *clk)
+static unsigned long mcu_main_get_rate(struct clk *clk)
 {
        u32 pmcr0 = __raw_readl(MXC_CCM_PMCR0);
 
@@ -268,7 +208,7 @@ static unsigned long _clk_mcu_main_get_rate(struct clk *clk)
                return clk_get_rate(&mcu_pll_clk);
 }
 
-static unsigned long _clk_hclk_get_rate(struct clk *clk)
+static unsigned long ahb_get_rate(struct clk *clk)
 {
        unsigned long max_pdf;
 
@@ -277,7 +217,7 @@ static unsigned long _clk_hclk_get_rate(struct clk *clk)
        return clk_get_rate(clk->parent) / (max_pdf + 1);
 }
 
-static unsigned long _clk_ipg_get_rate(struct clk *clk)
+static unsigned long ipg_get_rate(struct clk *clk)
 {
        unsigned long ipg_pdf;
 
@@ -286,7 +226,7 @@ static unsigned long _clk_ipg_get_rate(struct clk *clk)
        return clk_get_rate(clk->parent) / (ipg_pdf + 1);
 }
 
-static unsigned long _clk_nfc_get_rate(struct clk *clk)
+static unsigned long nfc_get_rate(struct clk *clk)
 {
        unsigned long nfc_pdf;
 
@@ -295,7 +235,7 @@ static unsigned long _clk_nfc_get_rate(struct clk *clk)
        return clk_get_rate(clk->parent) / (nfc_pdf + 1);
 }
 
-static unsigned long _clk_hsp_get_rate(struct clk *clk)
+static unsigned long hsp_get_rate(struct clk *clk)
 {
        unsigned long hsp_pdf;
 
@@ -304,7 +244,7 @@ static unsigned long _clk_hsp_get_rate(struct clk *clk)
        return clk_get_rate(clk->parent) / (hsp_pdf + 1);
 }
 
-static unsigned long _clk_usb_get_rate(struct clk *clk)
+static unsigned long usb_get_rate(struct clk *clk)
 {
        unsigned long usb_pdf, usb_prepdf;
 
@@ -315,7 +255,7 @@ static unsigned long _clk_usb_get_rate(struct clk *clk)
        return clk_get_rate(clk->parent) / (usb_prepdf + 1) / (usb_pdf + 1);
 }
 
-static unsigned long _clk_csi_get_rate(struct clk *clk)
+static unsigned long csi_get_rate(struct clk *clk)
 {
        u32 reg, pre, post;
 
@@ -329,7 +269,7 @@ static unsigned long _clk_csi_get_rate(struct clk *clk)
        return clk_get_rate(clk->parent) / (pre * post);
 }
 
-static unsigned long _clk_csi_round_rate(struct clk *clk, unsigned long rate)
+static unsigned long csi_round_rate(struct clk *clk, unsigned long rate)
 {
        u32 pre, post, parent = clk_get_rate(clk->parent);
        u32 div = parent / rate;
@@ -342,7 +282,7 @@ static unsigned long _clk_csi_round_rate(struct clk *clk, unsigned long rate)
        return parent / (pre * post);
 }
 
-static int _clk_csi_set_rate(struct clk *clk, unsigned long rate)
+static int csi_set_rate(struct clk *clk, unsigned long rate)
 {
        u32 reg, div, pre, post, parent = clk_get_rate(clk->parent);
 
@@ -363,16 +303,7 @@ static int _clk_csi_set_rate(struct clk *clk, unsigned long rate)
        return 0;
 }
 
-static unsigned long _clk_per_get_rate(struct clk *clk)
-{
-       unsigned long per_pdf;
-
-       per_pdf = PDR0(MXC_CCM_PDR0_PER_PODF_MASK,
-                      MXC_CCM_PDR0_PER_PODF_OFFSET);
-       return clk_get_rate(clk->parent) / (per_pdf + 1);
-}
-
-static unsigned long _clk_ssi1_get_rate(struct clk *clk)
+static unsigned long ssi1_get_rate(struct clk *clk)
 {
        unsigned long ssi1_pdf, ssi1_prepdf;
 
@@ -383,7 +314,7 @@ static unsigned long _clk_ssi1_get_rate(struct clk *clk)
        return clk_get_rate(clk->parent) / (ssi1_prepdf + 1) / (ssi1_pdf + 1);
 }
 
-static unsigned long _clk_ssi2_get_rate(struct clk *clk)
+static unsigned long ssi2_get_rate(struct clk *clk)
 {
        unsigned long ssi2_pdf, ssi2_prepdf;
 
@@ -394,7 +325,7 @@ static unsigned long _clk_ssi2_get_rate(struct clk *clk)
        return clk_get_rate(clk->parent) / (ssi2_prepdf + 1) / (ssi2_pdf + 1);
 }
 
-static unsigned long _clk_firi_get_rate(struct clk *clk)
+static unsigned long firi_get_rate(struct clk *clk)
 {
        unsigned long firi_pdf, firi_prepdf;
 
@@ -405,7 +336,7 @@ static unsigned long _clk_firi_get_rate(struct clk *clk)
        return clk_get_rate(clk->parent) / (firi_prepdf + 1) / (firi_pdf + 1);
 }
 
-static unsigned long _clk_firi_round_rate(struct clk *clk, unsigned long rate)
+static unsigned long firi_round_rate(struct clk *clk, unsigned long rate)
 {
        u32 pre, post;
        u32 parent = clk_get_rate(clk->parent);
@@ -420,7 +351,7 @@ static unsigned long _clk_firi_round_rate(struct clk *clk, unsigned long rate)
 
 }
 
-static int _clk_firi_set_rate(struct clk *clk, unsigned long rate)
+static int firi_set_rate(struct clk *clk, unsigned long rate)
 {
        u32 reg, div, pre, post, parent = clk_get_rate(clk->parent);
 
@@ -441,12 +372,12 @@ static int _clk_firi_set_rate(struct clk *clk, unsigned long rate)
        return 0;
 }
 
-static unsigned long _clk_mbx_get_rate(struct clk *clk)
+static unsigned long mbx_get_rate(struct clk *clk)
 {
        return clk_get_rate(clk->parent) / 2;
 }
 
-static unsigned long _clk_mstick1_get_rate(struct clk *clk)
+static unsigned long mstick1_get_rate(struct clk *clk)
 {
        unsigned long msti_pdf;
 
@@ -455,7 +386,7 @@ static unsigned long _clk_mstick1_get_rate(struct clk *clk)
        return clk_get_rate(clk->parent) / (msti_pdf + 1);
 }
 
-static unsigned long _clk_mstick2_get_rate(struct clk *clk)
+static unsigned long mstick2_get_rate(struct clk *clk)
 {
        unsigned long msti_pdf;
 
@@ -472,661 +403,185 @@ static unsigned long clk_ckih_get_rate(struct clk *clk)
 }
 
 static struct clk ckih_clk = {
-       .name = "ckih",
        .get_rate = clk_ckih_get_rate,
 };
 
-static unsigned long clk_ckil_get_rate(struct clk *clk)
-{
-       return CKIL_CLK_FREQ;
-}
-
-static struct clk ckil_clk = {
-       .name = "ckil",
-       .get_rate = clk_ckil_get_rate,
-};
-
 static struct clk mcu_pll_clk = {
-       .name = "mcu_pll",
        .parent = &ckih_clk,
-       .set_rate = _clk_pll_set_rate,
-       .get_rate = _clk_pll_get_rate,
+       .get_rate = mcu_pll_get_rate,
 };
 
 static struct clk mcu_main_clk = {
-       .name = "mcu_main_clk",
        .parent = &mcu_pll_clk,
-       .get_rate = _clk_mcu_main_get_rate,
+       .get_rate = mcu_main_get_rate,
 };
 
 static struct clk serial_pll_clk = {
-       .name = "serial_pll",
        .parent = &ckih_clk,
-       .set_rate = _clk_pll_set_rate,
-       .get_rate = _clk_pll_get_rate,
-       .enable = _clk_serial_pll_enable,
-       .disable = _clk_serial_pll_disable,
+       .get_rate = serial_pll_get_rate,
+       .enable = serial_pll_enable,
+       .disable = serial_pll_disable,
 };
 
 static struct clk usb_pll_clk = {
-       .name = "usb_pll",
        .parent = &ckih_clk,
-       .set_rate = _clk_pll_set_rate,
-       .get_rate = _clk_pll_get_rate,
-       .enable = _clk_usb_pll_enable,
-       .disable = _clk_usb_pll_disable,
+       .get_rate = usb_pll_get_rate,
+       .enable = usb_pll_enable,
+       .disable = usb_pll_disable,
 };
 
 static struct clk ahb_clk = {
-       .name = "ahb_clk",
        .parent = &mcu_main_clk,
-       .get_rate = _clk_hclk_get_rate,
-};
-
-static struct clk per_clk = {
-       .name = "per_clk",
-       .parent = &usb_pll_clk,
-       .get_rate = _clk_per_get_rate,
-};
-
-static struct clk perclk_clk = {
-       .name = "perclk_clk",
-       .parent = &ipg_clk,
-};
-
-static struct clk cspi_clk[] = {
-       {
-        .name = "cspi_clk",
-        .id = 0,
-        .parent = &ipg_clk,
-        .enable = _clk_enable,
-        .enable_reg = MXC_CCM_CGR2,
-        .enable_shift = MXC_CCM_CGR2_CSPI1_OFFSET,
-        .disable = _clk_disable,},
-       {
-        .name = "cspi_clk",
-        .id = 1,
-        .parent = &ipg_clk,
-        .enable = _clk_enable,
-        .enable_reg = MXC_CCM_CGR2,
-        .enable_shift = MXC_CCM_CGR2_CSPI2_OFFSET,
-        .disable = _clk_disable,},
-       {
-        .name = "cspi_clk",
-        .id = 2,
-        .parent = &ipg_clk,
-        .enable = _clk_enable,
-        .enable_reg = MXC_CCM_CGR0,
-        .enable_shift = MXC_CCM_CGR0_CSPI3_OFFSET,
-        .disable = _clk_disable,},
-};
-
-static struct clk ipg_clk = {
-       .name = "ipg_clk",
-       .parent = &ahb_clk,
-       .get_rate = _clk_ipg_get_rate,
-};
-
-static struct clk emi_clk = {
-       .name = "emi_clk",
-       .parent = &ahb_clk,
-       .enable = _clk_enable,
-       .enable_reg = MXC_CCM_CGR2,
-       .enable_shift = MXC_CCM_CGR2_EMI_OFFSET,
-       .disable = _clk_emi_disable,
-};
-
-static struct clk gpt_clk = {
-       .name = "gpt_clk",
-       .parent = &perclk_clk,
-       .enable = _clk_enable,
-       .enable_reg = MXC_CCM_CGR0,
-       .enable_shift = MXC_CCM_CGR0_GPT_OFFSET,
-       .disable = _clk_disable,
-};
-
-static struct clk pwm_clk = {
-       .name = "pwm_clk",
-       .parent = &perclk_clk,
-       .enable = _clk_enable,
-       .enable_reg = MXC_CCM_CGR0,
-       .enable_shift = MXC_CCM_CGR1_PWM_OFFSET,
-       .disable = _clk_disable,
-};
-
-static struct clk epit_clk[] = {
-       {
-        .name = "epit_clk",
-        .id = 0,
-        .parent = &perclk_clk,
-        .enable = _clk_enable,
-        .enable_reg = MXC_CCM_CGR0,
-        .enable_shift = MXC_CCM_CGR0_EPIT1_OFFSET,
-        .disable = _clk_disable,},
-       {
-        .name = "epit_clk",
-        .id = 1,
-        .parent = &perclk_clk,
-        .enable = _clk_enable,
-        .enable_reg = MXC_CCM_CGR0,
-        .enable_shift = MXC_CCM_CGR0_EPIT2_OFFSET,
-        .disable = _clk_disable,},
-};
-
-static struct clk nfc_clk = {
-       .name = "nfc_clk",
-       .parent = &ahb_clk,
-       .get_rate = _clk_nfc_get_rate,
-};
-
-static struct clk scc_clk = {
-       .name = "scc_clk",
-       .parent = &ipg_clk,
-};
-
-static struct clk ipu_clk = {
-       .name = "ipu_clk",
-       .parent = &mcu_main_clk,
-       .get_rate = _clk_hsp_get_rate,
-       .enable = _clk_enable,
-       .enable_reg = MXC_CCM_CGR1,
-       .enable_shift = MXC_CCM_CGR1_IPU_OFFSET,
-       .disable = _clk_disable,
-};
-
-static struct clk kpp_clk = {
-       .name = "kpp_clk",
-       .parent = &ipg_clk,
-       .enable = _clk_enable,
-       .enable_reg = MXC_CCM_CGR1,
-       .enable_shift = MXC_CCM_CGR1_KPP_OFFSET,
-       .disable = _clk_disable,
-};
-
-static struct clk wdog_clk = {
-       .name = "wdog_clk",
-       .parent = &ipg_clk,
-       .enable = _clk_enable,
-       .enable_reg = MXC_CCM_CGR1,
-       .enable_shift = MXC_CCM_CGR1_WDOG_OFFSET,
-       .disable = _clk_disable,
-};
-static struct clk rtc_clk = {
-       .name = "rtc_clk",
-       .parent = &ipg_clk,
-       .enable = _clk_enable,
-       .enable_reg = MXC_CCM_CGR1,
-       .enable_shift = MXC_CCM_CGR1_RTC_OFFSET,
-       .disable = _clk_disable,
-};
-
-static struct clk usb_clk[] = {
-       {
-        .name = "usb_clk",
-        .parent = &usb_pll_clk,
-        .get_rate = _clk_usb_get_rate,},
-       {
-        .name = "usb_ahb_clk",
-        .parent = &ahb_clk,
-        .enable = _clk_enable,
-        .enable_reg = MXC_CCM_CGR1,
-        .enable_shift = MXC_CCM_CGR1_USBOTG_OFFSET,
-        .disable = _clk_disable,},
-};
-
-static struct clk csi_clk = {
-       .name = "csi_clk",
-       .parent = &serial_pll_clk,
-       .get_rate = _clk_csi_get_rate,
-       .round_rate = _clk_csi_round_rate,
-       .set_rate = _clk_csi_set_rate,
-       .enable = _clk_enable,
-       .enable_reg = MXC_CCM_CGR1,
-       .enable_shift = MXC_CCM_CGR1_CSI_OFFSET,
-       .disable = _clk_disable,
-};
-
-static struct clk uart_clk[] = {
-       {
-        .name = "uart_clk",
-        .id = 0,
-        .parent = &perclk_clk,
-        .enable = _clk_enable,
-        .enable_reg = MXC_CCM_CGR0,
-        .enable_shift = MXC_CCM_CGR0_UART1_OFFSET,
-        .disable = _clk_disable,},
-       {
-        .name = "uart_clk",
-        .id = 1,
-        .parent = &perclk_clk,
-        .enable = _clk_enable,
-        .enable_reg = MXC_CCM_CGR0,
-        .enable_shift = MXC_CCM_CGR0_UART2_OFFSET,
-        .disable = _clk_disable,},
-       {
-        .name = "uart_clk",
-        .id = 2,
-        .parent = &perclk_clk,
-        .enable = _clk_enable,
-        .enable_reg = MXC_CCM_CGR1,
-        .enable_shift = MXC_CCM_CGR1_UART3_OFFSET,
-        .disable = _clk_disable,},
-       {
-        .name = "uart_clk",
-        .id = 3,
-        .parent = &perclk_clk,
-        .enable = _clk_enable,
-        .enable_reg = MXC_CCM_CGR1,
-        .enable_shift = MXC_CCM_CGR1_UART4_OFFSET,
-        .disable = _clk_disable,},
-       {
-        .name = "uart_clk",
-        .id = 4,
-        .parent = &perclk_clk,
-        .enable = _clk_enable,
-        .enable_reg = MXC_CCM_CGR1,
-        .enable_shift = MXC_CCM_CGR1_UART5_OFFSET,
-        .disable = _clk_disable,},
-};
-
-static struct clk i2c_clk[] = {
-       {
-        .name = "i2c_clk",
-        .id = 0,
-        .parent = &perclk_clk,
-        .enable = _clk_enable,
-        .enable_reg = MXC_CCM_CGR0,
-        .enable_shift = MXC_CCM_CGR0_I2C1_OFFSET,
-        .disable = _clk_disable,},
-       {
-        .name = "i2c_clk",
-        .id = 1,
-        .parent = &perclk_clk,
-        .enable = _clk_enable,
-        .enable_reg = MXC_CCM_CGR0,
-        .enable_shift = MXC_CCM_CGR0_I2C2_OFFSET,
-        .disable = _clk_disable,},
-       {
-        .name = "i2c_clk",
-        .id = 2,
-        .parent = &perclk_clk,
-        .enable = _clk_enable,
-        .enable_reg = MXC_CCM_CGR0,
-        .enable_shift = MXC_CCM_CGR0_I2C3_OFFSET,
-        .disable = _clk_disable,},
-};
-
-static struct clk owire_clk = {
-       .name = "owire_clk",
-       .parent = &perclk_clk,
-       .enable_reg = MXC_CCM_CGR1,
-       .enable_shift = MXC_CCM_CGR1_OWIRE_OFFSET,
-       .enable = _clk_enable,
-       .disable = _clk_disable,
-};
-
-static struct clk sdhc_clk[] = {
-       {
-        .name = "sdhc_clk",
-        .id = 0,
-        .parent = &perclk_clk,
-        .enable = _clk_enable,
-        .enable_reg = MXC_CCM_CGR0,
-        .enable_shift = MXC_CCM_CGR0_SD_MMC1_OFFSET,
-        .disable = _clk_disable,},
-       {
-        .name = "sdhc_clk",
-        .id = 1,
-        .parent = &perclk_clk,
-        .enable = _clk_enable,
-        .enable_reg = MXC_CCM_CGR0,
-        .enable_shift = MXC_CCM_CGR0_SD_MMC2_OFFSET,
-        .disable = _clk_disable,},
-};
-
-static struct clk ssi_clk[] = {
-       {
-        .name = "ssi_clk",
-        .parent = &serial_pll_clk,
-        .get_rate = _clk_ssi1_get_rate,
-        .enable = _clk_enable,
-        .enable_reg = MXC_CCM_CGR0,
-        .enable_shift = MXC_CCM_CGR0_SSI1_OFFSET,
-        .disable = _clk_disable,},
-       {
-        .name = "ssi_clk",
-        .id = 1,
-        .parent = &serial_pll_clk,
-        .get_rate = _clk_ssi2_get_rate,
-        .enable = _clk_enable,
-        .enable_reg = MXC_CCM_CGR2,
-        .enable_shift = MXC_CCM_CGR2_SSI2_OFFSET,
-        .disable = _clk_disable,},
-};
-
-static struct clk firi_clk = {
-       .name = "firi_clk",
-       .parent = &usb_pll_clk,
-       .round_rate = _clk_firi_round_rate,
-       .set_rate = _clk_firi_set_rate,
-       .get_rate = _clk_firi_get_rate,
-       .enable = _clk_enable,
-       .enable_reg = MXC_CCM_CGR2,
-       .enable_shift = MXC_CCM_CGR2_FIRI_OFFSET,
-       .disable = _clk_disable,
-};
-
-static struct clk ata_clk = {
-       .name = "ata_clk",
-       .parent = &ipg_clk,
-       .enable = _clk_enable,
-       .enable_reg = MXC_CCM_CGR0,
-       .enable_shift = MXC_CCM_CGR0_ATA_OFFSET,
-       .disable = _clk_disable,
-};
-
-static struct clk mbx_clk = {
-       .name = "mbx_clk",
-       .parent = &ahb_clk,
-       .enable = _clk_enable,
-       .enable_reg = MXC_CCM_CGR2,
-       .enable_shift = MXC_CCM_CGR2_GACC_OFFSET,
-       .get_rate = _clk_mbx_get_rate,
-};
-
-static struct clk vpu_clk = {
-       .name = "vpu_clk",
-       .parent = &ahb_clk,
-       .enable = _clk_enable,
-       .enable_reg = MXC_CCM_CGR2,
-       .enable_shift = MXC_CCM_CGR2_GACC_OFFSET,
-       .get_rate = _clk_mbx_get_rate,
-};
-
-static struct clk rtic_clk = {
-       .name = "rtic_clk",
-       .parent = &ahb_clk,
-       .enable = _clk_enable,
-       .enable_reg = MXC_CCM_CGR2,
-       .enable_shift = MXC_CCM_CGR2_RTIC_OFFSET,
-       .disable = _clk_disable,
-};
-
-static struct clk rng_clk = {
-       .name = "rng_clk",
-       .parent = &ipg_clk,
-       .enable = _clk_enable,
-       .enable_reg = MXC_CCM_CGR0,
-       .enable_shift = MXC_CCM_CGR0_RNG_OFFSET,
-       .disable = _clk_disable,
-};
-
-static struct clk sdma_clk[] = {
-       {
-        .name = "sdma_ahb_clk",
-        .parent = &ahb_clk,
-        .enable = _clk_enable,
-        .enable_reg = MXC_CCM_CGR0,
-        .enable_shift = MXC_CCM_CGR0_SDMA_OFFSET,
-        .disable = _clk_disable,},
-       {
-        .name = "sdma_ipg_clk",
-        .parent = &ipg_clk,}
-};
-
-static struct clk mpeg4_clk = {
-       .name = "mpeg4_clk",
-       .parent = &ahb_clk,
-       .enable = _clk_enable,
-       .enable_reg = MXC_CCM_CGR1,
-       .enable_shift = MXC_CCM_CGR1_HANTRO_OFFSET,
-       .disable = _clk_disable,
-};
-
-static struct clk vl2cc_clk = {
-       .name = "vl2cc_clk",
-       .parent = &ahb_clk,
-       .enable = _clk_enable,
-       .enable_reg = MXC_CCM_CGR1,
-       .enable_shift = MXC_CCM_CGR1_HANTRO_OFFSET,
-       .disable = _clk_disable,
-};
-
-static struct clk mstick_clk[] = {
-       {
-        .name = "mstick_clk",
-        .id = 0,
-        .parent = &usb_pll_clk,
-        .get_rate = _clk_mstick1_get_rate,
-        .enable = _clk_enable,
-        .enable_reg = MXC_CCM_CGR1,
-        .enable_shift = MXC_CCM_CGR1_MEMSTICK1_OFFSET,
-        .disable = _clk_disable,},
-       {
-        .name = "mstick_clk",
-        .id = 1,
-        .parent = &usb_pll_clk,
-        .get_rate = _clk_mstick2_get_rate,
-        .enable = _clk_enable,
-        .enable_reg = MXC_CCM_CGR1,
-        .enable_shift = MXC_CCM_CGR1_MEMSTICK2_OFFSET,
-        .disable = _clk_disable,},
-};
-
-static struct clk iim_clk = {
-       .name = "iim_clk",
-       .parent = &ipg_clk,
-       .enable = _clk_enable,
-       .enable_reg = MXC_CCM_CGR0,
-       .enable_shift = MXC_CCM_CGR0_IIM_OFFSET,
-       .disable = _clk_disable,
-};
-
-static unsigned long _clk_cko1_round_rate(struct clk *clk, unsigned long rate)
-{
-       u32 div, parent = clk_get_rate(clk->parent);
-
-       div = parent / rate;
-       if (parent % rate)
-               div++;
-
-       if (div > 8)
-               div = 16;
-       else if (div > 4)
-               div = 8;
-       else if (div > 2)
-               div = 4;
-
-       return parent / div;
-}
-
-static int _clk_cko1_set_rate(struct clk *clk, unsigned long rate)
-{
-       u32 reg, div, parent = clk_get_rate(clk->parent);
-
-       div = parent / rate;
-
-       if (div == 16)
-               div = 4;
-       else if (div == 8)
-               div = 3;
-       else if (div == 4)
-               div = 2;
-       else if (div == 2)
-               div = 1;
-       else if (div == 1)
-               div = 0;
-       else
-               return -EINVAL;
-
-       reg = __raw_readl(MXC_CCM_COSR) & ~MXC_CCM_COSR_CLKOUTDIV_MASK;
-       reg |= div << MXC_CCM_COSR_CLKOUTDIV_OFFSET;
-       __raw_writel(reg, MXC_CCM_COSR);
-
-       return 0;
-}
-
-static unsigned long _clk_cko1_get_rate(struct clk *clk)
-{
-       u32 div;
-
-       div = __raw_readl(MXC_CCM_COSR) & MXC_CCM_COSR_CLKOUTDIV_MASK >>
-           MXC_CCM_COSR_CLKOUTDIV_OFFSET;
-
-       return clk_get_rate(clk->parent) / (1 << div);
-}
-
-static int _clk_cko1_set_parent(struct clk *clk, struct clk *parent)
-{
-       u32 reg;
-
-       reg = __raw_readl(MXC_CCM_COSR) & ~MXC_CCM_COSR_CLKOSEL_MASK;
-
-       if (parent == &mcu_main_clk)
-               reg |= 0 << MXC_CCM_COSR_CLKOSEL_OFFSET;
-       else if (parent == &ipg_clk)
-               reg |= 1 << MXC_CCM_COSR_CLKOSEL_OFFSET;
-       else if (parent == &usb_pll_clk)
-               reg |= 2 << MXC_CCM_COSR_CLKOSEL_OFFSET;
-       else if (parent == mcu_main_clk.parent)
-               reg |= 3 << MXC_CCM_COSR_CLKOSEL_OFFSET;
-       else if (parent == &ahb_clk)
-               reg |= 5 << MXC_CCM_COSR_CLKOSEL_OFFSET;
-       else if (parent == &serial_pll_clk)
-               reg |= 7 << MXC_CCM_COSR_CLKOSEL_OFFSET;
-       else if (parent == &ckih_clk)
-               reg |= 8 << MXC_CCM_COSR_CLKOSEL_OFFSET;
-       else if (parent == &emi_clk)
-               reg |= 9 << MXC_CCM_COSR_CLKOSEL_OFFSET;
-       else if (parent == &ipu_clk)
-               reg |= 0xA << MXC_CCM_COSR_CLKOSEL_OFFSET;
-       else if (parent == &nfc_clk)
-               reg |= 0xB << MXC_CCM_COSR_CLKOSEL_OFFSET;
-       else if (parent == &uart_clk[0])
-               reg |= 0xC << MXC_CCM_COSR_CLKOSEL_OFFSET;
-       else
-               return -EINVAL;
-
-       __raw_writel(reg, MXC_CCM_COSR);
-
-       return 0;
-}
-
-static int _clk_cko1_enable(struct clk *clk)
-{
-       u32 reg;
-
-       reg = __raw_readl(MXC_CCM_COSR) | MXC_CCM_COSR_CLKOEN;
-       __raw_writel(reg, MXC_CCM_COSR);
+       .get_rate = ahb_get_rate,
+};
+
+#define DEFINE_CLOCK(name, i, er, es, gr, s, p)                \
+       static struct clk name = {                      \
+               .id             = i,                    \
+               .enable_reg     = er,                   \
+               .enable_shift   = es,                   \
+               .get_rate       = gr,                   \
+               .enable         = cgr_enable,           \
+               .disable        = cgr_disable,          \
+               .secondary      = s,                    \
+               .parent         = p,                    \
+       }
 
-       return 0;
-}
+#define DEFINE_CLOCK1(name, i, er, es, getsetround, s, p)      \
+       static struct clk name = {                              \
+               .id             = i,                            \
+               .enable_reg     = er,                           \
+               .enable_shift   = es,                           \
+               .get_rate       = getsetround##_get_rate,       \
+               .set_rate       = getsetround##_set_rate,       \
+               .round_rate     = getsetround##_round_rate,     \
+               .enable         = cgr_enable,                   \
+               .disable        = cgr_disable,                  \
+               .secondary      = s,                            \
+               .parent         = p,                            \
+       }
 
-static void _clk_cko1_disable(struct clk *clk)
+DEFINE_CLOCK(perclk_clk,  0, NULL,          0, NULL, NULL, &ipg_clk);
+
+DEFINE_CLOCK(sdhc1_clk,   0, MXC_CCM_CGR0,  0, NULL, NULL, &perclk_clk);
+DEFINE_CLOCK(sdhc2_clk,   1, MXC_CCM_CGR0,  2, NULL, NULL, &perclk_clk);
+DEFINE_CLOCK(gpt_clk,     0, MXC_CCM_CGR0,  4, NULL, NULL, &perclk_clk);
+DEFINE_CLOCK(epit1_clk,   0, MXC_CCM_CGR0,  6, NULL, NULL, &perclk_clk);
+DEFINE_CLOCK(epit2_clk,   1, MXC_CCM_CGR0,  8, NULL, NULL, &perclk_clk);
+DEFINE_CLOCK(iim_clk,     0, MXC_CCM_CGR0, 10, NULL, NULL, &ipg_clk);
+DEFINE_CLOCK(ata_clk,     0, MXC_CCM_CGR0, 12, NULL, NULL, &ipg_clk);
+DEFINE_CLOCK(sdma_clk1,   0, MXC_CCM_CGR0, 14, NULL, &sdma_clk1, &ahb_clk);
+DEFINE_CLOCK(cspi3_clk,   2, MXC_CCM_CGR0, 16, NULL, NULL, &ipg_clk);
+DEFINE_CLOCK(rng_clk,     0, MXC_CCM_CGR0, 18, NULL, NULL, &ipg_clk);
+DEFINE_CLOCK(uart1_clk,   0, MXC_CCM_CGR0, 20, NULL, NULL, &perclk_clk);
+DEFINE_CLOCK(uart2_clk,   1, MXC_CCM_CGR0, 22, NULL, NULL, &perclk_clk);
+DEFINE_CLOCK(ssi1_clk,    0, MXC_CCM_CGR0, 24, ssi1_get_rate, NULL, &serial_pll_clk);
+DEFINE_CLOCK(i2c1_clk,    0, MXC_CCM_CGR0, 26, NULL, NULL, &perclk_clk);
+DEFINE_CLOCK(i2c2_clk,    1, MXC_CCM_CGR0, 28, NULL, NULL, &perclk_clk);
+DEFINE_CLOCK(i2c3_clk,    2, MXC_CCM_CGR0, 30, NULL, NULL, &perclk_clk);
+
+DEFINE_CLOCK(mpeg4_clk,   0, MXC_CCM_CGR1,  0, NULL, NULL, &ahb_clk);
+DEFINE_CLOCK(mstick1_clk, 0, MXC_CCM_CGR1,  2, mstick1_get_rate, NULL, &usb_pll_clk);
+DEFINE_CLOCK(mstick2_clk, 1, MXC_CCM_CGR1,  4, mstick2_get_rate, NULL, &usb_pll_clk);
+DEFINE_CLOCK1(csi_clk,    0, MXC_CCM_CGR1,  6, csi, NULL, &ahb_clk);
+DEFINE_CLOCK(rtc_clk,     0, MXC_CCM_CGR1,  8, NULL, NULL, &ipg_clk);
+DEFINE_CLOCK(wdog_clk,    0, MXC_CCM_CGR1, 10, NULL, NULL, &ipg_clk);
+DEFINE_CLOCK(pwm_clk,     0, MXC_CCM_CGR1, 12, NULL, NULL, &perclk_clk);
+DEFINE_CLOCK(usb_clk2,    0, MXC_CCM_CGR1, 18, usb_get_rate, NULL, &ahb_clk);
+DEFINE_CLOCK(kpp_clk,     0, MXC_CCM_CGR1, 20, NULL, NULL, &ipg_clk);
+DEFINE_CLOCK(ipu_clk,     0, MXC_CCM_CGR1, 22, hsp_get_rate, NULL, &mcu_main_clk);
+DEFINE_CLOCK(uart3_clk,   2, MXC_CCM_CGR1, 24, NULL, NULL, &perclk_clk);
+DEFINE_CLOCK(uart4_clk,   3, MXC_CCM_CGR1, 26, NULL, NULL, &perclk_clk);
+DEFINE_CLOCK(uart5_clk,   4, MXC_CCM_CGR1, 28, NULL, NULL, &perclk_clk);
+DEFINE_CLOCK(owire_clk,   0, MXC_CCM_CGR1, 30, NULL, NULL, &perclk_clk);
+
+DEFINE_CLOCK(ssi2_clk,    1, MXC_CCM_CGR2,  0, ssi2_get_rate, NULL, &serial_pll_clk);
+DEFINE_CLOCK(cspi1_clk,   0, MXC_CCM_CGR2,  2, NULL, NULL, &ipg_clk);
+DEFINE_CLOCK(cspi2_clk,   1, MXC_CCM_CGR2,  4, NULL, NULL, &ipg_clk);
+DEFINE_CLOCK(mbx_clk,     0, MXC_CCM_CGR2,  6, mbx_get_rate, NULL, &ahb_clk);
+DEFINE_CLOCK(emi_clk,     0, MXC_CCM_CGR2,  8, NULL, NULL, &ahb_clk);
+DEFINE_CLOCK(rtic_clk,    0, MXC_CCM_CGR2, 10, NULL, NULL, &ahb_clk);
+DEFINE_CLOCK1(firi_clk,   0, MXC_CCM_CGR2, 12, firi, NULL, &usb_pll_clk);
+
+DEFINE_CLOCK(sdma_clk2,   0, NULL,          0, NULL, NULL, &ipg_clk);
+DEFINE_CLOCK(usb_clk1,    0, NULL,          0, usb_get_rate, NULL, &usb_pll_clk);
+DEFINE_CLOCK(nfc_clk,     0, NULL,          0, nfc_get_rate, NULL, &ahb_clk);
+DEFINE_CLOCK(scc_clk,     0, NULL,          0, NULL, NULL, &ipg_clk);
+DEFINE_CLOCK(ipg_clk,     0, NULL,          0, ipg_get_rate, NULL, &ahb_clk);
+
+#define _REGISTER_CLOCK(d, n, c) \
+       { \
+               .dev_id = d, \
+               .con_id = n, \
+               .clk = &c, \
+       },
+
+static struct clk_lookup lookups[] __initdata = {
+       _REGISTER_CLOCK(NULL, "emi", emi_clk)
+       _REGISTER_CLOCK(NULL, "cspi", cspi1_clk)
+       _REGISTER_CLOCK(NULL, "cspi", cspi2_clk)
+       _REGISTER_CLOCK(NULL, "cspi", cspi3_clk)
+       _REGISTER_CLOCK(NULL, "gpt", gpt_clk)
+       _REGISTER_CLOCK(NULL, "pwm", pwm_clk)
+       _REGISTER_CLOCK(NULL, "wdog", wdog_clk)
+       _REGISTER_CLOCK(NULL, "rtc", rtc_clk)
+       _REGISTER_CLOCK(NULL, "epit", epit1_clk)
+       _REGISTER_CLOCK(NULL, "epit", epit2_clk)
+       _REGISTER_CLOCK("mxc_nand.0", NULL, nfc_clk)
+       _REGISTER_CLOCK("ipu-core", NULL, ipu_clk)
+       _REGISTER_CLOCK("mx3_sdc_fb", NULL, ipu_clk)
+       _REGISTER_CLOCK(NULL, "kpp", kpp_clk)
+       _REGISTER_CLOCK("fsl-usb2-udc", "usb", usb_clk1)
+       _REGISTER_CLOCK("fsl-usb2-udc", "usb_ahb", usb_clk2)
+       _REGISTER_CLOCK("mx3-camera.0", "csi", csi_clk)
+       _REGISTER_CLOCK("imx-uart.0", NULL, uart1_clk)
+       _REGISTER_CLOCK("imx-uart.1", NULL, uart2_clk)
+       _REGISTER_CLOCK("imx-uart.2", NULL, uart3_clk)
+       _REGISTER_CLOCK("imx-uart.3", NULL, uart4_clk)
+       _REGISTER_CLOCK("imx-uart.4", NULL, uart5_clk)
+       _REGISTER_CLOCK("imx-i2c.0", NULL, i2c1_clk)
+       _REGISTER_CLOCK("imx-i2c.1", NULL, i2c2_clk)
+       _REGISTER_CLOCK("imx-i2c.2", NULL, i2c3_clk)
+       _REGISTER_CLOCK("mxc_w1.0", NULL, owire_clk)
+       _REGISTER_CLOCK("mxc-mmc.0", NULL, sdhc1_clk)
+       _REGISTER_CLOCK("mxc-mmc.1", NULL, sdhc2_clk)
+       _REGISTER_CLOCK(NULL, "ssi", ssi1_clk)
+       _REGISTER_CLOCK(NULL, "ssi", ssi2_clk)
+       _REGISTER_CLOCK(NULL, "firi", firi_clk)
+       _REGISTER_CLOCK(NULL, "ata", ata_clk)
+       _REGISTER_CLOCK(NULL, "rtic", rtic_clk)
+       _REGISTER_CLOCK(NULL, "rng", rng_clk)
+       _REGISTER_CLOCK(NULL, "sdma_ahb", sdma_clk1)
+       _REGISTER_CLOCK(NULL, "sdma_ipg", sdma_clk2)
+       _REGISTER_CLOCK(NULL, "mstick", mstick1_clk)
+       _REGISTER_CLOCK(NULL, "mstick", mstick2_clk)
+       _REGISTER_CLOCK(NULL, "scc", scc_clk)
+       _REGISTER_CLOCK(NULL, "iim", iim_clk)
+       _REGISTER_CLOCK(NULL, "mpeg4", mpeg4_clk)
+       _REGISTER_CLOCK(NULL, "mbx", mbx_clk)
+};
+
+int __init mx31_clocks_init(unsigned long fref)
 {
        u32 reg;
+       int i;
 
-       reg = __raw_readl(MXC_CCM_COSR) & ~MXC_CCM_COSR_CLKOEN;
-       __raw_writel(reg, MXC_CCM_COSR);
-}
-
-static struct clk cko1_clk = {
-       .name = "cko1_clk",
-       .get_rate = _clk_cko1_get_rate,
-       .set_rate = _clk_cko1_set_rate,
-       .round_rate = _clk_cko1_round_rate,
-       .set_parent = _clk_cko1_set_parent,
-       .enable = _clk_cko1_enable,
-       .disable = _clk_cko1_disable,
-};
-
-static struct clk *mxc_clks[] = {
-       &ckih_clk,
-       &ckil_clk,
-       &mcu_pll_clk,
-       &usb_pll_clk,
-       &serial_pll_clk,
-       &mcu_main_clk,
-       &ahb_clk,
-       &per_clk,
-       &perclk_clk,
-       &cko1_clk,
-       &emi_clk,
-       &cspi_clk[0],
-       &cspi_clk[1],
-       &cspi_clk[2],
-       &ipg_clk,
-       &gpt_clk,
-       &pwm_clk,
-       &wdog_clk,
-       &rtc_clk,
-       &epit_clk[0],
-       &epit_clk[1],
-       &nfc_clk,
-       &ipu_clk,
-       &kpp_clk,
-       &usb_clk[0],
-       &usb_clk[1],
-       &csi_clk,
-       &uart_clk[0],
-       &uart_clk[1],
-       &uart_clk[2],
-       &uart_clk[3],
-       &uart_clk[4],
-       &i2c_clk[0],
-       &i2c_clk[1],
-       &i2c_clk[2],
-       &owire_clk,
-       &sdhc_clk[0],
-       &sdhc_clk[1],
-       &ssi_clk[0],
-       &ssi_clk[1],
-       &firi_clk,
-       &ata_clk,
-       &rtic_clk,
-       &rng_clk,
-       &sdma_clk[0],
-       &sdma_clk[1],
-       &mstick_clk[0],
-       &mstick_clk[1],
-       &scc_clk,
-       &iim_clk,
-};
-
-int __init mxc_clocks_init(unsigned long fref)
-{
-       u32 reg;
-       struct clk **clkp;
+       mxc_set_cpu_type(MXC_CPU_MX31);
 
        ckih_rate = fref;
 
-       for (clkp = mxc_clks; clkp < mxc_clks + ARRAY_SIZE(mxc_clks); clkp++)
-               clk_register(*clkp);
-
-       if (cpu_is_mx31()) {
-               clk_register(&mpeg4_clk);
-               clk_register(&mbx_clk);
-       } else {
-               clk_register(&vpu_clk);
-               clk_register(&vl2cc_clk);
-       }
+       for (i = 0; i < ARRAY_SIZE(lookups); i++)
+               clkdev_add(&lookups[i]);
 
        /* Turn off all possible clocks */
-       __raw_writel(MXC_CCM_CGR0_GPT_MASK, MXC_CCM_CGR0);
+       __raw_writel((3 << 4), MXC_CCM_CGR0);
        __raw_writel(0, MXC_CCM_CGR1);
-
-       __raw_writel(MXC_CCM_CGR2_EMI_MASK |
-                    MXC_CCM_CGR2_IPMUX1_MASK |
-                    MXC_CCM_CGR2_IPMUX2_MASK |
-                    MXC_CCM_CGR2_MXCCLKENSEL_MASK |    /* for MX32 */
-                    MXC_CCM_CGR2_CHIKCAMPEN_MASK |     /* for MX32 */
-                    MXC_CCM_CGR2_OVRVPUBUSY_MASK |     /* for MX32 */
+       __raw_writel((3 << 8) | (3 << 14) | (3 << 16)|
                     1 << 27 | 1 << 28, /* Bit 27 and 28 are not defined for
                                           MX32, but still required to be set */
                     MXC_CCM_CGR2);
 
-       clk_disable(&cko1_clk);
-       clk_disable(&usb_pll_clk);
+       usb_pll_disable(&usb_pll_clk);
 
        pr_info("Clock input source is %ld\n", clk_get_rate(&ckih_clk));
 
@@ -1143,6 +598,8 @@ int __init mxc_clocks_init(unsigned long fref)
                __raw_writel(reg, MXC_CCM_PMCR1);
        }
 
+       mxc_timer_init(&ipg_clk);
+
        return 0;
 }
 
index 4a0e0ede23bb629a0b26ed186b8fab92efd1a1b4..adfa3627ad842c92e67f04ea312c158ce822d205 100644 (file)
 #define MXC_CCM_PDR0_MCU_PODF_OFFSET            0
 #define MXC_CCM_PDR0_MCU_PODF_MASK              0x7
 
-#define MXC_CCM_PDR0_HSP_DIV_1                  (0x0 << 11)
-#define MXC_CCM_PDR0_HSP_DIV_2                  (0x1 << 11)
-#define MXC_CCM_PDR0_HSP_DIV_3                  (0x2 << 11)
-#define MXC_CCM_PDR0_HSP_DIV_4                  (0x3 << 11)
-#define MXC_CCM_PDR0_HSP_DIV_5                  (0x4 << 11)
-#define MXC_CCM_PDR0_HSP_DIV_6                  (0x5 << 11)
-#define MXC_CCM_PDR0_HSP_DIV_7                  (0x6 << 11)
-#define MXC_CCM_PDR0_HSP_DIV_8                  (0x7 << 11)
-
-#define MXC_CCM_PDR0_IPG_DIV_1                  (0x0 << 6)
-#define MXC_CCM_PDR0_IPG_DIV_2                  (0x1 << 6)
-#define MXC_CCM_PDR0_IPG_DIV_3                  (0x2 << 6)
-#define MXC_CCM_PDR0_IPG_DIV_4                  (0x3 << 6)
-
-#define MXC_CCM_PDR0_MAX_DIV_1                  (0x0 << 3)
-#define MXC_CCM_PDR0_MAX_DIV_2                  (0x1 << 3)
-#define MXC_CCM_PDR0_MAX_DIV_3                  (0x2 << 3)
-#define MXC_CCM_PDR0_MAX_DIV_4                  (0x3 << 3)
-#define MXC_CCM_PDR0_MAX_DIV_5                  (0x4 << 3)
-#define MXC_CCM_PDR0_MAX_DIV_6                  (0x5 << 3)
-#define MXC_CCM_PDR0_MAX_DIV_7                  (0x6 << 3)
-#define MXC_CCM_PDR0_MAX_DIV_8                  (0x7 << 3)
-
-#define MXC_CCM_PDR0_NFC_DIV_1                  (0x0 << 8)
-#define MXC_CCM_PDR0_NFC_DIV_2                  (0x1 << 8)
-#define MXC_CCM_PDR0_NFC_DIV_3                  (0x2 << 8)
-#define MXC_CCM_PDR0_NFC_DIV_4                  (0x3 << 8)
-#define MXC_CCM_PDR0_NFC_DIV_5                  (0x4 << 8)
-#define MXC_CCM_PDR0_NFC_DIV_6                  (0x5 << 8)
-#define MXC_CCM_PDR0_NFC_DIV_7                  (0x6 << 8)
-#define MXC_CCM_PDR0_NFC_DIV_8                  (0x7 << 8)
-
-#define MXC_CCM_PDR0_MCU_DIV_1                  0x0
-#define MXC_CCM_PDR0_MCU_DIV_2                  0x1
-#define MXC_CCM_PDR0_MCU_DIV_3                  0x2
-#define MXC_CCM_PDR0_MCU_DIV_4                  0x3
-#define MXC_CCM_PDR0_MCU_DIV_5                  0x4
-#define MXC_CCM_PDR0_MCU_DIV_6                  0x5
-#define MXC_CCM_PDR0_MCU_DIV_7                  0x6
-#define MXC_CCM_PDR0_MCU_DIV_8                  0x7
-
 #define MXC_CCM_PDR1_USB_PRDF_OFFSET            30
 #define MXC_CCM_PDR1_USB_PRDF_MASK              (0x3 << 30)
 #define MXC_CCM_PDR1_USB_PODF_OFFSET            27
 /* Bit definitions for RCSR */
 #define MXC_CCM_RCSR_NF16B                     0x80000000
 
-/* Bit definitions for both MCU, USB and SR PLL control registers */
-#define MXC_CCM_PCTL_BRM                        0x80000000
-#define MXC_CCM_PCTL_PD_OFFSET                  26
-#define MXC_CCM_PCTL_PD_MASK                    (0xF << 26)
-#define MXC_CCM_PCTL_MFD_OFFSET                 16
-#define MXC_CCM_PCTL_MFD_MASK                   (0x3FF << 16)
-#define MXC_CCM_PCTL_MFI_OFFSET                 10
-#define MXC_CCM_PCTL_MFI_MASK                   (0xF << 10)
-#define MXC_CCM_PCTL_MFN_OFFSET                 0
-#define MXC_CCM_PCTL_MFN_MASK                   0x3FF
-
-#define MXC_CCM_CGR0_SD_MMC1_OFFSET             0
-#define MXC_CCM_CGR0_SD_MMC1_MASK               (0x3 << 0)
-#define MXC_CCM_CGR0_SD_MMC2_OFFSET             2
-#define MXC_CCM_CGR0_SD_MMC2_MASK               (0x3 << 2)
-#define MXC_CCM_CGR0_GPT_OFFSET                 4
-#define MXC_CCM_CGR0_GPT_MASK                   (0x3 << 4)
-#define MXC_CCM_CGR0_EPIT1_OFFSET               6
-#define MXC_CCM_CGR0_EPIT1_MASK                 (0x3 << 6)
-#define MXC_CCM_CGR0_EPIT2_OFFSET               8
-#define MXC_CCM_CGR0_EPIT2_MASK                 (0x3 << 8)
-#define MXC_CCM_CGR0_IIM_OFFSET                 10
-#define MXC_CCM_CGR0_IIM_MASK                   (0x3 << 10)
-#define MXC_CCM_CGR0_ATA_OFFSET                 12
-#define MXC_CCM_CGR0_ATA_MASK                   (0x3 << 12)
-#define MXC_CCM_CGR0_SDMA_OFFSET                14
-#define MXC_CCM_CGR0_SDMA_MASK                  (0x3 << 14)
-#define MXC_CCM_CGR0_CSPI3_OFFSET               16
-#define MXC_CCM_CGR0_CSPI3_MASK                 (0x3 << 16)
-#define MXC_CCM_CGR0_RNG_OFFSET                 18
-#define MXC_CCM_CGR0_RNG_MASK                   (0x3 << 18)
-#define MXC_CCM_CGR0_UART1_OFFSET               20
-#define MXC_CCM_CGR0_UART1_MASK                 (0x3 << 20)
-#define MXC_CCM_CGR0_UART2_OFFSET               22
-#define MXC_CCM_CGR0_UART2_MASK                 (0x3 << 22)
-#define MXC_CCM_CGR0_SSI1_OFFSET                24
-#define MXC_CCM_CGR0_SSI1_MASK                  (0x3 << 24)
-#define MXC_CCM_CGR0_I2C1_OFFSET                26
-#define MXC_CCM_CGR0_I2C1_MASK                  (0x3 << 26)
-#define MXC_CCM_CGR0_I2C2_OFFSET                28
-#define MXC_CCM_CGR0_I2C2_MASK                  (0x3 << 28)
-#define MXC_CCM_CGR0_I2C3_OFFSET                30
-#define MXC_CCM_CGR0_I2C3_MASK                  (0x3 << 30)
-
-#define MXC_CCM_CGR1_HANTRO_OFFSET              0
-#define MXC_CCM_CGR1_HANTRO_MASK                (0x3 << 0)
-#define MXC_CCM_CGR1_MEMSTICK1_OFFSET           2
-#define MXC_CCM_CGR1_MEMSTICK1_MASK             (0x3 << 2)
-#define MXC_CCM_CGR1_MEMSTICK2_OFFSET           4
-#define MXC_CCM_CGR1_MEMSTICK2_MASK             (0x3 << 4)
-#define MXC_CCM_CGR1_CSI_OFFSET                 6
-#define MXC_CCM_CGR1_CSI_MASK                   (0x3 << 6)
-#define MXC_CCM_CGR1_RTC_OFFSET                 8
-#define MXC_CCM_CGR1_RTC_MASK                   (0x3 << 8)
-#define MXC_CCM_CGR1_WDOG_OFFSET                10
-#define MXC_CCM_CGR1_WDOG_MASK                  (0x3 << 10)
-#define MXC_CCM_CGR1_PWM_OFFSET                 12
-#define MXC_CCM_CGR1_PWM_MASK                   (0x3 << 12)
-#define MXC_CCM_CGR1_SIM_OFFSET                 14
-#define MXC_CCM_CGR1_SIM_MASK                   (0x3 << 14)
-#define MXC_CCM_CGR1_ECT_OFFSET                 16
-#define MXC_CCM_CGR1_ECT_MASK                   (0x3 << 16)
-#define MXC_CCM_CGR1_USBOTG_OFFSET              18
-#define MXC_CCM_CGR1_USBOTG_MASK                (0x3 << 18)
-#define MXC_CCM_CGR1_KPP_OFFSET                 20
-#define MXC_CCM_CGR1_KPP_MASK                   (0x3 << 20)
-#define MXC_CCM_CGR1_IPU_OFFSET                 22
-#define MXC_CCM_CGR1_IPU_MASK                   (0x3 << 22)
-#define MXC_CCM_CGR1_UART3_OFFSET               24
-#define MXC_CCM_CGR1_UART3_MASK                 (0x3 << 24)
-#define MXC_CCM_CGR1_UART4_OFFSET               26
-#define MXC_CCM_CGR1_UART4_MASK                 (0x3 << 26)
-#define MXC_CCM_CGR1_UART5_OFFSET               28
-#define MXC_CCM_CGR1_UART5_MASK                 (0x3 << 28)
-#define MXC_CCM_CGR1_OWIRE_OFFSET               30
-#define MXC_CCM_CGR1_OWIRE_MASK                 (0x3 << 30)
-
-#define MXC_CCM_CGR2_SSI2_OFFSET                0
-#define MXC_CCM_CGR2_SSI2_MASK                  (0x3 << 0)
-#define MXC_CCM_CGR2_CSPI1_OFFSET               2
-#define MXC_CCM_CGR2_CSPI1_MASK                 (0x3 << 2)
-#define MXC_CCM_CGR2_CSPI2_OFFSET               4
-#define MXC_CCM_CGR2_CSPI2_MASK                 (0x3 << 4)
-#define MXC_CCM_CGR2_GACC_OFFSET                6
-#define MXC_CCM_CGR2_GACC_MASK                  (0x3 << 6)
-#define MXC_CCM_CGR2_EMI_OFFSET                 8
-#define MXC_CCM_CGR2_EMI_MASK                   (0x3 << 8)
-#define MXC_CCM_CGR2_RTIC_OFFSET                10
-#define MXC_CCM_CGR2_RTIC_MASK                  (0x3 << 10)
-#define MXC_CCM_CGR2_FIRI_OFFSET                12
-#define MXC_CCM_CGR2_FIRI_MASK                  (0x3 << 12)
-#define MXC_CCM_CGR2_IPMUX1_OFFSET              14
-#define MXC_CCM_CGR2_IPMUX1_MASK                (0x3 << 14)
-#define MXC_CCM_CGR2_IPMUX2_OFFSET              16
-#define MXC_CCM_CGR2_IPMUX2_MASK                (0x3 << 16)
-
-/* These new CGR2 bits are added in MX32 */
-#define MXC_CCM_CGR2_APMSYSCLKSEL_OFFSET       18
-#define MXC_CCM_CGR2_APMSYSCLKSEL_MASK         (0x3 << 18)
-#define MXC_CCM_CGR2_APMSSICLKSEL_OFFSET       20
-#define MXC_CCM_CGR2_APMSSICLKSEL_MASK         (0x3 << 20)
-#define MXC_CCM_CGR2_APMPERCLKSEL_OFFSET       22
-#define MXC_CCM_CGR2_APMPERCLKSEL_MASK         (0x3 << 22)
-#define MXC_CCM_CGR2_MXCCLKENSEL_OFFSET                24
-#define MXC_CCM_CGR2_MXCCLKENSEL_MASK          (0x1 << 24)
-#define MXC_CCM_CGR2_CHIKCAMPEN_OFFSET         25
-#define MXC_CCM_CGR2_CHIKCAMPEN_MASK           (0x1 << 25)
-#define MXC_CCM_CGR2_OVRVPUBUSY_OFFSET         26
-#define MXC_CCM_CGR2_OVRVPUBUSY_MASK           (0x1 << 26)
-#define MXC_CCM_CGR2_APMENA_OFFSET             30
-#define MXC_CCM_CGR2_AOMENA_MASK               (0x1 << 30)
-
 /*
  * LTR0 register offsets
  */
index f8428800f28602c0e870590f32343c5128919f9f..380be0c9b213f2e7904e418067f83cbec1518b60 100644 (file)
@@ -25,6 +25,8 @@
 #include <mach/irqs.h>
 #include <mach/imx-uart.h>
 
+#include "devices.h"
+
 static struct resource uart0[] = {
        {
                .start = UART1_BASE_ADDR,
@@ -82,6 +84,7 @@ struct platform_device mxc_uart_device2 = {
        .num_resources = ARRAY_SIZE(uart2),
 };
 
+#ifdef CONFIG_ARCH_MX31
 static struct resource uart3[] = {
        {
                .start = UART4_BASE_ADDR,
@@ -119,6 +122,7 @@ struct platform_device mxc_uart_device4 = {
        .resource = uart4,
        .num_resources = ARRAY_SIZE(uart4),
 };
+#endif /* CONFIG_ARCH_MX31 */
 
 /* GPIO port description */
 static struct mxc_gpio_port imx_gpio_ports[] = {
@@ -164,8 +168,8 @@ struct platform_device mxc_w1_master_device = {
 
 static struct resource mxc_nand_resources[] = {
        {
-               .start  = NFC_BASE_ADDR,
-               .end    = NFC_BASE_ADDR + 0xfff,
+               .start  = 0, /* runtime dependent */
+               .end    = 0,
                .flags  = IORESOURCE_MEM
        }, {
                .start  = MXC_INT_NANDFC,
@@ -180,3 +184,188 @@ struct platform_device mxc_nand_device = {
        .num_resources = ARRAY_SIZE(mxc_nand_resources),
        .resource = mxc_nand_resources,
 };
+
+static struct resource mxc_i2c0_resources[] = {
+       {
+               .start = I2C_BASE_ADDR,
+               .end = I2C_BASE_ADDR + SZ_4K - 1,
+               .flags = IORESOURCE_MEM,
+       },
+       {
+               .start = MXC_INT_I2C,
+               .end = MXC_INT_I2C,
+               .flags = IORESOURCE_IRQ,
+       },
+};
+
+struct platform_device mxc_i2c_device0 = {
+       .name = "imx-i2c",
+       .id = 0,
+       .num_resources = ARRAY_SIZE(mxc_i2c0_resources),
+       .resource = mxc_i2c0_resources,
+};
+
+static struct resource mxc_i2c1_resources[] = {
+       {
+               .start = I2C2_BASE_ADDR,
+               .end = I2C2_BASE_ADDR + SZ_4K - 1,
+               .flags = IORESOURCE_MEM,
+       },
+       {
+               .start = MXC_INT_I2C2,
+               .end = MXC_INT_I2C2,
+               .flags = IORESOURCE_IRQ,
+       },
+};
+
+struct platform_device mxc_i2c_device1 = {
+       .name = "imx-i2c",
+       .id = 1,
+       .num_resources = ARRAY_SIZE(mxc_i2c1_resources),
+       .resource = mxc_i2c1_resources,
+};
+
+static struct resource mxc_i2c2_resources[] = {
+       {
+               .start = I2C3_BASE_ADDR,
+               .end = I2C3_BASE_ADDR + SZ_4K - 1,
+               .flags = IORESOURCE_MEM,
+       },
+       {
+               .start = MXC_INT_I2C3,
+               .end = MXC_INT_I2C3,
+               .flags = IORESOURCE_IRQ,
+       },
+};
+
+struct platform_device mxc_i2c_device2 = {
+       .name = "imx-i2c",
+       .id = 2,
+       .num_resources = ARRAY_SIZE(mxc_i2c2_resources),
+       .resource = mxc_i2c2_resources,
+};
+
+#ifdef CONFIG_ARCH_MX31
+static struct resource mxcsdhc0_resources[] = {
+       {
+               .start = MMC_SDHC1_BASE_ADDR,
+               .end = MMC_SDHC1_BASE_ADDR + SZ_16K - 1,
+               .flags = IORESOURCE_MEM,
+       }, {
+               .start = MXC_INT_MMC_SDHC1,
+               .end = MXC_INT_MMC_SDHC1,
+               .flags = IORESOURCE_IRQ,
+       },
+};
+
+static struct resource mxcsdhc1_resources[] = {
+       {
+               .start = MMC_SDHC2_BASE_ADDR,
+               .end = MMC_SDHC2_BASE_ADDR + SZ_16K - 1,
+               .flags = IORESOURCE_MEM,
+       }, {
+               .start = MXC_INT_MMC_SDHC2,
+               .end = MXC_INT_MMC_SDHC2,
+               .flags = IORESOURCE_IRQ,
+       },
+};
+
+struct platform_device mxcsdhc_device0 = {
+       .name = "mxc-mmc",
+       .id = 0,
+       .num_resources = ARRAY_SIZE(mxcsdhc0_resources),
+       .resource = mxcsdhc0_resources,
+};
+
+struct platform_device mxcsdhc_device1 = {
+       .name = "mxc-mmc",
+       .id = 1,
+       .num_resources = ARRAY_SIZE(mxcsdhc1_resources),
+       .resource = mxcsdhc1_resources,
+};
+#endif /* CONFIG_ARCH_MX31 */
+
+/* i.MX31 Image Processing Unit */
+
+/* The resource order is important! */
+static struct resource mx3_ipu_rsrc[] = {
+       {
+               .start = IPU_CTRL_BASE_ADDR,
+               .end = IPU_CTRL_BASE_ADDR + 0x5F,
+               .flags = IORESOURCE_MEM,
+       }, {
+               .start = IPU_CTRL_BASE_ADDR + 0x88,
+               .end = IPU_CTRL_BASE_ADDR + 0xB3,
+               .flags = IORESOURCE_MEM,
+       }, {
+               .start = MXC_INT_IPU_SYN,
+               .end = MXC_INT_IPU_SYN,
+               .flags = IORESOURCE_IRQ,
+       }, {
+               .start = MXC_INT_IPU_ERR,
+               .end = MXC_INT_IPU_ERR,
+               .flags = IORESOURCE_IRQ,
+       },
+};
+
+struct platform_device mx3_ipu = {
+       .name = "ipu-core",
+       .id = -1,
+       .num_resources = ARRAY_SIZE(mx3_ipu_rsrc),
+       .resource = mx3_ipu_rsrc,
+};
+
+static struct resource fb_resources[] = {
+       {
+               .start  = IPU_CTRL_BASE_ADDR + 0xB4,
+               .end    = IPU_CTRL_BASE_ADDR + 0x1BF,
+               .flags  = IORESOURCE_MEM,
+       },
+};
+
+struct platform_device mx3_fb = {
+       .name           = "mx3_sdc_fb",
+       .id             = -1,
+       .num_resources  = ARRAY_SIZE(fb_resources),
+       .resource       = fb_resources,
+       .dev            = {
+               .coherent_dma_mask = 0xffffffff,
+       },
+};
+
+#ifdef CONFIG_ARCH_MX35
+static struct resource mxc_fec_resources[] = {
+       {
+               .start  = MXC_FEC_BASE_ADDR,
+               .end    = MXC_FEC_BASE_ADDR + 0xfff,
+               .flags  = IORESOURCE_MEM
+       }, {
+               .start  = MXC_INT_FEC,
+               .end    = MXC_INT_FEC,
+               .flags  = IORESOURCE_IRQ
+       },
+};
+
+struct platform_device mxc_fec_device = {
+       .name = "fec",
+       .id = 0,
+       .num_resources = ARRAY_SIZE(mxc_fec_resources),
+       .resource = mxc_fec_resources,
+};
+#endif
+
+static int mx3_devices_init(void)
+{
+       if (cpu_is_mx31()) {
+               mxc_nand_resources[0].start = MX31_NFC_BASE_ADDR;
+               mxc_nand_resources[0].end = MX31_NFC_BASE_ADDR + 0xfff;
+       }
+       if (cpu_is_mx35()) {
+               mxc_nand_resources[0].start = MX35_NFC_BASE_ADDR;
+               mxc_nand_resources[0].end = MX35_NFC_BASE_ADDR + 0xfff;
+       }
+
+       return 0;
+}
+
+subsys_initcall(mx3_devices_init);
index 9949ef4e0694dfec46d1361b20691b0a90fb04a8..88c04b296fabc3ce2ee6ad3669e7d0bcc9c0edd6 100644 (file)
@@ -6,3 +6,11 @@ extern struct platform_device mxc_uart_device3;
 extern struct platform_device mxc_uart_device4;
 extern struct platform_device mxc_w1_master_device;
 extern struct platform_device mxc_nand_device;
+extern struct platform_device mxc_i2c_device0;
+extern struct platform_device mxc_i2c_device1;
+extern struct platform_device mxc_i2c_device2;
+extern struct platform_device mx3_ipu;
+extern struct platform_device mx3_fb;
+extern struct platform_device mxc_fec_device;
+extern struct platform_device mxcsdhc_device0;
+extern struct platform_device mxcsdhc_device1;
index 7a5088b519a8c6a1d077b4bd3cd997b7adde7c9f..40ffc5a664d93231c176956f0a3c927a6631a787 100644 (file)
@@ -1,6 +1,7 @@
 /*
  * Copyright 2004-2006 Freescale Semiconductor, Inc. All Rights Reserved.
  * Copyright (C) 2008 by Sascha Hauer <kernel@pengutronix.de>
+ * Copyright (C) 2009 by Valentin Longchamp <valentin.longchamp@epfl.ch>
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -21,6 +22,7 @@
 #include <linux/spinlock.h>
 #include <linux/io.h>
 #include <linux/gpio.h>
+#include <linux/kernel.h>
 #include <mach/hardware.h>
 #include <mach/gpio.h>
 #include <mach/iomux-mx3.h>
@@ -38,6 +40,8 @@
 static DEFINE_SPINLOCK(gpio_mux_lock);
 
 #define IOMUX_REG_MASK (IOMUX_PADNUM_MASK & ~0x3)
+
+unsigned long mxc_pin_alloc_map[NB_PORTS * 32 / BITS_PER_LONG];
 /*
  * set the mode for a IOMUX pin.
  */
@@ -50,9 +54,6 @@ int mxc_iomux_mode(unsigned int pin_mode)
        field = pin_mode & 0x3;
        mode = (pin_mode & IOMUX_MODE_MASK) >> IOMUX_MODE_SHIFT;
 
-       pr_debug("%s: reg offset = 0x%x field = %d mode = 0x%02x\n",
-                       __func__, (pin_mode & IOMUX_REG_MASK), field, mode);
-
        spin_lock(&gpio_mux_lock);
 
        l = __raw_readl(reg);
@@ -92,6 +93,86 @@ void mxc_iomux_set_pad(enum iomux_pins pin, u32 config)
 }
 EXPORT_SYMBOL(mxc_iomux_set_pad);
 
+/*
+ * setups a single pin:
+ *     - reserves the pin so that it is not claimed by another driver
+ *     - setups the iomux according to the configuration
+ *     - if the pin is configured as a GPIO, we claim it through kernel gpiolib
+ */
+int mxc_iomux_setup_pin(const unsigned int pin, const char *label)
+{
+       unsigned pad = pin & IOMUX_PADNUM_MASK;
+       unsigned gpio;
+
+       if (pad >= (PIN_MAX + 1)) {
+               printk(KERN_ERR "mxc_iomux: Attempt to request nonexistant pin %u for \"%s\"\n",
+                       pad, label ? label : "?");
+               return -EINVAL;
+       }
+
+       if (test_and_set_bit(pad, mxc_pin_alloc_map)) {
+               printk(KERN_ERR "mxc_iomux: pin %u already used. Allocation for \"%s\" failed\n",
+                       pad, label ? label : "?");
+               return -EINVAL;
+       }
+       mxc_iomux_mode(pin);
+
+       /* if we have a gpio, we can allocate it */
+       gpio = (pin & IOMUX_GPIONUM_MASK) >> IOMUX_GPIONUM_SHIFT;
+       if (gpio < (GPIO_PORT_MAX + 1) * 32)
+               if (gpio_request(gpio, label))
+                       return -EINVAL;
+
+       return 0;
+}
+EXPORT_SYMBOL(mxc_iomux_setup_pin);
+
+int mxc_iomux_setup_multiple_pins(unsigned int *pin_list, unsigned count,
+               const char *label)
+{
+       unsigned int *p = pin_list;
+       int i;
+       int ret = -EINVAL;
+
+       for (i = 0; i < count; i++) {
+               if (mxc_iomux_setup_pin(*p, label))
+                       goto setup_error;
+               p++;
+       }
+       return 0;
+
+setup_error:
+       mxc_iomux_release_multiple_pins(pin_list, i);
+       return ret;
+}
+EXPORT_SYMBOL(mxc_iomux_setup_multiple_pins);
+
+void mxc_iomux_release_pin(const unsigned int pin)
+{
+       unsigned pad = pin & IOMUX_PADNUM_MASK;
+       unsigned gpio;
+
+       if (pad < (PIN_MAX + 1))
+               clear_bit(pad, mxc_pin_alloc_map);
+
+       gpio = (pin & IOMUX_GPIONUM_MASK) >> IOMUX_GPIONUM_SHIFT;
+       if (gpio < (GPIO_PORT_MAX + 1) * 32)
+               gpio_free(gpio);
+}
+EXPORT_SYMBOL(mxc_iomux_release_pin);
+
+void mxc_iomux_release_multiple_pins(unsigned int *pin_list, int count)
+{
+       unsigned int *p = pin_list;
+       int i;
+
+       for (i = 0; i < count; i++) {
+               mxc_iomux_release_pin(*p);
+               p++;
+       }
+}
+EXPORT_SYMBOL(mxc_iomux_release_multiple_pins);
+
 /*
  * This function enables/disables the general purpose function for a particular
  * signal.
@@ -111,4 +192,3 @@ void mxc_iomux_set_gpr(enum iomux_gp_func gp, bool en)
        spin_unlock(&gpio_mux_lock);
 }
 EXPORT_SYMBOL(mxc_iomux_set_gpr);
-
index 0589b5cd33c7be5fd08a5a59013ada0f85ce457f..9e1459cb4b74891d960baff040476f9d322e6449 100644 (file)
 
 #include <linux/mm.h>
 #include <linux/init.h>
-#include <mach/hardware.h>
+#include <linux/err.h>
+
 #include <asm/pgtable.h>
 #include <asm/mach/map.h>
+#include <asm/hardware/cache-l2x0.h>
+
 #include <mach/common.h>
+#include <mach/hardware.h>
 
 /*!
  * @file mm.c
@@ -50,6 +54,16 @@ static struct map_desc mxc_io_desc[] __initdata = {
                .pfn            = __phys_to_pfn(AVIC_BASE_ADDR),
                .length         = AVIC_SIZE,
                .type           = MT_DEVICE_NONSHARED
+       }, {
+               .virtual        = AIPS1_BASE_ADDR_VIRT,
+               .pfn            = __phys_to_pfn(AIPS1_BASE_ADDR),
+               .length         = AIPS1_SIZE,
+               .type           = MT_DEVICE_NONSHARED
+       }, {
+               .virtual        = AIPS2_BASE_ADDR_VIRT,
+               .pfn            = __phys_to_pfn(AIPS2_BASE_ADDR),
+               .length         = AIPS2_SIZE,
+               .type           = MT_DEVICE_NONSHARED
        },
 };
 
@@ -62,3 +76,24 @@ void __init mxc_map_io(void)
 {
        iotable_init(mxc_io_desc, ARRAY_SIZE(mxc_io_desc));
 }
+
+#ifdef CONFIG_CACHE_L2X0
+static int mxc_init_l2x0(void)
+{
+       void __iomem *l2x0_base;
+
+       l2x0_base = ioremap(L2CC_BASE_ADDR, 4096);
+       if (IS_ERR(l2x0_base)) {
+               printk(KERN_ERR "remapping L2 cache area failed with %ld\n",
+                               PTR_ERR(l2x0_base));
+               return 0;
+       }
+
+       l2x0_init(l2x0_base, 0x00030024, 0x00000000);
+
+       return 0;
+}
+
+arch_initcall(mxc_init_l2x0);
+#endif
+
index f902a7c37c31d6a6519d58b4559d9f87364799c0..83e5e8e1276f62aa96dadc637b859270f13fdd69 100644 (file)
@@ -22,6 +22,8 @@
 #include <linux/init.h>
 #include <linux/clk.h>
 #include <linux/serial_8250.h>
+#include <linux/gpio.h>
+#include <linux/i2c.h>
 #include <linux/irq.h>
 
 #include <mach/hardware.h>
 #include <mach/imx-uart.h>
 #include <mach/iomux-mx3.h>
 
+#ifdef CONFIG_MACH_MX31ADS_WM1133_EV1
+#include <linux/mfd/wm8350/audio.h>
+#include <linux/mfd/wm8350/core.h>
+#include <linux/mfd/wm8350/pmic.h>
+#endif
+
 #include "devices.h"
 
 /*!
@@ -94,13 +102,16 @@ static struct imxuart_platform_data uart_pdata = {
        .flags = IMXUART_HAVE_RTSCTS,
 };
 
+static int uart_pins[] = {
+       MX31_PIN_CTS1__CTS1,
+       MX31_PIN_RTS1__RTS1,
+       MX31_PIN_TXD1__TXD1,
+       MX31_PIN_RXD1__RXD1
+};
+
 static inline void mxc_init_imx_uart(void)
 {
-       mxc_iomux_mode(MX31_PIN_CTS1__CTS1);
-       mxc_iomux_mode(MX31_PIN_RTS1__RTS1);
-       mxc_iomux_mode(MX31_PIN_TXD1__TXD1);
-       mxc_iomux_mode(MX31_PIN_RXD1__RXD1);
-
+       mxc_iomux_setup_multiple_pins(uart_pins, ARRAY_SIZE(uart_pins), "uart-0");
        mxc_register_device(&mxc_uart_device0, &uart_pdata);
 }
 #else /* !SERIAL_IMX */
@@ -176,7 +187,7 @@ static void __init mx31ads_init_expio(void)
        /*
         * Configure INT line as GPIO input
         */
-       mxc_iomux_mode(IOMUX_MODE(MX31_PIN_GPIO1_4, IOMUX_CONFIG_GPIO));
+       mxc_iomux_setup_pin(IOMUX_MODE(MX31_PIN_GPIO1_4, IOMUX_CONFIG_GPIO), "expio");
 
        /* disable the interrupt and clear the status */
        __raw_writew(0xFFFF, PBC_INTMASK_CLEAR_REG);
@@ -191,25 +202,300 @@ static void __init mx31ads_init_expio(void)
        set_irq_chained_handler(EXPIO_PARENT_INT, mx31ads_expio_irq_handler);
 }
 
+#ifdef CONFIG_MACH_MX31ADS_WM1133_EV1
+/* This section defines setup for the Wolfson Microelectronics
+ * 1133-EV1 PMU/audio board.  When other PMU boards are supported the
+ * regulator definitions may be shared with them, but for now they can
+ * only be used with this board so would generate warnings about
+ * unused statics and some of the configuration is specific to this
+ * module.
+ */
+
+/* CPU */
+static struct regulator_consumer_supply sw1a_consumers[] = {
+       {
+               .supply = "cpu_vcc",
+       }
+};
+
+static struct regulator_init_data sw1a_data = {
+       .constraints = {
+               .name = "SW1A",
+               .min_uV = 1275000,
+               .max_uV = 1600000,
+               .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
+                                 REGULATOR_CHANGE_MODE,
+               .valid_modes_mask = REGULATOR_MODE_NORMAL |
+                                   REGULATOR_MODE_FAST,
+               .state_mem = {
+                        .uV = 1400000,
+                        .mode = REGULATOR_MODE_NORMAL,
+                        .enabled = 1,
+                },
+               .initial_state = PM_SUSPEND_MEM,
+               .always_on = 1,
+               .boot_on = 1,
+       },
+       .num_consumer_supplies = ARRAY_SIZE(sw1a_consumers),
+       .consumer_supplies = sw1a_consumers,
+};
+
+/* System IO - High */
+static struct regulator_init_data viohi_data = {
+       .constraints = {
+               .name = "VIOHO",
+               .min_uV = 2800000,
+               .max_uV = 2800000,
+               .state_mem = {
+                        .uV = 2800000,
+                        .mode = REGULATOR_MODE_NORMAL,
+                        .enabled = 1,
+                },
+               .initial_state = PM_SUSPEND_MEM,
+               .always_on = 1,
+               .boot_on = 1,
+       },
+};
+
+/* System IO - Low */
+static struct regulator_init_data violo_data = {
+       .constraints = {
+               .name = "VIOLO",
+               .min_uV = 1800000,
+               .max_uV = 1800000,
+               .state_mem = {
+                        .uV = 1800000,
+                        .mode = REGULATOR_MODE_NORMAL,
+                        .enabled = 1,
+                },
+               .initial_state = PM_SUSPEND_MEM,
+               .always_on = 1,
+               .boot_on = 1,
+       },
+};
+
+/* DDR RAM */
+static struct regulator_init_data sw2a_data = {
+       .constraints = {
+               .name = "SW2A",
+               .min_uV = 1800000,
+               .max_uV = 1800000,
+               .valid_modes_mask = REGULATOR_MODE_NORMAL,
+               .state_mem = {
+                        .uV = 1800000,
+                        .mode = REGULATOR_MODE_NORMAL,
+                        .enabled = 1,
+                },
+               .state_disk = {
+                        .mode = REGULATOR_MODE_NORMAL,
+                        .enabled = 0,
+                },
+               .always_on = 1,
+               .boot_on = 1,
+               .initial_state = PM_SUSPEND_MEM,
+       },
+};
+
+static struct regulator_init_data ldo1_data = {
+       .constraints = {
+               .name = "VCAM/VMMC1/VMMC2",
+               .min_uV = 2800000,
+               .max_uV = 2800000,
+               .valid_modes_mask = REGULATOR_MODE_NORMAL,
+               .apply_uV = 1,
+       },
+};
+
+static struct regulator_consumer_supply ldo2_consumers[] = {
+       {
+               .supply = "AVDD",
+       },
+       {
+               .supply = "HPVDD",
+       },
+};
+
+/* CODEC and SIM */
+static struct regulator_init_data ldo2_data = {
+       .constraints = {
+               .name = "VESIM/VSIM/AVDD",
+               .min_uV = 3300000,
+               .max_uV = 3300000,
+               .valid_modes_mask = REGULATOR_MODE_NORMAL,
+               .apply_uV = 1,
+       },
+       .num_consumer_supplies = ARRAY_SIZE(ldo2_consumers),
+       .consumer_supplies = ldo2_consumers,
+};
+
+/* General */
+static struct regulator_init_data vdig_data = {
+       .constraints = {
+               .name = "VDIG",
+               .min_uV = 1500000,
+               .max_uV = 1500000,
+               .valid_modes_mask = REGULATOR_MODE_NORMAL,
+               .apply_uV = 1,
+               .always_on = 1,
+               .boot_on = 1,
+       },
+};
+
+/* Tranceivers */
+static struct regulator_init_data ldo4_data = {
+       .constraints = {
+               .name = "VRF1/CVDD_2.775",
+               .min_uV = 2500000,
+               .max_uV = 2500000,
+               .valid_modes_mask = REGULATOR_MODE_NORMAL,
+               .apply_uV = 1,
+               .always_on = 1,
+               .boot_on = 1,
+       },
+};
+
+static struct wm8350_led_platform_data wm8350_led_data = {
+       .name            = "wm8350:white",
+       .default_trigger = "heartbeat",
+       .max_uA          = 27899,
+};
+
+static struct wm8350_audio_platform_data imx32ads_wm8350_setup = {
+       .vmid_discharge_msecs = 1000,
+       .drain_msecs = 30,
+       .cap_discharge_msecs = 700,
+       .vmid_charge_msecs = 700,
+       .vmid_s_curve = WM8350_S_CURVE_SLOW,
+       .dis_out4 = WM8350_DISCHARGE_SLOW,
+       .dis_out3 = WM8350_DISCHARGE_SLOW,
+       .dis_out2 = WM8350_DISCHARGE_SLOW,
+       .dis_out1 = WM8350_DISCHARGE_SLOW,
+       .vroi_out4 = WM8350_TIE_OFF_500R,
+       .vroi_out3 = WM8350_TIE_OFF_500R,
+       .vroi_out2 = WM8350_TIE_OFF_500R,
+       .vroi_out1 = WM8350_TIE_OFF_500R,
+       .vroi_enable = 0,
+       .codec_current_on = WM8350_CODEC_ISEL_1_0,
+       .codec_current_standby = WM8350_CODEC_ISEL_0_5,
+       .codec_current_charge = WM8350_CODEC_ISEL_1_5,
+};
+
+static int mx31_wm8350_init(struct wm8350 *wm8350)
+{
+       int i;
+
+       wm8350_gpio_config(wm8350, 0, WM8350_GPIO_DIR_IN,
+                          WM8350_GPIO0_PWR_ON_IN, WM8350_GPIO_ACTIVE_LOW,
+                          WM8350_GPIO_PULL_UP, WM8350_GPIO_INVERT_OFF,
+                          WM8350_GPIO_DEBOUNCE_ON);
+
+       wm8350_gpio_config(wm8350, 3, WM8350_GPIO_DIR_IN,
+                          WM8350_GPIO3_PWR_OFF_IN, WM8350_GPIO_ACTIVE_HIGH,
+                          WM8350_GPIO_PULL_DOWN, WM8350_GPIO_INVERT_OFF,
+                          WM8350_GPIO_DEBOUNCE_ON);
+
+       wm8350_gpio_config(wm8350, 4, WM8350_GPIO_DIR_IN,
+                          WM8350_GPIO4_MR_IN, WM8350_GPIO_ACTIVE_HIGH,
+                          WM8350_GPIO_PULL_DOWN, WM8350_GPIO_INVERT_OFF,
+                          WM8350_GPIO_DEBOUNCE_OFF);
+
+       wm8350_gpio_config(wm8350, 7, WM8350_GPIO_DIR_IN,
+                          WM8350_GPIO7_HIBERNATE_IN, WM8350_GPIO_ACTIVE_HIGH,
+                          WM8350_GPIO_PULL_DOWN, WM8350_GPIO_INVERT_OFF,
+                          WM8350_GPIO_DEBOUNCE_OFF);
+
+       wm8350_gpio_config(wm8350, 6, WM8350_GPIO_DIR_OUT,
+                          WM8350_GPIO6_SDOUT_OUT, WM8350_GPIO_ACTIVE_HIGH,
+                          WM8350_GPIO_PULL_NONE, WM8350_GPIO_INVERT_OFF,
+                          WM8350_GPIO_DEBOUNCE_OFF);
+
+       wm8350_gpio_config(wm8350, 8, WM8350_GPIO_DIR_OUT,
+                          WM8350_GPIO8_VCC_FAULT_OUT, WM8350_GPIO_ACTIVE_LOW,
+                          WM8350_GPIO_PULL_NONE, WM8350_GPIO_INVERT_OFF,
+                          WM8350_GPIO_DEBOUNCE_OFF);
+
+       wm8350_gpio_config(wm8350, 9, WM8350_GPIO_DIR_OUT,
+                          WM8350_GPIO9_BATT_FAULT_OUT, WM8350_GPIO_ACTIVE_LOW,
+                          WM8350_GPIO_PULL_NONE, WM8350_GPIO_INVERT_OFF,
+                          WM8350_GPIO_DEBOUNCE_OFF);
+
+       /* Fix up for our own supplies. */
+       for (i = 0; i < ARRAY_SIZE(ldo2_consumers); i++)
+               ldo2_consumers[i].dev = wm8350->dev;
+
+       wm8350_register_regulator(wm8350, WM8350_DCDC_1, &sw1a_data);
+       wm8350_register_regulator(wm8350, WM8350_DCDC_3, &viohi_data);
+       wm8350_register_regulator(wm8350, WM8350_DCDC_4, &violo_data);
+       wm8350_register_regulator(wm8350, WM8350_DCDC_6, &sw2a_data);
+       wm8350_register_regulator(wm8350, WM8350_LDO_1, &ldo1_data);
+       wm8350_register_regulator(wm8350, WM8350_LDO_2, &ldo2_data);
+       wm8350_register_regulator(wm8350, WM8350_LDO_3, &vdig_data);
+       wm8350_register_regulator(wm8350, WM8350_LDO_4, &ldo4_data);
+
+       /* LEDs */
+       wm8350_dcdc_set_slot(wm8350, WM8350_DCDC_5, 1, 1,
+                            WM8350_DC5_ERRACT_SHUTDOWN_CONV);
+       wm8350_isink_set_flash(wm8350, WM8350_ISINK_A,
+                              WM8350_ISINK_FLASH_DISABLE,
+                              WM8350_ISINK_FLASH_TRIG_BIT,
+                              WM8350_ISINK_FLASH_DUR_32MS,
+                              WM8350_ISINK_FLASH_ON_INSTANT,
+                              WM8350_ISINK_FLASH_OFF_INSTANT,
+                              WM8350_ISINK_FLASH_MODE_EN);
+       wm8350_dcdc25_set_mode(wm8350, WM8350_DCDC_5,
+                              WM8350_ISINK_MODE_BOOST,
+                              WM8350_ISINK_ILIM_NORMAL,
+                              WM8350_DC5_RMP_20V,
+                              WM8350_DC5_FBSRC_ISINKA);
+       wm8350_register_led(wm8350, 0, WM8350_DCDC_5, WM8350_ISINK_A,
+                           &wm8350_led_data);
+
+       wm8350->codec.platform_data = &imx32ads_wm8350_setup;
+
+       return 0;
+}
+
+static struct wm8350_platform_data __initdata mx31_wm8350_pdata = {
+       .init = mx31_wm8350_init,
+};
+#endif
+
+#if defined(CONFIG_I2C_IMX) || defined(CONFIG_I2C_IMX_MODULE)
+static struct i2c_board_info __initdata mx31ads_i2c1_devices[] = {
+#ifdef CONFIG_MACH_MX31ADS_WM1133_EV1
+       {
+               I2C_BOARD_INFO("wm8350", 0x1a),
+               .platform_data = &mx31_wm8350_pdata,
+               .irq = IOMUX_TO_IRQ(MX31_PIN_GPIO1_3),
+       },
+#endif
+};
+
+static void mxc_init_i2c(void)
+{
+       i2c_register_board_info(1, mx31ads_i2c1_devices,
+                               ARRAY_SIZE(mx31ads_i2c1_devices));
+
+       mxc_iomux_mode(IOMUX_MODE(MX31_PIN_CSPI2_MOSI, IOMUX_CONFIG_ALT1));
+       mxc_iomux_mode(IOMUX_MODE(MX31_PIN_CSPI2_MISO, IOMUX_CONFIG_ALT1));
+
+       mxc_register_device(&mxc_i2c_device1, NULL);
+}
+#else
+static void mxc_init_i2c(void)
+{
+}
+#endif
+
 /*!
  * This structure defines static mappings for the i.MX31ADS board.
  */
 static struct map_desc mx31ads_io_desc[] __initdata = {
        {
-               .virtual        = AIPS1_BASE_ADDR_VIRT,
-               .pfn            = __phys_to_pfn(AIPS1_BASE_ADDR),
-               .length         = AIPS1_SIZE,
-               .type           = MT_DEVICE_NONSHARED
-       }, {
                .virtual        = SPBA0_BASE_ADDR_VIRT,
                .pfn            = __phys_to_pfn(SPBA0_BASE_ADDR),
                .length         = SPBA0_SIZE,
                .type           = MT_DEVICE_NONSHARED
-       }, {
-               .virtual        = AIPS2_BASE_ADDR_VIRT,
-               .pfn            = __phys_to_pfn(AIPS2_BASE_ADDR),
-               .length         = AIPS2_SIZE,
-               .type           = MT_DEVICE_NONSHARED
        }, {
                .virtual        = CS4_BASE_ADDR_VIRT,
                .pfn            = __phys_to_pfn(CS4_BASE_ADDR),
@@ -221,13 +507,13 @@ static struct map_desc mx31ads_io_desc[] __initdata = {
 /*!
  * Set up static virtual mappings.
  */
-void __init mx31ads_map_io(void)
+static void __init mx31ads_map_io(void)
 {
        mxc_map_io();
        iotable_init(mx31ads_io_desc, ARRAY_SIZE(mx31ads_io_desc));
 }
 
-void __init mx31ads_init_irq(void)
+static void __init mx31ads_init_irq(void)
 {
        mxc_init_irq();
        mx31ads_init_expio();
@@ -240,15 +526,15 @@ static void __init mxc_board_init(void)
 {
        mxc_init_extuart();
        mxc_init_imx_uart();
+       mxc_init_i2c();
 }
 
 static void __init mx31ads_timer_init(void)
 {
-       mxc_clocks_init(26000000);
-       mxc_timer_init("ipg_clk.0");
+       mx31_clocks_init(26000000);
 }
 
-struct sys_timer mx31ads_timer = {
+static struct sys_timer mx31ads_timer = {
        .init   = mx31ads_timer_init,
 };
 
index c434400701430ca1603eaecbec32071be2ce22fa..894d98cd9941a108ee6dde70d5dc00ec00f083f6 100644 (file)
  */
 static struct map_desc mx31lite_io_desc[] __initdata = {
        {
-               .virtual = AIPS1_BASE_ADDR_VIRT,
-               .pfn = __phys_to_pfn(AIPS1_BASE_ADDR),
-               .length = AIPS1_SIZE,
-               .type = MT_DEVICE_NONSHARED
-       }, {
                .virtual = SPBA0_BASE_ADDR_VIRT,
                .pfn = __phys_to_pfn(SPBA0_BASE_ADDR),
                .length = SPBA0_SIZE,
                .type = MT_DEVICE_NONSHARED
-       }, {
-               .virtual = AIPS2_BASE_ADDR_VIRT,
-               .pfn = __phys_to_pfn(AIPS2_BASE_ADDR),
-               .length = AIPS2_SIZE,
-               .type = MT_DEVICE_NONSHARED
        }, {
                .virtual = CS4_BASE_ADDR_VIRT,
                .pfn = __phys_to_pfn(CS4_BASE_ADDR),
@@ -82,8 +72,7 @@ static void __init mxc_board_init(void)
 
 static void __init mx31lite_timer_init(void)
 {
-       mxc_clocks_init(26000000);
-       mxc_timer_init("ipg_clk.0");
+       mx31_clocks_init(26000000);
 }
 
 struct sys_timer mx31lite_timer = {
diff --git a/arch/arm/mach-mx3/mx31moboard-devboard.c b/arch/arm/mach-mx3/mx31moboard-devboard.c
new file mode 100644 (file)
index 0000000..d080b4a
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2009 Valentin Longchamp, EPFL Mobots group
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include <linux/types.h>
+#include <linux/init.h>
+
+#include <linux/platform_device.h>
+
+#include <mach/hardware.h>
+#include <mach/common.h>
+#include <mach/imx-uart.h>
+#include <mach/iomux-mx3.h>
+
+#include "devices.h"
+
+static struct imxuart_platform_data uart_pdata = {
+       .flags = IMXUART_HAVE_RTSCTS,
+};
+
+static int mxc_uart1_pins[] = {
+       MX31_PIN_CTS2__CTS2, MX31_PIN_RTS2__RTS2,
+       MX31_PIN_TXD2__TXD2, MX31_PIN_RXD2__RXD2,
+};
+
+/*
+ * system init for baseboard usage. Will be called by mx31moboard init.
+ */
+void __init mx31moboard_devboard_init(void)
+{
+       printk(KERN_INFO "Initializing mx31devboard peripherals\n");
+       mxc_iomux_setup_multiple_pins(mxc_uart1_pins, ARRAY_SIZE(mxc_uart1_pins), "uart1");
+       mxc_register_device(&mxc_uart_device1, &uart_pdata);
+}
diff --git a/arch/arm/mach-mx3/mx31moboard-marxbot.c b/arch/arm/mach-mx3/mx31moboard-marxbot.c
new file mode 100644 (file)
index 0000000..9ef9566
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2009 Valentin Longchamp, EPFL Mobots group
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include <linux/types.h>
+#include <linux/init.h>
+
+#include <linux/platform_device.h>
+
+#include <mach/hardware.h>
+#include <mach/common.h>
+#include <mach/imx-uart.h>
+#include <mach/iomux-mx3.h>
+
+#include "devices.h"
+
+/*
+ * system init for baseboard usage. Will be called by mx31moboard init.
+ */
+void __init mx31moboard_marxbot_init(void)
+{
+       printk(KERN_INFO "Initializing mx31marxbot peripherals\n");
+}
index c29098af7394d7d6c7f5f537cb24b9ec2c70d2b8..34c2a1b99d4fdfbb31eafba6e4653513c9d0fef8 100644 (file)
@@ -32,6 +32,7 @@
 #include <mach/common.h>
 #include <mach/imx-uart.h>
 #include <mach/iomux-mx3.h>
+#include <mach/board-mx31moboard.h>
 
 #include "devices.h"
 
@@ -63,6 +64,18 @@ static struct platform_device *devices[] __initdata = {
        &mx31moboard_flash,
 };
 
+static int mxc_uart0_pins[] = {
+       MX31_PIN_CTS1__CTS1, MX31_PIN_RTS1__RTS1,
+       MX31_PIN_TXD1__TXD1, MX31_PIN_RXD1__RXD1,
+};
+static int mxc_uart4_pins[] = {
+       MX31_PIN_PC_RST__CTS5, MX31_PIN_PC_VS2__RTS5,
+       MX31_PIN_PC_BVD2__TXD5, MX31_PIN_PC_BVD1__RXD5,
+};
+
+static int mx31moboard_baseboard;
+core_param(mx31moboard_baseboard, mx31moboard_baseboard, int, 0444);
+
 /*
  * Board specific initialization.
  */
@@ -70,58 +83,29 @@ static void __init mxc_board_init(void)
 {
        platform_add_devices(devices, ARRAY_SIZE(devices));
 
-       mxc_iomux_mode(MX31_PIN_CTS1__CTS1);
-       mxc_iomux_mode(MX31_PIN_RTS1__RTS1);
-       mxc_iomux_mode(MX31_PIN_TXD1__TXD1);
-       mxc_iomux_mode(MX31_PIN_RXD1__RXD1);
-
+       mxc_iomux_setup_multiple_pins(mxc_uart0_pins, ARRAY_SIZE(mxc_uart0_pins), "uart0");
        mxc_register_device(&mxc_uart_device0, &uart_pdata);
 
-       mxc_iomux_mode(MX31_PIN_CTS2__CTS2);
-       mxc_iomux_mode(MX31_PIN_RTS2__RTS2);
-       mxc_iomux_mode(MX31_PIN_TXD2__TXD2);
-       mxc_iomux_mode(MX31_PIN_RXD2__RXD2);
-
-       mxc_register_device(&mxc_uart_device1, &uart_pdata);
-
-       mxc_iomux_mode(MX31_PIN_PC_RST__CTS5);
-       mxc_iomux_mode(MX31_PIN_PC_VS2__RTS5);
-       mxc_iomux_mode(MX31_PIN_PC_BVD2__TXD5);
-       mxc_iomux_mode(MX31_PIN_PC_BVD1__RXD5);
-
+       mxc_iomux_setup_multiple_pins(mxc_uart4_pins, ARRAY_SIZE(mxc_uart4_pins), "uart4");
        mxc_register_device(&mxc_uart_device4, &uart_pdata);
-}
 
-/*
- * This structure defines static mappings for the mx31moboard.
- */
-static struct map_desc mx31moboard_io_desc[] __initdata = {
-       {
-               .virtual        = AIPS1_BASE_ADDR_VIRT,
-               .pfn            = __phys_to_pfn(AIPS1_BASE_ADDR),
-               .length         = AIPS1_SIZE,
-               .type           = MT_DEVICE_NONSHARED
-       }, {
-               .virtual        = AIPS2_BASE_ADDR_VIRT,
-               .pfn            = __phys_to_pfn(AIPS2_BASE_ADDR),
-               .length         = AIPS2_SIZE,
-               .type           = MT_DEVICE_NONSHARED
-       },
-};
-
-/*
- * Set up static virtual mappings.
- */
-void __init mx31moboard_map_io(void)
-{
-       mxc_map_io();
-       iotable_init(mx31moboard_io_desc, ARRAY_SIZE(mx31moboard_io_desc));
+       switch (mx31moboard_baseboard) {
+       case MX31NOBOARD:
+               break;
+       case MX31DEVBOARD:
+               mx31moboard_devboard_init();
+               break;
+       case MX31MARXBOT:
+               mx31moboard_marxbot_init();
+               break;
+       default:
+               printk(KERN_ERR "Illegal mx31moboard_baseboard type %d\n", mx31moboard_baseboard);
+       }
 }
 
 static void __init mx31moboard_timer_init(void)
 {
-       mxc_clocks_init(26000000);
-       mxc_timer_init("ipg_clk.0");
+       mx31_clocks_init(26000000);
 }
 
 struct sys_timer mx31moboard_timer = {
@@ -133,7 +117,7 @@ MACHINE_START(MX31MOBOARD, "EPFL Mobots mx31moboard")
        .phys_io        = AIPS1_BASE_ADDR,
        .io_pg_offst    = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc,
        .boot_params    = PHYS_OFFSET + 0x100,
-       .map_io         = mx31moboard_map_io,
+       .map_io         = mxc_map_io,
        .init_irq       = mxc_init_irq,
        .init_machine   = mxc_board_init,
        .timer          = &mx31moboard_timer,
index d464d068a4a606386707226cd2f4c8e89c1cf28d..bc63f17856913205cb644ba8cffd0f72cfaa19fd 100644 (file)
@@ -45,40 +45,17 @@ static struct imxuart_platform_data uart_pdata = {
        .flags = IMXUART_HAVE_RTSCTS,
 };
 
-static inline void mxc_init_imx_uart(void)
-{
-       mxc_iomux_mode(MX31_PIN_CTS1__CTS1);
-       mxc_iomux_mode(MX31_PIN_RTS1__RTS1);
-       mxc_iomux_mode(MX31_PIN_TXD1__TXD1);
-       mxc_iomux_mode(MX31_PIN_RXD1__RXD1);
-
-       mxc_register_device(&mxc_uart_device0, &uart_pdata);
-}
-
-/*!
- * This structure defines static mappings for the i.MX31PDK board.
- */
-static struct map_desc mx31pdk_io_desc[] __initdata = {
-       {
-               .virtual        = AIPS1_BASE_ADDR_VIRT,
-               .pfn            = __phys_to_pfn(AIPS1_BASE_ADDR),
-               .length         = AIPS1_SIZE,
-               .type           = MT_DEVICE_NONSHARED
-       }, {
-               .virtual        = AIPS2_BASE_ADDR_VIRT,
-               .pfn            = __phys_to_pfn(AIPS2_BASE_ADDR),
-               .length         = AIPS2_SIZE,
-               .type           = MT_DEVICE_NONSHARED
-       },
+static int uart_pins[] = {
+       MX31_PIN_CTS1__CTS1,
+       MX31_PIN_RTS1__RTS1,
+       MX31_PIN_TXD1__TXD1,
+       MX31_PIN_RXD1__RXD1
 };
 
-/*!
- * Set up static virtual mappings.
- */
-static void __init mx31pdk_map_io(void)
+static inline void mxc_init_imx_uart(void)
 {
-       mxc_map_io();
-       iotable_init(mx31pdk_io_desc, ARRAY_SIZE(mx31pdk_io_desc));
+       mxc_iomux_setup_multiple_pins(uart_pins, ARRAY_SIZE(uart_pins), "uart-0");
+       mxc_register_device(&mxc_uart_device0, &uart_pdata);
 }
 
 /*!
@@ -91,8 +68,7 @@ static void __init mxc_board_init(void)
 
 static void __init mx31pdk_timer_init(void)
 {
-       mxc_clocks_init(26000000);
-       mxc_timer_init("ipg_clk.0");
+       mx31_clocks_init(26000000);
 }
 
 static struct sys_timer mx31pdk_timer = {
@@ -108,7 +84,7 @@ MACHINE_START(MX31_3DS, "Freescale MX31PDK (3DS)")
        .phys_io        = AIPS1_BASE_ADDR,
        .io_pg_offst    = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc,
        .boot_params    = PHYS_OFFSET + 0x100,
-       .map_io         = mx31pdk_map_io,
+       .map_io         = mxc_map_io,
        .init_irq       = mxc_init_irq,
        .init_machine   = mxc_board_init,
        .timer          = &mx31pdk_timer,
index 8cea825872221a3efd0b8f15e56a729a5764430a..5fce022114dece491665a5774945e45645030c69 100644 (file)
@@ -26,6 +26,8 @@
 #include <linux/gpio.h>
 #include <linux/smc911x.h>
 #include <linux/interrupt.h>
+#include <linux/i2c.h>
+#include <linux/i2c/at24.h>
 
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
 #include <mach/iomux-mx3.h>
 #include <mach/board-pcm037.h>
 #include <mach/mxc_nand.h>
+#include <mach/mmc.h>
+#ifdef CONFIG_I2C_IMX
+#include <mach/i2c.h>
+#endif
 
 #include "devices.h"
 
@@ -117,12 +123,90 @@ static struct mxc_nand_platform_data pcm037_nand_board_info = {
        .hw_ecc = 1,
 };
 
+#ifdef CONFIG_I2C_IMX
+static int i2c_1_pins[] = {
+       MX31_PIN_CSPI2_MOSI__SCL,
+       MX31_PIN_CSPI2_MISO__SDA,
+};
+
+static int pcm037_i2c_1_init(struct device *dev)
+{
+       return mxc_iomux_setup_multiple_pins(i2c_1_pins, ARRAY_SIZE(i2c_1_pins),
+                       "i2c-1");
+}
+
+static void pcm037_i2c_1_exit(struct device *dev)
+{
+       mxc_iomux_release_multiple_pins(i2c_1_pins, ARRAY_SIZE(i2c_1_pins));
+}
+
+static struct imxi2c_platform_data pcm037_i2c_1_data = {
+       .bitrate = 100000,
+       .init = pcm037_i2c_1_init,
+       .exit = pcm037_i2c_1_exit,
+};
+
+static struct at24_platform_data board_eeprom = {
+       .byte_len = 4096,
+       .page_size = 32,
+       .flags = AT24_FLAG_ADDR16,
+};
+
+static struct i2c_board_info pcm037_i2c_devices[] = {
+       {
+               I2C_BOARD_INFO("at24", 0x52), /* E0=0, E1=1, E2=0 */
+               .platform_data = &board_eeprom,
+       }, {
+               I2C_BOARD_INFO("rtc-pcf8563", 0x51),
+               .type = "pcf8563",
+       }
+};
+#endif
+
+static int sdhc1_pins[] = {
+       MX31_PIN_SD1_DATA3__SD1_DATA3,
+       MX31_PIN_SD1_DATA2__SD1_DATA2,
+       MX31_PIN_SD1_DATA1__SD1_DATA1,
+       MX31_PIN_SD1_DATA0__SD1_DATA0,
+       MX31_PIN_SD1_CLK__SD1_CLK,
+       MX31_PIN_SD1_CMD__SD1_CMD,
+};
+
+static int pcm970_sdhc1_init(struct device *dev, irq_handler_t h, void *data)
+{
+       return mxc_iomux_setup_multiple_pins(sdhc1_pins, ARRAY_SIZE(sdhc1_pins),
+                               "sdhc-1");
+}
+
+static void pcm970_sdhc1_exit(struct device *dev, void *data)
+{
+       mxc_iomux_release_multiple_pins(sdhc1_pins, ARRAY_SIZE(sdhc1_pins));
+}
+
+/* No card and rw detection at the moment */
+static struct imxmmc_platform_data sdhc_pdata = {
+       .init = pcm970_sdhc1_init,
+       .exit = pcm970_sdhc1_exit,
+};
+
 static struct platform_device *devices[] __initdata = {
        &pcm037_flash,
        &pcm037_eth,
        &pcm037_sram_device,
 };
 
+static int uart0_pins[] = {
+       MX31_PIN_CTS1__CTS1,
+       MX31_PIN_RTS1__RTS1,
+       MX31_PIN_TXD1__TXD1,
+       MX31_PIN_RXD1__RXD1
+};
+
+static int uart2_pins[] = {
+       MX31_PIN_CSPI3_MOSI__RXD3,
+       MX31_PIN_CSPI3_MISO__TXD3
+};
+
 /*
  * Board specific initialization.
  */
@@ -130,59 +214,33 @@ static void __init mxc_board_init(void)
 {
        platform_add_devices(devices, ARRAY_SIZE(devices));
 
-       mxc_iomux_mode(MX31_PIN_CTS1__CTS1);
-       mxc_iomux_mode(MX31_PIN_RTS1__RTS1);
-       mxc_iomux_mode(MX31_PIN_TXD1__TXD1);
-       mxc_iomux_mode(MX31_PIN_RXD1__RXD1);
-
+       mxc_iomux_setup_multiple_pins(uart0_pins, ARRAY_SIZE(uart0_pins), "uart-0");
        mxc_register_device(&mxc_uart_device0, &uart_pdata);
 
-       mxc_iomux_mode(MX31_PIN_CSPI3_MOSI__RXD3);
-       mxc_iomux_mode(MX31_PIN_CSPI3_MISO__TXD3);
-
+       mxc_iomux_setup_multiple_pins(uart2_pins, ARRAY_SIZE(uart2_pins), "uart-2");
        mxc_register_device(&mxc_uart_device2, &uart_pdata);
 
-       mxc_iomux_mode(MX31_PIN_BATT_LINE__OWIRE);
+       mxc_iomux_setup_pin(MX31_PIN_BATT_LINE__OWIRE, "batt-0wire");
        mxc_register_device(&mxc_w1_master_device, NULL);
 
        /* SMSC9215 IRQ pin */
-       mxc_iomux_mode(IOMUX_MODE(MX31_PIN_GPIO3_1, IOMUX_CONFIG_GPIO));
-       if (!gpio_request(MX31_PIN_GPIO3_1, "pcm037-eth"))
+       if (!mxc_iomux_setup_pin(IOMUX_MODE(MX31_PIN_GPIO3_1, IOMUX_CONFIG_GPIO),
+                               "pcm037-eth"))
                gpio_direction_input(MX31_PIN_GPIO3_1);
 
-       mxc_register_device(&mxc_nand_device, &pcm037_nand_board_info);
-}
+#ifdef CONFIG_I2C_IMX
+       i2c_register_board_info(1, pcm037_i2c_devices,
+                       ARRAY_SIZE(pcm037_i2c_devices));
 
-/*
- * This structure defines static mappings for the pcm037 board.
- */
-static struct map_desc pcm037_io_desc[] __initdata = {
-       {
-               .virtual        = AIPS1_BASE_ADDR_VIRT,
-               .pfn            = __phys_to_pfn(AIPS1_BASE_ADDR),
-               .length         = AIPS1_SIZE,
-               .type           = MT_DEVICE_NONSHARED
-       }, {
-               .virtual        = AIPS2_BASE_ADDR_VIRT,
-               .pfn            = __phys_to_pfn(AIPS2_BASE_ADDR),
-               .length         = AIPS2_SIZE,
-               .type           = MT_DEVICE_NONSHARED
-       },
-};
-
-/*
- * Set up static virtual mappings.
- */
-void __init pcm037_map_io(void)
-{
-       mxc_map_io();
-       iotable_init(pcm037_io_desc, ARRAY_SIZE(pcm037_io_desc));
+       mxc_register_device(&mxc_i2c_device1, &pcm037_i2c_1_data);
+#endif
+       mxc_register_device(&mxc_nand_device, &pcm037_nand_board_info);
+       mxc_register_device(&mxcsdhc_device0, &sdhc_pdata);
 }
 
 static void __init pcm037_timer_init(void)
 {
-       mxc_clocks_init(26000000);
-       mxc_timer_init("ipg_clk.0");
+       mx31_clocks_init(26000000);
 }
 
 struct sys_timer pcm037_timer = {
@@ -194,7 +252,7 @@ MACHINE_START(PCM037, "Phytec Phycore pcm037")
        .phys_io        = AIPS1_BASE_ADDR,
        .io_pg_offst    = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc,
        .boot_params    = PHYS_OFFSET + 0x100,
-       .map_io         = pcm037_map_io,
+       .map_io         = mxc_map_io,
        .init_irq       = mxc_init_irq,
        .init_machine   = mxc_board_init,
        .timer          = &pcm037_timer,
diff --git a/arch/arm/mach-mx3/qong.c b/arch/arm/mach-mx3/qong.c
new file mode 100644 (file)
index 0000000..6c4283c
--- /dev/null
@@ -0,0 +1,312 @@
+/*
+ *  Copyright (C) 2009 Ilya Yanok, Emcraft Systems Ltd, <yanok@emcraft.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include <linux/types.h>
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/memory.h>
+#include <linux/platform_device.h>
+#include <linux/mtd/physmap.h>
+#include <linux/mtd/nand.h>
+#include <linux/gpio.h>
+
+#include <mach/hardware.h>
+#include <mach/irqs.h>
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+#include <asm/mach/time.h>
+#include <asm/mach/map.h>
+#include <mach/common.h>
+#include <asm/page.h>
+#include <asm/setup.h>
+#include <mach/board-qong.h>
+#include <mach/imx-uart.h>
+#include <mach/iomux-mx3.h>
+#include "devices.h"
+
+/* FPGA defines */
+#define QONG_FPGA_VERSION(major, minor, rev)   \
+       (((major & 0xF) << 12) | ((minor & 0xF) << 8) | (rev & 0xFF))
+
+#define QONG_FPGA_BASEADDR             CS1_BASE_ADDR
+#define QONG_FPGA_PERIPH_SIZE          (1 << 24)
+
+#define QONG_FPGA_CTRL_BASEADDR                QONG_FPGA_BASEADDR
+#define QONG_FPGA_CTRL_SIZE            0x10
+/* FPGA control registers */
+#define QONG_FPGA_CTRL_VERSION         0x00
+
+#define QONG_DNET_ID           1
+#define QONG_DNET_BASEADDR     \
+       (QONG_FPGA_BASEADDR + QONG_DNET_ID * QONG_FPGA_PERIPH_SIZE)
+#define QONG_DNET_SIZE                 0x00001000
+
+#define QONG_FPGA_IRQ          IOMUX_TO_IRQ(MX31_PIN_DTR_DCE1)
+
+/*
+ * This file contains the board-specific initialization routines.
+ */
+
+static struct imxuart_platform_data uart_pdata = {
+       .flags = IMXUART_HAVE_RTSCTS,
+};
+
+static int uart_pins[] = {
+       MX31_PIN_CTS1__CTS1,
+       MX31_PIN_RTS1__RTS1,
+       MX31_PIN_TXD1__TXD1,
+       MX31_PIN_RXD1__RXD1
+};
+
+static inline void mxc_init_imx_uart(void)
+{
+       mxc_iomux_setup_multiple_pins(uart_pins, ARRAY_SIZE(uart_pins),
+                       "uart-0");
+       mxc_register_device(&mxc_uart_device0, &uart_pdata);
+}
+
+static struct resource dnet_resources[] = {
+       [0] = {
+               .name   = "dnet-memory",
+               .start  = QONG_DNET_BASEADDR,
+               .end    = QONG_DNET_BASEADDR + QONG_DNET_SIZE - 1,
+               .flags  = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start  = QONG_FPGA_IRQ,
+               .end    = QONG_FPGA_IRQ,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+static struct platform_device dnet_device = {
+       .name                   = "dnet",
+       .id                     = -1,
+       .num_resources          = ARRAY_SIZE(dnet_resources),
+       .resource               = dnet_resources,
+};
+
+static int __init qong_init_dnet(void)
+{
+       int ret;
+
+       ret = platform_device_register(&dnet_device);
+       return ret;
+}
+
+/* MTD NOR flash */
+
+static struct physmap_flash_data qong_flash_data = {
+       .width = 2,
+};
+
+static struct resource qong_flash_resource = {
+       .start = CS0_BASE_ADDR,
+       .end = CS0_BASE_ADDR + QONG_NOR_SIZE - 1,
+       .flags = IORESOURCE_MEM,
+};
+
+static struct platform_device qong_nor_mtd_device = {
+       .name = "physmap-flash",
+       .id = 0,
+       .dev = {
+               .platform_data = &qong_flash_data,
+               },
+       .resource = &qong_flash_resource,
+       .num_resources = 1,
+};
+
+static void qong_init_nor_mtd(void)
+{
+       (void)platform_device_register(&qong_nor_mtd_device);
+}
+
+/*
+ * Hardware specific access to control-lines
+ */
+static void qong_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
+{
+       struct nand_chip *nand_chip = mtd->priv;
+
+       if (cmd == NAND_CMD_NONE)
+               return;
+
+       if (ctrl & NAND_CLE)
+               writeb(cmd, nand_chip->IO_ADDR_W + (1 << 24));
+       else
+               writeb(cmd, nand_chip->IO_ADDR_W + (1 << 23));
+}
+
+/*
+ * Read the Device Ready pin.
+ */
+static int qong_nand_device_ready(struct mtd_info *mtd)
+{
+       return gpio_get_value(IOMUX_TO_GPIO(MX31_PIN_NFRB));
+}
+
+static void qong_nand_select_chip(struct mtd_info *mtd, int chip)
+{
+       if (chip >= 0)
+               gpio_set_value(IOMUX_TO_GPIO(MX31_PIN_NFCE_B), 0);
+       else
+               gpio_set_value(IOMUX_TO_GPIO(MX31_PIN_NFCE_B), 1);
+}
+
+static struct platform_nand_data qong_nand_data = {
+       .chip = {
+               .chip_delay             = 20,
+               .options                = 0,
+       },
+       .ctrl = {
+               .cmd_ctrl               = qong_nand_cmd_ctrl,
+               .dev_ready              = qong_nand_device_ready,
+               .select_chip            = qong_nand_select_chip,
+       }
+};
+
+static struct resource qong_nand_resource = {
+       .start          = CS3_BASE_ADDR,
+       .end            = CS3_BASE_ADDR + SZ_32M - 1,
+       .flags          = IORESOURCE_MEM,
+};
+
+static struct platform_device qong_nand_device = {
+       .name           = "gen_nand",
+       .id             = -1,
+       .dev            = {
+               .platform_data = &qong_nand_data,
+       },
+       .num_resources  = 1,
+       .resource       = &qong_nand_resource,
+};
+
+static void __init qong_init_nand_mtd(void)
+{
+       /* init CS */
+       __raw_writel(0x00004f00, CSCR_U(3));
+       __raw_writel(0x20013b31, CSCR_L(3));
+       __raw_writel(0x00020800, CSCR_A(3));
+       mxc_iomux_set_gpr(MUX_SDCTL_CSD1_SEL, true);
+
+       /* enable pin */
+       mxc_iomux_mode(IOMUX_MODE(MX31_PIN_NFCE_B, IOMUX_CONFIG_GPIO));
+       if (!gpio_request(IOMUX_TO_GPIO(MX31_PIN_NFCE_B), "nand_enable"))
+               gpio_direction_output(IOMUX_TO_GPIO(MX31_PIN_NFCE_B), 0);
+
+       /* ready/busy pin */
+       mxc_iomux_mode(IOMUX_MODE(MX31_PIN_NFRB, IOMUX_CONFIG_GPIO));
+       if (!gpio_request(IOMUX_TO_GPIO(MX31_PIN_NFRB), "nand_rdy"))
+               gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_NFRB));
+
+       /* write protect pin */
+       mxc_iomux_mode(IOMUX_MODE(MX31_PIN_NFWP_B, IOMUX_CONFIG_GPIO));
+       if (!gpio_request(IOMUX_TO_GPIO(MX31_PIN_NFWP_B), "nand_wp"))
+               gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_NFWP_B));
+
+       platform_device_register(&qong_nand_device);
+}
+
+static void __init qong_init_fpga(void)
+{
+       void __iomem *regs;
+       u32 fpga_ver;
+
+       regs = ioremap(QONG_FPGA_CTRL_BASEADDR, QONG_FPGA_CTRL_SIZE);
+       if (!regs) {
+               printk(KERN_ERR "%s: failed to map registers, aborting.\n",
+                               __func__);
+               return;
+       }
+
+       fpga_ver = readl(regs + QONG_FPGA_CTRL_VERSION);
+       iounmap(regs);
+       printk(KERN_INFO "Qong FPGA version %d.%d.%d\n",
+                       (fpga_ver & 0xF000) >> 12,
+                       (fpga_ver & 0x0F00) >> 8, fpga_ver & 0x00FF);
+       if (fpga_ver < QONG_FPGA_VERSION(0, 8, 7)) {
+               printk(KERN_ERR "qong: Unexpected FPGA version, FPGA-based "
+                               "devices won't be registered!\n");
+               return;
+       }
+
+       /* register FPGA-based devices */
+       qong_init_nand_mtd();
+       qong_init_dnet();
+}
+
+/*
+ * This structure defines the MX31 memory map.
+ */
+static struct map_desc qong_io_desc[] __initdata = {
+       {
+               .virtual = AIPS1_BASE_ADDR_VIRT,
+               .pfn = __phys_to_pfn(AIPS1_BASE_ADDR),
+               .length = AIPS1_SIZE,
+               .type = MT_DEVICE_NONSHARED
+       }, {
+               .virtual = AIPS2_BASE_ADDR_VIRT,
+               .pfn = __phys_to_pfn(AIPS2_BASE_ADDR),
+               .length = AIPS2_SIZE,
+               .type = MT_DEVICE_NONSHARED
+       }
+};
+
+/*
+ * Set up static virtual mappings.
+ */
+static void __init qong_map_io(void)
+{
+       mxc_map_io();
+       iotable_init(qong_io_desc, ARRAY_SIZE(qong_io_desc));
+}
+
+/*
+ * Board specific initialization.
+ */
+static void __init mxc_board_init(void)
+{
+       mxc_init_imx_uart();
+       qong_init_nor_mtd();
+       qong_init_fpga();
+}
+
+static void __init qong_timer_init(void)
+{
+       mx31_clocks_init(26000000);
+}
+
+static struct sys_timer qong_timer = {
+       .init   = qong_timer_init,
+};
+
+/*
+ * The following uses standard kernel macros defined in arch.h in order to
+ * initialize __mach_desc_QONG data structure.
+ */
+
+MACHINE_START(QONG, "Dave/DENX QongEVB-LITE")
+       /* Maintainer: DENX Software Engineering GmbH */
+       .phys_io        = AIPS1_BASE_ADDR,
+       .io_pg_offst    = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc,
+       .boot_params    = PHYS_OFFSET + 0x100,
+       .map_io         = qong_map_io,
+       .init_irq       = mxc_init_irq,
+       .init_machine   = mxc_board_init,
+       .timer          = &qong_timer,
+MACHINE_END
index 6c1023b8a9ab73a63848b684809a4e4ccebcad37..dc7b4bc003c58182357ce5ce0aff477c82a0de63 100644 (file)
@@ -28,7 +28,7 @@ static inline void arch_idle(void)
        cpu_do_idle();
 }
 
-static inline void arch_reset(char mode)
+static inline void arch_reset(char mode, const char *cmd)
 {
        writel(NETX_SYSTEM_RES_CR_FIRMW_RES_EN | NETX_SYSTEM_RES_CR_FIRMW_RES,
               NETX_SYSTEM_RES_CR);
index e2068c57415fd17440e4503763f4b1cb5412c957..1561588ca364bf10978f3a90dd147beda3bddefe 100644 (file)
@@ -20,7 +20,7 @@ static inline void arch_idle(void)
        cpu_do_idle();
 }
 
-static inline void arch_reset(char mode)
+static inline void arch_reset(char mode, const char *cmd)
 {
 #ifdef CONFIG_PROCESSOR_NS9360
        if (processor_is_ns9360())
index 5fba207317100f4ed3cacb9361e134a4e75ee926..dafe4f71d15f2a4785f076d444a58e529480e176 100644 (file)
 #include <linux/io.h>
 
 #include <asm/mach-types.h>
+#include <asm/clkdev.h>
 
 #include <mach/cpu.h>
 #include <mach/usb.h>
 #include <mach/clock.h>
 #include <mach/sram.h>
 
+static const struct clkops clkops_generic;
+static const struct clkops clkops_uart;
+static const struct clkops clkops_dspck;
+
 #include "clock.h"
 
+static int clk_omap1_dummy_enable(struct clk *clk)
+{
+       return 0;
+}
+
+static void clk_omap1_dummy_disable(struct clk *clk)
+{
+}
+
+static const struct clkops clkops_dummy = {
+       .enable = clk_omap1_dummy_enable,
+       .disable = clk_omap1_dummy_disable,
+};
+
+static struct clk dummy_ck = {
+       .name   = "dummy",
+       .ops    = &clkops_dummy,
+       .flags  = RATE_FIXED,
+};
+
+struct omap_clk {
+       u32             cpu;
+       struct clk_lookup lk;
+};
+
+#define CLK(dev, con, ck, cp)          \
+       {                               \
+                .cpu = cp,             \
+               .lk = {                 \
+                       .dev_id = dev,  \
+                       .con_id = con,  \
+                       .clk = ck,      \
+               },                      \
+       }
+
+#define CK_310 (1 << 0)
+#define CK_730 (1 << 1)
+#define CK_1510        (1 << 2)
+#define CK_16XX        (1 << 3)
+
+static struct omap_clk omap_clks[] = {
+       /* non-ULPD clocks */
+       CLK(NULL,       "ck_ref",       &ck_ref,        CK_16XX | CK_1510 | CK_310),
+       CLK(NULL,       "ck_dpll1",     &ck_dpll1,      CK_16XX | CK_1510 | CK_310),
+       /* CK_GEN1 clocks */
+       CLK(NULL,       "ck_dpll1out",  &ck_dpll1out.clk, CK_16XX),
+       CLK(NULL,       "ck_sossi",     &sossi_ck,      CK_16XX),
+       CLK(NULL,       "arm_ck",       &arm_ck,        CK_16XX | CK_1510 | CK_310),
+       CLK(NULL,       "armper_ck",    &armper_ck.clk, CK_16XX | CK_1510 | CK_310),
+       CLK(NULL,       "arm_gpio_ck",  &arm_gpio_ck,   CK_1510 | CK_310),
+       CLK(NULL,       "armxor_ck",    &armxor_ck.clk, CK_16XX | CK_1510 | CK_310),
+       CLK(NULL,       "armtim_ck",    &armtim_ck.clk, CK_16XX | CK_1510 | CK_310),
+       CLK("omap_wdt", "fck",          &armwdt_ck.clk, CK_16XX | CK_1510 | CK_310),
+       CLK("omap_wdt", "ick",          &armper_ck.clk, CK_16XX),
+       CLK("omap_wdt", "ick",          &dummy_ck,      CK_1510 | CK_310),
+       CLK(NULL,       "arminth_ck",   &arminth_ck1510, CK_1510 | CK_310),
+       CLK(NULL,       "arminth_ck",   &arminth_ck16xx, CK_16XX),
+       /* CK_GEN2 clocks */
+       CLK(NULL,       "dsp_ck",       &dsp_ck,        CK_16XX | CK_1510 | CK_310),
+       CLK(NULL,       "dspmmu_ck",    &dspmmu_ck,     CK_16XX | CK_1510 | CK_310),
+       CLK(NULL,       "dspper_ck",    &dspper_ck,     CK_16XX | CK_1510 | CK_310),
+       CLK(NULL,       "dspxor_ck",    &dspxor_ck,     CK_16XX | CK_1510 | CK_310),
+       CLK(NULL,       "dsptim_ck",    &dsptim_ck,     CK_16XX | CK_1510 | CK_310),
+       /* CK_GEN3 clocks */
+       CLK(NULL,       "tc_ck",        &tc_ck.clk,     CK_16XX | CK_1510 | CK_310 | CK_730),
+       CLK(NULL,       "tipb_ck",      &tipb_ck,       CK_1510 | CK_310),
+       CLK(NULL,       "l3_ocpi_ck",   &l3_ocpi_ck,    CK_16XX),
+       CLK(NULL,       "tc1_ck",       &tc1_ck,        CK_16XX),
+       CLK(NULL,       "tc2_ck",       &tc2_ck,        CK_16XX),
+       CLK(NULL,       "dma_ck",       &dma_ck,        CK_16XX | CK_1510 | CK_310),
+       CLK(NULL,       "dma_lcdfree_ck", &dma_lcdfree_ck, CK_16XX),
+       CLK(NULL,       "api_ck",       &api_ck.clk,    CK_16XX | CK_1510 | CK_310),
+       CLK(NULL,       "lb_ck",        &lb_ck.clk,     CK_1510 | CK_310),
+       CLK(NULL,       "rhea1_ck",     &rhea1_ck,      CK_16XX),
+       CLK(NULL,       "rhea2_ck",     &rhea2_ck,      CK_16XX),
+       CLK(NULL,       "lcd_ck",       &lcd_ck_16xx,   CK_16XX | CK_730),
+       CLK(NULL,       "lcd_ck",       &lcd_ck_1510.clk, CK_1510 | CK_310),
+       /* ULPD clocks */
+       CLK(NULL,       "uart1_ck",     &uart1_1510,    CK_1510 | CK_310),
+       CLK(NULL,       "uart1_ck",     &uart1_16xx.clk, CK_16XX),
+       CLK(NULL,       "uart2_ck",     &uart2_ck,      CK_16XX | CK_1510 | CK_310),
+       CLK(NULL,       "uart3_ck",     &uart3_1510,    CK_1510 | CK_310),
+       CLK(NULL,       "uart3_ck",     &uart3_16xx.clk, CK_16XX),
+       CLK(NULL,       "usb_clko",     &usb_clko,      CK_16XX | CK_1510 | CK_310),
+       CLK(NULL,       "usb_hhc_ck",   &usb_hhc_ck1510, CK_1510 | CK_310),
+       CLK(NULL,       "usb_hhc_ck",   &usb_hhc_ck16xx, CK_16XX),
+       CLK(NULL,       "usb_dc_ck",    &usb_dc_ck,     CK_16XX),
+       CLK(NULL,       "mclk",         &mclk_1510,     CK_1510 | CK_310),
+       CLK(NULL,       "mclk",         &mclk_16xx,     CK_16XX),
+       CLK(NULL,       "bclk",         &bclk_1510,     CK_1510 | CK_310),
+       CLK(NULL,       "bclk",         &bclk_16xx,     CK_16XX),
+       CLK("mmci-omap.0", "fck",       &mmc1_ck,       CK_16XX | CK_1510 | CK_310),
+       CLK("mmci-omap.0", "ick",       &armper_ck.clk, CK_16XX | CK_1510 | CK_310),
+       CLK("mmci-omap.1", "fck",       &mmc2_ck,       CK_16XX),
+       CLK("mmci-omap.1", "ick",       &armper_ck.clk, CK_16XX),
+       /* Virtual clocks */
+       CLK(NULL,       "mpu",          &virtual_ck_mpu, CK_16XX | CK_1510 | CK_310),
+       CLK("i2c_omap.1", "fck",        &i2c_fck,       CK_16XX | CK_1510 | CK_310),
+       CLK("i2c_omap.1", "ick",        &i2c_ick,       CK_16XX),
+       CLK("i2c_omap.1", "ick",        &dummy_ck,      CK_1510 | CK_310),
+       CLK("omap_uwire", "fck",        &armxor_ck.clk, CK_16XX | CK_1510 | CK_310),
+       CLK("omap-mcbsp.1", "ick",      &dspper_ck,     CK_16XX),
+       CLK("omap-mcbsp.1", "ick",      &dummy_ck,      CK_1510 | CK_310),
+       CLK("omap-mcbsp.2", "ick",      &armper_ck.clk, CK_16XX),
+       CLK("omap-mcbsp.2", "ick",      &dummy_ck,      CK_1510 | CK_310),
+       CLK("omap-mcbsp.3", "ick",      &dspper_ck,     CK_16XX),
+       CLK("omap-mcbsp.3", "ick",      &dummy_ck,      CK_1510 | CK_310),
+       CLK("omap-mcbsp.1", "fck",      &dspxor_ck,     CK_16XX | CK_1510 | CK_310),
+       CLK("omap-mcbsp.2", "fck",      &armper_ck.clk, CK_16XX | CK_1510 | CK_310),
+       CLK("omap-mcbsp.3", "fck",      &dspxor_ck,     CK_16XX | CK_1510 | CK_310),
+};
+
+static int omap1_clk_enable_generic(struct clk * clk);
+static int omap1_clk_enable(struct clk *clk);
+static void omap1_clk_disable_generic(struct clk * clk);
+static void omap1_clk_disable(struct clk *clk);
+
 __u32 arm_idlect1_mask;
 
 /*-------------------------------------------------------------------------
  * Omap1 specific clock functions
  *-------------------------------------------------------------------------*/
 
-static void omap1_watchdog_recalc(struct clk * clk)
+static unsigned long omap1_watchdog_recalc(struct clk *clk)
 {
-       clk->rate = clk->parent->rate / 14;
+       return clk->parent->rate / 14;
 }
 
-static void omap1_uart_recalc(struct clk * clk)
+static unsigned long omap1_uart_recalc(struct clk *clk)
 {
-       unsigned int val = omap_readl(clk->enable_reg);
-       if (val & clk->enable_bit)
-               clk->rate = 48000000;
-       else
-               clk->rate = 12000000;
+       unsigned int val = __raw_readl(clk->enable_reg);
+       return val & clk->enable_bit ? 48000000 : 12000000;
 }
 
-static void omap1_sossi_recalc(struct clk *clk)
+static unsigned long omap1_sossi_recalc(struct clk *clk)
 {
        u32 div = omap_readl(MOD_CONF_CTRL_1);
 
        div = (div >> 17) & 0x7;
        div++;
-       clk->rate = clk->parent->rate / div;
+
+       return clk->parent->rate / div;
 }
 
 static int omap1_clk_enable_dsp_domain(struct clk *clk)
@@ -78,6 +198,11 @@ static void omap1_clk_disable_dsp_domain(struct clk *clk)
        }
 }
 
+static const struct clkops clkops_dspck = {
+       .enable         = &omap1_clk_enable_dsp_domain,
+       .disable        = &omap1_clk_disable_dsp_domain,
+};
+
 static int omap1_clk_enable_uart_functional(struct clk *clk)
 {
        int ret;
@@ -105,6 +230,11 @@ static void omap1_clk_disable_uart_functional(struct clk *clk)
        omap1_clk_disable_generic(clk);
 }
 
+static const struct clkops clkops_uart = {
+       .enable         = &omap1_clk_enable_uart_functional,
+       .disable        = &omap1_clk_disable_uart_functional,
+};
+
 static void omap1_clk_allow_idle(struct clk *clk)
 {
        struct arm_idlect1_clk * iclk = (struct arm_idlect1_clk *)clk;
@@ -197,9 +327,6 @@ static int calc_dsor_exp(struct clk *clk, unsigned long rate)
        struct clk * parent;
        unsigned  dsor_exp;
 
-       if (unlikely(!(clk->flags & RATE_CKCTL)))
-               return -EINVAL;
-
        parent = clk->parent;
        if (unlikely(parent == NULL))
                return -EIO;
@@ -215,22 +342,15 @@ static int calc_dsor_exp(struct clk *clk, unsigned long rate)
        return dsor_exp;
 }
 
-static void omap1_ckctl_recalc(struct clk * clk)
+static unsigned long omap1_ckctl_recalc(struct clk *clk)
 {
-       int dsor;
-
        /* Calculate divisor encoded as 2-bit exponent */
-       dsor = 1 << (3 & (omap_readw(ARM_CKCTL) >> clk->rate_offset));
+       int dsor = 1 << (3 & (omap_readw(ARM_CKCTL) >> clk->rate_offset));
 
-       if (unlikely(clk->rate == clk->parent->rate / dsor))
-               return; /* No change, quick exit */
-       clk->rate = clk->parent->rate / dsor;
-
-       if (unlikely(clk->flags & RATE_PROPAGATES))
-               propagate_rate(clk);
+       return clk->parent->rate / dsor;
 }
 
-static void omap1_ckctl_recalc_dsp_domain(struct clk * clk)
+static unsigned long omap1_ckctl_recalc_dsp_domain(struct clk *clk)
 {
        int dsor;
 
@@ -245,12 +365,7 @@ static void omap1_ckctl_recalc_dsp_domain(struct clk * clk)
        dsor = 1 << (3 & (__raw_readw(DSP_CKCTL) >> clk->rate_offset));
        omap1_clk_disable(&api_ck.clk);
 
-       if (unlikely(clk->rate == clk->parent->rate / dsor))
-               return; /* No change, quick exit */
-       clk->rate = clk->parent->rate / dsor;
-
-       if (unlikely(clk->flags & RATE_PROPAGATES))
-               propagate_rate(clk);
+       return clk->parent->rate / dsor;
 }
 
 /* MPU virtual clock functions */
@@ -289,35 +404,57 @@ static int omap1_select_table_rate(struct clk * clk, unsigned long rate)
                omap_sram_reprogram_clock(ptr->dpllctl_val, ptr->ckctl_val);
 
        ck_dpll1.rate = ptr->pll_rate;
-       propagate_rate(&ck_dpll1);
        return 0;
 }
 
 static int omap1_clk_set_rate_dsp_domain(struct clk *clk, unsigned long rate)
 {
-       int  ret = -EINVAL;
-       int  dsor_exp;
-       __u16  regval;
-
-       if (clk->flags & RATE_CKCTL) {
-               dsor_exp = calc_dsor_exp(clk, rate);
-               if (dsor_exp > 3)
-                       dsor_exp = -EINVAL;
-               if (dsor_exp < 0)
-                       return dsor_exp;
-
-               regval = __raw_readw(DSP_CKCTL);
-               regval &= ~(3 << clk->rate_offset);
-               regval |= dsor_exp << clk->rate_offset;
-               __raw_writew(regval, DSP_CKCTL);
-               clk->rate = clk->parent->rate / (1 << dsor_exp);
-               ret = 0;
-       }
+       int dsor_exp;
+       u16 regval;
 
-       if (unlikely(ret == 0 && (clk->flags & RATE_PROPAGATES)))
-               propagate_rate(clk);
+       dsor_exp = calc_dsor_exp(clk, rate);
+       if (dsor_exp > 3)
+               dsor_exp = -EINVAL;
+       if (dsor_exp < 0)
+               return dsor_exp;
 
-       return ret;
+       regval = __raw_readw(DSP_CKCTL);
+       regval &= ~(3 << clk->rate_offset);
+       regval |= dsor_exp << clk->rate_offset;
+       __raw_writew(regval, DSP_CKCTL);
+       clk->rate = clk->parent->rate / (1 << dsor_exp);
+
+       return 0;
+}
+
+static long omap1_clk_round_rate_ckctl_arm(struct clk *clk, unsigned long rate)
+{
+       int dsor_exp = calc_dsor_exp(clk, rate);
+       if (dsor_exp < 0)
+               return dsor_exp;
+       if (dsor_exp > 3)
+               dsor_exp = 3;
+       return clk->parent->rate / (1 << dsor_exp);
+}
+
+static int omap1_clk_set_rate_ckctl_arm(struct clk *clk, unsigned long rate)
+{
+       int dsor_exp;
+       u16 regval;
+
+       dsor_exp = calc_dsor_exp(clk, rate);
+       if (dsor_exp > 3)
+               dsor_exp = -EINVAL;
+       if (dsor_exp < 0)
+               return dsor_exp;
+
+       regval = omap_readw(ARM_CKCTL);
+       regval &= ~(3 << clk->rate_offset);
+       regval |= dsor_exp << clk->rate_offset;
+       regval = verify_ckctl_value(regval);
+       omap_writew(regval, ARM_CKCTL);
+       clk->rate = clk->parent->rate / (1 << dsor_exp);
+       return 0;
 }
 
 static long omap1_round_to_table_rate(struct clk * clk, unsigned long rate)
@@ -372,14 +509,14 @@ static int omap1_set_uart_rate(struct clk * clk, unsigned long rate)
 {
        unsigned int val;
 
-       val = omap_readl(clk->enable_reg);
+       val = __raw_readl(clk->enable_reg);
        if (rate == 12000000)
                val &= ~(1 << clk->enable_bit);
        else if (rate == 48000000)
                val |= (1 << clk->enable_bit);
        else
                return -EINVAL;
-       omap_writel(val, clk->enable_reg);
+       __raw_writel(val, clk->enable_reg);
        clk->rate = rate;
 
        return 0;
@@ -398,8 +535,8 @@ static int omap1_set_ext_clk_rate(struct clk * clk, unsigned long rate)
        else
                ratio_bits = (dsor - 2) << 2;
 
-       ratio_bits |= omap_readw(clk->enable_reg) & ~0xfd;
-       omap_writew(ratio_bits, clk->enable_reg);
+       ratio_bits |= __raw_readw(clk->enable_reg) & ~0xfd;
+       __raw_writew(ratio_bits, clk->enable_reg);
 
        return 0;
 }
@@ -423,8 +560,6 @@ static int omap1_set_sossi_rate(struct clk *clk, unsigned long rate)
        omap_writel(l, MOD_CONF_CTRL_1);
 
        clk->rate = p_rate / (div + 1);
-       if (unlikely(clk->flags & RATE_PROPAGATES))
-               propagate_rate(clk);
 
        return 0;
 }
@@ -440,8 +575,8 @@ static void omap1_init_ext_clk(struct clk * clk)
        __u16 ratio_bits;
 
        /* Determine current rate and ensure clock is based on 96MHz APLL */
-       ratio_bits = omap_readw(clk->enable_reg) & ~1;
-       omap_writew(ratio_bits, clk->enable_reg);
+       ratio_bits = __raw_readw(clk->enable_reg) & ~1;
+       __raw_writew(ratio_bits, clk->enable_reg);
 
        ratio_bits = (ratio_bits & 0xfc) >> 2;
        if (ratio_bits > 6)
@@ -468,7 +603,7 @@ static int omap1_clk_enable(struct clk *clk)
                                omap1_clk_deny_idle(clk->parent);
                }
 
-               ret = clk->enable(clk);
+               ret = clk->ops->enable(clk);
 
                if (unlikely(ret != 0) && clk->parent) {
                        omap1_clk_disable(clk->parent);
@@ -482,7 +617,7 @@ static int omap1_clk_enable(struct clk *clk)
 static void omap1_clk_disable(struct clk *clk)
 {
        if (clk->usecount > 0 && !(--clk->usecount)) {
-               clk->disable(clk);
+               clk->ops->disable(clk);
                if (likely(clk->parent)) {
                        omap1_clk_disable(clk->parent);
                        if (clk->flags & CLOCK_NO_IDLE_PARENT)
@@ -496,9 +631,6 @@ static int omap1_clk_enable_generic(struct clk *clk)
        __u16 regval16;
        __u32 regval32;
 
-       if (clk->flags & ALWAYS_ENABLED)
-               return 0;
-
        if (unlikely(clk->enable_reg == NULL)) {
                printk(KERN_ERR "clock.c: Enable for %s without enable code\n",
                       clk->name);
@@ -506,25 +638,13 @@ static int omap1_clk_enable_generic(struct clk *clk)
        }
 
        if (clk->flags & ENABLE_REG_32BIT) {
-               if (clk->flags & VIRTUAL_IO_ADDRESS) {
-                       regval32 = __raw_readl(clk->enable_reg);
-                       regval32 |= (1 << clk->enable_bit);
-                       __raw_writel(regval32, clk->enable_reg);
-               } else {
-                       regval32 = omap_readl(clk->enable_reg);
-                       regval32 |= (1 << clk->enable_bit);
-                       omap_writel(regval32, clk->enable_reg);
-               }
+               regval32 = __raw_readl(clk->enable_reg);
+               regval32 |= (1 << clk->enable_bit);
+               __raw_writel(regval32, clk->enable_reg);
        } else {
-               if (clk->flags & VIRTUAL_IO_ADDRESS) {
-                       regval16 = __raw_readw(clk->enable_reg);
-                       regval16 |= (1 << clk->enable_bit);
-                       __raw_writew(regval16, clk->enable_reg);
-               } else {
-                       regval16 = omap_readw(clk->enable_reg);
-                       regval16 |= (1 << clk->enable_bit);
-                       omap_writew(regval16, clk->enable_reg);
-               }
+               regval16 = __raw_readw(clk->enable_reg);
+               regval16 |= (1 << clk->enable_bit);
+               __raw_writew(regval16, clk->enable_reg);
        }
 
        return 0;
@@ -539,44 +659,26 @@ static void omap1_clk_disable_generic(struct clk *clk)
                return;
 
        if (clk->flags & ENABLE_REG_32BIT) {
-               if (clk->flags & VIRTUAL_IO_ADDRESS) {
-                       regval32 = __raw_readl(clk->enable_reg);
-                       regval32 &= ~(1 << clk->enable_bit);
-                       __raw_writel(regval32, clk->enable_reg);
-               } else {
-                       regval32 = omap_readl(clk->enable_reg);
-                       regval32 &= ~(1 << clk->enable_bit);
-                       omap_writel(regval32, clk->enable_reg);
-               }
+               regval32 = __raw_readl(clk->enable_reg);
+               regval32 &= ~(1 << clk->enable_bit);
+               __raw_writel(regval32, clk->enable_reg);
        } else {
-               if (clk->flags & VIRTUAL_IO_ADDRESS) {
-                       regval16 = __raw_readw(clk->enable_reg);
-                       regval16 &= ~(1 << clk->enable_bit);
-                       __raw_writew(regval16, clk->enable_reg);
-               } else {
-                       regval16 = omap_readw(clk->enable_reg);
-                       regval16 &= ~(1 << clk->enable_bit);
-                       omap_writew(regval16, clk->enable_reg);
-               }
+               regval16 = __raw_readw(clk->enable_reg);
+               regval16 &= ~(1 << clk->enable_bit);
+               __raw_writew(regval16, clk->enable_reg);
        }
 }
 
+static const struct clkops clkops_generic = {
+       .enable         = &omap1_clk_enable_generic,
+       .disable        = &omap1_clk_disable_generic,
+};
+
 static long omap1_clk_round_rate(struct clk *clk, unsigned long rate)
 {
-       int dsor_exp;
-
        if (clk->flags & RATE_FIXED)
                return clk->rate;
 
-       if (clk->flags & RATE_CKCTL) {
-               dsor_exp = calc_dsor_exp(clk, rate);
-               if (dsor_exp < 0)
-                       return dsor_exp;
-               if (dsor_exp > 3)
-                       dsor_exp = 3;
-               return clk->parent->rate / (1 << dsor_exp);
-       }
-
        if (clk->round_rate != NULL)
                return clk->round_rate(clk, rate);
 
@@ -586,30 +688,9 @@ static long omap1_clk_round_rate(struct clk *clk, unsigned long rate)
 static int omap1_clk_set_rate(struct clk *clk, unsigned long rate)
 {
        int  ret = -EINVAL;
-       int  dsor_exp;
-       __u16  regval;
 
        if (clk->set_rate)
                ret = clk->set_rate(clk, rate);
-       else if (clk->flags & RATE_CKCTL) {
-               dsor_exp = calc_dsor_exp(clk, rate);
-               if (dsor_exp > 3)
-                       dsor_exp = -EINVAL;
-               if (dsor_exp < 0)
-                       return dsor_exp;
-
-               regval = omap_readw(ARM_CKCTL);
-               regval &= ~(3 << clk->rate_offset);
-               regval |= dsor_exp << clk->rate_offset;
-               regval = verify_ckctl_value(regval);
-               omap_writew(regval, ARM_CKCTL);
-               clk->rate = clk->parent->rate / (1 << dsor_exp);
-               ret = 0;
-       }
-
-       if (unlikely(ret == 0 && (clk->flags & RATE_PROPAGATES)))
-               propagate_rate(clk);
-
        return ret;
 }
 
@@ -632,17 +713,10 @@ static void __init omap1_clk_disable_unused(struct clk *clk)
        }
 
        /* Is the clock already disabled? */
-       if (clk->flags & ENABLE_REG_32BIT) {
-               if (clk->flags & VIRTUAL_IO_ADDRESS)
-                       regval32 = __raw_readl(clk->enable_reg);
-                       else
-                               regval32 = omap_readl(clk->enable_reg);
-       } else {
-               if (clk->flags & VIRTUAL_IO_ADDRESS)
-                       regval32 = __raw_readw(clk->enable_reg);
-               else
-                       regval32 = omap_readw(clk->enable_reg);
-       }
+       if (clk->flags & ENABLE_REG_32BIT)
+               regval32 = __raw_readl(clk->enable_reg);
+       else
+               regval32 = __raw_readw(clk->enable_reg);
 
        if ((regval32 & (1 << clk->enable_bit)) == 0)
                return;
@@ -659,7 +733,7 @@ static void __init omap1_clk_disable_unused(struct clk *clk)
        }
 
        printk(KERN_INFO "Disabling unused clock \"%s\"... ", clk->name);
-       clk->disable(clk);
+       clk->ops->disable(clk);
        printk(" done\n");
 }
 
@@ -677,10 +751,10 @@ static struct clk_functions omap1_clk_functions = {
 
 int __init omap1_clk_init(void)
 {
-       struct clk ** clkp;
+       struct omap_clk *c;
        const struct omap_clock_config *info;
        int crystal_type = 0; /* Default 12 MHz */
-       u32 reg;
+       u32 reg, cpu_mask;
 
 #ifdef CONFIG_DEBUG_LL
        /* Resets some clocks that may be left on from bootloader,
@@ -700,27 +774,24 @@ int __init omap1_clk_init(void)
        /* By default all idlect1 clocks are allowed to idle */
        arm_idlect1_mask = ~0;
 
-       for (clkp = onchip_clks; clkp < onchip_clks+ARRAY_SIZE(onchip_clks); clkp++) {
-               if (((*clkp)->flags &CLOCK_IN_OMAP1510) && cpu_is_omap1510()) {
-                       clk_register(*clkp);
-                       continue;
-               }
-
-               if (((*clkp)->flags &CLOCK_IN_OMAP16XX) && cpu_is_omap16xx()) {
-                       clk_register(*clkp);
-                       continue;
-               }
-
-               if (((*clkp)->flags &CLOCK_IN_OMAP730) && cpu_is_omap730()) {
-                       clk_register(*clkp);
-                       continue;
-               }
+       for (c = omap_clks; c < omap_clks + ARRAY_SIZE(omap_clks); c++)
+               clk_init_one(c->lk.clk);
 
-               if (((*clkp)->flags &CLOCK_IN_OMAP310) && cpu_is_omap310()) {
-                       clk_register(*clkp);
-                       continue;
+       cpu_mask = 0;
+       if (cpu_is_omap16xx())
+               cpu_mask |= CK_16XX;
+       if (cpu_is_omap1510())
+               cpu_mask |= CK_1510;
+       if (cpu_is_omap730())
+               cpu_mask |= CK_730;
+       if (cpu_is_omap310())
+               cpu_mask |= CK_310;
+
+       for (c = omap_clks; c < omap_clks + ARRAY_SIZE(omap_clks); c++)
+               if (c->cpu & cpu_mask) {
+                       clkdev_add(&c->lk);
+                       clk_register(c->lk.clk);
                }
-       }
 
        info = omap_get_config(OMAP_TAG_CLOCK, struct omap_clock_config);
        if (info != NULL) {
@@ -769,7 +840,6 @@ int __init omap1_clk_init(void)
                        }
                }
        }
-       propagate_rate(&ck_dpll1);
 #else
        /* Find the highest supported frequency and enable it */
        if (omap1_select_table_rate(&virtual_ck_mpu, ~0)) {
@@ -778,9 +848,9 @@ int __init omap1_clk_init(void)
                omap_writew(0x2290, DPLL_CTL);
                omap_writew(cpu_is_omap730() ? 0x3005 : 0x1005, ARM_CKCTL);
                ck_dpll1.rate = 60000000;
-               propagate_rate(&ck_dpll1);
        }
 #endif
+       propagate_rate(&ck_dpll1);
        /* Cache rates for clocks connected to ck_ref (not dpll1) */
        propagate_rate(&ck_ref);
        printk(KERN_INFO "Clocking rate (xtal/DPLL1/MPU): "
@@ -832,4 +902,3 @@ int __init omap1_clk_init(void)
 
        return 0;
 }
-
index c1dcdf18d8ddecaeaf14706cb839a1a424aae22f..17f87427125543f47cbcf4c368b01712ea01f409 100644 (file)
 #ifndef __ARCH_ARM_MACH_OMAP1_CLOCK_H
 #define __ARCH_ARM_MACH_OMAP1_CLOCK_H
 
-static int omap1_clk_enable_generic(struct clk * clk);
-static void omap1_clk_disable_generic(struct clk * clk);
-static void omap1_ckctl_recalc(struct clk * clk);
-static void omap1_watchdog_recalc(struct clk * clk);
+static unsigned long omap1_ckctl_recalc(struct clk *clk);
+static unsigned long omap1_watchdog_recalc(struct clk *clk);
 static int omap1_set_sossi_rate(struct clk *clk, unsigned long rate);
-static void omap1_sossi_recalc(struct clk *clk);
-static void omap1_ckctl_recalc_dsp_domain(struct clk * clk);
-static int omap1_clk_enable_dsp_domain(struct clk * clk);
+static unsigned long omap1_sossi_recalc(struct clk *clk);
+static unsigned long omap1_ckctl_recalc_dsp_domain(struct clk *clk);
 static int omap1_clk_set_rate_dsp_domain(struct clk * clk, unsigned long rate);
-static void omap1_clk_disable_dsp_domain(struct clk * clk);
 static int omap1_set_uart_rate(struct clk * clk, unsigned long rate);
-static void omap1_uart_recalc(struct clk * clk);
-static int omap1_clk_enable_uart_functional(struct clk * clk);
-static void omap1_clk_disable_uart_functional(struct clk * clk);
+static unsigned long omap1_uart_recalc(struct clk *clk);
 static int omap1_set_ext_clk_rate(struct clk * clk, unsigned long rate);
 static long omap1_round_ext_clk_rate(struct clk * clk, unsigned long rate);
 static void omap1_init_ext_clk(struct clk * clk);
 static int omap1_select_table_rate(struct clk * clk, unsigned long rate);
 static long omap1_round_to_table_rate(struct clk * clk, unsigned long rate);
-static int omap1_clk_enable(struct clk *clk);
-static void omap1_clk_disable(struct clk *clk);
+
+static int omap1_clk_set_rate_ckctl_arm(struct clk *clk, unsigned long rate);
+static long omap1_clk_round_rate_ckctl_arm(struct clk *clk, unsigned long rate);
 
 struct mpu_rate {
        unsigned long           rate;
@@ -152,101 +147,84 @@ static struct mpu_rate rate_table[] = {
 
 static struct clk ck_ref = {
        .name           = "ck_ref",
+       .ops            = &clkops_null,
        .rate           = 12000000,
-       .flags          = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
-                         CLOCK_IN_OMAP310 | ALWAYS_ENABLED,
-       .enable         = &omap1_clk_enable_generic,
-       .disable        = &omap1_clk_disable_generic,
 };
 
 static struct clk ck_dpll1 = {
        .name           = "ck_dpll1",
+       .ops            = &clkops_null,
        .parent         = &ck_ref,
-       .flags          = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
-                         CLOCK_IN_OMAP310 | RATE_PROPAGATES | ALWAYS_ENABLED,
-       .enable         = &omap1_clk_enable_generic,
-       .disable        = &omap1_clk_disable_generic,
 };
 
 static struct arm_idlect1_clk ck_dpll1out = {
        .clk = {
                .name           = "ck_dpll1out",
+               .ops            = &clkops_generic,
                .parent         = &ck_dpll1,
-               .flags          = CLOCK_IN_OMAP16XX | CLOCK_IDLE_CONTROL |
-                                 ENABLE_REG_32BIT | RATE_PROPAGATES,
-               .enable_reg     = (void __iomem *)ARM_IDLECT2,
+               .flags          = CLOCK_IDLE_CONTROL | ENABLE_REG_32BIT,
+               .enable_reg     = OMAP1_IO_ADDRESS(ARM_IDLECT2),
                .enable_bit     = EN_CKOUT_ARM,
                .recalc         = &followparent_recalc,
-               .enable         = &omap1_clk_enable_generic,
-               .disable        = &omap1_clk_disable_generic,
        },
        .idlect_shift   = 12,
 };
 
 static struct clk sossi_ck = {
        .name           = "ck_sossi",
+       .ops            = &clkops_generic,
        .parent         = &ck_dpll1out.clk,
-       .flags          = CLOCK_IN_OMAP16XX | CLOCK_NO_IDLE_PARENT |
-                         ENABLE_REG_32BIT,
-       .enable_reg     = (void __iomem *)MOD_CONF_CTRL_1,
+       .flags          = CLOCK_NO_IDLE_PARENT | ENABLE_REG_32BIT,
+       .enable_reg     = OMAP1_IO_ADDRESS(MOD_CONF_CTRL_1),
        .enable_bit     = 16,
        .recalc         = &omap1_sossi_recalc,
        .set_rate       = &omap1_set_sossi_rate,
-       .enable         = &omap1_clk_enable_generic,
-       .disable        = &omap1_clk_disable_generic,
 };
 
 static struct clk arm_ck = {
        .name           = "arm_ck",
+       .ops            = &clkops_null,
        .parent         = &ck_dpll1,
-       .flags          = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
-                         CLOCK_IN_OMAP310 | RATE_CKCTL | RATE_PROPAGATES |
-                         ALWAYS_ENABLED,
        .rate_offset    = CKCTL_ARMDIV_OFFSET,
        .recalc         = &omap1_ckctl_recalc,
-       .enable         = &omap1_clk_enable_generic,
-       .disable        = &omap1_clk_disable_generic,
+       .round_rate     = omap1_clk_round_rate_ckctl_arm,
+       .set_rate       = omap1_clk_set_rate_ckctl_arm,
 };
 
 static struct arm_idlect1_clk armper_ck = {
        .clk = {
                .name           = "armper_ck",
+               .ops            = &clkops_generic,
                .parent         = &ck_dpll1,
-               .flags          = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
-                                 CLOCK_IN_OMAP310 | RATE_CKCTL |
-                                 CLOCK_IDLE_CONTROL,
-               .enable_reg     = (void __iomem *)ARM_IDLECT2,
+               .flags          = CLOCK_IDLE_CONTROL,
+               .enable_reg     = OMAP1_IO_ADDRESS(ARM_IDLECT2),
                .enable_bit     = EN_PERCK,
                .rate_offset    = CKCTL_PERDIV_OFFSET,
                .recalc         = &omap1_ckctl_recalc,
-               .enable         = &omap1_clk_enable_generic,
-               .disable        = &omap1_clk_disable_generic,
+               .round_rate     = omap1_clk_round_rate_ckctl_arm,
+               .set_rate       = omap1_clk_set_rate_ckctl_arm,
        },
        .idlect_shift   = 2,
 };
 
 static struct clk arm_gpio_ck = {
        .name           = "arm_gpio_ck",
+       .ops            = &clkops_generic,
        .parent         = &ck_dpll1,
-       .flags          = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310,
-       .enable_reg     = (void __iomem *)ARM_IDLECT2,
+       .enable_reg     = OMAP1_IO_ADDRESS(ARM_IDLECT2),
        .enable_bit     = EN_GPIOCK,
        .recalc         = &followparent_recalc,
-       .enable         = &omap1_clk_enable_generic,
-       .disable        = &omap1_clk_disable_generic,
 };
 
 static struct arm_idlect1_clk armxor_ck = {
        .clk = {
                .name           = "armxor_ck",
+               .ops            = &clkops_generic,
                .parent         = &ck_ref,
-               .flags          = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
-                                 CLOCK_IN_OMAP310 | CLOCK_IDLE_CONTROL,
-               .enable_reg     = (void __iomem *)ARM_IDLECT2,
+               .flags          = CLOCK_IDLE_CONTROL,
+               .enable_reg     = OMAP1_IO_ADDRESS(ARM_IDLECT2),
                .enable_bit     = EN_XORPCK,
                .recalc         = &followparent_recalc,
-               .enable         = &omap1_clk_enable_generic,
-               .disable        = &omap1_clk_disable_generic,
        },
        .idlect_shift   = 1,
 };
@@ -254,14 +232,12 @@ static struct arm_idlect1_clk armxor_ck = {
 static struct arm_idlect1_clk armtim_ck = {
        .clk = {
                .name           = "armtim_ck",
+               .ops            = &clkops_generic,
                .parent         = &ck_ref,
-               .flags          = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
-                                 CLOCK_IN_OMAP310 | CLOCK_IDLE_CONTROL,
-               .enable_reg     = (void __iomem *)ARM_IDLECT2,
+               .flags          = CLOCK_IDLE_CONTROL,
+               .enable_reg     = OMAP1_IO_ADDRESS(ARM_IDLECT2),
                .enable_bit     = EN_TIMCK,
                .recalc         = &followparent_recalc,
-               .enable         = &omap1_clk_enable_generic,
-               .disable        = &omap1_clk_disable_generic,
        },
        .idlect_shift   = 9,
 };
@@ -269,201 +245,166 @@ static struct arm_idlect1_clk armtim_ck = {
 static struct arm_idlect1_clk armwdt_ck = {
        .clk = {
                .name           = "armwdt_ck",
+               .ops            = &clkops_generic,
                .parent         = &ck_ref,
-               .flags          = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
-                                 CLOCK_IN_OMAP310 | CLOCK_IDLE_CONTROL,
-               .enable_reg     = (void __iomem *)ARM_IDLECT2,
+               .flags          = CLOCK_IDLE_CONTROL,
+               .enable_reg     = OMAP1_IO_ADDRESS(ARM_IDLECT2),
                .enable_bit     = EN_WDTCK,
                .recalc         = &omap1_watchdog_recalc,
-               .enable         = &omap1_clk_enable_generic,
-               .disable        = &omap1_clk_disable_generic,
        },
        .idlect_shift   = 0,
 };
 
 static struct clk arminth_ck16xx = {
        .name           = "arminth_ck",
+       .ops            = &clkops_null,
        .parent         = &arm_ck,
-       .flags          = CLOCK_IN_OMAP16XX | ALWAYS_ENABLED,
        .recalc         = &followparent_recalc,
        /* Note: On 16xx the frequency can be divided by 2 by programming
         * ARM_CKCTL:ARM_INTHCK_SEL(14) to 1
         *
         * 1510 version is in TC clocks.
         */
-       .enable         = &omap1_clk_enable_generic,
-       .disable        = &omap1_clk_disable_generic,
 };
 
 static struct clk dsp_ck = {
        .name           = "dsp_ck",
+       .ops            = &clkops_generic,
        .parent         = &ck_dpll1,
-       .flags          = CLOCK_IN_OMAP310 | CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
-                         RATE_CKCTL,
-       .enable_reg     = (void __iomem *)ARM_CKCTL,
+       .enable_reg     = OMAP1_IO_ADDRESS(ARM_CKCTL),
        .enable_bit     = EN_DSPCK,
        .rate_offset    = CKCTL_DSPDIV_OFFSET,
        .recalc         = &omap1_ckctl_recalc,
-       .enable         = &omap1_clk_enable_generic,
-       .disable        = &omap1_clk_disable_generic,
+       .round_rate     = omap1_clk_round_rate_ckctl_arm,
+       .set_rate       = omap1_clk_set_rate_ckctl_arm,
 };
 
 static struct clk dspmmu_ck = {
        .name           = "dspmmu_ck",
+       .ops            = &clkops_null,
        .parent         = &ck_dpll1,
-       .flags          = CLOCK_IN_OMAP310 | CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
-                         RATE_CKCTL | ALWAYS_ENABLED,
        .rate_offset    = CKCTL_DSPMMUDIV_OFFSET,
        .recalc         = &omap1_ckctl_recalc,
-       .enable         = &omap1_clk_enable_generic,
-       .disable        = &omap1_clk_disable_generic,
+       .round_rate     = omap1_clk_round_rate_ckctl_arm,
+       .set_rate       = omap1_clk_set_rate_ckctl_arm,
 };
 
 static struct clk dspper_ck = {
        .name           = "dspper_ck",
+       .ops            = &clkops_dspck,
        .parent         = &ck_dpll1,
-       .flags          = CLOCK_IN_OMAP310 | CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
-                         RATE_CKCTL | VIRTUAL_IO_ADDRESS,
        .enable_reg     = DSP_IDLECT2,
        .enable_bit     = EN_PERCK,
        .rate_offset    = CKCTL_PERDIV_OFFSET,
        .recalc         = &omap1_ckctl_recalc_dsp_domain,
+       .round_rate     = omap1_clk_round_rate_ckctl_arm,
        .set_rate       = &omap1_clk_set_rate_dsp_domain,
-       .enable         = &omap1_clk_enable_dsp_domain,
-       .disable        = &omap1_clk_disable_dsp_domain,
 };
 
 static struct clk dspxor_ck = {
        .name           = "dspxor_ck",
+       .ops            = &clkops_dspck,
        .parent         = &ck_ref,
-       .flags          = CLOCK_IN_OMAP310 | CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
-                         VIRTUAL_IO_ADDRESS,
        .enable_reg     = DSP_IDLECT2,
        .enable_bit     = EN_XORPCK,
        .recalc         = &followparent_recalc,
-       .enable         = &omap1_clk_enable_dsp_domain,
-       .disable        = &omap1_clk_disable_dsp_domain,
 };
 
 static struct clk dsptim_ck = {
        .name           = "dsptim_ck",
+       .ops            = &clkops_dspck,
        .parent         = &ck_ref,
-       .flags          = CLOCK_IN_OMAP310 | CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
-                         VIRTUAL_IO_ADDRESS,
        .enable_reg     = DSP_IDLECT2,
        .enable_bit     = EN_DSPTIMCK,
        .recalc         = &followparent_recalc,
-       .enable         = &omap1_clk_enable_dsp_domain,
-       .disable        = &omap1_clk_disable_dsp_domain,
 };
 
 /* Tie ARM_IDLECT1:IDLIF_ARM to this logical clock structure */
 static struct arm_idlect1_clk tc_ck = {
        .clk = {
                .name           = "tc_ck",
+               .ops            = &clkops_null,
                .parent         = &ck_dpll1,
-               .flags          = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
-                                 CLOCK_IN_OMAP730 | CLOCK_IN_OMAP310 |
-                                 RATE_CKCTL | RATE_PROPAGATES |
-                                 ALWAYS_ENABLED | CLOCK_IDLE_CONTROL,
+               .flags          = CLOCK_IDLE_CONTROL,
                .rate_offset    = CKCTL_TCDIV_OFFSET,
                .recalc         = &omap1_ckctl_recalc,
-               .enable         = &omap1_clk_enable_generic,
-               .disable        = &omap1_clk_disable_generic,
+               .round_rate     = omap1_clk_round_rate_ckctl_arm,
+               .set_rate       = omap1_clk_set_rate_ckctl_arm,
        },
        .idlect_shift   = 6,
 };
 
 static struct clk arminth_ck1510 = {
        .name           = "arminth_ck",
+       .ops            = &clkops_null,
        .parent         = &tc_ck.clk,
-       .flags          = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 |
-                         ALWAYS_ENABLED,
        .recalc         = &followparent_recalc,
        /* Note: On 1510 the frequency follows TC_CK
         *
         * 16xx version is in MPU clocks.
         */
-       .enable         = &omap1_clk_enable_generic,
-       .disable        = &omap1_clk_disable_generic,
 };
 
 static struct clk tipb_ck = {
        /* No-idle controlled by "tc_ck" */
        .name           = "tipb_ck",
+       .ops            = &clkops_null,
        .parent         = &tc_ck.clk,
-       .flags          = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 |
-                         ALWAYS_ENABLED,
        .recalc         = &followparent_recalc,
-       .enable         = &omap1_clk_enable_generic,
-       .disable        = &omap1_clk_disable_generic,
 };
 
 static struct clk l3_ocpi_ck = {
        /* No-idle controlled by "tc_ck" */
        .name           = "l3_ocpi_ck",
+       .ops            = &clkops_generic,
        .parent         = &tc_ck.clk,
-       .flags          = CLOCK_IN_OMAP16XX,
-       .enable_reg     = (void __iomem *)ARM_IDLECT3,
+       .enable_reg     = OMAP1_IO_ADDRESS(ARM_IDLECT3),
        .enable_bit     = EN_OCPI_CK,
        .recalc         = &followparent_recalc,
-       .enable         = &omap1_clk_enable_generic,
-       .disable        = &omap1_clk_disable_generic,
 };
 
 static struct clk tc1_ck = {
        .name           = "tc1_ck",
+       .ops            = &clkops_generic,
        .parent         = &tc_ck.clk,
-       .flags          = CLOCK_IN_OMAP16XX,
-       .enable_reg     = (void __iomem *)ARM_IDLECT3,
+       .enable_reg     = OMAP1_IO_ADDRESS(ARM_IDLECT3),
        .enable_bit     = EN_TC1_CK,
        .recalc         = &followparent_recalc,
-       .enable         = &omap1_clk_enable_generic,
-       .disable        = &omap1_clk_disable_generic,
 };
 
 static struct clk tc2_ck = {
        .name           = "tc2_ck",
+       .ops            = &clkops_generic,
        .parent         = &tc_ck.clk,
-       .flags          = CLOCK_IN_OMAP16XX,
-       .enable_reg     = (void __iomem *)ARM_IDLECT3,
+       .enable_reg     = OMAP1_IO_ADDRESS(ARM_IDLECT3),
        .enable_bit     = EN_TC2_CK,
        .recalc         = &followparent_recalc,
-       .enable         = &omap1_clk_enable_generic,
-       .disable        = &omap1_clk_disable_generic,
 };
 
 static struct clk dma_ck = {
        /* No-idle controlled by "tc_ck" */
        .name           = "dma_ck",
+       .ops            = &clkops_null,
        .parent         = &tc_ck.clk,
-       .flags          = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
-                         CLOCK_IN_OMAP310 | ALWAYS_ENABLED,
        .recalc         = &followparent_recalc,
-       .enable         = &omap1_clk_enable_generic,
-       .disable        = &omap1_clk_disable_generic,
 };
 
 static struct clk dma_lcdfree_ck = {
        .name           = "dma_lcdfree_ck",
+       .ops            = &clkops_null,
        .parent         = &tc_ck.clk,
-       .flags          = CLOCK_IN_OMAP16XX | ALWAYS_ENABLED,
        .recalc         = &followparent_recalc,
-       .enable         = &omap1_clk_enable_generic,
-       .disable        = &omap1_clk_disable_generic,
 };
 
 static struct arm_idlect1_clk api_ck = {
        .clk = {
                .name           = "api_ck",
+               .ops            = &clkops_generic,
                .parent         = &tc_ck.clk,
-               .flags          = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
-                                 CLOCK_IN_OMAP310 | CLOCK_IDLE_CONTROL,
-               .enable_reg     = (void __iomem *)ARM_IDLECT2,
+               .flags          = CLOCK_IDLE_CONTROL,
+               .enable_reg     = OMAP1_IO_ADDRESS(ARM_IDLECT2),
                .enable_bit     = EN_APICK,
                .recalc         = &followparent_recalc,
-               .enable         = &omap1_clk_enable_generic,
-               .disable        = &omap1_clk_disable_generic,
        },
        .idlect_shift   = 8,
 };
@@ -471,276 +412,238 @@ static struct arm_idlect1_clk api_ck = {
 static struct arm_idlect1_clk lb_ck = {
        .clk = {
                .name           = "lb_ck",
+               .ops            = &clkops_generic,
                .parent         = &tc_ck.clk,
-               .flags          = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 |
-                                 CLOCK_IDLE_CONTROL,
-               .enable_reg     = (void __iomem *)ARM_IDLECT2,
+               .flags          = CLOCK_IDLE_CONTROL,
+               .enable_reg     = OMAP1_IO_ADDRESS(ARM_IDLECT2),
                .enable_bit     = EN_LBCK,
                .recalc         = &followparent_recalc,
-               .enable         = &omap1_clk_enable_generic,
-               .disable        = &omap1_clk_disable_generic,
        },
        .idlect_shift   = 4,
 };
 
 static struct clk rhea1_ck = {
        .name           = "rhea1_ck",
+       .ops            = &clkops_null,
        .parent         = &tc_ck.clk,
-       .flags          = CLOCK_IN_OMAP16XX | ALWAYS_ENABLED,
        .recalc         = &followparent_recalc,
-       .enable         = &omap1_clk_enable_generic,
-       .disable        = &omap1_clk_disable_generic,
 };
 
 static struct clk rhea2_ck = {
        .name           = "rhea2_ck",
+       .ops            = &clkops_null,
        .parent         = &tc_ck.clk,
-       .flags          = CLOCK_IN_OMAP16XX | ALWAYS_ENABLED,
        .recalc         = &followparent_recalc,
-       .enable         = &omap1_clk_enable_generic,
-       .disable        = &omap1_clk_disable_generic,
 };
 
 static struct clk lcd_ck_16xx = {
        .name           = "lcd_ck",
+       .ops            = &clkops_generic,
        .parent         = &ck_dpll1,
-       .flags          = CLOCK_IN_OMAP16XX | CLOCK_IN_OMAP730 | RATE_CKCTL,
-       .enable_reg     = (void __iomem *)ARM_IDLECT2,
+       .enable_reg     = OMAP1_IO_ADDRESS(ARM_IDLECT2),
        .enable_bit     = EN_LCDCK,
        .rate_offset    = CKCTL_LCDDIV_OFFSET,
        .recalc         = &omap1_ckctl_recalc,
-       .enable         = &omap1_clk_enable_generic,
-       .disable        = &omap1_clk_disable_generic,
+       .round_rate     = omap1_clk_round_rate_ckctl_arm,
+       .set_rate       = omap1_clk_set_rate_ckctl_arm,
 };
 
 static struct arm_idlect1_clk lcd_ck_1510 = {
        .clk = {
                .name           = "lcd_ck",
+               .ops            = &clkops_generic,
                .parent         = &ck_dpll1,
-               .flags          = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 |
-                                 RATE_CKCTL | CLOCK_IDLE_CONTROL,
-               .enable_reg     = (void __iomem *)ARM_IDLECT2,
+               .flags          = CLOCK_IDLE_CONTROL,
+               .enable_reg     = OMAP1_IO_ADDRESS(ARM_IDLECT2),
                .enable_bit     = EN_LCDCK,
                .rate_offset    = CKCTL_LCDDIV_OFFSET,
                .recalc         = &omap1_ckctl_recalc,
-               .enable         = &omap1_clk_enable_generic,
-               .disable        = &omap1_clk_disable_generic,
+               .round_rate     = omap1_clk_round_rate_ckctl_arm,
+               .set_rate       = omap1_clk_set_rate_ckctl_arm,
        },
        .idlect_shift   = 3,
 };
 
 static struct clk uart1_1510 = {
        .name           = "uart1_ck",
+       .ops            = &clkops_null,
        /* Direct from ULPD, no real parent */
        .parent         = &armper_ck.clk,
        .rate           = 12000000,
-       .flags          = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 |
-                         ENABLE_REG_32BIT | ALWAYS_ENABLED |
-                         CLOCK_NO_IDLE_PARENT,
-       .enable_reg     = (void __iomem *)MOD_CONF_CTRL_0,
+       .flags          = ENABLE_REG_32BIT | CLOCK_NO_IDLE_PARENT,
+       .enable_reg     = OMAP1_IO_ADDRESS(MOD_CONF_CTRL_0),
        .enable_bit     = 29,   /* Chooses between 12MHz and 48MHz */
        .set_rate       = &omap1_set_uart_rate,
        .recalc         = &omap1_uart_recalc,
-       .enable         = &omap1_clk_enable_generic,
-       .disable        = &omap1_clk_disable_generic,
 };
 
 static struct uart_clk uart1_16xx = {
        .clk    = {
                .name           = "uart1_ck",
+               .ops            = &clkops_uart,
                /* Direct from ULPD, no real parent */
                .parent         = &armper_ck.clk,
                .rate           = 48000000,
-               .flags          = CLOCK_IN_OMAP16XX | RATE_FIXED |
-                                 ENABLE_REG_32BIT | CLOCK_NO_IDLE_PARENT,
-               .enable_reg     = (void __iomem *)MOD_CONF_CTRL_0,
+               .flags          = RATE_FIXED | ENABLE_REG_32BIT |
+                                 CLOCK_NO_IDLE_PARENT,
+               .enable_reg     = OMAP1_IO_ADDRESS(MOD_CONF_CTRL_0),
                .enable_bit     = 29,
-               .enable         = &omap1_clk_enable_uart_functional,
-               .disable        = &omap1_clk_disable_uart_functional,
        },
        .sysc_addr      = 0xfffb0054,
 };
 
 static struct clk uart2_ck = {
        .name           = "uart2_ck",
+       .ops            = &clkops_null,
        /* Direct from ULPD, no real parent */
        .parent         = &armper_ck.clk,
        .rate           = 12000000,
-       .flags          = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
-                         CLOCK_IN_OMAP310 | ENABLE_REG_32BIT |
-                         ALWAYS_ENABLED | CLOCK_NO_IDLE_PARENT,
-       .enable_reg     = (void __iomem *)MOD_CONF_CTRL_0,
+       .flags          = ENABLE_REG_32BIT | CLOCK_NO_IDLE_PARENT,
+       .enable_reg     = OMAP1_IO_ADDRESS(MOD_CONF_CTRL_0),
        .enable_bit     = 30,   /* Chooses between 12MHz and 48MHz */
        .set_rate       = &omap1_set_uart_rate,
        .recalc         = &omap1_uart_recalc,
-       .enable         = &omap1_clk_enable_generic,
-       .disable        = &omap1_clk_disable_generic,
 };
 
 static struct clk uart3_1510 = {
        .name           = "uart3_ck",
+       .ops            = &clkops_null,
        /* Direct from ULPD, no real parent */
        .parent         = &armper_ck.clk,
        .rate           = 12000000,
-       .flags          = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 |
-                         ENABLE_REG_32BIT | ALWAYS_ENABLED |
-                         CLOCK_NO_IDLE_PARENT,
-       .enable_reg     = (void __iomem *)MOD_CONF_CTRL_0,
+       .flags          = ENABLE_REG_32BIT | CLOCK_NO_IDLE_PARENT,
+       .enable_reg     = OMAP1_IO_ADDRESS(MOD_CONF_CTRL_0),
        .enable_bit     = 31,   /* Chooses between 12MHz and 48MHz */
        .set_rate       = &omap1_set_uart_rate,
        .recalc         = &omap1_uart_recalc,
-       .enable         = &omap1_clk_enable_generic,
-       .disable        = &omap1_clk_disable_generic,
 };
 
 static struct uart_clk uart3_16xx = {
        .clk    = {
                .name           = "uart3_ck",
+               .ops            = &clkops_uart,
                /* Direct from ULPD, no real parent */
                .parent         = &armper_ck.clk,
                .rate           = 48000000,
-               .flags          = CLOCK_IN_OMAP16XX | RATE_FIXED |
-                                 ENABLE_REG_32BIT | CLOCK_NO_IDLE_PARENT,
-               .enable_reg     = (void __iomem *)MOD_CONF_CTRL_0,
+               .flags          = RATE_FIXED | ENABLE_REG_32BIT |
+                                 CLOCK_NO_IDLE_PARENT,
+               .enable_reg     = OMAP1_IO_ADDRESS(MOD_CONF_CTRL_0),
                .enable_bit     = 31,
-               .enable         = &omap1_clk_enable_uart_functional,
-               .disable        = &omap1_clk_disable_uart_functional,
        },
        .sysc_addr      = 0xfffb9854,
 };
 
 static struct clk usb_clko = { /* 6 MHz output on W4_USB_CLKO */
        .name           = "usb_clko",
+       .ops            = &clkops_generic,
        /* Direct from ULPD, no parent */
        .rate           = 6000000,
-       .flags          = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
-                         CLOCK_IN_OMAP310 | RATE_FIXED | ENABLE_REG_32BIT,
-       .enable_reg     = (void __iomem *)ULPD_CLOCK_CTRL,
+       .flags          = RATE_FIXED | ENABLE_REG_32BIT,
+       .enable_reg     = OMAP1_IO_ADDRESS(ULPD_CLOCK_CTRL),
        .enable_bit     = USB_MCLK_EN_BIT,
-       .enable         = &omap1_clk_enable_generic,
-       .disable        = &omap1_clk_disable_generic,
 };
 
 static struct clk usb_hhc_ck1510 = {
        .name           = "usb_hhc_ck",
+       .ops            = &clkops_generic,
        /* Direct from ULPD, no parent */
        .rate           = 48000000, /* Actually 2 clocks, 12MHz and 48MHz */
-       .flags          = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 |
-                         RATE_FIXED | ENABLE_REG_32BIT,
-       .enable_reg     = (void __iomem *)MOD_CONF_CTRL_0,
+       .flags          = RATE_FIXED | ENABLE_REG_32BIT,
+       .enable_reg     = OMAP1_IO_ADDRESS(MOD_CONF_CTRL_0),
        .enable_bit     = USB_HOST_HHC_UHOST_EN,
-       .enable         = &omap1_clk_enable_generic,
-       .disable        = &omap1_clk_disable_generic,
 };
 
 static struct clk usb_hhc_ck16xx = {
        .name           = "usb_hhc_ck",
+       .ops            = &clkops_generic,
        /* Direct from ULPD, no parent */
        .rate           = 48000000,
        /* OTG_SYSCON_2.OTG_PADEN == 0 (not 1510-compatible) */
-       .flags          = CLOCK_IN_OMAP16XX |
-                         RATE_FIXED | ENABLE_REG_32BIT,
-       .enable_reg     = (void __iomem *)OTG_BASE + 0x08 /* OTG_SYSCON_2 */,
+       .flags          = RATE_FIXED | ENABLE_REG_32BIT,
+       .enable_reg     = OMAP1_IO_ADDRESS(OTG_BASE + 0x08), /* OTG_SYSCON_2 */
        .enable_bit     = 8 /* UHOST_EN */,
-       .enable         = &omap1_clk_enable_generic,
-       .disable        = &omap1_clk_disable_generic,
 };
 
 static struct clk usb_dc_ck = {
        .name           = "usb_dc_ck",
+       .ops            = &clkops_generic,
        /* Direct from ULPD, no parent */
        .rate           = 48000000,
-       .flags          = CLOCK_IN_OMAP16XX | RATE_FIXED,
-       .enable_reg     = (void __iomem *)SOFT_REQ_REG,
+       .flags          = RATE_FIXED,
+       .enable_reg     = OMAP1_IO_ADDRESS(SOFT_REQ_REG),
        .enable_bit     = 4,
-       .enable         = &omap1_clk_enable_generic,
-       .disable        = &omap1_clk_disable_generic,
 };
 
 static struct clk mclk_1510 = {
        .name           = "mclk",
+       .ops            = &clkops_generic,
        /* Direct from ULPD, no parent. May be enabled by ext hardware. */
        .rate           = 12000000,
-       .flags          = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 | RATE_FIXED,
-       .enable_reg     = (void __iomem *)SOFT_REQ_REG,
-       .enable_bit     = 6,
-       .enable         = &omap1_clk_enable_generic,
-       .disable        = &omap1_clk_disable_generic,
+       .flags          = RATE_FIXED,
+       .enable_reg     = OMAP1_IO_ADDRESS(SOFT_REQ_REG),
+       .enable_bit     = 6,
 };
 
 static struct clk mclk_16xx = {
        .name           = "mclk",
+       .ops            = &clkops_generic,
        /* Direct from ULPD, no parent. May be enabled by ext hardware. */
-       .flags          = CLOCK_IN_OMAP16XX,
-       .enable_reg     = (void __iomem *)COM_CLK_DIV_CTRL_SEL,
+       .enable_reg     = OMAP1_IO_ADDRESS(COM_CLK_DIV_CTRL_SEL),
        .enable_bit     = COM_ULPD_PLL_CLK_REQ,
        .set_rate       = &omap1_set_ext_clk_rate,
        .round_rate     = &omap1_round_ext_clk_rate,
        .init           = &omap1_init_ext_clk,
-       .enable         = &omap1_clk_enable_generic,
-       .disable        = &omap1_clk_disable_generic,
 };
 
 static struct clk bclk_1510 = {
        .name           = "bclk",
+       .ops            = &clkops_generic,
        /* Direct from ULPD, no parent. May be enabled by ext hardware. */
        .rate           = 12000000,
-       .flags          = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 | RATE_FIXED,
-       .enable         = &omap1_clk_enable_generic,
-       .disable        = &omap1_clk_disable_generic,
+       .flags          = RATE_FIXED,
 };
 
 static struct clk bclk_16xx = {
        .name           = "bclk",
+       .ops            = &clkops_generic,
        /* Direct from ULPD, no parent. May be enabled by ext hardware. */
-       .flags          = CLOCK_IN_OMAP16XX,
-       .enable_reg     = (void __iomem *)SWD_CLK_DIV_CTRL_SEL,
+       .enable_reg     = OMAP1_IO_ADDRESS(SWD_CLK_DIV_CTRL_SEL),
        .enable_bit     = SWD_ULPD_PLL_CLK_REQ,
        .set_rate       = &omap1_set_ext_clk_rate,
        .round_rate     = &omap1_round_ext_clk_rate,
        .init           = &omap1_init_ext_clk,
-       .enable         = &omap1_clk_enable_generic,
-       .disable        = &omap1_clk_disable_generic,
 };
 
 static struct clk mmc1_ck = {
        .name           = "mmc_ck",
+       .ops            = &clkops_generic,
        /* Functional clock is direct from ULPD, interface clock is ARMPER */
        .parent         = &armper_ck.clk,
        .rate           = 48000000,
-       .flags          = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
-                         CLOCK_IN_OMAP310 | RATE_FIXED | ENABLE_REG_32BIT |
-                         CLOCK_NO_IDLE_PARENT,
-       .enable_reg     = (void __iomem *)MOD_CONF_CTRL_0,
+       .flags          = RATE_FIXED | ENABLE_REG_32BIT | CLOCK_NO_IDLE_PARENT,
+       .enable_reg     = OMAP1_IO_ADDRESS(MOD_CONF_CTRL_0),
        .enable_bit     = 23,
-       .enable         = &omap1_clk_enable_generic,
-       .disable        = &omap1_clk_disable_generic,
 };
 
 static struct clk mmc2_ck = {
        .name           = "mmc_ck",
        .id             = 1,
+       .ops            = &clkops_generic,
        /* Functional clock is direct from ULPD, interface clock is ARMPER */
        .parent         = &armper_ck.clk,
        .rate           = 48000000,
-       .flags          = CLOCK_IN_OMAP16XX |
-                         RATE_FIXED | ENABLE_REG_32BIT | CLOCK_NO_IDLE_PARENT,
-       .enable_reg     = (void __iomem *)MOD_CONF_CTRL_0,
+       .flags          = RATE_FIXED | ENABLE_REG_32BIT | CLOCK_NO_IDLE_PARENT,
+       .enable_reg     = OMAP1_IO_ADDRESS(MOD_CONF_CTRL_0),
        .enable_bit     = 20,
-       .enable         = &omap1_clk_enable_generic,
-       .disable        = &omap1_clk_disable_generic,
 };
 
 static struct clk virtual_ck_mpu = {
        .name           = "mpu",
-       .flags          = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
-                         CLOCK_IN_OMAP310 | VIRTUAL_CLOCK | ALWAYS_ENABLED,
+       .ops            = &clkops_null,
        .parent         = &arm_ck, /* Is smarter alias for */
        .recalc         = &followparent_recalc,
        .set_rate       = &omap1_select_table_rate,
        .round_rate     = &omap1_round_to_table_rate,
-       .enable         = &omap1_clk_enable_generic,
-       .disable        = &omap1_clk_disable_generic,
 };
 
 /* virtual functional clock domain for I2C. Just for making sure that ARMXOR_CK
@@ -748,78 +651,19 @@ remains active during MPU idle whenever this is enabled */
 static struct clk i2c_fck = {
        .name           = "i2c_fck",
        .id             = 1,
-       .flags          = CLOCK_IN_OMAP310 | CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
-                         VIRTUAL_CLOCK | CLOCK_NO_IDLE_PARENT |
-                         ALWAYS_ENABLED,
+       .ops            = &clkops_null,
+       .flags          = CLOCK_NO_IDLE_PARENT,
        .parent         = &armxor_ck.clk,
        .recalc         = &followparent_recalc,
-       .enable         = &omap1_clk_enable_generic,
-       .disable        = &omap1_clk_disable_generic,
 };
 
 static struct clk i2c_ick = {
        .name           = "i2c_ick",
        .id             = 1,
-       .flags          = CLOCK_IN_OMAP16XX |
-                         VIRTUAL_CLOCK | CLOCK_NO_IDLE_PARENT |
-                         ALWAYS_ENABLED,
+       .ops            = &clkops_null,
+       .flags          = CLOCK_NO_IDLE_PARENT,
        .parent         = &armper_ck.clk,
        .recalc         = &followparent_recalc,
-       .enable         = &omap1_clk_enable_generic,
-       .disable        = &omap1_clk_disable_generic,
-};
-
-static struct clk * onchip_clks[] = {
-       /* non-ULPD clocks */
-       &ck_ref,
-       &ck_dpll1,
-       /* CK_GEN1 clocks */
-       &ck_dpll1out.clk,
-       &sossi_ck,
-       &arm_ck,
-       &armper_ck.clk,
-       &arm_gpio_ck,
-       &armxor_ck.clk,
-       &armtim_ck.clk,
-       &armwdt_ck.clk,
-       &arminth_ck1510,  &arminth_ck16xx,
-       /* CK_GEN2 clocks */
-       &dsp_ck,
-       &dspmmu_ck,
-       &dspper_ck,
-       &dspxor_ck,
-       &dsptim_ck,
-       /* CK_GEN3 clocks */
-       &tc_ck.clk,
-       &tipb_ck,
-       &l3_ocpi_ck,
-       &tc1_ck,
-       &tc2_ck,
-       &dma_ck,
-       &dma_lcdfree_ck,
-       &api_ck.clk,
-       &lb_ck.clk,
-       &rhea1_ck,
-       &rhea2_ck,
-       &lcd_ck_16xx,
-       &lcd_ck_1510.clk,
-       /* ULPD clocks */
-       &uart1_1510,
-       &uart1_16xx.clk,
-       &uart2_ck,
-       &uart3_1510,
-       &uart3_16xx.clk,
-       &usb_clko,
-       &usb_hhc_ck1510, &usb_hhc_ck16xx,
-       &usb_dc_ck,
-       &mclk_1510,  &mclk_16xx,
-       &bclk_1510,  &bclk_16xx,
-       &mmc1_ck,
-       &mmc2_ck,
-       /* Virtual clocks */
-       &virtual_ck_mpu,
-       &i2c_fck,
-       &i2c_ick,
 };
 
 #endif
index 575ba31295cf125c676351f4a8e75258a3befa27..d040c3f1027f7b973009013620705e4d65055b92 100644 (file)
@@ -28,9 +28,9 @@
 #define DPS_RSTCT2_PER_EN      (1 << 0)
 #define DSP_RSTCT2_WD_PER_EN   (1 << 1)
 
-#if defined(CONFIG_ARCH_OMAP15XX) || defined(CONFIG_ARCH_OMAP16XX)
-const char *clk_names[] = { "dsp_ck", "api_ck", "dspxor_ck" };
-#endif
+static int dsp_use;
+static struct clk *api_clk;
+static struct clk *dsp_clk;
 
 static void omap1_mcbsp_request(unsigned int id)
 {
@@ -39,20 +39,40 @@ static void omap1_mcbsp_request(unsigned int id)
         * are DSP public peripherals.
         */
        if (id == OMAP_MCBSP1 || id == OMAP_MCBSP3) {
-               omap_dsp_request_mem();
-               /*
-                * DSP external peripheral reset
-                * FIXME: This should be moved to dsp code
-                */
-               __raw_writew(__raw_readw(DSP_RSTCT2) | DPS_RSTCT2_PER_EN |
-                               DSP_RSTCT2_WD_PER_EN, DSP_RSTCT2);
+               if (dsp_use++ == 0) {
+                       api_clk = clk_get(NULL, "api_clk");
+                       dsp_clk = clk_get(NULL, "dsp_clk");
+                       if (!IS_ERR(api_clk) && !IS_ERR(dsp_clk)) {
+                               clk_enable(api_clk);
+                               clk_enable(dsp_clk);
+
+                               omap_dsp_request_mem();
+                               /*
+                                * DSP external peripheral reset
+                                * FIXME: This should be moved to dsp code
+                                */
+                               __raw_writew(__raw_readw(DSP_RSTCT2) | DPS_RSTCT2_PER_EN |
+                                               DSP_RSTCT2_WD_PER_EN, DSP_RSTCT2);
+                       }
+               }
        }
 }
 
 static void omap1_mcbsp_free(unsigned int id)
 {
-       if (id == OMAP_MCBSP1 || id == OMAP_MCBSP3)
-               omap_dsp_release_mem();
+       if (id == OMAP_MCBSP1 || id == OMAP_MCBSP3) {
+               if (--dsp_use == 0) {
+                       omap_dsp_release_mem();
+                       if (!IS_ERR(api_clk)) {
+                               clk_disable(api_clk);
+                               clk_put(api_clk);
+                       }
+                       if (!IS_ERR(dsp_clk)) {
+                               clk_disable(dsp_clk);
+                               clk_put(dsp_clk);
+                       }
+               }
+       }
 }
 
 static struct omap_mcbsp_ops omap1_mcbsp_ops = {
@@ -94,8 +114,6 @@ static struct omap_mcbsp_platform_data omap15xx_mcbsp_pdata[] = {
                .rx_irq         = INT_McBSP1RX,
                .tx_irq         = INT_McBSP1TX,
                .ops            = &omap1_mcbsp_ops,
-               .clk_names      = clk_names,
-               .num_clks       = 3,
        },
        {
                .phys_base      = OMAP1510_MCBSP2_BASE,
@@ -112,8 +130,6 @@ static struct omap_mcbsp_platform_data omap15xx_mcbsp_pdata[] = {
                .rx_irq         = INT_McBSP3RX,
                .tx_irq         = INT_McBSP3TX,
                .ops            = &omap1_mcbsp_ops,
-               .clk_names      = clk_names,
-               .num_clks       = 3,
        },
 };
 #define OMAP15XX_MCBSP_PDATA_SZ                ARRAY_SIZE(omap15xx_mcbsp_pdata)
@@ -131,8 +147,6 @@ static struct omap_mcbsp_platform_data omap16xx_mcbsp_pdata[] = {
                .rx_irq         = INT_McBSP1RX,
                .tx_irq         = INT_McBSP1TX,
                .ops            = &omap1_mcbsp_ops,
-               .clk_names      = clk_names,
-               .num_clks       = 3,
        },
        {
                .phys_base      = OMAP1610_MCBSP2_BASE,
@@ -149,8 +163,6 @@ static struct omap_mcbsp_platform_data omap16xx_mcbsp_pdata[] = {
                .rx_irq         = INT_McBSP3RX,
                .tx_irq         = INT_McBSP3TX,
                .ops            = &omap1_mcbsp_ops,
-               .clk_names      = clk_names,
-               .num_clks       = 3,
        },
 };
 #define OMAP16XX_MCBSP_PDATA_SZ                ARRAY_SIZE(omap16xx_mcbsp_pdata)
index bbd12bc10fdc1dc39d642227059999d74de5aec8..9717afcdbda74dc7eae25078330a28146e7aea89 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 # Common support
-obj-y := irq.o id.o io.o memory.o control.o prcm.o clock.o mux.o \
+obj-y := irq.o id.o io.o sdrc.o control.o prcm.o clock.o mux.o \
                devices.o serial.o gpmc.o timer-gp.o powerdomain.o \
                clockdomain.o
 
@@ -14,6 +14,10 @@ obj-$(CONFIG_ARCH_OMAP2420)          += sram242x.o
 obj-$(CONFIG_ARCH_OMAP2430)            += sram243x.o
 obj-$(CONFIG_ARCH_OMAP3)               += sram34xx.o
 
+# SMS/SDRC
+obj-$(CONFIG_ARCH_OMAP2)               += sdrc2xxx.o
+# obj-$(CONFIG_ARCH_OMAP3)             += sdrc3xxx.o
+
 # Power Management
 ifeq ($(CONFIG_PM),y)
 obj-y                                  += pm.o
index 83fa37211d77c1a1b04b1c68f0f913d5ea47d97c..7b29e1d00f23d9b70af9660ce2502f37ed76fe5c 100644 (file)
@@ -185,7 +185,7 @@ out:
 
 static void __init omap_2430sdp_init_irq(void)
 {
-       omap2_init_common_hw();
+       omap2_init_common_hw(NULL);
        omap_init_irq();
        omap_gpio_init();
        sdp2430_init_smc91x();
index 0a7b24ba165241cbb5ea8ae6afc3b84cb766bd06..0c911f414d8d25b0c7d6df24f16c038a15e93a51 100644 (file)
@@ -249,7 +249,7 @@ out:
 
 static void __init omap_apollon_init_irq(void)
 {
-       omap2_init_common_hw();
+       omap2_init_common_hw(NULL);
        omap_init_irq();
        omap_gpio_init();
        apollon_init_smc91x();
index 3b34c20d1df41ef5920cdc4e63a9c03cabbd6475..3492162a65c383907bb093702b0c9921ff1b8ac2 100644 (file)
@@ -33,7 +33,7 @@
 
 static void __init omap_generic_init_irq(void)
 {
-       omap2_init_common_hw();
+       omap2_init_common_hw(NULL);
        omap_init_irq();
 }
 
index 5e9b14675b1e7bc81ff3d9c607d5d004b4bb51e0..ef55b45ab7693689adf338a1b45cf5a606b1611f 100644 (file)
@@ -363,7 +363,7 @@ static void __init h4_init_flash(void)
 
 static void __init omap_h4_init_irq(void)
 {
-       omap2_init_common_hw();
+       omap2_init_common_hw(NULL);
        omap_init_irq();
        omap_gpio_init();
        h4_init_flash();
index f6a13451d1fdd10ef9845e6dec4587c9660047b7..73e3fdb2d20a1ddf441ad930fa3e0cf701bed74c 100644 (file)
@@ -81,7 +81,7 @@ static inline void __init ldp_init_smc911x(void)
        }
 
        ldp_smc911x_resources[0].start = cs_mem_base + 0x0;
-       ldp_smc911x_resources[0].end   = cs_mem_base + 0xf;
+       ldp_smc911x_resources[0].end   = cs_mem_base + 0xff;
        udelay(100);
 
        eth_gpio = LDP_SMC911X_GPIO;
@@ -98,7 +98,7 @@ static inline void __init ldp_init_smc911x(void)
 
 static void __init omap_ldp_init_irq(void)
 {
-       omap2_init_common_hw();
+       omap2_init_common_hw(NULL);
        omap_init_irq();
        omap_gpio_init();
        ldp_init_smc911x();
index e39cd2c46cfa328f63e3a765c4eecb53d57caf68..b70b1e65034bc135452d35689271b19e97a0553c 100644 (file)
@@ -186,7 +186,7 @@ static int __init omap3_beagle_i2c_init(void)
 
 static void __init omap3_beagle_init_irq(void)
 {
-       omap2_init_common_hw();
+       omap2_init_common_hw(NULL);
        omap_init_irq();
        omap_gpio_init();
 }
index ce4d46a4a8381d2bd2b0cff19f840ae16ac2c153..4247a1534411ba9f9cf5bfd23c9abf94bcd799c0 100644 (file)
 
 #include <mach/clock.h>
 #include <mach/clockdomain.h>
-#include <mach/sram.h>
 #include <mach/cpu.h>
 #include <asm/div64.h>
 
-#include "memory.h"
+#include <mach/sdrc.h>
 #include "sdrc.h"
 #include "clock.h"
 #include "prm.h"
@@ -46,7 +45,7 @@
 #define DPLL_MIN_DIVIDER               1
 
 /* Possible error results from _dpll_test_mult */
-#define DPLL_MULT_UNDERFLOW            (1 << 0)
+#define DPLL_MULT_UNDERFLOW            -1
 
 /*
  * Scale factor to mitigate roundoff errors in DPLL rate rounding.
 #define DPLL_ROUNDING_VAL              ((DPLL_SCALE_BASE / 2) * \
                                         (DPLL_SCALE_FACTOR / DPLL_SCALE_BASE))
 
+/* DPLL valid Fint frequency band limits - from 34xx TRM Section 4.7.6.2 */
+#define DPLL_FINT_BAND1_MIN            750000
+#define DPLL_FINT_BAND1_MAX            2100000
+#define DPLL_FINT_BAND2_MIN            7500000
+#define DPLL_FINT_BAND2_MAX            21000000
+
+/* _dpll_test_fint() return codes */
+#define DPLL_FINT_UNDERFLOW            -1
+#define DPLL_FINT_INVALID              -2
+
 u8 cpu_mask;
 
 /*-------------------------------------------------------------------------
  * OMAP2/3 specific clock functions
  *-------------------------------------------------------------------------*/
 
+/**
+ * _omap2xxx_clk_commit - commit clock parent/rate changes in hardware
+ * @clk: struct clk *
+ *
+ * If @clk has the DELAYED_APP flag set, meaning that parent/rate changes
+ * don't take effect until the VALID_CONFIG bit is written, write the
+ * VALID_CONFIG bit and wait for the write to complete.  No return value.
+ */
+static void _omap2xxx_clk_commit(struct clk *clk)
+{
+       if (!cpu_is_omap24xx())
+               return;
+
+       if (!(clk->flags & DELAYED_APP))
+               return;
+
+       prm_write_mod_reg(OMAP24XX_VALID_CONFIG, OMAP24XX_GR_MOD,
+               OMAP24XX_PRCM_CLKCFG_CTRL_OFFSET);
+       /* OCP barrier */
+       prm_read_mod_reg(OMAP24XX_GR_MOD, OMAP24XX_PRCM_CLKCFG_CTRL_OFFSET);
+}
+
+/*
+ * _dpll_test_fint - test whether an Fint value is valid for the DPLL
+ * @clk: DPLL struct clk to test
+ * @n: divider value (N) to test
+ *
+ * Tests whether a particular divider @n will result in a valid DPLL
+ * internal clock frequency Fint. See the 34xx TRM 4.7.6.2 "DPLL Jitter
+ * Correction".  Returns 0 if OK, -1 if the enclosing loop can terminate
+ * (assuming that it is counting N upwards), or -2 if the enclosing loop
+ * should skip to the next iteration (again assuming N is increasing).
+ */
+static int _dpll_test_fint(struct clk *clk, u8 n)
+{
+       struct dpll_data *dd;
+       long fint;
+       int ret = 0;
+
+       dd = clk->dpll_data;
+
+       /* DPLL divider must result in a valid jitter correction val */
+       fint = clk->parent->rate / (n + 1);
+       if (fint < DPLL_FINT_BAND1_MIN) {
+
+               pr_debug("rejecting n=%d due to Fint failure, "
+                        "lowering max_divider\n", n);
+               dd->max_divider = n;
+               ret = DPLL_FINT_UNDERFLOW;
+
+       } else if (fint > DPLL_FINT_BAND1_MAX &&
+                  fint < DPLL_FINT_BAND2_MIN) {
+
+               pr_debug("rejecting n=%d due to Fint failure\n", n);
+               ret = DPLL_FINT_INVALID;
+
+       } else if (fint > DPLL_FINT_BAND2_MAX) {
+
+               pr_debug("rejecting n=%d due to Fint failure, "
+                        "boosting min_divider\n", n);
+               dd->min_divider = n;
+               ret = DPLL_FINT_INVALID;
+
+       }
+
+       return ret;
+}
+
 /**
  * omap2_init_clk_clkdm - look up a clockdomain name, store pointer in clk
  * @clk: OMAP clock struct ptr to use
@@ -120,7 +197,7 @@ void omap2_init_clksel_parent(struct clk *clk)
                                                 clk->name, clks->parent->name,
                                                 ((clk->parent) ?
                                                  clk->parent->name : "NULL"));
-                                       clk->parent = clks->parent;
+                                       clk_reparent(clk, clks->parent);
                                };
                                found = 1;
                        }
@@ -134,25 +211,52 @@ void omap2_init_clksel_parent(struct clk *clk)
        return;
 }
 
-/* Returns the DPLL rate */
+/**
+ * omap2_get_dpll_rate - returns the current DPLL CLKOUT rate
+ * @clk: struct clk * of a DPLL
+ *
+ * DPLLs can be locked or bypassed - basically, enabled or disabled.
+ * When locked, the DPLL output depends on the M and N values.  When
+ * bypassed, on OMAP2xxx, the output rate is either the 32KiHz clock
+ * or sys_clk.  Bypass rates on OMAP3 depend on the DPLL: DPLLs 1 and
+ * 2 are bypassed with dpll1_fclk and dpll2_fclk respectively
+ * (generated by DPLL3), while DPLL 3, 4, and 5 bypass rates are sys_clk.
+ * Returns the current DPLL CLKOUT rate (*not* CLKOUTX2) if the DPLL is
+ * locked, or the appropriate bypass rate if the DPLL is bypassed, or 0
+ * if the clock @clk is not a DPLL.
+ */
 u32 omap2_get_dpll_rate(struct clk *clk)
 {
        long long dpll_clk;
-       u32 dpll_mult, dpll_div, dpll;
+       u32 dpll_mult, dpll_div, v;
        struct dpll_data *dd;
 
        dd = clk->dpll_data;
-       /* REVISIT: What do we return on error? */
        if (!dd)
                return 0;
 
-       dpll = __raw_readl(dd->mult_div1_reg);
-       dpll_mult = dpll & dd->mult_mask;
+       /* Return bypass rate if DPLL is bypassed */
+       v = __raw_readl(dd->control_reg);
+       v &= dd->enable_mask;
+       v >>= __ffs(dd->enable_mask);
+
+       if (cpu_is_omap24xx()) {
+               if (v == OMAP2XXX_EN_DPLL_LPBYPASS ||
+                   v == OMAP2XXX_EN_DPLL_FRBYPASS)
+                       return dd->clk_bypass->rate;
+       } else if (cpu_is_omap34xx()) {
+               if (v == OMAP3XXX_EN_DPLL_LPBYPASS ||
+                   v == OMAP3XXX_EN_DPLL_FRBYPASS)
+                       return dd->clk_bypass->rate;
+       }
+
+       v = __raw_readl(dd->mult_div1_reg);
+       dpll_mult = v & dd->mult_mask;
        dpll_mult >>= __ffs(dd->mult_mask);
-       dpll_div = dpll & dd->div1_mask;
+       dpll_div = v & dd->div1_mask;
        dpll_div >>= __ffs(dd->div1_mask);
 
-       dpll_clk = (long long)clk->parent->rate * dpll_mult;
+       dpll_clk = (long long)dd->clk_ref->rate * dpll_mult;
        do_div(dpll_clk, dpll_div + 1);
 
        return dpll_clk;
@@ -162,14 +266,11 @@ u32 omap2_get_dpll_rate(struct clk *clk)
  * Used for clocks that have the same value as the parent clock,
  * divided by some factor
  */
-void omap2_fixed_divisor_recalc(struct clk *clk)
+unsigned long omap2_fixed_divisor_recalc(struct clk *clk)
 {
        WARN_ON(!clk->fixed_div);
 
-       clk->rate = clk->parent->rate / clk->fixed_div;
-
-       if (clk->flags & RATE_PROPAGATES)
-               propagate_rate(clk);
+       return clk->parent->rate / clk->fixed_div;
 }
 
 /**
@@ -190,11 +291,10 @@ int omap2_wait_clock_ready(void __iomem *reg, u32 mask, const char *name)
         * 24xx uses 0 to indicate not ready, and 1 to indicate ready.
         * 34xx reverses this, just to keep us on our toes
         */
-       if (cpu_mask & (RATE_IN_242X | RATE_IN_243X)) {
+       if (cpu_mask & (RATE_IN_242X | RATE_IN_243X))
                ena = mask;
-       } else if (cpu_mask & RATE_IN_343X) {
+       else if (cpu_mask & RATE_IN_343X)
                ena = 0;
-       }
 
        /* Wait for lock */
        while (((__raw_readl(reg) & mask) != ena) &&
@@ -228,31 +328,12 @@ static void omap2_clk_wait_ready(struct clk *clk)
         * it and pull it into struct clk itself somehow.
         */
        reg = clk->enable_reg;
-       if ((((u32)reg & 0xff) >= CM_FCLKEN1) &&
-           (((u32)reg & 0xff) <= OMAP24XX_CM_FCLKEN2))
-               other_reg = (void __iomem *)(((u32)reg & ~0xf0) | 0x10); /* CM_ICLKEN* */
-       else if ((((u32)reg & 0xff) >= CM_ICLKEN1) &&
-                (((u32)reg & 0xff) <= OMAP24XX_CM_ICLKEN4))
-               other_reg = (void __iomem *)(((u32)reg & ~0xf0) | 0x00); /* CM_FCLKEN* */
-       else
-               return;
 
-       /* REVISIT: What are the appropriate exclusions for 34XX? */
-       /* No check for DSS or cam clocks */
-       if (cpu_is_omap24xx() && ((u32)reg & 0x0f) == 0) { /* CM_{F,I}CLKEN1 */
-               if (clk->enable_bit == OMAP24XX_EN_DSS2_SHIFT ||
-                   clk->enable_bit == OMAP24XX_EN_DSS1_SHIFT ||
-                   clk->enable_bit == OMAP24XX_EN_CAM_SHIFT)
-                       return;
-       }
-
-       /* REVISIT: What are the appropriate exclusions for 34XX? */
-       /* OMAP3: ignore DSS-mod clocks */
-       if (cpu_is_omap34xx() &&
-           (((u32)reg & ~0xff) == (u32)OMAP_CM_REGADDR(OMAP3430_DSS_MOD, 0) ||
-            ((((u32)reg & ~0xff) == (u32)OMAP_CM_REGADDR(CORE_MOD, 0)) &&
-            clk->enable_bit == OMAP3430_EN_SSI_SHIFT)))
-               return;
+       /*
+        * Convert CM_ICLKEN* <-> CM_FCLKEN*.  This conversion assumes
+        * it's just a matter of XORing the bits.
+        */
+       other_reg = (void __iomem *)((u32)reg ^ (CM_FCLKEN ^ CM_ICLKEN));
 
        /* Check if both functional and interface clocks
         * are running. */
@@ -264,18 +345,9 @@ static void omap2_clk_wait_ready(struct clk *clk)
        omap2_wait_clock_ready(st_reg, bit, clk->name);
 }
 
-/* Enables clock without considering parent dependencies or use count
- * REVISIT: Maybe change this to use clk->enable like on omap1?
- */
-int _omap2_clk_enable(struct clk *clk)
+static int omap2_dflt_clk_enable(struct clk *clk)
 {
-       u32 regval32;
-
-       if (clk->flags & (ALWAYS_ENABLED | PARENT_CONTROLS_CLOCK))
-               return 0;
-
-       if (clk->enable)
-               return clk->enable(clk);
+       u32 v;
 
        if (unlikely(clk->enable_reg == NULL)) {
                printk(KERN_ERR "clock.c: Enable for %s without enable code\n",
@@ -283,33 +355,38 @@ int _omap2_clk_enable(struct clk *clk)
                return 0; /* REVISIT: -EINVAL */
        }
 
-       regval32 = __raw_readl(clk->enable_reg);
+       v = __raw_readl(clk->enable_reg);
        if (clk->flags & INVERT_ENABLE)
-               regval32 &= ~(1 << clk->enable_bit);
+               v &= ~(1 << clk->enable_bit);
        else
-               regval32 |= (1 << clk->enable_bit);
-       __raw_writel(regval32, clk->enable_reg);
-       wmb();
-
-       omap2_clk_wait_ready(clk);
+               v |= (1 << clk->enable_bit);
+       __raw_writel(v, clk->enable_reg);
+       v = __raw_readl(clk->enable_reg); /* OCP barrier */
 
        return 0;
 }
 
-/* Disables clock without considering parent dependencies or use count */
-void _omap2_clk_disable(struct clk *clk)
+static int omap2_dflt_clk_enable_wait(struct clk *clk)
 {
-       u32 regval32;
-
-       if (clk->flags & (ALWAYS_ENABLED | PARENT_CONTROLS_CLOCK))
-               return;
+       int ret;
 
-       if (clk->disable) {
-               clk->disable(clk);
-               return;
+       if (!clk->enable_reg) {
+               printk(KERN_ERR "clock.c: Enable for %s without enable code\n",
+                      clk->name);
+               return 0; /* REVISIT: -EINVAL */
        }
 
-       if (clk->enable_reg == NULL) {
+       ret = omap2_dflt_clk_enable(clk);
+       if (ret == 0)
+               omap2_clk_wait_ready(clk);
+       return ret;
+}
+
+static void omap2_dflt_clk_disable(struct clk *clk)
+{
+       u32 v;
+
+       if (!clk->enable_reg) {
                /*
                 * 'Independent' here refers to a clock which is not
                 * controlled by its parent.
@@ -319,20 +396,44 @@ void _omap2_clk_disable(struct clk *clk)
                return;
        }
 
-       regval32 = __raw_readl(clk->enable_reg);
+       v = __raw_readl(clk->enable_reg);
        if (clk->flags & INVERT_ENABLE)
-               regval32 |= (1 << clk->enable_bit);
+               v |= (1 << clk->enable_bit);
        else
-               regval32 &= ~(1 << clk->enable_bit);
-       __raw_writel(regval32, clk->enable_reg);
-       wmb();
+               v &= ~(1 << clk->enable_bit);
+       __raw_writel(v, clk->enable_reg);
+       /* No OCP barrier needed here since it is a disable operation */
+}
+
+const struct clkops clkops_omap2_dflt_wait = {
+       .enable         = omap2_dflt_clk_enable_wait,
+       .disable        = omap2_dflt_clk_disable,
+};
+
+const struct clkops clkops_omap2_dflt = {
+       .enable         = omap2_dflt_clk_enable,
+       .disable        = omap2_dflt_clk_disable,
+};
+
+/* Enables clock without considering parent dependencies or use count
+ * REVISIT: Maybe change this to use clk->enable like on omap1?
+ */
+static int _omap2_clk_enable(struct clk *clk)
+{
+       return clk->ops->enable(clk);
+}
+
+/* Disables clock without considering parent dependencies or use count */
+static void _omap2_clk_disable(struct clk *clk)
+{
+       clk->ops->disable(clk);
 }
 
 void omap2_clk_disable(struct clk *clk)
 {
        if (clk->usecount > 0 && !(--clk->usecount)) {
                _omap2_clk_disable(clk);
-               if (likely((u32)clk->parent))
+               if (clk->parent)
                        omap2_clk_disable(clk->parent);
                if (clk->clkdm)
                        omap2_clkdm_clk_disable(clk->clkdm, clk);
@@ -345,30 +446,29 @@ int omap2_clk_enable(struct clk *clk)
        int ret = 0;
 
        if (clk->usecount++ == 0) {
-               if (likely((u32)clk->parent))
-                       ret = omap2_clk_enable(clk->parent);
-
-               if (unlikely(ret != 0)) {
-                       clk->usecount--;
-                       return ret;
-               }
-
                if (clk->clkdm)
                        omap2_clkdm_clk_enable(clk->clkdm, clk);
 
-               ret = _omap2_clk_enable(clk);
-
-               if (unlikely(ret != 0)) {
-                       if (clk->clkdm)
-                               omap2_clkdm_clk_disable(clk->clkdm, clk);
+               if (clk->parent) {
+                       ret = omap2_clk_enable(clk->parent);
+                       if (ret)
+                               goto err;
+               }
 
-                       if (clk->parent) {
+               ret = _omap2_clk_enable(clk);
+               if (ret) {
+                       if (clk->parent)
                                omap2_clk_disable(clk->parent);
-                               clk->usecount--;
-                       }
+
+                       goto err;
                }
        }
+       return ret;
 
+err:
+       if (clk->clkdm)
+               omap2_clkdm_clk_disable(clk->clkdm, clk);
+       clk->usecount--;
        return ret;
 }
 
@@ -376,24 +476,22 @@ int omap2_clk_enable(struct clk *clk)
  * Used for clocks that are part of CLKSEL_xyz governed clocks.
  * REVISIT: Maybe change to use clk->enable() functions like on omap1?
  */
-void omap2_clksel_recalc(struct clk *clk)
+unsigned long omap2_clksel_recalc(struct clk *clk)
 {
+       unsigned long rate;
        u32 div = 0;
 
        pr_debug("clock: recalc'ing clksel clk %s\n", clk->name);
 
        div = omap2_clksel_get_divisor(clk);
        if (div == 0)
-               return;
+               return clk->rate;
 
-       if (unlikely(clk->rate == clk->parent->rate / div))
-               return;
-       clk->rate = clk->parent->rate / div;
+       rate = clk->parent->rate / div;
 
-       pr_debug("clock: new clock rate is %ld (div %d)\n", clk->rate, div);
+       pr_debug("clock: new clock rate is %ld (div %d)\n", rate, div);
 
-       if (unlikely(clk->flags & RATE_PROPAGATES))
-               propagate_rate(clk);
+       return rate;
 }
 
 /**
@@ -405,8 +503,8 @@ void omap2_clksel_recalc(struct clk *clk)
  * the element associated with the supplied parent clock address.
  * Returns a pointer to the struct clksel on success or NULL on error.
  */
-const struct clksel *omap2_get_clksel_by_parent(struct clk *clk,
-                                               struct clk *src_clk)
+static const struct clksel *omap2_get_clksel_by_parent(struct clk *clk,
+                                                      struct clk *src_clk)
 {
        const struct clksel *clks;
 
@@ -455,7 +553,7 @@ u32 omap2_clksel_round_rate_div(struct clk *clk, unsigned long target_rate,
        *new_div = 1;
 
        clks = omap2_get_clksel_by_parent(clk, clk->parent);
-       if (clks == NULL)
+       if (!clks)
                return ~0;
 
        for (clkr = clks->rates; clkr->div; clkr++) {
@@ -514,7 +612,7 @@ long omap2_clksel_round_rate(struct clk *clk, unsigned long target_rate)
 /* Given a clock and a rate apply a clock specific rounding function */
 long omap2_clk_round_rate(struct clk *clk, unsigned long rate)
 {
-       if (clk->round_rate != NULL)
+       if (clk->round_rate)
                return clk->round_rate(clk, rate);
 
        if (clk->flags & RATE_FIXED)
@@ -540,7 +638,7 @@ u32 omap2_clksel_to_divisor(struct clk *clk, u32 field_val)
        const struct clksel_rate *clkr;
 
        clks = omap2_get_clksel_by_parent(clk, clk->parent);
-       if (clks == NULL)
+       if (!clks)
                return 0;
 
        for (clkr = clks->rates; clkr->div; clkr++) {
@@ -576,7 +674,7 @@ u32 omap2_divisor_to_clksel(struct clk *clk, u32 div)
        WARN_ON(div == 0);
 
        clks = omap2_get_clksel_by_parent(clk, clk->parent);
-       if (clks == NULL)
+       if (!clks)
                return ~0;
 
        for (clkr = clks->rates; clkr->div; clkr++) {
@@ -594,23 +692,6 @@ u32 omap2_divisor_to_clksel(struct clk *clk, u32 div)
        return clkr->val;
 }
 
-/**
- * omap2_get_clksel - find clksel register addr & field mask for a clk
- * @clk: struct clk to use
- * @field_mask: ptr to u32 to store the register field mask
- *
- * Returns the address of the clksel register upon success or NULL on error.
- */
-void __iomem *omap2_get_clksel(struct clk *clk, u32 *field_mask)
-{
-       if (unlikely((clk->clksel_reg == NULL) || (clk->clksel_mask == NULL)))
-               return NULL;
-
-       *field_mask = clk->clksel_mask;
-
-       return clk->clksel_reg;
-}
-
 /**
  * omap2_clksel_get_divisor - get current divider applied to parent clock.
  * @clk: OMAP struct clk to use.
@@ -619,49 +700,41 @@ void __iomem *omap2_get_clksel(struct clk *clk, u32 *field_mask)
  */
 u32 omap2_clksel_get_divisor(struct clk *clk)
 {
-       u32 field_mask, field_val;
-       void __iomem *div_addr;
+       u32 v;
 
-       div_addr = omap2_get_clksel(clk, &field_mask);
-       if (div_addr == NULL)
+       if (!clk->clksel_mask)
                return 0;
 
-       field_val = __raw_readl(div_addr) & field_mask;
-       field_val >>= __ffs(field_mask);
+       v = __raw_readl(clk->clksel_reg) & clk->clksel_mask;
+       v >>= __ffs(clk->clksel_mask);
 
-       return omap2_clksel_to_divisor(clk, field_val);
+       return omap2_clksel_to_divisor(clk, v);
 }
 
 int omap2_clksel_set_rate(struct clk *clk, unsigned long rate)
 {
-       u32 field_mask, field_val, reg_val, validrate, new_div = 0;
-       void __iomem *div_addr;
+       u32 v, field_val, validrate, new_div = 0;
 
-       validrate = omap2_clksel_round_rate_div(clk, rate, &new_div);
-       if (validrate != rate)
+       if (!clk->clksel_mask)
                return -EINVAL;
 
-       div_addr = omap2_get_clksel(clk, &field_mask);
-       if (div_addr == NULL)
+       validrate = omap2_clksel_round_rate_div(clk, rate, &new_div);
+       if (validrate != rate)
                return -EINVAL;
 
        field_val = omap2_divisor_to_clksel(clk, new_div);
        if (field_val == ~0)
                return -EINVAL;
 
-       reg_val = __raw_readl(div_addr);
-       reg_val &= ~field_mask;
-       reg_val |= (field_val << __ffs(field_mask));
-       __raw_writel(reg_val, div_addr);
-       wmb();
+       v = __raw_readl(clk->clksel_reg);
+       v &= ~clk->clksel_mask;
+       v |= field_val << __ffs(clk->clksel_mask);
+       __raw_writel(v, clk->clksel_reg);
+       v = __raw_readl(clk->clksel_reg); /* OCP barrier */
 
        clk->rate = clk->parent->rate / new_div;
 
-       if (clk->flags & DELAYED_APP && cpu_is_omap24xx()) {
-               prm_write_mod_reg(OMAP24XX_VALID_CONFIG,
-                       OMAP24XX_GR_MOD, OMAP24XX_PRCM_CLKCFG_CTRL_OFFSET);
-               wmb();
-       }
+       _omap2xxx_clk_commit(clk);
 
        return 0;
 }
@@ -680,31 +753,24 @@ int omap2_clk_set_rate(struct clk *clk, unsigned long rate)
                return -EINVAL;
 
        /* dpll_ck, core_ck, virt_prcm_set; plus all clksel clocks */
-       if (clk->set_rate != NULL)
+       if (clk->set_rate)
                ret = clk->set_rate(clk, rate);
 
-       if (unlikely(ret == 0 && (clk->flags & RATE_PROPAGATES)))
-               propagate_rate(clk);
-
        return ret;
 }
 
 /*
  * Converts encoded control register address into a full address
- * On error, *src_addr will be returned as 0.
+ * On error, the return value (parent_div) will be 0.
  */
-static u32 omap2_clksel_get_src_field(void __iomem **src_addr,
-                                     struct clk *src_clk, u32 *field_mask,
-                                     struct clk *clk, u32 *parent_div)
+static u32 _omap2_clksel_get_src_field(struct clk *src_clk, struct clk *clk,
+                                      u32 *field_val)
 {
        const struct clksel *clks;
        const struct clksel_rate *clkr;
 
-       *parent_div = 0;
-       *src_addr = NULL;
-
        clks = omap2_get_clksel_by_parent(clk, src_clk);
-       if (clks == NULL)
+       if (!clks)
                return 0;
 
        for (clkr = clks->rates; clkr->div; clkr++) {
@@ -722,47 +788,35 @@ static u32 omap2_clksel_get_src_field(void __iomem **src_addr,
        /* Should never happen.  Add a clksel mask to the struct clk. */
        WARN_ON(clk->clksel_mask == 0);
 
-       *field_mask = clk->clksel_mask;
-       *src_addr = clk->clksel_reg;
-       *parent_div = clkr->div;
+       *field_val = clkr->val;
 
-       return clkr->val;
+       return clkr->div;
 }
 
 int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent)
 {
-       void __iomem *src_addr;
-       u32 field_val, field_mask, reg_val, parent_div;
+       u32 field_val, v, parent_div;
 
-       if (unlikely(clk->flags & CONFIG_PARTICIPANT))
+       if (clk->flags & CONFIG_PARTICIPANT)
                return -EINVAL;
 
        if (!clk->clksel)
                return -EINVAL;
 
-       field_val = omap2_clksel_get_src_field(&src_addr, new_parent,
-                                              &field_mask, clk, &parent_div);
-       if (src_addr == NULL)
+       parent_div = _omap2_clksel_get_src_field(new_parent, clk, &field_val);
+       if (!parent_div)
                return -EINVAL;
 
-       if (clk->usecount > 0)
-               omap2_clk_disable(clk);
-
        /* Set new source value (previous dividers if any in effect) */
-       reg_val = __raw_readl(src_addr) & ~field_mask;
-       reg_val |= (field_val << __ffs(field_mask));
-       __raw_writel(reg_val, src_addr);
-       wmb();
-
-       if (clk->flags & DELAYED_APP && cpu_is_omap24xx()) {
-               __raw_writel(OMAP24XX_VALID_CONFIG, OMAP24XX_PRCM_CLKCFG_CTRL);
-               wmb();
-       }
+       v = __raw_readl(clk->clksel_reg);
+       v &= ~clk->clksel_mask;
+       v |= field_val << __ffs(clk->clksel_mask);
+       __raw_writel(v, clk->clksel_reg);
+       v = __raw_readl(clk->clksel_reg);    /* OCP barrier */
 
-       clk->parent = new_parent;
+       _omap2xxx_clk_commit(clk);
 
-       if (clk->usecount > 0)
-               omap2_clk_enable(clk);
+       clk_reparent(clk, new_parent);
 
        /* CLKSEL clocks follow their parents' rates, divided by a divisor */
        clk->rate = new_parent->rate;
@@ -773,9 +827,6 @@ int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent)
        pr_debug("clock: set parent of %s to %s (new rate %ld)\n",
                 clk->name, clk->parent->name, clk->rate);
 
-       if (unlikely(clk->flags & RATE_PROPAGATES))
-               propagate_rate(clk);
-
        return 0;
 }
 
@@ -805,7 +856,8 @@ int omap2_dpll_set_rate_tolerance(struct clk *clk, unsigned int tolerance)
        return 0;
 }
 
-static unsigned long _dpll_compute_new_rate(unsigned long parent_rate, unsigned int m, unsigned int n)
+static unsigned long _dpll_compute_new_rate(unsigned long parent_rate,
+                                           unsigned int m, unsigned int n)
 {
        unsigned long long num;
 
@@ -838,7 +890,7 @@ static int _dpll_test_mult(int *m, int n, unsigned long *new_rate,
                           unsigned long target_rate,
                           unsigned long parent_rate)
 {
-       int flags = 0, carry = 0;
+       int r = 0, carry = 0;
 
        /* Unscale m and round if necessary */
        if (*m % DPLL_SCALE_FACTOR >= DPLL_ROUNDING_VAL)
@@ -859,13 +911,13 @@ static int _dpll_test_mult(int *m, int n, unsigned long *new_rate,
        if (*m < DPLL_MIN_MULTIPLIER) {
                *m = DPLL_MIN_MULTIPLIER;
                *new_rate = 0;
-               flags = DPLL_MULT_UNDERFLOW;
+               r = DPLL_MULT_UNDERFLOW;
        }
 
        if (*new_rate == 0)
                *new_rate = _dpll_compute_new_rate(parent_rate, *m, n);
 
-       return flags;
+       return r;
 }
 
 /**
@@ -889,54 +941,65 @@ long omap2_dpll_round_rate(struct clk *clk, unsigned long target_rate)
        int m, n, r, e, scaled_max_m;
        unsigned long scaled_rt_rp, new_rate;
        int min_e = -1, min_e_m = -1, min_e_n = -1;
+       struct dpll_data *dd;
 
        if (!clk || !clk->dpll_data)
                return ~0;
 
+       dd = clk->dpll_data;
+
        pr_debug("clock: starting DPLL round_rate for clock %s, target rate "
                 "%ld\n", clk->name, target_rate);
 
-       scaled_rt_rp = target_rate / (clk->parent->rate / DPLL_SCALE_FACTOR);
-       scaled_max_m = clk->dpll_data->max_multiplier * DPLL_SCALE_FACTOR;
+       scaled_rt_rp = target_rate / (dd->clk_ref->rate / DPLL_SCALE_FACTOR);
+       scaled_max_m = dd->max_multiplier * DPLL_SCALE_FACTOR;
 
-       clk->dpll_data->last_rounded_rate = 0;
+       dd->last_rounded_rate = 0;
 
-       for (n = clk->dpll_data->max_divider; n >= DPLL_MIN_DIVIDER; n--) {
+       for (n = dd->min_divider; n <= dd->max_divider; n++) {
+
+               /* Is the (input clk, divider) pair valid for the DPLL? */
+               r = _dpll_test_fint(clk, n);
+               if (r == DPLL_FINT_UNDERFLOW)
+                       break;
+               else if (r == DPLL_FINT_INVALID)
+                       continue;
 
                /* Compute the scaled DPLL multiplier, based on the divider */
                m = scaled_rt_rp * n;
 
                /*
-                * Since we're counting n down, a m overflow means we can
-                * can immediately skip to the next n
+                * Since we're counting n up, a m overflow means we
+                * can bail out completely (since as n increases in
+                * the next iteration, there's no way that m can
+                * increase beyond the current m)
                 */
                if (m > scaled_max_m)
-                       continue;
+                       break;
 
                r = _dpll_test_mult(&m, n, &new_rate, target_rate,
-                                   clk->parent->rate);
+                                   dd->clk_ref->rate);
+
+               /* m can't be set low enough for this n - try with a larger n */
+               if (r == DPLL_MULT_UNDERFLOW)
+                       continue;
 
                e = target_rate - new_rate;
                pr_debug("clock: n = %d: m = %d: rate error is %d "
                         "(new_rate = %ld)\n", n, m, e, new_rate);
 
                if (min_e == -1 ||
-                   min_e >= (int)(abs(e) - clk->dpll_data->rate_tolerance)) {
+                   min_e >= (int)(abs(e) - dd->rate_tolerance)) {
                        min_e = e;
                        min_e_m = m;
                        min_e_n = n;
 
                        pr_debug("clock: found new least error %d\n", min_e);
-               }
 
-               /*
-                * Since we're counting n down, a m underflow means we
-                * can bail out completely (since as n decreases in
-                * the next iteration, there's no way that m can
-                * increase beyond the current m)
-                */
-               if (r & DPLL_MULT_UNDERFLOW)
-                       break;
+                       /* We found good settings -- bail out now */
+                       if (min_e <= dd->rate_tolerance)
+                               break;
+               }
        }
 
        if (min_e < 0) {
@@ -944,17 +1007,17 @@ long omap2_dpll_round_rate(struct clk *clk, unsigned long target_rate)
                return ~0;
        }
 
-       clk->dpll_data->last_rounded_m = min_e_m;
-       clk->dpll_data->last_rounded_n = min_e_n;
-       clk->dpll_data->last_rounded_rate =
-               _dpll_compute_new_rate(clk->parent->rate, min_e_m,  min_e_n);
+       dd->last_rounded_m = min_e_m;
+       dd->last_rounded_n = min_e_n;
+       dd->last_rounded_rate = _dpll_compute_new_rate(dd->clk_ref->rate,
+                                                      min_e_m,  min_e_n);
 
        pr_debug("clock: final least error: e = %d, m = %d, n = %d\n",
                 min_e, min_e_m, min_e_n);
        pr_debug("clock: final rate: %ld  (target rate: %ld)\n",
-                clk->dpll_data->last_rounded_rate, target_rate);
+                dd->last_rounded_rate, target_rate);
 
-       return clk->dpll_data->last_rounded_rate;
+       return dd->last_rounded_rate;
 }
 
 /*-------------------------------------------------------------------------
@@ -973,6 +1036,10 @@ void omap2_clk_disable_unused(struct clk *clk)
                return;
 
        printk(KERN_INFO "Disabling unused clock \"%s\"\n", clk->name);
-       _omap2_clk_disable(clk);
+       if (cpu_is_omap34xx()) {
+               omap2_clk_enable(clk);
+               omap2_clk_disable(clk);
+       } else
+               _omap2_clk_disable(clk);
 }
 #endif
index 1fb330e0847d868bb6ac76fb6de806c1b20a93b7..2679ddfa64248307abad3f45c256423a6936a0a5 100644 (file)
 /* The maximum error between a target DPLL rate and the rounded rate in Hz */
 #define DEFAULT_DPLL_RATE_TOLERANCE    50000
 
+/* CM_CLKSEL2_PLL.CORE_CLK_SRC bits (2XXX) */
+#define CORE_CLK_SRC_32K               0x0
+#define CORE_CLK_SRC_DPLL              0x1
+#define CORE_CLK_SRC_DPLL_X2           0x2
+
+/* OMAP2xxx CM_CLKEN_PLL.EN_DPLL bits - for omap2_get_dpll_rate() */
+#define OMAP2XXX_EN_DPLL_LPBYPASS              0x1
+#define OMAP2XXX_EN_DPLL_FRBYPASS              0x2
+#define OMAP2XXX_EN_DPLL_LOCKED                        0x3
+
+/* OMAP3xxx CM_CLKEN_PLL*.EN_*_DPLL bits - for omap2_get_dpll_rate() */
+#define OMAP3XXX_EN_DPLL_LPBYPASS              0x5
+#define OMAP3XXX_EN_DPLL_FRBYPASS              0x6
+#define OMAP3XXX_EN_DPLL_LOCKED                        0x7
+
 int omap2_clk_init(void);
 int omap2_clk_enable(struct clk *clk);
 void omap2_clk_disable(struct clk *clk);
 long omap2_clk_round_rate(struct clk *clk, unsigned long rate);
 int omap2_clk_set_rate(struct clk *clk, unsigned long rate);
 int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent);
-int omap2_dpll_rate_tolerance_set(struct clk *clk, unsigned int tolerance);
+int omap2_dpll_set_rate_tolerance(struct clk *clk, unsigned int tolerance);
 long omap2_dpll_round_rate(struct clk *clk, unsigned long target_rate);
 
 #ifdef CONFIG_OMAP_RESET_CLOCKS
@@ -36,7 +51,7 @@ void omap2_clk_disable_unused(struct clk *clk);
 #define omap2_clk_disable_unused       NULL
 #endif
 
-void omap2_clksel_recalc(struct clk *clk);
+unsigned long omap2_clksel_recalc(struct clk *clk);
 void omap2_init_clk_clkdm(struct clk *clk);
 void omap2_init_clksel_parent(struct clk *clk);
 u32 omap2_clksel_get_divisor(struct clk *clk);
@@ -44,13 +59,16 @@ u32 omap2_clksel_round_rate_div(struct clk *clk, unsigned long target_rate,
                                u32 *new_div);
 u32 omap2_clksel_to_divisor(struct clk *clk, u32 field_val);
 u32 omap2_divisor_to_clksel(struct clk *clk, u32 div);
-void omap2_fixed_divisor_recalc(struct clk *clk);
+unsigned long omap2_fixed_divisor_recalc(struct clk *clk);
 long omap2_clksel_round_rate(struct clk *clk, unsigned long target_rate);
 int omap2_clksel_set_rate(struct clk *clk, unsigned long rate);
 u32 omap2_get_dpll_rate(struct clk *clk);
 int omap2_wait_clock_ready(void __iomem *reg, u32 cval, const char *name);
 void omap2_clk_prepare_for_reboot(void);
 
+extern const struct clkops clkops_omap2_dflt_wait;
+extern const struct clkops clkops_omap2_dflt;
+
 extern u8 cpu_mask;
 
 /* clksel_rate data common to 24xx/343x */
index d382eb0184ac445dab16b835cca3d80eda0a66fc..1e839c5a28c5cfb93dec935f4e6b4e9841e1171a 100644 (file)
 #include <mach/clock.h>
 #include <mach/sram.h>
 #include <asm/div64.h>
+#include <asm/clkdev.h>
 
-#include "memory.h"
+#include <mach/sdrc.h>
 #include "clock.h"
-#include "clock24xx.h"
 #include "prm.h"
 #include "prm-regbits-24xx.h"
 #include "cm.h"
 #include "cm-regbits-24xx.h"
 
+static const struct clkops clkops_oscck;
+static const struct clkops clkops_fixed;
+
+#include "clock24xx.h"
+
+struct omap_clk {
+       u32             cpu;
+       struct clk_lookup lk;
+};
+
+#define CLK(dev, con, ck, cp)          \
+       {                               \
+                .cpu = cp,             \
+               .lk = {                 \
+                       .dev_id = dev,  \
+                       .con_id = con,  \
+                       .clk = ck,      \
+               },                      \
+       }
+
+#define CK_243X        (1 << 0)
+#define CK_242X        (1 << 1)
+
+static struct omap_clk omap24xx_clks[] = {
+       /* external root sources */
+       CLK(NULL,       "func_32k_ck",  &func_32k_ck,   CK_243X | CK_242X),
+       CLK(NULL,       "osc_ck",       &osc_ck,        CK_243X | CK_242X),
+       CLK(NULL,       "sys_ck",       &sys_ck,        CK_243X | CK_242X),
+       CLK(NULL,       "alt_ck",       &alt_ck,        CK_243X | CK_242X),
+       /* internal analog sources */
+       CLK(NULL,       "dpll_ck",      &dpll_ck,       CK_243X | CK_242X),
+       CLK(NULL,       "apll96_ck",    &apll96_ck,     CK_243X | CK_242X),
+       CLK(NULL,       "apll54_ck",    &apll54_ck,     CK_243X | CK_242X),
+       /* internal prcm root sources */
+       CLK(NULL,       "func_54m_ck",  &func_54m_ck,   CK_243X | CK_242X),
+       CLK(NULL,       "core_ck",      &core_ck,       CK_243X | CK_242X),
+       CLK(NULL,       "func_96m_ck",  &func_96m_ck,   CK_243X | CK_242X),
+       CLK(NULL,       "func_48m_ck",  &func_48m_ck,   CK_243X | CK_242X),
+       CLK(NULL,       "func_12m_ck",  &func_12m_ck,   CK_243X | CK_242X),
+       CLK(NULL,       "ck_wdt1_osc",  &wdt1_osc_ck,   CK_243X | CK_242X),
+       CLK(NULL,       "sys_clkout_src", &sys_clkout_src, CK_243X | CK_242X),
+       CLK(NULL,       "sys_clkout",   &sys_clkout,    CK_243X | CK_242X),
+       CLK(NULL,       "sys_clkout2_src", &sys_clkout2_src, CK_242X),
+       CLK(NULL,       "sys_clkout2",  &sys_clkout2,   CK_242X),
+       CLK(NULL,       "emul_ck",      &emul_ck,       CK_242X),
+       /* mpu domain clocks */
+       CLK(NULL,       "mpu_ck",       &mpu_ck,        CK_243X | CK_242X),
+       /* dsp domain clocks */
+       CLK(NULL,       "dsp_fck",      &dsp_fck,       CK_243X | CK_242X),
+       CLK(NULL,       "dsp_irate_ick", &dsp_irate_ick, CK_243X | CK_242X),
+       CLK(NULL,       "dsp_ick",      &dsp_ick,       CK_242X),
+       CLK(NULL,       "iva2_1_ick",   &iva2_1_ick,    CK_243X),
+       CLK(NULL,       "iva1_ifck",    &iva1_ifck,     CK_242X),
+       CLK(NULL,       "iva1_mpu_int_ifck", &iva1_mpu_int_ifck, CK_242X),
+       /* GFX domain clocks */
+       CLK(NULL,       "gfx_3d_fck",   &gfx_3d_fck,    CK_243X | CK_242X),
+       CLK(NULL,       "gfx_2d_fck",   &gfx_2d_fck,    CK_243X | CK_242X),
+       CLK(NULL,       "gfx_ick",      &gfx_ick,       CK_243X | CK_242X),
+       /* Modem domain clocks */
+       CLK(NULL,       "mdm_ick",      &mdm_ick,       CK_243X),
+       CLK(NULL,       "mdm_osc_ck",   &mdm_osc_ck,    CK_243X),
+       /* DSS domain clocks */
+       CLK(NULL,       "dss_ick",      &dss_ick,       CK_243X | CK_242X),
+       CLK(NULL,       "dss1_fck",     &dss1_fck,      CK_243X | CK_242X),
+       CLK(NULL,       "dss2_fck",     &dss2_fck,      CK_243X | CK_242X),
+       CLK(NULL,       "dss_54m_fck",  &dss_54m_fck,   CK_243X | CK_242X),
+       /* L3 domain clocks */
+       CLK(NULL,       "core_l3_ck",   &core_l3_ck,    CK_243X | CK_242X),
+       CLK(NULL,       "ssi_fck",      &ssi_ssr_sst_fck, CK_243X | CK_242X),
+       CLK(NULL,       "usb_l4_ick",   &usb_l4_ick,    CK_243X | CK_242X),
+       /* L4 domain clocks */
+       CLK(NULL,       "l4_ck",        &l4_ck,         CK_243X | CK_242X),
+       CLK(NULL,       "ssi_l4_ick",   &ssi_l4_ick,    CK_243X | CK_242X),
+       /* virtual meta-group clock */
+       CLK(NULL,       "virt_prcm_set", &virt_prcm_set, CK_243X | CK_242X),
+       /* general l4 interface ck, multi-parent functional clk */
+       CLK(NULL,       "gpt1_ick",     &gpt1_ick,      CK_243X | CK_242X),
+       CLK(NULL,       "gpt1_fck",     &gpt1_fck,      CK_243X | CK_242X),
+       CLK(NULL,       "gpt2_ick",     &gpt2_ick,      CK_243X | CK_242X),
+       CLK(NULL,       "gpt2_fck",     &gpt2_fck,      CK_243X | CK_242X),
+       CLK(NULL,       "gpt3_ick",     &gpt3_ick,      CK_243X | CK_242X),
+       CLK(NULL,       "gpt3_fck",     &gpt3_fck,      CK_243X | CK_242X),
+       CLK(NULL,       "gpt4_ick",     &gpt4_ick,      CK_243X | CK_242X),
+       CLK(NULL,       "gpt4_fck",     &gpt4_fck,      CK_243X | CK_242X),
+       CLK(NULL,       "gpt5_ick",     &gpt5_ick,      CK_243X | CK_242X),
+       CLK(NULL,       "gpt5_fck",     &gpt5_fck,      CK_243X | CK_242X),
+       CLK(NULL,       "gpt6_ick",     &gpt6_ick,      CK_243X | CK_242X),
+       CLK(NULL,       "gpt6_fck",     &gpt6_fck,      CK_243X | CK_242X),
+       CLK(NULL,       "gpt7_ick",     &gpt7_ick,      CK_243X | CK_242X),
+       CLK(NULL,       "gpt7_fck",     &gpt7_fck,      CK_243X | CK_242X),
+       CLK(NULL,       "gpt8_ick",     &gpt8_ick,      CK_243X | CK_242X),
+       CLK(NULL,       "gpt8_fck",     &gpt8_fck,      CK_243X | CK_242X),
+       CLK(NULL,       "gpt9_ick",     &gpt9_ick,      CK_243X | CK_242X),
+       CLK(NULL,       "gpt9_fck",     &gpt9_fck,      CK_243X | CK_242X),
+       CLK(NULL,       "gpt10_ick",    &gpt10_ick,     CK_243X | CK_242X),
+       CLK(NULL,       "gpt10_fck",    &gpt10_fck,     CK_243X | CK_242X),
+       CLK(NULL,       "gpt11_ick",    &gpt11_ick,     CK_243X | CK_242X),
+       CLK(NULL,       "gpt11_fck",    &gpt11_fck,     CK_243X | CK_242X),
+       CLK(NULL,       "gpt12_ick",    &gpt12_ick,     CK_243X | CK_242X),
+       CLK(NULL,       "gpt12_fck",    &gpt12_fck,     CK_243X | CK_242X),
+       CLK("omap-mcbsp.1", "ick",      &mcbsp1_ick,    CK_243X | CK_242X),
+       CLK("omap-mcbsp.1", "fck",      &mcbsp1_fck,    CK_243X | CK_242X),
+       CLK("omap-mcbsp.2", "ick",      &mcbsp2_ick,    CK_243X | CK_242X),
+       CLK("omap-mcbsp.2", "fck",      &mcbsp2_fck,    CK_243X | CK_242X),
+       CLK("omap-mcbsp.3", "ick",      &mcbsp3_ick,    CK_243X),
+       CLK("omap-mcbsp.3", "fck",      &mcbsp3_fck,    CK_243X),
+       CLK("omap-mcbsp.4", "ick",      &mcbsp4_ick,    CK_243X),
+       CLK("omap-mcbsp.4", "fck",      &mcbsp4_fck,    CK_243X),
+       CLK("omap-mcbsp.5", "ick",      &mcbsp5_ick,    CK_243X),
+       CLK("omap-mcbsp.5", "fck",      &mcbsp5_fck,    CK_243X),
+       CLK("omap2_mcspi.1", "ick",     &mcspi1_ick,    CK_243X | CK_242X),
+       CLK("omap2_mcspi.1", "fck",     &mcspi1_fck,    CK_243X | CK_242X),
+       CLK("omap2_mcspi.2", "ick",     &mcspi2_ick,    CK_243X | CK_242X),
+       CLK("omap2_mcspi.2", "fck",     &mcspi2_fck,    CK_243X | CK_242X),
+       CLK("omap2_mcspi.3", "ick",     &mcspi3_ick,    CK_243X),
+       CLK("omap2_mcspi.3", "fck",     &mcspi3_fck,    CK_243X),
+       CLK(NULL,       "uart1_ick",    &uart1_ick,     CK_243X | CK_242X),
+       CLK(NULL,       "uart1_fck",    &uart1_fck,     CK_243X | CK_242X),
+       CLK(NULL,       "uart2_ick",    &uart2_ick,     CK_243X | CK_242X),
+       CLK(NULL,       "uart2_fck",    &uart2_fck,     CK_243X | CK_242X),
+       CLK(NULL,       "uart3_ick",    &uart3_ick,     CK_243X | CK_242X),
+       CLK(NULL,       "uart3_fck",    &uart3_fck,     CK_243X | CK_242X),
+       CLK(NULL,       "gpios_ick",    &gpios_ick,     CK_243X | CK_242X),
+       CLK(NULL,       "gpios_fck",    &gpios_fck,     CK_243X | CK_242X),
+       CLK("omap_wdt", "ick",          &mpu_wdt_ick,   CK_243X | CK_242X),
+       CLK("omap_wdt", "fck",          &mpu_wdt_fck,   CK_243X | CK_242X),
+       CLK(NULL,       "sync_32k_ick", &sync_32k_ick,  CK_243X | CK_242X),
+       CLK(NULL,       "wdt1_ick",     &wdt1_ick,      CK_243X | CK_242X),
+       CLK(NULL,       "omapctrl_ick", &omapctrl_ick,  CK_243X | CK_242X),
+       CLK(NULL,       "icr_ick",      &icr_ick,       CK_243X),
+       CLK("omap24xxcam", "fck",       &cam_fck,       CK_243X | CK_242X),
+       CLK("omap24xxcam", "ick",       &cam_ick,       CK_243X | CK_242X),
+       CLK(NULL,       "mailboxes_ick", &mailboxes_ick,        CK_243X | CK_242X),
+       CLK(NULL,       "wdt4_ick",     &wdt4_ick,      CK_243X | CK_242X),
+       CLK(NULL,       "wdt4_fck",     &wdt4_fck,      CK_243X | CK_242X),
+       CLK(NULL,       "wdt3_ick",     &wdt3_ick,      CK_242X),
+       CLK(NULL,       "wdt3_fck",     &wdt3_fck,      CK_242X),
+       CLK(NULL,       "mspro_ick",    &mspro_ick,     CK_243X | CK_242X),
+       CLK(NULL,       "mspro_fck",    &mspro_fck,     CK_243X | CK_242X),
+       CLK("mmci-omap.0", "ick",       &mmc_ick,       CK_242X),
+       CLK("mmci-omap.0", "fck",       &mmc_fck,       CK_242X),
+       CLK(NULL,       "fac_ick",      &fac_ick,       CK_243X | CK_242X),
+       CLK(NULL,       "fac_fck",      &fac_fck,       CK_243X | CK_242X),
+       CLK(NULL,       "eac_ick",      &eac_ick,       CK_242X),
+       CLK(NULL,       "eac_fck",      &eac_fck,       CK_242X),
+       CLK("omap_hdq.0", "ick",        &hdq_ick,       CK_243X | CK_242X),
+       CLK("omap_hdq.1", "fck",        &hdq_fck,       CK_243X | CK_242X),
+       CLK("i2c_omap.1", "ick",        &i2c1_ick,      CK_243X | CK_242X),
+       CLK("i2c_omap.1", "fck",        &i2c1_fck,      CK_242X),
+       CLK("i2c_omap.1", "fck",        &i2chs1_fck,    CK_243X),
+       CLK("i2c_omap.2", "ick",        &i2c2_ick,      CK_243X | CK_242X),
+       CLK("i2c_omap.2", "fck",        &i2c2_fck,      CK_242X),
+       CLK("i2c_omap.2", "fck",        &i2chs2_fck,    CK_243X),
+       CLK(NULL,       "gpmc_fck",     &gpmc_fck,      CK_243X | CK_242X),
+       CLK(NULL,       "sdma_fck",     &sdma_fck,      CK_243X | CK_242X),
+       CLK(NULL,       "sdma_ick",     &sdma_ick,      CK_243X | CK_242X),
+       CLK(NULL,       "vlynq_ick",    &vlynq_ick,     CK_242X),
+       CLK(NULL,       "vlynq_fck",    &vlynq_fck,     CK_242X),
+       CLK(NULL,       "sdrc_ick",     &sdrc_ick,      CK_243X),
+       CLK(NULL,       "des_ick",      &des_ick,       CK_243X | CK_242X),
+       CLK(NULL,       "sha_ick",      &sha_ick,       CK_243X | CK_242X),
+       CLK("omap_rng", "ick",          &rng_ick,       CK_243X | CK_242X),
+       CLK(NULL,       "aes_ick",      &aes_ick,       CK_243X | CK_242X),
+       CLK(NULL,       "pka_ick",      &pka_ick,       CK_243X | CK_242X),
+       CLK(NULL,       "usb_fck",      &usb_fck,       CK_243X | CK_242X),
+       CLK(NULL,       "usbhs_ick",    &usbhs_ick,     CK_243X),
+       CLK("mmci-omap-hs.0", "ick",    &mmchs1_ick,    CK_243X),
+       CLK("mmci-omap-hs.0", "fck",    &mmchs1_fck,    CK_243X),
+       CLK("mmci-omap-hs.1", "ick",    &mmchs2_ick,    CK_243X),
+       CLK("mmci-omap-hs.1", "fck",    &mmchs2_fck,    CK_243X),
+       CLK(NULL,       "gpio5_ick",    &gpio5_ick,     CK_243X),
+       CLK(NULL,       "gpio5_fck",    &gpio5_fck,     CK_243X),
+       CLK(NULL,       "mdm_intc_ick", &mdm_intc_ick,  CK_243X),
+       CLK("mmci-omap-hs.0", "mmchsdb_fck",    &mmchsdb1_fck,  CK_243X),
+       CLK("mmci-omap-hs.1", "mmchsdb_fck",    &mmchsdb2_fck,  CK_243X),
+};
+
 /* CM_CLKEN_PLL.EN_{54,96}M_PLL options (24XX) */
 #define EN_APLL_STOPPED                        0
 #define EN_APLL_LOCKED                 3
@@ -59,19 +236,32 @@ static struct clk *sclk;
  * Omap24xx specific clock functions
  *-------------------------------------------------------------------------*/
 
-/* This actually returns the rate of core_ck, not dpll_ck. */
-static u32 omap2_get_dpll_rate_24xx(struct clk *tclk)
+/**
+ * omap2xxx_clk_get_core_rate - return the CORE_CLK rate
+ * @clk: pointer to the combined dpll_ck + core_ck (currently "dpll_ck")
+ *
+ * Returns the CORE_CLK rate.  CORE_CLK can have one of three rate
+ * sources on OMAP2xxx: the DPLL CLKOUT rate, DPLL CLKOUTX2, or 32KHz
+ * (the latter is unusual).  This currently should be called with
+ * struct clk *dpll_ck, which is a composite clock of dpll_ck and
+ * core_ck.
+ */
+static unsigned long omap2xxx_clk_get_core_rate(struct clk *clk)
 {
-       long long dpll_clk;
-       u8 amult;
+       long long core_clk;
+       u32 v;
+
+       core_clk = omap2_get_dpll_rate(clk);
 
-       dpll_clk = omap2_get_dpll_rate(tclk);
+       v = cm_read_mod_reg(PLL_MOD, CM_CLKSEL2);
+       v &= OMAP24XX_CORE_CLK_SRC_MASK;
 
-       amult = cm_read_mod_reg(PLL_MOD, CM_CLKSEL2);
-       amult &= OMAP24XX_CORE_CLK_SRC_MASK;
-       dpll_clk *= amult;
+       if (v == CORE_CLK_SRC_32K)
+               core_clk = 32768;
+       else
+               core_clk *= v;
 
-       return dpll_clk;
+       return core_clk;
 }
 
 static int omap2_enable_osc_ck(struct clk *clk)
@@ -96,6 +286,11 @@ static void omap2_disable_osc_ck(struct clk *clk)
                      OMAP24XX_PRCM_CLKSRC_CTRL);
 }
 
+static const struct clkops clkops_oscck = {
+       .enable         = &omap2_enable_osc_ck,
+       .disable        = &omap2_disable_osc_ck,
+};
+
 #ifdef OLD_CK
 /* Recalculate SYST_CLK */
 static void omap2_sys_clk_recalc(struct clk * clk)
@@ -149,11 +344,16 @@ static void omap2_clk_fixed_disable(struct clk *clk)
        cm_write_mod_reg(cval, PLL_MOD, CM_CLKEN);
 }
 
+static const struct clkops clkops_fixed = {
+       .enable         = &omap2_clk_fixed_enable,
+       .disable        = &omap2_clk_fixed_disable,
+};
+
 /*
  * Uses the current prcm set to tell if a rate is valid.
  * You can go slower, but not faster within a given rate set.
  */
-long omap2_dpllcore_round_rate(unsigned long target_rate)
+static long omap2_dpllcore_round_rate(unsigned long target_rate)
 {
        u32 high, low, core_clk_src;
 
@@ -182,11 +382,9 @@ long omap2_dpllcore_round_rate(unsigned long target_rate)
 
 }
 
-static void omap2_dpllcore_recalc(struct clk *clk)
+static unsigned long omap2_dpllcore_recalc(struct clk *clk)
 {
-       clk->rate = omap2_get_dpll_rate_24xx(clk);
-
-       propagate_rate(clk);
+       return omap2xxx_clk_get_core_rate(clk);
 }
 
 static int omap2_reprogram_dpllcore(struct clk *clk, unsigned long rate)
@@ -195,22 +393,19 @@ static int omap2_reprogram_dpllcore(struct clk *clk, unsigned long rate)
        u32 bypass = 0;
        struct prcm_config tmpset;
        const struct dpll_data *dd;
-       unsigned long flags;
-       int ret = -EINVAL;
 
-       local_irq_save(flags);
-       cur_rate = omap2_get_dpll_rate_24xx(&dpll_ck);
+       cur_rate = omap2xxx_clk_get_core_rate(&dpll_ck);
        mult = cm_read_mod_reg(PLL_MOD, CM_CLKSEL2);
        mult &= OMAP24XX_CORE_CLK_SRC_MASK;
 
        if ((rate == (cur_rate / 2)) && (mult == 2)) {
-               omap2_reprogram_sdrc(CORE_CLK_SRC_DPLL, 1);
+               omap2xxx_sdrc_reprogram(CORE_CLK_SRC_DPLL, 1);
        } else if ((rate == (cur_rate * 2)) && (mult == 1)) {
-               omap2_reprogram_sdrc(CORE_CLK_SRC_DPLL_X2, 1);
+               omap2xxx_sdrc_reprogram(CORE_CLK_SRC_DPLL_X2, 1);
        } else if (rate != cur_rate) {
                valid_rate = omap2_dpllcore_round_rate(rate);
                if (valid_rate != rate)
-                       goto dpll_exit;
+                       return -EINVAL;
 
                if (mult == 1)
                        low = curr_prcm_set->dpll_speed;
@@ -219,7 +414,7 @@ static int omap2_reprogram_dpllcore(struct clk *clk, unsigned long rate)
 
                dd = clk->dpll_data;
                if (!dd)
-                       goto dpll_exit;
+                       return -EINVAL;
 
                tmpset.cm_clksel1_pll = __raw_readl(dd->mult_div1_reg);
                tmpset.cm_clksel1_pll &= ~(dd->mult_mask |
@@ -245,22 +440,19 @@ static int omap2_reprogram_dpllcore(struct clk *clk, unsigned long rate)
                if (rate == curr_prcm_set->xtal_speed)  /* If asking for 1-1 */
                        bypass = 1;
 
-               omap2_reprogram_sdrc(CORE_CLK_SRC_DPLL_X2, 1); /* For init_mem */
+               /* For omap2xxx_sdrc_init_params() */
+               omap2xxx_sdrc_reprogram(CORE_CLK_SRC_DPLL_X2, 1);
 
                /* Force dll lock mode */
                omap2_set_prcm(tmpset.cm_clksel1_pll, tmpset.base_sdrc_rfr,
                               bypass);
 
                /* Errata: ret dll entry state */
-               omap2_init_memory_params(omap2_dll_force_needed());
-               omap2_reprogram_sdrc(done_rate, 0);
+               omap2xxx_sdrc_init_params(omap2xxx_sdrc_dll_is_unlocked());
+               omap2xxx_sdrc_reprogram(done_rate, 0);
        }
-       omap2_dpllcore_recalc(&dpll_ck);
-       ret = 0;
 
-dpll_exit:
-       local_irq_restore(flags);
-       return(ret);
+       return 0;
 }
 
 /**
@@ -269,9 +461,9 @@ dpll_exit:
  *
  * Set virt_prcm_set's rate to the mpu_speed field of the current PRCM set.
  */
-static void omap2_table_mpu_recalc(struct clk *clk)
+static unsigned long omap2_table_mpu_recalc(struct clk *clk)
 {
-       clk->rate = curr_prcm_set->mpu_speed;
+       return curr_prcm_set->mpu_speed;
 }
 
 /*
@@ -337,12 +529,12 @@ static int omap2_select_table_rate(struct clk *clk, unsigned long rate)
        }
 
        curr_prcm_set = prcm;
-       cur_rate = omap2_get_dpll_rate_24xx(&dpll_ck);
+       cur_rate = omap2xxx_clk_get_core_rate(&dpll_ck);
 
        if (prcm->dpll_speed == cur_rate / 2) {
-               omap2_reprogram_sdrc(CORE_CLK_SRC_DPLL, 1);
+               omap2xxx_sdrc_reprogram(CORE_CLK_SRC_DPLL, 1);
        } else if (prcm->dpll_speed == cur_rate * 2) {
-               omap2_reprogram_sdrc(CORE_CLK_SRC_DPLL_X2, 1);
+               omap2xxx_sdrc_reprogram(CORE_CLK_SRC_DPLL_X2, 1);
        } else if (prcm->dpll_speed != cur_rate) {
                local_irq_save(flags);
 
@@ -366,27 +558,67 @@ static int omap2_select_table_rate(struct clk *clk, unsigned long rate)
 
                /* Major subsystem dividers */
                tmp = cm_read_mod_reg(CORE_MOD, CM_CLKSEL1) & OMAP24XX_CLKSEL_DSS2_MASK;
-               cm_write_mod_reg(prcm->cm_clksel1_core | tmp, CORE_MOD, CM_CLKSEL1);
+               cm_write_mod_reg(prcm->cm_clksel1_core | tmp, CORE_MOD,
+                                CM_CLKSEL1);
+
                if (cpu_is_omap2430())
                        cm_write_mod_reg(prcm->cm_clksel_mdm,
                                         OMAP2430_MDM_MOD, CM_CLKSEL);
 
-               /* x2 to enter init_mem */
-               omap2_reprogram_sdrc(CORE_CLK_SRC_DPLL_X2, 1);
+               /* x2 to enter omap2xxx_sdrc_init_params() */
+               omap2xxx_sdrc_reprogram(CORE_CLK_SRC_DPLL_X2, 1);
 
                omap2_set_prcm(prcm->cm_clksel1_pll, prcm->base_sdrc_rfr,
                               bypass);
 
-               omap2_init_memory_params(omap2_dll_force_needed());
-               omap2_reprogram_sdrc(done_rate, 0);
+               omap2xxx_sdrc_init_params(omap2xxx_sdrc_dll_is_unlocked());
+               omap2xxx_sdrc_reprogram(done_rate, 0);
 
                local_irq_restore(flags);
        }
-       omap2_dpllcore_recalc(&dpll_ck);
 
        return 0;
 }
 
+#ifdef CONFIG_CPU_FREQ
+/*
+ * Walk PRCM rate table and fillout cpufreq freq_table
+ */
+static struct cpufreq_frequency_table freq_table[ARRAY_SIZE(rate_table)];
+
+void omap2_clk_init_cpufreq_table(struct cpufreq_frequency_table **table)
+{
+       struct prcm_config *prcm;
+       int i = 0;
+
+       for (prcm = rate_table; prcm->mpu_speed; prcm++) {
+               if (!(prcm->flags & cpu_mask))
+                       continue;
+               if (prcm->xtal_speed != sys_ck.rate)
+                       continue;
+
+               /* don't put bypass rates in table */
+               if (prcm->dpll_speed == prcm->xtal_speed)
+                       continue;
+
+               freq_table[i].index = i;
+               freq_table[i].frequency = prcm->mpu_speed / 1000;
+               i++;
+       }
+
+       if (i == 0) {
+               printk(KERN_WARNING "%s: failed to initialize frequency "
+                      "table\n", __func__);
+               return;
+       }
+
+       freq_table[i].index = i;
+       freq_table[i].frequency = CPUFREQ_TABLE_END;
+
+       *table = &freq_table[0];
+}
+#endif
+
 static struct clk_functions omap2_clk_functions = {
        .clk_enable             = omap2_clk_enable,
        .clk_disable            = omap2_clk_disable,
@@ -394,24 +626,27 @@ static struct clk_functions omap2_clk_functions = {
        .clk_set_rate           = omap2_clk_set_rate,
        .clk_set_parent         = omap2_clk_set_parent,
        .clk_disable_unused     = omap2_clk_disable_unused,
+#ifdef CONFIG_CPU_FREQ
+       .clk_init_cpufreq_table = omap2_clk_init_cpufreq_table,
+#endif
 };
 
 static u32 omap2_get_apll_clkin(void)
 {
-       u32 aplls, sclk = 0;
+       u32 aplls, srate = 0;
 
        aplls = cm_read_mod_reg(PLL_MOD, CM_CLKSEL1);
        aplls &= OMAP24XX_APLLS_CLKIN_MASK;
        aplls >>= OMAP24XX_APLLS_CLKIN_SHIFT;
 
        if (aplls == APLLS_CLKIN_19_2MHZ)
-               sclk = 19200000;
+               srate = 19200000;
        else if (aplls == APLLS_CLKIN_13MHZ)
-               sclk = 13000000;
+               srate = 13000000;
        else if (aplls == APLLS_CLKIN_12MHZ)
-               sclk = 12000000;
+               srate = 12000000;
 
-       return sclk;
+       return srate;
 }
 
 static u32 omap2_get_sysclkdiv(void)
@@ -425,16 +660,14 @@ static u32 omap2_get_sysclkdiv(void)
        return div;
 }
 
-static void omap2_osc_clk_recalc(struct clk *clk)
+static unsigned long omap2_osc_clk_recalc(struct clk *clk)
 {
-       clk->rate = omap2_get_apll_clkin() * omap2_get_sysclkdiv();
-       propagate_rate(clk);
+       return omap2_get_apll_clkin() * omap2_get_sysclkdiv();
 }
 
-static void omap2_sys_clk_recalc(struct clk *clk)
+static unsigned long omap2_sys_clk_recalc(struct clk *clk)
 {
-       clk->rate = clk->parent->rate / omap2_get_sysclkdiv();
-       propagate_rate(clk);
+       return clk->parent->rate / omap2_get_sysclkdiv();
 }
 
 /*
@@ -460,7 +693,7 @@ static int __init omap2_clk_arch_init(void)
        if (!mpurate)
                return -EINVAL;
 
-       if (omap2_select_table_rate(&virt_prcm_set, mpurate))
+       if (clk_set_rate(&virt_prcm_set, mpurate))
                printk(KERN_ERR "Could not find matching MPU rate\n");
 
        recalculate_root_clocks();
@@ -477,8 +710,8 @@ arch_initcall(omap2_clk_arch_init);
 int __init omap2_clk_init(void)
 {
        struct prcm_config *prcm;
-       struct clk **clkp;
-       u32 clkrate;
+       struct omap_clk *c;
+       u32 clkrate, cpu_mask;
 
        if (cpu_is_omap242x())
                cpu_mask = RATE_IN_242X;
@@ -487,26 +720,28 @@ int __init omap2_clk_init(void)
 
        clk_init(&omap2_clk_functions);
 
-       omap2_osc_clk_recalc(&osc_ck);
-       omap2_sys_clk_recalc(&sys_ck);
+       osc_ck.rate = omap2_osc_clk_recalc(&osc_ck);
+       propagate_rate(&osc_ck);
+       sys_ck.rate = omap2_sys_clk_recalc(&sys_ck);
+       propagate_rate(&sys_ck);
 
-       for (clkp = onchip_24xx_clks;
-            clkp < onchip_24xx_clks + ARRAY_SIZE(onchip_24xx_clks);
-            clkp++) {
+       for (c = omap24xx_clks; c < omap24xx_clks + ARRAY_SIZE(omap24xx_clks); c++)
+               clk_init_one(c->lk.clk);
 
-               if ((*clkp)->flags & CLOCK_IN_OMAP242X && cpu_is_omap2420()) {
-                       clk_register(*clkp);
-                       continue;
-               }
+       cpu_mask = 0;
+       if (cpu_is_omap2420())
+               cpu_mask |= CK_242X;
+       if (cpu_is_omap2430())
+               cpu_mask |= CK_243X;
 
-               if ((*clkp)->flags & CLOCK_IN_OMAP243X && cpu_is_omap2430()) {
-                       clk_register(*clkp);
-                       continue;
+       for (c = omap24xx_clks; c < omap24xx_clks + ARRAY_SIZE(omap24xx_clks); c++)
+               if (c->cpu & cpu_mask) {
+                       clkdev_add(&c->lk);
+                       clk_register(c->lk.clk);
                }
-       }
 
        /* Check the MPU rate set by bootloader */
-       clkrate = omap2_get_dpll_rate_24xx(&dpll_ck);
+       clkrate = omap2xxx_clk_get_core_rate(&dpll_ck);
        for (prcm = rate_table; prcm->mpu_speed; prcm++) {
                if (!(prcm->flags & cpu_mask))
                        continue;
index ad6d98d177c50fd703ef70e26904e6c2075608e8..33c3e5b143237b9fc97ef26aed84e445281599b1 100644 (file)
 #include "cm-regbits-24xx.h"
 #include "sdrc.h"
 
-static void omap2_table_mpu_recalc(struct clk *clk);
+static unsigned long omap2_table_mpu_recalc(struct clk *clk);
 static int omap2_select_table_rate(struct clk *clk, unsigned long rate);
 static long omap2_round_to_table_rate(struct clk *clk, unsigned long rate);
-static void omap2_sys_clk_recalc(struct clk *clk);
-static void omap2_osc_clk_recalc(struct clk *clk);
-static void omap2_sys_clk_recalc(struct clk *clk);
-static void omap2_dpllcore_recalc(struct clk *clk);
-static int omap2_clk_fixed_enable(struct clk *clk);
-static void omap2_clk_fixed_disable(struct clk *clk);
-static int omap2_enable_osc_ck(struct clk *clk);
-static void omap2_disable_osc_ck(struct clk *clk);
+static unsigned long omap2_sys_clk_recalc(struct clk *clk);
+static unsigned long omap2_osc_clk_recalc(struct clk *clk);
+static unsigned long omap2_sys_clk_recalc(struct clk *clk);
+static unsigned long omap2_dpllcore_recalc(struct clk *clk);
 static int omap2_reprogram_dpllcore(struct clk *clk, unsigned long rate);
 
 /* Key dividers which make up a PRCM set. Ratio's for a PRCM are mandated.
@@ -623,41 +619,35 @@ static struct prcm_config rate_table[] = {
 /* Base external input clocks */
 static struct clk func_32k_ck = {
        .name           = "func_32k_ck",
+       .ops            = &clkops_null,
        .rate           = 32000,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
-                               RATE_FIXED | ALWAYS_ENABLED | RATE_PROPAGATES,
+       .flags          = RATE_FIXED,
        .clkdm_name     = "wkup_clkdm",
-       .recalc         = &propagate_rate,
 };
 
 /* Typical 12/13MHz in standalone mode, will be 26Mhz in chassis mode */
 static struct clk osc_ck = {           /* (*12, *13, 19.2, *26, 38.4)MHz */
        .name           = "osc_ck",
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
-                               RATE_PROPAGATES,
+       .ops            = &clkops_oscck,
        .clkdm_name     = "wkup_clkdm",
-       .enable         = &omap2_enable_osc_ck,
-       .disable        = &omap2_disable_osc_ck,
        .recalc         = &omap2_osc_clk_recalc,
 };
 
 /* Without modem likely 12MHz, with modem likely 13MHz */
 static struct clk sys_ck = {           /* (*12, *13, 19.2, 26, 38.4)MHz */
        .name           = "sys_ck",             /* ~ ref_clk also */
+       .ops            = &clkops_null,
        .parent         = &osc_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
-                               ALWAYS_ENABLED | RATE_PROPAGATES,
        .clkdm_name     = "wkup_clkdm",
        .recalc         = &omap2_sys_clk_recalc,
 };
 
 static struct clk alt_ck = {           /* Typical 54M or 48M, may not exist */
        .name           = "alt_ck",
+       .ops            = &clkops_null,
        .rate           = 54000000,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
-                               RATE_FIXED | ALWAYS_ENABLED | RATE_PROPAGATES,
+       .flags          = RATE_FIXED,
        .clkdm_name     = "wkup_clkdm",
-       .recalc         = &propagate_rate,
 };
 
 /*
@@ -673,7 +663,12 @@ static struct dpll_data dpll_dd = {
        .mult_div1_reg          = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
        .mult_mask              = OMAP24XX_DPLL_MULT_MASK,
        .div1_mask              = OMAP24XX_DPLL_DIV_MASK,
+       .clk_bypass             = &sys_ck,
+       .clk_ref                = &sys_ck,
+       .control_reg            = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
+       .enable_mask            = OMAP24XX_EN_DPLL_MASK,
        .max_multiplier         = 1024,
+       .min_divider            = 1,
        .max_divider            = 16,
        .rate_tolerance         = DEFAULT_DPLL_RATE_TOLERANCE
 };
@@ -684,10 +679,9 @@ static struct dpll_data dpll_dd = {
  */
 static struct clk dpll_ck = {
        .name           = "dpll_ck",
+       .ops            = &clkops_null,
        .parent         = &sys_ck,              /* Can be func_32k also */
        .dpll_data      = &dpll_dd,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
-                               RATE_PROPAGATES | ALWAYS_ENABLED,
        .clkdm_name     = "wkup_clkdm",
        .recalc         = &omap2_dpllcore_recalc,
        .set_rate       = &omap2_reprogram_dpllcore,
@@ -695,30 +689,24 @@ static struct clk dpll_ck = {
 
 static struct clk apll96_ck = {
        .name           = "apll96_ck",
+       .ops            = &clkops_fixed,
        .parent         = &sys_ck,
        .rate           = 96000000,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
-                               RATE_FIXED | RATE_PROPAGATES | ENABLE_ON_INIT,
+       .flags          = RATE_FIXED | ENABLE_ON_INIT,
        .clkdm_name     = "wkup_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
        .enable_bit     = OMAP24XX_EN_96M_PLL_SHIFT,
-       .enable         = &omap2_clk_fixed_enable,
-       .disable        = &omap2_clk_fixed_disable,
-       .recalc         = &propagate_rate,
 };
 
 static struct clk apll54_ck = {
        .name           = "apll54_ck",
+       .ops            = &clkops_fixed,
        .parent         = &sys_ck,
        .rate           = 54000000,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
-                               RATE_FIXED | RATE_PROPAGATES | ENABLE_ON_INIT,
+       .flags          = RATE_FIXED | ENABLE_ON_INIT,
        .clkdm_name     = "wkup_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
        .enable_bit     = OMAP24XX_EN_54M_PLL_SHIFT,
-       .enable         = &omap2_clk_fixed_enable,
-       .disable        = &omap2_clk_fixed_disable,
-       .recalc         = &propagate_rate,
 };
 
 /*
@@ -745,9 +733,8 @@ static const struct clksel func_54m_clksel[] = {
 
 static struct clk func_54m_ck = {
        .name           = "func_54m_ck",
+       .ops            = &clkops_null,
        .parent         = &apll54_ck,   /* can also be alt_clk */
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
-                               RATE_PROPAGATES | PARENT_CONTROLS_CLOCK,
        .clkdm_name     = "wkup_clkdm",
        .init           = &omap2_init_clksel_parent,
        .clksel_reg     = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
@@ -758,9 +745,8 @@ static struct clk func_54m_ck = {
 
 static struct clk core_ck = {
        .name           = "core_ck",
+       .ops            = &clkops_null,
        .parent         = &dpll_ck,             /* can also be 32k */
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
-                               ALWAYS_ENABLED | RATE_PROPAGATES,
        .clkdm_name     = "wkup_clkdm",
        .recalc         = &followparent_recalc,
 };
@@ -785,9 +771,8 @@ static const struct clksel func_96m_clksel[] = {
 /* The parent of this clock is not selectable on 2420. */
 static struct clk func_96m_ck = {
        .name           = "func_96m_ck",
+       .ops            = &clkops_null,
        .parent         = &apll96_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
-                               RATE_PROPAGATES | PARENT_CONTROLS_CLOCK,
        .clkdm_name     = "wkup_clkdm",
        .init           = &omap2_init_clksel_parent,
        .clksel_reg     = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
@@ -818,9 +803,8 @@ static const struct clksel func_48m_clksel[] = {
 
 static struct clk func_48m_ck = {
        .name           = "func_48m_ck",
+       .ops            = &clkops_null,
        .parent         = &apll96_ck,    /* 96M or Alt */
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
-                               RATE_PROPAGATES | PARENT_CONTROLS_CLOCK,
        .clkdm_name     = "wkup_clkdm",
        .init           = &omap2_init_clksel_parent,
        .clksel_reg     = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
@@ -833,10 +817,9 @@ static struct clk func_48m_ck = {
 
 static struct clk func_12m_ck = {
        .name           = "func_12m_ck",
+       .ops            = &clkops_null,
        .parent         = &func_48m_ck,
        .fixed_div      = 4,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
-                               RATE_PROPAGATES | PARENT_CONTROLS_CLOCK,
        .clkdm_name     = "wkup_clkdm",
        .recalc         = &omap2_fixed_divisor_recalc,
 };
@@ -844,8 +827,8 @@ static struct clk func_12m_ck = {
 /* Secure timer, only available in secure mode */
 static struct clk wdt1_osc_ck = {
        .name           = "ck_wdt1_osc",
+       .ops            = &clkops_null, /* RMK: missing? */
        .parent         = &osc_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .recalc         = &followparent_recalc,
 };
 
@@ -887,9 +870,8 @@ static const struct clksel common_clkout_src_clksel[] = {
 
 static struct clk sys_clkout_src = {
        .name           = "sys_clkout_src",
+       .ops            = &clkops_omap2_dflt,
        .parent         = &func_54m_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
-                               RATE_PROPAGATES,
        .clkdm_name     = "wkup_clkdm",
        .enable_reg     = OMAP24XX_PRCM_CLKOUT_CTRL,
        .enable_bit     = OMAP24XX_CLKOUT_EN_SHIFT,
@@ -918,9 +900,8 @@ static const struct clksel sys_clkout_clksel[] = {
 
 static struct clk sys_clkout = {
        .name           = "sys_clkout",
+       .ops            = &clkops_null,
        .parent         = &sys_clkout_src,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
-                               PARENT_CONTROLS_CLOCK,
        .clkdm_name     = "wkup_clkdm",
        .clksel_reg     = OMAP24XX_PRCM_CLKOUT_CTRL,
        .clksel_mask    = OMAP24XX_CLKOUT_DIV_MASK,
@@ -933,8 +914,8 @@ static struct clk sys_clkout = {
 /* In 2430, new in 2420 ES2 */
 static struct clk sys_clkout2_src = {
        .name           = "sys_clkout2_src",
+       .ops            = &clkops_omap2_dflt,
        .parent         = &func_54m_ck,
-       .flags          = CLOCK_IN_OMAP242X | RATE_PROPAGATES,
        .clkdm_name     = "wkup_clkdm",
        .enable_reg     = OMAP24XX_PRCM_CLKOUT_CTRL,
        .enable_bit     = OMAP2420_CLKOUT2_EN_SHIFT,
@@ -955,8 +936,8 @@ static const struct clksel sys_clkout2_clksel[] = {
 /* In 2430, new in 2420 ES2 */
 static struct clk sys_clkout2 = {
        .name           = "sys_clkout2",
+       .ops            = &clkops_null,
        .parent         = &sys_clkout2_src,
-       .flags          = CLOCK_IN_OMAP242X | PARENT_CONTROLS_CLOCK,
        .clkdm_name     = "wkup_clkdm",
        .clksel_reg     = OMAP24XX_PRCM_CLKOUT_CTRL,
        .clksel_mask    = OMAP2420_CLKOUT2_DIV_MASK,
@@ -968,8 +949,8 @@ static struct clk sys_clkout2 = {
 
 static struct clk emul_ck = {
        .name           = "emul_ck",
+       .ops            = &clkops_omap2_dflt,
        .parent         = &func_54m_ck,
-       .flags          = CLOCK_IN_OMAP242X,
        .clkdm_name     = "wkup_clkdm",
        .enable_reg     = OMAP24XX_PRCM_CLKEMUL_CTRL,
        .enable_bit     = OMAP24XX_EMULATION_EN_SHIFT,
@@ -1003,10 +984,9 @@ static const struct clksel mpu_clksel[] = {
 
 static struct clk mpu_ck = {   /* Control cpu */
        .name           = "mpu_ck",
+       .ops            = &clkops_null,
        .parent         = &core_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
-                               ALWAYS_ENABLED | DELAYED_APP |
-                               CONFIG_PARTICIPANT | RATE_PROPAGATES,
+       .flags          = DELAYED_APP | CONFIG_PARTICIPANT,
        .clkdm_name     = "mpu_clkdm",
        .init           = &omap2_init_clksel_parent,
        .clksel_reg     = OMAP_CM_REGADDR(MPU_MOD, CM_CLKSEL),
@@ -1046,9 +1026,9 @@ static const struct clksel dsp_fck_clksel[] = {
 
 static struct clk dsp_fck = {
        .name           = "dsp_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &core_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | DELAYED_APP |
-                               CONFIG_PARTICIPANT | RATE_PROPAGATES,
+       .flags          = DELAYED_APP | CONFIG_PARTICIPANT,
        .clkdm_name     = "dsp_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_FCLKEN),
        .enable_bit     = OMAP24XX_CM_FCLKEN_DSP_EN_DSP_SHIFT,
@@ -1076,9 +1056,9 @@ static const struct clksel dsp_irate_ick_clksel[] = {
 /* This clock does not exist as such in the TRM. */
 static struct clk dsp_irate_ick = {
        .name           = "dsp_irate_ick",
+       .ops            = &clkops_null,
        .parent         = &dsp_fck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | DELAYED_APP |
-                               CONFIG_PARTICIPANT | PARENT_CONTROLS_CLOCK,
+       .flags          = DELAYED_APP | CONFIG_PARTICIPANT,
        .clksel_reg     = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_CLKSEL),
        .clksel_mask    = OMAP24XX_CLKSEL_DSP_IF_MASK,
        .clksel         = dsp_irate_ick_clksel,
@@ -1090,8 +1070,9 @@ static struct clk dsp_irate_ick = {
 /* 2420 only */
 static struct clk dsp_ick = {
        .name           = "dsp_ick",     /* apparently ipi and isp */
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &dsp_irate_ick,
-       .flags          = CLOCK_IN_OMAP242X | DELAYED_APP | CONFIG_PARTICIPANT,
+       .flags          = DELAYED_APP | CONFIG_PARTICIPANT,
        .enable_reg     = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_ICLKEN),
        .enable_bit     = OMAP2420_EN_DSP_IPI_SHIFT,          /* for ipi */
 };
@@ -1099,8 +1080,9 @@ static struct clk dsp_ick = {
 /* 2430 only - EN_DSP controls both dsp fclk and iclk on 2430 */
 static struct clk iva2_1_ick = {
        .name           = "iva2_1_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &dsp_irate_ick,
-       .flags          = CLOCK_IN_OMAP243X | DELAYED_APP | CONFIG_PARTICIPANT,
+       .flags          = DELAYED_APP | CONFIG_PARTICIPANT,
        .enable_reg     = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_FCLKEN),
        .enable_bit     = OMAP24XX_CM_FCLKEN_DSP_EN_DSP_SHIFT,
 };
@@ -1112,9 +1094,9 @@ static struct clk iva2_1_ick = {
  */
 static struct clk iva1_ifck = {
        .name           = "iva1_ifck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &core_ck,
-       .flags          = CLOCK_IN_OMAP242X | CONFIG_PARTICIPANT |
-                               RATE_PROPAGATES | DELAYED_APP,
+       .flags          = CONFIG_PARTICIPANT | DELAYED_APP,
        .clkdm_name     = "iva1_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_FCLKEN),
        .enable_bit     = OMAP2420_EN_IVA_COP_SHIFT,
@@ -1129,8 +1111,8 @@ static struct clk iva1_ifck = {
 /* IVA1 mpu/int/i/f clocks are /2 of parent */
 static struct clk iva1_mpu_int_ifck = {
        .name           = "iva1_mpu_int_ifck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &iva1_ifck,
-       .flags          = CLOCK_IN_OMAP242X,
        .clkdm_name     = "iva1_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_FCLKEN),
        .enable_bit     = OMAP2420_EN_IVA_MPU_SHIFT,
@@ -1175,10 +1157,9 @@ static const struct clksel core_l3_clksel[] = {
 
 static struct clk core_l3_ck = {       /* Used for ick and fck, interconnect */
        .name           = "core_l3_ck",
+       .ops            = &clkops_null,
        .parent         = &core_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
-                               ALWAYS_ENABLED | DELAYED_APP |
-                               CONFIG_PARTICIPANT | RATE_PROPAGATES,
+       .flags          = DELAYED_APP | CONFIG_PARTICIPANT,
        .clkdm_name     = "core_l3_clkdm",
        .clksel_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1),
        .clksel_mask    = OMAP24XX_CLKSEL_L3_MASK,
@@ -1204,9 +1185,9 @@ static const struct clksel usb_l4_ick_clksel[] = {
 /* It is unclear from TRM whether usb_l4_ick is really in L3 or L4 clkdm */
 static struct clk usb_l4_ick = {       /* FS-USB interface clock */
        .name           = "usb_l4_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &core_l3_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
-                               DELAYED_APP | CONFIG_PARTICIPANT,
+       .flags          = DELAYED_APP | CONFIG_PARTICIPANT,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
        .enable_bit     = OMAP24XX_EN_USB_SHIFT,
@@ -1238,9 +1219,9 @@ static const struct clksel l4_clksel[] = {
 
 static struct clk l4_ck = {            /* used both as an ick and fck */
        .name           = "l4_ck",
+       .ops            = &clkops_null,
        .parent         = &core_l3_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
-                               ALWAYS_ENABLED | DELAYED_APP | RATE_PROPAGATES,
+       .flags          = DELAYED_APP,
        .clkdm_name     = "core_l4_clkdm",
        .clksel_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1),
        .clksel_mask    = OMAP24XX_CLKSEL_L4_MASK,
@@ -1276,9 +1257,9 @@ static const struct clksel ssi_ssr_sst_fck_clksel[] = {
 
 static struct clk ssi_ssr_sst_fck = {
        .name           = "ssi_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &core_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
-                               DELAYED_APP,
+       .flags          = DELAYED_APP,
        .clkdm_name     = "core_l3_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
        .enable_bit     = OMAP24XX_EN_SSI_SHIFT,
@@ -1290,6 +1271,20 @@ static struct clk ssi_ssr_sst_fck = {
        .set_rate       = &omap2_clksel_set_rate
 };
 
+/*
+ * Presumably this is the same as SSI_ICLK.
+ * TRM contradicts itself on what clockdomain SSI_ICLK is in
+ */
+static struct clk ssi_l4_ick = {
+       .name           = "ssi_l4_ick",
+       .ops            = &clkops_omap2_dflt_wait,
+       .parent         = &l4_ck,
+       .clkdm_name     = "core_l4_clkdm",
+       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
+       .enable_bit     = OMAP24XX_EN_SSI_SHIFT,
+       .recalc         = &followparent_recalc,
+};
+
 
 /*
  * GFX clock domain
@@ -1312,8 +1307,8 @@ static const struct clksel gfx_fck_clksel[] = {
 
 static struct clk gfx_3d_fck = {
        .name           = "gfx_3d_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &core_l3_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "gfx_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(GFX_MOD, CM_FCLKEN),
        .enable_bit     = OMAP24XX_EN_3D_SHIFT,
@@ -1327,8 +1322,8 @@ static struct clk gfx_3d_fck = {
 
 static struct clk gfx_2d_fck = {
        .name           = "gfx_2d_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &core_l3_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "gfx_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(GFX_MOD, CM_FCLKEN),
        .enable_bit     = OMAP24XX_EN_2D_SHIFT,
@@ -1342,8 +1337,8 @@ static struct clk gfx_2d_fck = {
 
 static struct clk gfx_ick = {
        .name           = "gfx_ick",            /* From l3 */
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &core_l3_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "gfx_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(GFX_MOD, CM_ICLKEN),
        .enable_bit     = OMAP_EN_GFX_SHIFT,
@@ -1372,8 +1367,9 @@ static const struct clksel mdm_ick_clksel[] = {
 
 static struct clk mdm_ick = {          /* used both as a ick and fck */
        .name           = "mdm_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &core_ck,
-       .flags          = CLOCK_IN_OMAP243X | DELAYED_APP | CONFIG_PARTICIPANT,
+       .flags          = DELAYED_APP | CONFIG_PARTICIPANT,
        .clkdm_name     = "mdm_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(OMAP2430_MDM_MOD, CM_ICLKEN),
        .enable_bit     = OMAP2430_CM_ICLKEN_MDM_EN_MDM_SHIFT,
@@ -1387,8 +1383,8 @@ static struct clk mdm_ick = {             /* used both as a ick and fck */
 
 static struct clk mdm_osc_ck = {
        .name           = "mdm_osc_ck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &osc_ck,
-       .flags          = CLOCK_IN_OMAP243X,
        .clkdm_name     = "mdm_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(OMAP2430_MDM_MOD, CM_FCLKEN),
        .enable_bit     = OMAP2430_EN_OSC_SHIFT,
@@ -1432,8 +1428,8 @@ static const struct clksel dss1_fck_clksel[] = {
 
 static struct clk dss_ick = {          /* Enables both L3,L4 ICLK's */
        .name           = "dss_ick",
+       .ops            = &clkops_omap2_dflt,
        .parent         = &l4_ck,       /* really both l3 and l4 */
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "dss_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP24XX_EN_DSS1_SHIFT,
@@ -1442,9 +1438,9 @@ static struct clk dss_ick = {             /* Enables both L3,L4 ICLK's */
 
 static struct clk dss1_fck = {
        .name           = "dss1_fck",
+       .ops            = &clkops_omap2_dflt,
        .parent         = &core_ck,             /* Core or sys */
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
-                               DELAYED_APP,
+       .flags          = DELAYED_APP,
        .clkdm_name     = "dss_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP24XX_EN_DSS1_SHIFT,
@@ -1475,9 +1471,9 @@ static const struct clksel dss2_fck_clksel[] = {
 
 static struct clk dss2_fck = {         /* Alt clk used in power management */
        .name           = "dss2_fck",
+       .ops            = &clkops_omap2_dflt,
        .parent         = &sys_ck,              /* fixed at sys_ck or 48MHz */
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
-                               DELAYED_APP,
+       .flags          = DELAYED_APP,
        .clkdm_name     = "dss_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP24XX_EN_DSS2_SHIFT,
@@ -1490,8 +1486,8 @@ static struct clk dss2_fck = {            /* Alt clk used in power management */
 
 static struct clk dss_54m_fck = {      /* Alt clk used in power management */
        .name           = "dss_54m_fck",        /* 54m tv clk */
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &func_54m_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "dss_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP24XX_EN_TV_SHIFT,
@@ -1518,8 +1514,8 @@ static const struct clksel omap24xx_gpt_clksel[] = {
 
 static struct clk gpt1_ick = {
        .name           = "gpt1_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
        .enable_bit     = OMAP24XX_EN_GPT1_SHIFT,
@@ -1528,8 +1524,8 @@ static struct clk gpt1_ick = {
 
 static struct clk gpt1_fck = {
        .name           = "gpt1_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &func_32k_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
        .enable_bit     = OMAP24XX_EN_GPT1_SHIFT,
@@ -1544,8 +1540,8 @@ static struct clk gpt1_fck = {
 
 static struct clk gpt2_ick = {
        .name           = "gpt2_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP24XX_EN_GPT2_SHIFT,
@@ -1554,8 +1550,8 @@ static struct clk gpt2_ick = {
 
 static struct clk gpt2_fck = {
        .name           = "gpt2_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &func_32k_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP24XX_EN_GPT2_SHIFT,
@@ -1568,8 +1564,8 @@ static struct clk gpt2_fck = {
 
 static struct clk gpt3_ick = {
        .name           = "gpt3_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP24XX_EN_GPT3_SHIFT,
@@ -1578,8 +1574,8 @@ static struct clk gpt3_ick = {
 
 static struct clk gpt3_fck = {
        .name           = "gpt3_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &func_32k_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP24XX_EN_GPT3_SHIFT,
@@ -1592,8 +1588,8 @@ static struct clk gpt3_fck = {
 
 static struct clk gpt4_ick = {
        .name           = "gpt4_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP24XX_EN_GPT4_SHIFT,
@@ -1602,8 +1598,8 @@ static struct clk gpt4_ick = {
 
 static struct clk gpt4_fck = {
        .name           = "gpt4_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &func_32k_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP24XX_EN_GPT4_SHIFT,
@@ -1616,8 +1612,8 @@ static struct clk gpt4_fck = {
 
 static struct clk gpt5_ick = {
        .name           = "gpt5_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP24XX_EN_GPT5_SHIFT,
@@ -1626,8 +1622,8 @@ static struct clk gpt5_ick = {
 
 static struct clk gpt5_fck = {
        .name           = "gpt5_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &func_32k_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP24XX_EN_GPT5_SHIFT,
@@ -1640,8 +1636,8 @@ static struct clk gpt5_fck = {
 
 static struct clk gpt6_ick = {
        .name           = "gpt6_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP24XX_EN_GPT6_SHIFT,
@@ -1650,8 +1646,8 @@ static struct clk gpt6_ick = {
 
 static struct clk gpt6_fck = {
        .name           = "gpt6_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &func_32k_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP24XX_EN_GPT6_SHIFT,
@@ -1664,8 +1660,8 @@ static struct clk gpt6_fck = {
 
 static struct clk gpt7_ick = {
        .name           = "gpt7_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP24XX_EN_GPT7_SHIFT,
        .recalc         = &followparent_recalc,
@@ -1673,8 +1669,8 @@ static struct clk gpt7_ick = {
 
 static struct clk gpt7_fck = {
        .name           = "gpt7_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &func_32k_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP24XX_EN_GPT7_SHIFT,
@@ -1687,8 +1683,8 @@ static struct clk gpt7_fck = {
 
 static struct clk gpt8_ick = {
        .name           = "gpt8_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP24XX_EN_GPT8_SHIFT,
@@ -1697,8 +1693,8 @@ static struct clk gpt8_ick = {
 
 static struct clk gpt8_fck = {
        .name           = "gpt8_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &func_32k_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP24XX_EN_GPT8_SHIFT,
@@ -1711,8 +1707,8 @@ static struct clk gpt8_fck = {
 
 static struct clk gpt9_ick = {
        .name           = "gpt9_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP24XX_EN_GPT9_SHIFT,
@@ -1721,8 +1717,8 @@ static struct clk gpt9_ick = {
 
 static struct clk gpt9_fck = {
        .name           = "gpt9_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &func_32k_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP24XX_EN_GPT9_SHIFT,
@@ -1735,8 +1731,8 @@ static struct clk gpt9_fck = {
 
 static struct clk gpt10_ick = {
        .name           = "gpt10_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP24XX_EN_GPT10_SHIFT,
@@ -1745,8 +1741,8 @@ static struct clk gpt10_ick = {
 
 static struct clk gpt10_fck = {
        .name           = "gpt10_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &func_32k_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP24XX_EN_GPT10_SHIFT,
@@ -1759,8 +1755,8 @@ static struct clk gpt10_fck = {
 
 static struct clk gpt11_ick = {
        .name           = "gpt11_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP24XX_EN_GPT11_SHIFT,
@@ -1769,8 +1765,8 @@ static struct clk gpt11_ick = {
 
 static struct clk gpt11_fck = {
        .name           = "gpt11_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &func_32k_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP24XX_EN_GPT11_SHIFT,
@@ -1783,8 +1779,8 @@ static struct clk gpt11_fck = {
 
 static struct clk gpt12_ick = {
        .name           = "gpt12_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP24XX_EN_GPT12_SHIFT,
@@ -1793,8 +1789,8 @@ static struct clk gpt12_ick = {
 
 static struct clk gpt12_fck = {
        .name           = "gpt12_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &func_32k_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP24XX_EN_GPT12_SHIFT,
@@ -1807,9 +1803,9 @@ static struct clk gpt12_fck = {
 
 static struct clk mcbsp1_ick = {
        .name           = "mcbsp_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 1,
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP24XX_EN_MCBSP1_SHIFT,
@@ -1818,9 +1814,9 @@ static struct clk mcbsp1_ick = {
 
 static struct clk mcbsp1_fck = {
        .name           = "mcbsp_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 1,
        .parent         = &func_96m_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP24XX_EN_MCBSP1_SHIFT,
@@ -1829,9 +1825,9 @@ static struct clk mcbsp1_fck = {
 
 static struct clk mcbsp2_ick = {
        .name           = "mcbsp_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 2,
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP24XX_EN_MCBSP2_SHIFT,
@@ -1840,9 +1836,9 @@ static struct clk mcbsp2_ick = {
 
 static struct clk mcbsp2_fck = {
        .name           = "mcbsp_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 2,
        .parent         = &func_96m_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP24XX_EN_MCBSP2_SHIFT,
@@ -1851,9 +1847,9 @@ static struct clk mcbsp2_fck = {
 
 static struct clk mcbsp3_ick = {
        .name           = "mcbsp_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 3,
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
        .enable_bit     = OMAP2430_EN_MCBSP3_SHIFT,
@@ -1862,9 +1858,9 @@ static struct clk mcbsp3_ick = {
 
 static struct clk mcbsp3_fck = {
        .name           = "mcbsp_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 3,
        .parent         = &func_96m_ck,
-       .flags          = CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
        .enable_bit     = OMAP2430_EN_MCBSP3_SHIFT,
@@ -1873,9 +1869,9 @@ static struct clk mcbsp3_fck = {
 
 static struct clk mcbsp4_ick = {
        .name           = "mcbsp_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 4,
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
        .enable_bit     = OMAP2430_EN_MCBSP4_SHIFT,
@@ -1884,9 +1880,9 @@ static struct clk mcbsp4_ick = {
 
 static struct clk mcbsp4_fck = {
        .name           = "mcbsp_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 4,
        .parent         = &func_96m_ck,
-       .flags          = CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
        .enable_bit     = OMAP2430_EN_MCBSP4_SHIFT,
@@ -1895,9 +1891,9 @@ static struct clk mcbsp4_fck = {
 
 static struct clk mcbsp5_ick = {
        .name           = "mcbsp_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 5,
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
        .enable_bit     = OMAP2430_EN_MCBSP5_SHIFT,
@@ -1906,9 +1902,9 @@ static struct clk mcbsp5_ick = {
 
 static struct clk mcbsp5_fck = {
        .name           = "mcbsp_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 5,
        .parent         = &func_96m_ck,
-       .flags          = CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
        .enable_bit     = OMAP2430_EN_MCBSP5_SHIFT,
@@ -1917,10 +1913,10 @@ static struct clk mcbsp5_fck = {
 
 static struct clk mcspi1_ick = {
        .name           = "mcspi_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 1,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP24XX_EN_MCSPI1_SHIFT,
        .recalc         = &followparent_recalc,
@@ -1928,9 +1924,9 @@ static struct clk mcspi1_ick = {
 
 static struct clk mcspi1_fck = {
        .name           = "mcspi_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 1,
        .parent         = &func_48m_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP24XX_EN_MCSPI1_SHIFT,
@@ -1939,9 +1935,9 @@ static struct clk mcspi1_fck = {
 
 static struct clk mcspi2_ick = {
        .name           = "mcspi_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 2,
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP24XX_EN_MCSPI2_SHIFT,
@@ -1950,9 +1946,9 @@ static struct clk mcspi2_ick = {
 
 static struct clk mcspi2_fck = {
        .name           = "mcspi_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 2,
        .parent         = &func_48m_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP24XX_EN_MCSPI2_SHIFT,
@@ -1961,9 +1957,9 @@ static struct clk mcspi2_fck = {
 
 static struct clk mcspi3_ick = {
        .name           = "mcspi_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 3,
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
        .enable_bit     = OMAP2430_EN_MCSPI3_SHIFT,
@@ -1972,9 +1968,9 @@ static struct clk mcspi3_ick = {
 
 static struct clk mcspi3_fck = {
        .name           = "mcspi_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 3,
        .parent         = &func_48m_ck,
-       .flags          = CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
        .enable_bit     = OMAP2430_EN_MCSPI3_SHIFT,
@@ -1983,8 +1979,8 @@ static struct clk mcspi3_fck = {
 
 static struct clk uart1_ick = {
        .name           = "uart1_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP24XX_EN_UART1_SHIFT,
@@ -1993,8 +1989,8 @@ static struct clk uart1_ick = {
 
 static struct clk uart1_fck = {
        .name           = "uart1_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &func_48m_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP24XX_EN_UART1_SHIFT,
@@ -2003,8 +1999,8 @@ static struct clk uart1_fck = {
 
 static struct clk uart2_ick = {
        .name           = "uart2_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP24XX_EN_UART2_SHIFT,
@@ -2013,8 +2009,8 @@ static struct clk uart2_ick = {
 
 static struct clk uart2_fck = {
        .name           = "uart2_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &func_48m_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP24XX_EN_UART2_SHIFT,
@@ -2023,8 +2019,8 @@ static struct clk uart2_fck = {
 
 static struct clk uart3_ick = {
        .name           = "uart3_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
        .enable_bit     = OMAP24XX_EN_UART3_SHIFT,
@@ -2033,8 +2029,8 @@ static struct clk uart3_ick = {
 
 static struct clk uart3_fck = {
        .name           = "uart3_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &func_48m_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
        .enable_bit     = OMAP24XX_EN_UART3_SHIFT,
@@ -2043,8 +2039,8 @@ static struct clk uart3_fck = {
 
 static struct clk gpios_ick = {
        .name           = "gpios_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
        .enable_bit     = OMAP24XX_EN_GPIOS_SHIFT,
@@ -2053,8 +2049,8 @@ static struct clk gpios_ick = {
 
 static struct clk gpios_fck = {
        .name           = "gpios_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &func_32k_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "wkup_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
        .enable_bit     = OMAP24XX_EN_GPIOS_SHIFT,
@@ -2063,8 +2059,8 @@ static struct clk gpios_fck = {
 
 static struct clk mpu_wdt_ick = {
        .name           = "mpu_wdt_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
        .enable_bit     = OMAP24XX_EN_MPU_WDT_SHIFT,
@@ -2073,8 +2069,8 @@ static struct clk mpu_wdt_ick = {
 
 static struct clk mpu_wdt_fck = {
        .name           = "mpu_wdt_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &func_32k_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "wkup_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
        .enable_bit     = OMAP24XX_EN_MPU_WDT_SHIFT,
@@ -2083,9 +2079,9 @@ static struct clk mpu_wdt_fck = {
 
 static struct clk sync_32k_ick = {
        .name           = "sync_32k_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
-                               ENABLE_ON_INIT,
+       .flags          = ENABLE_ON_INIT,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
        .enable_bit     = OMAP24XX_EN_32KSYNC_SHIFT,
@@ -2094,8 +2090,8 @@ static struct clk sync_32k_ick = {
 
 static struct clk wdt1_ick = {
        .name           = "wdt1_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
        .enable_bit     = OMAP24XX_EN_WDT1_SHIFT,
@@ -2104,9 +2100,9 @@ static struct clk wdt1_ick = {
 
 static struct clk omapctrl_ick = {
        .name           = "omapctrl_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
-                               ENABLE_ON_INIT,
+       .flags          = ENABLE_ON_INIT,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
        .enable_bit     = OMAP24XX_EN_OMAPCTRL_SHIFT,
@@ -2115,8 +2111,8 @@ static struct clk omapctrl_ick = {
 
 static struct clk icr_ick = {
        .name           = "icr_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
        .enable_bit     = OMAP2430_EN_ICR_SHIFT,
@@ -2125,8 +2121,8 @@ static struct clk icr_ick = {
 
 static struct clk cam_ick = {
        .name           = "cam_ick",
+       .ops            = &clkops_omap2_dflt,
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP24XX_EN_CAM_SHIFT,
@@ -2140,8 +2136,8 @@ static struct clk cam_ick = {
  */
 static struct clk cam_fck = {
        .name           = "cam_fck",
+       .ops            = &clkops_omap2_dflt,
        .parent         = &func_96m_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l3_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP24XX_EN_CAM_SHIFT,
@@ -2150,8 +2146,8 @@ static struct clk cam_fck = {
 
 static struct clk mailboxes_ick = {
        .name           = "mailboxes_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP24XX_EN_MAILBOXES_SHIFT,
@@ -2160,8 +2156,8 @@ static struct clk mailboxes_ick = {
 
 static struct clk wdt4_ick = {
        .name           = "wdt4_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP24XX_EN_WDT4_SHIFT,
@@ -2170,8 +2166,8 @@ static struct clk wdt4_ick = {
 
 static struct clk wdt4_fck = {
        .name           = "wdt4_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &func_32k_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP24XX_EN_WDT4_SHIFT,
@@ -2180,8 +2176,8 @@ static struct clk wdt4_fck = {
 
 static struct clk wdt3_ick = {
        .name           = "wdt3_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP242X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP2420_EN_WDT3_SHIFT,
@@ -2190,8 +2186,8 @@ static struct clk wdt3_ick = {
 
 static struct clk wdt3_fck = {
        .name           = "wdt3_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &func_32k_ck,
-       .flags          = CLOCK_IN_OMAP242X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP2420_EN_WDT3_SHIFT,
@@ -2200,8 +2196,8 @@ static struct clk wdt3_fck = {
 
 static struct clk mspro_ick = {
        .name           = "mspro_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP24XX_EN_MSPRO_SHIFT,
@@ -2210,8 +2206,8 @@ static struct clk mspro_ick = {
 
 static struct clk mspro_fck = {
        .name           = "mspro_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &func_96m_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP24XX_EN_MSPRO_SHIFT,
@@ -2220,8 +2216,8 @@ static struct clk mspro_fck = {
 
 static struct clk mmc_ick = {
        .name           = "mmc_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP242X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP2420_EN_MMC_SHIFT,
@@ -2230,8 +2226,8 @@ static struct clk mmc_ick = {
 
 static struct clk mmc_fck = {
        .name           = "mmc_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &func_96m_ck,
-       .flags          = CLOCK_IN_OMAP242X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP2420_EN_MMC_SHIFT,
@@ -2240,8 +2236,8 @@ static struct clk mmc_fck = {
 
 static struct clk fac_ick = {
        .name           = "fac_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP24XX_EN_FAC_SHIFT,
@@ -2250,8 +2246,8 @@ static struct clk fac_ick = {
 
 static struct clk fac_fck = {
        .name           = "fac_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &func_12m_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP24XX_EN_FAC_SHIFT,
@@ -2260,8 +2256,8 @@ static struct clk fac_fck = {
 
 static struct clk eac_ick = {
        .name           = "eac_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP242X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP2420_EN_EAC_SHIFT,
@@ -2270,8 +2266,8 @@ static struct clk eac_ick = {
 
 static struct clk eac_fck = {
        .name           = "eac_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &func_96m_ck,
-       .flags          = CLOCK_IN_OMAP242X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP2420_EN_EAC_SHIFT,
@@ -2280,8 +2276,8 @@ static struct clk eac_fck = {
 
 static struct clk hdq_ick = {
        .name           = "hdq_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP24XX_EN_HDQ_SHIFT,
@@ -2290,8 +2286,8 @@ static struct clk hdq_ick = {
 
 static struct clk hdq_fck = {
        .name           = "hdq_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &func_12m_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP24XX_EN_HDQ_SHIFT,
@@ -2300,9 +2296,9 @@ static struct clk hdq_fck = {
 
 static struct clk i2c2_ick = {
        .name           = "i2c_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 2,
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP2420_EN_I2C2_SHIFT,
@@ -2311,9 +2307,9 @@ static struct clk i2c2_ick = {
 
 static struct clk i2c2_fck = {
        .name           = "i2c_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 2,
        .parent         = &func_12m_ck,
-       .flags          = CLOCK_IN_OMAP242X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP2420_EN_I2C2_SHIFT,
@@ -2322,9 +2318,9 @@ static struct clk i2c2_fck = {
 
 static struct clk i2chs2_fck = {
        .name           = "i2c_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 2,
        .parent         = &func_96m_ck,
-       .flags          = CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
        .enable_bit     = OMAP2430_EN_I2CHS2_SHIFT,
@@ -2333,9 +2329,9 @@ static struct clk i2chs2_fck = {
 
 static struct clk i2c1_ick = {
        .name           = "i2c_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 1,
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP2420_EN_I2C1_SHIFT,
@@ -2344,9 +2340,9 @@ static struct clk i2c1_ick = {
 
 static struct clk i2c1_fck = {
        .name           = "i2c_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 1,
        .parent         = &func_12m_ck,
-       .flags          = CLOCK_IN_OMAP242X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP2420_EN_I2C1_SHIFT,
@@ -2355,9 +2351,9 @@ static struct clk i2c1_fck = {
 
 static struct clk i2chs1_fck = {
        .name           = "i2c_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 1,
        .parent         = &func_96m_ck,
-       .flags          = CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
        .enable_bit     = OMAP2430_EN_I2CHS1_SHIFT,
@@ -2366,33 +2362,33 @@ static struct clk i2chs1_fck = {
 
 static struct clk gpmc_fck = {
        .name           = "gpmc_fck",
+       .ops            = &clkops_null, /* RMK: missing? */
        .parent         = &core_l3_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
-                               ENABLE_ON_INIT,
+       .flags          = ENABLE_ON_INIT,
        .clkdm_name     = "core_l3_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk sdma_fck = {
        .name           = "sdma_fck",
+       .ops            = &clkops_null, /* RMK: missing? */
        .parent         = &core_l3_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l3_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk sdma_ick = {
        .name           = "sdma_ick",
+       .ops            = &clkops_null, /* RMK: missing? */
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l3_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk vlynq_ick = {
        .name           = "vlynq_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &core_l3_ck,
-       .flags          = CLOCK_IN_OMAP242X,
        .clkdm_name     = "core_l3_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP2420_EN_VLYNQ_SHIFT,
@@ -2426,8 +2422,9 @@ static const struct clksel vlynq_fck_clksel[] = {
 
 static struct clk vlynq_fck = {
        .name           = "vlynq_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &func_96m_ck,
-       .flags          = CLOCK_IN_OMAP242X | DELAYED_APP,
+       .flags          = DELAYED_APP,
        .clkdm_name     = "core_l3_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP2420_EN_VLYNQ_SHIFT,
@@ -2442,8 +2439,9 @@ static struct clk vlynq_fck = {
 
 static struct clk sdrc_ick = {
        .name           = "sdrc_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP243X | ENABLE_ON_INIT,
+       .flags          = ENABLE_ON_INIT,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN3),
        .enable_bit     = OMAP2430_EN_SDRC_SHIFT,
@@ -2452,8 +2450,8 @@ static struct clk sdrc_ick = {
 
 static struct clk des_ick = {
        .name           = "des_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP243X | CLOCK_IN_OMAP242X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4),
        .enable_bit     = OMAP24XX_EN_DES_SHIFT,
@@ -2462,8 +2460,8 @@ static struct clk des_ick = {
 
 static struct clk sha_ick = {
        .name           = "sha_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP243X | CLOCK_IN_OMAP242X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4),
        .enable_bit     = OMAP24XX_EN_SHA_SHIFT,
@@ -2472,8 +2470,8 @@ static struct clk sha_ick = {
 
 static struct clk rng_ick = {
        .name           = "rng_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP243X | CLOCK_IN_OMAP242X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4),
        .enable_bit     = OMAP24XX_EN_RNG_SHIFT,
@@ -2482,8 +2480,8 @@ static struct clk rng_ick = {
 
 static struct clk aes_ick = {
        .name           = "aes_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP243X | CLOCK_IN_OMAP242X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4),
        .enable_bit     = OMAP24XX_EN_AES_SHIFT,
@@ -2492,8 +2490,8 @@ static struct clk aes_ick = {
 
 static struct clk pka_ick = {
        .name           = "pka_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP243X | CLOCK_IN_OMAP242X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4),
        .enable_bit     = OMAP24XX_EN_PKA_SHIFT,
@@ -2502,8 +2500,8 @@ static struct clk pka_ick = {
 
 static struct clk usb_fck = {
        .name           = "usb_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &func_48m_ck,
-       .flags          = CLOCK_IN_OMAP243X | CLOCK_IN_OMAP242X,
        .clkdm_name     = "core_l3_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
        .enable_bit     = OMAP24XX_EN_USB_SHIFT,
@@ -2512,8 +2510,8 @@ static struct clk usb_fck = {
 
 static struct clk usbhs_ick = {
        .name           = "usbhs_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &core_l3_ck,
-       .flags          = CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l3_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
        .enable_bit     = OMAP2430_EN_USBHS_SHIFT,
@@ -2522,8 +2520,8 @@ static struct clk usbhs_ick = {
 
 static struct clk mmchs1_ick = {
        .name           = "mmchs_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
        .enable_bit     = OMAP2430_EN_MMCHS1_SHIFT,
@@ -2532,8 +2530,8 @@ static struct clk mmchs1_ick = {
 
 static struct clk mmchs1_fck = {
        .name           = "mmchs_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &func_96m_ck,
-       .flags          = CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l3_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
        .enable_bit     = OMAP2430_EN_MMCHS1_SHIFT,
@@ -2542,9 +2540,9 @@ static struct clk mmchs1_fck = {
 
 static struct clk mmchs2_ick = {
        .name           = "mmchs_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 1,
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
        .enable_bit     = OMAP2430_EN_MMCHS2_SHIFT,
@@ -2553,9 +2551,9 @@ static struct clk mmchs2_ick = {
 
 static struct clk mmchs2_fck = {
        .name           = "mmchs_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 1,
        .parent         = &func_96m_ck,
-       .flags          = CLOCK_IN_OMAP243X,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
        .enable_bit     = OMAP2430_EN_MMCHS2_SHIFT,
        .recalc         = &followparent_recalc,
@@ -2563,8 +2561,8 @@ static struct clk mmchs2_fck = {
 
 static struct clk gpio5_ick = {
        .name           = "gpio5_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
        .enable_bit     = OMAP2430_EN_GPIO5_SHIFT,
@@ -2573,8 +2571,8 @@ static struct clk gpio5_ick = {
 
 static struct clk gpio5_fck = {
        .name           = "gpio5_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &func_32k_ck,
-       .flags          = CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
        .enable_bit     = OMAP2430_EN_GPIO5_SHIFT,
@@ -2583,8 +2581,8 @@ static struct clk gpio5_fck = {
 
 static struct clk mdm_intc_ick = {
        .name           = "mdm_intc_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &l4_ck,
-       .flags          = CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
        .enable_bit     = OMAP2430_EN_MDM_INTC_SHIFT,
@@ -2593,8 +2591,8 @@ static struct clk mdm_intc_ick = {
 
 static struct clk mmchsdb1_fck = {
        .name           = "mmchsdb_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &func_32k_ck,
-       .flags          = CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
        .enable_bit     = OMAP2430_EN_MMCHSDB1_SHIFT,
@@ -2603,9 +2601,9 @@ static struct clk mmchsdb1_fck = {
 
 static struct clk mmchsdb2_fck = {
        .name           = "mmchsdb_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 1,
        .parent         = &func_32k_ck,
-       .flags          = CLOCK_IN_OMAP243X,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
        .enable_bit     = OMAP2430_EN_MMCHSDB2_SHIFT,
@@ -2628,166 +2626,13 @@ static struct clk mmchsdb2_fck = {
  */
 static struct clk virt_prcm_set = {
        .name           = "virt_prcm_set",
-       .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
-                               VIRTUAL_CLOCK | ALWAYS_ENABLED | DELAYED_APP,
+       .ops            = &clkops_null,
+       .flags          = DELAYED_APP,
        .parent         = &mpu_ck,      /* Indexed by mpu speed, no parent */
        .recalc         = &omap2_table_mpu_recalc,      /* sets are keyed on mpu rate */
        .set_rate       = &omap2_select_table_rate,
        .round_rate     = &omap2_round_to_table_rate,
 };
 
-static struct clk *onchip_24xx_clks[] __initdata = {
-       /* external root sources */
-       &func_32k_ck,
-       &osc_ck,
-       &sys_ck,
-       &alt_ck,
-       /* internal analog sources */
-       &dpll_ck,
-       &apll96_ck,
-       &apll54_ck,
-       /* internal prcm root sources */
-       &func_54m_ck,
-       &core_ck,
-       &func_96m_ck,
-       &func_48m_ck,
-       &func_12m_ck,
-       &wdt1_osc_ck,
-       &sys_clkout_src,
-       &sys_clkout,
-       &sys_clkout2_src,
-       &sys_clkout2,
-       &emul_ck,
-       /* mpu domain clocks */
-       &mpu_ck,
-       /* dsp domain clocks */
-       &dsp_fck,
-       &dsp_irate_ick,
-       &dsp_ick,               /* 242x */
-       &iva2_1_ick,            /* 243x */
-       &iva1_ifck,             /* 242x */
-       &iva1_mpu_int_ifck,     /* 242x */
-       /* GFX domain clocks */
-       &gfx_3d_fck,
-       &gfx_2d_fck,
-       &gfx_ick,
-       /* Modem domain clocks */
-       &mdm_ick,
-       &mdm_osc_ck,
-       /* DSS domain clocks */
-       &dss_ick,
-       &dss1_fck,
-       &dss2_fck,
-       &dss_54m_fck,
-       /* L3 domain clocks */
-       &core_l3_ck,
-       &ssi_ssr_sst_fck,
-       &usb_l4_ick,
-       /* L4 domain clocks */
-       &l4_ck,                 /* used as both core_l4 and wu_l4 */
-       /* virtual meta-group clock */
-       &virt_prcm_set,
-       /* general l4 interface ck, multi-parent functional clk */
-       &gpt1_ick,
-       &gpt1_fck,
-       &gpt2_ick,
-       &gpt2_fck,
-       &gpt3_ick,
-       &gpt3_fck,
-       &gpt4_ick,
-       &gpt4_fck,
-       &gpt5_ick,
-       &gpt5_fck,
-       &gpt6_ick,
-       &gpt6_fck,
-       &gpt7_ick,
-       &gpt7_fck,
-       &gpt8_ick,
-       &gpt8_fck,
-       &gpt9_ick,
-       &gpt9_fck,
-       &gpt10_ick,
-       &gpt10_fck,
-       &gpt11_ick,
-       &gpt11_fck,
-       &gpt12_ick,
-       &gpt12_fck,
-       &mcbsp1_ick,
-       &mcbsp1_fck,
-       &mcbsp2_ick,
-       &mcbsp2_fck,
-       &mcbsp3_ick,
-       &mcbsp3_fck,
-       &mcbsp4_ick,
-       &mcbsp4_fck,
-       &mcbsp5_ick,
-       &mcbsp5_fck,
-       &mcspi1_ick,
-       &mcspi1_fck,
-       &mcspi2_ick,
-       &mcspi2_fck,
-       &mcspi3_ick,
-       &mcspi3_fck,
-       &uart1_ick,
-       &uart1_fck,
-       &uart2_ick,
-       &uart2_fck,
-       &uart3_ick,
-       &uart3_fck,
-       &gpios_ick,
-       &gpios_fck,
-       &mpu_wdt_ick,
-       &mpu_wdt_fck,
-       &sync_32k_ick,
-       &wdt1_ick,
-       &omapctrl_ick,
-       &icr_ick,
-       &cam_fck,
-       &cam_ick,
-       &mailboxes_ick,
-       &wdt4_ick,
-       &wdt4_fck,
-       &wdt3_ick,
-       &wdt3_fck,
-       &mspro_ick,
-       &mspro_fck,
-       &mmc_ick,
-       &mmc_fck,
-       &fac_ick,
-       &fac_fck,
-       &eac_ick,
-       &eac_fck,
-       &hdq_ick,
-       &hdq_fck,
-       &i2c1_ick,
-       &i2c1_fck,
-       &i2chs1_fck,
-       &i2c2_ick,
-       &i2c2_fck,
-       &i2chs2_fck,
-       &gpmc_fck,
-       &sdma_fck,
-       &sdma_ick,
-       &vlynq_ick,
-       &vlynq_fck,
-       &sdrc_ick,
-       &des_ick,
-       &sha_ick,
-       &rng_ick,
-       &aes_ick,
-       &pka_ick,
-       &usb_fck,
-       &usbhs_ick,
-       &mmchs1_ick,
-       &mmchs1_fck,
-       &mmchs2_ick,
-       &mmchs2_fck,
-       &gpio5_ick,
-       &gpio5_fck,
-       &mdm_intc_ick,
-       &mmchsdb1_fck,
-       &mmchsdb2_fck,
-};
-
 #endif
 
index 31bb7010bd48224c8142e8c733debb4ade2b1172..0a14dca31e30d93c95d7b1360bf836a61317a56a 100644 (file)
 #include <mach/clock.h>
 #include <mach/sram.h>
 #include <asm/div64.h>
+#include <asm/clkdev.h>
 
-#include "memory.h"
+#include <mach/sdrc.h>
 #include "clock.h"
-#include "clock34xx.h"
 #include "prm.h"
 #include "prm-regbits-34xx.h"
 #include "cm.h"
 #include "cm-regbits-34xx.h"
 
+static const struct clkops clkops_noncore_dpll_ops;
+
+#include "clock34xx.h"
+
+struct omap_clk {
+       u32             cpu;
+       struct clk_lookup lk;
+};
+
+#define CLK(dev, con, ck, cp)          \
+       {                               \
+                .cpu = cp,             \
+               .lk = {                 \
+                       .dev_id = dev,  \
+                       .con_id = con,  \
+                       .clk = ck,      \
+               },                      \
+       }
+
+#define CK_343X                (1 << 0)
+#define CK_3430ES1     (1 << 1)
+#define CK_3430ES2     (1 << 2)
+
+static struct omap_clk omap34xx_clks[] = {
+       CLK(NULL,       "omap_32k_fck", &omap_32k_fck,  CK_343X),
+       CLK(NULL,       "virt_12m_ck",  &virt_12m_ck,   CK_343X),
+       CLK(NULL,       "virt_13m_ck",  &virt_13m_ck,   CK_343X),
+       CLK(NULL,       "virt_16_8m_ck", &virt_16_8m_ck, CK_3430ES2),
+       CLK(NULL,       "virt_19_2m_ck", &virt_19_2m_ck, CK_343X),
+       CLK(NULL,       "virt_26m_ck",  &virt_26m_ck,   CK_343X),
+       CLK(NULL,       "virt_38_4m_ck", &virt_38_4m_ck, CK_343X),
+       CLK(NULL,       "osc_sys_ck",   &osc_sys_ck,    CK_343X),
+       CLK(NULL,       "sys_ck",       &sys_ck,        CK_343X),
+       CLK(NULL,       "sys_altclk",   &sys_altclk,    CK_343X),
+       CLK(NULL,       "mcbsp_clks",   &mcbsp_clks,    CK_343X),
+       CLK(NULL,       "sys_clkout1",  &sys_clkout1,   CK_343X),
+       CLK(NULL,       "dpll1_ck",     &dpll1_ck,      CK_343X),
+       CLK(NULL,       "dpll1_x2_ck",  &dpll1_x2_ck,   CK_343X),
+       CLK(NULL,       "dpll1_x2m2_ck", &dpll1_x2m2_ck, CK_343X),
+       CLK(NULL,       "dpll2_ck",     &dpll2_ck,      CK_343X),
+       CLK(NULL,       "dpll2_m2_ck",  &dpll2_m2_ck,   CK_343X),
+       CLK(NULL,       "dpll3_ck",     &dpll3_ck,      CK_343X),
+       CLK(NULL,       "core_ck",      &core_ck,       CK_343X),
+       CLK(NULL,       "dpll3_x2_ck",  &dpll3_x2_ck,   CK_343X),
+       CLK(NULL,       "dpll3_m2_ck",  &dpll3_m2_ck,   CK_343X),
+       CLK(NULL,       "dpll3_m2x2_ck", &dpll3_m2x2_ck, CK_343X),
+       CLK(NULL,       "dpll3_m3_ck",  &dpll3_m3_ck,   CK_343X),
+       CLK(NULL,       "dpll3_m3x2_ck", &dpll3_m3x2_ck, CK_343X),
+       CLK(NULL,       "emu_core_alwon_ck", &emu_core_alwon_ck, CK_343X),
+       CLK(NULL,       "dpll4_ck",     &dpll4_ck,      CK_343X),
+       CLK(NULL,       "dpll4_x2_ck",  &dpll4_x2_ck,   CK_343X),
+       CLK(NULL,       "omap_96m_alwon_fck", &omap_96m_alwon_fck, CK_343X),
+       CLK(NULL,       "omap_96m_fck", &omap_96m_fck,  CK_343X),
+       CLK(NULL,       "cm_96m_fck",   &cm_96m_fck,    CK_343X),
+       CLK(NULL,       "omap_54m_fck", &omap_54m_fck,  CK_343X),
+       CLK(NULL,       "omap_48m_fck", &omap_48m_fck,  CK_343X),
+       CLK(NULL,       "omap_12m_fck", &omap_12m_fck,  CK_343X),
+       CLK(NULL,       "dpll4_m2_ck",  &dpll4_m2_ck,   CK_343X),
+       CLK(NULL,       "dpll4_m2x2_ck", &dpll4_m2x2_ck, CK_343X),
+       CLK(NULL,       "dpll4_m3_ck",  &dpll4_m3_ck,   CK_343X),
+       CLK(NULL,       "dpll4_m3x2_ck", &dpll4_m3x2_ck, CK_343X),
+       CLK(NULL,       "dpll4_m4_ck",  &dpll4_m4_ck,   CK_343X),
+       CLK(NULL,       "dpll4_m4x2_ck", &dpll4_m4x2_ck, CK_343X),
+       CLK(NULL,       "dpll4_m5_ck",  &dpll4_m5_ck,   CK_343X),
+       CLK(NULL,       "dpll4_m5x2_ck", &dpll4_m5x2_ck, CK_343X),
+       CLK(NULL,       "dpll4_m6_ck",  &dpll4_m6_ck,   CK_343X),
+       CLK(NULL,       "dpll4_m6x2_ck", &dpll4_m6x2_ck, CK_343X),
+       CLK(NULL,       "emu_per_alwon_ck", &emu_per_alwon_ck, CK_343X),
+       CLK(NULL,       "dpll5_ck",     &dpll5_ck,      CK_3430ES2),
+       CLK(NULL,       "dpll5_m2_ck",  &dpll5_m2_ck,   CK_3430ES2),
+       CLK(NULL,       "clkout2_src_ck", &clkout2_src_ck, CK_343X),
+       CLK(NULL,       "sys_clkout2",  &sys_clkout2,   CK_343X),
+       CLK(NULL,       "corex2_fck",   &corex2_fck,    CK_343X),
+       CLK(NULL,       "dpll1_fck",    &dpll1_fck,     CK_343X),
+       CLK(NULL,       "mpu_ck",       &mpu_ck,        CK_343X),
+       CLK(NULL,       "arm_fck",      &arm_fck,       CK_343X),
+       CLK(NULL,       "emu_mpu_alwon_ck", &emu_mpu_alwon_ck, CK_343X),
+       CLK(NULL,       "dpll2_fck",    &dpll2_fck,     CK_343X),
+       CLK(NULL,       "iva2_ck",      &iva2_ck,       CK_343X),
+       CLK(NULL,       "l3_ick",       &l3_ick,        CK_343X),
+       CLK(NULL,       "l4_ick",       &l4_ick,        CK_343X),
+       CLK(NULL,       "rm_ick",       &rm_ick,        CK_343X),
+       CLK(NULL,       "gfx_l3_ck",    &gfx_l3_ck,     CK_3430ES1),
+       CLK(NULL,       "gfx_l3_fck",   &gfx_l3_fck,    CK_3430ES1),
+       CLK(NULL,       "gfx_l3_ick",   &gfx_l3_ick,    CK_3430ES1),
+       CLK(NULL,       "gfx_cg1_ck",   &gfx_cg1_ck,    CK_3430ES1),
+       CLK(NULL,       "gfx_cg2_ck",   &gfx_cg2_ck,    CK_3430ES1),
+       CLK(NULL,       "sgx_fck",      &sgx_fck,       CK_3430ES2),
+       CLK(NULL,       "sgx_ick",      &sgx_ick,       CK_3430ES2),
+       CLK(NULL,       "d2d_26m_fck",  &d2d_26m_fck,   CK_3430ES1),
+       CLK(NULL,       "gpt10_fck",    &gpt10_fck,     CK_343X),
+       CLK(NULL,       "gpt11_fck",    &gpt11_fck,     CK_343X),
+       CLK(NULL,       "cpefuse_fck",  &cpefuse_fck,   CK_3430ES2),
+       CLK(NULL,       "ts_fck",       &ts_fck,        CK_3430ES2),
+       CLK(NULL,       "usbtll_fck",   &usbtll_fck,    CK_3430ES2),
+       CLK(NULL,       "core_96m_fck", &core_96m_fck,  CK_343X),
+       CLK("mmci-omap-hs.2",   "fck",  &mmchs3_fck,    CK_3430ES2),
+       CLK("mmci-omap-hs.1",   "fck",  &mmchs2_fck,    CK_343X),
+       CLK(NULL,       "mspro_fck",    &mspro_fck,     CK_343X),
+       CLK("mmci-omap-hs.0",   "fck",  &mmchs1_fck,    CK_343X),
+       CLK("i2c_omap.3", "fck",        &i2c3_fck,      CK_343X),
+       CLK("i2c_omap.2", "fck",        &i2c2_fck,      CK_343X),
+       CLK("i2c_omap.1", "fck",        &i2c1_fck,      CK_343X),
+       CLK("omap-mcbsp.5", "fck",      &mcbsp5_fck,    CK_343X),
+       CLK("omap-mcbsp.1", "fck",      &mcbsp1_fck,    CK_343X),
+       CLK(NULL,       "core_48m_fck", &core_48m_fck,  CK_343X),
+       CLK("omap2_mcspi.4", "fck",     &mcspi4_fck,    CK_343X),
+       CLK("omap2_mcspi.3", "fck",     &mcspi3_fck,    CK_343X),
+       CLK("omap2_mcspi.2", "fck",     &mcspi2_fck,    CK_343X),
+       CLK("omap2_mcspi.1", "fck",     &mcspi1_fck,    CK_343X),
+       CLK(NULL,       "uart2_fck",    &uart2_fck,     CK_343X),
+       CLK(NULL,       "uart1_fck",    &uart1_fck,     CK_343X),
+       CLK(NULL,       "fshostusb_fck", &fshostusb_fck, CK_3430ES1),
+       CLK(NULL,       "core_12m_fck", &core_12m_fck,  CK_343X),
+       CLK("omap_hdq.0", "fck",        &hdq_fck,       CK_343X),
+       CLK(NULL,       "ssi_ssr_fck",  &ssi_ssr_fck,   CK_343X),
+       CLK(NULL,       "ssi_sst_fck",  &ssi_sst_fck,   CK_343X),
+       CLK(NULL,       "core_l3_ick",  &core_l3_ick,   CK_343X),
+       CLK(NULL,       "hsotgusb_ick", &hsotgusb_ick,  CK_343X),
+       CLK(NULL,       "sdrc_ick",     &sdrc_ick,      CK_343X),
+       CLK(NULL,       "gpmc_fck",     &gpmc_fck,      CK_343X),
+       CLK(NULL,       "security_l3_ick", &security_l3_ick, CK_343X),
+       CLK(NULL,       "pka_ick",      &pka_ick,       CK_343X),
+       CLK(NULL,       "core_l4_ick",  &core_l4_ick,   CK_343X),
+       CLK(NULL,       "usbtll_ick",   &usbtll_ick,    CK_3430ES2),
+       CLK("mmci-omap-hs.2",   "ick",  &mmchs3_ick,    CK_3430ES2),
+       CLK(NULL,       "icr_ick",      &icr_ick,       CK_343X),
+       CLK(NULL,       "aes2_ick",     &aes2_ick,      CK_343X),
+       CLK(NULL,       "sha12_ick",    &sha12_ick,     CK_343X),
+       CLK(NULL,       "des2_ick",     &des2_ick,      CK_343X),
+       CLK("mmci-omap-hs.1",   "ick",  &mmchs2_ick,    CK_343X),
+       CLK("mmci-omap-hs.0",   "ick",  &mmchs1_ick,    CK_343X),
+       CLK(NULL,       "mspro_ick",    &mspro_ick,     CK_343X),
+       CLK("omap_hdq.0", "ick",        &hdq_ick,       CK_343X),
+       CLK("omap2_mcspi.4", "ick",     &mcspi4_ick,    CK_343X),
+       CLK("omap2_mcspi.3", "ick",     &mcspi3_ick,    CK_343X),
+       CLK("omap2_mcspi.2", "ick",     &mcspi2_ick,    CK_343X),
+       CLK("omap2_mcspi.1", "ick",     &mcspi1_ick,    CK_343X),
+       CLK("i2c_omap.3", "ick",        &i2c3_ick,      CK_343X),
+       CLK("i2c_omap.2", "ick",        &i2c2_ick,      CK_343X),
+       CLK("i2c_omap.1", "ick",        &i2c1_ick,      CK_343X),
+       CLK(NULL,       "uart2_ick",    &uart2_ick,     CK_343X),
+       CLK(NULL,       "uart1_ick",    &uart1_ick,     CK_343X),
+       CLK(NULL,       "gpt11_ick",    &gpt11_ick,     CK_343X),
+       CLK(NULL,       "gpt10_ick",    &gpt10_ick,     CK_343X),
+       CLK("omap-mcbsp.5", "ick",      &mcbsp5_ick,    CK_343X),
+       CLK("omap-mcbsp.1", "ick",      &mcbsp1_ick,    CK_343X),
+       CLK(NULL,       "fac_ick",      &fac_ick,       CK_3430ES1),
+       CLK(NULL,       "mailboxes_ick", &mailboxes_ick, CK_343X),
+       CLK(NULL,       "omapctrl_ick", &omapctrl_ick,  CK_343X),
+       CLK(NULL,       "ssi_l4_ick",   &ssi_l4_ick,    CK_343X),
+       CLK(NULL,       "ssi_ick",      &ssi_ick,       CK_343X),
+       CLK(NULL,       "usb_l4_ick",   &usb_l4_ick,    CK_3430ES1),
+       CLK(NULL,       "security_l4_ick2", &security_l4_ick2, CK_343X),
+       CLK(NULL,       "aes1_ick",     &aes1_ick,      CK_343X),
+       CLK("omap_rng", "ick",          &rng_ick,       CK_343X),
+       CLK(NULL,       "sha11_ick",    &sha11_ick,     CK_343X),
+       CLK(NULL,       "des1_ick",     &des1_ick,      CK_343X),
+       CLK(NULL,       "dss1_alwon_fck", &dss1_alwon_fck, CK_343X),
+       CLK(NULL,       "dss_tv_fck",   &dss_tv_fck,    CK_343X),
+       CLK(NULL,       "dss_96m_fck",  &dss_96m_fck,   CK_343X),
+       CLK(NULL,       "dss2_alwon_fck", &dss2_alwon_fck, CK_343X),
+       CLK(NULL,       "dss_ick",      &dss_ick,       CK_343X),
+       CLK(NULL,       "cam_mclk",     &cam_mclk,      CK_343X),
+       CLK(NULL,       "cam_ick",      &cam_ick,       CK_343X),
+       CLK(NULL,       "csi2_96m_fck", &csi2_96m_fck,  CK_343X),
+       CLK(NULL,       "usbhost_120m_fck", &usbhost_120m_fck, CK_3430ES2),
+       CLK(NULL,       "usbhost_48m_fck", &usbhost_48m_fck, CK_3430ES2),
+       CLK(NULL,       "usbhost_ick",  &usbhost_ick,   CK_3430ES2),
+       CLK(NULL,       "usim_fck",     &usim_fck,      CK_3430ES2),
+       CLK(NULL,       "gpt1_fck",     &gpt1_fck,      CK_343X),
+       CLK(NULL,       "wkup_32k_fck", &wkup_32k_fck,  CK_343X),
+       CLK(NULL,       "gpio1_dbck",   &gpio1_dbck,    CK_343X),
+       CLK("omap_wdt", "fck",          &wdt2_fck,      CK_343X),
+       CLK(NULL,       "wkup_l4_ick",  &wkup_l4_ick,   CK_343X),
+       CLK(NULL,       "usim_ick",     &usim_ick,      CK_3430ES2),
+       CLK("omap_wdt", "ick",          &wdt2_ick,      CK_343X),
+       CLK(NULL,       "wdt1_ick",     &wdt1_ick,      CK_343X),
+       CLK(NULL,       "gpio1_ick",    &gpio1_ick,     CK_343X),
+       CLK(NULL,       "omap_32ksync_ick", &omap_32ksync_ick, CK_343X),
+       CLK(NULL,       "gpt12_ick",    &gpt12_ick,     CK_343X),
+       CLK(NULL,       "gpt1_ick",     &gpt1_ick,      CK_343X),
+       CLK(NULL,       "per_96m_fck",  &per_96m_fck,   CK_343X),
+       CLK(NULL,       "per_48m_fck",  &per_48m_fck,   CK_343X),
+       CLK(NULL,       "uart3_fck",    &uart3_fck,     CK_343X),
+       CLK(NULL,       "gpt2_fck",     &gpt2_fck,      CK_343X),
+       CLK(NULL,       "gpt3_fck",     &gpt3_fck,      CK_343X),
+       CLK(NULL,       "gpt4_fck",     &gpt4_fck,      CK_343X),
+       CLK(NULL,       "gpt5_fck",     &gpt5_fck,      CK_343X),
+       CLK(NULL,       "gpt6_fck",     &gpt6_fck,      CK_343X),
+       CLK(NULL,       "gpt7_fck",     &gpt7_fck,      CK_343X),
+       CLK(NULL,       "gpt8_fck",     &gpt8_fck,      CK_343X),
+       CLK(NULL,       "gpt9_fck",     &gpt9_fck,      CK_343X),
+       CLK(NULL,       "per_32k_alwon_fck", &per_32k_alwon_fck, CK_343X),
+       CLK(NULL,       "gpio6_dbck",   &gpio6_dbck,    CK_343X),
+       CLK(NULL,       "gpio5_dbck",   &gpio5_dbck,    CK_343X),
+       CLK(NULL,       "gpio4_dbck",   &gpio4_dbck,    CK_343X),
+       CLK(NULL,       "gpio3_dbck",   &gpio3_dbck,    CK_343X),
+       CLK(NULL,       "gpio2_dbck",   &gpio2_dbck,    CK_343X),
+       CLK(NULL,       "wdt3_fck",     &wdt3_fck,      CK_343X),
+       CLK(NULL,       "per_l4_ick",   &per_l4_ick,    CK_343X),
+       CLK(NULL,       "gpio6_ick",    &gpio6_ick,     CK_343X),
+       CLK(NULL,       "gpio5_ick",    &gpio5_ick,     CK_343X),
+       CLK(NULL,       "gpio4_ick",    &gpio4_ick,     CK_343X),
+       CLK(NULL,       "gpio3_ick",    &gpio3_ick,     CK_343X),
+       CLK(NULL,       "gpio2_ick",    &gpio2_ick,     CK_343X),
+       CLK(NULL,       "wdt3_ick",     &wdt3_ick,      CK_343X),
+       CLK(NULL,       "uart3_ick",    &uart3_ick,     CK_343X),
+       CLK(NULL,       "gpt9_ick",     &gpt9_ick,      CK_343X),
+       CLK(NULL,       "gpt8_ick",     &gpt8_ick,      CK_343X),
+       CLK(NULL,       "gpt7_ick",     &gpt7_ick,      CK_343X),
+       CLK(NULL,       "gpt6_ick",     &gpt6_ick,      CK_343X),
+       CLK(NULL,       "gpt5_ick",     &gpt5_ick,      CK_343X),
+       CLK(NULL,       "gpt4_ick",     &gpt4_ick,      CK_343X),
+       CLK(NULL,       "gpt3_ick",     &gpt3_ick,      CK_343X),
+       CLK(NULL,       "gpt2_ick",     &gpt2_ick,      CK_343X),
+       CLK("omap-mcbsp.2", "ick",      &mcbsp2_ick,    CK_343X),
+       CLK("omap-mcbsp.3", "ick",      &mcbsp3_ick,    CK_343X),
+       CLK("omap-mcbsp.4", "ick",      &mcbsp4_ick,    CK_343X),
+       CLK("omap-mcbsp.2", "fck",      &mcbsp2_fck,    CK_343X),
+       CLK("omap-mcbsp.3", "fck",      &mcbsp3_fck,    CK_343X),
+       CLK("omap-mcbsp.4", "fck",      &mcbsp4_fck,    CK_343X),
+       CLK(NULL,       "emu_src_ck",   &emu_src_ck,    CK_343X),
+       CLK(NULL,       "pclk_fck",     &pclk_fck,      CK_343X),
+       CLK(NULL,       "pclkx2_fck",   &pclkx2_fck,    CK_343X),
+       CLK(NULL,       "atclk_fck",    &atclk_fck,     CK_343X),
+       CLK(NULL,       "traceclk_src_fck", &traceclk_src_fck, CK_343X),
+       CLK(NULL,       "traceclk_fck", &traceclk_fck,  CK_343X),
+       CLK(NULL,       "sr1_fck",      &sr1_fck,       CK_343X),
+       CLK(NULL,       "sr2_fck",      &sr2_fck,       CK_343X),
+       CLK(NULL,       "sr_l4_ick",    &sr_l4_ick,     CK_343X),
+       CLK(NULL,       "secure_32k_fck", &secure_32k_fck, CK_343X),
+       CLK(NULL,       "gpt12_fck",    &gpt12_fck,     CK_343X),
+       CLK(NULL,       "wdt1_fck",     &wdt1_fck,      CK_343X),
+};
+
 /* CM_AUTOIDLE_PLL*.AUTO_* bit values */
 #define DPLL_AUTOIDLE_DISABLE                  0x0
 #define DPLL_AUTOIDLE_LOW_POWER_STOP           0x1
  *
  * Recalculate and propagate the DPLL rate.
  */
-static void omap3_dpll_recalc(struct clk *clk)
+static unsigned long omap3_dpll_recalc(struct clk *clk)
 {
-       clk->rate = omap2_get_dpll_rate(clk);
-
-       propagate_rate(clk);
+       return omap2_get_dpll_rate(clk);
 }
 
 /* _omap3_dpll_write_clken - write clken_bits arg to a DPLL's enable bits */
@@ -78,14 +312,12 @@ static int _omap3_wait_dpll_status(struct clk *clk, u8 state)
        const struct dpll_data *dd;
        int i = 0;
        int ret = -EINVAL;
-       u32 idlest_mask;
 
        dd = clk->dpll_data;
 
-       state <<= dd->idlest_bit;
-       idlest_mask = 1 << dd->idlest_bit;
+       state <<= __ffs(dd->idlest_mask);
 
-       while (((__raw_readl(dd->idlest_reg) & idlest_mask) != state) &&
+       while (((__raw_readl(dd->idlest_reg) & dd->idlest_mask) != state) &&
               i < MAX_DPLL_WAIT_TRIES) {
                i++;
                udelay(1);
@@ -104,6 +336,42 @@ static int _omap3_wait_dpll_status(struct clk *clk, u8 state)
        return ret;
 }
 
+/* From 3430 TRM ES2 4.7.6.2 */
+static u16 _omap3_dpll_compute_freqsel(struct clk *clk, u8 n)
+{
+       unsigned long fint;
+       u16 f = 0;
+
+       fint = clk->dpll_data->clk_ref->rate / (n + 1);
+
+       pr_debug("clock: fint is %lu\n", fint);
+
+       if (fint >= 750000 && fint <= 1000000)
+               f = 0x3;
+       else if (fint > 1000000 && fint <= 1250000)
+               f = 0x4;
+       else if (fint > 1250000 && fint <= 1500000)
+               f = 0x5;
+       else if (fint > 1500000 && fint <= 1750000)
+               f = 0x6;
+       else if (fint > 1750000 && fint <= 2100000)
+               f = 0x7;
+       else if (fint > 7500000 && fint <= 10000000)
+               f = 0xB;
+       else if (fint > 10000000 && fint <= 12500000)
+               f = 0xC;
+       else if (fint > 12500000 && fint <= 15000000)
+               f = 0xD;
+       else if (fint > 15000000 && fint <= 17500000)
+               f = 0xE;
+       else if (fint > 17500000 && fint <= 21000000)
+               f = 0xF;
+       else
+               pr_debug("clock: unknown freqsel setting for %d\n", n);
+
+       return f;
+}
+
 /* Non-CORE DPLL (e.g., DPLLs that do not control SDRC) clock functions */
 
 /*
@@ -128,25 +396,20 @@ static int _omap3_noncore_dpll_lock(struct clk *clk)
 
        ai = omap3_dpll_autoidle_read(clk);
 
+       omap3_dpll_deny_idle(clk);
+
        _omap3_dpll_write_clken(clk, DPLL_LOCKED);
 
-       if (ai) {
-               /*
-                * If no downstream clocks are enabled, CM_IDLEST bit
-                * may never become active, so don't wait for DPLL to lock.
-                */
-               r = 0;
+       r = _omap3_wait_dpll_status(clk, 1);
+
+       if (ai)
                omap3_dpll_allow_idle(clk);
-       } else {
-               r = _omap3_wait_dpll_status(clk, 1);
-               omap3_dpll_deny_idle(clk);
-       };
 
        return r;
 }
 
 /*
- * omap3_noncore_dpll_bypass - instruct a DPLL to bypass and wait for readiness
+ * _omap3_noncore_dpll_bypass - instruct a DPLL to bypass and wait for readiness
  * @clk: pointer to a DPLL struct clk
  *
  * Instructs a non-CORE DPLL to enter low-power bypass mode.  In
@@ -236,14 +499,25 @@ static int _omap3_noncore_dpll_stop(struct clk *clk)
 static int omap3_noncore_dpll_enable(struct clk *clk)
 {
        int r;
+       struct dpll_data *dd;
 
        if (clk == &dpll3_ck)
                return -EINVAL;
 
-       if (clk->parent->rate == clk_get_rate(clk))
+       dd = clk->dpll_data;
+       if (!dd)
+               return -EINVAL;
+
+       if (clk->rate == dd->clk_bypass->rate) {
+               WARN_ON(clk->parent != dd->clk_bypass);
                r = _omap3_noncore_dpll_bypass(clk);
-       else
+       } else {
+               WARN_ON(clk->parent != dd->clk_ref);
                r = _omap3_noncore_dpll_lock(clk);
+       }
+       /* FIXME: this is dubious - if clk->rate has changed, what about propagating? */
+       if (!r)
+               clk->rate = omap2_get_dpll_rate(clk);
 
        return r;
 }
@@ -270,6 +544,215 @@ static void omap3_noncore_dpll_disable(struct clk *clk)
        _omap3_noncore_dpll_stop(clk);
 }
 
+
+/* Non-CORE DPLL rate set code */
+
+/*
+ * omap3_noncore_dpll_program - set non-core DPLL M,N values directly
+ * @clk: struct clk * of DPLL to set
+ * @m: DPLL multiplier to set
+ * @n: DPLL divider to set
+ * @freqsel: FREQSEL value to set
+ *
+ * Program the DPLL with the supplied M, N values, and wait for the DPLL to
+ * lock..  Returns -EINVAL upon error, or 0 upon success.
+ */
+static int omap3_noncore_dpll_program(struct clk *clk, u16 m, u8 n, u16 freqsel)
+{
+       struct dpll_data *dd = clk->dpll_data;
+       u32 v;
+
+       /* 3430 ES2 TRM: 4.7.6.9 DPLL Programming Sequence */
+       _omap3_noncore_dpll_bypass(clk);
+
+       /* Set jitter correction */
+       v = __raw_readl(dd->control_reg);
+       v &= ~dd->freqsel_mask;
+       v |= freqsel << __ffs(dd->freqsel_mask);
+       __raw_writel(v, dd->control_reg);
+
+       /* Set DPLL multiplier, divider */
+       v = __raw_readl(dd->mult_div1_reg);
+       v &= ~(dd->mult_mask | dd->div1_mask);
+       v |= m << __ffs(dd->mult_mask);
+       v |= (n - 1) << __ffs(dd->div1_mask);
+       __raw_writel(v, dd->mult_div1_reg);
+
+       /* We let the clock framework set the other output dividers later */
+
+       /* REVISIT: Set ramp-up delay? */
+
+       _omap3_noncore_dpll_lock(clk);
+
+       return 0;
+}
+
+/**
+ * omap3_noncore_dpll_set_rate - set non-core DPLL rate
+ * @clk: struct clk * of DPLL to set
+ * @rate: rounded target rate
+ *
+ * Set the DPLL CLKOUT to the target rate.  If the DPLL can enter
+ * low-power bypass, and the target rate is the bypass source clock
+ * rate, then configure the DPLL for bypass.  Otherwise, round the
+ * target rate if it hasn't been done already, then program and lock
+ * the DPLL.  Returns -EINVAL upon error, or 0 upon success.
+ */
+static int omap3_noncore_dpll_set_rate(struct clk *clk, unsigned long rate)
+{
+       struct clk *new_parent = NULL;
+       u16 freqsel;
+       struct dpll_data *dd;
+       int ret;
+
+       if (!clk || !rate)
+               return -EINVAL;
+
+       dd = clk->dpll_data;
+       if (!dd)
+               return -EINVAL;
+
+       if (rate == omap2_get_dpll_rate(clk))
+               return 0;
+
+       /*
+        * Ensure both the bypass and ref clocks are enabled prior to
+        * doing anything; we need the bypass clock running to reprogram
+        * the DPLL.
+        */
+       omap2_clk_enable(dd->clk_bypass);
+       omap2_clk_enable(dd->clk_ref);
+
+       if (dd->clk_bypass->rate == rate &&
+           (clk->dpll_data->modes & (1 << DPLL_LOW_POWER_BYPASS))) {
+               pr_debug("clock: %s: set rate: entering bypass.\n", clk->name);
+
+               ret = _omap3_noncore_dpll_bypass(clk);
+               if (!ret)
+                       new_parent = dd->clk_bypass;
+       } else {
+               if (dd->last_rounded_rate != rate)
+                       omap2_dpll_round_rate(clk, rate);
+
+               if (dd->last_rounded_rate == 0)
+                       return -EINVAL;
+
+               freqsel = _omap3_dpll_compute_freqsel(clk, dd->last_rounded_n);
+               if (!freqsel)
+                       WARN_ON(1);
+
+               pr_debug("clock: %s: set rate: locking rate to %lu.\n",
+                        clk->name, rate);
+
+               ret = omap3_noncore_dpll_program(clk, dd->last_rounded_m,
+                                                dd->last_rounded_n, freqsel);
+               if (!ret)
+                       new_parent = dd->clk_ref;
+       }
+       if (!ret) {
+               /*
+                * Switch the parent clock in the heirarchy, and make sure
+                * that the new parent's usecount is correct.  Note: we
+                * enable the new parent before disabling the old to avoid
+                * any unnecessary hardware disable->enable transitions.
+                */
+               if (clk->usecount) {
+                       omap2_clk_enable(new_parent);
+                       omap2_clk_disable(clk->parent);
+               }
+               clk_reparent(clk, new_parent);
+               clk->rate = rate;
+       }
+       omap2_clk_disable(dd->clk_ref);
+       omap2_clk_disable(dd->clk_bypass);
+
+       return 0;
+}
+
+static int omap3_dpll4_set_rate(struct clk *clk, unsigned long rate)
+{
+       /*
+        * According to the 12-5 CDP code from TI, "Limitation 2.5"
+        * on 3430ES1 prevents us from changing DPLL multipliers or dividers
+        * on DPLL4.
+        */
+       if (omap_rev() == OMAP3430_REV_ES1_0) {
+               printk(KERN_ERR "clock: DPLL4 cannot change rate due to "
+                      "silicon 'Limitation 2.5' on 3430ES1.\n");
+               return -EINVAL;
+       }
+       return omap3_noncore_dpll_set_rate(clk, rate);
+}
+
+
+/*
+ * CORE DPLL (DPLL3) rate programming functions
+ *
+ * These call into SRAM code to do the actual CM writes, since the SDRAM
+ * is clocked from DPLL3.
+ */
+
+/**
+ * omap3_core_dpll_m2_set_rate - set CORE DPLL M2 divider
+ * @clk: struct clk * of DPLL to set
+ * @rate: rounded target rate
+ *
+ * Program the DPLL M2 divider with the rounded target rate.  Returns
+ * -EINVAL upon error, or 0 upon success.
+ */
+static int omap3_core_dpll_m2_set_rate(struct clk *clk, unsigned long rate)
+{
+       u32 new_div = 0;
+       unsigned long validrate, sdrcrate;
+       struct omap_sdrc_params *sp;
+
+       if (!clk || !rate)
+               return -EINVAL;
+
+       if (clk != &dpll3_m2_ck)
+               return -EINVAL;
+
+       if (rate == clk->rate)
+               return 0;
+
+       validrate = omap2_clksel_round_rate_div(clk, rate, &new_div);
+       if (validrate != rate)
+               return -EINVAL;
+
+       sdrcrate = sdrc_ick.rate;
+       if (rate > clk->rate)
+               sdrcrate <<= ((rate / clk->rate) - 1);
+       else
+               sdrcrate >>= ((clk->rate / rate) - 1);
+
+       sp = omap2_sdrc_get_params(sdrcrate);
+       if (!sp)
+               return -EINVAL;
+
+       pr_info("clock: changing CORE DPLL rate from %lu to %lu\n", clk->rate,
+               validrate);
+       pr_info("clock: SDRC timing params used: %08x %08x %08x\n",
+               sp->rfr_ctrl, sp->actim_ctrla, sp->actim_ctrlb);
+
+       /* REVISIT: SRAM code doesn't support other M2 divisors yet */
+       WARN_ON(new_div != 1 && new_div != 2);
+
+       /* REVISIT: Add SDRC_MR changing to this code also */
+       omap3_configure_core_dpll(sp->rfr_ctrl, sp->actim_ctrla,
+                                 sp->actim_ctrlb, new_div);
+
+       return 0;
+}
+
+
+static const struct clkops clkops_noncore_dpll_ops = {
+       .enable         = &omap3_noncore_dpll_enable,
+       .disable        = &omap3_noncore_dpll_disable,
+};
+
+/* DPLL autoidle read/set code */
+
+
 /**
  * omap3_dpll_autoidle_read - read a DPLL's autoidle bits
  * @clk: struct clk * of the DPLL to read
@@ -356,9 +839,10 @@ static void omap3_dpll_deny_idle(struct clk *clk)
  * Using parent clock DPLL data, look up DPLL state.  If locked, set our
  * rate to the dpll_clk * 2; otherwise, just use dpll_clk.
  */
-static void omap3_clkoutx2_recalc(struct clk *clk)
+static unsigned long omap3_clkoutx2_recalc(struct clk *clk)
 {
        const struct dpll_data *dd;
+       unsigned long rate;
        u32 v;
        struct clk *pclk;
 
@@ -372,17 +856,15 @@ static void omap3_clkoutx2_recalc(struct clk *clk)
 
        dd = pclk->dpll_data;
 
-       WARN_ON(!dd->control_reg || !dd->enable_mask);
+       WARN_ON(!dd->enable_mask);
 
        v = __raw_readl(dd->control_reg) & dd->enable_mask;
        v >>= __ffs(dd->enable_mask);
-       if (v != DPLL_LOCKED)
-               clk->rate = clk->parent->rate;
+       if (v != OMAP3XXX_EN_DPLL_LOCKED)
+               rate = clk->parent->rate;
        else
-               clk->rate = clk->parent->rate * 2;
-
-       if (clk->flags & RATE_PROPAGATES)
-               propagate_rate(clk);
+               rate = clk->parent->rate * 2;
+       return rate;
 }
 
 /* Common clock code */
@@ -432,7 +914,7 @@ static int __init omap2_clk_arch_init(void)
 
        /* REVISIT: not yet ready for 343x */
 #if 0
-       if (omap2_select_table_rate(&virt_prcm_set, mpurate))
+       if (clk_set_rate(&virt_prcm_set, mpurate))
                printk(KERN_ERR "Could not find matching MPU rate\n");
 #endif
 
@@ -450,26 +932,13 @@ arch_initcall(omap2_clk_arch_init);
 int __init omap2_clk_init(void)
 {
        /* struct prcm_config *prcm; */
-       struct clk **clkp;
+       struct omap_clk *c;
        /* u32 clkrate; */
        u32 cpu_clkflg;
 
-       /* REVISIT: Ultimately this will be used for multiboot */
-#if 0
-       if (cpu_is_omap242x()) {
-               cpu_mask = RATE_IN_242X;
-               cpu_clkflg = CLOCK_IN_OMAP242X;
-               clkp = onchip_24xx_clks;
-       } else if (cpu_is_omap2430()) {
-               cpu_mask = RATE_IN_243X;
-               cpu_clkflg = CLOCK_IN_OMAP243X;
-               clkp = onchip_24xx_clks;
-       }
-#endif
        if (cpu_is_omap34xx()) {
                cpu_mask = RATE_IN_343X;
-               cpu_clkflg = CLOCK_IN_OMAP343X;
-               clkp = onchip_34xx_clks;
+               cpu_clkflg = CK_343X;
 
                /*
                 * Update this if there are further clock changes between ES2
@@ -477,23 +946,24 @@ int __init omap2_clk_init(void)
                 */
                if (omap_rev() == OMAP3430_REV_ES1_0) {
                        /* No 3430ES1-only rates exist, so no RATE_IN_3430ES1 */
-                       cpu_clkflg |= CLOCK_IN_OMAP3430ES1;
+                       cpu_clkflg |= CK_3430ES1;
                } else {
                        cpu_mask |= RATE_IN_3430ES2;
-                       cpu_clkflg |= CLOCK_IN_OMAP3430ES2;
+                       cpu_clkflg |= CK_3430ES2;
                }
        }
 
        clk_init(&omap2_clk_functions);
 
-       for (clkp = onchip_34xx_clks;
-            clkp < onchip_34xx_clks + ARRAY_SIZE(onchip_34xx_clks);
-            clkp++) {
-               if ((*clkp)->flags & cpu_clkflg) {
-                       clk_register(*clkp);
-                       omap2_init_clk_clkdm(*clkp);
+       for (c = omap34xx_clks; c < omap34xx_clks + ARRAY_SIZE(omap34xx_clks); c++)
+               clk_init_one(c->lk.clk);
+
+       for (c = omap34xx_clks; c < omap34xx_clks + ARRAY_SIZE(omap34xx_clks); c++)
+               if (c->cpu & cpu_clkflg) {
+                       clkdev_add(&c->lk);
+                       clk_register(c->lk.clk);
+                       omap2_init_clk_clkdm(c->lk.clk);
                }
-       }
 
        /* REVISIT: Not yet ready for OMAP3 */
 #if 0
index a826094d89b57caade4c88c0e992638243396e7c..70ec10deb654a43282bc706093dbab6256e0cdd3 100644 (file)
 #include "prm.h"
 #include "prm-regbits-34xx.h"
 
-static void omap3_dpll_recalc(struct clk *clk);
-static void omap3_clkoutx2_recalc(struct clk *clk);
+static unsigned long omap3_dpll_recalc(struct clk *clk);
+static unsigned long omap3_clkoutx2_recalc(struct clk *clk);
 static void omap3_dpll_allow_idle(struct clk *clk);
 static void omap3_dpll_deny_idle(struct clk *clk);
 static u32 omap3_dpll_autoidle_read(struct clk *clk);
-static int omap3_noncore_dpll_enable(struct clk *clk);
-static void omap3_noncore_dpll_disable(struct clk *clk);
+static int omap3_noncore_dpll_set_rate(struct clk *clk, unsigned long rate);
+static int omap3_dpll4_set_rate(struct clk *clk, unsigned long rate);
+static int omap3_core_dpll_m2_set_rate(struct clk *clk, unsigned long rate);
 
 /* Maximum DPLL multiplier, divider values for OMAP3 */
 #define OMAP3_MAX_DPLL_MULT            2048
@@ -47,6 +48,10 @@ static void omap3_noncore_dpll_disable(struct clk *clk);
  * DPLL5 supplies other peripheral clocks (USBHOST, USIM).
  */
 
+/* Forward declarations for DPLL bypass clocks */
+static struct clk dpll1_fck;
+static struct clk dpll2_fck;
+
 /* CM_CLKEN_PLL*.EN* bit values - not all are available for every DPLL */
 #define DPLL_LOW_POWER_STOP            0x1
 #define DPLL_LOW_POWER_BYPASS          0x5
@@ -57,67 +62,59 @@ static void omap3_noncore_dpll_disable(struct clk *clk);
 /* According to timer32k.c, this is a 32768Hz clock, not a 32000Hz clock. */
 static struct clk omap_32k_fck = {
        .name           = "omap_32k_fck",
+       .ops            = &clkops_null,
        .rate           = 32768,
-       .flags          = CLOCK_IN_OMAP343X | RATE_FIXED | RATE_PROPAGATES |
-                               ALWAYS_ENABLED,
-       .recalc         = &propagate_rate,
+       .flags          = RATE_FIXED,
 };
 
 static struct clk secure_32k_fck = {
        .name           = "secure_32k_fck",
+       .ops            = &clkops_null,
        .rate           = 32768,
-       .flags          = CLOCK_IN_OMAP343X | RATE_FIXED | RATE_PROPAGATES |
-                               ALWAYS_ENABLED,
-       .recalc         = &propagate_rate,
+       .flags          = RATE_FIXED,
 };
 
 /* Virtual source clocks for osc_sys_ck */
 static struct clk virt_12m_ck = {
        .name           = "virt_12m_ck",
+       .ops            = &clkops_null,
        .rate           = 12000000,
-       .flags          = CLOCK_IN_OMAP343X | RATE_FIXED | RATE_PROPAGATES |
-                               ALWAYS_ENABLED,
-       .recalc         = &propagate_rate,
+       .flags          = RATE_FIXED,
 };
 
 static struct clk virt_13m_ck = {
        .name           = "virt_13m_ck",
+       .ops            = &clkops_null,
        .rate           = 13000000,
-       .flags          = CLOCK_IN_OMAP343X | RATE_FIXED | RATE_PROPAGATES |
-                               ALWAYS_ENABLED,
-       .recalc         = &propagate_rate,
+       .flags          = RATE_FIXED,
 };
 
 static struct clk virt_16_8m_ck = {
        .name           = "virt_16_8m_ck",
+       .ops            = &clkops_null,
        .rate           = 16800000,
-       .flags          = CLOCK_IN_OMAP3430ES2 | RATE_FIXED | RATE_PROPAGATES |
-                               ALWAYS_ENABLED,
-       .recalc         = &propagate_rate,
+       .flags          = RATE_FIXED,
 };
 
 static struct clk virt_19_2m_ck = {
        .name           = "virt_19_2m_ck",
+       .ops            = &clkops_null,
        .rate           = 19200000,
-       .flags          = CLOCK_IN_OMAP343X | RATE_FIXED | RATE_PROPAGATES |
-                               ALWAYS_ENABLED,
-       .recalc         = &propagate_rate,
+       .flags          = RATE_FIXED,
 };
 
 static struct clk virt_26m_ck = {
        .name           = "virt_26m_ck",
+       .ops            = &clkops_null,
        .rate           = 26000000,
-       .flags          = CLOCK_IN_OMAP343X | RATE_FIXED | RATE_PROPAGATES |
-                               ALWAYS_ENABLED,
-       .recalc         = &propagate_rate,
+       .flags          = RATE_FIXED,
 };
 
 static struct clk virt_38_4m_ck = {
        .name           = "virt_38_4m_ck",
+       .ops            = &clkops_null,
        .rate           = 38400000,
-       .flags          = CLOCK_IN_OMAP343X | RATE_FIXED | RATE_PROPAGATES |
-                               ALWAYS_ENABLED,
-       .recalc         = &propagate_rate,
+       .flags          = RATE_FIXED,
 };
 
 static const struct clksel_rate osc_sys_12m_rates[] = {
@@ -164,13 +161,13 @@ static const struct clksel osc_sys_clksel[] = {
 /* 12, 13, 16.8, 19.2, 26, or 38.4 MHz */
 static struct clk osc_sys_ck = {
        .name           = "osc_sys_ck",
+       .ops            = &clkops_null,
        .init           = &omap2_init_clksel_parent,
        .clksel_reg     = OMAP3430_PRM_CLKSEL,
        .clksel_mask    = OMAP3430_SYS_CLKIN_SEL_MASK,
        .clksel         = osc_sys_clksel,
        /* REVISIT: deal with autoextclkmode? */
-       .flags          = CLOCK_IN_OMAP343X | RATE_FIXED | RATE_PROPAGATES |
-                               ALWAYS_ENABLED,
+       .flags          = RATE_FIXED,
        .recalc         = &omap2_clksel_recalc,
 };
 
@@ -189,36 +186,34 @@ static const struct clksel sys_clksel[] = {
 /* Feeds DPLLs - divided first by PRM_CLKSRC_CTRL.SYSCLKDIV? */
 static struct clk sys_ck = {
        .name           = "sys_ck",
+       .ops            = &clkops_null,
        .parent         = &osc_sys_ck,
        .init           = &omap2_init_clksel_parent,
        .clksel_reg     = OMAP3430_PRM_CLKSRC_CTRL,
        .clksel_mask    = OMAP_SYSCLKDIV_MASK,
        .clksel         = sys_clksel,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES | ALWAYS_ENABLED,
        .recalc         = &omap2_clksel_recalc,
 };
 
 static struct clk sys_altclk = {
        .name           = "sys_altclk",
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES | ALWAYS_ENABLED,
-       .recalc         = &propagate_rate,
+       .ops            = &clkops_null,
 };
 
 /* Optional external clock input for some McBSPs */
 static struct clk mcbsp_clks = {
        .name           = "mcbsp_clks",
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES | ALWAYS_ENABLED,
-       .recalc         = &propagate_rate,
+       .ops            = &clkops_null,
 };
 
 /* PRM EXTERNAL CLOCK OUTPUT */
 
 static struct clk sys_clkout1 = {
        .name           = "sys_clkout1",
+       .ops            = &clkops_omap2_dflt,
        .parent         = &osc_sys_ck,
        .enable_reg     = OMAP3430_PRM_CLKOUT_CTRL,
        .enable_bit     = OMAP3430_CLKOUT_EN_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .recalc         = &followparent_recalc,
 };
 
@@ -226,16 +221,6 @@ static struct clk sys_clkout1 = {
 
 /* CM CLOCKS */
 
-static const struct clksel_rate dpll_bypass_rates[] = {
-       { .div = 1, .val = 0, .flags = RATE_IN_343X | DEFAULT_RATE },
-       { .div = 0 }
-};
-
-static const struct clksel_rate dpll_locked_rates[] = {
-       { .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
-       { .div = 0 }
-};
-
 static const struct clksel_rate div16_dpll_rates[] = {
        { .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
        { .div = 2, .val = 2, .flags = RATE_IN_343X },
@@ -263,6 +248,9 @@ static struct dpll_data dpll1_dd = {
        .mult_div1_reg  = OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_CLKSEL1_PLL),
        .mult_mask      = OMAP3430_MPU_DPLL_MULT_MASK,
        .div1_mask      = OMAP3430_MPU_DPLL_DIV_MASK,
+       .clk_bypass     = &dpll1_fck,
+       .clk_ref        = &sys_ck,
+       .freqsel_mask   = OMAP3430_MPU_DPLL_FREQSEL_MASK,
        .control_reg    = OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_CLKEN_PLL),
        .enable_mask    = OMAP3430_EN_MPU_DPLL_MASK,
        .modes          = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
@@ -272,18 +260,21 @@ static struct dpll_data dpll1_dd = {
        .autoidle_reg   = OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_AUTOIDLE_PLL),
        .autoidle_mask  = OMAP3430_AUTO_MPU_DPLL_MASK,
        .idlest_reg     = OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_IDLEST_PLL),
-       .idlest_bit     = OMAP3430_ST_MPU_CLK_SHIFT,
+       .idlest_mask    = OMAP3430_ST_MPU_CLK_MASK,
        .max_multiplier = OMAP3_MAX_DPLL_MULT,
+       .min_divider    = 1,
        .max_divider    = OMAP3_MAX_DPLL_DIV,
        .rate_tolerance = DEFAULT_DPLL_RATE_TOLERANCE
 };
 
 static struct clk dpll1_ck = {
        .name           = "dpll1_ck",
+       .ops            = &clkops_null,
        .parent         = &sys_ck,
        .dpll_data      = &dpll1_dd,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES | ALWAYS_ENABLED,
        .round_rate     = &omap2_dpll_round_rate,
+       .set_rate       = &omap3_noncore_dpll_set_rate,
+       .clkdm_name     = "dpll1_clkdm",
        .recalc         = &omap3_dpll_recalc,
 };
 
@@ -293,9 +284,9 @@ static struct clk dpll1_ck = {
  */
 static struct clk dpll1_x2_ck = {
        .name           = "dpll1_x2_ck",
+       .ops            = &clkops_null,
        .parent         = &dpll1_ck,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
-                               PARENT_CONTROLS_CLOCK,
+       .clkdm_name     = "dpll1_clkdm",
        .recalc         = &omap3_clkoutx2_recalc,
 };
 
@@ -311,13 +302,13 @@ static const struct clksel div16_dpll1_x2m2_clksel[] = {
  */
 static struct clk dpll1_x2m2_ck = {
        .name           = "dpll1_x2m2_ck",
+       .ops            = &clkops_null,
        .parent         = &dpll1_x2_ck,
        .init           = &omap2_init_clksel_parent,
        .clksel_reg     = OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_CLKSEL2_PLL),
        .clksel_mask    = OMAP3430_MPU_DPLL_CLKOUT_DIV_MASK,
        .clksel         = div16_dpll1_x2m2_clksel,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
-                               PARENT_CONTROLS_CLOCK,
+       .clkdm_name     = "dpll1_clkdm",
        .recalc         = &omap2_clksel_recalc,
 };
 
@@ -329,6 +320,9 @@ static struct dpll_data dpll2_dd = {
        .mult_div1_reg  = OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, OMAP3430_CM_CLKSEL1_PLL),
        .mult_mask      = OMAP3430_IVA2_DPLL_MULT_MASK,
        .div1_mask      = OMAP3430_IVA2_DPLL_DIV_MASK,
+       .clk_bypass     = &dpll2_fck,
+       .clk_ref        = &sys_ck,
+       .freqsel_mask   = OMAP3430_IVA2_DPLL_FREQSEL_MASK,
        .control_reg    = OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, OMAP3430_CM_CLKEN_PLL),
        .enable_mask    = OMAP3430_EN_IVA2_DPLL_MASK,
        .modes          = (1 << DPLL_LOW_POWER_STOP) | (1 << DPLL_LOCKED) |
@@ -339,20 +333,21 @@ static struct dpll_data dpll2_dd = {
        .autoidle_reg   = OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, OMAP3430_CM_AUTOIDLE_PLL),
        .autoidle_mask  = OMAP3430_AUTO_IVA2_DPLL_MASK,
        .idlest_reg     = OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, OMAP3430_CM_IDLEST_PLL),
-       .idlest_bit     = OMAP3430_ST_IVA2_CLK_SHIFT,
+       .idlest_mask    = OMAP3430_ST_IVA2_CLK_MASK,
        .max_multiplier = OMAP3_MAX_DPLL_MULT,
+       .min_divider    = 1,
        .max_divider    = OMAP3_MAX_DPLL_DIV,
        .rate_tolerance = DEFAULT_DPLL_RATE_TOLERANCE
 };
 
 static struct clk dpll2_ck = {
        .name           = "dpll2_ck",
+       .ops            = &clkops_noncore_dpll_ops,
        .parent         = &sys_ck,
        .dpll_data      = &dpll2_dd,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES,
-       .enable         = &omap3_noncore_dpll_enable,
-       .disable        = &omap3_noncore_dpll_disable,
        .round_rate     = &omap2_dpll_round_rate,
+       .set_rate       = &omap3_noncore_dpll_set_rate,
+       .clkdm_name     = "dpll2_clkdm",
        .recalc         = &omap3_dpll_recalc,
 };
 
@@ -367,14 +362,14 @@ static const struct clksel div16_dpll2_m2x2_clksel[] = {
  */
 static struct clk dpll2_m2_ck = {
        .name           = "dpll2_m2_ck",
+       .ops            = &clkops_null,
        .parent         = &dpll2_ck,
        .init           = &omap2_init_clksel_parent,
        .clksel_reg     = OMAP_CM_REGADDR(OMAP3430_IVA2_MOD,
                                          OMAP3430_CM_CLKSEL2_PLL),
        .clksel_mask    = OMAP3430_IVA2_DPLL_CLKOUT_DIV_MASK,
        .clksel         = div16_dpll2_m2x2_clksel,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
-                               PARENT_CONTROLS_CLOCK,
+       .clkdm_name     = "dpll2_clkdm",
        .recalc         = &omap2_clksel_recalc,
 };
 
@@ -387,6 +382,9 @@ static struct dpll_data dpll3_dd = {
        .mult_div1_reg  = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
        .mult_mask      = OMAP3430_CORE_DPLL_MULT_MASK,
        .div1_mask      = OMAP3430_CORE_DPLL_DIV_MASK,
+       .clk_bypass     = &sys_ck,
+       .clk_ref        = &sys_ck,
+       .freqsel_mask   = OMAP3430_CORE_DPLL_FREQSEL_MASK,
        .control_reg    = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
        .enable_mask    = OMAP3430_EN_CORE_DPLL_MASK,
        .auto_recal_bit = OMAP3430_EN_CORE_DPLL_DRIFTGUARD_SHIFT,
@@ -394,17 +392,21 @@ static struct dpll_data dpll3_dd = {
        .recal_st_bit   = OMAP3430_CORE_DPLL_ST_SHIFT,
        .autoidle_reg   = OMAP_CM_REGADDR(PLL_MOD, CM_AUTOIDLE),
        .autoidle_mask  = OMAP3430_AUTO_CORE_DPLL_MASK,
+       .idlest_reg     = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST),
+       .idlest_mask    = OMAP3430_ST_CORE_CLK_MASK,
        .max_multiplier = OMAP3_MAX_DPLL_MULT,
+       .min_divider    = 1,
        .max_divider    = OMAP3_MAX_DPLL_DIV,
        .rate_tolerance = DEFAULT_DPLL_RATE_TOLERANCE
 };
 
 static struct clk dpll3_ck = {
        .name           = "dpll3_ck",
+       .ops            = &clkops_null,
        .parent         = &sys_ck,
        .dpll_data      = &dpll3_dd,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES | ALWAYS_ENABLED,
        .round_rate     = &omap2_dpll_round_rate,
+       .clkdm_name     = "dpll3_clkdm",
        .recalc         = &omap3_dpll_recalc,
 };
 
@@ -414,9 +416,9 @@ static struct clk dpll3_ck = {
  */
 static struct clk dpll3_x2_ck = {
        .name           = "dpll3_x2_ck",
+       .ops            = &clkops_null,
        .parent         = &dpll3_ck,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
-                               PARENT_CONTROLS_CLOCK,
+       .clkdm_name     = "dpll3_clkdm",
        .recalc         = &omap3_clkoutx2_recalc,
 };
 
@@ -460,55 +462,34 @@ static const struct clksel div31_dpll3m2_clksel[] = {
        { .parent = NULL }
 };
 
-/*
- * DPLL3 output M2
- * REVISIT: This DPLL output divider must be changed in SRAM, so until
- * that code is ready, this should remain a 'read-only' clksel clock.
- */
+/* DPLL3 output M2 - primary control point for CORE speed */
 static struct clk dpll3_m2_ck = {
        .name           = "dpll3_m2_ck",
+       .ops            = &clkops_null,
        .parent         = &dpll3_ck,
        .init           = &omap2_init_clksel_parent,
        .clksel_reg     = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
        .clksel_mask    = OMAP3430_CORE_DPLL_CLKOUT_DIV_MASK,
        .clksel         = div31_dpll3m2_clksel,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
-                               PARENT_CONTROLS_CLOCK,
+       .clkdm_name     = "dpll3_clkdm",
+       .round_rate     = &omap2_clksel_round_rate,
+       .set_rate       = &omap3_core_dpll_m2_set_rate,
        .recalc         = &omap2_clksel_recalc,
 };
 
-static const struct clksel core_ck_clksel[] = {
-       { .parent = &sys_ck,      .rates = dpll_bypass_rates },
-       { .parent = &dpll3_m2_ck, .rates = dpll_locked_rates },
-       { .parent = NULL }
-};
-
 static struct clk core_ck = {
        .name           = "core_ck",
-       .init           = &omap2_init_clksel_parent,
-       .clksel_reg     = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST),
-       .clksel_mask    = OMAP3430_ST_CORE_CLK_MASK,
-       .clksel         = core_ck_clksel,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
-                               PARENT_CONTROLS_CLOCK,
-       .recalc         = &omap2_clksel_recalc,
-};
-
-static const struct clksel dpll3_m2x2_ck_clksel[] = {
-       { .parent = &sys_ck,      .rates = dpll_bypass_rates },
-       { .parent = &dpll3_x2_ck, .rates = dpll_locked_rates },
-       { .parent = NULL }
+       .ops            = &clkops_null,
+       .parent         = &dpll3_m2_ck,
+       .recalc         = &followparent_recalc,
 };
 
 static struct clk dpll3_m2x2_ck = {
        .name           = "dpll3_m2x2_ck",
-       .init           = &omap2_init_clksel_parent,
-       .clksel_reg     = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST),
-       .clksel_mask    = OMAP3430_ST_CORE_CLK_MASK,
-       .clksel         = dpll3_m2x2_ck_clksel,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
-                               PARENT_CONTROLS_CLOCK,
-       .recalc         = &omap2_clksel_recalc,
+       .ops            = &clkops_null,
+       .parent         = &dpll3_x2_ck,
+       .clkdm_name     = "dpll3_clkdm",
+       .recalc         = &followparent_recalc,
 };
 
 /* The PWRDN bit is apparently only available on 3430ES2 and above */
@@ -520,42 +501,34 @@ static const struct clksel div16_dpll3_clksel[] = {
 /* This virtual clock is the source for dpll3_m3x2_ck */
 static struct clk dpll3_m3_ck = {
        .name           = "dpll3_m3_ck",
+       .ops            = &clkops_null,
        .parent         = &dpll3_ck,
        .init           = &omap2_init_clksel_parent,
        .clksel_reg     = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
        .clksel_mask    = OMAP3430_DIV_DPLL3_MASK,
        .clksel         = div16_dpll3_clksel,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
-                               PARENT_CONTROLS_CLOCK,
+       .clkdm_name     = "dpll3_clkdm",
        .recalc         = &omap2_clksel_recalc,
 };
 
 /* The PWRDN bit is apparently only available on 3430ES2 and above */
 static struct clk dpll3_m3x2_ck = {
        .name           = "dpll3_m3x2_ck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &dpll3_m3_ck,
        .enable_reg     = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
        .enable_bit     = OMAP3430_PWRDN_EMU_CORE_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES | INVERT_ENABLE,
+       .flags          = INVERT_ENABLE,
+       .clkdm_name     = "dpll3_clkdm",
        .recalc         = &omap3_clkoutx2_recalc,
 };
 
-static const struct clksel emu_core_alwon_ck_clksel[] = {
-       { .parent = &sys_ck,        .rates = dpll_bypass_rates },
-       { .parent = &dpll3_m3x2_ck, .rates = dpll_locked_rates },
-       { .parent = NULL }
-};
-
 static struct clk emu_core_alwon_ck = {
        .name           = "emu_core_alwon_ck",
+       .ops            = &clkops_null,
        .parent         = &dpll3_m3x2_ck,
-       .init           = &omap2_init_clksel_parent,
-       .clksel_reg     = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST),
-       .clksel_mask    = OMAP3430_ST_CORE_CLK_MASK,
-       .clksel         = emu_core_alwon_ck_clksel,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
-                               PARENT_CONTROLS_CLOCK,
-       .recalc         = &omap2_clksel_recalc,
+       .clkdm_name     = "dpll3_clkdm",
+       .recalc         = &followparent_recalc,
 };
 
 /* DPLL4 */
@@ -565,6 +538,9 @@ static struct dpll_data dpll4_dd = {
        .mult_div1_reg  = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL2),
        .mult_mask      = OMAP3430_PERIPH_DPLL_MULT_MASK,
        .div1_mask      = OMAP3430_PERIPH_DPLL_DIV_MASK,
+       .clk_bypass     = &sys_ck,
+       .clk_ref        = &sys_ck,
+       .freqsel_mask   = OMAP3430_PERIPH_DPLL_FREQSEL_MASK,
        .control_reg    = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
        .enable_mask    = OMAP3430_EN_PERIPH_DPLL_MASK,
        .modes          = (1 << DPLL_LOW_POWER_STOP) | (1 << DPLL_LOCKED),
@@ -574,20 +550,21 @@ static struct dpll_data dpll4_dd = {
        .autoidle_reg   = OMAP_CM_REGADDR(PLL_MOD, CM_AUTOIDLE),
        .autoidle_mask  = OMAP3430_AUTO_PERIPH_DPLL_MASK,
        .idlest_reg     = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST),
-       .idlest_bit     = OMAP3430_ST_PERIPH_CLK_SHIFT,
+       .idlest_mask    = OMAP3430_ST_PERIPH_CLK_MASK,
        .max_multiplier = OMAP3_MAX_DPLL_MULT,
+       .min_divider    = 1,
        .max_divider    = OMAP3_MAX_DPLL_DIV,
        .rate_tolerance = DEFAULT_DPLL_RATE_TOLERANCE
 };
 
 static struct clk dpll4_ck = {
        .name           = "dpll4_ck",
+       .ops            = &clkops_noncore_dpll_ops,
        .parent         = &sys_ck,
        .dpll_data      = &dpll4_dd,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES,
-       .enable         = &omap3_noncore_dpll_enable,
-       .disable        = &omap3_noncore_dpll_disable,
        .round_rate     = &omap2_dpll_round_rate,
+       .set_rate       = &omap3_dpll4_set_rate,
+       .clkdm_name     = "dpll4_clkdm",
        .recalc         = &omap3_dpll_recalc,
 };
 
@@ -598,9 +575,9 @@ static struct clk dpll4_ck = {
  */
 static struct clk dpll4_x2_ck = {
        .name           = "dpll4_x2_ck",
+       .ops            = &clkops_null,
        .parent         = &dpll4_ck,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
-                               PARENT_CONTROLS_CLOCK,
+       .clkdm_name     = "dpll4_clkdm",
        .recalc         = &omap3_clkoutx2_recalc,
 };
 
@@ -612,112 +589,101 @@ static const struct clksel div16_dpll4_clksel[] = {
 /* This virtual clock is the source for dpll4_m2x2_ck */
 static struct clk dpll4_m2_ck = {
        .name           = "dpll4_m2_ck",
+       .ops            = &clkops_null,
        .parent         = &dpll4_ck,
        .init           = &omap2_init_clksel_parent,
        .clksel_reg     = OMAP_CM_REGADDR(PLL_MOD, OMAP3430_CM_CLKSEL3),
        .clksel_mask    = OMAP3430_DIV_96M_MASK,
        .clksel         = div16_dpll4_clksel,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
-                               PARENT_CONTROLS_CLOCK,
+       .clkdm_name     = "dpll4_clkdm",
        .recalc         = &omap2_clksel_recalc,
 };
 
 /* The PWRDN bit is apparently only available on 3430ES2 and above */
 static struct clk dpll4_m2x2_ck = {
        .name           = "dpll4_m2x2_ck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &dpll4_m2_ck,
        .enable_reg     = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
        .enable_bit     = OMAP3430_PWRDN_96M_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES | INVERT_ENABLE,
+       .flags          = INVERT_ENABLE,
+       .clkdm_name     = "dpll4_clkdm",
        .recalc         = &omap3_clkoutx2_recalc,
 };
 
-static const struct clksel omap_96m_alwon_fck_clksel[] = {
-       { .parent = &sys_ck,        .rates = dpll_bypass_rates },
-       { .parent = &dpll4_m2x2_ck, .rates = dpll_locked_rates },
-       { .parent = NULL }
-};
-
+/*
+ * DPLL4 generates DPLL4_M2X2_CLK which is then routed into the PRM as
+ * PRM_96M_ALWON_(F)CLK.  Two clocks then emerge from the PRM:
+ * 96M_ALWON_FCLK (called "omap_96m_alwon_fck" below) and
+ * CM_96K_(F)CLK.
+ */
 static struct clk omap_96m_alwon_fck = {
        .name           = "omap_96m_alwon_fck",
+       .ops            = &clkops_null,
        .parent         = &dpll4_m2x2_ck,
-       .init           = &omap2_init_clksel_parent,
-       .clksel_reg     = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST),
-       .clksel_mask    = OMAP3430_ST_PERIPH_CLK_MASK,
-       .clksel         = omap_96m_alwon_fck_clksel,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
-                                PARENT_CONTROLS_CLOCK,
-       .recalc         = &omap2_clksel_recalc,
+       .recalc         = &followparent_recalc,
 };
 
-static struct clk omap_96m_fck = {
-       .name           = "omap_96m_fck",
+static struct clk cm_96m_fck = {
+       .name           = "cm_96m_fck",
+       .ops            = &clkops_null,
        .parent         = &omap_96m_alwon_fck,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
-                               PARENT_CONTROLS_CLOCK,
        .recalc         = &followparent_recalc,
 };
 
-static const struct clksel cm_96m_fck_clksel[] = {
-       { .parent = &sys_ck,        .rates = dpll_bypass_rates },
-       { .parent = &dpll4_m2x2_ck, .rates = dpll_locked_rates },
+static const struct clksel_rate omap_96m_dpll_rates[] = {
+       { .div = 1, .val = 0, .flags = RATE_IN_343X | DEFAULT_RATE },
+       { .div = 0 }
+};
+
+static const struct clksel_rate omap_96m_sys_rates[] = {
+       { .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
+       { .div = 0 }
+};
+
+static const struct clksel omap_96m_fck_clksel[] = {
+       { .parent = &cm_96m_fck, .rates = omap_96m_dpll_rates },
+       { .parent = &sys_ck,     .rates = omap_96m_sys_rates },
        { .parent = NULL }
 };
 
-static struct clk cm_96m_fck = {
-       .name           = "cm_96m_fck",
-       .parent         = &dpll4_m2x2_ck,
+static struct clk omap_96m_fck = {
+       .name           = "omap_96m_fck",
+       .ops            = &clkops_null,
+       .parent         = &sys_ck,
        .init           = &omap2_init_clksel_parent,
-       .clksel_reg     = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST),
-       .clksel_mask    = OMAP3430_ST_PERIPH_CLK_MASK,
-       .clksel         = cm_96m_fck_clksel,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
-                               PARENT_CONTROLS_CLOCK,
+       .clksel_reg     = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
+       .clksel_mask    = OMAP3430_SOURCE_96M_MASK,
+       .clksel         = omap_96m_fck_clksel,
        .recalc         = &omap2_clksel_recalc,
 };
 
 /* This virtual clock is the source for dpll4_m3x2_ck */
 static struct clk dpll4_m3_ck = {
        .name           = "dpll4_m3_ck",
+       .ops            = &clkops_null,
        .parent         = &dpll4_ck,
        .init           = &omap2_init_clksel_parent,
        .clksel_reg     = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_CLKSEL),
        .clksel_mask    = OMAP3430_CLKSEL_TV_MASK,
        .clksel         = div16_dpll4_clksel,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
-                               PARENT_CONTROLS_CLOCK,
+       .clkdm_name     = "dpll4_clkdm",
        .recalc         = &omap2_clksel_recalc,
 };
 
 /* The PWRDN bit is apparently only available on 3430ES2 and above */
 static struct clk dpll4_m3x2_ck = {
        .name           = "dpll4_m3x2_ck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &dpll4_m3_ck,
        .init           = &omap2_init_clksel_parent,
        .enable_reg     = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
        .enable_bit     = OMAP3430_PWRDN_TV_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES | INVERT_ENABLE,
+       .flags          = INVERT_ENABLE,
+       .clkdm_name     = "dpll4_clkdm",
        .recalc         = &omap3_clkoutx2_recalc,
 };
 
-static const struct clksel virt_omap_54m_fck_clksel[] = {
-       { .parent = &sys_ck,        .rates = dpll_bypass_rates },
-       { .parent = &dpll4_m3x2_ck, .rates = dpll_locked_rates },
-       { .parent = NULL }
-};
-
-static struct clk virt_omap_54m_fck = {
-       .name           = "virt_omap_54m_fck",
-       .parent         = &dpll4_m3x2_ck,
-       .init           = &omap2_init_clksel_parent,
-       .clksel_reg     = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST),
-       .clksel_mask    = OMAP3430_ST_PERIPH_CLK_MASK,
-       .clksel         = virt_omap_54m_fck_clksel,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
-                               PARENT_CONTROLS_CLOCK,
-       .recalc         = &omap2_clksel_recalc,
-};
-
 static const struct clksel_rate omap_54m_d4m3x2_rates[] = {
        { .div = 1, .val = 0, .flags = RATE_IN_343X | DEFAULT_RATE },
        { .div = 0 }
@@ -729,23 +695,22 @@ static const struct clksel_rate omap_54m_alt_rates[] = {
 };
 
 static const struct clksel omap_54m_clksel[] = {
-       { .parent = &virt_omap_54m_fck, .rates = omap_54m_d4m3x2_rates },
+       { .parent = &dpll4_m3x2_ck, .rates = omap_54m_d4m3x2_rates },
        { .parent = &sys_altclk,    .rates = omap_54m_alt_rates },
        { .parent = NULL }
 };
 
 static struct clk omap_54m_fck = {
        .name           = "omap_54m_fck",
+       .ops            = &clkops_null,
        .init           = &omap2_init_clksel_parent,
        .clksel_reg     = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
-       .clksel_mask    = OMAP3430_SOURCE_54M,
+       .clksel_mask    = OMAP3430_SOURCE_54M_MASK,
        .clksel         = omap_54m_clksel,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
-                               PARENT_CONTROLS_CLOCK,
        .recalc         = &omap2_clksel_recalc,
 };
 
-static const struct clksel_rate omap_48m_96md2_rates[] = {
+static const struct clksel_rate omap_48m_cm96m_rates[] = {
        { .div = 2, .val = 0, .flags = RATE_IN_343X | DEFAULT_RATE },
        { .div = 0 }
 };
@@ -756,106 +721,112 @@ static const struct clksel_rate omap_48m_alt_rates[] = {
 };
 
 static const struct clksel omap_48m_clksel[] = {
-       { .parent = &cm_96m_fck, .rates = omap_48m_96md2_rates },
+       { .parent = &cm_96m_fck, .rates = omap_48m_cm96m_rates },
        { .parent = &sys_altclk, .rates = omap_48m_alt_rates },
        { .parent = NULL }
 };
 
 static struct clk omap_48m_fck = {
        .name           = "omap_48m_fck",
+       .ops            = &clkops_null,
        .init           = &omap2_init_clksel_parent,
        .clksel_reg     = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
-       .clksel_mask    = OMAP3430_SOURCE_48M,
+       .clksel_mask    = OMAP3430_SOURCE_48M_MASK,
        .clksel         = omap_48m_clksel,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
-                               PARENT_CONTROLS_CLOCK,
        .recalc         = &omap2_clksel_recalc,
 };
 
 static struct clk omap_12m_fck = {
        .name           = "omap_12m_fck",
+       .ops            = &clkops_null,
        .parent         = &omap_48m_fck,
        .fixed_div      = 4,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
-                               PARENT_CONTROLS_CLOCK,
        .recalc         = &omap2_fixed_divisor_recalc,
 };
 
 /* This virstual clock is the source for dpll4_m4x2_ck */
 static struct clk dpll4_m4_ck = {
        .name           = "dpll4_m4_ck",
+       .ops            = &clkops_null,
        .parent         = &dpll4_ck,
        .init           = &omap2_init_clksel_parent,
        .clksel_reg     = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_CLKSEL),
        .clksel_mask    = OMAP3430_CLKSEL_DSS1_MASK,
        .clksel         = div16_dpll4_clksel,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
-                               PARENT_CONTROLS_CLOCK,
+       .clkdm_name     = "dpll4_clkdm",
        .recalc         = &omap2_clksel_recalc,
+       .set_rate       = &omap2_clksel_set_rate,
+       .round_rate     = &omap2_clksel_round_rate,
 };
 
 /* The PWRDN bit is apparently only available on 3430ES2 and above */
 static struct clk dpll4_m4x2_ck = {
        .name           = "dpll4_m4x2_ck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &dpll4_m4_ck,
        .enable_reg     = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
        .enable_bit     = OMAP3430_PWRDN_CAM_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES | INVERT_ENABLE,
+       .flags          = INVERT_ENABLE,
+       .clkdm_name     = "dpll4_clkdm",
        .recalc         = &omap3_clkoutx2_recalc,
 };
 
 /* This virtual clock is the source for dpll4_m5x2_ck */
 static struct clk dpll4_m5_ck = {
        .name           = "dpll4_m5_ck",
+       .ops            = &clkops_null,
        .parent         = &dpll4_ck,
        .init           = &omap2_init_clksel_parent,
        .clksel_reg     = OMAP_CM_REGADDR(OMAP3430_CAM_MOD, CM_CLKSEL),
        .clksel_mask    = OMAP3430_CLKSEL_CAM_MASK,
        .clksel         = div16_dpll4_clksel,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
-                               PARENT_CONTROLS_CLOCK,
+       .clkdm_name     = "dpll4_clkdm",
        .recalc         = &omap2_clksel_recalc,
 };
 
 /* The PWRDN bit is apparently only available on 3430ES2 and above */
 static struct clk dpll4_m5x2_ck = {
        .name           = "dpll4_m5x2_ck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &dpll4_m5_ck,
        .enable_reg     = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
        .enable_bit     = OMAP3430_PWRDN_CAM_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES | INVERT_ENABLE,
+       .flags          = INVERT_ENABLE,
+       .clkdm_name     = "dpll4_clkdm",
        .recalc         = &omap3_clkoutx2_recalc,
 };
 
 /* This virtual clock is the source for dpll4_m6x2_ck */
 static struct clk dpll4_m6_ck = {
        .name           = "dpll4_m6_ck",
+       .ops            = &clkops_null,
        .parent         = &dpll4_ck,
        .init           = &omap2_init_clksel_parent,
        .clksel_reg     = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
        .clksel_mask    = OMAP3430_DIV_DPLL4_MASK,
        .clksel         = div16_dpll4_clksel,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
-                               PARENT_CONTROLS_CLOCK,
+       .clkdm_name     = "dpll4_clkdm",
        .recalc         = &omap2_clksel_recalc,
 };
 
 /* The PWRDN bit is apparently only available on 3430ES2 and above */
 static struct clk dpll4_m6x2_ck = {
        .name           = "dpll4_m6x2_ck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &dpll4_m6_ck,
        .init           = &omap2_init_clksel_parent,
        .enable_reg     = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
        .enable_bit     = OMAP3430_PWRDN_EMU_PERIPH_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES | INVERT_ENABLE,
+       .flags          = INVERT_ENABLE,
+       .clkdm_name     = "dpll4_clkdm",
        .recalc         = &omap3_clkoutx2_recalc,
 };
 
 static struct clk emu_per_alwon_ck = {
        .name           = "emu_per_alwon_ck",
+       .ops            = &clkops_null,
        .parent         = &dpll4_m6x2_ck,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
-                               PARENT_CONTROLS_CLOCK,
+       .clkdm_name     = "dpll4_clkdm",
        .recalc         = &followparent_recalc,
 };
 
@@ -867,6 +838,9 @@ static struct dpll_data dpll5_dd = {
        .mult_div1_reg  = OMAP_CM_REGADDR(PLL_MOD, OMAP3430ES2_CM_CLKSEL4),
        .mult_mask      = OMAP3430ES2_PERIPH2_DPLL_MULT_MASK,
        .div1_mask      = OMAP3430ES2_PERIPH2_DPLL_DIV_MASK,
+       .clk_bypass     = &sys_ck,
+       .clk_ref        = &sys_ck,
+       .freqsel_mask   = OMAP3430ES2_PERIPH2_DPLL_FREQSEL_MASK,
        .control_reg    = OMAP_CM_REGADDR(PLL_MOD, OMAP3430ES2_CM_CLKEN2),
        .enable_mask    = OMAP3430ES2_EN_PERIPH2_DPLL_MASK,
        .modes          = (1 << DPLL_LOW_POWER_STOP) | (1 << DPLL_LOCKED),
@@ -876,20 +850,21 @@ static struct dpll_data dpll5_dd = {
        .autoidle_reg   = OMAP_CM_REGADDR(PLL_MOD, OMAP3430ES2_CM_AUTOIDLE2_PLL),
        .autoidle_mask  = OMAP3430ES2_AUTO_PERIPH2_DPLL_MASK,
        .idlest_reg     = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST2),
-       .idlest_bit     = OMAP3430ES2_ST_PERIPH2_CLK_SHIFT,
+       .idlest_mask    = OMAP3430ES2_ST_PERIPH2_CLK_MASK,
        .max_multiplier = OMAP3_MAX_DPLL_MULT,
+       .min_divider    = 1,
        .max_divider    = OMAP3_MAX_DPLL_DIV,
        .rate_tolerance = DEFAULT_DPLL_RATE_TOLERANCE
 };
 
 static struct clk dpll5_ck = {
        .name           = "dpll5_ck",
+       .ops            = &clkops_noncore_dpll_ops,
        .parent         = &sys_ck,
        .dpll_data      = &dpll5_dd,
-       .flags          = CLOCK_IN_OMAP3430ES2 | RATE_PROPAGATES,
-       .enable         = &omap3_noncore_dpll_enable,
-       .disable        = &omap3_noncore_dpll_disable,
        .round_rate     = &omap2_dpll_round_rate,
+       .set_rate       = &omap3_noncore_dpll_set_rate,
+       .clkdm_name     = "dpll5_clkdm",
        .recalc         = &omap3_dpll_recalc,
 };
 
@@ -900,31 +875,13 @@ static const struct clksel div16_dpll5_clksel[] = {
 
 static struct clk dpll5_m2_ck = {
        .name           = "dpll5_m2_ck",
+       .ops            = &clkops_null,
        .parent         = &dpll5_ck,
        .init           = &omap2_init_clksel_parent,
        .clksel_reg     = OMAP_CM_REGADDR(PLL_MOD, OMAP3430ES2_CM_CLKSEL5),
        .clksel_mask    = OMAP3430ES2_DIV_120M_MASK,
        .clksel         = div16_dpll5_clksel,
-       .flags          = CLOCK_IN_OMAP3430ES2 | RATE_PROPAGATES |
-                               PARENT_CONTROLS_CLOCK,
-       .recalc         = &omap2_clksel_recalc,
-};
-
-static const struct clksel omap_120m_fck_clksel[] = {
-       { .parent = &sys_ck,      .rates = dpll_bypass_rates },
-       { .parent = &dpll5_m2_ck, .rates = dpll_locked_rates },
-       { .parent = NULL }
-};
-
-static struct clk omap_120m_fck = {
-       .name           = "omap_120m_fck",
-       .parent         = &dpll5_m2_ck,
-       .init           = &omap2_init_clksel_parent,
-       .clksel_reg     = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST2),
-       .clksel_mask    = OMAP3430ES2_ST_PERIPH2_CLK_MASK,
-       .clksel         = omap_120m_fck_clksel,
-       .flags          = CLOCK_IN_OMAP3430ES2 | RATE_PROPAGATES |
-                               PARENT_CONTROLS_CLOCK,
+       .clkdm_name     = "dpll5_clkdm",
        .recalc         = &omap2_clksel_recalc,
 };
 
@@ -951,22 +908,23 @@ static const struct clksel_rate clkout2_src_54m_rates[] = {
 };
 
 static const struct clksel clkout2_src_clksel[] = {
-       { .parent = &core_ck,             .rates = clkout2_src_core_rates },
-       { .parent = &sys_ck,              .rates = clkout2_src_sys_rates },
-       { .parent = &omap_96m_alwon_fck,  .rates = clkout2_src_96m_rates },
-       { .parent = &omap_54m_fck,        .rates = clkout2_src_54m_rates },
+       { .parent = &core_ck,           .rates = clkout2_src_core_rates },
+       { .parent = &sys_ck,            .rates = clkout2_src_sys_rates },
+       { .parent = &cm_96m_fck,        .rates = clkout2_src_96m_rates },
+       { .parent = &omap_54m_fck,      .rates = clkout2_src_54m_rates },
        { .parent = NULL }
 };
 
 static struct clk clkout2_src_ck = {
        .name           = "clkout2_src_ck",
+       .ops            = &clkops_omap2_dflt,
        .init           = &omap2_init_clksel_parent,
        .enable_reg     = OMAP3430_CM_CLKOUT_CTRL,
        .enable_bit     = OMAP3430_CLKOUT2_EN_SHIFT,
        .clksel_reg     = OMAP3430_CM_CLKOUT_CTRL,
        .clksel_mask    = OMAP3430_CLKOUT2SOURCE_MASK,
        .clksel         = clkout2_src_clksel,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES,
+       .clkdm_name     = "core_clkdm",
        .recalc         = &omap2_clksel_recalc,
 };
 
@@ -986,11 +944,11 @@ static const struct clksel sys_clkout2_clksel[] = {
 
 static struct clk sys_clkout2 = {
        .name           = "sys_clkout2",
+       .ops            = &clkops_null,
        .init           = &omap2_init_clksel_parent,
        .clksel_reg     = OMAP3430_CM_CLKOUT_CTRL,
        .clksel_mask    = OMAP3430_CLKOUT2_DIV_MASK,
        .clksel         = sys_clkout2_clksel,
-       .flags          = CLOCK_IN_OMAP343X | PARENT_CONTROLS_CLOCK,
        .recalc         = &omap2_clksel_recalc,
 };
 
@@ -998,16 +956,22 @@ static struct clk sys_clkout2 = {
 
 static struct clk corex2_fck = {
        .name           = "corex2_fck",
+       .ops            = &clkops_null,
        .parent         = &dpll3_m2x2_ck,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
-                               PARENT_CONTROLS_CLOCK,
        .recalc         = &followparent_recalc,
 };
 
 /* DPLL power domain clock controls */
 
-static const struct clksel div2_core_clksel[] = {
-       { .parent = &core_ck, .rates = div2_rates },
+static const struct clksel_rate div4_rates[] = {
+       { .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
+       { .div = 2, .val = 2, .flags = RATE_IN_343X },
+       { .div = 4, .val = 4, .flags = RATE_IN_343X },
+       { .div = 0 }
+};
+
+static const struct clksel div4_core_clksel[] = {
+       { .parent = &core_ck, .rates = div4_rates },
        { .parent = NULL }
 };
 
@@ -1017,39 +981,21 @@ static const struct clksel div2_core_clksel[] = {
  */
 static struct clk dpll1_fck = {
        .name           = "dpll1_fck",
+       .ops            = &clkops_null,
        .parent         = &core_ck,
        .init           = &omap2_init_clksel_parent,
        .clksel_reg     = OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_CLKSEL1_PLL),
        .clksel_mask    = OMAP3430_MPU_CLK_SRC_MASK,
-       .clksel         = div2_core_clksel,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
-                               PARENT_CONTROLS_CLOCK,
+       .clksel         = div4_core_clksel,
        .recalc         = &omap2_clksel_recalc,
 };
 
-/*
- * MPU clksel:
- * If DPLL1 is locked, mpu_ck derives from DPLL1; otherwise, mpu_ck
- * derives from the high-frequency bypass clock originating from DPLL3,
- * called 'dpll1_fck'
- */
-static const struct clksel mpu_clksel[] = {
-       { .parent = &dpll1_fck,     .rates = dpll_bypass_rates },
-       { .parent = &dpll1_x2m2_ck, .rates = dpll_locked_rates },
-       { .parent = NULL }
-};
-
 static struct clk mpu_ck = {
        .name           = "mpu_ck",
+       .ops            = &clkops_null,
        .parent         = &dpll1_x2m2_ck,
-       .init           = &omap2_init_clksel_parent,
-       .clksel_reg     = OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_IDLEST_PLL),
-       .clksel_mask    = OMAP3430_ST_MPU_CLK_MASK,
-       .clksel         = mpu_clksel,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
-                               PARENT_CONTROLS_CLOCK,
        .clkdm_name     = "mpu_clkdm",
-       .recalc         = &omap2_clksel_recalc,
+       .recalc         = &followparent_recalc,
 };
 
 /* arm_fck is divided by two when DPLL1 locked; otherwise, passthrough mpu_ck */
@@ -1066,13 +1012,12 @@ static const struct clksel arm_fck_clksel[] = {
 
 static struct clk arm_fck = {
        .name           = "arm_fck",
+       .ops            = &clkops_null,
        .parent         = &mpu_ck,
        .init           = &omap2_init_clksel_parent,
        .clksel_reg     = OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_IDLEST_PLL),
        .clksel_mask    = OMAP3430_ST_MPU_CLK_MASK,
        .clksel         = arm_fck_clksel,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
-                               PARENT_CONTROLS_CLOCK,
        .recalc         = &omap2_clksel_recalc,
 };
 
@@ -1084,63 +1029,48 @@ static struct clk arm_fck = {
  */
 static struct clk emu_mpu_alwon_ck = {
        .name           = "emu_mpu_alwon_ck",
+       .ops            = &clkops_null,
        .parent         = &mpu_ck,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
-                               PARENT_CONTROLS_CLOCK,
        .recalc         = &followparent_recalc,
 };
 
 static struct clk dpll2_fck = {
        .name           = "dpll2_fck",
+       .ops            = &clkops_null,
        .parent         = &core_ck,
        .init           = &omap2_init_clksel_parent,
        .clksel_reg     = OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, OMAP3430_CM_CLKSEL1_PLL),
        .clksel_mask    = OMAP3430_IVA2_CLK_SRC_MASK,
-       .clksel         = div2_core_clksel,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
-                               PARENT_CONTROLS_CLOCK,
+       .clksel         = div4_core_clksel,
        .recalc         = &omap2_clksel_recalc,
 };
 
-/*
- * IVA2 clksel:
- * If DPLL2 is locked, iva2_ck derives from DPLL2; otherwise, iva2_ck
- * derives from the high-frequency bypass clock originating from DPLL3,
- * called 'dpll2_fck'
- */
-
-static const struct clksel iva2_clksel[] = {
-       { .parent = &dpll2_fck,   .rates = dpll_bypass_rates },
-       { .parent = &dpll2_m2_ck, .rates = dpll_locked_rates },
-       { .parent = NULL }
-};
-
 static struct clk iva2_ck = {
        .name           = "iva2_ck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &dpll2_m2_ck,
        .init           = &omap2_init_clksel_parent,
        .enable_reg     = OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, CM_FCLKEN),
        .enable_bit     = OMAP3430_CM_FCLKEN_IVA2_EN_IVA2_SHIFT,
-       .clksel_reg     = OMAP_CM_REGADDR(OMAP3430_IVA2_MOD,
-                                         OMAP3430_CM_IDLEST_PLL),
-       .clksel_mask    = OMAP3430_ST_IVA2_CLK_MASK,
-       .clksel         = iva2_clksel,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES,
        .clkdm_name     = "iva2_clkdm",
-       .recalc         = &omap2_clksel_recalc,
+       .recalc         = &followparent_recalc,
 };
 
 /* Common interface clocks */
 
+static const struct clksel div2_core_clksel[] = {
+       { .parent = &core_ck, .rates = div2_rates },
+       { .parent = NULL }
+};
+
 static struct clk l3_ick = {
        .name           = "l3_ick",
+       .ops            = &clkops_null,
        .parent         = &core_ck,
        .init           = &omap2_init_clksel_parent,
        .clksel_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL),
        .clksel_mask    = OMAP3430_CLKSEL_L3_MASK,
        .clksel         = div2_core_clksel,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
-                               PARENT_CONTROLS_CLOCK,
        .clkdm_name     = "core_l3_clkdm",
        .recalc         = &omap2_clksel_recalc,
 };
@@ -1152,13 +1082,12 @@ static const struct clksel div2_l3_clksel[] = {
 
 static struct clk l4_ick = {
        .name           = "l4_ick",
+       .ops            = &clkops_null,
        .parent         = &l3_ick,
        .init           = &omap2_init_clksel_parent,
        .clksel_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL),
        .clksel_mask    = OMAP3430_CLKSEL_L4_MASK,
        .clksel         = div2_l3_clksel,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
-                               PARENT_CONTROLS_CLOCK,
        .clkdm_name     = "core_l4_clkdm",
        .recalc         = &omap2_clksel_recalc,
 
@@ -1171,12 +1100,12 @@ static const struct clksel div2_l4_clksel[] = {
 
 static struct clk rm_ick = {
        .name           = "rm_ick",
+       .ops            = &clkops_null,
        .parent         = &l4_ick,
        .init           = &omap2_init_clksel_parent,
        .clksel_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_CLKSEL),
        .clksel_mask    = OMAP3430_CLKSEL_RM_MASK,
        .clksel         = div2_l4_clksel,
-       .flags          = CLOCK_IN_OMAP343X | PARENT_CONTROLS_CLOCK,
        .recalc         = &omap2_clksel_recalc,
 };
 
@@ -1192,53 +1121,52 @@ static const struct clksel gfx_l3_clksel[] = {
 /* Virtual parent clock for gfx_l3_ick and gfx_l3_fck */
 static struct clk gfx_l3_ck = {
        .name           = "gfx_l3_ck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &l3_ick,
        .init           = &omap2_init_clksel_parent,
        .enable_reg     = OMAP_CM_REGADDR(GFX_MOD, CM_ICLKEN),
        .enable_bit     = OMAP_EN_GFX_SHIFT,
-       .flags          = CLOCK_IN_OMAP3430ES1,
        .recalc         = &followparent_recalc,
 };
 
 static struct clk gfx_l3_fck = {
        .name           = "gfx_l3_fck",
+       .ops            = &clkops_null,
        .parent         = &gfx_l3_ck,
        .init           = &omap2_init_clksel_parent,
        .clksel_reg     = OMAP_CM_REGADDR(GFX_MOD, CM_CLKSEL),
        .clksel_mask    = OMAP_CLKSEL_GFX_MASK,
        .clksel         = gfx_l3_clksel,
-       .flags          = CLOCK_IN_OMAP3430ES1 | RATE_PROPAGATES |
-                               PARENT_CONTROLS_CLOCK,
        .clkdm_name     = "gfx_3430es1_clkdm",
        .recalc         = &omap2_clksel_recalc,
 };
 
 static struct clk gfx_l3_ick = {
        .name           = "gfx_l3_ick",
+       .ops            = &clkops_null,
        .parent         = &gfx_l3_ck,
-       .flags          = CLOCK_IN_OMAP3430ES1 | PARENT_CONTROLS_CLOCK,
        .clkdm_name     = "gfx_3430es1_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk gfx_cg1_ck = {
        .name           = "gfx_cg1_ck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &gfx_l3_fck, /* REVISIT: correct? */
        .init           = &omap2_init_clk_clkdm,
        .enable_reg     = OMAP_CM_REGADDR(GFX_MOD, CM_FCLKEN),
        .enable_bit     = OMAP3430ES1_EN_2D_SHIFT,
-       .flags          = CLOCK_IN_OMAP3430ES1,
        .clkdm_name     = "gfx_3430es1_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk gfx_cg2_ck = {
        .name           = "gfx_cg2_ck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &gfx_l3_fck, /* REVISIT: correct? */
        .init           = &omap2_init_clk_clkdm,
        .enable_reg     = OMAP_CM_REGADDR(GFX_MOD, CM_FCLKEN),
        .enable_bit     = OMAP3430ES1_EN_3D_SHIFT,
-       .flags          = CLOCK_IN_OMAP3430ES1,
        .clkdm_name     = "gfx_3430es1_clkdm",
        .recalc         = &followparent_recalc,
 };
@@ -1265,24 +1193,24 @@ static const struct clksel sgx_clksel[] = {
 
 static struct clk sgx_fck = {
        .name           = "sgx_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .init           = &omap2_init_clksel_parent,
        .enable_reg     = OMAP_CM_REGADDR(OMAP3430ES2_SGX_MOD, CM_FCLKEN),
-       .enable_bit     = OMAP3430ES2_EN_SGX_SHIFT,
+       .enable_bit     = OMAP3430ES2_CM_FCLKEN_SGX_EN_SGX_SHIFT,
        .clksel_reg     = OMAP_CM_REGADDR(OMAP3430ES2_SGX_MOD, CM_CLKSEL),
        .clksel_mask    = OMAP3430ES2_CLKSEL_SGX_MASK,
        .clksel         = sgx_clksel,
-       .flags          = CLOCK_IN_OMAP3430ES2,
        .clkdm_name     = "sgx_clkdm",
        .recalc         = &omap2_clksel_recalc,
 };
 
 static struct clk sgx_ick = {
        .name           = "sgx_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &l3_ick,
        .init           = &omap2_init_clk_clkdm,
        .enable_reg     = OMAP_CM_REGADDR(OMAP3430ES2_SGX_MOD, CM_ICLKEN),
-       .enable_bit     = OMAP3430ES2_EN_SGX_SHIFT,
-       .flags          = CLOCK_IN_OMAP3430ES2,
+       .enable_bit     = OMAP3430ES2_CM_ICLKEN_SGX_EN_SGX_SHIFT,
        .clkdm_name     = "sgx_clkdm",
        .recalc         = &followparent_recalc,
 };
@@ -1291,11 +1219,11 @@ static struct clk sgx_ick = {
 
 static struct clk d2d_26m_fck = {
        .name           = "d2d_26m_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &sys_ck,
        .init           = &omap2_init_clk_clkdm,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP3430ES1_EN_D2D_SHIFT,
-       .flags          = CLOCK_IN_OMAP3430ES1,
        .clkdm_name     = "d2d_clkdm",
        .recalc         = &followparent_recalc,
 };
@@ -1308,6 +1236,7 @@ static const struct clksel omap343x_gpt_clksel[] = {
 
 static struct clk gpt10_fck = {
        .name           = "gpt10_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &sys_ck,
        .init           = &omap2_init_clksel_parent,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
@@ -1315,13 +1244,13 @@ static struct clk gpt10_fck = {
        .clksel_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL),
        .clksel_mask    = OMAP3430_CLKSEL_GPT10_MASK,
        .clksel         = omap343x_gpt_clksel,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "core_l4_clkdm",
        .recalc         = &omap2_clksel_recalc,
 };
 
 static struct clk gpt11_fck = {
        .name           = "gpt11_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &sys_ck,
        .init           = &omap2_init_clksel_parent,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
@@ -1329,35 +1258,34 @@ static struct clk gpt11_fck = {
        .clksel_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL),
        .clksel_mask    = OMAP3430_CLKSEL_GPT11_MASK,
        .clksel         = omap343x_gpt_clksel,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "core_l4_clkdm",
        .recalc         = &omap2_clksel_recalc,
 };
 
 static struct clk cpefuse_fck = {
        .name           = "cpefuse_fck",
+       .ops            = &clkops_omap2_dflt,
        .parent         = &sys_ck,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP3430ES2_CM_FCLKEN3),
        .enable_bit     = OMAP3430ES2_EN_CPEFUSE_SHIFT,
-       .flags          = CLOCK_IN_OMAP3430ES2,
        .recalc         = &followparent_recalc,
 };
 
 static struct clk ts_fck = {
        .name           = "ts_fck",
+       .ops            = &clkops_omap2_dflt,
        .parent         = &omap_32k_fck,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP3430ES2_CM_FCLKEN3),
        .enable_bit     = OMAP3430ES2_EN_TS_SHIFT,
-       .flags          = CLOCK_IN_OMAP3430ES2,
        .recalc         = &followparent_recalc,
 };
 
 static struct clk usbtll_fck = {
        .name           = "usbtll_fck",
-       .parent         = &omap_120m_fck,
+       .ops            = &clkops_omap2_dflt,
+       .parent         = &dpll5_m2_ck,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP3430ES2_CM_FCLKEN3),
        .enable_bit     = OMAP3430ES2_EN_USBTLL_SHIFT,
-       .flags          = CLOCK_IN_OMAP3430ES2,
        .recalc         = &followparent_recalc,
 };
 
@@ -1365,84 +1293,83 @@ static struct clk usbtll_fck = {
 
 static struct clk core_96m_fck = {
        .name           = "core_96m_fck",
+       .ops            = &clkops_null,
        .parent         = &omap_96m_fck,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
-                               PARENT_CONTROLS_CLOCK,
        .clkdm_name     = "core_l4_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk mmchs3_fck = {
        .name           = "mmchs_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 2,
        .parent         = &core_96m_fck,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP3430ES2_EN_MMC3_SHIFT,
-       .flags          = CLOCK_IN_OMAP3430ES2,
        .clkdm_name     = "core_l4_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk mmchs2_fck = {
        .name           = "mmchs_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 1,
        .parent         = &core_96m_fck,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP3430_EN_MMC2_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "core_l4_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk mspro_fck = {
        .name           = "mspro_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &core_96m_fck,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP3430_EN_MSPRO_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "core_l4_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk mmchs1_fck = {
        .name           = "mmchs_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &core_96m_fck,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP3430_EN_MMC1_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "core_l4_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk i2c3_fck = {
        .name           = "i2c_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 3,
        .parent         = &core_96m_fck,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP3430_EN_I2C3_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "core_l4_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk i2c2_fck = {
        .name           = "i2c_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 2,
        .parent         = &core_96m_fck,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP3430_EN_I2C2_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "core_l4_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk i2c1_fck = {
        .name           = "i2c_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 1,
        .parent         = &core_96m_fck,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP3430_EN_I2C1_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "core_l4_clkdm",
        .recalc         = &followparent_recalc,
 };
@@ -1469,6 +1396,7 @@ static const struct clksel mcbsp_15_clksel[] = {
 
 static struct clk mcbsp5_fck = {
        .name           = "mcbsp_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 5,
        .init           = &omap2_init_clksel_parent,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
@@ -1476,13 +1404,13 @@ static struct clk mcbsp5_fck = {
        .clksel_reg     = OMAP343X_CTRL_REGADDR(OMAP343X_CONTROL_DEVCONF1),
        .clksel_mask    = OMAP2_MCBSP5_CLKS_MASK,
        .clksel         = mcbsp_15_clksel,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "core_l4_clkdm",
        .recalc         = &omap2_clksel_recalc,
 };
 
 static struct clk mcbsp1_fck = {
        .name           = "mcbsp_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 1,
        .init           = &omap2_init_clksel_parent,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
@@ -1490,7 +1418,6 @@ static struct clk mcbsp1_fck = {
        .clksel_reg     = OMAP343X_CTRL_REGADDR(OMAP2_CONTROL_DEVCONF0),
        .clksel_mask    = OMAP2_MCBSP1_CLKS_MASK,
        .clksel         = mcbsp_15_clksel,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "core_l4_clkdm",
        .recalc         = &omap2_clksel_recalc,
 };
@@ -1499,77 +1426,76 @@ static struct clk mcbsp1_fck = {
 
 static struct clk core_48m_fck = {
        .name           = "core_48m_fck",
+       .ops            = &clkops_null,
        .parent         = &omap_48m_fck,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
-                               PARENT_CONTROLS_CLOCK,
        .clkdm_name     = "core_l4_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk mcspi4_fck = {
        .name           = "mcspi_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 4,
        .parent         = &core_48m_fck,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP3430_EN_MCSPI4_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .recalc         = &followparent_recalc,
 };
 
 static struct clk mcspi3_fck = {
        .name           = "mcspi_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 3,
        .parent         = &core_48m_fck,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP3430_EN_MCSPI3_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .recalc         = &followparent_recalc,
 };
 
 static struct clk mcspi2_fck = {
        .name           = "mcspi_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 2,
        .parent         = &core_48m_fck,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP3430_EN_MCSPI2_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .recalc         = &followparent_recalc,
 };
 
 static struct clk mcspi1_fck = {
        .name           = "mcspi_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 1,
        .parent         = &core_48m_fck,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP3430_EN_MCSPI1_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .recalc         = &followparent_recalc,
 };
 
 static struct clk uart2_fck = {
        .name           = "uart2_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &core_48m_fck,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP3430_EN_UART2_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .recalc         = &followparent_recalc,
 };
 
 static struct clk uart1_fck = {
        .name           = "uart1_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &core_48m_fck,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP3430_EN_UART1_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .recalc         = &followparent_recalc,
 };
 
 static struct clk fshostusb_fck = {
        .name           = "fshostusb_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &core_48m_fck,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP3430ES1_EN_FSHOSTUSB_SHIFT,
-       .flags          = CLOCK_IN_OMAP3430ES1,
        .recalc         = &followparent_recalc,
 };
 
@@ -1577,19 +1503,18 @@ static struct clk fshostusb_fck = {
 
 static struct clk core_12m_fck = {
        .name           = "core_12m_fck",
+       .ops            = &clkops_null,
        .parent         = &omap_12m_fck,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
-                               PARENT_CONTROLS_CLOCK,
        .clkdm_name     = "core_l4_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk hdq_fck = {
        .name           = "hdq_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &core_12m_fck,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP3430_EN_HDQ_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .recalc         = &followparent_recalc,
 };
 
@@ -1612,22 +1537,22 @@ static const struct clksel ssi_ssr_clksel[] = {
 
 static struct clk ssi_ssr_fck = {
        .name           = "ssi_ssr_fck",
+       .ops            = &clkops_omap2_dflt,
        .init           = &omap2_init_clksel_parent,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP3430_EN_SSI_SHIFT,
        .clksel_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL),
        .clksel_mask    = OMAP3430_CLKSEL_SSI_MASK,
        .clksel         = ssi_ssr_clksel,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES,
        .clkdm_name     = "core_l4_clkdm",
        .recalc         = &omap2_clksel_recalc,
 };
 
 static struct clk ssi_sst_fck = {
        .name           = "ssi_sst_fck",
+       .ops            = &clkops_null,
        .parent         = &ssi_ssr_fck,
        .fixed_div      = 2,
-       .flags          = CLOCK_IN_OMAP343X | PARENT_CONTROLS_CLOCK,
        .recalc         = &omap2_fixed_divisor_recalc,
 };
 
@@ -1641,39 +1566,39 @@ static struct clk ssi_sst_fck = {
  */
 static struct clk core_l3_ick = {
        .name           = "core_l3_ick",
+       .ops            = &clkops_null,
        .parent         = &l3_ick,
        .init           = &omap2_init_clk_clkdm,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
-                               PARENT_CONTROLS_CLOCK,
        .clkdm_name     = "core_l3_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk hsotgusb_ick = {
        .name           = "hsotgusb_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &core_l3_ick,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP3430_EN_HSOTGUSB_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "core_l3_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk sdrc_ick = {
        .name           = "sdrc_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &core_l3_ick,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP3430_EN_SDRC_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X | ENABLE_ON_INIT,
+       .flags          = ENABLE_ON_INIT,
        .clkdm_name     = "core_l3_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk gpmc_fck = {
        .name           = "gpmc_fck",
+       .ops            = &clkops_null,
        .parent         = &core_l3_ick,
-       .flags          = CLOCK_IN_OMAP343X | PARENT_CONTROLS_CLOCK |
-                               ENABLE_ON_INIT,
+       .flags          = ENABLE_ON_INIT, /* huh? */
        .clkdm_name     = "core_l3_clkdm",
        .recalc         = &followparent_recalc,
 };
@@ -1682,18 +1607,17 @@ static struct clk gpmc_fck = {
 
 static struct clk security_l3_ick = {
        .name           = "security_l3_ick",
+       .ops            = &clkops_null,
        .parent         = &l3_ick,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
-                               PARENT_CONTROLS_CLOCK,
        .recalc         = &followparent_recalc,
 };
 
 static struct clk pka_ick = {
        .name           = "pka_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &security_l3_ick,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
        .enable_bit     = OMAP3430_EN_PKA_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .recalc         = &followparent_recalc,
 };
 
@@ -1701,31 +1625,30 @@ static struct clk pka_ick = {
 
 static struct clk core_l4_ick = {
        .name           = "core_l4_ick",
+       .ops            = &clkops_null,
        .parent         = &l4_ick,
        .init           = &omap2_init_clk_clkdm,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
-                               PARENT_CONTROLS_CLOCK,
        .clkdm_name     = "core_l4_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk usbtll_ick = {
        .name           = "usbtll_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &core_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN3),
        .enable_bit     = OMAP3430ES2_EN_USBTLL_SHIFT,
-       .flags          = CLOCK_IN_OMAP3430ES2,
        .clkdm_name     = "core_l4_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk mmchs3_ick = {
        .name           = "mmchs_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 2,
        .parent         = &core_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP3430ES2_EN_MMC3_SHIFT,
-       .flags          = CLOCK_IN_OMAP3430ES2,
        .clkdm_name     = "core_l4_clkdm",
        .recalc         = &followparent_recalc,
 };
@@ -1733,250 +1656,251 @@ static struct clk mmchs3_ick = {
 /* Intersystem Communication Registers - chassis mode only */
 static struct clk icr_ick = {
        .name           = "icr_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &core_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP3430_EN_ICR_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "core_l4_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk aes2_ick = {
        .name           = "aes2_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &core_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP3430_EN_AES2_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "core_l4_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk sha12_ick = {
        .name           = "sha12_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &core_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP3430_EN_SHA12_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "core_l4_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk des2_ick = {
        .name           = "des2_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &core_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP3430_EN_DES2_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "core_l4_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk mmchs2_ick = {
        .name           = "mmchs_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 1,
        .parent         = &core_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP3430_EN_MMC2_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "core_l4_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk mmchs1_ick = {
        .name           = "mmchs_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &core_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP3430_EN_MMC1_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "core_l4_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk mspro_ick = {
        .name           = "mspro_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &core_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP3430_EN_MSPRO_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "core_l4_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk hdq_ick = {
        .name           = "hdq_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &core_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP3430_EN_HDQ_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "core_l4_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk mcspi4_ick = {
        .name           = "mcspi_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 4,
        .parent         = &core_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP3430_EN_MCSPI4_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "core_l4_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk mcspi3_ick = {
        .name           = "mcspi_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 3,
        .parent         = &core_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP3430_EN_MCSPI3_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "core_l4_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk mcspi2_ick = {
        .name           = "mcspi_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 2,
        .parent         = &core_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP3430_EN_MCSPI2_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "core_l4_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk mcspi1_ick = {
        .name           = "mcspi_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 1,
        .parent         = &core_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP3430_EN_MCSPI1_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "core_l4_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk i2c3_ick = {
        .name           = "i2c_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 3,
        .parent         = &core_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP3430_EN_I2C3_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "core_l4_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk i2c2_ick = {
        .name           = "i2c_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 2,
        .parent         = &core_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP3430_EN_I2C2_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "core_l4_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk i2c1_ick = {
        .name           = "i2c_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 1,
        .parent         = &core_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP3430_EN_I2C1_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "core_l4_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk uart2_ick = {
        .name           = "uart2_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &core_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP3430_EN_UART2_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "core_l4_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk uart1_ick = {
        .name           = "uart1_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &core_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP3430_EN_UART1_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "core_l4_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk gpt11_ick = {
        .name           = "gpt11_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &core_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP3430_EN_GPT11_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "core_l4_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk gpt10_ick = {
        .name           = "gpt10_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &core_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP3430_EN_GPT10_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "core_l4_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk mcbsp5_ick = {
        .name           = "mcbsp_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 5,
        .parent         = &core_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP3430_EN_MCBSP5_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "core_l4_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk mcbsp1_ick = {
        .name           = "mcbsp_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 1,
        .parent         = &core_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP3430_EN_MCBSP1_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "core_l4_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk fac_ick = {
        .name           = "fac_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &core_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP3430ES1_EN_FAC_SHIFT,
-       .flags          = CLOCK_IN_OMAP3430ES1,
        .clkdm_name     = "core_l4_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk mailboxes_ick = {
        .name           = "mailboxes_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &core_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP3430_EN_MAILBOXES_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "core_l4_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk omapctrl_ick = {
        .name           = "omapctrl_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &core_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP3430_EN_OMAPCTRL_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X | ENABLE_ON_INIT,
+       .flags          = ENABLE_ON_INIT,
        .recalc         = &followparent_recalc,
 };
 
@@ -1984,19 +1908,18 @@ static struct clk omapctrl_ick = {
 
 static struct clk ssi_l4_ick = {
        .name           = "ssi_l4_ick",
+       .ops            = &clkops_null,
        .parent         = &l4_ick,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
-                               PARENT_CONTROLS_CLOCK,
        .clkdm_name     = "core_l4_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk ssi_ick = {
        .name           = "ssi_ick",
+       .ops            = &clkops_omap2_dflt,
        .parent         = &ssi_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP3430_EN_SSI_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "core_l4_clkdm",
        .recalc         = &followparent_recalc,
 };
@@ -2011,6 +1934,7 @@ static const struct clksel usb_l4_clksel[] = {
 
 static struct clk usb_l4_ick = {
        .name           = "usb_l4_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &l4_ick,
        .init           = &omap2_init_clksel_parent,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -2018,7 +1942,6 @@ static struct clk usb_l4_ick = {
        .clksel_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL),
        .clksel_mask    = OMAP3430ES1_CLKSEL_FSHOSTUSB_MASK,
        .clksel         = usb_l4_clksel,
-       .flags          = CLOCK_IN_OMAP3430ES1,
        .recalc         = &omap2_clksel_recalc,
 };
 
@@ -2028,98 +1951,87 @@ static struct clk usb_l4_ick = {
 
 static struct clk security_l4_ick2 = {
        .name           = "security_l4_ick2",
+       .ops            = &clkops_null,
        .parent         = &l4_ick,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
-                               PARENT_CONTROLS_CLOCK,
        .recalc         = &followparent_recalc,
 };
 
 static struct clk aes1_ick = {
        .name           = "aes1_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &security_l4_ick2,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
        .enable_bit     = OMAP3430_EN_AES1_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .recalc         = &followparent_recalc,
 };
 
 static struct clk rng_ick = {
        .name           = "rng_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &security_l4_ick2,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
        .enable_bit     = OMAP3430_EN_RNG_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .recalc         = &followparent_recalc,
 };
 
 static struct clk sha11_ick = {
        .name           = "sha11_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &security_l4_ick2,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
        .enable_bit     = OMAP3430_EN_SHA11_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .recalc         = &followparent_recalc,
 };
 
 static struct clk des1_ick = {
        .name           = "des1_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &security_l4_ick2,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
        .enable_bit     = OMAP3430_EN_DES1_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .recalc         = &followparent_recalc,
 };
 
 /* DSS */
-static const struct clksel dss1_alwon_fck_clksel[] = {
-       { .parent = &sys_ck,        .rates = dpll_bypass_rates },
-       { .parent = &dpll4_m4x2_ck, .rates = dpll_locked_rates },
-       { .parent = NULL }
-};
-
 static struct clk dss1_alwon_fck = {
        .name           = "dss1_alwon_fck",
+       .ops            = &clkops_omap2_dflt,
        .parent         = &dpll4_m4x2_ck,
-       .init           = &omap2_init_clksel_parent,
        .enable_reg     = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_FCLKEN),
        .enable_bit     = OMAP3430_EN_DSS1_SHIFT,
-       .clksel_reg     = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST),
-       .clksel_mask    = OMAP3430_ST_PERIPH_CLK_MASK,
-       .clksel         = dss1_alwon_fck_clksel,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "dss_clkdm",
-       .recalc         = &omap2_clksel_recalc,
+       .recalc         = &followparent_recalc,
 };
 
 static struct clk dss_tv_fck = {
        .name           = "dss_tv_fck",
+       .ops            = &clkops_omap2_dflt,
        .parent         = &omap_54m_fck,
        .init           = &omap2_init_clk_clkdm,
        .enable_reg     = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_FCLKEN),
        .enable_bit     = OMAP3430_EN_TV_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "dss_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk dss_96m_fck = {
        .name           = "dss_96m_fck",
+       .ops            = &clkops_omap2_dflt,
        .parent         = &omap_96m_fck,
        .init           = &omap2_init_clk_clkdm,
        .enable_reg     = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_FCLKEN),
        .enable_bit     = OMAP3430_EN_TV_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "dss_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk dss2_alwon_fck = {
        .name           = "dss2_alwon_fck",
+       .ops            = &clkops_omap2_dflt,
        .parent         = &sys_ck,
        .init           = &omap2_init_clk_clkdm,
        .enable_reg     = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_FCLKEN),
        .enable_bit     = OMAP3430_EN_DSS2_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "dss_clkdm",
        .recalc         = &followparent_recalc,
 };
@@ -2127,45 +2039,46 @@ static struct clk dss2_alwon_fck = {
 static struct clk dss_ick = {
        /* Handles both L3 and L4 clocks */
        .name           = "dss_ick",
+       .ops            = &clkops_omap2_dflt,
        .parent         = &l4_ick,
        .init           = &omap2_init_clk_clkdm,
        .enable_reg     = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_ICLKEN),
        .enable_bit     = OMAP3430_CM_ICLKEN_DSS_EN_DSS_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "dss_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 /* CAM */
 
-static const struct clksel cam_mclk_clksel[] = {
-       { .parent = &sys_ck,        .rates = dpll_bypass_rates },
-       { .parent = &dpll4_m5x2_ck, .rates = dpll_locked_rates },
-       { .parent = NULL }
-};
-
 static struct clk cam_mclk = {
        .name           = "cam_mclk",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &dpll4_m5x2_ck,
-       .init           = &omap2_init_clksel_parent,
-       .clksel_reg     = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST),
-       .clksel_mask    = OMAP3430_ST_PERIPH_CLK_MASK,
-       .clksel         = cam_mclk_clksel,
        .enable_reg     = OMAP_CM_REGADDR(OMAP3430_CAM_MOD, CM_FCLKEN),
        .enable_bit     = OMAP3430_EN_CAM_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "cam_clkdm",
-       .recalc         = &omap2_clksel_recalc,
+       .recalc         = &followparent_recalc,
 };
 
 static struct clk cam_ick = {
        /* Handles both L3 and L4 clocks */
        .name           = "cam_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &l4_ick,
        .init           = &omap2_init_clk_clkdm,
        .enable_reg     = OMAP_CM_REGADDR(OMAP3430_CAM_MOD, CM_ICLKEN),
        .enable_bit     = OMAP3430_EN_CAM_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
+       .clkdm_name     = "cam_clkdm",
+       .recalc         = &followparent_recalc,
+};
+
+static struct clk csi2_96m_fck = {
+       .name           = "csi2_96m_fck",
+       .ops            = &clkops_omap2_dflt_wait,
+       .parent         = &core_96m_fck,
+       .init           = &omap2_init_clk_clkdm,
+       .enable_reg     = OMAP_CM_REGADDR(OMAP3430_CAM_MOD, CM_FCLKEN),
+       .enable_bit     = OMAP3430_EN_CSI2_SHIFT,
        .clkdm_name     = "cam_clkdm",
        .recalc         = &followparent_recalc,
 };
@@ -2174,22 +2087,22 @@ static struct clk cam_ick = {
 
 static struct clk usbhost_120m_fck = {
        .name           = "usbhost_120m_fck",
-       .parent         = &omap_120m_fck,
+       .ops            = &clkops_omap2_dflt_wait,
+       .parent         = &dpll5_m2_ck,
        .init           = &omap2_init_clk_clkdm,
        .enable_reg     = OMAP_CM_REGADDR(OMAP3430ES2_USBHOST_MOD, CM_FCLKEN),
        .enable_bit     = OMAP3430ES2_EN_USBHOST2_SHIFT,
-       .flags          = CLOCK_IN_OMAP3430ES2,
        .clkdm_name     = "usbhost_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk usbhost_48m_fck = {
        .name           = "usbhost_48m_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &omap_48m_fck,
        .init           = &omap2_init_clk_clkdm,
        .enable_reg     = OMAP_CM_REGADDR(OMAP3430ES2_USBHOST_MOD, CM_FCLKEN),
        .enable_bit     = OMAP3430ES2_EN_USBHOST1_SHIFT,
-       .flags          = CLOCK_IN_OMAP3430ES2,
        .clkdm_name     = "usbhost_clkdm",
        .recalc         = &followparent_recalc,
 };
@@ -2197,22 +2110,11 @@ static struct clk usbhost_48m_fck = {
 static struct clk usbhost_ick = {
        /* Handles both L3 and L4 clocks */
        .name           = "usbhost_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &l4_ick,
        .init           = &omap2_init_clk_clkdm,
        .enable_reg     = OMAP_CM_REGADDR(OMAP3430ES2_USBHOST_MOD, CM_ICLKEN),
        .enable_bit     = OMAP3430ES2_EN_USBHOST_SHIFT,
-       .flags          = CLOCK_IN_OMAP3430ES2,
-       .clkdm_name     = "usbhost_clkdm",
-       .recalc         = &followparent_recalc,
-};
-
-static struct clk usbhost_sar_fck = {
-       .name           = "usbhost_sar_fck",
-       .parent         = &osc_sys_ck,
-       .init           = &omap2_init_clk_clkdm,
-       .enable_reg     = OMAP_PRM_REGADDR(OMAP3430ES2_USBHOST_MOD, PM_PWSTCTRL),
-       .enable_bit     = OMAP3430ES2_SAVEANDRESTORE_SHIFT,
-       .flags          = CLOCK_IN_OMAP3430ES2,
        .clkdm_name     = "usbhost_clkdm",
        .recalc         = &followparent_recalc,
 };
@@ -2237,7 +2139,7 @@ static const struct clksel_rate usim_120m_rates[] = {
 
 static const struct clksel usim_clksel[] = {
        { .parent = &omap_96m_fck,      .rates = usim_96m_rates },
-       { .parent = &omap_120m_fck,     .rates = usim_120m_rates },
+       { .parent = &dpll5_m2_ck,       .rates = usim_120m_rates },
        { .parent = &sys_ck,            .rates = div2_rates },
        { .parent = NULL },
 };
@@ -2245,63 +2147,63 @@ static const struct clksel usim_clksel[] = {
 /* 3430ES2 only */
 static struct clk usim_fck = {
        .name           = "usim_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .init           = &omap2_init_clksel_parent,
        .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
        .enable_bit     = OMAP3430ES2_EN_USIMOCP_SHIFT,
        .clksel_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_CLKSEL),
        .clksel_mask    = OMAP3430ES2_CLKSEL_USIMOCP_MASK,
        .clksel         = usim_clksel,
-       .flags          = CLOCK_IN_OMAP3430ES2,
        .recalc         = &omap2_clksel_recalc,
 };
 
 /* XXX should gpt1's clksel have wkup_32k_fck as the 32k opt? */
 static struct clk gpt1_fck = {
        .name           = "gpt1_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .init           = &omap2_init_clksel_parent,
        .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
        .enable_bit     = OMAP3430_EN_GPT1_SHIFT,
        .clksel_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_CLKSEL),
        .clksel_mask    = OMAP3430_CLKSEL_GPT1_MASK,
        .clksel         = omap343x_gpt_clksel,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "wkup_clkdm",
        .recalc         = &omap2_clksel_recalc,
 };
 
 static struct clk wkup_32k_fck = {
        .name           = "wkup_32k_fck",
+       .ops            = &clkops_null,
        .init           = &omap2_init_clk_clkdm,
        .parent         = &omap_32k_fck,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES | ALWAYS_ENABLED,
        .clkdm_name     = "wkup_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk gpio1_dbck = {
        .name           = "gpio1_dbck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &wkup_32k_fck,
        .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
        .enable_bit     = OMAP3430_EN_GPIO1_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "wkup_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk wdt2_fck = {
        .name           = "wdt2_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &wkup_32k_fck,
        .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
        .enable_bit     = OMAP3430_EN_WDT2_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "wkup_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk wkup_l4_ick = {
        .name           = "wkup_l4_ick",
+       .ops            = &clkops_null,
        .parent         = &sys_ck,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES | ALWAYS_ENABLED,
        .clkdm_name     = "wkup_clkdm",
        .recalc         = &followparent_recalc,
 };
@@ -2310,50 +2212,50 @@ static struct clk wkup_l4_ick = {
 /* Never specifically named in the TRM, so we have to infer a likely name */
 static struct clk usim_ick = {
        .name           = "usim_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &wkup_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
        .enable_bit     = OMAP3430ES2_EN_USIMOCP_SHIFT,
-       .flags          = CLOCK_IN_OMAP3430ES2,
        .clkdm_name     = "wkup_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk wdt2_ick = {
        .name           = "wdt2_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &wkup_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
        .enable_bit     = OMAP3430_EN_WDT2_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "wkup_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk wdt1_ick = {
        .name           = "wdt1_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &wkup_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
        .enable_bit     = OMAP3430_EN_WDT1_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "wkup_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk gpio1_ick = {
        .name           = "gpio1_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &wkup_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
        .enable_bit     = OMAP3430_EN_GPIO1_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "wkup_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk omap_32ksync_ick = {
        .name           = "omap_32ksync_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &wkup_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
        .enable_bit     = OMAP3430_EN_32KSYNC_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "wkup_clkdm",
        .recalc         = &followparent_recalc,
 };
@@ -2361,20 +2263,20 @@ static struct clk omap_32ksync_ick = {
 /* XXX This clock no longer exists in 3430 TRM rev F */
 static struct clk gpt12_ick = {
        .name           = "gpt12_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &wkup_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
        .enable_bit     = OMAP3430_EN_GPT12_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "wkup_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk gpt1_ick = {
        .name           = "gpt1_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &wkup_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
        .enable_bit     = OMAP3430_EN_GPT1_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "wkup_clkdm",
        .recalc         = &followparent_recalc,
 };
@@ -2385,406 +2287,404 @@ static struct clk gpt1_ick = {
 
 static struct clk per_96m_fck = {
        .name           = "per_96m_fck",
+       .ops            = &clkops_null,
        .parent         = &omap_96m_alwon_fck,
        .init           = &omap2_init_clk_clkdm,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
-                               PARENT_CONTROLS_CLOCK,
        .clkdm_name     = "per_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk per_48m_fck = {
        .name           = "per_48m_fck",
+       .ops            = &clkops_null,
        .parent         = &omap_48m_fck,
        .init           = &omap2_init_clk_clkdm,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
-                               PARENT_CONTROLS_CLOCK,
        .clkdm_name     = "per_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk uart3_fck = {
        .name           = "uart3_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &per_48m_fck,
        .enable_reg     = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
        .enable_bit     = OMAP3430_EN_UART3_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "per_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk gpt2_fck = {
        .name           = "gpt2_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .init           = &omap2_init_clksel_parent,
        .enable_reg     = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
        .enable_bit     = OMAP3430_EN_GPT2_SHIFT,
        .clksel_reg     = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
        .clksel_mask    = OMAP3430_CLKSEL_GPT2_MASK,
        .clksel         = omap343x_gpt_clksel,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "per_clkdm",
        .recalc         = &omap2_clksel_recalc,
 };
 
 static struct clk gpt3_fck = {
        .name           = "gpt3_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .init           = &omap2_init_clksel_parent,
        .enable_reg     = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
        .enable_bit     = OMAP3430_EN_GPT3_SHIFT,
        .clksel_reg     = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
        .clksel_mask    = OMAP3430_CLKSEL_GPT3_MASK,
        .clksel         = omap343x_gpt_clksel,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "per_clkdm",
        .recalc         = &omap2_clksel_recalc,
 };
 
 static struct clk gpt4_fck = {
        .name           = "gpt4_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .init           = &omap2_init_clksel_parent,
        .enable_reg     = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
        .enable_bit     = OMAP3430_EN_GPT4_SHIFT,
        .clksel_reg     = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
        .clksel_mask    = OMAP3430_CLKSEL_GPT4_MASK,
        .clksel         = omap343x_gpt_clksel,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "per_clkdm",
        .recalc         = &omap2_clksel_recalc,
 };
 
 static struct clk gpt5_fck = {
        .name           = "gpt5_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .init           = &omap2_init_clksel_parent,
        .enable_reg     = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
        .enable_bit     = OMAP3430_EN_GPT5_SHIFT,
        .clksel_reg     = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
        .clksel_mask    = OMAP3430_CLKSEL_GPT5_MASK,
        .clksel         = omap343x_gpt_clksel,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "per_clkdm",
        .recalc         = &omap2_clksel_recalc,
 };
 
 static struct clk gpt6_fck = {
        .name           = "gpt6_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .init           = &omap2_init_clksel_parent,
        .enable_reg     = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
        .enable_bit     = OMAP3430_EN_GPT6_SHIFT,
        .clksel_reg     = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
        .clksel_mask    = OMAP3430_CLKSEL_GPT6_MASK,
        .clksel         = omap343x_gpt_clksel,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "per_clkdm",
        .recalc         = &omap2_clksel_recalc,
 };
 
 static struct clk gpt7_fck = {
        .name           = "gpt7_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .init           = &omap2_init_clksel_parent,
        .enable_reg     = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
        .enable_bit     = OMAP3430_EN_GPT7_SHIFT,
        .clksel_reg     = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
        .clksel_mask    = OMAP3430_CLKSEL_GPT7_MASK,
        .clksel         = omap343x_gpt_clksel,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "per_clkdm",
        .recalc         = &omap2_clksel_recalc,
 };
 
 static struct clk gpt8_fck = {
        .name           = "gpt8_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .init           = &omap2_init_clksel_parent,
        .enable_reg     = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
        .enable_bit     = OMAP3430_EN_GPT8_SHIFT,
        .clksel_reg     = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
        .clksel_mask    = OMAP3430_CLKSEL_GPT8_MASK,
        .clksel         = omap343x_gpt_clksel,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "per_clkdm",
        .recalc         = &omap2_clksel_recalc,
 };
 
 static struct clk gpt9_fck = {
        .name           = "gpt9_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .init           = &omap2_init_clksel_parent,
        .enable_reg     = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
        .enable_bit     = OMAP3430_EN_GPT9_SHIFT,
        .clksel_reg     = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
        .clksel_mask    = OMAP3430_CLKSEL_GPT9_MASK,
        .clksel         = omap343x_gpt_clksel,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "per_clkdm",
        .recalc         = &omap2_clksel_recalc,
 };
 
 static struct clk per_32k_alwon_fck = {
        .name           = "per_32k_alwon_fck",
+       .ops            = &clkops_null,
        .parent         = &omap_32k_fck,
        .clkdm_name     = "per_clkdm",
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES | ALWAYS_ENABLED,
        .recalc         = &followparent_recalc,
 };
 
 static struct clk gpio6_dbck = {
        .name           = "gpio6_dbck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &per_32k_alwon_fck,
        .enable_reg     = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
        .enable_bit     = OMAP3430_EN_GPIO6_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "per_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk gpio5_dbck = {
        .name           = "gpio5_dbck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &per_32k_alwon_fck,
        .enable_reg     = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
        .enable_bit     = OMAP3430_EN_GPIO5_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "per_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk gpio4_dbck = {
        .name           = "gpio4_dbck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &per_32k_alwon_fck,
        .enable_reg     = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
        .enable_bit     = OMAP3430_EN_GPIO4_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "per_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk gpio3_dbck = {
        .name           = "gpio3_dbck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &per_32k_alwon_fck,
        .enable_reg     = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
        .enable_bit     = OMAP3430_EN_GPIO3_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "per_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk gpio2_dbck = {
        .name           = "gpio2_dbck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &per_32k_alwon_fck,
        .enable_reg     = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
        .enable_bit     = OMAP3430_EN_GPIO2_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "per_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk wdt3_fck = {
        .name           = "wdt3_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &per_32k_alwon_fck,
        .enable_reg     = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
        .enable_bit     = OMAP3430_EN_WDT3_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "per_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk per_l4_ick = {
        .name           = "per_l4_ick",
+       .ops            = &clkops_null,
        .parent         = &l4_ick,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
-                               PARENT_CONTROLS_CLOCK,
        .clkdm_name     = "per_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk gpio6_ick = {
        .name           = "gpio6_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &per_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
        .enable_bit     = OMAP3430_EN_GPIO6_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "per_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk gpio5_ick = {
        .name           = "gpio5_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &per_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
        .enable_bit     = OMAP3430_EN_GPIO5_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "per_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk gpio4_ick = {
        .name           = "gpio4_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &per_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
        .enable_bit     = OMAP3430_EN_GPIO4_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "per_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk gpio3_ick = {
        .name           = "gpio3_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &per_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
        .enable_bit     = OMAP3430_EN_GPIO3_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "per_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk gpio2_ick = {
        .name           = "gpio2_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &per_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
        .enable_bit     = OMAP3430_EN_GPIO2_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "per_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk wdt3_ick = {
        .name           = "wdt3_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &per_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
        .enable_bit     = OMAP3430_EN_WDT3_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "per_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk uart3_ick = {
        .name           = "uart3_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &per_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
        .enable_bit     = OMAP3430_EN_UART3_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "per_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk gpt9_ick = {
        .name           = "gpt9_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &per_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
        .enable_bit     = OMAP3430_EN_GPT9_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "per_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk gpt8_ick = {
        .name           = "gpt8_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &per_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
        .enable_bit     = OMAP3430_EN_GPT8_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "per_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk gpt7_ick = {
        .name           = "gpt7_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &per_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
        .enable_bit     = OMAP3430_EN_GPT7_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "per_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk gpt6_ick = {
        .name           = "gpt6_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &per_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
        .enable_bit     = OMAP3430_EN_GPT6_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "per_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk gpt5_ick = {
        .name           = "gpt5_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &per_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
        .enable_bit     = OMAP3430_EN_GPT5_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "per_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk gpt4_ick = {
        .name           = "gpt4_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &per_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
        .enable_bit     = OMAP3430_EN_GPT4_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "per_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk gpt3_ick = {
        .name           = "gpt3_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &per_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
        .enable_bit     = OMAP3430_EN_GPT3_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "per_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk gpt2_ick = {
        .name           = "gpt2_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &per_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
        .enable_bit     = OMAP3430_EN_GPT2_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "per_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk mcbsp2_ick = {
        .name           = "mcbsp_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 2,
        .parent         = &per_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
        .enable_bit     = OMAP3430_EN_MCBSP2_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "per_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk mcbsp3_ick = {
        .name           = "mcbsp_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 3,
        .parent         = &per_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
        .enable_bit     = OMAP3430_EN_MCBSP3_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "per_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static struct clk mcbsp4_ick = {
        .name           = "mcbsp_ick",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 4,
        .parent         = &per_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
        .enable_bit     = OMAP3430_EN_MCBSP4_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "per_clkdm",
        .recalc         = &followparent_recalc,
 };
 
 static const struct clksel mcbsp_234_clksel[] = {
-       { .parent = &per_96m_fck, .rates = common_mcbsp_96m_rates },
-       { .parent = &mcbsp_clks,  .rates = common_mcbsp_mcbsp_rates },
+       { .parent = &core_96m_fck, .rates = common_mcbsp_96m_rates },
+       { .parent = &mcbsp_clks,   .rates = common_mcbsp_mcbsp_rates },
        { .parent = NULL }
 };
 
 static struct clk mcbsp2_fck = {
        .name           = "mcbsp_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 2,
        .init           = &omap2_init_clksel_parent,
        .enable_reg     = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
@@ -2792,13 +2692,13 @@ static struct clk mcbsp2_fck = {
        .clksel_reg     = OMAP343X_CTRL_REGADDR(OMAP2_CONTROL_DEVCONF0),
        .clksel_mask    = OMAP2_MCBSP2_CLKS_MASK,
        .clksel         = mcbsp_234_clksel,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "per_clkdm",
        .recalc         = &omap2_clksel_recalc,
 };
 
 static struct clk mcbsp3_fck = {
        .name           = "mcbsp_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 3,
        .init           = &omap2_init_clksel_parent,
        .enable_reg     = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
@@ -2806,13 +2706,13 @@ static struct clk mcbsp3_fck = {
        .clksel_reg     = OMAP343X_CTRL_REGADDR(OMAP343X_CONTROL_DEVCONF1),
        .clksel_mask    = OMAP2_MCBSP3_CLKS_MASK,
        .clksel         = mcbsp_234_clksel,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "per_clkdm",
        .recalc         = &omap2_clksel_recalc,
 };
 
 static struct clk mcbsp4_fck = {
        .name           = "mcbsp_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .id             = 4,
        .init           = &omap2_init_clksel_parent,
        .enable_reg     = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
@@ -2820,7 +2720,6 @@ static struct clk mcbsp4_fck = {
        .clksel_reg     = OMAP343X_CTRL_REGADDR(OMAP343X_CONTROL_DEVCONF1),
        .clksel_mask    = OMAP2_MCBSP4_CLKS_MASK,
        .clksel         = mcbsp_234_clksel,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "per_clkdm",
        .recalc         = &omap2_clksel_recalc,
 };
@@ -2864,11 +2763,11 @@ static const struct clksel emu_src_clksel[] = {
  */
 static struct clk emu_src_ck = {
        .name           = "emu_src_ck",
+       .ops            = &clkops_null,
        .init           = &omap2_init_clksel_parent,
        .clksel_reg     = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
        .clksel_mask    = OMAP3430_MUX_CTRL_MASK,
        .clksel         = emu_src_clksel,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES | ALWAYS_ENABLED,
        .clkdm_name     = "emu_clkdm",
        .recalc         = &omap2_clksel_recalc,
 };
@@ -2888,11 +2787,11 @@ static const struct clksel pclk_emu_clksel[] = {
 
 static struct clk pclk_fck = {
        .name           = "pclk_fck",
+       .ops            = &clkops_null,
        .init           = &omap2_init_clksel_parent,
        .clksel_reg     = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
        .clksel_mask    = OMAP3430_CLKSEL_PCLK_MASK,
        .clksel         = pclk_emu_clksel,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES | ALWAYS_ENABLED,
        .clkdm_name     = "emu_clkdm",
        .recalc         = &omap2_clksel_recalc,
 };
@@ -2911,11 +2810,11 @@ static const struct clksel pclkx2_emu_clksel[] = {
 
 static struct clk pclkx2_fck = {
        .name           = "pclkx2_fck",
+       .ops            = &clkops_null,
        .init           = &omap2_init_clksel_parent,
        .clksel_reg     = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
        .clksel_mask    = OMAP3430_CLKSEL_PCLKX2_MASK,
        .clksel         = pclkx2_emu_clksel,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES | ALWAYS_ENABLED,
        .clkdm_name     = "emu_clkdm",
        .recalc         = &omap2_clksel_recalc,
 };
@@ -2927,22 +2826,22 @@ static const struct clksel atclk_emu_clksel[] = {
 
 static struct clk atclk_fck = {
        .name           = "atclk_fck",
+       .ops            = &clkops_null,
        .init           = &omap2_init_clksel_parent,
        .clksel_reg     = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
        .clksel_mask    = OMAP3430_CLKSEL_ATCLK_MASK,
        .clksel         = atclk_emu_clksel,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES | ALWAYS_ENABLED,
        .clkdm_name     = "emu_clkdm",
        .recalc         = &omap2_clksel_recalc,
 };
 
 static struct clk traceclk_src_fck = {
        .name           = "traceclk_src_fck",
+       .ops            = &clkops_null,
        .init           = &omap2_init_clksel_parent,
        .clksel_reg     = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
        .clksel_mask    = OMAP3430_TRACE_MUX_CTRL_MASK,
        .clksel         = emu_src_clksel,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES | ALWAYS_ENABLED,
        .clkdm_name     = "emu_clkdm",
        .recalc         = &omap2_clksel_recalc,
 };
@@ -2961,11 +2860,11 @@ static const struct clksel traceclk_clksel[] = {
 
 static struct clk traceclk_fck = {
        .name           = "traceclk_fck",
+       .ops            = &clkops_null,
        .init           = &omap2_init_clksel_parent,
        .clksel_reg     = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
        .clksel_mask    = OMAP3430_CLKSEL_TRACECLK_MASK,
        .clksel         = traceclk_clksel,
-       .flags          = CLOCK_IN_OMAP343X | ALWAYS_ENABLED,
        .clkdm_name     = "emu_clkdm",
        .recalc         = &omap2_clksel_recalc,
 };
@@ -2975,27 +2874,27 @@ static struct clk traceclk_fck = {
 /* SmartReflex fclk (VDD1) */
 static struct clk sr1_fck = {
        .name           = "sr1_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &sys_ck,
        .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
        .enable_bit     = OMAP3430_EN_SR1_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES,
        .recalc         = &followparent_recalc,
 };
 
 /* SmartReflex fclk (VDD2) */
 static struct clk sr2_fck = {
        .name           = "sr2_fck",
+       .ops            = &clkops_omap2_dflt_wait,
        .parent         = &sys_ck,
        .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
        .enable_bit     = OMAP3430_EN_SR2_SHIFT,
-       .flags          = CLOCK_IN_OMAP343X | RATE_PROPAGATES,
        .recalc         = &followparent_recalc,
 };
 
 static struct clk sr_l4_ick = {
        .name           = "sr_l4_ick",
+       .ops            = &clkops_null, /* RMK: missing? */
        .parent         = &l4_ick,
-       .flags          = CLOCK_IN_OMAP343X,
        .clkdm_name     = "core_l4_clkdm",
        .recalc         = &followparent_recalc,
 };
@@ -3005,231 +2904,16 @@ static struct clk sr_l4_ick = {
 /* XXX This clock no longer exists in 3430 TRM rev F */
 static struct clk gpt12_fck = {
        .name           = "gpt12_fck",
+       .ops            = &clkops_null,
        .parent         = &secure_32k_fck,
-       .flags          = CLOCK_IN_OMAP343X | ALWAYS_ENABLED,
        .recalc         = &followparent_recalc,
 };
 
 static struct clk wdt1_fck = {
        .name           = "wdt1_fck",
+       .ops            = &clkops_null,
        .parent         = &secure_32k_fck,
-       .flags          = CLOCK_IN_OMAP343X | ALWAYS_ENABLED,
-       .recalc         = &followparent_recalc,
-};
-
-static struct clk *onchip_34xx_clks[] __initdata = {
-       &omap_32k_fck,
-       &virt_12m_ck,
-       &virt_13m_ck,
-       &virt_16_8m_ck,
-       &virt_19_2m_ck,
-       &virt_26m_ck,
-       &virt_38_4m_ck,
-       &osc_sys_ck,
-       &sys_ck,
-       &sys_altclk,
-       &mcbsp_clks,
-       &sys_clkout1,
-       &dpll1_ck,
-       &dpll1_x2_ck,
-       &dpll1_x2m2_ck,
-       &dpll2_ck,
-       &dpll2_m2_ck,
-       &dpll3_ck,
-       &core_ck,
-       &dpll3_x2_ck,
-       &dpll3_m2_ck,
-       &dpll3_m2x2_ck,
-       &dpll3_m3_ck,
-       &dpll3_m3x2_ck,
-       &emu_core_alwon_ck,
-       &dpll4_ck,
-       &dpll4_x2_ck,
-       &omap_96m_alwon_fck,
-       &omap_96m_fck,
-       &cm_96m_fck,
-       &virt_omap_54m_fck,
-       &omap_54m_fck,
-       &omap_48m_fck,
-       &omap_12m_fck,
-       &dpll4_m2_ck,
-       &dpll4_m2x2_ck,
-       &dpll4_m3_ck,
-       &dpll4_m3x2_ck,
-       &dpll4_m4_ck,
-       &dpll4_m4x2_ck,
-       &dpll4_m5_ck,
-       &dpll4_m5x2_ck,
-       &dpll4_m6_ck,
-       &dpll4_m6x2_ck,
-       &emu_per_alwon_ck,
-       &dpll5_ck,
-       &dpll5_m2_ck,
-       &omap_120m_fck,
-       &clkout2_src_ck,
-       &sys_clkout2,
-       &corex2_fck,
-       &dpll1_fck,
-       &mpu_ck,
-       &arm_fck,
-       &emu_mpu_alwon_ck,
-       &dpll2_fck,
-       &iva2_ck,
-       &l3_ick,
-       &l4_ick,
-       &rm_ick,
-       &gfx_l3_ck,
-       &gfx_l3_fck,
-       &gfx_l3_ick,
-       &gfx_cg1_ck,
-       &gfx_cg2_ck,
-       &sgx_fck,
-       &sgx_ick,
-       &d2d_26m_fck,
-       &gpt10_fck,
-       &gpt11_fck,
-       &cpefuse_fck,
-       &ts_fck,
-       &usbtll_fck,
-       &core_96m_fck,
-       &mmchs3_fck,
-       &mmchs2_fck,
-       &mspro_fck,
-       &mmchs1_fck,
-       &i2c3_fck,
-       &i2c2_fck,
-       &i2c1_fck,
-       &mcbsp5_fck,
-       &mcbsp1_fck,
-       &core_48m_fck,
-       &mcspi4_fck,
-       &mcspi3_fck,
-       &mcspi2_fck,
-       &mcspi1_fck,
-       &uart2_fck,
-       &uart1_fck,
-       &fshostusb_fck,
-       &core_12m_fck,
-       &hdq_fck,
-       &ssi_ssr_fck,
-       &ssi_sst_fck,
-       &core_l3_ick,
-       &hsotgusb_ick,
-       &sdrc_ick,
-       &gpmc_fck,
-       &security_l3_ick,
-       &pka_ick,
-       &core_l4_ick,
-       &usbtll_ick,
-       &mmchs3_ick,
-       &icr_ick,
-       &aes2_ick,
-       &sha12_ick,
-       &des2_ick,
-       &mmchs2_ick,
-       &mmchs1_ick,
-       &mspro_ick,
-       &hdq_ick,
-       &mcspi4_ick,
-       &mcspi3_ick,
-       &mcspi2_ick,
-       &mcspi1_ick,
-       &i2c3_ick,
-       &i2c2_ick,
-       &i2c1_ick,
-       &uart2_ick,
-       &uart1_ick,
-       &gpt11_ick,
-       &gpt10_ick,
-       &mcbsp5_ick,
-       &mcbsp1_ick,
-       &fac_ick,
-       &mailboxes_ick,
-       &omapctrl_ick,
-       &ssi_l4_ick,
-       &ssi_ick,
-       &usb_l4_ick,
-       &security_l4_ick2,
-       &aes1_ick,
-       &rng_ick,
-       &sha11_ick,
-       &des1_ick,
-       &dss1_alwon_fck,
-       &dss_tv_fck,
-       &dss_96m_fck,
-       &dss2_alwon_fck,
-       &dss_ick,
-       &cam_mclk,
-       &cam_ick,
-       &usbhost_120m_fck,
-       &usbhost_48m_fck,
-       &usbhost_ick,
-       &usbhost_sar_fck,
-       &usim_fck,
-       &gpt1_fck,
-       &wkup_32k_fck,
-       &gpio1_dbck,
-       &wdt2_fck,
-       &wkup_l4_ick,
-       &usim_ick,
-       &wdt2_ick,
-       &wdt1_ick,
-       &gpio1_ick,
-       &omap_32ksync_ick,
-       &gpt12_ick,
-       &gpt1_ick,
-       &per_96m_fck,
-       &per_48m_fck,
-       &uart3_fck,
-       &gpt2_fck,
-       &gpt3_fck,
-       &gpt4_fck,
-       &gpt5_fck,
-       &gpt6_fck,
-       &gpt7_fck,
-       &gpt8_fck,
-       &gpt9_fck,
-       &per_32k_alwon_fck,
-       &gpio6_dbck,
-       &gpio5_dbck,
-       &gpio4_dbck,
-       &gpio3_dbck,
-       &gpio2_dbck,
-       &wdt3_fck,
-       &per_l4_ick,
-       &gpio6_ick,
-       &gpio5_ick,
-       &gpio4_ick,
-       &gpio3_ick,
-       &gpio2_ick,
-       &wdt3_ick,
-       &uart3_ick,
-       &gpt9_ick,
-       &gpt8_ick,
-       &gpt7_ick,
-       &gpt6_ick,
-       &gpt5_ick,
-       &gpt4_ick,
-       &gpt3_ick,
-       &gpt2_ick,
-       &mcbsp2_ick,
-       &mcbsp3_ick,
-       &mcbsp4_ick,
-       &mcbsp2_fck,
-       &mcbsp3_fck,
-       &mcbsp4_fck,
-       &emu_src_ck,
-       &pclk_fck,
-       &pclkx2_fck,
-       &atclk_fck,
-       &traceclk_src_fck,
-       &traceclk_fck,
-       &sr1_fck,
-       &sr2_fck,
-       &sr_l4_ick,
-       &secure_32k_fck,
-       &gpt12_fck,
-       &wdt1_fck,
+       .recalc         = &followparent_recalc,
 };
 
 #endif
index 4c3ce9cfd9480f9b4974a671498513e74ee1cc5f..0e7d501865b602c41f65c5e13693fc078fe5ef05 100644 (file)
@@ -22,6 +22,7 @@
 #include <linux/delay.h>
 #include <linux/clk.h>
 #include <linux/limits.h>
+#include <linux/err.h>
 
 #include <linux/io.h>
 
@@ -71,16 +72,13 @@ static void _autodep_lookup(struct clkdm_pwrdm_autodep *autodep)
        if (!omap_chip_is(autodep->omap_chip))
                return;
 
-       pwrdm = pwrdm_lookup(autodep->pwrdm_name);
+       pwrdm = pwrdm_lookup(autodep->pwrdm.name);
        if (!pwrdm) {
-               pr_debug("clockdomain: _autodep_lookup: powerdomain %s "
-                        "does not exist\n", autodep->pwrdm_name);
-               WARN_ON(1);
-               return;
+               pr_err("clockdomain: autodeps: powerdomain %s does not exist\n",
+                        autodep->pwrdm.name);
+               pwrdm = ERR_PTR(-ENOENT);
        }
-       autodep->pwrdm = pwrdm;
-
-       return;
+       autodep->pwrdm.ptr = pwrdm;
 }
 
 /*
@@ -95,16 +93,19 @@ static void _clkdm_add_autodeps(struct clockdomain *clkdm)
 {
        struct clkdm_pwrdm_autodep *autodep;
 
-       for (autodep = autodeps; autodep->pwrdm_name; autodep++) {
-               if (!autodep->pwrdm)
+       for (autodep = autodeps; autodep->pwrdm.ptr; autodep++) {
+               if (IS_ERR(autodep->pwrdm.ptr))
+                       continue;
+
+               if (!omap_chip_is(autodep->omap_chip))
                        continue;
 
                pr_debug("clockdomain: adding %s sleepdep/wkdep for "
-                        "pwrdm %s\n", autodep->pwrdm_name,
-                        clkdm->pwrdm->name);
+                        "pwrdm %s\n", autodep->pwrdm.ptr->name,
+                        clkdm->pwrdm.ptr->name);
 
-               pwrdm_add_sleepdep(clkdm->pwrdm, autodep->pwrdm);
-               pwrdm_add_wkdep(clkdm->pwrdm, autodep->pwrdm);
+               pwrdm_add_sleepdep(clkdm->pwrdm.ptr, autodep->pwrdm.ptr);
+               pwrdm_add_wkdep(clkdm->pwrdm.ptr, autodep->pwrdm.ptr);
        }
 }
 
@@ -120,16 +121,19 @@ static void _clkdm_del_autodeps(struct clockdomain *clkdm)
 {
        struct clkdm_pwrdm_autodep *autodep;
 
-       for (autodep = autodeps; autodep->pwrdm_name; autodep++) {
-               if (!autodep->pwrdm)
+       for (autodep = autodeps; autodep->pwrdm.ptr; autodep++) {
+               if (IS_ERR(autodep->pwrdm.ptr))
+                       continue;
+
+               if (!omap_chip_is(autodep->omap_chip))
                        continue;
 
                pr_debug("clockdomain: removing %s sleepdep/wkdep for "
-                        "pwrdm %s\n", autodep->pwrdm_name,
-                        clkdm->pwrdm->name);
+                        "pwrdm %s\n", autodep->pwrdm.ptr->name,
+                        clkdm->pwrdm.ptr->name);
 
-               pwrdm_del_sleepdep(clkdm->pwrdm, autodep->pwrdm);
-               pwrdm_del_wkdep(clkdm->pwrdm, autodep->pwrdm);
+               pwrdm_del_sleepdep(clkdm->pwrdm.ptr, autodep->pwrdm.ptr);
+               pwrdm_del_wkdep(clkdm->pwrdm.ptr, autodep->pwrdm.ptr);
        }
 }
 
@@ -179,7 +183,7 @@ void clkdm_init(struct clockdomain **clkdms,
 
        autodeps = init_autodeps;
        if (autodeps)
-               for (autodep = autodeps; autodep->pwrdm_name; autodep++)
+               for (autodep = autodeps; autodep->pwrdm.ptr; autodep++)
                        _autodep_lookup(autodep);
 }
 
@@ -202,20 +206,20 @@ int clkdm_register(struct clockdomain *clkdm)
        if (!omap_chip_is(clkdm->omap_chip))
                return -EINVAL;
 
-       pwrdm = pwrdm_lookup(clkdm->pwrdm_name);
+       pwrdm = pwrdm_lookup(clkdm->pwrdm.name);
        if (!pwrdm) {
-               pr_debug("clockdomain: clkdm_register %s: powerdomain %s "
-                        "does not exist\n", clkdm->name, clkdm->pwrdm_name);
+               pr_err("clockdomain: %s: powerdomain %s does not exist\n",
+                       clkdm->name, clkdm->pwrdm.name);
                return -EINVAL;
        }
-       clkdm->pwrdm = pwrdm;
+       clkdm->pwrdm.ptr = pwrdm;
 
        mutex_lock(&clkdm_mutex);
        /* Verify that the clockdomain is not already registered */
        if (_clkdm_lookup(clkdm->name)) {
                ret = -EEXIST;
                goto cr_unlock;
-       };
+       }
 
        list_add(&clkdm->node, &clkdm_list);
 
@@ -242,7 +246,7 @@ int clkdm_unregister(struct clockdomain *clkdm)
        if (!clkdm)
                return -EINVAL;
 
-       pwrdm_del_clkdm(clkdm->pwrdm, clkdm);
+       pwrdm_del_clkdm(clkdm->pwrdm.ptr, clkdm);
 
        mutex_lock(&clkdm_mutex);
        list_del(&clkdm->node);
@@ -327,7 +331,7 @@ struct powerdomain *clkdm_get_pwrdm(struct clockdomain *clkdm)
        if (!clkdm)
                return NULL;
 
-       return clkdm->pwrdm;
+       return clkdm->pwrdm.ptr;
 }
 
 
@@ -348,7 +352,7 @@ static int omap2_clkdm_clktrctrl_read(struct clockdomain *clkdm)
        if (!clkdm)
                return -EINVAL;
 
-       v = cm_read_mod_reg(clkdm->pwrdm->prcm_offs, CM_CLKSTCTRL);
+       v = cm_read_mod_reg(clkdm->pwrdm.ptr->prcm_offs, CM_CLKSTCTRL);
        v &= clkdm->clktrctrl_mask;
        v >>= __ffs(clkdm->clktrctrl_mask);
 
@@ -380,7 +384,7 @@ int omap2_clkdm_sleep(struct clockdomain *clkdm)
        if (cpu_is_omap24xx()) {
 
                cm_set_mod_reg_bits(OMAP24XX_FORCESTATE,
-                                   clkdm->pwrdm->prcm_offs, PM_PWSTCTRL);
+                                   clkdm->pwrdm.ptr->prcm_offs, PM_PWSTCTRL);
 
        } else if (cpu_is_omap34xx()) {
 
@@ -388,7 +392,7 @@ int omap2_clkdm_sleep(struct clockdomain *clkdm)
                         __ffs(clkdm->clktrctrl_mask));
 
                cm_rmw_mod_reg_bits(clkdm->clktrctrl_mask, v,
-                                   clkdm->pwrdm->prcm_offs, CM_CLKSTCTRL);
+                                   clkdm->pwrdm.ptr->prcm_offs, CM_CLKSTCTRL);
 
        } else {
                BUG();
@@ -422,7 +426,7 @@ int omap2_clkdm_wakeup(struct clockdomain *clkdm)
        if (cpu_is_omap24xx()) {
 
                cm_clear_mod_reg_bits(OMAP24XX_FORCESTATE,
-                                     clkdm->pwrdm->prcm_offs, PM_PWSTCTRL);
+                                     clkdm->pwrdm.ptr->prcm_offs, PM_PWSTCTRL);
 
        } else if (cpu_is_omap34xx()) {
 
@@ -430,7 +434,7 @@ int omap2_clkdm_wakeup(struct clockdomain *clkdm)
                         __ffs(clkdm->clktrctrl_mask));
 
                cm_rmw_mod_reg_bits(clkdm->clktrctrl_mask, v,
-                                   clkdm->pwrdm->prcm_offs, CM_CLKSTCTRL);
+                                   clkdm->pwrdm.ptr->prcm_offs, CM_CLKSTCTRL);
 
        } else {
                BUG();
@@ -478,7 +482,7 @@ void omap2_clkdm_allow_idle(struct clockdomain *clkdm)
 
        cm_rmw_mod_reg_bits(clkdm->clktrctrl_mask,
                            v << __ffs(clkdm->clktrctrl_mask),
-                           clkdm->pwrdm->prcm_offs,
+                           clkdm->pwrdm.ptr->prcm_offs,
                            CM_CLKSTCTRL);
 }
 
@@ -516,7 +520,7 @@ void omap2_clkdm_deny_idle(struct clockdomain *clkdm)
 
        cm_rmw_mod_reg_bits(clkdm->clktrctrl_mask,
                            v << __ffs(clkdm->clktrctrl_mask),
-                           clkdm->pwrdm->prcm_offs, CM_CLKSTCTRL);
+                           clkdm->pwrdm.ptr->prcm_offs, CM_CLKSTCTRL);
 
        if (atomic_read(&clkdm->usecount) > 0)
                _clkdm_del_autodeps(clkdm);
@@ -567,6 +571,8 @@ int omap2_clkdm_clk_enable(struct clockdomain *clkdm, struct clk *clk)
        else
                omap2_clkdm_wakeup(clkdm);
 
+       pwrdm_wait_transition(clkdm->pwrdm.ptr);
+
        return 0;
 }
 
index cd86dcc7b424ebead57547d1fecbbbbb9464c0b3..281d5da1918879a2ca927ee4616cbfb495a4fdbc 100644 (file)
 
 /*
  * OMAP2/3-common clockdomains
+ *
+ * Even though the 2420 has a single PRCM module from the
+ * interconnect's perspective, internally it does appear to have
+ * separate PRM and CM clockdomains.  The usual test case is
+ * sys_clkout/sys_clkout2.
  */
 
 /* This is an implicit clockdomain - it is never defined as such in TRM */
 static struct clockdomain wkup_clkdm = {
        .name           = "wkup_clkdm",
-       .pwrdm_name     = "wkup_pwrdm",
+       .pwrdm          = { .name = "wkup_pwrdm" },
+       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX | CHIP_IS_OMAP3430),
+};
+
+static struct clockdomain prm_clkdm = {
+       .name           = "prm_clkdm",
+       .pwrdm          = { .name = "wkup_pwrdm" },
+       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX | CHIP_IS_OMAP3430),
+};
+
+static struct clockdomain cm_clkdm = {
+       .name           = "cm_clkdm",
+       .pwrdm          = { .name = "core_pwrdm" },
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX | CHIP_IS_OMAP3430),
 };
 
@@ -31,7 +48,7 @@ static struct clockdomain wkup_clkdm = {
 
 static struct clockdomain mpu_2420_clkdm = {
        .name           = "mpu_clkdm",
-       .pwrdm_name     = "mpu_pwrdm",
+       .pwrdm          = { .name = "mpu_pwrdm" },
        .flags          = CLKDM_CAN_HWSUP,
        .clktrctrl_mask = OMAP24XX_AUTOSTATE_MPU_MASK,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
@@ -39,7 +56,7 @@ static struct clockdomain mpu_2420_clkdm = {
 
 static struct clockdomain iva1_2420_clkdm = {
        .name           = "iva1_clkdm",
-       .pwrdm_name     = "dsp_pwrdm",
+       .pwrdm          = { .name = "dsp_pwrdm" },
        .flags          = CLKDM_CAN_HWSUP_SWSUP,
        .clktrctrl_mask = OMAP2420_AUTOSTATE_IVA_MASK,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
@@ -56,7 +73,7 @@ static struct clockdomain iva1_2420_clkdm = {
 
 static struct clockdomain mpu_2430_clkdm = {
        .name           = "mpu_clkdm",
-       .pwrdm_name     = "mpu_pwrdm",
+       .pwrdm          = { .name = "mpu_pwrdm" },
        .flags          = CLKDM_CAN_HWSUP_SWSUP,
        .clktrctrl_mask = OMAP24XX_AUTOSTATE_MPU_MASK,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
@@ -64,7 +81,7 @@ static struct clockdomain mpu_2430_clkdm = {
 
 static struct clockdomain mdm_clkdm = {
        .name           = "mdm_clkdm",
-       .pwrdm_name     = "mdm_pwrdm",
+       .pwrdm          = { .name = "mdm_pwrdm" },
        .flags          = CLKDM_CAN_HWSUP_SWSUP,
        .clktrctrl_mask = OMAP2430_AUTOSTATE_MDM_MASK,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
@@ -81,7 +98,7 @@ static struct clockdomain mdm_clkdm = {
 
 static struct clockdomain dsp_clkdm = {
        .name           = "dsp_clkdm",
-       .pwrdm_name     = "dsp_pwrdm",
+       .pwrdm          = { .name = "dsp_pwrdm" },
        .flags          = CLKDM_CAN_HWSUP_SWSUP,
        .clktrctrl_mask = OMAP24XX_AUTOSTATE_DSP_MASK,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX),
@@ -89,7 +106,7 @@ static struct clockdomain dsp_clkdm = {
 
 static struct clockdomain gfx_24xx_clkdm = {
        .name           = "gfx_clkdm",
-       .pwrdm_name     = "gfx_pwrdm",
+       .pwrdm          = { .name = "gfx_pwrdm" },
        .flags          = CLKDM_CAN_HWSUP_SWSUP,
        .clktrctrl_mask = OMAP24XX_AUTOSTATE_GFX_MASK,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX),
@@ -97,7 +114,7 @@ static struct clockdomain gfx_24xx_clkdm = {
 
 static struct clockdomain core_l3_24xx_clkdm = {
        .name           = "core_l3_clkdm",
-       .pwrdm_name     = "core_pwrdm",
+       .pwrdm          = { .name = "core_pwrdm" },
        .flags          = CLKDM_CAN_HWSUP,
        .clktrctrl_mask = OMAP24XX_AUTOSTATE_L3_MASK,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX),
@@ -105,7 +122,7 @@ static struct clockdomain core_l3_24xx_clkdm = {
 
 static struct clockdomain core_l4_24xx_clkdm = {
        .name           = "core_l4_clkdm",
-       .pwrdm_name     = "core_pwrdm",
+       .pwrdm          = { .name = "core_pwrdm" },
        .flags          = CLKDM_CAN_HWSUP,
        .clktrctrl_mask = OMAP24XX_AUTOSTATE_L4_MASK,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX),
@@ -113,7 +130,7 @@ static struct clockdomain core_l4_24xx_clkdm = {
 
 static struct clockdomain dss_24xx_clkdm = {
        .name           = "dss_clkdm",
-       .pwrdm_name     = "core_pwrdm",
+       .pwrdm          = { .name = "core_pwrdm" },
        .flags          = CLKDM_CAN_HWSUP,
        .clktrctrl_mask = OMAP24XX_AUTOSTATE_DSS_MASK,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX),
@@ -130,7 +147,7 @@ static struct clockdomain dss_24xx_clkdm = {
 
 static struct clockdomain mpu_34xx_clkdm = {
        .name           = "mpu_clkdm",
-       .pwrdm_name     = "mpu_pwrdm",
+       .pwrdm          = { .name = "mpu_pwrdm" },
        .flags          = CLKDM_CAN_HWSUP | CLKDM_CAN_FORCE_WAKEUP,
        .clktrctrl_mask = OMAP3430_CLKTRCTRL_MPU_MASK,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
@@ -138,7 +155,7 @@ static struct clockdomain mpu_34xx_clkdm = {
 
 static struct clockdomain neon_clkdm = {
        .name           = "neon_clkdm",
-       .pwrdm_name     = "neon_pwrdm",
+       .pwrdm          = { .name = "neon_pwrdm" },
        .flags          = CLKDM_CAN_HWSUP_SWSUP,
        .clktrctrl_mask = OMAP3430_CLKTRCTRL_NEON_MASK,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
@@ -146,7 +163,7 @@ static struct clockdomain neon_clkdm = {
 
 static struct clockdomain iva2_clkdm = {
        .name           = "iva2_clkdm",
-       .pwrdm_name     = "iva2_pwrdm",
+       .pwrdm          = { .name = "iva2_pwrdm" },
        .flags          = CLKDM_CAN_HWSUP_SWSUP,
        .clktrctrl_mask = OMAP3430_CLKTRCTRL_IVA2_MASK,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
@@ -154,7 +171,7 @@ static struct clockdomain iva2_clkdm = {
 
 static struct clockdomain gfx_3430es1_clkdm = {
        .name           = "gfx_clkdm",
-       .pwrdm_name     = "gfx_pwrdm",
+       .pwrdm          = { .name = "gfx_pwrdm" },
        .flags          = CLKDM_CAN_HWSUP_SWSUP,
        .clktrctrl_mask = OMAP3430ES1_CLKTRCTRL_GFX_MASK,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1),
@@ -162,10 +179,10 @@ static struct clockdomain gfx_3430es1_clkdm = {
 
 static struct clockdomain sgx_clkdm = {
        .name           = "sgx_clkdm",
-       .pwrdm_name     = "sgx_pwrdm",
+       .pwrdm          = { .name = "sgx_pwrdm" },
        .flags          = CLKDM_CAN_HWSUP_SWSUP,
        .clktrctrl_mask = OMAP3430ES2_CLKTRCTRL_SGX_MASK,
-       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES2),
+       .omap_chip      = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2),
 };
 
 /*
@@ -177,7 +194,7 @@ static struct clockdomain sgx_clkdm = {
  */
 static struct clockdomain d2d_clkdm = {
        .name           = "d2d_clkdm",
-       .pwrdm_name     = "core_pwrdm",
+       .pwrdm          = { .name = "core_pwrdm" },
        .flags          = CLKDM_CAN_HWSUP,
        .clktrctrl_mask = OMAP3430ES1_CLKTRCTRL_D2D_MASK,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
@@ -185,7 +202,7 @@ static struct clockdomain d2d_clkdm = {
 
 static struct clockdomain core_l3_34xx_clkdm = {
        .name           = "core_l3_clkdm",
-       .pwrdm_name     = "core_pwrdm",
+       .pwrdm          = { .name = "core_pwrdm" },
        .flags          = CLKDM_CAN_HWSUP,
        .clktrctrl_mask = OMAP3430_CLKTRCTRL_L3_MASK,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
@@ -193,7 +210,7 @@ static struct clockdomain core_l3_34xx_clkdm = {
 
 static struct clockdomain core_l4_34xx_clkdm = {
        .name           = "core_l4_clkdm",
-       .pwrdm_name     = "core_pwrdm",
+       .pwrdm          = { .name = "core_pwrdm" },
        .flags          = CLKDM_CAN_HWSUP,
        .clktrctrl_mask = OMAP3430_CLKTRCTRL_L4_MASK,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
@@ -201,7 +218,7 @@ static struct clockdomain core_l4_34xx_clkdm = {
 
 static struct clockdomain dss_34xx_clkdm = {
        .name           = "dss_clkdm",
-       .pwrdm_name     = "dss_pwrdm",
+       .pwrdm          = { .name = "dss_pwrdm" },
        .flags          = CLKDM_CAN_HWSUP_SWSUP,
        .clktrctrl_mask = OMAP3430_CLKTRCTRL_DSS_MASK,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
@@ -209,7 +226,7 @@ static struct clockdomain dss_34xx_clkdm = {
 
 static struct clockdomain cam_clkdm = {
        .name           = "cam_clkdm",
-       .pwrdm_name     = "cam_pwrdm",
+       .pwrdm          = { .name = "cam_pwrdm" },
        .flags          = CLKDM_CAN_HWSUP_SWSUP,
        .clktrctrl_mask = OMAP3430_CLKTRCTRL_CAM_MASK,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
@@ -217,28 +234,62 @@ static struct clockdomain cam_clkdm = {
 
 static struct clockdomain usbhost_clkdm = {
        .name           = "usbhost_clkdm",
-       .pwrdm_name     = "usbhost_pwrdm",
+       .pwrdm          = { .name = "usbhost_pwrdm" },
        .flags          = CLKDM_CAN_HWSUP_SWSUP,
        .clktrctrl_mask = OMAP3430ES2_CLKTRCTRL_USBHOST_MASK,
-       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES2),
+       .omap_chip      = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2),
 };
 
 static struct clockdomain per_clkdm = {
        .name           = "per_clkdm",
-       .pwrdm_name     = "per_pwrdm",
+       .pwrdm          = { .name = "per_pwrdm" },
        .flags          = CLKDM_CAN_HWSUP_SWSUP,
        .clktrctrl_mask = OMAP3430_CLKTRCTRL_PER_MASK,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
 };
 
+/*
+ * Disable hw supervised mode for emu_clkdm, because emu_pwrdm is
+ * switched of even if sdti is in use
+ */
 static struct clockdomain emu_clkdm = {
        .name           = "emu_clkdm",
-       .pwrdm_name     = "emu_pwrdm",
-       .flags          = CLKDM_CAN_ENABLE_AUTO | CLKDM_CAN_SWSUP,
+       .pwrdm          = { .name = "emu_pwrdm" },
+       .flags          = /* CLKDM_CAN_ENABLE_AUTO |  */CLKDM_CAN_SWSUP,
        .clktrctrl_mask = OMAP3430_CLKTRCTRL_EMU_MASK,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
 };
 
+static struct clockdomain dpll1_clkdm = {
+       .name           = "dpll1_clkdm",
+       .pwrdm          = { .name = "dpll1_pwrdm" },
+       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
+};
+
+static struct clockdomain dpll2_clkdm = {
+       .name           = "dpll2_clkdm",
+       .pwrdm          = { .name = "dpll2_pwrdm" },
+       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
+};
+
+static struct clockdomain dpll3_clkdm = {
+       .name           = "dpll3_clkdm",
+       .pwrdm          = { .name = "dpll3_pwrdm" },
+       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
+};
+
+static struct clockdomain dpll4_clkdm = {
+       .name           = "dpll4_clkdm",
+       .pwrdm          = { .name = "dpll4_pwrdm" },
+       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
+};
+
+static struct clockdomain dpll5_clkdm = {
+       .name           = "dpll5_clkdm",
+       .pwrdm          = { .name = "dpll5_pwrdm" },
+       .omap_chip      = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2),
+};
+
 #endif   /* CONFIG_ARCH_OMAP34XX */
 
 /*
@@ -247,14 +298,16 @@ static struct clockdomain emu_clkdm = {
 
 static struct clkdm_pwrdm_autodep clkdm_pwrdm_autodeps[] = {
        {
-               .pwrdm_name = "mpu_pwrdm",
+               .pwrdm     = { .name = "mpu_pwrdm" },
                .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
        },
        {
-               .pwrdm_name = "iva2_pwrdm",
+               .pwrdm     = { .name = "iva2_pwrdm" },
                .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
        },
-       { NULL }
+       {
+               .pwrdm     = { .name = NULL },
+       }
 };
 
 /*
@@ -264,6 +317,8 @@ static struct clkdm_pwrdm_autodep clkdm_pwrdm_autodeps[] = {
 static struct clockdomain *clockdomains_omap[] = {
 
        &wkup_clkdm,
+       &cm_clkdm,
+       &prm_clkdm,
 
 #ifdef CONFIG_ARCH_OMAP2420
        &mpu_2420_clkdm,
@@ -297,6 +352,11 @@ static struct clockdomain *clockdomains_omap[] = {
        &usbhost_clkdm,
        &per_clkdm,
        &emu_clkdm,
+       &dpll1_clkdm,
+       &dpll2_clkdm,
+       &dpll3_clkdm,
+       &dpll4_clkdm,
+       &dpll5_clkdm,
 #endif
 
        NULL,
index 1098ecfab861e2b42a0a6130fbe0b2d55ceb0004..297a2fe634ea63a56345af7a51bb11c37e276f85 100644 (file)
 #define OMAP24XX_EN_DES                                        (1 << 0)
 
 /* CM_IDLEST1_CORE specific bits */
-#define OMAP24XX_ST_MAILBOXES                          (1 << 30)
-#define OMAP24XX_ST_WDT4                               (1 << 29)
-#define OMAP2420_ST_WDT3                               (1 << 28)
-#define OMAP24XX_ST_MSPRO                              (1 << 27)
-#define OMAP24XX_ST_FAC                                        (1 << 25)
-#define OMAP2420_ST_EAC                                        (1 << 24)
-#define OMAP24XX_ST_HDQ                                        (1 << 23)
-#define OMAP24XX_ST_I2C2                               (1 << 20)
-#define OMAP24XX_ST_I2C1                               (1 << 19)
-#define OMAP24XX_ST_MCBSP2                             (1 << 16)
-#define OMAP24XX_ST_MCBSP1                             (1 << 15)
-#define OMAP24XX_ST_DSS                                        (1 << 0)
+#define OMAP24XX_ST_MAILBOXES_SHIFT                    30
+#define OMAP24XX_ST_MAILBOXES_MASK                     (1 << 30)
+#define OMAP24XX_ST_WDT4_SHIFT                         29
+#define OMAP24XX_ST_WDT4_MASK                          (1 << 29)
+#define OMAP2420_ST_WDT3_SHIFT                         28
+#define OMAP2420_ST_WDT3_MASK                          (1 << 28)
+#define OMAP24XX_ST_MSPRO_SHIFT                                27
+#define OMAP24XX_ST_MSPRO_MASK                         (1 << 27)
+#define OMAP24XX_ST_FAC_SHIFT                          25
+#define OMAP24XX_ST_FAC_MASK                           (1 << 25)
+#define OMAP2420_ST_EAC_SHIFT                          24
+#define OMAP2420_ST_EAC_MASK                           (1 << 24)
+#define OMAP24XX_ST_HDQ_SHIFT                          23
+#define OMAP24XX_ST_HDQ_MASK                           (1 << 23)
+#define OMAP2420_ST_I2C2_SHIFT                         20
+#define OMAP2420_ST_I2C2_MASK                          (1 << 20)
+#define OMAP2420_ST_I2C1_SHIFT                         19
+#define OMAP2420_ST_I2C1_MASK                          (1 << 19)
+#define OMAP24XX_ST_MCBSP2_SHIFT                       16
+#define OMAP24XX_ST_MCBSP2_MASK                                (1 << 16)
+#define OMAP24XX_ST_MCBSP1_SHIFT                       15
+#define OMAP24XX_ST_MCBSP1_MASK                                (1 << 15)
+#define OMAP24XX_ST_DSS_SHIFT                          0
+#define OMAP24XX_ST_DSS_MASK                           (1 << 0)
 
 /* CM_IDLEST2_CORE */
-#define OMAP2430_ST_MCBSP5                             (1 << 5)
-#define OMAP2430_ST_MCBSP4                             (1 << 4)
-#define OMAP2430_ST_MCBSP3                             (1 << 3)
-#define OMAP24XX_ST_SSI                                        (1 << 1)
+#define OMAP2430_ST_MCBSP5_SHIFT                       5
+#define OMAP2430_ST_MCBSP5_MASK                                (1 << 5)
+#define OMAP2430_ST_MCBSP4_SHIFT                               4
+#define OMAP2430_ST_MCBSP4_MASK                                (1 << 4)
+#define OMAP2430_ST_MCBSP3_SHIFT                               3
+#define OMAP2430_ST_MCBSP3_MASK                                (1 << 3)
+#define OMAP24XX_ST_SSI_SHIFT                          1
+#define OMAP24XX_ST_SSI_MASK                           (1 << 1)
 
 /* CM_IDLEST3_CORE */
 /* 2430 only */
-#define OMAP2430_ST_SDRC                               (1 << 2)
+#define OMAP2430_ST_SDRC_MASK                          (1 << 2)
 
 /* CM_IDLEST4_CORE */
-#define OMAP24XX_ST_PKA                                        (1 << 4)
-#define OMAP24XX_ST_AES                                        (1 << 3)
-#define OMAP24XX_ST_RNG                                        (1 << 2)
-#define OMAP24XX_ST_SHA                                        (1 << 1)
-#define OMAP24XX_ST_DES                                        (1 << 0)
+#define OMAP24XX_ST_PKA_SHIFT                          4
+#define OMAP24XX_ST_PKA_MASK                           (1 << 4)
+#define OMAP24XX_ST_AES_SHIFT                          3
+#define OMAP24XX_ST_AES_MASK                           (1 << 3)
+#define OMAP24XX_ST_RNG_SHIFT                          2
+#define OMAP24XX_ST_RNG_MASK                           (1 << 2)
+#define OMAP24XX_ST_SHA_SHIFT                          1
+#define OMAP24XX_ST_SHA_MASK                           (1 << 1)
+#define OMAP24XX_ST_DES_SHIFT                          0
+#define OMAP24XX_ST_DES_MASK                           (1 << 0)
 
 /* CM_AUTOIDLE1_CORE */
 #define OMAP24XX_AUTO_CAM                              (1 << 31)
 #define OMAP24XX_EN_32KSYNC                            (1 << 1)
 
 /* CM_IDLEST_WKUP specific bits */
-#define OMAP2430_ST_ICR                                        (1 << 6)
-#define OMAP24XX_ST_OMAPCTRL                           (1 << 5)
-#define OMAP24XX_ST_WDT1                               (1 << 4)
-#define OMAP24XX_ST_MPU_WDT                            (1 << 3)
-#define OMAP24XX_ST_32KSYNC                            (1 << 1)
+#define OMAP2430_ST_ICR_SHIFT                          6
+#define OMAP2430_ST_ICR_MASK                           (1 << 6)
+#define OMAP24XX_ST_OMAPCTRL_SHIFT                     5
+#define OMAP24XX_ST_OMAPCTRL_MASK                      (1 << 5)
+#define OMAP24XX_ST_WDT1_SHIFT                         4
+#define OMAP24XX_ST_WDT1_MASK                          (1 << 4)
+#define OMAP24XX_ST_MPU_WDT_SHIFT                      3
+#define OMAP24XX_ST_MPU_WDT_MASK                       (1 << 3)
+#define OMAP24XX_ST_32KSYNC_SHIFT                      1
+#define OMAP24XX_ST_32KSYNC_MASK                       (1 << 1)
 
 /* CM_AUTOIDLE_WKUP */
 #define OMAP24XX_AUTO_OMAPCTRL                         (1 << 5)
index 219f5c8d9659413146dc3f72c257280cd33e67e6..6f3f5a36aae664960e037d59200dba8fe025feab 100644 (file)
 #define OMAP3430ES2_EN_CPEFUSE_MASK                    (1 << 0)
 
 /* CM_IDLEST1_CORE specific bits */
-#define OMAP3430_ST_ICR                                        (1 << 29)
-#define OMAP3430_ST_AES2                               (1 << 28)
-#define OMAP3430_ST_SHA12                              (1 << 27)
-#define OMAP3430_ST_DES2                               (1 << 26)
-#define OMAP3430_ST_MSPRO                              (1 << 23)
-#define OMAP3430_ST_HDQ                                        (1 << 22)
-#define OMAP3430ES1_ST_FAC                             (1 << 8)
-#define OMAP3430ES1_ST_MAILBOXES                       (1 << 7)
-#define OMAP3430_ST_OMAPCTRL                           (1 << 6)
-#define OMAP3430_ST_SDMA                               (1 << 2)
-#define OMAP3430_ST_SDRC                               (1 << 1)
-#define OMAP3430_ST_SSI                                        (1 << 0)
+#define OMAP3430ES2_ST_MMC3_SHIFT                      30
+#define OMAP3430ES2_ST_MMC3_MASK                       (1 << 30)
+#define OMAP3430_ST_ICR_SHIFT                          29
+#define OMAP3430_ST_ICR_MASK                           (1 << 29)
+#define OMAP3430_ST_AES2_SHIFT                         28
+#define OMAP3430_ST_AES2_MASK                          (1 << 28)
+#define OMAP3430_ST_SHA12_SHIFT                                27
+#define OMAP3430_ST_SHA12_MASK                         (1 << 27)
+#define OMAP3430_ST_DES2_SHIFT                         26
+#define OMAP3430_ST_DES2_MASK                          (1 << 26)
+#define OMAP3430_ST_MSPRO_SHIFT                                23
+#define OMAP3430_ST_MSPRO_MASK                         (1 << 23)
+#define OMAP3430_ST_HDQ_SHIFT                          22
+#define OMAP3430_ST_HDQ_MASK                           (1 << 22)
+#define OMAP3430ES1_ST_FAC_SHIFT                       8
+#define OMAP3430ES1_ST_FAC_MASK                                (1 << 8)
+#define OMAP3430ES2_ST_SSI_IDLE_SHIFT                  8
+#define OMAP3430ES2_ST_SSI_IDLE_MASK                   (1 << 8)
+#define OMAP3430_ST_MAILBOXES_SHIFT                    7
+#define OMAP3430_ST_MAILBOXES_MASK                     (1 << 7)
+#define OMAP3430_ST_OMAPCTRL_SHIFT                     6
+#define OMAP3430_ST_OMAPCTRL_MASK                      (1 << 6)
+#define OMAP3430_ST_SDMA_SHIFT                         2
+#define OMAP3430_ST_SDMA_MASK                          (1 << 2)
+#define OMAP3430_ST_SDRC_SHIFT                         1
+#define OMAP3430_ST_SDRC_MASK                          (1 << 1)
+#define OMAP3430_ST_SSI_STDBY_SHIFT                    0
+#define OMAP3430_ST_SSI_STDBY_MASK                     (1 << 0)
 
 /* CM_IDLEST2_CORE */
-#define OMAP3430_ST_PKA                                        (1 << 4)
-#define OMAP3430_ST_AES1                               (1 << 3)
-#define OMAP3430_ST_RNG                                        (1 << 2)
-#define OMAP3430_ST_SHA11                              (1 << 1)
-#define OMAP3430_ST_DES1                               (1 << 0)
+#define OMAP3430_ST_PKA_SHIFT                          4
+#define OMAP3430_ST_PKA_MASK                           (1 << 4)
+#define OMAP3430_ST_AES1_SHIFT                         3
+#define OMAP3430_ST_AES1_MASK                          (1 << 3)
+#define OMAP3430_ST_RNG_SHIFT                          2
+#define OMAP3430_ST_RNG_MASK                           (1 << 2)
+#define OMAP3430_ST_SHA11_SHIFT                                1
+#define OMAP3430_ST_SHA11_MASK                         (1 << 1)
+#define OMAP3430_ST_DES1_SHIFT                         0
+#define OMAP3430_ST_DES1_MASK                          (1 << 0)
 
 /* CM_IDLEST3_CORE */
 #define OMAP3430ES2_ST_USBTLL_SHIFT                    2
 #define OMAP3430ES2_ST_USBTLL_MASK                     (1 << 2)
+#define OMAP3430ES2_ST_CPEFUSE_SHIFT                   0
+#define OMAP3430ES2_ST_CPEFUSE_MASK                    (1 << 0)
 
 /* CM_AUTOIDLE1_CORE */
+#define OMAP3430ES2_AUTO_MMC3                          (1 << 30)
+#define OMAP3430ES2_AUTO_MMC3_SHIFT                    30
+#define OMAP3430ES2_AUTO_ICR                           (1 << 29)
+#define OMAP3430ES2_AUTO_ICR_SHIFT                     29
 #define OMAP3430_AUTO_AES2                             (1 << 28)
 #define OMAP3430_AUTO_AES2_SHIFT                       28
 #define OMAP3430_AUTO_SHA12                            (1 << 27)
 #define OMAP3430_AUTO_DES1_SHIFT                       0
 
 /* CM_AUTOIDLE3_CORE */
+#define        OMAP3430ES2_AUTO_USBHOST                        (1 << 0)
+#define        OMAP3430ES2_AUTO_USBHOST_SHIFT                  0
+#define        OMAP3430ES2_AUTO_USBTLL                         (1 << 2)
 #define OMAP3430ES2_AUTO_USBTLL_SHIFT                  2
 #define OMAP3430ES2_AUTO_USBTLL_MASK                   (1 << 2)
 
 #define OMAP3430ES1_CLKACTIVITY_GFX_MASK               (1 << 0)
 
 /* CM_FCLKEN_SGX */
-#define OMAP3430ES2_EN_SGX_SHIFT                       1
-#define OMAP3430ES2_EN_SGX_MASK                                (1 << 1)
+#define OMAP3430ES2_CM_FCLKEN_SGX_EN_SGX_SHIFT         1
+#define OMAP3430ES2_CM_FCLKEN_SGX_EN_SGX_MASK          (1 << 1)
+
+/* CM_ICLKEN_SGX */
+#define OMAP3430ES2_CM_ICLKEN_SGX_EN_SGX_SHIFT         0
+#define OMAP3430ES2_CM_ICLKEN_SGX_EN_SGX_MASK          (1 << 0)
 
 /* CM_CLKSEL_SGX */
 #define OMAP3430ES2_CLKSEL_SGX_SHIFT                   0
 
 /* CM_FCLKEN_WKUP specific bits */
 #define OMAP3430ES2_EN_USIMOCP_SHIFT                   9
+#define OMAP3430ES2_EN_USIMOCP_MASK                    (1 << 9)
 
 /* CM_ICLKEN_WKUP specific bits */
 #define OMAP3430_EN_WDT1                               (1 << 4)
 #define OMAP3430_EN_32KSYNC_SHIFT                      2
 
 /* CM_IDLEST_WKUP specific bits */
-#define OMAP3430_ST_WDT2                               (1 << 5)
-#define OMAP3430_ST_WDT1                               (1 << 4)
-#define OMAP3430_ST_32KSYNC                            (1 << 2)
+#define OMAP3430ES2_ST_USIMOCP_SHIFT                   9
+#define OMAP3430ES2_ST_USIMOCP_MASK                    (1 << 9)
+#define OMAP3430_ST_WDT2_SHIFT                         5
+#define OMAP3430_ST_WDT2_MASK                          (1 << 5)
+#define OMAP3430_ST_WDT1_SHIFT                         4
+#define OMAP3430_ST_WDT1_MASK                          (1 << 4)
+#define OMAP3430_ST_32KSYNC_SHIFT                      2
+#define OMAP3430_ST_32KSYNC_MASK                       (1 << 2)
 
 /* CM_AUTOIDLE_WKUP */
+#define OMAP3430ES2_AUTO_USIMOCP                               (1 << 9)
+#define OMAP3430ES2_AUTO_USIMOCP_SHIFT                 9
 #define OMAP3430_AUTO_WDT2                             (1 << 5)
 #define OMAP3430_AUTO_WDT2_SHIFT                       5
 #define OMAP3430_AUTO_WDT1                             (1 << 4)
 #define OMAP3430_ST_CORE_CLK_MASK                      (1 << 0)
 
 /* CM_IDLEST2_CKGEN */
+#define OMAP3430ES2_ST_USIM_CLK_SHIFT                  2
+#define OMAP3430ES2_ST_USIM_CLK_MASK                   (1 << 2)
 #define OMAP3430ES2_ST_120M_CLK_SHIFT                  1
 #define OMAP3430ES2_ST_120M_CLK_MASK                   (1 << 1)
 #define OMAP3430ES2_ST_PERIPH2_CLK_SHIFT               0
 #define OMAP3430_CORE_DPLL_MULT_MASK                   (0x7ff << 16)
 #define OMAP3430_CORE_DPLL_DIV_SHIFT                   8
 #define OMAP3430_CORE_DPLL_DIV_MASK                    (0x7f << 8)
-#define OMAP3430_SOURCE_54M                            (1 << 5)
-#define OMAP3430_SOURCE_48M                            (1 << 3)
+#define OMAP3430_SOURCE_96M_SHIFT                      6
+#define OMAP3430_SOURCE_96M_MASK                       (1 << 6)
+#define OMAP3430_SOURCE_54M_SHIFT                      5
+#define OMAP3430_SOURCE_54M_MASK                       (1 << 5)
+#define OMAP3430_SOURCE_48M_SHIFT                      3
+#define OMAP3430_SOURCE_48M_MASK                       (1 << 3)
 
 /* CM_CLKSEL2_PLL */
 #define OMAP3430_PERIPH_DPLL_MULT_SHIFT                        8
 #define OMAP3430_CM_ICLKEN_DSS_EN_DSS_SHIFT            0
 
 /* CM_IDLEST_DSS */
-#define OMAP3430_ST_DSS                                        (1 << 0)
+#define OMAP3430ES2_ST_DSS_IDLE_SHIFT                  1
+#define OMAP3430ES2_ST_DSS_IDLE_MASK                   (1 << 1)
+#define OMAP3430ES2_ST_DSS_STDBY_SHIFT                 0
+#define OMAP3430ES2_ST_DSS_STDBY_MASK                  (1 << 0)
+#define OMAP3430ES1_ST_DSS_SHIFT                       0
+#define OMAP3430ES1_ST_DSS_MASK                                (1 << 0)
 
 /* CM_AUTOIDLE_DSS */
 #define OMAP3430_AUTO_DSS                              (1 << 0)
 #define OMAP3430_CLKACTIVITY_DSS_MASK                  (1 << 0)
 
 /* CM_FCLKEN_CAM specific bits */
+#define OMAP3430_EN_CSI2                               (1 << 1)
+#define OMAP3430_EN_CSI2_SHIFT                         1
 
 /* CM_ICLKEN_CAM specific bits */
 
 /* CM_ICLKEN_PER specific bits */
 
 /* CM_IDLEST_PER */
-#define OMAP3430_ST_WDT3                               (1 << 12)
-#define OMAP3430_ST_MCBSP4                             (1 << 2)
-#define OMAP3430_ST_MCBSP3                             (1 << 1)
-#define OMAP3430_ST_MCBSP2                             (1 << 0)
+#define OMAP3430_ST_WDT3_SHIFT                         12
+#define OMAP3430_ST_WDT3_MASK                          (1 << 12)
+#define OMAP3430_ST_MCBSP4_SHIFT                       2
+#define OMAP3430_ST_MCBSP4_MASK                                (1 << 2)
+#define OMAP3430_ST_MCBSP3_SHIFT                       1
+#define OMAP3430_ST_MCBSP3_MASK                                (1 << 1)
+#define OMAP3430_ST_MCBSP2_SHIFT                       0
+#define OMAP3430_ST_MCBSP2_MASK                                (1 << 0)
 
 /* CM_AUTOIDLE_PER */
 #define OMAP3430_AUTO_GPIO6                            (1 << 17)
 #define OMAP3430ES2_EN_USBHOST_MASK                    (1 << 0)
 
 /* CM_IDLEST_USBHOST */
+#define OMAP3430ES2_ST_USBHOST_IDLE_SHIFT              1
+#define OMAP3430ES2_ST_USBHOST_IDLE_MASK               (1 << 1)
+#define OMAP3430ES2_ST_USBHOST_STDBY_SHIFT             0
+#define OMAP3430ES2_ST_USBHOST_STDBY_MASK              (1 << 0)
 
 /* CM_AUTOIDLE_USBHOST */
 #define OMAP3430ES2_AUTO_USBHOST_SHIFT                 0
index ce03fa750775d25d4d715175218354e90a8d2567..8075f5868c38820383dbdbb7ab9daca344e4684a 100644 (file)
@@ -348,11 +348,12 @@ static void __init omap_hsmmc_reset(void)
                }
 
                dummy_pdev.id = i;
-               iclk = clk_get(dev, "mmchs_ick");
+               dev_set_name(&dummy_pdev.dev, "mmci-omap-hs.%d", i);
+               iclk = clk_get(dev, "ick");
                if (iclk && clk_enable(iclk))
                        iclk = NULL;
 
-               fclk = clk_get(dev, "mmchs_fck");
+               fclk = clk_get(dev, "fck");
                if (fclk && clk_enable(fclk))
                        fclk = NULL;
 
index b52a02fc7cd6356abe1c3bd08ba17dc632d8fa18..34b5914e0f8b18d094d45a31e9ce166af215b410 100644 (file)
@@ -217,8 +217,13 @@ void __init omap2_check_revision(void)
                omap_chip.oc = CHIP_IS_OMAP3430;
                if (omap_rev() == OMAP3430_REV_ES1_0)
                        omap_chip.oc |= CHIP_IS_OMAP3430ES1;
-               else if (omap_rev() > OMAP3430_REV_ES1_0)
+               else if (omap_rev() >= OMAP3430_REV_ES2_0 &&
+                        omap_rev() <= OMAP3430_REV_ES2_1)
                        omap_chip.oc |= CHIP_IS_OMAP3430ES2;
+               else if (omap_rev() == OMAP3430_REV_ES3_0)
+                       omap_chip.oc |= CHIP_IS_OMAP3430ES3_0;
+               else if (omap_rev() == OMAP3430_REV_ES3_1)
+                       omap_chip.oc |= CHIP_IS_OMAP3430ES3_1;
        } else {
                pr_err("Uninitialized omap_chip, please fix!\n");
        }
index 5ea64f926ed592e9348581080ee0bac061ab31a5..916fcd3a2328f470671da827fba0d05ee7d9cbfc 100644 (file)
@@ -27,8 +27,8 @@
 #include <mach/mux.h>
 #include <mach/omapfb.h>
 #include <mach/sram.h>
-
-#include "memory.h"
+#include <mach/sdrc.h>
+#include <mach/gpmc.h>
 
 #include "clock.h"
 
@@ -195,12 +195,12 @@ void __init omap2_map_common_io(void)
        omapfb_reserve_sdram();
 }
 
-void __init omap2_init_common_hw(void)
+void __init omap2_init_common_hw(struct omap_sdrc_params *sp)
 {
        omap2_mux_init();
        pwrdm_init(powerdomains_omap);
        clkdm_init(clockdomains_omap, clkdm_pwrdm_autodeps);
        omap2_clk_init();
-       omap2_init_memory();
+       omap2_sdrc_init(sp);
        gpmc_init();
 }
index a9e631fc1134177de2ee7568380b96cb3157835c..a5c0f0435cd6725423ededd8b47247d000773916 100644 (file)
@@ -24,8 +24,6 @@
 #include <mach/cpu.h>
 #include <mach/mcbsp.h>
 
-const char *clk_names[] = { "mcbsp_ick", "mcbsp_fck" };
-
 static void omap2_mcbsp2_mux_setup(void)
 {
        omap_cfg_reg(Y15_24XX_MCBSP2_CLKX);
@@ -57,8 +55,6 @@ static struct omap_mcbsp_platform_data omap2420_mcbsp_pdata[] = {
                .rx_irq         = INT_24XX_MCBSP1_IRQ_RX,
                .tx_irq         = INT_24XX_MCBSP1_IRQ_TX,
                .ops            = &omap2_mcbsp_ops,
-               .clk_names      = clk_names,
-               .num_clks       = 2,
        },
        {
                .phys_base      = OMAP24XX_MCBSP2_BASE,
@@ -67,8 +63,6 @@ static struct omap_mcbsp_platform_data omap2420_mcbsp_pdata[] = {
                .rx_irq         = INT_24XX_MCBSP2_IRQ_RX,
                .tx_irq         = INT_24XX_MCBSP2_IRQ_TX,
                .ops            = &omap2_mcbsp_ops,
-               .clk_names      = clk_names,
-               .num_clks       = 2,
        },
 };
 #define OMAP2420_MCBSP_PDATA_SZ                ARRAY_SIZE(omap2420_mcbsp_pdata)
@@ -86,8 +80,6 @@ static struct omap_mcbsp_platform_data omap2430_mcbsp_pdata[] = {
                .rx_irq         = INT_24XX_MCBSP1_IRQ_RX,
                .tx_irq         = INT_24XX_MCBSP1_IRQ_TX,
                .ops            = &omap2_mcbsp_ops,
-               .clk_names      = clk_names,
-               .num_clks       = 2,
        },
        {
                .phys_base      = OMAP24XX_MCBSP2_BASE,
@@ -96,8 +88,6 @@ static struct omap_mcbsp_platform_data omap2430_mcbsp_pdata[] = {
                .rx_irq         = INT_24XX_MCBSP2_IRQ_RX,
                .tx_irq         = INT_24XX_MCBSP2_IRQ_TX,
                .ops            = &omap2_mcbsp_ops,
-               .clk_names      = clk_names,
-               .num_clks       = 2,
        },
        {
                .phys_base      = OMAP2430_MCBSP3_BASE,
@@ -106,8 +96,6 @@ static struct omap_mcbsp_platform_data omap2430_mcbsp_pdata[] = {
                .rx_irq         = INT_24XX_MCBSP3_IRQ_RX,
                .tx_irq         = INT_24XX_MCBSP3_IRQ_TX,
                .ops            = &omap2_mcbsp_ops,
-               .clk_names      = clk_names,
-               .num_clks       = 2,
        },
        {
                .phys_base      = OMAP2430_MCBSP4_BASE,
@@ -116,8 +104,6 @@ static struct omap_mcbsp_platform_data omap2430_mcbsp_pdata[] = {
                .rx_irq         = INT_24XX_MCBSP4_IRQ_RX,
                .tx_irq         = INT_24XX_MCBSP4_IRQ_TX,
                .ops            = &omap2_mcbsp_ops,
-               .clk_names      = clk_names,
-               .num_clks       = 2,
        },
        {
                .phys_base      = OMAP2430_MCBSP5_BASE,
@@ -126,8 +112,6 @@ static struct omap_mcbsp_platform_data omap2430_mcbsp_pdata[] = {
                .rx_irq         = INT_24XX_MCBSP5_IRQ_RX,
                .tx_irq         = INT_24XX_MCBSP5_IRQ_TX,
                .ops            = &omap2_mcbsp_ops,
-               .clk_names      = clk_names,
-               .num_clks       = 2,
        },
 };
 #define OMAP2430_MCBSP_PDATA_SZ                ARRAY_SIZE(omap2430_mcbsp_pdata)
@@ -145,8 +129,6 @@ static struct omap_mcbsp_platform_data omap34xx_mcbsp_pdata[] = {
                .rx_irq         = INT_24XX_MCBSP1_IRQ_RX,
                .tx_irq         = INT_24XX_MCBSP1_IRQ_TX,
                .ops            = &omap2_mcbsp_ops,
-               .clk_names      = clk_names,
-               .num_clks       = 2,
        },
        {
                .phys_base      = OMAP34XX_MCBSP2_BASE,
@@ -155,8 +137,6 @@ static struct omap_mcbsp_platform_data omap34xx_mcbsp_pdata[] = {
                .rx_irq         = INT_24XX_MCBSP2_IRQ_RX,
                .tx_irq         = INT_24XX_MCBSP2_IRQ_TX,
                .ops            = &omap2_mcbsp_ops,
-               .clk_names      = clk_names,
-               .num_clks       = 2,
        },
        {
                .phys_base      = OMAP34XX_MCBSP3_BASE,
@@ -165,8 +145,6 @@ static struct omap_mcbsp_platform_data omap34xx_mcbsp_pdata[] = {
                .rx_irq         = INT_24XX_MCBSP3_IRQ_RX,
                .tx_irq         = INT_24XX_MCBSP3_IRQ_TX,
                .ops            = &omap2_mcbsp_ops,
-               .clk_names      = clk_names,
-               .num_clks       = 2,
        },
        {
                .phys_base      = OMAP34XX_MCBSP4_BASE,
@@ -175,8 +153,6 @@ static struct omap_mcbsp_platform_data omap34xx_mcbsp_pdata[] = {
                .rx_irq         = INT_24XX_MCBSP4_IRQ_RX,
                .tx_irq         = INT_24XX_MCBSP4_IRQ_TX,
                .ops            = &omap2_mcbsp_ops,
-               .clk_names      = clk_names,
-               .num_clks       = 2,
        },
        {
                .phys_base      = OMAP34XX_MCBSP5_BASE,
@@ -185,8 +161,6 @@ static struct omap_mcbsp_platform_data omap34xx_mcbsp_pdata[] = {
                .rx_irq         = INT_24XX_MCBSP5_IRQ_RX,
                .tx_irq         = INT_24XX_MCBSP5_IRQ_TX,
                .ops            = &omap2_mcbsp_ops,
-               .clk_names      = clk_names,
-               .num_clks       = 2,
        },
 };
 #define OMAP34XX_MCBSP_PDATA_SZ                ARRAY_SIZE(omap34xx_mcbsp_pdata)
diff --git a/arch/arm/mach-omap2/memory.h b/arch/arm/mach-omap2/memory.h
deleted file mode 100644 (file)
index bb3db80..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * linux/arch/arm/mach-omap2/memory.h
- *
- * Interface for memory timing related functions for OMAP24XX
- *
- * Copyright (C) 2005 Texas Instruments Inc.
- * Richard Woodruff <r-woodruff2@ti.com>
- *
- * Copyright (C) 2005 Nokia Corporation
- * Tony Lindgren <tony@atomide.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#ifndef ARCH_ARM_MACH_OMAP2_MEMORY_H
-#define ARCH_ARM_MACH_OMAP2_MEMORY_H
-
-/* Memory timings */
-#define M_DDR          1
-#define M_LOCK_CTRL    (1 << 2)
-#define M_UNLOCK       0
-#define M_LOCK         1
-
-struct memory_timings {
-       u32 m_type;             /* ddr = 1, sdr = 0 */
-       u32 dll_mode;           /* use lock mode = 1, unlock mode = 0 */
-       u32 slow_dll_ctrl;      /* unlock mode, dll value for slow speed */
-       u32 fast_dll_ctrl;      /* unlock mode, dll value for fast speed */
-       u32 base_cs;            /* base chip select to use for calculations */
-};
-
-extern void omap2_init_memory_params(u32 force_lock_to_unlock_mode);
-extern u32 omap2_memory_get_slow_dll_ctrl(void);
-extern u32 omap2_memory_get_fast_dll_ctrl(void);
-extern u32 omap2_memory_get_type(void);
-u32 omap2_dll_force_needed(void);
-u32 omap2_reprogram_sdrc(u32 level, u32 force);
-void __init omap2_init_memory(void);
-void __init gpmc_init(void);
-
-#endif
index 55361c16c9d9e3a0451c11f89a9eb7bfcdfba118..ea8ceaed09cbe1a0a5fb8f91bb4e21c566aa0483 100644 (file)
@@ -103,7 +103,7 @@ static struct platform_suspend_ops omap_pm_ops = {
        .valid          = suspend_valid_only_mem,
 };
 
-int __init omap2_pm_init(void)
+static int __init omap2_pm_init(void)
 {
        return 0;
 }
index 1e151faebbd3078cc8ff154341b5b15e2b21de91..691470ea4c6a860f6ca8cd7df3fd4659916e1c76 100644 (file)
@@ -171,13 +171,19 @@ static struct powerdomain *powerdomains_omap[] __initdata = {
        &iva2_pwrdm,
        &mpu_34xx_pwrdm,
        &neon_pwrdm,
-       &core_34xx_pwrdm,
+       &core_34xx_pre_es3_1_pwrdm,
+       &core_34xx_es3_1_pwrdm,
        &cam_pwrdm,
        &dss_pwrdm,
        &per_pwrdm,
        &emu_pwrdm,
        &sgx_pwrdm,
        &usbhost_pwrdm,
+       &dpll1_pwrdm,
+       &dpll2_pwrdm,
+       &dpll3_pwrdm,
+       &dpll4_pwrdm,
+       &dpll5_pwrdm,
 #endif
 
        NULL
index f573f71083983c28f22b88737c3b3ab6770a9760..4dcf94b800ab732c2aade542ad699c9d63eef180 100644 (file)
@@ -200,12 +200,33 @@ static struct powerdomain mpu_34xx_pwrdm = {
 };
 
 /* No wkdeps or sleepdeps for 34xx core apparently */
-static struct powerdomain core_34xx_pwrdm = {
+static struct powerdomain core_34xx_pre_es3_1_pwrdm = {
        .name             = "core_pwrdm",
        .prcm_offs        = CORE_MOD,
-       .omap_chip        = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
+       .omap_chip        = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1 |
+                                          CHIP_IS_OMAP3430ES2 |
+                                          CHIP_IS_OMAP3430ES3_0),
+       .pwrsts           = PWRSTS_OFF_RET_ON,
+       .dep_bit          = OMAP3430_EN_CORE_SHIFT,
+       .banks            = 2,
+       .pwrsts_mem_ret   = {
+               [0] = PWRSTS_OFF_RET,    /* MEM1RETSTATE */
+               [1] = PWRSTS_OFF_RET,    /* MEM2RETSTATE */
+       },
+       .pwrsts_mem_on    = {
+               [0] = PWRSTS_OFF_RET_ON, /* MEM1ONSTATE */
+               [1] = PWRSTS_OFF_RET_ON, /* MEM2ONSTATE */
+       },
+};
+
+/* No wkdeps or sleepdeps for 34xx core apparently */
+static struct powerdomain core_34xx_es3_1_pwrdm = {
+       .name             = "core_pwrdm",
+       .prcm_offs        = CORE_MOD,
+       .omap_chip        = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES3_1),
        .pwrsts           = PWRSTS_OFF_RET_ON,
        .dep_bit          = OMAP3430_EN_CORE_SHIFT,
+       .flags            = PWRDM_HAS_HDWR_SAR, /* for USBTLL only */
        .banks            = 2,
        .pwrsts_mem_ret   = {
                [0] = PWRSTS_OFF_RET,    /* MEM1RETSTATE */
@@ -236,14 +257,19 @@ static struct powerdomain dss_pwrdm = {
        },
 };
 
+/*
+ * Although the 34XX TRM Rev K Table 4-371 notes that retention is a
+ * possible SGX powerstate, the SGX device itself does not support
+ * retention.
+ */
 static struct powerdomain sgx_pwrdm = {
        .name             = "sgx_pwrdm",
        .prcm_offs        = OMAP3430ES2_SGX_MOD,
-       .omap_chip        = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES2),
+       .omap_chip        = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2),
        .wkdep_srcs       = gfx_sgx_wkdeps,
        .sleepdep_srcs    = cam_gfx_sleepdeps,
        /* XXX This is accurate for 3430 SGX, but what about GFX? */
-       .pwrsts           = PWRSTS_OFF_RET_ON,
+       .pwrsts           = PWRSTS_OFF_ON,
        .pwrsts_logic_ret = PWRDM_POWER_RET,
        .banks            = 1,
        .pwrsts_mem_ret   = {
@@ -307,11 +333,12 @@ static struct powerdomain neon_pwrdm = {
 static struct powerdomain usbhost_pwrdm = {
        .name             = "usbhost_pwrdm",
        .prcm_offs        = OMAP3430ES2_USBHOST_MOD,
-       .omap_chip        = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES2),
+       .omap_chip        = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2),
        .wkdep_srcs       = per_usbhost_wkdeps,
        .sleepdep_srcs    = dss_per_usbhost_sleepdeps,
        .pwrsts           = PWRSTS_OFF_RET_ON,
        .pwrsts_logic_ret = PWRDM_POWER_RET,
+       .flags            = PWRDM_HAS_HDWR_SAR, /* for USBHOST ctrlr only */
        .banks            = 1,
        .pwrsts_mem_ret   = {
                [0] = PWRDM_POWER_RET, /* MEMRETSTATE */
@@ -321,6 +348,37 @@ static struct powerdomain usbhost_pwrdm = {
        },
 };
 
+static struct powerdomain dpll1_pwrdm = {
+       .name           = "dpll1_pwrdm",
+       .prcm_offs      = MPU_MOD,
+       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
+};
+
+static struct powerdomain dpll2_pwrdm = {
+       .name           = "dpll2_pwrdm",
+       .prcm_offs      = OMAP3430_IVA2_MOD,
+       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
+};
+
+static struct powerdomain dpll3_pwrdm = {
+       .name           = "dpll3_pwrdm",
+       .prcm_offs      = PLL_MOD,
+       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
+};
+
+static struct powerdomain dpll4_pwrdm = {
+       .name           = "dpll4_pwrdm",
+       .prcm_offs      = PLL_MOD,
+       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
+};
+
+static struct powerdomain dpll5_pwrdm = {
+       .name           = "dpll5_pwrdm",
+       .prcm_offs      = PLL_MOD,
+       .omap_chip      = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2),
+};
+
+
 #endif    /* CONFIG_ARCH_OMAP34XX */
 
 
index 4a32822ff3fca38834ca4c267c85fa6a5334ce28..812d50ee495d5d3201d718373612a593ecc1fdcf 100644 (file)
 #define OMAP2430_EN_USBHS                              (1 << 6)
 
 /* CM_IDLEST1_CORE, PM_WKST1_CORE shared bits */
-#define OMAP2420_ST_MMC                                        (1 << 26)
-#define OMAP24XX_ST_UART2                              (1 << 22)
-#define OMAP24XX_ST_UART1                              (1 << 21)
-#define OMAP24XX_ST_MCSPI2                             (1 << 18)
-#define OMAP24XX_ST_MCSPI1                             (1 << 17)
-#define OMAP24XX_ST_GPT12                              (1 << 14)
-#define OMAP24XX_ST_GPT11                              (1 << 13)
-#define OMAP24XX_ST_GPT10                              (1 << 12)
-#define OMAP24XX_ST_GPT9                               (1 << 11)
-#define OMAP24XX_ST_GPT8                               (1 << 10)
-#define OMAP24XX_ST_GPT7                               (1 << 9)
-#define OMAP24XX_ST_GPT6                               (1 << 8)
-#define OMAP24XX_ST_GPT5                               (1 << 7)
-#define OMAP24XX_ST_GPT4                               (1 << 6)
-#define OMAP24XX_ST_GPT3                               (1 << 5)
-#define OMAP24XX_ST_GPT2                               (1 << 4)
-#define OMAP2420_ST_VLYNQ                              (1 << 3)
+#define OMAP2420_ST_MMC_SHIFT                          26
+#define OMAP2420_ST_MMC_MASK                           (1 << 26)
+#define OMAP24XX_ST_UART2_SHIFT                                22
+#define OMAP24XX_ST_UART2_MASK                         (1 << 22)
+#define OMAP24XX_ST_UART1_SHIFT                                21
+#define OMAP24XX_ST_UART1_MASK                         (1 << 21)
+#define OMAP24XX_ST_MCSPI2_SHIFT                       18
+#define OMAP24XX_ST_MCSPI2_MASK                                (1 << 18)
+#define OMAP24XX_ST_MCSPI1_SHIFT                       17
+#define OMAP24XX_ST_MCSPI1_MASK                                (1 << 17)
+#define OMAP24XX_ST_GPT12_SHIFT                                14
+#define OMAP24XX_ST_GPT12_MASK                         (1 << 14)
+#define OMAP24XX_ST_GPT11_SHIFT                                13
+#define OMAP24XX_ST_GPT11_MASK                         (1 << 13)
+#define OMAP24XX_ST_GPT10_SHIFT                                12
+#define OMAP24XX_ST_GPT10_MASK                         (1 << 12)
+#define OMAP24XX_ST_GPT9_SHIFT                         11
+#define OMAP24XX_ST_GPT9_MASK                          (1 << 11)
+#define OMAP24XX_ST_GPT8_SHIFT                         10
+#define OMAP24XX_ST_GPT8_MASK                          (1 << 10)
+#define OMAP24XX_ST_GPT7_SHIFT                         9
+#define OMAP24XX_ST_GPT7_MASK                          (1 << 9)
+#define OMAP24XX_ST_GPT6_SHIFT                         8
+#define OMAP24XX_ST_GPT6_MASK                          (1 << 8)
+#define OMAP24XX_ST_GPT5_SHIFT                         7
+#define OMAP24XX_ST_GPT5_MASK                          (1 << 7)
+#define OMAP24XX_ST_GPT4_SHIFT                         6
+#define OMAP24XX_ST_GPT4_MASK                          (1 << 6)
+#define OMAP24XX_ST_GPT3_SHIFT                         5
+#define OMAP24XX_ST_GPT3_MASK                          (1 << 5)
+#define OMAP24XX_ST_GPT2_SHIFT                         4
+#define OMAP24XX_ST_GPT2_MASK                          (1 << 4)
+#define OMAP2420_ST_VLYNQ_SHIFT                                3
+#define OMAP2420_ST_VLYNQ_MASK                         (1 << 3)
 
 /* CM_IDLEST2_CORE, PM_WKST2_CORE shared bits */
-#define OMAP2430_ST_MDM_INTC                           (1 << 11)
-#define OMAP2430_ST_GPIO5                              (1 << 10)
-#define OMAP2430_ST_MCSPI3                             (1 << 9)
-#define OMAP2430_ST_MMCHS2                             (1 << 8)
-#define OMAP2430_ST_MMCHS1                             (1 << 7)
-#define OMAP2430_ST_USBHS                              (1 << 6)
-#define OMAP24XX_ST_UART3                              (1 << 2)
-#define OMAP24XX_ST_USB                                        (1 << 0)
+#define OMAP2430_ST_MDM_INTC_SHIFT                     11
+#define OMAP2430_ST_MDM_INTC_MASK                      (1 << 11)
+#define OMAP2430_ST_GPIO5_SHIFT                                10
+#define OMAP2430_ST_GPIO5_MASK                         (1 << 10)
+#define OMAP2430_ST_MCSPI3_SHIFT                       9
+#define OMAP2430_ST_MCSPI3_MASK                                (1 << 9)
+#define OMAP2430_ST_MMCHS2_SHIFT                       8
+#define OMAP2430_ST_MMCHS2_MASK                                (1 << 8)
+#define OMAP2430_ST_MMCHS1_SHIFT                       7
+#define OMAP2430_ST_MMCHS1_MASK                                (1 << 7)
+#define OMAP2430_ST_USBHS_SHIFT                                6
+#define OMAP2430_ST_USBHS_MASK                         (1 << 6)
+#define OMAP24XX_ST_UART3_SHIFT                                2
+#define OMAP24XX_ST_UART3_MASK                         (1 << 2)
+#define OMAP24XX_ST_USB_SHIFT                          0
+#define OMAP24XX_ST_USB_MASK                           (1 << 0)
 
 /* CM_FCLKEN_WKUP, CM_ICLKEN_WKUP, PM_WKEN_WKUP shared bits */
 #define OMAP24XX_EN_GPIOS_SHIFT                                2
 #define OMAP24XX_EN_GPT1                               (1 << 0)
 
 /* PM_WKST_WKUP, CM_IDLEST_WKUP shared bits */
-#define OMAP24XX_ST_GPIOS                              (1 << 2)
-#define OMAP24XX_ST_GPT1                               (1 << 0)
+#define OMAP24XX_ST_GPIOS_SHIFT                                (1 << 2)
+#define OMAP24XX_ST_GPIOS_MASK                         2
+#define OMAP24XX_ST_GPT1_SHIFT                         (1 << 0)
+#define OMAP24XX_ST_GPT1_MASK                          0
 
 /* CM_IDLEST_MDM and PM_WKST_MDM shared bits */
-#define OMAP2430_ST_MDM                                        (1 << 0)
+#define OMAP2430_ST_MDM_SHIFT                          (1 << 0)
 
 
 /* 3430 register bits shared between CM & PRM registers */
 #define OMAP3430_EN_HSOTGUSB_SHIFT                             4
 
 /* PM_WKST1_CORE, CM_IDLEST1_CORE shared bits */
-#define OMAP3430_ST_MMC2                               (1 << 25)
-#define OMAP3430_ST_MMC1                               (1 << 24)
-#define OMAP3430_ST_MCSPI4                             (1 << 21)
-#define OMAP3430_ST_MCSPI3                             (1 << 20)
-#define OMAP3430_ST_MCSPI2                             (1 << 19)
-#define OMAP3430_ST_MCSPI1                             (1 << 18)
-#define OMAP3430_ST_I2C3                               (1 << 17)
-#define OMAP3430_ST_I2C2                               (1 << 16)
-#define OMAP3430_ST_I2C1                               (1 << 15)
-#define OMAP3430_ST_UART2                              (1 << 14)
-#define OMAP3430_ST_UART1                              (1 << 13)
-#define OMAP3430_ST_GPT11                              (1 << 12)
-#define OMAP3430_ST_GPT10                              (1 << 11)
-#define OMAP3430_ST_MCBSP5                             (1 << 10)
-#define OMAP3430_ST_MCBSP1                             (1 << 9)
-#define OMAP3430_ST_FSHOSTUSB                          (1 << 5)
-#define OMAP3430_ST_HSOTGUSB                           (1 << 4)
-#define OMAP3430_ST_D2D                                        (1 << 3)
+#define OMAP3430_ST_MMC2_SHIFT                         25
+#define OMAP3430_ST_MMC2_MASK                          (1 << 25)
+#define OMAP3430_ST_MMC1_SHIFT                         24
+#define OMAP3430_ST_MMC1_MASK                          (1 << 24)
+#define OMAP3430_ST_MCSPI4_SHIFT                       21
+#define OMAP3430_ST_MCSPI4_MASK                                (1 << 21)
+#define OMAP3430_ST_MCSPI3_SHIFT                       20
+#define OMAP3430_ST_MCSPI3_MASK                                (1 << 20)
+#define OMAP3430_ST_MCSPI2_SHIFT                       19
+#define OMAP3430_ST_MCSPI2_MASK                                (1 << 19)
+#define OMAP3430_ST_MCSPI1_SHIFT                       18
+#define OMAP3430_ST_MCSPI1_MASK                                (1 << 18)
+#define OMAP3430_ST_I2C3_SHIFT                         17
+#define OMAP3430_ST_I2C3_MASK                          (1 << 17)
+#define OMAP3430_ST_I2C2_SHIFT                         16
+#define OMAP3430_ST_I2C2_MASK                          (1 << 16)
+#define OMAP3430_ST_I2C1_SHIFT                         15
+#define OMAP3430_ST_I2C1_MASK                          (1 << 15)
+#define OMAP3430_ST_UART2_SHIFT                                14
+#define OMAP3430_ST_UART2_MASK                         (1 << 14)
+#define OMAP3430_ST_UART1_SHIFT                                13
+#define OMAP3430_ST_UART1_MASK                         (1 << 13)
+#define OMAP3430_ST_GPT11_SHIFT                                12
+#define OMAP3430_ST_GPT11_MASK                         (1 << 12)
+#define OMAP3430_ST_GPT10_SHIFT                                11
+#define OMAP3430_ST_GPT10_MASK                         (1 << 11)
+#define OMAP3430_ST_MCBSP5_SHIFT                       10
+#define OMAP3430_ST_MCBSP5_MASK                                (1 << 10)
+#define OMAP3430_ST_MCBSP1_SHIFT                       9
+#define OMAP3430_ST_MCBSP1_MASK                                (1 << 9)
+#define OMAP3430ES1_ST_FSHOSTUSB_SHIFT                 5
+#define OMAP3430ES1_ST_FSHOSTUSB_MASK                  (1 << 5)
+#define OMAP3430ES1_ST_HSOTGUSB_SHIFT                  4
+#define OMAP3430ES1_ST_HSOTGUSB_MASK                   (1 << 4)
+#define OMAP3430ES2_ST_HSOTGUSB_IDLE_SHIFT             5
+#define OMAP3430ES2_ST_HSOTGUSB_IDLE_MASK              (1 << 5)
+#define OMAP3430ES2_ST_HSOTGUSB_STDBY_SHIFT            4
+#define OMAP3430ES2_ST_HSOTGUSB_STDBY_MASK             (1 << 4)
+#define OMAP3430_ST_D2D_SHIFT                          3
+#define OMAP3430_ST_D2D_MASK                           (1 << 3)
 
 /* CM_FCLKEN_WKUP, CM_ICLKEN_WKUP, PM_WKEN_WKUP shared bits */
 #define OMAP3430_EN_GPIO1                              (1 << 3)
 #define OMAP3430_EN_GPT12_SHIFT                                1
 
 /* CM_IDLEST_WKUP, PM_WKST_WKUP shared bits */
-#define OMAP3430_ST_SR2                                        (1 << 7)
-#define OMAP3430_ST_SR1                                        (1 << 6)
-#define OMAP3430_ST_GPIO1                              (1 << 3)
-#define OMAP3430_ST_GPT12                              (1 << 1)
-#define OMAP3430_ST_GPT1                               (1 << 0)
+#define OMAP3430_ST_SR2_SHIFT                          7
+#define OMAP3430_ST_SR2_MASK                           (1 << 7)
+#define OMAP3430_ST_SR1_SHIFT                          6
+#define OMAP3430_ST_SR1_MASK                           (1 << 6)
+#define OMAP3430_ST_GPIO1_SHIFT                                3
+#define OMAP3430_ST_GPIO1_MASK                         (1 << 3)
+#define OMAP3430_ST_GPT12_SHIFT                                1
+#define OMAP3430_ST_GPT12_MASK                         (1 << 1)
+#define OMAP3430_ST_GPT1_SHIFT                         0
+#define OMAP3430_ST_GPT1_MASK                          (1 << 0)
 
 /*
  * CM_SLEEPDEP_GFX, CM_SLEEPDEP_DSS, CM_SLEEPDEP_CAM,
 #define OMAP3430_EN_MCBSP2_SHIFT                       0
 
 /* CM_IDLEST_PER, PM_WKST_PER shared bits */
-#define OMAP3430_ST_GPIO6                              (1 << 17)
-#define OMAP3430_ST_GPIO5                              (1 << 16)
-#define OMAP3430_ST_GPIO4                              (1 << 15)
-#define OMAP3430_ST_GPIO3                              (1 << 14)
-#define OMAP3430_ST_GPIO2                              (1 << 13)
-#define OMAP3430_ST_UART3                              (1 << 11)
-#define OMAP3430_ST_GPT9                               (1 << 10)
-#define OMAP3430_ST_GPT8                               (1 << 9)
-#define OMAP3430_ST_GPT7                               (1 << 8)
-#define OMAP3430_ST_GPT6                               (1 << 7)
-#define OMAP3430_ST_GPT5                               (1 << 6)
-#define OMAP3430_ST_GPT4                               (1 << 5)
-#define OMAP3430_ST_GPT3                               (1 << 4)
-#define OMAP3430_ST_GPT2                               (1 << 3)
+#define OMAP3430_ST_GPIO6_SHIFT                                17
+#define OMAP3430_ST_GPIO6_MASK                         (1 << 17)
+#define OMAP3430_ST_GPIO5_SHIFT                                16
+#define OMAP3430_ST_GPIO5_MASK                         (1 << 16)
+#define OMAP3430_ST_GPIO4_SHIFT                                15
+#define OMAP3430_ST_GPIO4_MASK                         (1 << 15)
+#define OMAP3430_ST_GPIO3_SHIFT                                14
+#define OMAP3430_ST_GPIO3_MASK                         (1 << 14)
+#define OMAP3430_ST_GPIO2_SHIFT                                13
+#define OMAP3430_ST_GPIO2_MASK                         (1 << 13)
+#define OMAP3430_ST_UART3_SHIFT                                11
+#define OMAP3430_ST_UART3_MASK                         (1 << 11)
+#define OMAP3430_ST_GPT9_SHIFT                         10
+#define OMAP3430_ST_GPT9_MASK                          (1 << 10)
+#define OMAP3430_ST_GPT8_SHIFT                         9
+#define OMAP3430_ST_GPT8_MASK                          (1 << 9)
+#define OMAP3430_ST_GPT7_SHIFT                         8
+#define OMAP3430_ST_GPT7_MASK                          (1 << 8)
+#define OMAP3430_ST_GPT6_SHIFT                         7
+#define OMAP3430_ST_GPT6_MASK                          (1 << 7)
+#define OMAP3430_ST_GPT5_SHIFT                         6
+#define OMAP3430_ST_GPT5_MASK                          (1 << 6)
+#define OMAP3430_ST_GPT4_SHIFT                         5
+#define OMAP3430_ST_GPT4_MASK                          (1 << 5)
+#define OMAP3430_ST_GPT3_SHIFT                         4
+#define OMAP3430_ST_GPT3_MASK                          (1 << 4)
+#define OMAP3430_ST_GPT2_SHIFT                         3
+#define OMAP3430_ST_GPT2_MASK                          (1 << 3)
 
 /* CM_SLEEPDEP_PER, PM_WKDEP_IVA2, PM_WKDEP_MPU, PM_WKDEP_PER shared bits */
 #define OMAP3430_EN_CORE_SHIFT                         0
index 5b5ecfe6c99916847b88b50db7235f3b8c51fedc..c6a7940f42870cab6d613c2194a5713dacef5def 100644 (file)
 
 /* PM_WKEN_WKUP specific bits */
 #define OMAP3430_EN_IO                                 (1 << 8)
+#define OMAP3430_EN_GPIO1                              (1 << 3)
 
 /* PM_MPUGRPSEL_WKUP specific bits */
 
 #define OMAP3430_CMDRA0_MASK                           (0xff << 0)
 
 /* PRM_VC_CMD_VAL_0 specific bits */
+#define OMAP3430_VC_CMD_ON_SHIFT                       24
+#define OMAP3430_VC_CMD_ON_MASK                                (0xFF << 24)
+#define OMAP3430_VC_CMD_ONLP_SHIFT                     16
+#define OMAP3430_VC_CMD_ONLP_MASK                      (0xFF << 16)
+#define OMAP3430_VC_CMD_RET_SHIFT                      8
+#define OMAP3430_VC_CMD_RET_MASK                       (0xFF << 8)
+#define OMAP3430_VC_CMD_OFF_SHIFT                      0
+#define OMAP3430_VC_CMD_OFF_MASK                       (0xFF << 0)
 
 /* PRM_VC_CMD_VAL_1 specific bits */
 
index e4dc4b17881d2e9cbc198aefb7bf148ac4e50688..826d326b8062d2e2177f0fbfdb3c72e25a88c324 100644 (file)
 #define PM_PWSTCTRL                                    0x00e0
 #define PM_PWSTST                                      0x00e4
 
+/* Omap2 specific registers */
+#define OMAP24XX_PM_WKEN2                              0x00a4
+#define OMAP24XX_PM_WKST2                              0x00b4
+
+#define OMAP24XX_PRCM_IRQSTATUS_DSP                    0x00f0  /* IVA mod */
+#define OMAP24XX_PRCM_IRQENABLE_DSP                    0x00f4  /* IVA mod */
+#define OMAP24XX_PRCM_IRQSTATUS_IVA                    0x00f8
+#define OMAP24XX_PRCM_IRQENABLE_IVA                    0x00fc
+
+/* Omap3 specific registers */
+#define OMAP3430ES2_PM_WKEN3                           0x00f0
+#define OMAP3430ES2_PM_WKST3                           0x00b8
+
 #define OMAP3430_PM_MPUGRPSEL                          0x00a4
 #define OMAP3430_PM_MPUGRPSEL1                         OMAP3430_PM_MPUGRPSEL
 
 #define OMAP3430_PRM_IRQENABLE_IVA2                    0x00fc
 
 
-/* Architecture-specific registers */
-
-#define OMAP24XX_PM_WKEN2                              0x00a4
-#define OMAP24XX_PM_WKST2                              0x00b4
-
-#define OMAP24XX_PRCM_IRQSTATUS_DSP                    0x00f0  /* IVA mod */
-#define OMAP24XX_PRCM_IRQENABLE_DSP                    0x00f4  /* IVA mod */
-#define OMAP24XX_PRCM_IRQSTATUS_IVA                    0x00f8
-#define OMAP24XX_PRCM_IRQENABLE_IVA                    0x00fc
-
 #ifndef __ASSEMBLER__
 
 /* Power/reset management domain register get/set */
@@ -228,7 +231,6 @@ static inline u32 prm_clear_mod_reg_bits(u32 bits, s16 module, s16 idx)
 #define OMAP_RSTTIME1_SHIFT                            0
 #define OMAP_RSTTIME1_MASK                             (0xff << 0)
 
-
 /* PRM_RSTCTRL */
 /* Named RM_RSTCTRL_WKUP on the 24xx */
 /* 2420 calls RST_DPLL3 'RST_DPLL' */
diff --git a/arch/arm/mach-omap2/sdrc.c b/arch/arm/mach-omap2/sdrc.c
new file mode 100644 (file)
index 0000000..2a30060
--- /dev/null
@@ -0,0 +1,93 @@
+/*
+ * SMS/SDRC (SDRAM controller) common code for OMAP2/3
+ *
+ * Copyright (C) 2005, 2008 Texas Instruments Inc.
+ * Copyright (C) 2005, 2008 Nokia Corporation
+ *
+ * Tony Lindgren <tony@atomide.com>
+ * Paul Walmsley
+ * Richard Woodruff <r-woodruff2@ti.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#undef DEBUG
+
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/device.h>
+#include <linux/list.h>
+#include <linux/errno.h>
+#include <linux/delay.h>
+#include <linux/clk.h>
+#include <linux/io.h>
+
+#include <mach/common.h>
+#include <mach/clock.h>
+#include <mach/sram.h>
+
+#include "prm.h"
+
+#include <mach/sdrc.h>
+#include "sdrc.h"
+
+static struct omap_sdrc_params *sdrc_init_params;
+
+void __iomem *omap2_sdrc_base;
+void __iomem *omap2_sms_base;
+
+
+/**
+ * omap2_sdrc_get_params - return SDRC register values for a given clock rate
+ * @r: SDRC clock rate (in Hz)
+ *
+ * Return pre-calculated values for the SDRC_ACTIM_CTRLA,
+ * SDRC_ACTIM_CTRLB, SDRC_RFR_CTRL, and SDRC_MR registers, for a given
+ * SDRC clock rate 'r'.  These parameters control various timing
+ * delays in the SDRAM controller that are expressed in terms of the
+ * number of SDRC clock cycles to wait; hence the clock rate
+ * dependency. Note that sdrc_init_params must be sorted rate
+ * descending.  Also assumes that both chip-selects use the same
+ * timing parameters.  Returns a struct omap_sdrc_params * upon
+ * success, or NULL upon failure.
+ */
+struct omap_sdrc_params *omap2_sdrc_get_params(unsigned long r)
+{
+       struct omap_sdrc_params *sp;
+
+       sp = sdrc_init_params;
+
+       while (sp->rate != r)
+               sp++;
+
+       if (!sp->rate)
+               return NULL;
+
+       return sp;
+}
+
+
+void __init omap2_set_globals_sdrc(struct omap_globals *omap2_globals)
+{
+       omap2_sdrc_base = omap2_globals->sdrc;
+       omap2_sms_base = omap2_globals->sms;
+}
+
+/* turn on smart idle modes for SDRAM scheduler and controller */
+void __init omap2_sdrc_init(struct omap_sdrc_params *sp)
+{
+       u32 l;
+
+       l = sms_read_reg(SMS_SYSCONFIG);
+       l &= ~(0x3 << 3);
+       l |= (0x2 << 3);
+       sms_write_reg(l, SMS_SYSCONFIG);
+
+       l = sdrc_read_reg(SDRC_SYSCONFIG);
+       l &= ~(0x3 << 3);
+       l |= (0x2 << 3);
+       sdrc_write_reg(l, SDRC_SYSCONFIG);
+
+       sdrc_init_params = sp;
+}
similarity index 67%
rename from arch/arm/mach-omap2/memory.c
rename to arch/arm/mach-omap2/sdrc2xxx.c
index 882c7022429260a291b60221b2ee587098608a22..0afdad5ae9fb3c689f2365aa1ce90297031873eb 100644 (file)
@@ -1,13 +1,14 @@
 /*
- * linux/arch/arm/mach-omap2/memory.c
+ * linux/arch/arm/mach-omap2/sdrc2xxx.c
  *
- * Memory timing related functions for OMAP24XX
+ * SDRAM timing related functions for OMAP2xxx
  *
- * Copyright (C) 2005 Texas Instruments Inc.
- * Richard Woodruff <r-woodruff2@ti.com>
+ * Copyright (C) 2005, 2008 Texas Instruments Inc.
+ * Copyright (C) 2005, 2008 Nokia Corporation
  *
- * Copyright (C) 2005 Nokia Corporation
  * Tony Lindgren <tony@atomide.com>
+ * Paul Walmsley
+ * Richard Woodruff <r-woodruff2@ti.com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
 #include <mach/sram.h>
 
 #include "prm.h"
-
-#include "memory.h"
+#include "clock.h"
+#include <mach/sdrc.h>
 #include "sdrc.h"
 
-void __iomem *omap2_sdrc_base;
-void __iomem *omap2_sms_base;
+/* Memory timing, DLL mode flags */
+#define M_DDR          1
+#define M_LOCK_CTRL    (1 << 2)
+#define M_UNLOCK       0
+#define M_LOCK         1
+
 
 static struct memory_timings mem_timings;
 static u32 curr_perf_level = CORE_CLK_SRC_DPLL_X2;
 
-u32 omap2_memory_get_slow_dll_ctrl(void)
+static u32 omap2xxx_sdrc_get_slow_dll_ctrl(void)
 {
        return mem_timings.slow_dll_ctrl;
 }
 
-u32 omap2_memory_get_fast_dll_ctrl(void)
+static u32 omap2xxx_sdrc_get_fast_dll_ctrl(void)
 {
        return mem_timings.fast_dll_ctrl;
 }
 
-u32 omap2_memory_get_type(void)
+static u32 omap2xxx_sdrc_get_type(void)
 {
        return mem_timings.m_type;
 }
@@ -57,7 +62,7 @@ u32 omap2_memory_get_type(void)
  * Check the DLL lock state, and return tue if running in unlock mode.
  * This is needed to compensate for the shifted DLL value in unlock mode.
  */
-u32 omap2_dll_force_needed(void)
+u32 omap2xxx_sdrc_dll_is_unlocked(void)
 {
        /* dlla and dllb are a set */
        u32 dll_state = sdrc_read_reg(SDRC_DLLA_CTRL);
@@ -72,8 +77,10 @@ u32 omap2_dll_force_needed(void)
  * 'level' is the value to store to CM_CLKSEL2_PLL.CORE_CLK_SRC.
  * Practical values are CORE_CLK_SRC_DPLL (for CORE_CLK = DPLL_CLK) or
  * CORE_CLK_SRC_DPLL_X2 (for CORE_CLK = * DPLL_CLK * 2)
+ *
+ * Used by the clock framework during CORE DPLL changes
  */
-u32 omap2_reprogram_sdrc(u32 level, u32 force)
+u32 omap2xxx_sdrc_reprogram(u32 level, u32 force)
 {
        u32 dll_ctrl, m_type;
        u32 prev = curr_perf_level;
@@ -82,15 +89,14 @@ u32 omap2_reprogram_sdrc(u32 level, u32 force)
        if ((curr_perf_level == level) && !force)
                return prev;
 
-       if (level == CORE_CLK_SRC_DPLL) {
-               dll_ctrl = omap2_memory_get_slow_dll_ctrl();
-       } else if (level == CORE_CLK_SRC_DPLL_X2) {
-               dll_ctrl = omap2_memory_get_fast_dll_ctrl();
-       } else {
+       if (level == CORE_CLK_SRC_DPLL)
+               dll_ctrl = omap2xxx_sdrc_get_slow_dll_ctrl();
+       else if (level == CORE_CLK_SRC_DPLL_X2)
+               dll_ctrl = omap2xxx_sdrc_get_fast_dll_ctrl();
+       else
                return prev;
-       }
 
-       m_type = omap2_memory_get_type();
+       m_type = omap2xxx_sdrc_get_type();
 
        local_irq_save(flags);
        __raw_writel(0xffff, OMAP24XX_PRCM_VOLTSETUP);
@@ -101,23 +107,14 @@ u32 omap2_reprogram_sdrc(u32 level, u32 force)
        return prev;
 }
 
-#if !defined(CONFIG_ARCH_OMAP2)
-void omap2_sram_ddr_init(u32 *slow_dll_ctrl, u32 fast_dll_ctrl,
-                               u32 base_cs, u32 force_unlock)
-{
-}
-void omap2_sram_reprogram_sdrc(u32 perf_level, u32 dll_val,
-                                     u32 mem_type)
-{
-}
-#endif
-
-void omap2_init_memory_params(u32 force_lock_to_unlock_mode)
+/* Used by the clock framework during CORE DPLL changes */
+void omap2xxx_sdrc_init_params(u32 force_lock_to_unlock_mode)
 {
        unsigned long dll_cnt;
        u32 fast_dll = 0;
 
-       mem_timings.m_type = !((sdrc_read_reg(SDRC_MR_0) & 0x3) == 0x1); /* DDR = 1, SDR = 0 */
+       /* DDR = 1, SDR = 0 */
+       mem_timings.m_type = !((sdrc_read_reg(SDRC_MR_0) & 0x3) == 0x1);
 
        /* 2422 es2.05 and beyond has a single SIP DDR instead of 2 like others.
         * In the case of 2422, its ok to use CS1 instead of CS0.
@@ -164,28 +161,3 @@ void omap2_init_memory_params(u32 force_lock_to_unlock_mode)
        /* 90 degree phase for anything below 133Mhz + disable DLL filter */
        mem_timings.slow_dll_ctrl |= ((1 << 1) | (3 << 8));
 }
-
-void __init omap2_set_globals_memory(struct omap_globals *omap2_globals)
-{
-       omap2_sdrc_base = omap2_globals->sdrc;
-       omap2_sms_base = omap2_globals->sms;
-}
-
-/* turn on smart idle modes for SDRAM scheduler and controller */
-void __init omap2_init_memory(void)
-{
-       u32 l;
-
-       if (!cpu_is_omap2420())
-               return;
-
-       l = sms_read_reg(SMS_SYSCONFIG);
-       l &= ~(0x3 << 3);
-       l |= (0x2 << 3);
-       sms_write_reg(l, SMS_SYSCONFIG);
-
-       l = sdrc_read_reg(SDRC_SYSCONFIG);
-       l &= ~(0x3 << 3);
-       l |= (0x2 << 3);
-       sdrc_write_reg(l, SDRC_SYSCONFIG);
-}
index 08e430757890d984171f7dffa99953e69ea74a9e..9b8db1dcfa830a3acf1bfe884afc13a43ef48f32 100644 (file)
@@ -19,7 +19,7 @@ static inline void arch_idle(void)
        cpu_do_idle();
 }
 
-static inline void arch_reset(char mode)
+static inline void arch_reset(char mode, const char *cmd)
 {
        /*
         * Enable and issue soft reset
index e0c43b8beb72afa27ba50f15c5d30732461a8874..c9bf6b81a80d9bc415dc5bcd10e98bf365bbe42a 100644 (file)
@@ -186,7 +186,7 @@ static struct mv_sata_platform_data lsmini_sata_data = {
 
 static void lsmini_power_off(void)
 {
-       arch_reset(0);
+       arch_reset(0, NULL);
 }
 
 
index e12e7abfcbcf34a7316a3d41808475a51769e600..5dda2bb55f8d838fb817877572feafb7fc076004 100644 (file)
@@ -30,7 +30,7 @@ static void arch_idle(void)
        cpu_do_idle();
 }
 
-static inline void arch_reset(char mode)
+static inline void arch_reset(char mode, const char *cmd)
 {
        cpu_reset(0);
 }
index 8eea7306f29bc7bbe97e4b9657fbda59f5576a9b..96a2006cb597919566f0a95150ad196ca2555ace 100644 (file)
@@ -40,6 +40,9 @@ choice
 config GUMSTIX_AM200EPD
        bool "Enable AM200EPD board support"
 
+config GUMSTIX_AM300EPD
+       bool "Enable AM300EPD board support"
+
 endchoice
 
 config MACH_INTELMOTE2
@@ -254,10 +257,24 @@ config MACH_EM_X270
        bool "CompuLab EM-x270 platform"
        select PXA27x
 
+config MACH_EXEDA
+       bool "CompuLab eXeda platform"
+       select PXA27x
+
 config MACH_COLIBRI
-       bool "Toradex Colibri PX27x"
+       bool "Toradex Colibri PXA270"
        select PXA27x
 
+config MACH_COLIBRI300
+       bool "Toradex Colibri PXA300/310"
+       select PXA3xx
+       select CPU_PXA300
+
+config MACH_COLIBRI320
+       bool "Toradex Colibri PXA320"
+       select PXA3xx
+       select CPU_PXA320
+
 config MACH_ZYLONITE
        bool "PXA3xx Development Platform (aka Zylonite)"
        select PXA3xx
@@ -295,8 +312,15 @@ config MACH_MAGICIAN
        bool "Enable HTC Magician Support"
        select PXA27x
        select IWMMXT
+       select PXA_SSP
+       select HAVE_PWM
        select PXA_HAVE_BOARD_IRQS
 
+config MACH_HIMALAYA
+       bool "HTC Himalaya Support"
+       select CPU_PXA26x
+       select FB_W100
+
 config MACH_MIOA701
        bool "Mitac Mio A701 Support"
        select PXA27x
@@ -319,6 +343,16 @@ config ARCH_PXA_PALM
        bool "PXA based Palm PDAs"
        select HAVE_PWM
 
+config MACH_PALMT5
+       bool "Palm Tungsten|T5"
+       default y
+       depends on ARCH_PXA_PALM
+       select PXA27x
+       select IWMMXT
+       help
+         Say Y here if you intend to run this kernel on a Palm Tungsten|T5
+         handheld computer.
+
 config MACH_PALMTX
        bool "Palm T|X"
        default y
@@ -339,6 +373,16 @@ config MACH_PALMZ72
          Say Y here if you intend to run this kernel on Palm Zire 72
          handheld computer.
 
+config MACH_PALMLD
+       bool "Palm LifeDrive"
+       default y
+       depends on ARCH_PXA_PALM
+       select PXA27x
+       select IWMMXT
+       help
+         Say Y here if you intend to run this kernel on a Palm LifeDrive
+         handheld computer.
+
 config MACH_PCM990_BASEBOARD
        bool "PHYTEC PCM-990 development board"
        select HAVE_PWM
@@ -359,6 +403,18 @@ config PCM990_DISPLAY_NONE
 
 endchoice
 
+config MACH_CSB726
+       bool "Enable Cogent CSB726 System On a Module"
+       select PXA27x
+       select IWMMXT
+       help
+         Say Y here if you intend to run this kernel on a Cogent
+         CSB726 System On Module.
+
+config CSB726_CSB701
+       bool "Enable supprot for CSB701 baseboard"
+       depends on MACH_CSB726
+
 config PXA_EZX
        bool "Motorola EZX Platform"
        select PXA27x
index 7b28bb561d63c07830ea3ad04551d9ec44bd92fe..c80e1bac4945a71a5759dc87ec4fa81b94c15db5 100644 (file)
@@ -3,8 +3,8 @@
 #
 
 # Common support (must be linked before board specific support)
-obj-y                          += clock.o devices.o generic.o irq.o dma.o \
-                                  time.o gpio.o reset.o
+obj-y                          += clock.o devices.o generic.o irq.o \
+                                  time.o reset.o
 obj-$(CONFIG_PM)               += pm.o sleep.o standby.o
 
 ifeq ($(CONFIG_CPU_FREQ),y)
@@ -28,13 +28,16 @@ obj-$(CONFIG_CPU_PXA930)    += pxa930.o
 # Specific board support
 obj-$(CONFIG_ARCH_GUMSTIX)     += gumstix.o
 obj-$(CONFIG_GUMSTIX_AM200EPD) += am200epd.o
+obj-$(CONFIG_GUMSTIX_AM300EPD) += am300epd.o
 obj-$(CONFIG_ARCH_LUBBOCK)     += lubbock.o
 obj-$(CONFIG_MACH_LOGICPD_PXA270) += lpd270.o
 obj-$(CONFIG_MACH_MAINSTONE)   += mainstone.o
 obj-$(CONFIG_MACH_MP900C)      += mp900.o
 obj-$(CONFIG_ARCH_PXA_IDP)     += idp.o
 obj-$(CONFIG_MACH_TRIZEPS4)    += trizeps4.o
-obj-$(CONFIG_MACH_COLIBRI)     += colibri.o
+obj-$(CONFIG_MACH_COLIBRI)     += colibri-pxa270.o
+obj-$(CONFIG_MACH_COLIBRI300)  += colibri-pxa3xx.o colibri-pxa300.o
+obj-$(CONFIG_MACH_COLIBRI320)  += colibri-pxa3xx.o colibri-pxa320.o
 obj-$(CONFIG_MACH_H5000)       += h5000.o
 obj-$(CONFIG_PXA_SHARP_C7xx)   += corgi.o sharpsl_pm.o corgi_pm.o
 obj-$(CONFIG_PXA_SHARP_Cxx00)  += spitz.o sharpsl_pm.o spitz_pm.o
@@ -45,6 +48,7 @@ obj-$(CONFIG_MACH_PCM990_BASEBOARD)   += pcm990-baseboard.o
 obj-$(CONFIG_MACH_TOSA)                += tosa.o
 obj-$(CONFIG_MACH_EM_X270)     += em-x270.o
 obj-$(CONFIG_MACH_MAGICIAN)    += magician.o
+obj-$(CONFIG_MACH_HIMALAYA)    += himalaya.o
 obj-$(CONFIG_MACH_MIOA701)     += mioa701.o mioa701_bootresume.o
 obj-$(CONFIG_ARCH_PXA_ESERIES) += eseries.o
 obj-$(CONFIG_MACH_E330)                += e330.o
@@ -53,7 +57,9 @@ obj-$(CONFIG_MACH_E740)               += e740.o
 obj-$(CONFIG_MACH_E750)                += e750.o
 obj-$(CONFIG_MACH_E400)                += e400.o
 obj-$(CONFIG_MACH_E800)                += e800.o
+obj-$(CONFIG_MACH_PALMT5)      += palmt5.o
 obj-$(CONFIG_MACH_PALMTX)      += palmtx.o
+obj-$(CONFIG_MACH_PALMLD)      += palmld.o
 obj-$(CONFIG_MACH_PALMZ72)     += palmz72.o
 obj-$(CONFIG_ARCH_VIPER)       += viper.o
 
@@ -71,6 +77,8 @@ obj-$(CONFIG_MACH_CM_X300)      += cm-x300.o
 obj-$(CONFIG_PXA_EZX)           += ezx.o
 
 obj-$(CONFIG_MACH_INTELMOTE2)   += imote2.o
+obj-$(CONFIG_MACH_CSB726)      += csb726.o
+obj-$(CONFIG_CSB726_CSB701)    += csb701.o
 
 # Support for blinky lights
 led-y := leds.o
index 77ee80e5e47b028574b553a56597165f251375ab..3499fada73ae06546ec8011ddacae2ffb8ed864c 100644 (file)
@@ -30,8 +30,8 @@
 #include <linux/irq.h>
 #include <linux/gpio.h>
 
+#include <mach/pxa25x.h>
 #include <mach/gumstix.h>
-#include <mach/mfp-pxa25x.h>
 #include <mach/pxafb.h>
 
 #include "generic.h"
diff --git a/arch/arm/mach-pxa/am300epd.c b/arch/arm/mach-pxa/am300epd.c
new file mode 100644 (file)
index 0000000..4bd10a1
--- /dev/null
@@ -0,0 +1,295 @@
+/*
+ * am300epd.c -- Platform device for AM300 EPD kit
+ *
+ * Copyright (C) 2008, Jaya Kumar
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file COPYING in the main directory of this archive for
+ * more details.
+ *
+ * This work was made possible by help and equipment support from E-Ink
+ * Corporation. http://support.eink.com/community
+ *
+ * This driver is written to be used with the Broadsheet display controller.
+ * on the AM300 EPD prototype kit/development kit with an E-Ink 800x600
+ * Vizplex EPD on a Gumstix board using the Broadsheet interface board.
+ *
+ */
+
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/string.h>
+#include <linux/delay.h>
+#include <linux/interrupt.h>
+#include <linux/fb.h>
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/irq.h>
+#include <linux/gpio.h>
+
+#include <mach/gumstix.h>
+#include <mach/mfp-pxa25x.h>
+#include <mach/pxafb.h>
+
+#include "generic.h"
+
+#include <video/broadsheetfb.h>
+
+static unsigned int panel_type = 6;
+static struct platform_device *am300_device;
+static struct broadsheet_board am300_board;
+
+static unsigned long am300_pin_config[] __initdata = {
+       GPIO16_GPIO,
+       GPIO17_GPIO,
+       GPIO32_GPIO,
+       GPIO48_GPIO,
+       GPIO49_GPIO,
+       GPIO51_GPIO,
+       GPIO74_GPIO,
+       GPIO75_GPIO,
+       GPIO76_GPIO,
+       GPIO77_GPIO,
+
+       /* this is the 16-bit hdb bus 58-73 */
+       GPIO58_GPIO,
+       GPIO59_GPIO,
+       GPIO60_GPIO,
+       GPIO61_GPIO,
+
+       GPIO62_GPIO,
+       GPIO63_GPIO,
+       GPIO64_GPIO,
+       GPIO65_GPIO,
+
+       GPIO66_GPIO,
+       GPIO67_GPIO,
+       GPIO68_GPIO,
+       GPIO69_GPIO,
+
+       GPIO70_GPIO,
+       GPIO71_GPIO,
+       GPIO72_GPIO,
+       GPIO73_GPIO,
+};
+
+/* register offsets for gpio control */
+#define PWR_GPIO_PIN   16
+#define CFG_GPIO_PIN   17
+#define RDY_GPIO_PIN   32
+#define DC_GPIO_PIN    48
+#define RST_GPIO_PIN   49
+#define LED_GPIO_PIN   51
+#define RD_GPIO_PIN    74
+#define WR_GPIO_PIN    75
+#define CS_GPIO_PIN    76
+#define IRQ_GPIO_PIN   77
+
+/* hdb bus */
+#define DB0_GPIO_PIN   58
+#define DB15_GPIO_PIN  73
+
+static int gpios[] = { PWR_GPIO_PIN, CFG_GPIO_PIN, RDY_GPIO_PIN, DC_GPIO_PIN,
+                       RST_GPIO_PIN, RD_GPIO_PIN, WR_GPIO_PIN, CS_GPIO_PIN,
+                       IRQ_GPIO_PIN, LED_GPIO_PIN };
+static char *gpio_names[] = { "PWR", "CFG", "RDY", "DC", "RST", "RD", "WR",
+                               "CS", "IRQ", "LED" };
+
+static int am300_wait_event(struct broadsheetfb_par *par)
+{
+       /* todo: improve err recovery */
+       wait_event(par->waitq, gpio_get_value(RDY_GPIO_PIN));
+       return 0;
+}
+
+static int am300_init_gpio_regs(struct broadsheetfb_par *par)
+{
+       int i;
+       int err;
+       char dbname[8];
+
+       for (i = 0; i < ARRAY_SIZE(gpios); i++) {
+               err = gpio_request(gpios[i], gpio_names[i]);
+               if (err) {
+                       dev_err(&am300_device->dev, "failed requesting "
+                               "gpio %s, err=%d\n", gpio_names[i], err);
+                       goto err_req_gpio;
+               }
+       }
+
+       /* we also need to take care of the hdb bus */
+       for (i = DB0_GPIO_PIN; i <= DB15_GPIO_PIN; i++) {
+               sprintf(dbname, "DB%d", i);
+               err = gpio_request(i, dbname);
+               if (err) {
+                       dev_err(&am300_device->dev, "failed requesting "
+                               "gpio %d, err=%d\n", i, err);
+                       while (i >= DB0_GPIO_PIN)
+                               gpio_free(i--);
+                       i = ARRAY_SIZE(gpios) - 1;
+                       goto err_req_gpio;
+               }
+       }
+
+       /* setup the outputs and init values */
+       gpio_direction_output(PWR_GPIO_PIN, 0);
+       gpio_direction_output(CFG_GPIO_PIN, 1);
+       gpio_direction_output(DC_GPIO_PIN, 0);
+       gpio_direction_output(RD_GPIO_PIN, 1);
+       gpio_direction_output(WR_GPIO_PIN, 1);
+       gpio_direction_output(CS_GPIO_PIN, 1);
+       gpio_direction_output(RST_GPIO_PIN, 0);
+
+       /* setup the inputs */
+       gpio_direction_input(RDY_GPIO_PIN);
+       gpio_direction_input(IRQ_GPIO_PIN);
+
+       /* start the hdb bus as an input */
+       for (i = DB0_GPIO_PIN; i <= DB15_GPIO_PIN; i++)
+               gpio_direction_output(i, 0);
+
+       /* go into command mode */
+       gpio_set_value(CFG_GPIO_PIN, 1);
+       gpio_set_value(RST_GPIO_PIN, 0);
+       msleep(10);
+       gpio_set_value(RST_GPIO_PIN, 1);
+       msleep(10);
+       am300_wait_event(par);
+
+       return 0;
+
+err_req_gpio:
+       while (i > 0)
+               gpio_free(gpios[i--]);
+
+       return err;
+}
+
+static int am300_init_board(struct broadsheetfb_par *par)
+{
+       return am300_init_gpio_regs(par);
+}
+
+static void am300_cleanup(struct broadsheetfb_par *par)
+{
+       int i;
+
+       free_irq(IRQ_GPIO(RDY_GPIO_PIN), par);
+
+       for (i = 0; i < ARRAY_SIZE(gpios); i++)
+               gpio_free(gpios[i]);
+
+       for (i = DB0_GPIO_PIN; i <= DB15_GPIO_PIN; i++)
+               gpio_free(i);
+
+}
+
+static u16 am300_get_hdb(struct broadsheetfb_par *par)
+{
+       u16 res = 0;
+       int i;
+
+       for (i = 0; i <= (DB15_GPIO_PIN - DB0_GPIO_PIN) ; i++)
+               res |= (gpio_get_value(DB0_GPIO_PIN + i)) ? (1 << i) : 0;
+
+       return res;
+}
+
+static void am300_set_hdb(struct broadsheetfb_par *par, u16 data)
+{
+       int i;
+
+       for (i = 0; i <= (DB15_GPIO_PIN - DB0_GPIO_PIN) ; i++)
+               gpio_set_value(DB0_GPIO_PIN + i, (data >> i) & 0x01);
+}
+
+
+static void am300_set_ctl(struct broadsheetfb_par *par, unsigned char bit,
+                               u8 state)
+{
+       switch (bit) {
+       case BS_CS:
+               gpio_set_value(CS_GPIO_PIN, state);
+               break;
+       case BS_DC:
+               gpio_set_value(DC_GPIO_PIN, state);
+               break;
+       case BS_WR:
+               gpio_set_value(WR_GPIO_PIN, state);
+               break;
+       }
+}
+
+static int am300_get_panel_type(void)
+{
+       return panel_type;
+}
+
+static irqreturn_t am300_handle_irq(int irq, void *dev_id)
+{
+       struct broadsheetfb_par *par = dev_id;
+
+       wake_up(&par->waitq);
+       return IRQ_HANDLED;
+}
+
+static int am300_setup_irq(struct fb_info *info)
+{
+       int ret;
+       struct broadsheetfb_par *par = info->par;
+
+       ret = request_irq(IRQ_GPIO(RDY_GPIO_PIN), am300_handle_irq,
+                               IRQF_DISABLED|IRQF_TRIGGER_RISING,
+                               "AM300", par);
+       if (ret)
+               dev_err(&am300_device->dev, "request_irq failed: %d\n", ret);
+
+       return ret;
+}
+
+static struct broadsheet_board am300_board = {
+       .owner                  = THIS_MODULE,
+       .init                   = am300_init_board,
+       .cleanup                = am300_cleanup,
+       .set_hdb                = am300_set_hdb,
+       .get_hdb                = am300_get_hdb,
+       .set_ctl                = am300_set_ctl,
+       .wait_for_rdy           = am300_wait_event,
+       .get_panel_type         = am300_get_panel_type,
+       .setup_irq              = am300_setup_irq,
+};
+
+int __init am300_init(void)
+{
+       int ret;
+
+       pxa2xx_mfp_config(ARRAY_AND_SIZE(am300_pin_config));
+
+       /* request our platform independent driver */
+       request_module("broadsheetfb");
+
+       am300_device = platform_device_alloc("broadsheetfb", -1);
+       if (!am300_device)
+               return -ENOMEM;
+
+       /* the am300_board that will be seen by broadsheetfb is a copy */
+       platform_device_add_data(am300_device, &am300_board,
+                                       sizeof(am300_board));
+
+       ret = platform_device_add(am300_device);
+
+       if (ret) {
+               platform_device_put(am300_device);
+               return ret;
+       }
+
+       return 0;
+}
+
+module_param(panel_type, uint, 0);
+MODULE_PARM_DESC(panel_type, "Select the panel type: 6, 8, 97");
+
+MODULE_DESCRIPTION("board driver for am300 epd kit");
+MODULE_AUTHOR("Jaya Kumar");
+MODULE_LICENSE("GPL");
index 40b77408451488cc11f1408ab8c768f92980a16b..db52d2c4791da521ab5fffe61056046746e9e658 100644 (file)
@@ -87,7 +87,7 @@ void clks_register(struct clk_lookup *clks, size_t num)
                clkdev_add(&clks[i]);
 }
 
-int clk_add_alias(char *alias, struct device *alias_dev, char *id,
+int clk_add_alias(const char *alias, const char *alias_dev_name, char *id,
        struct device *dev)
 {
        struct clk *r = clk_get(dev, id);
@@ -96,7 +96,7 @@ int clk_add_alias(char *alias, struct device *alias_dev, char *id,
        if (!r)
                return -ENODEV;
 
-       l = clkdev_alloc(r, alias, alias_dev ? dev_name(alias_dev) : NULL);
+       l = clkdev_alloc(r, alias, alias_dev_name);
        clk_put(r);
        if (!l)
                return -ENODEV;
index 4e9c613c6767e24b557f83281927e4c9df01ce6e..5599bceff738341344ca0f1041371453423e41e2 100644 (file)
@@ -69,6 +69,6 @@ extern void clk_pxa3xx_cken_disable(struct clk *);
 #endif
 
 void clks_register(struct clk_lookup *clks, size_t num);
-int clk_add_alias(char *alias, struct device *alias_dev, char *id,
+int clk_add_alias(const char *alias, const char *alias_name, char *id,
        struct device *dev);
 
index 83a4cdf081760c342132ebe358386e13dea52ce3..253fd76142d61349802a280011590b2b2a682e90 100644 (file)
 #include <asm/mach-types.h>
 #include <asm/mach/map.h>
 
-#include <mach/pxa2xx-regs.h>
-#include <mach/mfp-pxa25x.h>
+#include <mach/pxa25x.h>
 #include <mach/pxa2xx_spi.h>
-#include <mach/bitfield.h>
 
 #include "generic.h"
 
index df83b97f303fd989c0df1795cea48c98ea82ecf6..34576ba5f5fd0a8d9e059fed35534f139a463335 100644 (file)
@@ -17,7 +17,7 @@
 #include <linux/rtc-v3020.h>
 #include <video/mbxfb.h>
 
-#include <mach/mfp-pxa27x.h>
+#include <mach/pxa27x.h>
 #include <mach/ohci.h>
 #include <mach/mmc.h>
 
index 3156b25f6e9dce438b93a2cac629ceb67ae0d610..7873fa3d8fa4ae17504c84b3caf3d3e13cc1d0aa 100644 (file)
@@ -22,7 +22,6 @@
 #include <linux/gpio.h>
 
 #include <asm/mach/pci.h>
-#include <mach/pxa-regs.h>
 #include <asm/mach-types.h>
 
 #include <asm/hardware/it8152.h>
index d99fd9e4d8885d6e1300a42dbfbae76e6a2cbe51..117b5435f8d572358e98fc4b63952c79e9c06f84 100644 (file)
@@ -22,8 +22,6 @@
 #include <asm/mach/map.h>
 
 #include <mach/pxa2xx-regs.h>
-#include <mach/mfp-pxa27x.h>
-#include <mach/pxa-regs.h>
 #include <mach/audio.h>
 #include <mach/pxafb.h>
 
@@ -96,7 +94,7 @@ static struct resource cmx270_dm9000_resource[] = {
 };
 
 static struct dm9000_plat_data cmx270_dm9000_platdata = {
-       .flags          = DM9000_PLATF_32BITONLY,
+       .flags          = DM9000_PLATF_32BITONLY | DM9000_PLATF_NO_EEPROM,
 };
 
 static struct platform_device cmx2xx_dm9000_device = {
index ff0c577cd1ac6213ffdc474acb0803d581744693..a9f48b1cb54a2aa726831b899827a59fa81e85ca 100644 (file)
@@ -28,9 +28,7 @@
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 
-#include <mach/mfp-pxa300.h>
-
-#include <mach/hardware.h>
+#include <mach/pxa300.h>
 #include <mach/pxafb.h>
 #include <mach/mmc.h>
 #include <mach/ohci.h>
@@ -162,7 +160,7 @@ static struct resource dm9000_resources[] = {
 };
 
 static struct dm9000_plat_data cm_x300_dm9000_platdata = {
-       .flags          = DM9000_PLATF_16BITONLY,
+       .flags          = DM9000_PLATF_16BITONLY | DM9000_PLATF_NO_EEPROM,
 };
 
 static struct platform_device dm9000_device = {
similarity index 67%
rename from arch/arm/mach-pxa/colibri.c
rename to arch/arm/mach-pxa/colibri-pxa270.c
index e8473624427eed4ad613466b20398c14fcf062a0..01bcfaae75bc2d03b56aec59f8f68dadde9c84c1 100644 (file)
@@ -1,7 +1,7 @@
 /*
- *  linux/arch/arm/mach-pxa/colibri.c
+ *  linux/arch/arm/mach-pxa/colibri-pxa270.c
  *
- *  Support for Toradex PXA27x based Colibri module
+ *  Support for Toradex PXA270 based Colibri module
  *  Daniel Mack <daniel@caiaq.de>
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -20,6 +20,7 @@
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
 #include <linux/mtd/physmap.h>
+#include <linux/gpio.h>
 #include <asm/mach-types.h>
 #include <mach/hardware.h>
 #include <asm/irq.h>
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 #include <asm/mach/flash.h>
-#include <mach/pxa-regs.h>
-#include <mach/mfp-pxa27x.h>
+
+#include <mach/pxa27x.h>
 #include <mach/colibri.h>
 
 #include "generic.h"
 #include "devices.h"
 
-static unsigned long colibri_pin_config[] __initdata = {
+/*
+ * GPIO configuration
+ */
+static mfp_cfg_t colibri_pxa270_pin_config[] __initdata = {
        GPIO78_nCS_2,   /* Ethernet CS */
        GPIO114_GPIO,   /* Ethernet IRQ */
 };
 
 /*
- * Flash
+ * NOR flash
  */
 static struct mtd_partition colibri_partitions[] = {
        {
@@ -70,39 +74,40 @@ static struct physmap_flash_data colibri_flash_data[] = {
        }
 };
 
-static struct resource flash_resource = {
+static struct resource colibri_pxa270_flash_resource = {
        .start  = PXA_CS0_PHYS,
        .end    = PXA_CS0_PHYS + SZ_32M - 1,
        .flags  = IORESOURCE_MEM,
 };
 
-static struct platform_device flash_device = {
+static struct platform_device colibri_pxa270_flash_device = {
        .name   = "physmap-flash",
        .id     = 0,
        .dev    = {
                .platform_data = colibri_flash_data,
        },
-       .resource = &flash_resource,
+       .resource = &colibri_pxa270_flash_resource,
        .num_resources = 1,
 };
 
 /*
  * DM9000 Ethernet
  */
+#if defined(CONFIG_DM9000)
 static struct resource dm9000_resources[] = {
        [0] = {
-               .start  = COLIBRI_ETH_PHYS,
-               .end    = COLIBRI_ETH_PHYS + 3,
+               .start  = COLIBRI_PXA270_ETH_PHYS,
+               .end    = COLIBRI_PXA270_ETH_PHYS + 3,
                .flags  = IORESOURCE_MEM,
        },
        [1] = {
-               .start  = COLIBRI_ETH_PHYS + 4,
-               .end    = COLIBRI_ETH_PHYS + 4 + 500,
+               .start  = COLIBRI_PXA270_ETH_PHYS + 4,
+               .end    = COLIBRI_PXA270_ETH_PHYS + 4 + 500,
                .flags  = IORESOURCE_MEM,
        },
        [2] = {
-               .start  = COLIBRI_ETH_IRQ,
-               .end    = COLIBRI_ETH_IRQ,
+               .start  = COLIBRI_PXA270_ETH_IRQ,
+               .end    = COLIBRI_PXA270_ETH_IRQ,
                .flags  = IORESOURCE_IRQ | IRQF_TRIGGER_RISING,
        },
 };
@@ -113,25 +118,28 @@ static struct platform_device dm9000_device = {
        .num_resources  = ARRAY_SIZE(dm9000_resources),
        .resource       = dm9000_resources,
 };
+#endif /* CONFIG_DM9000 */
 
-static struct platform_device *colibri_devices[] __initdata = {
-       &flash_device,
+static struct platform_device *colibri_pxa270_devices[] __initdata = {
+       &colibri_pxa270_flash_device,
+#if defined(CONFIG_DM9000)
        &dm9000_device,
+#endif
 };
 
-static void __init colibri_init(void)
+static void __init colibri_pxa270_init(void)
 {
-       pxa2xx_mfp_config(ARRAY_AND_SIZE(colibri_pin_config));
-
-       platform_add_devices(colibri_devices, ARRAY_SIZE(colibri_devices));
+       pxa2xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa270_pin_config));
+       platform_add_devices(ARRAY_AND_SIZE(colibri_pxa270_devices));
 }
 
-MACHINE_START(COLIBRI, "Toradex Colibri PXA27x")
+MACHINE_START(COLIBRI, "Toradex Colibri PXA270")
        .phys_io        = 0x40000000,
        .io_pg_offst    = (io_p2v(0x40000000) >> 18) & 0xfffc,
        .boot_params    = COLIBRI_SDRAM_BASE + 0x100,
-       .init_machine   = colibri_init,
+       .init_machine   = colibri_pxa270_init,
        .map_io         = pxa_map_io,
        .init_irq       = pxa27x_init_irq,
        .timer          = &pxa_timer,
 MACHINE_END
+
diff --git a/arch/arm/mach-pxa/colibri-pxa300.c b/arch/arm/mach-pxa/colibri-pxa300.c
new file mode 100644 (file)
index 0000000..169ab55
--- /dev/null
@@ -0,0 +1,190 @@
+/*
+ *  arch/arm/mach-pxa/colibri-pxa300.c
+ *
+ *  Support for Toradex PXA300/310 based Colibri module
+ *
+ *  Daniel Mack <daniel@caiaq.de>
+ *  Matthias Meier <matthias.j.meier@gmx.net>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ */
+
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/platform_device.h>
+#include <linux/gpio.h>
+#include <net/ax88796.h>
+
+#include <asm/mach-types.h>
+#include <asm/sizes.h>
+#include <asm/mach/arch.h>
+#include <asm/mach/irq.h>
+
+#include <mach/pxa300.h>
+#include <mach/colibri.h>
+#include <mach/ohci.h>
+#include <mach/pxafb.h>
+
+#include "generic.h"
+#include "devices.h"
+
+#if defined(CONFIG_AX88796)
+#define COLIBRI_ETH_IRQ_GPIO   mfp_to_gpio(GPIO26_GPIO)
+/*
+ * Asix AX88796 Ethernet
+ */
+static struct ax_plat_data colibri_asix_platdata = {
+       .flags          = AXFLG_MAC_FROMDEV,
+       .wordlength     = 2
+};
+
+static struct resource colibri_asix_resource[] = {
+       [0] = {
+               .start = PXA3xx_CS2_PHYS,
+               .end   = PXA3xx_CS2_PHYS + (0x20 * 2) - 1,
+               .flags = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start = gpio_to_irq(COLIBRI_ETH_IRQ_GPIO),
+               .end   = gpio_to_irq(COLIBRI_ETH_IRQ_GPIO),
+               .flags = IORESOURCE_IRQ
+       }
+};
+
+static struct platform_device asix_device = {
+       .name           = "ax88796",
+       .id             = 0,
+       .num_resources  = ARRAY_SIZE(colibri_asix_resource),
+       .resource       = colibri_asix_resource,
+       .dev            = {
+               .platform_data = &colibri_asix_platdata
+       }
+};
+
+static mfp_cfg_t colibri_pxa300_eth_pin_config[] __initdata = {
+       GPIO1_nCS2,                     /* AX88796 chip select */
+       GPIO26_GPIO | MFP_PULL_HIGH     /* AX88796 IRQ */
+};
+
+static void __init colibri_pxa300_init_eth(void)
+{
+       pxa3xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa300_eth_pin_config));
+       set_irq_type(gpio_to_irq(COLIBRI_ETH_IRQ_GPIO), IRQ_TYPE_EDGE_FALLING);
+       platform_device_register(&asix_device);
+}
+#else
+static inline void __init colibri_pxa300_init_eth(void) {}
+#endif /* CONFIG_AX88796 */
+
+#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
+static mfp_cfg_t colibri_pxa300_usb_pin_config[] __initdata = {
+       GPIO0_2_USBH_PEN,
+       GPIO1_2_USBH_PWR,
+};
+
+static struct pxaohci_platform_data colibri_pxa300_ohci_info = {
+       .port_mode      = PMM_GLOBAL_MODE,
+       .flags          = ENABLE_PORT1 | POWER_CONTROL_LOW | POWER_SENSE_LOW,
+};
+
+void __init colibri_pxa300_init_ohci(void)
+{
+       pxa3xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa300_usb_pin_config));
+       pxa_set_ohci_info(&colibri_pxa300_ohci_info);
+}
+#else
+static inline void colibri_pxa300_init_ohci(void) {}
+#endif /* CONFIG_USB_OHCI_HCD || CONFIG_USB_OHCI_HCD_MODULE */
+
+static mfp_cfg_t colibri_pxa300_mmc_pin_config[] __initdata = {
+       GPIO7_MMC1_CLK,
+       GPIO14_MMC1_CMD,
+       GPIO3_MMC1_DAT0,
+       GPIO4_MMC1_DAT1,
+       GPIO5_MMC1_DAT2,
+       GPIO6_MMC1_DAT3,
+};
+
+#if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE)
+static mfp_cfg_t colibri_pxa300_lcd_pin_config[] __initdata = {
+       GPIO54_LCD_LDD_0,
+       GPIO55_LCD_LDD_1,
+       GPIO56_LCD_LDD_2,
+       GPIO57_LCD_LDD_3,
+       GPIO58_LCD_LDD_4,
+       GPIO59_LCD_LDD_5,
+       GPIO60_LCD_LDD_6,
+       GPIO61_LCD_LDD_7,
+       GPIO62_LCD_LDD_8,
+       GPIO63_LCD_LDD_9,
+       GPIO64_LCD_LDD_10,
+       GPIO65_LCD_LDD_11,
+       GPIO66_LCD_LDD_12,
+       GPIO67_LCD_LDD_13,
+       GPIO68_LCD_LDD_14,
+       GPIO69_LCD_LDD_15,
+       GPIO70_LCD_LDD_16,
+       GPIO71_LCD_LDD_17,
+       GPIO62_LCD_CS_N,
+       GPIO72_LCD_FCLK,
+       GPIO73_LCD_LCLK,
+       GPIO74_LCD_PCLK,
+       GPIO75_LCD_BIAS,
+       GPIO76_LCD_VSYNC,
+};
+
+static void __init colibri_pxa300_init_lcd(void)
+{
+       pxa3xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa300_lcd_pin_config));
+}
+
+#else
+static inline void colibri_pxa300_init_lcd(void) {}
+#endif /* CONFIG_FB_PXA || CONFIG_FB_PXA_MODULE */
+
+#if defined(SND_AC97_CODEC) || defined(SND_AC97_CODEC_MODULE)
+static mfp_cfg_t colibri_pxa310_ac97_pin_config[] __initdata = {
+       GPIO24_AC97_SYSCLK,
+       GPIO23_AC97_nACRESET,
+       GPIO25_AC97_SDATA_IN_0,
+       GPIO27_AC97_SDATA_OUT,
+       GPIO28_AC97_SYNC,
+       GPIO29_AC97_BITCLK
+};
+
+static inline void __init colibri_pxa310_init_ac97(void)
+{
+       /* no AC97 codec on Colibri PXA300 */
+       if (!cpu_is_pxa310())
+               return;
+
+       pxa3xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa310_ac97_pin_config));
+       pxa_set_ac97_info(NULL);
+}
+#else
+static inline void colibri_pxa310_init_ac97(void) {}
+#endif
+
+void __init colibri_pxa300_init(void)
+{
+       colibri_pxa300_init_eth();
+       colibri_pxa300_init_ohci();
+       colibri_pxa300_init_lcd();
+       colibri_pxa3xx_init_lcd(mfp_to_gpio(GPIO49_GPIO));
+       colibri_pxa310_init_ac97();
+       colibri_pxa3xx_init_mmc(ARRAY_AND_SIZE(colibri_pxa300_mmc_pin_config),
+                               mfp_to_gpio(MFP_PIN_GPIO13));
+}
+
+MACHINE_START(COLIBRI300, "Toradex Colibri PXA300")
+       .phys_io        = 0x40000000,
+       .io_pg_offst    = (io_p2v(0x40000000) >> 18) & 0xfffc,
+       .boot_params    = COLIBRI_SDRAM_BASE + 0x100,
+       .init_machine   = colibri_pxa300_init,
+       .map_io         = pxa_map_io,
+       .init_irq       = pxa3xx_init_irq,
+       .timer          = &pxa_timer,
+MACHINE_END
+
diff --git a/arch/arm/mach-pxa/colibri-pxa320.c b/arch/arm/mach-pxa/colibri-pxa320.c
new file mode 100644 (file)
index 0000000..573a9a1
--- /dev/null
@@ -0,0 +1,187 @@
+/*
+ *  arch/arm/mach-pxa/colibri-pxa320.c
+ *
+ *  Support for Toradex PXA320/310 based Colibri module
+ *
+ *  Daniel Mack <daniel@caiaq.de>
+ *  Matthias Meier <matthias.j.meier@gmx.net>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ */
+
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/platform_device.h>
+#include <linux/gpio.h>
+#include <net/ax88796.h>
+
+#include <asm/mach-types.h>
+#include <asm/sizes.h>
+#include <asm/mach/arch.h>
+#include <asm/mach/irq.h>
+
+#include <mach/pxa3xx-regs.h>
+#include <mach/mfp-pxa320.h>
+#include <mach/colibri.h>
+#include <mach/pxafb.h>
+#include <mach/ohci.h>
+
+#include "generic.h"
+#include "devices.h"
+
+#if defined(CONFIG_AX88796)
+#define COLIBRI_ETH_IRQ_GPIO   mfp_to_gpio(GPIO36_GPIO)
+
+/*
+ * Asix AX88796 Ethernet
+ */
+static struct ax_plat_data colibri_asix_platdata = {
+       .flags          = AXFLG_MAC_FROMDEV,
+       .wordlength     = 2
+};
+
+static struct resource colibri_asix_resource[] = {
+       [0] = {
+               .start = PXA3xx_CS2_PHYS,
+               .end   = PXA3xx_CS2_PHYS + (0x20 * 2) - 1,
+               .flags = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start = gpio_to_irq(COLIBRI_ETH_IRQ_GPIO),
+               .end   = gpio_to_irq(COLIBRI_ETH_IRQ_GPIO),
+               .flags = IORESOURCE_IRQ
+       }
+};
+
+static struct platform_device asix_device = {
+       .name           = "ax88796",
+       .id             = 0,
+       .num_resources  = ARRAY_SIZE(colibri_asix_resource),
+       .resource       = colibri_asix_resource,
+       .dev            = {
+               .platform_data = &colibri_asix_platdata
+       }
+};
+
+static mfp_cfg_t colibri_pxa320_eth_pin_config[] __initdata = {
+       GPIO3_nCS2,                     /* AX88796 chip select */
+       GPIO36_GPIO | MFP_PULL_HIGH     /* AX88796 IRQ */
+};
+
+static void __init colibri_pxa320_init_eth(void)
+{
+       pxa3xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa320_eth_pin_config));
+       set_irq_type(gpio_to_irq(COLIBRI_ETH_IRQ_GPIO), IRQ_TYPE_EDGE_FALLING);
+       platform_device_register(&asix_device);
+}
+#else
+static inline void __init colibri_pxa320_init_eth(void) {}
+#endif /* CONFIG_AX88796 */
+
+#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
+static mfp_cfg_t colibri_pxa320_usb_pin_config[] __initdata = {
+       GPIO2_2_USBH_PEN,
+       GPIO3_2_USBH_PWR,
+};
+
+static struct pxaohci_platform_data colibri_pxa320_ohci_info = {
+       .port_mode      = PMM_GLOBAL_MODE,
+       .flags          = ENABLE_PORT1 | POWER_CONTROL_LOW | POWER_SENSE_LOW,
+};
+
+void __init colibri_pxa320_init_ohci(void)
+{
+       pxa3xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa320_usb_pin_config));
+       pxa_set_ohci_info(&colibri_pxa320_ohci_info);
+}
+#else
+static inline void colibri_pxa320_init_ohci(void) {}
+#endif /* CONFIG_USB_OHCI_HCD || CONFIG_USB_OHCI_HCD_MODULE */
+
+static mfp_cfg_t colibri_pxa320_mmc_pin_config[] __initdata = {
+       GPIO22_MMC1_CLK,
+       GPIO23_MMC1_CMD,
+       GPIO18_MMC1_DAT0,
+       GPIO19_MMC1_DAT1,
+       GPIO20_MMC1_DAT2,
+       GPIO21_MMC1_DAT3
+};
+
+#if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE)
+static mfp_cfg_t colibri_pxa320_lcd_pin_config[] __initdata = {
+       GPIO6_2_LCD_LDD_0,
+       GPIO7_2_LCD_LDD_1,
+       GPIO8_2_LCD_LDD_2,
+       GPIO9_2_LCD_LDD_3,
+       GPIO10_2_LCD_LDD_4,
+       GPIO11_2_LCD_LDD_5,
+       GPIO12_2_LCD_LDD_6,
+       GPIO13_2_LCD_LDD_7,
+       GPIO63_LCD_LDD_8,
+       GPIO64_LCD_LDD_9,
+       GPIO65_LCD_LDD_10,
+       GPIO66_LCD_LDD_11,
+       GPIO67_LCD_LDD_12,
+       GPIO68_LCD_LDD_13,
+       GPIO69_LCD_LDD_14,
+       GPIO70_LCD_LDD_15,
+       GPIO71_LCD_LDD_16,
+       GPIO72_LCD_LDD_17,
+       GPIO73_LCD_CS_N,
+       GPIO74_LCD_VSYNC,
+       GPIO14_2_LCD_FCLK,
+       GPIO15_2_LCD_LCLK,
+       GPIO16_2_LCD_PCLK,
+       GPIO17_2_LCD_BIAS,
+};
+
+static void __init colibri_pxa320_init_lcd(void)
+{
+       pxa3xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa320_lcd_pin_config));
+}
+#else
+static inline void colibri_pxa320_init_lcd(void) {}
+#endif
+
+#if defined(SND_AC97_CODEC) || defined(SND_AC97_CODEC_MODULE)
+static mfp_cfg_t colibri_pxa320_ac97_pin_config[] __initdata = {
+       GPIO34_AC97_SYSCLK,
+       GPIO35_AC97_SDATA_IN_0,
+       GPIO37_AC97_SDATA_OUT,
+       GPIO38_AC97_SYNC,
+       GPIO39_AC97_BITCLK,
+       GPIO40_AC97_nACRESET
+};
+
+static inline void __init colibri_pxa320_init_ac97(void)
+{
+       pxa3xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa320_ac97_pin_config));
+       pxa_set_ac97_info(NULL);
+}
+#else
+static inline void colibri_pxa320_init_ac97(void) {}
+#endif
+
+void __init colibri_pxa320_init(void)
+{
+       colibri_pxa320_init_eth();
+       colibri_pxa320_init_ohci();
+       colibri_pxa320_init_lcd();
+       colibri_pxa3xx_init_lcd(mfp_to_gpio(GPIO39_GPIO));
+       colibri_pxa320_init_ac97();
+       colibri_pxa3xx_init_mmc(ARRAY_AND_SIZE(colibri_pxa320_mmc_pin_config),
+                               mfp_to_gpio(MFP_PIN_GPIO28));
+}
+
+MACHINE_START(COLIBRI320, "Toradex Colibri PXA320")
+       .phys_io        = 0x40000000,
+       .io_pg_offst    = (io_p2v(0x40000000) >> 18) & 0xfffc,
+       .boot_params    = COLIBRI_SDRAM_BASE + 0x100,
+       .init_machine   = colibri_pxa320_init,
+       .map_io         = pxa_map_io,
+       .init_irq       = pxa3xx_init_irq,
+       .timer          = &pxa_timer,
+MACHINE_END
+
diff --git a/arch/arm/mach-pxa/colibri-pxa3xx.c b/arch/arm/mach-pxa/colibri-pxa3xx.c
new file mode 100644 (file)
index 0000000..12d0afc
--- /dev/null
@@ -0,0 +1,121 @@
+/*
+ *  arch/arm/mach-pxa/colibri-pxa3xx.c
+ *
+ *  Common functions for all Toradex PXA3xx modules
+ *
+ *  Daniel Mack <daniel@caiaq.de>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ */
+
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/platform_device.h>
+#include <linux/gpio.h>
+#include <asm/mach-types.h>
+#include <mach/hardware.h>
+#include <asm/sizes.h>
+#include <asm/mach/arch.h>
+#include <asm/mach/irq.h>
+#include <mach/pxa3xx-regs.h>
+#include <mach/mfp-pxa300.h>
+#include <mach/colibri.h>
+#include <mach/mmc.h>
+#include <mach/pxafb.h>
+
+#include "generic.h"
+#include "devices.h"
+
+#if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE)
+static int mmc_detect_pin;
+
+static int colibri_pxa3xx_mci_init(struct device *dev,
+                                  irq_handler_t colibri_mmc_detect_int,
+                                  void *data)
+{
+       int ret;
+
+       ret = gpio_request(mmc_detect_pin, "mmc card detect");
+       if (ret)
+               return ret;
+
+       gpio_direction_input(mmc_detect_pin);
+       ret = request_irq(gpio_to_irq(mmc_detect_pin), colibri_mmc_detect_int,
+                         IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
+                         "MMC card detect", data);
+       if (ret) {
+               gpio_free(mmc_detect_pin);
+               return ret;
+       }
+
+       return 0;
+}
+
+static void colibri_pxa3xx_mci_exit(struct device *dev, void *data)
+{
+       free_irq(mmc_detect_pin, data);
+       gpio_free(gpio_to_irq(mmc_detect_pin));
+}
+
+static struct pxamci_platform_data colibri_pxa3xx_mci_platform_data = {
+       .detect_delay   = 20,
+       .ocr_mask       = MMC_VDD_32_33 | MMC_VDD_33_34,
+       .init           = colibri_pxa3xx_mci_init,
+       .exit           = colibri_pxa3xx_mci_exit,
+};
+
+void __init colibri_pxa3xx_init_mmc(mfp_cfg_t *pins, int len, int detect_pin)
+{
+       pxa3xx_mfp_config(pins, len);
+       mmc_detect_pin = detect_pin;
+       pxa_set_mci_info(&colibri_pxa3xx_mci_platform_data);
+}
+#endif /* CONFIG_MMC_PXA || CONFIG_MMC_PXA_MODULE */
+
+#if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE)
+static int lcd_bl_pin;
+
+/*
+ * LCD panel (Sharp LQ043T3DX02)
+ */
+static void colibri_lcd_backlight(int on)
+{
+       gpio_set_value(lcd_bl_pin, !!on);
+}
+
+static struct pxafb_mode_info sharp_lq43_mode = {
+       .pixclock       = 101936,
+       .xres           = 480,
+       .yres           = 272,
+       .bpp            = 32,
+       .depth          = 18,
+       .hsync_len      = 41,
+       .left_margin    = 2,
+       .right_margin   = 2,
+       .vsync_len      = 10,
+       .upper_margin   = 2,
+       .lower_margin   = 2,
+       .sync           = 0,
+       .cmap_greyscale = 0,
+};
+
+static struct pxafb_mach_info sharp_lq43_info = {
+       .modes          = &sharp_lq43_mode,
+       .num_modes      = 1,
+       .cmap_inverse   = 0,
+       .cmap_static    = 0,
+       .lcd_conn       = LCD_COLOR_TFT_18BPP,
+       .pxafb_backlight_power = colibri_lcd_backlight,
+};
+
+void __init colibri_pxa3xx_init_lcd(int bl_pin)
+{
+       lcd_bl_pin = bl_pin;
+       gpio_request(bl_pin, "lcd backlight");
+       gpio_direction_output(bl_pin, 0);
+       set_pxa_fb_info(&sharp_lq43_info);
+}
+#endif
+
index a8d91b6c136b8daba787e724a16d725fb8553157..cdf21dd135b4ee4dc3bc246af54481a214c31b4b 100644 (file)
@@ -41,9 +41,7 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/pxa-regs.h>
-#include <mach/pxa2xx-regs.h>
-#include <mach/mfp-pxa25x.h>
+#include <mach/pxa25x.h>
 #include <mach/i2c.h>
 #include <mach/irda.h>
 #include <mach/mmc.h>
@@ -637,16 +635,16 @@ static void corgi_poweroff(void)
                /* Green LED off tells the bootloader to halt */
                gpio_set_value(CORGI_GPIO_LED_GREEN, 0);
 
-       arm_machine_restart('h');
+       arm_machine_restart('h', NULL);
 }
 
-static void corgi_restart(char mode)
+static void corgi_restart(char mode, const char *cmd)
 {
        if (!machine_is_corgi())
                /* Green LED on tells the bootloader to reboot */
                gpio_set_value(CORGI_GPIO_LED_GREEN, 1);
 
-       arm_machine_restart('h');
+       arm_machine_restart('h', cmd);
 }
 
 static void __init corgi_init(void)
index 411607bc1fc2ea81dfe4e5e8361800b7b431b996..d9b96319d498a00215cb1a32eeea6cd9ae5b1eba 100644 (file)
@@ -22,7 +22,6 @@
 #include <linux/string.h>
 #include <mach/corgi.h>
 #include <mach/hardware.h>
-#include <mach/pxa-regs.h>
 #include <mach/sharpsl.h>
 #include <mach/spitz.h>
 #include <asm/hardware/scoop.h>
index e35259032813ae82543a75bd24b8a3a69f3f2fd8..7f04b3a761d12d2bda0af50d07b85ae889f68a78 100644 (file)
@@ -24,7 +24,6 @@
 
 #include <mach/sharpsl.h>
 #include <mach/corgi.h>
-#include <mach/pxa-regs.h>
 #include <mach/pxa2xx-regs.h>
 #include <mach/pxa2xx-gpio.h>
 #include "sharpsl.h"
index 8e2f2215c4bac609529fed84388a7142b9e420ed..a5ee70735e04ab4b45f62c99dad2b7976c1bde42 100644 (file)
@@ -20,7 +20,6 @@
 #include <asm/mach-types.h>
 
 #include <mach/ssp.h>
-#include <mach/pxa-regs.h>
 #include <mach/pxa2xx-gpio.h>
 #include <mach/regs-ssp.h>
 #include "sharpsl.h"
index 771dd4eac93508ac7494db0bc5b4f7f230e9b457..083a1d851d494f82f7ddbddc765338b5af220f08 100644 (file)
@@ -37,8 +37,6 @@
 #include <linux/init.h>
 #include <linux/cpufreq.h>
 
-#include <mach/hardware.h>
-#include <mach/pxa-regs.h>
 #include <mach/pxa2xx-regs.h>
 
 #ifdef DEBUG
index 968c8309ec37226247d8c2604a332c2048f4225d..67f34a8d8e60ee58c7f9257fd4812d9dd827dc34 100644 (file)
@@ -15,8 +15,6 @@
 #include <linux/init.h>
 #include <linux/cpufreq.h>
 
-#include <mach/hardware.h>
-#include <mach/pxa-regs.h>
 #include <mach/pxa3xx-regs.h>
 
 #include "generic.h"
diff --git a/arch/arm/mach-pxa/csb701.c b/arch/arm/mach-pxa/csb701.c
new file mode 100644 (file)
index 0000000..4a2a295
--- /dev/null
@@ -0,0 +1,61 @@
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/gpio_keys.h>
+#include <linux/input.h>
+#include <linux/leds.h>
+
+static struct gpio_keys_button csb701_buttons[] = {
+       {
+               .code   = 0x7,
+               .gpio   = 1,
+               .active_low = 1,
+               .desc   = "SW2",
+               .type   = EV_SW,
+               .wakeup = 1,
+       },
+};
+
+static struct gpio_keys_platform_data csb701_gpio_keys_data = {
+       .buttons = csb701_buttons,
+       .nbuttons = ARRAY_SIZE(csb701_buttons),
+};
+
+static struct gpio_led csb701_leds[] = {
+       {
+               .name   = "csb701:yellow:heartbeat",
+               .default_trigger = "heartbeat",
+               .gpio   = 11,
+               .active_low = 1,
+       },
+};
+
+static struct platform_device csb701_gpio_keys = {
+       .name           = "gpio-keys",
+       .id             = -1,
+       .dev.platform_data = &csb701_gpio_keys_data,
+};
+
+static struct gpio_led_platform_data csb701_leds_gpio_data = {
+       .leds           = csb701_leds,
+       .num_leds       = ARRAY_SIZE(csb701_leds),
+};
+
+static struct platform_device csb701_leds_gpio = {
+       .name           = "leds-gpio",
+       .id             = -1,
+       .dev.platform_data = &csb701_leds_gpio_data,
+};
+
+static struct platform_device *devices[] __initdata = {
+       &csb701_gpio_keys,
+       &csb701_leds_gpio,
+};
+
+static int __init csb701_init(void)
+{
+       return platform_add_devices(devices, ARRAY_SIZE(devices));
+}
+
+module_init(csb701_init);
+
diff --git a/arch/arm/mach-pxa/csb726.c b/arch/arm/mach-pxa/csb726.c
new file mode 100644 (file)
index 0000000..2b289f8
--- /dev/null
@@ -0,0 +1,318 @@
+/*
+ *  Support for Cogent CSB726
+ *
+ *  Copyright (c) 2008 Dmitry Eremin-Solenikov
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ *
+ */
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/io.h>
+#include <linux/gpio.h>
+#include <linux/platform_device.h>
+#include <linux/mtd/physmap.h>
+#include <linux/mtd/partitions.h>
+#include <linux/sm501.h>
+
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+#include <mach/csb726.h>
+#include <mach/mfp-pxa27x.h>
+#include <mach/i2c.h>
+#include <mach/mmc.h>
+#include <mach/ohci.h>
+#include <mach/pxa2xx-regs.h>
+
+#include "generic.h"
+#include "devices.h"
+
+/*
+ * n/a: 2, 5, 6, 7, 8, 23, 24, 25, 26, 27, 87, 88, 89,
+ * nu: 58 -- 77, 90, 91, 93, 102, 105-108, 114-116,
+ * XXX: 21,
+ * XXX: 79 CS_3 for LAN9215 or PSKTSEL on R2, R3
+ * XXX: 33 CS_5 for LAN9215 on R1
+ */
+
+static unsigned long csb726_pin_config[] = {
+       GPIO78_nCS_2, /* EXP_CS */
+       GPIO79_nCS_3, /* SMSC9215 */
+       GPIO80_nCS_4, /* SM501 */
+
+       GPIO52_GPIO, /* #SMSC9251 int */
+       GPIO53_GPIO, /* SM501 int */
+
+       GPIO1_GPIO, /* GPIO0 */
+       GPIO11_GPIO, /* GPIO1 */
+       GPIO9_GPIO, /* GPIO2 */
+       GPIO10_GPIO, /* GPIO3 */
+       GPIO16_PWM0_OUT, /* or GPIO4 */
+       GPIO17_PWM1_OUT, /* or GPIO5 */
+       GPIO94_GPIO, /* GPIO6 */
+       GPIO95_GPIO, /* GPIO7 */
+       GPIO96_GPIO, /* GPIO8 */
+       GPIO97_GPIO, /* GPIO9 */
+       GPIO15_GPIO, /* EXP_IRQ */
+       GPIO18_RDY, /* EXP_WAIT */
+
+       GPIO0_GPIO, /* PWR_INT */
+       GPIO104_GPIO, /* PWR_OFF */
+
+       GPIO12_GPIO, /* touch irq */
+
+       GPIO13_SSP2_TXD,
+       GPIO14_SSP2_SFRM,
+       MFP_CFG_OUT(GPIO19, AF1, DRIVE_LOW),/* SSP2_SYSCLK */
+       GPIO22_SSP2_SCLK,
+
+       GPIO81_SSP3_TXD,
+       GPIO82_SSP3_RXD,
+       GPIO83_SSP3_SFRM,
+       GPIO84_SSP3_SCLK,
+
+       GPIO20_GPIO, /* SDIO int */
+       GPIO32_MMC_CLK,
+       GPIO92_MMC_DAT_0,
+       GPIO109_MMC_DAT_1,
+       GPIO110_MMC_DAT_2,
+       GPIO111_MMC_DAT_3,
+       GPIO112_MMC_CMD,
+       GPIO100_GPIO, /* SD CD */
+       GPIO101_GPIO, /* SD WP */
+
+       GPIO28_AC97_BITCLK,
+       GPIO29_AC97_SDATA_IN_0,
+       GPIO30_AC97_SDATA_OUT,
+       GPIO31_AC97_SYNC,
+       GPIO113_AC97_nRESET,
+
+       GPIO34_FFUART_RXD,
+       GPIO35_FFUART_CTS,
+       GPIO36_FFUART_DCD,
+       GPIO37_FFUART_DSR,
+       GPIO38_FFUART_RI,
+       GPIO39_FFUART_TXD,
+       GPIO40_FFUART_DTR,
+       GPIO41_FFUART_RTS,
+
+       GPIO42_BTUART_RXD,
+       GPIO43_BTUART_TXD,
+       GPIO44_BTUART_CTS,
+       GPIO45_BTUART_RTS,
+
+       GPIO46_STUART_RXD,
+       GPIO47_STUART_TXD,
+
+       GPIO48_nPOE,
+       GPIO49_nPWE,
+       GPIO50_nPIOR,
+       GPIO51_nPIOW,
+       GPIO54_nPCE_2,
+       GPIO55_nPREG,
+       GPIO56_nPWAIT,
+       GPIO57_nIOIS16, /* maybe unused */
+       GPIO85_nPCE_1,
+       GPIO98_GPIO, /* CF IRQ */
+       GPIO99_GPIO, /* CF CD */
+       GPIO103_GPIO, /* Reset */
+
+       GPIO117_I2C_SCL,
+       GPIO118_I2C_SDA,
+};
+
+static struct pxamci_platform_data csb726_mci_data;
+
+static int csb726_mci_init(struct device *dev,
+               irq_handler_t detect, void *data)
+{
+       int err;
+
+       csb726_mci_data.detect_delay = msecs_to_jiffies(500);
+
+       err = gpio_request(CSB726_GPIO_MMC_DETECT, "MMC detect");
+       if (err)
+               goto err_det_req;
+
+       err = gpio_direction_input(CSB726_GPIO_MMC_DETECT);
+       if (err)
+               goto err_det_dir;
+
+       err = gpio_request(CSB726_GPIO_MMC_RO, "MMC ro");
+       if (err)
+               goto err_ro_req;
+
+       err = gpio_direction_input(CSB726_GPIO_MMC_RO);
+       if (err)
+               goto err_ro_dir;
+
+       err = request_irq(gpio_to_irq(CSB726_GPIO_MMC_DETECT), detect,
+                       IRQF_DISABLED, "MMC card detect", data);
+       if (err)
+               goto err_irq;
+
+       return 0;
+
+err_irq:
+err_ro_dir:
+       gpio_free(CSB726_GPIO_MMC_RO);
+err_ro_req:
+err_det_dir:
+       gpio_free(CSB726_GPIO_MMC_DETECT);
+err_det_req:
+       return err;
+}
+
+static int csb726_mci_get_ro(struct device *dev)
+{
+       return gpio_get_value(CSB726_GPIO_MMC_RO);
+}
+
+static void csb726_mci_exit(struct device *dev, void *data)
+{
+       free_irq(gpio_to_irq(CSB726_GPIO_MMC_DETECT), data);
+       gpio_free(CSB726_GPIO_MMC_RO);
+       gpio_free(CSB726_GPIO_MMC_DETECT);
+}
+
+static struct pxamci_platform_data csb726_mci = {
+       .ocr_mask       = MMC_VDD_32_33|MMC_VDD_33_34,
+       .init           = csb726_mci_init,
+       .get_ro         = csb726_mci_get_ro,
+       /* FIXME setpower */
+       .exit           = csb726_mci_exit,
+};
+
+static struct pxaohci_platform_data csb726_ohci_platform_data = {
+       .port_mode      = PMM_NPS_MODE,
+       .flags          = ENABLE_PORT1 | NO_OC_PROTECTION,
+};
+
+static struct mtd_partition csb726_flash_partitions[] = {
+       {
+               .name           = "Bootloader",
+               .offset         = 0,
+               .size           = CSB726_FLASH_uMON,
+               .mask_flags     = MTD_WRITEABLE  /* force read-only */
+       },
+       {
+               .name           = "root",
+               .offset         = MTDPART_OFS_APPEND,
+               .size           = MTDPART_SIZ_FULL,
+       }
+};
+
+static struct physmap_flash_data csb726_flash_data = {
+       .width          = 2,
+       .parts          = csb726_flash_partitions,
+       .nr_parts       = ARRAY_SIZE(csb726_flash_partitions),
+};
+
+static struct resource csb726_flash_resources[] = {
+       {
+               .start          = PXA_CS0_PHYS,
+               .end            = PXA_CS0_PHYS + CSB726_FLASH_SIZE - 1 ,
+               .flags          = IORESOURCE_MEM,
+       }
+};
+
+static struct platform_device csb726_flash = {
+       .name           = "physmap-flash",
+       .dev            = {
+               .platform_data  = &csb726_flash_data,
+       },
+       .resource       = csb726_flash_resources,
+       .num_resources  = ARRAY_SIZE(csb726_flash_resources),
+};
+
+static struct resource csb726_sm501_resources[] = {
+       {
+               .start          = PXA_CS4_PHYS,
+               .end            = PXA_CS4_PHYS + SZ_8M - 1,
+               .flags          = IORESOURCE_MEM,
+               .name           = "sm501-localmem",
+       },
+       {
+               .start          = PXA_CS4_PHYS + SZ_64M - SZ_2M,
+               .end            = PXA_CS4_PHYS + SZ_64M - 1,
+               .flags          = IORESOURCE_MEM,
+               .name           = "sm501-regs",
+       },
+       {
+               .start          = CSB726_IRQ_SM501,
+               .end            = CSB726_IRQ_SM501,
+               .flags          = IORESOURCE_IRQ,
+       },
+};
+
+static struct sm501_initdata csb726_sm501_initdata = {
+/*     .devices        = SM501_USE_USB_HOST, */
+       .devices        = SM501_USE_USB_HOST | SM501_USE_UART0 | SM501_USE_UART1,
+};
+
+static struct sm501_platdata csb726_sm501_platdata = {
+       .init           = &csb726_sm501_initdata,
+};
+
+static struct platform_device csb726_sm501 = {
+       .name           = "sm501",
+       .id             = 0,
+       .num_resources  = ARRAY_SIZE(csb726_sm501_resources),
+       .resource       = csb726_sm501_resources,
+       .dev            = {
+               .platform_data = &csb726_sm501_platdata,
+       },
+};
+
+static struct resource csb726_lan_resources[] = {
+       {
+               .start  = PXA_CS3_PHYS,
+               .end    = PXA_CS3_PHYS + SZ_64K - 1,
+               .flags  = IORESOURCE_MEM,
+       },
+       {
+               .start  = CSB726_IRQ_LAN,
+               .end    = CSB726_IRQ_LAN,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+static struct platform_device csb726_lan = {
+       .name           = "smc911x",
+       .id             = -1,
+       .num_resources  = ARRAY_SIZE(csb726_lan_resources),
+       .resource       = csb726_lan_resources,
+};
+
+static struct platform_device *devices[] __initdata = {
+       &csb726_flash,
+       &csb726_sm501,
+       &csb726_lan,
+};
+
+static void __init csb726_init(void)
+{
+       pxa2xx_mfp_config(ARRAY_AND_SIZE(csb726_pin_config));
+/*     MSC1 = 0x7ffc3ffc; *//* LAN9215/EXP_CS */
+/*     MSC2 = 0x06697ff4; *//* none/SM501 */
+       MSC2 = (MSC2 & ~0xffff) | 0x7ff4; /* SM501 */
+
+       pxa_set_i2c_info(NULL);
+       pxa27x_set_i2c_power_info(NULL);
+       pxa_set_mci_info(&csb726_mci);
+       pxa_set_ohci_info(&csb726_ohci_platform_data);
+
+       platform_add_devices(devices, ARRAY_SIZE(devices));
+}
+
+MACHINE_START(CSB726, "Cogent CSB726")
+       .phys_io        = 0x40000000,
+       .boot_params    = 0xa0000100,
+       .io_pg_offst    = (io_p2v(0x40000000) >> 18) & 0xfffc,
+       .map_io         = pxa_map_io,
+       .init_irq       = pxa27x_init_irq,
+       .init_machine   = csb726_init,
+       .timer          = &pxa_timer,
+MACHINE_END
index e16f8e3d58d349200fb64be936345e4f63b15d46..d245e59c51b1c5f7afc6d4691d7bac68577510c9 100644 (file)
@@ -4,7 +4,6 @@
 #include <linux/platform_device.h>
 #include <linux/dma-mapping.h>
 
-#include <mach/pxa-regs.h>
 #include <mach/udc.h>
 #include <mach/pxafb.h>
 #include <mach/mmc.h>
index 1bd7f740427c6101e814457db68dfbe0b518ce64..74d3f8987c5cfca1529574e76f8876fd36e225ff 100644 (file)
@@ -20,9 +20,7 @@
 #include <asm/mach/arch.h>
 #include <asm/mach-types.h>
 
-#include <mach/mfp-pxa25x.h>
-#include <mach/hardware.h>
-#include <mach/pxa-regs.h>
+#include <mach/pxa25x.h>
 #include <mach/eseries-gpio.h>
 #include <mach/udc.h>
 
index edcd9d5ce5455b600e5ad5a693f14340f0d4d7f7..08003627213140840716ea94388bdffa4e3a3576 100644 (file)
@@ -21,9 +21,7 @@
 #include <asm/mach-types.h>
 
 #include <mach/irqs.h>
-#include <mach/mfp-pxa25x.h>
-#include <mach/pxa-regs.h>
-#include <mach/hardware.h>
+#include <mach/pxa25x.h>
 #include <mach/eseries-gpio.h>
 #include <mach/udc.h>
 
index 77bb8e2c48c0ad7291c0df847284504fa69268eb..ed9c0c3f64a2016fd8d0cb4a8ef5909ff0bcee51 100644 (file)
@@ -22,9 +22,7 @@
 #include <asm/mach/arch.h>
 #include <asm/mach-types.h>
 
-#include <mach/mfp-pxa25x.h>
-#include <mach/pxa-regs.h>
-#include <mach/hardware.h>
+#include <mach/pxa25x.h>
 #include <mach/eseries-gpio.h>
 #include <mach/pxafb.h>
 #include <mach/udc.h>
index 6d48e00f4f0b444913f49cdcd58c01900cddf10d..54af7ed1397ef1c4cf32b32ac2f0e7783a5bb99c 100644 (file)
@@ -24,9 +24,7 @@
 #include <asm/mach/arch.h>
 #include <asm/mach-types.h>
 
-#include <mach/mfp-pxa25x.h>
-#include <mach/pxa-regs.h>
-#include <mach/hardware.h>
+#include <mach/pxa25x.h>
 #include <mach/eseries-gpio.h>
 #include <mach/udc.h>
 #include <mach/irda.h>
@@ -189,7 +187,7 @@ static void __init e740_init(void)
 {
        pxa2xx_mfp_config(ARRAY_AND_SIZE(e740_pin_config));
        eseries_register_clks();
-       clk_add_alias("CLK_CK48M", &e740_t7l66xb_device.dev,
+       clk_add_alias("CLK_CK48M", e740_t7l66xb_device.name,
                        "UDCCLK", &pxa25x_device_udc.dev),
        eseries_get_tmio_gpios();
        platform_add_devices(devices, ARRAY_SIZE(devices));
index be1ab8edb973eab021c7730c66246bdcac856b29..16ae72150b1b684db8fc322ebb1d3b55d40b2931 100644 (file)
@@ -23,9 +23,7 @@
 #include <asm/mach/arch.h>
 #include <asm/mach-types.h>
 
-#include <mach/mfp-pxa25x.h>
-#include <mach/pxa-regs.h>
-#include <mach/hardware.h>
+#include <mach/pxa25x.h>
 #include <mach/eseries-gpio.h>
 #include <mach/udc.h>
 #include <mach/irda.h>
@@ -190,7 +188,7 @@ static struct platform_device *devices[] __initdata = {
 static void __init e750_init(void)
 {
        pxa2xx_mfp_config(ARRAY_AND_SIZE(e750_pin_config));
-       clk_add_alias("CLK_CK3P6MI", &e750_tc6393xb_device.dev,
+       clk_add_alias("CLK_CK3P6MI", e750_tc6393xb_device.name,
                        "GPIO11_CLK", NULL),
        eseries_get_tmio_gpios();
        platform_add_devices(devices, ARRAY_SIZE(devices));
index cc9b1293e8667b647349736b3f4584d9aba14687..74ab09812a72a1444e3b7af9d59e0999b263b854 100644 (file)
@@ -23,9 +23,7 @@
 #include <asm/mach/arch.h>
 #include <asm/mach-types.h>
 
-#include <mach/mfp-pxa25x.h>
-#include <mach/pxa-regs.h>
-#include <mach/hardware.h>
+#include <mach/pxa25x.h>
 #include <mach/eseries-gpio.h>
 #include <mach/udc.h>
 #include <mach/irqs.h>
@@ -196,7 +194,7 @@ static struct platform_device *devices[] __initdata = {
 
 static void __init e800_init(void)
 {
-       clk_add_alias("CLK_CK3P6MI", &e800_tc6393xb_device.dev,
+       clk_add_alias("CLK_CK3P6MI", e800_tc6393xb_device.name,
                        "GPIO11_CLK", NULL),
        eseries_get_tmio_gpios();
        platform_add_devices(devices, ARRAY_SIZE(devices));
index f5ed8038ede5bb5da55af602fdf2a98e02691746..920dfb8d36dabcb686159e8d24427c9d5ecd7ff3 100644 (file)
 
 #include <linux/irq.h>
 #include <linux/platform_device.h>
+#include <linux/delay.h>
 
 #include <linux/dm9000.h>
 #include <linux/rtc-v3020.h>
 #include <linux/mtd/nand.h>
 #include <linux/mtd/partitions.h>
+#include <linux/mtd/physmap.h>
 #include <linux/input.h>
 #include <linux/gpio_keys.h>
 #include <linux/gpio.h>
+#include <linux/mfd/da903x.h>
+#include <linux/regulator/machine.h>
+#include <linux/spi/spi.h>
+#include <linux/spi/tdo24m.h>
+#include <linux/power_supply.h>
+#include <linux/apm-emulation.h>
+
+#include <media/soc_camera.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 
-#include <mach/mfp-pxa27x.h>
-#include <mach/pxa-regs.h>
+#include <mach/pxa27x.h>
 #include <mach/pxa27x-udc.h>
 #include <mach/audio.h>
 #include <mach/pxafb.h>
 #include <mach/ohci.h>
 #include <mach/mmc.h>
 #include <mach/pxa27x_keypad.h>
+#include <mach/i2c.h>
+#include <mach/camera.h>
+#include <mach/pxa2xx_spi.h>
 
 #include "generic.h"
+#include "devices.h"
 
-/* GPIO IRQ usage */
-#define GPIO41_ETHIRQ          (41)
+/* EM-X270 specific GPIOs */
 #define GPIO13_MMC_CD          (13)
+#define GPIO95_MMC_WP          (95)
+#define GPIO56_NAND_RB         (56)
+
+/* eXeda specific GPIOs */
+#define GPIO114_MMC_CD         (114)
+#define GPIO20_NAND_RB         (20)
+#define GPIO38_SD_PWEN         (38)
+
+/* common  GPIOs */
+#define GPIO11_NAND_CS         (11)
+#define GPIO93_CAM_RESET       (93)
+#define GPIO41_ETHIRQ          (41)
 #define EM_X270_ETHIRQ         IRQ_GPIO(GPIO41_ETHIRQ)
-#define EM_X270_MMC_CD         IRQ_GPIO(GPIO13_MMC_CD)
 
-/* NAND control GPIOs */
-#define GPIO11_NAND_CS (11)
-#define GPIO56_NAND_RB (56)
+static int mmc_cd;
+static int nand_rb;
+static int dm9000_flags;
 
-static unsigned long em_x270_pin_config[] = {
+static unsigned long common_pin_config[] = {
        /* AC'97 */
        GPIO28_AC97_BITCLK,
        GPIO29_AC97_SDATA_IN_0,
@@ -150,21 +173,32 @@ static unsigned long em_x270_pin_config[] = {
        GPIO18_RDY,
 
        /* GPIO */
-       GPIO1_GPIO | WAKEUP_ON_EDGE_BOTH,
+       GPIO1_GPIO | WAKEUP_ON_EDGE_BOTH,       /* sleep/resume button */
 
        /* power controls */
        GPIO20_GPIO     | MFP_LPM_DRIVE_LOW,    /* GPRS_PWEN */
+       GPIO93_GPIO     | MFP_LPM_DRIVE_LOW,    /* Camera reset */
        GPIO115_GPIO    | MFP_LPM_DRIVE_LOW,    /* WLAN_PWEN */
 
        /* NAND controls */
        GPIO11_GPIO     | MFP_LPM_DRIVE_HIGH,   /* NAND CE# */
-       GPIO56_GPIO,                            /* NAND Ready/Busy */
 
        /* interrupts */
-       GPIO13_GPIO,    /* MMC card detect */
        GPIO41_GPIO,    /* DM9000 interrupt */
 };
 
+static unsigned long em_x270_pin_config[] = {
+       GPIO13_GPIO,    /* MMC card detect */
+       GPIO56_GPIO,    /* NAND Ready/Busy */
+       GPIO95_GPIO,    /* MMC Write protect */
+};
+
+static unsigned long exeda_pin_config[] = {
+       GPIO20_GPIO,                            /* NAND Ready/Busy */
+       GPIO38_GPIO     | MFP_LPM_DRIVE_LOW,    /* SD slot power */
+       GPIO114_GPIO,                           /* MMC card detect */
+};
+
 #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
 static struct resource em_x270_dm9000_resource[] = {
        [0] = {
@@ -185,7 +219,7 @@ static struct resource em_x270_dm9000_resource[] = {
 };
 
 static struct dm9000_plat_data em_x270_dm9000_platdata = {
-       .flags          = DM9000_PLATF_32BITONLY,
+       .flags          = DM9000_PLATF_NO_EEPROM,
 };
 
 static struct platform_device em_x270_dm9000 = {
@@ -200,6 +234,7 @@ static struct platform_device em_x270_dm9000 = {
 
 static void __init em_x270_init_dm9000(void)
 {
+       em_x270_dm9000_platdata.flags |= dm9000_flags;
        platform_device_register(&em_x270_dm9000);
 }
 #else
@@ -289,7 +324,7 @@ static int em_x270_nand_device_ready(struct mtd_info *mtd)
 {
        dsb();
 
-       return gpio_get_value(GPIO56_NAND_RB);
+       return gpio_get_value(nand_rb);
 }
 
 static struct mtd_partition em_x270_partition_info[] = {
@@ -354,14 +389,14 @@ static void __init em_x270_init_nand(void)
 
        gpio_direction_output(GPIO11_NAND_CS, 1);
 
-       err = gpio_request(GPIO56_NAND_RB, "NAND R/B");
+       err = gpio_request(nand_rb, "NAND R/B");
        if (err) {
                pr_warning("EM-X270: failed to request NAND R/B gpio\n");
                gpio_free(GPIO11_NAND_CS);
                return;
        }
 
-       gpio_direction_input(GPIO56_NAND_RB);
+       gpio_direction_input(nand_rb);
 
        platform_device_register(&em_x270_nand);
 }
@@ -369,6 +404,61 @@ static void __init em_x270_init_nand(void)
 static inline void em_x270_init_nand(void) {}
 #endif
 
+#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
+static struct mtd_partition em_x270_nor_parts[] = {
+       {
+               .name =         "Bootloader",
+               .offset =       0x00000000,
+               .size =         0x00050000,
+               .mask_flags =   MTD_WRITEABLE  /* force read-only */
+       }, {
+               .name =         "Environment",
+               .offset =       0x00050000,
+               .size =         0x00010000,
+       }, {
+               .name =         "Reserved",
+               .offset =       0x00060000,
+               .size =         0x00050000,
+               .mask_flags =   MTD_WRITEABLE  /* force read-only */
+       }, {
+               .name =         "Splashscreen",
+               .offset =       0x000b0000,
+               .size =         0x00050000,
+       }
+};
+
+static struct physmap_flash_data em_x270_nor_data[] = {
+       [0] = {
+               .width = 2,
+               .parts = em_x270_nor_parts,
+               .nr_parts = ARRAY_SIZE(em_x270_nor_parts),
+       },
+};
+
+static struct resource em_x270_nor_flash_resource = {
+       .start  = PXA_CS0_PHYS,
+       .end    = PXA_CS0_PHYS + SZ_1M - 1,
+       .flags  = IORESOURCE_MEM,
+};
+
+static struct platform_device em_x270_physmap_flash = {
+       .name           = "physmap-flash",
+       .id             = 0,
+       .num_resources  = 1,
+       .resource       = &em_x270_nor_flash_resource,
+       .dev            = {
+               .platform_data  = &em_x270_nor_data,
+       },
+};
+
+static void __init em_x270_init_nor(void)
+{
+       platform_device_register(&em_x270_physmap_flash);
+}
+#else
+static inline void em_x270_init_nor(void) {}
+#endif
+
 /* PXA27x OHCI controller setup */
 #if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
 static int em_x270_ohci_init(struct device *dev)
@@ -395,40 +485,93 @@ static inline void em_x270_init_ohci(void) {}
 
 /* MCI controller setup */
 #if defined(CONFIG_MMC) || defined(CONFIG_MMC_MODULE)
+static struct regulator *em_x270_sdio_ldo;
+
 static int em_x270_mci_init(struct device *dev,
                            irq_handler_t em_x270_detect_int,
                            void *data)
 {
-       int err = request_irq(EM_X270_MMC_CD, em_x270_detect_int,
-                             IRQF_DISABLED | IRQF_TRIGGER_FALLING,
+       int err;
+
+       em_x270_sdio_ldo = regulator_get(dev, "vcc sdio");
+       if (IS_ERR(em_x270_sdio_ldo)) {
+               dev_err(dev, "can't request SDIO power supply: %ld\n",
+                       PTR_ERR(em_x270_sdio_ldo));
+               return PTR_ERR(em_x270_sdio_ldo);
+       }
+
+       err = request_irq(gpio_to_irq(mmc_cd), em_x270_detect_int,
+                             IRQF_DISABLED | IRQF_TRIGGER_RISING |
+                             IRQF_TRIGGER_FALLING,
                              "MMC card detect", data);
        if (err) {
-               printk(KERN_ERR "%s: can't request MMC card detect IRQ: %d\n",
-                      __func__, err);
-               return err;
+               dev_err(dev, "can't request MMC card detect IRQ: %d\n", err);
+               goto err_irq;
+       }
+
+       if (machine_is_em_x270()) {
+               err = gpio_request(GPIO95_MMC_WP, "MMC WP");
+               if (err) {
+                       dev_err(dev, "can't request MMC write protect: %d\n",
+                               err);
+                       goto err_gpio_wp;
+               }
+               gpio_direction_input(GPIO95_MMC_WP);
+       } else {
+               err = gpio_request(GPIO38_SD_PWEN, "sdio power");
+               if (err) {
+                       dev_err(dev, "can't request MMC power control : %d\n",
+                               err);
+                       goto err_gpio_wp;
+               }
+               gpio_direction_output(GPIO38_SD_PWEN, 1);
        }
 
        return 0;
+
+err_gpio_wp:
+       free_irq(gpio_to_irq(mmc_cd), data);
+err_irq:
+       regulator_put(em_x270_sdio_ldo);
+
+       return err;
 }
 
 static void em_x270_mci_setpower(struct device *dev, unsigned int vdd)
 {
-       /*
-          FIXME: current hardware implementation does not allow to
-          enable/disable MMC power. This will be fixed in next HW releases,
-          and we'll need to add implmentation here.
-       */
-       return;
+       struct pxamci_platform_data* p_d = dev->platform_data;
+
+       if ((1 << vdd) & p_d->ocr_mask) {
+               int vdd_uV = (2000 + (vdd - __ffs(MMC_VDD_20_21)) * 100) * 1000;
+
+               regulator_set_voltage(em_x270_sdio_ldo, vdd_uV, vdd_uV);
+               regulator_enable(em_x270_sdio_ldo);
+       } else {
+               regulator_disable(em_x270_sdio_ldo);
+       }
 }
 
 static void em_x270_mci_exit(struct device *dev, void *data)
 {
-       int irq = gpio_to_irq(GPIO13_MMC_CD);
-       free_irq(irq, data);
+       free_irq(gpio_to_irq(mmc_cd), data);
+       regulator_put(em_x270_sdio_ldo);
+
+       if (machine_is_em_x270())
+               gpio_free(GPIO95_MMC_WP);
+       else
+               gpio_free(GPIO38_SD_PWEN);
+}
+
+static int em_x270_mci_get_ro(struct device *dev)
+{
+       return gpio_get_value(GPIO95_MMC_WP);
 }
 
 static struct pxamci_platform_data em_x270_mci_platform_data = {
-       .ocr_mask       = MMC_VDD_28_29|MMC_VDD_29_30|MMC_VDD_30_31,
+       .ocr_mask       = MMC_VDD_20_21|MMC_VDD_21_22|MMC_VDD_22_23|
+                         MMC_VDD_24_25|MMC_VDD_25_26|MMC_VDD_26_27|
+                         MMC_VDD_27_28|MMC_VDD_28_29|MMC_VDD_29_30|
+                         MMC_VDD_30_31|MMC_VDD_31_32,
        .init           = em_x270_mci_init,
        .setpower       = em_x270_mci_setpower,
        .exit           = em_x270_mci_exit,
@@ -436,33 +579,53 @@ static struct pxamci_platform_data em_x270_mci_platform_data = {
 
 static void __init em_x270_init_mmc(void)
 {
+       if (machine_is_em_x270())
+               em_x270_mci_platform_data.get_ro = em_x270_mci_get_ro;
+
+       em_x270_mci_platform_data.detect_delay  = msecs_to_jiffies(250);
        pxa_set_mci_info(&em_x270_mci_platform_data);
 }
 #else
 static inline void em_x270_init_mmc(void) {}
 #endif
 
-/* LCD 480x640 */
+/* LCD */
 #if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE)
-static struct pxafb_mode_info em_x270_lcd_mode = {
-       .pixclock       = 50000,
-       .bpp            = 16,
-       .xres           = 480,
-       .yres           = 640,
-       .hsync_len      = 8,
-       .vsync_len      = 2,
-       .left_margin    = 8,
-       .upper_margin   = 0,
-       .right_margin   = 24,
-       .lower_margin   = 4,
-       .cmap_greyscale = 0,
+static struct pxafb_mode_info em_x270_lcd_modes[] = {
+       [0] = {
+               .pixclock       = 38250,
+               .bpp            = 16,
+               .xres           = 480,
+               .yres           = 640,
+               .hsync_len      = 8,
+               .vsync_len      = 2,
+               .left_margin    = 8,
+               .upper_margin   = 2,
+               .right_margin   = 24,
+               .lower_margin   = 4,
+               .sync           = 0,
+       },
+       [1] = {
+               .pixclock       = 153800,
+               .bpp            = 16,
+               .xres           = 240,
+               .yres           = 320,
+               .hsync_len      = 8,
+               .vsync_len      = 2,
+               .left_margin    = 8,
+               .upper_margin   = 2,
+               .right_margin   = 88,
+               .lower_margin   = 2,
+               .sync           = 0,
+       },
 };
 
 static struct pxafb_mach_info em_x270_lcd = {
-       .modes          = &em_x270_lcd_mode,
-       .num_modes      = 1,
+       .modes          = em_x270_lcd_modes,
+       .num_modes      = 2,
        .lcd_conn       = LCD_COLOR_TFT_16BPP,
 };
+
 static void __init em_x270_init_lcd(void)
 {
        set_pxa_fb_info(&em_x270_lcd);
@@ -471,6 +634,40 @@ static void __init em_x270_init_lcd(void)
 static inline void em_x270_init_lcd(void) {}
 #endif
 
+#if defined(CONFIG_SPI_PXA2XX) || defined(CONFIG_SPI_PXA2XX_MODULE)
+static struct pxa2xx_spi_master em_x270_spi_info = {
+       .num_chipselect = 1,
+};
+
+static struct pxa2xx_spi_chip em_x270_tdo24m_chip = {
+       .rx_threshold = 1,
+       .tx_threshold = 1,
+};
+
+static struct tdo24m_platform_data em_x270_tdo24m_pdata = {
+       .model = TDO35S,
+};
+
+static struct spi_board_info em_x270_spi_devices[] __initdata = {
+       {
+               .modalias = "tdo24m",
+               .max_speed_hz = 1000000,
+               .bus_num = 1,
+               .chip_select = 0,
+               .controller_data = &em_x270_tdo24m_chip,
+               .platform_data = &em_x270_tdo24m_pdata,
+       },
+};
+
+static void __init em_x270_init_spi(void)
+{
+       pxa2xx_set_spi_info(1, &em_x270_spi_info);
+       spi_register_board_info(ARRAY_AND_SIZE(em_x270_spi_devices));
+}
+#else
+static inline void em_x270_init_spi(void) {}
+#endif
+
 #if defined(CONFIG_SND_PXA2XX_AC97) || defined(CONFIG_SND_PXA2XX_AC97_MODULE)
 static void __init em_x270_init_ac97(void)
 {
@@ -481,23 +678,76 @@ static inline void em_x270_init_ac97(void) {}
 #endif
 
 #if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE)
-static unsigned int em_x270_matrix_keys[] = {
+static unsigned int em_x270_module_matrix_keys[] = {
        KEY(0, 0, KEY_A), KEY(1, 0, KEY_UP), KEY(2, 1, KEY_B),
        KEY(0, 2, KEY_LEFT), KEY(1, 1, KEY_ENTER), KEY(2, 0, KEY_RIGHT),
        KEY(0, 1, KEY_C), KEY(1, 2, KEY_DOWN), KEY(2, 2, KEY_D),
 };
 
-struct pxa27x_keypad_platform_data em_x270_keypad_info = {
+struct pxa27x_keypad_platform_data em_x270_module_keypad_info = {
        /* code map for the matrix keys */
        .matrix_key_rows        = 3,
        .matrix_key_cols        = 3,
-       .matrix_key_map         = em_x270_matrix_keys,
-       .matrix_key_map_size    = ARRAY_SIZE(em_x270_matrix_keys),
+       .matrix_key_map         = em_x270_module_matrix_keys,
+       .matrix_key_map_size    = ARRAY_SIZE(em_x270_module_matrix_keys),
+};
+
+static unsigned int em_x270_exeda_matrix_keys[] = {
+       KEY(0, 0, KEY_RIGHTSHIFT), KEY(0, 1, KEY_RIGHTCTRL),
+       KEY(0, 2, KEY_RIGHTALT), KEY(0, 3, KEY_SPACE),
+       KEY(0, 4, KEY_LEFTALT), KEY(0, 5, KEY_LEFTCTRL),
+       KEY(0, 6, KEY_ENTER), KEY(0, 7, KEY_SLASH),
+
+       KEY(1, 0, KEY_DOT), KEY(1, 1, KEY_M),
+       KEY(1, 2, KEY_N), KEY(1, 3, KEY_B),
+       KEY(1, 4, KEY_V), KEY(1, 5, KEY_C),
+       KEY(1, 6, KEY_X), KEY(1, 7, KEY_Z),
+
+       KEY(2, 0, KEY_LEFTSHIFT), KEY(2, 1, KEY_SEMICOLON),
+       KEY(2, 2, KEY_L), KEY(2, 3, KEY_K),
+       KEY(2, 4, KEY_J), KEY(2, 5, KEY_H),
+       KEY(2, 6, KEY_G), KEY(2, 7, KEY_F),
+
+       KEY(3, 0, KEY_D), KEY(3, 1, KEY_S),
+       KEY(3, 2, KEY_A), KEY(3, 3, KEY_TAB),
+       KEY(3, 4, KEY_BACKSPACE), KEY(3, 5, KEY_P),
+       KEY(3, 6, KEY_O), KEY(3, 7, KEY_I),
+
+       KEY(4, 0, KEY_U), KEY(4, 1, KEY_Y),
+       KEY(4, 2, KEY_T), KEY(4, 3, KEY_R),
+       KEY(4, 4, KEY_E), KEY(4, 5, KEY_W),
+       KEY(4, 6, KEY_Q), KEY(4, 7, KEY_MINUS),
+
+       KEY(5, 0, KEY_0), KEY(5, 1, KEY_9),
+       KEY(5, 2, KEY_8), KEY(5, 3, KEY_7),
+       KEY(5, 4, KEY_6), KEY(5, 5, KEY_5),
+       KEY(5, 6, KEY_4), KEY(5, 7, KEY_3),
+
+       KEY(6, 0, KEY_2), KEY(6, 1, KEY_1),
+       KEY(6, 2, KEY_ENTER), KEY(6, 3, KEY_END),
+       KEY(6, 4, KEY_DOWN), KEY(6, 5, KEY_UP),
+       KEY(6, 6, KEY_MENU), KEY(6, 7, KEY_F1),
+
+       KEY(7, 0, KEY_LEFT), KEY(7, 1, KEY_RIGHT),
+       KEY(7, 2, KEY_BACK), KEY(7, 3, KEY_HOME),
+       KEY(7, 4, 0), KEY(7, 5, 0),
+       KEY(7, 6, 0), KEY(7, 7, 0),
+};
+
+struct pxa27x_keypad_platform_data em_x270_exeda_keypad_info = {
+       /* code map for the matrix keys */
+       .matrix_key_rows        = 8,
+       .matrix_key_cols        = 8,
+       .matrix_key_map         = em_x270_exeda_matrix_keys,
+       .matrix_key_map_size    = ARRAY_SIZE(em_x270_exeda_matrix_keys),
 };
 
 static void __init em_x270_init_keypad(void)
 {
-       pxa_set_keypad_info(&em_x270_keypad_info);
+       if (machine_is_em_x270())
+               pxa_set_keypad_info(&em_x270_module_keypad_info);
+       else
+               pxa_set_keypad_info(&em_x270_exeda_keypad_info);
 }
 #else
 static inline void em_x270_init_keypad(void) {}
@@ -535,19 +785,264 @@ static void __init em_x270_init_gpio_keys(void)
 static inline void em_x270_init_gpio_keys(void) {}
 #endif
 
-static void __init em_x270_init(void)
+/* Quick Capture Interface and sensor setup */
+#if defined(CONFIG_VIDEO_PXA27x) || defined(CONFIG_VIDEO_PXA27x_MODULE)
+static struct regulator *em_x270_camera_ldo;
+
+static int em_x270_sensor_init(struct device *dev)
 {
+       int ret;
+
+       ret = gpio_request(GPIO93_CAM_RESET, "camera reset");
+       if (ret)
+               return ret;
+
+       gpio_direction_output(GPIO93_CAM_RESET, 0);
+
+       em_x270_camera_ldo = regulator_get(NULL, "vcc cam");
+       if (em_x270_camera_ldo == NULL) {
+               gpio_free(GPIO93_CAM_RESET);
+               return -ENODEV;
+       }
+
+       ret = regulator_enable(em_x270_camera_ldo);
+       if (ret) {
+               regulator_put(em_x270_camera_ldo);
+               gpio_free(GPIO93_CAM_RESET);
+               return ret;
+       }
+
+       gpio_set_value(GPIO93_CAM_RESET, 1);
+
+       return 0;
+}
+
+struct pxacamera_platform_data em_x270_camera_platform_data = {
+       .init   = em_x270_sensor_init,
+       .flags  = PXA_CAMERA_MASTER | PXA_CAMERA_DATAWIDTH_8 |
+               PXA_CAMERA_PCLK_EN | PXA_CAMERA_MCLK_EN,
+       .mclk_10khz = 2600,
+};
+
+static int em_x270_sensor_power(struct device *dev, int on)
+{
+       int ret;
+       int is_on = regulator_is_enabled(em_x270_camera_ldo);
+
+       if (on == is_on)
+               return 0;
+
+       gpio_set_value(GPIO93_CAM_RESET, !on);
+
+       if (on)
+               ret = regulator_enable(em_x270_camera_ldo);
+       else
+               ret = regulator_disable(em_x270_camera_ldo);
+
+       if (ret)
+               return ret;
+
+       gpio_set_value(GPIO93_CAM_RESET, on);
+
+       return 0;
+}
+
+static struct soc_camera_link iclink = {
+       .bus_id = 0,
+       .power = em_x270_sensor_power,
+};
+
+static struct i2c_board_info em_x270_i2c_cam_info[] = {
+       {
+               I2C_BOARD_INFO("mt9m111", 0x48),
+               .platform_data = &iclink,
+       },
+};
+
+static struct i2c_pxa_platform_data em_x270_i2c_info = {
+       .fast_mode = 1,
+};
+
+static void  __init em_x270_init_camera(void)
+{
+       pxa_set_i2c_info(&em_x270_i2c_info);
+       i2c_register_board_info(0, ARRAY_AND_SIZE(em_x270_i2c_cam_info));
+       pxa_set_camera_info(&em_x270_camera_platform_data);
+}
+#else
+static inline void em_x270_init_camera(void) {}
+#endif
+
+/* DA9030 related initializations */
+#define REGULATOR_CONSUMER(_name, _dev, _supply)                              \
+       static struct regulator_consumer_supply _name##_consumers[] = { \
+               {                                                       \
+                       .dev = _dev,                                    \
+                       .supply = _supply,                              \
+               },                                                      \
+       }
+
+REGULATOR_CONSUMER(ldo3, NULL, "vcc gps");
+REGULATOR_CONSUMER(ldo5, NULL, "vcc cam");
+REGULATOR_CONSUMER(ldo10, &pxa_device_mci.dev, "vcc sdio");
+REGULATOR_CONSUMER(ldo12, NULL, "vcc usb");
+REGULATOR_CONSUMER(ldo19, NULL, "vcc gprs");
+
+#define REGULATOR_INIT(_ldo, _min_uV, _max_uV, _ops_mask)              \
+       static struct regulator_init_data _ldo##_data = {               \
+               .constraints = {                                        \
+                       .min_uV = _min_uV,                              \
+                       .max_uV = _max_uV,                              \
+                       .state_mem = {                                  \
+                               .enabled = 0,                           \
+                       },                                              \
+                       .valid_ops_mask = _ops_mask,                    \
+               },                                                      \
+               .num_consumer_supplies = ARRAY_SIZE(_ldo##_consumers),  \
+               .consumer_supplies = _ldo##_consumers,                  \
+       };
+
+REGULATOR_INIT(ldo3, 3200000, 3200000, REGULATOR_CHANGE_STATUS);
+REGULATOR_INIT(ldo5, 3000000, 3000000, REGULATOR_CHANGE_STATUS);
+REGULATOR_INIT(ldo10, 2000000, 3200000,
+              REGULATOR_CHANGE_STATUS | REGULATOR_CHANGE_VOLTAGE);
+REGULATOR_INIT(ldo12, 3000000, 3000000, REGULATOR_CHANGE_STATUS);
+REGULATOR_INIT(ldo19, 3200000, 3200000, REGULATOR_CHANGE_STATUS);
+
+struct led_info em_x270_led_info = {
+       .name = "em-x270:orange",
+       .default_trigger = "battery-charging-or-full",
+};
+
+struct power_supply_info em_x270_psy_info = {
+       .name = "LP555597P6H-FPS",
+       .technology = POWER_SUPPLY_TECHNOLOGY_LIPO,
+       .voltage_max_design = 4200000,
+       .voltage_min_design = 3000000,
+       .use_for_apm = 1,
+};
+
+static void em_x270_battery_low(void)
+{
+       apm_queue_event(APM_LOW_BATTERY);
+}
+
+static void em_x270_battery_critical(void)
+{
+       apm_queue_event(APM_CRITICAL_SUSPEND);
+}
+
+struct da9030_battery_info em_x270_batterty_info = {
+       .battery_info = &em_x270_psy_info,
+
+       .charge_milliamp = 1000,
+       .charge_millivolt = 4200,
+
+       .vbat_low = 3600,
+       .vbat_crit = 3400,
+       .vbat_charge_start = 4100,
+       .vbat_charge_stop = 4200,
+       .vbat_charge_restart = 4000,
+
+       .vcharge_min = 3200,
+       .vcharge_max = 5500,
+
+       .tbat_low = 197,
+       .tbat_high = 78,
+       .tbat_restart = 100,
+
+       .batmon_interval = 0,
+
+       .battery_low = em_x270_battery_low,
+       .battery_critical = em_x270_battery_critical,
+};
+
+#define DA9030_SUBDEV(_name, _id, _pdata)      \
+       {                                       \
+               .name = "da903x-" #_name,       \
+               .id = DA9030_ID_##_id,          \
+               .platform_data = _pdata,        \
+       }
+
+#define DA9030_LDO(num)        DA9030_SUBDEV(regulator, LDO##num, &ldo##num##_data)
+
+struct da903x_subdev_info em_x270_da9030_subdevs[] = {
+       DA9030_LDO(3),
+       DA9030_LDO(5),
+       DA9030_LDO(10),
+       DA9030_LDO(12),
+       DA9030_LDO(19),
+
+       DA9030_SUBDEV(led, LED_PC, &em_x270_led_info),
+       DA9030_SUBDEV(backlight, WLED, &em_x270_led_info),
+       DA9030_SUBDEV(battery, BAT, &em_x270_batterty_info),
+};
+
+static struct da903x_platform_data em_x270_da9030_info = {
+       .num_subdevs = ARRAY_SIZE(em_x270_da9030_subdevs),
+       .subdevs = em_x270_da9030_subdevs,
+};
+
+static struct i2c_board_info em_x270_i2c_pmic_info = {
+       I2C_BOARD_INFO("da9030", 0x49),
+       .irq = IRQ_GPIO(0),
+       .platform_data = &em_x270_da9030_info,
+};
+
+static struct i2c_pxa_platform_data em_x270_pwr_i2c_info = {
+       .use_pio = 1,
+};
+
+static void __init em_x270_init_da9030(void)
+{
+       pxa27x_set_i2c_power_info(&em_x270_pwr_i2c_info);
+       i2c_register_board_info(1, &em_x270_i2c_pmic_info, 1);
+}
+
+static void __init em_x270_module_init(void)
+{
+       pr_info("%s\n", __func__);
        pxa2xx_mfp_config(ARRAY_AND_SIZE(em_x270_pin_config));
 
+       mmc_cd = GPIO13_MMC_CD;
+       nand_rb = GPIO56_NAND_RB;
+       dm9000_flags = DM9000_PLATF_32BITONLY;
+}
+
+static void __init em_x270_exeda_init(void)
+{
+       pr_info("%s\n", __func__);
+       pxa2xx_mfp_config(ARRAY_AND_SIZE(exeda_pin_config));
+
+       mmc_cd = GPIO114_MMC_CD;
+       nand_rb = GPIO20_NAND_RB;
+       dm9000_flags = DM9000_PLATF_16BITONLY;
+}
+
+static void __init em_x270_init(void)
+{
+       pxa2xx_mfp_config(ARRAY_AND_SIZE(common_pin_config));
+
+       if (machine_is_em_x270())
+               em_x270_module_init();
+       else if (machine_is_exeda())
+               em_x270_exeda_init();
+       else
+               panic("Unsupported machine: %d\n", machine_arch_type);
+
+       em_x270_init_da9030();
        em_x270_init_dm9000();
        em_x270_init_rtc();
        em_x270_init_nand();
+       em_x270_init_nor();
        em_x270_init_lcd();
        em_x270_init_mmc();
        em_x270_init_ohci();
        em_x270_init_keypad();
        em_x270_init_gpio_keys();
        em_x270_init_ac97();
+       em_x270_init_camera();
+       em_x270_init_spi();
 }
 
 MACHINE_START(EM_X270, "Compulab EM-X270")
@@ -559,3 +1054,13 @@ MACHINE_START(EM_X270, "Compulab EM-X270")
        .timer          = &pxa_timer,
        .init_machine   = em_x270_init,
 MACHINE_END
+
+MACHINE_START(EXEDA, "Compulab eXeda")
+       .boot_params    = 0xa0000100,
+       .phys_io        = 0x40000000,
+       .io_pg_offst    = (io_p2v(0x40000000) >> 18) & 0xfffc,
+       .map_io         = pxa_map_io,
+       .init_irq       = pxa27x_init_irq,
+       .timer          = &pxa_timer,
+       .init_machine   = em_x270_init,
+MACHINE_END
index dfce7d5b659e64a19ee22736c8a0cb38364b1196..c60dadf847a624da6cc34da40bb61c61654e947e 100644 (file)
@@ -20,8 +20,7 @@
 #include <asm/mach/arch.h>
 #include <asm/mach-types.h>
 
-#include <mach/mfp-pxa25x.h>
-#include <mach/hardware.h>
+#include <mach/pxa25x.h>
 #include <mach/eseries-gpio.h>
 #include <mach/udc.h>
 #include <mach/irda.h>
index df5f822f3b6cd79cf351dafb861ae2b5aac5c032..92ba16e1b6fc6e042cf8c2aedb684f58cbdb1a6e 100644 (file)
 #include <linux/input.h>
 
 #include <asm/setup.h>
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+
+#include <mach/pxa27x.h>
 #include <mach/pxafb.h>
 #include <mach/ohci.h>
 #include <mach/i2c.h>
 #include <mach/hardware.h>
 #include <mach/pxa27x_keypad.h>
 
-#include <mach/mfp-pxa27x.h>
-#include <mach/pxa-regs.h>
-#include <mach/pxa2xx-regs.h>
-#include <asm/mach-types.h>
-#include <asm/mach/arch.h>
-
 #include "devices.h"
 #include "generic.h"
 
index 0ccc91c92c44e54722384cf0322afd53147c9ecd..3126a35aa002e57dd405ec468045919b14674546 100644 (file)
@@ -26,8 +26,9 @@
 #include <asm/mach/map.h>
 #include <asm/mach-types.h>
 
-#include <mach/pxa-regs.h>
 #include <mach/reset.h>
+#include <mach/gpio.h>
+#include <mach/pxa2xx-gpio.h>
 
 #include "generic.h"
 
@@ -127,3 +128,33 @@ void __init pxa_map_io(void)
        iotable_init(standard_io_desc, ARRAY_SIZE(standard_io_desc));
        get_clk_frequency_khz(1);
 }
+
+/*
+ * Configure pins for GPIO or other functions
+ */
+int pxa_gpio_mode(int gpio_mode)
+{
+       unsigned long flags;
+       int gpio = gpio_mode & GPIO_MD_MASK_NR;
+       int fn = (gpio_mode & GPIO_MD_MASK_FN) >> 8;
+       int gafr;
+
+       if (gpio > pxa_last_gpio)
+               return -EINVAL;
+
+       local_irq_save(flags);
+       if (gpio_mode & GPIO_DFLT_LOW)
+               GPCR(gpio) = GPIO_bit(gpio);
+       else if (gpio_mode & GPIO_DFLT_HIGH)
+               GPSR(gpio) = GPIO_bit(gpio);
+       if (gpio_mode & GPIO_MD_MASK_DIR)
+               GPDR(gpio) |= GPIO_bit(gpio);
+       else
+               GPDR(gpio) &= ~GPIO_bit(gpio);
+       gafr = GAFR(gpio) & ~(0x3 << (((gpio) & 0xf)*2));
+       GAFR(gpio) = gafr |  (fn  << (((gpio) & 0xf)*2));
+       local_irq_restore(flags);
+
+       return 0;
+}
+EXPORT_SYMBOL(pxa_gpio_mode);
index dc876a8e6668a048b1176ede5e4378ce86bd67b4..3465268ca71693b182ab39313273ede8236dbed1 100644 (file)
@@ -9,20 +9,17 @@
  * published by the Free Software Foundation.
  */
 
-typedef int (*set_wake_t)(unsigned int, unsigned int);
-
 struct sys_timer;
 
 extern struct sys_timer pxa_timer;
-extern void __init pxa_init_irq(int irq_nr, set_wake_t fn);
-extern void __init pxa_init_gpio(int gpio_nr, set_wake_t fn);
+extern void __init pxa_init_irq(int irq_nr,
+                               int (*set_wake)(unsigned int, unsigned int));
 extern void __init pxa25x_init_irq(void);
 extern void __init pxa27x_init_irq(void);
 extern void __init pxa3xx_init_irq(void);
 extern void __init pxa_map_io(void);
 
 extern unsigned int get_clk_frequency_khz(int info);
-extern int pxa_last_gpio;
 
 #define SET_BANK(__nr,__start,__size) \
        mi->bank[__nr].start = (__start), \
diff --git a/arch/arm/mach-pxa/gpio.c b/arch/arm/mach-pxa/gpio.c
deleted file mode 100644 (file)
index 5fec1e4..0000000
+++ /dev/null
@@ -1,453 +0,0 @@
-/*
- *  linux/arch/arm/mach-pxa/gpio.c
- *
- *  Generic PXA GPIO handling
- *
- *  Author:    Nicolas Pitre
- *  Created:   Jun 15, 2001
- *  Copyright: MontaVista Software Inc.
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License version 2 as
- *  published by the Free Software Foundation.
- */
-
-#include <linux/init.h>
-#include <linux/module.h>
-#include <linux/irq.h>
-#include <linux/sysdev.h>
-#include <linux/io.h>
-
-#include <asm/gpio.h>
-#include <mach/hardware.h>
-#include <mach/pxa-regs.h>
-#include <mach/pxa2xx-gpio.h>
-
-#include "generic.h"
-
-#define GPIO0_BASE     ((void __iomem *)io_p2v(0x40E00000))
-#define GPIO1_BASE     ((void __iomem *)io_p2v(0x40E00004))
-#define GPIO2_BASE     ((void __iomem *)io_p2v(0x40E00008))
-#define GPIO3_BASE     ((void __iomem *)io_p2v(0x40E00100))
-
-#define GPLR_OFFSET    0x00
-#define GPDR_OFFSET    0x0C
-#define GPSR_OFFSET    0x18
-#define GPCR_OFFSET    0x24
-#define GRER_OFFSET    0x30
-#define GFER_OFFSET    0x3C
-#define GEDR_OFFSET    0x48
-
-struct pxa_gpio_chip {
-       struct gpio_chip chip;
-       void __iomem     *regbase;
-};
-
-int pxa_last_gpio;
-
-#ifdef CONFIG_CPU_PXA26x
-/* GPIO86/87/88/89 on PXA26x have their direction bits in GPDR2 inverted,
- * as well as their Alternate Function value being '1' for GPIO in GAFRx.
- */
-static int __gpio_is_inverted(unsigned gpio)
-{
-       return cpu_is_pxa25x() && gpio > 85;
-}
-#else
-#define __gpio_is_inverted(gpio)       (0)
-#endif
-
-/*
- * Configure pins for GPIO or other functions
- */
-int pxa_gpio_mode(int gpio_mode)
-{
-       unsigned long flags;
-       int gpio = gpio_mode & GPIO_MD_MASK_NR;
-       int fn = (gpio_mode & GPIO_MD_MASK_FN) >> 8;
-       int gafr;
-
-       if (gpio > pxa_last_gpio)
-               return -EINVAL;
-
-       local_irq_save(flags);
-       if (gpio_mode & GPIO_DFLT_LOW)
-               GPCR(gpio) = GPIO_bit(gpio);
-       else if (gpio_mode & GPIO_DFLT_HIGH)
-               GPSR(gpio) = GPIO_bit(gpio);
-       if (gpio_mode & GPIO_MD_MASK_DIR)
-               GPDR(gpio) |= GPIO_bit(gpio);
-       else
-               GPDR(gpio) &= ~GPIO_bit(gpio);
-       gafr = GAFR(gpio) & ~(0x3 << (((gpio) & 0xf)*2));
-       GAFR(gpio) = gafr |  (fn  << (((gpio) & 0xf)*2));
-       local_irq_restore(flags);
-
-       return 0;
-}
-EXPORT_SYMBOL(pxa_gpio_mode);
-
-static int pxa_gpio_direction_input(struct gpio_chip *chip, unsigned offset)
-{
-       unsigned long        flags;
-       u32                  mask = 1 << offset;
-       u32                  value;
-       struct pxa_gpio_chip *pxa;
-       void __iomem         *gpdr;
-
-       pxa = container_of(chip, struct pxa_gpio_chip, chip);
-       gpdr = pxa->regbase + GPDR_OFFSET;
-       local_irq_save(flags);
-       value = __raw_readl(gpdr);
-       if (__gpio_is_inverted(chip->base + offset))
-               value |= mask;
-       else
-               value &= ~mask;
-       __raw_writel(value, gpdr);
-       local_irq_restore(flags);
-
-       return 0;
-}
-
-static int pxa_gpio_direction_output(struct gpio_chip *chip,
-                                       unsigned offset, int value)
-{
-       unsigned long        flags;
-       u32                  mask = 1 << offset;
-       u32                  tmp;
-       struct pxa_gpio_chip *pxa;
-       void __iomem         *gpdr;
-
-       pxa = container_of(chip, struct pxa_gpio_chip, chip);
-       __raw_writel(mask,
-                       pxa->regbase + (value ? GPSR_OFFSET : GPCR_OFFSET));
-       gpdr = pxa->regbase + GPDR_OFFSET;
-       local_irq_save(flags);
-       tmp = __raw_readl(gpdr);
-       if (__gpio_is_inverted(chip->base + offset))
-               tmp &= ~mask;
-       else
-               tmp |= mask;
-       __raw_writel(tmp, gpdr);
-       local_irq_restore(flags);
-
-       return 0;
-}
-
-/*
- * Return GPIO level
- */
-static int pxa_gpio_get(struct gpio_chip *chip, unsigned offset)
-{
-       u32                  mask = 1 << offset;
-       struct pxa_gpio_chip *pxa;
-
-       pxa = container_of(chip, struct pxa_gpio_chip, chip);
-       return __raw_readl(pxa->regbase + GPLR_OFFSET) & mask;
-}
-
-/*
- * Set output GPIO level
- */
-static void pxa_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
-{
-       u32                  mask = 1 << offset;
-       struct pxa_gpio_chip *pxa;
-
-       pxa = container_of(chip, struct pxa_gpio_chip, chip);
-
-       if (value)
-               __raw_writel(mask, pxa->regbase + GPSR_OFFSET);
-       else
-               __raw_writel(mask, pxa->regbase + GPCR_OFFSET);
-}
-
-#define GPIO_CHIP(_n)                                                  \
-       [_n] = {                                                        \
-               .regbase = GPIO##_n##_BASE,                             \
-               .chip = {                                               \
-                       .label            = "gpio-" #_n,                \
-                       .direction_input  = pxa_gpio_direction_input,   \
-                       .direction_output = pxa_gpio_direction_output,  \
-                       .get              = pxa_gpio_get,               \
-                       .set              = pxa_gpio_set,               \
-                       .base             = (_n) * 32,                  \
-                       .ngpio            = 32,                         \
-               },                                                      \
-       }
-
-static struct pxa_gpio_chip pxa_gpio_chip[] = {
-       GPIO_CHIP(0),
-       GPIO_CHIP(1),
-       GPIO_CHIP(2),
-#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
-       GPIO_CHIP(3),
-#endif
-};
-
-/*
- * PXA GPIO edge detection for IRQs:
- * IRQs are generated on Falling-Edge, Rising-Edge, or both.
- * Use this instead of directly setting GRER/GFER.
- */
-
-static unsigned long GPIO_IRQ_rising_edge[4];
-static unsigned long GPIO_IRQ_falling_edge[4];
-static unsigned long GPIO_IRQ_mask[4];
-
-/*
- * On PXA25x and PXA27x, GAFRx and GPDRx together decide the alternate
- * function of a GPIO, and GPDRx cannot be altered once configured. It
- * is attributed as "occupied" here (I know this terminology isn't
- * accurate, you are welcome to propose a better one :-)
- */
-static int __gpio_is_occupied(unsigned gpio)
-{
-       if (cpu_is_pxa27x() || cpu_is_pxa25x()) {
-               int af = (GAFR(gpio) >> ((gpio & 0xf) * 2)) & 0x3;
-               int dir = GPDR(gpio) & GPIO_bit(gpio);
-
-               if (__gpio_is_inverted(gpio))
-                       return af != 1 || dir == 0;
-               else
-                       return af != 0 || dir != 0;
-       }
-
-       return 0;
-}
-
-static int pxa_gpio_irq_type(unsigned int irq, unsigned int type)
-{
-       int gpio, idx;
-
-       gpio = IRQ_TO_GPIO(irq);
-       idx = gpio >> 5;
-
-       if (type == IRQ_TYPE_PROBE) {
-               /* Don't mess with enabled GPIOs using preconfigured edges or
-                * GPIOs set to alternate function or to output during probe
-                */
-               if ((GPIO_IRQ_rising_edge[idx] & GPIO_bit(gpio)) ||
-                   (GPIO_IRQ_falling_edge[idx] & GPIO_bit(gpio)))
-                       return 0;
-
-               if (__gpio_is_occupied(gpio))
-                       return 0;
-
-               type = IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING;
-       }
-
-       if (__gpio_is_inverted(gpio))
-               GPDR(gpio) |= GPIO_bit(gpio);
-       else
-               GPDR(gpio) &= ~GPIO_bit(gpio);
-
-       if (type & IRQ_TYPE_EDGE_RISING)
-               __set_bit(gpio, GPIO_IRQ_rising_edge);
-       else
-               __clear_bit(gpio, GPIO_IRQ_rising_edge);
-
-       if (type & IRQ_TYPE_EDGE_FALLING)
-               __set_bit(gpio, GPIO_IRQ_falling_edge);
-       else
-               __clear_bit(gpio, GPIO_IRQ_falling_edge);
-
-       GRER(gpio) = GPIO_IRQ_rising_edge[idx] & GPIO_IRQ_mask[idx];
-       GFER(gpio) = GPIO_IRQ_falling_edge[idx] & GPIO_IRQ_mask[idx];
-
-       pr_debug("%s: IRQ%d (GPIO%d) - edge%s%s\n", __func__, irq, gpio,
-               ((type & IRQ_TYPE_EDGE_RISING)  ? " rising"  : ""),
-               ((type & IRQ_TYPE_EDGE_FALLING) ? " falling" : ""));
-       return 0;
-}
-
-/*
- * GPIO IRQs must be acknowledged.  This is for GPIO 0 and 1.
- */
-
-static void pxa_ack_low_gpio(unsigned int irq)
-{
-       GEDR0 = (1 << (irq - IRQ_GPIO0));
-}
-
-static void pxa_mask_low_gpio(unsigned int irq)
-{
-       ICMR &= ~(1 << (irq - PXA_IRQ(0)));
-}
-
-static void pxa_unmask_low_gpio(unsigned int irq)
-{
-       ICMR |= 1 << (irq - PXA_IRQ(0));
-}
-
-static struct irq_chip pxa_low_gpio_chip = {
-       .name           = "GPIO-l",
-       .ack            = pxa_ack_low_gpio,
-       .mask           = pxa_mask_low_gpio,
-       .unmask         = pxa_unmask_low_gpio,
-       .set_type       = pxa_gpio_irq_type,
-};
-
-/*
- * Demux handler for GPIO>=2 edge detect interrupts
- */
-
-#define GEDR_BITS      (sizeof(gedr) * BITS_PER_BYTE)
-
-static void pxa_gpio_demux_handler(unsigned int irq, struct irq_desc *desc)
-{
-       int loop, bit, n;
-       unsigned long gedr[4];
-
-       do {
-               gedr[0] = GEDR0 & GPIO_IRQ_mask[0] & ~3;
-               gedr[1] = GEDR1 & GPIO_IRQ_mask[1];
-               gedr[2] = GEDR2 & GPIO_IRQ_mask[2];
-               gedr[3] = GEDR3 & GPIO_IRQ_mask[3];
-
-               GEDR0 = gedr[0]; GEDR1 = gedr[1];
-               GEDR2 = gedr[2]; GEDR3 = gedr[3];
-
-               loop = 0;
-               bit = find_first_bit(gedr, GEDR_BITS);
-               while (bit < GEDR_BITS) {
-                       loop = 1;
-
-                       n = PXA_GPIO_IRQ_BASE + bit;
-                       generic_handle_irq(n);
-
-                       bit = find_next_bit(gedr, GEDR_BITS, bit + 1);
-               }
-       } while (loop);
-}
-
-static void pxa_ack_muxed_gpio(unsigned int irq)
-{
-       int gpio = irq - IRQ_GPIO(2) + 2;
-       GEDR(gpio) = GPIO_bit(gpio);
-}
-
-static void pxa_mask_muxed_gpio(unsigned int irq)
-{
-       int gpio = irq - IRQ_GPIO(2) + 2;
-       __clear_bit(gpio, GPIO_IRQ_mask);
-       GRER(gpio) &= ~GPIO_bit(gpio);
-       GFER(gpio) &= ~GPIO_bit(gpio);
-}
-
-static void pxa_unmask_muxed_gpio(unsigned int irq)
-{
-       int gpio = irq - IRQ_GPIO(2) + 2;
-       int idx = gpio >> 5;
-       __set_bit(gpio, GPIO_IRQ_mask);
-       GRER(gpio) = GPIO_IRQ_rising_edge[idx] & GPIO_IRQ_mask[idx];
-       GFER(gpio) = GPIO_IRQ_falling_edge[idx] & GPIO_IRQ_mask[idx];
-}
-
-static struct irq_chip pxa_muxed_gpio_chip = {
-       .name           = "GPIO",
-       .ack            = pxa_ack_muxed_gpio,
-       .mask           = pxa_mask_muxed_gpio,
-       .unmask         = pxa_unmask_muxed_gpio,
-       .set_type       = pxa_gpio_irq_type,
-};
-
-void __init pxa_init_gpio(int gpio_nr, set_wake_t fn)
-{
-       int irq, i, gpio;
-
-       pxa_last_gpio = gpio_nr - 1;
-
-       /* clear all GPIO edge detects */
-       for (i = 0; i < gpio_nr; i += 32) {
-               GFER(i) = 0;
-               GRER(i) = 0;
-               GEDR(i) = GEDR(i);
-       }
-
-       /* GPIO 0 and 1 must have their mask bit always set */
-       GPIO_IRQ_mask[0] = 3;
-
-       for (irq = IRQ_GPIO0; irq <= IRQ_GPIO1; irq++) {
-               set_irq_chip(irq, &pxa_low_gpio_chip);
-               set_irq_handler(irq, handle_edge_irq);
-               set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
-       }
-
-       for (irq = IRQ_GPIO(2); irq < IRQ_GPIO(gpio_nr); irq++) {
-               set_irq_chip(irq, &pxa_muxed_gpio_chip);
-               set_irq_handler(irq, handle_edge_irq);
-               set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
-       }
-
-       /* Install handler for GPIO>=2 edge detect interrupts */
-       set_irq_chained_handler(IRQ_GPIO_2_x, pxa_gpio_demux_handler);
-
-       pxa_low_gpio_chip.set_wake = fn;
-       pxa_muxed_gpio_chip.set_wake = fn;
-
-       /* add a GPIO chip for each register bank.
-        * the last PXA25x register only contains 21 GPIOs
-        */
-       for (gpio = 0, i = 0; gpio < gpio_nr; gpio += 32, i++) {
-               if (gpio + 32 > gpio_nr)
-                       pxa_gpio_chip[i].chip.ngpio = gpio_nr - gpio;
-               gpiochip_add(&pxa_gpio_chip[i].chip);
-       }
-}
-
-#ifdef CONFIG_PM
-
-static unsigned long saved_gplr[4];
-static unsigned long saved_gpdr[4];
-static unsigned long saved_grer[4];
-static unsigned long saved_gfer[4];
-
-static int pxa_gpio_suspend(struct sys_device *dev, pm_message_t state)
-{
-       int i, gpio;
-
-       for (gpio = 0, i = 0; gpio < pxa_last_gpio; gpio += 32, i++) {
-               saved_gplr[i] = GPLR(gpio);
-               saved_gpdr[i] = GPDR(gpio);
-               saved_grer[i] = GRER(gpio);
-               saved_gfer[i] = GFER(gpio);
-
-               /* Clear GPIO transition detect bits */
-               GEDR(gpio) = GEDR(gpio);
-       }
-       return 0;
-}
-
-static int pxa_gpio_resume(struct sys_device *dev)
-{
-       int i, gpio;
-
-       for (gpio = 0, i = 0; gpio < pxa_last_gpio; gpio += 32, i++) {
-               /* restore level with set/clear */
-               GPSR(gpio) = saved_gplr[i];
-               GPCR(gpio) = ~saved_gplr[i];
-
-               GRER(gpio) = saved_grer[i];
-               GFER(gpio) = saved_gfer[i];
-               GPDR(gpio) = saved_gpdr[i];
-       }
-       return 0;
-}
-#else
-#define pxa_gpio_suspend       NULL
-#define pxa_gpio_resume                NULL
-#endif
-
-struct sysdev_class pxa_gpio_sysclass = {
-       .name           = "gpio",
-       .suspend        = pxa_gpio_suspend,
-       .resume         = pxa_gpio_resume,
-};
-
-static int __init pxa_gpio_init(void)
-{
-       return sysdev_class_register(&pxa_gpio_sysclass);
-}
-
-core_initcall(pxa_gpio_init);
index e296ce11658c48633aae5c696fbcaab1355e9ec2..ca9912ea78d93207962b34fc866140ba80d779e8 100644 (file)
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 #include <asm/mach/flash.h>
+
+#include <mach/pxa25x.h>
 #include <mach/mmc.h>
 #include <mach/udc.h>
 #include <mach/gumstix.h>
 
-#include <mach/pxa-regs.h>
-#include <mach/pxa2xx-regs.h>
-#include <mach/mfp-pxa25x.h>
-
 #include "generic.h"
 
 static struct resource flash_resource = {
@@ -191,6 +189,11 @@ int __attribute__((weak)) am200_init(void)
        return 0;
 }
 
+int __attribute__((weak)) am300_init(void)
+{
+       return 0;
+}
+
 static void __init carrier_board_init(void)
 {
        /*
@@ -198,6 +201,7 @@ static void __init carrier_board_init(void)
         * they cannot be detected programatically
         */
        am200_init();
+       am300_init();
 }
 
 static void __init gumstix_init(void)
index da6e4422c0f3204bfdd8a553ec4c0c59c52ed107..6a197fb5c09567f8b51c23c9711e6950d5d21c90 100644 (file)
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
 #include <linux/mtd/physmap.h>
+
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
+
+#include <mach/pxa25x.h>
 #include <mach/h5000.h>
-#include <mach/pxa-regs.h>
-#include <mach/pxa2xx-regs.h>
-#include <mach/mfp-pxa25x.h>
 #include <mach/udc.h>
+
 #include "generic.h"
 
 /*
diff --git a/arch/arm/mach-pxa/himalaya.c b/arch/arm/mach-pxa/himalaya.c
new file mode 100644 (file)
index 0000000..cea99fe
--- /dev/null
@@ -0,0 +1,166 @@
+/*
+ * linux/arch/arm/mach-pxa/himalaya.c
+ *
+ * Hardware definitions for the HTC Himalaya
+ *
+ * Based on 2.6.21-hh20's himalaya.c and himalaya_lcd.c
+ *
+ * Copyright (c) 2008 Zbynek Michl <Zbynek.Michl@seznam.cz>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/device.h>
+#include <linux/fb.h>
+#include <linux/platform_device.h>
+
+#include <video/w100fb.h>
+
+#include <asm/setup.h>
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+
+#include <mach/mfp-pxa25x.h>
+#include <mach/hardware.h>
+
+#include "generic.h"
+
+/* ---------------------- Himalaya LCD definitions -------------------- */
+
+static struct w100_gen_regs himalaya_lcd_regs = {
+       .lcd_format =        0x00000003,
+       .lcdd_cntl1 =        0x00000000,
+       .lcdd_cntl2 =        0x0003ffff,
+       .genlcd_cntl1 =      0x00fff003,
+       .genlcd_cntl2 =      0x00000003,
+       .genlcd_cntl3 =      0x000102aa,
+};
+
+static struct w100_mode himalaya4_lcd_mode = {
+       .xres           = 240,
+       .yres           = 320,
+       .left_margin    = 0,
+       .right_margin   = 31,
+       .upper_margin   = 15,
+       .lower_margin   = 0,
+       .crtc_ss        = 0x80150014,
+       .crtc_ls        = 0xa0fb00f7,
+       .crtc_gs        = 0xc0080007,
+       .crtc_vpos_gs   = 0x00080007,
+       .crtc_rev       = 0x0000000a,
+       .crtc_dclk      = 0x81700030,
+       .crtc_gclk      = 0x8015010f,
+       .crtc_goe       = 0x00000000,
+       .pll_freq       = 80,
+       .pixclk_divider = 15,
+       .pixclk_divider_rotated = 15,
+       .pixclk_src     = CLK_SRC_PLL,
+       .sysclk_divider = 0,
+       .sysclk_src     = CLK_SRC_PLL,
+};
+
+static struct w100_mode himalaya6_lcd_mode = {
+       .xres           = 240,
+       .yres           = 320,
+       .left_margin    = 9,
+       .right_margin   = 8,
+       .upper_margin   = 5,
+       .lower_margin   = 4,
+       .crtc_ss        = 0x80150014,
+       .crtc_ls        = 0xa0fb00f7,
+       .crtc_gs        = 0xc0080007,
+       .crtc_vpos_gs   = 0x00080007,
+       .crtc_rev       = 0x0000000a,
+       .crtc_dclk      = 0xa1700030,
+       .crtc_gclk      = 0x8015010f,
+       .crtc_goe       = 0x00000000,
+       .pll_freq       = 95,
+       .pixclk_divider = 0xb,
+       .pixclk_divider_rotated = 4,
+       .pixclk_src     = CLK_SRC_PLL,
+       .sysclk_divider = 1,
+       .sysclk_src     = CLK_SRC_PLL,
+};
+
+static struct w100_gpio_regs himalaya_w100_gpio_info = {
+       .init_data1 = 0xffff0000,       /* GPIO_DATA  */
+       .gpio_dir1  = 0x00000000,       /* GPIO_CNTL1 */
+       .gpio_oe1   = 0x003c0000,       /* GPIO_CNTL2 */
+       .init_data2 = 0x00000000,       /* GPIO_DATA2 */
+       .gpio_dir2  = 0x00000000,       /* GPIO_CNTL3 */
+       .gpio_oe2   = 0x00000000,       /* GPIO_CNTL4 */
+};
+
+static struct w100fb_mach_info himalaya_fb_info = {
+       .num_modes  = 1,
+       .regs       = &himalaya_lcd_regs,
+       .gpio       = &himalaya_w100_gpio_info,
+       .xtal_freq = 16000000,
+};
+
+static struct resource himalaya_fb_resources[] = {
+       [0] = {
+               .start  = 0x08000000,
+               .end    = 0x08ffffff,
+               .flags  = IORESOURCE_MEM,
+       },
+};
+
+static struct platform_device himalaya_fb_device = {
+       .name           = "w100fb",
+       .id             = -1,
+       .dev            = {
+               .platform_data  = &himalaya_fb_info,
+       },
+       .num_resources  = ARRAY_SIZE(himalaya_fb_resources),
+       .resource       = himalaya_fb_resources,
+};
+
+/* ----------------------------------------------------------------------- */
+
+static struct platform_device *devices[] __initdata = {
+       &himalaya_fb_device,
+};
+
+static void __init himalaya_lcd_init(void)
+{
+       int himalaya_boardid;
+
+       himalaya_boardid = 0x4; /* hardcoded (detection needs ASIC3 functions) */
+       printk(KERN_INFO "himalaya LCD Driver init. boardid=%d\n",
+               himalaya_boardid);
+
+       switch (himalaya_boardid) {
+       case 0x4:
+               himalaya_fb_info.modelist = &himalaya4_lcd_mode;
+       break;
+       case 0x6:
+               himalaya_fb_info.modelist = &himalaya6_lcd_mode;
+       break;
+       default:
+               printk(KERN_INFO "himalaya lcd_init: unknown boardid=%d. Using 0x4\n",
+                       himalaya_boardid);
+               himalaya_fb_info.modelist = &himalaya4_lcd_mode;
+       }
+}
+
+static void __init himalaya_init(void)
+{
+       himalaya_lcd_init();
+       platform_add_devices(devices, ARRAY_SIZE(devices));
+}
+
+
+MACHINE_START(HIMALAYA, "HTC Himalaya")
+       .phys_io = 0x40000000,
+       .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
+       .boot_params = 0xa0000100,
+       .map_io = pxa_map_io,
+       .init_irq = pxa25x_init_irq,
+       .init_machine = himalaya_init,
+       .timer = &pxa_timer,
+MACHINE_END
index 013b15baa0343a9059fc558c4591e07e3975c5ea..b6243b59d9be46dd25e5da92aea7568a38e61476 100644 (file)
@@ -31,8 +31,7 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <mach/pxa-regs.h>
-#include <mach/mfp-pxa25x.h>
+#include <mach/pxa25x.h>
 #include <mach/idp.h>
 #include <mach/pxafb.h>
 #include <mach/bitfield.h>
index 364c5e271330ba5bc8693452d3c8bb0340f62708..2121309b2474dc545e379cac27697c8d374b0bad 100644 (file)
 #include <asm/mach/map.h>
 #include <asm/mach/flash.h>
 
+#include <mach/pxa27x.h>
 #include <mach/i2c.h>
-#include <mach/pxa-regs.h>
-#include <mach/pxa2xx-regs.h>
-#include <mach/mfp-pxa27x.h>
-#include <mach/regs-ssp.h>
 #include <mach/udc.h>
 #include <mach/mmc.h>
 #include <mach/pxa2xx_spi.h>
index 2ae373fb567503e6fbe0c3d8b3bfed7c7e3e44b4..3f2a01d6a03c6563c377761a42ba586f2cd9d5bd 100644 (file)
@@ -1,19 +1,31 @@
 #ifndef _COLIBRI_H_
 #define _COLIBRI_H_
+/*
+ * common settings for all modules
+ */
+
+#if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE)
+extern void colibri_pxa3xx_init_mmc(mfp_cfg_t *pins, int len, int detect_pin);
+#else
+static inline void colibri_pxa3xx_init_mmc(mfp_cfg_t *, int, int) {}
+#endif
+
+#if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE)
+extern void colibri_pxa3xx_init_lcd(int bl_pin);
+#else
+static inline void colibri_pxa3xx_init_lcd(int) {}
+#endif
 
 /* physical memory regions */
-#define COLIBRI_FLASH_PHYS     (PXA_CS0_PHYS)  /* Flash region */
-#define COLIBRI_ETH_PHYS       (PXA_CS2_PHYS)  /* Ethernet DM9000 region */
 #define COLIBRI_SDRAM_BASE     0xa0000000      /* SDRAM region */
 
-/* virtual memory regions */
-#define COLIBRI_DISK_VIRT      0xF0000000      /* Disk On Chip region */
+/* definitions for Colibri PXA270 */
 
-/* size of flash */
-#define COLIBRI_FLASH_SIZE     0x02000000      /* Flash size 32 MB */
-
-/* Ethernet Controller Davicom DM9000 */
-#define GPIO_DM9000            114
-#define COLIBRI_ETH_IRQ        IRQ_GPIO(GPIO_DM9000)
+#define COLIBRI_PXA270_FLASH_PHYS      (PXA_CS0_PHYS)  /* Flash region */
+#define COLIBRI_PXA270_ETH_PHYS                (PXA_CS2_PHYS)  /* Ethernet */
+#define COLIBRI_PXA270_ETH_IRQ_GPIO    114
+#define COLIBRI_PXA270_ETH_IRQ         \
+       gpio_to_irq(mfp_to_gpio(COLIBRI_PXA270_ETH_IRQ_GPIO))
 
 #endif /* _COLIBRI_H_ */
+
diff --git a/arch/arm/mach-pxa/include/mach/csb726.h b/arch/arm/mach-pxa/include/mach/csb726.h
new file mode 100644 (file)
index 0000000..747ab1a
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ *  Support for Cogent CSB726
+ *
+ *  Copyright (c) 2008 Dmitry Baryshkov
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ *
+ */
+#ifndef CSB726_H
+#define CSB726_H
+
+#define CSB726_GPIO_IRQ_LAN    52
+#define CSB726_GPIO_IRQ_SM501  53
+#define CSB726_GPIO_MMC_DETECT 100
+#define CSB726_GPIO_MMC_RO     101
+
+#define CSB726_FLASH_SIZE      (64 * 1024 * 1024)
+#define CSB726_FLASH_uMON      (8 * 1024 * 1024)
+
+#define CSB726_IRQ_LAN         gpio_to_irq(CSB726_GPIO_IRQ_LAN)
+#define CSB726_IRQ_SM501       gpio_to_irq(CSB726_GPIO_IRQ_SM501)
+
+#endif
+
index 7804637a6df3de4c32b435b865cec0721dc0e431..5bd55894a48d626131dca98a3ce99aefcb9f777e 100644 (file)
 #ifndef __ASM_ARCH_DMA_H
 #define __ASM_ARCH_DMA_H
 
-/*
- * Descriptor structure for PXA's DMA engine
- * Note: this structure must always be aligned to a 16-byte boundary.
- */
-
-typedef struct pxa_dma_desc {
-       volatile u32 ddadr;     /* Points to the next descriptor + flags */
-       volatile u32 dsadr;     /* DSADR value for the current transfer */
-       volatile u32 dtadr;     /* DTADR value for the current transfer */
-       volatile u32 dcmd;      /* DCMD value for the current transfer */
-} pxa_dma_desc;
-
-typedef enum {
-       DMA_PRIO_HIGH = 0,
-       DMA_PRIO_MEDIUM = 1,
-       DMA_PRIO_LOW = 2
-} pxa_dma_prio;
-
-/*
- * DMA registration
- */
-
-int __init pxa_init_dma(int num_ch);
-
-int pxa_request_dma (char *name,
-                        pxa_dma_prio prio,
-                        void (*irq_handler)(int, void *),
-                        void *data);
+#include <mach/hardware.h>
 
-void pxa_free_dma (int dma_ch);
+/* DMA Controller Registers Definitions */
+#define DMAC_REGS_VIRT io_p2v(0x40000000)
 
+#include <plat/dma.h>
 #endif /* _ASM_ARCH_DMA_H */
index 2c538d8c362d40bc00e0cc7760c00dffa4fa4b87..b024a8b374394ac2731596ba39bba462309f04a6 100644 (file)
 #ifndef __ASM_ARCH_PXA_GPIO_H
 #define __ASM_ARCH_PXA_GPIO_H
 
-#include <mach/pxa-regs.h>
-#include <asm/irq.h>
+#include <mach/irqs.h>
 #include <mach/hardware.h>
-
 #include <asm-generic/gpio.h>
 
+#define GPIO_REGS_VIRT io_p2v(0x40E00000)
+
+#define BANK_OFF(n)    (((n) < 3) ? (n) << 2 : 0x100 + (((n) - 3) << 2))
+#define GPIO_REG(x)    (*(volatile u32 *)(GPIO_REGS_VIRT + (x)))
+
+/* GPIO Pin Level Registers */
+#define GPLR0          GPIO_REG(BANK_OFF(0) + 0x00)
+#define GPLR1          GPIO_REG(BANK_OFF(1) + 0x00)
+#define GPLR2          GPIO_REG(BANK_OFF(2) + 0x00)
+#define GPLR3          GPIO_REG(BANK_OFF(3) + 0x00)
+
+/* GPIO Pin Direction Registers */
+#define GPDR0          GPIO_REG(BANK_OFF(0) + 0x0c)
+#define GPDR1          GPIO_REG(BANK_OFF(1) + 0x0c)
+#define GPDR2          GPIO_REG(BANK_OFF(2) + 0x0c)
+#define GPDR3          GPIO_REG(BANK_OFF(3) + 0x0c)
+
+/* GPIO Pin Output Set Registers */
+#define GPSR0          GPIO_REG(BANK_OFF(0) + 0x18)
+#define GPSR1          GPIO_REG(BANK_OFF(1) + 0x18)
+#define GPSR2          GPIO_REG(BANK_OFF(2) + 0x18)
+#define GPSR3          GPIO_REG(BANK_OFF(3) + 0x18)
+
+/* GPIO Pin Output Clear Registers */
+#define GPCR0          GPIO_REG(BANK_OFF(0) + 0x24)
+#define GPCR1          GPIO_REG(BANK_OFF(1) + 0x24)
+#define GPCR2          GPIO_REG(BANK_OFF(2) + 0x24)
+#define GPCR3          GPIO_REG(BANK_OFF(3) + 0x24)
+
+/* GPIO Rising Edge Detect Registers */
+#define GRER0          GPIO_REG(BANK_OFF(0) + 0x30)
+#define GRER1          GPIO_REG(BANK_OFF(1) + 0x30)
+#define GRER2          GPIO_REG(BANK_OFF(2) + 0x30)
+#define GRER3          GPIO_REG(BANK_OFF(3) + 0x30)
+
+/* GPIO Falling Edge Detect Registers */
+#define GFER0          GPIO_REG(BANK_OFF(0) + 0x3c)
+#define GFER1          GPIO_REG(BANK_OFF(1) + 0x3c)
+#define GFER2          GPIO_REG(BANK_OFF(2) + 0x3c)
+#define GFER3          GPIO_REG(BANK_OFF(3) + 0x3c)
+
+/* GPIO Edge Detect Status Registers */
+#define GEDR0          GPIO_REG(BANK_OFF(0) + 0x48)
+#define GEDR1          GPIO_REG(BANK_OFF(1) + 0x48)
+#define GEDR2          GPIO_REG(BANK_OFF(2) + 0x48)
+#define GEDR3          GPIO_REG(BANK_OFF(3) + 0x48)
+
+/* GPIO Alternate Function Select Registers */
+#define GAFR0_L                GPIO_REG(0x0054)
+#define GAFR0_U                GPIO_REG(0x0058)
+#define GAFR1_L                GPIO_REG(0x005C)
+#define GAFR1_U                GPIO_REG(0x0060)
+#define GAFR2_L                GPIO_REG(0x0064)
+#define GAFR2_U                GPIO_REG(0x0068)
+#define GAFR3_L                GPIO_REG(0x006C)
+#define GAFR3_U                GPIO_REG(0x0070)
+
+/* More handy macros.  The argument is a literal GPIO number. */
+
+#define GPIO_bit(x)    (1 << ((x) & 0x1f))
+
+#define GPLR(x)                GPIO_REG(BANK_OFF((x) >> 5) + 0x00)
+#define GPDR(x)                GPIO_REG(BANK_OFF((x) >> 5) + 0x0c)
+#define GPSR(x)                GPIO_REG(BANK_OFF((x) >> 5) + 0x18)
+#define GPCR(x)                GPIO_REG(BANK_OFF((x) >> 5) + 0x24)
+#define GRER(x)                GPIO_REG(BANK_OFF((x) >> 5) + 0x30)
+#define GFER(x)                GPIO_REG(BANK_OFF((x) >> 5) + 0x3c)
+#define GEDR(x)                GPIO_REG(BANK_OFF((x) >> 5) + 0x48)
+#define GAFR(x)                GPIO_REG(0x54 + (((x) & 0x70) >> 2))
+
 
-/* NOTE: some PXAs have fewer on-chip GPIOs (like PXA255, with 85).
- * Those cases currently cause holes in the GPIO number space.
- */
 #define NR_BUILTIN_GPIO 128
 
-static inline int gpio_get_value(unsigned gpio)
+#define gpio_to_bank(gpio)     ((gpio) >> 5)
+#define gpio_to_irq(gpio)      IRQ_GPIO(gpio)
+#define irq_to_gpio(irq)       IRQ_TO_GPIO(irq)
+
+#ifdef CONFIG_CPU_PXA26x
+/* GPIO86/87/88/89 on PXA26x have their direction bits in GPDR2 inverted,
+ * as well as their Alternate Function value being '1' for GPIO in GAFRx.
+ */
+static inline int __gpio_is_inverted(unsigned gpio)
 {
-       if (__builtin_constant_p(gpio) && (gpio < NR_BUILTIN_GPIO))
-               return GPLR(gpio) & GPIO_bit(gpio);
-       else
-               return __gpio_get_value(gpio);
+       return cpu_is_pxa25x() && gpio > 85;
 }
+#else
+static inline int __gpio_is_inverted(unsigned gpio) { return 0; }
+#endif
 
-static inline void gpio_set_value(unsigned gpio, int value)
+/*
+ * On PXA25x and PXA27x, GAFRx and GPDRx together decide the alternate
+ * function of a GPIO, and GPDRx cannot be altered once configured. It
+ * is attributed as "occupied" here (I know this terminology isn't
+ * accurate, you are welcome to propose a better one :-)
+ */
+static inline int __gpio_is_occupied(unsigned gpio)
 {
-       if (__builtin_constant_p(gpio) && (gpio < NR_BUILTIN_GPIO)) {
-               if (value)
-                       GPSR(gpio) = GPIO_bit(gpio);
+       if (cpu_is_pxa27x() || cpu_is_pxa25x()) {
+               int af = (GAFR(gpio) >> ((gpio & 0xf) * 2)) & 0x3;
+               int dir = GPDR(gpio) & GPIO_bit(gpio);
+
+               if (__gpio_is_inverted(gpio))
+                       return af != 1 || dir == 0;
                else
-                       GPCR(gpio) = GPIO_bit(gpio);
-       } else {
-               __gpio_set_value(gpio, value);
-       }
+                       return af != 0 || dir != 0;
+       } else
+               return GPDR(gpio) & GPIO_bit(gpio);
 }
 
-#define gpio_cansleep __gpio_cansleep
-
-#define gpio_to_irq(gpio)      IRQ_GPIO(gpio)
-#define irq_to_gpio(irq)       IRQ_TO_GPIO(irq)
-
-
+#include <plat/gpio.h>
 #endif
index 099f54a41de4cf1f45cb8905241d1503660899fb..06abd416060765497cf9ee047bc9f2293a88de53 100644 (file)
@@ -97,4 +97,5 @@ has detected a cable insertion; driven low otherwise. */
 
 /* for expansion boards that can't be programatically detected */
 extern int am200_init(void);
+extern int am300_init(void);
 
index 4cb24154a5a8add2beca23d8285762588ca854f6..751b74811d0fa218d0d81ac01e1fb5a751f5e856 100644 (file)
@@ -25,7 +25,6 @@
 
 /* FPGA register virtual addresses */
 #define LUB_WHOAMI             __LUB_REG(LUBBOCK_FPGA_PHYS + 0x000)
-#define LUB_HEXLED             __LUB_REG(LUBBOCK_FPGA_PHYS + 0x010)
 #define LUB_DISC_BLNK_LED      __LUB_REG(LUBBOCK_FPGA_PHYS + 0x040)
 #define LUB_CONF_SWITCHES      __LUB_REG(LUBBOCK_FPGA_PHYS + 0x050)
 #define LUB_USER_SWITCHES      __LUB_REG(LUBBOCK_FPGA_PHYS + 0x060)
index 38d68d99f58552fc03847e6ae5fd4b094c48840a..82a399f3f9f2b547c7a1ccec5615045547770423 100644 (file)
@@ -69,7 +69,7 @@
 #define IRQ_MAGICIAN_SD                (IRQ_BOARD_START + 0)
 #define IRQ_MAGICIAN_EP                (IRQ_BOARD_START + 1)
 #define IRQ_MAGICIAN_BT                (IRQ_BOARD_START + 2)
-#define IRQ_MAGICIAN_AC                (IRQ_BOARD_START + 3)
+#define IRQ_MAGICIAN_VBUS      (IRQ_BOARD_START + 3)
 
 /*
  * CPLD EGPIOs
index a72869b73ee3a44d638cdd1fe5031d32913787cd..b13dc0269a6dddde342d269cf059c3e6a6072e23 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef __ASM_ARCH_MFP_PXA25X_H
 #define __ASM_ARCH_MFP_PXA25X_H
 
-#include <mach/mfp.h>
 #include <mach/mfp-pxa2xx.h>
 
 /* GPIO */
index da4f85a4f99010569794108c23e69bfb8e4ea59c..6543c05f47edb02076509c061de8eb519d0ab4f8 100644 (file)
@@ -8,7 +8,6 @@
  * specific controller, and this should work in most cases.
  */
 
-#include <mach/mfp.h>
 #include <mach/mfp-pxa2xx.h>
 
 /* Note: GPIO3/GPIO4 will be driven by Power I2C when PCFR/PI2C_EN
index 3e9211591e20e8c607fce324c35f817af4651391..658b28ed129b0a685286eeb7097021e2b8d5ddc7 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef __ASM_ARCH_MFP_PXA2XX_H
 #define __ASM_ARCH_MFP_PXA2XX_H
 
-#include <mach/mfp.h>
+#include <plat/mfp.h>
 
 /*
  * the following MFP_xxx bit definitions in mfp.h are re-used for pxa2xx:
index bc1fb33a6e70e4329c309ef3ca2634a1c6e49849..ae8441192ef07a2d0c3ab7f07fafdbf2f974859b 100644 (file)
@@ -15,7 +15,6 @@
 #ifndef __ASM_ARCH_MFP_PXA300_H
 #define __ASM_ARCH_MFP_PXA300_H
 
-#include <mach/mfp.h>
 #include <mach/mfp-pxa3xx.h>
 
 /* GPIO */
@@ -41,6 +40,7 @@
 #endif
 
 /* Chip Select */
+#define GPIO1_nCS2             MFP_CFG(GPIO1,  AF1)
 #define GPIO2_nCS3             MFP_CFG(GPIO2,  AF1)
 
 /* AC97 */
index 67f8385ea548994aa5ac345d4341028cd10cda70..07897e61d05afa7ec4af40c6744d83ea8575758c 100644 (file)
@@ -15,7 +15,6 @@
 #ifndef __ASM_ARCH_MFP_PXA320_H
 #define __ASM_ARCH_MFP_PXA320_H
 
-#include <mach/mfp.h>
 #include <mach/mfp-pxa3xx.h>
 
 /* GPIO */
@@ -38,6 +37,7 @@
 #define GPIO17_2_GPIO          MFP_CFG(GPIO17_2, AF0)
 
 /* Chip Select */
+#define GPIO3_nCS2             MFP_CFG(GPIO3, AF1)
 #define GPIO4_nCS3             MFP_CFG(GPIO4, AF1)
 
 /* AC97 */
index 1f6b35c015d0afdbb53398bf71ec0bd831ca757b..d375195d982b4d3bba1720c8b989233cffed0c8e 100644 (file)
@@ -1,68 +1,9 @@
 #ifndef __ASM_ARCH_MFP_PXA3XX_H
 #define __ASM_ARCH_MFP_PXA3XX_H
 
-#define MFPR_BASE      (0x40e10000)
-#define MFPR_SIZE      (PAGE_SIZE)
-
-/* MFPR register bit definitions */
-#define MFPR_PULL_SEL          (0x1 << 15)
-#define MFPR_PULLUP_EN         (0x1 << 14)
-#define MFPR_PULLDOWN_EN       (0x1 << 13)
-#define MFPR_SLEEP_SEL         (0x1 << 9)
-#define MFPR_SLEEP_OE_N                (0x1 << 7)
-#define MFPR_EDGE_CLEAR                (0x1 << 6)
-#define MFPR_EDGE_FALL_EN      (0x1 << 5)
-#define MFPR_EDGE_RISE_EN      (0x1 << 4)
-
-#define MFPR_SLEEP_DATA(x)     ((x) << 8)
-#define MFPR_DRIVE(x)          (((x) & 0x7) << 10)
-#define MFPR_AF_SEL(x)         (((x) & 0x7) << 0)
+#include <plat/mfp.h>
 
-#define MFPR_EDGE_NONE         (0)
-#define MFPR_EDGE_RISE         (MFPR_EDGE_RISE_EN)
-#define MFPR_EDGE_FALL         (MFPR_EDGE_FALL_EN)
-#define MFPR_EDGE_BOTH         (MFPR_EDGE_RISE | MFPR_EDGE_FALL)
-
-/*
- * Table that determines the low power modes outputs, with actual settings
- * used in parentheses for don't-care values. Except for the float output,
- * the configured driven and pulled levels match, so if there is a need for
- * non-LPM pulled output, the same configuration could probably be used.
- *
- * Output value  sleep_oe_n  sleep_data  pullup_en  pulldown_en  pull_sel
- *                 (bit 7)    (bit 8)    (bit 14)     (bit 13)   (bit 15)
- *
- * Input            0          X(0)        X(0)        X(0)       0
- * Drive 0          0          0           0           X(1)       0
- * Drive 1          0          1           X(1)        0         0
- * Pull hi (1)      1          X(1)        1           0         0
- * Pull lo (0)      1          X(0)        0           1         0
- * Z (float)        1          X(0)        0           0         0
- */
-#define MFPR_LPM_INPUT         (0)
-#define MFPR_LPM_DRIVE_LOW     (MFPR_SLEEP_DATA(0) | MFPR_PULLDOWN_EN)
-#define MFPR_LPM_DRIVE_HIGH            (MFPR_SLEEP_DATA(1) | MFPR_PULLUP_EN)
-#define MFPR_LPM_PULL_LOW              (MFPR_LPM_DRIVE_LOW  | MFPR_SLEEP_OE_N)
-#define MFPR_LPM_PULL_HIGH             (MFPR_LPM_DRIVE_HIGH | MFPR_SLEEP_OE_N)
-#define MFPR_LPM_FLOAT                 (MFPR_SLEEP_OE_N)
-#define MFPR_LPM_MASK          (0xe080)
-
-/*
- * The pullup and pulldown state of the MFP pin at run mode is by default
- * determined by the selected alternate function. In case that some buggy
- * devices need to override this default behavior,  the definitions below
- * indicates the setting of corresponding MFPR bits
- *
- * Definition       pull_sel  pullup_en  pulldown_en
- * MFPR_PULL_NONE       0         0        0
- * MFPR_PULL_LOW        1         0        1
- * MFPR_PULL_HIGH       1         1        0
- * MFPR_PULL_BOTH       1         1        1
- */
-#define MFPR_PULL_NONE         (0)
-#define MFPR_PULL_LOW          (MFPR_PULL_SEL | MFPR_PULLDOWN_EN)
-#define MFPR_PULL_BOTH         (MFPR_PULL_LOW | MFPR_PULLUP_EN)
-#define MFPR_PULL_HIGH         (MFPR_PULL_SEL | MFPR_PULLUP_EN)
+#define MFPR_BASE      (0x40e10000)
 
 /* PXA3xx common MFP configurations - processor specific ones defined
  * in mfp-pxa300.h and mfp-pxa320.h
 #define GPIO5_2_GPIO           MFP_CFG(GPIO5_2, AF0)
 #define GPIO6_2_GPIO           MFP_CFG(GPIO6_2, AF0)
 
-/*
- * each MFP pin will have a MFPR register, since the offset of the
- * register varies between processors, the processor specific code
- * should initialize the pin offsets by pxa3xx_mfp_init_addr()
- *
- * pxa3xx_mfp_init_addr - accepts a table of "pxa3xx_mfp_addr_map"
- * structure, which represents a range of MFP pins from "start" to
- * "end", with the offset begining at "offset", to define a single
- * pin, let "end" = -1
- *
- * use
- *
- * MFP_ADDR_X() to define a range of pins
- * MFP_ADDR()   to define a single pin
- * MFP_ADDR_END to signal the end of pin offset definitions
- */
-struct pxa3xx_mfp_addr_map {
-       unsigned int    start;
-       unsigned int    end;
-       unsigned long   offset;
-};
-
-#define MFP_ADDR_X(start, end, offset) \
-       { MFP_PIN_##start, MFP_PIN_##end, offset }
-
-#define MFP_ADDR(pin, offset) \
-       { MFP_PIN_##pin, -1, offset }
-
-#define MFP_ADDR_END   { MFP_PIN_INVALID, 0 }
-
-/*
- * pxa3xx_mfp_read()/pxa3xx_mfp_write() - for direct read/write access
- * to the MFPR register
- */
-unsigned long pxa3xx_mfp_read(int mfp);
-void pxa3xx_mfp_write(int mfp, unsigned long mfpr_val);
-
-/*
- * pxa3xx_mfp_config - configure the MFPR registers
- *
- * used by board specific initialization code
- */
-void pxa3xx_mfp_config(unsigned long *mfp_cfgs, int num);
-
-/*
- * pxa3xx_mfp_init_addr() - initialize the mapping between mfp pin
- * index and MFPR register offset
- *
- * used by processor specific code
+/* NOTE: usage of these two functions is not recommended,
+ * use pxa3xx_mfp_config() instead.
  */
-void __init pxa3xx_mfp_init_addr(struct pxa3xx_mfp_addr_map *);
-void __init pxa3xx_init_mfp(void);
+static inline unsigned long pxa3xx_mfp_read(int mfp)
+{
+       return mfp_read(mfp);
+}
+
+static inline void pxa3xx_mfp_write(int mfp, unsigned long val)
+{
+       mfp_write(mfp, val);
+}
+
+static inline void pxa3xx_mfp_config(unsigned long *mfp_cfg, int num)
+{
+       mfp_config(mfp_cfg, num);
+}
 #endif /* __ASM_ARCH_MFP_PXA3XX_H */
index fa73f56a137241fe905bc3dc4cbed9b1d2eb435e..0d119d3b922143211b12350244c3087209ba3cbd 100644 (file)
@@ -13,7 +13,6 @@
 #ifndef __ASM_ARCH_MFP_PXA9xx_H
 #define __ASM_ARCH_MFP_PXA9xx_H
 
-#include <mach/mfp.h>
 #include <mach/mfp-pxa3xx.h>
 
 /* GPIO */
index cfca8155be7232b294e72c3cf407e1c349f8c723..297387ec3618db35114729b9ae3cd89b2f7468aa 100644 (file)
@@ -15,8 +15,8 @@
 #ifndef __ARCH_PXA_MTD_XIP_H__
 #define __ARCH_PXA_MTD_XIP_H__
 
-#include <mach/hardware.h>
-#include <mach/pxa-regs.h>
+#include <mach/regs-ost.h>
+#include <mach/regs-intc.h>
 
 #define xip_irqpending()       (ICIP & ICMR)
 
diff --git a/arch/arm/mach-pxa/include/mach/palmld.h b/arch/arm/mach-pxa/include/mach/palmld.h
new file mode 100644 (file)
index 0000000..7c295a4
--- /dev/null
@@ -0,0 +1,109 @@
+/*
+ * GPIOs and interrupts for Palm LifeDrive Handheld Computer
+ *
+ * Authors:    Alex Osborne <ato@meshy.org>
+ *             Marek Vasut <marek.vasut@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+
+#ifndef _INCLUDE_PALMLD_H_
+#define _INCLUDE_PALMLD_H_
+
+/** HERE ARE GPIOs **/
+
+/* GPIOs */
+#define GPIO_NR_PALMLD_GPIO_RESET      1
+#define GPIO_NR_PALMLD_POWER_DETECT    4
+#define GPIO_NR_PALMLD_HOTSYNC_BUTTON_N        10
+#define GPIO_NR_PALMLD_POWER_SWITCH    12
+#define GPIO_NR_PALMLD_EARPHONE_DETECT         13
+#define GPIO_NR_PALMLD_LOCK_SWITCH     15
+
+/* SD/MMC */
+#define GPIO_NR_PALMLD_SD_DETECT_N     14
+#define GPIO_NR_PALMLD_SD_POWER                114
+#define GPIO_NR_PALMLD_SD_READONLY     116
+
+/* TOUCHSCREEN */
+#define GPIO_NR_PALMLD_WM9712_IRQ      27
+
+/* IRDA */
+#define GPIO_NR_PALMLD_IR_DISABLE      108
+
+/* LCD/BACKLIGHT */
+#define GPIO_NR_PALMLD_BL_POWER                19
+#define GPIO_NR_PALMLD_LCD_POWER       96
+
+/* LCD BORDER */
+#define GPIO_NR_PALMLD_BORDER_SWITCH   21
+#define GPIO_NR_PALMLD_BORDER_SELECT   22
+
+/* BLUETOOTH */
+#define GPIO_NR_PALMLD_BT_POWER                17
+#define GPIO_NR_PALMLD_BT_RESET                83
+
+/* PCMCIA (WiFi) */
+#define GPIO_NR_PALMLD_PCMCIA_READY    38
+#define GPIO_NR_PALMLD_PCMCIA_POWER    36
+#define GPIO_NR_PALMLD_PCMCIA_RESET    81
+
+/* LEDs */
+#define GPIO_NR_PALMLD_LED_GREEN       52
+#define GPIO_NR_PALMLD_LED_AMBER       94
+
+/* IDE */
+#define GPIO_NR_PALMLD_IDE_IRQ         95
+#define GPIO_NR_PALMLD_IDE_RESET       98
+#define GPIO_NR_PALMLD_IDE_PWEN                115
+
+/* USB */
+#define GPIO_NR_PALMLD_USB_DETECT_N    3
+#define GPIO_NR_PALMLD_USB_READY       86
+#define GPIO_NR_PALMLD_USB_RESET       88
+#define GPIO_NR_PALMLD_USB_INT         106
+#define GPIO_NR_PALMLD_USB_POWER       118
+/* 20, 53 and 86 are usb related too */
+
+/* INTERRUPTS */
+#define IRQ_GPIO_PALMLD_GPIO_RESET     IRQ_GPIO(GPIO_NR_PALMLD_GPIO_RESET)
+#define IRQ_GPIO_PALMLD_SD_DETECT_N    IRQ_GPIO(GPIO_NR_PALMLD_SD_DETECT_N)
+#define IRQ_GPIO_PALMLD_WM9712_IRQ     IRQ_GPIO(GPIO_NR_PALMLD_WM9712_IRQ)
+#define IRQ_GPIO_PALMLD_IDE_IRQ                IRQ_GPIO(GPIO_NR_PALMLD_IDE_IRQ)
+
+
+/** HERE ARE INIT VALUES **/
+
+/* IO mappings */
+#define PALMLD_USB_PHYS                PXA_CS2_PHYS
+#define PALMLD_USB_VIRT                0xf0000000
+#define PALMLD_USB_SIZE                0x00100000
+
+#define PALMLD_IDE_PHYS                0x20000000
+#define PALMLD_IDE_VIRT                0xf1000000
+#define PALMLD_IDE_SIZE                0x00100000
+
+#define PALMLD_PHYS_IO_START   0x40000000
+
+/* BATTERY */
+#define PALMLD_BAT_MAX_VOLTAGE         4000    /* 4.00V maximum voltage */
+#define PALMLD_BAT_MIN_VOLTAGE         3550    /* 3.55V critical voltage */
+#define PALMLD_BAT_MAX_CURRENT         0       /* unknokn */
+#define PALMLD_BAT_MIN_CURRENT         0       /* unknown */
+#define PALMLD_BAT_MAX_CHARGE          1       /* unknown */
+#define PALMLD_BAT_MIN_CHARGE          1       /* unknown */
+#define PALMLD_MAX_LIFE_MINS           240     /* on-life in minutes */
+
+#define PALMLD_BAT_MEASURE_DELAY       (HZ * 1)
+
+/* BACKLIGHT */
+#define PALMLD_MAX_INTENSITY           0xFE
+#define PALMLD_DEFAULT_INTENSITY       0x7E
+#define PALMLD_LIMIT_MASK              0x7F
+#define PALMLD_PRESCALER               0x3F
+#define PALMLD_PERIOD_NS               3500
+
+#endif
diff --git a/arch/arm/mach-pxa/include/mach/palmt5.h b/arch/arm/mach-pxa/include/mach/palmt5.h
new file mode 100644 (file)
index 0000000..94db288
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+ * GPIOs and interrupts for Palm Tungsten|T5 Handheld Computer
+ *
+ * Authors:    Ales Snuparek <snuparek@atlas.cz>
+ *             Marek Vasut <marek.vasut@gmail.com>
+ *             Justin Kendrick <twilightsentry@gmail.com>
+ *             RichardT5 <richard_t5@users.sourceforge.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+
+#ifndef _INCLUDE_PALMT5_H_
+#define _INCLUDE_PALMT5_H_
+
+/** HERE ARE GPIOs **/
+
+/* GPIOs */
+#define GPIO_NR_PALMT5_GPIO_RESET              1
+
+#define GPIO_NR_PALMT5_POWER_DETECT            90
+#define GPIO_NR_PALMT5_HOTSYNC_BUTTON_N                10
+#define GPIO_NR_PALMT5_EARPHONE_DETECT         107
+
+/* SD/MMC */
+#define GPIO_NR_PALMT5_SD_DETECT_N             14
+#define GPIO_NR_PALMT5_SD_POWER                        114
+#define GPIO_NR_PALMT5_SD_READONLY             115
+
+/* TOUCHSCREEN */
+#define GPIO_NR_PALMT5_WM9712_IRQ              27
+
+/* IRDA - disable GPIO connected to SD pin of tranceiver (TFBS4710?) ? */
+#define GPIO_NR_PALMT5_IR_DISABLE              40
+
+/* USB */
+#define GPIO_NR_PALMT5_USB_DETECT_N            15
+#define GPIO_NR_PALMT5_USB_POWER               95
+#define GPIO_NR_PALMT5_USB_PULLUP              93
+
+/* LCD/BACKLIGHT */
+#define GPIO_NR_PALMT5_BL_POWER                        84
+#define GPIO_NR_PALMT5_LCD_POWER               96
+
+/* BLUETOOTH */
+#define GPIO_NR_PALMT5_BT_POWER                        17
+#define GPIO_NR_PALMT5_BT_RESET                        83
+
+/* INTERRUPTS */
+#define IRQ_GPIO_PALMT5_SD_DETECT_N    IRQ_GPIO(GPIO_NR_PALMT5_SD_DETECT_N)
+#define IRQ_GPIO_PALMT5_WM9712_IRQ     IRQ_GPIO(GPIO_NR_PALMT5_WM9712_IRQ)
+#define IRQ_GPIO_PALMT5_USB_DETECT     IRQ_GPIO(GPIO_NR_PALMT5_USB_DETECT)
+#define IRQ_GPIO_PALMT5_GPIO_RESET     IRQ_GPIO(GPIO_NR_PALMT5_GPIO_RESET)
+
+/** HERE ARE INIT VALUES **/
+
+/* Various addresses  */
+#define PALMT5_PHYS_RAM_START  0xa0000000
+#define PALMT5_PHYS_IO_START   0x40000000
+
+/* TOUCHSCREEN */
+#define AC97_LINK_FRAME                21
+
+/* BATTERY */
+#define PALMT5_BAT_MAX_VOLTAGE         4000    /* 4.00v current voltage */
+#define PALMT5_BAT_MIN_VOLTAGE         3550    /* 3.55v critical voltage */
+#define PALMT5_BAT_MAX_CURRENT         0       /* unknokn */
+#define PALMT5_BAT_MIN_CURRENT         0       /* unknown */
+#define PALMT5_BAT_MAX_CHARGE          1       /* unknown */
+#define PALMT5_BAT_MIN_CHARGE          1       /* unknown */
+#define PALMT5_MAX_LIFE_MINS           360    /* on-life in minutes */
+
+#define PALMT5_BAT_MEASURE_DELAY       (HZ * 1)
+
+/* BACKLIGHT */
+#define PALMT5_MAX_INTENSITY           0xFE
+#define PALMT5_DEFAULT_INTENSITY       0x7E
+#define PALMT5_LIMIT_MASK              0x7F
+#define PALMT5_PRESCALER               0x3F
+#define PALMT5_PERIOD_NS               3500
+
+#endif
index 83342469acaca8faeb46f11ea81db7fe7ce34fb2..a6eeef8a075f4f1918e4f8b8a7137d834209f64e 100644 (file)
@@ -27,3 +27,13 @@ extern void pxa27x_cpu_suspend(unsigned int);
 extern void pxa_cpu_resume(void);
 
 extern int pxa_pm_enter(suspend_state_t state);
+
+/* NOTE: this is for PM debugging on Lubbock,  it's really a big
+ * ugly, but let's keep the crap minimum here, instead of direct
+ * accessing the LUBBOCK CPLD registers in arch/arm/mach-pxa/pm.c
+ */
+#ifdef CONFIG_ARCH_LUBBOCK
+extern void lubbock_set_hexled(uint32_t value);
+#else
+#define lubbock_set_hexled(x)
+#endif
diff --git a/arch/arm/mach-pxa/include/mach/pxa-regs.h b/arch/arm/mach-pxa/include/mach/pxa-regs.h
deleted file mode 100644 (file)
index 31d615a..0000000
+++ /dev/null
@@ -1,263 +0,0 @@
-/*
- *  arch/arm/mach-pxa/include/mach/pxa-regs.h
- *
- *  Author:    Nicolas Pitre
- *  Created:   Jun 15, 2001
- *  Copyright: MontaVista Software Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#ifndef __PXA_REGS_H
-#define __PXA_REGS_H
-
-#include <mach/hardware.h>
-
-/*
- * PXA Chip selects
- */
-
-#define PXA_CS0_PHYS   0x00000000
-#define PXA_CS1_PHYS   0x04000000
-#define PXA_CS2_PHYS   0x08000000
-#define PXA_CS3_PHYS   0x0C000000
-#define PXA_CS4_PHYS   0x10000000
-#define PXA_CS5_PHYS   0x14000000
-
-
-/*
- * Personal Computer Memory Card International Association (PCMCIA) sockets
- */
-
-#define PCMCIAPrtSp    0x04000000      /* PCMCIA Partition Space [byte]   */
-#define PCMCIASp       (4*PCMCIAPrtSp) /* PCMCIA Space [byte]             */
-#define PCMCIAIOSp     PCMCIAPrtSp     /* PCMCIA I/O Space [byte]         */
-#define PCMCIAAttrSp   PCMCIAPrtSp     /* PCMCIA Attribute Space [byte]   */
-#define PCMCIAMemSp    PCMCIAPrtSp     /* PCMCIA Memory Space [byte]      */
-
-#define PCMCIA0Sp      PCMCIASp        /* PCMCIA 0 Space [byte]           */
-#define PCMCIA0IOSp    PCMCIAIOSp      /* PCMCIA 0 I/O Space [byte]       */
-#define PCMCIA0AttrSp  PCMCIAAttrSp    /* PCMCIA 0 Attribute Space [byte] */
-#define PCMCIA0MemSp   PCMCIAMemSp     /* PCMCIA 0 Memory Space [byte]    */
-
-#define PCMCIA1Sp      PCMCIASp        /* PCMCIA 1 Space [byte]           */
-#define PCMCIA1IOSp    PCMCIAIOSp      /* PCMCIA 1 I/O Space [byte]       */
-#define PCMCIA1AttrSp  PCMCIAAttrSp    /* PCMCIA 1 Attribute Space [byte] */
-#define PCMCIA1MemSp   PCMCIAMemSp     /* PCMCIA 1 Memory Space [byte]    */
-
-#define _PCMCIA(Nb)                    /* PCMCIA [0..1]                   */ \
-                       (0x20000000 + (Nb)*PCMCIASp)
-#define _PCMCIAIO(Nb)  _PCMCIA (Nb)    /* PCMCIA I/O [0..1]               */
-#define _PCMCIAAttr(Nb)                        /* PCMCIA Attribute [0..1]         */ \
-                       (_PCMCIA (Nb) + 2*PCMCIAPrtSp)
-#define _PCMCIAMem(Nb)                 /* PCMCIA Memory [0..1]            */ \
-                       (_PCMCIA (Nb) + 3*PCMCIAPrtSp)
-
-#define _PCMCIA0       _PCMCIA (0)     /* PCMCIA 0                        */
-#define _PCMCIA0IO     _PCMCIAIO (0)   /* PCMCIA 0 I/O                    */
-#define _PCMCIA0Attr   _PCMCIAAttr (0) /* PCMCIA 0 Attribute              */
-#define _PCMCIA0Mem    _PCMCIAMem (0)  /* PCMCIA 0 Memory                 */
-
-#define _PCMCIA1       _PCMCIA (1)     /* PCMCIA 1                        */
-#define _PCMCIA1IO     _PCMCIAIO (1)   /* PCMCIA 1 I/O                    */
-#define _PCMCIA1Attr   _PCMCIAAttr (1) /* PCMCIA 1 Attribute              */
-#define _PCMCIA1Mem    _PCMCIAMem (1)  /* PCMCIA 1 Memory                 */
-
-
-
-/*
- * DMA Controller
- */
-#define DCSR(x)                __REG2(0x40000000, (x) << 2)
-
-#define DCSR_RUN       (1 << 31)       /* Run Bit (read / write) */
-#define DCSR_NODESC    (1 << 30)       /* No-Descriptor Fetch (read / write) */
-#define DCSR_STOPIRQEN (1 << 29)       /* Stop Interrupt Enable (read / write) */
-#define DCSR_REQPEND   (1 << 8)        /* Request Pending (read-only) */
-#define DCSR_STOPSTATE (1 << 3)        /* Stop State (read-only) */
-#define DCSR_ENDINTR   (1 << 2)        /* End Interrupt (read / write) */
-#define DCSR_STARTINTR (1 << 1)        /* Start Interrupt (read / write) */
-#define DCSR_BUSERR    (1 << 0)        /* Bus Error Interrupt (read / write) */
-
-#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
-#define DCSR_EORIRQEN  (1 << 28)       /* End of Receive Interrupt Enable (R/W) */
-#define DCSR_EORJMPEN  (1 << 27)       /* Jump to next descriptor on EOR */
-#define DCSR_EORSTOPEN (1 << 26)       /* STOP on an EOR */
-#define DCSR_SETCMPST  (1 << 25)       /* Set Descriptor Compare Status */
-#define DCSR_CLRCMPST  (1 << 24)       /* Clear Descriptor Compare Status */
-#define DCSR_CMPST     (1 << 10)       /* The Descriptor Compare Status */
-#define DCSR_EORINTR   (1 << 9)        /* The end of Receive */
-#endif
-
-#define DALGN          __REG(0x400000a0)  /* DMA Alignment Register */
-#define DINT           __REG(0x400000f0)  /* DMA Interrupt Register */
-
-#define DRCMR(n)       (*(((n) < 64) ? \
-                       &__REG2(0x40000100, ((n) & 0x3f) << 2) : \
-                       &__REG2(0x40001100, ((n) & 0x3f) << 2)))
-
-#define DRCMR_MAPVLD   (1 << 7)        /* Map Valid (read / write) */
-#define DRCMR_CHLNUM   0x1f            /* mask for Channel Number (read / write) */
-
-#define DDADR(x)       __REG2(0x40000200, (x) << 4)
-#define DSADR(x)       __REG2(0x40000204, (x) << 4)
-#define DTADR(x)       __REG2(0x40000208, (x) << 4)
-#define DCMD(x)                __REG2(0x4000020c, (x) << 4)
-
-#define DDADR_DESCADDR 0xfffffff0      /* Address of next descriptor (mask) */
-#define DDADR_STOP     (1 << 0)        /* Stop (read / write) */
-
-#define DCMD_INCSRCADDR        (1 << 31)       /* Source Address Increment Setting. */
-#define DCMD_INCTRGADDR        (1 << 30)       /* Target Address Increment Setting. */
-#define DCMD_FLOWSRC   (1 << 29)       /* Flow Control by the source. */
-#define DCMD_FLOWTRG   (1 << 28)       /* Flow Control by the target. */
-#define DCMD_STARTIRQEN        (1 << 22)       /* Start Interrupt Enable */
-#define DCMD_ENDIRQEN  (1 << 21)       /* End Interrupt Enable */
-#define DCMD_ENDIAN    (1 << 18)       /* Device Endian-ness. */
-#define DCMD_BURST8    (1 << 16)       /* 8 byte burst */
-#define DCMD_BURST16   (2 << 16)       /* 16 byte burst */
-#define DCMD_BURST32   (3 << 16)       /* 32 byte burst */
-#define DCMD_WIDTH1    (1 << 14)       /* 1 byte width */
-#define DCMD_WIDTH2    (2 << 14)       /* 2 byte width (HalfWord) */
-#define DCMD_WIDTH4    (3 << 14)       /* 4 byte width (Word) */
-#define DCMD_LENGTH    0x01fff         /* length mask (max = 8K - 1) */
-
-/*
- * Real Time Clock
- */
-
-#define RCNR           __REG(0x40900000)  /* RTC Count Register */
-#define RTAR           __REG(0x40900004)  /* RTC Alarm Register */
-#define RTSR           __REG(0x40900008)  /* RTC Status Register */
-#define RTTR           __REG(0x4090000C)  /* RTC Timer Trim Register */
-#define PIAR           __REG(0x40900038)  /* Periodic Interrupt Alarm Register */
-
-#define RTSR_PICE      (1 << 15)       /* Periodic interrupt count enable */
-#define RTSR_PIALE     (1 << 14)       /* Periodic interrupt Alarm enable */
-#define RTSR_HZE       (1 << 3)        /* HZ interrupt enable */
-#define RTSR_ALE       (1 << 2)        /* RTC alarm interrupt enable */
-#define RTSR_HZ                (1 << 1)        /* HZ rising-edge detected */
-#define RTSR_AL                (1 << 0)        /* RTC alarm detected */
-
-
-/*
- * OS Timer & Match Registers
- */
-
-#define OSMR0          __REG(0x40A00000)  /* */
-#define OSMR1          __REG(0x40A00004)  /* */
-#define OSMR2          __REG(0x40A00008)  /* */
-#define OSMR3          __REG(0x40A0000C)  /* */
-#define OSMR4          __REG(0x40A00080)  /* */
-#define OSCR           __REG(0x40A00010)  /* OS Timer Counter Register */
-#define OSCR4          __REG(0x40A00040)  /* OS Timer Counter Register */
-#define OMCR4          __REG(0x40A000C0)  /* */
-#define OSSR           __REG(0x40A00014)  /* OS Timer Status Register */
-#define OWER           __REG(0x40A00018)  /* OS Timer Watchdog Enable Register */
-#define OIER           __REG(0x40A0001C)  /* OS Timer Interrupt Enable Register */
-
-#define OSSR_M3                (1 << 3)        /* Match status channel 3 */
-#define OSSR_M2                (1 << 2)        /* Match status channel 2 */
-#define OSSR_M1                (1 << 1)        /* Match status channel 1 */
-#define OSSR_M0                (1 << 0)        /* Match status channel 0 */
-
-#define OWER_WME       (1 << 0)        /* Watchdog Match Enable */
-
-#define OIER_E3                (1 << 3)        /* Interrupt enable channel 3 */
-#define OIER_E2                (1 << 2)        /* Interrupt enable channel 2 */
-#define OIER_E1                (1 << 1)        /* Interrupt enable channel 1 */
-#define OIER_E0                (1 << 0)        /* Interrupt enable channel 0 */
-
-
-/*
- * Interrupt Controller
- */
-
-#define ICIP           __REG(0x40D00000)  /* Interrupt Controller IRQ Pending Register */
-#define ICMR           __REG(0x40D00004)  /* Interrupt Controller Mask Register */
-#define ICLR           __REG(0x40D00008)  /* Interrupt Controller Level Register */
-#define ICFP           __REG(0x40D0000C)  /* Interrupt Controller FIQ Pending Register */
-#define ICPR           __REG(0x40D00010)  /* Interrupt Controller Pending Register */
-#define ICCR           __REG(0x40D00014)  /* Interrupt Controller Control Register */
-
-#define ICIP2          __REG(0x40D0009C)  /* Interrupt Controller IRQ Pending Register 2 */
-#define ICMR2          __REG(0x40D000A0)  /* Interrupt Controller Mask Register 2 */
-#define ICLR2          __REG(0x40D000A4)  /* Interrupt Controller Level Register 2 */
-#define ICFP2          __REG(0x40D000A8)  /* Interrupt Controller FIQ Pending Register 2 */
-#define ICPR2          __REG(0x40D000AC)  /* Interrupt Controller Pending Register 2 */
-
-/*
- * General Purpose I/O
- */
-
-#define GPLR0          __REG(0x40E00000)  /* GPIO Pin-Level Register GPIO<31:0> */
-#define GPLR1          __REG(0x40E00004)  /* GPIO Pin-Level Register GPIO<63:32> */
-#define GPLR2          __REG(0x40E00008)  /* GPIO Pin-Level Register GPIO<80:64> */
-
-#define GPDR0          __REG(0x40E0000C)  /* GPIO Pin Direction Register GPIO<31:0> */
-#define GPDR1          __REG(0x40E00010)  /* GPIO Pin Direction Register GPIO<63:32> */
-#define GPDR2          __REG(0x40E00014)  /* GPIO Pin Direction Register GPIO<80:64> */
-
-#define GPSR0          __REG(0x40E00018)  /* GPIO Pin Output Set Register GPIO<31:0> */
-#define GPSR1          __REG(0x40E0001C)  /* GPIO Pin Output Set Register GPIO<63:32> */
-#define GPSR2          __REG(0x40E00020)  /* GPIO Pin Output Set Register GPIO<80:64> */
-
-#define GPCR0          __REG(0x40E00024)  /* GPIO Pin Output Clear Register GPIO<31:0> */
-#define GPCR1          __REG(0x40E00028)  /* GPIO Pin Output Clear Register GPIO <63:32> */
-#define GPCR2          __REG(0x40E0002C)  /* GPIO Pin Output Clear Register GPIO <80:64> */
-
-#define GRER0          __REG(0x40E00030)  /* GPIO Rising-Edge Detect Register GPIO<31:0> */
-#define GRER1          __REG(0x40E00034)  /* GPIO Rising-Edge Detect Register GPIO<63:32> */
-#define GRER2          __REG(0x40E00038)  /* GPIO Rising-Edge Detect Register GPIO<80:64> */
-
-#define GFER0          __REG(0x40E0003C)  /* GPIO Falling-Edge Detect Register GPIO<31:0> */
-#define GFER1          __REG(0x40E00040)  /* GPIO Falling-Edge Detect Register GPIO<63:32> */
-#define GFER2          __REG(0x40E00044)  /* GPIO Falling-Edge Detect Register GPIO<80:64> */
-
-#define GEDR0          __REG(0x40E00048)  /* GPIO Edge Detect Status Register GPIO<31:0> */
-#define GEDR1          __REG(0x40E0004C)  /* GPIO Edge Detect Status Register GPIO<63:32> */
-#define GEDR2          __REG(0x40E00050)  /* GPIO Edge Detect Status Register GPIO<80:64> */
-
-#define GAFR0_L                __REG(0x40E00054)  /* GPIO Alternate Function Select Register GPIO<15:0> */
-#define GAFR0_U                __REG(0x40E00058)  /* GPIO Alternate Function Select Register GPIO<31:16> */
-#define GAFR1_L                __REG(0x40E0005C)  /* GPIO Alternate Function Select Register GPIO<47:32> */
-#define GAFR1_U                __REG(0x40E00060)  /* GPIO Alternate Function Select Register GPIO<63:48> */
-#define GAFR2_L                __REG(0x40E00064)  /* GPIO Alternate Function Select Register GPIO<79:64> */
-#define GAFR2_U                __REG(0x40E00068)  /* GPIO Alternate Function Select Register GPIO<95-80> */
-#define GAFR3_L                __REG(0x40E0006C)  /* GPIO Alternate Function Select Register GPIO<111:96> */
-#define GAFR3_U                __REG(0x40E00070)  /* GPIO Alternate Function Select Register GPIO<127:112> */
-
-#define GPLR3          __REG(0x40E00100)  /* GPIO Pin-Level Register GPIO<127:96> */
-#define GPDR3          __REG(0x40E0010C)  /* GPIO Pin Direction Register GPIO<127:96> */
-#define GPSR3          __REG(0x40E00118)  /* GPIO Pin Output Set Register GPIO<127:96> */
-#define GPCR3          __REG(0x40E00124)  /* GPIO Pin Output Clear Register GPIO<127:96> */
-#define GRER3          __REG(0x40E00130)  /* GPIO Rising-Edge Detect Register GPIO<127:96> */
-#define GFER3          __REG(0x40E0013C)  /* GPIO Falling-Edge Detect Register GPIO<127:96> */
-#define GEDR3          __REG(0x40E00148)  /* GPIO Edge Detect Status Register GPIO<127:96> */
-
-/* More handy macros.  The argument is a literal GPIO number. */
-
-#define GPIO_bit(x)    (1 << ((x) & 0x1f))
-
-#define _GPLR(x)       __REG2(0x40E00000, ((x) & 0x60) >> 3)
-#define _GPDR(x)       __REG2(0x40E0000C, ((x) & 0x60) >> 3)
-#define _GPSR(x)       __REG2(0x40E00018, ((x) & 0x60) >> 3)
-#define _GPCR(x)       __REG2(0x40E00024, ((x) & 0x60) >> 3)
-#define _GRER(x)       __REG2(0x40E00030, ((x) & 0x60) >> 3)
-#define _GFER(x)       __REG2(0x40E0003C, ((x) & 0x60) >> 3)
-#define _GEDR(x)       __REG2(0x40E00048, ((x) & 0x60) >> 3)
-#define _GAFR(x)       __REG2(0x40E00054, ((x) & 0x70) >> 2)
-
-#define GPLR(x)        (*((((x) & 0x7f) < 96) ? &_GPLR(x) : &GPLR3))
-#define GPDR(x)                (*((((x) & 0x7f) < 96) ? &_GPDR(x) : &GPDR3))
-#define GPSR(x)                (*((((x) & 0x7f) < 96) ? &_GPSR(x) : &GPSR3))
-#define GPCR(x)                (*((((x) & 0x7f) < 96) ? &_GPCR(x) : &GPCR3))
-#define GRER(x)                (*((((x) & 0x7f) < 96) ? &_GRER(x) : &GRER3))
-#define GFER(x)                (*((((x) & 0x7f) < 96) ? &_GFER(x) : &GFER3))
-#define GEDR(x)                (*((((x) & 0x7f) < 96) ? &_GEDR(x) : &GEDR3))
-#define GAFR(x)                (*((((x) & 0x7f) < 96) ? &_GAFR(x) : \
-                        ((((x) & 0x7f) < 112) ? &GAFR3_L : &GAFR3_U)))
-
-#endif
diff --git a/arch/arm/mach-pxa/include/mach/pxa25x.h b/arch/arm/mach-pxa/include/mach/pxa25x.h
new file mode 100644 (file)
index 0000000..508c3ba
--- /dev/null
@@ -0,0 +1,8 @@
+#ifndef __MACH_PXA25x_H
+#define __MACH_PXA25x_H
+
+#include <mach/hardware.h>
+#include <mach/pxa2xx-regs.h>
+#include <mach/mfp-pxa25x.h>
+
+#endif /* __MACH_PXA25x_H */
diff --git a/arch/arm/mach-pxa/include/mach/pxa27x.h b/arch/arm/mach-pxa/include/mach/pxa27x.h
new file mode 100644 (file)
index 0000000..6876e16
--- /dev/null
@@ -0,0 +1,19 @@
+#ifndef __MACH_PXA27x_H
+#define __MACH_PXA27x_H
+
+#include <mach/hardware.h>
+#include <mach/pxa2xx-regs.h>
+#include <mach/mfp-pxa27x.h>
+
+#define ARB_CNTRL      __REG(0x48000048)  /* Arbiter Control Register */
+
+#define ARB_DMA_SLV_PARK       (1<<31)    /* Be parked with DMA slave when idle */
+#define ARB_CI_PARK            (1<<30)    /* Be parked with Camera Interface when idle */
+#define ARB_EX_MEM_PARK        (1<<29)    /* Be parked with external MEMC when idle */
+#define ARB_INT_MEM_PARK       (1<<28)    /* Be parked with internal MEMC when idle */
+#define ARB_USB_PARK           (1<<27)    /* Be parked with USB when idle */
+#define ARB_LCD_PARK           (1<<26)    /* Be parked with LCD when idle */
+#define ARB_DMA_PARK           (1<<25)    /* Be parked with DMA when idle */
+#define ARB_CORE_PARK          (1<<24)    /* Be parked with core when idle */
+#define ARB_LOCK_FLAG          (1<<23)    /* Only Locking masters gain access to the bus */
+#endif /* __MACH_PXA27x_H */
index d83393e252734398462bf140a9f8086bf09a5c95..1209c44aa6f17cf45b6ff1b841f7c046f2acb2a9 100644 (file)
@@ -3,6 +3,8 @@
 
 #warning Please use mfp-pxa2[57]x.h instead of pxa2xx-gpio.h
 
+#include <mach/gpio.h>
+
 /* GPIO alternate function assignments */
 
 #define GPIO1_RST              1       /* reset */
index 77102d695cc7c58dd0b65f974f956069f777146b..4fcddd9cab76988a8556afc708f7f5c5551118aa 100644 (file)
 #ifndef __PXA2XX_REGS_H
 #define __PXA2XX_REGS_H
 
+#include <mach/hardware.h>
+
+/*
+ * PXA Chip selects
+ */
+
+#define PXA_CS0_PHYS   0x00000000
+#define PXA_CS1_PHYS   0x04000000
+#define PXA_CS2_PHYS   0x08000000
+#define PXA_CS3_PHYS   0x0C000000
+#define PXA_CS4_PHYS   0x10000000
+#define PXA_CS5_PHYS   0x14000000
+
 /*
  * Memory controller
  */
 #define MDREFR_K0RUN   (1 << 13)       /* SDCLK0 Run Control/Status */
 #define MDREFR_E0PIN   (1 << 12)       /* SDCKE0 Level Control/Status */
 
-
-#ifdef CONFIG_PXA27x
-
-#define ARB_CNTRL      __REG(0x48000048)  /* Arbiter Control Register */
-
-#define ARB_DMA_SLV_PARK       (1<<31)    /* Be parked with DMA slave when idle */
-#define ARB_CI_PARK            (1<<30)    /* Be parked with Camera Interface when idle */
-#define ARB_EX_MEM_PARK        (1<<29)    /* Be parked with external MEMC when idle */
-#define ARB_INT_MEM_PARK       (1<<28)    /* Be parked with internal MEMC when idle */
-#define ARB_USB_PARK           (1<<27)    /* Be parked with USB when idle */
-#define ARB_LCD_PARK           (1<<26)    /* Be parked with LCD when idle */
-#define ARB_DMA_PARK           (1<<25)    /* Be parked with DMA when idle */
-#define ARB_CORE_PARK          (1<<24)    /* Be parked with core when idle */
-#define ARB_LOCK_FLAG          (1<<23)    /* Only Locking masters gain access to the bus */
-
-#endif
-
-
 /*
  * Power Manager
  */
diff --git a/arch/arm/mach-pxa/include/mach/pxa300.h b/arch/arm/mach-pxa/include/mach/pxa300.h
new file mode 100644 (file)
index 0000000..2f33076
--- /dev/null
@@ -0,0 +1,8 @@
+#ifndef __MACH_PXA300_H
+#define __MACH_PXA300_H
+
+#include <mach/hardware.h>
+#include <mach/pxa3xx-regs.h>
+#include <mach/mfp-pxa300.h>
+
+#endif /* __MACH_PXA300_H */
diff --git a/arch/arm/mach-pxa/include/mach/pxa320.h b/arch/arm/mach-pxa/include/mach/pxa320.h
new file mode 100644 (file)
index 0000000..cab78e9
--- /dev/null
@@ -0,0 +1,9 @@
+#ifndef __MACH_PXA320_H
+#define __MACH_PXA320_H
+
+#include <mach/hardware.h>
+#include <mach/pxa3xx-regs.h>
+#include <mach/mfp-pxa320.h>
+
+#endif /* __MACH_PXA320_H */
+
index bcf3fb2c4b3a1f686fa9ec1e6a7d107d38518c5a..7d1a059b3d43991b61f324655ac0f1f046d0d841 100644 (file)
 #ifndef __ASM_ARCH_PXA3XX_REGS_H
 #define __ASM_ARCH_PXA3XX_REGS_H
 
+#include <mach/hardware.h>
+
+/*
+ * Static Chip Selects
+ */
+
+#define PXA300_CS0_PHYS                (0x00000000)    /* PXA300/PXA310 _only_ */
+#define PXA300_CS1_PHYS                (0x30000000)    /* PXA300/PXA310 _only_ */
+#define PXA3xx_CS2_PHYS                (0x10000000)
+#define PXA3xx_CS3_PHYS                (0x14000000)
+
 /*
  * Oscillator Configuration Register (OSCC)
  */
diff --git a/arch/arm/mach-pxa/include/mach/pxa930.h b/arch/arm/mach-pxa/include/mach/pxa930.h
new file mode 100644 (file)
index 0000000..d45f76a
--- /dev/null
@@ -0,0 +1,8 @@
+#ifndef __MACH_PXA930_H
+#define __MACH_PXA930_H
+
+#include <mach/hardware.h>
+#include <mach/pxa3xx-regs.h>
+#include <mach/mfp-pxa930.h>
+
+#endif /* __MACH_PXA930_H */
diff --git a/arch/arm/mach-pxa/include/mach/regs-intc.h b/arch/arm/mach-pxa/include/mach/regs-intc.h
new file mode 100644 (file)
index 0000000..ad23e74
--- /dev/null
@@ -0,0 +1,23 @@
+#ifndef __ASM_MACH_REGS_INTC_H
+#define __ASM_MACH_REGS_INTC_H
+
+#include <mach/hardware.h>
+
+/*
+ * Interrupt Controller
+ */
+
+#define ICIP           __REG(0x40D00000)  /* Interrupt Controller IRQ Pending Register */
+#define ICMR           __REG(0x40D00004)  /* Interrupt Controller Mask Register */
+#define ICLR           __REG(0x40D00008)  /* Interrupt Controller Level Register */
+#define ICFP           __REG(0x40D0000C)  /* Interrupt Controller FIQ Pending Register */
+#define ICPR           __REG(0x40D00010)  /* Interrupt Controller Pending Register */
+#define ICCR           __REG(0x40D00014)  /* Interrupt Controller Control Register */
+
+#define ICIP2          __REG(0x40D0009C)  /* Interrupt Controller IRQ Pending Register 2 */
+#define ICMR2          __REG(0x40D000A0)  /* Interrupt Controller Mask Register 2 */
+#define ICLR2          __REG(0x40D000A4)  /* Interrupt Controller Level Register 2 */
+#define ICFP2          __REG(0x40D000A8)  /* Interrupt Controller FIQ Pending Register 2 */
+#define ICPR2          __REG(0x40D000AC)  /* Interrupt Controller Pending Register 2 */
+
+#endif /* __ASM_MACH_REGS_INTC_H */
diff --git a/arch/arm/mach-pxa/include/mach/regs-ost.h b/arch/arm/mach-pxa/include/mach/regs-ost.h
new file mode 100644 (file)
index 0000000..a3e5f86
--- /dev/null
@@ -0,0 +1,34 @@
+#ifndef __ASM_MACH_REGS_OST_H
+#define __ASM_MACH_REGS_OST_H
+
+#include <mach/hardware.h>
+
+/*
+ * OS Timer & Match Registers
+ */
+
+#define OSMR0          __REG(0x40A00000)  /* */
+#define OSMR1          __REG(0x40A00004)  /* */
+#define OSMR2          __REG(0x40A00008)  /* */
+#define OSMR3          __REG(0x40A0000C)  /* */
+#define OSMR4          __REG(0x40A00080)  /* */
+#define OSCR           __REG(0x40A00010)  /* OS Timer Counter Register */
+#define OSCR4          __REG(0x40A00040)  /* OS Timer Counter Register */
+#define OMCR4          __REG(0x40A000C0)  /* */
+#define OSSR           __REG(0x40A00014)  /* OS Timer Status Register */
+#define OWER           __REG(0x40A00018)  /* OS Timer Watchdog Enable Register */
+#define OIER           __REG(0x40A0001C)  /* OS Timer Interrupt Enable Register */
+
+#define OSSR_M3                (1 << 3)        /* Match status channel 3 */
+#define OSSR_M2                (1 << 2)        /* Match status channel 2 */
+#define OSSR_M1                (1 << 1)        /* Match status channel 1 */
+#define OSSR_M0                (1 << 0)        /* Match status channel 0 */
+
+#define OWER_WME       (1 << 0)        /* Watchdog Match Enable */
+
+#define OIER_E3                (1 << 3)        /* Interrupt enable channel 3 */
+#define OIER_E2                (1 << 2)        /* Interrupt enable channel 2 */
+#define OIER_E1                (1 << 1)        /* Interrupt enable channel 1 */
+#define OIER_E0                (1 << 0)        /* Interrupt enable channel 0 */
+
+#endif /* __ASM_MACH_REGS_OST_H */
diff --git a/arch/arm/mach-pxa/include/mach/regs-rtc.h b/arch/arm/mach-pxa/include/mach/regs-rtc.h
new file mode 100644 (file)
index 0000000..f0e4a58
--- /dev/null
@@ -0,0 +1,23 @@
+#ifndef __ASM_MACH_REGS_RTC_H
+#define __ASM_MACH_REGS_RTC_H
+
+#include <mach/hardware.h>
+
+/*
+ * Real Time Clock
+ */
+
+#define RCNR           __REG(0x40900000)  /* RTC Count Register */
+#define RTAR           __REG(0x40900004)  /* RTC Alarm Register */
+#define RTSR           __REG(0x40900008)  /* RTC Status Register */
+#define RTTR           __REG(0x4090000C)  /* RTC Timer Trim Register */
+#define PIAR           __REG(0x40900038)  /* Periodic Interrupt Alarm Register */
+
+#define RTSR_PICE      (1 << 15)       /* Periodic interrupt count enable */
+#define RTSR_PIALE     (1 << 14)       /* Periodic interrupt Alarm enable */
+#define RTSR_HZE       (1 << 3)        /* HZ interrupt enable */
+#define RTSR_ALE       (1 << 2)        /* RTC alarm interrupt enable */
+#define RTSR_HZ                (1 << 1)        /* HZ rising-edge detected */
+#define RTSR_AL                (1 << 0)        /* RTC alarm detected */
+
+#endif /* __ASM_MACH_REGS_RTC_H */
index cf31986f6f05d1b0f8637e020c4fd421e97e03fd..8152be6838814c7584a567b838829f4e80be593c 100644 (file)
@@ -37,7 +37,6 @@
 #if defined(CONFIG_PXA25x)
 #define SSCR0_SCR      (0x0000ff00)    /* Serial Clock Rate (mask) */
 #define SSCR0_SerClkDiv(x) ((((x) - 2)/2) << 8) /* Divisor [2..512] */
-
 #elif defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
 #define SSCR0_SCR      (0x000fff00)    /* Serial Clock Rate (mask) */
 #define SSCR0_SerClkDiv(x) (((x) - 1) << 8) /* Divisor [1..4096] */
index 0f381e69299972604e3b95817310a5f2a286e894..d1fce8b6d1051d23b910bae6e7e5d8109ee0bdad 100644 (file)
@@ -13,7 +13,6 @@
 #include <asm/proc-fns.h>
 #include "hardware.h"
 #include "pxa2xx-regs.h"
-#include "pxa-regs.h"
 
 static inline void arch_idle(void)
 {
@@ -21,4 +20,4 @@ static inline void arch_idle(void)
 }
 
 
-void arch_reset(char mode);
+void arch_reset(char mode, const char *cmd);
index f4b029c039571c622a62d9e3a017480c89ce2fc2..5706cea95d1188e69a1788cb92c5422a7375badd 100644 (file)
@@ -35,7 +35,8 @@ static inline void flush(void)
 
 static inline void arch_decomp_setup(void)
 {
-       if (machine_is_littleton() || machine_is_intelmote2())
+       if (machine_is_littleton() || machine_is_intelmote2()
+                       || machine_is_csb726())
                UART = STUART;
 }
 
index fa69c3a6a38e2f558ca2176fc271f5c031ad413f..f6e0300e4f64c386fab8916dbf93e73b34b436cb 100644 (file)
@@ -20,7 +20,8 @@
 #include <mach/hardware.h>
 #include <asm/irq.h>
 #include <asm/mach/irq.h>
-#include <mach/pxa-regs.h>
+#include <mach/gpio.h>
+#include <mach/regs-intc.h>
 
 #include "generic.h"
 
@@ -51,6 +52,72 @@ static struct irq_chip pxa_internal_irq_chip = {
        .unmask         = pxa_unmask_irq,
 };
 
+/*
+ * GPIO IRQs for GPIO 0 and 1
+ */
+static int pxa_set_low_gpio_type(unsigned int irq, unsigned int type)
+{
+       int gpio = irq - IRQ_GPIO0;
+
+       if (__gpio_is_occupied(gpio)) {
+               pr_err("%s failed: GPIO is configured\n", __func__);
+               return -EINVAL;
+       }
+
+       if (type & IRQ_TYPE_EDGE_RISING)
+               GRER0 |= GPIO_bit(gpio);
+       else
+               GRER0 &= ~GPIO_bit(gpio);
+
+       if (type & IRQ_TYPE_EDGE_FALLING)
+               GFER0 |= GPIO_bit(gpio);
+       else
+               GFER0 &= ~GPIO_bit(gpio);
+
+       return 0;
+}
+
+static void pxa_ack_low_gpio(unsigned int irq)
+{
+       GEDR0 = (1 << (irq - IRQ_GPIO0));
+}
+
+static void pxa_mask_low_gpio(unsigned int irq)
+{
+       ICMR &= ~(1 << (irq - PXA_IRQ(0)));
+}
+
+static void pxa_unmask_low_gpio(unsigned int irq)
+{
+       ICMR |= 1 << (irq - PXA_IRQ(0));
+}
+
+static struct irq_chip pxa_low_gpio_chip = {
+       .name           = "GPIO-l",
+       .ack            = pxa_ack_low_gpio,
+       .mask           = pxa_mask_low_gpio,
+       .unmask         = pxa_unmask_low_gpio,
+       .set_type       = pxa_set_low_gpio_type,
+};
+
+static void __init pxa_init_low_gpio_irq(set_wake_t fn)
+{
+       int irq;
+
+       /* clear edge detection on GPIO 0 and 1 */
+       GFER0 &= ~0x3;
+       GRER0 &= ~0x3;
+       GEDR0 = 0x3;
+
+       for (irq = IRQ_GPIO0; irq <= IRQ_GPIO1; irq++) {
+               set_irq_chip(irq, &pxa_low_gpio_chip);
+               set_irq_handler(irq, handle_edge_irq);
+               set_irq_flags(irq, IRQF_VALID);
+       }
+
+       pxa_low_gpio_chip.set_wake = fn;
+}
+
 void __init pxa_init_irq(int irq_nr, set_wake_t fn)
 {
        int irq;
@@ -72,6 +139,7 @@ void __init pxa_init_irq(int irq_nr, set_wake_t fn)
        }
 
        pxa_internal_irq_chip.set_wake = fn;
+       pxa_init_low_gpio_irq(fn);
 }
 
 #ifdef CONFIG_PM
index 18b20d4694100ccf39c304aec84b35ba4ee49b32..8b9c17142d5a8ed89657eb83794ce4fd52071a05 100644 (file)
@@ -18,7 +18,7 @@
 #include <asm/leds.h>
 #include <asm/system.h>
 
-#include <mach/pxa-regs.h>
+#include <mach/pxa25x.h>
 #include <mach/idp.h>
 
 #include "leds.h"
index 1a258029c33c4290ba1a55a0ac0862ab1ea37603..e26d5efe196972c0c0ac299ca81e5e42bbddc459 100644 (file)
@@ -16,7 +16,7 @@
 #include <mach/hardware.h>
 #include <asm/leds.h>
 #include <asm/system.h>
-#include <mach/pxa-regs.h>
+#include <mach/pxa25x.h>
 #include <mach/lubbock.h>
 
 #include "leds.h"
index 95e06b8496346a26df86e11462063c9c44c4637e..db4af5eee8b21649b2dc1ef661bfb970896812c7 100644 (file)
@@ -16,7 +16,7 @@
 #include <asm/leds.h>
 #include <asm/system.h>
 
-#include <mach/pxa-regs.h>
+#include <mach/pxa27x.h>
 #include <mach/mainstone.h>
 
 #include "leds.h"
index 31da7f3c06f6fa331578218e4cd87306610df780..e13f6a81c22385f04eb2278f29de6baa3b581776 100644 (file)
@@ -39,8 +39,7 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/pxa-regs.h>
-#include <mach/mfp-pxa300.h>
+#include <mach/pxa300.h>
 #include <mach/pxafb.h>
 #include <mach/ssp.h>
 #include <mach/pxa2xx_spi.h>
index de3f67daaacf14c7378fe2c35449b27a8ed71909..d64395f26a3e101d0f8826701da811c4a9e1ae42 100644 (file)
@@ -38,9 +38,8 @@
 #include <asm/mach/irq.h>
 #include <asm/mach/flash.h>
 
-#include <mach/pxa-regs.h>
-#include <mach/pxa2xx-regs.h>
-#include <mach/mfp-pxa27x.h>
+#include <mach/pxa27x.h>
+#include <mach/gpio.h>
 #include <mach/lpd270.h>
 #include <mach/audio.h>
 #include <mach/pxafb.h>
index bff704354c1aaf5b7168290fec3bdc5635ae0659..f04c8333dff79f444e4415b2694a5713673b0c17 100644 (file)
 
 #include <asm/hardware/sa1111.h>
 
-#include <mach/pxa-regs.h>
-#include <mach/pxa2xx-regs.h>
-#include <mach/mfp-pxa25x.h>
+#include <mach/pxa25x.h>
+#include <mach/gpio.h>
 #include <mach/audio.h>
 #include <mach/lubbock.h>
 #include <mach/udc.h>
 #include <mach/irda.h>
 #include <mach/pxafb.h>
 #include <mach/mmc.h>
+#include <mach/pm.h>
 
 #include "generic.h"
 #include "clock.h"
@@ -113,8 +113,14 @@ static unsigned long lubbock_pin_config[] __initdata = {
        GPIO1_GPIO | WAKEUP_ON_EDGE_RISE,
 };
 
+#define LUB_HEXLED             __LUB_REG(LUBBOCK_FPGA_PHYS + 0x010)
 #define LUB_MISC_WR            __LUB_REG(LUBBOCK_FPGA_PHYS + 0x080)
 
+void lubbock_set_hexled(uint32_t value)
+{
+       LUB_HEXLED = value;
+}
+
 void lubbock_set_misc_wr(unsigned int mask, unsigned int set)
 {
        unsigned long flags;
index 21b821e1a60d82bc3b2811523e5b164b1af7728d..d46b36746be284855a4532d93fe60e103d2282f3 100644 (file)
 #include <linux/mtd/physmap.h>
 #include <linux/pda_power.h>
 #include <linux/pwm_backlight.h>
+#include <linux/usb/gpio_vbus.h>
 
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
+
+#include <mach/pxa27x.h>
 #include <mach/magician.h>
-#include <mach/mfp-pxa27x.h>
-#include <mach/pxa-regs.h>
-#include <mach/pxa2xx-regs.h>
 #include <mach/pxafb.h>
 #include <mach/i2c.h>
 #include <mach/mmc.h>
@@ -66,6 +66,11 @@ static unsigned long magician_pin_config[] __initdata = {
        GPIO31_I2S_SYNC,
        GPIO113_I2S_SYSCLK,
 
+       /* SSP 1 */
+       GPIO23_SSP1_SCLK,
+       GPIO24_SSP1_SFRM,
+       GPIO25_SSP1_TXD,
+
        /* SSP 2 */
        GPIO19_SSP2_SCLK,
        GPIO14_SSP2_SFRM,
@@ -148,22 +153,31 @@ static struct pxaficp_platform_data magician_ficp_info = {
  * GPIO Keys
  */
 
+#define INIT_KEY(_code, _gpio, _desc)  \
+       {                               \
+               .code   = KEY_##_code,  \
+               .gpio   = _gpio,        \
+               .desc   = _desc,        \
+               .type   = EV_KEY,       \
+               .wakeup = 1,            \
+       }
+
 static struct gpio_keys_button magician_button_table[] = {
-       {KEY_POWER,      GPIO0_MAGICIAN_KEY_POWER,      0, "Power button"},
-       {KEY_ESC,        GPIO37_MAGICIAN_KEY_HANGUP,    0, "Hangup button"},
-       {KEY_F10,        GPIO38_MAGICIAN_KEY_CONTACTS,  0, "Contacts button"},
-       {KEY_CALENDAR,   GPIO90_MAGICIAN_KEY_CALENDAR,  0, "Calendar button"},
-       {KEY_CAMERA,     GPIO91_MAGICIAN_KEY_CAMERA,    0, "Camera button"},
-       {KEY_UP,         GPIO93_MAGICIAN_KEY_UP,        0, "Up button"},
-       {KEY_DOWN,       GPIO94_MAGICIAN_KEY_DOWN,      0, "Down button"},
-       {KEY_LEFT,       GPIO95_MAGICIAN_KEY_LEFT,      0, "Left button"},
-       {KEY_RIGHT,      GPIO96_MAGICIAN_KEY_RIGHT,     0, "Right button"},
-       {KEY_KPENTER,    GPIO97_MAGICIAN_KEY_ENTER,     0, "Action button"},
-       {KEY_RECORD,     GPIO98_MAGICIAN_KEY_RECORD,    0, "Record button"},
-       {KEY_VOLUMEUP,   GPIO100_MAGICIAN_KEY_VOL_UP,   0, "Volume up"},
-       {KEY_VOLUMEDOWN, GPIO101_MAGICIAN_KEY_VOL_DOWN, 0, "Volume down"},
-       {KEY_PHONE,      GPIO102_MAGICIAN_KEY_PHONE,    0, "Phone button"},
-       {KEY_PLAY,       GPIO99_MAGICIAN_HEADPHONE_IN,  0, "Headset button"},
+       INIT_KEY(POWER,      GPIO0_MAGICIAN_KEY_POWER,      "Power button"),
+       INIT_KEY(ESC,        GPIO37_MAGICIAN_KEY_HANGUP,    "Hangup button"),
+       INIT_KEY(F10,        GPIO38_MAGICIAN_KEY_CONTACTS,  "Contacts button"),
+       INIT_KEY(CALENDAR,   GPIO90_MAGICIAN_KEY_CALENDAR,  "Calendar button"),
+       INIT_KEY(CAMERA,     GPIO91_MAGICIAN_KEY_CAMERA,    "Camera button"),
+       INIT_KEY(UP,         GPIO93_MAGICIAN_KEY_UP,        "Up button"),
+       INIT_KEY(DOWN,       GPIO94_MAGICIAN_KEY_DOWN,      "Down button"),
+       INIT_KEY(LEFT,       GPIO95_MAGICIAN_KEY_LEFT,      "Left button"),
+       INIT_KEY(RIGHT,      GPIO96_MAGICIAN_KEY_RIGHT,     "Right button"),
+       INIT_KEY(KPENTER,    GPIO97_MAGICIAN_KEY_ENTER,     "Action button"),
+       INIT_KEY(RECORD,     GPIO98_MAGICIAN_KEY_RECORD,    "Record button"),
+       INIT_KEY(VOLUMEUP,   GPIO100_MAGICIAN_KEY_VOL_UP,   "Volume up"),
+       INIT_KEY(VOLUMEDOWN, GPIO101_MAGICIAN_KEY_VOL_DOWN, "Volume down"),
+       INIT_KEY(PHONE,      GPIO102_MAGICIAN_KEY_PHONE,    "Phone button"),
+       INIT_KEY(PLAY,       GPIO99_MAGICIAN_HEADPHONE_IN,  "Headset button"),
 };
 
 static struct gpio_keys_platform_data gpio_keys_data = {
@@ -189,7 +203,7 @@ static struct platform_device gpio_keys = {
 static struct resource egpio_resources[] = {
        [0] = {
                .start = PXA_CS3_PHYS,
-               .end   = PXA_CS3_PHYS + 0x20,
+               .end   = PXA_CS3_PHYS + 0x20 - 1,
                .flags = IORESOURCE_MEM,
        },
        [1] = {
@@ -420,7 +434,7 @@ static struct gpio_led gpio_leds[] = {
        },
        {
                .name = "magician::phone_bl",
-               .default_trigger = "none",
+               .default_trigger = "backlight",
                .gpio = GPIO103_MAGICIAN_LED_KP,
        },
 };
@@ -468,8 +482,6 @@ static struct pasic3_led pasic3_leds[] = {
        },
 };
 
-static struct platform_device pasic3;
-
 static struct pasic3_leds_machinfo pasic3_leds_info = {
        .num_leds   = ARRAY_SIZE(pasic3_leds),
        .power_gpio = EGPIO_MAGICIAN_LED_POWER,
@@ -510,6 +522,31 @@ static struct platform_device pasic3 = {
        },
 };
 
+/*
+ * USB "Transceiver"
+ */
+
+static struct resource gpio_vbus_resource = {
+       .flags = IORESOURCE_IRQ,
+       .start = IRQ_MAGICIAN_VBUS,
+       .end   = IRQ_MAGICIAN_VBUS,
+};
+
+static struct gpio_vbus_mach_info gpio_vbus_info = {
+       .gpio_pullup = GPIO27_MAGICIAN_USBC_PUEN,
+       .gpio_vbus   = EGPIO_MAGICIAN_CABLE_STATE_USB,
+};
+
+static struct platform_device gpio_vbus = {
+       .name          = "gpio-vbus",
+       .id            = -1,
+       .num_resources = 1,
+       .resource      = &gpio_vbus_resource,
+       .dev = {
+               .platform_data = &gpio_vbus_info,
+       },
+};
+
 /*
  * External power
  */
@@ -586,15 +623,17 @@ static struct pda_power_pdata power_supply_info = {
 static struct resource power_supply_resources[] = {
        [0] = {
                .name  = "ac",
-               .flags = IORESOURCE_IRQ,
-               .start = IRQ_MAGICIAN_AC,
-               .end   = IRQ_MAGICIAN_AC,
+               .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE |
+                        IORESOURCE_IRQ_LOWEDGE,
+               .start = IRQ_MAGICIAN_VBUS,
+               .end   = IRQ_MAGICIAN_VBUS,
        },
        [1] = {
                .name  = "usb",
-               .flags = IORESOURCE_IRQ,
-               .start = IRQ_MAGICIAN_AC,
-               .end   = IRQ_MAGICIAN_AC,
+               .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE |
+                        IORESOURCE_IRQ_LOWEDGE,
+               .start = IRQ_MAGICIAN_VBUS,
+               .end   = IRQ_MAGICIAN_VBUS,
        },
 };
 
@@ -688,11 +727,9 @@ static void magician_set_vpp(struct map_info *map, int vpp)
        gpio_set_value(EGPIO_MAGICIAN_FLASH_VPP, vpp);
 }
 
-#define PXA_CS_SIZE            0x04000000
-
 static struct resource strataflash_resource = {
        .start = PXA_CS0_PHYS,
-       .end   = PXA_CS0_PHYS + PXA_CS_SIZE - 1,
+       .end   = PXA_CS0_PHYS + SZ_64M - 1,
        .flags = IORESOURCE_MEM,
 };
 
@@ -720,6 +757,7 @@ static struct platform_device *devices[] __initdata = {
        &egpio,
        &backlight,
        &pasic3,
+       &gpio_vbus,
        &power_supply,
        &strataflash,
        &leds_gpio,
@@ -743,6 +781,7 @@ static void __init magician_init(void)
                gpio_direction_output(GPIO83_MAGICIAN_nIR_EN, 1);
                pxa_set_ficp_info(&magician_ficp_info);
        }
+       pxa27x_set_i2c_power_info(NULL);
        pxa_set_i2c_info(NULL);
        pxa_set_mci_info(&magician_mci_info);
        pxa_set_ohci_info(&magician_ohci_info);
index 5f224968043c76f101bf63621bb1d4a421f09a12..a6c8429e975f53b3aa720b7619498700bd6e3afa 100644 (file)
@@ -41,9 +41,8 @@
 #include <asm/mach/irq.h>
 #include <asm/mach/flash.h>
 
-#include <mach/pxa-regs.h>
-#include <mach/pxa2xx-regs.h>
-#include <mach/mfp-pxa27x.h>
+#include <mach/pxa27x.h>
+#include <mach/gpio.h>
 #include <mach/mainstone.h>
 #include <mach/audio.h>
 #include <mach/pxafb.h>
index 33626de8cbf65be9ce0b91780708f522941025e1..7ffb91d64c39733e39e6cc9d8518f2ae5f67a379 100644 (file)
 #include <linux/init.h>
 #include <linux/sysdev.h>
 
-#include <mach/hardware.h>
-#include <mach/pxa-regs.h>
+#include <mach/gpio.h>
 #include <mach/pxa2xx-regs.h>
 #include <mach/mfp-pxa2xx.h>
 
 #include "generic.h"
 
-#define gpio_to_bank(gpio)     ((gpio) >> 5)
-
 #define PGSR(x)                __REG2(0x40F00020, (x) << 2)
 #define __GAFR(u, x)   __REG2((u) ? 0x40E00058 : 0x40E00054, (x) << 3)
 #define GAFR_L(x)      __GAFR(0, x)
index eb197a6e8e94aec097c8d7110a9441487ac633b1..7a270eecd4808a64f60a7bc1dc97395a47c23b51 100644 (file)
 #include <linux/sysdev.h>
 
 #include <mach/hardware.h>
-#include <mach/mfp.h>
 #include <mach/mfp-pxa3xx.h>
 #include <mach/pxa3xx-regs.h>
 
-/* mfp_spin_lock is used to ensure that MFP register configuration
- * (most likely a read-modify-write operation) is atomic, and that
- * mfp_table[] is consistent
- */
-static DEFINE_SPINLOCK(mfp_spin_lock);
-
-static void __iomem *mfpr_mmio_base = (void __iomem *)&__REG(MFPR_BASE);
-
-struct pxa3xx_mfp_pin {
-       unsigned long   config;         /* -1 for not configured */
-       unsigned long   mfpr_off;       /* MFPRxx Register offset */
-       unsigned long   mfpr_run;       /* Run-Mode Register Value */
-       unsigned long   mfpr_lpm;       /* Low Power Mode Register Value */
-};
-
-static struct pxa3xx_mfp_pin mfp_table[MFP_PIN_MAX];
-
-/* mapping of MFP_LPM_* definitions to MFPR_LPM_* register bits */
-static const unsigned long mfpr_lpm[] = {
-       MFPR_LPM_INPUT,
-       MFPR_LPM_DRIVE_LOW,
-       MFPR_LPM_DRIVE_HIGH,
-       MFPR_LPM_PULL_LOW,
-       MFPR_LPM_PULL_HIGH,
-       MFPR_LPM_FLOAT,
-};
-
-/* mapping of MFP_PULL_* definitions to MFPR_PULL_* register bits */
-static const unsigned long mfpr_pull[] = {
-       MFPR_PULL_NONE,
-       MFPR_PULL_LOW,
-       MFPR_PULL_HIGH,
-       MFPR_PULL_BOTH,
-};
-
-/* mapping of MFP_LPM_EDGE_* definitions to MFPR_EDGE_* register bits */
-static const unsigned long mfpr_edge[] = {
-       MFPR_EDGE_NONE,
-       MFPR_EDGE_RISE,
-       MFPR_EDGE_FALL,
-       MFPR_EDGE_BOTH,
-};
-
-#define mfpr_readl(off)                        \
-       __raw_readl(mfpr_mmio_base + (off))
-
-#define mfpr_writel(off, val)          \
-       __raw_writel(val, mfpr_mmio_base + (off))
-
-#define mfp_configured(p)      ((p)->config != -1)
-
-/*
- * perform a read-back of any MFPR register to make sure the
- * previous writings are finished
- */
-#define mfpr_sync()    (void)__raw_readl(mfpr_mmio_base + 0)
-
-static inline void __mfp_config_run(struct pxa3xx_mfp_pin *p)
-{
-       if (mfp_configured(p))
-               mfpr_writel(p->mfpr_off, p->mfpr_run);
-}
-
-static inline void __mfp_config_lpm(struct pxa3xx_mfp_pin *p)
-{
-       if (mfp_configured(p)) {
-               unsigned long mfpr_clr = (p->mfpr_run & ~MFPR_EDGE_BOTH) | MFPR_EDGE_CLEAR;
-               if (mfpr_clr != p->mfpr_run)
-                       mfpr_writel(p->mfpr_off, mfpr_clr);
-               if (p->mfpr_lpm != mfpr_clr)
-                       mfpr_writel(p->mfpr_off, p->mfpr_lpm);
-       }
-}
-
-void pxa3xx_mfp_config(unsigned long *mfp_cfgs, int num)
-{
-       unsigned long flags;
-       int i;
-
-       spin_lock_irqsave(&mfp_spin_lock, flags);
-
-       for (i = 0; i < num; i++, mfp_cfgs++) {
-               unsigned long tmp, c = *mfp_cfgs;
-               struct pxa3xx_mfp_pin *p;
-               int pin, af, drv, lpm, edge, pull;
-
-               pin = MFP_PIN(c);
-               BUG_ON(pin >= MFP_PIN_MAX);
-               p = &mfp_table[pin];
-
-               af  = MFP_AF(c);
-               drv = MFP_DS(c);
-               lpm = MFP_LPM_STATE(c);
-               edge = MFP_LPM_EDGE(c);
-               pull = MFP_PULL(c);
-
-               /* run-mode pull settings will conflict with MFPR bits of
-                * low power mode state,  calculate mfpr_run and mfpr_lpm
-                * individually if pull != MFP_PULL_NONE
-                */
-               tmp = MFPR_AF_SEL(af) | MFPR_DRIVE(drv);
-
-               if (likely(pull == MFP_PULL_NONE)) {
-                       p->mfpr_run = tmp | mfpr_lpm[lpm] | mfpr_edge[edge];
-                       p->mfpr_lpm = p->mfpr_run;
-               } else {
-                       p->mfpr_lpm = tmp | mfpr_lpm[lpm] | mfpr_edge[edge];
-                       p->mfpr_run = tmp | mfpr_pull[pull];
-               }
-
-               p->config = c; __mfp_config_run(p);
-       }
-
-       mfpr_sync();
-       spin_unlock_irqrestore(&mfp_spin_lock, flags);
-}
-
-unsigned long pxa3xx_mfp_read(int mfp)
-{
-       unsigned long val, flags;
-
-       BUG_ON(mfp >= MFP_PIN_MAX);
-
-       spin_lock_irqsave(&mfp_spin_lock, flags);
-       val = mfpr_readl(mfp_table[mfp].mfpr_off);
-       spin_unlock_irqrestore(&mfp_spin_lock, flags);
-
-       return val;
-}
-
-void pxa3xx_mfp_write(int mfp, unsigned long val)
-{
-       unsigned long flags;
-
-       BUG_ON(mfp >= MFP_PIN_MAX);
-
-       spin_lock_irqsave(&mfp_spin_lock, flags);
-       mfpr_writel(mfp_table[mfp].mfpr_off, val);
-       mfpr_sync();
-       spin_unlock_irqrestore(&mfp_spin_lock, flags);
-}
-
-void __init pxa3xx_mfp_init_addr(struct pxa3xx_mfp_addr_map *map)
-{
-       struct pxa3xx_mfp_addr_map *p;
-       unsigned long offset, flags;
-       int i;
-
-       spin_lock_irqsave(&mfp_spin_lock, flags);
-
-       for (p = map; p->start != MFP_PIN_INVALID; p++) {
-               offset = p->offset;
-               i = p->start;
-
-               do {
-                       mfp_table[i].mfpr_off = offset;
-                       mfp_table[i].mfpr_run = 0;
-                       mfp_table[i].mfpr_lpm = 0;
-                       offset += 4; i++;
-               } while ((i <= p->end) && (p->end != -1));
-       }
-
-       spin_unlock_irqrestore(&mfp_spin_lock, flags);
-}
-
-void __init pxa3xx_init_mfp(void)
-{
-       int i;
-
-       for (i = 0; i < ARRAY_SIZE(mfp_table); i++)
-               mfp_table[i].config = -1;
-}
-
 #ifdef CONFIG_PM
 /*
  * Configure the MFPs appropriately for suspend/resume.
@@ -207,23 +33,13 @@ void __init pxa3xx_init_mfp(void)
  */
 static int pxa3xx_mfp_suspend(struct sys_device *d, pm_message_t state)
 {
-       int pin;
-
-       for (pin = 0; pin < ARRAY_SIZE(mfp_table); pin++) {
-               struct pxa3xx_mfp_pin *p = &mfp_table[pin];
-               __mfp_config_lpm(p);
-       }
+       mfp_config_lpm();
        return 0;
 }
 
 static int pxa3xx_mfp_resume(struct sys_device *d)
 {
-       int pin;
-
-       for (pin = 0; pin < ARRAY_SIZE(mfp_table); pin++) {
-               struct pxa3xx_mfp_pin *p = &mfp_table[pin];
-               __mfp_config_run(p);
-       }
+       mfp_config_run();
 
        /* clear RDH bit when MFP settings are restored
         *
@@ -231,7 +47,6 @@ static int pxa3xx_mfp_resume(struct sys_device *d)
         * preserve them here in case they will be referenced later
         */
        ASCR &= ~(ASCR_RDH | ASCR_D1S | ASCR_D2S | ASCR_D3S);
-
        return 0;
 }
 #else
index 2b427e015b6fac9be73fc6d6b19c4279d8486914..97c93a7a285c12b70a7249c25cd9f47ee1b2f493 100644 (file)
 #include <linux/power_supply.h>
 #include <linux/wm97xx_batt.h>
 #include <linux/mtd/physmap.h>
+#include <linux/usb/gpio_vbus.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
-#include <mach/mfp-pxa27x.h>
+
+#include <mach/pxa27x.h>
+#include <mach/regs-rtc.h>
 #include <mach/pxa27x_keypad.h>
 #include <mach/pxafb.h>
-#include <mach/pxa2xx-regs.h>
 #include <mach/mmc.h>
 #include <mach/udc.h>
 #include <mach/pxa27x-udc.h>
@@ -411,21 +413,6 @@ static void gsm_exit(void)
 /*
  * USB UDC
  */
-static void udc_power_command(int cmd)
-{
-       switch (cmd) {
-       case PXA2XX_UDC_CMD_DISCONNECT:
-               gpio_set_value(GPIO22_USB_ENABLE, 0);
-               break;
-       case PXA2XX_UDC_CMD_CONNECT:
-               gpio_set_value(GPIO22_USB_ENABLE, 1);
-               break;
-       default:
-               printk(KERN_INFO "udc_control: unknown command (0x%x)!\n", cmd);
-               break;
-       }
-}
-
 static int is_usb_connected(void)
 {
        return !gpio_get_value(GPIO13_nUSB_DETECT);
@@ -433,24 +420,15 @@ static int is_usb_connected(void)
 
 static struct pxa2xx_udc_mach_info mioa701_udc_info = {
        .udc_is_connected = is_usb_connected,
-       .udc_command      = udc_power_command,
+       .gpio_pullup      = GPIO22_USB_ENABLE,
 };
 
-struct gpio_ress udc_gpios[] = {
-       MIO_GPIO_OUT(GPIO22_USB_ENABLE, 0, "USB Vbus enable")
+struct gpio_vbus_mach_info gpio_vbus_data = {
+       .gpio_vbus = GPIO13_nUSB_DETECT,
+       .gpio_vbus_inverted = 1,
+       .gpio_pullup = -1,
 };
 
-static int __init udc_init(void)
-{
-       pxa_set_udc_info(&mioa701_udc_info);
-       return mio_gpio_request(ARRAY_AND_SIZE(udc_gpios));
-}
-
-static void udc_exit(void)
-{
-       mio_gpio_free(ARRAY_AND_SIZE(udc_gpios));
-}
-
 /*
  * SDIO/MMC Card controller
  */
@@ -789,6 +767,7 @@ MIO_SIMPLE_DEV(pxa2xx_ac97,   "pxa2xx-ac97",    NULL)
 MIO_PARENT_DEV(mio_wm9713_codec,  "wm9713-codec",   &pxa2xx_ac97.dev, NULL)
 MIO_SIMPLE_DEV(mioa701_sound,    "mioa701-wm9713", NULL)
 MIO_SIMPLE_DEV(mioa701_board,    "mioa701-board",  NULL)
+MIO_SIMPLE_DEV(gpio_vbus,        "gpio-vbus",      &gpio_vbus_data);
 
 static struct platform_device *devices[] __initdata = {
        &mioa701_gpio_keys,
@@ -800,7 +779,8 @@ static struct platform_device *devices[] __initdata = {
        &mioa701_sound,
        &power_dev,
        &strataflash,
-       &mioa701_board
+       &gpio_vbus,
+       &mioa701_board,
 };
 
 static void mioa701_machine_exit(void);
@@ -808,13 +788,13 @@ static void mioa701_machine_exit(void);
 static void mioa701_poweroff(void)
 {
        mioa701_machine_exit();
-       arm_machine_restart('s');
+       arm_machine_restart('s', NULL);
 }
 
-static void mioa701_restart(char c)
+static void mioa701_restart(char c, const char *cmd)
 {
        mioa701_machine_exit();
-       arm_machine_restart('s');
+       arm_machine_restart('s', cmd);
 }
 
 struct gpio_ress global_gpios[] = {
@@ -837,7 +817,7 @@ static void __init mioa701_machine_init(void)
        pxa_set_mci_info(&mioa701_mci_info);
        pxa_set_keypad_info(&mioa701_keypad_info);
        wm97xx_bat_set_pdata(&mioa701_battery_data);
-       udc_init();
+       pxa_set_udc_info(&mioa701_udc_info);
        pm_power_off = mioa701_poweroff;
        arm_pm_restart = mioa701_restart;
        platform_add_devices(devices, ARRAY_SIZE(devices));
@@ -850,7 +830,6 @@ static void __init mioa701_machine_init(void)
 
 static void mioa701_machine_exit(void)
 {
-       udc_exit();
        bootstrap_exit();
        gsm_exit();
 }
index 8a73814126b13fbddad9d4724bfe48ad3e68ba0c..a65713ce019e763caa27a9a5f48f8ee1848d6c4e 100644 (file)
 #include <linux/types.h>
 #include <linux/usb/isp116x.h>
 
-#include <mach/hardware.h>
-#include <mach/pxa-regs.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
+
+#include <mach/pxa25x.h>
 #include "generic.h"
 
 static void isp116x_pfm_delay(struct device *dev, int delay)
diff --git a/arch/arm/mach-pxa/palmld.c b/arch/arm/mach-pxa/palmld.c
new file mode 100644 (file)
index 0000000..8587477
--- /dev/null
@@ -0,0 +1,565 @@
+/*
+ * Hardware definitions for Palm LifeDrive
+ *
+ * Author:     Marek Vasut <marek.vasut@gmail.com>
+ *
+ * Based on work of:
+ *             Alex Osborne <ato@meshy.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * (find more info at www.hackndev.com)
+ *
+ */
+
+#include <linux/platform_device.h>
+#include <linux/delay.h>
+#include <linux/irq.h>
+#include <linux/gpio_keys.h>
+#include <linux/input.h>
+#include <linux/pda_power.h>
+#include <linux/pwm_backlight.h>
+#include <linux/gpio.h>
+#include <linux/wm97xx_batt.h>
+#include <linux/power_supply.h>
+
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+#include <asm/mach/map.h>
+
+#include <mach/pxa27x.h>
+#include <mach/audio.h>
+#include <mach/palmld.h>
+#include <mach/mmc.h>
+#include <mach/pxafb.h>
+#include <mach/irda.h>
+#include <mach/pxa27x_keypad.h>
+#include <mach/palmasoc.h>
+
+#include "generic.h"
+#include "devices.h"
+
+/******************************************************************************
+ * Pin configuration
+ ******************************************************************************/
+static unsigned long palmld_pin_config[] __initdata = {
+       /* MMC */
+       GPIO32_MMC_CLK,
+       GPIO92_MMC_DAT_0,
+       GPIO109_MMC_DAT_1,
+       GPIO110_MMC_DAT_2,
+       GPIO111_MMC_DAT_3,
+       GPIO112_MMC_CMD,
+       GPIO14_GPIO,    /* SD detect */
+       GPIO114_GPIO,   /* SD power */
+       GPIO116_GPIO,   /* SD r/o switch */
+
+       /* AC97 */
+       GPIO28_AC97_BITCLK,
+       GPIO29_AC97_SDATA_IN_0,
+       GPIO30_AC97_SDATA_OUT,
+       GPIO31_AC97_SYNC,
+
+       /* IrDA */
+       GPIO108_GPIO,   /* ir disable */
+       GPIO46_FICP_RXD,
+       GPIO47_FICP_TXD,
+
+       /* MATRIX KEYPAD */
+       GPIO100_KP_MKIN_0,
+       GPIO101_KP_MKIN_1,
+       GPIO102_KP_MKIN_2,
+       GPIO97_KP_MKIN_3,
+       GPIO103_KP_MKOUT_0,
+       GPIO104_KP_MKOUT_1,
+       GPIO105_KP_MKOUT_2,
+
+       /* LCD */
+       GPIO58_LCD_LDD_0,
+       GPIO59_LCD_LDD_1,
+       GPIO60_LCD_LDD_2,
+       GPIO61_LCD_LDD_3,
+       GPIO62_LCD_LDD_4,
+       GPIO63_LCD_LDD_5,
+       GPIO64_LCD_LDD_6,
+       GPIO65_LCD_LDD_7,
+       GPIO66_LCD_LDD_8,
+       GPIO67_LCD_LDD_9,
+       GPIO68_LCD_LDD_10,
+       GPIO69_LCD_LDD_11,
+       GPIO70_LCD_LDD_12,
+       GPIO71_LCD_LDD_13,
+       GPIO72_LCD_LDD_14,
+       GPIO73_LCD_LDD_15,
+       GPIO74_LCD_FCLK,
+       GPIO75_LCD_LCLK,
+       GPIO76_LCD_PCLK,
+       GPIO77_LCD_BIAS,
+
+       /* PWM */
+       GPIO16_PWM0_OUT,
+
+       /* GPIO KEYS */
+       GPIO10_GPIO,    /* hotsync button */
+       GPIO12_GPIO,    /* power switch */
+       GPIO15_GPIO,    /* lock switch */
+
+       /* LEDs */
+       GPIO52_GPIO,    /* green led */
+       GPIO94_GPIO,    /* orange led */
+
+       /* PCMCIA */
+       GPIO48_nPOE,
+       GPIO49_nPWE,
+       GPIO50_nPIOR,
+       GPIO51_nPIOW,
+       GPIO85_nPCE_1,
+       GPIO54_nPCE_2,
+       GPIO79_PSKTSEL,
+       GPIO55_nPREG,
+       GPIO56_nPWAIT,
+       GPIO57_nIOIS16,
+       GPIO36_GPIO,    /* wifi power */
+       GPIO38_GPIO,    /* wifi ready */
+       GPIO81_GPIO,    /* wifi reset */
+
+       /* HDD */
+       GPIO95_GPIO,    /* HDD irq */
+       GPIO115_GPIO,   /* HDD power */
+
+       /* MISC */
+       GPIO13_GPIO,    /* earphone detect */
+};
+
+/******************************************************************************
+ * SD/MMC card controller
+ ******************************************************************************/
+static int palmld_mci_init(struct device *dev, irq_handler_t palmld_detect_int,
+                               void *data)
+{
+       int err = 0;
+
+       /* Setup an interrupt for detecting card insert/remove events */
+       err = gpio_request(GPIO_NR_PALMLD_SD_DETECT_N, "SD IRQ");
+       if (err)
+               goto err;
+       err = gpio_direction_input(GPIO_NR_PALMLD_SD_DETECT_N);
+       if (err)
+               goto err2;
+       err = request_irq(gpio_to_irq(GPIO_NR_PALMLD_SD_DETECT_N),
+                       palmld_detect_int, IRQF_DISABLED | IRQF_SAMPLE_RANDOM |
+                       IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
+                       "SD/MMC card detect", data);
+       if (err) {
+               printk(KERN_ERR "%s: cannot request SD/MMC card detect IRQ\n",
+                               __func__);
+               goto err2;
+       }
+
+       err = gpio_request(GPIO_NR_PALMLD_SD_POWER, "SD_POWER");
+       if (err)
+               goto err3;
+       err = gpio_direction_output(GPIO_NR_PALMLD_SD_POWER, 0);
+       if (err)
+               goto err4;
+
+       err = gpio_request(GPIO_NR_PALMLD_SD_READONLY, "SD_READONLY");
+       if (err)
+               goto err4;
+       err = gpio_direction_input(GPIO_NR_PALMLD_SD_READONLY);
+       if (err)
+               goto err5;
+
+       printk(KERN_DEBUG "%s: irq registered\n", __func__);
+
+       return 0;
+
+err5:
+       gpio_free(GPIO_NR_PALMLD_SD_READONLY);
+err4:
+       gpio_free(GPIO_NR_PALMLD_SD_POWER);
+err3:
+       free_irq(gpio_to_irq(GPIO_NR_PALMLD_SD_DETECT_N), data);
+err2:
+       gpio_free(GPIO_NR_PALMLD_SD_DETECT_N);
+err:
+       return err;
+}
+
+static void palmld_mci_exit(struct device *dev, void *data)
+{
+       gpio_free(GPIO_NR_PALMLD_SD_READONLY);
+       gpio_free(GPIO_NR_PALMLD_SD_POWER);
+       free_irq(gpio_to_irq(GPIO_NR_PALMLD_SD_DETECT_N), data);
+       gpio_free(GPIO_NR_PALMLD_SD_DETECT_N);
+}
+
+static void palmld_mci_power(struct device *dev, unsigned int vdd)
+{
+       struct pxamci_platform_data *p_d = dev->platform_data;
+       gpio_set_value(GPIO_NR_PALMLD_SD_POWER, p_d->ocr_mask & (1 << vdd));
+}
+
+static int palmld_mci_get_ro(struct device *dev)
+{
+       return gpio_get_value(GPIO_NR_PALMLD_SD_READONLY);
+}
+
+static struct pxamci_platform_data palmld_mci_platform_data = {
+       .ocr_mask       = MMC_VDD_32_33 | MMC_VDD_33_34,
+       .setpower       = palmld_mci_power,
+       .get_ro         = palmld_mci_get_ro,
+       .init           = palmld_mci_init,
+       .exit           = palmld_mci_exit,
+};
+
+/******************************************************************************
+ * GPIO keyboard
+ ******************************************************************************/
+static unsigned int palmld_matrix_keys[] = {
+       KEY(0, 1, KEY_F2),
+       KEY(0, 2, KEY_UP),
+
+       KEY(1, 0, KEY_F3),
+       KEY(1, 1, KEY_F4),
+       KEY(1, 2, KEY_RIGHT),
+
+       KEY(2, 0, KEY_F1),
+       KEY(2, 1, KEY_F5),
+       KEY(2, 2, KEY_DOWN),
+
+       KEY(3, 0, KEY_F6),
+       KEY(3, 1, KEY_ENTER),
+       KEY(3, 2, KEY_LEFT),
+};
+
+static struct pxa27x_keypad_platform_data palmld_keypad_platform_data = {
+       .matrix_key_rows        = 4,
+       .matrix_key_cols        = 3,
+       .matrix_key_map         = palmld_matrix_keys,
+       .matrix_key_map_size    = ARRAY_SIZE(palmld_matrix_keys),
+
+       .debounce_interval      = 30,
+};
+
+/******************************************************************************
+ * GPIO keys
+ ******************************************************************************/
+static struct gpio_keys_button palmld_pxa_buttons[] = {
+       {KEY_F8, GPIO_NR_PALMLD_HOTSYNC_BUTTON_N, 1, "HotSync Button" },
+       {KEY_F9, GPIO_NR_PALMLD_LOCK_SWITCH, 0, "Lock Switch" },
+       {KEY_POWER, GPIO_NR_PALMLD_POWER_SWITCH, 0, "Power Switch" },
+};
+
+static struct gpio_keys_platform_data palmld_pxa_keys_data = {
+       .buttons        = palmld_pxa_buttons,
+       .nbuttons       = ARRAY_SIZE(palmld_pxa_buttons),
+};
+
+static struct platform_device palmld_pxa_keys = {
+       .name   = "gpio-keys",
+       .id     = -1,
+       .dev    = {
+               .platform_data = &palmld_pxa_keys_data,
+       },
+};
+
+/******************************************************************************
+ * Backlight
+ ******************************************************************************/
+static int palmld_backlight_init(struct device *dev)
+{
+       int ret;
+
+       ret = gpio_request(GPIO_NR_PALMLD_BL_POWER, "BL POWER");
+       if (ret)
+               goto err;
+       ret = gpio_direction_output(GPIO_NR_PALMLD_BL_POWER, 0);
+       if (ret)
+               goto err2;
+       ret = gpio_request(GPIO_NR_PALMLD_LCD_POWER, "LCD POWER");
+       if (ret)
+               goto err2;
+       ret = gpio_direction_output(GPIO_NR_PALMLD_LCD_POWER, 0);
+       if (ret)
+               goto err3;
+
+       return 0;
+err3:
+       gpio_free(GPIO_NR_PALMLD_LCD_POWER);
+err2:
+       gpio_free(GPIO_NR_PALMLD_BL_POWER);
+err:
+       return ret;
+}
+
+static int palmld_backlight_notify(int brightness)
+{
+       gpio_set_value(GPIO_NR_PALMLD_BL_POWER, brightness);
+       gpio_set_value(GPIO_NR_PALMLD_LCD_POWER, brightness);
+       return brightness;
+}
+
+static void palmld_backlight_exit(struct device *dev)
+{
+       gpio_free(GPIO_NR_PALMLD_BL_POWER);
+       gpio_free(GPIO_NR_PALMLD_LCD_POWER);
+}
+
+static struct platform_pwm_backlight_data palmld_backlight_data = {
+       .pwm_id         = 0,
+       .max_brightness = PALMLD_MAX_INTENSITY,
+       .dft_brightness = PALMLD_MAX_INTENSITY,
+       .pwm_period_ns  = PALMLD_PERIOD_NS,
+       .init           = palmld_backlight_init,
+       .notify         = palmld_backlight_notify,
+       .exit           = palmld_backlight_exit,
+};
+
+static struct platform_device palmld_backlight = {
+       .name   = "pwm-backlight",
+       .dev    = {
+               .parent         = &pxa27x_device_pwm0.dev,
+               .platform_data  = &palmld_backlight_data,
+       },
+};
+
+/******************************************************************************
+ * IrDA
+ ******************************************************************************/
+static int palmld_irda_startup(struct device *dev)
+{
+       int err;
+       err = gpio_request(GPIO_NR_PALMLD_IR_DISABLE, "IR DISABLE");
+       if (err)
+               goto err;
+       err = gpio_direction_output(GPIO_NR_PALMLD_IR_DISABLE, 1);
+       if (err)
+               gpio_free(GPIO_NR_PALMLD_IR_DISABLE);
+err:
+       return err;
+}
+
+static void palmld_irda_shutdown(struct device *dev)
+{
+       gpio_free(GPIO_NR_PALMLD_IR_DISABLE);
+}
+
+static void palmld_irda_transceiver_mode(struct device *dev, int mode)
+{
+       gpio_set_value(GPIO_NR_PALMLD_IR_DISABLE, mode & IR_OFF);
+       pxa2xx_transceiver_mode(dev, mode);
+}
+
+static struct pxaficp_platform_data palmld_ficp_platform_data = {
+       .startup                = palmld_irda_startup,
+       .shutdown               = palmld_irda_shutdown,
+       .transceiver_cap        = IR_SIRMODE | IR_FIRMODE | IR_OFF,
+       .transceiver_mode       = palmld_irda_transceiver_mode,
+};
+
+/******************************************************************************
+ * LEDs
+ ******************************************************************************/
+struct gpio_led gpio_leds[] = {
+{
+       .name                   = "palmld:green:led",
+       .default_trigger        = "none",
+       .gpio                   = GPIO_NR_PALMLD_LED_GREEN,
+}, {
+       .name                   = "palmld:amber:led",
+       .default_trigger        = "none",
+       .gpio                   = GPIO_NR_PALMLD_LED_AMBER,
+},
+};
+
+static struct gpio_led_platform_data gpio_led_info = {
+       .leds           = gpio_leds,
+       .num_leds       = ARRAY_SIZE(gpio_leds),
+};
+
+static struct platform_device palmld_leds = {
+       .name   = "leds-gpio",
+       .id     = -1,
+       .dev    = {
+               .platform_data  = &gpio_led_info,
+       }
+};
+
+/******************************************************************************
+ * Power supply
+ ******************************************************************************/
+static int power_supply_init(struct device *dev)
+{
+       int ret;
+
+       ret = gpio_request(GPIO_NR_PALMLD_POWER_DETECT, "CABLE_STATE_AC");
+       if (ret)
+               goto err1;
+       ret = gpio_direction_input(GPIO_NR_PALMLD_POWER_DETECT);
+       if (ret)
+               goto err2;
+
+       ret = gpio_request(GPIO_NR_PALMLD_USB_DETECT_N, "CABLE_STATE_USB");
+       if (ret)
+               goto err2;
+       ret = gpio_direction_input(GPIO_NR_PALMLD_USB_DETECT_N);
+       if (ret)
+               goto err3;
+
+       return 0;
+
+err3:
+       gpio_free(GPIO_NR_PALMLD_USB_DETECT_N);
+err2:
+       gpio_free(GPIO_NR_PALMLD_POWER_DETECT);
+err1:
+       return ret;
+}
+
+static int palmld_is_ac_online(void)
+{
+       return gpio_get_value(GPIO_NR_PALMLD_POWER_DETECT);
+}
+
+static int palmld_is_usb_online(void)
+{
+       return !gpio_get_value(GPIO_NR_PALMLD_USB_DETECT_N);
+}
+
+static void power_supply_exit(struct device *dev)
+{
+       gpio_free(GPIO_NR_PALMLD_USB_DETECT_N);
+       gpio_free(GPIO_NR_PALMLD_POWER_DETECT);
+}
+
+static char *palmld_supplicants[] = {
+       "main-battery",
+};
+
+static struct pda_power_pdata power_supply_info = {
+       .init            = power_supply_init,
+       .is_ac_online    = palmld_is_ac_online,
+       .is_usb_online   = palmld_is_usb_online,
+       .exit            = power_supply_exit,
+       .supplied_to     = palmld_supplicants,
+       .num_supplicants = ARRAY_SIZE(palmld_supplicants),
+};
+
+static struct platform_device power_supply = {
+       .name = "pda-power",
+       .id   = -1,
+       .dev  = {
+               .platform_data = &power_supply_info,
+       },
+};
+
+/******************************************************************************
+ * WM97xx battery
+ ******************************************************************************/
+static struct wm97xx_batt_info wm97xx_batt_pdata = {
+       .batt_aux       = WM97XX_AUX_ID3,
+       .temp_aux       = WM97XX_AUX_ID2,
+       .charge_gpio    = -1,
+       .max_voltage    = PALMLD_BAT_MAX_VOLTAGE,
+       .min_voltage    = PALMLD_BAT_MIN_VOLTAGE,
+       .batt_mult      = 1000,
+       .batt_div       = 414,
+       .temp_mult      = 1,
+       .temp_div       = 1,
+       .batt_tech      = POWER_SUPPLY_TECHNOLOGY_LIPO,
+       .batt_name      = "main-batt",
+};
+
+/******************************************************************************
+ * aSoC audio
+ ******************************************************************************/
+static struct palm27x_asoc_info palm27x_asoc_pdata = {
+       .jack_gpio      = GPIO_NR_PALMLD_EARPHONE_DETECT,
+};
+
+/******************************************************************************
+ * Framebuffer
+ ******************************************************************************/
+static struct pxafb_mode_info palmld_lcd_modes[] = {
+{
+       .pixclock       = 57692,
+       .xres           = 320,
+       .yres           = 480,
+       .bpp            = 16,
+
+       .left_margin    = 32,
+       .right_margin   = 1,
+       .upper_margin   = 7,
+       .lower_margin   = 1,
+
+       .hsync_len      = 4,
+       .vsync_len      = 1,
+},
+};
+
+static struct pxafb_mach_info palmld_lcd_screen = {
+       .modes          = palmld_lcd_modes,
+       .num_modes      = ARRAY_SIZE(palmld_lcd_modes),
+       .lcd_conn       = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL,
+};
+
+/******************************************************************************
+ * Machine init
+ ******************************************************************************/
+static struct platform_device *devices[] __initdata = {
+#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
+       &palmld_pxa_keys,
+#endif
+       &palmld_backlight,
+       &palmld_leds,
+       &power_supply,
+};
+
+static struct map_desc palmld_io_desc[] __initdata = {
+{
+       .virtual        = PALMLD_IDE_VIRT,
+       .pfn            = __phys_to_pfn(PALMLD_IDE_PHYS),
+       .length         = PALMLD_IDE_SIZE,
+       .type           = MT_DEVICE
+},
+{
+       .virtual        = PALMLD_USB_VIRT,
+       .pfn            = __phys_to_pfn(PALMLD_USB_PHYS),
+       .length         = PALMLD_USB_SIZE,
+       .type           = MT_DEVICE
+},
+};
+
+static void __init palmld_map_io(void)
+{
+       pxa_map_io();
+       iotable_init(palmld_io_desc, ARRAY_SIZE(palmld_io_desc));
+}
+
+static void __init palmld_init(void)
+{
+       pxa2xx_mfp_config(ARRAY_AND_SIZE(palmld_pin_config));
+
+       set_pxa_fb_info(&palmld_lcd_screen);
+       pxa_set_mci_info(&palmld_mci_platform_data);
+       pxa_set_ac97_info(NULL);
+       pxa_set_ficp_info(&palmld_ficp_platform_data);
+       pxa_set_keypad_info(&palmld_keypad_platform_data);
+       wm97xx_bat_set_pdata(&wm97xx_batt_pdata);
+       palm27x_asoc_set_pdata(&palm27x_asoc_pdata);
+
+       platform_add_devices(devices, ARRAY_SIZE(devices));
+}
+
+MACHINE_START(PALMLD, "Palm LifeDrive")
+       .phys_io        = PALMLD_PHYS_IO_START,
+       .io_pg_offst    = (io_p2v(0x40000000) >> 18) & 0xfffc,
+       .boot_params    = 0xa0000100,
+       .map_io         = palmld_map_io,
+       .init_irq       = pxa27x_init_irq,
+       .timer          = &pxa_timer,
+       .init_machine   = palmld_init
+MACHINE_END
diff --git a/arch/arm/mach-pxa/palmt5.c b/arch/arm/mach-pxa/palmt5.c
new file mode 100644 (file)
index 0000000..9521c7b
--- /dev/null
@@ -0,0 +1,496 @@
+/*
+ * Hardware definitions for Palm Tungsten|T5
+ *
+ * Author:     Marek Vasut <marek.vasut@gmail.com>
+ *
+ * Based on work of:
+ *             Ales Snuparek <snuparek@atlas.cz>
+ *             Justin Kendrick <twilightsentry@gmail.com>
+ *             RichardT5 <richard_t5@users.sourceforge.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * (find more info at www.hackndev.com)
+ *
+ */
+
+#include <linux/platform_device.h>
+#include <linux/delay.h>
+#include <linux/irq.h>
+#include <linux/gpio_keys.h>
+#include <linux/input.h>
+#include <linux/pda_power.h>
+#include <linux/pwm_backlight.h>
+#include <linux/gpio.h>
+#include <linux/wm97xx_batt.h>
+#include <linux/power_supply.h>
+
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+#include <asm/mach/map.h>
+
+#include <mach/pxa27x.h>
+#include <mach/audio.h>
+#include <mach/palmt5.h>
+#include <mach/mmc.h>
+#include <mach/pxafb.h>
+#include <mach/irda.h>
+#include <mach/pxa27x_keypad.h>
+#include <mach/udc.h>
+#include <mach/palmasoc.h>
+
+#include "generic.h"
+#include "devices.h"
+
+/******************************************************************************
+ * Pin configuration
+ ******************************************************************************/
+static unsigned long palmt5_pin_config[] __initdata = {
+       /* MMC */
+       GPIO32_MMC_CLK,
+       GPIO92_MMC_DAT_0,
+       GPIO109_MMC_DAT_1,
+       GPIO110_MMC_DAT_2,
+       GPIO111_MMC_DAT_3,
+       GPIO112_MMC_CMD,
+       GPIO14_GPIO,    /* SD detect */
+       GPIO114_GPIO,   /* SD power */
+       GPIO115_GPIO,   /* SD r/o switch */
+
+       /* AC97 */
+       GPIO28_AC97_BITCLK,
+       GPIO29_AC97_SDATA_IN_0,
+       GPIO30_AC97_SDATA_OUT,
+       GPIO31_AC97_SYNC,
+
+       /* IrDA */
+       GPIO40_GPIO,    /* ir disable */
+       GPIO46_FICP_RXD,
+       GPIO47_FICP_TXD,
+
+       /* USB */
+       GPIO15_GPIO,    /* usb detect */
+       GPIO95_GPIO,    /* usb power */
+
+       /* MATRIX KEYPAD */
+       GPIO100_KP_MKIN_0,
+       GPIO101_KP_MKIN_1,
+       GPIO102_KP_MKIN_2,
+       GPIO97_KP_MKIN_3,
+       GPIO103_KP_MKOUT_0,
+       GPIO104_KP_MKOUT_1,
+       GPIO105_KP_MKOUT_2,
+
+       /* LCD */
+       GPIO58_LCD_LDD_0,
+       GPIO59_LCD_LDD_1,
+       GPIO60_LCD_LDD_2,
+       GPIO61_LCD_LDD_3,
+       GPIO62_LCD_LDD_4,
+       GPIO63_LCD_LDD_5,
+       GPIO64_LCD_LDD_6,
+       GPIO65_LCD_LDD_7,
+       GPIO66_LCD_LDD_8,
+       GPIO67_LCD_LDD_9,
+       GPIO68_LCD_LDD_10,
+       GPIO69_LCD_LDD_11,
+       GPIO70_LCD_LDD_12,
+       GPIO71_LCD_LDD_13,
+       GPIO72_LCD_LDD_14,
+       GPIO73_LCD_LDD_15,
+       GPIO74_LCD_FCLK,
+       GPIO75_LCD_LCLK,
+       GPIO76_LCD_PCLK,
+       GPIO77_LCD_BIAS,
+
+       /* PWM */
+       GPIO16_PWM0_OUT,
+
+       /* MISC */
+       GPIO10_GPIO,    /* hotsync button */
+       GPIO90_GPIO,    /* power detect */
+       GPIO107_GPIO,   /* earphone detect */
+};
+
+/******************************************************************************
+ * SD/MMC card controller
+ ******************************************************************************/
+static int palmt5_mci_init(struct device *dev, irq_handler_t palmt5_detect_int,
+                               void *data)
+{
+       int err = 0;
+
+       /* Setup an interrupt for detecting card insert/remove events */
+       err = gpio_request(GPIO_NR_PALMT5_SD_DETECT_N, "SD IRQ");
+       if (err)
+               goto err;
+       err = gpio_direction_input(GPIO_NR_PALMT5_SD_DETECT_N);
+       if (err)
+               goto err2;
+       err = request_irq(gpio_to_irq(GPIO_NR_PALMT5_SD_DETECT_N),
+                       palmt5_detect_int, IRQF_DISABLED | IRQF_SAMPLE_RANDOM |
+                       IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
+                       "SD/MMC card detect", data);
+       if (err) {
+               printk(KERN_ERR "%s: cannot request SD/MMC card detect IRQ\n",
+                               __func__);
+               goto err2;
+       }
+
+       err = gpio_request(GPIO_NR_PALMT5_SD_POWER, "SD_POWER");
+       if (err)
+               goto err3;
+       err = gpio_direction_output(GPIO_NR_PALMT5_SD_POWER, 0);
+       if (err)
+               goto err4;
+
+       err = gpio_request(GPIO_NR_PALMT5_SD_READONLY, "SD_READONLY");
+       if (err)
+               goto err4;
+       err = gpio_direction_input(GPIO_NR_PALMT5_SD_READONLY);
+       if (err)
+               goto err5;
+
+       printk(KERN_DEBUG "%s: irq registered\n", __func__);
+
+       return 0;
+
+err5:
+       gpio_free(GPIO_NR_PALMT5_SD_READONLY);
+err4:
+       gpio_free(GPIO_NR_PALMT5_SD_POWER);
+err3:
+       free_irq(gpio_to_irq(GPIO_NR_PALMT5_SD_DETECT_N), data);
+err2:
+       gpio_free(GPIO_NR_PALMT5_SD_DETECT_N);
+err:
+       return err;
+}
+
+static void palmt5_mci_exit(struct device *dev, void *data)
+{
+       gpio_free(GPIO_NR_PALMT5_SD_READONLY);
+       gpio_free(GPIO_NR_PALMT5_SD_POWER);
+       free_irq(IRQ_GPIO_PALMT5_SD_DETECT_N, data);
+       gpio_free(GPIO_NR_PALMT5_SD_DETECT_N);
+}
+
+static void palmt5_mci_power(struct device *dev, unsigned int vdd)
+{
+       struct pxamci_platform_data *p_d = dev->platform_data;
+       gpio_set_value(GPIO_NR_PALMT5_SD_POWER, p_d->ocr_mask & (1 << vdd));
+}
+
+static int palmt5_mci_get_ro(struct device *dev)
+{
+       return gpio_get_value(GPIO_NR_PALMT5_SD_READONLY);
+}
+
+static struct pxamci_platform_data palmt5_mci_platform_data = {
+       .ocr_mask       = MMC_VDD_32_33 | MMC_VDD_33_34,
+       .setpower       = palmt5_mci_power,
+       .get_ro         = palmt5_mci_get_ro,
+       .init           = palmt5_mci_init,
+       .exit           = palmt5_mci_exit,
+};
+
+/******************************************************************************
+ * GPIO keyboard
+ ******************************************************************************/
+static unsigned int palmt5_matrix_keys[] = {
+       KEY(0, 0, KEY_POWER),
+       KEY(0, 1, KEY_F1),
+       KEY(0, 2, KEY_ENTER),
+
+       KEY(1, 0, KEY_F2),
+       KEY(1, 1, KEY_F3),
+       KEY(1, 2, KEY_F4),
+
+       KEY(2, 0, KEY_UP),
+       KEY(2, 2, KEY_DOWN),
+
+       KEY(3, 0, KEY_RIGHT),
+       KEY(3, 2, KEY_LEFT),
+};
+
+static struct pxa27x_keypad_platform_data palmt5_keypad_platform_data = {
+       .matrix_key_rows        = 4,
+       .matrix_key_cols        = 3,
+       .matrix_key_map         = palmt5_matrix_keys,
+       .matrix_key_map_size    = ARRAY_SIZE(palmt5_matrix_keys),
+
+       .debounce_interval      = 30,
+};
+
+/******************************************************************************
+ * GPIO keys
+ ******************************************************************************/
+static struct gpio_keys_button palmt5_pxa_buttons[] = {
+       {KEY_F8, GPIO_NR_PALMT5_HOTSYNC_BUTTON_N, 1, "HotSync Button" },
+};
+
+static struct gpio_keys_platform_data palmt5_pxa_keys_data = {
+       .buttons        = palmt5_pxa_buttons,
+       .nbuttons       = ARRAY_SIZE(palmt5_pxa_buttons),
+};
+
+static struct platform_device palmt5_pxa_keys = {
+       .name   = "gpio-keys",
+       .id     = -1,
+       .dev    = {
+               .platform_data = &palmt5_pxa_keys_data,
+       },
+};
+
+/******************************************************************************
+ * Backlight
+ ******************************************************************************/
+static int palmt5_backlight_init(struct device *dev)
+{
+       int ret;
+
+       ret = gpio_request(GPIO_NR_PALMT5_BL_POWER, "BL POWER");
+       if (ret)
+               goto err;
+       ret = gpio_direction_output(GPIO_NR_PALMT5_BL_POWER, 0);
+       if (ret)
+               goto err2;
+       ret = gpio_request(GPIO_NR_PALMT5_LCD_POWER, "LCD POWER");
+       if (ret)
+               goto err2;
+       ret = gpio_direction_output(GPIO_NR_PALMT5_LCD_POWER, 0);
+       if (ret)
+               goto err3;
+
+       return 0;
+err3:
+       gpio_free(GPIO_NR_PALMT5_LCD_POWER);
+err2:
+       gpio_free(GPIO_NR_PALMT5_BL_POWER);
+err:
+       return ret;
+}
+
+static int palmt5_backlight_notify(int brightness)
+{
+       gpio_set_value(GPIO_NR_PALMT5_BL_POWER, brightness);
+       gpio_set_value(GPIO_NR_PALMT5_LCD_POWER, brightness);
+       return brightness;
+}
+
+static void palmt5_backlight_exit(struct device *dev)
+{
+       gpio_free(GPIO_NR_PALMT5_BL_POWER);
+       gpio_free(GPIO_NR_PALMT5_LCD_POWER);
+}
+
+static struct platform_pwm_backlight_data palmt5_backlight_data = {
+       .pwm_id         = 0,
+       .max_brightness = PALMT5_MAX_INTENSITY,
+       .dft_brightness = PALMT5_MAX_INTENSITY,
+       .pwm_period_ns  = PALMT5_PERIOD_NS,
+       .init           = palmt5_backlight_init,
+       .notify         = palmt5_backlight_notify,
+       .exit           = palmt5_backlight_exit,
+};
+
+static struct platform_device palmt5_backlight = {
+       .name   = "pwm-backlight",
+       .dev    = {
+               .parent         = &pxa27x_device_pwm0.dev,
+               .platform_data  = &palmt5_backlight_data,
+       },
+};
+
+/******************************************************************************
+ * IrDA
+ ******************************************************************************/
+static int palmt5_irda_startup(struct device *dev)
+{
+       int err;
+       err = gpio_request(GPIO_NR_PALMT5_IR_DISABLE, "IR DISABLE");
+       if (err)
+               goto err;
+       err = gpio_direction_output(GPIO_NR_PALMT5_IR_DISABLE, 1);
+       if (err)
+               gpio_free(GPIO_NR_PALMT5_IR_DISABLE);
+err:
+       return err;
+}
+
+static void palmt5_irda_shutdown(struct device *dev)
+{
+       gpio_free(GPIO_NR_PALMT5_IR_DISABLE);
+}
+
+static void palmt5_irda_transceiver_mode(struct device *dev, int mode)
+{
+       gpio_set_value(GPIO_NR_PALMT5_IR_DISABLE, mode & IR_OFF);
+       pxa2xx_transceiver_mode(dev, mode);
+}
+
+static struct pxaficp_platform_data palmt5_ficp_platform_data = {
+       .startup                = palmt5_irda_startup,
+       .shutdown               = palmt5_irda_shutdown,
+       .transceiver_cap        = IR_SIRMODE | IR_FIRMODE | IR_OFF,
+       .transceiver_mode       = palmt5_irda_transceiver_mode,
+};
+
+/******************************************************************************
+ * UDC
+ ******************************************************************************/
+static struct pxa2xx_udc_mach_info palmt5_udc_info __initdata = {
+       .gpio_vbus              = GPIO_NR_PALMT5_USB_DETECT_N,
+       .gpio_vbus_inverted     = 1,
+       .gpio_pullup            = GPIO_NR_PALMT5_USB_POWER,
+       .gpio_pullup_inverted   = 0,
+};
+
+/******************************************************************************
+ * Power supply
+ ******************************************************************************/
+static int power_supply_init(struct device *dev)
+{
+       int ret;
+
+       ret = gpio_request(GPIO_NR_PALMT5_POWER_DETECT, "CABLE_STATE_AC");
+       if (ret)
+               goto err1;
+       ret = gpio_direction_input(GPIO_NR_PALMT5_POWER_DETECT);
+       if (ret)
+               goto err2;
+
+       return 0;
+err2:
+       gpio_free(GPIO_NR_PALMT5_POWER_DETECT);
+err1:
+       return ret;
+}
+
+static int palmt5_is_ac_online(void)
+{
+       return gpio_get_value(GPIO_NR_PALMT5_POWER_DETECT);
+}
+
+static void power_supply_exit(struct device *dev)
+{
+       gpio_free(GPIO_NR_PALMT5_POWER_DETECT);
+}
+
+static char *palmt5_supplicants[] = {
+       "main-battery",
+};
+
+static struct pda_power_pdata power_supply_info = {
+       .init            = power_supply_init,
+       .is_ac_online    = palmt5_is_ac_online,
+       .exit            = power_supply_exit,
+       .supplied_to     = palmt5_supplicants,
+       .num_supplicants = ARRAY_SIZE(palmt5_supplicants),
+};
+
+static struct platform_device power_supply = {
+       .name = "pda-power",
+       .id   = -1,
+       .dev  = {
+               .platform_data = &power_supply_info,
+       },
+};
+
+/******************************************************************************
+ * WM97xx battery
+ ******************************************************************************/
+static struct wm97xx_batt_info wm97xx_batt_pdata = {
+       .batt_aux       = WM97XX_AUX_ID3,
+       .temp_aux       = WM97XX_AUX_ID2,
+       .charge_gpio    = -1,
+       .max_voltage    = PALMT5_BAT_MAX_VOLTAGE,
+       .min_voltage    = PALMT5_BAT_MIN_VOLTAGE,
+       .batt_mult      = 1000,
+       .batt_div       = 414,
+       .temp_mult      = 1,
+       .temp_div       = 1,
+       .batt_tech      = POWER_SUPPLY_TECHNOLOGY_LIPO,
+       .batt_name      = "main-batt",
+};
+
+/******************************************************************************
+ * aSoC audio
+ ******************************************************************************/
+static struct palm27x_asoc_info palm27x_asoc_pdata = {
+       .jack_gpio      = GPIO_NR_PALMT5_EARPHONE_DETECT,
+};
+
+/******************************************************************************
+ * Framebuffer
+ ******************************************************************************/
+static struct pxafb_mode_info palmt5_lcd_modes[] = {
+{
+       .pixclock       = 57692,
+       .xres           = 320,
+       .yres           = 480,
+       .bpp            = 16,
+
+       .left_margin    = 32,
+       .right_margin   = 1,
+       .upper_margin   = 7,
+       .lower_margin   = 1,
+
+       .hsync_len      = 4,
+       .vsync_len      = 1,
+},
+};
+
+static struct pxafb_mach_info palmt5_lcd_screen = {
+       .modes          = palmt5_lcd_modes,
+       .num_modes      = ARRAY_SIZE(palmt5_lcd_modes),
+       .lcd_conn       = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL,
+};
+
+/******************************************************************************
+ * Machine init
+ ******************************************************************************/
+static struct platform_device *devices[] __initdata = {
+#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
+       &palmt5_pxa_keys,
+#endif
+       &palmt5_backlight,
+       &power_supply,
+};
+
+/* setup udc GPIOs initial state */
+static void __init palmt5_udc_init(void)
+{
+       if (!gpio_request(GPIO_NR_PALMT5_USB_POWER, "UDC Vbus")) {
+               gpio_direction_output(GPIO_NR_PALMT5_USB_POWER, 1);
+               gpio_free(GPIO_NR_PALMT5_USB_POWER);
+       }
+}
+
+static void __init palmt5_init(void)
+{
+       pxa2xx_mfp_config(ARRAY_AND_SIZE(palmt5_pin_config));
+
+       set_pxa_fb_info(&palmt5_lcd_screen);
+       pxa_set_mci_info(&palmt5_mci_platform_data);
+       palmt5_udc_init();
+       pxa_set_udc_info(&palmt5_udc_info);
+       pxa_set_ac97_info(NULL);
+       pxa_set_ficp_info(&palmt5_ficp_platform_data);
+       pxa_set_keypad_info(&palmt5_keypad_platform_data);
+       wm97xx_bat_set_pdata(&wm97xx_batt_pdata);
+       palm27x_asoc_set_pdata(&palm27x_asoc_pdata);
+       platform_add_devices(devices, ARRAY_SIZE(devices));
+}
+
+MACHINE_START(PALMT5, "Palm Tungsten|T5")
+       .phys_io        = PALMT5_PHYS_IO_START,
+       .io_pg_offst    = (io_p2v(0x40000000) >> 18) & 0xfffc,
+       .boot_params    = 0xa0000100,
+       .map_io         = pxa_map_io,
+       .init_irq       = pxa27x_init_irq,
+       .timer          = &pxa_timer,
+       .init_machine   = palmt5_init
+MACHINE_END
index a9d94f5dbec4b2adaa71345881605f153b687a05..b490c0924619bf7e69fce0ca50fbde060532f090 100644 (file)
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
+#include <mach/pxa27x.h>
 #include <mach/audio.h>
 #include <mach/palmtx.h>
 #include <mach/mmc.h>
 #include <mach/pxafb.h>
-#include <mach/pxa-regs.h>
-#include <mach/mfp-pxa27x.h>
 #include <mach/irda.h>
 #include <mach/pxa27x_keypad.h>
 #include <mach/udc.h>
index 2f730da3bba83fba402450f8f04b7268847052b5..b88eb4dd2c84169a6b912c9322dceac5e6c416de 100644 (file)
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
+#include <mach/pxa27x.h>
 #include <mach/audio.h>
 #include <mach/palmz72.h>
 #include <mach/mmc.h>
 #include <mach/pxafb.h>
-#include <mach/pxa-regs.h>
-#include <mach/pxa2xx-regs.h>
-#include <mach/mfp-pxa27x.h>
 #include <mach/irda.h>
 #include <mach/pxa27x_keypad.h>
 #include <mach/udc.h>
index 36135a02fdc7d4fc9a7ccc8cad4d980d70e8ea06..6abfa2979c61f32732d93ec8e5e258dba465c94e 100644 (file)
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
-#include <mach/hardware.h>
-#include <mach/pxa-regs.h>
-#include <mach/mfp-pxa27x.h>
-#include <mach/pxa2xx-regs.h>
+#include <mach/pxa27x.h>
 #include <mach/pxa2xx_spi.h>
 #include <mach/pcm027.h>
 #include "generic.h"
index 34841c72815f6b15c2ffff1bbee04a03e32dd6bf..f46698e20c1f063278798869237f0a5ecc4fb6a0 100644 (file)
 #include <mach/i2c.h>
 #include <mach/camera.h>
 #include <asm/mach/map.h>
-#include <mach/pxa-regs.h>
+#include <mach/pxa27x.h>
 #include <mach/audio.h>
 #include <mach/mmc.h>
 #include <mach/ohci.h>
 #include <mach/pcm990_baseboard.h>
 #include <mach/pxafb.h>
-#include <mach/mfp-pxa27x.h>
 
 #include "devices.h"
 #include "generic.h"
index 164eb0bb6321f5bf0bbd626b14587188cb629a4c..884b174c8ead93d42c4f9966b84e09ea583e25a5 100644 (file)
 #include <linux/module.h>
 #include <linux/suspend.h>
 #include <linux/errno.h>
-#include <linux/time.h>
 
-#include <mach/hardware.h>
-#include <asm/memory.h>
-#include <asm/system.h>
 #include <mach/pm.h>
-#include <mach/pxa-regs.h>
-#include <mach/lubbock.h>
-#include <asm/mach/time.h>
 
 struct pxa_cpu_pm_fns *pxa_cpu_pm_fns;
 static unsigned long *sleep_save;
@@ -57,9 +50,9 @@ int pxa_pm_enter(suspend_state_t state)
 
                /* if invalid, display message and wait for a hardware reset */
                if (checksum != sleep_save_checksum) {
-#ifdef CONFIG_ARCH_LUBBOCK
-                       LUB_HEXLED = 0xbadbadc5;
-#endif
+
+                       lubbock_set_hexled(0xbadbadc5);
+
                        while (1)
                                pxa_cpu_pm_fns->enter(state);
                }
index f9093beba752295a52cac1559b49243da7283d14..036bbde4d22133fd6bfe7390ddc357259fdc01da 100644 (file)
@@ -36,9 +36,7 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/pxa-regs.h>
-#include <mach/pxa2xx-regs.h>
-#include <mach/mfp-pxa25x.h>
+#include <mach/pxa25x.h>
 #include <mach/mmc.h>
 #include <mach/udc.h>
 #include <mach/i2c.h>
@@ -503,12 +501,12 @@ static struct platform_device *devices[] __initdata = {
 
 static void poodle_poweroff(void)
 {
-       arm_machine_restart('h');
+       arm_machine_restart('h', NULL);
 }
 
-static void poodle_restart(char mode)
+static void poodle_restart(char mode, const char *cmd)
 {
-       arm_machine_restart('h');
+       arm_machine_restart('h', cmd);
 }
 
 static void __init poodle_init(void)
index 3ca7ffc6904b04ebdb80b74b8408e0ea9f610ab4..fcdd374437a866c5b8fcd0203bac9a95f6ec9d65 100644 (file)
@@ -20,7 +20,6 @@
 #include <linux/pwm.h>
 
 #include <asm/div64.h>
-#include <mach/pxa-regs.h>
 
 /* PWM registers and bits definitions */
 #define PWMCR          (0x00)
index 6c57522e24692c0b2327bf9f63a858077a172e65..77c2693cfeef4c811ea553322a32a3e4086245ea 100644 (file)
@@ -25,9 +25,8 @@
 
 #include <mach/hardware.h>
 #include <mach/irqs.h>
-#include <mach/pxa-regs.h>
-#include <mach/pxa2xx-regs.h>
-#include <mach/mfp-pxa25x.h>
+#include <mach/gpio.h>
+#include <mach/pxa25x.h>
 #include <mach/reset.h>
 #include <mach/pm.h>
 #include <mach/dma.h>
@@ -310,14 +309,14 @@ set_pwer:
 void __init pxa25x_init_irq(void)
 {
        pxa_init_irq(32, pxa25x_set_wake);
-       pxa_init_gpio(85, pxa25x_set_wake);
+       pxa_init_gpio(IRQ_GPIO_2_x, 2, 84, pxa25x_set_wake);
 }
 
 #ifdef CONFIG_CPU_PXA26x
 void __init pxa26x_init_irq(void)
 {
        pxa_init_irq(32, pxa25x_set_wake);
-       pxa_init_gpio(90, pxa25x_set_wake);
+       pxa_init_gpio(IRQ_GPIO_2_x, 2, 89, pxa25x_set_wake);
 }
 #endif
 
@@ -355,7 +354,7 @@ static int __init pxa25x_init(void)
 
                clks_register(pxa25x_clkregs, ARRAY_SIZE(pxa25x_clkregs));
 
-               if ((ret = pxa_init_dma(16)))
+               if ((ret = pxa_init_dma(IRQ_DMA, 16)))
                        return ret;
 
                pxa25x_init_pm();
index 411bec54fdc4b47febc28709c8ffd13b5714b6c0..a425ec71e657cb5bd9ed55beb228bf2523b2b653 100644 (file)
@@ -21,9 +21,8 @@
 #include <mach/hardware.h>
 #include <asm/irq.h>
 #include <mach/irqs.h>
-#include <mach/pxa-regs.h>
-#include <mach/pxa2xx-regs.h>
-#include <mach/mfp-pxa27x.h>
+#include <mach/gpio.h>
+#include <mach/pxa27x.h>
 #include <mach/reset.h>
 #include <mach/ohci.h>
 #include <mach/pm.h>
@@ -332,7 +331,7 @@ static int pxa27x_set_wake(unsigned int irq, unsigned int on)
 void __init pxa27x_init_irq(void)
 {
        pxa_init_irq(34, pxa27x_set_wake);
-       pxa_init_gpio(121, pxa27x_set_wake);
+       pxa_init_gpio(IRQ_GPIO_2_x, 2, 120, pxa27x_set_wake);
 }
 
 /*
@@ -381,7 +380,7 @@ static int __init pxa27x_init(void)
 
                clks_register(pxa27x_clkregs, ARRAY_SIZE(pxa27x_clkregs));
 
-               if ((ret = pxa_init_dma(32)))
+               if ((ret = pxa_init_dma(IRQ_DMA, 32)))
                        return ret;
 
                pxa27x_init_pm();
index 73d04d81c75a2307b245ce27b155e01e5838eea1..2f3394f859173aec39eac5da5fb1eb1afaa09299 100644 (file)
@@ -16,7 +16,6 @@
 
 #include <mach/hardware.h>
 #include <mach/pxa2xx-regs.h>
-#include <mach/mfp-pxa2xx.h>
 #include <mach/mfp-pxa25x.h>
 #include <mach/reset.h>
 #include <mach/irda.h>
index 83fb609b6eb71bef6efc3769cd0f99a1c7634bd1..4ba6d21f851c5bf0d5ef0e00907ef322c48a18f0 100644 (file)
 #include <linux/kernel.h>
 #include <linux/platform_device.h>
 
-#include <mach/hardware.h>
-#include <mach/pxa3xx-regs.h>
-#include <mach/mfp-pxa300.h>
+#include <mach/pxa300.h>
 
 #include "generic.h"
 #include "devices.h"
 #include "clock.h"
 
-static struct pxa3xx_mfp_addr_map pxa300_mfp_addr_map[] __initdata = {
+static struct mfp_addr_map pxa300_mfp_addr_map[] __initdata = {
 
        MFP_ADDR_X(GPIO0,   GPIO2,   0x00b4),
        MFP_ADDR_X(GPIO3,   GPIO26,  0x027c),
@@ -74,7 +72,7 @@ static struct pxa3xx_mfp_addr_map pxa300_mfp_addr_map[] __initdata = {
 };
 
 /* override pxa300 MFP register addresses */
-static struct pxa3xx_mfp_addr_map pxa310_mfp_addr_map[] __initdata = {
+static struct mfp_addr_map pxa310_mfp_addr_map[] __initdata = {
        MFP_ADDR_X(GPIO30,  GPIO98,   0x0418),
        MFP_ADDR_X(GPIO7_2, GPIO12_2, 0x052C),
 
@@ -100,13 +98,13 @@ static struct clk_lookup pxa310_clkregs[] = {
 static int __init pxa300_init(void)
 {
        if (cpu_is_pxa300() || cpu_is_pxa310()) {
-               pxa3xx_init_mfp();
-               pxa3xx_mfp_init_addr(pxa300_mfp_addr_map);
+               mfp_init_base(io_p2v(MFPR_BASE));
+               mfp_init_addr(pxa300_mfp_addr_map);
                clks_register(ARRAY_AND_SIZE(common_clkregs));
        }
 
        if (cpu_is_pxa310()) {
-               pxa3xx_mfp_init_addr(pxa310_mfp_addr_map);
+               mfp_init_addr(pxa310_mfp_addr_map);
                clks_register(ARRAY_AND_SIZE(pxa310_clkregs));
        }
 
index 36f066196fa204ed6d2fce528178943c4bfd6f83..8b3d97efadabf0a2b2aaa53e2feb85bfbbd72875 100644 (file)
 #include <linux/kernel.h>
 #include <linux/platform_device.h>
 
-#include <mach/hardware.h>
-#include <mach/mfp.h>
-#include <mach/pxa3xx-regs.h>
-#include <mach/mfp-pxa320.h>
+#include <mach/pxa320.h>
 
 #include "generic.h"
 #include "devices.h"
 #include "clock.h"
 
-static struct pxa3xx_mfp_addr_map pxa320_mfp_addr_map[] __initdata = {
+static struct mfp_addr_map pxa320_mfp_addr_map[] __initdata = {
 
        MFP_ADDR_X(GPIO0,  GPIO4,   0x0124),
        MFP_ADDR_X(GPIO5,  GPIO9,   0x028C),
@@ -89,8 +86,8 @@ static struct clk_lookup pxa320_clkregs[] = {
 static int __init pxa320_init(void)
 {
        if (cpu_is_pxa320()) {
-               pxa3xx_init_mfp();
-               pxa3xx_mfp_init_addr(pxa320_mfp_addr_map);
+               mfp_init_base(io_p2v(MFPR_BASE));
+               mfp_init_addr(pxa320_mfp_addr_map);
                clks_register(ARRAY_AND_SIZE(pxa320_clkregs));
        }
 
index 490893824e780c028243824500d378fe02c74315..b02d4544dc956d98b065760dbd6975208bc527b8 100644 (file)
@@ -23,6 +23,7 @@
 #include <linux/sysdev.h>
 
 #include <mach/hardware.h>
+#include <mach/gpio.h>
 #include <mach/pxa3xx-regs.h>
 #include <mach/reset.h>
 #include <mach/ohci.h>
@@ -538,7 +539,7 @@ void __init pxa3xx_init_irq(void)
        __asm__ __volatile__("mcr p15, 0, %0, c15, c1, 0\n": :"r"(value));
 
        pxa_init_irq(56, pxa3xx_set_wake);
-       pxa_init_gpio(128, NULL);
+       pxa_init_gpio(IRQ_GPIO_2_x, 2, 127, NULL);
 }
 
 /*
@@ -594,7 +595,7 @@ static int __init pxa3xx_init(void)
 
                clks_register(pxa3xx_clkregs, ARRAY_SIZE(pxa3xx_clkregs));
 
-               if ((ret = pxa_init_dma(32)))
+               if ((ret = pxa_init_dma(IRQ_DMA, 32)))
                        return ret;
 
                pxa3xx_init_pm();
index 13e6bfdfff608dede563238676b39fc2b7d01a34..71131742fffd69e3eff53022e46c53a2e8c94610 100644 (file)
 #include <linux/irq.h>
 #include <linux/dma-mapping.h>
 
-#include <mach/hardware.h>
-#include <mach/mfp-pxa930.h>
+#include <mach/pxa930.h>
 
-static struct pxa3xx_mfp_addr_map pxa930_mfp_addr_map[] __initdata = {
+static struct mfp_addr_map pxa930_mfp_addr_map[] __initdata = {
 
        MFP_ADDR(GPIO0, 0x02e0),
        MFP_ADDR(GPIO1, 0x02dc),
@@ -180,8 +179,8 @@ static struct pxa3xx_mfp_addr_map pxa930_mfp_addr_map[] __initdata = {
 static int __init pxa930_init(void)
 {
        if (cpu_is_pxa930()) {
-               pxa3xx_init_mfp();
-               pxa3xx_mfp_init_addr(pxa930_mfp_addr_map);
+               mfp_init_base(io_p2v(MFPR_BASE));
+               mfp_init_addr(pxa930_mfp_addr_map);
        }
 
        return 0;
index 00b2dc2a10747b5f87d04d02f82d9f74bdd1b356..df29d45fb4e72db6cabbe06332018071fbe1774d 100644 (file)
@@ -10,7 +10,7 @@
 #include <linux/io.h>
 #include <asm/proc-fns.h>
 
-#include <mach/pxa-regs.h>
+#include <mach/regs-ost.h>
 #include <mach/reset.h>
 
 unsigned int reset_status;
@@ -81,7 +81,7 @@ static void do_hw_reset(void)
        OSMR3 = OSCR + 368640;  /* ... in 100 ms */
 }
 
-void arch_reset(char mode)
+void arch_reset(char mode, const char *cmd)
 {
        clear_reset_status(RESET_STATUS_ALL);
 
index 5d02a7325586ab3b778cd8f8275fc9ad3774d218..ff82399914305a69318dce021eab022bb5164396 100644 (file)
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
-#include <mach/hardware.h>
-#include <mach/pxa3xx-regs.h>
-#include <mach/mfp-pxa930.h>
+
+#include <mach/pxa930.h>
 #include <mach/i2c.h>
-#include <mach/regs-lcd.h>
 #include <mach/pxafb.h>
 
 #include "devices.h"
index f0845c1b001c8a94fca44dbb93df2edf621ecbd8..16b4ec67e3b6c03c41ff2b6316dc6613a27738fc 100644 (file)
@@ -25,7 +25,6 @@
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
 #include <mach/pm.h>
-#include <mach/pxa-regs.h>
 #include <mach/pxa2xx-gpio.h>
 #include <mach/sharpsl.h>
 #include "sharpsl.h"
index a62c8375eb5349e2a1b1acce5f0177b613eb4282..2ed95f369cfc9a8ebb357b713f866e20842f3d86 100644 (file)
@@ -15,7 +15,6 @@
 #include <asm/assembler.h>
 #include <mach/hardware.h>
 
-#include <mach/pxa-regs.h>
 #include <mach/pxa2xx-regs.h>
 
 #define MDREFR_KDIV    0x200a4000      // all banks
index 6d447c9ce8abfcadb2743f11330a48ab93d7d125..7a0a430222cfbe8e1ceedab587235e631b23dba1 100644 (file)
@@ -44,9 +44,7 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/pxa-regs.h>
-#include <mach/pxa2xx-regs.h>
-#include <mach/mfp-pxa27x.h>
+#include <mach/pxa27x.h>
 #include <mach/pxa27x-udc.h>
 #include <mach/reset.h>
 #include <mach/i2c.h>
@@ -703,10 +701,10 @@ static struct platform_device *devices[] __initdata = {
 
 static void spitz_poweroff(void)
 {
-       arm_machine_restart('g');
+       arm_machine_restart('g', NULL);
 }
 
-static void spitz_restart(char mode)
+static void spitz_restart(char mode, const char *cmd)
 {
        /* Bootloader magic for a reboot */
        if((MSC0 & 0xffff0000) == 0x7ff00000)
index 072e77cfe5a36ee4002c0b861115e2c0d7c5f8e7..2e4490562c9e85d5a4891c823a9e17d83a78923a 100644 (file)
@@ -24,7 +24,6 @@
 
 #include <mach/sharpsl.h>
 #include <mach/spitz.h>
-#include <mach/pxa-regs.h>
 #include <mach/pxa2xx-regs.h>
 #include <mach/pxa2xx-gpio.h>
 #include "sharpsl.h"
index 6f42004db3ed1fc398108ad35467cda4612838ae..965e38c6bafeb58dce712a18ce8b7a5cc5dd307b 100644 (file)
@@ -33,7 +33,6 @@
 #include <asm/irq.h>
 #include <mach/hardware.h>
 #include <mach/ssp.h>
-#include <mach/pxa-regs.h>
 #include <mach/regs-ssp.h>
 
 #define TIMEOUT 100000
index f3821cfda72f9a1118c1178ff5be866f36a0787b..29f5f5c180b7dbe7ce6dd83488c5e2dcecd41b5c 100644 (file)
@@ -13,7 +13,6 @@
 #include <asm/assembler.h>
 #include <mach/hardware.h>
 
-#include <mach/pxa-regs.h>
 #include <mach/pxa2xx-regs.h>
 
                .text
index 58ef08a5224b566b18331da22d8a04a0d0923973..b75353a2ec75ad5398d7f9e5723731952cf22d86 100644 (file)
@@ -22,9 +22,8 @@
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
-#include <mach/hardware.h>
-#include <mach/pxa3xx-regs.h>
-#include <mach/mfp-pxa930.h>
+
+#include <mach/pxa930.h>
 #include <mach/pxafb.h>
 #include <mach/pxa27x_keypad.h>
 
index 95656a72268dd9f1a1ee7177c4ca5286d9d0a570..8eb3830fbb0b297d77bdd46064cacfe9b3786ab0 100644 (file)
@@ -22,8 +22,7 @@
 #include <asm/div64.h>
 #include <asm/mach/irq.h>
 #include <asm/mach/time.h>
-#include <mach/hardware.h>
-#include <mach/pxa-regs.h>
+#include <mach/regs-ost.h>
 
 /*
  * This is PXA's sched_clock implementation. This has a resolution
index 3332e5d0356c522b7c266995f5f88dd26e02342c..6e8ade6ae33903e34a051e94f80b3343f84c27aa 100644 (file)
@@ -36,8 +36,8 @@
 
 #include <asm/setup.h>
 #include <asm/mach-types.h>
-#include <mach/pxa2xx-regs.h>
-#include <mach/mfp-pxa25x.h>
+
+#include <mach/pxa25x.h>
 #include <mach/reset.h>
 #include <mach/irda.h>
 #include <mach/i2c.h>
@@ -876,10 +876,10 @@ static struct platform_device *devices[] __initdata = {
 
 static void tosa_poweroff(void)
 {
-       arm_machine_restart('g');
+       arm_machine_restart('g', NULL);
 }
 
-static void tosa_restart(char mode)
+static void tosa_restart(char mode, const char *cmd)
 {
        /* Bootloader magic for a reboot */
        if((MSC0 & 0xffff0000) == 0x7ff00000)
@@ -919,7 +919,7 @@ static void __init tosa_init(void)
        pxa2xx_set_spi_info(2, &pxa_ssp_master_info);
        spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
 
-       clk_add_alias("CLK_CK3P6MI", &tc6393xb_device.dev, "GPIO11_CLK", NULL);
+       clk_add_alias("CLK_CK3P6MI", tc6393xb_device.name, "GPIO11_CLK", NULL);
 
        platform_add_devices(devices, ARRAY_SIZE(devices));
 }
index a72e3add743c7d93b644649fe0cd6070ea850901..f79c9cb70ae48c0ce4acc6eb3add778ce4901800 100644 (file)
 #include <asm/mach/irq.h>
 #include <asm/mach/flash.h>
 
-#include <mach/hardware.h>
-#include <mach/pxa-regs.h>
-#include <mach/pxa2xx-regs.h>
-#include <mach/mfp-pxa27x.h>
+#include <mach/pxa27x.h>
 #include <mach/pxa2xx_spi.h>
 #include <mach/trizeps4.h>
 #include <mach/audio.h>
index 4b3120dbc049946b75f05b94b8f6479ca40ecdd9..0e65344e9f53d412b667524a7005bad6f362b8c8 100644 (file)
 #include <linux/mtd/partitions.h>
 #include <linux/mtd/physmap.h>
 
-#include <mach/pxa-regs.h>
-#include <mach/pxa2xx-regs.h>
-#include <mach/bitfield.h>
+#include <mach/pxa25x.h>
 #include <mach/audio.h>
 #include <mach/pxafb.h>
-#include <mach/mfp-pxa25x.h>
 #include <mach/i2c.h>
 #include <mach/viper.h>
 
@@ -956,7 +953,7 @@ static struct map_desc viper_io_desc[] __initdata = {
        },
        {
                .virtual = VIPER_PC104IO_BASE,
-               .pfn     = __phys_to_pfn(_PCMCIA1IO),
+               .pfn     = __phys_to_pfn(0x30000000),
                .length  = 0x00800000,
                .type    = MT_DEVICE,
        },
index 46538885a58aad46e5a2d0543d582971eee89cf1..c1f73205d07823578b26d2eb20dda31d20284d24 100644 (file)
@@ -18,9 +18,9 @@
 #include <linux/init.h>
 #include <linux/i2c.h>
 #include <linux/i2c/pca953x.h>
+#include <linux/gpio.h>
 
-#include <asm/gpio.h>
-#include <mach/mfp-pxa300.h>
+#include <mach/pxa300.h>
 #include <mach/i2c.h>
 #include <mach/zylonite.h>
 
index 28e4e623780be2342ab0a65af4ee1fe74b18f650..4e1c488c6906b6f34a2429a5b663d7e670c834a3 100644 (file)
@@ -18,7 +18,7 @@
 #include <linux/init.h>
 #include <linux/gpio.h>
 
-#include <mach/mfp-pxa320.h>
+#include <mach/pxa320.h>
 #include <mach/zylonite.h>
 
 #include "generic.h"
index ad911854eb4cfd51558e9666db9359205b132674..b6ec106277762dbf71fdccc95d943750e4a5792f 100644 (file)
@@ -35,6 +35,7 @@ config MACH_REALVIEW_PB11MP
        bool "Support RealView/PB11MPCore platform"
        select CPU_V6
        select ARM_GIC
+       select HAVE_PATA_PLATFORM
        help
          Include support for the ARM(R) RealView MPCore Platform Baseboard.
          PB11MPCore is a platform with an on-board ARM11MPCore and has
@@ -51,6 +52,7 @@ config MACH_REALVIEW_PBA8
        bool "Support RealView/PB-A8 platform"
        select CPU_V7
        select ARM_GIC
+       select HAVE_PATA_PLATFORM
        help
          Include support for the ARM(R) RealView Cortex-A8 Platform Baseboard.
          PB-A8 is a platform with an on-board Cortex-A8 and has support for
index bd2aa4f16141d72895e655f63efe75cf6ffcd298..d6766685cfc7d1b9e1c2eb95d94cdfbbc9798aca 100644 (file)
@@ -29,6 +29,7 @@
 #include <linux/clockchips.h>
 #include <linux/io.h>
 #include <linux/smc911x.h>
+#include <linux/ata_platform.h>
 
 #include <asm/clkdev.h>
 #include <asm/system.h>
@@ -150,6 +151,44 @@ int realview_eth_register(const char *name, struct resource *res)
        return platform_device_register(&realview_eth_device);
 }
 
+struct platform_device realview_usb_device = {
+       .name                   = "isp1760",
+       .num_resources          = 2,
+};
+
+int realview_usb_register(struct resource *res)
+{
+       realview_usb_device.resource = res;
+       return platform_device_register(&realview_usb_device);
+}
+
+static struct pata_platform_info pata_platform_data = {
+       .ioport_shift           = 1,
+};
+
+static struct resource pata_resources[] = {
+       [0] = {
+               .start          = REALVIEW_CF_BASE,
+               .end            = REALVIEW_CF_BASE + 0xff,
+               .flags          = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start          = REALVIEW_CF_BASE + 0x100,
+               .end            = REALVIEW_CF_BASE + SZ_4K - 1,
+               .flags          = IORESOURCE_MEM,
+       },
+};
+
+struct platform_device realview_cf_device = {
+       .name                   = "pata_platform",
+       .id                     = -1,
+       .num_resources          = ARRAY_SIZE(pata_resources),
+       .resource               = pata_resources,
+       .dev                    = {
+               .platform_data  = &pata_platform_data,
+       },
+};
+
 static struct resource realview_i2c_resource = {
        .start          = REALVIEW_I2C_BASE,
        .end            = REALVIEW_I2C_BASE + SZ_4K - 1,
@@ -158,11 +197,25 @@ static struct resource realview_i2c_resource = {
 
 struct platform_device realview_i2c_device = {
        .name           = "versatile-i2c",
-       .id             = -1,
+       .id             = 0,
        .num_resources  = 1,
        .resource       = &realview_i2c_resource,
 };
 
+static struct i2c_board_info realview_i2c_board_info[] = {
+       {
+               I2C_BOARD_INFO("rtc-ds1307", 0xd0 >> 1),
+               .type = "ds1338",
+       },
+};
+
+static int __init realview_i2c_init(void)
+{
+       return i2c_register_board_info(0, realview_i2c_board_info,
+                                      ARRAY_SIZE(realview_i2c_board_info));
+}
+arch_initcall(realview_i2c_init);
+
 #define REALVIEW_SYSMCI        (__io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_MCI_OFFSET)
 
 static unsigned int realview_mmc_status(struct device *dev)
index 44269b162d4918e468542ab58a3627cda43c014d..21c08637683b72ca1105e469e582b8c8230bd9c2 100644 (file)
@@ -45,6 +45,7 @@ static struct amba_device name##_device = {                   \
 }
 
 extern struct platform_device realview_flash_device;
+extern struct platform_device realview_cf_device;
 extern struct platform_device realview_i2c_device;
 extern struct mmc_platform_data realview_mmc0_plat_data;
 extern struct mmc_platform_data realview_mmc1_plat_data;
@@ -62,5 +63,6 @@ extern void realview_leds_event(led_event_t ledevt);
 extern void realview_timer_init(unsigned int timer_irq);
 extern int realview_flash_register(struct resource *res, u32 num);
 extern int realview_eth_register(const char *name, struct resource *res);
+extern int realview_usb_register(struct resource *res);
 
 #endif
index c8bed8f58bab403b6eae9b61960002f51dc74f54..307f97b16e5b85425c9cd6a300200537035a3973 100644 (file)
@@ -45,8 +45,6 @@
 #define REALVIEW_PBA8_DMC_BASE                 0x100E0000      /* DMC configuration */
 #define REALVIEW_PBA8_SMC_BASE                 0x100E1000      /* SMC configuration */
 #define REALVIEW_PBA8_CAN_BASE                 0x100E2000      /* CAN bus */
-#define REALVIEW_PBA8_CF_BASE                  0x18000000      /* Compact flash */
-#define REALVIEW_PBA8_CF_MEM_BASE              0x18003000      /* SMC for Compact flash */
 #define REALVIEW_PBA8_GIC_CPU_BASE             0x1E000000      /* Generic interrupt controller CPU interface */
 #define REALVIEW_PBA8_FLASH0_BASE              0x40000000
 #define REALVIEW_PBA8_FLASH0_SIZE              SZ_64M
index 793a3a3327121152072645828237c9d3f17c9e8d..c8f50835fed2fcd69f76cdfb98fe6749411b2541 100644 (file)
 #define REALVIEW_SDRAM67_BASE         0x70000000       /* SDRAM banks 6 and 7 */
 #define REALVIEW_LT_BASE              0x80000000       /* Logic Tile expansion */
 
+/*
+ * CompactFlash
+ */
+#define REALVIEW_CF_BASE               0x18000000      /* CompactFlash */
+#define REALVIEW_CF_MEM_BASE           0x18003000      /* SMC for CompactFlash */
+
 /*
  * Disk on Chip
  */
index a2f61c78adbf26cadb3ce184c4eb927edba53b32..1a15a441e027550e9503a662592c8015544992c7 100644 (file)
@@ -34,7 +34,7 @@ static inline void arch_idle(void)
        cpu_do_idle();
 }
 
-static inline void arch_reset(char mode)
+static inline void arch_reset(char mode, const char *cmd)
 {
        void __iomem *hdr_ctrl = __io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_RESETCTL_OFFSET;
        unsigned int val;
index bed39ed976133628be7755cc0e63f395628637dc..c20fbef122b38af693f2f56e9f82aadba87de8b7 100644 (file)
@@ -264,6 +264,19 @@ static int eth_device_register(void)
        return realview_eth_register(name, realview_eb_eth_resources);
 }
 
+static struct resource realview_eb_isp1761_resources[] = {
+       [0] = {
+               .start          = REALVIEW_EB_USB_BASE,
+               .end            = REALVIEW_EB_USB_BASE + SZ_128K - 1,
+               .flags          = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start          = IRQ_EB_USB,
+               .end            = IRQ_EB_USB,
+               .flags          = IORESOURCE_IRQ,
+       },
+};
+
 static void __init gic_init_irq(void)
 {
        if (core_tile_eb11mp() || core_tile_a9mp()) {
@@ -323,6 +336,8 @@ static void realview_eb11mp_fixup(void)
        /* platform devices */
        realview_eb_eth_resources[1].start      = IRQ_EB11MP_ETH;
        realview_eb_eth_resources[1].end        = IRQ_EB11MP_ETH;
+       realview_eb_isp1761_resources[1].start  = IRQ_EB11MP_USB;
+       realview_eb_isp1761_resources[1].end    = IRQ_EB11MP_USB;
 }
 
 static void __init realview_eb_timer_init(void)
@@ -366,6 +381,7 @@ static void __init realview_eb_init(void)
        realview_flash_register(&realview_eb_flash_resource, 1);
        platform_device_register(&realview_i2c_device);
        eth_device_register();
+       realview_usb_register(realview_eb_isp1761_resources);
 
        for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
                struct amba_device *d = amba_devs[i];
index 8f0683c22140fdced876f5e72c696151faec4ca4..a64b84a7a3df96b65a237a9566dbbf78bbf46610 100644 (file)
@@ -222,6 +222,19 @@ static struct resource realview_pb1176_smsc911x_resources[] = {
        },
 };
 
+static struct resource realview_pb1176_isp1761_resources[] = {
+       [0] = {
+               .start          = REALVIEW_PB1176_USB_BASE,
+               .end            = REALVIEW_PB1176_USB_BASE + SZ_128K - 1,
+               .flags          = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start          = IRQ_PB1176_USB,
+               .end            = IRQ_PB1176_USB,
+               .flags          = IORESOURCE_IRQ,
+       },
+};
+
 static void __init gic_init_irq(void)
 {
        /* ARM1176 DevChip GIC, primary */
@@ -260,6 +273,8 @@ static void __init realview_pb1176_init(void)
 
        realview_flash_register(&realview_pb1176_flash_resource, 1);
        realview_eth_register(NULL, realview_pb1176_smsc911x_resources);
+       platform_device_register(&realview_i2c_device);
+       realview_usb_register(realview_pb1176_isp1761_resources);
 
        for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
                struct amba_device *d = amba_devs[i];
index 3ebdb2dadd6f02c2430fc657a8fc9e51b81d85cb..ea1e60eca359efa14baf707502487b5df8e371c6 100644 (file)
@@ -230,31 +230,19 @@ static struct resource realview_pb11mp_smsc911x_resources[] = {
        },
 };
 
-struct resource realview_pb11mp_cf_resources[] = {
+static struct resource realview_pb11mp_isp1761_resources[] = {
        [0] = {
-               .start          = REALVIEW_PB11MP_CF_BASE,
-               .end            = REALVIEW_PB11MP_CF_BASE + SZ_4K - 1,
+               .start          = REALVIEW_PB11MP_USB_BASE,
+               .end            = REALVIEW_PB11MP_USB_BASE + SZ_128K - 1,
                .flags          = IORESOURCE_MEM,
        },
        [1] = {
-               .start          = REALVIEW_PB11MP_CF_MEM_BASE,
-               .end            = REALVIEW_PB11MP_CF_MEM_BASE + SZ_4K - 1,
-               .flags          = IORESOURCE_MEM,
-       },
-       [2] = {
-               .start          = -1,           /* FIXME: Find correct irq */
-               .end            = -1,
+               .start          = IRQ_TC11MP_USB,
+               .end            = IRQ_TC11MP_USB,
                .flags          = IORESOURCE_IRQ,
        },
 };
 
-struct platform_device realview_pb11mp_cf_device = {
-       .name           = "compactflash",
-       .id             = 0,
-       .num_resources  = ARRAY_SIZE(realview_pb11mp_cf_resources),
-       .resource       = realview_pb11mp_cf_resources,
-};
-
 static void __init gic_init_irq(void)
 {
        unsigned int pldctrl;
@@ -308,7 +296,8 @@ static void __init realview_pb11mp_init(void)
                                ARRAY_SIZE(realview_pb11mp_flash_resource));
        realview_eth_register(NULL, realview_pb11mp_smsc911x_resources);
        platform_device_register(&realview_i2c_device);
-       platform_device_register(&realview_pb11mp_cf_device);
+       platform_device_register(&realview_cf_device);
+       realview_usb_register(realview_pb11mp_isp1761_resources);
 
        for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
                struct amba_device *d = amba_devs[i];
index 34c94435d2d83c716a532dcd0b03c3ba342c5155..d6ac1eb86576c36f8e8dcb13fd6f385b7432131a 100644 (file)
@@ -221,31 +221,19 @@ static struct resource realview_pba8_smsc911x_resources[] = {
        },
 };
 
-struct resource realview_pba8_cf_resources[] = {
+static struct resource realview_pba8_isp1761_resources[] = {
        [0] = {
-               .start          = REALVIEW_PBA8_CF_BASE,
-               .end            = REALVIEW_PBA8_CF_BASE + SZ_4K - 1,
+               .start          = REALVIEW_PBA8_USB_BASE,
+               .end            = REALVIEW_PBA8_USB_BASE + SZ_128K - 1,
                .flags          = IORESOURCE_MEM,
        },
        [1] = {
-               .start          = REALVIEW_PBA8_CF_MEM_BASE,
-               .end            = REALVIEW_PBA8_CF_MEM_BASE + SZ_4K - 1,
-               .flags          = IORESOURCE_MEM,
-       },
-       [2] = {
-               .start          = -1,           /* FIXME: Find correct irq */
-               .end            = -1,
+               .start          = IRQ_PBA8_USB,
+               .end            = IRQ_PBA8_USB,
                .flags          = IORESOURCE_IRQ,
        },
 };
 
-struct platform_device realview_pba8_cf_device = {
-       .name           = "compactflash",
-       .id             = 0,
-       .num_resources  = ARRAY_SIZE(realview_pba8_cf_resources),
-       .resource       = realview_pba8_cf_resources,
-};
-
 static void __init gic_init_irq(void)
 {
        /* ARM PB-A8 on-board GIC */
@@ -276,7 +264,8 @@ static void __init realview_pba8_init(void)
                                ARRAY_SIZE(realview_pba8_flash_resource));
        realview_eth_register(NULL, realview_pba8_smsc911x_resources);
        platform_device_register(&realview_i2c_device);
-       platform_device_register(&realview_pba8_cf_device);
+       platform_device_register(&realview_cf_device);
+       realview_usb_register(realview_pba8_isp1761_resources);
 
        for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
                struct amba_device *d = amba_devs[i];
index 7958a30f8932a5a418149ccd857f805b1f56af47..c47d974d52bdacbe5fddcc40b9a630c2f5a914f0 100644 (file)
 #include <asm/mach/dma.h>
 #include <asm/hardware/iomd.h>
 
+struct iomd_dma {
+       struct dma_struct       dma;
+       unsigned int            state;
+       unsigned long           base;           /* Controller base address */
+       int                     irq;            /* Controller IRQ */
+       struct scatterlist      cur_sg;         /* Current controller buffer */
+       dma_addr_t              dma_addr;
+       unsigned int            dma_len;
+};
+
 #if 0
 typedef enum {
        dma_size_8      = 1,
@@ -44,15 +54,15 @@ typedef enum {
 #define CR     (IOMD_IO0CR - IOMD_IO0CURA)
 #define ST     (IOMD_IO0ST - IOMD_IO0CURA)
 
-static void iomd_get_next_sg(struct scatterlist *sg, dma_t *dma)
+static void iomd_get_next_sg(struct scatterlist *sg, struct iomd_dma *idma)
 {
        unsigned long end, offset, flags = 0;
 
-       if (dma->sg) {
-               sg->dma_address = dma->sg->dma_address;
+       if (idma->dma.sg) {
+               sg->dma_address = idma->dma_addr;
                offset = sg->dma_address & ~PAGE_MASK;
 
-               end = offset + dma->sg->length;
+               end = offset + idma->dma_len;
 
                if (end > PAGE_SIZE)
                        end = PAGE_SIZE;
@@ -62,15 +72,17 @@ static void iomd_get_next_sg(struct scatterlist *sg, dma_t *dma)
 
                sg->length = end - TRANSFER_SIZE;
 
-               dma->sg->length -= end - offset;
-               dma->sg->dma_address += end - offset;
+               idma->dma_len -= end - offset;
+               idma->dma_addr += end - offset;
 
-               if (dma->sg->length == 0) {
-                       if (dma->sgcount > 1) {
-                               dma->sg++;
-                               dma->sgcount--;
+               if (idma->dma_len == 0) {
+                       if (idma->dma.sgcount > 1) {
+                               idma->dma.sg = sg_next(idma->dma.sg);
+                               idma->dma_addr = idma->dma.sg->dma_address;
+                               idma->dma_len = idma->dma.sg->length;
+                               idma->dma.sgcount--;
                        } else {
-                               dma->sg = NULL;
+                               idma->dma.sg = NULL;
                                flags |= DMA_END_S;
                        }
                }
@@ -85,8 +97,8 @@ static void iomd_get_next_sg(struct scatterlist *sg, dma_t *dma)
 
 static irqreturn_t iomd_dma_handle(int irq, void *dev_id)
 {
-       dma_t *dma = (dma_t *)dev_id;
-       unsigned long base = dma->dma_base;
+       struct iomd_dma *idma = dev_id;
+       unsigned long base = idma->base;
 
        do {
                unsigned int status;
@@ -95,93 +107,99 @@ static irqreturn_t iomd_dma_handle(int irq, void *dev_id)
                if (!(status & DMA_ST_INT))
                        return IRQ_HANDLED;
 
-               if ((dma->state ^ status) & DMA_ST_AB)
-                       iomd_get_next_sg(&dma->cur_sg, dma);
+               if ((idma->state ^ status) & DMA_ST_AB)
+                       iomd_get_next_sg(&idma->cur_sg, idma);
 
                switch (status & (DMA_ST_OFL | DMA_ST_AB)) {
                case DMA_ST_OFL:                        /* OIA */
                case DMA_ST_AB:                         /* .IB */
-                       iomd_writel(dma->cur_sg.dma_address, base + CURA);
-                       iomd_writel(dma->cur_sg.length, base + ENDA);
-                       dma->state = DMA_ST_AB;
+                       iomd_writel(idma->cur_sg.dma_address, base + CURA);
+                       iomd_writel(idma->cur_sg.length, base + ENDA);
+                       idma->state = DMA_ST_AB;
                        break;
 
                case DMA_ST_OFL | DMA_ST_AB:            /* OIB */
                case 0:                                 /* .IA */
-                       iomd_writel(dma->cur_sg.dma_address, base + CURB);
-                       iomd_writel(dma->cur_sg.length, base + ENDB);
-                       dma->state = 0;
+                       iomd_writel(idma->cur_sg.dma_address, base + CURB);
+                       iomd_writel(idma->cur_sg.length, base + ENDB);
+                       idma->state = 0;
                        break;
                }
 
                if (status & DMA_ST_OFL &&
-                   dma->cur_sg.length == (DMA_END_S|DMA_END_L))
+                   idma->cur_sg.length == (DMA_END_S|DMA_END_L))
                        break;
        } while (1);
 
-       dma->state = ~DMA_ST_AB;
+       idma->state = ~DMA_ST_AB;
        disable_irq(irq);
 
        return IRQ_HANDLED;
 }
 
-static int iomd_request_dma(dmach_t channel, dma_t *dma)
+static int iomd_request_dma(unsigned int chan, dma_t *dma)
 {
-       return request_irq(dma->dma_irq, iomd_dma_handle,
-                          IRQF_DISABLED, dma->device_id, dma);
+       struct iomd_dma *idma = container_of(dma, struct iomd_dma, dma);
+
+       return request_irq(idma->irq, iomd_dma_handle,
+                          IRQF_DISABLED, idma->dma.device_id, idma);
 }
 
-static void iomd_free_dma(dmach_t channel, dma_t *dma)
+static void iomd_free_dma(unsigned int chan, dma_t *dma)
 {
-       free_irq(dma->dma_irq, dma);
+       struct iomd_dma *idma = container_of(dma, struct iomd_dma, dma);
+
+       free_irq(idma->irq, idma);
 }
 
-static void iomd_enable_dma(dmach_t channel, dma_t *dma)
+static void iomd_enable_dma(unsigned int chan, dma_t *dma)
 {
-       unsigned long dma_base = dma->dma_base;
+       struct iomd_dma *idma = container_of(dma, struct iomd_dma, dma);
+       unsigned long dma_base = idma->base;
        unsigned int ctrl = TRANSFER_SIZE | DMA_CR_E;
 
-       if (dma->invalid) {
-               dma->invalid = 0;
+       if (idma->dma.invalid) {
+               idma->dma.invalid = 0;
 
                /*
                 * Cope with ISA-style drivers which expect cache
                 * coherence.
                 */
-               if (!dma->sg) {
-                       dma->sg = &dma->buf;
-                       dma->sgcount = 1;
-                       dma->buf.length = dma->count;
-                       dma->buf.dma_address = dma_map_single(NULL,
-                               dma->addr, dma->count,
-                               dma->dma_mode == DMA_MODE_READ ?
+               if (!idma->dma.sg) {
+                       idma->dma.sg = &idma->dma.buf;
+                       idma->dma.sgcount = 1;
+                       idma->dma.buf.length = idma->dma.count;
+                       idma->dma.buf.dma_address = dma_map_single(NULL,
+                               idma->dma.addr, idma->dma.count,
+                               idma->dma.dma_mode == DMA_MODE_READ ?
                                DMA_FROM_DEVICE : DMA_TO_DEVICE);
                }
 
                iomd_writeb(DMA_CR_C, dma_base + CR);
-               dma->state = DMA_ST_AB;
+               idma->state = DMA_ST_AB;
        }
-               
-       if (dma->dma_mode == DMA_MODE_READ)
+
+       if (idma->dma.dma_mode == DMA_MODE_READ)
                ctrl |= DMA_CR_D;
 
        iomd_writeb(ctrl, dma_base + CR);
-       enable_irq(dma->dma_irq);
+       enable_irq(idma->irq);
 }
 
-static void iomd_disable_dma(dmach_t channel, dma_t *dma)
+static void iomd_disable_dma(unsigned int chan, dma_t *dma)
 {
-       unsigned long dma_base = dma->dma_base;
+       struct iomd_dma *idma = container_of(dma, struct iomd_dma, dma);
+       unsigned long dma_base = idma->base;
        unsigned long flags;
 
        local_irq_save(flags);
-       if (dma->state != ~DMA_ST_AB)
-               disable_irq(dma->dma_irq);
+       if (idma->state != ~DMA_ST_AB)
+               disable_irq(idma->irq);
        iomd_writeb(0, dma_base + CR);
        local_irq_restore(flags);
 }
 
-static int iomd_set_dma_speed(dmach_t channel, dma_t *dma, int cycle)
+static int iomd_set_dma_speed(unsigned int chan, dma_t *dma, int cycle)
 {
        int tcr, speed;
 
@@ -197,7 +215,7 @@ static int iomd_set_dma_speed(dmach_t channel, dma_t *dma, int cycle)
        tcr = iomd_readb(IOMD_DMATCR);
        speed &= 3;
 
-       switch (channel) {
+       switch (chan) {
        case DMA_0:
                tcr = (tcr & ~0x03) | speed;
                break;
@@ -236,16 +254,22 @@ static struct fiq_handler fh = {
        .name   = "floppydma"
 };
 
-static void floppy_enable_dma(dmach_t channel, dma_t *dma)
+struct floppy_dma {
+       struct dma_struct       dma;
+       unsigned int            fiq;
+};
+
+static void floppy_enable_dma(unsigned int chan, dma_t *dma)
 {
+       struct floppy_dma *fdma = container_of(dma, struct floppy_dma, dma);
        void *fiqhandler_start;
        unsigned int fiqhandler_length;
        struct pt_regs regs;
 
-       if (dma->sg)
+       if (fdma->dma.sg)
                BUG();
 
-       if (dma->dma_mode == DMA_MODE_READ) {
+       if (fdma->dma.dma_mode == DMA_MODE_READ) {
                extern unsigned char floppy_fiqin_start, floppy_fiqin_end;
                fiqhandler_start = &floppy_fiqin_start;
                fiqhandler_length = &floppy_fiqin_end - &floppy_fiqin_start;
@@ -255,8 +279,8 @@ static void floppy_enable_dma(dmach_t channel, dma_t *dma)
                fiqhandler_length = &floppy_fiqout_end - &floppy_fiqout_start;
        }
 
-       regs.ARM_r9  = dma->count;
-       regs.ARM_r10 = (unsigned long)dma->addr;
+       regs.ARM_r9  = fdma->dma.count;
+       regs.ARM_r10 = (unsigned long)fdma->dma.addr;
        regs.ARM_fp  = (unsigned long)FLOPPYDMA_BASE;
 
        if (claim_fiq(&fh)) {
@@ -266,16 +290,17 @@ static void floppy_enable_dma(dmach_t channel, dma_t *dma)
 
        set_fiq_handler(fiqhandler_start, fiqhandler_length);
        set_fiq_regs(&regs);
-       enable_fiq(dma->dma_irq);
+       enable_fiq(fdma->fiq);
 }
 
-static void floppy_disable_dma(dmach_t channel, dma_t *dma)
+static void floppy_disable_dma(unsigned int chan, dma_t *dma)
 {
-       disable_fiq(dma->dma_irq);
+       struct floppy_dma *fdma = container_of(dma, struct floppy_dma, dma);
+       disable_fiq(fdma->fiq);
        release_fiq(&fh);
 }
 
-static int floppy_get_residue(dmach_t channel, dma_t *dma)
+static int floppy_get_residue(unsigned int chan, dma_t *dma)
 {
        struct pt_regs regs;
        get_fiq_regs(&regs);
@@ -292,7 +317,7 @@ static struct dma_ops floppy_dma_ops = {
 /*
  * This is virtual DMA - we don't need anything here.
  */
-static void sound_enable_disable_dma(dmach_t channel, dma_t *dma)
+static void sound_enable_disable_dma(unsigned int chan, dma_t *dma)
 {
 }
 
@@ -302,8 +327,24 @@ static struct dma_ops sound_dma_ops = {
        .disable        = sound_enable_disable_dma,
 };
 
-void __init arch_dma_init(dma_t *dma)
+static struct iomd_dma iomd_dma[6];
+
+static struct floppy_dma floppy_dma = {
+       .dma            = {
+               .d_ops  = &floppy_dma_ops,
+       },
+       .fiq            = FIQ_FLOPPYDATA,
+};
+
+static dma_t sound_dma = {
+       .d_ops          = &sound_dma_ops,
+};
+
+static int __init rpc_dma_init(void)
 {
+       unsigned int i;
+       int ret;
+
        iomd_writeb(0, IOMD_IO0CR);
        iomd_writeb(0, IOMD_IO1CR);
        iomd_writeb(0, IOMD_IO2CR);
@@ -311,31 +352,39 @@ void __init arch_dma_init(dma_t *dma)
 
        iomd_writeb(0xa0, IOMD_DMATCR);
 
-       dma[DMA_0].dma_base             = IOMD_IO0CURA;
-       dma[DMA_0].dma_irq              = IRQ_DMA0;
-       dma[DMA_0].d_ops                = &iomd_dma_ops;
-       dma[DMA_1].dma_base             = IOMD_IO1CURA;
-       dma[DMA_1].dma_irq              = IRQ_DMA1;
-       dma[DMA_1].d_ops                = &iomd_dma_ops;
-       dma[DMA_2].dma_base             = IOMD_IO2CURA;
-       dma[DMA_2].dma_irq              = IRQ_DMA2;
-       dma[DMA_2].d_ops                = &iomd_dma_ops;
-       dma[DMA_3].dma_base             = IOMD_IO3CURA;
-       dma[DMA_3].dma_irq              = IRQ_DMA3;
-       dma[DMA_3].d_ops                = &iomd_dma_ops;
-       dma[DMA_S0].dma_base            = IOMD_SD0CURA;
-       dma[DMA_S0].dma_irq             = IRQ_DMAS0;
-       dma[DMA_S0].d_ops               = &iomd_dma_ops;
-       dma[DMA_S1].dma_base            = IOMD_SD1CURA;
-       dma[DMA_S1].dma_irq             = IRQ_DMAS1;
-       dma[DMA_S1].d_ops               = &iomd_dma_ops;
-       dma[DMA_VIRTUAL_FLOPPY].dma_irq = FIQ_FLOPPYDATA;
-       dma[DMA_VIRTUAL_FLOPPY].d_ops   = &floppy_dma_ops;
-       dma[DMA_VIRTUAL_SOUND].d_ops    = &sound_dma_ops;
-
        /*
         * Setup DMA channels 2,3 to be for podules
         * and channels 0,1 for internal devices
         */
        iomd_writeb(DMA_EXT_IO3|DMA_EXT_IO2, IOMD_DMAEXT);
+
+       iomd_dma[DMA_0].base    = IOMD_IO0CURA;
+       iomd_dma[DMA_0].irq     = IRQ_DMA0;
+       iomd_dma[DMA_1].base    = IOMD_IO1CURA;
+       iomd_dma[DMA_1].irq     = IRQ_DMA1;
+       iomd_dma[DMA_2].base    = IOMD_IO2CURA;
+       iomd_dma[DMA_2].irq     = IRQ_DMA2;
+       iomd_dma[DMA_3].base    = IOMD_IO3CURA;
+       iomd_dma[DMA_3].irq     = IRQ_DMA3;
+       iomd_dma[DMA_S0].base   = IOMD_SD0CURA;
+       iomd_dma[DMA_S0].irq    = IRQ_DMAS0;
+       iomd_dma[DMA_S1].base   = IOMD_SD1CURA;
+       iomd_dma[DMA_S1].irq    = IRQ_DMAS1;
+
+       for (i = DMA_0; i <= DMA_S1; i++) {
+               iomd_dma[i].dma.d_ops = &iomd_dma_ops;
+
+               ret = isa_dma_add(i, &iomd_dma[i].dma);
+               if (ret)
+                       printk("IOMDDMA%u: unable to register: %d\n", i, ret);
+       }
+
+       ret = isa_dma_add(DMA_VIRTUAL_FLOPPY, &floppy_dma.dma);
+       if (ret)
+               printk("IOMDFLOPPY: unable to register: %d\n", ret);
+       ret = isa_dma_add(DMA_VIRTUAL_SOUND, &sound_dma);
+       if (ret)
+               printk("IOMDSOUND: unable to register: %d\n", ret);
+       return 0;
 }
+core_initcall(rpc_dma_init);
index bad720548587e1b1722f3b8fa1b7071d0cb6f2de..67bfc6719c3470330ba728bd9125fc0d39a4e57a 100644 (file)
@@ -23,5 +23,7 @@
 
 #define DMA_FLOPPY             DMA_VIRTUAL_FLOPPY
 
+#define IOMD_DMA_BOUNDARY      (PAGE_SIZE - 1)
+
 #endif /* _ASM_ARCH_DMA_H */
 
index bd7268ba17e2345dc0cba728523f063810bff637..45c7b935dc45b768aea310c398411a22ed4e1e02 100644 (file)
@@ -16,7 +16,7 @@ static inline void arch_idle(void)
        cpu_do_idle();
 }
 
-static inline void arch_reset(char mode)
+static inline void arch_reset(char mode, const char *cmd)
 {
        iomd_writeb(0, IOMD_ROMCR0);
 
index 7613d0a384ba23d47cd054562e8aa50b66dfff9d..b8687f71c30479c90400e2a36a4c51086c591007 100644 (file)
@@ -22,7 +22,7 @@
 extern void (*s3c24xx_reset_hook)(void);
 
 static void
-arch_reset(char mode)
+arch_reset(char mode, const char *cmd)
 {
        struct clk *wdtclk;
 
index 652bbc403f0bbd159476df39039ff4081caae5a3..090cfd969bc7f4b572e54a722064d83baa9fd2fa 100644 (file)
@@ -16,7 +16,7 @@ static void arch_idle(void)
        /* nothing here yet */
 }
 
-static void arch_reset(char mode)
+static void arch_reset(char mode, const char *cmd)
 {
        /* nothing here yet */
 }
index f99d9013905fea6ecaad0fd36c965696b5145fe1..81ffff7ed498a1633dac73b69b088d5a3e64acc1 100644 (file)
@@ -71,19 +71,9 @@ config SA1100_H3600
          <http://www.handhelds.org/Compaq/index.html#iPAQ_H3600>
          <http://www.compaq.com/products/handhelds/pocketpc/>
 
-config SA1100_H3800
-       bool "Compaq iPAQ H3800"
-       help
-         Say Y here if you intend to run this kernel on the Compaq iPAQ H3800
-         series handheld computer.  Information about this machine and the
-         Linux port to this machine can be found at:
-
-         <http://www.handhelds.org/Compaq/index.html#iPAQ_H3800>
-         <http://www.compaq.com/products/handhelds/pocketpc/>
-
 config SA1100_H3XXX
        bool
-       depends on SA1100_H3100 || SA1100_H3600 || SA1100_H3800
+       depends on SA1100_H3100 || SA1100_H3600
        default y
 
 config SA1100_BADGE4
@@ -157,15 +147,6 @@ config SA1100_SSP
          This isn't for audio support, but for attached sensors and
          other devices, eg for BadgePAD 4 sensor support.
 
-config H3600_SLEEVE
-       tristate "Compaq iPAQ Handheld sleeve support"
-       depends on SA1100_H3100 || SA1100_H3600
-       help
-         Choose this option to enable support for extension packs (sleeves)
-         for the Compaq iPAQ H3XXX series of handheld computers.  This option
-         is required for the CF, PCMCIA, Bluetooth and GSM/GPRS extension
-         packs.
-
 endmenu
 
 endif
index af25a78d705d677e6d58e8dfa2223f3aeda35d8c..0eb2f159578b639d56e7cddaeea9ffd033a213d8 100644 (file)
 #include <asm/mach/serial_sa1100.h>
 
 #include <mach/h3600.h>
-
-#if defined (CONFIG_SA1100_H3600) || defined (CONFIG_SA1100_H3100)
 #include <mach/h3600_gpio.h>
-#endif
-
-#ifdef CONFIG_SA1100_H3800
-#include <mach/h3600_asic.h>
-#endif
 
 #include "generic.h"
 
-struct ipaq_model_ops ipaq_model_ops;
-EXPORT_SYMBOL(ipaq_model_ops);
+void (*assign_h3600_egpio)(enum ipaq_egpio_type x, int level);
+EXPORT_SYMBOL(assign_h3600_egpio);
 
 static struct mtd_partition h3xxx_partitions[] = {
        {
@@ -63,41 +56,9 @@ static struct mtd_partition h3xxx_partitions[] = {
                .offset         = 0,
                .mask_flags     = MTD_WRITEABLE,  /* force read-only */
        }, {
-#ifdef CONFIG_MTD_2PARTS_IPAQ
-               .name           = "H3XXX root jffs2",
+               .name           = "H3XXX rootfs",
                .size           = MTDPART_SIZ_FULL,
                .offset         = 0x00040000,
-#else
-               .name           = "H3XXX kernel",
-               .size           = 0x00080000,
-               .offset         = 0x00040000,
-       }, {
-               .name           = "H3XXX params",
-               .size           = 0x00040000,
-               .offset         = 0x000C0000,
-       }, {
-#ifdef CONFIG_JFFS2_FS
-               .name           = "H3XXX root jffs2",
-               .size           = MTDPART_SIZ_FULL,
-               .offset         = 0x00100000,
-#else
-               .name           = "H3XXX initrd",
-               .size           = 0x00100000,
-               .offset         = 0x00100000,
-       }, {
-               .name           = "H3XXX root cramfs",
-               .size           = 0x00300000,
-               .offset         = 0x00200000,
-       }, {
-               .name           = "H3XXX usr cramfs",
-               .size           = 0x00800000,
-               .offset         = 0x00500000,
-       }, {
-               .name           = "H3XXX usr local",
-               .size           = MTDPART_SIZ_FULL,
-               .offset         = 0x00d00000,
-#endif
-#endif
        }
 };
 
@@ -131,11 +92,7 @@ static int h3600_irda_set_power(struct device *dev, unsigned int state)
 
 static void h3600_irda_set_speed(struct device *dev, unsigned int speed)
 {
-       if (speed < 4000000) {
-               clr_h3600_egpio(IPAQ_EGPIO_IR_FSEL);
-       } else {
-               set_h3600_egpio(IPAQ_EGPIO_IR_FSEL);
-       }
+       assign_h3600_egpio(IPAQ_EGPIO_IR_FSEL, !(speed < 4000000));
 }
 
 static struct irda_platform_data h3600_irda_data = {
@@ -266,12 +223,6 @@ static void __init h3xxx_map_io(void)
        sa1100fb_lcd_power = h3xxx_lcd_power;
 }
 
-static __inline__ void do_blank(int setp)
-{
-       if (ipaq_model_ops.blank_callback)
-               ipaq_model_ops.blank_callback(1-setp);
-}
-
 /************************* H3100 *************************/
 
 #ifdef CONFIG_SA1100_H3100
@@ -289,7 +240,6 @@ static void h3100_control_egpio(enum ipaq_egpio_type x, int setp)
        case IPAQ_EGPIO_LCD_POWER:
                egpio |= EGPIO_H3600_LCD_ON;
                gpio  |= GPIO_H3100_LCD_3V_ON;
-               do_blank(setp);
                break;
        case IPAQ_EGPIO_LCD_ENABLE:
                break;
@@ -343,25 +293,6 @@ static void h3100_control_egpio(enum ipaq_egpio_type x, int setp)
        }
 }
 
-static unsigned long h3100_read_egpio(void)
-{
-       return h3100_egpio;
-}
-
-static int h3100_pm_callback(int req)
-{
-       if (ipaq_model_ops.pm_callback_aux)
-               return ipaq_model_ops.pm_callback_aux(req);
-       return 0;
-}
-
-static struct ipaq_model_ops h3100_model_ops __initdata = {
-       .generic_name   = "3100",
-       .control        = h3100_control_egpio,
-       .read           = h3100_read_egpio,
-       .pm_callback    = h3100_pm_callback
-};
-
 #define H3100_DIRECT_EGPIO (GPIO_H3100_BT_ON     \
                          | GPIO_H3100_GPIO3      \
                          | GPIO_H3100_QMUTE      \
@@ -387,7 +318,7 @@ static void __init h3100_map_io(void)
        GAFR &= ~H3100_DIRECT_EGPIO;
 
        H3100_EGPIO = h3100_egpio;
-       ipaq_model_ops = h3100_model_ops;
+       assign_h3600_egpio = h3100_control_egpio;
 }
 
 MACHINE_START(H3100, "Compaq iPAQ H3100")
@@ -420,7 +351,6 @@ static void h3600_control_egpio(enum ipaq_egpio_type x, int setp)
                         EGPIO_H3600_LCD_PCI |
                         EGPIO_H3600_LCD_5V_ON |
                         EGPIO_H3600_LVDD_ON;
-               do_blank(setp);
                break;
        case IPAQ_EGPIO_LCD_ENABLE:
                break;
@@ -471,25 +401,6 @@ static void h3600_control_egpio(enum ipaq_egpio_type x, int setp)
        }
 }
 
-static unsigned long h3600_read_egpio(void)
-{
-       return h3600_egpio;
-}
-
-static int h3600_pm_callback(int req)
-{
-       if (ipaq_model_ops.pm_callback_aux)
-               return ipaq_model_ops.pm_callback_aux(req);
-       return 0;
-}
-
-static struct ipaq_model_ops h3600_model_ops __initdata = {
-       .generic_name   = "3600",
-       .control        = h3600_control_egpio,
-       .read           = h3600_read_egpio,
-       .pm_callback    = h3600_pm_callback
-};
-
 static void __init h3600_map_io(void)
 {
        h3xxx_map_io();
@@ -504,7 +415,7 @@ static void __init h3600_map_io(void)
               GPIO_LDD11 | GPIO_LDD10 | GPIO_LDD9  | GPIO_LDD8;
 
        H3600_EGPIO = h3600_egpio;         /* Maintains across sleep? */
-       ipaq_model_ops = h3600_model_ops;
+       assign_h3600_egpio = h3600_control_egpio;
 }
 
 MACHINE_START(H3600, "Compaq iPAQ H3600")
@@ -519,388 +430,3 @@ MACHINE_END
 
 #endif /* CONFIG_SA1100_H3600 */
 
-#ifdef CONFIG_SA1100_H3800
-
-#define SET_ASIC1(x) \
-   do {if (setp) { H3800_ASIC1_GPIO_OUT |= (x); } else { H3800_ASIC1_GPIO_OUT &= ~(x); }} while(0)
-
-#define SET_ASIC2(x) \
-   do {if (setp) { H3800_ASIC2_GPIOPIOD |= (x); } else { H3800_ASIC2_GPIOPIOD &= ~(x); }} while(0)
-
-#define CLEAR_ASIC1(x) \
-   do {if (setp) { H3800_ASIC1_GPIO_OUT &= ~(x); } else { H3800_ASIC1_GPIO_OUT |= (x); }} while(0)
-
-#define CLEAR_ASIC2(x) \
-   do {if (setp) { H3800_ASIC2_GPIOPIOD &= ~(x); } else { H3800_ASIC2_GPIOPIOD |= (x); }} while(0)
-
-
-/*
-  On screen enable, we get
-
-     h3800_video_power_on(1)
-     LCD controller starts
-     h3800_video_lcd_enable(1)
-
-  On screen disable, we get
-
-     h3800_video_lcd_enable(0)
-     LCD controller stops
-     h3800_video_power_on(0)
-*/
-
-
-static void h3800_video_power_on(int setp)
-{
-       if (setp) {
-               H3800_ASIC1_GPIO_OUT |= GPIO1_LCD_ON;
-               msleep(30);
-               H3800_ASIC1_GPIO_OUT |= GPIO1_VGL_ON;
-               msleep(5);
-               H3800_ASIC1_GPIO_OUT |= GPIO1_VGH_ON;
-               msleep(50);
-               H3800_ASIC1_GPIO_OUT |= GPIO1_LCD_5V_ON;
-               msleep(5);
-       } else {
-               msleep(5);
-               H3800_ASIC1_GPIO_OUT &= ~GPIO1_LCD_5V_ON;
-               msleep(50);
-               H3800_ASIC1_GPIO_OUT &= ~GPIO1_VGL_ON;
-               msleep(5);
-               H3800_ASIC1_GPIO_OUT &= ~GPIO1_VGH_ON;
-               msleep(100);
-               H3800_ASIC1_GPIO_OUT &= ~GPIO1_LCD_ON;
-       }
-}
-
-static void h3800_video_lcd_enable(int setp)
-{
-       if (setp) {
-               msleep(17);     // Wait one from before turning on
-               H3800_ASIC1_GPIO_OUT |= GPIO1_LCD_PCI;
-       } else {
-               H3800_ASIC1_GPIO_OUT &= ~GPIO1_LCD_PCI;
-               msleep(30);     // Wait before turning off
-       }
-}
-
-
-static void h3800_control_egpio(enum ipaq_egpio_type x, int setp)
-{
-       switch (x) {
-       case IPAQ_EGPIO_LCD_POWER:
-               h3800_video_power_on(setp);
-               break;
-       case IPAQ_EGPIO_LCD_ENABLE:
-               h3800_video_lcd_enable(setp);
-               break;
-       case IPAQ_EGPIO_CODEC_NRESET:
-       case IPAQ_EGPIO_AUDIO_ON:
-       case IPAQ_EGPIO_QMUTE:
-               printk("%s: error - should not be called\n", __func__);
-               break;
-       case IPAQ_EGPIO_OPT_NVRAM_ON:
-               SET_ASIC2(GPIO2_OPT_ON_NVRAM);
-               break;
-       case IPAQ_EGPIO_OPT_ON:
-               SET_ASIC2(GPIO2_OPT_ON);
-               break;
-       case IPAQ_EGPIO_CARD_RESET:
-               SET_ASIC2(GPIO2_OPT_PCM_RESET);
-               break;
-       case IPAQ_EGPIO_OPT_RESET:
-               SET_ASIC2(GPIO2_OPT_RESET);
-               break;
-       case IPAQ_EGPIO_IR_ON:
-               CLEAR_ASIC1(GPIO1_IR_ON_N);
-               break;
-       case IPAQ_EGPIO_IR_FSEL:
-               break;
-       case IPAQ_EGPIO_RS232_ON:
-               SET_ASIC1(GPIO1_RS232_ON);
-               break;
-       case IPAQ_EGPIO_VPP_ON:
-               H3800_ASIC2_FlashWP_VPP_ON = setp;
-               break;
-       }
-}
-
-static unsigned long h3800_read_egpio(void)
-{
-       return H3800_ASIC1_GPIO_OUT | (H3800_ASIC2_GPIOPIOD << 16);
-}
-
-/* We need to fix ASIC2 GPIO over suspend/resume.  At the moment,
-   it doesn't appear that ASIC1 GPIO has the same problem */
-
-static int h3800_pm_callback(int req)
-{
-       static u16 asic1_data;
-       static u16 asic2_data;
-       int result = 0;
-
-       printk("%s %d\n", __func__, req);
-
-       switch (req) {
-       case PM_RESUME:
-               MSC2 = (MSC2 & 0x0000ffff) | 0xE4510000;  /* Set MSC2 correctly */
-
-               H3800_ASIC2_GPIOPIOD = asic2_data;
-               H3800_ASIC2_GPIODIR = GPIO2_PEN_IRQ
-                       | GPIO2_SD_DETECT
-                       | GPIO2_EAR_IN_N
-                       | GPIO2_USB_DETECT_N
-                       | GPIO2_SD_CON_SLT;
-
-               H3800_ASIC1_GPIO_OUT = asic1_data;
-
-               if (ipaq_model_ops.pm_callback_aux)
-                       result = ipaq_model_ops.pm_callback_aux(req);
-               break;
-
-       case PM_SUSPEND:
-               if (ipaq_model_ops.pm_callback_aux &&
-                    ((result = ipaq_model_ops.pm_callback_aux(req)) != 0))
-                       return result;
-
-               asic1_data = H3800_ASIC1_GPIO_OUT;
-               asic2_data = H3800_ASIC2_GPIOPIOD;
-               break;
-       default:
-               printk("%s: unrecognized PM callback\n", __func__);
-               break;
-       }
-       return result;
-}
-
-static struct ipaq_model_ops h3800_model_ops __initdata = {
-       .generic_name   = "3800",
-       .control        = h3800_control_egpio,
-       .read           = h3800_read_egpio,
-       .pm_callback    = h3800_pm_callback
-};
-
-#define MAX_ASIC_ISR_LOOPS    20
-
-/* The order of these is important - see #include <mach/irqs.h> */
-static u32 kpio_irq_mask[] = {
-       KPIO_KEY_ALL,
-       KPIO_SPI_INT,
-       KPIO_OWM_INT,
-       KPIO_ADC_INT,
-       KPIO_UART_0_INT,
-       KPIO_UART_1_INT,
-       KPIO_TIMER_0_INT,
-       KPIO_TIMER_1_INT,
-       KPIO_TIMER_2_INT
-};
-
-static u32 gpio_irq_mask[] = {
-       GPIO2_PEN_IRQ,
-       GPIO2_SD_DETECT,
-       GPIO2_EAR_IN_N,
-       GPIO2_USB_DETECT_N,
-       GPIO2_SD_CON_SLT,
-};
-
-static void h3800_IRQ_demux(unsigned int irq, struct irq_desc *desc)
-{
-       int i;
-
-       if (0) printk("%s: interrupt received\n", __func__);
-
-       desc->chip->ack(irq);
-
-       for (i = 0; i < MAX_ASIC_ISR_LOOPS && (GPLR & GPIO_H3800_ASIC); i++) {
-               u32 irq;
-               int j;
-
-               /* KPIO */
-               irq = H3800_ASIC2_KPIINTFLAG;
-               if (0) printk("%s KPIO 0x%08X\n", __func__, irq);
-               for (j = 0; j < H3800_KPIO_IRQ_COUNT; j++)
-                       if (irq & kpio_irq_mask[j])
-                               handle_edge_irq(H3800_KPIO_IRQ_COUNT + j, irq_desc + H3800_KPIO_IRQ_COUNT + j);
-
-               /* GPIO2 */
-               irq = H3800_ASIC2_GPIINTFLAG;
-               if (0) printk("%s GPIO 0x%08X\n", __func__, irq);
-               for (j = 0; j < H3800_GPIO_IRQ_COUNT; j++)
-                       if (irq & gpio_irq_mask[j])
-                               handle_edge_irq(H3800_GPIO_IRQ_COUNT + j, irq_desc + H3800_GPIO_IRQ_COUNT + j);
-       }
-
-       if (i >= MAX_ASIC_ISR_LOOPS)
-               printk("%s: interrupt processing overrun\n", __func__);
-
-       /* For level-based interrupts */
-       desc->chip->unmask(irq);
-
-}
-
-static struct irqaction h3800_irq = {
-       .name           = "h3800_asic",
-       .handler        = h3800_IRQ_demux,
-       .flags          = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
-};
-
-u32 kpio_int_shadow = 0;
-
-
-/* mask_ack <- IRQ is first serviced.
-       mask <- IRQ is disabled.
-     unmask <- IRQ is enabled
-
-     The INTCLR registers are poorly documented.  I believe that writing
-     a "1" to the register clears the specific interrupt, but the documentation
-     indicates writing a "0" clears the interrupt.  In any case, they shouldn't
-     be read (that's the INTFLAG register)
- */
-
-static void h3800_mask_ack_kpio_irq(unsigned int irq)
-{
-       u32 mask = kpio_irq_mask[irq - H3800_KPIO_IRQ_START];
-       kpio_int_shadow &= ~mask;
-       H3800_ASIC2_KPIINTSTAT = kpio_int_shadow;
-       H3800_ASIC2_KPIINTCLR  = mask;
-}
-
-static void h3800_mask_kpio_irq(unsigned int irq)
-{
-       u32 mask = kpio_irq_mask[irq - H3800_KPIO_IRQ_START];
-       kpio_int_shadow &= ~mask;
-       H3800_ASIC2_KPIINTSTAT = kpio_int_shadow;
-}
-
-static void h3800_unmask_kpio_irq(unsigned int irq)
-{
-       u32 mask = kpio_irq_mask[irq - H3800_KPIO_IRQ_START];
-       kpio_int_shadow |= mask;
-       H3800_ASIC2_KPIINTSTAT = kpio_int_shadow;
-}
-
-static void h3800_mask_ack_gpio_irq(unsigned int irq)
-{
-       u32 mask = gpio_irq_mask[irq - H3800_GPIO_IRQ_START];
-       H3800_ASIC2_GPIINTSTAT &= ~mask;
-       H3800_ASIC2_GPIINTCLR   = mask;
-}
-
-static void h3800_mask_gpio_irq(unsigned int irq)
-{
-       u32 mask = gpio_irq_mask[irq - H3800_GPIO_IRQ_START];
-       H3800_ASIC2_GPIINTSTAT &= ~mask;
-       }
-
-static void h3800_unmask_gpio_irq(unsigned int irq)
-{
-       u32 mask = gpio_irq_mask[irq - H3800_GPIO_IRQ_START];
-       H3800_ASIC2_GPIINTSTAT |= mask;
-}
-
-static void __init h3800_init_irq(void)
-{
-       int i;
-
-       /* Initialize standard IRQs */
-       sa1100_init_irq();
-
-       /* Disable all IRQs and set up clock */
-       H3800_ASIC2_KPIINTSTAT     =  0;     /* Disable all interrupts */
-       H3800_ASIC2_GPIINTSTAT     =  0;
-
-       H3800_ASIC2_KPIINTCLR      =  0;     /* Clear all KPIO interrupts */
-       H3800_ASIC2_GPIINTCLR      =  0;     /* Clear all GPIO interrupts */
-
-//     H3800_ASIC2_KPIINTCLR      =  0xffff;     /* Clear all KPIO interrupts */
-//     H3800_ASIC2_GPIINTCLR      =  0xffff;     /* Clear all GPIO interrupts */
-
-       H3800_ASIC2_CLOCK_Enable       |= ASIC2_CLOCK_EX0;   /* 32 kHZ crystal on */
-       H3800_ASIC2_INTR_ClockPrescale |= ASIC2_INTCPS_SET;
-       H3800_ASIC2_INTR_ClockPrescale  = ASIC2_INTCPS_CPS(0x0e) | ASIC2_INTCPS_SET;
-       H3800_ASIC2_INTR_TimerSet       = 1;
-
-#if 0
-       for (i = 0; i < H3800_KPIO_IRQ_COUNT; i++) {
-               int irq = i + H3800_KPIO_IRQ_START;
-               irq_desc[irq].valid    = 1;
-               irq_desc[irq].probe_ok = 1;
-               set_irq_chip(irq, &h3800_kpio_irqchip);
-       }
-
-       for (i = 0; i < H3800_GPIO_IRQ_COUNT; i++) {
-               int irq = i + H3800_GPIO_IRQ_START;
-               irq_desc[irq].valid    = 1;
-               irq_desc[irq].probe_ok = 1;
-               set_irq_chip(irq, &h3800_gpio_irqchip);
-       }
-#endif
-       set_irq_type(IRQ_GPIO_H3800_ASIC, IRQ_TYPE_EDGE_RISING);
-       set_irq_chained_handler(IRQ_GPIO_H3800_ASIC, h3800_IRQ_demux);
-}
-
-
-#define ASIC1_OUTPUTS   0x7fff   /* First 15 bits are used */
-
-static void __init h3800_map_io(void)
-{
-       h3xxx_map_io();
-
-       /* Add wakeup on AC plug/unplug */
-       PWER  |= PWER_GPIO12;
-
-       /* Initialize h3800-specific values here */
-       GPCR = 0x0fffffff;       /* All outputs are set low by default */
-       GAFR =  GPIO_H3800_CLK_OUT |
-               GPIO_LDD15 | GPIO_LDD14 | GPIO_LDD13 | GPIO_LDD12 |
-               GPIO_LDD11 | GPIO_LDD10 | GPIO_LDD9  | GPIO_LDD8;
-       GPDR =  GPIO_H3800_CLK_OUT |
-               GPIO_H3600_COM_RTS  | GPIO_H3600_L3_CLOCK |
-               GPIO_H3600_L3_MODE  | GPIO_H3600_L3_DATA  |
-               GPIO_LDD15 | GPIO_LDD14 | GPIO_LDD13 | GPIO_LDD12 |
-               GPIO_LDD11 | GPIO_LDD10 | GPIO_LDD9  | GPIO_LDD8;
-       TUCR =  TUCR_3_6864MHz;   /* Seems to be used only for the Bluetooth UART */
-
-       /* Fix the memory bus */
-       MSC2 = (MSC2 & 0x0000ffff) | 0xE4510000;
-
-       /* Set up ASIC #1 */
-       H3800_ASIC1_GPIO_DIR            = ASIC1_OUTPUTS;            /* All outputs */
-       H3800_ASIC1_GPIO_MASK           = ASIC1_OUTPUTS;            /* No interrupts */
-       H3800_ASIC1_GPIO_SLEEP_MASK     = ASIC1_OUTPUTS;
-       H3800_ASIC1_GPIO_SLEEP_DIR      = ASIC1_OUTPUTS;
-       H3800_ASIC1_GPIO_SLEEP_OUT      = GPIO1_EAR_ON_N;
-       H3800_ASIC1_GPIO_BATT_FAULT_DIR = ASIC1_OUTPUTS;
-       H3800_ASIC1_GPIO_BATT_FAULT_OUT = GPIO1_EAR_ON_N;
-
-       H3800_ASIC1_GPIO_OUT = GPIO1_IR_ON_N
-                                     | GPIO1_RS232_ON
-                                     | GPIO1_EAR_ON_N;
-
-       /* Set up ASIC #2 */
-       H3800_ASIC2_GPIOPIOD    = GPIO2_IN_Y1_N | GPIO2_IN_X1_N;
-       H3800_ASIC2_GPOBFSTAT   = GPIO2_IN_Y1_N | GPIO2_IN_X1_N;
-
-       H3800_ASIC2_GPIODIR     = GPIO2_PEN_IRQ
-                                     | GPIO2_SD_DETECT
-                                     | GPIO2_EAR_IN_N
-                                     | GPIO2_USB_DETECT_N
-                                     | GPIO2_SD_CON_SLT;
-
-       /* TODO : Set sleep states & battery fault states */
-
-       /* Clear VPP Enable */
-       H3800_ASIC2_FlashWP_VPP_ON = 0;
-       ipaq_model_ops = h3800_model_ops;
-}
-
-MACHINE_START(H3800, "Compaq iPAQ H3800")
-       .phys_io        = 0x80000000,
-       .io_pg_offst    = ((0xf8000000) >> 18) & 0xfffc,
-       .boot_params    = 0xc0000100,
-       .map_io         = h3800_map_io,
-       .init_irq       = h3800_init_irq,
-       .timer          = &sa1100_timer,
-       .init_machine   = h3xxx_mach_init,
-MACHINE_END
-
-#endif /* CONFIG_SA1100_H3800 */
index 9cc47fddb3358de80fc50fe8f6146eabe5e86993..2827faa47421d3fee5cc68a9593952f6b9c2fcef 100644 (file)
@@ -29,7 +29,7 @@ typedef int __bitwise pm_request_t;
 #define PM_RESUME      ((__force pm_request_t) 2)      /* enter D0 */
 
 /* generalized support for H3xxx series Compaq Pocket PC's */
-#define machine_is_h3xxx() (machine_is_h3100() || machine_is_h3600() || machine_is_h3800())
+#define machine_is_h3xxx() (machine_is_h3100() || machine_is_h3600())
 
 /* Physical memory regions corresponding to chip selects */
 #define H3600_EGPIO_PHYS       (SA1100_CS5_PHYS + 0x01000000)
@@ -93,76 +93,7 @@ enum ipaq_egpio_type {
        IPAQ_EGPIO_LCD_ENABLE,    /* Enable/disable LCD controller */
 };
 
-struct ipaq_model_ops {
-       const char     *generic_name;
-       void          (*control)(enum ipaq_egpio_type, int);
-       unsigned long (*read)(void);
-       void          (*blank_callback)(int blank);
-       int           (*pm_callback)(int req);      /* Primary model callback */
-       int           (*pm_callback_aux)(int req);  /* Secondary callback (used by HAL modules) */
-};
-
-extern struct ipaq_model_ops ipaq_model_ops;
-
-static __inline__ const char * h3600_generic_name(void)
-{
-       return ipaq_model_ops.generic_name;
-}
-
-static __inline__ void assign_h3600_egpio(enum ipaq_egpio_type x, int level)
-{
-       if (ipaq_model_ops.control)
-               ipaq_model_ops.control(x,level);
-}
-
-static __inline__ void clr_h3600_egpio(enum ipaq_egpio_type x)
-{
-       if (ipaq_model_ops.control)
-               ipaq_model_ops.control(x,0);
-}
-
-static __inline__ void set_h3600_egpio(enum ipaq_egpio_type x)
-{
-       if (ipaq_model_ops.control)
-               ipaq_model_ops.control(x,1);
-}
-
-static __inline__ unsigned long read_h3600_egpio(void)
-{
-       if (ipaq_model_ops.read)
-               return ipaq_model_ops.read();
-       return 0;
-}
-
-static __inline__ int  h3600_register_blank_callback(void (*f)(int))
-{
-       ipaq_model_ops.blank_callback = f;
-       return 0;
-}
-
-static __inline__ void h3600_unregister_blank_callback(void (*f)(int))
-{
-       ipaq_model_ops.blank_callback = NULL;
-}
-
-
-static __inline__ int  h3600_register_pm_callback(int (*f)(int))
-{
-       ipaq_model_ops.pm_callback_aux = f;
-       return 0;
-}
-
-static __inline__ void h3600_unregister_pm_callback(int (*f)(int))
-{
-       ipaq_model_ops.pm_callback_aux = NULL;
-}
-
-static __inline__ int h3600_power_management(int req)
-{
-       if (ipaq_model_ops.pm_callback)
-               return ipaq_model_ops.pm_callback(req);
-       return 0;
-}
+extern void (*assign_h3600_egpio)(enum ipaq_egpio_type x, int level);
 
 #endif /* ASSEMBLY */
 
index 62b0b78796855db6daf566b53bcd7ce09e8af29d..a36ca76d018b0146878ea9c8c708f3c92d3cc1b6 100644 (file)
 #define GPIO_H3600_OPT_LOCK            GPIO_GPIO (22)
 #define GPIO_H3600_OPT_DET             GPIO_GPIO (27)
 
-/* H3800 specific pins */
-#define GPIO_H3800_AC_IN                GPIO_GPIO (12)
-#define GPIO_H3800_COM_DSR              GPIO_GPIO (13)
-#define GPIO_H3800_MMC_INT              GPIO_GPIO (18)
-#define GPIO_H3800_NOPT_IND             GPIO_GPIO (20)   /* Almost exactly the same as GPIO_H3600_OPT_DET */
-#define GPIO_H3800_OPT_BAT_FAULT        GPIO_GPIO (22)
-#define GPIO_H3800_CLK_OUT              GPIO_GPIO (27)
-
 /****************************************************/
 
 #define IRQ_GPIO_H3600_ACTION_BUTTON    IRQ_GPIO18
 #define IRQ_GPIO_H3600_OPT_DET         IRQ_GPIO27
 
-#define IRQ_GPIO_H3800_MMC_INT          IRQ_GPIO18
-#define IRQ_GPIO_H3800_NOPT_IND         IRQ_GPIO20 /* almost same as OPT_DET */
-
 /* H3100 / 3600 EGPIO pins */
 #define EGPIO_H3600_VPP_ON             (1 << 0)
 #define EGPIO_H3600_CARD_RESET         (1 << 1)   /* reset the attached pcmcia/compactflash card.  active high. */
 #define EGPIO_H3600_LCD_5V_ON          (1 << 14)  /* enable 5V to LCD. active high. */
 #define EGPIO_H3600_LVDD_ON            (1 << 15)  /* enable 9V and -6.5V to LCD. */
 
-/********************* H3800, ASIC #2 ********************/
-
-#define _H3800_ASIC2_Base            (H3600_EGPIO_VIRT)
-#define H3800_ASIC2_OFFSET(s,x,y)    \
-    (*((volatile s *) (_H3800_ASIC2_Base + _H3800_ASIC2_ ## x ## _Base + _H3800_ASIC2_ ## x ## _ ## y)))
-#define H3800_ASIC2_NOFFSET(s,x,n,y) \
-    (*((volatile s *) (_H3800_ASIC2_Base + _H3800_ASIC2_ ## x ## _ ## n ## _Base + _H3800_ASIC2_ ## x ## _ ## y)))
-
-#define _H3800_ASIC2_GPIO_Base                 0x0000
-#define _H3800_ASIC2_GPIO_Direction            0x0000    /* R/W, 16 bits 1:input, 0:output */
-#define _H3800_ASIC2_GPIO_InterruptType        0x0004    /* R/W, 12 bits 1:edge, 0:level          */
-#define _H3800_ASIC2_GPIO_InterruptEdgeType    0x0008    /* R/W, 12 bits 1:rising, 0:falling */
-#define _H3800_ASIC2_GPIO_InterruptLevelType   0x000C    /* R/W, 12 bits 1:high, 0:low  */
-#define _H3800_ASIC2_GPIO_InterruptClear       0x0010    /* W,   12 bits */
-#define _H3800_ASIC2_GPIO_InterruptFlag        0x0010    /* R,   12 bits - reads int status */
-#define _H3800_ASIC2_GPIO_Data                 0x0014    /* R/W, 16 bits */
-#define _H3800_ASIC2_GPIO_BattFaultOut         0x0018    /* R/W, 16 bit - sets level on batt fault */
-#define _H3800_ASIC2_GPIO_InterruptEnable      0x001c    /* R/W, 12 bits 1:enable interrupt */
-#define _H3800_ASIC2_GPIO_Alternate            0x003c    /* R/W, 12+1 bits - set alternate functions */
-
-#define H3800_ASIC2_GPIO_Direction          H3800_ASIC2_OFFSET( u16, GPIO, Direction )
-#define H3800_ASIC2_GPIO_InterruptType      H3800_ASIC2_OFFSET( u16, GPIO, InterruptType )
-#define H3800_ASIC2_GPIO_InterruptEdgeType  H3800_ASIC2_OFFSET( u16, GPIO, InterruptEdgeType )
-#define H3800_ASIC2_GPIO_InterruptLevelType H3800_ASIC2_OFFSET( u16, GPIO, InterruptLevelType )
-#define H3800_ASIC2_GPIO_InterruptClear     H3800_ASIC2_OFFSET( u16, GPIO, InterruptClear )
-#define H3800_ASIC2_GPIO_InterruptFlag      H3800_ASIC2_OFFSET( u16, GPIO, InterruptFlag )
-#define H3800_ASIC2_GPIO_Data               H3800_ASIC2_OFFSET( u16, GPIO, Data )
-#define H3800_ASIC2_GPIO_BattFaultOut       H3800_ASIC2_OFFSET( u16, GPIO, BattFaultOut )
-#define H3800_ASIC2_GPIO_InterruptEnable    H3800_ASIC2_OFFSET( u16, GPIO, InterruptEnable )
-#define H3800_ASIC2_GPIO_Alternate          H3800_ASIC2_OFFSET( u16, GPIO, Alternate )
-
-#define GPIO_H3800_ASIC2_IN_Y1_N          (1 << 0)   /* Output: Touchscreen Y1 */
-#define GPIO_H3800_ASIC2_IN_X0            (1 << 1)   /* Output: Touchscreen X0 */
-#define GPIO_H3800_ASIC2_IN_Y0            (1 << 2)   /* Output: Touchscreen Y0 */
-#define GPIO_H3800_ASIC2_IN_X1_N          (1 << 3)   /* Output: Touchscreen X1 */
-#define GPIO_H3800_ASIC2_BT_RST           (1 << 4)   /* Output: Bluetooth reset */
-#define GPIO_H3800_ASIC2_PEN_IRQ          (1 << 5)   /* Input : Pen down        */
-#define GPIO_H3800_ASIC2_SD_DETECT        (1 << 6)   /* Input : SD detect */
-#define GPIO_H3800_ASIC2_EAR_IN_N         (1 << 7)   /* Input : Audio jack plug inserted */
-#define GPIO_H3800_ASIC2_OPT_PCM_RESET    (1 << 8)   /* Output: */
-#define GPIO_H3800_ASIC2_OPT_RESET        (1 << 9)   /* Output: */
-#define GPIO_H3800_ASIC2_USB_DETECT_N     (1 << 10)  /* Input : */
-#define GPIO_H3800_ASIC2_SD_CON_SLT       (1 << 11)  /* Input : */
-
-#define _H3800_ASIC2_KPIO_Base                 0x0200
-#define _H3800_ASIC2_KPIO_Direction            0x0000    /* R/W, 12 bits 1:input, 0:output */
-#define _H3800_ASIC2_KPIO_InterruptType        0x0004    /* R/W, 12 bits 1:edge, 0:level          */
-#define _H3800_ASIC2_KPIO_InterruptEdgeType    0x0008    /* R/W, 12 bits 1:rising, 0:falling */
-#define _H3800_ASIC2_KPIO_InterruptLevelType   0x000C    /* R/W, 12 bits 1:high, 0:low  */
-#define _H3800_ASIC2_KPIO_InterruptClear       0x0010    /* W,   20 bits - 8 special */
-#define _H3800_ASIC2_KPIO_InterruptFlag        0x0010    /* R,   20 bits - 8 special - reads int status */
-#define _H3800_ASIC2_KPIO_Data                 0x0014    /* R/W, 16 bits */
-#define _H3800_ASIC2_KPIO_BattFaultOut         0x0018    /* R/W, 16 bit - sets level on batt fault */
-#define _H3800_ASIC2_KPIO_InterruptEnable      0x001c    /* R/W, 20 bits - 8 special */
-#define _H3800_ASIC2_KPIO_Alternate            0x003c    /* R/W, 6 bits */
-
-#define H3800_ASIC2_KPIO_Direction          H3800_ASIC2_OFFSET( u16, KPIO, Direction )
-#define H3800_ASIC2_KPIO_InterruptType      H3800_ASIC2_OFFSET( u16, KPIO, InterruptType )
-#define H3800_ASIC2_KPIO_InterruptEdgeType  H3800_ASIC2_OFFSET( u16, KPIO, InterruptEdgeType )
-#define H3800_ASIC2_KPIO_InterruptLevelType H3800_ASIC2_OFFSET( u16, KPIO, InterruptLevelType )
-#define H3800_ASIC2_KPIO_InterruptClear     H3800_ASIC2_OFFSET( u32, KPIO, InterruptClear )
-#define H3800_ASIC2_KPIO_InterruptFlag      H3800_ASIC2_OFFSET( u32, KPIO, InterruptFlag )
-#define H3800_ASIC2_KPIO_Data               H3800_ASIC2_OFFSET( u16, KPIO, Data )
-#define H3800_ASIC2_KPIO_BattFaultOut       H3800_ASIC2_OFFSET( u16, KPIO, BattFaultOut )
-#define H3800_ASIC2_KPIO_InterruptEnable    H3800_ASIC2_OFFSET( u32, KPIO, InterruptEnable )
-#define H3800_ASIC2_KPIO_Alternate          H3800_ASIC2_OFFSET( u16, KPIO, Alternate )
-
-#define H3800_ASIC2_KPIO_SPI_INT        ( 1 << 16 )
-#define H3800_ASIC2_KPIO_OWM_INT        ( 1 << 17 )
-#define H3800_ASIC2_KPIO_ADC_INT        ( 1 << 18 )
-#define H3800_ASIC2_KPIO_UART_0_INT     ( 1 << 19 )
-#define H3800_ASIC2_KPIO_UART_1_INT     ( 1 << 20 )
-#define H3800_ASIC2_KPIO_TIMER_0_INT    ( 1 << 21 )
-#define H3800_ASIC2_KPIO_TIMER_1_INT    ( 1 << 22 )
-#define H3800_ASIC2_KPIO_TIMER_2_INT    ( 1 << 23 )
-
-#define KPIO_H3800_ASIC2_RECORD_BTN_N     (1 << 0)   /* Record button */
-#define KPIO_H3800_ASIC2_KEY_5W1_N        (1 << 1)   /* Keypad */
-#define KPIO_H3800_ASIC2_KEY_5W2_N        (1 << 2)   /* */
-#define KPIO_H3800_ASIC2_KEY_5W3_N        (1 << 3)   /* */
-#define KPIO_H3800_ASIC2_KEY_5W4_N        (1 << 4)   /* */
-#define KPIO_H3800_ASIC2_KEY_5W5_N        (1 << 5)   /* */
-#define KPIO_H3800_ASIC2_KEY_LEFT_N       (1 << 6)   /* */
-#define KPIO_H3800_ASIC2_KEY_RIGHT_N      (1 << 7)   /* */
-#define KPIO_H3800_ASIC2_KEY_AP1_N        (1 << 8)   /* Old "Calendar" */
-#define KPIO_H3800_ASIC2_KEY_AP2_N        (1 << 9)   /* Old "Schedule" */
-#define KPIO_H3800_ASIC2_KEY_AP3_N        (1 << 10)  /* Old "Q"        */
-#define KPIO_H3800_ASIC2_KEY_AP4_N        (1 << 11)  /* Old "Undo"     */
-
-/* Alternate KPIO functions (set by default) */
-#define KPIO_ALT_H3800_ASIC2_KEY_5W1_N        (1 << 1)   /* Action key */
-#define KPIO_ALT_H3800_ASIC2_KEY_5W2_N        (1 << 2)   /* J1 of keypad input */
-#define KPIO_ALT_H3800_ASIC2_KEY_5W3_N        (1 << 3)   /* J2 of keypad input */
-#define KPIO_ALT_H3800_ASIC2_KEY_5W4_N        (1 << 4)   /* J3 of keypad input */
-#define KPIO_ALT_H3800_ASIC2_KEY_5W5_N        (1 << 5)   /* J4 of keypad input */
-
-#define _H3800_ASIC2_SPI_Base                  0x0400
-#define _H3800_ASIC2_SPI_Control               0x0000    /* R/W 8 bits */
-#define _H3800_ASIC2_SPI_Data                  0x0004    /* R/W 8 bits */
-#define _H3800_ASIC2_SPI_ChipSelectDisabled    0x0008    /* W   8 bits */
-
-#define H3800_ASIC2_SPI_Control             H3800_ASIC2_OFFSET( u8, SPI, Control )
-#define H3800_ASIC2_SPI_Data                H3800_ASIC2_OFFSET( u8, SPI, Data )
-#define H3800_ASIC2_SPI_ChipSelectDisabled  H3800_ASIC2_OFFSET( u8, SPI, ChipSelectDisabled )
-
-#define _H3800_ASIC2_PWM_0_Base                0x0600
-#define _H3800_ASIC2_PWM_1_Base                0x0700
-#define _H3800_ASIC2_PWM_TimeBase              0x0000    /* R/W 6 bits */
-#define _H3800_ASIC2_PWM_PeriodTime            0x0004    /* R/W 12 bits */
-#define _H3800_ASIC2_PWM_DutyTime              0x0008    /* R/W 12 bits */
-
-#define H3800_ASIC2_PWM_0_TimeBase          H3800_ASIC2_NOFFSET(  u8, PWM, 0, TimeBase )
-#define H3800_ASIC2_PWM_0_PeriodTime        H3800_ASIC2_NOFFSET( u16, PWM, 0, PeriodTime )
-#define H3800_ASIC2_PWM_0_DutyTime          H3800_ASIC2_NOFFSET( u16, PWM, 0, DutyTime )
-
-#define H3800_ASIC2_PWM_1_TimeBase          H3800_ASIC2_NOFFSET(  u8, PWM, 1, TimeBase )
-#define H3800_ASIC2_PWM_1_PeriodTime        H3800_ASIC2_NOFFSET( u16, PWM, 1, PeriodTime )
-#define H3800_ASIC2_PWM_1_DutyTime          H3800_ASIC2_NOFFSET( u16, PWM, 1, DutyTime )
-
-#define H3800_ASIC2_PWM_TIMEBASE_MASK             0xf    /* Low 4 bits sets time base, max = 8 */
-#define H3800_ASIC2_PWM_TIMEBASE_ENABLE    ( 1 << 4 )    /* Enable clock */
-#define H3800_ASIC2_PWM_TIMEBASE_CLEAR     ( 1 << 5 )    /* Clear the PWM */
-
-#define _H3800_ASIC2_LED_0_Base                0x0800
-#define _H3800_ASIC2_LED_1_Base                0x0880
-#define _H3800_ASIC2_LED_2_Base                0x0900
-#define _H3800_ASIC2_LED_TimeBase              0x0000    /* R/W  7 bits */
-#define _H3800_ASIC2_LED_PeriodTime            0x0004    /* R/W 12 bits */
-#define _H3800_ASIC2_LED_DutyTime              0x0008    /* R/W 12 bits */
-#define _H3800_ASIC2_LED_AutoStopCount         0x000c    /* R/W 16 bits */
-
-#define H3800_ASIC2_LED_0_TimeBase          H3800_ASIC2_NOFFSET(  u8, LED, 0, TimeBase )
-#define H3800_ASIC2_LED_0_PeriodTime        H3800_ASIC2_NOFFSET( u16, LED, 0, PeriodTime )
-#define H3800_ASIC2_LED_0_DutyTime          H3800_ASIC2_NOFFSET( u16, LED, 0, DutyTime )
-#define H3800_ASIC2_LED_0_AutoStopClock     H3800_ASIC2_NOFFSET( u16, LED, 0, AutoStopClock )
-
-#define H3800_ASIC2_LED_1_TimeBase          H3800_ASIC2_NOFFSET(  u8, LED, 1, TimeBase )
-#define H3800_ASIC2_LED_1_PeriodTime        H3800_ASIC2_NOFFSET( u16, LED, 1, PeriodTime )
-#define H3800_ASIC2_LED_1_DutyTime          H3800_ASIC2_NOFFSET( u16, LED, 1, DutyTime )
-#define H3800_ASIC2_LED_1_AutoStopClock     H3800_ASIC2_NOFFSET( u16, LED, 1, AutoStopClock )
-
-#define H3800_ASIC2_LED_2_TimeBase          H3800_ASIC2_NOFFSET(  u8, LED, 2, TimeBase )
-#define H3800_ASIC2_LED_2_PeriodTime        H3800_ASIC2_NOFFSET( u16, LED, 2, PeriodTime )
-#define H3800_ASIC2_LED_2_DutyTime          H3800_ASIC2_NOFFSET( u16, LED, 2, DutyTime )
-#define H3800_ASIC2_LED_2_AutoStopClock     H3800_ASIC2_NOFFSET( u16, LED, 2, AutoStopClock )
-
-#define H3800_ASIC2_LED_TIMEBASE_MASK            0x0f    /* Low 4 bits sets time base, max = 13 */
-#define H3800_ASIC2_LED_TIMEBASE_BLINK     ( 1 << 4 )    /* Enable blinking */
-#define H3800_ASIC2_LED_TIMEBASE_AUTOSTOP  ( 1 << 5 )
-#define H3800_ASIC2_LED_TIMEBASE_ALWAYS    ( 1 << 6 )    /* Enable blink always */
-
-#define _H3800_ASIC2_UART_0_Base               0x0A00
-#define _H3800_ASIC2_UART_1_Base               0x0C00
-#define _H3800_ASIC2_UART_Receive              0x0000    /* R    8 bits */
-#define _H3800_ASIC2_UART_Transmit             0x0000    /*   W  8 bits */
-#define _H3800_ASIC2_UART_IntEnable            0x0004    /* R/W  8 bits */
-#define _H3800_ASIC2_UART_IntVerify            0x0008    /* R/W  8 bits */
-#define _H3800_ASIC2_UART_FIFOControl          0x000c    /* R/W  8 bits */
-#define _H3800_ASIC2_UART_LineControl          0x0010    /* R/W  8 bits */
-#define _H3800_ASIC2_UART_ModemStatus          0x0014    /* R/W  8 bits */
-#define _H3800_ASIC2_UART_LineStatus           0x0018    /* R/W  8 bits */
-#define _H3800_ASIC2_UART_ScratchPad           0x001c    /* R/W  8 bits */
-#define _H3800_ASIC2_UART_DivisorLatchL        0x0020    /* R/W  8 bits */
-#define _H3800_ASIC2_UART_DivisorLatchH        0x0024    /* R/W  8 bits */
-
-#define H3800_ASIC2_UART_0_Receive          H3800_ASIC2_NOFFSET(  u8, UART, 0, Receive )
-#define H3800_ASIC2_UART_0_Transmit         H3800_ASIC2_NOFFSET(  u8, UART, 0, Transmit )
-#define H3800_ASIC2_UART_0_IntEnable        H3800_ASIC2_NOFFSET(  u8, UART, 0, IntEnable )
-#define H3800_ASIC2_UART_0_IntVerify        H3800_ASIC2_NOFFSET(  u8, UART, 0, IntVerify )
-#define H3800_ASIC2_UART_0_FIFOControl      H3800_ASIC2_NOFFSET(  u8, UART, 0, FIFOControl )
-#define H3800_ASIC2_UART_0_LineControl      H3800_ASIC2_NOFFSET(  u8, UART, 0, LineControl )
-#define H3800_ASIC2_UART_0_ModemStatus      H3800_ASIC2_NOFFSET(  u8, UART, 0, ModemStatus )
-#define H3800_ASIC2_UART_0_LineStatus       H3800_ASIC2_NOFFSET(  u8, UART, 0, LineStatus )
-#define H3800_ASIC2_UART_0_ScratchPad       H3800_ASIC2_NOFFSET(  u8, UART, 0, ScratchPad )
-#define H3800_ASIC2_UART_0_DivisorLatchL    H3800_ASIC2_NOFFSET(  u8, UART, 0, DivisorLatchL )
-#define H3800_ASIC2_UART_0_DivisorLatchH    H3800_ASIC2_NOFFSET(  u8, UART, 0, DivisorLatchH )
-
-#define H3800_ASIC2_UART_1_Receive          H3800_ASIC2_NOFFSET(  u8, UART, 1, Receive )
-#define H3800_ASIC2_UART_1_Transmit         H3800_ASIC2_NOFFSET(  u8, UART, 1, Transmit )
-#define H3800_ASIC2_UART_1_IntEnable        H3800_ASIC2_NOFFSET(  u8, UART, 1, IntEnable )
-#define H3800_ASIC2_UART_1_IntVerify        H3800_ASIC2_NOFFSET(  u8, UART, 1, IntVerify )
-#define H3800_ASIC2_UART_1_FIFOControl      H3800_ASIC2_NOFFSET(  u8, UART, 1, FIFOControl )
-#define H3800_ASIC2_UART_1_LineControl      H3800_ASIC2_NOFFSET(  u8, UART, 1, LineControl )
-#define H3800_ASIC2_UART_1_ModemStatus      H3800_ASIC2_NOFFSET(  u8, UART, 1, ModemStatus )
-#define H3800_ASIC2_UART_1_LineStatus       H3800_ASIC2_NOFFSET(  u8, UART, 1, LineStatus )
-#define H3800_ASIC2_UART_1_ScratchPad       H3800_ASIC2_NOFFSET(  u8, UART, 1, ScratchPad )
-#define H3800_ASIC2_UART_1_DivisorLatchL    H3800_ASIC2_NOFFSET(  u8, UART, 1, DivisorLatchL )
-#define H3800_ASIC2_UART_1_DivisorLatchH    H3800_ASIC2_NOFFSET(  u8, UART, 1, DivisorLatchH )
-
-#define _H3800_ASIC2_TIMER_Base                0x0E00
-#define _H3800_ASIC2_TIMER_Command             0x0000    /* R/W  8 bits */
-
-#define H3800_ASIC2_TIMER_Command           H3800_ASIC2_OFFSET( u8, Timer, Command )
-
-#define H3800_ASIC2_TIMER_GAT_0            ( 1 << 0 )    /* Gate enable, counter 0 */
-#define H3800_ASIC2_TIMER_GAT_1            ( 1 << 1 )    /* Gate enable, counter 1 */
-#define H3800_ASIC2_TIMER_GAT_2            ( 1 << 2 )    /* Gate enable, counter 2 */
-#define H3800_ASIC2_TIMER_CLK_0            ( 1 << 3 )    /* Clock enable, counter 0 */
-#define H3800_ASIC2_TIMER_CLK_1            ( 1 << 4 )    /* Clock enable, counter 1 */
-#define H3800_ASIC2_TIMER_CLK_2            ( 1 << 5 )    /* Clock enable, counter 2 */
-#define H3800_ASIC2_TIMER_MODE_0           ( 1 << 6 )    /* Mode 0 enable, counter 0 */
-#define H3800_ASIC2_TIMER_MODE_1           ( 1 << 7 )    /* Mode 0 enable, counter 1 */
-
-#define _H3800_ASIC2_CLOCK_Base                0x1000
-#define _H3800_ASIC2_CLOCK_Enable              0x0000    /* R/W  18 bits */
-
-#define H3800_ASIC2_CLOCK_Enable            H3800_ASIC2_OFFSET( u32, CLOCK, Enable )
-
-#define H3800_ASIC2_CLOCK_AUDIO_1              0x0001    /* Enable 4.1 MHz clock for 8Khz and 4khz sample rate */
-#define H3800_ASIC2_CLOCK_AUDIO_2              0x0002    /* Enable 12.3 MHz clock for 48Khz and 32khz sample rate */
-#define H3800_ASIC2_CLOCK_AUDIO_3              0x0004    /* Enable 5.6 MHz clock for 11 kHZ sample rate */
-#define H3800_ASIC2_CLOCK_AUDIO_4              0x0008    /* Enable 11.289 MHz clock for 44 and 22 kHz sample rate */
-#define H3800_ASIC2_CLOCK_ADC              ( 1 << 4 )    /* 1.024 MHz clock to ADC */
-#define H3800_ASIC2_CLOCK_SPI              ( 1 << 5 )    /* 4.096 MHz clock to SPI */
-#define H3800_ASIC2_CLOCK_OWM              ( 1 << 6 )    /* 4.096 MHz clock to OWM */
-#define H3800_ASIC2_CLOCK_PWM              ( 1 << 7 )    /* 2.048 MHz clock to PWM */
-#define H3800_ASIC2_CLOCK_UART_1           ( 1 << 8 )    /* 24.576 MHz clock to UART1 (turn off bit 16) */
-#define H3800_ASIC2_CLOCK_UART_0           ( 1 << 9 )    /* 24.576 MHz clock to UART0 (turn off bit 17) */
-#define H3800_ASIC2_CLOCK_SD_1             ( 1 << 10 )   /* 16.934 MHz to SD */
-#define H3800_ASIC2_CLOCK_SD_2             ( 2 << 10 )   /* 24.576 MHz to SD */
-#define H3800_ASIC2_CLOCK_SD_3             ( 3 << 10 )   /* 33.869 MHz to SD */
-#define H3800_ASIC2_CLOCK_SD_4             ( 4 << 10 )   /* 49.152 MHz to SD */
-#define H3800_ASIC2_CLOCK_EX0              ( 1 << 13 )   /* Enable 32.768 kHz crystal */
-#define H3800_ASIC2_CLOCK_EX1              ( 1 << 14 )   /* Enable 24.576 MHz crystal */
-#define H3800_ASIC2_CLOCK_EX2              ( 1 << 15 )   /* Enable 33.869 MHz crystal */
-#define H3800_ASIC2_CLOCK_SLOW_UART_1      ( 1 << 16 )   /* Enable 3.686 MHz to UART1 (turn off bit 8) */
-#define H3800_ASIC2_CLOCK_SLOW_UART_0      ( 1 << 17 )   /* Enable 3.686 MHz to UART0 (turn off bit 9) */
-
-#define _H3800_ASIC2_ADC_Base                  0x1200
-#define _H3800_ASIC2_ADC_Multiplexer           0x0000    /* R/W 4 bits - low 3 bits set channel */
-#define _H3800_ASIC2_ADC_ControlStatus         0x0004    /* R/W 8 bits */
-#define _H3800_ASIC2_ADC_Data                  0x0008    /* R   10 bits */
-
-#define H3800_ASIC2_ADC_Multiplexer       H3800_ASIC2_OFFSET(  u8, ADC, Multiplexer )
-#define H3800_ASIC2_ADC_ControlStatus     H3800_ASIC2_OFFSET(  u8, ADC, ControlStatus )
-#define H3800_ASIC2_ADC_Data              H3800_ASIC2_OFFSET( u16, ADC, Data )
-
-#define H3600_ASIC2_ADC_MUX_CHANNEL_MASK         0x07    /* Low 3 bits sets channel.  max = 4 */
-#define H3600_ASIC2_ADC_MUX_CLKEN          ( 1 << 3 )    /* Enable clock */
-
-#define H3600_ASIC2_ADC_CSR_ADPS_MASK            0x0f    /* Low 4 bits sets prescale, max = 8 */
-#define H3600_ASIC2_ADC_CSR_FREE_RUN       ( 1 << 4 )
-#define H3600_ASIC2_ADC_CSR_INT_ENABLE     ( 1 << 5 )
-#define H3600_ASIC2_ADC_CSR_START          ( 1 << 6 )    /* Set to start conversion.  Goes to 0 when done */
-#define H3600_ASIC2_ADC_CSR_ENABLE         ( 1 << 7 )    /* 1:power up ADC, 0:power down */
-
-
-#define _H3800_ASIC2_INTR_Base                 0x1600
-#define _H3800_ASIC2_INTR_MaskAndFlag          0x0000    /* R/(W) 8bits */
-#define _H3800_ASIC2_INTR_ClockPrescale        0x0004    /* R/(W) 5bits */
-#define _H3800_ASIC2_INTR_TimerSet             0x0008    /* R/(W) 8bits */
-
-#define H3800_ASIC2_INTR_MaskAndFlag      H3800_ASIC2_OFFSET( u8, INTR, MaskAndFlag )
-#define H3800_ASIC2_INTR_ClockPrescale    H3800_ASIC2_OFFSET( u8, INTR, ClockPrescale )
-#define H3800_ASIC2_INTR_TimerSet         H3800_ASIC2_OFFSET( u8, INTR, TimerSet )
-
-#define H3800_ASIC2_INTR_GLOBAL_MASK       ( 1 << 0 )    /* Global interrupt mask */
-#define H3800_ASIC2_INTR_POWER_ON_RESET    ( 1 << 1 )    /* 01: Power on reset (bits 1 & 2 ) */
-#define H3800_ASIC2_INTR_EXTERNAL_RESET    ( 2 << 1 )    /* 10: External reset (bits 1 & 2 ) */
-#define H3800_ASIC2_INTR_MASK_UART_0       ( 1 << 4 )
-#define H3800_ASIC2_INTR_MASK_UART_1       ( 1 << 5 )
-#define H3800_ASIC2_INTR_MASK_TIMER        ( 1 << 6 )
-#define H3800_ASIC2_INTR_MASK_OWM          ( 1 << 7 )
-
-#define H3800_ASIC2_INTR_CLOCK_PRESCALE          0x0f    /* 4 bits, max 14 */
-#define H3800_ASIC2_INTR_SET               ( 1 << 4 )    /* Time base enable */
-
-
-#define _H3800_ASIC2_OWM_Base                  0x1800
-#define _H3800_ASIC2_OWM_Command               0x0000    /* R/W 4 bits command register */
-#define _H3800_ASIC2_OWM_Data                  0x0004    /* R/W 8 bits, transmit / receive buffer */
-#define _H3800_ASIC2_OWM_Interrupt             0x0008    /* R/W Command register */
-#define _H3800_ASIC2_OWM_InterruptEnable       0x000c    /* R/W Command register */
-#define _H3800_ASIC2_OWM_ClockDivisor          0x0010    /* R/W 5 bits of divisor and pre-scale */
-
-#define H3800_ASIC2_OWM_Command            H3800_ASIC2_OFFSET( u8, OWM, Command )
-#define H3800_ASIC2_OWM_Data               H3800_ASIC2_OFFSET( u8, OWM, Data )
-#define H3800_ASIC2_OWM_Interrupt          H3800_ASIC2_OFFSET( u8, OWM, Interrupt )
-#define H3800_ASIC2_OWM_InterruptEnable    H3800_ASIC2_OFFSET( u8, OWM, InterruptEnable )
-#define H3800_ASIC2_OWM_ClockDivisor       H3800_ASIC2_OFFSET( u8, OWM, ClockDivisor )
-
-#define H3800_ASIC2_OWM_CMD_ONE_WIRE_RESET ( 1 << 0 )    /* Set to force reset on 1-wire bus */
-#define H3800_ASIC2_OWM_CMD_SRA            ( 1 << 1 )    /* Set to switch to Search ROM accelerator mode */
-#define H3800_ASIC2_OWM_CMD_DQ_OUTPUT      ( 1 << 2 )    /* Write only - forces bus low */
-#define H3800_ASIC2_OWM_CMD_DQ_INPUT       ( 1 << 3 )    /* Read only - reflects state of bus */
-
-#define H3800_ASIC2_OWM_INT_PD             ( 1 << 0 )    /* Presence detect */
-#define H3800_ASIC2_OWM_INT_PDR            ( 1 << 1 )    /* Presence detect result */
-#define H3800_ASIC2_OWM_INT_TBE            ( 1 << 2 )    /* Transmit buffer empty */
-#define H3800_ASIC2_OWM_INT_TEMT           ( 1 << 3 )    /* Transmit shift register empty */
-#define H3800_ASIC2_OWM_INT_RBF            ( 1 << 4 )    /* Receive buffer full */
-
-#define H3800_ASIC2_OWM_INTEN_EPD          ( 1 << 0 )    /* Enable receive buffer full interrupt */
-#define H3800_ASIC2_OWM_INTEN_IAS          ( 1 << 1 )    /* Enable transmit shift register empty interrupt */
-#define H3800_ASIC2_OWM_INTEN_ETBE         ( 1 << 2 )    /* Enable transmit buffer empty interrupt */
-#define H3800_ASIC2_OWM_INTEN_ETMT         ( 1 << 3 )    /* INTR active state */
-#define H3800_ASIC2_OWM_INTEN_ERBF         ( 1 << 4 )    /* Enable presence detect interrupt */
-
-#define _H3800_ASIC2_FlashCtl_Base             0x1A00
-
-/****************************************************/
-/* H3800, ASIC #1
- * This ASIC is accesed through ASIC #2, and
- * mapped into the 1c00 - 1f00 region
- */
-
-#define H3800_ASIC1_OFFSET(s,x,y)   \
-     (*((volatile s *) (_H3800_ASIC2_Base + _H3800_ASIC1_ ## x ## _Base + (_H3800_ASIC1_ ## x ## _ ## y << 1))))
-
-#define _H3800_ASIC1_MMC_Base             0x1c00
-
-#define _H3800_ASIC1_MMC_StartStopClock     0x00    /* R/W 8bit                                  */
-#define _H3800_ASIC1_MMC_Status             0x02    /* R   See below, default 0x0040             */
-#define _H3800_ASIC1_MMC_ClockRate          0x04    /* R/W 8bit, low 3 bits are clock divisor    */
-#define _H3800_ASIC1_MMC_SPIRegister        0x08    /* R/W 8bit, see below                       */
-#define _H3800_ASIC1_MMC_CmdDataCont        0x0a    /* R/W 8bit, write to start MMC adapter      */
-#define _H3800_ASIC1_MMC_ResponseTimeout    0x0c    /* R/W 8bit, clocks before response timeout  */
-#define _H3800_ASIC1_MMC_ReadTimeout        0x0e    /* R/W 16bit, clocks before received data timeout */
-#define _H3800_ASIC1_MMC_BlockLength        0x10    /* R/W 10bit */
-#define _H3800_ASIC1_MMC_NumOfBlocks        0x12    /* R/W 16bit, in block mode, number of blocks  */
-#define _H3800_ASIC1_MMC_InterruptMask      0x1a    /* R/W 8bit */
-#define _H3800_ASIC1_MMC_CommandNumber      0x1c    /* R/W 6 bits */
-#define _H3800_ASIC1_MMC_ArgumentH          0x1e    /* R/W 16 bits  */
-#define _H3800_ASIC1_MMC_ArgumentL          0x20    /* R/W 16 bits */
-#define _H3800_ASIC1_MMC_ResFifo            0x22    /* R   8 x 16 bits - contains response FIFO */
-#define _H3800_ASIC1_MMC_BufferPartFull     0x28    /* R/W 8 bits */
-
-#define H3800_ASIC1_MMC_StartStopClock    H3800_ASIC1_OFFSET(  u8, MMC, StartStopClock )
-#define H3800_ASIC1_MMC_Status            H3800_ASIC1_OFFSET( u16, MMC, Status )
-#define H3800_ASIC1_MMC_ClockRate         H3800_ASIC1_OFFSET(  u8, MMC, ClockRate )
-#define H3800_ASIC1_MMC_SPIRegister       H3800_ASIC1_OFFSET(  u8, MMC, SPIRegister )
-#define H3800_ASIC1_MMC_CmdDataCont       H3800_ASIC1_OFFSET(  u8, MMC, CmdDataCont )
-#define H3800_ASIC1_MMC_ResponseTimeout   H3800_ASIC1_OFFSET(  u8, MMC, ResponseTimeout )
-#define H3800_ASIC1_MMC_ReadTimeout       H3800_ASIC1_OFFSET( u16, MMC, ReadTimeout )
-#define H3800_ASIC1_MMC_BlockLength       H3800_ASIC1_OFFSET( u16, MMC, BlockLength )
-#define H3800_ASIC1_MMC_NumOfBlocks       H3800_ASIC1_OFFSET( u16, MMC, NumOfBlocks )
-#define H3800_ASIC1_MMC_InterruptMask     H3800_ASIC1_OFFSET(  u8, MMC, InterruptMask )
-#define H3800_ASIC1_MMC_CommandNumber     H3800_ASIC1_OFFSET(  u8, MMC, CommandNumber )
-#define H3800_ASIC1_MMC_ArgumentH         H3800_ASIC1_OFFSET( u16, MMC, ArgumentH )
-#define H3800_ASIC1_MMC_ArgumentL         H3800_ASIC1_OFFSET( u16, MMC, ArgumentL )
-#define H3800_ASIC1_MMC_ResFifo           H3800_ASIC1_OFFSET( u16, MMC, ResFifo )
-#define H3800_ASIC1_MMC_BufferPartFull    H3800_ASIC1_OFFSET(  u8, MMC, BufferPartFull )
-
-#define H3800_ASIC1_MMC_STOP_CLOCK                   (1 << 0)   /* Write to "StartStopClock" register */
-#define H3800_ASIC1_MMC_START_CLOCK                  (1 << 1)
-
-#define H3800_ASIC1_MMC_STATUS_READ_TIMEOUT          (1 << 0)
-#define H3800_ASIC1_MMC_STATUS_RESPONSE_TIMEOUT      (1 << 1)
-#define H3800_ASIC1_MMC_STATUS_CRC_WRITE_ERROR       (1 << 2)
-#define H3800_ASIC1_MMC_STATUS_CRC_READ_ERROR        (1 << 3)
-#define H3800_ASIC1_MMC_STATUS_SPI_READ_ERROR        (1 << 4)  /* SPI data token error received */
-#define H3800_ASIC1_MMC_STATUS_CRC_RESPONSE_ERROR    (1 << 5)
-#define H3800_ASIC1_MMC_STATUS_FIFO_EMPTY            (1 << 6)
-#define H3800_ASIC1_MMC_STATUS_FIFO_FULL             (1 << 7)
-#define H3800_ASIC1_MMC_STATUS_CLOCK_ENABLE          (1 << 8)  /* MultiMediaCard clock stopped */
-#define H3800_ASIC1_MMC_STATUS_DATA_TRANSFER_DONE    (1 << 11) /* Write operation, indicates transfer finished */
-#define H3800_ASIC1_MMC_STATUS_END_PROGRAM           (1 << 12) /* End write and read operations */
-#define H3800_ASIC1_MMC_STATUS_END_COMMAND_RESPONSE  (1 << 13) /* End command response */
-
-#define H3800_ASIC1_MMC_SPI_REG_SPI_ENABLE           (1 << 0)  /* Enables SPI mode */
-#define H3800_ASIC1_MMC_SPI_REG_CRC_ON               (1 << 1)  /* 1:turn on CRC    */
-#define H3800_ASIC1_MMC_SPI_REG_SPI_CS_ENABLE        (1 << 2)  /* 1:turn on SPI CS */
-#define H3800_ASIC1_MMC_SPI_REG_CS_ADDRESS_MASK      0x38      /* Bits 3,4,5 are the SPI CS relative address */
-
-#define H3800_ASIC1_MMC_CMD_DATA_CONT_FORMAT_NO_RESPONSE  0x00
-#define H3800_ASIC1_MMC_CMD_DATA_CONT_FORMAT_R1           0x01
-#define H3800_ASIC1_MMC_CMD_DATA_CONT_FORMAT_R2           0x02
-#define H3800_ASIC1_MMC_CMD_DATA_CONT_FORMAT_R3           0x03
-#define H3800_ASIC1_MMC_CMD_DATA_CONT_DATA_ENABLE         (1 << 2)  /* This command contains a data transfer */
-#define H3800_ASIC1_MMC_CMD_DATA_CONT_WRITE               (1 << 3)  /* This data transfer is a write */
-#define H3800_ASIC1_MMC_CMD_DATA_CONT_STREAM_MODE         (1 << 4)  /* This data transfer is in stream mode */
-#define H3800_ASIC1_MMC_CMD_DATA_CONT_BUSY_BIT            (1 << 5)  /* Busy signal expected after current cmd */
-#define H3800_ASIC1_MMC_CMD_DATA_CONT_INITIALIZE          (1 << 6)  /* Enables the 80 bits for initializing card */
-
-#define H3800_ASIC1_MMC_INT_MASK_DATA_TRANSFER_DONE       (1 << 0)
-#define H3800_ASIC1_MMC_INT_MASK_PROGRAM_DONE             (1 << 1)
-#define H3800_ASIC1_MMC_INT_MASK_END_COMMAND_RESPONSE     (1 << 2)
-#define H3800_ASIC1_MMC_INT_MASK_BUFFER_READY             (1 << 3)
-
-#define H3800_ASIC1_MMC_BUFFER_PART_FULL                  (1 << 0)
-
-/********* GPIO **********/
-
-#define _H3800_ASIC1_GPIO_Base        0x1e00
-
-#define _H3800_ASIC1_GPIO_Mask          0x30    /* R/W 0:don't mask, 1:mask interrupt */
-#define _H3800_ASIC1_GPIO_Direction     0x32    /* R/W 0:input, 1:output              */
-#define _H3800_ASIC1_GPIO_Out           0x34    /* R/W 0:output low, 1:output high    */
-#define _H3800_ASIC1_GPIO_TriggerType   0x36    /* R/W 0:level, 1:edge                */
-#define _H3800_ASIC1_GPIO_EdgeTrigger   0x38    /* R/W 0:falling, 1:rising            */
-#define _H3800_ASIC1_GPIO_LevelTrigger  0x3A    /* R/W 0:low, 1:high level detect     */
-#define _H3800_ASIC1_GPIO_LevelStatus   0x3C    /* R/W 0:none, 1:detect               */
-#define _H3800_ASIC1_GPIO_EdgeStatus    0x3E    /* R/W 0:none, 1:detect               */
-#define _H3800_ASIC1_GPIO_State         0x40    /* R   See masks below  (default 0)         */
-#define _H3800_ASIC1_GPIO_Reset         0x42    /* R/W See masks below  (default 0x04)      */
-#define _H3800_ASIC1_GPIO_SleepMask     0x44    /* R/W 0:don't mask, 1:mask trigger in sleep mode  */
-#define _H3800_ASIC1_GPIO_SleepDir      0x46    /* R/W direction 0:input, 1:output in sleep mode    */
-#define _H3800_ASIC1_GPIO_SleepOut      0x48    /* R/W level 0:low, 1:high in sleep mode           */
-#define _H3800_ASIC1_GPIO_Status        0x4A    /* R   Pin status                                  */
-#define _H3800_ASIC1_GPIO_BattFaultDir  0x4C    /* R/W direction 0:input, 1:output in batt_fault   */
-#define _H3800_ASIC1_GPIO_BattFaultOut  0x4E    /* R/W level 0:low, 1:high in batt_fault           */
-
-#define H3800_ASIC1_GPIO_Mask         H3800_ASIC1_OFFSET( u16, GPIO, Mask )
-#define H3800_ASIC1_GPIO_Direction    H3800_ASIC1_OFFSET( u16, GPIO, Direction )
-#define H3800_ASIC1_GPIO_Out          H3800_ASIC1_OFFSET( u16, GPIO, Out )
-#define H3800_ASIC1_GPIO_TriggerType  H3800_ASIC1_OFFSET( u16, GPIO, TriggerType )
-#define H3800_ASIC1_GPIO_EdgeTrigger  H3800_ASIC1_OFFSET( u16, GPIO, EdgeTrigger )
-#define H3800_ASIC1_GPIO_LevelTrigger H3800_ASIC1_OFFSET( u16, GPIO, LevelTrigger )
-#define H3800_ASIC1_GPIO_LevelStatus  H3800_ASIC1_OFFSET( u16, GPIO, LevelStatus )
-#define H3800_ASIC1_GPIO_EdgeStatus   H3800_ASIC1_OFFSET( u16, GPIO, EdgeStatus )
-#define H3800_ASIC1_GPIO_State        H3800_ASIC1_OFFSET(  u8, GPIO, State )
-#define H3800_ASIC1_GPIO_Reset        H3800_ASIC1_OFFSET(  u8, GPIO, Reset )
-#define H3800_ASIC1_GPIO_SleepMask    H3800_ASIC1_OFFSET( u16, GPIO, SleepMask )
-#define H3800_ASIC1_GPIO_SleepDir     H3800_ASIC1_OFFSET( u16, GPIO, SleepDir )
-#define H3800_ASIC1_GPIO_SleepOut     H3800_ASIC1_OFFSET( u16, GPIO, SleepOut )
-#define H3800_ASIC1_GPIO_Status       H3800_ASIC1_OFFSET( u16, GPIO, Status )
-#define H3800_ASIC1_GPIO_BattFaultDir H3800_ASIC1_OFFSET( u16, GPIO, BattFaultDir )
-#define H3800_ASIC1_GPIO_BattFaultOut H3800_ASIC1_OFFSET( u16, GPIO, BattFaultOut )
-
-#define H3800_ASIC1_GPIO_STATE_MASK            (1 << 0)
-#define H3800_ASIC1_GPIO_STATE_DIRECTION       (1 << 1)
-#define H3800_ASIC1_GPIO_STATE_OUT             (1 << 2)
-#define H3800_ASIC1_GPIO_STATE_TRIGGER_TYPE    (1 << 3)
-#define H3800_ASIC1_GPIO_STATE_EDGE_TRIGGER    (1 << 4)
-#define H3800_ASIC1_GPIO_STATE_LEVEL_TRIGGER   (1 << 5)
-
-#define H3800_ASIC1_GPIO_RESET_SOFTWARE        (1 << 0)
-#define H3800_ASIC1_GPIO_RESET_AUTO_SLEEP      (1 << 1)
-#define H3800_ASIC1_GPIO_RESET_FIRST_PWR_ON    (1 << 2)
-
-/* These are all outputs */
-#define GPIO_H3800_ASIC1_IR_ON_N          (1 << 0)   /* Apply power to the IR Module */
-#define GPIO_H3800_ASIC1_SD_PWR_ON        (1 << 1)   /* Secure Digital power on */
-#define GPIO_H3800_ASIC1_RS232_ON         (1 << 2)   /* Turn on power to the RS232 chip ? */
-#define GPIO_H3800_ASIC1_PULSE_GEN        (1 << 3)   /* Goes to speaker / earphone */
-#define GPIO_H3800_ASIC1_CH_TIMER         (1 << 4)   /* */
-#define GPIO_H3800_ASIC1_LCD_5V_ON        (1 << 5)   /* Enables LCD_5V */
-#define GPIO_H3800_ASIC1_LCD_ON           (1 << 6)   /* Enables LCD_3V */
-#define GPIO_H3800_ASIC1_LCD_PCI          (1 << 7)   /* Connects to PDWN on LCD controller */
-#define GPIO_H3800_ASIC1_VGH_ON           (1 << 8)   /* Drives VGH on the LCD (+9??) */
-#define GPIO_H3800_ASIC1_VGL_ON           (1 << 9)   /* Drivers VGL on the LCD (-6??) */
-#define GPIO_H3800_ASIC1_FL_PWR_ON        (1 << 10)  /* Frontlight power on */
-#define GPIO_H3800_ASIC1_BT_PWR_ON        (1 << 11)  /* Bluetooth power on */
-#define GPIO_H3800_ASIC1_SPK_ON           (1 << 12)  /* */
-#define GPIO_H3800_ASIC1_EAR_ON_N         (1 << 13)  /* */
-#define GPIO_H3800_ASIC1_AUD_PWR_ON       (1 << 14)  /* */
-
-/* Write enable for the flash */
-
-#define _H3800_ASIC1_FlashWP_Base         0x1F00
-#define _H3800_ASIC1_FlashWP_VPP_ON         0x00    /* R   1: write, 0: protect */
-#define H3800_ASIC1_FlashWP_VPP_ON       H3800_ASIC1_OFFSET( u8, FlashWP, VPP_ON )
 
 #endif /* _INCLUDE_H3600_GPIO_H_ */
index 0cb36609b3acddad08f5962323882d209b4c28b8..ae81f80b0cf9982a2dd9d833e796d7b96ae4bb7c 100644 (file)
  */
 #ifdef CONFIG_SA1111
 #define NR_IRQS                        (IRQ_S1_BVD1_STSCHG + 1)
-#elif defined(CONFIG_SA1100_H3800)
-#define NR_IRQS                        (IRQ_BOARD_END)
 #elif defined(CONFIG_SHARP_LOCOMO)
 #define NR_IRQS                        (IRQ_LOCOMO_SPI_TEND + 1)
 #else
 #define IRQ_LOCOMO_LT_BASE     (IRQ_BOARD_START + 2)
 #define IRQ_LOCOMO_SPI_BASE    (IRQ_BOARD_START + 3)
 
-/* H3800-specific IRQs (CONFIG_SA1100_H3800) */
-#define H3800_KPIO_IRQ_START    (IRQ_BOARD_START)
-#define IRQ_H3800_KEY           (IRQ_BOARD_START + 0)
-#define IRQ_H3800_SPI           (IRQ_BOARD_START + 1)
-#define IRQ_H3800_OWM           (IRQ_BOARD_START + 2)
-#define IRQ_H3800_ADC           (IRQ_BOARD_START + 3)
-#define IRQ_H3800_UART_0        (IRQ_BOARD_START + 4)
-#define IRQ_H3800_UART_1        (IRQ_BOARD_START + 5)
-#define IRQ_H3800_TIMER_0       (IRQ_BOARD_START + 6)
-#define IRQ_H3800_TIMER_1       (IRQ_BOARD_START + 7)
-#define IRQ_H3800_TIMER_2       (IRQ_BOARD_START + 8)
-#define H3800_KPIO_IRQ_COUNT    9
-
-#define H3800_GPIO_IRQ_START    (IRQ_BOARD_START + 9)
-#define IRQ_H3800_PEN           (IRQ_BOARD_START + 9)
-#define IRQ_H3800_SD_DETECT     (IRQ_BOARD_START + 10)
-#define IRQ_H3800_EAR_IN        (IRQ_BOARD_START + 11)
-#define IRQ_H3800_USB_DETECT    (IRQ_BOARD_START + 12)
-#define IRQ_H3800_SD_CON_SLT    (IRQ_BOARD_START + 13)
-#define H3800_GPIO_IRQ_COUNT    5
index 63755ca5b1b49a5c457f4efd3d205a06f76ad695..942b153e251d601ffb9fc79a87a5a07fba9bb761 100644 (file)
@@ -10,7 +10,7 @@ static inline void arch_idle(void)
        cpu_do_idle();
 }
 
-static inline void arch_reset(char mode)
+static inline void arch_reset(char mode, const char *cmd)
 {
        if (mode == 's') {
                /* Jump into ROM at address 0 */
index 81848aa9642418f51d775d13b461a9f2979ae63a..fd776bb666cd997ae50385156ecb3b709cd35272 100644 (file)
@@ -226,12 +226,22 @@ static struct platform_device jornada_ssp_device = {
        .id             = -1,
 };
 
+static struct platform_device jornada_kbd_device = {
+       .name           = "jornada720_kbd",
+       .id             = -1,
+};
+
+static struct platform_device jornada_ts_device = {
+       .name           = "jornada_ts",
+       .id             = -1,
+};
+
 static struct platform_device *devices[] __initdata = {
        &sa1111_device,
-#ifdef CONFIG_SA1100_JORNADA720_SSP
        &jornada_ssp_device,
-#endif
        &s1d13xxxfb_device,
+       &jornada_kbd_device,
+       &jornada_ts_device,
 };
 
 static int __init jornada720_init(void)
index a23fd3d0163ac973c360f2875140602b7decd3c6..358d875ace1478e67f8e32b03713917946650139 100644 (file)
 #include <asm/leds.h>
 #include <asm/param.h>
 
-#include <mach/hardware.h>
-
 #include <asm/mach/map.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/time.h>
 
+#define IO_BASE                 0xe0000000
+#define IO_SIZE                 0x08000000
+#define IO_START                0x40000000
+#define ROMCARD_SIZE            0x08000000
+#define ROMCARD_START           0x10000000
+
+void arch_reset(char mode, const char *cmd)
+{
+        short temp;
+        local_irq_disable();
+        /* Reset the Machine via pc[3] of the sequoia chipset */
+        outw(0x09,0x24);
+        temp=inw(0x26);
+        temp = temp | (1<<3) | (1<<10);
+        outw(0x09,0x24);
+        outw(temp,0x26);
+}
+
 static struct plat_serial8250_port serial_platform_data[] = {
        {
                .iobase         = 0x3f8,
@@ -50,14 +66,38 @@ static struct platform_device serial_device = {
        },
 };
 
+static struct resource rtc_resources[] = {
+       [0] = {
+               .start  = 0x70,
+               .end    = 0x73,
+               .flags  = IORESOURCE_IO,
+       },
+       [1] = {
+               .start  = IRQ_ISA_RTC_ALARM,
+               .end    = IRQ_ISA_RTC_ALARM,
+               .flags  = IORESOURCE_IRQ,
+       }
+};
+
+static struct platform_device rtc_device = {
+       .name           = "rtc_cmos",
+       .id             = -1,
+       .resource       = rtc_resources,
+       .num_resources  = ARRAY_SIZE(rtc_resources),
+};
+
 static int __init shark_init(void)
 {
        int ret;
 
        if (machine_is_shark())
+       {
+               ret = platform_device_register(&rtc_device);
+               if (ret) printk(KERN_ERR "Unable to register RTC device: %d\n", ret);
                ret = platform_device_register(&serial_device);
-
-       return ret;
+               if (ret) printk(KERN_ERR "Unable to register Serial device: %d\n", ret);
+       }
+       return 0;
 }
 
 arch_initcall(shark_init);
index 6774b8d5d13d696cbda2548198cd1834106c9dcd..10b5b8b3272a81b6bfd92068c625b72ed5174462 100644 (file)
 #include <asm/dma.h>
 #include <asm/mach/dma.h>
 
-void __init arch_dma_init(dma_t *dma)
+static int __init shark_dma_init(void)
 {
 #ifdef CONFIG_ISA_DMA
-       isa_init_dma(dma);
+       isa_init_dma();
 #endif
+       return 0;
 }
+core_initcall(shark_dma_init);
index 0836cb78b29ac5549e1c3b76858140895937d368..f97a7626bd587d39884e160e0877be571382e5f2 100644 (file)
@@ -27,5 +27,3 @@
                bne     1001b
                .endm
 
-               .macro  waituart,rd,rx
-               .endm
diff --git a/arch/arm/mach-shark/include/mach/framebuffer.h b/arch/arm/mach-shark/include/mach/framebuffer.h
new file mode 100644 (file)
index 0000000..84a5bf6
--- /dev/null
@@ -0,0 +1,16 @@
+/*
+ * arch/arm/mach-shark/include/mach/framebuffer.h
+ *
+ * by Alexander Schulz
+ *
+ */
+
+#ifndef __ASM_ARCH_FRAMEBUFFER_H
+#define __ASM_ARCH_FRAMEBUFFER_H
+
+/* defines for the Framebuffer */
+#define FB_START               0x06000000
+#define FB_SIZE                        0x01000000
+
+#endif
+
index 01bf76099ce5f65525d0ed99ad95227f1d17f94f..94d84b27a0cb47152b5d8148ef542d2073a45525 100644 (file)
 #ifndef __ASM_ARCH_HARDWARE_H
 #define __ASM_ARCH_HARDWARE_H
 
-#ifndef __ASSEMBLY__
-
-/*
- * Mapping areas
- */
-#define IO_BASE                        0xe0000000
-
-#else
-
-#define IO_BASE                        0
-
-#endif
-
-#define IO_SIZE                        0x08000000
-#define IO_START               0x40000000
-#define ROMCARD_SIZE           0x08000000
-#define ROMCARD_START          0x10000000
-
-
-/* defines for the Framebuffer */
-#define FB_START               0x06000000
-#define FB_SIZE                        0x01000000
-
 #define UNCACHEABLE_ADDR        0xdf010000
 
-#define SEQUOIA_LED_GREEN       (1<<6)
-#define SEQUOIA_LED_AMBER       (1<<5)
-#define SEQUOIA_LED_BACK        (1<<7)
-
 #define pcibios_assign_all_busses()     1
 
 #define PCIBIOS_MIN_IO          0x6000
index c5cee829fc87e59dd402e797f1242451b248c9a0..9ccbcecc430baa679a8fd800dfe409a5744f34e3 100644 (file)
 #ifndef __ASM_ARM_ARCH_IO_H
 #define __ASM_ARM_ARCH_IO_H
 
-#define PCIO_BASE      0xe0000000
-#define IO_SPACE_LIMIT 0xffffffff
+#define IO_SPACE_LIMIT 0xffffffff
 
-#define __io(a)                ((void __iomem *)(PCIO_BASE + (a)))
-#define __mem_pci(addr)        (addr)
+#define __io(a)                 ((void __iomem *)(0xe0000000 + (a)))
+
+#define __mem_pci(addr) (addr)
 
 #endif
index 0586acd7cdd5f563ba178cdb0421d290d9de04ac..c8e8a4e1f61ae2292c64ac1e4c55af9716632504 100644 (file)
@@ -7,7 +7,7 @@
 #define NR_IRQS                        16
 
 #define IRQ_ISA_KEYBOARD        1
-#define RTC_IRQ                         8
+#define IRQ_ISA_RTC_ALARM       8
 #define I8042_KBD_IRQ           1
 #define I8042_AUX_IRQ          12
 #define IRQ_HARDDISK            14
index 864298ff39274d0a1294284ba606e111cefb4220..96c43b8f8dda950a1c909efc39eba8ae40f46acc 100644 (file)
@@ -6,10 +6,6 @@
 #ifndef __ASM_ARCH_DMA_H
 #define __ASM_ARCH_DMA_H
 
-/* Use only the lowest 4MB, nothing else works.
- * The rest is not DMAable. See dev /  .properties
- * in OpenFirmware.
- */
 #define MAX_DMA_CHANNELS       8
 #define DMA_ISA_CASCADE         4
 
index c5ab038925d63a62f9dd1704f840387631d50636..3053e5b7f1685290eccc1c44a9b011c030ffd741 100644 (file)
@@ -23,6 +23,7 @@ static inline void __arch_adjust_zones(int node, unsigned long *zone_size, unsig
 {
   if (node != 0) return;
   /* Only the first 4 MB (=1024 Pages) are usable for DMA */
+  /* See dev / -> .properties in OpenFirmware. */
   zone_size[1] = zone_size[0] - 1024;
   zone_size[0] = 1024;
   zhole_size[1] = zhole_size[0];
index e45bd734a03e2e02475d1c9c29eb488e7c85b682..21c373b30bbc38079c36597d48bfee410ceaadf1 100644 (file)
@@ -6,20 +6,8 @@
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H
 
-#include <linux/io.h>
-
-static void arch_reset(char mode)
-{
-       short temp;
-       local_irq_disable();
-       /* Reset the Machine via pc[3] of the sequoia chipset */
-       outw(0x09,0x24);
-       temp=inw(0x26);
-       temp = temp | (1<<3) | (1<<10);
-       outw(0x09,0x24);
-       outw(temp,0x26);
-
-}
+/* Found in arch/mach-shark/core.c */
+extern void arch_reset(char mode, const char *cmd);
 
 static inline void arch_idle(void)
 {
index 3725e16334186013f1c50b41961c1b92c8c1c1c9..22ccab4c3c5e8610cf65a46f455bb9fe7921a224 100644 (file)
@@ -11,7 +11,7 @@
 
 static inline void putc(int c)
 {
-       int t;
+       volatile int t;
 
        SERIAL_BASE[0] = c;
        t=0x10000;
index 8bd8d6bb4d922d77f7db4202cb9471c64b4131de..c9e32de4adf98d4dfb2530bb6a1cf3862fe930db 100644 (file)
 #include <linux/ioport.h>
 #include <linux/io.h>
 
-#include <mach/hardware.h>
 #include <asm/leds.h>
 #include <asm/system.h>
 
 #define LED_STATE_ENABLED      1
 #define LED_STATE_CLAIMED      2
+
+#define SEQUOIA_LED_GREEN       (1<<6)
+#define SEQUOIA_LED_AMBER       (1<<5)
+#define SEQUOIA_LED_BACK        (1<<7)
+
 static char led_state;
 static short hw_led_state;
 static short saved_state;
index 1c43494f5c422092d713a860e1623e83078b9d05..565776680d8c1d89a285405e160bf17aac629a59 100644 (file)
@@ -335,11 +335,25 @@ static struct resource versatile_i2c_resource = {
 
 static struct platform_device versatile_i2c_device = {
        .name                   = "versatile-i2c",
-       .id                     = -1,
+       .id                     = 0,
        .num_resources          = 1,
        .resource               = &versatile_i2c_resource,
 };
 
+static struct i2c_board_info versatile_i2c_board_info[] = {
+       {
+               I2C_BOARD_INFO("rtc-ds1307", 0xd0 >> 1),
+               .type = "ds1338",
+       },
+};
+
+static int __init versatile_i2c_init(void)
+{
+       return i2c_register_board_info(0, versatile_i2c_board_info,
+                                      ARRAY_SIZE(versatile_i2c_board_info));
+}
+arch_initcall(versatile_i2c_init);
+
 #define VERSATILE_SYSMCI       (__io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_MCI_OFFSET)
 
 unsigned int mmc_status(struct device *dev)
index c59e6100c7e377744ede2095f67220a27ba84e90..8ffc12a7cb25dd0f0273d8bc6d938d067821f646 100644 (file)
@@ -34,7 +34,7 @@ static inline void arch_idle(void)
        cpu_do_idle();
 }
 
-static inline void arch_reset(char mode)
+static inline void arch_reset(char mode, const char *cmd)
 {
        u32 val;
 
index 40ff40845df0d67dd68c5800764713b5d8133e70..de29ddcb9459ba03f1d805f7c32f8a67ee0db078 100644 (file)
@@ -43,35 +43,16 @@ extern void w90p910_init_io(struct map_desc *mach_desc, int size);
 extern void w90p910_init_uarts(struct w90x900_uartcfg *cfg, int no);
 extern void w90p910_init_clocks(int xtal);
 extern void w90p910_map_io(struct map_desc *mach_desc, int size);
+extern struct platform_device w90p910_serial_device;
 extern struct sys_timer w90x900_timer;
 
-#define W90X900_RES(name)                              \
-struct resource w90x900_##name##_resource[] = {                \
-       [0] = {                                         \
-               .start = name##_PA,                     \
-               .end   = name##_PA + 0x0ff,             \
-               .flags = IORESOURCE_MEM,                \
-       },                                              \
-       [1] = {                                         \
-               .start = IRQ_##name,                    \
-               .end   = IRQ_##name,                    \
-               .flags = IORESOURCE_IRQ,                \
-       }                                               \
-}
-
-#define W90X900_DEVICE(devname, regname, devid, platdevname)           \
-struct platform_device w90x900_##devname = {                           \
-       .name           = platdevname,                                  \
-       .id             = devid,                                        \
-       .num_resources  = ARRAY_SIZE(w90x900_##regname##_resource),     \
-       .resource       = w90x900_##regname##_resource,                 \
-}
-
-#define W90X900_UARTCFG(port, flag, uc, ulc, ufc)      \
-{                                                      \
-               .hwport = port,                         \
-               .flags  = flag,                         \
-               .ucon   = uc,                           \
-               .ulcon  = ulc,                          \
-               .ufcon  = ufc,                          \
+#define W90X900_8250PORT(name)                                 \
+{                                                              \
+       .membase        = name##_BA,                            \
+       .mapbase        = name##_PA,                            \
+       .irq            = IRQ_##name,                           \
+       .uartclk        = 11313600,                             \
+       .regshift       = 2,                                    \
+       .iotype         = UPIO_MEM,                             \
+       .flags          = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,    \
 }
index 93753f922618f96ba49b2552f40966b02a3501b0..940640066857c9d9c5244aced58c830fa5616edd 100644 (file)
@@ -21,7 +21,7 @@ static void arch_idle(void)
 {
 }
 
-static void arch_reset(char mode)
+static void arch_reset(char mode, const char *cmd)
 {
        cpu_reset(0);
 }
index 9ebc93f485305f82b4651294127029535007402d..726ff6798a5630cee92197bab18bfde4202ee737 100644 (file)
@@ -22,6 +22,7 @@
 #include <linux/timer.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
+#include <linux/mtd/physmap.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <mach/map.h>
 
 #include "cpu.h"
+/*w90p910 evb norflash driver data */
 
-static struct map_desc w90p910_iodesc[] __initdata = {
+#define W90P910_FLASH_BASE     0xA0000000
+#define W90P910_FLASH_SIZE     0x400000
+
+static struct mtd_partition w90p910_flash_partitions[] = {
+       {
+               .name   =       "NOR Partition 1 for kernel (960K)",
+               .size   =       0xF0000,
+               .offset =       0x10000,
+       },
+       {
+               .name   =       "NOR Partition 2 for image (1M)",
+               .size   =       0x100000,
+               .offset =       0x100000,
+       },
+       {
+               .name   =       "NOR Partition 3 for user (2M)",
+               .size   =       0x200000,
+               .offset =       0x00200000,
+       }
 };
 
-static struct w90x900_uartcfg w90p910_uartcfgs[] = {
-       W90X900_UARTCFG(0, 0, 0, 0, 0),
-       W90X900_UARTCFG(1, 0, 0, 0, 0),
-       W90X900_UARTCFG(2, 0, 0, 0, 0),
-       W90X900_UARTCFG(3, 0, 0, 0, 0),
-       W90X900_UARTCFG(4, 0, 0, 0, 0),
+static struct physmap_flash_data w90p910_flash_data = {
+       .width          =       2,
+       .parts          =       w90p910_flash_partitions,
+       .nr_parts       =       ARRAY_SIZE(w90p910_flash_partitions),
+};
+
+static struct resource w90p910_flash_resources[] = {
+       {
+               .start  =       W90P910_FLASH_BASE,
+               .end    =       W90P910_FLASH_BASE + W90P910_FLASH_SIZE - 1,
+               .flags  =       IORESOURCE_MEM,
+       }
+};
+
+static struct platform_device w90p910_flash_device = {
+       .name           =       "physmap-flash",
+       .id             =       0,
+       .dev            = {
+                               .platform_data = &w90p910_flash_data,
+                       },
+       .resource       =       w90p910_flash_resources,
+       .num_resources  =       ARRAY_SIZE(w90p910_flash_resources),
+};
+
+static struct map_desc w90p910_iodesc[] __initdata = {
 };
 
 /*Here should be your evb resourse,such as LCD*/
 
 static struct platform_device *w90p910evb_dev[] __initdata = {
+       &w90p910_serial_device,
+       &w90p910_flash_device,
 };
 
 static void __init w90p910evb_map_io(void)
 {
        w90p910_map_io(w90p910_iodesc, ARRAY_SIZE(w90p910_iodesc));
        w90p910_init_clocks(0);
-       w90p910_init_uarts(w90p910_uartcfgs, ARRAY_SIZE(w90p910_uartcfgs));
 }
 
 static void __init w90p910evb_init(void)
index aa783bc943109d6a9fb4f4cf95f1d74782762032..2bcbaa681b9925ba8ba15e885d4a08eb44dab64f 100644 (file)
@@ -25,6 +25,7 @@
 #include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/io.h>
+#include <linux/serial_8250.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
 #include "cpu.h"
 
-/*W90P910 has five uarts*/
-
-#define MAX_UART_COUNT 5
-static int uart_count;
-static struct platform_device *uart_devs[MAX_UART_COUNT-1];
-
 /* Initial IO mappings */
 
 static struct map_desc w90p910_iodesc[] __initdata = {
@@ -53,48 +48,19 @@ static struct map_desc w90p910_iodesc[] __initdata = {
        /*IODESC_ENT(LCD),*/
 };
 
-/*Init the dev resource*/
-
-static W90X900_RES(UART0);
-static W90X900_RES(UART1);
-static W90X900_RES(UART2);
-static W90X900_RES(UART3);
-static W90X900_RES(UART4);
-static W90X900_DEVICE(uart0, UART0, 0, "w90x900-uart");
-static W90X900_DEVICE(uart1, UART1, 1, "w90x900-uart");
-static W90X900_DEVICE(uart2, UART2, 2, "w90x900-uart");
-static W90X900_DEVICE(uart3, UART3, 3, "w90x900-uart");
-static W90X900_DEVICE(uart4, UART4, 4, "w90x900-uart");
-
-static struct platform_device *uart_devices[] __initdata = {
-       &w90x900_uart0,
-       &w90x900_uart1,
-       &w90x900_uart2,
-       &w90x900_uart3,
-       &w90x900_uart4
-};
+/* Initial serial platform data */
 
-/*Init W90P910 uart device*/
+struct plat_serial8250_port w90p910_uart_data[] = {
+       W90X900_8250PORT(UART0),
+};
 
-void __init w90p910_init_uarts(struct w90x900_uartcfg *cfg, int no)
-{
-       struct platform_device *platdev;
-       int uart, uartdev;
-
-       /*By min() to judge count of uart be used indeed*/
-
-       uartdev = ARRAY_SIZE(uart_devices);
-       no = min(uartdev, no);
-
-       for (uart = 0; uart < no; uart++, cfg++) {
-               if (cfg->hwport != uart)
-                       printk(KERN_ERR "w90x900_uartcfg[%d] error\n", uart);
-               platdev = uart_devices[cfg->hwport];
-               uart_devs[uart] = platdev;
-               platdev->dev.platform_data = cfg;
-       }
-       uart_count = uart;
-}
+struct platform_device w90p910_serial_device = {
+       .name                   = "serial8250",
+       .id                     = PLAT8250_DEV_PLATFORM,
+       .dev                    = {
+               .platform_data  = w90p910_uart_data,
+       },
+};
 
 /*Init W90P910 evb io*/
 
@@ -122,13 +88,6 @@ static int __init w90p910_init_cpu(void)
 
 static int __init w90x900_arch_init(void)
 {
-       int ret;
-
-       ret = w90p910_init_cpu();
-       if (ret != 0)
-               return ret;
-
-       return platform_add_devices(uart_devs, uart_count);
-
+       return w90p910_init_cpu();
 }
 arch_initcall(w90x900_arch_init);
index d490f3773c01c12aec0b1266d55aa8b92193649b..a6230f7a24c8775994c7f75d1ffe52d4652cb076 100644 (file)
@@ -340,6 +340,17 @@ config CPU_XSC3
        select CPU_TLB_V4WBI if MMU
        select IO_36
 
+# Marvell PJ1 (Mohawk)
+config CPU_MOHAWK
+       bool
+       select CPU_32v5
+       select CPU_ABRT_EV5T
+       select CPU_PABRT_NOIFAR
+       select CPU_CACHE_VIVT
+       select CPU_CP15_MMU
+       select CPU_TLB_V4WBI if MMU
+       select CPU_COPY_V4WB if MMU
+
 # Feroceon
 config CPU_FEROCEON
        bool
@@ -569,7 +580,7 @@ comment "Processor Features"
 
 config ARM_THUMB
        bool "Support Thumb user binaries"
-       depends on CPU_ARM720T || CPU_ARM740T || CPU_ARM920T || CPU_ARM922T || CPU_ARM925T || CPU_ARM926T || CPU_ARM940T || CPU_ARM946E || CPU_ARM1020 || CPU_ARM1020E || CPU_ARM1022 || CPU_ARM1026 || CPU_XSCALE || CPU_XSC3 || CPU_V6 || CPU_V7 || CPU_FEROCEON
+       depends on CPU_ARM720T || CPU_ARM740T || CPU_ARM920T || CPU_ARM922T || CPU_ARM925T || CPU_ARM926T || CPU_ARM940T || CPU_ARM946E || CPU_ARM1020 || CPU_ARM1020E || CPU_ARM1022 || CPU_ARM1026 || CPU_XSCALE || CPU_XSC3 || CPU_MOHAWK || CPU_V6 || CPU_V7 || CPU_FEROCEON
        default y
        help
          Say Y if you want to include kernel support for running user space
@@ -653,7 +664,7 @@ config CPU_CACHE_ROUND_ROBIN
 
 config CPU_BPREDICT_DISABLE
        bool "Disable branch prediction"
-       depends on CPU_ARM1020 || CPU_V6 || CPU_XSC3 || CPU_V7
+       depends on CPU_ARM1020 || CPU_V6 || CPU_MOHAWK || CPU_XSC3 || CPU_V7
        help
          Say Y here to disable branch prediction.  If unsure, say N.
 
@@ -704,7 +715,8 @@ config CACHE_FEROCEON_L2_WRITETHROUGH
 
 config CACHE_L2X0
        bool "Enable the L2x0 outer cache controller"
-       depends on REALVIEW_EB_ARM11MP || MACH_REALVIEW_PB11MP || MACH_REALVIEW_PB1176 || REALVIEW_EB_A9MP
+       depends on REALVIEW_EB_ARM11MP || MACH_REALVIEW_PB11MP || MACH_REALVIEW_PB1176 || \
+                  REALVIEW_EB_A9MP || ARCH_MX35 || ARCH_MX31
        default y
        select OUTER_CACHE
        help
index 480f78a3611a0f96813cc0acf75a884c3c85caad..c264683538bcd07e13ade2acbf62f93c85bcbaa1 100644 (file)
@@ -16,6 +16,7 @@ obj-$(CONFIG_MODULES)         += proc-syms.o
 
 obj-$(CONFIG_ALIGNMENT_TRAP)   += alignment.o
 obj-$(CONFIG_DISCONTIGMEM)     += discontig.o
+obj-$(CONFIG_HIGHMEM)          += highmem.o
 
 obj-$(CONFIG_CPU_ABRT_NOMMU)   += abort-nommu.o
 obj-$(CONFIG_CPU_ABRT_EV4)     += abort-ev4.o
@@ -70,6 +71,7 @@ obj-$(CONFIG_CPU_SA110)               += proc-sa110.o
 obj-$(CONFIG_CPU_SA1100)       += proc-sa1100.o
 obj-$(CONFIG_CPU_XSCALE)       += proc-xscale.o
 obj-$(CONFIG_CPU_XSC3)         += proc-xsc3.o
+obj-$(CONFIG_CPU_MOHAWK)       += proc-mohawk.o
 obj-$(CONFIG_CPU_FEROCEON)     += proc-feroceon.o
 obj-$(CONFIG_CPU_V6)           += proc-v6.o
 obj-$(CONFIG_CPU_V7)           += proc-v7.o
index 80cd207cbaea14c282e368fe08791d1ebcf09b2c..d6dd83826f8af0baffd833ad11807d18377d5cfb 100644 (file)
 
 #include <linux/init.h>
 #include <asm/cacheflush.h>
+#include <asm/kmap_types.h>
+#include <asm/fixmap.h>
+#include <asm/pgtable.h>
+#include <asm/tlbflush.h>
 #include <plat/cache-feroceon-l2.h>
-
+#include "mm.h"
 
 /*
  * Low-level cache maintenance operations.
  * The range operations require two successive cp15 writes, in
  * between which we don't want to be preempted.
  */
+
+static inline unsigned long l2_start_va(unsigned long paddr)
+{
+#ifdef CONFIG_HIGHMEM
+       /*
+        * Let's do our own fixmap stuff in a minimal way here.
+        * Because range ops can't be done on physical addresses,
+        * we simply install a virtual mapping for it only for the
+        * TLB lookup to occur, hence no need to flush the untouched
+        * memory mapping.  This is protected with the disabling of
+        * interrupts by the caller.
+        */
+       unsigned long idx = KM_L2_CACHE + KM_TYPE_NR * smp_processor_id();
+       unsigned long vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
+       set_pte_ext(TOP_PTE(vaddr), pfn_pte(paddr >> PAGE_SHIFT, PAGE_KERNEL), 0);
+       local_flush_tlb_kernel_page(vaddr);
+       return vaddr + (paddr & ~PAGE_MASK);
+#else
+       return __phys_to_virt(paddr);
+#endif
+}
+
 static inline void l2_clean_pa(unsigned long addr)
 {
        __asm__("mcr p15, 1, %0, c15, c9, 3" : : "r" (addr));
 }
 
-static inline void l2_clean_mva_range(unsigned long start, unsigned long end)
+static inline void l2_clean_pa_range(unsigned long start, unsigned long end)
 {
-       unsigned long flags;
+       unsigned long va_start, va_end, flags;
 
        /*
         * Make sure 'start' and 'end' reference the same page, as
@@ -51,17 +77,14 @@ static inline void l2_clean_mva_range(unsigned long start, unsigned long end)
        BUG_ON((start ^ end) >> PAGE_SHIFT);
 
        raw_local_irq_save(flags);
+       va_start = l2_start_va(start);
+       va_end = va_start + (end - start);
        __asm__("mcr p15, 1, %0, c15, c9, 4\n\t"
                "mcr p15, 1, %1, c15, c9, 5"
-               : : "r" (start), "r" (end));
+               : : "r" (va_start), "r" (va_end));
        raw_local_irq_restore(flags);
 }
 
-static inline void l2_clean_pa_range(unsigned long start, unsigned long end)
-{
-       l2_clean_mva_range(__phys_to_virt(start), __phys_to_virt(end));
-}
-
 static inline void l2_clean_inv_pa(unsigned long addr)
 {
        __asm__("mcr p15, 1, %0, c15, c10, 3" : : "r" (addr));
@@ -72,9 +95,9 @@ static inline void l2_inv_pa(unsigned long addr)
        __asm__("mcr p15, 1, %0, c15, c11, 3" : : "r" (addr));
 }
 
-static inline void l2_inv_mva_range(unsigned long start, unsigned long end)
+static inline void l2_inv_pa_range(unsigned long start, unsigned long end)
 {
-       unsigned long flags;
+       unsigned long va_start, va_end, flags;
 
        /*
         * Make sure 'start' and 'end' reference the same page, as
@@ -84,17 +107,14 @@ static inline void l2_inv_mva_range(unsigned long start, unsigned long end)
        BUG_ON((start ^ end) >> PAGE_SHIFT);
 
        raw_local_irq_save(flags);
+       va_start = l2_start_va(start);
+       va_end = va_start + (end - start);
        __asm__("mcr p15, 1, %0, c15, c11, 4\n\t"
                "mcr p15, 1, %1, c15, c11, 5"
-               : : "r" (start), "r" (end));
+               : : "r" (va_start), "r" (va_end));
        raw_local_irq_restore(flags);
 }
 
-static inline void l2_inv_pa_range(unsigned long start, unsigned long end)
-{
-       l2_inv_mva_range(__phys_to_virt(start), __phys_to_virt(end));
-}
-
 
 /*
  * Linux primitives.
index 464de893a988033180ac9bb7e25c1a53daa6f149..5d180cb0bd94dab8281b3a22836a49d5b8de3a64 100644 (file)
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  */
 #include <linux/init.h>
-#include <linux/spinlock.h>
-#include <linux/io.h>
-
 #include <asm/system.h>
 #include <asm/cputype.h>
 #include <asm/cacheflush.h>
+#include <asm/kmap_types.h>
+#include <asm/fixmap.h>
+#include <asm/pgtable.h>
+#include <asm/tlbflush.h>
+#include "mm.h"
 
 #define CR_L2  (1 << 26)
 
@@ -47,21 +49,11 @@ static inline void xsc3_l2_clean_mva(unsigned long addr)
        __asm__("mcr p15, 1, %0, c7, c11, 1" : : "r" (addr));
 }
 
-static inline void xsc3_l2_clean_pa(unsigned long addr)
-{
-       xsc3_l2_clean_mva(__phys_to_virt(addr));
-}
-
 static inline void xsc3_l2_inv_mva(unsigned long addr)
 {
        __asm__("mcr p15, 1, %0, c7, c7, 1" : : "r" (addr));
 }
 
-static inline void xsc3_l2_inv_pa(unsigned long addr)
-{
-       xsc3_l2_inv_mva(__phys_to_virt(addr));
-}
-
 static inline void xsc3_l2_inv_all(void)
 {
        unsigned long l2ctype, set_way;
@@ -79,50 +71,103 @@ static inline void xsc3_l2_inv_all(void)
        dsb();
 }
 
+#ifdef CONFIG_HIGHMEM
+#define l2_map_save_flags(x)           raw_local_save_flags(x)
+#define l2_map_restore_flags(x)                raw_local_irq_restore(x)
+#else
+#define l2_map_save_flags(x)           ((x) = 0)
+#define l2_map_restore_flags(x)                ((void)(x))
+#endif
+
+static inline unsigned long l2_map_va(unsigned long pa, unsigned long prev_va,
+                                     unsigned long flags)
+{
+#ifdef CONFIG_HIGHMEM
+       unsigned long va = prev_va & PAGE_MASK;
+       unsigned long pa_offset = pa << (32 - PAGE_SHIFT);
+       if (unlikely(pa_offset < (prev_va << (32 - PAGE_SHIFT)))) {
+               /*
+                * Switching to a new page.  Because cache ops are
+                * using virtual addresses only, we must put a mapping
+                * in place for it.  We also enable interrupts for a
+                * short while and disable them again to protect this
+                * mapping.
+                */
+               unsigned long idx;
+               raw_local_irq_restore(flags);
+               idx = KM_L2_CACHE + KM_TYPE_NR * smp_processor_id();
+               va = __fix_to_virt(FIX_KMAP_BEGIN + idx);
+               raw_local_irq_restore(flags | PSR_I_BIT);
+               set_pte_ext(TOP_PTE(va), pfn_pte(pa >> PAGE_SHIFT, PAGE_KERNEL), 0);
+               local_flush_tlb_kernel_page(va);
+       }
+       return va + (pa_offset >> (32 - PAGE_SHIFT));
+#else
+       return __phys_to_virt(pa);
+#endif
+}
+
 static void xsc3_l2_inv_range(unsigned long start, unsigned long end)
 {
+       unsigned long vaddr, flags;
+
        if (start == 0 && end == -1ul) {
                xsc3_l2_inv_all();
                return;
        }
 
+       vaddr = -1;  /* to force the first mapping */
+       l2_map_save_flags(flags);
+
        /*
         * Clean and invalidate partial first cache line.
         */
        if (start & (CACHE_LINE_SIZE - 1)) {
-               xsc3_l2_clean_pa(start & ~(CACHE_LINE_SIZE - 1));
-               xsc3_l2_inv_pa(start & ~(CACHE_LINE_SIZE - 1));
+               vaddr = l2_map_va(start & ~(CACHE_LINE_SIZE - 1), vaddr, flags);
+               xsc3_l2_clean_mva(vaddr);
+               xsc3_l2_inv_mva(vaddr);
                start = (start | (CACHE_LINE_SIZE - 1)) + 1;
        }
 
        /*
-        * Clean and invalidate partial last cache line.
+        * Invalidate all full cache lines between 'start' and 'end'.
         */
-       if (start < end && (end & (CACHE_LINE_SIZE - 1))) {
-               xsc3_l2_clean_pa(end & ~(CACHE_LINE_SIZE - 1));
-               xsc3_l2_inv_pa(end & ~(CACHE_LINE_SIZE - 1));
-               end &= ~(CACHE_LINE_SIZE - 1);
+       while (start < (end & ~(CACHE_LINE_SIZE - 1))) {
+               vaddr = l2_map_va(start, vaddr, flags);
+               xsc3_l2_inv_mva(vaddr);
+               start += CACHE_LINE_SIZE;
        }
 
        /*
-        * Invalidate all full cache lines between 'start' and 'end'.
+        * Clean and invalidate partial last cache line.
         */
-       while (start < end) {
-               xsc3_l2_inv_pa(start);
-               start += CACHE_LINE_SIZE;
+       if (start < end) {
+               vaddr = l2_map_va(start, vaddr, flags);
+               xsc3_l2_clean_mva(vaddr);
+               xsc3_l2_inv_mva(vaddr);
        }
 
+       l2_map_restore_flags(flags);
+
        dsb();
 }
 
 static void xsc3_l2_clean_range(unsigned long start, unsigned long end)
 {
+       unsigned long vaddr, flags;
+
+       vaddr = -1;  /* to force the first mapping */
+       l2_map_save_flags(flags);
+
        start &= ~(CACHE_LINE_SIZE - 1);
        while (start < end) {
-               xsc3_l2_clean_pa(start);
+               vaddr = l2_map_va(start, vaddr, flags);
+               xsc3_l2_clean_mva(vaddr);
                start += CACHE_LINE_SIZE;
        }
 
+       l2_map_restore_flags(flags);
+
        dsb();
 }
 
@@ -148,18 +193,26 @@ static inline void xsc3_l2_flush_all(void)
 
 static void xsc3_l2_flush_range(unsigned long start, unsigned long end)
 {
+       unsigned long vaddr, flags;
+
        if (start == 0 && end == -1ul) {
                xsc3_l2_flush_all();
                return;
        }
 
+       vaddr = -1;  /* to force the first mapping */
+       l2_map_save_flags(flags);
+
        start &= ~(CACHE_LINE_SIZE - 1);
        while (start < end) {
-               xsc3_l2_clean_pa(start);
-               xsc3_l2_inv_pa(start);
+               vaddr = l2_map_va(start, vaddr, flags);
+               xsc3_l2_clean_mva(vaddr);
+               xsc3_l2_inv_mva(vaddr);
                start += CACHE_LINE_SIZE;
        }
 
+       l2_map_restore_flags(flags);
+
        dsb();
 }
 
index 310e479309efbfa038b8bbc411ef4a991f942310..510c179b0ac873b2ee26c5bbaa70db25caabece9 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/dma-mapping.h>
 
 #include <asm/memory.h>
+#include <asm/highmem.h>
 #include <asm/cacheflush.h>
 #include <asm/tlbflush.h>
 #include <asm/sizes.h>
@@ -490,29 +491,101 @@ core_initcall(consistent_init);
  */
 void dma_cache_maint(const void *start, size_t size, int direction)
 {
-       const void *end = start + size;
+       void (*inner_op)(const void *, const void *);
+       void (*outer_op)(unsigned long, unsigned long);
 
-       BUG_ON(!virt_addr_valid(start) || !virt_addr_valid(end - 1));
+       BUG_ON(!virt_addr_valid(start) || !virt_addr_valid(start + size - 1));
 
        switch (direction) {
        case DMA_FROM_DEVICE:           /* invalidate only */
-               dmac_inv_range(start, end);
-               outer_inv_range(__pa(start), __pa(end));
+               inner_op = dmac_inv_range;
+               outer_op = outer_inv_range;
                break;
        case DMA_TO_DEVICE:             /* writeback only */
-               dmac_clean_range(start, end);
-               outer_clean_range(__pa(start), __pa(end));
+               inner_op = dmac_clean_range;
+               outer_op = outer_clean_range;
                break;
        case DMA_BIDIRECTIONAL:         /* writeback and invalidate */
-               dmac_flush_range(start, end);
-               outer_flush_range(__pa(start), __pa(end));
+               inner_op = dmac_flush_range;
+               outer_op = outer_flush_range;
                break;
        default:
                BUG();
        }
+
+       inner_op(start, start + size);
+       outer_op(__pa(start), __pa(start) + size);
 }
 EXPORT_SYMBOL(dma_cache_maint);
 
+static void dma_cache_maint_contiguous(struct page *page, unsigned long offset,
+                                      size_t size, int direction)
+{
+       void *vaddr;
+       unsigned long paddr;
+       void (*inner_op)(const void *, const void *);
+       void (*outer_op)(unsigned long, unsigned long);
+
+       switch (direction) {
+       case DMA_FROM_DEVICE:           /* invalidate only */
+               inner_op = dmac_inv_range;
+               outer_op = outer_inv_range;
+               break;
+       case DMA_TO_DEVICE:             /* writeback only */
+               inner_op = dmac_clean_range;
+               outer_op = outer_clean_range;
+               break;
+       case DMA_BIDIRECTIONAL:         /* writeback and invalidate */
+               inner_op = dmac_flush_range;
+               outer_op = outer_flush_range;
+               break;
+       default:
+               BUG();
+       }
+
+       if (!PageHighMem(page)) {
+               vaddr = page_address(page) + offset;
+               inner_op(vaddr, vaddr + size);
+       } else {
+               vaddr = kmap_high_get(page);
+               if (vaddr) {
+                       vaddr += offset;
+                       inner_op(vaddr, vaddr + size);
+                       kunmap_high(page);
+               }
+       }
+
+       paddr = page_to_phys(page) + offset;
+       outer_op(paddr, paddr + size);
+}
+
+void dma_cache_maint_page(struct page *page, unsigned long offset,
+                         size_t size, int dir)
+{
+       /*
+        * A single sg entry may refer to multiple physically contiguous
+        * pages.  But we still need to process highmem pages individually.
+        * If highmem is not configured then the bulk of this loop gets
+        * optimized out.
+        */
+       size_t left = size;
+       do {
+               size_t len = left;
+               if (PageHighMem(page) && len + offset > PAGE_SIZE) {
+                       if (offset >= PAGE_SIZE) {
+                               page += offset / PAGE_SIZE;
+                               offset %= PAGE_SIZE;
+                       }
+                       len = PAGE_SIZE - offset;
+               }
+               dma_cache_maint_contiguous(page, offset, len, dir);
+               offset = 0;
+               page++;
+               left -= len;
+       } while (left);
+}
+EXPORT_SYMBOL(dma_cache_maint_page);
+
 /**
  * dma_map_sg - map a set of SG buffers for streaming mode DMA
  * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
@@ -610,7 +683,8 @@ void dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg,
                        continue;
 
                if (!arch_is_coherent())
-                       dma_cache_maint(sg_virt(s), s->length, dir);
+                       dma_cache_maint_page(sg_page(s), s->offset,
+                                            s->length, dir);
        }
 }
 EXPORT_SYMBOL(dma_sync_sg_for_device);
index 0fa9bf388f0b07d504c1faaadbb9dc953e6a2e91..4e283481cee126e9697c7320203441a8db27cd78 100644 (file)
@@ -192,7 +192,7 @@ void flush_dcache_page(struct page *page)
        struct address_space *mapping = page_mapping(page);
 
 #ifndef CONFIG_SMP
-       if (mapping && !mapping_mapped(mapping))
+       if (!PageHighMem(page) && mapping && !mapping_mapped(mapping))
                set_bit(PG_dcache_dirty, &page->flags);
        else
 #endif
diff --git a/arch/arm/mm/highmem.c b/arch/arm/mm/highmem.c
new file mode 100644 (file)
index 0000000..a34954d
--- /dev/null
@@ -0,0 +1,116 @@
+/*
+ * arch/arm/mm/highmem.c -- ARM highmem support
+ *
+ * Author:     Nicolas Pitre
+ * Created:    september 8, 2008
+ * Copyright:  Marvell Semiconductors Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/module.h>
+#include <linux/highmem.h>
+#include <linux/interrupt.h>
+#include <asm/fixmap.h>
+#include <asm/cacheflush.h>
+#include <asm/tlbflush.h>
+#include "mm.h"
+
+void *kmap(struct page *page)
+{
+       might_sleep();
+       if (!PageHighMem(page))
+               return page_address(page);
+       return kmap_high(page);
+}
+EXPORT_SYMBOL(kmap);
+
+void kunmap(struct page *page)
+{
+       BUG_ON(in_interrupt());
+       if (!PageHighMem(page))
+               return;
+       kunmap_high(page);
+}
+EXPORT_SYMBOL(kunmap);
+
+void *kmap_atomic(struct page *page, enum km_type type)
+{
+       unsigned int idx;
+       unsigned long vaddr;
+
+       pagefault_disable();
+       if (!PageHighMem(page))
+               return page_address(page);
+
+       idx = type + KM_TYPE_NR * smp_processor_id();
+       vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
+#ifdef CONFIG_DEBUG_HIGHMEM
+       /*
+        * With debugging enabled, kunmap_atomic forces that entry to 0.
+        * Make sure it was indeed properly unmapped.
+        */
+       BUG_ON(!pte_none(*(TOP_PTE(vaddr))));
+#endif
+       set_pte_ext(TOP_PTE(vaddr), mk_pte(page, kmap_prot), 0);
+       /*
+        * When debugging is off, kunmap_atomic leaves the previous mapping
+        * in place, so this TLB flush ensures the TLB is updated with the
+        * new mapping.
+        */
+       local_flush_tlb_kernel_page(vaddr);
+
+       return (void *)vaddr;
+}
+EXPORT_SYMBOL(kmap_atomic);
+
+void kunmap_atomic(void *kvaddr, enum km_type type)
+{
+       unsigned long vaddr = (unsigned long) kvaddr & PAGE_MASK;
+       unsigned int idx = type + KM_TYPE_NR * smp_processor_id();
+
+       if (kvaddr >= (void *)FIXADDR_START) {
+               __cpuc_flush_dcache_page((void *)vaddr);
+#ifdef CONFIG_DEBUG_HIGHMEM
+               BUG_ON(vaddr != __fix_to_virt(FIX_KMAP_BEGIN + idx));
+               set_pte_ext(TOP_PTE(vaddr), __pte(0), 0);
+               local_flush_tlb_kernel_page(vaddr);
+#else
+               (void) idx;  /* to kill a warning */
+#endif
+       }
+       pagefault_enable();
+}
+EXPORT_SYMBOL(kunmap_atomic);
+
+void *kmap_atomic_pfn(unsigned long pfn, enum km_type type)
+{
+       unsigned int idx;
+       unsigned long vaddr;
+
+       pagefault_disable();
+
+       idx = type + KM_TYPE_NR * smp_processor_id();
+       vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
+#ifdef CONFIG_DEBUG_HIGHMEM
+       BUG_ON(!pte_none(*(TOP_PTE(vaddr))));
+#endif
+       set_pte_ext(TOP_PTE(vaddr), pfn_pte(pfn, kmap_prot), 0);
+       local_flush_tlb_kernel_page(vaddr);
+
+       return (void *)vaddr;
+}
+
+struct page *kmap_atomic_to_page(const void *ptr)
+{
+       unsigned long vaddr = (unsigned long)ptr;
+       pte_t *pte;
+
+       if (vaddr < FIXADDR_START)
+               return virt_to_page(ptr);
+
+       pte = TOP_PTE(vaddr);
+       return pte_page(*pte);
+}
index 34df4d9d03a6afb6f7a65627bb86d3da56c05cba..8277802ec85926abe0e3bd7ad6dd10fb83e987d4 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/mman.h>
 #include <linux/nodemask.h>
 #include <linux/initrd.h>
+#include <linux/highmem.h>
 
 #include <asm/mach-types.h>
 #include <asm/sections.h>
@@ -382,7 +383,7 @@ void __init bootmem_init(void)
        for_each_node(node)
                bootmem_free_node(node, mi);
 
-       high_memory = __va(memend_pfn << PAGE_SHIFT);
+       high_memory = __va((memend_pfn << PAGE_SHIFT) - 1) + 1;
 
        /*
         * This doesn't seem to be used by the Linux memory manager any
@@ -485,7 +486,7 @@ void __init mem_init(void)
        int i, node;
 
 #ifndef CONFIG_DISCONTIGMEM
-       max_mapnr   = virt_to_page(high_memory) - mem_map;
+       max_mapnr   = pfn_to_page(max_pfn + PHYS_PFN_OFFSET) - mem_map;
 #endif
 
        /* this will put all unused low memory onto the freelists */
@@ -504,6 +505,19 @@ void __init mem_init(void)
                                    __phys_to_pfn(__pa(swapper_pg_dir)), NULL);
 #endif
 
+#ifdef CONFIG_HIGHMEM
+       /* set highmem page free */
+       for_each_online_node(node) {
+               for_each_nodebank (i, &meminfo, node) {
+                       unsigned long start = bank_pfn_start(&meminfo.bank[i]);
+                       unsigned long end = bank_pfn_end(&meminfo.bank[i]);
+                       if (start >= max_low_pfn + PHYS_PFN_OFFSET)
+                               totalhigh_pages += free_area(start, end, NULL);
+               }
+       }
+       totalram_pages += totalhigh_pages;
+#endif
+
        /*
         * Since our memory may not be contiguous, calculate the
         * real number of pages we have in this system
@@ -521,9 +535,10 @@ void __init mem_init(void)
        initsize = __init_end - __init_begin;
 
        printk(KERN_NOTICE "Memory: %luKB available (%dK code, "
-               "%dK data, %dK init)\n",
+               "%dK data, %dK init, %luK highmem)\n",
                (unsigned long) nr_free_pages() << (PAGE_SHIFT-10),
-               codesize >> 10, datasize >> 10, initsize >> 10);
+               codesize >> 10, datasize >> 10, initsize >> 10,
+               (unsigned long) (totalhigh_pages << (PAGE_SHIFT-10)));
 
        if (PAGE_SIZE >= 16384 && num_physpages <= 128) {
                extern int sysctl_overcommit_memory;
index 95bbe112965e1a53953eb2a224c6418805876d7e..c4f6f05198e041831817747a69ad0003fa7c783e 100644 (file)
@@ -1,7 +1,6 @@
-/* the upper-most page table pointer */
-
 #ifdef CONFIG_MMU
 
+/* the upper-most page table pointer */
 extern pmd_t *top_pmd;
 
 #define TOP_PTE(x)     pte_offset_kernel(top_pmd, x)
index 5358fcc7f61ef8a112834fd839162a438df5ff22..f7457fea6de8e84c5aefe949412845550b1bfa5e 100644 (file)
@@ -124,7 +124,7 @@ int valid_phys_addr_range(unsigned long addr, size_t size)
 {
        if (addr < PHYS_OFFSET)
                return 0;
-       if (addr + size > __pa(high_memory))
+       if (addr + size >= __pa(high_memory - 1))
                return 0;
 
        return 1;
index d4d082c5c2d4ad2be9f1eb331cce837fff3de325..1585814f841491f5aba1a18db80172c35dcb4b81 100644 (file)
 #include <asm/cputype.h>
 #include <asm/mach-types.h>
 #include <asm/sections.h>
+#include <asm/cachetype.h>
 #include <asm/setup.h>
 #include <asm/sizes.h>
 #include <asm/tlb.h>
+#include <asm/highmem.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -243,6 +245,10 @@ static struct mem_type mem_types[] = {
                .prot_sect = PMD_TYPE_SECT,
                .domain    = DOMAIN_KERNEL,
        },
+       [MT_MEMORY_NONCACHED] = {
+               .prot_sect = PMD_TYPE_SECT | PMD_SECT_AP_WRITE,
+               .domain    = DOMAIN_KERNEL,
+       },
 };
 
 const struct mem_type *get_mem_type(unsigned int type)
@@ -406,9 +412,28 @@ static void __init build_mem_type_table(void)
                kern_pgprot |= L_PTE_SHARED;
                vecs_pgprot |= L_PTE_SHARED;
                mem_types[MT_MEMORY].prot_sect |= PMD_SECT_S;
+               mem_types[MT_MEMORY_NONCACHED].prot_sect |= PMD_SECT_S;
 #endif
        }
 
+       /*
+        * Non-cacheable Normal - intended for memory areas that must
+        * not cause dirty cache line writebacks when used
+        */
+       if (cpu_arch >= CPU_ARCH_ARMv6) {
+               if (cpu_arch >= CPU_ARCH_ARMv7 && (cr & CR_TRE)) {
+                       /* Non-cacheable Normal is XCB = 001 */
+                       mem_types[MT_MEMORY_NONCACHED].prot_sect |=
+                               PMD_SECT_BUFFERED;
+               } else {
+                       /* For both ARMv6 and non-TEX-remapping ARMv7 */
+                       mem_types[MT_MEMORY_NONCACHED].prot_sect |=
+                               PMD_SECT_TEX(1);
+               }
+       } else {
+               mem_types[MT_MEMORY_NONCACHED].prot_sect |= PMD_SECT_BUFFERABLE;
+       }
+
        for (i = 0; i < 16; i++) {
                unsigned long v = pgprot_val(protection_map[i]);
                protection_map[i] = __pgprot(v | user_pgprot);
@@ -677,6 +702,10 @@ static void __init sanity_check_meminfo(void)
                        if (meminfo.nr_banks >= NR_BANKS) {
                                printk(KERN_CRIT "NR_BANKS too low, "
                                                 "ignoring high memory\n");
+                       } else if (cache_is_vipt_aliasing()) {
+                               printk(KERN_CRIT "HIGHMEM is not yet supported "
+                                                "with VIPT aliasing cache, "
+                                                "ignoring high memory\n");
                        } else {
                                memmove(bank + 1, bank,
                                        (meminfo.nr_banks - i) * sizeof(*bank));
@@ -895,6 +924,17 @@ static void __init devicemaps_init(struct machine_desc *mdesc)
        flush_cache_all();
 }
 
+static void __init kmap_init(void)
+{
+#ifdef CONFIG_HIGHMEM
+       pmd_t *pmd = pmd_off_k(PKMAP_BASE);
+       pte_t *pte = alloc_bootmem_low_pages(2 * PTRS_PER_PTE * sizeof(pte_t));
+       BUG_ON(!pmd_none(*pmd) || !pte);
+       __pmd_populate(pmd, __pa(pte) | _PAGE_KERNEL_TABLE);
+       pkmap_page_table = pte + PTRS_PER_PTE;
+#endif
+}
+
 /*
  * paging_init() sets up the page tables, initialises the zone memory
  * maps, and sets up the zero page, bad page and bad page tables.
@@ -908,6 +948,7 @@ void __init paging_init(struct machine_desc *mdesc)
        prepare_page_table();
        bootmem_init();
        devicemaps_init(mdesc);
+       kmap_init();
 
        top_pmd = pmd_off_k(0xffff0000);
 
diff --git a/arch/arm/mm/proc-mohawk.S b/arch/arm/mm/proc-mohawk.S
new file mode 100644 (file)
index 0000000..540f507
--- /dev/null
@@ -0,0 +1,416 @@
+/*
+ *  linux/arch/arm/mm/proc-mohawk.S: MMU functions for Marvell PJ1 core
+ *
+ *  PJ1 (codename Mohawk) is a hybrid of the xscale3 and Marvell's own core.
+ *
+ *  Heavily based on proc-arm926.S and proc-xsc3.S
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include <linux/linkage.h>
+#include <linux/init.h>
+#include <asm/assembler.h>
+#include <asm/hwcap.h>
+#include <asm/pgtable-hwdef.h>
+#include <asm/pgtable.h>
+#include <asm/page.h>
+#include <asm/ptrace.h>
+#include "proc-macros.S"
+
+/*
+ * This is the maximum size of an area which will be flushed.  If the
+ * area is larger than this, then we flush the whole cache.
+ */
+#define CACHE_DLIMIT   32768
+
+/*
+ * The cache line size of the L1 D cache.
+ */
+#define CACHE_DLINESIZE        32
+
+/*
+ * cpu_mohawk_proc_init()
+ */
+ENTRY(cpu_mohawk_proc_init)
+       mov     pc, lr
+
+/*
+ * cpu_mohawk_proc_fin()
+ */
+ENTRY(cpu_mohawk_proc_fin)
+       stmfd   sp!, {lr}
+       mov     ip, #PSR_F_BIT | PSR_I_BIT | SVC_MODE
+       msr     cpsr_c, ip
+       bl      mohawk_flush_kern_cache_all
+       mrc     p15, 0, r0, c1, c0, 0           @ ctrl register
+       bic     r0, r0, #0x1800                 @ ...iz...........
+       bic     r0, r0, #0x0006                 @ .............ca.
+       mcr     p15, 0, r0, c1, c0, 0           @ disable caches
+       ldmfd   sp!, {pc}
+
+/*
+ * cpu_mohawk_reset(loc)
+ *
+ * Perform a soft reset of the system.  Put the CPU into the
+ * same state as it would be if it had been reset, and branch
+ * to what would be the reset vector.
+ *
+ * loc: location to jump to for soft reset
+ *
+ * (same as arm926)
+ */
+       .align  5
+ENTRY(cpu_mohawk_reset)
+       mov     ip, #0
+       mcr     p15, 0, ip, c7, c7, 0           @ invalidate I,D caches
+       mcr     p15, 0, ip, c7, c10, 4          @ drain WB
+       mcr     p15, 0, ip, c8, c7, 0           @ invalidate I & D TLBs
+       mrc     p15, 0, ip, c1, c0, 0           @ ctrl register
+       bic     ip, ip, #0x0007                 @ .............cam
+       bic     ip, ip, #0x1100                 @ ...i...s........
+       mcr     p15, 0, ip, c1, c0, 0           @ ctrl register
+       mov     pc, r0
+
+/*
+ * cpu_mohawk_do_idle()
+ *
+ * Called with IRQs disabled
+ */
+       .align  5
+ENTRY(cpu_mohawk_do_idle)
+       mov     r0, #0
+       mcr     p15, 0, r0, c7, c10, 4          @ drain write buffer
+       mcr     p15, 0, r0, c7, c0, 4           @ wait for interrupt
+       mov     pc, lr
+
+/*
+ *     flush_user_cache_all()
+ *
+ *     Clean and invalidate all cache entries in a particular
+ *     address space.
+ */
+ENTRY(mohawk_flush_user_cache_all)
+       /* FALLTHROUGH */
+
+/*
+ *     flush_kern_cache_all()
+ *
+ *     Clean and invalidate the entire cache.
+ */
+ENTRY(mohawk_flush_kern_cache_all)
+       mov     r2, #VM_EXEC
+       mov     ip, #0
+__flush_whole_cache:
+       mcr     p15, 0, ip, c7, c14, 0          @ clean & invalidate all D cache
+       tst     r2, #VM_EXEC
+       mcrne   p15, 0, ip, c7, c5, 0           @ invalidate I cache
+       mcrne   p15, 0, ip, c7, c10, 0          @ drain write buffer
+       mov     pc, lr
+
+/*
+ *     flush_user_cache_range(start, end, flags)
+ *
+ *     Clean and invalidate a range of cache entries in the
+ *     specified address range.
+ *
+ *     - start - start address (inclusive)
+ *     - end   - end address (exclusive)
+ *     - flags - vm_flags describing address space
+ *
+ * (same as arm926)
+ */
+ENTRY(mohawk_flush_user_cache_range)
+       mov     ip, #0
+       sub     r3, r1, r0                      @ calculate total size
+       cmp     r3, #CACHE_DLIMIT
+       bgt     __flush_whole_cache
+1:     tst     r2, #VM_EXEC
+       mcr     p15, 0, r0, c7, c14, 1          @ clean and invalidate D entry
+       mcrne   p15, 0, r0, c7, c5, 1           @ invalidate I entry
+       add     r0, r0, #CACHE_DLINESIZE
+       mcr     p15, 0, r0, c7, c14, 1          @ clean and invalidate D entry
+       mcrne   p15, 0, r0, c7, c5, 1           @ invalidate I entry
+       add     r0, r0, #CACHE_DLINESIZE
+       cmp     r0, r1
+       blo     1b
+       tst     r2, #VM_EXEC
+       mcrne   p15, 0, ip, c7, c10, 4          @ drain WB
+       mov     pc, lr
+
+/*
+ *     coherent_kern_range(start, end)
+ *
+ *     Ensure coherency between the Icache and the Dcache in the
+ *     region described by start, end.  If you have non-snooping
+ *     Harvard caches, you need to implement this function.
+ *
+ *     - start - virtual start address
+ *     - end   - virtual end address
+ */
+ENTRY(mohawk_coherent_kern_range)
+       /* FALLTHROUGH */
+
+/*
+ *     coherent_user_range(start, end)
+ *
+ *     Ensure coherency between the Icache and the Dcache in the
+ *     region described by start, end.  If you have non-snooping
+ *     Harvard caches, you need to implement this function.
+ *
+ *     - start - virtual start address
+ *     - end   - virtual end address
+ *
+ * (same as arm926)
+ */
+ENTRY(mohawk_coherent_user_range)
+       bic     r0, r0, #CACHE_DLINESIZE - 1
+1:     mcr     p15, 0, r0, c7, c10, 1          @ clean D entry
+       mcr     p15, 0, r0, c7, c5, 1           @ invalidate I entry
+       add     r0, r0, #CACHE_DLINESIZE
+       cmp     r0, r1
+       blo     1b
+       mcr     p15, 0, r0, c7, c10, 4          @ drain WB
+       mov     pc, lr
+
+/*
+ *     flush_kern_dcache_page(void *page)
+ *
+ *     Ensure no D cache aliasing occurs, either with itself or
+ *     the I cache
+ *
+ *     - addr  - page aligned address
+ */
+ENTRY(mohawk_flush_kern_dcache_page)
+       add     r1, r0, #PAGE_SZ
+1:     mcr     p15, 0, r0, c7, c14, 1          @ clean+invalidate D entry
+       add     r0, r0, #CACHE_DLINESIZE
+       cmp     r0, r1
+       blo     1b
+       mov     r0, #0
+       mcr     p15, 0, r0, c7, c5, 0           @ invalidate I cache
+       mcr     p15, 0, r0, c7, c10, 4          @ drain WB
+       mov     pc, lr
+
+/*
+ *     dma_inv_range(start, end)
+ *
+ *     Invalidate (discard) the specified virtual address range.
+ *     May not write back any entries.  If 'start' or 'end'
+ *     are not cache line aligned, those lines must be written
+ *     back.
+ *
+ *     - start - virtual start address
+ *     - end   - virtual end address
+ *
+ * (same as v4wb)
+ */
+ENTRY(mohawk_dma_inv_range)
+       tst     r0, #CACHE_DLINESIZE - 1
+       mcrne   p15, 0, r0, c7, c10, 1          @ clean D entry
+       tst     r1, #CACHE_DLINESIZE - 1
+       mcrne   p15, 0, r1, c7, c10, 1          @ clean D entry
+       bic     r0, r0, #CACHE_DLINESIZE - 1
+1:     mcr     p15, 0, r0, c7, c6, 1           @ invalidate D entry
+       add     r0, r0, #CACHE_DLINESIZE
+       cmp     r0, r1
+       blo     1b
+       mcr     p15, 0, r0, c7, c10, 4          @ drain WB
+       mov     pc, lr
+
+/*
+ *     dma_clean_range(start, end)
+ *
+ *     Clean the specified virtual address range.
+ *
+ *     - start - virtual start address
+ *     - end   - virtual end address
+ *
+ * (same as v4wb)
+ */
+ENTRY(mohawk_dma_clean_range)
+       bic     r0, r0, #CACHE_DLINESIZE - 1
+1:     mcr     p15, 0, r0, c7, c10, 1          @ clean D entry
+       add     r0, r0, #CACHE_DLINESIZE
+       cmp     r0, r1
+       blo     1b
+       mcr     p15, 0, r0, c7, c10, 4          @ drain WB
+       mov     pc, lr
+
+/*
+ *     dma_flush_range(start, end)
+ *
+ *     Clean and invalidate the specified virtual address range.
+ *
+ *     - start - virtual start address
+ *     - end   - virtual end address
+ */
+ENTRY(mohawk_dma_flush_range)
+       bic     r0, r0, #CACHE_DLINESIZE - 1
+1:
+       mcr     p15, 0, r0, c7, c14, 1          @ clean+invalidate D entry
+       add     r0, r0, #CACHE_DLINESIZE
+       cmp     r0, r1
+       blo     1b
+       mcr     p15, 0, r0, c7, c10, 4          @ drain WB
+       mov     pc, lr
+
+ENTRY(mohawk_cache_fns)
+       .long   mohawk_flush_kern_cache_all
+       .long   mohawk_flush_user_cache_all
+       .long   mohawk_flush_user_cache_range
+       .long   mohawk_coherent_kern_range
+       .long   mohawk_coherent_user_range
+       .long   mohawk_flush_kern_dcache_page
+       .long   mohawk_dma_inv_range
+       .long   mohawk_dma_clean_range
+       .long   mohawk_dma_flush_range
+
+ENTRY(cpu_mohawk_dcache_clean_area)
+1:     mcr     p15, 0, r0, c7, c10, 1          @ clean D entry
+       add     r0, r0, #CACHE_DLINESIZE
+       subs    r1, r1, #CACHE_DLINESIZE
+       bhi     1b
+       mcr     p15, 0, r0, c7, c10, 4          @ drain WB
+       mov     pc, lr
+
+/*
+ * cpu_mohawk_switch_mm(pgd)
+ *
+ * Set the translation base pointer to be as described by pgd.
+ *
+ * pgd: new page tables
+ */
+       .align  5
+ENTRY(cpu_mohawk_switch_mm)
+       mov     ip, #0
+       mcr     p15, 0, ip, c7, c14, 0          @ clean & invalidate all D cache
+       mcr     p15, 0, ip, c7, c5, 0           @ invalidate I cache
+       mcr     p15, 0, ip, c7, c10, 4          @ drain WB
+       orr     r0, r0, #0x18                   @ cache the page table in L2
+       mcr     p15, 0, r0, c2, c0, 0           @ load page table pointer
+       mcr     p15, 0, ip, c8, c7, 0           @ invalidate I & D TLBs
+       mov     pc, lr
+
+/*
+ * cpu_mohawk_set_pte_ext(ptep, pte, ext)
+ *
+ * Set a PTE and flush it out
+ */
+       .align  5
+ENTRY(cpu_mohawk_set_pte_ext)
+       armv3_set_pte_ext
+       mov     r0, r0
+       mcr     p15, 0, r0, c7, c10, 1          @ clean D entry
+       mcr     p15, 0, r0, c7, c10, 4          @ drain WB
+       mov     pc, lr
+
+       __INIT
+
+       .type   __mohawk_setup, #function
+__mohawk_setup:
+       mov     r0, #0
+       mcr     p15, 0, r0, c7, c7              @ invalidate I,D caches
+       mcr     p15, 0, r0, c7, c10, 4          @ drain write buffer
+       mcr     p15, 0, r0, c8, c7              @ invalidate I,D TLBs
+       orr     r4, r4, #0x18                   @ cache the page table in L2
+       mcr     p15, 0, r4, c2, c0, 0           @ load page table pointer
+
+       mov     r0, #0                          @ don't allow CP access
+       mcr     p15, 0, r0, c15, c1, 0          @ write CP access register
+
+       adr     r5, mohawk_crval
+       ldmia   r5, {r5, r6}
+       mrc     p15, 0, r0, c1, c0              @ get control register
+       bic     r0, r0, r5
+       orr     r0, r0, r6
+       mov     pc, lr
+
+       .size   __mohawk_setup, . - __mohawk_setup
+
+       /*
+        *  R
+        * .RVI ZFRS BLDP WCAM
+        * .011 1001 ..00 0101
+        *
+        */
+       .type   mohawk_crval, #object
+mohawk_crval:
+       crval   clear=0x00007f3f, mmuset=0x00003905, ucset=0x00001134
+
+       __INITDATA
+
+/*
+ * Purpose : Function pointers used to access above functions - all calls
+ *          come through these
+ */
+       .type   mohawk_processor_functions, #object
+mohawk_processor_functions:
+       .word   v5t_early_abort
+       .word   pabort_noifar
+       .word   cpu_mohawk_proc_init
+       .word   cpu_mohawk_proc_fin
+       .word   cpu_mohawk_reset
+       .word   cpu_mohawk_do_idle
+       .word   cpu_mohawk_dcache_clean_area
+       .word   cpu_mohawk_switch_mm
+       .word   cpu_mohawk_set_pte_ext
+       .size   mohawk_processor_functions, . - mohawk_processor_functions
+
+       .section ".rodata"
+
+       .type   cpu_arch_name, #object
+cpu_arch_name:
+       .asciz  "armv5te"
+       .size   cpu_arch_name, . - cpu_arch_name
+
+       .type   cpu_elf_name, #object
+cpu_elf_name:
+       .asciz  "v5"
+       .size   cpu_elf_name, . - cpu_elf_name
+
+       .type   cpu_mohawk_name, #object
+cpu_mohawk_name:
+       .asciz  "Marvell 88SV331x"
+       .size   cpu_mohawk_name, . - cpu_mohawk_name
+
+       .align
+
+       .section ".proc.info.init", #alloc, #execinstr
+
+       .type   __88sv331x_proc_info,#object
+__88sv331x_proc_info:
+       .long   0x56158000                      @ Marvell 88SV331x (MOHAWK)
+       .long   0xfffff000
+       .long   PMD_TYPE_SECT | \
+               PMD_SECT_BUFFERABLE | \
+               PMD_SECT_CACHEABLE | \
+               PMD_BIT4 | \
+               PMD_SECT_AP_WRITE | \
+               PMD_SECT_AP_READ
+       .long   PMD_TYPE_SECT | \
+               PMD_BIT4 | \
+               PMD_SECT_AP_WRITE | \
+               PMD_SECT_AP_READ
+       b       __mohawk_setup
+       .long   cpu_arch_name
+       .long   cpu_elf_name
+       .long   HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP
+       .long   cpu_mohawk_name
+       .long   mohawk_processor_functions
+       .long   v4wbi_tlb_fns
+       .long   v4wb_user_fns
+       .long   mohawk_cache_fns
+       .size   __88sv331x_proc_info, . - __88sv331x_proc_info
index cefc21c2eee4967827f1f2e1becf80193a054c07..d805a52b5032d2f39f33f76ff10063ce98bcc347 100644 (file)
 #include <linux/mm.h>
 #include <linux/uaccess.h>
 #include <asm/ptrace.h>
-
-#include "../kernel/stacktrace.h"
+#include <asm/stacktrace.h>
 
 static int report_trace(struct stackframe *frame, void *d)
 {
        unsigned int *depth = d;
 
        if (*depth) {
-               oprofile_add_trace(frame->lr);
+               oprofile_add_trace(frame->pc);
                (*depth)--;
        }
 
@@ -70,9 +69,12 @@ void arm_backtrace(struct pt_regs * const regs, unsigned int depth)
        struct frame_tail *tail = ((struct frame_tail *) regs->ARM_fp) - 1;
 
        if (!user_mode(regs)) {
-               unsigned long base = ((unsigned long)regs) & ~(THREAD_SIZE - 1);
-               walk_stackframe(regs->ARM_fp, base, base + THREAD_SIZE,
-                               report_trace, &depth);
+               struct stackframe frame;
+               frame.fp = regs->ARM_fp;
+               frame.sp = regs->ARM_sp;
+               frame.lr = regs->ARM_lr;
+               frame.pc = regs->ARM_pc;
+               walk_stackframe(&frame, report_trace, &depth);
                return;
        }
 
index 9cc2b16fdf793af36302108b4a65588342257e44..17d0e9906d5f6ac9fc2ed64af14feef4727115c5 100644 (file)
@@ -3,7 +3,7 @@ if ARCH_MXC
 menu "Freescale MXC Implementations"
 
 choice
-       prompt "MXC/iMX Base Type"
+       prompt "Freescale CPU family:"
        default ARCH_MX3
 
 config ARCH_MX1
@@ -15,12 +15,14 @@ config ARCH_MX1
 config ARCH_MX2
        bool "MX2-based"
        select CPU_ARM926T
+       select COMMON_CLKDEV
        help
          This enables support for systems based on the Freescale i.MX2 family
 
 config ARCH_MX3
        bool "MX3-based"
        select CPU_V6
+       select COMMON_CLKDEV
        help
          This enables support for systems based on the Freescale i.MX3 family
 
@@ -43,4 +45,10 @@ config MXC_IRQ_PRIOR
          requirements for timing.
          Say N here, unless you have a specialized requirement.
 
+config MXC_PWM
+       tristate "Enable PWM driver"
+       depends on ARCH_MXC
+       help
+         Enable support for the i.MX PWM controller(s).
+
 endif
index db74a929179d3676b7c82754b72d16136949d974..564fd4ebf38a97c7f747376c6cef6fe5a10a819a 100644 (file)
@@ -3,7 +3,8 @@
 #
 
 # Common support
-obj-y := irq.o clock.o gpio.o time.o devices.o
+obj-y := irq.o clock.o gpio.o time.o devices.o cpu.o
 
 obj-$(CONFIG_ARCH_MX1) += iomux-mx1-mx2.o dma-mx1-mx2.o
 obj-$(CONFIG_ARCH_MX2) += iomux-mx1-mx2.o dma-mx1-mx2.o
+obj-$(CONFIG_MXC_PWM)  += pwm.o
index 0a38f0b396eb997ce558584676ff3d1b2e8c49bc..92e13566cd4f56f321eca6c8df50f33f4a2c9c7d 100644 (file)
@@ -47,6 +47,11 @@ static DEFINE_MUTEX(clocks_mutex);
  * Standard clock functions defined in include/linux/clk.h
  *-------------------------------------------------------------------------*/
 
+/*
+ * All the code inside #ifndef CONFIG_COMMON_CLKDEV can be removed once all
+ * MXC architectures have switched to using clkdev.
+ */
+#ifndef CONFIG_COMMON_CLKDEV
 /*
  * Retrieve a clock by name.
  *
@@ -110,6 +115,7 @@ found:
        return clk;
 }
 EXPORT_SYMBOL(clk_get);
+#endif
 
 static void __clk_disable(struct clk *clk)
 {
@@ -187,6 +193,7 @@ unsigned long clk_get_rate(struct clk *clk)
 }
 EXPORT_SYMBOL(clk_get_rate);
 
+#ifndef CONFIG_COMMON_CLKDEV
 /* Decrement the clock's module reference count */
 void clk_put(struct clk *clk)
 {
@@ -194,6 +201,7 @@ void clk_put(struct clk *clk)
                module_put(clk->owner);
 }
 EXPORT_SYMBOL(clk_put);
+#endif
 
 /* Round the requested clock rate to the nearest supported
  * rate that is less than or equal to the requested rate.
@@ -257,6 +265,7 @@ struct clk *clk_get_parent(struct clk *clk)
 }
 EXPORT_SYMBOL(clk_get_parent);
 
+#ifndef CONFIG_COMMON_CLKDEV
 /*
  * Add a new clock to the clock tree.
  */
@@ -327,4 +336,49 @@ static int __init mxc_setup_proc_entry(void)
 }
 
 late_initcall(mxc_setup_proc_entry);
+#endif /* CONFIG_PROC_FS */
+#endif
+
+/*
+ * Get the resulting clock rate from a PLL register value and the input
+ * frequency. PLLs with this register layout can at least be found on
+ * MX1, MX21, MX27 and MX31
+ *
+ *                  mfi + mfn / (mfd + 1)
+ *  f = 2 * f_ref * --------------------
+ *                        pd + 1
+ */
+unsigned long mxc_decode_pll(unsigned int reg_val, u32 freq)
+{
+       long long ll;
+       int mfn_abs;
+       unsigned int mfi, mfn, mfd, pd;
+
+       mfi = (reg_val >> 10) & 0xf;
+       mfn = reg_val & 0x3ff;
+       mfd = (reg_val >> 16) & 0x3ff;
+       pd =  (reg_val >> 26) & 0xf;
+
+       mfi = mfi <= 5 ? 5 : mfi;
+
+       mfn_abs = mfn;
+
+#if !defined CONFIG_ARCH_MX1 && !defined CONFIG_ARCH_MX21
+       if (mfn >= 0x200) {
+               mfn |= 0xFFFFFE00;
+               mfn_abs = -mfn;
+       }
 #endif
+
+       freq *= 2;
+       freq /= pd + 1;
+
+       ll = (unsigned long long)freq * mfn_abs;
+
+       do_div(ll, mfd + 1);
+       if (mfn < 0)
+               ll = -ll;
+       ll = (freq * mfi) + ll;
+
+       return ll;
+}
diff --git a/arch/arm/plat-mxc/cpu.c b/arch/arm/plat-mxc/cpu.c
new file mode 100644 (file)
index 0000000..386e0d5
--- /dev/null
@@ -0,0 +1,11 @@
+
+#include <linux/module.h>
+
+unsigned int __mxc_cpu_type;
+EXPORT_SYMBOL(__mxc_cpu_type);
+
+void mxc_set_cpu_type(unsigned int type)
+{
+       __mxc_cpu_type = type;
+}
+
index c66748267c45adbd2a67cbde7169a2138c428caf..56f2fb5cc456433e6a7f4d23b129a77004b67655 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
+#include <mach/common.h>
 
 int __init mxc_register_device(struct platform_device *pdev, void *data)
 {
index 2905ec7587589da8bcb599432e1b7b7f19fae5a6..e364a5ed10f1301bcd96ea02d7054b64930875d5 100644 (file)
@@ -113,7 +113,7 @@ struct imx_dma_channel {
        void (*err_handler) (int, void *, int errcode);
        void (*prog_handler) (int, void *, struct scatterlist *);
        void *data;
-       unsigned int  dma_mode;
+       unsigned int dma_mode;
        struct scatterlist *sg;
        unsigned int resbytes;
        int dma_num;
@@ -802,7 +802,7 @@ static int __init imx_dma_init(void)
        int ret = 0;
        int i;
 
-       dma_clk = clk_get(NULL, "dma_clk");
+       dma_clk = clk_get(NULL, "dma");
        clk_enable(dma_clk);
 
        /* reset DMA module */
index ccbd94adc668154ff58dbe19c90f8462d2ce6cca..c6483bad8a2652c3fbfc098ced8ba809e7d4ccba 100644 (file)
@@ -200,8 +200,8 @@ static int mxc_gpio_direction_input(struct gpio_chip *chip, unsigned offset)
 static int mxc_gpio_direction_output(struct gpio_chip *chip,
                                     unsigned offset, int value)
 {
-       _set_gpio_direction(chip, offset, 1);
        mxc_gpio_set(chip, offset, value);
+       _set_gpio_direction(chip, offset, 1);
        return 0;
 }
 
index 8f34a05afc87a6c5717550a9d517716554264672..1cac9d1135cd72df710b7f6e4410dd5afd0b1d9c 100644 (file)
@@ -48,7 +48,8 @@
  * Base address of PBC controller, CS4
  */
 #define PBC_BASE_ADDRESS        0xEB000000
-#define PBC_REG_ADDR(offset)    (PBC_BASE_ADDRESS + (offset))
+#define PBC_REG_ADDR(offset)    (void __force __iomem *) \
+               (PBC_BASE_ADDRESS + (offset))
 
 /*
  * PBC Interupt name definitions
index 451d510d08c353692b86507f68e55657bb098ec3..318c72ada13db892043e5aaf694a826cf7ba0ed9 100644 (file)
@@ -11,6 +11,8 @@
 #ifndef __ASM_ARCH_MXC_BOARD_MX31ADS_H__
 #define __ASM_ARCH_MXC_BOARD_MX31ADS_H__
 
+#include <mach/hardware.h>
+
 /* Base address of PBC controller */
 #define PBC_BASE_ADDRESS        IO_ADDRESS(CS4_BASE_ADDR)
 /* Offsets for the PBC Controller register */
diff --git a/arch/arm/plat-mxc/include/mach/board-mx31moboard.h b/arch/arm/plat-mxc/include/mach/board-mx31moboard.h
new file mode 100644 (file)
index 0000000..f8aef1b
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2009 Valentin Longchamp, EPFL Mobots group
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
+#ifndef __ASM_ARCH_MXC_BOARD_MX31MOBOARD_H__
+#define __ASM_ARCH_MXC_BOARD_MX31MOBOARD_H__
+
+/* mandatory for CONFIG_LL_DEBUG */
+
+#define MXC_LL_UART_PADDR      UART1_BASE_ADDR
+#define MXC_LL_UART_VADDR      (AIPI_BASE_ADDR_VIRT + 0x0A000)
+
+#ifndef __ASSEMBLY__
+
+enum mx31moboard_boards {
+       MX31NOBOARD     = 0,
+       MX31DEVBOARD    = 1,
+       MX31MARXBOT     = 2,
+};
+
+/*
+ * This CPU module needs a baseboard to work. After basic initializing
+ * its own devices, it calls baseboard's init function.
+ */
+
+extern void mx31moboard_devboard_init(void);
+extern void mx31moboard_marxbot_init(void);
+
+#endif
+
+#endif /* __ASM_ARCH_MXC_BOARD_MX31MOBOARD_H__ */
diff --git a/arch/arm/plat-mxc/include/mach/board-qong.h b/arch/arm/plat-mxc/include/mach/board-qong.h
new file mode 100644 (file)
index 0000000..4ff762d
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2009 Ilya Yanok, Emcraft Systems Ltd, <yanok@emcraft.com>
+ */
+
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef __ASM_ARCH_MXC_BOARD_QONG_H__
+#define __ASM_ARCH_MXC_BOARD_QONG_H__
+
+/* mandatory for CONFIG_LL_DEBUG */
+
+#define MXC_LL_UART_PADDR      UART1_BASE_ADDR
+#define MXC_LL_UART_VADDR      AIPS1_IO_ADDRESS(UART1_BASE_ADDR)
+
+/* NOR FLASH */
+#define QONG_NOR_SIZE          (128*1024*1024)
+
+#endif /* __ASM_ARCH_MXC_BOARD_QONG_H__ */
diff --git a/arch/arm/plat-mxc/include/mach/clkdev.h b/arch/arm/plat-mxc/include/mach/clkdev.h
new file mode 100644 (file)
index 0000000..04b37a8
--- /dev/null
@@ -0,0 +1,7 @@
+#ifndef __ASM_MACH_CLKDEV_H
+#define __ASM_MACH_CLKDEV_H
+
+#define __clk_get(clk) ({ 1; })
+#define __clk_put(clk) do { } while (0)
+
+#endif
index d21f78e7881945e094be4953d461cd5986688ee9..43a82d0c534dd8f1e4bdfc99a95c94e9c1e56413 100644 (file)
 struct module;
 
 struct clk {
+#ifndef CONFIG_COMMON_CLKDEV
+       /* As soon as i.MX1 and i.MX31 switched to clkdev, this
+        * block can go away */
        struct list_head node;
        struct module *owner;
        const char *name;
+#endif
        int id;
        /* Source clock this clk depends on */
        struct clk *parent;
@@ -63,5 +67,7 @@ struct clk {
 int clk_register(struct clk *clk);
 void clk_unregister(struct clk *clk);
 
+unsigned long mxc_decode_pll(unsigned int pll, u32 f_ref);
+
 #endif /* __ASSEMBLY__ */
 #endif /* __ASM_ARCH_MXC_CLOCK_H__ */
index 6350287a59b9089acde56fe2cd535c1625773eea..b2f9b72644db4a019f9cfb054008e7338d37e524 100644 (file)
 #define __ASM_ARCH_MXC_COMMON_H__
 
 struct platform_device;
+struct clk;
 
 extern void mxc_map_io(void);
 extern void mxc_init_irq(void);
-extern void mxc_timer_init(const char *clk_timer);
-extern int mxc_clocks_init(unsigned long fref);
+extern void mxc_timer_init(struct clk *timer_clk);
+extern int mx1_clocks_init(unsigned long fref);
+extern int mx21_clocks_init(unsigned long lref, unsigned long fref);
+extern int mx27_clocks_init(unsigned long fref);
+extern int mx31_clocks_init(unsigned long fref);
+extern int mx35_clocks_init(void);
 extern int mxc_register_gpios(void);
 extern int mxc_register_device(struct platform_device *pdev, void *data);
+extern void mxc_set_cpu_type(unsigned int type);
 
 #endif
index 602768b427e2444f4f8f12154e12d67a19a0342a..4f773148bc2061bfa9913cf970eb836ea43abf37 100644 (file)
@@ -30,6 +30,9 @@
 #endif
 #ifdef CONFIG_MACH_MX31_3DS
 #include <mach/board-mx31pdk.h>
+#endif
+#ifdef CONFIG_MACH_QONG
+#include <mach/board-qong.h>
 #endif
                .macro  addruart,rx
                mrc     p15, 0, \rx, c1, c0
index a612d8bb73c80f7a8ab72dccca601bf6c18df0ce..42e4ee37ca1f7a9cae9943eb29303a661a01b337 100644 (file)
 #include <asm/sizes.h>
 
 #ifdef CONFIG_ARCH_MX3
-# include <mach/mx31.h>
+#include <mach/mx3x.h>
+#include <mach/mx31.h>
+#include <mach/mx35.h>
 #endif
 
 #ifdef CONFIG_ARCH_MX2
+# include <mach/mx2x.h>
+# ifdef CONFIG_MACH_MX21
+#  include <mach/mx21.h>
+# endif
 # ifdef CONFIG_MACH_MX27
 #  include <mach/mx27.h>
 # endif
similarity index 96%
rename from arch/arm/mach-imx/include/mach/imxfb.h
rename to arch/arm/plat-mxc/include/mach/imxfb.h
index 870d0d939616111408abf6b2fd32fc280978c328..762a7b0430e2786c6e77582f43afd68c0dbdbb88 100644 (file)
@@ -76,6 +76,9 @@ struct imx_fb_platform_data {
        u_char * fixed_screen_cpu;
        dma_addr_t fixed_screen_dma;
 
+       int (*init)(struct platform_device*);
+       int (*exit)(struct platform_device*);
+
        void (*lcd_power)(int);
        void (*backlight_power)(int);
 };
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx1-mx2.h b/arch/arm/plat-mxc/include/mach/iomux-mx1-mx2.h
deleted file mode 100644 (file)
index 95a383b..0000000
+++ /dev/null
@@ -1,416 +0,0 @@
-/*
- * Copyright (C) 2008 by Sascha Hauer <kernel@pengutronix.de>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-
-#ifndef _MXC_GPIO_MX1_MX2_H
-#define _MXC_GPIO_MX1_MX2_H
-
-#include <linux/io.h>
-
-/*
- *  GPIO Module and I/O Multiplexer
- *  x = 0..3 for reg_A, reg_B, reg_C, reg_D
- */
-#define VA_GPIO_BASE   IO_ADDRESS(GPIO_BASE_ADDR)
-#define MXC_DDIR(x)    (0x00 + ((x) << 8))
-#define MXC_OCR1(x)    (0x04 + ((x) << 8))
-#define MXC_OCR2(x)    (0x08 + ((x) << 8))
-#define MXC_ICONFA1(x) (0x0c + ((x) << 8))
-#define MXC_ICONFA2(x) (0x10 + ((x) << 8))
-#define MXC_ICONFB1(x) (0x14 + ((x) << 8))
-#define MXC_ICONFB2(x) (0x18 + ((x) << 8))
-#define MXC_DR(x)      (0x1c + ((x) << 8))
-#define MXC_GIUS(x)    (0x20 + ((x) << 8))
-#define MXC_SSR(x)     (0x24 + ((x) << 8))
-#define MXC_ICR1(x)    (0x28 + ((x) << 8))
-#define MXC_ICR2(x)    (0x2c + ((x) << 8))
-#define MXC_IMR(x)     (0x30 + ((x) << 8))
-#define MXC_ISR(x)     (0x34 + ((x) << 8))
-#define MXC_GPR(x)     (0x38 + ((x) << 8))
-#define MXC_SWR(x)     (0x3c + ((x) << 8))
-#define MXC_PUEN(x)    (0x40 + ((x) << 8))
-
-#ifdef CONFIG_ARCH_MX1
-# define GPIO_PORT_MAX  3
-#endif
-#ifdef CONFIG_ARCH_MX2
-# define GPIO_PORT_MAX  5
-#endif
-
-#ifndef GPIO_PORT_MAX
-# error "GPIO config port count unknown!"
-#endif
-
-#define GPIO_PIN_MASK 0x1f
-
-#define GPIO_PORT_SHIFT 5
-#define GPIO_PORT_MASK (0x7 << GPIO_PORT_SHIFT)
-
-#define GPIO_PORTA (0 << GPIO_PORT_SHIFT)
-#define GPIO_PORTB (1 << GPIO_PORT_SHIFT)
-#define GPIO_PORTC (2 << GPIO_PORT_SHIFT)
-#define GPIO_PORTD (3 << GPIO_PORT_SHIFT)
-#define GPIO_PORTE (4 << GPIO_PORT_SHIFT)
-#define GPIO_PORTF (5 << GPIO_PORT_SHIFT)
-
-#define GPIO_OUT   (1 << 8)
-#define GPIO_IN    (0 << 8)
-#define GPIO_PUEN  (1 << 9)
-
-#define GPIO_PF    (1 << 10)
-#define GPIO_AF    (1 << 11)
-
-#define GPIO_OCR_SHIFT 12
-#define GPIO_OCR_MASK (3 << GPIO_OCR_SHIFT)
-#define GPIO_AIN   (0 << GPIO_OCR_SHIFT)
-#define GPIO_BIN   (1 << GPIO_OCR_SHIFT)
-#define GPIO_CIN   (2 << GPIO_OCR_SHIFT)
-#define GPIO_GPIO  (3 << GPIO_OCR_SHIFT)
-
-#define GPIO_AOUT_SHIFT 14
-#define GPIO_AOUT_MASK (3 << GPIO_AOUT_SHIFT)
-#define GPIO_AOUT     (0 << GPIO_AOUT_SHIFT)
-#define GPIO_AOUT_ISR (1 << GPIO_AOUT_SHIFT)
-#define GPIO_AOUT_0   (2 << GPIO_AOUT_SHIFT)
-#define GPIO_AOUT_1   (3 << GPIO_AOUT_SHIFT)
-
-#define GPIO_BOUT_SHIFT 16
-#define GPIO_BOUT_MASK (3 << GPIO_BOUT_SHIFT)
-#define GPIO_BOUT      (0 << GPIO_BOUT_SHIFT)
-#define GPIO_BOUT_ISR  (1 << GPIO_BOUT_SHIFT)
-#define GPIO_BOUT_0    (2 << GPIO_BOUT_SHIFT)
-#define GPIO_BOUT_1    (3 << GPIO_BOUT_SHIFT)
-
-extern void mxc_gpio_mode(int gpio_mode);
-extern int mxc_gpio_setup_multiple_pins(const int *pin_list, unsigned count,
-                                       const char *label);
-extern void mxc_gpio_release_multiple_pins(const int *pin_list, int count);
-
-/*-------------------------------------------------------------------------*/
-
-/* assignements for GPIO alternate/primary functions */
-
-/* FIXME: This list is not completed. The correct directions are
- * missing on some (many) pins
- */
-#ifdef CONFIG_ARCH_MX1
-#define PA0_AIN_SPI2_CLK     (GPIO_PORTA | GPIO_OUT | 0)
-#define PA0_AF_ETMTRACESYNC  (GPIO_PORTA | GPIO_AF | 0)
-#define PA1_AOUT_SPI2_RXD    (GPIO_PORTA | GPIO_IN | 1)
-#define PA1_PF_TIN           (GPIO_PORTA | GPIO_PF | 1)
-#define PA2_PF_PWM0          (GPIO_PORTA | GPIO_OUT | GPIO_PF | 2)
-#define PA3_PF_CSI_MCLK      (GPIO_PORTA | GPIO_PF | 3)
-#define PA4_PF_CSI_D0        (GPIO_PORTA | GPIO_PF | 4)
-#define PA5_PF_CSI_D1        (GPIO_PORTA | GPIO_PF | 5)
-#define PA6_PF_CSI_D2        (GPIO_PORTA | GPIO_PF | 6)
-#define PA7_PF_CSI_D3        (GPIO_PORTA | GPIO_PF | 7)
-#define PA8_PF_CSI_D4        (GPIO_PORTA | GPIO_PF | 8)
-#define PA9_PF_CSI_D5        (GPIO_PORTA | GPIO_PF | 9)
-#define PA10_PF_CSI_D6       (GPIO_PORTA | GPIO_PF | 10)
-#define PA11_PF_CSI_D7       (GPIO_PORTA | GPIO_PF | 11)
-#define PA12_PF_CSI_VSYNC    (GPIO_PORTA | GPIO_PF | 12)
-#define PA13_PF_CSI_HSYNC    (GPIO_PORTA | GPIO_PF | 13)
-#define PA14_PF_CSI_PIXCLK   (GPIO_PORTA | GPIO_PF | 14)
-#define PA15_PF_I2C_SDA      (GPIO_PORTA | GPIO_OUT | GPIO_PF | 15)
-#define PA16_PF_I2C_SCL      (GPIO_PORTA | GPIO_OUT | GPIO_PF | 16)
-#define PA17_AF_ETMTRACEPKT4 (GPIO_PORTA | GPIO_AF | 17)
-#define PA17_AIN_SPI2_SS     (GPIO_PORTA | GPIO_OUT | 17)
-#define PA18_AF_ETMTRACEPKT5 (GPIO_PORTA | GPIO_AF | 18)
-#define PA19_AF_ETMTRACEPKT6 (GPIO_PORTA | GPIO_AF | 19)
-#define PA20_AF_ETMTRACEPKT7 (GPIO_PORTA | GPIO_AF | 20)
-#define PA21_PF_A0           (GPIO_PORTA | GPIO_PF | 21)
-#define PA22_PF_CS4          (GPIO_PORTA | GPIO_PF | 22)
-#define PA23_PF_CS5          (GPIO_PORTA | GPIO_PF | 23)
-#define PA24_PF_A16          (GPIO_PORTA | GPIO_PF | 24)
-#define PA24_AF_ETMTRACEPKT0 (GPIO_PORTA | GPIO_AF | 24)
-#define PA25_PF_A17          (GPIO_PORTA | GPIO_PF | 25)
-#define PA25_AF_ETMTRACEPKT1 (GPIO_PORTA | GPIO_AF | 25)
-#define PA26_PF_A18          (GPIO_PORTA | GPIO_PF | 26)
-#define PA26_AF_ETMTRACEPKT2 (GPIO_PORTA | GPIO_AF | 26)
-#define PA27_PF_A19          (GPIO_PORTA | GPIO_PF | 27)
-#define PA27_AF_ETMTRACEPKT3 (GPIO_PORTA | GPIO_AF | 27)
-#define PA28_PF_A20          (GPIO_PORTA | GPIO_PF | 28)
-#define PA28_AF_ETMPIPESTAT0 (GPIO_PORTA | GPIO_AF | 28)
-#define PA29_PF_A21          (GPIO_PORTA | GPIO_PF | 29)
-#define PA29_AF_ETMPIPESTAT1 (GPIO_PORTA | GPIO_AF | 29)
-#define PA30_PF_A22          (GPIO_PORTA | GPIO_PF | 30)
-#define PA30_AF_ETMPIPESTAT2 (GPIO_PORTA | GPIO_AF | 30)
-#define PA31_PF_A23          (GPIO_PORTA | GPIO_PF | 31)
-#define PA31_AF_ETMTRACECLK  (GPIO_PORTA | GPIO_AF | 31)
-#define PB8_PF_SD_DAT0       (GPIO_PORTB | GPIO_PF | GPIO_PUEN | 8)
-#define PB8_AF_MS_PIO        (GPIO_PORTB | GPIO_AF | 8)
-#define PB9_PF_SD_DAT1       (GPIO_PORTB | GPIO_PF | GPIO_PUEN  | 9)
-#define PB9_AF_MS_PI1        (GPIO_PORTB | GPIO_AF | 9)
-#define PB10_PF_SD_DAT2      (GPIO_PORTB | GPIO_PF | GPIO_PUEN  | 10)
-#define PB10_AF_MS_SCLKI     (GPIO_PORTB | GPIO_AF | 10)
-#define PB11_PF_SD_DAT3      (GPIO_PORTB | GPIO_PF | 11)
-#define PB11_AF_MS_SDIO      (GPIO_PORTB | GPIO_AF | 11)
-#define PB12_PF_SD_CLK       (GPIO_PORTB | GPIO_PF | 12)
-#define PB12_AF_MS_SCLK0     (GPIO_PORTB | GPIO_AF | 12)
-#define PB13_PF_SD_CMD       (GPIO_PORTB | GPIO_PF | GPIO_PUEN | 13)
-#define PB13_AF_MS_BS        (GPIO_PORTB | GPIO_AF | 13)
-#define PB14_AF_SSI_RXFS     (GPIO_PORTB | GPIO_AF | 14)
-#define PB15_AF_SSI_RXCLK    (GPIO_PORTB | GPIO_AF | 15)
-#define PB16_AF_SSI_RXDAT    (GPIO_PORTB | GPIO_IN | GPIO_AF | 16)
-#define PB17_AF_SSI_TXDAT    (GPIO_PORTB | GPIO_OUT | GPIO_AF | 17)
-#define PB18_AF_SSI_TXFS     (GPIO_PORTB | GPIO_AF | 18)
-#define PB19_AF_SSI_TXCLK    (GPIO_PORTB | GPIO_AF | 19)
-#define PB20_PF_USBD_AFE     (GPIO_PORTB | GPIO_PF | 20)
-#define PB21_PF_USBD_OE      (GPIO_PORTB | GPIO_PF | 21)
-#define PB22_PFUSBD_RCV      (GPIO_PORTB | GPIO_PF | 22)
-#define PB23_PF_USBD_SUSPND  (GPIO_PORTB | GPIO_PF | 23)
-#define PB24_PF_USBD_VP      (GPIO_PORTB | GPIO_PF | 24)
-#define PB25_PF_USBD_VM      (GPIO_PORTB | GPIO_PF | 25)
-#define PB26_PF_USBD_VPO     (GPIO_PORTB | GPIO_PF | 26)
-#define PB27_PF_USBD_VMO     (GPIO_PORTB | GPIO_PF | 27)
-#define PB28_PF_UART2_CTS    (GPIO_PORTB | GPIO_OUT | GPIO_PF | 28)
-#define PB29_PF_UART2_RTS    (GPIO_PORTB | GPIO_IN | GPIO_PF | 29)
-#define PB30_PF_UART2_TXD    (GPIO_PORTB | GPIO_OUT | GPIO_PF | 30)
-#define PB31_PF_UART2_RXD    (GPIO_PORTB | GPIO_IN | GPIO_PF | 31)
-#define PC3_PF_SSI_RXFS      (GPIO_PORTC | GPIO_PF | 3)
-#define PC4_PF_SSI_RXCLK     (GPIO_PORTC | GPIO_PF | 4)
-#define PC5_PF_SSI_RXDAT     (GPIO_PORTC | GPIO_IN | GPIO_PF | 5)
-#define PC6_PF_SSI_TXDAT     (GPIO_PORTC | GPIO_OUT | GPIO_PF | 6)
-#define PC7_PF_SSI_TXFS      (GPIO_PORTC | GPIO_PF | 7)
-#define PC8_PF_SSI_TXCLK     (GPIO_PORTC | GPIO_PF | 8)
-#define PC9_PF_UART1_CTS     (GPIO_PORTC | GPIO_OUT | GPIO_PF | 9)
-#define PC10_PF_UART1_RTS    (GPIO_PORTC | GPIO_IN | GPIO_PF | 10)
-#define PC11_PF_UART1_TXD    (GPIO_PORTC | GPIO_OUT | GPIO_PF | 11)
-#define PC12_PF_UART1_RXD    (GPIO_PORTC | GPIO_IN | GPIO_PF | 12)
-#define PC13_PF_SPI1_SPI_RDY (GPIO_PORTC | GPIO_PF | 13)
-#define PC14_PF_SPI1_SCLK    (GPIO_PORTC | GPIO_PF | 14)
-#define PC15_PF_SPI1_SS      (GPIO_PORTC | GPIO_PF | 15)
-#define PC16_PF_SPI1_MISO    (GPIO_PORTC | GPIO_PF | 16)
-#define PC17_PF_SPI1_MOSI    (GPIO_PORTC | GPIO_PF | 17)
-#define PC24_BIN_UART3_RI    (GPIO_PORTC | GPIO_OUT | GPIO_BIN | 24)
-#define PC25_BIN_UART3_DSR   (GPIO_PORTC | GPIO_OUT | GPIO_BIN | 25)
-#define PC26_AOUT_UART3_DTR  (GPIO_PORTC | GPIO_IN | 26)
-#define PC27_BIN_UART3_DCD   (GPIO_PORTC | GPIO_OUT | GPIO_BIN | 27)
-#define PC28_BIN_UART3_CTS   (GPIO_PORTC | GPIO_OUT | GPIO_BIN | 28)
-#define PC29_AOUT_UART3_RTS  (GPIO_PORTC | GPIO_IN | 29)
-#define PC30_BIN_UART3_TX    (GPIO_PORTC | GPIO_BIN | 30)
-#define PC31_AOUT_UART3_RX   (GPIO_PORTC | GPIO_IN | 31)
-#define PD6_PF_LSCLK         (GPIO_PORTD | GPIO_OUT | GPIO_PF | 6)
-#define PD7_PF_REV           (GPIO_PORTD | GPIO_PF | 7)
-#define PD7_AF_UART2_DTR     (GPIO_PORTD | GPIO_IN | GPIO_AF | 7)
-#define PD7_AIN_SPI2_SCLK    (GPIO_PORTD | GPIO_AIN | 7)
-#define PD8_PF_CLS           (GPIO_PORTD | GPIO_PF | 8)
-#define PD8_AF_UART2_DCD     (GPIO_PORTD | GPIO_OUT | GPIO_AF | 8)
-#define PD8_AIN_SPI2_SS      (GPIO_PORTD | GPIO_AIN | 8)
-#define PD9_PF_PS            (GPIO_PORTD | GPIO_PF | 9)
-#define PD9_AF_UART2_RI      (GPIO_PORTD | GPIO_OUT | GPIO_AF | 9)
-#define PD9_AOUT_SPI2_RXD    (GPIO_PORTD | GPIO_IN | 9)
-#define PD10_PF_SPL_SPR      (GPIO_PORTD | GPIO_OUT | GPIO_PF | 10)
-#define PD10_AF_UART2_DSR    (GPIO_PORTD | GPIO_OUT | GPIO_AF | 10)
-#define PD10_AIN_SPI2_TXD    (GPIO_PORTD | GPIO_OUT | 10)
-#define PD11_PF_CONTRAST     (GPIO_PORTD | GPIO_OUT | GPIO_PF | 11)
-#define PD12_PF_ACD_OE       (GPIO_PORTD | GPIO_OUT | GPIO_PF | 12)
-#define PD13_PF_LP_HSYNC     (GPIO_PORTD | GPIO_OUT | GPIO_PF | 13)
-#define PD14_PF_FLM_VSYNC    (GPIO_PORTD | GPIO_OUT | GPIO_PF | 14)
-#define PD15_PF_LD0          (GPIO_PORTD | GPIO_OUT | GPIO_PF | 15)
-#define PD16_PF_LD1          (GPIO_PORTD | GPIO_OUT | GPIO_PF | 16)
-#define PD17_PF_LD2          (GPIO_PORTD | GPIO_OUT | GPIO_PF | 17)
-#define PD18_PF_LD3          (GPIO_PORTD | GPIO_OUT | GPIO_PF | 18)
-#define PD19_PF_LD4          (GPIO_PORTD | GPIO_OUT | GPIO_PF | 19)
-#define PD20_PF_LD5          (GPIO_PORTD | GPIO_OUT | GPIO_PF | 20)
-#define PD21_PF_LD6          (GPIO_PORTD | GPIO_OUT | GPIO_PF | 21)
-#define PD22_PF_LD7          (GPIO_PORTD | GPIO_OUT | GPIO_PF | 22)
-#define PD23_PF_LD8          (GPIO_PORTD | GPIO_OUT | GPIO_PF | 23)
-#define PD24_PF_LD9          (GPIO_PORTD | GPIO_OUT | GPIO_PF | 24)
-#define PD25_PF_LD10         (GPIO_PORTD | GPIO_OUT | GPIO_PF | 25)
-#define PD26_PF_LD11         (GPIO_PORTD | GPIO_OUT | GPIO_PF | 26)
-#define PD27_PF_LD12         (GPIO_PORTD | GPIO_OUT | GPIO_PF | 27)
-#define PD28_PF_LD13         (GPIO_PORTD | GPIO_OUT | GPIO_PF | 28)
-#define PD29_PF_LD14         (GPIO_PORTD | GPIO_OUT | GPIO_PF | 29)
-#define PD30_PF_LD15         (GPIO_PORTD | GPIO_OUT | GPIO_PF | 30)
-#define PD31_PF_TMR2OUT      (GPIO_PORTD | GPIO_PF | 31)
-#define PD31_BIN_SPI2_TXD    (GPIO_PORTD | GPIO_BIN | 31)
-#endif
-
-#ifdef CONFIG_ARCH_MX2
-#define PA0_PF_USBH2_CLK       (GPIO_PORTA | GPIO_PF | 0)
-#define PA1_PF_USBH2_DIR       (GPIO_PORTA | GPIO_PF | 1)
-#define PA2_PF_USBH2_DATA7     (GPIO_PORTA | GPIO_PF | 2)
-#define PA3_PF_USBH2_NXT       (GPIO_PORTA | GPIO_PF | 3)
-#define PA4_PF_USBH2_STP       (GPIO_PORTA | GPIO_PF | 4)
-#define PA5_PF_LSCLK           (GPIO_PORTA | GPIO_OUT | GPIO_PF | 5)
-#define PA6_PF_LD0             (GPIO_PORTA | GPIO_OUT | GPIO_PF | 6)
-#define PA7_PF_LD1             (GPIO_PORTA | GPIO_OUT | GPIO_PF | 7)
-#define PA8_PF_LD2             (GPIO_PORTA | GPIO_OUT | GPIO_PF | 8)
-#define PA9_PF_LD3             (GPIO_PORTA | GPIO_OUT | GPIO_PF | 9)
-#define PA10_PF_LD4            (GPIO_PORTA | GPIO_OUT | GPIO_PF | 10)
-#define PA11_PF_LD5            (GPIO_PORTA | GPIO_OUT | GPIO_PF | 11)
-#define PA12_PF_LD6            (GPIO_PORTA | GPIO_OUT | GPIO_PF | 12)
-#define PA13_PF_LD7            (GPIO_PORTA | GPIO_OUT | GPIO_PF | 13)
-#define PA14_PF_LD8            (GPIO_PORTA | GPIO_OUT | GPIO_PF | 14)
-#define PA15_PF_LD9            (GPIO_PORTA | GPIO_OUT | GPIO_PF | 15)
-#define PA16_PF_LD10           (GPIO_PORTA | GPIO_OUT | GPIO_PF | 16)
-#define PA17_PF_LD11           (GPIO_PORTA | GPIO_OUT | GPIO_PF | 17)
-#define PA18_PF_LD12           (GPIO_PORTA | GPIO_OUT | GPIO_PF | 18)
-#define PA19_PF_LD13           (GPIO_PORTA | GPIO_OUT | GPIO_PF | 19)
-#define PA20_PF_LD14           (GPIO_PORTA | GPIO_OUT | GPIO_PF | 20)
-#define PA21_PF_LD15           (GPIO_PORTA | GPIO_OUT | GPIO_PF | 21)
-#define PA22_PF_LD16           (GPIO_PORTA | GPIO_OUT | GPIO_PF | 22)
-#define PA23_PF_LD17           (GPIO_PORTA | GPIO_OUT | GPIO_PF | 23)
-#define PA24_PF_REV            (GPIO_PORTA | GPIO_OUT | GPIO_PF | 24)
-#define PA25_PF_CLS            (GPIO_PORTA | GPIO_OUT | GPIO_PF | 25)
-#define PA26_PF_PS             (GPIO_PORTA | GPIO_OUT | GPIO_PF | 26)
-#define PA27_PF_SPL_SPR                (GPIO_PORTA | GPIO_OUT | GPIO_PF | 27)
-#define PA28_PF_HSYNC          (GPIO_PORTA | GPIO_OUT | GPIO_PF | 28)
-#define PA29_PF_VSYNC          (GPIO_PORTA | GPIO_OUT | GPIO_PF | 29)
-#define PA30_PF_CONTRAST       (GPIO_PORTA | GPIO_OUT | GPIO_PF | 30)
-#define PA31_PF_OE_ACD         (GPIO_PORTA | GPIO_OUT | GPIO_PF | 31)
-#define PB4_PF_SD2_D0          (GPIO_PORTB | GPIO_PF |  4)
-#define PB5_PF_SD2_D1          (GPIO_PORTB | GPIO_PF |  5)
-#define PB6_PF_SD2_D2          (GPIO_PORTB | GPIO_PF |  6)
-#define PB7_PF_SD2_D3          (GPIO_PORTB | GPIO_PF |  7)
-#define PB8_PF_SD2_CMD         (GPIO_PORTB | GPIO_PF |  8)
-#define PB9_PF_SD2_CLK         (GPIO_PORTB | GPIO_PF |  9)
-#define PB10_PF_CSI_D0         (GPIO_PORTB | GPIO_OUT | GPIO_PF | 10)
-#define PB10_AF_UART6_TXD      (GPIO_PORTB | GPIO_OUT | GPIO_AF | 10)
-#define PB11_PF_CSI_D1         (GPIO_PORTB | GPIO_OUT | GPIO_PF | 11)
-#define PB11_AF_UART6_RXD      (GPIO_PORTB | GPIO_IN  | GPIO_AF | 11)
-#define PB12_PF_CSI_D2         (GPIO_PORTB | GPIO_OUT | GPIO_PF | 12)
-#define PB12_AF_UART6_CTS      (GPIO_PORTB | GPIO_OUT | GPIO_AF | 12)
-#define PB13_PF_CSI_D3         (GPIO_PORTB | GPIO_OUT | GPIO_PF | 13)
-#define PB13_AF_UART6_RTS      (GPIO_PORTB | GPIO_IN  | GPIO_AF | 13)
-#define PB14_PF_CSI_D4         (GPIO_PORTB | GPIO_OUT | GPIO_PF | 14)
-#define PB15_PF_CSI_MCLK       (GPIO_PORTB | GPIO_OUT | GPIO_PF | 15)
-#define PB16_PF_CSI_PIXCLK     (GPIO_PORTB | GPIO_OUT | GPIO_PF | 16)
-#define PB17_PF_CSI_D5         (GPIO_PORTB | GPIO_OUT | GPIO_PF | 17)
-#define PB18_PF_CSI_D6         (GPIO_PORTB | GPIO_OUT | GPIO_PF | 18)
-#define PB18_AF_UART5_TXD      (GPIO_PORTB | GPIO_OUT | GPIO_AF | 18)
-#define PB19_PF_CSI_D7         (GPIO_PORTB | GPIO_OUT | GPIO_PF | 19)
-#define PB19_AF_UART5_RXD      (GPIO_PORTB | GPIO_IN  | GPIO_AF | 19)
-#define PB20_PF_CSI_VSYNC      (GPIO_PORTB | GPIO_OUT | GPIO_PF | 20)
-#define PB20_AF_UART5_CTS      (GPIO_PORTB | GPIO_OUT | GPIO_AF | 20)
-#define PB21_PF_CSI_HSYNC      (GPIO_PORTB | GPIO_OUT | GPIO_PF | 21)
-#define PB21_AF_UART5_RTS      (GPIO_PORTB | GPIO_IN  | GPIO_AF | 21)
-#define PB22_PF_USBH1_SUSP     (GPIO_PORTB | GPIO_PF | 22)
-#define PB23_PF_USB_PWR                (GPIO_PORTB | GPIO_PF | 23)
-#define PB24_PF_USB_OC_B       (GPIO_PORTB | GPIO_PF | 24)
-#define PB25_PF_USBH1_RCV      (GPIO_PORTB | GPIO_PF | 25)
-#define PB26_PF_USBH1_FS       (GPIO_PORTB | GPIO_PF | 26)
-#define PB27_PF_USBH1_OE_B     (GPIO_PORTB | GPIO_PF | 27)
-#define PB28_PF_USBH1_TXDM     (GPIO_PORTB | GPIO_PF | 28)
-#define PB29_PF_USBH1_TXDP     (GPIO_PORTB | GPIO_PF | 29)
-#define PB30_PF_USBH1_RXDM     (GPIO_PORTB | GPIO_PF | 30)
-#define PB31_PF_USBH1_RXDP     (GPIO_PORTB | GPIO_PF | 31)
-#define PB26_AF_UART4_RTS      (GPIO_PORTB | GPIO_IN  | GPIO_PF | 26)
-#define PB28_AF_UART4_TXD      (GPIO_PORTB | GPIO_OUT | GPIO_AF | 28)
-#define PB29_AF_UART4_CTS      (GPIO_PORTB | GPIO_OUT | GPIO_AF | 29)
-#define PB31_AF_UART4_RXD      (GPIO_PORTB | GPIO_IN  | GPIO_AF | 31)
-#define PC5_PF_I2C2_SDA                (GPIO_PORTC | GPIO_IN  | GPIO_PF | 5)
-#define PC6_PF_I2C2_SCL                (GPIO_PORTC | GPIO_IN  | GPIO_PF | 6)
-#define PC7_PF_USBOTG_DATA5    (GPIO_PORTC | GPIO_OUT | GPIO_PF | 7)
-#define PC8_PF_USBOTG_DATA6    (GPIO_PORTC | GPIO_OUT | GPIO_PF | 8)
-#define PC9_PF_USBOTG_DATA0    (GPIO_PORTC | GPIO_OUT | GPIO_PF | 9)
-#define PC10_PF_USBOTG_DATA2   (GPIO_PORTC | GPIO_OUT | GPIO_PF | 10)
-#define PC11_PF_USBOTG_DATA1   (GPIO_PORTC | GPIO_OUT | GPIO_PF | 11)
-#define PC12_PF_USBOTG_DATA4   (GPIO_PORTC | GPIO_OUT | GPIO_PF | 12)
-#define PC13_PF_USBOTG_DATA3   (GPIO_PORTC | GPIO_OUT | GPIO_PF | 13)
-#define PC16_PF_SSI4_FS                (GPIO_PORTC | GPIO_IN  | GPIO_PF | 16)
-#define PC17_PF_SSI4_RXD       (GPIO_PORTC | GPIO_IN  | GPIO_PF | 17)
-#define PC18_PF_SSI4_TXD       (GPIO_PORTC | GPIO_IN  | GPIO_PF | 18)
-#define PC19_PF_SSI4_CLK       (GPIO_PORTC | GPIO_IN  | GPIO_PF | 19)
-#define PC20_PF_SSI1_FS                (GPIO_PORTC | GPIO_IN  | GPIO_PF | 20)
-#define PC21_PF_SSI1_RXD       (GPIO_PORTC | GPIO_IN  | GPIO_PF | 21)
-#define PC22_PF_SSI1_TXD       (GPIO_PORTC | GPIO_IN  | GPIO_PF | 22)
-#define PC23_PF_SSI1_CLK       (GPIO_PORTC | GPIO_IN  | GPIO_PF | 23)
-#define PC24_PF_SSI2_FS                (GPIO_PORTC | GPIO_IN  | GPIO_PF | 24)
-#define PC25_PF_SSI2_RXD       (GPIO_PORTC | GPIO_IN  | GPIO_PF | 25)
-#define PC26_PF_SSI2_TXD       (GPIO_PORTC | GPIO_IN  | GPIO_PF | 26)
-#define PC27_PF_SSI2_CLK       (GPIO_PORTC | GPIO_IN  | GPIO_PF | 27)
-#define PC28_PF_SSI3_FS                (GPIO_PORTC | GPIO_IN  | GPIO_PF | 28)
-#define PC29_PF_SSI3_RXD       (GPIO_PORTC | GPIO_IN  | GPIO_PF | 29)
-#define PC30_PF_SSI3_TXD       (GPIO_PORTC | GPIO_IN  | GPIO_PF | 30)
-#define PC31_PF_SSI3_CLK       (GPIO_PORTC | GPIO_IN  | GPIO_PF | 31)
-#define PD0_AIN_FEC_TXD0       (GPIO_PORTD | GPIO_OUT | GPIO_AIN | 0)
-#define PD1_AIN_FEC_TXD1       (GPIO_PORTD | GPIO_OUT | GPIO_AIN | 1)
-#define PD2_AIN_FEC_TXD2       (GPIO_PORTD | GPIO_OUT | GPIO_AIN | 2)
-#define PD3_AIN_FEC_TXD3       (GPIO_PORTD | GPIO_OUT | GPIO_AIN | 3)
-#define PD4_AOUT_FEC_RX_ER     (GPIO_PORTD | GPIO_IN | GPIO_AOUT | 4)
-#define PD5_AOUT_FEC_RXD1      (GPIO_PORTD | GPIO_IN | GPIO_AOUT | 5)
-#define PD6_AOUT_FEC_RXD2      (GPIO_PORTD | GPIO_IN | GPIO_AOUT | 6)
-#define PD7_AOUT_FEC_RXD3      (GPIO_PORTD | GPIO_IN | GPIO_AOUT | 7)
-#define PD8_AF_FEC_MDIO                (GPIO_PORTD | GPIO_IN | GPIO_AF | 8)
-#define PD9_AIN_FEC_MDC                (GPIO_PORTD | GPIO_OUT | GPIO_AIN | 9)
-#define PD10_AOUT_FEC_CRS      (GPIO_PORTD | GPIO_IN | GPIO_AOUT | 10)
-#define PD11_AOUT_FEC_TX_CLK   (GPIO_PORTD | GPIO_IN | GPIO_AOUT | 11)
-#define PD12_AOUT_FEC_RXD0     (GPIO_PORTD | GPIO_IN | GPIO_AOUT | 12)
-#define PD13_AOUT_FEC_RX_DV    (GPIO_PORTD | GPIO_IN | GPIO_AOUT | 13)
-#define PD14_AOUT_FEC_CLR      (GPIO_PORTD | GPIO_IN | GPIO_AOUT | 14)
-#define PD15_AOUT_FEC_COL      (GPIO_PORTD | GPIO_IN | GPIO_AOUT | 15)
-#define PD16_AIN_FEC_TX_ER     (GPIO_PORTD | GPIO_OUT | GPIO_AIN | 16)
-#define PD17_PF_I2C_DATA       (GPIO_PORTD | GPIO_OUT | GPIO_PF | 17)
-#define PD18_PF_I2C_CLK                (GPIO_PORTD | GPIO_OUT | GPIO_PF | 18)
-#define PD19_AF_USBH2_DATA4    (GPIO_PORTD | GPIO_AF | 19)
-#define PD20_AF_USBH2_DATA3    (GPIO_PORTD | GPIO_AF | 20)
-#define PD21_AF_USBH2_DATA6    (GPIO_PORTD | GPIO_AF | 21)
-#define PD22_AF_USBH2_DATA0    (GPIO_PORTD | GPIO_AF | 22)
-#define PD23_AF_USBH2_DATA2    (GPIO_PORTD | GPIO_AF | 23)
-#define PD24_AF_USBH2_DATA1    (GPIO_PORTD | GPIO_AF | 24)
-#define PD25_PF_CSPI1_RDY      (GPIO_PORTD | GPIO_OUT | GPIO_PF  | 25)
-#define PD26_PF_CSPI1_SS2      (GPIO_PORTD | GPIO_OUT | GPIO_PF  | 26)
-#define PD26_AF_USBH2_DATA5     (GPIO_PORTD | GPIO_AF | 26)
-#define PD27_PF_CSPI1_SS1      (GPIO_PORTD | GPIO_OUT | GPIO_PF  | 27)
-#define PD28_PF_CSPI1_SS0      (GPIO_PORTD | GPIO_OUT | GPIO_PF  | 28)
-#define PD29_PF_CSPI1_SCLK     (GPIO_PORTD | GPIO_OUT | GPIO_PF  | 29)
-#define PD30_PF_CSPI1_MISO     (GPIO_PORTD | GPIO_IN | GPIO_PF  | 30)
-#define PD31_PF_CSPI1_MOSI     (GPIO_PORTD | GPIO_OUT | GPIO_PF  | 31)
-#define PF23_AIN_FEC_TX_EN     (GPIO_PORTF | GPIO_OUT | GPIO_AIN | 23)
-#define PE0_PF_USBOTG_NXT      (GPIO_PORTE | GPIO_OUT | GPIO_PF | 0)
-#define PE1_PF_USBOTG_STP      (GPIO_PORTE | GPIO_OUT | GPIO_PF | 1)
-#define PE2_PF_USBOTG_DIR      (GPIO_PORTE | GPIO_OUT | GPIO_PF | 2)
-#define PE3_PF_UART2_CTS       (GPIO_PORTE | GPIO_OUT | GPIO_PF | 3)
-#define PE4_PF_UART2_RTS       (GPIO_PORTE | GPIO_IN  | GPIO_PF | 4)
-#define PE6_PF_UART2_TXD       (GPIO_PORTE | GPIO_OUT | GPIO_PF | 6)
-#define PE7_PF_UART2_RXD       (GPIO_PORTE | GPIO_IN  | GPIO_PF | 7)
-#define PE8_PF_UART3_TXD       (GPIO_PORTE | GPIO_OUT | GPIO_PF | 8)
-#define PE9_PF_UART3_RXD       (GPIO_PORTE | GPIO_IN  | GPIO_PF | 9)
-#define PE10_PF_UART3_CTS      (GPIO_PORTE | GPIO_OUT | GPIO_PF | 10)
-#define PE11_PF_UART3_RTS      (GPIO_PORTE | GPIO_IN  | GPIO_PF | 11)
-#define PE12_PF_UART1_TXD      (GPIO_PORTE | GPIO_OUT | GPIO_PF | 12)
-#define PE13_PF_UART1_RXD      (GPIO_PORTE | GPIO_IN  | GPIO_PF | 13)
-#define PE14_PF_UART1_CTS      (GPIO_PORTE | GPIO_OUT | GPIO_PF | 14)
-#define PE15_PF_UART1_RTS      (GPIO_PORTE | GPIO_IN  | GPIO_PF | 15)
-#define PE16_AF_RTCK           (GPIO_PORTE | GPIO_OUT | GPIO_AF | 16)
-#define PE16_PF_RTCK           (GPIO_PORTE | GPIO_OUT | GPIO_PF | 16)
-#define PE18_PF_SDHC1_D0       (GPIO_PORTE | GPIO_PF | 18)
-#define PE18_AF_CSPI3_MISO     (GPIO_PORTE | GPIO_IN  | GPIO_AF | 18)
-#define PE19_PF_SDHC1_D1       (GPIO_PORTE | GPIO_PF | 19)
-#define PE20_PF_SDHC1_D2       (GPIO_PORTE | GPIO_PF | 20)
-#define PE21_PF_SDHC1_D3       (GPIO_PORTE | GPIO_PF | 21)
-#define PE21_AF_CSPI3_SS       (GPIO_PORTE | GPIO_OUT | GPIO_AF | 21)
-#define PE22_PF_SDHC1_CMD      (GPIO_PORTE | GPIO_PF | 22)
-#define PE22_AF_CSPI3_MOSI     (GPIO_PORTE | GPIO_OUT | GPIO_AF | 22)
-#define PE22_PF_SDHC1_CLK      (GPIO_PORTE | GPIO_PF | 23)
-#define PE23_AF_CSPI3_SCLK     (GPIO_PORTE | GPIO_OUT | GPIO_AF | 23)
-#define PE24_PF_USBOTG_CLK     (GPIO_PORTE | GPIO_OUT | GPIO_PF | 24)
-#define PE25_PF_USBOTG_DATA7   (GPIO_PORTE | GPIO_OUT | GPIO_PF | 25)
-#endif
-
-/* decode irq number to use with IMR(x), ISR(x) and friends */
-#define IRQ_TO_REG(irq) ((irq - MXC_INTERNAL_IRQS) >> 5)
-
-#define IRQ_GPIOA(x)  (MXC_GPIO_IRQ_START + x)
-#define IRQ_GPIOB(x)  (IRQ_GPIOA(32) + x)
-#define IRQ_GPIOC(x)  (IRQ_GPIOB(32) + x)
-#define IRQ_GPIOD(x)  (IRQ_GPIOC(32) + x)
-#define IRQ_GPIOE(x)  (IRQ_GPIOD(32) + x)
-
-#endif /* _MXC_GPIO_MX1_MX2_H */
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx1.h b/arch/arm/plat-mxc/include/mach/iomux-mx1.h
new file mode 100644 (file)
index 0000000..bf23305
--- /dev/null
@@ -0,0 +1,166 @@
+/*
+* Copyright (C) 2008 by Sascha Hauer <kernel@pengutronix.de>
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+* MA 02110-1301, USA.
+*/
+
+#ifndef _MXC_IOMUX_MX1_H
+#define _MXC_IOMUX_MX1_H
+
+#ifndef GPIO_PORTA
+#error Please include mach/iomux.h
+#endif
+
+/* FIXME: This list is not completed. The correct directions are
+* missing on some (many) pins
+*/
+
+
+/* Primary GPIO pin functions */
+
+#define PA0_AIN_SPI2_CLK        (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 0)
+#define PA0_AF_ETMTRACESYNC     (GPIO_PORTA | GPIO_AF | 0)
+#define PA1_AOUT_SPI2_RXD       (GPIO_PORTA | GPIO_AOUT | GPIO_IN | 1)
+#define PA1_PF_TIN              (GPIO_PORTA | GPIO_PF | 1)
+#define PA2_PF_PWM0             (GPIO_PORTA | GPIO_PF | GPIO_OUT | 2)
+#define PA3_PF_CSI_MCLK         (GPIO_PORTA | GPIO_PF | 3)
+#define PA4_PF_CSI_D0           (GPIO_PORTA | GPIO_PF | 4)
+#define PA5_PF_CSI_D1           (GPIO_PORTA | GPIO_PF | 5)
+#define PA6_PF_CSI_D2           (GPIO_PORTA | GPIO_PF | 6)
+#define PA7_PF_CSI_D3           (GPIO_PORTA | GPIO_PF | 7)
+#define PA8_PF_CSI_D4           (GPIO_PORTA | GPIO_PF | 8)
+#define PA9_PF_CSI_D5           (GPIO_PORTA | GPIO_PF | 9)
+#define PA10_PF_CSI_D6          (GPIO_PORTA | GPIO_PF | 10)
+#define PA11_PF_CSI_D7          (GPIO_PORTA | GPIO_PF | 11)
+#define PA12_PF_CSI_VSYNC       (GPIO_PORTA | GPIO_PF | 12)
+#define PA13_PF_CSI_HSYNC       (GPIO_PORTA | GPIO_PF | 13)
+#define PA14_PF_CSI_PIXCLK      (GPIO_PORTA | GPIO_PF | 14)
+#define PA15_PF_I2C_SDA         (GPIO_PORTA | GPIO_PF | GPIO_OUT | 15)
+#define PA16_PF_I2C_SCL         (GPIO_PORTA | GPIO_PF | GPIO_OUT | 16)
+#define PA17_AF_ETMTRACEPKT4    (GPIO_PORTA | GPIO_AF | 17)
+#define PA17_AIN_SPI2_SS        (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 17)
+#define PA18_AF_ETMTRACEPKT5    (GPIO_PORTA | GPIO_AF | 18)
+#define PA19_AF_ETMTRACEPKT6    (GPIO_PORTA | GPIO_AF | 19)
+#define PA20_AF_ETMTRACEPKT7    (GPIO_PORTA | GPIO_AF | 20)
+#define PA21_PF_A0              (GPIO_PORTA | GPIO_PF | 21)
+#define PA22_PF_CS4             (GPIO_PORTA | GPIO_PF | 22)
+#define PA23_PF_CS5             (GPIO_PORTA | GPIO_PF | 23)
+#define PA24_PF_A16             (GPIO_PORTA | GPIO_PF | 24)
+#define PA24_AF_ETMTRACEPKT0    (GPIO_PORTA | GPIO_AF | 24)
+#define PA25_PF_A17             (GPIO_PORTA | GPIO_PF | 25)
+#define PA25_AF_ETMTRACEPKT1    (GPIO_PORTA | GPIO_AF | 25)
+#define PA26_PF_A18             (GPIO_PORTA | GPIO_PF | 26)
+#define PA26_AF_ETMTRACEPKT2    (GPIO_PORTA | GPIO_AF | 26)
+#define PA27_PF_A19             (GPIO_PORTA | GPIO_PF | 27)
+#define PA27_AF_ETMTRACEPKT3    (GPIO_PORTA | GPIO_AF | 27)
+#define PA28_PF_A20             (GPIO_PORTA | GPIO_PF | 28)
+#define PA28_AF_ETMPIPESTAT0    (GPIO_PORTA | GPIO_AF | 28)
+#define PA29_PF_A21             (GPIO_PORTA | GPIO_PF | 29)
+#define PA29_AF_ETMPIPESTAT1    (GPIO_PORTA | GPIO_AF | 29)
+#define PA30_PF_A22             (GPIO_PORTA | GPIO_PF | 30)
+#define PA30_AF_ETMPIPESTAT2    (GPIO_PORTA | GPIO_AF | 30)
+#define PA31_PF_A23             (GPIO_PORTA | GPIO_PF | 31)
+#define PA31_AF_ETMTRACECLK     (GPIO_PORTA | GPIO_AF | 31)
+#define PB8_PF_SD_DAT0          (GPIO_PORTB | GPIO_PF | GPIO_PUEN | 8)
+#define PB8_AF_MS_PIO           (GPIO_PORTB | GPIO_AF | 8)
+#define PB9_PF_SD_DAT1          (GPIO_PORTB | GPIO_PF | GPIO_PUEN | 9)
+#define PB9_AF_MS_PI1           (GPIO_PORTB | GPIO_AF | 9)
+#define PB10_PF_SD_DAT2         (GPIO_PORTB | GPIO_PF | GPIO_PUEN | 10)
+#define PB10_AF_MS_SCLKI        (GPIO_PORTB | GPIO_AF | 10)
+#define PB11_PF_SD_DAT3         (GPIO_PORTB | GPIO_PF | 11)
+#define PB11_AF_MS_SDIO         (GPIO_PORTB | GPIO_AF | 11)
+#define PB12_PF_SD_CLK          (GPIO_PORTB | GPIO_PF | 12)
+#define PB12_AF_MS_SCLK0        (GPIO_PORTB | GPIO_AF | 12)
+#define PB13_PF_SD_CMD          (GPIO_PORTB | GPIO_PF | GPIO_PUEN | 13)
+#define PB13_AF_MS_BS           (GPIO_PORTB | GPIO_AF | 13)
+#define PB14_AF_SSI_RXFS        (GPIO_PORTB | GPIO_AF | 14)
+#define PB15_AF_SSI_RXCLK       (GPIO_PORTB | GPIO_AF | 15)
+#define PB16_AF_SSI_RXDAT       (GPIO_PORTB | GPIO_AF | GPIO_IN | 16)
+#define PB17_AF_SSI_TXDAT       (GPIO_PORTB | GPIO_AF | GPIO_OUT | 17)
+#define PB18_AF_SSI_TXFS        (GPIO_PORTB | GPIO_AF | 18)
+#define PB19_AF_SSI_TXCLK       (GPIO_PORTB | GPIO_AF | 19)
+#define PB20_PF_USBD_AFE        (GPIO_PORTB | GPIO_PF | 20)
+#define PB21_PF_USBD_OE         (GPIO_PORTB | GPIO_PF | 21)
+#define PB22_PF_USBD_RCV        (GPIO_PORTB | GPIO_PF | 22)
+#define PB23_PF_USBD_SUSPND     (GPIO_PORTB | GPIO_PF | 23)
+#define PB24_PF_USBD_VP         (GPIO_PORTB | GPIO_PF | 24)
+#define PB25_PF_USBD_VM         (GPIO_PORTB | GPIO_PF | 25)
+#define PB26_PF_USBD_VPO        (GPIO_PORTB | GPIO_PF | 26)
+#define PB27_PF_USBD_VMO        (GPIO_PORTB | GPIO_PF | 27)
+#define PB28_PF_UART2_CTS       (GPIO_PORTB | GPIO_PF | GPIO_OUT | 28)
+#define PB29_PF_UART2_RTS       (GPIO_PORTB | GPIO_PF | GPIO_IN | 29)
+#define PB30_PF_UART2_TXD       (GPIO_PORTB | GPIO_PF | GPIO_OUT | 30)
+#define PB31_PF_UART2_RXD       (GPIO_PORTB | GPIO_PF | GPIO_IN | 31)
+#define PC3_PF_SSI_RXFS         (GPIO_PORTC | GPIO_PF | 3)
+#define PC4_PF_SSI_RXCLK        (GPIO_PORTC | GPIO_PF | 4)
+#define PC5_PF_SSI_RXDAT        (GPIO_PORTC | GPIO_PF | GPIO_IN | 5)
+#define PC6_PF_SSI_TXDAT        (GPIO_PORTC | GPIO_PF | GPIO_OUT | 6)
+#define PC7_PF_SSI_TXFS         (GPIO_PORTC | GPIO_PF | 7)
+#define PC8_PF_SSI_TXCLK        (GPIO_PORTC | GPIO_PF | 8)
+#define PC9_PF_UART1_CTS        (GPIO_PORTC | GPIO_PF | GPIO_OUT | 9)
+#define PC10_PF_UART1_RTS       (GPIO_PORTC | GPIO_PF | GPIO_IN | 10)
+#define PC11_PF_UART1_TXD       (GPIO_PORTC | GPIO_PF | GPIO_OUT | 11)
+#define PC12_PF_UART1_RXD       (GPIO_PORTC | GPIO_PF | GPIO_IN | 12)
+#define PC13_PF_SPI1_SPI_RDY    (GPIO_PORTC | GPIO_PF | 13)
+#define PC14_PF_SPI1_SCLK       (GPIO_PORTC | GPIO_PF | 14)
+#define PC15_PF_SPI1_SS         (GPIO_PORTC | GPIO_PF | 15)
+#define PC16_PF_SPI1_MISO       (GPIO_PORTC | GPIO_PF | 16)
+#define PC17_PF_SPI1_MOSI       (GPIO_PORTC | GPIO_PF | 17)
+#define PC24_BIN_UART3_RI       (GPIO_PORTC | GPIO_BIN | GPIO_OUT | 24)
+#define PC25_BIN_UART3_DSR      (GPIO_PORTC | GPIO_BIN | GPIO_OUT | 25)
+#define PC26_AOUT_UART3_DTR     (GPIO_PORTC | GPIO_AOUT | GPIO_IN | 26)
+#define PC27_BIN_UART3_DCD      (GPIO_PORTC | GPIO_BIN | GPIO_OUT | 27)
+#define PC28_BIN_UART3_CTS      (GPIO_PORTC | GPIO_BIN | GPIO_OUT | 28)
+#define PC29_AOUT_UART3_RTS     (GPIO_PORTC | GPIO_AOUT | GPIO_IN | 29)
+#define PC30_BIN_UART3_TX       (GPIO_PORTC | GPIO_BIN | 30)
+#define PC31_AOUT_UART3_RX      (GPIO_PORTC | GPIO_AOUT | GPIO_IN | 31)
+#define PD6_PF_LSCLK            (GPIO_PORTD | GPIO_PF | GPIO_OUT | 6)
+#define PD7_PF_REV              (GPIO_PORTD | GPIO_PF | 7)
+#define PD7_AF_UART2_DTR        (GPIO_PORTD | GPIO_AF | GPIO_IN | 7)
+#define PD7_AIN_SPI2_SCLK       (GPIO_PORTD | GPIO_AIN | 7)
+#define PD8_PF_CLS              (GPIO_PORTD | GPIO_PF | 8)
+#define PD8_AF_UART2_DCD        (GPIO_PORTD | GPIO_AF | GPIO_OUT | 8)
+#define PD8_AIN_SPI2_SS         (GPIO_PORTD | GPIO_AIN | 8)
+#define PD9_PF_PS               (GPIO_PORTD | GPIO_PF | 9)
+#define PD9_AF_UART2_RI         (GPIO_PORTD | GPIO_AF | GPIO_OUT | 9)
+#define PD9_AOUT_SPI2_RXD       (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 9)
+#define PD10_PF_SPL_SPR         (GPIO_PORTD | GPIO_PF | GPIO_OUT | 10)
+#define PD10_AF_UART2_DSR       (GPIO_PORTD | GPIO_AF | GPIO_OUT | 10)
+#define PD10_AIN_SPI2_TXD       (GPIO_PORTD | GPIO_AIN | GPIO_OUT | 10)
+#define PD11_PF_CONTRAST        (GPIO_PORTD | GPIO_PF | GPIO_OUT | 11)
+#define PD12_PF_ACD_OE          (GPIO_PORTD | GPIO_PF | GPIO_OUT | 12)
+#define PD13_PF_LP_HSYNC        (GPIO_PORTD | GPIO_PF | GPIO_OUT | 13)
+#define PD14_PF_FLM_VSYNC       (GPIO_PORTD | GPIO_PF | GPIO_OUT | 14)
+#define PD15_PF_LD0             (GPIO_PORTD | GPIO_PF | GPIO_OUT | 15)
+#define PD16_PF_LD1             (GPIO_PORTD | GPIO_PF | GPIO_OUT | 16)
+#define PD17_PF_LD2             (GPIO_PORTD | GPIO_PF | GPIO_OUT | 17)
+#define PD18_PF_LD3             (GPIO_PORTD | GPIO_PF | GPIO_OUT | 18)
+#define PD19_PF_LD4             (GPIO_PORTD | GPIO_PF | GPIO_OUT | 19)
+#define PD20_PF_LD5             (GPIO_PORTD | GPIO_PF | GPIO_OUT | 20)
+#define PD21_PF_LD6             (GPIO_PORTD | GPIO_PF | GPIO_OUT | 21)
+#define PD22_PF_LD7             (GPIO_PORTD | GPIO_PF | GPIO_OUT | 22)
+#define PD23_PF_LD8             (GPIO_PORTD | GPIO_PF | GPIO_OUT | 23)
+#define PD24_PF_LD9             (GPIO_PORTD | GPIO_PF | GPIO_OUT | 24)
+#define PD25_PF_LD10            (GPIO_PORTD | GPIO_PF | GPIO_OUT | 25)
+#define PD26_PF_LD11            (GPIO_PORTD | GPIO_PF | GPIO_OUT | 26)
+#define PD27_PF_LD12            (GPIO_PORTD | GPIO_PF | GPIO_OUT | 27)
+#define PD28_PF_LD13            (GPIO_PORTD | GPIO_PF | GPIO_OUT | 28)
+#define PD29_PF_LD14            (GPIO_PORTD | GPIO_PF | GPIO_OUT | 29)
+#define PD30_PF_LD15            (GPIO_PORTD | GPIO_PF | GPIO_OUT | 30)
+#define PD31_PF_TMR2OUT         (GPIO_PORTD | GPIO_PF | 31)
+#define PD31_BIN_SPI2_TXD       (GPIO_PORTD | GPIO_BIN | 31)
+
+
+#endif
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx21.h b/arch/arm/plat-mxc/include/mach/iomux-mx21.h
new file mode 100644 (file)
index 0000000..63aaa97
--- /dev/null
@@ -0,0 +1,126 @@
+/*
+* Copyright (C) 2009 by Holger Schurig <hs4233@mail.mn-solutions.de>
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+* MA 02110-1301, USA.
+*/
+
+#ifndef _MXC_IOMUX_MX21_H
+#define _MXC_IOMUX_MX21_H
+
+#ifndef GPIO_PORTA
+#error Please include mach/iomux.h
+#endif
+
+
+/* Primary GPIO pin functions */
+
+#define PB22_PF_USBH1_BYP       (GPIO_PORTB | GPIO_PF | 22)
+#define PB25_PF_USBH1_ON        (GPIO_PORTB | GPIO_PF | 25)
+#define PC5_PF_USBOTG_SDA       (GPIO_PORTC | GPIO_PF | 5)
+#define PC6_PF_USBOTG_SCL       (GPIO_PORTC | GPIO_PF | 6)
+#define PC7_PF_USBOTG_ON        (GPIO_PORTC | GPIO_PF | 7)
+#define PC8_PF_USBOTG_FS        (GPIO_PORTC | GPIO_PF | 8)
+#define PC9_PF_USBOTG_OE        (GPIO_PORTC | GPIO_PF | 9)
+#define PC10_PF_USBOTG_TXDM     (GPIO_PORTC | GPIO_PF | 10)
+#define PC11_PF_USBOTG_TXDP     (GPIO_PORTC | GPIO_PF | 11)
+#define PC12_PF_USBOTG_RXDM     (GPIO_PORTC | GPIO_PF | 12)
+#define PC13_PF_USBOTG_RXDP     (GPIO_PORTC | GPIO_PF | 13)
+#define PC16_PF_SAP_FS          (GPIO_PORTC | GPIO_PF | 16)
+#define PC17_PF_SAP_RXD         (GPIO_PORTC | GPIO_PF | 17)
+#define PC18_PF_SAP_TXD         (GPIO_PORTC | GPIO_PF | 18)
+#define PC19_PF_SAP_CLK         (GPIO_PORTC | GPIO_PF | 19)
+#define PE0_PF_TEST_WB2         (GPIO_PORTE | GPIO_PF | 0)
+#define PE1_PF_TEST_WB1         (GPIO_PORTE | GPIO_PF | 1)
+#define PE2_PF_TEST_WB0         (GPIO_PORTE | GPIO_PF | 2)
+#define PF1_PF_NFCE             (GPIO_PORTF | GPIO_PF | 1)
+#define PF3_PF_NFCLE            (GPIO_PORTF | GPIO_PF | 3)
+#define PF7_PF_NFIO0            (GPIO_PORTF | GPIO_PF | 7)
+#define PF8_PF_NFIO1            (GPIO_PORTF | GPIO_PF | 8)
+#define PF9_PF_NFIO2            (GPIO_PORTF | GPIO_PF | 9)
+#define PF10_PF_NFIO3           (GPIO_PORTF | GPIO_PF | 10)
+#define PF11_PF_NFIO4           (GPIO_PORTF | GPIO_PF | 11)
+#define PF12_PF_NFIO5           (GPIO_PORTF | GPIO_PF | 12)
+#define PF13_PF_NFIO6           (GPIO_PORTF | GPIO_PF | 13)
+#define PF14_PF_NFIO7           (GPIO_PORTF | GPIO_PF | 14)
+#define PF16_PF_RES             (GPIO_PORTF | GPIO_PF | 16)
+
+/* Alternate GPIO pin functions */
+
+#define PA5_AF_BMI_CLK_CS       (GPIO_PORTA | GPIO_AF | 5)
+#define PA6_AF_BMI_D0           (GPIO_PORTA | GPIO_AF | 6)
+#define PA7_AF_BMI_D1           (GPIO_PORTA | GPIO_AF | 7)
+#define PA8_AF_BMI_D2           (GPIO_PORTA | GPIO_AF | 8)
+#define PA9_AF_BMI_D3           (GPIO_PORTA | GPIO_AF | 9)
+#define PA10_AF_BMI_D4          (GPIO_PORTA | GPIO_AF | 10)
+#define PA11_AF_BMI_D5          (GPIO_PORTA | GPIO_AF | 11)
+#define PA12_AF_BMI_D6          (GPIO_PORTA | GPIO_AF | 12)
+#define PA13_AF_BMI_D7          (GPIO_PORTA | GPIO_AF | 13)
+#define PA14_AF_BMI_D8          (GPIO_PORTA | GPIO_AF | 14)
+#define PA15_AF_BMI_D9          (GPIO_PORTA | GPIO_AF | 15)
+#define PA16_AF_BMI_D10         (GPIO_PORTA | GPIO_AF | 16)
+#define PA17_AF_BMI_D11         (GPIO_PORTA | GPIO_AF | 17)
+#define PA18_AF_BMI_D12         (GPIO_PORTA | GPIO_AF | 18)
+#define PA19_AF_BMI_D13         (GPIO_PORTA | GPIO_AF | 19)
+#define PA20_AF_BMI_D14         (GPIO_PORTA | GPIO_AF | 20)
+#define PA21_AF_BMI_D15         (GPIO_PORTA | GPIO_AF | 21)
+#define PA22_AF_BMI_READ_REQ    (GPIO_PORTA | GPIO_AF | 22)
+#define PA23_AF_BMI_WRITE       (GPIO_PORTA | GPIO_AF | 23)
+#define PA29_AF_BMI_RX_FULL     (GPIO_PORTA | GPIO_AF | 29)
+#define PA30_AF_BMI_READ        (GPIO_PORTA | GPIO_AF | 30)
+
+/* AIN GPIO pin functions */
+
+#define PC14_AIN_SYS_CLK        (GPIO_PORTC | GPIO_AIN | GPIO_OUT | 14)
+#define PD21_AIN_USBH2_FS       (GPIO_PORTD | GPIO_AIN | GPIO_OUT | 21)
+#define PD22_AIN_USBH2_OE       (GPIO_PORTD | GPIO_AIN | GPIO_OUT | 22)
+#define PD23_AIN_USBH2_TXDM     (GPIO_PORTD | GPIO_AIN | GPIO_OUT | 23)
+#define PD24_AIN_USBH2_TXDP     (GPIO_PORTD | GPIO_AIN | GPIO_OUT | 24)
+#define PE8_AIN_IR_TXD          (GPIO_PORTE | GPIO_AIN | GPIO_OUT | 8)
+#define PF0_AIN_PC_RST          (GPIO_PORTF | GPIO_AIN | GPIO_OUT | 0)
+#define PF1_AIN_PC_CE1          (GPIO_PORTF | GPIO_AIN | GPIO_OUT | 1)
+#define PF2_AIN_PC_CE2          (GPIO_PORTF | GPIO_AIN | GPIO_OUT | 2)
+#define PF3_AIN_PC_POE          (GPIO_PORTF | GPIO_AIN | GPIO_OUT | 3)
+#define PF4_AIN_PC_OE           (GPIO_PORTF | GPIO_AIN | GPIO_OUT | 4)
+#define PF5_AIN_PC_RW           (GPIO_PORTF | GPIO_AIN | GPIO_OUT | 5)
+
+/* BIN GPIO pin functions */
+
+#define PC14_BIN_SYS_CLK        (GPIO_PORTC | GPIO_BIN | GPIO_OUT | 14)
+#define PD27_BIN_EXT_DMA_GRANT  (GPIO_PORTD | GPIO_BIN | GPIO_OUT | 27)
+
+/* CIN GPIO pin functions */
+
+#define PB26_CIN_USBH1_RXDAT    (GPIO_PORTB | GPIO_CIN | GPIO_OUT | 26)
+
+/* AOUT GPIO pin functions */
+
+#define PA29_AOUT_BMI_WAIT      (GPIO_PORTA | GPIO_AOUT | GPIO_IN | 29)
+#define PD19_AOUT_USBH2_RXDM    (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 19)
+#define PD20_AOUT_USBH2_RXDP    (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 20)
+#define PD25_AOUT_EXT_DMAREQ    (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 25)
+#define PD26_AOUT_USBOTG_RXDAT  (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 26)
+#define PE9_AOUT_IR_RXD         (GPIO_PORTE | GPIO_AOUT | GPIO_IN | 9)
+#define PF6_AOUT_PC_BVD2        (GPIO_PORTF | GPIO_AOUT | GPIO_IN | 6)
+#define PF7_AOUT_PC_BVD1        (GPIO_PORTF | GPIO_AOUT | GPIO_IN | 7)
+#define PF8_AOUT_PC_VS2         (GPIO_PORTF | GPIO_AOUT | GPIO_IN | 8)
+#define PF9_AOUT_PC_VS1         (GPIO_PORTF | GPIO_AOUT | GPIO_IN | 9)
+#define PF10_AOUT_PC_WP         (GPIO_PORTF | GPIO_AOUT | GPIO_IN | 10)
+#define PF11_AOUT_PC_READY      (GPIO_PORTF | GPIO_AOUT | GPIO_IN | 11)
+#define PF12_AOUT_PC_WAIT       (GPIO_PORTF | GPIO_AOUT | GPIO_IN | 12)
+#define PF13_AOUT_PC_CD2        (GPIO_PORTF | GPIO_AOUT | GPIO_IN | 13)
+#define PF14_AOUT_PC_CD1        (GPIO_PORTF | GPIO_AOUT | GPIO_IN | 14)
+
+
+#endif
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx27.h b/arch/arm/plat-mxc/include/mach/iomux-mx27.h
new file mode 100644 (file)
index 0000000..5ac158b
--- /dev/null
@@ -0,0 +1,207 @@
+/*
+* Copyright (C) 2008 by Sascha Hauer <kernel@pengutronix.de>
+* Copyright (C) 2009 by Holger Schurig <hs4233@mail.mn-solutions.de>
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+* MA 02110-1301, USA.
+*/
+
+#ifndef _MXC_IOMUX_MX27_H
+#define _MXC_IOMUX_MX27_H
+
+#ifndef GPIO_PORTA
+#error Please include mach/iomux.h
+#endif
+
+
+/* Primary GPIO pin functions */
+
+#define PA0_PF_USBH2_CLK        (GPIO_PORTA | GPIO_PF | 0)
+#define PA1_PF_USBH2_DIR        (GPIO_PORTA | GPIO_PF | 1)
+#define PA2_PF_USBH2_DATA7      (GPIO_PORTA | GPIO_PF | 2)
+#define PA3_PF_USBH2_NXT        (GPIO_PORTA | GPIO_PF | 3)
+#define PA4_PF_USBH2_STP        (GPIO_PORTA | GPIO_PF | 4)
+#define PB22_PF_USBH1_SUSP      (GPIO_PORTB | GPIO_PF | 22)
+#define PB25_PF_USBH1_RCV       (GPIO_PORTB | GPIO_PF | 25)
+#define PC5_PF_I2C2_SDA         (GPIO_PORTC | GPIO_PF | GPIO_IN | 5)
+#define PC6_PF_I2C2_SCL         (GPIO_PORTC | GPIO_PF | GPIO_IN | 6)
+#define PC7_PF_USBOTG_DATA5     (GPIO_PORTC | GPIO_PF | GPIO_OUT | 7)
+#define PC8_PF_USBOTG_DATA6     (GPIO_PORTC | GPIO_PF | GPIO_OUT | 8)
+#define PC9_PF_USBOTG_DATA0     (GPIO_PORTC | GPIO_PF | GPIO_OUT | 9)
+#define PC10_PF_USBOTG_DATA2    (GPIO_PORTC | GPIO_PF | GPIO_OUT | 10)
+#define PC11_PF_USBOTG_DATA1    (GPIO_PORTC | GPIO_PF | GPIO_OUT | 11)
+#define PC12_PF_USBOTG_DATA4    (GPIO_PORTC | GPIO_PF | GPIO_OUT | 12)
+#define PC13_PF_USBOTG_DATA3    (GPIO_PORTC | GPIO_PF | GPIO_OUT | 13)
+#define PC16_PF_SSI4_FS         (GPIO_PORTC | GPIO_PF | GPIO_IN | 16)
+#define PC17_PF_SSI4_RXD        (GPIO_PORTC | GPIO_PF | GPIO_IN | 17)
+#define PC18_PF_SSI4_TXD        (GPIO_PORTC | GPIO_PF | GPIO_IN | 18)
+#define PC19_PF_SSI4_CLK        (GPIO_PORTC | GPIO_PF | GPIO_IN | 19)
+#define PC25_AF_GPT5_TIN        (GPIO_PORTC | GPIO_AF | 25)
+#define PC27_AF_GPT4_TIN        (GPIO_PORTC | GPIO_AF | 27)
+#define PD0_PF_SD3_CMD          (GPIO_PORTD | GPIO_PF | 0)
+#define PD1_PF_SD3_CLK          (GPIO_PORTD | GPIO_PF | 1)
+#define PD2_PF_ATA_DATA0        (GPIO_PORTD | GPIO_PF | 2)
+#define PD3_PF_ATA_DATA1        (GPIO_PORTD | GPIO_PF | 3)
+#define PD4_PF_ATA_DATA2        (GPIO_PORTD | GPIO_PF | 4)
+#define PD5_PF_ATA_DATA3        (GPIO_PORTD | GPIO_PF | 5)
+#define PD6_PF_ATA_DATA4        (GPIO_PORTD | GPIO_PF | 6)
+#define PD7_PF_ATA_DATA5        (GPIO_PORTD | GPIO_PF | 7)
+#define PD8_PF_ATA_DATA6        (GPIO_PORTD | GPIO_PF | 8)
+#define PD9_PF_ATA_DATA7        (GPIO_PORTD | GPIO_PF | 9)
+#define PD10_PF_ATA_DATA8       (GPIO_PORTD | GPIO_PF | 10)
+#define PD11_PF_ATA_DATA9       (GPIO_PORTD | GPIO_PF | 11)
+#define PD12_PF_ATA_DATA10      (GPIO_PORTD | GPIO_PF | 12)
+#define PD13_PF_ATA_DATA11      (GPIO_PORTD | GPIO_PF | 13)
+#define PD14_PF_ATA_DATA12      (GPIO_PORTD | GPIO_PF | 14)
+#define PD15_PF_ATA_DATA13      (GPIO_PORTD | GPIO_PF | 15)
+#define PD16_PF_ATA_DATA14      (GPIO_PORTD | GPIO_PF | 16)
+#define PE0_PF_USBOTG_NXT       (GPIO_PORTE | GPIO_PF | GPIO_OUT | 0)
+#define PE1_PF_USBOTG_STP       (GPIO_PORTE | GPIO_PF | GPIO_OUT | 1)
+#define PE2_PF_USBOTG_DIR       (GPIO_PORTE | GPIO_PF | GPIO_OUT | 2)
+#define PE24_PF_USBOTG_CLK      (GPIO_PORTE | GPIO_PF | GPIO_OUT | 24)
+#define PE25_PF_USBOTG_DATA7    (GPIO_PORTE | GPIO_PF | GPIO_OUT | 25)
+#define PF1_PF_NFCLE            (GPIO_PORTF | GPIO_PF | 1)
+#define PF3_PF_NFCE             (GPIO_PORTF | GPIO_PF | 3)
+#define PF7_PF_PC_POE           (GPIO_PORTF | GPIO_PF | 7)
+#define PF8_PF_PC_RW            (GPIO_PORTF | GPIO_PF | 8)
+#define PF9_PF_PC_IOIS16        (GPIO_PORTF | GPIO_PF | 9)
+#define PF10_PF_PC_RST          (GPIO_PORTF | GPIO_PF | 10)
+#define PF11_PF_PC_BVD2         (GPIO_PORTF | GPIO_PF | 11)
+#define PF12_PF_PC_BVD1         (GPIO_PORTF | GPIO_PF | 12)
+#define PF13_PF_PC_VS2          (GPIO_PORTF | GPIO_PF | 13)
+#define PF14_PF_PC_VS1          (GPIO_PORTF | GPIO_PF | 14)
+#define PF16_PF_PC_PWRON        (GPIO_PORTF | GPIO_PF | 16)
+#define PF17_PF_PC_READY        (GPIO_PORTF | GPIO_PF | 17)
+#define PF18_PF_PC_WAIT         (GPIO_PORTF | GPIO_PF | 18)
+#define PF19_PF_PC_CD2          (GPIO_PORTF | GPIO_PF | 19)
+#define PF20_PF_PC_CD1          (GPIO_PORTF | GPIO_PF | 20)
+#define PF23_PF_ATA_DATA15      (GPIO_PORTF | GPIO_PF | 23)
+
+/* Alternate GPIO pin functions */
+
+#define PB4_AF_MSHC_DATA0       (GPIO_PORTB | GPIO_AF | GPIO_OUT | 4)
+#define PB5_AF_MSHC_DATA1       (GPIO_PORTB | GPIO_AF | GPIO_OUT | 5)
+#define PB6_AF_MSHC_DATA2       (GPIO_PORTB | GPIO_AF | GPIO_OUT | 6)
+#define PB7_AF_MSHC_DATA4       (GPIO_PORTB | GPIO_AF | GPIO_OUT | 7)
+#define PB8_AF_MSHC_BS          (GPIO_PORTB | GPIO_AF | GPIO_OUT | 8)
+#define PB9_AF_MSHC_SCLK        (GPIO_PORTB | GPIO_AF | GPIO_OUT | 9)
+#define PB10_AF_UART6_TXD       (GPIO_PORTB | GPIO_AF | GPIO_OUT | 10)
+#define PB11_AF_UART6_RXD       (GPIO_PORTB | GPIO_AF | GPIO_IN | 11)
+#define PB12_AF_UART6_CTS       (GPIO_PORTB | GPIO_AF | GPIO_OUT | 12)
+#define PB13_AF_UART6_RTS       (GPIO_PORTB | GPIO_AF | GPIO_IN | 13)
+#define PB18_AF_UART5_TXD       (GPIO_PORTB | GPIO_AF | GPIO_OUT | 18)
+#define PB19_AF_UART5_RXD       (GPIO_PORTB | GPIO_AF | GPIO_IN | 19)
+#define PB20_AF_UART5_CTS       (GPIO_PORTB | GPIO_AF | GPIO_OUT | 20)
+#define PB21_AF_UART5_RTS       (GPIO_PORTB | GPIO_AF | GPIO_IN | 21)
+#define PC8_AF_FEC_MDIO         (GPIO_PORTC | GPIO_AF | GPIO_IN | 8)
+#define PC24_AF_GPT5_TOUT       (GPIO_PORTC | GPIO_AF | 24)
+#define PC26_AF_GPT4_TOUT       (GPIO_PORTC | GPIO_AF | 26)
+#define PD1_AF_ETMTRACE_PKT15   (GPIO_PORTD | GPIO_AF | 1)
+#define PD6_AF_ETMTRACE_PKT14   (GPIO_PORTD | GPIO_AF | 6)
+#define PD7_AF_ETMTRACE_PKT13   (GPIO_PORTD | GPIO_AF | 7)
+#define PD9_AF_ETMTRACE_PKT12   (GPIO_PORTD | GPIO_AF | 9)
+#define PD2_AF_SD3_D0           (GPIO_PORTD | GPIO_AF | 2)
+#define PD3_AF_SD3_D1           (GPIO_PORTD | GPIO_AF | 3)
+#define PD4_AF_SD3_D2           (GPIO_PORTD | GPIO_AF | 4)
+#define PD5_AF_SD3_D3           (GPIO_PORTD | GPIO_AF | 5)
+#define PD8_AF_FEC_MDIO         (GPIO_PORTD | GPIO_AF | GPIO_IN | 8)
+#define PD10_AF_ETMTRACE_PKT11  (GPIO_PORTD | GPIO_AF | 10)
+#define PD11_AF_ETMTRACE_PKT10  (GPIO_PORTD | GPIO_AF | 11)
+#define PD12_AF_ETMTRACE_PKT9   (GPIO_PORTD | GPIO_AF | 12)
+#define PD13_AF_ETMTRACE_PKT8   (GPIO_PORTD | GPIO_AF | 13)
+#define PD14_AF_ETMTRACE_PKT7   (GPIO_PORTD | GPIO_AF | 14)
+#define PD15_AF_ETMTRACE_PKT6   (GPIO_PORTD | GPIO_AF | 15)
+#define PD16_AF_ETMTRACE_PKT5   (GPIO_PORTD | GPIO_AF | 16)
+#define PF1_AF_ETMTRACE_PKT0    (GPIO_PORTF | GPIO_AF | 1)
+#define PF3_AF_ETMTRACE_PKT2    (GPIO_PORTF | GPIO_AF | 3)
+#define PF5_AF_ETMPIPESTAT11    (GPIO_PORTF | GPIO_AF | 5)
+#define PF7_AF_ATA_BUFFER_EN    (GPIO_PORTF | GPIO_AF | 7)
+#define PF8_AF_ATA_IORDY        (GPIO_PORTF | GPIO_AF | 8)
+#define PF9_AF_ATA_INTRQ        (GPIO_PORTF | GPIO_AF | 9)
+#define PF10_AF_ATA_RESET       (GPIO_PORTF | GPIO_AF | 10)
+#define PF11_AF_ATA_DMACK       (GPIO_PORTF | GPIO_AF | 11)
+#define PF12_AF_ATA_DMAREQ      (GPIO_PORTF | GPIO_AF | 12)
+#define PF13_AF_ATA_DA0         (GPIO_PORTF | GPIO_AF | 13)
+#define PF14_AF_ATA_DA1         (GPIO_PORTF | GPIO_AF | 14)
+#define PF15_AF_ETMTRACE_SYNC   (GPIO_PORTF | GPIO_AF | 15)
+#define PF16_AF_ATA_DA2         (GPIO_PORTF | GPIO_AF | 16)
+#define PF17_AF_ATA_CS0         (GPIO_PORTF | GPIO_AF | 17)
+#define PF18_AF_ATA_CS1         (GPIO_PORTF | GPIO_AF | 18)
+#define PF19_AF_ATA_DIOW        (GPIO_PORTF | GPIO_AF | 19)
+#define PF20_AF_ATA_DIOR        (GPIO_PORTF | GPIO_AF | 20)
+#define PF22_AF_ETMTRACE_CLK    (GPIO_PORTF | GPIO_AF | 22)
+#define PF23_AF_ETMTRACE_PKT4   (GPIO_PORTF | GPIO_AF | 23)
+
+/* AIN GPIO pin functions */
+
+#define PC14_AIN_SSI1_MCLK      (GPIO_PORTC | GPIO_AIN | GPIO_OUT | 14)
+#define PC15_AIN_GPT6_TOUT      (GPIO_PORTC | GPIO_AIN | GPIO_OUT | 15)
+#define PD0_AIN_FEC_TXD0        (GPIO_PORTD | GPIO_AIN | GPIO_OUT | 0)
+#define PD1_AIN_FEC_TXD1        (GPIO_PORTD | GPIO_AIN | GPIO_OUT | 1)
+#define PD2_AIN_FEC_TXD2        (GPIO_PORTD | GPIO_AIN | GPIO_OUT | 2)
+#define PD3_AIN_FEC_TXD3        (GPIO_PORTD | GPIO_AIN | GPIO_OUT | 3)
+#define PD9_AIN_FEC_MDC         (GPIO_PORTD | GPIO_AIN | GPIO_OUT | 9)
+#define PD16_AIN_FEC_TX_ER      (GPIO_PORTD | GPIO_AIN | GPIO_OUT | 16)
+#define PD27_AIN_EXT_DMA_GRANT  (GPIO_PORTD | GPIO_AIN | GPIO_OUT | 27)
+#define PF23_AIN_FEC_TX_EN      (GPIO_PORTF | GPIO_AIN | GPIO_OUT | 23)
+
+/* BIN GPIO pin functions */
+
+#define PC14_BIN_SSI2_MCLK      (GPIO_PORTC | GPIO_BIN | GPIO_OUT | 14)
+
+/* CIN GPIO pin functions */
+
+#define PD2_CIN_SLCDC1_DAT0     (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 2)
+#define PD3_CIN_SLCDC1_DAT1     (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 3)
+#define PD4_CIN_SLCDC1_DAT2     (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 4)
+#define PD5_CIN_SLCDC1_DAT3     (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 5)
+#define PD6_CIN_SLCDC1_DAT4     (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 6)
+#define PD7_CIN_SLCDC1_DAT5     (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 7)
+#define PD8_CIN_SLCDC1_DAT6     (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 8)
+#define PD9_CIN_SLCDC1_DAT7     (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 9)
+#define PD10_CIN_SLCDC1_DAT8    (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 10)
+#define PD11_CIN_SLCDC1_DAT9    (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 11)
+#define PD12_CIN_SLCDC1_DAT10   (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 12)
+#define PD13_CIN_SLCDC1_DAT11   (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 13)
+#define PD14_CIN_SLCDC1_DAT12   (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 14)
+#define PD15_CIN_SLCDC1_DAT13   (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 15)
+#define PD16_CIN_SLCDC1_DAT14   (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 16)
+#define PD23_CIN_SLCDC1_DAT15   (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 23)
+#define PF27_CIN_EXT_DMA_GRANT  (GPIO_PORTF | GPIO_CIN | GPIO_OUT | 27)
+/* LCDC_TESTx on PBxx omitted, because it's not clear what they do */
+
+/* AOUT GPIO pin functions */
+
+#define PC14_AOUT_GPT6_TIN      (GPIO_PORTC | GPIO_AOUT | GPIO_IN | 14)
+#define PD4_AOUT_FEC_RX_ER      (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 4)
+#define PD5_AOUT_FEC_RXD1       (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 5)
+#define PD6_AOUT_FEC_RXD2       (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 6)
+#define PD7_AOUT_FEC_RXD3       (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 7)
+#define PD10_AOUT_FEC_CRS       (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 10)
+#define PD11_AOUT_FEC_TX_CLK    (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 11)
+#define PD12_AOUT_FEC_RXD0      (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 12)
+#define PD13_AOUT_FEC_RX_DV     (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 13)
+#define PD14_AOUT_FEC_RX_CLK    (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 14)
+#define PD15_AOUT_FEC_COL       (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 15)
+
+#define PC17_BOUT_PC_IOIS16     (GPIO_PORTC | GPIO_BOUT | GPIO_IN | 17)
+#define PC18_BOUT_PC_BVD2       (GPIO_PORTC | GPIO_BOUT | GPIO_IN | 18)
+#define PC19_BOUT_PC_BVD1       (GPIO_PORTC | GPIO_BOUT | GPIO_IN | 19)
+#define PC28_BOUT_PC_BVD2       (GPIO_PORTC | GPIO_BOUT | GPIO_IN | 28)
+#define PC29_BOUT_PC_VS1        (GPIO_PORTC | GPIO_BOUT | GPIO_IN | 29)
+#define PC30_BOUT_PC_READY      (GPIO_PORTC | GPIO_BOUT | GPIO_IN | 30)
+#define PC31_BOUT_PC_WAIT       (GPIO_PORTC | GPIO_BOUT | GPIO_IN | 31)
+
+
+#endif /* _MXC_GPIO_MX1_MX2_H */
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx2x.h b/arch/arm/plat-mxc/include/mach/iomux-mx2x.h
new file mode 100644 (file)
index 0000000..fb5ae63
--- /dev/null
@@ -0,0 +1,237 @@
+/*
+* Copyright (C) 2008 by Sascha Hauer <kernel@pengutronix.de>
+* Copyright (C) 2009 by Holger Schurig <hs4233@mail.mn-solutions.de>
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+* MA 02110-1301, USA.
+*/
+
+#ifndef _MXC_IOMUX_MX2x_H
+#define _MXC_IOMUX_MX2x_H
+
+#ifndef GPIO_PORTA
+#error Please include mach/iomux.h
+#endif
+
+
+/* Primary GPIO pin functions */
+
+#define PA5_PF_LSCLK            (GPIO_PORTA | GPIO_PF | GPIO_OUT | 5)
+#define PA6_PF_LD0              (GPIO_PORTA | GPIO_PF | GPIO_OUT | 6)
+#define PA7_PF_LD1              (GPIO_PORTA | GPIO_PF | GPIO_OUT | 7)
+#define PA8_PF_LD2              (GPIO_PORTA | GPIO_PF | GPIO_OUT | 8)
+#define PA9_PF_LD3              (GPIO_PORTA | GPIO_PF | GPIO_OUT | 9)
+#define PA10_PF_LD4             (GPIO_PORTA | GPIO_PF | GPIO_OUT | 10)
+#define PA11_PF_LD5             (GPIO_PORTA | GPIO_PF | GPIO_OUT | 11)
+#define PA12_PF_LD6             (GPIO_PORTA | GPIO_PF | GPIO_OUT | 12)
+#define PA13_PF_LD7             (GPIO_PORTA | GPIO_PF | GPIO_OUT | 13)
+#define PA14_PF_LD8             (GPIO_PORTA | GPIO_PF | GPIO_OUT | 14)
+#define PA15_PF_LD9             (GPIO_PORTA | GPIO_PF | GPIO_OUT | 15)
+#define PA16_PF_LD10            (GPIO_PORTA | GPIO_PF | GPIO_OUT | 16)
+#define PA17_PF_LD11            (GPIO_PORTA | GPIO_PF | GPIO_OUT | 17)
+#define PA18_PF_LD12            (GPIO_PORTA | GPIO_PF | GPIO_OUT | 18)
+#define PA19_PF_LD13            (GPIO_PORTA | GPIO_PF | GPIO_OUT | 19)
+#define PA20_PF_LD14            (GPIO_PORTA | GPIO_PF | GPIO_OUT | 20)
+#define PA21_PF_LD15            (GPIO_PORTA | GPIO_PF | GPIO_OUT | 21)
+#define PA22_PF_LD16            (GPIO_PORTA | GPIO_PF | GPIO_OUT | 22)
+#define PA23_PF_LD17            (GPIO_PORTA | GPIO_PF | GPIO_OUT | 23)
+#define PA24_PF_REV             (GPIO_PORTA | GPIO_PF | GPIO_OUT | 24)
+#define PA25_PF_CLS             (GPIO_PORTA | GPIO_PF | GPIO_OUT | 25)
+#define PA26_PF_PS              (GPIO_PORTA | GPIO_PF | GPIO_OUT | 26)
+#define PA27_PF_SPL_SPR         (GPIO_PORTA | GPIO_PF | GPIO_OUT | 27)
+#define PA28_PF_HSYNC           (GPIO_PORTA | GPIO_PF | GPIO_OUT | 28)
+#define PA29_PF_VSYNC           (GPIO_PORTA | GPIO_PF | GPIO_OUT | 29)
+#define PA30_PF_CONTRAST        (GPIO_PORTA | GPIO_PF | GPIO_OUT | 30)
+#define PA31_PF_OE_ACD          (GPIO_PORTA | GPIO_PF | GPIO_OUT | 31)
+#define PB4_PF_SD2_D0           (GPIO_PORTB | GPIO_PF | 4)
+#define PB5_PF_SD2_D1           (GPIO_PORTB | GPIO_PF | 5)
+#define PB6_PF_SD2_D2           (GPIO_PORTB | GPIO_PF | 6)
+#define PB7_PF_SD2_D3           (GPIO_PORTB | GPIO_PF | 7)
+#define PB8_PF_SD2_CMD          (GPIO_PORTB | GPIO_PF | 8)
+#define PB9_PF_SD2_CLK          (GPIO_PORTB | GPIO_PF | 9)
+#define PB10_PF_CSI_D0          (GPIO_PORTB | GPIO_PF | GPIO_OUT | 10)
+#define PB11_PF_CSI_D1          (GPIO_PORTB | GPIO_PF | GPIO_OUT | 11)
+#define PB12_PF_CSI_D2          (GPIO_PORTB | GPIO_PF | GPIO_OUT | 12)
+#define PB13_PF_CSI_D3          (GPIO_PORTB | GPIO_PF | GPIO_OUT | 13)
+#define PB14_PF_CSI_D4          (GPIO_PORTB | GPIO_PF | GPIO_OUT | 14)
+#define PB15_PF_CSI_MCLK        (GPIO_PORTB | GPIO_PF | GPIO_OUT | 15)
+#define PB16_PF_CSI_PIXCLK      (GPIO_PORTB | GPIO_PF | GPIO_OUT | 16)
+#define PB17_PF_CSI_D5          (GPIO_PORTB | GPIO_PF | GPIO_OUT | 17)
+#define PB18_PF_CSI_D6          (GPIO_PORTB | GPIO_PF | GPIO_OUT | 18)
+#define PB19_PF_CSI_D7          (GPIO_PORTB | GPIO_PF | GPIO_OUT | 19)
+#define PB20_PF_CSI_VSYNC       (GPIO_PORTB | GPIO_PF | GPIO_OUT | 20)
+#define PB21_PF_CSI_HSYNC       (GPIO_PORTB | GPIO_PF | GPIO_OUT | 21)
+#define PB23_PF_USB_PWR         (GPIO_PORTB | GPIO_PF | 23)
+#define PB24_PF_USB_OC          (GPIO_PORTB | GPIO_PF | 24)
+#define PB26_PF_USBH1_FS        (GPIO_PORTB | GPIO_PF | 26)
+#define PB27_PF_USBH1_OE        (GPIO_PORTB | GPIO_PF | 27)
+#define PB28_PF_USBH1_TXDM      (GPIO_PORTB | GPIO_PF | 28)
+#define PB29_PF_USBH1_TXDP      (GPIO_PORTB | GPIO_PF | 29)
+#define PB30_PF_USBH1_RXDM      (GPIO_PORTB | GPIO_PF | 30)
+#define PB31_PF_USBH1_RXDP      (GPIO_PORTB | GPIO_PF | 31)
+#define PC14_PF_TOUT            (GPIO_PORTC | GPIO_PF | 14)
+#define PC15_PF_TIN             (GPIO_PORTC | GPIO_PF | 15)
+#define PC20_PF_SSI1_FS         (GPIO_PORTC | GPIO_PF | GPIO_IN | 20)
+#define PC21_PF_SSI1_RXD        (GPIO_PORTC | GPIO_PF | GPIO_IN | 21)
+#define PC22_PF_SSI1_TXD        (GPIO_PORTC | GPIO_PF | GPIO_IN | 22)
+#define PC23_PF_SSI1_CLK        (GPIO_PORTC | GPIO_PF | GPIO_IN | 23)
+#define PC24_PF_SSI2_FS         (GPIO_PORTC | GPIO_PF | GPIO_IN | 24)
+#define PC25_PF_SSI2_RXD        (GPIO_PORTC | GPIO_PF | GPIO_IN | 25)
+#define PC26_PF_SSI2_TXD        (GPIO_PORTC | GPIO_PF | GPIO_IN | 26)
+#define PC27_PF_SSI2_CLK        (GPIO_PORTC | GPIO_PF | GPIO_IN | 27)
+#define PC28_PF_SSI3_FS         (GPIO_PORTC | GPIO_PF | GPIO_IN | 28)
+#define PC29_PF_SSI3_RXD        (GPIO_PORTC | GPIO_PF | GPIO_IN | 29)
+#define PC30_PF_SSI3_TXD        (GPIO_PORTC | GPIO_PF | GPIO_IN | 30)
+#define PC31_PF_SSI3_CLK        (GPIO_PORTC | GPIO_PF | GPIO_IN | 31)
+#define PD17_PF_I2C_DATA        (GPIO_PORTD | GPIO_PF | GPIO_OUT | 17)
+#define PD18_PF_I2C_CLK         (GPIO_PORTD | GPIO_PF | GPIO_OUT | 18)
+#define PD19_PF_CSPI2_SS2       (GPIO_PORTD | GPIO_PF | 19)
+#define PD20_PF_CSPI2_SS1       (GPIO_PORTD | GPIO_PF | 20)
+#define PD21_PF_CSPI2_SS0       (GPIO_PORTD | GPIO_PF | 21)
+#define PD22_PF_CSPI2_SCLK      (GPIO_PORTD | GPIO_PF | 22)
+#define PD23_PF_CSPI2_MISO      (GPIO_PORTD | GPIO_PF | 23)
+#define PD24_PF_CSPI2_MOSI      (GPIO_PORTD | GPIO_PF | 24)
+#define PD25_PF_CSPI1_RDY       (GPIO_PORTD | GPIO_PF | GPIO_OUT | 25)
+#define PD26_PF_CSPI1_SS2       (GPIO_PORTD | GPIO_PF | GPIO_OUT | 26)
+#define PD27_PF_CSPI1_SS1       (GPIO_PORTD | GPIO_PF | GPIO_OUT | 27)
+#define PD28_PF_CSPI1_SS0       (GPIO_PORTD | GPIO_PF | GPIO_OUT | 28)
+#define PD29_PF_CSPI1_SCLK      (GPIO_PORTD | GPIO_PF | GPIO_OUT | 29)
+#define PD30_PF_CSPI1_MISO      (GPIO_PORTD | GPIO_PF | GPIO_IN | 30)
+#define PD31_PF_CSPI1_MOSI      (GPIO_PORTD | GPIO_PF | GPIO_OUT | 31)
+#define PE3_PF_UART2_CTS        (GPIO_PORTE | GPIO_PF | GPIO_OUT | 3)
+#define PE4_PF_UART2_RTS        (GPIO_PORTE | GPIO_PF | GPIO_IN | 4)
+#define PE5_PF_PWMO             (GPIO_PORTE | GPIO_PF | 5)
+#define PE6_PF_UART2_TXD        (GPIO_PORTE | GPIO_PF | GPIO_OUT | 6)
+#define PE7_PF_UART2_RXD        (GPIO_PORTE | GPIO_PF | GPIO_IN | 7)
+#define PE8_PF_UART3_TXD        (GPIO_PORTE | GPIO_PF | GPIO_OUT | 8)
+#define PE9_PF_UART3_RXD        (GPIO_PORTE | GPIO_PF | GPIO_IN | 9)
+#define PE10_PF_UART3_CTS       (GPIO_PORTE | GPIO_PF | GPIO_OUT | 10)
+#define PE11_PF_UART3_RTS       (GPIO_PORTE | GPIO_PF | GPIO_IN | 11)
+#define PE12_PF_UART1_TXD       (GPIO_PORTE | GPIO_PF | GPIO_OUT | 12)
+#define PE13_PF_UART1_RXD       (GPIO_PORTE | GPIO_PF | GPIO_IN | 13)
+#define PE14_PF_UART1_CTS       (GPIO_PORTE | GPIO_PF | GPIO_OUT | 14)
+#define PE15_PF_UART1_RTS       (GPIO_PORTE | GPIO_PF | GPIO_IN | 15)
+#define PE16_PF_RTCK            (GPIO_PORTE | GPIO_PF | GPIO_OUT | 16)
+#define PE17_PF_RESET_OUT       (GPIO_PORTE | GPIO_PF | 17)
+#define PE18_PF_SD1_D0          (GPIO_PORTE | GPIO_PF | 18)
+#define PE19_PF_SD1_D1          (GPIO_PORTE | GPIO_PF | 19)
+#define PE20_PF_SD1_D2          (GPIO_PORTE | GPIO_PF | 20)
+#define PE21_PF_SD1_D3          (GPIO_PORTE | GPIO_PF | 21)
+#define PE22_PF_SD1_CMD         (GPIO_PORTE | GPIO_PF | 22)
+#define PE23_PF_SD1_CLK         (GPIO_PORTE | GPIO_PF | 23)
+#define PF0_PF_NRFB             (GPIO_PORTF | GPIO_PF | 0)
+#define PF2_PF_NFWP             (GPIO_PORTF | GPIO_PF | 2)
+#define PF4_PF_NFALE            (GPIO_PORTF | GPIO_PF | 4)
+#define PF5_PF_NFRE             (GPIO_PORTF | GPIO_PF | 5)
+#define PF6_PF_NFWE             (GPIO_PORTF | GPIO_PF | 6)
+#define PF15_PF_CLKO            (GPIO_PORTF | GPIO_PF | 15)
+#define PF21_PF_CS4             (GPIO_PORTF | GPIO_PF | 21)
+#define PF22_PF_CS5             (GPIO_PORTF | GPIO_PF | 22)
+
+/* Alternate GPIO pin functions */
+
+#define PB26_AF_UART4_RTS       (GPIO_PORTB | GPIO_AF | GPIO_IN | 26)
+#define PB28_AF_UART4_TXD       (GPIO_PORTB | GPIO_AF | GPIO_OUT | 28)
+#define PB29_AF_UART4_CTS       (GPIO_PORTB | GPIO_AF | GPIO_OUT | 29)
+#define PB31_AF_UART4_RXD       (GPIO_PORTB | GPIO_AF | GPIO_IN | 31)
+#define PC28_AF_SLCDC2_D0       (GPIO_PORTC | GPIO_AF | 28)
+#define PC29_AF_SLCDC2_RS       (GPIO_PORTC | GPIO_AF | 29)
+#define PC30_AF_SLCDC2_CS       (GPIO_PORTC | GPIO_AF | 30)
+#define PC31_AF_SLCDC2_CLK      (GPIO_PORTC | GPIO_AF | 31)
+#define PD19_AF_USBH2_DATA4     (GPIO_PORTD | GPIO_AF | 19)
+#define PD20_AF_USBH2_DATA3     (GPIO_PORTD | GPIO_AF | 20)
+#define PD21_AF_USBH2_DATA6     (GPIO_PORTD | GPIO_AF | 21)
+#define PD22_AF_USBH2_DATA0     (GPIO_PORTD | GPIO_AF | 22)
+#define PD23_AF_USBH2_DATA2     (GPIO_PORTD | GPIO_AF | 23)
+#define PD24_AF_USBH2_DATA1     (GPIO_PORTD | GPIO_AF | 24)
+#define PD26_AF_USBH2_DATA5     (GPIO_PORTD | GPIO_AF | 26)
+#define PE0_AF_KP_COL6          (GPIO_PORTE | GPIO_AF | 0)
+#define PE1_AF_KP_ROW6          (GPIO_PORTE | GPIO_AF | 1)
+#define PE2_AF_KP_ROW7          (GPIO_PORTE | GPIO_AF | 2)
+#define PE3_AF_KP_COL7          (GPIO_PORTE | GPIO_AF | 3)
+#define PE4_AF_KP_ROW7          (GPIO_PORTE | GPIO_AF | 4)
+#define PE6_AF_KP_COL6          (GPIO_PORTE | GPIO_AF | 6)
+#define PE7_AF_KP_ROW6          (GPIO_PORTE | GPIO_AF | 7)
+#define PE16_AF_OWIRE           (GPIO_PORTE | GPIO_AF | 16)
+#define PE18_AF_CSPI3_MISO      (GPIO_PORTE | GPIO_AF | GPIO_IN | 18)
+#define PE21_AF_CSPI3_SS        (GPIO_PORTE | GPIO_AF | GPIO_OUT | 21)
+#define PE22_AF_CSPI3_MOSI      (GPIO_PORTE | GPIO_AF | GPIO_OUT | 22)
+#define PE23_AF_CSPI3_SCLK      (GPIO_PORTE | GPIO_AF | GPIO_OUT | 23)
+
+/* AIN GPIO pin functions */
+
+#define PA6_AIN_SLCDC1_DAT0     (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 6)
+#define PA7_AIN_SLCDC1_DAT1     (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 7)
+#define PA8_AIN_SLCDC1_DAT2     (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 8)
+#define PA0_AIN_SLCDC1_DAT3     (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 0)
+#define PA11_AIN_SLCDC1_DAT5    (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 11)
+#define PA13_AIN_SLCDC1_DAT7    (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 13)
+#define PA15_AIN_SLCDC1_DAT9    (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 15)
+#define PA17_AIN_SLCDC1_DAT11   (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 17)
+#define PA19_AIN_SLCDC1_DAT13   (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 19)
+#define PA21_AIN_SLCDC1_DAT15   (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 21)
+#define PA22_AIN_EXT_DMAGRANT   (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 22)
+#define PA24_AIN_SLCDC1_D0      (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 24)
+#define PA25_AIN_SLCDC1_RS      (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 25)
+#define PA26_AIN_SLCDC1_CS      (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 26)
+#define PA27_AIN_SLCDC1_CLK     (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 27)
+#define PB6_AIN_SLCDC1_D0       (GPIO_PORTB | GPIO_AIN | GPIO_OUT | 6)
+#define PB7_AIN_SLCDC1_RS       (GPIO_PORTB | GPIO_AIN | GPIO_OUT | 7)
+#define PB8_AIN_SLCDC1_CS       (GPIO_PORTB | GPIO_AIN | GPIO_OUT | 8)
+#define PB9_AIN_SLCDC1_CLK      (GPIO_PORTB | GPIO_AIN | GPIO_OUT | 9)
+#define PB25_AIN_SLCDC1_DAT0    (GPIO_PORTB | GPIO_AIN | GPIO_OUT | 25)
+#define PB26_AIN_SLCDC1_DAT1    (GPIO_PORTB | GPIO_AIN | GPIO_OUT | 26)
+#define PB27_AIN_SLCDC1_DAT2    (GPIO_PORTB | GPIO_AIN | GPIO_OUT | 27)
+#define PB28_AIN_SLCDC1_DAT3    (GPIO_PORTB | GPIO_AIN | GPIO_OUT | 28)
+#define PB29_AIN_SLCDC1_DAT4    (GPIO_PORTB | GPIO_AIN | GPIO_OUT | 29)
+#define PB30_AIN_SLCDC1_DAT5    (GPIO_PORTB | GPIO_AIN | GPIO_OUT | 30)
+#define PB31_AIN_SLCDC1_DAT6    (GPIO_PORTB | GPIO_AIN | GPIO_OUT | 31)
+#define PC5_AIN_SLCDC1_DAT7     (GPIO_PORTC | GPIO_AIN | GPIO_OUT | 5)
+#define PC6_AIN_SLCDC1_DAT8     (GPIO_PORTC | GPIO_AIN | GPIO_OUT | 6)
+#define PC7_AIN_SLCDC1_DAT9     (GPIO_PORTC | GPIO_AIN | GPIO_OUT | 7)
+#define PC8_AIN_SLCDC1_DAT10    (GPIO_PORTC | GPIO_AIN | GPIO_OUT | 8)
+#define PC9_AIN_SLCDC1_DAT11    (GPIO_PORTC | GPIO_AIN | GPIO_OUT | 9)
+#define PC10_AIN_SLCDC1_DAT12   (GPIO_PORTC | GPIO_AIN | GPIO_OUT | 10)
+#define PC11_AIN_SLCDC1_DAT13   (GPIO_PORTC | GPIO_AIN | GPIO_OUT | 11)
+#define PC12_AIN_SLCDC1_DAT14   (GPIO_PORTC | GPIO_AIN | GPIO_OUT | 12)
+#define PC13_AIN_SLCDC1_DAT15   (GPIO_PORTC | GPIO_AIN | GPIO_OUT | 13)
+#define PE5_AIN_PC_SPKOUT       (GPIO_PORTE | GPIO_AIN | GPIO_OUT | 5)
+
+/* BIN GPIO pin functions */
+
+#define PE5_BIN_TOUT2           (GPIO_PORTE | GPIO_BIN | GPIO_OUT | 5)
+
+/* CIN GPIO pin functions */
+
+#define PA14_CIN_SLCDC1_DAT0    (GPIO_PORTA | GPIO_CIN | GPIO_OUT | 14)
+#define PA15_CIN_SLCDC1_DAT1    (GPIO_PORTA | GPIO_CIN | GPIO_OUT | 15)
+#define PA16_CIN_SLCDC1_DAT2    (GPIO_PORTA | GPIO_CIN | GPIO_OUT | 16)
+#define PA17_CIN_SLCDC1_DAT3    (GPIO_PORTA | GPIO_CIN | GPIO_OUT | 17)
+#define PA18_CIN_SLCDC1_DAT4    (GPIO_PORTA | GPIO_CIN | GPIO_OUT | 18)
+#define PA19_CIN_SLCDC1_DAT5    (GPIO_PORTA | GPIO_CIN | GPIO_OUT | 19)
+#define PA20_CIN_SLCDC1_DAT6    (GPIO_PORTA | GPIO_CIN | GPIO_OUT | 20)
+#define PA21_CIN_SLCDC1_DAT7    (GPIO_PORTA | GPIO_CIN | GPIO_OUT | 21)
+#define PB30_CIN_UART4_CTS      (GPIO_PORTB | GPIO_CIN | GPIO_OUT | 30)
+#define PE5_CIN_TOUT3           (GPIO_PORTE | GPIO_CIN | GPIO_OUT | 5)
+
+/* AOUT GPIO pin functions */
+
+#define PB29_AOUT_UART4_RXD     (GPIO_PORTB | GPIO_AOUT | GPIO_IN | 29)
+#define PB31_AOUT_UART4_RTS     (GPIO_PORTB | GPIO_AOUT | GPIO_IN | 31)
+#define PC8_AOUT_USBOTG_TXR_INT (GPIO_PORTC | GPIO_AOUT | GPIO_IN | 8)
+#define PC15_AOUT_WKGD          (GPIO_PORTC | GPIO_AOUT | GPIO_IN | 15)
+#define PF21_AOUT_DTACK         (GPIO_PORTF | GPIO_AOUT | GPIO_IN | 21)
+
+
+#endif
index c9198c0aea1827a10580a492512bee7de200f1fe..ab838cfe94f9f0953baac8c9008d86af4efef7cb 100644 (file)
@@ -92,7 +92,7 @@ enum iomux_gp_func {
        MUX_EXTDMAREQ2_MBX_SEL          = 1 << 15,
        MUX_TAMPER_DETECT_EN            = 1 << 16,
        MUX_PGP_USB_4WIRE               = 1 << 17,
-       MUX_PGB_USB_COMMON              = 1 << 18,
+       MUX_PGP_USB_COMMON              = 1 << 18,
        MUX_SDHC_MEMSTICK1              = 1 << 19,
        MUX_SDHC_MEMSTICK2              = 1 << 20,
        MUX_PGP_SPLL_BYP                = 1 << 21,
@@ -109,21 +109,44 @@ enum iomux_gp_func {
 };
 
 /*
- * This function enables/disables the general purpose function for a particular
- * signal.
+ * setups a single pin:
+ *     - reserves the pin so that it is not claimed by another driver
+ *     - setups the iomux according to the configuration
+ *     - if the pin is configured as a GPIO, we claim it throug kernel gpiolib
+ */
+int mxc_iomux_setup_pin(const unsigned int pin, const char *label);
+/*
+ * setups mutliple pins
+ * convenient way to call the above function with tables
  */
-void iomux_config_gpr(enum iomux_gp_func , bool);
+int mxc_iomux_setup_multiple_pins(unsigned int *pin_list, unsigned count,
+               const char *label);
 
 /*
- * set the mode for a IOMUX pin.
+ * releases a single pin:
+ *     - make it available for a future use by another driver
+ *     - frees the GPIO if the pin was configured as GPIO
+ *     - DOES NOT reconfigure the IOMUX in its reset state
  */
-int mxc_iomux_mode(unsigned int);
+void mxc_iomux_release_pin(const unsigned int pin);
+/*
+ * releases multiple pins
+ * convenvient way to call the above function with tables
+ */
+void mxc_iomux_release_multiple_pins(unsigned int *pin_list, int count);
 
 /*
  * This function enables/disables the general purpose function for a particular
  * signal.
  */
-void mxc_iomux_set_gpr(enum iomux_gp_func, bool);
+void mxc_iomux_set_gpr(enum iomux_gp_func, bool en);
+
+/*
+ * This function only configures the iomux hardware.
+ * It is called by the setup functions and should not be called directly anymore.
+ * It is here visible for backward compatibility
+ */
+int mxc_iomux_mode(unsigned int pin_mode);
 
 #define IOMUX_PADNUM_MASK      0x1ff
 #define IOMUX_GPIONUM_SHIFT    9
@@ -143,6 +166,11 @@ void mxc_iomux_set_gpr(enum iomux_gp_func, bool);
        (((iomux_pin & IOMUX_GPIONUM_MASK) >> IOMUX_GPIONUM_SHIFT) + \
        MXC_GPIO_IRQ_START)
 
+/*
+ * The number of gpio devices among the pads
+ */
+#define GPIO_PORT_MAX 3
+
 /*
  * This enumeration is constructed based on the Section
  * "sw_pad_ctl & sw_mux_ctl details" of the MX31 IC Spec. Each enumerated
@@ -480,6 +508,9 @@ enum iomux_pins {
        MX31_PIN_CAPTURE        = IOMUX_PIN( 7,   327),
 };
 
+#define PIN_MAX 327
+#define NB_PORTS 12 /* NB_PINS/32, we chose 32 pins per "PORT" */
+
 /*
  * Convenience values for use with mxc_iomux_mode()
  *
@@ -507,7 +538,9 @@ enum iomux_pins {
 #define MX31_PIN_CSPI1_SS1__SS1                IOMUX_MODE(MX31_PIN_CSPI1_SS1, IOMUX_CONFIG_FUNC)
 #define MX31_PIN_CSPI1_SS2__SS2                IOMUX_MODE(MX31_PIN_CSPI1_SS2, IOMUX_CONFIG_FUNC)
 #define MX31_PIN_CSPI2_MOSI__MOSI      IOMUX_MODE(MX31_PIN_CSPI2_MOSI, IOMUX_CONFIG_FUNC)
+#define MX31_PIN_CSPI2_MOSI__SCL       IOMUX_MODE(MX31_PIN_CSPI2_MOSI, IOMUX_CONFIG_ALT1)
 #define MX31_PIN_CSPI2_MISO__MISO      IOMUX_MODE(MX31_PIN_CSPI2_MISO, IOMUX_CONFIG_FUNC)
+#define MX31_PIN_CSPI2_MISO__SDA       IOMUX_MODE(MX31_PIN_CSPI2_MISO, IOMUX_CONFIG_ALT1)
 #define MX31_PIN_CSPI2_SCLK__SCLK      IOMUX_MODE(MX31_PIN_CSPI2_SCLK, IOMUX_CONFIG_FUNC)
 #define MX31_PIN_CSPI2_SPI_RDY__SPI_RDY        IOMUX_MODE(MX31_PIN_CSPI2_SPI_RDY, IOMUX_CONFIG_FUNC)
 #define MX31_PIN_CSPI2_SS0__SS0                IOMUX_MODE(MX31_PIN_CSPI2_SS0, IOMUX_CONFIG_FUNC)
@@ -525,6 +558,33 @@ enum iomux_pins {
 #define MX31_PIN_SD1_DATA0__SD1_DATA0  IOMUX_MODE(MX31_PIN_SD1_DATA0, IOMUX_CONFIG_FUNC)
 #define MX31_PIN_SD1_CLK__SD1_CLK      IOMUX_MODE(MX31_PIN_SD1_CLK, IOMUX_CONFIG_FUNC)
 #define MX31_PIN_SD1_CMD__SD1_CMD      IOMUX_MODE(MX31_PIN_SD1_CMD, IOMUX_CONFIG_FUNC)
+#define MX31_PIN_LD0__LD0              IOMUX_MODE(MX31_PIN_LD0, IOMUX_CONFIG_FUNC)
+#define MX31_PIN_LD1__LD1              IOMUX_MODE(MX31_PIN_LD1, IOMUX_CONFIG_FUNC)
+#define MX31_PIN_LD2__LD2              IOMUX_MODE(MX31_PIN_LD2, IOMUX_CONFIG_FUNC)
+#define MX31_PIN_LD3__LD3              IOMUX_MODE(MX31_PIN_LD3, IOMUX_CONFIG_FUNC)
+#define MX31_PIN_LD4__LD4              IOMUX_MODE(MX31_PIN_LD4, IOMUX_CONFIG_FUNC)
+#define MX31_PIN_LD5__LD5              IOMUX_MODE(MX31_PIN_LD5, IOMUX_CONFIG_FUNC)
+#define MX31_PIN_LD6__LD6              IOMUX_MODE(MX31_PIN_LD6, IOMUX_CONFIG_FUNC)
+#define MX31_PIN_LD7__LD7              IOMUX_MODE(MX31_PIN_LD7, IOMUX_CONFIG_FUNC)
+#define MX31_PIN_LD8__LD8              IOMUX_MODE(MX31_PIN_LD8, IOMUX_CONFIG_FUNC)
+#define MX31_PIN_LD9__LD9              IOMUX_MODE(MX31_PIN_LD9, IOMUX_CONFIG_FUNC)
+#define MX31_PIN_LD10__LD10            IOMUX_MODE(MX31_PIN_LD10, IOMUX_CONFIG_FUNC)
+#define MX31_PIN_LD11__LD11            IOMUX_MODE(MX31_PIN_LD11, IOMUX_CONFIG_FUNC)
+#define MX31_PIN_LD12__LD12            IOMUX_MODE(MX31_PIN_LD12, IOMUX_CONFIG_FUNC)
+#define MX31_PIN_LD13__LD13            IOMUX_MODE(MX31_PIN_LD13, IOMUX_CONFIG_FUNC)
+#define MX31_PIN_LD14__LD14            IOMUX_MODE(MX31_PIN_LD14, IOMUX_CONFIG_FUNC)
+#define MX31_PIN_LD15__LD15            IOMUX_MODE(MX31_PIN_LD15, IOMUX_CONFIG_FUNC)
+#define MX31_PIN_LD16__LD16            IOMUX_MODE(MX31_PIN_LD16, IOMUX_CONFIG_FUNC)
+#define MX31_PIN_LD17__LD17            IOMUX_MODE(MX31_PIN_LD17, IOMUX_CONFIG_FUNC)
+#define MX31_PIN_VSYNC3__VSYNC3                IOMUX_MODE(MX31_PIN_VSYNC3, IOMUX_CONFIG_FUNC)
+#define MX31_PIN_HSYNC__HSYNC          IOMUX_MODE(MX31_PIN_HSYNC, IOMUX_CONFIG_FUNC)
+#define MX31_PIN_FPSHIFT__FPSHIFT      IOMUX_MODE(MX31_PIN_FPSHIFT, IOMUX_CONFIG_FUNC)
+#define MX31_PIN_DRDY0__DRDY0          IOMUX_MODE(MX31_PIN_DRDY0, IOMUX_CONFIG_FUNC)
+#define MX31_PIN_D3_REV__D3_REV                IOMUX_MODE(MX31_PIN_D3_REV, IOMUX_CONFIG_FUNC)
+#define MX31_PIN_CONTRAST__CONTRAST    IOMUX_MODE(MX31_PIN_CONTRAST, IOMUX_CONFIG_FUNC)
+#define MX31_PIN_D3_SPL__D3_SPL                IOMUX_MODE(MX31_PIN_D3_SPL, IOMUX_CONFIG_FUNC)
+#define MX31_PIN_D3_CLS__D3_CLS                IOMUX_MODE(MX31_PIN_D3_CLS, IOMUX_CONFIG_FUNC)
+#define MX31_PIN_LCS0__GPI03_23                IOMUX_MODE(MX31_PIN_LCS0, IOMUX_CONFIG_GPIO)
 
 /*XXX: The SS0, SS1, SS2, SS3 lines of spi3 are multiplexed by cspi2_ss0, cspi2_ss1, cspi1_ss0
  * cspi1_ss1*/
diff --git a/arch/arm/plat-mxc/include/mach/iomux.h b/arch/arm/plat-mxc/include/mach/iomux.h
new file mode 100644 (file)
index 0000000..171f8ad
--- /dev/null
@@ -0,0 +1,127 @@
+/*
+* Copyright (C) 2008 by Sascha Hauer <kernel@pengutronix.de>
+* Copyright (C) 2009 by Holger Schurig <hs4233@mail.mn-solutions.de>
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+* MA 02110-1301, USA.
+*/
+
+#ifndef _MXC_IOMUX_H
+#define _MXC_IOMUX_H
+
+/*
+*  GPIO Module and I/O Multiplexer
+*  x = 0..3 for reg_A, reg_B, reg_C, reg_D
+*/
+#define VA_GPIO_BASE   IO_ADDRESS(GPIO_BASE_ADDR)
+#define MXC_DDIR(x)    (0x00 + ((x) << 8))
+#define MXC_OCR1(x)    (0x04 + ((x) << 8))
+#define MXC_OCR2(x)    (0x08 + ((x) << 8))
+#define MXC_ICONFA1(x) (0x0c + ((x) << 8))
+#define MXC_ICONFA2(x) (0x10 + ((x) << 8))
+#define MXC_ICONFB1(x) (0x14 + ((x) << 8))
+#define MXC_ICONFB2(x) (0x18 + ((x) << 8))
+#define MXC_DR(x)      (0x1c + ((x) << 8))
+#define MXC_GIUS(x)    (0x20 + ((x) << 8))
+#define MXC_SSR(x)     (0x24 + ((x) << 8))
+#define MXC_ICR1(x)    (0x28 + ((x) << 8))
+#define MXC_ICR2(x)    (0x2c + ((x) << 8))
+#define MXC_IMR(x)     (0x30 + ((x) << 8))
+#define MXC_ISR(x)     (0x34 + ((x) << 8))
+#define MXC_GPR(x)     (0x38 + ((x) << 8))
+#define MXC_SWR(x)     (0x3c + ((x) << 8))
+#define MXC_PUEN(x)    (0x40 + ((x) << 8))
+
+#ifdef CONFIG_ARCH_MX1
+# define GPIO_PORT_MAX  3
+#endif
+#ifdef CONFIG_ARCH_MX2
+# define GPIO_PORT_MAX  5
+#endif
+
+#ifndef GPIO_PORT_MAX
+# error "GPIO config port count unknown!"
+#endif
+
+#define GPIO_PIN_MASK 0x1f
+
+#define GPIO_PORT_SHIFT 5
+#define GPIO_PORT_MASK (0x7 << GPIO_PORT_SHIFT)
+
+#define GPIO_PORTA (0 << GPIO_PORT_SHIFT)
+#define GPIO_PORTB (1 << GPIO_PORT_SHIFT)
+#define GPIO_PORTC (2 << GPIO_PORT_SHIFT)
+#define GPIO_PORTD (3 << GPIO_PORT_SHIFT)
+#define GPIO_PORTE (4 << GPIO_PORT_SHIFT)
+#define GPIO_PORTF (5 << GPIO_PORT_SHIFT)
+
+#define GPIO_OUT   (1 << 8)
+#define GPIO_IN    (0 << 8)
+#define GPIO_PUEN  (1 << 9)
+
+#define GPIO_PF    (1 << 10)
+#define GPIO_AF    (1 << 11)
+
+#define GPIO_OCR_SHIFT 12
+#define GPIO_OCR_MASK (3 << GPIO_OCR_SHIFT)
+#define GPIO_AIN   (0 << GPIO_OCR_SHIFT)
+#define GPIO_BIN   (1 << GPIO_OCR_SHIFT)
+#define GPIO_CIN   (2 << GPIO_OCR_SHIFT)
+#define GPIO_GPIO  (3 << GPIO_OCR_SHIFT)
+
+#define GPIO_AOUT_SHIFT 14
+#define GPIO_AOUT_MASK (3 << GPIO_AOUT_SHIFT)
+#define GPIO_AOUT     (0 << GPIO_AOUT_SHIFT)
+#define GPIO_AOUT_ISR (1 << GPIO_AOUT_SHIFT)
+#define GPIO_AOUT_0   (2 << GPIO_AOUT_SHIFT)
+#define GPIO_AOUT_1   (3 << GPIO_AOUT_SHIFT)
+
+#define GPIO_BOUT_SHIFT 16
+#define GPIO_BOUT_MASK (3 << GPIO_BOUT_SHIFT)
+#define GPIO_BOUT      (0 << GPIO_BOUT_SHIFT)
+#define GPIO_BOUT_ISR  (1 << GPIO_BOUT_SHIFT)
+#define GPIO_BOUT_0    (2 << GPIO_BOUT_SHIFT)
+#define GPIO_BOUT_1    (3 << GPIO_BOUT_SHIFT)
+
+
+#ifdef CONFIG_ARCH_MX1
+#include <mach/iomux-mx1.h>
+#endif
+#ifdef CONFIG_ARCH_MX2
+#include <mach/iomux-mx2x.h>
+#ifdef CONFIG_MACH_MX21
+#include <mach/iomux-mx21.h>
+#endif
+#ifdef CONFIG_MACH_MX27
+#include <mach/iomux-mx27.h>
+#endif
+#endif
+
+
+/* decode irq number to use with IMR(x), ISR(x) and friends */
+#define IRQ_TO_REG(irq) ((irq - MXC_INTERNAL_IRQS) >> 5)
+
+#define IRQ_GPIOA(x)  (MXC_GPIO_IRQ_START + x)
+#define IRQ_GPIOB(x)  (IRQ_GPIOA(32) + x)
+#define IRQ_GPIOC(x)  (IRQ_GPIOB(32) + x)
+#define IRQ_GPIOD(x)  (IRQ_GPIOC(32) + x)
+#define IRQ_GPIOE(x)  (IRQ_GPIOD(32) + x)
+
+
+extern void mxc_gpio_mode(int gpio_mode);
+extern int mxc_gpio_setup_multiple_pins(const int *pin_list, unsigned count,
+       const char *label);
+extern void mxc_gpio_release_multiple_pins(const int *pin_list, int count);
+
+#endif
index 0b808399097fe25459334f037c185e8b62e86d5f..e0783e619580a3e39e0dcb9ed87e21b2cd5365e8 100644 (file)
 #if defined CONFIG_ARCH_MX1
 #define PHYS_OFFSET            UL(0x08000000)
 #elif defined CONFIG_ARCH_MX2
+#ifdef CONFIG_MACH_MX21
+#define PHYS_OFFSET            UL(0xC0000000)
+#endif
+#ifdef CONFIG_MACH_MX27
 #define PHYS_OFFSET            UL(0xA0000000)
+#endif
 #elif defined CONFIG_ARCH_MX3
 #define PHYS_OFFSET            UL(0x80000000)
 #endif
diff --git a/arch/arm/plat-mxc/include/mach/mx21.h b/arch/arm/plat-mxc/include/mach/mx21.h
new file mode 100644 (file)
index 0000000..e8c4cf5
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright 2008 Juergen Beisert, kernel@pengutronix.de
+ * Copyright 2009 Holger Schurig, hs4233@mail.mn-solutions.de
+ *
+ * This contains i.MX21-specific hardware definitions. For those
+ * hardware pieces that are common between i.MX21 and i.MX27, have a
+ * look at mx2x.h.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ */
+
+#ifndef __ASM_ARCH_MXC_MX21_H__
+#define __ASM_ARCH_MXC_MX21_H__
+
+#ifndef __ASM_ARCH_MXC_HARDWARE_H__
+#error "Do not include directly."
+#endif
+
+
+/* Memory regions and CS */
+#define SDRAM_BASE_ADDR         0xC0000000
+#define CSD1_BASE_ADDR          0xC4000000
+
+#define CS0_BASE_ADDR           0xC8000000
+#define CS1_BASE_ADDR           0xCC000000
+#define CS2_BASE_ADDR           0xD0000000
+#define CS3_BASE_ADDR           0xD1000000
+#define CS4_BASE_ADDR           0xD2000000
+#define CS5_BASE_ADDR           0xDD000000
+#define PCMCIA_MEM_BASE_ADDR    0xD4000000
+
+/* NAND, SDRAM, WEIM etc controllers */
+#define X_MEMC_BASE_ADDR        0xDF000000
+#define X_MEMC_BASE_ADDR_VIRT   0xF4200000
+#define X_MEMC_SIZE             SZ_256K
+
+#define SDRAMC_BASE_ADDR        (X_MEMC_BASE_ADDR + 0x0000)
+#define EIM_BASE_ADDR           (X_MEMC_BASE_ADDR + 0x1000)
+#define PCMCIA_CTL_BASE_ADDR    (X_MEMC_BASE_ADDR + 0x2000)
+#define NFC_BASE_ADDR           (X_MEMC_BASE_ADDR + 0x3000)
+
+#define IRAM_BASE_ADDR          0xFFFFE800     /* internal ram */
+
+/* this CPU supports up to 192 GPIOs (don't forget the baseboard!) */
+#define ARCH_NR_GPIOS          (6*32 + 16)
+
+/* fixed interrupt numbers */
+#define MXC_INT_USBCTRL         58
+#define MXC_INT_USBCTRL         58
+#define MXC_INT_USBMNP          57
+#define MXC_INT_USBFUNC         56
+#define MXC_INT_USBHOST         55
+#define MXC_INT_USBDMA          54
+#define MXC_INT_USBWKUP         53
+#define MXC_INT_EMMADEC         50
+#define MXC_INT_EMMAENC         49
+#define MXC_INT_BMI             30
+#define MXC_INT_FIRI            9
+
+/* fixed DMA request numbers */
+#define DMA_REQ_BMI_RX          29
+#define DMA_REQ_BMI_TX          28
+#define DMA_REQ_FIRI_RX         4
+
+#endif /* __ASM_ARCH_MXC_MX21_H__ */
index 0313be72055211bed96a7578225b75faa9212309..6e93f2c0b7bb9b9c22f6de428a6ad896947f5586 100644 (file)
@@ -2,6 +2,10 @@
  * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
  * Copyright 2008 Juergen Beisert, kernel@pengutronix.de
  *
+ * This contains i.MX27-specific hardware definitions. For those
+ * hardware pieces that are common between i.MX21 and i.MX27, have a
+ * look at mx2x.h.
+ *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
  * as published by the Free Software Foundation; either version 2
 /* IRAM */
 #define IRAM_BASE_ADDR          0xFFFF4C00     /* internal ram */
 
-/* Register offests */
-#define AIPI_BASE_ADDR          0x10000000
-#define AIPI_BASE_ADDR_VIRT     0xF4000000
-#define AIPI_SIZE               SZ_1M
-
-#define DMA_BASE_ADDR           (AIPI_BASE_ADDR + 0x01000)
-#define WDOG_BASE_ADDR          (AIPI_BASE_ADDR + 0x02000)
-#define GPT1_BASE_ADDR          (AIPI_BASE_ADDR + 0x03000)
-#define GPT2_BASE_ADDR          (AIPI_BASE_ADDR + 0x04000)
-#define GPT3_BASE_ADDR          (AIPI_BASE_ADDR + 0x05000)
-#define PWM_BASE_ADDR           (AIPI_BASE_ADDR + 0x06000)
-#define RTC_BASE_ADDR           (AIPI_BASE_ADDR + 0x07000)
-#define KPP_BASE_ADDR           (AIPI_BASE_ADDR + 0x08000)
-#define OWIRE_BASE_ADDR         (AIPI_BASE_ADDR + 0x09000)
-#define UART1_BASE_ADDR         (AIPI_BASE_ADDR + 0x0A000)
-#define UART2_BASE_ADDR         (AIPI_BASE_ADDR + 0x0B000)
-#define UART3_BASE_ADDR         (AIPI_BASE_ADDR + 0x0C000)
-#define UART4_BASE_ADDR         (AIPI_BASE_ADDR + 0x0D000)
-#define CSPI1_BASE_ADDR         (AIPI_BASE_ADDR + 0x0E000)
-#define CSPI2_BASE_ADDR         (AIPI_BASE_ADDR + 0x0F000)
-#define SSI1_BASE_ADDR          (AIPI_BASE_ADDR + 0x10000)
-#define SSI2_BASE_ADDR          (AIPI_BASE_ADDR + 0x11000)
-#define I2C_BASE_ADDR           (AIPI_BASE_ADDR + 0x12000)
-#define SDHC1_BASE_ADDR         (AIPI_BASE_ADDR + 0x13000)
-#define SDHC2_BASE_ADDR         (AIPI_BASE_ADDR + 0x14000)
-#define GPIO_BASE_ADDR          (AIPI_BASE_ADDR + 0x15000)
-#define AUDMUX_BASE_ADDR        (AIPI_BASE_ADDR + 0x16000)
-
-#define CSPI3_BASE_ADDR         (AIPI_BASE_ADDR + 0x17000)
 #define MSHC_BASE_ADDR          (AIPI_BASE_ADDR + 0x18000)
 #define GPT5_BASE_ADDR          (AIPI_BASE_ADDR + 0x19000)
 #define GPT4_BASE_ADDR          (AIPI_BASE_ADDR + 0x1A000)
 #define I2C2_BASE_ADDR          (AIPI_BASE_ADDR + 0x1D000)
 #define SDHC3_BASE_ADDR         (AIPI_BASE_ADDR + 0x1E000)
 #define GPT6_BASE_ADDR          (AIPI_BASE_ADDR + 0x1F000)
-
-#define LCDC_BASE_ADDR          (AIPI_BASE_ADDR + 0x21000)
-#define SLCDC_BASE_ADDR         (AIPI_BASE_ADDR + 0x22000)
 #define VPU_BASE_ADDR           (AIPI_BASE_ADDR + 0x23000)
-#define USBOTG_BASE_ADDR        (AIPI_BASE_ADDR + 0x24000)
-/* for mx27*/
 #define OTG_BASE_ADDR           USBOTG_BASE_ADDR
 #define SAHARA_BASE_ADDR        (AIPI_BASE_ADDR + 0x25000)
-#define EMMA_PP_BASE_ADDR       (AIPI_BASE_ADDR + 0x26000)
-#define EMMA_PRP_BASE_ADDR      (AIPI_BASE_ADDR + 0x26400)
-#define CCM_BASE_ADDR           (AIPI_BASE_ADDR + 0x27000)
-#define SYSCTRL_BASE_ADDR       (AIPI_BASE_ADDR + 0x27800)
 #define IIM_BASE_ADDR           (AIPI_BASE_ADDR + 0x28000)
-
 #define RTIC_BASE_ADDR          (AIPI_BASE_ADDR + 0x2A000)
 #define FEC_BASE_ADDR           (AIPI_BASE_ADDR + 0x2B000)
 #define SCC_BASE_ADDR           (AIPI_BASE_ADDR + 0x2C000)
 #define ETB_BASE_ADDR           (AIPI_BASE_ADDR + 0x3B000)
 #define ETB_RAM_BASE_ADDR       (AIPI_BASE_ADDR + 0x3C000)
 
-#define JAM_BASE_ADDR           (AIPI_BASE_ADDR + 0x3E000)
-#define MAX_BASE_ADDR           (AIPI_BASE_ADDR + 0x3F000)
-
-/* ROMP and AVIC */
+/* ROM patch */
 #define ROMP_BASE_ADDR          0x10041000
 
-#define AVIC_BASE_ADDR          0x10040000
-
-#define SAHB1_BASE_ADDR         0x80000000
-#define SAHB1_BASE_ADDR_VIRT    0xF4100000
-#define SAHB1_SIZE              SZ_1M
-
-#define CSI_BASE_ADDR           (SAHB1_BASE_ADDR + 0x0000)
 #define ATA_BASE_ADDR           (SAHB1_BASE_ADDR + 0x1000)
 
-/* NAND, SDRAM, WEIM, M3IF, EMI controllers */
-#define X_MEMC_BASE_ADDR        0xD8000000
-#define X_MEMC_BASE_ADDR_VIRT   0xF4200000
-#define X_MEMC_SIZE             SZ_1M
-
-#define NFC_BASE_ADDR           (X_MEMC_BASE_ADDR)
-#define SDRAMC_BASE_ADDR        (X_MEMC_BASE_ADDR + 0x1000)
-#define WEIM_BASE_ADDR          (X_MEMC_BASE_ADDR + 0x2000)
-#define M3IF_BASE_ADDR          (X_MEMC_BASE_ADDR + 0x3000)
-#define PCMCIA_CTL_BASE_ADDR    (X_MEMC_BASE_ADDR + 0x4000)
-
 /* Memory regions and CS */
-#define SDRAM_BASE_ADDR                0xA0000000
-#define CSD1_BASE_ADDR         0xB0000000
+#define SDRAM_BASE_ADDR         0xA0000000
+#define CSD1_BASE_ADDR          0xB0000000
 
 #define CS0_BASE_ADDR           0xC0000000
 #define CS1_BASE_ADDR           0xC8000000
 #define CS5_BASE_ADDR           0xD6000000
 #define PCMCIA_MEM_BASE_ADDR    0xDC000000
 
-/*
- * This macro defines the physical to virtual address mapping for all the
- * peripheral modules. It is used by passing in the physical address as x
- * and returning the virtual address. If the physical address is not mapped,
- * it returns 0xDEADBEEF
- */
-#define IO_ADDRESS(x)   \
-       (void __iomem *) \
-       (((x >= AIPI_BASE_ADDR) && (x < (AIPI_BASE_ADDR + AIPI_SIZE))) ? \
-               AIPI_IO_ADDRESS(x) : \
-       ((x >= SAHB1_BASE_ADDR) && (x < (SAHB1_BASE_ADDR + SAHB1_SIZE))) ? \
-               SAHB1_IO_ADDRESS(x) : \
-       ((x >= X_MEMC_BASE_ADDR) && (x < (X_MEMC_BASE_ADDR + X_MEMC_SIZE))) ? \
-               X_MEMC_IO_ADDRESS(x) : 0xDEADBEEF)
-
-/* define the address mapping macros: in physical address order */
-#define AIPI_IO_ADDRESS(x)  \
-       (((x) - AIPI_BASE_ADDR) + AIPI_BASE_ADDR_VIRT)
-
-#define AVIC_IO_ADDRESS(x)     AIPI_IO_ADDRESS(x)
-
-#define SAHB1_IO_ADDRESS(x)  \
-       (((x) - SAHB1_BASE_ADDR) + SAHB1_BASE_ADDR_VIRT)
-
-#define CS4_IO_ADDRESS(x)  \
-       (((x) - CS4_BASE_ADDR) + CS4_BASE_ADDR_VIRT)
-
-#define X_MEMC_IO_ADDRESS(x)  \
-       (((x) - X_MEMC_BASE_ADDR) + X_MEMC_BASE_ADDR_VIRT)
+/* NAND, SDRAM, WEIM, M3IF, EMI controllers */
+#define X_MEMC_BASE_ADDR        0xD8000000
+#define X_MEMC_BASE_ADDR_VIRT   0xF4200000
+#define X_MEMC_SIZE             SZ_1M
 
-#define PCMCIA_IO_ADDRESS(x) \
-       (((x) - X_MEMC_BASE_ADDR) + X_MEMC_BASE_ADDR_VIRT)
+#define NFC_BASE_ADDR           (X_MEMC_BASE_ADDR)
+#define SDRAMC_BASE_ADDR        (X_MEMC_BASE_ADDR + 0x1000)
+#define WEIM_BASE_ADDR          (X_MEMC_BASE_ADDR + 0x2000)
+#define M3IF_BASE_ADDR          (X_MEMC_BASE_ADDR + 0x3000)
+#define PCMCIA_CTL_BASE_ADDR    (X_MEMC_BASE_ADDR + 0x4000)
 
-/* fixed interrput numbers */
+/* fixed interrupt numbers */
 #define MXC_INT_CCM            63
 #define MXC_INT_IIM            62
-#define MXC_INT_LCDC           61
-#define MXC_INT_SLCDC          60
 #define MXC_INT_SAHARA         59
 #define MXC_INT_SCC_SCM                58
 #define MXC_INT_SCC_SMN                57
 #define MXC_INT_USB2           55
 #define MXC_INT_USB1           54
 #define MXC_INT_VPU            53
-#define MXC_INT_EMMAPP         52
-#define MXC_INT_EMMAPRP                51
 #define MXC_INT_FEC            50
 #define MXC_INT_UART5          49
 #define MXC_INT_UART6          48
-#define MXC_INT_DMACH15                47
-#define MXC_INT_DMACH14                46
-#define MXC_INT_DMACH13                45
-#define MXC_INT_DMACH12                44
-#define MXC_INT_DMACH11                43
-#define MXC_INT_DMACH10                42
-#define MXC_INT_DMACH9         41
-#define MXC_INT_DMACH8         40
-#define MXC_INT_DMACH7         39
-#define MXC_INT_DMACH6         38
-#define MXC_INT_DMACH5         37
-#define MXC_INT_DMACH4         36
-#define MXC_INT_DMACH3         35
-#define MXC_INT_DMACH2         34
-#define MXC_INT_DMACH1         33
-#define MXC_INT_DMACH0         32
-#define MXC_INT_CSI            31
 #define MXC_INT_ATA            30
-#define MXC_INT_NANDFC         29
-#define MXC_INT_PCMCIA         28
-#define MXC_INT_WDOG           27
-#define MXC_INT_GPT1           26
-#define MXC_INT_GPT2           25
-#define MXC_INT_GPT3           24
-#define MXC_INT_GPT            INT_GPT1
-#define MXC_INT_PWM            23
-#define MXC_INT_RTC            22
-#define MXC_INT_KPP            21
-#define MXC_INT_UART1          20
-#define MXC_INT_UART2          19
-#define MXC_INT_UART3          18
-#define MXC_INT_UART4          17
-#define MXC_INT_CSPI1          16
-#define MXC_INT_CSPI2          15
-#define MXC_INT_SSI1           14
-#define MXC_INT_SSI2           13
-#define MXC_INT_I2C            12
-#define MXC_INT_SDHC1          11
-#define MXC_INT_SDHC2          10
 #define MXC_INT_SDHC3          9
-#define MXC_INT_GPIO           8
 #define MXC_INT_SDHC           7
-#define MXC_INT_CSPI3          6
 #define MXC_INT_RTIC           5
 #define MXC_INT_GPT4           4
 #define MXC_INT_GPT5           3
 #define DMA_REQ_UART6_TX        34
 #define DMA_REQ_UART5_RX        33
 #define DMA_REQ_UART5_TX        32
-#define DMA_REQ_CSI_RX          31
-#define DMA_REQ_CSI_STAT        30
 #define DMA_REQ_ATA_RCV         29
 #define DMA_REQ_ATA_TX          28
-#define DMA_REQ_UART1_TX        27
-#define DMA_REQ_UART1_RX        26
-#define DMA_REQ_UART2_TX        25
-#define DMA_REQ_UART2_RX        24
-#define DMA_REQ_UART3_TX        23
-#define DMA_REQ_UART3_RX        22
-#define DMA_REQ_UART4_TX        21
-#define DMA_REQ_UART4_RX        20
-#define DMA_REQ_CSPI1_TX        19
-#define DMA_REQ_CSPI1_RX        18
-#define DMA_REQ_CSPI2_TX        17
-#define DMA_REQ_CSPI2_RX        16
-#define DMA_REQ_SSI1_TX1        15
-#define DMA_REQ_SSI1_RX1        14
-#define DMA_REQ_SSI1_TX0        13
-#define DMA_REQ_SSI1_RX0        12
-#define DMA_REQ_SSI2_TX1        11
-#define DMA_REQ_SSI2_RX1        10
-#define DMA_REQ_SSI2_TX0        9
-#define DMA_REQ_SSI2_RX0        8
-#define DMA_REQ_SDHC1           7
-#define DMA_REQ_SDHC2           6
 #define DMA_REQ_MSHC            4
-#define DMA_REQ_EXT             3
-#define DMA_REQ_CSPI3_TX        2
-#define DMA_REQ_CSPI3_RX        1
 
 /* silicon revisions specific to i.MX27 */
 #define CHIP_REV_1_0           0x00
 extern int mx27_revision(void);
 #endif
 
-/* gpio and gpio based interrupt handling */
-#define GPIO_DR                        0x1C
-#define GPIO_GDIR              0x00
-#define GPIO_PSR               0x24
-#define GPIO_ICR1              0x28
-#define GPIO_ICR2              0x2C
-#define GPIO_IMR               0x30
-#define GPIO_ISR               0x34
-#define GPIO_INT_LOW_LEV       0x3
-#define GPIO_INT_HIGH_LEV      0x2
-#define GPIO_INT_RISE_EDGE     0x0
-#define GPIO_INT_FALL_EDGE     0x1
-#define GPIO_INT_NONE          0x4
-
 /* Mandatory defines used globally */
 
-/* this is an i.MX27 CPU */
-#define cpu_is_mx27()          (1)
-
 /* this CPU supports up to 192 GPIOs (don't forget the baseboard!) */
 #define ARCH_NR_GPIOS          (192 + 16)
 
diff --git a/arch/arm/plat-mxc/include/mach/mx2x.h b/arch/arm/plat-mxc/include/mach/mx2x.h
new file mode 100644 (file)
index 0000000..fc40d3a
--- /dev/null
@@ -0,0 +1,200 @@
+/*
+ * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright 2008 Juergen Beisert, kernel@pengutronix.de
+ *
+ * This contains hardware definitions that are common between i.MX21 and
+ * i.MX27.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ */
+
+#ifndef __ASM_ARCH_MXC_MX2x_H__
+#define __ASM_ARCH_MXC_MX2x_H__
+
+#ifndef __ASM_ARCH_MXC_HARDWARE_H__
+#error "Do not include directly."
+#endif
+
+/* The following addresses are common between i.MX21 and i.MX27 */
+
+/* Register offests */
+#define AIPI_BASE_ADDR          0x10000000
+#define AIPI_BASE_ADDR_VIRT     0xF4000000
+#define AIPI_SIZE               SZ_1M
+
+#define DMA_BASE_ADDR           (AIPI_BASE_ADDR + 0x01000)
+#define WDOG_BASE_ADDR          (AIPI_BASE_ADDR + 0x02000)
+#define GPT1_BASE_ADDR          (AIPI_BASE_ADDR + 0x03000)
+#define GPT2_BASE_ADDR          (AIPI_BASE_ADDR + 0x04000)
+#define GPT3_BASE_ADDR          (AIPI_BASE_ADDR + 0x05000)
+#define PWM_BASE_ADDR           (AIPI_BASE_ADDR + 0x06000)
+#define RTC_BASE_ADDR           (AIPI_BASE_ADDR + 0x07000)
+#define KPP_BASE_ADDR           (AIPI_BASE_ADDR + 0x08000)
+#define OWIRE_BASE_ADDR         (AIPI_BASE_ADDR + 0x09000)
+#define UART1_BASE_ADDR         (AIPI_BASE_ADDR + 0x0A000)
+#define UART2_BASE_ADDR         (AIPI_BASE_ADDR + 0x0B000)
+#define UART3_BASE_ADDR         (AIPI_BASE_ADDR + 0x0C000)
+#define UART4_BASE_ADDR         (AIPI_BASE_ADDR + 0x0D000)
+#define CSPI1_BASE_ADDR         (AIPI_BASE_ADDR + 0x0E000)
+#define CSPI2_BASE_ADDR         (AIPI_BASE_ADDR + 0x0F000)
+#define SSI1_BASE_ADDR          (AIPI_BASE_ADDR + 0x10000)
+#define SSI2_BASE_ADDR          (AIPI_BASE_ADDR + 0x11000)
+#define I2C_BASE_ADDR           (AIPI_BASE_ADDR + 0x12000)
+#define SDHC1_BASE_ADDR         (AIPI_BASE_ADDR + 0x13000)
+#define SDHC2_BASE_ADDR         (AIPI_BASE_ADDR + 0x14000)
+#define GPIO_BASE_ADDR          (AIPI_BASE_ADDR + 0x15000)
+#define AUDMUX_BASE_ADDR        (AIPI_BASE_ADDR + 0x16000)
+#define CSPI3_BASE_ADDR         (AIPI_BASE_ADDR + 0x17000)
+#define LCDC_BASE_ADDR          (AIPI_BASE_ADDR + 0x21000)
+#define SLCDC_BASE_ADDR         (AIPI_BASE_ADDR + 0x22000)
+#define USBOTG_BASE_ADDR        (AIPI_BASE_ADDR + 0x24000)
+#define EMMA_PP_BASE_ADDR       (AIPI_BASE_ADDR + 0x26000)
+#define EMMA_PRP_BASE_ADDR      (AIPI_BASE_ADDR + 0x26400)
+#define CCM_BASE_ADDR           (AIPI_BASE_ADDR + 0x27000)
+#define SYSCTRL_BASE_ADDR       (AIPI_BASE_ADDR + 0x27800)
+#define JAM_BASE_ADDR           (AIPI_BASE_ADDR + 0x3E000)
+#define MAX_BASE_ADDR           (AIPI_BASE_ADDR + 0x3F000)
+
+#define AVIC_BASE_ADDR          0x10040000
+
+#define SAHB1_BASE_ADDR         0x80000000
+#define SAHB1_BASE_ADDR_VIRT    0xF4100000
+#define SAHB1_SIZE              SZ_1M
+
+#define CSI_BASE_ADDR           (SAHB1_BASE_ADDR + 0x0000)
+
+/*
+ * This macro defines the physical to virtual address mapping for all the
+ * peripheral modules. It is used by passing in the physical address as x
+ * and returning the virtual address. If the physical address is not mapped,
+ * it returns 0xDEADBEEF
+ */
+#define IO_ADDRESS(x)   \
+       (void __force __iomem *) \
+       (((x >= AIPI_BASE_ADDR) && (x < (AIPI_BASE_ADDR + AIPI_SIZE))) ? \
+               AIPI_IO_ADDRESS(x) : \
+       ((x >= SAHB1_BASE_ADDR) && (x < (SAHB1_BASE_ADDR + SAHB1_SIZE))) ? \
+               SAHB1_IO_ADDRESS(x) : \
+       ((x >= X_MEMC_BASE_ADDR) && (x < (X_MEMC_BASE_ADDR + X_MEMC_SIZE))) ? \
+               X_MEMC_IO_ADDRESS(x) : 0xDEADBEEF)
+
+/* define the address mapping macros: in physical address order */
+#define AIPI_IO_ADDRESS(x)  \
+       (((x) - AIPI_BASE_ADDR) + AIPI_BASE_ADDR_VIRT)
+
+#define AVIC_IO_ADDRESS(x)     AIPI_IO_ADDRESS(x)
+
+#define SAHB1_IO_ADDRESS(x)  \
+       (((x) - SAHB1_BASE_ADDR) + SAHB1_BASE_ADDR_VIRT)
+
+#define CS4_IO_ADDRESS(x)  \
+       (((x) - CS4_BASE_ADDR) + CS4_BASE_ADDR_VIRT)
+
+#define X_MEMC_IO_ADDRESS(x)  \
+       (((x) - X_MEMC_BASE_ADDR) + X_MEMC_BASE_ADDR_VIRT)
+
+#define PCMCIA_IO_ADDRESS(x) \
+       (((x) - X_MEMC_BASE_ADDR) + X_MEMC_BASE_ADDR_VIRT)
+
+/* fixed interrupt numbers */
+#define MXC_INT_LCDC           61
+#define MXC_INT_SLCDC          60
+#define MXC_INT_EMMAPP         52
+#define MXC_INT_EMMAPRP                51
+#define MXC_INT_DMACH15                47
+#define MXC_INT_DMACH14                46
+#define MXC_INT_DMACH13                45
+#define MXC_INT_DMACH12                44
+#define MXC_INT_DMACH11                43
+#define MXC_INT_DMACH10                42
+#define MXC_INT_DMACH9         41
+#define MXC_INT_DMACH8         40
+#define MXC_INT_DMACH7         39
+#define MXC_INT_DMACH6         38
+#define MXC_INT_DMACH5         37
+#define MXC_INT_DMACH4         36
+#define MXC_INT_DMACH3         35
+#define MXC_INT_DMACH2         34
+#define MXC_INT_DMACH1         33
+#define MXC_INT_DMACH0         32
+#define MXC_INT_CSI            31
+#define MXC_INT_NANDFC         29
+#define MXC_INT_PCMCIA         28
+#define MXC_INT_WDOG           27
+#define MXC_INT_GPT1           26
+#define MXC_INT_GPT2           25
+#define MXC_INT_GPT3           24
+#define MXC_INT_GPT            INT_GPT1
+#define MXC_INT_PWM            23
+#define MXC_INT_RTC            22
+#define MXC_INT_KPP            21
+#define MXC_INT_UART1          20
+#define MXC_INT_UART2          19
+#define MXC_INT_UART3          18
+#define MXC_INT_UART4          17
+#define MXC_INT_CSPI1          16
+#define MXC_INT_CSPI2          15
+#define MXC_INT_SSI1           14
+#define MXC_INT_SSI2           13
+#define MXC_INT_I2C            12
+#define MXC_INT_SDHC1          11
+#define MXC_INT_SDHC2          10
+#define MXC_INT_GPIO           8
+#define MXC_INT_CSPI3          6
+
+/* gpio and gpio based interrupt handling */
+#define GPIO_DR                        0x1C
+#define GPIO_GDIR              0x00
+#define GPIO_PSR               0x24
+#define GPIO_ICR1              0x28
+#define GPIO_ICR2              0x2C
+#define GPIO_IMR               0x30
+#define GPIO_ISR               0x34
+#define GPIO_INT_LOW_LEV       0x3
+#define GPIO_INT_HIGH_LEV      0x2
+#define GPIO_INT_RISE_EDGE     0x0
+#define GPIO_INT_FALL_EDGE     0x1
+#define GPIO_INT_NONE          0x4
+
+/* fixed DMA request numbers */
+#define DMA_REQ_CSI_RX          31
+#define DMA_REQ_CSI_STAT        30
+#define DMA_REQ_UART1_TX        27
+#define DMA_REQ_UART1_RX        26
+#define DMA_REQ_UART2_TX        25
+#define DMA_REQ_UART2_RX        24
+#define DMA_REQ_UART3_TX        23
+#define DMA_REQ_UART3_RX        22
+#define DMA_REQ_UART4_TX        21
+#define DMA_REQ_UART4_RX        20
+#define DMA_REQ_CSPI1_TX        19
+#define DMA_REQ_CSPI1_RX        18
+#define DMA_REQ_CSPI2_TX        17
+#define DMA_REQ_CSPI2_RX        16
+#define DMA_REQ_SSI1_TX1        15
+#define DMA_REQ_SSI1_RX1        14
+#define DMA_REQ_SSI1_TX0        13
+#define DMA_REQ_SSI1_RX0        12
+#define DMA_REQ_SSI2_TX1        11
+#define DMA_REQ_SSI2_RX1        10
+#define DMA_REQ_SSI2_TX0        9
+#define DMA_REQ_SSI2_RX0        8
+#define DMA_REQ_SDHC1           7
+#define DMA_REQ_SDHC2           6
+#define DMA_REQ_EXT             3
+#define DMA_REQ_CSPI3_TX        2
+#define DMA_REQ_CSPI3_RX        1
+
+#endif /* __ASM_ARCH_MXC_MX2x_H__ */
index de026654b00e66c3c54d18c1f8f77ed6e3dcc62d..0b06941b6139d54430e85655465e88df92933afc 100644 (file)
-/*
- * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
- */
-
-/*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#ifndef __ASM_ARCH_MXC_MX31_H__
-#define __ASM_ARCH_MXC_MX31_H__
-
-#ifndef __ASM_ARCH_MXC_HARDWARE_H__
-#error "Do not include directly."
-#endif
-
-/*
- * MX31 memory map:
- *
- * Virt                Phys            Size    What
- * ---------------------------------------------------------------------------
- * F8000000    1FFC0000        16K     IRAM
- * F9000000    30000000        256M    L2CC
- * FC000000    43F00000        1M      AIPS 1
- * FC100000    50000000        1M      SPBA
- * FC200000    53F00000        1M      AIPS 2
- * FC500000    60000000        128M    ROMPATCH
- * FC400000    68000000        128M    AVIC
- *             70000000        256M    IPU (MAX M2)
- *             80000000        256M    CSD0 SDRAM/DDR
- *             90000000        256M    CSD1 SDRAM/DDR
- *             A0000000        128M    CS0 Flash
- *             A8000000        128M    CS1 Flash
- *             B0000000        32M     CS2
- *             B2000000        32M     CS3
- * F4000000    B4000000        32M     CS4
- *             B6000000        32M     CS5
- * FC320000    B8000000        64K     NAND, SDRAM, WEIM, M3IF, EMI controllers
- *             C0000000        64M     PCMCIA/CF
- */
-
-#define CS0_BASE_ADDR          0xA0000000
-#define CS1_BASE_ADDR          0xA8000000
-#define CS2_BASE_ADDR          0xB0000000
-#define CS3_BASE_ADDR          0xB2000000
-
-#define CS4_BASE_ADDR          0xB4000000
-#define CS4_BASE_ADDR_VIRT     0xF4000000
-#define CS4_SIZE               SZ_32M
-
-#define CS5_BASE_ADDR          0xB6000000
-#define PCMCIA_MEM_BASE_ADDR   0xBC000000
-
 /*
  * IRAM
  */
-#define IRAM_BASE_ADDR         0x1FFC0000      /* internal ram */
-#define IRAM_BASE_ADDR_VIRT    0xF8000000
-#define IRAM_SIZE              SZ_16K
-
-/*
- * L2CC
- */
-#define L2CC_BASE_ADDR         0x30000000
-#define L2CC_BASE_ADDR_VIRT    0xF9000000
-#define L2CC_SIZE              SZ_1M
-
-/*
- * AIPS 1
- */
-#define AIPS1_BASE_ADDR                0x43F00000
-#define AIPS1_BASE_ADDR_VIRT   0xFC000000
-#define AIPS1_SIZE             SZ_1M
+#define MX31_IRAM_BASE_ADDR            0x1FFC0000      /* internal ram */
+#define MX31_IRAM_SIZE                 SZ_16K
 
-#define MAX_BASE_ADDR          (AIPS1_BASE_ADDR + 0x00004000)
-#define EVTMON_BASE_ADDR       (AIPS1_BASE_ADDR + 0x00008000)
-#define CLKCTL_BASE_ADDR       (AIPS1_BASE_ADDR + 0x0000C000)
-#define ETB_SLOT4_BASE_ADDR    (AIPS1_BASE_ADDR + 0x00010000)
-#define ETB_SLOT5_BASE_ADDR    (AIPS1_BASE_ADDR + 0x00014000)
-#define ECT_CTIO_BASE_ADDR     (AIPS1_BASE_ADDR + 0x00018000)
-#define I2C_BASE_ADDR          (AIPS1_BASE_ADDR + 0x00080000)
-#define I2C3_BASE_ADDR         (AIPS1_BASE_ADDR + 0x00084000)
 #define OTG_BASE_ADDR          (AIPS1_BASE_ADDR + 0x00088000)
 #define ATA_BASE_ADDR          (AIPS1_BASE_ADDR + 0x0008C000)
-#define UART1_BASE_ADDR        (AIPS1_BASE_ADDR + 0x00090000)
-#define UART2_BASE_ADDR        (AIPS1_BASE_ADDR + 0x00094000)
-#define I2C2_BASE_ADDR         (AIPS1_BASE_ADDR + 0x00098000)
-#define OWIRE_BASE_ADDR        (AIPS1_BASE_ADDR + 0x0009C000)
-#define SSI1_BASE_ADDR         (AIPS1_BASE_ADDR + 0x000A0000)
-#define CSPI1_BASE_ADDR        (AIPS1_BASE_ADDR + 0x000A4000)
-#define KPP_BASE_ADDR          (AIPS1_BASE_ADDR + 0x000A8000)
-#define IOMUXC_BASE_ADDR       (AIPS1_BASE_ADDR + 0x000AC000)
 #define UART4_BASE_ADDR        (AIPS1_BASE_ADDR + 0x000B0000)
 #define UART5_BASE_ADDR        (AIPS1_BASE_ADDR + 0x000B4000)
-#define ECT_IP1_BASE_ADDR      (AIPS1_BASE_ADDR + 0x000B8000)
-#define ECT_IP2_BASE_ADDR      (AIPS1_BASE_ADDR + 0x000BC000)
-
-/*
- * SPBA global module enabled #0
- */
-#define SPBA0_BASE_ADDR        0x50000000
-#define SPBA0_BASE_ADDR_VIRT   0xFC100000
-#define SPBA0_SIZE             SZ_1M
 
 #define MMC_SDHC1_BASE_ADDR    (SPBA0_BASE_ADDR + 0x00004000)
 #define MMC_SDHC2_BASE_ADDR    (SPBA0_BASE_ADDR + 0x00008000)
-#define UART3_BASE_ADDR        (SPBA0_BASE_ADDR + 0x0000C000)
-#define CSPI2_BASE_ADDR        (SPBA0_BASE_ADDR + 0x00010000)
-#define SSI2_BASE_ADDR         (SPBA0_BASE_ADDR + 0x00014000)
 #define SIM1_BASE_ADDR         (SPBA0_BASE_ADDR + 0x00018000)
 #define IIM_BASE_ADDR          (SPBA0_BASE_ADDR + 0x0001C000)
-#define ATA_DMA_BASE_ADDR      (SPBA0_BASE_ADDR + 0x00020000)
-#define MSHC1_BASE_ADDR                (SPBA0_BASE_ADDR + 0x00024000)
-#define MSHC2_BASE_ADDR                (SPBA0_BASE_ADDR + 0x00024000)
-#define SPBA_CTRL_BASE_ADDR    (SPBA0_BASE_ADDR + 0x0003C000)
 
-/*
- * AIPS 2
- */
-#define AIPS2_BASE_ADDR                0x53F00000
-#define AIPS2_BASE_ADDR_VIRT   0xFC200000
-#define AIPS2_SIZE             SZ_1M
-#define CCM_BASE_ADDR          (AIPS2_BASE_ADDR + 0x00080000)
 #define CSPI3_BASE_ADDR                (AIPS2_BASE_ADDR + 0x00084000)
 #define FIRI_BASE_ADDR         (AIPS2_BASE_ADDR + 0x0008C000)
-#define GPT1_BASE_ADDR         (AIPS2_BASE_ADDR + 0x00090000)
-#define EPIT1_BASE_ADDR                (AIPS2_BASE_ADDR + 0x00094000)
-#define EPIT2_BASE_ADDR                (AIPS2_BASE_ADDR + 0x00098000)
-#define GPIO3_BASE_ADDR                (AIPS2_BASE_ADDR + 0x000A4000)
-#define SCC_BASE_ADDR          (AIPS2_BASE_ADDR + 0x000AC000)
 #define SCM_BASE_ADDR          (AIPS2_BASE_ADDR + 0x000AE000)
 #define SMN_BASE_ADDR          (AIPS2_BASE_ADDR + 0x000AF000)
-#define RNGA_BASE_ADDR         (AIPS2_BASE_ADDR + 0x000B0000)
-#define IPU_CTRL_BASE_ADDR     (AIPS2_BASE_ADDR + 0x000C0000)
-#define AUDMUX_BASE_ADDR       (AIPS2_BASE_ADDR + 0x000C4000)
 #define MPEG4_ENC_BASE_ADDR    (AIPS2_BASE_ADDR + 0x000C8000)
-#define GPIO1_BASE_ADDR                (AIPS2_BASE_ADDR + 0x000CC000)
-#define GPIO2_BASE_ADDR                (AIPS2_BASE_ADDR + 0x000D0000)
-#define SDMA_BASE_ADDR         (AIPS2_BASE_ADDR + 0x000D4000)
-#define RTC_BASE_ADDR          (AIPS2_BASE_ADDR + 0x000D8000)
-#define WDOG_BASE_ADDR         (AIPS2_BASE_ADDR + 0x000DC000)
-#define PWM_BASE_ADDR          (AIPS2_BASE_ADDR + 0x000E0000)
-#define RTIC_BASE_ADDR         (AIPS2_BASE_ADDR + 0x000EC000)
-
-/*
- * ROMP and AVIC
- */
-#define ROMP_BASE_ADDR         0x60000000
-#define ROMP_BASE_ADDR_VIRT    0xFC500000
-#define ROMP_SIZE              SZ_1M
-
-#define AVIC_BASE_ADDR         0x68000000
-#define AVIC_BASE_ADDR_VIRT    0xFC400000
-#define AVIC_SIZE              SZ_1M
-
-/*
- * NAND, SDRAM, WEIM, M3IF, EMI controllers
- */
-#define X_MEMC_BASE_ADDR       0xB8000000
-#define X_MEMC_BASE_ADDR_VIRT  0xFC320000
-#define X_MEMC_SIZE            SZ_64K
 
-#define NFC_BASE_ADDR          (X_MEMC_BASE_ADDR + 0x0000)
-#define ESDCTL_BASE_ADDR       (X_MEMC_BASE_ADDR + 0x1000)
-#define WEIM_BASE_ADDR         (X_MEMC_BASE_ADDR + 0x2000)
-#define M3IF_BASE_ADDR         (X_MEMC_BASE_ADDR + 0x3000)
-#define EMI_CTL_BASE_ADDR      (X_MEMC_BASE_ADDR + 0x4000)
-#define PCMCIA_CTL_BASE_ADDR   EMI_CTL_BASE_ADDR
+#define MX31_NFC_BASE_ADDR     (X_MEMC_BASE_ADDR + 0x0000)
 
-/*
- * Memory regions and CS
- */
-#define IPU_MEM_BASE_ADDR      0x70000000
-#define CSD0_BASE_ADDR         0x80000000
-#define CSD1_BASE_ADDR         0x90000000
-#define CS0_BASE_ADDR          0xA0000000
-#define CS1_BASE_ADDR          0xA8000000
-#define CS2_BASE_ADDR          0xB0000000
-#define CS3_BASE_ADDR          0xB2000000
-
-#define CS4_BASE_ADDR          0xB4000000
-#define CS4_BASE_ADDR_VIRT     0xF4000000
-#define CS4_SIZE               SZ_32M
-
-#define CS5_BASE_ADDR          0xB6000000
-#define PCMCIA_MEM_BASE_ADDR   0xBC000000
-
-/*!
- * This macro defines the physical to virtual address mapping for all the
- * peripheral modules. It is used by passing in the physical address as x
- * and returning the virtual address. If the physical address is not mapped,
- * it returns 0xDEADBEEF
- */
-#define IO_ADDRESS(x)   \
-       (void __iomem *) \
-       (((x >= IRAM_BASE_ADDR) && (x < (IRAM_BASE_ADDR + IRAM_SIZE))) ? IRAM_IO_ADDRESS(x):\
-       ((x >= L2CC_BASE_ADDR) && (x < (L2CC_BASE_ADDR + L2CC_SIZE))) ? L2CC_IO_ADDRESS(x):\
-       ((x >= AIPS1_BASE_ADDR) && (x < (AIPS1_BASE_ADDR + AIPS1_SIZE))) ? AIPS1_IO_ADDRESS(x):\
-       ((x >= SPBA0_BASE_ADDR) && (x < (SPBA0_BASE_ADDR + SPBA0_SIZE))) ? SPBA0_IO_ADDRESS(x):\
-       ((x >= AIPS2_BASE_ADDR) && (x < (AIPS2_BASE_ADDR + AIPS2_SIZE))) ? AIPS2_IO_ADDRESS(x):\
-       ((x >= ROMP_BASE_ADDR) && (x < (ROMP_BASE_ADDR + ROMP_SIZE))) ? ROMP_IO_ADDRESS(x):\
-       ((x >= AVIC_BASE_ADDR) && (x < (AVIC_BASE_ADDR + AVIC_SIZE))) ? AVIC_IO_ADDRESS(x):\
-       ((x >= CS4_BASE_ADDR) && (x < (CS4_BASE_ADDR + CS4_SIZE))) ? CS4_IO_ADDRESS(x):\
-       ((x >= X_MEMC_BASE_ADDR) && (x < (X_MEMC_BASE_ADDR + X_MEMC_SIZE))) ? X_MEMC_IO_ADDRESS(x):\
-       0xDEADBEEF)
-
-/*
- * define the address mapping macros: in physical address order
- */
-
-#define IRAM_IO_ADDRESS(x)  \
-       (((x) - IRAM_BASE_ADDR) + IRAM_BASE_ADDR_VIRT)
-
-#define L2CC_IO_ADDRESS(x)  \
-       (((x) - L2CC_BASE_ADDR) + L2CC_BASE_ADDR_VIRT)
-
-#define AIPS1_IO_ADDRESS(x)  \
-       (((x) - AIPS1_BASE_ADDR) + AIPS1_BASE_ADDR_VIRT)
-
-#define SPBA0_IO_ADDRESS(x)  \
-       (((x) - SPBA0_BASE_ADDR) + SPBA0_BASE_ADDR_VIRT)
-
-#define AIPS2_IO_ADDRESS(x)  \
-       (((x) - AIPS2_BASE_ADDR) + AIPS2_BASE_ADDR_VIRT)
-
-#define ROMP_IO_ADDRESS(x)  \
-       (((x) - ROMP_BASE_ADDR) + ROMP_BASE_ADDR_VIRT)
-
-#define AVIC_IO_ADDRESS(x)  \
-       (((x) - AVIC_BASE_ADDR) + AVIC_BASE_ADDR_VIRT)
-
-#define CS4_IO_ADDRESS(x)  \
-       (((x) - CS4_BASE_ADDR) + CS4_BASE_ADDR_VIRT)
-
-#define X_MEMC_IO_ADDRESS(x)  \
-       (((x) - X_MEMC_BASE_ADDR) + X_MEMC_BASE_ADDR_VIRT)
-
-#define PCMCIA_IO_ADDRESS(x) \
-       (((x) - X_MEMC_BASE_ADDR) + X_MEMC_BASE_ADDR_VIRT)
-
-/*
- * Interrupt numbers
- */
-#define MXC_INT_PEN_ADS7843    0
-#define MXC_INT_RESV1          1
-#define MXC_INT_CS8900A                2
-#define MXC_INT_I2C3           3
-#define MXC_INT_I2C2           4
 #define MXC_INT_MPEG4_ENCODER  5
-#define MXC_INT_RTIC           6
 #define MXC_INT_FIRI           7
-#define MXC_INT_MMC_SDHC2      8
+#define MX31_INT_MMC_SDHC2     8
 #define MXC_INT_MMC_SDHC1      9
-#define MXC_INT_I2C            10
-#define MXC_INT_SSI2           11
-#define MXC_INT_SSI1           12
-#define MXC_INT_CSPI2          13
-#define MXC_INT_CSPI1          14
-#define MXC_INT_ATA            15
+#define MX31_INT_SSI2          11
+#define MX31_INT_SSI1          12
 #define MXC_INT_MBX            16
 #define MXC_INT_CSPI3          17
-#define MXC_INT_UART3          18
-#define MXC_INT_IIM            19
 #define MXC_INT_SIM2           20
 #define MXC_INT_SIM1           21
-#define MXC_INT_RNGA           22
-#define MXC_INT_EVTMON         23
-#define MXC_INT_KPP            24
-#define MXC_INT_RTC            25
-#define MXC_INT_PWM            26
-#define MXC_INT_EPIT2          27
-#define MXC_INT_EPIT1          28
-#define MXC_INT_GPT            29
-#define MXC_INT_RESV30         30
-#define MXC_INT_RESV31         31
-#define MXC_INT_UART2          32
-#define MXC_INT_NANDFC         33
-#define MXC_INT_SDMA           34
+#define MXC_INT_CCM_DVFS       31
 #define MXC_INT_USB1           35
 #define MXC_INT_USB2           36
 #define MXC_INT_USB3           37
 #define MXC_INT_USB4           38
-#define MXC_INT_MSHC1          39
 #define MXC_INT_MSHC2          40
-#define MXC_INT_IPU_ERR                41
-#define MXC_INT_IPU_SYN                42
-#define MXC_INT_RESV43         43
-#define MXC_INT_RESV44         44
-#define MXC_INT_UART1          45
 #define MXC_INT_UART4          46
 #define MXC_INT_UART5          47
-#define MXC_INT_ECT            48
-#define MXC_INT_SCC_SCM                49
-#define MXC_INT_SCC_SMN                50
-#define MXC_INT_GPIO2          51
-#define MXC_INT_GPIO1          52
 #define MXC_INT_CCM            53
 #define MXC_INT_PCMCIA         54
-#define MXC_INT_WDOG           55
-#define MXC_INT_GPIO3          56
-#define MXC_INT_RESV57         57
-#define MXC_INT_EXT_POWER      58
-#define MXC_INT_EXT_TEMPER     59
-#define MXC_INT_EXT_SENSOR60   60
-#define MXC_INT_EXT_SENSOR61   61
-#define MXC_INT_EXT_WDOG       62
-#define MXC_INT_EXT_TV         63
-
-#define PROD_SIGNATURE         0x1     /* For MX31 */
-
-/* silicon revisions specific to i.MX31 */
-#define CHIP_REV_1_0           0x10
-#define CHIP_REV_1_1           0x11
-#define CHIP_REV_1_2           0x12
-#define CHIP_REV_1_3           0x13
-#define CHIP_REV_2_0           0x20
-#define CHIP_REV_2_1           0x21
-#define CHIP_REV_2_2           0x22
-#define CHIP_REV_2_3           0x23
-#define CHIP_REV_3_0           0x30
-#define CHIP_REV_3_1           0x31
-#define CHIP_REV_3_2           0x32
-
-#define SYSTEM_REV_MIN         CHIP_REV_1_0
-#define SYSTEM_REV_NUM         3
-
-/* gpio and gpio based interrupt handling */
-#define GPIO_DR                        0x00
-#define GPIO_GDIR              0x04
-#define GPIO_PSR               0x08
-#define GPIO_ICR1              0x0C
-#define GPIO_ICR2              0x10
-#define GPIO_IMR               0x14
-#define GPIO_ISR               0x18
-#define GPIO_INT_LOW_LEV       0x0
-#define GPIO_INT_HIGH_LEV      0x1
-#define GPIO_INT_RISE_EDGE     0x2
-#define GPIO_INT_FALL_EDGE     0x3
-#define GPIO_INT_NONE          0x4
-
-/* Mandatory defines used globally */
-
-/* this CPU supports up to 96 GPIOs */
-#define ARCH_NR_GPIOS          96
-
-#if !defined(__ASSEMBLY__) && !defined(__MXC_BOOT_UNCOMPRESS)
-
-/* this is a i.MX31 CPU */
-#define cpu_is_mx31()          (1)
-
-extern unsigned int system_rev;
-
-static inline int mx31_revision(void)
-{
-       return system_rev;
-}
-#endif
 
-#endif /*  __ASM_ARCH_MXC_MX31_H__ */
diff --git a/arch/arm/plat-mxc/include/mach/mx35.h b/arch/arm/plat-mxc/include/mach/mx35.h
new file mode 100644 (file)
index 0000000..6465fef
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * IRAM
+ */
+#define MX35_IRAM_BASE_ADDR            0x10000000      /* internal ram */
+#define MX35_IRAM_SIZE         SZ_128K
+
+#define MXC_FEC_BASE_ADDR      0x50038000
+#define MX35_NFC_BASE_ADDR     0xBB000000
+
+/*
+ * Interrupt numbers
+ */
+#define MXC_INT_OWIRE          2
+#define MX35_INT_MMC_SDHC1     7
+#define MXC_INT_MMC_SDHC2      8
+#define MXC_INT_MMC_SDHC3      9
+#define MX35_INT_SSI1          11
+#define MX35_INT_SSI2          12
+#define MXC_INT_GPU2D          16
+#define MXC_INT_ASRC           17
+#define MXC_INT_USBHS          35
+#define MXC_INT_USBOTG         37
+#define MXC_INT_ESAI           40
+#define MXC_INT_CAN1           43
+#define MXC_INT_CAN2           44
+#define MXC_INT_MLB            46
+#define MXC_INT_SPDIF          47
+#define MXC_INT_FEC            57
+
index e391a76ca87d81799f061996c3f4449763f4fa3e..ac24c5c4bc83c48cfe005fb2cea0e9bd7d2fc89e 100644 (file)
 #include <linux/fb.h>
 
 /* Proprietary FB_SYNC_ flags */
-#define FB_SYNC_OE_ACT_HIGH    0x80000000
-#define FB_SYNC_CLK_INVERT     0x40000000
-#define FB_SYNC_DATA_INVERT    0x20000000
-#define FB_SYNC_CLK_IDLE_EN    0x10000000
-#define FB_SYNC_SHARP_MODE     0x08000000
-#define FB_SYNC_SWAP_RGB       0x04000000
-#define FB_SYNC_CLK_SEL_EN     0x02000000
+#define FB_SYNC_OE_ACT_HIGH    0x80000000
+#define FB_SYNC_CLK_INVERT     0x40000000
+#define FB_SYNC_DATA_INVERT    0x20000000
+#define FB_SYNC_CLK_IDLE_EN    0x10000000
+#define FB_SYNC_SHARP_MODE     0x08000000
+#define FB_SYNC_SWAP_RGB       0x04000000
+#define FB_SYNC_CLK_SEL_EN     0x02000000
 
 /**
  * struct mx3fb_platform_data - mx3fb platform data
  *
- * @dma_dev:   pointer to the dma-device, used for dma-slave connection
- * @mode:      pointer to a platform-provided per mxc_register_fb() videomode
+ * @dma_dev:   pointer to the dma-device, used for dma-slave connection
+ * @mode:      pointer to a platform-provided per mxc_register_fb() videomode
  */
 struct mx3fb_platform_data {
-       struct device                   *dma_dev;
-       const char                      *name;
-       const struct fb_videomode       *mode;
-       int                             num_modes;
+       struct device                   *dma_dev;
+       const char                      *name;
+       const struct fb_videomode       *mode;
+       int                             num_modes;
 };
 
 #endif
diff --git a/arch/arm/plat-mxc/include/mach/mx3x.h b/arch/arm/plat-mxc/include/mach/mx3x.h
new file mode 100644 (file)
index 0000000..3878c60
--- /dev/null
@@ -0,0 +1,290 @@
+/*
+ * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
+ */
+
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef __ASM_ARCH_MXC_MX31_H__
+#define __ASM_ARCH_MXC_MX31_H__
+
+#ifndef __ASM_ARCH_MXC_HARDWARE_H__
+#error "Do not include directly."
+#endif
+
+/*
+ * MX31 memory map:
+ *
+ * Virt                Phys            Size    What
+ * ---------------------------------------------------------------------------
+ * FC000000    43F00000        1M      AIPS 1
+ * FC100000    50000000        1M      SPBA
+ * FC200000    53F00000        1M      AIPS 2
+ * FC500000    60000000        128M    ROMPATCH
+ * FC400000    68000000        128M    AVIC
+ *             70000000        256M    IPU (MAX M2)
+ *             80000000        256M    CSD0 SDRAM/DDR
+ *             90000000        256M    CSD1 SDRAM/DDR
+ *             A0000000        128M    CS0 Flash
+ *             A8000000        128M    CS1 Flash
+ *             B0000000        32M     CS2
+ *             B2000000        32M     CS3
+ * F4000000    B4000000        32M     CS4
+ *             B6000000        32M     CS5
+ * FC320000    B8000000        64K     NAND, SDRAM, WEIM, M3IF, EMI controllers
+ *             C0000000        64M     PCMCIA/CF
+ */
+
+#define CS0_BASE_ADDR          0xA0000000
+#define CS1_BASE_ADDR          0xA8000000
+#define CS2_BASE_ADDR          0xB0000000
+#define CS3_BASE_ADDR          0xB2000000
+
+#define CS4_BASE_ADDR          0xB4000000
+#define CS4_BASE_ADDR_VIRT     0xF4000000
+#define CS4_SIZE               SZ_32M
+
+#define CS5_BASE_ADDR          0xB6000000
+#define PCMCIA_MEM_BASE_ADDR   0xBC000000
+
+/*
+ * L2CC
+ */
+#define L2CC_BASE_ADDR         0x30000000
+#define L2CC_SIZE              SZ_1M
+
+/*
+ * AIPS 1
+ */
+#define AIPS1_BASE_ADDR                0x43F00000
+#define AIPS1_BASE_ADDR_VIRT   0xFC000000
+#define AIPS1_SIZE             SZ_1M
+
+#define MAX_BASE_ADDR          (AIPS1_BASE_ADDR + 0x00004000)
+#define EVTMON_BASE_ADDR       (AIPS1_BASE_ADDR + 0x00008000)
+#define CLKCTL_BASE_ADDR       (AIPS1_BASE_ADDR + 0x0000C000)
+#define ETB_SLOT4_BASE_ADDR    (AIPS1_BASE_ADDR + 0x00010000)
+#define ETB_SLOT5_BASE_ADDR    (AIPS1_BASE_ADDR + 0x00014000)
+#define ECT_CTIO_BASE_ADDR     (AIPS1_BASE_ADDR + 0x00018000)
+#define I2C_BASE_ADDR          (AIPS1_BASE_ADDR + 0x00080000)
+#define I2C3_BASE_ADDR         (AIPS1_BASE_ADDR + 0x00084000)
+#define UART1_BASE_ADDR        (AIPS1_BASE_ADDR + 0x00090000)
+#define UART2_BASE_ADDR        (AIPS1_BASE_ADDR + 0x00094000)
+#define I2C2_BASE_ADDR         (AIPS1_BASE_ADDR + 0x00098000)
+#define OWIRE_BASE_ADDR        (AIPS1_BASE_ADDR + 0x0009C000)
+#define SSI1_BASE_ADDR         (AIPS1_BASE_ADDR + 0x000A0000)
+#define CSPI1_BASE_ADDR        (AIPS1_BASE_ADDR + 0x000A4000)
+#define KPP_BASE_ADDR          (AIPS1_BASE_ADDR + 0x000A8000)
+#define IOMUXC_BASE_ADDR       (AIPS1_BASE_ADDR + 0x000AC000)
+#define ECT_IP1_BASE_ADDR      (AIPS1_BASE_ADDR + 0x000B8000)
+#define ECT_IP2_BASE_ADDR      (AIPS1_BASE_ADDR + 0x000BC000)
+
+/*
+ * SPBA global module enabled #0
+ */
+#define SPBA0_BASE_ADDR        0x50000000
+#define SPBA0_BASE_ADDR_VIRT   0xFC100000
+#define SPBA0_SIZE             SZ_1M
+
+#define UART3_BASE_ADDR        (SPBA0_BASE_ADDR + 0x0000C000)
+#define CSPI2_BASE_ADDR        (SPBA0_BASE_ADDR + 0x00010000)
+#define SSI2_BASE_ADDR         (SPBA0_BASE_ADDR + 0x00014000)
+#define ATA_DMA_BASE_ADDR      (SPBA0_BASE_ADDR + 0x00020000)
+#define MSHC1_BASE_ADDR                (SPBA0_BASE_ADDR + 0x00024000)
+#define SPBA_CTRL_BASE_ADDR    (SPBA0_BASE_ADDR + 0x0003C000)
+
+/*
+ * AIPS 2
+ */
+#define AIPS2_BASE_ADDR                0x53F00000
+#define AIPS2_BASE_ADDR_VIRT   0xFC200000
+#define AIPS2_SIZE             SZ_1M
+#define CCM_BASE_ADDR          (AIPS2_BASE_ADDR + 0x00080000)
+#define GPT1_BASE_ADDR         (AIPS2_BASE_ADDR + 0x00090000)
+#define EPIT1_BASE_ADDR                (AIPS2_BASE_ADDR + 0x00094000)
+#define EPIT2_BASE_ADDR                (AIPS2_BASE_ADDR + 0x00098000)
+#define GPIO3_BASE_ADDR                (AIPS2_BASE_ADDR + 0x000A4000)
+#define SCC_BASE_ADDR          (AIPS2_BASE_ADDR + 0x000AC000)
+#define RNGA_BASE_ADDR         (AIPS2_BASE_ADDR + 0x000B0000)
+#define IPU_CTRL_BASE_ADDR     (AIPS2_BASE_ADDR + 0x000C0000)
+#define AUDMUX_BASE_ADDR       (AIPS2_BASE_ADDR + 0x000C4000)
+#define GPIO1_BASE_ADDR                (AIPS2_BASE_ADDR + 0x000CC000)
+#define GPIO2_BASE_ADDR                (AIPS2_BASE_ADDR + 0x000D0000)
+#define SDMA_BASE_ADDR         (AIPS2_BASE_ADDR + 0x000D4000)
+#define RTC_BASE_ADDR          (AIPS2_BASE_ADDR + 0x000D8000)
+#define WDOG_BASE_ADDR         (AIPS2_BASE_ADDR + 0x000DC000)
+#define PWM_BASE_ADDR          (AIPS2_BASE_ADDR + 0x000E0000)
+#define RTIC_BASE_ADDR         (AIPS2_BASE_ADDR + 0x000EC000)
+
+/*
+ * ROMP and AVIC
+ */
+#define ROMP_BASE_ADDR         0x60000000
+#define ROMP_BASE_ADDR_VIRT    0xFC500000
+#define ROMP_SIZE              SZ_1M
+
+#define AVIC_BASE_ADDR         0x68000000
+#define AVIC_BASE_ADDR_VIRT    0xFC400000
+#define AVIC_SIZE              SZ_1M
+
+/*
+ * NAND, SDRAM, WEIM, M3IF, EMI controllers
+ */
+#define X_MEMC_BASE_ADDR       0xB8000000
+#define X_MEMC_BASE_ADDR_VIRT  0xFC320000
+#define X_MEMC_SIZE            SZ_64K
+
+#define ESDCTL_BASE_ADDR       (X_MEMC_BASE_ADDR + 0x1000)
+#define WEIM_BASE_ADDR         (X_MEMC_BASE_ADDR + 0x2000)
+#define M3IF_BASE_ADDR         (X_MEMC_BASE_ADDR + 0x3000)
+#define EMI_CTL_BASE_ADDR      (X_MEMC_BASE_ADDR + 0x4000)
+#define PCMCIA_CTL_BASE_ADDR   EMI_CTL_BASE_ADDR
+
+/*
+ * Memory regions and CS
+ */
+#define IPU_MEM_BASE_ADDR      0x70000000
+#define CSD0_BASE_ADDR         0x80000000
+#define CSD1_BASE_ADDR         0x90000000
+
+/*!
+ * This macro defines the physical to virtual address mapping for all the
+ * peripheral modules. It is used by passing in the physical address as x
+ * and returning the virtual address. If the physical address is not mapped,
+ * it returns 0xDEADBEEF
+ */
+#define IO_ADDRESS(x)   \
+       (void __force __iomem *) \
+       (((x >= AIPS1_BASE_ADDR) && (x < (AIPS1_BASE_ADDR + AIPS1_SIZE))) ? AIPS1_IO_ADDRESS(x):\
+       ((x >= SPBA0_BASE_ADDR) && (x < (SPBA0_BASE_ADDR + SPBA0_SIZE))) ? SPBA0_IO_ADDRESS(x):\
+       ((x >= AIPS2_BASE_ADDR) && (x < (AIPS2_BASE_ADDR + AIPS2_SIZE))) ? AIPS2_IO_ADDRESS(x):\
+       ((x >= ROMP_BASE_ADDR) && (x < (ROMP_BASE_ADDR + ROMP_SIZE))) ? ROMP_IO_ADDRESS(x):\
+       ((x >= AVIC_BASE_ADDR) && (x < (AVIC_BASE_ADDR + AVIC_SIZE))) ? AVIC_IO_ADDRESS(x):\
+       ((x >= CS4_BASE_ADDR) && (x < (CS4_BASE_ADDR + CS4_SIZE))) ? CS4_IO_ADDRESS(x):\
+       ((x >= X_MEMC_BASE_ADDR) && (x < (X_MEMC_BASE_ADDR + X_MEMC_SIZE))) ? X_MEMC_IO_ADDRESS(x):\
+       0xDEADBEEF)
+
+/*
+ * define the address mapping macros: in physical address order
+ */
+#define L2CC_IO_ADDRESS(x)  \
+       (((x) - L2CC_BASE_ADDR) + L2CC_BASE_ADDR_VIRT)
+
+#define AIPS1_IO_ADDRESS(x)  \
+       (((x) - AIPS1_BASE_ADDR) + AIPS1_BASE_ADDR_VIRT)
+
+#define SPBA0_IO_ADDRESS(x)  \
+       (((x) - SPBA0_BASE_ADDR) + SPBA0_BASE_ADDR_VIRT)
+
+#define AIPS2_IO_ADDRESS(x)  \
+       (((x) - AIPS2_BASE_ADDR) + AIPS2_BASE_ADDR_VIRT)
+
+#define ROMP_IO_ADDRESS(x)  \
+       (((x) - ROMP_BASE_ADDR) + ROMP_BASE_ADDR_VIRT)
+
+#define AVIC_IO_ADDRESS(x)  \
+       (((x) - AVIC_BASE_ADDR) + AVIC_BASE_ADDR_VIRT)
+
+#define CS4_IO_ADDRESS(x)  \
+       (((x) - CS4_BASE_ADDR) + CS4_BASE_ADDR_VIRT)
+
+#define X_MEMC_IO_ADDRESS(x)  \
+       (((x) - X_MEMC_BASE_ADDR) + X_MEMC_BASE_ADDR_VIRT)
+
+#define PCMCIA_IO_ADDRESS(x) \
+       (((x) - X_MEMC_BASE_ADDR) + X_MEMC_BASE_ADDR_VIRT)
+
+/*
+ * Interrupt numbers
+ */
+#define MXC_INT_I2C3           3
+#define MXC_INT_I2C2           4
+#define MXC_INT_RTIC           6
+#define MXC_INT_I2C            10
+#define MXC_INT_CSPI2          13
+#define MXC_INT_CSPI1          14
+#define MXC_INT_ATA            15
+#define MXC_INT_UART3          18
+#define MXC_INT_IIM            19
+#define MXC_INT_RNGA           22
+#define MXC_INT_EVTMON         23
+#define MXC_INT_KPP            24
+#define MXC_INT_RTC            25
+#define MXC_INT_PWM            26
+#define MXC_INT_EPIT2          27
+#define MXC_INT_EPIT1          28
+#define MXC_INT_GPT            29
+#define MXC_INT_POWER_FAIL     30
+#define MXC_INT_UART2          32
+#define MXC_INT_NANDFC         33
+#define MXC_INT_SDMA           34
+#define MXC_INT_MSHC1          39
+#define MXC_INT_IPU_ERR                41
+#define MXC_INT_IPU_SYN                42
+#define MXC_INT_UART1          45
+#define MXC_INT_ECT            48
+#define MXC_INT_SCC_SCM                49
+#define MXC_INT_SCC_SMN                50
+#define MXC_INT_GPIO2          51
+#define MXC_INT_GPIO1          52
+#define MXC_INT_WDOG           55
+#define MXC_INT_GPIO3          56
+#define MXC_INT_EXT_POWER      58
+#define MXC_INT_EXT_TEMPER     59
+#define MXC_INT_EXT_SENSOR60   60
+#define MXC_INT_EXT_SENSOR61   61
+#define MXC_INT_EXT_WDOG       62
+#define MXC_INT_EXT_TV         63
+
+#define PROD_SIGNATURE         0x1     /* For MX31 */
+
+/* silicon revisions specific to i.MX31 */
+#define CHIP_REV_1_0           0x10
+#define CHIP_REV_1_1           0x11
+#define CHIP_REV_1_2           0x12
+#define CHIP_REV_1_3           0x13
+#define CHIP_REV_2_0           0x20
+#define CHIP_REV_2_1           0x21
+#define CHIP_REV_2_2           0x22
+#define CHIP_REV_2_3           0x23
+#define CHIP_REV_3_0           0x30
+#define CHIP_REV_3_1           0x31
+#define CHIP_REV_3_2           0x32
+
+#define SYSTEM_REV_MIN         CHIP_REV_1_0
+#define SYSTEM_REV_NUM         3
+
+/* gpio and gpio based interrupt handling */
+#define GPIO_DR                        0x00
+#define GPIO_GDIR              0x04
+#define GPIO_PSR               0x08
+#define GPIO_ICR1              0x0C
+#define GPIO_ICR2              0x10
+#define GPIO_IMR               0x14
+#define GPIO_ISR               0x18
+#define GPIO_INT_LOW_LEV       0x0
+#define GPIO_INT_HIGH_LEV      0x1
+#define GPIO_INT_RISE_EDGE     0x2
+#define GPIO_INT_FALL_EDGE     0x3
+#define GPIO_INT_NONE          0x4
+
+/* Mandatory defines used globally */
+
+/* this CPU supports up to 96 GPIOs */
+#define ARCH_NR_GPIOS          96
+
+#if !defined(__ASSEMBLY__) && !defined(__MXC_BOOT_UNCOMPRESS)
+
+extern unsigned int system_rev;
+
+static inline int mx31_revision(void)
+{
+       return system_rev;
+}
+#endif
+
+#endif /*  __ASM_ARCH_MXC_MX31_H__ */
+
index f6caab0621316e3597e226c1a33fd63d22094be5..5fa2a07f4eaf9812664c01e5e70fb0c865b5970b 100644 (file)
 #error "Do not include directly."
 #endif
 
-/* clean up all things that are not used */
-#ifndef CONFIG_ARCH_MX3
-# define cpu_is_mx31() (0)
+#define MXC_CPU_MX1            1
+#define MXC_CPU_MX21           21
+#define MXC_CPU_MX27           27
+#define MXC_CPU_MX31           31
+#define MXC_CPU_MX35           35
+
+#ifndef __ASSEMBLY__
+extern unsigned int __mxc_cpu_type;
+#endif
+
+#ifdef CONFIG_ARCH_MX1
+# ifdef mxc_cpu_type
+#  undef mxc_cpu_type
+#  define mxc_cpu_type __mxc_cpu_type
+# else
+#  define mxc_cpu_type MXC_CPU_MX1
+# endif
+# define cpu_is_mx1()          (mxc_cpu_type == MXC_CPU_MX1)
+#else
+# define cpu_is_mx1()          (0)
+#endif
+
+#ifdef CONFIG_MACH_MX21
+# ifdef mxc_cpu_type
+#  undef mxc_cpu_type
+#  define mxc_cpu_type __mxc_cpu_type
+# else
+#  define mxc_cpu_type MXC_CPU_MX21
+# endif
+# define cpu_is_mx21()         (mxc_cpu_type == MXC_CPU_MX21)
+#else
+# define cpu_is_mx21()         (0)
 #endif
 
-#ifndef CONFIG_MACH_MX27
-# define cpu_is_mx27() (0)
+#ifdef CONFIG_MACH_MX27
+# ifdef mxc_cpu_type
+#  undef mxc_cpu_type
+#  define mxc_cpu_type __mxc_cpu_type
+# else
+#  define mxc_cpu_type MXC_CPU_MX27
+# endif
+# define cpu_is_mx27()         (mxc_cpu_type == MXC_CPU_MX27)
+#else
+# define cpu_is_mx27()         (0)
+#endif
+
+#ifdef CONFIG_ARCH_MX31
+# ifdef mxc_cpu_type
+#  undef mxc_cpu_type
+#  define mxc_cpu_type __mxc_cpu_type
+# else
+#  define mxc_cpu_type MXC_CPU_MX31
+# endif
+# define cpu_is_mx31()         (mxc_cpu_type == MXC_CPU_MX31)
+#else
+# define cpu_is_mx31()         (0)
+#endif
+
+#ifdef CONFIG_ARCH_MX35
+# ifdef mxc_cpu_type
+#  undef mxc_cpu_type
+#  define mxc_cpu_type __mxc_cpu_type
+# else
+#  define mxc_cpu_type MXC_CPU_MX35
+# endif
+# define cpu_is_mx35()         (mxc_cpu_type == MXC_CPU_MX35)
+#else
+# define cpu_is_mx35()         (0)
 #endif
 
 #if defined(CONFIG_ARCH_MX3) || defined(CONFIG_ARCH_MX2)
 #define CSCR_A(n) (IO_ADDRESS(WEIM_BASE_ADDR) + n * 0x10 + 0x8)
 #endif
 
+#define cpu_is_mx3()   (cpu_is_mx31() || cpu_is_mx35())
+#define cpu_is_mx2()   (cpu_is_mx21() || cpu_is_mx27())
+
 #endif /*  __ASM_ARCH_MXC_H__ */
index bbfc37465fc597943ec1944ddd416157713526d1..cd03ebaa49bcafde8e71e2996bf6e5581216bca2 100644 (file)
@@ -26,7 +26,7 @@ static inline void arch_idle(void)
        cpu_do_idle();
 }
 
-static inline void arch_reset(char mode)
+static inline void arch_reset(char mode, const char *cmd)
 {
        cpu_reset(0);
 }
index df6f18395686bcfe73d9b3cc40b21bac900aaad3..a37163ce280b34824f4a901eb8e2e42230cb5521 100644 (file)
@@ -32,7 +32,7 @@
 
 #include <mach/hardware.h>
 #include <asm/mach/map.h>
-#include <mach/iomux-mx1-mx2.h>
+#include <mach/iomux.h>
 
 void mxc_gpio_mode(int gpio_mode)
 {
diff --git a/arch/arm/plat-mxc/pwm.c b/arch/arm/plat-mxc/pwm.c
new file mode 100644 (file)
index 0000000..9bffbc5
--- /dev/null
@@ -0,0 +1,300 @@
+/*
+ * simple driver for PWM (Pulse Width Modulator) controller
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Derived from pxa PWM driver by eric miao <eric.miao@marvell.com>
+ */
+
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/platform_device.h>
+#include <linux/err.h>
+#include <linux/clk.h>
+#include <linux/io.h>
+#include <linux/pwm.h>
+
+#if defined CONFIG_ARCH_MX1 || defined CONFIG_ARCH_MX21
+#define PWM_VER_1
+
+#define PWMCR  0x00    /* PWM Control Register         */
+#define PWMSR  0x04    /* PWM Sample Register          */
+#define PWMPR  0x08    /* PWM Period Register          */
+#define PWMCNR 0x0C    /* PWM Counter Register         */
+
+#define PWMCR_HCTR             (1 << 18)               /* Halfword FIFO Data Swapping  */
+#define PWMCR_BCTR             (1 << 17)               /* Byte FIFO Data Swapping      */
+#define PWMCR_SWR              (1 << 16)               /* Software Reset               */
+#define PWMCR_CLKSRC_PERCLK    (0 << 15)               /* PERCLK Clock Source          */
+#define PWMCR_CLKSRC_CLK32     (1 << 15)               /* 32KHz Clock Source           */
+#define PWMCR_PRESCALER(x)     (((x - 1) & 0x7F) << 8) /* PRESCALER                    */
+#define PWMCR_IRQ              (1 << 7)                /* Interrupt Request            */
+#define PWMCR_IRQEN            (1 << 6)                /* Interrupt Request Enable     */
+#define PWMCR_FIFOAV           (1 << 5)                /* FIFO Available               */
+#define PWMCR_EN               (1 << 4)                /* Enables/Disables the PWM     */
+#define PWMCR_REPEAT(x)                (((x) & 0x03) << 2)     /* Sample Repeats               */
+#define PWMCR_DIV(x)           (((x) & 0x03) << 0)     /* Clock divider 2/4/8/16       */
+
+#define MAX_DIV                        (128 * 16)
+#endif
+
+#if defined CONFIG_MACH_MX27 || defined CONFIG_ARCH_MX31
+#define PWM_VER_2
+
+#define PWMCR  0x00    /* PWM Control Register         */
+#define PWMSR  0x04    /* PWM Status Register          */
+#define PWMIR  0x08    /* PWM Interrupt Register       */
+#define PWMSAR 0x0C    /* PWM Sample Register          */
+#define PWMPR  0x10    /* PWM Period Register          */
+#define PWMCNR 0x14    /* PWM Counter Register         */
+
+#define PWMCR_EN               (1 << 0)                /* Enables/Disables the PWM     */
+#define PWMCR_REPEAT(x)                (((x) & 0x03) << 1)     /* Sample Repeats               */
+#define PWMCR_SWR              (1 << 3)                /* Software Reset               */
+#define PWMCR_PRESCALER(x)     (((x - 1) & 0xFFF) << 4)/* PRESCALER                    */
+#define PWMCR_CLKSRC(x)                (((x) & 0x3) << 16)
+#define PWMCR_CLKSRC_OFF       (0 << 16)
+#define PWMCR_CLKSRC_IPG       (1 << 16)
+#define PWMCR_CLKSRC_IPG_HIGH  (2 << 16)
+#define PWMCR_CLKSRC_CLK32     (3 << 16)
+#define PWMCR_POUTC
+#define PWMCR_HCTR             (1 << 20)               /* Halfword FIFO Data Swapping  */
+#define PWMCR_BCTR             (1 << 21)               /* Byte FIFO Data Swapping      */
+#define PWMCR_DBGEN            (1 << 22)               /* Debug Mode                   */
+#define PWMCR_WAITEN           (1 << 23)               /* Wait Mode                    */
+#define PWMCR_DOZEN            (1 << 24)               /* Doze Mode                    */
+#define PWMCR_STOPEN           (1 << 25)               /* Stop Mode                    */
+#define PWMCR_FWM(x)           (((x) & 0x3) << 26)     /* FIFO Water Mark              */
+
+#define MAX_DIV 4096
+#endif
+
+#define PWMS_SAMPLE(x)         ((x) & 0xFFFF)          /* Contains a two-sample word   */
+#define PWMP_PERIOD(x)         ((x) & 0xFFFF)          /* Represents the PWM's period  */
+#define PWMC_COUNTER(x)                ((x) & 0xFFFF)          /* Represents the current count value   */
+
+struct pwm_device {
+       struct list_head        node;
+       struct platform_device *pdev;
+
+       const char      *label;
+       struct clk      *clk;
+
+       int             clk_enabled;
+       void __iomem    *mmio_base;
+
+       unsigned int    use_count;
+       unsigned int    pwm_id;
+};
+
+int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns)
+{
+       unsigned long long c;
+       unsigned long period_cycles, duty_cycles, prescale;
+
+       if (pwm == NULL || period_ns == 0 || duty_ns > period_ns)
+               return -EINVAL;
+
+       c = clk_get_rate(pwm->clk);
+       c = c * period_ns;
+       do_div(c, 1000000000);
+       period_cycles = c;
+
+       prescale = period_cycles / 0x10000 + 1;
+
+       period_cycles /= prescale;
+       c = (unsigned long long)period_cycles * duty_ns;
+       do_div(c, period_ns);
+       duty_cycles = c;
+
+#ifdef PWM_VER_2
+       writel(duty_cycles, pwm->mmio_base + PWMSAR);
+       writel(period_cycles, pwm->mmio_base + PWMPR);
+       writel(PWMCR_PRESCALER(prescale - 1) | PWMCR_CLKSRC_IPG_HIGH | PWMCR_EN,
+                       pwm->mmio_base + PWMCR);
+#elif defined PWM_VER_1
+#error PWM not yet working on MX1 / MX21
+#endif
+
+       return 0;
+}
+EXPORT_SYMBOL(pwm_config);
+
+int pwm_enable(struct pwm_device *pwm)
+{
+       int rc = 0;
+
+       if (!pwm->clk_enabled) {
+               rc = clk_enable(pwm->clk);
+               if (!rc)
+                       pwm->clk_enabled = 1;
+       }
+       return rc;
+}
+EXPORT_SYMBOL(pwm_enable);
+
+void pwm_disable(struct pwm_device *pwm)
+{
+       if (pwm->clk_enabled) {
+               clk_disable(pwm->clk);
+               pwm->clk_enabled = 0;
+       }
+}
+EXPORT_SYMBOL(pwm_disable);
+
+static DEFINE_MUTEX(pwm_lock);
+static LIST_HEAD(pwm_list);
+
+struct pwm_device *pwm_request(int pwm_id, const char *label)
+{
+       struct pwm_device *pwm;
+       int found = 0;
+
+       mutex_lock(&pwm_lock);
+
+       list_for_each_entry(pwm, &pwm_list, node) {
+               if (pwm->pwm_id == pwm_id) {
+                       found = 1;
+                       break;
+               }
+       }
+
+       if (found) {
+               if (pwm->use_count == 0) {
+                       pwm->use_count++;
+                       pwm->label = label;
+               } else
+                       pwm = ERR_PTR(-EBUSY);
+       } else
+               pwm = ERR_PTR(-ENOENT);
+
+       mutex_unlock(&pwm_lock);
+       return pwm;
+}
+EXPORT_SYMBOL(pwm_request);
+
+void pwm_free(struct pwm_device *pwm)
+{
+       mutex_lock(&pwm_lock);
+
+       if (pwm->use_count) {
+               pwm->use_count--;
+               pwm->label = NULL;
+       } else
+               pr_warning("PWM device already freed\n");
+
+       mutex_unlock(&pwm_lock);
+}
+EXPORT_SYMBOL(pwm_free);
+
+static int __devinit mxc_pwm_probe(struct platform_device *pdev)
+{
+       struct pwm_device *pwm;
+       struct resource *r;
+       int ret = 0;
+
+       pwm = kzalloc(sizeof(struct pwm_device), GFP_KERNEL);
+       if (pwm == NULL) {
+               dev_err(&pdev->dev, "failed to allocate memory\n");
+               return -ENOMEM;
+       }
+
+       pwm->clk = clk_get(&pdev->dev, "pwm");
+
+       if (IS_ERR(pwm->clk)) {
+               ret = PTR_ERR(pwm->clk);
+               goto err_free;
+       }
+
+       pwm->clk_enabled = 0;
+
+       pwm->use_count = 0;
+       pwm->pwm_id = pdev->id;
+       pwm->pdev = pdev;
+
+       r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+       if (r == NULL) {
+               dev_err(&pdev->dev, "no memory resource defined\n");
+               ret = -ENODEV;
+               goto err_free_clk;
+       }
+
+       r = request_mem_region(r->start, r->end - r->start + 1, pdev->name);
+       if (r == NULL) {
+               dev_err(&pdev->dev, "failed to request memory resource\n");
+               ret = -EBUSY;
+               goto err_free_clk;
+       }
+
+       pwm->mmio_base = ioremap(r->start, r->end - r->start + 1);
+       if (pwm->mmio_base == NULL) {
+               dev_err(&pdev->dev, "failed to ioremap() registers\n");
+               ret = -ENODEV;
+               goto err_free_mem;
+       }
+
+       mutex_lock(&pwm_lock);
+       list_add_tail(&pwm->node, &pwm_list);
+       mutex_unlock(&pwm_lock);
+
+       platform_set_drvdata(pdev, pwm);
+       return 0;
+
+err_free_mem:
+       release_mem_region(r->start, r->end - r->start + 1);
+err_free_clk:
+       clk_put(pwm->clk);
+err_free:
+       kfree(pwm);
+       return ret;
+}
+
+static int __devexit mxc_pwm_remove(struct platform_device *pdev)
+{
+       struct pwm_device *pwm;
+       struct resource *r;
+
+       pwm = platform_get_drvdata(pdev);
+       if (pwm == NULL)
+               return -ENODEV;
+
+       mutex_lock(&pwm_lock);
+       list_del(&pwm->node);
+       mutex_unlock(&pwm_lock);
+
+       iounmap(pwm->mmio_base);
+
+       r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+       release_mem_region(r->start, r->end - r->start + 1);
+
+       clk_put(pwm->clk);
+
+       kfree(pwm);
+       return 0;
+}
+
+static struct platform_driver mxc_pwm_driver = {
+       .driver         = {
+               .name   = "mxc_pwm",
+       },
+       .probe          = mxc_pwm_probe,
+       .remove         = __devexit_p(mxc_pwm_remove),
+};
+
+static int __init mxc_pwm_init(void)
+{
+       return platform_driver_register(&mxc_pwm_driver);
+}
+arch_initcall(mxc_pwm_init);
+
+static void __exit mxc_pwm_exit(void)
+{
+       platform_driver_unregister(&mxc_pwm_driver);
+}
+module_exit(mxc_pwm_exit);
+
+MODULE_LICENSE("GPL v2");
+MODULE_AUTHOR("Sascha Hauer <s.hauer@pengutronix.de>");
+
index 758a1293bcfaaefa2be4191f030eb74b8dcc0ce8..ef1b3cd85bd318aa4e3841a86f01d725b39dcbd6 100644 (file)
@@ -34,9 +34,6 @@
 static struct clock_event_device clockevent_mxc;
 static enum clock_event_mode clockevent_mode = CLOCK_EVT_MODE_UNUSED;
 
-/* clock source for the timer */
-static struct clk *timer_clk;
-
 /* clock source */
 
 static cycle_t mxc_get_cycles(void)
@@ -53,13 +50,11 @@ static struct clocksource clocksource_mxc = {
        .flags          = CLOCK_SOURCE_IS_CONTINUOUS,
 };
 
-static int __init mxc_clocksource_init(void)
+static int __init mxc_clocksource_init(struct clk *timer_clk)
 {
-       unsigned int clock;
-
-       clock = clk_get_rate(timer_clk);
+       unsigned int c = clk_get_rate(timer_clk);
 
-       clocksource_mxc.mult = clocksource_hz2mult(clock,
+       clocksource_mxc.mult = clocksource_hz2mult(c,
                                        clocksource_mxc.shift);
        clocksource_register(&clocksource_mxc);
 
@@ -177,13 +172,11 @@ static struct clock_event_device clockevent_mxc = {
        .rating         = 200,
 };
 
-static int __init mxc_clockevent_init(void)
+static int __init mxc_clockevent_init(struct clk *timer_clk)
 {
-       unsigned int clock;
-
-       clock = clk_get_rate(timer_clk);
+       unsigned int c = clk_get_rate(timer_clk);
 
-       clockevent_mxc.mult = div_sc(clock, NSEC_PER_SEC,
+       clockevent_mxc.mult = div_sc(c, NSEC_PER_SEC,
                                        clockevent_mxc.shift);
        clockevent_mxc.max_delta_ns =
                        clockevent_delta2ns(0xfffffffe, &clockevent_mxc);
@@ -197,14 +190,8 @@ static int __init mxc_clockevent_init(void)
        return 0;
 }
 
-void __init mxc_timer_init(const char *clk_timer)
+void __init mxc_timer_init(struct clk *timer_clk)
 {
-       timer_clk = clk_get(NULL, clk_timer);
-       if (!timer_clk) {
-               printk(KERN_ERR"Cannot determine timer clock. Giving up.\n");
-               return;
-       }
-
        clk_enable(timer_clk);
 
        /*
@@ -219,10 +206,9 @@ void __init mxc_timer_init(const char *clk_timer)
                     TIMER_BASE + MXC_TCTL);
 
        /* init and register the timer to the framework */
-       mxc_clocksource_init();
-       mxc_clockevent_init();
+       mxc_clocksource_init(timer_clk);
+       mxc_clockevent_init(timer_clk);
 
        /* Make irqs happen */
        setup_irq(TIMER_INTERRUPT, &mxc_timer_irq);
 }
-
index 46d3b0b9ce696eaef46d895a37b7a694059dd554..e25e1ac64fc1870a25d9f7dd88903344dfaa322e 100644 (file)
@@ -11,14 +11,17 @@ choice
 
 config ARCH_OMAP1
        bool "TI OMAP1"
+       select COMMON_CLKDEV
 
 config ARCH_OMAP2
        bool "TI OMAP2"
        select CPU_V6
+       select COMMON_CLKDEV
 
 config ARCH_OMAP3
        bool "TI OMAP3"
        select CPU_V7
+       select COMMON_CLKDEV
 
 endchoice
 
index be6aab9c68344ef8ac10424d23a7319aee0ab6fa..2e0614552ac89c2d014959d596e43c81f1c62d26 100644 (file)
@@ -36,44 +36,6 @@ static struct clk_functions *arch_clock;
  * Standard clock functions defined in include/linux/clk.h
  *-------------------------------------------------------------------------*/
 
-/*
- * Returns a clock. Note that we first try to use device id on the bus
- * and clock name. If this fails, we try to use clock name only.
- */
-struct clk * clk_get(struct device *dev, const char *id)
-{
-       struct clk *p, *clk = ERR_PTR(-ENOENT);
-       int idno;
-
-       if (dev == NULL || dev->bus != &platform_bus_type)
-               idno = -1;
-       else
-               idno = to_platform_device(dev)->id;
-
-       mutex_lock(&clocks_mutex);
-
-       list_for_each_entry(p, &clocks, node) {
-               if (p->id == idno &&
-                   strcmp(id, p->name) == 0 && try_module_get(p->owner)) {
-                       clk = p;
-                       goto found;
-               }
-       }
-
-       list_for_each_entry(p, &clocks, node) {
-               if (strcmp(id, p->name) == 0 && try_module_get(p->owner)) {
-                       clk = p;
-                       break;
-               }
-       }
-
-found:
-       mutex_unlock(&clocks_mutex);
-
-       return clk;
-}
-EXPORT_SYMBOL(clk_get);
-
 int clk_enable(struct clk *clk)
 {
        unsigned long flags;
@@ -114,22 +76,6 @@ out:
 }
 EXPORT_SYMBOL(clk_disable);
 
-int clk_get_usecount(struct clk *clk)
-{
-       unsigned long flags;
-       int ret = 0;
-
-       if (clk == NULL || IS_ERR(clk))
-               return 0;
-
-       spin_lock_irqsave(&clockfw_lock, flags);
-       ret = clk->usecount;
-       spin_unlock_irqrestore(&clockfw_lock, flags);
-
-       return ret;
-}
-EXPORT_SYMBOL(clk_get_usecount);
-
 unsigned long clk_get_rate(struct clk *clk)
 {
        unsigned long flags;
@@ -146,13 +92,6 @@ unsigned long clk_get_rate(struct clk *clk)
 }
 EXPORT_SYMBOL(clk_get_rate);
 
-void clk_put(struct clk *clk)
-{
-       if (clk && !IS_ERR(clk))
-               module_put(clk->owner);
-}
-EXPORT_SYMBOL(clk_put);
-
 /*-------------------------------------------------------------------------
  * Optional clock functions defined in include/linux/clk.h
  *-------------------------------------------------------------------------*/
@@ -185,6 +124,11 @@ int clk_set_rate(struct clk *clk, unsigned long rate)
        spin_lock_irqsave(&clockfw_lock, flags);
        if (arch_clock->clk_set_rate)
                ret = arch_clock->clk_set_rate(clk, rate);
+       if (ret == 0) {
+               if (clk->recalc)
+                       clk->rate = clk->recalc(clk);
+               propagate_rate(clk);
+       }
        spin_unlock_irqrestore(&clockfw_lock, flags);
 
        return ret;
@@ -200,8 +144,16 @@ int clk_set_parent(struct clk *clk, struct clk *parent)
                return ret;
 
        spin_lock_irqsave(&clockfw_lock, flags);
-       if (arch_clock->clk_set_parent)
-               ret =  arch_clock->clk_set_parent(clk, parent);
+       if (clk->usecount == 0) {
+               if (arch_clock->clk_set_parent)
+                       ret = arch_clock->clk_set_parent(clk, parent);
+               if (ret == 0) {
+                       if (clk->recalc)
+                               clk->rate = clk->recalc(clk);
+                       propagate_rate(clk);
+               }
+       } else
+               ret = -EBUSY;
        spin_unlock_irqrestore(&clockfw_lock, flags);
 
        return ret;
@@ -210,18 +162,7 @@ EXPORT_SYMBOL(clk_set_parent);
 
 struct clk *clk_get_parent(struct clk *clk)
 {
-       unsigned long flags;
-       struct clk * ret = NULL;
-
-       if (clk == NULL || IS_ERR(clk))
-               return ret;
-
-       spin_lock_irqsave(&clockfw_lock, flags);
-       if (arch_clock->clk_get_parent)
-               ret = arch_clock->clk_get_parent(clk);
-       spin_unlock_irqrestore(&clockfw_lock, flags);
-
-       return ret;
+       return clk->parent;
 }
 EXPORT_SYMBOL(clk_get_parent);
 
@@ -250,14 +191,20 @@ static int __init omap_clk_setup(char *str)
 __setup("mpurate=", omap_clk_setup);
 
 /* Used for clocks that always have same value as the parent clock */
-void followparent_recalc(struct clk *clk)
+unsigned long followparent_recalc(struct clk *clk)
 {
-       if (clk == NULL || IS_ERR(clk))
-               return;
+       return clk->parent->rate;
+}
 
-       clk->rate = clk->parent->rate;
-       if (unlikely(clk->flags & RATE_PROPAGATES))
-               propagate_rate(clk);
+void clk_reparent(struct clk *child, struct clk *parent)
+{
+       list_del_init(&child->sibling);
+       if (parent)
+               list_add(&child->sibling, &parent->children);
+       child->parent = parent;
+
+       /* now do the debugfs renaming to reattach the child
+          to the proper parent */
 }
 
 /* Propagate rate to children */
@@ -265,17 +212,15 @@ void propagate_rate(struct clk * tclk)
 {
        struct clk *clkp;
 
-       if (tclk == NULL || IS_ERR(tclk))
-               return;
-
-       list_for_each_entry(clkp, &clocks, node) {
-               if (likely(clkp->parent != tclk))
-                       continue;
-               if (likely((u32)clkp->recalc))
-                       clkp->recalc(clkp);
+       list_for_each_entry(clkp, &tclk->children, sibling) {
+               if (clkp->recalc)
+                       clkp->rate = clkp->recalc(clkp);
+               propagate_rate(clkp);
        }
 }
 
+static LIST_HEAD(root_clks);
+
 /**
  * recalculate_root_clocks - recalculate and propagate all root clocks
  *
@@ -287,18 +232,35 @@ void recalculate_root_clocks(void)
 {
        struct clk *clkp;
 
-       list_for_each_entry(clkp, &clocks, node) {
-               if (unlikely(!clkp->parent) && likely((u32)clkp->recalc))
-                       clkp->recalc(clkp);
+       list_for_each_entry(clkp, &root_clks, sibling) {
+               if (clkp->recalc)
+                       clkp->rate = clkp->recalc(clkp);
+               propagate_rate(clkp);
        }
 }
 
+void clk_init_one(struct clk *clk)
+{
+       INIT_LIST_HEAD(&clk->children);
+}
+
 int clk_register(struct clk *clk)
 {
        if (clk == NULL || IS_ERR(clk))
                return -EINVAL;
 
+       /*
+        * trap out already registered clocks
+        */
+       if (clk->node.next || clk->node.prev)
+               return 0;
+
        mutex_lock(&clocks_mutex);
+       if (clk->parent)
+               list_add(&clk->sibling, &clk->parent->children);
+       else
+               list_add(&clk->sibling, &root_clks);
+
        list_add(&clk->node, &clocks);
        if (clk->init)
                clk->init(clk);
@@ -314,39 +276,12 @@ void clk_unregister(struct clk *clk)
                return;
 
        mutex_lock(&clocks_mutex);
+       list_del(&clk->sibling);
        list_del(&clk->node);
        mutex_unlock(&clocks_mutex);
 }
 EXPORT_SYMBOL(clk_unregister);
 
-void clk_deny_idle(struct clk *clk)
-{
-       unsigned long flags;
-
-       if (clk == NULL || IS_ERR(clk))
-               return;
-
-       spin_lock_irqsave(&clockfw_lock, flags);
-       if (arch_clock->clk_deny_idle)
-               arch_clock->clk_deny_idle(clk);
-       spin_unlock_irqrestore(&clockfw_lock, flags);
-}
-EXPORT_SYMBOL(clk_deny_idle);
-
-void clk_allow_idle(struct clk *clk)
-{
-       unsigned long flags;
-
-       if (clk == NULL || IS_ERR(clk))
-               return;
-
-       spin_lock_irqsave(&clockfw_lock, flags);
-       if (arch_clock->clk_allow_idle)
-               arch_clock->clk_allow_idle(clk);
-       spin_unlock_irqrestore(&clockfw_lock, flags);
-}
-EXPORT_SYMBOL(clk_allow_idle);
-
 void clk_enable_init_clocks(void)
 {
        struct clk *clkp;
@@ -358,6 +293,23 @@ void clk_enable_init_clocks(void)
 }
 EXPORT_SYMBOL(clk_enable_init_clocks);
 
+/*
+ * Low level helpers
+ */
+static int clkll_enable_null(struct clk *clk)
+{
+       return 0;
+}
+
+static void clkll_disable_null(struct clk *clk)
+{
+}
+
+const struct clkops clkops_null = {
+       .enable         = clkll_enable_null,
+       .disable        = clkll_disable_null,
+};
+
 #ifdef CONFIG_CPU_FREQ
 void clk_init_cpufreq_table(struct cpufreq_frequency_table **table)
 {
@@ -383,8 +335,10 @@ static int __init clk_disable_unused(void)
        unsigned long flags;
 
        list_for_each_entry(ck, &clocks, node) {
-               if (ck->usecount > 0 || (ck->flags & ALWAYS_ENABLED) ||
-                       ck->enable_reg == 0)
+               if (ck->ops == &clkops_null)
+                       continue;
+
+               if (ck->usecount > 0 || ck->enable_reg == 0)
                        continue;
 
                spin_lock_irqsave(&clockfw_lock, flags);
index 6825fbb5a056d91682c7b3c67e669a9d4fb780aa..d1797147732f217ce4906f5388e55956b7f4f62c 100644 (file)
@@ -245,7 +245,7 @@ static struct omap_globals *omap2_globals;
 static void __init __omap2_set_globals(void)
 {
        omap2_set_globals_tap(omap2_globals);
-       omap2_set_globals_memory(omap2_globals);
+       omap2_set_globals_sdrc(omap2_globals);
        omap2_set_globals_control(omap2_globals);
        omap2_set_globals_prcm(omap2_globals);
 }
index b2690242a3902c0ec43374c1837b2842c65c4e19..843e8af640660bcd24b62aaef2de2c121ca3633b 100644 (file)
 #include <linux/io.h>
 
 #include <mach/hardware.h>
+#include <mach/clock.h>
 #include <asm/system.h>
 
 #define VERY_HI_RATE   900000000
 
+static struct cpufreq_frequency_table *freq_table;
+
 #ifdef CONFIG_ARCH_OMAP1
 #define MPU_CLK                "mpu"
 #else
@@ -39,6 +42,9 @@ static struct clk *mpu_clk;
 
 int omap_verify_speed(struct cpufreq_policy *policy)
 {
+       if (freq_table)
+               return cpufreq_frequency_table_verify(policy, freq_table);
+
        if (policy->cpu)
                return -EINVAL;
 
@@ -70,12 +76,26 @@ static int omap_target(struct cpufreq_policy *policy,
        struct cpufreq_freqs freqs;
        int ret = 0;
 
+       /* Ensure desired rate is within allowed range.  Some govenors
+        * (ondemand) will just pass target_freq=0 to get the minimum. */
+       if (target_freq < policy->cpuinfo.min_freq)
+               target_freq = policy->cpuinfo.min_freq;
+       if (target_freq > policy->cpuinfo.max_freq)
+               target_freq = policy->cpuinfo.max_freq;
+
        freqs.old = omap_getspeed(0);
        freqs.new = clk_round_rate(mpu_clk, target_freq * 1000) / 1000;
        freqs.cpu = 0;
 
+       if (freqs.old == freqs.new)
+               return ret;
+
        cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
-       ret = clk_set_rate(mpu_clk, target_freq * 1000);
+#ifdef CONFIG_CPU_FREQ_DEBUG
+       printk(KERN_DEBUG "cpufreq-omap: transition: %u --> %u\n",
+              freqs.old, freqs.new);
+#endif
+       ret = clk_set_rate(mpu_clk, freqs.new * 1000);
        cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
 
        return ret;
@@ -83,16 +103,31 @@ static int omap_target(struct cpufreq_policy *policy,
 
 static int __init omap_cpu_init(struct cpufreq_policy *policy)
 {
+       int result = 0;
+
        mpu_clk = clk_get(NULL, MPU_CLK);
        if (IS_ERR(mpu_clk))
                return PTR_ERR(mpu_clk);
 
        if (policy->cpu != 0)
                return -EINVAL;
+
        policy->cur = policy->min = policy->max = omap_getspeed(0);
-       policy->cpuinfo.min_freq = clk_round_rate(mpu_clk, 0) / 1000;
-       policy->cpuinfo.max_freq = clk_round_rate(mpu_clk, VERY_HI_RATE) / 1000;
-       policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
+
+       clk_init_cpufreq_table(&freq_table);
+       if (freq_table) {
+               result = cpufreq_frequency_table_cpuinfo(policy, freq_table);
+               if (!result)
+                       cpufreq_frequency_table_get_attr(freq_table,
+                                                       policy->cpu);
+       } else {
+               policy->cpuinfo.min_freq = clk_round_rate(mpu_clk, 0) / 1000;
+               policy->cpuinfo.max_freq = clk_round_rate(mpu_clk,
+                                                       VERY_HI_RATE) / 1000;
+       }
+
+       /* FIXME: what's the actual transition time? */
+       policy->cpuinfo.transition_latency = 10 * 1000 * 1000;
 
        return 0;
 }
@@ -103,6 +138,11 @@ static int omap_cpu_exit(struct cpufreq_policy *policy)
        return 0;
 }
 
+static struct freq_attr *omap_cpufreq_attr[] = {
+       &cpufreq_freq_attr_scaling_available_freqs,
+       NULL,
+};
+
 static struct cpufreq_driver omap_driver = {
        .flags          = CPUFREQ_STICKY,
        .verify         = omap_verify_speed,
@@ -111,6 +151,7 @@ static struct cpufreq_driver omap_driver = {
        .init           = omap_cpu_init,
        .exit           = omap_cpu_exit,
        .name           = "omap",
+       .attr           = omap_cpufreq_attr,
 };
 
 static int __init omap_cpufreq_init(void)
@@ -119,3 +160,11 @@ static int __init omap_cpufreq_init(void)
 }
 
 arch_initcall(omap_cpufreq_init);
+
+/*
+ * if ever we want to remove this, upon cleanup call:
+ *
+ * cpufreq_unregister_driver()
+ * cpufreq_frequency_table_put_attr()
+ */
+
diff --git a/arch/arm/plat-omap/include/mach/clkdev.h b/arch/arm/plat-omap/include/mach/clkdev.h
new file mode 100644 (file)
index 0000000..730c49d
--- /dev/null
@@ -0,0 +1,13 @@
+#ifndef __MACH_CLKDEV_H
+#define __MACH_CLKDEV_H
+
+static inline int __clk_get(struct clk *clk)
+{
+       return 1;
+}
+
+static inline void __clk_put(struct clk *clk)
+{
+}
+
+#endif
index 719298554ed7ebc9647c931db05106e2b6c0e290..073a2c5569f02c16969d95ce72451fa072692055 100644 (file)
@@ -17,11 +17,16 @@ struct module;
 struct clk;
 struct clockdomain;
 
+struct clkops {
+       int                     (*enable)(struct clk *);
+       void                    (*disable)(struct clk *);
+};
+
 #if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)
 
 struct clksel_rate {
-       u8                      div;
        u32                     val;
+       u8                      div;
        u8                      flags;
 };
 
@@ -34,24 +39,28 @@ struct dpll_data {
        void __iomem            *mult_div1_reg;
        u32                     mult_mask;
        u32                     div1_mask;
+       struct clk              *clk_bypass;
+       struct clk              *clk_ref;
+       void __iomem            *control_reg;
+       u32                     enable_mask;
+       unsigned int            rate_tolerance;
+       unsigned long           last_rounded_rate;
        u16                     last_rounded_m;
        u8                      last_rounded_n;
-       unsigned long           last_rounded_rate;
-       unsigned int            rate_tolerance;
-       u16                     max_multiplier;
+       u8                      min_divider;
        u8                      max_divider;
        u32                     max_tolerance;
+       u16                     max_multiplier;
 #  if defined(CONFIG_ARCH_OMAP3)
        u8                      modes;
-       void __iomem            *control_reg;
-       u32                     enable_mask;
+       void __iomem            *autoidle_reg;
+       void __iomem            *idlest_reg;
+       u32                     autoidle_mask;
+       u32                     freqsel_mask;
+       u32                     idlest_mask;
        u8                      auto_recal_bit;
        u8                      recal_en_bit;
        u8                      recal_st_bit;
-       void __iomem            *autoidle_reg;
-       u32                     autoidle_mask;
-       void __iomem            *idlest_reg;
-       u8                      idlest_bit;
 #  endif
 };
 
@@ -59,21 +68,21 @@ struct dpll_data {
 
 struct clk {
        struct list_head        node;
-       struct module           *owner;
+       const struct clkops     *ops;
        const char              *name;
        int                     id;
        struct clk              *parent;
+       struct list_head        children;
+       struct list_head        sibling;        /* node for children */
        unsigned long           rate;
        __u32                   flags;
        void __iomem            *enable_reg;
-       __u8                    enable_bit;
-       __s8                    usecount;
-       void                    (*recalc)(struct clk *);
+       unsigned long           (*recalc)(struct clk *);
        int                     (*set_rate)(struct clk *, unsigned long);
        long                    (*round_rate)(struct clk *, unsigned long);
        void                    (*init)(struct clk *);
-       int                     (*enable)(struct clk *);
-       void                    (*disable)(struct clk *);
+       __u8                    enable_bit;
+       __s8                    usecount;
 #if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)
        u8                      fixed_div;
        void __iomem            *clksel_reg;
@@ -99,7 +108,6 @@ struct clk_functions {
        long            (*clk_round_rate)(struct clk *clk, unsigned long rate);
        int             (*clk_set_rate)(struct clk *clk, unsigned long rate);
        int             (*clk_set_parent)(struct clk *clk, struct clk *parent);
-       struct clk *    (*clk_get_parent)(struct clk *clk);
        void            (*clk_allow_idle)(struct clk *clk);
        void            (*clk_deny_idle)(struct clk *clk);
        void            (*clk_disable_unused)(struct clk *clk);
@@ -110,42 +118,33 @@ struct clk_functions {
 
 extern unsigned int mpurate;
 
-extern int clk_init(struct clk_functions * custom_clocks);
+extern int clk_init(struct clk_functions *custom_clocks);
+extern void clk_init_one(struct clk *clk);
 extern int clk_register(struct clk *clk);
+extern void clk_reparent(struct clk *child, struct clk *parent);
 extern void clk_unregister(struct clk *clk);
 extern void propagate_rate(struct clk *clk);
 extern void recalculate_root_clocks(void);
-extern void followparent_recalc(struct clk * clk);
-extern void clk_allow_idle(struct clk *clk);
-extern void clk_deny_idle(struct clk *clk);
-extern int clk_get_usecount(struct clk *clk);
+extern unsigned long followparent_recalc(struct clk *clk);
 extern void clk_enable_init_clocks(void);
+#ifdef CONFIG_CPU_FREQ
+extern void clk_init_cpufreq_table(struct cpufreq_frequency_table **table);
+#endif
+
+extern const struct clkops clkops_null;
 
 /* Clock flags */
-#define RATE_CKCTL             (1 << 0)        /* Main fixed ratio clocks */
+/* bit 0 is free */
 #define RATE_FIXED             (1 << 1)        /* Fixed clock rate */
-#define RATE_PROPAGATES                (1 << 2)        /* Program children too */
-#define VIRTUAL_CLOCK          (1 << 3)        /* Composite clock from table */
-#define ALWAYS_ENABLED         (1 << 4)        /* Clock cannot be disabled */
+/* bits 2-4 are free */
 #define ENABLE_REG_32BIT       (1 << 5)        /* Use 32-bit access */
-#define VIRTUAL_IO_ADDRESS     (1 << 6)        /* Clock in virtual address */
 #define CLOCK_IDLE_CONTROL     (1 << 7)
 #define CLOCK_NO_IDLE_PARENT   (1 << 8)
 #define DELAYED_APP            (1 << 9)        /* Delay application of clock */
 #define CONFIG_PARTICIPANT     (1 << 10)       /* Fundamental clock */
 #define ENABLE_ON_INIT         (1 << 11)       /* Enable upon framework init */
 #define INVERT_ENABLE           (1 << 12)       /* 0 enables, 1 disables */
-/* bits 13-20 are currently free */
-#define CLOCK_IN_OMAP310       (1 << 21)
-#define CLOCK_IN_OMAP730       (1 << 22)
-#define CLOCK_IN_OMAP1510      (1 << 23)
-#define CLOCK_IN_OMAP16XX      (1 << 24)
-#define CLOCK_IN_OMAP242X      (1 << 25)
-#define CLOCK_IN_OMAP243X      (1 << 26)
-#define CLOCK_IN_OMAP343X      (1 << 27)       /* clocks common to all 343X */
-#define PARENT_CONTROLS_CLOCK  (1 << 28)
-#define CLOCK_IN_OMAP3430ES1   (1 << 29)       /* 3430ES1 clocks only */
-#define CLOCK_IN_OMAP3430ES2   (1 << 30)       /* 3430ES2 clocks only */
+/* bits 13-31 are currently free */
 
 /* Clksel_rate flags */
 #define DEFAULT_RATE           (1 << 0)
@@ -157,9 +156,4 @@ extern void clk_enable_init_clocks(void);
 #define RATE_IN_24XX           (RATE_IN_242X | RATE_IN_243X)
 
 
-/* CM_CLKSEL2_PLL.CORE_CLK_SRC options (24XX) */
-#define CORE_CLK_SRC_32K               0
-#define CORE_CLK_SRC_DPLL              1
-#define CORE_CLK_SRC_DPLL_X2           2
-
 #endif
index 1f51f0173784be2299ecb788e0f6372194275975..b9d0dd2da89b4f4f47378e31157e895639e30d29 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * linux/include/asm-arm/arch-omap/clockdomain.h
+ * arch/arm/plat-omap/include/mach/clockdomain.h
  *
  * OMAP2/3 clockdomain framework functions
  *
  */
 struct clkdm_pwrdm_autodep {
 
-       /* Name of the powerdomain to add a wkdep/sleepdep on */
-       const char *pwrdm_name;
+       union {
+               /* Name of the powerdomain to add a wkdep/sleepdep on */
+               const char *name;
 
-       /* Powerdomain pointer (looked up at clkdm_init() time) */
-       struct powerdomain *pwrdm;
+               /* Powerdomain pointer (looked up at clkdm_init() time) */
+               struct powerdomain *ptr;
+       } pwrdm;
 
        /* OMAP chip types that this clockdomain dep is valid on */
        const struct omap_chip_id omap_chip;
@@ -64,8 +66,13 @@ struct clockdomain {
        /* Clockdomain name */
        const char *name;
 
-       /* Powerdomain enclosing this clockdomain */
-       const char *pwrdm_name;
+       union {
+               /* Powerdomain enclosing this clockdomain */
+               const char *name;
+
+               /* Powerdomain pointer assigned at clkdm_register() */
+               struct powerdomain *ptr;
+       } pwrdm;
 
        /* CLKTRCTRL/AUTOSTATE field mask in CM_CLKSTCTRL reg */
        const u16 clktrctrl_mask;
@@ -79,9 +86,6 @@ struct clockdomain {
        /* Usecount tracking */
        atomic_t usecount;
 
-       /* Powerdomain pointer assigned at clkdm_register() */
-       struct powerdomain *pwrdm;
-
        struct list_head node;
 
 };
index e746ec7e785e30ab17f4cce27e8bc797d49fd6c3..0ecf36deb17b36e1477e2aa7b04139ae09a0f1ad 100644 (file)
@@ -65,7 +65,7 @@ void omap2_set_globals_343x(void);
 
 /* These get called from omap2_set_globals_xxxx(), do not call these */
 void omap2_set_globals_tap(struct omap_globals *);
-void omap2_set_globals_memory(struct omap_globals *);
+void omap2_set_globals_sdrc(struct omap_globals *);
 void omap2_set_globals_control(struct omap_globals *);
 void omap2_set_globals_prcm(struct omap_globals *);
 
index a8e1178a946877e73df2f52f978c22cf79a30786..4166a970daa4e20c2e048d44f5ee2cba079115c1 100644 (file)
@@ -355,13 +355,27 @@ IS_OMAP_TYPE(3430, 0x3430)
  * use omap_chip_is().
  *
  */
-#define CHIP_IS_OMAP2420       (1 << 0)
-#define CHIP_IS_OMAP2430       (1 << 1)
-#define CHIP_IS_OMAP3430       (1 << 2)
-#define CHIP_IS_OMAP3430ES1    (1 << 3)
-#define CHIP_IS_OMAP3430ES2    (1 << 4)
+#define CHIP_IS_OMAP2420               (1 << 0)
+#define CHIP_IS_OMAP2430               (1 << 1)
+#define CHIP_IS_OMAP3430               (1 << 2)
+#define CHIP_IS_OMAP3430ES1            (1 << 3)
+#define CHIP_IS_OMAP3430ES2            (1 << 4)
+#define CHIP_IS_OMAP3430ES3_0          (1 << 5)
+#define CHIP_IS_OMAP3430ES3_1          (1 << 6)
+
+#define CHIP_IS_OMAP24XX               (CHIP_IS_OMAP2420 | CHIP_IS_OMAP2430)
+
+/*
+ * "GE" here represents "greater than or equal to" in terms of ES
+ * levels.  So CHIP_GE_OMAP3430ES2 is intended to match all OMAP3430
+ * chips at ES2 and beyond, but not, for example, any OMAP lines after
+ * OMAP3.
+ */
+#define CHIP_GE_OMAP3430ES2            (CHIP_IS_OMAP3430ES2 | \
+                                        CHIP_IS_OMAP3430ES3_0 | \
+                                        CHIP_IS_OMAP3430ES3_1)
+#define CHIP_GE_OMAP3430ES3_1          (CHIP_IS_OMAP3430ES3_1)
 
-#define CHIP_IS_OMAP24XX       (CHIP_IS_OMAP2420 | CHIP_IS_OMAP2430)
 
 int omap_chip_is(struct omap_chip_id oci);
 int omap_type(void);
index 45b678439bb70704b141dc823d0af33ec7237658..921b16532ff55c4e28301cb5bcce975de546a70b 100644 (file)
@@ -103,6 +103,6 @@ extern int gpmc_cs_request(int cs, unsigned long size, unsigned long *base);
 extern void gpmc_cs_free(int cs);
 extern int gpmc_cs_set_reserved(int cs, int reserved);
 extern int gpmc_cs_reserved(int cs);
-extern void gpmc_init(void);
+extern void __init gpmc_init(void);
 
 #endif
index d92bf7964481c5f39dffeeea8f2be507e1ec2065..0610d7e2b3d736cb5a0bc37a18b416162005055f 100644 (file)
 #define omap_writew(v,a)       __raw_writew(v, IO_ADDRESS(a))
 #define omap_writel(v,a)       __raw_writel(v, IO_ADDRESS(a))
 
+struct omap_sdrc_params;
+
 extern void omap1_map_common_io(void);
 extern void omap1_init_common_hw(void);
 
 extern void omap2_map_common_io(void);
-extern void omap2_init_common_hw(void);
+extern void omap2_init_common_hw(struct omap_sdrc_params *sp);
 
 #define __arch_ioremap(p,s,t)  omap_ioremap(p,s,t)
 #define __arch_iounmap(v)      omap_iounmap(v)
index 113c2466c86a7d789fa5316118dfa4fc2a02941b..bb154ea76769509a7937c4ba472e8d04c5bf41d3 100644 (file)
@@ -344,8 +344,6 @@ struct omap_mcbsp_platform_data {
        u8 dma_rx_sync, dma_tx_sync;
        u16 rx_irq, tx_irq;
        struct omap_mcbsp_ops *ops;
-       char const **clk_names;
-       int num_clks;
 };
 
 struct omap_mcbsp {
@@ -377,8 +375,8 @@ struct omap_mcbsp {
        /* Protect the field .free, while checking if the mcbsp is in use */
        spinlock_t lock;
        struct omap_mcbsp_platform_data *pdata;
-       struct clk **clks;
-       int num_clks;
+       struct clk *iclk;
+       struct clk *fclk;
 };
 extern struct omap_mcbsp **mcbsp_ptr;
 extern int omap_mcbsp_count;
index d6b5ca6c7da20bf7790cd8497616aa1d6f4cc66f..99ed564d92774fe3d91e67f43a479ef6a21198d8 100644 (file)
 #define lbus_to_virt(x)                ((x) - OMAP1510_LB_OFFSET + PAGE_OFFSET)
 #define is_lbus_device(dev)    (cpu_is_omap15xx() && dev && (strncmp(dev_name(dev), "ohci", 4) == 0))
 
-#define __arch_page_to_dma(dev, page)  ({is_lbus_device(dev) ? \
-                                       (dma_addr_t)virt_to_lbus(page_address(page)) : \
-                                       (dma_addr_t)__virt_to_phys(page_address(page));})
+#define __arch_page_to_dma(dev, page)  \
+       ({ dma_addr_t __dma = page_to_phys(page); \
+          if (is_lbus_device(dev)) \
+               __dma = __dma - PHYS_OFFSET + OMAP1510_LB_OFFSET; \
+          __dma; })
 
 #define __arch_dma_to_virt(dev, addr)  ({ (void *) (is_lbus_device(dev) ? \
                                                lbus_to_virt(addr) : \
index 37e2f0f38b462bb803bd6615dc6c070909993a40..ce6ee7927537f1bcb23014387194a64f44978b64 100644 (file)
 extern void prevent_idle_sleep(void);
 extern void allow_idle_sleep(void);
 
-/**
- * clk_deny_idle - Prevents the clock from being idled during MPU idle
- * @clk: clock signal handle
- */
-void clk_deny_idle(struct clk *clk);
-
-/**
- * clk_allow_idle - Counters previous clk_deny_idle
- * @clk: clock signal handle
- */
-void clk_allow_idle(struct clk *clk);
-
 extern void omap_pm_idle(void);
 extern void omap_pm_suspend(void);
 extern void omap730_cpu_suspend(unsigned short, unsigned short);
index 2806a9c8e4d78ffa289c1a1ade647a73d05caa2a..69c9e675d8ee48d2dfbf488a03068011e55e657d 100644 (file)
@@ -50,9 +50,9 @@
 
 /*
  * Maximum number of clockdomains that can be associated with a powerdomain.
- * CORE powerdomain is probably the worst case.
+ * CORE powerdomain on OMAP3 is the worst case
  */
-#define PWRDM_MAX_CLKDMS       3
+#define PWRDM_MAX_CLKDMS       4
 
 /* XXX A completely arbitrary number. What is reasonable here? */
 #define PWRDM_TRANSITION_BAILOUT 100000
@@ -145,6 +145,7 @@ int pwrdm_get_mem_bank_count(struct powerdomain *pwrdm);
 
 int pwrdm_set_next_pwrst(struct powerdomain *pwrdm, u8 pwrst);
 int pwrdm_read_next_pwrst(struct powerdomain *pwrdm);
+int pwrdm_read_pwrst(struct powerdomain *pwrdm);
 int pwrdm_read_prev_pwrst(struct powerdomain *pwrdm);
 int pwrdm_clear_all_prev_pwrst(struct powerdomain *pwrdm);
 
index 56eba0fd6f6a3db715397622a14009736158afd7..24ac3c7159126eda9a7e88d00158fdc14713f704 100644 (file)
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  */
 
-#ifndef __ASM_ARM_ARCH_DPM_PRCM_H
-#define __ASM_ARM_ARCH_DPM_PRCM_H
+#ifndef __ASM_ARM_ARCH_OMAP_PRCM_H
+#define __ASM_ARM_ARCH_OMAP_PRCM_H
 
 u32 omap_prcm_get_reset_sources(void);
+void omap_prcm_arch_reset(char mode);
 
 #endif
 
index a98c6c3beb2ce1a8d02a6f302a5323989381fe5d..adc73522491fe03e75d7617ce94401d6c92c001b 100644 (file)
@@ -4,10 +4,12 @@
 /*
  * OMAP2/3 SDRC/SMS register definitions
  *
- * Copyright (C) 2007 Texas Instruments, Inc.
- * Copyright (C) 2007 Nokia Corporation
+ * Copyright (C) 2007-2008 Texas Instruments, Inc.
+ * Copyright (C) 2007-2008 Nokia Corporation
  *
- * Written by Paul Walmsley
+ * Tony Lindgren
+ * Paul Walmsley
+ * Richard Woodruff
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
  * SMS register access
  */
 
-
-#define OMAP242X_SMS_REGADDR(reg)      IO_ADDRESS(OMAP2420_SMS_BASE + reg)
-#define OMAP243X_SMS_REGADDR(reg)      IO_ADDRESS(OMAP243X_SMS_BASE + reg)
-#define OMAP343X_SMS_REGADDR(reg)      IO_ADDRESS(OMAP343X_SMS_BASE + reg)
+#define OMAP242X_SMS_REGADDR(reg)                                      \
+                       (void __iomem *)IO_ADDRESS(OMAP2420_SMS_BASE + reg)
+#define OMAP243X_SMS_REGADDR(reg)                                      \
+                       (void __iomem *)IO_ADDRESS(OMAP243X_SMS_BASE + reg)
+#define OMAP343X_SMS_REGADDR(reg)                                      \
+                       (void __iomem *)IO_ADDRESS(OMAP343X_SMS_BASE + reg)
 
 /* SMS register offsets - read/write with sms_{read,write}_reg() */
 
 #define SMS_SYSCONFIG          0x010
 /* REVISIT: fill in other SMS registers here */
 
+
+#ifndef __ASSEMBLER__
+
+/**
+ * struct omap_sdrc_params - SDRC parameters for a given SDRC clock rate
+ * @rate: SDRC clock rate (in Hz)
+ * @actim_ctrla: Value to program to SDRC_ACTIM_CTRLA for this rate
+ * @actim_ctrlb: Value to program to SDRC_ACTIM_CTRLB for this rate
+ * @rfr_ctrl: Value to program to SDRC_RFR_CTRL for this rate
+ * @mr: Value to program to SDRC_MR for this rate
+ *
+ * This structure holds a pre-computed set of register values for the
+ * SDRC for a given SDRC clock rate and SDRAM chip.  These are
+ * intended to be pre-computed and specified in an array in the board-*.c
+ * files.  The structure is keyed off the 'rate' field.
+ */
+struct omap_sdrc_params {
+       unsigned long rate;
+       u32 actim_ctrla;
+       u32 actim_ctrlb;
+       u32 rfr_ctrl;
+       u32 mr;
+};
+
+void __init omap2_sdrc_init(struct omap_sdrc_params *sp);
+struct omap_sdrc_params *omap2_sdrc_get_params(unsigned long r);
+
+#ifdef CONFIG_ARCH_OMAP2
+
+struct memory_timings {
+       u32 m_type;             /* ddr = 1, sdr = 0 */
+       u32 dll_mode;           /* use lock mode = 1, unlock mode = 0 */
+       u32 slow_dll_ctrl;      /* unlock mode, dll value for slow speed */
+       u32 fast_dll_ctrl;      /* unlock mode, dll value for fast speed */
+       u32 base_cs;            /* base chip select to use for calculations */
+};
+
+extern void omap2xxx_sdrc_init_params(u32 force_lock_to_unlock_mode);
+
+u32 omap2xxx_sdrc_dll_is_unlocked(void);
+u32 omap2xxx_sdrc_reprogram(u32 level, u32 force);
+
+#endif  /* CONFIG_ARCH_OMAP2 */
+
+#endif  /* __ASSEMBLER__ */
+
 #endif
index 06923f261545c268852f308ae73cb30b4546aa32..cb8c0ef30fba8e447288bffbbf9f1d85f7c3f363 100644 (file)
@@ -9,12 +9,12 @@
 #include <asm/mach-types.h>
 #include <mach/hardware.h>
 
+#include <mach/prcm.h>
+
 #ifndef CONFIG_MACH_VOICEBLUE
 #define voiceblue_reset()              do {} while (0)
 #endif
 
-extern void omap_prcm_arch_reset(char mode);
-
 static inline void arch_idle(void)
 {
        cpu_do_idle();
@@ -38,7 +38,7 @@ static inline void omap1_arch_reset(char mode)
                omap_writew(1, ARM_RSTCT1);
 }
 
-static inline void arch_reset(char mode)
+static inline void arch_reset(char mode, const char *cmd)
 {
        if (!cpu_class_is_omap2())
                omap1_arch_reset(mode);
index e5842e30e534485b6a1c5faa11bbd9ce2de94272..28b0a824b8cfa1bff4f7d2b4ea27cd494bd1bfbe 100644 (file)
@@ -214,7 +214,6 @@ EXPORT_SYMBOL(omap_mcbsp_set_io_type);
 int omap_mcbsp_request(unsigned int id)
 {
        struct omap_mcbsp *mcbsp;
-       int i;
        int err;
 
        if (!omap_mcbsp_check_valid_id(id)) {
@@ -223,23 +222,23 @@ int omap_mcbsp_request(unsigned int id)
        }
        mcbsp = id_to_mcbsp_ptr(id);
 
-       if (mcbsp->pdata && mcbsp->pdata->ops && mcbsp->pdata->ops->request)
-               mcbsp->pdata->ops->request(id);
-
-       for (i = 0; i < mcbsp->num_clks; i++)
-               clk_enable(mcbsp->clks[i]);
-
        spin_lock(&mcbsp->lock);
        if (!mcbsp->free) {
                dev_err(mcbsp->dev, "McBSP%d is currently in use\n",
                        mcbsp->id);
                spin_unlock(&mcbsp->lock);
-               return -1;
+               return -EBUSY;
        }
 
        mcbsp->free = 0;
        spin_unlock(&mcbsp->lock);
 
+       if (mcbsp->pdata && mcbsp->pdata->ops && mcbsp->pdata->ops->request)
+               mcbsp->pdata->ops->request(id);
+
+       clk_enable(mcbsp->iclk);
+       clk_enable(mcbsp->fclk);
+
        /*
         * Make sure that transmitter, receiver and sample-rate generator are
         * not running before activating IRQs.
@@ -278,7 +277,6 @@ EXPORT_SYMBOL(omap_mcbsp_request);
 void omap_mcbsp_free(unsigned int id)
 {
        struct omap_mcbsp *mcbsp;
-       int i;
 
        if (!omap_mcbsp_check_valid_id(id)) {
                printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
@@ -289,8 +287,14 @@ void omap_mcbsp_free(unsigned int id)
        if (mcbsp->pdata && mcbsp->pdata->ops && mcbsp->pdata->ops->free)
                mcbsp->pdata->ops->free(id);
 
-       for (i = mcbsp->num_clks - 1; i >= 0; i--)
-               clk_disable(mcbsp->clks[i]);
+       clk_disable(mcbsp->fclk);
+       clk_disable(mcbsp->iclk);
+
+       if (mcbsp->io_type == OMAP_MCBSP_IRQ_IO) {
+               /* Free IRQs */
+               free_irq(mcbsp->rx_irq, (void *)mcbsp);
+               free_irq(mcbsp->tx_irq, (void *)mcbsp);
+       }
 
        spin_lock(&mcbsp->lock);
        if (mcbsp->free) {
@@ -302,12 +306,6 @@ void omap_mcbsp_free(unsigned int id)
 
        mcbsp->free = 1;
        spin_unlock(&mcbsp->lock);
-
-       if (mcbsp->io_type == OMAP_MCBSP_IRQ_IO) {
-               /* Free IRQs */
-               free_irq(mcbsp->rx_irq, (void *)mcbsp);
-               free_irq(mcbsp->tx_irq, (void *)mcbsp);
-       }
 }
 EXPORT_SYMBOL(omap_mcbsp_free);
 
@@ -876,7 +874,6 @@ static int __devinit omap_mcbsp_probe(struct platform_device *pdev)
        struct omap_mcbsp_platform_data *pdata = pdev->dev.platform_data;
        struct omap_mcbsp *mcbsp;
        int id = pdev->id - 1;
-       int i;
        int ret = 0;
 
        if (!pdata) {
@@ -899,7 +896,6 @@ static int __devinit omap_mcbsp_probe(struct platform_device *pdev)
                ret = -ENOMEM;
                goto exit;
        }
-       mcbsp_ptr[id] = mcbsp;
 
        spin_lock_init(&mcbsp->lock);
        mcbsp->id = id + 1;
@@ -921,39 +917,32 @@ static int __devinit omap_mcbsp_probe(struct platform_device *pdev)
        mcbsp->dma_rx_sync = pdata->dma_rx_sync;
        mcbsp->dma_tx_sync = pdata->dma_tx_sync;
 
-       if (pdata->num_clks) {
-               mcbsp->num_clks = pdata->num_clks;
-               mcbsp->clks = kzalloc(mcbsp->num_clks * sizeof(struct clk *),
-                                       GFP_KERNEL);
-               if (!mcbsp->clks) {
-                       ret = -ENOMEM;
-                       goto exit;
-               }
-               for (i = 0; i < mcbsp->num_clks; i++) {
-                       mcbsp->clks[i] = clk_get(&pdev->dev, pdata->clk_names[i]);
-                       if (IS_ERR(mcbsp->clks[i])) {
-                               dev_err(&pdev->dev,
-                                       "Invalid %s configuration for McBSP%d.\n",
-                                       pdata->clk_names[i], mcbsp->id);
-                               ret = PTR_ERR(mcbsp->clks[i]);
-                               goto err_clk;
-                       }
-               }
+       mcbsp->iclk = clk_get(&pdev->dev, "ick");
+       if (IS_ERR(mcbsp->iclk)) {
+               ret = PTR_ERR(mcbsp->iclk);
+               dev_err(&pdev->dev, "unable to get ick: %d\n", ret);
+               goto err_iclk;
+       }
 
+       mcbsp->fclk = clk_get(&pdev->dev, "fck");
+       if (IS_ERR(mcbsp->fclk)) {
+               ret = PTR_ERR(mcbsp->fclk);
+               dev_err(&pdev->dev, "unable to get fck: %d\n", ret);
+               goto err_fclk;
        }
 
        mcbsp->pdata = pdata;
        mcbsp->dev = &pdev->dev;
+       mcbsp_ptr[id] = mcbsp;
        platform_set_drvdata(pdev, mcbsp);
        return 0;
 
-err_clk:
-       while (i--)
-               clk_put(mcbsp->clks[i]);
-       kfree(mcbsp->clks);
+err_fclk:
+       clk_put(mcbsp->iclk);
+err_iclk:
        iounmap(mcbsp->io_base);
 err_ioremap:
-       mcbsp->free = 0;
+       kfree(mcbsp);
 exit:
        return ret;
 }
@@ -961,7 +950,6 @@ exit:
 static int __devexit omap_mcbsp_remove(struct platform_device *pdev)
 {
        struct omap_mcbsp *mcbsp = platform_get_drvdata(pdev);
-       int i;
 
        platform_set_drvdata(pdev, NULL);
        if (mcbsp) {
@@ -970,18 +958,15 @@ static int __devexit omap_mcbsp_remove(struct platform_device *pdev)
                                mcbsp->pdata->ops->free)
                        mcbsp->pdata->ops->free(mcbsp->id);
 
-               for (i = mcbsp->num_clks - 1; i >= 0; i--) {
-                       clk_disable(mcbsp->clks[i]);
-                       clk_put(mcbsp->clks[i]);
-               }
+               clk_disable(mcbsp->fclk);
+               clk_disable(mcbsp->iclk);
+               clk_put(mcbsp->fclk);
+               clk_put(mcbsp->iclk);
 
                iounmap(mcbsp->io_base);
 
-               if (mcbsp->num_clks) {
-                       kfree(mcbsp->clks);
-                       mcbsp->clks = NULL;
-                       mcbsp->num_clks = 0;
-               }
+               mcbsp->fclk = NULL;
+               mcbsp->iclk = NULL;
                mcbsp->free = 0;
                mcbsp->dev = NULL;
        }
@@ -1002,4 +987,3 @@ int __init omap_mcbsp_init(void)
        /* Register the McBSP driver */
        return platform_driver_register(&omap_mcbsp_driver);
 }
-
diff --git a/arch/arm/plat-pxa/Kconfig b/arch/arm/plat-pxa/Kconfig
new file mode 100644 (file)
index 0000000..b158e98
--- /dev/null
@@ -0,0 +1,3 @@
+if PLAT_PXA
+
+endif
diff --git a/arch/arm/plat-pxa/Makefile b/arch/arm/plat-pxa/Makefile
new file mode 100644 (file)
index 0000000..4be3723
--- /dev/null
@@ -0,0 +1,7 @@
+#
+# Makefile for code common across different PXA processor families
+#
+
+obj-y  := dma.o mfp.o
+
+obj-$(CONFIG_GENERIC_GPIO)     += gpio.o
similarity index 93%
rename from arch/arm/mach-pxa/dma.c
rename to arch/arm/plat-pxa/dma.c
index 7de17fc5d54b2b219975d2ed90faa4615b648eac..70aeee407f7d6d537a9bfc2f24fb25c16f46eab4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/mach-pxa/dma.c
+ *  linux/arch/arm/plat-pxa/dma.c
  *
  *  PXA DMA registration and IRQ dispatching
  *
@@ -23,8 +23,6 @@
 #include <mach/hardware.h>
 #include <mach/dma.h>
 
-#include <mach/pxa-regs.h>
-
 struct dma_channel {
        char *name;
        pxa_dma_prio prio;
@@ -36,8 +34,8 @@ static struct dma_channel *dma_channels;
 static int num_dma_channels;
 
 int pxa_request_dma (char *name, pxa_dma_prio prio,
-                        void (*irq_handler)(int, void *),
-                        void *data)
+                       void (*irq_handler)(int, void *),
+                       void *data)
 {
        unsigned long flags;
        int i, found = 0;
@@ -113,7 +111,7 @@ static irqreturn_t dma_irq_handler(int irq, void *dev_id)
        return IRQ_HANDLED;
 }
 
-int __init pxa_init_dma(int num_ch)
+int __init pxa_init_dma(int irq, int num_ch)
 {
        int i, ret;
 
@@ -131,7 +129,7 @@ int __init pxa_init_dma(int num_ch)
                dma_channels[i].prio = min((i & 0xf) >> 2, DMA_PRIO_LOW);
        }
 
-       ret = request_irq(IRQ_DMA, dma_irq_handler, IRQF_DISABLED, "DMA", NULL);
+       ret = request_irq(irq, dma_irq_handler, IRQF_DISABLED, "DMA", NULL);
        if (ret) {
                printk (KERN_CRIT "Wow!  Can't register IRQ for DMA\n");
                kfree(dma_channels);
diff --git a/arch/arm/plat-pxa/gpio.c b/arch/arm/plat-pxa/gpio.c
new file mode 100644 (file)
index 0000000..af819bf
--- /dev/null
@@ -0,0 +1,337 @@
+/*
+ *  linux/arch/arm/plat-pxa/gpio.c
+ *
+ *  Generic PXA GPIO handling
+ *
+ *  Author:    Nicolas Pitre
+ *  Created:   Jun 15, 2001
+ *  Copyright: MontaVista Software Inc.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ */
+
+#include <linux/init.h>
+#include <linux/irq.h>
+#include <linux/io.h>
+#include <linux/sysdev.h>
+#include <linux/bootmem.h>
+
+#include <mach/gpio.h>
+
+int pxa_last_gpio;
+
+struct pxa_gpio_chip {
+       struct gpio_chip chip;
+       void __iomem    *regbase;
+       char label[10];
+
+       unsigned long   irq_mask;
+       unsigned long   irq_edge_rise;
+       unsigned long   irq_edge_fall;
+
+#ifdef CONFIG_PM
+       unsigned long   saved_gplr;
+       unsigned long   saved_gpdr;
+       unsigned long   saved_grer;
+       unsigned long   saved_gfer;
+#endif
+};
+
+static DEFINE_SPINLOCK(gpio_lock);
+static struct pxa_gpio_chip *pxa_gpio_chips;
+
+#define for_each_gpio_chip(i, c)                       \
+       for (i = 0, c = &pxa_gpio_chips[0]; i <= pxa_last_gpio; i += 32, c++)
+
+static inline void __iomem *gpio_chip_base(struct gpio_chip *c)
+{
+       return container_of(c, struct pxa_gpio_chip, chip)->regbase;
+}
+
+static inline struct pxa_gpio_chip *gpio_to_chip(unsigned gpio)
+{
+       return &pxa_gpio_chips[gpio_to_bank(gpio)];
+}
+
+static int pxa_gpio_direction_input(struct gpio_chip *chip, unsigned offset)
+{
+       void __iomem *base = gpio_chip_base(chip);
+       uint32_t value, mask = 1 << offset;
+       unsigned long flags;
+
+       spin_lock_irqsave(&gpio_lock, flags);
+
+       value = __raw_readl(base + GPDR_OFFSET);
+       if (__gpio_is_inverted(chip->base + offset))
+               value |= mask;
+       else
+               value &= ~mask;
+       __raw_writel(value, base + GPDR_OFFSET);
+
+       spin_unlock_irqrestore(&gpio_lock, flags);
+       return 0;
+}
+
+static int pxa_gpio_direction_output(struct gpio_chip *chip,
+                                    unsigned offset, int value)
+{
+       void __iomem *base = gpio_chip_base(chip);
+       uint32_t tmp, mask = 1 << offset;
+       unsigned long flags;
+
+       __raw_writel(mask, base + (value ? GPSR_OFFSET : GPCR_OFFSET));
+
+       spin_lock_irqsave(&gpio_lock, flags);
+
+       tmp = __raw_readl(base + GPDR_OFFSET);
+       if (__gpio_is_inverted(chip->base + offset))
+               tmp &= ~mask;
+       else
+               tmp |= mask;
+       __raw_writel(tmp, base + GPDR_OFFSET);
+
+       spin_unlock_irqrestore(&gpio_lock, flags);
+       return 0;
+}
+
+static int pxa_gpio_get(struct gpio_chip *chip, unsigned offset)
+{
+       return __raw_readl(gpio_chip_base(chip) + GPLR_OFFSET) & (1 << offset);
+}
+
+static void pxa_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
+{
+       __raw_writel(1 << offset, gpio_chip_base(chip) +
+                               (value ? GPSR_OFFSET : GPCR_OFFSET));
+}
+
+static int __init pxa_init_gpio_chip(int gpio_end)
+{
+       int i, gpio, nbanks = gpio_to_bank(gpio_end) + 1;
+       struct pxa_gpio_chip *chips;
+
+       /* this is early, we have to use bootmem allocator, and we really
+        * want this to be allocated dynamically for different 'gpio_end'
+        */
+       chips = alloc_bootmem_low(nbanks * sizeof(struct pxa_gpio_chip));
+       if (chips == NULL) {
+               pr_err("%s: failed to allocate GPIO chips\n", __func__);
+               return -ENOMEM;
+       }
+
+       for (i = 0, gpio = 0; i < nbanks; i++, gpio += 32) {
+               struct gpio_chip *c = &chips[i].chip;
+
+               sprintf(chips[i].label, "gpio-%d", i);
+               chips[i].regbase = (void __iomem *)GPIO_BANK(i);
+
+               c->base  = gpio;
+               c->label = chips[i].label;
+
+               c->direction_input  = pxa_gpio_direction_input;
+               c->direction_output = pxa_gpio_direction_output;
+               c->get = pxa_gpio_get;
+               c->set = pxa_gpio_set;
+
+               /* number of GPIOs on last bank may be less than 32 */
+               c->ngpio = (gpio + 31 > gpio_end) ? (gpio_end - gpio + 1) : 32;
+               gpiochip_add(c);
+       }
+       pxa_gpio_chips = chips;
+       return 0;
+}
+
+static int pxa_gpio_irq_type(unsigned int irq, unsigned int type)
+{
+       struct pxa_gpio_chip *c;
+       int gpio = irq_to_gpio(irq);
+       unsigned long gpdr, mask = GPIO_bit(gpio);
+
+       c = gpio_to_chip(gpio);
+
+       if (type == IRQ_TYPE_PROBE) {
+               /* Don't mess with enabled GPIOs using preconfigured edges or
+                * GPIOs set to alternate function or to output during probe
+                */
+               if ((c->irq_edge_rise | c->irq_edge_fall) & GPIO_bit(gpio))
+                       return 0;
+
+               if (__gpio_is_occupied(gpio))
+                       return 0;
+
+               type = IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING;
+       }
+
+       gpdr = __raw_readl(c->regbase + GPDR_OFFSET);
+
+       if (__gpio_is_inverted(gpio))
+               __raw_writel(gpdr | mask,  c->regbase + GPDR_OFFSET);
+       else
+               __raw_writel(gpdr & ~mask, c->regbase + GPDR_OFFSET);
+
+       if (type & IRQ_TYPE_EDGE_RISING)
+               c->irq_edge_rise |= mask;
+       else
+               c->irq_edge_rise &= ~mask;
+
+       if (type & IRQ_TYPE_EDGE_FALLING)
+               c->irq_edge_fall |= mask;
+       else
+               c->irq_edge_fall &= ~mask;
+
+       __raw_writel(c->irq_edge_rise & c->irq_mask, c->regbase + GRER_OFFSET);
+       __raw_writel(c->irq_edge_fall & c->irq_mask, c->regbase + GFER_OFFSET);
+
+       pr_debug("%s: IRQ%d (GPIO%d) - edge%s%s\n", __func__, irq, gpio,
+               ((type & IRQ_TYPE_EDGE_RISING)  ? " rising"  : ""),
+               ((type & IRQ_TYPE_EDGE_FALLING) ? " falling" : ""));
+       return 0;
+}
+
+static void pxa_gpio_demux_handler(unsigned int irq, struct irq_desc *desc)
+{
+       struct pxa_gpio_chip *c;
+       int loop, gpio, gpio_base, n;
+       unsigned long gedr;
+
+       do {
+               loop = 0;
+               for_each_gpio_chip(gpio, c) {
+                       gpio_base = c->chip.base;
+
+                       gedr = __raw_readl(c->regbase + GEDR_OFFSET);
+                       gedr = gedr & c->irq_mask;
+                       __raw_writel(gedr, c->regbase + GEDR_OFFSET);
+
+                       n = find_first_bit(&gedr, BITS_PER_LONG);
+                       while (n < BITS_PER_LONG) {
+                               loop = 1;
+
+                               generic_handle_irq(gpio_to_irq(gpio_base + n));
+                               n = find_next_bit(&gedr, BITS_PER_LONG, n + 1);
+                       }
+               }
+       } while (loop);
+}
+
+static void pxa_ack_muxed_gpio(unsigned int irq)
+{
+       int gpio = irq_to_gpio(irq);
+       struct pxa_gpio_chip *c = gpio_to_chip(gpio);
+
+       __raw_writel(GPIO_bit(gpio), c->regbase + GEDR_OFFSET);
+}
+
+static void pxa_mask_muxed_gpio(unsigned int irq)
+{
+       int gpio = irq_to_gpio(irq);
+       struct pxa_gpio_chip *c = gpio_to_chip(gpio);
+       uint32_t grer, gfer;
+
+       c->irq_mask &= ~GPIO_bit(gpio);
+
+       grer = __raw_readl(c->regbase + GRER_OFFSET) & ~GPIO_bit(gpio);
+       gfer = __raw_readl(c->regbase + GFER_OFFSET) & ~GPIO_bit(gpio);
+       __raw_writel(grer, c->regbase + GRER_OFFSET);
+       __raw_writel(gfer, c->regbase + GFER_OFFSET);
+}
+
+static void pxa_unmask_muxed_gpio(unsigned int irq)
+{
+       int gpio = irq_to_gpio(irq);
+       struct pxa_gpio_chip *c = gpio_to_chip(gpio);
+
+       c->irq_mask |= GPIO_bit(gpio);
+       __raw_writel(c->irq_edge_rise & c->irq_mask, c->regbase + GRER_OFFSET);
+       __raw_writel(c->irq_edge_fall & c->irq_mask, c->regbase + GFER_OFFSET);
+}
+
+static struct irq_chip pxa_muxed_gpio_chip = {
+       .name           = "GPIO",
+       .ack            = pxa_ack_muxed_gpio,
+       .mask           = pxa_mask_muxed_gpio,
+       .unmask         = pxa_unmask_muxed_gpio,
+       .set_type       = pxa_gpio_irq_type,
+};
+
+void __init pxa_init_gpio(int mux_irq, int start, int end, set_wake_t fn)
+{
+       struct pxa_gpio_chip *c;
+       int gpio, irq;
+
+       pxa_last_gpio = end;
+
+       /* Initialize GPIO chips */
+       pxa_init_gpio_chip(end);
+
+       /* clear all GPIO edge detects */
+       for_each_gpio_chip(gpio, c) {
+               __raw_writel(0, c->regbase + GFER_OFFSET);
+               __raw_writel(0, c->regbase + GRER_OFFSET);
+               __raw_writel(~0,c->regbase + GEDR_OFFSET);
+       }
+
+       for (irq  = gpio_to_irq(start); irq <= gpio_to_irq(end); irq++) {
+               set_irq_chip(irq, &pxa_muxed_gpio_chip);
+               set_irq_handler(irq, handle_edge_irq);
+               set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+       }
+
+       /* Install handler for GPIO>=2 edge detect interrupts */
+       set_irq_chained_handler(mux_irq, pxa_gpio_demux_handler);
+       pxa_muxed_gpio_chip.set_wake = fn;
+}
+
+#ifdef CONFIG_PM
+static int pxa_gpio_suspend(struct sys_device *dev, pm_message_t state)
+{
+       struct pxa_gpio_chip *c;
+       int gpio;
+
+       for_each_gpio_chip(gpio, c) {
+               c->saved_gplr = __raw_readl(c->regbase + GPLR_OFFSET);
+               c->saved_gpdr = __raw_readl(c->regbase + GPDR_OFFSET);
+               c->saved_grer = __raw_readl(c->regbase + GRER_OFFSET);
+               c->saved_gfer = __raw_readl(c->regbase + GFER_OFFSET);
+
+               /* Clear GPIO transition detect bits */
+               __raw_writel(0xffffffff, c->regbase + GEDR_OFFSET);
+       }
+       return 0;
+}
+
+static int pxa_gpio_resume(struct sys_device *dev)
+{
+       struct pxa_gpio_chip *c;
+       int gpio;
+
+       for_each_gpio_chip(gpio, c) {
+               /* restore level with set/clear */
+               __raw_writel( c->saved_gplr, c->regbase + GPSR_OFFSET);
+               __raw_writel(~c->saved_gplr, c->regbase + GPCR_OFFSET);
+
+               __raw_writel(c->saved_grer, c->regbase + GRER_OFFSET);
+               __raw_writel(c->saved_gfer, c->regbase + GFER_OFFSET);
+               __raw_writel(c->saved_gpdr, c->regbase + GPDR_OFFSET);
+       }
+       return 0;
+}
+#else
+#define pxa_gpio_suspend       NULL
+#define pxa_gpio_resume                NULL
+#endif
+
+struct sysdev_class pxa_gpio_sysclass = {
+       .name           = "gpio",
+       .suspend        = pxa_gpio_suspend,
+       .resume         = pxa_gpio_resume,
+};
+
+static int __init pxa_gpio_init(void)
+{
+       return sysdev_class_register(&pxa_gpio_sysclass);
+}
+
+core_initcall(pxa_gpio_init);
diff --git a/arch/arm/plat-pxa/include/plat/dma.h b/arch/arm/plat-pxa/include/plat/dma.h
new file mode 100644 (file)
index 0000000..a7b91dc
--- /dev/null
@@ -0,0 +1,85 @@
+#ifndef __PLAT_DMA_H
+#define __PLAT_DMA_H
+
+#define DMAC_REG(x)    (*((volatile u32 *)(DMAC_REGS_VIRT + (x))))
+
+#define DCSR(n)                DMAC_REG((n) << 2)
+#define DALGN          DMAC_REG(0x00a0)  /* DMA Alignment Register */
+#define DINT           DMAC_REG(0x00f0)  /* DMA Interrupt Register */
+#define DDADR(n)       DMAC_REG(0x0200 + ((n) << 4))
+#define DSADR(n)       DMAC_REG(0x0204 + ((n) << 4))
+#define DTADR(n)       DMAC_REG(0x0208 + ((n) << 4))
+#define DCMD(n)                DMAC_REG(0x020c + ((n) << 4))
+#define DRCMR(n)       DMAC_REG((((n) < 64) ? 0x0100 : 0x1100) + \
+                                (((n) & 0x3f) << 2))
+
+#define DCSR_RUN       (1 << 31)       /* Run Bit (read / write) */
+#define DCSR_NODESC    (1 << 30)       /* No-Descriptor Fetch (read / write) */
+#define DCSR_STOPIRQEN (1 << 29)       /* Stop Interrupt Enable (read / write) */
+#define DCSR_REQPEND   (1 << 8)        /* Request Pending (read-only) */
+#define DCSR_STOPSTATE (1 << 3)        /* Stop State (read-only) */
+#define DCSR_ENDINTR   (1 << 2)        /* End Interrupt (read / write) */
+#define DCSR_STARTINTR (1 << 1)        /* Start Interrupt (read / write) */
+#define DCSR_BUSERR    (1 << 0)        /* Bus Error Interrupt (read / write) */
+
+#define DCSR_EORIRQEN  (1 << 28)       /* End of Receive Interrupt Enable (R/W) */
+#define DCSR_EORJMPEN  (1 << 27)       /* Jump to next descriptor on EOR */
+#define DCSR_EORSTOPEN (1 << 26)       /* STOP on an EOR */
+#define DCSR_SETCMPST  (1 << 25)       /* Set Descriptor Compare Status */
+#define DCSR_CLRCMPST  (1 << 24)       /* Clear Descriptor Compare Status */
+#define DCSR_CMPST     (1 << 10)       /* The Descriptor Compare Status */
+#define DCSR_EORINTR   (1 << 9)        /* The end of Receive */
+
+#define DRCMR_MAPVLD   (1 << 7)        /* Map Valid (read / write) */
+#define DRCMR_CHLNUM   0x1f            /* mask for Channel Number (read / write) */
+
+#define DDADR_DESCADDR 0xfffffff0      /* Address of next descriptor (mask) */
+#define DDADR_STOP     (1 << 0)        /* Stop (read / write) */
+
+#define DCMD_INCSRCADDR        (1 << 31)       /* Source Address Increment Setting. */
+#define DCMD_INCTRGADDR        (1 << 30)       /* Target Address Increment Setting. */
+#define DCMD_FLOWSRC   (1 << 29)       /* Flow Control by the source. */
+#define DCMD_FLOWTRG   (1 << 28)       /* Flow Control by the target. */
+#define DCMD_STARTIRQEN        (1 << 22)       /* Start Interrupt Enable */
+#define DCMD_ENDIRQEN  (1 << 21)       /* End Interrupt Enable */
+#define DCMD_ENDIAN    (1 << 18)       /* Device Endian-ness. */
+#define DCMD_BURST8    (1 << 16)       /* 8 byte burst */
+#define DCMD_BURST16   (2 << 16)       /* 16 byte burst */
+#define DCMD_BURST32   (3 << 16)       /* 32 byte burst */
+#define DCMD_WIDTH1    (1 << 14)       /* 1 byte width */
+#define DCMD_WIDTH2    (2 << 14)       /* 2 byte width (HalfWord) */
+#define DCMD_WIDTH4    (3 << 14)       /* 4 byte width (Word) */
+#define DCMD_LENGTH    0x01fff         /* length mask (max = 8K - 1) */
+
+/*
+ * Descriptor structure for PXA's DMA engine
+ * Note: this structure must always be aligned to a 16-byte boundary.
+ */
+
+typedef struct pxa_dma_desc {
+       volatile u32 ddadr;     /* Points to the next descriptor + flags */
+       volatile u32 dsadr;     /* DSADR value for the current transfer */
+       volatile u32 dtadr;     /* DTADR value for the current transfer */
+       volatile u32 dcmd;      /* DCMD value for the current transfer */
+} pxa_dma_desc;
+
+typedef enum {
+       DMA_PRIO_HIGH = 0,
+       DMA_PRIO_MEDIUM = 1,
+       DMA_PRIO_LOW = 2
+} pxa_dma_prio;
+
+/*
+ * DMA registration
+ */
+
+int __init pxa_init_dma(int irq, int num_ch);
+
+int pxa_request_dma (char *name,
+                        pxa_dma_prio prio,
+                        void (*irq_handler)(int, void *),
+                        void *data);
+
+void pxa_free_dma (int dma_ch);
+
+#endif /* __PLAT_DMA_H */
diff --git a/arch/arm/plat-pxa/include/plat/gpio.h b/arch/arm/plat-pxa/include/plat/gpio.h
new file mode 100644 (file)
index 0000000..44248cb
--- /dev/null
@@ -0,0 +1,62 @@
+#ifndef __PLAT_GPIO_H
+#define __PLAT_GPIO_H
+
+/*
+ * We handle the GPIOs by banks, each bank covers up to 32 GPIOs with
+ * one set of registers. The register offsets are organized below:
+ *
+ *           GPLR    GPDR    GPSR    GPCR    GRER    GFER    GEDR
+ * BANK 0 - 0x0000  0x000C  0x0018  0x0024  0x0030  0x003C  0x0048
+ * BANK 1 - 0x0004  0x0010  0x001C  0x0028  0x0034  0x0040  0x004C
+ * BANK 2 - 0x0008  0x0014  0x0020  0x002C  0x0038  0x0044  0x0050
+ *
+ * BANK 3 - 0x0100  0x010C  0x0118  0x0124  0x0130  0x013C  0x0148
+ * BANK 4 - 0x0104  0x0110  0x011C  0x0128  0x0134  0x0140  0x014C
+ * BANK 5 - 0x0108  0x0114  0x0120  0x012C  0x0138  0x0144  0x0150
+ *
+ * NOTE:
+ *   BANK 3 is only available on PXA27x and later processors.
+ *   BANK 4 and 5 are only available on PXA935
+ */
+
+#define GPIO_BANK(n)   (GPIO_REGS_VIRT + BANK_OFF(n))
+
+#define GPLR_OFFSET    0x00
+#define GPDR_OFFSET    0x0C
+#define GPSR_OFFSET    0x18
+#define GPCR_OFFSET    0x24
+#define GRER_OFFSET    0x30
+#define GFER_OFFSET    0x3C
+#define GEDR_OFFSET    0x48
+
+static inline int gpio_get_value(unsigned gpio)
+{
+       if (__builtin_constant_p(gpio) && (gpio < NR_BUILTIN_GPIO))
+               return GPLR(gpio) & GPIO_bit(gpio);
+       else
+               return __gpio_get_value(gpio);
+}
+
+static inline void gpio_set_value(unsigned gpio, int value)
+{
+       if (__builtin_constant_p(gpio) && (gpio < NR_BUILTIN_GPIO)) {
+               if (value)
+                       GPSR(gpio) = GPIO_bit(gpio);
+               else
+                       GPCR(gpio) = GPIO_bit(gpio);
+       } else
+               __gpio_set_value(gpio, value);
+}
+
+#define gpio_cansleep          __gpio_cansleep
+
+/* NOTE: some PXAs have fewer on-chip GPIOs (like PXA255, with 85).
+ * Those cases currently cause holes in the GPIO number space, the
+ * actual number of the last GPIO is recorded by 'pxa_last_gpio'.
+ */
+extern int pxa_last_gpio;
+
+typedef int (*set_wake_t)(unsigned int irq, unsigned int on);
+
+extern void pxa_init_gpio(int mux_irq, int start, int end, set_wake_t fn);
+#endif /* __PLAT_GPIO_H */
diff --git a/arch/arm/plat-pxa/include/plat/mfp.h b/arch/arm/plat-pxa/include/plat/mfp.h
new file mode 100644 (file)
index 0000000..6401946
--- /dev/null
@@ -0,0 +1,399 @@
+/*
+ * arch/arm/plat-pxa/include/plat/mfp.h
+ *
+ *   Common Multi-Function Pin Definitions
+ *
+ * Copyright (C) 2007 Marvell International Ltd.
+ *
+ * 2007-8-21: eric miao <eric.miao@marvell.com>
+ *            initial version
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ */
+
+#ifndef __ASM_PLAT_MFP_H
+#define __ASM_PLAT_MFP_H
+
+#define mfp_to_gpio(m) ((m) % 128)
+
+/* list of all the configurable MFP pins */
+enum {
+       MFP_PIN_INVALID = -1,
+
+       MFP_PIN_GPIO0 = 0,
+       MFP_PIN_GPIO1,
+       MFP_PIN_GPIO2,
+       MFP_PIN_GPIO3,
+       MFP_PIN_GPIO4,
+       MFP_PIN_GPIO5,
+       MFP_PIN_GPIO6,
+       MFP_PIN_GPIO7,
+       MFP_PIN_GPIO8,
+       MFP_PIN_GPIO9,
+       MFP_PIN_GPIO10,
+       MFP_PIN_GPIO11,
+       MFP_PIN_GPIO12,
+       MFP_PIN_GPIO13,
+       MFP_PIN_GPIO14,
+       MFP_PIN_GPIO15,
+       MFP_PIN_GPIO16,
+       MFP_PIN_GPIO17,
+       MFP_PIN_GPIO18,
+       MFP_PIN_GPIO19,
+       MFP_PIN_GPIO20,
+       MFP_PIN_GPIO21,
+       MFP_PIN_GPIO22,
+       MFP_PIN_GPIO23,
+       MFP_PIN_GPIO24,
+       MFP_PIN_GPIO25,
+       MFP_PIN_GPIO26,
+       MFP_PIN_GPIO27,
+       MFP_PIN_GPIO28,
+       MFP_PIN_GPIO29,
+       MFP_PIN_GPIO30,
+       MFP_PIN_GPIO31,
+       MFP_PIN_GPIO32,
+       MFP_PIN_GPIO33,
+       MFP_PIN_GPIO34,
+       MFP_PIN_GPIO35,
+       MFP_PIN_GPIO36,
+       MFP_PIN_GPIO37,
+       MFP_PIN_GPIO38,
+       MFP_PIN_GPIO39,
+       MFP_PIN_GPIO40,
+       MFP_PIN_GPIO41,
+       MFP_PIN_GPIO42,
+       MFP_PIN_GPIO43,
+       MFP_PIN_GPIO44,
+       MFP_PIN_GPIO45,
+       MFP_PIN_GPIO46,
+       MFP_PIN_GPIO47,
+       MFP_PIN_GPIO48,
+       MFP_PIN_GPIO49,
+       MFP_PIN_GPIO50,
+       MFP_PIN_GPIO51,
+       MFP_PIN_GPIO52,
+       MFP_PIN_GPIO53,
+       MFP_PIN_GPIO54,
+       MFP_PIN_GPIO55,
+       MFP_PIN_GPIO56,
+       MFP_PIN_GPIO57,
+       MFP_PIN_GPIO58,
+       MFP_PIN_GPIO59,
+       MFP_PIN_GPIO60,
+       MFP_PIN_GPIO61,
+       MFP_PIN_GPIO62,
+       MFP_PIN_GPIO63,
+       MFP_PIN_GPIO64,
+       MFP_PIN_GPIO65,
+       MFP_PIN_GPIO66,
+       MFP_PIN_GPIO67,
+       MFP_PIN_GPIO68,
+       MFP_PIN_GPIO69,
+       MFP_PIN_GPIO70,
+       MFP_PIN_GPIO71,
+       MFP_PIN_GPIO72,
+       MFP_PIN_GPIO73,
+       MFP_PIN_GPIO74,
+       MFP_PIN_GPIO75,
+       MFP_PIN_GPIO76,
+       MFP_PIN_GPIO77,
+       MFP_PIN_GPIO78,
+       MFP_PIN_GPIO79,
+       MFP_PIN_GPIO80,
+       MFP_PIN_GPIO81,
+       MFP_PIN_GPIO82,
+       MFP_PIN_GPIO83,
+       MFP_PIN_GPIO84,
+       MFP_PIN_GPIO85,
+       MFP_PIN_GPIO86,
+       MFP_PIN_GPIO87,
+       MFP_PIN_GPIO88,
+       MFP_PIN_GPIO89,
+       MFP_PIN_GPIO90,
+       MFP_PIN_GPIO91,
+       MFP_PIN_GPIO92,
+       MFP_PIN_GPIO93,
+       MFP_PIN_GPIO94,
+       MFP_PIN_GPIO95,
+       MFP_PIN_GPIO96,
+       MFP_PIN_GPIO97,
+       MFP_PIN_GPIO98,
+       MFP_PIN_GPIO99,
+       MFP_PIN_GPIO100,
+       MFP_PIN_GPIO101,
+       MFP_PIN_GPIO102,
+       MFP_PIN_GPIO103,
+       MFP_PIN_GPIO104,
+       MFP_PIN_GPIO105,
+       MFP_PIN_GPIO106,
+       MFP_PIN_GPIO107,
+       MFP_PIN_GPIO108,
+       MFP_PIN_GPIO109,
+       MFP_PIN_GPIO110,
+       MFP_PIN_GPIO111,
+       MFP_PIN_GPIO112,
+       MFP_PIN_GPIO113,
+       MFP_PIN_GPIO114,
+       MFP_PIN_GPIO115,
+       MFP_PIN_GPIO116,
+       MFP_PIN_GPIO117,
+       MFP_PIN_GPIO118,
+       MFP_PIN_GPIO119,
+       MFP_PIN_GPIO120,
+       MFP_PIN_GPIO121,
+       MFP_PIN_GPIO122,
+       MFP_PIN_GPIO123,
+       MFP_PIN_GPIO124,
+       MFP_PIN_GPIO125,
+       MFP_PIN_GPIO126,
+       MFP_PIN_GPIO127,
+       MFP_PIN_GPIO0_2,
+       MFP_PIN_GPIO1_2,
+       MFP_PIN_GPIO2_2,
+       MFP_PIN_GPIO3_2,
+       MFP_PIN_GPIO4_2,
+       MFP_PIN_GPIO5_2,
+       MFP_PIN_GPIO6_2,
+       MFP_PIN_GPIO7_2,
+       MFP_PIN_GPIO8_2,
+       MFP_PIN_GPIO9_2,
+       MFP_PIN_GPIO10_2,
+       MFP_PIN_GPIO11_2,
+       MFP_PIN_GPIO12_2,
+       MFP_PIN_GPIO13_2,
+       MFP_PIN_GPIO14_2,
+       MFP_PIN_GPIO15_2,
+       MFP_PIN_GPIO16_2,
+       MFP_PIN_GPIO17_2,
+
+       MFP_PIN_ULPI_STP,
+       MFP_PIN_ULPI_NXT,
+       MFP_PIN_ULPI_DIR,
+
+       MFP_PIN_nXCVREN,
+       MFP_PIN_DF_CLE_nOE,
+       MFP_PIN_DF_nADV1_ALE,
+       MFP_PIN_DF_SCLK_E,
+       MFP_PIN_DF_SCLK_S,
+       MFP_PIN_nBE0,
+       MFP_PIN_nBE1,
+       MFP_PIN_DF_nADV2_ALE,
+       MFP_PIN_DF_INT_RnB,
+       MFP_PIN_DF_nCS0,
+       MFP_PIN_DF_nCS1,
+       MFP_PIN_nLUA,
+       MFP_PIN_nLLA,
+       MFP_PIN_DF_nWE,
+       MFP_PIN_DF_ALE_nWE,
+       MFP_PIN_DF_nRE_nOE,
+       MFP_PIN_DF_ADDR0,
+       MFP_PIN_DF_ADDR1,
+       MFP_PIN_DF_ADDR2,
+       MFP_PIN_DF_ADDR3,
+       MFP_PIN_DF_IO0,
+       MFP_PIN_DF_IO1,
+       MFP_PIN_DF_IO2,
+       MFP_PIN_DF_IO3,
+       MFP_PIN_DF_IO4,
+       MFP_PIN_DF_IO5,
+       MFP_PIN_DF_IO6,
+       MFP_PIN_DF_IO7,
+       MFP_PIN_DF_IO8,
+       MFP_PIN_DF_IO9,
+       MFP_PIN_DF_IO10,
+       MFP_PIN_DF_IO11,
+       MFP_PIN_DF_IO12,
+       MFP_PIN_DF_IO13,
+       MFP_PIN_DF_IO14,
+       MFP_PIN_DF_IO15,
+       MFP_PIN_DF_nCS0_SM_nCS2,
+       MFP_PIN_DF_nCS1_SM_nCS3,
+       MFP_PIN_SM_nCS0,
+       MFP_PIN_SM_nCS1,
+       MFP_PIN_DF_WEn,
+       MFP_PIN_DF_REn,
+       MFP_PIN_DF_CLE_SM_OEn,
+       MFP_PIN_DF_ALE_SM_WEn,
+       MFP_PIN_DF_RDY0,
+       MFP_PIN_DF_RDY1,
+
+       MFP_PIN_SM_SCLK,
+       MFP_PIN_SM_BE0,
+       MFP_PIN_SM_BE1,
+       MFP_PIN_SM_ADV,
+       MFP_PIN_SM_ADVMUX,
+       MFP_PIN_SM_RDY,
+
+       MFP_PIN_MMC1_DAT7,
+       MFP_PIN_MMC1_DAT6,
+       MFP_PIN_MMC1_DAT5,
+       MFP_PIN_MMC1_DAT4,
+       MFP_PIN_MMC1_DAT3,
+       MFP_PIN_MMC1_DAT2,
+       MFP_PIN_MMC1_DAT1,
+       MFP_PIN_MMC1_DAT0,
+       MFP_PIN_MMC1_CMD,
+       MFP_PIN_MMC1_CLK,
+       MFP_PIN_MMC1_CD,
+       MFP_PIN_MMC1_WP,
+
+       /* additional pins on PXA930 */
+       MFP_PIN_GSIM_UIO,
+       MFP_PIN_GSIM_UCLK,
+       MFP_PIN_GSIM_UDET,
+       MFP_PIN_GSIM_nURST,
+       MFP_PIN_PMIC_INT,
+       MFP_PIN_RDY,
+
+       MFP_PIN_MAX,
+};
+
+/*
+ * a possible MFP configuration is represented by a 32-bit integer
+ *
+ * bit  0.. 9 - MFP Pin Number (1024 Pins Maximum)
+ * bit 10..12 - Alternate Function Selection
+ * bit 13..15 - Drive Strength
+ * bit 16..18 - Low Power Mode State
+ * bit 19..20 - Low Power Mode Edge Detection
+ * bit 21..22 - Run Mode Pull State
+ *
+ * to facilitate the definition, the following macros are provided
+ *
+ * MFP_CFG_DEFAULT - default MFP configuration value, with
+ *               alternate function = 0,
+ *               drive strength = fast 3mA (MFP_DS03X)
+ *               low power mode = default
+ *               edge detection = none
+ *
+ * MFP_CFG     - default MFPR value with alternate function
+ * MFP_CFG_DRV - default MFPR value with alternate function and
+ *               pin drive strength
+ * MFP_CFG_LPM - default MFPR value with alternate function and
+ *               low power mode
+ * MFP_CFG_X   - default MFPR value with alternate function,
+ *               pin drive strength and low power mode
+ */
+
+typedef unsigned long mfp_cfg_t;
+
+#define MFP_PIN(x)             ((x) & 0x3ff)
+
+#define MFP_AF0                        (0x0 << 10)
+#define MFP_AF1                        (0x1 << 10)
+#define MFP_AF2                        (0x2 << 10)
+#define MFP_AF3                        (0x3 << 10)
+#define MFP_AF4                        (0x4 << 10)
+#define MFP_AF5                        (0x5 << 10)
+#define MFP_AF6                        (0x6 << 10)
+#define MFP_AF7                        (0x7 << 10)
+#define MFP_AF_MASK            (0x7 << 10)
+#define MFP_AF(x)              (((x) >> 10) & 0x7)
+
+#define MFP_DS01X              (0x0 << 13)
+#define MFP_DS02X              (0x1 << 13)
+#define MFP_DS03X              (0x2 << 13)
+#define MFP_DS04X              (0x3 << 13)
+#define MFP_DS06X              (0x4 << 13)
+#define MFP_DS08X              (0x5 << 13)
+#define MFP_DS10X              (0x6 << 13)
+#define MFP_DS13X              (0x7 << 13)
+#define MFP_DS_MASK            (0x7 << 13)
+#define MFP_DS(x)              (((x) >> 13) & 0x7)
+
+#define MFP_LPM_DEFAULT                (0x0 << 16)
+#define MFP_LPM_DRIVE_LOW      (0x1 << 16)
+#define MFP_LPM_DRIVE_HIGH     (0x2 << 16)
+#define MFP_LPM_PULL_LOW       (0x3 << 16)
+#define MFP_LPM_PULL_HIGH      (0x4 << 16)
+#define MFP_LPM_FLOAT          (0x5 << 16)
+#define MFP_LPM_INPUT          (0x6 << 16)
+#define MFP_LPM_STATE_MASK     (0x7 << 16)
+#define MFP_LPM_STATE(x)       (((x) >> 16) & 0x7)
+
+#define MFP_LPM_EDGE_NONE      (0x0 << 19)
+#define MFP_LPM_EDGE_RISE      (0x1 << 19)
+#define MFP_LPM_EDGE_FALL      (0x2 << 19)
+#define MFP_LPM_EDGE_BOTH      (0x3 << 19)
+#define MFP_LPM_EDGE_MASK      (0x3 << 19)
+#define MFP_LPM_EDGE(x)                (((x) >> 19) & 0x3)
+
+#define MFP_PULL_NONE          (0x0 << 21)
+#define MFP_PULL_LOW           (0x1 << 21)
+#define MFP_PULL_HIGH          (0x2 << 21)
+#define MFP_PULL_BOTH          (0x3 << 21)
+#define MFP_PULL_MASK          (0x3 << 21)
+#define MFP_PULL(x)            (((x) >> 21) & 0x3)
+
+#define MFP_CFG_DEFAULT                (MFP_AF0 | MFP_DS03X | MFP_LPM_DEFAULT |\
+                                MFP_LPM_EDGE_NONE | MFP_PULL_NONE)
+
+#define MFP_CFG(pin, af)               \
+       ((MFP_CFG_DEFAULT & ~MFP_AF_MASK) |\
+        (MFP_PIN(MFP_PIN_##pin) | MFP_##af))
+
+#define MFP_CFG_DRV(pin, af, drv)      \
+       ((MFP_CFG_DEFAULT & ~(MFP_AF_MASK | MFP_DS_MASK)) |\
+        (MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_##drv))
+
+#define MFP_CFG_LPM(pin, af, lpm)      \
+       ((MFP_CFG_DEFAULT & ~(MFP_AF_MASK | MFP_LPM_STATE_MASK)) |\
+        (MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_LPM_##lpm))
+
+#define MFP_CFG_X(pin, af, drv, lpm)   \
+       ((MFP_CFG_DEFAULT & ~(MFP_AF_MASK | MFP_DS_MASK | MFP_LPM_STATE_MASK)) |\
+        (MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_##drv | MFP_LPM_##lpm))
+
+#if defined(CONFIG_PXA3xx) || defined(CONFIG_ARCH_MMP)
+/*
+ * each MFP pin will have a MFPR register, since the offset of the
+ * register varies between processors, the processor specific code
+ * should initialize the pin offsets by mfp_init()
+ *
+ * mfp_init_base() - accepts a virtual base for all MFPR registers and
+ * initialize the MFP table to a default state
+ *
+ * mfp_init_addr() - accepts a table of "mfp_addr_map" structure, which
+ * represents a range of MFP pins from "start" to "end", with the offset
+ * begining at "offset", to define a single pin, let "end" = -1.
+ *
+ * use
+ *
+ * MFP_ADDR_X() to define a range of pins
+ * MFP_ADDR()   to define a single pin
+ * MFP_ADDR_END to signal the end of pin offset definitions
+ */
+struct mfp_addr_map {
+       unsigned int    start;
+       unsigned int    end;
+       unsigned long   offset;
+};
+
+#define MFP_ADDR_X(start, end, offset) \
+       { MFP_PIN_##start, MFP_PIN_##end, offset }
+
+#define MFP_ADDR(pin, offset) \
+       { MFP_PIN_##pin, -1, offset }
+
+#define MFP_ADDR_END   { MFP_PIN_INVALID, 0 }
+
+void __init mfp_init_base(unsigned long mfpr_base);
+void __init mfp_init_addr(struct mfp_addr_map *map);
+
+/*
+ * mfp_{read, write}() - for direct read/write access to the MFPR register
+ * mfp_config()                - for configuring a group of MFPR registers
+ * mfp_config_lpm()    - configuring all low power MFPR registers for suspend
+ * mfp_config_run()    - configuring all run time  MFPR registers after resume
+ */
+unsigned long mfp_read(int mfp);
+void mfp_write(int mfp, unsigned long mfpr_val);
+void mfp_config(unsigned long *mfp_cfgs, int num);
+void mfp_config_run(void);
+void mfp_config_lpm(void);
+#endif /* CONFIG_PXA3xx || CONFIG_ARCH_MMP */
+
+#endif /* __ASM_PLAT_MFP_H */
diff --git a/arch/arm/plat-pxa/mfp.c b/arch/arm/plat-pxa/mfp.c
new file mode 100644 (file)
index 0000000..e716c62
--- /dev/null
@@ -0,0 +1,278 @@
+/*
+ * linux/arch/arm/plat-pxa/mfp.c
+ *
+ *   Multi-Function Pin Support
+ *
+ * Copyright (C) 2007 Marvell Internation Ltd.
+ *
+ * 2007-08-21: eric miao <eric.miao@marvell.com>
+ *             initial version
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ */
+
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/io.h>
+#include <linux/sysdev.h>
+
+#include <plat/mfp.h>
+
+#define MFPR_SIZE      (PAGE_SIZE)
+
+/* MFPR register bit definitions */
+#define MFPR_PULL_SEL          (0x1 << 15)
+#define MFPR_PULLUP_EN         (0x1 << 14)
+#define MFPR_PULLDOWN_EN       (0x1 << 13)
+#define MFPR_SLEEP_SEL         (0x1 << 9)
+#define MFPR_SLEEP_OE_N                (0x1 << 7)
+#define MFPR_EDGE_CLEAR                (0x1 << 6)
+#define MFPR_EDGE_FALL_EN      (0x1 << 5)
+#define MFPR_EDGE_RISE_EN      (0x1 << 4)
+
+#define MFPR_SLEEP_DATA(x)     ((x) << 8)
+#define MFPR_DRIVE(x)          (((x) & 0x7) << 10)
+#define MFPR_AF_SEL(x)         (((x) & 0x7) << 0)
+
+#define MFPR_EDGE_NONE         (0)
+#define MFPR_EDGE_RISE         (MFPR_EDGE_RISE_EN)
+#define MFPR_EDGE_FALL         (MFPR_EDGE_FALL_EN)
+#define MFPR_EDGE_BOTH         (MFPR_EDGE_RISE | MFPR_EDGE_FALL)
+
+/*
+ * Table that determines the low power modes outputs, with actual settings
+ * used in parentheses for don't-care values. Except for the float output,
+ * the configured driven and pulled levels match, so if there is a need for
+ * non-LPM pulled output, the same configuration could probably be used.
+ *
+ * Output value  sleep_oe_n  sleep_data  pullup_en  pulldown_en  pull_sel
+ *                 (bit 7)    (bit 8)    (bit 14)     (bit 13)   (bit 15)
+ *
+ * Input            0          X(0)        X(0)        X(0)       0
+ * Drive 0          0          0           0           X(1)       0
+ * Drive 1          0          1           X(1)        0         0
+ * Pull hi (1)      1          X(1)        1           0         0
+ * Pull lo (0)      1          X(0)        0           1         0
+ * Z (float)        1          X(0)        0           0         0
+ */
+#define MFPR_LPM_INPUT         (0)
+#define MFPR_LPM_DRIVE_LOW     (MFPR_SLEEP_DATA(0) | MFPR_PULLDOWN_EN)
+#define MFPR_LPM_DRIVE_HIGH            (MFPR_SLEEP_DATA(1) | MFPR_PULLUP_EN)
+#define MFPR_LPM_PULL_LOW              (MFPR_LPM_DRIVE_LOW  | MFPR_SLEEP_OE_N)
+#define MFPR_LPM_PULL_HIGH             (MFPR_LPM_DRIVE_HIGH | MFPR_SLEEP_OE_N)
+#define MFPR_LPM_FLOAT                 (MFPR_SLEEP_OE_N)
+#define MFPR_LPM_MASK          (0xe080)
+
+/*
+ * The pullup and pulldown state of the MFP pin at run mode is by default
+ * determined by the selected alternate function. In case that some buggy
+ * devices need to override this default behavior,  the definitions below
+ * indicates the setting of corresponding MFPR bits
+ *
+ * Definition       pull_sel  pullup_en  pulldown_en
+ * MFPR_PULL_NONE       0         0        0
+ * MFPR_PULL_LOW        1         0        1
+ * MFPR_PULL_HIGH       1         1        0
+ * MFPR_PULL_BOTH       1         1        1
+ */
+#define MFPR_PULL_NONE         (0)
+#define MFPR_PULL_LOW          (MFPR_PULL_SEL | MFPR_PULLDOWN_EN)
+#define MFPR_PULL_BOTH         (MFPR_PULL_LOW | MFPR_PULLUP_EN)
+#define MFPR_PULL_HIGH         (MFPR_PULL_SEL | MFPR_PULLUP_EN)
+
+/* mfp_spin_lock is used to ensure that MFP register configuration
+ * (most likely a read-modify-write operation) is atomic, and that
+ * mfp_table[] is consistent
+ */
+static DEFINE_SPINLOCK(mfp_spin_lock);
+
+static void __iomem *mfpr_mmio_base;
+
+struct mfp_pin {
+       unsigned long   config;         /* -1 for not configured */
+       unsigned long   mfpr_off;       /* MFPRxx Register offset */
+       unsigned long   mfpr_run;       /* Run-Mode Register Value */
+       unsigned long   mfpr_lpm;       /* Low Power Mode Register Value */
+};
+
+static struct mfp_pin mfp_table[MFP_PIN_MAX];
+
+/* mapping of MFP_LPM_* definitions to MFPR_LPM_* register bits */
+static const unsigned long mfpr_lpm[] = {
+       MFPR_LPM_INPUT,
+       MFPR_LPM_DRIVE_LOW,
+       MFPR_LPM_DRIVE_HIGH,
+       MFPR_LPM_PULL_LOW,
+       MFPR_LPM_PULL_HIGH,
+       MFPR_LPM_FLOAT,
+};
+
+/* mapping of MFP_PULL_* definitions to MFPR_PULL_* register bits */
+static const unsigned long mfpr_pull[] = {
+       MFPR_PULL_NONE,
+       MFPR_PULL_LOW,
+       MFPR_PULL_HIGH,
+       MFPR_PULL_BOTH,
+};
+
+/* mapping of MFP_LPM_EDGE_* definitions to MFPR_EDGE_* register bits */
+static const unsigned long mfpr_edge[] = {
+       MFPR_EDGE_NONE,
+       MFPR_EDGE_RISE,
+       MFPR_EDGE_FALL,
+       MFPR_EDGE_BOTH,
+};
+
+#define mfpr_readl(off)                        \
+       __raw_readl(mfpr_mmio_base + (off))
+
+#define mfpr_writel(off, val)          \
+       __raw_writel(val, mfpr_mmio_base + (off))
+
+#define mfp_configured(p)      ((p)->config != -1)
+
+/*
+ * perform a read-back of any MFPR register to make sure the
+ * previous writings are finished
+ */
+#define mfpr_sync()    (void)__raw_readl(mfpr_mmio_base + 0)
+
+static inline void __mfp_config_run(struct mfp_pin *p)
+{
+       if (mfp_configured(p))
+               mfpr_writel(p->mfpr_off, p->mfpr_run);
+}
+
+static inline void __mfp_config_lpm(struct mfp_pin *p)
+{
+       if (mfp_configured(p)) {
+               unsigned long mfpr_clr = (p->mfpr_run & ~MFPR_EDGE_BOTH) | MFPR_EDGE_CLEAR;
+               if (mfpr_clr != p->mfpr_run)
+                       mfpr_writel(p->mfpr_off, mfpr_clr);
+               if (p->mfpr_lpm != mfpr_clr)
+                       mfpr_writel(p->mfpr_off, p->mfpr_lpm);
+       }
+}
+
+void mfp_config(unsigned long *mfp_cfgs, int num)
+{
+       unsigned long flags;
+       int i;
+
+       spin_lock_irqsave(&mfp_spin_lock, flags);
+
+       for (i = 0; i < num; i++, mfp_cfgs++) {
+               unsigned long tmp, c = *mfp_cfgs;
+               struct mfp_pin *p;
+               int pin, af, drv, lpm, edge, pull;
+
+               pin = MFP_PIN(c);
+               BUG_ON(pin >= MFP_PIN_MAX);
+               p = &mfp_table[pin];
+
+               af  = MFP_AF(c);
+               drv = MFP_DS(c);
+               lpm = MFP_LPM_STATE(c);
+               edge = MFP_LPM_EDGE(c);
+               pull = MFP_PULL(c);
+
+               /* run-mode pull settings will conflict with MFPR bits of
+                * low power mode state,  calculate mfpr_run and mfpr_lpm
+                * individually if pull != MFP_PULL_NONE
+                */
+               tmp = MFPR_AF_SEL(af) | MFPR_DRIVE(drv);
+
+               if (likely(pull == MFP_PULL_NONE)) {
+                       p->mfpr_run = tmp | mfpr_lpm[lpm] | mfpr_edge[edge];
+                       p->mfpr_lpm = p->mfpr_run;
+               } else {
+                       p->mfpr_lpm = tmp | mfpr_lpm[lpm] | mfpr_edge[edge];
+                       p->mfpr_run = tmp | mfpr_pull[pull];
+               }
+
+               p->config = c; __mfp_config_run(p);
+       }
+
+       mfpr_sync();
+       spin_unlock_irqrestore(&mfp_spin_lock, flags);
+}
+
+unsigned long mfp_read(int mfp)
+{
+       unsigned long val, flags;
+
+       BUG_ON(mfp >= MFP_PIN_MAX);
+
+       spin_lock_irqsave(&mfp_spin_lock, flags);
+       val = mfpr_readl(mfp_table[mfp].mfpr_off);
+       spin_unlock_irqrestore(&mfp_spin_lock, flags);
+
+       return val;
+}
+
+void mfp_write(int mfp, unsigned long val)
+{
+       unsigned long flags;
+
+       BUG_ON(mfp >= MFP_PIN_MAX);
+
+       spin_lock_irqsave(&mfp_spin_lock, flags);
+       mfpr_writel(mfp_table[mfp].mfpr_off, val);
+       mfpr_sync();
+       spin_unlock_irqrestore(&mfp_spin_lock, flags);
+}
+
+void __init mfp_init_base(unsigned long mfpr_base)
+{
+       int i;
+
+       /* initialize the table with default - unconfigured */
+       for (i = 0; i < ARRAY_SIZE(mfp_table); i++)
+               mfp_table[i].config = -1;
+
+       mfpr_mmio_base = (void __iomem *)mfpr_base;
+}
+
+void __init mfp_init_addr(struct mfp_addr_map *map)
+{
+       struct mfp_addr_map *p;
+       unsigned long offset, flags;
+       int i;
+
+       spin_lock_irqsave(&mfp_spin_lock, flags);
+
+       for (p = map; p->start != MFP_PIN_INVALID; p++) {
+               offset = p->offset;
+               i = p->start;
+
+               do {
+                       mfp_table[i].mfpr_off = offset;
+                       mfp_table[i].mfpr_run = 0;
+                       mfp_table[i].mfpr_lpm = 0;
+                       offset += 4; i++;
+               } while ((i <= p->end) && (p->end != -1));
+       }
+
+       spin_unlock_irqrestore(&mfp_spin_lock, flags);
+}
+
+void mfp_config_lpm(void)
+{
+       struct mfp_pin *p = &mfp_table[0];
+       int pin;
+
+       for (pin = 0; pin < ARRAY_SIZE(mfp_table); pin++, p++)
+               __mfp_config_lpm(p);
+}
+
+void mfp_config_run(void)
+{
+       struct mfp_pin *p = &mfp_table[0];
+       int pin;
+
+       for (pin = 0; pin < ARRAY_SIZE(mfp_table); pin++, p++)
+               __mfp_config_run(p);
+}
index 6061de87f225d43e5f7bbaea948d71f227fb2a5d..dc66a477f62e3612f200ff31000138d7d67378ad 100644 (file)
@@ -90,7 +90,10 @@ static inline void flush(void)
 {
 }
 
-#define __raw_writel(d,ad) do { *((volatile unsigned int *)(ad)) = (d); } while(0)
+#define __raw_writel(d, ad)                    \
+       do {                                                    \
+               *((volatile unsigned int __force *)(ad)) = (d); \
+       } while (0)
 
 /* CONFIG_S3C_BOOT_WATCHDOG
  *
index 542062f8cbc1da51ba9a3678cd12d79de65be269..1932b7e0da15cd878f1579bc24be869c90c6c9a5 100644 (file)
@@ -182,7 +182,7 @@ static unsigned long s3c24xx_read_idcode_v4(void)
  * with the caches enabled. It seems at least the S3C2440 has a problem
  * resetting if there is bus activity interrupted by the reset.
  */
-static void s3c24xx_pm_restart(char mode)
+static void s3c24xx_pm_restart(char mode, const char *cmd)
 {
        if (mode != 's') {
                unsigned long flags;
@@ -191,12 +191,12 @@ static void s3c24xx_pm_restart(char mode)
                __cpuc_flush_kern_all();
                __cpuc_flush_user_all();
 
-               arch_reset(mode);
+               arch_reset(mode, cmd);
                local_irq_restore(flags);
        }
 
        /* fallback, or unhandled */
-       arm_machine_restart(mode);
+       arm_machine_restart(mode, cmd);
 }
 
 void __init s3c24xx_init_io(struct map_desc *mach_desc, int size)
index 8de86e4feada7f56686abbbfe7b1a1067f50f466..c8c98dd44ad479e5a24582ded284f39a036f9f05 100644 (file)
@@ -377,6 +377,4 @@ struct op {
        u32 flags;
 };
 
-#if defined(CONFIG_SMP) || defined(CONFIG_PM)
 extern void vfp_save_state(void *location, u32 fpexc);
-#endif
index c92a08bd6a8674d53ecbc6c96b22f77e21584cf8..a5a4e57763c391598bc089102c90af94e89def6a 100644 (file)
@@ -172,7 +172,6 @@ process_exception:
                                        @ retry the faulted instruction
 ENDPROC(vfp_support_entry)
 
-#if defined(CONFIG_SMP) || defined(CONFIG_PM)
 ENTRY(vfp_save_state)
        @ Save the current VFP state
        @ r0 - save location
@@ -190,7 +189,6 @@ ENTRY(vfp_save_state)
        stmia   r0, {r1, r2, r3, r12}   @ save FPEXC, FPSCR, FPINST, FPINST2
        mov     pc, lr
 ENDPROC(vfp_save_state)
-#endif
 
 last_VFP_context_address:
        .word   last_VFP_context
index 9f476a1be2cace8280a4f7dfad0d3fcf8f92cfc0..75457b30d813c1d3a359e346e418bbc4725dbea2 100644 (file)
@@ -377,6 +377,55 @@ static void vfp_pm_init(void)
 static inline void vfp_pm_init(void) { }
 #endif /* CONFIG_PM */
 
+/*
+ * Synchronise the hardware VFP state of a thread other than current with the
+ * saved one. This function is used by the ptrace mechanism.
+ */
+#ifdef CONFIG_SMP
+void vfp_sync_state(struct thread_info *thread)
+{
+       /*
+        * On SMP systems, the VFP state is automatically saved at every
+        * context switch. We mark the thread VFP state as belonging to a
+        * non-existent CPU so that the saved one will be reloaded when
+        * needed.
+        */
+       thread->vfpstate.hard.cpu = NR_CPUS;
+}
+#else
+void vfp_sync_state(struct thread_info *thread)
+{
+       unsigned int cpu = get_cpu();
+       u32 fpexc = fmrx(FPEXC);
+
+       /*
+        * If VFP is enabled, the previous state was already saved and
+        * last_VFP_context updated.
+        */
+       if (fpexc & FPEXC_EN)
+               goto out;
+
+       if (!last_VFP_context[cpu])
+               goto out;
+
+       /*
+        * Save the last VFP state on this CPU.
+        */
+       fmxr(FPEXC, fpexc | FPEXC_EN);
+       vfp_save_state(last_VFP_context[cpu], fpexc);
+       fmxr(FPEXC, fpexc);
+
+       /*
+        * Set the context to NULL to force a reload the next time the thread
+        * uses the VFP.
+        */
+       last_VFP_context[cpu] = NULL;
+
+out:
+       put_cpu();
+}
+#endif
+
 #include <linux/smp.h>
 
 /*
@@ -427,6 +476,18 @@ static int __init vfp_init(void)
                 * in place; report VFP support to userspace.
                 */
                elf_hwcap |= HWCAP_VFP;
+#ifdef CONFIG_VFPv3
+               if (VFP_arch >= 3) {
+                       elf_hwcap |= HWCAP_VFPv3;
+
+                       /*
+                        * Check for VFPv3 D16. CPUs in this configuration
+                        * only have 16 x 64bit registers.
+                        */
+                       if (((fmrx(MVFR0) & MVFR0_A_SIMD_MASK)) == 1)
+                               elf_hwcap |= HWCAP_VFPv3D16;
+               }
+#endif
 #ifdef CONFIG_NEON
                /*
                 * Check for the presence of the Advanced SIMD
index 8f1f97d56e1ecfec191b185350e7f374cd0df00b..0c1f86e3e44a0bfa99700609e69dfe82551e3f3e 100644 (file)
@@ -1129,6 +1129,7 @@ endchoice
 
 config PM_WAKEUP_BY_GPIO
        bool "Allow Wakeup from Standby by GPIO"
+       depends on PM && !BF54x
 
 config PM_WAKEUP_GPIO_NUMBER
        int "GPIO number"
@@ -1168,6 +1169,12 @@ config PM_BFIN_WAKE_GP
        default n
        help
          Enable General-Purpose Wake-Up (Voltage Regulator Power-Up)
+         (all processors, except ADSP-BF549). This option sets
+         the general-purpose wake-up enable (GPWE) control bit to enable
+         wake-up upon detection of an active low signal on the /GPW (PH7) pin.
+         On ADSP-BF549 this option enables the the same functionality on the
+         /MRXON pin also PH7.
+
 endmenu
 
 menu "CPU Frequency scaling"
index 5f981d9ca625c4540ef6090e68d25d137ec29793..79e7e63ab70985ddea291a2656052dcd6f8a2c5c 100644 (file)
@@ -21,12 +21,6 @@ config DEBUG_STACK_USAGE
 config HAVE_ARCH_KGDB
        def_bool y
 
-config KGDB_TESTCASE
-       tristate "KGDB: for test case in expect"
-       default n
-       help
-         This is a kgdb test case for automated testing.
-
 config DEBUG_VERBOSE
        bool "Verbose fault messages"
        default y
index 4fdb9e04759f779abdcfaa6d6ee2e932a7e41ca7..281f4b60e603fe52cb8327d9069c081a183f824a 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.28-rc2
-# Fri Jan  9 17:58:41 2009
+# Linux kernel version: 2.6.28
+# Fri Feb 20 10:01:44 2009
 #
 # CONFIG_MMU is not set
 # CONFIG_FPU is not set
@@ -133,10 +133,15 @@ CONFIG_BF518=y
 # CONFIG_BF538 is not set
 # CONFIG_BF539 is not set
 # CONFIG_BF542 is not set
+# CONFIG_BF542M is not set
 # CONFIG_BF544 is not set
+# CONFIG_BF544M is not set
 # CONFIG_BF547 is not set
+# CONFIG_BF547M is not set
 # CONFIG_BF548 is not set
+# CONFIG_BF548M is not set
 # CONFIG_BF549 is not set
+# CONFIG_BF549M is not set
 # CONFIG_BF561 is not set
 CONFIG_BF_REV_MIN=0
 CONFIG_BF_REV_MAX=2
@@ -426,7 +431,17 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
 # CONFIG_TIPC is not set
 # CONFIG_ATM is not set
 # CONFIG_BRIDGE is not set
-# CONFIG_NET_DSA is not set
+CONFIG_NET_DSA=y
+# CONFIG_NET_DSA_TAG_DSA is not set
+# CONFIG_NET_DSA_TAG_EDSA is not set
+# CONFIG_NET_DSA_TAG_TRAILER is not set
+CONFIG_NET_DSA_TAG_STPID=y
+# CONFIG_NET_DSA_MV88E6XXX is not set
+# CONFIG_NET_DSA_MV88E6060 is not set
+# CONFIG_NET_DSA_MV88E6XXX_NEED_PPU is not set
+# CONFIG_NET_DSA_MV88E6131 is not set
+# CONFIG_NET_DSA_MV88E6123_61_65 is not set
+CONFIG_NET_DSA_KSZ8893M=y
 # CONFIG_VLAN_8021Q is not set
 # CONFIG_DECNET is not set
 # CONFIG_LLC2 is not set
@@ -529,6 +544,8 @@ CONFIG_MTD_COMPLEX_MAPPINGS=y
 #
 # Self-contained MTD device drivers
 #
+# CONFIG_MTD_DATAFLASH is not set
+# CONFIG_MTD_M25P80 is not set
 # CONFIG_MTD_SLRAM is not set
 # CONFIG_MTD_PHRAM is not set
 # CONFIG_MTD_MTDRAM is not set
@@ -561,7 +578,9 @@ CONFIG_BLK_DEV_RAM_SIZE=4096
 # CONFIG_BLK_DEV_HD is not set
 CONFIG_MISC_DEVICES=y
 # CONFIG_EEPROM_93CX6 is not set
+# CONFIG_ICS932S401 is not set
 # CONFIG_ENCLOSURE_SERVICES is not set
+# CONFIG_C2PORT is not set
 CONFIG_HAVE_IDE=y
 # CONFIG_IDE is not set
 
@@ -607,6 +626,7 @@ CONFIG_BFIN_RX_DESC_NUM=20
 # CONFIG_SMC91X is not set
 # CONFIG_SMSC911X is not set
 # CONFIG_DM9000 is not set
+# CONFIG_ENC28J60 is not set
 # CONFIG_IBM_NEW_EMAC_ZMII is not set
 # CONFIG_IBM_NEW_EMAC_RGMII is not set
 # CONFIG_IBM_NEW_EMAC_TAH is not set
@@ -764,7 +784,23 @@ CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=100
 # CONFIG_I2C_DEBUG_ALGO is not set
 # CONFIG_I2C_DEBUG_BUS is not set
 # CONFIG_I2C_DEBUG_CHIP is not set
-# CONFIG_SPI is not set
+CONFIG_SPI=y
+# CONFIG_SPI_DEBUG is not set
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+CONFIG_SPI_BFIN=y
+# CONFIG_SPI_BFIN_LOCK is not set
+# CONFIG_SPI_BITBANG is not set
+
+#
+# SPI Protocol Masters
+#
+# CONFIG_SPI_AT25 is not set
+# CONFIG_SPI_SPIDEV is not set
+# CONFIG_SPI_TLE62X0 is not set
 CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
 # CONFIG_GPIOLIB is not set
 # CONFIG_W1 is not set
@@ -788,8 +824,10 @@ CONFIG_BFIN_WDT=y
 # CONFIG_MFD_SM501 is not set
 # CONFIG_HTC_PASIC3 is not set
 # CONFIG_MFD_TMIO is not set
+# CONFIG_PMIC_DA903X is not set
 # CONFIG_MFD_WM8400 is not set
 # CONFIG_MFD_WM8350_I2C is not set
+# CONFIG_REGULATOR is not set
 
 #
 # Multimedia devices
@@ -861,10 +899,18 @@ CONFIG_RTC_INTF_DEV=y
 # CONFIG_RTC_DRV_M41T80 is not set
 # CONFIG_RTC_DRV_S35390A is not set
 # CONFIG_RTC_DRV_FM3130 is not set
+# CONFIG_RTC_DRV_RX8581 is not set
 
 #
 # SPI RTC drivers
 #
+# CONFIG_RTC_DRV_M41T94 is not set
+# CONFIG_RTC_DRV_DS1305 is not set
+# CONFIG_RTC_DRV_DS1390 is not set
+# CONFIG_RTC_DRV_MAX6902 is not set
+# CONFIG_RTC_DRV_R9701 is not set
+# CONFIG_RTC_DRV_RS5C348 is not set
+# CONFIG_RTC_DRV_DS3234 is not set
 
 #
 # Platform RTC drivers
@@ -1062,12 +1108,20 @@ CONFIG_DEBUG_INFO=y
 # CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
 # CONFIG_FAULT_INJECTION is not set
 CONFIG_SYSCTL_SYSCALL_CHECK=y
+
+#
+# Tracers
+#
+# CONFIG_SCHED_TRACER is not set
+# CONFIG_CONTEXT_SWITCH_TRACER is not set
+# CONFIG_BOOT_TRACER is not set
 # CONFIG_DYNAMIC_PRINTK_DEBUG is not set
 # CONFIG_SAMPLES is not set
 CONFIG_HAVE_ARCH_KGDB=y
 # CONFIG_KGDB is not set
 # CONFIG_DEBUG_STACKOVERFLOW is not set
 # CONFIG_DEBUG_STACK_USAGE is not set
+# CONFIG_KGDB_TESTCASE is not set
 CONFIG_DEBUG_VERBOSE=y
 CONFIG_DEBUG_MMRS=y
 # CONFIG_DEBUG_HWERR is not set
@@ -1100,6 +1154,7 @@ CONFIG_CRYPTO=y
 #
 # CONFIG_CRYPTO_FIPS is not set
 # CONFIG_CRYPTO_MANAGER is not set
+# CONFIG_CRYPTO_MANAGER2 is not set
 # CONFIG_CRYPTO_GF128MUL is not set
 # CONFIG_CRYPTO_NULL is not set
 # CONFIG_CRYPTO_CRYPTD is not set
index 833128b3972496931aaa2028751bfaab52d8ba2b..a50050f17706efdf17de663ef30289b6c605a224 100644 (file)
@@ -327,8 +327,8 @@ CONFIG_BFIN_ICACHE=y
 CONFIG_BFIN_DCACHE=y
 # CONFIG_BFIN_DCACHE_BANKA is not set
 # CONFIG_BFIN_ICACHE_LOCK is not set
-# CONFIG_BFIN_WB is not set
-CONFIG_BFIN_WT=y
+CONFIG_BFIN_WB=y
+# CONFIG_BFIN_WT is not set
 # CONFIG_MPU is not set
 
 #
index 334c94b51c402fb11af7e25be76d9b27f40f1c99..0a2a00d638872361d6d2f6fec0a6ccf22d34e16a 100644 (file)
@@ -290,8 +290,8 @@ CONFIG_BFIN_ICACHE=y
 CONFIG_BFIN_DCACHE=y
 # CONFIG_BFIN_DCACHE_BANKA is not set
 # CONFIG_BFIN_ICACHE_LOCK is not set
-# CONFIG_BFIN_WB is not set
-CONFIG_BFIN_WT=y
+CONFIG_BFIN_WB=y
+# CONFIG_BFIN_WT is not set
 # CONFIG_MPU is not set
 
 #
index 9d733436e3009ed0e8fbdb0eeb53a1a051156bd2..eb027587a355d4095e939c769c3ab5ec7c014bc9 100644 (file)
@@ -290,8 +290,8 @@ CONFIG_BFIN_ICACHE=y
 CONFIG_BFIN_DCACHE=y
 # CONFIG_BFIN_DCACHE_BANKA is not set
 # CONFIG_BFIN_ICACHE_LOCK is not set
-# CONFIG_BFIN_WB is not set
-CONFIG_BFIN_WT=y
+CONFIG_BFIN_WB=y
+# CONFIG_BFIN_WT is not set
 # CONFIG_MPU is not set
 
 #
index 4fb4108d310322fbc9b82dc0e02d51a5fc461d67..9e62b9f40eb1ce8eec06ae8b1115214b538100f9 100644 (file)
@@ -298,8 +298,8 @@ CONFIG_BFIN_ICACHE=y
 CONFIG_BFIN_DCACHE=y
 # CONFIG_BFIN_DCACHE_BANKA is not set
 # CONFIG_BFIN_ICACHE_LOCK is not set
-# CONFIG_BFIN_WB is not set
-CONFIG_BFIN_WT=y
+CONFIG_BFIN_WB=y
+# CONFIG_BFIN_WT is not set
 # CONFIG_MPU is not set
 
 #
@@ -568,15 +568,7 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
 # CONFIG_MTD_DOC2000 is not set
 # CONFIG_MTD_DOC2001 is not set
 # CONFIG_MTD_DOC2001PLUS is not set
-CONFIG_MTD_NAND=m
-# CONFIG_MTD_NAND_VERIFY_WRITE is not set
-# CONFIG_MTD_NAND_ECC_SMC is not set
-# CONFIG_MTD_NAND_MUSEUM_IDS is not set
-# CONFIG_MTD_NAND_BFIN is not set
-CONFIG_MTD_NAND_IDS=m
-# CONFIG_MTD_NAND_DISKONCHIP is not set
-# CONFIG_MTD_NAND_NANDSIM is not set
-CONFIG_MTD_NAND_PLATFORM=m
+# CONFIG_MTD_NAND is not set
 # CONFIG_MTD_ONENAND is not set
 
 #
index cb32f5624a1b5b859bfbd23ed0f352fa99030a71..dd6ad6be1c872d4f271d58b80ae624cf908d31d0 100644 (file)
@@ -306,8 +306,8 @@ CONFIG_BFIN_ICACHE=y
 CONFIG_BFIN_DCACHE=y
 # CONFIG_BFIN_DCACHE_BANKA is not set
 # CONFIG_BFIN_ICACHE_LOCK is not set
-# CONFIG_BFIN_WB is not set
-CONFIG_BFIN_WT=y
+CONFIG_BFIN_WB=y
+# CONFIG_BFIN_WT is not set
 # CONFIG_MPU is not set
 
 #
index 0f8697618aa5605f29e52774e7db0d3bde4fb37a..6bc2fb1b2a70bb5e03ea25f2ad6b66e6ded1105d 100644 (file)
@@ -361,8 +361,8 @@ CONFIG_BFIN_ICACHE=y
 CONFIG_BFIN_DCACHE=y
 # CONFIG_BFIN_DCACHE_BANKA is not set
 # CONFIG_BFIN_ICACHE_LOCK is not set
-# CONFIG_BFIN_WB is not set
-CONFIG_BFIN_WT=y
+CONFIG_BFIN_WB=y
+# CONFIG_BFIN_WT is not set
 # CONFIG_BFIN_L2_CACHEABLE is not set
 # CONFIG_MPU is not set
 
@@ -680,7 +680,7 @@ CONFIG_SCSI=y
 CONFIG_SCSI_DMA=y
 # CONFIG_SCSI_TGT is not set
 # CONFIG_SCSI_NETLINK is not set
-CONFIG_SCSI_PROC_FS=y
+# CONFIG_SCSI_PROC_FS is not set
 
 #
 # SCSI support type (disk, tape, CD-ROM)
index 042c7adfccfa994e42baba76eed0a56c081be836..69714fb3e608eb933b9f08ffdb70f27c61a50c26 100644 (file)
@@ -329,8 +329,8 @@ CONFIG_BFIN_ICACHE=y
 CONFIG_BFIN_DCACHE=y
 # CONFIG_BFIN_DCACHE_BANKA is not set
 # CONFIG_BFIN_ICACHE_LOCK is not set
-# CONFIG_BFIN_WB is not set
-CONFIG_BFIN_WT=y
+CONFIG_BFIN_WB=y
+# CONFIG_BFIN_WT is not set
 # CONFIG_BFIN_L2_CACHEABLE is not set
 # CONFIG_MPU is not set
 
index 3a20e281d23c7d26a79c18ce6e97d3c2d48c77dd..017c6ea071b5f1b42dffbebd478a8ed380a609ec 100644 (file)
@@ -288,8 +288,8 @@ CONFIG_BFIN_ICACHE=y
 CONFIG_BFIN_DCACHE=y
 # CONFIG_BFIN_DCACHE_BANKA is not set
 # CONFIG_BFIN_ICACHE_LOCK is not set
-# CONFIG_BFIN_WB is not set
-CONFIG_BFIN_WT=y
+CONFIG_BFIN_WB=y
+# CONFIG_BFIN_WT is not set
 # CONFIG_MPU is not set
 
 #
index 865ed85a5760e4ce27ac4d848c074fe8865dca6a..d880ef786770e3c4ab367a061e3d6e8379b428b1 100644 (file)
@@ -332,8 +332,8 @@ CONFIG_BFIN_ICACHE=y
 CONFIG_BFIN_DCACHE=y
 # CONFIG_BFIN_DCACHE_BANKA is not set
 # CONFIG_BFIN_ICACHE_LOCK is not set
-# CONFIG_BFIN_WB is not set
-CONFIG_BFIN_WT=y
+CONFIG_BFIN_WB=y
+# CONFIG_BFIN_WT is not set
 # CONFIG_MPU is not set
 
 #
index efe9741b1f146dd51e670a8c674741500bba5ac2..f410430b4e3d79a71e5ee2feaf0db29b1e3e5dc0 100644 (file)
@@ -336,8 +336,8 @@ CONFIG_BFIN_ICACHE=y
 CONFIG_BFIN_DCACHE=y
 # CONFIG_BFIN_DCACHE_BANKA is not set
 # CONFIG_BFIN_ICACHE_LOCK is not set
-# CONFIG_BFIN_WB is not set
-CONFIG_BFIN_WT=y
+CONFIG_BFIN_WB=y
+# CONFIG_BFIN_WT is not set
 CONFIG_L1_MAX_PIECE=16
 # CONFIG_MPU is not set
 
@@ -595,7 +595,7 @@ CONFIG_SCSI=y
 CONFIG_SCSI_DMA=y
 # CONFIG_SCSI_TGT is not set
 # CONFIG_SCSI_NETLINK is not set
-CONFIG_SCSI_PROC_FS=y
+# CONFIG_SCSI_PROC_FS is not set
 
 #
 # SCSI support type (disk, tape, CD-ROM)
index eae83b5de92f1ceca0360c9f2d4f130840c79713..7db93874c9875cfada3c72cb4138927f9840e9f0 100644 (file)
@@ -612,7 +612,7 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
 CONFIG_SCSI=y
 # CONFIG_SCSI_TGT is not set
 # CONFIG_SCSI_NETLINK is not set
-CONFIG_SCSI_PROC_FS=y
+# CONFIG_SCSI_PROC_FS is not set
 
 #
 # SCSI support type (disk, tape, CD-ROM)
index fa580affc9d6eaa26779e5182946ae2ff481e5e5..a46529c6ade337d406f7037e2e2d8b6ebdd919fe 100644 (file)
@@ -282,8 +282,8 @@ CONFIG_BFIN_ICACHE=y
 CONFIG_BFIN_DCACHE=y
 # CONFIG_BFIN_DCACHE_BANKA is not set
 # CONFIG_BFIN_ICACHE_LOCK is not set
-# CONFIG_BFIN_WB is not set
-CONFIG_BFIN_WT=y
+CONFIG_BFIN_WB=y
+# CONFIG_BFIN_WT is not set
 CONFIG_L1_MAX_PIECE=16
 
 #
index 606ecfdcc962e19dc68a8af35d730b2623603ebf..09c31418cc08dda85cb646998995bff825d00dbe 100644 (file)
@@ -1,3 +1,4 @@
 include include/asm-generic/Kbuild.asm
 
+unifdef-y += bfin_sport.h
 unifdef-y += fixed_code.h
index fe88a2c19213285ca49ceb17a38c756ae95b9682..65a651db5b072bf72d22b544ac9d3f1b7a809056 100644 (file)
@@ -1,30 +1,9 @@
 /*
- * File:         include/asm-blackfin/bfin_sport.h
- * Based on:
- * Author:       Roy Huang (roy.huang@analog.com)
+ * bfin_sport.h - userspace header for bfin sport driver
  *
- * Created:      Thu Aug. 24 2006
- * Description:
+ * Copyright 2004-2008 Analog Devices Inc.
  *
- * Modified:
- *               Copyright 2004-2006 Analog Devices Inc.
- *
- * Bugs:         Enter bugs at http://blackfin.uclinux.org/
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, see the file COPYING, or write
- * to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ * Licensed under the GPL-2 or later.
  */
 
 #ifndef __BFIN_SPORT_H__
 #define NORM_FORMAT    0x0
 #define ALAW_FORMAT    0x2
 #define ULAW_FORMAT    0x3
-struct sport_register;
 
 /* Function driver which use sport must initialize the structure */
 struct sport_config {
-       /*TDM (multichannels), I2S or other mode */
+       /* TDM (multichannels), I2S or other mode */
        unsigned int mode:3;
 
        /* if TDM mode is selected, channels must be set */
@@ -72,12 +50,18 @@ struct sport_config {
        int serial_clk;
        int fsync_clk;
 
-       unsigned int data_format:2;     /*Normal, u-law or a-law */
+       unsigned int data_format:2;     /* Normal, u-law or a-law */
 
        int word_len;           /* How length of the word in bits, 3-32 bits */
        int dma_enabled;
 };
 
+/* Userspace interface */
+#define SPORT_IOC_MAGIC                'P'
+#define SPORT_IOC_CONFIG       _IOWR('P', 0x01, struct sport_config)
+
+#ifdef __KERNEL__
+
 struct sport_register {
        unsigned short tcr1;
        unsigned short reserved0;
@@ -117,9 +101,6 @@ struct sport_register {
        unsigned long mrcs3;
 };
 
-#define SPORT_IOC_MAGIC                'P'
-#define SPORT_IOC_CONFIG       _IOWR('P', 0x01, struct sport_config)
-
 struct sport_dev {
        struct cdev cdev;       /* Char device structure */
 
@@ -149,6 +130,8 @@ struct sport_dev {
        struct sport_config config;
 };
 
+#endif
+
 #define SPORT_TCR1     0
 #define        SPORT_TCR2      1
 #define        SPORT_TCLKDIV   2
@@ -169,4 +152,4 @@ struct sport_dev {
 #define SPORT_MRCS2    22
 #define SPORT_MRCS3    23
 
-#endif                         /*__BFIN_SPORT_H__*/
+#endif
index 76f53d8b9a0d2e25650d34bc48c9b46cef536721..343b56361ec98db86252f75a3e0f01f07bbea7c1 100644 (file)
@@ -35,9 +35,9 @@
 #include <asm/atomic.h>
 #include <asm/traps.h>
 
-#define IPIPE_ARCH_STRING     "1.8-00"
+#define IPIPE_ARCH_STRING     "1.9-00"
 #define IPIPE_MAJOR_NUMBER    1
-#define IPIPE_MINOR_NUMBER    8
+#define IPIPE_MINOR_NUMBER    9
 #define IPIPE_PATCH_NUMBER    0
 
 #ifdef CONFIG_SMP
@@ -83,9 +83,9 @@ struct ipipe_sysinfo {
                                "%2 = CYCLES2\n"                \
                                "CC = %2 == %0\n"               \
                                "if ! CC jump 1b\n"             \
-                               : "=r" (((unsigned long *)&t)[1]),      \
-                                 "=r" (((unsigned long *)&t)[0]),      \
-                                 "=r" (__cy2)                          \
+                               : "=d,a" (((unsigned long *)&t)[1]),    \
+                                 "=d,a" (((unsigned long *)&t)[0]),    \
+                                 "=d,a" (__cy2)                                \
                                : /*no input*/ : "CC");                 \
        t;                                                              \
        })
@@ -118,35 +118,40 @@ void __ipipe_disable_irqdesc(struct ipipe_domain *ipd,
 
 #define __ipipe_disable_irq(irq)       (irq_desc[irq].chip->mask(irq))
 
-#define __ipipe_lock_root()                                    \
-       set_bit(IPIPE_ROOTLOCK_FLAG, &ipipe_root_domain->flags)
+static inline int __ipipe_check_tickdev(const char *devname)
+{
+       return 1;
+}
 
-#define __ipipe_unlock_root()                                  \
-       clear_bit(IPIPE_ROOTLOCK_FLAG, &ipipe_root_domain->flags)
+static inline void __ipipe_lock_root(void)
+{
+       set_bit(IPIPE_SYNCDEFER_FLAG, &ipipe_root_cpudom_var(status));
+}
+
+static inline void __ipipe_unlock_root(void)
+{
+       clear_bit(IPIPE_SYNCDEFER_FLAG, &ipipe_root_cpudom_var(status));
+}
 
 void __ipipe_enable_pipeline(void);
 
 #define __ipipe_hook_critical_ipi(ipd) do { } while (0)
 
-#define __ipipe_sync_pipeline(syncmask)                                        \
-       do {                                                            \
-               struct ipipe_domain *ipd = ipipe_current_domain;        \
-               if (likely(ipd != ipipe_root_domain || !test_bit(IPIPE_ROOTLOCK_FLAG, &ipd->flags))) \
-                       __ipipe_sync_stage(syncmask);                   \
-       } while (0)
+#define __ipipe_sync_pipeline  ___ipipe_sync_pipeline
+void ___ipipe_sync_pipeline(unsigned long syncmask);
 
 void __ipipe_handle_irq(unsigned irq, struct pt_regs *regs);
 
 int __ipipe_get_irq_priority(unsigned irq);
 
-int __ipipe_get_irqthread_priority(unsigned irq);
-
 void __ipipe_stall_root_raw(void);
 
 void __ipipe_unstall_root_raw(void);
 
 void __ipipe_serial_debug(const char *fmt, ...);
 
+asmlinkage void __ipipe_call_irqtail(unsigned long addr);
+
 DECLARE_PER_CPU(struct pt_regs, __ipipe_tick_regs);
 
 extern unsigned long __ipipe_core_clock;
@@ -162,42 +167,25 @@ static inline unsigned long __ipipe_ffnz(unsigned long ul)
 
 #define __ipipe_run_irqtail()  /* Must be a macro */                   \
        do {                                                            \
-               asmlinkage void __ipipe_call_irqtail(void);             \
                unsigned long __pending;                                \
-               CSYNC();                                        \
+               CSYNC();                                                \
                __pending = bfin_read_IPEND();                          \
                if (__pending & 0x8000) {                               \
                        __pending &= ~0x8010;                           \
                        if (__pending && (__pending & (__pending - 1)) == 0) \
-                               __ipipe_call_irqtail();                 \
+                               __ipipe_call_irqtail(__ipipe_irq_tail_hook); \
                }                                                       \
        } while (0)
 
 #define __ipipe_run_isr(ipd, irq)                                      \
        do {                                                            \
                if (ipd == ipipe_root_domain) {                         \
-                       /*                                              \
-                        * Note: the I-pipe implements a threaded interrupt model on \
-                        * this arch for Linux external IRQs. The interrupt handler we \
-                        * call here only wakes up the associated IRQ thread. \
-                        */                                             \
-                       if (ipipe_virtual_irq_p(irq)) {                 \
-                               /* No irqtail here; virtual interrupts have no effect \
-                                  on IPEND so there is no need for processing \
-                                  deferral. */                         \
-                               local_irq_enable_nohead(ipd);           \
+                       local_irq_enable_hw();                          \
+                       if (ipipe_virtual_irq_p(irq))                   \
                                ipd->irqs[irq].handler(irq, ipd->irqs[irq].cookie); \
-                               local_irq_disable_nohead(ipd);          \
-                       } else                                          \
-                               /*                                      \
-                                * No need to run the irqtail here either; \
-                                * we can't be preempted by hw IRQs, so \
-                                * non-Linux IRQs cannot stack over the short \
-                                * thread wakeup code. Which in turn means \
-                                * that no irqtail condition could be pending \
-                                * for domains above Linux in the pipeline. \
-                                */                                     \
+                       else                                            \
                                ipd->irqs[irq].handler(irq, &__raw_get_cpu_var(__ipipe_tick_regs)); \
+                       local_irq_disable_hw();                         \
                } else {                                                \
                        __clear_bit(IPIPE_SYNC_FLAG, &ipipe_cpudom_var(ipd, status)); \
                        local_irq_enable_nohead(ipd);                   \
@@ -217,42 +205,24 @@ void ipipe_init_irq_threads(void);
 
 int ipipe_start_irq_thread(unsigned irq, struct irq_desc *desc);
 
-#define IS_SYSIRQ(irq)         ((irq) > IRQ_CORETMR && (irq) <= SYS_IRQS)
-#define IS_GPIOIRQ(irq)                ((irq) >= GPIO_IRQ_BASE && (irq) < NR_IRQS)
-
+#ifdef CONFIG_GENERIC_CLOCKEVENTS
+#define IRQ_SYSTMR             IRQ_CORETMR
+#define IRQ_PRIOTMR            IRQ_CORETMR
+#else
 #define IRQ_SYSTMR             IRQ_TIMER0
 #define IRQ_PRIOTMR            CONFIG_IRQ_TIMER0
+#endif
 
-#if defined(CONFIG_BF531) || defined(CONFIG_BF532) || defined(CONFIG_BF533)
-#define PRIO_GPIODEMUX(irq)    CONFIG_PFA
-#elif defined(CONFIG_BF534) || defined(CONFIG_BF536) || defined(CONFIG_BF537)
-#define PRIO_GPIODEMUX(irq)    CONFIG_IRQ_PROG_INTA
-#elif defined(CONFIG_BF52x)
-#define PRIO_GPIODEMUX(irq)    ((irq) == IRQ_PORTF_INTA ? CONFIG_IRQ_PORTF_INTA : \
-                                (irq) == IRQ_PORTG_INTA ? CONFIG_IRQ_PORTG_INTA : \
-                                (irq) == IRQ_PORTH_INTA ? CONFIG_IRQ_PORTH_INTA : \
-                                -1)
-#elif defined(CONFIG_BF561)
-#define PRIO_GPIODEMUX(irq)    ((irq) == IRQ_PROG0_INTA ? CONFIG_IRQ_PROG0_INTA : \
-                                (irq) == IRQ_PROG1_INTA ? CONFIG_IRQ_PROG1_INTA : \
-                                (irq) == IRQ_PROG2_INTA ? CONFIG_IRQ_PROG2_INTA : \
-                                -1)
+#ifdef CONFIG_BF561
 #define bfin_write_TIMER_DISABLE(val)  bfin_write_TMRS8_DISABLE(val)
 #define bfin_write_TIMER_ENABLE(val)   bfin_write_TMRS8_ENABLE(val)
 #define bfin_write_TIMER_STATUS(val)   bfin_write_TMRS8_STATUS(val)
 #define bfin_read_TIMER_STATUS()       bfin_read_TMRS8_STATUS()
 #elif defined(CONFIG_BF54x)
-#define PRIO_GPIODEMUX(irq)    ((irq) == IRQ_PINT0 ? CONFIG_IRQ_PINT0 : \
-                                (irq) == IRQ_PINT1 ? CONFIG_IRQ_PINT1 : \
-                                (irq) == IRQ_PINT2 ? CONFIG_IRQ_PINT2 : \
-                                (irq) == IRQ_PINT3 ? CONFIG_IRQ_PINT3 : \
-                                -1)
 #define bfin_write_TIMER_DISABLE(val)  bfin_write_TIMER_DISABLE0(val)
 #define bfin_write_TIMER_ENABLE(val)   bfin_write_TIMER_ENABLE0(val)
 #define bfin_write_TIMER_STATUS(val)   bfin_write_TIMER_STATUS0(val)
 #define bfin_read_TIMER_STATUS(val)    bfin_read_TIMER_STATUS0(val)
-#else
-# error "no PRIO_GPIODEMUX() for this part"
 #endif
 
 #define __ipipe_root_tick_p(regs)      ((regs->ipend & 0x10) != 0)
@@ -275,4 +245,6 @@ int ipipe_start_irq_thread(unsigned irq, struct irq_desc *desc);
 
 #endif /* !CONFIG_IPIPE */
 
+#define ipipe_update_tick_evtdev(evtdev)       do { } while (0)
+
 #endif /* !__ASM_BLACKFIN_IPIPE_H */
index cb1025aeabcfc1c6ff89f74bf1ae2fa3cc37ba63..3e8acbd1a3bee6843e348a942e7cc476bfd51918 100644 (file)
@@ -1,5 +1,5 @@
 /*   -*- linux-c -*-
- *   include/asm-blackfin/_baseipipe.h
+ *   include/asm-blackfin/ipipe_base.h
  *
  *   Copyright (C) 2007 Philippe Gerum.
  *
@@ -27,8 +27,9 @@
 #define IPIPE_NR_XIRQS         NR_IRQS
 #define IPIPE_IRQ_ISHIFT       5       /* 2^5 for 32bits arch. */
 
-/* Blackfin-specific, global domain flags */
-#define IPIPE_ROOTLOCK_FLAG    1       /* Lock pipeline for root */
+/* Blackfin-specific, per-cpu pipeline status */
+#define IPIPE_SYNCDEFER_FLAG   15
+#define IPIPE_SYNCDEFER_MASK   (1L << IPIPE_SYNCDEFER_MASK)
 
  /* Blackfin traps -- i.e. exception vector numbers */
 #define IPIPE_NR_FAULTS                52 /* We leave a gap after VEC_ILL_RES. */
 
 #ifndef __ASSEMBLY__
 
-#include <linux/bitops.h>
-
-extern int test_bit(int nr, const void *addr);
-
-
 extern unsigned long __ipipe_root_status; /* Alias to ipipe_root_cpudom_var(status) */
 
 static inline void __ipipe_stall_root(void)
index 3d977909ce7da0a41179af244608d85eb0ab2c1b..7645e85a5f6f70319c2a20158c0f5d39fbe84ce7 100644 (file)
@@ -61,20 +61,38 @@ void __ipipe_restore_root(unsigned long flags);
 #define raw_irqs_disabled_flags(flags) (!irqs_enabled_from_flags_hw(flags))
 #define local_test_iflag_hw(x)         irqs_enabled_from_flags_hw(x)
 
-#define local_save_flags(x)                                            \
-       do {                                                            \
-               (x) = __ipipe_test_root() ? \
+#define local_save_flags(x)                                     \
+       do {                                                     \
+               (x) = __ipipe_test_root() ?                      \
                        __all_masked_irq_flags : bfin_irq_flags; \
+               barrier();                                       \
        } while (0)
 
-#define local_irq_save(x)                              \
-       do {                                            \
-               (x) = __ipipe_test_and_stall_root();    \
+#define local_irq_save(x)                                       \
+       do {                                                     \
+               (x) = __ipipe_test_and_stall_root() ?            \
+                       __all_masked_irq_flags : bfin_irq_flags; \
+               barrier();                                       \
+       } while (0)
+
+static inline void local_irq_restore(unsigned long x)
+{
+       barrier();
+       __ipipe_restore_root(x == __all_masked_irq_flags);
+}
+
+#define local_irq_disable()                    \
+       do {                                    \
+               __ipipe_stall_root();           \
+               barrier();                      \
        } while (0)
 
-#define local_irq_restore(x)   __ipipe_restore_root(x)
-#define local_irq_disable()    __ipipe_stall_root()
-#define local_irq_enable()     __ipipe_unstall_root()
+static inline void local_irq_enable(void)
+{
+       barrier();
+       __ipipe_unstall_root();
+}
+
 #define irqs_disabled()                __ipipe_test_root()
 
 #define local_save_flags_hw(x) \
index e721ce55956c6a96782e3093c76aa88b11914eb6..2920087516f2a08175b54ed3086844434db937c9 100644 (file)
@@ -122,6 +122,7 @@ static inline struct thread_info *current_thread_info(void)
 #define TIF_MEMDIE              4
 #define TIF_RESTORE_SIGMASK    5       /* restore signal mask in do_signal() */
 #define TIF_FREEZE              6       /* is freezing for suspend */
+#define TIF_IRQ_SYNC            7       /* sync pipeline stage */
 
 /* as above, but as bit values */
 #define _TIF_SYSCALL_TRACE     (1<<TIF_SYSCALL_TRACE)
@@ -130,6 +131,7 @@ static inline struct thread_info *current_thread_info(void)
 #define _TIF_POLLING_NRFLAG    (1<<TIF_POLLING_NRFLAG)
 #define _TIF_RESTORE_SIGMASK   (1<<TIF_RESTORE_SIGMASK)
 #define _TIF_FREEZE             (1<<TIF_FREEZE)
+#define _TIF_IRQ_SYNC           (1<<TIF_IRQ_SYNC)
 
 #define _TIF_WORK_MASK         0x0000FFFE      /* work to do on interrupt/exception return */
 
index 4a92a86824b7bd1d6164eae8d8dcb2ca08bbfd80..fd4d4328a0f2aa94fb5ef97afcc01f0018e89edf 100644 (file)
@@ -15,13 +15,15 @@ else
     obj-y += time.o
 endif
 
-CFLAGS_kgdb_test.o := -mlong-calls -O0
-
 obj-$(CONFIG_IPIPE)                  += ipipe.o
 obj-$(CONFIG_IPIPE_TRACE_MCOUNT)     += mcount.o
 obj-$(CONFIG_BFIN_GPTIMERS)          += gptimers.o
 obj-$(CONFIG_CPLB_INFO)              += cplbinfo.o
 obj-$(CONFIG_MODULES)                += module.o
 obj-$(CONFIG_KGDB)                   += kgdb.o
-obj-$(CONFIG_KGDB_TESTCASE)          += kgdb_test.o
+obj-$(CONFIG_KGDB_TESTS)             += kgdb_test.o
 obj-$(CONFIG_EARLY_PRINTK)           += early_printk.o
+
+# the kgdb test puts code into L2 and without linker
+# relaxation, we need to force long calls to/from it
+CFLAGS_kgdb_test.o := -mlong-calls -O0
index 0e28f75957330d92406b08adbc13024b9e5017c8..d6c067782e638987ba406164f6df65adeb0b15db 100644 (file)
@@ -53,9 +53,13 @@ void __init generate_cplb_tables_cpu(unsigned int cpu)
 
        i_d = i_i = 0;
 
+#ifdef CONFIG_DEBUG_HUNT_FOR_ZERO
        /* Set up the zero page.  */
        d_tbl[i_d].addr = 0;
        d_tbl[i_d++].data = SDRAM_OOPS | PAGE_SIZE_1KB;
+       i_tbl[i_i].addr = 0;
+       i_tbl[i_i++].data = SDRAM_OOPS | PAGE_SIZE_1KB;
+#endif
 
        /* Cover kernel memory with 4M pages.  */
        addr = 0;
index 339be5a3ae6a64f3f6bcc7bf9f9514a86b167ed8..a5de8d45424cda8b29f21d338e6224c94892cb1b 100644 (file)
 #include <asm/atomic.h>
 #include <asm/io.h>
 
-static int create_irq_threads;
-
 DEFINE_PER_CPU(struct pt_regs, __ipipe_tick_regs);
 
-static DEFINE_PER_CPU(unsigned long, pending_irqthread_mask);
-
-static DEFINE_PER_CPU(int [IVG13 + 1], pending_irq_count);
-
 asmlinkage void asm_do_IRQ(unsigned int irq, struct pt_regs *regs);
 
 static void __ipipe_no_irqtail(void);
@@ -93,6 +87,7 @@ void __ipipe_enable_pipeline(void)
  */
 void __ipipe_handle_irq(unsigned irq, struct pt_regs *regs)
 {
+       struct ipipe_percpu_domain_data *p = ipipe_root_cpudom_ptr();
        struct ipipe_domain *this_domain, *next_domain;
        struct list_head *head, *pos;
        int m_ack, s = -1;
@@ -104,7 +99,6 @@ void __ipipe_handle_irq(unsigned irq, struct pt_regs *regs)
         * interrupt.
         */
        m_ack = (regs == NULL || irq == IRQ_SYSTMR || irq == IRQ_CORETMR);
-
        this_domain = ipipe_current_domain;
 
        if (unlikely(test_bit(IPIPE_STICKY_FLAG, &this_domain->irqs[irq].control)))
@@ -114,49 +108,28 @@ void __ipipe_handle_irq(unsigned irq, struct pt_regs *regs)
                next_domain = list_entry(head, struct ipipe_domain, p_link);
                if (likely(test_bit(IPIPE_WIRED_FLAG, &next_domain->irqs[irq].control))) {
                        if (!m_ack && next_domain->irqs[irq].acknowledge != NULL)
-                               next_domain->irqs[irq].acknowledge(irq, irq_desc + irq);
-                       if (test_bit(IPIPE_ROOTLOCK_FLAG, &ipipe_root_domain->flags))
-                               s = __test_and_set_bit(IPIPE_STALL_FLAG,
-                                                      &ipipe_root_cpudom_var(status));
+                               next_domain->irqs[irq].acknowledge(irq, irq_to_desc(irq));
+                       if (test_bit(IPIPE_SYNCDEFER_FLAG, &p->status))
+                               s = __test_and_set_bit(IPIPE_STALL_FLAG, &p->status);
                        __ipipe_dispatch_wired(next_domain, irq);
-                               goto finalize;
-                       return;
+                       goto out;
                }
        }
 
        /* Ack the interrupt. */
 
        pos = head;
-
        while (pos != &__ipipe_pipeline) {
                next_domain = list_entry(pos, struct ipipe_domain, p_link);
-               /*
-                * For each domain handling the incoming IRQ, mark it
-                * as pending in its log.
-                */
                if (test_bit(IPIPE_HANDLE_FLAG, &next_domain->irqs[irq].control)) {
-                       /*
-                        * Domains that handle this IRQ are polled for
-                        * acknowledging it by decreasing priority
-                        * order. The interrupt must be made pending
-                        * _first_ in the domain's status flags before
-                        * the PIC is unlocked.
-                        */
                        __ipipe_set_irq_pending(next_domain, irq);
-
                        if (!m_ack && next_domain->irqs[irq].acknowledge != NULL) {
-                               next_domain->irqs[irq].acknowledge(irq, irq_desc + irq);
+                               next_domain->irqs[irq].acknowledge(irq, irq_to_desc(irq));
                                m_ack = 1;
                        }
                }
-
-               /*
-                * If the domain does not want the IRQ to be passed
-                * down the interrupt pipe, exit the loop now.
-                */
                if (!test_bit(IPIPE_PASS_FLAG, &next_domain->irqs[irq].control))
                        break;
-
                pos = next_domain->p_link.next;
        }
 
@@ -166,18 +139,24 @@ void __ipipe_handle_irq(unsigned irq, struct pt_regs *regs)
         * immediately to the current domain if the interrupt has been
         * marked as 'sticky'. This search does not go beyond the
         * current domain in the pipeline. We also enforce the
-        * additional root stage lock (blackfin-specific). */
+        * additional root stage lock (blackfin-specific).
+        */
+       if (test_bit(IPIPE_SYNCDEFER_FLAG, &p->status))
+               s = __test_and_set_bit(IPIPE_STALL_FLAG, &p->status);
 
-       if (test_bit(IPIPE_ROOTLOCK_FLAG, &ipipe_root_domain->flags))
-               s = __test_and_set_bit(IPIPE_STALL_FLAG,
-                                      &ipipe_root_cpudom_var(status));
-finalize:
+       /*
+        * If the interrupt preempted the head domain, then do not
+        * even try to walk the pipeline, unless an interrupt is
+        * pending for it.
+        */
+       if (test_bit(IPIPE_AHEAD_FLAG, &this_domain->flags) &&
+           ipipe_head_cpudom_var(irqpend_himask) == 0)
+               goto out;
 
        __ipipe_walk_pipeline(head);
-
+out:
        if (!s)
-               __clear_bit(IPIPE_STALL_FLAG,
-                           &ipipe_root_cpudom_var(status));
+               __clear_bit(IPIPE_STALL_FLAG, &p->status);
 }
 
 int __ipipe_check_root(void)
@@ -187,7 +166,7 @@ int __ipipe_check_root(void)
 
 void __ipipe_enable_irqdesc(struct ipipe_domain *ipd, unsigned irq)
 {
-       struct irq_desc *desc = irq_desc + irq;
+       struct irq_desc *desc = irq_to_desc(irq);
        int prio = desc->ic_prio;
 
        desc->depth = 0;
@@ -199,7 +178,7 @@ EXPORT_SYMBOL(__ipipe_enable_irqdesc);
 
 void __ipipe_disable_irqdesc(struct ipipe_domain *ipd, unsigned irq)
 {
-       struct irq_desc *desc = irq_desc + irq;
+       struct irq_desc *desc = irq_to_desc(irq);
        int prio = desc->ic_prio;
 
        if (ipd != &ipipe_root &&
@@ -236,15 +215,18 @@ int __ipipe_syscall_root(struct pt_regs *regs)
 {
        unsigned long flags;
 
-       /* We need to run the IRQ tail hook whenever we don't
+       /*
+        * We need to run the IRQ tail hook whenever we don't
         * propagate a syscall to higher domains, because we know that
         * important operations might be pending there (e.g. Xenomai
-        * deferred rescheduling). */
+        * deferred rescheduling).
+        */
 
-       if (!__ipipe_syscall_watched_p(current, regs->orig_p0)) {
+       if (regs->orig_p0 < NR_syscalls) {
                void (*hook)(void) = (void (*)(void))__ipipe_irq_tail_hook;
                hook();
-               return 0;
+               if ((current->flags & PF_EVNOTIFY) == 0)
+                       return 0;
        }
 
        /*
@@ -312,112 +294,46 @@ int ipipe_trigger_irq(unsigned irq)
 {
        unsigned long flags;
 
+#ifdef CONFIG_IPIPE_DEBUG
        if (irq >= IPIPE_NR_IRQS ||
            (ipipe_virtual_irq_p(irq)
             && !test_bit(irq - IPIPE_VIRQ_BASE, &__ipipe_virtual_irq_map)))
                return -EINVAL;
+#endif
 
        local_irq_save_hw(flags);
-
        __ipipe_handle_irq(irq, NULL);
-
        local_irq_restore_hw(flags);
 
        return 1;
 }
 
-/* Move Linux IRQ to threads. */
-
-static int do_irqd(void *__desc)
+asmlinkage void __ipipe_sync_root(void)
 {
-       struct irq_desc *desc = __desc;
-       unsigned irq = desc - irq_desc;
-       int thrprio = desc->thr_prio;
-       int thrmask = 1 << thrprio;
-       int cpu = smp_processor_id();
-       cpumask_t cpumask;
-
-       sigfillset(&current->blocked);
-       current->flags |= PF_NOFREEZE;
-       cpumask = cpumask_of_cpu(cpu);
-       set_cpus_allowed(current, cpumask);
-       ipipe_setscheduler_root(current, SCHED_FIFO, 50 + thrprio);
-
-       while (!kthread_should_stop()) {
-               local_irq_disable();
-               if (!(desc->status & IRQ_SCHEDULED)) {
-                       set_current_state(TASK_INTERRUPTIBLE);
-resched:
-                       local_irq_enable();
-                       schedule();
-                       local_irq_disable();
-               }
-               __set_current_state(TASK_RUNNING);
-               /*
-                * If higher priority interrupt servers are ready to
-                * run, reschedule immediately. We need this for the
-                * GPIO demux IRQ handler to unmask the interrupt line
-                * _last_, after all GPIO IRQs have run.
-                */
-               if (per_cpu(pending_irqthread_mask, cpu) & ~(thrmask|(thrmask-1)))
-                       goto resched;
-               if (--per_cpu(pending_irq_count[thrprio], cpu) == 0)
-                       per_cpu(pending_irqthread_mask, cpu) &= ~thrmask;
-               desc->status &= ~IRQ_SCHEDULED;
-               desc->thr_handler(irq, &__raw_get_cpu_var(__ipipe_tick_regs));
-               local_irq_enable();
-       }
-       __set_current_state(TASK_RUNNING);
-       return 0;
-}
+       unsigned long flags;
 
-static void kick_irqd(unsigned irq, void *cookie)
-{
-       struct irq_desc *desc = irq_desc + irq;
-       int thrprio = desc->thr_prio;
-       int thrmask = 1 << thrprio;
-       int cpu = smp_processor_id();
-
-       if (!(desc->status & IRQ_SCHEDULED)) {
-               desc->status |= IRQ_SCHEDULED;
-               per_cpu(pending_irqthread_mask, cpu) |= thrmask;
-               ++per_cpu(pending_irq_count[thrprio], cpu);
-               wake_up_process(desc->thread);
-       }
-}
+       BUG_ON(irqs_disabled());
 
-int ipipe_start_irq_thread(unsigned irq, struct irq_desc *desc)
-{
-       if (desc->thread || !create_irq_threads)
-               return 0;
-
-       desc->thread = kthread_create(do_irqd, desc, "IRQ %d", irq);
-       if (desc->thread == NULL) {
-               printk(KERN_ERR "irqd: could not create IRQ thread %d!\n", irq);
-               return -ENOMEM;
-       }
+       local_irq_save_hw(flags);
 
-       wake_up_process(desc->thread);
+       clear_thread_flag(TIF_IRQ_SYNC);
 
-       desc->thr_handler = ipipe_root_domain->irqs[irq].handler;
-       ipipe_root_domain->irqs[irq].handler = &kick_irqd;
+       if (ipipe_root_cpudom_var(irqpend_himask) != 0)
+               __ipipe_sync_pipeline(IPIPE_IRQMASK_ANY);
 
-       return 0;
+       local_irq_restore_hw(flags);
 }
 
-void __init ipipe_init_irq_threads(void)
+void ___ipipe_sync_pipeline(unsigned long syncmask)
 {
-       unsigned irq;
-       struct irq_desc *desc;
-
-       create_irq_threads = 1;
+       struct ipipe_domain *ipd = ipipe_current_domain;
 
-       for (irq = 0; irq < NR_IRQS; irq++) {
-               desc = irq_desc + irq;
-               if (desc->action != NULL ||
-                       (desc->status & IRQ_NOREQUEST) != 0)
-                       ipipe_start_irq_thread(irq, desc);
+       if (ipd == ipipe_root_domain) {
+               if (test_bit(IPIPE_SYNCDEFER_FLAG, &ipipe_root_cpudom_var(status)))
+                       return;
        }
+
+       __ipipe_sync_stage(syncmask);
 }
 
 EXPORT_SYMBOL(show_stack);
index 75724eee6494c65c87545e14682f8cfe213877dd..7fd12656484666ee4c29784a1d2d1e0e4e5fee04 100644 (file)
@@ -144,11 +144,15 @@ asmlinkage void asm_do_IRQ(unsigned int irq, struct pt_regs *regs)
 #endif
        generic_handle_irq(irq);
 
-#ifndef CONFIG_IPIPE   /* Useless and bugous over the I-pipe: IRQs are threaded. */
-       /* If we're the only interrupt running (ignoring IRQ15 which is for
-          syscalls), lower our priority to IRQ14 so that softirqs run at
-          that level.  If there's another, lower-level interrupt, irq_exit
-          will defer softirqs to that.  */
+#ifndef CONFIG_IPIPE
+       /*
+        * If we're the only interrupt running (ignoring IRQ15 which
+        * is for syscalls), lower our priority to IRQ14 so that
+        * softirqs run at that level.  If there's another,
+        * lower-level interrupt, irq_exit will defer softirqs to
+        * that. If the interrupt pipeline is enabled, we are already
+        * running at IRQ14 priority, so we don't need this code.
+        */
        CSYNC();
        pending = bfin_read_IPEND() & ~0x8000;
        other_ints = pending & (pending - 1);
index 3dba9c17304a86006a7a3ad2709ea0cf361c3998..dbcf3e45cb0baefef5136967e33744fef40b64fb 100644 (file)
@@ -20,6 +20,7 @@
 static char cmdline[256];
 static unsigned long len;
 
+#ifndef CONFIG_SMP
 static int num1 __attribute__((l1_data));
 
 void kgdb_l1_test(void) __attribute__((l1_text));
@@ -32,6 +33,8 @@ void kgdb_l1_test(void)
        printk(KERN_ALERT "L1(after change) : data variable addr = 0x%p, data value is %d\n", &num1, num1);
        return ;
 }
+#endif
+
 #if L2_LENGTH
 
 static int num2 __attribute__((l2));
@@ -59,10 +62,12 @@ int kgdb_test(char *name, int len, int count, int z)
 static int test_proc_output(char *buf)
 {
        kgdb_test("hello world!", 12, 0x55, 0x10);
+#ifndef CONFIG_SMP
        kgdb_l1_test();
-       #if L2_LENGTH
+#endif
+#if L2_LENGTH
        kgdb_l2_test();
-       #endif
+#endif
 
        return 0;
 }
index 594e325b40e4fa078ce1c7aee07041a20a0ac4d0..d76618db50df8c4e3f4c06cb44d09906e5b41147 100644 (file)
@@ -45,6 +45,7 @@
 #include <asm/asm-offsets.h>
 #include <asm/dma.h>
 #include <asm/fixed_code.h>
+#include <asm/cacheflush.h>
 #include <asm/mem_map.h>
 
 #define TEXT_OFFSET 0
@@ -240,7 +241,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
 
                        } else if (addr >= FIXED_CODE_START
                            && addr + sizeof(tmp) <= FIXED_CODE_END) {
-                               memcpy(&tmp, (const void *)(addr), sizeof(tmp));
+                               copy_from_user_page(0, 0, 0, &tmp, (const void *)(addr), sizeof(tmp));
                                copied = sizeof(tmp);
 
                        } else
@@ -320,7 +321,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
 
                        } else if (addr >= FIXED_CODE_START
                            && addr + sizeof(data) <= FIXED_CODE_END) {
-                               memcpy((void *)(addr), &data, sizeof(data));
+                               copy_to_user_page(0, 0, 0, (void *)(addr), &data, sizeof(data));
                                copied = sizeof(data);
 
                        } else
index e5c11623080015fec2cf4a2f671639448f745277..a58687bdee6a6580031d6903526774c3f35e1625 100644 (file)
@@ -889,6 +889,10 @@ void __init setup_arch(char **cmdline_p)
                               CPU, bfin_revid());
        }
 
+       /* We can't run on BF548-0.1 due to ANOMALY 05000448 */
+       if (bfin_cpuid() == 0x27de && bfin_revid() == 1)
+               panic("You can't run on this processor due to 05000448\n");
+
        printk(KERN_INFO "Blackfin Linux support by http://blackfin.uclinux.org/\n");
 
        printk(KERN_INFO "Processor Speed: %lu MHz core clock and %lu MHz System Clock\n",
@@ -1141,12 +1145,12 @@ static int show_cpuinfo(struct seq_file *m, void *v)
                icache_size = 0;
 
        seq_printf(m, "cache size\t: %d KB(L1 icache) "
-               "%d KB(L1 dcache-%s) %d KB(L2 cache)\n",
+               "%d KB(L1 dcache%s) %d KB(L2 cache)\n",
                icache_size, dcache_size,
 #if defined CONFIG_BFIN_WB
-               "wb"
+               "-wb"
 #elif defined CONFIG_BFIN_WT
-               "wt"
+               "-wt"
 #endif
                "", 0);
 
index 172b4c588467ff2a51fbcc5993a4507d39e83d91..1bbacfbd4c5d7c6198496fa939a7920dc36319d4 100644 (file)
@@ -134,7 +134,10 @@ irqreturn_t timer_interrupt(int irq, void *dummy)
 
        write_seqlock(&xtime_lock);
 #if defined(CONFIG_TICK_SOURCE_SYSTMR0) && !defined(CONFIG_IPIPE)
-/* FIXME: Here TIMIL0 is not set when IPIPE enabled, why? */
+       /*
+        * TIMIL0 is latched in __ipipe_grab_irq() when the I-Pipe is
+        * enabled.
+        */
        if (get_gptimer_status(0) & TIMER_STATUS_TIMIL0) {
 #endif
                do_timer(1);
index 0e175342112e45340d72fbe558234d97840027a2..41f2eacfef207339d53d7dbf1de90b78e7d3a8f2 100644 (file)
@@ -113,7 +113,6 @@ static struct platform_device bfin_mac_device = {
        .name = "bfin_mac",
        .dev.platform_data = &bfin_mii_bus,
 };
-#endif
 
 #if defined(CONFIG_NET_DSA_KSZ8893M) || defined(CONFIG_NET_DSA_KSZ8893M_MODULE)
 static struct dsa_platform_data ksz8893m_switch_data = {
@@ -132,6 +131,7 @@ static struct platform_device ksz8893m_switch_device = {
        .dev.platform_data = &ksz8893m_switch_data,
 };
 #endif
+#endif
 
 #if defined(CONFIG_MTD_M25P80) \
        || defined(CONFIG_MTD_M25P80_MODULE)
@@ -171,6 +171,7 @@ static struct bfin5xx_spi_chip spi_adc_chip_info = {
 };
 #endif
 
+#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
 #if defined(CONFIG_NET_DSA_KSZ8893M) \
        || defined(CONFIG_NET_DSA_KSZ8893M_MODULE)
 /* SPI SWITCH CHIP */
@@ -179,10 +180,11 @@ static struct bfin5xx_spi_chip spi_switch_info = {
        .bits_per_word = 8,
 };
 #endif
+#endif
 
-#if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
-static struct bfin5xx_spi_chip spi_mmc_chip_info = {
-       .enable_dma = 1,
+#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
+static struct bfin5xx_spi_chip mmc_spi_chip_info = {
+       .enable_dma = 0,
        .bits_per_word = 8,
 };
 #endif
@@ -259,6 +261,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
        },
 #endif
 
+#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
 #if defined(CONFIG_NET_DSA_KSZ8893M) \
        || defined(CONFIG_NET_DSA_KSZ8893M_MODULE)
        {
@@ -271,24 +274,15 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
                .mode = SPI_MODE_3,
        },
 #endif
+#endif
 
-#if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
+#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
        {
-               .modalias = "spi_mmc_dummy",
+               .modalias = "mmc_spi",
                .max_speed_hz = 25000000,     /* max spi clock (SCK) speed in HZ */
                .bus_num = 0,
-               .chip_select = 0,
-               .platform_data = NULL,
-               .controller_data = &spi_mmc_chip_info,
-               .mode = SPI_MODE_3,
-       },
-       {
-               .modalias = "spi_mmc",
-               .max_speed_hz = 25000000,     /* max spi clock (SCK) speed in HZ */
-               .bus_num = 0,
-               .chip_select = CONFIG_SPI_MMC_CS_CHAN,
-               .platform_data = NULL,
-               .controller_data = &spi_mmc_chip_info,
+               .chip_select = 5,
+               .controller_data = &mmc_spi_chip_info,
                .mode = SPI_MODE_3,
        },
 #endif
@@ -630,11 +624,10 @@ static struct platform_device *stamp_devices[] __initdata = {
 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
        &bfin_mii_bus,
        &bfin_mac_device,
-#endif
-
 #if defined(CONFIG_NET_DSA_KSZ8893M) || defined(CONFIG_NET_DSA_KSZ8893M_MODULE)
        &ksz8893m_switch_device,
 #endif
+#endif
 
 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
        &bfin_spi0_device,
index e5b4bef0edaea0c9966297e608946cd9a87ee959..c847bb101076399cbb3bc510adf5946e42ddecff 100644 (file)
@@ -2,12 +2,12 @@
  * File: include/asm-blackfin/mach-bf518/anomaly.h
  * Bugs: Enter bugs at http://blackfin.uclinux.org/
  *
- * Copyright (C) 2004-2008 Analog Devices Inc.
+ * Copyright (C) 2004-2009 Analog Devices Inc.
  * Licensed under the GPL-2 or later.
  */
 
 /* This file shoule be up to date with:
- *  - ????
+ *  - Revision B, 02/03/2009; ADSP-BF512/BF514/BF516/BF518 Blackfin Processor Anomaly List
  */
 
 #ifndef _MACH_ANOMALY_H_
@@ -19,6 +19,8 @@
 #define ANOMALY_05000122 (1)
 /* False Hardware Error from an Access in the Shadow of a Conditional Branch */
 #define ANOMALY_05000245 (1)
+/* Incorrect Timer Pulse Width in Single-Shot PWM_OUT Mode with External Clock */
+#define ANOMALY_05000254 (1)
 /* Sensitivity To Noise with Slow Input Edge Rates on External SPORT TX and RX Clocks */
 #define ANOMALY_05000265 (1)
 /* False Hardware Errors Caused by Fetches at the Boundary of Reserved Memory */
 #define ANOMALY_05000443 (1)
 /* Incorrect L1 Instruction Bank B Memory Map Location */
 #define ANOMALY_05000444 (1)
+/* Incorrect Default Hysteresis Setting for RESET, NMI, and BMODE Signals */
+#define ANOMALY_05000452 (1)
+/* PWM_TRIPB Signal Not Available on PG10 */
+#define ANOMALY_05000453 (1)
+/* PPI_FS3 is Driven One Half Cycle Later Than PPI Data */
+#define ANOMALY_05000455 (1)
 
 /* Anomalies that don't exist on this proc */
 #define ANOMALY_05000125 (0)
 #define ANOMALY_05000263 (0)
 #define ANOMALY_05000266 (0)
 #define ANOMALY_05000273 (0)
+#define ANOMALY_05000278 (0)
 #define ANOMALY_05000285 (0)
+#define ANOMALY_05000305 (0)
 #define ANOMALY_05000307 (0)
 #define ANOMALY_05000311 (0)
 #define ANOMALY_05000312 (0)
 #define ANOMALY_05000323 (0)
 #define ANOMALY_05000353 (0)
 #define ANOMALY_05000363 (0)
+#define ANOMALY_05000380 (0)
 #define ANOMALY_05000386 (0)
 #define ANOMALY_05000412 (0)
 #define ANOMALY_05000432 (0)
+#define ANOMALY_05000447 (0)
+#define ANOMALY_05000448 (0)
 
 #endif
index b50a63b975a2cbade4a24069db52d7b564183d24..e21c1c3e4ec7e8129b87989c81e49f9f4001a6a0 100644 (file)
@@ -144,7 +144,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
         CH_UART0_TX,
         CH_UART0_RX,
 #endif
-#ifdef CONFIG_BFIN_UART0_CTSRTS
+#ifdef CONFIG_SERIAL_BFIN_CTSRTS
         CONFIG_UART0_CTS_PIN,
         CONFIG_UART0_RTS_PIN,
 #endif
@@ -158,7 +158,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
         CH_UART1_TX,
         CH_UART1_RX,
 #endif
-#ifdef CONFIG_BFIN_UART1_CTSRTS
+#ifdef CONFIG_SERIAL_BFIN_CTSRTS
         CONFIG_UART1_CTS_PIN,
         CONFIG_UART1_RTS_PIN,
 #endif
index 856c097b5317eda49cc70cf8456f8dfee1bfbc6c..48e69eecdba42b4e690b146b71866f1127c6d6e8 100644 (file)
@@ -487,9 +487,9 @@ static struct bfin5xx_spi_chip ad9960_spi_chip_info = {
 };
 #endif
 
-#if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
-static struct bfin5xx_spi_chip spi_mmc_chip_info = {
-       .enable_dma = 1,
+#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
+static struct bfin5xx_spi_chip  mmc_spi_chip_info = {
+       .enable_dma = 0,
        .bits_per_word = 8,
 };
 #endif
@@ -585,23 +585,13 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
                .controller_data = &ad9960_spi_chip_info,
        },
 #endif
-#if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
+#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
        {
-               .modalias = "spi_mmc_dummy",
-               .max_speed_hz = 25000000,     /* max spi clock (SCK) speed in HZ */
-               .bus_num = 0,
-               .chip_select = 0,
-               .platform_data = NULL,
-               .controller_data = &spi_mmc_chip_info,
-               .mode = SPI_MODE_3,
-       },
-       {
-               .modalias = "spi_mmc",
-               .max_speed_hz = 25000000,     /* max spi clock (SCK) speed in HZ */
+               .modalias = "mmc_spi",
+               .max_speed_hz = 20000000,     /* max spi clock (SCK) speed in HZ */
                .bus_num = 0,
-               .chip_select = CONFIG_SPI_MMC_CS_CHAN,
-               .platform_data = NULL,
-               .controller_data = &spi_mmc_chip_info,
+               .chip_select = 5,
+               .controller_data = &mmc_spi_chip_info,
                .mode = SPI_MODE_3,
        },
 #endif
index 83606fcdde2757ea8a6d7361864c27c7d2240b9c..7fe480e4ebe83c1022e275373cc1d77550091c20 100644 (file)
@@ -256,9 +256,9 @@ static struct bfin5xx_spi_chip spi_adc_chip_info = {
 };
 #endif
 
-#if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
-static struct bfin5xx_spi_chip spi_mmc_chip_info = {
-       .enable_dma = 1,
+#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
+static struct bfin5xx_spi_chip mmc_spi_chip_info = {
+       .enable_dma = 0,
        .bits_per_word = 8,
 };
 #endif
@@ -366,23 +366,13 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
        },
 #endif
 
-#if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
+#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
        {
-               .modalias = "spi_mmc_dummy",
+               .modalias = "mmc_spi",
                .max_speed_hz = 25000000,     /* max spi clock (SCK) speed in HZ */
                .bus_num = 0,
-               .chip_select = 0,
-               .platform_data = NULL,
-               .controller_data = &spi_mmc_chip_info,
-               .mode = SPI_MODE_3,
-       },
-       {
-               .modalias = "spi_mmc",
-               .max_speed_hz = 25000000,     /* max spi clock (SCK) speed in HZ */
-               .bus_num = 0,
-               .chip_select = CONFIG_SPI_MMC_CS_CHAN,
-               .platform_data = NULL,
-               .controller_data = &spi_mmc_chip_info,
+               .chip_select = 5,
+               .controller_data = &mmc_spi_chip_info,
                .mode = SPI_MODE_3,
        },
 #endif
index 035e8d83505870a246be7f05a0d81611c3a2cc37..df6808d8a6efce3f5317cfc849c9bbb969e7dcda 100644 (file)
@@ -2,7 +2,7 @@
  * File: include/asm-blackfin/mach-bf527/anomaly.h
  * Bugs: Enter bugs at http://blackfin.uclinux.org/
  *
- * Copyright (C) 2004-2008 Analog Devices Inc.
+ * Copyright (C) 2004-2009 Analog Devices Inc.
  * Licensed under the GPL-2 or later.
  */
 
 #define ANOMALY_05000263 (0)
 #define ANOMALY_05000266 (0)
 #define ANOMALY_05000273 (0)
+#define ANOMALY_05000278 (0)
 #define ANOMALY_05000285 (0)
+#define ANOMALY_05000305 (0)
 #define ANOMALY_05000307 (0)
 #define ANOMALY_05000311 (0)
 #define ANOMALY_05000312 (0)
 #define ANOMALY_05000323 (0)
 #define ANOMALY_05000363 (0)
 #define ANOMALY_05000412 (0)
+#define ANOMALY_05000447 (0)
+#define ANOMALY_05000448 (0)
 
 #endif
index 75722d6008b0cade6651e72911d7bfdb3543cbf6..e8c41fd842b5d818d70e83cc4ce78fda0288f01b 100644 (file)
@@ -144,7 +144,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
         CH_UART0_TX,
         CH_UART0_RX,
 #endif
-#ifdef CONFIG_BFIN_UART0_CTSRTS
+#ifdef CONFIG_SERIAL_BFIN_CTSRTS
         CONFIG_UART0_CTS_PIN,
         CONFIG_UART0_RTS_PIN,
 #endif
@@ -158,7 +158,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
         CH_UART1_TX,
         CH_UART1_RX,
 #endif
-#ifdef CONFIG_BFIN_UART1_CTSRTS
+#ifdef CONFIG_SERIAL_BFIN_CTSRTS
         CONFIG_UART1_CTS_PIN,
         CONFIG_UART1_RTS_PIN,
 #endif
index 308c98dc5aba6a2bf2bdecf0aef4239bbe86a8b0..8d8b3e7321e628fb52d1aecb9c34bc0ee9f00772 100644 (file)
@@ -38,9 +38,4 @@ config BFIN532_IP0X
        help
          Core support for IP04/IP04 open hardware IP-PBX.
 
-config GENERIC_BF533_BOARD
-       bool "Generic"
-       help
-         Generic or Custom board support.
-
 endchoice
index 9afbe72b484f7159a0a1ab5068ee5e54db9baf78..ff1e832f80d2ea912e1317cc96de3c1ccb1d1abe 100644 (file)
@@ -2,7 +2,6 @@
 # arch/blackfin/mach-bf533/boards/Makefile
 #
 
-obj-$(CONFIG_GENERIC_BF533_BOARD)      += generic_board.o
 obj-$(CONFIG_BFIN533_STAMP)            += stamp.o
 obj-$(CONFIG_BFIN532_IP0X)             += ip0x.o
 obj-$(CONFIG_BFIN533_EZKIT)            += ezkit.o
index 015c18f85e7faf2d272c2fc5dffb6cdc89547a44..0765872a8ada70a9114bfc98266ad7798e384ca9 100644 (file)
@@ -101,9 +101,9 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
 };
 #endif
 
-#if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
-static struct bfin5xx_spi_chip spi_mmc_chip_info = {
-       .enable_dma = 1,
+#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
+static struct bfin5xx_spi_chip mmc_spi_chip_info = {
+       .enable_dma = 0,
        .bits_per_word = 8,
 };
 #endif
@@ -129,23 +129,13 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
        },
 #endif
 
-#if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
-       {
-               .modalias = "spi_mmc_dummy",
-               .max_speed_hz = 20000000,     /* max spi clock (SCK) speed in HZ */
-               .bus_num = 0,
-               .chip_select = 0,
-               .platform_data = NULL,
-               .controller_data = &spi_mmc_chip_info,
-               .mode = SPI_MODE_3,
-       },
+#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
        {
-               .modalias = "spi_mmc",
+               .modalias = "mmc_spi",
                .max_speed_hz = 20000000,     /* max spi clock (SCK) speed in HZ */
                .bus_num = 0,
-               .chip_select = CONFIG_SPI_MMC_CS_CHAN,
-               .platform_data = NULL,
-               .controller_data = &spi_mmc_chip_info,
+               .chip_select = 5,
+               .controller_data = &mmc_spi_chip_info,
                .mode = SPI_MODE_3,
        },
 #endif
index e7061c7e8c42e5c0aa84acd06034dd64e41792f9..e8974878d8c2807dc34bb2baa4b5822959558a5c 100644 (file)
@@ -96,9 +96,9 @@ static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
 };
 #endif
 
-#if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
-static struct bfin5xx_spi_chip spi_mmc_chip_info = {
-       .enable_dma = 1,
+#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
+static struct bfin5xx_spi_chip mmc_spi_chip_info = {
+       .enable_dma = 0,
        .bits_per_word = 8,
 };
 #endif
@@ -138,23 +138,13 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
        },
 #endif
 
-#if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
-       {
-               .modalias = "spi_mmc_dummy",
-               .max_speed_hz = 25000000,     /* max spi clock (SCK) speed in HZ */
-               .bus_num = 0,
-               .chip_select = 0,
-               .platform_data = NULL,
-               .controller_data = &spi_mmc_chip_info,
-               .mode = SPI_MODE_3,
-       },
+#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
        {
-               .modalias = "spi_mmc",
+               .modalias = "mmc_spi",
                .max_speed_hz = 25000000,     /* max spi clock (SCK) speed in HZ */
                .bus_num = 0,
-               .chip_select = CONFIG_SPI_MMC_CS_CHAN,
-               .platform_data = NULL,
-               .controller_data = &spi_mmc_chip_info,
+               .chip_select = 5,
+               .controller_data = &mmc_spi_chip_info,
                .mode = SPI_MODE_3,
        },
 #endif
diff --git a/arch/blackfin/mach-bf533/boards/generic_board.c b/arch/blackfin/mach-bf533/boards/generic_board.c
deleted file mode 100644 (file)
index 986eeec..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * File:         arch/blackfin/mach-bf533/generic_board.c
- * Based on:     arch/blackfin/mach-bf533/ezkit.c
- * Author:       Aidan Williams <aidan@nicta.com.au>
- *
- * Created:      2005
- * Description:
- *
- * Modified:
- *               Copyright 2005 National ICT Australia (NICTA)
- *               Copyright 2004-2006 Analog Devices Inc.
- *
- * Bugs:         Enter bugs at http://blackfin.uclinux.org/
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, see the file COPYING, or write
- * to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#include <linux/device.h>
-#include <linux/platform_device.h>
-#include <linux/irq.h>
-
-/*
- * Name the Board for the /proc/cpuinfo
- */
-const char bfin_board_name[] = "UNKNOWN BOARD";
-
-#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
-static struct platform_device rtc_device = {
-       .name = "rtc-bfin",
-       .id   = -1,
-};
-#endif
-
-/*
- *  Driver needs to know address, irq and flag pin.
- */
-#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
-static struct resource smc91x_resources[] = {
-       {
-               .start = 0x20300300,
-               .end = 0x20300300 + 16,
-               .flags = IORESOURCE_MEM,
-       }, {
-               .start = IRQ_PROG_INTB,
-               .end = IRQ_PROG_INTB,
-               .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
-       }, {
-               .start = IRQ_PF7,
-               .end = IRQ_PF7,
-               .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
-       },
-};
-
-static struct platform_device smc91x_device = {
-       .name = "smc91x",
-       .id = 0,
-       .num_resources = ARRAY_SIZE(smc91x_resources),
-       .resource = smc91x_resources,
-};
-#endif
-
-#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
-#ifdef CONFIG_BFIN_SIR0
-static struct resource bfin_sir0_resources[] = {
-       {
-               .start = 0xFFC00400,
-               .end = 0xFFC004FF,
-               .flags = IORESOURCE_MEM,
-       },
-       {
-               .start = IRQ_UART0_RX,
-               .end = IRQ_UART0_RX+1,
-               .flags = IORESOURCE_IRQ,
-       },
-       {
-               .start = CH_UART0_RX,
-               .end = CH_UART0_RX+1,
-               .flags = IORESOURCE_DMA,
-       },
-};
-
-static struct platform_device bfin_sir0_device = {
-       .name = "bfin_sir",
-       .id = 0,
-       .num_resources = ARRAY_SIZE(bfin_sir0_resources),
-       .resource = bfin_sir0_resources,
-};
-#endif
-#endif
-
-static struct platform_device *generic_board_devices[] __initdata = {
-#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
-       &rtc_device,
-#endif
-
-#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
-       &smc91x_device,
-#endif
-
-#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
-#ifdef CONFIG_BFIN_SIR0
-       &bfin_sir0_device,
-#endif
-#endif
-};
-
-static int __init generic_board_init(void)
-{
-       printk(KERN_INFO "%s(): registering device resources\n", __func__);
-       return platform_add_devices(generic_board_devices, ARRAY_SIZE(generic_board_devices));
-}
-
-arch_initcall(generic_board_init);
index e30b1b7d144265803e37f1d5dab9826a3a72c026..f19b63378b1299ec086b0358bbb3261cc7c9e113 100644 (file)
@@ -127,8 +127,8 @@ static struct platform_device dm9000_device2 = {
 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
 /* all SPI peripherals info goes here */
 
-#if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
-static struct bfin5xx_spi_chip spi_mmc_chip_info = {
+#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
+static struct bfin5xx_spi_chip mmc_spi_chip_info = {
 /*
  * CPOL (Clock Polarity)
  *  0 - Active high SCK
@@ -152,14 +152,13 @@ static struct bfin5xx_spi_chip spi_mmc_chip_info = {
 /* Notice: for blackfin, the speed_hz is the value of register
  * SPI_BAUD, not the real baudrate */
 static struct spi_board_info bfin_spi_board_info[] __initdata = {
-#if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
+#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
        {
-               .modalias = "spi_mmc",
+               .modalias = "mmc_spi",
                .max_speed_hz = 2,
                .bus_num = 1,
-               .chip_select = CONFIG_SPI_MMC_CS_CHAN,
-               .platform_data = NULL,
-               .controller_data = &spi_mmc_chip_info,
+               .chip_select = 5,
+               .controller_data = &mmc_spi_chip_info,
        },
 #endif
 };
index 0d3a03429fb984174f75d03a1c904c920bf22aca..1cf893e2e55baffa27cf4aa8aa2d2757505f76f1 100644 (file)
@@ -2,7 +2,7 @@
  * File: include/asm-blackfin/mach-bf533/anomaly.h
  * Bugs: Enter bugs at http://blackfin.uclinux.org/
  *
- * Copyright (C) 2004-2008 Analog Devices Inc.
+ * Copyright (C) 2004-2009 Analog Devices Inc.
  * Licensed under the GPL-2 or later.
  */
 
 #define ANOMALY_05000301 (__SILICON_REVISION__ < 6)
 /* SSYNCs After Writes To DMA MMR Registers May Not Be Handled Correctly */
 #define ANOMALY_05000302 (__SILICON_REVISION__ < 5)
-/* New Feature: Additional Hysteresis on SPORT Input Pins (Not Available On Older Silicon) */
+/* SPORT_HYS Bit in PLL_CTL Register Is Not Functional */
 #define ANOMALY_05000305 (__SILICON_REVISION__ < 5)
 /* New Feature: Additional PPI Frame Sync Sampling Options (Not Available On Older Silicon) */
 #define ANOMALY_05000306 (__SILICON_REVISION__ < 5)
 #define ANOMALY_05000266 (0)
 #define ANOMALY_05000323 (0)
 #define ANOMALY_05000353 (1)
+#define ANOMALY_05000380 (0)
 #define ANOMALY_05000386 (1)
 #define ANOMALY_05000412 (0)
 #define ANOMALY_05000432 (0)
 #define ANOMALY_05000435 (0)
+#define ANOMALY_05000447 (0)
+#define ANOMALY_05000448 (0)
 
 #endif
index f3d9e495230c04439357b1499874c918092a817e..5f517f53b0fd8d17fb8f9ab104269ffa51290f09 100644 (file)
@@ -134,7 +134,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
        CH_UART_TX,
        CH_UART_RX,
 #endif
-#ifdef CONFIG_BFIN_UART0_CTSRTS
+#ifdef CONFIG_SERIAL_BFIN_CTSRTS
        CONFIG_UART0_CTS_PIN,
        CONFIG_UART0_RTS_PIN,
 #endif
index 42a57b0acb292d4046b674afffe720f2d6f94cda..77c59da87e85d93f2d62478fff1f6a9cef4c19df 100644 (file)
@@ -33,9 +33,4 @@ config CAMSIG_MINOTAUR
        help
          Board supply package for CSP Minotaur
 
-config GENERIC_BF537_BOARD
-       bool "Generic"
-       help
-         Generic or Custom board support.
-
 endchoice
index 7168cc14afd82a7011821649fdd48283d24266b2..68b98a7af6a618dc642b9413ec0b7c613798bf84 100644 (file)
@@ -2,7 +2,6 @@
 # arch/blackfin/mach-bf537/boards/Makefile
 #
 
-obj-$(CONFIG_GENERIC_BF537_BOARD)      += generic_board.o
 obj-$(CONFIG_BFIN537_STAMP)            += stamp.o
 obj-$(CONFIG_BFIN537_BLUETECHNIX_CM)   += cm_bf537.o
 obj-$(CONFIG_BFIN537_BLUETECHNIX_TCM)  += tcm_bf537.o
index 9cd8fb2a30d32ba3d81ef2409e9078df884b55f0..41c75b9bfac03dde78f1269738fd750193efe4a2 100644 (file)
@@ -108,9 +108,9 @@ static struct bfin5xx_spi_chip ad9960_spi_chip_info = {
 };
 #endif
 
-#if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
-static struct bfin5xx_spi_chip spi_mmc_chip_info = {
-       .enable_dma = 1,
+#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
+static struct bfin5xx_spi_chip  mmc_spi_chip_info = {
+       .enable_dma = 0,
        .bits_per_word = 8,
 };
 #endif
@@ -160,23 +160,13 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
        },
 #endif
 
-#if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
-       {
-               .modalias = "spi_mmc_dummy",
-               .max_speed_hz = 25000000,     /* max spi clock (SCK) speed in HZ */
-               .bus_num = 0,
-               .chip_select = 7,
-               .platform_data = NULL,
-               .controller_data = &spi_mmc_chip_info,
-               .mode = SPI_MODE_3,
-       },
+#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
        {
-               .modalias = "spi_mmc",
-               .max_speed_hz = 25000000,     /* max spi clock (SCK) speed in HZ */
+               .modalias = "mmc_spi",
+               .max_speed_hz = 20000000,     /* max spi clock (SCK) speed in HZ */
                .bus_num = 0,
-               .chip_select = CONFIG_SPI_MMC_CS_CHAN,
-               .platform_data = NULL,
-               .controller_data = &spi_mmc_chip_info,
+               .chip_select = 1,
+               .controller_data = &mmc_spi_chip_info,
                .mode = SPI_MODE_3,
        },
 #endif
diff --git a/arch/blackfin/mach-bf537/boards/generic_board.c b/arch/blackfin/mach-bf537/boards/generic_board.c
deleted file mode 100644 (file)
index da710fd..0000000
+++ /dev/null
@@ -1,745 +0,0 @@
-/*
- * File:         arch/blackfin/mach-bf537/boards/generic_board.c
- * Based on:     arch/blackfin/mach-bf533/boards/ezkit.c
- * Author:       Aidan Williams <aidan@nicta.com.au>
- *
- * Created:
- * Description:
- *
- * Modified:
- *               Copyright 2005 National ICT Australia (NICTA)
- *               Copyright 2004-2008 Analog Devices Inc.
- *
- * Bugs:         Enter bugs at http://blackfin.uclinux.org/
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, see the file COPYING, or write
- * to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#include <linux/device.h>
-#include <linux/etherdevice.h>
-#include <linux/platform_device.h>
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
-#include <linux/spi/spi.h>
-#include <linux/spi/flash.h>
-#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
-#include <linux/usb/isp1362.h>
-#endif
-#include <linux/irq.h>
-#include <linux/interrupt.h>
-#include <linux/usb/sl811.h>
-#include <asm/dma.h>
-#include <asm/bfin5xx_spi.h>
-#include <asm/reboot.h>
-#include <asm/portmux.h>
-#include <linux/spi/ad7877.h>
-
-/*
- * Name the Board for the /proc/cpuinfo
- */
-const char bfin_board_name[] = "UNKNOWN BOARD";
-
-/*
- *  Driver needs to know address, irq and flag pin.
- */
-
-#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
-#include <linux/usb/isp1760.h>
-static struct resource bfin_isp1760_resources[] = {
-       [0] = {
-               .start  = 0x203C0000,
-               .end    = 0x203C0000 + 0x000fffff,
-               .flags  = IORESOURCE_MEM,
-       },
-       [1] = {
-               .start  = IRQ_PF7,
-               .end    = IRQ_PF7,
-               .flags  = IORESOURCE_IRQ,
-       },
-};
-
-static struct isp1760_platform_data isp1760_priv = {
-       .is_isp1761 = 0,
-       .port1_disable = 0,
-       .bus_width_16 = 1,
-       .port1_otg = 0,
-       .analog_oc = 0,
-       .dack_polarity_high = 0,
-       .dreq_polarity_high = 0,
-};
-
-static struct platform_device bfin_isp1760_device = {
-       .name           = "isp1760-hcd",
-       .id             = 0,
-       .dev = {
-               .platform_data = &isp1760_priv,
-       },
-       .num_resources  = ARRAY_SIZE(bfin_isp1760_resources),
-       .resource       = bfin_isp1760_resources,
-};
-#endif
-
-#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
-static struct resource bfin_pcmcia_cf_resources[] = {
-       {
-               .start = 0x20310000, /* IO PORT */
-               .end = 0x20312000,
-               .flags = IORESOURCE_MEM,
-       }, {
-               .start = 0x20311000, /* Attribute Memory */
-               .end = 0x20311FFF,
-               .flags = IORESOURCE_MEM,
-       }, {
-               .start = IRQ_PF4,
-               .end = IRQ_PF4,
-               .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
-       }, {
-               .start = 6, /* Card Detect PF6 */
-               .end = 6,
-               .flags = IORESOURCE_IRQ,
-       },
-};
-
-static struct platform_device bfin_pcmcia_cf_device = {
-       .name = "bfin_cf_pcmcia",
-       .id = -1,
-       .num_resources = ARRAY_SIZE(bfin_pcmcia_cf_resources),
-       .resource = bfin_pcmcia_cf_resources,
-};
-#endif
-
-#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
-static struct platform_device rtc_device = {
-       .name = "rtc-bfin",
-       .id   = -1,
-};
-#endif
-
-#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
-static struct resource smc91x_resources[] = {
-       {
-               .name = "smc91x-regs",
-               .start = 0x20300300,
-               .end = 0x20300300 + 16,
-               .flags = IORESOURCE_MEM,
-       }, {
-
-               .start = IRQ_PF7,
-               .end = IRQ_PF7,
-               .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
-       },
-};
-static struct platform_device smc91x_device = {
-       .name = "smc91x",
-       .id = 0,
-       .num_resources = ARRAY_SIZE(smc91x_resources),
-       .resource = smc91x_resources,
-};
-#endif
-
-#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
-static struct resource dm9000_resources[] = {
-       [0] = {
-               .start  = 0x203FB800,
-               .end    = 0x203FB800 + 1,
-               .flags  = IORESOURCE_MEM,
-       },
-       [1] = {
-               .start  = 0x203FB800 + 4,
-               .end    = 0x203FB800 + 5,
-               .flags  = IORESOURCE_MEM,
-       },
-       [2] = {
-               .start  = IRQ_PF9,
-               .end    = IRQ_PF9,
-               .flags  = (IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE),
-       },
-};
-
-static struct platform_device dm9000_device = {
-       .name           = "dm9000",
-       .id             = -1,
-       .num_resources  = ARRAY_SIZE(dm9000_resources),
-       .resource       = dm9000_resources,
-};
-#endif
-
-#if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE)
-static struct resource sl811_hcd_resources[] = {
-       {
-               .start = 0x20340000,
-               .end = 0x20340000,
-               .flags = IORESOURCE_MEM,
-       }, {
-               .start = 0x20340004,
-               .end = 0x20340004,
-               .flags = IORESOURCE_MEM,
-       }, {
-               .start = CONFIG_USB_SL811_BFIN_IRQ,
-               .end = CONFIG_USB_SL811_BFIN_IRQ,
-               .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
-       },
-};
-
-#if defined(CONFIG_USB_SL811_BFIN_USE_VBUS)
-void sl811_port_power(struct device *dev, int is_on)
-{
-       gpio_request(CONFIG_USB_SL811_BFIN_GPIO_VBUS, "usb:SL811_VBUS");
-       gpio_direction_output(CONFIG_USB_SL811_BFIN_GPIO_VBUS, is_on);
-
-}
-#endif
-
-static struct sl811_platform_data sl811_priv = {
-       .potpg = 10,
-       .power = 250,       /* == 500mA */
-#if defined(CONFIG_USB_SL811_BFIN_USE_VBUS)
-       .port_power = &sl811_port_power,
-#endif
-};
-
-static struct platform_device sl811_hcd_device = {
-       .name = "sl811-hcd",
-       .id = 0,
-       .dev = {
-               .platform_data = &sl811_priv,
-       },
-       .num_resources = ARRAY_SIZE(sl811_hcd_resources),
-       .resource = sl811_hcd_resources,
-};
-#endif
-
-#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
-static struct resource isp1362_hcd_resources[] = {
-       {
-               .start = 0x20360000,
-               .end = 0x20360000,
-               .flags = IORESOURCE_MEM,
-       }, {
-               .start = 0x20360004,
-               .end = 0x20360004,
-               .flags = IORESOURCE_MEM,
-       }, {
-               .start = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
-               .end = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
-               .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
-       },
-};
-
-static struct isp1362_platform_data isp1362_priv = {
-       .sel15Kres = 1,
-       .clknotstop = 0,
-       .oc_enable = 0,
-       .int_act_high = 0,
-       .int_edge_triggered = 0,
-       .remote_wakeup_connected = 0,
-       .no_power_switching = 1,
-       .power_switching_mode = 0,
-};
-
-static struct platform_device isp1362_hcd_device = {
-       .name = "isp1362-hcd",
-       .id = 0,
-       .dev = {
-               .platform_data = &isp1362_priv,
-       },
-       .num_resources = ARRAY_SIZE(isp1362_hcd_resources),
-       .resource = isp1362_hcd_resources,
-};
-#endif
-
-#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
-static struct platform_device bfin_mii_bus = {
-       .name = "bfin_mii_bus",
-};
-
-static struct platform_device bfin_mac_device = {
-       .name = "bfin_mac",
-       .dev.platform_data = &bfin_mii_bus,
-};
-#endif
-
-#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
-static struct resource net2272_bfin_resources[] = {
-       {
-               .start = 0x20300000,
-               .end = 0x20300000 + 0x100,
-               .flags = IORESOURCE_MEM,
-       }, {
-               .start = IRQ_PF7,
-               .end = IRQ_PF7,
-               .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
-       },
-};
-
-static struct platform_device net2272_bfin_device = {
-       .name = "net2272",
-       .id = -1,
-       .num_resources = ARRAY_SIZE(net2272_bfin_resources),
-       .resource = net2272_bfin_resources,
-};
-#endif
-
-#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
-/* all SPI peripherals info goes here */
-
-#if defined(CONFIG_MTD_M25P80) \
-       || defined(CONFIG_MTD_M25P80_MODULE)
-static struct mtd_partition bfin_spi_flash_partitions[] = {
-       {
-               .name = "bootloader(spi)",
-               .size = 0x00020000,
-               .offset = 0,
-               .mask_flags = MTD_CAP_ROM
-       }, {
-               .name = "linux kernel(spi)",
-               .size = 0xe0000,
-               .offset = 0x20000
-       }, {
-               .name = "file system(spi)",
-               .size = 0x700000,
-               .offset = 0x00100000,
-       }
-};
-
-static struct flash_platform_data bfin_spi_flash_data = {
-       .name = "m25p80",
-       .parts = bfin_spi_flash_partitions,
-       .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
-       .type = "m25p64",
-};
-
-/* SPI flash chip (m25p64) */
-static struct bfin5xx_spi_chip spi_flash_chip_info = {
-       .enable_dma = 0,         /* use dma transfer with this chip*/
-       .bits_per_word = 8,
-};
-#endif
-
-#if defined(CONFIG_SPI_ADC_BF533) \
-       || defined(CONFIG_SPI_ADC_BF533_MODULE)
-/* SPI ADC chip */
-static struct bfin5xx_spi_chip spi_adc_chip_info = {
-       .enable_dma = 1,         /* use dma transfer with this chip*/
-       .bits_per_word = 16,
-};
-#endif
-
-#if defined(CONFIG_SND_BLACKFIN_AD1836) \
-       || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
-static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
-       .enable_dma = 0,
-       .bits_per_word = 16,
-};
-#endif
-
-#if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
-static struct bfin5xx_spi_chip ad9960_spi_chip_info = {
-       .enable_dma = 0,
-       .bits_per_word = 16,
-};
-#endif
-
-#if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
-static struct bfin5xx_spi_chip spi_mmc_chip_info = {
-       .enable_dma = 1,
-       .bits_per_word = 8,
-};
-#endif
-
-#if defined(CONFIG_PBX)
-static struct bfin5xx_spi_chip spi_si3xxx_chip_info = {
-       .ctl_reg        = 0x4, /* send zero */
-       .enable_dma     = 0,
-       .bits_per_word  = 8,
-       .cs_change_per_word = 1,
-};
-#endif
-
-#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
-static struct bfin5xx_spi_chip spi_ad7877_chip_info = {
-       .enable_dma = 0,
-       .bits_per_word = 16,
-};
-
-static const struct ad7877_platform_data bfin_ad7877_ts_info = {
-       .model                  = 7877,
-       .vref_delay_usecs       = 50,   /* internal, no capacitor */
-       .x_plate_ohms           = 419,
-       .y_plate_ohms           = 486,
-       .pressure_max           = 1000,
-       .pressure_min           = 0,
-       .stopacq_polarity       = 1,
-       .first_conversion_delay = 3,
-       .acquisition_time       = 1,
-       .averaging              = 1,
-       .pen_down_acc_interval  = 1,
-};
-#endif
-
-static struct spi_board_info bfin_spi_board_info[] __initdata = {
-#if defined(CONFIG_MTD_M25P80) \
-       || defined(CONFIG_MTD_M25P80_MODULE)
-       {
-               /* the modalias must be the same as spi device driver name */
-               .modalias = "m25p80", /* Name of spi_driver for this device */
-               .max_speed_hz = 25000000,     /* max spi clock (SCK) speed in HZ */
-               .bus_num = 0, /* Framework bus number */
-               .chip_select = 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/
-               .platform_data = &bfin_spi_flash_data,
-               .controller_data = &spi_flash_chip_info,
-               .mode = SPI_MODE_3,
-       },
-#endif
-
-#if defined(CONFIG_SPI_ADC_BF533) \
-       || defined(CONFIG_SPI_ADC_BF533_MODULE)
-       {
-               .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
-               .max_speed_hz = 6250000,     /* max spi clock (SCK) speed in HZ */
-               .bus_num = 0, /* Framework bus number */
-               .chip_select = 1, /* Framework chip select. */
-               .platform_data = NULL, /* No spi_driver specific config */
-               .controller_data = &spi_adc_chip_info,
-       },
-#endif
-
-#if defined(CONFIG_SND_BLACKFIN_AD1836) \
-       || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
-       {
-               .modalias = "ad1836-spi",
-               .max_speed_hz = 3125000,     /* max spi clock (SCK) speed in HZ */
-               .bus_num = 0,
-               .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT,
-               .controller_data = &ad1836_spi_chip_info,
-       },
-#endif
-#if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
-       {
-               .modalias = "ad9960-spi",
-               .max_speed_hz = 10000000,     /* max spi clock (SCK) speed in HZ */
-               .bus_num = 0,
-               .chip_select = 1,
-               .controller_data = &ad9960_spi_chip_info,
-       },
-#endif
-#if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
-       {
-               .modalias = "spi_mmc_dummy",
-               .max_speed_hz = 25000000,     /* max spi clock (SCK) speed in HZ */
-               .bus_num = 0,
-               .chip_select = 0,
-               .platform_data = NULL,
-               .controller_data = &spi_mmc_chip_info,
-               .mode = SPI_MODE_3,
-       },
-       {
-               .modalias = "spi_mmc",
-               .max_speed_hz = 25000000,     /* max spi clock (SCK) speed in HZ */
-               .bus_num = 0,
-               .chip_select = CONFIG_SPI_MMC_CS_CHAN,
-               .platform_data = NULL,
-               .controller_data = &spi_mmc_chip_info,
-               .mode = SPI_MODE_3,
-       },
-#endif
-#if defined(CONFIG_PBX)
-       {
-               .modalias = "fxs-spi",
-               .max_speed_hz = 12500000,     /* max spi clock (SCK) speed in HZ */
-               .bus_num = 0,
-               .chip_select = 8 - CONFIG_J11_JUMPER,
-               .controller_data = &spi_si3xxx_chip_info,
-               .mode = SPI_MODE_3,
-       },
-       {
-               .modalias = "fxo-spi",
-               .max_speed_hz = 12500000,     /* max spi clock (SCK) speed in HZ */
-               .bus_num = 0,
-               .chip_select = 8 - CONFIG_J19_JUMPER,
-               .controller_data = &spi_si3xxx_chip_info,
-               .mode = SPI_MODE_3,
-       },
-#endif
-#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
-       {
-               .modalias               = "ad7877",
-               .platform_data          = &bfin_ad7877_ts_info,
-               .irq                    = IRQ_PF6,
-               .max_speed_hz   = 12500000,     /* max spi clock (SCK) speed in HZ */
-               .bus_num        = 0,
-               .chip_select  = 1,
-               .controller_data = &spi_ad7877_chip_info,
-       },
-#endif
-};
-
-/* SPI controller data */
-static struct bfin5xx_spi_master bfin_spi0_info = {
-       .num_chipselect = 8,
-       .enable_dma = 1,  /* master has the ability to do dma transfer */
-       .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0},
-};
-
-/* SPI (0) */
-static struct resource bfin_spi0_resource[] = {
-       [0] = {
-               .start = SPI0_REGBASE,
-               .end   = SPI0_REGBASE + 0xFF,
-               .flags = IORESOURCE_MEM,
-               },
-       [1] = {
-               .start = CH_SPI,
-               .end   = CH_SPI,
-               .flags = IORESOURCE_IRQ,
-       },
-};
-
-static struct platform_device bfin_spi0_device = {
-       .name = "bfin-spi",
-       .id = 0, /* Bus number */
-       .num_resources = ARRAY_SIZE(bfin_spi0_resource),
-       .resource = bfin_spi0_resource,
-       .dev = {
-               .platform_data = &bfin_spi0_info, /* Passed to driver */
-       },
-};
-#endif  /* spi master and devices */
-
-#if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE)
-static struct platform_device bfin_fb_device = {
-       .name = "bf537-lq035",
-};
-#endif
-
-#if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)
-static struct platform_device bfin_fb_adv7393_device = {
-       .name = "bfin-adv7393",
-};
-#endif
-
-#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
-static struct resource bfin_uart_resources[] = {
-       {
-               .start = 0xFFC00400,
-               .end = 0xFFC004FF,
-               .flags = IORESOURCE_MEM,
-       }, {
-               .start = 0xFFC02000,
-               .end = 0xFFC020FF,
-               .flags = IORESOURCE_MEM,
-       },
-};
-
-static struct platform_device bfin_uart_device = {
-       .name = "bfin-uart",
-       .id = 1,
-       .num_resources = ARRAY_SIZE(bfin_uart_resources),
-       .resource = bfin_uart_resources,
-};
-#endif
-
-#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
-#ifdef CONFIG_BFIN_SIR0
-static struct resource bfin_sir0_resources[] = {
-       {
-               .start = 0xFFC00400,
-               .end = 0xFFC004FF,
-               .flags = IORESOURCE_MEM,
-       },
-       {
-               .start = IRQ_UART0_RX,
-               .end = IRQ_UART0_RX+1,
-               .flags = IORESOURCE_IRQ,
-       },
-       {
-               .start = CH_UART0_RX,
-               .end = CH_UART0_RX+1,
-               .flags = IORESOURCE_DMA,
-       },
-};
-
-static struct platform_device bfin_sir0_device = {
-       .name = "bfin_sir",
-       .id = 0,
-       .num_resources = ARRAY_SIZE(bfin_sir0_resources),
-       .resource = bfin_sir0_resources,
-};
-#endif
-#ifdef CONFIG_BFIN_SIR1
-static struct resource bfin_sir1_resources[] = {
-       {
-               .start = 0xFFC02000,
-               .end = 0xFFC020FF,
-               .flags = IORESOURCE_MEM,
-       },
-       {
-               .start = IRQ_UART1_RX,
-               .end = IRQ_UART1_RX+1,
-               .flags = IORESOURCE_IRQ,
-       },
-       {
-               .start = CH_UART1_RX,
-               .end = CH_UART1_RX+1,
-               .flags = IORESOURCE_DMA,
-       },
-};
-
-static struct platform_device bfin_sir1_device = {
-       .name = "bfin_sir",
-       .id = 1,
-       .num_resources = ARRAY_SIZE(bfin_sir1_resources),
-       .resource = bfin_sir1_resources,
-};
-#endif
-#endif
-
-#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
-static struct resource bfin_twi0_resource[] = {
-       [0] = {
-               .start = TWI0_REGBASE,
-               .end   = TWI0_REGBASE + 0xFF,
-               .flags = IORESOURCE_MEM,
-       },
-       [1] = {
-               .start = IRQ_TWI,
-               .end   = IRQ_TWI,
-               .flags = IORESOURCE_IRQ,
-       },
-};
-
-static struct platform_device i2c_bfin_twi_device = {
-       .name = "i2c-bfin-twi",
-       .id = 0,
-       .num_resources = ARRAY_SIZE(bfin_twi0_resource),
-       .resource = bfin_twi0_resource,
-};
-#endif
-
-#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
-static struct platform_device bfin_sport0_uart_device = {
-       .name = "bfin-sport-uart",
-       .id = 0,
-};
-
-static struct platform_device bfin_sport1_uart_device = {
-       .name = "bfin-sport-uart",
-       .id = 1,
-};
-#endif
-
-static struct platform_device *stamp_devices[] __initdata = {
-#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
-       &bfin_pcmcia_cf_device,
-#endif
-
-#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
-       &rtc_device,
-#endif
-
-#if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE)
-       &sl811_hcd_device,
-#endif
-
-#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
-       &isp1362_hcd_device,
-#endif
-
-#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
-       &smc91x_device,
-#endif
-
-#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
-       &dm9000_device,
-#endif
-
-#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
-       &bfin_mii_bus,
-       &bfin_mac_device,
-#endif
-
-#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
-       &net2272_bfin_device,
-#endif
-
-#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
-       &bfin_isp1760_device,
-#endif
-
-#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
-       &bfin_spi0_device,
-#endif
-
-#if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE)
-       &bfin_fb_device,
-#endif
-
-#if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)
-       &bfin_fb_adv7393_device,
-#endif
-
-#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
-       &bfin_uart_device,
-#endif
-
-#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
-#ifdef CONFIG_BFIN_SIR0
-       &bfin_sir0_device,
-#endif
-#ifdef CONFIG_BFIN_SIR1
-       &bfin_sir1_device,
-#endif
-#endif
-
-#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
-       &i2c_bfin_twi_device,
-#endif
-
-#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
-       &bfin_sport0_uart_device,
-       &bfin_sport1_uart_device,
-#endif
-};
-
-static int __init generic_init(void)
-{
-       printk(KERN_INFO "%s(): registering device resources\n", __func__);
-       platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices));
-#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
-       spi_register_board_info(bfin_spi_board_info,
-                               ARRAY_SIZE(bfin_spi_board_info));
-#endif
-
-       return 0;
-}
-
-arch_initcall(generic_init);
-
-void native_machine_restart(char *cmd)
-{
-       /* workaround reboot hang when booting from SPI */
-       if ((bfin_read_SYSCR() & 0x7) == 0x3)
-               bfin_reset_boot_spi_cs(P_DEFAULT_BOOT_SPI_CS);
-}
-
-#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
-void bfin_get_ether_addr(char *addr)
-{
-       random_ether_addr(addr);
-       printk(KERN_WARNING "%s:%s: Setting Ethernet MAC to a random one\n", __FILE__, __func__);
-}
-EXPORT_SYMBOL(bfin_get_ether_addr);
-#endif
index db7d3a385e4bda4ade36365ca439080a3c4787aa..3c159819e5550ee178d93cf33a2a4efbbeacd6c2 100644 (file)
@@ -134,9 +134,9 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
 };
 #endif
 
-#if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
-static struct bfin5xx_spi_chip spi_mmc_chip_info = {
-       .enable_dma = 1,
+#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
+static struct bfin5xx_spi_chip mmc_spi_chip_info = {
+       .enable_dma = 0,
        .bits_per_word = 8,
 };
 #endif
@@ -156,23 +156,13 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
        },
 #endif
 
-#if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
+#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
        {
-               .modalias = "spi_mmc_dummy",
+               .modalias = "mmc_spi",
                .max_speed_hz = 5000000,     /* max spi clock (SCK) speed in HZ */
                .bus_num = 0,
-               .chip_select = 0,
-               .platform_data = NULL,
-               .controller_data = &spi_mmc_chip_info,
-               .mode = SPI_MODE_3,
-       },
-       {
-               .modalias = "spi_mmc",
-               .max_speed_hz = 5000000,     /* max spi clock (SCK) speed in HZ */
-               .bus_num = 0,
-               .chip_select = CONFIG_SPI_MMC_CS_CHAN,
-               .platform_data = NULL,
-               .controller_data = &spi_mmc_chip_info,
+               .chip_select = 5,
+               .controller_data = &mmc_spi_chip_info,
                .mode = SPI_MODE_3,
        },
 #endif
index 590eb3a139b7a7542a070aa4b885a561997c188a..4e1de1e53f89f396a38ff5faf71fa04300434381 100644 (file)
@@ -289,9 +289,9 @@ static struct bfin5xx_spi_chip ad9960_spi_chip_info = {
 };
 #endif
 
-#if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
-static struct bfin5xx_spi_chip spi_mmc_chip_info = {
-       .enable_dma = 1,
+#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
+static struct bfin5xx_spi_chip mmc_spi_chip_info = {
+       .enable_dma = 0,
        .bits_per_word = 8,
 };
 #endif
@@ -364,23 +364,13 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
                .controller_data = &ad9960_spi_chip_info,
        },
 #endif
-#if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
-       {
-               .modalias = "spi_mmc_dummy",
-               .max_speed_hz = 25000000,     /* max spi clock (SCK) speed in HZ */
-               .bus_num = 0,
-               .chip_select = 7,
-               .platform_data = NULL,
-               .controller_data = &spi_mmc_chip_info,
-               .mode = SPI_MODE_3,
-       },
+#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
        {
-               .modalias = "spi_mmc",
+               .modalias = "mmc_spi",
                .max_speed_hz = 25000000,     /* max spi clock (SCK) speed in HZ */
                .bus_num = 0,
-               .chip_select = CONFIG_SPI_MMC_CS_CHAN,
-               .platform_data = NULL,
-               .controller_data = &spi_mmc_chip_info,
+               .chip_select = 5,
+               .controller_data = &mmc_spi_chip_info,
                .mode = SPI_MODE_3,
        },
 #endif
index 3f4f203a06ec9b0c0ffb570d7e00b8e1b611db60..53ad10f3cd76fb5a7fe945f032e80a172dc0f7fd 100644 (file)
@@ -108,9 +108,9 @@ static struct bfin5xx_spi_chip ad9960_spi_chip_info = {
 };
 #endif
 
-#if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
-static struct bfin5xx_spi_chip spi_mmc_chip_info = {
-       .enable_dma = 1,
+#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
+static struct bfin5xx_spi_chip mmc_spi_chip_info = {
+       .enable_dma = 0,
        .bits_per_word = 8,
 };
 #endif
@@ -160,23 +160,13 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
        },
 #endif
 
-#if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
-       {
-               .modalias = "spi_mmc_dummy",
-               .max_speed_hz = 25000000,     /* max spi clock (SCK) speed in HZ */
-               .bus_num = 0,
-               .chip_select = 7,
-               .platform_data = NULL,
-               .controller_data = &spi_mmc_chip_info,
-               .mode = SPI_MODE_3,
-       },
+#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
        {
-               .modalias = "spi_mmc",
+               .modalias = "mmc_spi",
                .max_speed_hz = 25000000,     /* max spi clock (SCK) speed in HZ */
                .bus_num = 0,
-               .chip_select = CONFIG_SPI_MMC_CS_CHAN,
-               .platform_data = NULL,
-               .controller_data = &spi_mmc_chip_info,
+               .chip_select = 5,
+               .controller_data = &mmc_spi_chip_info,
                .mode = SPI_MODE_3,
        },
 #endif
index 9cb39121d1cba7a359e8a14a053f8435a8d04a42..1bfd80c26c90c35fe0921585a177d4e215eb3bdd 100644 (file)
@@ -2,7 +2,7 @@
  * File: include/asm-blackfin/mach-bf537/anomaly.h
  * Bugs: Enter bugs at http://blackfin.uclinux.org/
  *
- * Copyright (C) 2004-2008 Analog Devices Inc.
+ * Copyright (C) 2004-2009 Analog Devices Inc.
  * Licensed under the GPL-2 or later.
  */
 
 #define ANOMALY_05000301 (1)
 /* SSYNCs After Writes To CAN/DMA MMR Registers Are Not Always Handled Correctly */
 #define ANOMALY_05000304 (__SILICON_REVISION__ < 3)
-/* New Feature: Additional Hysteresis on SPORT Input Pins (Not Available On Older Silicon) */
+/* SPORT_HYS Bit in PLL_CTL Register Is Not Functional */
 #define ANOMALY_05000305 (__SILICON_REVISION__ < 3)
 /* SCKELOW Bit Does Not Maintain State Through Hibernate */
 #define ANOMALY_05000307 (__SILICON_REVISION__ < 3)
 #define ANOMALY_05000323 (0)
 #define ANOMALY_05000353 (1)
 #define ANOMALY_05000363 (0)
+#define ANOMALY_05000380 (0)
 #define ANOMALY_05000386 (1)
 #define ANOMALY_05000412 (0)
 #define ANOMALY_05000432 (0)
 #define ANOMALY_05000435 (0)
+#define ANOMALY_05000447 (0)
+#define ANOMALY_05000448 (0)
 
 #endif
index b3f87e1d16a2f5ffa18156b35e76edc01c451870..9e34700844a294278921a36fe7ca411fd9c3a61f 100644 (file)
@@ -144,7 +144,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
        CH_UART0_TX,
        CH_UART0_RX,
 #endif
-#ifdef CONFIG_BFIN_UART0_CTSRTS
+#ifdef CONFIG_SERIAL_BFIN_CTSRTS
        CONFIG_UART0_CTS_PIN,
        CONFIG_UART0_RTS_PIN,
 #endif
@@ -158,7 +158,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
        CH_UART1_TX,
        CH_UART1_RX,
 #endif
-#ifdef CONFIG_BFIN_UART1_CTSRTS
+#ifdef CONFIG_SERIAL_BFIN_CTSRTS
        CONFIG_UART1_CTS_PIN,
        CONFIG_UART1_RTS_PIN,
 #endif
index e130b4f8a05dd9b1d044ce08088f47bea4a71f28..3a5699827363b9e68c547c2c7628a5852660ab48 100644 (file)
@@ -2,7 +2,7 @@
  * File: include/asm-blackfin/mach-bf538/anomaly.h
  * Bugs: Enter bugs at http://blackfin.uclinux.org/
  *
- * Copyright (C) 2004-2008 Analog Devices Inc.
+ * Copyright (C) 2004-2009 Analog Devices Inc.
  * Licensed under the GPL-2 or later.
  */
 
 #define ANOMALY_05000198 (0)
 #define ANOMALY_05000230 (0)
 #define ANOMALY_05000263 (0)
+#define ANOMALY_05000305 (0)
 #define ANOMALY_05000311 (0)
 #define ANOMALY_05000323 (0)
 #define ANOMALY_05000353 (1)
 #define ANOMALY_05000363 (0)
+#define ANOMALY_05000380 (0)
 #define ANOMALY_05000386 (1)
 #define ANOMALY_05000412 (0)
 #define ANOMALY_05000432 (0)
 #define ANOMALY_05000435 (0)
+#define ANOMALY_05000447 (0)
+#define ANOMALY_05000448 (0)
 
 #endif
index 40503b6b89a392152e436e3d28d6747bd7272545..3c2811ebecddd520fec44339c7bba04460ae52ca 100644 (file)
@@ -144,7 +144,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
        CH_UART0_TX,
        CH_UART0_RX,
 #endif
-#ifdef CONFIG_BFIN_UART0_CTSRTS
+#ifdef CONFIG_SERIAL_BFIN_CTSRTS
        CONFIG_UART0_CTS_PIN,
        CONFIG_UART0_RTS_PIN,
 #endif
@@ -158,7 +158,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
        CH_UART1_TX,
        CH_UART1_RX,
 #endif
-#ifdef CONFIG_BFIN_UART1_CTSRTS
+#ifdef CONFIG_SERIAL_BFIN_CTSRTS
        CONFIG_UART1_CTS_PIN,
        CONFIG_UART1_RTS_PIN,
 #endif
index 23d03c52f4b46df8d8a7e5aa7c638a8d5e0d7889..882e40ccf0d16f752563bdffffc46f98f2ed6f99 100644 (file)
@@ -2,12 +2,12 @@
  * File: include/asm-blackfin/mach-bf548/anomaly.h
  * Bugs: Enter bugs at http://blackfin.uclinux.org/
  *
- * Copyright (C) 2004-2008 Analog Devices Inc.
+ * Copyright (C) 2004-2009 Analog Devices Inc.
  * Licensed under the GPL-2 or later.
  */
 
 /* This file shoule be up to date with:
- *  - Revision G, 08/07/2008; ADSP-BF542/BF544/BF547/BF548/BF549 Blackfin Processor Anomaly List
+ *  - Revision H, 01/16/2009; ADSP-BF542/BF544/BF547/BF548/BF549 Blackfin Processor Anomaly List
  */
 
 #ifndef _MACH_ANOMALY_H_
@@ -91,8 +91,6 @@
 #define ANOMALY_05000371 (__SILICON_REVISION__ < 2)
 /* USB DP/DM Data Pins May Lose State When Entering Hibernate */
 #define ANOMALY_05000372 (__SILICON_REVISION__ < 1)
-/* Mobile DDR Operation Not Functional */
-#define ANOMALY_05000377 (1)
 /* Security/Authentication Speedpath Causes Authentication To Fail To Initiate */
 #define ANOMALY_05000378 (__SILICON_REVISION__ < 2)
 /* 16-Bit NAND FLASH Boot Mode Is Not Functional */
 #define ANOMALY_05000429 (__SILICON_REVISION__ < 2)
 /* Software System Reset Corrupts PLL_LOCKCNT Register */
 #define ANOMALY_05000430 (__SILICON_REVISION__ >= 2)
+/* Incorrect Use of Stack in Lockbox Firmware During Authentication */
+#define ANOMALY_05000431 (__SILICON_REVISION__ < 3)
+/* OTP Write Accesses Not Supported */
+#define ANOMALY_05000442 (__SILICON_REVISION__ < 1)
 /* IFLUSH Instruction at End of Hardware Loop Causes Infinite Stall */
 #define ANOMALY_05000443 (1)
+/* CDMAPRIO and L2DMAPRIO Bits in the SYSCR Register Are Not Functional */
+#define ANOMALY_05000446 (1)
+/* UART IrDA Receiver Fails on Extended Bit Pulses */
+#define ANOMALY_05000447 (1)
+/* DDR Clock Duty Cycle Spec Violation (tCH, tCL) */
+#define ANOMALY_05000448 (__SILICON_REVISION__ == 1)
+/* Reduced Timing Margins on DDR Output Setup and Hold (tDS and tDH) */
+#define ANOMALY_05000449 (__SILICON_REVISION__ == 1)
+/* USB DMA Mode 1 Short Packet Data Corruption */
+#define ANOMALY_05000450 (1
 
 /* Anomalies that don't exist on this proc */
 #define ANOMALY_05000125 (0)
 #define ANOMALY_05000263 (0)
 #define ANOMALY_05000266 (0)
 #define ANOMALY_05000273 (0)
+#define ANOMALY_05000278 (0)
+#define ANOMALY_05000305 (0)
 #define ANOMALY_05000307 (0)
 #define ANOMALY_05000311 (0)
 #define ANOMALY_05000323 (0)
index e4cf35e7ab9fd6c8a4adf80d10090e821a266ba3..c05e79cba257b0870629ed815bca9efe752bc809 100644 (file)
@@ -63,7 +63,7 @@
 #define UART_ENABLE_INTS(x, v) UART_SET_IER(x, v)
 #define UART_DISABLE_INTS(x) UART_CLEAR_IER(x, 0xF)
 
-#if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS)
+#if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART2_CTSRTS)
 # define CONFIG_SERIAL_BFIN_CTSRTS
 
 # ifndef CONFIG_UART0_CTS_PIN
 #  define CONFIG_UART0_RTS_PIN -1
 # endif
 
-# ifndef CONFIG_UART1_CTS_PIN
-#  define CONFIG_UART1_CTS_PIN -1
+# ifndef CONFIG_UART2_CTS_PIN
+#  define CONFIG_UART2_CTS_PIN -1
 # endif
 
-# ifndef CONFIG_UART1_RTS_PIN
-#  define CONFIG_UART1_RTS_PIN -1
+# ifndef CONFIG_UART2_RTS_PIN
+#  define CONFIG_UART2_RTS_PIN -1
 # endif
 #endif
 
@@ -130,7 +130,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
        CH_UART0_TX,
        CH_UART0_RX,
 #endif
-#ifdef CONFIG_BFIN_UART0_CTSRTS
+#ifdef CONFIG_SERIAL_BFIN_CTSRTS
        CONFIG_UART0_CTS_PIN,
        CONFIG_UART0_RTS_PIN,
 #endif
@@ -143,6 +143,10 @@ struct bfin_serial_res bfin_serial_resource[] = {
 #ifdef CONFIG_SERIAL_BFIN_DMA
        CH_UART1_TX,
        CH_UART1_RX,
+#endif
+#ifdef CONFIG_SERIAL_BFIN_CTSRTS
+       0,
+       0,
 #endif
        },
 #endif
@@ -154,7 +158,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
        CH_UART2_TX,
        CH_UART2_RX,
 #endif
-#ifdef CONFIG_BFIN_UART2_CTSRTS
+#ifdef CONFIG_SERIAL_BFIN_CTSRTS
        CONFIG_UART2_CTS_PIN,
        CONFIG_UART2_RTS_PIN,
 #endif
@@ -167,6 +171,10 @@ struct bfin_serial_res bfin_serial_resource[] = {
 #ifdef CONFIG_SERIAL_BFIN_DMA
        CH_UART3_TX,
        CH_UART3_RX,
+#endif
+#ifdef CONFIG_SERIAL_BFIN_CTSRTS
+       0,
+       0,
 #endif
        },
 #endif
index 60299a71e0905fe3b97566afce8efef8265e1ab5..f194625f68216375bdf720f743826d31e28d7581 100644 (file)
@@ -123,8 +123,8 @@ Events         (highest priority)  EMU         0
 #define IRQ_MXVR_ERROR         BFIN_IRQ(51)    /* MXVR Status (Error) Interrupt */
 #define IRQ_MXVR_MSG           BFIN_IRQ(52)    /* MXVR Message Interrupt */
 #define IRQ_MXVR_PKT           BFIN_IRQ(53)    /* MXVR Packet Interrupt */
-#define IRQ_EPP1_ERROR         BFIN_IRQ(54)    /* EPPI1 Error Interrupt */
-#define IRQ_EPP2_ERROR         BFIN_IRQ(55)    /* EPPI2 Error Interrupt */
+#define IRQ_EPPI1_ERROR                BFIN_IRQ(54)    /* EPPI1 Error Interrupt */
+#define IRQ_EPPI2_ERROR                BFIN_IRQ(55)    /* EPPI2 Error Interrupt */
 #define IRQ_UART3_ERROR                BFIN_IRQ(56)    /* UART3 Status (Error) Interrupt */
 #define IRQ_HOST_ERROR         BFIN_IRQ(57)    /* HOST Status (Error) Interrupt */
 #define IRQ_PIXC_ERROR         BFIN_IRQ(59)    /* PIXC Status (Error) Interrupt */
@@ -361,8 +361,8 @@ Events         (highest priority)  EMU         0
 #define IRQ_UART2_ERR          IRQ_UART2_ERROR
 #define IRQ_CAN0_ERR           IRQ_CAN0_ERROR
 #define IRQ_MXVR_ERR           IRQ_MXVR_ERROR
-#define IRQ_EPP1_ERR           IRQ_EPP1_ERROR
-#define IRQ_EPP2_ERR           IRQ_EPP2_ERROR
+#define IRQ_EPPI1_ERR                  IRQ_EPPI1_ERROR
+#define IRQ_EPPI2_ERR                  IRQ_EPPI2_ERROR
 #define IRQ_UART3_ERR          IRQ_UART3_ERROR
 #define IRQ_HOST_ERR           IRQ_HOST_ERROR
 #define IRQ_PIXC_ERR           IRQ_PIXC_ERROR
index e41a67b1fb53e53933a0d41aa5f86cb309bf9b72..e4bc6d7c5a6a1e83ba33a287cc7feb6aabcc7d7a 100644 (file)
@@ -19,9 +19,4 @@ config BFIN561_BLUETECHNIX_CM
        help
          CM-BF561 support for EVAL- and DEV-Board.
 
-config GENERIC_BF561_BOARD
-       bool "Generic"
-       help
-         Generic or Custom board support.
-
 endchoice
index 04add010b568459da6d324afd87bf4ae46d40b55..3a152559e957d1ab98cac121399256be9a72bc4a 100644 (file)
@@ -2,7 +2,6 @@
 # arch/blackfin/mach-bf561/boards/Makefile
 #
 
-obj-$(CONFIG_GENERIC_BF561_BOARD)      += generic_board.o
 obj-$(CONFIG_BFIN561_BLUETECHNIX_CM)   += cm_bf561.o
 obj-$(CONFIG_BFIN561_EZKIT)            += ezkit.o
 obj-$(CONFIG_BFIN561_TEPLA)            += tepla.o
index 6880d1ebfe60f087b1ec19297b8d0d164f851bc5..f623c6b0719fbc2711f1942e19e4a7143f359c4a 100644 (file)
@@ -105,9 +105,9 @@ static struct bfin5xx_spi_chip ad9960_spi_chip_info = {
 };
 #endif
 
-#if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
-static struct bfin5xx_spi_chip spi_mmc_chip_info = {
-       .enable_dma = 1,
+#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
+static struct bfin5xx_spi_chip mmc_spi_chip_info = {
+       .enable_dma = 0,
        .bits_per_word = 8,
 };
 #endif
@@ -155,14 +155,13 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
                .controller_data = &ad9960_spi_chip_info,
        },
 #endif
-#if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
+#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
        {
-               .modalias = "spi_mmc",
+               .modalias = "mmc_spi",
                .max_speed_hz = 25000000,     /* max spi clock (SCK) speed in HZ */
                .bus_num = 0,
-               .chip_select = CONFIG_SPI_MMC_CS_CHAN,
-               .platform_data = NULL,
-               .controller_data = &spi_mmc_chip_info,
+               .chip_select = 5,
+               .controller_data = &mmc_spi_chip_info,
                .mode = SPI_MODE_3,
        },
 #endif
diff --git a/arch/blackfin/mach-bf561/boards/generic_board.c b/arch/blackfin/mach-bf561/boards/generic_board.c
deleted file mode 100644 (file)
index 0ba366a..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * File:         arch/blackfin/mach-bf561/generic_board.c
- * Based on:     arch/blackfin/mach-bf533/ezkit.c
- * Author:       Aidan Williams <aidan@nicta.com.au>
- *
- * Created:
- * Description:
- *
- * Modified:
- *               Copyright 2005 National ICT Australia (NICTA)
- *               Copyright 2004-2006 Analog Devices Inc.
- *
- * Bugs:         Enter bugs at http://blackfin.uclinux.org/
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, see the file COPYING, or write
- * to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#include <linux/device.h>
-#include <linux/platform_device.h>
-#include <linux/irq.h>
-
-const char bfin_board_name[] = "UNKNOWN BOARD";
-
-/*
- *  Driver needs to know address, irq and flag pin.
- */
-#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
-static struct resource smc91x_resources[] = {
-       {
-               .start = 0x2C010300,
-               .end = 0x2C010300 + 16,
-               .flags = IORESOURCE_MEM,
-       }, {
-               .start = IRQ_PROG_INTB,
-               .end = IRQ_PROG_INTB,
-               .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
-       }, {
-               .start = IRQ_PF9,
-               .end = IRQ_PF9,
-               .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
-       },
-};
-
-static struct platform_device smc91x_device = {
-       .name = "smc91x",
-       .id = 0,
-       .num_resources = ARRAY_SIZE(smc91x_resources),
-       .resource = smc91x_resources,
-};
-#endif
-
-#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
-#ifdef CONFIG_BFIN_SIR0
-static struct resource bfin_sir0_resources[] = {
-       {
-               .start = 0xFFC00400,
-               .end = 0xFFC004FF,
-               .flags = IORESOURCE_MEM,
-       },
-       {
-               .start = IRQ_UART0_RX,
-               .end = IRQ_UART0_RX+1,
-               .flags = IORESOURCE_IRQ,
-       },
-       {
-               .start = CH_UART0_RX,
-               .end = CH_UART0_RX+1,
-               .flags = IORESOURCE_DMA,
-       },
-};
-
-static struct platform_device bfin_sir0_device = {
-       .name = "bfin_sir",
-       .id = 0,
-       .num_resources = ARRAY_SIZE(bfin_sir0_resources),
-       .resource = bfin_sir0_resources,
-};
-#endif
-#endif
-
-static struct platform_device *generic_board_devices[] __initdata = {
-#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
-       &smc91x_device,
-#endif
-
-#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
-#ifdef CONFIG_BFIN_SIR0
-       &bfin_sir0_device,
-#endif
-#endif
-};
-
-static int __init generic_board_init(void)
-{
-       printk(KERN_INFO "%s(): registering device resources\n", __func__);
-       return platform_add_devices(generic_board_devices,
-                                   ARRAY_SIZE(generic_board_devices));
-}
-
-arch_initcall(generic_board_init);
index 1a9e17562821cd754ba1815aa449a2d8d4f5223e..d0b0b3506440fee5373c850b19cf703a94941681 100644 (file)
@@ -2,7 +2,7 @@
  * File: include/asm-blackfin/mach-bf561/anomaly.h
  * Bugs: Enter bugs at http://blackfin.uclinux.org/
  *
- * Copyright (C) 2004-2008 Analog Devices Inc.
+ * Copyright (C) 2004-2009 Analog Devices Inc.
  * Licensed under the GPL-2 or later.
  */
 
 #define ANOMALY_05000301 (1)
 /* SSYNCs After Writes To DMA MMR Registers May Not Be Handled Correctly */
 #define ANOMALY_05000302 (1)
-/* New Feature: Additional Hysteresis on SPORT Input Pins (Not Available On Older Silicon) */
+/* SPORT_HYS Bit in PLL_CTL Register Is Not Functional */
 #define ANOMALY_05000305 (__SILICON_REVISION__ < 5)
 /* SCKELOW Bit Does Not Maintain State Through Hibernate */
 #define ANOMALY_05000307 (__SILICON_REVISION__ < 5)
 #define ANOMALY_05000273 (0)
 #define ANOMALY_05000311 (0)
 #define ANOMALY_05000353 (1)
+#define ANOMALY_05000380 (0)
 #define ANOMALY_05000386 (1)
 #define ANOMALY_05000432 (0)
 #define ANOMALY_05000435 (0)
+#define ANOMALY_05000447 (0)
+#define ANOMALY_05000448 (0)
 
 #endif
index 043bfcf26c52a2250c4399a484904e0e0906e9af..ca8c5f6452093c7c8d9247906e35a8b1baf4fb9b 100644 (file)
@@ -134,7 +134,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
        CH_UART_TX,
        CH_UART_RX,
 #endif
-#ifdef CONFIG_BFIN_UART0_CTSRTS
+#ifdef CONFIG_SERIAL_BFIN_CTSRTS
        CONFIG_UART0_CTS_PIN,
        CONFIG_UART0_RTS_PIN,
 #endif
index 98133b968f7b9eabab64d7f1e76d903fb3af2745..80d39b2f9db295d2709574664528a9c71b6ac1db 100644 (file)
 #if (CONFIG_BOOT_LOAD & 0x3)
 # error "The kernel load address must be 4 byte aligned"
 #endif
+
+/* The entire kernel must be able to make a 24bit pcrel call to start of L1 */
+#if ((0xffffffff - L1_CODE_START + 1) + CONFIG_BOOT_LOAD) > 0x1000000
+# error "The kernel load address is too high; keep it below 10meg for safety"
+#endif
+
+#if ANOMALY_05000448
+# error You are using a part with anomaly 05000448, this issue causes random memory read/write failures - that means random crashes.
+#endif
index 3c98dacbf2892960ec4053f3c3bfde85bbc01fd9..aa0648c6a9feb19111d2b8e60e96dfef12bc9340 100644 (file)
 
 /* Invalidate all instruction cache lines assocoiated with this memory area */
 ENTRY(_blackfin_icache_flush_range)
+/*
+ * Walkaround to avoid loading wrong instruction after invalidating icache
+ * and following sequence is met.
+ *
+ * 1) One instruction address is cached in the instruction cache.
+ * 2) This instruction in SDRAM is changed.
+ * 3) IFLASH[P0] is executed only once in blackfin_icache_flush_range().
+ * 4) This instruction is executed again, but the old one is loaded.
+ */
+       P0 = R0;
+       IFLUSH[P0];
        do_flush IFLUSH, , nop
 ENDPROC(_blackfin_icache_flush_range)
 
 /* Flush all cache lines assocoiated with this area of memory. */
 ENTRY(_blackfin_icache_dcache_flush_range)
+/*
+ * Walkaround to avoid loading wrong instruction after invalidating icache
+ * and following sequence is met.
+ *
+ * 1) One instruction address is cached in the instruction cache.
+ * 2) This instruction in SDRAM is changed.
+ * 3) IFLASH[P0] is executed only once in blackfin_icache_flush_range().
+ * 4) This instruction is executed again, but the old one is loaded.
+ */
+       P0 = R0;
+       IFLUSH[P0];
        do_flush FLUSH, IFLUSH
 ENDPROC(_blackfin_icache_dcache_flush_range)
 
index 9dddb6f8cc855296c5e98213bc45b8d76d123276..35393651359bfc004d996154fb7d8d2497e45b5b 100644 (file)
@@ -17,7 +17,7 @@
 #define SDGCTL_WIDTH (1 << 31) /* SDRAM external data path width */
 #define PLL_CTL_VAL \
        (((CONFIG_VCO_MULT & 63) << 9) | CLKIN_HALF | \
-        (PLL_BYPASS << 8) | (ANOMALY_05000265 ? 0x8000 : 0))
+        (PLL_BYPASS << 8) | (ANOMALY_05000305 ? 0 : 0x8000))
 
 __attribute__((l1_text))
 static void do_sync(void)
index 4da50bcd9300de6fb96952bd0bdc0991b15bc183..8009a512fb1186214af8998e3400b73bb40d4f67 100644 (file)
@@ -376,10 +376,22 @@ ENTRY(_do_hibernate)
 #endif
 
 #ifdef PINT0_ASSIGN
+       PM_SYS_PUSH(PINT0_MASK_SET)
+       PM_SYS_PUSH(PINT1_MASK_SET)
+       PM_SYS_PUSH(PINT2_MASK_SET)
+       PM_SYS_PUSH(PINT3_MASK_SET)
        PM_SYS_PUSH(PINT0_ASSIGN)
        PM_SYS_PUSH(PINT1_ASSIGN)
        PM_SYS_PUSH(PINT2_ASSIGN)
        PM_SYS_PUSH(PINT3_ASSIGN)
+       PM_SYS_PUSH(PINT0_INVERT_SET)
+       PM_SYS_PUSH(PINT1_INVERT_SET)
+       PM_SYS_PUSH(PINT2_INVERT_SET)
+       PM_SYS_PUSH(PINT3_INVERT_SET)
+       PM_SYS_PUSH(PINT0_EDGE_SET)
+       PM_SYS_PUSH(PINT1_EDGE_SET)
+       PM_SYS_PUSH(PINT2_EDGE_SET)
+       PM_SYS_PUSH(PINT3_EDGE_SET)
 #endif
 
        PM_SYS_PUSH(EBIU_AMBCTL0)
@@ -714,10 +726,22 @@ ENTRY(_do_hibernate)
        PM_SYS_POP(EBIU_AMBCTL0)
 
 #ifdef PINT0_ASSIGN
+       PM_SYS_POP(PINT3_EDGE_SET)
+       PM_SYS_POP(PINT2_EDGE_SET)
+       PM_SYS_POP(PINT1_EDGE_SET)
+       PM_SYS_POP(PINT0_EDGE_SET)
+       PM_SYS_POP(PINT3_INVERT_SET)
+       PM_SYS_POP(PINT2_INVERT_SET)
+       PM_SYS_POP(PINT1_INVERT_SET)
+       PM_SYS_POP(PINT0_INVERT_SET)
        PM_SYS_POP(PINT3_ASSIGN)
        PM_SYS_POP(PINT2_ASSIGN)
        PM_SYS_POP(PINT1_ASSIGN)
        PM_SYS_POP(PINT0_ASSIGN)
+       PM_SYS_POP(PINT3_MASK_SET)
+       PM_SYS_POP(PINT2_MASK_SET)
+       PM_SYS_POP(PINT1_MASK_SET)
+       PM_SYS_POP(PINT0_MASK_SET)
 #endif
 
 #ifdef SICA_IWR1
index 88de053bbe8ed58dcdb6e7b4bad80657a3e011db..21e65a339a22aacb857d1a76cdbe93863743298b 100644 (file)
@@ -600,6 +600,19 @@ ENTRY(_system_call)
        p2 = [p2];
 
        [p2+(TASK_THREAD+THREAD_KSP)] = sp;
+#ifdef CONFIG_IPIPE
+       r0 = sp;
+       SP += -12;
+       call ___ipipe_syscall_root;
+       SP += 12;
+       cc = r0 == 1;
+       if cc jump .Lsyscall_really_exit;
+       cc = r0 == -1;
+       if cc jump .Lresume_userspace;
+       r3 = [sp + PT_R3];
+       r4 = [sp + PT_R4];
+       p0 = [sp + PT_ORIG_P0];
+#endif /* CONFIG_IPIPE */
 
        /* Check the System Call */
        r7 = __NR_syscall;
@@ -654,6 +667,17 @@ ENTRY(_system_call)
        r7 =  r7 & r4;
 
 .Lsyscall_resched:
+#ifdef CONFIG_IPIPE
+       cc = BITTST(r7, TIF_IRQ_SYNC);
+       if !cc jump .Lsyscall_no_irqsync;
+       [--sp] = reti;
+       r0 = [sp++];
+       SP += -12;
+       call ___ipipe_sync_root;
+       SP += 12;
+       jump .Lresume_userspace_1;
+.Lsyscall_no_irqsync:
+#endif
        cc = BITTST(r7, TIF_NEED_RESCHED);
        if !cc jump .Lsyscall_sigpending;
 
@@ -685,6 +709,10 @@ ENTRY(_system_call)
 .Lsyscall_really_exit:
        r5 = [sp + PT_RESERVED];
        rets = r5;
+#ifdef CONFIG_IPIPE
+       [--sp] = reti;
+       r5 = [sp++];
+#endif /* CONFIG_IPIPE */
        rts;
 ENDPROC(_system_call)
 
@@ -771,6 +799,15 @@ _new_old_task:
 ENDPROC(_resume)
 
 ENTRY(_ret_from_exception)
+#ifdef CONFIG_IPIPE
+       [--sp] = rets;
+       SP += -12;
+       call ___ipipe_check_root
+       SP += 12
+       rets = [sp++];
+       cc = r0 == 0;
+       if cc jump 4f;                /* not on behalf of Linux, get out */
+#endif /* CONFIG_IPIPE */
        p2.l = lo(IPEND);
        p2.h = hi(IPEND);
 
@@ -827,6 +864,28 @@ ENTRY(_ret_from_exception)
        rts;
 ENDPROC(_ret_from_exception)
 
+#ifdef CONFIG_IPIPE
+
+_sync_root_irqs:
+       [--sp] = reti;          /* Reenable interrupts */
+       r0 = [sp++];
+       jump.l ___ipipe_sync_root
+
+_resume_kernel_from_int:
+       r0.l = _sync_root_irqs
+       r0.h = _sync_root_irqs
+       [--sp] = rets;
+       [--sp] = ( r7:4, p5:3 );
+       SP += -12;
+       call ___ipipe_call_irqtail
+       SP += 12;
+       ( r7:4, p5:3 ) = [sp++];
+       rets = [sp++];
+       rts
+#else
+#define _resume_kernel_from_int         2f
+#endif
+
 ENTRY(_return_from_int)
        /* If someone else already raised IRQ 15, do nothing.  */
        csync;
@@ -848,7 +907,7 @@ ENTRY(_return_from_int)
        r1 = r0 - r1;
        r2 = r0 & r1;
        cc = r2 == 0;
-       if !cc jump 2f;
+       if !cc jump _resume_kernel_from_int;
 
        /* Lower the interrupt level to 15.  */
        p0.l = lo(EVT15);
index 43c4eb9acb65e11b0ce1c0fdc480cb1849005a4d..0069c2dd462520db2a1abb7ad4c54108efcc5203 100644 (file)
@@ -235,6 +235,7 @@ ENDPROC(_evt_system_call)
 
 #ifdef CONFIG_IPIPE
 ENTRY(___ipipe_call_irqtail)
+       p0 = r0;
        r0.l = 1f;
        r0.h = 1f;
        reti = r0;
@@ -242,9 +243,6 @@ ENTRY(___ipipe_call_irqtail)
 1:
        [--sp] = rets;
        [--sp] = ( r7:4, p5:3 );
-       p0.l = ___ipipe_irq_tail_hook;
-       p0.h = ___ipipe_irq_tail_hook;
-       p0 = [p0];
        sp += -12;
        call (p0);
        sp += 12;
@@ -259,7 +257,7 @@ ENTRY(___ipipe_call_irqtail)
        p0.h = hi(EVT14);
        [p0] = r0;
        csync;
-       r0 = 0x401f;
+       r0 = 0x401f (z);
        sti r0;
        raise 14;
        [--sp] = reti;          /* IRQs on. */
@@ -277,11 +275,7 @@ ENTRY(___ipipe_call_irqtail)
        p0.h = _bfin_irq_flags;
        r0 = [p0];
        sti r0;
-#if 0 /* FIXME: this actually raises scheduling latencies */
-       /* Reenable interrupts */
-       [--sp] = reti;
-       r0 = [sp++];
-#endif
        rts;
 ENDPROC(___ipipe_call_irqtail)
+
 #endif /* CONFIG_IPIPE */
index 202494568c6c0303b76cafb279b1b06f97fc9963..a7d7b2dd4059a7f5685cec710bb9409174c31589 100644 (file)
@@ -161,11 +161,15 @@ static void bfin_core_unmask_irq(unsigned int irq)
 
 static void bfin_internal_mask_irq(unsigned int irq)
 {
+       unsigned long flags;
+
 #ifdef CONFIG_BF53x
+       local_irq_save_hw(flags);
        bfin_write_SIC_IMASK(bfin_read_SIC_IMASK() &
                             ~(1 << SIC_SYSIRQ(irq)));
 #else
        unsigned mask_bank, mask_bit;
+       local_irq_save_hw(flags);
        mask_bank = SIC_SYSIRQ(irq) / 32;
        mask_bit = SIC_SYSIRQ(irq) % 32;
        bfin_write_SIC_IMASK(mask_bank, bfin_read_SIC_IMASK(mask_bank) &
@@ -175,15 +179,20 @@ static void bfin_internal_mask_irq(unsigned int irq)
                             ~(1 << mask_bit));
 #endif
 #endif
+       local_irq_restore_hw(flags);
 }
 
 static void bfin_internal_unmask_irq(unsigned int irq)
 {
+       unsigned long flags;
+
 #ifdef CONFIG_BF53x
+       local_irq_save_hw(flags);
        bfin_write_SIC_IMASK(bfin_read_SIC_IMASK() |
                             (1 << SIC_SYSIRQ(irq)));
 #else
        unsigned mask_bank, mask_bit;
+       local_irq_save_hw(flags);
        mask_bank = SIC_SYSIRQ(irq) / 32;
        mask_bit = SIC_SYSIRQ(irq) % 32;
        bfin_write_SIC_IMASK(mask_bank, bfin_read_SIC_IMASK(mask_bank) |
@@ -193,6 +202,7 @@ static void bfin_internal_unmask_irq(unsigned int irq)
                             (1 << mask_bit));
 #endif
 #endif
+       local_irq_restore_hw(flags);
 }
 
 #ifdef CONFIG_PM
@@ -390,7 +400,7 @@ static void bfin_demux_error_irq(unsigned int int_err_irq,
 static inline void bfin_set_irq_handler(unsigned irq, irq_flow_handler_t handle)
 {
 #ifdef CONFIG_IPIPE
-       _set_irq_handler(irq, handle_edge_irq);
+       _set_irq_handler(irq, handle_level_irq);
 #else
        struct irq_desc *desc = irq_desc + irq;
        /* May not call generic set_irq_handler() due to spinlock
@@ -1055,13 +1065,18 @@ int __init init_arch_irq(void)
 #endif
                default:
 #ifdef CONFIG_IPIPE
-       /*
-        * We want internal interrupt sources to be masked, because
-        * ISRs may trigger interrupts recursively (e.g. DMA), but
-        * interrupts are _not_ masked at CPU level. So let's handle
-        * them as level interrupts.
-        */
-                       set_irq_handler(irq, handle_level_irq);
+                       /*
+                        * We want internal interrupt sources to be
+                        * masked, because ISRs may trigger interrupts
+                        * recursively (e.g. DMA), but interrupts are
+                        * _not_ masked at CPU level. So let's handle
+                        * most of them as level interrupts, except
+                        * the timer interrupt which is special.
+                        */
+                       if (irq == IRQ_SYSTMR || irq == IRQ_CORETMR)
+                               set_irq_handler(irq, handle_simple_irq);
+                       else
+                               set_irq_handler(irq, handle_level_irq);
 #else /* !CONFIG_IPIPE */
                        set_irq_handler(irq, handle_simple_irq);
 #endif /* !CONFIG_IPIPE */
@@ -1123,9 +1138,8 @@ int __init init_arch_irq(void)
 
 #ifdef CONFIG_IPIPE
        for (irq = 0; irq < NR_IRQS; irq++) {
-               struct irq_desc *desc = irq_desc + irq;
+               struct irq_desc *desc = irq_to_desc(irq);
                desc->ic_prio = __ipipe_get_irq_priority(irq);
-               desc->thr_prio = __ipipe_get_irqthread_priority(irq);
        }
 #endif /* CONFIG_IPIPE */
 
@@ -1208,76 +1222,21 @@ int __ipipe_get_irq_priority(unsigned irq)
        return IVG15;
 }
 
-int __ipipe_get_irqthread_priority(unsigned irq)
-{
-       int ient, prio;
-       int demux_irq;
-
-       /* The returned priority value is rescaled to [0..IVG13+1]
-        * with 0 being the lowest effective priority level. */
-
-       if (irq <= IRQ_CORETMR)
-               return IVG13 - irq + 1;
-
-       /* GPIO IRQs are given the priority of the demux
-        * interrupt. */
-       if (IS_GPIOIRQ(irq)) {
-#if defined(CONFIG_BF54x)
-               u32 bank = PINT_2_BANK(irq2pint_lut[irq - SYS_IRQS]);
-               demux_irq = (bank == 0 ? IRQ_PINT0 :
-                               bank == 1 ? IRQ_PINT1 :
-                               bank == 2 ? IRQ_PINT2 :
-                               IRQ_PINT3);
-#elif defined(CONFIG_BF561)
-               demux_irq = (irq >= IRQ_PF32 ? IRQ_PROG2_INTA :
-                               irq >= IRQ_PF16 ? IRQ_PROG1_INTA :
-                               IRQ_PROG0_INTA);
-#elif defined(CONFIG_BF52x)
-               demux_irq = (irq >= IRQ_PH0 ? IRQ_PORTH_INTA :
-                               irq >= IRQ_PG0 ? IRQ_PORTG_INTA :
-                               IRQ_PORTF_INTA);
-#else
-               demux_irq = irq;
-#endif
-               return IVG13 - PRIO_GPIODEMUX(demux_irq) + 1;
-       }
-
-       /* The GPIO demux interrupt is given a lower priority
-        * than the GPIO IRQs, so that its threaded handler
-        * unmasks the interrupt line after the decoded IRQs
-        * have been processed. */
-       prio = PRIO_GPIODEMUX(irq);
-       /* demux irq? */
-       if (prio != -1)
-               return IVG13 - prio;
-
-       for (ient = 0; ient < NR_PERI_INTS; ient++) {
-               struct ivgx *ivg = ivg_table + ient;
-               if (ivg->irqno == irq) {
-                       for (prio = 0; prio <= IVG13-IVG7; prio++) {
-                               if (ivg7_13[prio].ifirst <= ivg &&
-                                   ivg7_13[prio].istop > ivg)
-                                       return IVG7 - prio;
-                       }
-               }
-       }
-
-       return 0;
-}
-
 /* Hw interrupts are disabled on entry (check SAVE_CONTEXT). */
 #ifdef CONFIG_DO_IRQ_L1
 __attribute__((l1_text))
 #endif
 asmlinkage int __ipipe_grab_irq(int vec, struct pt_regs *regs)
 {
+       struct ipipe_percpu_domain_data *p = ipipe_root_cpudom_ptr();
+       struct ipipe_domain *this_domain = ipipe_current_domain;
        struct ivgx *ivg_stop = ivg7_13[vec-IVG7].istop;
        struct ivgx *ivg = ivg7_13[vec-IVG7].ifirst;
-       int irq;
+       int irq, s;
 
        if (likely(vec == EVT_IVTMR_P)) {
                irq = IRQ_CORETMR;
-               goto handle_irq;
+               goto core_tick;
        }
 
        SSYNC();
@@ -1319,24 +1278,39 @@ asmlinkage int __ipipe_grab_irq(int vec, struct pt_regs *regs)
        irq = ivg->irqno;
 
        if (irq == IRQ_SYSTMR) {
+#ifdef CONFIG_GENERIC_CLOCKEVENTS
+core_tick:
+#else
                bfin_write_TIMER_STATUS(1); /* Latch TIMIL0 */
+#endif
                /* This is basically what we need from the register frame. */
                __raw_get_cpu_var(__ipipe_tick_regs).ipend = regs->ipend;
                __raw_get_cpu_var(__ipipe_tick_regs).pc = regs->pc;
-               if (!ipipe_root_domain_p)
-                       __raw_get_cpu_var(__ipipe_tick_regs).ipend |= 0x10;
-               else
+               if (this_domain != ipipe_root_domain)
                        __raw_get_cpu_var(__ipipe_tick_regs).ipend &= ~0x10;
+               else
+                       __raw_get_cpu_var(__ipipe_tick_regs).ipend |= 0x10;
        }
 
-handle_irq:
+#ifndef CONFIG_GENERIC_CLOCKEVENTS
+core_tick:
+#endif
+       if (this_domain == ipipe_root_domain) {
+               s = __test_and_set_bit(IPIPE_SYNCDEFER_FLAG, &p->status);
+               barrier();
+       }
 
        ipipe_trace_irq_entry(irq);
        __ipipe_handle_irq(irq, regs);
-       ipipe_trace_irq_exit(irq);
+       ipipe_trace_irq_exit(irq);
 
-       if (ipipe_root_domain_p)
-               return !test_bit(IPIPE_STALL_FLAG, &ipipe_root_cpudom_var(status));
+       if (this_domain == ipipe_root_domain) {
+               set_thread_flag(TIF_IRQ_SYNC);
+               if (!s) {
+                       __clear_bit(IPIPE_SYNCDEFER_FLAG, &p->status);
+                       return !test_bit(IPIPE_STALL_FLAG, &p->status);
+               }
+       }
 
        return 0;
 }
index 77c9928470944d0c4ceeecb7a691b45482e1fb09..93eab61460792b8a10d08f7ce33ee3d1d9f1d853 100644 (file)
@@ -158,10 +158,14 @@ static irqreturn_t ipi_handler(int irq, void *dev_instance)
                        kfree(msg);
                        break;
                case BFIN_IPI_CALL_FUNC:
+                       spin_unlock(&msg_queue->lock);
                        ipi_call_function(cpu, msg);
+                       spin_lock(&msg_queue->lock);
                        break;
                case BFIN_IPI_CPU_STOP:
+                       spin_unlock(&msg_queue->lock);
                        ipi_cpu_stop(cpu);
+                       spin_lock(&msg_queue->lock);
                        kfree(msg);
                        break;
                default:
@@ -457,7 +461,7 @@ void smp_icache_flush_range_others(unsigned long start, unsigned long end)
        smp_flush_data.start = start;
        smp_flush_data.end = end;
 
-       if (smp_call_function(&ipi_flush_icache, &smp_flush_data, 1))
+       if (smp_call_function(&ipi_flush_icache, &smp_flush_data, 0))
                printk(KERN_WARNING "SMP: failed to run I-cache flush request on other CPUs\n");
 }
 EXPORT_SYMBOL_GPL(smp_icache_flush_range_others);
index d0532b72bba56d34f31526fd5c889d71c89217b3..9c3629b9a689420edb42a34e3d7611c9650fbe57 100644 (file)
@@ -104,7 +104,7 @@ void __init paging_init(void)
        }
 }
 
-asmlinkage void init_pda(void)
+asmlinkage void __init init_pda(void)
 {
        unsigned int cpu = raw_smp_processor_id();
 
index e626e50a938a3ce91b2d9926f06d036d63f29609..060df4aa9916853297a0be09d4221c5a95e37654 100644 (file)
@@ -135,11 +135,10 @@ pcibr_dmatrans_direct64(struct pcidev_info * info, u64 paddr,
        if (SN_DMA_ADDRTYPE(dma_flags) == SN_DMA_ADDR_PHYS)
                pci_addr = IS_PIC_SOFT(pcibus_info) ?
                                PHYS_TO_DMA(paddr) :
-                               PHYS_TO_TIODMA(paddr) | dma_attributes;
+                               PHYS_TO_TIODMA(paddr);
        else
-               pci_addr = IS_PIC_SOFT(pcibus_info) ?
-                               paddr :
-                               paddr | dma_attributes;
+               pci_addr = paddr;
+       pci_addr |= dma_attributes;
 
        /* Handle Bus mode */
        if (IS_PCIX(pcibus_info))
index d01a5d2b75579190df5babe0f162a9b1eb947041..db902540bf2c980fb8f2e4e89c1915dddbf5dc88 100644 (file)
@@ -17,6 +17,7 @@
 #include <asm/coldfire.h>
 #include <asm/mcfsim.h>
 #include <asm/mcfdma.h>
+#include <asm/mcfuart.h>
 
 /***************************************************************************/
 
index dfdb5c2ed8e6d35a3ce45b0827c03b61833c2eaf..44baeb225dc7bbc0c08003b1fd26fa34086ddf5a 100644 (file)
@@ -24,7 +24,6 @@
 #include <asm/coldfire.h>
 #include <asm/mcfsim.h>
 #include <asm/mcfuart.h>
-#include <asm/mcfqspi.h>
 
 #ifdef CONFIG_MTD_PARTITIONS
 #include <linux/mtd/partitions.h>
 /***************************************************************************/
 
 void coldfire_reset(void);
-static void coldfire_qspi_cs_control(u8 cs, u8 command);
-
-/***************************************************************************/
-
-#if defined(CONFIG_SPI)
-
-#if defined(CONFIG_WILDFIRE)
-#define SPI_NUM_CHIPSELECTS    0x02
-#define SPI_PAR_VAL            0x07  /* Enable DIN, DOUT, CLK */
-#define SPI_CS_MASK            0x18
-
-#define FLASH_BLOCKSIZE                (1024*64)
-#define FLASH_NUMBLOCKS                16
-#define FLASH_TYPE             "m25p80"
-
-#define M25P80_CS              0
-#define MMC_CS                 1
-
-#ifdef CONFIG_MTD_PARTITIONS
-static struct mtd_partition stm25p_partitions[] = {
-       /* sflash */
-       [0] = {
-               .name = "stm25p80",
-               .offset = 0x00000000,
-               .size = FLASH_BLOCKSIZE * FLASH_NUMBLOCKS,
-               .mask_flags = 0
-       }
-};
-
-#endif
-
-#elif defined(CONFIG_WILDFIREMOD)
-
-#define SPI_NUM_CHIPSELECTS    0x08
-#define SPI_PAR_VAL            0x07  /* Enable DIN, DOUT, CLK */
-#define SPI_CS_MASK            0x78
-
-#define FLASH_BLOCKSIZE                (1024*64)
-#define FLASH_NUMBLOCKS                64
-#define FLASH_TYPE             "m25p32"
-/* Reserve 1M for the kernel parition */
-#define FLASH_KERNEL_SIZE   (1024 * 1024)
-
-#define M25P80_CS              5
-#define MMC_CS                 6
-
-#ifdef CONFIG_MTD_PARTITIONS
-static struct mtd_partition stm25p_partitions[] = {
-       /* sflash */
-       [0] = {
-               .name = "kernel",
-               .offset = FLASH_BLOCKSIZE * FLASH_NUMBLOCKS - FLASH_KERNEL_SIZE,
-               .size = FLASH_KERNEL_SIZE,
-               .mask_flags = 0
-       },
-       [1] = {
-               .name = "image",
-               .offset = 0x00000000,
-               .size = FLASH_BLOCKSIZE * FLASH_NUMBLOCKS - FLASH_KERNEL_SIZE,
-               .mask_flags = 0
-       },
-       [2] = {
-               .name = "all",
-               .offset = 0x00000000,
-               .size = FLASH_BLOCKSIZE * FLASH_NUMBLOCKS,
-               .mask_flags = 0
-       }
-};
-#endif
-
-#else
-#define SPI_NUM_CHIPSELECTS    0x04
-#define SPI_PAR_VAL            0x7F  /* Enable DIN, DOUT, CLK, CS0 - CS4 */
-#endif
-
-#ifdef MMC_CS
-static struct coldfire_spi_chip flash_chip_info = {
-       .mode = SPI_MODE_0,
-       .bits_per_word = 16,
-       .del_cs_to_clk = 17,
-       .del_after_trans = 1,
-       .void_write_data = 0
-};
-
-static struct coldfire_spi_chip mmc_chip_info = {
-       .mode = SPI_MODE_0,
-       .bits_per_word = 16,
-       .del_cs_to_clk = 17,
-       .del_after_trans = 1,
-       .void_write_data = 0xFFFF
-};
-#endif
-
-#ifdef M25P80_CS
-static struct flash_platform_data stm25p80_platform_data = {
-       .name = "ST M25P80 SPI Flash chip",
-#ifdef CONFIG_MTD_PARTITIONS
-       .parts = stm25p_partitions,
-       .nr_parts = sizeof(stm25p_partitions) / sizeof(*stm25p_partitions),
-#endif
-       .type = FLASH_TYPE
-};
-#endif
-
-static struct spi_board_info spi_board_info[] __initdata = {
-#ifdef M25P80_CS
-       {
-               .modalias = "m25p80",
-               .max_speed_hz = 16000000,
-               .bus_num = 1,
-               .chip_select = M25P80_CS,
-               .platform_data = &stm25p80_platform_data,
-               .controller_data = &flash_chip_info
-       },
-#endif
-#ifdef MMC_CS
-       {
-               .modalias = "mmc_spi",
-               .max_speed_hz = 16000000,
-               .bus_num = 1,
-               .chip_select = MMC_CS,
-               .controller_data = &mmc_chip_info
-       }
-#endif
-};
-
-static struct coldfire_spi_master coldfire_master_info = {
-       .bus_num = 1,
-       .num_chipselect = SPI_NUM_CHIPSELECTS,
-       .irq_source = MCF5282_QSPI_IRQ_SOURCE,
-       .irq_vector = MCF5282_QSPI_IRQ_VECTOR,
-       .irq_mask = ((0x01 << MCF5282_QSPI_IRQ_SOURCE) | 0x01),
-       .irq_lp = 0x2B,  /* Level 5 and Priority 3 */
-       .par_val = SPI_PAR_VAL,
-       .cs_control = coldfire_qspi_cs_control,
-};
-
-static struct resource coldfire_spi_resources[] = {
-       [0] = {
-               .name = "qspi-par",
-               .start = MCF5282_QSPI_PAR,
-               .end = MCF5282_QSPI_PAR,
-               .flags = IORESOURCE_MEM
-       },
-
-       [1] = {
-               .name = "qspi-module",
-               .start = MCF5282_QSPI_QMR,
-               .end = MCF5282_QSPI_QMR + 0x18,
-               .flags = IORESOURCE_MEM
-       },
-
-       [2] = {
-               .name = "qspi-int-level",
-               .start = MCF5282_INTC0 + MCFINTC_ICR0 + MCF5282_QSPI_IRQ_SOURCE,
-               .end = MCF5282_INTC0 + MCFINTC_ICR0 + MCF5282_QSPI_IRQ_SOURCE,
-               .flags = IORESOURCE_MEM
-       },
-
-       [3] = {
-               .name = "qspi-int-mask",
-               .start = MCF5282_INTC0 + MCFINTC_IMRL,
-               .end = MCF5282_INTC0 + MCFINTC_IMRL,
-               .flags = IORESOURCE_MEM
-       }
-};
-
-static struct platform_device coldfire_spi = {
-       .name = "spi_coldfire",
-       .id = -1,
-       .resource = coldfire_spi_resources,
-       .num_resources = ARRAY_SIZE(coldfire_spi_resources),
-       .dev = {
-               .platform_data = &coldfire_master_info,
-       }
-};
-
-static void coldfire_qspi_cs_control(u8 cs, u8 command)
-{
-       u8 cs_bit = ((0x01 << cs) << 3) & SPI_CS_MASK;
-
-#if defined(CONFIG_WILDFIRE)
-       u8 cs_mask = ~(((0x01 << cs) << 3) & SPI_CS_MASK);
-#endif
-#if defined(CONFIG_WILDFIREMOD)
-       u8 cs_mask = (cs << 3) & SPI_CS_MASK;
-#endif
-
-       /*
-        * Don't do anything if the chip select is not
-        * one of the port qs pins.
-        */
-       if (command & QSPI_CS_INIT) {
-#if defined(CONFIG_WILDFIRE)
-               MCF5282_GPIO_DDRQS  |= cs_bit;
-               MCF5282_GPIO_PQSPAR &= ~cs_bit;
-#endif
-
-#if defined(CONFIG_WILDFIREMOD)
-               MCF5282_GPIO_DDRQS  |= SPI_CS_MASK;
-               MCF5282_GPIO_PQSPAR &= ~SPI_CS_MASK;
-#endif
-       }
-
-       if (command & QSPI_CS_ASSERT) {
-               MCF5282_GPIO_PORTQS &= ~SPI_CS_MASK;
-               MCF5282_GPIO_PORTQS |= cs_mask;
-       } else if (command & QSPI_CS_DROP) {
-               MCF5282_GPIO_PORTQS |= SPI_CS_MASK;
-       }
-}
-
-static int __init spi_dev_init(void)
-{
-       int retval;
-
-       retval = platform_device_register(&coldfire_spi);
-       if (retval < 0)
-               return retval;
-
-       if (ARRAY_SIZE(spi_board_info))
-               retval = spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
-
-       return retval;
-}
-
-#endif /* CONFIG_SPI */
 
 /***************************************************************************/
 
index ac5d541368e934a30ca17ac03e58bd990b9eb7ca..6c5b40905dd66daff610de074e5f17f7dd17fc8d 100644 (file)
@@ -3,6 +3,8 @@
 /*
  * Architecture specific compatibility types
  */
+#include <linux/seccomp.h>
+#include <linux/thread_info.h>
 #include <linux/types.h>
 #include <asm/page.h>
 #include <asm/ptrace.h>
@@ -218,4 +220,9 @@ struct compat_shmid64_ds {
        compat_ulong_t  __unused2;
 };
 
+static inline int is_compat_task(void)
+{
+       return test_thread_flag(TIF_32BIT);
+}
+
 #endif /* _ASM_COMPAT_H */
index 72da416f6162bbd10d022f5452708ec48d42910a..15b6d450fbf0e6e8c83542308608a89f6e913952 100644 (file)
@@ -22,6 +22,7 @@
 #include <linux/gpio.h>
 #include <linux/spi/spi.h>
 #include <linux/spi/spi_gpio.h>
+#include <media/soc_camera.h>
 #include <media/soc_camera_platform.h>
 #include <media/sh_mobile_ceu.h>
 #include <video/sh_mobile_lcdc.h>
index ca5ffb2856b6810ec399a48ec98cc36d020edd69..edc90f23e70814a80491b45db2409656c1b35be4 100644 (file)
@@ -37,8 +37,6 @@ extern unsigned long asmlinkage efi_call_phys(void *, ...);
 
 #else /* !CONFIG_X86_32 */
 
-#define MAX_EFI_IO_PAGES       100
-
 extern u64 efi_call0(void *fp);
 extern u64 efi_call1(void *fp, u64 arg1);
 extern u64 efi_call2(void *fp, u64 arg1, u64 arg2);
index 00a30ab9b1a5ba466a44c165e1d553d36a77cd19..8be740977db8eb3a4d82c8871830556c06850de4 100644 (file)
@@ -16,7 +16,6 @@
 #include <asm/apicdef.h>
 #include <asm/page.h>
 #include <asm/vsyscall.h>
-#include <asm/efi.h>
 
 /*
  * Here we define all the compile-time 'special' virtual
@@ -43,9 +42,6 @@ enum fixed_addresses {
        FIX_APIC_BASE,  /* local (CPU) APIC) -- required for SMP or not */
        FIX_IO_APIC_BASE_0,
        FIX_IO_APIC_BASE_END = FIX_IO_APIC_BASE_0 + MAX_IO_APICS - 1,
-       FIX_EFI_IO_MAP_LAST_PAGE,
-       FIX_EFI_IO_MAP_FIRST_PAGE = FIX_EFI_IO_MAP_LAST_PAGE
-                                 + MAX_EFI_IO_PAGES - 1,
 #ifdef CONFIG_PARAVIRT
        FIX_PARAVIRT_BOOTMAP,
 #endif
index 48f0004db8c981175c0a900f659f4b41d1fa4dce..71c9e51839827dfc14ec28858467c2ea4815297c 100644 (file)
@@ -172,7 +172,13 @@ static inline void __save_init_fpu(struct task_struct *tsk)
 
 #else  /* CONFIG_X86_32 */
 
-extern void finit(void);
+#ifdef CONFIG_MATH_EMULATION
+extern void finit_task(struct task_struct *tsk);
+#else
+static inline void finit_task(struct task_struct *tsk)
+{
+}
+#endif
 
 static inline void tolerant_fwait(void)
 {
index b585e04cbc9e493055f05160d0db14e58827e139..3178c3acd97ebb4aa515d19da8a7f75b1178b08a 100644 (file)
@@ -277,7 +277,6 @@ static struct cpufreq_driver p4clockmod_driver = {
        .name           = "p4-clockmod",
        .owner          = THIS_MODULE,
        .attr           = p4clockmod_attr,
-       .hide_interface = 1,
 };
 
 
index 169a120587be7e4e6add63c38ed2e0eb139025dd..87b67e3a765ac212c2c954de3566ec487fdac8da 100644 (file)
@@ -729,7 +729,7 @@ struct pebs_tracer *ds_request_pebs(struct task_struct *task,
 
        spin_unlock_irqrestore(&ds_lock, irq);
 
-       ds_write_config(tracer->ds.context, &tracer->trace.ds, ds_bts);
+       ds_write_config(tracer->ds.context, &tracer->trace.ds, ds_pebs);
        ds_resume_pebs(tracer);
 
        return tracer;
@@ -1029,5 +1029,4 @@ void ds_copy_thread(struct task_struct *tsk, struct task_struct *father)
 
 void ds_exit_thread(struct task_struct *tsk)
 {
-       WARN_ON(tsk->thread.ds_ctx);
 }
index 1119d247fe11d87aceaa2e42f770bd773a9c1ea2..eb1ef3b67dd50278c7ce88bd92f5895d7f06ede6 100644 (file)
@@ -467,7 +467,7 @@ void __init efi_enter_virtual_mode(void)
        efi_memory_desc_t *md;
        efi_status_t status;
        unsigned long size;
-       u64 end, systab, addr, npages;
+       u64 end, systab, addr, npages, end_pfn;
        void *p, *va;
 
        efi.systab = NULL;
@@ -479,7 +479,10 @@ void __init efi_enter_virtual_mode(void)
                size = md->num_pages << EFI_PAGE_SHIFT;
                end = md->phys_addr + size;
 
-               if (PFN_UP(end) <= max_low_pfn_mapped)
+               end_pfn = PFN_UP(end);
+               if (end_pfn <= max_low_pfn_mapped
+                   || (end_pfn > (1UL << (32 - PAGE_SHIFT))
+                       && end_pfn <= max_pfn_mapped))
                        va = __va(md->phys_addr);
                else
                        va = efi_ioremap(md->phys_addr, size);
index 652c5287215fdb9500e4013794d559cfc4ace801..cb783b92c50cce5b9d123c8bff127ba967a9b230 100644 (file)
@@ -99,24 +99,11 @@ void __init efi_call_phys_epilog(void)
 
 void __iomem *__init efi_ioremap(unsigned long phys_addr, unsigned long size)
 {
-       static unsigned pages_mapped __initdata;
-       unsigned i, pages;
-       unsigned long offset;
+       unsigned long last_map_pfn;
 
-       pages = PFN_UP(phys_addr + size) - PFN_DOWN(phys_addr);
-       offset = phys_addr & ~PAGE_MASK;
-       phys_addr &= PAGE_MASK;
-
-       if (pages_mapped + pages > MAX_EFI_IO_PAGES)
+       last_map_pfn = init_memory_mapping(phys_addr, phys_addr + size);
+       if ((last_map_pfn << PAGE_SHIFT) < phys_addr + size)
                return NULL;
 
-       for (i = 0; i < pages; i++) {
-               __set_fixmap(FIX_EFI_IO_MAP_FIRST_PAGE - pages_mapped,
-                            phys_addr, PAGE_KERNEL);
-               phys_addr += PAGE_SIZE;
-               pages_mapped++;
-       }
-
-       return (void __iomem *)__fix_to_virt(FIX_EFI_IO_MAP_FIRST_PAGE - \
-                                            (pages_mapped - pages)) + offset;
+       return (void __iomem *)__va(phys_addr);
 }
index b0f61f0dcd0a925d13a41a0500ae0f11821d51f3..f2f8540a7f3d0bd88a8ac7b27c9ba460581ba023 100644 (file)
@@ -136,7 +136,7 @@ int init_fpu(struct task_struct *tsk)
 #ifdef CONFIG_X86_32
        if (!HAVE_HWFP) {
                memset(tsk->thread.xstate, 0, xstate_size);
-               finit();
+               finit_task(tsk);
                set_stopped_child_used_math(tsk);
                return 0;
        }
index 2b46eb41643b291a182bc2b868ef1481e1db727b..4526b3a75ed2aef73579212c7fde9ca6ed15e946 100644 (file)
@@ -217,6 +217,14 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = {
                        DMI_MATCH(DMI_PRODUCT_NAME, "HP Compaq"),
                },
        },
+       {       /* Handle problems with rebooting on Dell XPS710 */
+               .callback = set_bios_reboot,
+               .ident = "Dell XPS710",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "Dell XPS710"),
+               },
+       },
        { }
 };
 
index c461f6d6907487cd60211e06b115ac1be76dd697..6a8811a693245e2b96f8815df4debdc5c9111749 100644 (file)
@@ -770,6 +770,9 @@ void __init setup_arch(char **cmdline_p)
 
        finish_e820_parsing();
 
+       if (efi_enabled)
+               efi_init();
+
        dmi_scan_machine();
 
        dmi_check_system(bad_bios_dmi_table);
@@ -789,8 +792,6 @@ void __init setup_arch(char **cmdline_p)
        insert_resource(&iomem_resource, &data_resource);
        insert_resource(&iomem_resource, &bss_resource);
 
-       if (efi_enabled)
-               efi_init();
 
 #ifdef CONFIG_X86_32
        if (ppro_with_ram_bug()) {
index 92f1c6f3e19d48b594fa5fcd4694784ae4b324af..960a8d9c049c697e8505e003e96e7cffcd089f86 100644 (file)
@@ -343,6 +343,11 @@ static void lguest_cpuid(unsigned int *ax, unsigned int *bx,
                 * flush_tlb_user() for both user and kernel mappings unless
                 * the Page Global Enable (PGE) feature bit is set. */
                *dx |= 0x00002000;
+               /* We also lie, and say we're family id 5.  6 or greater
+                * leads to a rdmsr in early_init_intel which we can't handle.
+                * Family ID is returned as bits 8-12 in ax. */
+               *ax &= 0xFFFFF0FF;
+               *ax |= 0x00000500;
                break;
        case 0x80000000:
                /* Futureproof this a little: if they ask how much extended
@@ -589,19 +594,21 @@ static void __init lguest_init_IRQ(void)
                /* Some systems map "vectors" to interrupts weirdly.  Lguest has
                 * a straightforward 1 to 1 mapping, so force that here. */
                __get_cpu_var(vector_irq)[vector] = i;
-               if (vector != SYSCALL_VECTOR) {
-                       set_intr_gate(vector,
-                                     interrupt[vector-FIRST_EXTERNAL_VECTOR]);
-                       set_irq_chip_and_handler_name(i, &lguest_irq_controller,
-                                                     handle_level_irq,
-                                                     "level");
-               }
+               if (vector != SYSCALL_VECTOR)
+                       set_intr_gate(vector, interrupt[i]);
        }
        /* This call is required to set up for 4k stacks, where we have
         * separate stacks for hard and soft interrupts. */
        irq_ctx_init(smp_processor_id());
 }
 
+void lguest_setup_irq(unsigned int irq)
+{
+       irq_to_desc_alloc_cpu(irq, 0);
+       set_irq_chip_and_handler_name(irq, &lguest_irq_controller,
+                                     handle_level_irq, "level");
+}
+
 /*
  * Time.
  *
index 491e737ce547c236830f8ecb4ef45c5415c53c1e..aa0987088774613ccc36ece2c33ee35e9f382866 100644 (file)
@@ -30,20 +30,29 @@ static void fclex(void)
 }
 
 /* Needs to be externally visible */
-void finit(void)
+void finit_task(struct task_struct *tsk)
 {
-       control_word = 0x037f;
-       partial_status = 0;
-       top = 0;                /* We don't keep top in the status word internally. */
-       fpu_tag_word = 0xffff;
+       struct i387_soft_struct *soft = &tsk->thread.xstate->soft;
+       struct address *oaddr, *iaddr;
+       soft->cwd = 0x037f;
+       soft->swd = 0;
+       soft->ftop = 0; /* We don't keep top in the status word internally. */
+       soft->twd = 0xffff;
        /* The behaviour is different from that detailed in
           Section 15.1.6 of the Intel manual */
-       operand_address.offset = 0;
-       operand_address.selector = 0;
-       instruction_address.offset = 0;
-       instruction_address.selector = 0;
-       instruction_address.opcode = 0;
-       no_ip_update = 1;
+       oaddr = (struct address *)&soft->foo;
+       oaddr->offset = 0;
+       oaddr->selector = 0;
+       iaddr = (struct address *)&soft->fip;
+       iaddr->offset = 0;
+       iaddr->selector = 0;
+       iaddr->opcode = 0;
+       soft->no_update = 1;
+}
+
+void finit(void)
+{
+       finit_task(current);
 }
 
 /*
index 9f205030d9aac6a6dbdb6f620b47fcba8b4acb2f..6a518dd08a36511661df2842815781c94a680fbd 100644 (file)
@@ -451,23 +451,24 @@ static void rcu_free_kmmio_fault_pages(struct rcu_head *head)
 
 static void remove_kmmio_fault_pages(struct rcu_head *head)
 {
-       struct kmmio_delayed_release *dr = container_of(
-                                               head,
-                                               struct kmmio_delayed_release,
-                                               rcu);
+       struct kmmio_delayed_release *dr =
+               container_of(head, struct kmmio_delayed_release, rcu);
        struct kmmio_fault_page *p = dr->release_list;
        struct kmmio_fault_page **prevp = &dr->release_list;
        unsigned long flags;
+
        spin_lock_irqsave(&kmmio_lock, flags);
        while (p) {
-               if (!p->count)
+               if (!p->count) {
                        list_del_rcu(&p->list);
-               else
+                       prevp = &p->release_next;
+               } else {
                        *prevp = p->release_next;
-               prevp = &p->release_next;
+               }
                p = p->release_next;
        }
        spin_unlock_irqrestore(&kmmio_lock, flags);
+
        /* This is the real RCU destroy call. */
        call_rcu(&dr->rcu, rcu_free_kmmio_fault_pages);
 }
index 6c873dceb177c8d79a76bb35ae09a78e7bdb8d6b..981200830432fde49cad084c1ecd0855c1cbab9f 100644 (file)
@@ -103,9 +103,6 @@ config MATH_EMULATION
        help
        Can we use information of configuration file?
 
-config HIGHMEM
-       bool "High memory support"
-
 endmenu
 
 menu "Platform options"
index 9606d2bd1dd974a4766fed7748836e6cab5e46b8..4ec1633c29414f21f551223f4ea0065c95ccfb88 100644 (file)
@@ -44,6 +44,8 @@
 #include <asm/setup.h>
 #include <asm/param.h>
 
+#include <platform/hardware.h>
+
 #if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE)
 struct screen_info screen_info = { 0, 24, 0, 0, 0, 80, 0, 0, 0, 24, 1, 16};
 #endif
index c7a021d9f696bba087df97b70d433a0a216c575b..c44f830b6c7a3fee0e699132ff93edd4f726d94c 100644 (file)
@@ -30,6 +30,7 @@
 #include <linux/stringify.h>
 #include <linux/kallsyms.h>
 #include <linux/delay.h>
+#include <linux/hardirq.h>
 
 #include <asm/ptrace.h>
 #include <asm/timex.h>
index 33f366be323fc05f075519a0dde7826795f8c568..bdd860d93f72a99442bc324bce7319dba62ceca8 100644 (file)
@@ -14,6 +14,7 @@
 
 #include <linux/mm.h>
 #include <linux/module.h>
+#include <linux/hardirq.h>
 #include <asm/mmu_context.h>
 #include <asm/cacheflush.h>
 #include <asm/hardirq.h>
index efed8897bef323079a3cc10401eaef069c4eaad3..25d46c84eb0836c4933a451c632099ae68759a77 100644 (file)
@@ -140,16 +140,14 @@ static void rs_poll(unsigned long priv)
 }
 
 
-static void rs_put_char(struct tty_struct *tty, unsigned char ch)
+static int rs_put_char(struct tty_struct *tty, unsigned char ch)
 {
        char buf[2];
 
-       if (!tty)
-               return;
-
        buf[0] = ch;
        buf[1] = '\0';          /* Is this NULL necessary? */
        __simc (SYS_write, 1, (unsigned long) buf, 1, 0, 0);
+       return 1;
 }
 
 static void rs_flush_chars(struct tty_struct *tty)
index a104593e70c38cdfdaebc1cf1214934e37ce3284..5a244f05360f5ca67592e29a7270f3874bf16c37 100644 (file)
@@ -39,14 +39,13 @@ void blk_recalc_rq_sectors(struct request *rq, int nsect)
 }
 
 static unsigned int __blk_recalc_rq_segments(struct request_queue *q,
-                                            struct bio *bio,
-                                            unsigned int *seg_size_ptr)
+                                            struct bio *bio)
 {
        unsigned int phys_size;
        struct bio_vec *bv, *bvprv = NULL;
        int cluster, i, high, highprv = 1;
        unsigned int seg_size, nr_phys_segs;
-       struct bio *fbio;
+       struct bio *fbio, *bbio;
 
        if (!bio)
                return 0;
@@ -87,26 +86,20 @@ new_segment:
                        seg_size = bv->bv_len;
                        highprv = high;
                }
+               bbio = bio;
        }
 
-       if (seg_size_ptr)
-               *seg_size_ptr = seg_size;
+       if (nr_phys_segs == 1 && seg_size > fbio->bi_seg_front_size)
+               fbio->bi_seg_front_size = seg_size;
+       if (seg_size > bbio->bi_seg_back_size)
+               bbio->bi_seg_back_size = seg_size;
 
        return nr_phys_segs;
 }
 
 void blk_recalc_rq_segments(struct request *rq)
 {
-       unsigned int seg_size = 0, phys_segs;
-
-       phys_segs = __blk_recalc_rq_segments(rq->q, rq->bio, &seg_size);
-
-       if (phys_segs == 1 && seg_size > rq->bio->bi_seg_front_size)
-               rq->bio->bi_seg_front_size = seg_size;
-       if (seg_size > rq->biotail->bi_seg_back_size)
-               rq->biotail->bi_seg_back_size = seg_size;
-
-       rq->nr_phys_segments = phys_segs;
+       rq->nr_phys_segments = __blk_recalc_rq_segments(rq->q, rq->bio);
 }
 
 void blk_recount_segments(struct request_queue *q, struct bio *bio)
@@ -114,7 +107,7 @@ void blk_recount_segments(struct request_queue *q, struct bio *bio)
        struct bio *nxt = bio->bi_next;
 
        bio->bi_next = NULL;
-       bio->bi_phys_segments = __blk_recalc_rq_segments(q, bio, NULL);
+       bio->bi_phys_segments = __blk_recalc_rq_segments(q, bio);
        bio->bi_next = nxt;
        bio->bi_flags |= (1 << BIO_SEG_VALID);
 }
index a603bbf9b1b706caf37a15b94eb8b6ecb4a3e8dc..66e012cd3271f98cc8541c95ca13fb327b4dd7c7 100644 (file)
@@ -582,18 +582,18 @@ static const struct pci_device_id ahci_pci_tbl[] = {
        { PCI_VDEVICE(NVIDIA, 0x0abd), board_ahci },            /* MCP79 */
        { PCI_VDEVICE(NVIDIA, 0x0abe), board_ahci },            /* MCP79 */
        { PCI_VDEVICE(NVIDIA, 0x0abf), board_ahci },            /* MCP79 */
-       { PCI_VDEVICE(NVIDIA, 0x0bc8), board_ahci },            /* MCP7B */
-       { PCI_VDEVICE(NVIDIA, 0x0bc9), board_ahci },            /* MCP7B */
-       { PCI_VDEVICE(NVIDIA, 0x0bca), board_ahci },            /* MCP7B */
-       { PCI_VDEVICE(NVIDIA, 0x0bcb), board_ahci },            /* MCP7B */
-       { PCI_VDEVICE(NVIDIA, 0x0bcc), board_ahci },            /* MCP7B */
-       { PCI_VDEVICE(NVIDIA, 0x0bcd), board_ahci },            /* MCP7B */
-       { PCI_VDEVICE(NVIDIA, 0x0bce), board_ahci },            /* MCP7B */
-       { PCI_VDEVICE(NVIDIA, 0x0bcf), board_ahci },            /* MCP7B */
-       { PCI_VDEVICE(NVIDIA, 0x0bc4), board_ahci },            /* MCP7B */
-       { PCI_VDEVICE(NVIDIA, 0x0bc5), board_ahci },            /* MCP7B */
-       { PCI_VDEVICE(NVIDIA, 0x0bc6), board_ahci },            /* MCP7B */
-       { PCI_VDEVICE(NVIDIA, 0x0bc7), board_ahci },            /* MCP7B */
+       { PCI_VDEVICE(NVIDIA, 0x0d84), board_ahci },            /* MCP89 */
+       { PCI_VDEVICE(NVIDIA, 0x0d85), board_ahci },            /* MCP89 */
+       { PCI_VDEVICE(NVIDIA, 0x0d86), board_ahci },            /* MCP89 */
+       { PCI_VDEVICE(NVIDIA, 0x0d87), board_ahci },            /* MCP89 */
+       { PCI_VDEVICE(NVIDIA, 0x0d88), board_ahci },            /* MCP89 */
+       { PCI_VDEVICE(NVIDIA, 0x0d89), board_ahci },            /* MCP89 */
+       { PCI_VDEVICE(NVIDIA, 0x0d8a), board_ahci },            /* MCP89 */
+       { PCI_VDEVICE(NVIDIA, 0x0d8b), board_ahci },            /* MCP89 */
+       { PCI_VDEVICE(NVIDIA, 0x0d8c), board_ahci },            /* MCP89 */
+       { PCI_VDEVICE(NVIDIA, 0x0d8d), board_ahci },            /* MCP89 */
+       { PCI_VDEVICE(NVIDIA, 0x0d8e), board_ahci },            /* MCP89 */
+       { PCI_VDEVICE(NVIDIA, 0x0d8f), board_ahci },            /* MCP89 */
 
        /* SiS */
        { PCI_VDEVICE(SI, 0x1184), board_ahci },                /* SiS 966 */
index 9fbf0595f3d44fd3f51d1339c9bbe127db7fa698..060bcd601f5758d63ae95e017fe7f501c8dd0607 100644 (file)
@@ -1322,14 +1322,16 @@ static u64 ata_id_n_sectors(const u16 *id)
 {
        if (ata_id_has_lba(id)) {
                if (ata_id_has_lba48(id))
-                       return ata_id_u64(id, 100);
+                       return ata_id_u64(id, ATA_ID_LBA_CAPACITY_2);
                else
-                       return ata_id_u32(id, 60);
+                       return ata_id_u32(id, ATA_ID_LBA_CAPACITY);
        } else {
                if (ata_id_current_chs_valid(id))
-                       return ata_id_u32(id, 57);
+                       return id[ATA_ID_CUR_CYLS] * id[ATA_ID_CUR_HEADS] *
+                              id[ATA_ID_CUR_SECTORS];
                else
-                       return id[1] * id[3] * id[6];
+                       return id[ATA_ID_CYLS] * id[ATA_ID_HEADS] *
+                              id[ATA_ID_SECTORS];
        }
 }
 
@@ -4612,7 +4614,7 @@ void ata_sg_clean(struct ata_queued_cmd *qc)
        VPRINTK("unmapping %u sg elements\n", qc->n_elem);
 
        if (qc->n_elem)
-               dma_unmap_sg(ap->dev, sg, qc->n_elem, dir);
+               dma_unmap_sg(ap->dev, sg, qc->orig_n_elem, dir);
 
        qc->flags &= ~ATA_QCFLAG_DMAMAP;
        qc->sg = NULL;
@@ -4727,7 +4729,7 @@ static int ata_sg_setup(struct ata_queued_cmd *qc)
                return -1;
 
        DPRINTK("%d sg elements mapped\n", n_elem);
-
+       qc->orig_n_elem = qc->n_elem;
        qc->n_elem = n_elem;
        qc->flags |= ATA_QCFLAG_DMAMAP;
 
index ce2ef04753390b2c95dacd591662efd3c1800ebb..ea890911d4fa3f67863b8f52e7aebc258b4ce7e7 100644 (file)
@@ -2423,11 +2423,14 @@ int ata_eh_reset(struct ata_link *link, int classify,
                }
 
                /* prereset() might have cleared ATA_EH_RESET.  If so,
-                * bang classes and return.
+                * bang classes, thaw and return.
                 */
                if (reset && !(ehc->i.action & ATA_EH_RESET)) {
                        ata_for_each_dev(dev, link, ALL)
                                classes[dev->devno] = ATA_DEV_NONE;
+                       if ((ap->pflags & ATA_PFLAG_FROZEN) &&
+                           ata_is_host_link(link))
+                               ata_eh_thaw_port(ap);
                        rc = 0;
                        goto out;
                }
@@ -2901,7 +2904,7 @@ static int atapi_eh_clear_ua(struct ata_device *dev)
        int i;
 
        for (i = 0; i < ATA_EH_UA_TRIES; i++) {
-               u8 sense_buffer[SCSI_SENSE_BUFFERSIZE];
+               u8 *sense_buffer = dev->link->ap->sector_buf;
                u8 sense_key = 0;
                unsigned int err_mask;
 
index cf9e9848f8b5a06f55180ddb3ff780fd4968ce1f..d7bc925c524d7eba3321395ebfaf328db55fa73c 100644 (file)
@@ -45,8 +45,6 @@ static const struct portinfo pata_icside_portinfo_v6_2 = {
        .stepping       = 6,
 };
 
-#define PATA_ICSIDE_MAX_SG     128
-
 struct pata_icside_state {
        void __iomem *irq_port;
        void __iomem *ioc_base;
@@ -57,7 +55,6 @@ struct pata_icside_state {
                u8 disabled;
                unsigned int speed[ATA_MAX_DEVICES];
        } port[2];
-       struct scatterlist sg[PATA_ICSIDE_MAX_SG];
 };
 
 struct pata_icside_info {
@@ -222,9 +219,7 @@ static void pata_icside_bmdma_setup(struct ata_queued_cmd *qc)
 {
        struct ata_port *ap = qc->ap;
        struct pata_icside_state *state = ap->host->private_data;
-       struct scatterlist *sg, *rsg = state->sg;
        unsigned int write = qc->tf.flags & ATA_TFLAG_WRITE;
-       unsigned int si;
 
        /*
         * We are simplex; BUG if we try to fiddle with DMA
@@ -232,21 +227,13 @@ static void pata_icside_bmdma_setup(struct ata_queued_cmd *qc)
         */
        BUG_ON(dma_channel_active(state->dma));
 
-       /*
-        * Copy ATAs scattered sg list into a contiguous array of sg
-        */
-       for_each_sg(qc->sg, sg, qc->n_elem, si) {
-               memcpy(rsg, sg, sizeof(*sg));
-               rsg++;
-       }
-
        /*
         * Route the DMA signals to the correct interface
         */
        writeb(state->port[ap->port_no].port_sel, state->ioc_base);
 
        set_dma_speed(state->dma, state->port[ap->port_no].speed[qc->dev->devno]);
-       set_dma_sg(state->dma, state->sg, rsg - state->sg);
+       set_dma_sg(state->dma, qc->sg, qc->n_elem);
        set_dma_mode(state->dma, write ? DMA_MODE_WRITE : DMA_MODE_READ);
 
        /* issue r/w command */
@@ -306,8 +293,8 @@ static int icside_dma_init(struct pata_icside_info *info)
 
 static struct scsi_host_template pata_icside_sht = {
        ATA_BASE_SHT(DRV_NAME),
-       .sg_tablesize           = PATA_ICSIDE_MAX_SG,
-       .dma_boundary           = ~0, /* no dma boundaries */
+       .sg_tablesize           = SCSI_MAX_SG_CHAIN_SEGMENTS,
+       .dma_boundary           = IOMD_DMA_BOUNDARY,
 };
 
 static void pata_icside_postreset(struct ata_link *link, unsigned int *classes)
index 55a8eed3f3a35cb9fa64b9e67800a40d72d5d062..f65b53785a8f93f304cfddc4261491ab7c37a090 100644 (file)
@@ -2523,7 +2523,7 @@ static void __exit nv_exit(void)
 module_init(nv_init);
 module_exit(nv_exit);
 module_param_named(adma, adma_enabled, bool, 0444);
-MODULE_PARM_DESC(adma, "Enable use of ADMA (Default: true)");
+MODULE_PARM_DESC(adma, "Enable use of ADMA (Default: false)");
 module_param_named(swncq, swncq_enabled, bool, 0444);
 MODULE_PARM_DESC(swncq, "Enable use of SWNCQ (Default: true)");
 
index 43fa90b837eec4e4e79f6b5ef4d2fb99139317f1..f8f578a71b25c311c31c27989789d5e2fe53f9ef 100644 (file)
@@ -303,7 +303,7 @@ int unregister_mem_sect_under_nodes(struct memory_block *mem_blk)
        sect_start_pfn = section_nr_to_pfn(mem_blk->phys_index);
        sect_end_pfn = sect_start_pfn + PAGES_PER_SECTION - 1;
        for (pfn = sect_start_pfn; pfn <= sect_end_pfn; pfn++) {
-               unsigned int nid;
+               int nid;
 
                nid = get_nid_for_pfn(pfn);
                if (nid < 0)
index cc250577d405e6d061054b268ddc54b96ddd0cdc..eeea477d96016596ccd729a6f75d37d5e3d30a0e 100644 (file)
@@ -173,7 +173,7 @@ skbfree(struct sk_buff *skb)
                return;
        while (atomic_read(&skb_shinfo(skb)->dataref) != 1 && i-- > 0)
                msleep(Sms);
-       if (i <= 0) {
+       if (i < 0) {
                printk(KERN_ERR
                        "aoe: %s holds ref: %s\n",
                        skb->dev ? skb->dev->name : "netif",
index b5a06111463018b5d93f3d2b944caf9c60654281..4f9b6d7920173d19f85dc0cb822c3e33d87b1db9 100644 (file)
@@ -3606,11 +3606,9 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
                if (cciss_hard_reset_controller(pdev) || cciss_reset_msi(pdev))
                        return -ENODEV;
 
-               /* Some devices (notably the HP Smart Array 5i Controller)
-                  need a little pause here */
-               schedule_timeout_uninterruptible(30*HZ);
-
-               /* Now try to get the controller to respond to a no-op */
+               /* Now try to get the controller to respond to a no-op. Some
+                  devices (notably the HP Smart Array 5i Controller) need
+                  up to 30 seconds to respond. */
                for (i=0; i<30; i++) {
                        if (cciss_noop(pdev) == 0)
                                break;
index edbaac6c05739ab183e69f94c1dc230acea27176..bf034557767243ecbb0fd3c56538f7877e222345 100644 (file)
@@ -392,8 +392,7 @@ lo_splice_actor(struct pipe_inode_info *pipe, struct pipe_buffer *buf,
        struct loop_device *lo = p->lo;
        struct page *page = buf->page;
        sector_t IV;
-       size_t size;
-       int ret;
+       int size, ret;
 
        ret = buf->ops->confirm(pipe, buf);
        if (unlikely(ret))
index b6c8ce25435994558885e9e4b9c4ac6aafaa9357..8f905089b72b7e49c2434d1b6abba9fa76321051 100644 (file)
@@ -977,6 +977,8 @@ static void backend_changed(struct xenbus_device *dev,
                break;
 
        case XenbusStateClosing:
+               if (info->gd == NULL)
+                       xenbus_dev_fatal(dev, -ENODEV, "gd is NULL");
                bd = bdget_disk(info->gd, 0);
                if (bd == NULL)
                        xenbus_dev_fatal(dev, -ENODEV, "bdget failed");
index 52f4361eb6e41fde34a1e6fa53d981725a3485bd..d765afda9c2abb93c4985466fccd86cc2a382982 100644 (file)
@@ -271,15 +271,15 @@ static __devinit int fix_northbridge(struct pci_dev *nb, struct pci_dev *agp,
        nb_order = (nb_order >> 1) & 7;
        pci_read_config_dword(nb, AMD64_GARTAPERTUREBASE, &nb_base);
        nb_aper = nb_base << 25;
-       if (agp_aperture_valid(nb_aper, (32*1024*1024)<<nb_order)) {
-               return 0;
-       }
 
        /* Northbridge seems to contain crap. Try the AGP bridge. */
 
        pci_read_config_word(agp, cap+0x14, &apsize);
-       if (apsize == 0xffff)
+       if (apsize == 0xffff) {
+               if (agp_aperture_valid(nb_aper, (32*1024*1024)<<nb_order))
+                       return 0;
                return -1;
+       }
 
        apsize &= 0xfff;
        /* Some BIOS use weird encodings not in the AGPv3 table. */
@@ -301,6 +301,11 @@ static __devinit int fix_northbridge(struct pci_dev *nb, struct pci_dev *agp,
                order = nb_order;
        }
 
+       if (nb_order >= order) {
+               if (agp_aperture_valid(nb_aper, (32*1024*1024)<<nb_order))
+                       return 0;
+       }
+
        dev_info(&agp->dev, "aperture from AGP @ %Lx size %u MB\n",
                 aper, 32 << order);
        if (order < 0 || !agp_aperture_valid(aper, (32*1024*1024)<<order))
index c7714185f83103219de72565f34a3dadbb6e198d..4373adb2119aeea256758abc7602504477d5c5ad 100644 (file)
@@ -633,13 +633,15 @@ static void intel_i830_init_gtt_entries(void)
                        break;
                }
        }
-       if (gtt_entries > 0)
+       if (gtt_entries > 0) {
                dev_info(&agp_bridge->dev->dev, "detected %dK %s memory\n",
                       gtt_entries / KB(1), local ? "local" : "stolen");
-       else
+               gtt_entries /= KB(4);
+       } else {
                dev_info(&agp_bridge->dev->dev,
                       "no pre-allocated video memory detected\n");
-       gtt_entries /= KB(4);
+               gtt_entries = 0;
+       }
 
        intel_private.gtt_entries = gtt_entries;
 }
index ba68a4671cb548d7663f7f2d1920df1332bd192a..538313f9e7ac6f8b45731b6ee49be2e8af0e0f8a 100644 (file)
@@ -102,7 +102,7 @@ static int __init omap_rng_probe(struct platform_device *pdev)
                return -EBUSY;
 
        if (cpu_is_omap24xx()) {
-               rng_ick = clk_get(&pdev->dev, "rng_ick");
+               rng_ick = clk_get(&pdev->dev, "ick");
                if (IS_ERR(rng_ick)) {
                        dev_err(&pdev->dev, "Could not get rng_ick\n");
                        ret = PTR_ERR(rng_ick);
index b55cb67435bd4280373c897baf83805e50d008e8..d6daf3c507d3491b0e78a75f2366820114027f03 100644 (file)
@@ -754,11 +754,6 @@ static struct kobj_type ktype_cpufreq = {
        .release        = cpufreq_sysfs_release,
 };
 
-static struct kobj_type ktype_empty_cpufreq = {
-       .sysfs_ops      = &sysfs_ops,
-       .release        = cpufreq_sysfs_release,
-};
-
 
 /**
  * cpufreq_add_dev - add a CPU device
@@ -892,36 +887,26 @@ static int cpufreq_add_dev(struct sys_device *sys_dev)
        memcpy(&new_policy, policy, sizeof(struct cpufreq_policy));
 
        /* prepare interface data */
-       if (!cpufreq_driver->hide_interface) {
-               ret = kobject_init_and_add(&policy->kobj, &ktype_cpufreq,
-                                          &sys_dev->kobj, "cpufreq");
+       ret = kobject_init_and_add(&policy->kobj, &ktype_cpufreq, &sys_dev->kobj,
+                                  "cpufreq");
+       if (ret)
+               goto err_out_driver_exit;
+
+       /* set up files for this cpu device */
+       drv_attr = cpufreq_driver->attr;
+       while ((drv_attr) && (*drv_attr)) {
+               ret = sysfs_create_file(&policy->kobj, &((*drv_attr)->attr));
                if (ret)
                        goto err_out_driver_exit;
-
-               /* set up files for this cpu device */
-               drv_attr = cpufreq_driver->attr;
-               while ((drv_attr) && (*drv_attr)) {
-                       ret = sysfs_create_file(&policy->kobj,
-                                               &((*drv_attr)->attr));
-                       if (ret)
-                               goto err_out_driver_exit;
-                       drv_attr++;
-               }
-               if (cpufreq_driver->get) {
-                       ret = sysfs_create_file(&policy->kobj,
-                                               &cpuinfo_cur_freq.attr);
-                       if (ret)
-                               goto err_out_driver_exit;
-               }
-               if (cpufreq_driver->target) {
-                       ret = sysfs_create_file(&policy->kobj,
-                                               &scaling_cur_freq.attr);
-                       if (ret)
-                               goto err_out_driver_exit;
-               }
-       } else {
-               ret = kobject_init_and_add(&policy->kobj, &ktype_empty_cpufreq,
-                                          &sys_dev->kobj, "cpufreq");
+               drv_attr++;
+       }
+       if (cpufreq_driver->get) {
+               ret = sysfs_create_file(&policy->kobj, &cpuinfo_cur_freq.attr);
+               if (ret)
+                       goto err_out_driver_exit;
+       }
+       if (cpufreq_driver->target) {
+               ret = sysfs_create_file(&policy->kobj, &scaling_cur_freq.attr);
                if (ret)
                        goto err_out_driver_exit;
        }
index 33bd7534751820841d19732a5d5e79b4dea9adbf..25b743abfb59442b52ccec0057573716249bdbbf 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright(c) 2007 Intel Corporation. All rights reserved.
+ * Copyright(c) 2007 - 2009 Intel Corporation. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the Free
index 732fa1ec36ab3ae885b784ca1ea5bb863cc3c58f..e190d8b30700c40858fceb83afa05f49d9ce8d2e 100644 (file)
@@ -430,13 +430,15 @@ late_initcall(dmatest_init);
 static void __exit dmatest_exit(void)
 {
        struct dmatest_chan *dtc, *_dtc;
+       struct dma_chan *chan;
 
        list_for_each_entry_safe(dtc, _dtc, &dmatest_channels, node) {
                list_del(&dtc->node);
+               chan = dtc->chan;
                dmatest_cleanup_channel(dtc);
                pr_debug("dmatest: dropped channel %s\n",
-                        dma_chan_name(dtc->chan));
-               dma_release_channel(dtc->chan);
+                        dma_chan_name(chan));
+               dma_release_channel(chan);
        }
 }
 module_exit(dmatest_exit);
index 70126a60623939dddc6af7a59aa7b1eac8a51637..86d6da47f558765736149344b2c595b13a289f3f 100644 (file)
@@ -158,7 +158,8 @@ static void dma_start(struct fsl_dma_chan *fsl_chan)
 
 static void dma_halt(struct fsl_dma_chan *fsl_chan)
 {
-       int i = 0;
+       int i;
+
        DMA_OUT(fsl_chan, &fsl_chan->reg_base->mr,
                DMA_IN(fsl_chan, &fsl_chan->reg_base->mr, 32) | FSL_DMA_MR_CA,
                32);
@@ -166,8 +167,11 @@ static void dma_halt(struct fsl_dma_chan *fsl_chan)
                DMA_IN(fsl_chan, &fsl_chan->reg_base->mr, 32) & ~(FSL_DMA_MR_CS
                | FSL_DMA_MR_EMS_EN | FSL_DMA_MR_CA), 32);
 
-       while (!dma_is_idle(fsl_chan) && (i++ < 100))
+       for (i = 0; i < 100; i++) {
+               if (dma_is_idle(fsl_chan))
+                       break;
                udelay(10);
+       }
        if (i >= 100 && !dma_is_idle(fsl_chan))
                dev_err(fsl_chan->dev, "DMA halt timeout!\n");
 }
index 4105d6575b645dc7674c35ea5bca0c60bde89d9f..ed83dd9df192a5a4b65d5f1f15b3e1e2349178b3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Intel I/OAT DMA Linux driver
- * Copyright(c) 2007 Intel Corporation.
+ * Copyright(c) 2007 - 2009 Intel Corporation.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
index 6cf622da0286481fccb32a73285c72c83fb6a57b..c012a1e150431972649b10a502cf658f9a71320b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Intel I/OAT DMA Linux driver
- * Copyright(c) 2007 Intel Corporation.
+ * Copyright(c) 2007 - 2009 Intel Corporation.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
 
 #define DCA_TAG_MAP_MASK 0xDF
 
+/* expected tag map bytes for I/OAT ver.2 */
+#define DCA2_TAG_MAP_BYTE0 0x80
+#define DCA2_TAG_MAP_BYTE1 0x0
+#define DCA2_TAG_MAP_BYTE2 0x81
+#define DCA2_TAG_MAP_BYTE3 0x82
+#define DCA2_TAG_MAP_BYTE4 0x82
+
+/* verify if tag map matches expected values */
+static inline int dca2_tag_map_valid(u8 *tag_map)
+{
+       return ((tag_map[0] == DCA2_TAG_MAP_BYTE0) &&
+               (tag_map[1] == DCA2_TAG_MAP_BYTE1) &&
+               (tag_map[2] == DCA2_TAG_MAP_BYTE2) &&
+               (tag_map[3] == DCA2_TAG_MAP_BYTE3) &&
+               (tag_map[4] == DCA2_TAG_MAP_BYTE4));
+}
+
 /*
  * "Legacy" DCA systems do not implement the DCA register set in the
  * I/OAT device.  Software needs direct support for their tag mappings.
@@ -452,6 +469,13 @@ struct dca_provider *ioat2_dca_init(struct pci_dev *pdev, void __iomem *iobase)
                        ioatdca->tag_map[i] = 0;
        }
 
+       if (!dca2_tag_map_valid(ioatdca->tag_map)) {
+               dev_err(&pdev->dev, "APICID_TAG_MAP set incorrectly by BIOS, "
+                       "disabling DCA\n");
+               free_dca_provider(dca);
+               return NULL;
+       }
+
        err = register_dca_provider(dca, &pdev->dev);
        if (err) {
                free_dca_provider(dca);
index b3759c4b65360c0c3b72664c0a675887474f041e..5905cd36bcd23b43b86dcc532a1a70cc5ce5ce58 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Intel I/OAT DMA Linux driver
- * Copyright(c) 2004 - 2007 Intel Corporation.
+ * Copyright(c) 2004 - 2009 Intel Corporation.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
@@ -189,11 +189,13 @@ static int ioat_dma_enumerate_channels(struct ioatdma_device *device)
                ioat_chan->xfercap = xfercap;
                ioat_chan->desccount = 0;
                INIT_DELAYED_WORK(&ioat_chan->work, ioat_dma_chan_reset_part2);
-               if (ioat_chan->device->version != IOAT_VER_1_2) {
-                       writel(IOAT_DCACTRL_CMPL_WRITE_ENABLE
-                                       | IOAT_DMA_DCA_ANY_CPU,
-                               ioat_chan->reg_base + IOAT_DCACTRL_OFFSET);
-               }
+               if (ioat_chan->device->version == IOAT_VER_2_0)
+                       writel(IOAT_DCACTRL_CMPL_WRITE_ENABLE |
+                              IOAT_DMA_DCA_ANY_CPU,
+                              ioat_chan->reg_base + IOAT_DCACTRL_OFFSET);
+               else if (ioat_chan->device->version == IOAT_VER_3_0)
+                       writel(IOAT_DMA_DCA_ANY_CPU,
+                              ioat_chan->reg_base + IOAT_DCACTRL_OFFSET);
                spin_lock_init(&ioat_chan->cleanup_lock);
                spin_lock_init(&ioat_chan->desc_lock);
                INIT_LIST_HEAD(&ioat_chan->free_desc);
@@ -1169,9 +1171,8 @@ static void ioat_dma_memcpy_cleanup(struct ioat_dma_chan *ioat_chan)
                                 * up if the client is done with the descriptor
                                 */
                                if (async_tx_test_ack(&desc->async_tx)) {
-                                       list_del(&desc->node);
-                                       list_add_tail(&desc->node,
-                                                     &ioat_chan->free_desc);
+                                       list_move_tail(&desc->node,
+                                                      &ioat_chan->free_desc);
                                } else
                                        desc->async_tx.cookie = 0;
                        } else {
@@ -1362,6 +1363,7 @@ static int ioat_dma_self_test(struct ioatdma_device *device)
        dma_cookie_t cookie;
        int err = 0;
        struct completion cmp;
+       unsigned long tmo;
 
        src = kzalloc(sizeof(u8) * IOAT_TEST_SIZE, GFP_KERNEL);
        if (!src)
@@ -1413,9 +1415,10 @@ static int ioat_dma_self_test(struct ioatdma_device *device)
        }
        device->common.device_issue_pending(dma_chan);
 
-       wait_for_completion_timeout(&cmp, msecs_to_jiffies(3000));
+       tmo = wait_for_completion_timeout(&cmp, msecs_to_jiffies(3000));
 
-       if (device->common.device_is_tx_complete(dma_chan, cookie, NULL, NULL)
+       if (tmo == 0 ||
+           device->common.device_is_tx_complete(dma_chan, cookie, NULL, NULL)
                                        != DMA_SUCCESS) {
                dev_err(&device->pdev->dev,
                        "Self-test copy timed out, disabling\n");
@@ -1657,6 +1660,13 @@ struct ioatdma_device *ioat_dma_probe(struct pci_dev *pdev,
                " %d channels, device version 0x%02x, driver version %s\n",
                device->common.chancnt, device->version, IOAT_DMA_VERSION);
 
+       if (!device->common.chancnt) {
+               dev_err(&device->pdev->dev,
+                       "Intel(R) I/OAT DMA Engine problem found: "
+                       "zero channels detected\n");
+               goto err_setup_interrupts;
+       }
+
        err = ioat_dma_setup_interrupts(device);
        if (err)
                goto err_setup_interrupts;
@@ -1696,6 +1706,9 @@ void ioat_dma_remove(struct ioatdma_device *device)
        struct dma_chan *chan, *_chan;
        struct ioat_dma_chan *ioat_chan;
 
+       if (device->version != IOAT_VER_3_0)
+               cancel_delayed_work(&device->work);
+
        ioat_dma_remove_interrupts(device);
 
        dma_async_device_unregister(&device->common);
@@ -1707,10 +1720,6 @@ void ioat_dma_remove(struct ioatdma_device *device)
        pci_release_regions(device->pdev);
        pci_disable_device(device->pdev);
 
-       if (device->version != IOAT_VER_3_0) {
-               cancel_delayed_work(&device->work);
-       }
-
        list_for_each_entry_safe(chan, _chan,
                                 &device->common.channels, device_node) {
                ioat_chan = to_ioat_chan(chan);
index a3306d0e1372a44b2950bc06d220d9b716f0bb00..a52ff4bd4601f78dbfe3fe472bb0b26c568e422d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright(c) 2004 - 2007 Intel Corporation. All rights reserved.
+ * Copyright(c) 2004 - 2009 Intel Corporation. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the Free
@@ -29,7 +29,7 @@
 #include <linux/pci_ids.h>
 #include <net/tcp.h>
 
-#define IOAT_DMA_VERSION  "3.30"
+#define IOAT_DMA_VERSION  "3.64"
 
 enum ioat_interrupt {
        none = 0,
@@ -135,12 +135,14 @@ static inline void ioat_set_tcp_copy_break(struct ioatdma_device *dev)
        #ifdef CONFIG_NET_DMA
        switch (dev->version) {
        case IOAT_VER_1_2:
-       case IOAT_VER_3_0:
                sysctl_tcp_dma_copybreak = 4096;
                break;
        case IOAT_VER_2_0:
                sysctl_tcp_dma_copybreak = 2048;
                break;
+       case IOAT_VER_3_0:
+               sysctl_tcp_dma_copybreak = 262144;
+               break;
        }
        #endif
 }
index f1ae2c776f7487b40e695395e3562679f420b29e..afa57eef86c946e685d13b8e2e7554ec66a7ff6b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright(c) 2004 - 2007 Intel Corporation. All rights reserved.
+ * Copyright(c) 2004 - 2009 Intel Corporation. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the Free
index 827cb503cac6979a0fa98e3fbd25a113e14fda27..49bc277424f8c319b3a46369fe13e9339dc6cce6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright(c) 2004 - 2007 Intel Corporation. All rights reserved.
+ * Copyright(c) 2004 - 2009 Intel Corporation. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the Free
index 647374acba94a7c526d04236af5a855f81b7258c..16adbe61cfb2cd60efd1a01246be3f9c9f4eac43 100644 (file)
@@ -928,19 +928,19 @@ iop_adma_xor_zero_sum_self_test(struct iop_adma_device *device)
 
        for (src_idx = 0; src_idx < IOP_ADMA_NUM_SRC_TEST; src_idx++) {
                xor_srcs[src_idx] = alloc_page(GFP_KERNEL);
-               if (!xor_srcs[src_idx])
-                       while (src_idx--) {
+               if (!xor_srcs[src_idx]) {
+                       while (src_idx--)
                                __free_page(xor_srcs[src_idx]);
-                               return -ENOMEM;
-                       }
+                       return -ENOMEM;
+               }
        }
 
        dest = alloc_page(GFP_KERNEL);
-       if (!dest)
-               while (src_idx--) {
+       if (!dest) {
+               while (src_idx--)
                        __free_page(xor_srcs[src_idx]);
-                       return -ENOMEM;
-               }
+               return -ENOMEM;
+       }
 
        /* Fill in src buffers */
        for (src_idx = 0; src_idx < IOP_ADMA_NUM_SRC_TEST; src_idx++) {
index 1f154d08e98f88cfbff23c192bf473dcdfa5cad0..da781d1078951f9164dcf5c1da1706f376b1a21d 100644 (file)
@@ -729,7 +729,7 @@ static int ipu_init_channel_buffer(struct idmac_channel *ichan,
 
        ichan->status = IPU_CHANNEL_READY;
 
-       spin_unlock_irqrestore(ipu->lock, flags);
+       spin_unlock_irqrestore(&ipu->lock, flags);
 
        return 0;
 }
@@ -1649,7 +1649,7 @@ static int ipu_probe(struct platform_device *pdev)
        }
 
        /* Get IPU clock */
-       ipu_data.ipu_clk = clk_get(&pdev->dev, "ipu_clk");
+       ipu_data.ipu_clk = clk_get(&pdev->dev, NULL);
        if (IS_ERR(ipu_data.ipu_clk)) {
                ret = PTR_ERR(ipu_data.ipu_clk);
                goto err_clk_get;
index 5d5d5b31867fc9e28dd70696e52ad00fa68c997c..cb7f26fb9f188ce594081069bd61c6e99c957930 100644 (file)
@@ -1019,19 +1019,19 @@ mv_xor_xor_self_test(struct mv_xor_device *device)
 
        for (src_idx = 0; src_idx < MV_XOR_NUM_SRC_TEST; src_idx++) {
                xor_srcs[src_idx] = alloc_page(GFP_KERNEL);
-               if (!xor_srcs[src_idx])
-                       while (src_idx--) {
+               if (!xor_srcs[src_idx]) {
+                       while (src_idx--)
                                __free_page(xor_srcs[src_idx]);
-                               return -ENOMEM;
-                       }
+                       return -ENOMEM;
+               }
        }
 
        dest = alloc_page(GFP_KERNEL);
-       if (!dest)
-               while (src_idx--) {
+       if (!dest) {
+               while (src_idx--)
                        __free_page(xor_srcs[src_idx]);
-                       return -ENOMEM;
-               }
+               return -ENOMEM;
+       }
 
        /* Fill in src buffers */
        for (src_idx = 0; src_idx < MV_XOR_NUM_SRC_TEST; src_idx++) {
index cfc1ee90f5a39d1934c686a5100a185457c2b8a6..b251d8674b41a1c45708c5ee6647a668b7d0cfbf 100644 (file)
@@ -72,6 +72,7 @@ I2C_CLIENT_INSMOD_7(lm85b, lm85c, adm1027, adt7463, adt7468, emc6d100,
 #define        LM85_COMPANY_SMSC               0x5c
 #define        LM85_VERSTEP_VMASK              0xf0
 #define        LM85_VERSTEP_GENERIC            0x60
+#define        LM85_VERSTEP_GENERIC2           0x70
 #define        LM85_VERSTEP_LM85C              0x60
 #define        LM85_VERSTEP_LM85B              0x62
 #define        LM85_VERSTEP_ADM1027            0x60
@@ -334,6 +335,7 @@ static struct lm85_data *lm85_update_device(struct device *dev);
 static const struct i2c_device_id lm85_id[] = {
        { "adm1027", adm1027 },
        { "adt7463", adt7463 },
+       { "adt7468", adt7468 },
        { "lm85", any_chip },
        { "lm85b", lm85b },
        { "lm85c", lm85c },
@@ -408,7 +410,8 @@ static ssize_t show_vid_reg(struct device *dev, struct device_attribute *attr,
        struct lm85_data *data = lm85_update_device(dev);
        int vid;
 
-       if (data->type == adt7463 && (data->vid & 0x80)) {
+       if ((data->type == adt7463 || data->type == adt7468) &&
+           (data->vid & 0x80)) {
                /* 6-pin VID (VRM 10) */
                vid = vid_from_reg(data->vid & 0x3f, data->vrm);
        } else {
@@ -1153,7 +1156,8 @@ static int lm85_detect(struct i2c_client *client, int kind,
                        address, company, verstep);
 
                /* All supported chips have the version in common */
-               if ((verstep & LM85_VERSTEP_VMASK) != LM85_VERSTEP_GENERIC) {
+               if ((verstep & LM85_VERSTEP_VMASK) != LM85_VERSTEP_GENERIC &&
+                   (verstep & LM85_VERSTEP_VMASK) != LM85_VERSTEP_GENERIC2) {
                        dev_dbg(&adapter->dev, "Autodetection failed: "
                                "unsupported version\n");
                        return -ENODEV;
index be8ee2cac8bbe237c459fcd497cef8812acea728..ece0125a1ee520710f1e4ac18cd7b8eea83f0422 100644 (file)
@@ -193,22 +193,24 @@ static inline u16 omap_i2c_read_reg(struct omap_i2c_dev *i2c_dev, int reg)
 
 static int __init omap_i2c_get_clocks(struct omap_i2c_dev *dev)
 {
-       if (cpu_is_omap16xx() || cpu_class_is_omap2()) {
-               dev->iclk = clk_get(dev->dev, "i2c_ick");
-               if (IS_ERR(dev->iclk)) {
-                       dev->iclk = NULL;
-                       return -ENODEV;
-               }
+       int ret;
+
+       dev->iclk = clk_get(dev->dev, "ick");
+       if (IS_ERR(dev->iclk)) {
+               ret = PTR_ERR(dev->iclk);
+               dev->iclk = NULL;
+               return ret;
        }
 
-       dev->fclk = clk_get(dev->dev, "i2c_fck");
+       dev->fclk = clk_get(dev->dev, "fck");
        if (IS_ERR(dev->fclk)) {
+               ret = PTR_ERR(dev->fclk);
                if (dev->iclk != NULL) {
                        clk_put(dev->iclk);
                        dev->iclk = NULL;
                }
                dev->fclk = NULL;
-               return -ENODEV;
+               return ret;
        }
 
        return 0;
@@ -218,18 +220,15 @@ static void omap_i2c_put_clocks(struct omap_i2c_dev *dev)
 {
        clk_put(dev->fclk);
        dev->fclk = NULL;
-       if (dev->iclk != NULL) {
-               clk_put(dev->iclk);
-               dev->iclk = NULL;
-       }
+       clk_put(dev->iclk);
+       dev->iclk = NULL;
 }
 
 static void omap_i2c_unidle(struct omap_i2c_dev *dev)
 {
        WARN_ON(!dev->idle);
 
-       if (dev->iclk != NULL)
-               clk_enable(dev->iclk);
+       clk_enable(dev->iclk);
        clk_enable(dev->fclk);
        dev->idle = 0;
        if (dev->iestate)
@@ -254,8 +253,7 @@ static void omap_i2c_idle(struct omap_i2c_dev *dev)
        }
        dev->idle = 1;
        clk_disable(dev->fclk);
-       if (dev->iclk != NULL)
-               clk_disable(dev->iclk);
+       clk_disable(dev->iclk);
 }
 
 static int omap_i2c_init(struct omap_i2c_dev *dev)
@@ -312,15 +310,14 @@ static int omap_i2c_init(struct omap_i2c_dev *dev)
        omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, 0);
 
        if (cpu_class_is_omap1()) {
-               struct clk *armxor_ck;
-
-               armxor_ck = clk_get(NULL, "armxor_ck");
-               if (IS_ERR(armxor_ck))
-                       dev_warn(dev->dev, "Could not get armxor_ck\n");
-               else {
-                       fclk_rate = clk_get_rate(armxor_ck);
-                       clk_put(armxor_ck);
-               }
+               /*
+                * The I2C functional clock is the armxor_ck, so there's
+                * no need to get "armxor_ck" separately.  Now, if OMAP2420
+                * always returns 12MHz for the functional clock, we can
+                * do this bit unconditionally.
+                */
+               fclk_rate = clk_get_rate(dev->fclk);
+
                /* TRM for 5912 says the I2C clock must be prescaled to be
                 * between 7 - 12 MHz. The XOR input clock is typically
                 * 12, 13 or 19.2 MHz. So we should have code that produces:
index 4678babd3ce617dccc65975b2e178e615a2f3d87..fede619ba227b2c5ef9e45f5be24af056f93661a 100644 (file)
@@ -102,7 +102,13 @@ static int i2c_versatile_probe(struct platform_device *dev)
        i2c->algo = i2c_versatile_algo;
        i2c->algo.data = i2c;
 
-       ret = i2c_bit_add_bus(&i2c->adap);
+       if (dev->id >= 0) {
+               /* static bus numbering */
+               i2c->adap.nr = dev->id;
+               ret = i2c_bit_add_numbered_bus(&i2c->adap);
+       } else
+               /* dynamic bus numbering */
+               ret = i2c_bit_add_bus(&i2c->adap);
        if (ret >= 0) {
                platform_set_drvdata(dev, i2c);
                return 0;
@@ -146,7 +152,7 @@ static void __exit i2c_versatile_exit(void)
        platform_driver_unregister(&i2c_versatile_driver);
 }
 
-module_init(i2c_versatile_init);
+subsys_initcall(i2c_versatile_init);
 module_exit(i2c_versatile_exit);
 
 MODULE_DESCRIPTION("ARM Versatile I2C bus driver");
index e072903b12f016aab1aa0d72e0939907253ff033..5ea3bfad172a02a1c27100920fec28c5d60b1e4f 100644 (file)
@@ -721,6 +721,11 @@ config BLK_DEV_IDE_TX4939
        depends on SOC_TX4939
        select BLK_DEV_IDEDMA_SFF
 
+config BLK_DEV_IDE_AT91
+       tristate "Atmel AT91 (SAM9, CAP9, AT572D940HF) IDE support"
+       depends on ARM && ARCH_AT91 && !ARCH_AT91RM9200 && !ARCH_AT91X40
+       select IDE_TIMINGS
+
 config IDE_ARM
        tristate "ARM IDE support"
        depends on ARM && (ARCH_RPC || ARCH_SHARK)
index d0e3d7d5b4672bf9874a1832b7fff2aaf5239007..1c326d94aa6d932021476f041801ddf4f57e9e8c 100644 (file)
@@ -116,3 +116,4 @@ obj-$(CONFIG_BLK_DEV_IDE_AU1XXX)    += au1xxx-ide.o
 
 obj-$(CONFIG_BLK_DEV_IDE_TX4938)       += tx4938ide.o
 obj-$(CONFIG_BLK_DEV_IDE_TX4939)       += tx4939ide.o
+obj-$(CONFIG_BLK_DEV_IDE_AT91)         += at91_ide.o
diff --git a/drivers/ide/at91_ide.c b/drivers/ide/at91_ide.c
new file mode 100644 (file)
index 0000000..1bb50f4
--- /dev/null
@@ -0,0 +1,467 @@
+/*
+ * IDE host driver for AT91 (SAM9, CAP9, AT572D940HF) Static Memory Controller
+ * with Compact Flash True IDE logic
+ *
+ * Copyright (c) 2008, 2009 Kelvatek Ltd.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ */
+
+#include <linux/version.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/clk.h>
+#include <linux/err.h>
+#include <linux/ide.h>
+#include <linux/platform_device.h>
+
+#include <mach/board.h>
+#include <mach/gpio.h>
+#include <mach/at91sam9263.h>
+#include <mach/at91sam9_smc.h>
+#include <mach/at91sam9263_matrix.h>
+
+#define DRV_NAME "at91_ide"
+
+#define perr(fmt, args...) pr_err(DRV_NAME ": " fmt, ##args)
+#define pdbg(fmt, args...) pr_debug("%s " fmt, __func__, ##args)
+
+/*
+ * Access to IDE device is possible through EBI Static Memory Controller
+ * with Compact Flash logic. For details see EBI and SMC datasheet sections
+ * of any microcontroller from AT91SAM9 family.
+ *
+ * Within SMC chip select address space, lines A[23:21] distinguish Compact
+ * Flash modes (I/O, common memory, attribute memory, True IDE). IDE modes are:
+ *   0x00c0000 - True IDE
+ *   0x00e0000 - Alternate True IDE (Alt Status Register)
+ *
+ * On True IDE mode Task File and Data Register are mapped at the same address.
+ * To distinguish access between these two different bus data width is used:
+ * 8Bit for Task File, 16Bit for Data I/O.
+ *
+ * After initialization we do 8/16 bit flipping (changes in SMC MODE register)
+ * only inside IDE callback routines which are serialized by IDE layer,
+ * so no additional locking needed.
+ */
+
+#define TASK_FILE      0x00c00000
+#define ALT_MODE       0x00e00000
+#define REGS_SIZE      8
+
+#define enter_16bit(cs, mode) do {                                     \
+       mode = at91_sys_read(AT91_SMC_MODE(cs));                        \
+       at91_sys_write(AT91_SMC_MODE(cs), mode | AT91_SMC_DBW_16);      \
+} while (0)
+
+#define leave_16bit(cs, mode) at91_sys_write(AT91_SMC_MODE(cs), mode);
+
+static void set_smc_timings(const u8 chipselect, const u16 cycle,
+                           const u16 setup, const u16 pulse,
+                           const u16 data_float, int use_iordy)
+{
+       unsigned long mode = AT91_SMC_READMODE | AT91_SMC_WRITEMODE |
+                            AT91_SMC_BAT_SELECT;
+
+       /* disable or enable waiting for IORDY signal */
+       if (use_iordy)
+               mode |= AT91_SMC_EXNWMODE_READY;
+
+       /* add data float cycles if needed */
+       if (data_float)
+               mode |= AT91_SMC_TDF_(data_float);
+
+       at91_sys_write(AT91_SMC_MODE(chipselect), mode);
+
+       /* setup timings in SMC */
+       at91_sys_write(AT91_SMC_SETUP(chipselect), AT91_SMC_NWESETUP_(setup) |
+                                                  AT91_SMC_NCS_WRSETUP_(0) |
+                                                  AT91_SMC_NRDSETUP_(setup) |
+                                                  AT91_SMC_NCS_RDSETUP_(0));
+       at91_sys_write(AT91_SMC_PULSE(chipselect), AT91_SMC_NWEPULSE_(pulse) |
+                                                  AT91_SMC_NCS_WRPULSE_(cycle) |
+                                                  AT91_SMC_NRDPULSE_(pulse) |
+                                                  AT91_SMC_NCS_RDPULSE_(cycle));
+       at91_sys_write(AT91_SMC_CYCLE(chipselect), AT91_SMC_NWECYCLE_(cycle) |
+                                                  AT91_SMC_NRDCYCLE_(cycle));
+}
+
+static unsigned int calc_mck_cycles(unsigned int ns, unsigned int mck_hz)
+{
+       u64 tmp = ns;
+
+       tmp *= mck_hz;
+       tmp += 1000*1000*1000 - 1; /* round up */
+       do_div(tmp, 1000*1000*1000);
+       return (unsigned int) tmp;
+}
+
+static void apply_timings(const u8 chipselect, const u8 pio,
+                         const struct ide_timing *timing, int use_iordy)
+{
+       unsigned int t0, t1, t2, t6z;
+       unsigned int cycle, setup, pulse, data_float;
+       unsigned int mck_hz;
+       struct clk *mck;
+
+       /* see table 22 of Compact Flash standard 4.1 for the meaning,
+        * we do not stretch active (t2) time, so setup (t1) + hold time (th)
+        * assure at least minimal recovery (t2i) time */
+       t0 = timing->cyc8b;
+       t1 = timing->setup;
+       t2 = timing->act8b;
+       t6z = (pio < 5) ? 30 : 20;
+
+       pdbg("t0=%u t1=%u t2=%u t6z=%u\n", t0, t1, t2, t6z);
+
+       mck = clk_get(NULL, "mck");
+       BUG_ON(IS_ERR(mck));
+       mck_hz = clk_get_rate(mck);
+       pdbg("mck_hz=%u\n", mck_hz);
+
+       cycle = calc_mck_cycles(t0, mck_hz);
+       setup = calc_mck_cycles(t1, mck_hz);
+       pulse = calc_mck_cycles(t2, mck_hz);
+       data_float = calc_mck_cycles(t6z, mck_hz);
+
+       pdbg("cycle=%u setup=%u pulse=%u data_float=%u\n",
+            cycle, setup, pulse, data_float);
+
+       set_smc_timings(chipselect, cycle, setup, pulse, data_float, use_iordy);
+}
+
+static void at91_ide_input_data(ide_drive_t *drive, struct request *rq,
+                               void *buf, unsigned int len)
+{
+       ide_hwif_t *hwif = drive->hwif;
+       struct ide_io_ports *io_ports = &hwif->io_ports;
+       u8 chipselect = hwif->select_data;
+       unsigned long mode;
+
+       pdbg("cs %u buf %p len %d\n", chipselect, buf, len);
+
+       len++;
+
+       enter_16bit(chipselect, mode);
+       __ide_mm_insw((void __iomem *) io_ports->data_addr, buf, len / 2);
+       leave_16bit(chipselect, mode);
+}
+
+static void at91_ide_output_data(ide_drive_t *drive, struct request *rq,
+                                void *buf, unsigned int len)
+{
+       ide_hwif_t *hwif = drive->hwif;
+       struct ide_io_ports *io_ports = &hwif->io_ports;
+       u8 chipselect = hwif->select_data;
+       unsigned long mode;
+
+       pdbg("cs %u buf %p len %d\n", chipselect,  buf, len);
+
+       enter_16bit(chipselect, mode);
+       __ide_mm_outsw((void __iomem *) io_ports->data_addr, buf, len / 2);
+       leave_16bit(chipselect, mode);
+}
+
+static u8 ide_mm_inb(unsigned long port)
+{
+       return readb((void __iomem *) port);
+}
+
+static void ide_mm_outb(u8 value, unsigned long port)
+{
+       writeb(value, (void __iomem *) port);
+}
+
+static void at91_ide_tf_load(ide_drive_t *drive, ide_task_t *task)
+{
+       ide_hwif_t *hwif = drive->hwif;
+       struct ide_io_ports *io_ports = &hwif->io_ports;
+       struct ide_taskfile *tf = &task->tf;
+       u8 HIHI = (task->tf_flags & IDE_TFLAG_LBA48) ? 0xE0 : 0xEF;
+
+       if (task->tf_flags & IDE_TFLAG_FLAGGED)
+               HIHI = 0xFF;
+
+       if (task->tf_flags & IDE_TFLAG_OUT_DATA) {
+               u16 data = (tf->hob_data << 8) | tf->data;
+
+               at91_ide_output_data(drive, NULL, &data, 2);
+       }
+
+       if (task->tf_flags & IDE_TFLAG_OUT_HOB_FEATURE)
+               ide_mm_outb(tf->hob_feature, io_ports->feature_addr);
+       if (task->tf_flags & IDE_TFLAG_OUT_HOB_NSECT)
+               ide_mm_outb(tf->hob_nsect, io_ports->nsect_addr);
+       if (task->tf_flags & IDE_TFLAG_OUT_HOB_LBAL)
+               ide_mm_outb(tf->hob_lbal, io_ports->lbal_addr);
+       if (task->tf_flags & IDE_TFLAG_OUT_HOB_LBAM)
+               ide_mm_outb(tf->hob_lbam, io_ports->lbam_addr);
+       if (task->tf_flags & IDE_TFLAG_OUT_HOB_LBAH)
+               ide_mm_outb(tf->hob_lbah, io_ports->lbah_addr);
+
+       if (task->tf_flags & IDE_TFLAG_OUT_FEATURE)
+               ide_mm_outb(tf->feature, io_ports->feature_addr);
+       if (task->tf_flags & IDE_TFLAG_OUT_NSECT)
+               ide_mm_outb(tf->nsect, io_ports->nsect_addr);
+       if (task->tf_flags & IDE_TFLAG_OUT_LBAL)
+               ide_mm_outb(tf->lbal, io_ports->lbal_addr);
+       if (task->tf_flags & IDE_TFLAG_OUT_LBAM)
+               ide_mm_outb(tf->lbam, io_ports->lbam_addr);
+       if (task->tf_flags & IDE_TFLAG_OUT_LBAH)
+               ide_mm_outb(tf->lbah, io_ports->lbah_addr);
+
+       if (task->tf_flags & IDE_TFLAG_OUT_DEVICE)
+               ide_mm_outb((tf->device & HIHI) | drive->select, io_ports->device_addr);
+}
+
+static void at91_ide_tf_read(ide_drive_t *drive, ide_task_t *task)
+{
+       ide_hwif_t *hwif = drive->hwif;
+       struct ide_io_ports *io_ports = &hwif->io_ports;
+       struct ide_taskfile *tf = &task->tf;
+
+       if (task->tf_flags & IDE_TFLAG_IN_DATA) {
+               u16 data;
+
+               at91_ide_input_data(drive, NULL, &data, 2);
+               tf->data = data & 0xff;
+               tf->hob_data = (data >> 8) & 0xff;
+       }
+
+       /* be sure we're looking at the low order bits */
+       ide_mm_outb(ATA_DEVCTL_OBS & ~0x80, io_ports->ctl_addr);
+
+       if (task->tf_flags & IDE_TFLAG_IN_FEATURE)
+               tf->feature = ide_mm_inb(io_ports->feature_addr);
+       if (task->tf_flags & IDE_TFLAG_IN_NSECT)
+               tf->nsect  = ide_mm_inb(io_ports->nsect_addr);
+       if (task->tf_flags & IDE_TFLAG_IN_LBAL)
+               tf->lbal   = ide_mm_inb(io_ports->lbal_addr);
+       if (task->tf_flags & IDE_TFLAG_IN_LBAM)
+               tf->lbam   = ide_mm_inb(io_ports->lbam_addr);
+       if (task->tf_flags & IDE_TFLAG_IN_LBAH)
+               tf->lbah   = ide_mm_inb(io_ports->lbah_addr);
+       if (task->tf_flags & IDE_TFLAG_IN_DEVICE)
+               tf->device = ide_mm_inb(io_ports->device_addr);
+
+       if (task->tf_flags & IDE_TFLAG_LBA48) {
+               ide_mm_outb(ATA_DEVCTL_OBS | 0x80, io_ports->ctl_addr);
+
+               if (task->tf_flags & IDE_TFLAG_IN_HOB_FEATURE)
+                       tf->hob_feature = ide_mm_inb(io_ports->feature_addr);
+               if (task->tf_flags & IDE_TFLAG_IN_HOB_NSECT)
+                       tf->hob_nsect   = ide_mm_inb(io_ports->nsect_addr);
+               if (task->tf_flags & IDE_TFLAG_IN_HOB_LBAL)
+                       tf->hob_lbal    = ide_mm_inb(io_ports->lbal_addr);
+               if (task->tf_flags & IDE_TFLAG_IN_HOB_LBAM)
+                       tf->hob_lbam    = ide_mm_inb(io_ports->lbam_addr);
+               if (task->tf_flags & IDE_TFLAG_IN_HOB_LBAH)
+                       tf->hob_lbah    = ide_mm_inb(io_ports->lbah_addr);
+       }
+}
+
+static void at91_ide_set_pio_mode(ide_drive_t *drive, const u8 pio)
+{
+       struct ide_timing *timing;
+       u8 chipselect = drive->hwif->select_data;
+       int use_iordy = 0;
+
+       pdbg("chipselect %u pio %u\n", chipselect, pio);
+
+       timing = ide_timing_find_mode(XFER_PIO_0 + pio);
+       BUG_ON(!timing);
+
+       if ((pio > 2 || ata_id_has_iordy(drive->id)) &&
+           !(ata_id_is_cfa(drive->id) && pio > 4))
+               use_iordy = 1;
+
+       apply_timings(chipselect, pio, timing, use_iordy);
+}
+
+static const struct ide_tp_ops at91_ide_tp_ops = {
+       .exec_command   = ide_exec_command,
+       .read_status    = ide_read_status,
+       .read_altstatus = ide_read_altstatus,
+       .set_irq        = ide_set_irq,
+
+       .tf_load        = at91_ide_tf_load,
+       .tf_read        = at91_ide_tf_read,
+
+       .input_data     = at91_ide_input_data,
+       .output_data    = at91_ide_output_data,
+};
+
+static const struct ide_port_ops at91_ide_port_ops = {
+       .set_pio_mode   = at91_ide_set_pio_mode,
+};
+
+static const struct ide_port_info at91_ide_port_info __initdata = {
+       .port_ops       = &at91_ide_port_ops,
+       .tp_ops         = &at91_ide_tp_ops,
+       .host_flags     = IDE_HFLAG_MMIO | IDE_HFLAG_NO_DMA | IDE_HFLAG_SINGLE |
+                         IDE_HFLAG_NO_IO_32BIT | IDE_HFLAG_UNMASK_IRQS,
+       .pio_mask       = ATA_PIO5,
+};
+
+/*
+ * If interrupt is delivered through GPIO, IRQ are triggered on falling
+ * and rising edge of signal. Whereas IDE device request interrupt on high
+ * level (rising edge in our case). This mean we have fake interrupts, so
+ * we need to check interrupt pin and exit instantly from ISR when line
+ * is on low level.
+ */
+
+irqreturn_t at91_irq_handler(int irq, void *dev_id)
+{
+       int ntries = 8;
+       int pin_val1, pin_val2;
+
+       /* additional deglitch, line can be noisy in badly designed PCB */
+       do {
+               pin_val1 = at91_get_gpio_value(irq);
+               pin_val2 = at91_get_gpio_value(irq);
+       } while (pin_val1 != pin_val2 && --ntries > 0);
+
+       if (pin_val1 == 0 || ntries <= 0)
+               return IRQ_HANDLED;
+
+       return ide_intr(irq, dev_id);
+}
+
+static int __init at91_ide_probe(struct platform_device *pdev)
+{
+       int ret;
+       hw_regs_t hw;
+       hw_regs_t *hws[] = { &hw, NULL, NULL, NULL };
+       struct ide_host *host;
+       struct resource *res;
+       unsigned long tf_base = 0, ctl_base = 0;
+       struct at91_cf_data *board = pdev->dev.platform_data;
+
+       if (!board)
+               return -ENODEV;
+
+       if (board->det_pin && at91_get_gpio_value(board->det_pin) != 0) {
+               perr("no device detected\n");
+               return -ENODEV;
+       }
+
+       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+       if (!res) {
+               perr("can't get memory resource\n");
+               return -ENODEV;
+       }
+
+       if (!devm_request_mem_region(&pdev->dev, res->start + TASK_FILE,
+                                    REGS_SIZE, "ide") ||
+           !devm_request_mem_region(&pdev->dev, res->start + ALT_MODE,
+                                    REGS_SIZE, "alt")) {
+               perr("memory resources in use\n");
+               return -EBUSY;
+       }
+
+       pdbg("chipselect %u irq %u res %08lx\n", board->chipselect,
+            board->irq_pin, (unsigned long) res->start);
+
+       tf_base = (unsigned long) devm_ioremap(&pdev->dev, res->start + TASK_FILE,
+                                              REGS_SIZE);
+       ctl_base = (unsigned long) devm_ioremap(&pdev->dev, res->start + ALT_MODE,
+                                               REGS_SIZE);
+       if (!tf_base || !ctl_base) {
+               perr("can't map memory regions\n");
+               return -EBUSY;
+       }
+
+       memset(&hw, 0, sizeof(hw));
+
+       if (board->flags & AT91_IDE_SWAP_A0_A2) {
+               /* workaround for stupid hardware bug */
+               hw.io_ports.data_addr   = tf_base + 0;
+               hw.io_ports.error_addr  = tf_base + 4;
+               hw.io_ports.nsect_addr  = tf_base + 2;
+               hw.io_ports.lbal_addr   = tf_base + 6;
+               hw.io_ports.lbam_addr   = tf_base + 1;
+               hw.io_ports.lbah_addr   = tf_base + 5;
+               hw.io_ports.device_addr = tf_base + 3;
+               hw.io_ports.command_addr = tf_base + 7;
+               hw.io_ports.ctl_addr    = ctl_base + 3;
+       } else
+               ide_std_init_ports(&hw, tf_base, ctl_base + 6);
+
+       hw.irq = board->irq_pin;
+       hw.chipset = ide_generic;
+       hw.dev = &pdev->dev;
+
+       host = ide_host_alloc(&at91_ide_port_info, hws);
+       if (!host) {
+               perr("failed to allocate ide host\n");
+               return -ENOMEM;
+       }
+
+       /* setup Static Memory Controller - PIO 0 as default */
+       apply_timings(board->chipselect, 0, ide_timing_find_mode(XFER_PIO_0), 0);
+
+       /* with GPIO interrupt we have to do quirks in handler */
+       if (board->irq_pin >= PIN_BASE)
+               host->irq_handler = at91_irq_handler;
+
+       host->ports[0]->select_data = board->chipselect;
+
+       ret = ide_host_register(host, &at91_ide_port_info, hws);
+       if (ret) {
+               perr("failed to register ide host\n");
+               goto err_free_host;
+       }
+       platform_set_drvdata(pdev, host);
+       return 0;
+
+err_free_host:
+       ide_host_free(host);
+       return ret;
+}
+
+static int __exit at91_ide_remove(struct platform_device *pdev)
+{
+       struct ide_host *host = platform_get_drvdata(pdev);
+
+       ide_host_remove(host);
+       return 0;
+}
+
+static struct platform_driver at91_ide_driver = {
+       .driver = {
+               .name = DRV_NAME,
+               .owner = THIS_MODULE,
+       },
+       .remove = __exit_p(at91_ide_remove),
+};
+
+static int __init at91_ide_init(void)
+{
+       return platform_driver_probe(&at91_ide_driver, at91_ide_probe);
+}
+
+static void __exit at91_ide_exit(void)
+{
+       platform_driver_unregister(&at91_ide_driver);
+}
+
+module_init(at91_ide_init);
+module_exit(at91_ide_exit);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Stanislaw Gruszka <stf_xl@wp.pl>");
+
index 1146f4204c6e4499ac93f75bfc409d14642c25a1..1f86dcbd2b1c83c00eb68ccb6f8ca62164445c63 100644 (file)
@@ -125,5 +125,5 @@ const struct ide_proc_devset ide_disk_settings[] = {
        IDE_PROC_DEVSET(multcount,      0,    16),
        IDE_PROC_DEVSET(nowerr,         0,     1),
        IDE_PROC_DEVSET(wcache,         0,     1),
-       { 0 },
+       { NULL },
 };
index 3ec762cb60abfcceae5e0f5ede250adbc2ec2f7c..fcd4d8153df567f06f00a5cf5b642dc25306af87 100644 (file)
@@ -29,5 +29,5 @@ const struct ide_proc_devset ide_floppy_settings[] = {
        IDE_PROC_DEVSET(bios_head, 0,  255),
        IDE_PROC_DEVSET(bios_sect, 0,   63),
        IDE_PROC_DEVSET(ticks,     0,  255),
-       { 0 },
+       { NULL },
 };
index 9ee51adf567faefd6ade2873a41444a1d44ca961..a9a6c208288a27173970b705de620fea3e076294 100644 (file)
@@ -908,7 +908,7 @@ void ide_timer_expiry (unsigned long data)
        ide_drive_t     *uninitialized_var(drive);
        ide_handler_t   *handler;
        unsigned long   flags;
-       unsigned long   wait = -1;
+       int             wait = -1;
        int             plug_device = 0;
 
        spin_lock_irqsave(&hwif->lock, flags);
@@ -1162,6 +1162,7 @@ out_early:
 
        return irq_ret;
 }
+EXPORT_SYMBOL_GPL(ide_intr);
 
 /**
  *     ide_do_drive_cmd        -       issue IDE special command
index 753b92ebe0ae5e72416d78cf3fe4baf0a94aabd6..b1892bd95c6fe5e7d270e3b92e2fd825b6847cb3 100644 (file)
@@ -315,6 +315,8 @@ void ide_output_data(ide_drive_t *drive, struct request *rq, void *buf,
        u8 io_32bit = drive->io_32bit;
        u8 mmio = (hwif->host_flags & IDE_HFLAG_MMIO) ? 1 : 0;
 
+       len++;
+
        if (io_32bit) {
                unsigned long uninitialized_var(flags);
 
index ce0818a993f68a42bf445bc79dea4eaa0ccc94da..ee8e3e7cad51e6b66ce1737d263633e947e6e29c 100644 (file)
@@ -950,6 +950,7 @@ static int ide_port_setup_devices(ide_hwif_t *hwif)
 static int init_irq (ide_hwif_t *hwif)
 {
        struct ide_io_ports *io_ports = &hwif->io_ports;
+       irq_handler_t irq_handler;
        int sa = 0;
 
        mutex_lock(&ide_cfg_mtx);
@@ -959,6 +960,10 @@ static int init_irq (ide_hwif_t *hwif)
        hwif->timer.function = &ide_timer_expiry;
        hwif->timer.data = (unsigned long)hwif;
 
+       irq_handler = hwif->host->irq_handler;
+       if (irq_handler == NULL)
+               irq_handler = ide_intr;
+
 #if defined(__mc68000__)
        sa = IRQF_SHARED;
 #endif /* __mc68000__ */
@@ -969,7 +974,7 @@ static int init_irq (ide_hwif_t *hwif)
        if (io_ports->ctl_addr)
                hwif->tp_ops->set_irq(hwif, 1);
 
-       if (request_irq(hwif->irq, &ide_intr, sa, hwif->name, hwif))
+       if (request_irq(hwif->irq, irq_handler, sa, hwif->name, hwif))
                goto out_up;
 
        if (!hwif->rqsize) {
index 1d8978b3314a93bfb6d5bf8e05a52dcd11a94757..a7b9287ee0d4309bc30a9fe5d97df93f6f74eb3a 100644 (file)
@@ -231,7 +231,7 @@ static const struct ide_proc_devset ide_generic_settings[] = {
        IDE_PROC_DEVSET(pio_mode, 0, 255),
        IDE_PROC_DEVSET(unmaskirq, 0, 1),
        IDE_PROC_DEVSET(using_dma, 0, 1),
-       { 0 },
+       { NULL },
 };
 
 static void proc_ide_settings_warn(void)
index bb450a7608c2fe9a8ef08f19b03d86ba980f3fde..4e6181c7bbdaf613e18a6fdd461cdfdef60afa83 100644 (file)
@@ -2166,7 +2166,7 @@ static const struct ide_proc_devset idetape_settings[] = {
        __IDE_PROC_DEVSET(speed,        0, 0xffff, NULL, NULL),
        __IDE_PROC_DEVSET(tdsc,         IDETAPE_DSC_RW_MIN, IDETAPE_DSC_RW_MAX,
                                        mulf_tdsc, divf_tdsc),
-       { 0 },
+       { NULL },
 };
 #endif
 
index abb04c82c622edd638228054f1d6dc8a9066accd..634af6a8e6b3e31e6d27c6f095db7aa9f3614e9b 100644 (file)
@@ -21,8 +21,6 @@
 #include <linux/slab.h>
 
 #include <mach/corgi.h>
-#include <mach/hardware.h>
-#include <mach/pxa-regs.h>
 #include <mach/pxa2xx-gpio.h>
 #include <asm/hardware/scoop.h>
 
index 9d1781a618e99466f0855f480cbb8974e6a3fbd8..13967422658c4d2273539b18128bca93931b9012 100644 (file)
@@ -21,8 +21,6 @@
 #include <linux/slab.h>
 
 #include <mach/spitz.h>
-#include <mach/hardware.h>
-#include <mach/pxa-regs.h>
 #include <mach/pxa2xx-gpio.h>
 
 #define KB_ROWS                        7
index 3fb51b54fe61e22a9960ae0cb58d19721a5d1932..94a1919d439d90815836784c4d5c246f41b4017c 100644 (file)
@@ -21,7 +21,6 @@
 
 #include <mach/sharpsl.h>
 #include <mach/hardware.h>
-#include <mach/pxa-regs.h>
 #include <mach/pxa2xx-gpio.h>
 
 
index b4d44e571d76efca7a3a2f52ccdcecacf2bbe23f..8132533d71f9384e3e73aca8092b02295cd75024 100644 (file)
@@ -212,6 +212,9 @@ static void lg_notify(struct virtqueue *vq)
        hcall(LHCALL_NOTIFY, lvq->config.pfn << PAGE_SHIFT, 0, 0);
 }
 
+/* An extern declaration inside a C file is bad form.  Don't do it. */
+extern void lguest_setup_irq(unsigned int irq);
+
 /* This routine finds the first virtqueue described in the configuration of
  * this device and sets it up.
  *
@@ -266,6 +269,9 @@ static struct virtqueue *lg_find_vq(struct virtio_device *vdev,
                goto unmap;
        }
 
+       /* Make sure the interrupt is allocated. */
+       lguest_setup_irq(lvq->config.irq);
+
        /* Tell the interrupt for this virtqueue to go to the virtio_ring
         * interrupt handler. */
        /* FIXME: We used to have a flag for the Host to tell us we could use
index 03b4cd0a6344cf2e458a035325eb2ec7ffc8805a..a307f87eb90ee361ea6c36b2cbdd94c8886dfdec 100644 (file)
@@ -214,12 +214,7 @@ static inline mddev_t *mddev_get(mddev_t *mddev)
        return mddev;
 }
 
-static void mddev_delayed_delete(struct work_struct *ws)
-{
-       mddev_t *mddev = container_of(ws, mddev_t, del_work);
-       kobject_del(&mddev->kobj);
-       kobject_put(&mddev->kobj);
-}
+static void mddev_delayed_delete(struct work_struct *ws);
 
 static void mddev_put(mddev_t *mddev)
 {
@@ -3542,6 +3537,21 @@ static struct kobj_type md_ktype = {
 
 int mdp_major = 0;
 
+static void mddev_delayed_delete(struct work_struct *ws)
+{
+       mddev_t *mddev = container_of(ws, mddev_t, del_work);
+
+       if (mddev->private == &md_redundancy_group) {
+               sysfs_remove_group(&mddev->kobj, &md_redundancy_group);
+               if (mddev->sysfs_action)
+                       sysfs_put(mddev->sysfs_action);
+               mddev->sysfs_action = NULL;
+               mddev->private = NULL;
+       }
+       kobject_del(&mddev->kobj);
+       kobject_put(&mddev->kobj);
+}
+
 static int md_alloc(dev_t dev, char *name)
 {
        static DEFINE_MUTEX(disks_mutex);
@@ -4033,13 +4043,9 @@ static int do_md_stop(mddev_t * mddev, int mode, int is_open)
                        mddev->queue->merge_bvec_fn = NULL;
                        mddev->queue->unplug_fn = NULL;
                        mddev->queue->backing_dev_info.congested_fn = NULL;
-                       if (mddev->pers->sync_request) {
-                               sysfs_remove_group(&mddev->kobj, &md_redundancy_group);
-                               if (mddev->sysfs_action)
-                                       sysfs_put(mddev->sysfs_action);
-                               mddev->sysfs_action = NULL;
-                       }
                        module_put(mddev->pers->owner);
+                       if (mddev->pers->sync_request)
+                               mddev->private = &md_redundancy_group;
                        mddev->pers = NULL;
                        /* tell userspace to handle 'inactive' */
                        sysfs_notify_dirent(mddev->sysfs_state);
index 73eb656acfe356b0ca965fffee948fbd75436397..805faaea64498a97061f3db0f85ac454e4525201 100644 (file)
@@ -80,17 +80,17 @@ static int omap24xxcam_clock_get(struct omap24xxcam_device *cam)
 {
        int rval = 0;
 
-       cam->fck = clk_get(cam->dev, "cam_fck");
+       cam->fck = clk_get(cam->dev, "fck");
        if (IS_ERR(cam->fck)) {
-               dev_err(cam->dev, "can't get cam_fck");
+               dev_err(cam->dev, "can't get camera fck");
                rval = PTR_ERR(cam->fck);
                omap24xxcam_clock_put(cam);
                return rval;
        }
 
-       cam->ick = clk_get(cam->dev, "cam_ick");
+       cam->ick = clk_get(cam->dev, "ick");
        if (IS_ERR(cam->ick)) {
-               dev_err(cam->dev, "can't get cam_ick");
+               dev_err(cam->dev, "can't get camera ick");
                rval = PTR_ERR(cam->ick);
                omap24xxcam_clock_put(cam);
        }
index 07c334f25aae69bf257a2a0cff91465bd5e784b9..0c4ce58c53d53363afa9e7371a2e868b90dc34b5 100644 (file)
@@ -35,7 +35,6 @@
 #include <linux/videodev2.h>
 
 #include <mach/dma.h>
-#include <mach/pxa-regs.h>
 #include <mach/camera.h>
 
 #define PXA_CAM_VERSION_CODE KERNEL_VERSION(0, 0, 5)
index 9c50e6f1c23649d75ba0a2522f5e52b04ff4740e..34ce2703d29a4522dbf52ca1b681571a14e0c42a 100644 (file)
@@ -248,12 +248,15 @@ mmc_send_cxd_data(struct mmc_card *card, struct mmc_host *host,
 
        sg_init_one(&sg, data_buf, len);
 
-       /*
-        * The spec states that CSR and CID accesses have a timeout
-        * of 64 clock cycles.
-        */
-       data.timeout_ns = 0;
-       data.timeout_clks = 64;
+       if (opcode == MMC_SEND_CSD || opcode == MMC_SEND_CID) {
+               /*
+                * The spec states that CSR and CID accesses have a timeout
+                * of 64 clock cycles.
+                */
+               data.timeout_ns = 0;
+               data.timeout_clks = 64;
+       } else
+               mmc_set_data_timeout(&data, card);
 
        mmc_wait_for_req(host, &mrq);
 
index 2909bbc8ad009aa751522087618f3886d9853019..a663429b3d5530243841b0da1627d002cbe26d50 100644 (file)
@@ -490,7 +490,7 @@ static void mmci_check_status(unsigned long data)
        mod_timer(&host->timer, jiffies + HZ);
 }
 
-static int mmci_probe(struct amba_device *dev, void *id)
+static int __devinit mmci_probe(struct amba_device *dev, void *id)
 {
        struct mmc_platform_data *plat = dev->dev.platform_data;
        struct mmci_host *host;
@@ -633,7 +633,7 @@ static int mmci_probe(struct amba_device *dev, void *id)
        return ret;
 }
 
-static int mmci_remove(struct amba_device *dev)
+static int __devexit mmci_remove(struct amba_device *dev)
 {
        struct mmc_host *mmc = amba_get_drvdata(dev);
 
@@ -730,7 +730,7 @@ static struct amba_driver mmci_driver = {
                .name   = DRIVER_NAME,
        },
        .probe          = mmci_probe,
-       .remove         = mmci_remove,
+       .remove         = __devexit_p(mmci_remove),
        .suspend        = mmci_suspend,
        .resume         = mmci_resume,
        .id_table       = mmci_ids,
index dda0be4e25dc23fe08a51ae13d7f8b1712dbfab6..b4a615c55f28b5e4a8e9fb681dcc188771c8224d 100644 (file)
@@ -42,7 +42,7 @@
 #define HAS_DMA
 #endif
 
-#define DRIVER_NAME "imx-mmc"
+#define DRIVER_NAME "mxc-mmc"
 
 #define MMC_REG_STR_STP_CLK            0x00
 #define MMC_REG_STATUS                 0x04
@@ -707,7 +707,7 @@ static int mxcmci_probe(struct platform_device *pdev)
        host->res = r;
        host->irq = irq;
 
-       host->clk = clk_get(&pdev->dev, "sdhc_clk");
+       host->clk = clk_get(&pdev->dev, NULL);
        if (IS_ERR(host->clk)) {
                ret = PTR_ERR(host->clk);
                goto out_iounmap;
index 67d7b7fef084f1a064d4f7834a37af0059c96f99..5570849188cc806032cab4791ab3ce10706a51f2 100644 (file)
@@ -1460,18 +1460,12 @@ static int __init mmc_omap_probe(struct platform_device *pdev)
        if (!host->virt_base)
                goto err_ioremap;
 
-       if (cpu_is_omap24xx()) {
-               host->iclk = clk_get(&pdev->dev, "mmc_ick");
-               if (IS_ERR(host->iclk))
-                       goto err_free_mmc_host;
-               clk_enable(host->iclk);
-       }
-
-       if (!cpu_is_omap24xx())
-               host->fclk = clk_get(&pdev->dev, "mmc_ck");
-       else
-               host->fclk = clk_get(&pdev->dev, "mmc_fck");
+       host->iclk = clk_get(&pdev->dev, "ick");
+       if (IS_ERR(host->iclk))
+               goto err_free_mmc_host;
+       clk_enable(host->iclk);
 
+       host->fclk = clk_get(&pdev->dev, "fck");
        if (IS_ERR(host->fclk)) {
                ret = PTR_ERR(host->fclk);
                goto err_free_iclk;
@@ -1536,10 +1530,10 @@ static int mmc_omap_remove(struct platform_device *pdev)
        if (host->pdata->cleanup)
                host->pdata->cleanup(&pdev->dev);
 
-       if (host->iclk && !IS_ERR(host->iclk))
-               clk_put(host->iclk);
-       if (host->fclk && !IS_ERR(host->fclk))
-               clk_put(host->fclk);
+       mmc_omap_fclk_enable(host, 0);
+       clk_put(host->fclk);
+       clk_disable(host->iclk);
+       clk_put(host->iclk);
 
        iounmap(host->virt_base);
        release_mem_region(pdev->resource[0].start,
index a631c81dce1243bcb9bacefd26dcd3f0e439073d..3916a5618e288e4cd5680a1127ce025efcc8b387 100644 (file)
@@ -956,13 +956,13 @@ static int __init omap_mmc_probe(struct platform_device *pdev)
 
        sema_init(&host->sem, 1);
 
-       host->iclk = clk_get(&pdev->dev, "mmchs_ick");
+       host->iclk = clk_get(&pdev->dev, "ick");
        if (IS_ERR(host->iclk)) {
                ret = PTR_ERR(host->iclk);
                host->iclk = NULL;
                goto err1;
        }
-       host->fclk = clk_get(&pdev->dev, "mmchs_fck");
+       host->fclk = clk_get(&pdev->dev, "fck");
        if (IS_ERR(host->fclk)) {
                ret = PTR_ERR(host->fclk);
                host->fclk = NULL;
index 9702ad3774cf90ae1065d2d8d2a8e271c240aaae..430095725f9f294af3db79a136b07196db2d2f7e 100644 (file)
@@ -30,9 +30,8 @@
 
 #include <asm/sizes.h>
 
-#include <mach/dma.h>
 #include <mach/hardware.h>
-#include <mach/pxa-regs.h>
+#include <mach/dma.h>
 #include <mach/mmc.h>
 
 #include "pxamci.h"
index d44f741ae229cc89f342311e7969335a3cc527ca..6d9f810565c84c9b8a6c86ed51dc1e1bd07d7717 100644 (file)
@@ -821,7 +821,8 @@ static struct flash_info *__devinit jedec_probe(struct spi_device *spi)
                                        if (!(info->flags & IS_POW2PS))
                                                return info;
                                }
-                       }
+                       } else
+                               return info;
                }
        }
 
index 4b122e7ab4b3a5efb36071359137e0a2637c80df..229718222db710e27fc980fb68ca287d9553e99d 100644 (file)
@@ -46,16 +46,19 @@ static int physmap_flash_remove(struct platform_device *dev)
 
        physmap_data = dev->dev.platform_data;
 
+       if (info->cmtd) {
 #ifdef CONFIG_MTD_PARTITIONS
-       if (info->nr_parts) {
-               del_mtd_partitions(info->cmtd);
-               kfree(info->parts);
-       } else if (physmap_data->nr_parts)
-               del_mtd_partitions(info->cmtd);
-       else
-               del_mtd_device(info->cmtd);
+               if (info->nr_parts || physmap_data->nr_parts)
+                       del_mtd_partitions(info->cmtd);
+               else
+                       del_mtd_device(info->cmtd);
 #else
-       del_mtd_device(info->cmtd);
+               del_mtd_device(info->cmtd);
+#endif
+       }
+#ifdef CONFIG_MTD_PARTITIONS
+       if (info->nr_parts)
+               kfree(info->parts);
 #endif
 
 #ifdef CONFIG_MTD_CONCAT
index fa129c09bca8b8fc8f7613176b0e255891dcb80d..10081e656a6f11d63d76e99544e98e0a5dfd7249 100644 (file)
@@ -26,8 +26,7 @@
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
-#include <mach/hardware.h>
-#include <mach/pxa-regs.h>
+#include <mach/pxa2xx-regs.h>
 
 #define GPIO_NAND_CS   (11)
 #define GPIO_NAND_RB   (89)
index 21fd4f1c48068fdd7dda80fd34d96502cc438e68..bad048aca89af040b48248bd7e3852365c143044 100644 (file)
@@ -880,7 +880,7 @@ static int __init mxcnd_probe(struct platform_device *pdev)
        this->read_buf = mxc_nand_read_buf;
        this->verify_buf = mxc_nand_verify_buf;
 
-       host->clk = clk_get(&pdev->dev, "nfc_clk");
+       host->clk = clk_get(&pdev->dev, "nfc");
        if (IS_ERR(host->clk))
                goto eclk;
 
index cc55cbc2b308a058ed098732972ac92346627e6c..61b69cc4000956cee468f116653bc5766fa1037f 100644 (file)
@@ -22,7 +22,6 @@
 #include <linux/irq.h>
 
 #include <mach/dma.h>
-#include <mach/pxa-regs.h>
 #include <mach/pxa3xx_nand.h>
 
 #define        CHIP_DELAY_TIMEOUT      (2 * HZ/10)
index 5fce1d5c1a1a6cf273bc25b9983a10f620201df3..9cc43476bfa632f7e89e74a9dc04c9cb5469db49 100644 (file)
@@ -335,11 +335,20 @@ static int ixp4xx_mdio_register(void)
        if (!(mdio_bus = mdiobus_alloc()))
                return -ENOMEM;
 
-       /* All MII PHY accesses use NPE-B Ethernet registers */
-       spin_lock_init(&mdio_lock);
-       mdio_regs = (struct eth_regs __iomem *)IXP4XX_EthB_BASE_VIRT;
-       __raw_writel(DEFAULT_CORE_CNTRL, &mdio_regs->core_control);
+       if (cpu_is_ixp43x()) {
+               /* IXP43x lacks NPE-B and uses NPE-C for MII PHY access */
+               if (!(ixp4xx_read_feature_bits() & IXP4XX_FEATURE_NPEC_ETH))
+                       return -ENOSYS;
+               mdio_regs = (struct eth_regs __iomem *)IXP4XX_EthC_BASE_VIRT;
+       } else {
+               /* All MII PHY accesses use NPE-B Ethernet registers */
+               if (!(ixp4xx_read_feature_bits() & IXP4XX_FEATURE_NPEB_ETH0))
+                       return -ENOSYS;
+               mdio_regs = (struct eth_regs __iomem *)IXP4XX_EthB_BASE_VIRT;
+       }
 
+       __raw_writel(DEFAULT_CORE_CNTRL, &mdio_regs->core_control);
+       spin_lock_init(&mdio_lock);
        mdio_bus->name = "IXP4xx MII Bus";
        mdio_bus->read = &ixp4xx_mdio_read;
        mdio_bus->write = &ixp4xx_mdio_write;
@@ -1250,9 +1259,6 @@ static struct platform_driver ixp4xx_eth_driver = {
 static int __init eth_init_module(void)
 {
        int err;
-       if (!(ixp4xx_read_feature_bits() & IXP4XX_FEATURE_NPEB_ETH0))
-               return -ENOSYS;
-
        if ((err = ixp4xx_mdio_register()))
                return err;
        return platform_driver_register(&ixp4xx_eth_driver);
index 1cf2f949c0b4d3f60c75b63399a64aa39f9c5f3d..f3a127434897472110abaa8bd5e26b383e9a9767 100644 (file)
@@ -560,7 +560,7 @@ ks8695_reset(struct ks8695_priv *ksp)
                msleep(1);
        }
 
-       if (reset_timeout == 0) {
+       if (reset_timeout < 0) {
                dev_crit(ksp->dev,
                         "Timeout waiting for DMA engines to reset\n");
                /* And blithely carry on */
index 9fb388388fb72e6990e697843ac68158fb565bf0..e0578fe8c0db88d4df48e89514277917f5254f86 100644 (file)
@@ -4113,7 +4113,7 @@ static int bond_neigh_setup(struct net_device *dev, struct neigh_parms *parms)
                const struct net_device_ops *slave_ops
                        = slave->dev->netdev_ops;
                if (slave_ops->ndo_neigh_setup)
-                       return slave_ops->ndo_neigh_setup(dev, parms);
+                       return slave_ops->ndo_neigh_setup(slave->dev, parms);
        }
        return 0;
 }
index 31794c2363ec6870fbdd7a3fabe50ec05b9b2af0..e775338b525f7b96459594f1ea66418d30dcf47e 100644 (file)
@@ -24,9 +24,8 @@
 
 #include <mach/dma.h>
 #include <mach/irda.h>
-#include <mach/hardware.h>
-#include <mach/pxa-regs.h>
 #include <mach/regs-uart.h>
+#include <mach/regs-ost.h>
 
 #define FICP           __REG(0x40800000)  /* Start of FICP area */
 #define ICCR0          __REG(0x40800000)  /* ICP Control Register 0 */
index 08b34051c646d6e4028bb30847ad793c84aedd00..a6e1a35a13cb40da0c7c7a7d05008fba2e5eecdd 100644 (file)
@@ -957,13 +957,14 @@ jme_process_receive(struct jme_adapter *jme, int limit)
                goto out_inc;
 
        i = atomic_read(&rxring->next_to_clean);
-       while (limit-- > 0) {
+       while (limit > 0) {
                rxdesc = rxring->desc;
                rxdesc += i;
 
                if ((rxdesc->descwb.flags & cpu_to_le16(RXWBFLAG_OWN)) ||
                !(rxdesc->descwb.desccnt & RXWBDCNT_WBCPL))
                        goto out;
+               --limit;
 
                desccnt = rxdesc->descwb.desccnt & RXWBDCNT_DCNT;
 
index e5cb6b1f0ebd8be1aada0898403e79cb3a25d40f..2404a838b1fea1073eb0e01a244a61079ebf6336 100644 (file)
@@ -1035,7 +1035,8 @@ static int el3_rx(struct net_device *dev, int worklimit)
        DEBUG(3, "%s: in rx_packet(), status %4.4x, rx_status %4.4x.\n",
                  dev->name, inw(ioaddr+EL3_STATUS), inw(ioaddr+RxStatus));
        while (!((rx_status = inw(ioaddr + RxStatus)) & 0x8000) &&
-                  (--worklimit >= 0)) {
+                       worklimit > 0) {
+               worklimit--;
                if (rx_status & 0x4000) { /* Error, update stats. */
                        short error = rx_status & 0x3800;
                        dev->stats.rx_errors++;
index 73ecc657999d69e899e4ddb2537e6aa1db376b1d..1e01b8a6dbf3584afd9a257cfe69b6e0dac7da23 100644 (file)
@@ -857,7 +857,8 @@ static int el3_rx(struct net_device *dev)
     DEBUG(3, "%s: in rx_packet(), status %4.4x, rx_status %4.4x.\n",
          dev->name, inw(ioaddr+EL3_STATUS), inw(ioaddr+RX_STATUS));
     while (!((rx_status = inw(ioaddr + RX_STATUS)) & 0x8000) &&
-          (--worklimit >= 0)) {
+                   worklimit > 0) {
+       worklimit--;
        if (rx_status & 0x4000) { /* Error, update stats. */
            short error = rx_status & 0x3800;
            dev->stats.rx_errors++;
index 870b4c33f108d87b384b3fe46c506d4f1cb1107e..8140f7cb4d856c1622df706939c7bb10ae8edf2d 100644 (file)
   #define SMC_USE_16BIT                0
   #define SMC_USE_32BIT                1
   #define SMC_IRQ_SENSE                IRQF_TRIGGER_LOW
+#elif defined(CONFIG_ARCH_OMAP34XX)
+  #define SMC_USE_16BIT                0
+  #define SMC_USE_32BIT                1
+  #define SMC_IRQ_SENSE                IRQF_TRIGGER_LOW
+  #define SMC_MEM_RESERVED     1
+#elif defined(CONFIG_ARCH_OMAP24XX)
+  #define SMC_USE_16BIT                0
+  #define SMC_USE_32BIT                1
+  #define SMC_IRQ_SENSE                IRQF_TRIGGER_LOW
+  #define SMC_MEM_RESERVED     1
 #else
 /*
  * Default configuration
@@ -226,8 +236,7 @@ static inline void SMC_outsl(struct smc911x_local *lp, int reg,
  * Use a DMA for RX and TX packets.
  */
 #include <linux/dma-mapping.h>
-#include <asm/dma.h>
-#include <mach/pxa-regs.h>
+#include <mach/dma.h>
 
 static dma_addr_t rx_dmabuf, tx_dmabuf;
 static int rx_dmalen, tx_dmalen;
@@ -675,6 +684,7 @@ smc_pxa_dma_outsl(struct smc911x_local *lp, u_long physaddr,
 #define CHIP_9116      0x0116
 #define CHIP_9117      0x0117
 #define CHIP_9118      0x0118
+#define CHIP_9211      0x9211
 #define CHIP_9215      0x115A
 #define CHIP_9217      0x117A
 #define CHIP_9218      0x118A
@@ -689,6 +699,7 @@ static const struct chip_id chip_ids[] =  {
        { CHIP_9116, "LAN9116" },
        { CHIP_9117, "LAN9117" },
        { CHIP_9118, "LAN9118" },
+       { CHIP_9211, "LAN9211" },
        { CHIP_9215, "LAN9215" },
        { CHIP_9217, "LAN9217" },
        { CHIP_9218, "LAN9218" },
index c4ccd121bc9c648ba90a2bbf8e3c110e2bacb187..1083e2c5dec6a90e7da1a1bdcc2b3ea8458fbdc0 100644 (file)
@@ -44,6 +44,7 @@
     defined(CONFIG_MACH_MAINSTONE) ||\
     defined(CONFIG_MACH_ZYLONITE) ||\
     defined(CONFIG_MACH_LITTLETON) ||\
+    defined(CONFIG_MACH_ZYLONITE2) ||\
     defined(CONFIG_ARCH_VIPER)
 
 #include <asm/mach-types.h>
@@ -494,8 +495,6 @@ struct smc_local {
  */
 #include <linux/dma-mapping.h>
 #include <mach/dma.h>
-#include <mach/hardware.h>
-#include <mach/pxa-regs.h>
 
 #ifdef SMC_insl
 #undef SMC_insl
index 8d64b1da0465c99a0502c642900f325964cf0186..0fcb7503363d2f40139b64cc933c16947930c281 100644 (file)
@@ -1229,7 +1229,7 @@ static void gem_reset(struct gem *gp)
                        break;
        } while (val & (GREG_SWRST_TXRST | GREG_SWRST_RXRST));
 
-       if (limit <= 0)
+       if (limit < 0)
                printk(KERN_ERR "%s: SW reset is ghetto.\n", gp->dev->name);
 
        if (gp->phy_type == phy_serialink || gp->phy_type == phy_serdes)
index b080f9493d83fe70a22dd236e3eaf045ca4aaf03..dabdf59f80163bc3a8d3ca13f8f7fcc3acfc7b8c 100644 (file)
@@ -1473,7 +1473,8 @@ static void tg3_phy_toggle_apd(struct tg3 *tp, bool enable)
 {
        u32 reg;
 
-       if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS))
+       if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS) ||
+           GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906)
                return;
 
        reg = MII_TG3_MISC_SHDW_WREN |
index 5f601773c26064e7962e6bc5026018f5f1c666af..e2150b3c83d970e7e8976955691084666fd7d398 100644 (file)
@@ -121,11 +121,6 @@ static int __devinit tms_pci_attach(struct pci_dev *pdev, const struct pci_devic
                goto err_out_trdev;
        }
 
-       ret = request_irq(pdev->irq, tms380tr_interrupt, IRQF_SHARED,
-                         dev->name, dev);
-       if (ret)
-               goto err_out_region;
-
        dev->base_addr  = pci_ioaddr;
        dev->irq        = pci_irq_line;
        dev->dma        = 0;
@@ -142,7 +137,7 @@ static int __devinit tms_pci_attach(struct pci_dev *pdev, const struct pci_devic
        ret = tmsdev_init(dev, &pdev->dev);
        if (ret) {
                printk("%s: unable to get memory for dev->priv.\n", dev->name);
-               goto err_out_irq;
+               goto err_out_region;
        }
 
        tp = netdev_priv(dev);
@@ -157,6 +152,11 @@ static int __devinit tms_pci_attach(struct pci_dev *pdev, const struct pci_devic
 
        tp->tmspriv = cardinfo;
 
+       ret = request_irq(pdev->irq, tms380tr_interrupt, IRQF_SHARED,
+                         dev->name, dev);
+       if (ret)
+               goto err_out_tmsdev;
+
        dev->open = tms380tr_open;
        dev->stop = tms380tr_close;
        pci_set_drvdata(pdev, dev);
@@ -164,15 +164,15 @@ static int __devinit tms_pci_attach(struct pci_dev *pdev, const struct pci_devic
 
        ret = register_netdev(dev);
        if (ret)
-               goto err_out_tmsdev;
+               goto err_out_irq;
        
        return 0;
 
+err_out_irq:
+       free_irq(pdev->irq, dev);
 err_out_tmsdev:
        pci_set_drvdata(pdev, NULL);
        tmsdev_term(dev);
-err_out_irq:
-       free_irq(pdev->irq, dev);
 err_out_region:
        release_region(pci_ioaddr, TMS_PCI_IO_EXTENT);
 err_out_trdev:
index 54635911305c2357f66a5705fdb76e0539742876..0ada4edd56eb73a90d0270bd1043d4a5cf30b52e 100644 (file)
@@ -107,7 +107,7 @@ int uec_mdio_read(struct mii_bus *bus, int mii_id, int regnum)
 static int uec_mdio_reset(struct mii_bus *bus)
 {
        struct ucc_mii_mng __iomem *regs = (void __iomem *)bus->priv;
-       unsigned int timeout = PHY_INIT_TIMEOUT;
+       int timeout = PHY_INIT_TIMEOUT;
 
        mutex_lock(&bus->mdio_lock);
 
@@ -123,7 +123,7 @@ static int uec_mdio_reset(struct mii_bus *bus)
 
        mutex_unlock(&bus->mdio_lock);
 
-       if (timeout <= 0) {
+       if (timeout < 0) {
                printk(KERN_ERR "%s: The MII Bus is stuck!\n", bus->name);
                return -EBUSY;
        }
index 5b67bbf1987e33b8015f11de5faeb8dd2644978d..81682c6defa010c46addda289b4d1ef4d6a4bc56 100644 (file)
@@ -633,6 +633,10 @@ static const struct usb_device_id products[] = {
         },
        {
        USB_DEVICE(0x0a47, 0x9601),     /* Hirose USB-100 */
+       .driver_info = (unsigned long)&dm9601_info,
+        },
+       {
+       USB_DEVICE(0x0fe6, 0x8101),     /* DM9601 USB to Fast Ethernet Adapter */
        .driver_info = (unsigned long)&dm9601_info,
         },
        {},                     // END
index 36bafeb353cefa07e1b4597b247abe3574204315..129e2d330abb1f5e591786fe29a5f940fdb1282c 100644 (file)
@@ -3868,7 +3868,7 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        }
        err = iwl_eeprom_check_version(priv);
        if (err)
-               goto out_iounmap;
+               goto out_free_eeprom;
 
        /* extract MAC Address */
        iwl_eeprom_get_mac(priv, priv->mac_addr);
@@ -3945,6 +3945,8 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        return 0;
 
  out_remove_sysfs:
+       destroy_workqueue(priv->workqueue);
+       priv->workqueue = NULL;
        sysfs_remove_group(&pdev->dev.kobj, &iwl_attribute_group);
  out_uninit_drv:
        iwl_uninit_drv(priv);
@@ -3953,8 +3955,8 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
  out_iounmap:
        pci_iounmap(pdev, priv->hw_base);
  out_pci_release_regions:
-       pci_release_regions(pdev);
        pci_set_drvdata(pdev, NULL);
+       pci_release_regions(pdev);
  out_pci_disable_device:
        pci_disable_device(pdev);
  out_ieee80211_free_hw:
index 93be74a1f1398a4ab98430facbfe8f5544fbf42f..57dd34e256d84c1be242785749c22c3bf839bcf8 100644 (file)
@@ -7911,7 +7911,7 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
                                CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000);
        if (err < 0) {
                IWL_DEBUG_INFO("Failed to init the card\n");
-               goto out_remove_sysfs;
+               goto out_iounmap;
        }
 
        /***********************
@@ -7921,7 +7921,7 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
        err = iwl3945_eeprom_init(priv);
        if (err) {
                IWL_ERROR("Unable to init EEPROM\n");
-               goto out_remove_sysfs;
+               goto out_iounmap;
        }
        /* MAC Address location in EEPROM same for 3945/4965 */
        get_eeprom_mac(priv, priv->mac_addr);
@@ -7975,7 +7975,7 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
        err = iwl3945_init_channel_map(priv);
        if (err) {
                IWL_ERROR("initializing regulatory failed: %d\n", err);
-               goto out_release_irq;
+               goto out_unset_hw_setting;
        }
 
        err = iwl3945_init_geos(priv);
@@ -8045,25 +8045,22 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
        return 0;
 
  out_remove_sysfs:
+       destroy_workqueue(priv->workqueue);
+       priv->workqueue = NULL;
        sysfs_remove_group(&pdev->dev.kobj, &iwl3945_attribute_group);
  out_free_geos:
        iwl3945_free_geos(priv);
  out_free_channel_map:
        iwl3945_free_channel_map(priv);
-
-
- out_release_irq:
-       destroy_workqueue(priv->workqueue);
-       priv->workqueue = NULL;
+ out_unset_hw_setting:
        iwl3945_unset_hw_setting(priv);
-
  out_iounmap:
        pci_iounmap(pdev, priv->hw_base);
  out_pci_release_regions:
        pci_release_regions(pdev);
  out_pci_disable_device:
-       pci_disable_device(pdev);
        pci_set_drvdata(pdev, NULL);
+       pci_disable_device(pdev);
  out_ieee80211_free_hw:
        ieee80211_free_hw(priv->hw);
  out:
index 34561e6e816be3dcefcf6f63caa709a9b9673b8e..f170106bf0aee74388d428e57377ead260dba8a5 100644 (file)
@@ -710,10 +710,11 @@ static struct sk_buff *p54_find_tx_entry(struct ieee80211_hw *dev,
                                           __le32 req_id)
 {
        struct p54_common *priv = dev->priv;
-       struct sk_buff *entry = priv->tx_queue.next;
+       struct sk_buff *entry;
        unsigned long flags;
 
        spin_lock_irqsave(&priv->tx_queue.lock, flags);
+       entry = priv->tx_queue.next;
        while (entry != (struct sk_buff *)&priv->tx_queue) {
                struct p54_hdr *hdr = (struct p54_hdr *) entry->data;
 
@@ -732,7 +733,7 @@ static void p54_rx_frame_sent(struct ieee80211_hw *dev, struct sk_buff *skb)
        struct p54_common *priv = dev->priv;
        struct p54_hdr *hdr = (struct p54_hdr *) skb->data;
        struct p54_frame_sent *payload = (struct p54_frame_sent *) hdr->data;
-       struct sk_buff *entry = (struct sk_buff *) priv->tx_queue.next;
+       struct sk_buff *entry;
        u32 addr = le32_to_cpu(hdr->req_id) - priv->headroom;
        struct memrecord *range = NULL;
        u32 freed = 0;
@@ -741,6 +742,7 @@ static void p54_rx_frame_sent(struct ieee80211_hw *dev, struct sk_buff *skb)
        int count, idx;
 
        spin_lock_irqsave(&priv->tx_queue.lock, flags);
+       entry = (struct sk_buff *) priv->tx_queue.next;
        while (entry != (struct sk_buff *)&priv->tx_queue) {
                struct ieee80211_tx_info *info = IEEE80211_SKB_CB(entry);
                struct p54_hdr *entry_hdr;
@@ -976,7 +978,7 @@ static int p54_assign_address(struct ieee80211_hw *dev, struct sk_buff *skb,
                               struct p54_hdr *data, u32 len)
 {
        struct p54_common *priv = dev->priv;
-       struct sk_buff *entry = priv->tx_queue.next;
+       struct sk_buff *entry;
        struct sk_buff *target_skb = NULL;
        struct ieee80211_tx_info *info;
        struct memrecord *range;
@@ -1014,6 +1016,7 @@ static int p54_assign_address(struct ieee80211_hw *dev, struct sk_buff *skb,
                }
        }
 
+       entry = priv->tx_queue.next;
        while (left--) {
                u32 hole_size;
                info = IEEE80211_SKB_CB(entry);
index af6b5847be5ce4362a5c4256ad64d35238d9433b..3e2ac2bbb12f2c69bf3a6e070e4776f589540258 100644 (file)
@@ -1952,6 +1952,8 @@ static struct usb_device_id rt2500usb_device_table[] = {
        { USB_DEVICE(0x13b1, 0x000d), USB_DEVICE_DATA(&rt2500usb_ops) },
        { USB_DEVICE(0x13b1, 0x0011), USB_DEVICE_DATA(&rt2500usb_ops) },
        { USB_DEVICE(0x13b1, 0x001a), USB_DEVICE_DATA(&rt2500usb_ops) },
+       /* CNet */
+       { USB_DEVICE(0x1371, 0x9022), USB_DEVICE_DATA(&rt2500usb_ops) },
        /* Conceptronic */
        { USB_DEVICE(0x14b2, 0x3c02), USB_DEVICE_DATA(&rt2500usb_ops) },
        /* D-LINK */
@@ -1976,14 +1978,20 @@ static struct usb_device_id rt2500usb_device_table[] = {
        { USB_DEVICE(0x148f, 0x2570), USB_DEVICE_DATA(&rt2500usb_ops) },
        { USB_DEVICE(0x148f, 0x2573), USB_DEVICE_DATA(&rt2500usb_ops) },
        { USB_DEVICE(0x148f, 0x9020), USB_DEVICE_DATA(&rt2500usb_ops) },
+       /* Sagem */
+       { USB_DEVICE(0x079b, 0x004b), USB_DEVICE_DATA(&rt2500usb_ops) },
        /* Siemens */
        { USB_DEVICE(0x0681, 0x3c06), USB_DEVICE_DATA(&rt2500usb_ops) },
        /* SMC */
        { USB_DEVICE(0x0707, 0xee13), USB_DEVICE_DATA(&rt2500usb_ops) },
        /* Spairon */
        { USB_DEVICE(0x114b, 0x0110), USB_DEVICE_DATA(&rt2500usb_ops) },
+       /* SURECOM */
+       { USB_DEVICE(0x0769, 0x11f3), USB_DEVICE_DATA(&rt2500usb_ops) },
        /* Trust */
        { USB_DEVICE(0x0eb0, 0x9020), USB_DEVICE_DATA(&rt2500usb_ops) },
+       /* VTech */
+       { USB_DEVICE(0x0f88, 0x3012), USB_DEVICE_DATA(&rt2500usb_ops) },
        /* Zinwell */
        { USB_DEVICE(0x5a57, 0x0260), USB_DEVICE_DATA(&rt2500usb_ops) },
        { 0, }
index 96a8d69f8790480b8fee654beebf60b4e5efbda2..cefee1b26cd8737e9a80f0e0bfd8b1aeddfa5fa7 100644 (file)
@@ -2281,7 +2281,18 @@ static const struct rt2x00_ops rt73usb_ops = {
  */
 static struct usb_device_id rt73usb_device_table[] = {
        /* AboCom */
+       { USB_DEVICE(0x07b8, 0xb21b), USB_DEVICE_DATA(&rt73usb_ops) },
+       { USB_DEVICE(0x07b8, 0xb21c), USB_DEVICE_DATA(&rt73usb_ops) },
        { USB_DEVICE(0x07b8, 0xb21d), USB_DEVICE_DATA(&rt73usb_ops) },
+       { USB_DEVICE(0x07b8, 0xb21e), USB_DEVICE_DATA(&rt73usb_ops) },
+       { USB_DEVICE(0x07b8, 0xb21f), USB_DEVICE_DATA(&rt73usb_ops) },
+       /* AL */
+       { USB_DEVICE(0x14b2, 0x3c10), USB_DEVICE_DATA(&rt73usb_ops) },
+       /* Amigo */
+       { USB_DEVICE(0x148f, 0x9021), USB_DEVICE_DATA(&rt73usb_ops) },
+       { USB_DEVICE(0x0eb0, 0x9021), USB_DEVICE_DATA(&rt73usb_ops) },
+       /* AMIT  */
+       { USB_DEVICE(0x18c5, 0x0002), USB_DEVICE_DATA(&rt73usb_ops) },
        /* Askey */
        { USB_DEVICE(0x1690, 0x0722), USB_DEVICE_DATA(&rt73usb_ops) },
        /* ASUS */
@@ -2294,7 +2305,9 @@ static struct usb_device_id rt73usb_device_table[] = {
        { USB_DEVICE(0x050d, 0x905c), USB_DEVICE_DATA(&rt73usb_ops) },
        /* Billionton */
        { USB_DEVICE(0x1631, 0xc019), USB_DEVICE_DATA(&rt73usb_ops) },
+       { USB_DEVICE(0x08dd, 0x0120), USB_DEVICE_DATA(&rt73usb_ops) },
        /* Buffalo */
+       { USB_DEVICE(0x0411, 0x00d8), USB_DEVICE_DATA(&rt73usb_ops) },
        { USB_DEVICE(0x0411, 0x00f4), USB_DEVICE_DATA(&rt73usb_ops) },
        /* CNet */
        { USB_DEVICE(0x1371, 0x9022), USB_DEVICE_DATA(&rt73usb_ops) },
@@ -2308,6 +2321,11 @@ static struct usb_device_id rt73usb_device_table[] = {
        { USB_DEVICE(0x07d1, 0x3c04), USB_DEVICE_DATA(&rt73usb_ops) },
        { USB_DEVICE(0x07d1, 0x3c06), USB_DEVICE_DATA(&rt73usb_ops) },
        { USB_DEVICE(0x07d1, 0x3c07), USB_DEVICE_DATA(&rt73usb_ops) },
+       /* Edimax */
+       { USB_DEVICE(0x7392, 0x7318), USB_DEVICE_DATA(&rt73usb_ops) },
+       { USB_DEVICE(0x7392, 0x7618), USB_DEVICE_DATA(&rt73usb_ops) },
+       /* EnGenius */
+       { USB_DEVICE(0x1740, 0x3701), USB_DEVICE_DATA(&rt73usb_ops) },
        /* Gemtek */
        { USB_DEVICE(0x15a9, 0x0004), USB_DEVICE_DATA(&rt73usb_ops) },
        /* Gigabyte */
@@ -2328,22 +2346,34 @@ static struct usb_device_id rt73usb_device_table[] = {
        { USB_DEVICE(0x0db0, 0xa861), USB_DEVICE_DATA(&rt73usb_ops) },
        { USB_DEVICE(0x0db0, 0xa874), USB_DEVICE_DATA(&rt73usb_ops) },
        /* Ralink */
+       { USB_DEVICE(0x04bb, 0x093d), USB_DEVICE_DATA(&rt73usb_ops) },
        { USB_DEVICE(0x148f, 0x2573), USB_DEVICE_DATA(&rt73usb_ops) },
        { USB_DEVICE(0x148f, 0x2671), USB_DEVICE_DATA(&rt73usb_ops) },
        /* Qcom */
        { USB_DEVICE(0x18e8, 0x6196), USB_DEVICE_DATA(&rt73usb_ops) },
        { USB_DEVICE(0x18e8, 0x6229), USB_DEVICE_DATA(&rt73usb_ops) },
        { USB_DEVICE(0x18e8, 0x6238), USB_DEVICE_DATA(&rt73usb_ops) },
+       /* Samsung */
+       { USB_DEVICE(0x04e8, 0x4471), USB_DEVICE_DATA(&rt73usb_ops) },
        /* Senao */
        { USB_DEVICE(0x1740, 0x7100), USB_DEVICE_DATA(&rt73usb_ops) },
        /* Sitecom */
-       { USB_DEVICE(0x0df6, 0x9712), USB_DEVICE_DATA(&rt73usb_ops) },
+       { USB_DEVICE(0x0df6, 0x0024), USB_DEVICE_DATA(&rt73usb_ops) },
+       { USB_DEVICE(0x0df6, 0x0027), USB_DEVICE_DATA(&rt73usb_ops) },
+       { USB_DEVICE(0x0df6, 0x002f), USB_DEVICE_DATA(&rt73usb_ops) },
        { USB_DEVICE(0x0df6, 0x90ac), USB_DEVICE_DATA(&rt73usb_ops) },
+       { USB_DEVICE(0x0df6, 0x9712), USB_DEVICE_DATA(&rt73usb_ops) },
        /* Surecom */
        { USB_DEVICE(0x0769, 0x31f3), USB_DEVICE_DATA(&rt73usb_ops) },
+       /* Philips */
+       { USB_DEVICE(0x0471, 0x200a), USB_DEVICE_DATA(&rt73usb_ops) },
        /* Planex */
        { USB_DEVICE(0x2019, 0xab01), USB_DEVICE_DATA(&rt73usb_ops) },
        { USB_DEVICE(0x2019, 0xab50), USB_DEVICE_DATA(&rt73usb_ops) },
+       /* Zcom */
+       { USB_DEVICE(0x0cde, 0x001c), USB_DEVICE_DATA(&rt73usb_ops) },
+       /* ZyXEL */
+       { USB_DEVICE(0x0586, 0x3415), USB_DEVICE_DATA(&rt73usb_ops) },
        { 0, }
 };
 
index bb9ddb9532e35a6790aa6f50dcaa1a5a7aba7b75..16f84aab6ab3f02703b9a983a9986a063fbbd4c5 100644 (file)
@@ -28,7 +28,6 @@
 #include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/system.h>
-#include <mach/pxa-regs.h>
 #include <mach/pxa2xx-regs.h>
 #include <asm/mach-types.h>
 
 #include "soc_common.h"
 #include "pxa2xx_base.h"
 
+/*
+ * Personal Computer Memory Card International Association (PCMCIA) sockets
+ */
+
+#define PCMCIAPrtSp    0x04000000      /* PCMCIA Partition Space [byte]   */
+#define PCMCIASp       (4*PCMCIAPrtSp) /* PCMCIA Space [byte]             */
+#define PCMCIAIOSp     PCMCIAPrtSp     /* PCMCIA I/O Space [byte]         */
+#define PCMCIAAttrSp   PCMCIAPrtSp     /* PCMCIA Attribute Space [byte]   */
+#define PCMCIAMemSp    PCMCIAPrtSp     /* PCMCIA Memory Space [byte]      */
+
+#define PCMCIA0Sp      PCMCIASp        /* PCMCIA 0 Space [byte]           */
+#define PCMCIA0IOSp    PCMCIAIOSp      /* PCMCIA 0 I/O Space [byte]       */
+#define PCMCIA0AttrSp  PCMCIAAttrSp    /* PCMCIA 0 Attribute Space [byte] */
+#define PCMCIA0MemSp   PCMCIAMemSp     /* PCMCIA 0 Memory Space [byte]    */
+
+#define PCMCIA1Sp      PCMCIASp        /* PCMCIA 1 Space [byte]           */
+#define PCMCIA1IOSp    PCMCIAIOSp      /* PCMCIA 1 I/O Space [byte]       */
+#define PCMCIA1AttrSp  PCMCIAAttrSp    /* PCMCIA 1 Attribute Space [byte] */
+#define PCMCIA1MemSp   PCMCIAMemSp     /* PCMCIA 1 Memory Space [byte]    */
+
+#define _PCMCIA(Nb)                    /* PCMCIA [0..1]                   */ \
+                       (0x20000000 + (Nb) * PCMCIASp)
+#define _PCMCIAIO(Nb)  _PCMCIA(Nb)     /* PCMCIA I/O [0..1]               */
+#define _PCMCIAAttr(Nb)                        /* PCMCIA Attribute [0..1]         */ \
+                       (_PCMCIA(Nb) + 2 * PCMCIAPrtSp)
+#define _PCMCIAMem(Nb)                 /* PCMCIA Memory [0..1]            */ \
+                       (_PCMCIA(Nb) + 3 * PCMCIAPrtSp)
+
+#define _PCMCIA0       _PCMCIA(0)      /* PCMCIA 0                        */
+#define _PCMCIA0IO     _PCMCIAIO(0)    /* PCMCIA 0 I/O                    */
+#define _PCMCIA0Attr   _PCMCIAAttr(0)  /* PCMCIA 0 Attribute              */
+#define _PCMCIA0Mem    _PCMCIAMem(0)   /* PCMCIA 0 Memory                 */
+
+#define _PCMCIA1       _PCMCIA(1)      /* PCMCIA 1                        */
+#define _PCMCIA1IO     _PCMCIAIO(1)    /* PCMCIA 1 I/O                    */
+#define _PCMCIA1Attr   _PCMCIAAttr(1)  /* PCMCIA 1 Attribute              */
+#define _PCMCIA1Mem    _PCMCIAMem(1)   /* PCMCIA 1 Memory                 */
+
 
 #define MCXX_SETUP_MASK     (0x7f)
 #define MCXX_ASST_MASK      (0x1f)
@@ -183,23 +220,67 @@ static void pxa2xx_configure_sockets(struct device *dev)
                MECR &= ~MECR_NOS;
 }
 
+static const char *skt_names[] = {
+       "PCMCIA socket 0",
+       "PCMCIA socket 1",
+};
+
+#define SKT_DEV_INFO_SIZE(n) \
+       (sizeof(struct skt_dev_info) + (n)*sizeof(struct soc_pcmcia_socket))
+
 int __pxa2xx_drv_pcmcia_probe(struct device *dev)
 {
-       int ret;
+       int i, ret;
        struct pcmcia_low_level *ops;
+       struct skt_dev_info *sinfo;
+       struct soc_pcmcia_socket *skt;
 
        if (!dev || !dev->platform_data)
                return -ENODEV;
 
        ops = (struct pcmcia_low_level *)dev->platform_data;
 
+       sinfo = kzalloc(SKT_DEV_INFO_SIZE(ops->nr), GFP_KERNEL);
+       if (!sinfo)
+               return -ENOMEM;
+
+       sinfo->nskt = ops->nr;
+
+       /* Initialize processor specific parameters */
+       for (i = 0; i < ops->nr; i++) {
+               skt = &sinfo->skt[i];
+
+               skt->nr         = i;
+               skt->irq        = NO_IRQ;
+
+               skt->res_skt.start      = _PCMCIA(skt->nr);
+               skt->res_skt.end        = _PCMCIA(skt->nr) + PCMCIASp - 1;
+               skt->res_skt.name       = skt_names[skt->nr];
+               skt->res_skt.flags      = IORESOURCE_MEM;
+
+               skt->res_io.start       = _PCMCIAIO(skt->nr);
+               skt->res_io.end         = _PCMCIAIO(skt->nr) + PCMCIAIOSp - 1;
+               skt->res_io.name        = "io";
+               skt->res_io.flags       = IORESOURCE_MEM | IORESOURCE_BUSY;
+
+               skt->res_mem.start      = _PCMCIAMem(skt->nr);
+               skt->res_mem.end        = _PCMCIAMem(skt->nr) + PCMCIAMemSp - 1;
+               skt->res_mem.name       = "memory";
+               skt->res_mem.flags      = IORESOURCE_MEM;
+
+               skt->res_attr.start     = _PCMCIAAttr(skt->nr);
+               skt->res_attr.end       = _PCMCIAAttr(skt->nr) + PCMCIAAttrSp - 1;
+               skt->res_attr.name      = "attribute";
+               skt->res_attr.flags     = IORESOURCE_MEM;
+       }
+
        /* Provide our PXA2xx specific timing routines. */
        ops->set_timing  = pxa2xx_pcmcia_set_timing;
 #ifdef CONFIG_CPU_FREQ
        ops->frequency_change = pxa2xx_pcmcia_frequency_change;
 #endif
 
-       ret = soc_common_drv_pcmcia_probe(dev, ops, ops->first, ops->nr);
+       ret = soc_common_drv_pcmcia_probe(dev, ops, sinfo);
 
        if (!ret)
                pxa2xx_configure_sockets(dev);
index 7c8bcb476622577f29928497ed3b4958cbf43424..4ed64d8e95e709dd432686486c963df413ea189b 100644 (file)
@@ -16,7 +16,6 @@
 #include <linux/gpio.h>
 
 #include <asm/mach-types.h>
-#include <mach/pxa-regs.h>
 
 #include "soc_common.h"
 
index 6c3aac3771260202e6c05325bc180ac9c64f32e4..a7b943d01e34a85a0e27897f55eec9ba1670b853 100644 (file)
@@ -16,7 +16,6 @@
 #include <linux/gpio.h>
 
 #include <asm/mach-types.h>
-#include <mach/pxa-regs.h>
 
 #include "soc_common.h"
 
index f663a011bf4a5da39df79e3d9c71af7041aa1b86..d09c0dc4a31a80bce783e7b3fdda1459399a3fc9 100644 (file)
@@ -16,8 +16,6 @@
 #include <linux/interrupt.h>
 #include <linux/platform_device.h>
 
-#include <mach/hardware.h>
-#include <mach/pxa-regs.h>
 #include <mach/eseries-gpio.h>
 
 #include <asm/irq.h>
index 37ec55df086e384c5d4469b22b7a0afa2e842c6f..6cbb1b1f7cfdf0a2224853f7cda97469b6deeffa 100644 (file)
@@ -24,7 +24,6 @@
 #include <mach/hardware.h>
 #include <asm/hardware/sa1111.h>
 #include <asm/mach-types.h>
-#include <mach/pxa-regs.h>
 #include <mach/lubbock.h>
 
 #include "sa1111_generic.h"
index 877001db4916c809d4e51356bd9dc84613ac6c7d..1138551ba8f61fb8f77669b9c2fcb0dea0cf5645 100644 (file)
 
 #include <pcmcia/ss.h>
 
-#include <mach/hardware.h>
 #include <asm/mach-types.h>
 #include <asm/irq.h>
 
-#include <mach/pxa-regs.h>
+#include <mach/pxa2xx-regs.h>
 #include <mach/mainstone.h>
 
 #include "soc_common.h"
index 36c7a0b324d24f49b27a0074eb434fec43cccbad..e0e5cb339b4a8e41e1f046af7a4c8eab561ed8a3 100644 (file)
@@ -22,8 +22,7 @@
 #include <asm/mach-types.h>
 #include <asm/irq.h>
 
-#include <mach/hardware.h>
-#include <mach/pxa-regs.h>
+#include <mach/pxa2xx-regs.h>
 #include <mach/trizeps4.h>
 
 #include "soc_common.h"
index dd10481be7bf23fa8c45fc4c01dda38952412ebe..17871360fe99efd1247365b51d345510a82858f3 100644 (file)
@@ -26,7 +26,6 @@
 
 #include <asm/irq.h>
 
-#include <mach/pxa-regs.h>
 #include <mach/viper.h>
 #include <asm/mach-types.h>
 
index 6de4e1b41d60a8061adca4b39a29c0051658dbc2..0cc3748f3758d866c0decfd9f7ce020c4cd97b39 100644 (file)
@@ -37,9 +37,9 @@ static void h3600_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt)
        soc_pcmcia_free_irqs(skt, irqs, ARRAY_SIZE(irqs));
   
        /* Disable CF bus: */
-       clr_h3600_egpio(IPAQ_EGPIO_OPT_NVRAM_ON);
-       clr_h3600_egpio(IPAQ_EGPIO_OPT_ON);
-       set_h3600_egpio(IPAQ_EGPIO_OPT_RESET);
+       assign_h3600_egpio(IPAQ_EGPIO_OPT_NVRAM_ON, 0);
+       assign_h3600_egpio(IPAQ_EGPIO_OPT_ON, 0);
+       assign_h3600_egpio(IPAQ_EGPIO_OPT_RESET, 1);
 }
 
 static void
@@ -79,10 +79,7 @@ h3600_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, const socket_state_
                return -1;
        }
 
-       if (state->flags & SS_RESET)
-               set_h3600_egpio(IPAQ_EGPIO_CARD_RESET);
-       else
-               clr_h3600_egpio(IPAQ_EGPIO_CARD_RESET);
+       assign_h3600_egpio(IPAQ_EGPIO_CARD_RESET, !!(state->flags & SS_RESET));
 
        /* Silently ignore Vpp, output enable, speaker enable. */
 
@@ -92,9 +89,9 @@ h3600_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, const socket_state_
 static void h3600_pcmcia_socket_init(struct soc_pcmcia_socket *skt)
 {
        /* Enable CF bus: */
-       set_h3600_egpio(IPAQ_EGPIO_OPT_NVRAM_ON);
-       set_h3600_egpio(IPAQ_EGPIO_OPT_ON);
-       clr_h3600_egpio(IPAQ_EGPIO_OPT_RESET);
+       assign_h3600_egpio(IPAQ_EGPIO_OPT_NVRAM_ON, 1);
+       assign_h3600_egpio(IPAQ_EGPIO_OPT_ON, 1);
+       assign_h3600_egpio(IPAQ_EGPIO_OPT_RESET, 0);
 
        msleep(10);
 
@@ -112,10 +109,10 @@ static void h3600_pcmcia_socket_suspend(struct soc_pcmcia_socket *skt)
         * socket 0 then socket 1.
         */
        if (skt->nr == 1) {
-               clr_h3600_egpio(IPAQ_EGPIO_OPT_ON);
-               clr_h3600_egpio(IPAQ_EGPIO_OPT_NVRAM_ON);
+               assign_h3600_egpio(IPAQ_EGPIO_OPT_ON, 0);
+               assign_h3600_egpio(IPAQ_EGPIO_OPT_NVRAM_ON, 0);
                /* hmm, does this suck power? */
-               set_h3600_egpio(IPAQ_EGPIO_OPT_RESET);
+               assign_h3600_egpio(IPAQ_EGPIO_OPT_RESET, 1);
        }
 }
 
index 7cb1273202cc6adbf97ea60c83d0abf8425e3bdb..810ac492a8c9eedc1a85e790610e846dd54ce6f0 100644 (file)
@@ -163,9 +163,55 @@ sa1100_pcmcia_show_timing(struct soc_pcmcia_socket *skt, char *buf)
        return p - buf;
 }
 
+static const char *skt_names[] = {
+       "PCMCIA socket 0",
+       "PCMCIA socket 1",
+};
+
+#define SKT_DEV_INFO_SIZE(n) \
+       (sizeof(struct skt_dev_info) + (n)*sizeof(struct soc_pcmcia_socket))
+
 int sa11xx_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops,
                            int first, int nr)
 {
+       struct skt_dev_info *sinfo;
+       struct soc_pcmcia_socket *skt;
+       int i;
+
+       sinfo = kzalloc(SKT_DEV_INFO_SIZE(nr), GFP_KERNEL);
+       if (!sinfo)
+               return -ENOMEM;
+
+       sinfo->nskt = nr;
+
+       /* Initiliaze processor specific parameters */
+       for (i = 0; i < nr; i++) {
+               skt = &sinfo->skt[i];
+
+               skt->nr         = first + i;
+               skt->irq        = NO_IRQ;
+
+               skt->res_skt.start      = _PCMCIA(skt->nr);
+               skt->res_skt.end        = _PCMCIA(skt->nr) + PCMCIASp - 1;
+               skt->res_skt.name       = skt_names[skt->nr];
+               skt->res_skt.flags      = IORESOURCE_MEM;
+
+               skt->res_io.start       = _PCMCIAIO(skt->nr);
+               skt->res_io.end         = _PCMCIAIO(skt->nr) + PCMCIAIOSp - 1;
+               skt->res_io.name        = "io";
+               skt->res_io.flags       = IORESOURCE_MEM | IORESOURCE_BUSY;
+
+               skt->res_mem.start      = _PCMCIAMem(skt->nr);
+               skt->res_mem.end        = _PCMCIAMem(skt->nr) + PCMCIAMemSp - 1;
+               skt->res_mem.name       = "memory";
+               skt->res_mem.flags      = IORESOURCE_MEM;
+
+               skt->res_attr.start     = _PCMCIAAttr(skt->nr);
+               skt->res_attr.end       = _PCMCIAAttr(skt->nr) + PCMCIAAttrSp - 1;
+               skt->res_attr.name      = "attribute";
+               skt->res_attr.flags     = IORESOURCE_MEM;
+       }
+
        /*
         * set default MECR calculation if the board specific
         * code did not specify one...
@@ -180,7 +226,7 @@ int sa11xx_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops,
        ops->frequency_change = sa1100_pcmcia_frequency_change;
 #endif
 
-       return soc_common_drv_pcmcia_probe(dev, ops, first, nr);
+       return soc_common_drv_pcmcia_probe(dev, ops, sinfo);
 }
 EXPORT_SYMBOL(sa11xx_drv_pcmcia_probe);
 
index f49ac6666153bca4718a4813878bb5fba5f7b429..163cf98e23863d2671a2448615fafa31f9fb6760 100644 (file)
 
 #include "soc_common.h"
 
-/* FIXME: platform dependent resource declaration has to move out of this file */
-#ifdef CONFIG_ARCH_PXA
-#include <mach/pxa-regs.h>
-#endif
-
 #ifdef CONFIG_PCMCIA_DEBUG
 
 static int pc_debug;
@@ -581,19 +576,6 @@ EXPORT_SYMBOL(soc_pcmcia_enable_irqs);
 LIST_HEAD(soc_pcmcia_sockets);
 static DEFINE_MUTEX(soc_pcmcia_sockets_lock);
 
-static const char *skt_names[] = {
-       "PCMCIA socket 0",
-       "PCMCIA socket 1",
-};
-
-struct skt_dev_info {
-       int nskt;
-       struct soc_pcmcia_socket skt[0];
-};
-
-#define SKT_DEV_INFO_SIZE(n) \
-       (sizeof(struct skt_dev_info) + (n)*sizeof(struct soc_pcmcia_socket))
-
 #ifdef CONFIG_CPU_FREQ
 static int
 soc_pcmcia_notifier(struct notifier_block *nb, unsigned long val, void *data)
@@ -637,26 +619,18 @@ static int soc_pcmcia_cpufreq_register(void) { return 0; }
 static void soc_pcmcia_cpufreq_unregister(void) {}
 #endif
 
-int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops, int first, int nr)
+int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops,
+                               struct skt_dev_info *sinfo)
 {
-       struct skt_dev_info *sinfo;
        struct soc_pcmcia_socket *skt;
        int ret, i;
 
        mutex_lock(&soc_pcmcia_sockets_lock);
 
-       sinfo = kzalloc(SKT_DEV_INFO_SIZE(nr), GFP_KERNEL);
-       if (!sinfo) {
-               ret = -ENOMEM;
-               goto out;
-       }
-
-       sinfo->nskt = nr;
-
        /*
         * Initialise the per-socket structure.
         */
-       for (i = 0; i < nr; i++) {
+       for (i = 0; i < sinfo->nskt; i++) {
                skt = &sinfo->skt[i];
 
                skt->socket.ops = &soc_common_pcmcia_operations;
@@ -668,43 +642,21 @@ int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops
                skt->poll_timer.data = (unsigned long)skt;
                skt->poll_timer.expires = jiffies + SOC_PCMCIA_POLL_PERIOD;
 
-               skt->nr         = first + i;
-               skt->irq        = NO_IRQ;
                skt->dev        = dev;
                skt->ops        = ops;
 
-               skt->res_skt.start      = _PCMCIA(skt->nr);
-               skt->res_skt.end        = _PCMCIA(skt->nr) + PCMCIASp - 1;
-               skt->res_skt.name       = skt_names[skt->nr];
-               skt->res_skt.flags      = IORESOURCE_MEM;
-
                ret = request_resource(&iomem_resource, &skt->res_skt);
                if (ret)
                        goto out_err_1;
 
-               skt->res_io.start       = _PCMCIAIO(skt->nr);
-               skt->res_io.end         = _PCMCIAIO(skt->nr) + PCMCIAIOSp - 1;
-               skt->res_io.name        = "io";
-               skt->res_io.flags       = IORESOURCE_MEM | IORESOURCE_BUSY;
-
                ret = request_resource(&skt->res_skt, &skt->res_io);
                if (ret)
                        goto out_err_2;
 
-               skt->res_mem.start      = _PCMCIAMem(skt->nr);
-               skt->res_mem.end        = _PCMCIAMem(skt->nr) + PCMCIAMemSp - 1;
-               skt->res_mem.name       = "memory";
-               skt->res_mem.flags      = IORESOURCE_MEM;
-
                ret = request_resource(&skt->res_skt, &skt->res_mem);
                if (ret)
                        goto out_err_3;
 
-               skt->res_attr.start     = _PCMCIAAttr(skt->nr);
-               skt->res_attr.end       = _PCMCIAAttr(skt->nr) + PCMCIAAttrSp - 1;
-               skt->res_attr.name      = "attribute";
-               skt->res_attr.flags     = IORESOURCE_MEM;
-
                ret = request_resource(&skt->res_skt, &skt->res_attr);
                if (ret)
                        goto out_err_4;
index 38c67375f363aeb9483a5656170a453e61c4101a..290e143839ee68802e29ee2688eb31270ddf5f00 100644 (file)
@@ -58,6 +58,11 @@ struct soc_pcmcia_socket {
        struct list_head        node;
 };
 
+struct skt_dev_info {
+       int nskt;
+       struct soc_pcmcia_socket skt[0];
+};
+
 struct pcmcia_state {
   unsigned detect: 1,
             ready: 1,
@@ -132,7 +137,7 @@ extern void soc_common_pcmcia_get_timing(struct soc_pcmcia_socket *, struct soc_
 
 extern struct list_head soc_pcmcia_sockets;
 
-extern int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops, int first, int nr);
+extern int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops, struct skt_dev_info *sinfo);
 extern int soc_common_drv_pcmcia_remove(struct device *dev);
 
 
index d26a5f82aabaf8eb58c61eb39c678d0f890ed5d1..4f247e4dd3f934441b46c4b87f7e69305bc8a02e 100644 (file)
@@ -35,7 +35,8 @@
 #include <asm/irq.h>
 
 #ifdef CONFIG_ARCH_PXA
-#include <mach/pxa-regs.h>
+#include <mach/regs-rtc.h>
+#include <mach/regs-ost.h>
 #endif
 
 #define RTC_DEF_DIVIDER                32768 - 1
index 68a64123af8f9fd28379a640d7a00b4f6ddcdd39..8ee01b907332fe3fb829243f127ae3c44e708014 100644 (file)
@@ -390,7 +390,8 @@ static struct scsi_host_template cumanascsi2_template = {
        .eh_abort_handler               = fas216_eh_abort,
        .can_queue                      = 1,
        .this_id                        = 7,
-       .sg_tablesize                   = SG_ALL,
+       .sg_tablesize                   = SCSI_MAX_SG_CHAIN_SEGMENTS,
+       .dma_boundary                   = IOMD_DMA_BOUNDARY,
        .cmd_per_lun                    = 1,
        .use_clustering                 = DISABLE_CLUSTERING,
        .proc_name                      = "cumanascsi2",
index bb2477b3fb0be49051010ec15842303265cc8de9..d8435132f46157774559e26a59af0347c2441304 100644 (file)
@@ -508,7 +508,8 @@ static struct scsi_host_template eesox_template = {
        .eh_abort_handler               = fas216_eh_abort,
        .can_queue                      = 1,
        .this_id                        = 7,
-       .sg_tablesize                   = SG_ALL,
+       .sg_tablesize                   = SCSI_MAX_SG_CHAIN_SEGMENTS,
+       .dma_boundary                   = IOMD_DMA_BOUNDARY,
        .cmd_per_lun                    = 1,
        .use_clustering                 = DISABLE_CLUSTERING,
        .proc_name                      = "eesox",
index d9a546d1917ce560435084bde443325f47cb22be..e2297b4c1b9e8ef546fb87cff49f9e67172d0026 100644 (file)
@@ -302,7 +302,8 @@ static struct scsi_host_template powertecscsi_template = {
 
        .can_queue                      = 8,
        .this_id                        = 7,
-       .sg_tablesize                   = SG_ALL,
+       .sg_tablesize                   = SCSI_MAX_SG_CHAIN_SEGMENTS,
+       .dma_boundary                   = IOMD_DMA_BOUNDARY,
        .cmd_per_lun                    = 2,
        .use_clustering                 = ENABLE_CLUSTERING,
        .proc_name                      = "powertec",
index 7d7f576da202728435d314a501e086418d09dd10..9be11b0963f2b796b21f5678466d3fd1793eacae 100644 (file)
@@ -628,7 +628,7 @@ config SERIAL_MPSC_CONSOLE
 
 config SERIAL_PXA
        bool "PXA serial port support"
-       depends on ARM && ARCH_PXA
+       depends on ARCH_PXA || ARCH_MMP
        select SERIAL_CORE
        help
          If you have a machine based on an Intel XScale PXA2xx CPU you
index a50954612b60145e7f9eb6acc12d9f05fb8b05d8..9f460b175c50ba9eaff00a10ebdbec1f77f21f84 100644 (file)
@@ -1129,7 +1129,7 @@ static int serial_imx_probe(struct platform_device *pdev)
        sport->timer.function = imx_timeout;
        sport->timer.data     = (unsigned long)sport;
 
-       sport->clk = clk_get(&pdev->dev, "uart_clk");
+       sport->clk = clk_get(&pdev->dev, "uart");
        if (IS_ERR(sport->clk)) {
                ret = PTR_ERR(sport->clk);
                goto unmap;
index f6e3b86bb0be7cb26dd1de6ef0a65b60cf805438..a48a8a13d87bb7c00cd26c6522cba54c61fa8de4 100644 (file)
 #include <linux/tty_flip.h>
 #include <linux/serial_core.h>
 #include <linux/clk.h>
-
-#include <asm/io.h>
-#include <mach/hardware.h>
-#include <asm/irq.h>
-#include <mach/pxa-regs.h>
-#include <mach/regs-uart.h>
-
+#include <linux/io.h>
 
 struct uart_pxa_port {
        struct uart_port        port;
@@ -491,7 +485,7 @@ serial_pxa_set_termios(struct uart_port *port, struct ktermios *termios,
         * Ensure the port will be enabled.
         * This is required especially for serial console.
         */
-       up->ier |= IER_UUE;
+       up->ier |= UART_IER_UUE;
 
        /*
         * Update the per-port timeout.
@@ -784,19 +778,15 @@ static int serial_pxa_probe(struct platform_device *dev)
        sport->port.flags = UPF_IOREMAP | UPF_BOOT_AUTOCONF;
        sport->port.uartclk = clk_get_rate(sport->clk);
 
-       /*
-        * Is it worth keeping this?
-        */
-       if (mmres->start == __PREG(FFUART))
-               sport->name = "FFUART";
-       else if (mmres->start == __PREG(BTUART))
-               sport->name = "BTUART";
-       else if (mmres->start == __PREG(STUART))
-               sport->name = "STUART";
-       else if (mmres->start == __PREG(HWUART))
-               sport->name = "HWUART";
-       else
+       switch (dev->id) {
+       case 0: sport->name = "FFUART"; break;
+       case 1: sport->name = "BTUART"; break;
+       case 2: sport->name = "STUART"; break;
+       case 3: sport->name = "HWUART"; break;
+       default:
                sport->name = "???";
+               break;
+       }
 
        sport->port.membase = ioremap(mmres->start, mmres->end - mmres->start + 1);
        if (!sport->port.membase) {
index 454a2712e6290ee0f0f085667a0baec9ec6bb027..b91ee1ae975da1950e15526fc71a782e2561cd51 100644 (file)
@@ -1021,13 +1021,13 @@ static int __init omap2_mcspi_probe(struct platform_device *pdev)
        spin_lock_init(&mcspi->lock);
        INIT_LIST_HEAD(&mcspi->msg_queue);
 
-       mcspi->ick = clk_get(&pdev->dev, "mcspi_ick");
+       mcspi->ick = clk_get(&pdev->dev, "ick");
        if (IS_ERR(mcspi->ick)) {
                dev_dbg(&pdev->dev, "can't get mcspi_ick\n");
                status = PTR_ERR(mcspi->ick);
                goto err1a;
        }
-       mcspi->fck = clk_get(&pdev->dev, "mcspi_fck");
+       mcspi->fck = clk_get(&pdev->dev, "fck");
        if (IS_ERR(mcspi->fck)) {
                dev_dbg(&pdev->dev, "can't get mcspi_fck\n");
                status = PTR_ERR(mcspi->fck);
index bab6ff061e9145a95dad6756d6cbc4b25e69e671..394b616eafe3ea865f2447f1f93293ba556c6bbd 100644 (file)
@@ -506,11 +506,12 @@ static int __init uwire_probe(struct platform_device *pdev)
 
        dev_set_drvdata(&pdev->dev, uwire);
 
-       uwire->ck = clk_get(&pdev->dev, "armxor_ck");
-       if (!uwire->ck || IS_ERR(uwire->ck)) {
-               dev_dbg(&pdev->dev, "no mpu_xor_clk ?\n");
+       uwire->ck = clk_get(&pdev->dev, "fck");
+       if (IS_ERR(uwire->ck)) {
+               status = PTR_ERR(uwire->ck);
+               dev_dbg(&pdev->dev, "no functional clock?\n");
                spi_master_put(master);
-               return -ENODEV;
+               return status;
        }
        clk_enable(uwire->ck);
 
index d0fc4ca2f656abb56d263284bde5a311ff2e6acd..d22fac27219a9ac358be569ed618cc21662645c6 100644 (file)
@@ -34,8 +34,6 @@
 #include <asm/delay.h>
 
 #include <mach/dma.h>
-#include <mach/hardware.h>
-#include <mach/pxa-regs.h>
 #include <mach/regs-ssp.h>
 #include <mach/ssp.h>
 #include <mach/pxa2xx_spi.h>
index fb3055f084b5f1a89aaf30efe19cd643b9ddef85..7cf74f8c2db1ea832848acc540399bf9c5d582e7 100644 (file)
@@ -28,8 +28,6 @@
 #include <linux/signal.h>
 #include <linux/platform_device.h>
 
-#include <mach/hardware.h>
-
 static struct clk *usb_host_clock;
 
 static void ep93xx_start_hc(struct device *dev)
index fb19803060cf6c35727c9f287f5668bf670ed969..41c27a44bd82bf5ec95e937cdea0485f610a58ed 100644 (file)
@@ -397,7 +397,7 @@ config FB_SA1100
 
 config FB_IMX
        tristate "Motorola i.MX LCD support"
-       depends on FB && ARM && ARCH_IMX
+       depends on FB && (ARCH_IMX || ARCH_MX2)
        select FB_CFB_FILLRECT
        select FB_CFB_COPYAREA
        select FB_CFB_IMAGEBLIT
@@ -2120,16 +2120,30 @@ config FB_PRE_INIT_FB
          the bootloader.
 
 config FB_MX3
-       tristate "MX3 Framebuffer support"
-       depends on FB && MX3_IPU
-       select FB_CFB_FILLRECT
-       select FB_CFB_COPYAREA
-       select FB_CFB_IMAGEBLIT
-       default y
-       help
-         This is a framebuffer device for the i.MX31 LCD Controller. So
-         far only synchronous displays are supported. If you plan to use
-         an LCD display with your i.MX31 system, say Y here.
+       tristate "MX3 Framebuffer support"
+       depends on FB && MX3_IPU
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       default y
+       help
+         This is a framebuffer device for the i.MX31 LCD Controller. So
+         far only synchronous displays are supported. If you plan to use
+         an LCD display with your i.MX31 system, say Y here.
+
+config FB_BROADSHEET
+       tristate "E-Ink Broadsheet/Epson S1D13521 controller support"
+       depends on FB
+       select FB_SYS_FILLRECT
+       select FB_SYS_COPYAREA
+       select FB_SYS_IMAGEBLIT
+       select FB_SYS_FOPS
+       select FB_DEFERRED_IO
+       help
+         This driver implements support for the E-Ink Broadsheet
+         controller. The release name for this device was Epson S1D13521
+         and could also have been called by other names when coupled with
+         a bridge adapter.
 
 source "drivers/video/omap/Kconfig"
 
index 2a998ca6181d0ce73c0637077634f0005fb1947c..bb265eca7d57c556c409f6ecf58e3cb76af9c4de 100644 (file)
@@ -106,6 +106,7 @@ obj-$(CONFIG_FB_PMAG_BA)      += pmag-ba-fb.o
 obj-$(CONFIG_FB_PMAGB_B)         += pmagb-b-fb.o
 obj-$(CONFIG_FB_MAXINE)                  += maxinefb.o
 obj-$(CONFIG_FB_METRONOME)        += metronomefb.o
+obj-$(CONFIG_FB_BROADSHEET)       += broadsheetfb.o
 obj-$(CONFIG_FB_S1D13XXX)        += s1d13xxxfb.o
 obj-$(CONFIG_FB_SH7760)                  += sh7760fb.o
 obj-$(CONFIG_FB_IMX)              += imxfb.o
@@ -132,7 +133,7 @@ obj-$(CONFIG_FB_VGA16)            += vga16fb.o
 obj-$(CONFIG_FB_OF)               += offb.o
 obj-$(CONFIG_FB_BF54X_LQ043)     += bf54x-lq043fb.o
 obj-$(CONFIG_FB_BFIN_T350MCQB)   += bfin-t350mcqb-fb.o
-obj-$(CONFIG_FB_MX3)              += mx3fb.o
+obj-$(CONFIG_FB_MX3)             += mx3fb.o
 
 # the test framebuffer is last
 obj-$(CONFIG_FB_VIRTUAL)          += vfb.o
diff --git a/drivers/video/broadsheetfb.c b/drivers/video/broadsheetfb.c
new file mode 100644 (file)
index 0000000..509cb92
--- /dev/null
@@ -0,0 +1,568 @@
+/*
+ * broadsheetfb.c -- FB driver for E-Ink Broadsheet controller
+ *
+ * Copyright (C) 2008, Jaya Kumar
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file COPYING in the main directory of this archive for
+ * more details.
+ *
+ * Layout is based on skeletonfb.c by James Simmons and Geert Uytterhoeven.
+ *
+ * This driver is written to be used with the Broadsheet display controller.
+ *
+ * It is intended to be architecture independent. A board specific driver
+ * must be used to perform all the physical IO interactions.
+ *
+ */
+
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/string.h>
+#include <linux/mm.h>
+#include <linux/slab.h>
+#include <linux/vmalloc.h>
+#include <linux/delay.h>
+#include <linux/interrupt.h>
+#include <linux/fb.h>
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/list.h>
+#include <linux/uaccess.h>
+
+#include <video/broadsheetfb.h>
+
+/* Display specific information */
+#define DPY_W 800
+#define DPY_H 600
+
+static struct fb_fix_screeninfo broadsheetfb_fix __devinitdata = {
+       .id =           "broadsheetfb",
+       .type =         FB_TYPE_PACKED_PIXELS,
+       .visual =       FB_VISUAL_STATIC_PSEUDOCOLOR,
+       .xpanstep =     0,
+       .ypanstep =     0,
+       .ywrapstep =    0,
+       .line_length =  DPY_W,
+       .accel =        FB_ACCEL_NONE,
+};
+
+static struct fb_var_screeninfo broadsheetfb_var __devinitdata = {
+       .xres           = DPY_W,
+       .yres           = DPY_H,
+       .xres_virtual   = DPY_W,
+       .yres_virtual   = DPY_H,
+       .bits_per_pixel = 8,
+       .grayscale      = 1,
+       .red =          { 0, 4, 0 },
+       .green =        { 0, 4, 0 },
+       .blue =         { 0, 4, 0 },
+       .transp =       { 0, 0, 0 },
+};
+
+/* main broadsheetfb functions */
+static void broadsheet_issue_data(struct broadsheetfb_par *par, u16 data)
+{
+       par->board->set_ctl(par, BS_WR, 0);
+       par->board->set_hdb(par, data);
+       par->board->set_ctl(par, BS_WR, 1);
+}
+
+static void broadsheet_issue_cmd(struct broadsheetfb_par *par, u16 data)
+{
+       par->board->set_ctl(par, BS_DC, 0);
+       broadsheet_issue_data(par, data);
+}
+
+static void broadsheet_send_command(struct broadsheetfb_par *par, u16 data)
+{
+       par->board->wait_for_rdy(par);
+
+       par->board->set_ctl(par, BS_CS, 0);
+       broadsheet_issue_cmd(par, data);
+       par->board->set_ctl(par, BS_DC, 1);
+       par->board->set_ctl(par, BS_CS, 1);
+}
+
+static void broadsheet_send_cmdargs(struct broadsheetfb_par *par, u16 cmd,
+                                       int argc, u16 *argv)
+{
+       int i;
+
+       par->board->wait_for_rdy(par);
+
+       par->board->set_ctl(par, BS_CS, 0);
+       broadsheet_issue_cmd(par, cmd);
+       par->board->set_ctl(par, BS_DC, 1);
+
+       for (i = 0; i < argc; i++)
+               broadsheet_issue_data(par, argv[i]);
+       par->board->set_ctl(par, BS_CS, 1);
+}
+
+static void broadsheet_burst_write(struct broadsheetfb_par *par, int size,
+                                       u16 *data)
+{
+       int i;
+       u16 tmp;
+
+       par->board->set_ctl(par, BS_CS, 0);
+       par->board->set_ctl(par, BS_DC, 1);
+
+       for (i = 0; i < size; i++) {
+               par->board->set_ctl(par, BS_WR, 0);
+               tmp = (data[i] & 0x0F) << 4;
+               tmp |= (data[i] & 0x0F00) << 4;
+               par->board->set_hdb(par, tmp);
+               par->board->set_ctl(par, BS_WR, 1);
+       }
+
+       par->board->set_ctl(par, BS_CS, 1);
+}
+
+static u16 broadsheet_get_data(struct broadsheetfb_par *par)
+{
+       u16 res;
+       /* wait for ready to go hi. (lo is busy) */
+       par->board->wait_for_rdy(par);
+
+       /* cs lo, dc lo for cmd, we lo for each data, db as usual */
+       par->board->set_ctl(par, BS_DC, 1);
+       par->board->set_ctl(par, BS_CS, 0);
+       par->board->set_ctl(par, BS_WR, 0);
+
+       res = par->board->get_hdb(par);
+
+       /* strobe wr */
+       par->board->set_ctl(par, BS_WR, 1);
+       par->board->set_ctl(par, BS_CS, 1);
+
+       return res;
+}
+
+static void broadsheet_write_reg(struct broadsheetfb_par *par, u16 reg,
+                                       u16 data)
+{
+       /* wait for ready to go hi. (lo is busy) */
+       par->board->wait_for_rdy(par);
+
+       /* cs lo, dc lo for cmd, we lo for each data, db as usual */
+       par->board->set_ctl(par, BS_CS, 0);
+
+       broadsheet_issue_cmd(par, BS_CMD_WR_REG);
+
+       par->board->set_ctl(par, BS_DC, 1);
+
+       broadsheet_issue_data(par, reg);
+       broadsheet_issue_data(par, data);
+
+       par->board->set_ctl(par, BS_CS, 1);
+}
+
+static u16 broadsheet_read_reg(struct broadsheetfb_par *par, u16 reg)
+{
+       broadsheet_send_command(par, reg);
+       msleep(100);
+       return broadsheet_get_data(par);
+}
+
+static void __devinit broadsheet_init_display(struct broadsheetfb_par *par)
+{
+       u16 args[5];
+
+       args[0] = DPY_W;
+       args[1] = DPY_H;
+       args[2] = (100 | (1 << 8) | (1 << 9)); /* sdcfg */
+       args[3] = 2; /* gdrv cfg */
+       args[4] = (4 | (1 << 7)); /* lut index format */
+       broadsheet_send_cmdargs(par, BS_CMD_INIT_DSPE_CFG, 5, args);
+
+       /* did the controller really set it? */
+       broadsheet_send_cmdargs(par, BS_CMD_INIT_DSPE_CFG, 5, args);
+
+       args[0] = 4; /* fsync len */
+       args[1] = (10 << 8) | 4; /* fend/fbegin len */
+       args[2] = 10; /* line sync len */
+       args[3] = (100 << 8) | 4; /* line end/begin len */
+       args[4] = 6; /* pixel clock cfg */
+       broadsheet_send_cmdargs(par, BS_CMD_INIT_DSPE_TMG, 5, args);
+
+       /* setup waveform */
+       args[0] = 0x886;
+       args[1] = 0;
+       broadsheet_send_cmdargs(par, BS_CMD_RD_WFM_INFO, 2, args);
+
+       broadsheet_send_command(par, BS_CMD_UPD_GDRV_CLR);
+
+       broadsheet_send_command(par, BS_CMD_WAIT_DSPE_TRG);
+
+       broadsheet_write_reg(par, 0x330, 0x84);
+
+       broadsheet_send_command(par, BS_CMD_WAIT_DSPE_TRG);
+
+       args[0] = (0x3 << 4);
+       broadsheet_send_cmdargs(par, BS_CMD_LD_IMG, 1, args);
+
+       args[0] = 0x154;
+       broadsheet_send_cmdargs(par, BS_CMD_WR_REG, 1, args);
+
+       broadsheet_burst_write(par, DPY_W*DPY_H/2,
+                               (u16 *) par->info->screen_base);
+
+       broadsheet_send_command(par, BS_CMD_LD_IMG_END);
+
+       args[0] = 0x4300;
+       broadsheet_send_cmdargs(par, BS_CMD_UPD_FULL, 1, args);
+
+       broadsheet_send_command(par, BS_CMD_WAIT_DSPE_TRG);
+
+       broadsheet_send_command(par, BS_CMD_WAIT_DSPE_FREND);
+
+       par->board->wait_for_rdy(par);
+}
+
+static void __devinit broadsheet_init(struct broadsheetfb_par *par)
+{
+       broadsheet_send_command(par, BS_CMD_INIT_SYS_RUN);
+       /* the controller needs a second */
+       msleep(1000);
+       broadsheet_init_display(par);
+}
+
+static void broadsheetfb_dpy_update_pages(struct broadsheetfb_par *par,
+                                               u16 y1, u16 y2)
+{
+       u16 args[5];
+       unsigned char *buf = (unsigned char *)par->info->screen_base;
+
+       /* y1 must be a multiple of 4 so drop the lower bits */
+       y1 &= 0xFFFC;
+       /* y2 must be a multiple of 4 , but - 1 so up the lower bits */
+       y2 |= 0x0003;
+
+       args[0] = 0x3 << 4;
+       args[1] = 0;
+       args[2] = y1;
+       args[3] = cpu_to_le16(par->info->var.xres);
+       args[4] = y2;
+       broadsheet_send_cmdargs(par, BS_CMD_LD_IMG_AREA, 5, args);
+
+       args[0] = 0x154;
+       broadsheet_send_cmdargs(par, BS_CMD_WR_REG, 1, args);
+
+       buf += y1 * par->info->var.xres;
+       broadsheet_burst_write(par, ((1 + y2 - y1) * par->info->var.xres)/2,
+                               (u16 *) buf);
+
+       broadsheet_send_command(par, BS_CMD_LD_IMG_END);
+
+       args[0] = 0x4300;
+       broadsheet_send_cmdargs(par, BS_CMD_UPD_FULL, 1, args);
+
+       broadsheet_send_command(par, BS_CMD_WAIT_DSPE_TRG);
+
+       broadsheet_send_command(par, BS_CMD_WAIT_DSPE_FREND);
+
+       par->board->wait_for_rdy(par);
+
+}
+
+static void broadsheetfb_dpy_update(struct broadsheetfb_par *par)
+{
+       u16 args[5];
+
+       args[0] = 0x3 << 4;
+       broadsheet_send_cmdargs(par, BS_CMD_LD_IMG, 1, args);
+
+       args[0] = 0x154;
+       broadsheet_send_cmdargs(par, BS_CMD_WR_REG, 1, args);
+       broadsheet_burst_write(par, DPY_W*DPY_H/2,
+                               (u16 *) par->info->screen_base);
+
+       broadsheet_send_command(par, BS_CMD_LD_IMG_END);
+
+       args[0] = 0x4300;
+       broadsheet_send_cmdargs(par, BS_CMD_UPD_FULL, 1, args);
+
+       broadsheet_send_command(par, BS_CMD_WAIT_DSPE_TRG);
+
+       broadsheet_send_command(par, BS_CMD_WAIT_DSPE_FREND);
+
+       par->board->wait_for_rdy(par);
+
+}
+
+/* this is called back from the deferred io workqueue */
+static void broadsheetfb_dpy_deferred_io(struct fb_info *info,
+                               struct list_head *pagelist)
+{
+       u16 y1 = 0, h = 0;
+       int prev_index = -1;
+       struct page *cur;
+       struct fb_deferred_io *fbdefio = info->fbdefio;
+       int h_inc;
+       u16 yres = info->var.yres;
+       u16 xres = info->var.xres;
+
+       /* height increment is fixed per page */
+       h_inc = DIV_ROUND_UP(PAGE_SIZE , xres);
+
+       /* walk the written page list and swizzle the data */
+       list_for_each_entry(cur, &fbdefio->pagelist, lru) {
+               if (prev_index < 0) {
+                       /* just starting so assign first page */
+                       y1 = (cur->index << PAGE_SHIFT) / xres;
+                       h = h_inc;
+               } else if ((prev_index + 1) == cur->index) {
+                       /* this page is consecutive so increase our height */
+                       h += h_inc;
+               } else {
+                       /* page not consecutive, issue previous update first */
+                       broadsheetfb_dpy_update_pages(info->par, y1, y1 + h);
+                       /* start over with our non consecutive page */
+                       y1 = (cur->index << PAGE_SHIFT) / xres;
+                       h = h_inc;
+               }
+               prev_index = cur->index;
+       }
+
+       /* if we still have any pages to update we do so now */
+       if (h >= yres) {
+               /* its a full screen update, just do it */
+               broadsheetfb_dpy_update(info->par);
+       } else {
+               broadsheetfb_dpy_update_pages(info->par, y1,
+                                               min((u16) (y1 + h), yres));
+       }
+}
+
+static void broadsheetfb_fillrect(struct fb_info *info,
+                                  const struct fb_fillrect *rect)
+{
+       struct broadsheetfb_par *par = info->par;
+
+       sys_fillrect(info, rect);
+
+       broadsheetfb_dpy_update(par);
+}
+
+static void broadsheetfb_copyarea(struct fb_info *info,
+                                  const struct fb_copyarea *area)
+{
+       struct broadsheetfb_par *par = info->par;
+
+       sys_copyarea(info, area);
+
+       broadsheetfb_dpy_update(par);
+}
+
+static void broadsheetfb_imageblit(struct fb_info *info,
+                               const struct fb_image *image)
+{
+       struct broadsheetfb_par *par = info->par;
+
+       sys_imageblit(info, image);
+
+       broadsheetfb_dpy_update(par);
+}
+
+/*
+ * this is the slow path from userspace. they can seek and write to
+ * the fb. it's inefficient to do anything less than a full screen draw
+ */
+static ssize_t broadsheetfb_write(struct fb_info *info, const char __user *buf,
+                               size_t count, loff_t *ppos)
+{
+       struct broadsheetfb_par *par = info->par;
+       unsigned long p = *ppos;
+       void *dst;
+       int err = 0;
+       unsigned long total_size;
+
+       if (info->state != FBINFO_STATE_RUNNING)
+               return -EPERM;
+
+       total_size = info->fix.smem_len;
+
+       if (p > total_size)
+               return -EFBIG;
+
+       if (count > total_size) {
+               err = -EFBIG;
+               count = total_size;
+       }
+
+       if (count + p > total_size) {
+               if (!err)
+                       err = -ENOSPC;
+
+               count = total_size - p;
+       }
+
+       dst = (void *)(info->screen_base + p);
+
+       if (copy_from_user(dst, buf, count))
+               err = -EFAULT;
+
+       if  (!err)
+               *ppos += count;
+
+       broadsheetfb_dpy_update(par);
+
+       return (err) ? err : count;
+}
+
+static struct fb_ops broadsheetfb_ops = {
+       .owner          = THIS_MODULE,
+       .fb_read        = fb_sys_read,
+       .fb_write       = broadsheetfb_write,
+       .fb_fillrect    = broadsheetfb_fillrect,
+       .fb_copyarea    = broadsheetfb_copyarea,
+       .fb_imageblit   = broadsheetfb_imageblit,
+};
+
+static struct fb_deferred_io broadsheetfb_defio = {
+       .delay          = HZ/4,
+       .deferred_io    = broadsheetfb_dpy_deferred_io,
+};
+
+static int __devinit broadsheetfb_probe(struct platform_device *dev)
+{
+       struct fb_info *info;
+       struct broadsheet_board *board;
+       int retval = -ENOMEM;
+       int videomemorysize;
+       unsigned char *videomemory;
+       struct broadsheetfb_par *par;
+       int i;
+
+       /* pick up board specific routines */
+       board = dev->dev.platform_data;
+       if (!board)
+               return -EINVAL;
+
+       /* try to count device specific driver, if can't, platform recalls */
+       if (!try_module_get(board->owner))
+               return -ENODEV;
+
+       info = framebuffer_alloc(sizeof(struct broadsheetfb_par), &dev->dev);
+       if (!info)
+               goto err;
+
+       videomemorysize = (DPY_W*DPY_H);
+       videomemory = vmalloc(videomemorysize);
+       if (!videomemory)
+               goto err_fb_rel;
+
+       memset(videomemory, 0, videomemorysize);
+
+       info->screen_base = (char *)videomemory;
+       info->fbops = &broadsheetfb_ops;
+
+       info->var = broadsheetfb_var;
+       info->fix = broadsheetfb_fix;
+       info->fix.smem_len = videomemorysize;
+       par = info->par;
+       par->info = info;
+       par->board = board;
+       par->write_reg = broadsheet_write_reg;
+       par->read_reg = broadsheet_read_reg;
+       init_waitqueue_head(&par->waitq);
+
+       info->flags = FBINFO_FLAG_DEFAULT;
+
+       info->fbdefio = &broadsheetfb_defio;
+       fb_deferred_io_init(info);
+
+       retval = fb_alloc_cmap(&info->cmap, 16, 0);
+       if (retval < 0) {
+               dev_err(&dev->dev, "Failed to allocate colormap\n");
+               goto err_vfree;
+       }
+
+       /* set cmap */
+       for (i = 0; i < 16; i++)
+               info->cmap.red[i] = (((2*i)+1)*(0xFFFF))/32;
+       memcpy(info->cmap.green, info->cmap.red, sizeof(u16)*16);
+       memcpy(info->cmap.blue, info->cmap.red, sizeof(u16)*16);
+
+       retval = par->board->setup_irq(info);
+       if (retval < 0)
+               goto err_cmap;
+
+       /* this inits the dpy */
+       retval = board->init(par);
+       if (retval < 0)
+               goto err_free_irq;
+
+       broadsheet_init(par);
+
+       retval = register_framebuffer(info);
+       if (retval < 0)
+               goto err_free_irq;
+       platform_set_drvdata(dev, info);
+
+       printk(KERN_INFO
+              "fb%d: Broadsheet frame buffer, using %dK of video memory\n",
+              info->node, videomemorysize >> 10);
+
+
+       return 0;
+
+err_free_irq:
+       board->cleanup(par);
+err_cmap:
+       fb_dealloc_cmap(&info->cmap);
+err_vfree:
+       vfree(videomemory);
+err_fb_rel:
+       framebuffer_release(info);
+err:
+       module_put(board->owner);
+       return retval;
+
+}
+
+static int __devexit broadsheetfb_remove(struct platform_device *dev)
+{
+       struct fb_info *info = platform_get_drvdata(dev);
+
+       if (info) {
+               struct broadsheetfb_par *par = info->par;
+               unregister_framebuffer(info);
+               fb_deferred_io_cleanup(info);
+               par->board->cleanup(par);
+               fb_dealloc_cmap(&info->cmap);
+               vfree((void *)info->screen_base);
+               module_put(par->board->owner);
+               framebuffer_release(info);
+       }
+       return 0;
+}
+
+static struct platform_driver broadsheetfb_driver = {
+       .probe  = broadsheetfb_probe,
+       .remove = broadsheetfb_remove,
+       .driver = {
+               .owner  = THIS_MODULE,
+               .name   = "broadsheetfb",
+       },
+};
+
+static int __init broadsheetfb_init(void)
+{
+       return platform_driver_register(&broadsheetfb_driver);
+}
+
+static void __exit broadsheetfb_exit(void)
+{
+       platform_driver_unregister(&broadsheetfb_driver);
+}
+
+module_init(broadsheetfb_init);
+module_exit(broadsheetfb_exit);
+
+MODULE_DESCRIPTION("fbdev driver for Broadsheet controller");
+MODULE_AUTHOR("Jaya Kumar");
+MODULE_LICENSE("GPL");
index 7a9e42e3a9a961e9c1957a6c7c6c10b7608118cb..51b373657aa23936fc650b5f4812dfbcddef03bb 100644 (file)
@@ -1425,7 +1425,7 @@ static void cyberpro_common_resume(struct cfb_info *cfb)
 
 #ifdef CONFIG_ARCH_SHARK
 
-#include <mach/hardware.h>
+#include <mach/framebuffer.h>
 
 static int __devinit cyberpro_vl_probe(void)
 {
index a24e680d2b9c0f90e3a82f443583b5a03951171d..2e940199fc892b40ceac2630019ef3cea9456c61 100644 (file)
@@ -993,6 +993,7 @@ static int i810_check_params(struct fb_var_screeninfo *var,
        struct i810fb_par *par = info->par;
        int line_length, vidmem, mode_valid = 0, retval = 0;
        u32 vyres = var->yres_virtual, vxres = var->xres_virtual;
+
        /*
         *  Memory limit
         */
@@ -1002,12 +1003,12 @@ static int i810_check_params(struct fb_var_screeninfo *var,
        if (vidmem > par->fb.size) {
                vyres = par->fb.size/line_length;
                if (vyres < var->yres) {
-                       vyres = yres;
+                       vyres = info->var.yres;
                        vxres = par->fb.size/vyres;
                        vxres /= var->bits_per_pixel >> 3;
                        line_length = get_line_length(par, vxres, 
                                                      var->bits_per_pixel);
-                       vidmem = line_length * yres;
+                       vidmem = line_length * info->var.yres;
                        if (vxres < var->xres) {
                                printk("i810fb: required video memory, "
                                       "%d bytes, for %dx%d-%d (virtual) "
index d58c68cd456eda0c9aea90c5f566cfab06fc4cdf..bd1cb75cd14b773191976c7b57e92578fadd7253 100644 (file)
@@ -14,7 +14,6 @@
  *     linux-arm-kernel@lists.arm.linux.org.uk
  */
 
-
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/errno.h>
 
 #define LCDC_SIZE      0x04
 #define SIZE_XMAX(x)   ((((x) >> 4) & 0x3f) << 20)
+
+#ifdef CONFIG_ARCH_MX1
 #define SIZE_YMAX(y)   ((y) & 0x1ff)
+#else
+#define SIZE_YMAX(y)   ((y) & 0x3ff)
+#endif
 
 #define LCDC_VPW       0x08
 #define VPW_VPW(x)     ((x) & 0x3ff)
 #define CPOS_CC0       (1<<30)
 #define CPOS_OP                (1<<28)
 #define CPOS_CXP(x)    (((x) & 3ff) << 16)
+
+#ifdef CONFIG_ARCH_MX1
 #define CPOS_CYP(y)    ((y) & 0x1ff)
+#else
+#define CPOS_CYP(y)    ((y) & 0x3ff)
+#endif
 
 #define LCDC_LCWHB     0x10
 #define LCWHB_BK_EN    (1<<31)
 #define LCWHB_BD(x)    ((x) & 0xff)
 
 #define LCDC_LCHCC     0x14
+
+#ifdef CONFIG_ARCH_MX1
 #define LCHCC_CUR_COL_R(r) (((r) & 0x1f) << 11)
 #define LCHCC_CUR_COL_G(g) (((g) & 0x3f) << 5)
 #define LCHCC_CUR_COL_B(b) ((b) & 0x1f)
+#else
+#define LCHCC_CUR_COL_R(r) (((r) & 0x3f) << 12)
+#define LCHCC_CUR_COL_G(g) (((g) & 0x3f) << 6)
+#define LCHCC_CUR_COL_B(b) ((b) & 0x3f)
+#endif
 
 #define LCDC_PCR       0x18
 
 /* bit fields in imxfb.h */
 
 #define LCDC_RMCR      0x34
+
+#ifdef CONFIG_ARCH_MX1
 #define RMCR_LCDC_EN   (1<<1)
+#else
+#define RMCR_LCDC_EN   0
+#endif
+
 #define RMCR_SELF_REF  (1<<0)
 
 #define LCDC_LCDICR    0x38
@@ -159,6 +181,17 @@ struct imxfb_info {
 #define MIN_XRES       64
 #define MIN_YRES       64
 
+/* Actually this really is 18bit support, the lowest 2 bits of each colour
+ * are unused in hardware. We claim to have 24bit support to make software
+ * like X work, which does not support 18bit.
+ */
+static struct imxfb_rgb def_rgb_18 = {
+       .red    = {.offset = 16, .length = 8,},
+       .green  = {.offset = 8, .length = 8,},
+       .blue   = {.offset = 0, .length = 8,},
+       .transp = {.offset = 0, .length = 0,},
+};
+
 static struct imxfb_rgb def_rgb_16_tft = {
        .red    = {.offset = 11, .length = 5,},
        .green  = {.offset = 5, .length = 6,},
@@ -286,6 +319,9 @@ static int imxfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
 
        pr_debug("var->bits_per_pixel=%d\n", var->bits_per_pixel);
        switch (var->bits_per_pixel) {
+       case 32:
+               rgb = &def_rgb_18;
+               break;
        case 16:
        default:
                if (readl(fbi->regs + LCDC_PCR) & PCR_TFT)
@@ -327,9 +363,7 @@ static int imxfb_set_par(struct fb_info *info)
        struct imxfb_info *fbi = info->par;
        struct fb_var_screeninfo *var = &info->var;
 
-       pr_debug("set_par\n");
-
-       if (var->bits_per_pixel == 16)
+       if (var->bits_per_pixel == 16 || var->bits_per_pixel == 32)
                info->fix.visual = FB_VISUAL_TRUECOLOR;
        else if (!fbi->cmap_static)
                info->fix.visual = FB_VISUAL_PSEUDOCOLOR;
@@ -354,10 +388,6 @@ static void imxfb_enable_controller(struct imxfb_info *fbi)
 {
        pr_debug("Enabling LCD controller\n");
 
-       /* initialize LCDC */
-       writel(readl(fbi->regs + LCDC_RMCR) & ~RMCR_LCDC_EN,
-               fbi->regs + LCDC_RMCR); /* just to be safe... */
-
        writel(fbi->screen_dma, fbi->regs + LCDC_SSA);
 
        /* physical screen start address            */
@@ -465,9 +495,9 @@ static int imxfb_activate_var(struct fb_var_screeninfo *var, struct fb_info *inf
                        info->fix.id, var->lower_margin);
 #endif
 
-       writel(HCR_H_WIDTH(var->hsync_len) |
-               HCR_H_WAIT_1(var->right_margin) |
-               HCR_H_WAIT_2(var->left_margin),
+       writel(HCR_H_WIDTH(var->hsync_len - 1) |
+               HCR_H_WAIT_1(var->right_margin - 1) |
+               HCR_H_WAIT_2(var->left_margin - 3),
                fbi->regs + LCDC_HCR);
 
        writel(VCR_V_WIDTH(var->vsync_len) |
@@ -650,6 +680,12 @@ static int __init imxfb_probe(struct platform_device *pdev)
                info->fix.smem_start = fbi->screen_dma;
        }
 
+       if (pdata->init) {
+               ret = pdata->init(fbi->pdev);
+               if (ret)
+                       goto failed_platform_init;
+       }
+
        /*
         * This makes sure that our colour bitfield
         * descriptors are correctly initialised.
@@ -674,6 +710,9 @@ static int __init imxfb_probe(struct platform_device *pdev)
 failed_register:
        fb_dealloc_cmap(&info->cmap);
 failed_cmap:
+       if (pdata->exit)
+               pdata->exit(fbi->pdev);
+failed_platform_init:
        if (!pdata->fixed_screen_cpu)
                dma_free_writecombine(&pdev->dev,fbi->map_size,fbi->map_cpu,
                        fbi->map_dma);
@@ -691,6 +730,7 @@ failed_init:
 
 static int __devexit imxfb_remove(struct platform_device *pdev)
 {
+       struct imx_fb_platform_data *pdata;
        struct fb_info *info = platform_get_drvdata(pdev);
        struct imxfb_info *fbi = info->par;
        struct resource *res;
@@ -701,6 +741,10 @@ static int __devexit imxfb_remove(struct platform_device *pdev)
 
        unregister_framebuffer(info);
 
+       pdata = pdev->dev.platform_data;
+       if (pdata->exit)
+               pdata->exit(fbi->pdev);
+
        fb_dealloc_cmap(&info->cmap);
        kfree(info->pseudo_palette);
        framebuffer_release(info);
index 8a75d05f4334ed4c56555f636864725a10f6f2af..fa1a512ce030d501999cacb3121d36909c89926a 100644 (file)
 #include <asm/io.h>
 #include <asm/uaccess.h>
 
-#define MX3FB_NAME             "mx3_sdc_fb"
+#define MX3FB_NAME             "mx3_sdc_fb"
 
-#define MX3FB_REG_OFFSET       0xB4
+#define MX3FB_REG_OFFSET       0xB4
 
 /* SDC Registers */
-#define SDC_COM_CONF           (0xB4 - MX3FB_REG_OFFSET)
-#define SDC_GW_CTRL            (0xB8 - MX3FB_REG_OFFSET)
-#define SDC_FG_POS             (0xBC - MX3FB_REG_OFFSET)
-#define SDC_BG_POS             (0xC0 - MX3FB_REG_OFFSET)
-#define SDC_CUR_POS            (0xC4 - MX3FB_REG_OFFSET)
-#define SDC_PWM_CTRL           (0xC8 - MX3FB_REG_OFFSET)
-#define SDC_CUR_MAP            (0xCC - MX3FB_REG_OFFSET)
-#define SDC_HOR_CONF           (0xD0 - MX3FB_REG_OFFSET)
-#define SDC_VER_CONF           (0xD4 - MX3FB_REG_OFFSET)
-#define SDC_SHARP_CONF_1       (0xD8 - MX3FB_REG_OFFSET)
-#define SDC_SHARP_CONF_2       (0xDC - MX3FB_REG_OFFSET)
+#define SDC_COM_CONF           (0xB4 - MX3FB_REG_OFFSET)
+#define SDC_GW_CTRL            (0xB8 - MX3FB_REG_OFFSET)
+#define SDC_FG_POS             (0xBC - MX3FB_REG_OFFSET)
+#define SDC_BG_POS             (0xC0 - MX3FB_REG_OFFSET)
+#define SDC_CUR_POS            (0xC4 - MX3FB_REG_OFFSET)
+#define SDC_PWM_CTRL           (0xC8 - MX3FB_REG_OFFSET)
+#define SDC_CUR_MAP            (0xCC - MX3FB_REG_OFFSET)
+#define SDC_HOR_CONF           (0xD0 - MX3FB_REG_OFFSET)
+#define SDC_VER_CONF           (0xD4 - MX3FB_REG_OFFSET)
+#define SDC_SHARP_CONF_1       (0xD8 - MX3FB_REG_OFFSET)
+#define SDC_SHARP_CONF_2       (0xDC - MX3FB_REG_OFFSET)
 
 /* Register bits */
-#define SDC_COM_TFT_COLOR      0x00000001UL
-#define SDC_COM_FG_EN          0x00000010UL
-#define SDC_COM_GWSEL          0x00000020UL
-#define SDC_COM_GLB_A          0x00000040UL
-#define SDC_COM_KEY_COLOR_G    0x00000080UL
-#define SDC_COM_BG_EN          0x00000200UL
-#define SDC_COM_SHARP          0x00001000UL
+#define SDC_COM_TFT_COLOR      0x00000001UL
+#define SDC_COM_FG_EN          0x00000010UL
+#define SDC_COM_GWSEL          0x00000020UL
+#define SDC_COM_GLB_A          0x00000040UL
+#define SDC_COM_KEY_COLOR_G    0x00000080UL
+#define SDC_COM_BG_EN          0x00000200UL
+#define SDC_COM_SHARP          0x00001000UL
 
-#define SDC_V_SYNC_WIDTH_L     0x00000001UL
+#define SDC_V_SYNC_WIDTH_L     0x00000001UL
 
 /* Display Interface registers */
-#define DI_DISP_IF_CONF                (0x0124 - MX3FB_REG_OFFSET)
-#define DI_DISP_SIG_POL                (0x0128 - MX3FB_REG_OFFSET)
-#define DI_SER_DISP1_CONF      (0x012C - MX3FB_REG_OFFSET)
-#define DI_SER_DISP2_CONF      (0x0130 - MX3FB_REG_OFFSET)
-#define DI_HSP_CLK_PER         (0x0134 - MX3FB_REG_OFFSET)
-#define DI_DISP0_TIME_CONF_1   (0x0138 - MX3FB_REG_OFFSET)
-#define DI_DISP0_TIME_CONF_2   (0x013C - MX3FB_REG_OFFSET)
-#define DI_DISP0_TIME_CONF_3   (0x0140 - MX3FB_REG_OFFSET)
-#define DI_DISP1_TIME_CONF_1   (0x0144 - MX3FB_REG_OFFSET)
-#define DI_DISP1_TIME_CONF_2   (0x0148 - MX3FB_REG_OFFSET)
-#define DI_DISP1_TIME_CONF_3   (0x014C - MX3FB_REG_OFFSET)
-#define DI_DISP2_TIME_CONF_1   (0x0150 - MX3FB_REG_OFFSET)
-#define DI_DISP2_TIME_CONF_2   (0x0154 - MX3FB_REG_OFFSET)
-#define DI_DISP2_TIME_CONF_3   (0x0158 - MX3FB_REG_OFFSET)
-#define DI_DISP3_TIME_CONF     (0x015C - MX3FB_REG_OFFSET)
-#define DI_DISP0_DB0_MAP       (0x0160 - MX3FB_REG_OFFSET)
-#define DI_DISP0_DB1_MAP       (0x0164 - MX3FB_REG_OFFSET)
-#define DI_DISP0_DB2_MAP       (0x0168 - MX3FB_REG_OFFSET)
-#define DI_DISP0_CB0_MAP       (0x016C - MX3FB_REG_OFFSET)
-#define DI_DISP0_CB1_MAP       (0x0170 - MX3FB_REG_OFFSET)
-#define DI_DISP0_CB2_MAP       (0x0174 - MX3FB_REG_OFFSET)
-#define DI_DISP1_DB0_MAP       (0x0178 - MX3FB_REG_OFFSET)
-#define DI_DISP1_DB1_MAP       (0x017C - MX3FB_REG_OFFSET)
-#define DI_DISP1_DB2_MAP       (0x0180 - MX3FB_REG_OFFSET)
-#define DI_DISP1_CB0_MAP       (0x0184 - MX3FB_REG_OFFSET)
-#define DI_DISP1_CB1_MAP       (0x0188 - MX3FB_REG_OFFSET)
-#define DI_DISP1_CB2_MAP       (0x018C - MX3FB_REG_OFFSET)
-#define DI_DISP2_DB0_MAP       (0x0190 - MX3FB_REG_OFFSET)
-#define DI_DISP2_DB1_MAP       (0x0194 - MX3FB_REG_OFFSET)
-#define DI_DISP2_DB2_MAP       (0x0198 - MX3FB_REG_OFFSET)
-#define DI_DISP2_CB0_MAP       (0x019C - MX3FB_REG_OFFSET)
-#define DI_DISP2_CB1_MAP       (0x01A0 - MX3FB_REG_OFFSET)
-#define DI_DISP2_CB2_MAP       (0x01A4 - MX3FB_REG_OFFSET)
-#define DI_DISP3_B0_MAP                (0x01A8 - MX3FB_REG_OFFSET)
-#define DI_DISP3_B1_MAP                (0x01AC - MX3FB_REG_OFFSET)
-#define DI_DISP3_B2_MAP                (0x01B0 - MX3FB_REG_OFFSET)
-#define DI_DISP_ACC_CC         (0x01B4 - MX3FB_REG_OFFSET)
-#define DI_DISP_LLA_CONF       (0x01B8 - MX3FB_REG_OFFSET)
-#define DI_DISP_LLA_DATA       (0x01BC - MX3FB_REG_OFFSET)
+#define DI_DISP_IF_CONF                (0x0124 - MX3FB_REG_OFFSET)
+#define DI_DISP_SIG_POL                (0x0128 - MX3FB_REG_OFFSET)
+#define DI_SER_DISP1_CONF      (0x012C - MX3FB_REG_OFFSET)
+#define DI_SER_DISP2_CONF      (0x0130 - MX3FB_REG_OFFSET)
+#define DI_HSP_CLK_PER         (0x0134 - MX3FB_REG_OFFSET)
+#define DI_DISP0_TIME_CONF_1   (0x0138 - MX3FB_REG_OFFSET)
+#define DI_DISP0_TIME_CONF_2   (0x013C - MX3FB_REG_OFFSET)
+#define DI_DISP0_TIME_CONF_3   (0x0140 - MX3FB_REG_OFFSET)
+#define DI_DISP1_TIME_CONF_1   (0x0144 - MX3FB_REG_OFFSET)
+#define DI_DISP1_TIME_CONF_2   (0x0148 - MX3FB_REG_OFFSET)
+#define DI_DISP1_TIME_CONF_3   (0x014C - MX3FB_REG_OFFSET)
+#define DI_DISP2_TIME_CONF_1   (0x0150 - MX3FB_REG_OFFSET)
+#define DI_DISP2_TIME_CONF_2   (0x0154 - MX3FB_REG_OFFSET)
+#define DI_DISP2_TIME_CONF_3   (0x0158 - MX3FB_REG_OFFSET)
+#define DI_DISP3_TIME_CONF     (0x015C - MX3FB_REG_OFFSET)
+#define DI_DISP0_DB0_MAP       (0x0160 - MX3FB_REG_OFFSET)
+#define DI_DISP0_DB1_MAP       (0x0164 - MX3FB_REG_OFFSET)
+#define DI_DISP0_DB2_MAP       (0x0168 - MX3FB_REG_OFFSET)
+#define DI_DISP0_CB0_MAP       (0x016C - MX3FB_REG_OFFSET)
+#define DI_DISP0_CB1_MAP       (0x0170 - MX3FB_REG_OFFSET)
+#define DI_DISP0_CB2_MAP       (0x0174 - MX3FB_REG_OFFSET)
+#define DI_DISP1_DB0_MAP       (0x0178 - MX3FB_REG_OFFSET)
+#define DI_DISP1_DB1_MAP       (0x017C - MX3FB_REG_OFFSET)
+#define DI_DISP1_DB2_MAP       (0x0180 - MX3FB_REG_OFFSET)
+#define DI_DISP1_CB0_MAP       (0x0184 - MX3FB_REG_OFFSET)
+#define DI_DISP1_CB1_MAP       (0x0188 - MX3FB_REG_OFFSET)
+#define DI_DISP1_CB2_MAP       (0x018C - MX3FB_REG_OFFSET)
+#define DI_DISP2_DB0_MAP       (0x0190 - MX3FB_REG_OFFSET)
+#define DI_DISP2_DB1_MAP       (0x0194 - MX3FB_REG_OFFSET)
+#define DI_DISP2_DB2_MAP       (0x0198 - MX3FB_REG_OFFSET)
+#define DI_DISP2_CB0_MAP       (0x019C - MX3FB_REG_OFFSET)
+#define DI_DISP2_CB1_MAP       (0x01A0 - MX3FB_REG_OFFSET)
+#define DI_DISP2_CB2_MAP       (0x01A4 - MX3FB_REG_OFFSET)
+#define DI_DISP3_B0_MAP                (0x01A8 - MX3FB_REG_OFFSET)
+#define DI_DISP3_B1_MAP                (0x01AC - MX3FB_REG_OFFSET)
+#define DI_DISP3_B2_MAP                (0x01B0 - MX3FB_REG_OFFSET)
+#define DI_DISP_ACC_CC         (0x01B4 - MX3FB_REG_OFFSET)
+#define DI_DISP_LLA_CONF       (0x01B8 - MX3FB_REG_OFFSET)
+#define DI_DISP_LLA_DATA       (0x01BC - MX3FB_REG_OFFSET)
 
 /* DI_DISP_SIG_POL bits */
-#define DI_D3_VSYNC_POL_SHIFT          28
-#define DI_D3_HSYNC_POL_SHIFT          27
-#define DI_D3_DRDY_SHARP_POL_SHIFT     26
-#define DI_D3_CLK_POL_SHIFT            25
-#define DI_D3_DATA_POL_SHIFT           24
+#define DI_D3_VSYNC_POL_SHIFT          28
+#define DI_D3_HSYNC_POL_SHIFT          27
+#define DI_D3_DRDY_SHARP_POL_SHIFT     26
+#define DI_D3_CLK_POL_SHIFT            25
+#define DI_D3_DATA_POL_SHIFT           24
 
 /* DI_DISP_IF_CONF bits */
-#define DI_D3_CLK_IDLE_SHIFT           26
-#define DI_D3_CLK_SEL_SHIFT            25
-#define DI_D3_DATAMSK_SHIFT            24
+#define DI_D3_CLK_IDLE_SHIFT           26
+#define DI_D3_CLK_SEL_SHIFT            25
+#define DI_D3_DATAMSK_SHIFT            24
 
 enum ipu_panel {
-       IPU_PANEL_SHARP_TFT,
-       IPU_PANEL_TFT,
+       IPU_PANEL_SHARP_TFT,
+       IPU_PANEL_TFT,
 };
 
 struct ipu_di_signal_cfg {
-       unsigned datamask_en:1;
-       unsigned clksel_en:1;
-       unsigned clkidle_en:1;
-       unsigned data_pol:1;    /* true = inverted */
-       unsigned clk_pol:1;     /* true = rising edge */
-       unsigned enable_pol:1;
-       unsigned Hsync_pol:1;   /* true = active high */
-       unsigned Vsync_pol:1;
+       unsigned datamask_en:1;
+       unsigned clksel_en:1;
+       unsigned clkidle_en:1;
+       unsigned data_pol:1;    /* true = inverted */
+       unsigned clk_pol:1;     /* true = rising edge */
+       unsigned enable_pol:1;
+       unsigned Hsync_pol:1;   /* true = active high */
+       unsigned Vsync_pol:1;
 };
 
 static const struct fb_videomode mx3fb_modedb[] = {
-       {
-               /* 240x320 @ 60 Hz */
-               .name           = "Sharp-QVGA",
-               .refresh        = 60,
-               .xres           = 240,
-               .yres           = 320,
-               .pixclock       = 185925,
-               .left_margin    = 9,
-               .right_margin   = 16,
-               .upper_margin   = 7,
-               .lower_margin   = 9,
-               .hsync_len      = 1,
-               .vsync_len      = 1,
-               .sync           = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_SHARP_MODE |
-                                 FB_SYNC_CLK_INVERT | FB_SYNC_DATA_INVERT |
-                                 FB_SYNC_CLK_IDLE_EN,
-               .vmode          = FB_VMODE_NONINTERLACED,
-               .flag           = 0,
-       }, {
-               /* 240x33 @ 60 Hz */
-               .name           = "Sharp-CLI",
-               .refresh        = 60,
-               .xres           = 240,
-               .yres           = 33,
-               .pixclock       = 185925,
-               .left_margin    = 9,
-               .right_margin   = 16,
-               .upper_margin   = 7,
-               .lower_margin   = 9 + 287,
-               .hsync_len      = 1,
-               .vsync_len      = 1,
-               .sync           = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_SHARP_MODE |
-                                 FB_SYNC_CLK_INVERT | FB_SYNC_DATA_INVERT |
-                                 FB_SYNC_CLK_IDLE_EN,
-               .vmode          = FB_VMODE_NONINTERLACED,
-               .flag           = 0,
-       }, {
-               /* 640x480 @ 60 Hz */
-               .name           = "NEC-VGA",
-               .refresh        = 60,
-               .xres           = 640,
-               .yres           = 480,
-               .pixclock       = 38255,
-               .left_margin    = 144,
-               .right_margin   = 0,
-               .upper_margin   = 34,
-               .lower_margin   = 40,
-               .hsync_len      = 1,
-               .vsync_len      = 1,
-               .sync           = FB_SYNC_VERT_HIGH_ACT | FB_SYNC_OE_ACT_HIGH,
-               .vmode          = FB_VMODE_NONINTERLACED,
-               .flag           = 0,
-       }, {
-               /* NTSC TV output */
-               .name           = "TV-NTSC",
-               .refresh        = 60,
-               .xres           = 640,
-               .yres           = 480,
-               .pixclock       = 37538,
-               .left_margin    = 38,
-               .right_margin   = 858 - 640 - 38 - 3,
-               .upper_margin   = 36,
-               .lower_margin   = 518 - 480 - 36 - 1,
-               .hsync_len      = 3,
-               .vsync_len      = 1,
-               .sync           = 0,
-               .vmode          = FB_VMODE_NONINTERLACED,
-               .flag           = 0,
-       }, {
-               /* PAL TV output */
-               .name           = "TV-PAL",
-               .refresh        = 50,
-               .xres           = 640,
-               .yres           = 480,
-               .pixclock       = 37538,
-               .left_margin    = 38,
-               .right_margin   = 960 - 640 - 38 - 32,
-               .upper_margin   = 32,
-               .lower_margin   = 555 - 480 - 32 - 3,
-               .hsync_len      = 32,
-               .vsync_len      = 3,
-               .sync           = 0,
-               .vmode          = FB_VMODE_NONINTERLACED,
-               .flag           = 0,
-       }, {
-               /* TV output VGA mode, 640x480 @ 65 Hz */
-               .name           = "TV-VGA",
-               .refresh        = 60,
-               .xres           = 640,
-               .yres           = 480,
-               .pixclock       = 40574,
-               .left_margin    = 35,
-               .right_margin   = 45,
-               .upper_margin   = 9,
-               .lower_margin   = 1,
-               .hsync_len      = 46,
-               .vsync_len      = 5,
-               .sync           = 0,
-               .vmode          = FB_VMODE_NONINTERLACED,
-               .flag           = 0,
-       },
+       {
+               /* 240x320 @ 60 Hz */
+               .name           = "Sharp-QVGA",
+               .refresh        = 60,
+               .xres           = 240,
+               .yres           = 320,
+               .pixclock       = 185925,
+               .left_margin    = 9,
+               .right_margin   = 16,
+               .upper_margin   = 7,
+               .lower_margin   = 9,
+               .hsync_len      = 1,
+               .vsync_len      = 1,
+               .sync           = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_SHARP_MODE |
+                                 FB_SYNC_CLK_INVERT | FB_SYNC_DATA_INVERT |
+                                 FB_SYNC_CLK_IDLE_EN,
+               .vmode          = FB_VMODE_NONINTERLACED,
+               .flag           = 0,
+       }, {
+               /* 240x33 @ 60 Hz */
+               .name           = "Sharp-CLI",
+               .refresh        = 60,
+               .xres           = 240,
+               .yres           = 33,
+               .pixclock       = 185925,
+               .left_margin    = 9,
+               .right_margin   = 16,
+               .upper_margin   = 7,
+               .lower_margin   = 9 + 287,
+               .hsync_len      = 1,
+               .vsync_len      = 1,
+               .sync           = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_SHARP_MODE |
+                                 FB_SYNC_CLK_INVERT | FB_SYNC_DATA_INVERT |
+                                 FB_SYNC_CLK_IDLE_EN,
+               .vmode          = FB_VMODE_NONINTERLACED,
+               .flag           = 0,
+       }, {
+               /* 640x480 @ 60 Hz */
+               .name           = "NEC-VGA",
+               .refresh        = 60,
+               .xres           = 640,
+               .yres           = 480,
+               .pixclock       = 38255,
+               .left_margin    = 144,
+               .right_margin   = 0,
+               .upper_margin   = 34,
+               .lower_margin   = 40,
+               .hsync_len      = 1,
+               .vsync_len      = 1,
+               .sync           = FB_SYNC_VERT_HIGH_ACT | FB_SYNC_OE_ACT_HIGH,
+               .vmode          = FB_VMODE_NONINTERLACED,
+               .flag           = 0,
+       }, {
+               /* NTSC TV output */
+               .name           = "TV-NTSC",
+               .refresh        = 60,
+               .xres           = 640,
+               .yres           = 480,
+               .pixclock       = 37538,
+               .left_margin    = 38,
+               .right_margin   = 858 - 640 - 38 - 3,
+               .upper_margin   = 36,
+               .lower_margin   = 518 - 480 - 36 - 1,
+               .hsync_len      = 3,
+               .vsync_len      = 1,
+               .sync           = 0,
+               .vmode          = FB_VMODE_NONINTERLACED,
+               .flag           = 0,
+       }, {
+               /* PAL TV output */
+               .name           = "TV-PAL",
+               .refresh        = 50,
+               .xres           = 640,
+               .yres           = 480,
+               .pixclock       = 37538,
+               .left_margin    = 38,
+               .right_margin   = 960 - 640 - 38 - 32,
+               .upper_margin   = 32,
+               .lower_margin   = 555 - 480 - 32 - 3,
+               .hsync_len      = 32,
+               .vsync_len      = 3,
+               .sync           = 0,
+               .vmode          = FB_VMODE_NONINTERLACED,
+               .flag           = 0,
+       }, {
+               /* TV output VGA mode, 640x480 @ 65 Hz */
+               .name           = "TV-VGA",
+               .refresh        = 60,
+               .xres           = 640,
+               .yres           = 480,
+               .pixclock       = 40574,
+               .left_margin    = 35,
+               .right_margin   = 45,
+               .upper_margin   = 9,
+               .lower_margin   = 1,
+               .hsync_len      = 46,
+               .vsync_len      = 5,
+               .sync           = 0,
+               .vmode          = FB_VMODE_NONINTERLACED,
+               .flag           = 0,
+       },
 };
 
 struct mx3fb_data {
-       struct fb_info          *fbi;
-       int                     backlight_level;
-       void __iomem            *reg_base;
-       spinlock_t              lock;
-       struct device           *dev;
-
-       uint32_t                h_start_width;
-       uint32_t                v_start_width;
+       struct fb_info          *fbi;
+       int                     backlight_level;
+       void __iomem            *reg_base;
+       spinlock_t              lock;
+       struct device           *dev;
+
+       uint32_t                h_start_width;
+       uint32_t                v_start_width;
 };
 
 struct dma_chan_request {
-       struct mx3fb_data       *mx3fb;
-       enum ipu_channel        id;
+       struct mx3fb_data       *mx3fb;
+       enum ipu_channel        id;
 };
 
 /* MX3 specific framebuffer information. */
 struct mx3fb_info {
-       int                             blank;
-       enum ipu_channel                ipu_ch;
-       uint32_t                        cur_ipu_buf;
+       int                             blank;
+       enum ipu_channel                ipu_ch;
+       uint32_t                        cur_ipu_buf;
 
-       u32                             pseudo_palette[16];
+       u32                             pseudo_palette[16];
 
-       struct completion               flip_cmpl;
-       struct mutex                    mutex;  /* Protects fb-ops */
-       struct mx3fb_data               *mx3fb;
-       struct idmac_channel            *idmac_channel;
-       struct dma_async_tx_descriptor  *txd;
-       dma_cookie_t                    cookie;
-       struct scatterlist              sg[2];
+       struct completion               flip_cmpl;
+       struct mutex                    mutex;  /* Protects fb-ops */
+       struct mx3fb_data               *mx3fb;
+       struct idmac_channel            *idmac_channel;
+       struct dma_async_tx_descriptor  *txd;
+       dma_cookie_t                    cookie;
+       struct scatterlist              sg[2];
 
-       u32                             sync;   /* preserve var->sync flags */
+       u32                             sync;   /* preserve var->sync flags */
 };
 
 static void mx3fb_dma_done(void *);
@@ -278,389 +278,389 @@ static unsigned long default_bpp = 16;
 
 static u32 mx3fb_read_reg(struct mx3fb_data *mx3fb, unsigned long reg)
 {
-       return __raw_readl(mx3fb->reg_base + reg);
+       return __raw_readl(mx3fb->reg_base + reg);
 }
 
 static void mx3fb_write_reg(struct mx3fb_data *mx3fb, u32 value, unsigned long reg)
 {
-       __raw_writel(value, mx3fb->reg_base + reg);
+       __raw_writel(value, mx3fb->reg_base + reg);
 }
 
 static const uint32_t di_mappings[] = {
-       0x1600AAAA, 0x00E05555, 0x00070000, 3,  /* RGB888 */
-       0x0005000F, 0x000B000F, 0x0011000F, 1,  /* RGB666 */
-       0x0011000F, 0x000B000F, 0x0005000F, 1,  /* BGR666 */
-       0x0004003F, 0x000A000F, 0x000F003F, 1   /* RGB565 */
+       0x1600AAAA, 0x00E05555, 0x00070000, 3,  /* RGB888 */
+       0x0005000F, 0x000B000F, 0x0011000F, 1,  /* RGB666 */
+       0x0011000F, 0x000B000F, 0x0005000F, 1,  /* BGR666 */
+       0x0004003F, 0x000A000F, 0x000F003F, 1   /* RGB565 */
 };
 
 static void sdc_fb_init(struct mx3fb_info *fbi)
 {
-       struct mx3fb_data *mx3fb = fbi->mx3fb;
-       uint32_t reg;
+       struct mx3fb_data *mx3fb = fbi->mx3fb;
+       uint32_t reg;
 
-       reg = mx3fb_read_reg(mx3fb, SDC_COM_CONF);
+       reg = mx3fb_read_reg(mx3fb, SDC_COM_CONF);
 
-       mx3fb_write_reg(mx3fb, reg | SDC_COM_BG_EN, SDC_COM_CONF);
+       mx3fb_write_reg(mx3fb, reg | SDC_COM_BG_EN, SDC_COM_CONF);
 }
 
 /* Returns enabled flag before uninit */
 static uint32_t sdc_fb_uninit(struct mx3fb_info *fbi)
 {
-       struct mx3fb_data *mx3fb = fbi->mx3fb;
-       uint32_t reg;
+       struct mx3fb_data *mx3fb = fbi->mx3fb;
+       uint32_t reg;
 
-       reg = mx3fb_read_reg(mx3fb, SDC_COM_CONF);
+       reg = mx3fb_read_reg(mx3fb, SDC_COM_CONF);
 
-       mx3fb_write_reg(mx3fb, reg & ~SDC_COM_BG_EN, SDC_COM_CONF);
+       mx3fb_write_reg(mx3fb, reg & ~SDC_COM_BG_EN, SDC_COM_CONF);
 
-       return reg & SDC_COM_BG_EN;
+       return reg & SDC_COM_BG_EN;
 }
 
 static void sdc_enable_channel(struct mx3fb_info *mx3_fbi)
 {
-       struct mx3fb_data *mx3fb = mx3_fbi->mx3fb;
-       struct idmac_channel *ichan = mx3_fbi->idmac_channel;
-       struct dma_chan *dma_chan = &ichan->dma_chan;
-       unsigned long flags;
-       dma_cookie_t cookie;
-
-       dev_dbg(mx3fb->dev, "mx3fbi %p, desc %p, sg %p\n", mx3_fbi,
-               to_tx_desc(mx3_fbi->txd), to_tx_desc(mx3_fbi->txd)->sg);
-
-       /* This enables the channel */
-       if (mx3_fbi->cookie < 0) {
-               mx3_fbi->txd = dma_chan->device->device_prep_slave_sg(dma_chan,
-                     &mx3_fbi->sg[0], 1, DMA_TO_DEVICE, DMA_PREP_INTERRUPT);
-               if (!mx3_fbi->txd) {
-                       dev_err(mx3fb->dev, "Cannot allocate descriptor on %d\n",
-                               dma_chan->chan_id);
-                       return;
-               }
-
-               mx3_fbi->txd->callback_param    = mx3_fbi->txd;
-               mx3_fbi->txd->callback          = mx3fb_dma_done;
-
-               cookie = mx3_fbi->txd->tx_submit(mx3_fbi->txd);
-               dev_dbg(mx3fb->dev, "%d: Submit %p #%d [%c]\n", __LINE__,
-                      mx3_fbi->txd, cookie, list_empty(&ichan->queue) ? '-' : '+');
-       } else {
-               if (!mx3_fbi->txd || !mx3_fbi->txd->tx_submit) {
-                       dev_err(mx3fb->dev, "Cannot enable channel %d\n",
-                               dma_chan->chan_id);
-                       return;
-               }
-
-               /* Just re-activate the same buffer */
-               dma_async_issue_pending(dma_chan);
-               cookie = mx3_fbi->cookie;
-               dev_dbg(mx3fb->dev, "%d: Re-submit %p #%d [%c]\n", __LINE__,
-                      mx3_fbi->txd, cookie, list_empty(&ichan->queue) ? '-' : '+');
-       }
-
-       if (cookie >= 0) {
-               spin_lock_irqsave(&mx3fb->lock, flags);
-               sdc_fb_init(mx3_fbi);
-               mx3_fbi->cookie = cookie;
-               spin_unlock_irqrestore(&mx3fb->lock, flags);
-       }
-
-       /*
-        * Attention! Without this msleep the channel keeps generating
-        * interrupts. Next sdc_set_brightness() is going to be called
-        * from mx3fb_blank().
-        */
-       msleep(2);
+       struct mx3fb_data *mx3fb = mx3_fbi->mx3fb;
+       struct idmac_channel *ichan = mx3_fbi->idmac_channel;
+       struct dma_chan *dma_chan = &ichan->dma_chan;
+       unsigned long flags;
+       dma_cookie_t cookie;
+
+       dev_dbg(mx3fb->dev, "mx3fbi %p, desc %p, sg %p\n", mx3_fbi,
+               to_tx_desc(mx3_fbi->txd), to_tx_desc(mx3_fbi->txd)->sg);
+
+       /* This enables the channel */
+       if (mx3_fbi->cookie < 0) {
+               mx3_fbi->txd = dma_chan->device->device_prep_slave_sg(dma_chan,
+                     &mx3_fbi->sg[0], 1, DMA_TO_DEVICE, DMA_PREP_INTERRUPT);
+               if (!mx3_fbi->txd) {
+                       dev_err(mx3fb->dev, "Cannot allocate descriptor on %d\n",
+                               dma_chan->chan_id);
+                       return;
+               }
+
+               mx3_fbi->txd->callback_param    = mx3_fbi->txd;
+               mx3_fbi->txd->callback          = mx3fb_dma_done;
+
+               cookie = mx3_fbi->txd->tx_submit(mx3_fbi->txd);
+               dev_dbg(mx3fb->dev, "%d: Submit %p #%d [%c]\n", __LINE__,
+                      mx3_fbi->txd, cookie, list_empty(&ichan->queue) ? '-' : '+');
+       } else {
+               if (!mx3_fbi->txd || !mx3_fbi->txd->tx_submit) {
+                       dev_err(mx3fb->dev, "Cannot enable channel %d\n",
+                               dma_chan->chan_id);
+                       return;
+               }
+
+               /* Just re-activate the same buffer */
+               dma_async_issue_pending(dma_chan);
+               cookie = mx3_fbi->cookie;
+               dev_dbg(mx3fb->dev, "%d: Re-submit %p #%d [%c]\n", __LINE__,
+                      mx3_fbi->txd, cookie, list_empty(&ichan->queue) ? '-' : '+');
+       }
+
+       if (cookie >= 0) {
+               spin_lock_irqsave(&mx3fb->lock, flags);
+               sdc_fb_init(mx3_fbi);
+               mx3_fbi->cookie = cookie;
+               spin_unlock_irqrestore(&mx3fb->lock, flags);
+       }
+
+       /*
+        * Attention! Without this msleep the channel keeps generating
+        * interrupts. Next sdc_set_brightness() is going to be called
+        * from mx3fb_blank().
+        */
+       msleep(2);
 }
 
 static void sdc_disable_channel(struct mx3fb_info *mx3_fbi)
 {
-       struct mx3fb_data *mx3fb = mx3_fbi->mx3fb;
-       uint32_t enabled;
-       unsigned long flags;
+       struct mx3fb_data *mx3fb = mx3_fbi->mx3fb;
+       uint32_t enabled;
+       unsigned long flags;
 
-       spin_lock_irqsave(&mx3fb->lock, flags);
+       spin_lock_irqsave(&mx3fb->lock, flags);
 
-       enabled = sdc_fb_uninit(mx3_fbi);
+       enabled = sdc_fb_uninit(mx3_fbi);
 
-       spin_unlock_irqrestore(&mx3fb->lock, flags);
+       spin_unlock_irqrestore(&mx3fb->lock, flags);
 
-       mx3_fbi->txd->chan->device->device_terminate_all(mx3_fbi->txd->chan);
-       mx3_fbi->txd = NULL;
-       mx3_fbi->cookie = -EINVAL;
+       mx3_fbi->txd->chan->device->device_terminate_all(mx3_fbi->txd->chan);
+       mx3_fbi->txd = NULL;
+       mx3_fbi->cookie = -EINVAL;
 }
 
 /**
  * sdc_set_window_pos() - set window position of the respective plane.
- * @mx3fb:     mx3fb context.
- * @channel:   IPU DMAC channel ID.
- * @x_pos:     X coordinate relative to the top left corner to place window at.
- * @y_pos:     Y coordinate relative to the top left corner to place window at.
- * @return:    0 on success or negative error code on failure.
+ * @mx3fb:     mx3fb context.
+ * @channel:   IPU DMAC channel ID.
+ * @x_pos:     X coordinate relative to the top left corner to place window at.
+ * @y_pos:     Y coordinate relative to the top left corner to place window at.
+ * @return:    0 on success or negative error code on failure.
  */
 static int sdc_set_window_pos(struct mx3fb_data *mx3fb, enum ipu_channel channel,
-                             int16_t x_pos, int16_t y_pos)
+                             int16_t x_pos, int16_t y_pos)
 {
-       x_pos += mx3fb->h_start_width;
-       y_pos += mx3fb->v_start_width;
+       x_pos += mx3fb->h_start_width;
+       y_pos += mx3fb->v_start_width;
 
-       if (channel != IDMAC_SDC_0)
-               return -EINVAL;
+       if (channel != IDMAC_SDC_0)
+               return -EINVAL;
 
-       mx3fb_write_reg(mx3fb, (x_pos << 16) | y_pos, SDC_BG_POS);
-       return 0;
+       mx3fb_write_reg(mx3fb, (x_pos << 16) | y_pos, SDC_BG_POS);
+       return 0;
 }
 
 /**
  * sdc_init_panel() - initialize a synchronous LCD panel.
- * @mx3fb:             mx3fb context.
- * @panel:             panel type.
- * @pixel_clk:         desired pixel clock frequency in Hz.
- * @width:             width of panel in pixels.
- * @height:            height of panel in pixels.
- * @pixel_fmt:         pixel format of buffer as FOURCC ASCII code.
- * @h_start_width:     number of pixel clocks between the HSYNC signal pulse
- *                     and the start of valid data.
- * @h_sync_width:      width of the HSYNC signal in units of pixel clocks.
- * @h_end_width:       number of pixel clocks between the end of valid data
- *                     and the HSYNC signal for next line.
- * @v_start_width:     number of lines between the VSYNC signal pulse and the
- *                     start of valid data.
- * @v_sync_width:      width of the VSYNC signal in units of lines
- * @v_end_width:       number of lines between the end of valid data and the
- *                     VSYNC signal for next frame.
- * @sig:               bitfield of signal polarities for LCD interface.
- * @return:            0 on success or negative error code on failure.
+ * @mx3fb:             mx3fb context.
+ * @panel:             panel type.
+ * @pixel_clk:         desired pixel clock frequency in Hz.
+ * @width:             width of panel in pixels.
+ * @height:            height of panel in pixels.
+ * @pixel_fmt:         pixel format of buffer as FOURCC ASCII code.
+ * @h_start_width:     number of pixel clocks between the HSYNC signal pulse
+ *                     and the start of valid data.
+ * @h_sync_width:      width of the HSYNC signal in units of pixel clocks.
+ * @h_end_width:       number of pixel clocks between the end of valid data
+ *                     and the HSYNC signal for next line.
+ * @v_start_width:     number of lines between the VSYNC signal pulse and the
+ *                     start of valid data.
+ * @v_sync_width:      width of the VSYNC signal in units of lines
+ * @v_end_width:       number of lines between the end of valid data and the
+ *                     VSYNC signal for next frame.
+ * @sig:               bitfield of signal polarities for LCD interface.
+ * @return:            0 on success or negative error code on failure.
  */
 static int sdc_init_panel(struct mx3fb_data *mx3fb, enum ipu_panel panel,
-                         uint32_t pixel_clk,
-                         uint16_t width, uint16_t height,
-                         enum pixel_fmt pixel_fmt,
-                         uint16_t h_start_width, uint16_t h_sync_width,
-                         uint16_t h_end_width, uint16_t v_start_width,
-                         uint16_t v_sync_width, uint16_t v_end_width,
-                         struct ipu_di_signal_cfg sig)
+                         uint32_t pixel_clk,
+                         uint16_t width, uint16_t height,
+                         enum pixel_fmt pixel_fmt,
+                         uint16_t h_start_width, uint16_t h_sync_width,
+                         uint16_t h_end_width, uint16_t v_start_width,
+                         uint16_t v_sync_width, uint16_t v_end_width,
+                         struct ipu_di_signal_cfg sig)
 {
-       unsigned long lock_flags;
-       uint32_t reg;
-       uint32_t old_conf;
-       uint32_t div;
-       struct clk *ipu_clk;
+       unsigned long lock_flags;
+       uint32_t reg;
+       uint32_t old_conf;
+       uint32_t div;
+       struct clk *ipu_clk;
 
-       dev_dbg(mx3fb->dev, "panel size = %d x %d", width, height);
+       dev_dbg(mx3fb->dev, "panel size = %d x %d", width, height);
 
-       if (v_sync_width == 0 || h_sync_width == 0)
-               return -EINVAL;
+       if (v_sync_width == 0 || h_sync_width == 0)
+               return -EINVAL;
 
-       /* Init panel size and blanking periods */
-       reg = ((uint32_t) (h_sync_width - 1) << 26) |
-               ((uint32_t) (width + h_start_width + h_end_width - 1) << 16);
-       mx3fb_write_reg(mx3fb, reg, SDC_HOR_CONF);
+       /* Init panel size and blanking periods */
+       reg = ((uint32_t) (h_sync_width - 1) << 26) |
+               ((uint32_t) (width + h_start_width + h_end_width - 1) << 16);
+       mx3fb_write_reg(mx3fb, reg, SDC_HOR_CONF);
 
 #ifdef DEBUG
-       printk(KERN_CONT " hor_conf %x,", reg);
+       printk(KERN_CONT " hor_conf %x,", reg);
 #endif
 
-       reg = ((uint32_t) (v_sync_width - 1) << 26) | SDC_V_SYNC_WIDTH_L |
-           ((uint32_t) (height + v_start_width + v_end_width - 1) << 16);
-       mx3fb_write_reg(mx3fb, reg, SDC_VER_CONF);
+       reg = ((uint32_t) (v_sync_width - 1) << 26) | SDC_V_SYNC_WIDTH_L |
+           ((uint32_t) (height + v_start_width + v_end_width - 1) << 16);
+       mx3fb_write_reg(mx3fb, reg, SDC_VER_CONF);
 
 #ifdef DEBUG
-       printk(KERN_CONT " ver_conf %x\n", reg);
+       printk(KERN_CONT " ver_conf %x\n", reg);
 #endif
 
-       mx3fb->h_start_width = h_start_width;
-       mx3fb->v_start_width = v_start_width;
-
-       switch (panel) {
-       case IPU_PANEL_SHARP_TFT:
-               mx3fb_write_reg(mx3fb, 0x00FD0102L, SDC_SHARP_CONF_1);
-               mx3fb_write_reg(mx3fb, 0x00F500F4L, SDC_SHARP_CONF_2);
-               mx3fb_write_reg(mx3fb, SDC_COM_SHARP | SDC_COM_TFT_COLOR, SDC_COM_CONF);
-               break;
-       case IPU_PANEL_TFT:
-               mx3fb_write_reg(mx3fb, SDC_COM_TFT_COLOR, SDC_COM_CONF);
-               break;
-       default:
-               return -EINVAL;
-       }
-
-       /* Init clocking */
-
-       /*
-        * Calculate divider: fractional part is 4 bits so simply multiple by
-        * 24 to get fractional part, as long as we stay under ~250MHz and on
-        * i.MX31 it (HSP_CLK) is <= 178MHz. Currently 128.267MHz
-        */
-       dev_dbg(mx3fb->dev, "pixel clk = %d\n", pixel_clk);
-
-       ipu_clk = clk_get(mx3fb->dev, "ipu_clk");
-       div = clk_get_rate(ipu_clk) * 16 / pixel_clk;
-       clk_put(ipu_clk);
-
-       if (div < 0x40) {       /* Divider less than 4 */
-               dev_dbg(mx3fb->dev,
-                       "InitPanel() - Pixel clock divider less than 4\n");
-               div = 0x40;
-       }
-
-       spin_lock_irqsave(&mx3fb->lock, lock_flags);
-
-       /*
-        * DISP3_IF_CLK_DOWN_WR is half the divider value and 2 fraction bits
-        * fewer. Subtract 1 extra from DISP3_IF_CLK_DOWN_WR based on timing
-        * debug. DISP3_IF_CLK_UP_WR is 0
-        */
-       mx3fb_write_reg(mx3fb, (((div / 8) - 1) << 22) | div, DI_DISP3_TIME_CONF);
-
-       /* DI settings */
-       old_conf = mx3fb_read_reg(mx3fb, DI_DISP_IF_CONF) & 0x78FFFFFF;
-       old_conf |= sig.datamask_en << DI_D3_DATAMSK_SHIFT |
-           sig.clksel_en << DI_D3_CLK_SEL_SHIFT |
-           sig.clkidle_en << DI_D3_CLK_IDLE_SHIFT;
-       mx3fb_write_reg(mx3fb, old_conf, DI_DISP_IF_CONF);
-
-       old_conf = mx3fb_read_reg(mx3fb, DI_DISP_SIG_POL) & 0xE0FFFFFF;
-       old_conf |= sig.data_pol << DI_D3_DATA_POL_SHIFT |
-           sig.clk_pol << DI_D3_CLK_POL_SHIFT |
-           sig.enable_pol << DI_D3_DRDY_SHARP_POL_SHIFT |
-           sig.Hsync_pol << DI_D3_HSYNC_POL_SHIFT |
-           sig.Vsync_pol << DI_D3_VSYNC_POL_SHIFT;
-       mx3fb_write_reg(mx3fb, old_conf, DI_DISP_SIG_POL);
-
-       switch (pixel_fmt) {
-       case IPU_PIX_FMT_RGB24:
-               mx3fb_write_reg(mx3fb, di_mappings[0], DI_DISP3_B0_MAP);
-               mx3fb_write_reg(mx3fb, di_mappings[1], DI_DISP3_B1_MAP);
-               mx3fb_write_reg(mx3fb, di_mappings[2], DI_DISP3_B2_MAP);
-               mx3fb_write_reg(mx3fb, mx3fb_read_reg(mx3fb, DI_DISP_ACC_CC) |
-                            ((di_mappings[3] - 1) << 12), DI_DISP_ACC_CC);
-               break;
-       case IPU_PIX_FMT_RGB666:
-               mx3fb_write_reg(mx3fb, di_mappings[4], DI_DISP3_B0_MAP);
-               mx3fb_write_reg(mx3fb, di_mappings[5], DI_DISP3_B1_MAP);
-               mx3fb_write_reg(mx3fb, di_mappings[6], DI_DISP3_B2_MAP);
-               mx3fb_write_reg(mx3fb, mx3fb_read_reg(mx3fb, DI_DISP_ACC_CC) |
-                            ((di_mappings[7] - 1) << 12), DI_DISP_ACC_CC);
-               break;
-       case IPU_PIX_FMT_BGR666:
-               mx3fb_write_reg(mx3fb, di_mappings[8], DI_DISP3_B0_MAP);
-               mx3fb_write_reg(mx3fb, di_mappings[9], DI_DISP3_B1_MAP);
-               mx3fb_write_reg(mx3fb, di_mappings[10], DI_DISP3_B2_MAP);
-               mx3fb_write_reg(mx3fb, mx3fb_read_reg(mx3fb, DI_DISP_ACC_CC) |
-                            ((di_mappings[11] - 1) << 12), DI_DISP_ACC_CC);
-               break;
-       default:
-               mx3fb_write_reg(mx3fb, di_mappings[12], DI_DISP3_B0_MAP);
-               mx3fb_write_reg(mx3fb, di_mappings[13], DI_DISP3_B1_MAP);
-               mx3fb_write_reg(mx3fb, di_mappings[14], DI_DISP3_B2_MAP);
-               mx3fb_write_reg(mx3fb, mx3fb_read_reg(mx3fb, DI_DISP_ACC_CC) |
-                            ((di_mappings[15] - 1) << 12), DI_DISP_ACC_CC);
-               break;
-       }
-
-       spin_unlock_irqrestore(&mx3fb->lock, lock_flags);
-
-       dev_dbg(mx3fb->dev, "DI_DISP_IF_CONF = 0x%08X\n",
-               mx3fb_read_reg(mx3fb, DI_DISP_IF_CONF));
-       dev_dbg(mx3fb->dev, "DI_DISP_SIG_POL = 0x%08X\n",
-               mx3fb_read_reg(mx3fb, DI_DISP_SIG_POL));
-       dev_dbg(mx3fb->dev, "DI_DISP3_TIME_CONF = 0x%08X\n",
-               mx3fb_read_reg(mx3fb, DI_DISP3_TIME_CONF));
-
-       return 0;
+       mx3fb->h_start_width = h_start_width;
+       mx3fb->v_start_width = v_start_width;
+
+       switch (panel) {
+       case IPU_PANEL_SHARP_TFT:
+               mx3fb_write_reg(mx3fb, 0x00FD0102L, SDC_SHARP_CONF_1);
+               mx3fb_write_reg(mx3fb, 0x00F500F4L, SDC_SHARP_CONF_2);
+               mx3fb_write_reg(mx3fb, SDC_COM_SHARP | SDC_COM_TFT_COLOR, SDC_COM_CONF);
+               break;
+       case IPU_PANEL_TFT:
+               mx3fb_write_reg(mx3fb, SDC_COM_TFT_COLOR, SDC_COM_CONF);
+               break;
+       default:
+               return -EINVAL;
+       }
+
+       /* Init clocking */
+
+       /*
+        * Calculate divider: fractional part is 4 bits so simply multiple by
+        * 2^4 to get fractional part, as long as we stay under ~250MHz and on
+        * i.MX31 it (HSP_CLK) is <= 178MHz. Currently 128.267MHz
+        */
+       dev_dbg(mx3fb->dev, "pixel clk = %d\n", pixel_clk);
+
+       ipu_clk = clk_get(mx3fb->dev, NULL);
+       div = clk_get_rate(ipu_clk) * 16 / pixel_clk;
+       clk_put(ipu_clk);
+
+       if (div < 0x40) {       /* Divider less than 4 */
+               dev_dbg(mx3fb->dev,
+                       "InitPanel() - Pixel clock divider less than 4\n");
+               div = 0x40;
+       }
+
+       spin_lock_irqsave(&mx3fb->lock, lock_flags);
+
+       /*
+        * DISP3_IF_CLK_DOWN_WR is half the divider value and 2 fraction bits
+        * fewer. Subtract 1 extra from DISP3_IF_CLK_DOWN_WR based on timing
+        * debug. DISP3_IF_CLK_UP_WR is 0
+        */
+       mx3fb_write_reg(mx3fb, (((div / 8) - 1) << 22) | div, DI_DISP3_TIME_CONF);
+
+       /* DI settings */
+       old_conf = mx3fb_read_reg(mx3fb, DI_DISP_IF_CONF) & 0x78FFFFFF;
+       old_conf |= sig.datamask_en << DI_D3_DATAMSK_SHIFT |
+           sig.clksel_en << DI_D3_CLK_SEL_SHIFT |
+           sig.clkidle_en << DI_D3_CLK_IDLE_SHIFT;
+       mx3fb_write_reg(mx3fb, old_conf, DI_DISP_IF_CONF);
+
+       old_conf = mx3fb_read_reg(mx3fb, DI_DISP_SIG_POL) & 0xE0FFFFFF;
+       old_conf |= sig.data_pol << DI_D3_DATA_POL_SHIFT |
+           sig.clk_pol << DI_D3_CLK_POL_SHIFT |
+           sig.enable_pol << DI_D3_DRDY_SHARP_POL_SHIFT |
+           sig.Hsync_pol << DI_D3_HSYNC_POL_SHIFT |
+           sig.Vsync_pol << DI_D3_VSYNC_POL_SHIFT;
+       mx3fb_write_reg(mx3fb, old_conf, DI_DISP_SIG_POL);
+
+       switch (pixel_fmt) {
+       case IPU_PIX_FMT_RGB24:
+               mx3fb_write_reg(mx3fb, di_mappings[0], DI_DISP3_B0_MAP);
+               mx3fb_write_reg(mx3fb, di_mappings[1], DI_DISP3_B1_MAP);
+               mx3fb_write_reg(mx3fb, di_mappings[2], DI_DISP3_B2_MAP);
+               mx3fb_write_reg(mx3fb, mx3fb_read_reg(mx3fb, DI_DISP_ACC_CC) |
+                            ((di_mappings[3] - 1) << 12), DI_DISP_ACC_CC);
+               break;
+       case IPU_PIX_FMT_RGB666:
+               mx3fb_write_reg(mx3fb, di_mappings[4], DI_DISP3_B0_MAP);
+               mx3fb_write_reg(mx3fb, di_mappings[5], DI_DISP3_B1_MAP);
+               mx3fb_write_reg(mx3fb, di_mappings[6], DI_DISP3_B2_MAP);
+               mx3fb_write_reg(mx3fb, mx3fb_read_reg(mx3fb, DI_DISP_ACC_CC) |
+                            ((di_mappings[7] - 1) << 12), DI_DISP_ACC_CC);
+               break;
+       case IPU_PIX_FMT_BGR666:
+               mx3fb_write_reg(mx3fb, di_mappings[8], DI_DISP3_B0_MAP);
+               mx3fb_write_reg(mx3fb, di_mappings[9], DI_DISP3_B1_MAP);
+               mx3fb_write_reg(mx3fb, di_mappings[10], DI_DISP3_B2_MAP);
+               mx3fb_write_reg(mx3fb, mx3fb_read_reg(mx3fb, DI_DISP_ACC_CC) |
+                            ((di_mappings[11] - 1) << 12), DI_DISP_ACC_CC);
+               break;
+       default:
+               mx3fb_write_reg(mx3fb, di_mappings[12], DI_DISP3_B0_MAP);
+               mx3fb_write_reg(mx3fb, di_mappings[13], DI_DISP3_B1_MAP);
+               mx3fb_write_reg(mx3fb, di_mappings[14], DI_DISP3_B2_MAP);
+               mx3fb_write_reg(mx3fb, mx3fb_read_reg(mx3fb, DI_DISP_ACC_CC) |
+                            ((di_mappings[15] - 1) << 12), DI_DISP_ACC_CC);
+               break;
+       }
+
+       spin_unlock_irqrestore(&mx3fb->lock, lock_flags);
+
+       dev_dbg(mx3fb->dev, "DI_DISP_IF_CONF = 0x%08X\n",
+               mx3fb_read_reg(mx3fb, DI_DISP_IF_CONF));
+       dev_dbg(mx3fb->dev, "DI_DISP_SIG_POL = 0x%08X\n",
+               mx3fb_read_reg(mx3fb, DI_DISP_SIG_POL));
+       dev_dbg(mx3fb->dev, "DI_DISP3_TIME_CONF = 0x%08X\n",
+               mx3fb_read_reg(mx3fb, DI_DISP3_TIME_CONF));
+
+       return 0;
 }
 
 /**
  * sdc_set_color_key() - set the transparent color key for SDC graphic plane.
- * @mx3fb:     mx3fb context.
- * @channel:   IPU DMAC channel ID.
- * @enable:    boolean to enable or disable color keyl.
- * @color_key: 24-bit RGB color to use as transparent color key.
- * @return:    0 on success or negative error code on failure.
+ * @mx3fb:     mx3fb context.
+ * @channel:   IPU DMAC channel ID.
+ * @enable:    boolean to enable or disable color keyl.
+ * @color_key: 24-bit RGB color to use as transparent color key.
+ * @return:    0 on success or negative error code on failure.
  */
 static int sdc_set_color_key(struct mx3fb_data *mx3fb, enum ipu_channel channel,
-                            bool enable, uint32_t color_key)
+                            bool enable, uint32_t color_key)
 {
-       uint32_t reg, sdc_conf;
-       unsigned long lock_flags;
+       uint32_t reg, sdc_conf;
+       unsigned long lock_flags;
 
-       spin_lock_irqsave(&mx3fb->lock, lock_flags);
+       spin_lock_irqsave(&mx3fb->lock, lock_flags);
 
-       sdc_conf = mx3fb_read_reg(mx3fb, SDC_COM_CONF);
-       if (channel == IDMAC_SDC_0)
-               sdc_conf &= ~SDC_COM_GWSEL;
-       else
-               sdc_conf |= SDC_COM_GWSEL;
+       sdc_conf = mx3fb_read_reg(mx3fb, SDC_COM_CONF);
+       if (channel == IDMAC_SDC_0)
+               sdc_conf &= ~SDC_COM_GWSEL;
+       else
+               sdc_conf |= SDC_COM_GWSEL;
 
-       if (enable) {
-               reg = mx3fb_read_reg(mx3fb, SDC_GW_CTRL) & 0xFF000000L;
-               mx3fb_write_reg(mx3fb, reg | (color_key & 0x00FFFFFFL),
-                            SDC_GW_CTRL);
+       if (enable) {
+               reg = mx3fb_read_reg(mx3fb, SDC_GW_CTRL) & 0xFF000000L;
+               mx3fb_write_reg(mx3fb, reg | (color_key & 0x00FFFFFFL),
+                            SDC_GW_CTRL);
 
-               sdc_conf |= SDC_COM_KEY_COLOR_G;
-       } else {
-               sdc_conf &= ~SDC_COM_KEY_COLOR_G;
-       }
-       mx3fb_write_reg(mx3fb, sdc_conf, SDC_COM_CONF);
+               sdc_conf |= SDC_COM_KEY_COLOR_G;
+       } else {
+               sdc_conf &= ~SDC_COM_KEY_COLOR_G;
+       }
+       mx3fb_write_reg(mx3fb, sdc_conf, SDC_COM_CONF);
 
-       spin_unlock_irqrestore(&mx3fb->lock, lock_flags);
+       spin_unlock_irqrestore(&mx3fb->lock, lock_flags);
 
-       return 0;
+       return 0;
 }
 
 /**
  * sdc_set_global_alpha() - set global alpha blending modes.
- * @mx3fb:     mx3fb context.
- * @enable:    boolean to enable or disable global alpha blending. If disabled,
- *             per pixel blending is used.
- * @alpha:     global alpha value.
- * @return:    0 on success or negative error code on failure.
+ * @mx3fb:     mx3fb context.
+ * @enable:    boolean to enable or disable global alpha blending. If disabled,
+ *             per pixel blending is used.
+ * @alpha:     global alpha value.
+ * @return:    0 on success or negative error code on failure.
  */
 static int sdc_set_global_alpha(struct mx3fb_data *mx3fb, bool enable, uint8_t alpha)
 {
-       uint32_t reg;
-       unsigned long lock_flags;
+       uint32_t reg;
+       unsigned long lock_flags;
 
-       spin_lock_irqsave(&mx3fb->lock, lock_flags);
+       spin_lock_irqsave(&mx3fb->lock, lock_flags);
 
-       if (enable) {
-               reg = mx3fb_read_reg(mx3fb, SDC_GW_CTRL) & 0x00FFFFFFL;
-               mx3fb_write_reg(mx3fb, reg | ((uint32_t) alpha << 24), SDC_GW_CTRL);
+       if (enable) {
+               reg = mx3fb_read_reg(mx3fb, SDC_GW_CTRL) & 0x00FFFFFFL;
+               mx3fb_write_reg(mx3fb, reg | ((uint32_t) alpha << 24), SDC_GW_CTRL);
 
-               reg = mx3fb_read_reg(mx3fb, SDC_COM_CONF);
-               mx3fb_write_reg(mx3fb, reg | SDC_COM_GLB_A, SDC_COM_CONF);
-       } else {
-               reg = mx3fb_read_reg(mx3fb, SDC_COM_CONF);
-               mx3fb_write_reg(mx3fb, reg & ~SDC_COM_GLB_A, SDC_COM_CONF);
-       }
+               reg = mx3fb_read_reg(mx3fb, SDC_COM_CONF);
+               mx3fb_write_reg(mx3fb, reg | SDC_COM_GLB_A, SDC_COM_CONF);
+       } else {
+               reg = mx3fb_read_reg(mx3fb, SDC_COM_CONF);
+               mx3fb_write_reg(mx3fb, reg & ~SDC_COM_GLB_A, SDC_COM_CONF);
+       }
 
-       spin_unlock_irqrestore(&mx3fb->lock, lock_flags);
+       spin_unlock_irqrestore(&mx3fb->lock, lock_flags);
 
-       return 0;
+       return 0;
 }
 
 static void sdc_set_brightness(struct mx3fb_data *mx3fb, uint8_t value)
 {
-       /* This might be board-specific */
-       mx3fb_write_reg(mx3fb, 0x03000000UL | value << 16, SDC_PWM_CTRL);
-       return;
+       /* This might be board-specific */
+       mx3fb_write_reg(mx3fb, 0x03000000UL | value << 16, SDC_PWM_CTRL);
+       return;
 }
 
 static uint32_t bpp_to_pixfmt(int bpp)
 {
-       uint32_t pixfmt = 0;
-       switch (bpp) {
-       case 24:
-               pixfmt = IPU_PIX_FMT_BGR24;
-               break;
-       case 32:
-               pixfmt = IPU_PIX_FMT_BGR32;
-               break;
-       case 16:
-               pixfmt = IPU_PIX_FMT_RGB565;
-               break;
-       }
-       return pixfmt;
+       uint32_t pixfmt = 0;
+       switch (bpp) {
+       case 24:
+               pixfmt = IPU_PIX_FMT_BGR24;
+               break;
+       case 32:
+               pixfmt = IPU_PIX_FMT_BGR32;
+               break;
+       case 16:
+               pixfmt = IPU_PIX_FMT_RGB565;
+               break;
+       }
+       return pixfmt;
 }
 
 static int mx3fb_blank(int blank, struct fb_info *fbi);
@@ -669,300 +669,300 @@ static int mx3fb_unmap_video_memory(struct fb_info *fbi);
 
 /**
  * mx3fb_set_fix() - set fixed framebuffer parameters from variable settings.
- * @info:      framebuffer information pointer
- * @return:    0 on success or negative error code on failure.
+ * @info:      framebuffer information pointer
+ * @return:    0 on success or negative error code on failure.
  */
 static int mx3fb_set_fix(struct fb_info *fbi)
 {
-       struct fb_fix_screeninfo *fix = &fbi->fix;
-       struct fb_var_screeninfo *var = &fbi->var;
+       struct fb_fix_screeninfo *fix = &fbi->fix;
+       struct fb_var_screeninfo *var = &fbi->var;
 
-       strncpy(fix->id, "DISP3 BG", 8);
+       strncpy(fix->id, "DISP3 BG", 8);
 
-       fix->line_length = var->xres_virtual * var->bits_per_pixel / 8;
+       fix->line_length = var->xres_virtual * var->bits_per_pixel / 8;
 
-       fix->type = FB_TYPE_PACKED_PIXELS;
-       fix->accel = FB_ACCEL_NONE;
-       fix->visual = FB_VISUAL_TRUECOLOR;
-       fix->xpanstep = 1;
-       fix->ypanstep = 1;
+       fix->type = FB_TYPE_PACKED_PIXELS;
+       fix->accel = FB_ACCEL_NONE;
+       fix->visual = FB_VISUAL_TRUECOLOR;
+       fix->xpanstep = 1;
+       fix->ypanstep = 1;
 
-       return 0;
+       return 0;
 }
 
 static void mx3fb_dma_done(void *arg)
 {
-       struct idmac_tx_desc *tx_desc = to_tx_desc(arg);
-       struct dma_chan *chan = tx_desc->txd.chan;
-       struct idmac_channel *ichannel = to_idmac_chan(chan);
-       struct mx3fb_data *mx3fb = ichannel->client;
-       struct mx3fb_info *mx3_fbi = mx3fb->fbi->par;
+       struct idmac_tx_desc *tx_desc = to_tx_desc(arg);
+       struct dma_chan *chan = tx_desc->txd.chan;
+       struct idmac_channel *ichannel = to_idmac_chan(chan);
+       struct mx3fb_data *mx3fb = ichannel->client;
+       struct mx3fb_info *mx3_fbi = mx3fb->fbi->par;
 
-       dev_dbg(mx3fb->dev, "irq %d callback\n", ichannel->eof_irq);
+       dev_dbg(mx3fb->dev, "irq %d callback\n", ichannel->eof_irq);
 
-       /* We only need one interrupt, it will be re-enabled as needed */
-       disable_irq(ichannel->eof_irq);
+       /* We only need one interrupt, it will be re-enabled as needed */
+       disable_irq(ichannel->eof_irq);
 
-       complete(&mx3_fbi->flip_cmpl);
+       complete(&mx3_fbi->flip_cmpl);
 }
 
 /**
  * mx3fb_set_par() - set framebuffer parameters and change the operating mode.
- * @fbi:       framebuffer information pointer.
- * @return:    0 on success or negative error code on failure.
+ * @fbi:       framebuffer information pointer.
+ * @return:    0 on success or negative error code on failure.
  */
 static int mx3fb_set_par(struct fb_info *fbi)
 {
-       u32 mem_len;
-       struct ipu_di_signal_cfg sig_cfg;
-       enum ipu_panel mode = IPU_PANEL_TFT;
-       struct mx3fb_info *mx3_fbi = fbi->par;
-       struct mx3fb_data *mx3fb = mx3_fbi->mx3fb;
-       struct idmac_channel *ichan = mx3_fbi->idmac_channel;
-       struct idmac_video_param *video = &ichan->params.video;
-       struct scatterlist *sg = mx3_fbi->sg;
-       size_t screen_size;
-
-       dev_dbg(mx3fb->dev, "%s [%c]\n", __func__, list_empty(&ichan->queue) ? '-' : '+');
-
-       mutex_lock(&mx3_fbi->mutex);
-
-       /* Total cleanup */
-       if (mx3_fbi->txd)
-               sdc_disable_channel(mx3_fbi);
-
-       mx3fb_set_fix(fbi);
-
-       mem_len = fbi->var.yres_virtual * fbi->fix.line_length;
-       if (mem_len > fbi->fix.smem_len) {
-               if (fbi->fix.smem_start)
-                       mx3fb_unmap_video_memory(fbi);
-
-               fbi->fix.smem_len = mem_len;
-               if (mx3fb_map_video_memory(fbi) < 0) {
-                       mutex_unlock(&mx3_fbi->mutex);
-                       return -ENOMEM;
-               }
-       }
-
-       screen_size = fbi->fix.line_length * fbi->var.yres;
-
-       sg_init_table(&sg[0], 1);
-       sg_init_table(&sg[1], 1);
-
-       sg_dma_address(&sg[0])  = fbi->fix.smem_start;
-       sg_set_page(&sg[0], virt_to_page(fbi->screen_base),
-                   fbi->fix.smem_len,
-                   offset_in_page(fbi->screen_base));
-
-       if (mx3_fbi->ipu_ch == IDMAC_SDC_0) {
-               memset(&sig_cfg, 0, sizeof(sig_cfg));
-               if (fbi->var.sync & FB_SYNC_HOR_HIGH_ACT)
-                       sig_cfg.Hsync_pol = true;
-               if (fbi->var.sync & FB_SYNC_VERT_HIGH_ACT)
-                       sig_cfg.Vsync_pol = true;
-               if (fbi->var.sync & FB_SYNC_CLK_INVERT)
-                       sig_cfg.clk_pol = true;
-               if (fbi->var.sync & FB_SYNC_DATA_INVERT)
-                       sig_cfg.data_pol = true;
-               if (fbi->var.sync & FB_SYNC_OE_ACT_HIGH)
-                       sig_cfg.enable_pol = true;
-               if (fbi->var.sync & FB_SYNC_CLK_IDLE_EN)
-                       sig_cfg.clkidle_en = true;
-               if (fbi->var.sync & FB_SYNC_CLK_SEL_EN)
-                       sig_cfg.clksel_en = true;
-               if (fbi->var.sync & FB_SYNC_SHARP_MODE)
-                       mode = IPU_PANEL_SHARP_TFT;
-
-               dev_dbg(fbi->device, "pixclock = %ul Hz\n",
-                       (u32) (PICOS2KHZ(fbi->var.pixclock) * 1000UL));
-
-               if (sdc_init_panel(mx3fb, mode,
-                                  (PICOS2KHZ(fbi->var.pixclock)) * 1000UL,
-                                  fbi->var.xres, fbi->var.yres,
-                                  (fbi->var.sync & FB_SYNC_SWAP_RGB) ?
-                                  IPU_PIX_FMT_BGR666 : IPU_PIX_FMT_RGB666,
-                                  fbi->var.left_margin,
-                                  fbi->var.hsync_len,
-                                  fbi->var.right_margin +
-                                  fbi->var.hsync_len,
-                                  fbi->var.upper_margin,
-                                  fbi->var.vsync_len,
-                                  fbi->var.lower_margin +
-                                  fbi->var.vsync_len, sig_cfg) != 0) {
-                       mutex_unlock(&mx3_fbi->mutex);
-                       dev_err(fbi->device,
-                               "mx3fb: Error initializing panel.\n");
-                       return -EINVAL;
-               }
-       }
-
-       sdc_set_window_pos(mx3fb, mx3_fbi->ipu_ch, 0, 0);
-
-       mx3_fbi->cur_ipu_buf    = 0;
-
-       video->out_pixel_fmt    = bpp_to_pixfmt(fbi->var.bits_per_pixel);
-       video->out_width        = fbi->var.xres;
-       video->out_height       = fbi->var.yres;
-       video->out_stride       = fbi->var.xres_virtual;
-
-       if (mx3_fbi->blank == FB_BLANK_UNBLANK)
-               sdc_enable_channel(mx3_fbi);
-
-       mutex_unlock(&mx3_fbi->mutex);
-
-       return 0;
+       u32 mem_len;
+       struct ipu_di_signal_cfg sig_cfg;
+       enum ipu_panel mode = IPU_PANEL_TFT;
+       struct mx3fb_info *mx3_fbi = fbi->par;
+       struct mx3fb_data *mx3fb = mx3_fbi->mx3fb;
+       struct idmac_channel *ichan = mx3_fbi->idmac_channel;
+       struct idmac_video_param *video = &ichan->params.video;
+       struct scatterlist *sg = mx3_fbi->sg;
+       size_t screen_size;
+
+       dev_dbg(mx3fb->dev, "%s [%c]\n", __func__, list_empty(&ichan->queue) ? '-' : '+');
+
+       mutex_lock(&mx3_fbi->mutex);
+
+       /* Total cleanup */
+       if (mx3_fbi->txd)
+               sdc_disable_channel(mx3_fbi);
+
+       mx3fb_set_fix(fbi);
+
+       mem_len = fbi->var.yres_virtual * fbi->fix.line_length;
+       if (mem_len > fbi->fix.smem_len) {
+               if (fbi->fix.smem_start)
+                       mx3fb_unmap_video_memory(fbi);
+
+               fbi->fix.smem_len = mem_len;
+               if (mx3fb_map_video_memory(fbi) < 0) {
+                       mutex_unlock(&mx3_fbi->mutex);
+                       return -ENOMEM;
+               }
+       }
+
+       screen_size = fbi->fix.line_length * fbi->var.yres;
+
+       sg_init_table(&sg[0], 1);
+       sg_init_table(&sg[1], 1);
+
+       sg_dma_address(&sg[0])  = fbi->fix.smem_start;
+       sg_set_page(&sg[0], virt_to_page(fbi->screen_base),
+                   fbi->fix.smem_len,
+                   offset_in_page(fbi->screen_base));
+
+       if (mx3_fbi->ipu_ch == IDMAC_SDC_0) {
+               memset(&sig_cfg, 0, sizeof(sig_cfg));
+               if (fbi->var.sync & FB_SYNC_HOR_HIGH_ACT)
+                       sig_cfg.Hsync_pol = true;
+               if (fbi->var.sync & FB_SYNC_VERT_HIGH_ACT)
+                       sig_cfg.Vsync_pol = true;
+               if (fbi->var.sync & FB_SYNC_CLK_INVERT)
+                       sig_cfg.clk_pol = true;
+               if (fbi->var.sync & FB_SYNC_DATA_INVERT)
+                       sig_cfg.data_pol = true;
+               if (fbi->var.sync & FB_SYNC_OE_ACT_HIGH)
+                       sig_cfg.enable_pol = true;
+               if (fbi->var.sync & FB_SYNC_CLK_IDLE_EN)
+                       sig_cfg.clkidle_en = true;
+               if (fbi->var.sync & FB_SYNC_CLK_SEL_EN)
+                       sig_cfg.clksel_en = true;
+               if (fbi->var.sync & FB_SYNC_SHARP_MODE)
+                       mode = IPU_PANEL_SHARP_TFT;
+
+               dev_dbg(fbi->device, "pixclock = %ul Hz\n",
+                       (u32) (PICOS2KHZ(fbi->var.pixclock) * 1000UL));
+
+               if (sdc_init_panel(mx3fb, mode,
+                                  (PICOS2KHZ(fbi->var.pixclock)) * 1000UL,
+                                  fbi->var.xres, fbi->var.yres,
+                                  (fbi->var.sync & FB_SYNC_SWAP_RGB) ?
+                                  IPU_PIX_FMT_BGR666 : IPU_PIX_FMT_RGB666,
+                                  fbi->var.left_margin,
+                                  fbi->var.hsync_len,
+                                  fbi->var.right_margin +
+                                  fbi->var.hsync_len,
+                                  fbi->var.upper_margin,
+                                  fbi->var.vsync_len,
+                                  fbi->var.lower_margin +
+                                  fbi->var.vsync_len, sig_cfg) != 0) {
+                       mutex_unlock(&mx3_fbi->mutex);
+                       dev_err(fbi->device,
+                               "mx3fb: Error initializing panel.\n");
+                       return -EINVAL;
+               }
+       }
+
+       sdc_set_window_pos(mx3fb, mx3_fbi->ipu_ch, 0, 0);
+
+       mx3_fbi->cur_ipu_buf    = 0;
+
+       video->out_pixel_fmt    = bpp_to_pixfmt(fbi->var.bits_per_pixel);
+       video->out_width        = fbi->var.xres;
+       video->out_height       = fbi->var.yres;
+       video->out_stride       = fbi->var.xres_virtual;
+
+       if (mx3_fbi->blank == FB_BLANK_UNBLANK)
+               sdc_enable_channel(mx3_fbi);
+
+       mutex_unlock(&mx3_fbi->mutex);
+
+       return 0;
 }
 
 /**
  * mx3fb_check_var() - check and adjust framebuffer variable parameters.
- * @var:       framebuffer variable parameters
- * @fbi:       framebuffer information pointer
+ * @var:       framebuffer variable parameters
+ * @fbi:       framebuffer information pointer
  */
 static int mx3fb_check_var(struct fb_var_screeninfo *var, struct fb_info *fbi)
 {
-       struct mx3fb_info *mx3_fbi = fbi->par;
-       u32 vtotal;
-       u32 htotal;
-
-       dev_dbg(fbi->device, "%s\n", __func__);
-
-       if (var->xres_virtual < var->xres)
-               var->xres_virtual = var->xres;
-       if (var->yres_virtual < var->yres)
-               var->yres_virtual = var->yres;
-
-       if ((var->bits_per_pixel != 32) && (var->bits_per_pixel != 24) &&
-           (var->bits_per_pixel != 16))
-               var->bits_per_pixel = default_bpp;
-
-       switch (var->bits_per_pixel) {
-       case 16:
-               var->red.length = 5;
-               var->red.offset = 11;
-               var->red.msb_right = 0;
-
-               var->green.length = 6;
-               var->green.offset = 5;
-               var->green.msb_right = 0;
-
-               var->blue.length = 5;
-               var->blue.offset = 0;
-               var->blue.msb_right = 0;
-
-               var->transp.length = 0;
-               var->transp.offset = 0;
-               var->transp.msb_right = 0;
-               break;
-       case 24:
-               var->red.length = 8;
-               var->red.offset = 16;
-               var->red.msb_right = 0;
-
-               var->green.length = 8;
-               var->green.offset = 8;
-               var->green.msb_right = 0;
-
-               var->blue.length = 8;
-               var->blue.offset = 0;
-               var->blue.msb_right = 0;
-
-               var->transp.length = 0;
-               var->transp.offset = 0;
-               var->transp.msb_right = 0;
-               break;
-       case 32:
-               var->red.length = 8;
-               var->red.offset = 16;
-               var->red.msb_right = 0;
-
-               var->green.length = 8;
-               var->green.offset = 8;
-               var->green.msb_right = 0;
-
-               var->blue.length = 8;
-               var->blue.offset = 0;
-               var->blue.msb_right = 0;
-
-               var->transp.length = 8;
-               var->transp.offset = 24;
-               var->transp.msb_right = 0;
-               break;
-       }
-
-       if (var->pixclock < 1000) {
-               htotal = var->xres + var->right_margin + var->hsync_len +
-                   var->left_margin;
-               vtotal = var->yres + var->lower_margin + var->vsync_len +
-                   var->upper_margin;
-               var->pixclock = (vtotal * htotal * 6UL) / 100UL;
-               var->pixclock = KHZ2PICOS(var->pixclock);
-               dev_dbg(fbi->device, "pixclock set for 60Hz refresh = %u ps\n",
-                       var->pixclock);
-       }
-
-       var->height = -1;
-       var->width = -1;
-       var->grayscale = 0;
-
-       /* Preserve sync flags */
-       var->sync |= mx3_fbi->sync;
-       mx3_fbi->sync |= var->sync;
-
-       return 0;
+       struct mx3fb_info *mx3_fbi = fbi->par;
+       u32 vtotal;
+       u32 htotal;
+
+       dev_dbg(fbi->device, "%s\n", __func__);
+
+       if (var->xres_virtual < var->xres)
+               var->xres_virtual = var->xres;
+       if (var->yres_virtual < var->yres)
+               var->yres_virtual = var->yres;
+
+       if ((var->bits_per_pixel != 32) && (var->bits_per_pixel != 24) &&
+           (var->bits_per_pixel != 16))
+               var->bits_per_pixel = default_bpp;
+
+       switch (var->bits_per_pixel) {
+       case 16:
+               var->red.length = 5;
+               var->red.offset = 11;
+               var->red.msb_right = 0;
+
+               var->green.length = 6;
+               var->green.offset = 5;
+               var->green.msb_right = 0;
+
+               var->blue.length = 5;
+               var->blue.offset = 0;
+               var->blue.msb_right = 0;
+
+               var->transp.length = 0;
+               var->transp.offset = 0;
+               var->transp.msb_right = 0;
+               break;
+       case 24:
+               var->red.length = 8;
+               var->red.offset = 16;
+               var->red.msb_right = 0;
+
+               var->green.length = 8;
+               var->green.offset = 8;
+               var->green.msb_right = 0;
+
+               var->blue.length = 8;
+               var->blue.offset = 0;
+               var->blue.msb_right = 0;
+
+               var->transp.length = 0;
+               var->transp.offset = 0;
+               var->transp.msb_right = 0;
+               break;
+       case 32:
+               var->red.length = 8;
+               var->red.offset = 16;
+               var->red.msb_right = 0;
+
+               var->green.length = 8;
+               var->green.offset = 8;
+               var->green.msb_right = 0;
+
+               var->blue.length = 8;
+               var->blue.offset = 0;
+               var->blue.msb_right = 0;
+
+               var->transp.length = 8;
+               var->transp.offset = 24;
+               var->transp.msb_right = 0;
+               break;
+       }
+
+       if (var->pixclock < 1000) {
+               htotal = var->xres + var->right_margin + var->hsync_len +
+                   var->left_margin;
+               vtotal = var->yres + var->lower_margin + var->vsync_len +
+                   var->upper_margin;
+               var->pixclock = (vtotal * htotal * 6UL) / 100UL;
+               var->pixclock = KHZ2PICOS(var->pixclock);
+               dev_dbg(fbi->device, "pixclock set for 60Hz refresh = %u ps\n",
+                       var->pixclock);
+       }
+
+       var->height = -1;
+       var->width = -1;
+       var->grayscale = 0;
+
+       /* Preserve sync flags */
+       var->sync |= mx3_fbi->sync;
+       mx3_fbi->sync |= var->sync;
+
+       return 0;
 }
 
 static u32 chan_to_field(unsigned int chan, struct fb_bitfield *bf)
 {
-       chan &= 0xffff;
-       chan >>= 16 - bf->length;
-       return chan << bf->offset;
+       chan &= 0xffff;
+       chan >>= 16 - bf->length;
+       return chan << bf->offset;
 }
 
 static int mx3fb_setcolreg(unsigned int regno, unsigned int red,
-                          unsigned int green, unsigned int blue,
-                          unsigned int trans, struct fb_info *fbi)
+                          unsigned int green, unsigned int blue,
+                          unsigned int trans, struct fb_info *fbi)
 {
-       struct mx3fb_info *mx3_fbi = fbi->par;
-       u32 val;
-       int ret = 1;
-
-       dev_dbg(fbi->device, "%s\n", __func__);
-
-       mutex_lock(&mx3_fbi->mutex);
-       /*
-        * If greyscale is true, then we convert the RGB value
-        * to greyscale no matter what visual we are using.
-        */
-       if (fbi->var.grayscale)
-               red = green = blue = (19595 * red + 38470 * green +
-                                     7471 * blue) >> 16;
-       switch (fbi->fix.visual) {
-       case FB_VISUAL_TRUECOLOR:
-               /*
-                * 16-bit True Colour.  We encode the RGB value
-                * according to the RGB bitfield information.
-                */
-               if (regno < 16) {
-                       u32 *pal = fbi->pseudo_palette;
-
-                       val = chan_to_field(red, &fbi->var.red);
-                       val |= chan_to_field(green, &fbi->var.green);
-                       val |= chan_to_field(blue, &fbi->var.blue);
-
-                       pal[regno] = val;
-
-                       ret = 0;
-               }
-               break;
-
-       case FB_VISUAL_STATIC_PSEUDOCOLOR:
-       case FB_VISUAL_PSEUDOCOLOR:
-               break;
-       }
-       mutex_unlock(&mx3_fbi->mutex);
-
-       return ret;
+       struct mx3fb_info *mx3_fbi = fbi->par;
+       u32 val;
+       int ret = 1;
+
+       dev_dbg(fbi->device, "%s\n", __func__);
+
+       mutex_lock(&mx3_fbi->mutex);
+       /*
+        * If greyscale is true, then we convert the RGB value
+        * to greyscale no matter what visual we are using.
+        */
+       if (fbi->var.grayscale)
+               red = green = blue = (19595 * red + 38470 * green +
+                                     7471 * blue) >> 16;
+       switch (fbi->fix.visual) {
+       case FB_VISUAL_TRUECOLOR:
+               /*
+                * 16-bit True Colour.  We encode the RGB value
+                * according to the RGB bitfield information.
+                */
+               if (regno < 16) {
+                       u32 *pal = fbi->pseudo_palette;
+
+                       val = chan_to_field(red, &fbi->var.red);
+                       val |= chan_to_field(green, &fbi->var.green);
+                       val |= chan_to_field(blue, &fbi->var.blue);
+
+                       pal[regno] = val;
+
+                       ret = 0;
+               }
+               break;
+
+       case FB_VISUAL_STATIC_PSEUDOCOLOR:
+       case FB_VISUAL_PSEUDOCOLOR:
+               break;
+       }
+       mutex_unlock(&mx3_fbi->mutex);
+
+       return ret;
 }
 
 /**
@@ -970,152 +970,152 @@ static int mx3fb_setcolreg(unsigned int regno, unsigned int red,
  */
 static int mx3fb_blank(int blank, struct fb_info *fbi)
 {
-       struct mx3fb_info *mx3_fbi = fbi->par;
-       struct mx3fb_data *mx3fb = mx3_fbi->mx3fb;
-
-       dev_dbg(fbi->device, "%s\n", __func__);
-
-       dev_dbg(fbi->device, "blank = %d\n", blank);
-
-       if (mx3_fbi->blank == blank)
-               return 0;
-
-       mutex_lock(&mx3_fbi->mutex);
-       mx3_fbi->blank = blank;
-
-       switch (blank) {
-       case FB_BLANK_POWERDOWN:
-       case FB_BLANK_VSYNC_SUSPEND:
-       case FB_BLANK_HSYNC_SUSPEND:
-       case FB_BLANK_NORMAL:
-               sdc_disable_channel(mx3_fbi);
-               sdc_set_brightness(mx3fb, 0);
-               break;
-       case FB_BLANK_UNBLANK:
-               sdc_enable_channel(mx3_fbi);
-               sdc_set_brightness(mx3fb, mx3fb->backlight_level);
-               break;
-       }
-       mutex_unlock(&mx3_fbi->mutex);
-
-       return 0;
+       struct mx3fb_info *mx3_fbi = fbi->par;
+       struct mx3fb_data *mx3fb = mx3_fbi->mx3fb;
+
+       dev_dbg(fbi->device, "%s\n", __func__);
+
+       dev_dbg(fbi->device, "blank = %d\n", blank);
+
+       if (mx3_fbi->blank == blank)
+               return 0;
+
+       mutex_lock(&mx3_fbi->mutex);
+       mx3_fbi->blank = blank;
+
+       switch (blank) {
+       case FB_BLANK_POWERDOWN:
+       case FB_BLANK_VSYNC_SUSPEND:
+       case FB_BLANK_HSYNC_SUSPEND:
+       case FB_BLANK_NORMAL:
+               sdc_disable_channel(mx3_fbi);
+               sdc_set_brightness(mx3fb, 0);
+               break;
+       case FB_BLANK_UNBLANK:
+               sdc_enable_channel(mx3_fbi);
+               sdc_set_brightness(mx3fb, mx3fb->backlight_level);
+               break;
+       }
+       mutex_unlock(&mx3_fbi->mutex);
+
+       return 0;
 }
 
 /**
  * mx3fb_pan_display() - pan or wrap the display
- * @var:       variable screen buffer information.
- * @info:      framebuffer information pointer.
+ * @var:       variable screen buffer information.
+ * @info:      framebuffer information pointer.
  *
  * We look only at xoffset, yoffset and the FB_VMODE_YWRAP flag
  */
 static int mx3fb_pan_display(struct fb_var_screeninfo *var,
-                            struct fb_info *fbi)
+                            struct fb_info *fbi)
 {
-       struct mx3fb_info *mx3_fbi = fbi->par;
-       u32 y_bottom;
-       unsigned long base;
-       off_t offset;
-       dma_cookie_t cookie;
-       struct scatterlist *sg = mx3_fbi->sg;
-       struct dma_chan *dma_chan = &mx3_fbi->idmac_channel->dma_chan;
-       struct dma_async_tx_descriptor *txd;
-       int ret;
-
-       dev_dbg(fbi->device, "%s [%c]\n", __func__,
-               list_empty(&mx3_fbi->idmac_channel->queue) ? '-' : '+');
-
-       if (var->xoffset > 0) {
-               dev_dbg(fbi->device, "x panning not supported\n");
-               return -EINVAL;
-       }
-
-       if (fbi->var.xoffset == var->xoffset &&
-           fbi->var.yoffset == var->yoffset)
-               return 0;       /* No change, do nothing */
-
-       y_bottom = var->yoffset;
-
-       if (!(var->vmode & FB_VMODE_YWRAP))
-               y_bottom += var->yres;
-
-       if (y_bottom > fbi->var.yres_virtual)
-               return -EINVAL;
-
-       mutex_lock(&mx3_fbi->mutex);
-
-       offset = (var->yoffset * var->xres_virtual + var->xoffset) *
-               (var->bits_per_pixel / 8);
-       base = fbi->fix.smem_start + offset;
-
-       dev_dbg(fbi->device, "Updating SDC BG buf %d address=0x%08lX\n",
-               mx3_fbi->cur_ipu_buf, base);
-
-       /*
-        * We enable the End of Frame interrupt, which will free a tx-descriptor,
-        * which we will need for the next device_prep_slave_sg(). The
-        * IRQ-handler will disable the IRQ again.
-        */
-       init_completion(&mx3_fbi->flip_cmpl);
-       enable_irq(mx3_fbi->idmac_channel->eof_irq);
-
-       ret = wait_for_completion_timeout(&mx3_fbi->flip_cmpl, HZ / 10);
-       if (ret <= 0) {
-               mutex_unlock(&mx3_fbi->mutex);
-               dev_info(fbi->device, "Panning failed due to %s\n", ret < 0 ?
-                        "user interrupt" : "timeout");
-               return ret ? : -ETIMEDOUT;
-       }
-
-       mx3_fbi->cur_ipu_buf = !mx3_fbi->cur_ipu_buf;
-
-       sg_dma_address(&sg[mx3_fbi->cur_ipu_buf]) = base;
-       sg_set_page(&sg[mx3_fbi->cur_ipu_buf],
-                   virt_to_page(fbi->screen_base + offset), fbi->fix.smem_len,
-                   offset_in_page(fbi->screen_base + offset));
-
-       txd = dma_chan->device->device_prep_slave_sg(dma_chan, sg +
-               mx3_fbi->cur_ipu_buf, 1, DMA_TO_DEVICE, DMA_PREP_INTERRUPT);
-       if (!txd) {
-               dev_err(fbi->device,
-                       "Error preparing a DMA transaction descriptor.\n");
-               mutex_unlock(&mx3_fbi->mutex);
-               return -EIO;
-       }
-
-       txd->callback_param     = txd;
-       txd->callback           = mx3fb_dma_done;
-
-       /*
-        * Emulate original mx3fb behaviour: each new call to idmac_tx_submit()
-        * should switch to another buffer
-        */
-       cookie = txd->tx_submit(txd);
-       dev_dbg(fbi->device, "%d: Submit %p #%d\n", __LINE__, txd, cookie);
-       if (cookie < 0) {
-               dev_err(fbi->device,
-                       "Error updating SDC buf %d to address=0x%08lX\n",
-                       mx3_fbi->cur_ipu_buf, base);
-               mutex_unlock(&mx3_fbi->mutex);
-               return -EIO;
-       }
-
-       if (mx3_fbi->txd)
-               async_tx_ack(mx3_fbi->txd);
-       mx3_fbi->txd = txd;
-
-       fbi->var.xoffset = var->xoffset;
-       fbi->var.yoffset = var->yoffset;
-
-       if (var->vmode & FB_VMODE_YWRAP)
-               fbi->var.vmode |= FB_VMODE_YWRAP;
-       else
-               fbi->var.vmode &= ~FB_VMODE_YWRAP;
-
-       mutex_unlock(&mx3_fbi->mutex);
-
-       dev_dbg(fbi->device, "Update complete\n");
-
-       return 0;
+       struct mx3fb_info *mx3_fbi = fbi->par;
+       u32 y_bottom;
+       unsigned long base;
+       off_t offset;
+       dma_cookie_t cookie;
+       struct scatterlist *sg = mx3_fbi->sg;
+       struct dma_chan *dma_chan = &mx3_fbi->idmac_channel->dma_chan;
+       struct dma_async_tx_descriptor *txd;
+       int ret;
+
+       dev_dbg(fbi->device, "%s [%c]\n", __func__,
+               list_empty(&mx3_fbi->idmac_channel->queue) ? '-' : '+');
+
+       if (var->xoffset > 0) {
+               dev_dbg(fbi->device, "x panning not supported\n");
+               return -EINVAL;
+       }
+
+       if (fbi->var.xoffset == var->xoffset &&
+           fbi->var.yoffset == var->yoffset)
+               return 0;       /* No change, do nothing */
+
+       y_bottom = var->yoffset;
+
+       if (!(var->vmode & FB_VMODE_YWRAP))
+               y_bottom += var->yres;
+
+       if (y_bottom > fbi->var.yres_virtual)
+               return -EINVAL;
+
+       mutex_lock(&mx3_fbi->mutex);
+
+       offset = (var->yoffset * var->xres_virtual + var->xoffset) *
+               (var->bits_per_pixel / 8);
+       base = fbi->fix.smem_start + offset;
+
+       dev_dbg(fbi->device, "Updating SDC BG buf %d address=0x%08lX\n",
+               mx3_fbi->cur_ipu_buf, base);
+
+       /*
+        * We enable the End of Frame interrupt, which will free a tx-descriptor,
+        * which we will need for the next device_prep_slave_sg(). The
+        * IRQ-handler will disable the IRQ again.
+        */
+       init_completion(&mx3_fbi->flip_cmpl);
+       enable_irq(mx3_fbi->idmac_channel->eof_irq);
+
+       ret = wait_for_completion_timeout(&mx3_fbi->flip_cmpl, HZ / 10);
+       if (ret <= 0) {
+               mutex_unlock(&mx3_fbi->mutex);
+               dev_info(fbi->device, "Panning failed due to %s\n", ret < 0 ?
+                        "user interrupt" : "timeout");
+               return ret ? : -ETIMEDOUT;
+       }
+
+       mx3_fbi->cur_ipu_buf = !mx3_fbi->cur_ipu_buf;
+
+       sg_dma_address(&sg[mx3_fbi->cur_ipu_buf]) = base;
+       sg_set_page(&sg[mx3_fbi->cur_ipu_buf],
+                   virt_to_page(fbi->screen_base + offset), fbi->fix.smem_len,
+                   offset_in_page(fbi->screen_base + offset));
+
+       txd = dma_chan->device->device_prep_slave_sg(dma_chan, sg +
+               mx3_fbi->cur_ipu_buf, 1, DMA_TO_DEVICE, DMA_PREP_INTERRUPT);
+       if (!txd) {
+               dev_err(fbi->device,
+                       "Error preparing a DMA transaction descriptor.\n");
+               mutex_unlock(&mx3_fbi->mutex);
+               return -EIO;
+       }
+
+       txd->callback_param     = txd;
+       txd->callback           = mx3fb_dma_done;
+
+       /*
+        * Emulate original mx3fb behaviour: each new call to idmac_tx_submit()
+        * should switch to another buffer
+        */
+       cookie = txd->tx_submit(txd);
+       dev_dbg(fbi->device, "%d: Submit %p #%d\n", __LINE__, txd, cookie);
+       if (cookie < 0) {
+               dev_err(fbi->device,
+                       "Error updating SDC buf %d to address=0x%08lX\n",
+                       mx3_fbi->cur_ipu_buf, base);
+               mutex_unlock(&mx3_fbi->mutex);
+               return -EIO;
+       }
+
+       if (mx3_fbi->txd)
+               async_tx_ack(mx3_fbi->txd);
+       mx3_fbi->txd = txd;
+
+       fbi->var.xoffset = var->xoffset;
+       fbi->var.yoffset = var->yoffset;
+
+       if (var->vmode & FB_VMODE_YWRAP)
+               fbi->var.vmode |= FB_VMODE_YWRAP;
+       else
+               fbi->var.vmode &= ~FB_VMODE_YWRAP;
+
+       mutex_unlock(&mx3_fbi->mutex);
+
+       dev_dbg(fbi->device, "Update complete\n");
+
+       return 0;
 }
 
 /*
@@ -1124,15 +1124,15 @@ static int mx3fb_pan_display(struct fb_var_screeninfo *var,
  * blitting, rectangle filling, copy regions and cursor definition.
  */
 static struct fb_ops mx3fb_ops = {
-       .owner = THIS_MODULE,
-       .fb_set_par = mx3fb_set_par,
-       .fb_check_var = mx3fb_check_var,
-       .fb_setcolreg = mx3fb_setcolreg,
-       .fb_pan_display = mx3fb_pan_display,
-       .fb_fillrect = cfb_fillrect,
-       .fb_copyarea = cfb_copyarea,
-       .fb_imageblit = cfb_imageblit,
-       .fb_blank = mx3fb_blank,
+       .owner = THIS_MODULE,
+       .fb_set_par = mx3fb_set_par,
+       .fb_check_var = mx3fb_check_var,
+       .fb_setcolreg = mx3fb_setcolreg,
+       .fb_pan_display = mx3fb_pan_display,
+       .fb_fillrect = cfb_fillrect,
+       .fb_copyarea = cfb_copyarea,
+       .fb_imageblit = cfb_imageblit,
+       .fb_blank = mx3fb_blank,
 };
 
 #ifdef CONFIG_PM
@@ -1146,19 +1146,19 @@ static struct fb_ops mx3fb_ops = {
  */
 static int mx3fb_suspend(struct platform_device *pdev, pm_message_t state)
 {
-       struct mx3fb_data *drv_data = platform_get_drvdata(pdev);
-       struct mx3fb_info *mx3_fbi = drv_data->fbi->par;
+       struct mx3fb_data *drv_data = platform_get_drvdata(pdev);
+       struct mx3fb_info *mx3_fbi = drv_data->fbi->par;
 
-       acquire_console_sem();
-       fb_set_suspend(drv_data->fbi, 1);
-       release_console_sem();
+       acquire_console_sem();
+       fb_set_suspend(drv_data->fbi, 1);
+       release_console_sem();
 
-       if (mx3_fbi->blank == FB_BLANK_UNBLANK) {
-               sdc_disable_channel(mx3_fbi);
-               sdc_set_brightness(mx3fb, 0);
+       if (mx3_fbi->blank == FB_BLANK_UNBLANK) {
+               sdc_disable_channel(mx3_fbi);
+               sdc_set_brightness(mx3fb, 0);
 
-       }
-       return 0;
+       }
+       return 0;
 }
 
 /*
@@ -1166,19 +1166,19 @@ static int mx3fb_suspend(struct platform_device *pdev, pm_message_t state)
  */
 static int mx3fb_resume(struct platform_device *pdev)
 {
-       struct mx3fb_data *drv_data = platform_get_drvdata(pdev);
-       struct mx3fb_info *mx3_fbi = drv_data->fbi->par;
+       struct mx3fb_data *drv_data = platform_get_drvdata(pdev);
+       struct mx3fb_info *mx3_fbi = drv_data->fbi->par;
 
-       if (mx3_fbi->blank == FB_BLANK_UNBLANK) {
-               sdc_enable_channel(mx3_fbi);
-               sdc_set_brightness(mx3fb, drv_data->backlight_level);
-       }
+       if (mx3_fbi->blank == FB_BLANK_UNBLANK) {
+               sdc_enable_channel(mx3_fbi);
+               sdc_set_brightness(mx3fb, drv_data->backlight_level);
+       }
 
-       acquire_console_sem();
-       fb_set_suspend(drv_data->fbi, 0);
-       release_console_sem();
+       acquire_console_sem();
+       fb_set_suspend(drv_data->fbi, 0);
+       release_console_sem();
 
-       return 0;
+       return 0;
 }
 #else
 #define mx3fb_suspend   NULL
@@ -1191,8 +1191,8 @@ static int mx3fb_resume(struct platform_device *pdev)
 
 /**
  * mx3fb_map_video_memory() - allocates the DRAM memory for the frame buffer.
- * @fbi:       framebuffer information pointer
- * @return:    Error code indicating success or failure
+ * @fbi:       framebuffer information pointer
+ * @return:    Error code indicating success or failure
  *
  * This buffer is remapped into a non-cached, non-buffered, memory region to
  * allow palette and pixel writes to occur without flushing the cache. Once this
@@ -1201,349 +1201,349 @@ static int mx3fb_resume(struct platform_device *pdev)
  */
 static int mx3fb_map_video_memory(struct fb_info *fbi)
 {
-       int retval = 0;
-       dma_addr_t addr;
+       int retval = 0;
+       dma_addr_t addr;
 
-       fbi->screen_base = dma_alloc_writecombine(fbi->device,
-                                                 fbi->fix.smem_len,
-                                                 &addr, GFP_DMA);
+       fbi->screen_base = dma_alloc_writecombine(fbi->device,
+                                                 fbi->fix.smem_len,
+                                                 &addr, GFP_DMA);
 
-       if (!fbi->screen_base) {
-               dev_err(fbi->device, "Cannot allocate %u bytes framebuffer memory\n",
-                       fbi->fix.smem_len);
-               retval = -EBUSY;
-               goto err0;
-       }
+       if (!fbi->screen_base) {
+               dev_err(fbi->device, "Cannot allocate %u bytes framebuffer memory\n",
+                       fbi->fix.smem_len);
+               retval = -EBUSY;
+               goto err0;
+       }
 
-       fbi->fix.smem_start = addr;
+       fbi->fix.smem_start = addr;
 
-       dev_dbg(fbi->device, "allocated fb @ p=0x%08x, v=0x%p, size=%d.\n",
-               (uint32_t) fbi->fix.smem_start, fbi->screen_base, fbi->fix.smem_len);
+       dev_dbg(fbi->device, "allocated fb @ p=0x%08x, v=0x%p, size=%d.\n",
+               (uint32_t) fbi->fix.smem_start, fbi->screen_base, fbi->fix.smem_len);
 
-       fbi->screen_size = fbi->fix.smem_len;
+       fbi->screen_size = fbi->fix.smem_len;
 
-       /* Clear the screen */
-       memset((char *)fbi->screen_base, 0, fbi->fix.smem_len);
+       /* Clear the screen */
+       memset((char *)fbi->screen_base, 0, fbi->fix.smem_len);
 
-       return 0;
+       return 0;
 
 err0:
-       fbi->fix.smem_len = 0;
-       fbi->fix.smem_start = 0;
-       fbi->screen_base = NULL;
-       return retval;
+       fbi->fix.smem_len = 0;
+       fbi->fix.smem_start = 0;
+       fbi->screen_base = NULL;
+       return retval;
 }
 
 /**
  * mx3fb_unmap_video_memory() - de-allocate frame buffer memory.
- * @fbi:       framebuffer information pointer
- * @return:    error code indicating success or failure
+ * @fbi:       framebuffer information pointer
+ * @return:    error code indicating success or failure
  */
 static int mx3fb_unmap_video_memory(struct fb_info *fbi)
 {
-       dma_free_writecombine(fbi->device, fbi->fix.smem_len,
-                             fbi->screen_base, fbi->fix.smem_start);
+       dma_free_writecombine(fbi->device, fbi->fix.smem_len,
+                             fbi->screen_base, fbi->fix.smem_start);
 
-       fbi->screen_base = 0;
-       fbi->fix.smem_start = 0;
-       fbi->fix.smem_len = 0;
-       return 0;
+       fbi->screen_base = 0;
+       fbi->fix.smem_start = 0;
+       fbi->fix.smem_len = 0;
+       return 0;
 }
 
 /**
  * mx3fb_init_fbinfo() - initialize framebuffer information object.
- * @return:    initialized framebuffer structure.
+ * @return:    initialized framebuffer structure.
  */
 static struct fb_info *mx3fb_init_fbinfo(struct device *dev, struct fb_ops *ops)
 {
-       struct fb_info *fbi;
-       struct mx3fb_info *mx3fbi;
-       int ret;
+       struct fb_info *fbi;
+       struct mx3fb_info *mx3fbi;
+       int ret;
 
-       /* Allocate sufficient memory for the fb structure */
-       fbi = framebuffer_alloc(sizeof(struct mx3fb_info), dev);
-       if (!fbi)
-               return NULL;
+       /* Allocate sufficient memory for the fb structure */
+       fbi = framebuffer_alloc(sizeof(struct mx3fb_info), dev);
+       if (!fbi)
+               return NULL;
 
-       mx3fbi                  = fbi->par;
-       mx3fbi->cookie          = -EINVAL;
-       mx3fbi->cur_ipu_buf     = 0;
+       mx3fbi                  = fbi->par;
+       mx3fbi->cookie          = -EINVAL;
+       mx3fbi->cur_ipu_buf     = 0;
 
-       fbi->var.activate       = FB_ACTIVATE_NOW;
+       fbi->var.activate       = FB_ACTIVATE_NOW;
 
-       fbi->fbops              = ops;
-       fbi->flags              = FBINFO_FLAG_DEFAULT;
-       fbi->pseudo_palette     = mx3fbi->pseudo_palette;
+       fbi->fbops              = ops;
+       fbi->flags              = FBINFO_FLAG_DEFAULT;
+       fbi->pseudo_palette     = mx3fbi->pseudo_palette;
 
-       mutex_init(&mx3fbi->mutex);
+       mutex_init(&mx3fbi->mutex);
 
-       /* Allocate colormap */
-       ret = fb_alloc_cmap(&fbi->cmap, 16, 0);
-       if (ret < 0) {
-               framebuffer_release(fbi);
-               return NULL;
-       }
+       /* Allocate colormap */
+       ret = fb_alloc_cmap(&fbi->cmap, 16, 0);
+       if (ret < 0) {
+               framebuffer_release(fbi);
+               return NULL;
+       }
 
-       return fbi;
+       return fbi;
 }
 
 static int init_fb_chan(struct mx3fb_data *mx3fb, struct idmac_channel *ichan)
 {
-       struct device *dev = mx3fb->dev;
-       struct mx3fb_platform_data *mx3fb_pdata = dev->platform_data;
-       const char *name = mx3fb_pdata->name;
-       unsigned int irq;
-       struct fb_info *fbi;
-       struct mx3fb_info *mx3fbi;
-       const struct fb_videomode *mode;
-       int ret, num_modes;
+       struct device *dev = mx3fb->dev;
+       struct mx3fb_platform_data *mx3fb_pdata = dev->platform_data;
+       const char *name = mx3fb_pdata->name;
+       unsigned int irq;
+       struct fb_info *fbi;
+       struct mx3fb_info *mx3fbi;
+       const struct fb_videomode *mode;
+       int ret, num_modes;
 
-       ichan->client = mx3fb;
-       irq = ichan->eof_irq;
+       ichan->client = mx3fb;
+       irq = ichan->eof_irq;
 
-       if (ichan->dma_chan.chan_id != IDMAC_SDC_0)
-               return -EINVAL;
+       if (ichan->dma_chan.chan_id != IDMAC_SDC_0)
+               return -EINVAL;
 
-       fbi = mx3fb_init_fbinfo(dev, &mx3fb_ops);
-       if (!fbi)
-               return -ENOMEM;
+       fbi = mx3fb_init_fbinfo(dev, &mx3fb_ops);
+       if (!fbi)
+               return -ENOMEM;
 
-       if (!fb_mode)
-               fb_mode = name;
+       if (!fb_mode)
+               fb_mode = name;
 
-       if (!fb_mode) {
-               ret = -EINVAL;
-               goto emode;
-       }
+       if (!fb_mode) {
+               ret = -EINVAL;
+               goto emode;
+       }
 
-       if (mx3fb_pdata->mode && mx3fb_pdata->num_modes) {
-               mode = mx3fb_pdata->mode;
-               num_modes = mx3fb_pdata->num_modes;
-       } else {
-               mode = mx3fb_modedb;
-               num_modes = ARRAY_SIZE(mx3fb_modedb);
-       }
+       if (mx3fb_pdata->mode && mx3fb_pdata->num_modes) {
+               mode = mx3fb_pdata->mode;
+               num_modes = mx3fb_pdata->num_modes;
+       } else {
+               mode = mx3fb_modedb;
+               num_modes = ARRAY_SIZE(mx3fb_modedb);
+       }
 
-       if (!fb_find_mode(&fbi->var, fbi, fb_mode, mode,
-                         num_modes, NULL, default_bpp)) {
-               ret = -EBUSY;
-               goto emode;
-       }
+       if (!fb_find_mode(&fbi->var, fbi, fb_mode, mode,
+                         num_modes, NULL, default_bpp)) {
+               ret = -EBUSY;
+               goto emode;
+       }
 
-       fb_videomode_to_modelist(mode, num_modes, &fbi->modelist);
+       fb_videomode_to_modelist(mode, num_modes, &fbi->modelist);
 
-       /* Default Y virtual size is 2x panel size */
-       fbi->var.yres_virtual = fbi->var.yres * 2;
+       /* Default Y virtual size is 2x panel size */
+       fbi->var.yres_virtual = fbi->var.yres * 2;
 
-       mx3fb->fbi = fbi;
+       mx3fb->fbi = fbi;
 
-       /* set Display Interface clock period */
-       mx3fb_write_reg(mx3fb, 0x00100010L, DI_HSP_CLK_PER);
-       /* Might need to trigger HSP clock change - see 44.3.3.8.5 */
+       /* set Display Interface clock period */
+       mx3fb_write_reg(mx3fb, 0x00100010L, DI_HSP_CLK_PER);
+       /* Might need to trigger HSP clock change - see 44.3.3.8.5 */
 
-       sdc_set_brightness(mx3fb, 255);
-       sdc_set_global_alpha(mx3fb, true, 0xFF);
-       sdc_set_color_key(mx3fb, IDMAC_SDC_0, false, 0);
+       sdc_set_brightness(mx3fb, 255);
+       sdc_set_global_alpha(mx3fb, true, 0xFF);
+       sdc_set_color_key(mx3fb, IDMAC_SDC_0, false, 0);
 
-       mx3fbi                  = fbi->par;
-       mx3fbi->idmac_channel   = ichan;
-       mx3fbi->ipu_ch          = ichan->dma_chan.chan_id;
-       mx3fbi->mx3fb           = mx3fb;
-       mx3fbi->blank           = FB_BLANK_NORMAL;
+       mx3fbi                  = fbi->par;
+       mx3fbi->idmac_channel   = ichan;
+       mx3fbi->ipu_ch          = ichan->dma_chan.chan_id;
+       mx3fbi->mx3fb           = mx3fb;
+       mx3fbi->blank           = FB_BLANK_NORMAL;
 
-       init_completion(&mx3fbi->flip_cmpl);
-       disable_irq(ichan->eof_irq);
-       dev_dbg(mx3fb->dev, "disabling irq %d\n", ichan->eof_irq);
-       ret = mx3fb_set_par(fbi);
-       if (ret < 0)
-               goto esetpar;
+       init_completion(&mx3fbi->flip_cmpl);
+       disable_irq(ichan->eof_irq);
+       dev_dbg(mx3fb->dev, "disabling irq %d\n", ichan->eof_irq);
+       ret = mx3fb_set_par(fbi);
+       if (ret < 0)
+               goto esetpar;
 
-       mx3fb_blank(FB_BLANK_UNBLANK, fbi);
+       mx3fb_blank(FB_BLANK_UNBLANK, fbi);
 
-       dev_info(dev, "mx3fb: fb registered, using mode %s\n", fb_mode);
+       dev_info(dev, "mx3fb: fb registered, using mode %s\n", fb_mode);
 
-       ret = register_framebuffer(fbi);
-       if (ret < 0)
-               goto erfb;
+       ret = register_framebuffer(fbi);
+       if (ret < 0)
+               goto erfb;
 
-       return 0;
+       return 0;
 
 erfb:
 esetpar:
 emode:
-       fb_dealloc_cmap(&fbi->cmap);
-       framebuffer_release(fbi);
+       fb_dealloc_cmap(&fbi->cmap);
+       framebuffer_release(fbi);
 
-       return ret;
+       return ret;
 }
 
 static bool chan_filter(struct dma_chan *chan, void *arg)
 {
-       struct dma_chan_request *rq = arg;
-       struct device *dev;
-       struct mx3fb_platform_data *mx3fb_pdata;
+       struct dma_chan_request *rq = arg;
+       struct device *dev;
+       struct mx3fb_platform_data *mx3fb_pdata;
 
-       if (!rq)
-               return false;
+       if (!rq)
+               return false;
 
-       dev = rq->mx3fb->dev;
-       mx3fb_pdata = dev->platform_data;
+       dev = rq->mx3fb->dev;
+       mx3fb_pdata = dev->platform_data;
 
-       return rq->id == chan->chan_id &&
-               mx3fb_pdata->dma_dev == chan->device->dev;
+       return rq->id == chan->chan_id &&
+               mx3fb_pdata->dma_dev == chan->device->dev;
 }
 
 static void release_fbi(struct fb_info *fbi)
 {
-       mx3fb_unmap_video_memory(fbi);
+       mx3fb_unmap_video_memory(fbi);
 
-       fb_dealloc_cmap(&fbi->cmap);
+       fb_dealloc_cmap(&fbi->cmap);
 
-       unregister_framebuffer(fbi);
-       framebuffer_release(fbi);
+       unregister_framebuffer(fbi);
+       framebuffer_release(fbi);
 }
 
 static int mx3fb_probe(struct platform_device *pdev)
 {
-       struct device *dev = &pdev->dev;
-       int ret;
-       struct resource *sdc_reg;
-       struct mx3fb_data *mx3fb;
-       dma_cap_mask_t mask;
-       struct dma_chan *chan;
-       struct dma_chan_request rq;
-
-       /*
-        * Display Interface (DI) and Synchronous Display Controller (SDC)
-        * registers
-        */
-       sdc_reg = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       if (!sdc_reg)
-               return -EINVAL;
-
-       mx3fb = kzalloc(sizeof(*mx3fb), GFP_KERNEL);
-       if (!mx3fb)
-               return -ENOMEM;
-
-       spin_lock_init(&mx3fb->lock);
-
-       mx3fb->reg_base = ioremap(sdc_reg->start, resource_size(sdc_reg));
-       if (!mx3fb->reg_base) {
-               ret = -ENOMEM;
-               goto eremap;
-       }
-
-       pr_debug("Remapped %x to %x at %p\n", sdc_reg->start, sdc_reg->end,
-                mx3fb->reg_base);
-
-       /* IDMAC interface */
-       dmaengine_get();
-
-       mx3fb->dev = dev;
-       platform_set_drvdata(pdev, mx3fb);
-
-       rq.mx3fb = mx3fb;
-
-       dma_cap_zero(mask);
-       dma_cap_set(DMA_SLAVE, mask);
-       dma_cap_set(DMA_PRIVATE, mask);
-       rq.id = IDMAC_SDC_0;
-       chan = dma_request_channel(mask, chan_filter, &rq);
-       if (!chan) {
-               ret = -EBUSY;
-               goto ersdc0;
-       }
-
-       ret = init_fb_chan(mx3fb, to_idmac_chan(chan));
-       if (ret < 0)
-               goto eisdc0;
-
-       mx3fb->backlight_level = 255;
-
-       return 0;
+       struct device *dev = &pdev->dev;
+       int ret;
+       struct resource *sdc_reg;
+       struct mx3fb_data *mx3fb;
+       dma_cap_mask_t mask;
+       struct dma_chan *chan;
+       struct dma_chan_request rq;
+
+       /*
+        * Display Interface (DI) and Synchronous Display Controller (SDC)
+        * registers
+        */
+       sdc_reg = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+       if (!sdc_reg)
+               return -EINVAL;
+
+       mx3fb = kzalloc(sizeof(*mx3fb), GFP_KERNEL);
+       if (!mx3fb)
+               return -ENOMEM;
+
+       spin_lock_init(&mx3fb->lock);
+
+       mx3fb->reg_base = ioremap(sdc_reg->start, resource_size(sdc_reg));
+       if (!mx3fb->reg_base) {
+               ret = -ENOMEM;
+               goto eremap;
+       }
+
+       pr_debug("Remapped %x to %x at %p\n", sdc_reg->start, sdc_reg->end,
+                mx3fb->reg_base);
+
+       /* IDMAC interface */
+       dmaengine_get();
+
+       mx3fb->dev = dev;
+       platform_set_drvdata(pdev, mx3fb);
+
+       rq.mx3fb = mx3fb;
+
+       dma_cap_zero(mask);
+       dma_cap_set(DMA_SLAVE, mask);
+       dma_cap_set(DMA_PRIVATE, mask);
+       rq.id = IDMAC_SDC_0;
+       chan = dma_request_channel(mask, chan_filter, &rq);
+       if (!chan) {
+               ret = -EBUSY;
+               goto ersdc0;
+       }
+
+       ret = init_fb_chan(mx3fb, to_idmac_chan(chan));
+       if (ret < 0)
+               goto eisdc0;
+
+       mx3fb->backlight_level = 255;
+
+       return 0;
 
 eisdc0:
-       dma_release_channel(chan);
+       dma_release_channel(chan);
 ersdc0:
-       dmaengine_put();
-       iounmap(mx3fb->reg_base);
+       dmaengine_put();
+       iounmap(mx3fb->reg_base);
 eremap:
-       kfree(mx3fb);
-       dev_err(dev, "mx3fb: failed to register fb\n");
-       return ret;
+       kfree(mx3fb);
+       dev_err(dev, "mx3fb: failed to register fb\n");
+       return ret;
 }
 
 static int mx3fb_remove(struct platform_device *dev)
 {
-       struct mx3fb_data *mx3fb = platform_get_drvdata(dev);
-       struct fb_info *fbi = mx3fb->fbi;
-       struct mx3fb_info *mx3_fbi = fbi->par;
-       struct dma_chan *chan;
+       struct mx3fb_data *mx3fb = platform_get_drvdata(dev);
+       struct fb_info *fbi = mx3fb->fbi;
+       struct mx3fb_info *mx3_fbi = fbi->par;
+       struct dma_chan *chan;
 
-       chan = &mx3_fbi->idmac_channel->dma_chan;
-       release_fbi(fbi);
+       chan = &mx3_fbi->idmac_channel->dma_chan;
+       release_fbi(fbi);
 
-       dma_release_channel(chan);
-       dmaengine_put();
+       dma_release_channel(chan);
+       dmaengine_put();
 
-       iounmap(mx3fb->reg_base);
-       kfree(mx3fb);
-       return 0;
+       iounmap(mx3fb->reg_base);
+       kfree(mx3fb);
+       return 0;
 }
 
 static struct platform_driver mx3fb_driver = {
-       .driver = {
-                  .name = MX3FB_NAME,
-       },
-       .probe = mx3fb_probe,
-       .remove = mx3fb_remove,
-       .suspend = mx3fb_suspend,
-       .resume = mx3fb_resume,
+       .driver = {
+                  .name = MX3FB_NAME,
+       },
+       .probe = mx3fb_probe,
+       .remove = mx3fb_remove,
+       .suspend = mx3fb_suspend,
+       .resume = mx3fb_resume,
 };
 
 /*
  * Parse user specified options (`video=mx3fb:')
  * example:
- *     video=mx3fb:bpp=16
+ *     video=mx3fb:bpp=16
  */
 static int mx3fb_setup(void)
 {
 #ifndef MODULE
-       char *opt, *options = NULL;
-
-       if (fb_get_options("mx3fb", &options))
-               return -ENODEV;
-
-       if (!options || !*options)
-               return 0;
-
-       while ((opt = strsep(&options, ",")) != NULL) {
-               if (!*opt)
-                       continue;
-               if (!strncmp(opt, "bpp=", 4))
-                       default_bpp = simple_strtoul(opt + 4, NULL, 0);
-               else
-                       fb_mode = opt;
-       }
+       char *opt, *options = NULL;
+
+       if (fb_get_options("mx3fb", &options))
+               return -ENODEV;
+
+       if (!options || !*options)
+               return 0;
+
+       while ((opt = strsep(&options, ",")) != NULL) {
+               if (!*opt)
+                       continue;
+               if (!strncmp(opt, "bpp=", 4))
+                       default_bpp = simple_strtoul(opt + 4, NULL, 0);
+               else
+                       fb_mode = opt;
+       }
 #endif
 
-       return 0;
+       return 0;
 }
 
 static int __init mx3fb_init(void)
 {
-       int ret = mx3fb_setup();
+       int ret = mx3fb_setup();
 
-       if (ret < 0)
-               return ret;
+       if (ret < 0)
+               return ret;
 
-       ret = platform_driver_register(&mx3fb_driver);
-       return ret;
+       ret = platform_driver_register(&mx3fb_driver);
+       return ret;
 }
 
 static void __exit mx3fb_exit(void)
 {
-       platform_driver_unregister(&mx3fb_driver);
+       platform_driver_unregister(&mx3fb_driver);
 }
 
 module_init(mx3fb_init);
index 2552b9f325ee9b4c33eea202329e23e47b544c3e..84f63205c46d1478ea4519e21b87f404caa6988d 100644 (file)
@@ -59,7 +59,6 @@
 #include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/div64.h>
-#include <mach/pxa-regs.h>
 #include <mach/bitfield.h>
 #include <mach/pxafb.h>
 
@@ -883,10 +882,21 @@ static void __devinit init_pxafb_overlay(struct pxafb_info *fbi,
        init_completion(&ofb->branch_done);
 }
 
+static inline int pxafb_overlay_supported(void)
+{
+       if (cpu_is_pxa27x() || cpu_is_pxa3xx())
+               return 1;
+
+       return 0;
+}
+
 static int __devinit pxafb_overlay_init(struct pxafb_info *fbi)
 {
        int i, ret;
 
+       if (!pxafb_overlay_supported())
+               return 0;
+
        for (i = 0; i < 2; i++) {
                init_pxafb_overlay(fbi, &fbi->overlay[i], i);
                ret = register_framebuffer(&fbi->overlay[i].fb);
@@ -909,6 +919,9 @@ static void __devexit pxafb_overlay_exit(struct pxafb_info *fbi)
 {
        int i;
 
+       if (!pxafb_overlay_supported())
+               return;
+
        for (i = 0; i < 2; i++)
                unregister_framebuffer(&fbi->overlay[i].fb);
 }
index 79cf0b1976aa19b618dce166d54044e48ecc7012..b0b4513ba53784014c6bf0c6c60fc576d7f054f7 100644 (file)
@@ -1017,6 +1017,10 @@ static int s3c2410fb_resume(struct platform_device *dev)
 
        s3c2410fb_init_registers(fbinfo);
 
+       /* re-activate our display after resume */
+       s3c2410fb_activate_var(fbinfo);
+       s3c2410fb_blank(FB_BLANK_UNBLANK, fbinfo);
+
        return 0;
 }
 
index 076f946fa0f544dc611ff69d08be2ff3425e8ba2..022d07abbf99cd3157f419275de1c65ac6d3c94e 100644 (file)
@@ -251,22 +251,6 @@ static struct sa1100fb_mach_info pal_info __initdata = {
 #endif
 #endif
 
-#ifdef CONFIG_SA1100_H3800
-static struct sa1100fb_mach_info h3800_info __initdata = {
-       .pixclock       = 174757,       .bpp            = 16,
-       .xres           = 320,          .yres           = 240,
-
-       .hsync_len      = 3,            .vsync_len      = 3,
-       .left_margin    = 12,           .upper_margin   = 10,
-       .right_margin   = 17,           .lower_margin   = 1,
-
-       .cmap_static    = 1,
-
-       .lccr0          = LCCR0_Color | LCCR0_Sngl | LCCR0_Act,
-       .lccr3          = LCCR3_OutEnH | LCCR3_PixRsEdg | LCCR3_ACBsDiv(2),
-};
-#endif
-
 #ifdef CONFIG_SA1100_H3600
 static struct sa1100fb_mach_info h3600_info __initdata = {
        .pixclock       = 174757,       .bpp            = 16,
@@ -432,11 +416,6 @@ sa1100fb_get_machine_info(struct sa1100fb_info *fbi)
                fbi->rgb[RGB_16] = &h3600_rgb_16;
        }
 #endif
-#ifdef CONFIG_SA1100_H3800
-       if (machine_is_h3800()) {
-               inf = &h3800_info;
-       }
-#endif
 #ifdef CONFIG_SA1100_COLLIE
        if (machine_is_collie()) {
                inf = &collie_info;
index 0e2b8fd24df1ed0d1d2de77751fbcfd0cbe2a047..2c5d069e5f06bc0b0cc1461c4ed7d37d2ed3081d 100644 (file)
@@ -446,7 +446,6 @@ static void sh_mobile_lcdc_stop(struct sh_mobile_lcdc_priv *priv)
 {
        struct sh_mobile_lcdc_chan *ch;
        struct sh_mobile_lcdc_board_cfg *board_cfg;
-       unsigned long tmp;
        int k;
 
        /* tell the board code to disable the panel */
@@ -456,9 +455,8 @@ static void sh_mobile_lcdc_stop(struct sh_mobile_lcdc_priv *priv)
                if (board_cfg->display_off)
                        board_cfg->display_off(board_cfg->board_data);
 
-               /* cleanup deferred io if SYS bus */
-               tmp = ch->cfg.sys_bus_cfg.deferred_io_msec;
-               if (ch->ldmt1r_value & (1 << 12) && tmp) {
+               /* cleanup deferred io if enabled */
+               if (ch->info.fbdefio) {
                        fb_deferred_io_cleanup(&ch->info);
                        ch->info.fbdefio = NULL;
                }
index b9d74d0b353ec438c3afd0a79c24fd6e6cfe8538..65244c02551b404963ac5480b96e1bfb2f9356a0 100644 (file)
@@ -116,7 +116,7 @@ static int __init mxc_w1_probe(struct platform_device *pdev)
        if (!mdev)
                return -ENOMEM;
 
-       mdev->clk = clk_get(&pdev->dev, "owire_clk");
+       mdev->clk = clk_get(&pdev->dev, "owire");
        if (!mdev->clk) {
                err = -ENODEV;
                goto failed_clk;
index c973889110c888d5b0411b44af3c040a17aa7399..a7e3b706b9d31f0cce657c448de4bedf8d91bd48 100644 (file)
@@ -590,8 +590,8 @@ static int __init omap_hdq_probe(struct platform_device *pdev)
        }
 
        /* get interface & functional clock objects */
-       hdq_data->hdq_ick = clk_get(&pdev->dev, "hdq_ick");
-       hdq_data->hdq_fck = clk_get(&pdev->dev, "hdq_fck");
+       hdq_data->hdq_ick = clk_get(&pdev->dev, "ick");
+       hdq_data->hdq_fck = clk_get(&pdev->dev, "fck");
 
        if (IS_ERR(hdq_data->hdq_ick) || IS_ERR(hdq_data->hdq_fck)) {
                dev_dbg(&pdev->dev, "Can't get HDQ clock objects\n");
index f0c2b7a1a175b0d23bbaec7878f8da9e5d8b2768..734d9806a872bc300ad756ab7978192025a58f37 100644 (file)
@@ -269,7 +269,7 @@ static int __devinit gef_wdt_probe(struct of_device *dev,
        bus_clk = 133; /* in MHz */
 
        freq = fsl_get_sys_freq();
-       if (freq > 0)
+       if (freq != -1)
                bus_clk = freq;
 
        /* Map devices registers into memory */
index 0b798fdaa378eccd53e39c5ab1fa538e19388b03..74c92d38411285b1c64c8e87febead6658b9da5e 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/watchdog.h>
 #include <linux/io.h>
 #include <linux/uaccess.h>
+#include <mach/timex.h>
 #include <mach/regs-timer.h>
 
 #define WDT_DEFAULT_TIME       5       /* seconds */
index 2f2ce7429f5bb86f18cb3d381ad22f43c57624cb..aa5ad6e33f023db62e13addcc74d2c69d7d652b8 100644 (file)
@@ -60,9 +60,8 @@ struct omap_wdt_dev {
        void __iomem    *base;          /* physical */
        struct device   *dev;
        int             omap_wdt_users;
-       struct clk      *armwdt_ck;
-       struct clk      *mpu_wdt_ick;
-       struct clk      *mpu_wdt_fck;
+       struct clk      *ick;
+       struct clk      *fck;
        struct resource *mem;
        struct miscdevice omap_wdt_miscdev;
 };
@@ -146,13 +145,8 @@ static int omap_wdt_open(struct inode *inode, struct file *file)
        if (test_and_set_bit(1, (unsigned long *)&(wdev->omap_wdt_users)))
                return -EBUSY;
 
-       if (cpu_is_omap16xx())
-               clk_enable(wdev->armwdt_ck);    /* Enable the clock */
-
-       if (cpu_is_omap24xx() || cpu_is_omap34xx()) {
-               clk_enable(wdev->mpu_wdt_ick);    /* Enable the interface clock */
-               clk_enable(wdev->mpu_wdt_fck);    /* Enable the functional clock */
-       }
+       clk_enable(wdev->ick);    /* Enable the interface clock */
+       clk_enable(wdev->fck);    /* Enable the functional clock */
 
        /* initialize prescaler */
        while (__raw_readl(base + OMAP_WATCHDOG_WPS) & 0x01)
@@ -181,13 +175,8 @@ static int omap_wdt_release(struct inode *inode, struct file *file)
 
        omap_wdt_disable(wdev);
 
-       if (cpu_is_omap16xx())
-               clk_disable(wdev->armwdt_ck);   /* Disable the clock */
-
-       if (cpu_is_omap24xx() || cpu_is_omap34xx()) {
-               clk_disable(wdev->mpu_wdt_ick); /* Disable the clock */
-               clk_disable(wdev->mpu_wdt_fck); /* Disable the clock */
-       }
+       clk_disable(wdev->ick);
+       clk_disable(wdev->fck);
 #else
        printk(KERN_CRIT "omap_wdt: Unexpected close, not stopping!\n");
 #endif
@@ -303,44 +292,19 @@ static int __init omap_wdt_probe(struct platform_device *pdev)
        wdev->omap_wdt_users = 0;
        wdev->mem = mem;
 
-       if (cpu_is_omap16xx()) {
-               wdev->armwdt_ck = clk_get(&pdev->dev, "armwdt_ck");
-               if (IS_ERR(wdev->armwdt_ck)) {
-                       ret = PTR_ERR(wdev->armwdt_ck);
-                       wdev->armwdt_ck = NULL;
-                       goto err_clk;
-               }
+       wdev->ick = clk_get(&pdev->dev, "ick");
+       if (IS_ERR(wdev->ick)) {
+               ret = PTR_ERR(wdev->ick);
+               wdev->ick = NULL;
+               goto err_clk;
        }
-
-       if (cpu_is_omap24xx()) {
-               wdev->mpu_wdt_ick = clk_get(&pdev->dev, "mpu_wdt_ick");
-               if (IS_ERR(wdev->mpu_wdt_ick)) {
-                       ret = PTR_ERR(wdev->mpu_wdt_ick);
-                       wdev->mpu_wdt_ick = NULL;
-                       goto err_clk;
-               }
-               wdev->mpu_wdt_fck = clk_get(&pdev->dev, "mpu_wdt_fck");
-               if (IS_ERR(wdev->mpu_wdt_fck)) {
-                       ret = PTR_ERR(wdev->mpu_wdt_fck);
-                       wdev->mpu_wdt_fck = NULL;
-                       goto err_clk;
-               }
+       wdev->fck = clk_get(&pdev->dev, "fck");
+       if (IS_ERR(wdev->fck)) {
+               ret = PTR_ERR(wdev->fck);
+               wdev->fck = NULL;
+               goto err_clk;
        }
 
-       if (cpu_is_omap34xx()) {
-               wdev->mpu_wdt_ick = clk_get(&pdev->dev, "wdt2_ick");
-               if (IS_ERR(wdev->mpu_wdt_ick)) {
-                       ret = PTR_ERR(wdev->mpu_wdt_ick);
-                       wdev->mpu_wdt_ick = NULL;
-                       goto err_clk;
-               }
-               wdev->mpu_wdt_fck = clk_get(&pdev->dev, "wdt2_fck");
-               if (IS_ERR(wdev->mpu_wdt_fck)) {
-                       ret = PTR_ERR(wdev->mpu_wdt_fck);
-                       wdev->mpu_wdt_fck = NULL;
-                       goto err_clk;
-               }
-       }
        wdev->base = ioremap(res->start, res->end - res->start + 1);
        if (!wdev->base) {
                ret = -ENOMEM;
@@ -380,12 +344,10 @@ err_ioremap:
        wdev->base = NULL;
 
 err_clk:
-       if (wdev->armwdt_ck)
-               clk_put(wdev->armwdt_ck);
-       if (wdev->mpu_wdt_ick)
-               clk_put(wdev->mpu_wdt_ick);
-       if (wdev->mpu_wdt_fck)
-               clk_put(wdev->mpu_wdt_fck);
+       if (wdev->ick)
+               clk_put(wdev->ick);
+       if (wdev->fck)
+               clk_put(wdev->fck);
        kfree(wdev);
 
 err_kzalloc:
@@ -417,20 +379,8 @@ static int omap_wdt_remove(struct platform_device *pdev)
        release_mem_region(res->start, res->end - res->start + 1);
        platform_set_drvdata(pdev, NULL);
 
-       if (wdev->armwdt_ck) {
-               clk_put(wdev->armwdt_ck);
-               wdev->armwdt_ck = NULL;
-       }
-
-       if (wdev->mpu_wdt_ick) {
-               clk_put(wdev->mpu_wdt_ick);
-               wdev->mpu_wdt_ick = NULL;
-       }
-
-       if (wdev->mpu_wdt_fck) {
-               clk_put(wdev->mpu_wdt_fck);
-               wdev->mpu_wdt_fck = NULL;
-       }
+       clk_put(wdev->ick);
+       clk_put(wdev->fck);
        iounmap(wdev->base);
 
        kfree(wdev);
index 14a339f58b6a7627c3a4f82665a1fe70ecd8c907..b64ae1a17832c0e6dd53b045af77d805db005b86 100644 (file)
@@ -29,6 +29,7 @@
 #define  WDT_EN                        0x0010
 #define WDT_VAL                        (TIMER_VIRT_BASE + 0x0024)
 
+#define ORION5X_TCLK           166666667
 #define WDT_MAX_DURATION       (0xffffffff / ORION5X_TCLK)
 #define WDT_IN_USE             0
 #define WDT_OK_TO_CLOSE                1
index 57027f4653ce7c56b5baf783b9c90816f50e084f..f3553fa40b17f912d223220c163343c2e4895597 100644 (file)
 #include <asm/time.h>
 #include <asm/mach-rc32434/integ.h>
 
-#define MAX_TIMEOUT                    20
-#define RC32434_WDT_INTERVAL           (15 * HZ)
-
-#define VERSION "0.2"
+#define VERSION "0.4"
 
 static struct {
-       struct completion stop;
-       int running;
-       struct timer_list timer;
-       int queue;
-       int default_ticks;
        unsigned long inuse;
 } rc32434_wdt_device;
 
 static struct integ __iomem *wdt_reg;
-static int ticks = 100 * HZ;
 
 static int expect_close;
-static int timeout;
+
+/* Board internal clock speed in Hz,
+ * the watchdog timer ticks at. */
+extern unsigned int idt_cpu_freq;
+
+/* translate wtcompare value to seconds and vice versa */
+#define WTCOMP2SEC(x)  (x / idt_cpu_freq)
+#define SEC2WTCOMP(x)  (x * idt_cpu_freq)
+
+/* Use a default timeout of 20s. This should be
+ * safe for CPU clock speeds up to 400MHz, as
+ * ((2 ^ 32) - 1) / (400MHz / 2) = 21s.  */
+#define WATCHDOG_TIMEOUT 20
+
+static int timeout = WATCHDOG_TIMEOUT;
 
 static int nowayout = WATCHDOG_NOWAYOUT;
 module_param(nowayout, int, 0);
 MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
        __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
 
+/* apply or and nand masks to data read from addr and write back */
+#define SET_BITS(addr, or, nand) \
+       writel((readl(&addr) | or) & ~nand, &addr)
 
 static void rc32434_wdt_start(void)
 {
-       u32 val;
-
-       if (!rc32434_wdt_device.inuse) {
-               writel(0, &wdt_reg->wtcount);
+       u32 or, nand;
 
-               val = RC32434_ERR_WRE;
-               writel(readl(&wdt_reg->errcs) | val, &wdt_reg->errcs);
+       /* zero the counter before enabling */
+       writel(0, &wdt_reg->wtcount);
 
-               val = RC32434_WTC_EN;
-               writel(readl(&wdt_reg->wtc) | val, &wdt_reg->wtc);
-       }
-       rc32434_wdt_device.running++;
-}
+       /* don't generate a non-maskable interrupt,
+        * do a warm reset instead */
+       nand = 1 << RC32434_ERR_WNE;
+       or = 1 << RC32434_ERR_WRE;
 
-static void rc32434_wdt_stop(void)
-{
-       u32 val;
+       /* reset the ERRCS timeout bit in case it's set */
+       nand |= 1 << RC32434_ERR_WTO;
 
-       if (rc32434_wdt_device.running) {
+       SET_BITS(wdt_reg->errcs, or, nand);
 
-               val = ~RC32434_WTC_EN;
-               writel(readl(&wdt_reg->wtc) & val, &wdt_reg->wtc);
+       /* reset WTC timeout bit and enable WDT */
+       nand = 1 << RC32434_WTC_TO;
+       or = 1 << RC32434_WTC_EN;
 
-               val = ~RC32434_ERR_WRE;
-               writel(readl(&wdt_reg->errcs) & val, &wdt_reg->errcs);
+       SET_BITS(wdt_reg->wtc, or, nand);
+}
 
-               rc32434_wdt_device.running = 0;
-       }
+static void rc32434_wdt_stop(void)
+{
+       /* Disable WDT */
+       SET_BITS(wdt_reg->wtc, 0, 1 << RC32434_WTC_EN);
 }
 
-static void rc32434_wdt_set(int new_timeout)
+static int rc32434_wdt_set(int new_timeout)
 {
-       u32 cmp = new_timeout * HZ;
-       u32 state, val;
+       int max_to = WTCOMP2SEC((u32)-1);
 
+       if (new_timeout < 0 || new_timeout > max_to) {
+               printk(KERN_ERR KBUILD_MODNAME
+                       ": timeout value must be between 0 and %d",
+                       max_to);
+               return -EINVAL;
+       }
        timeout = new_timeout;
-       /*
-        * store and disable WTC
-        */
-       state = (u32)(readl(&wdt_reg->wtc) & RC32434_WTC_EN);
-       val = ~RC32434_WTC_EN;
-       writel(readl(&wdt_reg->wtc) & val, &wdt_reg->wtc);
-
-       writel(0, &wdt_reg->wtcount);
-       writel(cmp, &wdt_reg->wtcompare);
-
-       /*
-        * restore WTC
-        */
-
-       writel(readl(&wdt_reg->wtc) | state, &wdt_reg);
-}
+       writel(SEC2WTCOMP(timeout), &wdt_reg->wtcompare);
 
-static void rc32434_wdt_reset(void)
-{
-       ticks = rc32434_wdt_device.default_ticks;
+       return 0;
 }
 
-static void rc32434_wdt_update(unsigned long unused)
+static void rc32434_wdt_ping(void)
 {
-       if (rc32434_wdt_device.running)
-               ticks--;
-
        writel(0, &wdt_reg->wtcount);
-
-       if (rc32434_wdt_device.queue && ticks)
-               mod_timer(&rc32434_wdt_device.timer,
-                       jiffies + RC32434_WDT_INTERVAL);
-       else
-               complete(&rc32434_wdt_device.stop);
 }
 
 static int rc32434_wdt_open(struct inode *inode, struct file *file)
@@ -142,19 +127,23 @@ static int rc32434_wdt_open(struct inode *inode, struct file *file)
        if (nowayout)
                __module_get(THIS_MODULE);
 
+       rc32434_wdt_start();
+       rc32434_wdt_ping();
+
        return nonseekable_open(inode, file);
 }
 
 static int rc32434_wdt_release(struct inode *inode, struct file *file)
 {
-       if (expect_close && nowayout == 0) {
+       if (expect_close == 42) {
                rc32434_wdt_stop();
                printk(KERN_INFO KBUILD_MODNAME ": disabling watchdog timer\n");
                module_put(THIS_MODULE);
-       } else
+       } else {
                printk(KERN_CRIT KBUILD_MODNAME
                        ": device closed unexpectedly. WDT will not stop !\n");
-
+               rc32434_wdt_ping();
+       }
        clear_bit(0, &rc32434_wdt_device.inuse);
        return 0;
 }
@@ -174,10 +163,10 @@ static ssize_t rc32434_wdt_write(struct file *file, const char *data,
                                if (get_user(c, data + i))
                                        return -EFAULT;
                                if (c == 'V')
-                                       expect_close = 1;
+                                       expect_close = 42;
                        }
                }
-               rc32434_wdt_update(0);
+               rc32434_wdt_ping();
                return len;
        }
        return 0;
@@ -197,11 +186,11 @@ static long rc32434_wdt_ioctl(struct file *file, unsigned int cmd,
        };
        switch (cmd) {
        case WDIOC_KEEPALIVE:
-               rc32434_wdt_reset();
+               rc32434_wdt_ping();
                break;
        case WDIOC_GETSTATUS:
        case WDIOC_GETBOOTSTATUS:
-               value = readl(&wdt_reg->wtcount);
+               value = 0;
                if (copy_to_user(argp, &value, sizeof(int)))
                        return -EFAULT;
                break;
@@ -218,6 +207,7 @@ static long rc32434_wdt_ioctl(struct file *file, unsigned int cmd,
                        break;
                case WDIOS_DISABLECARD:
                        rc32434_wdt_stop();
+                       break;
                default:
                        return -EINVAL;
                }
@@ -225,11 +215,9 @@ static long rc32434_wdt_ioctl(struct file *file, unsigned int cmd,
        case WDIOC_SETTIMEOUT:
                if (copy_from_user(&new_timeout, argp, sizeof(int)))
                        return -EFAULT;
-               if (new_timeout < 1)
+               if (rc32434_wdt_set(new_timeout))
                        return -EINVAL;
-               if (new_timeout > MAX_TIMEOUT)
-                       return -EINVAL;
-               rc32434_wdt_set(new_timeout);
+               /* Fall through */
        case WDIOC_GETTIMEOUT:
                return copy_to_user(argp, &timeout, sizeof(int));
        default:
@@ -254,15 +242,15 @@ static struct miscdevice rc32434_wdt_miscdev = {
        .fops   = &rc32434_wdt_fops,
 };
 
-static char banner[] = KERN_INFO KBUILD_MODNAME
+static char banner[] __devinitdata = KERN_INFO KBUILD_MODNAME
                ": Watchdog Timer version " VERSION ", timer margin: %d sec\n";
 
-static int rc32434_wdt_probe(struct platform_device *pdev)
+static int __devinit rc32434_wdt_probe(struct platform_device *pdev)
 {
        int ret;
        struct resource *r;
 
-       r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "rb500_wdt_res");
+       r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "rb532_wdt_res");
        if (!r) {
                printk(KERN_ERR KBUILD_MODNAME
                        "failed to retrieve resources\n");
@@ -277,24 +265,12 @@ static int rc32434_wdt_probe(struct platform_device *pdev)
        }
 
        ret = misc_register(&rc32434_wdt_miscdev);
-
        if (ret < 0) {
                printk(KERN_ERR KBUILD_MODNAME
                        "failed to register watchdog device\n");
                goto unmap;
        }
 
-       init_completion(&rc32434_wdt_device.stop);
-       rc32434_wdt_device.queue = 0;
-
-       clear_bit(0, &rc32434_wdt_device.inuse);
-
-       setup_timer(&rc32434_wdt_device.timer, rc32434_wdt_update, 0L);
-
-       rc32434_wdt_device.default_ticks = ticks;
-
-       rc32434_wdt_start();
-
        printk(banner, timeout);
 
        return 0;
@@ -304,23 +280,17 @@ unmap:
        return ret;
 }
 
-static int rc32434_wdt_remove(struct platform_device *pdev)
+static int __devexit rc32434_wdt_remove(struct platform_device *pdev)
 {
-       if (rc32434_wdt_device.queue) {
-               rc32434_wdt_device.queue = 0;
-               wait_for_completion(&rc32434_wdt_device.stop);
-       }
        misc_deregister(&rc32434_wdt_miscdev);
-
        iounmap(wdt_reg);
-
        return 0;
 }
 
 static struct platform_driver rc32434_wdt = {
        .probe  = rc32434_wdt_probe,
-       .remove = rc32434_wdt_remove,
-       .driver = {
+       .remove = __devexit_p(rc32434_wdt_remove),
+       .driver = {
                .name = "rc32434_wdt",
        }
 };
index e19b4579471762d5f055e0eebaa99d6589d1398a..4b84f296d30cca977aea395981e8f00c7e10d542 100644 (file)
@@ -30,7 +30,7 @@
 #include <linux/timex.h>
 
 #ifdef CONFIG_ARCH_PXA
-#include <mach/pxa-regs.h>
+#include <mach/regs-ost.h>
 #endif
 
 #include <mach/reset.h>
index 42491d728e9950f9c1f6f1cc4741e2997690f05f..37f31b5529aa0abe62a4e30ec7170c69c443eb0a 100644 (file)
@@ -277,7 +277,7 @@ static noinline int __btrfs_cow_block(struct btrfs_trans_handle *trans,
        if (*cow_ret == buf)
                unlock_orig = 1;
 
-       WARN_ON(!btrfs_tree_locked(buf));
+       btrfs_assert_tree_locked(buf);
 
        if (parent)
                parent_start = parent->start;
@@ -2365,7 +2365,7 @@ static int push_leaf_right(struct btrfs_trans_handle *trans, struct btrfs_root
        if (slot >= btrfs_header_nritems(upper) - 1)
                return 1;
 
-       WARN_ON(!btrfs_tree_locked(path->nodes[1]));
+       btrfs_assert_tree_locked(path->nodes[1]);
 
        right = read_node_slot(root, upper, slot + 1);
        btrfs_tree_lock(right);
@@ -2562,7 +2562,7 @@ static int push_leaf_left(struct btrfs_trans_handle *trans, struct btrfs_root
        if (right_nritems == 0)
                return 1;
 
-       WARN_ON(!btrfs_tree_locked(path->nodes[1]));
+       btrfs_assert_tree_locked(path->nodes[1]);
 
        left = read_node_slot(root, path->nodes[1], slot - 1);
        btrfs_tree_lock(left);
@@ -4101,7 +4101,7 @@ int btrfs_next_leaf(struct btrfs_root *root, struct btrfs_path *path)
 
                next = read_node_slot(root, c, slot);
                if (!path->skip_locking) {
-                       WARN_ON(!btrfs_tree_locked(c));
+                       btrfs_assert_tree_locked(c);
                        btrfs_tree_lock(next);
                        btrfs_set_lock_blocking(next);
                }
@@ -4126,7 +4126,7 @@ int btrfs_next_leaf(struct btrfs_root *root, struct btrfs_path *path)
                        reada_for_search(root, path, level, slot, 0);
                next = read_node_slot(root, next, 0);
                if (!path->skip_locking) {
-                       WARN_ON(!btrfs_tree_locked(path->nodes[level]));
+                       btrfs_assert_tree_locked(path->nodes[level]);
                        btrfs_tree_lock(next);
                        btrfs_set_lock_blocking(next);
                }
index adda739a0215345b99476435ad35f703174b1d26..3e18175248e030ce37aa8dcd1edd400cb7d79e1e 100644 (file)
@@ -857,7 +857,7 @@ int clean_tree_block(struct btrfs_trans_handle *trans, struct btrfs_root *root,
        struct inode *btree_inode = root->fs_info->btree_inode;
        if (btrfs_header_generation(buf) ==
            root->fs_info->running_transaction->transid) {
-               WARN_ON(!btrfs_tree_locked(buf));
+               btrfs_assert_tree_locked(buf);
 
                /* ugh, clear_extent_buffer_dirty can be expensive */
                btrfs_set_lock_blocking(buf);
@@ -2361,7 +2361,7 @@ void btrfs_mark_buffer_dirty(struct extent_buffer *buf)
 
        btrfs_set_lock_blocking(buf);
 
-       WARN_ON(!btrfs_tree_locked(buf));
+       btrfs_assert_tree_locked(buf);
        if (transid != root->fs_info->generation) {
                printk(KERN_CRIT "btrfs transid mismatch buffer %llu, "
                       "found %llu running %llu\n",
index 6b5966aacf447bfd14fbd2a2a1ef3be8b1280c29..9abf81f71c46582db63b89c26d4e952651e3a1ee 100644 (file)
@@ -4418,13 +4418,13 @@ int btrfs_drop_subtree(struct btrfs_trans_handle *trans,
        path = btrfs_alloc_path();
        BUG_ON(!path);
 
-       BUG_ON(!btrfs_tree_locked(parent));
+       btrfs_assert_tree_locked(parent);
        parent_level = btrfs_header_level(parent);
        extent_buffer_get(parent);
        path->nodes[parent_level] = parent;
        path->slots[parent_level] = btrfs_header_nritems(parent);
 
-       BUG_ON(!btrfs_tree_locked(node));
+       btrfs_assert_tree_locked(node);
        level = btrfs_header_level(node);
        extent_buffer_get(node);
        path->nodes[level] = node;
index 85506c4a3af7406c248b575149863ccdb8eb88f0..47b0a88c12a23a6d983eff4c3ff0e4bdf1347d2e 100644 (file)
@@ -220,8 +220,8 @@ int btrfs_tree_unlock(struct extent_buffer *eb)
        return 0;
 }
 
-int btrfs_tree_locked(struct extent_buffer *eb)
+void btrfs_assert_tree_locked(struct extent_buffer *eb)
 {
-       return test_bit(EXTENT_BUFFER_BLOCKING, &eb->bflags) ||
-                       spin_is_locked(&eb->lock);
+       if (!test_bit(EXTENT_BUFFER_BLOCKING, &eb->bflags))
+               assert_spin_locked(&eb->lock);
 }
index 6bb0afbff9287d4e841748f02d60eae488d7de7c..6c4ce457168cd41cc0b92a58453f5c8f2b2fe2f9 100644 (file)
 
 int btrfs_tree_lock(struct extent_buffer *eb);
 int btrfs_tree_unlock(struct extent_buffer *eb);
-int btrfs_tree_locked(struct extent_buffer *eb);
 
 int btrfs_try_tree_lock(struct extent_buffer *eb);
 int btrfs_try_spin_lock(struct extent_buffer *eb);
 
 void btrfs_set_lock_blocking(struct extent_buffer *eb);
 void btrfs_clear_lock_blocking(struct extent_buffer *eb);
+void btrfs_assert_tree_locked(struct extent_buffer *eb);
 #endif
index 5f3231b9633fd1192c3eb974c49f90e2f7addf89..bff4052b05e7003744a57e19b7d38966c7a75d71 100644 (file)
@@ -198,9 +198,6 @@ static int mknod_ptmx(struct super_block *sb)
 
        fsi->ptmx_dentry = dentry;
        rc = 0;
-
-       printk(KERN_DEBUG "Created ptmx node in devpts ino %lu\n",
-                       inode->i_ino);
 out:
        mutex_unlock(&root->d_inode->i_mutex);
        return rc;
@@ -369,8 +366,6 @@ static int new_pts_mount(struct file_system_type *fs_type, int flags,
        struct pts_fs_info *fsi;
        struct pts_mount_opts *opts;
 
-       printk(KERN_NOTICE "devpts: newinstance mount\n");
-
        err = get_sb_nodev(fs_type, flags, data, devpts_fill_super, mnt);
        if (err)
                return err;
index f18a919be70becf286c74364345a464e4d6e75e6..627f8c3337a3a24314624683ceac71ed30c72e95 100644 (file)
@@ -188,7 +188,7 @@ void ext4_free_inode(handle_t *handle, struct inode *inode)
        struct ext4_group_desc *gdp;
        struct ext4_super_block *es;
        struct ext4_sb_info *sbi;
-       int fatal = 0, err, count;
+       int fatal = 0, err, count, cleared;
        ext4_group_t flex_group;
 
        if (atomic_read(&inode->i_count) > 1) {
@@ -248,8 +248,10 @@ void ext4_free_inode(handle_t *handle, struct inode *inode)
                goto error_return;
 
        /* Ok, now we can actually update the inode bitmaps.. */
-       if (!ext4_clear_bit_atomic(sb_bgl_lock(sbi, block_group),
-                                       bit, bitmap_bh->b_data))
+       spin_lock(sb_bgl_lock(sbi, block_group));
+       cleared = ext4_clear_bit(bit, bitmap_bh->b_data);
+       spin_unlock(sb_bgl_lock(sbi, block_group));
+       if (!cleared)
                ext4_error(sb, "ext4_free_inode",
                           "bit already cleared for inode %lu", ino);
        else {
index c837dfc2b3c613799a228744e5de396ca206b1ee..321728f48f2d0c38204a312fbc67685428ee318e 100644 (file)
@@ -80,7 +80,7 @@ static struct buffer_head *get_block_length(struct super_block *sb,
  * generated a larger block - this does occasionally happen with zlib).
  */
 int squashfs_read_data(struct super_block *sb, void **buffer, u64 index,
-                       int length, u64 *next_index, int srclength)
+                       int length, u64 *next_index, int srclength, int pages)
 {
        struct squashfs_sb_info *msblk = sb->s_fs_info;
        struct buffer_head **bh;
@@ -185,6 +185,14 @@ int squashfs_read_data(struct super_block *sb, void **buffer, u64 index,
                        }
 
                        if (msblk->stream.avail_out == 0) {
+                               if (page == pages) {
+                                       ERROR("zlib_inflate tried to "
+                                               "decompress too much data, "
+                                               "expected %d bytes.  Zlib "
+                                               "data probably corrupt\n",
+                                               srclength);
+                                       goto release_mutex;
+                               }
                                msblk->stream.next_out = buffer[page++];
                                msblk->stream.avail_out = PAGE_CACHE_SIZE;
                        }
@@ -268,7 +276,8 @@ block_release:
                put_bh(bh[k]);
 
 read_failure:
-       ERROR("sb_bread failed reading block 0x%llx\n", cur_index);
+       ERROR("squashfs_read_data failed to read block 0x%llx\n",
+                                       (unsigned long long) index);
        kfree(bh);
        return -EIO;
 }
index f29eda16d25ebd6c9bee029b872ac97e5a31fc29..1c4739e33af638bf819278c755e2d656ec64288d 100644 (file)
@@ -119,7 +119,7 @@ struct squashfs_cache_entry *squashfs_cache_get(struct super_block *sb,
 
                        entry->length = squashfs_read_data(sb, entry->data,
                                block, length, &entry->next_index,
-                               cache->block_size);
+                               cache->block_size, cache->pages);
 
                        spin_lock(&cache->lock);
 
@@ -406,7 +406,7 @@ int squashfs_read_table(struct super_block *sb, void *buffer, u64 block,
        for (i = 0; i < pages; i++, buffer += PAGE_CACHE_SIZE)
                data[i] = buffer;
        res = squashfs_read_data(sb, data, block, length |
-               SQUASHFS_COMPRESSED_BIT_BLOCK, NULL, length);
+               SQUASHFS_COMPRESSED_BIT_BLOCK, NULL, length, pages);
        kfree(data);
        return res;
 }
index 7a63398bb855ab6982810ae366b577139e6abe92..9101dbde39ece6a9ca5d8b47d3344c1f3bdc6879 100644 (file)
@@ -133,7 +133,8 @@ int squashfs_read_inode(struct inode *inode, long long ino)
        type = le16_to_cpu(sqshb_ino->inode_type);
        switch (type) {
        case SQUASHFS_REG_TYPE: {
-               unsigned int frag_offset, frag_size, frag;
+               unsigned int frag_offset, frag;
+               int frag_size;
                u64 frag_blk;
                struct squashfs_reg_inode *sqsh_ino = &squashfs_ino.reg;
 
@@ -175,7 +176,8 @@ int squashfs_read_inode(struct inode *inode, long long ino)
                break;
        }
        case SQUASHFS_LREG_TYPE: {
-               unsigned int frag_offset, frag_size, frag;
+               unsigned int frag_offset, frag;
+               int frag_size;
                u64 frag_blk;
                struct squashfs_lreg_inode *sqsh_ino = &squashfs_ino.lreg;
 
index 6b2515d027d5b0545b0ac490baf1df9a1acd138c..0e9feb6adf7e120ccad9efd9815717fd44dbc83c 100644 (file)
@@ -34,7 +34,7 @@ static inline struct squashfs_inode_info *squashfs_i(struct inode *inode)
 
 /* block.c */
 extern int squashfs_read_data(struct super_block *, void **, u64, int, u64 *,
-                               int);
+                               int, int);
 
 /* cache.c */
 extern struct squashfs_cache *squashfs_cache_init(char *, int, int);
index 071df5b5b49184a28d354f217b78844002e4053b..681ec0d83799cc22595f44aadad42ca5d63e0538 100644 (file)
@@ -389,7 +389,7 @@ static int __init init_squashfs_fs(void)
                return err;
        }
 
-       printk(KERN_INFO "squashfs: version 4.0 (2009/01/03) "
+       printk(KERN_INFO "squashfs: version 4.0 (2009/01/31) "
                "Phillip Lougher\n");
 
        return 0;
index 08a86d5cdf1b7ea2c6c995f1073aaa59092d9a8c..9a061accd8b8de95f7dcb282d2488f0613418c9e 100644 (file)
@@ -89,6 +89,8 @@ enum {
        ATA_ID_DLF              = 128,
        ATA_ID_CSFO             = 129,
        ATA_ID_CFA_POWER        = 160,
+       ATA_ID_CFA_KEY_MGMT     = 162,
+       ATA_ID_CFA_MODES        = 163,
        ATA_ID_ROT_SPEED        = 217,
        ATA_ID_PIO4             = (1 << 1),
 
index 384b38d3e8e26d5c698c581e7dde4950171721cb..161042746afcf0f3fdf67201b8007deaa54d0a61 100644 (file)
@@ -234,7 +234,6 @@ struct cpufreq_driver {
        int     (*suspend)      (struct cpufreq_policy *policy, pm_message_t pmsg);
        int     (*resume)       (struct cpufreq_policy *policy);
        struct freq_attr        **attr;
-       bool                    hide_interface;
 };
 
 /* flags */
index f0413845f20ee75481543cb97c570d6dbda142b4..1956c8d46d326ea98c2286a6f3f47e8e428518a1 100644 (file)
@@ -97,7 +97,6 @@ typedef struct { DECLARE_BITMAP(bits, DMA_TX_TYPE_END); } dma_cap_mask_t;
 
 /**
  * struct dma_chan_percpu - the per-CPU part of struct dma_chan
- * @refcount: local_t used for open-coded "bigref" counting
  * @memcpy_count: transaction counter
  * @bytes_transferred: byte counter
  */
@@ -114,9 +113,6 @@ struct dma_chan_percpu {
  * @cookie: last cookie value returned to client
  * @chan_id: channel ID for sysfs
  * @dev: class device for sysfs
- * @refcount: kref, used in "bigref" slow-mode
- * @slow_ref: indicates that the DMA channel is free
- * @rcu: the DMA channel's RCU head
  * @device_node: used to add this to the device chan list
  * @local: per-cpu pointer to a struct dma_chan_percpu
  * @client-count: how many clients are using this channel
@@ -213,8 +209,6 @@ struct dma_async_tx_descriptor {
  * @global_node: list_head for global dma_device_list
  * @cap_mask: one or more dma_capability flags
  * @max_xor: maximum number of xor sources, 0 if no capability
- * @refcount: reference count
- * @done: IO completion struct
  * @dev_id: unique device ID
  * @dev: struct device reference for dma mapping api
  * @device_alloc_chan_resources: allocate resources and return the
@@ -227,6 +221,7 @@ struct dma_async_tx_descriptor {
  * @device_prep_dma_interrupt: prepares an end of chain interrupt operation
  * @device_prep_slave_sg: prepares a slave dma operation
  * @device_terminate_all: terminate all pending operations
+ * @device_is_tx_complete: poll for transaction completion
  * @device_issue_pending: push pending transactions to hardware
  */
 struct dma_device {
index c37e9241fae785ce24930473b59f3029c6e99ff0..ed21bd3dbd2552a9322a45c943e078d0e6a4e2fc 100644 (file)
@@ -511,7 +511,6 @@ struct hd_driveid {
        unsigned short  words69_70[2];  /* reserved words 69-70
                                         * future command overlap and queuing
                                         */
-       /* HDIO_GET_IDENTITY currently returns only words 0 through 70 */
        unsigned short  words71_74[4];  /* reserved words 71-74
                                         * for IDENTIFY PACKET DEVICE command
                                         */
index fe235b65207ee74d43e74818d94bdaf6759816d5..e0cedfe9fad46b63d13fad9ce0a006d5e75fecd3 100644 (file)
@@ -866,6 +866,7 @@ struct ide_host {
        unsigned int    n_ports;
        struct device   *dev[2];
        unsigned int    (*init_chipset)(struct pci_dev *);
+       irq_handler_t   irq_handler;
        unsigned long   host_flags;
        void            *host_priv;
        ide_hwif_t      *cur_port;      /* for hosts requiring serialization */
index 5d87bc09a1f5bcef65f97a4c06599c8e9f7295b1..dc18b87ed72244e90e898f43885f5bdca3c806b2 100644 (file)
@@ -275,7 +275,7 @@ enum {
         * advised to wait only for the following duration before
         * doing SRST.
         */
-       ATA_TMOUT_PMP_SRST_WAIT = 1000,
+       ATA_TMOUT_PMP_SRST_WAIT = 5000,
 
        /* ATA bus states */
        BUS_UNKNOWN             = 0,
@@ -530,6 +530,7 @@ struct ata_queued_cmd {
        unsigned long           flags;          /* ATA_QCFLAG_xxx */
        unsigned int            tag;
        unsigned int            n_elem;
+       unsigned int            orig_n_elem;
 
        int                     dma_dir;
 
@@ -750,7 +751,8 @@ struct ata_port {
        acpi_handle             acpi_handle;
        struct ata_acpi_gtm     __acpi_init_gtm; /* use ata_acpi_init_gtm() */
 #endif
-       u8                      sector_buf[ATA_SECT_SIZE]; /* owned by EH */
+       /* owned by EH */
+       u8                      sector_buf[ATA_SECT_SIZE] ____cacheline_aligned;
 };
 
 /* The following initializer overrides a method to NULL whether one of
index ec54785d34f90904224afe17a2713a8f32ed05ba..659366734f3fa1423cc8ff1d424fc44d6ce6c9bc 100644 (file)
@@ -1079,6 +1079,7 @@ extern void               synchronize_net(void);
 extern int             register_netdevice_notifier(struct notifier_block *nb);
 extern int             unregister_netdevice_notifier(struct notifier_block *nb);
 extern int             init_dummy_netdev(struct net_device *dev);
+extern void            netdev_resync_ops(struct net_device *dev);
 
 extern int call_netdevice_notifiers(unsigned long val, struct net_device *dev);
 extern struct net_device       *dev_get_by_index(struct net *net, int ifindex);
index 1bcb357a01a1d00781b97fcad67eaa45dd82fba7..e0417e4d3f15ad3fdd66ef845c7ef8854f72aaae 100644 (file)
@@ -212,7 +212,7 @@ static inline void serio_unpin_driver(struct serio *serio)
 #define SERIO_FUJITSU  0x35
 #define SERIO_ZHENHUA  0x36
 #define SERIO_INEXIO   0x37
-#define SERIO_TOUCHIT213       0x37
+#define SERIO_TOUCHIT213       0x38
 #define SERIO_W8001    0x39
 
 #endif
index 6fc13d905c5ffaced2e1658038ab97934d61f42d..ded434b032a44ec406a0fa8bcb11d688d95b7efa 100644 (file)
@@ -109,11 +109,6 @@ extern struct list_head net_namespace_list;
 #ifdef CONFIG_NET_NS
 extern void __put_net(struct net *net);
 
-static inline int net_alive(struct net *net)
-{
-       return net && atomic_read(&net->count);
-}
-
 static inline struct net *get_net(struct net *net)
 {
        atomic_inc(&net->count);
@@ -145,11 +140,6 @@ int net_eq(const struct net *net1, const struct net *net2)
 }
 #else
 
-static inline int net_alive(struct net *net)
-{
-       return 1;
-}
-
 static inline struct net *get_net(struct net *net)
 {
        return net;
@@ -234,6 +224,23 @@ struct pernet_operations {
        void (*exit)(struct net *net);
 };
 
+/*
+ * Use these carefully.  If you implement a network device and it
+ * needs per network namespace operations use device pernet operations,
+ * otherwise use pernet subsys operations.
+ *
+ * This is critically important.  Most of the network code cleanup
+ * runs with the assumption that dev_remove_pack has been called so no
+ * new packets will arrive during and after the cleanup functions have
+ * been called.  dev_remove_pack is not per namespace so instead the
+ * guarantee of no more packets arriving in a network namespace is
+ * provided by ensuring that all network devices and all sockets have
+ * left the network namespace before the cleanup methods are called.
+ *
+ * For the longest time the ipv4 icmp code was registered as a pernet
+ * device which caused kernel oops, and panics during network
+ * namespace cleanup.   So please don't get this wrong.
+ */
 extern int register_pernet_subsys(struct pernet_operations *);
 extern void unregister_pernet_subsys(struct pernet_operations *);
 extern int register_pernet_gen_subsys(int *id, struct pernet_operations *);
diff --git a/include/video/broadsheetfb.h b/include/video/broadsheetfb.h
new file mode 100644 (file)
index 0000000..a758534
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+ * broadsheetfb.h - definitions for the broadsheet framebuffer driver
+ *
+ * Copyright (C) 2008 by Jaya Kumar
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file COPYING in the main directory of this archive for
+ * more details.
+ *
+ */
+
+#ifndef _LINUX_BROADSHEETFB_H_
+#define _LINUX_BROADSHEETFB_H_
+
+/* Broadsheet command defines */
+#define BS_CMD_INIT_SYS_RUN    0x06
+#define BS_CMD_INIT_DSPE_CFG   0x09
+#define BS_CMD_INIT_DSPE_TMG   0x0A
+#define BS_CMD_INIT_ROTMODE    0x0B
+#define BS_CMD_RD_REG          0x10
+#define BS_CMD_WR_REG          0x11
+#define BS_CMD_LD_IMG          0x20
+#define BS_CMD_LD_IMG_AREA     0x22
+#define BS_CMD_LD_IMG_END      0x23
+#define BS_CMD_WAIT_DSPE_TRG   0x28
+#define BS_CMD_WAIT_DSPE_FREND 0x29
+#define BS_CMD_RD_WFM_INFO     0x30
+#define BS_CMD_UPD_INIT                0x32
+#define BS_CMD_UPD_FULL                0x33
+#define BS_CMD_UPD_GDRV_CLR    0x37
+
+/* Broadsheet pin interface specific defines */
+#define BS_CS  0x01
+#define BS_DC  0x02
+#define BS_WR  0x03
+
+/* struct used by broadsheet. board specific stuff comes from *board */
+struct broadsheetfb_par {
+       struct fb_info *info;
+       struct broadsheet_board *board;
+       void (*write_reg)(struct broadsheetfb_par *, u16 reg, u16 val);
+       u16 (*read_reg)(struct broadsheetfb_par *, u16 reg);
+       wait_queue_head_t waitq;
+};
+
+/* board specific routines */
+struct broadsheet_board {
+       struct module *owner;
+       int (*init)(struct broadsheetfb_par *);
+       int (*wait_for_rdy)(struct broadsheetfb_par *);
+       void (*set_ctl)(struct broadsheetfb_par *, unsigned char, u8);
+       void (*set_hdb)(struct broadsheetfb_par *, u16);
+       u16 (*get_hdb)(struct broadsheetfb_par *);
+       void (*cleanup)(struct broadsheetfb_par *);
+       int (*get_panel_type)(void);
+       int (*setup_irq)(struct fb_info *);
+};
+
+#endif
index f068071fcc5d952a0a6c7d745797ea094d7b3999..6a5c5fed66c96e36fcaf03a9f3c8403be132a193 100644 (file)
@@ -675,6 +675,9 @@ config CC_OPTIMIZE_FOR_SIZE
 config SYSCTL
        bool
 
+config ANON_INODES
+       bool
+
 menuconfig EMBEDDED
        bool "Configure standard kernel features (for small systems)"
        help
@@ -780,18 +783,6 @@ config PCSPKR_PLATFORM
           This option allows to disable the internal PC-Speaker
           support, saving some memory.
 
-config COMPAT_BRK
-       bool "Disable heap randomization"
-       default y
-       help
-         Randomizing heap placement makes heap exploits harder, but it
-         also breaks ancient binaries (including anything libc5 based).
-         This option changes the bootup default to heap randomization
-         disabled, and can be overriden runtime by setting
-         /proc/sys/kernel/randomize_va_space to 2.
-
-         On non-ancient distros (post-2000 ones) N is usually a safe choice.
-
 config BASE_FULL
        default y
        bool "Enable full-sized data structures for core" if EMBEDDED
@@ -809,9 +800,6 @@ config FUTEX
          support for "fast userspace mutexes".  The resulting kernel may not
          run glibc-based applications correctly.
 
-config ANON_INODES
-       bool
-
 config EPOLL
        bool "Enable eventpoll support" if EMBEDDED
        default y
@@ -897,6 +885,18 @@ config SLUB_DEBUG
          SLUB sysfs support. /sys/slab will not exist and there will be
          no support for cache validation etc.
 
+config COMPAT_BRK
+       bool "Disable heap randomization"
+       default y
+       help
+         Randomizing heap placement makes heap exploits harder, but it
+         also breaks ancient binaries (including anything libc5 based).
+         This option changes the bootup default to heap randomization
+         disabled, and can be overriden runtime by setting
+         /proc/sys/kernel/randomize_va_space to 2.
+
+         On non-ancient distros (post-2000 ones) N is usually a safe choice.
+
 choice
        prompt "Choose SLAB allocator"
        default SLUB
index a66fbde20715bb2d93180b7b3d03541d31d9c068..4854c2c4a82eae9ed1032ee1b66abc46124499ad 100644 (file)
@@ -1179,10 +1179,6 @@ static struct task_struct *copy_process(unsigned long clone_flags,
 #endif
        clear_all_latency_tracing(p);
 
-       /* Our parent execution domain becomes current domain
-          These must match for thread signalling to apply */
-       p->parent_exec_id = p->self_exec_id;
-
        /* ok, now we should be set up.. */
        p->exit_signal = (clone_flags & CLONE_THREAD) ? -1 : (clone_flags & CSIGNAL);
        p->pdeath_signal = 0;
@@ -1220,10 +1216,13 @@ static struct task_struct *copy_process(unsigned long clone_flags,
                set_task_cpu(p, smp_processor_id());
 
        /* CLONE_PARENT re-uses the old parent */
-       if (clone_flags & (CLONE_PARENT|CLONE_THREAD))
+       if (clone_flags & (CLONE_PARENT|CLONE_THREAD)) {
                p->real_parent = current->real_parent;
-       else
+               p->parent_exec_id = current->parent_exec_id;
+       } else {
                p->real_parent = current;
+               p->parent_exec_id = current->self_exec_id;
+       }
 
        spin_lock(&current->sighand->siglock);
 
index bdbe9de9cd8d7091771201f232747bf30a83e467..9041ea7948feffbf887ed92fb8ce1e73ad55c81c 100644 (file)
@@ -626,6 +626,7 @@ static int ksoftirqd(void * __bind_cpu)
                        preempt_enable_no_resched();
                        cond_resched();
                        preempt_disable();
+                       rcu_qsctr_inc((long)__bind_cpu);
                }
                preempt_enable();
                set_current_state(TASK_INTERRUPTIBLE);
index 43f891b05a4b8911c13c5baa6420f63eb69aa3f6..00d59d048edfafdc7ec70462e0133c0ec620a6d8 100644 (file)
@@ -122,8 +122,10 @@ void acct_update_integrals(struct task_struct *tsk)
        if (likely(tsk->mm)) {
                cputime_t time, dtime;
                struct timeval value;
+               unsigned long flags;
                u64 delta;
 
+               local_irq_save(flags);
                time = tsk->stime + tsk->utime;
                dtime = cputime_sub(time, tsk->acct_timexpd);
                jiffies_to_timeval(cputime_to_jiffies(dtime), &value);
@@ -131,10 +133,12 @@ void acct_update_integrals(struct task_struct *tsk)
                delta = delta * USEC_PER_SEC + value.tv_usec;
 
                if (delta == 0)
-                       return;
+                       goto out;
                tsk->acct_timexpd = time;
                tsk->acct_rss_mem1 += delta * get_mm_rss(tsk->mm);
                tsk->acct_vm_mem1 += delta * tsk->mm->total_vm;
+       out:
+               local_irq_restore(flags);
        }
 }
 
index 6a9b696128c855f9ddacfc9e3a7a128141379e49..fbb300e6191f09d376ed26abb330265fe51bf0a7 100644 (file)
@@ -286,14 +286,12 @@ int __init uids_sysfs_init(void)
 /* work function to remove sysfs directory for a user and free up
  * corresponding structures.
  */
-static void remove_user_sysfs_dir(struct work_struct *w)
+static void cleanup_user_struct(struct work_struct *w)
 {
        struct user_struct *up = container_of(w, struct user_struct, work);
        unsigned long flags;
        int remove_user = 0;
 
-       if (up->user_ns != &init_user_ns)
-               return;
        /* Make uid_hash_remove() + sysfs_remove_file() + kobject_del()
         * atomic.
         */
@@ -312,9 +310,11 @@ static void remove_user_sysfs_dir(struct work_struct *w)
        if (!remove_user)
                goto done;
 
-       kobject_uevent(&up->kobj, KOBJ_REMOVE);
-       kobject_del(&up->kobj);
-       kobject_put(&up->kobj);
+       if (up->user_ns == &init_user_ns) {
+               kobject_uevent(&up->kobj, KOBJ_REMOVE);
+               kobject_del(&up->kobj);
+               kobject_put(&up->kobj);
+       }
 
        sched_destroy_user(up);
        key_put(up->uid_keyring);
@@ -335,7 +335,7 @@ static void free_user(struct user_struct *up, unsigned long flags)
        atomic_inc(&up->__count);
        spin_unlock_irqrestore(&uidhash_lock, flags);
 
-       INIT_WORK(&up->work, remove_user_sysfs_dir);
+       INIT_WORK(&up->work, cleanup_user_struct);
        schedule_work(&up->work);
 }
 
index 1bcf9cd4baa08a85633e5758721b7ef21f4df787..c536b37a11cc5677743ae4ae0af0f9f3bc216d12 100644 (file)
@@ -402,7 +402,7 @@ config LOCKDEP
        bool
        depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
        select STACKTRACE
-       select FRAME_POINTER if !X86 && !MIPS && !PPC
+       select FRAME_POINTER if !X86 && !MIPS && !PPC && !ARM_UNWIND
        select KALLSYMS
        select KALLSYMS_ALL
 
index c11c5765cdefd2b5115e4f37e94905ab7364adad..dab4bca86f5d1981027c0be5104a69ce7d05fbe9 100644 (file)
--- a/lib/idr.c
+++ b/lib/idr.c
@@ -449,6 +449,7 @@ void idr_remove_all(struct idr *idp)
 
        n = idp->layers * IDR_BITS;
        p = idp->top;
+       rcu_assign_pointer(idp->top, NULL);
        max = 1 << n;
 
        id = 0;
@@ -467,7 +468,6 @@ void idr_remove_all(struct idr *idp)
                        p = *--paa;
                }
        }
-       rcu_assign_pointer(idp->top, NULL);
        idp->layers = 0;
 }
 EXPORT_SYMBOL(idr_remove_all);
index b36b83b920ffe862f0d7060e29687c9bb998a0d8..910198037bf59baa6649a75d1d632203483aa22b 100644 (file)
@@ -67,6 +67,25 @@ pte_t * pkmap_page_table;
 
 static DECLARE_WAIT_QUEUE_HEAD(pkmap_map_wait);
 
+/*
+ * Most architectures have no use for kmap_high_get(), so let's abstract
+ * the disabling of IRQ out of the locking in that case to save on a
+ * potential useless overhead.
+ */
+#ifdef ARCH_NEEDS_KMAP_HIGH_GET
+#define lock_kmap()             spin_lock_irq(&kmap_lock)
+#define unlock_kmap()           spin_unlock_irq(&kmap_lock)
+#define lock_kmap_any(flags)    spin_lock_irqsave(&kmap_lock, flags)
+#define unlock_kmap_any(flags)  spin_unlock_irqrestore(&kmap_lock, flags)
+#else
+#define lock_kmap()             spin_lock(&kmap_lock)
+#define unlock_kmap()           spin_unlock(&kmap_lock)
+#define lock_kmap_any(flags)    \
+               do { spin_lock(&kmap_lock); (void)(flags); } while (0)
+#define unlock_kmap_any(flags)  \
+               do { spin_unlock(&kmap_lock); (void)(flags); } while (0)
+#endif
+
 static void flush_all_zero_pkmaps(void)
 {
        int i;
@@ -113,9 +132,9 @@ static void flush_all_zero_pkmaps(void)
  */
 void kmap_flush_unused(void)
 {
-       spin_lock(&kmap_lock);
+       lock_kmap();
        flush_all_zero_pkmaps();
-       spin_unlock(&kmap_lock);
+       unlock_kmap();
 }
 
 static inline unsigned long map_new_virtual(struct page *page)
@@ -145,10 +164,10 @@ start:
 
                        __set_current_state(TASK_UNINTERRUPTIBLE);
                        add_wait_queue(&pkmap_map_wait, &wait);
-                       spin_unlock(&kmap_lock);
+                       unlock_kmap();
                        schedule();
                        remove_wait_queue(&pkmap_map_wait, &wait);
-                       spin_lock(&kmap_lock);
+                       lock_kmap();
 
                        /* Somebody else might have mapped it while we slept */
                        if (page_address(page))
@@ -184,29 +203,59 @@ void *kmap_high(struct page *page)
         * For highmem pages, we can't trust "virtual" until
         * after we have the lock.
         */
-       spin_lock(&kmap_lock);
+       lock_kmap();
        vaddr = (unsigned long)page_address(page);
        if (!vaddr)
                vaddr = map_new_virtual(page);
        pkmap_count[PKMAP_NR(vaddr)]++;
        BUG_ON(pkmap_count[PKMAP_NR(vaddr)] < 2);
-       spin_unlock(&kmap_lock);
+       unlock_kmap();
        return (void*) vaddr;
 }
 
 EXPORT_SYMBOL(kmap_high);
 
+#ifdef ARCH_NEEDS_KMAP_HIGH_GET
+/**
+ * kmap_high_get - pin a highmem page into memory
+ * @page: &struct page to pin
+ *
+ * Returns the page's current virtual memory address, or NULL if no mapping
+ * exists.  When and only when a non null address is returned then a
+ * matching call to kunmap_high() is necessary.
+ *
+ * This can be called from any context.
+ */
+void *kmap_high_get(struct page *page)
+{
+       unsigned long vaddr, flags;
+
+       lock_kmap_any(flags);
+       vaddr = (unsigned long)page_address(page);
+       if (vaddr) {
+               BUG_ON(pkmap_count[PKMAP_NR(vaddr)] < 1);
+               pkmap_count[PKMAP_NR(vaddr)]++;
+       }
+       unlock_kmap_any(flags);
+       return (void*) vaddr;
+}
+#endif
+
 /**
  * kunmap_high - map a highmem page into memory
  * @page: &struct page to unmap
+ *
+ * If ARCH_NEEDS_KMAP_HIGH_GET is not defined then this may be called
+ * only from user context.
  */
 void kunmap_high(struct page *page)
 {
        unsigned long vaddr;
        unsigned long nr;
+       unsigned long flags;
        int need_wakeup;
 
-       spin_lock(&kmap_lock);
+       lock_kmap_any(flags);
        vaddr = (unsigned long)page_address(page);
        BUG_ON(!vaddr);
        nr = PKMAP_NR(vaddr);
@@ -232,7 +281,7 @@ void kunmap_high(struct page *page)
                 */
                need_wakeup = waitqueue_active(&pkmap_map_wait);
        }
-       spin_unlock(&kmap_lock);
+       unlock_kmap_any(flags);
 
        /* do wake-up, if needed, race-free outside of the spin lock */
        if (need_wakeup)
index 158150fee462fdbca4a2fa2175532b71dd2f862d..f47ae289d83b142167ed971f315a28e757752020 100644 (file)
@@ -668,3 +668,5 @@ module_init(rif_init);
 
 EXPORT_SYMBOL(tr_type_trans);
 EXPORT_SYMBOL(alloc_trdev);
+
+MODULE_LICENSE("GPL");
index 4a19acd3a32ba06eaf3fbe4b80f8e5d3fe699d17..1b34135cf9902e737b91475b7a02c018fc6568f5 100644 (file)
@@ -553,7 +553,7 @@ static int vlan_dev_neigh_setup(struct net_device *dev, struct neigh_parms *pa)
        int err = 0;
 
        if (netif_device_present(real_dev) && ops->ndo_neigh_setup)
-               err = ops->ndo_neigh_setup(dev, pa);
+               err = ops->ndo_neigh_setup(real_dev, pa);
 
        return err;
 }
@@ -639,6 +639,7 @@ static int vlan_dev_init(struct net_device *dev)
                dev->hard_header_len = real_dev->hard_header_len + VLAN_HLEN;
                dev->netdev_ops         = &vlan_netdev_ops;
        }
+       netdev_resync_ops(dev);
 
        if (is_vlan_dev(real_dev))
                subclass = 1;
index 72b0d26fd46d037e9a4016a810e06d940df5431a..f1129706ce7b3589bec1a2cbacb63fa80bdceb29 100644 (file)
@@ -2267,12 +2267,6 @@ int netif_receive_skb(struct sk_buff *skb)
 
        rcu_read_lock();
 
-       /* Don't receive packets in an exiting network namespace */
-       if (!net_alive(dev_net(skb->dev))) {
-               kfree_skb(skb);
-               goto out;
-       }
-
 #ifdef CONFIG_NET_CLS_ACT
        if (skb->tc_verd & TC_NCLS) {
                skb->tc_verd = CLR_TC_NCLS(skb->tc_verd);
@@ -4288,6 +4282,39 @@ unsigned long netdev_fix_features(unsigned long features, const char *name)
 }
 EXPORT_SYMBOL(netdev_fix_features);
 
+/* Some devices need to (re-)set their netdev_ops inside
+ * ->init() or similar.  If that happens, we have to setup
+ * the compat pointers again.
+ */
+void netdev_resync_ops(struct net_device *dev)
+{
+#ifdef CONFIG_COMPAT_NET_DEV_OPS
+       const struct net_device_ops *ops = dev->netdev_ops;
+
+       dev->init = ops->ndo_init;
+       dev->uninit = ops->ndo_uninit;
+       dev->open = ops->ndo_open;
+       dev->change_rx_flags = ops->ndo_change_rx_flags;
+       dev->set_rx_mode = ops->ndo_set_rx_mode;
+       dev->set_multicast_list = ops->ndo_set_multicast_list;
+       dev->set_mac_address = ops->ndo_set_mac_address;
+       dev->validate_addr = ops->ndo_validate_addr;
+       dev->do_ioctl = ops->ndo_do_ioctl;
+       dev->set_config = ops->ndo_set_config;
+       dev->change_mtu = ops->ndo_change_mtu;
+       dev->neigh_setup = ops->ndo_neigh_setup;
+       dev->tx_timeout = ops->ndo_tx_timeout;
+       dev->get_stats = ops->ndo_get_stats;
+       dev->vlan_rx_register = ops->ndo_vlan_rx_register;
+       dev->vlan_rx_add_vid = ops->ndo_vlan_rx_add_vid;
+       dev->vlan_rx_kill_vid = ops->ndo_vlan_rx_kill_vid;
+#ifdef CONFIG_NET_POLL_CONTROLLER
+       dev->poll_controller = ops->ndo_poll_controller;
+#endif
+#endif
+}
+EXPORT_SYMBOL(netdev_resync_ops);
+
 /**
  *     register_netdevice      - register a network device
  *     @dev: device to register
@@ -4332,27 +4359,7 @@ int register_netdevice(struct net_device *dev)
         * This is temporary until all network devices are converted.
         */
        if (dev->netdev_ops) {
-               const struct net_device_ops *ops = dev->netdev_ops;
-
-               dev->init = ops->ndo_init;
-               dev->uninit = ops->ndo_uninit;
-               dev->open = ops->ndo_open;
-               dev->change_rx_flags = ops->ndo_change_rx_flags;
-               dev->set_rx_mode = ops->ndo_set_rx_mode;
-               dev->set_multicast_list = ops->ndo_set_multicast_list;
-               dev->set_mac_address = ops->ndo_set_mac_address;
-               dev->validate_addr = ops->ndo_validate_addr;
-               dev->do_ioctl = ops->ndo_do_ioctl;
-               dev->set_config = ops->ndo_set_config;
-               dev->change_mtu = ops->ndo_change_mtu;
-               dev->tx_timeout = ops->ndo_tx_timeout;
-               dev->get_stats = ops->ndo_get_stats;
-               dev->vlan_rx_register = ops->ndo_vlan_rx_register;
-               dev->vlan_rx_add_vid = ops->ndo_vlan_rx_add_vid;
-               dev->vlan_rx_kill_vid = ops->ndo_vlan_rx_kill_vid;
-#ifdef CONFIG_NET_POLL_CONTROLLER
-               dev->poll_controller = ops->ndo_poll_controller;
-#endif
+               netdev_resync_ops(dev);
        } else {
                char drivername[64];
                pr_info("%s (%s): not using net_device_ops yet\n",
index 6ac29a46e23e188be0c3f246c7ff77e538d04ab1..484f58750eba0438cff11dcf0979ceb4ef46738b 100644 (file)
@@ -77,7 +77,9 @@ static ssize_t netdev_store(struct device *dev, struct device_attribute *attr,
        if (endp == buf)
                goto err;
 
-       rtnl_lock();
+       if (!rtnl_trylock())
+               return -ERESTARTSYS;
+
        if (dev_isalive(net)) {
                if ((ret = (*set)(net, new)) == 0)
                        ret = len;
index 2adb1a7d361f8391ebeeccf78cb7823527c2a1e7..e3bebd36f053ef5ad656b7ea81fa1a03e0c2dc74 100644 (file)
@@ -157,9 +157,6 @@ static void cleanup_net(struct work_struct *work)
        struct pernet_operations *ops;
        struct net *net;
 
-       /* Be very certain incoming network packets will not find us */
-       rcu_barrier();
-
        net = container_of(work, struct net, work);
 
        mutex_lock(&net_mutex);
index 705b33b184a33cb3181e698b191c08565229ed56..fc562d29cc460155aa0d8aaa72bbf71e82e8d494 100644 (file)
@@ -1205,7 +1205,7 @@ static struct pernet_operations __net_initdata icmp_sk_ops = {
 
 int __init icmp_init(void)
 {
-       return register_pernet_device(&icmp_sk_ops);
+       return register_pernet_subsys(&icmp_sk_ops);
 }
 
 EXPORT_SYMBOL(icmp_err_convert);
index 19d7b429a2625b8ecc3b7fc35392d3e0af99ffd2..cf74c416831a4980de6d07013431fb92e563bb3f 100644 (file)
@@ -2443,7 +2443,7 @@ static struct pernet_operations __net_initdata tcp_sk_ops = {
 void __init tcp_v4_init(void)
 {
        inet_hashinfo_init(&tcp_hashinfo);
-       if (register_pernet_device(&tcp_sk_ops))
+       if (register_pernet_subsys(&tcp_sk_ops))
                panic("Failed to create the TCP control socket.\n");
 }
 
index f9afb452249c0f1cfbcdac802430d9adb41b694b..1220e2c7831e106f7e2078d0c5ce497d0c69e4c7 100644 (file)
@@ -493,15 +493,17 @@ static void addrconf_forward_change(struct net *net, __s32 newf)
        read_unlock(&dev_base_lock);
 }
 
-static void addrconf_fixup_forwarding(struct ctl_table *table, int *p, int old)
+static int addrconf_fixup_forwarding(struct ctl_table *table, int *p, int old)
 {
        struct net *net;
 
        net = (struct net *)table->extra2;
        if (p == &net->ipv6.devconf_dflt->forwarding)
-               return;
+               return 0;
+
+       if (!rtnl_trylock())
+               return -ERESTARTSYS;
 
-       rtnl_lock();
        if (p == &net->ipv6.devconf_all->forwarding) {
                __s32 newf = net->ipv6.devconf_all->forwarding;
                net->ipv6.devconf_dflt->forwarding = newf;
@@ -512,6 +514,7 @@ static void addrconf_fixup_forwarding(struct ctl_table *table, int *p, int old)
 
        if (*p)
                rt6_purge_dflt_routers(net);
+       return 1;
 }
 #endif
 
@@ -2608,9 +2611,6 @@ static int addrconf_ifdown(struct net_device *dev, int how)
 
        ASSERT_RTNL();
 
-       if ((dev->flags & IFF_LOOPBACK) && how == 1)
-               how = 0;
-
        rt6_ifdown(net, dev);
        neigh_ifdown(&nd_tbl, dev);
 
@@ -3983,7 +3983,7 @@ int addrconf_sysctl_forward(ctl_table *ctl, int write, struct file * filp,
        ret = proc_dointvec(ctl, write, filp, buffer, lenp, ppos);
 
        if (write)
-               addrconf_fixup_forwarding(ctl, valp, val);
+               ret = addrconf_fixup_forwarding(ctl, valp, val);
        return ret;
 }
 
@@ -4019,8 +4019,7 @@ static int addrconf_sysctl_forward_strategy(ctl_table *table,
        }
 
        *valp = new;
-       addrconf_fixup_forwarding(table, valp, val);
-       return 1;
+       return addrconf_fixup_forwarding(table, valp, val);
 }
 
 static struct addrconf_sysctl_table
@@ -4446,25 +4445,6 @@ int unregister_inet6addr_notifier(struct notifier_block *nb)
 
 EXPORT_SYMBOL(unregister_inet6addr_notifier);
 
-static void addrconf_net_exit(struct net *net)
-{
-       struct net_device *dev;
-
-       rtnl_lock();
-       /* clean dev list */
-       for_each_netdev(net, dev) {
-               if (__in6_dev_get(dev) == NULL)
-                       continue;
-               addrconf_ifdown(dev, 1);
-       }
-       addrconf_ifdown(net->loopback_dev, 2);
-       rtnl_unlock();
-}
-
-static struct pernet_operations addrconf_net_ops = {
-       .exit = addrconf_net_exit,
-};
-
 /*
  *     Init / cleanup code
  */
@@ -4506,10 +4486,6 @@ int __init addrconf_init(void)
        if (err)
                goto errlo;
 
-       err = register_pernet_device(&addrconf_net_ops);
-       if (err)
-               return err;
-
        register_netdevice_notifier(&ipv6_dev_notf);
 
        addrconf_verify(0);
@@ -4539,15 +4515,22 @@ errlo:
 void addrconf_cleanup(void)
 {
        struct inet6_ifaddr *ifa;
+       struct net_device *dev;
        int i;
 
        unregister_netdevice_notifier(&ipv6_dev_notf);
-       unregister_pernet_device(&addrconf_net_ops);
-
        unregister_pernet_subsys(&addrconf_ops);
 
        rtnl_lock();
 
+       /* clean dev list */
+       for_each_netdev(&init_net, dev) {
+               if (__in6_dev_get(dev) == NULL)
+                       continue;
+               addrconf_ifdown(dev, 1);
+       }
+       addrconf_ifdown(init_net.loopback_dev, 2);
+
        /*
         *      Check hash table.
         */
@@ -4568,6 +4551,4 @@ void addrconf_cleanup(void)
 
        del_timer(&addr_chk_timer);
        rtnl_unlock();
-
-       unregister_pernet_subsys(&addrconf_net_ops);
 }
index c802bc1658a854bc2599c6821fe6bfb4b5998870..da944eca2ca654423f4f00405069a58914fe81e0 100644 (file)
@@ -72,6 +72,10 @@ MODULE_LICENSE("GPL");
 static struct list_head inetsw6[SOCK_MAX];
 static DEFINE_SPINLOCK(inetsw6_lock);
 
+static int disable_ipv6 = 0;
+module_param_named(disable, disable_ipv6, int, 0);
+MODULE_PARM_DESC(disable, "Disable IPv6 such that it is non-functional");
+
 static __inline__ struct ipv6_pinfo *inet6_sk_generic(struct sock *sk)
 {
        const int offset = sk->sk_prot->obj_size - sizeof(struct ipv6_pinfo);
@@ -991,10 +995,21 @@ static int __init inet6_init(void)
 {
        struct sk_buff *dummy_skb;
        struct list_head *r;
-       int err;
+       int err = 0;
 
        BUILD_BUG_ON(sizeof(struct inet6_skb_parm) > sizeof(dummy_skb->cb));
 
+       /* Register the socket-side information for inet6_create.  */
+       for(r = &inetsw6[0]; r < &inetsw6[SOCK_MAX]; ++r)
+               INIT_LIST_HEAD(r);
+
+       if (disable_ipv6) {
+               printk(KERN_INFO
+                      "IPv6: Loaded, but administratively disabled, "
+                      "reboot required to enable\n");
+               goto out;
+       }
+
        err = proto_register(&tcpv6_prot, 1);
        if (err)
                goto out;
@@ -1012,10 +1027,6 @@ static int __init inet6_init(void)
                goto out_unregister_udplite_proto;
 
 
-       /* Register the socket-side information for inet6_create.  */
-       for(r = &inetsw6[0]; r < &inetsw6[SOCK_MAX]; ++r)
-               INIT_LIST_HEAD(r);
-
        /* We MUST register RAW sockets before we create the ICMP6,
         * IGMP6, or NDISC control sockets.
         */
index 9eb895c7a2a97bb87076f715ce5c692f74e51505..3ae3cb8165630e3618560bd53aac6968298c52d1 100644 (file)
@@ -1084,6 +1084,13 @@ out:
        return 0;
 }
 
+/**
+ * netlink_set_err - report error to broadcast listeners
+ * @ssk: the kernel netlink socket, as returned by netlink_kernel_create()
+ * @pid: the PID of a process that we want to skip (if any)
+ * @groups: the broadcast group that will notice the error
+ * @code: error code, must be negative (as usual in kernelspace)
+ */
 void netlink_set_err(struct sock *ssk, u32 pid, u32 group, int code)
 {
        struct netlink_set_err_data info;
@@ -1093,7 +1100,8 @@ void netlink_set_err(struct sock *ssk, u32 pid, u32 group, int code)
        info.exclude_sk = ssk;
        info.pid = pid;
        info.group = group;
-       info.code = code;
+       /* sk->sk_err wants a positive error value */
+       info.code = -code;
 
        read_lock(&nl_table_lock);
 
index 5c72a116b1a4513405735349391a01ff1c9b376a..f8f047b6124560c76d8cae54fa20062854553c48 100644 (file)
@@ -183,13 +183,6 @@ override:
                if (R_tab == NULL)
                        goto failure;
 
-               if (!est && (ret == ACT_P_CREATED ||
-                            !gen_estimator_active(&police->tcf_bstats,
-                                                  &police->tcf_rate_est))) {
-                       err = -EINVAL;
-                       goto failure;
-               }
-
                if (parm->peakrate.rate) {
                        P_tab = qdisc_get_rtab(&parm->peakrate,
                                               tb[TCA_POLICE_PEAKRATE]);
@@ -205,6 +198,12 @@ override:
                                            &police->tcf_lock, est);
                if (err)
                        goto failure_unlock;
+       } else if (tb[TCA_POLICE_AVRATE] &&
+                  (ret == ACT_P_CREATED ||
+                   !gen_estimator_active(&police->tcf_bstats,
+                                         &police->tcf_rate_est))) {
+               err = -EINVAL;
+               goto failure_unlock;
        }
 
        /* No failure allowed after this point */
index b78e3be6901398f7a62b76a291fb8954341aacc0..c4986d0f74190bc17c8177ccd54e9bbaf36594e8 100644 (file)
@@ -717,15 +717,20 @@ static int sctp_inetaddr_event(struct notifier_block *this, unsigned long ev,
 static int sctp_ctl_sock_init(void)
 {
        int err;
-       sa_family_t family;
+       sa_family_t family = PF_INET;
 
        if (sctp_get_pf_specific(PF_INET6))
                family = PF_INET6;
-       else
-               family = PF_INET;
 
        err = inet_ctl_sock_create(&sctp_ctl_sock, family,
                                   SOCK_SEQPACKET, IPPROTO_SCTP, &init_net);
+
+       /* If IPv6 socket could not be created, try the IPv4 socket */
+       if (err < 0 && family == PF_INET6)
+               err = inet_ctl_sock_create(&sctp_ctl_sock, AF_INET,
+                                          SOCK_SEQPACKET, IPPROTO_SCTP,
+                                          &init_net);
+
        if (err < 0) {
                printk(KERN_ERR
                       "SCTP: Failed to create the SCTP control socket.\n");
@@ -1322,9 +1327,8 @@ SCTP_STATIC __init int sctp_init(void)
 out:
        return status;
 err_v6_add_protocol:
-       sctp_v6_del_protocol();
-err_add_protocol:
        sctp_v4_del_protocol();
+err_add_protocol:
        inet_ctl_sock_destroy(sctp_ctl_sock);
 err_ctl_sock_init:
        sctp_v6_protosw_exit();
@@ -1335,7 +1339,6 @@ err_protosw_init:
        sctp_v4_pf_exit();
        sctp_v6_pf_exit();
        sctp_sysctl_unregister();
-       list_del(&sctp_af_inet.list);
        free_pages((unsigned long)sctp_port_hashtable,
                   get_order(sctp_port_hashsize *
                             sizeof(struct sctp_bind_hashbucket)));
@@ -1383,7 +1386,6 @@ SCTP_STATIC __exit void sctp_exit(void)
        sctp_v4_pf_exit();
 
        sctp_sysctl_unregister();
-       list_del(&sctp_af_inet.list);
 
        free_pages((unsigned long)sctp_assoc_hashtable,
                   get_order(sctp_assoc_hashsize *
index e1d6076b4f59531e6fa5ccd352e42f5e15b8a08b..b5495aecab60dbef2f75f3b210b241992d62ffb7 100644 (file)
@@ -787,36 +787,48 @@ static void sctp_cmd_process_operr(sctp_cmd_seq_t *cmds,
                                   struct sctp_association *asoc,
                                   struct sctp_chunk *chunk)
 {
-       struct sctp_operr_chunk *operr_chunk;
        struct sctp_errhdr *err_hdr;
+       struct sctp_ulpevent *ev;
 
-       operr_chunk = (struct sctp_operr_chunk *)chunk->chunk_hdr;
-       err_hdr = &operr_chunk->err_hdr;
+       while (chunk->chunk_end > chunk->skb->data) {
+               err_hdr = (struct sctp_errhdr *)(chunk->skb->data);
 
-       switch (err_hdr->cause) {
-       case SCTP_ERROR_UNKNOWN_CHUNK:
-       {
-               struct sctp_chunkhdr *unk_chunk_hdr;
+               ev = sctp_ulpevent_make_remote_error(asoc, chunk, 0,
+                                                    GFP_ATOMIC);
+               if (!ev)
+                       return;
 
-               unk_chunk_hdr = (struct sctp_chunkhdr *)err_hdr->variable;
-               switch (unk_chunk_hdr->type) {
-               /* ADDIP 4.1 A9) If the peer responds to an ASCONF with an
-                * ERROR chunk reporting that it did not recognized the ASCONF
-                * chunk type, the sender of the ASCONF MUST NOT send any
-                * further ASCONF chunks and MUST stop its T-4 timer.
-                */
-               case SCTP_CID_ASCONF:
-                       asoc->peer.asconf_capable = 0;
-                       sctp_add_cmd_sf(cmds, SCTP_CMD_TIMER_STOP,
+               sctp_ulpq_tail_event(&asoc->ulpq, ev);
+
+               switch (err_hdr->cause) {
+               case SCTP_ERROR_UNKNOWN_CHUNK:
+               {
+                       sctp_chunkhdr_t *unk_chunk_hdr;
+
+                       unk_chunk_hdr = (sctp_chunkhdr_t *)err_hdr->variable;
+                       switch (unk_chunk_hdr->type) {
+                       /* ADDIP 4.1 A9) If the peer responds to an ASCONF with
+                        * an ERROR chunk reporting that it did not recognized
+                        * the ASCONF chunk type, the sender of the ASCONF MUST
+                        * NOT send any further ASCONF chunks and MUST stop its
+                        * T-4 timer.
+                        */
+                       case SCTP_CID_ASCONF:
+                               if (asoc->peer.asconf_capable == 0)
+                                       break;
+
+                               asoc->peer.asconf_capable = 0;
+                               sctp_add_cmd_sf(cmds, SCTP_CMD_TIMER_STOP,
                                        SCTP_TO(SCTP_EVENT_TIMEOUT_T4_RTO));
+                               break;
+                       default:
+                               break;
+                       }
                        break;
+               }
                default:
                        break;
                }
-               break;
-       }
-       default:
-               break;
        }
 }
 
index 3a0cd075914f44b261b85a7a27aaa899955a22fa..f88dfded0e3a146a0a82d45d8da7765eedc7de94 100644 (file)
@@ -3163,7 +3163,6 @@ sctp_disposition_t sctp_sf_operr_notify(const struct sctp_endpoint *ep,
                                        sctp_cmd_seq_t *commands)
 {
        struct sctp_chunk *chunk = arg;
-       struct sctp_ulpevent *ev;
 
        if (!sctp_vtag_verify(chunk, asoc))
                return sctp_sf_pdiscard(ep, asoc, type, arg, commands);
@@ -3173,21 +3172,10 @@ sctp_disposition_t sctp_sf_operr_notify(const struct sctp_endpoint *ep,
                return sctp_sf_violation_chunklen(ep, asoc, type, arg,
                                                  commands);
 
-       while (chunk->chunk_end > chunk->skb->data) {
-               ev = sctp_ulpevent_make_remote_error(asoc, chunk, 0,
-                                                    GFP_ATOMIC);
-               if (!ev)
-                       goto nomem;
+       sctp_add_cmd_sf(commands, SCTP_CMD_PROCESS_OPERR,
+                       SCTP_CHUNK(chunk));
 
-               sctp_add_cmd_sf(commands, SCTP_CMD_EVENT_ULP,
-                               SCTP_ULPEVENT(ev));
-               sctp_add_cmd_sf(commands, SCTP_CMD_PROCESS_OPERR,
-                               SCTP_CHUNK(chunk));
-       }
        return SCTP_DISPOSITION_CONSUME;
-
-nomem:
-       return SCTP_DISPOSITION_NOMEM;
 }
 
 /*
index 85c9034c59b276fb3a3606f3845e81ea714bc1c5..bd0a16c3de5e9f37d37f3f19e1b9e8a8ccd8cde9 100644 (file)
@@ -380,7 +380,8 @@ static bool is_valid_reg_rule(const struct ieee80211_reg_rule *rule)
 
        freq_diff = freq_range->end_freq_khz - freq_range->start_freq_khz;
 
-       if (freq_diff <= 0 || freq_range->max_bandwidth_khz > freq_diff)
+       if (freq_range->end_freq_khz <= freq_range->start_freq_khz ||
+                       freq_range->max_bandwidth_khz > freq_diff)
                return false;
 
        return true;
index 0278bc08304440df4af600670312e7bd3bce764c..e7ded1326b0ff835cec48f4e448b0c69f8df1d04 100644 (file)
@@ -1498,58 +1498,31 @@ static int smack_socket_post_create(struct socket *sock, int family,
  * looks for host based access restrictions
  *
  * This version will only be appropriate for really small
- * sets of single label hosts. Because of the masking
- * it cannot shortcut out on the first match. There are
- * numerious ways to address the problem, but none of them
- * have been applied here.
+ * sets of single label hosts.
  *
  * Returns the label of the far end or NULL if it's not special.
  */
 static char *smack_host_label(struct sockaddr_in *sip)
 {
        struct smk_netlbladdr *snp;
-       char *bestlabel = NULL;
        struct in_addr *siap = &sip->sin_addr;
-       struct in_addr *liap;
-       struct in_addr *miap;
-       struct in_addr bestmask;
 
        if (siap->s_addr == 0)
                return NULL;
 
-       bestmask.s_addr = 0;
-
        for (snp = smack_netlbladdrs; snp != NULL; snp = snp->smk_next) {
-               liap = &snp->smk_host.sin_addr;
-               miap = &snp->smk_mask;
-               /*
-                * If the addresses match after applying the list entry mask
-                * the entry matches the address. If it doesn't move along to
-                * the next entry.
-                */
-               if ((liap->s_addr & miap->s_addr) !=
-                   (siap->s_addr & miap->s_addr))
-                       continue;
                /*
-                * If the list entry mask identifies a single address
-                * it can't get any more specific.
+                * we break after finding the first match because
+                * the list is sorted from longest to shortest mask
+                * so we have found the most specific match
                 */
-               if (miap->s_addr == 0xffffffff)
+               if ((&snp->smk_host.sin_addr)->s_addr  ==
+                       (siap->s_addr & (&snp->smk_mask)->s_addr)) {
                        return snp->smk_label;
-               /*
-                * If the list entry mask is less specific than the best
-                * already found this entry is uninteresting.
-                */
-               if ((miap->s_addr | bestmask.s_addr) == bestmask.s_addr)
-                       continue;
-               /*
-                * This is better than any entry found so far.
-                */
-               bestmask.s_addr = miap->s_addr;
-               bestlabel = snp->smk_label;
+               }
        }
 
-       return bestlabel;
+       return NULL;
 }
 
 /**
index 8e42800878f468912c56cece9336e7c8c6bfa727..51f0efc50dab46a9200f98b6d22db0039a9a0653 100644 (file)
@@ -650,10 +650,6 @@ static void *netlbladdr_seq_next(struct seq_file *s, void *v, loff_t *pos)
 
        return skp;
 }
-/*
-#define BEMASK 0x80000000
-*/
-#define BEMASK 0x00000001
 #define BEBITS (sizeof(__be32) * 8)
 
 /*
@@ -663,12 +659,10 @@ static int netlbladdr_seq_show(struct seq_file *s, void *v)
 {
        struct smk_netlbladdr *skp = (struct smk_netlbladdr *) v;
        unsigned char *hp = (char *) &skp->smk_host.sin_addr.s_addr;
-       __be32 bebits;
-       int maskn = 0;
+       int maskn;
+       u32 temp_mask = be32_to_cpu(skp->smk_mask.s_addr);
 
-       for (bebits = BEMASK; bebits != 0; maskn++, bebits <<= 1)
-               if ((skp->smk_mask.s_addr & bebits) == 0)
-                       break;
+       for (maskn = 0; temp_mask; temp_mask <<= 1, maskn++);
 
        seq_printf(s, "%u.%u.%u.%u/%d %s\n",
                hp[0], hp[1], hp[2], hp[3], maskn, skp->smk_label);
@@ -701,6 +695,42 @@ static int smk_open_netlbladdr(struct inode *inode, struct file *file)
        return seq_open(file, &netlbladdr_seq_ops);
 }
 
+/**
+ * smk_netlbladdr_insert
+ * @new : netlabel to insert
+ *
+ * This helper insert netlabel in the smack_netlbladdrs list
+ * sorted by netmask length (longest to smallest)
+ */
+static void smk_netlbladdr_insert(struct smk_netlbladdr *new)
+{
+       struct smk_netlbladdr *m;
+
+       if (smack_netlbladdrs == NULL) {
+               smack_netlbladdrs = new;
+               return;
+       }
+
+       /* the comparison '>' is a bit hacky, but works */
+       if (new->smk_mask.s_addr > smack_netlbladdrs->smk_mask.s_addr) {
+               new->smk_next = smack_netlbladdrs;
+               smack_netlbladdrs = new;
+               return;
+       }
+       for (m = smack_netlbladdrs; m != NULL; m = m->smk_next) {
+               if (m->smk_next == NULL) {
+                       m->smk_next = new;
+                       return;
+               }
+               if (new->smk_mask.s_addr > m->smk_next->smk_mask.s_addr) {
+                       new->smk_next = m->smk_next;
+                       m->smk_next = new;
+                       return;
+               }
+       }
+}
+
+
 /**
  * smk_write_netlbladdr - write() for /smack/netlabel
  * @filp: file pointer, not actually used
@@ -724,8 +754,9 @@ static ssize_t smk_write_netlbladdr(struct file *file, const char __user *buf,
        struct netlbl_audit audit_info;
        struct in_addr mask;
        unsigned int m;
-       __be32 bebits = BEMASK;
+       u32 mask_bits = (1<<31);
        __be32 nsa;
+       u32 temp_mask;
 
        /*
         * Must have privilege.
@@ -761,10 +792,13 @@ static ssize_t smk_write_netlbladdr(struct file *file, const char __user *buf,
        if (sp == NULL)
                return -EINVAL;
 
-       for (mask.s_addr = 0; m > 0; m--) {
-               mask.s_addr |= bebits;
-               bebits <<= 1;
+       for (temp_mask = 0; m > 0; m--) {
+               temp_mask |= mask_bits;
+               mask_bits >>= 1;
        }
+       mask.s_addr = cpu_to_be32(temp_mask);
+
+       newname.sin_addr.s_addr &= mask.s_addr;
        /*
         * Only allow one writer at a time. Writes should be
         * quite rare and small in any case.
@@ -772,6 +806,7 @@ static ssize_t smk_write_netlbladdr(struct file *file, const char __user *buf,
        mutex_lock(&smk_netlbladdr_lock);
 
        nsa = newname.sin_addr.s_addr;
+       /* try to find if the prefix is already in the list */
        for (skp = smack_netlbladdrs; skp != NULL; skp = skp->smk_next)
                if (skp->smk_host.sin_addr.s_addr == nsa &&
                    skp->smk_mask.s_addr == mask.s_addr)
@@ -787,9 +822,8 @@ static ssize_t smk_write_netlbladdr(struct file *file, const char __user *buf,
                        rc = 0;
                        skp->smk_host.sin_addr.s_addr = newname.sin_addr.s_addr;
                        skp->smk_mask.s_addr = mask.s_addr;
-                       skp->smk_next = smack_netlbladdrs;
                        skp->smk_label = sp;
-                       smack_netlbladdrs = skp;
+                       smk_netlbladdr_insert(skp);
                }
        } else {
                rc = netlbl_cfg_unlbl_static_del(&init_net, NULL,
index 35afd0c33be58b1a74b1e1be7685bd88dd65a801..718d06640dd4a8e43c34fb261d30492ddffebc62 100644 (file)
@@ -21,7 +21,6 @@
 #include <sound/pxa2xx-lib.h>
 
 #include <asm/irq.h>
-#include <mach/hardware.h>
 #include <mach/regs-ac97.h>
 #include <mach/pxa2xx-gpio.h>
 #include <mach/audio.h>
index 85cf591d4e11d594d96ac970ec1bed41d473bbb2..ccec48fc8e3fd57b286da7f6afeb91604a66a940 100644 (file)
@@ -20,8 +20,6 @@
 #include <sound/initval.h>
 #include <sound/pxa2xx-lib.h>
 
-#include <mach/hardware.h>
-#include <mach/pxa-regs.h>
 #include <mach/regs-ac97.h>
 #include <mach/audio.h>
 
index 75a0d746fb60ff50a8eccdefab76e67c380d3e9d..108b643229baecc3ec592eb300fbd4f332936c8c 100644 (file)
@@ -12,8 +12,7 @@
 #include <sound/pcm_params.h>
 #include <sound/pxa2xx-lib.h>
 
-#include <asm/dma.h>
-#include <mach/pxa-regs.h>
+#include <mach/dma.h>
 
 #include "pxa2xx-pcm.h"
 
index 3bc427645da8ef1411400990b67c9fc181e4cece..6094344fb223312bb668ad92b1cab3bcc626c068 100644 (file)
@@ -1207,7 +1207,7 @@ static const char *slave_vols[] = {
        "LFE Playback Volume",
        "Side Playback Volume",
        "Headphone Playback Volume",
-       "Headphone Playback Volume",
+       "Headphone2 Playback Volume",
        "Speaker Playback Volume",
        "External Speaker Playback Volume",
        "Speaker2 Playback Volume",
@@ -1221,7 +1221,7 @@ static const char *slave_sws[] = {
        "LFE Playback Switch",
        "Side Playback Switch",
        "Headphone Playback Switch",
-       "Headphone Playback Switch",
+       "Headphone2 Playback Switch",
        "Speaker Playback Switch",
        "External Speaker Playback Switch",
        "Speaker2 Playback Switch",
@@ -3516,6 +3516,7 @@ static int stac92xx_parse_auto_config(struct hda_codec *codec, hda_nid_t dig_out
        if (! spec->autocfg.line_outs)
                return 0; /* can't find valid pin config */
 
+#if 0 /* FIXME: temporarily disabled */
        /* If we have no real line-out pin and multiple hp-outs, HPs should
         * be set up as multi-channel outputs.
         */
@@ -3535,6 +3536,7 @@ static int stac92xx_parse_auto_config(struct hda_codec *codec, hda_nid_t dig_out
                spec->autocfg.line_out_type = AUTO_PIN_HP_OUT;
                spec->autocfg.hp_outs = 0;
        }
+#endif /* FIXME: temporarily disabled */
        if (spec->autocfg.mono_out_pin) {
                int dir = get_wcaps(codec, spec->autocfg.mono_out_pin) &
                        (AC_WCAP_OUT_AMP | AC_WCAP_IN_AMP);
index 1ba25a559524296217824f188ac8f4de081a72ec..ec930667feff3637b98030c53635ddca77c55627 100644 (file)
@@ -25,8 +25,6 @@
 #include <sound/soc-dapm.h>
 
 #include <asm/mach-types.h>
-#include <mach/pxa-regs.h>
-#include <mach/hardware.h>
 #include <mach/corgi.h>
 #include <mach/audio.h>
 
index 2e3386dfa0f0ed0604568b0b98d4a4b0f19105f8..ac294c797b7d707bb3e5727062ddfe4ee8b2bf94 100644 (file)
@@ -21,8 +21,6 @@
 #include <sound/soc-dapm.h>
 
 #include <asm/mach-types.h>
-#include <mach/pxa-regs.h>
-#include <mach/hardware.h>
 #include <mach/audio.h>
 
 #include "../codecs/wm9712.h"
index fe4a729ea6487653881c2bda3b4c627ff58b2110..949be9c2a01ba88bab7724d5d81c13c9c510c0d7 100644 (file)
@@ -29,8 +29,6 @@
 #include <sound/soc-dapm.h>
 
 #include <asm/mach-types.h>
-#include <mach/pxa-regs.h>
-#include <mach/hardware.h>
 #include <mach/audio.h>
 
 #include "../codecs/wm9712.h"
index 6e9827189fffdca01b79b9c38bb212ee4998ce17..cad2c4c0ac958f45810bfe85489dcbfc8d90bc44 100644 (file)
@@ -26,8 +26,6 @@
 
 #include <asm/mach-types.h>
 #include <asm/hardware/locomo.h>
-#include <mach/pxa-regs.h>
-#include <mach/hardware.h>
 #include <mach/poodle.h>
 #include <mach/audio.h>
 
index 73cb6b4c2f2d5efade62ae67848d56fcf23cbd03..1dfdf66fb1f387c26d1b4831c5927a8cac2795ae 100644 (file)
@@ -29,7 +29,7 @@
 #include <sound/pxa2xx-lib.h>
 
 #include <mach/hardware.h>
-#include <mach/pxa-regs.h>
+#include <mach/dma.h>
 #include <mach/regs-ssp.h>
 #include <mach/audio.h>
 #include <mach/ssp.h>
index 812c2b4d3e070d3357d06ce599a3e8025fba4211..a4a655f7e3049b1c89591d5dc25b7cc766b4e102 100644 (file)
@@ -20,8 +20,8 @@
 #include <sound/pxa2xx-lib.h>
 
 #include <mach/hardware.h>
-#include <mach/pxa-regs.h>
 #include <mach/regs-ac97.h>
+#include <mach/dma.h>
 
 #include "pxa2xx-pcm.h"
 #include "pxa2xx-ac97.h"
index 517991fb10993f16cdbdc758479885da69a840d4..223de890259e11616994cc277d165f0e3123f95d 100644 (file)
@@ -24,7 +24,7 @@
 #include <sound/pxa2xx-lib.h>
 
 #include <mach/hardware.h>
-#include <mach/pxa-regs.h>
+#include <mach/dma.h>
 #include <mach/pxa2xx-gpio.h>
 #include <mach/audio.h>
 
index a3b9e6bdf9794cb1350d34448efeddbee1989591..de8778fa872971d3e36a0d422806dd37c9a7b86d 100644 (file)
@@ -26,8 +26,6 @@
 #include <sound/soc-dapm.h>
 
 #include <asm/mach-types.h>
-#include <mach/pxa-regs.h>
-#include <mach/hardware.h>
 #include <mach/spitz.h>
 #include "../codecs/wm8750.h"
 #include "pxa2xx-pcm.h"
index c77194f74c9b56eea9438db006c0d4b37b7912b5..050223d04e54018a0bebcba647ec9e562fb11b48 100644 (file)
@@ -30,8 +30,6 @@
 
 #include <asm/mach-types.h>
 #include <mach/tosa.h>
-#include <mach/pxa-regs.h>
-#include <mach/hardware.h>
 #include <mach/audio.h>
 
 #include "../codecs/wm9712.h"